From 65dbd69c58a329f6eab500c9afb3539c0b896e68 Mon Sep 17 00:00:00 2001 From: icfor Date: Thu, 7 Mar 2024 03:40:40 +0000 Subject: [PATCH] deploy: c08361c469e49ec82771728c4b1902d3240bf140 --- 404.html | 2 +- .../_buildManifest.js | 0 .../_ssgManifest.js | 0 .../{4-f9ab361db4f4f038.js => 4-9f7a960e3a7653fa.js} | 10 +++++----- _next/static/chunks/503-376cbc65515ee87c.js | 1 + _next/static/chunks/503-6166f7bdb0bab8f4.js | 1 - _next/static/chunks/567-52b253322bfdeb49.js | 1 + _next/static/chunks/816-f354d55c4d7354c5.js | 1 - ...-f8bb99b6df23ac99.js => layout-3869892885b7981f.js} | 2 +- ...ge-5762d3667c36ba9b.js => page-1bfffe88fc8fe4b3.js} | 2 +- .../chunks/app/validator/page-8e618c838be80245.js | 1 - .../chunks/app/validator/page-ee9dd284c1466810.js | 1 + index.html | 2 +- index.txt | 6 +++--- validator.html | 2 +- validator.txt | 6 +++--- 16 files changed, 19 insertions(+), 19 deletions(-) rename _next/static/{WyQ_gkUilFLI8ibobnbav => O31cwiSF3TCFP9vhWphOF}/_buildManifest.js (100%) rename _next/static/{WyQ_gkUilFLI8ibobnbav => O31cwiSF3TCFP9vhWphOF}/_ssgManifest.js (100%) rename _next/static/chunks/{4-f9ab361db4f4f038.js => 4-9f7a960e3a7653fa.js} (73%) create mode 100644 _next/static/chunks/503-376cbc65515ee87c.js delete mode 100644 _next/static/chunks/503-6166f7bdb0bab8f4.js create mode 100644 _next/static/chunks/567-52b253322bfdeb49.js delete mode 100644 _next/static/chunks/816-f354d55c4d7354c5.js rename _next/static/chunks/app/{layout-f8bb99b6df23ac99.js => layout-3869892885b7981f.js} (95%) rename _next/static/chunks/app/{page-5762d3667c36ba9b.js => page-1bfffe88fc8fe4b3.js} (98%) delete mode 100644 _next/static/chunks/app/validator/page-8e618c838be80245.js create mode 100644 _next/static/chunks/app/validator/page-ee9dd284c1466810.js diff --git a/404.html b/404.html index 49dce39..75502cc 100644 --- a/404.html +++ b/404.html @@ -1 +1 @@ -404: This page could not be found.

404

This page could not be found.

\ No newline at end of file +404: This page could not be found.

404

This page could not be found.

\ No newline at end of file diff --git a/_next/static/WyQ_gkUilFLI8ibobnbav/_buildManifest.js b/_next/static/O31cwiSF3TCFP9vhWphOF/_buildManifest.js similarity index 100% rename from _next/static/WyQ_gkUilFLI8ibobnbav/_buildManifest.js rename to _next/static/O31cwiSF3TCFP9vhWphOF/_buildManifest.js diff --git a/_next/static/WyQ_gkUilFLI8ibobnbav/_ssgManifest.js b/_next/static/O31cwiSF3TCFP9vhWphOF/_ssgManifest.js similarity index 100% rename from _next/static/WyQ_gkUilFLI8ibobnbav/_ssgManifest.js rename to _next/static/O31cwiSF3TCFP9vhWphOF/_ssgManifest.js diff --git a/_next/static/chunks/4-f9ab361db4f4f038.js b/_next/static/chunks/4-9f7a960e3a7653fa.js similarity index 73% rename from _next/static/chunks/4-f9ab361db4f4f038.js rename to _next/static/chunks/4-9f7a960e3a7653fa.js index 2a3a974..fa56433 100644 --- a/_next/static/chunks/4-f9ab361db4f4f038.js +++ b/_next/static/chunks/4-9f7a960e3a7653fa.js @@ -1,9 +1,9 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4],{46729:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CosmWasmClient=void 0;let n=r(69721),i=r(35801),o=r(58015),a=r(43890),s=r(67357),l=r(94534),u=r(20624),d=r(2708);class c{static async connect(e){let t=await (0,a.connectComet)(e);return c.create(t)}static async create(e){return new c(e)}getCometClient(){return this.cometClient}forceGetCometClient(){if(!this.cometClient)throw Error("Comet client not available. You cannot use online functionality in offline mode.");return this.cometClient}getQueryClient(){return this.queryClient}forceGetQueryClient(){if(!this.queryClient)throw Error("Query client not available. You cannot use online functionality in offline mode.");return this.queryClient}async getChainId(){if(!this.chainId){let e=(await this.forceGetCometClient().status()).nodeInfo.network;if(!e)throw Error("Chain ID must not be empty");this.chainId=e}return this.chainId}async getHeight(){return(await this.forceGetCometClient().status()).syncInfo.latestBlockHeight}async getAccount(e){try{let t=await this.forceGetQueryClient().auth.account(e);return t?(0,o.accountFromAny)(t):null}catch(e){if(/rpc error: code = NotFound/i.test(e.toString()))return null;throw e}}async getSequence(e){let t=await this.getAccount(e);if(!t)throw Error("Account '".concat(e,"' does not exist on chain. Send some tokens there before trying to query sequence."));return{accountNumber:t.accountNumber,sequence:t.sequence}}async getBlock(e){let t=await this.forceGetCometClient().block(e);return{id:(0,n.toHex)(t.blockId.hash).toUpperCase(),header:{version:{block:new i.Uint53(t.block.header.version.block).toString(),app:new i.Uint53(t.block.header.version.app).toString()},height:t.block.header.height,chainId:t.block.header.chainId,time:(0,a.toRfc3339WithNanoseconds)(t.block.header.time)},txs:t.block.txs}}async getBalance(e,t){return this.forceGetQueryClient().bank.balance(e,t)}async getTx(e){var t;return null!==(t=(await this.txsQuery("tx.hash='".concat(e,"'")))[0])&&void 0!==t?t:null}async searchTx(e){let t;if("string"==typeof e)t=e;else if((0,o.isSearchTxQueryArray)(e))t=e.map(e=>"string"==typeof e.value?"".concat(e.key,"='").concat(e.value,"'"):"".concat(e.key,"=").concat(e.value)).join(" AND ");else throw Error("Got unsupported query type. See CosmJS 0.31 CHANGELOG for API breaking changes here.");return this.txsQuery(t)}disconnect(){this.cometClient&&this.cometClient.disconnect()}async broadcastTx(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6e4,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3e3,n=!1,i=setTimeout(()=>{n=!0},t),a=async e=>{if(n)throw new o.TimeoutError("Transaction with ID ".concat(e," was submitted but was not yet found on the chain. You might want to check later. There was a wait of ").concat(t/1e3," seconds."),e);await (0,s.sleep)(r);let i=await this.getTx(e);return i?{code:i.code,height:i.height,txIndex:i.txIndex,rawLog:i.rawLog,transactionHash:e,events:i.events,msgResponses:i.msgResponses,gasUsed:i.gasUsed,gasWanted:i.gasWanted}:a(e)},l=await this.broadcastTxSync(e);return new Promise((e,t)=>a(l).then(t=>{clearTimeout(i),e(t)},e=>{clearTimeout(i),t(e)}))}async broadcastTxSync(e){let t=await this.forceGetCometClient().broadcastTxSync({tx:e});if(t.code){var r;return Promise.reject(new o.BroadcastTxError(t.code,null!==(r=t.codespace)&&void 0!==r?r:"",t.log))}return(0,n.toHex)(t.hash).toUpperCase()}async getCodes(){let e;let t=[];do{let{codeInfos:r,pagination:n}=await this.forceGetQueryClient().wasm.listCodeInfo(e),i=r||[];t.push(...i),e=null==n?void 0:n.nextKey}while((null==e?void 0:e.length)!==0);return t.map(e=>((0,s.assert)(e.creator&&e.codeId&&e.dataHash,"entry incomplete"),{id:Number(e.codeId),creator:e.creator,checksum:(0,n.toHex)(e.dataHash)}))}async getCodeDetails(e){let t=this.codesCache.get(e);if(t)return t;let{codeInfo:r,data:i}=await this.forceGetQueryClient().wasm.getCode(e);(0,s.assert)(r&&r.codeId&&r.creator&&r.dataHash&&i,"codeInfo missing or incomplete");let o={id:Number(r.codeId),creator:r.creator,checksum:(0,n.toHex)(r.dataHash),data:i};return this.codesCache.set(e,o),o}async getContracts(e){let t;let r=[];do{let{contracts:n,pagination:i}=await this.forceGetQueryClient().wasm.listContractsByCodeId(e,t);r.push(...n),t=null==i?void 0:i.nextKey}while((null==t?void 0:t.length)!==0&&void 0!==t);return r}async getContractsByCreator(e){let t;let r=[];do{let{contractAddresses:n,pagination:i}=await this.forceGetQueryClient().wasm.listContractsByCreator(e,t);r.push(...n),t=null==i?void 0:i.nextKey}while((null==t?void 0:t.length)!==0&&void 0!==t);return r}async getContract(e){let{address:t,contractInfo:r}=await this.forceGetQueryClient().wasm.getContractInfo(e);if(!r)throw Error('No contract found at address "'.concat(e,'"'));return(0,s.assert)(t,"address missing"),(0,s.assert)(r.codeId&&r.creator&&r.label,"contractInfo incomplete"),{address:t,codeId:Number(r.codeId),creator:r.creator,admin:r.admin||void 0,label:r.label,ibcPortId:r.ibcPortId||void 0}}async getContractCodeHistory(e){let t=await this.forceGetQueryClient().wasm.getContractCodeHistory(e);if(!t)throw Error('No contract history found for address "'.concat(e,'"'));let r={[u.ContractCodeHistoryOperationType.CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT]:"Init",[u.ContractCodeHistoryOperationType.CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS]:"Genesis",[u.ContractCodeHistoryOperationType.CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE]:"Migrate"};return(t.entries||[]).map(e=>((0,s.assert)(e.operation&&e.codeId&&e.msg),{operation:r[e.operation],codeId:Number(e.codeId),msg:JSON.parse((0,n.fromUtf8)(e.msg))}))}async queryContractRaw(e,t){await this.getContract(e);let{data:r}=await this.forceGetQueryClient().wasm.queryContractRaw(e,t);return null!=r?r:null}async queryContractSmart(e,t){try{return await this.forceGetQueryClient().wasm.queryContractSmart(e,t)}catch(t){if(t instanceof Error&&t.message.startsWith("not found: contract"))throw Error('No contract found at address "'.concat(e,'"'));throw t}}async txsQuery(e){return(await this.forceGetCometClient().txSearchAll({query:e})).txs.map(e=>{var t;let r=l.TxMsgData.decode(null!==(t=e.result.data)&&void 0!==t?t:new Uint8Array);return{height:e.height,txIndex:e.index,hash:(0,n.toHex)(e.hash).toUpperCase(),code:e.result.code,events:e.result.events.map(o.fromTendermintEvent),rawLog:e.result.log||"",tx:e.tx,msgResponses:r.msgResponses,gasUsed:e.result.gasUsed,gasWanted:e.result.gasWanted}})}constructor(e){this.codesCache=new Map,e&&(this.cometClient=e,this.queryClient=o.QueryClient.withExtensions(e,o.setupAuthExtension,o.setupBankExtension,d.setupWasmExtension,o.setupTxExtension))}}t.CosmWasmClient=c},34646:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fromBinary=t.toBinary=void 0;let n=r(69721);function i(e){return(0,n.toBase64)((0,n.toUtf8)(JSON.stringify(e)))}function o(e){return JSON.parse((0,n.fromUtf8)((0,n.fromBase64)(e)))}t.toBinary=i,t.fromBinary=o},46959:function(e,t,r){"use strict";n={value:!0},t.Fl=n=n=n=n=n=n=n=n=n=n=n=n=n=n=n=void 0;var n,i=r(46729);n={enumerable:!0,get:function(){return i.CosmWasmClient}};var o=r(34646);n={enumerable:!0,get:function(){return o.fromBinary}},n={enumerable:!0,get:function(){return o.toBinary}};var a=r(14742);n={enumerable:!0,get:function(){return a._instantiate2AddressIntermediate}},n={enumerable:!0,get:function(){return a.instantiate2Address}};var s=r(2708);n={enumerable:!0,get:function(){return s.createWasmAminoConverters}},n={enumerable:!0,get:function(){return s.isMsgClearAdminEncodeObject}},n={enumerable:!0,get:function(){return s.isMsgExecuteEncodeObject}},n={enumerable:!0,get:function(){return s.isMsgInstantiateContract2EncodeObject}},n={enumerable:!0,get:function(){return s.isMsgInstantiateContractEncodeObject}},n={enumerable:!0,get:function(){return s.isMsgMigrateEncodeObject}},n={enumerable:!0,get:function(){return s.isMsgStoreCodeEncodeObject}},n={enumerable:!0,get:function(){return s.isMsgUpdateAdminEncodeObject}},n={enumerable:!0,get:function(){return s.setupWasmExtension}},n={enumerable:!0,get:function(){return s.wasmTypes}};var l=r(78927);Object.defineProperty(t,"Fl",{enumerable:!0,get:function(){return l.SigningCosmWasmClient}})},14742:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.instantiate2Address=t._instantiate2AddressIntermediate=void 0;let n=r(49400),i=r(69721),o=r(35801),a=r(67357);function s(e,t){return new n.Sha256((0,n.sha256)((0,i.toAscii)(e))).update(t).digest()}function l(e){return o.Uint64.fromNumber(e).toBytesBigEndian()}function u(e,t,r,n,o){(0,a.assert)(32===e.length);let u=(0,i.fromBech32)(t).data,d="string"==typeof n?(0,i.toUtf8)(n):new Uint8Array;if(r.length<1||r.length>64)throw Error("Salt must be between 1 and 64 bytes");let c=new Uint8Array([...(0,i.toAscii)("wasm"),0,...l(e.length),...e,...l(u.length),...u,...l(r.length),...r,...l(d.length),...d]),p=s("module",c),f=(0,i.toBech32)(o,p);return{key:c,addressData:p,address:f}}function d(e,t,r,n){return u(e,t,r,null,n).address}t._instantiate2AddressIntermediate=u,t.instantiate2Address=d},2708:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setupWasmExtension=t.wasmTypes=t.isMsgUpdateAdminEncodeObject=t.isMsgStoreCodeEncodeObject=t.isMsgMigrateEncodeObject=t.isMsgInstantiateContractEncodeObject=t.isMsgInstantiateContract2EncodeObject=t.isMsgExecuteEncodeObject=t.isMsgClearAdminEncodeObject=t.createWasmAminoConverters=void 0;var n=r(49665);Object.defineProperty(t,"createWasmAminoConverters",{enumerable:!0,get:function(){return n.createWasmAminoConverters}});var i=r(68029);Object.defineProperty(t,"isMsgClearAdminEncodeObject",{enumerable:!0,get:function(){return i.isMsgClearAdminEncodeObject}}),Object.defineProperty(t,"isMsgExecuteEncodeObject",{enumerable:!0,get:function(){return i.isMsgExecuteEncodeObject}}),Object.defineProperty(t,"isMsgInstantiateContract2EncodeObject",{enumerable:!0,get:function(){return i.isMsgInstantiateContract2EncodeObject}}),Object.defineProperty(t,"isMsgInstantiateContractEncodeObject",{enumerable:!0,get:function(){return i.isMsgInstantiateContractEncodeObject}}),Object.defineProperty(t,"isMsgMigrateEncodeObject",{enumerable:!0,get:function(){return i.isMsgMigrateEncodeObject}}),Object.defineProperty(t,"isMsgStoreCodeEncodeObject",{enumerable:!0,get:function(){return i.isMsgStoreCodeEncodeObject}}),Object.defineProperty(t,"isMsgUpdateAdminEncodeObject",{enumerable:!0,get:function(){return i.isMsgUpdateAdminEncodeObject}}),Object.defineProperty(t,"wasmTypes",{enumerable:!0,get:function(){return i.wasmTypes}});var o=r(95952);Object.defineProperty(t,"setupWasmExtension",{enumerable:!0,get:function(){return o.setupWasmExtension}})},49665:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createWasmAminoConverters=t.accessTypeToString=t.accessTypeFromString=void 0;let n=r(83552),i=r(69721),o=r(20624);function a(e){switch(e){case"Unspecified":return o.AccessType.ACCESS_TYPE_UNSPECIFIED;case"Nobody":return o.AccessType.ACCESS_TYPE_NOBODY;case"OnlyAddress":return o.AccessType.ACCESS_TYPE_ONLY_ADDRESS;case"Everybody":return o.AccessType.ACCESS_TYPE_EVERYBODY;case"AnyOfAddresses":return o.AccessType.ACCESS_TYPE_ANY_OF_ADDRESSES;default:return o.AccessType.UNRECOGNIZED}}function s(e){switch(e){case o.AccessType.ACCESS_TYPE_UNSPECIFIED:return"Unspecified";case o.AccessType.ACCESS_TYPE_NOBODY:return"Nobody";case o.AccessType.ACCESS_TYPE_ONLY_ADDRESS:return"OnlyAddress";case o.AccessType.ACCESS_TYPE_EVERYBODY:return"Everybody";case o.AccessType.ACCESS_TYPE_ANY_OF_ADDRESSES:return"AnyOfAddresses";case o.AccessType.UNRECOGNIZED:default:return"UNRECOGNIZED"}}function l(){return{"/cosmwasm.wasm.v1.MsgStoreCode":{aminoType:"wasm/MsgStoreCode",toAmino:e=>{let{sender:t,wasmByteCode:r,instantiatePermission:n}=e;return{sender:t,wasm_byte_code:(0,i.toBase64)(r),instantiate_permission:n?{permission:s(n.permission),address:n.address||void 0,addresses:0!==n.addresses.length?n.addresses:void 0}:void 0}},fromAmino:e=>{var t,r;let{sender:n,wasm_byte_code:s,instantiate_permission:l}=e;return{sender:n,wasmByteCode:(0,i.fromBase64)(s),instantiatePermission:l?o.AccessConfig.fromPartial({permission:a(l.permission),address:null!==(t=l.address)&&void 0!==t?t:"",addresses:null!==(r=l.addresses)&&void 0!==r?r:[]}):void 0}}},"/cosmwasm.wasm.v1.MsgInstantiateContract":{aminoType:"wasm/MsgInstantiateContract",toAmino:e=>{let{sender:t,codeId:r,label:o,msg:a,funds:s,admin:l}=e;return{sender:t,code_id:r.toString(),label:o,msg:JSON.parse((0,i.fromUtf8)(a)),funds:s,admin:(0,n.omitDefault)(l)}},fromAmino:e=>{let{sender:t,code_id:r,label:n,msg:o,funds:a,admin:s}=e;return{sender:t,codeId:BigInt(r),label:n,msg:(0,i.toUtf8)(JSON.stringify(o)),funds:[...a],admin:null!=s?s:""}}},"/cosmwasm.wasm.v1.MsgInstantiateContract2":{aminoType:"wasm/MsgInstantiateContract2",toAmino:e=>{let{sender:t,codeId:r,label:o,msg:a,funds:s,admin:l,salt:u,fixMsg:d}=e;return{sender:t,code_id:r.toString(),label:o,msg:JSON.parse((0,i.fromUtf8)(a)),funds:s,admin:(0,n.omitDefault)(l),salt:(0,i.toBase64)(u),fix_msg:(0,n.omitDefault)(d)}},fromAmino:e=>{let{sender:t,code_id:r,label:n,msg:o,funds:a,admin:s,salt:l,fix_msg:u}=e;return{sender:t,codeId:BigInt(r),label:n,msg:(0,i.toUtf8)(JSON.stringify(o)),funds:[...a],admin:null!=s?s:"",salt:(0,i.fromBase64)(l),fixMsg:null!=u&&u}}},"/cosmwasm.wasm.v1.MsgUpdateAdmin":{aminoType:"wasm/MsgUpdateAdmin",toAmino:e=>{let{sender:t,newAdmin:r,contract:n}=e;return{sender:t,new_admin:r,contract:n}},fromAmino:e=>{let{sender:t,new_admin:r,contract:n}=e;return{sender:t,newAdmin:r,contract:n}}},"/cosmwasm.wasm.v1.MsgClearAdmin":{aminoType:"wasm/MsgClearAdmin",toAmino:e=>{let{sender:t,contract:r}=e;return{sender:t,contract:r}},fromAmino:e=>{let{sender:t,contract:r}=e;return{sender:t,contract:r}}},"/cosmwasm.wasm.v1.MsgExecuteContract":{aminoType:"wasm/MsgExecuteContract",toAmino:e=>{let{sender:t,contract:r,msg:n,funds:o}=e;return{sender:t,contract:r,msg:JSON.parse((0,i.fromUtf8)(n)),funds:o}},fromAmino:e=>{let{sender:t,contract:r,msg:n,funds:o}=e;return{sender:t,contract:r,msg:(0,i.toUtf8)(JSON.stringify(n)),funds:[...o]}}},"/cosmwasm.wasm.v1.MsgMigrateContract":{aminoType:"wasm/MsgMigrateContract",toAmino:e=>{let{sender:t,contract:r,codeId:n,msg:o}=e;return{sender:t,contract:r,code_id:n.toString(),msg:JSON.parse((0,i.fromUtf8)(o))}},fromAmino:e=>{let{sender:t,contract:r,code_id:n,msg:o}=e;return{sender:t,contract:r,codeId:BigInt(n),msg:(0,i.toUtf8)(JSON.stringify(o))}}}}}t.accessTypeFromString=a,t.accessTypeToString=s,t.createWasmAminoConverters=l},68029:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isMsgExecuteEncodeObject=t.isMsgMigrateEncodeObject=t.isMsgClearAdminEncodeObject=t.isMsgUpdateAdminEncodeObject=t.isMsgInstantiateContract2EncodeObject=t.isMsgInstantiateContractEncodeObject=t.isMsgStoreCodeEncodeObject=t.wasmTypes=void 0;let n=r(88242);function i(e){return"/cosmwasm.wasm.v1.MsgStoreCode"===e.typeUrl}function o(e){return"/cosmwasm.wasm.v1.MsgInstantiateContract"===e.typeUrl}function a(e){return"/cosmwasm.wasm.v1.MsgInstantiateContract2"===e.typeUrl}function s(e){return"/cosmwasm.wasm.v1.MsgUpdateAdmin"===e.typeUrl}function l(e){return"/cosmwasm.wasm.v1.MsgClearAdmin"===e.typeUrl}function u(e){return"/cosmwasm.wasm.v1.MsgMigrateContract"===e.typeUrl}function d(e){return"/cosmwasm.wasm.v1.MsgExecuteContract"===e.typeUrl}t.wasmTypes=[["/cosmwasm.wasm.v1.MsgClearAdmin",n.MsgClearAdmin],["/cosmwasm.wasm.v1.MsgExecuteContract",n.MsgExecuteContract],["/cosmwasm.wasm.v1.MsgMigrateContract",n.MsgMigrateContract],["/cosmwasm.wasm.v1.MsgStoreCode",n.MsgStoreCode],["/cosmwasm.wasm.v1.MsgInstantiateContract",n.MsgInstantiateContract],["/cosmwasm.wasm.v1.MsgInstantiateContract2",n.MsgInstantiateContract2],["/cosmwasm.wasm.v1.MsgUpdateAdmin",n.MsgUpdateAdmin]],t.isMsgStoreCodeEncodeObject=i,t.isMsgInstantiateContractEncodeObject=o,t.isMsgInstantiateContract2EncodeObject=a,t.isMsgUpdateAdminEncodeObject=s,t.isMsgClearAdminEncodeObject=l,t.isMsgMigrateEncodeObject=u,t.isMsgExecuteEncodeObject=d},95952:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setupWasmExtension=void 0;let n=r(69721),i=r(58015),o=r(81371);function a(e){let t=(0,i.createProtobufRpcClient)(e),r=new o.QueryClientImpl(t);return{wasm:{listCodeInfo:async e=>{let t={pagination:(0,i.createPagination)(e)};return r.Codes(t)},getCode:async e=>{let t=o.QueryCodeRequest.fromPartial({codeId:BigInt(e)});return r.Code(t)},listContractsByCodeId:async(e,t)=>{let n=o.QueryContractsByCodeRequest.fromPartial({codeId:BigInt(e),pagination:(0,i.createPagination)(t)});return r.ContractsByCode(n)},listContractsByCreator:async(e,t)=>{let n={creatorAddress:e,pagination:(0,i.createPagination)(t)};return r.ContractsByCreator(n)},getContractInfo:async e=>{let t={address:e};return r.ContractInfo(t)},getContractCodeHistory:async(e,t)=>{let n={address:e,pagination:(0,i.createPagination)(t)};return r.ContractHistory(n)},getAllContractState:async(e,t)=>{let n={address:e,pagination:(0,i.createPagination)(t)};return r.AllContractState(n)},queryContractRaw:async(e,t)=>{let n={address:e,queryData:t};return r.RawContractState(n)},queryContractSmart:async(e,t)=>{let i;let o={address:e,queryData:(0,n.toUtf8)(JSON.stringify(t))},{data:a}=await r.SmartContractState(o);try{i=(0,n.fromUtf8)(a)}catch(e){throw Error("Could not UTF-8 decode smart query response from contract: ".concat(e))}try{return JSON.parse(i)}catch(e){throw Error("Could not JSON parse smart query response from contract: ".concat(e))}}}}}t.setupWasmExtension=a},78927:function(e,t,r){"use strict";var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.SigningCosmWasmClient=void 0;let i=r(83552),o=r(49400),a=r(69721),s=r(35801),l=r(18722),u=r(58015),d=r(43890),c=r(67357),p=r(53856),f=r(62884),h=r(2264),g=r(26136),m=r(88242),y=n(r(71821)),v=r(46729),b=r(2708);function S(e){return"Error when broadcasting tx ".concat(e.transactionHash," at height ").concat(e.height,". Code: ").concat(e.code,"; Raw log: ").concat(e.rawLog)}class w extends v.CosmWasmClient{static async connectWithSigner(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=await (0,d.connectComet)(e);return w.createWithSigner(n,t,r)}static async createWithSigner(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return new w(e,t,r)}static async offline(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new w(void 0,e,t)}async simulate(e,t,r){let n=t.map(e=>this.registry.encodeAsAny(e)),o=(await this.signer.getAccounts()).find(t=>t.address===e);if(!o)throw Error("Failed to retrieve account from signer");let a=(0,i.encodeSecp256k1Pubkey)(o.pubkey),{sequence:l}=await this.getSequence(e),{gasInfo:u}=await this.forceGetQueryClient().tx.simulate(n,r,a,l);return(0,c.assertDefined)(u),s.Uint53.fromString(u.gasUsed.toString()).toNumber()}async upload(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",i=arguments.length>4?arguments[4]:void 0,s=y.default.gzip(t,{level:9}),l={typeUrl:"/cosmwasm.wasm.v1.MsgStoreCode",value:m.MsgStoreCode.fromPartial({sender:e,wasmByteCode:s,instantiatePermission:i})},d="auto"==r?1.1:r,c=await this.signAndBroadcast(e,[l],d,n);if((0,u.isDeliverTxFailure)(c))throw Error(S(c));let p=u.logs.parseRawLog(c.rawLog),f=u.logs.findAttribute(p,"store_code","code_id");return{checksum:(0,a.toHex)((0,o.sha256)(t)),originalSize:t.length,compressedSize:s.length,codeId:Number.parseInt(f.value,10),logs:p,height:c.height,transactionHash:c.transactionHash,events:c.events,gasWanted:c.gasWanted,gasUsed:c.gasUsed}}async instantiate(e,t,r,n,i){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},l={typeUrl:"/cosmwasm.wasm.v1.MsgInstantiateContract",value:m.MsgInstantiateContract.fromPartial({sender:e,codeId:BigInt(new s.Uint53(t).toString()),label:n,msg:(0,a.toUtf8)(JSON.stringify(r)),funds:[...o.funds||[]],admin:o.admin})},d=await this.signAndBroadcast(e,[l],i,o.memo);if((0,u.isDeliverTxFailure)(d))throw Error(S(d));let c=u.logs.parseRawLog(d.rawLog);return{contractAddress:u.logs.findAttribute(c,"instantiate","_contract_address").value,logs:c,height:d.height,transactionHash:d.transactionHash,events:d.events,gasWanted:d.gasWanted,gasUsed:d.gasUsed}}async instantiate2(e,t,r,n,i,o){let l=arguments.length>6&&void 0!==arguments[6]?arguments[6]:{},d={typeUrl:"/cosmwasm.wasm.v1.MsgInstantiateContract2",value:m.MsgInstantiateContract2.fromPartial({sender:e,codeId:BigInt(new s.Uint53(t).toString()),label:i,msg:(0,a.toUtf8)(JSON.stringify(n)),funds:[...l.funds||[]],admin:l.admin,salt:r,fixMsg:!1})},c=await this.signAndBroadcast(e,[d],o,l.memo);if((0,u.isDeliverTxFailure)(c))throw Error(S(c));let p=u.logs.parseRawLog(c.rawLog);return{contractAddress:u.logs.findAttribute(p,"instantiate","_contract_address").value,logs:p,height:c.height,transactionHash:c.transactionHash,events:c.events,gasWanted:c.gasWanted,gasUsed:c.gasUsed}}async updateAdmin(e,t,r,n){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",o={typeUrl:"/cosmwasm.wasm.v1.MsgUpdateAdmin",value:m.MsgUpdateAdmin.fromPartial({sender:e,contract:t,newAdmin:r})},a=await this.signAndBroadcast(e,[o],n,i);if((0,u.isDeliverTxFailure)(a))throw Error(S(a));return{logs:u.logs.parseRawLog(a.rawLog),height:a.height,transactionHash:a.transactionHash,events:a.events,gasWanted:a.gasWanted,gasUsed:a.gasUsed}}async clearAdmin(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",i={typeUrl:"/cosmwasm.wasm.v1.MsgClearAdmin",value:m.MsgClearAdmin.fromPartial({sender:e,contract:t})},o=await this.signAndBroadcast(e,[i],r,n);if((0,u.isDeliverTxFailure)(o))throw Error(S(o));return{logs:u.logs.parseRawLog(o.rawLog),height:o.height,transactionHash:o.transactionHash,events:o.events,gasWanted:o.gasWanted,gasUsed:o.gasUsed}}async migrate(e,t,r,n,i){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"",l={typeUrl:"/cosmwasm.wasm.v1.MsgMigrateContract",value:m.MsgMigrateContract.fromPartial({sender:e,contract:t,codeId:BigInt(new s.Uint53(r).toString()),msg:(0,a.toUtf8)(JSON.stringify(n))})},d=await this.signAndBroadcast(e,[l],i,o);if((0,u.isDeliverTxFailure)(d))throw Error(S(d));return{logs:u.logs.parseRawLog(d.rawLog),height:d.height,transactionHash:d.transactionHash,events:d.events,gasWanted:d.gasWanted,gasUsed:d.gasUsed}}async execute(e,t,r,n){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",o=arguments.length>5?arguments[5]:void 0,a={contractAddress:t,msg:r,funds:o};return this.executeMultiple(e,[a],n,i)}async executeMultiple(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",i=t.map(t=>({typeUrl:"/cosmwasm.wasm.v1.MsgExecuteContract",value:m.MsgExecuteContract.fromPartial({sender:e,contract:t.contractAddress,msg:(0,a.toUtf8)(JSON.stringify(t.msg)),funds:[...t.funds||[]]})})),o=await this.signAndBroadcast(e,i,r,n);if((0,u.isDeliverTxFailure)(o))throw Error(S(o));return{logs:u.logs.parseRawLog(o.rawLog),height:o.height,transactionHash:o.transactionHash,events:o.events,gasWanted:o.gasWanted,gasUsed:o.gasUsed}}async sendTokens(e,t,r,n){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",o={typeUrl:"/cosmos.bank.v1beta1.MsgSend",value:{fromAddress:e,toAddress:t,amount:[...r]}};return this.signAndBroadcast(e,[o],n,i)}async delegateTokens(e,t,r,n){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",o={typeUrl:"/cosmos.staking.v1beta1.MsgDelegate",value:f.MsgDelegate.fromPartial({delegatorAddress:e,validatorAddress:t,amount:r})};return this.signAndBroadcast(e,[o],n,i)}async undelegateTokens(e,t,r,n){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",o={typeUrl:"/cosmos.staking.v1beta1.MsgUndelegate",value:f.MsgUndelegate.fromPartial({delegatorAddress:e,validatorAddress:t,amount:r})};return this.signAndBroadcast(e,[o],n,i)}async withdrawRewards(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",i={typeUrl:"/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward",value:p.MsgWithdrawDelegatorReward.fromPartial({delegatorAddress:e,validatorAddress:t})};return this.signAndBroadcast(e,[i],r,n)}async signAndBroadcast(e,t,r){let n,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=arguments.length>4?arguments[4]:void 0;if("auto"==r||"number"==typeof r){(0,c.assertDefined)(this.gasPrice,"Gas price must be set in the client options when auto gas is used.");let o=await this.simulate(e,t,i),a="number"==typeof r?r:1.4;n=(0,u.calculateFee)(Math.round(o*a),this.gasPrice)}else n=r;let a=await this.sign(e,t,n,i,void 0,o),s=g.TxRaw.encode(a).finish();return this.broadcastTx(s,this.broadcastTimeoutMs,this.broadcastPollIntervalMs)}async signAndBroadcastSync(e,t,r){let n,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=arguments.length>4?arguments[4]:void 0;if("auto"==r||"number"==typeof r){(0,c.assertDefined)(this.gasPrice,"Gas price must be set in the client options when auto gas is used.");let o=await this.simulate(e,t,i),a="number"==typeof r?r:1.3;n=(0,u.calculateFee)(Math.round(o*a),this.gasPrice)}else n=r;let a=await this.sign(e,t,n,i,void 0,o),s=g.TxRaw.encode(a).finish();return this.broadcastTxSync(s)}async sign(e,t,r,n,i,o){let a;if(i)a=i;else{let{accountNumber:t,sequence:r}=await this.getSequence(e);a={accountNumber:t,sequence:r,chainId:await this.getChainId()}}return(0,l.isOfflineDirectSigner)(this.signer)?this.signDirect(e,t,r,n,a,o):this.signAmino(e,t,r,n,a,o)}async signAmino(e,t,r,n,o,u){let{accountNumber:d,sequence:p,chainId:f}=o;(0,c.assert)(!(0,l.isOfflineDirectSigner)(this.signer));let m=(await this.signer.getAccounts()).find(t=>t.address===e);if(!m)throw Error("Failed to retrieve account from signer");let y=(0,l.encodePubkey)((0,i.encodeSecp256k1Pubkey)(m.pubkey)),v=h.SignMode.SIGN_MODE_LEGACY_AMINO_JSON,b=t.map(e=>this.aminoTypes.toAmino(e)),S=(0,i.makeSignDoc)(b,r,f,n,d,p,u),{signature:w,signed:_}=await this.signer.signAmino(e,S),k={typeUrl:"/cosmos.tx.v1beta1.TxBody",value:{messages:_.msgs.map(e=>this.aminoTypes.fromAmino(e)),memo:_.memo,timeoutHeight:u}},O=this.registry.encode(k),P=s.Int53.fromString(_.fee.gas).toNumber(),A=s.Int53.fromString(_.sequence).toNumber(),I=(0,l.makeAuthInfoBytes)([{pubkey:y,sequence:A}],_.fee.amount,P,_.fee.granter,_.fee.payer,v);return g.TxRaw.fromPartial({bodyBytes:O,authInfoBytes:I,signatures:[(0,a.fromBase64)(w.signature)]})}async signDirect(e,t,r,n,o,u){let{accountNumber:d,sequence:p,chainId:f}=o;(0,c.assert)((0,l.isOfflineDirectSigner)(this.signer));let h=(await this.signer.getAccounts()).find(t=>t.address===e);if(!h)throw Error("Failed to retrieve account from signer");let m=(0,l.encodePubkey)((0,i.encodeSecp256k1Pubkey)(h.pubkey)),y={typeUrl:"/cosmos.tx.v1beta1.TxBody",value:{messages:t,memo:n,timeoutHeight:u}},v=this.registry.encode(y),b=s.Int53.fromString(r.gas).toNumber(),S=(0,l.makeAuthInfoBytes)([{pubkey:m,sequence:p}],r.amount,b,r.granter,r.payer),w=(0,l.makeSignDoc)(v,S,f,d),{signature:_,signed:k}=await this.signer.signDirect(e,w);return g.TxRaw.fromPartial({bodyBytes:k.bodyBytes,authInfoBytes:k.authInfoBytes,signatures:[(0,a.fromBase64)(_.signature)]})}constructor(e,t,r){super(e);let{registry:n=new l.Registry([...u.defaultRegistryTypes,...b.wasmTypes]),aminoTypes:i=new u.AminoTypes({...(0,u.createDefaultAminoConverters)(),...(0,b.createWasmAminoConverters)()})}=r;this.registry=n,this.aminoTypes=i,this.signer=t,this.broadcastTimeoutMs=r.broadcastTimeoutMs,this.broadcastPollIntervalMs=r.broadcastPollIntervalMs,this.gasPrice=r.gasPrice}}t.SigningCosmWasmClient=w},12999:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CosmWasmClient=void 0;let n=r(69721),i=r(35801),o=r(58015),a=r(43890),s=r(67357),l=r(94534),u=r(20624),d=r(64215);class c{static async connect(e){let t=await (0,a.connectComet)(e);return c.create(t)}static async create(e){return new c(e)}getCometClient(){return this.cometClient}forceGetCometClient(){if(!this.cometClient)throw Error("Comet client not available. You cannot use online functionality in offline mode.");return this.cometClient}getQueryClient(){return this.queryClient}forceGetQueryClient(){if(!this.queryClient)throw Error("Query client not available. You cannot use online functionality in offline mode.");return this.queryClient}async getChainId(){if(!this.chainId){let e=(await this.forceGetCometClient().status()).nodeInfo.network;if(!e)throw Error("Chain ID must not be empty");this.chainId=e}return this.chainId}async getHeight(){return(await this.forceGetCometClient().status()).syncInfo.latestBlockHeight}async getAccount(e){try{let t=await this.forceGetQueryClient().auth.account(e);return t?(0,o.accountFromAny)(t):null}catch(e){if(/rpc error: code = NotFound/i.test(e.toString()))return null;throw e}}async getSequence(e){let t=await this.getAccount(e);if(!t)throw Error("Account '".concat(e,"' does not exist on chain. Send some tokens there before trying to query sequence."));return{accountNumber:t.accountNumber,sequence:t.sequence}}async getBlock(e){let t=await this.forceGetCometClient().block(e);return{id:(0,n.toHex)(t.blockId.hash).toUpperCase(),header:{version:{block:new i.Uint53(t.block.header.version.block).toString(),app:new i.Uint53(t.block.header.version.app).toString()},height:t.block.header.height,chainId:t.block.header.chainId,time:(0,a.toRfc3339WithNanoseconds)(t.block.header.time)},txs:t.block.txs}}async getBalance(e,t){return this.forceGetQueryClient().bank.balance(e,t)}async getTx(e){var t;return null!==(t=(await this.txsQuery("tx.hash='".concat(e,"'")))[0])&&void 0!==t?t:null}async searchTx(e){let t;if("string"==typeof e)t=e;else if((0,o.isSearchTxQueryArray)(e))t=e.map(e=>"string"==typeof e.value?"".concat(e.key,"='").concat(e.value,"'"):"".concat(e.key,"=").concat(e.value)).join(" AND ");else throw Error("Got unsupported query type. See CosmJS 0.31 CHANGELOG for API breaking changes here.");return this.txsQuery(t)}disconnect(){this.cometClient&&this.cometClient.disconnect()}async broadcastTx(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6e4,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3e3,n=!1,i=setTimeout(()=>{n=!0},t),a=async e=>{if(n)throw new o.TimeoutError("Transaction with ID ".concat(e," was submitted but was not yet found on the chain. You might want to check later. There was a wait of ").concat(t/1e3," seconds."),e);await (0,s.sleep)(r);let i=await this.getTx(e);return i?{code:i.code,height:i.height,txIndex:i.txIndex,rawLog:i.rawLog,transactionHash:e,events:i.events,msgResponses:i.msgResponses,gasUsed:i.gasUsed,gasWanted:i.gasWanted}:a(e)},l=await this.broadcastTxSync(e);return new Promise((e,t)=>a(l).then(t=>{clearTimeout(i),e(t)},e=>{clearTimeout(i),t(e)}))}async broadcastTxSync(e){let t=await this.forceGetCometClient().broadcastTxSync({tx:e});if(t.code){var r;return Promise.reject(new o.BroadcastTxError(t.code,null!==(r=t.codespace)&&void 0!==r?r:"",t.log))}return(0,n.toHex)(t.hash).toUpperCase()}async getCodes(){let e;let t=[];do{let{codeInfos:r,pagination:n}=await this.forceGetQueryClient().wasm.listCodeInfo(e),i=r||[];t.push(...i),e=null==n?void 0:n.nextKey}while((null==e?void 0:e.length)!==0);return t.map(e=>((0,s.assert)(e.creator&&e.codeId&&e.dataHash,"entry incomplete"),{id:Number(e.codeId),creator:e.creator,checksum:(0,n.toHex)(e.dataHash)}))}async getCodeDetails(e){let t=this.codesCache.get(e);if(t)return t;let{codeInfo:r,data:i}=await this.forceGetQueryClient().wasm.getCode(e);(0,s.assert)(r&&r.codeId&&r.creator&&r.dataHash&&i,"codeInfo missing or incomplete");let o={id:Number(r.codeId),creator:r.creator,checksum:(0,n.toHex)(r.dataHash),data:i};return this.codesCache.set(e,o),o}async getContracts(e){let t;let r=[];do{let{contracts:n,pagination:i}=await this.forceGetQueryClient().wasm.listContractsByCodeId(e,t);r.push(...n),t=null==i?void 0:i.nextKey}while((null==t?void 0:t.length)!==0&&void 0!==t);return r}async getContractsByCreator(e){let t;let r=[];do{let{contractAddresses:n,pagination:i}=await this.forceGetQueryClient().wasm.listContractsByCreator(e,t);r.push(...n),t=null==i?void 0:i.nextKey}while((null==t?void 0:t.length)!==0&&void 0!==t);return r}async getContract(e){let{address:t,contractInfo:r}=await this.forceGetQueryClient().wasm.getContractInfo(e);if(!r)throw Error('No contract found at address "'.concat(e,'"'));return(0,s.assert)(t,"address missing"),(0,s.assert)(r.codeId&&r.creator&&r.label,"contractInfo incomplete"),{address:t,codeId:Number(r.codeId),creator:r.creator,admin:r.admin||void 0,label:r.label,ibcPortId:r.ibcPortId||void 0}}async getContractCodeHistory(e){let t=await this.forceGetQueryClient().wasm.getContractCodeHistory(e);if(!t)throw Error('No contract history found for address "'.concat(e,'"'));let r={[u.ContractCodeHistoryOperationType.CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT]:"Init",[u.ContractCodeHistoryOperationType.CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS]:"Genesis",[u.ContractCodeHistoryOperationType.CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE]:"Migrate"};return(t.entries||[]).map(e=>((0,s.assert)(e.operation&&e.codeId&&e.msg),{operation:r[e.operation],codeId:Number(e.codeId),msg:JSON.parse((0,n.fromUtf8)(e.msg))}))}async queryContractRaw(e,t){await this.getContract(e);let{data:r}=await this.forceGetQueryClient().wasm.queryContractRaw(e,t);return null!=r?r:null}async queryContractSmart(e,t){try{return await this.forceGetQueryClient().wasm.queryContractSmart(e,t)}catch(t){if(t instanceof Error&&t.message.startsWith("not found: contract"))throw Error('No contract found at address "'.concat(e,'"'));throw t}}async txsQuery(e){return(await this.forceGetCometClient().txSearchAll({query:e})).txs.map(e=>{var t;let r=l.TxMsgData.decode(null!==(t=e.result.data)&&void 0!==t?t:new Uint8Array);return{height:e.height,txIndex:e.index,hash:(0,n.toHex)(e.hash).toUpperCase(),code:e.result.code,events:e.result.events.map(o.fromTendermintEvent),rawLog:e.result.log||"",tx:e.tx,msgResponses:r.msgResponses,gasUsed:e.result.gasUsed,gasWanted:e.result.gasWanted}})}constructor(e){this.codesCache=new Map,e&&(this.cometClient=e,this.queryClient=o.QueryClient.withExtensions(e,o.setupAuthExtension,o.setupBankExtension,d.setupWasmExtension,o.setupTxExtension))}}t.CosmWasmClient=c},94278:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fromBinary=t.toBinary=void 0;let n=r(69721);function i(e){return(0,n.toBase64)((0,n.toUtf8)(JSON.stringify(e)))}function o(e){return JSON.parse((0,n.fromUtf8)((0,n.fromBase64)(e)))}t.toBinary=i,t.fromBinary=o},10823:function(e,t,r){"use strict";n={value:!0},t.Fl=t.dv=n=n=n=n=n=n=n=n=n=n=n=n=n=n=void 0;var n,i=r(12999);n={enumerable:!0,get:function(){return i.CosmWasmClient}};var o=r(94278);n={enumerable:!0,get:function(){return o.fromBinary}},n={enumerable:!0,get:function(){return o.toBinary}};var a=r(20697);n={enumerable:!0,get:function(){return a._instantiate2AddressIntermediate}},n={enumerable:!0,get:function(){return a.instantiate2Address}};var s=r(64215);n={enumerable:!0,get:function(){return s.createWasmAminoConverters}},n={enumerable:!0,get:function(){return s.isMsgClearAdminEncodeObject}},n={enumerable:!0,get:function(){return s.isMsgExecuteEncodeObject}},n={enumerable:!0,get:function(){return s.isMsgInstantiateContract2EncodeObject}},n={enumerable:!0,get:function(){return s.isMsgInstantiateContractEncodeObject}},n={enumerable:!0,get:function(){return s.isMsgMigrateEncodeObject}},n={enumerable:!0,get:function(){return s.isMsgStoreCodeEncodeObject}},n={enumerable:!0,get:function(){return s.isMsgUpdateAdminEncodeObject}},n={enumerable:!0,get:function(){return s.setupWasmExtension}},Object.defineProperty(t,"dv",{enumerable:!0,get:function(){return s.wasmTypes}});var l=r(19015);Object.defineProperty(t,"Fl",{enumerable:!0,get:function(){return l.SigningCosmWasmClient}})},20697:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.instantiate2Address=t._instantiate2AddressIntermediate=void 0;let n=r(49400),i=r(69721),o=r(35801),a=r(67357);function s(e,t){return new n.Sha256((0,n.sha256)((0,i.toAscii)(e))).update(t).digest()}function l(e){return o.Uint64.fromNumber(e).toBytesBigEndian()}function u(e,t,r,n,o){(0,a.assert)(32===e.length);let u=(0,i.fromBech32)(t).data,d="string"==typeof n?(0,i.toUtf8)(n):new Uint8Array;if(r.length<1||r.length>64)throw Error("Salt must be between 1 and 64 bytes");let c=new Uint8Array([...(0,i.toAscii)("wasm"),0,...l(e.length),...e,...l(u.length),...u,...l(r.length),...r,...l(d.length),...d]),p=s("module",c),f=(0,i.toBech32)(o,p);return{key:c,addressData:p,address:f}}function d(e,t,r,n){return u(e,t,r,null,n).address}t._instantiate2AddressIntermediate=u,t.instantiate2Address=d},64215:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setupWasmExtension=t.wasmTypes=t.isMsgUpdateAdminEncodeObject=t.isMsgStoreCodeEncodeObject=t.isMsgMigrateEncodeObject=t.isMsgInstantiateContractEncodeObject=t.isMsgInstantiateContract2EncodeObject=t.isMsgExecuteEncodeObject=t.isMsgClearAdminEncodeObject=t.createWasmAminoConverters=void 0;var n=r(40805);Object.defineProperty(t,"createWasmAminoConverters",{enumerable:!0,get:function(){return n.createWasmAminoConverters}});var i=r(64058);Object.defineProperty(t,"isMsgClearAdminEncodeObject",{enumerable:!0,get:function(){return i.isMsgClearAdminEncodeObject}}),Object.defineProperty(t,"isMsgExecuteEncodeObject",{enumerable:!0,get:function(){return i.isMsgExecuteEncodeObject}}),Object.defineProperty(t,"isMsgInstantiateContract2EncodeObject",{enumerable:!0,get:function(){return i.isMsgInstantiateContract2EncodeObject}}),Object.defineProperty(t,"isMsgInstantiateContractEncodeObject",{enumerable:!0,get:function(){return i.isMsgInstantiateContractEncodeObject}}),Object.defineProperty(t,"isMsgMigrateEncodeObject",{enumerable:!0,get:function(){return i.isMsgMigrateEncodeObject}}),Object.defineProperty(t,"isMsgStoreCodeEncodeObject",{enumerable:!0,get:function(){return i.isMsgStoreCodeEncodeObject}}),Object.defineProperty(t,"isMsgUpdateAdminEncodeObject",{enumerable:!0,get:function(){return i.isMsgUpdateAdminEncodeObject}}),Object.defineProperty(t,"wasmTypes",{enumerable:!0,get:function(){return i.wasmTypes}});var o=r(83584);Object.defineProperty(t,"setupWasmExtension",{enumerable:!0,get:function(){return o.setupWasmExtension}})},40805:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createWasmAminoConverters=t.accessTypeToString=t.accessTypeFromString=void 0;let n=r(83552),i=r(69721),o=r(20624);function a(e){switch(e){case"Unspecified":return o.AccessType.ACCESS_TYPE_UNSPECIFIED;case"Nobody":return o.AccessType.ACCESS_TYPE_NOBODY;case"OnlyAddress":return o.AccessType.ACCESS_TYPE_ONLY_ADDRESS;case"Everybody":return o.AccessType.ACCESS_TYPE_EVERYBODY;case"AnyOfAddresses":return o.AccessType.ACCESS_TYPE_ANY_OF_ADDRESSES;default:return o.AccessType.UNRECOGNIZED}}function s(e){switch(e){case o.AccessType.ACCESS_TYPE_UNSPECIFIED:return"Unspecified";case o.AccessType.ACCESS_TYPE_NOBODY:return"Nobody";case o.AccessType.ACCESS_TYPE_ONLY_ADDRESS:return"OnlyAddress";case o.AccessType.ACCESS_TYPE_EVERYBODY:return"Everybody";case o.AccessType.ACCESS_TYPE_ANY_OF_ADDRESSES:return"AnyOfAddresses";case o.AccessType.UNRECOGNIZED:default:return"UNRECOGNIZED"}}function l(){return{"/cosmwasm.wasm.v1.MsgStoreCode":{aminoType:"wasm/MsgStoreCode",toAmino:e=>{let{sender:t,wasmByteCode:r,instantiatePermission:n}=e;return{sender:t,wasm_byte_code:(0,i.toBase64)(r),instantiate_permission:n?{permission:s(n.permission),address:n.address||void 0,addresses:0!==n.addresses.length?n.addresses:void 0}:void 0}},fromAmino:e=>{var t,r;let{sender:n,wasm_byte_code:s,instantiate_permission:l}=e;return{sender:n,wasmByteCode:(0,i.fromBase64)(s),instantiatePermission:l?o.AccessConfig.fromPartial({permission:a(l.permission),address:null!==(t=l.address)&&void 0!==t?t:"",addresses:null!==(r=l.addresses)&&void 0!==r?r:[]}):void 0}}},"/cosmwasm.wasm.v1.MsgInstantiateContract":{aminoType:"wasm/MsgInstantiateContract",toAmino:e=>{let{sender:t,codeId:r,label:o,msg:a,funds:s,admin:l}=e;return{sender:t,code_id:r.toString(),label:o,msg:JSON.parse((0,i.fromUtf8)(a)),funds:s,admin:(0,n.omitDefault)(l)}},fromAmino:e=>{let{sender:t,code_id:r,label:n,msg:o,funds:a,admin:s}=e;return{sender:t,codeId:BigInt(r),label:n,msg:(0,i.toUtf8)(JSON.stringify(o)),funds:[...a],admin:null!=s?s:""}}},"/cosmwasm.wasm.v1.MsgInstantiateContract2":{aminoType:"wasm/MsgInstantiateContract2",toAmino:e=>{let{sender:t,codeId:r,label:o,msg:a,funds:s,admin:l,salt:u,fixMsg:d}=e;return{sender:t,code_id:r.toString(),label:o,msg:JSON.parse((0,i.fromUtf8)(a)),funds:s,admin:(0,n.omitDefault)(l),salt:(0,i.toBase64)(u),fix_msg:(0,n.omitDefault)(d)}},fromAmino:e=>{let{sender:t,code_id:r,label:n,msg:o,funds:a,admin:s,salt:l,fix_msg:u}=e;return{sender:t,codeId:BigInt(r),label:n,msg:(0,i.toUtf8)(JSON.stringify(o)),funds:[...a],admin:null!=s?s:"",salt:(0,i.fromBase64)(l),fixMsg:null!=u&&u}}},"/cosmwasm.wasm.v1.MsgUpdateAdmin":{aminoType:"wasm/MsgUpdateAdmin",toAmino:e=>{let{sender:t,newAdmin:r,contract:n}=e;return{sender:t,new_admin:r,contract:n}},fromAmino:e=>{let{sender:t,new_admin:r,contract:n}=e;return{sender:t,newAdmin:r,contract:n}}},"/cosmwasm.wasm.v1.MsgClearAdmin":{aminoType:"wasm/MsgClearAdmin",toAmino:e=>{let{sender:t,contract:r}=e;return{sender:t,contract:r}},fromAmino:e=>{let{sender:t,contract:r}=e;return{sender:t,contract:r}}},"/cosmwasm.wasm.v1.MsgExecuteContract":{aminoType:"wasm/MsgExecuteContract",toAmino:e=>{let{sender:t,contract:r,msg:n,funds:o}=e;return{sender:t,contract:r,msg:JSON.parse((0,i.fromUtf8)(n)),funds:o}},fromAmino:e=>{let{sender:t,contract:r,msg:n,funds:o}=e;return{sender:t,contract:r,msg:(0,i.toUtf8)(JSON.stringify(n)),funds:[...o]}}},"/cosmwasm.wasm.v1.MsgMigrateContract":{aminoType:"wasm/MsgMigrateContract",toAmino:e=>{let{sender:t,contract:r,codeId:n,msg:o}=e;return{sender:t,contract:r,code_id:n.toString(),msg:JSON.parse((0,i.fromUtf8)(o))}},fromAmino:e=>{let{sender:t,contract:r,code_id:n,msg:o}=e;return{sender:t,contract:r,codeId:BigInt(n),msg:(0,i.toUtf8)(JSON.stringify(o))}}}}}t.accessTypeFromString=a,t.accessTypeToString=s,t.createWasmAminoConverters=l},64058:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isMsgExecuteEncodeObject=t.isMsgMigrateEncodeObject=t.isMsgClearAdminEncodeObject=t.isMsgUpdateAdminEncodeObject=t.isMsgInstantiateContract2EncodeObject=t.isMsgInstantiateContractEncodeObject=t.isMsgStoreCodeEncodeObject=t.wasmTypes=void 0;let n=r(88242);function i(e){return"/cosmwasm.wasm.v1.MsgStoreCode"===e.typeUrl}function o(e){return"/cosmwasm.wasm.v1.MsgInstantiateContract"===e.typeUrl}function a(e){return"/cosmwasm.wasm.v1.MsgInstantiateContract2"===e.typeUrl}function s(e){return"/cosmwasm.wasm.v1.MsgUpdateAdmin"===e.typeUrl}function l(e){return"/cosmwasm.wasm.v1.MsgClearAdmin"===e.typeUrl}function u(e){return"/cosmwasm.wasm.v1.MsgMigrateContract"===e.typeUrl}function d(e){return"/cosmwasm.wasm.v1.MsgExecuteContract"===e.typeUrl}t.wasmTypes=[["/cosmwasm.wasm.v1.MsgClearAdmin",n.MsgClearAdmin],["/cosmwasm.wasm.v1.MsgExecuteContract",n.MsgExecuteContract],["/cosmwasm.wasm.v1.MsgMigrateContract",n.MsgMigrateContract],["/cosmwasm.wasm.v1.MsgStoreCode",n.MsgStoreCode],["/cosmwasm.wasm.v1.MsgInstantiateContract",n.MsgInstantiateContract],["/cosmwasm.wasm.v1.MsgInstantiateContract2",n.MsgInstantiateContract2],["/cosmwasm.wasm.v1.MsgUpdateAdmin",n.MsgUpdateAdmin]],t.isMsgStoreCodeEncodeObject=i,t.isMsgInstantiateContractEncodeObject=o,t.isMsgInstantiateContract2EncodeObject=a,t.isMsgUpdateAdminEncodeObject=s,t.isMsgClearAdminEncodeObject=l,t.isMsgMigrateEncodeObject=u,t.isMsgExecuteEncodeObject=d},83584:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setupWasmExtension=void 0;let n=r(69721),i=r(58015),o=r(81371);function a(e){let t=(0,i.createProtobufRpcClient)(e),r=new o.QueryClientImpl(t);return{wasm:{listCodeInfo:async e=>{let t={pagination:(0,i.createPagination)(e)};return r.Codes(t)},getCode:async e=>{let t=o.QueryCodeRequest.fromPartial({codeId:BigInt(e)});return r.Code(t)},listContractsByCodeId:async(e,t)=>{let n=o.QueryContractsByCodeRequest.fromPartial({codeId:BigInt(e),pagination:(0,i.createPagination)(t)});return r.ContractsByCode(n)},listContractsByCreator:async(e,t)=>{let n={creatorAddress:e,pagination:(0,i.createPagination)(t)};return r.ContractsByCreator(n)},getContractInfo:async e=>{let t={address:e};return r.ContractInfo(t)},getContractCodeHistory:async(e,t)=>{let n={address:e,pagination:(0,i.createPagination)(t)};return r.ContractHistory(n)},getAllContractState:async(e,t)=>{let n={address:e,pagination:(0,i.createPagination)(t)};return r.AllContractState(n)},queryContractRaw:async(e,t)=>{let n={address:e,queryData:t};return r.RawContractState(n)},queryContractSmart:async(e,t)=>{let i;let o={address:e,queryData:(0,n.toUtf8)(JSON.stringify(t))},{data:a}=await r.SmartContractState(o);try{i=(0,n.fromUtf8)(a)}catch(e){throw Error("Could not UTF-8 decode smart query response from contract: ".concat(e))}try{return JSON.parse(i)}catch(e){throw Error("Could not JSON parse smart query response from contract: ".concat(e))}}}}}t.setupWasmExtension=a},19015:function(e,t,r){"use strict";var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.SigningCosmWasmClient=void 0;let i=r(83552),o=r(49400),a=r(69721),s=r(35801),l=r(18722),u=r(58015),d=r(43890),c=r(67357),p=r(53856),f=r(62884),h=r(2264),g=r(26136),m=r(88242),y=n(r(71821)),v=r(12999),b=r(64215);function S(e){return"Error when broadcasting tx ".concat(e.transactionHash," at height ").concat(e.height,". Code: ").concat(e.code,"; Raw log: ").concat(e.rawLog)}class w extends v.CosmWasmClient{static async connectWithSigner(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=await (0,d.connectComet)(e);return w.createWithSigner(n,t,r)}static async createWithSigner(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return new w(e,t,r)}static async offline(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new w(void 0,e,t)}async simulate(e,t,r){let n=t.map(e=>this.registry.encodeAsAny(e)),o=(await this.signer.getAccounts()).find(t=>t.address===e);if(!o)throw Error("Failed to retrieve account from signer");let a=(0,i.encodeSecp256k1Pubkey)(o.pubkey),{sequence:l}=await this.getSequence(e),{gasInfo:u}=await this.forceGetQueryClient().tx.simulate(n,r,a,l);return(0,c.assertDefined)(u),s.Uint53.fromString(u.gasUsed.toString()).toNumber()}async upload(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",i=arguments.length>4?arguments[4]:void 0,s=y.default.gzip(t,{level:9}),l={typeUrl:"/cosmwasm.wasm.v1.MsgStoreCode",value:m.MsgStoreCode.fromPartial({sender:e,wasmByteCode:s,instantiatePermission:i})},d="auto"==r?1.1:r,c=await this.signAndBroadcast(e,[l],d,n);if((0,u.isDeliverTxFailure)(c))throw Error(S(c));let p=u.logs.parseRawLog(c.rawLog),f=u.logs.findAttribute(p,"store_code","code_id");return{checksum:(0,a.toHex)((0,o.sha256)(t)),originalSize:t.length,compressedSize:s.length,codeId:Number.parseInt(f.value,10),logs:p,height:c.height,transactionHash:c.transactionHash,events:c.events,gasWanted:c.gasWanted,gasUsed:c.gasUsed}}async instantiate(e,t,r,n,i){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},l={typeUrl:"/cosmwasm.wasm.v1.MsgInstantiateContract",value:m.MsgInstantiateContract.fromPartial({sender:e,codeId:BigInt(new s.Uint53(t).toString()),label:n,msg:(0,a.toUtf8)(JSON.stringify(r)),funds:[...o.funds||[]],admin:o.admin})},d=await this.signAndBroadcast(e,[l],i,o.memo);if((0,u.isDeliverTxFailure)(d))throw Error(S(d));let c=u.logs.parseRawLog(d.rawLog);return{contractAddress:u.logs.findAttribute(c,"instantiate","_contract_address").value,logs:c,height:d.height,transactionHash:d.transactionHash,events:d.events,gasWanted:d.gasWanted,gasUsed:d.gasUsed}}async instantiate2(e,t,r,n,i,o){let l=arguments.length>6&&void 0!==arguments[6]?arguments[6]:{},d={typeUrl:"/cosmwasm.wasm.v1.MsgInstantiateContract2",value:m.MsgInstantiateContract2.fromPartial({sender:e,codeId:BigInt(new s.Uint53(t).toString()),label:i,msg:(0,a.toUtf8)(JSON.stringify(n)),funds:[...l.funds||[]],admin:l.admin,salt:r,fixMsg:!1})},c=await this.signAndBroadcast(e,[d],o,l.memo);if((0,u.isDeliverTxFailure)(c))throw Error(S(c));let p=u.logs.parseRawLog(c.rawLog);return{contractAddress:u.logs.findAttribute(p,"instantiate","_contract_address").value,logs:p,height:c.height,transactionHash:c.transactionHash,events:c.events,gasWanted:c.gasWanted,gasUsed:c.gasUsed}}async updateAdmin(e,t,r,n){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",o={typeUrl:"/cosmwasm.wasm.v1.MsgUpdateAdmin",value:m.MsgUpdateAdmin.fromPartial({sender:e,contract:t,newAdmin:r})},a=await this.signAndBroadcast(e,[o],n,i);if((0,u.isDeliverTxFailure)(a))throw Error(S(a));return{logs:u.logs.parseRawLog(a.rawLog),height:a.height,transactionHash:a.transactionHash,events:a.events,gasWanted:a.gasWanted,gasUsed:a.gasUsed}}async clearAdmin(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",i={typeUrl:"/cosmwasm.wasm.v1.MsgClearAdmin",value:m.MsgClearAdmin.fromPartial({sender:e,contract:t})},o=await this.signAndBroadcast(e,[i],r,n);if((0,u.isDeliverTxFailure)(o))throw Error(S(o));return{logs:u.logs.parseRawLog(o.rawLog),height:o.height,transactionHash:o.transactionHash,events:o.events,gasWanted:o.gasWanted,gasUsed:o.gasUsed}}async migrate(e,t,r,n,i){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"",l={typeUrl:"/cosmwasm.wasm.v1.MsgMigrateContract",value:m.MsgMigrateContract.fromPartial({sender:e,contract:t,codeId:BigInt(new s.Uint53(r).toString()),msg:(0,a.toUtf8)(JSON.stringify(n))})},d=await this.signAndBroadcast(e,[l],i,o);if((0,u.isDeliverTxFailure)(d))throw Error(S(d));return{logs:u.logs.parseRawLog(d.rawLog),height:d.height,transactionHash:d.transactionHash,events:d.events,gasWanted:d.gasWanted,gasUsed:d.gasUsed}}async execute(e,t,r,n){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",o=arguments.length>5?arguments[5]:void 0,a={contractAddress:t,msg:r,funds:o};return this.executeMultiple(e,[a],n,i)}async executeMultiple(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",i=t.map(t=>({typeUrl:"/cosmwasm.wasm.v1.MsgExecuteContract",value:m.MsgExecuteContract.fromPartial({sender:e,contract:t.contractAddress,msg:(0,a.toUtf8)(JSON.stringify(t.msg)),funds:[...t.funds||[]]})})),o=await this.signAndBroadcast(e,i,r,n);if((0,u.isDeliverTxFailure)(o))throw Error(S(o));return{logs:u.logs.parseRawLog(o.rawLog),height:o.height,transactionHash:o.transactionHash,events:o.events,gasWanted:o.gasWanted,gasUsed:o.gasUsed}}async sendTokens(e,t,r,n){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",o={typeUrl:"/cosmos.bank.v1beta1.MsgSend",value:{fromAddress:e,toAddress:t,amount:[...r]}};return this.signAndBroadcast(e,[o],n,i)}async delegateTokens(e,t,r,n){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",o={typeUrl:"/cosmos.staking.v1beta1.MsgDelegate",value:f.MsgDelegate.fromPartial({delegatorAddress:e,validatorAddress:t,amount:r})};return this.signAndBroadcast(e,[o],n,i)}async undelegateTokens(e,t,r,n){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",o={typeUrl:"/cosmos.staking.v1beta1.MsgUndelegate",value:f.MsgUndelegate.fromPartial({delegatorAddress:e,validatorAddress:t,amount:r})};return this.signAndBroadcast(e,[o],n,i)}async withdrawRewards(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",i={typeUrl:"/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward",value:p.MsgWithdrawDelegatorReward.fromPartial({delegatorAddress:e,validatorAddress:t})};return this.signAndBroadcast(e,[i],r,n)}async signAndBroadcast(e,t,r){let n,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=arguments.length>4?arguments[4]:void 0;if("auto"==r||"number"==typeof r){(0,c.assertDefined)(this.gasPrice,"Gas price must be set in the client options when auto gas is used.");let o=await this.simulate(e,t,i),a="number"==typeof r?r:1.4;n=(0,u.calculateFee)(Math.round(o*a),this.gasPrice)}else n=r;let a=await this.sign(e,t,n,i,void 0,o),s=g.TxRaw.encode(a).finish();return this.broadcastTx(s,this.broadcastTimeoutMs,this.broadcastPollIntervalMs)}async signAndBroadcastSync(e,t,r){let n,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=arguments.length>4?arguments[4]:void 0;if("auto"==r||"number"==typeof r){(0,c.assertDefined)(this.gasPrice,"Gas price must be set in the client options when auto gas is used.");let o=await this.simulate(e,t,i),a="number"==typeof r?r:1.3;n=(0,u.calculateFee)(Math.round(o*a),this.gasPrice)}else n=r;let a=await this.sign(e,t,n,i,void 0,o),s=g.TxRaw.encode(a).finish();return this.broadcastTxSync(s)}async sign(e,t,r,n,i,o){let a;if(i)a=i;else{let{accountNumber:t,sequence:r}=await this.getSequence(e);a={accountNumber:t,sequence:r,chainId:await this.getChainId()}}return(0,l.isOfflineDirectSigner)(this.signer)?this.signDirect(e,t,r,n,a,o):this.signAmino(e,t,r,n,a,o)}async signAmino(e,t,r,n,o,u){let{accountNumber:d,sequence:p,chainId:f}=o;(0,c.assert)(!(0,l.isOfflineDirectSigner)(this.signer));let m=(await this.signer.getAccounts()).find(t=>t.address===e);if(!m)throw Error("Failed to retrieve account from signer");let y=(0,l.encodePubkey)((0,i.encodeSecp256k1Pubkey)(m.pubkey)),v=h.SignMode.SIGN_MODE_LEGACY_AMINO_JSON,b=t.map(e=>this.aminoTypes.toAmino(e)),S=(0,i.makeSignDoc)(b,r,f,n,d,p,u),{signature:w,signed:_}=await this.signer.signAmino(e,S),k={typeUrl:"/cosmos.tx.v1beta1.TxBody",value:{messages:_.msgs.map(e=>this.aminoTypes.fromAmino(e)),memo:_.memo,timeoutHeight:u}},O=this.registry.encode(k),P=s.Int53.fromString(_.fee.gas).toNumber(),A=s.Int53.fromString(_.sequence).toNumber(),I=(0,l.makeAuthInfoBytes)([{pubkey:y,sequence:A}],_.fee.amount,P,_.fee.granter,_.fee.payer,v);return g.TxRaw.fromPartial({bodyBytes:O,authInfoBytes:I,signatures:[(0,a.fromBase64)(w.signature)]})}async signDirect(e,t,r,n,o,u){let{accountNumber:d,sequence:p,chainId:f}=o;(0,c.assert)((0,l.isOfflineDirectSigner)(this.signer));let h=(await this.signer.getAccounts()).find(t=>t.address===e);if(!h)throw Error("Failed to retrieve account from signer");let m=(0,l.encodePubkey)((0,i.encodeSecp256k1Pubkey)(h.pubkey)),y={typeUrl:"/cosmos.tx.v1beta1.TxBody",value:{messages:t,memo:n,timeoutHeight:u}},v=this.registry.encode(y),b=s.Int53.fromString(r.gas).toNumber(),S=(0,l.makeAuthInfoBytes)([{pubkey:m,sequence:p}],r.amount,b,r.granter,r.payer),w=(0,l.makeSignDoc)(v,S,f,d),{signature:_,signed:k}=await this.signer.signDirect(e,w);return g.TxRaw.fromPartial({bodyBytes:k.bodyBytes,authInfoBytes:k.authInfoBytes,signatures:[(0,a.fromBase64)(_.signature)]})}constructor(e,t,r){super(e);let{registry:n=new l.Registry([...u.defaultRegistryTypes,...b.wasmTypes]),aminoTypes:i=new u.AminoTypes({...(0,u.createDefaultAminoConverters)(),...(0,b.createWasmAminoConverters)()})}=r;this.registry=n,this.aminoTypes=i,this.signer=t,this.broadcastTimeoutMs=r.broadcastTimeoutMs,this.broadcastPollIntervalMs=r.broadcastPollIntervalMs,this.gasPrice=r.gasPrice}}t.SigningCosmWasmClient=w},62288:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decompress=t.compress=void 0;let n=r(32165);function i(e){return e.batch?{compressed:a(e.batch)}:e}function o(e){return e.compressed?{batch:l(e.compressed)}:e}function a(e){let t=[],r=[],n=new Map;for(let i of e.entries)if(i.exist){let e={exist:s(i.exist,r,n)};t.push(e)}else if(i.nonexist){let e=i.nonexist,o={nonexist:{key:e.key,left:s(e.left,r,n),right:s(e.right,r,n)}};t.push(o)}else throw Error("Unexpected batch entry during compress");return{entries:t,lookupInners:r}}function s(e,t,r){if(!e)return;let i=e.path.map(e=>{let i=n.ics23.InnerOp.encode(e).finish(),o=r.get(i);return void 0===o&&(o=t.length,t.push(e),r.set(i,o)),o});return{key:e.key,value:e.value,leaf:e.leaf,path:i}}function l(e){let t=e.lookupInners;return{entries:e.entries.map(e=>{if(e.exist)return{exist:u(e.exist,t)};if(e.nonexist){let r=e.nonexist;return{nonexist:{key:r.key,left:u(r.left,t),right:u(r.right,t)}}}throw Error("Unexpected batch entry during compress")})}}function u(e,t){if(!e)return;let{key:r,value:n,leaf:i,path:o}=e;return{key:r,value:n,leaf:i,path:(o||[]).map(e=>t[e])}}t.compress=i,t.decompress=o},32165:function(e,t,r){"use strict";var n=r(81667),i=n.Reader,o=n.Writer,a=n.util,s=n.roots.default||(n.roots.default={});s.ics23=function(){var e={};return e.HashOp=function(){var e={},t=Object.create(e);return t[e[0]="NO_HASH"]=0,t[e[1]="SHA256"]=1,t[e[2]="SHA512"]=2,t[e[3]="KECCAK"]=3,t[e[4]="RIPEMD160"]=4,t[e[5]="BITCOIN"]=5,t[e[6]="SHA512_256"]=6,t}(),e.LengthOp=function(){var e={},t=Object.create(e);return t[e[0]="NO_PREFIX"]=0,t[e[1]="VAR_PROTO"]=1,t[e[2]="VAR_RLP"]=2,t[e[3]="FIXED32_BIG"]=3,t[e[4]="FIXED32_LITTLE"]=4,t[e[5]="FIXED64_BIG"]=5,t[e[6]="FIXED64_LITTLE"]=6,t[e[7]="REQUIRE_32_BYTES"]=7,t[e[8]="REQUIRE_64_BYTES"]=8,t}(),e.ExistenceProof=function(){function e(e){if(this.path=[],e)for(var t=Object.keys(e),r=0;r>>3){case 1:n.key=e.bytes();break;case 2:n.value=e.bytes();break;case 3:n.leaf=s.ics23.LeafOp.decode(e,e.uint32());break;case 4:n.path&&n.path.length||(n.path=[]),n.path.push(s.ics23.InnerOp.decode(e,e.uint32()));break;default:e.skipType(7&o)}}return n},e.decodeDelimited=function(e){return e instanceof i||(e=new i(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.key&&e.hasOwnProperty("key")&&!(e.key&&"number"==typeof e.key.length||a.isString(e.key)))return"key: buffer expected";if(null!=e.value&&e.hasOwnProperty("value")&&!(e.value&&"number"==typeof e.value.length||a.isString(e.value)))return"value: buffer expected";if(null!=e.leaf&&e.hasOwnProperty("leaf")){var t=s.ics23.LeafOp.verify(e.leaf);if(t)return"leaf."+t}if(null!=e.path&&e.hasOwnProperty("path")){if(!Array.isArray(e.path))return"path: array expected";for(var r=0;r>>3){case 1:n.key=e.bytes();break;case 2:n.left=s.ics23.ExistenceProof.decode(e,e.uint32());break;case 3:n.right=s.ics23.ExistenceProof.decode(e,e.uint32());break;default:e.skipType(7&o)}}return n},e.decodeDelimited=function(e){return e instanceof i||(e=new i(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.key&&e.hasOwnProperty("key")&&!(e.key&&"number"==typeof e.key.length||a.isString(e.key)))return"key: buffer expected";if(null!=e.left&&e.hasOwnProperty("left")){var t=s.ics23.ExistenceProof.verify(e.left);if(t)return"left."+t}if(null!=e.right&&e.hasOwnProperty("right")){var t=s.ics23.ExistenceProof.verify(e.right);if(t)return"right."+t}return null},e.fromObject=function(e){if(e instanceof s.ics23.NonExistenceProof)return e;var t=new s.ics23.NonExistenceProof;if(null!=e.key&&("string"==typeof e.key?a.base64.decode(e.key,t.key=a.newBuffer(a.base64.length(e.key)),0):e.key.length&&(t.key=e.key)),null!=e.left){if("object"!=typeof e.left)throw TypeError(".ics23.NonExistenceProof.left: object expected");t.left=s.ics23.ExistenceProof.fromObject(e.left)}if(null!=e.right){if("object"!=typeof e.right)throw TypeError(".ics23.NonExistenceProof.right: object expected");t.right=s.ics23.ExistenceProof.fromObject(e.right)}return t},e.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(t.bytes===String?r.key="":(r.key=[],t.bytes!==Array&&(r.key=a.newBuffer(r.key))),r.left=null,r.right=null),null!=e.key&&e.hasOwnProperty("key")&&(r.key=t.bytes===String?a.base64.encode(e.key,0,e.key.length):t.bytes===Array?Array.prototype.slice.call(e.key):e.key),null!=e.left&&e.hasOwnProperty("left")&&(r.left=s.ics23.ExistenceProof.toObject(e.left,t)),null!=e.right&&e.hasOwnProperty("right")&&(r.right=s.ics23.ExistenceProof.toObject(e.right,t)),r},e.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},e}(),e.CommitmentProof=function(){var e;function t(e){if(e)for(var t=Object.keys(e),r=0;r>>3){case 1:n.exist=s.ics23.ExistenceProof.decode(e,e.uint32());break;case 2:n.nonexist=s.ics23.NonExistenceProof.decode(e,e.uint32());break;case 3:n.batch=s.ics23.BatchProof.decode(e,e.uint32());break;case 4:n.compressed=s.ics23.CompressedBatchProof.decode(e,e.uint32());break;default:e.skipType(7&o)}}return n},t.decodeDelimited=function(e){return e instanceof i||(e=new i(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";var t={};if(null!=e.exist&&e.hasOwnProperty("exist")){t.proof=1;var r=s.ics23.ExistenceProof.verify(e.exist);if(r)return"exist."+r}if(null!=e.nonexist&&e.hasOwnProperty("nonexist")){if(1===t.proof)return"proof: multiple values";t.proof=1;var r=s.ics23.NonExistenceProof.verify(e.nonexist);if(r)return"nonexist."+r}if(null!=e.batch&&e.hasOwnProperty("batch")){if(1===t.proof)return"proof: multiple values";t.proof=1;var r=s.ics23.BatchProof.verify(e.batch);if(r)return"batch."+r}if(null!=e.compressed&&e.hasOwnProperty("compressed")){if(1===t.proof)return"proof: multiple values";t.proof=1;var r=s.ics23.CompressedBatchProof.verify(e.compressed);if(r)return"compressed."+r}return null},t.fromObject=function(e){if(e instanceof s.ics23.CommitmentProof)return e;var t=new s.ics23.CommitmentProof;if(null!=e.exist){if("object"!=typeof e.exist)throw TypeError(".ics23.CommitmentProof.exist: object expected");t.exist=s.ics23.ExistenceProof.fromObject(e.exist)}if(null!=e.nonexist){if("object"!=typeof e.nonexist)throw TypeError(".ics23.CommitmentProof.nonexist: object expected");t.nonexist=s.ics23.NonExistenceProof.fromObject(e.nonexist)}if(null!=e.batch){if("object"!=typeof e.batch)throw TypeError(".ics23.CommitmentProof.batch: object expected");t.batch=s.ics23.BatchProof.fromObject(e.batch)}if(null!=e.compressed){if("object"!=typeof e.compressed)throw TypeError(".ics23.CommitmentProof.compressed: object expected");t.compressed=s.ics23.CompressedBatchProof.fromObject(e.compressed)}return t},t.toObject=function(e,t){t||(t={});var r={};return null!=e.exist&&e.hasOwnProperty("exist")&&(r.exist=s.ics23.ExistenceProof.toObject(e.exist,t),t.oneofs&&(r.proof="exist")),null!=e.nonexist&&e.hasOwnProperty("nonexist")&&(r.nonexist=s.ics23.NonExistenceProof.toObject(e.nonexist,t),t.oneofs&&(r.proof="nonexist")),null!=e.batch&&e.hasOwnProperty("batch")&&(r.batch=s.ics23.BatchProof.toObject(e.batch,t),t.oneofs&&(r.proof="batch")),null!=e.compressed&&e.hasOwnProperty("compressed")&&(r.compressed=s.ics23.CompressedBatchProof.toObject(e.compressed,t),t.oneofs&&(r.proof="compressed")),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},t}(),e.LeafOp=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r>>3){case 1:n.hash=e.int32();break;case 2:n.prehashKey=e.int32();break;case 3:n.prehashValue=e.int32();break;case 4:n.length=e.int32();break;case 5:n.prefix=e.bytes();break;default:e.skipType(7&o)}}return n},e.decodeDelimited=function(e){return e instanceof i||(e=new i(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.hash&&e.hasOwnProperty("hash"))switch(e.hash){default:return"hash: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:}if(null!=e.prehashKey&&e.hasOwnProperty("prehashKey"))switch(e.prehashKey){default:return"prehashKey: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:}if(null!=e.prehashValue&&e.hasOwnProperty("prehashValue"))switch(e.prehashValue){default:return"prehashValue: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:}if(null!=e.length&&e.hasOwnProperty("length"))switch(e.length){default:return"length: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:}return null!=e.prefix&&e.hasOwnProperty("prefix")&&!(e.prefix&&"number"==typeof e.prefix.length||a.isString(e.prefix))?"prefix: buffer expected":null},e.fromObject=function(e){if(e instanceof s.ics23.LeafOp)return e;var t=new s.ics23.LeafOp;switch(e.hash){case"NO_HASH":case 0:t.hash=0;break;case"SHA256":case 1:t.hash=1;break;case"SHA512":case 2:t.hash=2;break;case"KECCAK":case 3:t.hash=3;break;case"RIPEMD160":case 4:t.hash=4;break;case"BITCOIN":case 5:t.hash=5;break;case"SHA512_256":case 6:t.hash=6}switch(e.prehashKey){case"NO_HASH":case 0:t.prehashKey=0;break;case"SHA256":case 1:t.prehashKey=1;break;case"SHA512":case 2:t.prehashKey=2;break;case"KECCAK":case 3:t.prehashKey=3;break;case"RIPEMD160":case 4:t.prehashKey=4;break;case"BITCOIN":case 5:t.prehashKey=5;break;case"SHA512_256":case 6:t.prehashKey=6}switch(e.prehashValue){case"NO_HASH":case 0:t.prehashValue=0;break;case"SHA256":case 1:t.prehashValue=1;break;case"SHA512":case 2:t.prehashValue=2;break;case"KECCAK":case 3:t.prehashValue=3;break;case"RIPEMD160":case 4:t.prehashValue=4;break;case"BITCOIN":case 5:t.prehashValue=5;break;case"SHA512_256":case 6:t.prehashValue=6}switch(e.length){case"NO_PREFIX":case 0:t.length=0;break;case"VAR_PROTO":case 1:t.length=1;break;case"VAR_RLP":case 2:t.length=2;break;case"FIXED32_BIG":case 3:t.length=3;break;case"FIXED32_LITTLE":case 4:t.length=4;break;case"FIXED64_BIG":case 5:t.length=5;break;case"FIXED64_LITTLE":case 6:t.length=6;break;case"REQUIRE_32_BYTES":case 7:t.length=7;break;case"REQUIRE_64_BYTES":case 8:t.length=8}return null!=e.prefix&&("string"==typeof e.prefix?a.base64.decode(e.prefix,t.prefix=a.newBuffer(a.base64.length(e.prefix)),0):e.prefix.length&&(t.prefix=e.prefix)),t},e.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(r.hash=t.enums===String?"NO_HASH":0,r.prehashKey=t.enums===String?"NO_HASH":0,r.prehashValue=t.enums===String?"NO_HASH":0,r.length=t.enums===String?"NO_PREFIX":0,t.bytes===String?r.prefix="":(r.prefix=[],t.bytes!==Array&&(r.prefix=a.newBuffer(r.prefix)))),null!=e.hash&&e.hasOwnProperty("hash")&&(r.hash=t.enums===String?s.ics23.HashOp[e.hash]:e.hash),null!=e.prehashKey&&e.hasOwnProperty("prehashKey")&&(r.prehashKey=t.enums===String?s.ics23.HashOp[e.prehashKey]:e.prehashKey),null!=e.prehashValue&&e.hasOwnProperty("prehashValue")&&(r.prehashValue=t.enums===String?s.ics23.HashOp[e.prehashValue]:e.prehashValue),null!=e.length&&e.hasOwnProperty("length")&&(r.length=t.enums===String?s.ics23.LengthOp[e.length]:e.length),null!=e.prefix&&e.hasOwnProperty("prefix")&&(r.prefix=t.bytes===String?a.base64.encode(e.prefix,0,e.prefix.length):t.bytes===Array?Array.prototype.slice.call(e.prefix):e.prefix),r},e.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},e}(),e.InnerOp=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r>>3){case 1:n.hash=e.int32();break;case 2:n.prefix=e.bytes();break;case 3:n.suffix=e.bytes();break;default:e.skipType(7&o)}}return n},e.decodeDelimited=function(e){return e instanceof i||(e=new i(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.hash&&e.hasOwnProperty("hash"))switch(e.hash){default:return"hash: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:}return null!=e.prefix&&e.hasOwnProperty("prefix")&&!(e.prefix&&"number"==typeof e.prefix.length||a.isString(e.prefix))?"prefix: buffer expected":null!=e.suffix&&e.hasOwnProperty("suffix")&&!(e.suffix&&"number"==typeof e.suffix.length||a.isString(e.suffix))?"suffix: buffer expected":null},e.fromObject=function(e){if(e instanceof s.ics23.InnerOp)return e;var t=new s.ics23.InnerOp;switch(e.hash){case"NO_HASH":case 0:t.hash=0;break;case"SHA256":case 1:t.hash=1;break;case"SHA512":case 2:t.hash=2;break;case"KECCAK":case 3:t.hash=3;break;case"RIPEMD160":case 4:t.hash=4;break;case"BITCOIN":case 5:t.hash=5;break;case"SHA512_256":case 6:t.hash=6}return null!=e.prefix&&("string"==typeof e.prefix?a.base64.decode(e.prefix,t.prefix=a.newBuffer(a.base64.length(e.prefix)),0):e.prefix.length&&(t.prefix=e.prefix)),null!=e.suffix&&("string"==typeof e.suffix?a.base64.decode(e.suffix,t.suffix=a.newBuffer(a.base64.length(e.suffix)),0):e.suffix.length&&(t.suffix=e.suffix)),t},e.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(r.hash=t.enums===String?"NO_HASH":0,t.bytes===String?r.prefix="":(r.prefix=[],t.bytes!==Array&&(r.prefix=a.newBuffer(r.prefix))),t.bytes===String?r.suffix="":(r.suffix=[],t.bytes!==Array&&(r.suffix=a.newBuffer(r.suffix)))),null!=e.hash&&e.hasOwnProperty("hash")&&(r.hash=t.enums===String?s.ics23.HashOp[e.hash]:e.hash),null!=e.prefix&&e.hasOwnProperty("prefix")&&(r.prefix=t.bytes===String?a.base64.encode(e.prefix,0,e.prefix.length):t.bytes===Array?Array.prototype.slice.call(e.prefix):e.prefix),null!=e.suffix&&e.hasOwnProperty("suffix")&&(r.suffix=t.bytes===String?a.base64.encode(e.suffix,0,e.suffix.length):t.bytes===Array?Array.prototype.slice.call(e.suffix):e.suffix),r},e.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},e}(),e.ProofSpec=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r>>3){case 1:n.leafSpec=s.ics23.LeafOp.decode(e,e.uint32());break;case 2:n.innerSpec=s.ics23.InnerSpec.decode(e,e.uint32());break;case 3:n.maxDepth=e.int32();break;case 4:n.minDepth=e.int32();break;default:e.skipType(7&o)}}return n},e.decodeDelimited=function(e){return e instanceof i||(e=new i(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.leafSpec&&e.hasOwnProperty("leafSpec")){var t=s.ics23.LeafOp.verify(e.leafSpec);if(t)return"leafSpec."+t}if(null!=e.innerSpec&&e.hasOwnProperty("innerSpec")){var t=s.ics23.InnerSpec.verify(e.innerSpec);if(t)return"innerSpec."+t}return null!=e.maxDepth&&e.hasOwnProperty("maxDepth")&&!a.isInteger(e.maxDepth)?"maxDepth: integer expected":null!=e.minDepth&&e.hasOwnProperty("minDepth")&&!a.isInteger(e.minDepth)?"minDepth: integer expected":null},e.fromObject=function(e){if(e instanceof s.ics23.ProofSpec)return e;var t=new s.ics23.ProofSpec;if(null!=e.leafSpec){if("object"!=typeof e.leafSpec)throw TypeError(".ics23.ProofSpec.leafSpec: object expected");t.leafSpec=s.ics23.LeafOp.fromObject(e.leafSpec)}if(null!=e.innerSpec){if("object"!=typeof e.innerSpec)throw TypeError(".ics23.ProofSpec.innerSpec: object expected");t.innerSpec=s.ics23.InnerSpec.fromObject(e.innerSpec)}return null!=e.maxDepth&&(t.maxDepth=0|e.maxDepth),null!=e.minDepth&&(t.minDepth=0|e.minDepth),t},e.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(r.leafSpec=null,r.innerSpec=null,r.maxDepth=0,r.minDepth=0),null!=e.leafSpec&&e.hasOwnProperty("leafSpec")&&(r.leafSpec=s.ics23.LeafOp.toObject(e.leafSpec,t)),null!=e.innerSpec&&e.hasOwnProperty("innerSpec")&&(r.innerSpec=s.ics23.InnerSpec.toObject(e.innerSpec,t)),null!=e.maxDepth&&e.hasOwnProperty("maxDepth")&&(r.maxDepth=e.maxDepth),null!=e.minDepth&&e.hasOwnProperty("minDepth")&&(r.minDepth=e.minDepth),r},e.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},e}(),e.InnerSpec=function(){function e(e){if(this.childOrder=[],e)for(var t=Object.keys(e),r=0;r>>3){case 1:if(n.childOrder&&n.childOrder.length||(n.childOrder=[]),(7&o)==2)for(var a=e.uint32()+e.pos;e.pos>>3==1?(n.entries&&n.entries.length||(n.entries=[]),n.entries.push(s.ics23.BatchEntry.decode(e,e.uint32()))):e.skipType(7&o)}return n},e.decodeDelimited=function(e){return e instanceof i||(e=new i(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.entries&&e.hasOwnProperty("entries")){if(!Array.isArray(e.entries))return"entries: array expected";for(var t=0;t>>3){case 1:n.exist=s.ics23.ExistenceProof.decode(e,e.uint32());break;case 2:n.nonexist=s.ics23.NonExistenceProof.decode(e,e.uint32());break;default:e.skipType(7&o)}}return n},t.decodeDelimited=function(e){return e instanceof i||(e=new i(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";var t={};if(null!=e.exist&&e.hasOwnProperty("exist")){t.proof=1;var r=s.ics23.ExistenceProof.verify(e.exist);if(r)return"exist."+r}if(null!=e.nonexist&&e.hasOwnProperty("nonexist")){if(1===t.proof)return"proof: multiple values";t.proof=1;var r=s.ics23.NonExistenceProof.verify(e.nonexist);if(r)return"nonexist."+r}return null},t.fromObject=function(e){if(e instanceof s.ics23.BatchEntry)return e;var t=new s.ics23.BatchEntry;if(null!=e.exist){if("object"!=typeof e.exist)throw TypeError(".ics23.BatchEntry.exist: object expected");t.exist=s.ics23.ExistenceProof.fromObject(e.exist)}if(null!=e.nonexist){if("object"!=typeof e.nonexist)throw TypeError(".ics23.BatchEntry.nonexist: object expected");t.nonexist=s.ics23.NonExistenceProof.fromObject(e.nonexist)}return t},t.toObject=function(e,t){t||(t={});var r={};return null!=e.exist&&e.hasOwnProperty("exist")&&(r.exist=s.ics23.ExistenceProof.toObject(e.exist,t),t.oneofs&&(r.proof="exist")),null!=e.nonexist&&e.hasOwnProperty("nonexist")&&(r.nonexist=s.ics23.NonExistenceProof.toObject(e.nonexist,t),t.oneofs&&(r.proof="nonexist")),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},t}(),e.CompressedBatchProof=function(){function e(e){if(this.entries=[],this.lookupInners=[],e)for(var t=Object.keys(e),r=0;r>>3){case 1:n.entries&&n.entries.length||(n.entries=[]),n.entries.push(s.ics23.CompressedBatchEntry.decode(e,e.uint32()));break;case 2:n.lookupInners&&n.lookupInners.length||(n.lookupInners=[]),n.lookupInners.push(s.ics23.InnerOp.decode(e,e.uint32()));break;default:e.skipType(7&o)}}return n},e.decodeDelimited=function(e){return e instanceof i||(e=new i(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.entries&&e.hasOwnProperty("entries")){if(!Array.isArray(e.entries))return"entries: array expected";for(var t=0;t>>3){case 1:n.exist=s.ics23.CompressedExistenceProof.decode(e,e.uint32());break;case 2:n.nonexist=s.ics23.CompressedNonExistenceProof.decode(e,e.uint32());break;default:e.skipType(7&o)}}return n},t.decodeDelimited=function(e){return e instanceof i||(e=new i(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";var t={};if(null!=e.exist&&e.hasOwnProperty("exist")){t.proof=1;var r=s.ics23.CompressedExistenceProof.verify(e.exist);if(r)return"exist."+r}if(null!=e.nonexist&&e.hasOwnProperty("nonexist")){if(1===t.proof)return"proof: multiple values";t.proof=1;var r=s.ics23.CompressedNonExistenceProof.verify(e.nonexist);if(r)return"nonexist."+r}return null},t.fromObject=function(e){if(e instanceof s.ics23.CompressedBatchEntry)return e;var t=new s.ics23.CompressedBatchEntry;if(null!=e.exist){if("object"!=typeof e.exist)throw TypeError(".ics23.CompressedBatchEntry.exist: object expected");t.exist=s.ics23.CompressedExistenceProof.fromObject(e.exist)}if(null!=e.nonexist){if("object"!=typeof e.nonexist)throw TypeError(".ics23.CompressedBatchEntry.nonexist: object expected");t.nonexist=s.ics23.CompressedNonExistenceProof.fromObject(e.nonexist)}return t},t.toObject=function(e,t){t||(t={});var r={};return null!=e.exist&&e.hasOwnProperty("exist")&&(r.exist=s.ics23.CompressedExistenceProof.toObject(e.exist,t),t.oneofs&&(r.proof="exist")),null!=e.nonexist&&e.hasOwnProperty("nonexist")&&(r.nonexist=s.ics23.CompressedNonExistenceProof.toObject(e.nonexist,t),t.oneofs&&(r.proof="nonexist")),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},t}(),e.CompressedExistenceProof=function(){function e(e){if(this.path=[],e)for(var t=Object.keys(e),r=0;r>>3){case 1:n.key=e.bytes();break;case 2:n.value=e.bytes();break;case 3:n.leaf=s.ics23.LeafOp.decode(e,e.uint32());break;case 4:if(n.path&&n.path.length||(n.path=[]),(7&o)==2)for(var a=e.uint32()+e.pos;e.pos>>3){case 1:n.key=e.bytes();break;case 2:n.left=s.ics23.CompressedExistenceProof.decode(e,e.uint32());break;case 3:n.right=s.ics23.CompressedExistenceProof.decode(e,e.uint32());break;default:e.skipType(7&o)}}return n},e.decodeDelimited=function(e){return e instanceof i||(e=new i(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.key&&e.hasOwnProperty("key")&&!(e.key&&"number"==typeof e.key.length||a.isString(e.key)))return"key: buffer expected";if(null!=e.left&&e.hasOwnProperty("left")){var t=s.ics23.CompressedExistenceProof.verify(e.left);if(t)return"left."+t}if(null!=e.right&&e.hasOwnProperty("right")){var t=s.ics23.CompressedExistenceProof.verify(e.right);if(t)return"right."+t}return null},e.fromObject=function(e){if(e instanceof s.ics23.CompressedNonExistenceProof)return e;var t=new s.ics23.CompressedNonExistenceProof;if(null!=e.key&&("string"==typeof e.key?a.base64.decode(e.key,t.key=a.newBuffer(a.base64.length(e.key)),0):e.key.length&&(t.key=e.key)),null!=e.left){if("object"!=typeof e.left)throw TypeError(".ics23.CompressedNonExistenceProof.left: object expected");t.left=s.ics23.CompressedExistenceProof.fromObject(e.left)}if(null!=e.right){if("object"!=typeof e.right)throw TypeError(".ics23.CompressedNonExistenceProof.right: object expected");t.right=s.ics23.CompressedExistenceProof.fromObject(e.right)}return t},e.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(t.bytes===String?r.key="":(r.key=[],t.bytes!==Array&&(r.key=a.newBuffer(r.key))),r.left=null,r.right=null),null!=e.key&&e.hasOwnProperty("key")&&(r.key=t.bytes===String?a.base64.encode(e.key,0,e.key.length):t.bytes===Array?Array.prototype.slice.call(e.key):e.key),null!=e.left&&e.hasOwnProperty("left")&&(r.left=s.ics23.CompressedExistenceProof.toObject(e.left,t)),null!=e.right&&e.hasOwnProperty("right")&&(r.right=s.ics23.CompressedExistenceProof.toObject(e.right,t)),r},e.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},e}(),e}(),e.exports=s},72354:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.batchVerifyNonMembership=t.batchVerifyMembership=t.verifyNonMembership=t.verifyMembership=void 0;let n=r(62288),i=r(87215),o=r(2030);function a(e,t,r,o,a){let s=d((0,n.decompress)(e),o);if(!s)return!1;try{return(0,i.verifyExistence)(s,t,r,o,a),!0}catch(e){return!1}}function s(e,t,r,o){let a=c((0,n.decompress)(e),o);if(!a)return!1;try{return(0,i.verifyNonExistence)(a,t,r,o),!0}catch(e){return!1}}function l(e,t,r,i){let o=(0,n.decompress)(e);for(let[e,n]of i.entries())if(!a(o,t,r,e,n))return!1;return!0}function u(e,t,r,i){let o=(0,n.decompress)(e);for(let e of i)if(!s(o,t,r,e))return!1;return!0}function d(e,t){let r=e=>!!e&&(0,o.bytesEqual)(t,e.key);return r(e.exist)?e.exist:e.batch?e.batch.entries.map(e=>e.exist||null).find(r):void 0}function c(e,t){let r=e=>!!e&&(!e.left||(0,o.bytesBefore)(e.left.key,t))&&(!e.right||(0,o.bytesBefore)(t,e.right.key));return r(e.nonexist)?e.nonexist:e.batch?e.batch.entries.map(e=>e.nonexist||null).find(r):void 0}t.verifyMembership=a,t.verifyNonMembership=s,t.batchVerifyMembership=l,t.batchVerifyNonMembership=u},70102:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.verifyNonExistence=t.verifyExistence=t.tendermintSpec=t.iavlSpec=t.calculateExistenceRoot=t.verifyNonMembership=t.verifyMembership=t.ics23=void 0;var n=r(32165);Object.defineProperty(t,"ics23",{enumerable:!0,get:function(){return n.ics23}});var i=r(72354);Object.defineProperty(t,"verifyMembership",{enumerable:!0,get:function(){return i.verifyMembership}}),Object.defineProperty(t,"verifyNonMembership",{enumerable:!0,get:function(){return i.verifyNonMembership}});var o=r(87215);Object.defineProperty(t,"calculateExistenceRoot",{enumerable:!0,get:function(){return o.calculateExistenceRoot}}),Object.defineProperty(t,"iavlSpec",{enumerable:!0,get:function(){return o.iavlSpec}}),Object.defineProperty(t,"tendermintSpec",{enumerable:!0,get:function(){return o.tendermintSpec}}),Object.defineProperty(t,"verifyExistence",{enumerable:!0,get:function(){return o.verifyExistence}}),Object.defineProperty(t,"verifyNonExistence",{enumerable:!0,get:function(){return o.verifyNonExistence}})},17689:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.doHash=t.applyInner=t.applyLeaf=void 0;let n=r(33573),i=r(23928),o=r(93996),a=r(32165);function s(e,t,r){if(0===t.length)throw Error("Missing key");if(0===r.length)throw Error("Missing value");let n=f(d(e.prehashKey),c(e.length),t),i=f(d(e.prehashValue),c(e.length),r),o=new Uint8Array([...p(e.prefix),...n,...i]);return g(d(e.hash),o)}function l(e,t){if(0===t.length)throw Error("Inner op needs child value");let r=new Uint8Array([...p(e.prefix),...t,...p(e.suffix)]);return g(d(e.hash),r)}function u(e,t){return null==e?t:e}t.applyLeaf=s,t.applyInner=l;let d=e=>u(e,a.ics23.HashOp.NO_HASH),c=e=>u(e,a.ics23.LengthOp.NO_PREFIX),p=e=>u(e,new Uint8Array([]));function f(e,t,r){return m(t,h(e,r))}function h(e,t){return e===a.ics23.HashOp.NO_HASH?t:g(e,t)}function g(e,t){switch(e){case a.ics23.HashOp.SHA256:return(0,i.sha256)(t);case a.ics23.HashOp.SHA512:return(0,o.sha512)(t);case a.ics23.HashOp.RIPEMD160:return(0,n.ripemd160)(t);case a.ics23.HashOp.BITCOIN:return(0,n.ripemd160)((0,i.sha256)(t));case a.ics23.HashOp.SHA512_256:return(0,o.sha512_256)(t)}throw Error("Unsupported hashop: ".concat(e))}function m(e,t){switch(e){case a.ics23.LengthOp.NO_PREFIX:return t;case a.ics23.LengthOp.VAR_PROTO:return new Uint8Array([...y(t.length),...t]);case a.ics23.LengthOp.REQUIRE_32_BYTES:if(32!==t.length)throw Error("Length is ".concat(t.length,", not 32 bytes"));return t;case a.ics23.LengthOp.REQUIRE_64_BYTES:if(64!==t.length)throw Error("Length is ".concat(t.length,", not 64 bytes"));return t;case a.ics23.LengthOp.FIXED32_LITTLE:return new Uint8Array([...v(t.length),...t])}throw Error("Unsupported lengthop: ".concat(e))}function y(e){let t=[],r=e;for(;r>=128;)t=[...t,r%128+128],r/=128;return t=[...t,r],new Uint8Array(t)}function v(e){let t=new Uint8Array(4),r=e;for(let e=t.length;e>0;e--)t[Math.abs(e-t.length)]=r%256,r=Math.floor(r/256);return t}t.doHash=g},87215:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ensureLeftNeighbor=t.ensureSpec=t.calculateExistenceRoot=t.verifyNonExistence=t.verifyExistence=t.smtSpec=t.tendermintSpec=t.iavlSpec=void 0;let n=r(32165),i=r(17689),o=r(2030);function a(e,t,r,n,i){u(e,t);let a=l(e);(0,o.ensureBytesEqual)(a,r),(0,o.ensureBytesEqual)(n,e.key),(0,o.ensureBytesEqual)(i,e.value)}function s(e,t,r,n){let i,s;if(e.left&&(a(e.left,t,r,e.left.key,e.left.value),i=e.left.key),e.right&&(a(e.right,t,r,e.right.key,e.right.value),s=e.right.key),!i&&!s)throw Error("neither left nor right proof defined");if(i&&(0,o.ensureBytesBefore)(i,n),s&&(0,o.ensureBytesBefore)(n,s),!t.innerSpec)throw Error("no inner spec");i?s?p(t.innerSpec,e.left.path,e.right.path):c(t.innerSpec,e.left.path):d(t.innerSpec,e.right.path)}function l(e){if(!e.key||!e.value)throw Error("Existence proof needs key and value set");if(!e.leaf)throw Error("Existence proof must start with a leaf operation");let t=e.path||[],r=(0,i.applyLeaf)(e.leaf,e.key,e.value);for(let e of t)r=(0,i.applyInner)(e,r);return r}function u(e,t){if(!e.leaf)throw Error("Existence proof must start with a leaf operation");if(!t.leafSpec)throw Error("Spec must include leafSpec");if(!t.innerSpec)throw Error("Spec must include innerSpec");(0,o.ensureLeaf)(e.leaf,t.leafSpec);let r=e.path||[];if(t.minDepth&&r.lengtht.maxDepth)throw Error("Too many inner nodes ".concat(r.length));for(let e of r)(0,o.ensureInner)(e,t.leafSpec.prefix,t.innerSpec)}function d(e,t){let{minPrefix:r,maxPrefix:n,suffix:i}=m(e,0);for(let e of t)if(!g(e,r,n,i))throw Error("Step not leftmost")}function c(e,t){let r=e.childOrder.length-1,{minPrefix:n,maxPrefix:i,suffix:o}=m(e,r);for(let e of t)if(!g(e,n,i,o))throw Error("Step not leftmost")}function p(e,t,r){let n=[...t],i=[...r],a=n.pop(),s=i.pop();for(;(0,o.bytesEqual)(a.prefix,s.prefix)&&(0,o.bytesEqual)(a.suffix,s.suffix);)a=n.pop(),s=i.pop();if(!f(e,a,s))throw Error("Not left neightbor at first divergent step");c(e,n),d(e,i)}function f(e,t,r){let n=h(e,t);return h(e,r)===n+1}function h(e,t){for(let r=0;rr)&&(e.suffix||[]).length===n}function m(e,t){let r=y(e.childOrder,t),n=r*e.childSize;return{minPrefix:n+e.minPrefixLength,maxPrefix:n+e.maxPrefixLength,suffix:(e.childOrder.length-1-r)*e.childSize}}function y(e,t){if(t<0||t>=e.length)throw Error("Invalid branch: ".concat(t));return e.findIndex(e=>e===t)}t.iavlSpec={leafSpec:{prefix:Uint8Array.from([0]),hash:n.ics23.HashOp.SHA256,prehashValue:n.ics23.HashOp.SHA256,prehashKey:n.ics23.HashOp.NO_HASH,length:n.ics23.LengthOp.VAR_PROTO},innerSpec:{childOrder:[0,1],minPrefixLength:4,maxPrefixLength:12,childSize:33,hash:n.ics23.HashOp.SHA256}},t.tendermintSpec={leafSpec:{prefix:Uint8Array.from([0]),hash:n.ics23.HashOp.SHA256,prehashValue:n.ics23.HashOp.SHA256,prehashKey:n.ics23.HashOp.NO_HASH,length:n.ics23.LengthOp.VAR_PROTO},innerSpec:{childOrder:[0,1],minPrefixLength:1,maxPrefixLength:1,childSize:32,hash:n.ics23.HashOp.SHA256}},t.smtSpec={leafSpec:{hash:n.ics23.HashOp.SHA256,prehashKey:n.ics23.HashOp.NO_HASH,prehashValue:n.ics23.HashOp.SHA256,length:n.ics23.LengthOp.NO_PREFIX,prefix:Uint8Array.from([0])},innerSpec:{childOrder:[0,1],childSize:32,minPrefixLength:1,maxPrefixLength:1,emptyChild:new Uint8Array(32),hash:n.ics23.HashOp.SHA256},maxDepth:256},t.verifyExistence=a,t.verifyNonExistence=s,t.calculateExistenceRoot=l,t.ensureSpec=u,t.ensureLeftNeighbor=p},2030:function(e,t){"use strict";function r(e,t){if(e.hash!==t.hash)throw Error("Unexpected hashOp: ".concat(e.hash));if(e.prehashKey!==t.prehashKey)throw Error("Unexpected prehashKey: ".concat(e.prehashKey));if(e.prehashValue!==t.prehashValue)throw Error("Unexpected prehashValue: ".concat(e.prehashValue));if(e.length!==t.length)throw Error("Unexpected length op: ".concat(e.length));i(e.prefix,t.prefix)}function n(e,t,r){if(e.hash!==r.hash)throw Error("Unexpected hashOp: ".concat(e.hash));if(!e.prefix)throw Error("No prefix set for inner node");if(s(e.prefix,t))throw Error("Inner node has leaf prefix");if(e.prefix.length<(r.minPrefixLength||0))throw Error("Prefix too short: ".concat(e.prefix.length," bytes"));let n=(r.childOrder.length-1)*r.childSize;if(e.prefix.length>(r.maxPrefixLength||0)+n)throw Error("Prefix too long: ".concat(e.prefix.length," bytes"))}function i(e,t){if(t&&0!==t.length){if(!e)throw Error("Target bytes missing");o(t,e.slice(0,t.length))}}function o(e,t){if(e.length!==t.length)throw Error("Different lengths ".concat(e.length," vs ").concat(t.length));for(let r=0;rt[n])return!1}return e.length{let t=e.match(/^([0-9]+)([a-zA-Z]+)/);if(!t)throw Error("Got an invalid coin string");return{amount:t[1].replace(/^0+/,"")||"0",denom:t[2]}})}function s(e,t){if(e.denom!==t.denom)throw Error("Trying to add two coins with different denoms");return{amount:n.Decimal.fromAtomics(e.amount,0).plus(n.Decimal.fromAtomics(t.amount,0)).atomics,denom:e.denom}}t.coin=i,t.coins=o,t.parseCoins=a,t.addCoins=s},79221:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeBech32Pubkey=t.encodeAminoPubkey=t.decodeBech32Pubkey=t.decodeAminoPubkey=t.encodeEd25519Pubkey=t.encodeSecp256k1Pubkey=void 0;let n=r(69721),i=r(35801),o=r(67357),a=r(94515);function s(e){if(33!==e.length||2!==e[0]&&3!==e[0])throw Error("Public key must be compressed secp256k1, i.e. 33 bytes starting with 0x02 or 0x03");return{type:a.pubkeyType.secp256k1,value:(0,n.toBase64)(e)}}function l(e){if(32!==e.length)throw Error("Ed25519 public key must be 32 bytes long");return{type:a.pubkeyType.ed25519,value:(0,n.toBase64)(e)}}t.encodeSecp256k1Pubkey=s,t.encodeEd25519Pubkey=l;let u=(0,n.fromHex)("eb5ae98721"),d=(0,n.fromHex)("1624de6420"),c=(0,n.fromHex)("0dfb100520"),p=(0,n.fromHex)("22c1f7e2");function f(e){if((0,o.arrayContentStartsWith)(e,u)){let t=e.slice(u.length);if(33!==t.length)throw Error("Invalid rest data length. Expected 33 bytes (compressed secp256k1 pubkey).");return{type:a.pubkeyType.secp256k1,value:(0,n.toBase64)(t)}}if((0,o.arrayContentStartsWith)(e,d)){let t=e.slice(d.length);if(32!==t.length)throw Error("Invalid rest data length. Expected 32 bytes (Ed25519 pubkey).");return{type:a.pubkeyType.ed25519,value:(0,n.toBase64)(t)}}if((0,o.arrayContentStartsWith)(e,c)){let t=e.slice(c.length);if(32!==t.length)throw Error("Invalid rest data length. Expected 32 bytes (Sr25519 pubkey).");return{type:a.pubkeyType.sr25519,value:(0,n.toBase64)(t)}}if((0,o.arrayContentStartsWith)(e,p))return m(e);throw Error("Unsupported public key type. Amino data starts with: "+(0,n.toHex)(e.slice(0,5)))}function h(e){let{data:t}=(0,n.fromBech32)(e);return f(t)}function g(e){if(e.length<1)throw Error("Can't decode varint. EOF");if(e[0]>127)throw Error("Decoding numbers > 127 is not supported here. Please tell those lazy CosmJS maintainers to port the binary.Varint implementation from the Go standard library and write some tests.");return[e[0],1]}function m(e){let t=Array.from(e),r=t.splice(0,p.length);if(!(0,o.arrayContentStartsWith)(r,p))throw Error("Invalid multisig prefix.");if(8!=t.shift())throw Error("Invalid multisig data. Expecting 0x08 prefix before threshold.");let[n,i]=g(t);t.splice(0,i);let s=[];for(;t.length>0;){if(18!=t.shift())throw Error("Invalid multisig data. Expecting 0x12 prefix before participant pubkey length.");let[e,r]=g(t);if(t.splice(0,r),t.length127)throw Error("Encoding numbers > 127 is not supported here. Please tell those lazy CosmJS maintainers to port the binary.PutUvarint implementation from the Go standard library and write some tests.");return[t]}function v(e){if((0,a.isMultisigThresholdPubkey)(e)){let t=Array.from(p);for(let r of(t.push(8),t.push(...y(e.value.threshold)),e.value.pubkeys.map(e=>v(e))))t.push(18),t.push(...y(r.length)),t.push(...r);return new Uint8Array(t)}if((0,a.isEd25519Pubkey)(e))return new Uint8Array([...d,...(0,n.fromBase64)(e.value)]);if((0,a.isSecp256k1Pubkey)(e))return new Uint8Array([...u,...(0,n.fromBase64)(e.value)]);throw Error("Unsupported pubkey type")}function b(e,t){return(0,n.toBech32)(t,v(e))}t.decodeAminoPubkey=f,t.decodeBech32Pubkey=h,t.encodeAminoPubkey=v,t.encodeBech32Pubkey=b},83552:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.executeKdf=t.makeStdTx=t.isStdTx=t.serializeSignDoc=t.makeSignDoc=t.encodeSecp256k1Signature=t.decodeSignature=t.Secp256k1Wallet=t.Secp256k1HdWallet=t.extractKdfConfiguration=t.pubkeyType=t.isSinglePubkey=t.isSecp256k1Pubkey=t.isMultisigThresholdPubkey=t.isEd25519Pubkey=t.makeCosmoshubPath=t.omitDefault=t.createMultisigThresholdPubkey=t.encodeSecp256k1Pubkey=t.encodeEd25519Pubkey=t.encodeBech32Pubkey=t.encodeAminoPubkey=t.decodeBech32Pubkey=t.decodeAminoPubkey=t.parseCoins=t.coins=t.coin=t.addCoins=t.rawSecp256k1PubkeyToRawAddress=t.rawEd25519PubkeyToRawAddress=t.pubkeyToRawAddress=t.pubkeyToAddress=void 0;var n=r(63848);Object.defineProperty(t,"pubkeyToAddress",{enumerable:!0,get:function(){return n.pubkeyToAddress}}),Object.defineProperty(t,"pubkeyToRawAddress",{enumerable:!0,get:function(){return n.pubkeyToRawAddress}}),Object.defineProperty(t,"rawEd25519PubkeyToRawAddress",{enumerable:!0,get:function(){return n.rawEd25519PubkeyToRawAddress}}),Object.defineProperty(t,"rawSecp256k1PubkeyToRawAddress",{enumerable:!0,get:function(){return n.rawSecp256k1PubkeyToRawAddress}});var i=r(81458);Object.defineProperty(t,"addCoins",{enumerable:!0,get:function(){return i.addCoins}}),Object.defineProperty(t,"coin",{enumerable:!0,get:function(){return i.coin}}),Object.defineProperty(t,"coins",{enumerable:!0,get:function(){return i.coins}}),Object.defineProperty(t,"parseCoins",{enumerable:!0,get:function(){return i.parseCoins}});var o=r(79221);Object.defineProperty(t,"decodeAminoPubkey",{enumerable:!0,get:function(){return o.decodeAminoPubkey}}),Object.defineProperty(t,"decodeBech32Pubkey",{enumerable:!0,get:function(){return o.decodeBech32Pubkey}}),Object.defineProperty(t,"encodeAminoPubkey",{enumerable:!0,get:function(){return o.encodeAminoPubkey}}),Object.defineProperty(t,"encodeBech32Pubkey",{enumerable:!0,get:function(){return o.encodeBech32Pubkey}}),Object.defineProperty(t,"encodeEd25519Pubkey",{enumerable:!0,get:function(){return o.encodeEd25519Pubkey}}),Object.defineProperty(t,"encodeSecp256k1Pubkey",{enumerable:!0,get:function(){return o.encodeSecp256k1Pubkey}});var a=r(42306);Object.defineProperty(t,"createMultisigThresholdPubkey",{enumerable:!0,get:function(){return a.createMultisigThresholdPubkey}});var s=r(56728);Object.defineProperty(t,"omitDefault",{enumerable:!0,get:function(){return s.omitDefault}});var l=r(16340);Object.defineProperty(t,"makeCosmoshubPath",{enumerable:!0,get:function(){return l.makeCosmoshubPath}});var u=r(94515);Object.defineProperty(t,"isEd25519Pubkey",{enumerable:!0,get:function(){return u.isEd25519Pubkey}}),Object.defineProperty(t,"isMultisigThresholdPubkey",{enumerable:!0,get:function(){return u.isMultisigThresholdPubkey}}),Object.defineProperty(t,"isSecp256k1Pubkey",{enumerable:!0,get:function(){return u.isSecp256k1Pubkey}}),Object.defineProperty(t,"isSinglePubkey",{enumerable:!0,get:function(){return u.isSinglePubkey}}),Object.defineProperty(t,"pubkeyType",{enumerable:!0,get:function(){return u.pubkeyType}});var d=r(43130);Object.defineProperty(t,"extractKdfConfiguration",{enumerable:!0,get:function(){return d.extractKdfConfiguration}}),Object.defineProperty(t,"Secp256k1HdWallet",{enumerable:!0,get:function(){return d.Secp256k1HdWallet}});var c=r(16906);Object.defineProperty(t,"Secp256k1Wallet",{enumerable:!0,get:function(){return c.Secp256k1Wallet}});var p=r(24384);Object.defineProperty(t,"decodeSignature",{enumerable:!0,get:function(){return p.decodeSignature}}),Object.defineProperty(t,"encodeSecp256k1Signature",{enumerable:!0,get:function(){return p.encodeSecp256k1Signature}});var f=r(71901);Object.defineProperty(t,"makeSignDoc",{enumerable:!0,get:function(){return f.makeSignDoc}}),Object.defineProperty(t,"serializeSignDoc",{enumerable:!0,get:function(){return f.serializeSignDoc}});var h=r(89251);Object.defineProperty(t,"isStdTx",{enumerable:!0,get:function(){return h.isStdTx}}),Object.defineProperty(t,"makeStdTx",{enumerable:!0,get:function(){return h.makeStdTx}});var g=r(49858);Object.defineProperty(t,"executeKdf",{enumerable:!0,get:function(){return g.executeKdf}})},42306:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createMultisigThresholdPubkey=t.compareArrays=void 0;let n=r(69721),i=r(35801),o=r(63848);function a(e,t){let r=(0,n.toHex)(e),i=(0,n.toHex)(t);return r===i?0:r2&&void 0!==arguments[2]&&arguments[2],n=new i.Uint53(t);if(n.toNumber()>e.length)throw Error("Threshold k = ".concat(n.toNumber()," exceeds number of keys n = ").concat(e.length));let s=r?e:Array.from(e).sort((e,t)=>a((0,o.pubkeyToRawAddress)(e),(0,o.pubkeyToRawAddress)(t)));return{type:"tendermint/PubKeyMultisigThreshold",value:{threshold:n.toString(),pubkeys:s}}}t.compareArrays=a,t.createMultisigThresholdPubkey=s},56728:function(e,t){"use strict";function r(e){switch(typeof e){case"string":return""===e?void 0:e;case"number":return 0===e?void 0:e;case"bigint":return e===BigInt(0)?void 0:e;case"boolean":return e||void 0;default:throw Error("Got unsupported type '".concat(typeof e,"'"))}}Object.defineProperty(t,"__esModule",{value:!0}),t.omitDefault=void 0,t.omitDefault=r},16340:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.makeCosmoshubPath=void 0;let n=r(49400);function i(e){return[n.Slip10RawIndex.hardened(44),n.Slip10RawIndex.hardened(118),n.Slip10RawIndex.hardened(0),n.Slip10RawIndex.normal(0),n.Slip10RawIndex.normal(e)]}t.makeCosmoshubPath=i},94515:function(e,t){"use strict";function r(e){return"tendermint/PubKeyEd25519"===e.type}function n(e){return"tendermint/PubKeySecp256k1"===e.type}function i(e){return[t.pubkeyType.ed25519,t.pubkeyType.secp256k1,t.pubkeyType.sr25519].includes(e.type)}function o(e){return"tendermint/PubKeyMultisigThreshold"===e.type}Object.defineProperty(t,"__esModule",{value:!0}),t.isMultisigThresholdPubkey=t.isSinglePubkey=t.pubkeyType=t.isSecp256k1Pubkey=t.isEd25519Pubkey=void 0,t.isEd25519Pubkey=r,t.isSecp256k1Pubkey=n,t.pubkeyType={secp256k1:"tendermint/PubKeySecp256k1",ed25519:"tendermint/PubKeyEd25519",sr25519:"tendermint/PubKeySr25519",multisigThreshold:"tendermint/PubKeyMultisigThreshold"},t.isSinglePubkey=i,t.isMultisigThresholdPubkey=o},43130:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Secp256k1HdWallet=t.extractKdfConfiguration=void 0;let n=r(49400),i=r(69721),o=r(67357),a=r(63848),s=r(16340),l=r(24384),u=r(71901),d=r(49858),c="secp256k1wallet-v1",p={algorithm:"argon2id",params:{outputLength:32,opsLimit:24,memLimitKib:12288}};function f(e){return!!(0,o.isNonNullObject)(e)&&"string"==typeof e.hdPath&&"string"==typeof e.prefix}function h(e){return e.kdf}function g(e){let t=JSON.parse(e);if(!(0,o.isNonNullObject)(t))throw Error("Root document is not an object.");if(t.type===c)return h(t);throw Error("Unsupported serialization type")}t.extractKdfConfiguration=g;let m={bip39Password:"",hdPaths:[(0,s.makeCosmoshubPath)(0)],prefix:"cosmos"};class y{static async fromMnemonic(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=new n.EnglishMnemonic(e),i=await n.Bip39.mnemonicToSeed(r,t.bip39Password);return new y(r,{...t,seed:i})}static async generate(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:12,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=4*Math.floor(11*e/33),i=n.Random.getBytes(r),o=n.Bip39.encode(i);return y.fromMnemonic(o.toString(),t)}static async deserialize(e,t){let r=JSON.parse(e);if(!(0,o.isNonNullObject)(r))throw Error("Root document is not an object.");if(r.type===c)return y.deserializeTypeV1(e,t);throw Error("Unsupported serialization type")}static async deserializeWithEncryptionKey(e,t){let r=JSON.parse(e);if(!(0,o.isNonNullObject)(r))throw Error("Root document is not an object.");let a=r;if(a.type===c){let e=await (0,d.decrypt)((0,i.fromBase64)(a.data),t,a.encryption),{mnemonic:r,accounts:s}=JSON.parse((0,i.fromUtf8)(e));if((0,o.assert)("string"==typeof r),!Array.isArray(s))throw Error("Property 'accounts' is not an array");if(!s.every(e=>f(e)))throw Error("Account is not in the correct format.");let l=s[0].prefix;if(!s.every(e=>{let{prefix:t}=e;return t===l}))throw Error("Accounts do not all have the same prefix");let u=s.map(e=>{let{hdPath:t}=e;return(0,n.stringToPath)(t)});return y.fromMnemonic(r,{hdPaths:u,prefix:l})}throw Error("Unsupported serialization type")}static async deserializeTypeV1(e,t){let r=JSON.parse(e);if(!(0,o.isNonNullObject)(r))throw Error("Root document is not an object.");let n=await (0,d.executeKdf)(t,r.kdf);return y.deserializeWithEncryptionKey(e,n)}get mnemonic(){return this.secret.toString()}async getAccounts(){return(await this.getAccountsWithPrivkeys()).map(e=>{let{algo:t,pubkey:r,address:n}=e;return{algo:t,pubkey:r,address:n}})}async signAmino(e,t){let r=(await this.getAccountsWithPrivkeys()).find(t=>{let{address:r}=t;return r===e});if(void 0===r)throw Error("Address ".concat(e," not found in wallet"));let{privkey:i,pubkey:o}=r,a=(0,n.sha256)((0,u.serializeSignDoc)(t)),s=await n.Secp256k1.createSignature(a,i),d=new Uint8Array([...s.r(32),...s.s(32)]);return{signed:t,signature:(0,l.encodeSecp256k1Signature)(o,d)}}async serialize(e){let t=p,r=await (0,d.executeKdf)(e,t);return this.serializeWithEncryptionKey(r,t)}async serializeWithEncryptionKey(e,t){let r={mnemonic:this.mnemonic,accounts:this.accounts.map(e=>{let{hdPath:t,prefix:r}=e;return{hdPath:(0,n.pathToString)(t),prefix:r}})},o=(0,i.toUtf8)(JSON.stringify(r)),a={algorithm:d.supportedAlgorithms.xchacha20poly1305Ietf},s=await (0,d.encrypt)(o,e,a);return JSON.stringify({type:c,kdf:t,encryption:a,data:(0,i.toBase64)(s)})}async getKeyPair(e){let{privkey:t}=n.Slip10.derivePath(n.Slip10Curve.Secp256k1,this.seed,e),{pubkey:r}=await n.Secp256k1.makeKeypair(t);return{privkey:t,pubkey:n.Secp256k1.compressPubkey(r)}}async getAccountsWithPrivkeys(){return Promise.all(this.accounts.map(async e=>{let{hdPath:t,prefix:r}=e,{privkey:n,pubkey:o}=await this.getKeyPair(t),s=(0,i.toBech32)(r,(0,a.rawSecp256k1PubkeyToRawAddress)(o));return{algo:"secp256k1",privkey:n,pubkey:o,address:s}}))}constructor(e,t){var r,n;let i=null!==(r=t.hdPaths)&&void 0!==r?r:m.hdPaths,o=null!==(n=t.prefix)&&void 0!==n?n:m.prefix;this.secret=e,this.seed=t.seed,this.accounts=i.map(e=>({hdPath:e,prefix:o}))}}t.Secp256k1HdWallet=y},16906:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Secp256k1Wallet=void 0;let n=r(49400),i=r(69721),o=r(63848),a=r(24384),s=r(71901);class l{static async fromKey(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"cosmos",r=(await n.Secp256k1.makeKeypair(e)).pubkey;return new l(e,n.Secp256k1.compressPubkey(r),t)}get address(){return(0,i.toBech32)(this.prefix,(0,o.rawSecp256k1PubkeyToRawAddress)(this.pubkey))}async getAccounts(){return[{algo:"secp256k1",address:this.address,pubkey:this.pubkey}]}async signAmino(e,t){if(e!==this.address)throw Error("Address ".concat(e," not found in wallet"));let r=new n.Sha256((0,s.serializeSignDoc)(t)).digest(),i=await n.Secp256k1.createSignature(r,this.privkey),o=new Uint8Array([...i.r(32),...i.s(32)]);return{signed:t,signature:(0,a.encodeSecp256k1Signature)(this.pubkey,o)}}constructor(e,t,r){this.privkey=e,this.pubkey=t,this.prefix=r}}t.Secp256k1Wallet=l},24384:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeSignature=t.encodeSecp256k1Signature=void 0;let n=r(69721),i=r(79221),o=r(94515);function a(e,t){if(64!==t.length)throw Error("Signature must be 64 bytes long. Cosmos SDK uses a 2x32 byte fixed length encoding for the secp256k1 signature integers r and s.");return{pub_key:(0,i.encodeSecp256k1Pubkey)(e),signature:(0,n.toBase64)(t)}}function s(e){if(e.pub_key.type===o.pubkeyType.secp256k1)return{pubkey:(0,n.fromBase64)(e.pub_key.value),signature:(0,n.fromBase64)(e.signature)};throw Error("Unsupported pubkey type")}t.encodeSecp256k1Signature=a,t.decodeSignature=s},71901:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeSignDoc=t.escapeCharacters=t.makeSignDoc=t.sortedJsonStringify=void 0;let n=r(69721),i=r(35801);function o(e){if("object"!=typeof e||null===e)return e;if(Array.isArray(e))return e.map(o);let t=Object.keys(e).sort(),r={};return t.forEach(t=>{r[t]=o(e[t])}),r}function a(e){return JSON.stringify(o(e))}function s(e,t,r,n,o,a,s){return{chain_id:r,account_number:i.Uint53.fromString(o.toString()).toString(),sequence:i.Uint53.fromString(a.toString()).toString(),fee:t,msgs:e,memo:n||"",...s&&{timeout_height:s.toString()}}}function l(e){let t=/&/g,r=//g;return e.replace(t,"\\u0026").replace(r,"\\u003c").replace(n,"\\u003e")}function u(e){let t=l(a(e));return(0,n.toUtf8)(t)}t.sortedJsonStringify=a,t.makeSignDoc=s,t.escapeCharacters=l,t.serializeSignDoc=u},89251:function(e,t){"use strict";function r(e){let{memo:t,msg:r,fee:n,signatures:i}=e;return"string"==typeof t&&Array.isArray(r)&&"object"==typeof n&&Array.isArray(i)}function n(e,t){return{msg:e.msgs,fee:e.fee,memo:e.memo,signatures:Array.isArray(t)?t:[t]}}Object.defineProperty(t,"__esModule",{value:!0}),t.makeStdTx=t.isStdTx=void 0,t.isStdTx=r,t.makeStdTx=n},49858:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decrypt=t.encrypt=t.supportedAlgorithms=t.executeKdf=t.cosmjsSalt=void 0;let n=r(49400),i=r(69721);async function o(e,r){if("argon2id"===r.algorithm){let i=r.params;if(!(0,n.isArgon2idOptions)(i))throw Error("Invalid format of argon2id params");return n.Argon2id.execute(e,t.cosmjsSalt,i)}throw Error("Unsupported KDF algorithm")}async function a(e,r,i){if(i.algorithm===t.supportedAlgorithms.xchacha20poly1305Ietf){let t=n.Random.getBytes(n.xchacha20NonceLength);return new Uint8Array([...t,...await n.Xchacha20poly1305Ietf.encrypt(e,r,t)])}throw Error("Unsupported encryption algorithm: '".concat(i.algorithm,"'"))}async function s(e,r,i){if(i.algorithm===t.supportedAlgorithms.xchacha20poly1305Ietf){let t=e.slice(0,n.xchacha20NonceLength);return n.Xchacha20poly1305Ietf.decrypt(e.slice(n.xchacha20NonceLength),r,t)}throw Error("Unsupported encryption algorithm: '".concat(i.algorithm,"'"))}t.cosmjsSalt=(0,i.toAscii)("The CosmJS salt."),t.executeKdf=o,t.supportedAlgorithms={xchacha20poly1305Ietf:"xchacha20poly1305-ietf"},t.encrypt=a,t.decrypt=s},80567:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Bip39=t.EnglishMnemonic=t.mnemonicToEntropy=t.entropyToMnemonic=void 0;let n=r(69721),i=r(49379),o=r(68259),a=["abandon","ability","able","about","above","absent","absorb","abstract","absurd","abuse","access","accident","account","accuse","achieve","acid","acoustic","acquire","across","act","action","actor","actress","actual","adapt","add","addict","address","adjust","admit","adult","advance","advice","aerobic","affair","afford","afraid","again","age","agent","agree","ahead","aim","air","airport","aisle","alarm","album","alcohol","alert","alien","all","alley","allow","almost","alone","alpha","already","also","alter","always","amateur","amazing","among","amount","amused","analyst","anchor","ancient","anger","angle","angry","animal","ankle","announce","annual","another","answer","antenna","antique","anxiety","any","apart","apology","appear","apple","approve","april","arch","arctic","area","arena","argue","arm","armed","armor","army","around","arrange","arrest","arrive","arrow","art","artefact","artist","artwork","ask","aspect","assault","asset","assist","assume","asthma","athlete","atom","attack","attend","attitude","attract","auction","audit","august","aunt","author","auto","autumn","average","avocado","avoid","awake","aware","away","awesome","awful","awkward","axis","baby","bachelor","bacon","badge","bag","balance","balcony","ball","bamboo","banana","banner","bar","barely","bargain","barrel","base","basic","basket","battle","beach","bean","beauty","because","become","beef","before","begin","behave","behind","believe","below","belt","bench","benefit","best","betray","better","between","beyond","bicycle","bid","bike","bind","biology","bird","birth","bitter","black","blade","blame","blanket","blast","bleak","bless","blind","blood","blossom","blouse","blue","blur","blush","board","boat","body","boil","bomb","bone","bonus","book","boost","border","boring","borrow","boss","bottom","bounce","box","boy","bracket","brain","brand","brass","brave","bread","breeze","brick","bridge","brief","bright","bring","brisk","broccoli","broken","bronze","broom","brother","brown","brush","bubble","buddy","budget","buffalo","build","bulb","bulk","bullet","bundle","bunker","burden","burger","burst","bus","business","busy","butter","buyer","buzz","cabbage","cabin","cable","cactus","cage","cake","call","calm","camera","camp","can","canal","cancel","candy","cannon","canoe","canvas","canyon","capable","capital","captain","car","carbon","card","cargo","carpet","carry","cart","case","cash","casino","castle","casual","cat","catalog","catch","category","cattle","caught","cause","caution","cave","ceiling","celery","cement","census","century","cereal","certain","chair","chalk","champion","change","chaos","chapter","charge","chase","chat","cheap","check","cheese","chef","cherry","chest","chicken","chief","child","chimney","choice","choose","chronic","chuckle","chunk","churn","cigar","cinnamon","circle","citizen","city","civil","claim","clap","clarify","claw","clay","clean","clerk","clever","click","client","cliff","climb","clinic","clip","clock","clog","close","cloth","cloud","clown","club","clump","cluster","clutch","coach","coast","coconut","code","coffee","coil","coin","collect","color","column","combine","come","comfort","comic","common","company","concert","conduct","confirm","congress","connect","consider","control","convince","cook","cool","copper","copy","coral","core","corn","correct","cost","cotton","couch","country","couple","course","cousin","cover","coyote","crack","cradle","craft","cram","crane","crash","crater","crawl","crazy","cream","credit","creek","crew","cricket","crime","crisp","critic","crop","cross","crouch","crowd","crucial","cruel","cruise","crumble","crunch","crush","cry","crystal","cube","culture","cup","cupboard","curious","current","curtain","curve","cushion","custom","cute","cycle","dad","damage","damp","dance","danger","daring","dash","daughter","dawn","day","deal","debate","debris","decade","december","decide","decline","decorate","decrease","deer","defense","define","defy","degree","delay","deliver","demand","demise","denial","dentist","deny","depart","depend","deposit","depth","deputy","derive","describe","desert","design","desk","despair","destroy","detail","detect","develop","device","devote","diagram","dial","diamond","diary","dice","diesel","diet","differ","digital","dignity","dilemma","dinner","dinosaur","direct","dirt","disagree","discover","disease","dish","dismiss","disorder","display","distance","divert","divide","divorce","dizzy","doctor","document","dog","doll","dolphin","domain","donate","donkey","donor","door","dose","double","dove","draft","dragon","drama","drastic","draw","dream","dress","drift","drill","drink","drip","drive","drop","drum","dry","duck","dumb","dune","during","dust","dutch","duty","dwarf","dynamic","eager","eagle","early","earn","earth","easily","east","easy","echo","ecology","economy","edge","edit","educate","effort","egg","eight","either","elbow","elder","electric","elegant","element","elephant","elevator","elite","else","embark","embody","embrace","emerge","emotion","employ","empower","empty","enable","enact","end","endless","endorse","enemy","energy","enforce","engage","engine","enhance","enjoy","enlist","enough","enrich","enroll","ensure","enter","entire","entry","envelope","episode","equal","equip","era","erase","erode","erosion","error","erupt","escape","essay","essence","estate","eternal","ethics","evidence","evil","evoke","evolve","exact","example","excess","exchange","excite","exclude","excuse","execute","exercise","exhaust","exhibit","exile","exist","exit","exotic","expand","expect","expire","explain","expose","express","extend","extra","eye","eyebrow","fabric","face","faculty","fade","faint","faith","fall","false","fame","family","famous","fan","fancy","fantasy","farm","fashion","fat","fatal","father","fatigue","fault","favorite","feature","february","federal","fee","feed","feel","female","fence","festival","fetch","fever","few","fiber","fiction","field","figure","file","film","filter","final","find","fine","finger","finish","fire","firm","first","fiscal","fish","fit","fitness","fix","flag","flame","flash","flat","flavor","flee","flight","flip","float","flock","floor","flower","fluid","flush","fly","foam","focus","fog","foil","fold","follow","food","foot","force","forest","forget","fork","fortune","forum","forward","fossil","foster","found","fox","fragile","frame","frequent","fresh","friend","fringe","frog","front","frost","frown","frozen","fruit","fuel","fun","funny","furnace","fury","future","gadget","gain","galaxy","gallery","game","gap","garage","garbage","garden","garlic","garment","gas","gasp","gate","gather","gauge","gaze","general","genius","genre","gentle","genuine","gesture","ghost","giant","gift","giggle","ginger","giraffe","girl","give","glad","glance","glare","glass","glide","glimpse","globe","gloom","glory","glove","glow","glue","goat","goddess","gold","good","goose","gorilla","gospel","gossip","govern","gown","grab","grace","grain","grant","grape","grass","gravity","great","green","grid","grief","grit","grocery","group","grow","grunt","guard","guess","guide","guilt","guitar","gun","gym","habit","hair","half","hammer","hamster","hand","happy","harbor","hard","harsh","harvest","hat","have","hawk","hazard","head","health","heart","heavy","hedgehog","height","hello","helmet","help","hen","hero","hidden","high","hill","hint","hip","hire","history","hobby","hockey","hold","hole","holiday","hollow","home","honey","hood","hope","horn","horror","horse","hospital","host","hotel","hour","hover","hub","huge","human","humble","humor","hundred","hungry","hunt","hurdle","hurry","hurt","husband","hybrid","ice","icon","idea","identify","idle","ignore","ill","illegal","illness","image","imitate","immense","immune","impact","impose","improve","impulse","inch","include","income","increase","index","indicate","indoor","industry","infant","inflict","inform","inhale","inherit","initial","inject","injury","inmate","inner","innocent","input","inquiry","insane","insect","inside","inspire","install","intact","interest","into","invest","invite","involve","iron","island","isolate","issue","item","ivory","jacket","jaguar","jar","jazz","jealous","jeans","jelly","jewel","job","join","joke","journey","joy","judge","juice","jump","jungle","junior","junk","just","kangaroo","keen","keep","ketchup","key","kick","kid","kidney","kind","kingdom","kiss","kit","kitchen","kite","kitten","kiwi","knee","knife","knock","know","lab","label","labor","ladder","lady","lake","lamp","language","laptop","large","later","latin","laugh","laundry","lava","law","lawn","lawsuit","layer","lazy","leader","leaf","learn","leave","lecture","left","leg","legal","legend","leisure","lemon","lend","length","lens","leopard","lesson","letter","level","liar","liberty","library","license","life","lift","light","like","limb","limit","link","lion","liquid","list","little","live","lizard","load","loan","lobster","local","lock","logic","lonely","long","loop","lottery","loud","lounge","love","loyal","lucky","luggage","lumber","lunar","lunch","luxury","lyrics","machine","mad","magic","magnet","maid","mail","main","major","make","mammal","man","manage","mandate","mango","mansion","manual","maple","marble","march","margin","marine","market","marriage","mask","mass","master","match","material","math","matrix","matter","maximum","maze","meadow","mean","measure","meat","mechanic","medal","media","melody","melt","member","memory","mention","menu","mercy","merge","merit","merry","mesh","message","metal","method","middle","midnight","milk","million","mimic","mind","minimum","minor","minute","miracle","mirror","misery","miss","mistake","mix","mixed","mixture","mobile","model","modify","mom","moment","monitor","monkey","monster","month","moon","moral","more","morning","mosquito","mother","motion","motor","mountain","mouse","move","movie","much","muffin","mule","multiply","muscle","museum","mushroom","music","must","mutual","myself","mystery","myth","naive","name","napkin","narrow","nasty","nation","nature","near","neck","need","negative","neglect","neither","nephew","nerve","nest","net","network","neutral","never","news","next","nice","night","noble","noise","nominee","noodle","normal","north","nose","notable","note","nothing","notice","novel","now","nuclear","number","nurse","nut","oak","obey","object","oblige","obscure","observe","obtain","obvious","occur","ocean","october","odor","off","offer","office","often","oil","okay","old","olive","olympic","omit","once","one","onion","online","only","open","opera","opinion","oppose","option","orange","orbit","orchard","order","ordinary","organ","orient","original","orphan","ostrich","other","outdoor","outer","output","outside","oval","oven","over","own","owner","oxygen","oyster","ozone","pact","paddle","page","pair","palace","palm","panda","panel","panic","panther","paper","parade","parent","park","parrot","party","pass","patch","path","patient","patrol","pattern","pause","pave","payment","peace","peanut","pear","peasant","pelican","pen","penalty","pencil","people","pepper","perfect","permit","person","pet","phone","photo","phrase","physical","piano","picnic","picture","piece","pig","pigeon","pill","pilot","pink","pioneer","pipe","pistol","pitch","pizza","place","planet","plastic","plate","play","please","pledge","pluck","plug","plunge","poem","poet","point","polar","pole","police","pond","pony","pool","popular","portion","position","possible","post","potato","pottery","poverty","powder","power","practice","praise","predict","prefer","prepare","present","pretty","prevent","price","pride","primary","print","priority","prison","private","prize","problem","process","produce","profit","program","project","promote","proof","property","prosper","protect","proud","provide","public","pudding","pull","pulp","pulse","pumpkin","punch","pupil","puppy","purchase","purity","purpose","purse","push","put","puzzle","pyramid","quality","quantum","quarter","question","quick","quit","quiz","quote","rabbit","raccoon","race","rack","radar","radio","rail","rain","raise","rally","ramp","ranch","random","range","rapid","rare","rate","rather","raven","raw","razor","ready","real","reason","rebel","rebuild","recall","receive","recipe","record","recycle","reduce","reflect","reform","refuse","region","regret","regular","reject","relax","release","relief","rely","remain","remember","remind","remove","render","renew","rent","reopen","repair","repeat","replace","report","require","rescue","resemble","resist","resource","response","result","retire","retreat","return","reunion","reveal","review","reward","rhythm","rib","ribbon","rice","rich","ride","ridge","rifle","right","rigid","ring","riot","ripple","risk","ritual","rival","river","road","roast","robot","robust","rocket","romance","roof","rookie","room","rose","rotate","rough","round","route","royal","rubber","rude","rug","rule","run","runway","rural","sad","saddle","sadness","safe","sail","salad","salmon","salon","salt","salute","same","sample","sand","satisfy","satoshi","sauce","sausage","save","say","scale","scan","scare","scatter","scene","scheme","school","science","scissors","scorpion","scout","scrap","screen","script","scrub","sea","search","season","seat","second","secret","section","security","seed","seek","segment","select","sell","seminar","senior","sense","sentence","series","service","session","settle","setup","seven","shadow","shaft","shallow","share","shed","shell","sheriff","shield","shift","shine","ship","shiver","shock","shoe","shoot","shop","short","shoulder","shove","shrimp","shrug","shuffle","shy","sibling","sick","side","siege","sight","sign","silent","silk","silly","silver","similar","simple","since","sing","siren","sister","situate","six","size","skate","sketch","ski","skill","skin","skirt","skull","slab","slam","sleep","slender","slice","slide","slight","slim","slogan","slot","slow","slush","small","smart","smile","smoke","smooth","snack","snake","snap","sniff","snow","soap","soccer","social","sock","soda","soft","solar","soldier","solid","solution","solve","someone","song","soon","sorry","sort","soul","sound","soup","source","south","space","spare","spatial","spawn","speak","special","speed","spell","spend","sphere","spice","spider","spike","spin","spirit","split","spoil","sponsor","spoon","sport","spot","spray","spread","spring","spy","square","squeeze","squirrel","stable","stadium","staff","stage","stairs","stamp","stand","start","state","stay","steak","steel","stem","step","stereo","stick","still","sting","stock","stomach","stone","stool","story","stove","strategy","street","strike","strong","struggle","student","stuff","stumble","style","subject","submit","subway","success","such","sudden","suffer","sugar","suggest","suit","summer","sun","sunny","sunset","super","supply","supreme","sure","surface","surge","surprise","surround","survey","suspect","sustain","swallow","swamp","swap","swarm","swear","sweet","swift","swim","swing","switch","sword","symbol","symptom","syrup","system","table","tackle","tag","tail","talent","talk","tank","tape","target","task","taste","tattoo","taxi","teach","team","tell","ten","tenant","tennis","tent","term","test","text","thank","that","theme","then","theory","there","they","thing","this","thought","three","thrive","throw","thumb","thunder","ticket","tide","tiger","tilt","timber","time","tiny","tip","tired","tissue","title","toast","tobacco","today","toddler","toe","together","toilet","token","tomato","tomorrow","tone","tongue","tonight","tool","tooth","top","topic","topple","torch","tornado","tortoise","toss","total","tourist","toward","tower","town","toy","track","trade","traffic","tragic","train","transfer","trap","trash","travel","tray","treat","tree","trend","trial","tribe","trick","trigger","trim","trip","trophy","trouble","truck","true","truly","trumpet","trust","truth","try","tube","tuition","tumble","tuna","tunnel","turkey","turn","turtle","twelve","twenty","twice","twin","twist","two","type","typical","ugly","umbrella","unable","unaware","uncle","uncover","under","undo","unfair","unfold","unhappy","uniform","unique","unit","universe","unknown","unlock","until","unusual","unveil","update","upgrade","uphold","upon","upper","upset","urban","urge","usage","use","used","useful","useless","usual","utility","vacant","vacuum","vague","valid","valley","valve","van","vanish","vapor","various","vast","vault","vehicle","velvet","vendor","venture","venue","verb","verify","version","very","vessel","veteran","viable","vibrant","vicious","victory","video","view","village","vintage","violin","virtual","virus","visa","visit","visual","vital","vivid","vocal","voice","void","volcano","volume","vote","voyage","wage","wagon","wait","walk","wall","walnut","want","warfare","warm","warrior","wash","wasp","waste","water","wave","way","wealth","weapon","wear","weasel","weather","web","wedding","weekend","weird","welcome","west","wet","whale","what","wheat","wheel","when","where","whip","whisper","wide","width","wife","wild","will","win","window","wine","wing","wink","winner","winter","wire","wisdom","wise","wish","witness","wolf","woman","wonder","wood","wool","word","work","world","worry","worth","wrap","wreck","wrestle","wrist","write","wrong","yard","year","yellow","you","young","youth","zebra","zero","zone","zoo"];function s(e){return Array.from(e).map(e=>e.toString(2).padStart(8,"0")).join("")}function l(e){let t=8*e.length/32;return s((0,o.sha256)(e)).slice(0,t)}function u(e){return parseInt(e,2)}let d=[16,20,24,28,32],c=[12,15,18,21,24];function p(e){if(-1===d.indexOf(e.length))throw Error("invalid input length");return(s(e)+l(e)).match(/(.{11})/g).map(e=>a[u(e)]).join(" ")}t.entropyToMnemonic=p;let f="Invalid number of words",h="Found word that is not in the wordlist",g="Invalid entropy",m="Invalid mnemonic checksum";function y(e){return e.normalize("NFKD")}function v(e){let t=y(e).split(" ");if(!c.includes(t.length))throw Error(f);let r=t.map(e=>{let t=a.indexOf(e);if(-1===t)throw Error(h);return t.toString(2).padStart(11,"0")}).join(""),n=32*Math.floor(r.length/33),i=r.slice(0,n),o=r.slice(n),s=i.match(/(.{1,8})/g).map(u);if(s.length<16||s.length>32||s.length%4!=0)throw Error(g);let d=Uint8Array.from(s);if(l(d)!==o)throw Error(m);return d}t.mnemonicToEntropy=v;class b{toString(){return this.data}constructor(e){if(!b.mnemonicMatcher.test(e))throw Error("Invalid mnemonic format");let t=e.split(" "),r=[12,15,18,21,24];if(-1===r.indexOf(t.length))throw Error("Invalid word count in mnemonic (allowed: ".concat(r," got: ").concat(t.length,")"));for(let e of t)if(-1===b.wordlist.indexOf(e))throw Error("Mnemonic contains invalid word");v(e),this.data=e}}t.EnglishMnemonic=b,b.wordlist=a,b.mnemonicMatcher=/^[a-z]+( [a-z]+)*$/;class S{static encode(e){return new b(p(e))}static decode(e){return v(e.toString())}static async mnemonicToSeed(e,t){let r=(0,n.toUtf8)(y(e.toString())),o="mnemonic"+(t?y(t):""),a=(0,n.toUtf8)(o);return(0,i.pbkdf2Sha512)(r,a,2048,64)}}t.Bip39=S},44256:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Hmac=void 0;class r{update(e){return this.messageHasher.update(e),this}digest(){let e=this.messageHasher.digest();return this.hash(new Uint8Array([...this.oKeyPad,...e]))}constructor(e,t){let r=new e().blockSize;this.hash=t=>new e().update(t).digest();let n=t;if(n.length>r&&(n=this.hash(n)),n.length92^e),this.iKeyPad=n.map(e=>54^e),this.messageHasher=new e,this.blockSize=r,this.update(this.iKeyPad)}}t.Hmac=r},49400:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.stringToPath=t.Slip10RawIndex=t.slip10CurveFromString=t.Slip10Curve=t.Slip10=t.pathToString=t.sha512=t.Sha512=t.sha256=t.Sha256=t.Secp256k1Signature=t.ExtendedSecp256k1Signature=t.Secp256k1=t.ripemd160=t.Ripemd160=t.Random=t.Xchacha20poly1305Ietf=t.xchacha20NonceLength=t.isArgon2idOptions=t.Ed25519Keypair=t.Ed25519=t.Argon2id=t.keccak256=t.Keccak256=t.Hmac=t.EnglishMnemonic=t.Bip39=void 0;var n=r(80567);Object.defineProperty(t,"Bip39",{enumerable:!0,get:function(){return n.Bip39}}),Object.defineProperty(t,"EnglishMnemonic",{enumerable:!0,get:function(){return n.EnglishMnemonic}});var i=r(44256);Object.defineProperty(t,"Hmac",{enumerable:!0,get:function(){return i.Hmac}});var o=r(61679);Object.defineProperty(t,"Keccak256",{enumerable:!0,get:function(){return o.Keccak256}}),Object.defineProperty(t,"keccak256",{enumerable:!0,get:function(){return o.keccak256}});var a=r(50653);Object.defineProperty(t,"Argon2id",{enumerable:!0,get:function(){return a.Argon2id}}),Object.defineProperty(t,"Ed25519",{enumerable:!0,get:function(){return a.Ed25519}}),Object.defineProperty(t,"Ed25519Keypair",{enumerable:!0,get:function(){return a.Ed25519Keypair}}),Object.defineProperty(t,"isArgon2idOptions",{enumerable:!0,get:function(){return a.isArgon2idOptions}}),Object.defineProperty(t,"xchacha20NonceLength",{enumerable:!0,get:function(){return a.xchacha20NonceLength}}),Object.defineProperty(t,"Xchacha20poly1305Ietf",{enumerable:!0,get:function(){return a.Xchacha20poly1305Ietf}});var s=r(40239);Object.defineProperty(t,"Random",{enumerable:!0,get:function(){return s.Random}});var l=r(87973);Object.defineProperty(t,"Ripemd160",{enumerable:!0,get:function(){return l.Ripemd160}}),Object.defineProperty(t,"ripemd160",{enumerable:!0,get:function(){return l.ripemd160}});var u=r(60951);Object.defineProperty(t,"Secp256k1",{enumerable:!0,get:function(){return u.Secp256k1}});var d=r(104);Object.defineProperty(t,"ExtendedSecp256k1Signature",{enumerable:!0,get:function(){return d.ExtendedSecp256k1Signature}}),Object.defineProperty(t,"Secp256k1Signature",{enumerable:!0,get:function(){return d.Secp256k1Signature}});var c=r(68259);Object.defineProperty(t,"Sha256",{enumerable:!0,get:function(){return c.Sha256}}),Object.defineProperty(t,"sha256",{enumerable:!0,get:function(){return c.sha256}}),Object.defineProperty(t,"Sha512",{enumerable:!0,get:function(){return c.Sha512}}),Object.defineProperty(t,"sha512",{enumerable:!0,get:function(){return c.sha512}});var p=r(68697);Object.defineProperty(t,"pathToString",{enumerable:!0,get:function(){return p.pathToString}}),Object.defineProperty(t,"Slip10",{enumerable:!0,get:function(){return p.Slip10}}),Object.defineProperty(t,"Slip10Curve",{enumerable:!0,get:function(){return p.Slip10Curve}}),Object.defineProperty(t,"slip10CurveFromString",{enumerable:!0,get:function(){return p.slip10CurveFromString}}),Object.defineProperty(t,"Slip10RawIndex",{enumerable:!0,get:function(){return p.Slip10RawIndex}}),Object.defineProperty(t,"stringToPath",{enumerable:!0,get:function(){return p.stringToPath}})},61679:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.keccak256=t.Keccak256=void 0;let n=r(3141),i=r(67356);class o{update(e){return this.impl.update((0,i.toRealUint8Array)(e)),this}digest(){return this.impl.digest()}constructor(e){this.blockSize=64,this.impl=n.keccak_256.create(),e&&this.update(e)}}function a(e){return new o(e).digest()}t.Keccak256=o,t.keccak256=a},50653:function(e,t,r){"use strict";var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Xchacha20poly1305Ietf=t.xchacha20NonceLength=t.Ed25519=t.Ed25519Keypair=t.Argon2id=t.isArgon2idOptions=void 0;let i=r(67357),o=n(r(63615));function a(e){return!!(0,i.isNonNullObject)(e)&&"number"==typeof e.outputLength&&"number"==typeof e.opsLimit&&"number"==typeof e.memLimitKib}t.isArgon2idOptions=a;class s{static async execute(e,t,r){return await o.default.ready,o.default.crypto_pwhash(r.outputLength,e,t,r.opsLimit,1024*r.memLimitKib,o.default.crypto_pwhash_ALG_ARGON2ID13)}}t.Argon2id=s;class l{static fromLibsodiumPrivkey(e){if(64!==e.length)throw Error("Unexpected key length ".concat(e.length,". Must be 64."));return new l(e.slice(0,32),e.slice(32,64))}toLibsodiumPrivkey(){return new Uint8Array([...this.privkey,...this.pubkey])}constructor(e,t){this.privkey=e,this.pubkey=t}}t.Ed25519Keypair=l;class u{static async makeKeypair(e){await o.default.ready;let t=o.default.crypto_sign_seed_keypair(e);return l.fromLibsodiumPrivkey(t.privateKey)}static async createSignature(e,t){return await o.default.ready,o.default.crypto_sign_detached(e,t.toLibsodiumPrivkey())}static async verifySignature(e,t,r){return await o.default.ready,o.default.crypto_sign_verify_detached(e,t,r)}}t.Ed25519=u,t.xchacha20NonceLength=24;class d{static async encrypt(e,t,r){await o.default.ready;let n=null;return o.default.crypto_aead_xchacha20poly1305_ietf_encrypt(e,n,null,r,t)}static async decrypt(e,t,r){await o.default.ready;let n=null;return o.default.crypto_aead_xchacha20poly1305_ietf_decrypt(null,e,n,r,t)}}t.Xchacha20poly1305Ietf=d},49379:function(e,t,r){"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.pbkdf2Sha512=t.pbkdf2Sha512Noble=t.pbkdf2Sha512NodeCrypto=t.pbkdf2Sha512Subtle=t.getSubtle=t.getNodeCrypto=void 0;let a=r(67357),s=r(78496),l=r(93996);async function u(){try{let e=await Promise.resolve().then(()=>o(r(27815)));if("object"==typeof e&&Object.keys(e).length<=1)return;return e}catch(e){return}}async function d(){var e,t,r,n,i;let o=null===(t=globalThis)||void 0===t?void 0:null===(e=t.crypto)||void 0===e?void 0:e.subtle;return o||(o=null===(i=globalThis)||void 0===i?void 0:null===(n=i.crypto)||void 0===n?void 0:null===(r=n.webcrypto)||void 0===r?void 0:r.subtle),o}async function c(e,t,r,n,i){return(0,a.assert)(e,"Argument subtle is falsy"),(0,a.assert)("object"==typeof e,"Argument subtle is not of type object"),(0,a.assert)("function"==typeof e.importKey,"subtle.importKey is not a function"),(0,a.assert)("function"==typeof e.deriveBits,"subtle.deriveBits is not a function"),e.importKey("raw",t,{name:"PBKDF2"},!1,["deriveBits"]).then(t=>e.deriveBits({name:"PBKDF2",salt:r,iterations:n,hash:{name:"SHA-512"}},t,8*i).then(e=>new Uint8Array(e)))}async function p(e,t,r,n,i){return(0,a.assert)(e,"Argument nodeCrypto is falsy"),(0,a.assert)("object"==typeof e,"Argument nodeCrypto is not of type object"),(0,a.assert)("function"==typeof e.pbkdf2,"nodeCrypto.pbkdf2 is not a function"),new Promise((o,a)=>{e.pbkdf2(t,r,n,i,"sha512",(e,t)=>{e?a(e):o(Uint8Array.from(t))})})}async function f(e,t,r,n){return(0,s.pbkdf2Async)(l.sha512,e,t,{c:r,dkLen:n})}async function h(e,t,r,n){let i=await d();if(i)return c(i,e,t,r,n);{let i=await u();return i?p(i,e,t,r,n):f(e,t,r,n)}}t.getNodeCrypto=u,t.getSubtle=d,t.pbkdf2Sha512Subtle=c,t.pbkdf2Sha512NodeCrypto=p,t.pbkdf2Sha512Noble=f,t.pbkdf2Sha512=h},40239:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Random=void 0;class n{static getBytes(e){try{let t=window,r=void 0!==t.crypto?t.crypto:t.msCrypto,n=new Uint8Array(e);return r.getRandomValues(n),n}catch(t){try{let t=r(27815);return new Uint8Array([...t.randomBytes(e)])}catch(e){throw Error("No secure random number generator found")}}}}t.Random=n},87973:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ripemd160=t.Ripemd160=void 0;let n=r(33573),i=r(67356);class o{update(e){return this.impl.update((0,i.toRealUint8Array)(e)),this}digest(){return this.impl.digest()}constructor(e){this.blockSize=64,this.impl=n.ripemd160.create(),e&&this.update(e)}}function a(e){return new o(e).digest()}t.Ripemd160=o,t.ripemd160=a},60951:function(e,t,r){"use strict";var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Secp256k1=void 0;let i=r(69721),o=n(r(34108)),a=n(r(23254)),s=r(104),l=new a.default.ec("secp256k1"),u=new o.default("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141","hex");class d{static async makeKeypair(e){if(32!==e.length)throw Error("input data is not a valid secp256k1 private key");let t=l.keyFromPrivate(e);if(!0!==t.validate().result||new o.default(e).gte(u))throw Error("input data is not a valid secp256k1 private key");return{privkey:(0,i.fromHex)(t.getPrivate("hex")),pubkey:Uint8Array.from(t.getPublic("array"))}}static async createSignature(e,t){if(0===e.length)throw Error("Message hash must not be empty");if(e.length>32)throw Error("Message hash length must not exceed 32 bytes");let{r,s:n,recoveryParam:i}=l.keyFromPrivate(t).sign(e,{canonical:!0});if("number"!=typeof i)throw Error("Recovery param missing");return new s.ExtendedSecp256k1Signature(Uint8Array.from(r.toArray()),Uint8Array.from(n.toArray()),i)}static async verifySignature(e,t,r){if(0===t.length)throw Error("Message hash must not be empty");if(t.length>32)throw Error("Message hash length must not exceed 32 bytes");let n=l.keyFromPublic(r);try{return n.verify(t,e.toDer())}catch(e){return!1}}static recoverPubkey(e,t){let r={r:(0,i.toHex)(e.r()),s:(0,i.toHex)(e.s())},n=l.recoverPubKey(t,r,e.recovery),o=l.keyFromPublic(n);return(0,i.fromHex)(o.getPublic(!1,"hex"))}static compressPubkey(e){switch(e.length){case 33:return e;case 65:return Uint8Array.from(l.keyFromPublic(e).getPublic(!0,"array"));default:throw Error("Invalid pubkey length")}}static uncompressPubkey(e){switch(e.length){case 33:return Uint8Array.from(l.keyFromPublic(e).getPublic(!1,"array"));case 65:return e;default:throw Error("Invalid pubkey length")}}static trimRecoveryByte(e){switch(e.length){case 64:return e;case 65:return e.slice(0,64);default:throw Error("Invalid signature length")}}}t.Secp256k1=d},104:function(e,t){"use strict";function r(e){let t=0;for(let r of e)if(0===r)t++;else break;return e.slice(t)}Object.defineProperty(t,"__esModule",{value:!0}),t.ExtendedSecp256k1Signature=t.Secp256k1Signature=void 0;let n=2;class i{static fromFixedLength(e){if(64!==e.length)throw Error("Got invalid data length: ".concat(e.length,". Expected 2x 32 bytes for the pair (r, s)"));return new i(r(e.slice(0,32)),r(e.slice(32,64)))}static fromDer(e){let t=0;if(48!==e[t++])throw Error("Prefix 0x30 expected");let o=e[t++];if(e.length-t!==o)throw Error("Data length mismatch detected");if(e[t++]!==n)throw Error("INTEGER tag expected");let a=e[t++];if(a>=128)throw Error("Decoding length values above 127 not supported");let s=e.slice(t,t+a);if(t+=a,e[t++]!==n)throw Error("INTEGER tag expected");let l=e[t++];if(l>=128)throw Error("Decoding length values above 127 not supported");let u=e.slice(t,t+l);return t+=l,new i(r(s),r(u))}r(e){if(void 0===e)return this.data.r;{let t=e-this.data.r.length;if(t<0)throw Error("Length too small to hold parameter r");let r=new Uint8Array(t);return new Uint8Array([...r,...this.data.r])}}s(e){if(void 0===e)return this.data.s;{let t=e-this.data.s.length;if(t<0)throw Error("Length too small to hold parameter s");let r=new Uint8Array(t);return new Uint8Array([...r,...this.data.s])}}toFixedLength(){return new Uint8Array([...this.r(32),...this.s(32)])}toDer(){let e=this.data.r[0]>=128?new Uint8Array([0,...this.data.r]):this.data.r,t=this.data.s[0]>=128?new Uint8Array([0,...this.data.s]):this.data.s,r=e.length,i=t.length,o=new Uint8Array([n,r,...e,n,i,...t]);return new Uint8Array([48,o.length,...o])}constructor(e,t){if(e.length>32||0===e.length||0===e[0])throw Error("Unsigned integer r must be encoded as unpadded big endian.");if(t.length>32||0===t.length||0===t[0])throw Error("Unsigned integer s must be encoded as unpadded big endian.");this.data={r:e,s:t}}}t.Secp256k1Signature=i;class o extends i{static fromFixedLength(e){if(65!==e.length)throw Error("Got invalid data length ".concat(e.length,". Expected 32 + 32 + 1"));return new o(r(e.slice(0,32)),r(e.slice(32,64)),e[64])}toFixedLength(){return new Uint8Array([...this.r(32),...this.s(32),this.recovery])}constructor(e,t,r){if(super(e,t),!Number.isInteger(r))throw Error("The recovery parameter must be an integer.");if(r<0||r>4)throw Error("The recovery parameter must be one of 0, 1, 2, 3.");this.recovery=r}}t.ExtendedSecp256k1Signature=o},68259:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sha512=t.Sha512=t.sha256=t.Sha256=void 0;let n=r(23928),i=r(93996),o=r(67356);class a{update(e){return this.impl.update((0,o.toRealUint8Array)(e)),this}digest(){return this.impl.digest()}constructor(e){this.blockSize=64,this.impl=n.sha256.create(),e&&this.update(e)}}function s(e){return new a(e).digest()}t.Sha256=a,t.sha256=s;class l{update(e){return this.impl.update((0,o.toRealUint8Array)(e)),this}digest(){return this.impl.digest()}constructor(e){this.blockSize=128,this.impl=i.sha512.create(),e&&this.update(e)}}function u(e){return new l(e).digest()}t.Sha512=l,t.sha512=u},68697:function(e,t,r){"use strict";var n,i=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.stringToPath=t.pathToString=t.Slip10=t.Slip10RawIndex=t.slip10CurveFromString=t.Slip10Curve=void 0;let o=r(69721),a=r(35801),s=i(r(34108)),l=i(r(23254)),u=r(44256),d=r(68259);function c(e){switch(e){case n.Ed25519:return n.Ed25519;case n.Secp256k1:return n.Secp256k1;default:throw Error("Unknown curve string: '".concat(e,"'"))}}!function(e){e.Secp256k1="Bitcoin seed",e.Ed25519="ed25519 seed"}(n=t.Slip10Curve||(t.Slip10Curve={})),t.slip10CurveFromString=c;class p extends a.Uint32{static hardened(e){return new p(e+2147483648)}static normal(e){return new p(e)}isHardened(){return this.data>=2147483648}}t.Slip10RawIndex=p;let f=new l.default.ec("secp256k1");class h{static derivePath(e,t,r){let n=this.master(e,t);for(let t of r)n=this.child(e,n.privkey,n.chainCode,t);return n}static master(e,t){let r=new u.Hmac(d.Sha512,(0,o.toAscii)(e)).update(t).digest(),i=r.slice(0,32),a=r.slice(32,64);return e!==n.Ed25519&&(this.isZero(i)||this.isGteN(e,i))?this.master(e,r):{chainCode:a,privkey:i}}static child(e,t,r,i){let o;if(i.isHardened()){let e=new Uint8Array([0,...t,...i.toBytesBigEndian()]);o=new u.Hmac(d.Sha512,r).update(e).digest()}else{if(e===n.Ed25519)throw Error("Normal keys are not allowed with ed25519");{let n=new Uint8Array([...h.serializedPoint(e,new s.default(t)),...i.toBytesBigEndian()]);o=new u.Hmac(d.Sha512,r).update(n).digest()}}return this.childImpl(e,t,r,i,o)}static serializedPoint(e,t){if(e===n.Secp256k1)return(0,o.fromHex)(f.g.mul(t).encodeCompressed("hex"));throw Error("curve not supported")}static childImpl(e,t,r,i,o){let a=o.slice(0,32),l=o.slice(32,64),c=l;if(e===n.Ed25519)return{chainCode:c,privkey:a};let p=this.n(e),f=new s.default(a).add(new s.default(t)).mod(p),h=Uint8Array.from(f.toArray("be",32));if(this.isGteN(e,a)||this.isZero(h)){let n=new u.Hmac(d.Sha512,r).update(new Uint8Array([1,...l,...i.toBytesBigEndian()])).digest();return this.childImpl(e,t,r,i,n)}return{chainCode:c,privkey:h}}static isZero(e){return e.every(e=>0===e)}static isGteN(e,t){return new s.default(t).gte(this.n(e))}static n(e){if(e===n.Secp256k1)return new s.default("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141",16);throw Error("curve not supported")}}function g(e){return e.reduce((e,t)=>e+"/"+(t.isHardened()?"".concat(t.toNumber()-2147483648,"'"):t.toString()),"m")}function m(e){if(!e.startsWith("m"))throw Error("Path string must start with 'm'");let t=e.slice(1),r=[];for(;t;){let e=t.match(/^\/([0-9]+)('?)/);if(!e)throw Error("Syntax error while reading path component");let[n,i,o]=e,s=a.Uint53.fromString(i).toNumber();if(s>=2147483648)throw Error("Component value too high. Must not exceed 2**31-1.");o?r.push(p.hardened(s)):r.push(p.normal(s)),t=t.slice(n.length)}return r}t.Slip10=h,t.pathToString=g,t.stringToPath=m},67356:function(e,t){"use strict";function r(e){return e instanceof Uint8Array?e:Uint8Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.toRealUint8Array=void 0,t.toRealUint8Array=r},30449:function(e,t){"use strict";function r(e){let t=e=>e.split("").map(e=>{let t=e.charCodeAt(0);if(t<32||t>126)throw Error("Cannot encode character that is out of printable ASCII range: "+t);return t});return Uint8Array.from(t(e))}function n(e){return Array.from(e).map(e=>{if(e<32||e>126)throw Error("Cannot decode character that is out of printable ASCII range: "+e);return String.fromCharCode(e)}).join("")}Object.defineProperty(t,"__esModule",{value:!0}),t.fromAscii=t.toAscii=void 0,t.toAscii=r,t.fromAscii=n},588:function(e,t,r){"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.fromBase64=t.toBase64=void 0;let a=o(r(66033));function s(e){return a.fromByteArray(e)}function l(e){if(!e.match(/^[a-zA-Z0-9+/]*={0,2}$/))throw Error("Invalid base64 string format");return a.toByteArray(e)}t.toBase64=s,t.fromBase64=l},18630:function(e,t,r){"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeBech32=t.fromBech32=t.toBech32=void 0;let a=o(r(21062));function s(e,t,r){return a.encode(e,a.toWords(t),r)}function l(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0,r=a.decode(e,t);return{prefix:r.prefix,data:new Uint8Array(a.fromWords(r.words))}}function u(e){let{prefix:t,data:r}=l(e);return s(t,r)}t.toBech32=s,t.fromBech32=l,t.normalizeBech32=u},36013:function(e,t){"use strict";function r(e){let t="";for(let r of e)t+=("0"+r.toString(16)).slice(-2);return t}function n(e){if(e.length%2!=0)throw Error("hex string length must be a multiple of 2");let t=new Uint8Array(e.length/2);for(let r=0;r1&&void 0!==arguments[1]?arguments[1]:2;return e.toString().padStart(t,"0")}function i(e){let t,n,i;let o=r.exec(e);if(!o)throw Error("Date string is not in RFC3339 format");let a=+o[1],s=+o[2],l=+o[3],u=+o[4],d=+o[5],c=+o[6],p=o[7]?Math.floor(1e3*+o[7]):0;"Z"===o[8]?(t=1,n=0,i=0):(t="-"===o[8].substring(0,1)?-1:1,n=+o[8].substring(1,3),i=+o[8].substring(4,6));let f=t*(60*n+i)*60,h=new Date;return h.setUTCFullYear(a,s-1,l),h.setUTCHours(u,d,c,p),new Date(h.getTime()-1e3*f)}function o(e){let t=e.getUTCFullYear(),r=n(e.getUTCMonth()+1),i=n(e.getUTCDate()),o=n(e.getUTCHours()),a=n(e.getUTCMinutes()),s=n(e.getUTCSeconds()),l=n(e.getUTCMilliseconds(),3);return"".concat(t,"-").concat(r,"-").concat(i,"T").concat(o,":").concat(a,":").concat(s,".").concat(l,"Z")}t.fromRfc3339=i,t.toRfc3339=o},95022:function(e,t){"use strict";function r(e){return new TextEncoder().encode(e)}function n(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=!t;return new TextDecoder("utf-8",{fatal:r}).decode(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.fromUtf8=t.toUtf8=void 0,t.toUtf8=r,t.fromUtf8=n},21062:function(e){"use strict";for(var t="qpzry9x8gf2tvdw0s3jn54khce6mua7l",r={},n=0;n>25;return(33554431&e)<<5^996825010&-(t>>0&1)^642813549&-(t>>1&1)^513874426&-(t>>2&1)^1027748829&-(t>>3&1)^705979059&-(t>>4&1)}function a(e){for(var t=1,r=0;r126)return"Invalid prefix ("+e+")";t=o(t)^n>>5}for(r=0,t=o(t);rn)throw TypeError("Exceeds length limit");var i=a(e=e.toLowerCase());if("string"==typeof i)throw Error(i);for(var s=e+"1",l=0;l>5!=0)throw Error("Non 5-bit word");i=o(i)^u,s+=t.charAt(u)}for(l=0;l<6;++l)i=o(i);for(i^=1,l=0;l<6;++l){var d=i>>(5-l)*5&31;s+=t.charAt(d)}return s}function l(e,t){if(t=t||90,e.length<8)return e+" too short";if(e.length>t)return"Exceeds length limit";var n=e.toLowerCase(),i=e.toUpperCase();if(e!==n&&e!==i)return"Mixed-case string "+e;var s=(e=n).lastIndexOf("1");if(-1===s)return"No separator character for "+e;if(0===s)return"Missing prefix for "+e;var l=e.slice(0,s),u=e.slice(s+1);if(u.length<6)return"Data too short";var d=a(l);if("string"==typeof d)return d;for(var c=[],p=0;p=u.length||c.push(h)}return 1!==d?"Invalid checksum for "+e:{prefix:l,words:c}}function u(){var e=l.apply(null,arguments);if("object"==typeof e)return e}function d(e){var t=l.apply(null,arguments);if("object"==typeof t)return t;throw Error(t)}function c(e,t,r,n){for(var i=0,o=0,a=(1<=r;)s.push(i>>(o-=r)&a);if(n)o>0&&s.push(i<=t)return"Excess padding";if(i<t.id===e.id),r=(0,n.firstEvent)(t);this.connection.sendRequest(e);let o=await r;if((0,i.isJsonRpcErrorResponse)(o)){let e=o.error;throw Error("JSON RPC error: code=".concat(e.code,"; message='").concat(e.message,"'"))}return o}constructor(e){this.connection=e}}t.JsonRpcClient=o},5084:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseJsonRpcResponse=t.parseJsonRpcSuccessResponse=t.parseJsonRpcErrorResponse=t.parseJsonRpcRequest=t.parseJsonRpcId=void 0;let n=r(38589);function i(e){if(!(0,n.isJsonCompatibleDictionary)(e))throw Error("Data must be JSON compatible dictionary");let t=e.id;return"number"!=typeof t&&"string"!=typeof t?null:t}function o(e){if(!(0,n.isJsonCompatibleDictionary)(e))throw Error("Data must be JSON compatible dictionary");if("2.0"!==e.jsonrpc)throw Error("Got unexpected jsonrpc version: ".concat(e.jsonrpc));let t=i(e);if(null===t)throw Error("Invalid id field");let r=e.method;if("string"!=typeof r)throw Error("Invalid method field");if(!(0,n.isJsonCompatibleArray)(e.params)&&!(0,n.isJsonCompatibleDictionary)(e.params))throw Error("Invalid params field");return{jsonrpc:"2.0",id:t,method:r,params:e.params}}function a(e){let t;if("number"!=typeof e.code)throw Error("Error property 'code' is not a number");if("string"!=typeof e.message)throw Error("Error property 'message' is not a string");if(void 0===e.data)t=void 0;else if((0,n.isJsonCompatibleValue)(e.data))t=e.data;else throw Error("Error property 'data' is defined but not a JSON compatible value.");return{code:e.code,message:e.message,...void 0!==t?{data:t}:{}}}function s(e){if(!(0,n.isJsonCompatibleDictionary)(e))throw Error("Data must be JSON compatible dictionary");if("2.0"!==e.jsonrpc)throw Error("Got unexpected jsonrpc version: ".concat(JSON.stringify(e)));let t=e.id;if("number"!=typeof t&&"string"!=typeof t&&null!==t)throw Error("Invalid id field");if(void 0===e.error||!(0,n.isJsonCompatibleDictionary)(e.error))throw Error("Invalid error field");return{jsonrpc:"2.0",id:t,error:a(e.error)}}function l(e){if(!(0,n.isJsonCompatibleDictionary)(e))throw Error("Data must be JSON compatible dictionary");if("2.0"!==e.jsonrpc)throw Error("Got unexpected jsonrpc version: ".concat(JSON.stringify(e)));let t=e.id;if("number"!=typeof t&&"string"!=typeof t)throw Error("Invalid id field");if(void 0===e.result)throw Error("Invalid result field");return{jsonrpc:"2.0",id:t,result:e.result}}function u(e){let t;try{t=s(e)}catch(r){t=l(e)}return t}t.parseJsonRpcId=i,t.parseJsonRpcRequest=o,t.parseJsonRpcErrorResponse=s,t.parseJsonRpcSuccessResponse=l,t.parseJsonRpcResponse=u},24864:function(e,t){"use strict";function r(e){return"object"==typeof e.error}function n(e){return!r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.jsonRpcCode=t.isJsonRpcSuccessResponse=t.isJsonRpcErrorResponse=void 0,t.isJsonRpcErrorResponse=r,t.isJsonRpcSuccessResponse=n,t.jsonRpcCode={parseError:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internalError:-32603,serverError:{default:-32e3}}},30107:function(e,t,r){"use strict";var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Decimal=void 0;let i=n(r(34108)),o=100;class a{static fromUserInput(e,t){let r,n;a.verifyFractionalDigits(t);let i=e.match(/[^0-9.]/);if(i)throw Error("Invalid character at position ".concat(i.index+1));if(""===e)r="0",n="";else if(-1===e.search(/\./))r=e,n="";else{let t=e.split(".");switch(t.length){case 0:case 1:throw Error("Fewer than two elements in split result. This must not happen here.");case 2:if(!t[1])throw Error("Fractional part missing");r=t[0],n=t[1].replace(/0+$/,"");break;default:throw Error("More than one separator found")}}if(n.length>t)throw Error("Got more fractional digits than supported");return new a("".concat(r).concat(n.padEnd(t,"0")),t)}static fromAtomics(e,t){return a.verifyFractionalDigits(t),new a(e,t)}static zero(e){return a.verifyFractionalDigits(e),new a("0",e)}static one(e){return a.verifyFractionalDigits(e),new a("1"+"0".repeat(e),e)}static verifyFractionalDigits(e){if(!Number.isInteger(e))throw Error("Fractional digits is not an integer");if(e<0)throw Error("Fractional digits must not be negative");if(e>o)throw Error("Fractional digits must not exceed ".concat(o))}static compare(e,t){if(e.fractionalDigits!==t.fractionalDigits)throw Error("Fractional digits do not match");return e.data.atomics.cmp(new i.default(t.atomics))}get atomics(){return this.data.atomics.toString()}get fractionalDigits(){return this.data.fractionalDigits}clone(){return new a(this.atomics,this.fractionalDigits)}floor(){let e=new i.default(10).pow(new i.default(this.data.fractionalDigits)),t=this.data.atomics.div(e);return this.data.atomics.mod(e).isZero()?this.clone():a.fromAtomics(t.mul(e).toString(),this.fractionalDigits)}ceil(){let e=new i.default(10).pow(new i.default(this.data.fractionalDigits)),t=this.data.atomics.div(e);return this.data.atomics.mod(e).isZero()?this.clone():a.fromAtomics(t.addn(1).mul(e).toString(),this.fractionalDigits)}toString(){let e=new i.default(10).pow(new i.default(this.data.fractionalDigits)),t=this.data.atomics.div(e),r=this.data.atomics.mod(e);if(r.isZero())return t.toString();{let e=r.toString().padStart(this.data.fractionalDigits,"0").replace(/0+$/,"");return"".concat(t.toString(),".").concat(e)}}toFloatApproximation(){let e=Number(this.toString());if(Number.isNaN(e))throw Error("Conversion to number failed");return e}plus(e){if(this.fractionalDigits!==e.fractionalDigits)throw Error("Fractional digits do not match");return new a(this.data.atomics.add(new i.default(e.atomics)).toString(),this.fractionalDigits)}minus(e){if(this.fractionalDigits!==e.fractionalDigits)throw Error("Fractional digits do not match");let t=this.data.atomics.sub(new i.default(e.atomics));if(t.ltn(0))throw Error("Difference must not be negative");return new a(t.toString(),this.fractionalDigits)}multiply(e){return new a(this.data.atomics.mul(new i.default(e.toString())).toString(),this.fractionalDigits)}equals(e){return 0===a.compare(this,e)}isLessThan(e){return 0>a.compare(this,e)}isLessThanOrEqual(e){return 0>=a.compare(this,e)}isGreaterThan(e){return a.compare(this,e)>0}isGreaterThanOrEqual(e){return a.compare(this,e)>=0}constructor(e,t){if(!e.match(/^[0-9]+$/))throw Error("Invalid string format. Only non-negative integers in decimal representation supported.");this.data={atomics:new i.default(e),fractionalDigits:t}}}t.Decimal=a},35801:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Uint64=t.Uint53=t.Uint32=t.Int53=t.Decimal=void 0;var n=r(30107);Object.defineProperty(t,"Decimal",{enumerable:!0,get:function(){return n.Decimal}});var i=r(36577);Object.defineProperty(t,"Int53",{enumerable:!0,get:function(){return i.Int53}}),Object.defineProperty(t,"Uint32",{enumerable:!0,get:function(){return i.Uint32}}),Object.defineProperty(t,"Uint53",{enumerable:!0,get:function(){return i.Uint53}}),Object.defineProperty(t,"Uint64",{enumerable:!0,get:function(){return i.Uint64}})},36577:function(e,t,r){"use strict";var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Uint64=t.Uint53=t.Int53=t.Uint32=void 0;let i=n(r(34108)),o=new i.default("18446744073709551615",10,"be");class a{static fromBigEndianBytes(e){return a.fromBytes(e)}static fromBytes(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"be";if(4!==e.length)throw Error("Invalid input length. Expected 4 bytes.");for(let t=0;t255||e[t]<0)throw Error("Invalid value in byte. Found: "+e[t]);let r="be"===t?e:Array.from(e).reverse();return new a(16777216*r[0]+65536*r[1]+256*r[2]+r[3])}static fromString(e){if(!e.match(/^[0-9]+$/))throw Error("Invalid string format");return new a(Number.parseInt(e,10))}toBytesBigEndian(){return new Uint8Array([255&Math.floor(this.data/16777216),255&Math.floor(this.data/65536),255&Math.floor(this.data/256),255&Math.floor(this.data/1)])}toBytesLittleEndian(){return new Uint8Array([255&Math.floor(this.data/1),255&Math.floor(this.data/256),255&Math.floor(this.data/65536),255&Math.floor(this.data/16777216)])}toNumber(){return this.data}toBigInt(){return BigInt(this.toNumber())}toString(){return this.data.toString()}constructor(e){if(Number.isNaN(e))throw Error("Input is not a number");if(!Number.isInteger(e))throw Error("Input is not an integer");if(e<0||e>4294967295)throw Error("Input not in uint32 range: "+e.toString());this.data=e}}t.Uint32=a;class s{static fromString(e){if(!e.match(/^-?[0-9]+$/))throw Error("Invalid string format");return new s(Number.parseInt(e,10))}toNumber(){return this.data}toBigInt(){return BigInt(this.toNumber())}toString(){return this.data.toString()}constructor(e){if(Number.isNaN(e))throw Error("Input is not a number");if(!Number.isInteger(e))throw Error("Input is not an integer");if(eNumber.MAX_SAFE_INTEGER)throw Error("Input not in int53 range: "+e.toString());this.data=e}}t.Int53=s;class l{static fromString(e){return new l(s.fromString(e).toNumber())}toNumber(){return this.data.toNumber()}toBigInt(){return BigInt(this.toNumber())}toString(){return this.data.toString()}constructor(e){let t=new s(e);if(0>t.toNumber())throw Error("Input is negative");this.data=t}}t.Uint53=l;class u{static fromBytesBigEndian(e){return u.fromBytes(e)}static fromBytes(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"be";if(8!==e.length)throw Error("Invalid input length. Expected 8 bytes.");for(let t=0;t255||e[t]<0)throw Error("Invalid value in byte. Found: "+e[t]);let r="be"===t?Array.from(e):Array.from(e).reverse();return new u(new i.default(r))}static fromString(e){if(!e.match(/^[0-9]+$/))throw Error("Invalid string format");return new u(new i.default(e,10,"be"))}static fromNumber(e){let t;if(Number.isNaN(e))throw Error("Input is not a number");if(!Number.isInteger(e))throw Error("Input is not an integer");try{t=new i.default(e)}catch(e){throw Error("Input is not a safe integer")}return new u(t)}toBytesBigEndian(){return Uint8Array.from(this.data.toArray("be",8))}toBytesLittleEndian(){return Uint8Array.from(this.data.toArray("le",8))}toString(){return this.data.toString(10)}toBigInt(){return BigInt(this.toString())}toNumber(){return this.data.toNumber()}constructor(e){if(e.isNeg())throw Error("Input is negative");if(e.gt(o))throw Error("Input exceeds uint64 range");this.data=e}}t.Uint64=u},57387:function(e,t){"use strict";function r(e){return e.replace(/\s/g,"").split(",").filter(Boolean).map(e=>{let t=e.match(/^([0-9]+)([a-zA-Z][a-zA-Z0-9/]{2,127})$/);if(!t)throw Error("Got an invalid coin string");return{amount:t[1].replace(/^0+/,"")||"0",denom:t[2]}})}Object.defineProperty(t,"__esModule",{value:!0}),t.parseCoins=void 0,t.parseCoins=r},27895:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeTxRaw=void 0;let n=r(26136);function i(e){let t=n.TxRaw.decode(e);return{authInfo:n.AuthInfo.decode(t.authInfoBytes),body:n.TxBody.decode(t.bodyBytes),signatures:t.signatures}}t.decodeTxRaw=i},20630:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DirectSecp256k1HdWallet=t.extractKdfConfiguration=void 0;let n=r(83552),i=r(49400),o=r(69721),a=r(67357),s=r(21813),l=r(48821),u="directsecp256k1hdwallet-v1",d={algorithm:"argon2id",params:{outputLength:32,opsLimit:24,memLimitKib:12288}};function c(e){return!!(0,a.isNonNullObject)(e)&&"string"==typeof e.hdPath&&"string"==typeof e.prefix}function p(e){return e.kdf}function f(e){let t=JSON.parse(e);if(!(0,a.isNonNullObject)(t))throw Error("Root document is not an object.");if(t.type===u)return p(t);throw Error("Unsupported serialization type")}t.extractKdfConfiguration=f;let h={bip39Password:"",hdPaths:[(0,n.makeCosmoshubPath)(0)],prefix:"cosmos"};class g{static async fromMnemonic(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=new i.EnglishMnemonic(e),n=await i.Bip39.mnemonicToSeed(r,t.bip39Password);return new g(r,{...t,seed:n})}static async generate(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:12,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=4*Math.floor(11*e/33),n=i.Random.getBytes(r),o=i.Bip39.encode(n);return g.fromMnemonic(o.toString(),t)}static async deserialize(e,t){let r=JSON.parse(e);if(!(0,a.isNonNullObject)(r))throw Error("Root document is not an object.");if(r.type===u)return g.deserializeTypeV1(e,t);throw Error("Unsupported serialization type")}static async deserializeWithEncryptionKey(e,t){let r=JSON.parse(e);if(!(0,a.isNonNullObject)(r))throw Error("Root document is not an object.");let n=r;if(n.type===u){let e=await (0,l.decrypt)((0,o.fromBase64)(n.data),t,n.encryption),{mnemonic:r,accounts:s}=JSON.parse((0,o.fromUtf8)(e));if((0,a.assert)("string"==typeof r),!Array.isArray(s))throw Error("Property 'accounts' is not an array");if(!s.every(e=>c(e)))throw Error("Account is not in the correct format.");let u=s[0].prefix;if(!s.every(e=>{let{prefix:t}=e;return t===u}))throw Error("Accounts do not all have the same prefix");let d=s.map(e=>{let{hdPath:t}=e;return(0,i.stringToPath)(t)});return g.fromMnemonic(r,{hdPaths:d,prefix:u})}throw Error("Unsupported serialization type")}static async deserializeTypeV1(e,t){let r=JSON.parse(e);if(!(0,a.isNonNullObject)(r))throw Error("Root document is not an object.");let n=await (0,l.executeKdf)(t,r.kdf);return g.deserializeWithEncryptionKey(e,n)}get mnemonic(){return this.secret.toString()}async getAccounts(){return(await this.getAccountsWithPrivkeys()).map(e=>{let{algo:t,pubkey:r,address:n}=e;return{algo:t,pubkey:r,address:n}})}async signDirect(e,t){let r=(await this.getAccountsWithPrivkeys()).find(t=>{let{address:r}=t;return r===e});if(void 0===r)throw Error("Address ".concat(e," not found in wallet"));let{privkey:o,pubkey:a}=r,l=(0,s.makeSignBytes)(t),u=(0,i.sha256)(l),d=await i.Secp256k1.createSignature(u,o),c=new Uint8Array([...d.r(32),...d.s(32)]);return{signed:t,signature:(0,n.encodeSecp256k1Signature)(a,c)}}async serialize(e){let t=d,r=await (0,l.executeKdf)(e,t);return this.serializeWithEncryptionKey(r,t)}async serializeWithEncryptionKey(e,t){let r={mnemonic:this.mnemonic,accounts:this.accounts.map(e=>{let{hdPath:t,prefix:r}=e;return{hdPath:(0,i.pathToString)(t),prefix:r}})},n=(0,o.toUtf8)(JSON.stringify(r)),a={algorithm:l.supportedAlgorithms.xchacha20poly1305Ietf},s=await (0,l.encrypt)(n,e,a);return JSON.stringify({type:u,kdf:t,encryption:a,data:(0,o.toBase64)(s)})}async getKeyPair(e){let{privkey:t}=i.Slip10.derivePath(i.Slip10Curve.Secp256k1,this.seed,e),{pubkey:r}=await i.Secp256k1.makeKeypair(t);return{privkey:t,pubkey:i.Secp256k1.compressPubkey(r)}}async getAccountsWithPrivkeys(){return Promise.all(this.accounts.map(async e=>{let{hdPath:t,prefix:r}=e,{privkey:i,pubkey:a}=await this.getKeyPair(t),s=(0,o.toBech32)(r,(0,n.rawSecp256k1PubkeyToRawAddress)(a));return{algo:"secp256k1",privkey:i,pubkey:a,address:s}}))}constructor(e,t){var r,n;let i=null!==(r=t.prefix)&&void 0!==r?r:h.prefix,o=null!==(n=t.hdPaths)&&void 0!==n?n:h.hdPaths;this.secret=e,this.seed=t.seed,this.accounts=o.map(e=>({hdPath:e,prefix:i}))}}t.DirectSecp256k1HdWallet=g},14471:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DirectSecp256k1Wallet=void 0;let n=r(83552),i=r(49400),o=r(69721),a=r(21813);class s{static async fromKey(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"cosmos",r=(await i.Secp256k1.makeKeypair(e)).pubkey;return new s(e,i.Secp256k1.compressPubkey(r),t)}get address(){return(0,o.toBech32)(this.prefix,(0,n.rawSecp256k1PubkeyToRawAddress)(this.pubkey))}async getAccounts(){return[{algo:"secp256k1",address:this.address,pubkey:this.pubkey}]}async signDirect(e,t){let r=(0,a.makeSignBytes)(t);if(e!==this.address)throw Error("Address ".concat(e," not found in wallet"));let o=(0,i.sha256)(r),s=await i.Secp256k1.createSignature(o,this.privkey),l=new Uint8Array([...s.r(32),...s.s(32)]);return{signed:t,signature:(0,n.encodeSecp256k1Signature)(this.pubkey,l)}}constructor(e,t,r){this.privkey=e,this.pubkey=t,this.prefix=r}}t.DirectSecp256k1Wallet=s},18722:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.coins=t.coin=t.executeKdf=t.makeSignDoc=t.makeSignBytes=t.makeAuthInfoBytes=t.isOfflineDirectSigner=t.Registry=t.isTxBodyEncodeObject=t.isTsProtoGeneratedType=t.isPbjsGeneratedType=t.encodePubkey=t.decodePubkey=t.decodeOptionalPubkey=t.anyToSinglePubkey=t.makeCosmoshubPath=t.DirectSecp256k1Wallet=t.extractKdfConfiguration=t.DirectSecp256k1HdWallet=t.decodeTxRaw=t.parseCoins=void 0;var n=r(57387);Object.defineProperty(t,"parseCoins",{enumerable:!0,get:function(){return n.parseCoins}});var i=r(27895);Object.defineProperty(t,"decodeTxRaw",{enumerable:!0,get:function(){return i.decodeTxRaw}});var o=r(20630);Object.defineProperty(t,"DirectSecp256k1HdWallet",{enumerable:!0,get:function(){return o.DirectSecp256k1HdWallet}}),Object.defineProperty(t,"extractKdfConfiguration",{enumerable:!0,get:function(){return o.extractKdfConfiguration}});var a=r(14471);Object.defineProperty(t,"DirectSecp256k1Wallet",{enumerable:!0,get:function(){return a.DirectSecp256k1Wallet}});var s=r(13777);Object.defineProperty(t,"makeCosmoshubPath",{enumerable:!0,get:function(){return s.makeCosmoshubPath}});var l=r(3192);Object.defineProperty(t,"anyToSinglePubkey",{enumerable:!0,get:function(){return l.anyToSinglePubkey}}),Object.defineProperty(t,"decodeOptionalPubkey",{enumerable:!0,get:function(){return l.decodeOptionalPubkey}}),Object.defineProperty(t,"decodePubkey",{enumerable:!0,get:function(){return l.decodePubkey}}),Object.defineProperty(t,"encodePubkey",{enumerable:!0,get:function(){return l.encodePubkey}});var u=r(59842);Object.defineProperty(t,"isPbjsGeneratedType",{enumerable:!0,get:function(){return u.isPbjsGeneratedType}}),Object.defineProperty(t,"isTsProtoGeneratedType",{enumerable:!0,get:function(){return u.isTsProtoGeneratedType}}),Object.defineProperty(t,"isTxBodyEncodeObject",{enumerable:!0,get:function(){return u.isTxBodyEncodeObject}}),Object.defineProperty(t,"Registry",{enumerable:!0,get:function(){return u.Registry}});var d=r(99605);Object.defineProperty(t,"isOfflineDirectSigner",{enumerable:!0,get:function(){return d.isOfflineDirectSigner}});var c=r(21813);Object.defineProperty(t,"makeAuthInfoBytes",{enumerable:!0,get:function(){return c.makeAuthInfoBytes}}),Object.defineProperty(t,"makeSignBytes",{enumerable:!0,get:function(){return c.makeSignBytes}}),Object.defineProperty(t,"makeSignDoc",{enumerable:!0,get:function(){return c.makeSignDoc}});var p=r(48821);Object.defineProperty(t,"executeKdf",{enumerable:!0,get:function(){return p.executeKdf}});var f=r(83552);Object.defineProperty(t,"coin",{enumerable:!0,get:function(){return f.coin}}),Object.defineProperty(t,"coins",{enumerable:!0,get:function(){return f.coins}})},13777:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.makeCosmoshubPath=void 0;let n=r(49400);function i(e){return[n.Slip10RawIndex.hardened(44),n.Slip10RawIndex.hardened(118),n.Slip10RawIndex.hardened(0),n.Slip10RawIndex.normal(0),n.Slip10RawIndex.normal(e)]}t.makeCosmoshubPath=i},3192:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeOptionalPubkey=t.decodePubkey=t.anyToSinglePubkey=t.encodePubkey=void 0;let n=r(83552),i=r(69721),o=r(35801),a=r(61010),s=r(56907),l=r(57622),u=r(11879);function d(e){if((0,n.isSecp256k1Pubkey)(e)){let t=l.PubKey.fromPartial({key:(0,i.fromBase64)(e.value)});return u.Any.fromPartial({typeUrl:"/cosmos.crypto.secp256k1.PubKey",value:Uint8Array.from(l.PubKey.encode(t).finish())})}if((0,n.isEd25519Pubkey)(e)){let t=a.PubKey.fromPartial({key:(0,i.fromBase64)(e.value)});return u.Any.fromPartial({typeUrl:"/cosmos.crypto.ed25519.PubKey",value:Uint8Array.from(a.PubKey.encode(t).finish())})}if((0,n.isMultisigThresholdPubkey)(e)){let t=s.LegacyAminoPubKey.fromPartial({threshold:o.Uint53.fromString(e.value.threshold).toNumber(),publicKeys:e.value.pubkeys.map(d)});return u.Any.fromPartial({typeUrl:"/cosmos.crypto.multisig.LegacyAminoPubKey",value:Uint8Array.from(s.LegacyAminoPubKey.encode(t).finish())})}throw Error("Pubkey type ".concat(e.type," not recognized"))}function c(e){switch(e.typeUrl){case"/cosmos.crypto.secp256k1.PubKey":{let{key:t}=l.PubKey.decode(e.value);return(0,n.encodeSecp256k1Pubkey)(t)}case"/cosmos.crypto.ed25519.PubKey":{let{key:t}=a.PubKey.decode(e.value);return(0,n.encodeEd25519Pubkey)(t)}default:throw Error("Pubkey type_url ".concat(e.typeUrl," not recognized as single public key type"))}}function p(e){switch(e.typeUrl){case"/cosmos.crypto.secp256k1.PubKey":case"/cosmos.crypto.ed25519.PubKey":return c(e);case"/cosmos.crypto.multisig.LegacyAminoPubKey":{let{threshold:t,publicKeys:r}=s.LegacyAminoPubKey.decode(e.value);return{type:"tendermint/PubKeyMultisigThreshold",value:{threshold:t.toString(),pubkeys:r.map(c)}}}default:throw Error("Pubkey type URL '".concat(e.typeUrl,"' not recognized"))}}function f(e){if(!e)return null;if(e.typeUrl){if(e.value.length)return p(e);throw Error("Pubkey is an Any with type URL '".concat(e.typeUrl,"' but an empty value"))}if(!e.value.length)return null;throw Error("Pubkey is an Any with an empty type URL but a value set")}t.encodePubkey=d,t.anyToSinglePubkey=c,t.decodePubkey=p,t.decodeOptionalPubkey=f},59842:function(e,t,r){"use strict";var n=r(23663).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.Registry=t.isTxBodyEncodeObject=t.isPbjsGeneratedType=t.isTsProtoGeneratedType=t.isTelescopeGeneratedType=void 0;let i=r(45413),o=r(14841),a=r(26136),s=r(11879);function l(e){let t=e;return"function"==typeof t.fromPartial&&"string"==typeof t.typeUrl}function u(e){return"function"==typeof e.fromPartial}function d(e){return!u(e)}t.isTelescopeGeneratedType=l,t.isTsProtoGeneratedType=u,t.isPbjsGeneratedType=d;let c={cosmosCoin:"/cosmos.base.v1beta1.Coin",cosmosMsgSend:"/cosmos.bank.v1beta1.MsgSend",cosmosTxBody:"/cosmos.tx.v1beta1.TxBody",googleAny:"/google.protobuf.Any"};function p(e){return"/cosmos.tx.v1beta1.TxBody"===e.typeUrl}t.isTxBodyEncodeObject=p;class f{register(e,t){this.types.set(e,t)}lookupType(e){return this.types.get(e)}lookupTypeWithError(e){let t=this.lookupType(e);if(!t)throw Error("Unregistered type url: ".concat(e));return t}encode(e){let{value:t,typeUrl:r}=e;if(p(e))return this.encodeTxBody(t);let n=this.lookupTypeWithError(r),i=l(n)||u(n)?n.fromPartial(t):n.create(t);return n.encode(i).finish()}encodeAsAny(e){let t=this.encode(e);return s.Any.fromPartial({typeUrl:e.typeUrl,value:t})}encodeTxBody(e){var t,r;let n=e.messages.map(e=>this.encodeAsAny(e)),i=a.TxBody.fromPartial({...e,timeoutHeight:BigInt(null!==(r=null===(t=e.timeoutHeight)||void 0===t?void 0:t.toString())&&void 0!==r?r:"0"),messages:n});return a.TxBody.encode(i).finish()}decode(e){let{typeUrl:t,value:r}=e;if(t===c.cosmosTxBody)return this.decodeTxBody(r);let i=this.lookupTypeWithError(t).decode(r);return Object.entries(i).forEach(e=>{let[t,r]=e;void 0!==n&&void 0!==n.isBuffer&&n.isBuffer(r)&&(i[t]=Uint8Array.from(r))}),i}decodeTxBody(e){let t=a.TxBody.decode(e);return{...t,messages:t.messages.map(e=>{let{typeUrl:t,value:r}=e;if(!t)throw Error("Missing type_url in Any");if(!r)throw Error("Missing value in Any");return this.decode({typeUrl:t,value:r})})}}constructor(e){let{cosmosCoin:t,cosmosMsgSend:r}=c;this.types=new Map(e?[...e]:[[t,o.Coin],[r,i.MsgSend]])}}t.Registry=f},99605:function(e,t){"use strict";function r(e){return void 0!==e.signDirect}Object.defineProperty(t,"__esModule",{value:!0}),t.isOfflineDirectSigner=void 0,t.isOfflineDirectSigner=r},21813:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.makeSignBytes=t.makeSignDoc=t.makeAuthInfoBytes=void 0;let n=r(67357),i=r(2264),o=r(26136);function a(e,t){return e.map(e=>{let{pubkey:r,sequence:n}=e;return{publicKey:r,modeInfo:{single:{mode:t}},sequence:BigInt(n)}})}function s(e,t,r,s,l){let u=arguments.length>5&&void 0!==arguments[5]?arguments[5]:i.SignMode.SIGN_MODE_DIRECT;(0,n.assert)(void 0===s||"string"==typeof s,"feeGranter must be undefined or string"),(0,n.assert)(void 0===l||"string"==typeof l,"feePayer must be undefined or string");let d=o.AuthInfo.fromPartial({signerInfos:a(e,u),fee:{amount:[...t],gasLimit:BigInt(r),granter:s,payer:l}});return o.AuthInfo.encode(d).finish()}function l(e,t,r,n){return{bodyBytes:e,authInfoBytes:t,chainId:r,accountNumber:BigInt(n)}}function u(e){let{accountNumber:t,authInfoBytes:r,bodyBytes:n,chainId:i}=e,a=o.SignDoc.fromPartial({accountNumber:t,authInfoBytes:r,bodyBytes:n,chainId:i});return o.SignDoc.encode(a).finish()}t.makeAuthInfoBytes=s,t.makeSignDoc=l,t.makeSignBytes=u},48821:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decrypt=t.encrypt=t.supportedAlgorithms=t.executeKdf=t.cosmjsSalt=void 0;let n=r(49400),i=r(69721);async function o(e,r){if("argon2id"===r.algorithm){let i=r.params;if(!(0,n.isArgon2idOptions)(i))throw Error("Invalid format of argon2id params");return n.Argon2id.execute(e,t.cosmjsSalt,i)}throw Error("Unsupported KDF algorithm")}async function a(e,r,i){if(i.algorithm===t.supportedAlgorithms.xchacha20poly1305Ietf){let t=n.Random.getBytes(n.xchacha20NonceLength);return new Uint8Array([...t,...await n.Xchacha20poly1305Ietf.encrypt(e,r,t)])}throw Error("Unsupported encryption algorithm: '".concat(i.algorithm,"'"))}async function s(e,r,i){if(i.algorithm===t.supportedAlgorithms.xchacha20poly1305Ietf){let t=e.slice(0,n.xchacha20NonceLength);return n.Xchacha20poly1305Ietf.decrypt(e.slice(n.xchacha20NonceLength),r,t)}throw Error("Unsupported encryption algorithm: '".concat(i.algorithm,"'"))}t.cosmjsSalt=(0,i.toAscii)("The CosmJS salt."),t.executeKdf=o,t.supportedAlgorithms={xchacha20poly1305Ietf:"xchacha20poly1305-ietf"},t.encrypt=a,t.decrypt=s},99593:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StreamingSocket=t.SocketWrapper=t.ReconnectingSocket=t.QueueingStreamingSocket=t.ConnectionStatus=void 0;var n=r(51682);Object.defineProperty(t,"ConnectionStatus",{enumerable:!0,get:function(){return n.ConnectionStatus}}),Object.defineProperty(t,"QueueingStreamingSocket",{enumerable:!0,get:function(){return n.QueueingStreamingSocket}});var i=r(63299);Object.defineProperty(t,"ReconnectingSocket",{enumerable:!0,get:function(){return i.ReconnectingSocket}});var o=r(19866);Object.defineProperty(t,"SocketWrapper",{enumerable:!0,get:function(){return o.SocketWrapper}});var a=r(87903);Object.defineProperty(t,"StreamingSocket",{enumerable:!0,get:function(){return a.StreamingSocket}})},51682:function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.QueueingStreamingSocket=t.ConnectionStatus=void 0;let i=r(15786),o=r(78518),a=r(87903);!function(e){e[e.Unconnected=0]="Unconnected",e[e.Connecting=1]="Connecting",e[e.Connected=2]="Connected",e[e.Disconnected=3]="Disconnected"}(n=t.ConnectionStatus||(t.ConnectionStatus={}));class s{connect(){this.connectionStatusProducer.update(n.Connecting),this.socket.connected.then(async()=>(this.connectionStatusProducer.update(n.Connected),this.processQueue()),()=>this.connectionStatusProducer.update(n.Disconnected)),this.socket.connect()}disconnect(){this.connectionStatusProducer.update(n.Disconnected),this.socket.disconnect()}reconnect(){this.socket=new a.StreamingSocket(this.url,this.timeout),this.socket.events.subscribe({next:e=>{if(!this.eventProducerListener)throw Error("No event producer listener set");this.eventProducerListener.next(e)},error:()=>this.connectionStatusProducer.update(n.Disconnected)}),this.socket.connected.then(()=>{this.reconnectedHandler&&this.reconnectedHandler()}),this.connect()}getQueueLength(){return this.queue.length}queueRequest(e){this.queue.push(e),this.processQueue()}async processQueue(){let e;if(!this.isProcessingQueue&&this.connectionStatus.value===n.Connected)for(this.isProcessingQueue=!0;e=this.queue.shift();)try{await this.socket.send(e),this.isProcessingQueue=!1}catch(t){this.queue.unshift(e),this.isProcessingQueue=!1;return}}constructor(e,t=1e4,r){this.queue=[],this.isProcessingQueue=!1,this.url=e,this.timeout=t,this.reconnectedHandler=r;let s={start:e=>this.eventProducerListener=e,stop:()=>this.eventProducerListener=void 0};this.events=o.Stream.create(s),this.connectionStatusProducer=new i.DefaultValueProducer(n.Unconnected),this.connectionStatus=new i.ValueAndUpdates(this.connectionStatusProducer),this.socket=new a.StreamingSocket(this.url,this.timeout),this.socket.events.subscribe({next:e=>{if(!this.eventProducerListener)throw Error("No event producer listener set");this.eventProducerListener.next(e)},error:()=>this.connectionStatusProducer.update(n.Disconnected)})}}t.QueueingStreamingSocket=s},63299:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReconnectingSocket=void 0;let n=r(78518),i=r(51682);class o{static calculateTimeout(e){return Math.min(2**e*100,5e3)}connect(){if(!this.unconnected)throw Error("Cannot connect: socket has already connected");this.socket.connect(),this.unconnected=!1}disconnect(){if(this.unconnected)throw Error("Cannot disconnect: socket has not yet connected");this.socket.disconnect(),this.eventProducerListener&&this.eventProducerListener.complete(),this.disconnected=!0}queueRequest(e){if(this.disconnected)throw Error("Cannot queue request: socket has disconnected");this.socket.queueRequest(e)}constructor(e,t=1e4,r){this.unconnected=!0,this.disconnected=!1,this.timeoutIndex=0,this.reconnectTimeout=null;let a={start:e=>this.eventProducerListener=e,stop:()=>this.eventProducerListener=void 0};this.events=n.Stream.create(a),this.socket=new i.QueueingStreamingSocket(e,t,r),this.socket.events.subscribe({next:e=>{this.eventProducerListener&&this.eventProducerListener.next(e)},error:e=>{this.eventProducerListener&&this.eventProducerListener.error(e)}}),this.connectionStatus=this.socket.connectionStatus,this.connectionStatus.updates.subscribe({next:e=>{e===i.ConnectionStatus.Connected&&(this.timeoutIndex=0),e===i.ConnectionStatus.Disconnected&&(this.reconnectTimeout&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=null),this.reconnectTimeout=setTimeout(()=>this.socket.reconnect(),o.calculateTimeout(this.timeoutIndex++)))}})}}t.ReconnectingSocket=o},19866:function(e,t,r){"use strict";var n=r(49079),i=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.SocketWrapper=void 0;let o=i(r(66337));function a(){return void 0!==n&&void 0!==n.versions&&void 0!==n.versions.node}class s{connect(){let e=new o.default(this.url);e.onerror=e=>{this.clearTimeout(),this.errorHandler&&this.errorHandler(e)},e.onmessage=e=>{this.messageHandler({type:e.type,data:e.data})},e.onopen=e=>{this.clearTimeout(),this.connectedResolver(),this.openHandler&&this.openHandler()},e.onclose=e=>{this.closed=!0,this.closeHandler&&this.closeHandler(e)};let t=Date.now();this.timeoutId=setTimeout(()=>{e.onmessage=()=>0,e.onerror=()=>0,e.onopen=()=>0,e.onclose=()=>0,e.close(),this.socket=void 0;let r=Math.floor(Date.now()-t);this.connectedRejecter("Connection attempt timed out after ".concat(r," ms"))},this.timeout),this.socket=e}disconnect(){if(!this.socket)throw Error("Socket undefined. This must be called after connecting.");switch(this.clearTimeout(),this.socket.readyState){case o.default.OPEN:this.socket.close(1e3);break;case o.default.CLOSED:break;case o.default.CONNECTING:this.socket.onopen=()=>0,this.socket.onclose=()=>0,this.socket.onerror=()=>0,this.socket.onmessage=()=>0,this.socket=void 0,this.closeHandler&&this.closeHandler({wasClean:!1,code:4001});break;case o.default.CLOSING:break;default:throw Error("Unknown readyState: ".concat(this.socket.readyState))}}async send(e){return new Promise((t,r)=>{if(!this.socket)throw Error("Socket undefined. This must be called after connecting.");if(this.closed)throw Error("Socket was closed, so no data can be sent anymore.");if(this.socket.readyState!==o.default.OPEN)throw Error("Websocket is not open");a()?this.socket.send(e,e=>e?r(e):t()):(this.socket.send(e),t())})}clearTimeout(){if(!this.timeoutId)throw Error("Timeout ID not set. This should not happen and usually means connect() was not called.");clearTimeout(this.timeoutId)}constructor(e,t,r,n,i,o=1e4){this.closed=!1,this.connected=new Promise((e,t)=>{this.connectedResolver=e,this.connectedRejecter=t}),this.url=e,this.messageHandler=t,this.errorHandler=r,this.openHandler=n,this.closeHandler=i,this.timeout=o}}t.SocketWrapper=s},87903:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StreamingSocket=void 0;let n=r(78518),i=r(19866);class o{connect(){this.socket.connect()}disconnect(){this.socket.disconnect()}async send(e){return this.socket.send(e)}constructor(e,t=1e4){this.socket=new i.SocketWrapper(e,e=>{this.eventProducerListener&&this.eventProducerListener.next(e)},e=>{this.eventProducerListener&&this.eventProducerListener.error(e)},()=>{},e=>{this.eventProducerListener&&(e.wasClean?this.eventProducerListener.complete():this.eventProducerListener.error("Socket was closed unclean"))},t),this.connected=this.socket.connected;let r={start:e=>this.eventProducerListener=e,stop:()=>this.eventProducerListener=void 0};this.events=n.Stream.create(r)}}t.StreamingSocket=o},5491:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.accountFromAny=void 0;let n=r(35801),i=r(18722),o=r(67357),a=r(54910),s=r(18855);function l(e){return n.Uint64.fromString(e.toString())}function u(e){let{address:t,pubKey:r,accountNumber:n,sequence:o}=e;return{address:t,pubkey:(0,i.decodeOptionalPubkey)(r),accountNumber:l(n).toNumber(),sequence:l(o).toNumber()}}function d(e){var t,r,n,i,l,d,c;let{typeUrl:p,value:f}=e;switch(p){case"/cosmos.auth.v1beta1.BaseAccount":return u(a.BaseAccount.decode(f));case"/cosmos.auth.v1beta1.ModuleAccount":{let e=a.ModuleAccount.decode(f).baseAccount;return(0,o.assert)(e),u(e)}case"/cosmos.vesting.v1beta1.BaseVestingAccount":{let e=null===(t=s.BaseVestingAccount.decode(f))||void 0===t?void 0:t.baseAccount;return(0,o.assert)(e),u(e)}case"/cosmos.vesting.v1beta1.ContinuousVestingAccount":{let e=null===(n=s.ContinuousVestingAccount.decode(f))||void 0===n?void 0:null===(r=n.baseVestingAccount)||void 0===r?void 0:r.baseAccount;return(0,o.assert)(e),u(e)}case"/cosmos.vesting.v1beta1.DelayedVestingAccount":{let e=null===(l=s.DelayedVestingAccount.decode(f))||void 0===l?void 0:null===(i=l.baseVestingAccount)||void 0===i?void 0:i.baseAccount;return(0,o.assert)(e),u(e)}case"/cosmos.vesting.v1beta1.PeriodicVestingAccount":{let e=null===(c=s.PeriodicVestingAccount.decode(f))||void 0===c?void 0:null===(d=c.baseVestingAccount)||void 0===d?void 0:d.baseAccount;return(0,o.assert)(e),u(e)}default:throw Error("Unsupported type: '".concat(p,"'"))}}t.accountFromAny=d},23478:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AminoTypes=void 0;class r{toAmino(e){let{typeUrl:t,value:r}=e,n=this.register[t];if(!n)throw Error("Type URL '".concat(t,"' does not exist in the Amino message type register. ")+"If you need support for this message type, you can pass in additional entries to the AminoTypes constructor. If you think this message type should be included by default, please open an issue at https://github.com/cosmos/cosmjs/issues.");return{type:n.aminoType,value:n.toAmino(r)}}fromAmino(e){let{type:t,value:r}=e,n=Object.entries(this.register).filter(e=>{let[r,{aminoType:n}]=e;return n===t});switch(n.length){case 0:throw Error("Amino type identifier '".concat(t,"' does not exist in the Amino message type register. ")+"If you need support for this message type, you can pass in additional entries to the AminoTypes constructor. If you think this message type should be included by default, please open an issue at https://github.com/cosmos/cosmjs/issues.");case 1:{let[e,t]=n[0];return{typeUrl:e,value:t.fromAmino(r)}}default:throw Error("Multiple types are registered with Amino type identifier '".concat(t,"': '")+n.map(e=>{let[t,r]=e;return t}).sort().join("', '")+"'. Thus fromAmino cannot be performed.")}}constructor(e){this.register=e}}t.AminoTypes=r},61115:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fromTendermintEvent=void 0;let n=r(69721);function i(e){return{type:e.type,attributes:e.attributes.map(e=>({key:"string"==typeof e.key?e.key:(0,n.fromUtf8)(e.key,!0),value:"string"==typeof e.value?e.value:(0,n.fromUtf8)(e.value,!0)}))}}t.fromTendermintEvent=i},10312:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.calculateFee=t.GasPrice=void 0;let n=r(35801),i=r(18722);function o(e){if(e.length<3||e.length>128)throw Error("Denom must be between 3 and 128 characters")}class a{static fromString(e){let t=e.match(/^([0-9.]+)([a-zA-Z][a-zA-Z0-9/:._-]*)$/);if(!t)throw Error("Invalid gas price string");let[r,i,s]=t;o(s);let l=18;return new a(n.Decimal.fromUserInput(i,l),s)}toString(){return this.amount.toString()+this.denom}constructor(e,t){this.amount=e,this.denom=t}}function s(e,t){let{denom:r,amount:o}="string"==typeof t?a.fromString(t):t,s=o.multiply(new n.Uint53(e)).ceil().toString();return{amount:(0,i.coins)(s,r),gas:e.toString()}}t.GasPrice=a,t.calculateFee=s},58015:function(e,t,r){"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.isMsgWithdrawDelegatorRewardEncodeObject=t.isMsgVoteWeightedEncodeObject=t.isMsgVoteEncodeObject=t.isMsgUndelegateEncodeObject=t.isMsgTransferEncodeObject=t.isMsgSubmitProposalEncodeObject=t.isMsgSendEncodeObject=t.isMsgEditValidatorEncodeObject=t.isMsgDepositEncodeObject=t.isMsgDelegateEncodeObject=t.isMsgCreateValidatorEncodeObject=t.isMsgBeginRedelegateEncodeObject=t.isAminoMsgWithdrawValidatorCommission=t.isAminoMsgWithdrawDelegatorReward=t.isAminoMsgVoteWeighted=t.isAminoMsgVote=t.isAminoMsgVerifyInvariant=t.isAminoMsgUnjail=t.isAminoMsgUndelegate=t.isAminoMsgTransfer=t.isAminoMsgSubmitProposal=t.isAminoMsgSubmitEvidence=t.isAminoMsgSetWithdrawAddress=t.isAminoMsgSend=t.isAminoMsgMultiSend=t.isAminoMsgFundCommunityPool=t.isAminoMsgEditValidator=t.isAminoMsgDeposit=t.isAminoMsgDelegate=t.isAminoMsgCreateVestingAccount=t.isAminoMsgCreateValidator=t.isAminoMsgBeginRedelegate=t.createVestingAminoConverters=t.createStakingAminoConverters=t.createSlashingAminoConverters=t.createIbcAminoConverters=t.createGroupAminoConverters=t.createGovAminoConverters=t.createFeegrantAminoConverters=t.createEvidenceAminoConverters=t.createDistributionAminoConverters=t.createCrysisAminoConverters=t.createBankAminoConverters=t.createAuthzAminoConverters=t.logs=t.GasPrice=t.calculateFee=t.fromTendermintEvent=t.AminoTypes=t.accountFromAny=void 0,t.parseCoins=t.makeCosmoshubPath=t.coins=t.coin=t.TimeoutError=t.StargateClient=t.isDeliverTxSuccess=t.isDeliverTxFailure=t.BroadcastTxError=t.assertIsDeliverTxSuccess=t.assertIsDeliverTxFailure=t.SigningStargateClient=t.defaultRegistryTypes=t.createDefaultAminoConverters=t.isSearchTxQueryArray=t.QueryClient=t.decodeCosmosSdkDecFromProto=t.createProtobufRpcClient=t.createPagination=t.makeMultisignedTxBytes=t.makeMultisignedTx=t.setupTxExtension=t.setupStakingExtension=t.setupSlashingExtension=t.setupMintExtension=t.setupIbcExtension=t.setupGovExtension=t.setupFeegrantExtension=t.setupDistributionExtension=t.setupBankExtension=t.setupAuthzExtension=t.setupAuthExtension=void 0;var a=r(5491);Object.defineProperty(t,"accountFromAny",{enumerable:!0,get:function(){return a.accountFromAny}});var s=r(23478);Object.defineProperty(t,"AminoTypes",{enumerable:!0,get:function(){return s.AminoTypes}});var l=r(61115);Object.defineProperty(t,"fromTendermintEvent",{enumerable:!0,get:function(){return l.fromTendermintEvent}});var u=r(10312);Object.defineProperty(t,"calculateFee",{enumerable:!0,get:function(){return u.calculateFee}}),Object.defineProperty(t,"GasPrice",{enumerable:!0,get:function(){return u.GasPrice}}),t.logs=o(r(58141));var d=r(19938);Object.defineProperty(t,"createAuthzAminoConverters",{enumerable:!0,get:function(){return d.createAuthzAminoConverters}}),Object.defineProperty(t,"createBankAminoConverters",{enumerable:!0,get:function(){return d.createBankAminoConverters}}),Object.defineProperty(t,"createCrysisAminoConverters",{enumerable:!0,get:function(){return d.createCrysisAminoConverters}}),Object.defineProperty(t,"createDistributionAminoConverters",{enumerable:!0,get:function(){return d.createDistributionAminoConverters}}),Object.defineProperty(t,"createEvidenceAminoConverters",{enumerable:!0,get:function(){return d.createEvidenceAminoConverters}}),Object.defineProperty(t,"createFeegrantAminoConverters",{enumerable:!0,get:function(){return d.createFeegrantAminoConverters}}),Object.defineProperty(t,"createGovAminoConverters",{enumerable:!0,get:function(){return d.createGovAminoConverters}}),Object.defineProperty(t,"createGroupAminoConverters",{enumerable:!0,get:function(){return d.createGroupAminoConverters}}),Object.defineProperty(t,"createIbcAminoConverters",{enumerable:!0,get:function(){return d.createIbcAminoConverters}}),Object.defineProperty(t,"createSlashingAminoConverters",{enumerable:!0,get:function(){return d.createSlashingAminoConverters}}),Object.defineProperty(t,"createStakingAminoConverters",{enumerable:!0,get:function(){return d.createStakingAminoConverters}}),Object.defineProperty(t,"createVestingAminoConverters",{enumerable:!0,get:function(){return d.createVestingAminoConverters}}),Object.defineProperty(t,"isAminoMsgBeginRedelegate",{enumerable:!0,get:function(){return d.isAminoMsgBeginRedelegate}}),Object.defineProperty(t,"isAminoMsgCreateValidator",{enumerable:!0,get:function(){return d.isAminoMsgCreateValidator}}),Object.defineProperty(t,"isAminoMsgCreateVestingAccount",{enumerable:!0,get:function(){return d.isAminoMsgCreateVestingAccount}}),Object.defineProperty(t,"isAminoMsgDelegate",{enumerable:!0,get:function(){return d.isAminoMsgDelegate}}),Object.defineProperty(t,"isAminoMsgDeposit",{enumerable:!0,get:function(){return d.isAminoMsgDeposit}}),Object.defineProperty(t,"isAminoMsgEditValidator",{enumerable:!0,get:function(){return d.isAminoMsgEditValidator}}),Object.defineProperty(t,"isAminoMsgFundCommunityPool",{enumerable:!0,get:function(){return d.isAminoMsgFundCommunityPool}}),Object.defineProperty(t,"isAminoMsgMultiSend",{enumerable:!0,get:function(){return d.isAminoMsgMultiSend}}),Object.defineProperty(t,"isAminoMsgSend",{enumerable:!0,get:function(){return d.isAminoMsgSend}}),Object.defineProperty(t,"isAminoMsgSetWithdrawAddress",{enumerable:!0,get:function(){return d.isAminoMsgSetWithdrawAddress}}),Object.defineProperty(t,"isAminoMsgSubmitEvidence",{enumerable:!0,get:function(){return d.isAminoMsgSubmitEvidence}}),Object.defineProperty(t,"isAminoMsgSubmitProposal",{enumerable:!0,get:function(){return d.isAminoMsgSubmitProposal}}),Object.defineProperty(t,"isAminoMsgTransfer",{enumerable:!0,get:function(){return d.isAminoMsgTransfer}}),Object.defineProperty(t,"isAminoMsgUndelegate",{enumerable:!0,get:function(){return d.isAminoMsgUndelegate}}),Object.defineProperty(t,"isAminoMsgUnjail",{enumerable:!0,get:function(){return d.isAminoMsgUnjail}}),Object.defineProperty(t,"isAminoMsgVerifyInvariant",{enumerable:!0,get:function(){return d.isAminoMsgVerifyInvariant}}),Object.defineProperty(t,"isAminoMsgVote",{enumerable:!0,get:function(){return d.isAminoMsgVote}}),Object.defineProperty(t,"isAminoMsgVoteWeighted",{enumerable:!0,get:function(){return d.isAminoMsgVoteWeighted}}),Object.defineProperty(t,"isAminoMsgWithdrawDelegatorReward",{enumerable:!0,get:function(){return d.isAminoMsgWithdrawDelegatorReward}}),Object.defineProperty(t,"isAminoMsgWithdrawValidatorCommission",{enumerable:!0,get:function(){return d.isAminoMsgWithdrawValidatorCommission}}),Object.defineProperty(t,"isMsgBeginRedelegateEncodeObject",{enumerable:!0,get:function(){return d.isMsgBeginRedelegateEncodeObject}}),Object.defineProperty(t,"isMsgCreateValidatorEncodeObject",{enumerable:!0,get:function(){return d.isMsgCreateValidatorEncodeObject}}),Object.defineProperty(t,"isMsgDelegateEncodeObject",{enumerable:!0,get:function(){return d.isMsgDelegateEncodeObject}}),Object.defineProperty(t,"isMsgDepositEncodeObject",{enumerable:!0,get:function(){return d.isMsgDepositEncodeObject}}),Object.defineProperty(t,"isMsgEditValidatorEncodeObject",{enumerable:!0,get:function(){return d.isMsgEditValidatorEncodeObject}}),Object.defineProperty(t,"isMsgSendEncodeObject",{enumerable:!0,get:function(){return d.isMsgSendEncodeObject}}),Object.defineProperty(t,"isMsgSubmitProposalEncodeObject",{enumerable:!0,get:function(){return d.isMsgSubmitProposalEncodeObject}}),Object.defineProperty(t,"isMsgTransferEncodeObject",{enumerable:!0,get:function(){return d.isMsgTransferEncodeObject}}),Object.defineProperty(t,"isMsgUndelegateEncodeObject",{enumerable:!0,get:function(){return d.isMsgUndelegateEncodeObject}}),Object.defineProperty(t,"isMsgVoteEncodeObject",{enumerable:!0,get:function(){return d.isMsgVoteEncodeObject}}),Object.defineProperty(t,"isMsgVoteWeightedEncodeObject",{enumerable:!0,get:function(){return d.isMsgVoteWeightedEncodeObject}}),Object.defineProperty(t,"isMsgWithdrawDelegatorRewardEncodeObject",{enumerable:!0,get:function(){return d.isMsgWithdrawDelegatorRewardEncodeObject}}),Object.defineProperty(t,"setupAuthExtension",{enumerable:!0,get:function(){return d.setupAuthExtension}}),Object.defineProperty(t,"setupAuthzExtension",{enumerable:!0,get:function(){return d.setupAuthzExtension}}),Object.defineProperty(t,"setupBankExtension",{enumerable:!0,get:function(){return d.setupBankExtension}}),Object.defineProperty(t,"setupDistributionExtension",{enumerable:!0,get:function(){return d.setupDistributionExtension}}),Object.defineProperty(t,"setupFeegrantExtension",{enumerable:!0,get:function(){return d.setupFeegrantExtension}}),Object.defineProperty(t,"setupGovExtension",{enumerable:!0,get:function(){return d.setupGovExtension}}),Object.defineProperty(t,"setupIbcExtension",{enumerable:!0,get:function(){return d.setupIbcExtension}}),Object.defineProperty(t,"setupMintExtension",{enumerable:!0,get:function(){return d.setupMintExtension}}),Object.defineProperty(t,"setupSlashingExtension",{enumerable:!0,get:function(){return d.setupSlashingExtension}}),Object.defineProperty(t,"setupStakingExtension",{enumerable:!0,get:function(){return d.setupStakingExtension}}),Object.defineProperty(t,"setupTxExtension",{enumerable:!0,get:function(){return d.setupTxExtension}});var c=r(88080);Object.defineProperty(t,"makeMultisignedTx",{enumerable:!0,get:function(){return c.makeMultisignedTx}}),Object.defineProperty(t,"makeMultisignedTxBytes",{enumerable:!0,get:function(){return c.makeMultisignedTxBytes}});var p=r(71185);Object.defineProperty(t,"createPagination",{enumerable:!0,get:function(){return p.createPagination}}),Object.defineProperty(t,"createProtobufRpcClient",{enumerable:!0,get:function(){return p.createProtobufRpcClient}}),Object.defineProperty(t,"decodeCosmosSdkDecFromProto",{enumerable:!0,get:function(){return p.decodeCosmosSdkDecFromProto}}),Object.defineProperty(t,"QueryClient",{enumerable:!0,get:function(){return p.QueryClient}});var f=r(66750);Object.defineProperty(t,"isSearchTxQueryArray",{enumerable:!0,get:function(){return f.isSearchTxQueryArray}});var h=r(54449);Object.defineProperty(t,"createDefaultAminoConverters",{enumerable:!0,get:function(){return h.createDefaultAminoConverters}}),Object.defineProperty(t,"defaultRegistryTypes",{enumerable:!0,get:function(){return h.defaultRegistryTypes}}),Object.defineProperty(t,"SigningStargateClient",{enumerable:!0,get:function(){return h.SigningStargateClient}});var g=r(25087);Object.defineProperty(t,"assertIsDeliverTxFailure",{enumerable:!0,get:function(){return g.assertIsDeliverTxFailure}}),Object.defineProperty(t,"assertIsDeliverTxSuccess",{enumerable:!0,get:function(){return g.assertIsDeliverTxSuccess}}),Object.defineProperty(t,"BroadcastTxError",{enumerable:!0,get:function(){return g.BroadcastTxError}}),Object.defineProperty(t,"isDeliverTxFailure",{enumerable:!0,get:function(){return g.isDeliverTxFailure}}),Object.defineProperty(t,"isDeliverTxSuccess",{enumerable:!0,get:function(){return g.isDeliverTxSuccess}}),Object.defineProperty(t,"StargateClient",{enumerable:!0,get:function(){return g.StargateClient}}),Object.defineProperty(t,"TimeoutError",{enumerable:!0,get:function(){return g.TimeoutError}});var m=r(18722);Object.defineProperty(t,"coin",{enumerable:!0,get:function(){return m.coin}}),Object.defineProperty(t,"coins",{enumerable:!0,get:function(){return m.coins}}),Object.defineProperty(t,"makeCosmoshubPath",{enumerable:!0,get:function(){return m.makeCosmoshubPath}}),Object.defineProperty(t,"parseCoins",{enumerable:!0,get:function(){return m.parseCoins}})},58141:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findAttribute=t.parseRawLog=t.parseLogs=t.parseLog=t.parseEvent=t.parseAttribute=void 0;let n=r(67357);function i(e){if(!(0,n.isNonNullObject)(e))throw Error("Attribute must be a non-null object");let{key:t,value:r}=e;if("string"!=typeof t||!t)throw Error("Attribute's key must be a non-empty string");if("string"!=typeof r&&void 0!==r)throw Error("Attribute's value must be a string or unset");return{key:t,value:r||""}}function o(e){if(!(0,n.isNonNullObject)(e))throw Error("Event must be a non-null object");let{type:t,attributes:r}=e;if("string"!=typeof t||""===t)throw Error("Event type must be a non-empty string");if(!Array.isArray(r))throw Error("Event's attributes must be an array");return{type:t,attributes:r.map(i)}}function a(e){if(!(0,n.isNonNullObject)(e))throw Error("Log must be a non-null object");let{msg_index:t,log:r,events:i}=e;if("number"!=typeof t)throw Error("Log's msg_index must be a number");if("string"!=typeof r)throw Error("Log's log must be a string");if(!Array.isArray(i))throw Error("Log's events must be an array");return{msg_index:t,log:r,events:i.map(o)}}function s(e){if(!Array.isArray(e))throw Error("Logs must be an array");return e.map(a)}function l(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"[]";return s(JSON.parse(e).map((e,t)=>{let{events:r}=e;return{msg_index:t,events:r,log:""}}))}function u(e,t,r){var n;let i=e.find(()=>!0),o=null==i?void 0:null===(n=i.events.find(e=>e.type===t))||void 0===n?void 0:n.attributes.find(e=>e.key===r);if(!o)throw Error("Could not find attribute '".concat(r,"' in first event of type '").concat(t,"' in first log."));return o}t.parseAttribute=i,t.parseEvent=o,t.parseLog=a,t.parseLogs=s,t.parseRawLog=l,t.findAttribute=u},16421:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setupAuthExtension=void 0;let n=r(37547),i=r(71185);function o(e){let t=(0,i.createProtobufRpcClient)(e),r=new n.QueryClientImpl(t);return{auth:{account:async e=>{let{account:t}=await r.Account({address:e});return null!=t?t:null}}}}t.setupAuthExtension=o},68254:function(e,t){"use strict";function r(){return{}}Object.defineProperty(t,"__esModule",{value:!0}),t.createAuthzAminoConverters=void 0,t.createAuthzAminoConverters=r},69849:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.authzTypes=void 0;let n=r(97481);t.authzTypes=[["/cosmos.authz.v1beta1.MsgExec",n.MsgExec],["/cosmos.authz.v1beta1.MsgGrant",n.MsgGrant],["/cosmos.authz.v1beta1.MsgRevoke",n.MsgRevoke]]},80202:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setupAuthzExtension=void 0;let n=r(629),i=r(71185);function o(e){let t=(0,i.createProtobufRpcClient)(e),r=new n.QueryClientImpl(t);return{authz:{grants:async(e,t,n,o)=>await r.Grants({granter:e,grantee:t,msgTypeUrl:n,pagination:(0,i.createPagination)(o)}),granteeGrants:async(e,t)=>await r.GranteeGrants({grantee:e,pagination:(0,i.createPagination)(t)}),granterGrants:async(e,t)=>await r.GranterGrants({granter:e,pagination:(0,i.createPagination)(t)})}}}t.setupAuthzExtension=o},54738:function(e,t){"use strict";function r(e){return"cosmos-sdk/MsgSend"===e.type}function n(e){return"cosmos-sdk/MsgMultiSend"===e.type}function i(){return{"/cosmos.bank.v1beta1.MsgSend":{aminoType:"cosmos-sdk/MsgSend",toAmino:e=>{let{fromAddress:t,toAddress:r,amount:n}=e;return{from_address:t,to_address:r,amount:[...n]}},fromAmino:e=>{let{from_address:t,to_address:r,amount:n}=e;return{fromAddress:t,toAddress:r,amount:[...n]}}},"/cosmos.bank.v1beta1.MsgMultiSend":{aminoType:"cosmos-sdk/MsgMultiSend",toAmino:e=>{let{inputs:t,outputs:r}=e;return{inputs:t.map(e=>({address:e.address,coins:[...e.coins]})),outputs:r.map(e=>({address:e.address,coins:[...e.coins]}))}},fromAmino:e=>{let{inputs:t,outputs:r}=e;return{inputs:t.map(e=>({address:e.address,coins:[...e.coins]})),outputs:r.map(e=>({address:e.address,coins:[...e.coins]}))}}}}}Object.defineProperty(t,"__esModule",{value:!0}),t.createBankAminoConverters=t.isAminoMsgMultiSend=t.isAminoMsgSend=void 0,t.isAminoMsgSend=r,t.isAminoMsgMultiSend=n,t.createBankAminoConverters=i},46914:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isMsgSendEncodeObject=t.bankTypes=void 0;let n=r(45413);function i(e){return"/cosmos.bank.v1beta1.MsgSend"===e.typeUrl}t.bankTypes=[["/cosmos.bank.v1beta1.MsgMultiSend",n.MsgMultiSend],["/cosmos.bank.v1beta1.MsgSend",n.MsgSend]],t.isMsgSendEncodeObject=i},31199:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setupBankExtension=void 0;let n=r(67357),i=r(4818),o=r(71185);function a(e){let t=(0,o.createProtobufRpcClient)(e),r=new i.QueryClientImpl(t);return{bank:{balance:async(e,t)=>{let{balance:i}=await r.Balance({address:e,denom:t});return(0,n.assert)(i),i},allBalances:async e=>{let{balances:t}=await r.AllBalances(i.QueryAllBalancesRequest.fromPartial({address:e}));return t},totalSupply:async e=>await r.TotalSupply({pagination:(0,o.createPagination)(e)}),supplyOf:async e=>{let{amount:t}=await r.SupplyOf({denom:e});return(0,n.assert)(t),t},denomMetadata:async e=>{let{metadata:t}=await r.DenomMetadata({denom:e});return(0,n.assert)(t),t},denomsMetadata:async()=>{let{metadatas:e}=await r.DenomsMetadata(i.QueryDenomsMetadataRequest.fromPartial({pagination:void 0}));return e}}}}t.setupBankExtension=a},3482:function(e,t){"use strict";function r(e){return"cosmos-sdk/MsgVerifyInvariant"===e.type}function n(){throw Error("Not implemented")}Object.defineProperty(t,"__esModule",{value:!0}),t.createCrysisAminoConverters=t.isAminoMsgVerifyInvariant=void 0,t.isAminoMsgVerifyInvariant=r,t.createCrysisAminoConverters=n},13944:function(e,t){"use strict";function r(e){return"cosmos-sdk/MsgModifyWithdrawAddress"===e.type}function n(e){return"cosmos-sdk/MsgWithdrawDelegationReward"===e.type}function i(e){return"cosmos-sdk/MsgWithdrawValidatorCommission"===e.type}function o(e){return"cosmos-sdk/MsgFundCommunityPool"===e.type}function a(){return{"/cosmos.distribution.v1beta1.MsgFundCommunityPool":{aminoType:"cosmos-sdk/MsgFundCommunityPool",toAmino:e=>{let{amount:t,depositor:r}=e;return{amount:[...t],depositor:r}},fromAmino:e=>{let{amount:t,depositor:r}=e;return{amount:[...t],depositor:r}}},"/cosmos.distribution.v1beta1.MsgSetWithdrawAddress":{aminoType:"cosmos-sdk/MsgModifyWithdrawAddress",toAmino:e=>{let{delegatorAddress:t,withdrawAddress:r}=e;return{delegator_address:t,withdraw_address:r}},fromAmino:e=>{let{delegator_address:t,withdraw_address:r}=e;return{delegatorAddress:t,withdrawAddress:r}}},"/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward":{aminoType:"cosmos-sdk/MsgWithdrawDelegationReward",toAmino:e=>{let{delegatorAddress:t,validatorAddress:r}=e;return{delegator_address:t,validator_address:r}},fromAmino:e=>{let{delegator_address:t,validator_address:r}=e;return{delegatorAddress:t,validatorAddress:r}}},"/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission":{aminoType:"cosmos-sdk/MsgWithdrawValidatorCommission",toAmino:e=>{let{validatorAddress:t}=e;return{validator_address:t}},fromAmino:e=>{let{validator_address:t}=e;return{validatorAddress:t}}}}}Object.defineProperty(t,"__esModule",{value:!0}),t.createDistributionAminoConverters=t.isAminoMsgFundCommunityPool=t.isAminoMsgWithdrawValidatorCommission=t.isAminoMsgWithdrawDelegatorReward=t.isAminoMsgSetWithdrawAddress=void 0,t.isAminoMsgSetWithdrawAddress=r,t.isAminoMsgWithdrawDelegatorReward=n,t.isAminoMsgWithdrawValidatorCommission=i,t.isAminoMsgFundCommunityPool=o,t.createDistributionAminoConverters=a},34302:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isMsgWithdrawDelegatorRewardEncodeObject=t.distributionTypes=void 0;let n=r(53856);function i(e){return"/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward"===e.typeUrl}t.distributionTypes=[["/cosmos.distribution.v1beta1.MsgFundCommunityPool",n.MsgFundCommunityPool],["/cosmos.distribution.v1beta1.MsgSetWithdrawAddress",n.MsgSetWithdrawAddress],["/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward",n.MsgWithdrawDelegatorReward],["/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission",n.MsgWithdrawValidatorCommission]],t.isMsgWithdrawDelegatorRewardEncodeObject=i},52554:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setupDistributionExtension=void 0;let n=r(91029),i=r(71185);function o(e){let t=(0,i.createProtobufRpcClient)(e),r=new n.QueryClientImpl(t);return{distribution:{communityPool:async()=>await r.CommunityPool({}),delegationRewards:async(e,t)=>await r.DelegationRewards({delegatorAddress:e,validatorAddress:t}),delegationTotalRewards:async e=>await r.DelegationTotalRewards({delegatorAddress:e}),delegatorValidators:async e=>await r.DelegatorValidators({delegatorAddress:e}),delegatorWithdrawAddress:async e=>await r.DelegatorWithdrawAddress({delegatorAddress:e}),params:async()=>await r.Params({}),validatorCommission:async e=>await r.ValidatorCommission({validatorAddress:e}),validatorOutstandingRewards:async e=>await r.ValidatorOutstandingRewards({validatorAddress:e}),validatorSlashes:async(e,t,n,o)=>await r.ValidatorSlashes({validatorAddress:e,startingHeight:BigInt(t),endingHeight:BigInt(n),pagination:(0,i.createPagination)(o)})}}}t.setupDistributionExtension=o},6779:function(e,t){"use strict";function r(e){return"cosmos-sdk/MsgSubmitEvidence"===e.type}function n(){throw Error("Not implemented")}Object.defineProperty(t,"__esModule",{value:!0}),t.createEvidenceAminoConverters=t.isAminoMsgSubmitEvidence=void 0,t.isAminoMsgSubmitEvidence=r,t.createEvidenceAminoConverters=n},98732:function(e,t){"use strict";function r(){return{}}Object.defineProperty(t,"__esModule",{value:!0}),t.createFeegrantAminoConverters=void 0,t.createFeegrantAminoConverters=r},42051:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.feegrantTypes=void 0;let n=r(2034);t.feegrantTypes=[["/cosmos.feegrant.v1beta1.MsgGrantAllowance",n.MsgGrantAllowance],["/cosmos.feegrant.v1beta1.MsgRevokeAllowance",n.MsgRevokeAllowance]]},1277:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setupFeegrantExtension=void 0;let n=r(75122),i=r(71185);function o(e){let t=(0,i.createProtobufRpcClient)(e),r=new n.QueryClientImpl(t);return{feegrant:{allowance:async(e,t)=>await r.Allowance({granter:e,grantee:t}),allowances:async(e,t)=>await r.Allowances({grantee:e,pagination:(0,i.createPagination)(t)})}}}t.setupFeegrantExtension=o},40384:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createGovAminoConverters=t.isAminoMsgDeposit=t.isAminoMsgVoteWeighted=t.isAminoMsgVote=t.isAminoMsgSubmitProposal=void 0;let n=r(35801),i=r(67357),o=r(5309),a=r(11879),s=r(71185);function l(e){return"cosmos-sdk/MsgSubmitProposal"===e.type}function u(e){return"cosmos-sdk/MsgVote"===e.type}function d(e){return"cosmos-sdk/MsgVoteWeighted"===e.type}function c(e){return"cosmos-sdk/MsgDeposit"===e.type}function p(){return{"/cosmos.gov.v1beta1.MsgDeposit":{aminoType:"cosmos-sdk/MsgDeposit",toAmino:e=>{let{amount:t,depositor:r,proposalId:n}=e;return{amount:t,depositor:r,proposal_id:n.toString()}},fromAmino:e=>{let{amount:t,depositor:r,proposal_id:n}=e;return{amount:Array.from(t),depositor:r,proposalId:BigInt(n)}}},"/cosmos.gov.v1beta1.MsgVote":{aminoType:"cosmos-sdk/MsgVote",toAmino:e=>{let{option:t,proposalId:r,voter:n}=e;return{option:t,proposal_id:r.toString(),voter:n}},fromAmino:e=>{let{option:t,proposal_id:r,voter:n}=e;return{option:(0,o.voteOptionFromJSON)(t),proposalId:BigInt(r),voter:n}}},"/cosmos.gov.v1beta1.MsgVoteWeighted":{aminoType:"cosmos-sdk/MsgVoteWeighted",toAmino:e=>{let{options:t,proposalId:r,voter:n}=e;return{options:t.map(e=>({option:e.option,weight:(0,s.decodeCosmosSdkDecFromProto)(e.weight).toString().padEnd(20,"0")})),proposal_id:r.toString(),voter:n}},fromAmino:e=>{let{options:t,proposal_id:r,voter:i}=e;return{proposalId:BigInt(r),voter:i,options:t.map(e=>({option:(0,o.voteOptionFromJSON)(e.option),weight:n.Decimal.fromUserInput(e.weight,18).atomics}))}}},"/cosmos.gov.v1beta1.MsgSubmitProposal":{aminoType:"cosmos-sdk/MsgSubmitProposal",toAmino:e=>{let t,{initialDeposit:r,proposer:n,content:a}=e;if((0,i.assertDefinedAndNotNull)(a),"/cosmos.gov.v1beta1.TextProposal"===a.typeUrl){let e=o.TextProposal.decode(a.value);t={type:"cosmos-sdk/TextProposal",value:{description:e.description,title:e.title}}}else throw Error("Unsupported proposal type: '".concat(a.typeUrl,"'"));return{initial_deposit:r,proposer:n,content:t}},fromAmino:e=>{let t,{initial_deposit:r,proposer:n,content:s}=e;if("cosmos-sdk/TextProposal"===s.type){let{value:e}=s;(0,i.assert)((0,i.isNonNullObject)(e));let{title:r,description:n}=e;(0,i.assert)("string"==typeof r),(0,i.assert)("string"==typeof n),t=a.Any.fromPartial({typeUrl:"/cosmos.gov.v1beta1.TextProposal",value:o.TextProposal.encode(o.TextProposal.fromPartial({title:r,description:n})).finish()})}else throw Error("Unsupported proposal type: '".concat(s.type,"'"));return{initialDeposit:Array.from(r),proposer:n,content:t}}}}}t.isAminoMsgSubmitProposal=l,t.isAminoMsgVote=u,t.isAminoMsgVoteWeighted=d,t.isAminoMsgDeposit=c,t.createGovAminoConverters=p},50804:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isMsgVoteWeightedEncodeObject=t.isMsgVoteEncodeObject=t.isMsgSubmitProposalEncodeObject=t.isMsgDepositEncodeObject=t.govTypes=void 0;let n=r(98743),i=r(76925);function o(e){return"/cosmos.gov.v1beta1.MsgDeposit"===e.typeUrl}function a(e){return"/cosmos.gov.v1beta1.MsgSubmitProposal"===e.typeUrl}function s(e){return"/cosmos.gov.v1beta1.MsgVote"===e.typeUrl}function l(e){return"/cosmos.gov.v1beta1.MsgVoteWeighted"===e.typeUrl}t.govTypes=[["/cosmos.gov.v1.MsgDeposit",n.MsgDeposit],["/cosmos.gov.v1.MsgSubmitProposal",n.MsgSubmitProposal],["/cosmos.gov.v1.MsgUpdateParams",n.MsgUpdateParams],["/cosmos.gov.v1.MsgVote",n.MsgVote],["/cosmos.gov.v1.MsgVoteWeighted",n.MsgVoteWeighted],["/cosmos.gov.v1beta1.MsgDeposit",i.MsgDeposit],["/cosmos.gov.v1beta1.MsgSubmitProposal",i.MsgSubmitProposal],["/cosmos.gov.v1beta1.MsgVote",i.MsgVote],["/cosmos.gov.v1beta1.MsgVoteWeighted",i.MsgVoteWeighted]],t.isMsgDepositEncodeObject=o,t.isMsgSubmitProposalEncodeObject=a,t.isMsgVoteEncodeObject=s,t.isMsgVoteWeightedEncodeObject=l},52952:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setupGovExtension=void 0;let n=r(22962),i=r(71185);function o(e){let t=(0,i.createProtobufRpcClient)(e),r=new n.QueryClientImpl(t);return{gov:{params:async e=>await r.Params({paramsType:e}),proposals:async(e,t,n,o)=>await r.Proposals({proposalStatus:e,depositor:t,voter:n,pagination:(0,i.createPagination)(o)}),proposal:async e=>await r.Proposal({proposalId:(0,i.longify)(e)}),deposits:async(e,t)=>await r.Deposits({proposalId:(0,i.longify)(e),pagination:(0,i.createPagination)(t)}),deposit:async(e,t)=>await r.Deposit({proposalId:(0,i.longify)(e),depositor:t}),tally:async e=>await r.TallyResult({proposalId:(0,i.longify)(e)}),votes:async(e,t)=>await r.Votes({proposalId:(0,i.longify)(e),pagination:(0,i.createPagination)(t)}),vote:async(e,t)=>await r.Vote({proposalId:(0,i.longify)(e),voter:t})}}}t.setupGovExtension=o},87010:function(e,t){"use strict";function r(){return{}}Object.defineProperty(t,"__esModule",{value:!0}),t.createGroupAminoConverters=void 0,t.createGroupAminoConverters=r},30220:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.groupTypes=void 0;let n=r(51691);t.groupTypes=[["/cosmos.group.v1.MsgCreateGroup",n.MsgCreateGroup],["/cosmos.group.v1.MsgCreateGroupPolicy",n.MsgCreateGroupPolicy],["/cosmos.group.v1.MsgCreateGroupWithPolicy",n.MsgCreateGroupWithPolicy],["/cosmos.group.v1.MsgExec",n.MsgExec],["/cosmos.group.v1.MsgLeaveGroup",n.MsgLeaveGroup],["/cosmos.group.v1.MsgSubmitProposal",n.MsgSubmitProposal],["/cosmos.group.v1.MsgUpdateGroupAdmin",n.MsgUpdateGroupAdmin],["/cosmos.group.v1.MsgUpdateGroupMembers",n.MsgUpdateGroupMembers],["/cosmos.group.v1.MsgUpdateGroupMetadata",n.MsgUpdateGroupMetadata],["/cosmos.group.v1.MsgUpdateGroupPolicyAdmin",n.MsgUpdateGroupPolicyAdmin],["/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy",n.MsgUpdateGroupPolicyDecisionPolicy],["/cosmos.group.v1.MsgUpdateGroupPolicyMetadata",n.MsgUpdateGroupPolicyMetadata],["/cosmos.group.v1.MsgVote",n.MsgVote],["/cosmos.group.v1.MsgWithdrawProposal",n.MsgWithdrawProposal]]},6065:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createIbcAminoConverters=t.isAminoMsgTransfer=void 0;let n=r(83552),i=r(7337);function o(e){return"cosmos-sdk/MsgTransfer"===e.type}function a(){return{"/ibc.applications.transfer.v1.MsgTransfer":{aminoType:"cosmos-sdk/MsgTransfer",toAmino:e=>{var t,r,i;let{sourcePort:o,sourceChannel:a,token:s,sender:l,receiver:u,timeoutHeight:d,timeoutTimestamp:c,memo:p}=e;return{source_port:o,source_channel:a,token:s,sender:l,receiver:u,timeout_height:d?{revision_height:null===(t=(0,n.omitDefault)(d.revisionHeight))||void 0===t?void 0:t.toString(),revision_number:null===(r=(0,n.omitDefault)(d.revisionNumber))||void 0===r?void 0:r.toString()}:{},timeout_timestamp:null===(i=(0,n.omitDefault)(c))||void 0===i?void 0:i.toString(),memo:(0,n.omitDefault)(p)}},fromAmino:e=>{let{source_port:t,source_channel:r,token:n,sender:o,receiver:a,timeout_height:s,timeout_timestamp:l,memo:u}=e;return i.MsgTransfer.fromPartial({sourcePort:t,sourceChannel:r,token:n,sender:o,receiver:a,timeoutHeight:s?{revisionHeight:BigInt(s.revision_height||"0"),revisionNumber:BigInt(s.revision_number||"0")}:void 0,timeoutTimestamp:BigInt(l||"0"),memo:null!=u?u:""})}}}}t.isAminoMsgTransfer=o,t.createIbcAminoConverters=a},96239:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isMsgTransferEncodeObject=t.ibcTypes=void 0;let n=r(7337),i=r(52230),o=r(42274),a=r(17244);function s(e){return"/ibc.applications.transfer.v1.MsgTransfer"===e.typeUrl}t.ibcTypes=[["/ibc.applications.transfer.v1.MsgTransfer",n.MsgTransfer],["/ibc.core.channel.v1.MsgAcknowledgement",i.MsgAcknowledgement],["/ibc.core.channel.v1.MsgChannelCloseConfirm",i.MsgChannelCloseConfirm],["/ibc.core.channel.v1.MsgChannelCloseInit",i.MsgChannelCloseInit],["/ibc.core.channel.v1.MsgChannelOpenAck",i.MsgChannelOpenAck],["/ibc.core.channel.v1.MsgChannelOpenConfirm",i.MsgChannelOpenConfirm],["/ibc.core.channel.v1.MsgChannelOpenInit",i.MsgChannelOpenInit],["/ibc.core.channel.v1.MsgChannelOpenTry",i.MsgChannelOpenTry],["/ibc.core.channel.v1.MsgRecvPacket",i.MsgRecvPacket],["/ibc.core.channel.v1.MsgTimeout",i.MsgTimeout],["/ibc.core.channel.v1.MsgTimeoutOnClose",i.MsgTimeoutOnClose],["/ibc.core.client.v1.MsgCreateClient",o.MsgCreateClient],["/ibc.core.client.v1.MsgSubmitMisbehaviour",o.MsgSubmitMisbehaviour],["/ibc.core.client.v1.MsgUpdateClient",o.MsgUpdateClient],["/ibc.core.client.v1.MsgUpgradeClient",o.MsgUpgradeClient],["/ibc.core.connection.v1.MsgConnectionOpenAck",a.MsgConnectionOpenAck],["/ibc.core.connection.v1.MsgConnectionOpenConfirm",a.MsgConnectionOpenConfirm],["/ibc.core.connection.v1.MsgConnectionOpenInit",a.MsgConnectionOpenInit],["/ibc.core.connection.v1.MsgConnectionOpenTry",a.MsgConnectionOpenTry]],t.isMsgTransferEncodeObject=s},28265:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setupIbcExtension=void 0;let n=r(69721),i=r(35801),o=r(27780),a=r(83639),s=r(50846),l=r(35838),u=r(66784),d=r(70710),c=r(71185);function p(e){if((null==e?void 0:e.typeUrl)!=="/ibc.lightclients.tendermint.v1.ClientState")throw Error("Unexpected client state type: ".concat(null==e?void 0:e.typeUrl));return d.ClientState.decode(e.value)}function f(e){if((null==e?void 0:e.typeUrl)!=="/ibc.lightclients.tendermint.v1.ConsensusState")throw Error("Unexpected client state type: ".concat(null==e?void 0:e.typeUrl));return d.ConsensusState.decode(e.value)}function h(e){let t=(0,c.createProtobufRpcClient)(e),r=new s.QueryClientImpl(t),d=new l.QueryClientImpl(t),h=new u.QueryClientImpl(t),g=new o.QueryClientImpl(t);return{ibc:{channel:{channel:async(e,t)=>r.Channel({portId:e,channelId:t}),channels:async e=>r.Channels({pagination:(0,c.createPagination)(e)}),allChannels:async()=>{let e,t;let n=[];do{var i;e=await r.Channels({pagination:(0,c.createPagination)(t)}),n.push(...e.channels),t=null===(i=e.pagination)||void 0===i?void 0:i.nextKey}while(t&&t.length);return s.QueryChannelsResponse.fromPartial({channels:n,height:e.height})},connectionChannels:async(e,t)=>r.ConnectionChannels({connection:e,pagination:(0,c.createPagination)(t)}),allConnectionChannels:async e=>{let t,n;let i=[];do{var o;t=await r.ConnectionChannels({connection:e,pagination:(0,c.createPagination)(n)}),i.push(...t.channels),n=null===(o=t.pagination)||void 0===o?void 0:o.nextKey}while(n&&n.length);return s.QueryConnectionChannelsResponse.fromPartial({channels:i,height:t.height})},clientState:async(e,t)=>r.ChannelClientState({portId:e,channelId:t}),consensusState:async(e,t,n,i)=>r.ChannelConsensusState({portId:e,channelId:t,revisionNumber:BigInt(n),revisionHeight:BigInt(i)}),packetCommitment:async(e,t,n)=>r.PacketCommitment({portId:e,channelId:t,sequence:(0,c.longify)(n)}),packetCommitments:async(e,t,n)=>r.PacketCommitments({channelId:t,portId:e,pagination:(0,c.createPagination)(n)}),allPacketCommitments:async(e,t)=>{let n,i;let o=[];do{var a;n=await r.PacketCommitments({channelId:t,portId:e,pagination:(0,c.createPagination)(i)}),o.push(...n.commitments),i=null===(a=n.pagination)||void 0===a?void 0:a.nextKey}while(i&&i.length);return s.QueryPacketCommitmentsResponse.fromPartial({commitments:o,height:n.height})},packetReceipt:async(e,t,n)=>r.PacketReceipt({portId:e,channelId:t,sequence:(0,c.longify)(n)}),packetAcknowledgement:async(e,t,n)=>r.PacketAcknowledgement({portId:e,channelId:t,sequence:(0,c.longify)(n)}),packetAcknowledgements:async(e,t,n)=>{let i=s.QueryPacketAcknowledgementsRequest.fromPartial({portId:e,channelId:t,pagination:(0,c.createPagination)(n)});return r.PacketAcknowledgements(i)},allPacketAcknowledgements:async(e,t)=>{let n,i;let o=[];do{var a;let l=s.QueryPacketAcknowledgementsRequest.fromPartial({channelId:t,portId:e,pagination:(0,c.createPagination)(i)});n=await r.PacketAcknowledgements(l),o.push(...n.acknowledgements),i=null===(a=n.pagination)||void 0===a?void 0:a.nextKey}while(i&&i.length);return s.QueryPacketAcknowledgementsResponse.fromPartial({acknowledgements:o,height:n.height})},unreceivedPackets:async(e,t,n)=>r.UnreceivedPackets({portId:e,channelId:t,packetCommitmentSequences:n.map(e=>BigInt(e))}),unreceivedAcks:async(e,t,n)=>r.UnreceivedAcks({portId:e,channelId:t,packetAckSequences:n.map(e=>BigInt(e))}),nextSequenceReceive:async(e,t)=>r.NextSequenceReceive({portId:e,channelId:t})},client:{state:async e=>d.ClientState({clientId:e}),states:async e=>d.ClientStates({pagination:(0,c.createPagination)(e)}),allStates:async()=>{let e,t;let r=[];do{var n;e=await d.ClientStates({pagination:(0,c.createPagination)(t)}),r.push(...e.clientStates),t=null===(n=e.pagination)||void 0===n?void 0:n.nextKey}while(t&&t.length);return l.QueryClientStatesResponse.fromPartial({clientStates:r})},consensusState:async(e,t)=>d.ConsensusState(l.QueryConsensusStateRequest.fromPartial({clientId:e,revisionHeight:void 0!==t?BigInt(t):void 0,latestHeight:void 0===t})),consensusStates:async(e,t)=>d.ConsensusStates({clientId:e,pagination:(0,c.createPagination)(t)}),allConsensusStates:async e=>{let t,r;let n=[];do{var i;t=await d.ConsensusStates({clientId:e,pagination:(0,c.createPagination)(r)}),n.push(...t.consensusStates),r=null===(i=t.pagination)||void 0===i?void 0:i.nextKey}while(r&&r.length);return l.QueryConsensusStatesResponse.fromPartial({consensusStates:n})},params:async()=>d.ClientParams({}),stateTm:async e=>p((await d.ClientState({clientId:e})).clientState),statesTm:async e=>{let{clientStates:t}=await d.ClientStates({pagination:(0,c.createPagination)(e)});return t.map(e=>{let{clientState:t}=e;return p(t)})},allStatesTm:async()=>{let e,t;let r=[];do{var n;e=await d.ClientStates({pagination:(0,c.createPagination)(t)}),r.push(...e.clientStates),t=null===(n=e.pagination)||void 0===n?void 0:n.nextKey}while(t&&t.length);return r.map(e=>{let{clientState:t}=e;return p(t)})},consensusStateTm:async(e,t)=>f((await d.ConsensusState(l.QueryConsensusStateRequest.fromPartial({clientId:e,revisionHeight:null==t?void 0:t.revisionHeight,revisionNumber:null==t?void 0:t.revisionNumber,latestHeight:void 0===t}))).consensusState)},connection:{connection:async e=>h.Connection({connectionId:e}),connections:async e=>h.Connections({pagination:(0,c.createPagination)(e)}),allConnections:async()=>{let e,t;let r=[];do{var n;e=await h.Connections({pagination:(0,c.createPagination)(t)}),r.push(...e.connections),t=null===(n=e.pagination)||void 0===n?void 0:n.nextKey}while(t&&t.length);return u.QueryConnectionsResponse.fromPartial({connections:r,height:e.height})},clientConnections:async e=>h.ClientConnections({clientId:e}),clientState:async e=>h.ConnectionClientState({connectionId:e}),consensusState:async(e,t)=>h.ConnectionConsensusState(u.QueryConnectionConsensusStateRequest.fromPartial({connectionId:e,revisionHeight:BigInt(t)}))},transfer:{denomTrace:async e=>g.DenomTrace({hash:e}),denomTraces:async e=>g.DenomTraces({pagination:(0,c.createPagination)(e)}),allDenomTraces:async()=>{let e,t;let r=[];do{var n;e=await g.DenomTraces({pagination:(0,c.createPagination)(t)}),r.push(...e.denomTraces),t=null===(n=e.pagination)||void 0===n?void 0:n.nextKey}while(t&&t.length);return o.QueryDenomTracesResponse.fromPartial({denomTraces:r})},params:async()=>g.Params({})},verified:{channel:{channel:async(t,r)=>{let i=(0,n.toAscii)("channelEnds/ports/".concat(t,"/channels/").concat(r)),{value:o}=await e.queryStoreVerified("ibc",i);return o.length?a.Channel.decode(o):null},packetCommitment:async(t,r,i)=>{let o=(0,n.toAscii)("commitments/ports/".concat(t,"/channels/").concat(r,"/packets/").concat(i)),{value:a}=await e.queryStoreVerified("ibc",o);return a},packetAcknowledgement:async(t,r,i)=>{let o=(0,n.toAscii)("acks/ports/".concat(t,"/channels/").concat(r,"/acknowledgements/").concat(i)),{value:a}=await e.queryStoreVerified("ibc",o);return a},nextSequenceReceive:async(t,r)=>{let o=(0,n.toAscii)("seqAcks/ports/".concat(t,"/channels/").concat(r,"/nextSequenceAck")),{value:a}=await e.queryStoreVerified("ibc",o);return a.length?i.Uint64.fromBytes(a).toNumber():null}}}}}}t.setupIbcExtension=h},19938:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isAminoMsgCreateValidator=t.isAminoMsgBeginRedelegate=t.createStakingAminoConverters=t.setupSlashingExtension=t.isAminoMsgUnjail=t.createSlashingAminoConverters=t.setupMintExtension=t.setupIbcExtension=t.isMsgTransferEncodeObject=t.ibcTypes=t.isAminoMsgTransfer=t.createIbcAminoConverters=t.groupTypes=t.createGroupAminoConverters=t.setupGovExtension=t.isMsgVoteWeightedEncodeObject=t.isMsgVoteEncodeObject=t.isMsgSubmitProposalEncodeObject=t.isMsgDepositEncodeObject=t.govTypes=t.isAminoMsgVoteWeighted=t.isAminoMsgVote=t.isAminoMsgSubmitProposal=t.isAminoMsgDeposit=t.createGovAminoConverters=t.setupFeegrantExtension=t.feegrantTypes=t.createFeegrantAminoConverters=t.isAminoMsgSubmitEvidence=t.createEvidenceAminoConverters=t.setupDistributionExtension=t.isMsgWithdrawDelegatorRewardEncodeObject=t.distributionTypes=t.isAminoMsgWithdrawValidatorCommission=t.isAminoMsgWithdrawDelegatorReward=t.isAminoMsgSetWithdrawAddress=t.isAminoMsgFundCommunityPool=t.createDistributionAminoConverters=t.isAminoMsgVerifyInvariant=t.createCrysisAminoConverters=t.setupBankExtension=t.isMsgSendEncodeObject=t.bankTypes=t.isAminoMsgSend=t.isAminoMsgMultiSend=t.createBankAminoConverters=t.setupAuthzExtension=t.authzTypes=t.createAuthzAminoConverters=t.setupAuthExtension=void 0,t.vestingTypes=t.isAminoMsgCreateVestingAccount=t.createVestingAminoConverters=t.setupTxExtension=t.setupStakingExtension=t.stakingTypes=t.isMsgUndelegateEncodeObject=t.isMsgEditValidatorEncodeObject=t.isMsgDelegateEncodeObject=t.isMsgCreateValidatorEncodeObject=t.isMsgBeginRedelegateEncodeObject=t.isAminoMsgUndelegate=t.isAminoMsgEditValidator=t.isAminoMsgDelegate=void 0;var n=r(16421);Object.defineProperty(t,"setupAuthExtension",{enumerable:!0,get:function(){return n.setupAuthExtension}});var i=r(68254);Object.defineProperty(t,"createAuthzAminoConverters",{enumerable:!0,get:function(){return i.createAuthzAminoConverters}});var o=r(69849);Object.defineProperty(t,"authzTypes",{enumerable:!0,get:function(){return o.authzTypes}});var a=r(80202);Object.defineProperty(t,"setupAuthzExtension",{enumerable:!0,get:function(){return a.setupAuthzExtension}});var s=r(54738);Object.defineProperty(t,"createBankAminoConverters",{enumerable:!0,get:function(){return s.createBankAminoConverters}}),Object.defineProperty(t,"isAminoMsgMultiSend",{enumerable:!0,get:function(){return s.isAminoMsgMultiSend}}),Object.defineProperty(t,"isAminoMsgSend",{enumerable:!0,get:function(){return s.isAminoMsgSend}});var l=r(46914);Object.defineProperty(t,"bankTypes",{enumerable:!0,get:function(){return l.bankTypes}}),Object.defineProperty(t,"isMsgSendEncodeObject",{enumerable:!0,get:function(){return l.isMsgSendEncodeObject}});var u=r(31199);Object.defineProperty(t,"setupBankExtension",{enumerable:!0,get:function(){return u.setupBankExtension}});var d=r(3482);Object.defineProperty(t,"createCrysisAminoConverters",{enumerable:!0,get:function(){return d.createCrysisAminoConverters}}),Object.defineProperty(t,"isAminoMsgVerifyInvariant",{enumerable:!0,get:function(){return d.isAminoMsgVerifyInvariant}});var c=r(13944);Object.defineProperty(t,"createDistributionAminoConverters",{enumerable:!0,get:function(){return c.createDistributionAminoConverters}}),Object.defineProperty(t,"isAminoMsgFundCommunityPool",{enumerable:!0,get:function(){return c.isAminoMsgFundCommunityPool}}),Object.defineProperty(t,"isAminoMsgSetWithdrawAddress",{enumerable:!0,get:function(){return c.isAminoMsgSetWithdrawAddress}}),Object.defineProperty(t,"isAminoMsgWithdrawDelegatorReward",{enumerable:!0,get:function(){return c.isAminoMsgWithdrawDelegatorReward}}),Object.defineProperty(t,"isAminoMsgWithdrawValidatorCommission",{enumerable:!0,get:function(){return c.isAminoMsgWithdrawValidatorCommission}});var p=r(34302);Object.defineProperty(t,"distributionTypes",{enumerable:!0,get:function(){return p.distributionTypes}}),Object.defineProperty(t,"isMsgWithdrawDelegatorRewardEncodeObject",{enumerable:!0,get:function(){return p.isMsgWithdrawDelegatorRewardEncodeObject}});var f=r(52554);Object.defineProperty(t,"setupDistributionExtension",{enumerable:!0,get:function(){return f.setupDistributionExtension}});var h=r(6779);Object.defineProperty(t,"createEvidenceAminoConverters",{enumerable:!0,get:function(){return h.createEvidenceAminoConverters}}),Object.defineProperty(t,"isAminoMsgSubmitEvidence",{enumerable:!0,get:function(){return h.isAminoMsgSubmitEvidence}});var g=r(98732);Object.defineProperty(t,"createFeegrantAminoConverters",{enumerable:!0,get:function(){return g.createFeegrantAminoConverters}});var m=r(42051);Object.defineProperty(t,"feegrantTypes",{enumerable:!0,get:function(){return m.feegrantTypes}});var y=r(1277);Object.defineProperty(t,"setupFeegrantExtension",{enumerable:!0,get:function(){return y.setupFeegrantExtension}});var v=r(40384);Object.defineProperty(t,"createGovAminoConverters",{enumerable:!0,get:function(){return v.createGovAminoConverters}}),Object.defineProperty(t,"isAminoMsgDeposit",{enumerable:!0,get:function(){return v.isAminoMsgDeposit}}),Object.defineProperty(t,"isAminoMsgSubmitProposal",{enumerable:!0,get:function(){return v.isAminoMsgSubmitProposal}}),Object.defineProperty(t,"isAminoMsgVote",{enumerable:!0,get:function(){return v.isAminoMsgVote}}),Object.defineProperty(t,"isAminoMsgVoteWeighted",{enumerable:!0,get:function(){return v.isAminoMsgVoteWeighted}});var b=r(50804);Object.defineProperty(t,"govTypes",{enumerable:!0,get:function(){return b.govTypes}}),Object.defineProperty(t,"isMsgDepositEncodeObject",{enumerable:!0,get:function(){return b.isMsgDepositEncodeObject}}),Object.defineProperty(t,"isMsgSubmitProposalEncodeObject",{enumerable:!0,get:function(){return b.isMsgSubmitProposalEncodeObject}}),Object.defineProperty(t,"isMsgVoteEncodeObject",{enumerable:!0,get:function(){return b.isMsgVoteEncodeObject}}),Object.defineProperty(t,"isMsgVoteWeightedEncodeObject",{enumerable:!0,get:function(){return b.isMsgVoteWeightedEncodeObject}});var S=r(52952);Object.defineProperty(t,"setupGovExtension",{enumerable:!0,get:function(){return S.setupGovExtension}});var w=r(87010);Object.defineProperty(t,"createGroupAminoConverters",{enumerable:!0,get:function(){return w.createGroupAminoConverters}});var _=r(30220);Object.defineProperty(t,"groupTypes",{enumerable:!0,get:function(){return _.groupTypes}});var k=r(6065);Object.defineProperty(t,"createIbcAminoConverters",{enumerable:!0,get:function(){return k.createIbcAminoConverters}}),Object.defineProperty(t,"isAminoMsgTransfer",{enumerable:!0,get:function(){return k.isAminoMsgTransfer}});var O=r(96239);Object.defineProperty(t,"ibcTypes",{enumerable:!0,get:function(){return O.ibcTypes}}),Object.defineProperty(t,"isMsgTransferEncodeObject",{enumerable:!0,get:function(){return O.isMsgTransferEncodeObject}});var P=r(28265);Object.defineProperty(t,"setupIbcExtension",{enumerable:!0,get:function(){return P.setupIbcExtension}});var A=r(85029);Object.defineProperty(t,"setupMintExtension",{enumerable:!0,get:function(){return A.setupMintExtension}});var I=r(91528);Object.defineProperty(t,"createSlashingAminoConverters",{enumerable:!0,get:function(){return I.createSlashingAminoConverters}}),Object.defineProperty(t,"isAminoMsgUnjail",{enumerable:!0,get:function(){return I.isAminoMsgUnjail}});var R=r(67801);Object.defineProperty(t,"setupSlashingExtension",{enumerable:!0,get:function(){return R.setupSlashingExtension}});var E=r(94389);Object.defineProperty(t,"createStakingAminoConverters",{enumerable:!0,get:function(){return E.createStakingAminoConverters}}),Object.defineProperty(t,"isAminoMsgBeginRedelegate",{enumerable:!0,get:function(){return E.isAminoMsgBeginRedelegate}}),Object.defineProperty(t,"isAminoMsgCreateValidator",{enumerable:!0,get:function(){return E.isAminoMsgCreateValidator}}),Object.defineProperty(t,"isAminoMsgDelegate",{enumerable:!0,get:function(){return E.isAminoMsgDelegate}}),Object.defineProperty(t,"isAminoMsgEditValidator",{enumerable:!0,get:function(){return E.isAminoMsgEditValidator}}),Object.defineProperty(t,"isAminoMsgUndelegate",{enumerable:!0,get:function(){return E.isAminoMsgUndelegate}});var T=r(11431);Object.defineProperty(t,"isMsgBeginRedelegateEncodeObject",{enumerable:!0,get:function(){return T.isMsgBeginRedelegateEncodeObject}}),Object.defineProperty(t,"isMsgCreateValidatorEncodeObject",{enumerable:!0,get:function(){return T.isMsgCreateValidatorEncodeObject}}),Object.defineProperty(t,"isMsgDelegateEncodeObject",{enumerable:!0,get:function(){return T.isMsgDelegateEncodeObject}}),Object.defineProperty(t,"isMsgEditValidatorEncodeObject",{enumerable:!0,get:function(){return T.isMsgEditValidatorEncodeObject}}),Object.defineProperty(t,"isMsgUndelegateEncodeObject",{enumerable:!0,get:function(){return T.isMsgUndelegateEncodeObject}}),Object.defineProperty(t,"stakingTypes",{enumerable:!0,get:function(){return T.stakingTypes}});var N=r(9615);Object.defineProperty(t,"setupStakingExtension",{enumerable:!0,get:function(){return N.setupStakingExtension}});var x=r(66398);Object.defineProperty(t,"setupTxExtension",{enumerable:!0,get:function(){return x.setupTxExtension}});var B=r(3018);Object.defineProperty(t,"createVestingAminoConverters",{enumerable:!0,get:function(){return B.createVestingAminoConverters}}),Object.defineProperty(t,"isAminoMsgCreateVestingAccount",{enumerable:!0,get:function(){return B.isAminoMsgCreateVestingAccount}});var C=r(27037);Object.defineProperty(t,"vestingTypes",{enumerable:!0,get:function(){return C.vestingTypes}})},85029:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setupMintExtension=void 0;let n=r(67357),i=r(16093),o=r(71185);function a(e){let t=(0,o.createProtobufRpcClient)(e),r=new i.QueryClientImpl(t);return{mint:{params:async()=>{let{params:e}=await r.Params({});return(0,n.assert)(e),{blocksPerYear:e.blocksPerYear,goalBonded:(0,o.decodeCosmosSdkDecFromProto)(e.goalBonded),inflationMin:(0,o.decodeCosmosSdkDecFromProto)(e.inflationMin),inflationMax:(0,o.decodeCosmosSdkDecFromProto)(e.inflationMax),inflationRateChange:(0,o.decodeCosmosSdkDecFromProto)(e.inflationRateChange),mintDenom:e.mintDenom}},inflation:async()=>{let{inflation:e}=await r.Inflation({});return(0,o.decodeCosmosSdkDecFromProto)(e)},annualProvisions:async()=>{let{annualProvisions:e}=await r.AnnualProvisions({});return(0,o.decodeCosmosSdkDecFromProto)(e)}}}}t.setupMintExtension=a},91528:function(e,t){"use strict";function r(e){return"cosmos-sdk/MsgUnjail"===e.type}function n(){throw Error("Not implemented")}Object.defineProperty(t,"__esModule",{value:!0}),t.createSlashingAminoConverters=t.isAminoMsgUnjail=void 0,t.isAminoMsgUnjail=r,t.createSlashingAminoConverters=n},67801:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setupSlashingExtension=void 0;let n=r(87778),i=r(71185);function o(e){let t=(0,i.createProtobufRpcClient)(e),r=new n.QueryClientImpl(t);return{slashing:{signingInfo:async e=>await r.SigningInfo({consAddress:e}),signingInfos:async e=>await r.SigningInfos({pagination:(0,i.createPagination)(e)}),params:async()=>await r.Params({})}}}t.setupSlashingExtension=o},94389:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createStakingAminoConverters=t.isAminoMsgUndelegate=t.isAminoMsgBeginRedelegate=t.isAminoMsgDelegate=t.isAminoMsgEditValidator=t.isAminoMsgCreateValidator=t.protoDecimalToJson=void 0;let n=r(35801),i=r(18722),o=r(67357);function a(e){let[t,r]=n.Decimal.fromAtomics(e,18).toString().split(".");return"".concat(t,".").concat((null!=r?r:"").padEnd(18,"0"))}function s(e){return n.Decimal.fromUserInput(e,18).atomics}function l(e){return"cosmos-sdk/MsgCreateValidator"===e.type}function u(e){return"cosmos-sdk/MsgEditValidator"===e.type}function d(e){return"cosmos-sdk/MsgDelegate"===e.type}function c(e){return"cosmos-sdk/MsgBeginRedelegate"===e.type}function p(e){return"cosmos-sdk/MsgUndelegate"===e.type}function f(){return{"/cosmos.staking.v1beta1.MsgBeginRedelegate":{aminoType:"cosmos-sdk/MsgBeginRedelegate",toAmino:e=>{let{delegatorAddress:t,validatorSrcAddress:r,validatorDstAddress:n,amount:i}=e;return(0,o.assertDefinedAndNotNull)(i,"missing amount"),{delegator_address:t,validator_src_address:r,validator_dst_address:n,amount:i}},fromAmino:e=>{let{delegator_address:t,validator_src_address:r,validator_dst_address:n,amount:i}=e;return{delegatorAddress:t,validatorSrcAddress:r,validatorDstAddress:n,amount:i}}},"/cosmos.staking.v1beta1.MsgCreateValidator":{aminoType:"cosmos-sdk/MsgCreateValidator",toAmino:e=>{let{description:t,commission:r,minSelfDelegation:n,delegatorAddress:s,validatorAddress:l,pubkey:u,value:d}=e;return(0,o.assertDefinedAndNotNull)(t,"missing description"),(0,o.assertDefinedAndNotNull)(r,"missing commission"),(0,o.assertDefinedAndNotNull)(u,"missing pubkey"),(0,o.assertDefinedAndNotNull)(d,"missing value"),{description:{moniker:t.moniker,identity:t.identity,website:t.website,security_contact:t.securityContact,details:t.details},commission:{rate:a(r.rate),max_rate:a(r.maxRate),max_change_rate:a(r.maxChangeRate)},min_self_delegation:n,delegator_address:s,validator_address:l,pubkey:(0,i.decodePubkey)(u),value:d}},fromAmino:e=>{let{description:t,commission:r,min_self_delegation:n,delegator_address:o,validator_address:a,pubkey:l,value:u}=e;return{description:{moniker:t.moniker,identity:t.identity,website:t.website,securityContact:t.security_contact,details:t.details},commission:{rate:s(r.rate),maxRate:s(r.max_rate),maxChangeRate:s(r.max_change_rate)},minSelfDelegation:n,delegatorAddress:o,validatorAddress:a,pubkey:(0,i.encodePubkey)(l),value:u}}},"/cosmos.staking.v1beta1.MsgDelegate":{aminoType:"cosmos-sdk/MsgDelegate",toAmino:e=>{let{delegatorAddress:t,validatorAddress:r,amount:n}=e;return(0,o.assertDefinedAndNotNull)(n,"missing amount"),{delegator_address:t,validator_address:r,amount:n}},fromAmino:e=>{let{delegator_address:t,validator_address:r,amount:n}=e;return{delegatorAddress:t,validatorAddress:r,amount:n}}},"/cosmos.staking.v1beta1.MsgEditValidator":{aminoType:"cosmos-sdk/MsgEditValidator",toAmino:e=>{let{description:t,commissionRate:r,minSelfDelegation:n,validatorAddress:i}=e;return(0,o.assertDefinedAndNotNull)(t,"missing description"),{description:{moniker:t.moniker,identity:t.identity,website:t.website,security_contact:t.securityContact,details:t.details},commission_rate:r?a(r):void 0,min_self_delegation:n||void 0,validator_address:i}},fromAmino:e=>{let{description:t,commission_rate:r,min_self_delegation:n,validator_address:i}=e;return{description:{moniker:t.moniker,identity:t.identity,website:t.website,securityContact:t.security_contact,details:t.details},commissionRate:r?s(r):"",minSelfDelegation:null!=n?n:"",validatorAddress:i}}},"/cosmos.staking.v1beta1.MsgUndelegate":{aminoType:"cosmos-sdk/MsgUndelegate",toAmino:e=>{let{delegatorAddress:t,validatorAddress:r,amount:n}=e;return(0,o.assertDefinedAndNotNull)(n,"missing amount"),{delegator_address:t,validator_address:r,amount:n}},fromAmino:e=>{let{delegator_address:t,validator_address:r,amount:n}=e;return{delegatorAddress:t,validatorAddress:r,amount:n}}}}}t.protoDecimalToJson=a,t.isAminoMsgCreateValidator=l,t.isAminoMsgEditValidator=u,t.isAminoMsgDelegate=d,t.isAminoMsgBeginRedelegate=c,t.isAminoMsgUndelegate=p,t.createStakingAminoConverters=f},11431:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isMsgUndelegateEncodeObject=t.isMsgEditValidatorEncodeObject=t.isMsgDelegateEncodeObject=t.isMsgCreateValidatorEncodeObject=t.isMsgBeginRedelegateEncodeObject=t.stakingTypes=void 0;let n=r(62884);function i(e){return"/cosmos.staking.v1beta1.MsgBeginRedelegate"===e.typeUrl}function o(e){return"/cosmos.staking.v1beta1.MsgCreateValidator"===e.typeUrl}function a(e){return"/cosmos.staking.v1beta1.MsgDelegate"===e.typeUrl}function s(e){return"/cosmos.staking.v1beta1.MsgEditValidator"===e.typeUrl}function l(e){return"/cosmos.staking.v1beta1.MsgUndelegate"===e.typeUrl}t.stakingTypes=[["/cosmos.staking.v1beta1.MsgBeginRedelegate",n.MsgBeginRedelegate],["/cosmos.staking.v1beta1.MsgCreateValidator",n.MsgCreateValidator],["/cosmos.staking.v1beta1.MsgDelegate",n.MsgDelegate],["/cosmos.staking.v1beta1.MsgEditValidator",n.MsgEditValidator],["/cosmos.staking.v1beta1.MsgUndelegate",n.MsgUndelegate]],t.isMsgBeginRedelegateEncodeObject=i,t.isMsgCreateValidatorEncodeObject=o,t.isMsgDelegateEncodeObject=a,t.isMsgEditValidatorEncodeObject=s,t.isMsgUndelegateEncodeObject=l},9615:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setupStakingExtension=void 0;let n=r(32776),i=r(71185);function o(e){let t=(0,i.createProtobufRpcClient)(e),r=new n.QueryClientImpl(t);return{staking:{delegation:async(e,t)=>await r.Delegation({delegatorAddr:e,validatorAddr:t}),delegatorDelegations:async(e,t)=>await r.DelegatorDelegations({delegatorAddr:e,pagination:(0,i.createPagination)(t)}),delegatorUnbondingDelegations:async(e,t)=>await r.DelegatorUnbondingDelegations({delegatorAddr:e,pagination:(0,i.createPagination)(t)}),delegatorValidator:async(e,t)=>await r.DelegatorValidator({delegatorAddr:e,validatorAddr:t}),delegatorValidators:async(e,t)=>await r.DelegatorValidators({delegatorAddr:e,pagination:(0,i.createPagination)(t)}),historicalInfo:async e=>await r.HistoricalInfo({height:BigInt(e)}),params:async()=>await r.Params({}),pool:async()=>await r.Pool({}),redelegations:async(e,t,n,o)=>await r.Redelegations({delegatorAddr:e,srcValidatorAddr:t,dstValidatorAddr:n,pagination:(0,i.createPagination)(o)}),unbondingDelegation:async(e,t)=>await r.UnbondingDelegation({delegatorAddr:e,validatorAddr:t}),validator:async e=>await r.Validator({validatorAddr:e}),validatorDelegations:async(e,t)=>await r.ValidatorDelegations({validatorAddr:e,pagination:(0,i.createPagination)(t)}),validators:async(e,t)=>await r.Validators({status:e,pagination:(0,i.createPagination)(t)}),validatorUnbondingDelegations:async(e,t)=>await r.ValidatorUnbondingDelegations({validatorAddr:e,pagination:(0,i.createPagination)(t)})}}}t.setupStakingExtension=o},66398:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setupTxExtension=void 0;let n=r(18722),i=r(2264),o=r(32468),a=r(26136),s=r(71185);function l(e){let t=(0,s.createProtobufRpcClient)(e),r=new o.ServiceClientImpl(t);return{tx:{getTx:async e=>{let t={hash:e};return await r.GetTx(t)},simulate:async(e,t,s,l)=>{let u=a.Tx.fromPartial({authInfo:a.AuthInfo.fromPartial({fee:a.Fee.fromPartial({}),signerInfos:[{publicKey:(0,n.encodePubkey)(s),sequence:BigInt(l),modeInfo:{single:{mode:i.SignMode.SIGN_MODE_UNSPECIFIED}}}]}),body:a.TxBody.fromPartial({messages:Array.from(e),memo:t}),signatures:[new Uint8Array]}),d=o.SimulateRequest.fromPartial({txBytes:a.Tx.encode(u).finish()});return await r.Simulate(d)}}}}t.setupTxExtension=l},3018:function(e,t){"use strict";function r(e){return"cosmos-sdk/MsgCreateVestingAccount"===e.type}function n(){return{"/cosmos.vesting.v1beta1.MsgCreateVestingAccount":{aminoType:"cosmos-sdk/MsgCreateVestingAccount",toAmino:e=>{let{fromAddress:t,toAddress:r,amount:n,endTime:i,delayed:o}=e;return{from_address:t,to_address:r,amount:[...n],end_time:i.toString(),delayed:o}},fromAmino:e=>{let{from_address:t,to_address:r,amount:n,end_time:i,delayed:o}=e;return{fromAddress:t,toAddress:r,amount:[...n],endTime:BigInt(i),delayed:o}}}}}Object.defineProperty(t,"__esModule",{value:!0}),t.createVestingAminoConverters=t.isAminoMsgCreateVestingAccount=void 0,t.isAminoMsgCreateVestingAccount=r,t.createVestingAminoConverters=n},27037:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.vestingTypes=void 0;let n=r(7633);t.vestingTypes=[["/cosmos.vesting.v1beta1.MsgCreateVestingAccount",n.MsgCreateVestingAccount]]},88080:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.makeMultisignedTxBytes=t.makeMultisignedTx=t.makeCompactBitArray=void 0;let n=r(83552),i=r(69721),o=r(18722),a=r(50263),s=r(2264),l=r(26136),u=r(26136);function d(e){let t=Math.ceil(e.length/8),r=e.length-8*Math.floor(e.length/8),n=new Uint8Array(t);return e.forEach((e,t)=>{let r=Math.floor(t/8),i=t%8;e&&(n[r]|=1<<7-i)}),a.CompactBitArray.fromPartial({elems:n,extraBitsStored:r})}function c(e,t,r,c,p){let f=Array.from(p.keys()),h=(0,i.fromBech32)(f[0]).prefix,g=Array(e.value.pubkeys.length).fill(!1),m=[];for(let t=0;t({single:{mode:s.SignMode.SIGN_MODE_LEGACY_AMINO_JSON}}))}},sequence:BigInt(t)},v=l.AuthInfo.fromPartial({signerInfos:[y],fee:{amount:[...r.amount],gasLimit:BigInt(r.gas)}}),b=l.AuthInfo.encode(v).finish();return u.TxRaw.fromPartial({bodyBytes:c,authInfoBytes:b,signatures:[a.MultiSignature.encode(a.MultiSignature.fromPartial({signatures:m})).finish()]})}function p(e,t,r,n,i){let o=c(e,t,r,n,i);return Uint8Array.from(u.TxRaw.encode(o).finish())}t.makeCompactBitArray=d,t.makeMultisignedTx=c,t.makeMultisignedTxBytes=p},71185:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.longify=t.decodeCosmosSdkDecFromProto=t.createProtobufRpcClient=t.createPagination=t.QueryClient=void 0;var n=r(94988);Object.defineProperty(t,"QueryClient",{enumerable:!0,get:function(){return n.QueryClient}});var i=r(35195);Object.defineProperty(t,"createPagination",{enumerable:!0,get:function(){return i.createPagination}}),Object.defineProperty(t,"createProtobufRpcClient",{enumerable:!0,get:function(){return i.createProtobufRpcClient}}),Object.defineProperty(t,"decodeCosmosSdkDecFromProto",{enumerable:!0,get:function(){return i.decodeCosmosSdkDecFromProto}}),Object.defineProperty(t,"longify",{enumerable:!0,get:function(){return i.longify}})},94988:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QueryClient=void 0;let n=r(70102),i=r(69721),o=r(15786),a=r(67357);function s(e,t,r){if(e.type!==t)throw Error("Op expected to be ".concat(t,', got "').concat(e.type));if(!(0,a.arrayContentEquals)(r,e.key))throw Error("Proven key different than queried key.\nQuery: ".concat((0,i.toHex)(r),"\nProven: ").concat((0,i.toHex)(e.key)));return n.ics23.CommitmentProof.decode(e.data)}class l{static withExtensions(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;ne(i)))for(let[t,r]of((0,a.assert)((0,a.isNonNullObject)(e),"Extension must be a non-null object"),Object.entries(e))){(0,a.assert)((0,a.isNonNullObject)(r),"Module must be a non-null object. Found type ".concat(typeof r,' for module "').concat(t,'".'));let e=i[t]||{};i[t]={...e,...r}}return i}async queryStoreVerified(e,t,r){let{height:o,proof:l,key:u,value:d}=await this.queryRawProof(e,t,r),c=s(l.ops[0],"ics23:iavl",t),p=s(l.ops[1],"ics23:simple",(0,i.toAscii)(e));(0,a.assert)(p.exist),(0,a.assert)(p.exist.value),d&&0!==d.length?((0,a.assert)(c.exist),(0,a.assert)(c.exist.value),(0,n.verifyExistence)(c.exist,n.iavlSpec,p.exist.value,t,d)):((0,a.assert)(c.nonexist),(0,n.verifyNonExistence)(c.nonexist,n.iavlSpec,p.exist.value,t));let f=await this.getNextHeader(o);return(0,n.verifyExistence)(p.exist,n.tendermintSpec,f.appHash,(0,i.toAscii)(e),p.exist.value),{key:u,value:d,height:o}}async queryRawProof(e,t,r){let{key:n,value:o,height:l,proof:u,code:d,log:c}=await this.cometClient.abciQuery({path:"/store/".concat(e,"/key"),data:t,prove:!0,height:r});if(d)throw Error("Query failed with (".concat(d,"): ").concat(c));if(!(0,a.arrayContentEquals)(t,n))throw Error("Response key ".concat((0,i.toHex)(n)," doesn't match query key ").concat((0,i.toHex)(t)));if(!l)throw Error("No query height returned");if(!u||2!==u.ops.length){var p;throw Error("Expected 2 proof ops, got ".concat(null!==(p=null==u?void 0:u.ops.length)&&void 0!==p?p:0,". Are you using stargate?"))}return s(u.ops[0],"ics23:iavl",n),s(u.ops[1],"ics23:simple",(0,i.toAscii)(e)),{key:n,value:o,height:l,proof:{ops:[...u.ops]}}}async queryAbci(e,t,r){let n=await this.cometClient.abciQuery({path:e,data:t,prove:!1,height:r});if(n.code)throw Error("Query failed with (".concat(n.code,"): ").concat(n.log));if(!n.height)throw Error("No query height returned");return{value:n.value,height:n.height}}async getNextHeader(e){let t,r;if((0,a.assertDefined)(e),0===e)throw Error("Query returned height 0, cannot prove it");let n=e+1;try{r=this.cometClient.subscribeNewBlockHeader()}catch(e){}if(r){let e=await (0,o.firstEvent)(r);e.height===n&&(t=e)}for(;!t;){let r=(await this.cometClient.blockchain(e,n)).blockMetas.map(e=>e.header).find(e=>e.height===n);r?t=r:await (0,a.sleep)(1e3)}return(0,a.assert)(t.height===n,"Got wrong header. This is a bug in the logic above."),t}constructor(e){this.cometClient=e}}t.QueryClient=l},35195:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeCosmosSdkDecFromProto=t.longify=t.createProtobufRpcClient=t.createPagination=t.toAccAddress=void 0;let n=r(69721),i=r(35801),o=r(86141);function a(e){return(0,n.fromBech32)(e).data}function s(e){return e?o.PageRequest.fromPartial({key:e}):o.PageRequest.fromPartial({})}function l(e){return{request:async(t,r,n)=>{let i="/".concat(t,"/").concat(r);return(await e.queryAbci(i,n,void 0)).value}}}function u(e){return BigInt(i.Uint64.fromString(e.toString()).toString())}function d(e){let t="string"==typeof e?e:(0,n.fromAscii)(e);return i.Decimal.fromAtomics(t,18)}t.toAccAddress=a,t.createPagination=s,t.createProtobufRpcClient=l,t.longify=u,t.decodeCosmosSdkDecFromProto=d},66750:function(e,t){"use strict";function r(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.isSearchTxQueryArray=void 0,t.isSearchTxQueryArray=r},54449:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SigningStargateClient=t.createDefaultAminoConverters=t.defaultRegistryTypes=void 0;let n=r(83552),i=r(69721),o=r(35801),a=r(18722),s=r(43890),l=r(67357),u=r(14841),d=r(53856),c=r(62884),p=r(2264),f=r(26136),h=r(7337),g=r(23478),m=r(10312),y=r(19938),v=r(19938),b=r(25087);function S(){return{...(0,v.createAuthzAminoConverters)(),...(0,v.createBankAminoConverters)(),...(0,v.createDistributionAminoConverters)(),...(0,v.createGovAminoConverters)(),...(0,v.createStakingAminoConverters)(),...(0,v.createIbcAminoConverters)(),...(0,v.createFeegrantAminoConverters)(),...(0,v.createVestingAminoConverters)()}}t.defaultRegistryTypes=[["/cosmos.base.v1beta1.Coin",u.Coin],...y.authzTypes,...y.bankTypes,...y.distributionTypes,...y.feegrantTypes,...y.govTypes,...y.groupTypes,...y.stakingTypes,...y.ibcTypes,...y.vestingTypes],t.createDefaultAminoConverters=S;class w extends b.StargateClient{static async connectWithSigner(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=await (0,s.connectComet)(e);return w.createWithSigner(n,t,r)}static async createWithSigner(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return new w(e,t,r)}static async offline(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new w(void 0,e,t)}async simulate(e,t,r){let i=t.map(e=>this.registry.encodeAsAny(e)),a=(await this.signer.getAccounts()).find(t=>t.address===e);if(!a)throw Error("Failed to retrieve account from signer");let s=(0,n.encodeSecp256k1Pubkey)(a.pubkey),{sequence:u}=await this.getSequence(e),{gasInfo:d}=await this.forceGetQueryClient().tx.simulate(i,r,s,u);return(0,l.assertDefined)(d),o.Uint53.fromString(d.gasUsed.toString()).toNumber()}async sendTokens(e,t,r,n){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",o={typeUrl:"/cosmos.bank.v1beta1.MsgSend",value:{fromAddress:e,toAddress:t,amount:[...r]}};return this.signAndBroadcast(e,[o],n,i)}async delegateTokens(e,t,r,n){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",o={typeUrl:"/cosmos.staking.v1beta1.MsgDelegate",value:c.MsgDelegate.fromPartial({delegatorAddress:e,validatorAddress:t,amount:r})};return this.signAndBroadcast(e,[o],n,i)}async undelegateTokens(e,t,r,n){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",o={typeUrl:"/cosmos.staking.v1beta1.MsgUndelegate",value:c.MsgUndelegate.fromPartial({delegatorAddress:e,validatorAddress:t,amount:r})};return this.signAndBroadcast(e,[o],n,i)}async withdrawRewards(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",i={typeUrl:"/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward",value:d.MsgWithdrawDelegatorReward.fromPartial({delegatorAddress:e,validatorAddress:t})};return this.signAndBroadcast(e,[i],r,n)}async sendIbcTokens(e,t,r,n,i,o,a,s){let l=arguments.length>8&&void 0!==arguments[8]?arguments[8]:"",u=a?BigInt(a)*BigInt(1e9):void 0,d={typeUrl:"/ibc.applications.transfer.v1.MsgTransfer",value:h.MsgTransfer.fromPartial({sourcePort:n,sourceChannel:i,sender:e,receiver:t,token:r,timeoutHeight:o,timeoutTimestamp:u})};return this.signAndBroadcast(e,[d],s,l)}async signAndBroadcast(e,t,r){let n,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=arguments.length>4?arguments[4]:void 0;if("auto"==r||"number"==typeof r){(0,l.assertDefined)(this.gasPrice,"Gas price must be set in the client options when auto gas is used.");let o=await this.simulate(e,t,i),a="number"==typeof r?r:1.4;n=(0,m.calculateFee)(Math.round(o*a),this.gasPrice)}else n=r;let a=await this.sign(e,t,n,i,void 0,o),s=f.TxRaw.encode(a).finish();return this.broadcastTx(s,this.broadcastTimeoutMs,this.broadcastPollIntervalMs)}async signAndBroadcastSync(e,t,r){let n,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=arguments.length>4?arguments[4]:void 0;if("auto"==r||"number"==typeof r){(0,l.assertDefined)(this.gasPrice,"Gas price must be set in the client options when auto gas is used.");let o=await this.simulate(e,t,i),a="number"==typeof r?r:1.3;n=(0,m.calculateFee)(Math.round(o*a),this.gasPrice)}else n=r;let a=await this.sign(e,t,n,i,void 0,o),s=f.TxRaw.encode(a).finish();return this.broadcastTxSync(s)}async sign(e,t,r,n,i,o){let s;if(i)s=i;else{let{accountNumber:t,sequence:r}=await this.getSequence(e);s={accountNumber:t,sequence:r,chainId:await this.getChainId()}}return(0,a.isOfflineDirectSigner)(this.signer)?this.signDirect(e,t,r,n,s,o):this.signAmino(e,t,r,n,s,o)}async signAmino(e,t,r,s,u,d){let{accountNumber:c,sequence:h,chainId:g}=u;(0,l.assert)(!(0,a.isOfflineDirectSigner)(this.signer));let m=(await this.signer.getAccounts()).find(t=>t.address===e);if(!m)throw Error("Failed to retrieve account from signer");let y=(0,a.encodePubkey)((0,n.encodeSecp256k1Pubkey)(m.pubkey)),v=p.SignMode.SIGN_MODE_LEGACY_AMINO_JSON,b=t.map(e=>this.aminoTypes.toAmino(e)),S=(0,n.makeSignDoc)(b,r,g,s,c,h,d),{signature:w,signed:_}=await this.signer.signAmino(e,S),k={typeUrl:"/cosmos.tx.v1beta1.TxBody",value:{messages:_.msgs.map(e=>this.aminoTypes.fromAmino(e)),memo:_.memo,timeoutHeight:d}},O=this.registry.encode(k),P=o.Int53.fromString(_.fee.gas).toNumber(),A=o.Int53.fromString(_.sequence).toNumber(),I=(0,a.makeAuthInfoBytes)([{pubkey:y,sequence:A}],_.fee.amount,P,_.fee.granter,_.fee.payer,v);return f.TxRaw.fromPartial({bodyBytes:O,authInfoBytes:I,signatures:[(0,i.fromBase64)(w.signature)]})}async signDirect(e,t,r,s,u,d){let{accountNumber:c,sequence:p,chainId:h}=u;(0,l.assert)((0,a.isOfflineDirectSigner)(this.signer));let g=(await this.signer.getAccounts()).find(t=>t.address===e);if(!g)throw Error("Failed to retrieve account from signer");let m=(0,a.encodePubkey)((0,n.encodeSecp256k1Pubkey)(g.pubkey)),y={typeUrl:"/cosmos.tx.v1beta1.TxBody",value:{messages:t,memo:s,timeoutHeight:d}},v=this.registry.encode(y),b=o.Int53.fromString(r.gas).toNumber(),S=(0,a.makeAuthInfoBytes)([{pubkey:m,sequence:p}],r.amount,b,r.granter,r.payer),w=(0,a.makeSignDoc)(v,S,h,c),{signature:_,signed:k}=await this.signer.signDirect(e,w);return f.TxRaw.fromPartial({bodyBytes:k.bodyBytes,authInfoBytes:k.authInfoBytes,signatures:[(0,i.fromBase64)(_.signature)]})}constructor(e,r,n){super(e,n);let{registry:i=new a.Registry(t.defaultRegistryTypes),aminoTypes:o=new g.AminoTypes(S())}=n;this.registry=i,this.aminoTypes=o,this.signer=r,this.broadcastTimeoutMs=n.broadcastTimeoutMs,this.broadcastPollIntervalMs=n.broadcastPollIntervalMs,this.gasPrice=n.gasPrice}}t.SigningStargateClient=w},25087:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StargateClient=t.BroadcastTxError=t.assertIsDeliverTxFailure=t.assertIsDeliverTxSuccess=t.isDeliverTxSuccess=t.isDeliverTxFailure=t.TimeoutError=void 0;let n=r(83552),i=r(69721),o=r(35801),a=r(43890),s=r(67357),l=r(94534),u=r(5491),d=r(61115),c=r(19938),p=r(71185),f=r(66750);class h extends Error{constructor(e,t){super(e),this.txId=t}}function g(e){return!!e.code}function m(e){return!g(e)}function y(e){if(g(e))throw Error("Error when broadcasting tx ".concat(e.transactionHash," at height ").concat(e.height,". Code: ").concat(e.code,"; Raw log: ").concat(e.rawLog))}function v(e){if(m(e))throw Error("Transaction ".concat(e.transactionHash," did not fail at height ").concat(e.height,". Code: ").concat(e.code,"; Raw log: ").concat(e.rawLog))}t.TimeoutError=h,t.isDeliverTxFailure=g,t.isDeliverTxSuccess=m,t.assertIsDeliverTxSuccess=y,t.assertIsDeliverTxFailure=v;class b extends Error{constructor(e,t,r){super("Broadcasting transaction failed with code ".concat(e," (codespace: ").concat(t,"). Log: ").concat(r)),this.code=e,this.codespace=t,this.log=r}}t.BroadcastTxError=b;class S{static async connect(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=await (0,a.connectComet)(e);return S.create(r,t)}static async create(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new S(e,t)}getCometClient(){return this.cometClient}forceGetCometClient(){if(!this.cometClient)throw Error("Comet client not available. You cannot use online functionality in offline mode.");return this.cometClient}getQueryClient(){return this.queryClient}forceGetQueryClient(){if(!this.queryClient)throw Error("Query client not available. You cannot use online functionality in offline mode.");return this.queryClient}async getChainId(){if(!this.chainId){let e=(await this.forceGetCometClient().status()).nodeInfo.network;if(!e)throw Error("Chain ID must not be empty");this.chainId=e}return this.chainId}async getHeight(){return(await this.forceGetCometClient().status()).syncInfo.latestBlockHeight}async getAccount(e){try{let t=await this.forceGetQueryClient().auth.account(e);return t?this.accountParser(t):null}catch(e){if(/rpc error: code = NotFound/i.test(e.toString()))return null;throw e}}async getSequence(e){let t=await this.getAccount(e);if(!t)throw Error("Account '".concat(e,"' does not exist on chain. Send some tokens there before trying to query sequence."));return{accountNumber:t.accountNumber,sequence:t.sequence}}async getBlock(e){let t=await this.forceGetCometClient().block(e);return{id:(0,i.toHex)(t.blockId.hash).toUpperCase(),header:{version:{block:new o.Uint53(t.block.header.version.block).toString(),app:new o.Uint53(t.block.header.version.app).toString()},height:t.block.header.height,chainId:t.block.header.chainId,time:(0,a.toRfc3339WithNanoseconds)(t.block.header.time)},txs:t.block.txs}}async getBalance(e,t){return this.forceGetQueryClient().bank.balance(e,t)}async getAllBalances(e){return this.forceGetQueryClient().bank.allBalances(e)}async getBalanceStaked(e){let t;let r=[];do{let{delegationResponses:n,pagination:i}=await this.forceGetQueryClient().staking.delegatorDelegations(e,t),o=n||[];r.push(...o),t=null==i?void 0:i.nextKey}while(void 0!==t&&0!==t.length);return r.reduce((e,t)=>((0,s.assert)(t.balance),null!==e?(0,n.addCoins)(e,t.balance):t.balance),null)}async getDelegation(e,t){let r;try{var n;r=null===(n=(await this.forceGetQueryClient().staking.delegation(e,t)).delegationResponse)||void 0===n?void 0:n.balance}catch(e){if(e.toString().includes("key not found"));else throw e}return r||null}async getTx(e){var t;return null!==(t=(await this.txsQuery("tx.hash='".concat(e,"'")))[0])&&void 0!==t?t:null}async searchTx(e){let t;if("string"==typeof e)t=e;else if((0,f.isSearchTxQueryArray)(e))t=e.map(e=>"string"==typeof e.value?"".concat(e.key,"='").concat(e.value,"'"):"".concat(e.key,"=").concat(e.value)).join(" AND ");else throw Error("Got unsupported query type. See CosmJS 0.31 CHANGELOG for API breaking changes here.");return this.txsQuery(t)}disconnect(){this.cometClient&&this.cometClient.disconnect()}async broadcastTx(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6e4,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3e3,n=!1,i=setTimeout(()=>{n=!0},t),o=async e=>{if(n)throw new h("Transaction with ID ".concat(e," was submitted but was not yet found on the chain. You might want to check later. There was a wait of ").concat(t/1e3," seconds."),e);await (0,s.sleep)(r);let i=await this.getTx(e);return i?{code:i.code,height:i.height,txIndex:i.txIndex,events:i.events,rawLog:i.rawLog,transactionHash:e,msgResponses:i.msgResponses,gasUsed:i.gasUsed,gasWanted:i.gasWanted}:o(e)},a=await this.broadcastTxSync(e);return new Promise((e,t)=>o(a).then(t=>{clearTimeout(i),e(t)},e=>{clearTimeout(i),t(e)}))}async broadcastTxSync(e){let t=await this.forceGetCometClient().broadcastTxSync({tx:e});if(t.code){var r;return Promise.reject(new b(t.code,null!==(r=t.codespace)&&void 0!==r?r:"",t.log))}return(0,i.toHex)(t.hash).toUpperCase()}async txsQuery(e){return(await this.forceGetCometClient().txSearchAll({query:e})).txs.map(e=>{var t;let r=l.TxMsgData.decode(null!==(t=e.result.data)&&void 0!==t?t:new Uint8Array);return{height:e.height,txIndex:e.index,hash:(0,i.toHex)(e.hash).toUpperCase(),code:e.result.code,events:e.result.events.map(d.fromTendermintEvent),rawLog:e.result.log||"",tx:e.tx,msgResponses:r.msgResponses,gasUsed:e.result.gasUsed,gasWanted:e.result.gasWanted}})}constructor(e,t){e&&(this.cometClient=e,this.queryClient=p.QueryClient.withExtensions(e,c.setupAuthExtension,c.setupBankExtension,c.setupStakingExtension,c.setupTxExtension));let{accountParser:r=u.accountFromAny}=t;this.accountParser=r}}t.StargateClient=S},90505:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.concat=void 0;let n=r(78518);function i(){for(var e=arguments.length,t=Array(e),r=0;r0;)i.shift().unsubscribe();o.length=0,a.clear(),s=0}let u={start:e=>{function r(t){for(;;){let r=o[t].shift();if(void 0===r)return;e.next(r)}}function n(){return s>=t.length}if(t.forEach(e=>o.push([])),n()){e.complete();return}t.forEach((t,u)=>{i.push(t.subscribe({next:t=>{u===s?e.next(t):o[u].push(t)},complete:()=>{for(a.add(u);a.has(s);)r(s),s++;n()?e.complete():r(s)},error:t=>{e.error(t),l()}}))})},stop:()=>{l()}};return n.Stream.create(u)}t.concat=i},78770:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultValueProducer=void 0;class r{get value(){return this.internalValue}update(e){this.internalValue=e,this.listener&&this.listener.next(e)}error(e){this.listener&&this.listener.error(e)}start(e){this.listener=e,e.next(this.internalValue),this.callbacks&&this.callbacks.onStarted()}stop(){this.callbacks&&this.callbacks.onStop(),this.listener=void 0}constructor(e,t){this.callbacks=t,this.internalValue=e}}t.DefaultValueProducer=r},43241:function(e,t){"use strict";function r(e){return t=>{let r=new Set;return t.filter(t=>!r.has(e(t))).debug(t=>r.add(e(t)))}}Object.defineProperty(t,"__esModule",{value:!0}),t.dropDuplicates=void 0,t.dropDuplicates=r},15786:function(e,t,r){"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.ValueAndUpdates=t.toListPromise=t.fromListPromise=t.firstEvent=t.dropDuplicates=t.DefaultValueProducer=t.concat=void 0;var o=r(90505);Object.defineProperty(t,"concat",{enumerable:!0,get:function(){return o.concat}});var a=r(78770);Object.defineProperty(t,"DefaultValueProducer",{enumerable:!0,get:function(){return a.DefaultValueProducer}});var s=r(43241);Object.defineProperty(t,"dropDuplicates",{enumerable:!0,get:function(){return s.dropDuplicates}});var l=r(87527);Object.defineProperty(t,"firstEvent",{enumerable:!0,get:function(){return l.firstEvent}}),Object.defineProperty(t,"fromListPromise",{enumerable:!0,get:function(){return l.fromListPromise}}),Object.defineProperty(t,"toListPromise",{enumerable:!0,get:function(){return l.toListPromise}}),i(r(89886),t);var u=r(7948);Object.defineProperty(t,"ValueAndUpdates",{enumerable:!0,get:function(){return u.ValueAndUpdates}})},87527:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.firstEvent=t.toListPromise=t.fromListPromise=void 0;let n=r(78518);function i(e){let t={start:t=>{e.then(e=>{for(let r of e)t.next(r);t.complete()}).catch(e=>t.error(e))},stop:()=>{}};return n.Stream.create(t)}async function o(e,t){return new Promise((r,n)=>{if(0===t){r([]);return}let i=[];e.take(t).subscribe({next:e=>{i.push(e),i.length===t&&r(i)},complete:()=>{n("Stream completed before all events could be collected. "+"Collected ".concat(i.length,", expected ").concat(t))},error:e=>n(e)})})}async function a(e){return(await o(e,1))[0]}t.fromListPromise=i,t.toListPromise=o,t.firstEvent=a},89886:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.lastValue=t.asArray=t.countStream=t.Reducer=void 0;class r{value(){return this.state}async finished(){return this.completed}constructor(e,t,r){this.stream=e,this.reducer=t,this.state=r,this.completed=new Promise((e,t)=>{let r=this.stream.subscribe({next:e=>{this.state=this.reducer(this.state,e)},complete:()=>{e(),r.unsubscribe()},error:e=>{t(e),r.unsubscribe()}})})}}function n(e,t){return e+1}function i(e){return new r(e,n,0)}function o(e,t){return[...e,t]}function a(e){return new r(e,o,[])}function s(e,t){return t}function l(e){return new r(e,s,void 0)}t.Reducer=r,t.countStream=i,t.asArray=a,t.lastValue=l},7948:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ValueAndUpdates=void 0;let n=r(78518);class i{get value(){return this.producer.value}async waitFor(e){let t="function"==typeof e?e:t=>t===e;return new Promise((e,r)=>{let n=this.updates.subscribe({next:r=>{t(r)&&(e(r),setTimeout(()=>n.unsubscribe(),0))},complete:()=>{n.unsubscribe(),r("Update stream completed without expected value")},error:e=>{r(e)}})})}constructor(e){this.producer=e,this.updates=n.MemoryStream.createWithMemory(this.producer)}}t.ValueAndUpdates=i},4157:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pubkeyToAddress=t.pubkeyToRawAddress=t.rawSecp256k1PubkeyToRawAddress=t.rawEd25519PubkeyToRawAddress=void 0;let n=r(49400),i=r(69721);function o(e){if(32!==e.length)throw Error("Invalid Ed25519 pubkey length: ".concat(e.length));return(0,n.sha256)(e).slice(0,20)}function a(e){if(33!==e.length)throw Error("Invalid Secp256k1 pubkey length (compressed): ".concat(e.length));return(0,n.ripemd160)((0,n.sha256)(e))}function s(e,t){switch(e){case"ed25519":return o(t);case"secp256k1":return a(t);default:throw Error("Pubkey type ".concat(e," not supported"))}}function l(e,t){return(0,i.toHex)(s(e,t)).toUpperCase()}t.rawEd25519PubkeyToRawAddress=o,t.rawSecp256k1PubkeyToRawAddress=a,t.pubkeyToRawAddress=s,t.pubkeyToAddress=l},97758:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Responses=t.Params=void 0;var n=r(42387);Object.defineProperty(t,"Params",{enumerable:!0,get:function(){return n.Params}});var i=r(30927);Object.defineProperty(t,"Responses",{enumerable:!0,get:function(){return i.Responses}})},42387:function(e,t,r){"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Params=void 0;let a=r(69721),s=r(38496),l=r(69594),u=r(67020),d=o(r(35174));function c(e){return{height:(0,u.may)(s.smallIntToApi,e.height)}}function p(e){return{minHeight:(0,u.may)(s.smallIntToApi,e.minHeight),maxHeight:(0,u.may)(s.smallIntToApi,e.maxHeight)}}function f(e){return{query:e.query,page:(0,u.may)(s.smallIntToApi,e.page),per_page:(0,u.may)(s.smallIntToApi,e.per_page),order_by:e.order_by}}function h(e){return{path:(0,u.assertNotEmpty)(e.path),data:(0,a.toHex)(e.data),height:(0,u.may)(s.smallIntToApi,e.height),prove:e.prove}}function g(e){return{tx:(0,a.toBase64)((0,u.assertNotEmpty)(e.tx))}}function m(e){return{hash:(0,a.toBase64)((0,u.assertNotEmpty)(e.hash)),prove:e.prove}}function y(e){return{query:e.query,prove:e.prove,page:(0,u.may)(s.smallIntToApi,e.page),per_page:(0,u.may)(s.smallIntToApi,e.per_page),order_by:e.order_by}}function v(e){return{height:(0,u.may)(s.smallIntToApi,e.height),page:(0,u.may)(s.smallIntToApi,e.page),per_page:(0,u.may)(s.smallIntToApi,e.per_page)}}class b{static encodeAbciInfo(e){return(0,l.createJsonRpcRequest)(e.method)}static encodeAbciQuery(e){return(0,l.createJsonRpcRequest)(e.method,h(e.params))}static encodeBlock(e){return(0,l.createJsonRpcRequest)(e.method,c(e.params))}static encodeBlockchain(e){return(0,l.createJsonRpcRequest)(e.method,p(e.params))}static encodeBlockResults(e){return(0,l.createJsonRpcRequest)(e.method,c(e.params))}static encodeBlockSearch(e){return(0,l.createJsonRpcRequest)(e.method,f(e.params))}static encodeBroadcastTx(e){return(0,l.createJsonRpcRequest)(e.method,g(e.params))}static encodeCommit(e){return(0,l.createJsonRpcRequest)(e.method,c(e.params))}static encodeGenesis(e){return(0,l.createJsonRpcRequest)(e.method)}static encodeHealth(e){return(0,l.createJsonRpcRequest)(e.method)}static encodeNumUnconfirmedTxs(e){return(0,l.createJsonRpcRequest)(e.method)}static encodeStatus(e){return(0,l.createJsonRpcRequest)(e.method)}static encodeSubscribe(e){let t={key:"tm.event",value:e.query.type},r=d.buildQuery({tags:[t],raw:e.query.raw});return(0,l.createJsonRpcRequest)("subscribe",{query:r})}static encodeTx(e){return(0,l.createJsonRpcRequest)(e.method,m(e.params))}static encodeTxSearch(e){return(0,l.createJsonRpcRequest)(e.method,y(e.params))}static encodeValidators(e){return(0,l.createJsonRpcRequest)(e.method,v(e.params))}}t.Params=b},30927:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Responses=t.decodeValidatorInfo=t.decodeValidatorGenesis=t.decodeValidatorUpdate=t.decodeEvent=void 0;let n=r(69721),i=r(67357),o=r(82002),a=r(38496),s=r(25492),l=r(67020),u=r(40909);function d(e){return{data:e.data,lastBlockHeight:(0,l.may)(a.apiToSmallInt,e.last_block_height),lastBlockAppHash:(0,l.may)(n.fromBase64,e.last_block_app_hash)}}function c(e){return{ops:e.ops.map(e=>({type:e.type,key:(0,n.fromBase64)(e.key),data:(0,n.fromBase64)(e.data)}))}}function p(e){var t,r,i,o;return{key:(0,n.fromBase64)((0,l.assertString)(null!==(t=e.key)&&void 0!==t?t:"")),value:(0,n.fromBase64)((0,l.assertString)(null!==(r=e.value)&&void 0!==r?r:"")),proof:(0,l.may)(c,e.proofOps),height:(0,l.may)(a.apiToSmallInt,e.height),code:(0,l.may)(a.apiToSmallInt,e.code),codespace:(0,l.assertString)(null!==(i=e.codespace)&&void 0!==i?i:""),index:(0,l.may)(a.apiToSmallInt,e.index),log:e.log,info:(0,l.assertString)(null!==(o=e.info)&&void 0!==o?o:"")}}function f(e){var t;return{key:(0,l.assertNotEmpty)(e.key),value:null!==(t=e.value)&&void 0!==t?t:""}}function h(e){return(0,l.assertArray)(e).map(f)}function g(e){return{type:e.type,attributes:e.attributes?h(e.attributes):[]}}function m(e){return(0,l.assertArray)(e).map(g)}function y(e){var t,r,i;return{code:(0,a.apiToSmallInt)((0,l.assertNumber)(null!==(t=e.code)&&void 0!==t?t:0)),codespace:e.codespace,log:e.log,data:(0,l.may)(n.fromBase64,e.data),events:e.events?m(e.events):[],gasWanted:(0,a.apiToBigInt)(null!==(r=e.gas_wanted)&&void 0!==r?r:"0"),gasUsed:(0,a.apiToBigInt)(null!==(i=e.gas_used)&&void 0!==i?i:"0")}}function v(e){if("Sum"in e){let[[t,r]]=Object.entries(e.Sum.value);return(0,i.assert)("ed25519"===t||"secp256k1"===t,"unknown pubkey type: ".concat(t)),{algorithm:t,data:(0,n.fromBase64)((0,l.assertNotEmpty)(r))}}switch(e.type){case"tendermint/PubKeyEd25519":return{algorithm:"ed25519",data:(0,n.fromBase64)((0,l.assertNotEmpty)(e.value))};case"tendermint/PubKeySecp256k1":return{algorithm:"secp256k1",data:(0,n.fromBase64)((0,l.assertNotEmpty)(e.value))};default:throw Error("unknown pubkey type: ".concat(e.type))}}function b(e){return{maxBytes:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.max_bytes)),maxGas:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.max_gas))}}function S(e){return{maxAgeNumBlocks:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.max_age_num_blocks)),maxAgeDuration:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.max_age_duration))}}function w(e){return{block:b((0,l.assertObject)(e.block)),evidence:S((0,l.assertObject)(e.evidence))}}function _(e){var t;return{pubkey:v((0,l.assertObject)(e.pub_key)),votingPower:(0,a.apiToBigInt)(null!==(t=e.power)&&void 0!==t?t:"0")}}function k(e){return{height:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.height)),results:(e.txs_results||[]).map(y),validatorUpdates:(e.validator_updates||[]).map(_),consensusUpdates:(0,l.may)(w,e.consensus_param_updates),beginBlockEvents:m(e.begin_block_events||[]),endBlockEvents:m(e.end_block_events||[])}}function O(e){return{hash:(0,n.fromHex)((0,l.assertNotEmpty)(e.hash)),parts:{total:(0,l.assertNotEmpty)(e.parts.total),hash:(0,n.fromHex)((0,l.assertNotEmpty)(e.parts.hash))}}}function P(e){var t;return{block:(0,a.apiToSmallInt)(e.block),app:(0,a.apiToSmallInt)(null!==(t=e.app)&&void 0!==t?t:0)}}function A(e){return{version:P(e.version),chainId:(0,l.assertNotEmpty)(e.chain_id),height:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.height)),time:(0,o.fromRfc3339WithNanoseconds)((0,l.assertNotEmpty)(e.time)),lastBlockId:e.last_block_id.hash?O(e.last_block_id):null,lastCommitHash:(0,n.fromHex)((0,l.assertSet)(e.last_commit_hash)),dataHash:(0,n.fromHex)((0,l.assertSet)(e.data_hash)),validatorsHash:(0,n.fromHex)((0,l.assertSet)(e.validators_hash)),nextValidatorsHash:(0,n.fromHex)((0,l.assertSet)(e.next_validators_hash)),consensusHash:(0,n.fromHex)((0,l.assertSet)(e.consensus_hash)),appHash:(0,n.fromHex)((0,l.assertSet)(e.app_hash)),lastResultsHash:(0,n.fromHex)((0,l.assertSet)(e.last_results_hash)),evidenceHash:(0,n.fromHex)((0,l.assertSet)(e.evidence_hash)),proposerAddress:(0,n.fromHex)((0,l.assertNotEmpty)(e.proposer_address))}}function I(e){return{blockId:O(e.block_id),blockSize:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.block_size)),header:A(e.header),numTxs:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.num_txs))}}function R(e){return{lastHeight:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.last_height)),blockMetas:(0,l.assertArray)(e.block_metas).map(I)}}function E(e){return{...y(e),hash:(0,n.fromHex)((0,l.assertNotEmpty)(e.hash))}}function T(e){let t=e.tx_result?y(e.tx_result):void 0;return{height:(0,a.apiToSmallInt)(e.height),hash:(0,n.fromHex)((0,l.assertNotEmpty)(e.hash)),checkTx:y((0,l.assertObject)(e.check_tx)),deliverTx:t,txResult:t}}function N(e){return(0,i.assert)(e in s.BlockIdFlag),e}function x(e){return{blockIdFlag:N(e.block_id_flag),validatorAddress:e.validator_address?(0,n.fromHex)(e.validator_address):void 0,timestamp:e.timestamp?(0,o.fromRfc3339WithNanoseconds)(e.timestamp):void 0,signature:e.signature?(0,n.fromBase64)(e.signature):void 0}}function B(e){return{blockId:O((0,l.assertObject)(e.block_id)),height:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.height)),round:(0,a.apiToSmallInt)(e.round),signatures:(0,l.assertArray)(e.signatures).map(x)}}function C(e){return{canonical:(0,l.assertBoolean)(e.canonical),header:A(e.signed_header.header),commit:B(e.signed_header.commit)}}function M(e){return{address:(0,n.fromHex)((0,l.assertNotEmpty)(e.address)),pubkey:v((0,l.assertObject)(e.pub_key)),votingPower:(0,a.apiToBigInt)((0,l.assertNotEmpty)(e.power))}}function D(e){return{genesisTime:(0,o.fromRfc3339WithNanoseconds)((0,l.assertNotEmpty)(e.genesis_time)),chainId:(0,l.assertNotEmpty)(e.chain_id),consensusParams:w(e.consensus_params),validators:e.validators?(0,l.assertArray)(e.validators).map(M):[],appHash:(0,n.fromHex)((0,l.assertSet)(e.app_hash)),appState:e.app_state}}function U(e){return{pubkey:v((0,l.assertObject)(e.pub_key)),votingPower:(0,a.apiToBigInt)((0,l.assertNotEmpty)(e.voting_power)),address:(0,n.fromHex)((0,l.assertNotEmpty)(e.address)),proposerPriority:e.proposer_priority?(0,a.apiToSmallInt)(e.proposer_priority):void 0}}function J(e){return{id:(0,n.fromHex)((0,l.assertNotEmpty)(e.id)),listenAddr:(0,l.assertNotEmpty)(e.listen_addr),network:(0,l.assertNotEmpty)(e.network),version:(0,l.assertString)(e.version),channels:(0,l.assertNotEmpty)(e.channels),moniker:(0,l.assertNotEmpty)(e.moniker),other:(0,l.dictionaryToStringMap)(e.other),protocolVersion:{app:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.protocol_version.app)),block:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.protocol_version.block)),p2p:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.protocol_version.p2p))}}}function j(e){let t=e.earliest_block_height?(0,a.apiToSmallInt)(e.earliest_block_height):void 0,r=e.earliest_block_time?(0,o.fromRfc3339WithNanoseconds)(e.earliest_block_time):void 0;return{earliestAppHash:e.earliest_app_hash?(0,n.fromHex)(e.earliest_app_hash):void 0,earliestBlockHash:e.earliest_block_hash?(0,n.fromHex)(e.earliest_block_hash):void 0,earliestBlockHeight:t||void 0,earliestBlockTime:(null==r?void 0:r.getTime())?r:void 0,latestBlockHash:(0,n.fromHex)((0,l.assertNotEmpty)(e.latest_block_hash)),latestAppHash:(0,n.fromHex)((0,l.assertNotEmpty)(e.latest_app_hash)),latestBlockTime:(0,o.fromRfc3339WithNanoseconds)((0,l.assertNotEmpty)(e.latest_block_time)),latestBlockHeight:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.latest_block_height)),catchingUp:(0,l.assertBoolean)(e.catching_up)}}function H(e){return{nodeInfo:J(e.node_info),syncInfo:j(e.sync_info),validatorInfo:U(e.validator_info)}}function q(e){return{data:(0,n.fromBase64)((0,l.assertNotEmpty)(e.data)),rootHash:(0,n.fromHex)((0,l.assertNotEmpty)(e.root_hash)),proof:{total:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.proof.total)),index:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.proof.index)),leafHash:(0,n.fromBase64)((0,l.assertNotEmpty)(e.proof.leaf_hash)),aunts:(0,l.assertArray)(e.proof.aunts).map(n.fromBase64)}}}function L(e){return{tx:(0,n.fromBase64)((0,l.assertNotEmpty)(e.tx)),result:y((0,l.assertObject)(e.tx_result)),height:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.height)),index:(0,a.apiToSmallInt)((0,l.assertNumber)(e.index)),hash:(0,n.fromHex)((0,l.assertNotEmpty)(e.hash)),proof:(0,l.may)(q,e.proof)}}function F(e){return{totalCount:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.total_count)),txs:(0,l.assertArray)(e.txs).map(L)}}function V(e){let t=(0,n.fromBase64)((0,l.assertNotEmpty)(e.tx));return{tx:t,hash:(0,u.hashTx)(t),result:y(e.result),height:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.height))}}function W(e){return{blockHeight:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.block_height)),validators:(0,l.assertArray)(e.validators).map(U),count:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.count)),total:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.total))}}function z(e){var t,r;return{header:A((0,l.assertObject)(e.header)),lastCommit:e.last_commit.block_id.hash?B((0,l.assertObject)(e.last_commit)):null,txs:e.data.txs?(0,l.assertArray)(e.data.txs).map(n.fromBase64):[],evidence:null!==(r=null===(t=e.evidence)||void 0===t?void 0:t.evidence)&&void 0!==r?r:[]}}function G(e){return{blockId:O(e.block_id),block:z(e.block)}}function Q(e){return{totalCount:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.total_count)),blocks:(0,l.assertArray)(e.blocks).map(G)}}function K(e){return{total:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.total)),totalBytes:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.total_bytes))}}t.decodeEvent=g,t.decodeValidatorUpdate=_,t.decodeValidatorGenesis=M,t.decodeValidatorInfo=U;class Y{static decodeAbciInfo(e){return d((0,l.assertObject)(e.result.response))}static decodeAbciQuery(e){return p((0,l.assertObject)(e.result.response))}static decodeBlock(e){return G(e.result)}static decodeBlockResults(e){return k(e.result)}static decodeBlockSearch(e){return Q(e.result)}static decodeBlockchain(e){return R(e.result)}static decodeBroadcastTxSync(e){return E(e.result)}static decodeBroadcastTxAsync(e){return Y.decodeBroadcastTxSync(e)}static decodeBroadcastTxCommit(e){return T(e.result)}static decodeCommit(e){return C(e.result)}static decodeGenesis(e){return D((0,l.assertObject)(e.result.genesis))}static decodeHealth(){return null}static decodeNumUnconfirmedTxs(e){return K(e.result)}static decodeStatus(e){return H(e.result)}static decodeNewBlockEvent(e){return z(e.data.value.block)}static decodeNewBlockHeaderEvent(e){return A(e.data.value.header)}static decodeTxEvent(e){return V(e.data.value.TxResult)}static decodeTx(e){return L(e.result)}static decodeTxSearch(e){return F(e.result)}static decodeValidators(e){return W(e.result)}}t.Responses=Y},25660:function(e,t,r){"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Comet38Client=void 0;let a=r(69594),s=r(40064),l=r(97758),u=o(r(35174));class d{static async connect(e){let t;return t="object"==typeof e?new s.HttpClient(e):e.startsWith("http://")||e.startsWith("https://")?new s.HttpClient(e):new s.WebsocketClient(e),await this.detectVersion(t),d.create(t)}static async create(e){return new d(e)}static async detectVersion(e){let t=(0,a.createJsonRpcRequest)(u.Method.Status),r=(await e.execute(t)).result;if(!r||!r.node_info)throw Error("Unrecognized format for status response");let n=r.node_info.version;if("string"!=typeof n)throw Error("Unrecognized version format: must be string");return n}disconnect(){this.client.disconnect()}async abciInfo(){let e={method:u.Method.AbciInfo};return this.doCall(e,l.Params.encodeAbciInfo,l.Responses.decodeAbciInfo)}async abciQuery(e){let t={params:e,method:u.Method.AbciQuery};return this.doCall(t,l.Params.encodeAbciQuery,l.Responses.decodeAbciQuery)}async block(e){let t={method:u.Method.Block,params:{height:e}};return this.doCall(t,l.Params.encodeBlock,l.Responses.decodeBlock)}async blockResults(e){let t={method:u.Method.BlockResults,params:{height:e}};return this.doCall(t,l.Params.encodeBlockResults,l.Responses.decodeBlockResults)}async blockSearch(e){let t={params:e,method:u.Method.BlockSearch},r=await this.doCall(t,l.Params.encodeBlockSearch,l.Responses.decodeBlockSearch);return{...r,blocks:[...r.blocks].sort((e,t)=>e.block.header.height-t.block.header.height)}}async blockSearchAll(e){let t=e.page||1,r=[],n=!1;for(;!n;){let i=await this.blockSearch({...e,page:t});r.push(...i.blocks),r.lengthe.block.header.height-t.block.header.height),{totalCount:r.length,blocks:r}}async blockchain(e,t){let r={method:u.Method.Blockchain,params:{minHeight:e,maxHeight:t}};return this.doCall(r,l.Params.encodeBlockchain,l.Responses.decodeBlockchain)}async broadcastTxSync(e){let t={params:e,method:u.Method.BroadcastTxSync};return this.doCall(t,l.Params.encodeBroadcastTx,l.Responses.decodeBroadcastTxSync)}async broadcastTxAsync(e){let t={params:e,method:u.Method.BroadcastTxAsync};return this.doCall(t,l.Params.encodeBroadcastTx,l.Responses.decodeBroadcastTxAsync)}async broadcastTxCommit(e){let t={params:e,method:u.Method.BroadcastTxCommit};return this.doCall(t,l.Params.encodeBroadcastTx,l.Responses.decodeBroadcastTxCommit)}async commit(e){let t={method:u.Method.Commit,params:{height:e}};return this.doCall(t,l.Params.encodeCommit,l.Responses.decodeCommit)}async genesis(){let e={method:u.Method.Genesis};return this.doCall(e,l.Params.encodeGenesis,l.Responses.decodeGenesis)}async health(){let e={method:u.Method.Health};return this.doCall(e,l.Params.encodeHealth,l.Responses.decodeHealth)}async numUnconfirmedTxs(){let e={method:u.Method.NumUnconfirmedTxs};return this.doCall(e,l.Params.encodeNumUnconfirmedTxs,l.Responses.decodeNumUnconfirmedTxs)}async status(){let e={method:u.Method.Status};return this.doCall(e,l.Params.encodeStatus,l.Responses.decodeStatus)}subscribeNewBlock(){let e={method:u.Method.Subscribe,query:{type:u.SubscriptionEventType.NewBlock}};return this.subscribe(e,l.Responses.decodeNewBlockEvent)}subscribeNewBlockHeader(){let e={method:u.Method.Subscribe,query:{type:u.SubscriptionEventType.NewBlockHeader}};return this.subscribe(e,l.Responses.decodeNewBlockHeaderEvent)}subscribeTx(e){let t={method:u.Method.Subscribe,query:{type:u.SubscriptionEventType.Tx,raw:e}};return this.subscribe(t,l.Responses.decodeTxEvent)}async tx(e){let t={params:e,method:u.Method.Tx};return this.doCall(t,l.Params.encodeTx,l.Responses.decodeTx)}async txSearch(e){let t={params:e,method:u.Method.TxSearch};return this.doCall(t,l.Params.encodeTxSearch,l.Responses.decodeTxSearch)}async txSearchAll(e){let t=e.page||1,r=[],n=!1;for(;!n;){let i=await this.txSearch({...e,page:t});r.push(...i.txs),r.lengtht(e))}constructor(e){this.client=e}}t.Comet38Client=d},67020:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeBlockId=t.encodeVersion=t.encodeBytes=t.encodeTime=t.encodeUvarint=t.encodeString=t.dictionaryToStringMap=t.may=t.assertNotEmpty=t.assertObject=t.assertArray=t.assertNumber=t.assertString=t.assertBoolean=t.assertSet=void 0;let n=r(69721);function i(e){if(void 0===e)throw Error("Value must not be undefined");if(null===e)throw Error("Value must not be null");return e}function o(e){if(i(e),"boolean"!=typeof e)throw Error("Value must be a boolean");return e}function a(e){if(i(e),"string"!=typeof e)throw Error("Value must be a string");return e}function s(e){if(i(e),"number"!=typeof e)throw Error("Value must be a number");return e}function l(e){if(i(e),!Array.isArray(e))throw Error("Value must be a an array");return e}function u(e){if(i(e),"object"!=typeof e)throw Error("Value must be an object");if("[object Object]"!==Object.prototype.toString.call(e))throw Error("Value must be a simple object");return e}function d(e){if(i(e),"number"==typeof e&&0===e)throw Error("must provide a non-zero value");if(0===e.length)throw Error("must provide a non-empty value");return e}function c(e,t){return null==t?void 0:e(t)}function p(e){let t=new Map;for(let r of Object.keys(e)){let n=e[r];if("string"!=typeof n)throw Error("Found dictionary value of type other than string");t.set(r,n)}return t}function f(e){let t=(0,n.toUtf8)(e);return Uint8Array.from([t.length,...t])}function h(e){return e>=128?Uint8Array.from([255&e|128,...h(e>>7)]):Uint8Array.from([255&e])}function g(e){let t=e.getTime(),r=Math.floor(t/1e3),n=r?[8,...h(r)]:new Uint8Array,i=(e.nanoseconds||0)+t%1e3*1e6,o=i?[16,...h(i)]:new Uint8Array;return Uint8Array.from([...n,...o])}function m(e){if(e.length>=128)throw Error("Not implemented for byte arrays of length 128 or more");return e.length?Uint8Array.from([e.length,...e]):new Uint8Array}function y(e){let t=e.block?Uint8Array.from([8,...h(e.block)]):new Uint8Array,r=e.app?Uint8Array.from([16,...h(e.app)]):new Uint8Array;return Uint8Array.from([...t,...r])}function v(e){return Uint8Array.from([10,e.hash.length,...e.hash,18,e.parts.hash.length+4,8,e.parts.total,18,e.parts.hash.length,...e.parts.hash])}t.assertSet=i,t.assertBoolean=o,t.assertString=a,t.assertNumber=s,t.assertArray=l,t.assertObject=u,t.assertNotEmpty=d,t.may=c,t.dictionaryToStringMap=p,t.encodeString=f,t.encodeUvarint=h,t.encodeTime=g,t.encodeBytes=m,t.encodeVersion=y,t.encodeBlockId=v},40909:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hashBlock=t.hashTx=void 0;let n=r(49400),i=r(67020);function o(e){return(0,n.sha256)(e)}function a(e){if(e<1)throw Error("Cannot split an empty tree");let t=2**Math.floor(Math.log2(e));return t"".concat(e.key,"='").concat(e.value,"'")),...e.raw?[e.raw]:[]].join(" AND ")}Object.defineProperty(t,"__esModule",{value:!0}),t.buildQuery=t.SubscriptionEventType=t.Method=void 0,function(e){e.AbciInfo="abci_info",e.AbciQuery="abci_query",e.Block="block",e.Blockchain="blockchain",e.BlockResults="block_results",e.BlockSearch="block_search",e.BroadcastTxAsync="broadcast_tx_async",e.BroadcastTxSync="broadcast_tx_sync",e.BroadcastTxCommit="broadcast_tx_commit",e.Commit="commit",e.Genesis="genesis",e.Health="health",e.NumUnconfirmedTxs="num_unconfirmed_txs",e.Status="status",e.Subscribe="subscribe",e.Tx="tx",e.TxSearch="tx_search",e.Validators="validators",e.Unsubscribe="unsubscribe"}(r=t.Method||(t.Method={})),function(e){e.NewBlock="NewBlock",e.NewBlockHeader="NewBlockHeader",e.Tx="Tx"}(n=t.SubscriptionEventType||(t.SubscriptionEventType={})),t.buildQuery=i},69839:function(e,t){"use strict";var r;function n(e){return 0===e.code}function i(e){return 0===e.checkTx.code&&!!e.deliverTx&&0===e.deliverTx.code}Object.defineProperty(t,"__esModule",{value:!0}),t.VoteType=t.broadcastTxCommitSuccess=t.broadcastTxSyncSuccess=void 0,t.broadcastTxSyncSuccess=n,t.broadcastTxCommitSuccess=i,function(e){e[e.PreVote=1]="PreVote",e[e.PreCommit=2]="PreCommit"}(r=t.VoteType||(t.VoteType={}))},82002:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DateTime=t.toSeconds=t.fromSeconds=t.toRfc3339WithNanoseconds=t.fromRfc3339WithNanoseconds=void 0;let n=r(69721),i=r(35801);function o(e){let t=(0,n.fromRfc3339)(e),r=e.match(/\.(\d+)Z$/),i=r?r[1].slice(3):"";return t.nanoseconds=parseInt(i.padEnd(6,"0"),10),t}function a(e){var t,r;let n=e.toISOString(),i=null!==(r=null===(t=e.nanoseconds)||void 0===t?void 0:t.toString())&&void 0!==r?r:"";return"".concat(n.slice(0,-1)).concat(i.padStart(6,"0"),"Z")}function s(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=new i.Uint32(t).toNumber();if(r>999999999)throw Error("Nano seconds must not exceed 999999999");let n=new Date(1e3*e+Math.floor(r/1e6));return n.nanoseconds=r%1e6,n}function l(e){var t;return{seconds:Math.floor(e.getTime()/1e3),nanos:e.getTime()%1e3*1e6+(null!==(t=e.nanoseconds)&&void 0!==t?t:0)}}t.fromRfc3339WithNanoseconds=o,t.toRfc3339WithNanoseconds=a,t.fromSeconds=s,t.toSeconds=l;class u{static decode(e){return o(e)}static encode(e){return a(e)}}t.DateTime=u},43890:function(e,t,r){"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.BlockIdFlag=t.isTendermint37Client=t.isTendermint34Client=t.isComet38Client=t.connectComet=t.Tendermint37Client=t.tendermint37=t.Tendermint34Client=t.tendermint34=t.VoteType=t.SubscriptionEventType=t.Method=t.broadcastTxSyncSuccess=t.broadcastTxCommitSuccess=t.WebsocketClient=t.HttpClient=t.HttpBatchClient=t.Comet38Client=t.comet38=t.toSeconds=t.toRfc3339WithNanoseconds=t.fromSeconds=t.fromRfc3339WithNanoseconds=t.DateTime=t.rawSecp256k1PubkeyToRawAddress=t.rawEd25519PubkeyToRawAddress=t.pubkeyToRawAddress=t.pubkeyToAddress=void 0;var a=r(4157);Object.defineProperty(t,"pubkeyToAddress",{enumerable:!0,get:function(){return a.pubkeyToAddress}}),Object.defineProperty(t,"pubkeyToRawAddress",{enumerable:!0,get:function(){return a.pubkeyToRawAddress}}),Object.defineProperty(t,"rawEd25519PubkeyToRawAddress",{enumerable:!0,get:function(){return a.rawEd25519PubkeyToRawAddress}}),Object.defineProperty(t,"rawSecp256k1PubkeyToRawAddress",{enumerable:!0,get:function(){return a.rawSecp256k1PubkeyToRawAddress}});var s=r(82002);Object.defineProperty(t,"DateTime",{enumerable:!0,get:function(){return s.DateTime}}),Object.defineProperty(t,"fromRfc3339WithNanoseconds",{enumerable:!0,get:function(){return s.fromRfc3339WithNanoseconds}}),Object.defineProperty(t,"fromSeconds",{enumerable:!0,get:function(){return s.fromSeconds}}),Object.defineProperty(t,"toRfc3339WithNanoseconds",{enumerable:!0,get:function(){return s.toRfc3339WithNanoseconds}}),Object.defineProperty(t,"toSeconds",{enumerable:!0,get:function(){return s.toSeconds}}),t.comet38=o(r(38224));var l=r(38224);Object.defineProperty(t,"Comet38Client",{enumerable:!0,get:function(){return l.Comet38Client}});var u=r(40064);Object.defineProperty(t,"HttpBatchClient",{enumerable:!0,get:function(){return u.HttpBatchClient}}),Object.defineProperty(t,"HttpClient",{enumerable:!0,get:function(){return u.HttpClient}}),Object.defineProperty(t,"WebsocketClient",{enumerable:!0,get:function(){return u.WebsocketClient}});var d=r(26419);Object.defineProperty(t,"broadcastTxCommitSuccess",{enumerable:!0,get:function(){return d.broadcastTxCommitSuccess}}),Object.defineProperty(t,"broadcastTxSyncSuccess",{enumerable:!0,get:function(){return d.broadcastTxSyncSuccess}}),Object.defineProperty(t,"Method",{enumerable:!0,get:function(){return d.Method}}),Object.defineProperty(t,"SubscriptionEventType",{enumerable:!0,get:function(){return d.SubscriptionEventType}}),Object.defineProperty(t,"VoteType",{enumerable:!0,get:function(){return d.VoteType}}),t.tendermint34=o(r(26419));var c=r(26419);Object.defineProperty(t,"Tendermint34Client",{enumerable:!0,get:function(){return c.Tendermint34Client}}),t.tendermint37=o(r(18570));var p=r(18570);Object.defineProperty(t,"Tendermint37Client",{enumerable:!0,get:function(){return p.Tendermint37Client}});var f=r(98265);Object.defineProperty(t,"connectComet",{enumerable:!0,get:function(){return f.connectComet}}),Object.defineProperty(t,"isComet38Client",{enumerable:!0,get:function(){return f.isComet38Client}}),Object.defineProperty(t,"isTendermint34Client",{enumerable:!0,get:function(){return f.isTendermint34Client}}),Object.defineProperty(t,"isTendermint37Client",{enumerable:!0,get:function(){return f.isTendermint37Client}});var h=r(25492);Object.defineProperty(t,"BlockIdFlag",{enumerable:!0,get:function(){return h.BlockIdFlag}})},38496:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.smallIntToApi=t.apiToBigInt=t.apiToSmallInt=void 0;let n=r(35801),i=r(82276);function o(e){return("number"==typeof e?new n.Int53(e):n.Int53.fromString(e)).toNumber()}function a(e){if((0,i.assertString)(e),!e.match(/^-?[0-9]+$/))throw Error("Invalid string format");return BigInt(e)}function s(e){return new n.Int53(e).toString()}t.apiToSmallInt=o,t.apiToBigInt=a,t.smallIntToApi=s},69594:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createJsonRpcRequest=void 0;let r="123456789";function n(){return r[Math.floor(Math.random()*r.length)]}function i(){return parseInt(Array.from({length:12}).map(()=>n()).join(""),10)}function o(e,t){let r=t?{...t}:{};return{jsonrpc:"2.0",id:i(),method:e,params:r}}t.createJsonRpcRequest=o},65659:function(e,t,r){"use strict";var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.http=void 0;let i=n(r(64109));function o(e){if(e.status>=400)throw Error("Bad status on response: ".concat(e.status));return e}function a(e){return e.toString().includes("emitExperimentalWarning")}async function s(e,t,r,n){if("function"!=typeof fetch||a(fetch))return i.default.request({url:t,method:e,data:n,headers:r}).then(e=>e.data);{let i={method:e,body:n?JSON.stringify(n):void 0,headers:{"Content-Type":"application/json",...r}};return fetch(t,i).then(o).then(e=>e.json())}}t.http=s},19368:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HttpBatchClient=void 0;let n=r(79133),i=r(65659),o=r(94801),a={dispatchInterval:20,batchSizeLimit:20};class s{disconnect(){this.timer&&clearInterval(this.timer),this.timer=void 0}async execute(e){return new Promise((t,r)=>{this.queue.push({request:e,resolve:t,reject:r}),this.queue.length>=this.options.batchSizeLimit&&this.tick()})}validate(){if(!this.options.batchSizeLimit||!Number.isSafeInteger(this.options.batchSizeLimit)||this.options.batchSizeLimit<1)throw Error("batchSizeLimit must be a safe integer >= 1")}tick(){let e=this.queue.splice(0,this.options.batchSizeLimit);if(!e.length)return;let t=e.map(e=>e.request),r=t.map(e=>e.id);(0,i.http)("POST",this.url,this.headers,t).then(t=>{(Array.isArray(t)?t:[t]).forEach(t=>{let r=e.find(e=>e.request.id===t.id);if(!r)return;let{reject:i,resolve:o}=r,a=(0,n.parseJsonRpcResponse)(t);(0,n.isJsonRpcErrorResponse)(a)?i(Error(JSON.stringify(a.error))):o(a)})},t=>{for(let n of r){let r=e.find(e=>e.request.id===n);if(!r)return;r.reject(t)}})}constructor(e,t={}){var r,n;if(this.queue=[],this.options={batchSizeLimit:null!==(r=t.batchSizeLimit)&&void 0!==r?r:a.batchSizeLimit,dispatchInterval:null!==(n=t.dispatchInterval)&&void 0!==n?n:a.dispatchInterval},"string"==typeof e){if(!(0,o.hasProtocol)(e))throw Error("Endpoint URL is missing a protocol. Expected 'https://' or 'http://'.");this.url=e}else this.url=e.url,this.headers=e.headers;this.timer=setInterval(()=>this.tick(),t.dispatchInterval),this.validate()}}t.HttpBatchClient=s},83924:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HttpClient=void 0;let n=r(79133),i=r(65659),o=r(94801);class a{disconnect(){}async execute(e){let t=(0,n.parseJsonRpcResponse)(await (0,i.http)("POST",this.url,this.headers,e));if((0,n.isJsonRpcErrorResponse)(t))throw Error(JSON.stringify(t.error));return t}constructor(e){if("string"==typeof e){if(!(0,o.hasProtocol)(e))throw Error("Endpoint URL is missing a protocol. Expected 'https://' or 'http://'.");this.url=e}else this.url=e.url,this.headers=e.headers}}t.HttpClient=a},40064:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebsocketClient=t.instanceOfRpcStreamingClient=t.HttpClient=t.HttpBatchClient=void 0;var n=r(19368);Object.defineProperty(t,"HttpBatchClient",{enumerable:!0,get:function(){return n.HttpBatchClient}});var i=r(83924);Object.defineProperty(t,"HttpClient",{enumerable:!0,get:function(){return i.HttpClient}});var o=r(94801);Object.defineProperty(t,"instanceOfRpcStreamingClient",{enumerable:!0,get:function(){return o.instanceOfRpcStreamingClient}});var a=r(82259);Object.defineProperty(t,"WebsocketClient",{enumerable:!0,get:function(){return a.WebsocketClient}})},94801:function(e,t){"use strict";function r(e){return"function"==typeof e.listen}function n(e){return -1!==e.search("://")}Object.defineProperty(t,"__esModule",{value:!0}),t.hasProtocol=t.instanceOfRpcStreamingClient=void 0,t.instanceOfRpcStreamingClient=r,t.hasProtocol=n},82259:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebsocketClient=void 0;let n=r(79133),i=r(99593),o=r(15786),a=r(78518),s=r(94801);function l(e){throw e}function u(e){if("message"!==e.type)throw Error("Unexcepted message type on websocket: ".concat(e.type));return(0,n.parseJsonRpcResponse)(JSON.parse(e.data))}class d{start(e){if(this.running)throw Error("Already started. Please stop first before restarting.");this.running=!0,this.connectToClient(e),this.socket.queueRequest(JSON.stringify(this.request))}stop(){this.running=!1;let e={...this.request,method:"unsubscribe"};try{this.socket.queueRequest(JSON.stringify(e))}catch(e){if(e instanceof Error&&e.message.match(/socket has disconnected/i));else throw e}}connectToClient(e){let t=this.socket.events.map(u),r=t.filter(e=>e.id===this.request.id).subscribe({next:t=>{(0,n.isJsonRpcErrorResponse)(t)&&(this.closeSubscriptions(),e.error(JSON.stringify(t.error))),r.unsubscribe()}}),i=t.filter(e=>e.id===this.request.id).subscribe({next:t=>{(0,n.isJsonRpcErrorResponse)(t)?(this.closeSubscriptions(),e.error(JSON.stringify(t.error))):e.next(t.result)}}),o=t.subscribe({error:t=>{this.closeSubscriptions(),e.error(t)},complete:()=>{this.closeSubscriptions(),e.complete()}});this.subscriptions.push(r,i,o)}closeSubscriptions(){for(let e of this.subscriptions)e.unsubscribe();this.subscriptions=[]}constructor(e,t){this.running=!1,this.subscriptions=[],this.request=e,this.socket=t}}class c{async execute(e){let t=this.responseForRequestId(e.id);this.socket.queueRequest(JSON.stringify(e));let r=await t;if((0,n.isJsonRpcErrorResponse)(r))throw Error(JSON.stringify(r.error));return r}listen(e){if("subscribe"!==e.method)throw Error('Request method must be "subscribe" to start event listening');let t=e.params.query;if("string"!=typeof t)throw Error("request.params.query must be a string");if(!this.subscriptionStreams.has(t)){let r=new d(e,this.socket),n=a.Stream.create(r);this.subscriptionStreams.set(t,n)}return this.subscriptionStreams.get(t).filter(e=>void 0!==e.query)}async connected(){await this.socket.connectionStatus.waitFor(i.ConnectionStatus.Connected)}disconnect(){this.socket.disconnect()}async responseForRequestId(e){return(0,o.firstEvent)(this.jsonRpcResponseStream.filter(t=>t.id===e))}constructor(e,t=l){if(this.subscriptionStreams=new Map,!(0,s.hasProtocol)(e))throw Error("Base URL is missing a protocol. Expected 'ws://' or 'wss://'.");let r=e.endsWith("/")?"websocket":"/websocket";this.url=e+r,this.socket=new i.ReconnectingSocket(this.url);let n=this.socket.events.subscribe({error:e=>{t(e),n.unsubscribe()}});this.jsonRpcResponseStream=this.socket.events.map(u),this.socket.connect()}}t.WebsocketClient=c},96920:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Responses=t.Params=void 0;var n=r(45965);Object.defineProperty(t,"Params",{enumerable:!0,get:function(){return n.Params}});var i=r(93976);Object.defineProperty(t,"Responses",{enumerable:!0,get:function(){return i.Responses}})},45965:function(e,t,r){"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Params=void 0;let a=r(69721),s=r(38496),l=r(69594),u=r(82276),d=o(r(76378));function c(e){return{height:(0,u.may)(s.smallIntToApi,e.height)}}function p(e){return{minHeight:(0,u.may)(s.smallIntToApi,e.minHeight),maxHeight:(0,u.may)(s.smallIntToApi,e.maxHeight)}}function f(e){return{query:e.query,page:(0,u.may)(s.smallIntToApi,e.page),per_page:(0,u.may)(s.smallIntToApi,e.per_page),order_by:e.order_by}}function h(e){return{path:(0,u.assertNotEmpty)(e.path),data:(0,a.toHex)(e.data),height:(0,u.may)(s.smallIntToApi,e.height),prove:e.prove}}function g(e){return{tx:(0,a.toBase64)((0,u.assertNotEmpty)(e.tx))}}function m(e){return{hash:(0,a.toBase64)((0,u.assertNotEmpty)(e.hash)),prove:e.prove}}function y(e){return{query:e.query,prove:e.prove,page:(0,u.may)(s.smallIntToApi,e.page),per_page:(0,u.may)(s.smallIntToApi,e.per_page),order_by:e.order_by}}function v(e){return{height:(0,u.may)(s.smallIntToApi,e.height),page:(0,u.may)(s.smallIntToApi,e.page),per_page:(0,u.may)(s.smallIntToApi,e.per_page)}}class b{static encodeAbciInfo(e){return(0,l.createJsonRpcRequest)(e.method)}static encodeAbciQuery(e){return(0,l.createJsonRpcRequest)(e.method,h(e.params))}static encodeBlock(e){return(0,l.createJsonRpcRequest)(e.method,c(e.params))}static encodeBlockchain(e){return(0,l.createJsonRpcRequest)(e.method,p(e.params))}static encodeBlockResults(e){return(0,l.createJsonRpcRequest)(e.method,c(e.params))}static encodeBlockSearch(e){return(0,l.createJsonRpcRequest)(e.method,f(e.params))}static encodeBroadcastTx(e){return(0,l.createJsonRpcRequest)(e.method,g(e.params))}static encodeCommit(e){return(0,l.createJsonRpcRequest)(e.method,c(e.params))}static encodeGenesis(e){return(0,l.createJsonRpcRequest)(e.method)}static encodeHealth(e){return(0,l.createJsonRpcRequest)(e.method)}static encodeNumUnconfirmedTxs(e){return(0,l.createJsonRpcRequest)(e.method)}static encodeStatus(e){return(0,l.createJsonRpcRequest)(e.method)}static encodeSubscribe(e){let t={key:"tm.event",value:e.query.type},r=d.buildQuery({tags:[t],raw:e.query.raw});return(0,l.createJsonRpcRequest)("subscribe",{query:r})}static encodeTx(e){return(0,l.createJsonRpcRequest)(e.method,m(e.params))}static encodeTxSearch(e){return(0,l.createJsonRpcRequest)(e.method,y(e.params))}static encodeValidators(e){return(0,l.createJsonRpcRequest)(e.method,v(e.params))}}t.Params=b},93976:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Responses=t.decodeValidatorInfo=t.decodeValidatorGenesis=t.decodeValidatorUpdate=t.decodeEvent=void 0;let n=r(69721),i=r(67357),o=r(82002),a=r(38496),s=r(25492),l=r(82276),u=r(96568);function d(e){return{data:e.data,lastBlockHeight:(0,l.may)(a.apiToSmallInt,e.last_block_height),lastBlockAppHash:(0,l.may)(n.fromBase64,e.last_block_app_hash)}}function c(e){return{ops:e.ops.map(e=>({type:e.type,key:(0,n.fromBase64)(e.key),data:(0,n.fromBase64)(e.data)}))}}function p(e){var t,r,i,o;return{key:(0,n.fromBase64)((0,l.assertString)(null!==(t=e.key)&&void 0!==t?t:"")),value:(0,n.fromBase64)((0,l.assertString)(null!==(r=e.value)&&void 0!==r?r:"")),proof:(0,l.may)(c,e.proofOps),height:(0,l.may)(a.apiToSmallInt,e.height),code:(0,l.may)(a.apiToSmallInt,e.code),codespace:(0,l.assertString)(null!==(i=e.codespace)&&void 0!==i?i:""),index:(0,l.may)(a.apiToSmallInt,e.index),log:e.log,info:(0,l.assertString)(null!==(o=e.info)&&void 0!==o?o:"")}}function f(e){var t;return{key:(0,n.fromBase64)((0,l.assertNotEmpty)(e.key)),value:(0,n.fromBase64)((0,l.assertString)(null!==(t=e.value)&&void 0!==t?t:""))}}function h(e){return(0,l.assertArray)(e).map(f)}function g(e){return{type:e.type,attributes:e.attributes?h(e.attributes):[]}}function m(e){return(0,l.assertArray)(e).map(g)}function y(e){var t,r,i;return{code:(0,a.apiToSmallInt)((0,l.assertNumber)(null!==(t=e.code)&&void 0!==t?t:0)),codespace:e.codespace,log:e.log,data:(0,l.may)(n.fromBase64,e.data),events:e.events?m(e.events):[],gasWanted:(0,a.apiToBigInt)(null!==(r=e.gas_wanted)&&void 0!==r?r:"0"),gasUsed:(0,a.apiToBigInt)(null!==(i=e.gas_used)&&void 0!==i?i:"0")}}function v(e){if("Sum"in e){let[[t,r]]=Object.entries(e.Sum.value);return(0,i.assert)("ed25519"===t||"secp256k1"===t,"unknown pubkey type: ".concat(t)),{algorithm:t,data:(0,n.fromBase64)((0,l.assertNotEmpty)(r))}}switch(e.type){case"tendermint/PubKeyEd25519":return{algorithm:"ed25519",data:(0,n.fromBase64)((0,l.assertNotEmpty)(e.value))};case"tendermint/PubKeySecp256k1":return{algorithm:"secp256k1",data:(0,n.fromBase64)((0,l.assertNotEmpty)(e.value))};default:throw Error("unknown pubkey type: ".concat(e.type))}}function b(e){return{maxBytes:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.max_bytes)),maxGas:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.max_gas))}}function S(e){return{maxAgeNumBlocks:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.max_age_num_blocks)),maxAgeDuration:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.max_age_duration))}}function w(e){return{block:b((0,l.assertObject)(e.block)),evidence:S((0,l.assertObject)(e.evidence))}}function _(e){var t;return{pubkey:v((0,l.assertObject)(e.pub_key)),votingPower:(0,a.apiToBigInt)(null!==(t=e.power)&&void 0!==t?t:"0")}}function k(e){return{height:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.height)),results:(e.txs_results||[]).map(y),validatorUpdates:(e.validator_updates||[]).map(_),consensusUpdates:(0,l.may)(w,e.consensus_param_updates),beginBlockEvents:m(e.begin_block_events||[]),endBlockEvents:m(e.end_block_events||[])}}function O(e){return{hash:(0,n.fromHex)((0,l.assertNotEmpty)(e.hash)),parts:{total:(0,l.assertNotEmpty)(e.parts.total),hash:(0,n.fromHex)((0,l.assertNotEmpty)(e.parts.hash))}}}function P(e){var t;return{block:(0,a.apiToSmallInt)(e.block),app:(0,a.apiToSmallInt)(null!==(t=e.app)&&void 0!==t?t:0)}}function A(e){return{version:P(e.version),chainId:(0,l.assertNotEmpty)(e.chain_id),height:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.height)),time:(0,o.fromRfc3339WithNanoseconds)((0,l.assertNotEmpty)(e.time)),lastBlockId:e.last_block_id.hash?O(e.last_block_id):null,lastCommitHash:(0,n.fromHex)((0,l.assertSet)(e.last_commit_hash)),dataHash:(0,n.fromHex)((0,l.assertSet)(e.data_hash)),validatorsHash:(0,n.fromHex)((0,l.assertSet)(e.validators_hash)),nextValidatorsHash:(0,n.fromHex)((0,l.assertSet)(e.next_validators_hash)),consensusHash:(0,n.fromHex)((0,l.assertSet)(e.consensus_hash)),appHash:(0,n.fromHex)((0,l.assertSet)(e.app_hash)),lastResultsHash:(0,n.fromHex)((0,l.assertSet)(e.last_results_hash)),evidenceHash:(0,n.fromHex)((0,l.assertSet)(e.evidence_hash)),proposerAddress:(0,n.fromHex)((0,l.assertNotEmpty)(e.proposer_address))}}function I(e){return{blockId:O(e.block_id),blockSize:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.block_size)),header:A(e.header),numTxs:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.num_txs))}}function R(e){return{lastHeight:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.last_height)),blockMetas:(0,l.assertArray)(e.block_metas).map(I)}}function E(e){return{...y(e),hash:(0,n.fromHex)((0,l.assertNotEmpty)(e.hash))}}function T(e){return{height:(0,a.apiToSmallInt)(e.height),hash:(0,n.fromHex)((0,l.assertNotEmpty)(e.hash)),checkTx:y((0,l.assertObject)(e.check_tx)),deliverTx:(0,l.may)(y,e.deliver_tx)}}function N(e){return(0,i.assert)(e in s.BlockIdFlag),e}function x(e){return{blockIdFlag:N(e.block_id_flag),validatorAddress:e.validator_address?(0,n.fromHex)(e.validator_address):void 0,timestamp:e.timestamp?(0,o.fromRfc3339WithNanoseconds)(e.timestamp):void 0,signature:e.signature?(0,n.fromBase64)(e.signature):void 0}}function B(e){return{blockId:O((0,l.assertObject)(e.block_id)),height:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.height)),round:(0,a.apiToSmallInt)(e.round),signatures:(0,l.assertArray)(e.signatures).map(x)}}function C(e){return{canonical:(0,l.assertBoolean)(e.canonical),header:A(e.signed_header.header),commit:B(e.signed_header.commit)}}function M(e){return{address:(0,n.fromHex)((0,l.assertNotEmpty)(e.address)),pubkey:v((0,l.assertObject)(e.pub_key)),votingPower:(0,a.apiToBigInt)((0,l.assertNotEmpty)(e.power))}}function D(e){return{genesisTime:(0,o.fromRfc3339WithNanoseconds)((0,l.assertNotEmpty)(e.genesis_time)),chainId:(0,l.assertNotEmpty)(e.chain_id),consensusParams:w(e.consensus_params),validators:e.validators?(0,l.assertArray)(e.validators).map(M):[],appHash:(0,n.fromHex)((0,l.assertSet)(e.app_hash)),appState:e.app_state}}function U(e){return{pubkey:v((0,l.assertObject)(e.pub_key)),votingPower:(0,a.apiToBigInt)((0,l.assertNotEmpty)(e.voting_power)),address:(0,n.fromHex)((0,l.assertNotEmpty)(e.address)),proposerPriority:e.proposer_priority?(0,a.apiToSmallInt)(e.proposer_priority):void 0}}function J(e){return{id:(0,n.fromHex)((0,l.assertNotEmpty)(e.id)),listenAddr:(0,l.assertNotEmpty)(e.listen_addr),network:(0,l.assertNotEmpty)(e.network),version:(0,l.assertString)(e.version),channels:(0,l.assertNotEmpty)(e.channels),moniker:(0,l.assertNotEmpty)(e.moniker),other:(0,l.dictionaryToStringMap)(e.other),protocolVersion:{app:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.protocol_version.app)),block:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.protocol_version.block)),p2p:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.protocol_version.p2p))}}}function j(e){let t=e.earliest_block_height?(0,a.apiToSmallInt)(e.earliest_block_height):void 0,r=e.earliest_block_time?(0,o.fromRfc3339WithNanoseconds)(e.earliest_block_time):void 0;return{earliestAppHash:e.earliest_app_hash?(0,n.fromHex)(e.earliest_app_hash):void 0,earliestBlockHash:e.earliest_block_hash?(0,n.fromHex)(e.earliest_block_hash):void 0,earliestBlockHeight:t||void 0,earliestBlockTime:(null==r?void 0:r.getTime())?r:void 0,latestBlockHash:(0,n.fromHex)((0,l.assertNotEmpty)(e.latest_block_hash)),latestAppHash:(0,n.fromHex)((0,l.assertNotEmpty)(e.latest_app_hash)),latestBlockTime:(0,o.fromRfc3339WithNanoseconds)((0,l.assertNotEmpty)(e.latest_block_time)),latestBlockHeight:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.latest_block_height)),catchingUp:(0,l.assertBoolean)(e.catching_up)}}function H(e){return{nodeInfo:J(e.node_info),syncInfo:j(e.sync_info),validatorInfo:U(e.validator_info)}}function q(e){return{data:(0,n.fromBase64)((0,l.assertNotEmpty)(e.data)),rootHash:(0,n.fromHex)((0,l.assertNotEmpty)(e.root_hash)),proof:{total:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.proof.total)),index:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.proof.index)),leafHash:(0,n.fromBase64)((0,l.assertNotEmpty)(e.proof.leaf_hash)),aunts:(0,l.assertArray)(e.proof.aunts).map(n.fromBase64)}}}function L(e){return{tx:(0,n.fromBase64)((0,l.assertNotEmpty)(e.tx)),result:y((0,l.assertObject)(e.tx_result)),height:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.height)),index:(0,a.apiToSmallInt)((0,l.assertNumber)(e.index)),hash:(0,n.fromHex)((0,l.assertNotEmpty)(e.hash)),proof:(0,l.may)(q,e.proof)}}function F(e){return{totalCount:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.total_count)),txs:(0,l.assertArray)(e.txs).map(L)}}function V(e){let t=(0,n.fromBase64)((0,l.assertNotEmpty)(e.tx));return{tx:t,hash:(0,u.hashTx)(t),result:y(e.result),height:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.height))}}function W(e){return{blockHeight:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.block_height)),validators:(0,l.assertArray)(e.validators).map(U),count:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.count)),total:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.total))}}function z(e){var t,r;return{header:A((0,l.assertObject)(e.header)),lastCommit:e.last_commit.block_id.hash?B((0,l.assertObject)(e.last_commit)):null,txs:e.data.txs?(0,l.assertArray)(e.data.txs).map(n.fromBase64):[],evidence:null!==(r=null===(t=e.evidence)||void 0===t?void 0:t.evidence)&&void 0!==r?r:[]}}function G(e){return{blockId:O(e.block_id),block:z(e.block)}}function Q(e){return{totalCount:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.total_count)),blocks:(0,l.assertArray)(e.blocks).map(G)}}function K(e){return{total:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.total)),totalBytes:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.total_bytes))}}t.decodeEvent=g,t.decodeValidatorUpdate=_,t.decodeValidatorGenesis=M,t.decodeValidatorInfo=U;class Y{static decodeAbciInfo(e){return d((0,l.assertObject)(e.result.response))}static decodeAbciQuery(e){return p((0,l.assertObject)(e.result.response))}static decodeBlock(e){return G(e.result)}static decodeBlockResults(e){return k(e.result)}static decodeBlockSearch(e){return Q(e.result)}static decodeBlockchain(e){return R(e.result)}static decodeBroadcastTxSync(e){return E(e.result)}static decodeBroadcastTxAsync(e){return Y.decodeBroadcastTxSync(e)}static decodeBroadcastTxCommit(e){return T(e.result)}static decodeCommit(e){return C(e.result)}static decodeGenesis(e){return D((0,l.assertObject)(e.result.genesis))}static decodeHealth(){return null}static decodeNumUnconfirmedTxs(e){return K(e.result)}static decodeStatus(e){return H(e.result)}static decodeNewBlockEvent(e){return z(e.data.value.block)}static decodeNewBlockHeaderEvent(e){return A(e.data.value.header)}static decodeTxEvent(e){return V(e.data.value.TxResult)}static decodeTx(e){return L(e.result)}static decodeTxSearch(e){return F(e.result)}static decodeValidators(e){return W(e.result)}}t.Responses=Y},82276:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeBlockId=t.encodeVersion=t.encodeBytes=t.encodeTime=t.encodeUvarint=t.encodeString=t.dictionaryToStringMap=t.may=t.assertNotEmpty=t.assertObject=t.assertArray=t.assertNumber=t.assertString=t.assertBoolean=t.assertSet=void 0;let n=r(69721);function i(e){if(void 0===e)throw Error("Value must not be undefined");if(null===e)throw Error("Value must not be null");return e}function o(e){if(i(e),"boolean"!=typeof e)throw Error("Value must be a boolean");return e}function a(e){if(i(e),"string"!=typeof e)throw Error("Value must be a string");return e}function s(e){if(i(e),"number"!=typeof e)throw Error("Value must be a number");return e}function l(e){if(i(e),!Array.isArray(e))throw Error("Value must be a an array");return e}function u(e){if(i(e),"object"!=typeof e)throw Error("Value must be an object");if("[object Object]"!==Object.prototype.toString.call(e))throw Error("Value must be a simple object");return e}function d(e){if(i(e),"number"==typeof e&&0===e)throw Error("must provide a non-zero value");if(0===e.length)throw Error("must provide a non-empty value");return e}function c(e,t){return null==t?void 0:e(t)}function p(e){let t=new Map;for(let r of Object.keys(e)){let n=e[r];if("string"!=typeof n)throw Error("Found dictionary value of type other than string");t.set(r,n)}return t}function f(e){let t=(0,n.toUtf8)(e);return Uint8Array.from([t.length,...t])}function h(e){return e>=128?Uint8Array.from([255&e|128,...h(e>>7)]):Uint8Array.from([255&e])}function g(e){let t=e.getTime(),r=Math.floor(t/1e3),n=r?[8,...h(r)]:new Uint8Array,i=(e.nanoseconds||0)+t%1e3*1e6,o=i?[16,...h(i)]:new Uint8Array;return Uint8Array.from([...n,...o])}function m(e){if(e.length>=128)throw Error("Not implemented for byte arrays of length 128 or more");return e.length?Uint8Array.from([e.length,...e]):new Uint8Array}function y(e){let t=e.block?Uint8Array.from([8,...h(e.block)]):new Uint8Array,r=e.app?Uint8Array.from([16,...h(e.app)]):new Uint8Array;return Uint8Array.from([...t,...r])}function v(e){return Uint8Array.from([10,e.hash.length,...e.hash,18,e.parts.hash.length+4,8,e.parts.total,18,e.parts.hash.length,...e.parts.hash])}t.assertSet=i,t.assertBoolean=o,t.assertString=a,t.assertNumber=s,t.assertArray=l,t.assertObject=u,t.assertNotEmpty=d,t.may=c,t.dictionaryToStringMap=p,t.encodeString=f,t.encodeUvarint=h,t.encodeTime=g,t.encodeBytes=m,t.encodeVersion=y,t.encodeBlockId=v},96568:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hashBlock=t.hashTx=void 0;let n=r(49400),i=r(82276);function o(e){return(0,n.sha256)(e)}function a(e){if(e<1)throw Error("Cannot split an empty tree");let t=2**Math.floor(Math.log2(e));return t"".concat(e.key,"='").concat(e.value,"'")),...e.raw?[e.raw]:[]].join(" AND ")}Object.defineProperty(t,"__esModule",{value:!0}),t.buildQuery=t.SubscriptionEventType=t.Method=void 0,function(e){e.AbciInfo="abci_info",e.AbciQuery="abci_query",e.Block="block",e.Blockchain="blockchain",e.BlockResults="block_results",e.BlockSearch="block_search",e.BroadcastTxAsync="broadcast_tx_async",e.BroadcastTxSync="broadcast_tx_sync",e.BroadcastTxCommit="broadcast_tx_commit",e.Commit="commit",e.Genesis="genesis",e.Health="health",e.NumUnconfirmedTxs="num_unconfirmed_txs",e.Status="status",e.Subscribe="subscribe",e.Tx="tx",e.TxSearch="tx_search",e.Validators="validators",e.Unsubscribe="unsubscribe"}(r=t.Method||(t.Method={})),function(e){e.NewBlock="NewBlock",e.NewBlockHeader="NewBlockHeader",e.Tx="Tx"}(n=t.SubscriptionEventType||(t.SubscriptionEventType={})),t.buildQuery=i},94152:function(e,t){"use strict";var r;function n(e){return 0===e.code}function i(e){return 0===e.checkTx.code&&!!e.deliverTx&&0===e.deliverTx.code}Object.defineProperty(t,"__esModule",{value:!0}),t.VoteType=t.broadcastTxCommitSuccess=t.broadcastTxSyncSuccess=void 0,t.broadcastTxSyncSuccess=n,t.broadcastTxCommitSuccess=i,function(e){e[e.PreVote=1]="PreVote",e[e.PreCommit=2]="PreCommit"}(r=t.VoteType||(t.VoteType={}))},73248:function(e,t,r){"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Tendermint34Client=void 0;let a=r(69594),s=r(40064),l=r(96920),u=o(r(76378));class d{static async connect(e){let t;return t="object"==typeof e?new s.HttpClient(e):e.startsWith("http://")||e.startsWith("https://")?new s.HttpClient(e):new s.WebsocketClient(e),await this.detectVersion(t),d.create(t)}static async create(e){return new d(e)}static async detectVersion(e){let t=(0,a.createJsonRpcRequest)(u.Method.Status),r=(await e.execute(t)).result;if(!r||!r.node_info)throw Error("Unrecognized format for status response");let n=r.node_info.version;if("string"!=typeof n)throw Error("Unrecognized version format: must be string");return n}disconnect(){this.client.disconnect()}async abciInfo(){let e={method:u.Method.AbciInfo};return this.doCall(e,l.Params.encodeAbciInfo,l.Responses.decodeAbciInfo)}async abciQuery(e){let t={params:e,method:u.Method.AbciQuery};return this.doCall(t,l.Params.encodeAbciQuery,l.Responses.decodeAbciQuery)}async block(e){let t={method:u.Method.Block,params:{height:e}};return this.doCall(t,l.Params.encodeBlock,l.Responses.decodeBlock)}async blockResults(e){let t={method:u.Method.BlockResults,params:{height:e}};return this.doCall(t,l.Params.encodeBlockResults,l.Responses.decodeBlockResults)}async blockSearch(e){let t={params:e,method:u.Method.BlockSearch},r=await this.doCall(t,l.Params.encodeBlockSearch,l.Responses.decodeBlockSearch);return{...r,blocks:[...r.blocks].sort((e,t)=>e.block.header.height-t.block.header.height)}}async blockSearchAll(e){let t=e.page||1,r=[],n=!1;for(;!n;){let i=await this.blockSearch({...e,page:t});r.push(...i.blocks),r.lengthe.block.header.height-t.block.header.height),{totalCount:r.length,blocks:r}}async blockchain(e,t){let r={method:u.Method.Blockchain,params:{minHeight:e,maxHeight:t}};return this.doCall(r,l.Params.encodeBlockchain,l.Responses.decodeBlockchain)}async broadcastTxSync(e){let t={params:e,method:u.Method.BroadcastTxSync};return this.doCall(t,l.Params.encodeBroadcastTx,l.Responses.decodeBroadcastTxSync)}async broadcastTxAsync(e){let t={params:e,method:u.Method.BroadcastTxAsync};return this.doCall(t,l.Params.encodeBroadcastTx,l.Responses.decodeBroadcastTxAsync)}async broadcastTxCommit(e){let t={params:e,method:u.Method.BroadcastTxCommit};return this.doCall(t,l.Params.encodeBroadcastTx,l.Responses.decodeBroadcastTxCommit)}async commit(e){let t={method:u.Method.Commit,params:{height:e}};return this.doCall(t,l.Params.encodeCommit,l.Responses.decodeCommit)}async genesis(){let e={method:u.Method.Genesis};return this.doCall(e,l.Params.encodeGenesis,l.Responses.decodeGenesis)}async health(){let e={method:u.Method.Health};return this.doCall(e,l.Params.encodeHealth,l.Responses.decodeHealth)}async numUnconfirmedTxs(){let e={method:u.Method.NumUnconfirmedTxs};return this.doCall(e,l.Params.encodeNumUnconfirmedTxs,l.Responses.decodeNumUnconfirmedTxs)}async status(){let e={method:u.Method.Status};return this.doCall(e,l.Params.encodeStatus,l.Responses.decodeStatus)}subscribeNewBlock(){let e={method:u.Method.Subscribe,query:{type:u.SubscriptionEventType.NewBlock}};return this.subscribe(e,l.Responses.decodeNewBlockEvent)}subscribeNewBlockHeader(){let e={method:u.Method.Subscribe,query:{type:u.SubscriptionEventType.NewBlockHeader}};return this.subscribe(e,l.Responses.decodeNewBlockHeaderEvent)}subscribeTx(e){let t={method:u.Method.Subscribe,query:{type:u.SubscriptionEventType.Tx,raw:e}};return this.subscribe(t,l.Responses.decodeTxEvent)}async tx(e){let t={params:e,method:u.Method.Tx};return this.doCall(t,l.Params.encodeTx,l.Responses.decodeTx)}async txSearch(e){let t={params:e,method:u.Method.TxSearch};return this.doCall(t,l.Params.encodeTxSearch,l.Responses.decodeTxSearch)}async txSearchAll(e){let t=e.page||1,r=[],n=!1;for(;!n;){let i=await this.txSearch({...e,page:t});r.push(...i.txs),r.lengtht(e))}constructor(e){this.client=e}}t.Tendermint34Client=d},54760:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Responses=t.Params=void 0;var n=r(34855);Object.defineProperty(t,"Params",{enumerable:!0,get:function(){return n.Params}});var i=r(95796);Object.defineProperty(t,"Responses",{enumerable:!0,get:function(){return i.Responses}})},34855:function(e,t,r){"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Params=void 0;let a=r(69721),s=r(38496),l=r(69594),u=r(90177),d=o(r(34720));function c(e){return{height:(0,u.may)(s.smallIntToApi,e.height)}}function p(e){return{minHeight:(0,u.may)(s.smallIntToApi,e.minHeight),maxHeight:(0,u.may)(s.smallIntToApi,e.maxHeight)}}function f(e){return{query:e.query,page:(0,u.may)(s.smallIntToApi,e.page),per_page:(0,u.may)(s.smallIntToApi,e.per_page),order_by:e.order_by}}function h(e){return{path:(0,u.assertNotEmpty)(e.path),data:(0,a.toHex)(e.data),height:(0,u.may)(s.smallIntToApi,e.height),prove:e.prove}}function g(e){return{tx:(0,a.toBase64)((0,u.assertNotEmpty)(e.tx))}}function m(e){return{hash:(0,a.toBase64)((0,u.assertNotEmpty)(e.hash)),prove:e.prove}}function y(e){return{query:e.query,prove:e.prove,page:(0,u.may)(s.smallIntToApi,e.page),per_page:(0,u.may)(s.smallIntToApi,e.per_page),order_by:e.order_by}}function v(e){return{height:(0,u.may)(s.smallIntToApi,e.height),page:(0,u.may)(s.smallIntToApi,e.page),per_page:(0,u.may)(s.smallIntToApi,e.per_page)}}class b{static encodeAbciInfo(e){return(0,l.createJsonRpcRequest)(e.method)}static encodeAbciQuery(e){return(0,l.createJsonRpcRequest)(e.method,h(e.params))}static encodeBlock(e){return(0,l.createJsonRpcRequest)(e.method,c(e.params))}static encodeBlockchain(e){return(0,l.createJsonRpcRequest)(e.method,p(e.params))}static encodeBlockResults(e){return(0,l.createJsonRpcRequest)(e.method,c(e.params))}static encodeBlockSearch(e){return(0,l.createJsonRpcRequest)(e.method,f(e.params))}static encodeBroadcastTx(e){return(0,l.createJsonRpcRequest)(e.method,g(e.params))}static encodeCommit(e){return(0,l.createJsonRpcRequest)(e.method,c(e.params))}static encodeGenesis(e){return(0,l.createJsonRpcRequest)(e.method)}static encodeHealth(e){return(0,l.createJsonRpcRequest)(e.method)}static encodeNumUnconfirmedTxs(e){return(0,l.createJsonRpcRequest)(e.method)}static encodeStatus(e){return(0,l.createJsonRpcRequest)(e.method)}static encodeSubscribe(e){let t={key:"tm.event",value:e.query.type},r=d.buildQuery({tags:[t],raw:e.query.raw});return(0,l.createJsonRpcRequest)("subscribe",{query:r})}static encodeTx(e){return(0,l.createJsonRpcRequest)(e.method,m(e.params))}static encodeTxSearch(e){return(0,l.createJsonRpcRequest)(e.method,y(e.params))}static encodeValidators(e){return(0,l.createJsonRpcRequest)(e.method,v(e.params))}}t.Params=b},95796:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Responses=t.decodeValidatorInfo=t.decodeValidatorGenesis=t.decodeValidatorUpdate=t.decodeEvent=void 0;let n=r(69721),i=r(67357),o=r(82002),a=r(38496),s=r(25492),l=r(90177),u=r(88475);function d(e){return{data:e.data,lastBlockHeight:(0,l.may)(a.apiToSmallInt,e.last_block_height),lastBlockAppHash:(0,l.may)(n.fromBase64,e.last_block_app_hash)}}function c(e){return{ops:e.ops.map(e=>({type:e.type,key:(0,n.fromBase64)(e.key),data:(0,n.fromBase64)(e.data)}))}}function p(e){var t,r,i,o;return{key:(0,n.fromBase64)((0,l.assertString)(null!==(t=e.key)&&void 0!==t?t:"")),value:(0,n.fromBase64)((0,l.assertString)(null!==(r=e.value)&&void 0!==r?r:"")),proof:(0,l.may)(c,e.proofOps),height:(0,l.may)(a.apiToSmallInt,e.height),code:(0,l.may)(a.apiToSmallInt,e.code),codespace:(0,l.assertString)(null!==(i=e.codespace)&&void 0!==i?i:""),index:(0,l.may)(a.apiToSmallInt,e.index),log:e.log,info:(0,l.assertString)(null!==(o=e.info)&&void 0!==o?o:"")}}function f(e){var t;return{key:(0,l.assertNotEmpty)(e.key),value:null!==(t=e.value)&&void 0!==t?t:""}}function h(e){return(0,l.assertArray)(e).map(f)}function g(e){return{type:e.type,attributes:e.attributes?h(e.attributes):[]}}function m(e){return(0,l.assertArray)(e).map(g)}function y(e){var t,r,i;return{code:(0,a.apiToSmallInt)((0,l.assertNumber)(null!==(t=e.code)&&void 0!==t?t:0)),codespace:e.codespace,log:e.log,data:(0,l.may)(n.fromBase64,e.data),events:e.events?m(e.events):[],gasWanted:(0,a.apiToBigInt)(null!==(r=e.gas_wanted)&&void 0!==r?r:"0"),gasUsed:(0,a.apiToBigInt)(null!==(i=e.gas_used)&&void 0!==i?i:"0")}}function v(e){if("Sum"in e){let[[t,r]]=Object.entries(e.Sum.value);return(0,i.assert)("ed25519"===t||"secp256k1"===t,"unknown pubkey type: ".concat(t)),{algorithm:t,data:(0,n.fromBase64)((0,l.assertNotEmpty)(r))}}switch(e.type){case"tendermint/PubKeyEd25519":return{algorithm:"ed25519",data:(0,n.fromBase64)((0,l.assertNotEmpty)(e.value))};case"tendermint/PubKeySecp256k1":return{algorithm:"secp256k1",data:(0,n.fromBase64)((0,l.assertNotEmpty)(e.value))};default:throw Error("unknown pubkey type: ".concat(e.type))}}function b(e){return{maxBytes:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.max_bytes)),maxGas:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.max_gas))}}function S(e){return{maxAgeNumBlocks:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.max_age_num_blocks)),maxAgeDuration:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.max_age_duration))}}function w(e){return{block:b((0,l.assertObject)(e.block)),evidence:S((0,l.assertObject)(e.evidence))}}function _(e){var t;return{pubkey:v((0,l.assertObject)(e.pub_key)),votingPower:(0,a.apiToBigInt)(null!==(t=e.power)&&void 0!==t?t:"0")}}function k(e){return{height:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.height)),results:(e.txs_results||[]).map(y),validatorUpdates:(e.validator_updates||[]).map(_),consensusUpdates:(0,l.may)(w,e.consensus_param_updates),beginBlockEvents:m(e.begin_block_events||[]),endBlockEvents:m(e.end_block_events||[])}}function O(e){return{hash:(0,n.fromHex)((0,l.assertNotEmpty)(e.hash)),parts:{total:(0,l.assertNotEmpty)(e.parts.total),hash:(0,n.fromHex)((0,l.assertNotEmpty)(e.parts.hash))}}}function P(e){var t;return{block:(0,a.apiToSmallInt)(e.block),app:(0,a.apiToSmallInt)(null!==(t=e.app)&&void 0!==t?t:0)}}function A(e){return{version:P(e.version),chainId:(0,l.assertNotEmpty)(e.chain_id),height:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.height)),time:(0,o.fromRfc3339WithNanoseconds)((0,l.assertNotEmpty)(e.time)),lastBlockId:e.last_block_id.hash?O(e.last_block_id):null,lastCommitHash:(0,n.fromHex)((0,l.assertSet)(e.last_commit_hash)),dataHash:(0,n.fromHex)((0,l.assertSet)(e.data_hash)),validatorsHash:(0,n.fromHex)((0,l.assertSet)(e.validators_hash)),nextValidatorsHash:(0,n.fromHex)((0,l.assertSet)(e.next_validators_hash)),consensusHash:(0,n.fromHex)((0,l.assertSet)(e.consensus_hash)),appHash:(0,n.fromHex)((0,l.assertSet)(e.app_hash)),lastResultsHash:(0,n.fromHex)((0,l.assertSet)(e.last_results_hash)),evidenceHash:(0,n.fromHex)((0,l.assertSet)(e.evidence_hash)),proposerAddress:(0,n.fromHex)((0,l.assertNotEmpty)(e.proposer_address))}}function I(e){return{blockId:O(e.block_id),blockSize:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.block_size)),header:A(e.header),numTxs:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.num_txs))}}function R(e){return{lastHeight:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.last_height)),blockMetas:(0,l.assertArray)(e.block_metas).map(I)}}function E(e){return{...y(e),hash:(0,n.fromHex)((0,l.assertNotEmpty)(e.hash))}}function T(e){return{height:(0,a.apiToSmallInt)(e.height),hash:(0,n.fromHex)((0,l.assertNotEmpty)(e.hash)),checkTx:y((0,l.assertObject)(e.check_tx)),deliverTx:(0,l.may)(y,e.deliver_tx)}}function N(e){return(0,i.assert)(e in s.BlockIdFlag),e}function x(e){return{blockIdFlag:N(e.block_id_flag),validatorAddress:e.validator_address?(0,n.fromHex)(e.validator_address):void 0,timestamp:e.timestamp?(0,o.fromRfc3339WithNanoseconds)(e.timestamp):void 0,signature:e.signature?(0,n.fromBase64)(e.signature):void 0}}function B(e){return{blockId:O((0,l.assertObject)(e.block_id)),height:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.height)),round:(0,a.apiToSmallInt)(e.round),signatures:(0,l.assertArray)(e.signatures).map(x)}}function C(e){return{canonical:(0,l.assertBoolean)(e.canonical),header:A(e.signed_header.header),commit:B(e.signed_header.commit)}}function M(e){return{address:(0,n.fromHex)((0,l.assertNotEmpty)(e.address)),pubkey:v((0,l.assertObject)(e.pub_key)),votingPower:(0,a.apiToBigInt)((0,l.assertNotEmpty)(e.power))}}function D(e){return{genesisTime:(0,o.fromRfc3339WithNanoseconds)((0,l.assertNotEmpty)(e.genesis_time)),chainId:(0,l.assertNotEmpty)(e.chain_id),consensusParams:w(e.consensus_params),validators:e.validators?(0,l.assertArray)(e.validators).map(M):[],appHash:(0,n.fromHex)((0,l.assertSet)(e.app_hash)),appState:e.app_state}}function U(e){return{pubkey:v((0,l.assertObject)(e.pub_key)),votingPower:(0,a.apiToBigInt)((0,l.assertNotEmpty)(e.voting_power)),address:(0,n.fromHex)((0,l.assertNotEmpty)(e.address)),proposerPriority:e.proposer_priority?(0,a.apiToSmallInt)(e.proposer_priority):void 0}}function J(e){return{id:(0,n.fromHex)((0,l.assertNotEmpty)(e.id)),listenAddr:(0,l.assertNotEmpty)(e.listen_addr),network:(0,l.assertNotEmpty)(e.network),version:(0,l.assertString)(e.version),channels:(0,l.assertNotEmpty)(e.channels),moniker:(0,l.assertNotEmpty)(e.moniker),other:(0,l.dictionaryToStringMap)(e.other),protocolVersion:{app:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.protocol_version.app)),block:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.protocol_version.block)),p2p:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.protocol_version.p2p))}}}function j(e){let t=e.earliest_block_height?(0,a.apiToSmallInt)(e.earliest_block_height):void 0,r=e.earliest_block_time?(0,o.fromRfc3339WithNanoseconds)(e.earliest_block_time):void 0;return{earliestAppHash:e.earliest_app_hash?(0,n.fromHex)(e.earliest_app_hash):void 0,earliestBlockHash:e.earliest_block_hash?(0,n.fromHex)(e.earliest_block_hash):void 0,earliestBlockHeight:t||void 0,earliestBlockTime:(null==r?void 0:r.getTime())?r:void 0,latestBlockHash:(0,n.fromHex)((0,l.assertNotEmpty)(e.latest_block_hash)),latestAppHash:(0,n.fromHex)((0,l.assertNotEmpty)(e.latest_app_hash)),latestBlockTime:(0,o.fromRfc3339WithNanoseconds)((0,l.assertNotEmpty)(e.latest_block_time)),latestBlockHeight:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.latest_block_height)),catchingUp:(0,l.assertBoolean)(e.catching_up)}}function H(e){return{nodeInfo:J(e.node_info),syncInfo:j(e.sync_info),validatorInfo:U(e.validator_info)}}function q(e){return{data:(0,n.fromBase64)((0,l.assertNotEmpty)(e.data)),rootHash:(0,n.fromHex)((0,l.assertNotEmpty)(e.root_hash)),proof:{total:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.proof.total)),index:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.proof.index)),leafHash:(0,n.fromBase64)((0,l.assertNotEmpty)(e.proof.leaf_hash)),aunts:(0,l.assertArray)(e.proof.aunts).map(n.fromBase64)}}}function L(e){return{tx:(0,n.fromBase64)((0,l.assertNotEmpty)(e.tx)),result:y((0,l.assertObject)(e.tx_result)),height:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.height)),index:(0,a.apiToSmallInt)((0,l.assertNumber)(e.index)),hash:(0,n.fromHex)((0,l.assertNotEmpty)(e.hash)),proof:(0,l.may)(q,e.proof)}}function F(e){return{totalCount:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.total_count)),txs:(0,l.assertArray)(e.txs).map(L)}}function V(e){let t=(0,n.fromBase64)((0,l.assertNotEmpty)(e.tx));return{tx:t,hash:(0,u.hashTx)(t),result:y(e.result),height:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.height))}}function W(e){return{blockHeight:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.block_height)),validators:(0,l.assertArray)(e.validators).map(U),count:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.count)),total:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.total))}}function z(e){var t,r;return{header:A((0,l.assertObject)(e.header)),lastCommit:e.last_commit.block_id.hash?B((0,l.assertObject)(e.last_commit)):null,txs:e.data.txs?(0,l.assertArray)(e.data.txs).map(n.fromBase64):[],evidence:null!==(r=null===(t=e.evidence)||void 0===t?void 0:t.evidence)&&void 0!==r?r:[]}}function G(e){return{blockId:O(e.block_id),block:z(e.block)}}function Q(e){return{totalCount:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.total_count)),blocks:(0,l.assertArray)(e.blocks).map(G)}}function K(e){return{total:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.total)),totalBytes:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.total_bytes))}}t.decodeEvent=g,t.decodeValidatorUpdate=_,t.decodeValidatorGenesis=M,t.decodeValidatorInfo=U;class Y{static decodeAbciInfo(e){return d((0,l.assertObject)(e.result.response))}static decodeAbciQuery(e){return p((0,l.assertObject)(e.result.response))}static decodeBlock(e){return G(e.result)}static decodeBlockResults(e){return k(e.result)}static decodeBlockSearch(e){return Q(e.result)}static decodeBlockchain(e){return R(e.result)}static decodeBroadcastTxSync(e){return E(e.result)}static decodeBroadcastTxAsync(e){return Y.decodeBroadcastTxSync(e)}static decodeBroadcastTxCommit(e){return T(e.result)}static decodeCommit(e){return C(e.result)}static decodeGenesis(e){return D((0,l.assertObject)(e.result.genesis))}static decodeHealth(){return null}static decodeNumUnconfirmedTxs(e){return K(e.result)}static decodeStatus(e){return H(e.result)}static decodeNewBlockEvent(e){return z(e.data.value.block)}static decodeNewBlockHeaderEvent(e){return A(e.data.value.header)}static decodeTxEvent(e){return V(e.data.value.TxResult)}static decodeTx(e){return L(e.result)}static decodeTxSearch(e){return F(e.result)}static decodeValidators(e){return W(e.result)}}t.Responses=Y},90177:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeBlockId=t.encodeVersion=t.encodeBytes=t.encodeTime=t.encodeUvarint=t.encodeString=t.dictionaryToStringMap=t.may=t.assertNotEmpty=t.assertObject=t.assertArray=t.assertNumber=t.assertString=t.assertBoolean=t.assertSet=void 0;let n=r(69721);function i(e){if(void 0===e)throw Error("Value must not be undefined");if(null===e)throw Error("Value must not be null");return e}function o(e){if(i(e),"boolean"!=typeof e)throw Error("Value must be a boolean");return e}function a(e){if(i(e),"string"!=typeof e)throw Error("Value must be a string");return e}function s(e){if(i(e),"number"!=typeof e)throw Error("Value must be a number");return e}function l(e){if(i(e),!Array.isArray(e))throw Error("Value must be a an array");return e}function u(e){if(i(e),"object"!=typeof e)throw Error("Value must be an object");if("[object Object]"!==Object.prototype.toString.call(e))throw Error("Value must be a simple object");return e}function d(e){if(i(e),"number"==typeof e&&0===e)throw Error("must provide a non-zero value");if(0===e.length)throw Error("must provide a non-empty value");return e}function c(e,t){return null==t?void 0:e(t)}function p(e){let t=new Map;for(let r of Object.keys(e)){let n=e[r];if("string"!=typeof n)throw Error("Found dictionary value of type other than string");t.set(r,n)}return t}function f(e){let t=(0,n.toUtf8)(e);return Uint8Array.from([t.length,...t])}function h(e){return e>=128?Uint8Array.from([255&e|128,...h(e>>7)]):Uint8Array.from([255&e])}function g(e){let t=e.getTime(),r=Math.floor(t/1e3),n=r?[8,...h(r)]:new Uint8Array,i=(e.nanoseconds||0)+t%1e3*1e6,o=i?[16,...h(i)]:new Uint8Array;return Uint8Array.from([...n,...o])}function m(e){if(e.length>=128)throw Error("Not implemented for byte arrays of length 128 or more");return e.length?Uint8Array.from([e.length,...e]):new Uint8Array}function y(e){let t=e.block?Uint8Array.from([8,...h(e.block)]):new Uint8Array,r=e.app?Uint8Array.from([16,...h(e.app)]):new Uint8Array;return Uint8Array.from([...t,...r])}function v(e){return Uint8Array.from([10,e.hash.length,...e.hash,18,e.parts.hash.length+4,8,e.parts.total,18,e.parts.hash.length,...e.parts.hash])}t.assertSet=i,t.assertBoolean=o,t.assertString=a,t.assertNumber=s,t.assertArray=l,t.assertObject=u,t.assertNotEmpty=d,t.may=c,t.dictionaryToStringMap=p,t.encodeString=f,t.encodeUvarint=h,t.encodeTime=g,t.encodeBytes=m,t.encodeVersion=y,t.encodeBlockId=v},88475:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hashBlock=t.hashTx=void 0;let n=r(49400),i=r(90177);function o(e){return(0,n.sha256)(e)}function a(e){if(e<1)throw Error("Cannot split an empty tree");let t=2**Math.floor(Math.log2(e));return t"".concat(e.key,"='").concat(e.value,"'")),...e.raw?[e.raw]:[]].join(" AND ")}Object.defineProperty(t,"__esModule",{value:!0}),t.buildQuery=t.SubscriptionEventType=t.Method=void 0,function(e){e.AbciInfo="abci_info",e.AbciQuery="abci_query",e.Block="block",e.Blockchain="blockchain",e.BlockResults="block_results",e.BlockSearch="block_search",e.BroadcastTxAsync="broadcast_tx_async",e.BroadcastTxSync="broadcast_tx_sync",e.BroadcastTxCommit="broadcast_tx_commit",e.Commit="commit",e.Genesis="genesis",e.Health="health",e.NumUnconfirmedTxs="num_unconfirmed_txs",e.Status="status",e.Subscribe="subscribe",e.Tx="tx",e.TxSearch="tx_search",e.Validators="validators",e.Unsubscribe="unsubscribe"}(r=t.Method||(t.Method={})),function(e){e.NewBlock="NewBlock",e.NewBlockHeader="NewBlockHeader",e.Tx="Tx"}(n=t.SubscriptionEventType||(t.SubscriptionEventType={})),t.buildQuery=i},81017:function(e,t){"use strict";var r;function n(e){return 0===e.code}function i(e){return 0===e.checkTx.code&&!!e.deliverTx&&0===e.deliverTx.code}Object.defineProperty(t,"__esModule",{value:!0}),t.VoteType=t.broadcastTxCommitSuccess=t.broadcastTxSyncSuccess=void 0,t.broadcastTxSyncSuccess=n,t.broadcastTxCommitSuccess=i,function(e){e[e.PreVote=1]="PreVote",e[e.PreCommit=2]="PreCommit"}(r=t.VoteType||(t.VoteType={}))},35621:function(e,t,r){"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Tendermint37Client=void 0;let a=r(69594),s=r(40064),l=r(54760),u=o(r(34720));class d{static async connect(e){let t;return t="object"==typeof e?new s.HttpClient(e):e.startsWith("http://")||e.startsWith("https://")?new s.HttpClient(e):new s.WebsocketClient(e),await this.detectVersion(t),d.create(t)}static async create(e){return new d(e)}static async detectVersion(e){let t=(0,a.createJsonRpcRequest)(u.Method.Status),r=(await e.execute(t)).result;if(!r||!r.node_info)throw Error("Unrecognized format for status response");let n=r.node_info.version;if("string"!=typeof n)throw Error("Unrecognized version format: must be string");return n}disconnect(){this.client.disconnect()}async abciInfo(){let e={method:u.Method.AbciInfo};return this.doCall(e,l.Params.encodeAbciInfo,l.Responses.decodeAbciInfo)}async abciQuery(e){let t={params:e,method:u.Method.AbciQuery};return this.doCall(t,l.Params.encodeAbciQuery,l.Responses.decodeAbciQuery)}async block(e){let t={method:u.Method.Block,params:{height:e}};return this.doCall(t,l.Params.encodeBlock,l.Responses.decodeBlock)}async blockResults(e){let t={method:u.Method.BlockResults,params:{height:e}};return this.doCall(t,l.Params.encodeBlockResults,l.Responses.decodeBlockResults)}async blockSearch(e){let t={params:e,method:u.Method.BlockSearch},r=await this.doCall(t,l.Params.encodeBlockSearch,l.Responses.decodeBlockSearch);return{...r,blocks:[...r.blocks].sort((e,t)=>e.block.header.height-t.block.header.height)}}async blockSearchAll(e){let t=e.page||1,r=[],n=!1;for(;!n;){let i=await this.blockSearch({...e,page:t});r.push(...i.blocks),r.lengthe.block.header.height-t.block.header.height),{totalCount:r.length,blocks:r}}async blockchain(e,t){let r={method:u.Method.Blockchain,params:{minHeight:e,maxHeight:t}};return this.doCall(r,l.Params.encodeBlockchain,l.Responses.decodeBlockchain)}async broadcastTxSync(e){let t={params:e,method:u.Method.BroadcastTxSync};return this.doCall(t,l.Params.encodeBroadcastTx,l.Responses.decodeBroadcastTxSync)}async broadcastTxAsync(e){let t={params:e,method:u.Method.BroadcastTxAsync};return this.doCall(t,l.Params.encodeBroadcastTx,l.Responses.decodeBroadcastTxAsync)}async broadcastTxCommit(e){let t={params:e,method:u.Method.BroadcastTxCommit};return this.doCall(t,l.Params.encodeBroadcastTx,l.Responses.decodeBroadcastTxCommit)}async commit(e){let t={method:u.Method.Commit,params:{height:e}};return this.doCall(t,l.Params.encodeCommit,l.Responses.decodeCommit)}async genesis(){let e={method:u.Method.Genesis};return this.doCall(e,l.Params.encodeGenesis,l.Responses.decodeGenesis)}async health(){let e={method:u.Method.Health};return this.doCall(e,l.Params.encodeHealth,l.Responses.decodeHealth)}async numUnconfirmedTxs(){let e={method:u.Method.NumUnconfirmedTxs};return this.doCall(e,l.Params.encodeNumUnconfirmedTxs,l.Responses.decodeNumUnconfirmedTxs)}async status(){let e={method:u.Method.Status};return this.doCall(e,l.Params.encodeStatus,l.Responses.decodeStatus)}subscribeNewBlock(){let e={method:u.Method.Subscribe,query:{type:u.SubscriptionEventType.NewBlock}};return this.subscribe(e,l.Responses.decodeNewBlockEvent)}subscribeNewBlockHeader(){let e={method:u.Method.Subscribe,query:{type:u.SubscriptionEventType.NewBlockHeader}};return this.subscribe(e,l.Responses.decodeNewBlockHeaderEvent)}subscribeTx(e){let t={method:u.Method.Subscribe,query:{type:u.SubscriptionEventType.Tx,raw:e}};return this.subscribe(t,l.Responses.decodeTxEvent)}async tx(e){let t={params:e,method:u.Method.Tx};return this.doCall(t,l.Params.encodeTx,l.Responses.decodeTx)}async txSearch(e){let t={params:e,method:u.Method.TxSearch};return this.doCall(t,l.Params.encodeTxSearch,l.Responses.decodeTxSearch)}async txSearchAll(e){let t=e.page||1,r=[],n=!1;for(;!n;){let i=await this.txSearch({...e,page:t});r.push(...i.txs),r.lengtht(e))}constructor(e){this.client=e}}t.Tendermint37Client=d},98265:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.connectComet=t.isComet38Client=t.isTendermint37Client=t.isTendermint34Client=void 0;let n=r(38224),i=r(26419),o=r(18570);function a(e){return e instanceof i.Tendermint34Client}function s(e){return e instanceof o.Tendermint37Client}function l(e){return e instanceof n.Comet38Client}async function u(e){let t;let r=await o.Tendermint37Client.connect(e),a=(await r.status()).nodeInfo.version;return a.startsWith("0.37.")?t=r:a.startsWith("0.38.")?(r.disconnect(),t=await n.Comet38Client.connect(e)):(r.disconnect(),t=await i.Tendermint34Client.connect(e)),t}t.isTendermint34Client=a,t.isTendermint37Client=s,t.isComet38Client=l,t.connectComet=u},25492:function(e,t){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.BlockIdFlag=void 0,function(e){e[e.Unknown=0]="Unknown",e[e.Absent=1]="Absent",e[e.Commit=2]="Commit",e[e.Nil=3]="Nil",e[e.Unrecognized=-1]="Unrecognized"}(r=t.BlockIdFlag||(t.BlockIdFlag={}))},68365:function(e,t){"use strict";function r(e,t){if(e.length!==t.length)return!1;for(let r=0;rsetTimeout(t,e))}Object.defineProperty(t,"__esModule",{value:!0}),t.sleep=void 0,t.sleep=r},39492:function(e,t,r){"use strict";var n=r(23663).Buffer;function i(e){return"object"==typeof e&&null!==e}function o(e){return!(!i(e)||"[object Uint8Array]"!==Object.prototype.toString.call(e)||void 0!==n&&void 0!==n.isBuffer&&n.isBuffer(e))}function a(e){return void 0!==e}Object.defineProperty(t,"__esModule",{value:!0}),t.isDefined=t.isUint8Array=t.isNonNullObject=void 0,t.isNonNullObject=i,t.isUint8Array=o,t.isDefined=a},86731:function(e,t,r){"use strict";r.r(t),r.d(t,{getAddress:function(){return C},getContractAddress:function(){return U},getCreate2Address:function(){return J},getIcapAddress:function(){return D},isAddress:function(){return M}});var n=r(46347),i=r(34108),o=r.n(i),a=r(89648);let s="bignumber/5.7.0";var l=o().BN;let u=new a.Yd(s),d={},c=9007199254740991,p=!1;class f{fromTwos(e){return g(m(this).fromTwos(e))}toTwos(e){return g(m(this).toTwos(e))}abs(){return"-"===this._hex[0]?f.from(this._hex.substring(1)):this}add(e){return g(m(this).add(m(e)))}sub(e){return g(m(this).sub(m(e)))}div(e){return f.from(e).isZero()&&y("division-by-zero","div"),g(m(this).div(m(e)))}mul(e){return g(m(this).mul(m(e)))}mod(e){let t=m(e);return t.isNeg()&&y("division-by-zero","mod"),g(m(this).umod(t))}pow(e){let t=m(e);return t.isNeg()&&y("negative-power","pow"),g(m(this).pow(t))}and(e){let t=m(e);return(this.isNegative()||t.isNeg())&&y("unbound-bitwise-result","and"),g(m(this).and(t))}or(e){let t=m(e);return(this.isNegative()||t.isNeg())&&y("unbound-bitwise-result","or"),g(m(this).or(t))}xor(e){let t=m(e);return(this.isNegative()||t.isNeg())&&y("unbound-bitwise-result","xor"),g(m(this).xor(t))}mask(e){return(this.isNegative()||e<0)&&y("negative-width","mask"),g(m(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&y("negative-width","shl"),g(m(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&y("negative-width","shr"),g(m(this).shrn(e))}eq(e){return m(this).eq(m(e))}lt(e){return m(this).lt(m(e))}lte(e){return m(this).lte(m(e))}gt(e){return m(this).gt(m(e))}gte(e){return m(this).gte(m(e))}isNegative(){return"-"===this._hex[0]}isZero(){return m(this).isZero()}toNumber(){try{return m(this).toNumber()}catch(e){y("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch(e){}return u.throwError("this platform does not support BigInt",a.Yd.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(10===arguments[0]?p||(p=!0,u.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?u.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",a.Yd.errors.UNEXPECTED_ARGUMENT,{}):u.throwError("BigNumber.toString does not accept parameters",a.Yd.errors.UNEXPECTED_ARGUMENT,{})),m(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof f)return e;if("string"==typeof e)return e.match(/^-?0x[0-9a-f]+$/i)?new f(d,h(e)):e.match(/^-?[0-9]+$/)?new f(d,h(new l(e))):u.throwArgumentError("invalid BigNumber string","value",e);if("number"==typeof e)return e%1&&y("underflow","BigNumber.from",e),(e>=c||e<=-c)&&y("overflow","BigNumber.from",e),f.from(String(e));let t=e;if("bigint"==typeof t)return f.from(t.toString());if((0,n._t)(t))return f.from((0,n.Dv)(t));if(t){if(t.toHexString){let e=t.toHexString();if("string"==typeof e)return f.from(e)}else{let e=t._hex;if(null==e&&"BigNumber"===t.type&&(e=t.hex),"string"==typeof e&&((0,n.A7)(e)||"-"===e[0]&&(0,n.A7)(e.substring(1))))return f.from(e)}}return u.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!!(e&&e._isBigNumber)}constructor(e,t){e!==d&&u.throwError("cannot call constructor directly; use BigNumber.from",a.Yd.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=t,this._isBigNumber=!0,Object.freeze(this)}}function h(e){if("string"!=typeof e)return h(e.toString(16));if("-"===e[0])return("-"===(e=e.substring(1))[0]&&u.throwArgumentError("invalid hex","value",e),"0x00"===(e=h(e)))?e:"-"+e;if("0x"!==e.substring(0,2)&&(e="0x"+e),"0x"===e)return"0x00";for(e.length%2&&(e="0x0"+e.substring(2));e.length>4&&"0x00"===e.substring(0,4);)e="0x"+e.substring(4);return e}function g(e){return f.from(h(e))}function m(e){let t=f.from(e).toHexString();return"-"===t[0]?new l("-"+t.substring(3),16):new l(t.substring(2),16)}function y(e,t,r){let n={fault:e,operation:t};return null!=r&&(n.value=r),u.throwError(e,a.Yd.errors.NUMERIC_FAULT,n)}function v(e){return new l(e,36).toString(16)}function b(e){return new l(e,16).toString(36)}var S=r(69774);let w="rlp/5.7.0",_=new a.Yd(w);function k(e){let t=[];for(;e;)t.unshift(255&e),e>>=8;return t}function O(e){if(Array.isArray(e)){let t=[];if(e.forEach(function(e){t=t.concat(O(e))}),t.length<=55)return t.unshift(192+t.length),t;let r=k(t.length);return r.unshift(247+r.length),r.concat(t)}(0,n.Zq)(e)||_.throwArgumentError("RLP object must be BytesLike","object",e);let t=Array.prototype.slice.call((0,n.lE)(e));if(1===t.length&&t[0]<=127)return t;if(t.length<=55)return t.unshift(128+t.length),t;let r=k(t.length);return r.unshift(183+r.length),r.concat(t)}function P(e){return(0,n.Dv)(O(e))}let A="address/5.7.0",I=new a.Yd(A);function R(e){(0,n.A7)(e,20)||I.throwArgumentError("invalid address","address",e);let t=(e=e.toLowerCase()).substring(2).split(""),r=new Uint8Array(40);for(let e=0;e<40;e++)r[e]=t[e].charCodeAt(0);let i=(0,n.lE)((0,S.keccak256)(r));for(let e=0;e<40;e+=2)i[e>>1]>>4>=8&&(t[e]=t[e].toUpperCase()),(15&i[e>>1])>=8&&(t[e+1]=t[e+1].toUpperCase());return"0x"+t.join("")}let E=9007199254740991;function T(e){return Math.log10?Math.log10(e):Math.log(e)/Math.LN10}let N={};for(let e=0;e<10;e++)N[String(e)]=String(e);for(let e=0;e<26;e++)N[String.fromCharCode(65+e)]=String(10+e);let x=Math.floor(T(E));function B(e){let t=(e=(e=e.toUpperCase()).substring(4)+e.substring(0,2)+"00").split("").map(e=>N[e]).join("");for(;t.length>=x;){let e=t.substring(0,x);t=parseInt(e,10)%97+t.substring(e.length)}let r=String(98-parseInt(t,10)%97);for(;r.length<2;)r="0"+r;return r}function C(e){let t=null;if("string"!=typeof e&&I.throwArgumentError("invalid address","address",e),e.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==e.substring(0,2)&&(e="0x"+e),t=R(e),e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&t!==e&&I.throwArgumentError("bad address checksum","address",e);else if(e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(e.substring(2,4)!==B(e)&&I.throwArgumentError("bad icap checksum","address",e),t=v(e.substring(4));t.length<40;)t="0"+t;t=R("0x"+t)}else I.throwArgumentError("invalid address","address",e);return t}function M(e){try{return C(e),!0}catch(e){}return!1}function D(e){let t=b(C(e).substring(2)).toUpperCase();for(;t.length<30;)t="0"+t;return"XE"+B("XE00"+t)+t}function U(e){let t=null;try{t=C(e.from)}catch(t){I.throwArgumentError("missing from address","transaction",e)}let r=(0,n.G1)((0,n.lE)(f.from(e.nonce).toHexString()));return C((0,n.p3)((0,S.keccak256)(P([t,r])),12))}function J(e,t,r){return 32!==(0,n.E1)(t)&&I.throwArgumentError("salt must be 32 bytes","salt",t),32!==(0,n.E1)(r)&&I.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",r),C((0,n.p3)((0,S.keccak256)((0,n.zo)(["0xff",C(e),t,r])),12))}},46347:function(e,t,r){"use strict";r.d(t,{lE:function(){return c},zo:function(){return p},E1:function(){return y},p3:function(){return v},Dv:function(){return m},_t:function(){return d},Zq:function(){return l},A7:function(){return h},G1:function(){return f}});var n=r(89648);let i="bytes/5.7.0",o=new n.Yd(i);function a(e){return!!e.toHexString}function s(e){return e.slice||(e.slice=function(){let t=Array.prototype.slice.call(arguments);return s(new Uint8Array(Array.prototype.slice.apply(e,t)))}),e}function l(e){return h(e)&&!(e.length%2)||d(e)}function u(e){return"number"==typeof e&&e==e&&e%1==0}function d(e){if(null==e)return!1;if(e.constructor===Uint8Array)return!0;if("string"==typeof e||!u(e.length)||e.length<0)return!1;for(let t=0;t=256)return!1}return!0}function c(e,t){if(t||(t={}),"number"==typeof e){o.checkSafeUint53(e,"invalid arrayify value");let t=[];for(;e;)t.unshift(255&e),e=parseInt(String(e/256));return 0===t.length&&t.push(0),s(new Uint8Array(t))}if(t.allowMissingPrefix&&"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),a(e)&&(e=e.toHexString()),h(e)){let r=e.substring(2);r.length%2&&("left"===t.hexPad?r="0"+r:"right"===t.hexPad?r+="0":o.throwArgumentError("hex data is odd-length","value",e));let n=[];for(let e=0;ec(e)),r=t.reduce((e,t)=>e+t.length,0),n=new Uint8Array(r);return t.reduce((e,t)=>(n.set(t,e),e+t.length),0),s(n)}function f(e){let t=c(e);if(0===t.length)return t;let r=0;for(;r>4]+g[15&n]}return t}return o.throwArgumentError("invalid hexlify value","value",e)}function y(e){if("string"!=typeof e)e=m(e);else if(!h(e)||e.length%2)return null;return(e.length-2)/2}function v(e,t,r){return("string"!=typeof e?e=m(e):(!h(e)||e.length%2)&&o.throwArgumentError("invalid hexData","value",e),t=2+2*t,null!=r)?"0x"+e.substring(t,2+2*r):"0x"+e.substring(t)}},69774:function(e,t,r){"use strict";r.r(t),r.d(t,{keccak256:function(){return a}});var n=r(99857),i=r.n(n),o=r(46347);function a(e){return"0x"+i().keccak_256((0,o.lE)(e))}},89648:function(e,t,r){"use strict";var n,i;r.d(t,{Yd:function(){return f}});let o="logger/5.7.0",a=!1,s=!1,l={debug:1,default:2,info:2,warning:3,error:4,off:5},u=2,d=null,c=function(){try{let e=[];if(["NFD","NFC","NFKD","NFKC"].forEach(t=>{try{if("test"!=="test".normalize(t))throw Error("bad normalize")}catch(r){e.push(t)}}),e.length)throw Error("missing "+e.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw Error("broken implementation")}catch(e){return e.message}return null}();!function(e){e.DEBUG="DEBUG",e.INFO="INFO",e.WARNING="WARNING",e.ERROR="ERROR",e.OFF="OFF"}(n||(n={})),function(e){e.UNKNOWN_ERROR="UNKNOWN_ERROR",e.NOT_IMPLEMENTED="NOT_IMPLEMENTED",e.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",e.NETWORK_ERROR="NETWORK_ERROR",e.SERVER_ERROR="SERVER_ERROR",e.TIMEOUT="TIMEOUT",e.BUFFER_OVERRUN="BUFFER_OVERRUN",e.NUMERIC_FAULT="NUMERIC_FAULT",e.MISSING_NEW="MISSING_NEW",e.INVALID_ARGUMENT="INVALID_ARGUMENT",e.MISSING_ARGUMENT="MISSING_ARGUMENT",e.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",e.CALL_EXCEPTION="CALL_EXCEPTION",e.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",e.NONCE_EXPIRED="NONCE_EXPIRED",e.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",e.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",e.TRANSACTION_REPLACED="TRANSACTION_REPLACED",e.ACTION_REJECTED="ACTION_REJECTED"}(i||(i={}));let p="0123456789abcdef";class f{_log(e,t){let r=e.toLowerCase();null==l[r]&&this.throwArgumentError("invalid log level name","logLevel",e),u>l[r]||console.log.apply(console,t)}debug(){for(var e=arguments.length,t=Array(e),r=0;r{let t=r[e];try{if(t instanceof Uint8Array){let r="";for(let e=0;e>4]+p[15&t[e]];n.push(e+"=Uint8Array(0x"+r+")")}else n.push(e+"="+JSON.stringify(t))}catch(t){n.push(e+"="+JSON.stringify(r[e].toString()))}}),n.push("code=".concat(t)),n.push("version=".concat(this.version));let o=e,a="";switch(t){case i.NUMERIC_FAULT:{a="NUMERIC_FAULT";let t=e;switch(t){case"overflow":case"underflow":case"division-by-zero":a+="-"+t;break;case"negative-power":case"negative-width":a+="-unsupported";break;case"unbound-bitwise-result":a+="-unbound-result"}break}case i.CALL_EXCEPTION:case i.INSUFFICIENT_FUNDS:case i.MISSING_NEW:case i.NONCE_EXPIRED:case i.REPLACEMENT_UNDERPRICED:case i.TRANSACTION_REPLACED:case i.UNPREDICTABLE_GAS_LIMIT:a=t}a&&(e+=" [ See: https://links.ethers.org/v5-errors-"+a+" ]"),n.length&&(e+=" ("+n.join(", ")+")");let l=Error(e);return l.reason=o,l.code=t,Object.keys(r).forEach(function(e){l[e]=r[e]}),l}throwError(e,t,r){throw this.makeError(e,t,r)}throwArgumentError(e,t,r){return this.throwError(e,f.errors.INVALID_ARGUMENT,{argument:t,value:r})}assert(e,t,r,n){e||this.throwError(t,r,n)}assertArgument(e,t,r,n){e||this.throwArgumentError(t,r,n)}checkNormalize(e){null==e&&(e="platform missing String.prototype.normalize"),c&&this.throwError("platform missing String.prototype.normalize",f.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:c})}checkSafeUint53(e,t){"number"==typeof e&&(null==t&&(t="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(t,f.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(t,f.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,t,r){r=r?": "+r:"",et&&this.throwError("too many arguments"+r,f.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:t})}checkNew(e,t){(e===Object||null==e)&&this.throwError("missing new",f.errors.MISSING_NEW,{name:t.name})}checkAbstract(e,t){e===t?this.throwError("cannot instantiate abstract class "+JSON.stringify(t.name)+" directly; use a sub-class",f.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||null==e)&&this.throwError("missing new",f.errors.MISSING_NEW,{name:t.name})}static globalLogger(){return d||(d=new f(o)),d}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",f.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),a){if(!e)return;this.globalLogger().throwError("error censorship permanent",f.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}s=!!e,a=!!t}static setLogLevel(e){let t=l[e.toLowerCase()];if(null==t){f.globalLogger().warn("invalid log level - "+e);return}u=t}static from(e){return new f(e)}constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}}f.errors=i,f.levels=n},24711:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DenomHelper=void 0;let n=r(23663),i=r(36173);class o{static ibcDenom(e,t){let r=[];for(let t of e)r.push("".concat(t.portId,"/").concat(t.channelId));let o=r.join("/"),a="".concat(o,"/").concat(t);return"ibc/"+n.Buffer.from(i.Hash.sha256(n.Buffer.from(a))).toString("hex").toUpperCase()}get denom(){return this._denom}get type(){return this._type||"native"}get contractAddress(){return this._contractAddress}constructor(e){this._denom=e;let t=this.denom.split(/(\w+):(\w+):(.+)/).filter(Boolean);if(1!==t.length&&3!==t.length)throw Error("Invalid denom: ".concat(this.denom));this._type=3===t.length?t[0]:"",this._contractAddress=3===t.length?t[1]:""}}t.DenomHelper=o},73755:function(e,t){"use strict";function r(e){return e.replace(//g,"\\u003e").replace(/&/g,"\\u0026")}function n(e){return e.replace(/\\u003c/g,"<").replace(/\\u003e/g,">").replace(/\\u0026/g,"&")}Object.defineProperty(t,"__esModule",{value:!0}),t.unescapeHTML=t.escapeHTML=void 0,t.escapeHTML=r,t.unescapeHTML=n},47280:function(e,t){"use strict";function r(e){let t=e.split(".");if(2===t.length&&t[0].length>0&&t[1].length>0)return[t[0],t[1]]}function n(e,t){let n=r(e);return!!n&&n[1]===t}Object.defineProperty(t,"__esModule",{value:!0}),t.validateICNSName=t.parseICNSName=void 0,t.parseICNSName=r,t.validateICNSName=n},79394:function(e,t,r){"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(37666),t),i(r(24711),t),i(r(51604),t),i(r(67142),t),i(r(73755),t),i(r(96924),t),i(r(47280),t),i(r(14167),t),i(r(51109),t)},96924:function(e,t,r){"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(61002),t)},61002:function(e,t){"use strict";function r(e){if("object"!=typeof e||null===e)return e;if(Array.isArray(e))return e.map(r);let t=Object.keys(e).sort(),n={};return t.forEach(t=>{n[t]=r(e[t])}),n}function n(e){return JSON.stringify(r(e))}Object.defineProperty(t,"__esModule",{value:!0}),t.sortedJsonByKeyStringify=t.sortObjectByKey=void 0,t.sortObjectByKey=r,t.sortedJsonByKeyStringify=n},17021:function(e,t){"use strict";var r=function(e,t,r,n){function i(e){return e instanceof r?e:new r(function(t){t(e)})}return new(r||(r=Promise))(function(r,o){function a(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){e.done?r(e.value):i(e.value).then(a,s)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.BaseKVStore=void 0;class n{get(e){return r(this,void 0,void 0,function*(){let t=this.prefix()+"/"+e;return(yield this.provider.get(t))[t]})}set(e,t){let r=this.prefix()+"/"+e;return this.provider.set({[r]:t})}prefix(){return this._prefix}constructor(e,t){this.provider=e,this._prefix=t}}t.BaseKVStore=n},36382:function(e,t,r){"use strict";var n=function(e,t,r,n){function i(e){return e instanceof r?e:new r(function(t){t(e)})}return new(r||(r=Promise))(function(r,o){function a(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){e.done?r(e.value):i(e.value).then(a,s)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionKVStore=void 0;let i=r(17021);class o extends i.BaseKVStore{multiGet(e){var t;return n(this,void 0,void 0,function*(){e=Array.from(new Set(e));let r=null!==(t=yield o.KVStoreProvider.multiGet(e.map(e=>this.prefix()+"/"+e)))&&void 0!==t?t:{};for(let e of Object.keys(r))r[e.slice(this.prefix().length+1)]=r[e],delete r[e];return r})}constructor(e){if(o.KVStoreProvider||("undefined"==typeof browser?console.log("You should use ExtensionKVStore on the extension environment."):browser.storage&&browser.storage.local?o.KVStoreProvider={get:browser.storage.local.get,set:browser.storage.local.set,multiGet:browser.storage.local.get}:console.log("The 'browser' exists, but it doesn't seem to be an extension environment. This can happen in Safari browser.")),!o.KVStoreProvider)throw Error("Can't initialize kv store for browser extension");super(o.KVStoreProvider,e)}}t.ExtensionKVStore=o},37666:function(e,t,r){"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(37212),t),i(r(36382),t),i(r(17021),t),i(r(46393),t),i(r(32370),t),i(r(32676),t),i(r(23527),t),i(r(26121),t)},32676:function(e,t){"use strict";var r=function(e,t,r,n){function i(e){return e instanceof r?e:new r(function(t){t(e)})}return new(r||(r=Promise))(function(r,o){function a(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){e.done?r(e.value):i(e.value).then(a,s)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.IndexedDBKVStore=void 0;class n{get(e){return r(this,void 0,void 0,function*(){let t=(yield this.getDB()).transaction([this.prefix()],"readonly").objectStore(this.prefix());return new Promise((r,n)=>{let i=t.get(e);i.onerror=e=>{e.stopPropagation(),n(e.target)},i.onsuccess=()=>{i.result?r(i.result.data):r(void 0)}})})}set(e,t){return r(this,void 0,void 0,function*(){if(null===t){let t=(yield this.getDB()).transaction([this.prefix()],"readwrite").objectStore(this.prefix());return new Promise((r,n)=>{let i=t.delete(e);i.onerror=e=>{e.stopPropagation(),n(e.target)},i.onsuccess=()=>{r()}})}{let r=(yield this.getDB()).transaction([this.prefix()],"readwrite").objectStore(this.prefix());return new Promise((n,i)=>{let o=r.put({key:e,data:t});o.onerror=e=>{e.stopPropagation(),i(e.target)},o.onsuccess=()=>{n()}})}})}prefix(){return this._prefix}getDB(){return r(this,void 0,void 0,function*(){return this.cachedDB?this.cachedDB:new Promise((e,t)=>{let r=window.indexedDB.open(this.prefix());r.onerror=e=>{e.stopPropagation(),t(e.target)},r.onupgradeneeded=e=>{e.target.result.createObjectStore(this.prefix(),{keyPath:"key"})},r.onsuccess=()=>{this.cachedDB=r.result,e(r.result)}})})}constructor(e){this._prefix=e}}t.IndexedDBKVStore=n},37212:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},32370:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LocalKVStore=void 0;class r{get(e){let t=this.prefix()+"/"+e,r=localStorage.getItem(t);return null===r?Promise.resolve(void 0):Promise.resolve(JSON.parse(r))}set(e,t){let r=this.prefix()+"/"+e;return null===t?Promise.resolve(localStorage.removeItem(r)):Promise.resolve(localStorage.setItem(r,JSON.stringify(t)))}prefix(){return this._prefix}constructor(e){this._prefix=e}}t.LocalKVStore=r},46393:function(e,t,r){"use strict";r(49079),Object.defineProperty(t,"__esModule",{value:!0}),t.MemoryKVStore=void 0;let n=r(17021);class i{get(e){return Promise.resolve({[e]:this.store[e]})}set(e){return this.store=Object.assign(Object.assign({},this.store),e),Promise.resolve()}checkNotPrimitiveField(e){Object.keys(e).forEach(t=>{let r=e[t];if(null!=r&&"object"==typeof r){if(r.constructor!==Object&&r.constructor!==Array)throw Error("".concat(t," may not be serializable: ").concat(r.constructor.name));this.checkNotPrimitiveField(r)}})}constructor(){this.store={}}}class o extends n.BaseKVStore{constructor(e){super(new i,e)}}t.MemoryKVStore=o},26121:function(e,t){"use strict";var r=function(e,t,r,n){function i(e){return e instanceof r?e:new r(function(t){t(e)})}return new(r||(r=Promise))(function(r,o){function a(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){e.done?r(e.value):i(e.value).then(a,s)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.WrapMultiGetKVStore=void 0;class n{multiGet(e){return r(this,void 0,void 0,function*(){e=Array.from(new Set(e));let t={},n=[];for(let i of e)n.push(r(this,void 0,void 0,function*(){t[i]=yield this.kvStore.get(i)}));return yield Promise.all(n),t})}constructor(e){this.kvStore=e}}t.WrapMultiGetKVStore=n},23527:function(e,t){"use strict";var r=function(e,t,r,n){function i(e){return e instanceof r?e:new r(function(t){t(e)})}return new(r||(r=Promise))(function(r,o){function a(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){e.done?r(e.value):i(e.value).then(a,s)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.PrefixKVStore=void 0;class n{prefix(){return this._prefix}get(e){return r(this,void 0,void 0,function*(){let t=this.prefix()+"/"+e;return yield this.kvStore.get(t)})}set(e,t){return r(this,void 0,void 0,function*(){let r=this.prefix()+"/"+e;return yield this.kvStore.set(r,t)})}constructor(e,t){this.kvStore=e,this._prefix=t}}t.PrefixKVStore=n},92039:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebounceActionTimer=void 0;let n=r(61015);class i{call(e,t){return new Promise(r=>{let n=0===this.requests.length;this.requests.push({args:e,action:t,resolver:r}),n&&this.startTimer()})}startTimer(){this.startTime=Date.now(),this.nextTick(this.tick)}nextTick(e){if(this.debounceMs<=0){Promise.resolve().then(e);return}window.requestAnimationFrame?window.requestAnimationFrame(e):setTimeout(e,this.debounceMs)}constructor(e,t){this.debounceMs=e,this.handler=t,this.requests=[],this.startTime=0,this.tick=()=>{let e=this.debounceMs<=0;if(this.debounceMs>0&&Date.now()-this.startTime>=this.debounceMs&&(e=!0),e){let e=this.requests.slice(),t=this.handler(e);"object"==typeof t&&"then"in t?Promise.resolve(t).then(t=>{this.handleResponses(e,t)}):this.handleResponses(e,t),this.requests=[]}else this.nextTick(this.tick)},this.handleResponses=(e,t)=>{for(let r of((0,n.runInAction)(()=>{for(let r=0;r=t.maxRetries)throw n;t.onFailed&&t.onFailed(n);let e=t.waitMsAfterError||0;e>0&&(null!=t.maxWaitMsAfterError&&t.maxWaitMsAfterError>0&&(e=Math.min(e=Math.pow(2,r)*e,t.maxWaitMsAfterError)),yield(0,i.sleep)(e)),r++}})}function a(e,t){return o(e,Object.assign(Object.assign({},t),{maxRetries:Number.MAX_SAFE_INTEGER}))}t.retry=o,t.retryInfinite=a},51109:function(e,t){"use strict";function r(e){return new Promise(t=>setTimeout(t,e))}Object.defineProperty(t,"__esModule",{value:!0}),t.sleep=void 0,t.sleep=r},47372:function(e,t){"use strict";var r=function(e,t,r,n){function i(e){return e instanceof r?e:new r(function(t){t(e)})}return new(r||(r=Promise))(function(r,o){function a(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){e.done?r(e.value):i(e.value).then(a,s)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.Debouncer=void 0;class n{static promise(e){let t;var n=this;return function(){for(var i=arguments.length,o=Array(i),a=0;a2&&void 0!==arguments[2]&&arguments[2];return n(this,void 0,void 0,function*(){let n=yield(0,o.simpleFetch)(e,"/cosmos/auth/v1beta1/accounts/".concat(t),{validateStatus:function(e){return e>=200&&e<300||404===e}});return a.fromProtoJSON(n.data,r?t:"")})}static fromProtoJSON(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(!e.account){if(!t)throw Error("Account's address is unknown: ".concat(JSON.stringify(e)));return new a("",t,new i.Int(0),new i.Int(0))}let r=e.account,n=r["@type"]||"",o=r.BaseAccount||r.baseAccount||r.base_account;o&&(r=o);let s=r.account;s&&(r=s);let l=r.BaseVestingAccount||r.baseVestingAccount||r.base_vesting_account;if(l){let e=(r=l).BaseAccount||r.baseAccount||r.base_account;e&&(r=e)}let u=r.address;if(!u){if(!t)throw Error("Account's address is unknown: ".concat(JSON.stringify(e)));u=t}let d=r.account_number,c=r.sequence;return new a(n,u,new i.Int(d||"0"),new i.Int(c||"0"))}getType(){return this.type}getAddress(){return this.address}getAccountNumber(){return this.accountNumber}getSequence(){return this.sequence}constructor(e,t,r,n){this.type=e,this.address=t,this.accountNumber=r,this.sequence=n}}t.BaseAccount=a},14042:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.verifyADR36Amino=t.verifyADR36AminoSignDoc=t.makeADR36AminoSignDoc=t.checkAndValidateADR36AminoSignDoc=void 0;let n=r(77735),i=r(6756),o=r(23663),a=r(36173);function s(e,t){if(!(e&&e.msgs&&Array.isArray(e.msgs)&&1===e.msgs.length&&"sign/MsgSignData"===e.msgs[0].type))return!1;if(""!==e.chain_id)throw Error("Chain id should be empty string for ADR-36 signing");if(""!==e.memo)throw Error("Memo should be empty string for ADR-36 signing");if("0"!==e.account_number)throw Error('Account number should be "0" for ADR-36 signing');if("0"!==e.sequence)throw Error('Sequence should be "0" for ADR-36 signing');if("0"!==e.fee.gas)throw Error('Gas should be "0" for ADR-36 signing');if(0!==e.fee.amount.length)throw Error("Fee amount should be empty array for ADR-36 signing");let r=e.msgs[0];if("sign/MsgSignData"!==r.type)throw Error("Invalid type of ADR-36 sign msg: ".concat(r.type));if(!r.value)throw Error("Empty value in the msg");let n=r.value.signer;if(!n)throw Error("Empty signer in the ADR-36 msg");i.Bech32Address.validate(n,t);let a=r.value.data;if(!a)throw Error("Empty data in the ADR-36 msg");let s=o.Buffer.from(a,"base64");if(s.toString("base64")!==a)throw Error("Data is not encoded by base64");if(0===s.length)throw Error("Empty data in the ADR-36 msg");return!0}function l(e,t){return{chain_id:"",account_number:"0",sequence:"0",fee:{gas:"0",amount:[]},msgs:[{type:"sign/MsgSignData",value:{signer:e,data:t=o.Buffer.from(t).toString("base64")}}],memo:""}}function u(e,t,r,o){let l=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"secp256k1";if(!s(t,e))throw Error("Invalid sign doc for ADR-36");let u=new a.PubKeySecp256k1(r);if(("ethsecp256k1"===l?new i.Bech32Address(u.getEthAddress()).toBech32(e):new i.Bech32Address(u.getCosmosAddress()).toBech32(e))!==t.msgs[0].value.signer)throw Error("Unmatched signer");let d=(0,n.serializeSignDoc)(t);return u.verifyDigest32("ethsecp256k1"===l?a.Hash.keccak256(d):a.Hash.sha256(d),o)}function d(e,t,r,n,i){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"secp256k1";return u(e,l(t,r),n,i,o)}t.checkAndValidateADR36AminoSignDoc=s,t.makeADR36AminoSignDoc=l,t.verifyADR36AminoSignDoc=u,t.verifyADR36Amino=d},59892:function(e,t,r){"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(14042),t)},6756:function(e,t,r){"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Bech32Address=void 0;let a=o(r(45613)),s=r(23663),l=r(86731);class u{static shortenAddress(e,t){if(t>=e.length)return e;let r=e.indexOf("1"),n=e.slice(0,r),i=e.slice(r+1);if(t-=n.length,t-=3,(t-=1)<=0)return"";let o=Math.floor(i.length/2),a=i.slice(0,o),s=i.slice(o);for(;t0?a=a.slice(0,a.length-1):s=s.slice(1);return n+"1"+a+"..."+s}static fromBech32(e,t){let r=a.default.decode(e);if(t&&r.prefix!==t)throw Error("Unmatched prefix");return new u(new Uint8Array((0,a.fromWords)(r.words)))}static validate(e,t){let{prefix:r}=a.default.decode(e);if(t&&t!==r)throw Error("Unexpected prefix (expected: ".concat(t,", actual: ").concat(r,")"))}static defaultBech32Config(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"val",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"cons",n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"pub",i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"oper";return{bech32PrefixAccAddr:e,bech32PrefixAccPub:e+n,bech32PrefixValAddr:e+t+i,bech32PrefixValPub:e+t+i+n,bech32PrefixConsAddr:e+t+r,bech32PrefixConsPub:e+t+r+n}}toBech32(e){let t=a.default.toWords(this.address);return a.default.encode(e,t)}toHex(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0],t=s.Buffer.from(this.address).toString("hex");if(0===t.length)throw Error("Empty address");return e?(0,l.getAddress)("0x"+t):"0x"+t}constructor(e){this.address=e}}t.Bech32Address=u},63016:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChainIdHelper=void 0;class r{static parse(e){if("injective-777"===e||"injective-888"===e)return{identifier:e,version:0};let t=e.split(r.VersionFormatRegExp).filter(Boolean);return 2!==t.length?{identifier:e,version:0}:{identifier:t[0],version:parseInt(t[1])}}static hasChainVersion(e){return r.parse(e).identifier!==e}}t.ChainIdHelper=r,r.VersionFormatRegExp=/(.+)-([\d]+)/},524:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EthermintChainIdHelper=void 0;let n=r(63016);class i{static parse(e){let t=n.ChainIdHelper.parse(e);if(e.startsWith("injective"))return["injective-777","injective-888"].includes(e)?Object.assign({ethChainId:5},t):Object.assign({ethChainId:1},t);let r=e.match("^([a-z]{1,})_{1}([1-9][0-9]*)-{1}([1-9][0-9]*)$");if(!r||4!==r.length||""===r[1]||Number.isNaN(parseFloat(r[2]))||!Number.isInteger(parseFloat(r[2])))throw Error("Invalid chainId for ethermint: ".concat(e));return Object.assign(Object.assign({},t),{ethChainId:parseFloat(r[2])})}}t.EthermintChainIdHelper=i},57771:function(e,t,r){"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(63016),t),i(r(524),t)},64471:function(e,t,r){"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(88649),t),i(r(6756),t),i(r(57771),t),i(r(87774),t),i(r(40705),t),i(r(59892),t),i(r(77735),t)},25919:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeSignDoc=t.encodeSecp256k1Signature=t.encodeSecp256k1Pubkey=void 0;let n=r(23663),i=r(79394);function o(e){if(33!==e.length||2!==e[0]&&3!==e[0])throw Error("Public key must be compressed secp256k1, i.e. 33 bytes starting with 0x02 or 0x03");return{type:"tendermint/PubKeySecp256k1",value:n.Buffer.from(e).toString("base64")}}function a(e,t){if(64!==t.length)throw Error("Signature must be 64 bytes long. Cosmos SDK uses a 2x32 byte fixed length encoding for the secp256k1 signature integers r and s.");return{pub_key:o(e),signature:n.Buffer.from(t).toString("base64")}}function s(e){return n.Buffer.from((0,i.escapeHTML)((0,i.sortedJsonByKeyStringify)(e)))}t.encodeSecp256k1Pubkey=o,t.encodeSecp256k1Signature=a,t.serializeSignDoc=s},77735:function(e,t,r){"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(25919),t)},70098:function(e,t,r){"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.defaultProtoCodec=t.ProtoCodec=void 0;let o=r(92486),a=r(24611),s=r(47431),l=r(85311),u=r(43846),d=r(28319),c=r(77398),p=r(39383),f=r(28382),h=r(16729),g=r(68557),m=r(86398),y=r(72235),v=r(97583),b=r(23663);i(r(16729),t);class S{unpackAnyFactory(e){if(this.typeUrlMap.has(e))return this.typeUrlMap.get(e)}unpackAny(e){let t=this.unpackAnyFactory(e.typeUrl);if(!t)return new h.UnknownMessage(e.typeUrl,e.value);let r=t.decode(e.value);return Object.assign(Object.assign({},e),{unpacked:r})}unpackedAnyToJSONRecursive(e){if(e instanceof h.UnknownMessage)return e.toJSON();let t=this.unpackAnyFactory(e.typeUrl);if(t&&"unpacked"in e&&e.unpacked){let r=e=>{let t="object"==typeof e&&!(e instanceof h.UnknownMessage)&&"typeUrl"in e&&e.typeUrl&&"string"==typeof e.typeUrl&&"value"in e&&e.value&&"string"==typeof e.value;if(t)try{b.Buffer.from(e.value,"base64")}catch(e){return!1}return t},n=e=>{let t=this.unpackAnyFactory(e.typeUrl),r=b.Buffer.from(e.value,"base64");if(!t)return new h.UnknownMessage(e.typeUrl,r).toJSON();let n=t.decode(r);return{typeUrl:e.typeUrl,value:t.toJSON(n)}},i=e=>{if(Array.isArray(e))for(let t=0;tthis.protoCodec.unpackedAnyToJSONRecursive(e))}),authInfo:n.AuthInfo.toJSON(this.authInfo),chainId:this.chainId,accountNumber:this.accountNumber});let e=n.SignDocDirectAux.toJSON(this.signDoc);return e.bodyBytes&&delete e.bodyBytes,(0,a.sortObjectByKey)(Object.assign(Object.assign({},e),{txBody:Object.assign(Object.assign({},n.TxBody.toJSON(this.txBody)),{messages:this.txMsgs.map(e=>this.protoCodec.unpackedAnyToJSONRecursive(e))})}))}constructor(e,t=i.defaultProtoCodec){this.signDoc=e,this.protoCodec=t}}t.ProtoSignDocDecoder=s},40705:function(e,t,r){"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(70098),t),i(r(49710),t),i(r(4050),t)},4050:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SignDocWrapper=void 0;let n=r(49710),i=r(55618),o=r(59892);class a{static fromAminoSignDoc(e){return new a(e)}static fromDirectSignDoc(e){return new a(e)}static fromDirectAuxSignDoc(e){return new a(e)}static fromDirectSignDocBytes(e){return new a(i.SignDoc.decode(e))}static fromDirectAuxSignDocBytes(e){return new a(i.SignDocDirectAux.decode(e))}clone(){return new a(this.signDoc)}get protoSignDoc(){if("amino"===this.mode)throw Error("Sign doc is encoded as Amino Json");if("msgs"in this.signDoc)throw Error("Unexpected error");return this._protoSignDoc||(this._protoSignDoc=new n.ProtoSignDocDecoder(this.signDoc)),this._protoSignDoc}get aminoSignDoc(){if("direct"===this.mode)throw Error("Sign doc is encoded as Protobuf");if(!("msgs"in this.signDoc))throw Error("Unexpected error");return this.signDoc}get chainId(){return"direct"===this.mode?this.protoSignDoc.chainId:this.aminoSignDoc.chain_id}get memo(){return"direct"===this.mode?this.protoSignDoc.txBody.memo:this.aminoSignDoc.memo}get fees(){var e,t;if("direct"===this.mode){let r=[];for(let n of null!==(t=null===(e=this.protoSignDoc.authInfo.fee)||void 0===e?void 0:e.amount)&&void 0!==t?t:[]){if(null==n.denom||null==n.amount)throw Error("Invalid fee");r.push({denom:n.denom,amount:n.amount})}return r}return this.aminoSignDoc.fee.amount}get payer(){var e;return"direct"===this.mode?null===(e=this.protoSignDoc.authInfo.fee)||void 0===e?void 0:e.payer:this.aminoSignDoc.fee.payer}get granter(){var e;return"direct"===this.mode?null===(e=this.protoSignDoc.authInfo.fee)||void 0===e?void 0:e.granter:this.aminoSignDoc.fee.granter}get gas(){var e;return"direct"===this.mode?(null===(e=this.protoSignDoc.authInfo.fee)||void 0===e?void 0:e.gasLimit)?parseInt(this.protoSignDoc.authInfo.fee.gasLimit):0:parseInt(this.aminoSignDoc.fee.gas)}constructor(e){this.signDoc=e,this.isDirectAux=!1,"msgs"in e?this.mode="amino":(this.mode="direct",this.isDirectAux=!("authInfoBytes"in e)),"amino"===this.mode?this.isADR36SignDoc=(0,o.checkAndValidateADR36AminoSignDoc)(this.aminoSignDoc):this.isADR36SignDoc=!1}}t.SignDocWrapper=a},87774:function(e,t,r){"use strict";var n,i=function(e,t,r,n){function i(e){return e instanceof r?e:new r(function(t){t(e)})}return new(r||(r=Promise))(function(r,o){function a(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){e.done?r(e.value):i(e.value).then(a,s)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.TendermintTxTracer=t.WsReadyState=void 0;let o=r(23663);!function(e){e[e.CONNECTING=0]="CONNECTING",e[e.OPEN=1]="OPEN",e[e.CLOSING=2]="CLOSING",e[e.CLOSED=3]="CLOSED",e[e.NONE=4]="NONE"}(n=t.WsReadyState||(t.WsReadyState={}));class a{getWsEndpoint(){let e=this.url;if(e.startsWith("http")&&(e=e.replace("http","ws")),!e.endsWith(this.wsEndpoint)){let t=this.wsEndpoint.startsWith("/")?this.wsEndpoint:"/"+this.wsEndpoint;e=e.endsWith("/")?e+t.slice(1):e+t}return e}close(){this.ws.close()}get readyState(){switch(this.ws.readyState){case 0:return n.CONNECTING;case 1:return n.OPEN;case 2:return n.CLOSING;case 3:return n.CLOSED;default:return n.NONE}}addEventListener(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)}subscribeBlock(e){return this.newBlockSubscribes.push({handler:e}),1===this.newBlockSubscribes.length&&this.sendSubscribeBlockRpc(),()=>{this.newBlockSubscribes=this.newBlockSubscribes.filter(t=>t.handler!==e)}}sendSubscribeBlockRpc(){this.readyState===n.OPEN&&this.ws.send(JSON.stringify({jsonrpc:"2.0",method:"subscribe",params:["tm.event='NewBlock'"],id:1}))}traceTx(e){let t=!1;return new Promise(r=>{this.queryTx(e).then(t=>{if(e instanceof Uint8Array||(null==t?void 0:t.total_count)!=="0"){r(t);return}}).catch(()=>{}),i(this,void 0,void 0,function*(){for(;!t&&this.readyState!==n.CLOSED&&this.readyState!==n.CLOSING;)yield new Promise(e=>setTimeout(e,1e4)),this.queryTx(e).then(t=>{if(e instanceof Uint8Array||(null==t?void 0:t.total_count)!=="0"){r(t);return}}).catch(()=>{})}),this.subscribeTx(e).then(r)}).then(e=>(t=!0,new Promise(t=>{setTimeout(()=>t(e),100)})))}subscribeTx(e){if(e instanceof Uint8Array){let t=this.createRandomId(),r={query:"tm.event='Tx' AND tx.hash='".concat(o.Buffer.from(e).toString("hex").toUpperCase(),"'")};return new Promise((e,n)=>{this.txSubscribes.set(t,{params:r,resolver:e,rejector:n}),this.sendSubscribeTxRpc(t,r)})}{let t=this.createRandomId(),r={query:"tm.event='Tx' and "+Object.keys(e).map(t=>({key:t,value:e[t]})).map(e=>"".concat(e.key,"=").concat("string"==typeof e.value?"'".concat(e.value,"'"):e.value)).join(" and "),page:"1",per_page:"1",order_by:"asc"};return new Promise((e,n)=>{this.txSubscribes.set(t,{params:r,resolver:e,rejector:n}),this.sendSubscribeTxRpc(t,r)})}}sendSubscribeTxRpc(e,t){this.readyState===n.OPEN&&this.ws.send(JSON.stringify({jsonrpc:"2.0",method:"subscribe",params:t,id:e}))}queryTx(e){if(e instanceof Uint8Array)return this.query("tx",{hash:o.Buffer.from(e).toString("base64"),prove:!1});{let t={query:Object.keys(e).map(t=>({key:t,value:e[t]})).map(e=>"".concat(e.key,"=").concat("string"==typeof e.value?"'".concat(e.value,"'"):e.value)).join(" and "),page:"1",per_page:"1",order_by:"asc"};return this.query("tx_search",t)}}query(e,t){let r=this.createRandomId();return new Promise((n,i)=>{this.pendingQueries.set(r,{method:e,params:t,resolver:n,rejector:i}),this.sendQueryRpc(r,e,t)})}sendQueryRpc(e,t,r){this.readyState===n.OPEN&&this.ws.send(JSON.stringify({jsonrpc:"2.0",method:t,params:r,id:e}))}createRandomId(){return parseInt(Array.from({length:6}).map(()=>Math.floor(100*Math.random())).join(""))}constructor(e,t,r={}){this.url=e,this.wsEndpoint=t,this.options=r,this.newBlockSubscribes=[],this.txSubscribes=new Map,this.pendingQueries=new Map,this.listeners={},this.onOpen=e=>{var t;for(let[e,t]of(this.newBlockSubscribes.length>0&&this.sendSubscribeBlockRpc(),this.txSubscribes))this.sendSubscribeTxRpc(e,t.params);for(let[e,t]of this.pendingQueries)this.sendQueryRpc(e,t.method,t.params);for(let r of null!==(t=this.listeners.open)&&void 0!==t?t:[])r(e)},this.onMessage=e=>{var t,r,n,i,o,a;for(let r of null!==(t=this.listeners.message)&&void 0!==t?t:[])r(e);if(e.data)try{let t=JSON.parse(e.data);if((null==t?void 0:t.id)&&this.pendingQueries.has(t.id)&&(t.error?this.pendingQueries.get(t.id).rejector(Error(t.error.data||t.error.message)):(null===(r=t.result)||void 0===r?void 0:r.tx_result)?this.pendingQueries.get(t.id).resolver(t.result.tx_result):this.pendingQueries.get(t.id).resolver(t.result),this.pendingQueries.delete(t.id)),(null===(i=null===(n=null==t?void 0:t.result)||void 0===n?void 0:n.data)||void 0===i?void 0:i.type)==="tendermint/event/NewBlock")for(let e of this.newBlockSubscribes)e.handler(t.result.data.value);(null===(a=null===(o=null==t?void 0:t.result)||void 0===o?void 0:o.data)||void 0===a?void 0:a.type)==="tendermint/event/Tx"&&(null==t?void 0:t.id)&&this.txSubscribes.has(t.id)&&(t.error?this.txSubscribes.get(t.id).rejector(Error(t.error.data||t.error.message)):this.txSubscribes.get(t.id).resolver(t.result.data.value.TxResult.result),this.txSubscribes.delete(t.id))}catch(e){console.log("Tendermint websocket jsonrpc response is not JSON: ".concat(e.message||e.toString()))}},this.onClose=e=>{var t;for(let r of null!==(t=this.listeners.close)&&void 0!==t?t:[])r(e)},this.onError=e=>{var t;for(let r of null!==(t=this.listeners.error)&&void 0!==t?t:[])r(e);this.close()},this.ws=this.options.wsObject?new this.options.wsObject(this.getWsEndpoint()):new WebSocket(this.getWsEndpoint()),this.ws.onopen=this.onOpen,this.ws.onmessage=this.onMessage,this.ws.onclose=this.onClose,this.ws.onerror=this.onError}}t.TendermintTxTracer=a},45613:function(e){"use strict";for(var t="qpzry9x8gf2tvdw0s3jn54khce6mua7l",r={},n=0;n>25;return(33554431&e)<<5^996825010&-(t>>0&1)^642813549&-(t>>1&1)^513874426&-(t>>2&1)^1027748829&-(t>>3&1)^705979059&-(t>>4&1)}function a(e){for(var t=1,r=0;r126)return"Invalid prefix ("+e+")";t=o(t)^n>>5}for(r=0,t=o(t);rn)throw TypeError("Exceeds length limit");var i=a(e=e.toLowerCase());if("string"==typeof i)throw Error(i);for(var s=e+"1",l=0;l>5!=0)throw Error("Non 5-bit word");i=o(i)^u,s+=t.charAt(u)}for(l=0;l<6;++l)i=o(i);for(i^=1,l=0;l<6;++l){var d=i>>(5-l)*5&31;s+=t.charAt(d)}return s}function l(e,t){if(t=t||90,e.length<8)return e+" too short";if(e.length>t)return"Exceeds length limit";var n=e.toLowerCase(),i=e.toUpperCase();if(e!==n&&e!==i)return"Mixed-case string "+e;var s=(e=n).lastIndexOf("1");if(-1===s)return"No separator character for "+e;if(0===s)return"Missing prefix for "+e;var l=e.slice(0,s),u=e.slice(s+1);if(u.length<6)return"Data too short";var d=a(l);if("string"==typeof d)return d;for(var c=[],p=0;p=u.length||c.push(h)}return 1!==d?"Invalid checksum for "+e:{prefix:l,words:c}}function u(){var e=l.apply(null,arguments);if("object"==typeof e)return e}function d(e){var t=l.apply(null,arguments);if("object"==typeof t)return t;throw Error(t)}function c(e,t,r,n){for(var i=0,o=0,a=(1<=r;)s.push(i>>(o-=r)&a);if(n)o>0&&s.push(i<=t)return"Excess padding";if(i<1&&void 0!==arguments[1]?arguments[1]:e.length,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return e.substring(0,t)+"…"+e.substring(e.length-r,e.length)}}t.Hash=a},36173:function(e,t,r){"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(36609),t),i(r(33901),t),i(r(13470),t)},33901:function(e,t,r){"use strict";var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.PubKeySecp256k1=t.PrivKeySecp256k1=void 0;let i=r(23254),o=n(r(95617)),a=r(23663),s=r(13470);class l{static generateRandomKey(){let e=new i.ec("secp256k1");return new l(a.Buffer.from(e.genKeyPair().getPrivate().toArray()))}toBytes(){return new Uint8Array(this.privKey)}getPubKey(){let e=new i.ec("secp256k1").keyFromPrivate(this.privKey);return new u(new Uint8Array(e.getPublic().encodeCompressed("array")))}signDigest32(e){if(32!==e.length)throw Error("Invalid length of digest to sign: ".concat(e.length));let t=new i.ec("secp256k1").keyFromPrivate(this.privKey).sign(e,{canonical:!0});return{r:new Uint8Array(t.r.toArray("be",32)),s:new Uint8Array(t.s.toArray("be",32)),v:t.recoveryParam}}constructor(e){this.privKey=e}}t.PrivKeySecp256k1=l;class u{toBytes(e){if(e&&65===this.pubKey.length||!e&&33===this.pubKey.length)return this.pubKey;let t=this.toKeyPair();return new Uint8Array(e?a.Buffer.from(t.getPublic().encode("hex",!1),"hex"):a.Buffer.from(t.getPublic().encodeCompressed("hex"),"hex"))}getAddress(){return this.getCosmosAddress()}getCosmosAddress(){let e=o.default.SHA256(o.default.lib.WordArray.create(this.toBytes(!1))).toString();return e=o.default.RIPEMD160(o.default.enc.Hex.parse(e)).toString(),new Uint8Array(a.Buffer.from(e,"hex"))}getEthAddress(){return s.Hash.keccak256(this.toBytes(!0).slice(1)).slice(-20)}toKeyPair(){return new i.ec("secp256k1").keyFromPublic(a.Buffer.from(this.pubKey).toString("hex"),"hex")}verifyDigest32(e,t){if(32!==e.length)throw Error("Invalid length of digest to verify: ".concat(e.length));if(64!==t.length)throw Error("Invalid length of signature: ".concat(t.length));let r=new i.ec("secp256k1"),n=t.slice(0,32),o=t.slice(32);return r.verify(e,{r:a.Buffer.from(n).toString("hex"),s:a.Buffer.from(o).toString("hex")},this.toKeyPair())}constructor(e){if(this.pubKey=e,33!==e.length&&65!==e.length)throw Error("Invalid length of public key: ".concat(e.length))}}t.PubKeySecp256k1=u},36609:function(e,t,r){"use strict";var n=function(e,t,r,n){function i(e){return e instanceof r?e:new r(function(t){t(e)})}return new(r||(r=Promise))(function(r,o){function a(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){e.done?r(e.value):i(e.value).then(a,s)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.Mnemonic=void 0;let i=r(84639),o=r(53609),a=r(78110),s=r(23663);class l{static generateWallet(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"m/44'/118'/0'/0/0",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:256;return n(this,void 0,void 0,function*(){let n=yield l.generateSeed(e,i);return{privKey:l.generateWalletFromMnemonic(n,t,r),mnemonic:n}})}static validateMnemonic(e){return i.validateMnemonic(e)}static generateSeed(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:128;return n(this,void 0,void 0,function*(){if(t%32!=0)throw TypeError("invalid entropy");let r=new Uint8Array(t/8);return r=yield e(r),i.entropyToMnemonic(s.Buffer.from(r).toString("hex"))})}static generateWalletFromMnemonic(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"m/44'/118'/0'/0/0",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",n=i.mnemonicToSeedSync(e,r),a=o.fromSeed(n).derivePath(t).privateKey;if(!a)throw Error("null hd key");return a}static generateMasterSeedFromMnemonic(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=i.mnemonicToSeedSync(e,t),n=o.fromSeed(r);return s.Buffer.from(a.decode(n.toBase58()))}static generatePrivateKeyFromMasterSeed(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"m/44'/118'/0'/0/0",r=o.fromBase58(a.encode(e)).derivePath(t).privateKey;if(!r)throw Error("null hd key");return r}}t.Mnemonic=l},92486:function(e,t,r){"use strict";var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MsgInstallBundleResponse=t.MsgInstallBundle=t.MsgProvisionResponse=t.MsgProvision=t.MsgWalletSpendActionResponse=t.MsgWalletSpendAction=t.MsgWalletActionResponse=t.MsgWalletAction=t.MsgDeliverInboundResponse=t.MsgDeliverInbound=t.protobufPackage=void 0;let i=n(r(40059)),o=n(r(81667));function a(){return{messages:[],nums:[],ack:"0",submitter:new Uint8Array}}function s(){return{}}function l(){return{owner:new Uint8Array,action:""}}function u(){return{}}function d(){return{owner:new Uint8Array,spendAction:""}}function c(){return{}}function p(){return{nickname:"",address:new Uint8Array,powerFlags:[],submitter:new Uint8Array}}function f(){return{}}function h(){return{bundle:"",submitter:new Uint8Array,compressedBundle:new Uint8Array,uncompressedSize:"0"}}function g(){return{}}t.protobufPackage="agoric.swingset",t.MsgDeliverInbound={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();for(let r of e.messages)t.uint32(10).string(r);for(let r of(t.uint32(18).fork(),e.nums))t.uint64(r);return t.ldelim(),"0"!==e.ack&&t.uint32(24).uint64(e.ack),0!==e.submitter.length&&t.uint32(34).bytes(e.submitter),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=a();for(;r.pos>>3){case 1:i.messages.push(r.string());break;case 2:if((7&e)==2){let e=r.uint32()+r.pos;for(;r.pos({messages:Array.isArray(null==e?void 0:e.messages)?e.messages.map(e=>String(e)):[],nums:Array.isArray(null==e?void 0:e.nums)?e.nums.map(e=>String(e)):[],ack:_(e.ack)?String(e.ack):"0",submitter:_(e.submitter)?v(e.submitter):new Uint8Array}),toJSON(e){let t={};return e.messages?t.messages=e.messages.map(e=>e):t.messages=[],e.nums?t.nums=e.nums.map(e=>e):t.nums=[],void 0!==e.ack&&(t.ack=e.ack),void 0!==e.submitter&&(t.submitter=S(void 0!==e.submitter?e.submitter:new Uint8Array)),t},fromPartial(e){var t,r,n,i;let o=a();return o.messages=(null===(t=e.messages)||void 0===t?void 0:t.map(e=>e))||[],o.nums=(null===(r=e.nums)||void 0===r?void 0:r.map(e=>e))||[],o.ack=null!==(n=e.ack)&&void 0!==n?n:"0",o.submitter=null!==(i=e.submitter)&&void 0!==i?i:new Uint8Array,o}},t.MsgDeliverInboundResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=s();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>s()},t.MsgWalletAction={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return 0!==e.owner.length&&t.uint32(10).bytes(e.owner),""!==e.action&&t.uint32(18).string(e.action),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=l();for(;r.pos>>3){case 1:i.owner=r.bytes();break;case 2:i.action=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({owner:_(e.owner)?v(e.owner):new Uint8Array,action:_(e.action)?String(e.action):""}),toJSON(e){let t={};return void 0!==e.owner&&(t.owner=S(void 0!==e.owner?e.owner:new Uint8Array)),void 0!==e.action&&(t.action=e.action),t},fromPartial(e){var t,r;let n=l();return n.owner=null!==(t=e.owner)&&void 0!==t?t:new Uint8Array,n.action=null!==(r=e.action)&&void 0!==r?r:"",n}},t.MsgWalletActionResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=u();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>u()},t.MsgWalletSpendAction={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return 0!==e.owner.length&&t.uint32(10).bytes(e.owner),""!==e.spendAction&&t.uint32(18).string(e.spendAction),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=d();for(;r.pos>>3){case 1:i.owner=r.bytes();break;case 2:i.spendAction=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({owner:_(e.owner)?v(e.owner):new Uint8Array,spendAction:_(e.spendAction)?String(e.spendAction):""}),toJSON(e){let t={};return void 0!==e.owner&&(t.owner=S(void 0!==e.owner?e.owner:new Uint8Array)),void 0!==e.spendAction&&(t.spendAction=e.spendAction),t},fromPartial(e){var t,r;let n=d();return n.owner=null!==(t=e.owner)&&void 0!==t?t:new Uint8Array,n.spendAction=null!==(r=e.spendAction)&&void 0!==r?r:"",n}},t.MsgWalletSpendActionResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=c();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>c()},t.MsgProvision={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();for(let r of(""!==e.nickname&&t.uint32(10).string(e.nickname),0!==e.address.length&&t.uint32(18).bytes(e.address),e.powerFlags))t.uint32(26).string(r);return 0!==e.submitter.length&&t.uint32(34).bytes(e.submitter),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=p();for(;r.pos>>3){case 1:i.nickname=r.string();break;case 2:i.address=r.bytes();break;case 3:i.powerFlags.push(r.string());break;case 4:i.submitter=r.bytes();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({nickname:_(e.nickname)?String(e.nickname):"",address:_(e.address)?v(e.address):new Uint8Array,powerFlags:Array.isArray(null==e?void 0:e.powerFlags)?e.powerFlags.map(e=>String(e)):[],submitter:_(e.submitter)?v(e.submitter):new Uint8Array}),toJSON(e){let t={};return void 0!==e.nickname&&(t.nickname=e.nickname),void 0!==e.address&&(t.address=S(void 0!==e.address?e.address:new Uint8Array)),e.powerFlags?t.powerFlags=e.powerFlags.map(e=>e):t.powerFlags=[],void 0!==e.submitter&&(t.submitter=S(void 0!==e.submitter?e.submitter:new Uint8Array)),t},fromPartial(e){var t,r,n,i;let o=p();return o.nickname=null!==(t=e.nickname)&&void 0!==t?t:"",o.address=null!==(r=e.address)&&void 0!==r?r:new Uint8Array,o.powerFlags=(null===(n=e.powerFlags)||void 0===n?void 0:n.map(e=>e))||[],o.submitter=null!==(i=e.submitter)&&void 0!==i?i:new Uint8Array,o}},t.MsgProvisionResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=f();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>f()},t.MsgInstallBundle={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.bundle&&t.uint32(10).string(e.bundle),0!==e.submitter.length&&t.uint32(18).bytes(e.submitter),0!==e.compressedBundle.length&&t.uint32(26).bytes(e.compressedBundle),"0"!==e.uncompressedSize&&t.uint32(32).int64(e.uncompressedSize),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=h();for(;r.pos>>3){case 1:i.bundle=r.string();break;case 2:i.submitter=r.bytes();break;case 3:i.compressedBundle=r.bytes();break;case 4:i.uncompressedSize=w(r.int64());break;default:r.skipType(7&e)}}return i},fromJSON:e=>({bundle:_(e.bundle)?String(e.bundle):"",submitter:_(e.submitter)?v(e.submitter):new Uint8Array,compressedBundle:_(e.compressedBundle)?v(e.compressedBundle):new Uint8Array,uncompressedSize:_(e.uncompressedSize)?String(e.uncompressedSize):"0"}),toJSON(e){let t={};return void 0!==e.bundle&&(t.bundle=e.bundle),void 0!==e.submitter&&(t.submitter=S(void 0!==e.submitter?e.submitter:new Uint8Array)),void 0!==e.compressedBundle&&(t.compressedBundle=S(void 0!==e.compressedBundle?e.compressedBundle:new Uint8Array)),void 0!==e.uncompressedSize&&(t.uncompressedSize=e.uncompressedSize),t},fromPartial(e){var t,r,n,i;let o=h();return o.bundle=null!==(t=e.bundle)&&void 0!==t?t:"",o.submitter=null!==(r=e.submitter)&&void 0!==r?r:new Uint8Array,o.compressedBundle=null!==(n=e.compressedBundle)&&void 0!==n?n:new Uint8Array,o.uncompressedSize=null!==(i=e.uncompressedSize)&&void 0!==i?i:"0",o}},t.MsgInstallBundleResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=g();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>g()};var m=void 0!==m?m:"undefined"!=typeof self?self:window;let y=m.atob||(e=>m.Buffer.from(e,"base64").toString("binary"));function v(e){let t=y(e),r=new Uint8Array(t.length);for(let e=0;em.Buffer.from(e,"binary").toString("base64"));function S(e){let t=[];for(let r of e)t.push(String.fromCharCode(r));return b(t.join(""))}function w(e){return e.toString()}function _(e){return null!=e}o.default.util.Long!==i.default&&(o.default.util.Long=i.default,o.default.configure())},68557:function(e,t,r){"use strict";var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Grant=t.GenericAuthorization=t.protobufPackage=void 0;let i=n(r(40059)),o=n(r(81667)),a=r(90338),s=r(28446);function l(){return{msg:""}}function u(){return{authorization:void 0,expiration:void 0}}function d(e){return{seconds:Math.trunc(e.getTime()/1e3).toString(),nanos:e.getTime()%1e3*1e6}}function c(e){let t=1e3*Number(e.seconds);return new Date(t+=e.nanos/1e6)}function p(e){return e instanceof Date?e:"string"==typeof e?new Date(e):c(a.Timestamp.fromJSON(e))}function f(e){return null!=e}t.protobufPackage="cosmos.authz.v1beta1",t.GenericAuthorization={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.msg&&t.uint32(10).string(e.msg),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=l();for(;r.pos>>3==1?i.msg=r.string():r.skipType(7&e)}return i},fromJSON:e=>({msg:f(e.msg)?String(e.msg):""}),toJSON(e){let t={};return void 0!==e.msg&&(t.msg=e.msg),t},fromPartial(e){var t;let r=l();return r.msg=null!==(t=e.msg)&&void 0!==t?t:"",r}},t.Grant={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return void 0!==e.authorization&&s.Any.encode(e.authorization,t.uint32(10).fork()).ldelim(),void 0!==e.expiration&&a.Timestamp.encode(d(e.expiration),t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=u();for(;r.pos>>3){case 1:i.authorization=s.Any.decode(r,r.uint32());break;case 2:i.expiration=c(a.Timestamp.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return i},fromJSON:e=>({authorization:f(e.authorization)?s.Any.fromJSON(e.authorization):void 0,expiration:f(e.expiration)?p(e.expiration):void 0}),toJSON(e){let t={};return void 0!==e.authorization&&(t.authorization=e.authorization?s.Any.toJSON(e.authorization):void 0),void 0!==e.expiration&&(t.expiration=e.expiration.toISOString()),t},fromPartial(e){var t;let r=u();return r.authorization=void 0!==e.authorization&&null!==e.authorization?s.Any.fromPartial(e.authorization):void 0,r.expiration=null!==(t=e.expiration)&&void 0!==t?t:void 0,r}},o.default.util.Long!==i.default&&(o.default.util.Long=i.default,o.default.configure())},85311:function(e,t,r){"use strict";var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MsgRevokeResponse=t.MsgRevoke=t.MsgGrantResponse=t.MsgExec=t.MsgExecResponse=t.MsgGrant=t.protobufPackage=void 0;let i=n(r(40059)),o=n(r(81667)),a=r(68557),s=r(28446);function l(){return{granter:"",grantee:"",grant:void 0}}function u(){return{results:[]}}function d(){return{grantee:"",msgs:[]}}function c(){return{}}function p(){return{granter:"",grantee:"",msgTypeUrl:""}}function f(){return{}}t.protobufPackage="cosmos.authz.v1beta1",t.MsgGrant={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.granter&&t.uint32(10).string(e.granter),""!==e.grantee&&t.uint32(18).string(e.grantee),void 0!==e.grant&&a.Grant.encode(e.grant,t.uint32(26).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=l();for(;r.pos>>3){case 1:i.granter=r.string();break;case 2:i.grantee=r.string();break;case 3:i.grant=a.Grant.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON:e=>({granter:b(e.granter)?String(e.granter):"",grantee:b(e.grantee)?String(e.grantee):"",grant:b(e.grant)?a.Grant.fromJSON(e.grant):void 0}),toJSON(e){let t={};return void 0!==e.granter&&(t.granter=e.granter),void 0!==e.grantee&&(t.grantee=e.grantee),void 0!==e.grant&&(t.grant=e.grant?a.Grant.toJSON(e.grant):void 0),t},fromPartial(e){var t,r;let n=l();return n.granter=null!==(t=e.granter)&&void 0!==t?t:"",n.grantee=null!==(r=e.grantee)&&void 0!==r?r:"",n.grant=void 0!==e.grant&&null!==e.grant?a.Grant.fromPartial(e.grant):void 0,n}},t.MsgExecResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();for(let r of e.results)t.uint32(10).bytes(r);return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=u();for(;r.pos>>3==1?i.results.push(r.bytes()):r.skipType(7&e)}return i},fromJSON:e=>({results:Array.isArray(null==e?void 0:e.results)?e.results.map(e=>m(e)):[]}),toJSON(e){let t={};return e.results?t.results=e.results.map(e=>v(void 0!==e?e:new Uint8Array)):t.results=[],t},fromPartial(e){var t;let r=u();return r.results=(null===(t=e.results)||void 0===t?void 0:t.map(e=>e))||[],r}},t.MsgExec={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();for(let r of(""!==e.grantee&&t.uint32(10).string(e.grantee),e.msgs))s.Any.encode(r,t.uint32(18).fork()).ldelim();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=d();for(;r.pos>>3){case 1:i.grantee=r.string();break;case 2:i.msgs.push(s.Any.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return i},fromJSON:e=>({grantee:b(e.grantee)?String(e.grantee):"",msgs:Array.isArray(null==e?void 0:e.msgs)?e.msgs.map(e=>s.Any.fromJSON(e)):[]}),toJSON(e){let t={};return void 0!==e.grantee&&(t.grantee=e.grantee),e.msgs?t.msgs=e.msgs.map(e=>e?s.Any.toJSON(e):void 0):t.msgs=[],t},fromPartial(e){var t,r;let n=d();return n.grantee=null!==(t=e.grantee)&&void 0!==t?t:"",n.msgs=(null===(r=e.msgs)||void 0===r?void 0:r.map(e=>s.Any.fromPartial(e)))||[],n}},t.MsgGrantResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=c();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>c()},t.MsgRevoke={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.granter&&t.uint32(10).string(e.granter),""!==e.grantee&&t.uint32(18).string(e.grantee),""!==e.msgTypeUrl&&t.uint32(26).string(e.msgTypeUrl),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=p();for(;r.pos>>3){case 1:i.granter=r.string();break;case 2:i.grantee=r.string();break;case 3:i.msgTypeUrl=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({granter:b(e.granter)?String(e.granter):"",grantee:b(e.grantee)?String(e.grantee):"",msgTypeUrl:b(e.msgTypeUrl)?String(e.msgTypeUrl):""}),toJSON(e){let t={};return void 0!==e.granter&&(t.granter=e.granter),void 0!==e.grantee&&(t.grantee=e.grantee),void 0!==e.msgTypeUrl&&(t.msgTypeUrl=e.msgTypeUrl),t},fromPartial(e){var t,r,n;let i=p();return i.granter=null!==(t=e.granter)&&void 0!==t?t:"",i.grantee=null!==(r=e.grantee)&&void 0!==r?r:"",i.msgTypeUrl=null!==(n=e.msgTypeUrl)&&void 0!==n?n:"",i}},t.MsgRevokeResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=f();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>f()};var h=void 0!==h?h:"undefined"!=typeof self?self:window;let g=h.atob||(e=>h.Buffer.from(e,"base64").toString("binary"));function m(e){let t=g(e),r=new Uint8Array(t.length);for(let e=0;eh.Buffer.from(e,"binary").toString("base64"));function v(e){let t=[];for(let r of e)t.push(String.fromCharCode(r));return y(t.join(""))}function b(e){return null!=e}o.default.util.Long!==i.default&&(o.default.util.Long=i.default,o.default.configure())},72235:function(e,t,r){"use strict";var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.SendAuthorization=t.protobufPackage=void 0;let i=n(r(40059)),o=n(r(81667)),a=r(80054);function s(){return{spendLimit:[]}}t.protobufPackage="cosmos.bank.v1beta1",t.SendAuthorization={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();for(let r of e.spendLimit)a.Coin.encode(r,t.uint32(10).fork()).ldelim();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=s();for(;r.pos>>3==1?i.spendLimit.push(a.Coin.decode(r,r.uint32())):r.skipType(7&e)}return i},fromJSON:e=>({spendLimit:Array.isArray(null==e?void 0:e.spendLimit)?e.spendLimit.map(e=>a.Coin.fromJSON(e)):[]}),toJSON(e){let t={};return e.spendLimit?t.spendLimit=e.spendLimit.map(e=>e?a.Coin.toJSON(e):void 0):t.spendLimit=[],t},fromPartial(e){var t;let r=s();return r.spendLimit=(null===(t=e.spendLimit)||void 0===t?void 0:t.map(e=>a.Coin.fromPartial(e)))||[],r}},o.default.util.Long!==i.default&&(o.default.util.Long=i.default,o.default.configure())},96291:function(e,t,r){"use strict";var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Metadata=t.DenomUnit=t.Supply=t.Output=t.Input=t.SendEnabled=t.Params=t.protobufPackage=void 0;let i=n(r(40059)),o=n(r(81667)),a=r(80054);function s(){return{sendEnabled:[],defaultSendEnabled:!1}}function l(){return{denom:"",enabled:!1}}function u(){return{address:"",coins:[]}}function d(){return{address:"",coins:[]}}function c(){return{total:[]}}function p(){return{denom:"",exponent:0,aliases:[]}}function f(){return{description:"",denomUnits:[],base:"",display:"",name:"",symbol:""}}function h(e){return null!=e}t.protobufPackage="cosmos.bank.v1beta1",t.Params={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();for(let n of e.sendEnabled)t.SendEnabled.encode(n,r.uint32(10).fork()).ldelim();return!0===e.defaultSendEnabled&&r.uint32(16).bool(e.defaultSendEnabled),r},decode(e,r){let n=e instanceof o.default.Reader?e:new o.default.Reader(e),i=void 0===r?n.len:n.pos+r,a=s();for(;n.pos>>3){case 1:a.sendEnabled.push(t.SendEnabled.decode(n,n.uint32()));break;case 2:a.defaultSendEnabled=n.bool();break;default:n.skipType(7&e)}}return a},fromJSON:e=>({sendEnabled:Array.isArray(null==e?void 0:e.sendEnabled)?e.sendEnabled.map(e=>t.SendEnabled.fromJSON(e)):[],defaultSendEnabled:!!h(e.defaultSendEnabled)&&!!e.defaultSendEnabled}),toJSON(e){let r={};return e.sendEnabled?r.sendEnabled=e.sendEnabled.map(e=>e?t.SendEnabled.toJSON(e):void 0):r.sendEnabled=[],void 0!==e.defaultSendEnabled&&(r.defaultSendEnabled=e.defaultSendEnabled),r},fromPartial(e){var r,n;let i=s();return i.sendEnabled=(null===(r=e.sendEnabled)||void 0===r?void 0:r.map(e=>t.SendEnabled.fromPartial(e)))||[],i.defaultSendEnabled=null!==(n=e.defaultSendEnabled)&&void 0!==n&&n,i}},t.SendEnabled={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.denom&&t.uint32(10).string(e.denom),!0===e.enabled&&t.uint32(16).bool(e.enabled),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=l();for(;r.pos>>3){case 1:i.denom=r.string();break;case 2:i.enabled=r.bool();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({denom:h(e.denom)?String(e.denom):"",enabled:!!h(e.enabled)&&!!e.enabled}),toJSON(e){let t={};return void 0!==e.denom&&(t.denom=e.denom),void 0!==e.enabled&&(t.enabled=e.enabled),t},fromPartial(e){var t,r;let n=l();return n.denom=null!==(t=e.denom)&&void 0!==t?t:"",n.enabled=null!==(r=e.enabled)&&void 0!==r&&r,n}},t.Input={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();for(let r of(""!==e.address&&t.uint32(10).string(e.address),e.coins))a.Coin.encode(r,t.uint32(18).fork()).ldelim();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=u();for(;r.pos>>3){case 1:i.address=r.string();break;case 2:i.coins.push(a.Coin.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return i},fromJSON:e=>({address:h(e.address)?String(e.address):"",coins:Array.isArray(null==e?void 0:e.coins)?e.coins.map(e=>a.Coin.fromJSON(e)):[]}),toJSON(e){let t={};return void 0!==e.address&&(t.address=e.address),e.coins?t.coins=e.coins.map(e=>e?a.Coin.toJSON(e):void 0):t.coins=[],t},fromPartial(e){var t,r;let n=u();return n.address=null!==(t=e.address)&&void 0!==t?t:"",n.coins=(null===(r=e.coins)||void 0===r?void 0:r.map(e=>a.Coin.fromPartial(e)))||[],n}},t.Output={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();for(let r of(""!==e.address&&t.uint32(10).string(e.address),e.coins))a.Coin.encode(r,t.uint32(18).fork()).ldelim();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=d();for(;r.pos>>3){case 1:i.address=r.string();break;case 2:i.coins.push(a.Coin.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return i},fromJSON:e=>({address:h(e.address)?String(e.address):"",coins:Array.isArray(null==e?void 0:e.coins)?e.coins.map(e=>a.Coin.fromJSON(e)):[]}),toJSON(e){let t={};return void 0!==e.address&&(t.address=e.address),e.coins?t.coins=e.coins.map(e=>e?a.Coin.toJSON(e):void 0):t.coins=[],t},fromPartial(e){var t,r;let n=d();return n.address=null!==(t=e.address)&&void 0!==t?t:"",n.coins=(null===(r=e.coins)||void 0===r?void 0:r.map(e=>a.Coin.fromPartial(e)))||[],n}},t.Supply={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();for(let r of e.total)a.Coin.encode(r,t.uint32(10).fork()).ldelim();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=c();for(;r.pos>>3==1?i.total.push(a.Coin.decode(r,r.uint32())):r.skipType(7&e)}return i},fromJSON:e=>({total:Array.isArray(null==e?void 0:e.total)?e.total.map(e=>a.Coin.fromJSON(e)):[]}),toJSON(e){let t={};return e.total?t.total=e.total.map(e=>e?a.Coin.toJSON(e):void 0):t.total=[],t},fromPartial(e){var t;let r=c();return r.total=(null===(t=e.total)||void 0===t?void 0:t.map(e=>a.Coin.fromPartial(e)))||[],r}},t.DenomUnit={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();for(let r of(""!==e.denom&&t.uint32(10).string(e.denom),0!==e.exponent&&t.uint32(16).uint32(e.exponent),e.aliases))t.uint32(26).string(r);return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=p();for(;r.pos>>3){case 1:i.denom=r.string();break;case 2:i.exponent=r.uint32();break;case 3:i.aliases.push(r.string());break;default:r.skipType(7&e)}}return i},fromJSON:e=>({denom:h(e.denom)?String(e.denom):"",exponent:h(e.exponent)?Number(e.exponent):0,aliases:Array.isArray(null==e?void 0:e.aliases)?e.aliases.map(e=>String(e)):[]}),toJSON(e){let t={};return void 0!==e.denom&&(t.denom=e.denom),void 0!==e.exponent&&(t.exponent=Math.round(e.exponent)),e.aliases?t.aliases=e.aliases.map(e=>e):t.aliases=[],t},fromPartial(e){var t,r,n;let i=p();return i.denom=null!==(t=e.denom)&&void 0!==t?t:"",i.exponent=null!==(r=e.exponent)&&void 0!==r?r:0,i.aliases=(null===(n=e.aliases)||void 0===n?void 0:n.map(e=>e))||[],i}},t.Metadata={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();for(let n of(""!==e.description&&r.uint32(10).string(e.description),e.denomUnits))t.DenomUnit.encode(n,r.uint32(18).fork()).ldelim();return""!==e.base&&r.uint32(26).string(e.base),""!==e.display&&r.uint32(34).string(e.display),""!==e.name&&r.uint32(42).string(e.name),""!==e.symbol&&r.uint32(50).string(e.symbol),r},decode(e,r){let n=e instanceof o.default.Reader?e:new o.default.Reader(e),i=void 0===r?n.len:n.pos+r,a=f();for(;n.pos>>3){case 1:a.description=n.string();break;case 2:a.denomUnits.push(t.DenomUnit.decode(n,n.uint32()));break;case 3:a.base=n.string();break;case 4:a.display=n.string();break;case 5:a.name=n.string();break;case 6:a.symbol=n.string();break;default:n.skipType(7&e)}}return a},fromJSON:e=>({description:h(e.description)?String(e.description):"",denomUnits:Array.isArray(null==e?void 0:e.denomUnits)?e.denomUnits.map(e=>t.DenomUnit.fromJSON(e)):[],base:h(e.base)?String(e.base):"",display:h(e.display)?String(e.display):"",name:h(e.name)?String(e.name):"",symbol:h(e.symbol)?String(e.symbol):""}),toJSON(e){let r={};return void 0!==e.description&&(r.description=e.description),e.denomUnits?r.denomUnits=e.denomUnits.map(e=>e?t.DenomUnit.toJSON(e):void 0):r.denomUnits=[],void 0!==e.base&&(r.base=e.base),void 0!==e.display&&(r.display=e.display),void 0!==e.name&&(r.name=e.name),void 0!==e.symbol&&(r.symbol=e.symbol),r},fromPartial(e){var r,n,i,o,a,s;let l=f();return l.description=null!==(r=e.description)&&void 0!==r?r:"",l.denomUnits=(null===(n=e.denomUnits)||void 0===n?void 0:n.map(e=>t.DenomUnit.fromPartial(e)))||[],l.base=null!==(i=e.base)&&void 0!==i?i:"",l.display=null!==(o=e.display)&&void 0!==o?o:"",l.name=null!==(a=e.name)&&void 0!==a?a:"",l.symbol=null!==(s=e.symbol)&&void 0!==s?s:"",l}},o.default.util.Long!==i.default&&(o.default.util.Long=i.default,o.default.configure())},24611:function(e,t,r){"use strict";var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MsgMultiSendResponse=t.MsgMultiSend=t.MsgSendResponse=t.MsgSend=t.protobufPackage=void 0;let i=n(r(40059)),o=n(r(81667)),a=r(80054),s=r(96291);function l(){return{fromAddress:"",toAddress:"",amount:[]}}function u(){return{}}function d(){return{inputs:[],outputs:[]}}function c(){return{}}function p(e){return null!=e}t.protobufPackage="cosmos.bank.v1beta1",t.MsgSend={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();for(let r of(""!==e.fromAddress&&t.uint32(10).string(e.fromAddress),""!==e.toAddress&&t.uint32(18).string(e.toAddress),e.amount))a.Coin.encode(r,t.uint32(26).fork()).ldelim();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=l();for(;r.pos>>3){case 1:i.fromAddress=r.string();break;case 2:i.toAddress=r.string();break;case 3:i.amount.push(a.Coin.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return i},fromJSON:e=>({fromAddress:p(e.fromAddress)?String(e.fromAddress):"",toAddress:p(e.toAddress)?String(e.toAddress):"",amount:Array.isArray(null==e?void 0:e.amount)?e.amount.map(e=>a.Coin.fromJSON(e)):[]}),toJSON(e){let t={};return void 0!==e.fromAddress&&(t.fromAddress=e.fromAddress),void 0!==e.toAddress&&(t.toAddress=e.toAddress),e.amount?t.amount=e.amount.map(e=>e?a.Coin.toJSON(e):void 0):t.amount=[],t},fromPartial(e){var t,r,n;let i=l();return i.fromAddress=null!==(t=e.fromAddress)&&void 0!==t?t:"",i.toAddress=null!==(r=e.toAddress)&&void 0!==r?r:"",i.amount=(null===(n=e.amount)||void 0===n?void 0:n.map(e=>a.Coin.fromPartial(e)))||[],i}},t.MsgSendResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=u();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>u()},t.MsgMultiSend={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();for(let r of e.inputs)s.Input.encode(r,t.uint32(10).fork()).ldelim();for(let r of e.outputs)s.Output.encode(r,t.uint32(18).fork()).ldelim();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=d();for(;r.pos>>3){case 1:i.inputs.push(s.Input.decode(r,r.uint32()));break;case 2:i.outputs.push(s.Output.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return i},fromJSON:e=>({inputs:Array.isArray(null==e?void 0:e.inputs)?e.inputs.map(e=>s.Input.fromJSON(e)):[],outputs:Array.isArray(null==e?void 0:e.outputs)?e.outputs.map(e=>s.Output.fromJSON(e)):[]}),toJSON(e){let t={};return e.inputs?t.inputs=e.inputs.map(e=>e?s.Input.toJSON(e):void 0):t.inputs=[],e.outputs?t.outputs=e.outputs.map(e=>e?s.Output.toJSON(e):void 0):t.outputs=[],t},fromPartial(e){var t,r;let n=d();return n.inputs=(null===(t=e.inputs)||void 0===t?void 0:t.map(e=>s.Input.fromPartial(e)))||[],n.outputs=(null===(r=e.outputs)||void 0===r?void 0:r.map(e=>s.Output.fromPartial(e)))||[],n}},t.MsgMultiSendResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=c();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>c()},o.default.util.Long!==i.default&&(o.default.util.Long=i.default,o.default.configure())},80054:function(e,t,r){"use strict";var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.DecProto=t.IntProto=t.DecCoin=t.Coin=t.protobufPackage=void 0;let i=n(r(40059)),o=n(r(81667));function a(){return{denom:"",amount:""}}function s(){return{denom:"",amount:""}}function l(){return{int:""}}function u(){return{dec:""}}function d(e){return null!=e}t.protobufPackage="cosmos.base.v1beta1",t.Coin={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.denom&&t.uint32(10).string(e.denom),""!==e.amount&&t.uint32(18).string(e.amount),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=a();for(;r.pos>>3){case 1:i.denom=r.string();break;case 2:i.amount=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({denom:d(e.denom)?String(e.denom):"",amount:d(e.amount)?String(e.amount):""}),toJSON(e){let t={};return void 0!==e.denom&&(t.denom=e.denom),void 0!==e.amount&&(t.amount=e.amount),t},fromPartial(e){var t,r;let n=a();return n.denom=null!==(t=e.denom)&&void 0!==t?t:"",n.amount=null!==(r=e.amount)&&void 0!==r?r:"",n}},t.DecCoin={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.denom&&t.uint32(10).string(e.denom),""!==e.amount&&t.uint32(18).string(e.amount),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=s();for(;r.pos>>3){case 1:i.denom=r.string();break;case 2:i.amount=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({denom:d(e.denom)?String(e.denom):"",amount:d(e.amount)?String(e.amount):""}),toJSON(e){let t={};return void 0!==e.denom&&(t.denom=e.denom),void 0!==e.amount&&(t.amount=e.amount),t},fromPartial(e){var t,r;let n=s();return n.denom=null!==(t=e.denom)&&void 0!==t?t:"",n.amount=null!==(r=e.amount)&&void 0!==r?r:"",n}},t.IntProto={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.int&&t.uint32(10).string(e.int),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=l();for(;r.pos>>3==1?i.int=r.string():r.skipType(7&e)}return i},fromJSON:e=>({int:d(e.int)?String(e.int):""}),toJSON(e){let t={};return void 0!==e.int&&(t.int=e.int),t},fromPartial(e){var t;let r=l();return r.int=null!==(t=e.int)&&void 0!==t?t:"",r}},t.DecProto={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.dec&&t.uint32(10).string(e.dec),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=u();for(;r.pos>>3==1?i.dec=r.string():r.skipType(7&e)}return i},fromJSON:e=>({dec:d(e.dec)?String(e.dec):""}),toJSON(e){let t={};return void 0!==e.dec&&(t.dec=e.dec),t},fromPartial(e){var t;let r=u();return r.dec=null!==(t=e.dec)&&void 0!==t?t:"",r}},o.default.util.Long!==i.default&&(o.default.util.Long=i.default,o.default.configure())},61097:function(e,t,r){"use strict";var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.CompactBitArray=t.MultiSignature=t.protobufPackage=void 0;let i=n(r(40059)),o=n(r(81667));function a(){return{signatures:[]}}function s(){return{extraBitsStored:0,elems:new Uint8Array}}t.protobufPackage="cosmos.crypto.multisig.v1beta1",t.MultiSignature={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();for(let r of e.signatures)t.uint32(10).bytes(r);return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=a();for(;r.pos>>3==1?i.signatures.push(r.bytes()):r.skipType(7&e)}return i},fromJSON:e=>({signatures:Array.isArray(null==e?void 0:e.signatures)?e.signatures.map(e=>d(e)):[]}),toJSON(e){let t={};return e.signatures?t.signatures=e.signatures.map(e=>p(void 0!==e?e:new Uint8Array)):t.signatures=[],t},fromPartial(e){var t;let r=a();return r.signatures=(null===(t=e.signatures)||void 0===t?void 0:t.map(e=>e))||[],r}},t.CompactBitArray={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return 0!==e.extraBitsStored&&t.uint32(8).uint32(e.extraBitsStored),0!==e.elems.length&&t.uint32(18).bytes(e.elems),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=s();for(;r.pos>>3){case 1:i.extraBitsStored=r.uint32();break;case 2:i.elems=r.bytes();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({extraBitsStored:f(e.extraBitsStored)?Number(e.extraBitsStored):0,elems:f(e.elems)?d(e.elems):new Uint8Array}),toJSON(e){let t={};return void 0!==e.extraBitsStored&&(t.extraBitsStored=Math.round(e.extraBitsStored)),void 0!==e.elems&&(t.elems=p(void 0!==e.elems?e.elems:new Uint8Array)),t},fromPartial(e){var t,r;let n=s();return n.extraBitsStored=null!==(t=e.extraBitsStored)&&void 0!==t?t:0,n.elems=null!==(r=e.elems)&&void 0!==r?r:new Uint8Array,n}};var l=void 0!==l?l:"undefined"!=typeof self?self:window;let u=l.atob||(e=>l.Buffer.from(e,"base64").toString("binary"));function d(e){let t=u(e),r=new Uint8Array(t.length);for(let e=0;el.Buffer.from(e,"binary").toString("base64"));function p(e){let t=[];for(let r of e)t.push(String.fromCharCode(r));return c(t.join(""))}function f(e){return null!=e}o.default.util.Long!==i.default&&(o.default.util.Long=i.default,o.default.configure())},28319:function(e,t,r){"use strict";var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MsgFundCommunityPoolResponse=t.MsgFundCommunityPool=t.MsgWithdrawValidatorCommissionResponse=t.MsgWithdrawValidatorCommission=t.MsgWithdrawDelegatorRewardResponse=t.MsgWithdrawDelegatorReward=t.MsgSetWithdrawAddressResponse=t.MsgSetWithdrawAddress=t.protobufPackage=void 0;let i=n(r(40059)),o=n(r(81667)),a=r(80054);function s(){return{delegatorAddress:"",withdrawAddress:""}}function l(){return{}}function u(){return{delegatorAddress:"",validatorAddress:""}}function d(){return{}}function c(){return{validatorAddress:""}}function p(){return{}}function f(){return{amount:[],depositor:""}}function h(){return{}}function g(e){return null!=e}t.protobufPackage="cosmos.distribution.v1beta1",t.MsgSetWithdrawAddress={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),""!==e.withdrawAddress&&t.uint32(18).string(e.withdrawAddress),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=s();for(;r.pos>>3){case 1:i.delegatorAddress=r.string();break;case 2:i.withdrawAddress=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({delegatorAddress:g(e.delegatorAddress)?String(e.delegatorAddress):"",withdrawAddress:g(e.withdrawAddress)?String(e.withdrawAddress):""}),toJSON(e){let t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.withdrawAddress&&(t.withdrawAddress=e.withdrawAddress),t},fromPartial(e){var t,r;let n=s();return n.delegatorAddress=null!==(t=e.delegatorAddress)&&void 0!==t?t:"",n.withdrawAddress=null!==(r=e.withdrawAddress)&&void 0!==r?r:"",n}},t.MsgSetWithdrawAddressResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=l();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>l()},t.MsgWithdrawDelegatorReward={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),""!==e.validatorAddress&&t.uint32(18).string(e.validatorAddress),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=u();for(;r.pos>>3){case 1:i.delegatorAddress=r.string();break;case 2:i.validatorAddress=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({delegatorAddress:g(e.delegatorAddress)?String(e.delegatorAddress):"",validatorAddress:g(e.validatorAddress)?String(e.validatorAddress):""}),toJSON(e){let t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),t},fromPartial(e){var t,r;let n=u();return n.delegatorAddress=null!==(t=e.delegatorAddress)&&void 0!==t?t:"",n.validatorAddress=null!==(r=e.validatorAddress)&&void 0!==r?r:"",n}},t.MsgWithdrawDelegatorRewardResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=d();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>d()},t.MsgWithdrawValidatorCommission={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.validatorAddress&&t.uint32(10).string(e.validatorAddress),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=c();for(;r.pos>>3==1?i.validatorAddress=r.string():r.skipType(7&e)}return i},fromJSON:e=>({validatorAddress:g(e.validatorAddress)?String(e.validatorAddress):""}),toJSON(e){let t={};return void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),t},fromPartial(e){var t;let r=c();return r.validatorAddress=null!==(t=e.validatorAddress)&&void 0!==t?t:"",r}},t.MsgWithdrawValidatorCommissionResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=p();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>p()},t.MsgFundCommunityPool={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();for(let r of e.amount)a.Coin.encode(r,t.uint32(10).fork()).ldelim();return""!==e.depositor&&t.uint32(18).string(e.depositor),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=f();for(;r.pos>>3){case 1:i.amount.push(a.Coin.decode(r,r.uint32()));break;case 2:i.depositor=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({amount:Array.isArray(null==e?void 0:e.amount)?e.amount.map(e=>a.Coin.fromJSON(e)):[],depositor:g(e.depositor)?String(e.depositor):""}),toJSON(e){let t={};return e.amount?t.amount=e.amount.map(e=>e?a.Coin.toJSON(e):void 0):t.amount=[],void 0!==e.depositor&&(t.depositor=e.depositor),t},fromPartial(e){var t,r;let n=f();return n.amount=(null===(t=e.amount)||void 0===t?void 0:t.map(e=>a.Coin.fromPartial(e)))||[],n.depositor=null!==(r=e.depositor)&&void 0!==r?r:"",n}},t.MsgFundCommunityPoolResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=h();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>h()},o.default.util.Long!==i.default&&(o.default.util.Long=i.default,o.default.configure())},20666:function(e,t,r){"use strict";var n,i,o=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.TallyParams=t.VotingParams=t.DepositParams=t.Vote=t.TallyResult=t.Proposal=t.Deposit=t.TextProposal=t.WeightedVoteOption=t.proposalStatusToJSON=t.proposalStatusFromJSON=t.ProposalStatus=t.voteOptionToJSON=t.voteOptionFromJSON=t.VoteOption=t.protobufPackage=void 0;let a=o(r(40059)),s=o(r(81667)),l=r(90338),u=r(80054),d=r(28446),c=r(81555);function p(e){switch(e){case 0:case"VOTE_OPTION_UNSPECIFIED":return n.VOTE_OPTION_UNSPECIFIED;case 1:case"VOTE_OPTION_YES":return n.VOTE_OPTION_YES;case 2:case"VOTE_OPTION_ABSTAIN":return n.VOTE_OPTION_ABSTAIN;case 3:case"VOTE_OPTION_NO":return n.VOTE_OPTION_NO;case 4:case"VOTE_OPTION_NO_WITH_VETO":return n.VOTE_OPTION_NO_WITH_VETO;default:return n.UNRECOGNIZED}}function f(e){switch(e){case n.VOTE_OPTION_UNSPECIFIED:return"VOTE_OPTION_UNSPECIFIED";case n.VOTE_OPTION_YES:return"VOTE_OPTION_YES";case n.VOTE_OPTION_ABSTAIN:return"VOTE_OPTION_ABSTAIN";case n.VOTE_OPTION_NO:return"VOTE_OPTION_NO";case n.VOTE_OPTION_NO_WITH_VETO:return"VOTE_OPTION_NO_WITH_VETO";default:return"UNKNOWN"}}function h(e){switch(e){case 0:case"PROPOSAL_STATUS_UNSPECIFIED":return i.PROPOSAL_STATUS_UNSPECIFIED;case 1:case"PROPOSAL_STATUS_DEPOSIT_PERIOD":return i.PROPOSAL_STATUS_DEPOSIT_PERIOD;case 2:case"PROPOSAL_STATUS_VOTING_PERIOD":return i.PROPOSAL_STATUS_VOTING_PERIOD;case 3:case"PROPOSAL_STATUS_PASSED":return i.PROPOSAL_STATUS_PASSED;case 4:case"PROPOSAL_STATUS_REJECTED":return i.PROPOSAL_STATUS_REJECTED;case 5:case"PROPOSAL_STATUS_FAILED":return i.PROPOSAL_STATUS_FAILED;default:return i.UNRECOGNIZED}}function g(e){switch(e){case i.PROPOSAL_STATUS_UNSPECIFIED:return"PROPOSAL_STATUS_UNSPECIFIED";case i.PROPOSAL_STATUS_DEPOSIT_PERIOD:return"PROPOSAL_STATUS_DEPOSIT_PERIOD";case i.PROPOSAL_STATUS_VOTING_PERIOD:return"PROPOSAL_STATUS_VOTING_PERIOD";case i.PROPOSAL_STATUS_PASSED:return"PROPOSAL_STATUS_PASSED";case i.PROPOSAL_STATUS_REJECTED:return"PROPOSAL_STATUS_REJECTED";case i.PROPOSAL_STATUS_FAILED:return"PROPOSAL_STATUS_FAILED";default:return"UNKNOWN"}}function m(){return{option:0,weight:""}}function y(){return{title:"",description:""}}function v(){return{proposalId:"0",depositor:"",amount:[]}}function b(){return{proposalId:"0",content:void 0,status:0,finalTallyResult:void 0,submitTime:void 0,depositEndTime:void 0,totalDeposit:[],votingStartTime:void 0,votingEndTime:void 0}}function S(){return{yes:"",abstain:"",no:"",noWithVeto:""}}function w(){return{proposalId:"0",voter:"",option:0,options:[]}}function _(){return{minDeposit:[],maxDepositPeriod:void 0}}function k(){return{votingPeriod:void 0}}function O(){return{quorum:new Uint8Array,threshold:new Uint8Array,vetoThreshold:new Uint8Array}}t.protobufPackage="cosmos.gov.v1beta1",function(e){e[e.VOTE_OPTION_UNSPECIFIED=0]="VOTE_OPTION_UNSPECIFIED",e[e.VOTE_OPTION_YES=1]="VOTE_OPTION_YES",e[e.VOTE_OPTION_ABSTAIN=2]="VOTE_OPTION_ABSTAIN",e[e.VOTE_OPTION_NO=3]="VOTE_OPTION_NO",e[e.VOTE_OPTION_NO_WITH_VETO=4]="VOTE_OPTION_NO_WITH_VETO",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(n=t.VoteOption||(t.VoteOption={})),t.voteOptionFromJSON=p,t.voteOptionToJSON=f,function(e){e[e.PROPOSAL_STATUS_UNSPECIFIED=0]="PROPOSAL_STATUS_UNSPECIFIED",e[e.PROPOSAL_STATUS_DEPOSIT_PERIOD=1]="PROPOSAL_STATUS_DEPOSIT_PERIOD",e[e.PROPOSAL_STATUS_VOTING_PERIOD=2]="PROPOSAL_STATUS_VOTING_PERIOD",e[e.PROPOSAL_STATUS_PASSED=3]="PROPOSAL_STATUS_PASSED",e[e.PROPOSAL_STATUS_REJECTED=4]="PROPOSAL_STATUS_REJECTED",e[e.PROPOSAL_STATUS_FAILED=5]="PROPOSAL_STATUS_FAILED",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(i=t.ProposalStatus||(t.ProposalStatus={})),t.proposalStatusFromJSON=h,t.proposalStatusToJSON=g,t.WeightedVoteOption={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return 0!==e.option&&t.uint32(8).int32(e.option),""!==e.weight&&t.uint32(18).string(e.weight),t},decode(e,t){let r=e instanceof s.default.Reader?e:new s.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=m();for(;r.pos>>3){case 1:i.option=r.int32();break;case 2:i.weight=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({option:C(e.option)?p(e.option):0,weight:C(e.weight)?String(e.weight):""}),toJSON(e){let t={};return void 0!==e.option&&(t.option=f(e.option)),void 0!==e.weight&&(t.weight=e.weight),t},fromPartial(e){var t,r;let n=m();return n.option=null!==(t=e.option)&&void 0!==t?t:0,n.weight=null!==(r=e.weight)&&void 0!==r?r:"",n}},t.TextProposal={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return""!==e.title&&t.uint32(10).string(e.title),""!==e.description&&t.uint32(18).string(e.description),t},decode(e,t){let r=e instanceof s.default.Reader?e:new s.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=y();for(;r.pos>>3){case 1:i.title=r.string();break;case 2:i.description=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({title:C(e.title)?String(e.title):"",description:C(e.description)?String(e.description):""}),toJSON(e){let t={};return void 0!==e.title&&(t.title=e.title),void 0!==e.description&&(t.description=e.description),t},fromPartial(e){var t,r;let n=y();return n.title=null!==(t=e.title)&&void 0!==t?t:"",n.description=null!==(r=e.description)&&void 0!==r?r:"",n}},t.Deposit={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();for(let r of("0"!==e.proposalId&&t.uint32(8).uint64(e.proposalId),""!==e.depositor&&t.uint32(18).string(e.depositor),e.amount))u.Coin.encode(r,t.uint32(26).fork()).ldelim();return t},decode(e,t){let r=e instanceof s.default.Reader?e:new s.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=v();for(;r.pos>>3){case 1:i.proposalId=B(r.uint64());break;case 2:i.depositor=r.string();break;case 3:i.amount.push(u.Coin.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return i},fromJSON:e=>({proposalId:C(e.proposalId)?String(e.proposalId):"0",depositor:C(e.depositor)?String(e.depositor):"",amount:Array.isArray(null==e?void 0:e.amount)?e.amount.map(e=>u.Coin.fromJSON(e)):[]}),toJSON(e){let t={};return void 0!==e.proposalId&&(t.proposalId=e.proposalId),void 0!==e.depositor&&(t.depositor=e.depositor),e.amount?t.amount=e.amount.map(e=>e?u.Coin.toJSON(e):void 0):t.amount=[],t},fromPartial(e){var t,r,n;let i=v();return i.proposalId=null!==(t=e.proposalId)&&void 0!==t?t:"0",i.depositor=null!==(r=e.depositor)&&void 0!==r?r:"",i.amount=(null===(n=e.amount)||void 0===n?void 0:n.map(e=>u.Coin.fromPartial(e)))||[],i}},t.Proposal={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();for(let n of("0"!==e.proposalId&&r.uint32(8).uint64(e.proposalId),void 0!==e.content&&d.Any.encode(e.content,r.uint32(18).fork()).ldelim(),0!==e.status&&r.uint32(24).int32(e.status),void 0!==e.finalTallyResult&&t.TallyResult.encode(e.finalTallyResult,r.uint32(34).fork()).ldelim(),void 0!==e.submitTime&&l.Timestamp.encode(T(e.submitTime),r.uint32(42).fork()).ldelim(),void 0!==e.depositEndTime&&l.Timestamp.encode(T(e.depositEndTime),r.uint32(50).fork()).ldelim(),e.totalDeposit))u.Coin.encode(n,r.uint32(58).fork()).ldelim();return void 0!==e.votingStartTime&&l.Timestamp.encode(T(e.votingStartTime),r.uint32(66).fork()).ldelim(),void 0!==e.votingEndTime&&l.Timestamp.encode(T(e.votingEndTime),r.uint32(74).fork()).ldelim(),r},decode(e,r){let n=e instanceof s.default.Reader?e:new s.default.Reader(e),i=void 0===r?n.len:n.pos+r,o=b();for(;n.pos>>3){case 1:o.proposalId=B(n.uint64());break;case 2:o.content=d.Any.decode(n,n.uint32());break;case 3:o.status=n.int32();break;case 4:o.finalTallyResult=t.TallyResult.decode(n,n.uint32());break;case 5:o.submitTime=N(l.Timestamp.decode(n,n.uint32()));break;case 6:o.depositEndTime=N(l.Timestamp.decode(n,n.uint32()));break;case 7:o.totalDeposit.push(u.Coin.decode(n,n.uint32()));break;case 8:o.votingStartTime=N(l.Timestamp.decode(n,n.uint32()));break;case 9:o.votingEndTime=N(l.Timestamp.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return o},fromJSON:e=>({proposalId:C(e.proposalId)?String(e.proposalId):"0",content:C(e.content)?d.Any.fromJSON(e.content):void 0,status:C(e.status)?h(e.status):0,finalTallyResult:C(e.finalTallyResult)?t.TallyResult.fromJSON(e.finalTallyResult):void 0,submitTime:C(e.submitTime)?x(e.submitTime):void 0,depositEndTime:C(e.depositEndTime)?x(e.depositEndTime):void 0,totalDeposit:Array.isArray(null==e?void 0:e.totalDeposit)?e.totalDeposit.map(e=>u.Coin.fromJSON(e)):[],votingStartTime:C(e.votingStartTime)?x(e.votingStartTime):void 0,votingEndTime:C(e.votingEndTime)?x(e.votingEndTime):void 0}),toJSON(e){let r={};return void 0!==e.proposalId&&(r.proposalId=e.proposalId),void 0!==e.content&&(r.content=e.content?d.Any.toJSON(e.content):void 0),void 0!==e.status&&(r.status=g(e.status)),void 0!==e.finalTallyResult&&(r.finalTallyResult=e.finalTallyResult?t.TallyResult.toJSON(e.finalTallyResult):void 0),void 0!==e.submitTime&&(r.submitTime=e.submitTime.toISOString()),void 0!==e.depositEndTime&&(r.depositEndTime=e.depositEndTime.toISOString()),e.totalDeposit?r.totalDeposit=e.totalDeposit.map(e=>e?u.Coin.toJSON(e):void 0):r.totalDeposit=[],void 0!==e.votingStartTime&&(r.votingStartTime=e.votingStartTime.toISOString()),void 0!==e.votingEndTime&&(r.votingEndTime=e.votingEndTime.toISOString()),r},fromPartial(e){var r,n,i,o,a,s,l;let c=b();return c.proposalId=null!==(r=e.proposalId)&&void 0!==r?r:"0",c.content=void 0!==e.content&&null!==e.content?d.Any.fromPartial(e.content):void 0,c.status=null!==(n=e.status)&&void 0!==n?n:0,c.finalTallyResult=void 0!==e.finalTallyResult&&null!==e.finalTallyResult?t.TallyResult.fromPartial(e.finalTallyResult):void 0,c.submitTime=null!==(i=e.submitTime)&&void 0!==i?i:void 0,c.depositEndTime=null!==(o=e.depositEndTime)&&void 0!==o?o:void 0,c.totalDeposit=(null===(a=e.totalDeposit)||void 0===a?void 0:a.map(e=>u.Coin.fromPartial(e)))||[],c.votingStartTime=null!==(s=e.votingStartTime)&&void 0!==s?s:void 0,c.votingEndTime=null!==(l=e.votingEndTime)&&void 0!==l?l:void 0,c}},t.TallyResult={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return""!==e.yes&&t.uint32(10).string(e.yes),""!==e.abstain&&t.uint32(18).string(e.abstain),""!==e.no&&t.uint32(26).string(e.no),""!==e.noWithVeto&&t.uint32(34).string(e.noWithVeto),t},decode(e,t){let r=e instanceof s.default.Reader?e:new s.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=S();for(;r.pos>>3){case 1:i.yes=r.string();break;case 2:i.abstain=r.string();break;case 3:i.no=r.string();break;case 4:i.noWithVeto=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({yes:C(e.yes)?String(e.yes):"",abstain:C(e.abstain)?String(e.abstain):"",no:C(e.no)?String(e.no):"",noWithVeto:C(e.noWithVeto)?String(e.noWithVeto):""}),toJSON(e){let t={};return void 0!==e.yes&&(t.yes=e.yes),void 0!==e.abstain&&(t.abstain=e.abstain),void 0!==e.no&&(t.no=e.no),void 0!==e.noWithVeto&&(t.noWithVeto=e.noWithVeto),t},fromPartial(e){var t,r,n,i;let o=S();return o.yes=null!==(t=e.yes)&&void 0!==t?t:"",o.abstain=null!==(r=e.abstain)&&void 0!==r?r:"",o.no=null!==(n=e.no)&&void 0!==n?n:"",o.noWithVeto=null!==(i=e.noWithVeto)&&void 0!==i?i:"",o}},t.Vote={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();for(let n of("0"!==e.proposalId&&r.uint32(8).uint64(e.proposalId),""!==e.voter&&r.uint32(18).string(e.voter),0!==e.option&&r.uint32(24).int32(e.option),e.options))t.WeightedVoteOption.encode(n,r.uint32(34).fork()).ldelim();return r},decode(e,r){let n=e instanceof s.default.Reader?e:new s.default.Reader(e),i=void 0===r?n.len:n.pos+r,o=w();for(;n.pos>>3){case 1:o.proposalId=B(n.uint64());break;case 2:o.voter=n.string();break;case 3:o.option=n.int32();break;case 4:o.options.push(t.WeightedVoteOption.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return o},fromJSON:e=>({proposalId:C(e.proposalId)?String(e.proposalId):"0",voter:C(e.voter)?String(e.voter):"",option:C(e.option)?p(e.option):0,options:Array.isArray(null==e?void 0:e.options)?e.options.map(e=>t.WeightedVoteOption.fromJSON(e)):[]}),toJSON(e){let r={};return void 0!==e.proposalId&&(r.proposalId=e.proposalId),void 0!==e.voter&&(r.voter=e.voter),void 0!==e.option&&(r.option=f(e.option)),e.options?r.options=e.options.map(e=>e?t.WeightedVoteOption.toJSON(e):void 0):r.options=[],r},fromPartial(e){var r,n,i,o;let a=w();return a.proposalId=null!==(r=e.proposalId)&&void 0!==r?r:"0",a.voter=null!==(n=e.voter)&&void 0!==n?n:"",a.option=null!==(i=e.option)&&void 0!==i?i:0,a.options=(null===(o=e.options)||void 0===o?void 0:o.map(e=>t.WeightedVoteOption.fromPartial(e)))||[],a}},t.DepositParams={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();for(let r of e.minDeposit)u.Coin.encode(r,t.uint32(10).fork()).ldelim();return void 0!==e.maxDepositPeriod&&c.Duration.encode(e.maxDepositPeriod,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof s.default.Reader?e:new s.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=_();for(;r.pos>>3){case 1:i.minDeposit.push(u.Coin.decode(r,r.uint32()));break;case 2:i.maxDepositPeriod=c.Duration.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON:e=>({minDeposit:Array.isArray(null==e?void 0:e.minDeposit)?e.minDeposit.map(e=>u.Coin.fromJSON(e)):[],maxDepositPeriod:C(e.maxDepositPeriod)?c.Duration.fromJSON(e.maxDepositPeriod):void 0}),toJSON(e){let t={};return e.minDeposit?t.minDeposit=e.minDeposit.map(e=>e?u.Coin.toJSON(e):void 0):t.minDeposit=[],void 0!==e.maxDepositPeriod&&(t.maxDepositPeriod=e.maxDepositPeriod?c.Duration.toJSON(e.maxDepositPeriod):void 0),t},fromPartial(e){var t;let r=_();return r.minDeposit=(null===(t=e.minDeposit)||void 0===t?void 0:t.map(e=>u.Coin.fromPartial(e)))||[],r.maxDepositPeriod=void 0!==e.maxDepositPeriod&&null!==e.maxDepositPeriod?c.Duration.fromPartial(e.maxDepositPeriod):void 0,r}},t.VotingParams={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return void 0!==e.votingPeriod&&c.Duration.encode(e.votingPeriod,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof s.default.Reader?e:new s.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=k();for(;r.pos>>3==1?i.votingPeriod=c.Duration.decode(r,r.uint32()):r.skipType(7&e)}return i},fromJSON:e=>({votingPeriod:C(e.votingPeriod)?c.Duration.fromJSON(e.votingPeriod):void 0}),toJSON(e){let t={};return void 0!==e.votingPeriod&&(t.votingPeriod=e.votingPeriod?c.Duration.toJSON(e.votingPeriod):void 0),t},fromPartial(e){let t=k();return t.votingPeriod=void 0!==e.votingPeriod&&null!==e.votingPeriod?c.Duration.fromPartial(e.votingPeriod):void 0,t}},t.TallyParams={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return 0!==e.quorum.length&&t.uint32(10).bytes(e.quorum),0!==e.threshold.length&&t.uint32(18).bytes(e.threshold),0!==e.vetoThreshold.length&&t.uint32(26).bytes(e.vetoThreshold),t},decode(e,t){let r=e instanceof s.default.Reader?e:new s.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=O();for(;r.pos>>3){case 1:i.quorum=r.bytes();break;case 2:i.threshold=r.bytes();break;case 3:i.vetoThreshold=r.bytes();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({quorum:C(e.quorum)?I(e.quorum):new Uint8Array,threshold:C(e.threshold)?I(e.threshold):new Uint8Array,vetoThreshold:C(e.vetoThreshold)?I(e.vetoThreshold):new Uint8Array}),toJSON(e){let t={};return void 0!==e.quorum&&(t.quorum=E(void 0!==e.quorum?e.quorum:new Uint8Array)),void 0!==e.threshold&&(t.threshold=E(void 0!==e.threshold?e.threshold:new Uint8Array)),void 0!==e.vetoThreshold&&(t.vetoThreshold=E(void 0!==e.vetoThreshold?e.vetoThreshold:new Uint8Array)),t},fromPartial(e){var t,r,n;let i=O();return i.quorum=null!==(t=e.quorum)&&void 0!==t?t:new Uint8Array,i.threshold=null!==(r=e.threshold)&&void 0!==r?r:new Uint8Array,i.vetoThreshold=null!==(n=e.vetoThreshold)&&void 0!==n?n:new Uint8Array,i}};var P=void 0!==P?P:"undefined"!=typeof self?self:window;let A=P.atob||(e=>P.Buffer.from(e,"base64").toString("binary"));function I(e){let t=A(e),r=new Uint8Array(t.length);for(let e=0;eP.Buffer.from(e,"binary").toString("base64"));function E(e){let t=[];for(let r of e)t.push(String.fromCharCode(r));return R(t.join(""))}function T(e){return{seconds:Math.trunc(e.getTime()/1e3).toString(),nanos:e.getTime()%1e3*1e6}}function N(e){let t=1e3*Number(e.seconds);return new Date(t+=e.nanos/1e6)}function x(e){return e instanceof Date?e:"string"==typeof e?new Date(e):N(l.Timestamp.fromJSON(e))}function B(e){return e.toString()}function C(e){return null!=e}s.default.util.Long!==a.default&&(s.default.util.Long=a.default,s.default.configure())},43846:function(e,t,r){"use strict";var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MsgDepositResponse=t.MsgDeposit=t.MsgVoteWeightedResponse=t.MsgVoteWeighted=t.MsgVoteResponse=t.MsgVote=t.MsgSubmitProposalResponse=t.MsgSubmitProposal=t.protobufPackage=void 0;let i=n(r(40059)),o=n(r(81667)),a=r(20666),s=r(28446),l=r(80054);function u(){return{content:void 0,initialDeposit:[],proposer:""}}function d(){return{proposalId:"0"}}function c(){return{proposalId:"0",voter:"",option:0}}function p(){return{}}function f(){return{proposalId:"0",voter:"",options:[]}}function h(){return{}}function g(){return{proposalId:"0",depositor:"",amount:[]}}function m(){return{}}function y(e){return e.toString()}function v(e){return null!=e}t.protobufPackage="cosmos.gov.v1beta1",t.MsgSubmitProposal={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();for(let r of(void 0!==e.content&&s.Any.encode(e.content,t.uint32(10).fork()).ldelim(),e.initialDeposit))l.Coin.encode(r,t.uint32(18).fork()).ldelim();return""!==e.proposer&&t.uint32(26).string(e.proposer),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=u();for(;r.pos>>3){case 1:i.content=s.Any.decode(r,r.uint32());break;case 2:i.initialDeposit.push(l.Coin.decode(r,r.uint32()));break;case 3:i.proposer=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({content:v(e.content)?s.Any.fromJSON(e.content):void 0,initialDeposit:Array.isArray(null==e?void 0:e.initialDeposit)?e.initialDeposit.map(e=>l.Coin.fromJSON(e)):[],proposer:v(e.proposer)?String(e.proposer):""}),toJSON(e){let t={};return void 0!==e.content&&(t.content=e.content?s.Any.toJSON(e.content):void 0),e.initialDeposit?t.initialDeposit=e.initialDeposit.map(e=>e?l.Coin.toJSON(e):void 0):t.initialDeposit=[],void 0!==e.proposer&&(t.proposer=e.proposer),t},fromPartial(e){var t,r;let n=u();return n.content=void 0!==e.content&&null!==e.content?s.Any.fromPartial(e.content):void 0,n.initialDeposit=(null===(t=e.initialDeposit)||void 0===t?void 0:t.map(e=>l.Coin.fromPartial(e)))||[],n.proposer=null!==(r=e.proposer)&&void 0!==r?r:"",n}},t.MsgSubmitProposalResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return"0"!==e.proposalId&&t.uint32(8).uint64(e.proposalId),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=d();for(;r.pos>>3==1?i.proposalId=y(r.uint64()):r.skipType(7&e)}return i},fromJSON:e=>({proposalId:v(e.proposalId)?String(e.proposalId):"0"}),toJSON(e){let t={};return void 0!==e.proposalId&&(t.proposalId=e.proposalId),t},fromPartial(e){var t;let r=d();return r.proposalId=null!==(t=e.proposalId)&&void 0!==t?t:"0",r}},t.MsgVote={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return"0"!==e.proposalId&&t.uint32(8).uint64(e.proposalId),""!==e.voter&&t.uint32(18).string(e.voter),0!==e.option&&t.uint32(24).int32(e.option),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=c();for(;r.pos>>3){case 1:i.proposalId=y(r.uint64());break;case 2:i.voter=r.string();break;case 3:i.option=r.int32();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({proposalId:v(e.proposalId)?String(e.proposalId):"0",voter:v(e.voter)?String(e.voter):"",option:v(e.option)?(0,a.voteOptionFromJSON)(e.option):0}),toJSON(e){let t={};return void 0!==e.proposalId&&(t.proposalId=e.proposalId),void 0!==e.voter&&(t.voter=e.voter),void 0!==e.option&&(t.option=(0,a.voteOptionToJSON)(e.option)),t},fromPartial(e){var t,r,n;let i=c();return i.proposalId=null!==(t=e.proposalId)&&void 0!==t?t:"0",i.voter=null!==(r=e.voter)&&void 0!==r?r:"",i.option=null!==(n=e.option)&&void 0!==n?n:0,i}},t.MsgVoteResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=p();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>p()},t.MsgVoteWeighted={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();for(let r of("0"!==e.proposalId&&t.uint32(8).uint64(e.proposalId),""!==e.voter&&t.uint32(18).string(e.voter),e.options))a.WeightedVoteOption.encode(r,t.uint32(26).fork()).ldelim();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=f();for(;r.pos>>3){case 1:i.proposalId=y(r.uint64());break;case 2:i.voter=r.string();break;case 3:i.options.push(a.WeightedVoteOption.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return i},fromJSON:e=>({proposalId:v(e.proposalId)?String(e.proposalId):"0",voter:v(e.voter)?String(e.voter):"",options:Array.isArray(null==e?void 0:e.options)?e.options.map(e=>a.WeightedVoteOption.fromJSON(e)):[]}),toJSON(e){let t={};return void 0!==e.proposalId&&(t.proposalId=e.proposalId),void 0!==e.voter&&(t.voter=e.voter),e.options?t.options=e.options.map(e=>e?a.WeightedVoteOption.toJSON(e):void 0):t.options=[],t},fromPartial(e){var t,r,n;let i=f();return i.proposalId=null!==(t=e.proposalId)&&void 0!==t?t:"0",i.voter=null!==(r=e.voter)&&void 0!==r?r:"",i.options=(null===(n=e.options)||void 0===n?void 0:n.map(e=>a.WeightedVoteOption.fromPartial(e)))||[],i}},t.MsgVoteWeightedResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=h();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>h()},t.MsgDeposit={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();for(let r of("0"!==e.proposalId&&t.uint32(8).uint64(e.proposalId),""!==e.depositor&&t.uint32(18).string(e.depositor),e.amount))l.Coin.encode(r,t.uint32(26).fork()).ldelim();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=g();for(;r.pos>>3){case 1:i.proposalId=y(r.uint64());break;case 2:i.depositor=r.string();break;case 3:i.amount.push(l.Coin.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return i},fromJSON:e=>({proposalId:v(e.proposalId)?String(e.proposalId):"0",depositor:v(e.depositor)?String(e.depositor):"",amount:Array.isArray(null==e?void 0:e.amount)?e.amount.map(e=>l.Coin.fromJSON(e)):[]}),toJSON(e){let t={};return void 0!==e.proposalId&&(t.proposalId=e.proposalId),void 0!==e.depositor&&(t.depositor=e.depositor),e.amount?t.amount=e.amount.map(e=>e?l.Coin.toJSON(e):void 0):t.amount=[],t},fromPartial(e){var t,r,n;let i=g();return i.proposalId=null!==(t=e.proposalId)&&void 0!==t?t:"0",i.depositor=null!==(r=e.depositor)&&void 0!==r?r:"",i.amount=(null===(n=e.amount)||void 0===n?void 0:n.map(e=>l.Coin.fromPartial(e)))||[],i}},t.MsgDepositResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=m();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>m()},o.default.util.Long!==i.default&&(o.default.util.Long=i.default,o.default.configure())},86398:function(e,t,r){"use strict";var n,i=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.StakeAuthorization_Validators=t.StakeAuthorization=t.authorizationTypeToJSON=t.authorizationTypeFromJSON=t.AuthorizationType=t.protobufPackage=void 0;let o=i(r(40059)),a=i(r(81667)),s=r(80054);function l(e){switch(e){case 0:case"AUTHORIZATION_TYPE_UNSPECIFIED":return n.AUTHORIZATION_TYPE_UNSPECIFIED;case 1:case"AUTHORIZATION_TYPE_DELEGATE":return n.AUTHORIZATION_TYPE_DELEGATE;case 2:case"AUTHORIZATION_TYPE_UNDELEGATE":return n.AUTHORIZATION_TYPE_UNDELEGATE;case 3:case"AUTHORIZATION_TYPE_REDELEGATE":return n.AUTHORIZATION_TYPE_REDELEGATE;default:return n.UNRECOGNIZED}}function u(e){switch(e){case n.AUTHORIZATION_TYPE_UNSPECIFIED:return"AUTHORIZATION_TYPE_UNSPECIFIED";case n.AUTHORIZATION_TYPE_DELEGATE:return"AUTHORIZATION_TYPE_DELEGATE";case n.AUTHORIZATION_TYPE_UNDELEGATE:return"AUTHORIZATION_TYPE_UNDELEGATE";case n.AUTHORIZATION_TYPE_REDELEGATE:return"AUTHORIZATION_TYPE_REDELEGATE";default:return"UNKNOWN"}}function d(){return{maxTokens:void 0,allowList:void 0,denyList:void 0,authorizationType:0}}function c(){return{address:[]}}function p(e){return null!=e}t.protobufPackage="cosmos.staking.v1beta1",function(e){e[e.AUTHORIZATION_TYPE_UNSPECIFIED=0]="AUTHORIZATION_TYPE_UNSPECIFIED",e[e.AUTHORIZATION_TYPE_DELEGATE=1]="AUTHORIZATION_TYPE_DELEGATE",e[e.AUTHORIZATION_TYPE_UNDELEGATE=2]="AUTHORIZATION_TYPE_UNDELEGATE",e[e.AUTHORIZATION_TYPE_REDELEGATE=3]="AUTHORIZATION_TYPE_REDELEGATE",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(n=t.AuthorizationType||(t.AuthorizationType={})),t.authorizationTypeFromJSON=l,t.authorizationTypeToJSON=u,t.StakeAuthorization={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();return void 0!==e.maxTokens&&s.Coin.encode(e.maxTokens,r.uint32(10).fork()).ldelim(),void 0!==e.allowList&&t.StakeAuthorization_Validators.encode(e.allowList,r.uint32(18).fork()).ldelim(),void 0!==e.denyList&&t.StakeAuthorization_Validators.encode(e.denyList,r.uint32(26).fork()).ldelim(),0!==e.authorizationType&&r.uint32(32).int32(e.authorizationType),r},decode(e,r){let n=e instanceof a.default.Reader?e:new a.default.Reader(e),i=void 0===r?n.len:n.pos+r,o=d();for(;n.pos>>3){case 1:o.maxTokens=s.Coin.decode(n,n.uint32());break;case 2:o.allowList=t.StakeAuthorization_Validators.decode(n,n.uint32());break;case 3:o.denyList=t.StakeAuthorization_Validators.decode(n,n.uint32());break;case 4:o.authorizationType=n.int32();break;default:n.skipType(7&e)}}return o},fromJSON:e=>({maxTokens:p(e.maxTokens)?s.Coin.fromJSON(e.maxTokens):void 0,allowList:p(e.allowList)?t.StakeAuthorization_Validators.fromJSON(e.allowList):void 0,denyList:p(e.denyList)?t.StakeAuthorization_Validators.fromJSON(e.denyList):void 0,authorizationType:p(e.authorizationType)?l(e.authorizationType):0}),toJSON(e){let r={};return void 0!==e.maxTokens&&(r.maxTokens=e.maxTokens?s.Coin.toJSON(e.maxTokens):void 0),void 0!==e.allowList&&(r.allowList=e.allowList?t.StakeAuthorization_Validators.toJSON(e.allowList):void 0),void 0!==e.denyList&&(r.denyList=e.denyList?t.StakeAuthorization_Validators.toJSON(e.denyList):void 0),void 0!==e.authorizationType&&(r.authorizationType=u(e.authorizationType)),r},fromPartial(e){var r;let n=d();return n.maxTokens=void 0!==e.maxTokens&&null!==e.maxTokens?s.Coin.fromPartial(e.maxTokens):void 0,n.allowList=void 0!==e.allowList&&null!==e.allowList?t.StakeAuthorization_Validators.fromPartial(e.allowList):void 0,n.denyList=void 0!==e.denyList&&null!==e.denyList?t.StakeAuthorization_Validators.fromPartial(e.denyList):void 0,n.authorizationType=null!==(r=e.authorizationType)&&void 0!==r?r:0,n}},t.StakeAuthorization_Validators={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();for(let r of e.address)t.uint32(10).string(r);return t},decode(e,t){let r=e instanceof a.default.Reader?e:new a.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=c();for(;r.pos>>3==1?i.address.push(r.string()):r.skipType(7&e)}return i},fromJSON:e=>({address:Array.isArray(null==e?void 0:e.address)?e.address.map(e=>String(e)):[]}),toJSON(e){let t={};return e.address?t.address=e.address.map(e=>e):t.address=[],t},fromPartial(e){var t;let r=c();return r.address=(null===(t=e.address)||void 0===t?void 0:t.map(e=>e))||[],r}},a.default.util.Long!==o.default&&(a.default.util.Long=o.default,a.default.configure())},60159:function(e,t,r){"use strict";var n,i=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Pool=t.RedelegationResponse=t.RedelegationEntryResponse=t.DelegationResponse=t.Params=t.Redelegation=t.RedelegationEntry=t.UnbondingDelegationEntry=t.UnbondingDelegation=t.Delegation=t.DVVTriplets=t.DVVTriplet=t.DVPairs=t.DVPair=t.ValAddresses=t.Validator=t.Description=t.Commission=t.CommissionRates=t.HistoricalInfo=t.bondStatusToJSON=t.bondStatusFromJSON=t.BondStatus=t.protobufPackage=void 0;let o=i(r(40059)),a=i(r(81667)),s=r(90338),l=r(35444),u=r(28446),d=r(81555),c=r(80054);function p(e){switch(e){case 0:case"BOND_STATUS_UNSPECIFIED":return n.BOND_STATUS_UNSPECIFIED;case 1:case"BOND_STATUS_UNBONDED":return n.BOND_STATUS_UNBONDED;case 2:case"BOND_STATUS_UNBONDING":return n.BOND_STATUS_UNBONDING;case 3:case"BOND_STATUS_BONDED":return n.BOND_STATUS_BONDED;default:return n.UNRECOGNIZED}}function f(e){switch(e){case n.BOND_STATUS_UNSPECIFIED:return"BOND_STATUS_UNSPECIFIED";case n.BOND_STATUS_UNBONDED:return"BOND_STATUS_UNBONDED";case n.BOND_STATUS_UNBONDING:return"BOND_STATUS_UNBONDING";case n.BOND_STATUS_BONDED:return"BOND_STATUS_BONDED";default:return"UNKNOWN"}}function h(){return{header:void 0,valset:[]}}function g(){return{rate:"",maxRate:"",maxChangeRate:""}}function m(){return{commissionRates:void 0,updateTime:void 0}}function y(){return{moniker:"",identity:"",website:"",securityContact:"",details:""}}function v(){return{operatorAddress:"",consensusPubkey:void 0,jailed:!1,status:0,tokens:"",delegatorShares:"",description:void 0,unbondingHeight:"0",unbondingTime:void 0,commission:void 0,minSelfDelegation:""}}function b(){return{addresses:[]}}function S(){return{delegatorAddress:"",validatorAddress:""}}function w(){return{pairs:[]}}function _(){return{delegatorAddress:"",validatorSrcAddress:"",validatorDstAddress:""}}function k(){return{triplets:[]}}function O(){return{delegatorAddress:"",validatorAddress:"",shares:""}}function P(){return{delegatorAddress:"",validatorAddress:"",entries:[]}}function A(){return{creationHeight:"0",completionTime:void 0,initialBalance:"",balance:""}}function I(){return{creationHeight:"0",completionTime:void 0,initialBalance:"",sharesDst:""}}function R(){return{delegatorAddress:"",validatorSrcAddress:"",validatorDstAddress:"",entries:[]}}function E(){return{unbondingTime:void 0,maxValidators:0,maxEntries:0,historicalEntries:0,bondDenom:""}}function T(){return{delegation:void 0,balance:void 0}}function N(){return{redelegationEntry:void 0,balance:""}}function x(){return{redelegation:void 0,entries:[]}}function B(){return{notBondedTokens:"",bondedTokens:""}}function C(e){return{seconds:Math.trunc(e.getTime()/1e3).toString(),nanos:e.getTime()%1e3*1e6}}function M(e){let t=1e3*Number(e.seconds);return new Date(t+=e.nanos/1e6)}function D(e){return e instanceof Date?e:"string"==typeof e?new Date(e):M(s.Timestamp.fromJSON(e))}function U(e){return e.toString()}function J(e){return null!=e}t.protobufPackage="cosmos.staking.v1beta1",function(e){e[e.BOND_STATUS_UNSPECIFIED=0]="BOND_STATUS_UNSPECIFIED",e[e.BOND_STATUS_UNBONDED=1]="BOND_STATUS_UNBONDED",e[e.BOND_STATUS_UNBONDING=2]="BOND_STATUS_UNBONDING",e[e.BOND_STATUS_BONDED=3]="BOND_STATUS_BONDED",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(n=t.BondStatus||(t.BondStatus={})),t.bondStatusFromJSON=p,t.bondStatusToJSON=f,t.HistoricalInfo={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();for(let n of(void 0!==e.header&&l.Header.encode(e.header,r.uint32(10).fork()).ldelim(),e.valset))t.Validator.encode(n,r.uint32(18).fork()).ldelim();return r},decode(e,r){let n=e instanceof a.default.Reader?e:new a.default.Reader(e),i=void 0===r?n.len:n.pos+r,o=h();for(;n.pos>>3){case 1:o.header=l.Header.decode(n,n.uint32());break;case 2:o.valset.push(t.Validator.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return o},fromJSON:e=>({header:J(e.header)?l.Header.fromJSON(e.header):void 0,valset:Array.isArray(null==e?void 0:e.valset)?e.valset.map(e=>t.Validator.fromJSON(e)):[]}),toJSON(e){let r={};return void 0!==e.header&&(r.header=e.header?l.Header.toJSON(e.header):void 0),e.valset?r.valset=e.valset.map(e=>e?t.Validator.toJSON(e):void 0):r.valset=[],r},fromPartial(e){var r;let n=h();return n.header=void 0!==e.header&&null!==e.header?l.Header.fromPartial(e.header):void 0,n.valset=(null===(r=e.valset)||void 0===r?void 0:r.map(e=>t.Validator.fromPartial(e)))||[],n}},t.CommissionRates={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();return""!==e.rate&&t.uint32(10).string(e.rate),""!==e.maxRate&&t.uint32(18).string(e.maxRate),""!==e.maxChangeRate&&t.uint32(26).string(e.maxChangeRate),t},decode(e,t){let r=e instanceof a.default.Reader?e:new a.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=g();for(;r.pos>>3){case 1:i.rate=r.string();break;case 2:i.maxRate=r.string();break;case 3:i.maxChangeRate=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({rate:J(e.rate)?String(e.rate):"",maxRate:J(e.maxRate)?String(e.maxRate):"",maxChangeRate:J(e.maxChangeRate)?String(e.maxChangeRate):""}),toJSON(e){let t={};return void 0!==e.rate&&(t.rate=e.rate),void 0!==e.maxRate&&(t.maxRate=e.maxRate),void 0!==e.maxChangeRate&&(t.maxChangeRate=e.maxChangeRate),t},fromPartial(e){var t,r,n;let i=g();return i.rate=null!==(t=e.rate)&&void 0!==t?t:"",i.maxRate=null!==(r=e.maxRate)&&void 0!==r?r:"",i.maxChangeRate=null!==(n=e.maxChangeRate)&&void 0!==n?n:"",i}},t.Commission={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();return void 0!==e.commissionRates&&t.CommissionRates.encode(e.commissionRates,r.uint32(10).fork()).ldelim(),void 0!==e.updateTime&&s.Timestamp.encode(C(e.updateTime),r.uint32(18).fork()).ldelim(),r},decode(e,r){let n=e instanceof a.default.Reader?e:new a.default.Reader(e),i=void 0===r?n.len:n.pos+r,o=m();for(;n.pos>>3){case 1:o.commissionRates=t.CommissionRates.decode(n,n.uint32());break;case 2:o.updateTime=M(s.Timestamp.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return o},fromJSON:e=>({commissionRates:J(e.commissionRates)?t.CommissionRates.fromJSON(e.commissionRates):void 0,updateTime:J(e.updateTime)?D(e.updateTime):void 0}),toJSON(e){let r={};return void 0!==e.commissionRates&&(r.commissionRates=e.commissionRates?t.CommissionRates.toJSON(e.commissionRates):void 0),void 0!==e.updateTime&&(r.updateTime=e.updateTime.toISOString()),r},fromPartial(e){var r;let n=m();return n.commissionRates=void 0!==e.commissionRates&&null!==e.commissionRates?t.CommissionRates.fromPartial(e.commissionRates):void 0,n.updateTime=null!==(r=e.updateTime)&&void 0!==r?r:void 0,n}},t.Description={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();return""!==e.moniker&&t.uint32(10).string(e.moniker),""!==e.identity&&t.uint32(18).string(e.identity),""!==e.website&&t.uint32(26).string(e.website),""!==e.securityContact&&t.uint32(34).string(e.securityContact),""!==e.details&&t.uint32(42).string(e.details),t},decode(e,t){let r=e instanceof a.default.Reader?e:new a.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=y();for(;r.pos>>3){case 1:i.moniker=r.string();break;case 2:i.identity=r.string();break;case 3:i.website=r.string();break;case 4:i.securityContact=r.string();break;case 5:i.details=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({moniker:J(e.moniker)?String(e.moniker):"",identity:J(e.identity)?String(e.identity):"",website:J(e.website)?String(e.website):"",securityContact:J(e.securityContact)?String(e.securityContact):"",details:J(e.details)?String(e.details):""}),toJSON(e){let t={};return void 0!==e.moniker&&(t.moniker=e.moniker),void 0!==e.identity&&(t.identity=e.identity),void 0!==e.website&&(t.website=e.website),void 0!==e.securityContact&&(t.securityContact=e.securityContact),void 0!==e.details&&(t.details=e.details),t},fromPartial(e){var t,r,n,i,o;let a=y();return a.moniker=null!==(t=e.moniker)&&void 0!==t?t:"",a.identity=null!==(r=e.identity)&&void 0!==r?r:"",a.website=null!==(n=e.website)&&void 0!==n?n:"",a.securityContact=null!==(i=e.securityContact)&&void 0!==i?i:"",a.details=null!==(o=e.details)&&void 0!==o?o:"",a}},t.Validator={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();return""!==e.operatorAddress&&r.uint32(10).string(e.operatorAddress),void 0!==e.consensusPubkey&&u.Any.encode(e.consensusPubkey,r.uint32(18).fork()).ldelim(),!0===e.jailed&&r.uint32(24).bool(e.jailed),0!==e.status&&r.uint32(32).int32(e.status),""!==e.tokens&&r.uint32(42).string(e.tokens),""!==e.delegatorShares&&r.uint32(50).string(e.delegatorShares),void 0!==e.description&&t.Description.encode(e.description,r.uint32(58).fork()).ldelim(),"0"!==e.unbondingHeight&&r.uint32(64).int64(e.unbondingHeight),void 0!==e.unbondingTime&&s.Timestamp.encode(C(e.unbondingTime),r.uint32(74).fork()).ldelim(),void 0!==e.commission&&t.Commission.encode(e.commission,r.uint32(82).fork()).ldelim(),""!==e.minSelfDelegation&&r.uint32(90).string(e.minSelfDelegation),r},decode(e,r){let n=e instanceof a.default.Reader?e:new a.default.Reader(e),i=void 0===r?n.len:n.pos+r,o=v();for(;n.pos>>3){case 1:o.operatorAddress=n.string();break;case 2:o.consensusPubkey=u.Any.decode(n,n.uint32());break;case 3:o.jailed=n.bool();break;case 4:o.status=n.int32();break;case 5:o.tokens=n.string();break;case 6:o.delegatorShares=n.string();break;case 7:o.description=t.Description.decode(n,n.uint32());break;case 8:o.unbondingHeight=U(n.int64());break;case 9:o.unbondingTime=M(s.Timestamp.decode(n,n.uint32()));break;case 10:o.commission=t.Commission.decode(n,n.uint32());break;case 11:o.minSelfDelegation=n.string();break;default:n.skipType(7&e)}}return o},fromJSON:e=>({operatorAddress:J(e.operatorAddress)?String(e.operatorAddress):"",consensusPubkey:J(e.consensusPubkey)?u.Any.fromJSON(e.consensusPubkey):void 0,jailed:!!J(e.jailed)&&!!e.jailed,status:J(e.status)?p(e.status):0,tokens:J(e.tokens)?String(e.tokens):"",delegatorShares:J(e.delegatorShares)?String(e.delegatorShares):"",description:J(e.description)?t.Description.fromJSON(e.description):void 0,unbondingHeight:J(e.unbondingHeight)?String(e.unbondingHeight):"0",unbondingTime:J(e.unbondingTime)?D(e.unbondingTime):void 0,commission:J(e.commission)?t.Commission.fromJSON(e.commission):void 0,minSelfDelegation:J(e.minSelfDelegation)?String(e.minSelfDelegation):""}),toJSON(e){let r={};return void 0!==e.operatorAddress&&(r.operatorAddress=e.operatorAddress),void 0!==e.consensusPubkey&&(r.consensusPubkey=e.consensusPubkey?u.Any.toJSON(e.consensusPubkey):void 0),void 0!==e.jailed&&(r.jailed=e.jailed),void 0!==e.status&&(r.status=f(e.status)),void 0!==e.tokens&&(r.tokens=e.tokens),void 0!==e.delegatorShares&&(r.delegatorShares=e.delegatorShares),void 0!==e.description&&(r.description=e.description?t.Description.toJSON(e.description):void 0),void 0!==e.unbondingHeight&&(r.unbondingHeight=e.unbondingHeight),void 0!==e.unbondingTime&&(r.unbondingTime=e.unbondingTime.toISOString()),void 0!==e.commission&&(r.commission=e.commission?t.Commission.toJSON(e.commission):void 0),void 0!==e.minSelfDelegation&&(r.minSelfDelegation=e.minSelfDelegation),r},fromPartial(e){var r,n,i,o,a,s,l,d;let c=v();return c.operatorAddress=null!==(r=e.operatorAddress)&&void 0!==r?r:"",c.consensusPubkey=void 0!==e.consensusPubkey&&null!==e.consensusPubkey?u.Any.fromPartial(e.consensusPubkey):void 0,c.jailed=null!==(n=e.jailed)&&void 0!==n&&n,c.status=null!==(i=e.status)&&void 0!==i?i:0,c.tokens=null!==(o=e.tokens)&&void 0!==o?o:"",c.delegatorShares=null!==(a=e.delegatorShares)&&void 0!==a?a:"",c.description=void 0!==e.description&&null!==e.description?t.Description.fromPartial(e.description):void 0,c.unbondingHeight=null!==(s=e.unbondingHeight)&&void 0!==s?s:"0",c.unbondingTime=null!==(l=e.unbondingTime)&&void 0!==l?l:void 0,c.commission=void 0!==e.commission&&null!==e.commission?t.Commission.fromPartial(e.commission):void 0,c.minSelfDelegation=null!==(d=e.minSelfDelegation)&&void 0!==d?d:"",c}},t.ValAddresses={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();for(let r of e.addresses)t.uint32(10).string(r);return t},decode(e,t){let r=e instanceof a.default.Reader?e:new a.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=b();for(;r.pos>>3==1?i.addresses.push(r.string()):r.skipType(7&e)}return i},fromJSON:e=>({addresses:Array.isArray(null==e?void 0:e.addresses)?e.addresses.map(e=>String(e)):[]}),toJSON(e){let t={};return e.addresses?t.addresses=e.addresses.map(e=>e):t.addresses=[],t},fromPartial(e){var t;let r=b();return r.addresses=(null===(t=e.addresses)||void 0===t?void 0:t.map(e=>e))||[],r}},t.DVPair={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();return""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),""!==e.validatorAddress&&t.uint32(18).string(e.validatorAddress),t},decode(e,t){let r=e instanceof a.default.Reader?e:new a.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=S();for(;r.pos>>3){case 1:i.delegatorAddress=r.string();break;case 2:i.validatorAddress=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({delegatorAddress:J(e.delegatorAddress)?String(e.delegatorAddress):"",validatorAddress:J(e.validatorAddress)?String(e.validatorAddress):""}),toJSON(e){let t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),t},fromPartial(e){var t,r;let n=S();return n.delegatorAddress=null!==(t=e.delegatorAddress)&&void 0!==t?t:"",n.validatorAddress=null!==(r=e.validatorAddress)&&void 0!==r?r:"",n}},t.DVPairs={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();for(let n of e.pairs)t.DVPair.encode(n,r.uint32(10).fork()).ldelim();return r},decode(e,r){let n=e instanceof a.default.Reader?e:new a.default.Reader(e),i=void 0===r?n.len:n.pos+r,o=w();for(;n.pos>>3==1?o.pairs.push(t.DVPair.decode(n,n.uint32())):n.skipType(7&e)}return o},fromJSON:e=>({pairs:Array.isArray(null==e?void 0:e.pairs)?e.pairs.map(e=>t.DVPair.fromJSON(e)):[]}),toJSON(e){let r={};return e.pairs?r.pairs=e.pairs.map(e=>e?t.DVPair.toJSON(e):void 0):r.pairs=[],r},fromPartial(e){var r;let n=w();return n.pairs=(null===(r=e.pairs)||void 0===r?void 0:r.map(e=>t.DVPair.fromPartial(e)))||[],n}},t.DVVTriplet={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();return""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),""!==e.validatorSrcAddress&&t.uint32(18).string(e.validatorSrcAddress),""!==e.validatorDstAddress&&t.uint32(26).string(e.validatorDstAddress),t},decode(e,t){let r=e instanceof a.default.Reader?e:new a.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=_();for(;r.pos>>3){case 1:i.delegatorAddress=r.string();break;case 2:i.validatorSrcAddress=r.string();break;case 3:i.validatorDstAddress=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({delegatorAddress:J(e.delegatorAddress)?String(e.delegatorAddress):"",validatorSrcAddress:J(e.validatorSrcAddress)?String(e.validatorSrcAddress):"",validatorDstAddress:J(e.validatorDstAddress)?String(e.validatorDstAddress):""}),toJSON(e){let t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.validatorSrcAddress&&(t.validatorSrcAddress=e.validatorSrcAddress),void 0!==e.validatorDstAddress&&(t.validatorDstAddress=e.validatorDstAddress),t},fromPartial(e){var t,r,n;let i=_();return i.delegatorAddress=null!==(t=e.delegatorAddress)&&void 0!==t?t:"",i.validatorSrcAddress=null!==(r=e.validatorSrcAddress)&&void 0!==r?r:"",i.validatorDstAddress=null!==(n=e.validatorDstAddress)&&void 0!==n?n:"",i}},t.DVVTriplets={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();for(let n of e.triplets)t.DVVTriplet.encode(n,r.uint32(10).fork()).ldelim();return r},decode(e,r){let n=e instanceof a.default.Reader?e:new a.default.Reader(e),i=void 0===r?n.len:n.pos+r,o=k();for(;n.pos>>3==1?o.triplets.push(t.DVVTriplet.decode(n,n.uint32())):n.skipType(7&e)}return o},fromJSON:e=>({triplets:Array.isArray(null==e?void 0:e.triplets)?e.triplets.map(e=>t.DVVTriplet.fromJSON(e)):[]}),toJSON(e){let r={};return e.triplets?r.triplets=e.triplets.map(e=>e?t.DVVTriplet.toJSON(e):void 0):r.triplets=[],r},fromPartial(e){var r;let n=k();return n.triplets=(null===(r=e.triplets)||void 0===r?void 0:r.map(e=>t.DVVTriplet.fromPartial(e)))||[],n}},t.Delegation={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();return""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),""!==e.validatorAddress&&t.uint32(18).string(e.validatorAddress),""!==e.shares&&t.uint32(26).string(e.shares),t},decode(e,t){let r=e instanceof a.default.Reader?e:new a.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=O();for(;r.pos>>3){case 1:i.delegatorAddress=r.string();break;case 2:i.validatorAddress=r.string();break;case 3:i.shares=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({delegatorAddress:J(e.delegatorAddress)?String(e.delegatorAddress):"",validatorAddress:J(e.validatorAddress)?String(e.validatorAddress):"",shares:J(e.shares)?String(e.shares):""}),toJSON(e){let t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),void 0!==e.shares&&(t.shares=e.shares),t},fromPartial(e){var t,r,n;let i=O();return i.delegatorAddress=null!==(t=e.delegatorAddress)&&void 0!==t?t:"",i.validatorAddress=null!==(r=e.validatorAddress)&&void 0!==r?r:"",i.shares=null!==(n=e.shares)&&void 0!==n?n:"",i}},t.UnbondingDelegation={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();for(let n of(""!==e.delegatorAddress&&r.uint32(10).string(e.delegatorAddress),""!==e.validatorAddress&&r.uint32(18).string(e.validatorAddress),e.entries))t.UnbondingDelegationEntry.encode(n,r.uint32(26).fork()).ldelim();return r},decode(e,r){let n=e instanceof a.default.Reader?e:new a.default.Reader(e),i=void 0===r?n.len:n.pos+r,o=P();for(;n.pos>>3){case 1:o.delegatorAddress=n.string();break;case 2:o.validatorAddress=n.string();break;case 3:o.entries.push(t.UnbondingDelegationEntry.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return o},fromJSON:e=>({delegatorAddress:J(e.delegatorAddress)?String(e.delegatorAddress):"",validatorAddress:J(e.validatorAddress)?String(e.validatorAddress):"",entries:Array.isArray(null==e?void 0:e.entries)?e.entries.map(e=>t.UnbondingDelegationEntry.fromJSON(e)):[]}),toJSON(e){let r={};return void 0!==e.delegatorAddress&&(r.delegatorAddress=e.delegatorAddress),void 0!==e.validatorAddress&&(r.validatorAddress=e.validatorAddress),e.entries?r.entries=e.entries.map(e=>e?t.UnbondingDelegationEntry.toJSON(e):void 0):r.entries=[],r},fromPartial(e){var r,n,i;let o=P();return o.delegatorAddress=null!==(r=e.delegatorAddress)&&void 0!==r?r:"",o.validatorAddress=null!==(n=e.validatorAddress)&&void 0!==n?n:"",o.entries=(null===(i=e.entries)||void 0===i?void 0:i.map(e=>t.UnbondingDelegationEntry.fromPartial(e)))||[],o}},t.UnbondingDelegationEntry={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();return"0"!==e.creationHeight&&t.uint32(8).int64(e.creationHeight),void 0!==e.completionTime&&s.Timestamp.encode(C(e.completionTime),t.uint32(18).fork()).ldelim(),""!==e.initialBalance&&t.uint32(26).string(e.initialBalance),""!==e.balance&&t.uint32(34).string(e.balance),t},decode(e,t){let r=e instanceof a.default.Reader?e:new a.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=A();for(;r.pos>>3){case 1:i.creationHeight=U(r.int64());break;case 2:i.completionTime=M(s.Timestamp.decode(r,r.uint32()));break;case 3:i.initialBalance=r.string();break;case 4:i.balance=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({creationHeight:J(e.creationHeight)?String(e.creationHeight):"0",completionTime:J(e.completionTime)?D(e.completionTime):void 0,initialBalance:J(e.initialBalance)?String(e.initialBalance):"",balance:J(e.balance)?String(e.balance):""}),toJSON(e){let t={};return void 0!==e.creationHeight&&(t.creationHeight=e.creationHeight),void 0!==e.completionTime&&(t.completionTime=e.completionTime.toISOString()),void 0!==e.initialBalance&&(t.initialBalance=e.initialBalance),void 0!==e.balance&&(t.balance=e.balance),t},fromPartial(e){var t,r,n,i;let o=A();return o.creationHeight=null!==(t=e.creationHeight)&&void 0!==t?t:"0",o.completionTime=null!==(r=e.completionTime)&&void 0!==r?r:void 0,o.initialBalance=null!==(n=e.initialBalance)&&void 0!==n?n:"",o.balance=null!==(i=e.balance)&&void 0!==i?i:"",o}},t.RedelegationEntry={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();return"0"!==e.creationHeight&&t.uint32(8).int64(e.creationHeight),void 0!==e.completionTime&&s.Timestamp.encode(C(e.completionTime),t.uint32(18).fork()).ldelim(),""!==e.initialBalance&&t.uint32(26).string(e.initialBalance),""!==e.sharesDst&&t.uint32(34).string(e.sharesDst),t},decode(e,t){let r=e instanceof a.default.Reader?e:new a.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=I();for(;r.pos>>3){case 1:i.creationHeight=U(r.int64());break;case 2:i.completionTime=M(s.Timestamp.decode(r,r.uint32()));break;case 3:i.initialBalance=r.string();break;case 4:i.sharesDst=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({creationHeight:J(e.creationHeight)?String(e.creationHeight):"0",completionTime:J(e.completionTime)?D(e.completionTime):void 0,initialBalance:J(e.initialBalance)?String(e.initialBalance):"",sharesDst:J(e.sharesDst)?String(e.sharesDst):""}),toJSON(e){let t={};return void 0!==e.creationHeight&&(t.creationHeight=e.creationHeight),void 0!==e.completionTime&&(t.completionTime=e.completionTime.toISOString()),void 0!==e.initialBalance&&(t.initialBalance=e.initialBalance),void 0!==e.sharesDst&&(t.sharesDst=e.sharesDst),t},fromPartial(e){var t,r,n,i;let o=I();return o.creationHeight=null!==(t=e.creationHeight)&&void 0!==t?t:"0",o.completionTime=null!==(r=e.completionTime)&&void 0!==r?r:void 0,o.initialBalance=null!==(n=e.initialBalance)&&void 0!==n?n:"",o.sharesDst=null!==(i=e.sharesDst)&&void 0!==i?i:"",o}},t.Redelegation={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();for(let n of(""!==e.delegatorAddress&&r.uint32(10).string(e.delegatorAddress),""!==e.validatorSrcAddress&&r.uint32(18).string(e.validatorSrcAddress),""!==e.validatorDstAddress&&r.uint32(26).string(e.validatorDstAddress),e.entries))t.RedelegationEntry.encode(n,r.uint32(34).fork()).ldelim();return r},decode(e,r){let n=e instanceof a.default.Reader?e:new a.default.Reader(e),i=void 0===r?n.len:n.pos+r,o=R();for(;n.pos>>3){case 1:o.delegatorAddress=n.string();break;case 2:o.validatorSrcAddress=n.string();break;case 3:o.validatorDstAddress=n.string();break;case 4:o.entries.push(t.RedelegationEntry.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return o},fromJSON:e=>({delegatorAddress:J(e.delegatorAddress)?String(e.delegatorAddress):"",validatorSrcAddress:J(e.validatorSrcAddress)?String(e.validatorSrcAddress):"",validatorDstAddress:J(e.validatorDstAddress)?String(e.validatorDstAddress):"",entries:Array.isArray(null==e?void 0:e.entries)?e.entries.map(e=>t.RedelegationEntry.fromJSON(e)):[]}),toJSON(e){let r={};return void 0!==e.delegatorAddress&&(r.delegatorAddress=e.delegatorAddress),void 0!==e.validatorSrcAddress&&(r.validatorSrcAddress=e.validatorSrcAddress),void 0!==e.validatorDstAddress&&(r.validatorDstAddress=e.validatorDstAddress),e.entries?r.entries=e.entries.map(e=>e?t.RedelegationEntry.toJSON(e):void 0):r.entries=[],r},fromPartial(e){var r,n,i,o;let a=R();return a.delegatorAddress=null!==(r=e.delegatorAddress)&&void 0!==r?r:"",a.validatorSrcAddress=null!==(n=e.validatorSrcAddress)&&void 0!==n?n:"",a.validatorDstAddress=null!==(i=e.validatorDstAddress)&&void 0!==i?i:"",a.entries=(null===(o=e.entries)||void 0===o?void 0:o.map(e=>t.RedelegationEntry.fromPartial(e)))||[],a}},t.Params={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();return void 0!==e.unbondingTime&&d.Duration.encode(e.unbondingTime,t.uint32(10).fork()).ldelim(),0!==e.maxValidators&&t.uint32(16).uint32(e.maxValidators),0!==e.maxEntries&&t.uint32(24).uint32(e.maxEntries),0!==e.historicalEntries&&t.uint32(32).uint32(e.historicalEntries),""!==e.bondDenom&&t.uint32(42).string(e.bondDenom),t},decode(e,t){let r=e instanceof a.default.Reader?e:new a.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=E();for(;r.pos>>3){case 1:i.unbondingTime=d.Duration.decode(r,r.uint32());break;case 2:i.maxValidators=r.uint32();break;case 3:i.maxEntries=r.uint32();break;case 4:i.historicalEntries=r.uint32();break;case 5:i.bondDenom=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({unbondingTime:J(e.unbondingTime)?d.Duration.fromJSON(e.unbondingTime):void 0,maxValidators:J(e.maxValidators)?Number(e.maxValidators):0,maxEntries:J(e.maxEntries)?Number(e.maxEntries):0,historicalEntries:J(e.historicalEntries)?Number(e.historicalEntries):0,bondDenom:J(e.bondDenom)?String(e.bondDenom):""}),toJSON(e){let t={};return void 0!==e.unbondingTime&&(t.unbondingTime=e.unbondingTime?d.Duration.toJSON(e.unbondingTime):void 0),void 0!==e.maxValidators&&(t.maxValidators=Math.round(e.maxValidators)),void 0!==e.maxEntries&&(t.maxEntries=Math.round(e.maxEntries)),void 0!==e.historicalEntries&&(t.historicalEntries=Math.round(e.historicalEntries)),void 0!==e.bondDenom&&(t.bondDenom=e.bondDenom),t},fromPartial(e){var t,r,n,i;let o=E();return o.unbondingTime=void 0!==e.unbondingTime&&null!==e.unbondingTime?d.Duration.fromPartial(e.unbondingTime):void 0,o.maxValidators=null!==(t=e.maxValidators)&&void 0!==t?t:0,o.maxEntries=null!==(r=e.maxEntries)&&void 0!==r?r:0,o.historicalEntries=null!==(n=e.historicalEntries)&&void 0!==n?n:0,o.bondDenom=null!==(i=e.bondDenom)&&void 0!==i?i:"",o}},t.DelegationResponse={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();return void 0!==e.delegation&&t.Delegation.encode(e.delegation,r.uint32(10).fork()).ldelim(),void 0!==e.balance&&c.Coin.encode(e.balance,r.uint32(18).fork()).ldelim(),r},decode(e,r){let n=e instanceof a.default.Reader?e:new a.default.Reader(e),i=void 0===r?n.len:n.pos+r,o=T();for(;n.pos>>3){case 1:o.delegation=t.Delegation.decode(n,n.uint32());break;case 2:o.balance=c.Coin.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON:e=>({delegation:J(e.delegation)?t.Delegation.fromJSON(e.delegation):void 0,balance:J(e.balance)?c.Coin.fromJSON(e.balance):void 0}),toJSON(e){let r={};return void 0!==e.delegation&&(r.delegation=e.delegation?t.Delegation.toJSON(e.delegation):void 0),void 0!==e.balance&&(r.balance=e.balance?c.Coin.toJSON(e.balance):void 0),r},fromPartial(e){let r=T();return r.delegation=void 0!==e.delegation&&null!==e.delegation?t.Delegation.fromPartial(e.delegation):void 0,r.balance=void 0!==e.balance&&null!==e.balance?c.Coin.fromPartial(e.balance):void 0,r}},t.RedelegationEntryResponse={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();return void 0!==e.redelegationEntry&&t.RedelegationEntry.encode(e.redelegationEntry,r.uint32(10).fork()).ldelim(),""!==e.balance&&r.uint32(34).string(e.balance),r},decode(e,r){let n=e instanceof a.default.Reader?e:new a.default.Reader(e),i=void 0===r?n.len:n.pos+r,o=N();for(;n.pos>>3){case 1:o.redelegationEntry=t.RedelegationEntry.decode(n,n.uint32());break;case 4:o.balance=n.string();break;default:n.skipType(7&e)}}return o},fromJSON:e=>({redelegationEntry:J(e.redelegationEntry)?t.RedelegationEntry.fromJSON(e.redelegationEntry):void 0,balance:J(e.balance)?String(e.balance):""}),toJSON(e){let r={};return void 0!==e.redelegationEntry&&(r.redelegationEntry=e.redelegationEntry?t.RedelegationEntry.toJSON(e.redelegationEntry):void 0),void 0!==e.balance&&(r.balance=e.balance),r},fromPartial(e){var r;let n=N();return n.redelegationEntry=void 0!==e.redelegationEntry&&null!==e.redelegationEntry?t.RedelegationEntry.fromPartial(e.redelegationEntry):void 0,n.balance=null!==(r=e.balance)&&void 0!==r?r:"",n}},t.RedelegationResponse={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();for(let n of(void 0!==e.redelegation&&t.Redelegation.encode(e.redelegation,r.uint32(10).fork()).ldelim(),e.entries))t.RedelegationEntryResponse.encode(n,r.uint32(18).fork()).ldelim();return r},decode(e,r){let n=e instanceof a.default.Reader?e:new a.default.Reader(e),i=void 0===r?n.len:n.pos+r,o=x();for(;n.pos>>3){case 1:o.redelegation=t.Redelegation.decode(n,n.uint32());break;case 2:o.entries.push(t.RedelegationEntryResponse.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return o},fromJSON:e=>({redelegation:J(e.redelegation)?t.Redelegation.fromJSON(e.redelegation):void 0,entries:Array.isArray(null==e?void 0:e.entries)?e.entries.map(e=>t.RedelegationEntryResponse.fromJSON(e)):[]}),toJSON(e){let r={};return void 0!==e.redelegation&&(r.redelegation=e.redelegation?t.Redelegation.toJSON(e.redelegation):void 0),e.entries?r.entries=e.entries.map(e=>e?t.RedelegationEntryResponse.toJSON(e):void 0):r.entries=[],r},fromPartial(e){var r;let n=x();return n.redelegation=void 0!==e.redelegation&&null!==e.redelegation?t.Redelegation.fromPartial(e.redelegation):void 0,n.entries=(null===(r=e.entries)||void 0===r?void 0:r.map(e=>t.RedelegationEntryResponse.fromPartial(e)))||[],n}},t.Pool={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();return""!==e.notBondedTokens&&t.uint32(10).string(e.notBondedTokens),""!==e.bondedTokens&&t.uint32(18).string(e.bondedTokens),t},decode(e,t){let r=e instanceof a.default.Reader?e:new a.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=B();for(;r.pos>>3){case 1:i.notBondedTokens=r.string();break;case 2:i.bondedTokens=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({notBondedTokens:J(e.notBondedTokens)?String(e.notBondedTokens):"",bondedTokens:J(e.bondedTokens)?String(e.bondedTokens):""}),toJSON(e){let t={};return void 0!==e.notBondedTokens&&(t.notBondedTokens=e.notBondedTokens),void 0!==e.bondedTokens&&(t.bondedTokens=e.bondedTokens),t},fromPartial(e){var t,r;let n=B();return n.notBondedTokens=null!==(t=e.notBondedTokens)&&void 0!==t?t:"",n.bondedTokens=null!==(r=e.bondedTokens)&&void 0!==r?r:"",n}},a.default.util.Long!==o.default&&(a.default.util.Long=o.default,a.default.configure())},47431:function(e,t,r){"use strict";var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MsgValidatorBondResponse=t.MsgValidatorBond=t.MsgEnableTokenizeSharesResponse=t.MsgEnableTokenizeShares=t.MsgDisableTokenizeSharesResponse=t.MsgDisableTokenizeShares=t.MsgTransferTokenizeShareRecordResponse=t.MsgTransferTokenizeShareRecord=t.MsgRedeemTokensForSharesResponse=t.MsgRedeemTokensForShares=t.MsgTokenizeSharesResponse=t.MsgTokenizeShares=t.MsgCancelUnbondingDelegationResponse=t.MsgCancelUnbondingDelegation=t.MsgUnbondValidatorResponse=t.MsgUnbondValidator=t.MsgUndelegateResponse=t.MsgUndelegate=t.MsgBeginRedelegateResponse=t.MsgBeginRedelegate=t.MsgDelegateResponse=t.MsgDelegate=t.MsgEditValidatorResponse=t.MsgEditValidator=t.MsgCreateValidatorResponse=t.MsgCreateValidator=t.protobufPackage=void 0;let i=n(r(40059)),o=n(r(81667)),a=r(90338),s=r(60159),l=r(28446),u=r(80054);function d(){return{description:void 0,commission:void 0,minSelfDelegation:"",delegatorAddress:"",validatorAddress:"",pubkey:void 0,value:void 0}}function c(){return{}}function p(){return{description:void 0,validatorAddress:"",commissionRate:"",minSelfDelegation:""}}function f(){return{}}function h(){return{delegatorAddress:"",validatorAddress:"",amount:void 0}}function g(){return{}}function m(){return{delegatorAddress:"",validatorSrcAddress:"",validatorDstAddress:"",amount:void 0}}function y(){return{completionTime:void 0}}function v(){return{delegatorAddress:"",validatorAddress:"",amount:void 0}}function b(){return{completionTime:void 0}}function S(){return{validatorAddress:""}}function w(){return{}}function _(){return{delegatorAddress:"",validatorAddress:"",amount:void 0,creationHeight:"0"}}function k(){return{}}function O(){return{delegatorAddress:"",validatorAddress:"",amount:void 0,tokenizedShareOwner:""}}function P(){return{amount:void 0}}function A(){return{delegatorAddress:"",amount:void 0}}function I(){return{amount:void 0}}function R(){return{tokenizeShareRecordId:"0",sender:"",newOwner:""}}function E(){return{}}function T(){return{delegatorAddress:""}}function N(){return{}}function x(){return{delegatorAddress:""}}function B(){return{completionTime:void 0}}function C(){return{delegatorAddress:"",validatorAddress:""}}function M(){return{}}function D(e){return{seconds:Math.trunc(e.getTime()/1e3).toString(),nanos:e.getTime()%1e3*1e6}}function U(e){let t=1e3*Number(e.seconds);return new Date(t+=e.nanos/1e6)}function J(e){return e instanceof Date?e:"string"==typeof e?new Date(e):U(a.Timestamp.fromJSON(e))}function j(e){return e.toString()}function H(e){return null!=e}t.protobufPackage="cosmos.staking.v1beta1",t.MsgCreateValidator={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return void 0!==e.description&&s.Description.encode(e.description,t.uint32(10).fork()).ldelim(),void 0!==e.commission&&s.CommissionRates.encode(e.commission,t.uint32(18).fork()).ldelim(),""!==e.minSelfDelegation&&t.uint32(26).string(e.minSelfDelegation),""!==e.delegatorAddress&&t.uint32(34).string(e.delegatorAddress),""!==e.validatorAddress&&t.uint32(42).string(e.validatorAddress),void 0!==e.pubkey&&l.Any.encode(e.pubkey,t.uint32(50).fork()).ldelim(),void 0!==e.value&&u.Coin.encode(e.value,t.uint32(58).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=d();for(;r.pos>>3){case 1:i.description=s.Description.decode(r,r.uint32());break;case 2:i.commission=s.CommissionRates.decode(r,r.uint32());break;case 3:i.minSelfDelegation=r.string();break;case 4:i.delegatorAddress=r.string();break;case 5:i.validatorAddress=r.string();break;case 6:i.pubkey=l.Any.decode(r,r.uint32());break;case 7:i.value=u.Coin.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON:e=>({description:H(e.description)?s.Description.fromJSON(e.description):void 0,commission:H(e.commission)?s.CommissionRates.fromJSON(e.commission):void 0,minSelfDelegation:H(e.minSelfDelegation)?String(e.minSelfDelegation):"",delegatorAddress:H(e.delegatorAddress)?String(e.delegatorAddress):"",validatorAddress:H(e.validatorAddress)?String(e.validatorAddress):"",pubkey:H(e.pubkey)?l.Any.fromJSON(e.pubkey):void 0,value:H(e.value)?u.Coin.fromJSON(e.value):void 0}),toJSON(e){let t={};return void 0!==e.description&&(t.description=e.description?s.Description.toJSON(e.description):void 0),void 0!==e.commission&&(t.commission=e.commission?s.CommissionRates.toJSON(e.commission):void 0),void 0!==e.minSelfDelegation&&(t.minSelfDelegation=e.minSelfDelegation),void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),void 0!==e.pubkey&&(t.pubkey=e.pubkey?l.Any.toJSON(e.pubkey):void 0),void 0!==e.value&&(t.value=e.value?u.Coin.toJSON(e.value):void 0),t},fromPartial(e){var t,r,n;let i=d();return i.description=void 0!==e.description&&null!==e.description?s.Description.fromPartial(e.description):void 0,i.commission=void 0!==e.commission&&null!==e.commission?s.CommissionRates.fromPartial(e.commission):void 0,i.minSelfDelegation=null!==(t=e.minSelfDelegation)&&void 0!==t?t:"",i.delegatorAddress=null!==(r=e.delegatorAddress)&&void 0!==r?r:"",i.validatorAddress=null!==(n=e.validatorAddress)&&void 0!==n?n:"",i.pubkey=void 0!==e.pubkey&&null!==e.pubkey?l.Any.fromPartial(e.pubkey):void 0,i.value=void 0!==e.value&&null!==e.value?u.Coin.fromPartial(e.value):void 0,i}},t.MsgCreateValidatorResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=c();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>c()},t.MsgEditValidator={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return void 0!==e.description&&s.Description.encode(e.description,t.uint32(10).fork()).ldelim(),""!==e.validatorAddress&&t.uint32(18).string(e.validatorAddress),""!==e.commissionRate&&t.uint32(26).string(e.commissionRate),""!==e.minSelfDelegation&&t.uint32(34).string(e.minSelfDelegation),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=p();for(;r.pos>>3){case 1:i.description=s.Description.decode(r,r.uint32());break;case 2:i.validatorAddress=r.string();break;case 3:i.commissionRate=r.string();break;case 4:i.minSelfDelegation=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({description:H(e.description)?s.Description.fromJSON(e.description):void 0,validatorAddress:H(e.validatorAddress)?String(e.validatorAddress):"",commissionRate:H(e.commissionRate)?String(e.commissionRate):"",minSelfDelegation:H(e.minSelfDelegation)?String(e.minSelfDelegation):""}),toJSON(e){let t={};return void 0!==e.description&&(t.description=e.description?s.Description.toJSON(e.description):void 0),void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),void 0!==e.commissionRate&&(t.commissionRate=e.commissionRate),void 0!==e.minSelfDelegation&&(t.minSelfDelegation=e.minSelfDelegation),t},fromPartial(e){var t,r,n;let i=p();return i.description=void 0!==e.description&&null!==e.description?s.Description.fromPartial(e.description):void 0,i.validatorAddress=null!==(t=e.validatorAddress)&&void 0!==t?t:"",i.commissionRate=null!==(r=e.commissionRate)&&void 0!==r?r:"",i.minSelfDelegation=null!==(n=e.minSelfDelegation)&&void 0!==n?n:"",i}},t.MsgEditValidatorResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=f();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>f()},t.MsgDelegate={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),""!==e.validatorAddress&&t.uint32(18).string(e.validatorAddress),void 0!==e.amount&&u.Coin.encode(e.amount,t.uint32(26).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=h();for(;r.pos>>3){case 1:i.delegatorAddress=r.string();break;case 2:i.validatorAddress=r.string();break;case 3:i.amount=u.Coin.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON:e=>({delegatorAddress:H(e.delegatorAddress)?String(e.delegatorAddress):"",validatorAddress:H(e.validatorAddress)?String(e.validatorAddress):"",amount:H(e.amount)?u.Coin.fromJSON(e.amount):void 0}),toJSON(e){let t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),void 0!==e.amount&&(t.amount=e.amount?u.Coin.toJSON(e.amount):void 0),t},fromPartial(e){var t,r;let n=h();return n.delegatorAddress=null!==(t=e.delegatorAddress)&&void 0!==t?t:"",n.validatorAddress=null!==(r=e.validatorAddress)&&void 0!==r?r:"",n.amount=void 0!==e.amount&&null!==e.amount?u.Coin.fromPartial(e.amount):void 0,n}},t.MsgDelegateResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=g();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>g()},t.MsgBeginRedelegate={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),""!==e.validatorSrcAddress&&t.uint32(18).string(e.validatorSrcAddress),""!==e.validatorDstAddress&&t.uint32(26).string(e.validatorDstAddress),void 0!==e.amount&&u.Coin.encode(e.amount,t.uint32(34).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=m();for(;r.pos>>3){case 1:i.delegatorAddress=r.string();break;case 2:i.validatorSrcAddress=r.string();break;case 3:i.validatorDstAddress=r.string();break;case 4:i.amount=u.Coin.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON:e=>({delegatorAddress:H(e.delegatorAddress)?String(e.delegatorAddress):"",validatorSrcAddress:H(e.validatorSrcAddress)?String(e.validatorSrcAddress):"",validatorDstAddress:H(e.validatorDstAddress)?String(e.validatorDstAddress):"",amount:H(e.amount)?u.Coin.fromJSON(e.amount):void 0}),toJSON(e){let t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.validatorSrcAddress&&(t.validatorSrcAddress=e.validatorSrcAddress),void 0!==e.validatorDstAddress&&(t.validatorDstAddress=e.validatorDstAddress),void 0!==e.amount&&(t.amount=e.amount?u.Coin.toJSON(e.amount):void 0),t},fromPartial(e){var t,r,n;let i=m();return i.delegatorAddress=null!==(t=e.delegatorAddress)&&void 0!==t?t:"",i.validatorSrcAddress=null!==(r=e.validatorSrcAddress)&&void 0!==r?r:"",i.validatorDstAddress=null!==(n=e.validatorDstAddress)&&void 0!==n?n:"",i.amount=void 0!==e.amount&&null!==e.amount?u.Coin.fromPartial(e.amount):void 0,i}},t.MsgBeginRedelegateResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return void 0!==e.completionTime&&a.Timestamp.encode(D(e.completionTime),t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=y();for(;r.pos>>3==1?i.completionTime=U(a.Timestamp.decode(r,r.uint32())):r.skipType(7&e)}return i},fromJSON:e=>({completionTime:H(e.completionTime)?J(e.completionTime):void 0}),toJSON(e){let t={};return void 0!==e.completionTime&&(t.completionTime=e.completionTime.toISOString()),t},fromPartial(e){var t;let r=y();return r.completionTime=null!==(t=e.completionTime)&&void 0!==t?t:void 0,r}},t.MsgUndelegate={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),""!==e.validatorAddress&&t.uint32(18).string(e.validatorAddress),void 0!==e.amount&&u.Coin.encode(e.amount,t.uint32(26).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=v();for(;r.pos>>3){case 1:i.delegatorAddress=r.string();break;case 2:i.validatorAddress=r.string();break;case 3:i.amount=u.Coin.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON:e=>({delegatorAddress:H(e.delegatorAddress)?String(e.delegatorAddress):"",validatorAddress:H(e.validatorAddress)?String(e.validatorAddress):"",amount:H(e.amount)?u.Coin.fromJSON(e.amount):void 0}),toJSON(e){let t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),void 0!==e.amount&&(t.amount=e.amount?u.Coin.toJSON(e.amount):void 0),t},fromPartial(e){var t,r;let n=v();return n.delegatorAddress=null!==(t=e.delegatorAddress)&&void 0!==t?t:"",n.validatorAddress=null!==(r=e.validatorAddress)&&void 0!==r?r:"",n.amount=void 0!==e.amount&&null!==e.amount?u.Coin.fromPartial(e.amount):void 0,n}},t.MsgUndelegateResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return void 0!==e.completionTime&&a.Timestamp.encode(D(e.completionTime),t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=b();for(;r.pos>>3==1?i.completionTime=U(a.Timestamp.decode(r,r.uint32())):r.skipType(7&e)}return i},fromJSON:e=>({completionTime:H(e.completionTime)?J(e.completionTime):void 0}),toJSON(e){let t={};return void 0!==e.completionTime&&(t.completionTime=e.completionTime.toISOString()),t},fromPartial(e){var t;let r=b();return r.completionTime=null!==(t=e.completionTime)&&void 0!==t?t:void 0,r}},t.MsgUnbondValidator={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.validatorAddress&&t.uint32(10).string(e.validatorAddress),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=S();for(;r.pos>>3==1?i.validatorAddress=r.string():r.skipType(7&e)}return i},fromJSON:e=>({validatorAddress:H(e.validatorAddress)?String(e.validatorAddress):""}),toJSON(e){let t={};return void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),t},fromPartial(e){var t;let r=S();return r.validatorAddress=null!==(t=e.validatorAddress)&&void 0!==t?t:"",r}},t.MsgUnbondValidatorResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=w();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>w()},t.MsgCancelUnbondingDelegation={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),""!==e.validatorAddress&&t.uint32(18).string(e.validatorAddress),void 0!==e.amount&&u.Coin.encode(e.amount,t.uint32(26).fork()).ldelim(),"0"!==e.creationHeight&&t.uint32(32).int64(e.creationHeight),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=_();for(;r.pos>>3){case 1:i.delegatorAddress=r.string();break;case 2:i.validatorAddress=r.string();break;case 3:i.amount=u.Coin.decode(r,r.uint32());break;case 4:i.creationHeight=j(r.int64());break;default:r.skipType(7&e)}}return i},fromJSON:e=>({delegatorAddress:H(e.delegatorAddress)?String(e.delegatorAddress):"",validatorAddress:H(e.validatorAddress)?String(e.validatorAddress):"",amount:H(e.amount)?u.Coin.fromJSON(e.amount):void 0,creationHeight:H(e.creationHeight)?String(e.creationHeight):"0"}),toJSON(e){let t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),void 0!==e.amount&&(t.amount=e.amount?u.Coin.toJSON(e.amount):void 0),void 0!==e.creationHeight&&(t.creationHeight=e.creationHeight),t},fromPartial(e){var t,r,n;let i=_();return i.delegatorAddress=null!==(t=e.delegatorAddress)&&void 0!==t?t:"",i.validatorAddress=null!==(r=e.validatorAddress)&&void 0!==r?r:"",i.amount=void 0!==e.amount&&null!==e.amount?u.Coin.fromPartial(e.amount):void 0,i.creationHeight=null!==(n=e.creationHeight)&&void 0!==n?n:"0",i}},t.MsgCancelUnbondingDelegationResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=k();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>k()},t.MsgTokenizeShares={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),""!==e.validatorAddress&&t.uint32(18).string(e.validatorAddress),void 0!==e.amount&&u.Coin.encode(e.amount,t.uint32(26).fork()).ldelim(),""!==e.tokenizedShareOwner&&t.uint32(34).string(e.tokenizedShareOwner),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=O();for(;r.pos>>3){case 1:i.delegatorAddress=r.string();break;case 2:i.validatorAddress=r.string();break;case 3:i.amount=u.Coin.decode(r,r.uint32());break;case 4:i.tokenizedShareOwner=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({delegatorAddress:H(e.delegatorAddress)?String(e.delegatorAddress):"",validatorAddress:H(e.validatorAddress)?String(e.validatorAddress):"",amount:H(e.amount)?u.Coin.fromJSON(e.amount):void 0,tokenizedShareOwner:H(e.tokenizedShareOwner)?String(e.tokenizedShareOwner):""}),toJSON(e){let t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),void 0!==e.amount&&(t.amount=e.amount?u.Coin.toJSON(e.amount):void 0),void 0!==e.tokenizedShareOwner&&(t.tokenizedShareOwner=e.tokenizedShareOwner),t},fromPartial(e){var t,r,n;let i=O();return i.delegatorAddress=null!==(t=e.delegatorAddress)&&void 0!==t?t:"",i.validatorAddress=null!==(r=e.validatorAddress)&&void 0!==r?r:"",i.amount=void 0!==e.amount&&null!==e.amount?u.Coin.fromPartial(e.amount):void 0,i.tokenizedShareOwner=null!==(n=e.tokenizedShareOwner)&&void 0!==n?n:"",i}},t.MsgTokenizeSharesResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return void 0!==e.amount&&u.Coin.encode(e.amount,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=P();for(;r.pos>>3==1?i.amount=u.Coin.decode(r,r.uint32()):r.skipType(7&e)}return i},fromJSON:e=>({amount:H(e.amount)?u.Coin.fromJSON(e.amount):void 0}),toJSON(e){let t={};return void 0!==e.amount&&(t.amount=e.amount?u.Coin.toJSON(e.amount):void 0),t},fromPartial(e){let t=P();return t.amount=void 0!==e.amount&&null!==e.amount?u.Coin.fromPartial(e.amount):void 0,t}},t.MsgRedeemTokensForShares={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),void 0!==e.amount&&u.Coin.encode(e.amount,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=A();for(;r.pos>>3){case 1:i.delegatorAddress=r.string();break;case 2:i.amount=u.Coin.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON:e=>({delegatorAddress:H(e.delegatorAddress)?String(e.delegatorAddress):"",amount:H(e.amount)?u.Coin.fromJSON(e.amount):void 0}),toJSON(e){let t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.amount&&(t.amount=e.amount?u.Coin.toJSON(e.amount):void 0),t},fromPartial(e){var t;let r=A();return r.delegatorAddress=null!==(t=e.delegatorAddress)&&void 0!==t?t:"",r.amount=void 0!==e.amount&&null!==e.amount?u.Coin.fromPartial(e.amount):void 0,r}},t.MsgRedeemTokensForSharesResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return void 0!==e.amount&&u.Coin.encode(e.amount,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=I();for(;r.pos>>3==1?i.amount=u.Coin.decode(r,r.uint32()):r.skipType(7&e)}return i},fromJSON:e=>({amount:H(e.amount)?u.Coin.fromJSON(e.amount):void 0}),toJSON(e){let t={};return void 0!==e.amount&&(t.amount=e.amount?u.Coin.toJSON(e.amount):void 0),t},fromPartial(e){let t=I();return t.amount=void 0!==e.amount&&null!==e.amount?u.Coin.fromPartial(e.amount):void 0,t}},t.MsgTransferTokenizeShareRecord={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return"0"!==e.tokenizeShareRecordId&&t.uint32(8).uint64(e.tokenizeShareRecordId),""!==e.sender&&t.uint32(18).string(e.sender),""!==e.newOwner&&t.uint32(26).string(e.newOwner),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=R();for(;r.pos>>3){case 1:i.tokenizeShareRecordId=j(r.uint64());break;case 2:i.sender=r.string();break;case 3:i.newOwner=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({tokenizeShareRecordId:H(e.tokenizeShareRecordId)?String(e.tokenizeShareRecordId):"0",sender:H(e.sender)?String(e.sender):"",newOwner:H(e.newOwner)?String(e.newOwner):""}),toJSON(e){let t={};return void 0!==e.tokenizeShareRecordId&&(t.tokenizeShareRecordId=e.tokenizeShareRecordId),void 0!==e.sender&&(t.sender=e.sender),void 0!==e.newOwner&&(t.newOwner=e.newOwner),t},fromPartial(e){var t,r,n;let i=R();return i.tokenizeShareRecordId=null!==(t=e.tokenizeShareRecordId)&&void 0!==t?t:"0",i.sender=null!==(r=e.sender)&&void 0!==r?r:"",i.newOwner=null!==(n=e.newOwner)&&void 0!==n?n:"",i}},t.MsgTransferTokenizeShareRecordResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=E();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>E()},t.MsgDisableTokenizeShares={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=T();for(;r.pos>>3==1?i.delegatorAddress=r.string():r.skipType(7&e)}return i},fromJSON:e=>({delegatorAddress:H(e.delegatorAddress)?String(e.delegatorAddress):""}),toJSON(e){let t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),t},fromPartial(e){var t;let r=T();return r.delegatorAddress=null!==(t=e.delegatorAddress)&&void 0!==t?t:"",r}},t.MsgDisableTokenizeSharesResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=N();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>N()},t.MsgEnableTokenizeShares={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=x();for(;r.pos>>3==1?i.delegatorAddress=r.string():r.skipType(7&e)}return i},fromJSON:e=>({delegatorAddress:H(e.delegatorAddress)?String(e.delegatorAddress):""}),toJSON(e){let t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),t},fromPartial(e){var t;let r=x();return r.delegatorAddress=null!==(t=e.delegatorAddress)&&void 0!==t?t:"",r}},t.MsgEnableTokenizeSharesResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return void 0!==e.completionTime&&a.Timestamp.encode(D(e.completionTime),t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=B();for(;r.pos>>3==1?i.completionTime=U(a.Timestamp.decode(r,r.uint32())):r.skipType(7&e)}return i},fromJSON:e=>({completionTime:H(e.completionTime)?J(e.completionTime):void 0}),toJSON(e){let t={};return void 0!==e.completionTime&&(t.completionTime=e.completionTime.toISOString()),t},fromPartial(e){var t;let r=B();return r.completionTime=null!==(t=e.completionTime)&&void 0!==t?t:void 0,r}},t.MsgValidatorBond={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),""!==e.validatorAddress&&t.uint32(18).string(e.validatorAddress),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=C();for(;r.pos>>3){case 1:i.delegatorAddress=r.string();break;case 2:i.validatorAddress=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({delegatorAddress:H(e.delegatorAddress)?String(e.delegatorAddress):"",validatorAddress:H(e.validatorAddress)?String(e.validatorAddress):""}),toJSON(e){let t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),t},fromPartial(e){var t,r;let n=C();return n.delegatorAddress=null!==(t=e.delegatorAddress)&&void 0!==t?t:"",n.validatorAddress=null!==(r=e.validatorAddress)&&void 0!==r?r:"",n}},t.MsgValidatorBondResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=M();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>M()},o.default.util.Long!==i.default&&(o.default.util.Long=i.default,o.default.configure())},99402:function(e,t,r){"use strict";var n,i=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.SignatureDescriptor_Data_Multi=t.SignatureDescriptor_Data_Single=t.SignatureDescriptor_Data=t.SignatureDescriptor=t.SignatureDescriptors=t.signModeToJSON=t.signModeFromJSON=t.SignMode=t.protobufPackage=void 0;let o=i(r(40059)),a=i(r(81667)),s=r(28446),l=r(61097);function u(e){switch(e){case 0:case"SIGN_MODE_UNSPECIFIED":return n.SIGN_MODE_UNSPECIFIED;case 1:case"SIGN_MODE_DIRECT":return n.SIGN_MODE_DIRECT;case 2:case"SIGN_MODE_TEXTUAL":return n.SIGN_MODE_TEXTUAL;case 3:case"SIGN_MODE_DIRECT_AUX":return n.SIGN_MODE_DIRECT_AUX;case 127:case"SIGN_MODE_LEGACY_AMINO_JSON":return n.SIGN_MODE_LEGACY_AMINO_JSON;case 191:case"SIGN_MODE_EIP_191":return n.SIGN_MODE_EIP_191;default:return n.UNRECOGNIZED}}function d(e){switch(e){case n.SIGN_MODE_UNSPECIFIED:return"SIGN_MODE_UNSPECIFIED";case n.SIGN_MODE_DIRECT:return"SIGN_MODE_DIRECT";case n.SIGN_MODE_TEXTUAL:return"SIGN_MODE_TEXTUAL";case n.SIGN_MODE_DIRECT_AUX:return"SIGN_MODE_DIRECT_AUX";case n.SIGN_MODE_LEGACY_AMINO_JSON:return"SIGN_MODE_LEGACY_AMINO_JSON";case n.SIGN_MODE_EIP_191:return"SIGN_MODE_EIP_191";default:return"UNKNOWN"}}function c(){return{signatures:[]}}function p(){return{publicKey:void 0,data:void 0,sequence:"0"}}function f(){return{single:void 0,multi:void 0}}function h(){return{mode:0,signature:new Uint8Array}}function g(){return{bitarray:void 0,signatures:[]}}t.protobufPackage="cosmos.tx.signing.v1beta1",function(e){e[e.SIGN_MODE_UNSPECIFIED=0]="SIGN_MODE_UNSPECIFIED",e[e.SIGN_MODE_DIRECT=1]="SIGN_MODE_DIRECT",e[e.SIGN_MODE_TEXTUAL=2]="SIGN_MODE_TEXTUAL",e[e.SIGN_MODE_DIRECT_AUX=3]="SIGN_MODE_DIRECT_AUX",e[e.SIGN_MODE_LEGACY_AMINO_JSON=127]="SIGN_MODE_LEGACY_AMINO_JSON",e[e.SIGN_MODE_EIP_191=191]="SIGN_MODE_EIP_191",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(n=t.SignMode||(t.SignMode={})),t.signModeFromJSON=u,t.signModeToJSON=d,t.SignatureDescriptors={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();for(let n of e.signatures)t.SignatureDescriptor.encode(n,r.uint32(10).fork()).ldelim();return r},decode(e,r){let n=e instanceof a.default.Reader?e:new a.default.Reader(e),i=void 0===r?n.len:n.pos+r,o=c();for(;n.pos>>3==1?o.signatures.push(t.SignatureDescriptor.decode(n,n.uint32())):n.skipType(7&e)}return o},fromJSON:e=>({signatures:Array.isArray(null==e?void 0:e.signatures)?e.signatures.map(e=>t.SignatureDescriptor.fromJSON(e)):[]}),toJSON(e){let r={};return e.signatures?r.signatures=e.signatures.map(e=>e?t.SignatureDescriptor.toJSON(e):void 0):r.signatures=[],r},fromPartial(e){var r;let n=c();return n.signatures=(null===(r=e.signatures)||void 0===r?void 0:r.map(e=>t.SignatureDescriptor.fromPartial(e)))||[],n}},t.SignatureDescriptor={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();return void 0!==e.publicKey&&s.Any.encode(e.publicKey,r.uint32(10).fork()).ldelim(),void 0!==e.data&&t.SignatureDescriptor_Data.encode(e.data,r.uint32(18).fork()).ldelim(),"0"!==e.sequence&&r.uint32(24).uint64(e.sequence),r},decode(e,r){let n=e instanceof a.default.Reader?e:new a.default.Reader(e),i=void 0===r?n.len:n.pos+r,o=p();for(;n.pos>>3){case 1:o.publicKey=s.Any.decode(n,n.uint32());break;case 2:o.data=t.SignatureDescriptor_Data.decode(n,n.uint32());break;case 3:o.sequence=w(n.uint64());break;default:n.skipType(7&e)}}return o},fromJSON:e=>({publicKey:_(e.publicKey)?s.Any.fromJSON(e.publicKey):void 0,data:_(e.data)?t.SignatureDescriptor_Data.fromJSON(e.data):void 0,sequence:_(e.sequence)?String(e.sequence):"0"}),toJSON(e){let r={};return void 0!==e.publicKey&&(r.publicKey=e.publicKey?s.Any.toJSON(e.publicKey):void 0),void 0!==e.data&&(r.data=e.data?t.SignatureDescriptor_Data.toJSON(e.data):void 0),void 0!==e.sequence&&(r.sequence=e.sequence),r},fromPartial(e){var r;let n=p();return n.publicKey=void 0!==e.publicKey&&null!==e.publicKey?s.Any.fromPartial(e.publicKey):void 0,n.data=void 0!==e.data&&null!==e.data?t.SignatureDescriptor_Data.fromPartial(e.data):void 0,n.sequence=null!==(r=e.sequence)&&void 0!==r?r:"0",n}},t.SignatureDescriptor_Data={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();return void 0!==e.single&&t.SignatureDescriptor_Data_Single.encode(e.single,r.uint32(10).fork()).ldelim(),void 0!==e.multi&&t.SignatureDescriptor_Data_Multi.encode(e.multi,r.uint32(18).fork()).ldelim(),r},decode(e,r){let n=e instanceof a.default.Reader?e:new a.default.Reader(e),i=void 0===r?n.len:n.pos+r,o=f();for(;n.pos>>3){case 1:o.single=t.SignatureDescriptor_Data_Single.decode(n,n.uint32());break;case 2:o.multi=t.SignatureDescriptor_Data_Multi.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON:e=>({single:_(e.single)?t.SignatureDescriptor_Data_Single.fromJSON(e.single):void 0,multi:_(e.multi)?t.SignatureDescriptor_Data_Multi.fromJSON(e.multi):void 0}),toJSON(e){let r={};return void 0!==e.single&&(r.single=e.single?t.SignatureDescriptor_Data_Single.toJSON(e.single):void 0),void 0!==e.multi&&(r.multi=e.multi?t.SignatureDescriptor_Data_Multi.toJSON(e.multi):void 0),r},fromPartial(e){let r=f();return r.single=void 0!==e.single&&null!==e.single?t.SignatureDescriptor_Data_Single.fromPartial(e.single):void 0,r.multi=void 0!==e.multi&&null!==e.multi?t.SignatureDescriptor_Data_Multi.fromPartial(e.multi):void 0,r}},t.SignatureDescriptor_Data_Single={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();return 0!==e.mode&&t.uint32(8).int32(e.mode),0!==e.signature.length&&t.uint32(18).bytes(e.signature),t},decode(e,t){let r=e instanceof a.default.Reader?e:new a.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=h();for(;r.pos>>3){case 1:i.mode=r.int32();break;case 2:i.signature=r.bytes();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({mode:_(e.mode)?u(e.mode):0,signature:_(e.signature)?v(e.signature):new Uint8Array}),toJSON(e){let t={};return void 0!==e.mode&&(t.mode=d(e.mode)),void 0!==e.signature&&(t.signature=S(void 0!==e.signature?e.signature:new Uint8Array)),t},fromPartial(e){var t,r;let n=h();return n.mode=null!==(t=e.mode)&&void 0!==t?t:0,n.signature=null!==(r=e.signature)&&void 0!==r?r:new Uint8Array,n}},t.SignatureDescriptor_Data_Multi={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();for(let n of(void 0!==e.bitarray&&l.CompactBitArray.encode(e.bitarray,r.uint32(10).fork()).ldelim(),e.signatures))t.SignatureDescriptor_Data.encode(n,r.uint32(18).fork()).ldelim();return r},decode(e,r){let n=e instanceof a.default.Reader?e:new a.default.Reader(e),i=void 0===r?n.len:n.pos+r,o=g();for(;n.pos>>3){case 1:o.bitarray=l.CompactBitArray.decode(n,n.uint32());break;case 2:o.signatures.push(t.SignatureDescriptor_Data.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return o},fromJSON:e=>({bitarray:_(e.bitarray)?l.CompactBitArray.fromJSON(e.bitarray):void 0,signatures:Array.isArray(null==e?void 0:e.signatures)?e.signatures.map(e=>t.SignatureDescriptor_Data.fromJSON(e)):[]}),toJSON(e){let r={};return void 0!==e.bitarray&&(r.bitarray=e.bitarray?l.CompactBitArray.toJSON(e.bitarray):void 0),e.signatures?r.signatures=e.signatures.map(e=>e?t.SignatureDescriptor_Data.toJSON(e):void 0):r.signatures=[],r},fromPartial(e){var r;let n=g();return n.bitarray=void 0!==e.bitarray&&null!==e.bitarray?l.CompactBitArray.fromPartial(e.bitarray):void 0,n.signatures=(null===(r=e.signatures)||void 0===r?void 0:r.map(e=>t.SignatureDescriptor_Data.fromPartial(e)))||[],n}};var m=void 0!==m?m:"undefined"!=typeof self?self:window;let y=m.atob||(e=>m.Buffer.from(e,"base64").toString("binary"));function v(e){let t=y(e),r=new Uint8Array(t.length);for(let e=0;em.Buffer.from(e,"binary").toString("base64"));function S(e){let t=[];for(let r of e)t.push(String.fromCharCode(r));return b(t.join(""))}function w(e){return e.toString()}function _(e){return null!=e}a.default.util.Long!==o.default&&(a.default.util.Long=o.default,a.default.configure())},55618:function(e,t,r){"use strict";var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.AuxSignerData=t.Fee=t.ModeInfo_Multi=t.ModeInfo_Single=t.ModeInfo=t.SignerInfo=t.AuthInfo=t.TxBody=t.SignDocDirectAux=t.SignDoc=t.TxRaw=t.Tx=t.protobufPackage=void 0;let i=n(r(40059)),o=n(r(81667)),a=r(99402),s=r(28446),l=r(61097),u=r(80054);function d(){return{body:void 0,authInfo:void 0,signatures:[]}}function c(){return{bodyBytes:new Uint8Array,authInfoBytes:new Uint8Array,signatures:[]}}function p(){return{bodyBytes:new Uint8Array,authInfoBytes:new Uint8Array,chainId:"",accountNumber:"0"}}function f(){return{bodyBytes:new Uint8Array,publicKey:void 0,chainId:"",accountNumber:"0",sequence:"0"}}function h(){return{messages:[],memo:"",timeoutHeight:"0",extensionOptions:[],nonCriticalExtensionOptions:[]}}function g(){return{signerInfos:[],fee:void 0}}function m(){return{publicKey:void 0,modeInfo:void 0,sequence:"0"}}function y(){return{single:void 0,multi:void 0}}function v(){return{mode:0}}function b(){return{bitarray:void 0,modeInfos:[]}}function S(){return{amount:[],gasLimit:"0",payer:"",granter:""}}function w(){return{address:"",signDoc:void 0,mode:0,sig:new Uint8Array}}t.protobufPackage="cosmos.tx.v1beta1",t.Tx={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();for(let n of(void 0!==e.body&&t.TxBody.encode(e.body,r.uint32(10).fork()).ldelim(),void 0!==e.authInfo&&t.AuthInfo.encode(e.authInfo,r.uint32(18).fork()).ldelim(),e.signatures))r.uint32(26).bytes(n);return r},decode(e,r){let n=e instanceof o.default.Reader?e:new o.default.Reader(e),i=void 0===r?n.len:n.pos+r,a=d();for(;n.pos>>3){case 1:a.body=t.TxBody.decode(n,n.uint32());break;case 2:a.authInfo=t.AuthInfo.decode(n,n.uint32());break;case 3:a.signatures.push(n.bytes());break;default:n.skipType(7&e)}}return a},fromJSON:e=>({body:R(e.body)?t.TxBody.fromJSON(e.body):void 0,authInfo:R(e.authInfo)?t.AuthInfo.fromJSON(e.authInfo):void 0,signatures:Array.isArray(null==e?void 0:e.signatures)?e.signatures.map(e=>O(e)):[]}),toJSON(e){let r={};return void 0!==e.body&&(r.body=e.body?t.TxBody.toJSON(e.body):void 0),void 0!==e.authInfo&&(r.authInfo=e.authInfo?t.AuthInfo.toJSON(e.authInfo):void 0),e.signatures?r.signatures=e.signatures.map(e=>A(void 0!==e?e:new Uint8Array)):r.signatures=[],r},fromPartial(e){var r;let n=d();return n.body=void 0!==e.body&&null!==e.body?t.TxBody.fromPartial(e.body):void 0,n.authInfo=void 0!==e.authInfo&&null!==e.authInfo?t.AuthInfo.fromPartial(e.authInfo):void 0,n.signatures=(null===(r=e.signatures)||void 0===r?void 0:r.map(e=>e))||[],n}},t.TxRaw={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();for(let r of(0!==e.bodyBytes.length&&t.uint32(10).bytes(e.bodyBytes),0!==e.authInfoBytes.length&&t.uint32(18).bytes(e.authInfoBytes),e.signatures))t.uint32(26).bytes(r);return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=c();for(;r.pos>>3){case 1:i.bodyBytes=r.bytes();break;case 2:i.authInfoBytes=r.bytes();break;case 3:i.signatures.push(r.bytes());break;default:r.skipType(7&e)}}return i},fromJSON:e=>({bodyBytes:R(e.bodyBytes)?O(e.bodyBytes):new Uint8Array,authInfoBytes:R(e.authInfoBytes)?O(e.authInfoBytes):new Uint8Array,signatures:Array.isArray(null==e?void 0:e.signatures)?e.signatures.map(e=>O(e)):[]}),toJSON(e){let t={};return void 0!==e.bodyBytes&&(t.bodyBytes=A(void 0!==e.bodyBytes?e.bodyBytes:new Uint8Array)),void 0!==e.authInfoBytes&&(t.authInfoBytes=A(void 0!==e.authInfoBytes?e.authInfoBytes:new Uint8Array)),e.signatures?t.signatures=e.signatures.map(e=>A(void 0!==e?e:new Uint8Array)):t.signatures=[],t},fromPartial(e){var t,r,n;let i=c();return i.bodyBytes=null!==(t=e.bodyBytes)&&void 0!==t?t:new Uint8Array,i.authInfoBytes=null!==(r=e.authInfoBytes)&&void 0!==r?r:new Uint8Array,i.signatures=(null===(n=e.signatures)||void 0===n?void 0:n.map(e=>e))||[],i}},t.SignDoc={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return 0!==e.bodyBytes.length&&t.uint32(10).bytes(e.bodyBytes),0!==e.authInfoBytes.length&&t.uint32(18).bytes(e.authInfoBytes),""!==e.chainId&&t.uint32(26).string(e.chainId),"0"!==e.accountNumber&&t.uint32(32).uint64(e.accountNumber),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=p();for(;r.pos>>3){case 1:i.bodyBytes=r.bytes();break;case 2:i.authInfoBytes=r.bytes();break;case 3:i.chainId=r.string();break;case 4:i.accountNumber=I(r.uint64());break;default:r.skipType(7&e)}}return i},fromJSON:e=>({bodyBytes:R(e.bodyBytes)?O(e.bodyBytes):new Uint8Array,authInfoBytes:R(e.authInfoBytes)?O(e.authInfoBytes):new Uint8Array,chainId:R(e.chainId)?String(e.chainId):"",accountNumber:R(e.accountNumber)?String(e.accountNumber):"0"}),toJSON(e){let t={};return void 0!==e.bodyBytes&&(t.bodyBytes=A(void 0!==e.bodyBytes?e.bodyBytes:new Uint8Array)),void 0!==e.authInfoBytes&&(t.authInfoBytes=A(void 0!==e.authInfoBytes?e.authInfoBytes:new Uint8Array)),void 0!==e.chainId&&(t.chainId=e.chainId),void 0!==e.accountNumber&&(t.accountNumber=e.accountNumber),t},fromPartial(e){var t,r,n,i;let o=p();return o.bodyBytes=null!==(t=e.bodyBytes)&&void 0!==t?t:new Uint8Array,o.authInfoBytes=null!==(r=e.authInfoBytes)&&void 0!==r?r:new Uint8Array,o.chainId=null!==(n=e.chainId)&&void 0!==n?n:"",o.accountNumber=null!==(i=e.accountNumber)&&void 0!==i?i:"0",o}},t.SignDocDirectAux={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return 0!==e.bodyBytes.length&&t.uint32(10).bytes(e.bodyBytes),void 0!==e.publicKey&&s.Any.encode(e.publicKey,t.uint32(18).fork()).ldelim(),""!==e.chainId&&t.uint32(26).string(e.chainId),"0"!==e.accountNumber&&t.uint32(32).uint64(e.accountNumber),"0"!==e.sequence&&t.uint32(40).uint64(e.sequence),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=f();for(;r.pos>>3){case 1:i.bodyBytes=r.bytes();break;case 2:i.publicKey=s.Any.decode(r,r.uint32());break;case 3:i.chainId=r.string();break;case 4:i.accountNumber=I(r.uint64());break;case 5:i.sequence=I(r.uint64());break;default:r.skipType(7&e)}}return i},fromJSON:e=>({bodyBytes:R(e.bodyBytes)?O(e.bodyBytes):new Uint8Array,publicKey:R(e.publicKey)?s.Any.fromJSON(e.publicKey):void 0,chainId:R(e.chainId)?String(e.chainId):"",accountNumber:R(e.accountNumber)?String(e.accountNumber):"0",sequence:R(e.sequence)?String(e.sequence):"0"}),toJSON(e){let t={};return void 0!==e.bodyBytes&&(t.bodyBytes=A(void 0!==e.bodyBytes?e.bodyBytes:new Uint8Array)),void 0!==e.publicKey&&(t.publicKey=e.publicKey?s.Any.toJSON(e.publicKey):void 0),void 0!==e.chainId&&(t.chainId=e.chainId),void 0!==e.accountNumber&&(t.accountNumber=e.accountNumber),void 0!==e.sequence&&(t.sequence=e.sequence),t},fromPartial(e){var t,r,n,i;let o=f();return o.bodyBytes=null!==(t=e.bodyBytes)&&void 0!==t?t:new Uint8Array,o.publicKey=void 0!==e.publicKey&&null!==e.publicKey?s.Any.fromPartial(e.publicKey):void 0,o.chainId=null!==(r=e.chainId)&&void 0!==r?r:"",o.accountNumber=null!==(n=e.accountNumber)&&void 0!==n?n:"0",o.sequence=null!==(i=e.sequence)&&void 0!==i?i:"0",o}},t.TxBody={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();for(let r of e.messages)s.Any.encode(r,t.uint32(10).fork()).ldelim();for(let r of(""!==e.memo&&t.uint32(18).string(e.memo),"0"!==e.timeoutHeight&&t.uint32(24).uint64(e.timeoutHeight),e.extensionOptions))s.Any.encode(r,t.uint32(8186).fork()).ldelim();for(let r of e.nonCriticalExtensionOptions)s.Any.encode(r,t.uint32(16378).fork()).ldelim();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=h();for(;r.pos>>3){case 1:i.messages.push(s.Any.decode(r,r.uint32()));break;case 2:i.memo=r.string();break;case 3:i.timeoutHeight=I(r.uint64());break;case 1023:i.extensionOptions.push(s.Any.decode(r,r.uint32()));break;case 2047:i.nonCriticalExtensionOptions.push(s.Any.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return i},fromJSON:e=>({messages:Array.isArray(null==e?void 0:e.messages)?e.messages.map(e=>s.Any.fromJSON(e)):[],memo:R(e.memo)?String(e.memo):"",timeoutHeight:R(e.timeoutHeight)?String(e.timeoutHeight):"0",extensionOptions:Array.isArray(null==e?void 0:e.extensionOptions)?e.extensionOptions.map(e=>s.Any.fromJSON(e)):[],nonCriticalExtensionOptions:Array.isArray(null==e?void 0:e.nonCriticalExtensionOptions)?e.nonCriticalExtensionOptions.map(e=>s.Any.fromJSON(e)):[]}),toJSON(e){let t={};return e.messages?t.messages=e.messages.map(e=>e?s.Any.toJSON(e):void 0):t.messages=[],void 0!==e.memo&&(t.memo=e.memo),void 0!==e.timeoutHeight&&(t.timeoutHeight=e.timeoutHeight),e.extensionOptions?t.extensionOptions=e.extensionOptions.map(e=>e?s.Any.toJSON(e):void 0):t.extensionOptions=[],e.nonCriticalExtensionOptions?t.nonCriticalExtensionOptions=e.nonCriticalExtensionOptions.map(e=>e?s.Any.toJSON(e):void 0):t.nonCriticalExtensionOptions=[],t},fromPartial(e){var t,r,n,i,o;let a=h();return a.messages=(null===(t=e.messages)||void 0===t?void 0:t.map(e=>s.Any.fromPartial(e)))||[],a.memo=null!==(r=e.memo)&&void 0!==r?r:"",a.timeoutHeight=null!==(n=e.timeoutHeight)&&void 0!==n?n:"0",a.extensionOptions=(null===(i=e.extensionOptions)||void 0===i?void 0:i.map(e=>s.Any.fromPartial(e)))||[],a.nonCriticalExtensionOptions=(null===(o=e.nonCriticalExtensionOptions)||void 0===o?void 0:o.map(e=>s.Any.fromPartial(e)))||[],a}},t.AuthInfo={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();for(let n of e.signerInfos)t.SignerInfo.encode(n,r.uint32(10).fork()).ldelim();return void 0!==e.fee&&t.Fee.encode(e.fee,r.uint32(18).fork()).ldelim(),r},decode(e,r){let n=e instanceof o.default.Reader?e:new o.default.Reader(e),i=void 0===r?n.len:n.pos+r,a=g();for(;n.pos>>3){case 1:a.signerInfos.push(t.SignerInfo.decode(n,n.uint32()));break;case 2:a.fee=t.Fee.decode(n,n.uint32());break;default:n.skipType(7&e)}}return a},fromJSON:e=>({signerInfos:Array.isArray(null==e?void 0:e.signerInfos)?e.signerInfos.map(e=>t.SignerInfo.fromJSON(e)):[],fee:R(e.fee)?t.Fee.fromJSON(e.fee):void 0}),toJSON(e){let r={};return e.signerInfos?r.signerInfos=e.signerInfos.map(e=>e?t.SignerInfo.toJSON(e):void 0):r.signerInfos=[],void 0!==e.fee&&(r.fee=e.fee?t.Fee.toJSON(e.fee):void 0),r},fromPartial(e){var r;let n=g();return n.signerInfos=(null===(r=e.signerInfos)||void 0===r?void 0:r.map(e=>t.SignerInfo.fromPartial(e)))||[],n.fee=void 0!==e.fee&&null!==e.fee?t.Fee.fromPartial(e.fee):void 0,n}},t.SignerInfo={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return void 0!==e.publicKey&&s.Any.encode(e.publicKey,r.uint32(10).fork()).ldelim(),void 0!==e.modeInfo&&t.ModeInfo.encode(e.modeInfo,r.uint32(18).fork()).ldelim(),"0"!==e.sequence&&r.uint32(24).uint64(e.sequence),r},decode(e,r){let n=e instanceof o.default.Reader?e:new o.default.Reader(e),i=void 0===r?n.len:n.pos+r,a=m();for(;n.pos>>3){case 1:a.publicKey=s.Any.decode(n,n.uint32());break;case 2:a.modeInfo=t.ModeInfo.decode(n,n.uint32());break;case 3:a.sequence=I(n.uint64());break;default:n.skipType(7&e)}}return a},fromJSON:e=>({publicKey:R(e.publicKey)?s.Any.fromJSON(e.publicKey):void 0,modeInfo:R(e.modeInfo)?t.ModeInfo.fromJSON(e.modeInfo):void 0,sequence:R(e.sequence)?String(e.sequence):"0"}),toJSON(e){let r={};return void 0!==e.publicKey&&(r.publicKey=e.publicKey?s.Any.toJSON(e.publicKey):void 0),void 0!==e.modeInfo&&(r.modeInfo=e.modeInfo?t.ModeInfo.toJSON(e.modeInfo):void 0),void 0!==e.sequence&&(r.sequence=e.sequence),r},fromPartial(e){var r;let n=m();return n.publicKey=void 0!==e.publicKey&&null!==e.publicKey?s.Any.fromPartial(e.publicKey):void 0,n.modeInfo=void 0!==e.modeInfo&&null!==e.modeInfo?t.ModeInfo.fromPartial(e.modeInfo):void 0,n.sequence=null!==(r=e.sequence)&&void 0!==r?r:"0",n}},t.ModeInfo={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return void 0!==e.single&&t.ModeInfo_Single.encode(e.single,r.uint32(10).fork()).ldelim(),void 0!==e.multi&&t.ModeInfo_Multi.encode(e.multi,r.uint32(18).fork()).ldelim(),r},decode(e,r){let n=e instanceof o.default.Reader?e:new o.default.Reader(e),i=void 0===r?n.len:n.pos+r,a=y();for(;n.pos>>3){case 1:a.single=t.ModeInfo_Single.decode(n,n.uint32());break;case 2:a.multi=t.ModeInfo_Multi.decode(n,n.uint32());break;default:n.skipType(7&e)}}return a},fromJSON:e=>({single:R(e.single)?t.ModeInfo_Single.fromJSON(e.single):void 0,multi:R(e.multi)?t.ModeInfo_Multi.fromJSON(e.multi):void 0}),toJSON(e){let r={};return void 0!==e.single&&(r.single=e.single?t.ModeInfo_Single.toJSON(e.single):void 0),void 0!==e.multi&&(r.multi=e.multi?t.ModeInfo_Multi.toJSON(e.multi):void 0),r},fromPartial(e){let r=y();return r.single=void 0!==e.single&&null!==e.single?t.ModeInfo_Single.fromPartial(e.single):void 0,r.multi=void 0!==e.multi&&null!==e.multi?t.ModeInfo_Multi.fromPartial(e.multi):void 0,r}},t.ModeInfo_Single={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return 0!==e.mode&&t.uint32(8).int32(e.mode),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=v();for(;r.pos>>3==1?i.mode=r.int32():r.skipType(7&e)}return i},fromJSON:e=>({mode:R(e.mode)?(0,a.signModeFromJSON)(e.mode):0}),toJSON(e){let t={};return void 0!==e.mode&&(t.mode=(0,a.signModeToJSON)(e.mode)),t},fromPartial(e){var t;let r=v();return r.mode=null!==(t=e.mode)&&void 0!==t?t:0,r}},t.ModeInfo_Multi={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();for(let n of(void 0!==e.bitarray&&l.CompactBitArray.encode(e.bitarray,r.uint32(10).fork()).ldelim(),e.modeInfos))t.ModeInfo.encode(n,r.uint32(18).fork()).ldelim();return r},decode(e,r){let n=e instanceof o.default.Reader?e:new o.default.Reader(e),i=void 0===r?n.len:n.pos+r,a=b();for(;n.pos>>3){case 1:a.bitarray=l.CompactBitArray.decode(n,n.uint32());break;case 2:a.modeInfos.push(t.ModeInfo.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return a},fromJSON:e=>({bitarray:R(e.bitarray)?l.CompactBitArray.fromJSON(e.bitarray):void 0,modeInfos:Array.isArray(null==e?void 0:e.modeInfos)?e.modeInfos.map(e=>t.ModeInfo.fromJSON(e)):[]}),toJSON(e){let r={};return void 0!==e.bitarray&&(r.bitarray=e.bitarray?l.CompactBitArray.toJSON(e.bitarray):void 0),e.modeInfos?r.modeInfos=e.modeInfos.map(e=>e?t.ModeInfo.toJSON(e):void 0):r.modeInfos=[],r},fromPartial(e){var r;let n=b();return n.bitarray=void 0!==e.bitarray&&null!==e.bitarray?l.CompactBitArray.fromPartial(e.bitarray):void 0,n.modeInfos=(null===(r=e.modeInfos)||void 0===r?void 0:r.map(e=>t.ModeInfo.fromPartial(e)))||[],n}},t.Fee={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();for(let r of e.amount)u.Coin.encode(r,t.uint32(10).fork()).ldelim();return"0"!==e.gasLimit&&t.uint32(16).uint64(e.gasLimit),""!==e.payer&&t.uint32(26).string(e.payer),""!==e.granter&&t.uint32(34).string(e.granter),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=S();for(;r.pos>>3){case 1:i.amount.push(u.Coin.decode(r,r.uint32()));break;case 2:i.gasLimit=I(r.uint64());break;case 3:i.payer=r.string();break;case 4:i.granter=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({amount:Array.isArray(null==e?void 0:e.amount)?e.amount.map(e=>u.Coin.fromJSON(e)):[],gasLimit:R(e.gasLimit)?String(e.gasLimit):"0",payer:R(e.payer)?String(e.payer):"",granter:R(e.granter)?String(e.granter):""}),toJSON(e){let t={};return e.amount?t.amount=e.amount.map(e=>e?u.Coin.toJSON(e):void 0):t.amount=[],void 0!==e.gasLimit&&(t.gasLimit=e.gasLimit),void 0!==e.payer&&(t.payer=e.payer),void 0!==e.granter&&(t.granter=e.granter),t},fromPartial(e){var t,r,n,i;let o=S();return o.amount=(null===(t=e.amount)||void 0===t?void 0:t.map(e=>u.Coin.fromPartial(e)))||[],o.gasLimit=null!==(r=e.gasLimit)&&void 0!==r?r:"0",o.payer=null!==(n=e.payer)&&void 0!==n?n:"",o.granter=null!==(i=e.granter)&&void 0!==i?i:"",o}},t.AuxSignerData={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.address&&r.uint32(10).string(e.address),void 0!==e.signDoc&&t.SignDocDirectAux.encode(e.signDoc,r.uint32(18).fork()).ldelim(),0!==e.mode&&r.uint32(24).int32(e.mode),0!==e.sig.length&&r.uint32(34).bytes(e.sig),r},decode(e,r){let n=e instanceof o.default.Reader?e:new o.default.Reader(e),i=void 0===r?n.len:n.pos+r,a=w();for(;n.pos>>3){case 1:a.address=n.string();break;case 2:a.signDoc=t.SignDocDirectAux.decode(n,n.uint32());break;case 3:a.mode=n.int32();break;case 4:a.sig=n.bytes();break;default:n.skipType(7&e)}}return a},fromJSON:e=>({address:R(e.address)?String(e.address):"",signDoc:R(e.signDoc)?t.SignDocDirectAux.fromJSON(e.signDoc):void 0,mode:R(e.mode)?(0,a.signModeFromJSON)(e.mode):0,sig:R(e.sig)?O(e.sig):new Uint8Array}),toJSON(e){let r={};return void 0!==e.address&&(r.address=e.address),void 0!==e.signDoc&&(r.signDoc=e.signDoc?t.SignDocDirectAux.toJSON(e.signDoc):void 0),void 0!==e.mode&&(r.mode=(0,a.signModeToJSON)(e.mode)),void 0!==e.sig&&(r.sig=A(void 0!==e.sig?e.sig:new Uint8Array)),r},fromPartial(e){var r,n,i;let o=w();return o.address=null!==(r=e.address)&&void 0!==r?r:"",o.signDoc=void 0!==e.signDoc&&null!==e.signDoc?t.SignDocDirectAux.fromPartial(e.signDoc):void 0,o.mode=null!==(n=e.mode)&&void 0!==n?n:0,o.sig=null!==(i=e.sig)&&void 0!==i?i:new Uint8Array,o}};var _=void 0!==_?_:"undefined"!=typeof self?self:window;let k=_.atob||(e=>_.Buffer.from(e,"base64").toString("binary"));function O(e){let t=k(e),r=new Uint8Array(t.length);for(let e=0;e_.Buffer.from(e,"binary").toString("base64"));function A(e){let t=[];for(let r of e)t.push(String.fromCharCode(r));return P(t.join(""))}function I(e){return e.toString()}function R(e){return null!=e}o.default.util.Long!==i.default&&(o.default.util.Long=i.default,o.default.configure())},94464:function(e,t,r){"use strict";var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ModuleVersion=t.CancelSoftwareUpgradeProposal=t.SoftwareUpgradeProposal=t.Plan=t.protobufPackage=void 0;let i=n(r(40059)),o=n(r(81667)),a=r(90338),s=r(28446);function l(){return{name:"",time:void 0,height:"0",info:"",upgradedClientState:void 0}}function u(){return{title:"",description:"",plan:void 0}}function d(){return{title:"",description:""}}function c(){return{name:"",version:"0"}}function p(e){return{seconds:Math.trunc(e.getTime()/1e3).toString(),nanos:e.getTime()%1e3*1e6}}function f(e){let t=1e3*Number(e.seconds);return new Date(t+=e.nanos/1e6)}function h(e){return e instanceof Date?e:"string"==typeof e?new Date(e):f(a.Timestamp.fromJSON(e))}function g(e){return e.toString()}function m(e){return null!=e}t.protobufPackage="cosmos.upgrade.v1beta1",t.Plan={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.name&&t.uint32(10).string(e.name),void 0!==e.time&&a.Timestamp.encode(p(e.time),t.uint32(18).fork()).ldelim(),"0"!==e.height&&t.uint32(24).int64(e.height),""!==e.info&&t.uint32(34).string(e.info),void 0!==e.upgradedClientState&&s.Any.encode(e.upgradedClientState,t.uint32(42).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=l();for(;r.pos>>3){case 1:i.name=r.string();break;case 2:i.time=f(a.Timestamp.decode(r,r.uint32()));break;case 3:i.height=g(r.int64());break;case 4:i.info=r.string();break;case 5:i.upgradedClientState=s.Any.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON:e=>({name:m(e.name)?String(e.name):"",time:m(e.time)?h(e.time):void 0,height:m(e.height)?String(e.height):"0",info:m(e.info)?String(e.info):"",upgradedClientState:m(e.upgradedClientState)?s.Any.fromJSON(e.upgradedClientState):void 0}),toJSON(e){let t={};return void 0!==e.name&&(t.name=e.name),void 0!==e.time&&(t.time=e.time.toISOString()),void 0!==e.height&&(t.height=e.height),void 0!==e.info&&(t.info=e.info),void 0!==e.upgradedClientState&&(t.upgradedClientState=e.upgradedClientState?s.Any.toJSON(e.upgradedClientState):void 0),t},fromPartial(e){var t,r,n,i;let o=l();return o.name=null!==(t=e.name)&&void 0!==t?t:"",o.time=null!==(r=e.time)&&void 0!==r?r:void 0,o.height=null!==(n=e.height)&&void 0!==n?n:"0",o.info=null!==(i=e.info)&&void 0!==i?i:"",o.upgradedClientState=void 0!==e.upgradedClientState&&null!==e.upgradedClientState?s.Any.fromPartial(e.upgradedClientState):void 0,o}},t.SoftwareUpgradeProposal={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.title&&r.uint32(10).string(e.title),""!==e.description&&r.uint32(18).string(e.description),void 0!==e.plan&&t.Plan.encode(e.plan,r.uint32(26).fork()).ldelim(),r},decode(e,r){let n=e instanceof o.default.Reader?e:new o.default.Reader(e),i=void 0===r?n.len:n.pos+r,a=u();for(;n.pos>>3){case 1:a.title=n.string();break;case 2:a.description=n.string();break;case 3:a.plan=t.Plan.decode(n,n.uint32());break;default:n.skipType(7&e)}}return a},fromJSON:e=>({title:m(e.title)?String(e.title):"",description:m(e.description)?String(e.description):"",plan:m(e.plan)?t.Plan.fromJSON(e.plan):void 0}),toJSON(e){let r={};return void 0!==e.title&&(r.title=e.title),void 0!==e.description&&(r.description=e.description),void 0!==e.plan&&(r.plan=e.plan?t.Plan.toJSON(e.plan):void 0),r},fromPartial(e){var r,n;let i=u();return i.title=null!==(r=e.title)&&void 0!==r?r:"",i.description=null!==(n=e.description)&&void 0!==n?n:"",i.plan=void 0!==e.plan&&null!==e.plan?t.Plan.fromPartial(e.plan):void 0,i}},t.CancelSoftwareUpgradeProposal={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.title&&t.uint32(10).string(e.title),""!==e.description&&t.uint32(18).string(e.description),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=d();for(;r.pos>>3){case 1:i.title=r.string();break;case 2:i.description=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({title:m(e.title)?String(e.title):"",description:m(e.description)?String(e.description):""}),toJSON(e){let t={};return void 0!==e.title&&(t.title=e.title),void 0!==e.description&&(t.description=e.description),t},fromPartial(e){var t,r;let n=d();return n.title=null!==(t=e.title)&&void 0!==t?t:"",n.description=null!==(r=e.description)&&void 0!==r?r:"",n}},t.ModuleVersion={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.name&&t.uint32(10).string(e.name),"0"!==e.version&&t.uint32(16).uint64(e.version),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=c();for(;r.pos>>3){case 1:i.name=r.string();break;case 2:i.version=g(r.uint64());break;default:r.skipType(7&e)}}return i},fromJSON:e=>({name:m(e.name)?String(e.name):"",version:m(e.version)?String(e.version):"0"}),toJSON(e){let t={};return void 0!==e.name&&(t.name=e.name),void 0!==e.version&&(t.version=e.version),t},fromPartial(e){var t,r;let n=c();return n.name=null!==(t=e.name)&&void 0!==t?t:"",n.version=null!==(r=e.version)&&void 0!==r?r:"0",n}},o.default.util.Long!==i.default&&(o.default.util.Long=i.default,o.default.configure())},77398:function(e,t,r){"use strict";var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MsgClearAdminResponse=t.MsgClearAdmin=t.MsgUpdateAdminResponse=t.MsgUpdateAdmin=t.MsgMigrateContractResponse=t.MsgMigrateContract=t.MsgExecuteContractResponse=t.MsgExecuteContract=t.MsgInstantiateContractResponse=t.MsgInstantiateContract=t.MsgStoreCodeResponse=t.MsgStoreCode=t.protobufPackage=void 0;let i=n(r(40059)),o=n(r(81667)),a=r(40747),s=r(80054);function l(){return{sender:"",wasmByteCode:new Uint8Array,instantiatePermission:void 0}}function u(){return{codeId:"0"}}function d(){return{sender:"",admin:"",codeId:"0",label:"",msg:new Uint8Array,funds:[]}}function c(){return{address:"",data:new Uint8Array}}function p(){return{sender:"",contract:"",msg:new Uint8Array,funds:[]}}function f(){return{data:new Uint8Array}}function h(){return{sender:"",contract:"",codeId:"0",msg:new Uint8Array}}function g(){return{data:new Uint8Array}}function m(){return{sender:"",newAdmin:"",contract:""}}function y(){return{}}function v(){return{sender:"",contract:""}}function b(){return{}}t.protobufPackage="cosmwasm.wasm.v1",t.MsgStoreCode={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.sender&&t.uint32(10).string(e.sender),0!==e.wasmByteCode.length&&t.uint32(18).bytes(e.wasmByteCode),void 0!==e.instantiatePermission&&a.AccessConfig.encode(e.instantiatePermission,t.uint32(42).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=l();for(;r.pos>>3){case 1:i.sender=r.string();break;case 2:i.wasmByteCode=r.bytes();break;case 5:i.instantiatePermission=a.AccessConfig.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON:e=>({sender:A(e.sender)?String(e.sender):"",wasmByteCode:A(e.wasmByteCode)?_(e.wasmByteCode):new Uint8Array,instantiatePermission:A(e.instantiatePermission)?a.AccessConfig.fromJSON(e.instantiatePermission):void 0}),toJSON(e){let t={};return void 0!==e.sender&&(t.sender=e.sender),void 0!==e.wasmByteCode&&(t.wasmByteCode=O(void 0!==e.wasmByteCode?e.wasmByteCode:new Uint8Array)),void 0!==e.instantiatePermission&&(t.instantiatePermission=e.instantiatePermission?a.AccessConfig.toJSON(e.instantiatePermission):void 0),t},fromPartial(e){var t,r;let n=l();return n.sender=null!==(t=e.sender)&&void 0!==t?t:"",n.wasmByteCode=null!==(r=e.wasmByteCode)&&void 0!==r?r:new Uint8Array,n.instantiatePermission=void 0!==e.instantiatePermission&&null!==e.instantiatePermission?a.AccessConfig.fromPartial(e.instantiatePermission):void 0,n}},t.MsgStoreCodeResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return"0"!==e.codeId&&t.uint32(8).uint64(e.codeId),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=u();for(;r.pos>>3==1?i.codeId=P(r.uint64()):r.skipType(7&e)}return i},fromJSON:e=>({codeId:A(e.codeId)?String(e.codeId):"0"}),toJSON(e){let t={};return void 0!==e.codeId&&(t.codeId=e.codeId),t},fromPartial(e){var t;let r=u();return r.codeId=null!==(t=e.codeId)&&void 0!==t?t:"0",r}},t.MsgInstantiateContract={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();for(let r of(""!==e.sender&&t.uint32(10).string(e.sender),""!==e.admin&&t.uint32(18).string(e.admin),"0"!==e.codeId&&t.uint32(24).uint64(e.codeId),""!==e.label&&t.uint32(34).string(e.label),0!==e.msg.length&&t.uint32(42).bytes(e.msg),e.funds))s.Coin.encode(r,t.uint32(50).fork()).ldelim();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=d();for(;r.pos>>3){case 1:i.sender=r.string();break;case 2:i.admin=r.string();break;case 3:i.codeId=P(r.uint64());break;case 4:i.label=r.string();break;case 5:i.msg=r.bytes();break;case 6:i.funds.push(s.Coin.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return i},fromJSON:e=>({sender:A(e.sender)?String(e.sender):"",admin:A(e.admin)?String(e.admin):"",codeId:A(e.codeId)?String(e.codeId):"0",label:A(e.label)?String(e.label):"",msg:A(e.msg)?_(e.msg):new Uint8Array,funds:Array.isArray(null==e?void 0:e.funds)?e.funds.map(e=>s.Coin.fromJSON(e)):[]}),toJSON(e){let t={};return void 0!==e.sender&&(t.sender=e.sender),void 0!==e.admin&&(t.admin=e.admin),void 0!==e.codeId&&(t.codeId=e.codeId),void 0!==e.label&&(t.label=e.label),void 0!==e.msg&&(t.msg=O(void 0!==e.msg?e.msg:new Uint8Array)),e.funds?t.funds=e.funds.map(e=>e?s.Coin.toJSON(e):void 0):t.funds=[],t},fromPartial(e){var t,r,n,i,o,a;let l=d();return l.sender=null!==(t=e.sender)&&void 0!==t?t:"",l.admin=null!==(r=e.admin)&&void 0!==r?r:"",l.codeId=null!==(n=e.codeId)&&void 0!==n?n:"0",l.label=null!==(i=e.label)&&void 0!==i?i:"",l.msg=null!==(o=e.msg)&&void 0!==o?o:new Uint8Array,l.funds=(null===(a=e.funds)||void 0===a?void 0:a.map(e=>s.Coin.fromPartial(e)))||[],l}},t.MsgInstantiateContractResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.address&&t.uint32(10).string(e.address),0!==e.data.length&&t.uint32(18).bytes(e.data),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=c();for(;r.pos>>3){case 1:i.address=r.string();break;case 2:i.data=r.bytes();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({address:A(e.address)?String(e.address):"",data:A(e.data)?_(e.data):new Uint8Array}),toJSON(e){let t={};return void 0!==e.address&&(t.address=e.address),void 0!==e.data&&(t.data=O(void 0!==e.data?e.data:new Uint8Array)),t},fromPartial(e){var t,r;let n=c();return n.address=null!==(t=e.address)&&void 0!==t?t:"",n.data=null!==(r=e.data)&&void 0!==r?r:new Uint8Array,n}},t.MsgExecuteContract={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();for(let r of(""!==e.sender&&t.uint32(10).string(e.sender),""!==e.contract&&t.uint32(18).string(e.contract),0!==e.msg.length&&t.uint32(26).bytes(e.msg),e.funds))s.Coin.encode(r,t.uint32(42).fork()).ldelim();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=p();for(;r.pos>>3){case 1:i.sender=r.string();break;case 2:i.contract=r.string();break;case 3:i.msg=r.bytes();break;case 5:i.funds.push(s.Coin.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return i},fromJSON:e=>({sender:A(e.sender)?String(e.sender):"",contract:A(e.contract)?String(e.contract):"",msg:A(e.msg)?_(e.msg):new Uint8Array,funds:Array.isArray(null==e?void 0:e.funds)?e.funds.map(e=>s.Coin.fromJSON(e)):[]}),toJSON(e){let t={};return void 0!==e.sender&&(t.sender=e.sender),void 0!==e.contract&&(t.contract=e.contract),void 0!==e.msg&&(t.msg=O(void 0!==e.msg?e.msg:new Uint8Array)),e.funds?t.funds=e.funds.map(e=>e?s.Coin.toJSON(e):void 0):t.funds=[],t},fromPartial(e){var t,r,n,i;let o=p();return o.sender=null!==(t=e.sender)&&void 0!==t?t:"",o.contract=null!==(r=e.contract)&&void 0!==r?r:"",o.msg=null!==(n=e.msg)&&void 0!==n?n:new Uint8Array,o.funds=(null===(i=e.funds)||void 0===i?void 0:i.map(e=>s.Coin.fromPartial(e)))||[],o}},t.MsgExecuteContractResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return 0!==e.data.length&&t.uint32(10).bytes(e.data),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=f();for(;r.pos>>3==1?i.data=r.bytes():r.skipType(7&e)}return i},fromJSON:e=>({data:A(e.data)?_(e.data):new Uint8Array}),toJSON(e){let t={};return void 0!==e.data&&(t.data=O(void 0!==e.data?e.data:new Uint8Array)),t},fromPartial(e){var t;let r=f();return r.data=null!==(t=e.data)&&void 0!==t?t:new Uint8Array,r}},t.MsgMigrateContract={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.sender&&t.uint32(10).string(e.sender),""!==e.contract&&t.uint32(18).string(e.contract),"0"!==e.codeId&&t.uint32(24).uint64(e.codeId),0!==e.msg.length&&t.uint32(34).bytes(e.msg),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=h();for(;r.pos>>3){case 1:i.sender=r.string();break;case 2:i.contract=r.string();break;case 3:i.codeId=P(r.uint64());break;case 4:i.msg=r.bytes();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({sender:A(e.sender)?String(e.sender):"",contract:A(e.contract)?String(e.contract):"",codeId:A(e.codeId)?String(e.codeId):"0",msg:A(e.msg)?_(e.msg):new Uint8Array}),toJSON(e){let t={};return void 0!==e.sender&&(t.sender=e.sender),void 0!==e.contract&&(t.contract=e.contract),void 0!==e.codeId&&(t.codeId=e.codeId),void 0!==e.msg&&(t.msg=O(void 0!==e.msg?e.msg:new Uint8Array)),t},fromPartial(e){var t,r,n,i;let o=h();return o.sender=null!==(t=e.sender)&&void 0!==t?t:"",o.contract=null!==(r=e.contract)&&void 0!==r?r:"",o.codeId=null!==(n=e.codeId)&&void 0!==n?n:"0",o.msg=null!==(i=e.msg)&&void 0!==i?i:new Uint8Array,o}},t.MsgMigrateContractResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return 0!==e.data.length&&t.uint32(10).bytes(e.data),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=g();for(;r.pos>>3==1?i.data=r.bytes():r.skipType(7&e)}return i},fromJSON:e=>({data:A(e.data)?_(e.data):new Uint8Array}),toJSON(e){let t={};return void 0!==e.data&&(t.data=O(void 0!==e.data?e.data:new Uint8Array)),t},fromPartial(e){var t;let r=g();return r.data=null!==(t=e.data)&&void 0!==t?t:new Uint8Array,r}},t.MsgUpdateAdmin={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.sender&&t.uint32(10).string(e.sender),""!==e.newAdmin&&t.uint32(18).string(e.newAdmin),""!==e.contract&&t.uint32(26).string(e.contract),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=m();for(;r.pos>>3){case 1:i.sender=r.string();break;case 2:i.newAdmin=r.string();break;case 3:i.contract=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({sender:A(e.sender)?String(e.sender):"",newAdmin:A(e.newAdmin)?String(e.newAdmin):"",contract:A(e.contract)?String(e.contract):""}),toJSON(e){let t={};return void 0!==e.sender&&(t.sender=e.sender),void 0!==e.newAdmin&&(t.newAdmin=e.newAdmin),void 0!==e.contract&&(t.contract=e.contract),t},fromPartial(e){var t,r,n;let i=m();return i.sender=null!==(t=e.sender)&&void 0!==t?t:"",i.newAdmin=null!==(r=e.newAdmin)&&void 0!==r?r:"",i.contract=null!==(n=e.contract)&&void 0!==n?n:"",i}},t.MsgUpdateAdminResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=y();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>y()},t.MsgClearAdmin={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.sender&&t.uint32(10).string(e.sender),""!==e.contract&&t.uint32(26).string(e.contract),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=v();for(;r.pos>>3){case 1:i.sender=r.string();break;case 3:i.contract=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({sender:A(e.sender)?String(e.sender):"",contract:A(e.contract)?String(e.contract):""}),toJSON(e){let t={};return void 0!==e.sender&&(t.sender=e.sender),void 0!==e.contract&&(t.contract=e.contract),t},fromPartial(e){var t,r;let n=v();return n.sender=null!==(t=e.sender)&&void 0!==t?t:"",n.contract=null!==(r=e.contract)&&void 0!==r?r:"",n}},t.MsgClearAdminResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=b();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>b()};var S=void 0!==S?S:"undefined"!=typeof self?self:window;let w=S.atob||(e=>S.Buffer.from(e,"base64").toString("binary"));function _(e){let t=w(e),r=new Uint8Array(t.length);for(let e=0;eS.Buffer.from(e,"binary").toString("base64"));function O(e){let t=[];for(let r of e)t.push(String.fromCharCode(r));return k(t.join(""))}function P(e){return e.toString()}function A(e){return null!=e}o.default.util.Long!==i.default&&(o.default.util.Long=i.default,o.default.configure())},40747:function(e,t,r){"use strict";var n,i,o=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Model=t.AbsoluteTxPosition=t.ContractCodeHistoryEntry=t.ContractInfo=t.CodeInfo=t.Params=t.AccessConfig=t.AccessTypeParam=t.contractCodeHistoryOperationTypeToJSON=t.contractCodeHistoryOperationTypeFromJSON=t.ContractCodeHistoryOperationType=t.accessTypeToJSON=t.accessTypeFromJSON=t.AccessType=t.protobufPackage=void 0;let a=o(r(40059)),s=o(r(81667)),l=r(28446);function u(e){switch(e){case 0:case"ACCESS_TYPE_UNSPECIFIED":return n.ACCESS_TYPE_UNSPECIFIED;case 1:case"ACCESS_TYPE_NOBODY":return n.ACCESS_TYPE_NOBODY;case 2:case"ACCESS_TYPE_ONLY_ADDRESS":return n.ACCESS_TYPE_ONLY_ADDRESS;case 3:case"ACCESS_TYPE_EVERYBODY":return n.ACCESS_TYPE_EVERYBODY;default:return n.UNRECOGNIZED}}function d(e){switch(e){case n.ACCESS_TYPE_UNSPECIFIED:return"ACCESS_TYPE_UNSPECIFIED";case n.ACCESS_TYPE_NOBODY:return"ACCESS_TYPE_NOBODY";case n.ACCESS_TYPE_ONLY_ADDRESS:return"ACCESS_TYPE_ONLY_ADDRESS";case n.ACCESS_TYPE_EVERYBODY:return"ACCESS_TYPE_EVERYBODY";default:return"UNKNOWN"}}function c(e){switch(e){case 0:case"CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED":return i.CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED;case 1:case"CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT":return i.CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT;case 2:case"CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE":return i.CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE;case 3:case"CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS":return i.CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS;default:return i.UNRECOGNIZED}}function p(e){switch(e){case i.CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED:return"CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED";case i.CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT:return"CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT";case i.CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE:return"CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE";case i.CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS:return"CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS";default:return"UNKNOWN"}}function f(){return{value:0}}function h(){return{permission:0,address:""}}function g(){return{codeUploadAccess:void 0,instantiateDefaultPermission:0,maxWasmCodeSize:"0"}}function m(){return{codeHash:new Uint8Array,creator:"",instantiateConfig:void 0}}function y(){return{codeId:"0",creator:"",admin:"",label:"",created:void 0,ibcPortId:"",extension:void 0}}function v(){return{operation:0,codeId:"0",updated:void 0,msg:new Uint8Array}}function b(){return{blockHeight:"0",txIndex:"0"}}function S(){return{key:new Uint8Array,value:new Uint8Array}}t.protobufPackage="cosmwasm.wasm.v1",function(e){e[e.ACCESS_TYPE_UNSPECIFIED=0]="ACCESS_TYPE_UNSPECIFIED",e[e.ACCESS_TYPE_NOBODY=1]="ACCESS_TYPE_NOBODY",e[e.ACCESS_TYPE_ONLY_ADDRESS=2]="ACCESS_TYPE_ONLY_ADDRESS",e[e.ACCESS_TYPE_EVERYBODY=3]="ACCESS_TYPE_EVERYBODY",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(n=t.AccessType||(t.AccessType={})),t.accessTypeFromJSON=u,t.accessTypeToJSON=d,function(e){e[e.CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED=0]="CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED",e[e.CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT=1]="CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT",e[e.CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE=2]="CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE",e[e.CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS=3]="CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(i=t.ContractCodeHistoryOperationType||(t.ContractCodeHistoryOperationType={})),t.contractCodeHistoryOperationTypeFromJSON=c,t.contractCodeHistoryOperationTypeToJSON=p,t.AccessTypeParam={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return 0!==e.value&&t.uint32(8).int32(e.value),t},decode(e,t){let r=e instanceof s.default.Reader?e:new s.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=f();for(;r.pos>>3==1?i.value=r.int32():r.skipType(7&e)}return i},fromJSON:e=>({value:I(e.value)?u(e.value):0}),toJSON(e){let t={};return void 0!==e.value&&(t.value=d(e.value)),t},fromPartial(e){var t;let r=f();return r.value=null!==(t=e.value)&&void 0!==t?t:0,r}},t.AccessConfig={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return 0!==e.permission&&t.uint32(8).int32(e.permission),""!==e.address&&t.uint32(18).string(e.address),t},decode(e,t){let r=e instanceof s.default.Reader?e:new s.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=h();for(;r.pos>>3){case 1:i.permission=r.int32();break;case 2:i.address=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({permission:I(e.permission)?u(e.permission):0,address:I(e.address)?String(e.address):""}),toJSON(e){let t={};return void 0!==e.permission&&(t.permission=d(e.permission)),void 0!==e.address&&(t.address=e.address),t},fromPartial(e){var t,r;let n=h();return n.permission=null!==(t=e.permission)&&void 0!==t?t:0,n.address=null!==(r=e.address)&&void 0!==r?r:"",n}},t.Params={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return void 0!==e.codeUploadAccess&&t.AccessConfig.encode(e.codeUploadAccess,r.uint32(10).fork()).ldelim(),0!==e.instantiateDefaultPermission&&r.uint32(16).int32(e.instantiateDefaultPermission),"0"!==e.maxWasmCodeSize&&r.uint32(24).uint64(e.maxWasmCodeSize),r},decode(e,r){let n=e instanceof s.default.Reader?e:new s.default.Reader(e),i=void 0===r?n.len:n.pos+r,o=g();for(;n.pos>>3){case 1:o.codeUploadAccess=t.AccessConfig.decode(n,n.uint32());break;case 2:o.instantiateDefaultPermission=n.int32();break;case 3:o.maxWasmCodeSize=A(n.uint64());break;default:n.skipType(7&e)}}return o},fromJSON:e=>({codeUploadAccess:I(e.codeUploadAccess)?t.AccessConfig.fromJSON(e.codeUploadAccess):void 0,instantiateDefaultPermission:I(e.instantiateDefaultPermission)?u(e.instantiateDefaultPermission):0,maxWasmCodeSize:I(e.maxWasmCodeSize)?String(e.maxWasmCodeSize):"0"}),toJSON(e){let r={};return void 0!==e.codeUploadAccess&&(r.codeUploadAccess=e.codeUploadAccess?t.AccessConfig.toJSON(e.codeUploadAccess):void 0),void 0!==e.instantiateDefaultPermission&&(r.instantiateDefaultPermission=d(e.instantiateDefaultPermission)),void 0!==e.maxWasmCodeSize&&(r.maxWasmCodeSize=e.maxWasmCodeSize),r},fromPartial(e){var r,n;let i=g();return i.codeUploadAccess=void 0!==e.codeUploadAccess&&null!==e.codeUploadAccess?t.AccessConfig.fromPartial(e.codeUploadAccess):void 0,i.instantiateDefaultPermission=null!==(r=e.instantiateDefaultPermission)&&void 0!==r?r:0,i.maxWasmCodeSize=null!==(n=e.maxWasmCodeSize)&&void 0!==n?n:"0",i}},t.CodeInfo={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return 0!==e.codeHash.length&&r.uint32(10).bytes(e.codeHash),""!==e.creator&&r.uint32(18).string(e.creator),void 0!==e.instantiateConfig&&t.AccessConfig.encode(e.instantiateConfig,r.uint32(42).fork()).ldelim(),r},decode(e,r){let n=e instanceof s.default.Reader?e:new s.default.Reader(e),i=void 0===r?n.len:n.pos+r,o=m();for(;n.pos>>3){case 1:o.codeHash=n.bytes();break;case 2:o.creator=n.string();break;case 5:o.instantiateConfig=t.AccessConfig.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON:e=>({codeHash:I(e.codeHash)?k(e.codeHash):new Uint8Array,creator:I(e.creator)?String(e.creator):"",instantiateConfig:I(e.instantiateConfig)?t.AccessConfig.fromJSON(e.instantiateConfig):void 0}),toJSON(e){let r={};return void 0!==e.codeHash&&(r.codeHash=P(void 0!==e.codeHash?e.codeHash:new Uint8Array)),void 0!==e.creator&&(r.creator=e.creator),void 0!==e.instantiateConfig&&(r.instantiateConfig=e.instantiateConfig?t.AccessConfig.toJSON(e.instantiateConfig):void 0),r},fromPartial(e){var r,n;let i=m();return i.codeHash=null!==(r=e.codeHash)&&void 0!==r?r:new Uint8Array,i.creator=null!==(n=e.creator)&&void 0!==n?n:"",i.instantiateConfig=void 0!==e.instantiateConfig&&null!==e.instantiateConfig?t.AccessConfig.fromPartial(e.instantiateConfig):void 0,i}},t.ContractInfo={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return"0"!==e.codeId&&r.uint32(8).uint64(e.codeId),""!==e.creator&&r.uint32(18).string(e.creator),""!==e.admin&&r.uint32(26).string(e.admin),""!==e.label&&r.uint32(34).string(e.label),void 0!==e.created&&t.AbsoluteTxPosition.encode(e.created,r.uint32(42).fork()).ldelim(),""!==e.ibcPortId&&r.uint32(50).string(e.ibcPortId),void 0!==e.extension&&l.Any.encode(e.extension,r.uint32(58).fork()).ldelim(),r},decode(e,r){let n=e instanceof s.default.Reader?e:new s.default.Reader(e),i=void 0===r?n.len:n.pos+r,o=y();for(;n.pos>>3){case 1:o.codeId=A(n.uint64());break;case 2:o.creator=n.string();break;case 3:o.admin=n.string();break;case 4:o.label=n.string();break;case 5:o.created=t.AbsoluteTxPosition.decode(n,n.uint32());break;case 6:o.ibcPortId=n.string();break;case 7:o.extension=l.Any.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON:e=>({codeId:I(e.codeId)?String(e.codeId):"0",creator:I(e.creator)?String(e.creator):"",admin:I(e.admin)?String(e.admin):"",label:I(e.label)?String(e.label):"",created:I(e.created)?t.AbsoluteTxPosition.fromJSON(e.created):void 0,ibcPortId:I(e.ibcPortId)?String(e.ibcPortId):"",extension:I(e.extension)?l.Any.fromJSON(e.extension):void 0}),toJSON(e){let r={};return void 0!==e.codeId&&(r.codeId=e.codeId),void 0!==e.creator&&(r.creator=e.creator),void 0!==e.admin&&(r.admin=e.admin),void 0!==e.label&&(r.label=e.label),void 0!==e.created&&(r.created=e.created?t.AbsoluteTxPosition.toJSON(e.created):void 0),void 0!==e.ibcPortId&&(r.ibcPortId=e.ibcPortId),void 0!==e.extension&&(r.extension=e.extension?l.Any.toJSON(e.extension):void 0),r},fromPartial(e){var r,n,i,o,a;let s=y();return s.codeId=null!==(r=e.codeId)&&void 0!==r?r:"0",s.creator=null!==(n=e.creator)&&void 0!==n?n:"",s.admin=null!==(i=e.admin)&&void 0!==i?i:"",s.label=null!==(o=e.label)&&void 0!==o?o:"",s.created=void 0!==e.created&&null!==e.created?t.AbsoluteTxPosition.fromPartial(e.created):void 0,s.ibcPortId=null!==(a=e.ibcPortId)&&void 0!==a?a:"",s.extension=void 0!==e.extension&&null!==e.extension?l.Any.fromPartial(e.extension):void 0,s}},t.ContractCodeHistoryEntry={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return 0!==e.operation&&r.uint32(8).int32(e.operation),"0"!==e.codeId&&r.uint32(16).uint64(e.codeId),void 0!==e.updated&&t.AbsoluteTxPosition.encode(e.updated,r.uint32(26).fork()).ldelim(),0!==e.msg.length&&r.uint32(34).bytes(e.msg),r},decode(e,r){let n=e instanceof s.default.Reader?e:new s.default.Reader(e),i=void 0===r?n.len:n.pos+r,o=v();for(;n.pos>>3){case 1:o.operation=n.int32();break;case 2:o.codeId=A(n.uint64());break;case 3:o.updated=t.AbsoluteTxPosition.decode(n,n.uint32());break;case 4:o.msg=n.bytes();break;default:n.skipType(7&e)}}return o},fromJSON:e=>({operation:I(e.operation)?c(e.operation):0,codeId:I(e.codeId)?String(e.codeId):"0",updated:I(e.updated)?t.AbsoluteTxPosition.fromJSON(e.updated):void 0,msg:I(e.msg)?k(e.msg):new Uint8Array}),toJSON(e){let r={};return void 0!==e.operation&&(r.operation=p(e.operation)),void 0!==e.codeId&&(r.codeId=e.codeId),void 0!==e.updated&&(r.updated=e.updated?t.AbsoluteTxPosition.toJSON(e.updated):void 0),void 0!==e.msg&&(r.msg=P(void 0!==e.msg?e.msg:new Uint8Array)),r},fromPartial(e){var r,n,i;let o=v();return o.operation=null!==(r=e.operation)&&void 0!==r?r:0,o.codeId=null!==(n=e.codeId)&&void 0!==n?n:"0",o.updated=void 0!==e.updated&&null!==e.updated?t.AbsoluteTxPosition.fromPartial(e.updated):void 0,o.msg=null!==(i=e.msg)&&void 0!==i?i:new Uint8Array,o}},t.AbsoluteTxPosition={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return"0"!==e.blockHeight&&t.uint32(8).uint64(e.blockHeight),"0"!==e.txIndex&&t.uint32(16).uint64(e.txIndex),t},decode(e,t){let r=e instanceof s.default.Reader?e:new s.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=b();for(;r.pos>>3){case 1:i.blockHeight=A(r.uint64());break;case 2:i.txIndex=A(r.uint64());break;default:r.skipType(7&e)}}return i},fromJSON:e=>({blockHeight:I(e.blockHeight)?String(e.blockHeight):"0",txIndex:I(e.txIndex)?String(e.txIndex):"0"}),toJSON(e){let t={};return void 0!==e.blockHeight&&(t.blockHeight=e.blockHeight),void 0!==e.txIndex&&(t.txIndex=e.txIndex),t},fromPartial(e){var t,r;let n=b();return n.blockHeight=null!==(t=e.blockHeight)&&void 0!==t?t:"0",n.txIndex=null!==(r=e.txIndex)&&void 0!==r?r:"0",n}},t.Model={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return 0!==e.key.length&&t.uint32(10).bytes(e.key),0!==e.value.length&&t.uint32(18).bytes(e.value),t},decode(e,t){let r=e instanceof s.default.Reader?e:new s.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=S();for(;r.pos>>3){case 1:i.key=r.bytes();break;case 2:i.value=r.bytes();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({key:I(e.key)?k(e.key):new Uint8Array,value:I(e.value)?k(e.value):new Uint8Array}),toJSON(e){let t={};return void 0!==e.key&&(t.key=P(void 0!==e.key?e.key:new Uint8Array)),void 0!==e.value&&(t.value=P(void 0!==e.value?e.value:new Uint8Array)),t},fromPartial(e){var t,r;let n=S();return n.key=null!==(t=e.key)&&void 0!==t?t:new Uint8Array,n.value=null!==(r=e.value)&&void 0!==r?r:new Uint8Array,n}};var w=void 0!==w?w:"undefined"!=typeof self?self:window;let _=w.atob||(e=>w.Buffer.from(e,"base64").toString("binary"));function k(e){let t=_(e),r=new Uint8Array(t.length);for(let e=0;ew.Buffer.from(e,"binary").toString("base64"));function P(e){let t=[];for(let r of e)t.push(String.fromCharCode(r));return O(t.join(""))}function A(e){return e.toString()}function I(e){return null!=e}s.default.util.Long!==a.default&&(s.default.util.Long=a.default,s.default.configure())},28446:function(e,t,r){"use strict";var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Any=t.protobufPackage=void 0;let i=n(r(40059)),o=n(r(81667));function a(){return{typeUrl:"",value:new Uint8Array}}t.protobufPackage="google.protobuf",t.Any={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.typeUrl&&t.uint32(10).string(e.typeUrl),0!==e.value.length&&t.uint32(18).bytes(e.value),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=a();for(;r.pos>>3){case 1:i.typeUrl=r.string();break;case 2:i.value=r.bytes();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({typeUrl:p(e.typeUrl)?String(e.typeUrl):"",value:p(e.value)?u(e.value):new Uint8Array}),toJSON(e){let t={};return void 0!==e.typeUrl&&(t.typeUrl=e.typeUrl),void 0!==e.value&&(t.value=c(void 0!==e.value?e.value:new Uint8Array)),t},fromPartial(e){var t,r;let n=a();return n.typeUrl=null!==(t=e.typeUrl)&&void 0!==t?t:"",n.value=null!==(r=e.value)&&void 0!==r?r:new Uint8Array,n}};var s=void 0!==s?s:"undefined"!=typeof self?self:window;let l=s.atob||(e=>s.Buffer.from(e,"base64").toString("binary"));function u(e){let t=l(e),r=new Uint8Array(t.length);for(let e=0;es.Buffer.from(e,"binary").toString("base64"));function c(e){let t=[];for(let r of e)t.push(String.fromCharCode(r));return d(t.join(""))}function p(e){return null!=e}o.default.util.Long!==i.default&&(o.default.util.Long=i.default,o.default.configure())},81555:function(e,t,r){"use strict";var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Duration=t.protobufPackage=void 0;let i=n(r(40059)),o=n(r(81667));function a(){return{seconds:"0",nanos:0}}function s(e){return e.toString()}function l(e){return null!=e}t.protobufPackage="google.protobuf",t.Duration={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return"0"!==e.seconds&&t.uint32(8).int64(e.seconds),0!==e.nanos&&t.uint32(16).int32(e.nanos),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=a();for(;r.pos>>3){case 1:i.seconds=s(r.int64());break;case 2:i.nanos=r.int32();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({seconds:l(e.seconds)?String(e.seconds):"0",nanos:l(e.nanos)?Number(e.nanos):0}),toJSON(e){let t={};return void 0!==e.seconds&&(t.seconds=e.seconds),void 0!==e.nanos&&(t.nanos=Math.round(e.nanos)),t},fromPartial(e){var t,r;let n=a();return n.seconds=null!==(t=e.seconds)&&void 0!==t?t:"0",n.nanos=null!==(r=e.nanos)&&void 0!==r?r:0,n}},o.default.util.Long!==i.default&&(o.default.util.Long=i.default,o.default.configure())},90338:function(e,t,r){"use strict";var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Timestamp=t.protobufPackage=void 0;let i=n(r(40059)),o=n(r(81667));function a(){return{seconds:"0",nanos:0}}function s(e){return e.toString()}function l(e){return null!=e}t.protobufPackage="google.protobuf",t.Timestamp={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return"0"!==e.seconds&&t.uint32(8).int64(e.seconds),0!==e.nanos&&t.uint32(16).int32(e.nanos),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=a();for(;r.pos>>3){case 1:i.seconds=s(r.int64());break;case 2:i.nanos=r.int32();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({seconds:l(e.seconds)?String(e.seconds):"0",nanos:l(e.nanos)?Number(e.nanos):0}),toJSON(e){let t={};return void 0!==e.seconds&&(t.seconds=e.seconds),void 0!==e.nanos&&(t.nanos=Math.round(e.nanos)),t},fromPartial(e){var t,r;let n=a();return n.seconds=null!==(t=e.seconds)&&void 0!==t?t:"0",n.nanos=null!==(r=e.nanos)&&void 0!==r?r:0,n}},o.default.util.Long!==i.default&&(o.default.util.Long=i.default,o.default.configure())},22772:function(e,t,r){"use strict";var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.IdentifiedPacketFees=t.PacketFees=t.PacketFee=t.Fee=t.protobufPackage=void 0;let i=n(r(40059)),o=n(r(81667)),a=r(80054),s=r(75794);function l(){return{recvFee:[],ackFee:[],timeoutFee:[]}}function u(){return{fee:void 0,refundAddress:"",relayers:[]}}function d(){return{packetFees:[]}}function c(){return{packetId:void 0,packetFees:[]}}function p(e){return null!=e}t.protobufPackage="ibc.applications.fee.v1",t.Fee={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();for(let r of e.recvFee)a.Coin.encode(r,t.uint32(10).fork()).ldelim();for(let r of e.ackFee)a.Coin.encode(r,t.uint32(18).fork()).ldelim();for(let r of e.timeoutFee)a.Coin.encode(r,t.uint32(26).fork()).ldelim();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=l();for(;r.pos>>3){case 1:i.recvFee.push(a.Coin.decode(r,r.uint32()));break;case 2:i.ackFee.push(a.Coin.decode(r,r.uint32()));break;case 3:i.timeoutFee.push(a.Coin.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return i},fromJSON:e=>({recvFee:Array.isArray(null==e?void 0:e.recvFee)?e.recvFee.map(e=>a.Coin.fromJSON(e)):[],ackFee:Array.isArray(null==e?void 0:e.ackFee)?e.ackFee.map(e=>a.Coin.fromJSON(e)):[],timeoutFee:Array.isArray(null==e?void 0:e.timeoutFee)?e.timeoutFee.map(e=>a.Coin.fromJSON(e)):[]}),toJSON(e){let t={};return e.recvFee?t.recvFee=e.recvFee.map(e=>e?a.Coin.toJSON(e):void 0):t.recvFee=[],e.ackFee?t.ackFee=e.ackFee.map(e=>e?a.Coin.toJSON(e):void 0):t.ackFee=[],e.timeoutFee?t.timeoutFee=e.timeoutFee.map(e=>e?a.Coin.toJSON(e):void 0):t.timeoutFee=[],t},fromPartial(e){var t,r,n;let i=l();return i.recvFee=(null===(t=e.recvFee)||void 0===t?void 0:t.map(e=>a.Coin.fromPartial(e)))||[],i.ackFee=(null===(r=e.ackFee)||void 0===r?void 0:r.map(e=>a.Coin.fromPartial(e)))||[],i.timeoutFee=(null===(n=e.timeoutFee)||void 0===n?void 0:n.map(e=>a.Coin.fromPartial(e)))||[],i}},t.PacketFee={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();for(let n of(void 0!==e.fee&&t.Fee.encode(e.fee,r.uint32(10).fork()).ldelim(),""!==e.refundAddress&&r.uint32(18).string(e.refundAddress),e.relayers))r.uint32(26).string(n);return r},decode(e,r){let n=e instanceof o.default.Reader?e:new o.default.Reader(e),i=void 0===r?n.len:n.pos+r,a=u();for(;n.pos>>3){case 1:a.fee=t.Fee.decode(n,n.uint32());break;case 2:a.refundAddress=n.string();break;case 3:a.relayers.push(n.string());break;default:n.skipType(7&e)}}return a},fromJSON:e=>({fee:p(e.fee)?t.Fee.fromJSON(e.fee):void 0,refundAddress:p(e.refundAddress)?String(e.refundAddress):"",relayers:Array.isArray(null==e?void 0:e.relayers)?e.relayers.map(e=>String(e)):[]}),toJSON(e){let r={};return void 0!==e.fee&&(r.fee=e.fee?t.Fee.toJSON(e.fee):void 0),void 0!==e.refundAddress&&(r.refundAddress=e.refundAddress),e.relayers?r.relayers=e.relayers.map(e=>e):r.relayers=[],r},fromPartial(e){var r,n;let i=u();return i.fee=void 0!==e.fee&&null!==e.fee?t.Fee.fromPartial(e.fee):void 0,i.refundAddress=null!==(r=e.refundAddress)&&void 0!==r?r:"",i.relayers=(null===(n=e.relayers)||void 0===n?void 0:n.map(e=>e))||[],i}},t.PacketFees={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();for(let n of e.packetFees)t.PacketFee.encode(n,r.uint32(10).fork()).ldelim();return r},decode(e,r){let n=e instanceof o.default.Reader?e:new o.default.Reader(e),i=void 0===r?n.len:n.pos+r,a=d();for(;n.pos>>3==1?a.packetFees.push(t.PacketFee.decode(n,n.uint32())):n.skipType(7&e)}return a},fromJSON:e=>({packetFees:Array.isArray(null==e?void 0:e.packetFees)?e.packetFees.map(e=>t.PacketFee.fromJSON(e)):[]}),toJSON(e){let r={};return e.packetFees?r.packetFees=e.packetFees.map(e=>e?t.PacketFee.toJSON(e):void 0):r.packetFees=[],r},fromPartial(e){var r;let n=d();return n.packetFees=(null===(r=e.packetFees)||void 0===r?void 0:r.map(e=>t.PacketFee.fromPartial(e)))||[],n}},t.IdentifiedPacketFees={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();for(let n of(void 0!==e.packetId&&s.PacketId.encode(e.packetId,r.uint32(10).fork()).ldelim(),e.packetFees))t.PacketFee.encode(n,r.uint32(18).fork()).ldelim();return r},decode(e,r){let n=e instanceof o.default.Reader?e:new o.default.Reader(e),i=void 0===r?n.len:n.pos+r,a=c();for(;n.pos>>3){case 1:a.packetId=s.PacketId.decode(n,n.uint32());break;case 2:a.packetFees.push(t.PacketFee.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return a},fromJSON:e=>({packetId:p(e.packetId)?s.PacketId.fromJSON(e.packetId):void 0,packetFees:Array.isArray(null==e?void 0:e.packetFees)?e.packetFees.map(e=>t.PacketFee.fromJSON(e)):[]}),toJSON(e){let r={};return void 0!==e.packetId&&(r.packetId=e.packetId?s.PacketId.toJSON(e.packetId):void 0),e.packetFees?r.packetFees=e.packetFees.map(e=>e?t.PacketFee.toJSON(e):void 0):r.packetFees=[],r},fromPartial(e){var r;let n=c();return n.packetId=void 0!==e.packetId&&null!==e.packetId?s.PacketId.fromPartial(e.packetId):void 0,n.packetFees=(null===(r=e.packetFees)||void 0===r?void 0:r.map(e=>t.PacketFee.fromPartial(e)))||[],n}},o.default.util.Long!==i.default&&(o.default.util.Long=i.default,o.default.configure())},28382:function(e,t,r){"use strict";var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MsgPayPacketFeeAsyncResponse=t.MsgPayPacketFeeAsync=t.MsgPayPacketFeeResponse=t.MsgPayPacketFee=t.MsgRegisterCounterpartyPayeeResponse=t.MsgRegisterCounterpartyPayee=t.MsgRegisterPayeeResponse=t.MsgRegisterPayee=t.protobufPackage=void 0;let i=n(r(40059)),o=n(r(81667)),a=r(22772),s=r(75794);function l(){return{portId:"",channelId:"",relayer:"",payee:""}}function u(){return{}}function d(){return{portId:"",channelId:"",relayer:"",counterpartyPayee:""}}function c(){return{}}function p(){return{fee:void 0,sourcePortId:"",sourceChannelId:"",signer:"",relayers:[]}}function f(){return{}}function h(){return{packetId:void 0,packetFee:void 0}}function g(){return{}}function m(e){return null!=e}t.protobufPackage="ibc.applications.fee.v1",t.MsgRegisterPayee={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.portId&&t.uint32(10).string(e.portId),""!==e.channelId&&t.uint32(18).string(e.channelId),""!==e.relayer&&t.uint32(26).string(e.relayer),""!==e.payee&&t.uint32(34).string(e.payee),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=l();for(;r.pos>>3){case 1:i.portId=r.string();break;case 2:i.channelId=r.string();break;case 3:i.relayer=r.string();break;case 4:i.payee=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({portId:m(e.portId)?String(e.portId):"",channelId:m(e.channelId)?String(e.channelId):"",relayer:m(e.relayer)?String(e.relayer):"",payee:m(e.payee)?String(e.payee):""}),toJSON(e){let t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.channelId&&(t.channelId=e.channelId),void 0!==e.relayer&&(t.relayer=e.relayer),void 0!==e.payee&&(t.payee=e.payee),t},fromPartial(e){var t,r,n,i;let o=l();return o.portId=null!==(t=e.portId)&&void 0!==t?t:"",o.channelId=null!==(r=e.channelId)&&void 0!==r?r:"",o.relayer=null!==(n=e.relayer)&&void 0!==n?n:"",o.payee=null!==(i=e.payee)&&void 0!==i?i:"",o}},t.MsgRegisterPayeeResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=u();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>u()},t.MsgRegisterCounterpartyPayee={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.portId&&t.uint32(10).string(e.portId),""!==e.channelId&&t.uint32(18).string(e.channelId),""!==e.relayer&&t.uint32(26).string(e.relayer),""!==e.counterpartyPayee&&t.uint32(34).string(e.counterpartyPayee),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=d();for(;r.pos>>3){case 1:i.portId=r.string();break;case 2:i.channelId=r.string();break;case 3:i.relayer=r.string();break;case 4:i.counterpartyPayee=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({portId:m(e.portId)?String(e.portId):"",channelId:m(e.channelId)?String(e.channelId):"",relayer:m(e.relayer)?String(e.relayer):"",counterpartyPayee:m(e.counterpartyPayee)?String(e.counterpartyPayee):""}),toJSON(e){let t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.channelId&&(t.channelId=e.channelId),void 0!==e.relayer&&(t.relayer=e.relayer),void 0!==e.counterpartyPayee&&(t.counterpartyPayee=e.counterpartyPayee),t},fromPartial(e){var t,r,n,i;let o=d();return o.portId=null!==(t=e.portId)&&void 0!==t?t:"",o.channelId=null!==(r=e.channelId)&&void 0!==r?r:"",o.relayer=null!==(n=e.relayer)&&void 0!==n?n:"",o.counterpartyPayee=null!==(i=e.counterpartyPayee)&&void 0!==i?i:"",o}},t.MsgRegisterCounterpartyPayeeResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=c();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>c()},t.MsgPayPacketFee={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();for(let r of(void 0!==e.fee&&a.Fee.encode(e.fee,t.uint32(10).fork()).ldelim(),""!==e.sourcePortId&&t.uint32(18).string(e.sourcePortId),""!==e.sourceChannelId&&t.uint32(26).string(e.sourceChannelId),""!==e.signer&&t.uint32(34).string(e.signer),e.relayers))t.uint32(42).string(r);return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=p();for(;r.pos>>3){case 1:i.fee=a.Fee.decode(r,r.uint32());break;case 2:i.sourcePortId=r.string();break;case 3:i.sourceChannelId=r.string();break;case 4:i.signer=r.string();break;case 5:i.relayers.push(r.string());break;default:r.skipType(7&e)}}return i},fromJSON:e=>({fee:m(e.fee)?a.Fee.fromJSON(e.fee):void 0,sourcePortId:m(e.sourcePortId)?String(e.sourcePortId):"",sourceChannelId:m(e.sourceChannelId)?String(e.sourceChannelId):"",signer:m(e.signer)?String(e.signer):"",relayers:Array.isArray(null==e?void 0:e.relayers)?e.relayers.map(e=>String(e)):[]}),toJSON(e){let t={};return void 0!==e.fee&&(t.fee=e.fee?a.Fee.toJSON(e.fee):void 0),void 0!==e.sourcePortId&&(t.sourcePortId=e.sourcePortId),void 0!==e.sourceChannelId&&(t.sourceChannelId=e.sourceChannelId),void 0!==e.signer&&(t.signer=e.signer),e.relayers?t.relayers=e.relayers.map(e=>e):t.relayers=[],t},fromPartial(e){var t,r,n,i;let o=p();return o.fee=void 0!==e.fee&&null!==e.fee?a.Fee.fromPartial(e.fee):void 0,o.sourcePortId=null!==(t=e.sourcePortId)&&void 0!==t?t:"",o.sourceChannelId=null!==(r=e.sourceChannelId)&&void 0!==r?r:"",o.signer=null!==(n=e.signer)&&void 0!==n?n:"",o.relayers=(null===(i=e.relayers)||void 0===i?void 0:i.map(e=>e))||[],o}},t.MsgPayPacketFeeResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=f();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>f()},t.MsgPayPacketFeeAsync={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return void 0!==e.packetId&&s.PacketId.encode(e.packetId,t.uint32(10).fork()).ldelim(),void 0!==e.packetFee&&a.PacketFee.encode(e.packetFee,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=h();for(;r.pos>>3){case 1:i.packetId=s.PacketId.decode(r,r.uint32());break;case 2:i.packetFee=a.PacketFee.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON:e=>({packetId:m(e.packetId)?s.PacketId.fromJSON(e.packetId):void 0,packetFee:m(e.packetFee)?a.PacketFee.fromJSON(e.packetFee):void 0}),toJSON(e){let t={};return void 0!==e.packetId&&(t.packetId=e.packetId?s.PacketId.toJSON(e.packetId):void 0),void 0!==e.packetFee&&(t.packetFee=e.packetFee?a.PacketFee.toJSON(e.packetFee):void 0),t},fromPartial(e){let t=h();return t.packetId=void 0!==e.packetId&&null!==e.packetId?s.PacketId.fromPartial(e.packetId):void 0,t.packetFee=void 0!==e.packetFee&&null!==e.packetFee?a.PacketFee.fromPartial(e.packetFee):void 0,t}},t.MsgPayPacketFeeAsyncResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=g();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>g()},o.default.util.Long!==i.default&&(o.default.util.Long=i.default,o.default.configure())},39383:function(e,t,r){"use strict";var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MsgTransferResponse=t.MsgTransfer=t.protobufPackage=void 0;let i=n(r(40059)),o=n(r(81667)),a=r(80054),s=r(85182);function l(){return{sourcePort:"",sourceChannel:"",token:void 0,sender:"",receiver:"",timeoutHeight:void 0,timeoutTimestamp:"0",memo:""}}function u(){return{}}function d(e){return e.toString()}function c(e){return null!=e}t.protobufPackage="ibc.applications.transfer.v1",t.MsgTransfer={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.sourcePort&&t.uint32(10).string(e.sourcePort),""!==e.sourceChannel&&t.uint32(18).string(e.sourceChannel),void 0!==e.token&&a.Coin.encode(e.token,t.uint32(26).fork()).ldelim(),""!==e.sender&&t.uint32(34).string(e.sender),""!==e.receiver&&t.uint32(42).string(e.receiver),void 0!==e.timeoutHeight&&s.Height.encode(e.timeoutHeight,t.uint32(50).fork()).ldelim(),"0"!==e.timeoutTimestamp&&t.uint32(56).uint64(e.timeoutTimestamp),""!==e.memo&&t.uint32(66).string(e.memo),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=l();for(;r.pos>>3){case 1:i.sourcePort=r.string();break;case 2:i.sourceChannel=r.string();break;case 3:i.token=a.Coin.decode(r,r.uint32());break;case 4:i.sender=r.string();break;case 5:i.receiver=r.string();break;case 6:i.timeoutHeight=s.Height.decode(r,r.uint32());break;case 7:i.timeoutTimestamp=d(r.uint64());break;case 8:i.memo=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({sourcePort:c(e.sourcePort)?String(e.sourcePort):"",sourceChannel:c(e.sourceChannel)?String(e.sourceChannel):"",token:c(e.token)?a.Coin.fromJSON(e.token):void 0,sender:c(e.sender)?String(e.sender):"",receiver:c(e.receiver)?String(e.receiver):"",timeoutHeight:c(e.timeoutHeight)?s.Height.fromJSON(e.timeoutHeight):void 0,timeoutTimestamp:c(e.timeoutTimestamp)?String(e.timeoutTimestamp):"0",memo:c(e.memo)?String(e.memo):""}),toJSON(e){let t={};return void 0!==e.sourcePort&&(t.sourcePort=e.sourcePort),void 0!==e.sourceChannel&&(t.sourceChannel=e.sourceChannel),void 0!==e.token&&(t.token=e.token?a.Coin.toJSON(e.token):void 0),void 0!==e.sender&&(t.sender=e.sender),void 0!==e.receiver&&(t.receiver=e.receiver),void 0!==e.timeoutHeight&&(t.timeoutHeight=e.timeoutHeight?s.Height.toJSON(e.timeoutHeight):void 0),void 0!==e.timeoutTimestamp&&(t.timeoutTimestamp=e.timeoutTimestamp),void 0!==e.memo&&(t.memo=e.memo),t},fromPartial(e){var t,r,n,i,o,u;let d=l();return d.sourcePort=null!==(t=e.sourcePort)&&void 0!==t?t:"",d.sourceChannel=null!==(r=e.sourceChannel)&&void 0!==r?r:"",d.token=void 0!==e.token&&null!==e.token?a.Coin.fromPartial(e.token):void 0,d.sender=null!==(n=e.sender)&&void 0!==n?n:"",d.receiver=null!==(i=e.receiver)&&void 0!==i?i:"",d.timeoutHeight=void 0!==e.timeoutHeight&&null!==e.timeoutHeight?s.Height.fromPartial(e.timeoutHeight):void 0,d.timeoutTimestamp=null!==(o=e.timeoutTimestamp)&&void 0!==o?o:"0",d.memo=null!==(u=e.memo)&&void 0!==u?u:"",d}},t.MsgTransferResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=u();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>u()},o.default.util.Long!==i.default&&(o.default.util.Long=i.default,o.default.configure())},75794:function(e,t,r){"use strict";var n,i,o=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Timeout=t.Acknowledgement=t.PacketId=t.PacketState=t.Packet=t.Counterparty=t.IdentifiedChannel=t.Channel=t.orderToJSON=t.orderFromJSON=t.Order=t.stateToJSON=t.stateFromJSON=t.State=t.protobufPackage=void 0;let a=o(r(40059)),s=o(r(81667)),l=r(85182);function u(e){switch(e){case 0:case"STATE_UNINITIALIZED_UNSPECIFIED":return n.STATE_UNINITIALIZED_UNSPECIFIED;case 1:case"STATE_INIT":return n.STATE_INIT;case 2:case"STATE_TRYOPEN":return n.STATE_TRYOPEN;case 3:case"STATE_OPEN":return n.STATE_OPEN;case 4:case"STATE_CLOSED":return n.STATE_CLOSED;default:return n.UNRECOGNIZED}}function d(e){switch(e){case n.STATE_UNINITIALIZED_UNSPECIFIED:return"STATE_UNINITIALIZED_UNSPECIFIED";case n.STATE_INIT:return"STATE_INIT";case n.STATE_TRYOPEN:return"STATE_TRYOPEN";case n.STATE_OPEN:return"STATE_OPEN";case n.STATE_CLOSED:return"STATE_CLOSED";default:return"UNKNOWN"}}function c(e){switch(e){case 0:case"ORDER_NONE_UNSPECIFIED":return i.ORDER_NONE_UNSPECIFIED;case 1:case"ORDER_UNORDERED":return i.ORDER_UNORDERED;case 2:case"ORDER_ORDERED":return i.ORDER_ORDERED;default:return i.UNRECOGNIZED}}function p(e){switch(e){case i.ORDER_NONE_UNSPECIFIED:return"ORDER_NONE_UNSPECIFIED";case i.ORDER_UNORDERED:return"ORDER_UNORDERED";case i.ORDER_ORDERED:return"ORDER_ORDERED";default:return"UNKNOWN"}}function f(){return{state:0,ordering:0,counterparty:void 0,connectionHops:[],version:""}}function h(){return{state:0,ordering:0,counterparty:void 0,connectionHops:[],version:"",portId:"",channelId:""}}function g(){return{portId:"",channelId:""}}function m(){return{sequence:"0",sourcePort:"",sourceChannel:"",destinationPort:"",destinationChannel:"",data:new Uint8Array,timeoutHeight:void 0,timeoutTimestamp:"0"}}function y(){return{portId:"",channelId:"",sequence:"0",data:new Uint8Array}}function v(){return{portId:"",channelId:"",sequence:"0"}}function b(){return{result:void 0,error:void 0}}function S(){return{height:void 0,timestamp:"0"}}t.protobufPackage="ibc.core.channel.v1",function(e){e[e.STATE_UNINITIALIZED_UNSPECIFIED=0]="STATE_UNINITIALIZED_UNSPECIFIED",e[e.STATE_INIT=1]="STATE_INIT",e[e.STATE_TRYOPEN=2]="STATE_TRYOPEN",e[e.STATE_OPEN=3]="STATE_OPEN",e[e.STATE_CLOSED=4]="STATE_CLOSED",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(n=t.State||(t.State={})),t.stateFromJSON=u,t.stateToJSON=d,function(e){e[e.ORDER_NONE_UNSPECIFIED=0]="ORDER_NONE_UNSPECIFIED",e[e.ORDER_UNORDERED=1]="ORDER_UNORDERED",e[e.ORDER_ORDERED=2]="ORDER_ORDERED",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(i=t.Order||(t.Order={})),t.orderFromJSON=c,t.orderToJSON=p,t.Channel={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();for(let n of(0!==e.state&&r.uint32(8).int32(e.state),0!==e.ordering&&r.uint32(16).int32(e.ordering),void 0!==e.counterparty&&t.Counterparty.encode(e.counterparty,r.uint32(26).fork()).ldelim(),e.connectionHops))r.uint32(34).string(n);return""!==e.version&&r.uint32(42).string(e.version),r},decode(e,r){let n=e instanceof s.default.Reader?e:new s.default.Reader(e),i=void 0===r?n.len:n.pos+r,o=f();for(;n.pos>>3){case 1:o.state=n.int32();break;case 2:o.ordering=n.int32();break;case 3:o.counterparty=t.Counterparty.decode(n,n.uint32());break;case 4:o.connectionHops.push(n.string());break;case 5:o.version=n.string();break;default:n.skipType(7&e)}}return o},fromJSON:e=>({state:I(e.state)?u(e.state):0,ordering:I(e.ordering)?c(e.ordering):0,counterparty:I(e.counterparty)?t.Counterparty.fromJSON(e.counterparty):void 0,connectionHops:Array.isArray(null==e?void 0:e.connectionHops)?e.connectionHops.map(e=>String(e)):[],version:I(e.version)?String(e.version):""}),toJSON(e){let r={};return void 0!==e.state&&(r.state=d(e.state)),void 0!==e.ordering&&(r.ordering=p(e.ordering)),void 0!==e.counterparty&&(r.counterparty=e.counterparty?t.Counterparty.toJSON(e.counterparty):void 0),e.connectionHops?r.connectionHops=e.connectionHops.map(e=>e):r.connectionHops=[],void 0!==e.version&&(r.version=e.version),r},fromPartial(e){var r,n,i,o;let a=f();return a.state=null!==(r=e.state)&&void 0!==r?r:0,a.ordering=null!==(n=e.ordering)&&void 0!==n?n:0,a.counterparty=void 0!==e.counterparty&&null!==e.counterparty?t.Counterparty.fromPartial(e.counterparty):void 0,a.connectionHops=(null===(i=e.connectionHops)||void 0===i?void 0:i.map(e=>e))||[],a.version=null!==(o=e.version)&&void 0!==o?o:"",a}},t.IdentifiedChannel={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();for(let n of(0!==e.state&&r.uint32(8).int32(e.state),0!==e.ordering&&r.uint32(16).int32(e.ordering),void 0!==e.counterparty&&t.Counterparty.encode(e.counterparty,r.uint32(26).fork()).ldelim(),e.connectionHops))r.uint32(34).string(n);return""!==e.version&&r.uint32(42).string(e.version),""!==e.portId&&r.uint32(50).string(e.portId),""!==e.channelId&&r.uint32(58).string(e.channelId),r},decode(e,r){let n=e instanceof s.default.Reader?e:new s.default.Reader(e),i=void 0===r?n.len:n.pos+r,o=h();for(;n.pos>>3){case 1:o.state=n.int32();break;case 2:o.ordering=n.int32();break;case 3:o.counterparty=t.Counterparty.decode(n,n.uint32());break;case 4:o.connectionHops.push(n.string());break;case 5:o.version=n.string();break;case 6:o.portId=n.string();break;case 7:o.channelId=n.string();break;default:n.skipType(7&e)}}return o},fromJSON:e=>({state:I(e.state)?u(e.state):0,ordering:I(e.ordering)?c(e.ordering):0,counterparty:I(e.counterparty)?t.Counterparty.fromJSON(e.counterparty):void 0,connectionHops:Array.isArray(null==e?void 0:e.connectionHops)?e.connectionHops.map(e=>String(e)):[],version:I(e.version)?String(e.version):"",portId:I(e.portId)?String(e.portId):"",channelId:I(e.channelId)?String(e.channelId):""}),toJSON(e){let r={};return void 0!==e.state&&(r.state=d(e.state)),void 0!==e.ordering&&(r.ordering=p(e.ordering)),void 0!==e.counterparty&&(r.counterparty=e.counterparty?t.Counterparty.toJSON(e.counterparty):void 0),e.connectionHops?r.connectionHops=e.connectionHops.map(e=>e):r.connectionHops=[],void 0!==e.version&&(r.version=e.version),void 0!==e.portId&&(r.portId=e.portId),void 0!==e.channelId&&(r.channelId=e.channelId),r},fromPartial(e){var r,n,i,o,a,s;let l=h();return l.state=null!==(r=e.state)&&void 0!==r?r:0,l.ordering=null!==(n=e.ordering)&&void 0!==n?n:0,l.counterparty=void 0!==e.counterparty&&null!==e.counterparty?t.Counterparty.fromPartial(e.counterparty):void 0,l.connectionHops=(null===(i=e.connectionHops)||void 0===i?void 0:i.map(e=>e))||[],l.version=null!==(o=e.version)&&void 0!==o?o:"",l.portId=null!==(a=e.portId)&&void 0!==a?a:"",l.channelId=null!==(s=e.channelId)&&void 0!==s?s:"",l}},t.Counterparty={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return""!==e.portId&&t.uint32(10).string(e.portId),""!==e.channelId&&t.uint32(18).string(e.channelId),t},decode(e,t){let r=e instanceof s.default.Reader?e:new s.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=g();for(;r.pos>>3){case 1:i.portId=r.string();break;case 2:i.channelId=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({portId:I(e.portId)?String(e.portId):"",channelId:I(e.channelId)?String(e.channelId):""}),toJSON(e){let t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.channelId&&(t.channelId=e.channelId),t},fromPartial(e){var t,r;let n=g();return n.portId=null!==(t=e.portId)&&void 0!==t?t:"",n.channelId=null!==(r=e.channelId)&&void 0!==r?r:"",n}},t.Packet={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return"0"!==e.sequence&&t.uint32(8).uint64(e.sequence),""!==e.sourcePort&&t.uint32(18).string(e.sourcePort),""!==e.sourceChannel&&t.uint32(26).string(e.sourceChannel),""!==e.destinationPort&&t.uint32(34).string(e.destinationPort),""!==e.destinationChannel&&t.uint32(42).string(e.destinationChannel),0!==e.data.length&&t.uint32(50).bytes(e.data),void 0!==e.timeoutHeight&&l.Height.encode(e.timeoutHeight,t.uint32(58).fork()).ldelim(),"0"!==e.timeoutTimestamp&&t.uint32(64).uint64(e.timeoutTimestamp),t},decode(e,t){let r=e instanceof s.default.Reader?e:new s.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=m();for(;r.pos>>3){case 1:i.sequence=A(r.uint64());break;case 2:i.sourcePort=r.string();break;case 3:i.sourceChannel=r.string();break;case 4:i.destinationPort=r.string();break;case 5:i.destinationChannel=r.string();break;case 6:i.data=r.bytes();break;case 7:i.timeoutHeight=l.Height.decode(r,r.uint32());break;case 8:i.timeoutTimestamp=A(r.uint64());break;default:r.skipType(7&e)}}return i},fromJSON:e=>({sequence:I(e.sequence)?String(e.sequence):"0",sourcePort:I(e.sourcePort)?String(e.sourcePort):"",sourceChannel:I(e.sourceChannel)?String(e.sourceChannel):"",destinationPort:I(e.destinationPort)?String(e.destinationPort):"",destinationChannel:I(e.destinationChannel)?String(e.destinationChannel):"",data:I(e.data)?k(e.data):new Uint8Array,timeoutHeight:I(e.timeoutHeight)?l.Height.fromJSON(e.timeoutHeight):void 0,timeoutTimestamp:I(e.timeoutTimestamp)?String(e.timeoutTimestamp):"0"}),toJSON(e){let t={};return void 0!==e.sequence&&(t.sequence=e.sequence),void 0!==e.sourcePort&&(t.sourcePort=e.sourcePort),void 0!==e.sourceChannel&&(t.sourceChannel=e.sourceChannel),void 0!==e.destinationPort&&(t.destinationPort=e.destinationPort),void 0!==e.destinationChannel&&(t.destinationChannel=e.destinationChannel),void 0!==e.data&&(t.data=P(void 0!==e.data?e.data:new Uint8Array)),void 0!==e.timeoutHeight&&(t.timeoutHeight=e.timeoutHeight?l.Height.toJSON(e.timeoutHeight):void 0),void 0!==e.timeoutTimestamp&&(t.timeoutTimestamp=e.timeoutTimestamp),t},fromPartial(e){var t,r,n,i,o,a,s;let u=m();return u.sequence=null!==(t=e.sequence)&&void 0!==t?t:"0",u.sourcePort=null!==(r=e.sourcePort)&&void 0!==r?r:"",u.sourceChannel=null!==(n=e.sourceChannel)&&void 0!==n?n:"",u.destinationPort=null!==(i=e.destinationPort)&&void 0!==i?i:"",u.destinationChannel=null!==(o=e.destinationChannel)&&void 0!==o?o:"",u.data=null!==(a=e.data)&&void 0!==a?a:new Uint8Array,u.timeoutHeight=void 0!==e.timeoutHeight&&null!==e.timeoutHeight?l.Height.fromPartial(e.timeoutHeight):void 0,u.timeoutTimestamp=null!==(s=e.timeoutTimestamp)&&void 0!==s?s:"0",u}},t.PacketState={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return""!==e.portId&&t.uint32(10).string(e.portId),""!==e.channelId&&t.uint32(18).string(e.channelId),"0"!==e.sequence&&t.uint32(24).uint64(e.sequence),0!==e.data.length&&t.uint32(34).bytes(e.data),t},decode(e,t){let r=e instanceof s.default.Reader?e:new s.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=y();for(;r.pos>>3){case 1:i.portId=r.string();break;case 2:i.channelId=r.string();break;case 3:i.sequence=A(r.uint64());break;case 4:i.data=r.bytes();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({portId:I(e.portId)?String(e.portId):"",channelId:I(e.channelId)?String(e.channelId):"",sequence:I(e.sequence)?String(e.sequence):"0",data:I(e.data)?k(e.data):new Uint8Array}),toJSON(e){let t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.channelId&&(t.channelId=e.channelId),void 0!==e.sequence&&(t.sequence=e.sequence),void 0!==e.data&&(t.data=P(void 0!==e.data?e.data:new Uint8Array)),t},fromPartial(e){var t,r,n,i;let o=y();return o.portId=null!==(t=e.portId)&&void 0!==t?t:"",o.channelId=null!==(r=e.channelId)&&void 0!==r?r:"",o.sequence=null!==(n=e.sequence)&&void 0!==n?n:"0",o.data=null!==(i=e.data)&&void 0!==i?i:new Uint8Array,o}},t.PacketId={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return""!==e.portId&&t.uint32(10).string(e.portId),""!==e.channelId&&t.uint32(18).string(e.channelId),"0"!==e.sequence&&t.uint32(24).uint64(e.sequence),t},decode(e,t){let r=e instanceof s.default.Reader?e:new s.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=v();for(;r.pos>>3){case 1:i.portId=r.string();break;case 2:i.channelId=r.string();break;case 3:i.sequence=A(r.uint64());break;default:r.skipType(7&e)}}return i},fromJSON:e=>({portId:I(e.portId)?String(e.portId):"",channelId:I(e.channelId)?String(e.channelId):"",sequence:I(e.sequence)?String(e.sequence):"0"}),toJSON(e){let t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.channelId&&(t.channelId=e.channelId),void 0!==e.sequence&&(t.sequence=e.sequence),t},fromPartial(e){var t,r,n;let i=v();return i.portId=null!==(t=e.portId)&&void 0!==t?t:"",i.channelId=null!==(r=e.channelId)&&void 0!==r?r:"",i.sequence=null!==(n=e.sequence)&&void 0!==n?n:"0",i}},t.Acknowledgement={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return void 0!==e.result&&t.uint32(170).bytes(e.result),void 0!==e.error&&t.uint32(178).string(e.error),t},decode(e,t){let r=e instanceof s.default.Reader?e:new s.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=b();for(;r.pos>>3){case 21:i.result=r.bytes();break;case 22:i.error=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({result:I(e.result)?k(e.result):void 0,error:I(e.error)?String(e.error):void 0}),toJSON(e){let t={};return void 0!==e.result&&(t.result=void 0!==e.result?P(e.result):void 0),void 0!==e.error&&(t.error=e.error),t},fromPartial(e){var t,r;let n=b();return n.result=null!==(t=e.result)&&void 0!==t?t:void 0,n.error=null!==(r=e.error)&&void 0!==r?r:void 0,n}},t.Timeout={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return void 0!==e.height&&l.Height.encode(e.height,t.uint32(10).fork()).ldelim(),"0"!==e.timestamp&&t.uint32(16).uint64(e.timestamp),t},decode(e,t){let r=e instanceof s.default.Reader?e:new s.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=S();for(;r.pos>>3){case 1:i.height=l.Height.decode(r,r.uint32());break;case 2:i.timestamp=A(r.uint64());break;default:r.skipType(7&e)}}return i},fromJSON:e=>({height:I(e.height)?l.Height.fromJSON(e.height):void 0,timestamp:I(e.timestamp)?String(e.timestamp):"0"}),toJSON(e){let t={};return void 0!==e.height&&(t.height=e.height?l.Height.toJSON(e.height):void 0),void 0!==e.timestamp&&(t.timestamp=e.timestamp),t},fromPartial(e){var t;let r=S();return r.height=void 0!==e.height&&null!==e.height?l.Height.fromPartial(e.height):void 0,r.timestamp=null!==(t=e.timestamp)&&void 0!==t?t:"0",r}};var w=void 0!==w?w:"undefined"!=typeof self?self:window;let _=w.atob||(e=>w.Buffer.from(e,"base64").toString("binary"));function k(e){let t=_(e),r=new Uint8Array(t.length);for(let e=0;ew.Buffer.from(e,"binary").toString("base64"));function P(e){let t=[];for(let r of e)t.push(String.fromCharCode(r));return O(t.join(""))}function A(e){return e.toString()}function I(e){return null!=e}s.default.util.Long!==a.default&&(s.default.util.Long=a.default,s.default.configure())},85182:function(e,t,r){"use strict";var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Params=t.Height=t.UpgradeProposal=t.ClientUpdateProposal=t.ClientConsensusStates=t.ConsensusStateWithHeight=t.IdentifiedClientState=t.protobufPackage=void 0;let i=n(r(40059)),o=n(r(81667)),a=r(28446),s=r(94464);function l(){return{clientId:"",clientState:void 0}}function u(){return{height:void 0,consensusState:void 0}}function d(){return{clientId:"",consensusStates:[]}}function c(){return{title:"",description:"",subjectClientId:"",substituteClientId:""}}function p(){return{title:"",description:"",plan:void 0,upgradedClientState:void 0}}function f(){return{revisionNumber:"0",revisionHeight:"0"}}function h(){return{allowedClients:[]}}function g(e){return e.toString()}function m(e){return null!=e}t.protobufPackage="ibc.core.client.v1",t.IdentifiedClientState={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.clientId&&t.uint32(10).string(e.clientId),void 0!==e.clientState&&a.Any.encode(e.clientState,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=l();for(;r.pos>>3){case 1:i.clientId=r.string();break;case 2:i.clientState=a.Any.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON:e=>({clientId:m(e.clientId)?String(e.clientId):"",clientState:m(e.clientState)?a.Any.fromJSON(e.clientState):void 0}),toJSON(e){let t={};return void 0!==e.clientId&&(t.clientId=e.clientId),void 0!==e.clientState&&(t.clientState=e.clientState?a.Any.toJSON(e.clientState):void 0),t},fromPartial(e){var t;let r=l();return r.clientId=null!==(t=e.clientId)&&void 0!==t?t:"",r.clientState=void 0!==e.clientState&&null!==e.clientState?a.Any.fromPartial(e.clientState):void 0,r}},t.ConsensusStateWithHeight={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return void 0!==e.height&&t.Height.encode(e.height,r.uint32(10).fork()).ldelim(),void 0!==e.consensusState&&a.Any.encode(e.consensusState,r.uint32(18).fork()).ldelim(),r},decode(e,r){let n=e instanceof o.default.Reader?e:new o.default.Reader(e),i=void 0===r?n.len:n.pos+r,s=u();for(;n.pos>>3){case 1:s.height=t.Height.decode(n,n.uint32());break;case 2:s.consensusState=a.Any.decode(n,n.uint32());break;default:n.skipType(7&e)}}return s},fromJSON:e=>({height:m(e.height)?t.Height.fromJSON(e.height):void 0,consensusState:m(e.consensusState)?a.Any.fromJSON(e.consensusState):void 0}),toJSON(e){let r={};return void 0!==e.height&&(r.height=e.height?t.Height.toJSON(e.height):void 0),void 0!==e.consensusState&&(r.consensusState=e.consensusState?a.Any.toJSON(e.consensusState):void 0),r},fromPartial(e){let r=u();return r.height=void 0!==e.height&&null!==e.height?t.Height.fromPartial(e.height):void 0,r.consensusState=void 0!==e.consensusState&&null!==e.consensusState?a.Any.fromPartial(e.consensusState):void 0,r}},t.ClientConsensusStates={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();for(let n of(""!==e.clientId&&r.uint32(10).string(e.clientId),e.consensusStates))t.ConsensusStateWithHeight.encode(n,r.uint32(18).fork()).ldelim();return r},decode(e,r){let n=e instanceof o.default.Reader?e:new o.default.Reader(e),i=void 0===r?n.len:n.pos+r,a=d();for(;n.pos>>3){case 1:a.clientId=n.string();break;case 2:a.consensusStates.push(t.ConsensusStateWithHeight.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return a},fromJSON:e=>({clientId:m(e.clientId)?String(e.clientId):"",consensusStates:Array.isArray(null==e?void 0:e.consensusStates)?e.consensusStates.map(e=>t.ConsensusStateWithHeight.fromJSON(e)):[]}),toJSON(e){let r={};return void 0!==e.clientId&&(r.clientId=e.clientId),e.consensusStates?r.consensusStates=e.consensusStates.map(e=>e?t.ConsensusStateWithHeight.toJSON(e):void 0):r.consensusStates=[],r},fromPartial(e){var r,n;let i=d();return i.clientId=null!==(r=e.clientId)&&void 0!==r?r:"",i.consensusStates=(null===(n=e.consensusStates)||void 0===n?void 0:n.map(e=>t.ConsensusStateWithHeight.fromPartial(e)))||[],i}},t.ClientUpdateProposal={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.title&&t.uint32(10).string(e.title),""!==e.description&&t.uint32(18).string(e.description),""!==e.subjectClientId&&t.uint32(26).string(e.subjectClientId),""!==e.substituteClientId&&t.uint32(34).string(e.substituteClientId),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=c();for(;r.pos>>3){case 1:i.title=r.string();break;case 2:i.description=r.string();break;case 3:i.subjectClientId=r.string();break;case 4:i.substituteClientId=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({title:m(e.title)?String(e.title):"",description:m(e.description)?String(e.description):"",subjectClientId:m(e.subjectClientId)?String(e.subjectClientId):"",substituteClientId:m(e.substituteClientId)?String(e.substituteClientId):""}),toJSON(e){let t={};return void 0!==e.title&&(t.title=e.title),void 0!==e.description&&(t.description=e.description),void 0!==e.subjectClientId&&(t.subjectClientId=e.subjectClientId),void 0!==e.substituteClientId&&(t.substituteClientId=e.substituteClientId),t},fromPartial(e){var t,r,n,i;let o=c();return o.title=null!==(t=e.title)&&void 0!==t?t:"",o.description=null!==(r=e.description)&&void 0!==r?r:"",o.subjectClientId=null!==(n=e.subjectClientId)&&void 0!==n?n:"",o.substituteClientId=null!==(i=e.substituteClientId)&&void 0!==i?i:"",o}},t.UpgradeProposal={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.title&&t.uint32(10).string(e.title),""!==e.description&&t.uint32(18).string(e.description),void 0!==e.plan&&s.Plan.encode(e.plan,t.uint32(26).fork()).ldelim(),void 0!==e.upgradedClientState&&a.Any.encode(e.upgradedClientState,t.uint32(34).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=p();for(;r.pos>>3){case 1:i.title=r.string();break;case 2:i.description=r.string();break;case 3:i.plan=s.Plan.decode(r,r.uint32());break;case 4:i.upgradedClientState=a.Any.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON:e=>({title:m(e.title)?String(e.title):"",description:m(e.description)?String(e.description):"",plan:m(e.plan)?s.Plan.fromJSON(e.plan):void 0,upgradedClientState:m(e.upgradedClientState)?a.Any.fromJSON(e.upgradedClientState):void 0}),toJSON(e){let t={};return void 0!==e.title&&(t.title=e.title),void 0!==e.description&&(t.description=e.description),void 0!==e.plan&&(t.plan=e.plan?s.Plan.toJSON(e.plan):void 0),void 0!==e.upgradedClientState&&(t.upgradedClientState=e.upgradedClientState?a.Any.toJSON(e.upgradedClientState):void 0),t},fromPartial(e){var t,r;let n=p();return n.title=null!==(t=e.title)&&void 0!==t?t:"",n.description=null!==(r=e.description)&&void 0!==r?r:"",n.plan=void 0!==e.plan&&null!==e.plan?s.Plan.fromPartial(e.plan):void 0,n.upgradedClientState=void 0!==e.upgradedClientState&&null!==e.upgradedClientState?a.Any.fromPartial(e.upgradedClientState):void 0,n}},t.Height={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return"0"!==e.revisionNumber&&t.uint32(8).uint64(e.revisionNumber),"0"!==e.revisionHeight&&t.uint32(16).uint64(e.revisionHeight),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=f();for(;r.pos>>3){case 1:i.revisionNumber=g(r.uint64());break;case 2:i.revisionHeight=g(r.uint64());break;default:r.skipType(7&e)}}return i},fromJSON:e=>({revisionNumber:m(e.revisionNumber)?String(e.revisionNumber):"0",revisionHeight:m(e.revisionHeight)?String(e.revisionHeight):"0"}),toJSON(e){let t={};return void 0!==e.revisionNumber&&(t.revisionNumber=e.revisionNumber),void 0!==e.revisionHeight&&(t.revisionHeight=e.revisionHeight),t},fromPartial(e){var t,r;let n=f();return n.revisionNumber=null!==(t=e.revisionNumber)&&void 0!==t?t:"0",n.revisionHeight=null!==(r=e.revisionHeight)&&void 0!==r?r:"0",n}},t.Params={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();for(let r of e.allowedClients)t.uint32(10).string(r);return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=h();for(;r.pos>>3==1?i.allowedClients.push(r.string()):r.skipType(7&e)}return i},fromJSON:e=>({allowedClients:Array.isArray(null==e?void 0:e.allowedClients)?e.allowedClients.map(e=>String(e)):[]}),toJSON(e){let t={};return e.allowedClients?t.allowedClients=e.allowedClients.map(e=>e):t.allowedClients=[],t},fromPartial(e){var t;let r=h();return r.allowedClients=(null===(t=e.allowedClients)||void 0===t?void 0:t.map(e=>e))||[],r}},o.default.util.Long!==i.default&&(o.default.util.Long=i.default,o.default.configure())},18811:function(e,t,r){"use strict";var n,i=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.iCAAccountTypeToJSON=t.iCAAccountTypeFromJSON=t.ICAAccountType=t.protobufPackage=void 0;let o=i(r(40059)),a=i(r(81667));function s(e){switch(e){case 0:case"DELEGATION":return n.DELEGATION;case 1:case"FEE":return n.FEE;case 2:case"WITHDRAWAL":return n.WITHDRAWAL;case 3:case"REDEMPTION":return n.REDEMPTION;default:return n.UNRECOGNIZED}}function l(e){switch(e){case n.DELEGATION:return"DELEGATION";case n.FEE:return"FEE";case n.WITHDRAWAL:return"WITHDRAWAL";case n.REDEMPTION:return"REDEMPTION";default:return"UNKNOWN"}}t.protobufPackage="stride.stakeibc",function(e){e[e.DELEGATION=0]="DELEGATION",e[e.FEE=1]="FEE",e[e.WITHDRAWAL=2]="WITHDRAWAL",e[e.REDEMPTION=3]="REDEMPTION",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(n=t.ICAAccountType||(t.ICAAccountType={})),t.iCAAccountTypeFromJSON=s,t.iCAAccountTypeToJSON=l,a.default.util.Long!==o.default&&(a.default.util.Long=o.default,a.default.configure())},97583:function(e,t,r){"use strict";var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MsgCalibrateDelegationResponse=t.MsgCalibrateDelegation=t.MsgUndelegateHostResponse=t.MsgUndelegateHost=t.MsgUpdateValidatorSharesExchRateResponse=t.MsgUpdateValidatorSharesExchRate=t.MsgRestoreInterchainAccountResponse=t.MsgRestoreInterchainAccount=t.MsgDeleteValidatorResponse=t.MsgDeleteValidator=t.MsgChangeValidatorWeightResponse=t.MsgChangeValidatorWeight=t.MsgAddValidatorsResponse=t.MsgAddValidators=t.MsgRebalanceValidatorsResponse=t.MsgRebalanceValidators=t.MsgClaimUndelegatedTokensResponse=t.MsgClaimUndelegatedTokens=t.MsgRegisterHostZoneResponse=t.MsgRegisterHostZone=t.MsgRedeemStakeResponse=t.MsgRedeemStake=t.MsgClearBalanceResponse=t.MsgClearBalance=t.MsgLSMLiquidStakeResponse=t.MsgLSMLiquidStake=t.MsgLiquidStakeResponse=t.MsgLiquidStake=t.MsgUpdateInnerRedemptionRateBoundsResponse=t.MsgUpdateInnerRedemptionRateBounds=t.protobufPackage=void 0;let i=n(r(40059)),o=n(r(81667)),a=r(18811),s=r(50980);function l(){return{creator:"",chainId:"",minInnerRedemptionRate:"",maxInnerRedemptionRate:""}}function u(){return{}}function d(){return{creator:"",amount:"",hostDenom:""}}function c(){return{}}function p(){return{creator:"",amount:"",lsmTokenIbcDenom:""}}function f(){return{transactionComplete:!1}}function h(){return{creator:"",chainId:"",amount:"",channel:""}}function g(){return{}}function m(){return{creator:"",amount:"",hostZone:"",receiver:""}}function y(){return{}}function v(){return{connectionId:"",bech32prefix:"",hostDenom:"",ibcDenom:"",creator:"",transferChannelId:"",unbondingPeriod:"0",minRedemptionRate:"",maxRedemptionRate:"",lsmLiquidStakeEnabled:!1}}function b(){return{}}function S(){return{creator:"",hostZoneId:"",epoch:"0",sender:""}}function w(){return{}}function _(){return{creator:"",hostZone:"",numRebalance:"0"}}function k(){return{}}function O(){return{creator:"",hostZone:"",validators:[]}}function P(){return{}}function A(){return{creator:"",hostZone:"",valAddr:"",weight:"0"}}function I(){return{}}function R(){return{creator:"",hostZone:"",valAddr:""}}function E(){return{}}function T(){return{creator:"",chainId:"",accountType:0}}function N(){return{}}function x(){return{creator:"",chainId:"",valoper:""}}function B(){return{}}function C(){return{creator:"",amount:""}}function M(){return{}}function D(){return{creator:"",chainId:"",valoper:""}}function U(){return{}}function J(e){return e.toString()}function j(e){return null!=e}t.protobufPackage="stride.stakeibc",t.MsgUpdateInnerRedemptionRateBounds={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.creator&&t.uint32(10).string(e.creator),""!==e.chainId&&t.uint32(18).string(e.chainId),""!==e.minInnerRedemptionRate&&t.uint32(26).string(e.minInnerRedemptionRate),""!==e.maxInnerRedemptionRate&&t.uint32(34).string(e.maxInnerRedemptionRate),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=l();for(;r.pos>>3){case 1:i.creator=r.string();break;case 2:i.chainId=r.string();break;case 3:i.minInnerRedemptionRate=r.string();break;case 4:i.maxInnerRedemptionRate=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({creator:j(e.creator)?String(e.creator):"",chainId:j(e.chainId)?String(e.chainId):"",minInnerRedemptionRate:j(e.minInnerRedemptionRate)?String(e.minInnerRedemptionRate):"",maxInnerRedemptionRate:j(e.maxInnerRedemptionRate)?String(e.maxInnerRedemptionRate):""}),toJSON(e){let t={};return void 0!==e.creator&&(t.creator=e.creator),void 0!==e.chainId&&(t.chainId=e.chainId),void 0!==e.minInnerRedemptionRate&&(t.minInnerRedemptionRate=e.minInnerRedemptionRate),void 0!==e.maxInnerRedemptionRate&&(t.maxInnerRedemptionRate=e.maxInnerRedemptionRate),t},fromPartial(e){var t,r,n,i;let o=l();return o.creator=null!==(t=e.creator)&&void 0!==t?t:"",o.chainId=null!==(r=e.chainId)&&void 0!==r?r:"",o.minInnerRedemptionRate=null!==(n=e.minInnerRedemptionRate)&&void 0!==n?n:"",o.maxInnerRedemptionRate=null!==(i=e.maxInnerRedemptionRate)&&void 0!==i?i:"",o}},t.MsgUpdateInnerRedemptionRateBoundsResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=u();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>u()},t.MsgLiquidStake={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.creator&&t.uint32(10).string(e.creator),""!==e.amount&&t.uint32(18).string(e.amount),""!==e.hostDenom&&t.uint32(26).string(e.hostDenom),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=d();for(;r.pos>>3){case 1:i.creator=r.string();break;case 2:i.amount=r.string();break;case 3:i.hostDenom=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({creator:j(e.creator)?String(e.creator):"",amount:j(e.amount)?String(e.amount):"",hostDenom:j(e.hostDenom)?String(e.hostDenom):""}),toJSON(e){let t={};return void 0!==e.creator&&(t.creator=e.creator),void 0!==e.amount&&(t.amount=e.amount),void 0!==e.hostDenom&&(t.hostDenom=e.hostDenom),t},fromPartial(e){var t,r,n;let i=d();return i.creator=null!==(t=e.creator)&&void 0!==t?t:"",i.amount=null!==(r=e.amount)&&void 0!==r?r:"",i.hostDenom=null!==(n=e.hostDenom)&&void 0!==n?n:"",i}},t.MsgLiquidStakeResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=c();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>c()},t.MsgLSMLiquidStake={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.creator&&t.uint32(10).string(e.creator),""!==e.amount&&t.uint32(18).string(e.amount),""!==e.lsmTokenIbcDenom&&t.uint32(26).string(e.lsmTokenIbcDenom),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=p();for(;r.pos>>3){case 1:i.creator=r.string();break;case 2:i.amount=r.string();break;case 3:i.lsmTokenIbcDenom=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({creator:j(e.creator)?String(e.creator):"",amount:j(e.amount)?String(e.amount):"",lsmTokenIbcDenom:j(e.lsmTokenIbcDenom)?String(e.lsmTokenIbcDenom):""}),toJSON(e){let t={};return void 0!==e.creator&&(t.creator=e.creator),void 0!==e.amount&&(t.amount=e.amount),void 0!==e.lsmTokenIbcDenom&&(t.lsmTokenIbcDenom=e.lsmTokenIbcDenom),t},fromPartial(e){var t,r,n;let i=p();return i.creator=null!==(t=e.creator)&&void 0!==t?t:"",i.amount=null!==(r=e.amount)&&void 0!==r?r:"",i.lsmTokenIbcDenom=null!==(n=e.lsmTokenIbcDenom)&&void 0!==n?n:"",i}},t.MsgLSMLiquidStakeResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return!0===e.transactionComplete&&t.uint32(8).bool(e.transactionComplete),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=f();for(;r.pos>>3==1?i.transactionComplete=r.bool():r.skipType(7&e)}return i},fromJSON:e=>({transactionComplete:!!j(e.transactionComplete)&&!!e.transactionComplete}),toJSON(e){let t={};return void 0!==e.transactionComplete&&(t.transactionComplete=e.transactionComplete),t},fromPartial(e){var t;let r=f();return r.transactionComplete=null!==(t=e.transactionComplete)&&void 0!==t&&t,r}},t.MsgClearBalance={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.creator&&t.uint32(10).string(e.creator),""!==e.chainId&&t.uint32(18).string(e.chainId),""!==e.amount&&t.uint32(26).string(e.amount),""!==e.channel&&t.uint32(34).string(e.channel),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=h();for(;r.pos>>3){case 1:i.creator=r.string();break;case 2:i.chainId=r.string();break;case 3:i.amount=r.string();break;case 4:i.channel=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({creator:j(e.creator)?String(e.creator):"",chainId:j(e.chainId)?String(e.chainId):"",amount:j(e.amount)?String(e.amount):"",channel:j(e.channel)?String(e.channel):""}),toJSON(e){let t={};return void 0!==e.creator&&(t.creator=e.creator),void 0!==e.chainId&&(t.chainId=e.chainId),void 0!==e.amount&&(t.amount=e.amount),void 0!==e.channel&&(t.channel=e.channel),t},fromPartial(e){var t,r,n,i;let o=h();return o.creator=null!==(t=e.creator)&&void 0!==t?t:"",o.chainId=null!==(r=e.chainId)&&void 0!==r?r:"",o.amount=null!==(n=e.amount)&&void 0!==n?n:"",o.channel=null!==(i=e.channel)&&void 0!==i?i:"",o}},t.MsgClearBalanceResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=g();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>g()},t.MsgRedeemStake={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.creator&&t.uint32(10).string(e.creator),""!==e.amount&&t.uint32(18).string(e.amount),""!==e.hostZone&&t.uint32(26).string(e.hostZone),""!==e.receiver&&t.uint32(34).string(e.receiver),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=m();for(;r.pos>>3){case 1:i.creator=r.string();break;case 2:i.amount=r.string();break;case 3:i.hostZone=r.string();break;case 4:i.receiver=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({creator:j(e.creator)?String(e.creator):"",amount:j(e.amount)?String(e.amount):"",hostZone:j(e.hostZone)?String(e.hostZone):"",receiver:j(e.receiver)?String(e.receiver):""}),toJSON(e){let t={};return void 0!==e.creator&&(t.creator=e.creator),void 0!==e.amount&&(t.amount=e.amount),void 0!==e.hostZone&&(t.hostZone=e.hostZone),void 0!==e.receiver&&(t.receiver=e.receiver),t},fromPartial(e){var t,r,n,i;let o=m();return o.creator=null!==(t=e.creator)&&void 0!==t?t:"",o.amount=null!==(r=e.amount)&&void 0!==r?r:"",o.hostZone=null!==(n=e.hostZone)&&void 0!==n?n:"",o.receiver=null!==(i=e.receiver)&&void 0!==i?i:"",o}},t.MsgRedeemStakeResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=y();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>y()},t.MsgRegisterHostZone={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.connectionId&&t.uint32(18).string(e.connectionId),""!==e.bech32prefix&&t.uint32(98).string(e.bech32prefix),""!==e.hostDenom&&t.uint32(34).string(e.hostDenom),""!==e.ibcDenom&&t.uint32(42).string(e.ibcDenom),""!==e.creator&&t.uint32(50).string(e.creator),""!==e.transferChannelId&&t.uint32(82).string(e.transferChannelId),"0"!==e.unbondingPeriod&&t.uint32(88).uint64(e.unbondingPeriod),""!==e.minRedemptionRate&&t.uint32(106).string(e.minRedemptionRate),""!==e.maxRedemptionRate&&t.uint32(114).string(e.maxRedemptionRate),!0===e.lsmLiquidStakeEnabled&&t.uint32(120).bool(e.lsmLiquidStakeEnabled),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=v();for(;r.pos>>3){case 2:i.connectionId=r.string();break;case 12:i.bech32prefix=r.string();break;case 4:i.hostDenom=r.string();break;case 5:i.ibcDenom=r.string();break;case 6:i.creator=r.string();break;case 10:i.transferChannelId=r.string();break;case 11:i.unbondingPeriod=J(r.uint64());break;case 13:i.minRedemptionRate=r.string();break;case 14:i.maxRedemptionRate=r.string();break;case 15:i.lsmLiquidStakeEnabled=r.bool();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({connectionId:j(e.connectionId)?String(e.connectionId):"",bech32prefix:j(e.bech32prefix)?String(e.bech32prefix):"",hostDenom:j(e.hostDenom)?String(e.hostDenom):"",ibcDenom:j(e.ibcDenom)?String(e.ibcDenom):"",creator:j(e.creator)?String(e.creator):"",transferChannelId:j(e.transferChannelId)?String(e.transferChannelId):"",unbondingPeriod:j(e.unbondingPeriod)?String(e.unbondingPeriod):"0",minRedemptionRate:j(e.minRedemptionRate)?String(e.minRedemptionRate):"",maxRedemptionRate:j(e.maxRedemptionRate)?String(e.maxRedemptionRate):"",lsmLiquidStakeEnabled:!!j(e.lsmLiquidStakeEnabled)&&!!e.lsmLiquidStakeEnabled}),toJSON(e){let t={};return void 0!==e.connectionId&&(t.connectionId=e.connectionId),void 0!==e.bech32prefix&&(t.bech32prefix=e.bech32prefix),void 0!==e.hostDenom&&(t.hostDenom=e.hostDenom),void 0!==e.ibcDenom&&(t.ibcDenom=e.ibcDenom),void 0!==e.creator&&(t.creator=e.creator),void 0!==e.transferChannelId&&(t.transferChannelId=e.transferChannelId),void 0!==e.unbondingPeriod&&(t.unbondingPeriod=e.unbondingPeriod),void 0!==e.minRedemptionRate&&(t.minRedemptionRate=e.minRedemptionRate),void 0!==e.maxRedemptionRate&&(t.maxRedemptionRate=e.maxRedemptionRate),void 0!==e.lsmLiquidStakeEnabled&&(t.lsmLiquidStakeEnabled=e.lsmLiquidStakeEnabled),t},fromPartial(e){var t,r,n,i,o,a,s,l,u,d;let c=v();return c.connectionId=null!==(t=e.connectionId)&&void 0!==t?t:"",c.bech32prefix=null!==(r=e.bech32prefix)&&void 0!==r?r:"",c.hostDenom=null!==(n=e.hostDenom)&&void 0!==n?n:"",c.ibcDenom=null!==(i=e.ibcDenom)&&void 0!==i?i:"",c.creator=null!==(o=e.creator)&&void 0!==o?o:"",c.transferChannelId=null!==(a=e.transferChannelId)&&void 0!==a?a:"",c.unbondingPeriod=null!==(s=e.unbondingPeriod)&&void 0!==s?s:"0",c.minRedemptionRate=null!==(l=e.minRedemptionRate)&&void 0!==l?l:"",c.maxRedemptionRate=null!==(u=e.maxRedemptionRate)&&void 0!==u?u:"",c.lsmLiquidStakeEnabled=null!==(d=e.lsmLiquidStakeEnabled)&&void 0!==d&&d,c}},t.MsgRegisterHostZoneResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=b();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>b()},t.MsgClaimUndelegatedTokens={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.creator&&t.uint32(10).string(e.creator),""!==e.hostZoneId&&t.uint32(18).string(e.hostZoneId),"0"!==e.epoch&&t.uint32(24).uint64(e.epoch),""!==e.sender&&t.uint32(34).string(e.sender),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=S();for(;r.pos>>3){case 1:i.creator=r.string();break;case 2:i.hostZoneId=r.string();break;case 3:i.epoch=J(r.uint64());break;case 4:i.sender=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({creator:j(e.creator)?String(e.creator):"",hostZoneId:j(e.hostZoneId)?String(e.hostZoneId):"",epoch:j(e.epoch)?String(e.epoch):"0",sender:j(e.sender)?String(e.sender):""}),toJSON(e){let t={};return void 0!==e.creator&&(t.creator=e.creator),void 0!==e.hostZoneId&&(t.hostZoneId=e.hostZoneId),void 0!==e.epoch&&(t.epoch=e.epoch),void 0!==e.sender&&(t.sender=e.sender),t},fromPartial(e){var t,r,n,i;let o=S();return o.creator=null!==(t=e.creator)&&void 0!==t?t:"",o.hostZoneId=null!==(r=e.hostZoneId)&&void 0!==r?r:"",o.epoch=null!==(n=e.epoch)&&void 0!==n?n:"0",o.sender=null!==(i=e.sender)&&void 0!==i?i:"",o}},t.MsgClaimUndelegatedTokensResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=w();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>w()},t.MsgRebalanceValidators={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.creator&&t.uint32(10).string(e.creator),""!==e.hostZone&&t.uint32(18).string(e.hostZone),"0"!==e.numRebalance&&t.uint32(24).uint64(e.numRebalance),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=_();for(;r.pos>>3){case 1:i.creator=r.string();break;case 2:i.hostZone=r.string();break;case 3:i.numRebalance=J(r.uint64());break;default:r.skipType(7&e)}}return i},fromJSON:e=>({creator:j(e.creator)?String(e.creator):"",hostZone:j(e.hostZone)?String(e.hostZone):"",numRebalance:j(e.numRebalance)?String(e.numRebalance):"0"}),toJSON(e){let t={};return void 0!==e.creator&&(t.creator=e.creator),void 0!==e.hostZone&&(t.hostZone=e.hostZone),void 0!==e.numRebalance&&(t.numRebalance=e.numRebalance),t},fromPartial(e){var t,r,n;let i=_();return i.creator=null!==(t=e.creator)&&void 0!==t?t:"",i.hostZone=null!==(r=e.hostZone)&&void 0!==r?r:"",i.numRebalance=null!==(n=e.numRebalance)&&void 0!==n?n:"0",i}},t.MsgRebalanceValidatorsResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=k();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>k()},t.MsgAddValidators={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();for(let r of(""!==e.creator&&t.uint32(10).string(e.creator),""!==e.hostZone&&t.uint32(18).string(e.hostZone),e.validators))s.Validator.encode(r,t.uint32(26).fork()).ldelim();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=O();for(;r.pos>>3){case 1:i.creator=r.string();break;case 2:i.hostZone=r.string();break;case 3:i.validators.push(s.Validator.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return i},fromJSON:e=>({creator:j(e.creator)?String(e.creator):"",hostZone:j(e.hostZone)?String(e.hostZone):"",validators:Array.isArray(null==e?void 0:e.validators)?e.validators.map(e=>s.Validator.fromJSON(e)):[]}),toJSON(e){let t={};return void 0!==e.creator&&(t.creator=e.creator),void 0!==e.hostZone&&(t.hostZone=e.hostZone),e.validators?t.validators=e.validators.map(e=>e?s.Validator.toJSON(e):void 0):t.validators=[],t},fromPartial(e){var t,r,n;let i=O();return i.creator=null!==(t=e.creator)&&void 0!==t?t:"",i.hostZone=null!==(r=e.hostZone)&&void 0!==r?r:"",i.validators=(null===(n=e.validators)||void 0===n?void 0:n.map(e=>s.Validator.fromPartial(e)))||[],i}},t.MsgAddValidatorsResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=P();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>P()},t.MsgChangeValidatorWeight={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.creator&&t.uint32(10).string(e.creator),""!==e.hostZone&&t.uint32(18).string(e.hostZone),""!==e.valAddr&&t.uint32(26).string(e.valAddr),"0"!==e.weight&&t.uint32(32).uint64(e.weight),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=A();for(;r.pos>>3){case 1:i.creator=r.string();break;case 2:i.hostZone=r.string();break;case 3:i.valAddr=r.string();break;case 4:i.weight=J(r.uint64());break;default:r.skipType(7&e)}}return i},fromJSON:e=>({creator:j(e.creator)?String(e.creator):"",hostZone:j(e.hostZone)?String(e.hostZone):"",valAddr:j(e.valAddr)?String(e.valAddr):"",weight:j(e.weight)?String(e.weight):"0"}),toJSON(e){let t={};return void 0!==e.creator&&(t.creator=e.creator),void 0!==e.hostZone&&(t.hostZone=e.hostZone),void 0!==e.valAddr&&(t.valAddr=e.valAddr),void 0!==e.weight&&(t.weight=e.weight),t},fromPartial(e){var t,r,n,i;let o=A();return o.creator=null!==(t=e.creator)&&void 0!==t?t:"",o.hostZone=null!==(r=e.hostZone)&&void 0!==r?r:"",o.valAddr=null!==(n=e.valAddr)&&void 0!==n?n:"",o.weight=null!==(i=e.weight)&&void 0!==i?i:"0",o}},t.MsgChangeValidatorWeightResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=I();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>I()},t.MsgDeleteValidator={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.creator&&t.uint32(10).string(e.creator),""!==e.hostZone&&t.uint32(18).string(e.hostZone),""!==e.valAddr&&t.uint32(26).string(e.valAddr),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=R();for(;r.pos>>3){case 1:i.creator=r.string();break;case 2:i.hostZone=r.string();break;case 3:i.valAddr=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({creator:j(e.creator)?String(e.creator):"",hostZone:j(e.hostZone)?String(e.hostZone):"",valAddr:j(e.valAddr)?String(e.valAddr):""}),toJSON(e){let t={};return void 0!==e.creator&&(t.creator=e.creator),void 0!==e.hostZone&&(t.hostZone=e.hostZone),void 0!==e.valAddr&&(t.valAddr=e.valAddr),t},fromPartial(e){var t,r,n;let i=R();return i.creator=null!==(t=e.creator)&&void 0!==t?t:"",i.hostZone=null!==(r=e.hostZone)&&void 0!==r?r:"",i.valAddr=null!==(n=e.valAddr)&&void 0!==n?n:"",i}},t.MsgDeleteValidatorResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=E();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>E()},t.MsgRestoreInterchainAccount={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.creator&&t.uint32(10).string(e.creator),""!==e.chainId&&t.uint32(18).string(e.chainId),0!==e.accountType&&t.uint32(24).int32(e.accountType),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=T();for(;r.pos>>3){case 1:i.creator=r.string();break;case 2:i.chainId=r.string();break;case 3:i.accountType=r.int32();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({creator:j(e.creator)?String(e.creator):"",chainId:j(e.chainId)?String(e.chainId):"",accountType:j(e.accountType)?(0,a.iCAAccountTypeFromJSON)(e.accountType):0}),toJSON(e){let t={};return void 0!==e.creator&&(t.creator=e.creator),void 0!==e.chainId&&(t.chainId=e.chainId),void 0!==e.accountType&&(t.accountType=(0,a.iCAAccountTypeToJSON)(e.accountType)),t},fromPartial(e){var t,r,n;let i=T();return i.creator=null!==(t=e.creator)&&void 0!==t?t:"",i.chainId=null!==(r=e.chainId)&&void 0!==r?r:"",i.accountType=null!==(n=e.accountType)&&void 0!==n?n:0,i}},t.MsgRestoreInterchainAccountResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=N();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>N()},t.MsgUpdateValidatorSharesExchRate={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.creator&&t.uint32(10).string(e.creator),""!==e.chainId&&t.uint32(18).string(e.chainId),""!==e.valoper&&t.uint32(26).string(e.valoper),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=x();for(;r.pos>>3){case 1:i.creator=r.string();break;case 2:i.chainId=r.string();break;case 3:i.valoper=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({creator:j(e.creator)?String(e.creator):"",chainId:j(e.chainId)?String(e.chainId):"",valoper:j(e.valoper)?String(e.valoper):""}),toJSON(e){let t={};return void 0!==e.creator&&(t.creator=e.creator),void 0!==e.chainId&&(t.chainId=e.chainId),void 0!==e.valoper&&(t.valoper=e.valoper),t},fromPartial(e){var t,r,n;let i=x();return i.creator=null!==(t=e.creator)&&void 0!==t?t:"",i.chainId=null!==(r=e.chainId)&&void 0!==r?r:"",i.valoper=null!==(n=e.valoper)&&void 0!==n?n:"",i}},t.MsgUpdateValidatorSharesExchRateResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=B();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>B()},t.MsgUndelegateHost={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.creator&&t.uint32(10).string(e.creator),""!==e.amount&&t.uint32(18).string(e.amount),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=C();for(;r.pos>>3){case 1:i.creator=r.string();break;case 2:i.amount=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({creator:j(e.creator)?String(e.creator):"",amount:j(e.amount)?String(e.amount):""}),toJSON(e){let t={};return void 0!==e.creator&&(t.creator=e.creator),void 0!==e.amount&&(t.amount=e.amount),t},fromPartial(e){var t,r;let n=C();return n.creator=null!==(t=e.creator)&&void 0!==t?t:"",n.amount=null!==(r=e.amount)&&void 0!==r?r:"",n}},t.MsgUndelegateHostResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=M();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>M()},t.MsgCalibrateDelegation={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.creator&&t.uint32(10).string(e.creator),""!==e.chainId&&t.uint32(18).string(e.chainId),""!==e.valoper&&t.uint32(26).string(e.valoper),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=D();for(;r.pos>>3){case 1:i.creator=r.string();break;case 2:i.chainId=r.string();break;case 3:i.valoper=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({creator:j(e.creator)?String(e.creator):"",chainId:j(e.chainId)?String(e.chainId):"",valoper:j(e.valoper)?String(e.valoper):""}),toJSON(e){let t={};return void 0!==e.creator&&(t.creator=e.creator),void 0!==e.chainId&&(t.chainId=e.chainId),void 0!==e.valoper&&(t.valoper=e.valoper),t},fromPartial(e){var t,r,n;let i=D();return i.creator=null!==(t=e.creator)&&void 0!==t?t:"",i.chainId=null!==(r=e.chainId)&&void 0!==r?r:"",i.valoper=null!==(n=e.valoper)&&void 0!==n?n:"",i}},t.MsgCalibrateDelegationResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=U();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>U()},o.default.util.Long!==i.default&&(o.default.util.Long=i.default,o.default.configure())},50980:function(e,t,r){"use strict";var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Validator=t.protobufPackage=void 0;let i=n(r(40059)),o=n(r(81667));function a(){return{name:"",address:"",weight:"0",delegation:"",slashQueryProgressTracker:"",slashQueryCheckpoint:"",sharesToTokensRate:"",delegationChangesInProgress:"0",slashQueryInProgress:!1}}function s(e){return e.toString()}function l(e){return null!=e}t.protobufPackage="stride.stakeibc",t.Validator={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.name&&t.uint32(10).string(e.name),""!==e.address&&t.uint32(18).string(e.address),"0"!==e.weight&&t.uint32(48).uint64(e.weight),""!==e.delegation&&t.uint32(42).string(e.delegation),""!==e.slashQueryProgressTracker&&t.uint32(74).string(e.slashQueryProgressTracker),""!==e.slashQueryCheckpoint&&t.uint32(98).string(e.slashQueryCheckpoint),""!==e.sharesToTokensRate&&t.uint32(82).string(e.sharesToTokensRate),"0"!==e.delegationChangesInProgress&&t.uint32(88).int64(e.delegationChangesInProgress),!0===e.slashQueryInProgress&&t.uint32(104).bool(e.slashQueryInProgress),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=a();for(;r.pos>>3){case 1:i.name=r.string();break;case 2:i.address=r.string();break;case 6:i.weight=s(r.uint64());break;case 5:i.delegation=r.string();break;case 9:i.slashQueryProgressTracker=r.string();break;case 12:i.slashQueryCheckpoint=r.string();break;case 10:i.sharesToTokensRate=r.string();break;case 11:i.delegationChangesInProgress=s(r.int64());break;case 13:i.slashQueryInProgress=r.bool();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({name:l(e.name)?String(e.name):"",address:l(e.address)?String(e.address):"",weight:l(e.weight)?String(e.weight):"0",delegation:l(e.delegation)?String(e.delegation):"",slashQueryProgressTracker:l(e.slashQueryProgressTracker)?String(e.slashQueryProgressTracker):"",slashQueryCheckpoint:l(e.slashQueryCheckpoint)?String(e.slashQueryCheckpoint):"",sharesToTokensRate:l(e.sharesToTokensRate)?String(e.sharesToTokensRate):"",delegationChangesInProgress:l(e.delegationChangesInProgress)?String(e.delegationChangesInProgress):"0",slashQueryInProgress:!!l(e.slashQueryInProgress)&&!!e.slashQueryInProgress}),toJSON(e){let t={};return void 0!==e.name&&(t.name=e.name),void 0!==e.address&&(t.address=e.address),void 0!==e.weight&&(t.weight=e.weight),void 0!==e.delegation&&(t.delegation=e.delegation),void 0!==e.slashQueryProgressTracker&&(t.slashQueryProgressTracker=e.slashQueryProgressTracker),void 0!==e.slashQueryCheckpoint&&(t.slashQueryCheckpoint=e.slashQueryCheckpoint),void 0!==e.sharesToTokensRate&&(t.sharesToTokensRate=e.sharesToTokensRate),void 0!==e.delegationChangesInProgress&&(t.delegationChangesInProgress=e.delegationChangesInProgress),void 0!==e.slashQueryInProgress&&(t.slashQueryInProgress=e.slashQueryInProgress),t},fromPartial(e){var t,r,n,i,o,s,l,u,d;let c=a();return c.name=null!==(t=e.name)&&void 0!==t?t:"",c.address=null!==(r=e.address)&&void 0!==r?r:"",c.weight=null!==(n=e.weight)&&void 0!==n?n:"0",c.delegation=null!==(i=e.delegation)&&void 0!==i?i:"",c.slashQueryProgressTracker=null!==(o=e.slashQueryProgressTracker)&&void 0!==o?o:"",c.slashQueryCheckpoint=null!==(s=e.slashQueryCheckpoint)&&void 0!==s?s:"",c.sharesToTokensRate=null!==(l=e.sharesToTokensRate)&&void 0!==l?l:"",c.delegationChangesInProgress=null!==(u=e.delegationChangesInProgress)&&void 0!==u?u:"0",c.slashQueryInProgress=null!==(d=e.slashQueryInProgress)&&void 0!==d&&d,c}},o.default.util.Long!==i.default&&(o.default.util.Long=i.default,o.default.configure())},99027:function(e,t,r){"use strict";var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.PublicKey=t.protobufPackage=void 0;let i=n(r(40059)),o=n(r(81667));function a(){return{ed25519:void 0,secp256k1:void 0}}t.protobufPackage="tendermint.crypto",t.PublicKey={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return void 0!==e.ed25519&&t.uint32(10).bytes(e.ed25519),void 0!==e.secp256k1&&t.uint32(18).bytes(e.secp256k1),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=a();for(;r.pos>>3){case 1:i.ed25519=r.bytes();break;case 2:i.secp256k1=r.bytes();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({ed25519:p(e.ed25519)?u(e.ed25519):void 0,secp256k1:p(e.secp256k1)?u(e.secp256k1):void 0}),toJSON(e){let t={};return void 0!==e.ed25519&&(t.ed25519=void 0!==e.ed25519?c(e.ed25519):void 0),void 0!==e.secp256k1&&(t.secp256k1=void 0!==e.secp256k1?c(e.secp256k1):void 0),t},fromPartial(e){var t,r;let n=a();return n.ed25519=null!==(t=e.ed25519)&&void 0!==t?t:void 0,n.secp256k1=null!==(r=e.secp256k1)&&void 0!==r?r:void 0,n}};var s=void 0!==s?s:"undefined"!=typeof self?self:window;let l=s.atob||(e=>s.Buffer.from(e,"base64").toString("binary"));function u(e){let t=l(e),r=new Uint8Array(t.length);for(let e=0;es.Buffer.from(e,"binary").toString("base64"));function c(e){let t=[];for(let r of e)t.push(String.fromCharCode(r));return d(t.join(""))}function p(e){return null!=e}o.default.util.Long!==i.default&&(o.default.util.Long=i.default,o.default.configure())},22709:function(e,t,r){"use strict";var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ProofOps=t.ProofOp=t.DominoOp=t.ValueOp=t.Proof=t.protobufPackage=void 0;let i=n(r(40059)),o=n(r(81667));function a(){return{total:"0",index:"0",leafHash:new Uint8Array,aunts:[]}}function s(){return{key:new Uint8Array,proof:void 0}}function l(){return{key:"",input:"",output:""}}function u(){return{type:"",key:new Uint8Array,data:new Uint8Array}}function d(){return{ops:[]}}t.protobufPackage="tendermint.crypto",t.Proof={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();for(let r of("0"!==e.total&&t.uint32(8).int64(e.total),"0"!==e.index&&t.uint32(16).int64(e.index),0!==e.leafHash.length&&t.uint32(26).bytes(e.leafHash),e.aunts))t.uint32(34).bytes(r);return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=a();for(;r.pos>>3){case 1:i.total=m(r.int64());break;case 2:i.index=m(r.int64());break;case 3:i.leafHash=r.bytes();break;case 4:i.aunts.push(r.bytes());break;default:r.skipType(7&e)}}return i},fromJSON:e=>({total:y(e.total)?String(e.total):"0",index:y(e.index)?String(e.index):"0",leafHash:y(e.leafHash)?f(e.leafHash):new Uint8Array,aunts:Array.isArray(null==e?void 0:e.aunts)?e.aunts.map(e=>f(e)):[]}),toJSON(e){let t={};return void 0!==e.total&&(t.total=e.total),void 0!==e.index&&(t.index=e.index),void 0!==e.leafHash&&(t.leafHash=g(void 0!==e.leafHash?e.leafHash:new Uint8Array)),e.aunts?t.aunts=e.aunts.map(e=>g(void 0!==e?e:new Uint8Array)):t.aunts=[],t},fromPartial(e){var t,r,n,i;let o=a();return o.total=null!==(t=e.total)&&void 0!==t?t:"0",o.index=null!==(r=e.index)&&void 0!==r?r:"0",o.leafHash=null!==(n=e.leafHash)&&void 0!==n?n:new Uint8Array,o.aunts=(null===(i=e.aunts)||void 0===i?void 0:i.map(e=>e))||[],o}},t.ValueOp={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return 0!==e.key.length&&r.uint32(10).bytes(e.key),void 0!==e.proof&&t.Proof.encode(e.proof,r.uint32(18).fork()).ldelim(),r},decode(e,r){let n=e instanceof o.default.Reader?e:new o.default.Reader(e),i=void 0===r?n.len:n.pos+r,a=s();for(;n.pos>>3){case 1:a.key=n.bytes();break;case 2:a.proof=t.Proof.decode(n,n.uint32());break;default:n.skipType(7&e)}}return a},fromJSON:e=>({key:y(e.key)?f(e.key):new Uint8Array,proof:y(e.proof)?t.Proof.fromJSON(e.proof):void 0}),toJSON(e){let r={};return void 0!==e.key&&(r.key=g(void 0!==e.key?e.key:new Uint8Array)),void 0!==e.proof&&(r.proof=e.proof?t.Proof.toJSON(e.proof):void 0),r},fromPartial(e){var r;let n=s();return n.key=null!==(r=e.key)&&void 0!==r?r:new Uint8Array,n.proof=void 0!==e.proof&&null!==e.proof?t.Proof.fromPartial(e.proof):void 0,n}},t.DominoOp={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.key&&t.uint32(10).string(e.key),""!==e.input&&t.uint32(18).string(e.input),""!==e.output&&t.uint32(26).string(e.output),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=l();for(;r.pos>>3){case 1:i.key=r.string();break;case 2:i.input=r.string();break;case 3:i.output=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({key:y(e.key)?String(e.key):"",input:y(e.input)?String(e.input):"",output:y(e.output)?String(e.output):""}),toJSON(e){let t={};return void 0!==e.key&&(t.key=e.key),void 0!==e.input&&(t.input=e.input),void 0!==e.output&&(t.output=e.output),t},fromPartial(e){var t,r,n;let i=l();return i.key=null!==(t=e.key)&&void 0!==t?t:"",i.input=null!==(r=e.input)&&void 0!==r?r:"",i.output=null!==(n=e.output)&&void 0!==n?n:"",i}},t.ProofOp={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.type&&t.uint32(10).string(e.type),0!==e.key.length&&t.uint32(18).bytes(e.key),0!==e.data.length&&t.uint32(26).bytes(e.data),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=u();for(;r.pos>>3){case 1:i.type=r.string();break;case 2:i.key=r.bytes();break;case 3:i.data=r.bytes();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({type:y(e.type)?String(e.type):"",key:y(e.key)?f(e.key):new Uint8Array,data:y(e.data)?f(e.data):new Uint8Array}),toJSON(e){let t={};return void 0!==e.type&&(t.type=e.type),void 0!==e.key&&(t.key=g(void 0!==e.key?e.key:new Uint8Array)),void 0!==e.data&&(t.data=g(void 0!==e.data?e.data:new Uint8Array)),t},fromPartial(e){var t,r,n;let i=u();return i.type=null!==(t=e.type)&&void 0!==t?t:"",i.key=null!==(r=e.key)&&void 0!==r?r:new Uint8Array,i.data=null!==(n=e.data)&&void 0!==n?n:new Uint8Array,i}},t.ProofOps={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();for(let n of e.ops)t.ProofOp.encode(n,r.uint32(10).fork()).ldelim();return r},decode(e,r){let n=e instanceof o.default.Reader?e:new o.default.Reader(e),i=void 0===r?n.len:n.pos+r,a=d();for(;n.pos>>3==1?a.ops.push(t.ProofOp.decode(n,n.uint32())):n.skipType(7&e)}return a},fromJSON:e=>({ops:Array.isArray(null==e?void 0:e.ops)?e.ops.map(e=>t.ProofOp.fromJSON(e)):[]}),toJSON(e){let r={};return e.ops?r.ops=e.ops.map(e=>e?t.ProofOp.toJSON(e):void 0):r.ops=[],r},fromPartial(e){var r;let n=d();return n.ops=(null===(r=e.ops)||void 0===r?void 0:r.map(e=>t.ProofOp.fromPartial(e)))||[],n}};var c=void 0!==c?c:"undefined"!=typeof self?self:window;let p=c.atob||(e=>c.Buffer.from(e,"base64").toString("binary"));function f(e){let t=p(e),r=new Uint8Array(t.length);for(let e=0;ec.Buffer.from(e,"binary").toString("base64"));function g(e){let t=[];for(let r of e)t.push(String.fromCharCode(r));return h(t.join(""))}function m(e){return e.toString()}function y(e){return null!=e}o.default.util.Long!==i.default&&(o.default.util.Long=i.default,o.default.configure())},35444:function(e,t,r){"use strict";var n,i,o=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.TxProof=t.BlockMeta=t.LightBlock=t.SignedHeader=t.Proposal=t.CommitSig=t.Commit=t.Vote=t.Data=t.Header=t.BlockID=t.Part=t.PartSetHeader=t.signedMsgTypeToJSON=t.signedMsgTypeFromJSON=t.SignedMsgType=t.blockIDFlagToJSON=t.blockIDFlagFromJSON=t.BlockIDFlag=t.protobufPackage=void 0;let a=o(r(40059)),s=o(r(81667)),l=r(90338),u=r(22709),d=r(81766),c=r(86674);function p(e){switch(e){case 0:case"BLOCK_ID_FLAG_UNKNOWN":return n.BLOCK_ID_FLAG_UNKNOWN;case 1:case"BLOCK_ID_FLAG_ABSENT":return n.BLOCK_ID_FLAG_ABSENT;case 2:case"BLOCK_ID_FLAG_COMMIT":return n.BLOCK_ID_FLAG_COMMIT;case 3:case"BLOCK_ID_FLAG_NIL":return n.BLOCK_ID_FLAG_NIL;default:return n.UNRECOGNIZED}}function f(e){switch(e){case n.BLOCK_ID_FLAG_UNKNOWN:return"BLOCK_ID_FLAG_UNKNOWN";case n.BLOCK_ID_FLAG_ABSENT:return"BLOCK_ID_FLAG_ABSENT";case n.BLOCK_ID_FLAG_COMMIT:return"BLOCK_ID_FLAG_COMMIT";case n.BLOCK_ID_FLAG_NIL:return"BLOCK_ID_FLAG_NIL";default:return"UNKNOWN"}}function h(e){switch(e){case 0:case"SIGNED_MSG_TYPE_UNKNOWN":return i.SIGNED_MSG_TYPE_UNKNOWN;case 1:case"SIGNED_MSG_TYPE_PREVOTE":return i.SIGNED_MSG_TYPE_PREVOTE;case 2:case"SIGNED_MSG_TYPE_PRECOMMIT":return i.SIGNED_MSG_TYPE_PRECOMMIT;case 32:case"SIGNED_MSG_TYPE_PROPOSAL":return i.SIGNED_MSG_TYPE_PROPOSAL;default:return i.UNRECOGNIZED}}function g(e){switch(e){case i.SIGNED_MSG_TYPE_UNKNOWN:return"SIGNED_MSG_TYPE_UNKNOWN";case i.SIGNED_MSG_TYPE_PREVOTE:return"SIGNED_MSG_TYPE_PREVOTE";case i.SIGNED_MSG_TYPE_PRECOMMIT:return"SIGNED_MSG_TYPE_PRECOMMIT";case i.SIGNED_MSG_TYPE_PROPOSAL:return"SIGNED_MSG_TYPE_PROPOSAL";default:return"UNKNOWN"}}function m(){return{total:0,hash:new Uint8Array}}function y(){return{index:0,bytes:new Uint8Array,proof:void 0}}function v(){return{hash:new Uint8Array,partSetHeader:void 0}}function b(){return{version:void 0,chainId:"",height:"0",time:void 0,lastBlockId:void 0,lastCommitHash:new Uint8Array,dataHash:new Uint8Array,validatorsHash:new Uint8Array,nextValidatorsHash:new Uint8Array,consensusHash:new Uint8Array,appHash:new Uint8Array,lastResultsHash:new Uint8Array,evidenceHash:new Uint8Array,proposerAddress:new Uint8Array}}function S(){return{txs:[]}}function w(){return{type:0,height:"0",round:0,blockId:void 0,timestamp:void 0,validatorAddress:new Uint8Array,validatorIndex:0,signature:new Uint8Array}}function _(){return{height:"0",round:0,blockId:void 0,signatures:[]}}function k(){return{blockIdFlag:0,validatorAddress:new Uint8Array,timestamp:void 0,signature:new Uint8Array}}function O(){return{type:0,height:"0",round:0,polRound:0,blockId:void 0,timestamp:void 0,signature:new Uint8Array}}function P(){return{header:void 0,commit:void 0}}function A(){return{signedHeader:void 0,validatorSet:void 0}}function I(){return{blockId:void 0,blockSize:"0",header:void 0,numTxs:"0"}}function R(){return{rootHash:new Uint8Array,data:new Uint8Array,proof:void 0}}t.protobufPackage="tendermint.types",function(e){e[e.BLOCK_ID_FLAG_UNKNOWN=0]="BLOCK_ID_FLAG_UNKNOWN",e[e.BLOCK_ID_FLAG_ABSENT=1]="BLOCK_ID_FLAG_ABSENT",e[e.BLOCK_ID_FLAG_COMMIT=2]="BLOCK_ID_FLAG_COMMIT",e[e.BLOCK_ID_FLAG_NIL=3]="BLOCK_ID_FLAG_NIL",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(n=t.BlockIDFlag||(t.BlockIDFlag={})),t.blockIDFlagFromJSON=p,t.blockIDFlagToJSON=f,function(e){e[e.SIGNED_MSG_TYPE_UNKNOWN=0]="SIGNED_MSG_TYPE_UNKNOWN",e[e.SIGNED_MSG_TYPE_PREVOTE=1]="SIGNED_MSG_TYPE_PREVOTE",e[e.SIGNED_MSG_TYPE_PRECOMMIT=2]="SIGNED_MSG_TYPE_PRECOMMIT",e[e.SIGNED_MSG_TYPE_PROPOSAL=32]="SIGNED_MSG_TYPE_PROPOSAL",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(i=t.SignedMsgType||(t.SignedMsgType={})),t.signedMsgTypeFromJSON=h,t.signedMsgTypeToJSON=g,t.PartSetHeader={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return 0!==e.total&&t.uint32(8).uint32(e.total),0!==e.hash.length&&t.uint32(18).bytes(e.hash),t},decode(e,t){let r=e instanceof s.default.Reader?e:new s.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=m();for(;r.pos>>3){case 1:i.total=r.uint32();break;case 2:i.hash=r.bytes();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({total:J(e.total)?Number(e.total):0,hash:J(e.hash)?N(e.hash):new Uint8Array}),toJSON(e){let t={};return void 0!==e.total&&(t.total=Math.round(e.total)),void 0!==e.hash&&(t.hash=B(void 0!==e.hash?e.hash:new Uint8Array)),t},fromPartial(e){var t,r;let n=m();return n.total=null!==(t=e.total)&&void 0!==t?t:0,n.hash=null!==(r=e.hash)&&void 0!==r?r:new Uint8Array,n}},t.Part={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return 0!==e.index&&t.uint32(8).uint32(e.index),0!==e.bytes.length&&t.uint32(18).bytes(e.bytes),void 0!==e.proof&&u.Proof.encode(e.proof,t.uint32(26).fork()).ldelim(),t},decode(e,t){let r=e instanceof s.default.Reader?e:new s.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=y();for(;r.pos>>3){case 1:i.index=r.uint32();break;case 2:i.bytes=r.bytes();break;case 3:i.proof=u.Proof.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON:e=>({index:J(e.index)?Number(e.index):0,bytes:J(e.bytes)?N(e.bytes):new Uint8Array,proof:J(e.proof)?u.Proof.fromJSON(e.proof):void 0}),toJSON(e){let t={};return void 0!==e.index&&(t.index=Math.round(e.index)),void 0!==e.bytes&&(t.bytes=B(void 0!==e.bytes?e.bytes:new Uint8Array)),void 0!==e.proof&&(t.proof=e.proof?u.Proof.toJSON(e.proof):void 0),t},fromPartial(e){var t,r;let n=y();return n.index=null!==(t=e.index)&&void 0!==t?t:0,n.bytes=null!==(r=e.bytes)&&void 0!==r?r:new Uint8Array,n.proof=void 0!==e.proof&&null!==e.proof?u.Proof.fromPartial(e.proof):void 0,n}},t.BlockID={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return 0!==e.hash.length&&r.uint32(10).bytes(e.hash),void 0!==e.partSetHeader&&t.PartSetHeader.encode(e.partSetHeader,r.uint32(18).fork()).ldelim(),r},decode(e,r){let n=e instanceof s.default.Reader?e:new s.default.Reader(e),i=void 0===r?n.len:n.pos+r,o=v();for(;n.pos>>3){case 1:o.hash=n.bytes();break;case 2:o.partSetHeader=t.PartSetHeader.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON:e=>({hash:J(e.hash)?N(e.hash):new Uint8Array,partSetHeader:J(e.partSetHeader)?t.PartSetHeader.fromJSON(e.partSetHeader):void 0}),toJSON(e){let r={};return void 0!==e.hash&&(r.hash=B(void 0!==e.hash?e.hash:new Uint8Array)),void 0!==e.partSetHeader&&(r.partSetHeader=e.partSetHeader?t.PartSetHeader.toJSON(e.partSetHeader):void 0),r},fromPartial(e){var r;let n=v();return n.hash=null!==(r=e.hash)&&void 0!==r?r:new Uint8Array,n.partSetHeader=void 0!==e.partSetHeader&&null!==e.partSetHeader?t.PartSetHeader.fromPartial(e.partSetHeader):void 0,n}},t.Header={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return void 0!==e.version&&d.Consensus.encode(e.version,r.uint32(10).fork()).ldelim(),""!==e.chainId&&r.uint32(18).string(e.chainId),"0"!==e.height&&r.uint32(24).int64(e.height),void 0!==e.time&&l.Timestamp.encode(C(e.time),r.uint32(34).fork()).ldelim(),void 0!==e.lastBlockId&&t.BlockID.encode(e.lastBlockId,r.uint32(42).fork()).ldelim(),0!==e.lastCommitHash.length&&r.uint32(50).bytes(e.lastCommitHash),0!==e.dataHash.length&&r.uint32(58).bytes(e.dataHash),0!==e.validatorsHash.length&&r.uint32(66).bytes(e.validatorsHash),0!==e.nextValidatorsHash.length&&r.uint32(74).bytes(e.nextValidatorsHash),0!==e.consensusHash.length&&r.uint32(82).bytes(e.consensusHash),0!==e.appHash.length&&r.uint32(90).bytes(e.appHash),0!==e.lastResultsHash.length&&r.uint32(98).bytes(e.lastResultsHash),0!==e.evidenceHash.length&&r.uint32(106).bytes(e.evidenceHash),0!==e.proposerAddress.length&&r.uint32(114).bytes(e.proposerAddress),r},decode(e,r){let n=e instanceof s.default.Reader?e:new s.default.Reader(e),i=void 0===r?n.len:n.pos+r,o=b();for(;n.pos>>3){case 1:o.version=d.Consensus.decode(n,n.uint32());break;case 2:o.chainId=n.string();break;case 3:o.height=U(n.int64());break;case 4:o.time=M(l.Timestamp.decode(n,n.uint32()));break;case 5:o.lastBlockId=t.BlockID.decode(n,n.uint32());break;case 6:o.lastCommitHash=n.bytes();break;case 7:o.dataHash=n.bytes();break;case 8:o.validatorsHash=n.bytes();break;case 9:o.nextValidatorsHash=n.bytes();break;case 10:o.consensusHash=n.bytes();break;case 11:o.appHash=n.bytes();break;case 12:o.lastResultsHash=n.bytes();break;case 13:o.evidenceHash=n.bytes();break;case 14:o.proposerAddress=n.bytes();break;default:n.skipType(7&e)}}return o},fromJSON:e=>({version:J(e.version)?d.Consensus.fromJSON(e.version):void 0,chainId:J(e.chainId)?String(e.chainId):"",height:J(e.height)?String(e.height):"0",time:J(e.time)?D(e.time):void 0,lastBlockId:J(e.lastBlockId)?t.BlockID.fromJSON(e.lastBlockId):void 0,lastCommitHash:J(e.lastCommitHash)?N(e.lastCommitHash):new Uint8Array,dataHash:J(e.dataHash)?N(e.dataHash):new Uint8Array,validatorsHash:J(e.validatorsHash)?N(e.validatorsHash):new Uint8Array,nextValidatorsHash:J(e.nextValidatorsHash)?N(e.nextValidatorsHash):new Uint8Array,consensusHash:J(e.consensusHash)?N(e.consensusHash):new Uint8Array,appHash:J(e.appHash)?N(e.appHash):new Uint8Array,lastResultsHash:J(e.lastResultsHash)?N(e.lastResultsHash):new Uint8Array,evidenceHash:J(e.evidenceHash)?N(e.evidenceHash):new Uint8Array,proposerAddress:J(e.proposerAddress)?N(e.proposerAddress):new Uint8Array}),toJSON(e){let r={};return void 0!==e.version&&(r.version=e.version?d.Consensus.toJSON(e.version):void 0),void 0!==e.chainId&&(r.chainId=e.chainId),void 0!==e.height&&(r.height=e.height),void 0!==e.time&&(r.time=e.time.toISOString()),void 0!==e.lastBlockId&&(r.lastBlockId=e.lastBlockId?t.BlockID.toJSON(e.lastBlockId):void 0),void 0!==e.lastCommitHash&&(r.lastCommitHash=B(void 0!==e.lastCommitHash?e.lastCommitHash:new Uint8Array)),void 0!==e.dataHash&&(r.dataHash=B(void 0!==e.dataHash?e.dataHash:new Uint8Array)),void 0!==e.validatorsHash&&(r.validatorsHash=B(void 0!==e.validatorsHash?e.validatorsHash:new Uint8Array)),void 0!==e.nextValidatorsHash&&(r.nextValidatorsHash=B(void 0!==e.nextValidatorsHash?e.nextValidatorsHash:new Uint8Array)),void 0!==e.consensusHash&&(r.consensusHash=B(void 0!==e.consensusHash?e.consensusHash:new Uint8Array)),void 0!==e.appHash&&(r.appHash=B(void 0!==e.appHash?e.appHash:new Uint8Array)),void 0!==e.lastResultsHash&&(r.lastResultsHash=B(void 0!==e.lastResultsHash?e.lastResultsHash:new Uint8Array)),void 0!==e.evidenceHash&&(r.evidenceHash=B(void 0!==e.evidenceHash?e.evidenceHash:new Uint8Array)),void 0!==e.proposerAddress&&(r.proposerAddress=B(void 0!==e.proposerAddress?e.proposerAddress:new Uint8Array)),r},fromPartial(e){var r,n,i,o,a,s,l,u,c,p,f,h;let g=b();return g.version=void 0!==e.version&&null!==e.version?d.Consensus.fromPartial(e.version):void 0,g.chainId=null!==(r=e.chainId)&&void 0!==r?r:"",g.height=null!==(n=e.height)&&void 0!==n?n:"0",g.time=null!==(i=e.time)&&void 0!==i?i:void 0,g.lastBlockId=void 0!==e.lastBlockId&&null!==e.lastBlockId?t.BlockID.fromPartial(e.lastBlockId):void 0,g.lastCommitHash=null!==(o=e.lastCommitHash)&&void 0!==o?o:new Uint8Array,g.dataHash=null!==(a=e.dataHash)&&void 0!==a?a:new Uint8Array,g.validatorsHash=null!==(s=e.validatorsHash)&&void 0!==s?s:new Uint8Array,g.nextValidatorsHash=null!==(l=e.nextValidatorsHash)&&void 0!==l?l:new Uint8Array,g.consensusHash=null!==(u=e.consensusHash)&&void 0!==u?u:new Uint8Array,g.appHash=null!==(c=e.appHash)&&void 0!==c?c:new Uint8Array,g.lastResultsHash=null!==(p=e.lastResultsHash)&&void 0!==p?p:new Uint8Array,g.evidenceHash=null!==(f=e.evidenceHash)&&void 0!==f?f:new Uint8Array,g.proposerAddress=null!==(h=e.proposerAddress)&&void 0!==h?h:new Uint8Array,g}},t.Data={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();for(let r of e.txs)t.uint32(10).bytes(r);return t},decode(e,t){let r=e instanceof s.default.Reader?e:new s.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=S();for(;r.pos>>3==1?i.txs.push(r.bytes()):r.skipType(7&e)}return i},fromJSON:e=>({txs:Array.isArray(null==e?void 0:e.txs)?e.txs.map(e=>N(e)):[]}),toJSON(e){let t={};return e.txs?t.txs=e.txs.map(e=>B(void 0!==e?e:new Uint8Array)):t.txs=[],t},fromPartial(e){var t;let r=S();return r.txs=(null===(t=e.txs)||void 0===t?void 0:t.map(e=>e))||[],r}},t.Vote={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return 0!==e.type&&r.uint32(8).int32(e.type),"0"!==e.height&&r.uint32(16).int64(e.height),0!==e.round&&r.uint32(24).int32(e.round),void 0!==e.blockId&&t.BlockID.encode(e.blockId,r.uint32(34).fork()).ldelim(),void 0!==e.timestamp&&l.Timestamp.encode(C(e.timestamp),r.uint32(42).fork()).ldelim(),0!==e.validatorAddress.length&&r.uint32(50).bytes(e.validatorAddress),0!==e.validatorIndex&&r.uint32(56).int32(e.validatorIndex),0!==e.signature.length&&r.uint32(66).bytes(e.signature),r},decode(e,r){let n=e instanceof s.default.Reader?e:new s.default.Reader(e),i=void 0===r?n.len:n.pos+r,o=w();for(;n.pos>>3){case 1:o.type=n.int32();break;case 2:o.height=U(n.int64());break;case 3:o.round=n.int32();break;case 4:o.blockId=t.BlockID.decode(n,n.uint32());break;case 5:o.timestamp=M(l.Timestamp.decode(n,n.uint32()));break;case 6:o.validatorAddress=n.bytes();break;case 7:o.validatorIndex=n.int32();break;case 8:o.signature=n.bytes();break;default:n.skipType(7&e)}}return o},fromJSON:e=>({type:J(e.type)?h(e.type):0,height:J(e.height)?String(e.height):"0",round:J(e.round)?Number(e.round):0,blockId:J(e.blockId)?t.BlockID.fromJSON(e.blockId):void 0,timestamp:J(e.timestamp)?D(e.timestamp):void 0,validatorAddress:J(e.validatorAddress)?N(e.validatorAddress):new Uint8Array,validatorIndex:J(e.validatorIndex)?Number(e.validatorIndex):0,signature:J(e.signature)?N(e.signature):new Uint8Array}),toJSON(e){let r={};return void 0!==e.type&&(r.type=g(e.type)),void 0!==e.height&&(r.height=e.height),void 0!==e.round&&(r.round=Math.round(e.round)),void 0!==e.blockId&&(r.blockId=e.blockId?t.BlockID.toJSON(e.blockId):void 0),void 0!==e.timestamp&&(r.timestamp=e.timestamp.toISOString()),void 0!==e.validatorAddress&&(r.validatorAddress=B(void 0!==e.validatorAddress?e.validatorAddress:new Uint8Array)),void 0!==e.validatorIndex&&(r.validatorIndex=Math.round(e.validatorIndex)),void 0!==e.signature&&(r.signature=B(void 0!==e.signature?e.signature:new Uint8Array)),r},fromPartial(e){var r,n,i,o,a,s,l;let u=w();return u.type=null!==(r=e.type)&&void 0!==r?r:0,u.height=null!==(n=e.height)&&void 0!==n?n:"0",u.round=null!==(i=e.round)&&void 0!==i?i:0,u.blockId=void 0!==e.blockId&&null!==e.blockId?t.BlockID.fromPartial(e.blockId):void 0,u.timestamp=null!==(o=e.timestamp)&&void 0!==o?o:void 0,u.validatorAddress=null!==(a=e.validatorAddress)&&void 0!==a?a:new Uint8Array,u.validatorIndex=null!==(s=e.validatorIndex)&&void 0!==s?s:0,u.signature=null!==(l=e.signature)&&void 0!==l?l:new Uint8Array,u}},t.Commit={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();for(let n of("0"!==e.height&&r.uint32(8).int64(e.height),0!==e.round&&r.uint32(16).int32(e.round),void 0!==e.blockId&&t.BlockID.encode(e.blockId,r.uint32(26).fork()).ldelim(),e.signatures))t.CommitSig.encode(n,r.uint32(34).fork()).ldelim();return r},decode(e,r){let n=e instanceof s.default.Reader?e:new s.default.Reader(e),i=void 0===r?n.len:n.pos+r,o=_();for(;n.pos>>3){case 1:o.height=U(n.int64());break;case 2:o.round=n.int32();break;case 3:o.blockId=t.BlockID.decode(n,n.uint32());break;case 4:o.signatures.push(t.CommitSig.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return o},fromJSON:e=>({height:J(e.height)?String(e.height):"0",round:J(e.round)?Number(e.round):0,blockId:J(e.blockId)?t.BlockID.fromJSON(e.blockId):void 0,signatures:Array.isArray(null==e?void 0:e.signatures)?e.signatures.map(e=>t.CommitSig.fromJSON(e)):[]}),toJSON(e){let r={};return void 0!==e.height&&(r.height=e.height),void 0!==e.round&&(r.round=Math.round(e.round)),void 0!==e.blockId&&(r.blockId=e.blockId?t.BlockID.toJSON(e.blockId):void 0),e.signatures?r.signatures=e.signatures.map(e=>e?t.CommitSig.toJSON(e):void 0):r.signatures=[],r},fromPartial(e){var r,n,i;let o=_();return o.height=null!==(r=e.height)&&void 0!==r?r:"0",o.round=null!==(n=e.round)&&void 0!==n?n:0,o.blockId=void 0!==e.blockId&&null!==e.blockId?t.BlockID.fromPartial(e.blockId):void 0,o.signatures=(null===(i=e.signatures)||void 0===i?void 0:i.map(e=>t.CommitSig.fromPartial(e)))||[],o}},t.CommitSig={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return 0!==e.blockIdFlag&&t.uint32(8).int32(e.blockIdFlag),0!==e.validatorAddress.length&&t.uint32(18).bytes(e.validatorAddress),void 0!==e.timestamp&&l.Timestamp.encode(C(e.timestamp),t.uint32(26).fork()).ldelim(),0!==e.signature.length&&t.uint32(34).bytes(e.signature),t},decode(e,t){let r=e instanceof s.default.Reader?e:new s.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=k();for(;r.pos>>3){case 1:i.blockIdFlag=r.int32();break;case 2:i.validatorAddress=r.bytes();break;case 3:i.timestamp=M(l.Timestamp.decode(r,r.uint32()));break;case 4:i.signature=r.bytes();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({blockIdFlag:J(e.blockIdFlag)?p(e.blockIdFlag):0,validatorAddress:J(e.validatorAddress)?N(e.validatorAddress):new Uint8Array,timestamp:J(e.timestamp)?D(e.timestamp):void 0,signature:J(e.signature)?N(e.signature):new Uint8Array}),toJSON(e){let t={};return void 0!==e.blockIdFlag&&(t.blockIdFlag=f(e.blockIdFlag)),void 0!==e.validatorAddress&&(t.validatorAddress=B(void 0!==e.validatorAddress?e.validatorAddress:new Uint8Array)),void 0!==e.timestamp&&(t.timestamp=e.timestamp.toISOString()),void 0!==e.signature&&(t.signature=B(void 0!==e.signature?e.signature:new Uint8Array)),t},fromPartial(e){var t,r,n,i;let o=k();return o.blockIdFlag=null!==(t=e.blockIdFlag)&&void 0!==t?t:0,o.validatorAddress=null!==(r=e.validatorAddress)&&void 0!==r?r:new Uint8Array,o.timestamp=null!==(n=e.timestamp)&&void 0!==n?n:void 0,o.signature=null!==(i=e.signature)&&void 0!==i?i:new Uint8Array,o}},t.Proposal={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return 0!==e.type&&r.uint32(8).int32(e.type),"0"!==e.height&&r.uint32(16).int64(e.height),0!==e.round&&r.uint32(24).int32(e.round),0!==e.polRound&&r.uint32(32).int32(e.polRound),void 0!==e.blockId&&t.BlockID.encode(e.blockId,r.uint32(42).fork()).ldelim(),void 0!==e.timestamp&&l.Timestamp.encode(C(e.timestamp),r.uint32(50).fork()).ldelim(),0!==e.signature.length&&r.uint32(58).bytes(e.signature),r},decode(e,r){let n=e instanceof s.default.Reader?e:new s.default.Reader(e),i=void 0===r?n.len:n.pos+r,o=O();for(;n.pos>>3){case 1:o.type=n.int32();break;case 2:o.height=U(n.int64());break;case 3:o.round=n.int32();break;case 4:o.polRound=n.int32();break;case 5:o.blockId=t.BlockID.decode(n,n.uint32());break;case 6:o.timestamp=M(l.Timestamp.decode(n,n.uint32()));break;case 7:o.signature=n.bytes();break;default:n.skipType(7&e)}}return o},fromJSON:e=>({type:J(e.type)?h(e.type):0,height:J(e.height)?String(e.height):"0",round:J(e.round)?Number(e.round):0,polRound:J(e.polRound)?Number(e.polRound):0,blockId:J(e.blockId)?t.BlockID.fromJSON(e.blockId):void 0,timestamp:J(e.timestamp)?D(e.timestamp):void 0,signature:J(e.signature)?N(e.signature):new Uint8Array}),toJSON(e){let r={};return void 0!==e.type&&(r.type=g(e.type)),void 0!==e.height&&(r.height=e.height),void 0!==e.round&&(r.round=Math.round(e.round)),void 0!==e.polRound&&(r.polRound=Math.round(e.polRound)),void 0!==e.blockId&&(r.blockId=e.blockId?t.BlockID.toJSON(e.blockId):void 0),void 0!==e.timestamp&&(r.timestamp=e.timestamp.toISOString()),void 0!==e.signature&&(r.signature=B(void 0!==e.signature?e.signature:new Uint8Array)),r},fromPartial(e){var r,n,i,o,a,s;let l=O();return l.type=null!==(r=e.type)&&void 0!==r?r:0,l.height=null!==(n=e.height)&&void 0!==n?n:"0",l.round=null!==(i=e.round)&&void 0!==i?i:0,l.polRound=null!==(o=e.polRound)&&void 0!==o?o:0,l.blockId=void 0!==e.blockId&&null!==e.blockId?t.BlockID.fromPartial(e.blockId):void 0,l.timestamp=null!==(a=e.timestamp)&&void 0!==a?a:void 0,l.signature=null!==(s=e.signature)&&void 0!==s?s:new Uint8Array,l}},t.SignedHeader={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return void 0!==e.header&&t.Header.encode(e.header,r.uint32(10).fork()).ldelim(),void 0!==e.commit&&t.Commit.encode(e.commit,r.uint32(18).fork()).ldelim(),r},decode(e,r){let n=e instanceof s.default.Reader?e:new s.default.Reader(e),i=void 0===r?n.len:n.pos+r,o=P();for(;n.pos>>3){case 1:o.header=t.Header.decode(n,n.uint32());break;case 2:o.commit=t.Commit.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON:e=>({header:J(e.header)?t.Header.fromJSON(e.header):void 0,commit:J(e.commit)?t.Commit.fromJSON(e.commit):void 0}),toJSON(e){let r={};return void 0!==e.header&&(r.header=e.header?t.Header.toJSON(e.header):void 0),void 0!==e.commit&&(r.commit=e.commit?t.Commit.toJSON(e.commit):void 0),r},fromPartial(e){let r=P();return r.header=void 0!==e.header&&null!==e.header?t.Header.fromPartial(e.header):void 0,r.commit=void 0!==e.commit&&null!==e.commit?t.Commit.fromPartial(e.commit):void 0,r}},t.LightBlock={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return void 0!==e.signedHeader&&t.SignedHeader.encode(e.signedHeader,r.uint32(10).fork()).ldelim(),void 0!==e.validatorSet&&c.ValidatorSet.encode(e.validatorSet,r.uint32(18).fork()).ldelim(),r},decode(e,r){let n=e instanceof s.default.Reader?e:new s.default.Reader(e),i=void 0===r?n.len:n.pos+r,o=A();for(;n.pos>>3){case 1:o.signedHeader=t.SignedHeader.decode(n,n.uint32());break;case 2:o.validatorSet=c.ValidatorSet.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON:e=>({signedHeader:J(e.signedHeader)?t.SignedHeader.fromJSON(e.signedHeader):void 0,validatorSet:J(e.validatorSet)?c.ValidatorSet.fromJSON(e.validatorSet):void 0}),toJSON(e){let r={};return void 0!==e.signedHeader&&(r.signedHeader=e.signedHeader?t.SignedHeader.toJSON(e.signedHeader):void 0),void 0!==e.validatorSet&&(r.validatorSet=e.validatorSet?c.ValidatorSet.toJSON(e.validatorSet):void 0),r},fromPartial(e){let r=A();return r.signedHeader=void 0!==e.signedHeader&&null!==e.signedHeader?t.SignedHeader.fromPartial(e.signedHeader):void 0,r.validatorSet=void 0!==e.validatorSet&&null!==e.validatorSet?c.ValidatorSet.fromPartial(e.validatorSet):void 0,r}},t.BlockMeta={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return void 0!==e.blockId&&t.BlockID.encode(e.blockId,r.uint32(10).fork()).ldelim(),"0"!==e.blockSize&&r.uint32(16).int64(e.blockSize),void 0!==e.header&&t.Header.encode(e.header,r.uint32(26).fork()).ldelim(),"0"!==e.numTxs&&r.uint32(32).int64(e.numTxs),r},decode(e,r){let n=e instanceof s.default.Reader?e:new s.default.Reader(e),i=void 0===r?n.len:n.pos+r,o=I();for(;n.pos>>3){case 1:o.blockId=t.BlockID.decode(n,n.uint32());break;case 2:o.blockSize=U(n.int64());break;case 3:o.header=t.Header.decode(n,n.uint32());break;case 4:o.numTxs=U(n.int64());break;default:n.skipType(7&e)}}return o},fromJSON:e=>({blockId:J(e.blockId)?t.BlockID.fromJSON(e.blockId):void 0,blockSize:J(e.blockSize)?String(e.blockSize):"0",header:J(e.header)?t.Header.fromJSON(e.header):void 0,numTxs:J(e.numTxs)?String(e.numTxs):"0"}),toJSON(e){let r={};return void 0!==e.blockId&&(r.blockId=e.blockId?t.BlockID.toJSON(e.blockId):void 0),void 0!==e.blockSize&&(r.blockSize=e.blockSize),void 0!==e.header&&(r.header=e.header?t.Header.toJSON(e.header):void 0),void 0!==e.numTxs&&(r.numTxs=e.numTxs),r},fromPartial(e){var r,n;let i=I();return i.blockId=void 0!==e.blockId&&null!==e.blockId?t.BlockID.fromPartial(e.blockId):void 0,i.blockSize=null!==(r=e.blockSize)&&void 0!==r?r:"0",i.header=void 0!==e.header&&null!==e.header?t.Header.fromPartial(e.header):void 0,i.numTxs=null!==(n=e.numTxs)&&void 0!==n?n:"0",i}},t.TxProof={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return 0!==e.rootHash.length&&t.uint32(10).bytes(e.rootHash),0!==e.data.length&&t.uint32(18).bytes(e.data),void 0!==e.proof&&u.Proof.encode(e.proof,t.uint32(26).fork()).ldelim(),t},decode(e,t){let r=e instanceof s.default.Reader?e:new s.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=R();for(;r.pos>>3){case 1:i.rootHash=r.bytes();break;case 2:i.data=r.bytes();break;case 3:i.proof=u.Proof.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON:e=>({rootHash:J(e.rootHash)?N(e.rootHash):new Uint8Array,data:J(e.data)?N(e.data):new Uint8Array,proof:J(e.proof)?u.Proof.fromJSON(e.proof):void 0}),toJSON(e){let t={};return void 0!==e.rootHash&&(t.rootHash=B(void 0!==e.rootHash?e.rootHash:new Uint8Array)),void 0!==e.data&&(t.data=B(void 0!==e.data?e.data:new Uint8Array)),void 0!==e.proof&&(t.proof=e.proof?u.Proof.toJSON(e.proof):void 0),t},fromPartial(e){var t,r;let n=R();return n.rootHash=null!==(t=e.rootHash)&&void 0!==t?t:new Uint8Array,n.data=null!==(r=e.data)&&void 0!==r?r:new Uint8Array,n.proof=void 0!==e.proof&&null!==e.proof?u.Proof.fromPartial(e.proof):void 0,n}};var E=void 0!==E?E:"undefined"!=typeof self?self:window;let T=E.atob||(e=>E.Buffer.from(e,"base64").toString("binary"));function N(e){let t=T(e),r=new Uint8Array(t.length);for(let e=0;eE.Buffer.from(e,"binary").toString("base64"));function B(e){let t=[];for(let r of e)t.push(String.fromCharCode(r));return x(t.join(""))}function C(e){return{seconds:Math.trunc(e.getTime()/1e3).toString(),nanos:e.getTime()%1e3*1e6}}function M(e){let t=1e3*Number(e.seconds);return new Date(t+=e.nanos/1e6)}function D(e){return e instanceof Date?e:"string"==typeof e?new Date(e):M(l.Timestamp.fromJSON(e))}function U(e){return e.toString()}function J(e){return null!=e}s.default.util.Long!==a.default&&(s.default.util.Long=a.default,s.default.configure())},86674:function(e,t,r){"use strict";var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.SimpleValidator=t.Validator=t.ValidatorSet=t.protobufPackage=void 0;let i=n(r(40059)),o=n(r(81667)),a=r(99027);function s(){return{validators:[],proposer:void 0,totalVotingPower:"0"}}function l(){return{address:new Uint8Array,pubKey:void 0,votingPower:"0",proposerPriority:"0"}}function u(){return{pubKey:void 0,votingPower:"0"}}t.protobufPackage="tendermint.types",t.ValidatorSet={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();for(let n of e.validators)t.Validator.encode(n,r.uint32(10).fork()).ldelim();return void 0!==e.proposer&&t.Validator.encode(e.proposer,r.uint32(18).fork()).ldelim(),"0"!==e.totalVotingPower&&r.uint32(24).int64(e.totalVotingPower),r},decode(e,r){let n=e instanceof o.default.Reader?e:new o.default.Reader(e),i=void 0===r?n.len:n.pos+r,a=s();for(;n.pos>>3){case 1:a.validators.push(t.Validator.decode(n,n.uint32()));break;case 2:a.proposer=t.Validator.decode(n,n.uint32());break;case 3:a.totalVotingPower=g(n.int64());break;default:n.skipType(7&e)}}return a},fromJSON:e=>({validators:Array.isArray(null==e?void 0:e.validators)?e.validators.map(e=>t.Validator.fromJSON(e)):[],proposer:m(e.proposer)?t.Validator.fromJSON(e.proposer):void 0,totalVotingPower:m(e.totalVotingPower)?String(e.totalVotingPower):"0"}),toJSON(e){let r={};return e.validators?r.validators=e.validators.map(e=>e?t.Validator.toJSON(e):void 0):r.validators=[],void 0!==e.proposer&&(r.proposer=e.proposer?t.Validator.toJSON(e.proposer):void 0),void 0!==e.totalVotingPower&&(r.totalVotingPower=e.totalVotingPower),r},fromPartial(e){var r,n;let i=s();return i.validators=(null===(r=e.validators)||void 0===r?void 0:r.map(e=>t.Validator.fromPartial(e)))||[],i.proposer=void 0!==e.proposer&&null!==e.proposer?t.Validator.fromPartial(e.proposer):void 0,i.totalVotingPower=null!==(n=e.totalVotingPower)&&void 0!==n?n:"0",i}},t.Validator={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return 0!==e.address.length&&t.uint32(10).bytes(e.address),void 0!==e.pubKey&&a.PublicKey.encode(e.pubKey,t.uint32(18).fork()).ldelim(),"0"!==e.votingPower&&t.uint32(24).int64(e.votingPower),"0"!==e.proposerPriority&&t.uint32(32).int64(e.proposerPriority),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=l();for(;r.pos>>3){case 1:i.address=r.bytes();break;case 2:i.pubKey=a.PublicKey.decode(r,r.uint32());break;case 3:i.votingPower=g(r.int64());break;case 4:i.proposerPriority=g(r.int64());break;default:r.skipType(7&e)}}return i},fromJSON:e=>({address:m(e.address)?p(e.address):new Uint8Array,pubKey:m(e.pubKey)?a.PublicKey.fromJSON(e.pubKey):void 0,votingPower:m(e.votingPower)?String(e.votingPower):"0",proposerPriority:m(e.proposerPriority)?String(e.proposerPriority):"0"}),toJSON(e){let t={};return void 0!==e.address&&(t.address=h(void 0!==e.address?e.address:new Uint8Array)),void 0!==e.pubKey&&(t.pubKey=e.pubKey?a.PublicKey.toJSON(e.pubKey):void 0),void 0!==e.votingPower&&(t.votingPower=e.votingPower),void 0!==e.proposerPriority&&(t.proposerPriority=e.proposerPriority),t},fromPartial(e){var t,r,n;let i=l();return i.address=null!==(t=e.address)&&void 0!==t?t:new Uint8Array,i.pubKey=void 0!==e.pubKey&&null!==e.pubKey?a.PublicKey.fromPartial(e.pubKey):void 0,i.votingPower=null!==(r=e.votingPower)&&void 0!==r?r:"0",i.proposerPriority=null!==(n=e.proposerPriority)&&void 0!==n?n:"0",i}},t.SimpleValidator={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return void 0!==e.pubKey&&a.PublicKey.encode(e.pubKey,t.uint32(10).fork()).ldelim(),"0"!==e.votingPower&&t.uint32(16).int64(e.votingPower),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=u();for(;r.pos>>3){case 1:i.pubKey=a.PublicKey.decode(r,r.uint32());break;case 2:i.votingPower=g(r.int64());break;default:r.skipType(7&e)}}return i},fromJSON:e=>({pubKey:m(e.pubKey)?a.PublicKey.fromJSON(e.pubKey):void 0,votingPower:m(e.votingPower)?String(e.votingPower):"0"}),toJSON(e){let t={};return void 0!==e.pubKey&&(t.pubKey=e.pubKey?a.PublicKey.toJSON(e.pubKey):void 0),void 0!==e.votingPower&&(t.votingPower=e.votingPower),t},fromPartial(e){var t;let r=u();return r.pubKey=void 0!==e.pubKey&&null!==e.pubKey?a.PublicKey.fromPartial(e.pubKey):void 0,r.votingPower=null!==(t=e.votingPower)&&void 0!==t?t:"0",r}};var d=void 0!==d?d:"undefined"!=typeof self?self:window;let c=d.atob||(e=>d.Buffer.from(e,"base64").toString("binary"));function p(e){let t=c(e),r=new Uint8Array(t.length);for(let e=0;ed.Buffer.from(e,"binary").toString("base64"));function h(e){let t=[];for(let r of e)t.push(String.fromCharCode(r));return f(t.join(""))}function g(e){return e.toString()}function m(e){return null!=e}o.default.util.Long!==i.default&&(o.default.util.Long=i.default,o.default.configure())},81766:function(e,t,r){"use strict";var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Consensus=t.App=t.protobufPackage=void 0;let i=n(r(40059)),o=n(r(81667));function a(){return{protocol:"0",software:""}}function s(){return{block:"0",app:"0"}}function l(e){return e.toString()}function u(e){return null!=e}t.protobufPackage="tendermint.version",t.App={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return"0"!==e.protocol&&t.uint32(8).uint64(e.protocol),""!==e.software&&t.uint32(18).string(e.software),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=a();for(;r.pos>>3){case 1:i.protocol=l(r.uint64());break;case 2:i.software=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({protocol:u(e.protocol)?String(e.protocol):"0",software:u(e.software)?String(e.software):""}),toJSON(e){let t={};return void 0!==e.protocol&&(t.protocol=e.protocol),void 0!==e.software&&(t.software=e.software),t},fromPartial(e){var t,r;let n=a();return n.protocol=null!==(t=e.protocol)&&void 0!==t?t:"0",n.software=null!==(r=e.software)&&void 0!==r?r:"",n}},t.Consensus={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return"0"!==e.block&&t.uint32(8).uint64(e.block),"0"!==e.app&&t.uint32(16).uint64(e.app),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=s();for(;r.pos>>3){case 1:i.block=l(r.uint64());break;case 2:i.app=l(r.uint64());break;default:r.skipType(7&e)}}return i},fromJSON:e=>({block:u(e.block)?String(e.block):"0",app:u(e.app)?String(e.app):"0"}),toJSON(e){let t={};return void 0!==e.block&&(t.block=e.block),void 0!==e.app&&(t.app=e.app),t},fromPartial(e){var t,r;let n=s();return n.block=null!==(t=e.block)&&void 0!==t?t:"0",n.app=null!==(r=e.app)&&void 0!==r?r:"0",n}},o.default.util.Long!==i.default&&(o.default.util.Long=i.default,o.default.configure())},40457:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isSimpleFetchError=t.SimpleFetchError=void 0;class r extends Error{constructor(e,t,n){super("Failed to get response from ".concat(new URL(t,e).toString())),this.baseURL=e,this.url=t,this.response=n,Object.setPrototypeOf(this,r.prototype)}}function n(e){return e instanceof r}t.SimpleFetchError=r,t.isSimpleFetchError=n},37900:function(e,t,r){"use strict";var n=function(e,t,r,n){function i(e){return e instanceof r?e:new r(function(t){t(e)})}return new(r||(r=Promise))(function(r,o){function a(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){e.done?r(e.value):i(e.value).then(a,s)}l((n=n.apply(e,t||[])).next())})},i=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(e);it.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};Object.defineProperty(t,"__esModule",{value:!0}),t.simpleFetch=t.makeURL=void 0;let o=r(40457);function a(e,t){let r=new URL(e);return e=l(r.origin),t=l(r.pathname)+"/"+s(t),l(e+"/"+s(t))}function s(e){return e.length>0&&"/"===e[0]?e.slice(1):e}function l(e){return e.length>0&&"/"===e[e.length-1]?e.slice(0,e.length-1):e}function u(e,t,r){return n(this,void 0,void 0,function*(){let n;"string"!=typeof t&&(t&&(r=t),t=""),"/"===t&&(t="");let s=a(e,t),l=r||{},{headers:u}=l,c=i(l,["headers"]),p=yield fetch(s,Object.assign({headers:Object.assign({accept:"application/json, text/plain, */*"},u)},c));if(204===p.status)n=void 0;else if((p.headers.get("content-type")||"").startsWith("application/json"))n=yield p.json();else{let e=yield p.text(),t=e.trim();n=t.startsWith("{")&&t.endsWith("}")?JSON.parse(t):e}let f={url:s,data:n,headers:p.headers,status:p.status,statusText:p.statusText};if(!((null==r?void 0:r.validateStatus)||d)(p.status))throw new o.SimpleFetchError(e,t,f);return f})}function d(e){return e>=200&&e<300}t.makeURL=a,t.simpleFetch=u},41320:function(e,t,r){"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(37900),t),i(r(40457),t),i(r(84306),t)},84306:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},21623:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CoinPretty=void 0;let n=r(93844),i=r(61155),o=r(18903);class a{get options(){return Object.assign(Object.assign({},this._options),this.intPretty.options)}get denom(){return this.currency.coinDenom}get currency(){return this._currency}setCurrency(e){let t=this.clone();return t.intPretty=this.intPretty.moveDecimalPointRight(this._currency.coinDecimals-e.coinDecimals),t._currency=e,t}separator(e){let t=this.clone();return t._options.separator=e,t}upperCase(e){let t=this.clone();return t._options.upperCase=e,t._options.lowerCase=!e,t}lowerCase(e){let t=this.clone();return t._options.lowerCase=e,t._options.upperCase=!e,t}hideDenom(e){let t=this.clone();return t._options.hideDenom=e,t}hideIBCMetadata(e){let t=this.clone();return t._options.hideIBCMetadata=e,t}moveDecimalPointLeft(e){let t=this.clone();return t.intPretty=t.intPretty.moveDecimalPointLeft(e),t}moveDecimalPointRight(e){let t=this.clone();return t.intPretty=t.intPretty.moveDecimalPointRight(e),t}increasePrecision(e){return this.moveDecimalPointLeft(e)}decreasePrecision(e){return this.moveDecimalPointRight(e)}maxDecimals(e){let t=this.clone();return t.intPretty=t.intPretty.maxDecimals(e),t}inequalitySymbol(e){let t=this.clone();return t.intPretty=t.intPretty.inequalitySymbol(e),t}inequalitySymbolSeparator(e){let t=this.clone();return t.intPretty=t.intPretty.inequalitySymbolSeparator(e),t}trim(e){let t=this.clone();return t.intPretty=t.intPretty.trim(e),t}shrink(e){let t=this.clone();return t.intPretty=t.intPretty.shrink(e),t}locale(e){let t=this.clone();return t.intPretty=t.intPretty.locale(e),t}ready(e){let t=this.clone();return t.intPretty=t.intPretty.ready(e),t}get isReady(){return this.intPretty.isReady}add(e){let t=e instanceof a;if(t&&"currency"in e&&this.currency.coinMinimalDenom!==e.currency.coinMinimalDenom)return this.clone();"toDec"in e&&(e=e.toDec());let r=this.clone();return r.intPretty=r.intPretty.add(t?e:e.mul(o.DecUtils.getTenExponentNInPrecisionRange(-this._currency.coinDecimals))),r}sub(e){let t=e instanceof a;if(t&&"currency"in e&&this.currency.coinMinimalDenom!==e.currency.coinMinimalDenom)return this.clone();"toDec"in e&&(e=e.toDec());let r=this.clone();return r.intPretty=r.intPretty.sub(t?e:e.mul(o.DecUtils.getTenExponentNInPrecisionRange(-this._currency.coinDecimals))),r}mul(e){let t=this.clone();return t.intPretty=t.intPretty.mul(e),t}quo(e){let t=this.clone();return t.intPretty=t.intPretty.quo(e),t}toDec(){return this.intPretty.toDec()}toCoin(){let e=this.toDec().mulTruncate(o.DecUtils.getTenExponentNInPrecisionRange(this.currency.coinDecimals)).truncate();return{denom:this.currency.coinMinimalDenom,amount:e.toString()}}toString(){let e=this.denom;this._options.hideIBCMetadata&&"originCurrency"in this.currency&&this.currency.originCurrency&&(e=this.currency.originCurrency.coinDenom),this._options.upperCase&&(e=e.toUpperCase()),this._options.lowerCase&&(e=e.toLowerCase());let t=this._options.separator;return this._options.hideDenom&&(e="",t=""),this.intPretty.toStringWithSymbols("","".concat(t).concat(e))}clone(){let e=new a(this._currency,0);return e._options=Object.assign({},this._options),e.intPretty=this.intPretty.clone(),e}constructor(e,t){this._currency=e,this._options={separator:" ",upperCase:!1,lowerCase:!1,hideDenom:!1,hideIBCMetadata:!1},"object"==typeof t&&"toDec"in t?t=t.toDec():t instanceof i.Dec||(t=new i.Dec(t)),this.intPretty=new n.IntPretty(t.quoTruncate(o.DecUtils.getTenExponentNInPrecisionRange(e.coinDecimals))).maxDecimals(e.coinDecimals)}}t.CoinPretty=a},19531:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CoinUtils=void 0;let n=r(33960),i=r(33086),o=r(61155),a=r(18903),s=r(77173);class l{static createCoinsFromPrimitives(e){return e.map(e=>new n.Coin(e.denom,e.amount))}static amountOf(e,t){let r=e.find(e=>e.denom===t);return r?r.amount:new i.Int(0)}static exclude(e,t){return e.filter(e=>0===t.indexOf(e.denom))}static concat(){for(var e=arguments.length,t=Array(e),r=0;r{let r=e.find(e=>e.denom===t.denom);if(r){let i=new n.Coin(r.denom,r.amount.add(t.amount));e.push(i)}else{let r=new n.Coin(t.denom,t.amount);e.push(r)}return e};return i.reduce(o,[])}static getCoinFromDecimals(e,t,r){let i=e.find(e=>e.coinDenom===r);if(!i)throw Error("Invalid currency");let a=new o.Dec(1);for(let e=0;ee.coinMinimalDenom===t.denom);r||(r={coinDecimals:0,coinDenom:t.denom,coinMinimalDenom:t.denom});let n=new o.Dec(1);for(let e=0;e3&&void 0!==arguments[3]&&arguments[3];if(e.equals(new o.Dec(0)))return"0";let i=e.isNegative(),a=e.abs().truncate(),s=e.abs().sub(new o.Dec(a)),u=Math.max(r-a.toString().length+1,t),d=0===u?"":s.toString(u).replace("0.","");return(i?"-":"")+(n?l.integerStringToUSLocaleString(a.toString()):a.toString())+(d.length>0?".":"")+d}static coinToTrimmedString(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:" ",n=new o.Dec(e.amount).quoTruncate(a.DecUtils.getPrecisionDec(t.coinDecimals));return"".concat(a.DecUtils.trim(n)).concat(r).concat(t.coinDenom)}}t.CoinUtils=l,l.integerStringToUSLocaleString=s.integerStringToUSLocaleString},33960:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Coin=void 0;let n=r(33086);class i{static parse(e){let t=RegExp("([0-9]+)[ ]*([a-zA-Z]+)$").exec(e);if(!t||3!==t.length)throw Error("Invalid coin str");return new i(t[2],t[1])}toString(){return"".concat(this.amount.toString()).concat(this.denom)}constructor(e,t){this.denom=e,this.amount=t instanceof n.Int?t:new n.Int(t)}}t.Coin=i},18903:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DecUtils=void 0;let n=r(61155),i=r(33086);class o{static trim(e){let t="string"==typeof e?e:e.toString();if(0>t.indexOf("."))return t;for(let e=t.length-1;e>=0;e--)if("0"===t[e])t=t.slice(0,e);else break;return t.length>0&&"."===t[t.length-1]&&(t=t.slice(0,t.length-1)),t}static getTenExponentN(e){if(e<-n.Dec.precision)throw Error("Too little precision");if(o.tenExponentNs[e.toString()])return o.tenExponentNs[e.toString()];let t=new n.Dec(10).pow(new i.Int(e));return o.tenExponentNs[e.toString()]=t,t}static getTenExponentNInPrecisionRange(e){if(e>n.Dec.precision)throw Error("Too much precision");return o.getTenExponentN(e)}static getPrecisionDec(e){return o.getTenExponentNInPrecisionRange(e)}}t.DecUtils=o,o.tenExponentNs={}},61155:function(e,t,r){"use strict";var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Dec=void 0;let i=n(r(47909)),o=r(33086),a=r(88404),s=r(77173);class l{static calcPrecisionMultiplier(e){if(e<0)throw Error("Invalid prec");if(e>l.precision)throw Error("Too much precision");let t=e.toString(),r=l.precisionMultipliers.get(t);if(r)return r;let n=l.precision-e,o=(0,i.default)(10).pow(n);return l.precisionMultipliers.set(t,o),o}static reduceDecimalsFromString(e){let t=e.indexOf(".");if(t<0)return{res:e,isDownToZero:!1};let r=e.length-1-t-l.precision;if(r<=0)return{res:e,isDownToZero:!1};let n=e.slice(0,e.length-r);return{res:n,isDownToZero:/^[0.]*$/.test(n)}}checkBitLen(){if(this.int.abs().gt(l.maxDec))throw Error("Integer out of range ".concat(this.int.toString()))}isZero(){return this.int.eq((0,i.default)(0))}isNegative(){return this.int.isNegative()}isPositive(){return this.int.isPositive()}equals(e){return this.int.eq(e.int)}gt(e){return this.int.gt(e.int)}gte(e){return this.int.geq(e.int)}lt(e){return this.int.lt(e.int)}lte(e){return this.int.leq(e.int)}neg(){return new l(this.int.negate(),l.precision)}abs(){return new l(this.int.abs(),l.precision)}add(e){return new l(this.int.add(e.int),l.precision)}sub(e){return new l(this.int.subtract(e.int),l.precision)}pow(e){if(e.isZero())return new l(1);if(e.isNegative())return new l(1).quo(this.pow(e.abs()));let t=new l(this.int,l.precision),r=new l(1);for(let n=e;n.gt(new o.Int(1));n=n.div(new o.Int(2)))n.mod(new o.Int(2)).isZero()||(r=r.mul(t)),t=t.mul(t);return t.mul(r)}approxSqrt(){return this.approxRoot(2)}approxRoot(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:300;if(this.isNegative())return this.neg().approxRoot(e).neg();if(1===e||this.isZero()||this.equals(l.one))return this;if(0===e)return l.one;let[r,n]=[l.one,l.one];for(let i=0;n.abs().gt(l.smallestDec)&&i0&&void 0!==arguments[0]?arguments[0]:l.precision,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=l.calcPrecisionMultiplier(0),{quotient:n,remainder:o}=this.int.abs().divmod(r),a=o.toString(10);for(let e=0,t=a.length;e0?"."+a:"")}round(){return new o.Int(this.chopPrecisionAndRound())}roundUp(){return new o.Int(this.chopPrecisionAndRoundUp())}truncate(){return new o.Int(this.chopPrecisionAndTruncate())}roundDec(){return new l(this.chopPrecisionAndRound(),0)}roundUpDec(){return new l(this.chopPrecisionAndRoundUp(),0)}truncateDec(){return new l(this.chopPrecisionAndTruncate(),0)}constructor(e,t=0){if("number"==typeof e&&(e=e.toString()),"string"==typeof e){if(0===e.length)throw Error("empty string");if(!(0,a.isValidDecimalString)(e)){if((0,a.isExponentDecString)(e))e=(0,a.exponentDecStringToDecString)(e);else throw Error("invalid decimal: ".concat(e))}let r=l.reduceDecimalsFromString(e);r.isDownToZero&&console.log("WARNING: Got ".concat(e,". Dec can only handle up to 18 decimals. However, since the decimal point of the input exceeds 18 digits, the remainder is discarded. As a result, input becomes 0.")),(e=r.res).indexOf(".")>=0&&(t=e.length-e.indexOf(".")-1,e=e.replace(".","")),this.int=(0,i.default)(e)}else e instanceof o.Int?this.int=(0,i.default)(e.toString()):e instanceof o.Uint?this.int=(0,i.default)(e.toString()):this.int=(0,i.default)(e);this.int=this.int.multiply(l.calcPrecisionMultiplier(t)),this.checkBitLen()}}t.Dec=l,l.precision=18,l.decimalPrecisionBits=60,l.maxDec=(0,i.default)("133499189745056880149688856635597007162669032647290798121690100488888732861290034376435130433535"),l.precisionMultipliers=new Map,l.zero=new l(0),l.smallestDec=new l("1",l.precision),l.one=new l(1),o.Int.prototype.toDec=function(){return new l(this)},o.Uint.prototype.toDec=function(){return new l(this)}},88404:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.exponentDecStringToDecString=t.isExponentDecString=t.isValidDecimalString=t.isValidIntegerString=void 0;let r=/^-?\d+$/,n=/^-?\d+.?\d*$/,i=/^(-?)([\d.]+)e([-+])([\d]+)$/;function o(e){return r.test(e)}function a(e){return n.test(e)}function s(e){return i.test(e)}function l(e){let t="";for(let r=0;r0&&"0"===e[0];)e=e.slice(1);return 0===e.length||"."===e[0]?"0"+e:e}function d(e){let t=e.split(i);if(6!==t.length)return e;let r="-"===t[1],n=t[2],o=n.indexOf("."),a=parseInt(t[4])*("-"===t[3]?-1:1);o>=0&&(a-=n.length-o-1,n=u(n.replace(".","")));let s=r?"-":"";if(!(a<0))return s+n+l(a);if(n.length>-a){let e=n.length+a;return s+(n.slice(0,e)+".")+n.slice(e)}return s+"0."+l(-(n.length+a))+n}t.isValidIntegerString=o,t.isValidDecimalString=a,t.isExponentDecString=s,t.exponentDecStringToDecString=d},72097:function(e,t,r){"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(93844),t),i(r(21623),t),i(r(33960),t),i(r(33086),t),i(r(61155),t),i(r(19531),t),i(r(18903),t),i(r(47611),t),i(r(31389),t)},93844:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IntPretty=void 0;let n=r(33086),i=r(61155),o=r(18903),a=r(19531);class s{get options(){return this._options}moveDecimalPointLeft(e){let t=this.clone();return t.floatingDecimalPointRight+=-e,t}moveDecimalPointRight(e){let t=this.clone();return t.floatingDecimalPointRight+=e,t}increasePrecision(e){return this.moveDecimalPointLeft(e)}decreasePrecision(e){return this.moveDecimalPointRight(e)}maxDecimals(e){let t=this.clone();return t._options.maxDecimals=e,t}inequalitySymbol(e){let t=this.clone();return t._options.inequalitySymbol=e,t}inequalitySymbolSeparator(e){let t=this.clone();return t._options.inequalitySymbolSeparator=e,t}trim(e){let t=this.clone();return t._options.trim=e,t}shrink(e){let t=this.clone();return t._options.shrink=e,t}locale(e){let t=this.clone();return t._options.locale=e,t}ready(e){let t=this.clone();return t._options.ready=e,t}get isReady(){return this._options.ready}add(e){e instanceof i.Dec||(e=e.toDec());let t=new s(this.toDec().add(e));return t._options=Object.assign({},this._options),t}sub(e){e instanceof i.Dec||(e=e.toDec());let t=new s(this.toDec().sub(e));return t._options=Object.assign({},this._options),t}mul(e){e instanceof i.Dec||(e=e.toDec());let t=new s(this.toDec().mul(e));return t._options=Object.assign({},this._options),t}quo(e){e instanceof i.Dec||(e=e.toDec());let t=new s(this.toDec().quo(e));return t._options=Object.assign({},this._options),t}toDec(){if(0===this.floatingDecimalPointRight)return this.dec;if(this.floatingDecimalPointRight>0)return this.dec.mulTruncate(o.DecUtils.getTenExponentN(this.floatingDecimalPointRight));{let e=-this.floatingDecimalPointRight,t=this.dec;for(;e>0;)if(e>=i.Dec.precision)t=t.mulTruncate(o.DecUtils.getTenExponentN(-i.Dec.precision)),e-=i.Dec.precision;else{t=t.mulTruncate(o.DecUtils.getTenExponentN(-(e%i.Dec.precision)));break}return t}}toString(){return this.toStringWithSymbols("","")}toStringWithSymbols(e,t){let r;let n=this.toDec();if(this._options.inequalitySymbol&&!n.isZero()&&n.abs().lt(o.DecUtils.getTenExponentN(-this._options.maxDecimals))){let r=n.isNegative();return"".concat(r?">":"<").concat(this._options.inequalitySymbolSeparator).concat(r?"-":"").concat(e).concat(o.DecUtils.getTenExponentN(-this._options.maxDecimals).toString(this._options.maxDecimals,this._options.locale)).concat(t)}r=this._options.shrink?a.CoinUtils.shrinkDecimals(n,0,this._options.maxDecimals,this._options.locale):n.toString(this._options.maxDecimals,this._options.locale),this._options.trim&&(r=o.DecUtils.trim(r));let i="-"===r.charAt(0);return i&&(r=r.slice(1)),"".concat(i?"-":"").concat(e).concat(r).concat(t)}clone(){let e=new s(this.dec);return e.dec=this.dec,e.floatingDecimalPointRight=this.floatingDecimalPointRight,e._options=Object.assign({},this._options),e}constructor(e){if(this.floatingDecimalPointRight=0,this._options={maxDecimals:0,trim:!1,shrink:!1,ready:!0,locale:!0,inequalitySymbol:!1,inequalitySymbolSeparator:" "},"object"==typeof e&&"toDec"in e?e=e.toDec():e instanceof i.Dec||(e=new i.Dec(e)),e.isZero()){this.dec=e;return}let t=e,r=0;for(let e=0;e<18&&!(!t.truncate().equals(new n.Int(0))&&t.equals(new i.Dec(t.truncate())));e++)t=t.mul(new i.Dec(10)),r++;this.dec=e,this._options.maxDecimals=r}}t.IntPretty=s},33086:function(e,t,r){"use strict";var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Uint=t.Int=void 0;let i=n(r(47909)),o=r(88404);class a{checkBitLen(){if(this.int.abs().gt(a.maxInt))throw Error("Integer out of range ".concat(this.int.toString()))}toString(){return this.int.toString(10)}isNegative(){return this.int.isNegative()}isPositive(){return this.int.isPositive()}isZero(){return this.int.eq((0,i.default)(0))}equals(e){return this.int.equals(e.int)}gt(e){return this.int.gt(e.int)}gte(e){return this.int.greaterOrEquals(e.int)}lt(e){return this.int.lt(e.int)}lte(e){return this.int.lesserOrEquals(e.int)}abs(){return new a(this.int.abs())}absUInt(){return new s(this.int.abs())}add(e){return new a(this.int.add(e.int))}sub(e){return new a(this.int.subtract(e.int))}mul(e){return new a(this.int.multiply(e.int))}div(e){return new a(this.int.divide(e.int))}mod(e){return new a(this.int.mod(e.int))}neg(){return new a(this.int.negate())}pow(e){return new a(this.int.pow(e.toBigNumber()))}toBigNumber(){return this.int}constructor(e){if("number"==typeof e&&(e=e.toString()),"string"==typeof e){if(!(0,o.isValidIntegerString)(e)){if((0,o.isExponentDecString)(e))e=(0,o.exponentDecStringToDecString)(e);else throw Error("invalid integer: ".concat(e))}this.int=(0,i.default)(e)}else this.int=(0,i.default)(e);this.checkBitLen()}}t.Int=a,a.maxInt=(0,i.default)("115792089237316195423570985008687907853269984665640564039457584007913129639935");class s{checkBitLen(){if(this.uint.abs().bitLength().gt(256))throw Error("Integer out of range ".concat(this.uint.toString()))}toString(){return this.uint.toString(10)}isZero(){return this.uint.eq((0,i.default)(0))}equals(e){return this.uint.equals(e.uint)}gt(e){return this.uint.gt(e.uint)}gte(e){return this.uint.greaterOrEquals(e.uint)}lt(e){return this.uint.lt(e.uint)}lte(e){return this.uint.lesserOrEquals(e.uint)}add(e){return new s(this.uint.add(e.uint))}sub(e){return new s(this.uint.subtract(e.uint))}mul(e){return new s(this.uint.multiply(e.uint))}div(e){return new s(this.uint.divide(e.uint))}mod(e){return new s(this.uint.mod(e.uint))}pow(e){return new s(this.uint.pow(e.toBigNumber()))}toBigNumber(){return this.uint}constructor(e){if("number"==typeof e&&(e=e.toString()),"string"==typeof e){if(!(0,o.isValidIntegerString)(e)){if((0,o.isExponentDecString)(e))e=(0,o.exponentDecStringToDecString)(e);else throw Error("invalid integer: ".concat(e))}this.uint=(0,i.default)(e)}else this.uint=(0,i.default)(e);if(this.uint.isNegative())throw TypeError("Uint should not be negative");this.checkBitLen()}}t.Uint=s},47611:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PricePretty=void 0;let n=r(93844),i=r(18903);class o{get options(){return Object.assign(Object.assign({},this.intPretty.options),this._options)}get symbol(){return this._fiatCurrency.symbol}get fiatCurrency(){return this._fiatCurrency}separator(e){let t=this.clone();return t._options.separator=e,t}upperCase(e){let t=this.clone();return t._options.upperCase=e,t._options.lowerCase=!e,t}lowerCase(e){let t=this.clone();return t._options.lowerCase=e,t._options.upperCase=!e,t}moveDecimalPointLeft(e){let t=this.clone();return t.intPretty=t.intPretty.moveDecimalPointLeft(e),t}moveDecimalPointRight(e){let t=this.clone();return t.intPretty=t.intPretty.moveDecimalPointRight(e),t}increasePrecision(e){return this.moveDecimalPointLeft(e)}decreasePrecision(e){return this.moveDecimalPointRight(e)}maxDecimals(e){let t=this.clone();return t.intPretty=t.intPretty.maxDecimals(e),t}inequalitySymbol(e){let t=this.clone();return t.intPretty=t.intPretty.inequalitySymbol(e),t}inequalitySymbolSeparator(e){let t=this.clone();return t.intPretty=t.intPretty.inequalitySymbolSeparator(e),t}trim(e){let t=this.clone();return t.intPretty=t.intPretty.trim(e),t}shrink(e){let t=this.clone();return t.intPretty=t.intPretty.shrink(e),t}locale(e){let t=this.clone();return t._options.locale=e,t}ready(e){let t=this.clone();return t.intPretty=t.intPretty.ready(e),t}get isReady(){return this.intPretty.isReady}add(e){let t=this.clone();return t.intPretty=t.intPretty.add(e),t}sub(e){let t=this.clone();return t.intPretty=t.intPretty.sub(e),t}mul(e){let t=this.clone();return t.intPretty=t.intPretty.mul(e),t}quo(e){let t=this.clone();return t.intPretty=t.intPretty.quo(e),t}toDec(){return this.intPretty.toDec()}toString(){let e=this.symbol;this._options.upperCase&&(e=e.toUpperCase()),this._options.lowerCase&&(e=e.toLowerCase());let t=this.toDec(),r=this.options;if(r.inequalitySymbol&&!t.isZero()&&t.abs().lt(i.DecUtils.getTenExponentN(-r.maxDecimals)))return this.intPretty.toStringWithSymbols("".concat(e).concat(this._options.separator),"");let n=parseFloat(this.intPretty.toString()).toLocaleString(r.locale,{maximumFractionDigits:r.maxDecimals}),o="-"===n.charAt(0);return o&&(n=n.slice(1)),"".concat(o?"-":"").concat(e).concat(this._options.separator).concat(n)}clone(){let e=new o(this._fiatCurrency,0);return e._options=Object.assign({},this._options),e.intPretty=this.intPretty.clone(),e}constructor(e,t){this._fiatCurrency=e,this._options={separator:"",upperCase:!1,lowerCase:!1,locale:"en-US"},this.intPretty=new n.IntPretty(t).maxDecimals(e.maxDecimals).shrink(!0).trim(!0).locale(!1).inequalitySymbol(!0),this._options.locale=e.locale}}t.PricePretty=o},31389:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RatePretty=void 0;let n=r(93844);class i{get options(){return Object.assign(Object.assign({},this.intPretty.options),this._options)}separator(e){let t=this.clone();return t._options.separator=e,t}symbol(e){let t=this.clone();return t._options.symbol=e,t}moveDecimalPointLeft(e){let t=this.clone();return t.intPretty=t.intPretty.moveDecimalPointLeft(e),t}moveDecimalPointRight(e){let t=this.clone();return t.intPretty=t.intPretty.moveDecimalPointRight(e),t}maxDecimals(e){let t=this.clone();return t.intPretty=t.intPretty.maxDecimals(e),t}inequalitySymbol(e){let t=this.clone();return t.intPretty=t.intPretty.inequalitySymbol(e),t}inequalitySymbolSeparator(e){let t=this.clone();return t.intPretty=t.intPretty.inequalitySymbolSeparator(e),t}trim(e){let t=this.clone();return t.intPretty=t.intPretty.trim(e),t}shrink(e){let t=this.clone();return t.intPretty=t.intPretty.shrink(e),t}locale(e){let t=this.clone();return t.intPretty=t.intPretty.locale(e),t}ready(e){let t=this.clone();return t.intPretty=t.intPretty.ready(e),t}get isReady(){return this.intPretty.isReady}add(e){let t=this.clone();return t.intPretty=t.intPretty.add(e),t}sub(e){let t=this.clone();return t.intPretty=t.intPretty.sub(e),t}mul(e){let t=this.clone();return t.intPretty=t.intPretty.mul(e),t}quo(e){let t=this.clone();return t.intPretty=t.intPretty.quo(e),t}toDec(){return this.intPretty.toDec()}toString(){return this.intPretty.moveDecimalPointRight(2).toStringWithSymbols("","".concat(this._options.separator).concat(this._options.symbol))}clone(){let e=new i(0);return e._options=Object.assign({},this._options),e.intPretty=this.intPretty.clone(),e}constructor(e){this._options={separator:"",symbol:"%"},this.intPretty=new n.IntPretty(e),this.intPretty=this.intPretty.maxDecimals(3).shrink(!1).trim(!0).locale(!0).inequalitySymbol(!0)}}t.RatePretty=i},77173:function(e,t){"use strict";function r(e){if(e.indexOf(".")>=0)throw Error("".concat(e," is not integer"));if("undefined"!=typeof BigInt)return BigInt(e).toLocaleString("en-US");let t=e,r=[];for(let e=t.length;e>0;e-=3)r.push(t.slice(Math.max(0,e-3),e));return r.reverse().join(",")}Object.defineProperty(t,"__esModule",{value:!0}),t.integerStringToUSLocaleString=void 0,t.integerStringToUSLocaleString=r},20996:function(e,t,r){"use strict";r.d(t,{d:function(){return c}});var n=r(64090),i=r(14255),o=r(66871),a=function(e){let t=n.useRef(e);return(0,o.Z)(()=>{t.current=e}),n.useRef(function(){for(var e=arguments.length,r=Array(e),n=0;n(setTimeout(()=>{g.current=!0},0),()=>{g.current=!1}),[]);let y=(0,i.Z)(t.ref,h),v=a(e=>{let t;let n=m.current;m.current=!1;let i=s(h.current);if(!(!g.current||!h.current||"clientX"in e&&d(e,i))){if(f.current){f.current=!1;return}(t=e.composedPath?e.composedPath().indexOf(h.current)>-1:!i.documentElement.contains(e.target)||h.current.contains(e.target))||!r&&n||c(e)}}),b=e=>r=>{m.current=!0;let n=t.props[e];n&&n(r)},S={ref:y};return!1!==p&&(S[p]=b(p)),n.useEffect(()=>{if(!1!==p){let e=u(p),t=s(h.current),r=()=>{f.current=!0};return t.addEventListener(e,v),t.addEventListener("touchmove",r),()=>{t.removeEventListener(e,v),t.removeEventListener("touchmove",r)}}},[v,p]),!1!==o&&(S[o]=b(o)),n.useEffect(()=>{if(!1!==o){let e=u(o),t=s(h.current);return t.addEventListener(e,v),()=>{t.removeEventListener(e,v)}}},[v,o]),(0,l.jsx)(n.Fragment,{children:n.cloneElement(t,S)})}},32283:function(e,t,r){"use strict";r.d(t,{G:function(){return tr}});var n=r(14749);function i(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n=0||(i[r]=e[r]);return i}var o=r(64090);let a=Math.min,s=Math.max,l=Math.round,u=Math.floor,d=e=>({x:e,y:e}),c={left:"right",right:"left",bottom:"top",top:"bottom"},p={start:"end",end:"start"};function f(e,t,r){return s(e,a(t,r))}function h(e,t){return"function"==typeof e?e(t):e}function g(e){return e.split("-")[0]}function m(e){return e.split("-")[1]}function y(e){return"x"===e?"y":"x"}function v(e){return"y"===e?"height":"width"}function b(e){return["top","bottom"].includes(g(e))?"y":"x"}function S(e){return y(b(e))}function w(e,t,r){void 0===r&&(r=!1);let n=m(e),i=S(e),o=v(i),a="x"===i?n===(r?"end":"start")?"right":"left":"start"===n?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=A(a)),[a,A(a)]}function _(e){let t=A(e);return[k(e),t,k(t)]}function k(e){return e.replace(/start|end/g,e=>p[e])}function O(e,t,r){let n=["left","right"],i=["right","left"],o=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":if(r)return t?i:n;return t?n:i;case"left":case"right":return t?o:a;default:return[]}}function P(e,t,r,n){let i=m(e),o=O(g(e),"start"===r,n);return i&&(o=o.map(e=>e+"-"+i),t&&(o=o.concat(o.map(k)))),o}function A(e){return e.replace(/left|right|bottom|top/g,e=>c[e])}function I(e){return{top:0,right:0,bottom:0,left:0,...e}}function R(e){return"number"!=typeof e?I(e):{top:e,right:e,bottom:e,left:e}}function E(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function T(e,t,r){let n,{reference:i,floating:o}=e,a=b(t),s=S(t),l=v(s),u=g(t),d="y"===a,c=i.x+i.width/2-o.width/2,p=i.y+i.height/2-o.height/2,f=i[l]/2-o[l]/2;switch(u){case"top":n={x:c,y:i.y-o.height};break;case"bottom":n={x:c,y:i.y+i.height};break;case"right":n={x:i.x+i.width,y:p};break;case"left":n={x:i.x-o.width,y:p};break;default:n={x:i.x,y:i.y}}switch(m(t)){case"start":n[s]-=f*(r&&d?-1:1);break;case"end":n[s]+=f*(r&&d?-1:1)}return n}let N=async(e,t,r)=>{let{placement:n="bottom",strategy:i="absolute",middleware:o=[],platform:a}=r,s=o.filter(Boolean),l=await (null==a.isRTL?void 0:a.isRTL(t)),u=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:d,y:c}=T(u,n,l),p=n,f={},h=0;for(let r=0;re<=0)){let e=((null==(i=l.flip)?void 0:i.index)||0)+1,t=T[e];if(t)return{data:{index:e,overflows:C},reset:{placement:t}};let r=null==(o=C.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:o.placement;if(!r)switch(v){case"bestFit":{let e=null==(a=C.map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:a[0];e&&(r=e);break}case"initialPlacement":r=d}if(s!==r)return{reset:{placement:r}}}return{}}}};async function C(e,t){let{placement:r,platform:n,elements:i}=e,o=await (null==n.isRTL?void 0:n.isRTL(i.floating)),a=g(r),s=m(r),l="y"===b(r),u=["left","top"].includes(a)?-1:1,d=o&&l?-1:1,c=h(t,e),{mainAxis:p,crossAxis:f,alignmentAxis:y}="number"==typeof c?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...c};return s&&"number"==typeof y&&(f="end"===s?-1*y:y),l?{x:f*d,y:p*u}:{x:p*u,y:f*d}}let M=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var r,n;let{x:i,y:o,placement:a,middlewareData:s}=t,l=await C(t,e);return a===(null==(r=s.offset)?void 0:r.placement)&&null!=(n=s.arrow)&&n.alignmentOffset?{}:{x:i+l.x,y:o+l.y,data:{...l,placement:a}}}}},D=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){let{x:r,y:n,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:e=>{let{x:t,y:r}=e;return{x:t,y:r}}},...l}=h(e,t),u={x:r,y:n},d=await x(t,l),c=b(g(i)),p=y(c),m=u[p],v=u[c];if(o){let e="y"===p?"top":"left",t="y"===p?"bottom":"right",r=m+d[e],n=m-d[t];m=f(r,m,n)}if(a){let e="y"===c?"top":"left",t="y"===c?"bottom":"right",r=v+d[e],n=v-d[t];v=f(r,v,n)}let S=s.fn({...t,[p]:m,[c]:v});return{...S,data:{x:S.x-r,y:S.y-n}}}}};function U(e){return H(e)?(e.nodeName||"").toLowerCase():"#document"}function J(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function j(e){var t;return null==(t=(H(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function H(e){return e instanceof Node||e instanceof J(e).Node}function q(e){return e instanceof Element||e instanceof J(e).Element}function L(e){return e instanceof HTMLElement||e instanceof J(e).HTMLElement}function F(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof J(e).ShadowRoot)}function V(e){let{overflow:t,overflowX:r,overflowY:n,display:i}=Y(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(i)}function W(e){return["table","td","th"].includes(U(e))}function z(e){let t=Q(),r=Y(e);return"none"!==r.transform||"none"!==r.perspective||!!r.containerType&&"normal"!==r.containerType||!t&&!!r.backdropFilter&&"none"!==r.backdropFilter||!t&&!!r.filter&&"none"!==r.filter||["transform","perspective","filter"].some(e=>(r.willChange||"").includes(e))||["paint","layout","strict","content"].some(e=>(r.contain||"").includes(e))}function G(e){let t=X(e);for(;L(t)&&!K(t);){if(z(t))return t;t=X(t)}return null}function Q(){return"undefined"!=typeof CSS&&!!CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")}function K(e){return["html","body","#document"].includes(U(e))}function Y(e){return J(e).getComputedStyle(e)}function Z(e){return q(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function X(e){if("html"===U(e))return e;let t=e.assignedSlot||e.parentNode||F(e)&&e.host||j(e);return F(t)?t.host:t}function $(e){let t=X(e);return K(t)?e.ownerDocument?e.ownerDocument.body:e.body:L(t)&&V(t)?t:$(t)}function ee(e,t,r){var n;void 0===t&&(t=[]),void 0===r&&(r=!0);let i=$(e),o=i===(null==(n=e.ownerDocument)?void 0:n.body),a=J(i);return o?t.concat(a,a.visualViewport||[],V(i)?i:[],a.frameElement&&r?ee(a.frameElement):[]):t.concat(i,ee(i,[],r))}function et(e){let t=Y(e),r=parseFloat(t.width)||0,n=parseFloat(t.height)||0,i=L(e),o=i?e.offsetWidth:r,a=i?e.offsetHeight:n,s=l(r)!==o||l(n)!==a;return s&&(r=o,n=a),{width:r,height:n,$:s}}function er(e){return q(e)?e:e.contextElement}function en(e){let t=er(e);if(!L(t))return d(1);let r=t.getBoundingClientRect(),{width:n,height:i,$:o}=et(t),a=(o?l(r.width):r.width)/n,s=(o?l(r.height):r.height)/i;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}let ei=d(0);function eo(e){let t=J(e);return Q()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:ei}function ea(e,t,r){return void 0===t&&(t=!1),!!r&&(!t||r===J(e))&&t}function es(e,t,r,n){void 0===t&&(t=!1),void 0===r&&(r=!1);let i=e.getBoundingClientRect(),o=er(e),a=d(1);t&&(n?q(n)&&(a=en(n)):a=en(e));let s=ea(o,r,n)?eo(o):d(0),l=(i.left+s.x)/a.x,u=(i.top+s.y)/a.y,c=i.width/a.x,p=i.height/a.y;if(o){let e=J(o),t=n&&q(n)?J(n):n,r=e,i=r.frameElement;for(;i&&n&&t!==r;){let e=en(i),t=i.getBoundingClientRect(),n=Y(i),o=t.left+(i.clientLeft+parseFloat(n.paddingLeft))*e.x,a=t.top+(i.clientTop+parseFloat(n.paddingTop))*e.y;l*=e.x,u*=e.y,c*=e.x,p*=e.y,l+=o,u+=a,i=(r=J(i)).frameElement}}return E({width:c,height:p,x:l,y:u})}let el=[":popover-open",":modal"];function eu(e){return el.some(t=>{try{return e.matches(t)}catch(e){return!1}})}function ed(e){return es(j(e)).left+Z(e).scrollLeft}function ec(e){let t=j(e),r=Z(e),n=e.ownerDocument.body,i=s(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),o=s(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight),a=-r.scrollLeft+ed(e),l=-r.scrollTop;return"rtl"===Y(n).direction&&(a+=s(t.clientWidth,n.clientWidth)-i),{width:i,height:o,x:a,y:l}}function ep(e,t){let r=J(e),n=j(e),i=r.visualViewport,o=n.clientWidth,a=n.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;let e=Q();(!e||e&&"fixed"===t)&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}function ef(e,t){let r=es(e,!0,"fixed"===t),n=r.top+e.clientTop,i=r.left+e.clientLeft,o=L(e)?en(e):d(1),a=e.clientWidth*o.x;return{width:a,height:e.clientHeight*o.y,x:i*o.x,y:n*o.y}}function eh(e,t,r){let n;if("viewport"===t)n=ep(e,r);else if("document"===t)n=ec(j(e));else if(q(t))n=ef(t,r);else{let r=eo(e);n={...t,x:t.x-r.x,y:t.y-r.y}}return E(n)}function eg(e,t){let r=X(e);return!(r===t||!q(r)||K(r))&&("fixed"===Y(r).position||eg(r,t))}function em(e,t){let r=t.get(e);if(r)return r;let n=ee(e,[],!1).filter(e=>q(e)&&"body"!==U(e)),i=null,o="fixed"===Y(e).position,a=o?X(e):e;for(;q(a)&&!K(a);){let t=Y(a),r=z(a);r||"fixed"!==t.position||(i=null),(o?!r&&!i:!r&&"static"===t.position&&!!i&&["absolute","fixed"].includes(i.position)||V(a)&&!r&&eg(e,a))?n=n.filter(e=>e!==a):i=t,a=X(a)}return t.set(e,n),n}function ey(e,t,r){let n=L(t),i=j(t),o="fixed"===r,a=es(e,!0,o,t),s={scrollLeft:0,scrollTop:0},l=d(0);if(n||!n&&!o){if(("body"!==U(t)||V(i))&&(s=Z(t)),n){let e=es(t,!0,o,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else i&&(l.x=ed(i))}return{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function ev(e,t){return L(e)&&"fixed"!==Y(e).position?t?t(e):e.offsetParent:null}function eb(e,t){let r=J(e);if(!L(e)||eu(e))return r;let n=ev(e,t);for(;n&&W(n)&&"static"===Y(n).position;)n=ev(n,t);return n&&("html"===U(n)||"body"===U(n)&&"static"===Y(n).position&&!z(n))?r:n||G(e)||r}let eS=async function(e){let t=this.getOffsetParent||eb,r=this.getDimensions;return{reference:ey(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,...await r(e.floating)}}},ew={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e,o="fixed"===i,a=j(n),s=!!t&&eu(t.floating);if(n===a||s&&o)return r;let l={scrollLeft:0,scrollTop:0},u=d(1),c=d(0),p=L(n);if((p||!p&&!o)&&(("body"!==U(n)||V(a))&&(l=Z(n)),L(n))){let e=es(n);u=en(n),c.x=e.x+n.clientLeft,c.y=e.y+n.clientTop}return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-l.scrollLeft*u.x+c.x,y:r.y*u.y-l.scrollTop*u.y+c.y}},getDocumentElement:j,getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e,o=[..."clippingAncestors"===r?em(t,this._c):[].concat(r),n],l=o[0],u=o.reduce((e,r)=>{let n=eh(t,r,i);return e.top=s(n.top,e.top),e.right=a(n.right,e.right),e.bottom=a(n.bottom,e.bottom),e.left=s(n.left,e.left),e},eh(t,l,i));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}},getOffsetParent:eb,getElementRects:eS,getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){let{width:t,height:r}=et(e);return{width:t,height:r}},getScale:en,isElement:q,isRTL:function(e){return"rtl"===Y(e).direction}};function e_(e,t){let r,n=null,i=j(e);function o(){var e;clearTimeout(r),null==(e=n)||e.disconnect(),n=null}function l(d,c){void 0===d&&(d=!1),void 0===c&&(c=1),o();let{left:p,top:f,width:h,height:g}=e.getBoundingClientRect();if(d||t(),!h||!g)return;let m=u(f),y={rootMargin:-m+"px "+-u(i.clientWidth-(p+h))+"px "+-u(i.clientHeight-(f+g))+"px "+-u(p)+"px",threshold:s(0,a(1,c))||1},v=!0;function b(e){let t=e[0].intersectionRatio;if(t!==c){if(!v)return l();t?l(!1,t):r=setTimeout(()=>{l(!1,1e-7)},100)}v=!1}try{n=new IntersectionObserver(b,{...y,root:i.ownerDocument})}catch(e){n=new IntersectionObserver(b,y)}n.observe(e)}return l(!0),o}function ek(e,t,r,n){let i;void 0===n&&(n={});let{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:u=!1}=n,d=er(e),c=o||a?[...d?ee(d):[],...ee(t)]:[];c.forEach(e=>{o&&e.addEventListener("scroll",r,{passive:!0}),a&&e.addEventListener("resize",r)});let p=d&&l?e_(d,r):null,f=-1,h=null;s&&(h=new ResizeObserver(e=>{let[n]=e;n&&n.target===d&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;null==(e=h)||e.observe(t)})),r()}),d&&!u&&h.observe(d),h.observe(t));let g=u?es(e):null;function m(){let t=es(e);g&&(t.x!==g.x||t.y!==g.y||t.width!==g.width||t.height!==g.height)&&r(),g=t,i=requestAnimationFrame(m)}return u&&m(),r(),()=>{var e;c.forEach(e=>{o&&e.removeEventListener("scroll",r),a&&e.removeEventListener("resize",r)}),null==p||p(),null==(e=h)||e.disconnect(),h=null,u&&cancelAnimationFrame(i)}}let eO=D,eP=B,eA=(e,t,r)=>{let n=new Map,i={platform:ew,...r},o={...i.platform,_c:n};return N(e,t,{...i,platform:o})};var eI=r(89542),eR="undefined"!=typeof document?o.useLayoutEffect:o.useEffect;function eE(e,t){let r,n,i;if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if((r=e.length)!==t.length)return!1;for(n=r;0!=n--;)if(!eE(e[n],t[n]))return!1;return!0}if((r=(i=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(n=r;0!=n--;)if(!({}).hasOwnProperty.call(t,i[n]))return!1;for(n=r;0!=n--;){let r=i[n];if(("_owner"!==r||!e.$$typeof)&&!eE(e[r],t[r]))return!1}return!0}return e!=e&&t!=t}function eT(e){return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function eN(e,t){let r=eT(e);return Math.round(t*r)/r}function ex(e){let t=o.useRef(e);return eR(()=>{t.current=e}),t}function eB(e){void 0===e&&(e={});let{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:i,elements:{reference:a,floating:s}={},transform:l=!0,whileElementsMounted:u,open:d}=e,[c,p]=o.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[f,h]=o.useState(n);eE(f,n)||h(n);let[g,m]=o.useState(null),[y,v]=o.useState(null),b=o.useCallback(e=>{e!==k.current&&(k.current=e,m(e))},[]),S=o.useCallback(e=>{e!==O.current&&(O.current=e,v(e))},[]),w=a||g,_=s||y,k=o.useRef(null),O=o.useRef(null),P=o.useRef(c),A=null!=u,I=ex(u),R=ex(i),E=o.useCallback(()=>{if(!k.current||!O.current)return;let e={placement:t,strategy:r,middleware:f};R.current&&(e.platform=R.current),eA(k.current,O.current,e).then(e=>{let t={...e,isPositioned:!0};T.current&&!eE(P.current,t)&&(P.current=t,eI.flushSync(()=>{p(t)}))})},[f,t,r,R]);eR(()=>{!1===d&&P.current.isPositioned&&(P.current.isPositioned=!1,p(e=>({...e,isPositioned:!1})))},[d]);let T=o.useRef(!1);eR(()=>(T.current=!0,()=>{T.current=!1}),[]),eR(()=>{if(w&&(k.current=w),_&&(O.current=_),w&&_){if(I.current)return I.current(w,_,E);E()}},[w,_,E,I,A]);let N=o.useMemo(()=>({reference:k,floating:O,setReference:b,setFloating:S}),[b,S]),x=o.useMemo(()=>({reference:w,floating:_}),[w,_]),B=o.useMemo(()=>{let e={position:r,left:0,top:0};if(!x.floating)return e;let t=eN(x.floating,c.x),n=eN(x.floating,c.y);return l?{...e,transform:"translate("+t+"px, "+n+"px)",...eT(x.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:t,top:n}},[r,l,x.floating,c.x,c.y]);return o.useMemo(()=>({...c,update:E,refs:N,elements:x,floatingStyles:B}),[c,E,N,x,B])}var eC=r(14255),eM=r(66871);function eD(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,n={};return Object.keys(e).forEach(i=>{n[i]=e[i].reduce((e,n)=>{if(n){let i=t(n);""!==i&&e.push(i),r&&r[n]&&e.push(r[n])}return e},[]).join(" ")}),n}var eU=r(5250),eJ=r(3827);function ej(e){return"function"==typeof e?e():e}let eH=o.forwardRef(function(e,t){let{children:r,container:n,disablePortal:i=!1}=e,[a,s]=o.useState(null),l=(0,eC.Z)(o.isValidElement(r)?r.ref:null,t);if((0,eM.Z)(()=>{i||s(ej(n)||document.body)},[n,i]),(0,eM.Z)(()=>{if(a&&!i)return(0,eU.Z)(t,a),()=>{(0,eU.Z)(t,null)}},[t,a,i]),i){if(o.isValidElement(r)){let e={ref:l};return o.cloneElement(r,e)}return(0,eJ.jsx)(o.Fragment,{children:r})}return(0,eJ.jsx)(o.Fragment,{children:a?eI.createPortal(r,a):a})});function eq(e){return"string"==typeof e}function eL(e,t,r){return void 0===e||eq(e)?t:(0,n.Z)({},t,{ownerState:(0,n.Z)({},t.ownerState,r)})}var eF=r(75504);function eV(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(void 0===e)return{};let r={};return Object.keys(e).filter(r=>r.match(/^on[A-Z]/)&&"function"==typeof e[r]&&!t.includes(r)).forEach(t=>{r[t]=e[t]}),r}function eW(e){if(void 0===e)return{};let t={};return Object.keys(e).filter(t=>!(t.match(/^on[A-Z]/)&&"function"==typeof e[t])).forEach(r=>{t[r]=e[r]}),t}function ez(e){let{getSlotProps:t,additionalProps:r,externalSlotProps:i,externalForwardedProps:o,className:a}=e;if(!t){let e=(0,eF.Z)(null==r?void 0:r.className,a,null==o?void 0:o.className,null==i?void 0:i.className),t=(0,n.Z)({},null==r?void 0:r.style,null==o?void 0:o.style,null==i?void 0:i.style),s=(0,n.Z)({},r,o,i);return e.length>0&&(s.className=e),Object.keys(t).length>0&&(s.style=t),{props:s,internalRef:void 0}}let s=eV((0,n.Z)({},o,i)),l=eW(i),u=eW(o),d=t(s),c=(0,eF.Z)(null==d?void 0:d.className,null==r?void 0:r.className,a,null==o?void 0:o.className,null==i?void 0:i.className),p=(0,n.Z)({},null==d?void 0:d.style,null==r?void 0:r.style,null==o?void 0:o.style,null==i?void 0:i.style),f=(0,n.Z)({},d,r,u,l);return c.length>0&&(f.className=c),Object.keys(p).length>0&&(f.style=p),{props:f,internalRef:d.ref}}function eG(e,t,r){return"function"==typeof e?e(t,r):e}let eQ=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function eK(e){var t;let{elementType:r,externalSlotProps:o,ownerState:a,skipResolvingSlotProps:s=!1}=e,l=i(e,eQ),u=s?{}:eG(o,a),{props:d,internalRef:c}=ez((0,n.Z)({},l,{externalSlotProps:u})),p=(0,eC.Z)(c,null==u?void 0:u.ref,null==(t=e.additionalProps)?void 0:t.ref);return eL(r,(0,n.Z)({},d,{ref:p}),a)}let eY={disableDefaultClasses:!1},eZ=o.createContext(eY);function eX(e){let{disableDefaultClasses:t}=o.useContext(eZ);return r=>t?"":e(r)}let e$={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"},e0="base";function e1(e){return"".concat(e0,"--").concat(e)}function e2(e,t){return"".concat(e0,"-").concat(e,"-").concat(t)}function e3(e,t){let r=e$[t];return r?e1(r):e2(e,t)}let e6="Popup";function e4(e){return e3(e6,e)}function e8(e){let t;let[r,n]=o.useState(!0),i=o.useRef(!1),a=o.useRef(0),[s,l]=o.useState(!1),u=o.useRef(e);o.useEffect(()=>{!e&&a.current>0&&u.current!==e&&(i.current=!0,n(!1)),u.current=e},[e]);let d=o.useCallback(()=>{i.current=!1,n(!0)},[]),c=o.useCallback(()=>(a.current+=1,l(!0),()=>{a.current-=1,0===a.current&&l(!1)}),[]);return t=s?!e&&!i.current&&r:!e,{contextValue:o.useMemo(()=>({requestedEnter:e,onExited:d,registerTransition:c,hasExited:t}),[d,e,c,t]),hasExited:t}}!function(e,t){let r={};t.forEach(t=>{r[t]=e3(e,t)})}(e6,["root","open"]);let e5=o.createContext(null),e7=o.createContext(null),e9=["anchor","children","container","disablePortal","keepMounted","middleware","offset","open","placement","slotProps","slots","strategy"];function te(e){let{open:t}=e;return eD({root:["root",t&&"open"]},eX(e4))}function tt(e){return"function"==typeof e?e():e}let tr=o.forwardRef(function(e,t){var r;let{anchor:a,children:s,container:l,disablePortal:u=!1,keepMounted:d=!1,middleware:c,offset:p=0,open:f=!1,placement:h="bottom",slotProps:g={},slots:m={},strategy:y="absolute"}=e,v=i(e,e9),{refs:b,elements:S,floatingStyles:w,update:_,placement:k}=eB({elements:{reference:tt(a)},open:f,middleware:null!=c?c:[M(null!=p?p:0),eP(),eO()],placement:h,strategy:y,whileElementsMounted:d?void 0:ek}),O=(0,eC.Z)(b.setFloating,t);(0,eM.Z)(()=>{if(d&&f&&S.reference&&S.floating)return ek(S.reference,S.floating,_)},[d,f,S,_]);let P=(0,n.Z)({},e,{disablePortal:u,keepMounted:d,offset:M,open:f,placement:h,finalPlacement:k,strategy:y}),{contextValue:A,hasExited:I}=e8(f),R=d&&I?"hidden":void 0,E=te(P),T=null!=(r=null==m?void 0:m.root)?r:"div",N=eK({elementType:T,externalSlotProps:g.root,externalForwardedProps:v,ownerState:P,className:E.root,additionalProps:{ref:O,role:"tooltip",style:(0,n.Z)({},w,{visibility:R})}}),x=o.useMemo(()=>({placement:k}),[k]);return d||!I?(0,eJ.jsx)(eH,{disablePortal:u,container:l,children:(0,eJ.jsx)(e7.Provider,{value:x,children:(0,eJ.jsx)(e5.Provider,{value:A,children:(0,eJ.jsx)(T,(0,n.Z)({},N,{children:s}))})})}):null})},5250:function(e,t,r){"use strict";function n(e,t){"function"==typeof e?e(t):e&&(e.current=t)}r.d(t,{Z:function(){return n}})},66871:function(e,t,r){"use strict";let n=r(64090).useLayoutEffect;t.Z=n},14255:function(e,t,r){"use strict";r.d(t,{Z:function(){return o}});var n=r(64090),i=r(5250);function o(){for(var e=arguments.length,t=Array(e),r=0;rt.every(e=>null==e)?null:e=>{t.forEach(t=>{(0,i.Z)(t,e)})},t)}},65727:function(e,t){"use strict";function r(e){if(!Number.isSafeInteger(e)||e<0)throw Error("Wrong positive integer: ".concat(e))}function n(e){if("boolean"!=typeof e)throw Error("Expected boolean, not ".concat(e))}function i(e){return e instanceof Uint8Array||null!=e&&"object"==typeof e&&"Uint8Array"===e.constructor.name}function o(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n0&&!r.includes(e.length))throw Error("Expected Uint8Array of length ".concat(r,", not of length=").concat(e.length))}function a(e){if("function"!=typeof e||"function"!=typeof e.create)throw Error("Hash should be wrapped by utils.wrapConstructor");r(e.outputLen),r(e.blockLen)}function s(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];if(e.destroyed)throw Error("Hash instance has been destroyed");if(t&&e.finished)throw Error("Hash#digest() has already been called")}function l(e,t){o(e);let r=t.outputLen;if(e.length>i&o),s=Number(r&o),l=n?4:0,u=n?0:4;e.setUint32(t+l,a,n),e.setUint32(t+u,s,n)}class a extends i.Hash{update(e){(0,n.exists)(this);let{view:t,buffer:r,blockLen:o}=this,a=(e=(0,i.toBytes)(e)).length;for(let n=0;na-l&&(this.process(r,0),l=0);for(let e=l;ep.length)throw Error("_sha2: outputLen bigger than state");for(let e=0;e1&&void 0!==arguments[1]&&arguments[1];return t?{h:Number(e&r),l:Number(e>>n&r)}:{h:0|Number(e>>n&r),l:0|Number(e&r)}}function o(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=new Uint32Array(e.length),n=new Uint32Array(e.length);for(let o=0;oBigInt(e>>>0)<>>0);t.toBig=a;let s=(e,t,r)=>e>>>r;t.shrSH=s;let l=(e,t,r)=>e<<32-r|t>>>r;t.shrSL=l;let u=(e,t,r)=>e>>>r|t<<32-r;t.rotrSH=u;let d=(e,t,r)=>e<<32-r|t>>>r;t.rotrSL=d;let c=(e,t,r)=>e<<64-r|t>>>r-32;t.rotrBH=c;let p=(e,t,r)=>e>>>r-32|t<<64-r;t.rotrBL=p;let f=(e,t)=>t;t.rotr32H=f;let h=(e,t)=>e;t.rotr32L=h;let g=(e,t,r)=>e<>>32-r;t.rotlSH=g;let m=(e,t,r)=>t<>>32-r;t.rotlSL=m;let y=(e,t,r)=>t<>>64-r;t.rotlBH=y;let v=(e,t,r)=>e<>>64-r;function b(e,t,r,n){let i=(t>>>0)+(n>>>0);return{h:e+r+(i/4294967296|0)|0,l:0|i}}t.rotlBL=v,t.add=b;let S=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0);t.add3L=S;let w=(e,t,r,n)=>t+r+n+(e/4294967296|0)|0;t.add3H=w;let _=(e,t,r,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0);t.add4L=_;let k=(e,t,r,n,i)=>t+r+n+i+(e/4294967296|0)|0;t.add4H=k;let O=(e,t,r,n,i)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0)+(i>>>0);t.add5L=O;let P=(e,t,r,n,i,o)=>t+r+n+i+o+(e/4294967296|0)|0;t.add5H=P;let A={fromBig:i,split:o,toBig:a,shrSH:s,shrSL:l,rotrSH:u,rotrSL:d,rotrBH:c,rotrBL:p,rotr32H:f,rotr32L:h,rotlSH:g,rotlSL:m,rotlBH:y,rotlBL:v,add:b,add3L:S,add3H:w,add4L:_,add4H:k,add5H:P,add5L:O};t.default=A},32125:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.crypto=void 0,t.crypto="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0},55543:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hmac=t.HMAC=void 0;let n=r(65727),i=r(83245);class o extends i.Hash{update(e){return(0,n.exists)(this),this.iHash.update(e),this}digestInto(e){(0,n.exists)(this),(0,n.bytes)(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){let e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));let{oHash:t,iHash:r,finished:n,destroyed:i,blockLen:o,outputLen:a}=this;return e.finished=n,e.destroyed=i,e.blockLen=o,e.outputLen=a,e.oHash=t._cloneInto(e.oHash),e.iHash=r._cloneInto(e.iHash),e}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}constructor(e,t){super(),this.finished=!1,this.destroyed=!1,(0,n.hash)(e);let r=(0,i.toBytes)(t);if(this.iHash=e.create(),"function"!=typeof this.iHash.update)throw Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let o=this.blockLen,a=new Uint8Array(o);a.set(r.length>o?e.create().update(r).digest():r);for(let e=0;enew o(e,t).update(r).digest();t.hmac=a,t.hmac.create=(e,t)=>new o(e,t)},78496:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pbkdf2Async=t.pbkdf2=void 0;let n=r(65727),i=r(55543),o=r(83245);function a(e,t,r,a){(0,n.hash)(e);let{c:s,dkLen:l,asyncTick:u}=(0,o.checkOpts)({dkLen:32,asyncTick:10},a);if((0,n.number)(s),(0,n.number)(l),(0,n.number)(u),s<1)throw Error("PBKDF2: iterations (c) should be >= 1");let d=(0,o.toBytes)(t),c=(0,o.toBytes)(r),p=new Uint8Array(l),f=i.hmac.create(e,d),h=f._cloneInto().update(c);return{c:s,dkLen:l,asyncTick:u,DK:p,PRF:f,PRFSalt:h}}function s(e,t,r,n,i){return e.destroy(),t.destroy(),n&&n.destroy(),i.fill(0),r}function l(e,t,r,n){let i;let{c:l,dkLen:u,DK:d,PRF:c,PRFSalt:p}=a(e,t,r,n),f=new Uint8Array(4),h=(0,o.createView)(f),g=new Uint8Array(c.outputLen);for(let e=1,t=0;t{p._cloneInto(i).update(m).digestInto(m);for(let e=0;et),s=a.map(e=>(9*e+5)%16),l=[a],u=[s];for(let e=0;e<4;e++)for(let t of[l,u])t.push(t[e].map(e=>o[e]));let d=[[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8],[12,13,11,15,6,9,9,7,12,15,11,13,7,8,7,7],[13,15,14,11,7,7,6,8,13,14,13,12,5,5,6,9],[14,11,12,14,8,6,5,5,15,12,15,14,9,9,8,6],[15,12,13,13,9,5,8,6,14,11,12,11,8,6,5,5]].map(e=>new Uint8Array(e)),c=l.map((e,t)=>e.map(e=>d[t][e])),p=u.map((e,t)=>e.map(e=>d[t][e])),f=new Uint32Array([0,1518500249,1859775393,2400959708,2840853838]),h=new Uint32Array([1352829926,1548603684,1836072691,2053994217,0]),g=(e,t)=>e<>>32-t;function m(e,t,r,n){return 0===e?t^r^n:1===e?t&r|~t&n:2===e?(t|~r)^n:3===e?t&n|r&~n:t^(r|~n)}let y=new Uint32Array(16);class v extends n.SHA2{get(){let{h0:e,h1:t,h2:r,h3:n,h4:i}=this;return[e,t,r,n,i]}set(e,t,r,n,i){this.h0=0|e,this.h1=0|t,this.h2=0|r,this.h3=0|n,this.h4=0|i}process(e,t){for(let r=0;r<16;r++,t+=4)y[r]=e.getUint32(t,!0);let r=0|this.h0,n=r,i=0|this.h1,o=i,a=0|this.h2,s=a,d=0|this.h3,v=d,b=0|this.h4,S=b;for(let e=0;e<5;e++){let t=4-e,w=f[e],_=h[e],k=l[e],O=u[e],P=c[e],A=p[e];for(let t=0;t<16;t++){let n=g(r+m(e,i,a,d)+y[k[t]]+w,P[t])+b|0;r=b,b=d,d=0|g(a,10),a=i,i=n}for(let e=0;e<16;e++){let r=g(n+m(t,o,s,v)+y[O[e]]+_,A[e])+S|0;n=S,S=v,v=0|g(s,10),s=o,o=r}}this.set(this.h1+a+v|0,this.h2+d+S|0,this.h3+b+n|0,this.h4+r+o|0,this.h0+i+s|0)}roundClean(){y.fill(0)}destroy(){this.destroyed=!0,this.buffer.fill(0),this.set(0,0,0,0,0)}constructor(){super(64,20,8,!0),this.h0=1732584193,this.h1=-271733879,this.h2=-1732584194,this.h3=271733878,this.h4=-1009589776}}t.RIPEMD160=v,t.ripemd160=(0,i.wrapConstructor)(()=>new v)},23928:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sha224=t.sha256=void 0;let n=r(46133),i=r(83245),o=(e,t,r)=>e&t^~e&r,a=(e,t,r)=>e&t^e&r^t&r,s=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),l=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),u=new Uint32Array(64);class d extends n.SHA2{get(){let{A:e,B:t,C:r,D:n,E:i,F:o,G:a,H:s}=this;return[e,t,r,n,i,o,a,s]}set(e,t,r,n,i,o,a,s){this.A=0|e,this.B=0|t,this.C=0|r,this.D=0|n,this.E=0|i,this.F=0|o,this.G=0|a,this.H=0|s}process(e,t){for(let r=0;r<16;r++,t+=4)u[r]=e.getUint32(t,!1);for(let e=16;e<64;e++){let t=u[e-15],r=u[e-2],n=(0,i.rotr)(t,7)^(0,i.rotr)(t,18)^t>>>3,o=(0,i.rotr)(r,17)^(0,i.rotr)(r,19)^r>>>10;u[e]=o+u[e-7]+n+u[e-16]|0}let{A:r,B:n,C:l,D:d,E:c,F:p,G:f,H:h}=this;for(let e=0;e<64;e++){let t=h+((0,i.rotr)(c,6)^(0,i.rotr)(c,11)^(0,i.rotr)(c,25))+o(c,p,f)+s[e]+u[e]|0,g=((0,i.rotr)(r,2)^(0,i.rotr)(r,13)^(0,i.rotr)(r,22))+a(r,n,l)|0;h=f,f=p,p=c,c=d+t|0,d=l,l=n,n=r,r=t+g|0}r=r+this.A|0,n=n+this.B|0,l=l+this.C|0,d=d+this.D|0,c=c+this.E|0,p=p+this.F|0,f=f+this.G|0,h=h+this.H|0,this.set(r,n,l,d,c,p,f,h)}roundClean(){u.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}constructor(){super(64,32,8,!1),this.A=0|l[0],this.B=0|l[1],this.C=0|l[2],this.D=0|l[3],this.E=0|l[4],this.F=0|l[5],this.G=0|l[6],this.H=0|l[7]}}class c extends d{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}t.sha256=(0,i.wrapConstructor)(()=>new d),t.sha224=(0,i.wrapConstructor)(()=>new c)},3141:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.shake256=t.shake128=t.keccak_512=t.keccak_384=t.keccak_256=t.keccak_224=t.sha3_512=t.sha3_384=t.sha3_256=t.sha3_224=t.Keccak=t.keccakP=void 0;let n=r(65727),i=r(78852),o=r(83245),[a,s,l]=[[],[],[]],u=BigInt(0),d=BigInt(1),c=BigInt(2),p=BigInt(7),f=BigInt(256),h=BigInt(113);for(let e=0,t=d,r=1,n=0;e<24;e++){[r,n]=[n,(2*r+3*n)%5],a.push(2*(5*n+r)),s.push((e+1)*(e+2)/2%64);let i=u;for(let e=0;e<7;e++)(t=(t<>p)*h)%f)&c&&(i^=d<<(d<r>32?(0,i.rotlBH)(e,t,r):(0,i.rotlSH)(e,t,r),v=(e,t,r)=>r>32?(0,i.rotlBL)(e,t,r):(0,i.rotlSL)(e,t,r);function b(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:24,r=new Uint32Array(10);for(let n=24-t;n<24;n++){for(let t=0;t<10;t++)r[t]=e[t]^e[t+10]^e[t+20]^e[t+30]^e[t+40];for(let t=0;t<10;t+=2){let n=(t+8)%10,i=(t+2)%10,o=r[i],a=r[i+1],s=y(o,a,1)^r[n],l=v(o,a,1)^r[n+1];for(let r=0;r<50;r+=10)e[t+r]^=s,e[t+r+1]^=l}let t=e[2],i=e[3];for(let r=0;r<24;r++){let n=s[r],o=y(t,i,n),l=v(t,i,n),u=a[r];t=e[u],i=e[u+1],e[u]=o,e[u+1]=l}for(let t=0;t<50;t+=10){for(let n=0;n<10;n++)r[n]=e[t+n];for(let n=0;n<10;n++)e[t+n]^=~r[(n+2)%10]&r[(n+4)%10]}e[0]^=g[n],e[1]^=m[n]}r.fill(0)}t.keccakP=b;class S extends o.Hash{keccak(){b(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){(0,n.exists)(this);let{blockLen:t,state:r}=this,i=(e=(0,o.toBytes)(e)).length;for(let n=0;n=r&&this.keccak();let o=Math.min(r-this.posOut,i-n);e.set(t.subarray(this.posOut,this.posOut+o),n),this.posOut+=o,n+=o}return e}xofInto(e){if(!this.enableXOF)throw Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return(0,n.number)(e),this.xofInto(new Uint8Array(e))}digestInto(e){if((0,n.output)(e,this),this.finished)throw Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){let{blockLen:t,suffix:r,outputLen:n,rounds:i,enableXOF:o}=this;return e||(e=new S(t,r,n,o,i)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=i,e.suffix=r,e.outputLen=n,e.enableXOF=o,e.destroyed=this.destroyed,e}constructor(e,t,r,i=!1,a=24){if(super(),this.blockLen=e,this.suffix=t,this.outputLen=r,this.enableXOF=i,this.rounds=a,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,(0,n.number)(r),0>=this.blockLen||this.blockLen>=200)throw Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,o.u32)(this.state)}}t.Keccak=S;let w=(e,t,r)=>(0,o.wrapConstructor)(()=>new S(t,e,r));t.sha3_224=w(6,144,28),t.sha3_256=w(6,136,32),t.sha3_384=w(6,104,48),t.sha3_512=w(6,72,64),t.keccak_224=w(1,144,28),t.keccak_256=w(1,136,32),t.keccak_384=w(1,104,48),t.keccak_512=w(1,72,64);let _=(e,t,r)=>(0,o.wrapXOFConstructorWithOpts)(function(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new S(t,e,void 0===n.dkLen?r:n.dkLen,!0)});t.shake128=_(31,168,16),t.shake256=_(31,136,32)},93996:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sha384=t.sha512_256=t.sha512_224=t.sha512=t.SHA512=void 0;let n=r(46133),i=r(78852),o=r(83245),[a,s]=i.default.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(e=>BigInt(e))),l=new Uint32Array(80),u=new Uint32Array(80);class d extends n.SHA2{get(){let{Ah:e,Al:t,Bh:r,Bl:n,Ch:i,Cl:o,Dh:a,Dl:s,Eh:l,El:u,Fh:d,Fl:c,Gh:p,Gl:f,Hh:h,Hl:g}=this;return[e,t,r,n,i,o,a,s,l,u,d,c,p,f,h,g]}set(e,t,r,n,i,o,a,s,l,u,d,c,p,f,h,g){this.Ah=0|e,this.Al=0|t,this.Bh=0|r,this.Bl=0|n,this.Ch=0|i,this.Cl=0|o,this.Dh=0|a,this.Dl=0|s,this.Eh=0|l,this.El=0|u,this.Fh=0|d,this.Fl=0|c,this.Gh=0|p,this.Gl=0|f,this.Hh=0|h,this.Hl=0|g}process(e,t){for(let r=0;r<16;r++,t+=4)l[r]=e.getUint32(t),u[r]=e.getUint32(t+=4);for(let e=16;e<80;e++){let t=0|l[e-15],r=0|u[e-15],n=i.default.rotrSH(t,r,1)^i.default.rotrSH(t,r,8)^i.default.shrSH(t,r,7),o=i.default.rotrSL(t,r,1)^i.default.rotrSL(t,r,8)^i.default.shrSL(t,r,7),a=0|l[e-2],s=0|u[e-2],d=i.default.rotrSH(a,s,19)^i.default.rotrBH(a,s,61)^i.default.shrSH(a,s,6),c=i.default.rotrSL(a,s,19)^i.default.rotrBL(a,s,61)^i.default.shrSL(a,s,6),p=i.default.add4L(o,c,u[e-7],u[e-16]),f=i.default.add4H(p,n,d,l[e-7],l[e-16]);l[e]=0|f,u[e]=0|p}let{Ah:r,Al:n,Bh:o,Bl:d,Ch:c,Cl:p,Dh:f,Dl:h,Eh:g,El:m,Fh:y,Fl:v,Gh:b,Gl:S,Hh:w,Hl:_}=this;for(let e=0;e<80;e++){let t=i.default.rotrSH(g,m,14)^i.default.rotrSH(g,m,18)^i.default.rotrBH(g,m,41),k=i.default.rotrSL(g,m,14)^i.default.rotrSL(g,m,18)^i.default.rotrBL(g,m,41),O=g&y^~g&b,P=m&v^~m&S,A=i.default.add5L(_,k,P,s[e],u[e]),I=i.default.add5H(A,w,t,O,a[e],l[e]),R=0|A,E=i.default.rotrSH(r,n,28)^i.default.rotrBH(r,n,34)^i.default.rotrBH(r,n,39),T=i.default.rotrSL(r,n,28)^i.default.rotrBL(r,n,34)^i.default.rotrBL(r,n,39),N=r&o^r&c^o&c,x=n&d^n&p^d&p;w=0|b,_=0|S,b=0|y,S=0|v,y=0|g,v=0|m,({h:g,l:m}=i.default.add(0|f,0|h,0|I,0|R)),f=0|c,h=0|p,c=0|o,p=0|d,o=0|r,d=0|n;let B=i.default.add3L(R,T,x);r=i.default.add3H(B,I,E,N),n=0|B}({h:r,l:n}=i.default.add(0|this.Ah,0|this.Al,0|r,0|n)),({h:o,l:d}=i.default.add(0|this.Bh,0|this.Bl,0|o,0|d)),({h:c,l:p}=i.default.add(0|this.Ch,0|this.Cl,0|c,0|p)),({h:f,l:h}=i.default.add(0|this.Dh,0|this.Dl,0|f,0|h)),({h:g,l:m}=i.default.add(0|this.Eh,0|this.El,0|g,0|m)),({h:y,l:v}=i.default.add(0|this.Fh,0|this.Fl,0|y,0|v)),({h:b,l:S}=i.default.add(0|this.Gh,0|this.Gl,0|b,0|S)),({h:w,l:_}=i.default.add(0|this.Hh,0|this.Hl,0|w,0|_)),this.set(r,n,o,d,c,p,f,h,g,m,y,v,b,S,w,_)}roundClean(){l.fill(0),u.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}}t.SHA512=d;class c extends d{constructor(){super(),this.Ah=-1942145080,this.Al=424955298,this.Bh=1944164710,this.Bl=-1982016298,this.Ch=502970286,this.Cl=855612546,this.Dh=1738396948,this.Dl=1479516111,this.Eh=258812777,this.El=2077511080,this.Fh=2011393907,this.Fl=79989058,this.Gh=1067287976,this.Gl=1780299464,this.Hh=286451373,this.Hl=-1848208735,this.outputLen=28}}class p extends d{constructor(){super(),this.Ah=573645204,this.Al=-64227540,this.Bh=-1621794909,this.Bl=-934517566,this.Ch=596883563,this.Cl=1867755857,this.Dh=-1774684391,this.Dl=1497426621,this.Eh=-1775747358,this.El=-1467023389,this.Fh=-1101128155,this.Fl=1401305490,this.Gh=721525244,this.Gl=746961066,this.Hh=246885852,this.Hl=-2117784414,this.outputLen=32}}class f extends d{constructor(){super(),this.Ah=-876896931,this.Al=-1056596264,this.Bh=1654270250,this.Bl=914150663,this.Ch=-1856437926,this.Cl=812702999,this.Dh=355462360,this.Dl=-150054599,this.Eh=1731405415,this.El=-4191439,this.Fh=-1900787065,this.Fl=1750603025,this.Gh=-619958771,this.Gl=1694076839,this.Hh=1203062813,this.Hl=-1090891868,this.outputLen=48}}t.sha512=(0,o.wrapConstructor)(()=>new d),t.sha512_224=(0,o.wrapConstructor)(()=>new c),t.sha512_256=(0,o.wrapConstructor)(()=>new p),t.sha384=(0,o.wrapConstructor)(()=>new f)},83245:function(e,t,r){"use strict";/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */Object.defineProperty(t,"__esModule",{value:!0}),t.randomBytes=t.wrapXOFConstructorWithOpts=t.wrapConstructorWithOpts=t.wrapConstructor=t.checkOpts=t.Hash=t.concatBytes=t.toBytes=t.utf8ToBytes=t.asyncLoop=t.nextTick=t.hexToBytes=t.bytesToHex=t.isLE=t.rotr=t.createView=t.u32=t.u8=void 0;let n=r(32125),i=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength);t.u8=i;let o=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4));function a(e){return e instanceof Uint8Array||null!=e&&"object"==typeof e&&"Uint8Array"===e.constructor.name}t.u32=o;let s=e=>new DataView(e.buffer,e.byteOffset,e.byteLength);t.createView=s;let l=(e,t)=>e<<32-t|e>>>t;if(t.rotr=l,t.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],!t.isLE)throw Error("Non little-endian hardware is not supported");let u=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function d(e){if(!a(e))throw Error("Uint8Array expected");let t="";for(let r=0;r=c._0&&e<=c._9?e-c._0:e>=c._A&&e<=c._F?e-(c._A-10):e>=c._a&&e<=c._f?e-(c._a-10):void 0}function f(e){if("string"!=typeof e)throw Error("hex string expected, got "+typeof e);let t=e.length,r=t/2;if(t%2)throw Error("padded hex string expected, got unpadded hex of length "+t);let n=new Uint8Array(r);for(let t=0,i=0;t{};async function g(e,r,n){let i=Date.now();for(let o=0;o=0&&ee().update(y(t)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}function k(e){let t=(t,r)=>e(r).update(y(t)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=t=>e(t),t}function O(e){let t=(t,r)=>e(r).update(y(t)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=t=>e(t),t}function P(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:32;if(n.crypto&&"function"==typeof n.crypto.getRandomValues)return n.crypto.getRandomValues(new Uint8Array(e));throw Error("crypto.getRandomValues must be defined")}t.checkOpts=w,t.wrapConstructor=_,t.wrapConstructorWithOpts=k,t.wrapXOFConstructorWithOpts=O,t.randomBytes=P},2807:function(e,t,r){"use strict";var n,i;r.d(t,{TD:function(){return i},z:function(){return n}}),function(e){e.symbol=Symbol.for("protobuf-ts/unknown"),e.onRead=(r,n,i,o,a)=>{(t(n)?n[e.symbol]:n[e.symbol]=[]).push({no:i,wireType:o,data:a})},e.onWrite=(t,r,n)=>{for(let{no:t,wireType:i,data:o}of e.list(r))n.tag(t,i).raw(o)},e.list=(r,n)=>{if(t(r)){let t=r[e.symbol];return n?t.filter(e=>e.no==n):t}return[]},e.last=(t,r)=>e.list(t,r).slice(-1)[0];let t=t=>t&&Array.isArray(t[e.symbol])}(n||(n={})),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"}(i||(i={}))},65619:function(e,t,r){"use strict";let n;r.d(t,{C:function(){return ec}});let i=Symbol.for("protobuf-ts/message-type");function o(e){let t=!1,r=[];for(let n=0;n2&&void 0!==arguments[2]&&arguments[2];if(t<0)return!0;if(null==e||"object"!=typeof e)return!1;this.prepare();let n=Object.keys(e),i=this.data;if(n.length!n.includes(e))||!r&&n.some(e=>!i.known.includes(e)))return!1;if(t<1)return!0;for(let n of i.oneofs){let i=e[n];if(!s(i))return!1;if(void 0===i.oneofKind)continue;let o=this.fields.find(e=>e.localName===i.oneofKind);if(!o||!this.field(i[i.oneofKind],o,r,t))return!1}for(let n of this.fields)if(void 0===n.oneof&&!this.field(e[n.localName],n,r,t))return!1;return!0}field(e,t,r,n){let i=t.repeat;switch(t.kind){case"scalar":if(void 0===e)return t.opt;if(i)return this.scalars(e,t.T,n,t.L);return this.scalar(e,t.T,t.L);case"enum":if(void 0===e)return t.opt;if(i)return this.scalars(e,q.INT32,n);return this.scalar(e,q.INT32);case"message":if(void 0===e)break;if(i)return this.messages(e,t.T(),r,n);return this.message(e,t.T(),r,n);case"map":if("object"!=typeof e||null===e)return!1;if(n<2)break;if(!this.mapKeys(e,t.K,n))return!1;switch(t.V.kind){case"scalar":return this.scalars(Object.values(e),t.V.T,n,t.V.L);case"enum":return this.scalars(Object.values(e),q.INT32,n);case"message":return this.messages(Object.values(e),t.V.T(),r,n)}}return!0}message(e,t,r,n){return r?t.isAssignable(e,n):t.is(e,n)}messages(e,t,r,n){if(!Array.isArray(e))return!1;if(n<2)return!0;if(r){for(let r=0;rparseInt(e)),t,r);case q.BOOL:return this.scalars(n.slice(0,r).map(e=>"true"==e||"false"!=e&&e),t,r);default:return this.scalars(n,t,r,L.STRING)}}constructor(e){var t;this.fields=null!==(t=e.fields)&&void 0!==t?t:[]}}function u(e){let t=typeof e;if("object"==t){if(Array.isArray(e))return"array";if(null===e)return"null"}return t}function d(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}let c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),p=[];for(let e=0;e>4,a=o,i=2;break;case 2:r[n++]=(15&a)<<4|(60&o)>>2,a=o,i=3;break;case 3:r[n++]=(3&a)<<6|o,i=0}}if(1==i)throw Error("invalid base64 string.");return r.subarray(0,n)}function h(e){let t="",r=0,n,i=0;for(let o=0;o>2],i=(3&n)<<4,r=1;break;case 1:t+=c[i|n>>4],i=(15&n)<<2,r=2;break;case 2:t+=c[i|n>>6]+c[63&n],r=0}return r&&(t+=c[i]+"=",1==r&&(t+="=")),t}function g(){let e=0,t=0;for(let r=0;r<28;r+=7){let n=this.buf[this.pos++];if(e|=(127&n)<>4,(128&r)==0)return this.assertBounds(),[e,t];for(let r=3;r<=31;r+=7){let n=this.buf[this.pos++];if(t|=(127&n)<>>n,o=!(i>>>7==0&&0==t),a=(o?128|i:i)&255;if(r.push(a),!o)return}let n=e>>>28&15|(7&t)<<4,i=t>>3!=0;if(r.push((i?128|n:n)&255),i){for(let e=3;e<31;e+=7){let n=t>>>e,i=n>>>7!=0,o=(i?128|n:n)&255;if(r.push(o),!i)return}r.push(t>>>31&1)}}p["-".charCodeAt(0)]=c.indexOf("+"),p["_".charCodeAt(0)]=c.indexOf("/");let y=4294967296;function v(e){let t="-"==e[0];t&&(e=e.slice(1));let r=1e6,n=0,i=0;function o(t,o){let a=Number(e.slice(t,o));i*=r,(n=n*r+a)>=y&&(i+=n/y|0,n%=y)}return o(-24,-18),o(-18,-12),o(-12,-6),o(-6),[t,n,i]}function b(e,t){if(t>>>0<=2097151)return""+(y*t+(e>>>0));let r=16777215&e,n=(e>>>24|t<<8)>>>0&16777215,i=t>>16&65535,o=r+6777216*n+6710656*i,a=n+8147497*i,s=2*i,l=1e7;function u(e,t){let r=e?String(e):"";return t?"0000000".slice(r.length)+r:r}return o>=1e7&&(a+=Math.floor(o/l),o%=l),a>=l&&(s+=Math.floor(a/l),a%=l),u(s,0)+u(a,s)+u(o,1)}function S(e,t){if(e>=0){for(;e>127;)t.push(127&e|128),e>>>=7;t.push(e)}else{for(let r=0;r<9;r++)t.push(127&e|128),e>>=7;t.push(1)}}function w(){let e=this.buf[this.pos++],t=127&e;if((128&e)==0||(t|=(127&(e=this.buf[this.pos++]))<<7,(128&e)==0)||(t|=(127&(e=this.buf[this.pos++]))<<14,(128&e)==0)||(t|=(127&(e=this.buf[this.pos++]))<<21,(128&e)==0))return this.assertBounds(),t;t|=(15&(e=this.buf[this.pos++]))<<28;for(let t=5;(128&e)!=0&&t<10;t++)e=this.buf[this.pos++];if((128&e)!=0)throw Error("invalid varint");return this.assertBounds(),t>>>0}function _(e){if(!e)throw Error("BigInt unavailable, see https://github.com/timostamm/protobuf-ts/blob/v1.0.8/MANUAL.md#bigint-support")}!function(){let e=new DataView(new ArrayBuffer(8));n=void 0!==globalThis.BigInt&&"function"==typeof e.getBigInt64&&"function"==typeof e.getBigUint64&&"function"==typeof e.setBigInt64&&"function"==typeof e.setBigUint64?{MIN:BigInt("-9223372036854775808"),MAX:BigInt("9223372036854775807"),UMIN:BigInt("0"),UMAX:BigInt("18446744073709551615"),C:BigInt,V:e}:void 0}();let k=/^-?[0-9]+$/,O=4294967296,P=2147483648;class A{isZero(){return 0==this.lo&&0==this.hi}toNumber(){let e=this.hi*O+(this.lo>>>0);if(!Number.isSafeInteger(e))throw Error("cannot convert to safe number");return e}constructor(e,t){this.lo=0|e,this.hi=0|t}}class I extends A{static from(e){if(n)switch(typeof e){case"string":if("0"==e)return this.ZERO;if(""==e)throw Error("string is no integer");e=n.C(e);case"number":if(0===e)return this.ZERO;e=n.C(e);case"bigint":if(!e)return this.ZERO;if(en.UMAX)throw Error("ulong too large");return n.V.setBigUint64(0,e,!0),new I(n.V.getInt32(0,!0),n.V.getInt32(4,!0))}else switch(typeof e){case"string":if("0"==e)return this.ZERO;if(e=e.trim(),!k.test(e))throw Error("string is no integer");let[t,r,i]=v(e);if(t)throw Error("signed value for ulong");return new I(r,i);case"number":if(0==e)return this.ZERO;if(!Number.isSafeInteger(e))throw Error("number is no integer");if(e<0)throw Error("signed value for ulong");return new I(e,e/O)}throw Error("unknown value "+typeof e)}toString(){return n?this.toBigInt().toString():b(this.lo,this.hi)}toBigInt(){return _(n),n.V.setInt32(0,this.lo,!0),n.V.setInt32(4,this.hi,!0),n.V.getBigUint64(0,!0)}}I.ZERO=new I(0,0);class R extends A{static from(e){if(n)switch(typeof e){case"string":if("0"==e)return this.ZERO;if(""==e)throw Error("string is no integer");e=n.C(e);case"number":if(0===e)return this.ZERO;e=n.C(e);case"bigint":if(!e)return this.ZERO;if(en.MAX)throw Error("signed long too large");return n.V.setBigInt64(0,e,!0),new R(n.V.getInt32(0,!0),n.V.getInt32(4,!0))}else switch(typeof e){case"string":if("0"==e)return this.ZERO;if(e=e.trim(),!k.test(e))throw Error("string is no integer");let[t,r,i]=v(e);if(t){if(i>P||i==P&&0!=r)throw Error("signed long too small")}else if(i>=P)throw Error("signed long too large");let o=new R(r,i);return t?o.negate():o;case"number":if(0==e)return this.ZERO;if(!Number.isSafeInteger(e))throw Error("number is no integer");return e>0?new R(e,e/O):new R(-e,-e/O).negate()}throw Error("unknown value "+typeof e)}isNegative(){return(this.hi&P)!=0}negate(){let e=~this.hi,t=this.lo;return t?t=~t+1:e+=1,new R(t,e)}toString(){if(n)return this.toBigInt().toString();if(this.isNegative()){let e=this.negate();return"-"+b(e.lo,e.hi)}return b(this.lo,this.hi)}toBigInt(){return _(n),n.V.setInt32(0,this.lo,!0),n.V.setInt32(4,this.hi,!0),n.V.getBigInt64(0,!0)}}function E(e,t){if(!e)throw Error(t)}R.ZERO=new R(0,0);let T=34028234663852886e22,N=-34028234663852886e22,x=4294967295,B=2147483647,C=-2147483648;function M(e){if("number"!=typeof e)throw Error("invalid int 32: "+typeof e);if(!Number.isInteger(e)||e>B||ex||e<0)throw Error("invalid uint 32: "+e)}function U(e){if("number"!=typeof e)throw Error("invalid float 32: "+typeof e);if(Number.isFinite(e)&&(e>T||e0)&&(n=i)}else if(e.repeat){E(Array.isArray(t));let i=[];switch(e.kind){case"scalar":for(let r=0;r0||r.emitDefaultValues)&&(n=i)}else switch(e.kind){case"scalar":n=this.scalar(e.T,t,e.name,e.opt,r.emitDefaultValues);break;case"enum":n=this.enum(e.T(),t,e.name,e.opt,r.emitDefaultValues,r.enumAsInteger);break;case"message":n=this.message(e.T(),t,e.name,r)}return n}enum(e,t,r,n,i,o){if("google.protobuf.NullValue"==e[0])return i||n?null:void 0;if(void 0===t){E(n);return}if(0!==t||i||n)return(E("number"==typeof t),E(Number.isInteger(t)),o||!e[1].hasOwnProperty(t))?t:e[2]?e[2]+e[1][t]:e[1][t]}message(e,t,r,n){return void 0===t?n.emitDefaultValues?null:void 0:e.internalJsonWrite(t,n)}scalar(e,t,r,n,i){if(void 0===t){E(n);return}let o=i||n;switch(e){case q.INT32:case q.SFIXED32:case q.SINT32:if(0===t)return o?0:void 0;return M(t),t;case q.FIXED32:case q.UINT32:if(0===t)return o?0:void 0;return D(t),t;case q.FLOAT:U(t);case q.DOUBLE:if(0===t)return o?0:void 0;if(E("number"==typeof t),Number.isNaN(t))return"NaN";if(t===Number.POSITIVE_INFINITY)return"Infinity";if(t===Number.NEGATIVE_INFINITY)return"-Infinity";return t;case q.STRING:if(""===t)return o?"":void 0;return E("string"==typeof t),t;case q.BOOL:if(!1===t)return!o&&void 0;return E("boolean"==typeof t),t;case q.UINT64:case q.FIXED64:E("number"==typeof t||"string"==typeof t||"bigint"==typeof t);let a=I.from(t);if(a.isZero()&&!o)return;return a.toString();case q.INT64:case q.SFIXED64:case q.SINT64:E("number"==typeof t||"string"==typeof t||"bigint"==typeof t);let s=R.from(t);if(s.isZero()&&!o)return;return s.toString();case q.BYTES:if(E(t instanceof Uint8Array),!t.byteLength)return o?"":void 0;return h(t)}}constructor(e){var t;this.fields=null!==(t=e.fields)&&void 0!==t?t:[]}}var q,L,F,V=r(2807);function W(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:L.STRING;switch(e){case q.BOOL:return!1;case q.UINT64:case q.FIXED64:return J(I.ZERO,t);case q.INT64:case q.SFIXED64:case q.SINT64:return J(R.ZERO,t);case q.DOUBLE:case q.FLOAT:return 0;case q.BYTES:return new Uint8Array(0);case q.STRING:return"";default:return 0}}class z{prepare(){var e;if(!this.fieldNoToField){let t=null!==(e=this.info.fields)&&void 0!==e?e:[];this.fieldNoToField=new Map(t.map(e=>[e.no,e]))}}read(e,t,r,n){this.prepare();let i=void 0===n?e.len:e.pos+n;for(;e.pose.no-t.no)}}write(e,t,r){for(let n of(this.prepare(),this.fields)){let i,o,a=n.repeat,s=n.localName;if(n.oneof){let t=e[n.oneof];if(t.oneofKind!==s)continue;i=t[s],o=!0}else i=e[s],o=!1;switch(n.kind){case"scalar":case"enum":let l="enum"==n.kind?q.INT32:n.T;if(a){if(E(Array.isArray(i)),a==F.PACKED)this.packed(t,l,n.no,i);else for(let e of i)this.scalar(t,l,n.no,e,!0)}else void 0===i?E(n.opt):this.scalar(t,l,n.no,i,o||n.opt);break;case"message":if(a)for(let e of(E(Array.isArray(i)),i))this.message(t,r,n.T(),n.no,e);else this.message(t,r,n.T(),n.no,i);break;case"map":for(let[e,o]of(E("object"==typeof i&&null!==i),Object.entries(i)))this.mapEntry(t,r,n,e,o)}}let n=r.writeUnknownFields;!1!==n&&(!0===n?V.z.onWrite:n)(this.info.typeName,e,t)}mapEntry(e,t,r,n,i){e.tag(r.no,V.TD.LengthDelimited),e.fork();let o=n;switch(r.K){case q.INT32:case q.FIXED32:case q.UINT32:case q.SFIXED32:case q.SINT32:o=Number.parseInt(n);break;case q.BOOL:E("true"==n||"false"==n),o="true"==n}switch(this.scalar(e,r.K,1,o,!0),r.V.kind){case"scalar":this.scalar(e,r.V.T,2,i,!0);break;case"enum":this.scalar(e,q.INT32,2,i,!0);break;case"message":this.message(e,t,r.V.T(),2,i)}e.join()}message(e,t,r,n,i){void 0!==i&&(r.internalBinaryWrite(i,e.tag(n,V.TD.LengthDelimited).fork(),t),e.join())}scalar(e,t,r,n,i){let[o,a,s]=this.scalarInfo(t,n);(!s||i)&&(e.tag(r,o),e[a](n))}packed(e,t,r,n){if(!n.length)return;E(t!==q.BYTES&&t!==q.STRING),e.tag(r,V.TD.LengthDelimited),e.fork();let[,i]=this.scalarInfo(t);for(let t=0;tnew es};function ea(e){return e?Object.assign(Object.assign({},eo),e):eo}class es{finish(){this.chunks.push(new Uint8Array(this.buf));let e=0;for(let t=0;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(D(e);e>127;)this.buf.push(127&e|128),e>>>=7;return this.buf.push(e),this}int32(e){return M(e),S(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.textEncoder.encode(e);return this.uint32(t.byteLength),this.raw(t)}float(e){U(e);let t=new Uint8Array(4);return new DataView(t.buffer).setFloat32(0,e,!0),this.raw(t)}double(e){let t=new Uint8Array(8);return new DataView(t.buffer).setFloat64(0,e,!0),this.raw(t)}fixed32(e){D(e);let t=new Uint8Array(4);return new DataView(t.buffer).setUint32(0,e,!0),this.raw(t)}sfixed32(e){M(e);let t=new Uint8Array(4);return new DataView(t.buffer).setInt32(0,e,!0),this.raw(t)}sint32(e){return M(e),S(e=(e<<1^e>>31)>>>0,this.buf),this}sfixed64(e){let t=new Uint8Array(8),r=new DataView(t.buffer),n=R.from(e);return r.setInt32(0,n.lo,!0),r.setInt32(4,n.hi,!0),this.raw(t)}fixed64(e){let t=new Uint8Array(8),r=new DataView(t.buffer),n=I.from(e);return r.setInt32(0,n.lo,!0),r.setInt32(4,n.hi,!0),this.raw(t)}int64(e){let t=R.from(e);return m(t.lo,t.hi,this.buf),this}sint64(e){let t=R.from(e),r=t.hi>>31;return m(t.lo<<1^r,(t.hi<<1|t.lo>>>31)^r,this.buf),this}uint64(e){let t=I.from(e);return m(t.lo,t.hi,this.buf),this}constructor(e){this.stack=[],this.textEncoder=null!=e?e:new TextEncoder,this.chunks=[],this.buf=[]}}let el={readUnknownField:!0,readerFactory:e=>new ed(e)};function eu(e){return e?Object.assign(Object.assign({},el),e):el}class ed{tag(){let e=this.uint32(),t=e>>>3,r=7&e;if(t<=0||r<0||r>5)throw Error("illegal tag: field no "+t+" wire type "+r);return[t,r]}skip(e){let t=this.pos;switch(e){case V.TD.Varint:for(;128&this.buf[this.pos++];);break;case V.TD.Bit64:this.pos+=4;case V.TD.Bit32:this.pos+=4;break;case V.TD.LengthDelimited:let r=this.uint32();this.pos+=r;break;case V.TD.StartGroup:let n;for(;(n=this.tag()[1])!==V.TD.EndGroup;)this.skip(n);break;default:throw Error("cant skip wire type "+e)}return this.assertBounds(),this.buf.subarray(t,this.pos)}assertBounds(){if(this.pos>this.len)throw RangeError("premature EOF")}int32(){return 0|this.uint32()}sint32(){let e=this.uint32();return e>>>1^-(1&e)}int64(){return new R(...this.varint64())}uint64(){return new I(...this.varint64())}sint64(){let[e,t]=this.varint64(),r=-(1&e);return new R(e=(e>>>1|(1&t)<<31)^r,t=t>>>1^r)}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 new I(this.sfixed32(),this.sfixed32())}sfixed64(){return new R(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.textDecoder.decode(this.bytes())}constructor(e,t){this.varint64=g,this.uint32=w,this.buf=e,this.len=e.length,this.pos=0,this.view=new DataView(e.buffer,e.byteOffset,e.byteLength),this.textDecoder=null!=t?t:new TextDecoder("utf-8",{fatal:!0,ignoreBOM:!0})}}class ec{create(e){let t=Q(this);return void 0!==e&&(0,K.l)(this,t,e),t}clone(e){let t=this.create();return(0,K.l)(this,t,e),t}equals(e,t){return ee(this,e,t)}is(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.defaultCheckDepth;return this.refTypeCheck.is(e,t,!1)}isAssignable(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.defaultCheckDepth;return this.refTypeCheck.is(e,t,!0)}mergePartial(e,t){(0,K.l)(this,e,t)}fromBinary(e,t){let r=eu(t);return this.internalBinaryRead(r.readerFactory(e),e.byteLength,r)}fromJson(e,t){return this.internalJsonRead(e,X(t))}fromJsonString(e,t){let r=JSON.parse(e);return this.fromJson(r,t)}toJson(e,t){return this.internalJsonWrite(e,$(t))}toJsonString(e,t){var r;return JSON.stringify(this.toJson(e,t),null,null!==(r=null==t?void 0:t.prettySpaces)&&void 0!==r?r:0)}toBinary(e,t){let r=ea(t);return this.internalBinaryWrite(e,r.writerFactory(),r).finish()}internalJsonRead(e,t,r){if(null!==e&&"object"==typeof e&&!Array.isArray(e)){let n=null!=r?r:this.create();return this.refJsonReader.read(e,n,t),n}throw Error("Unable to parse message ".concat(this.typeName," from JSON ").concat(u(e),"."))}internalJsonWrite(e,t){return this.refJsonWriter.write(e,t)}internalBinaryWrite(e,t,r){return this.refBinWriter.write(e,t,r),t}internalBinaryRead(e,t,r,n){let i=null!=n?n:this.create();return this.refBinReader.read(e,i,r,t),i}constructor(e,t,r){this.defaultCheckDepth=16,this.typeName=e,this.fields=t.map(a),this.options=null!=r?r:{},this.messagePrototype=Object.defineProperty({},i,{value:this}),this.refTypeCheck=new l(this),this.refJsonReader=new j(this),this.refJsonWriter=new H(this),this.refBinReader=new z(this),this.refBinWriter=new G(this)}}},73654:function(e,t,r){"use strict";function n(e,t,r){let n,i=r,o;for(let r of e.fields){let e=r.localName;if(r.oneof){let a=i[r.oneof];if((null==a?void 0:a.oneofKind)==void 0)continue;if(n=a[e],(o=t[r.oneof]).oneofKind=a.oneofKind,void 0==n){delete o[e];continue}}else if(n=i[e],o=t,void 0==n)continue;switch(r.repeat&&(o[e].length=n.length),r.kind){case"scalar":case"enum":if(r.repeat)for(let t=0;t1&&"="===e.charAt(t);)++r;return Math.ceil(3*e.length)/4-r};for(var n=Array(64),i=Array(123),o=0;o<64;)i[n[o]=o<26?o+65:o<52?o+71:o<62?o-4:o-59|43]=o++;r.encode=function(e,t,r){for(var i,o=null,a=[],s=0,l=0;t>2],i=(3&u)<<4,l=1;break;case 1:a[s++]=n[i|u>>4],i=(15&u)<<2,l=2;break;case 2:a[s++]=n[i|u>>6],a[s++]=n[63&u],l=0}s>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,a)),s=0)}return(l&&(a[s++]=n[i],a[s++]=61,1===l&&(a[s++]=61)),o)?(s&&o.push(String.fromCharCode.apply(String,a.slice(0,s))),o.join("")):String.fromCharCode.apply(String,a.slice(0,s))};var a="invalid encoding";r.decode=function(e,t,r){for(var n,o=r,s=0,l=0;l1)break;if(void 0===(u=i[u]))throw Error(a);switch(s){case 0:n=u,s=1;break;case 1:t[r++]=n<<2|(48&u)>>4,n=u,s=2;break;case 2:t[r++]=(15&n)<<4|(60&u)>>2,n=u,s=3;break;case 3:t[r++]=(3&n)<<6|u,s=0}}if(1===s)throw Error(a);return r-o},r.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}},94218:function(e){"use strict";function t(){this._listeners={}}e.exports=t,t.prototype.on=function(e,t,r){return(this._listeners[e]||(this._listeners[e]=[])).push({fn:t,ctx:r||this}),this},t.prototype.off=function(e,t){if(void 0===e)this._listeners={};else if(void 0===t)this._listeners[e]=[];else for(var r=this._listeners[e],n=0;n0?0:2147483648,r,n);else if(isNaN(t))e(2143289344,r,n);else if(t>34028234663852886e22)e((i<<31|2139095040)>>>0,r,n);else if(t<11754943508222875e-54)e((i<<31|Math.round(t/1401298464324817e-60))>>>0,r,n);else{var o=Math.floor(Math.log(t)/Math.LN2),a=8388607&Math.round(t*Math.pow(2,-o)*8388608);e((i<<31|o+127<<23|a)>>>0,r,n)}}function a(e,t,r){var n=e(t,r),i=(n>>31)*2+1,o=n>>>23&255,a=8388607&n;return 255===o?a?NaN:1/0*i:0===o?1401298464324817e-60*i*a:i*Math.pow(2,o-150)*(a+8388608)}e.writeFloatLE=t.bind(null,r),e.writeFloatBE=t.bind(null,n),e.readFloatLE=a.bind(null,i),e.readFloatBE=a.bind(null,o)}(),"undefined"!=typeof Float64Array?function(){var t=new Float64Array([-0]),r=new Uint8Array(t.buffer),n=128===r[7];function i(e,n,i){t[0]=e,n[i]=r[0],n[i+1]=r[1],n[i+2]=r[2],n[i+3]=r[3],n[i+4]=r[4],n[i+5]=r[5],n[i+6]=r[6],n[i+7]=r[7]}function o(e,n,i){t[0]=e,n[i]=r[7],n[i+1]=r[6],n[i+2]=r[5],n[i+3]=r[4],n[i+4]=r[3],n[i+5]=r[2],n[i+6]=r[1],n[i+7]=r[0]}function a(e,n){return r[0]=e[n],r[1]=e[n+1],r[2]=e[n+2],r[3]=e[n+3],r[4]=e[n+4],r[5]=e[n+5],r[6]=e[n+6],r[7]=e[n+7],t[0]}function s(e,n){return r[7]=e[n],r[6]=e[n+1],r[5]=e[n+2],r[4]=e[n+3],r[3]=e[n+4],r[2]=e[n+5],r[1]=e[n+6],r[0]=e[n+7],t[0]}e.writeDoubleLE=n?i:o,e.writeDoubleBE=n?o:i,e.readDoubleLE=n?a:s,e.readDoubleBE=n?s:a}():function(){function t(e,t,r,n,i,o){var a,s=n<0?1:0;if(s&&(n=-n),0===n)e(0,i,o+t),e(1/n>0?0:2147483648,i,o+r);else if(isNaN(n))e(0,i,o+t),e(2146959360,i,o+r);else if(n>17976931348623157e292)e(0,i,o+t),e((s<<31|2146435072)>>>0,i,o+r);else if(n<22250738585072014e-324)e((a=n/5e-324)>>>0,i,o+t),e((s<<31|a/4294967296)>>>0,i,o+r);else{var l=Math.floor(Math.log(n)/Math.LN2);1024===l&&(l=1023),e(4503599627370496*(a=n*Math.pow(2,-l))>>>0,i,o+t),e((s<<31|l+1023<<20|1048576*a&1048575)>>>0,i,o+r)}}function a(e,t,r,n,i){var o=e(n,i+t),a=e(n,i+r),s=(a>>31)*2+1,l=a>>>20&2047,u=4294967296*(1048575&a)+o;return 2047===l?u?NaN:1/0*s:0===l?5e-324*s*u:s*Math.pow(2,l-1075)*(u+4503599627370496)}e.writeDoubleLE=t.bind(null,r,0,4),e.writeDoubleBE=t.bind(null,n,4,0),e.readDoubleLE=a.bind(null,i,0,4),e.readDoubleBE=a.bind(null,o,4,0)}(),e}function r(e,t,r){t[r]=255&e,t[r+1]=e>>>8&255,t[r+2]=e>>>16&255,t[r+3]=e>>>24}function n(e,t,r){t[r]=e>>>24,t[r+1]=e>>>16&255,t[r+2]=e>>>8&255,t[r+3]=255&e}function i(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}function o(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}e.exports=t(t)},79123:function(module){"use strict";function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(e){}return null}module.exports=inquire},39448:function(e){"use strict";function t(e,t,r){var n=r||8192,i=n>>>1,o=null,a=n;return function(r){if(r<1||r>i)return e(r);a+r>n&&(o=e(n),a=0);var s=t.call(o,a,a+=r);return 7&a&&(a=(7|a)+1),s}}e.exports=t},44645:function(e,t){"use strict";var r=t;r.length=function(e){for(var t=0,r=0,n=0;n191&&n<224?o[a++]=(31&n)<<6|63&e[t++]:n>239&&n<365?(n=((7&n)<<18|(63&e[t++])<<12|(63&e[t++])<<6|63&e[t++])-65536,o[a++]=55296+(n>>10),o[a++]=56320+(1023&n)):o[a++]=(15&n)<<12|(63&e[t++])<<6|63&e[t++],a>8191&&((i||(i=[])).push(String.fromCharCode.apply(String,o)),a=0);return i?(a&&i.push(String.fromCharCode.apply(String,o.slice(0,a))),i.join("")):String.fromCharCode.apply(String,o.slice(0,a))},r.write=function(e,t,r){for(var n,i,o=r,a=0;a>6|192:((64512&n)==55296&&(64512&(i=e.charCodeAt(a+1)))==56320?(n=65536+((1023&n)<<10)+(1023&i),++a,t[r++]=n>>18|240,t[r++]=n>>12&63|128):t[r++]=n>>12|224,t[r++]=n>>6&63|128),t[r++]=63&n|128);return r-o}},94762:function(e,t,r){"use strict";var n=r(47226).Buffer;function i(e){if(e.length>=255)throw TypeError("Alphabet too long");for(var t=new Uint8Array(256),r=0;r>>0,d=new Uint8Array(a);e[r];){var c=t[e.charCodeAt(r)];if(255===c)return;for(var p=0,f=a-1;(0!==c||p>>0,d[f]=c%256>>>0,c=c/256>>>0;if(0!==c)throw Error("Non-zero carry");o=p,r++}for(var h=a-o;h!==a&&0===d[h];)h++;var g=n.allocUnsafe(i+(a-h));g.fill(0,0,i);for(var m=i;h!==a;)g[m++]=d[h++];return g}function p(e){var t=c(e);if(t)return t;throw Error("Non-base"+s+" character")}return{encode:function(t){if((Array.isArray(t)||t instanceof Uint8Array)&&(t=n.from(t)),!n.isBuffer(t))throw TypeError("Expected Buffer");if(0===t.length)return"";for(var r=0,i=0,o=0,a=t.length;o!==a&&0===t[o];)o++,r++;for(var u=(a-o)*d+1>>>0,c=new Uint8Array(u);o!==a;){for(var p=t[o],f=0,h=u-1;(0!==p||f>>0,c[h]=p%s>>>0,p=p/s>>>0;if(0!==p)throw Error("Non-zero carry");i=f,o++}for(var g=u-i;g!==u&&0===c[g];)g++;for(var m=l.repeat(r);g0)throw Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");-1===r&&(r=t);var n=r===t?0:4-r%4;return[r,n]}function u(e){var t=l(e),r=t[0],n=t[1];return(r+n)*3/4-n}function d(e,t,r){return(t+r)*3/4-r}function c(e){var t,r,o=l(e),a=o[0],s=o[1],u=new i(d(e,a,s)),c=0,p=s>0?a-4:a;for(r=0;r>16&255,u[c++]=t>>8&255,u[c++]=255&t;return 2===s&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,u[c++]=255&t),1===s&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,u[c++]=t>>8&255,u[c++]=255&t),u}function p(e){return r[e>>18&63]+r[e>>12&63]+r[e>>6&63]+r[63&e]}function f(e,t,r){for(var n=[],i=t;il?l:s+a));return 1===i?o.push(r[(t=e[n-1])>>2]+r[t<<4&63]+"=="):2===i&&o.push(r[(t=(e[n-2]<<8)+e[n-1])>>10]+r[t>>4&63]+r[t<<2&63]+"="),o.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},73746:function(e,t){"use strict";var r;r={value:!0},r=t.gW=void 0;let n="qpzry9x8gf2tvdw0s3jn54khce6mua7l",i={};for(let e=0;e>25;return(33554431&e)<<5^996825010&-(t>>0&1)^642813549&-(t>>1&1)^513874426&-(t>>2&1)^1027748829&-(t>>3&1)^705979059&-(t>>4&1)}function a(e){let t=1;for(let r=0;r126)return"Invalid prefix ("+e+")";t=o(t)^n>>5}t=o(t);for(let r=0;r=r;)s.push(i>>(o-=r)&a);if(n)o>0&&s.push(i<=t)return"Excess padding";if(i<r)return"Exceeds length limit";let n=e.toLowerCase(),s=e.toUpperCase();if(e!==n&&e!==s)return"Mixed-case string "+e;let l=(e=n).lastIndexOf("1");if(-1===l)return"No separator character for "+e;if(0===l)return"Missing prefix for "+e;let u=e.slice(0,l),d=e.slice(l+1);if(d.length<6)return"Data too short";let c=a(u);if("string"==typeof c)return c;let p=[];for(let e=0;e=d.length||p.push(r)}return c!==t?"Invalid checksum for "+e:{prefix:u,words:p}}return t="bech32"===e?1:734539939,{decodeUnsafe:function(e,t){let n=r(e,t);if("object"==typeof n)return n},decode:function(e,t){let n=r(e,t);if("object"==typeof n)return n;throw Error(n)},encode:function(e,r,i){if(i=i||90,e.length+7+r.length>i)throw TypeError("Exceeds length limit");let s=a(e=e.toLowerCase());if("string"==typeof s)throw Error(s);let l=e+"1";for(let e=0;e>5!=0)throw Error("Non 5-bit word");s=o(s)^t,l+=n.charAt(t)}for(let e=0;e<6;++e)s=o(s);s^=t;for(let e=0;e<6;++e){let t=s>>(5-e)*5&31;l+=n.charAt(t)}return l},toWords:l,fromWordsUnsafe:u,fromWords:d}}t.gW=c("bech32"),c("bech32m")},47909:function(e,t,r){"use strict";e=r.nmd(e);var n,i=function(e){var t=1e7,r=7,n=9007199254740992,o=f(9007199254740992),a="0123456789abcdefghijklmnopqrstuvwxyz",s="function"==typeof BigInt;function l(e,t,r,n){return void 0===e?l[0]:void 0!==t&&(10!=+t||r)?X(e,t,r,n):eo(e)}function u(e,t){this.value=e,this.sign=t,this.isSmall=!1}function d(e){this.value=e,this.sign=e<0,this.isSmall=!0}function c(e){this.value=e}function p(e){return-nM(e,o))switch(r){case 0:return 0;case 1:return e[0];case 2:return e[0]+e[1]*t;default:return e[0]+(e[1]+e[2]*t)*t}return e}function g(e){for(var t=e.length;0===e[--t];);e.length=t+1}function m(e){for(var t=Array(e),r=-1;++r0?Math.floor(e):Math.ceil(e)}function v(e,r){var n,i,o=e.length,a=r.length,s=Array(o),l=0,u=t;for(i=0;i=u?1:0,s[i]=n-l*u;for(;i0&&s.push(l),s}function b(e,t){return e.length>=t.length?v(e,t):v(t,e)}function S(e,r){var n,i,o=e.length,a=Array(o),s=t;for(i=0;i0;)a[i++]=r%s,r=Math.floor(r/s);return a}function w(e,r){var n,i,o=e.length,a=r.length,s=Array(o),l=0,u=t;for(n=0;n=0?n=w(e,t):(n=w(t,e),r=!r),"number"==typeof(n=h(n)))?(r&&(n=-n),new d(n)):new u(n,r)}function k(e,r,n){var i,o,a=e.length,s=Array(a),l=-r,c=t;for(i=0;i0;)a[i++]=l%s,l=Math.floor(l/s);return a}function A(e,t){for(var r=[];t-- >0;)r.push(0);return r.concat(e)}function I(e,t){var r=Math.max(e.length,t.length);if(r<=30)return O(e,t);r=Math.ceil(r/2);var n=e.slice(r),i=e.slice(0,r),o=t.slice(r),a=t.slice(0,r),s=I(i,a),l=I(n,o),u=I(b(i,n),b(a,o)),d=b(b(s,A(w(w(u,s),l),r)),A(l,2*r));return g(d),d}function R(e,t){return -.012*e-.012*t+15e-6*e*t>0}function E(e,r,n){return e=0;i--){for(n=p-1,v[i+c]!==g&&(n=Math.floor((v[i+c]*p+v[i+c-1])/g)),o=0,a=0,l=b.length,s=0;sM(c,r)){d.push(0);continue}i=c.length,o=c[i-1]*p+c[i-2],a=r[u-1]*p+r[u-2],i>u&&(o=(o+1)*p),n=Math.ceil(o/a);do{if(0>=M(s=P(r,n),c))break;n--}while(n);d.push(n),c=w(c,s)}return d.reverse(),[h(d),h(c)]}function B(e,r){var n,i,o,a,s=e.length,l=m(s),u=t;for(o=0,n=s-1;n>=0;--n)i=y((a=o*u+e[n])/r),o=a-i*r,l[n]=0|i;return[l,0|o]}function C(e,r){var n,i,o=eo(r);if(s)return[new c(e.value/o.value),new c(e.value%o.value)];var a=e.value,p=o.value;if(0===p)throw Error("Cannot divide by zero");if(e.isSmall)return o.isSmall?[new d(y(a/p)),new d(a%p)]:[l[0],e];if(o.isSmall){if(1===p)return[e,l[0]];if(-1==p)return[e.negate(),l[0]];var g=Math.abs(p);if(gt.length?1:-1;for(var r=e.length-1;r>=0;r--)if(e[r]!==t[r])return e[r]>t[r]?1:-1;return 0}function D(e){var t=e.abs();return!t.isUnit()&&(!!(t.equals(2)||t.equals(3)||t.equals(5))||!(t.isEven()||t.isDivisibleBy(3)||t.isDivisibleBy(5))&&(!!t.lesser(49)||void 0))}function U(e,t){for(var r,n,o,a=e.prev(),s=a,l=0;s.isEven();)s=s.divide(2),l++;e:for(n=0;n=0)},d.prototype.minus=d.prototype.subtract,c.prototype.subtract=function(e){return new c(this.value-eo(e).value)},c.prototype.minus=c.prototype.subtract,u.prototype.negate=function(){return new u(this.value,!this.sign)},d.prototype.negate=function(){var e=this.sign,t=new d(-this.value);return t.sign=!e,t},c.prototype.negate=function(){return new c(-this.value)},u.prototype.abs=function(){return new u(this.value,!1)},d.prototype.abs=function(){return new d(Math.abs(this.value))},c.prototype.abs=function(){return new c(this.value>=0?this.value:-this.value)},u.prototype.multiply=function(e){var r,n=eo(e),i=this.value,o=n.value,a=this.sign!==n.sign;if(n.isSmall){if(0===o)return l[0];if(1===o)return this;if(-1===o)return this.negate();if((r=Math.abs(o))n?1:-1:-1},c.prototype.compareAbs=function(e){var t=this.value,r=eo(e).value;return(t=t>=0?t:-t)===(r=r>=0?r:-r)?0:t>r?1:-1},u.prototype.compare=function(e){if(e===1/0)return -1;if(e===-1/0)return 1;var t=eo(e),r=this.value,n=t.value;return this.sign!==t.sign?t.sign?1:-1:t.isSmall?this.sign?-1:1:M(r,n)*(this.sign?-1:1)},u.prototype.compareTo=u.prototype.compare,d.prototype.compare=function(e){if(e===1/0)return -1;if(e===-1/0)return 1;var t=eo(e),r=this.value,n=t.value;return t.isSmall?r==n?0:r>n?1:-1:r<0!==t.sign?r<0?-1:1:r<0?1:-1},d.prototype.compareTo=d.prototype.compare,c.prototype.compare=function(e){if(e===1/0)return -1;if(e===-1/0)return 1;var t=this.value,r=eo(e).value;return t===r?0:t>r?1:-1},c.prototype.compareTo=c.prototype.compare,u.prototype.equals=function(e){return 0===this.compare(e)},c.prototype.eq=c.prototype.equals=d.prototype.eq=d.prototype.equals=u.prototype.eq=u.prototype.equals,u.prototype.notEquals=function(e){return 0!==this.compare(e)},c.prototype.neq=c.prototype.notEquals=d.prototype.neq=d.prototype.notEquals=u.prototype.neq=u.prototype.notEquals,u.prototype.greater=function(e){return this.compare(e)>0},c.prototype.gt=c.prototype.greater=d.prototype.gt=d.prototype.greater=u.prototype.gt=u.prototype.greater,u.prototype.lesser=function(e){return 0>this.compare(e)},c.prototype.lt=c.prototype.lesser=d.prototype.lt=d.prototype.lesser=u.prototype.lt=u.prototype.lesser,u.prototype.greaterOrEquals=function(e){return this.compare(e)>=0},c.prototype.geq=c.prototype.greaterOrEquals=d.prototype.geq=d.prototype.greaterOrEquals=u.prototype.geq=u.prototype.greaterOrEquals,u.prototype.lesserOrEquals=function(e){return 0>=this.compare(e)},c.prototype.leq=c.prototype.lesserOrEquals=d.prototype.leq=d.prototype.lesserOrEquals=u.prototype.leq=u.prototype.lesserOrEquals,u.prototype.isEven=function(){return(1&this.value[0])==0},d.prototype.isEven=function(){return(1&this.value)==0},c.prototype.isEven=function(){return(this.value&BigInt(1))===BigInt(0)},u.prototype.isOdd=function(){return(1&this.value[0])==1},d.prototype.isOdd=function(){return(1&this.value)==1},c.prototype.isOdd=function(){return(this.value&BigInt(1))===BigInt(1)},u.prototype.isPositive=function(){return!this.sign},d.prototype.isPositive=function(){return this.value>0},c.prototype.isPositive=d.prototype.isPositive,u.prototype.isNegative=function(){return this.sign},d.prototype.isNegative=function(){return this.value<0},c.prototype.isNegative=d.prototype.isNegative,u.prototype.isUnit=function(){return!1},d.prototype.isUnit=function(){return 1===Math.abs(this.value)},c.prototype.isUnit=function(){return this.abs().value===BigInt(1)},u.prototype.isZero=function(){return!1},d.prototype.isZero=function(){return 0===this.value},c.prototype.isZero=function(){return this.value===BigInt(0)},u.prototype.isDivisibleBy=function(e){var t=eo(e);return!t.isZero()&&(!!t.isUnit()||(0===t.compareAbs(2)?this.isEven():this.mod(t).isZero()))},c.prototype.isDivisibleBy=d.prototype.isDivisibleBy=u.prototype.isDivisibleBy,u.prototype.isPrime=function(t){var r=D(this);if(e!==r)return r;var n=this.abs(),o=n.bitLength();if(o<=64)return U(n,[2,3,5,7,11,13,17,19,23,29,31,37]);for(var a=Math.log(2)*o.toJSNumber(),s=Math.ceil(!0===t?2*Math.pow(a,2):a),l=[],u=0;u-n?new d(e-1):new u(o,!0)},c.prototype.prev=function(){return new c(this.value-BigInt(1))};for(var J=[1];2*J[J.length-1]<=t;)J.push(2*J[J.length-1]);var j=J.length,H=J[j-1];function q(e){return Math.abs(e)<=t}function L(e,t,r){t=eo(t);for(var n=e.isNegative(),o=t.isNegative(),a=n?e.not():e,s=o?t.not():t,l=0,u=0,d=null,c=null,p=[];!a.isZero()||!s.isZero();)l=(d=C(a,H))[1].toJSNumber(),n&&(l=H-1-l),u=(c=C(s,H))[1].toJSNumber(),o&&(u=H-1-u),a=d[0],s=c[0],p.push(r(l,u));for(var f=0!==r(n?1:0,o?1:0)?i(-1):i(0),h=p.length-1;h>=0;h-=1)f=f.multiply(H).add(i(p[h]));return f}u.prototype.shiftLeft=function(e){var t=eo(e).toJSNumber();if(!q(t))throw Error(String(t)+" is too large for shifting.");if(t<0)return this.shiftRight(-t);var r=this;if(r.isZero())return r;for(;t>=j;)r=r.multiply(H),t-=j-1;return r.multiply(J[t])},c.prototype.shiftLeft=d.prototype.shiftLeft=u.prototype.shiftLeft,u.prototype.shiftRight=function(e){var t,r=eo(e).toJSNumber();if(!q(r))throw Error(String(r)+" is too large for shifting.");if(r<0)return this.shiftLeft(-r);for(var n=this;r>=j;){if(n.isZero()||n.isNegative()&&n.isUnit())return n;n=(t=C(n,H))[1].isNegative()?t[0].prev():t[0],r-=j-1}return(t=C(n,J[r]))[1].isNegative()?t[0].prev():t[0]},c.prototype.shiftRight=d.prototype.shiftRight=u.prototype.shiftRight,u.prototype.not=function(){return this.negate().prev()},c.prototype.not=d.prototype.not=u.prototype.not,u.prototype.and=function(e){return L(this,e,function(e,t){return e&t})},c.prototype.and=d.prototype.and=u.prototype.and,u.prototype.or=function(e){return L(this,e,function(e,t){return e|t})},c.prototype.or=d.prototype.or=u.prototype.or,u.prototype.xor=function(e){return L(this,e,function(e,t){return e^t})},c.prototype.xor=d.prototype.xor=u.prototype.xor;var F=1073741824,V=(t&-t)*(t&-t)|1073741824;function W(e){var r=e.value,n="number"==typeof r?r|F:"bigint"==typeof r?r|BigInt(F):r[0]+r[1]*t|V;return n&-n}function z(e,t){if(0>=t.compareTo(e)){var r=z(e,t.square(t)),n=r.p,o=r.e,a=n.multiply(t);return 0>=a.compareTo(e)?{p:a,e:2*o+1}:{p:n,e:2*o}}return{p:i(1),e:0}}function G(e,t){return e=eo(e),t=eo(t),e.greater(t)?e:t}function Q(e,t){return e=eo(e),t=eo(t),e.lesser(t)?e:t}function K(e,t){if(e=eo(e).abs(),t=eo(t).abs(),e.equals(t))return e;if(e.isZero())return t;if(t.isZero())return e;for(var r,n,i=l[1];e.isEven()&&t.isEven();)r=Q(W(e),W(t)),e=e.divide(r),t=t.divide(r),i=i.multiply(r);for(;e.isEven();)e=e.divide(W(e));do{for(;t.isEven();)t=t.divide(W(t));e.greater(t)&&(n=t,t=e,e=n),t=t.subtract(e)}while(!t.isZero());return i.isUnit()?e:e.multiply(i)}function Y(e,t){return e=eo(e).abs(),t=eo(t).abs(),e.divide(K(e,t)).multiply(t)}function Z(e,r,n){e=eo(e);var i=n||Math.random,o=Q(e,r=eo(r)),a=G(e,r).subtract(o).add(1);if(a.isSmall)return o.add(Math.floor(i()*a));for(var s=et(a,t).value,u=[],d=!0,c=0;ce.compareTo(i(0))&&(e=e.negate().subtract(i(1))),0===e.compareTo(i(0)))?i(0):i(z(e,i(2)).e).add(i(1))},c.prototype.bitLength=d.prototype.bitLength=u.prototype.bitLength;var X=function(e,t,r,n){r=r||a,e=String(e),n||(e=e.toLowerCase(),r=r.toLowerCase());var i,o=e.length,s=Math.abs(t),l={};for(i=0;i=s){if("1"===u&&1===s)continue;throw Error(u+" is not a valid digit in base "+t+".")}}t=eo(t);var d=[],c="-"===e[0];for(i=c?1:0;i"!==e[i]&&i=0;n--)i=i.add(e[n].times(o)),o=o.times(t);return r?i.negate():i}function ee(e,t){return e<(t=t||a).length?t[e]:"<"+e+">"}function et(e,t){if((t=i(t)).isZero()){if(e.isZero())return{value:[0],isNegative:!1};throw Error("Cannot convert nonzero numbers to base 0.")}if(t.equals(-1)){if(e.isZero())return{value:[0],isNegative:!1};if(e.isNegative())return{value:[].concat.apply([],Array.apply(null,Array(-e.toJSNumber())).map(Array.prototype.valueOf,[1,0])),isNegative:!1};var r=Array.apply(null,Array(e.toJSNumber()-1)).map(Array.prototype.valueOf,[0,1]);return r.unshift([1]),{value:[].concat.apply([],r),isNegative:!1}}var n=!1;if(e.isNegative()&&t.isPositive()&&(n=!0,e=e.abs()),t.isUnit())return e.isZero()?{value:[0],isNegative:!1}:{value:Array.apply(null,Array(e.toJSNumber())).map(Number.prototype.valueOf,1),isNegative:n};for(var o,a=[],s=e;s.isNegative()||s.compareAbs(t)>=0;){s=(o=s.divmod(t)).quotient;var l=o.remainder;l.isNegative()&&(l=t.minus(l).abs(),s=s.next()),a.push(l.toJSNumber())}return a.push(s.toJSNumber()),{value:a.reverse(),isNegative:n}}function er(e,t,r){var n=et(e,t);return(n.isNegative?"-":"")+n.value.map(function(e){return ee(e,r)}).join("")}function en(e){if(p(+e)){var t=+e;if(t===y(t))return s?new c(BigInt(t)):new d(t);throw Error("Invalid integer: "+e)}var n="-"===e[0];n&&(e=e.slice(1));var i=e.split(/e/i);if(i.length>2)throw Error("Invalid integer: "+i.join("e"));if(2===i.length){var o=i[1];if("+"===o[0]&&(o=o.slice(1)),(o=+o)!==y(o)||!p(o))throw Error("Invalid integer: "+o+" is not a valid exponent.");var a=i[0],l=a.indexOf(".");if(l>=0&&(o-=a.length-l-1,a=a.slice(0,l)+a.slice(l+1)),o<0)throw Error("Cannot include negative exponent part for integers");a+=Array(o+1).join("0"),e=a}if(!/^([0-9][0-9]*)$/.test(e))throw Error("Invalid integer: "+e);if(s)return new c(BigInt(n?"-"+e:e));for(var f=[],h=e.length,m=r,v=h-m;h>0;)f.push(+e.slice(v,h)),(v-=m)<0&&(v=0),h-=m;return g(f),new u(f,n)}function ei(e){if(s)return new c(BigInt(e));if(p(e)){if(e!==y(e))throw Error(e+" is not an integer.");return new d(e)}return en(e.toString())}function eo(e){return"number"==typeof e?ei(e):"string"==typeof e?en(e):"bigint"==typeof e?new c(e):e}u.prototype.toArray=function(e){return et(this,e)},d.prototype.toArray=function(e){return et(this,e)},c.prototype.toArray=function(e){return et(this,e)},u.prototype.toString=function(t,r){if(e===t&&(t=10),10!==t||r)return er(this,t,r);for(var n,i=this.value,o=i.length,a=String(i[--o]),s="0000000";--o>=0;)a+=s.slice((n=String(i[o])).length)+n;return(this.sign?"-":"")+a},d.prototype.toString=function(t,r){return(e===t&&(t=10),10!=t||r)?er(this,t,r):String(this.value)},c.prototype.toString=d.prototype.toString,c.prototype.toJSON=u.prototype.toJSON=d.prototype.toJSON=function(){return this.toString()},u.prototype.valueOf=function(){return parseInt(this.toString(),10)},u.prototype.toJSNumber=u.prototype.valueOf,d.prototype.valueOf=function(){return this.value},d.prototype.toJSNumber=d.prototype.valueOf,c.prototype.valueOf=c.prototype.toJSNumber=function(){return parseInt(this.toString(),10)};for(var ea=0;ea<1e3;ea++)l[ea]=eo(ea),ea>0&&(l[-ea]=eo(-ea));return l.one=l[1],l.zero=l[0],l.minusOne=l[-1],l.max=G,l.min=Q,l.gcd=K,l.lcm=Y,l.isInstance=function(e){return e instanceof u||e instanceof d||e instanceof c},l.randBetween=Z,l.fromArray=function(e,t,r){return $(e.map(eo),eo(t||10),r)},l}();e.hasOwnProperty("exports")&&(e.exports=i),void 0!==(n=(function(){return i}).call(t,r,t,e))&&(e.exports=n)},12717:function(e,t,r){"use strict";var n=r(23663).Buffer;Object.defineProperty(t,"__esModule",{value:!0});let i=r(39266),o=r(78110),a=r(26498),s=r(81403),l=r(55234),u=s.BufferN(32),d=s.compile({wif:s.UInt8,bip32:{public:s.UInt32,private:s.UInt32}}),c={messagePrefix:"\x18Bitcoin Signed Message:\n",bech32:"bc",bip32:{public:76067358,private:76066276},pubKeyHash:0,scriptHash:5,wif:128},p=2147483648,f=2147483647;function h(e){return s.String(e)&&null!==e.match(/^(m\/)?(\d+'?\/)*\d+'?$/)}function g(e){return s.UInt32(e)&&e<=f}class m{get depth(){return this.__DEPTH}get index(){return this.__INDEX}get parentFingerprint(){return this.__PARENT_FINGERPRINT}get publicKey(){return void 0===this.__Q&&(this.__Q=a.pointFromScalar(this.__D,!0)),this.__Q}get privateKey(){return this.__D}get identifier(){return i.hash160(this.publicKey)}get fingerprint(){return this.identifier.slice(0,4)}get compressed(){return!0}isNeutered(){return void 0===this.__D}neutered(){return w(this.publicKey,this.chainCode,this.network,this.depth,this.index,this.parentFingerprint)}toBase58(){let e=this.network,t=this.isNeutered()?e.bip32.public:e.bip32.private,r=n.allocUnsafe(78);return r.writeUInt32BE(t,0),r.writeUInt8(this.depth,4),r.writeUInt32BE(this.parentFingerprint,5),r.writeUInt32BE(this.index,9),this.chainCode.copy(r,13),this.isNeutered()?this.publicKey.copy(r,45):(r.writeUInt8(0,45),this.privateKey.copy(r,46)),o.encode(r)}toWIF(){if(!this.privateKey)throw TypeError("Missing private key");return l.encode(this.network.wif,this.privateKey,!0)}derive(e){let t;s(s.UInt32,e);let r=e>=p,o=n.allocUnsafe(37);if(r){if(this.isNeutered())throw TypeError("Missing private key for hardened child key");o[0]=0,this.privateKey.copy(o,1),o.writeUInt32BE(e,33)}else this.publicKey.copy(o,0),o.writeUInt32BE(e,33);let l=i.hmacSHA512(this.chainCode,o),u=l.slice(0,32),d=l.slice(32);if(!a.isPrivate(u))return this.derive(e+1);if(this.isNeutered()){let r=a.pointAddScalar(this.publicKey,u,!0);if(null===r)return this.derive(e+1);t=w(r,d,this.network,this.depth+1,e,this.fingerprint.readUInt32BE(0))}else{let r=a.privateAdd(this.privateKey,u);if(null==r)return this.derive(e+1);t=b(r,d,this.network,this.depth+1,e,this.fingerprint.readUInt32BE(0))}return t}deriveHardened(e){return s(g,e),this.derive(e+p)}derivePath(e){s(h,e);let t=e.split("/");if("m"===t[0]){if(this.parentFingerprint)throw TypeError("Expected master, got child");t=t.slice(1)}return t.reduce((e,t)=>{let r;return"'"===t.slice(-1)?(r=parseInt(t.slice(0,-1),10),e.deriveHardened(r)):(r=parseInt(t,10),e.derive(r))},this)}sign(e,t){if(!this.privateKey)throw Error("Missing private key");if(void 0===t&&(t=this.lowR),!1===t)return a.sign(e,this.privateKey);{let t=a.sign(e,this.privateKey),r=n.alloc(32,0),i=0;for(;t[0]>127;)i++,r.writeUIntLE(i,0,6),t=a.signWithEntropy(e,this.privateKey,r);return t}}verify(e,t){return a.verify(e,this.publicKey,t)}constructor(e,t,r,n,i=0,o=0,a=0){this.__D=e,this.__Q=t,this.chainCode=r,this.network=n,this.__DEPTH=i,this.__INDEX=o,this.__PARENT_FINGERPRINT=a,s(d,n),this.lowR=!1}}function y(e,t){let r;let n=o.decode(e);if(78!==n.length)throw TypeError("Invalid buffer length");t=t||c;let i=n.readUInt32BE(0);if(i!==t.bip32.private&&i!==t.bip32.public)throw TypeError("Invalid network version");let a=n[4],s=n.readUInt32BE(5);if(0===a&&0!==s)throw TypeError("Invalid parent fingerprint");let l=n.readUInt32BE(9);if(0===a&&0!==l)throw TypeError("Invalid index");let u=n.slice(13,45);if(i===t.bip32.private){if(0!==n.readUInt8(45))throw TypeError("Invalid private key");r=b(n.slice(46,78),u,t,a,l,s)}else r=w(n.slice(45,78),u,t,a,l,s);return r}function v(e,t,r){return b(e,t,r)}function b(e,t,r,n,i,o){if(s({privateKey:u,chainCode:u},{privateKey:e,chainCode:t}),r=r||c,!a.isPrivate(e))throw TypeError("Private key not in range [1, n)");return new m(e,void 0,t,r,n,i,o)}function S(e,t,r){return w(e,t,r)}function w(e,t,r,n,i,o){if(s({publicKey:s.BufferN(33),chainCode:u},{publicKey:e,chainCode:t}),r=r||c,!a.isPoint(e))throw TypeError("Point is not on the curve");return new m(void 0,e,t,r,n,i,o)}function _(e,t){if(s(s.Buffer,e),e.length<16)throw TypeError("Seed should be at least 128 bits");if(e.length>64)throw TypeError("Seed should be at most 512 bits");t=t||c;let r=i.hmacSHA512(n.from("Bitcoin seed","utf8"),e);return v(r.slice(0,32),r.slice(32),t)}t.fromBase58=y,t.fromPrivateKey=v,t.fromPublicKey=S,t.fromSeed=_},39266:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let n=r(85191),i=r(42716);function o(e){let t=n("sha256").update(e).digest();try{return n("rmd160").update(t).digest()}catch(e){return n("ripemd160").update(t).digest()}}function a(e,t){return i("sha512",e).update(t).digest()}t.hash160=o,t.hmacSHA512=a},53609:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(12717);t.fromSeed=n.fromSeed,t.fromBase58=n.fromBase58,t.fromPublicKey=n.fromPublicKey,t.fromPrivateKey=n.fromPrivateKey},52014:function(e,t,r){"use strict";let n;Object.defineProperty(t,"__esModule",{value:!0});let i={};t.wordlists=i,t._default=n;try{t._default=n=r(25384),i.czech=n}catch(e){}try{t._default=n=r(70056),i.chinese_simplified=n}catch(e){}try{t._default=n=r(52571),i.chinese_traditional=n}catch(e){}try{t._default=n=r(96788),i.korean=n}catch(e){}try{t._default=n=r(67810),i.french=n}catch(e){}try{t._default=n=r(57778),i.italian=n}catch(e){}try{t._default=n=r(26634),i.spanish=n}catch(e){}try{t._default=n=r(3544),i.japanese=n,i.JA=n}catch(e){}try{t._default=n=r(43475),i.portuguese=n}catch(e){}try{t._default=n=r(44012),i.english=n,i.EN=n}catch(e){}},84639:function(e,t,r){"use strict";var n=r(23663).Buffer;Object.defineProperty(t,"__esModule",{value:!0});let i=r(23928),o=r(93996),a=r(78496),s=r(83245),l=r(52014),u=l._default,d="Invalid mnemonic",c="Invalid entropy",p="Invalid mnemonic checksum",f="A wordlist is required but a default could not be found.\nPlease pass a 2048 word array explicitly.";function h(e){return(e||"").normalize("NFKD")}function g(e,t,r){for(;e.lengthg(e.toString(2),"0",8)).join("")}function v(e){let t=8*e.length/32;return y(Array.from(i.sha256(Uint8Array.from(e)))).slice(0,t)}function b(e){return"mnemonic"+(e||"")}function S(e,t){let r=Uint8Array.from(n.from(h(e),"utf8")),i=Uint8Array.from(n.from(b(h(t)),"utf8")),s=a.pbkdf2(o.sha512,r,i,{c:2048,dkLen:64});return n.from(s)}function w(e,t){let r=Uint8Array.from(n.from(h(e),"utf8")),i=Uint8Array.from(n.from(b(h(t)),"utf8"));return a.pbkdf2Async(o.sha512,r,i,{c:2048,dkLen:64}).then(e=>n.from(e))}function _(e,t){if(!(t=t||u))throw Error(f);let r=h(e).split(" ");if(r.length%3!=0)throw Error(d);let i=r.map(e=>{let r=t.indexOf(e);if(-1===r)throw Error(d);return g(r.toString(2),"0",11)}).join(""),o=32*Math.floor(i.length/33),a=i.slice(0,o),s=i.slice(o),l=a.match(/(.{1,8})/g).map(m);if(l.length<16||l.length>32||l.length%4!=0)throw Error(c);let y=n.from(l);if(v(y)!==s)throw Error(p);return y.toString("hex")}function k(e,t){if(n.isBuffer(e)||(e=n.from(e,"hex")),!(t=t||u))throw Error(f);if(e.length<16||e.length>32||e.length%4!=0)throw TypeError(c);let r=(y(Array.from(e))+v(e)).match(/(.{1,11})/g).map(e=>t[m(e)]);return"あいこくしん"===t[0]?r.join(" "):r.join(" ")}function O(e,t,r){if((e=e||128)%32!=0)throw TypeError(c);return k((t=t||(e=>n.from(s.randomBytes(e))))(e/8),r)}function P(e,t){try{_(e,t)}catch(e){return!1}return!0}function A(e){let t=l.wordlists[e];if(t)u=t;else throw Error('Could not find wordlist for language "'+e+'"')}function I(){if(!u)throw Error("No Default Wordlist set");return Object.keys(l.wordlists).filter(e=>"JA"!==e&&"EN"!==e&&l.wordlists[e].every((e,t)=>e===u[t]))[0]}t.mnemonicToSeedSync=S,t.mnemonicToSeed=w,t.mnemonicToEntropy=_,t.entropyToMnemonic=k,t.generateMnemonic=O,t.validateMnemonic=P,t.setDefaultWordlist=A,t.getDefaultWordlist=I;var R=r(52014);t.wordlists=R.wordlists},34108:function(e,t,r){!function(e,t){"use strict";function n(e,t){if(!e)throw Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function o(e,t,r){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&(("le"===t||"be"===t)&&(r=t,t=10),this._init(e||0,t||10,r||"be"))}"object"==typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{c=void 0!==window.Buffer?window.Buffer:r(46601).Buffer}catch(e){}function a(e,t){var r=e.charCodeAt(t);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+e)}function s(e,t,r){var n=a(e,r);return r-1>=t&&(n|=a(e,r-1)<<4),n}function l(e,t,r,i){for(var o=0,a=0,s=Math.min(e.length,r),l=t;l=49?u-49+10:u>=17?u-17+10:u,n(u>=0&&a0?e:t},o.min=function(e,t){return 0>e.cmp(t)?e:t},o.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;a-=3)o=e[a]|e[a-1]<<8|e[a-2]<<16,this.words[i]|=o<>>26-s&67108863,(s+=24)>=26&&(s-=26,i++);else if("le"===r)for(a=0,i=0;a>>26-s&67108863,(s+=24)>=26&&(s-=26,i++);return this._strip()},o.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=Array(this.length);for(var n,i=0;i=t;i-=2)n=s(e,t,i)<=18?(o-=18,a+=1,this.words[a]|=n>>>26):o+=8;else for(i=(e.length-t)%2==0?t+1:t;i=18?(o-=18,a+=1,this.words[a]|=n>>>26):o+=8;this._strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,a=o%n,s=Math.min(o,o-a)+r,u=0,d=r;d1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=d}catch(e){o.prototype.inspect=d}else o.prototype.inspect=d;function d(){return(this.red?""}var c,p=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],h=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];o.prototype.toString=function(e,t){if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var r,i=0,o=0,a=0;a>>24-i&16777215,(i+=2)>=26&&(i-=26,a--),r=0!==o||a!==this.length-1?p[6-l.length]+l+r:l+r}for(0!==o&&(r=o.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var u=f[e],d=h[e];r="";var c=this.clone();for(c.negative=0;!c.isZero();){var g=c.modrn(d).toString(e);r=(c=c.idivn(d)).isZero()?g+r:p[u-g.length]+g+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16,2)},c&&(o.prototype.toBuffer=function(e,t){return this.toArrayLike(c,e,t)}),o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};var g=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)};function m(e){for(var t=Array(e.bitLength()),r=0;r>>i&1}return t}function y(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],a=i*o,s=67108863&a,l=a/67108864|0;r.words[0]=s;for(var u=1;u>>26,c=67108863&l,p=Math.min(u,t.length-1),f=Math.max(0,u-e.length+1);f<=p;f++){var h=u-f|0;d+=(a=(i=0|e.words[h])*(o=0|t.words[f])+c)/67108864|0,c=67108863&a}r.words[u]=0|c,l=0|d}return 0!==l?r.words[u]=0|l:r.length--,r._strip()}o.prototype.toArrayLike=function(e,t,r){this._strip();var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0");var a=g(e,o);return this["_toArrayLike"+("le"===t?"LE":"BE")](a,i),a},o.prototype._toArrayLikeLE=function(e,t){for(var r=0,n=0,i=0,o=0;i>8&255),r>16&255),6===o?(r>24&255),n=0,o=0):(n=a>>>24,o+=2)}if(r=0&&(e[r--]=a>>8&255),r>=0&&(e[r--]=a>>16&255),6===o?(r>=0&&(e[r--]=a>>24&255),n=0,o=0):(n=a>>>24,o+=2)}if(r>=0)for(e[r--]=n;r>=0;)e[r--]=0},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return(8191&t)==0&&(r+=13,t>>>=13),(127&t)==0&&(r+=7,t>>>=7),(15&t)==0&&(r+=4,t>>>=4),(3&t)==0&&(r+=2,t>>>=2),(1&t)==0&&r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return(this.length-1)*26+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){this.length>e.length?(t=this,r=e):(t=e,r=this);for(var t,r,n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),t?this.words[r]=this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var t,r,n,i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;oe.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t,r,n=this.iadd(e);return e.negative=1,n._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(t=this,r=e):(t=e,r=this);for(var o=0,a=0;a>26,this.words[a]=67108863&n;for(;0!==o&&a>26,this.words[a]=67108863&n;if(0===o&&a>>13,f=0|a[1],h=8191&f,g=f>>>13,m=0|a[2],y=8191&m,v=m>>>13,b=0|a[3],S=8191&b,w=b>>>13,_=0|a[4],k=8191&_,O=_>>>13,P=0|a[5],A=8191&P,I=P>>>13,R=0|a[6],E=8191&R,T=R>>>13,N=0|a[7],x=8191&N,B=N>>>13,C=0|a[8],M=8191&C,D=C>>>13,U=0|a[9],J=8191&U,j=U>>>13,H=0|s[0],q=8191&H,L=H>>>13,F=0|s[1],V=8191&F,W=F>>>13,z=0|s[2],G=8191&z,Q=z>>>13,K=0|s[3],Y=8191&K,Z=K>>>13,X=0|s[4],$=8191&X,ee=X>>>13,et=0|s[5],er=8191&et,en=et>>>13,ei=0|s[6],eo=8191&ei,ea=ei>>>13,es=0|s[7],el=8191&es,eu=es>>>13,ed=0|s[8],ec=8191&ed,ep=ed>>>13,ef=0|s[9],eh=8191&ef,eg=ef>>>13;r.negative=e.negative^t.negative,r.length=19;var em=(u+(n=Math.imul(c,q))|0)+((8191&(i=(i=Math.imul(c,L))+Math.imul(p,q)|0))<<13)|0;u=((o=Math.imul(p,L))+(i>>>13)|0)+(em>>>26)|0,em&=67108863,n=Math.imul(h,q),i=(i=Math.imul(h,L))+Math.imul(g,q)|0,o=Math.imul(g,L);var ey=(u+(n=n+Math.imul(c,V)|0)|0)+((8191&(i=(i=i+Math.imul(c,W)|0)+Math.imul(p,V)|0))<<13)|0;u=((o=o+Math.imul(p,W)|0)+(i>>>13)|0)+(ey>>>26)|0,ey&=67108863,n=Math.imul(y,q),i=(i=Math.imul(y,L))+Math.imul(v,q)|0,o=Math.imul(v,L),n=n+Math.imul(h,V)|0,i=(i=i+Math.imul(h,W)|0)+Math.imul(g,V)|0,o=o+Math.imul(g,W)|0;var ev=(u+(n=n+Math.imul(c,G)|0)|0)+((8191&(i=(i=i+Math.imul(c,Q)|0)+Math.imul(p,G)|0))<<13)|0;u=((o=o+Math.imul(p,Q)|0)+(i>>>13)|0)+(ev>>>26)|0,ev&=67108863,n=Math.imul(S,q),i=(i=Math.imul(S,L))+Math.imul(w,q)|0,o=Math.imul(w,L),n=n+Math.imul(y,V)|0,i=(i=i+Math.imul(y,W)|0)+Math.imul(v,V)|0,o=o+Math.imul(v,W)|0,n=n+Math.imul(h,G)|0,i=(i=i+Math.imul(h,Q)|0)+Math.imul(g,G)|0,o=o+Math.imul(g,Q)|0;var eb=(u+(n=n+Math.imul(c,Y)|0)|0)+((8191&(i=(i=i+Math.imul(c,Z)|0)+Math.imul(p,Y)|0))<<13)|0;u=((o=o+Math.imul(p,Z)|0)+(i>>>13)|0)+(eb>>>26)|0,eb&=67108863,n=Math.imul(k,q),i=(i=Math.imul(k,L))+Math.imul(O,q)|0,o=Math.imul(O,L),n=n+Math.imul(S,V)|0,i=(i=i+Math.imul(S,W)|0)+Math.imul(w,V)|0,o=o+Math.imul(w,W)|0,n=n+Math.imul(y,G)|0,i=(i=i+Math.imul(y,Q)|0)+Math.imul(v,G)|0,o=o+Math.imul(v,Q)|0,n=n+Math.imul(h,Y)|0,i=(i=i+Math.imul(h,Z)|0)+Math.imul(g,Y)|0,o=o+Math.imul(g,Z)|0;var eS=(u+(n=n+Math.imul(c,$)|0)|0)+((8191&(i=(i=i+Math.imul(c,ee)|0)+Math.imul(p,$)|0))<<13)|0;u=((o=o+Math.imul(p,ee)|0)+(i>>>13)|0)+(eS>>>26)|0,eS&=67108863,n=Math.imul(A,q),i=(i=Math.imul(A,L))+Math.imul(I,q)|0,o=Math.imul(I,L),n=n+Math.imul(k,V)|0,i=(i=i+Math.imul(k,W)|0)+Math.imul(O,V)|0,o=o+Math.imul(O,W)|0,n=n+Math.imul(S,G)|0,i=(i=i+Math.imul(S,Q)|0)+Math.imul(w,G)|0,o=o+Math.imul(w,Q)|0,n=n+Math.imul(y,Y)|0,i=(i=i+Math.imul(y,Z)|0)+Math.imul(v,Y)|0,o=o+Math.imul(v,Z)|0,n=n+Math.imul(h,$)|0,i=(i=i+Math.imul(h,ee)|0)+Math.imul(g,$)|0,o=o+Math.imul(g,ee)|0;var ew=(u+(n=n+Math.imul(c,er)|0)|0)+((8191&(i=(i=i+Math.imul(c,en)|0)+Math.imul(p,er)|0))<<13)|0;u=((o=o+Math.imul(p,en)|0)+(i>>>13)|0)+(ew>>>26)|0,ew&=67108863,n=Math.imul(E,q),i=(i=Math.imul(E,L))+Math.imul(T,q)|0,o=Math.imul(T,L),n=n+Math.imul(A,V)|0,i=(i=i+Math.imul(A,W)|0)+Math.imul(I,V)|0,o=o+Math.imul(I,W)|0,n=n+Math.imul(k,G)|0,i=(i=i+Math.imul(k,Q)|0)+Math.imul(O,G)|0,o=o+Math.imul(O,Q)|0,n=n+Math.imul(S,Y)|0,i=(i=i+Math.imul(S,Z)|0)+Math.imul(w,Y)|0,o=o+Math.imul(w,Z)|0,n=n+Math.imul(y,$)|0,i=(i=i+Math.imul(y,ee)|0)+Math.imul(v,$)|0,o=o+Math.imul(v,ee)|0,n=n+Math.imul(h,er)|0,i=(i=i+Math.imul(h,en)|0)+Math.imul(g,er)|0,o=o+Math.imul(g,en)|0;var e_=(u+(n=n+Math.imul(c,eo)|0)|0)+((8191&(i=(i=i+Math.imul(c,ea)|0)+Math.imul(p,eo)|0))<<13)|0;u=((o=o+Math.imul(p,ea)|0)+(i>>>13)|0)+(e_>>>26)|0,e_&=67108863,n=Math.imul(x,q),i=(i=Math.imul(x,L))+Math.imul(B,q)|0,o=Math.imul(B,L),n=n+Math.imul(E,V)|0,i=(i=i+Math.imul(E,W)|0)+Math.imul(T,V)|0,o=o+Math.imul(T,W)|0,n=n+Math.imul(A,G)|0,i=(i=i+Math.imul(A,Q)|0)+Math.imul(I,G)|0,o=o+Math.imul(I,Q)|0,n=n+Math.imul(k,Y)|0,i=(i=i+Math.imul(k,Z)|0)+Math.imul(O,Y)|0,o=o+Math.imul(O,Z)|0,n=n+Math.imul(S,$)|0,i=(i=i+Math.imul(S,ee)|0)+Math.imul(w,$)|0,o=o+Math.imul(w,ee)|0,n=n+Math.imul(y,er)|0,i=(i=i+Math.imul(y,en)|0)+Math.imul(v,er)|0,o=o+Math.imul(v,en)|0,n=n+Math.imul(h,eo)|0,i=(i=i+Math.imul(h,ea)|0)+Math.imul(g,eo)|0,o=o+Math.imul(g,ea)|0;var ek=(u+(n=n+Math.imul(c,el)|0)|0)+((8191&(i=(i=i+Math.imul(c,eu)|0)+Math.imul(p,el)|0))<<13)|0;u=((o=o+Math.imul(p,eu)|0)+(i>>>13)|0)+(ek>>>26)|0,ek&=67108863,n=Math.imul(M,q),i=(i=Math.imul(M,L))+Math.imul(D,q)|0,o=Math.imul(D,L),n=n+Math.imul(x,V)|0,i=(i=i+Math.imul(x,W)|0)+Math.imul(B,V)|0,o=o+Math.imul(B,W)|0,n=n+Math.imul(E,G)|0,i=(i=i+Math.imul(E,Q)|0)+Math.imul(T,G)|0,o=o+Math.imul(T,Q)|0,n=n+Math.imul(A,Y)|0,i=(i=i+Math.imul(A,Z)|0)+Math.imul(I,Y)|0,o=o+Math.imul(I,Z)|0,n=n+Math.imul(k,$)|0,i=(i=i+Math.imul(k,ee)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,ee)|0,n=n+Math.imul(S,er)|0,i=(i=i+Math.imul(S,en)|0)+Math.imul(w,er)|0,o=o+Math.imul(w,en)|0,n=n+Math.imul(y,eo)|0,i=(i=i+Math.imul(y,ea)|0)+Math.imul(v,eo)|0,o=o+Math.imul(v,ea)|0,n=n+Math.imul(h,el)|0,i=(i=i+Math.imul(h,eu)|0)+Math.imul(g,el)|0,o=o+Math.imul(g,eu)|0;var eO=(u+(n=n+Math.imul(c,ec)|0)|0)+((8191&(i=(i=i+Math.imul(c,ep)|0)+Math.imul(p,ec)|0))<<13)|0;u=((o=o+Math.imul(p,ep)|0)+(i>>>13)|0)+(eO>>>26)|0,eO&=67108863,n=Math.imul(J,q),i=(i=Math.imul(J,L))+Math.imul(j,q)|0,o=Math.imul(j,L),n=n+Math.imul(M,V)|0,i=(i=i+Math.imul(M,W)|0)+Math.imul(D,V)|0,o=o+Math.imul(D,W)|0,n=n+Math.imul(x,G)|0,i=(i=i+Math.imul(x,Q)|0)+Math.imul(B,G)|0,o=o+Math.imul(B,Q)|0,n=n+Math.imul(E,Y)|0,i=(i=i+Math.imul(E,Z)|0)+Math.imul(T,Y)|0,o=o+Math.imul(T,Z)|0,n=n+Math.imul(A,$)|0,i=(i=i+Math.imul(A,ee)|0)+Math.imul(I,$)|0,o=o+Math.imul(I,ee)|0,n=n+Math.imul(k,er)|0,i=(i=i+Math.imul(k,en)|0)+Math.imul(O,er)|0,o=o+Math.imul(O,en)|0,n=n+Math.imul(S,eo)|0,i=(i=i+Math.imul(S,ea)|0)+Math.imul(w,eo)|0,o=o+Math.imul(w,ea)|0,n=n+Math.imul(y,el)|0,i=(i=i+Math.imul(y,eu)|0)+Math.imul(v,el)|0,o=o+Math.imul(v,eu)|0,n=n+Math.imul(h,ec)|0,i=(i=i+Math.imul(h,ep)|0)+Math.imul(g,ec)|0,o=o+Math.imul(g,ep)|0;var eP=(u+(n=n+Math.imul(c,eh)|0)|0)+((8191&(i=(i=i+Math.imul(c,eg)|0)+Math.imul(p,eh)|0))<<13)|0;u=((o=o+Math.imul(p,eg)|0)+(i>>>13)|0)+(eP>>>26)|0,eP&=67108863,n=Math.imul(J,V),i=(i=Math.imul(J,W))+Math.imul(j,V)|0,o=Math.imul(j,W),n=n+Math.imul(M,G)|0,i=(i=i+Math.imul(M,Q)|0)+Math.imul(D,G)|0,o=o+Math.imul(D,Q)|0,n=n+Math.imul(x,Y)|0,i=(i=i+Math.imul(x,Z)|0)+Math.imul(B,Y)|0,o=o+Math.imul(B,Z)|0,n=n+Math.imul(E,$)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,ee)|0,n=n+Math.imul(A,er)|0,i=(i=i+Math.imul(A,en)|0)+Math.imul(I,er)|0,o=o+Math.imul(I,en)|0,n=n+Math.imul(k,eo)|0,i=(i=i+Math.imul(k,ea)|0)+Math.imul(O,eo)|0,o=o+Math.imul(O,ea)|0,n=n+Math.imul(S,el)|0,i=(i=i+Math.imul(S,eu)|0)+Math.imul(w,el)|0,o=o+Math.imul(w,eu)|0,n=n+Math.imul(y,ec)|0,i=(i=i+Math.imul(y,ep)|0)+Math.imul(v,ec)|0,o=o+Math.imul(v,ep)|0;var eA=(u+(n=n+Math.imul(h,eh)|0)|0)+((8191&(i=(i=i+Math.imul(h,eg)|0)+Math.imul(g,eh)|0))<<13)|0;u=((o=o+Math.imul(g,eg)|0)+(i>>>13)|0)+(eA>>>26)|0,eA&=67108863,n=Math.imul(J,G),i=(i=Math.imul(J,Q))+Math.imul(j,G)|0,o=Math.imul(j,Q),n=n+Math.imul(M,Y)|0,i=(i=i+Math.imul(M,Z)|0)+Math.imul(D,Y)|0,o=o+Math.imul(D,Z)|0,n=n+Math.imul(x,$)|0,i=(i=i+Math.imul(x,ee)|0)+Math.imul(B,$)|0,o=o+Math.imul(B,ee)|0,n=n+Math.imul(E,er)|0,i=(i=i+Math.imul(E,en)|0)+Math.imul(T,er)|0,o=o+Math.imul(T,en)|0,n=n+Math.imul(A,eo)|0,i=(i=i+Math.imul(A,ea)|0)+Math.imul(I,eo)|0,o=o+Math.imul(I,ea)|0,n=n+Math.imul(k,el)|0,i=(i=i+Math.imul(k,eu)|0)+Math.imul(O,el)|0,o=o+Math.imul(O,eu)|0,n=n+Math.imul(S,ec)|0,i=(i=i+Math.imul(S,ep)|0)+Math.imul(w,ec)|0,o=o+Math.imul(w,ep)|0;var eI=(u+(n=n+Math.imul(y,eh)|0)|0)+((8191&(i=(i=i+Math.imul(y,eg)|0)+Math.imul(v,eh)|0))<<13)|0;u=((o=o+Math.imul(v,eg)|0)+(i>>>13)|0)+(eI>>>26)|0,eI&=67108863,n=Math.imul(J,Y),i=(i=Math.imul(J,Z))+Math.imul(j,Y)|0,o=Math.imul(j,Z),n=n+Math.imul(M,$)|0,i=(i=i+Math.imul(M,ee)|0)+Math.imul(D,$)|0,o=o+Math.imul(D,ee)|0,n=n+Math.imul(x,er)|0,i=(i=i+Math.imul(x,en)|0)+Math.imul(B,er)|0,o=o+Math.imul(B,en)|0,n=n+Math.imul(E,eo)|0,i=(i=i+Math.imul(E,ea)|0)+Math.imul(T,eo)|0,o=o+Math.imul(T,ea)|0,n=n+Math.imul(A,el)|0,i=(i=i+Math.imul(A,eu)|0)+Math.imul(I,el)|0,o=o+Math.imul(I,eu)|0,n=n+Math.imul(k,ec)|0,i=(i=i+Math.imul(k,ep)|0)+Math.imul(O,ec)|0,o=o+Math.imul(O,ep)|0;var eR=(u+(n=n+Math.imul(S,eh)|0)|0)+((8191&(i=(i=i+Math.imul(S,eg)|0)+Math.imul(w,eh)|0))<<13)|0;u=((o=o+Math.imul(w,eg)|0)+(i>>>13)|0)+(eR>>>26)|0,eR&=67108863,n=Math.imul(J,$),i=(i=Math.imul(J,ee))+Math.imul(j,$)|0,o=Math.imul(j,ee),n=n+Math.imul(M,er)|0,i=(i=i+Math.imul(M,en)|0)+Math.imul(D,er)|0,o=o+Math.imul(D,en)|0,n=n+Math.imul(x,eo)|0,i=(i=i+Math.imul(x,ea)|0)+Math.imul(B,eo)|0,o=o+Math.imul(B,ea)|0,n=n+Math.imul(E,el)|0,i=(i=i+Math.imul(E,eu)|0)+Math.imul(T,el)|0,o=o+Math.imul(T,eu)|0,n=n+Math.imul(A,ec)|0,i=(i=i+Math.imul(A,ep)|0)+Math.imul(I,ec)|0,o=o+Math.imul(I,ep)|0;var eE=(u+(n=n+Math.imul(k,eh)|0)|0)+((8191&(i=(i=i+Math.imul(k,eg)|0)+Math.imul(O,eh)|0))<<13)|0;u=((o=o+Math.imul(O,eg)|0)+(i>>>13)|0)+(eE>>>26)|0,eE&=67108863,n=Math.imul(J,er),i=(i=Math.imul(J,en))+Math.imul(j,er)|0,o=Math.imul(j,en),n=n+Math.imul(M,eo)|0,i=(i=i+Math.imul(M,ea)|0)+Math.imul(D,eo)|0,o=o+Math.imul(D,ea)|0,n=n+Math.imul(x,el)|0,i=(i=i+Math.imul(x,eu)|0)+Math.imul(B,el)|0,o=o+Math.imul(B,eu)|0,n=n+Math.imul(E,ec)|0,i=(i=i+Math.imul(E,ep)|0)+Math.imul(T,ec)|0,o=o+Math.imul(T,ep)|0;var eT=(u+(n=n+Math.imul(A,eh)|0)|0)+((8191&(i=(i=i+Math.imul(A,eg)|0)+Math.imul(I,eh)|0))<<13)|0;u=((o=o+Math.imul(I,eg)|0)+(i>>>13)|0)+(eT>>>26)|0,eT&=67108863,n=Math.imul(J,eo),i=(i=Math.imul(J,ea))+Math.imul(j,eo)|0,o=Math.imul(j,ea),n=n+Math.imul(M,el)|0,i=(i=i+Math.imul(M,eu)|0)+Math.imul(D,el)|0,o=o+Math.imul(D,eu)|0,n=n+Math.imul(x,ec)|0,i=(i=i+Math.imul(x,ep)|0)+Math.imul(B,ec)|0,o=o+Math.imul(B,ep)|0;var eN=(u+(n=n+Math.imul(E,eh)|0)|0)+((8191&(i=(i=i+Math.imul(E,eg)|0)+Math.imul(T,eh)|0))<<13)|0;u=((o=o+Math.imul(T,eg)|0)+(i>>>13)|0)+(eN>>>26)|0,eN&=67108863,n=Math.imul(J,el),i=(i=Math.imul(J,eu))+Math.imul(j,el)|0,o=Math.imul(j,eu),n=n+Math.imul(M,ec)|0,i=(i=i+Math.imul(M,ep)|0)+Math.imul(D,ec)|0,o=o+Math.imul(D,ep)|0;var ex=(u+(n=n+Math.imul(x,eh)|0)|0)+((8191&(i=(i=i+Math.imul(x,eg)|0)+Math.imul(B,eh)|0))<<13)|0;u=((o=o+Math.imul(B,eg)|0)+(i>>>13)|0)+(ex>>>26)|0,ex&=67108863,n=Math.imul(J,ec),i=(i=Math.imul(J,ep))+Math.imul(j,ec)|0,o=Math.imul(j,ep);var eB=(u+(n=n+Math.imul(M,eh)|0)|0)+((8191&(i=(i=i+Math.imul(M,eg)|0)+Math.imul(D,eh)|0))<<13)|0;u=((o=o+Math.imul(D,eg)|0)+(i>>>13)|0)+(eB>>>26)|0,eB&=67108863;var eC=(u+(n=Math.imul(J,eh))|0)+((8191&(i=(i=Math.imul(J,eg))+Math.imul(j,eh)|0))<<13)|0;return u=((o=Math.imul(j,eg))+(i>>>13)|0)+(eC>>>26)|0,eC&=67108863,l[0]=em,l[1]=ey,l[2]=ev,l[3]=eb,l[4]=eS,l[5]=ew,l[6]=e_,l[7]=ek,l[8]=eO,l[9]=eP,l[10]=eA,l[11]=eI,l[12]=eR,l[13]=eE,l[14]=eT,l[15]=eN,l[16]=ex,l[17]=eB,l[18]=eC,0!==u&&(l[19]=u,r.length++),r};function b(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r._strip()}function S(e,t,r){return b(e,t,r)}function w(e,t){this.x=e,this.y=t}Math.imul||(v=y),o.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?v(this,e,t):r<63?y(this,e,t):r<1024?b(this,e,t):S(this,e,t)},w.prototype.makeRBT=function(e){for(var t=Array(e),r=o.prototype._countBits(e)-1,n=0;n>=1;return n},w.prototype.permute=function(e,t,r,n,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*t;a>=26,r+=(o/67108864|0)+(a>>>26),this.words[i]=67108863&a}return 0!==r&&(this.words[i]=r,this.length++),t?this.ineg():this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=m(e);if(0===t.length)return new o(1);for(var r=this,n=0;n=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(t=0;t>>26-r}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var i,o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,u=0;u=0&&(0!==d||u>=i);u--){var c=0|this.words[u];this.words[u]=d<<26-o|c>>>o,d=c&s}return l&&0!==d&&(l.words[l.length++]=d),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(l/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===s)return this._strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(e,t){var r,n=this.length-e.length,i=this.clone(),a=e,s=0|a.words[a.length-1];0!=(n=26-this._countBits(s))&&(a=a.ushln(n),i.iushln(n),s=0|a.words[a.length-1]);var l=i.length-a.length;if("mod"!==t){(r=new o(null)).length=l+1,r.words=Array(r.length);for(var u=0;u=0;c--){var p=(0|i.words[a.length+c])*67108864+(0|i.words[a.length+c-1]);for(p=Math.min(p/s|0,67108863),i._ishlnsubmul(a,p,c);0!==i.negative;)p--,i.negative=0,i._ishlnsubmul(a,1,c),i.isZero()||(i.negative^=1);r&&(r.words[c]=p)}return r&&r._strip(),i._strip(),"div"!==t&&0!==n&&i.iushrn(n),{div:r||null,mod:i}},o.prototype.divmod=function(e,t,r){var i,a,s;return(n(!e.isZero()),this.isZero())?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(e)),{div:i,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):(this.negative&e.negative)!=0?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||0>this.cmp(e)?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modrn(e.words[0]))}:this._wordDiv(e,t)},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modrn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=67108864%e,i=0,o=this.length-1;o>=0;o--)i=(r*i+(0|this.words[o]))%e;return t?-i:i},o.prototype.modn=function(e){return this.modrn(e)},o.prototype.idivn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*r;this.words[i]=o/e|0,r=o%e}return this._strip(),t?this.ineg():this},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),a=new o(0),s=new o(0),l=new o(1),u=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++u;for(var d=r.clone(),c=t.clone();!t.isZero();){for(var p=0,f=1;(t.words[0]&f)==0&&p<26;++p,f<<=1);if(p>0)for(t.iushrn(p);p-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(d),a.isub(c)),i.iushrn(1),a.iushrn(1);for(var h=0,g=1;(r.words[0]&g)==0&&h<26;++h,g<<=1);if(h>0)for(r.iushrn(h);h-- >0;)(s.isOdd()||l.isOdd())&&(s.iadd(d),l.isub(c)),s.iushrn(1),l.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(s),a.isub(l)):(r.isub(t),s.isub(i),l.isub(a))}return{a:s,b:l,gcd:r.iushln(u)}},o.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t,r=this,i=e.clone();r=0!==r.negative?r.umod(e):r.clone();for(var a=new o(1),s=new o(0),l=i.clone();r.cmpn(1)>0&&i.cmpn(1)>0;){for(var u=0,d=1;(r.words[0]&d)==0&&u<26;++u,d<<=1);if(u>0)for(r.iushrn(u);u-- >0;)a.isOdd()&&a.iadd(l),a.iushrn(1);for(var c=0,p=1;(i.words[0]&p)==0&&c<26;++c,p<<=1);if(c>0)for(i.iushrn(c);c-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);r.cmp(i)>=0?(r.isub(i),a.isub(s)):(i.isub(r),s.isub(a))}return 0>(t=0===r.cmpn(1)?a:s).cmpn(0)&&t.iadd(e),t},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return(1&this.words[0])==0},o.prototype.isOdd=function(){return(1&this.words[0])==1},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return -1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:ie.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){ni&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return -1===this.cmpn(e)},o.prototype.lt=function(e){return -1===this.cmp(e)},o.prototype.lten=function(e){return 0>=this.cmpn(e)},o.prototype.lte=function(e){return 0>=this.cmp(e)},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new R(e)},o.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var _={k256:null,p224:null,p192:null,p25519:null};function k(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function O(){k.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function P(){k.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function A(){k.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function I(){k.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function R(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function E(e){R.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}k.prototype._tmp=function(){var e=new o(null);return e.words=Array(Math.ceil(this.n/13)),e},k.prototype.ireduce=function(e){var t,r=e;do this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength();while(t>this.n);var n=t0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},k.prototype.split=function(e,t){e.iushrn(this.n,0,t)},k.prototype.imulK=function(e){return e.imul(this.k)},i(O,k),O.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i>>22,o=a}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},O.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){var t;if(_[e])return _[e];if("k256"===e)t=new O;else if("p224"===e)t=new P;else if("p192"===e)t=new A;else if("p25519"===e)t=new I;else throw Error("Unknown prime "+e);return _[e]=t,t},R.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},R.prototype._verify2=function(e,t){n((e.negative|t.negative)==0,"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},R.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(u(e,e.umod(this.m)._forceRed(this)),e)},R.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},R.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},R.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},R.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return 0>r.cmpn(0)&&r.iadd(this.m),r._forceRed(this)},R.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return 0>r.cmpn(0)&&r.iadd(this.m),r},R.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},R.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},R.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},R.prototype.isqr=function(e){return this.imul(e,e.clone())},R.prototype.sqr=function(e){return this.mul(e,e)},R.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),l=s.redNeg(),u=this.m.subn(1).iushrn(1),d=this.m.bitLength();for(d=new o(2*d*d).toRed(this);0!==this.pow(d,u).cmp(l);)d.redIAdd(l);for(var c=this.pow(d,i),p=this.pow(e,i.addn(1).iushrn(1)),f=this.pow(e,i),h=a;0!==f.cmp(s);){for(var g=f,m=0;0!==g.cmp(s);m++)g=g.redSqr();n(m=0;i--){for(var d=t.words[i],c=u-1;c>=0;c--){var p=d>>c&1;if(a!==n[0]&&(a=this.sqr(a)),0===p&&0===s){l=0;continue}s<<=1,s|=p,(++l===r||0===i&&0===c)&&(a=this.mul(a,n[s]),l=0,s=0)}u=26}return a},R.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},R.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new E(e)},i(E,R),E.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},E.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},E.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):0>i.cmpn(0)&&(o=i.iadd(this.m)),o._forceRed(this)},E.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):0>i.cmpn(0)&&(a=i.iadd(this.m)),a._forceRed(this)},E.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},81658:function(e,t,r){"use strict";var n;function i(e){this.rand=e}if(e.exports=function(e){return n||(n=new i(null)),n.generate(e)},e.exports.Rand=i,i.prototype.generate=function(e){return this._rand(e)},i.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),r=0;r{let i=n.ics23.InnerOp.encode(e).finish(),o=r.get(i);return void 0===o&&(o=t.length,t.push(e),r.set(i,o)),o});return{key:e.key,value:e.value,leaf:e.leaf,path:i}}function l(e){let t=e.lookupInners;return{entries:e.entries.map(e=>{if(e.exist)return{exist:u(e.exist,t)};if(e.nonexist){let r=e.nonexist;return{nonexist:{key:r.key,left:u(r.left,t),right:u(r.right,t)}}}throw Error("Unexpected batch entry during compress")})}}function u(e,t){if(!e)return;let{key:r,value:n,leaf:i,path:o}=e;return{key:r,value:n,leaf:i,path:(o||[]).map(e=>t[e])}}t.compress=i,t.decompress=o},32165:function(e,t,r){"use strict";var n=r(81667),i=n.Reader,o=n.Writer,a=n.util,s=n.roots.default||(n.roots.default={});s.ics23=function(){var e={};return e.HashOp=function(){var e={},t=Object.create(e);return t[e[0]="NO_HASH"]=0,t[e[1]="SHA256"]=1,t[e[2]="SHA512"]=2,t[e[3]="KECCAK"]=3,t[e[4]="RIPEMD160"]=4,t[e[5]="BITCOIN"]=5,t[e[6]="SHA512_256"]=6,t}(),e.LengthOp=function(){var e={},t=Object.create(e);return t[e[0]="NO_PREFIX"]=0,t[e[1]="VAR_PROTO"]=1,t[e[2]="VAR_RLP"]=2,t[e[3]="FIXED32_BIG"]=3,t[e[4]="FIXED32_LITTLE"]=4,t[e[5]="FIXED64_BIG"]=5,t[e[6]="FIXED64_LITTLE"]=6,t[e[7]="REQUIRE_32_BYTES"]=7,t[e[8]="REQUIRE_64_BYTES"]=8,t}(),e.ExistenceProof=function(){function e(e){if(this.path=[],e)for(var t=Object.keys(e),r=0;r>>3){case 1:n.key=e.bytes();break;case 2:n.value=e.bytes();break;case 3:n.leaf=s.ics23.LeafOp.decode(e,e.uint32());break;case 4:n.path&&n.path.length||(n.path=[]),n.path.push(s.ics23.InnerOp.decode(e,e.uint32()));break;default:e.skipType(7&o)}}return n},e.decodeDelimited=function(e){return e instanceof i||(e=new i(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.key&&e.hasOwnProperty("key")&&!(e.key&&"number"==typeof e.key.length||a.isString(e.key)))return"key: buffer expected";if(null!=e.value&&e.hasOwnProperty("value")&&!(e.value&&"number"==typeof e.value.length||a.isString(e.value)))return"value: buffer expected";if(null!=e.leaf&&e.hasOwnProperty("leaf")){var t=s.ics23.LeafOp.verify(e.leaf);if(t)return"leaf."+t}if(null!=e.path&&e.hasOwnProperty("path")){if(!Array.isArray(e.path))return"path: array expected";for(var r=0;r>>3){case 1:n.key=e.bytes();break;case 2:n.left=s.ics23.ExistenceProof.decode(e,e.uint32());break;case 3:n.right=s.ics23.ExistenceProof.decode(e,e.uint32());break;default:e.skipType(7&o)}}return n},e.decodeDelimited=function(e){return e instanceof i||(e=new i(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.key&&e.hasOwnProperty("key")&&!(e.key&&"number"==typeof e.key.length||a.isString(e.key)))return"key: buffer expected";if(null!=e.left&&e.hasOwnProperty("left")){var t=s.ics23.ExistenceProof.verify(e.left);if(t)return"left."+t}if(null!=e.right&&e.hasOwnProperty("right")){var t=s.ics23.ExistenceProof.verify(e.right);if(t)return"right."+t}return null},e.fromObject=function(e){if(e instanceof s.ics23.NonExistenceProof)return e;var t=new s.ics23.NonExistenceProof;if(null!=e.key&&("string"==typeof e.key?a.base64.decode(e.key,t.key=a.newBuffer(a.base64.length(e.key)),0):e.key.length&&(t.key=e.key)),null!=e.left){if("object"!=typeof e.left)throw TypeError(".ics23.NonExistenceProof.left: object expected");t.left=s.ics23.ExistenceProof.fromObject(e.left)}if(null!=e.right){if("object"!=typeof e.right)throw TypeError(".ics23.NonExistenceProof.right: object expected");t.right=s.ics23.ExistenceProof.fromObject(e.right)}return t},e.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(t.bytes===String?r.key="":(r.key=[],t.bytes!==Array&&(r.key=a.newBuffer(r.key))),r.left=null,r.right=null),null!=e.key&&e.hasOwnProperty("key")&&(r.key=t.bytes===String?a.base64.encode(e.key,0,e.key.length):t.bytes===Array?Array.prototype.slice.call(e.key):e.key),null!=e.left&&e.hasOwnProperty("left")&&(r.left=s.ics23.ExistenceProof.toObject(e.left,t)),null!=e.right&&e.hasOwnProperty("right")&&(r.right=s.ics23.ExistenceProof.toObject(e.right,t)),r},e.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},e}(),e.CommitmentProof=function(){var e;function t(e){if(e)for(var t=Object.keys(e),r=0;r>>3){case 1:n.exist=s.ics23.ExistenceProof.decode(e,e.uint32());break;case 2:n.nonexist=s.ics23.NonExistenceProof.decode(e,e.uint32());break;case 3:n.batch=s.ics23.BatchProof.decode(e,e.uint32());break;case 4:n.compressed=s.ics23.CompressedBatchProof.decode(e,e.uint32());break;default:e.skipType(7&o)}}return n},t.decodeDelimited=function(e){return e instanceof i||(e=new i(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";var t={};if(null!=e.exist&&e.hasOwnProperty("exist")){t.proof=1;var r=s.ics23.ExistenceProof.verify(e.exist);if(r)return"exist."+r}if(null!=e.nonexist&&e.hasOwnProperty("nonexist")){if(1===t.proof)return"proof: multiple values";t.proof=1;var r=s.ics23.NonExistenceProof.verify(e.nonexist);if(r)return"nonexist."+r}if(null!=e.batch&&e.hasOwnProperty("batch")){if(1===t.proof)return"proof: multiple values";t.proof=1;var r=s.ics23.BatchProof.verify(e.batch);if(r)return"batch."+r}if(null!=e.compressed&&e.hasOwnProperty("compressed")){if(1===t.proof)return"proof: multiple values";t.proof=1;var r=s.ics23.CompressedBatchProof.verify(e.compressed);if(r)return"compressed."+r}return null},t.fromObject=function(e){if(e instanceof s.ics23.CommitmentProof)return e;var t=new s.ics23.CommitmentProof;if(null!=e.exist){if("object"!=typeof e.exist)throw TypeError(".ics23.CommitmentProof.exist: object expected");t.exist=s.ics23.ExistenceProof.fromObject(e.exist)}if(null!=e.nonexist){if("object"!=typeof e.nonexist)throw TypeError(".ics23.CommitmentProof.nonexist: object expected");t.nonexist=s.ics23.NonExistenceProof.fromObject(e.nonexist)}if(null!=e.batch){if("object"!=typeof e.batch)throw TypeError(".ics23.CommitmentProof.batch: object expected");t.batch=s.ics23.BatchProof.fromObject(e.batch)}if(null!=e.compressed){if("object"!=typeof e.compressed)throw TypeError(".ics23.CommitmentProof.compressed: object expected");t.compressed=s.ics23.CompressedBatchProof.fromObject(e.compressed)}return t},t.toObject=function(e,t){t||(t={});var r={};return null!=e.exist&&e.hasOwnProperty("exist")&&(r.exist=s.ics23.ExistenceProof.toObject(e.exist,t),t.oneofs&&(r.proof="exist")),null!=e.nonexist&&e.hasOwnProperty("nonexist")&&(r.nonexist=s.ics23.NonExistenceProof.toObject(e.nonexist,t),t.oneofs&&(r.proof="nonexist")),null!=e.batch&&e.hasOwnProperty("batch")&&(r.batch=s.ics23.BatchProof.toObject(e.batch,t),t.oneofs&&(r.proof="batch")),null!=e.compressed&&e.hasOwnProperty("compressed")&&(r.compressed=s.ics23.CompressedBatchProof.toObject(e.compressed,t),t.oneofs&&(r.proof="compressed")),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},t}(),e.LeafOp=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r>>3){case 1:n.hash=e.int32();break;case 2:n.prehashKey=e.int32();break;case 3:n.prehashValue=e.int32();break;case 4:n.length=e.int32();break;case 5:n.prefix=e.bytes();break;default:e.skipType(7&o)}}return n},e.decodeDelimited=function(e){return e instanceof i||(e=new i(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.hash&&e.hasOwnProperty("hash"))switch(e.hash){default:return"hash: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:}if(null!=e.prehashKey&&e.hasOwnProperty("prehashKey"))switch(e.prehashKey){default:return"prehashKey: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:}if(null!=e.prehashValue&&e.hasOwnProperty("prehashValue"))switch(e.prehashValue){default:return"prehashValue: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:}if(null!=e.length&&e.hasOwnProperty("length"))switch(e.length){default:return"length: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:}return null!=e.prefix&&e.hasOwnProperty("prefix")&&!(e.prefix&&"number"==typeof e.prefix.length||a.isString(e.prefix))?"prefix: buffer expected":null},e.fromObject=function(e){if(e instanceof s.ics23.LeafOp)return e;var t=new s.ics23.LeafOp;switch(e.hash){case"NO_HASH":case 0:t.hash=0;break;case"SHA256":case 1:t.hash=1;break;case"SHA512":case 2:t.hash=2;break;case"KECCAK":case 3:t.hash=3;break;case"RIPEMD160":case 4:t.hash=4;break;case"BITCOIN":case 5:t.hash=5;break;case"SHA512_256":case 6:t.hash=6}switch(e.prehashKey){case"NO_HASH":case 0:t.prehashKey=0;break;case"SHA256":case 1:t.prehashKey=1;break;case"SHA512":case 2:t.prehashKey=2;break;case"KECCAK":case 3:t.prehashKey=3;break;case"RIPEMD160":case 4:t.prehashKey=4;break;case"BITCOIN":case 5:t.prehashKey=5;break;case"SHA512_256":case 6:t.prehashKey=6}switch(e.prehashValue){case"NO_HASH":case 0:t.prehashValue=0;break;case"SHA256":case 1:t.prehashValue=1;break;case"SHA512":case 2:t.prehashValue=2;break;case"KECCAK":case 3:t.prehashValue=3;break;case"RIPEMD160":case 4:t.prehashValue=4;break;case"BITCOIN":case 5:t.prehashValue=5;break;case"SHA512_256":case 6:t.prehashValue=6}switch(e.length){case"NO_PREFIX":case 0:t.length=0;break;case"VAR_PROTO":case 1:t.length=1;break;case"VAR_RLP":case 2:t.length=2;break;case"FIXED32_BIG":case 3:t.length=3;break;case"FIXED32_LITTLE":case 4:t.length=4;break;case"FIXED64_BIG":case 5:t.length=5;break;case"FIXED64_LITTLE":case 6:t.length=6;break;case"REQUIRE_32_BYTES":case 7:t.length=7;break;case"REQUIRE_64_BYTES":case 8:t.length=8}return null!=e.prefix&&("string"==typeof e.prefix?a.base64.decode(e.prefix,t.prefix=a.newBuffer(a.base64.length(e.prefix)),0):e.prefix.length&&(t.prefix=e.prefix)),t},e.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(r.hash=t.enums===String?"NO_HASH":0,r.prehashKey=t.enums===String?"NO_HASH":0,r.prehashValue=t.enums===String?"NO_HASH":0,r.length=t.enums===String?"NO_PREFIX":0,t.bytes===String?r.prefix="":(r.prefix=[],t.bytes!==Array&&(r.prefix=a.newBuffer(r.prefix)))),null!=e.hash&&e.hasOwnProperty("hash")&&(r.hash=t.enums===String?s.ics23.HashOp[e.hash]:e.hash),null!=e.prehashKey&&e.hasOwnProperty("prehashKey")&&(r.prehashKey=t.enums===String?s.ics23.HashOp[e.prehashKey]:e.prehashKey),null!=e.prehashValue&&e.hasOwnProperty("prehashValue")&&(r.prehashValue=t.enums===String?s.ics23.HashOp[e.prehashValue]:e.prehashValue),null!=e.length&&e.hasOwnProperty("length")&&(r.length=t.enums===String?s.ics23.LengthOp[e.length]:e.length),null!=e.prefix&&e.hasOwnProperty("prefix")&&(r.prefix=t.bytes===String?a.base64.encode(e.prefix,0,e.prefix.length):t.bytes===Array?Array.prototype.slice.call(e.prefix):e.prefix),r},e.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},e}(),e.InnerOp=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r>>3){case 1:n.hash=e.int32();break;case 2:n.prefix=e.bytes();break;case 3:n.suffix=e.bytes();break;default:e.skipType(7&o)}}return n},e.decodeDelimited=function(e){return e instanceof i||(e=new i(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.hash&&e.hasOwnProperty("hash"))switch(e.hash){default:return"hash: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:}return null!=e.prefix&&e.hasOwnProperty("prefix")&&!(e.prefix&&"number"==typeof e.prefix.length||a.isString(e.prefix))?"prefix: buffer expected":null!=e.suffix&&e.hasOwnProperty("suffix")&&!(e.suffix&&"number"==typeof e.suffix.length||a.isString(e.suffix))?"suffix: buffer expected":null},e.fromObject=function(e){if(e instanceof s.ics23.InnerOp)return e;var t=new s.ics23.InnerOp;switch(e.hash){case"NO_HASH":case 0:t.hash=0;break;case"SHA256":case 1:t.hash=1;break;case"SHA512":case 2:t.hash=2;break;case"KECCAK":case 3:t.hash=3;break;case"RIPEMD160":case 4:t.hash=4;break;case"BITCOIN":case 5:t.hash=5;break;case"SHA512_256":case 6:t.hash=6}return null!=e.prefix&&("string"==typeof e.prefix?a.base64.decode(e.prefix,t.prefix=a.newBuffer(a.base64.length(e.prefix)),0):e.prefix.length&&(t.prefix=e.prefix)),null!=e.suffix&&("string"==typeof e.suffix?a.base64.decode(e.suffix,t.suffix=a.newBuffer(a.base64.length(e.suffix)),0):e.suffix.length&&(t.suffix=e.suffix)),t},e.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(r.hash=t.enums===String?"NO_HASH":0,t.bytes===String?r.prefix="":(r.prefix=[],t.bytes!==Array&&(r.prefix=a.newBuffer(r.prefix))),t.bytes===String?r.suffix="":(r.suffix=[],t.bytes!==Array&&(r.suffix=a.newBuffer(r.suffix)))),null!=e.hash&&e.hasOwnProperty("hash")&&(r.hash=t.enums===String?s.ics23.HashOp[e.hash]:e.hash),null!=e.prefix&&e.hasOwnProperty("prefix")&&(r.prefix=t.bytes===String?a.base64.encode(e.prefix,0,e.prefix.length):t.bytes===Array?Array.prototype.slice.call(e.prefix):e.prefix),null!=e.suffix&&e.hasOwnProperty("suffix")&&(r.suffix=t.bytes===String?a.base64.encode(e.suffix,0,e.suffix.length):t.bytes===Array?Array.prototype.slice.call(e.suffix):e.suffix),r},e.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},e}(),e.ProofSpec=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r>>3){case 1:n.leafSpec=s.ics23.LeafOp.decode(e,e.uint32());break;case 2:n.innerSpec=s.ics23.InnerSpec.decode(e,e.uint32());break;case 3:n.maxDepth=e.int32();break;case 4:n.minDepth=e.int32();break;default:e.skipType(7&o)}}return n},e.decodeDelimited=function(e){return e instanceof i||(e=new i(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.leafSpec&&e.hasOwnProperty("leafSpec")){var t=s.ics23.LeafOp.verify(e.leafSpec);if(t)return"leafSpec."+t}if(null!=e.innerSpec&&e.hasOwnProperty("innerSpec")){var t=s.ics23.InnerSpec.verify(e.innerSpec);if(t)return"innerSpec."+t}return null!=e.maxDepth&&e.hasOwnProperty("maxDepth")&&!a.isInteger(e.maxDepth)?"maxDepth: integer expected":null!=e.minDepth&&e.hasOwnProperty("minDepth")&&!a.isInteger(e.minDepth)?"minDepth: integer expected":null},e.fromObject=function(e){if(e instanceof s.ics23.ProofSpec)return e;var t=new s.ics23.ProofSpec;if(null!=e.leafSpec){if("object"!=typeof e.leafSpec)throw TypeError(".ics23.ProofSpec.leafSpec: object expected");t.leafSpec=s.ics23.LeafOp.fromObject(e.leafSpec)}if(null!=e.innerSpec){if("object"!=typeof e.innerSpec)throw TypeError(".ics23.ProofSpec.innerSpec: object expected");t.innerSpec=s.ics23.InnerSpec.fromObject(e.innerSpec)}return null!=e.maxDepth&&(t.maxDepth=0|e.maxDepth),null!=e.minDepth&&(t.minDepth=0|e.minDepth),t},e.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(r.leafSpec=null,r.innerSpec=null,r.maxDepth=0,r.minDepth=0),null!=e.leafSpec&&e.hasOwnProperty("leafSpec")&&(r.leafSpec=s.ics23.LeafOp.toObject(e.leafSpec,t)),null!=e.innerSpec&&e.hasOwnProperty("innerSpec")&&(r.innerSpec=s.ics23.InnerSpec.toObject(e.innerSpec,t)),null!=e.maxDepth&&e.hasOwnProperty("maxDepth")&&(r.maxDepth=e.maxDepth),null!=e.minDepth&&e.hasOwnProperty("minDepth")&&(r.minDepth=e.minDepth),r},e.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},e}(),e.InnerSpec=function(){function e(e){if(this.childOrder=[],e)for(var t=Object.keys(e),r=0;r>>3){case 1:if(n.childOrder&&n.childOrder.length||(n.childOrder=[]),(7&o)==2)for(var a=e.uint32()+e.pos;e.pos>>3==1?(n.entries&&n.entries.length||(n.entries=[]),n.entries.push(s.ics23.BatchEntry.decode(e,e.uint32()))):e.skipType(7&o)}return n},e.decodeDelimited=function(e){return e instanceof i||(e=new i(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.entries&&e.hasOwnProperty("entries")){if(!Array.isArray(e.entries))return"entries: array expected";for(var t=0;t>>3){case 1:n.exist=s.ics23.ExistenceProof.decode(e,e.uint32());break;case 2:n.nonexist=s.ics23.NonExistenceProof.decode(e,e.uint32());break;default:e.skipType(7&o)}}return n},t.decodeDelimited=function(e){return e instanceof i||(e=new i(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";var t={};if(null!=e.exist&&e.hasOwnProperty("exist")){t.proof=1;var r=s.ics23.ExistenceProof.verify(e.exist);if(r)return"exist."+r}if(null!=e.nonexist&&e.hasOwnProperty("nonexist")){if(1===t.proof)return"proof: multiple values";t.proof=1;var r=s.ics23.NonExistenceProof.verify(e.nonexist);if(r)return"nonexist."+r}return null},t.fromObject=function(e){if(e instanceof s.ics23.BatchEntry)return e;var t=new s.ics23.BatchEntry;if(null!=e.exist){if("object"!=typeof e.exist)throw TypeError(".ics23.BatchEntry.exist: object expected");t.exist=s.ics23.ExistenceProof.fromObject(e.exist)}if(null!=e.nonexist){if("object"!=typeof e.nonexist)throw TypeError(".ics23.BatchEntry.nonexist: object expected");t.nonexist=s.ics23.NonExistenceProof.fromObject(e.nonexist)}return t},t.toObject=function(e,t){t||(t={});var r={};return null!=e.exist&&e.hasOwnProperty("exist")&&(r.exist=s.ics23.ExistenceProof.toObject(e.exist,t),t.oneofs&&(r.proof="exist")),null!=e.nonexist&&e.hasOwnProperty("nonexist")&&(r.nonexist=s.ics23.NonExistenceProof.toObject(e.nonexist,t),t.oneofs&&(r.proof="nonexist")),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},t}(),e.CompressedBatchProof=function(){function e(e){if(this.entries=[],this.lookupInners=[],e)for(var t=Object.keys(e),r=0;r>>3){case 1:n.entries&&n.entries.length||(n.entries=[]),n.entries.push(s.ics23.CompressedBatchEntry.decode(e,e.uint32()));break;case 2:n.lookupInners&&n.lookupInners.length||(n.lookupInners=[]),n.lookupInners.push(s.ics23.InnerOp.decode(e,e.uint32()));break;default:e.skipType(7&o)}}return n},e.decodeDelimited=function(e){return e instanceof i||(e=new i(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.entries&&e.hasOwnProperty("entries")){if(!Array.isArray(e.entries))return"entries: array expected";for(var t=0;t>>3){case 1:n.exist=s.ics23.CompressedExistenceProof.decode(e,e.uint32());break;case 2:n.nonexist=s.ics23.CompressedNonExistenceProof.decode(e,e.uint32());break;default:e.skipType(7&o)}}return n},t.decodeDelimited=function(e){return e instanceof i||(e=new i(e)),this.decode(e,e.uint32())},t.verify=function(e){if("object"!=typeof e||null===e)return"object expected";var t={};if(null!=e.exist&&e.hasOwnProperty("exist")){t.proof=1;var r=s.ics23.CompressedExistenceProof.verify(e.exist);if(r)return"exist."+r}if(null!=e.nonexist&&e.hasOwnProperty("nonexist")){if(1===t.proof)return"proof: multiple values";t.proof=1;var r=s.ics23.CompressedNonExistenceProof.verify(e.nonexist);if(r)return"nonexist."+r}return null},t.fromObject=function(e){if(e instanceof s.ics23.CompressedBatchEntry)return e;var t=new s.ics23.CompressedBatchEntry;if(null!=e.exist){if("object"!=typeof e.exist)throw TypeError(".ics23.CompressedBatchEntry.exist: object expected");t.exist=s.ics23.CompressedExistenceProof.fromObject(e.exist)}if(null!=e.nonexist){if("object"!=typeof e.nonexist)throw TypeError(".ics23.CompressedBatchEntry.nonexist: object expected");t.nonexist=s.ics23.CompressedNonExistenceProof.fromObject(e.nonexist)}return t},t.toObject=function(e,t){t||(t={});var r={};return null!=e.exist&&e.hasOwnProperty("exist")&&(r.exist=s.ics23.CompressedExistenceProof.toObject(e.exist,t),t.oneofs&&(r.proof="exist")),null!=e.nonexist&&e.hasOwnProperty("nonexist")&&(r.nonexist=s.ics23.CompressedNonExistenceProof.toObject(e.nonexist,t),t.oneofs&&(r.proof="nonexist")),r},t.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},t}(),e.CompressedExistenceProof=function(){function e(e){if(this.path=[],e)for(var t=Object.keys(e),r=0;r>>3){case 1:n.key=e.bytes();break;case 2:n.value=e.bytes();break;case 3:n.leaf=s.ics23.LeafOp.decode(e,e.uint32());break;case 4:if(n.path&&n.path.length||(n.path=[]),(7&o)==2)for(var a=e.uint32()+e.pos;e.pos>>3){case 1:n.key=e.bytes();break;case 2:n.left=s.ics23.CompressedExistenceProof.decode(e,e.uint32());break;case 3:n.right=s.ics23.CompressedExistenceProof.decode(e,e.uint32());break;default:e.skipType(7&o)}}return n},e.decodeDelimited=function(e){return e instanceof i||(e=new i(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.key&&e.hasOwnProperty("key")&&!(e.key&&"number"==typeof e.key.length||a.isString(e.key)))return"key: buffer expected";if(null!=e.left&&e.hasOwnProperty("left")){var t=s.ics23.CompressedExistenceProof.verify(e.left);if(t)return"left."+t}if(null!=e.right&&e.hasOwnProperty("right")){var t=s.ics23.CompressedExistenceProof.verify(e.right);if(t)return"right."+t}return null},e.fromObject=function(e){if(e instanceof s.ics23.CompressedNonExistenceProof)return e;var t=new s.ics23.CompressedNonExistenceProof;if(null!=e.key&&("string"==typeof e.key?a.base64.decode(e.key,t.key=a.newBuffer(a.base64.length(e.key)),0):e.key.length&&(t.key=e.key)),null!=e.left){if("object"!=typeof e.left)throw TypeError(".ics23.CompressedNonExistenceProof.left: object expected");t.left=s.ics23.CompressedExistenceProof.fromObject(e.left)}if(null!=e.right){if("object"!=typeof e.right)throw TypeError(".ics23.CompressedNonExistenceProof.right: object expected");t.right=s.ics23.CompressedExistenceProof.fromObject(e.right)}return t},e.toObject=function(e,t){t||(t={});var r={};return t.defaults&&(t.bytes===String?r.key="":(r.key=[],t.bytes!==Array&&(r.key=a.newBuffer(r.key))),r.left=null,r.right=null),null!=e.key&&e.hasOwnProperty("key")&&(r.key=t.bytes===String?a.base64.encode(e.key,0,e.key.length):t.bytes===Array?Array.prototype.slice.call(e.key):e.key),null!=e.left&&e.hasOwnProperty("left")&&(r.left=s.ics23.CompressedExistenceProof.toObject(e.left,t)),null!=e.right&&e.hasOwnProperty("right")&&(r.right=s.ics23.CompressedExistenceProof.toObject(e.right,t)),r},e.prototype.toJSON=function(){return this.constructor.toObject(this,n.util.toJSONOptions)},e}(),e}(),e.exports=s},72354:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.batchVerifyNonMembership=t.batchVerifyMembership=t.verifyNonMembership=t.verifyMembership=void 0;let n=r(62288),i=r(87215),o=r(2030);function a(e,t,r,o,a){let s=d((0,n.decompress)(e),o);if(!s)return!1;try{return(0,i.verifyExistence)(s,t,r,o,a),!0}catch(e){return!1}}function s(e,t,r,o){let a=c((0,n.decompress)(e),o);if(!a)return!1;try{return(0,i.verifyNonExistence)(a,t,r,o),!0}catch(e){return!1}}function l(e,t,r,i){let o=(0,n.decompress)(e);for(let[e,n]of i.entries())if(!a(o,t,r,e,n))return!1;return!0}function u(e,t,r,i){let o=(0,n.decompress)(e);for(let e of i)if(!s(o,t,r,e))return!1;return!0}function d(e,t){let r=e=>!!e&&(0,o.bytesEqual)(t,e.key);return r(e.exist)?e.exist:e.batch?e.batch.entries.map(e=>e.exist||null).find(r):void 0}function c(e,t){let r=e=>!!e&&(!e.left||(0,o.bytesBefore)(e.left.key,t))&&(!e.right||(0,o.bytesBefore)(t,e.right.key));return r(e.nonexist)?e.nonexist:e.batch?e.batch.entries.map(e=>e.nonexist||null).find(r):void 0}t.verifyMembership=a,t.verifyNonMembership=s,t.batchVerifyMembership=l,t.batchVerifyNonMembership=u},70102:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.verifyNonExistence=t.verifyExistence=t.tendermintSpec=t.iavlSpec=t.calculateExistenceRoot=t.verifyNonMembership=t.verifyMembership=t.ics23=void 0;var n=r(32165);Object.defineProperty(t,"ics23",{enumerable:!0,get:function(){return n.ics23}});var i=r(72354);Object.defineProperty(t,"verifyMembership",{enumerable:!0,get:function(){return i.verifyMembership}}),Object.defineProperty(t,"verifyNonMembership",{enumerable:!0,get:function(){return i.verifyNonMembership}});var o=r(87215);Object.defineProperty(t,"calculateExistenceRoot",{enumerable:!0,get:function(){return o.calculateExistenceRoot}}),Object.defineProperty(t,"iavlSpec",{enumerable:!0,get:function(){return o.iavlSpec}}),Object.defineProperty(t,"tendermintSpec",{enumerable:!0,get:function(){return o.tendermintSpec}}),Object.defineProperty(t,"verifyExistence",{enumerable:!0,get:function(){return o.verifyExistence}}),Object.defineProperty(t,"verifyNonExistence",{enumerable:!0,get:function(){return o.verifyNonExistence}})},17689:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.doHash=t.applyInner=t.applyLeaf=void 0;let n=r(33573),i=r(23928),o=r(93996),a=r(32165);function s(e,t,r){if(0===t.length)throw Error("Missing key");if(0===r.length)throw Error("Missing value");let n=f(d(e.prehashKey),c(e.length),t),i=f(d(e.prehashValue),c(e.length),r),o=new Uint8Array([...p(e.prefix),...n,...i]);return g(d(e.hash),o)}function l(e,t){if(0===t.length)throw Error("Inner op needs child value");let r=new Uint8Array([...p(e.prefix),...t,...p(e.suffix)]);return g(d(e.hash),r)}function u(e,t){return null==e?t:e}t.applyLeaf=s,t.applyInner=l;let d=e=>u(e,a.ics23.HashOp.NO_HASH),c=e=>u(e,a.ics23.LengthOp.NO_PREFIX),p=e=>u(e,new Uint8Array([]));function f(e,t,r){return m(t,h(e,r))}function h(e,t){return e===a.ics23.HashOp.NO_HASH?t:g(e,t)}function g(e,t){switch(e){case a.ics23.HashOp.SHA256:return(0,i.sha256)(t);case a.ics23.HashOp.SHA512:return(0,o.sha512)(t);case a.ics23.HashOp.RIPEMD160:return(0,n.ripemd160)(t);case a.ics23.HashOp.BITCOIN:return(0,n.ripemd160)((0,i.sha256)(t));case a.ics23.HashOp.SHA512_256:return(0,o.sha512_256)(t)}throw Error("Unsupported hashop: ".concat(e))}function m(e,t){switch(e){case a.ics23.LengthOp.NO_PREFIX:return t;case a.ics23.LengthOp.VAR_PROTO:return new Uint8Array([...y(t.length),...t]);case a.ics23.LengthOp.REQUIRE_32_BYTES:if(32!==t.length)throw Error("Length is ".concat(t.length,", not 32 bytes"));return t;case a.ics23.LengthOp.REQUIRE_64_BYTES:if(64!==t.length)throw Error("Length is ".concat(t.length,", not 64 bytes"));return t;case a.ics23.LengthOp.FIXED32_LITTLE:return new Uint8Array([...v(t.length),...t])}throw Error("Unsupported lengthop: ".concat(e))}function y(e){let t=[],r=e;for(;r>=128;)t=[...t,r%128+128],r/=128;return t=[...t,r],new Uint8Array(t)}function v(e){let t=new Uint8Array(4),r=e;for(let e=t.length;e>0;e--)t[Math.abs(e-t.length)]=r%256,r=Math.floor(r/256);return t}t.doHash=g},87215:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ensureLeftNeighbor=t.ensureSpec=t.calculateExistenceRoot=t.verifyNonExistence=t.verifyExistence=t.smtSpec=t.tendermintSpec=t.iavlSpec=void 0;let n=r(32165),i=r(17689),o=r(2030);function a(e,t,r,n,i){u(e,t);let a=l(e);(0,o.ensureBytesEqual)(a,r),(0,o.ensureBytesEqual)(n,e.key),(0,o.ensureBytesEqual)(i,e.value)}function s(e,t,r,n){let i,s;if(e.left&&(a(e.left,t,r,e.left.key,e.left.value),i=e.left.key),e.right&&(a(e.right,t,r,e.right.key,e.right.value),s=e.right.key),!i&&!s)throw Error("neither left nor right proof defined");if(i&&(0,o.ensureBytesBefore)(i,n),s&&(0,o.ensureBytesBefore)(n,s),!t.innerSpec)throw Error("no inner spec");i?s?p(t.innerSpec,e.left.path,e.right.path):c(t.innerSpec,e.left.path):d(t.innerSpec,e.right.path)}function l(e){if(!e.key||!e.value)throw Error("Existence proof needs key and value set");if(!e.leaf)throw Error("Existence proof must start with a leaf operation");let t=e.path||[],r=(0,i.applyLeaf)(e.leaf,e.key,e.value);for(let e of t)r=(0,i.applyInner)(e,r);return r}function u(e,t){if(!e.leaf)throw Error("Existence proof must start with a leaf operation");if(!t.leafSpec)throw Error("Spec must include leafSpec");if(!t.innerSpec)throw Error("Spec must include innerSpec");(0,o.ensureLeaf)(e.leaf,t.leafSpec);let r=e.path||[];if(t.minDepth&&r.lengtht.maxDepth)throw Error("Too many inner nodes ".concat(r.length));for(let e of r)(0,o.ensureInner)(e,t.leafSpec.prefix,t.innerSpec)}function d(e,t){let{minPrefix:r,maxPrefix:n,suffix:i}=m(e,0);for(let e of t)if(!g(e,r,n,i))throw Error("Step not leftmost")}function c(e,t){let r=e.childOrder.length-1,{minPrefix:n,maxPrefix:i,suffix:o}=m(e,r);for(let e of t)if(!g(e,n,i,o))throw Error("Step not leftmost")}function p(e,t,r){let n=[...t],i=[...r],a=n.pop(),s=i.pop();for(;(0,o.bytesEqual)(a.prefix,s.prefix)&&(0,o.bytesEqual)(a.suffix,s.suffix);)a=n.pop(),s=i.pop();if(!f(e,a,s))throw Error("Not left neightbor at first divergent step");c(e,n),d(e,i)}function f(e,t,r){let n=h(e,t);return h(e,r)===n+1}function h(e,t){for(let r=0;rr)&&(e.suffix||[]).length===n}function m(e,t){let r=y(e.childOrder,t),n=r*e.childSize;return{minPrefix:n+e.minPrefixLength,maxPrefix:n+e.maxPrefixLength,suffix:(e.childOrder.length-1-r)*e.childSize}}function y(e,t){if(t<0||t>=e.length)throw Error("Invalid branch: ".concat(t));return e.findIndex(e=>e===t)}t.iavlSpec={leafSpec:{prefix:Uint8Array.from([0]),hash:n.ics23.HashOp.SHA256,prehashValue:n.ics23.HashOp.SHA256,prehashKey:n.ics23.HashOp.NO_HASH,length:n.ics23.LengthOp.VAR_PROTO},innerSpec:{childOrder:[0,1],minPrefixLength:4,maxPrefixLength:12,childSize:33,hash:n.ics23.HashOp.SHA256}},t.tendermintSpec={leafSpec:{prefix:Uint8Array.from([0]),hash:n.ics23.HashOp.SHA256,prehashValue:n.ics23.HashOp.SHA256,prehashKey:n.ics23.HashOp.NO_HASH,length:n.ics23.LengthOp.VAR_PROTO},innerSpec:{childOrder:[0,1],minPrefixLength:1,maxPrefixLength:1,childSize:32,hash:n.ics23.HashOp.SHA256}},t.smtSpec={leafSpec:{hash:n.ics23.HashOp.SHA256,prehashKey:n.ics23.HashOp.NO_HASH,prehashValue:n.ics23.HashOp.SHA256,length:n.ics23.LengthOp.NO_PREFIX,prefix:Uint8Array.from([0])},innerSpec:{childOrder:[0,1],childSize:32,minPrefixLength:1,maxPrefixLength:1,emptyChild:new Uint8Array(32),hash:n.ics23.HashOp.SHA256},maxDepth:256},t.verifyExistence=a,t.verifyNonExistence=s,t.calculateExistenceRoot=l,t.ensureSpec=u,t.ensureLeftNeighbor=p},2030:function(e,t){"use strict";function r(e,t){if(e.hash!==t.hash)throw Error("Unexpected hashOp: ".concat(e.hash));if(e.prehashKey!==t.prehashKey)throw Error("Unexpected prehashKey: ".concat(e.prehashKey));if(e.prehashValue!==t.prehashValue)throw Error("Unexpected prehashValue: ".concat(e.prehashValue));if(e.length!==t.length)throw Error("Unexpected length op: ".concat(e.length));i(e.prefix,t.prefix)}function n(e,t,r){if(e.hash!==r.hash)throw Error("Unexpected hashOp: ".concat(e.hash));if(!e.prefix)throw Error("No prefix set for inner node");if(s(e.prefix,t))throw Error("Inner node has leaf prefix");if(e.prefix.length<(r.minPrefixLength||0))throw Error("Prefix too short: ".concat(e.prefix.length," bytes"));let n=(r.childOrder.length-1)*r.childSize;if(e.prefix.length>(r.maxPrefixLength||0)+n)throw Error("Prefix too long: ".concat(e.prefix.length," bytes"))}function i(e,t){if(t&&0!==t.length){if(!e)throw Error("Target bytes missing");o(t,e.slice(0,t.length))}}function o(e,t){if(e.length!==t.length)throw Error("Different lengths ".concat(e.length," vs ").concat(t.length));for(let r=0;rt[n])return!1}return e.length{let t=e.match(/^([0-9]+)([a-zA-Z]+)/);if(!t)throw Error("Got an invalid coin string");return{amount:t[1].replace(/^0+/,"")||"0",denom:t[2]}})}function s(e,t){if(e.denom!==t.denom)throw Error("Trying to add two coins with different denoms");return{amount:n.Decimal.fromAtomics(e.amount,0).plus(n.Decimal.fromAtomics(t.amount,0)).atomics,denom:e.denom}}t.coin=i,t.coins=o,t.parseCoins=a,t.addCoins=s},79221:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeBech32Pubkey=t.encodeAminoPubkey=t.decodeBech32Pubkey=t.decodeAminoPubkey=t.encodeEd25519Pubkey=t.encodeSecp256k1Pubkey=void 0;let n=r(69721),i=r(35801),o=r(67357),a=r(94515);function s(e){if(33!==e.length||2!==e[0]&&3!==e[0])throw Error("Public key must be compressed secp256k1, i.e. 33 bytes starting with 0x02 or 0x03");return{type:a.pubkeyType.secp256k1,value:(0,n.toBase64)(e)}}function l(e){if(32!==e.length)throw Error("Ed25519 public key must be 32 bytes long");return{type:a.pubkeyType.ed25519,value:(0,n.toBase64)(e)}}t.encodeSecp256k1Pubkey=s,t.encodeEd25519Pubkey=l;let u=(0,n.fromHex)("eb5ae98721"),d=(0,n.fromHex)("1624de6420"),c=(0,n.fromHex)("0dfb100520"),p=(0,n.fromHex)("22c1f7e2");function f(e){if((0,o.arrayContentStartsWith)(e,u)){let t=e.slice(u.length);if(33!==t.length)throw Error("Invalid rest data length. Expected 33 bytes (compressed secp256k1 pubkey).");return{type:a.pubkeyType.secp256k1,value:(0,n.toBase64)(t)}}if((0,o.arrayContentStartsWith)(e,d)){let t=e.slice(d.length);if(32!==t.length)throw Error("Invalid rest data length. Expected 32 bytes (Ed25519 pubkey).");return{type:a.pubkeyType.ed25519,value:(0,n.toBase64)(t)}}if((0,o.arrayContentStartsWith)(e,c)){let t=e.slice(c.length);if(32!==t.length)throw Error("Invalid rest data length. Expected 32 bytes (Sr25519 pubkey).");return{type:a.pubkeyType.sr25519,value:(0,n.toBase64)(t)}}if((0,o.arrayContentStartsWith)(e,p))return m(e);throw Error("Unsupported public key type. Amino data starts with: "+(0,n.toHex)(e.slice(0,5)))}function h(e){let{data:t}=(0,n.fromBech32)(e);return f(t)}function g(e){if(e.length<1)throw Error("Can't decode varint. EOF");if(e[0]>127)throw Error("Decoding numbers > 127 is not supported here. Please tell those lazy CosmJS maintainers to port the binary.Varint implementation from the Go standard library and write some tests.");return[e[0],1]}function m(e){let t=Array.from(e),r=t.splice(0,p.length);if(!(0,o.arrayContentStartsWith)(r,p))throw Error("Invalid multisig prefix.");if(8!=t.shift())throw Error("Invalid multisig data. Expecting 0x08 prefix before threshold.");let[n,i]=g(t);t.splice(0,i);let s=[];for(;t.length>0;){if(18!=t.shift())throw Error("Invalid multisig data. Expecting 0x12 prefix before participant pubkey length.");let[e,r]=g(t);if(t.splice(0,r),t.length127)throw Error("Encoding numbers > 127 is not supported here. Please tell those lazy CosmJS maintainers to port the binary.PutUvarint implementation from the Go standard library and write some tests.");return[t]}function v(e){if((0,a.isMultisigThresholdPubkey)(e)){let t=Array.from(p);for(let r of(t.push(8),t.push(...y(e.value.threshold)),e.value.pubkeys.map(e=>v(e))))t.push(18),t.push(...y(r.length)),t.push(...r);return new Uint8Array(t)}if((0,a.isEd25519Pubkey)(e))return new Uint8Array([...d,...(0,n.fromBase64)(e.value)]);if((0,a.isSecp256k1Pubkey)(e))return new Uint8Array([...u,...(0,n.fromBase64)(e.value)]);throw Error("Unsupported pubkey type")}function b(e,t){return(0,n.toBech32)(t,v(e))}t.decodeAminoPubkey=f,t.decodeBech32Pubkey=h,t.encodeAminoPubkey=v,t.encodeBech32Pubkey=b},83552:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.executeKdf=t.makeStdTx=t.isStdTx=t.serializeSignDoc=t.makeSignDoc=t.encodeSecp256k1Signature=t.decodeSignature=t.Secp256k1Wallet=t.Secp256k1HdWallet=t.extractKdfConfiguration=t.pubkeyType=t.isSinglePubkey=t.isSecp256k1Pubkey=t.isMultisigThresholdPubkey=t.isEd25519Pubkey=t.makeCosmoshubPath=t.omitDefault=t.createMultisigThresholdPubkey=t.encodeSecp256k1Pubkey=t.encodeEd25519Pubkey=t.encodeBech32Pubkey=t.encodeAminoPubkey=t.decodeBech32Pubkey=t.decodeAminoPubkey=t.parseCoins=t.coins=t.coin=t.addCoins=t.rawSecp256k1PubkeyToRawAddress=t.rawEd25519PubkeyToRawAddress=t.pubkeyToRawAddress=t.pubkeyToAddress=void 0;var n=r(63848);Object.defineProperty(t,"pubkeyToAddress",{enumerable:!0,get:function(){return n.pubkeyToAddress}}),Object.defineProperty(t,"pubkeyToRawAddress",{enumerable:!0,get:function(){return n.pubkeyToRawAddress}}),Object.defineProperty(t,"rawEd25519PubkeyToRawAddress",{enumerable:!0,get:function(){return n.rawEd25519PubkeyToRawAddress}}),Object.defineProperty(t,"rawSecp256k1PubkeyToRawAddress",{enumerable:!0,get:function(){return n.rawSecp256k1PubkeyToRawAddress}});var i=r(81458);Object.defineProperty(t,"addCoins",{enumerable:!0,get:function(){return i.addCoins}}),Object.defineProperty(t,"coin",{enumerable:!0,get:function(){return i.coin}}),Object.defineProperty(t,"coins",{enumerable:!0,get:function(){return i.coins}}),Object.defineProperty(t,"parseCoins",{enumerable:!0,get:function(){return i.parseCoins}});var o=r(79221);Object.defineProperty(t,"decodeAminoPubkey",{enumerable:!0,get:function(){return o.decodeAminoPubkey}}),Object.defineProperty(t,"decodeBech32Pubkey",{enumerable:!0,get:function(){return o.decodeBech32Pubkey}}),Object.defineProperty(t,"encodeAminoPubkey",{enumerable:!0,get:function(){return o.encodeAminoPubkey}}),Object.defineProperty(t,"encodeBech32Pubkey",{enumerable:!0,get:function(){return o.encodeBech32Pubkey}}),Object.defineProperty(t,"encodeEd25519Pubkey",{enumerable:!0,get:function(){return o.encodeEd25519Pubkey}}),Object.defineProperty(t,"encodeSecp256k1Pubkey",{enumerable:!0,get:function(){return o.encodeSecp256k1Pubkey}});var a=r(42306);Object.defineProperty(t,"createMultisigThresholdPubkey",{enumerable:!0,get:function(){return a.createMultisigThresholdPubkey}});var s=r(56728);Object.defineProperty(t,"omitDefault",{enumerable:!0,get:function(){return s.omitDefault}});var l=r(16340);Object.defineProperty(t,"makeCosmoshubPath",{enumerable:!0,get:function(){return l.makeCosmoshubPath}});var u=r(94515);Object.defineProperty(t,"isEd25519Pubkey",{enumerable:!0,get:function(){return u.isEd25519Pubkey}}),Object.defineProperty(t,"isMultisigThresholdPubkey",{enumerable:!0,get:function(){return u.isMultisigThresholdPubkey}}),Object.defineProperty(t,"isSecp256k1Pubkey",{enumerable:!0,get:function(){return u.isSecp256k1Pubkey}}),Object.defineProperty(t,"isSinglePubkey",{enumerable:!0,get:function(){return u.isSinglePubkey}}),Object.defineProperty(t,"pubkeyType",{enumerable:!0,get:function(){return u.pubkeyType}});var d=r(43130);Object.defineProperty(t,"extractKdfConfiguration",{enumerable:!0,get:function(){return d.extractKdfConfiguration}}),Object.defineProperty(t,"Secp256k1HdWallet",{enumerable:!0,get:function(){return d.Secp256k1HdWallet}});var c=r(16906);Object.defineProperty(t,"Secp256k1Wallet",{enumerable:!0,get:function(){return c.Secp256k1Wallet}});var p=r(24384);Object.defineProperty(t,"decodeSignature",{enumerable:!0,get:function(){return p.decodeSignature}}),Object.defineProperty(t,"encodeSecp256k1Signature",{enumerable:!0,get:function(){return p.encodeSecp256k1Signature}});var f=r(71901);Object.defineProperty(t,"makeSignDoc",{enumerable:!0,get:function(){return f.makeSignDoc}}),Object.defineProperty(t,"serializeSignDoc",{enumerable:!0,get:function(){return f.serializeSignDoc}});var h=r(89251);Object.defineProperty(t,"isStdTx",{enumerable:!0,get:function(){return h.isStdTx}}),Object.defineProperty(t,"makeStdTx",{enumerable:!0,get:function(){return h.makeStdTx}});var g=r(49858);Object.defineProperty(t,"executeKdf",{enumerable:!0,get:function(){return g.executeKdf}})},42306:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createMultisigThresholdPubkey=t.compareArrays=void 0;let n=r(69721),i=r(35801),o=r(63848);function a(e,t){let r=(0,n.toHex)(e),i=(0,n.toHex)(t);return r===i?0:r2&&void 0!==arguments[2]&&arguments[2],n=new i.Uint53(t);if(n.toNumber()>e.length)throw Error("Threshold k = ".concat(n.toNumber()," exceeds number of keys n = ").concat(e.length));let s=r?e:Array.from(e).sort((e,t)=>a((0,o.pubkeyToRawAddress)(e),(0,o.pubkeyToRawAddress)(t)));return{type:"tendermint/PubKeyMultisigThreshold",value:{threshold:n.toString(),pubkeys:s}}}t.compareArrays=a,t.createMultisigThresholdPubkey=s},56728:function(e,t){"use strict";function r(e){switch(typeof e){case"string":return""===e?void 0:e;case"number":return 0===e?void 0:e;case"bigint":return e===BigInt(0)?void 0:e;case"boolean":return e||void 0;default:throw Error("Got unsupported type '".concat(typeof e,"'"))}}Object.defineProperty(t,"__esModule",{value:!0}),t.omitDefault=void 0,t.omitDefault=r},16340:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.makeCosmoshubPath=void 0;let n=r(49400);function i(e){return[n.Slip10RawIndex.hardened(44),n.Slip10RawIndex.hardened(118),n.Slip10RawIndex.hardened(0),n.Slip10RawIndex.normal(0),n.Slip10RawIndex.normal(e)]}t.makeCosmoshubPath=i},94515:function(e,t){"use strict";function r(e){return"tendermint/PubKeyEd25519"===e.type}function n(e){return"tendermint/PubKeySecp256k1"===e.type}function i(e){return[t.pubkeyType.ed25519,t.pubkeyType.secp256k1,t.pubkeyType.sr25519].includes(e.type)}function o(e){return"tendermint/PubKeyMultisigThreshold"===e.type}Object.defineProperty(t,"__esModule",{value:!0}),t.isMultisigThresholdPubkey=t.isSinglePubkey=t.pubkeyType=t.isSecp256k1Pubkey=t.isEd25519Pubkey=void 0,t.isEd25519Pubkey=r,t.isSecp256k1Pubkey=n,t.pubkeyType={secp256k1:"tendermint/PubKeySecp256k1",ed25519:"tendermint/PubKeyEd25519",sr25519:"tendermint/PubKeySr25519",multisigThreshold:"tendermint/PubKeyMultisigThreshold"},t.isSinglePubkey=i,t.isMultisigThresholdPubkey=o},43130:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Secp256k1HdWallet=t.extractKdfConfiguration=void 0;let n=r(49400),i=r(69721),o=r(67357),a=r(63848),s=r(16340),l=r(24384),u=r(71901),d=r(49858),c="secp256k1wallet-v1",p={algorithm:"argon2id",params:{outputLength:32,opsLimit:24,memLimitKib:12288}};function f(e){return!!(0,o.isNonNullObject)(e)&&"string"==typeof e.hdPath&&"string"==typeof e.prefix}function h(e){return e.kdf}function g(e){let t=JSON.parse(e);if(!(0,o.isNonNullObject)(t))throw Error("Root document is not an object.");if(t.type===c)return h(t);throw Error("Unsupported serialization type")}t.extractKdfConfiguration=g;let m={bip39Password:"",hdPaths:[(0,s.makeCosmoshubPath)(0)],prefix:"cosmos"};class y{static async fromMnemonic(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=new n.EnglishMnemonic(e),i=await n.Bip39.mnemonicToSeed(r,t.bip39Password);return new y(r,{...t,seed:i})}static async generate(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:12,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=4*Math.floor(11*e/33),i=n.Random.getBytes(r),o=n.Bip39.encode(i);return y.fromMnemonic(o.toString(),t)}static async deserialize(e,t){let r=JSON.parse(e);if(!(0,o.isNonNullObject)(r))throw Error("Root document is not an object.");if(r.type===c)return y.deserializeTypeV1(e,t);throw Error("Unsupported serialization type")}static async deserializeWithEncryptionKey(e,t){let r=JSON.parse(e);if(!(0,o.isNonNullObject)(r))throw Error("Root document is not an object.");let a=r;if(a.type===c){let e=await (0,d.decrypt)((0,i.fromBase64)(a.data),t,a.encryption),{mnemonic:r,accounts:s}=JSON.parse((0,i.fromUtf8)(e));if((0,o.assert)("string"==typeof r),!Array.isArray(s))throw Error("Property 'accounts' is not an array");if(!s.every(e=>f(e)))throw Error("Account is not in the correct format.");let l=s[0].prefix;if(!s.every(e=>{let{prefix:t}=e;return t===l}))throw Error("Accounts do not all have the same prefix");let u=s.map(e=>{let{hdPath:t}=e;return(0,n.stringToPath)(t)});return y.fromMnemonic(r,{hdPaths:u,prefix:l})}throw Error("Unsupported serialization type")}static async deserializeTypeV1(e,t){let r=JSON.parse(e);if(!(0,o.isNonNullObject)(r))throw Error("Root document is not an object.");let n=await (0,d.executeKdf)(t,r.kdf);return y.deserializeWithEncryptionKey(e,n)}get mnemonic(){return this.secret.toString()}async getAccounts(){return(await this.getAccountsWithPrivkeys()).map(e=>{let{algo:t,pubkey:r,address:n}=e;return{algo:t,pubkey:r,address:n}})}async signAmino(e,t){let r=(await this.getAccountsWithPrivkeys()).find(t=>{let{address:r}=t;return r===e});if(void 0===r)throw Error("Address ".concat(e," not found in wallet"));let{privkey:i,pubkey:o}=r,a=(0,n.sha256)((0,u.serializeSignDoc)(t)),s=await n.Secp256k1.createSignature(a,i),d=new Uint8Array([...s.r(32),...s.s(32)]);return{signed:t,signature:(0,l.encodeSecp256k1Signature)(o,d)}}async serialize(e){let t=p,r=await (0,d.executeKdf)(e,t);return this.serializeWithEncryptionKey(r,t)}async serializeWithEncryptionKey(e,t){let r={mnemonic:this.mnemonic,accounts:this.accounts.map(e=>{let{hdPath:t,prefix:r}=e;return{hdPath:(0,n.pathToString)(t),prefix:r}})},o=(0,i.toUtf8)(JSON.stringify(r)),a={algorithm:d.supportedAlgorithms.xchacha20poly1305Ietf},s=await (0,d.encrypt)(o,e,a);return JSON.stringify({type:c,kdf:t,encryption:a,data:(0,i.toBase64)(s)})}async getKeyPair(e){let{privkey:t}=n.Slip10.derivePath(n.Slip10Curve.Secp256k1,this.seed,e),{pubkey:r}=await n.Secp256k1.makeKeypair(t);return{privkey:t,pubkey:n.Secp256k1.compressPubkey(r)}}async getAccountsWithPrivkeys(){return Promise.all(this.accounts.map(async e=>{let{hdPath:t,prefix:r}=e,{privkey:n,pubkey:o}=await this.getKeyPair(t),s=(0,i.toBech32)(r,(0,a.rawSecp256k1PubkeyToRawAddress)(o));return{algo:"secp256k1",privkey:n,pubkey:o,address:s}}))}constructor(e,t){var r,n;let i=null!==(r=t.hdPaths)&&void 0!==r?r:m.hdPaths,o=null!==(n=t.prefix)&&void 0!==n?n:m.prefix;this.secret=e,this.seed=t.seed,this.accounts=i.map(e=>({hdPath:e,prefix:o}))}}t.Secp256k1HdWallet=y},16906:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Secp256k1Wallet=void 0;let n=r(49400),i=r(69721),o=r(63848),a=r(24384),s=r(71901);class l{static async fromKey(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"cosmos",r=(await n.Secp256k1.makeKeypair(e)).pubkey;return new l(e,n.Secp256k1.compressPubkey(r),t)}get address(){return(0,i.toBech32)(this.prefix,(0,o.rawSecp256k1PubkeyToRawAddress)(this.pubkey))}async getAccounts(){return[{algo:"secp256k1",address:this.address,pubkey:this.pubkey}]}async signAmino(e,t){if(e!==this.address)throw Error("Address ".concat(e," not found in wallet"));let r=new n.Sha256((0,s.serializeSignDoc)(t)).digest(),i=await n.Secp256k1.createSignature(r,this.privkey),o=new Uint8Array([...i.r(32),...i.s(32)]);return{signed:t,signature:(0,a.encodeSecp256k1Signature)(this.pubkey,o)}}constructor(e,t,r){this.privkey=e,this.pubkey=t,this.prefix=r}}t.Secp256k1Wallet=l},24384:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeSignature=t.encodeSecp256k1Signature=void 0;let n=r(69721),i=r(79221),o=r(94515);function a(e,t){if(64!==t.length)throw Error("Signature must be 64 bytes long. Cosmos SDK uses a 2x32 byte fixed length encoding for the secp256k1 signature integers r and s.");return{pub_key:(0,i.encodeSecp256k1Pubkey)(e),signature:(0,n.toBase64)(t)}}function s(e){if(e.pub_key.type===o.pubkeyType.secp256k1)return{pubkey:(0,n.fromBase64)(e.pub_key.value),signature:(0,n.fromBase64)(e.signature)};throw Error("Unsupported pubkey type")}t.encodeSecp256k1Signature=a,t.decodeSignature=s},71901:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeSignDoc=t.escapeCharacters=t.makeSignDoc=t.sortedJsonStringify=void 0;let n=r(69721),i=r(35801);function o(e){if("object"!=typeof e||null===e)return e;if(Array.isArray(e))return e.map(o);let t=Object.keys(e).sort(),r={};return t.forEach(t=>{r[t]=o(e[t])}),r}function a(e){return JSON.stringify(o(e))}function s(e,t,r,n,o,a,s){return{chain_id:r,account_number:i.Uint53.fromString(o.toString()).toString(),sequence:i.Uint53.fromString(a.toString()).toString(),fee:t,msgs:e,memo:n||"",...s&&{timeout_height:s.toString()}}}function l(e){let t=/&/g,r=//g;return e.replace(t,"\\u0026").replace(r,"\\u003c").replace(n,"\\u003e")}function u(e){let t=l(a(e));return(0,n.toUtf8)(t)}t.sortedJsonStringify=a,t.makeSignDoc=s,t.escapeCharacters=l,t.serializeSignDoc=u},89251:function(e,t){"use strict";function r(e){let{memo:t,msg:r,fee:n,signatures:i}=e;return"string"==typeof t&&Array.isArray(r)&&"object"==typeof n&&Array.isArray(i)}function n(e,t){return{msg:e.msgs,fee:e.fee,memo:e.memo,signatures:Array.isArray(t)?t:[t]}}Object.defineProperty(t,"__esModule",{value:!0}),t.makeStdTx=t.isStdTx=void 0,t.isStdTx=r,t.makeStdTx=n},49858:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decrypt=t.encrypt=t.supportedAlgorithms=t.executeKdf=t.cosmjsSalt=void 0;let n=r(49400),i=r(69721);async function o(e,r){if("argon2id"===r.algorithm){let i=r.params;if(!(0,n.isArgon2idOptions)(i))throw Error("Invalid format of argon2id params");return n.Argon2id.execute(e,t.cosmjsSalt,i)}throw Error("Unsupported KDF algorithm")}async function a(e,r,i){if(i.algorithm===t.supportedAlgorithms.xchacha20poly1305Ietf){let t=n.Random.getBytes(n.xchacha20NonceLength);return new Uint8Array([...t,...await n.Xchacha20poly1305Ietf.encrypt(e,r,t)])}throw Error("Unsupported encryption algorithm: '".concat(i.algorithm,"'"))}async function s(e,r,i){if(i.algorithm===t.supportedAlgorithms.xchacha20poly1305Ietf){let t=e.slice(0,n.xchacha20NonceLength);return n.Xchacha20poly1305Ietf.decrypt(e.slice(n.xchacha20NonceLength),r,t)}throw Error("Unsupported encryption algorithm: '".concat(i.algorithm,"'"))}t.cosmjsSalt=(0,i.toAscii)("The CosmJS salt."),t.executeKdf=o,t.supportedAlgorithms={xchacha20poly1305Ietf:"xchacha20poly1305-ietf"},t.encrypt=a,t.decrypt=s},50992:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CosmWasmClient=void 0;let n=r(69721),i=r(35801),o=r(58015),a=r(43890),s=r(67357),l=r(94534),u=r(20624),d=r(31078);class c{static async connect(e){let t=await (0,a.connectComet)(e);return c.create(t)}static async create(e){return new c(e)}getCometClient(){return this.cometClient}forceGetCometClient(){if(!this.cometClient)throw Error("Comet client not available. You cannot use online functionality in offline mode.");return this.cometClient}getQueryClient(){return this.queryClient}forceGetQueryClient(){if(!this.queryClient)throw Error("Query client not available. You cannot use online functionality in offline mode.");return this.queryClient}async getChainId(){if(!this.chainId){let e=(await this.forceGetCometClient().status()).nodeInfo.network;if(!e)throw Error("Chain ID must not be empty");this.chainId=e}return this.chainId}async getHeight(){return(await this.forceGetCometClient().status()).syncInfo.latestBlockHeight}async getAccount(e){try{let t=await this.forceGetQueryClient().auth.account(e);return t?(0,o.accountFromAny)(t):null}catch(e){if(/rpc error: code = NotFound/i.test(e.toString()))return null;throw e}}async getSequence(e){let t=await this.getAccount(e);if(!t)throw Error("Account '".concat(e,"' does not exist on chain. Send some tokens there before trying to query sequence."));return{accountNumber:t.accountNumber,sequence:t.sequence}}async getBlock(e){let t=await this.forceGetCometClient().block(e);return{id:(0,n.toHex)(t.blockId.hash).toUpperCase(),header:{version:{block:new i.Uint53(t.block.header.version.block).toString(),app:new i.Uint53(t.block.header.version.app).toString()},height:t.block.header.height,chainId:t.block.header.chainId,time:(0,a.toRfc3339WithNanoseconds)(t.block.header.time)},txs:t.block.txs}}async getBalance(e,t){return this.forceGetQueryClient().bank.balance(e,t)}async getTx(e){var t;return null!==(t=(await this.txsQuery("tx.hash='".concat(e,"'")))[0])&&void 0!==t?t:null}async searchTx(e){let t;if("string"==typeof e)t=e;else if((0,o.isSearchTxQueryArray)(e))t=e.map(e=>"string"==typeof e.value?"".concat(e.key,"='").concat(e.value,"'"):"".concat(e.key,"=").concat(e.value)).join(" AND ");else throw Error("Got unsupported query type. See CosmJS 0.31 CHANGELOG for API breaking changes here.");return this.txsQuery(t)}disconnect(){this.cometClient&&this.cometClient.disconnect()}async broadcastTx(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6e4,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3e3,n=!1,i=setTimeout(()=>{n=!0},t),a=async e=>{if(n)throw new o.TimeoutError("Transaction with ID ".concat(e," was submitted but was not yet found on the chain. You might want to check later. There was a wait of ").concat(t/1e3," seconds."),e);await (0,s.sleep)(r);let i=await this.getTx(e);return i?{code:i.code,height:i.height,txIndex:i.txIndex,rawLog:i.rawLog,transactionHash:e,events:i.events,msgResponses:i.msgResponses,gasUsed:i.gasUsed,gasWanted:i.gasWanted}:a(e)},l=await this.broadcastTxSync(e);return new Promise((e,t)=>a(l).then(t=>{clearTimeout(i),e(t)},e=>{clearTimeout(i),t(e)}))}async broadcastTxSync(e){let t=await this.forceGetCometClient().broadcastTxSync({tx:e});if(t.code){var r;return Promise.reject(new o.BroadcastTxError(t.code,null!==(r=t.codespace)&&void 0!==r?r:"",t.log))}return(0,n.toHex)(t.hash).toUpperCase()}async getCodes(){let e;let t=[];do{let{codeInfos:r,pagination:n}=await this.forceGetQueryClient().wasm.listCodeInfo(e),i=r||[];t.push(...i),e=null==n?void 0:n.nextKey}while((null==e?void 0:e.length)!==0);return t.map(e=>((0,s.assert)(e.creator&&e.codeId&&e.dataHash,"entry incomplete"),{id:Number(e.codeId),creator:e.creator,checksum:(0,n.toHex)(e.dataHash)}))}async getCodeDetails(e){let t=this.codesCache.get(e);if(t)return t;let{codeInfo:r,data:i}=await this.forceGetQueryClient().wasm.getCode(e);(0,s.assert)(r&&r.codeId&&r.creator&&r.dataHash&&i,"codeInfo missing or incomplete");let o={id:Number(r.codeId),creator:r.creator,checksum:(0,n.toHex)(r.dataHash),data:i};return this.codesCache.set(e,o),o}async getContracts(e){let t;let r=[];do{let{contracts:n,pagination:i}=await this.forceGetQueryClient().wasm.listContractsByCodeId(e,t);r.push(...n),t=null==i?void 0:i.nextKey}while((null==t?void 0:t.length)!==0&&void 0!==t);return r}async getContractsByCreator(e){let t;let r=[];do{let{contractAddresses:n,pagination:i}=await this.forceGetQueryClient().wasm.listContractsByCreator(e,t);r.push(...n),t=null==i?void 0:i.nextKey}while((null==t?void 0:t.length)!==0&&void 0!==t);return r}async getContract(e){let{address:t,contractInfo:r}=await this.forceGetQueryClient().wasm.getContractInfo(e);if(!r)throw Error('No contract found at address "'.concat(e,'"'));return(0,s.assert)(t,"address missing"),(0,s.assert)(r.codeId&&r.creator&&r.label,"contractInfo incomplete"),{address:t,codeId:Number(r.codeId),creator:r.creator,admin:r.admin||void 0,label:r.label,ibcPortId:r.ibcPortId||void 0}}async getContractCodeHistory(e){let t=await this.forceGetQueryClient().wasm.getContractCodeHistory(e);if(!t)throw Error('No contract history found for address "'.concat(e,'"'));let r={[u.ContractCodeHistoryOperationType.CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT]:"Init",[u.ContractCodeHistoryOperationType.CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS]:"Genesis",[u.ContractCodeHistoryOperationType.CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE]:"Migrate"};return(t.entries||[]).map(e=>((0,s.assert)(e.operation&&e.codeId&&e.msg),{operation:r[e.operation],codeId:Number(e.codeId),msg:JSON.parse((0,n.fromUtf8)(e.msg))}))}async queryContractRaw(e,t){await this.getContract(e);let{data:r}=await this.forceGetQueryClient().wasm.queryContractRaw(e,t);return null!=r?r:null}async queryContractSmart(e,t){try{return await this.forceGetQueryClient().wasm.queryContractSmart(e,t)}catch(t){if(t instanceof Error&&t.message.startsWith("not found: contract"))throw Error('No contract found at address "'.concat(e,'"'));throw t}}async txsQuery(e){return(await this.forceGetCometClient().txSearchAll({query:e})).txs.map(e=>{var t;let r=l.TxMsgData.decode(null!==(t=e.result.data)&&void 0!==t?t:new Uint8Array);return{height:e.height,txIndex:e.index,hash:(0,n.toHex)(e.hash).toUpperCase(),code:e.result.code,events:e.result.events.map(o.fromTendermintEvent),rawLog:e.result.log||"",tx:e.tx,msgResponses:r.msgResponses,gasUsed:e.result.gasUsed,gasWanted:e.result.gasWanted}})}constructor(e){this.codesCache=new Map,e&&(this.cometClient=e,this.queryClient=o.QueryClient.withExtensions(e,o.setupAuthExtension,o.setupBankExtension,d.setupWasmExtension,o.setupTxExtension))}}t.CosmWasmClient=c},16529:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fromBinary=t.toBinary=void 0;let n=r(69721);function i(e){return(0,n.toBase64)((0,n.toUtf8)(JSON.stringify(e)))}function o(e){return JSON.parse((0,n.fromUtf8)((0,n.fromBase64)(e)))}t.toBinary=i,t.fromBinary=o},86509:function(e,t,r){"use strict";n={value:!0},t.Fl=t.dv=n=n=n=n=n=n=n=n=n=n=n=n=n=n=void 0;var n,i=r(50992);n={enumerable:!0,get:function(){return i.CosmWasmClient}};var o=r(16529);n={enumerable:!0,get:function(){return o.fromBinary}},n={enumerable:!0,get:function(){return o.toBinary}};var a=r(59703);n={enumerable:!0,get:function(){return a._instantiate2AddressIntermediate}},n={enumerable:!0,get:function(){return a.instantiate2Address}};var s=r(31078);n={enumerable:!0,get:function(){return s.createWasmAminoConverters}},n={enumerable:!0,get:function(){return s.isMsgClearAdminEncodeObject}},n={enumerable:!0,get:function(){return s.isMsgExecuteEncodeObject}},n={enumerable:!0,get:function(){return s.isMsgInstantiateContract2EncodeObject}},n={enumerable:!0,get:function(){return s.isMsgInstantiateContractEncodeObject}},n={enumerable:!0,get:function(){return s.isMsgMigrateEncodeObject}},n={enumerable:!0,get:function(){return s.isMsgStoreCodeEncodeObject}},n={enumerable:!0,get:function(){return s.isMsgUpdateAdminEncodeObject}},n={enumerable:!0,get:function(){return s.setupWasmExtension}},Object.defineProperty(t,"dv",{enumerable:!0,get:function(){return s.wasmTypes}});var l=r(1912);Object.defineProperty(t,"Fl",{enumerable:!0,get:function(){return l.SigningCosmWasmClient}})},59703:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.instantiate2Address=t._instantiate2AddressIntermediate=void 0;let n=r(49400),i=r(69721),o=r(35801),a=r(67357);function s(e,t){return new n.Sha256((0,n.sha256)((0,i.toAscii)(e))).update(t).digest()}function l(e){return o.Uint64.fromNumber(e).toBytesBigEndian()}function u(e,t,r,n,o){(0,a.assert)(32===e.length);let u=(0,i.fromBech32)(t).data,d="string"==typeof n?(0,i.toUtf8)(n):new Uint8Array;if(r.length<1||r.length>64)throw Error("Salt must be between 1 and 64 bytes");let c=new Uint8Array([...(0,i.toAscii)("wasm"),0,...l(e.length),...e,...l(u.length),...u,...l(r.length),...r,...l(d.length),...d]),p=s("module",c),f=(0,i.toBech32)(o,p);return{key:c,addressData:p,address:f}}function d(e,t,r,n){return u(e,t,r,null,n).address}t._instantiate2AddressIntermediate=u,t.instantiate2Address=d},31078:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setupWasmExtension=t.wasmTypes=t.isMsgUpdateAdminEncodeObject=t.isMsgStoreCodeEncodeObject=t.isMsgMigrateEncodeObject=t.isMsgInstantiateContractEncodeObject=t.isMsgInstantiateContract2EncodeObject=t.isMsgExecuteEncodeObject=t.isMsgClearAdminEncodeObject=t.createWasmAminoConverters=void 0;var n=r(67279);Object.defineProperty(t,"createWasmAminoConverters",{enumerable:!0,get:function(){return n.createWasmAminoConverters}});var i=r(40483);Object.defineProperty(t,"isMsgClearAdminEncodeObject",{enumerable:!0,get:function(){return i.isMsgClearAdminEncodeObject}}),Object.defineProperty(t,"isMsgExecuteEncodeObject",{enumerable:!0,get:function(){return i.isMsgExecuteEncodeObject}}),Object.defineProperty(t,"isMsgInstantiateContract2EncodeObject",{enumerable:!0,get:function(){return i.isMsgInstantiateContract2EncodeObject}}),Object.defineProperty(t,"isMsgInstantiateContractEncodeObject",{enumerable:!0,get:function(){return i.isMsgInstantiateContractEncodeObject}}),Object.defineProperty(t,"isMsgMigrateEncodeObject",{enumerable:!0,get:function(){return i.isMsgMigrateEncodeObject}}),Object.defineProperty(t,"isMsgStoreCodeEncodeObject",{enumerable:!0,get:function(){return i.isMsgStoreCodeEncodeObject}}),Object.defineProperty(t,"isMsgUpdateAdminEncodeObject",{enumerable:!0,get:function(){return i.isMsgUpdateAdminEncodeObject}}),Object.defineProperty(t,"wasmTypes",{enumerable:!0,get:function(){return i.wasmTypes}});var o=r(57457);Object.defineProperty(t,"setupWasmExtension",{enumerable:!0,get:function(){return o.setupWasmExtension}})},67279:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createWasmAminoConverters=t.accessTypeToString=t.accessTypeFromString=void 0;let n=r(83552),i=r(69721),o=r(20624);function a(e){switch(e){case"Unspecified":return o.AccessType.ACCESS_TYPE_UNSPECIFIED;case"Nobody":return o.AccessType.ACCESS_TYPE_NOBODY;case"OnlyAddress":return o.AccessType.ACCESS_TYPE_ONLY_ADDRESS;case"Everybody":return o.AccessType.ACCESS_TYPE_EVERYBODY;case"AnyOfAddresses":return o.AccessType.ACCESS_TYPE_ANY_OF_ADDRESSES;default:return o.AccessType.UNRECOGNIZED}}function s(e){switch(e){case o.AccessType.ACCESS_TYPE_UNSPECIFIED:return"Unspecified";case o.AccessType.ACCESS_TYPE_NOBODY:return"Nobody";case o.AccessType.ACCESS_TYPE_ONLY_ADDRESS:return"OnlyAddress";case o.AccessType.ACCESS_TYPE_EVERYBODY:return"Everybody";case o.AccessType.ACCESS_TYPE_ANY_OF_ADDRESSES:return"AnyOfAddresses";case o.AccessType.UNRECOGNIZED:default:return"UNRECOGNIZED"}}function l(){return{"/cosmwasm.wasm.v1.MsgStoreCode":{aminoType:"wasm/MsgStoreCode",toAmino:e=>{let{sender:t,wasmByteCode:r,instantiatePermission:n}=e;return{sender:t,wasm_byte_code:(0,i.toBase64)(r),instantiate_permission:n?{permission:s(n.permission),address:n.address||void 0,addresses:0!==n.addresses.length?n.addresses:void 0}:void 0}},fromAmino:e=>{var t,r;let{sender:n,wasm_byte_code:s,instantiate_permission:l}=e;return{sender:n,wasmByteCode:(0,i.fromBase64)(s),instantiatePermission:l?o.AccessConfig.fromPartial({permission:a(l.permission),address:null!==(t=l.address)&&void 0!==t?t:"",addresses:null!==(r=l.addresses)&&void 0!==r?r:[]}):void 0}}},"/cosmwasm.wasm.v1.MsgInstantiateContract":{aminoType:"wasm/MsgInstantiateContract",toAmino:e=>{let{sender:t,codeId:r,label:o,msg:a,funds:s,admin:l}=e;return{sender:t,code_id:r.toString(),label:o,msg:JSON.parse((0,i.fromUtf8)(a)),funds:s,admin:(0,n.omitDefault)(l)}},fromAmino:e=>{let{sender:t,code_id:r,label:n,msg:o,funds:a,admin:s}=e;return{sender:t,codeId:BigInt(r),label:n,msg:(0,i.toUtf8)(JSON.stringify(o)),funds:[...a],admin:null!=s?s:""}}},"/cosmwasm.wasm.v1.MsgInstantiateContract2":{aminoType:"wasm/MsgInstantiateContract2",toAmino:e=>{let{sender:t,codeId:r,label:o,msg:a,funds:s,admin:l,salt:u,fixMsg:d}=e;return{sender:t,code_id:r.toString(),label:o,msg:JSON.parse((0,i.fromUtf8)(a)),funds:s,admin:(0,n.omitDefault)(l),salt:(0,i.toBase64)(u),fix_msg:(0,n.omitDefault)(d)}},fromAmino:e=>{let{sender:t,code_id:r,label:n,msg:o,funds:a,admin:s,salt:l,fix_msg:u}=e;return{sender:t,codeId:BigInt(r),label:n,msg:(0,i.toUtf8)(JSON.stringify(o)),funds:[...a],admin:null!=s?s:"",salt:(0,i.fromBase64)(l),fixMsg:null!=u&&u}}},"/cosmwasm.wasm.v1.MsgUpdateAdmin":{aminoType:"wasm/MsgUpdateAdmin",toAmino:e=>{let{sender:t,newAdmin:r,contract:n}=e;return{sender:t,new_admin:r,contract:n}},fromAmino:e=>{let{sender:t,new_admin:r,contract:n}=e;return{sender:t,newAdmin:r,contract:n}}},"/cosmwasm.wasm.v1.MsgClearAdmin":{aminoType:"wasm/MsgClearAdmin",toAmino:e=>{let{sender:t,contract:r}=e;return{sender:t,contract:r}},fromAmino:e=>{let{sender:t,contract:r}=e;return{sender:t,contract:r}}},"/cosmwasm.wasm.v1.MsgExecuteContract":{aminoType:"wasm/MsgExecuteContract",toAmino:e=>{let{sender:t,contract:r,msg:n,funds:o}=e;return{sender:t,contract:r,msg:JSON.parse((0,i.fromUtf8)(n)),funds:o}},fromAmino:e=>{let{sender:t,contract:r,msg:n,funds:o}=e;return{sender:t,contract:r,msg:(0,i.toUtf8)(JSON.stringify(n)),funds:[...o]}}},"/cosmwasm.wasm.v1.MsgMigrateContract":{aminoType:"wasm/MsgMigrateContract",toAmino:e=>{let{sender:t,contract:r,codeId:n,msg:o}=e;return{sender:t,contract:r,code_id:n.toString(),msg:JSON.parse((0,i.fromUtf8)(o))}},fromAmino:e=>{let{sender:t,contract:r,code_id:n,msg:o}=e;return{sender:t,contract:r,codeId:BigInt(n),msg:(0,i.toUtf8)(JSON.stringify(o))}}}}}t.accessTypeFromString=a,t.accessTypeToString=s,t.createWasmAminoConverters=l},40483:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isMsgExecuteEncodeObject=t.isMsgMigrateEncodeObject=t.isMsgClearAdminEncodeObject=t.isMsgUpdateAdminEncodeObject=t.isMsgInstantiateContract2EncodeObject=t.isMsgInstantiateContractEncodeObject=t.isMsgStoreCodeEncodeObject=t.wasmTypes=void 0;let n=r(88242);function i(e){return"/cosmwasm.wasm.v1.MsgStoreCode"===e.typeUrl}function o(e){return"/cosmwasm.wasm.v1.MsgInstantiateContract"===e.typeUrl}function a(e){return"/cosmwasm.wasm.v1.MsgInstantiateContract2"===e.typeUrl}function s(e){return"/cosmwasm.wasm.v1.MsgUpdateAdmin"===e.typeUrl}function l(e){return"/cosmwasm.wasm.v1.MsgClearAdmin"===e.typeUrl}function u(e){return"/cosmwasm.wasm.v1.MsgMigrateContract"===e.typeUrl}function d(e){return"/cosmwasm.wasm.v1.MsgExecuteContract"===e.typeUrl}t.wasmTypes=[["/cosmwasm.wasm.v1.MsgClearAdmin",n.MsgClearAdmin],["/cosmwasm.wasm.v1.MsgExecuteContract",n.MsgExecuteContract],["/cosmwasm.wasm.v1.MsgMigrateContract",n.MsgMigrateContract],["/cosmwasm.wasm.v1.MsgStoreCode",n.MsgStoreCode],["/cosmwasm.wasm.v1.MsgInstantiateContract",n.MsgInstantiateContract],["/cosmwasm.wasm.v1.MsgInstantiateContract2",n.MsgInstantiateContract2],["/cosmwasm.wasm.v1.MsgUpdateAdmin",n.MsgUpdateAdmin]],t.isMsgStoreCodeEncodeObject=i,t.isMsgInstantiateContractEncodeObject=o,t.isMsgInstantiateContract2EncodeObject=a,t.isMsgUpdateAdminEncodeObject=s,t.isMsgClearAdminEncodeObject=l,t.isMsgMigrateEncodeObject=u,t.isMsgExecuteEncodeObject=d},57457:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setupWasmExtension=void 0;let n=r(69721),i=r(58015),o=r(81371);function a(e){let t=(0,i.createProtobufRpcClient)(e),r=new o.QueryClientImpl(t);return{wasm:{listCodeInfo:async e=>{let t={pagination:(0,i.createPagination)(e)};return r.Codes(t)},getCode:async e=>{let t=o.QueryCodeRequest.fromPartial({codeId:BigInt(e)});return r.Code(t)},listContractsByCodeId:async(e,t)=>{let n=o.QueryContractsByCodeRequest.fromPartial({codeId:BigInt(e),pagination:(0,i.createPagination)(t)});return r.ContractsByCode(n)},listContractsByCreator:async(e,t)=>{let n={creatorAddress:e,pagination:(0,i.createPagination)(t)};return r.ContractsByCreator(n)},getContractInfo:async e=>{let t={address:e};return r.ContractInfo(t)},getContractCodeHistory:async(e,t)=>{let n={address:e,pagination:(0,i.createPagination)(t)};return r.ContractHistory(n)},getAllContractState:async(e,t)=>{let n={address:e,pagination:(0,i.createPagination)(t)};return r.AllContractState(n)},queryContractRaw:async(e,t)=>{let n={address:e,queryData:t};return r.RawContractState(n)},queryContractSmart:async(e,t)=>{let i;let o={address:e,queryData:(0,n.toUtf8)(JSON.stringify(t))},{data:a}=await r.SmartContractState(o);try{i=(0,n.fromUtf8)(a)}catch(e){throw Error("Could not UTF-8 decode smart query response from contract: ".concat(e))}try{return JSON.parse(i)}catch(e){throw Error("Could not JSON parse smart query response from contract: ".concat(e))}}}}}t.setupWasmExtension=a},1912:function(e,t,r){"use strict";var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.SigningCosmWasmClient=void 0;let i=r(83552),o=r(49400),a=r(69721),s=r(35801),l=r(18722),u=r(58015),d=r(43890),c=r(67357),p=r(53856),f=r(62884),h=r(2264),g=r(26136),m=r(88242),y=n(r(71821)),v=r(50992),b=r(31078);function S(e){return"Error when broadcasting tx ".concat(e.transactionHash," at height ").concat(e.height,". Code: ").concat(e.code,"; Raw log: ").concat(e.rawLog)}class w extends v.CosmWasmClient{static async connectWithSigner(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=await (0,d.connectComet)(e);return w.createWithSigner(n,t,r)}static async createWithSigner(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return new w(e,t,r)}static async offline(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new w(void 0,e,t)}async simulate(e,t,r){let n=t.map(e=>this.registry.encodeAsAny(e)),o=(await this.signer.getAccounts()).find(t=>t.address===e);if(!o)throw Error("Failed to retrieve account from signer");let a=(0,i.encodeSecp256k1Pubkey)(o.pubkey),{sequence:l}=await this.getSequence(e),{gasInfo:u}=await this.forceGetQueryClient().tx.simulate(n,r,a,l);return(0,c.assertDefined)(u),s.Uint53.fromString(u.gasUsed.toString()).toNumber()}async upload(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",i=arguments.length>4?arguments[4]:void 0,s=y.default.gzip(t,{level:9}),l={typeUrl:"/cosmwasm.wasm.v1.MsgStoreCode",value:m.MsgStoreCode.fromPartial({sender:e,wasmByteCode:s,instantiatePermission:i})},d="auto"==r?1.1:r,c=await this.signAndBroadcast(e,[l],d,n);if((0,u.isDeliverTxFailure)(c))throw Error(S(c));let p=u.logs.parseRawLog(c.rawLog),f=u.logs.findAttribute(p,"store_code","code_id");return{checksum:(0,a.toHex)((0,o.sha256)(t)),originalSize:t.length,compressedSize:s.length,codeId:Number.parseInt(f.value,10),logs:p,height:c.height,transactionHash:c.transactionHash,events:c.events,gasWanted:c.gasWanted,gasUsed:c.gasUsed}}async instantiate(e,t,r,n,i){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},l={typeUrl:"/cosmwasm.wasm.v1.MsgInstantiateContract",value:m.MsgInstantiateContract.fromPartial({sender:e,codeId:BigInt(new s.Uint53(t).toString()),label:n,msg:(0,a.toUtf8)(JSON.stringify(r)),funds:[...o.funds||[]],admin:o.admin})},d=await this.signAndBroadcast(e,[l],i,o.memo);if((0,u.isDeliverTxFailure)(d))throw Error(S(d));let c=u.logs.parseRawLog(d.rawLog);return{contractAddress:u.logs.findAttribute(c,"instantiate","_contract_address").value,logs:c,height:d.height,transactionHash:d.transactionHash,events:d.events,gasWanted:d.gasWanted,gasUsed:d.gasUsed}}async instantiate2(e,t,r,n,i,o){let l=arguments.length>6&&void 0!==arguments[6]?arguments[6]:{},d={typeUrl:"/cosmwasm.wasm.v1.MsgInstantiateContract2",value:m.MsgInstantiateContract2.fromPartial({sender:e,codeId:BigInt(new s.Uint53(t).toString()),label:i,msg:(0,a.toUtf8)(JSON.stringify(n)),funds:[...l.funds||[]],admin:l.admin,salt:r,fixMsg:!1})},c=await this.signAndBroadcast(e,[d],o,l.memo);if((0,u.isDeliverTxFailure)(c))throw Error(S(c));let p=u.logs.parseRawLog(c.rawLog);return{contractAddress:u.logs.findAttribute(p,"instantiate","_contract_address").value,logs:p,height:c.height,transactionHash:c.transactionHash,events:c.events,gasWanted:c.gasWanted,gasUsed:c.gasUsed}}async updateAdmin(e,t,r,n){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",o={typeUrl:"/cosmwasm.wasm.v1.MsgUpdateAdmin",value:m.MsgUpdateAdmin.fromPartial({sender:e,contract:t,newAdmin:r})},a=await this.signAndBroadcast(e,[o],n,i);if((0,u.isDeliverTxFailure)(a))throw Error(S(a));return{logs:u.logs.parseRawLog(a.rawLog),height:a.height,transactionHash:a.transactionHash,events:a.events,gasWanted:a.gasWanted,gasUsed:a.gasUsed}}async clearAdmin(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",i={typeUrl:"/cosmwasm.wasm.v1.MsgClearAdmin",value:m.MsgClearAdmin.fromPartial({sender:e,contract:t})},o=await this.signAndBroadcast(e,[i],r,n);if((0,u.isDeliverTxFailure)(o))throw Error(S(o));return{logs:u.logs.parseRawLog(o.rawLog),height:o.height,transactionHash:o.transactionHash,events:o.events,gasWanted:o.gasWanted,gasUsed:o.gasUsed}}async migrate(e,t,r,n,i){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"",l={typeUrl:"/cosmwasm.wasm.v1.MsgMigrateContract",value:m.MsgMigrateContract.fromPartial({sender:e,contract:t,codeId:BigInt(new s.Uint53(r).toString()),msg:(0,a.toUtf8)(JSON.stringify(n))})},d=await this.signAndBroadcast(e,[l],i,o);if((0,u.isDeliverTxFailure)(d))throw Error(S(d));return{logs:u.logs.parseRawLog(d.rawLog),height:d.height,transactionHash:d.transactionHash,events:d.events,gasWanted:d.gasWanted,gasUsed:d.gasUsed}}async execute(e,t,r,n){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",o=arguments.length>5?arguments[5]:void 0,a={contractAddress:t,msg:r,funds:o};return this.executeMultiple(e,[a],n,i)}async executeMultiple(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",i=t.map(t=>({typeUrl:"/cosmwasm.wasm.v1.MsgExecuteContract",value:m.MsgExecuteContract.fromPartial({sender:e,contract:t.contractAddress,msg:(0,a.toUtf8)(JSON.stringify(t.msg)),funds:[...t.funds||[]]})})),o=await this.signAndBroadcast(e,i,r,n);if((0,u.isDeliverTxFailure)(o))throw Error(S(o));return{logs:u.logs.parseRawLog(o.rawLog),height:o.height,transactionHash:o.transactionHash,events:o.events,gasWanted:o.gasWanted,gasUsed:o.gasUsed}}async sendTokens(e,t,r,n){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",o={typeUrl:"/cosmos.bank.v1beta1.MsgSend",value:{fromAddress:e,toAddress:t,amount:[...r]}};return this.signAndBroadcast(e,[o],n,i)}async delegateTokens(e,t,r,n){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",o={typeUrl:"/cosmos.staking.v1beta1.MsgDelegate",value:f.MsgDelegate.fromPartial({delegatorAddress:e,validatorAddress:t,amount:r})};return this.signAndBroadcast(e,[o],n,i)}async undelegateTokens(e,t,r,n){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",o={typeUrl:"/cosmos.staking.v1beta1.MsgUndelegate",value:f.MsgUndelegate.fromPartial({delegatorAddress:e,validatorAddress:t,amount:r})};return this.signAndBroadcast(e,[o],n,i)}async withdrawRewards(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",i={typeUrl:"/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward",value:p.MsgWithdrawDelegatorReward.fromPartial({delegatorAddress:e,validatorAddress:t})};return this.signAndBroadcast(e,[i],r,n)}async signAndBroadcast(e,t,r){let n,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=arguments.length>4?arguments[4]:void 0;if("auto"==r||"number"==typeof r){(0,c.assertDefined)(this.gasPrice,"Gas price must be set in the client options when auto gas is used.");let o=await this.simulate(e,t,i),a="number"==typeof r?r:1.4;n=(0,u.calculateFee)(Math.round(o*a),this.gasPrice)}else n=r;let a=await this.sign(e,t,n,i,void 0,o),s=g.TxRaw.encode(a).finish();return this.broadcastTx(s,this.broadcastTimeoutMs,this.broadcastPollIntervalMs)}async signAndBroadcastSync(e,t,r){let n,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=arguments.length>4?arguments[4]:void 0;if("auto"==r||"number"==typeof r){(0,c.assertDefined)(this.gasPrice,"Gas price must be set in the client options when auto gas is used.");let o=await this.simulate(e,t,i),a="number"==typeof r?r:1.3;n=(0,u.calculateFee)(Math.round(o*a),this.gasPrice)}else n=r;let a=await this.sign(e,t,n,i,void 0,o),s=g.TxRaw.encode(a).finish();return this.broadcastTxSync(s)}async sign(e,t,r,n,i,o){let a;if(i)a=i;else{let{accountNumber:t,sequence:r}=await this.getSequence(e);a={accountNumber:t,sequence:r,chainId:await this.getChainId()}}return(0,l.isOfflineDirectSigner)(this.signer)?this.signDirect(e,t,r,n,a,o):this.signAmino(e,t,r,n,a,o)}async signAmino(e,t,r,n,o,u){let{accountNumber:d,sequence:p,chainId:f}=o;(0,c.assert)(!(0,l.isOfflineDirectSigner)(this.signer));let m=(await this.signer.getAccounts()).find(t=>t.address===e);if(!m)throw Error("Failed to retrieve account from signer");let y=(0,l.encodePubkey)((0,i.encodeSecp256k1Pubkey)(m.pubkey)),v=h.SignMode.SIGN_MODE_LEGACY_AMINO_JSON,b=t.map(e=>this.aminoTypes.toAmino(e)),S=(0,i.makeSignDoc)(b,r,f,n,d,p,u),{signature:w,signed:_}=await this.signer.signAmino(e,S),k={typeUrl:"/cosmos.tx.v1beta1.TxBody",value:{messages:_.msgs.map(e=>this.aminoTypes.fromAmino(e)),memo:_.memo,timeoutHeight:u}},O=this.registry.encode(k),P=s.Int53.fromString(_.fee.gas).toNumber(),A=s.Int53.fromString(_.sequence).toNumber(),I=(0,l.makeAuthInfoBytes)([{pubkey:y,sequence:A}],_.fee.amount,P,_.fee.granter,_.fee.payer,v);return g.TxRaw.fromPartial({bodyBytes:O,authInfoBytes:I,signatures:[(0,a.fromBase64)(w.signature)]})}async signDirect(e,t,r,n,o,u){let{accountNumber:d,sequence:p,chainId:f}=o;(0,c.assert)((0,l.isOfflineDirectSigner)(this.signer));let h=(await this.signer.getAccounts()).find(t=>t.address===e);if(!h)throw Error("Failed to retrieve account from signer");let m=(0,l.encodePubkey)((0,i.encodeSecp256k1Pubkey)(h.pubkey)),y={typeUrl:"/cosmos.tx.v1beta1.TxBody",value:{messages:t,memo:n,timeoutHeight:u}},v=this.registry.encode(y),b=s.Int53.fromString(r.gas).toNumber(),S=(0,l.makeAuthInfoBytes)([{pubkey:m,sequence:p}],r.amount,b,r.granter,r.payer),w=(0,l.makeSignDoc)(v,S,f,d),{signature:_,signed:k}=await this.signer.signDirect(e,w);return g.TxRaw.fromPartial({bodyBytes:k.bodyBytes,authInfoBytes:k.authInfoBytes,signatures:[(0,a.fromBase64)(_.signature)]})}constructor(e,t,r){super(e);let{registry:n=new l.Registry([...u.defaultRegistryTypes,...b.wasmTypes]),aminoTypes:i=new u.AminoTypes({...(0,u.createDefaultAminoConverters)(),...(0,b.createWasmAminoConverters)()})}=r;this.registry=n,this.aminoTypes=i,this.signer=t,this.broadcastTimeoutMs=r.broadcastTimeoutMs,this.broadcastPollIntervalMs=r.broadcastPollIntervalMs,this.gasPrice=r.gasPrice}}t.SigningCosmWasmClient=w},80567:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Bip39=t.EnglishMnemonic=t.mnemonicToEntropy=t.entropyToMnemonic=void 0;let n=r(69721),i=r(49379),o=r(68259),a=["abandon","ability","able","about","above","absent","absorb","abstract","absurd","abuse","access","accident","account","accuse","achieve","acid","acoustic","acquire","across","act","action","actor","actress","actual","adapt","add","addict","address","adjust","admit","adult","advance","advice","aerobic","affair","afford","afraid","again","age","agent","agree","ahead","aim","air","airport","aisle","alarm","album","alcohol","alert","alien","all","alley","allow","almost","alone","alpha","already","also","alter","always","amateur","amazing","among","amount","amused","analyst","anchor","ancient","anger","angle","angry","animal","ankle","announce","annual","another","answer","antenna","antique","anxiety","any","apart","apology","appear","apple","approve","april","arch","arctic","area","arena","argue","arm","armed","armor","army","around","arrange","arrest","arrive","arrow","art","artefact","artist","artwork","ask","aspect","assault","asset","assist","assume","asthma","athlete","atom","attack","attend","attitude","attract","auction","audit","august","aunt","author","auto","autumn","average","avocado","avoid","awake","aware","away","awesome","awful","awkward","axis","baby","bachelor","bacon","badge","bag","balance","balcony","ball","bamboo","banana","banner","bar","barely","bargain","barrel","base","basic","basket","battle","beach","bean","beauty","because","become","beef","before","begin","behave","behind","believe","below","belt","bench","benefit","best","betray","better","between","beyond","bicycle","bid","bike","bind","biology","bird","birth","bitter","black","blade","blame","blanket","blast","bleak","bless","blind","blood","blossom","blouse","blue","blur","blush","board","boat","body","boil","bomb","bone","bonus","book","boost","border","boring","borrow","boss","bottom","bounce","box","boy","bracket","brain","brand","brass","brave","bread","breeze","brick","bridge","brief","bright","bring","brisk","broccoli","broken","bronze","broom","brother","brown","brush","bubble","buddy","budget","buffalo","build","bulb","bulk","bullet","bundle","bunker","burden","burger","burst","bus","business","busy","butter","buyer","buzz","cabbage","cabin","cable","cactus","cage","cake","call","calm","camera","camp","can","canal","cancel","candy","cannon","canoe","canvas","canyon","capable","capital","captain","car","carbon","card","cargo","carpet","carry","cart","case","cash","casino","castle","casual","cat","catalog","catch","category","cattle","caught","cause","caution","cave","ceiling","celery","cement","census","century","cereal","certain","chair","chalk","champion","change","chaos","chapter","charge","chase","chat","cheap","check","cheese","chef","cherry","chest","chicken","chief","child","chimney","choice","choose","chronic","chuckle","chunk","churn","cigar","cinnamon","circle","citizen","city","civil","claim","clap","clarify","claw","clay","clean","clerk","clever","click","client","cliff","climb","clinic","clip","clock","clog","close","cloth","cloud","clown","club","clump","cluster","clutch","coach","coast","coconut","code","coffee","coil","coin","collect","color","column","combine","come","comfort","comic","common","company","concert","conduct","confirm","congress","connect","consider","control","convince","cook","cool","copper","copy","coral","core","corn","correct","cost","cotton","couch","country","couple","course","cousin","cover","coyote","crack","cradle","craft","cram","crane","crash","crater","crawl","crazy","cream","credit","creek","crew","cricket","crime","crisp","critic","crop","cross","crouch","crowd","crucial","cruel","cruise","crumble","crunch","crush","cry","crystal","cube","culture","cup","cupboard","curious","current","curtain","curve","cushion","custom","cute","cycle","dad","damage","damp","dance","danger","daring","dash","daughter","dawn","day","deal","debate","debris","decade","december","decide","decline","decorate","decrease","deer","defense","define","defy","degree","delay","deliver","demand","demise","denial","dentist","deny","depart","depend","deposit","depth","deputy","derive","describe","desert","design","desk","despair","destroy","detail","detect","develop","device","devote","diagram","dial","diamond","diary","dice","diesel","diet","differ","digital","dignity","dilemma","dinner","dinosaur","direct","dirt","disagree","discover","disease","dish","dismiss","disorder","display","distance","divert","divide","divorce","dizzy","doctor","document","dog","doll","dolphin","domain","donate","donkey","donor","door","dose","double","dove","draft","dragon","drama","drastic","draw","dream","dress","drift","drill","drink","drip","drive","drop","drum","dry","duck","dumb","dune","during","dust","dutch","duty","dwarf","dynamic","eager","eagle","early","earn","earth","easily","east","easy","echo","ecology","economy","edge","edit","educate","effort","egg","eight","either","elbow","elder","electric","elegant","element","elephant","elevator","elite","else","embark","embody","embrace","emerge","emotion","employ","empower","empty","enable","enact","end","endless","endorse","enemy","energy","enforce","engage","engine","enhance","enjoy","enlist","enough","enrich","enroll","ensure","enter","entire","entry","envelope","episode","equal","equip","era","erase","erode","erosion","error","erupt","escape","essay","essence","estate","eternal","ethics","evidence","evil","evoke","evolve","exact","example","excess","exchange","excite","exclude","excuse","execute","exercise","exhaust","exhibit","exile","exist","exit","exotic","expand","expect","expire","explain","expose","express","extend","extra","eye","eyebrow","fabric","face","faculty","fade","faint","faith","fall","false","fame","family","famous","fan","fancy","fantasy","farm","fashion","fat","fatal","father","fatigue","fault","favorite","feature","february","federal","fee","feed","feel","female","fence","festival","fetch","fever","few","fiber","fiction","field","figure","file","film","filter","final","find","fine","finger","finish","fire","firm","first","fiscal","fish","fit","fitness","fix","flag","flame","flash","flat","flavor","flee","flight","flip","float","flock","floor","flower","fluid","flush","fly","foam","focus","fog","foil","fold","follow","food","foot","force","forest","forget","fork","fortune","forum","forward","fossil","foster","found","fox","fragile","frame","frequent","fresh","friend","fringe","frog","front","frost","frown","frozen","fruit","fuel","fun","funny","furnace","fury","future","gadget","gain","galaxy","gallery","game","gap","garage","garbage","garden","garlic","garment","gas","gasp","gate","gather","gauge","gaze","general","genius","genre","gentle","genuine","gesture","ghost","giant","gift","giggle","ginger","giraffe","girl","give","glad","glance","glare","glass","glide","glimpse","globe","gloom","glory","glove","glow","glue","goat","goddess","gold","good","goose","gorilla","gospel","gossip","govern","gown","grab","grace","grain","grant","grape","grass","gravity","great","green","grid","grief","grit","grocery","group","grow","grunt","guard","guess","guide","guilt","guitar","gun","gym","habit","hair","half","hammer","hamster","hand","happy","harbor","hard","harsh","harvest","hat","have","hawk","hazard","head","health","heart","heavy","hedgehog","height","hello","helmet","help","hen","hero","hidden","high","hill","hint","hip","hire","history","hobby","hockey","hold","hole","holiday","hollow","home","honey","hood","hope","horn","horror","horse","hospital","host","hotel","hour","hover","hub","huge","human","humble","humor","hundred","hungry","hunt","hurdle","hurry","hurt","husband","hybrid","ice","icon","idea","identify","idle","ignore","ill","illegal","illness","image","imitate","immense","immune","impact","impose","improve","impulse","inch","include","income","increase","index","indicate","indoor","industry","infant","inflict","inform","inhale","inherit","initial","inject","injury","inmate","inner","innocent","input","inquiry","insane","insect","inside","inspire","install","intact","interest","into","invest","invite","involve","iron","island","isolate","issue","item","ivory","jacket","jaguar","jar","jazz","jealous","jeans","jelly","jewel","job","join","joke","journey","joy","judge","juice","jump","jungle","junior","junk","just","kangaroo","keen","keep","ketchup","key","kick","kid","kidney","kind","kingdom","kiss","kit","kitchen","kite","kitten","kiwi","knee","knife","knock","know","lab","label","labor","ladder","lady","lake","lamp","language","laptop","large","later","latin","laugh","laundry","lava","law","lawn","lawsuit","layer","lazy","leader","leaf","learn","leave","lecture","left","leg","legal","legend","leisure","lemon","lend","length","lens","leopard","lesson","letter","level","liar","liberty","library","license","life","lift","light","like","limb","limit","link","lion","liquid","list","little","live","lizard","load","loan","lobster","local","lock","logic","lonely","long","loop","lottery","loud","lounge","love","loyal","lucky","luggage","lumber","lunar","lunch","luxury","lyrics","machine","mad","magic","magnet","maid","mail","main","major","make","mammal","man","manage","mandate","mango","mansion","manual","maple","marble","march","margin","marine","market","marriage","mask","mass","master","match","material","math","matrix","matter","maximum","maze","meadow","mean","measure","meat","mechanic","medal","media","melody","melt","member","memory","mention","menu","mercy","merge","merit","merry","mesh","message","metal","method","middle","midnight","milk","million","mimic","mind","minimum","minor","minute","miracle","mirror","misery","miss","mistake","mix","mixed","mixture","mobile","model","modify","mom","moment","monitor","monkey","monster","month","moon","moral","more","morning","mosquito","mother","motion","motor","mountain","mouse","move","movie","much","muffin","mule","multiply","muscle","museum","mushroom","music","must","mutual","myself","mystery","myth","naive","name","napkin","narrow","nasty","nation","nature","near","neck","need","negative","neglect","neither","nephew","nerve","nest","net","network","neutral","never","news","next","nice","night","noble","noise","nominee","noodle","normal","north","nose","notable","note","nothing","notice","novel","now","nuclear","number","nurse","nut","oak","obey","object","oblige","obscure","observe","obtain","obvious","occur","ocean","october","odor","off","offer","office","often","oil","okay","old","olive","olympic","omit","once","one","onion","online","only","open","opera","opinion","oppose","option","orange","orbit","orchard","order","ordinary","organ","orient","original","orphan","ostrich","other","outdoor","outer","output","outside","oval","oven","over","own","owner","oxygen","oyster","ozone","pact","paddle","page","pair","palace","palm","panda","panel","panic","panther","paper","parade","parent","park","parrot","party","pass","patch","path","patient","patrol","pattern","pause","pave","payment","peace","peanut","pear","peasant","pelican","pen","penalty","pencil","people","pepper","perfect","permit","person","pet","phone","photo","phrase","physical","piano","picnic","picture","piece","pig","pigeon","pill","pilot","pink","pioneer","pipe","pistol","pitch","pizza","place","planet","plastic","plate","play","please","pledge","pluck","plug","plunge","poem","poet","point","polar","pole","police","pond","pony","pool","popular","portion","position","possible","post","potato","pottery","poverty","powder","power","practice","praise","predict","prefer","prepare","present","pretty","prevent","price","pride","primary","print","priority","prison","private","prize","problem","process","produce","profit","program","project","promote","proof","property","prosper","protect","proud","provide","public","pudding","pull","pulp","pulse","pumpkin","punch","pupil","puppy","purchase","purity","purpose","purse","push","put","puzzle","pyramid","quality","quantum","quarter","question","quick","quit","quiz","quote","rabbit","raccoon","race","rack","radar","radio","rail","rain","raise","rally","ramp","ranch","random","range","rapid","rare","rate","rather","raven","raw","razor","ready","real","reason","rebel","rebuild","recall","receive","recipe","record","recycle","reduce","reflect","reform","refuse","region","regret","regular","reject","relax","release","relief","rely","remain","remember","remind","remove","render","renew","rent","reopen","repair","repeat","replace","report","require","rescue","resemble","resist","resource","response","result","retire","retreat","return","reunion","reveal","review","reward","rhythm","rib","ribbon","rice","rich","ride","ridge","rifle","right","rigid","ring","riot","ripple","risk","ritual","rival","river","road","roast","robot","robust","rocket","romance","roof","rookie","room","rose","rotate","rough","round","route","royal","rubber","rude","rug","rule","run","runway","rural","sad","saddle","sadness","safe","sail","salad","salmon","salon","salt","salute","same","sample","sand","satisfy","satoshi","sauce","sausage","save","say","scale","scan","scare","scatter","scene","scheme","school","science","scissors","scorpion","scout","scrap","screen","script","scrub","sea","search","season","seat","second","secret","section","security","seed","seek","segment","select","sell","seminar","senior","sense","sentence","series","service","session","settle","setup","seven","shadow","shaft","shallow","share","shed","shell","sheriff","shield","shift","shine","ship","shiver","shock","shoe","shoot","shop","short","shoulder","shove","shrimp","shrug","shuffle","shy","sibling","sick","side","siege","sight","sign","silent","silk","silly","silver","similar","simple","since","sing","siren","sister","situate","six","size","skate","sketch","ski","skill","skin","skirt","skull","slab","slam","sleep","slender","slice","slide","slight","slim","slogan","slot","slow","slush","small","smart","smile","smoke","smooth","snack","snake","snap","sniff","snow","soap","soccer","social","sock","soda","soft","solar","soldier","solid","solution","solve","someone","song","soon","sorry","sort","soul","sound","soup","source","south","space","spare","spatial","spawn","speak","special","speed","spell","spend","sphere","spice","spider","spike","spin","spirit","split","spoil","sponsor","spoon","sport","spot","spray","spread","spring","spy","square","squeeze","squirrel","stable","stadium","staff","stage","stairs","stamp","stand","start","state","stay","steak","steel","stem","step","stereo","stick","still","sting","stock","stomach","stone","stool","story","stove","strategy","street","strike","strong","struggle","student","stuff","stumble","style","subject","submit","subway","success","such","sudden","suffer","sugar","suggest","suit","summer","sun","sunny","sunset","super","supply","supreme","sure","surface","surge","surprise","surround","survey","suspect","sustain","swallow","swamp","swap","swarm","swear","sweet","swift","swim","swing","switch","sword","symbol","symptom","syrup","system","table","tackle","tag","tail","talent","talk","tank","tape","target","task","taste","tattoo","taxi","teach","team","tell","ten","tenant","tennis","tent","term","test","text","thank","that","theme","then","theory","there","they","thing","this","thought","three","thrive","throw","thumb","thunder","ticket","tide","tiger","tilt","timber","time","tiny","tip","tired","tissue","title","toast","tobacco","today","toddler","toe","together","toilet","token","tomato","tomorrow","tone","tongue","tonight","tool","tooth","top","topic","topple","torch","tornado","tortoise","toss","total","tourist","toward","tower","town","toy","track","trade","traffic","tragic","train","transfer","trap","trash","travel","tray","treat","tree","trend","trial","tribe","trick","trigger","trim","trip","trophy","trouble","truck","true","truly","trumpet","trust","truth","try","tube","tuition","tumble","tuna","tunnel","turkey","turn","turtle","twelve","twenty","twice","twin","twist","two","type","typical","ugly","umbrella","unable","unaware","uncle","uncover","under","undo","unfair","unfold","unhappy","uniform","unique","unit","universe","unknown","unlock","until","unusual","unveil","update","upgrade","uphold","upon","upper","upset","urban","urge","usage","use","used","useful","useless","usual","utility","vacant","vacuum","vague","valid","valley","valve","van","vanish","vapor","various","vast","vault","vehicle","velvet","vendor","venture","venue","verb","verify","version","very","vessel","veteran","viable","vibrant","vicious","victory","video","view","village","vintage","violin","virtual","virus","visa","visit","visual","vital","vivid","vocal","voice","void","volcano","volume","vote","voyage","wage","wagon","wait","walk","wall","walnut","want","warfare","warm","warrior","wash","wasp","waste","water","wave","way","wealth","weapon","wear","weasel","weather","web","wedding","weekend","weird","welcome","west","wet","whale","what","wheat","wheel","when","where","whip","whisper","wide","width","wife","wild","will","win","window","wine","wing","wink","winner","winter","wire","wisdom","wise","wish","witness","wolf","woman","wonder","wood","wool","word","work","world","worry","worth","wrap","wreck","wrestle","wrist","write","wrong","yard","year","yellow","you","young","youth","zebra","zero","zone","zoo"];function s(e){return Array.from(e).map(e=>e.toString(2).padStart(8,"0")).join("")}function l(e){let t=8*e.length/32;return s((0,o.sha256)(e)).slice(0,t)}function u(e){return parseInt(e,2)}let d=[16,20,24,28,32],c=[12,15,18,21,24];function p(e){if(-1===d.indexOf(e.length))throw Error("invalid input length");return(s(e)+l(e)).match(/(.{11})/g).map(e=>a[u(e)]).join(" ")}t.entropyToMnemonic=p;let f="Invalid number of words",h="Found word that is not in the wordlist",g="Invalid entropy",m="Invalid mnemonic checksum";function y(e){return e.normalize("NFKD")}function v(e){let t=y(e).split(" ");if(!c.includes(t.length))throw Error(f);let r=t.map(e=>{let t=a.indexOf(e);if(-1===t)throw Error(h);return t.toString(2).padStart(11,"0")}).join(""),n=32*Math.floor(r.length/33),i=r.slice(0,n),o=r.slice(n),s=i.match(/(.{1,8})/g).map(u);if(s.length<16||s.length>32||s.length%4!=0)throw Error(g);let d=Uint8Array.from(s);if(l(d)!==o)throw Error(m);return d}t.mnemonicToEntropy=v;class b{toString(){return this.data}constructor(e){if(!b.mnemonicMatcher.test(e))throw Error("Invalid mnemonic format");let t=e.split(" "),r=[12,15,18,21,24];if(-1===r.indexOf(t.length))throw Error("Invalid word count in mnemonic (allowed: ".concat(r," got: ").concat(t.length,")"));for(let e of t)if(-1===b.wordlist.indexOf(e))throw Error("Mnemonic contains invalid word");v(e),this.data=e}}t.EnglishMnemonic=b,b.wordlist=a,b.mnemonicMatcher=/^[a-z]+( [a-z]+)*$/;class S{static encode(e){return new b(p(e))}static decode(e){return v(e.toString())}static async mnemonicToSeed(e,t){let r=(0,n.toUtf8)(y(e.toString())),o="mnemonic"+(t?y(t):""),a=(0,n.toUtf8)(o);return(0,i.pbkdf2Sha512)(r,a,2048,64)}}t.Bip39=S},44256:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Hmac=void 0;class r{update(e){return this.messageHasher.update(e),this}digest(){let e=this.messageHasher.digest();return this.hash(new Uint8Array([...this.oKeyPad,...e]))}constructor(e,t){let r=new e().blockSize;this.hash=t=>new e().update(t).digest();let n=t;if(n.length>r&&(n=this.hash(n)),n.length92^e),this.iKeyPad=n.map(e=>54^e),this.messageHasher=new e,this.blockSize=r,this.update(this.iKeyPad)}}t.Hmac=r},49400:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.stringToPath=t.Slip10RawIndex=t.slip10CurveFromString=t.Slip10Curve=t.Slip10=t.pathToString=t.sha512=t.Sha512=t.sha256=t.Sha256=t.Secp256k1Signature=t.ExtendedSecp256k1Signature=t.Secp256k1=t.ripemd160=t.Ripemd160=t.Random=t.Xchacha20poly1305Ietf=t.xchacha20NonceLength=t.isArgon2idOptions=t.Ed25519Keypair=t.Ed25519=t.Argon2id=t.keccak256=t.Keccak256=t.Hmac=t.EnglishMnemonic=t.Bip39=void 0;var n=r(80567);Object.defineProperty(t,"Bip39",{enumerable:!0,get:function(){return n.Bip39}}),Object.defineProperty(t,"EnglishMnemonic",{enumerable:!0,get:function(){return n.EnglishMnemonic}});var i=r(44256);Object.defineProperty(t,"Hmac",{enumerable:!0,get:function(){return i.Hmac}});var o=r(61679);Object.defineProperty(t,"Keccak256",{enumerable:!0,get:function(){return o.Keccak256}}),Object.defineProperty(t,"keccak256",{enumerable:!0,get:function(){return o.keccak256}});var a=r(50653);Object.defineProperty(t,"Argon2id",{enumerable:!0,get:function(){return a.Argon2id}}),Object.defineProperty(t,"Ed25519",{enumerable:!0,get:function(){return a.Ed25519}}),Object.defineProperty(t,"Ed25519Keypair",{enumerable:!0,get:function(){return a.Ed25519Keypair}}),Object.defineProperty(t,"isArgon2idOptions",{enumerable:!0,get:function(){return a.isArgon2idOptions}}),Object.defineProperty(t,"xchacha20NonceLength",{enumerable:!0,get:function(){return a.xchacha20NonceLength}}),Object.defineProperty(t,"Xchacha20poly1305Ietf",{enumerable:!0,get:function(){return a.Xchacha20poly1305Ietf}});var s=r(40239);Object.defineProperty(t,"Random",{enumerable:!0,get:function(){return s.Random}});var l=r(87973);Object.defineProperty(t,"Ripemd160",{enumerable:!0,get:function(){return l.Ripemd160}}),Object.defineProperty(t,"ripemd160",{enumerable:!0,get:function(){return l.ripemd160}});var u=r(60951);Object.defineProperty(t,"Secp256k1",{enumerable:!0,get:function(){return u.Secp256k1}});var d=r(104);Object.defineProperty(t,"ExtendedSecp256k1Signature",{enumerable:!0,get:function(){return d.ExtendedSecp256k1Signature}}),Object.defineProperty(t,"Secp256k1Signature",{enumerable:!0,get:function(){return d.Secp256k1Signature}});var c=r(68259);Object.defineProperty(t,"Sha256",{enumerable:!0,get:function(){return c.Sha256}}),Object.defineProperty(t,"sha256",{enumerable:!0,get:function(){return c.sha256}}),Object.defineProperty(t,"Sha512",{enumerable:!0,get:function(){return c.Sha512}}),Object.defineProperty(t,"sha512",{enumerable:!0,get:function(){return c.sha512}});var p=r(68697);Object.defineProperty(t,"pathToString",{enumerable:!0,get:function(){return p.pathToString}}),Object.defineProperty(t,"Slip10",{enumerable:!0,get:function(){return p.Slip10}}),Object.defineProperty(t,"Slip10Curve",{enumerable:!0,get:function(){return p.Slip10Curve}}),Object.defineProperty(t,"slip10CurveFromString",{enumerable:!0,get:function(){return p.slip10CurveFromString}}),Object.defineProperty(t,"Slip10RawIndex",{enumerable:!0,get:function(){return p.Slip10RawIndex}}),Object.defineProperty(t,"stringToPath",{enumerable:!0,get:function(){return p.stringToPath}})},61679:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.keccak256=t.Keccak256=void 0;let n=r(3141),i=r(67356);class o{update(e){return this.impl.update((0,i.toRealUint8Array)(e)),this}digest(){return this.impl.digest()}constructor(e){this.blockSize=64,this.impl=n.keccak_256.create(),e&&this.update(e)}}function a(e){return new o(e).digest()}t.Keccak256=o,t.keccak256=a},50653:function(e,t,r){"use strict";var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Xchacha20poly1305Ietf=t.xchacha20NonceLength=t.Ed25519=t.Ed25519Keypair=t.Argon2id=t.isArgon2idOptions=void 0;let i=r(67357),o=n(r(63615));function a(e){return!!(0,i.isNonNullObject)(e)&&"number"==typeof e.outputLength&&"number"==typeof e.opsLimit&&"number"==typeof e.memLimitKib}t.isArgon2idOptions=a;class s{static async execute(e,t,r){return await o.default.ready,o.default.crypto_pwhash(r.outputLength,e,t,r.opsLimit,1024*r.memLimitKib,o.default.crypto_pwhash_ALG_ARGON2ID13)}}t.Argon2id=s;class l{static fromLibsodiumPrivkey(e){if(64!==e.length)throw Error("Unexpected key length ".concat(e.length,". Must be 64."));return new l(e.slice(0,32),e.slice(32,64))}toLibsodiumPrivkey(){return new Uint8Array([...this.privkey,...this.pubkey])}constructor(e,t){this.privkey=e,this.pubkey=t}}t.Ed25519Keypair=l;class u{static async makeKeypair(e){await o.default.ready;let t=o.default.crypto_sign_seed_keypair(e);return l.fromLibsodiumPrivkey(t.privateKey)}static async createSignature(e,t){return await o.default.ready,o.default.crypto_sign_detached(e,t.toLibsodiumPrivkey())}static async verifySignature(e,t,r){return await o.default.ready,o.default.crypto_sign_verify_detached(e,t,r)}}t.Ed25519=u,t.xchacha20NonceLength=24;class d{static async encrypt(e,t,r){await o.default.ready;let n=null;return o.default.crypto_aead_xchacha20poly1305_ietf_encrypt(e,n,null,r,t)}static async decrypt(e,t,r){await o.default.ready;let n=null;return o.default.crypto_aead_xchacha20poly1305_ietf_decrypt(null,e,n,r,t)}}t.Xchacha20poly1305Ietf=d},49379:function(e,t,r){"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.pbkdf2Sha512=t.pbkdf2Sha512Noble=t.pbkdf2Sha512NodeCrypto=t.pbkdf2Sha512Subtle=t.getSubtle=t.getNodeCrypto=void 0;let a=r(67357),s=r(78496),l=r(93996);async function u(){try{let e=await Promise.resolve().then(()=>o(r(27815)));if("object"==typeof e&&Object.keys(e).length<=1)return;return e}catch(e){return}}async function d(){var e,t,r,n,i;let o=null===(t=globalThis)||void 0===t?void 0:null===(e=t.crypto)||void 0===e?void 0:e.subtle;return o||(o=null===(i=globalThis)||void 0===i?void 0:null===(n=i.crypto)||void 0===n?void 0:null===(r=n.webcrypto)||void 0===r?void 0:r.subtle),o}async function c(e,t,r,n,i){return(0,a.assert)(e,"Argument subtle is falsy"),(0,a.assert)("object"==typeof e,"Argument subtle is not of type object"),(0,a.assert)("function"==typeof e.importKey,"subtle.importKey is not a function"),(0,a.assert)("function"==typeof e.deriveBits,"subtle.deriveBits is not a function"),e.importKey("raw",t,{name:"PBKDF2"},!1,["deriveBits"]).then(t=>e.deriveBits({name:"PBKDF2",salt:r,iterations:n,hash:{name:"SHA-512"}},t,8*i).then(e=>new Uint8Array(e)))}async function p(e,t,r,n,i){return(0,a.assert)(e,"Argument nodeCrypto is falsy"),(0,a.assert)("object"==typeof e,"Argument nodeCrypto is not of type object"),(0,a.assert)("function"==typeof e.pbkdf2,"nodeCrypto.pbkdf2 is not a function"),new Promise((o,a)=>{e.pbkdf2(t,r,n,i,"sha512",(e,t)=>{e?a(e):o(Uint8Array.from(t))})})}async function f(e,t,r,n){return(0,s.pbkdf2Async)(l.sha512,e,t,{c:r,dkLen:n})}async function h(e,t,r,n){let i=await d();if(i)return c(i,e,t,r,n);{let i=await u();return i?p(i,e,t,r,n):f(e,t,r,n)}}t.getNodeCrypto=u,t.getSubtle=d,t.pbkdf2Sha512Subtle=c,t.pbkdf2Sha512NodeCrypto=p,t.pbkdf2Sha512Noble=f,t.pbkdf2Sha512=h},40239:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Random=void 0;class n{static getBytes(e){try{let t=window,r=void 0!==t.crypto?t.crypto:t.msCrypto,n=new Uint8Array(e);return r.getRandomValues(n),n}catch(t){try{let t=r(27815);return new Uint8Array([...t.randomBytes(e)])}catch(e){throw Error("No secure random number generator found")}}}}t.Random=n},87973:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ripemd160=t.Ripemd160=void 0;let n=r(33573),i=r(67356);class o{update(e){return this.impl.update((0,i.toRealUint8Array)(e)),this}digest(){return this.impl.digest()}constructor(e){this.blockSize=64,this.impl=n.ripemd160.create(),e&&this.update(e)}}function a(e){return new o(e).digest()}t.Ripemd160=o,t.ripemd160=a},60951:function(e,t,r){"use strict";var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Secp256k1=void 0;let i=r(69721),o=n(r(34108)),a=n(r(23254)),s=r(104),l=new a.default.ec("secp256k1"),u=new o.default("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141","hex");class d{static async makeKeypair(e){if(32!==e.length)throw Error("input data is not a valid secp256k1 private key");let t=l.keyFromPrivate(e);if(!0!==t.validate().result||new o.default(e).gte(u))throw Error("input data is not a valid secp256k1 private key");return{privkey:(0,i.fromHex)(t.getPrivate("hex")),pubkey:Uint8Array.from(t.getPublic("array"))}}static async createSignature(e,t){if(0===e.length)throw Error("Message hash must not be empty");if(e.length>32)throw Error("Message hash length must not exceed 32 bytes");let{r,s:n,recoveryParam:i}=l.keyFromPrivate(t).sign(e,{canonical:!0});if("number"!=typeof i)throw Error("Recovery param missing");return new s.ExtendedSecp256k1Signature(Uint8Array.from(r.toArray()),Uint8Array.from(n.toArray()),i)}static async verifySignature(e,t,r){if(0===t.length)throw Error("Message hash must not be empty");if(t.length>32)throw Error("Message hash length must not exceed 32 bytes");let n=l.keyFromPublic(r);try{return n.verify(t,e.toDer())}catch(e){return!1}}static recoverPubkey(e,t){let r={r:(0,i.toHex)(e.r()),s:(0,i.toHex)(e.s())},n=l.recoverPubKey(t,r,e.recovery),o=l.keyFromPublic(n);return(0,i.fromHex)(o.getPublic(!1,"hex"))}static compressPubkey(e){switch(e.length){case 33:return e;case 65:return Uint8Array.from(l.keyFromPublic(e).getPublic(!0,"array"));default:throw Error("Invalid pubkey length")}}static uncompressPubkey(e){switch(e.length){case 33:return Uint8Array.from(l.keyFromPublic(e).getPublic(!1,"array"));case 65:return e;default:throw Error("Invalid pubkey length")}}static trimRecoveryByte(e){switch(e.length){case 64:return e;case 65:return e.slice(0,64);default:throw Error("Invalid signature length")}}}t.Secp256k1=d},104:function(e,t){"use strict";function r(e){let t=0;for(let r of e)if(0===r)t++;else break;return e.slice(t)}Object.defineProperty(t,"__esModule",{value:!0}),t.ExtendedSecp256k1Signature=t.Secp256k1Signature=void 0;let n=2;class i{static fromFixedLength(e){if(64!==e.length)throw Error("Got invalid data length: ".concat(e.length,". Expected 2x 32 bytes for the pair (r, s)"));return new i(r(e.slice(0,32)),r(e.slice(32,64)))}static fromDer(e){let t=0;if(48!==e[t++])throw Error("Prefix 0x30 expected");let o=e[t++];if(e.length-t!==o)throw Error("Data length mismatch detected");if(e[t++]!==n)throw Error("INTEGER tag expected");let a=e[t++];if(a>=128)throw Error("Decoding length values above 127 not supported");let s=e.slice(t,t+a);if(t+=a,e[t++]!==n)throw Error("INTEGER tag expected");let l=e[t++];if(l>=128)throw Error("Decoding length values above 127 not supported");let u=e.slice(t,t+l);return t+=l,new i(r(s),r(u))}r(e){if(void 0===e)return this.data.r;{let t=e-this.data.r.length;if(t<0)throw Error("Length too small to hold parameter r");let r=new Uint8Array(t);return new Uint8Array([...r,...this.data.r])}}s(e){if(void 0===e)return this.data.s;{let t=e-this.data.s.length;if(t<0)throw Error("Length too small to hold parameter s");let r=new Uint8Array(t);return new Uint8Array([...r,...this.data.s])}}toFixedLength(){return new Uint8Array([...this.r(32),...this.s(32)])}toDer(){let e=this.data.r[0]>=128?new Uint8Array([0,...this.data.r]):this.data.r,t=this.data.s[0]>=128?new Uint8Array([0,...this.data.s]):this.data.s,r=e.length,i=t.length,o=new Uint8Array([n,r,...e,n,i,...t]);return new Uint8Array([48,o.length,...o])}constructor(e,t){if(e.length>32||0===e.length||0===e[0])throw Error("Unsigned integer r must be encoded as unpadded big endian.");if(t.length>32||0===t.length||0===t[0])throw Error("Unsigned integer s must be encoded as unpadded big endian.");this.data={r:e,s:t}}}t.Secp256k1Signature=i;class o extends i{static fromFixedLength(e){if(65!==e.length)throw Error("Got invalid data length ".concat(e.length,". Expected 32 + 32 + 1"));return new o(r(e.slice(0,32)),r(e.slice(32,64)),e[64])}toFixedLength(){return new Uint8Array([...this.r(32),...this.s(32),this.recovery])}constructor(e,t,r){if(super(e,t),!Number.isInteger(r))throw Error("The recovery parameter must be an integer.");if(r<0||r>4)throw Error("The recovery parameter must be one of 0, 1, 2, 3.");this.recovery=r}}t.ExtendedSecp256k1Signature=o},68259:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sha512=t.Sha512=t.sha256=t.Sha256=void 0;let n=r(23928),i=r(93996),o=r(67356);class a{update(e){return this.impl.update((0,o.toRealUint8Array)(e)),this}digest(){return this.impl.digest()}constructor(e){this.blockSize=64,this.impl=n.sha256.create(),e&&this.update(e)}}function s(e){return new a(e).digest()}t.Sha256=a,t.sha256=s;class l{update(e){return this.impl.update((0,o.toRealUint8Array)(e)),this}digest(){return this.impl.digest()}constructor(e){this.blockSize=128,this.impl=i.sha512.create(),e&&this.update(e)}}function u(e){return new l(e).digest()}t.Sha512=l,t.sha512=u},68697:function(e,t,r){"use strict";var n,i=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.stringToPath=t.pathToString=t.Slip10=t.Slip10RawIndex=t.slip10CurveFromString=t.Slip10Curve=void 0;let o=r(69721),a=r(35801),s=i(r(34108)),l=i(r(23254)),u=r(44256),d=r(68259);function c(e){switch(e){case n.Ed25519:return n.Ed25519;case n.Secp256k1:return n.Secp256k1;default:throw Error("Unknown curve string: '".concat(e,"'"))}}!function(e){e.Secp256k1="Bitcoin seed",e.Ed25519="ed25519 seed"}(n=t.Slip10Curve||(t.Slip10Curve={})),t.slip10CurveFromString=c;class p extends a.Uint32{static hardened(e){return new p(e+2147483648)}static normal(e){return new p(e)}isHardened(){return this.data>=2147483648}}t.Slip10RawIndex=p;let f=new l.default.ec("secp256k1");class h{static derivePath(e,t,r){let n=this.master(e,t);for(let t of r)n=this.child(e,n.privkey,n.chainCode,t);return n}static master(e,t){let r=new u.Hmac(d.Sha512,(0,o.toAscii)(e)).update(t).digest(),i=r.slice(0,32),a=r.slice(32,64);return e!==n.Ed25519&&(this.isZero(i)||this.isGteN(e,i))?this.master(e,r):{chainCode:a,privkey:i}}static child(e,t,r,i){let o;if(i.isHardened()){let e=new Uint8Array([0,...t,...i.toBytesBigEndian()]);o=new u.Hmac(d.Sha512,r).update(e).digest()}else{if(e===n.Ed25519)throw Error("Normal keys are not allowed with ed25519");{let n=new Uint8Array([...h.serializedPoint(e,new s.default(t)),...i.toBytesBigEndian()]);o=new u.Hmac(d.Sha512,r).update(n).digest()}}return this.childImpl(e,t,r,i,o)}static serializedPoint(e,t){if(e===n.Secp256k1)return(0,o.fromHex)(f.g.mul(t).encodeCompressed("hex"));throw Error("curve not supported")}static childImpl(e,t,r,i,o){let a=o.slice(0,32),l=o.slice(32,64),c=l;if(e===n.Ed25519)return{chainCode:c,privkey:a};let p=this.n(e),f=new s.default(a).add(new s.default(t)).mod(p),h=Uint8Array.from(f.toArray("be",32));if(this.isGteN(e,a)||this.isZero(h)){let n=new u.Hmac(d.Sha512,r).update(new Uint8Array([1,...l,...i.toBytesBigEndian()])).digest();return this.childImpl(e,t,r,i,n)}return{chainCode:c,privkey:h}}static isZero(e){return e.every(e=>0===e)}static isGteN(e,t){return new s.default(t).gte(this.n(e))}static n(e){if(e===n.Secp256k1)return new s.default("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141",16);throw Error("curve not supported")}}function g(e){return e.reduce((e,t)=>e+"/"+(t.isHardened()?"".concat(t.toNumber()-2147483648,"'"):t.toString()),"m")}function m(e){if(!e.startsWith("m"))throw Error("Path string must start with 'm'");let t=e.slice(1),r=[];for(;t;){let e=t.match(/^\/([0-9]+)('?)/);if(!e)throw Error("Syntax error while reading path component");let[n,i,o]=e,s=a.Uint53.fromString(i).toNumber();if(s>=2147483648)throw Error("Component value too high. Must not exceed 2**31-1.");o?r.push(p.hardened(s)):r.push(p.normal(s)),t=t.slice(n.length)}return r}t.Slip10=h,t.pathToString=g,t.stringToPath=m},67356:function(e,t){"use strict";function r(e){return e instanceof Uint8Array?e:Uint8Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.toRealUint8Array=void 0,t.toRealUint8Array=r},30449:function(e,t){"use strict";function r(e){let t=e=>e.split("").map(e=>{let t=e.charCodeAt(0);if(t<32||t>126)throw Error("Cannot encode character that is out of printable ASCII range: "+t);return t});return Uint8Array.from(t(e))}function n(e){return Array.from(e).map(e=>{if(e<32||e>126)throw Error("Cannot decode character that is out of printable ASCII range: "+e);return String.fromCharCode(e)}).join("")}Object.defineProperty(t,"__esModule",{value:!0}),t.fromAscii=t.toAscii=void 0,t.toAscii=r,t.fromAscii=n},588:function(e,t,r){"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.fromBase64=t.toBase64=void 0;let a=o(r(66033));function s(e){return a.fromByteArray(e)}function l(e){if(!e.match(/^[a-zA-Z0-9+/]*={0,2}$/))throw Error("Invalid base64 string format");return a.toByteArray(e)}t.toBase64=s,t.fromBase64=l},18630:function(e,t,r){"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeBech32=t.fromBech32=t.toBech32=void 0;let a=o(r(21062));function s(e,t,r){return a.encode(e,a.toWords(t),r)}function l(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0,r=a.decode(e,t);return{prefix:r.prefix,data:new Uint8Array(a.fromWords(r.words))}}function u(e){let{prefix:t,data:r}=l(e);return s(t,r)}t.toBech32=s,t.fromBech32=l,t.normalizeBech32=u},36013:function(e,t){"use strict";function r(e){let t="";for(let r of e)t+=("0"+r.toString(16)).slice(-2);return t}function n(e){if(e.length%2!=0)throw Error("hex string length must be a multiple of 2");let t=new Uint8Array(e.length/2);for(let r=0;r1&&void 0!==arguments[1]?arguments[1]:2;return e.toString().padStart(t,"0")}function i(e){let t,n,i;let o=r.exec(e);if(!o)throw Error("Date string is not in RFC3339 format");let a=+o[1],s=+o[2],l=+o[3],u=+o[4],d=+o[5],c=+o[6],p=o[7]?Math.floor(1e3*+o[7]):0;"Z"===o[8]?(t=1,n=0,i=0):(t="-"===o[8].substring(0,1)?-1:1,n=+o[8].substring(1,3),i=+o[8].substring(4,6));let f=t*(60*n+i)*60,h=new Date;return h.setUTCFullYear(a,s-1,l),h.setUTCHours(u,d,c,p),new Date(h.getTime()-1e3*f)}function o(e){let t=e.getUTCFullYear(),r=n(e.getUTCMonth()+1),i=n(e.getUTCDate()),o=n(e.getUTCHours()),a=n(e.getUTCMinutes()),s=n(e.getUTCSeconds()),l=n(e.getUTCMilliseconds(),3);return"".concat(t,"-").concat(r,"-").concat(i,"T").concat(o,":").concat(a,":").concat(s,".").concat(l,"Z")}t.fromRfc3339=i,t.toRfc3339=o},95022:function(e,t){"use strict";function r(e){return new TextEncoder().encode(e)}function n(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=!t;return new TextDecoder("utf-8",{fatal:r}).decode(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.fromUtf8=t.toUtf8=void 0,t.toUtf8=r,t.fromUtf8=n},21062:function(e){"use strict";for(var t="qpzry9x8gf2tvdw0s3jn54khce6mua7l",r={},n=0;n>25;return(33554431&e)<<5^996825010&-(t>>0&1)^642813549&-(t>>1&1)^513874426&-(t>>2&1)^1027748829&-(t>>3&1)^705979059&-(t>>4&1)}function a(e){for(var t=1,r=0;r126)return"Invalid prefix ("+e+")";t=o(t)^n>>5}for(r=0,t=o(t);rn)throw TypeError("Exceeds length limit");var i=a(e=e.toLowerCase());if("string"==typeof i)throw Error(i);for(var s=e+"1",l=0;l>5!=0)throw Error("Non 5-bit word");i=o(i)^u,s+=t.charAt(u)}for(l=0;l<6;++l)i=o(i);for(i^=1,l=0;l<6;++l){var d=i>>(5-l)*5&31;s+=t.charAt(d)}return s}function l(e,t){if(t=t||90,e.length<8)return e+" too short";if(e.length>t)return"Exceeds length limit";var n=e.toLowerCase(),i=e.toUpperCase();if(e!==n&&e!==i)return"Mixed-case string "+e;var s=(e=n).lastIndexOf("1");if(-1===s)return"No separator character for "+e;if(0===s)return"Missing prefix for "+e;var l=e.slice(0,s),u=e.slice(s+1);if(u.length<6)return"Data too short";var d=a(l);if("string"==typeof d)return d;for(var c=[],p=0;p=u.length||c.push(h)}return 1!==d?"Invalid checksum for "+e:{prefix:l,words:c}}function u(){var e=l.apply(null,arguments);if("object"==typeof e)return e}function d(e){var t=l.apply(null,arguments);if("object"==typeof t)return t;throw Error(t)}function c(e,t,r,n){for(var i=0,o=0,a=(1<=r;)s.push(i>>(o-=r)&a);if(n)o>0&&s.push(i<=t)return"Excess padding";if(i<t.id===e.id),r=(0,n.firstEvent)(t);this.connection.sendRequest(e);let o=await r;if((0,i.isJsonRpcErrorResponse)(o)){let e=o.error;throw Error("JSON RPC error: code=".concat(e.code,"; message='").concat(e.message,"'"))}return o}constructor(e){this.connection=e}}t.JsonRpcClient=o},5084:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseJsonRpcResponse=t.parseJsonRpcSuccessResponse=t.parseJsonRpcErrorResponse=t.parseJsonRpcRequest=t.parseJsonRpcId=void 0;let n=r(38589);function i(e){if(!(0,n.isJsonCompatibleDictionary)(e))throw Error("Data must be JSON compatible dictionary");let t=e.id;return"number"!=typeof t&&"string"!=typeof t?null:t}function o(e){if(!(0,n.isJsonCompatibleDictionary)(e))throw Error("Data must be JSON compatible dictionary");if("2.0"!==e.jsonrpc)throw Error("Got unexpected jsonrpc version: ".concat(e.jsonrpc));let t=i(e);if(null===t)throw Error("Invalid id field");let r=e.method;if("string"!=typeof r)throw Error("Invalid method field");if(!(0,n.isJsonCompatibleArray)(e.params)&&!(0,n.isJsonCompatibleDictionary)(e.params))throw Error("Invalid params field");return{jsonrpc:"2.0",id:t,method:r,params:e.params}}function a(e){let t;if("number"!=typeof e.code)throw Error("Error property 'code' is not a number");if("string"!=typeof e.message)throw Error("Error property 'message' is not a string");if(void 0===e.data)t=void 0;else if((0,n.isJsonCompatibleValue)(e.data))t=e.data;else throw Error("Error property 'data' is defined but not a JSON compatible value.");return{code:e.code,message:e.message,...void 0!==t?{data:t}:{}}}function s(e){if(!(0,n.isJsonCompatibleDictionary)(e))throw Error("Data must be JSON compatible dictionary");if("2.0"!==e.jsonrpc)throw Error("Got unexpected jsonrpc version: ".concat(JSON.stringify(e)));let t=e.id;if("number"!=typeof t&&"string"!=typeof t&&null!==t)throw Error("Invalid id field");if(void 0===e.error||!(0,n.isJsonCompatibleDictionary)(e.error))throw Error("Invalid error field");return{jsonrpc:"2.0",id:t,error:a(e.error)}}function l(e){if(!(0,n.isJsonCompatibleDictionary)(e))throw Error("Data must be JSON compatible dictionary");if("2.0"!==e.jsonrpc)throw Error("Got unexpected jsonrpc version: ".concat(JSON.stringify(e)));let t=e.id;if("number"!=typeof t&&"string"!=typeof t)throw Error("Invalid id field");if(void 0===e.result)throw Error("Invalid result field");return{jsonrpc:"2.0",id:t,result:e.result}}function u(e){let t;try{t=s(e)}catch(r){t=l(e)}return t}t.parseJsonRpcId=i,t.parseJsonRpcRequest=o,t.parseJsonRpcErrorResponse=s,t.parseJsonRpcSuccessResponse=l,t.parseJsonRpcResponse=u},24864:function(e,t){"use strict";function r(e){return"object"==typeof e.error}function n(e){return!r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.jsonRpcCode=t.isJsonRpcSuccessResponse=t.isJsonRpcErrorResponse=void 0,t.isJsonRpcErrorResponse=r,t.isJsonRpcSuccessResponse=n,t.jsonRpcCode={parseError:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internalError:-32603,serverError:{default:-32e3}}},30107:function(e,t,r){"use strict";var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Decimal=void 0;let i=n(r(34108)),o=100;class a{static fromUserInput(e,t){let r,n;a.verifyFractionalDigits(t);let i=e.match(/[^0-9.]/);if(i)throw Error("Invalid character at position ".concat(i.index+1));if(""===e)r="0",n="";else if(-1===e.search(/\./))r=e,n="";else{let t=e.split(".");switch(t.length){case 0:case 1:throw Error("Fewer than two elements in split result. This must not happen here.");case 2:if(!t[1])throw Error("Fractional part missing");r=t[0],n=t[1].replace(/0+$/,"");break;default:throw Error("More than one separator found")}}if(n.length>t)throw Error("Got more fractional digits than supported");return new a("".concat(r).concat(n.padEnd(t,"0")),t)}static fromAtomics(e,t){return a.verifyFractionalDigits(t),new a(e,t)}static zero(e){return a.verifyFractionalDigits(e),new a("0",e)}static one(e){return a.verifyFractionalDigits(e),new a("1"+"0".repeat(e),e)}static verifyFractionalDigits(e){if(!Number.isInteger(e))throw Error("Fractional digits is not an integer");if(e<0)throw Error("Fractional digits must not be negative");if(e>o)throw Error("Fractional digits must not exceed ".concat(o))}static compare(e,t){if(e.fractionalDigits!==t.fractionalDigits)throw Error("Fractional digits do not match");return e.data.atomics.cmp(new i.default(t.atomics))}get atomics(){return this.data.atomics.toString()}get fractionalDigits(){return this.data.fractionalDigits}clone(){return new a(this.atomics,this.fractionalDigits)}floor(){let e=new i.default(10).pow(new i.default(this.data.fractionalDigits)),t=this.data.atomics.div(e);return this.data.atomics.mod(e).isZero()?this.clone():a.fromAtomics(t.mul(e).toString(),this.fractionalDigits)}ceil(){let e=new i.default(10).pow(new i.default(this.data.fractionalDigits)),t=this.data.atomics.div(e);return this.data.atomics.mod(e).isZero()?this.clone():a.fromAtomics(t.addn(1).mul(e).toString(),this.fractionalDigits)}toString(){let e=new i.default(10).pow(new i.default(this.data.fractionalDigits)),t=this.data.atomics.div(e),r=this.data.atomics.mod(e);if(r.isZero())return t.toString();{let e=r.toString().padStart(this.data.fractionalDigits,"0").replace(/0+$/,"");return"".concat(t.toString(),".").concat(e)}}toFloatApproximation(){let e=Number(this.toString());if(Number.isNaN(e))throw Error("Conversion to number failed");return e}plus(e){if(this.fractionalDigits!==e.fractionalDigits)throw Error("Fractional digits do not match");return new a(this.data.atomics.add(new i.default(e.atomics)).toString(),this.fractionalDigits)}minus(e){if(this.fractionalDigits!==e.fractionalDigits)throw Error("Fractional digits do not match");let t=this.data.atomics.sub(new i.default(e.atomics));if(t.ltn(0))throw Error("Difference must not be negative");return new a(t.toString(),this.fractionalDigits)}multiply(e){return new a(this.data.atomics.mul(new i.default(e.toString())).toString(),this.fractionalDigits)}equals(e){return 0===a.compare(this,e)}isLessThan(e){return 0>a.compare(this,e)}isLessThanOrEqual(e){return 0>=a.compare(this,e)}isGreaterThan(e){return a.compare(this,e)>0}isGreaterThanOrEqual(e){return a.compare(this,e)>=0}constructor(e,t){if(!e.match(/^[0-9]+$/))throw Error("Invalid string format. Only non-negative integers in decimal representation supported.");this.data={atomics:new i.default(e),fractionalDigits:t}}}t.Decimal=a},35801:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Uint64=t.Uint53=t.Uint32=t.Int53=t.Decimal=void 0;var n=r(30107);Object.defineProperty(t,"Decimal",{enumerable:!0,get:function(){return n.Decimal}});var i=r(36577);Object.defineProperty(t,"Int53",{enumerable:!0,get:function(){return i.Int53}}),Object.defineProperty(t,"Uint32",{enumerable:!0,get:function(){return i.Uint32}}),Object.defineProperty(t,"Uint53",{enumerable:!0,get:function(){return i.Uint53}}),Object.defineProperty(t,"Uint64",{enumerable:!0,get:function(){return i.Uint64}})},36577:function(e,t,r){"use strict";var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Uint64=t.Uint53=t.Int53=t.Uint32=void 0;let i=n(r(34108)),o=new i.default("18446744073709551615",10,"be");class a{static fromBigEndianBytes(e){return a.fromBytes(e)}static fromBytes(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"be";if(4!==e.length)throw Error("Invalid input length. Expected 4 bytes.");for(let t=0;t255||e[t]<0)throw Error("Invalid value in byte. Found: "+e[t]);let r="be"===t?e:Array.from(e).reverse();return new a(16777216*r[0]+65536*r[1]+256*r[2]+r[3])}static fromString(e){if(!e.match(/^[0-9]+$/))throw Error("Invalid string format");return new a(Number.parseInt(e,10))}toBytesBigEndian(){return new Uint8Array([255&Math.floor(this.data/16777216),255&Math.floor(this.data/65536),255&Math.floor(this.data/256),255&Math.floor(this.data/1)])}toBytesLittleEndian(){return new Uint8Array([255&Math.floor(this.data/1),255&Math.floor(this.data/256),255&Math.floor(this.data/65536),255&Math.floor(this.data/16777216)])}toNumber(){return this.data}toBigInt(){return BigInt(this.toNumber())}toString(){return this.data.toString()}constructor(e){if(Number.isNaN(e))throw Error("Input is not a number");if(!Number.isInteger(e))throw Error("Input is not an integer");if(e<0||e>4294967295)throw Error("Input not in uint32 range: "+e.toString());this.data=e}}t.Uint32=a;class s{static fromString(e){if(!e.match(/^-?[0-9]+$/))throw Error("Invalid string format");return new s(Number.parseInt(e,10))}toNumber(){return this.data}toBigInt(){return BigInt(this.toNumber())}toString(){return this.data.toString()}constructor(e){if(Number.isNaN(e))throw Error("Input is not a number");if(!Number.isInteger(e))throw Error("Input is not an integer");if(eNumber.MAX_SAFE_INTEGER)throw Error("Input not in int53 range: "+e.toString());this.data=e}}t.Int53=s;class l{static fromString(e){return new l(s.fromString(e).toNumber())}toNumber(){return this.data.toNumber()}toBigInt(){return BigInt(this.toNumber())}toString(){return this.data.toString()}constructor(e){let t=new s(e);if(0>t.toNumber())throw Error("Input is negative");this.data=t}}t.Uint53=l;class u{static fromBytesBigEndian(e){return u.fromBytes(e)}static fromBytes(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"be";if(8!==e.length)throw Error("Invalid input length. Expected 8 bytes.");for(let t=0;t255||e[t]<0)throw Error("Invalid value in byte. Found: "+e[t]);let r="be"===t?Array.from(e):Array.from(e).reverse();return new u(new i.default(r))}static fromString(e){if(!e.match(/^[0-9]+$/))throw Error("Invalid string format");return new u(new i.default(e,10,"be"))}static fromNumber(e){let t;if(Number.isNaN(e))throw Error("Input is not a number");if(!Number.isInteger(e))throw Error("Input is not an integer");try{t=new i.default(e)}catch(e){throw Error("Input is not a safe integer")}return new u(t)}toBytesBigEndian(){return Uint8Array.from(this.data.toArray("be",8))}toBytesLittleEndian(){return Uint8Array.from(this.data.toArray("le",8))}toString(){return this.data.toString(10)}toBigInt(){return BigInt(this.toString())}toNumber(){return this.data.toNumber()}constructor(e){if(e.isNeg())throw Error("Input is negative");if(e.gt(o))throw Error("Input exceeds uint64 range");this.data=e}}t.Uint64=u},57387:function(e,t){"use strict";function r(e){return e.replace(/\s/g,"").split(",").filter(Boolean).map(e=>{let t=e.match(/^([0-9]+)([a-zA-Z][a-zA-Z0-9/]{2,127})$/);if(!t)throw Error("Got an invalid coin string");return{amount:t[1].replace(/^0+/,"")||"0",denom:t[2]}})}Object.defineProperty(t,"__esModule",{value:!0}),t.parseCoins=void 0,t.parseCoins=r},27895:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeTxRaw=void 0;let n=r(26136);function i(e){let t=n.TxRaw.decode(e);return{authInfo:n.AuthInfo.decode(t.authInfoBytes),body:n.TxBody.decode(t.bodyBytes),signatures:t.signatures}}t.decodeTxRaw=i},20630:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DirectSecp256k1HdWallet=t.extractKdfConfiguration=void 0;let n=r(83552),i=r(49400),o=r(69721),a=r(67357),s=r(21813),l=r(48821),u="directsecp256k1hdwallet-v1",d={algorithm:"argon2id",params:{outputLength:32,opsLimit:24,memLimitKib:12288}};function c(e){return!!(0,a.isNonNullObject)(e)&&"string"==typeof e.hdPath&&"string"==typeof e.prefix}function p(e){return e.kdf}function f(e){let t=JSON.parse(e);if(!(0,a.isNonNullObject)(t))throw Error("Root document is not an object.");if(t.type===u)return p(t);throw Error("Unsupported serialization type")}t.extractKdfConfiguration=f;let h={bip39Password:"",hdPaths:[(0,n.makeCosmoshubPath)(0)],prefix:"cosmos"};class g{static async fromMnemonic(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=new i.EnglishMnemonic(e),n=await i.Bip39.mnemonicToSeed(r,t.bip39Password);return new g(r,{...t,seed:n})}static async generate(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:12,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=4*Math.floor(11*e/33),n=i.Random.getBytes(r),o=i.Bip39.encode(n);return g.fromMnemonic(o.toString(),t)}static async deserialize(e,t){let r=JSON.parse(e);if(!(0,a.isNonNullObject)(r))throw Error("Root document is not an object.");if(r.type===u)return g.deserializeTypeV1(e,t);throw Error("Unsupported serialization type")}static async deserializeWithEncryptionKey(e,t){let r=JSON.parse(e);if(!(0,a.isNonNullObject)(r))throw Error("Root document is not an object.");let n=r;if(n.type===u){let e=await (0,l.decrypt)((0,o.fromBase64)(n.data),t,n.encryption),{mnemonic:r,accounts:s}=JSON.parse((0,o.fromUtf8)(e));if((0,a.assert)("string"==typeof r),!Array.isArray(s))throw Error("Property 'accounts' is not an array");if(!s.every(e=>c(e)))throw Error("Account is not in the correct format.");let u=s[0].prefix;if(!s.every(e=>{let{prefix:t}=e;return t===u}))throw Error("Accounts do not all have the same prefix");let d=s.map(e=>{let{hdPath:t}=e;return(0,i.stringToPath)(t)});return g.fromMnemonic(r,{hdPaths:d,prefix:u})}throw Error("Unsupported serialization type")}static async deserializeTypeV1(e,t){let r=JSON.parse(e);if(!(0,a.isNonNullObject)(r))throw Error("Root document is not an object.");let n=await (0,l.executeKdf)(t,r.kdf);return g.deserializeWithEncryptionKey(e,n)}get mnemonic(){return this.secret.toString()}async getAccounts(){return(await this.getAccountsWithPrivkeys()).map(e=>{let{algo:t,pubkey:r,address:n}=e;return{algo:t,pubkey:r,address:n}})}async signDirect(e,t){let r=(await this.getAccountsWithPrivkeys()).find(t=>{let{address:r}=t;return r===e});if(void 0===r)throw Error("Address ".concat(e," not found in wallet"));let{privkey:o,pubkey:a}=r,l=(0,s.makeSignBytes)(t),u=(0,i.sha256)(l),d=await i.Secp256k1.createSignature(u,o),c=new Uint8Array([...d.r(32),...d.s(32)]);return{signed:t,signature:(0,n.encodeSecp256k1Signature)(a,c)}}async serialize(e){let t=d,r=await (0,l.executeKdf)(e,t);return this.serializeWithEncryptionKey(r,t)}async serializeWithEncryptionKey(e,t){let r={mnemonic:this.mnemonic,accounts:this.accounts.map(e=>{let{hdPath:t,prefix:r}=e;return{hdPath:(0,i.pathToString)(t),prefix:r}})},n=(0,o.toUtf8)(JSON.stringify(r)),a={algorithm:l.supportedAlgorithms.xchacha20poly1305Ietf},s=await (0,l.encrypt)(n,e,a);return JSON.stringify({type:u,kdf:t,encryption:a,data:(0,o.toBase64)(s)})}async getKeyPair(e){let{privkey:t}=i.Slip10.derivePath(i.Slip10Curve.Secp256k1,this.seed,e),{pubkey:r}=await i.Secp256k1.makeKeypair(t);return{privkey:t,pubkey:i.Secp256k1.compressPubkey(r)}}async getAccountsWithPrivkeys(){return Promise.all(this.accounts.map(async e=>{let{hdPath:t,prefix:r}=e,{privkey:i,pubkey:a}=await this.getKeyPair(t),s=(0,o.toBech32)(r,(0,n.rawSecp256k1PubkeyToRawAddress)(a));return{algo:"secp256k1",privkey:i,pubkey:a,address:s}}))}constructor(e,t){var r,n;let i=null!==(r=t.prefix)&&void 0!==r?r:h.prefix,o=null!==(n=t.hdPaths)&&void 0!==n?n:h.hdPaths;this.secret=e,this.seed=t.seed,this.accounts=o.map(e=>({hdPath:e,prefix:i}))}}t.DirectSecp256k1HdWallet=g},14471:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DirectSecp256k1Wallet=void 0;let n=r(83552),i=r(49400),o=r(69721),a=r(21813);class s{static async fromKey(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"cosmos",r=(await i.Secp256k1.makeKeypair(e)).pubkey;return new s(e,i.Secp256k1.compressPubkey(r),t)}get address(){return(0,o.toBech32)(this.prefix,(0,n.rawSecp256k1PubkeyToRawAddress)(this.pubkey))}async getAccounts(){return[{algo:"secp256k1",address:this.address,pubkey:this.pubkey}]}async signDirect(e,t){let r=(0,a.makeSignBytes)(t);if(e!==this.address)throw Error("Address ".concat(e," not found in wallet"));let o=(0,i.sha256)(r),s=await i.Secp256k1.createSignature(o,this.privkey),l=new Uint8Array([...s.r(32),...s.s(32)]);return{signed:t,signature:(0,n.encodeSecp256k1Signature)(this.pubkey,l)}}constructor(e,t,r){this.privkey=e,this.pubkey=t,this.prefix=r}}t.DirectSecp256k1Wallet=s},18722:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.coins=t.coin=t.executeKdf=t.makeSignDoc=t.makeSignBytes=t.makeAuthInfoBytes=t.isOfflineDirectSigner=t.Registry=t.isTxBodyEncodeObject=t.isTsProtoGeneratedType=t.isPbjsGeneratedType=t.encodePubkey=t.decodePubkey=t.decodeOptionalPubkey=t.anyToSinglePubkey=t.makeCosmoshubPath=t.DirectSecp256k1Wallet=t.extractKdfConfiguration=t.DirectSecp256k1HdWallet=t.decodeTxRaw=t.parseCoins=void 0;var n=r(57387);Object.defineProperty(t,"parseCoins",{enumerable:!0,get:function(){return n.parseCoins}});var i=r(27895);Object.defineProperty(t,"decodeTxRaw",{enumerable:!0,get:function(){return i.decodeTxRaw}});var o=r(20630);Object.defineProperty(t,"DirectSecp256k1HdWallet",{enumerable:!0,get:function(){return o.DirectSecp256k1HdWallet}}),Object.defineProperty(t,"extractKdfConfiguration",{enumerable:!0,get:function(){return o.extractKdfConfiguration}});var a=r(14471);Object.defineProperty(t,"DirectSecp256k1Wallet",{enumerable:!0,get:function(){return a.DirectSecp256k1Wallet}});var s=r(13777);Object.defineProperty(t,"makeCosmoshubPath",{enumerable:!0,get:function(){return s.makeCosmoshubPath}});var l=r(3192);Object.defineProperty(t,"anyToSinglePubkey",{enumerable:!0,get:function(){return l.anyToSinglePubkey}}),Object.defineProperty(t,"decodeOptionalPubkey",{enumerable:!0,get:function(){return l.decodeOptionalPubkey}}),Object.defineProperty(t,"decodePubkey",{enumerable:!0,get:function(){return l.decodePubkey}}),Object.defineProperty(t,"encodePubkey",{enumerable:!0,get:function(){return l.encodePubkey}});var u=r(59842);Object.defineProperty(t,"isPbjsGeneratedType",{enumerable:!0,get:function(){return u.isPbjsGeneratedType}}),Object.defineProperty(t,"isTsProtoGeneratedType",{enumerable:!0,get:function(){return u.isTsProtoGeneratedType}}),Object.defineProperty(t,"isTxBodyEncodeObject",{enumerable:!0,get:function(){return u.isTxBodyEncodeObject}}),Object.defineProperty(t,"Registry",{enumerable:!0,get:function(){return u.Registry}});var d=r(99605);Object.defineProperty(t,"isOfflineDirectSigner",{enumerable:!0,get:function(){return d.isOfflineDirectSigner}});var c=r(21813);Object.defineProperty(t,"makeAuthInfoBytes",{enumerable:!0,get:function(){return c.makeAuthInfoBytes}}),Object.defineProperty(t,"makeSignBytes",{enumerable:!0,get:function(){return c.makeSignBytes}}),Object.defineProperty(t,"makeSignDoc",{enumerable:!0,get:function(){return c.makeSignDoc}});var p=r(48821);Object.defineProperty(t,"executeKdf",{enumerable:!0,get:function(){return p.executeKdf}});var f=r(83552);Object.defineProperty(t,"coin",{enumerable:!0,get:function(){return f.coin}}),Object.defineProperty(t,"coins",{enumerable:!0,get:function(){return f.coins}})},13777:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.makeCosmoshubPath=void 0;let n=r(49400);function i(e){return[n.Slip10RawIndex.hardened(44),n.Slip10RawIndex.hardened(118),n.Slip10RawIndex.hardened(0),n.Slip10RawIndex.normal(0),n.Slip10RawIndex.normal(e)]}t.makeCosmoshubPath=i},3192:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeOptionalPubkey=t.decodePubkey=t.anyToSinglePubkey=t.encodePubkey=void 0;let n=r(83552),i=r(69721),o=r(35801),a=r(61010),s=r(56907),l=r(57622),u=r(11879);function d(e){if((0,n.isSecp256k1Pubkey)(e)){let t=l.PubKey.fromPartial({key:(0,i.fromBase64)(e.value)});return u.Any.fromPartial({typeUrl:"/cosmos.crypto.secp256k1.PubKey",value:Uint8Array.from(l.PubKey.encode(t).finish())})}if((0,n.isEd25519Pubkey)(e)){let t=a.PubKey.fromPartial({key:(0,i.fromBase64)(e.value)});return u.Any.fromPartial({typeUrl:"/cosmos.crypto.ed25519.PubKey",value:Uint8Array.from(a.PubKey.encode(t).finish())})}if((0,n.isMultisigThresholdPubkey)(e)){let t=s.LegacyAminoPubKey.fromPartial({threshold:o.Uint53.fromString(e.value.threshold).toNumber(),publicKeys:e.value.pubkeys.map(d)});return u.Any.fromPartial({typeUrl:"/cosmos.crypto.multisig.LegacyAminoPubKey",value:Uint8Array.from(s.LegacyAminoPubKey.encode(t).finish())})}throw Error("Pubkey type ".concat(e.type," not recognized"))}function c(e){switch(e.typeUrl){case"/cosmos.crypto.secp256k1.PubKey":{let{key:t}=l.PubKey.decode(e.value);return(0,n.encodeSecp256k1Pubkey)(t)}case"/cosmos.crypto.ed25519.PubKey":{let{key:t}=a.PubKey.decode(e.value);return(0,n.encodeEd25519Pubkey)(t)}default:throw Error("Pubkey type_url ".concat(e.typeUrl," not recognized as single public key type"))}}function p(e){switch(e.typeUrl){case"/cosmos.crypto.secp256k1.PubKey":case"/cosmos.crypto.ed25519.PubKey":return c(e);case"/cosmos.crypto.multisig.LegacyAminoPubKey":{let{threshold:t,publicKeys:r}=s.LegacyAminoPubKey.decode(e.value);return{type:"tendermint/PubKeyMultisigThreshold",value:{threshold:t.toString(),pubkeys:r.map(c)}}}default:throw Error("Pubkey type URL '".concat(e.typeUrl,"' not recognized"))}}function f(e){if(!e)return null;if(e.typeUrl){if(e.value.length)return p(e);throw Error("Pubkey is an Any with type URL '".concat(e.typeUrl,"' but an empty value"))}if(!e.value.length)return null;throw Error("Pubkey is an Any with an empty type URL but a value set")}t.encodePubkey=d,t.anyToSinglePubkey=c,t.decodePubkey=p,t.decodeOptionalPubkey=f},59842:function(e,t,r){"use strict";var n=r(23663).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.Registry=t.isTxBodyEncodeObject=t.isPbjsGeneratedType=t.isTsProtoGeneratedType=t.isTelescopeGeneratedType=void 0;let i=r(45413),o=r(14841),a=r(26136),s=r(11879);function l(e){let t=e;return"function"==typeof t.fromPartial&&"string"==typeof t.typeUrl}function u(e){return"function"==typeof e.fromPartial}function d(e){return!u(e)}t.isTelescopeGeneratedType=l,t.isTsProtoGeneratedType=u,t.isPbjsGeneratedType=d;let c={cosmosCoin:"/cosmos.base.v1beta1.Coin",cosmosMsgSend:"/cosmos.bank.v1beta1.MsgSend",cosmosTxBody:"/cosmos.tx.v1beta1.TxBody",googleAny:"/google.protobuf.Any"};function p(e){return"/cosmos.tx.v1beta1.TxBody"===e.typeUrl}t.isTxBodyEncodeObject=p;class f{register(e,t){this.types.set(e,t)}lookupType(e){return this.types.get(e)}lookupTypeWithError(e){let t=this.lookupType(e);if(!t)throw Error("Unregistered type url: ".concat(e));return t}encode(e){let{value:t,typeUrl:r}=e;if(p(e))return this.encodeTxBody(t);let n=this.lookupTypeWithError(r),i=l(n)||u(n)?n.fromPartial(t):n.create(t);return n.encode(i).finish()}encodeAsAny(e){let t=this.encode(e);return s.Any.fromPartial({typeUrl:e.typeUrl,value:t})}encodeTxBody(e){var t,r;let n=e.messages.map(e=>this.encodeAsAny(e)),i=a.TxBody.fromPartial({...e,timeoutHeight:BigInt(null!==(r=null===(t=e.timeoutHeight)||void 0===t?void 0:t.toString())&&void 0!==r?r:"0"),messages:n});return a.TxBody.encode(i).finish()}decode(e){let{typeUrl:t,value:r}=e;if(t===c.cosmosTxBody)return this.decodeTxBody(r);let i=this.lookupTypeWithError(t).decode(r);return Object.entries(i).forEach(e=>{let[t,r]=e;void 0!==n&&void 0!==n.isBuffer&&n.isBuffer(r)&&(i[t]=Uint8Array.from(r))}),i}decodeTxBody(e){let t=a.TxBody.decode(e);return{...t,messages:t.messages.map(e=>{let{typeUrl:t,value:r}=e;if(!t)throw Error("Missing type_url in Any");if(!r)throw Error("Missing value in Any");return this.decode({typeUrl:t,value:r})})}}constructor(e){let{cosmosCoin:t,cosmosMsgSend:r}=c;this.types=new Map(e?[...e]:[[t,o.Coin],[r,i.MsgSend]])}}t.Registry=f},99605:function(e,t){"use strict";function r(e){return void 0!==e.signDirect}Object.defineProperty(t,"__esModule",{value:!0}),t.isOfflineDirectSigner=void 0,t.isOfflineDirectSigner=r},21813:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.makeSignBytes=t.makeSignDoc=t.makeAuthInfoBytes=void 0;let n=r(67357),i=r(2264),o=r(26136);function a(e,t){return e.map(e=>{let{pubkey:r,sequence:n}=e;return{publicKey:r,modeInfo:{single:{mode:t}},sequence:BigInt(n)}})}function s(e,t,r,s,l){let u=arguments.length>5&&void 0!==arguments[5]?arguments[5]:i.SignMode.SIGN_MODE_DIRECT;(0,n.assert)(void 0===s||"string"==typeof s,"feeGranter must be undefined or string"),(0,n.assert)(void 0===l||"string"==typeof l,"feePayer must be undefined or string");let d=o.AuthInfo.fromPartial({signerInfos:a(e,u),fee:{amount:[...t],gasLimit:BigInt(r),granter:s,payer:l}});return o.AuthInfo.encode(d).finish()}function l(e,t,r,n){return{bodyBytes:e,authInfoBytes:t,chainId:r,accountNumber:BigInt(n)}}function u(e){let{accountNumber:t,authInfoBytes:r,bodyBytes:n,chainId:i}=e,a=o.SignDoc.fromPartial({accountNumber:t,authInfoBytes:r,bodyBytes:n,chainId:i});return o.SignDoc.encode(a).finish()}t.makeAuthInfoBytes=s,t.makeSignDoc=l,t.makeSignBytes=u},48821:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decrypt=t.encrypt=t.supportedAlgorithms=t.executeKdf=t.cosmjsSalt=void 0;let n=r(49400),i=r(69721);async function o(e,r){if("argon2id"===r.algorithm){let i=r.params;if(!(0,n.isArgon2idOptions)(i))throw Error("Invalid format of argon2id params");return n.Argon2id.execute(e,t.cosmjsSalt,i)}throw Error("Unsupported KDF algorithm")}async function a(e,r,i){if(i.algorithm===t.supportedAlgorithms.xchacha20poly1305Ietf){let t=n.Random.getBytes(n.xchacha20NonceLength);return new Uint8Array([...t,...await n.Xchacha20poly1305Ietf.encrypt(e,r,t)])}throw Error("Unsupported encryption algorithm: '".concat(i.algorithm,"'"))}async function s(e,r,i){if(i.algorithm===t.supportedAlgorithms.xchacha20poly1305Ietf){let t=e.slice(0,n.xchacha20NonceLength);return n.Xchacha20poly1305Ietf.decrypt(e.slice(n.xchacha20NonceLength),r,t)}throw Error("Unsupported encryption algorithm: '".concat(i.algorithm,"'"))}t.cosmjsSalt=(0,i.toAscii)("The CosmJS salt."),t.executeKdf=o,t.supportedAlgorithms={xchacha20poly1305Ietf:"xchacha20poly1305-ietf"},t.encrypt=a,t.decrypt=s},99593:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StreamingSocket=t.SocketWrapper=t.ReconnectingSocket=t.QueueingStreamingSocket=t.ConnectionStatus=void 0;var n=r(51682);Object.defineProperty(t,"ConnectionStatus",{enumerable:!0,get:function(){return n.ConnectionStatus}}),Object.defineProperty(t,"QueueingStreamingSocket",{enumerable:!0,get:function(){return n.QueueingStreamingSocket}});var i=r(63299);Object.defineProperty(t,"ReconnectingSocket",{enumerable:!0,get:function(){return i.ReconnectingSocket}});var o=r(19866);Object.defineProperty(t,"SocketWrapper",{enumerable:!0,get:function(){return o.SocketWrapper}});var a=r(87903);Object.defineProperty(t,"StreamingSocket",{enumerable:!0,get:function(){return a.StreamingSocket}})},51682:function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.QueueingStreamingSocket=t.ConnectionStatus=void 0;let i=r(15786),o=r(78518),a=r(87903);!function(e){e[e.Unconnected=0]="Unconnected",e[e.Connecting=1]="Connecting",e[e.Connected=2]="Connected",e[e.Disconnected=3]="Disconnected"}(n=t.ConnectionStatus||(t.ConnectionStatus={}));class s{connect(){this.connectionStatusProducer.update(n.Connecting),this.socket.connected.then(async()=>(this.connectionStatusProducer.update(n.Connected),this.processQueue()),()=>this.connectionStatusProducer.update(n.Disconnected)),this.socket.connect()}disconnect(){this.connectionStatusProducer.update(n.Disconnected),this.socket.disconnect()}reconnect(){this.socket=new a.StreamingSocket(this.url,this.timeout),this.socket.events.subscribe({next:e=>{if(!this.eventProducerListener)throw Error("No event producer listener set");this.eventProducerListener.next(e)},error:()=>this.connectionStatusProducer.update(n.Disconnected)}),this.socket.connected.then(()=>{this.reconnectedHandler&&this.reconnectedHandler()}),this.connect()}getQueueLength(){return this.queue.length}queueRequest(e){this.queue.push(e),this.processQueue()}async processQueue(){let e;if(!this.isProcessingQueue&&this.connectionStatus.value===n.Connected)for(this.isProcessingQueue=!0;e=this.queue.shift();)try{await this.socket.send(e),this.isProcessingQueue=!1}catch(t){this.queue.unshift(e),this.isProcessingQueue=!1;return}}constructor(e,t=1e4,r){this.queue=[],this.isProcessingQueue=!1,this.url=e,this.timeout=t,this.reconnectedHandler=r;let s={start:e=>this.eventProducerListener=e,stop:()=>this.eventProducerListener=void 0};this.events=o.Stream.create(s),this.connectionStatusProducer=new i.DefaultValueProducer(n.Unconnected),this.connectionStatus=new i.ValueAndUpdates(this.connectionStatusProducer),this.socket=new a.StreamingSocket(this.url,this.timeout),this.socket.events.subscribe({next:e=>{if(!this.eventProducerListener)throw Error("No event producer listener set");this.eventProducerListener.next(e)},error:()=>this.connectionStatusProducer.update(n.Disconnected)})}}t.QueueingStreamingSocket=s},63299:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReconnectingSocket=void 0;let n=r(78518),i=r(51682);class o{static calculateTimeout(e){return Math.min(2**e*100,5e3)}connect(){if(!this.unconnected)throw Error("Cannot connect: socket has already connected");this.socket.connect(),this.unconnected=!1}disconnect(){if(this.unconnected)throw Error("Cannot disconnect: socket has not yet connected");this.socket.disconnect(),this.eventProducerListener&&this.eventProducerListener.complete(),this.disconnected=!0}queueRequest(e){if(this.disconnected)throw Error("Cannot queue request: socket has disconnected");this.socket.queueRequest(e)}constructor(e,t=1e4,r){this.unconnected=!0,this.disconnected=!1,this.timeoutIndex=0,this.reconnectTimeout=null;let a={start:e=>this.eventProducerListener=e,stop:()=>this.eventProducerListener=void 0};this.events=n.Stream.create(a),this.socket=new i.QueueingStreamingSocket(e,t,r),this.socket.events.subscribe({next:e=>{this.eventProducerListener&&this.eventProducerListener.next(e)},error:e=>{this.eventProducerListener&&this.eventProducerListener.error(e)}}),this.connectionStatus=this.socket.connectionStatus,this.connectionStatus.updates.subscribe({next:e=>{e===i.ConnectionStatus.Connected&&(this.timeoutIndex=0),e===i.ConnectionStatus.Disconnected&&(this.reconnectTimeout&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=null),this.reconnectTimeout=setTimeout(()=>this.socket.reconnect(),o.calculateTimeout(this.timeoutIndex++)))}})}}t.ReconnectingSocket=o},19866:function(e,t,r){"use strict";var n=r(49079),i=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.SocketWrapper=void 0;let o=i(r(66337));function a(){return void 0!==n&&void 0!==n.versions&&void 0!==n.versions.node}class s{connect(){let e=new o.default(this.url);e.onerror=e=>{this.clearTimeout(),this.errorHandler&&this.errorHandler(e)},e.onmessage=e=>{this.messageHandler({type:e.type,data:e.data})},e.onopen=e=>{this.clearTimeout(),this.connectedResolver(),this.openHandler&&this.openHandler()},e.onclose=e=>{this.closed=!0,this.closeHandler&&this.closeHandler(e)};let t=Date.now();this.timeoutId=setTimeout(()=>{e.onmessage=()=>0,e.onerror=()=>0,e.onopen=()=>0,e.onclose=()=>0,e.close(),this.socket=void 0;let r=Math.floor(Date.now()-t);this.connectedRejecter("Connection attempt timed out after ".concat(r," ms"))},this.timeout),this.socket=e}disconnect(){if(!this.socket)throw Error("Socket undefined. This must be called after connecting.");switch(this.clearTimeout(),this.socket.readyState){case o.default.OPEN:this.socket.close(1e3);break;case o.default.CLOSED:break;case o.default.CONNECTING:this.socket.onopen=()=>0,this.socket.onclose=()=>0,this.socket.onerror=()=>0,this.socket.onmessage=()=>0,this.socket=void 0,this.closeHandler&&this.closeHandler({wasClean:!1,code:4001});break;case o.default.CLOSING:break;default:throw Error("Unknown readyState: ".concat(this.socket.readyState))}}async send(e){return new Promise((t,r)=>{if(!this.socket)throw Error("Socket undefined. This must be called after connecting.");if(this.closed)throw Error("Socket was closed, so no data can be sent anymore.");if(this.socket.readyState!==o.default.OPEN)throw Error("Websocket is not open");a()?this.socket.send(e,e=>e?r(e):t()):(this.socket.send(e),t())})}clearTimeout(){if(!this.timeoutId)throw Error("Timeout ID not set. This should not happen and usually means connect() was not called.");clearTimeout(this.timeoutId)}constructor(e,t,r,n,i,o=1e4){this.closed=!1,this.connected=new Promise((e,t)=>{this.connectedResolver=e,this.connectedRejecter=t}),this.url=e,this.messageHandler=t,this.errorHandler=r,this.openHandler=n,this.closeHandler=i,this.timeout=o}}t.SocketWrapper=s},87903:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StreamingSocket=void 0;let n=r(78518),i=r(19866);class o{connect(){this.socket.connect()}disconnect(){this.socket.disconnect()}async send(e){return this.socket.send(e)}constructor(e,t=1e4){this.socket=new i.SocketWrapper(e,e=>{this.eventProducerListener&&this.eventProducerListener.next(e)},e=>{this.eventProducerListener&&this.eventProducerListener.error(e)},()=>{},e=>{this.eventProducerListener&&(e.wasClean?this.eventProducerListener.complete():this.eventProducerListener.error("Socket was closed unclean"))},t),this.connected=this.socket.connected;let r={start:e=>this.eventProducerListener=e,stop:()=>this.eventProducerListener=void 0};this.events=n.Stream.create(r)}}t.StreamingSocket=o},5491:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.accountFromAny=void 0;let n=r(35801),i=r(18722),o=r(67357),a=r(54910),s=r(18855);function l(e){return n.Uint64.fromString(e.toString())}function u(e){let{address:t,pubKey:r,accountNumber:n,sequence:o}=e;return{address:t,pubkey:(0,i.decodeOptionalPubkey)(r),accountNumber:l(n).toNumber(),sequence:l(o).toNumber()}}function d(e){var t,r,n,i,l,d,c;let{typeUrl:p,value:f}=e;switch(p){case"/cosmos.auth.v1beta1.BaseAccount":return u(a.BaseAccount.decode(f));case"/cosmos.auth.v1beta1.ModuleAccount":{let e=a.ModuleAccount.decode(f).baseAccount;return(0,o.assert)(e),u(e)}case"/cosmos.vesting.v1beta1.BaseVestingAccount":{let e=null===(t=s.BaseVestingAccount.decode(f))||void 0===t?void 0:t.baseAccount;return(0,o.assert)(e),u(e)}case"/cosmos.vesting.v1beta1.ContinuousVestingAccount":{let e=null===(n=s.ContinuousVestingAccount.decode(f))||void 0===n?void 0:null===(r=n.baseVestingAccount)||void 0===r?void 0:r.baseAccount;return(0,o.assert)(e),u(e)}case"/cosmos.vesting.v1beta1.DelayedVestingAccount":{let e=null===(l=s.DelayedVestingAccount.decode(f))||void 0===l?void 0:null===(i=l.baseVestingAccount)||void 0===i?void 0:i.baseAccount;return(0,o.assert)(e),u(e)}case"/cosmos.vesting.v1beta1.PeriodicVestingAccount":{let e=null===(c=s.PeriodicVestingAccount.decode(f))||void 0===c?void 0:null===(d=c.baseVestingAccount)||void 0===d?void 0:d.baseAccount;return(0,o.assert)(e),u(e)}default:throw Error("Unsupported type: '".concat(p,"'"))}}t.accountFromAny=d},23478:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AminoTypes=void 0;class r{toAmino(e){let{typeUrl:t,value:r}=e,n=this.register[t];if(!n)throw Error("Type URL '".concat(t,"' does not exist in the Amino message type register. ")+"If you need support for this message type, you can pass in additional entries to the AminoTypes constructor. If you think this message type should be included by default, please open an issue at https://github.com/cosmos/cosmjs/issues.");return{type:n.aminoType,value:n.toAmino(r)}}fromAmino(e){let{type:t,value:r}=e,n=Object.entries(this.register).filter(e=>{let[r,{aminoType:n}]=e;return n===t});switch(n.length){case 0:throw Error("Amino type identifier '".concat(t,"' does not exist in the Amino message type register. ")+"If you need support for this message type, you can pass in additional entries to the AminoTypes constructor. If you think this message type should be included by default, please open an issue at https://github.com/cosmos/cosmjs/issues.");case 1:{let[e,t]=n[0];return{typeUrl:e,value:t.fromAmino(r)}}default:throw Error("Multiple types are registered with Amino type identifier '".concat(t,"': '")+n.map(e=>{let[t,r]=e;return t}).sort().join("', '")+"'. Thus fromAmino cannot be performed.")}}constructor(e){this.register=e}}t.AminoTypes=r},61115:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fromTendermintEvent=void 0;let n=r(69721);function i(e){return{type:e.type,attributes:e.attributes.map(e=>({key:"string"==typeof e.key?e.key:(0,n.fromUtf8)(e.key,!0),value:"string"==typeof e.value?e.value:(0,n.fromUtf8)(e.value,!0)}))}}t.fromTendermintEvent=i},10312:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.calculateFee=t.GasPrice=void 0;let n=r(35801),i=r(18722);function o(e){if(e.length<3||e.length>128)throw Error("Denom must be between 3 and 128 characters")}class a{static fromString(e){let t=e.match(/^([0-9.]+)([a-zA-Z][a-zA-Z0-9/:._-]*)$/);if(!t)throw Error("Invalid gas price string");let[r,i,s]=t;o(s);let l=18;return new a(n.Decimal.fromUserInput(i,l),s)}toString(){return this.amount.toString()+this.denom}constructor(e,t){this.amount=e,this.denom=t}}function s(e,t){let{denom:r,amount:o}="string"==typeof t?a.fromString(t):t,s=o.multiply(new n.Uint53(e)).ceil().toString();return{amount:(0,i.coins)(s,r),gas:e.toString()}}t.GasPrice=a,t.calculateFee=s},58015:function(e,t,r){"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.isMsgWithdrawDelegatorRewardEncodeObject=t.isMsgVoteWeightedEncodeObject=t.isMsgVoteEncodeObject=t.isMsgUndelegateEncodeObject=t.isMsgTransferEncodeObject=t.isMsgSubmitProposalEncodeObject=t.isMsgSendEncodeObject=t.isMsgEditValidatorEncodeObject=t.isMsgDepositEncodeObject=t.isMsgDelegateEncodeObject=t.isMsgCreateValidatorEncodeObject=t.isMsgBeginRedelegateEncodeObject=t.isAminoMsgWithdrawValidatorCommission=t.isAminoMsgWithdrawDelegatorReward=t.isAminoMsgVoteWeighted=t.isAminoMsgVote=t.isAminoMsgVerifyInvariant=t.isAminoMsgUnjail=t.isAminoMsgUndelegate=t.isAminoMsgTransfer=t.isAminoMsgSubmitProposal=t.isAminoMsgSubmitEvidence=t.isAminoMsgSetWithdrawAddress=t.isAminoMsgSend=t.isAminoMsgMultiSend=t.isAminoMsgFundCommunityPool=t.isAminoMsgEditValidator=t.isAminoMsgDeposit=t.isAminoMsgDelegate=t.isAminoMsgCreateVestingAccount=t.isAminoMsgCreateValidator=t.isAminoMsgBeginRedelegate=t.createVestingAminoConverters=t.createStakingAminoConverters=t.createSlashingAminoConverters=t.createIbcAminoConverters=t.createGroupAminoConverters=t.createGovAminoConverters=t.createFeegrantAminoConverters=t.createEvidenceAminoConverters=t.createDistributionAminoConverters=t.createCrysisAminoConverters=t.createBankAminoConverters=t.createAuthzAminoConverters=t.logs=t.GasPrice=t.calculateFee=t.fromTendermintEvent=t.AminoTypes=t.accountFromAny=void 0,t.parseCoins=t.makeCosmoshubPath=t.coins=t.coin=t.TimeoutError=t.StargateClient=t.isDeliverTxSuccess=t.isDeliverTxFailure=t.BroadcastTxError=t.assertIsDeliverTxSuccess=t.assertIsDeliverTxFailure=t.SigningStargateClient=t.defaultRegistryTypes=t.createDefaultAminoConverters=t.isSearchTxQueryArray=t.QueryClient=t.decodeCosmosSdkDecFromProto=t.createProtobufRpcClient=t.createPagination=t.makeMultisignedTxBytes=t.makeMultisignedTx=t.setupTxExtension=t.setupStakingExtension=t.setupSlashingExtension=t.setupMintExtension=t.setupIbcExtension=t.setupGovExtension=t.setupFeegrantExtension=t.setupDistributionExtension=t.setupBankExtension=t.setupAuthzExtension=t.setupAuthExtension=void 0;var a=r(5491);Object.defineProperty(t,"accountFromAny",{enumerable:!0,get:function(){return a.accountFromAny}});var s=r(23478);Object.defineProperty(t,"AminoTypes",{enumerable:!0,get:function(){return s.AminoTypes}});var l=r(61115);Object.defineProperty(t,"fromTendermintEvent",{enumerable:!0,get:function(){return l.fromTendermintEvent}});var u=r(10312);Object.defineProperty(t,"calculateFee",{enumerable:!0,get:function(){return u.calculateFee}}),Object.defineProperty(t,"GasPrice",{enumerable:!0,get:function(){return u.GasPrice}}),t.logs=o(r(58141));var d=r(19938);Object.defineProperty(t,"createAuthzAminoConverters",{enumerable:!0,get:function(){return d.createAuthzAminoConverters}}),Object.defineProperty(t,"createBankAminoConverters",{enumerable:!0,get:function(){return d.createBankAminoConverters}}),Object.defineProperty(t,"createCrysisAminoConverters",{enumerable:!0,get:function(){return d.createCrysisAminoConverters}}),Object.defineProperty(t,"createDistributionAminoConverters",{enumerable:!0,get:function(){return d.createDistributionAminoConverters}}),Object.defineProperty(t,"createEvidenceAminoConverters",{enumerable:!0,get:function(){return d.createEvidenceAminoConverters}}),Object.defineProperty(t,"createFeegrantAminoConverters",{enumerable:!0,get:function(){return d.createFeegrantAminoConverters}}),Object.defineProperty(t,"createGovAminoConverters",{enumerable:!0,get:function(){return d.createGovAminoConverters}}),Object.defineProperty(t,"createGroupAminoConverters",{enumerable:!0,get:function(){return d.createGroupAminoConverters}}),Object.defineProperty(t,"createIbcAminoConverters",{enumerable:!0,get:function(){return d.createIbcAminoConverters}}),Object.defineProperty(t,"createSlashingAminoConverters",{enumerable:!0,get:function(){return d.createSlashingAminoConverters}}),Object.defineProperty(t,"createStakingAminoConverters",{enumerable:!0,get:function(){return d.createStakingAminoConverters}}),Object.defineProperty(t,"createVestingAminoConverters",{enumerable:!0,get:function(){return d.createVestingAminoConverters}}),Object.defineProperty(t,"isAminoMsgBeginRedelegate",{enumerable:!0,get:function(){return d.isAminoMsgBeginRedelegate}}),Object.defineProperty(t,"isAminoMsgCreateValidator",{enumerable:!0,get:function(){return d.isAminoMsgCreateValidator}}),Object.defineProperty(t,"isAminoMsgCreateVestingAccount",{enumerable:!0,get:function(){return d.isAminoMsgCreateVestingAccount}}),Object.defineProperty(t,"isAminoMsgDelegate",{enumerable:!0,get:function(){return d.isAminoMsgDelegate}}),Object.defineProperty(t,"isAminoMsgDeposit",{enumerable:!0,get:function(){return d.isAminoMsgDeposit}}),Object.defineProperty(t,"isAminoMsgEditValidator",{enumerable:!0,get:function(){return d.isAminoMsgEditValidator}}),Object.defineProperty(t,"isAminoMsgFundCommunityPool",{enumerable:!0,get:function(){return d.isAminoMsgFundCommunityPool}}),Object.defineProperty(t,"isAminoMsgMultiSend",{enumerable:!0,get:function(){return d.isAminoMsgMultiSend}}),Object.defineProperty(t,"isAminoMsgSend",{enumerable:!0,get:function(){return d.isAminoMsgSend}}),Object.defineProperty(t,"isAminoMsgSetWithdrawAddress",{enumerable:!0,get:function(){return d.isAminoMsgSetWithdrawAddress}}),Object.defineProperty(t,"isAminoMsgSubmitEvidence",{enumerable:!0,get:function(){return d.isAminoMsgSubmitEvidence}}),Object.defineProperty(t,"isAminoMsgSubmitProposal",{enumerable:!0,get:function(){return d.isAminoMsgSubmitProposal}}),Object.defineProperty(t,"isAminoMsgTransfer",{enumerable:!0,get:function(){return d.isAminoMsgTransfer}}),Object.defineProperty(t,"isAminoMsgUndelegate",{enumerable:!0,get:function(){return d.isAminoMsgUndelegate}}),Object.defineProperty(t,"isAminoMsgUnjail",{enumerable:!0,get:function(){return d.isAminoMsgUnjail}}),Object.defineProperty(t,"isAminoMsgVerifyInvariant",{enumerable:!0,get:function(){return d.isAminoMsgVerifyInvariant}}),Object.defineProperty(t,"isAminoMsgVote",{enumerable:!0,get:function(){return d.isAminoMsgVote}}),Object.defineProperty(t,"isAminoMsgVoteWeighted",{enumerable:!0,get:function(){return d.isAminoMsgVoteWeighted}}),Object.defineProperty(t,"isAminoMsgWithdrawDelegatorReward",{enumerable:!0,get:function(){return d.isAminoMsgWithdrawDelegatorReward}}),Object.defineProperty(t,"isAminoMsgWithdrawValidatorCommission",{enumerable:!0,get:function(){return d.isAminoMsgWithdrawValidatorCommission}}),Object.defineProperty(t,"isMsgBeginRedelegateEncodeObject",{enumerable:!0,get:function(){return d.isMsgBeginRedelegateEncodeObject}}),Object.defineProperty(t,"isMsgCreateValidatorEncodeObject",{enumerable:!0,get:function(){return d.isMsgCreateValidatorEncodeObject}}),Object.defineProperty(t,"isMsgDelegateEncodeObject",{enumerable:!0,get:function(){return d.isMsgDelegateEncodeObject}}),Object.defineProperty(t,"isMsgDepositEncodeObject",{enumerable:!0,get:function(){return d.isMsgDepositEncodeObject}}),Object.defineProperty(t,"isMsgEditValidatorEncodeObject",{enumerable:!0,get:function(){return d.isMsgEditValidatorEncodeObject}}),Object.defineProperty(t,"isMsgSendEncodeObject",{enumerable:!0,get:function(){return d.isMsgSendEncodeObject}}),Object.defineProperty(t,"isMsgSubmitProposalEncodeObject",{enumerable:!0,get:function(){return d.isMsgSubmitProposalEncodeObject}}),Object.defineProperty(t,"isMsgTransferEncodeObject",{enumerable:!0,get:function(){return d.isMsgTransferEncodeObject}}),Object.defineProperty(t,"isMsgUndelegateEncodeObject",{enumerable:!0,get:function(){return d.isMsgUndelegateEncodeObject}}),Object.defineProperty(t,"isMsgVoteEncodeObject",{enumerable:!0,get:function(){return d.isMsgVoteEncodeObject}}),Object.defineProperty(t,"isMsgVoteWeightedEncodeObject",{enumerable:!0,get:function(){return d.isMsgVoteWeightedEncodeObject}}),Object.defineProperty(t,"isMsgWithdrawDelegatorRewardEncodeObject",{enumerable:!0,get:function(){return d.isMsgWithdrawDelegatorRewardEncodeObject}}),Object.defineProperty(t,"setupAuthExtension",{enumerable:!0,get:function(){return d.setupAuthExtension}}),Object.defineProperty(t,"setupAuthzExtension",{enumerable:!0,get:function(){return d.setupAuthzExtension}}),Object.defineProperty(t,"setupBankExtension",{enumerable:!0,get:function(){return d.setupBankExtension}}),Object.defineProperty(t,"setupDistributionExtension",{enumerable:!0,get:function(){return d.setupDistributionExtension}}),Object.defineProperty(t,"setupFeegrantExtension",{enumerable:!0,get:function(){return d.setupFeegrantExtension}}),Object.defineProperty(t,"setupGovExtension",{enumerable:!0,get:function(){return d.setupGovExtension}}),Object.defineProperty(t,"setupIbcExtension",{enumerable:!0,get:function(){return d.setupIbcExtension}}),Object.defineProperty(t,"setupMintExtension",{enumerable:!0,get:function(){return d.setupMintExtension}}),Object.defineProperty(t,"setupSlashingExtension",{enumerable:!0,get:function(){return d.setupSlashingExtension}}),Object.defineProperty(t,"setupStakingExtension",{enumerable:!0,get:function(){return d.setupStakingExtension}}),Object.defineProperty(t,"setupTxExtension",{enumerable:!0,get:function(){return d.setupTxExtension}});var c=r(88080);Object.defineProperty(t,"makeMultisignedTx",{enumerable:!0,get:function(){return c.makeMultisignedTx}}),Object.defineProperty(t,"makeMultisignedTxBytes",{enumerable:!0,get:function(){return c.makeMultisignedTxBytes}});var p=r(71185);Object.defineProperty(t,"createPagination",{enumerable:!0,get:function(){return p.createPagination}}),Object.defineProperty(t,"createProtobufRpcClient",{enumerable:!0,get:function(){return p.createProtobufRpcClient}}),Object.defineProperty(t,"decodeCosmosSdkDecFromProto",{enumerable:!0,get:function(){return p.decodeCosmosSdkDecFromProto}}),Object.defineProperty(t,"QueryClient",{enumerable:!0,get:function(){return p.QueryClient}});var f=r(66750);Object.defineProperty(t,"isSearchTxQueryArray",{enumerable:!0,get:function(){return f.isSearchTxQueryArray}});var h=r(54449);Object.defineProperty(t,"createDefaultAminoConverters",{enumerable:!0,get:function(){return h.createDefaultAminoConverters}}),Object.defineProperty(t,"defaultRegistryTypes",{enumerable:!0,get:function(){return h.defaultRegistryTypes}}),Object.defineProperty(t,"SigningStargateClient",{enumerable:!0,get:function(){return h.SigningStargateClient}});var g=r(25087);Object.defineProperty(t,"assertIsDeliverTxFailure",{enumerable:!0,get:function(){return g.assertIsDeliverTxFailure}}),Object.defineProperty(t,"assertIsDeliverTxSuccess",{enumerable:!0,get:function(){return g.assertIsDeliverTxSuccess}}),Object.defineProperty(t,"BroadcastTxError",{enumerable:!0,get:function(){return g.BroadcastTxError}}),Object.defineProperty(t,"isDeliverTxFailure",{enumerable:!0,get:function(){return g.isDeliverTxFailure}}),Object.defineProperty(t,"isDeliverTxSuccess",{enumerable:!0,get:function(){return g.isDeliverTxSuccess}}),Object.defineProperty(t,"StargateClient",{enumerable:!0,get:function(){return g.StargateClient}}),Object.defineProperty(t,"TimeoutError",{enumerable:!0,get:function(){return g.TimeoutError}});var m=r(18722);Object.defineProperty(t,"coin",{enumerable:!0,get:function(){return m.coin}}),Object.defineProperty(t,"coins",{enumerable:!0,get:function(){return m.coins}}),Object.defineProperty(t,"makeCosmoshubPath",{enumerable:!0,get:function(){return m.makeCosmoshubPath}}),Object.defineProperty(t,"parseCoins",{enumerable:!0,get:function(){return m.parseCoins}})},58141:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findAttribute=t.parseRawLog=t.parseLogs=t.parseLog=t.parseEvent=t.parseAttribute=void 0;let n=r(67357);function i(e){if(!(0,n.isNonNullObject)(e))throw Error("Attribute must be a non-null object");let{key:t,value:r}=e;if("string"!=typeof t||!t)throw Error("Attribute's key must be a non-empty string");if("string"!=typeof r&&void 0!==r)throw Error("Attribute's value must be a string or unset");return{key:t,value:r||""}}function o(e){if(!(0,n.isNonNullObject)(e))throw Error("Event must be a non-null object");let{type:t,attributes:r}=e;if("string"!=typeof t||""===t)throw Error("Event type must be a non-empty string");if(!Array.isArray(r))throw Error("Event's attributes must be an array");return{type:t,attributes:r.map(i)}}function a(e){if(!(0,n.isNonNullObject)(e))throw Error("Log must be a non-null object");let{msg_index:t,log:r,events:i}=e;if("number"!=typeof t)throw Error("Log's msg_index must be a number");if("string"!=typeof r)throw Error("Log's log must be a string");if(!Array.isArray(i))throw Error("Log's events must be an array");return{msg_index:t,log:r,events:i.map(o)}}function s(e){if(!Array.isArray(e))throw Error("Logs must be an array");return e.map(a)}function l(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"[]";return s(JSON.parse(e).map((e,t)=>{let{events:r}=e;return{msg_index:t,events:r,log:""}}))}function u(e,t,r){var n;let i=e.find(()=>!0),o=null==i?void 0:null===(n=i.events.find(e=>e.type===t))||void 0===n?void 0:n.attributes.find(e=>e.key===r);if(!o)throw Error("Could not find attribute '".concat(r,"' in first event of type '").concat(t,"' in first log."));return o}t.parseAttribute=i,t.parseEvent=o,t.parseLog=a,t.parseLogs=s,t.parseRawLog=l,t.findAttribute=u},16421:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setupAuthExtension=void 0;let n=r(37547),i=r(71185);function o(e){let t=(0,i.createProtobufRpcClient)(e),r=new n.QueryClientImpl(t);return{auth:{account:async e=>{let{account:t}=await r.Account({address:e});return null!=t?t:null}}}}t.setupAuthExtension=o},68254:function(e,t){"use strict";function r(){return{}}Object.defineProperty(t,"__esModule",{value:!0}),t.createAuthzAminoConverters=void 0,t.createAuthzAminoConverters=r},69849:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.authzTypes=void 0;let n=r(97481);t.authzTypes=[["/cosmos.authz.v1beta1.MsgExec",n.MsgExec],["/cosmos.authz.v1beta1.MsgGrant",n.MsgGrant],["/cosmos.authz.v1beta1.MsgRevoke",n.MsgRevoke]]},80202:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setupAuthzExtension=void 0;let n=r(629),i=r(71185);function o(e){let t=(0,i.createProtobufRpcClient)(e),r=new n.QueryClientImpl(t);return{authz:{grants:async(e,t,n,o)=>await r.Grants({granter:e,grantee:t,msgTypeUrl:n,pagination:(0,i.createPagination)(o)}),granteeGrants:async(e,t)=>await r.GranteeGrants({grantee:e,pagination:(0,i.createPagination)(t)}),granterGrants:async(e,t)=>await r.GranterGrants({granter:e,pagination:(0,i.createPagination)(t)})}}}t.setupAuthzExtension=o},54738:function(e,t){"use strict";function r(e){return"cosmos-sdk/MsgSend"===e.type}function n(e){return"cosmos-sdk/MsgMultiSend"===e.type}function i(){return{"/cosmos.bank.v1beta1.MsgSend":{aminoType:"cosmos-sdk/MsgSend",toAmino:e=>{let{fromAddress:t,toAddress:r,amount:n}=e;return{from_address:t,to_address:r,amount:[...n]}},fromAmino:e=>{let{from_address:t,to_address:r,amount:n}=e;return{fromAddress:t,toAddress:r,amount:[...n]}}},"/cosmos.bank.v1beta1.MsgMultiSend":{aminoType:"cosmos-sdk/MsgMultiSend",toAmino:e=>{let{inputs:t,outputs:r}=e;return{inputs:t.map(e=>({address:e.address,coins:[...e.coins]})),outputs:r.map(e=>({address:e.address,coins:[...e.coins]}))}},fromAmino:e=>{let{inputs:t,outputs:r}=e;return{inputs:t.map(e=>({address:e.address,coins:[...e.coins]})),outputs:r.map(e=>({address:e.address,coins:[...e.coins]}))}}}}}Object.defineProperty(t,"__esModule",{value:!0}),t.createBankAminoConverters=t.isAminoMsgMultiSend=t.isAminoMsgSend=void 0,t.isAminoMsgSend=r,t.isAminoMsgMultiSend=n,t.createBankAminoConverters=i},46914:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isMsgSendEncodeObject=t.bankTypes=void 0;let n=r(45413);function i(e){return"/cosmos.bank.v1beta1.MsgSend"===e.typeUrl}t.bankTypes=[["/cosmos.bank.v1beta1.MsgMultiSend",n.MsgMultiSend],["/cosmos.bank.v1beta1.MsgSend",n.MsgSend]],t.isMsgSendEncodeObject=i},31199:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setupBankExtension=void 0;let n=r(67357),i=r(4818),o=r(71185);function a(e){let t=(0,o.createProtobufRpcClient)(e),r=new i.QueryClientImpl(t);return{bank:{balance:async(e,t)=>{let{balance:i}=await r.Balance({address:e,denom:t});return(0,n.assert)(i),i},allBalances:async e=>{let{balances:t}=await r.AllBalances(i.QueryAllBalancesRequest.fromPartial({address:e}));return t},totalSupply:async e=>await r.TotalSupply({pagination:(0,o.createPagination)(e)}),supplyOf:async e=>{let{amount:t}=await r.SupplyOf({denom:e});return(0,n.assert)(t),t},denomMetadata:async e=>{let{metadata:t}=await r.DenomMetadata({denom:e});return(0,n.assert)(t),t},denomsMetadata:async()=>{let{metadatas:e}=await r.DenomsMetadata(i.QueryDenomsMetadataRequest.fromPartial({pagination:void 0}));return e}}}}t.setupBankExtension=a},3482:function(e,t){"use strict";function r(e){return"cosmos-sdk/MsgVerifyInvariant"===e.type}function n(){throw Error("Not implemented")}Object.defineProperty(t,"__esModule",{value:!0}),t.createCrysisAminoConverters=t.isAminoMsgVerifyInvariant=void 0,t.isAminoMsgVerifyInvariant=r,t.createCrysisAminoConverters=n},13944:function(e,t){"use strict";function r(e){return"cosmos-sdk/MsgModifyWithdrawAddress"===e.type}function n(e){return"cosmos-sdk/MsgWithdrawDelegationReward"===e.type}function i(e){return"cosmos-sdk/MsgWithdrawValidatorCommission"===e.type}function o(e){return"cosmos-sdk/MsgFundCommunityPool"===e.type}function a(){return{"/cosmos.distribution.v1beta1.MsgFundCommunityPool":{aminoType:"cosmos-sdk/MsgFundCommunityPool",toAmino:e=>{let{amount:t,depositor:r}=e;return{amount:[...t],depositor:r}},fromAmino:e=>{let{amount:t,depositor:r}=e;return{amount:[...t],depositor:r}}},"/cosmos.distribution.v1beta1.MsgSetWithdrawAddress":{aminoType:"cosmos-sdk/MsgModifyWithdrawAddress",toAmino:e=>{let{delegatorAddress:t,withdrawAddress:r}=e;return{delegator_address:t,withdraw_address:r}},fromAmino:e=>{let{delegator_address:t,withdraw_address:r}=e;return{delegatorAddress:t,withdrawAddress:r}}},"/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward":{aminoType:"cosmos-sdk/MsgWithdrawDelegationReward",toAmino:e=>{let{delegatorAddress:t,validatorAddress:r}=e;return{delegator_address:t,validator_address:r}},fromAmino:e=>{let{delegator_address:t,validator_address:r}=e;return{delegatorAddress:t,validatorAddress:r}}},"/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission":{aminoType:"cosmos-sdk/MsgWithdrawValidatorCommission",toAmino:e=>{let{validatorAddress:t}=e;return{validator_address:t}},fromAmino:e=>{let{validator_address:t}=e;return{validatorAddress:t}}}}}Object.defineProperty(t,"__esModule",{value:!0}),t.createDistributionAminoConverters=t.isAminoMsgFundCommunityPool=t.isAminoMsgWithdrawValidatorCommission=t.isAminoMsgWithdrawDelegatorReward=t.isAminoMsgSetWithdrawAddress=void 0,t.isAminoMsgSetWithdrawAddress=r,t.isAminoMsgWithdrawDelegatorReward=n,t.isAminoMsgWithdrawValidatorCommission=i,t.isAminoMsgFundCommunityPool=o,t.createDistributionAminoConverters=a},34302:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isMsgWithdrawDelegatorRewardEncodeObject=t.distributionTypes=void 0;let n=r(53856);function i(e){return"/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward"===e.typeUrl}t.distributionTypes=[["/cosmos.distribution.v1beta1.MsgFundCommunityPool",n.MsgFundCommunityPool],["/cosmos.distribution.v1beta1.MsgSetWithdrawAddress",n.MsgSetWithdrawAddress],["/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward",n.MsgWithdrawDelegatorReward],["/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission",n.MsgWithdrawValidatorCommission]],t.isMsgWithdrawDelegatorRewardEncodeObject=i},52554:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setupDistributionExtension=void 0;let n=r(91029),i=r(71185);function o(e){let t=(0,i.createProtobufRpcClient)(e),r=new n.QueryClientImpl(t);return{distribution:{communityPool:async()=>await r.CommunityPool({}),delegationRewards:async(e,t)=>await r.DelegationRewards({delegatorAddress:e,validatorAddress:t}),delegationTotalRewards:async e=>await r.DelegationTotalRewards({delegatorAddress:e}),delegatorValidators:async e=>await r.DelegatorValidators({delegatorAddress:e}),delegatorWithdrawAddress:async e=>await r.DelegatorWithdrawAddress({delegatorAddress:e}),params:async()=>await r.Params({}),validatorCommission:async e=>await r.ValidatorCommission({validatorAddress:e}),validatorOutstandingRewards:async e=>await r.ValidatorOutstandingRewards({validatorAddress:e}),validatorSlashes:async(e,t,n,o)=>await r.ValidatorSlashes({validatorAddress:e,startingHeight:BigInt(t),endingHeight:BigInt(n),pagination:(0,i.createPagination)(o)})}}}t.setupDistributionExtension=o},6779:function(e,t){"use strict";function r(e){return"cosmos-sdk/MsgSubmitEvidence"===e.type}function n(){throw Error("Not implemented")}Object.defineProperty(t,"__esModule",{value:!0}),t.createEvidenceAminoConverters=t.isAminoMsgSubmitEvidence=void 0,t.isAminoMsgSubmitEvidence=r,t.createEvidenceAminoConverters=n},98732:function(e,t){"use strict";function r(){return{}}Object.defineProperty(t,"__esModule",{value:!0}),t.createFeegrantAminoConverters=void 0,t.createFeegrantAminoConverters=r},42051:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.feegrantTypes=void 0;let n=r(2034);t.feegrantTypes=[["/cosmos.feegrant.v1beta1.MsgGrantAllowance",n.MsgGrantAllowance],["/cosmos.feegrant.v1beta1.MsgRevokeAllowance",n.MsgRevokeAllowance]]},1277:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setupFeegrantExtension=void 0;let n=r(75122),i=r(71185);function o(e){let t=(0,i.createProtobufRpcClient)(e),r=new n.QueryClientImpl(t);return{feegrant:{allowance:async(e,t)=>await r.Allowance({granter:e,grantee:t}),allowances:async(e,t)=>await r.Allowances({grantee:e,pagination:(0,i.createPagination)(t)})}}}t.setupFeegrantExtension=o},40384:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createGovAminoConverters=t.isAminoMsgDeposit=t.isAminoMsgVoteWeighted=t.isAminoMsgVote=t.isAminoMsgSubmitProposal=void 0;let n=r(35801),i=r(67357),o=r(5309),a=r(11879),s=r(71185);function l(e){return"cosmos-sdk/MsgSubmitProposal"===e.type}function u(e){return"cosmos-sdk/MsgVote"===e.type}function d(e){return"cosmos-sdk/MsgVoteWeighted"===e.type}function c(e){return"cosmos-sdk/MsgDeposit"===e.type}function p(){return{"/cosmos.gov.v1beta1.MsgDeposit":{aminoType:"cosmos-sdk/MsgDeposit",toAmino:e=>{let{amount:t,depositor:r,proposalId:n}=e;return{amount:t,depositor:r,proposal_id:n.toString()}},fromAmino:e=>{let{amount:t,depositor:r,proposal_id:n}=e;return{amount:Array.from(t),depositor:r,proposalId:BigInt(n)}}},"/cosmos.gov.v1beta1.MsgVote":{aminoType:"cosmos-sdk/MsgVote",toAmino:e=>{let{option:t,proposalId:r,voter:n}=e;return{option:t,proposal_id:r.toString(),voter:n}},fromAmino:e=>{let{option:t,proposal_id:r,voter:n}=e;return{option:(0,o.voteOptionFromJSON)(t),proposalId:BigInt(r),voter:n}}},"/cosmos.gov.v1beta1.MsgVoteWeighted":{aminoType:"cosmos-sdk/MsgVoteWeighted",toAmino:e=>{let{options:t,proposalId:r,voter:n}=e;return{options:t.map(e=>({option:e.option,weight:(0,s.decodeCosmosSdkDecFromProto)(e.weight).toString().padEnd(20,"0")})),proposal_id:r.toString(),voter:n}},fromAmino:e=>{let{options:t,proposal_id:r,voter:i}=e;return{proposalId:BigInt(r),voter:i,options:t.map(e=>({option:(0,o.voteOptionFromJSON)(e.option),weight:n.Decimal.fromUserInput(e.weight,18).atomics}))}}},"/cosmos.gov.v1beta1.MsgSubmitProposal":{aminoType:"cosmos-sdk/MsgSubmitProposal",toAmino:e=>{let t,{initialDeposit:r,proposer:n,content:a}=e;if((0,i.assertDefinedAndNotNull)(a),"/cosmos.gov.v1beta1.TextProposal"===a.typeUrl){let e=o.TextProposal.decode(a.value);t={type:"cosmos-sdk/TextProposal",value:{description:e.description,title:e.title}}}else throw Error("Unsupported proposal type: '".concat(a.typeUrl,"'"));return{initial_deposit:r,proposer:n,content:t}},fromAmino:e=>{let t,{initial_deposit:r,proposer:n,content:s}=e;if("cosmos-sdk/TextProposal"===s.type){let{value:e}=s;(0,i.assert)((0,i.isNonNullObject)(e));let{title:r,description:n}=e;(0,i.assert)("string"==typeof r),(0,i.assert)("string"==typeof n),t=a.Any.fromPartial({typeUrl:"/cosmos.gov.v1beta1.TextProposal",value:o.TextProposal.encode(o.TextProposal.fromPartial({title:r,description:n})).finish()})}else throw Error("Unsupported proposal type: '".concat(s.type,"'"));return{initialDeposit:Array.from(r),proposer:n,content:t}}}}}t.isAminoMsgSubmitProposal=l,t.isAminoMsgVote=u,t.isAminoMsgVoteWeighted=d,t.isAminoMsgDeposit=c,t.createGovAminoConverters=p},50804:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isMsgVoteWeightedEncodeObject=t.isMsgVoteEncodeObject=t.isMsgSubmitProposalEncodeObject=t.isMsgDepositEncodeObject=t.govTypes=void 0;let n=r(98743),i=r(76925);function o(e){return"/cosmos.gov.v1beta1.MsgDeposit"===e.typeUrl}function a(e){return"/cosmos.gov.v1beta1.MsgSubmitProposal"===e.typeUrl}function s(e){return"/cosmos.gov.v1beta1.MsgVote"===e.typeUrl}function l(e){return"/cosmos.gov.v1beta1.MsgVoteWeighted"===e.typeUrl}t.govTypes=[["/cosmos.gov.v1.MsgDeposit",n.MsgDeposit],["/cosmos.gov.v1.MsgSubmitProposal",n.MsgSubmitProposal],["/cosmos.gov.v1.MsgUpdateParams",n.MsgUpdateParams],["/cosmos.gov.v1.MsgVote",n.MsgVote],["/cosmos.gov.v1.MsgVoteWeighted",n.MsgVoteWeighted],["/cosmos.gov.v1beta1.MsgDeposit",i.MsgDeposit],["/cosmos.gov.v1beta1.MsgSubmitProposal",i.MsgSubmitProposal],["/cosmos.gov.v1beta1.MsgVote",i.MsgVote],["/cosmos.gov.v1beta1.MsgVoteWeighted",i.MsgVoteWeighted]],t.isMsgDepositEncodeObject=o,t.isMsgSubmitProposalEncodeObject=a,t.isMsgVoteEncodeObject=s,t.isMsgVoteWeightedEncodeObject=l},52952:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setupGovExtension=void 0;let n=r(22962),i=r(71185);function o(e){let t=(0,i.createProtobufRpcClient)(e),r=new n.QueryClientImpl(t);return{gov:{params:async e=>await r.Params({paramsType:e}),proposals:async(e,t,n,o)=>await r.Proposals({proposalStatus:e,depositor:t,voter:n,pagination:(0,i.createPagination)(o)}),proposal:async e=>await r.Proposal({proposalId:(0,i.longify)(e)}),deposits:async(e,t)=>await r.Deposits({proposalId:(0,i.longify)(e),pagination:(0,i.createPagination)(t)}),deposit:async(e,t)=>await r.Deposit({proposalId:(0,i.longify)(e),depositor:t}),tally:async e=>await r.TallyResult({proposalId:(0,i.longify)(e)}),votes:async(e,t)=>await r.Votes({proposalId:(0,i.longify)(e),pagination:(0,i.createPagination)(t)}),vote:async(e,t)=>await r.Vote({proposalId:(0,i.longify)(e),voter:t})}}}t.setupGovExtension=o},87010:function(e,t){"use strict";function r(){return{}}Object.defineProperty(t,"__esModule",{value:!0}),t.createGroupAminoConverters=void 0,t.createGroupAminoConverters=r},30220:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.groupTypes=void 0;let n=r(51691);t.groupTypes=[["/cosmos.group.v1.MsgCreateGroup",n.MsgCreateGroup],["/cosmos.group.v1.MsgCreateGroupPolicy",n.MsgCreateGroupPolicy],["/cosmos.group.v1.MsgCreateGroupWithPolicy",n.MsgCreateGroupWithPolicy],["/cosmos.group.v1.MsgExec",n.MsgExec],["/cosmos.group.v1.MsgLeaveGroup",n.MsgLeaveGroup],["/cosmos.group.v1.MsgSubmitProposal",n.MsgSubmitProposal],["/cosmos.group.v1.MsgUpdateGroupAdmin",n.MsgUpdateGroupAdmin],["/cosmos.group.v1.MsgUpdateGroupMembers",n.MsgUpdateGroupMembers],["/cosmos.group.v1.MsgUpdateGroupMetadata",n.MsgUpdateGroupMetadata],["/cosmos.group.v1.MsgUpdateGroupPolicyAdmin",n.MsgUpdateGroupPolicyAdmin],["/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy",n.MsgUpdateGroupPolicyDecisionPolicy],["/cosmos.group.v1.MsgUpdateGroupPolicyMetadata",n.MsgUpdateGroupPolicyMetadata],["/cosmos.group.v1.MsgVote",n.MsgVote],["/cosmos.group.v1.MsgWithdrawProposal",n.MsgWithdrawProposal]]},6065:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createIbcAminoConverters=t.isAminoMsgTransfer=void 0;let n=r(83552),i=r(7337);function o(e){return"cosmos-sdk/MsgTransfer"===e.type}function a(){return{"/ibc.applications.transfer.v1.MsgTransfer":{aminoType:"cosmos-sdk/MsgTransfer",toAmino:e=>{var t,r,i;let{sourcePort:o,sourceChannel:a,token:s,sender:l,receiver:u,timeoutHeight:d,timeoutTimestamp:c,memo:p}=e;return{source_port:o,source_channel:a,token:s,sender:l,receiver:u,timeout_height:d?{revision_height:null===(t=(0,n.omitDefault)(d.revisionHeight))||void 0===t?void 0:t.toString(),revision_number:null===(r=(0,n.omitDefault)(d.revisionNumber))||void 0===r?void 0:r.toString()}:{},timeout_timestamp:null===(i=(0,n.omitDefault)(c))||void 0===i?void 0:i.toString(),memo:(0,n.omitDefault)(p)}},fromAmino:e=>{let{source_port:t,source_channel:r,token:n,sender:o,receiver:a,timeout_height:s,timeout_timestamp:l,memo:u}=e;return i.MsgTransfer.fromPartial({sourcePort:t,sourceChannel:r,token:n,sender:o,receiver:a,timeoutHeight:s?{revisionHeight:BigInt(s.revision_height||"0"),revisionNumber:BigInt(s.revision_number||"0")}:void 0,timeoutTimestamp:BigInt(l||"0"),memo:null!=u?u:""})}}}}t.isAminoMsgTransfer=o,t.createIbcAminoConverters=a},96239:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isMsgTransferEncodeObject=t.ibcTypes=void 0;let n=r(7337),i=r(52230),o=r(42274),a=r(17244);function s(e){return"/ibc.applications.transfer.v1.MsgTransfer"===e.typeUrl}t.ibcTypes=[["/ibc.applications.transfer.v1.MsgTransfer",n.MsgTransfer],["/ibc.core.channel.v1.MsgAcknowledgement",i.MsgAcknowledgement],["/ibc.core.channel.v1.MsgChannelCloseConfirm",i.MsgChannelCloseConfirm],["/ibc.core.channel.v1.MsgChannelCloseInit",i.MsgChannelCloseInit],["/ibc.core.channel.v1.MsgChannelOpenAck",i.MsgChannelOpenAck],["/ibc.core.channel.v1.MsgChannelOpenConfirm",i.MsgChannelOpenConfirm],["/ibc.core.channel.v1.MsgChannelOpenInit",i.MsgChannelOpenInit],["/ibc.core.channel.v1.MsgChannelOpenTry",i.MsgChannelOpenTry],["/ibc.core.channel.v1.MsgRecvPacket",i.MsgRecvPacket],["/ibc.core.channel.v1.MsgTimeout",i.MsgTimeout],["/ibc.core.channel.v1.MsgTimeoutOnClose",i.MsgTimeoutOnClose],["/ibc.core.client.v1.MsgCreateClient",o.MsgCreateClient],["/ibc.core.client.v1.MsgSubmitMisbehaviour",o.MsgSubmitMisbehaviour],["/ibc.core.client.v1.MsgUpdateClient",o.MsgUpdateClient],["/ibc.core.client.v1.MsgUpgradeClient",o.MsgUpgradeClient],["/ibc.core.connection.v1.MsgConnectionOpenAck",a.MsgConnectionOpenAck],["/ibc.core.connection.v1.MsgConnectionOpenConfirm",a.MsgConnectionOpenConfirm],["/ibc.core.connection.v1.MsgConnectionOpenInit",a.MsgConnectionOpenInit],["/ibc.core.connection.v1.MsgConnectionOpenTry",a.MsgConnectionOpenTry]],t.isMsgTransferEncodeObject=s},28265:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setupIbcExtension=void 0;let n=r(69721),i=r(35801),o=r(27780),a=r(83639),s=r(50846),l=r(35838),u=r(66784),d=r(70710),c=r(71185);function p(e){if((null==e?void 0:e.typeUrl)!=="/ibc.lightclients.tendermint.v1.ClientState")throw Error("Unexpected client state type: ".concat(null==e?void 0:e.typeUrl));return d.ClientState.decode(e.value)}function f(e){if((null==e?void 0:e.typeUrl)!=="/ibc.lightclients.tendermint.v1.ConsensusState")throw Error("Unexpected client state type: ".concat(null==e?void 0:e.typeUrl));return d.ConsensusState.decode(e.value)}function h(e){let t=(0,c.createProtobufRpcClient)(e),r=new s.QueryClientImpl(t),d=new l.QueryClientImpl(t),h=new u.QueryClientImpl(t),g=new o.QueryClientImpl(t);return{ibc:{channel:{channel:async(e,t)=>r.Channel({portId:e,channelId:t}),channels:async e=>r.Channels({pagination:(0,c.createPagination)(e)}),allChannels:async()=>{let e,t;let n=[];do{var i;e=await r.Channels({pagination:(0,c.createPagination)(t)}),n.push(...e.channels),t=null===(i=e.pagination)||void 0===i?void 0:i.nextKey}while(t&&t.length);return s.QueryChannelsResponse.fromPartial({channels:n,height:e.height})},connectionChannels:async(e,t)=>r.ConnectionChannels({connection:e,pagination:(0,c.createPagination)(t)}),allConnectionChannels:async e=>{let t,n;let i=[];do{var o;t=await r.ConnectionChannels({connection:e,pagination:(0,c.createPagination)(n)}),i.push(...t.channels),n=null===(o=t.pagination)||void 0===o?void 0:o.nextKey}while(n&&n.length);return s.QueryConnectionChannelsResponse.fromPartial({channels:i,height:t.height})},clientState:async(e,t)=>r.ChannelClientState({portId:e,channelId:t}),consensusState:async(e,t,n,i)=>r.ChannelConsensusState({portId:e,channelId:t,revisionNumber:BigInt(n),revisionHeight:BigInt(i)}),packetCommitment:async(e,t,n)=>r.PacketCommitment({portId:e,channelId:t,sequence:(0,c.longify)(n)}),packetCommitments:async(e,t,n)=>r.PacketCommitments({channelId:t,portId:e,pagination:(0,c.createPagination)(n)}),allPacketCommitments:async(e,t)=>{let n,i;let o=[];do{var a;n=await r.PacketCommitments({channelId:t,portId:e,pagination:(0,c.createPagination)(i)}),o.push(...n.commitments),i=null===(a=n.pagination)||void 0===a?void 0:a.nextKey}while(i&&i.length);return s.QueryPacketCommitmentsResponse.fromPartial({commitments:o,height:n.height})},packetReceipt:async(e,t,n)=>r.PacketReceipt({portId:e,channelId:t,sequence:(0,c.longify)(n)}),packetAcknowledgement:async(e,t,n)=>r.PacketAcknowledgement({portId:e,channelId:t,sequence:(0,c.longify)(n)}),packetAcknowledgements:async(e,t,n)=>{let i=s.QueryPacketAcknowledgementsRequest.fromPartial({portId:e,channelId:t,pagination:(0,c.createPagination)(n)});return r.PacketAcknowledgements(i)},allPacketAcknowledgements:async(e,t)=>{let n,i;let o=[];do{var a;let l=s.QueryPacketAcknowledgementsRequest.fromPartial({channelId:t,portId:e,pagination:(0,c.createPagination)(i)});n=await r.PacketAcknowledgements(l),o.push(...n.acknowledgements),i=null===(a=n.pagination)||void 0===a?void 0:a.nextKey}while(i&&i.length);return s.QueryPacketAcknowledgementsResponse.fromPartial({acknowledgements:o,height:n.height})},unreceivedPackets:async(e,t,n)=>r.UnreceivedPackets({portId:e,channelId:t,packetCommitmentSequences:n.map(e=>BigInt(e))}),unreceivedAcks:async(e,t,n)=>r.UnreceivedAcks({portId:e,channelId:t,packetAckSequences:n.map(e=>BigInt(e))}),nextSequenceReceive:async(e,t)=>r.NextSequenceReceive({portId:e,channelId:t})},client:{state:async e=>d.ClientState({clientId:e}),states:async e=>d.ClientStates({pagination:(0,c.createPagination)(e)}),allStates:async()=>{let e,t;let r=[];do{var n;e=await d.ClientStates({pagination:(0,c.createPagination)(t)}),r.push(...e.clientStates),t=null===(n=e.pagination)||void 0===n?void 0:n.nextKey}while(t&&t.length);return l.QueryClientStatesResponse.fromPartial({clientStates:r})},consensusState:async(e,t)=>d.ConsensusState(l.QueryConsensusStateRequest.fromPartial({clientId:e,revisionHeight:void 0!==t?BigInt(t):void 0,latestHeight:void 0===t})),consensusStates:async(e,t)=>d.ConsensusStates({clientId:e,pagination:(0,c.createPagination)(t)}),allConsensusStates:async e=>{let t,r;let n=[];do{var i;t=await d.ConsensusStates({clientId:e,pagination:(0,c.createPagination)(r)}),n.push(...t.consensusStates),r=null===(i=t.pagination)||void 0===i?void 0:i.nextKey}while(r&&r.length);return l.QueryConsensusStatesResponse.fromPartial({consensusStates:n})},params:async()=>d.ClientParams({}),stateTm:async e=>p((await d.ClientState({clientId:e})).clientState),statesTm:async e=>{let{clientStates:t}=await d.ClientStates({pagination:(0,c.createPagination)(e)});return t.map(e=>{let{clientState:t}=e;return p(t)})},allStatesTm:async()=>{let e,t;let r=[];do{var n;e=await d.ClientStates({pagination:(0,c.createPagination)(t)}),r.push(...e.clientStates),t=null===(n=e.pagination)||void 0===n?void 0:n.nextKey}while(t&&t.length);return r.map(e=>{let{clientState:t}=e;return p(t)})},consensusStateTm:async(e,t)=>f((await d.ConsensusState(l.QueryConsensusStateRequest.fromPartial({clientId:e,revisionHeight:null==t?void 0:t.revisionHeight,revisionNumber:null==t?void 0:t.revisionNumber,latestHeight:void 0===t}))).consensusState)},connection:{connection:async e=>h.Connection({connectionId:e}),connections:async e=>h.Connections({pagination:(0,c.createPagination)(e)}),allConnections:async()=>{let e,t;let r=[];do{var n;e=await h.Connections({pagination:(0,c.createPagination)(t)}),r.push(...e.connections),t=null===(n=e.pagination)||void 0===n?void 0:n.nextKey}while(t&&t.length);return u.QueryConnectionsResponse.fromPartial({connections:r,height:e.height})},clientConnections:async e=>h.ClientConnections({clientId:e}),clientState:async e=>h.ConnectionClientState({connectionId:e}),consensusState:async(e,t)=>h.ConnectionConsensusState(u.QueryConnectionConsensusStateRequest.fromPartial({connectionId:e,revisionHeight:BigInt(t)}))},transfer:{denomTrace:async e=>g.DenomTrace({hash:e}),denomTraces:async e=>g.DenomTraces({pagination:(0,c.createPagination)(e)}),allDenomTraces:async()=>{let e,t;let r=[];do{var n;e=await g.DenomTraces({pagination:(0,c.createPagination)(t)}),r.push(...e.denomTraces),t=null===(n=e.pagination)||void 0===n?void 0:n.nextKey}while(t&&t.length);return o.QueryDenomTracesResponse.fromPartial({denomTraces:r})},params:async()=>g.Params({})},verified:{channel:{channel:async(t,r)=>{let i=(0,n.toAscii)("channelEnds/ports/".concat(t,"/channels/").concat(r)),{value:o}=await e.queryStoreVerified("ibc",i);return o.length?a.Channel.decode(o):null},packetCommitment:async(t,r,i)=>{let o=(0,n.toAscii)("commitments/ports/".concat(t,"/channels/").concat(r,"/packets/").concat(i)),{value:a}=await e.queryStoreVerified("ibc",o);return a},packetAcknowledgement:async(t,r,i)=>{let o=(0,n.toAscii)("acks/ports/".concat(t,"/channels/").concat(r,"/acknowledgements/").concat(i)),{value:a}=await e.queryStoreVerified("ibc",o);return a},nextSequenceReceive:async(t,r)=>{let o=(0,n.toAscii)("seqAcks/ports/".concat(t,"/channels/").concat(r,"/nextSequenceAck")),{value:a}=await e.queryStoreVerified("ibc",o);return a.length?i.Uint64.fromBytes(a).toNumber():null}}}}}}t.setupIbcExtension=h},19938:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isAminoMsgCreateValidator=t.isAminoMsgBeginRedelegate=t.createStakingAminoConverters=t.setupSlashingExtension=t.isAminoMsgUnjail=t.createSlashingAminoConverters=t.setupMintExtension=t.setupIbcExtension=t.isMsgTransferEncodeObject=t.ibcTypes=t.isAminoMsgTransfer=t.createIbcAminoConverters=t.groupTypes=t.createGroupAminoConverters=t.setupGovExtension=t.isMsgVoteWeightedEncodeObject=t.isMsgVoteEncodeObject=t.isMsgSubmitProposalEncodeObject=t.isMsgDepositEncodeObject=t.govTypes=t.isAminoMsgVoteWeighted=t.isAminoMsgVote=t.isAminoMsgSubmitProposal=t.isAminoMsgDeposit=t.createGovAminoConverters=t.setupFeegrantExtension=t.feegrantTypes=t.createFeegrantAminoConverters=t.isAminoMsgSubmitEvidence=t.createEvidenceAminoConverters=t.setupDistributionExtension=t.isMsgWithdrawDelegatorRewardEncodeObject=t.distributionTypes=t.isAminoMsgWithdrawValidatorCommission=t.isAminoMsgWithdrawDelegatorReward=t.isAminoMsgSetWithdrawAddress=t.isAminoMsgFundCommunityPool=t.createDistributionAminoConverters=t.isAminoMsgVerifyInvariant=t.createCrysisAminoConverters=t.setupBankExtension=t.isMsgSendEncodeObject=t.bankTypes=t.isAminoMsgSend=t.isAminoMsgMultiSend=t.createBankAminoConverters=t.setupAuthzExtension=t.authzTypes=t.createAuthzAminoConverters=t.setupAuthExtension=void 0,t.vestingTypes=t.isAminoMsgCreateVestingAccount=t.createVestingAminoConverters=t.setupTxExtension=t.setupStakingExtension=t.stakingTypes=t.isMsgUndelegateEncodeObject=t.isMsgEditValidatorEncodeObject=t.isMsgDelegateEncodeObject=t.isMsgCreateValidatorEncodeObject=t.isMsgBeginRedelegateEncodeObject=t.isAminoMsgUndelegate=t.isAminoMsgEditValidator=t.isAminoMsgDelegate=void 0;var n=r(16421);Object.defineProperty(t,"setupAuthExtension",{enumerable:!0,get:function(){return n.setupAuthExtension}});var i=r(68254);Object.defineProperty(t,"createAuthzAminoConverters",{enumerable:!0,get:function(){return i.createAuthzAminoConverters}});var o=r(69849);Object.defineProperty(t,"authzTypes",{enumerable:!0,get:function(){return o.authzTypes}});var a=r(80202);Object.defineProperty(t,"setupAuthzExtension",{enumerable:!0,get:function(){return a.setupAuthzExtension}});var s=r(54738);Object.defineProperty(t,"createBankAminoConverters",{enumerable:!0,get:function(){return s.createBankAminoConverters}}),Object.defineProperty(t,"isAminoMsgMultiSend",{enumerable:!0,get:function(){return s.isAminoMsgMultiSend}}),Object.defineProperty(t,"isAminoMsgSend",{enumerable:!0,get:function(){return s.isAminoMsgSend}});var l=r(46914);Object.defineProperty(t,"bankTypes",{enumerable:!0,get:function(){return l.bankTypes}}),Object.defineProperty(t,"isMsgSendEncodeObject",{enumerable:!0,get:function(){return l.isMsgSendEncodeObject}});var u=r(31199);Object.defineProperty(t,"setupBankExtension",{enumerable:!0,get:function(){return u.setupBankExtension}});var d=r(3482);Object.defineProperty(t,"createCrysisAminoConverters",{enumerable:!0,get:function(){return d.createCrysisAminoConverters}}),Object.defineProperty(t,"isAminoMsgVerifyInvariant",{enumerable:!0,get:function(){return d.isAminoMsgVerifyInvariant}});var c=r(13944);Object.defineProperty(t,"createDistributionAminoConverters",{enumerable:!0,get:function(){return c.createDistributionAminoConverters}}),Object.defineProperty(t,"isAminoMsgFundCommunityPool",{enumerable:!0,get:function(){return c.isAminoMsgFundCommunityPool}}),Object.defineProperty(t,"isAminoMsgSetWithdrawAddress",{enumerable:!0,get:function(){return c.isAminoMsgSetWithdrawAddress}}),Object.defineProperty(t,"isAminoMsgWithdrawDelegatorReward",{enumerable:!0,get:function(){return c.isAminoMsgWithdrawDelegatorReward}}),Object.defineProperty(t,"isAminoMsgWithdrawValidatorCommission",{enumerable:!0,get:function(){return c.isAminoMsgWithdrawValidatorCommission}});var p=r(34302);Object.defineProperty(t,"distributionTypes",{enumerable:!0,get:function(){return p.distributionTypes}}),Object.defineProperty(t,"isMsgWithdrawDelegatorRewardEncodeObject",{enumerable:!0,get:function(){return p.isMsgWithdrawDelegatorRewardEncodeObject}});var f=r(52554);Object.defineProperty(t,"setupDistributionExtension",{enumerable:!0,get:function(){return f.setupDistributionExtension}});var h=r(6779);Object.defineProperty(t,"createEvidenceAminoConverters",{enumerable:!0,get:function(){return h.createEvidenceAminoConverters}}),Object.defineProperty(t,"isAminoMsgSubmitEvidence",{enumerable:!0,get:function(){return h.isAminoMsgSubmitEvidence}});var g=r(98732);Object.defineProperty(t,"createFeegrantAminoConverters",{enumerable:!0,get:function(){return g.createFeegrantAminoConverters}});var m=r(42051);Object.defineProperty(t,"feegrantTypes",{enumerable:!0,get:function(){return m.feegrantTypes}});var y=r(1277);Object.defineProperty(t,"setupFeegrantExtension",{enumerable:!0,get:function(){return y.setupFeegrantExtension}});var v=r(40384);Object.defineProperty(t,"createGovAminoConverters",{enumerable:!0,get:function(){return v.createGovAminoConverters}}),Object.defineProperty(t,"isAminoMsgDeposit",{enumerable:!0,get:function(){return v.isAminoMsgDeposit}}),Object.defineProperty(t,"isAminoMsgSubmitProposal",{enumerable:!0,get:function(){return v.isAminoMsgSubmitProposal}}),Object.defineProperty(t,"isAminoMsgVote",{enumerable:!0,get:function(){return v.isAminoMsgVote}}),Object.defineProperty(t,"isAminoMsgVoteWeighted",{enumerable:!0,get:function(){return v.isAminoMsgVoteWeighted}});var b=r(50804);Object.defineProperty(t,"govTypes",{enumerable:!0,get:function(){return b.govTypes}}),Object.defineProperty(t,"isMsgDepositEncodeObject",{enumerable:!0,get:function(){return b.isMsgDepositEncodeObject}}),Object.defineProperty(t,"isMsgSubmitProposalEncodeObject",{enumerable:!0,get:function(){return b.isMsgSubmitProposalEncodeObject}}),Object.defineProperty(t,"isMsgVoteEncodeObject",{enumerable:!0,get:function(){return b.isMsgVoteEncodeObject}}),Object.defineProperty(t,"isMsgVoteWeightedEncodeObject",{enumerable:!0,get:function(){return b.isMsgVoteWeightedEncodeObject}});var S=r(52952);Object.defineProperty(t,"setupGovExtension",{enumerable:!0,get:function(){return S.setupGovExtension}});var w=r(87010);Object.defineProperty(t,"createGroupAminoConverters",{enumerable:!0,get:function(){return w.createGroupAminoConverters}});var _=r(30220);Object.defineProperty(t,"groupTypes",{enumerable:!0,get:function(){return _.groupTypes}});var k=r(6065);Object.defineProperty(t,"createIbcAminoConverters",{enumerable:!0,get:function(){return k.createIbcAminoConverters}}),Object.defineProperty(t,"isAminoMsgTransfer",{enumerable:!0,get:function(){return k.isAminoMsgTransfer}});var O=r(96239);Object.defineProperty(t,"ibcTypes",{enumerable:!0,get:function(){return O.ibcTypes}}),Object.defineProperty(t,"isMsgTransferEncodeObject",{enumerable:!0,get:function(){return O.isMsgTransferEncodeObject}});var P=r(28265);Object.defineProperty(t,"setupIbcExtension",{enumerable:!0,get:function(){return P.setupIbcExtension}});var A=r(85029);Object.defineProperty(t,"setupMintExtension",{enumerable:!0,get:function(){return A.setupMintExtension}});var I=r(91528);Object.defineProperty(t,"createSlashingAminoConverters",{enumerable:!0,get:function(){return I.createSlashingAminoConverters}}),Object.defineProperty(t,"isAminoMsgUnjail",{enumerable:!0,get:function(){return I.isAminoMsgUnjail}});var R=r(67801);Object.defineProperty(t,"setupSlashingExtension",{enumerable:!0,get:function(){return R.setupSlashingExtension}});var E=r(94389);Object.defineProperty(t,"createStakingAminoConverters",{enumerable:!0,get:function(){return E.createStakingAminoConverters}}),Object.defineProperty(t,"isAminoMsgBeginRedelegate",{enumerable:!0,get:function(){return E.isAminoMsgBeginRedelegate}}),Object.defineProperty(t,"isAminoMsgCreateValidator",{enumerable:!0,get:function(){return E.isAminoMsgCreateValidator}}),Object.defineProperty(t,"isAminoMsgDelegate",{enumerable:!0,get:function(){return E.isAminoMsgDelegate}}),Object.defineProperty(t,"isAminoMsgEditValidator",{enumerable:!0,get:function(){return E.isAminoMsgEditValidator}}),Object.defineProperty(t,"isAminoMsgUndelegate",{enumerable:!0,get:function(){return E.isAminoMsgUndelegate}});var T=r(11431);Object.defineProperty(t,"isMsgBeginRedelegateEncodeObject",{enumerable:!0,get:function(){return T.isMsgBeginRedelegateEncodeObject}}),Object.defineProperty(t,"isMsgCreateValidatorEncodeObject",{enumerable:!0,get:function(){return T.isMsgCreateValidatorEncodeObject}}),Object.defineProperty(t,"isMsgDelegateEncodeObject",{enumerable:!0,get:function(){return T.isMsgDelegateEncodeObject}}),Object.defineProperty(t,"isMsgEditValidatorEncodeObject",{enumerable:!0,get:function(){return T.isMsgEditValidatorEncodeObject}}),Object.defineProperty(t,"isMsgUndelegateEncodeObject",{enumerable:!0,get:function(){return T.isMsgUndelegateEncodeObject}}),Object.defineProperty(t,"stakingTypes",{enumerable:!0,get:function(){return T.stakingTypes}});var N=r(9615);Object.defineProperty(t,"setupStakingExtension",{enumerable:!0,get:function(){return N.setupStakingExtension}});var x=r(66398);Object.defineProperty(t,"setupTxExtension",{enumerable:!0,get:function(){return x.setupTxExtension}});var B=r(3018);Object.defineProperty(t,"createVestingAminoConverters",{enumerable:!0,get:function(){return B.createVestingAminoConverters}}),Object.defineProperty(t,"isAminoMsgCreateVestingAccount",{enumerable:!0,get:function(){return B.isAminoMsgCreateVestingAccount}});var C=r(27037);Object.defineProperty(t,"vestingTypes",{enumerable:!0,get:function(){return C.vestingTypes}})},85029:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setupMintExtension=void 0;let n=r(67357),i=r(16093),o=r(71185);function a(e){let t=(0,o.createProtobufRpcClient)(e),r=new i.QueryClientImpl(t);return{mint:{params:async()=>{let{params:e}=await r.Params({});return(0,n.assert)(e),{blocksPerYear:e.blocksPerYear,goalBonded:(0,o.decodeCosmosSdkDecFromProto)(e.goalBonded),inflationMin:(0,o.decodeCosmosSdkDecFromProto)(e.inflationMin),inflationMax:(0,o.decodeCosmosSdkDecFromProto)(e.inflationMax),inflationRateChange:(0,o.decodeCosmosSdkDecFromProto)(e.inflationRateChange),mintDenom:e.mintDenom}},inflation:async()=>{let{inflation:e}=await r.Inflation({});return(0,o.decodeCosmosSdkDecFromProto)(e)},annualProvisions:async()=>{let{annualProvisions:e}=await r.AnnualProvisions({});return(0,o.decodeCosmosSdkDecFromProto)(e)}}}}t.setupMintExtension=a},91528:function(e,t){"use strict";function r(e){return"cosmos-sdk/MsgUnjail"===e.type}function n(){throw Error("Not implemented")}Object.defineProperty(t,"__esModule",{value:!0}),t.createSlashingAminoConverters=t.isAminoMsgUnjail=void 0,t.isAminoMsgUnjail=r,t.createSlashingAminoConverters=n},67801:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setupSlashingExtension=void 0;let n=r(87778),i=r(71185);function o(e){let t=(0,i.createProtobufRpcClient)(e),r=new n.QueryClientImpl(t);return{slashing:{signingInfo:async e=>await r.SigningInfo({consAddress:e}),signingInfos:async e=>await r.SigningInfos({pagination:(0,i.createPagination)(e)}),params:async()=>await r.Params({})}}}t.setupSlashingExtension=o},94389:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createStakingAminoConverters=t.isAminoMsgUndelegate=t.isAminoMsgBeginRedelegate=t.isAminoMsgDelegate=t.isAminoMsgEditValidator=t.isAminoMsgCreateValidator=t.protoDecimalToJson=void 0;let n=r(35801),i=r(18722),o=r(67357);function a(e){let[t,r]=n.Decimal.fromAtomics(e,18).toString().split(".");return"".concat(t,".").concat((null!=r?r:"").padEnd(18,"0"))}function s(e){return n.Decimal.fromUserInput(e,18).atomics}function l(e){return"cosmos-sdk/MsgCreateValidator"===e.type}function u(e){return"cosmos-sdk/MsgEditValidator"===e.type}function d(e){return"cosmos-sdk/MsgDelegate"===e.type}function c(e){return"cosmos-sdk/MsgBeginRedelegate"===e.type}function p(e){return"cosmos-sdk/MsgUndelegate"===e.type}function f(){return{"/cosmos.staking.v1beta1.MsgBeginRedelegate":{aminoType:"cosmos-sdk/MsgBeginRedelegate",toAmino:e=>{let{delegatorAddress:t,validatorSrcAddress:r,validatorDstAddress:n,amount:i}=e;return(0,o.assertDefinedAndNotNull)(i,"missing amount"),{delegator_address:t,validator_src_address:r,validator_dst_address:n,amount:i}},fromAmino:e=>{let{delegator_address:t,validator_src_address:r,validator_dst_address:n,amount:i}=e;return{delegatorAddress:t,validatorSrcAddress:r,validatorDstAddress:n,amount:i}}},"/cosmos.staking.v1beta1.MsgCreateValidator":{aminoType:"cosmos-sdk/MsgCreateValidator",toAmino:e=>{let{description:t,commission:r,minSelfDelegation:n,delegatorAddress:s,validatorAddress:l,pubkey:u,value:d}=e;return(0,o.assertDefinedAndNotNull)(t,"missing description"),(0,o.assertDefinedAndNotNull)(r,"missing commission"),(0,o.assertDefinedAndNotNull)(u,"missing pubkey"),(0,o.assertDefinedAndNotNull)(d,"missing value"),{description:{moniker:t.moniker,identity:t.identity,website:t.website,security_contact:t.securityContact,details:t.details},commission:{rate:a(r.rate),max_rate:a(r.maxRate),max_change_rate:a(r.maxChangeRate)},min_self_delegation:n,delegator_address:s,validator_address:l,pubkey:(0,i.decodePubkey)(u),value:d}},fromAmino:e=>{let{description:t,commission:r,min_self_delegation:n,delegator_address:o,validator_address:a,pubkey:l,value:u}=e;return{description:{moniker:t.moniker,identity:t.identity,website:t.website,securityContact:t.security_contact,details:t.details},commission:{rate:s(r.rate),maxRate:s(r.max_rate),maxChangeRate:s(r.max_change_rate)},minSelfDelegation:n,delegatorAddress:o,validatorAddress:a,pubkey:(0,i.encodePubkey)(l),value:u}}},"/cosmos.staking.v1beta1.MsgDelegate":{aminoType:"cosmos-sdk/MsgDelegate",toAmino:e=>{let{delegatorAddress:t,validatorAddress:r,amount:n}=e;return(0,o.assertDefinedAndNotNull)(n,"missing amount"),{delegator_address:t,validator_address:r,amount:n}},fromAmino:e=>{let{delegator_address:t,validator_address:r,amount:n}=e;return{delegatorAddress:t,validatorAddress:r,amount:n}}},"/cosmos.staking.v1beta1.MsgEditValidator":{aminoType:"cosmos-sdk/MsgEditValidator",toAmino:e=>{let{description:t,commissionRate:r,minSelfDelegation:n,validatorAddress:i}=e;return(0,o.assertDefinedAndNotNull)(t,"missing description"),{description:{moniker:t.moniker,identity:t.identity,website:t.website,security_contact:t.securityContact,details:t.details},commission_rate:r?a(r):void 0,min_self_delegation:n||void 0,validator_address:i}},fromAmino:e=>{let{description:t,commission_rate:r,min_self_delegation:n,validator_address:i}=e;return{description:{moniker:t.moniker,identity:t.identity,website:t.website,securityContact:t.security_contact,details:t.details},commissionRate:r?s(r):"",minSelfDelegation:null!=n?n:"",validatorAddress:i}}},"/cosmos.staking.v1beta1.MsgUndelegate":{aminoType:"cosmos-sdk/MsgUndelegate",toAmino:e=>{let{delegatorAddress:t,validatorAddress:r,amount:n}=e;return(0,o.assertDefinedAndNotNull)(n,"missing amount"),{delegator_address:t,validator_address:r,amount:n}},fromAmino:e=>{let{delegator_address:t,validator_address:r,amount:n}=e;return{delegatorAddress:t,validatorAddress:r,amount:n}}}}}t.protoDecimalToJson=a,t.isAminoMsgCreateValidator=l,t.isAminoMsgEditValidator=u,t.isAminoMsgDelegate=d,t.isAminoMsgBeginRedelegate=c,t.isAminoMsgUndelegate=p,t.createStakingAminoConverters=f},11431:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isMsgUndelegateEncodeObject=t.isMsgEditValidatorEncodeObject=t.isMsgDelegateEncodeObject=t.isMsgCreateValidatorEncodeObject=t.isMsgBeginRedelegateEncodeObject=t.stakingTypes=void 0;let n=r(62884);function i(e){return"/cosmos.staking.v1beta1.MsgBeginRedelegate"===e.typeUrl}function o(e){return"/cosmos.staking.v1beta1.MsgCreateValidator"===e.typeUrl}function a(e){return"/cosmos.staking.v1beta1.MsgDelegate"===e.typeUrl}function s(e){return"/cosmos.staking.v1beta1.MsgEditValidator"===e.typeUrl}function l(e){return"/cosmos.staking.v1beta1.MsgUndelegate"===e.typeUrl}t.stakingTypes=[["/cosmos.staking.v1beta1.MsgBeginRedelegate",n.MsgBeginRedelegate],["/cosmos.staking.v1beta1.MsgCreateValidator",n.MsgCreateValidator],["/cosmos.staking.v1beta1.MsgDelegate",n.MsgDelegate],["/cosmos.staking.v1beta1.MsgEditValidator",n.MsgEditValidator],["/cosmos.staking.v1beta1.MsgUndelegate",n.MsgUndelegate]],t.isMsgBeginRedelegateEncodeObject=i,t.isMsgCreateValidatorEncodeObject=o,t.isMsgDelegateEncodeObject=a,t.isMsgEditValidatorEncodeObject=s,t.isMsgUndelegateEncodeObject=l},9615:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setupStakingExtension=void 0;let n=r(32776),i=r(71185);function o(e){let t=(0,i.createProtobufRpcClient)(e),r=new n.QueryClientImpl(t);return{staking:{delegation:async(e,t)=>await r.Delegation({delegatorAddr:e,validatorAddr:t}),delegatorDelegations:async(e,t)=>await r.DelegatorDelegations({delegatorAddr:e,pagination:(0,i.createPagination)(t)}),delegatorUnbondingDelegations:async(e,t)=>await r.DelegatorUnbondingDelegations({delegatorAddr:e,pagination:(0,i.createPagination)(t)}),delegatorValidator:async(e,t)=>await r.DelegatorValidator({delegatorAddr:e,validatorAddr:t}),delegatorValidators:async(e,t)=>await r.DelegatorValidators({delegatorAddr:e,pagination:(0,i.createPagination)(t)}),historicalInfo:async e=>await r.HistoricalInfo({height:BigInt(e)}),params:async()=>await r.Params({}),pool:async()=>await r.Pool({}),redelegations:async(e,t,n,o)=>await r.Redelegations({delegatorAddr:e,srcValidatorAddr:t,dstValidatorAddr:n,pagination:(0,i.createPagination)(o)}),unbondingDelegation:async(e,t)=>await r.UnbondingDelegation({delegatorAddr:e,validatorAddr:t}),validator:async e=>await r.Validator({validatorAddr:e}),validatorDelegations:async(e,t)=>await r.ValidatorDelegations({validatorAddr:e,pagination:(0,i.createPagination)(t)}),validators:async(e,t)=>await r.Validators({status:e,pagination:(0,i.createPagination)(t)}),validatorUnbondingDelegations:async(e,t)=>await r.ValidatorUnbondingDelegations({validatorAddr:e,pagination:(0,i.createPagination)(t)})}}}t.setupStakingExtension=o},66398:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setupTxExtension=void 0;let n=r(18722),i=r(2264),o=r(32468),a=r(26136),s=r(71185);function l(e){let t=(0,s.createProtobufRpcClient)(e),r=new o.ServiceClientImpl(t);return{tx:{getTx:async e=>{let t={hash:e};return await r.GetTx(t)},simulate:async(e,t,s,l)=>{let u=a.Tx.fromPartial({authInfo:a.AuthInfo.fromPartial({fee:a.Fee.fromPartial({}),signerInfos:[{publicKey:(0,n.encodePubkey)(s),sequence:BigInt(l),modeInfo:{single:{mode:i.SignMode.SIGN_MODE_UNSPECIFIED}}}]}),body:a.TxBody.fromPartial({messages:Array.from(e),memo:t}),signatures:[new Uint8Array]}),d=o.SimulateRequest.fromPartial({txBytes:a.Tx.encode(u).finish()});return await r.Simulate(d)}}}}t.setupTxExtension=l},3018:function(e,t){"use strict";function r(e){return"cosmos-sdk/MsgCreateVestingAccount"===e.type}function n(){return{"/cosmos.vesting.v1beta1.MsgCreateVestingAccount":{aminoType:"cosmos-sdk/MsgCreateVestingAccount",toAmino:e=>{let{fromAddress:t,toAddress:r,amount:n,endTime:i,delayed:o}=e;return{from_address:t,to_address:r,amount:[...n],end_time:i.toString(),delayed:o}},fromAmino:e=>{let{from_address:t,to_address:r,amount:n,end_time:i,delayed:o}=e;return{fromAddress:t,toAddress:r,amount:[...n],endTime:BigInt(i),delayed:o}}}}}Object.defineProperty(t,"__esModule",{value:!0}),t.createVestingAminoConverters=t.isAminoMsgCreateVestingAccount=void 0,t.isAminoMsgCreateVestingAccount=r,t.createVestingAminoConverters=n},27037:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.vestingTypes=void 0;let n=r(7633);t.vestingTypes=[["/cosmos.vesting.v1beta1.MsgCreateVestingAccount",n.MsgCreateVestingAccount]]},88080:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.makeMultisignedTxBytes=t.makeMultisignedTx=t.makeCompactBitArray=void 0;let n=r(83552),i=r(69721),o=r(18722),a=r(50263),s=r(2264),l=r(26136),u=r(26136);function d(e){let t=Math.ceil(e.length/8),r=e.length-8*Math.floor(e.length/8),n=new Uint8Array(t);return e.forEach((e,t)=>{let r=Math.floor(t/8),i=t%8;e&&(n[r]|=1<<7-i)}),a.CompactBitArray.fromPartial({elems:n,extraBitsStored:r})}function c(e,t,r,c,p){let f=Array.from(p.keys()),h=(0,i.fromBech32)(f[0]).prefix,g=Array(e.value.pubkeys.length).fill(!1),m=[];for(let t=0;t({single:{mode:s.SignMode.SIGN_MODE_LEGACY_AMINO_JSON}}))}},sequence:BigInt(t)},v=l.AuthInfo.fromPartial({signerInfos:[y],fee:{amount:[...r.amount],gasLimit:BigInt(r.gas)}}),b=l.AuthInfo.encode(v).finish();return u.TxRaw.fromPartial({bodyBytes:c,authInfoBytes:b,signatures:[a.MultiSignature.encode(a.MultiSignature.fromPartial({signatures:m})).finish()]})}function p(e,t,r,n,i){let o=c(e,t,r,n,i);return Uint8Array.from(u.TxRaw.encode(o).finish())}t.makeCompactBitArray=d,t.makeMultisignedTx=c,t.makeMultisignedTxBytes=p},71185:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.longify=t.decodeCosmosSdkDecFromProto=t.createProtobufRpcClient=t.createPagination=t.QueryClient=void 0;var n=r(94988);Object.defineProperty(t,"QueryClient",{enumerable:!0,get:function(){return n.QueryClient}});var i=r(35195);Object.defineProperty(t,"createPagination",{enumerable:!0,get:function(){return i.createPagination}}),Object.defineProperty(t,"createProtobufRpcClient",{enumerable:!0,get:function(){return i.createProtobufRpcClient}}),Object.defineProperty(t,"decodeCosmosSdkDecFromProto",{enumerable:!0,get:function(){return i.decodeCosmosSdkDecFromProto}}),Object.defineProperty(t,"longify",{enumerable:!0,get:function(){return i.longify}})},94988:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QueryClient=void 0;let n=r(70102),i=r(69721),o=r(15786),a=r(67357);function s(e,t,r){if(e.type!==t)throw Error("Op expected to be ".concat(t,', got "').concat(e.type));if(!(0,a.arrayContentEquals)(r,e.key))throw Error("Proven key different than queried key.\nQuery: ".concat((0,i.toHex)(r),"\nProven: ").concat((0,i.toHex)(e.key)));return n.ics23.CommitmentProof.decode(e.data)}class l{static withExtensions(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;ne(i)))for(let[t,r]of((0,a.assert)((0,a.isNonNullObject)(e),"Extension must be a non-null object"),Object.entries(e))){(0,a.assert)((0,a.isNonNullObject)(r),"Module must be a non-null object. Found type ".concat(typeof r,' for module "').concat(t,'".'));let e=i[t]||{};i[t]={...e,...r}}return i}async queryStoreVerified(e,t,r){let{height:o,proof:l,key:u,value:d}=await this.queryRawProof(e,t,r),c=s(l.ops[0],"ics23:iavl",t),p=s(l.ops[1],"ics23:simple",(0,i.toAscii)(e));(0,a.assert)(p.exist),(0,a.assert)(p.exist.value),d&&0!==d.length?((0,a.assert)(c.exist),(0,a.assert)(c.exist.value),(0,n.verifyExistence)(c.exist,n.iavlSpec,p.exist.value,t,d)):((0,a.assert)(c.nonexist),(0,n.verifyNonExistence)(c.nonexist,n.iavlSpec,p.exist.value,t));let f=await this.getNextHeader(o);return(0,n.verifyExistence)(p.exist,n.tendermintSpec,f.appHash,(0,i.toAscii)(e),p.exist.value),{key:u,value:d,height:o}}async queryRawProof(e,t,r){let{key:n,value:o,height:l,proof:u,code:d,log:c}=await this.cometClient.abciQuery({path:"/store/".concat(e,"/key"),data:t,prove:!0,height:r});if(d)throw Error("Query failed with (".concat(d,"): ").concat(c));if(!(0,a.arrayContentEquals)(t,n))throw Error("Response key ".concat((0,i.toHex)(n)," doesn't match query key ").concat((0,i.toHex)(t)));if(!l)throw Error("No query height returned");if(!u||2!==u.ops.length){var p;throw Error("Expected 2 proof ops, got ".concat(null!==(p=null==u?void 0:u.ops.length)&&void 0!==p?p:0,". Are you using stargate?"))}return s(u.ops[0],"ics23:iavl",n),s(u.ops[1],"ics23:simple",(0,i.toAscii)(e)),{key:n,value:o,height:l,proof:{ops:[...u.ops]}}}async queryAbci(e,t,r){let n=await this.cometClient.abciQuery({path:e,data:t,prove:!1,height:r});if(n.code)throw Error("Query failed with (".concat(n.code,"): ").concat(n.log));if(!n.height)throw Error("No query height returned");return{value:n.value,height:n.height}}async getNextHeader(e){let t,r;if((0,a.assertDefined)(e),0===e)throw Error("Query returned height 0, cannot prove it");let n=e+1;try{r=this.cometClient.subscribeNewBlockHeader()}catch(e){}if(r){let e=await (0,o.firstEvent)(r);e.height===n&&(t=e)}for(;!t;){let r=(await this.cometClient.blockchain(e,n)).blockMetas.map(e=>e.header).find(e=>e.height===n);r?t=r:await (0,a.sleep)(1e3)}return(0,a.assert)(t.height===n,"Got wrong header. This is a bug in the logic above."),t}constructor(e){this.cometClient=e}}t.QueryClient=l},35195:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeCosmosSdkDecFromProto=t.longify=t.createProtobufRpcClient=t.createPagination=t.toAccAddress=void 0;let n=r(69721),i=r(35801),o=r(86141);function a(e){return(0,n.fromBech32)(e).data}function s(e){return e?o.PageRequest.fromPartial({key:e}):o.PageRequest.fromPartial({})}function l(e){return{request:async(t,r,n)=>{let i="/".concat(t,"/").concat(r);return(await e.queryAbci(i,n,void 0)).value}}}function u(e){return BigInt(i.Uint64.fromString(e.toString()).toString())}function d(e){let t="string"==typeof e?e:(0,n.fromAscii)(e);return i.Decimal.fromAtomics(t,18)}t.toAccAddress=a,t.createPagination=s,t.createProtobufRpcClient=l,t.longify=u,t.decodeCosmosSdkDecFromProto=d},66750:function(e,t){"use strict";function r(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.isSearchTxQueryArray=void 0,t.isSearchTxQueryArray=r},54449:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SigningStargateClient=t.createDefaultAminoConverters=t.defaultRegistryTypes=void 0;let n=r(83552),i=r(69721),o=r(35801),a=r(18722),s=r(43890),l=r(67357),u=r(14841),d=r(53856),c=r(62884),p=r(2264),f=r(26136),h=r(7337),g=r(23478),m=r(10312),y=r(19938),v=r(19938),b=r(25087);function S(){return{...(0,v.createAuthzAminoConverters)(),...(0,v.createBankAminoConverters)(),...(0,v.createDistributionAminoConverters)(),...(0,v.createGovAminoConverters)(),...(0,v.createStakingAminoConverters)(),...(0,v.createIbcAminoConverters)(),...(0,v.createFeegrantAminoConverters)(),...(0,v.createVestingAminoConverters)()}}t.defaultRegistryTypes=[["/cosmos.base.v1beta1.Coin",u.Coin],...y.authzTypes,...y.bankTypes,...y.distributionTypes,...y.feegrantTypes,...y.govTypes,...y.groupTypes,...y.stakingTypes,...y.ibcTypes,...y.vestingTypes],t.createDefaultAminoConverters=S;class w extends b.StargateClient{static async connectWithSigner(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=await (0,s.connectComet)(e);return w.createWithSigner(n,t,r)}static async createWithSigner(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return new w(e,t,r)}static async offline(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new w(void 0,e,t)}async simulate(e,t,r){let i=t.map(e=>this.registry.encodeAsAny(e)),a=(await this.signer.getAccounts()).find(t=>t.address===e);if(!a)throw Error("Failed to retrieve account from signer");let s=(0,n.encodeSecp256k1Pubkey)(a.pubkey),{sequence:u}=await this.getSequence(e),{gasInfo:d}=await this.forceGetQueryClient().tx.simulate(i,r,s,u);return(0,l.assertDefined)(d),o.Uint53.fromString(d.gasUsed.toString()).toNumber()}async sendTokens(e,t,r,n){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",o={typeUrl:"/cosmos.bank.v1beta1.MsgSend",value:{fromAddress:e,toAddress:t,amount:[...r]}};return this.signAndBroadcast(e,[o],n,i)}async delegateTokens(e,t,r,n){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",o={typeUrl:"/cosmos.staking.v1beta1.MsgDelegate",value:c.MsgDelegate.fromPartial({delegatorAddress:e,validatorAddress:t,amount:r})};return this.signAndBroadcast(e,[o],n,i)}async undelegateTokens(e,t,r,n){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",o={typeUrl:"/cosmos.staking.v1beta1.MsgUndelegate",value:c.MsgUndelegate.fromPartial({delegatorAddress:e,validatorAddress:t,amount:r})};return this.signAndBroadcast(e,[o],n,i)}async withdrawRewards(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",i={typeUrl:"/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward",value:d.MsgWithdrawDelegatorReward.fromPartial({delegatorAddress:e,validatorAddress:t})};return this.signAndBroadcast(e,[i],r,n)}async sendIbcTokens(e,t,r,n,i,o,a,s){let l=arguments.length>8&&void 0!==arguments[8]?arguments[8]:"",u=a?BigInt(a)*BigInt(1e9):void 0,d={typeUrl:"/ibc.applications.transfer.v1.MsgTransfer",value:h.MsgTransfer.fromPartial({sourcePort:n,sourceChannel:i,sender:e,receiver:t,token:r,timeoutHeight:o,timeoutTimestamp:u})};return this.signAndBroadcast(e,[d],s,l)}async signAndBroadcast(e,t,r){let n,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=arguments.length>4?arguments[4]:void 0;if("auto"==r||"number"==typeof r){(0,l.assertDefined)(this.gasPrice,"Gas price must be set in the client options when auto gas is used.");let o=await this.simulate(e,t,i),a="number"==typeof r?r:1.4;n=(0,m.calculateFee)(Math.round(o*a),this.gasPrice)}else n=r;let a=await this.sign(e,t,n,i,void 0,o),s=f.TxRaw.encode(a).finish();return this.broadcastTx(s,this.broadcastTimeoutMs,this.broadcastPollIntervalMs)}async signAndBroadcastSync(e,t,r){let n,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=arguments.length>4?arguments[4]:void 0;if("auto"==r||"number"==typeof r){(0,l.assertDefined)(this.gasPrice,"Gas price must be set in the client options when auto gas is used.");let o=await this.simulate(e,t,i),a="number"==typeof r?r:1.3;n=(0,m.calculateFee)(Math.round(o*a),this.gasPrice)}else n=r;let a=await this.sign(e,t,n,i,void 0,o),s=f.TxRaw.encode(a).finish();return this.broadcastTxSync(s)}async sign(e,t,r,n,i,o){let s;if(i)s=i;else{let{accountNumber:t,sequence:r}=await this.getSequence(e);s={accountNumber:t,sequence:r,chainId:await this.getChainId()}}return(0,a.isOfflineDirectSigner)(this.signer)?this.signDirect(e,t,r,n,s,o):this.signAmino(e,t,r,n,s,o)}async signAmino(e,t,r,s,u,d){let{accountNumber:c,sequence:h,chainId:g}=u;(0,l.assert)(!(0,a.isOfflineDirectSigner)(this.signer));let m=(await this.signer.getAccounts()).find(t=>t.address===e);if(!m)throw Error("Failed to retrieve account from signer");let y=(0,a.encodePubkey)((0,n.encodeSecp256k1Pubkey)(m.pubkey)),v=p.SignMode.SIGN_MODE_LEGACY_AMINO_JSON,b=t.map(e=>this.aminoTypes.toAmino(e)),S=(0,n.makeSignDoc)(b,r,g,s,c,h,d),{signature:w,signed:_}=await this.signer.signAmino(e,S),k={typeUrl:"/cosmos.tx.v1beta1.TxBody",value:{messages:_.msgs.map(e=>this.aminoTypes.fromAmino(e)),memo:_.memo,timeoutHeight:d}},O=this.registry.encode(k),P=o.Int53.fromString(_.fee.gas).toNumber(),A=o.Int53.fromString(_.sequence).toNumber(),I=(0,a.makeAuthInfoBytes)([{pubkey:y,sequence:A}],_.fee.amount,P,_.fee.granter,_.fee.payer,v);return f.TxRaw.fromPartial({bodyBytes:O,authInfoBytes:I,signatures:[(0,i.fromBase64)(w.signature)]})}async signDirect(e,t,r,s,u,d){let{accountNumber:c,sequence:p,chainId:h}=u;(0,l.assert)((0,a.isOfflineDirectSigner)(this.signer));let g=(await this.signer.getAccounts()).find(t=>t.address===e);if(!g)throw Error("Failed to retrieve account from signer");let m=(0,a.encodePubkey)((0,n.encodeSecp256k1Pubkey)(g.pubkey)),y={typeUrl:"/cosmos.tx.v1beta1.TxBody",value:{messages:t,memo:s,timeoutHeight:d}},v=this.registry.encode(y),b=o.Int53.fromString(r.gas).toNumber(),S=(0,a.makeAuthInfoBytes)([{pubkey:m,sequence:p}],r.amount,b,r.granter,r.payer),w=(0,a.makeSignDoc)(v,S,h,c),{signature:_,signed:k}=await this.signer.signDirect(e,w);return f.TxRaw.fromPartial({bodyBytes:k.bodyBytes,authInfoBytes:k.authInfoBytes,signatures:[(0,i.fromBase64)(_.signature)]})}constructor(e,r,n){super(e,n);let{registry:i=new a.Registry(t.defaultRegistryTypes),aminoTypes:o=new g.AminoTypes(S())}=n;this.registry=i,this.aminoTypes=o,this.signer=r,this.broadcastTimeoutMs=n.broadcastTimeoutMs,this.broadcastPollIntervalMs=n.broadcastPollIntervalMs,this.gasPrice=n.gasPrice}}t.SigningStargateClient=w},25087:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StargateClient=t.BroadcastTxError=t.assertIsDeliverTxFailure=t.assertIsDeliverTxSuccess=t.isDeliverTxSuccess=t.isDeliverTxFailure=t.TimeoutError=void 0;let n=r(83552),i=r(69721),o=r(35801),a=r(43890),s=r(67357),l=r(94534),u=r(5491),d=r(61115),c=r(19938),p=r(71185),f=r(66750);class h extends Error{constructor(e,t){super(e),this.txId=t}}function g(e){return!!e.code}function m(e){return!g(e)}function y(e){if(g(e))throw Error("Error when broadcasting tx ".concat(e.transactionHash," at height ").concat(e.height,". Code: ").concat(e.code,"; Raw log: ").concat(e.rawLog))}function v(e){if(m(e))throw Error("Transaction ".concat(e.transactionHash," did not fail at height ").concat(e.height,". Code: ").concat(e.code,"; Raw log: ").concat(e.rawLog))}t.TimeoutError=h,t.isDeliverTxFailure=g,t.isDeliverTxSuccess=m,t.assertIsDeliverTxSuccess=y,t.assertIsDeliverTxFailure=v;class b extends Error{constructor(e,t,r){super("Broadcasting transaction failed with code ".concat(e," (codespace: ").concat(t,"). Log: ").concat(r)),this.code=e,this.codespace=t,this.log=r}}t.BroadcastTxError=b;class S{static async connect(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=await (0,a.connectComet)(e);return S.create(r,t)}static async create(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new S(e,t)}getCometClient(){return this.cometClient}forceGetCometClient(){if(!this.cometClient)throw Error("Comet client not available. You cannot use online functionality in offline mode.");return this.cometClient}getQueryClient(){return this.queryClient}forceGetQueryClient(){if(!this.queryClient)throw Error("Query client not available. You cannot use online functionality in offline mode.");return this.queryClient}async getChainId(){if(!this.chainId){let e=(await this.forceGetCometClient().status()).nodeInfo.network;if(!e)throw Error("Chain ID must not be empty");this.chainId=e}return this.chainId}async getHeight(){return(await this.forceGetCometClient().status()).syncInfo.latestBlockHeight}async getAccount(e){try{let t=await this.forceGetQueryClient().auth.account(e);return t?this.accountParser(t):null}catch(e){if(/rpc error: code = NotFound/i.test(e.toString()))return null;throw e}}async getSequence(e){let t=await this.getAccount(e);if(!t)throw Error("Account '".concat(e,"' does not exist on chain. Send some tokens there before trying to query sequence."));return{accountNumber:t.accountNumber,sequence:t.sequence}}async getBlock(e){let t=await this.forceGetCometClient().block(e);return{id:(0,i.toHex)(t.blockId.hash).toUpperCase(),header:{version:{block:new o.Uint53(t.block.header.version.block).toString(),app:new o.Uint53(t.block.header.version.app).toString()},height:t.block.header.height,chainId:t.block.header.chainId,time:(0,a.toRfc3339WithNanoseconds)(t.block.header.time)},txs:t.block.txs}}async getBalance(e,t){return this.forceGetQueryClient().bank.balance(e,t)}async getAllBalances(e){return this.forceGetQueryClient().bank.allBalances(e)}async getBalanceStaked(e){let t;let r=[];do{let{delegationResponses:n,pagination:i}=await this.forceGetQueryClient().staking.delegatorDelegations(e,t),o=n||[];r.push(...o),t=null==i?void 0:i.nextKey}while(void 0!==t&&0!==t.length);return r.reduce((e,t)=>((0,s.assert)(t.balance),null!==e?(0,n.addCoins)(e,t.balance):t.balance),null)}async getDelegation(e,t){let r;try{var n;r=null===(n=(await this.forceGetQueryClient().staking.delegation(e,t)).delegationResponse)||void 0===n?void 0:n.balance}catch(e){if(e.toString().includes("key not found"));else throw e}return r||null}async getTx(e){var t;return null!==(t=(await this.txsQuery("tx.hash='".concat(e,"'")))[0])&&void 0!==t?t:null}async searchTx(e){let t;if("string"==typeof e)t=e;else if((0,f.isSearchTxQueryArray)(e))t=e.map(e=>"string"==typeof e.value?"".concat(e.key,"='").concat(e.value,"'"):"".concat(e.key,"=").concat(e.value)).join(" AND ");else throw Error("Got unsupported query type. See CosmJS 0.31 CHANGELOG for API breaking changes here.");return this.txsQuery(t)}disconnect(){this.cometClient&&this.cometClient.disconnect()}async broadcastTx(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6e4,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3e3,n=!1,i=setTimeout(()=>{n=!0},t),o=async e=>{if(n)throw new h("Transaction with ID ".concat(e," was submitted but was not yet found on the chain. You might want to check later. There was a wait of ").concat(t/1e3," seconds."),e);await (0,s.sleep)(r);let i=await this.getTx(e);return i?{code:i.code,height:i.height,txIndex:i.txIndex,events:i.events,rawLog:i.rawLog,transactionHash:e,msgResponses:i.msgResponses,gasUsed:i.gasUsed,gasWanted:i.gasWanted}:o(e)},a=await this.broadcastTxSync(e);return new Promise((e,t)=>o(a).then(t=>{clearTimeout(i),e(t)},e=>{clearTimeout(i),t(e)}))}async broadcastTxSync(e){let t=await this.forceGetCometClient().broadcastTxSync({tx:e});if(t.code){var r;return Promise.reject(new b(t.code,null!==(r=t.codespace)&&void 0!==r?r:"",t.log))}return(0,i.toHex)(t.hash).toUpperCase()}async txsQuery(e){return(await this.forceGetCometClient().txSearchAll({query:e})).txs.map(e=>{var t;let r=l.TxMsgData.decode(null!==(t=e.result.data)&&void 0!==t?t:new Uint8Array);return{height:e.height,txIndex:e.index,hash:(0,i.toHex)(e.hash).toUpperCase(),code:e.result.code,events:e.result.events.map(d.fromTendermintEvent),rawLog:e.result.log||"",tx:e.tx,msgResponses:r.msgResponses,gasUsed:e.result.gasUsed,gasWanted:e.result.gasWanted}})}constructor(e,t){e&&(this.cometClient=e,this.queryClient=p.QueryClient.withExtensions(e,c.setupAuthExtension,c.setupBankExtension,c.setupStakingExtension,c.setupTxExtension));let{accountParser:r=u.accountFromAny}=t;this.accountParser=r}}t.StargateClient=S},90505:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.concat=void 0;let n=r(78518);function i(){for(var e=arguments.length,t=Array(e),r=0;r0;)i.shift().unsubscribe();o.length=0,a.clear(),s=0}let u={start:e=>{function r(t){for(;;){let r=o[t].shift();if(void 0===r)return;e.next(r)}}function n(){return s>=t.length}if(t.forEach(e=>o.push([])),n()){e.complete();return}t.forEach((t,u)=>{i.push(t.subscribe({next:t=>{u===s?e.next(t):o[u].push(t)},complete:()=>{for(a.add(u);a.has(s);)r(s),s++;n()?e.complete():r(s)},error:t=>{e.error(t),l()}}))})},stop:()=>{l()}};return n.Stream.create(u)}t.concat=i},78770:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultValueProducer=void 0;class r{get value(){return this.internalValue}update(e){this.internalValue=e,this.listener&&this.listener.next(e)}error(e){this.listener&&this.listener.error(e)}start(e){this.listener=e,e.next(this.internalValue),this.callbacks&&this.callbacks.onStarted()}stop(){this.callbacks&&this.callbacks.onStop(),this.listener=void 0}constructor(e,t){this.callbacks=t,this.internalValue=e}}t.DefaultValueProducer=r},43241:function(e,t){"use strict";function r(e){return t=>{let r=new Set;return t.filter(t=>!r.has(e(t))).debug(t=>r.add(e(t)))}}Object.defineProperty(t,"__esModule",{value:!0}),t.dropDuplicates=void 0,t.dropDuplicates=r},15786:function(e,t,r){"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.ValueAndUpdates=t.toListPromise=t.fromListPromise=t.firstEvent=t.dropDuplicates=t.DefaultValueProducer=t.concat=void 0;var o=r(90505);Object.defineProperty(t,"concat",{enumerable:!0,get:function(){return o.concat}});var a=r(78770);Object.defineProperty(t,"DefaultValueProducer",{enumerable:!0,get:function(){return a.DefaultValueProducer}});var s=r(43241);Object.defineProperty(t,"dropDuplicates",{enumerable:!0,get:function(){return s.dropDuplicates}});var l=r(87527);Object.defineProperty(t,"firstEvent",{enumerable:!0,get:function(){return l.firstEvent}}),Object.defineProperty(t,"fromListPromise",{enumerable:!0,get:function(){return l.fromListPromise}}),Object.defineProperty(t,"toListPromise",{enumerable:!0,get:function(){return l.toListPromise}}),i(r(89886),t);var u=r(7948);Object.defineProperty(t,"ValueAndUpdates",{enumerable:!0,get:function(){return u.ValueAndUpdates}})},87527:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.firstEvent=t.toListPromise=t.fromListPromise=void 0;let n=r(78518);function i(e){let t={start:t=>{e.then(e=>{for(let r of e)t.next(r);t.complete()}).catch(e=>t.error(e))},stop:()=>{}};return n.Stream.create(t)}async function o(e,t){return new Promise((r,n)=>{if(0===t){r([]);return}let i=[];e.take(t).subscribe({next:e=>{i.push(e),i.length===t&&r(i)},complete:()=>{n("Stream completed before all events could be collected. "+"Collected ".concat(i.length,", expected ").concat(t))},error:e=>n(e)})})}async function a(e){return(await o(e,1))[0]}t.fromListPromise=i,t.toListPromise=o,t.firstEvent=a},89886:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.lastValue=t.asArray=t.countStream=t.Reducer=void 0;class r{value(){return this.state}async finished(){return this.completed}constructor(e,t,r){this.stream=e,this.reducer=t,this.state=r,this.completed=new Promise((e,t)=>{let r=this.stream.subscribe({next:e=>{this.state=this.reducer(this.state,e)},complete:()=>{e(),r.unsubscribe()},error:e=>{t(e),r.unsubscribe()}})})}}function n(e,t){return e+1}function i(e){return new r(e,n,0)}function o(e,t){return[...e,t]}function a(e){return new r(e,o,[])}function s(e,t){return t}function l(e){return new r(e,s,void 0)}t.Reducer=r,t.countStream=i,t.asArray=a,t.lastValue=l},7948:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ValueAndUpdates=void 0;let n=r(78518);class i{get value(){return this.producer.value}async waitFor(e){let t="function"==typeof e?e:t=>t===e;return new Promise((e,r)=>{let n=this.updates.subscribe({next:r=>{t(r)&&(e(r),setTimeout(()=>n.unsubscribe(),0))},complete:()=>{n.unsubscribe(),r("Update stream completed without expected value")},error:e=>{r(e)}})})}constructor(e){this.producer=e,this.updates=n.MemoryStream.createWithMemory(this.producer)}}t.ValueAndUpdates=i},4157:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pubkeyToAddress=t.pubkeyToRawAddress=t.rawSecp256k1PubkeyToRawAddress=t.rawEd25519PubkeyToRawAddress=void 0;let n=r(49400),i=r(69721);function o(e){if(32!==e.length)throw Error("Invalid Ed25519 pubkey length: ".concat(e.length));return(0,n.sha256)(e).slice(0,20)}function a(e){if(33!==e.length)throw Error("Invalid Secp256k1 pubkey length (compressed): ".concat(e.length));return(0,n.ripemd160)((0,n.sha256)(e))}function s(e,t){switch(e){case"ed25519":return o(t);case"secp256k1":return a(t);default:throw Error("Pubkey type ".concat(e," not supported"))}}function l(e,t){return(0,i.toHex)(s(e,t)).toUpperCase()}t.rawEd25519PubkeyToRawAddress=o,t.rawSecp256k1PubkeyToRawAddress=a,t.pubkeyToRawAddress=s,t.pubkeyToAddress=l},97758:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Responses=t.Params=void 0;var n=r(42387);Object.defineProperty(t,"Params",{enumerable:!0,get:function(){return n.Params}});var i=r(30927);Object.defineProperty(t,"Responses",{enumerable:!0,get:function(){return i.Responses}})},42387:function(e,t,r){"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Params=void 0;let a=r(69721),s=r(38496),l=r(69594),u=r(67020),d=o(r(35174));function c(e){return{height:(0,u.may)(s.smallIntToApi,e.height)}}function p(e){return{minHeight:(0,u.may)(s.smallIntToApi,e.minHeight),maxHeight:(0,u.may)(s.smallIntToApi,e.maxHeight)}}function f(e){return{query:e.query,page:(0,u.may)(s.smallIntToApi,e.page),per_page:(0,u.may)(s.smallIntToApi,e.per_page),order_by:e.order_by}}function h(e){return{path:(0,u.assertNotEmpty)(e.path),data:(0,a.toHex)(e.data),height:(0,u.may)(s.smallIntToApi,e.height),prove:e.prove}}function g(e){return{tx:(0,a.toBase64)((0,u.assertNotEmpty)(e.tx))}}function m(e){return{hash:(0,a.toBase64)((0,u.assertNotEmpty)(e.hash)),prove:e.prove}}function y(e){return{query:e.query,prove:e.prove,page:(0,u.may)(s.smallIntToApi,e.page),per_page:(0,u.may)(s.smallIntToApi,e.per_page),order_by:e.order_by}}function v(e){return{height:(0,u.may)(s.smallIntToApi,e.height),page:(0,u.may)(s.smallIntToApi,e.page),per_page:(0,u.may)(s.smallIntToApi,e.per_page)}}class b{static encodeAbciInfo(e){return(0,l.createJsonRpcRequest)(e.method)}static encodeAbciQuery(e){return(0,l.createJsonRpcRequest)(e.method,h(e.params))}static encodeBlock(e){return(0,l.createJsonRpcRequest)(e.method,c(e.params))}static encodeBlockchain(e){return(0,l.createJsonRpcRequest)(e.method,p(e.params))}static encodeBlockResults(e){return(0,l.createJsonRpcRequest)(e.method,c(e.params))}static encodeBlockSearch(e){return(0,l.createJsonRpcRequest)(e.method,f(e.params))}static encodeBroadcastTx(e){return(0,l.createJsonRpcRequest)(e.method,g(e.params))}static encodeCommit(e){return(0,l.createJsonRpcRequest)(e.method,c(e.params))}static encodeGenesis(e){return(0,l.createJsonRpcRequest)(e.method)}static encodeHealth(e){return(0,l.createJsonRpcRequest)(e.method)}static encodeNumUnconfirmedTxs(e){return(0,l.createJsonRpcRequest)(e.method)}static encodeStatus(e){return(0,l.createJsonRpcRequest)(e.method)}static encodeSubscribe(e){let t={key:"tm.event",value:e.query.type},r=d.buildQuery({tags:[t],raw:e.query.raw});return(0,l.createJsonRpcRequest)("subscribe",{query:r})}static encodeTx(e){return(0,l.createJsonRpcRequest)(e.method,m(e.params))}static encodeTxSearch(e){return(0,l.createJsonRpcRequest)(e.method,y(e.params))}static encodeValidators(e){return(0,l.createJsonRpcRequest)(e.method,v(e.params))}}t.Params=b},30927:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Responses=t.decodeValidatorInfo=t.decodeValidatorGenesis=t.decodeValidatorUpdate=t.decodeEvent=void 0;let n=r(69721),i=r(67357),o=r(82002),a=r(38496),s=r(25492),l=r(67020),u=r(40909);function d(e){return{data:e.data,lastBlockHeight:(0,l.may)(a.apiToSmallInt,e.last_block_height),lastBlockAppHash:(0,l.may)(n.fromBase64,e.last_block_app_hash)}}function c(e){return{ops:e.ops.map(e=>({type:e.type,key:(0,n.fromBase64)(e.key),data:(0,n.fromBase64)(e.data)}))}}function p(e){var t,r,i,o;return{key:(0,n.fromBase64)((0,l.assertString)(null!==(t=e.key)&&void 0!==t?t:"")),value:(0,n.fromBase64)((0,l.assertString)(null!==(r=e.value)&&void 0!==r?r:"")),proof:(0,l.may)(c,e.proofOps),height:(0,l.may)(a.apiToSmallInt,e.height),code:(0,l.may)(a.apiToSmallInt,e.code),codespace:(0,l.assertString)(null!==(i=e.codespace)&&void 0!==i?i:""),index:(0,l.may)(a.apiToSmallInt,e.index),log:e.log,info:(0,l.assertString)(null!==(o=e.info)&&void 0!==o?o:"")}}function f(e){var t;return{key:(0,l.assertNotEmpty)(e.key),value:null!==(t=e.value)&&void 0!==t?t:""}}function h(e){return(0,l.assertArray)(e).map(f)}function g(e){return{type:e.type,attributes:e.attributes?h(e.attributes):[]}}function m(e){return(0,l.assertArray)(e).map(g)}function y(e){var t,r,i;return{code:(0,a.apiToSmallInt)((0,l.assertNumber)(null!==(t=e.code)&&void 0!==t?t:0)),codespace:e.codespace,log:e.log,data:(0,l.may)(n.fromBase64,e.data),events:e.events?m(e.events):[],gasWanted:(0,a.apiToBigInt)(null!==(r=e.gas_wanted)&&void 0!==r?r:"0"),gasUsed:(0,a.apiToBigInt)(null!==(i=e.gas_used)&&void 0!==i?i:"0")}}function v(e){if("Sum"in e){let[[t,r]]=Object.entries(e.Sum.value);return(0,i.assert)("ed25519"===t||"secp256k1"===t,"unknown pubkey type: ".concat(t)),{algorithm:t,data:(0,n.fromBase64)((0,l.assertNotEmpty)(r))}}switch(e.type){case"tendermint/PubKeyEd25519":return{algorithm:"ed25519",data:(0,n.fromBase64)((0,l.assertNotEmpty)(e.value))};case"tendermint/PubKeySecp256k1":return{algorithm:"secp256k1",data:(0,n.fromBase64)((0,l.assertNotEmpty)(e.value))};default:throw Error("unknown pubkey type: ".concat(e.type))}}function b(e){return{maxBytes:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.max_bytes)),maxGas:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.max_gas))}}function S(e){return{maxAgeNumBlocks:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.max_age_num_blocks)),maxAgeDuration:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.max_age_duration))}}function w(e){return{block:b((0,l.assertObject)(e.block)),evidence:S((0,l.assertObject)(e.evidence))}}function _(e){var t;return{pubkey:v((0,l.assertObject)(e.pub_key)),votingPower:(0,a.apiToBigInt)(null!==(t=e.power)&&void 0!==t?t:"0")}}function k(e){return{height:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.height)),results:(e.txs_results||[]).map(y),validatorUpdates:(e.validator_updates||[]).map(_),consensusUpdates:(0,l.may)(w,e.consensus_param_updates),beginBlockEvents:m(e.begin_block_events||[]),endBlockEvents:m(e.end_block_events||[])}}function O(e){return{hash:(0,n.fromHex)((0,l.assertNotEmpty)(e.hash)),parts:{total:(0,l.assertNotEmpty)(e.parts.total),hash:(0,n.fromHex)((0,l.assertNotEmpty)(e.parts.hash))}}}function P(e){var t;return{block:(0,a.apiToSmallInt)(e.block),app:(0,a.apiToSmallInt)(null!==(t=e.app)&&void 0!==t?t:0)}}function A(e){return{version:P(e.version),chainId:(0,l.assertNotEmpty)(e.chain_id),height:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.height)),time:(0,o.fromRfc3339WithNanoseconds)((0,l.assertNotEmpty)(e.time)),lastBlockId:e.last_block_id.hash?O(e.last_block_id):null,lastCommitHash:(0,n.fromHex)((0,l.assertSet)(e.last_commit_hash)),dataHash:(0,n.fromHex)((0,l.assertSet)(e.data_hash)),validatorsHash:(0,n.fromHex)((0,l.assertSet)(e.validators_hash)),nextValidatorsHash:(0,n.fromHex)((0,l.assertSet)(e.next_validators_hash)),consensusHash:(0,n.fromHex)((0,l.assertSet)(e.consensus_hash)),appHash:(0,n.fromHex)((0,l.assertSet)(e.app_hash)),lastResultsHash:(0,n.fromHex)((0,l.assertSet)(e.last_results_hash)),evidenceHash:(0,n.fromHex)((0,l.assertSet)(e.evidence_hash)),proposerAddress:(0,n.fromHex)((0,l.assertNotEmpty)(e.proposer_address))}}function I(e){return{blockId:O(e.block_id),blockSize:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.block_size)),header:A(e.header),numTxs:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.num_txs))}}function R(e){return{lastHeight:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.last_height)),blockMetas:(0,l.assertArray)(e.block_metas).map(I)}}function E(e){return{...y(e),hash:(0,n.fromHex)((0,l.assertNotEmpty)(e.hash))}}function T(e){let t=e.tx_result?y(e.tx_result):void 0;return{height:(0,a.apiToSmallInt)(e.height),hash:(0,n.fromHex)((0,l.assertNotEmpty)(e.hash)),checkTx:y((0,l.assertObject)(e.check_tx)),deliverTx:t,txResult:t}}function N(e){return(0,i.assert)(e in s.BlockIdFlag),e}function x(e){return{blockIdFlag:N(e.block_id_flag),validatorAddress:e.validator_address?(0,n.fromHex)(e.validator_address):void 0,timestamp:e.timestamp?(0,o.fromRfc3339WithNanoseconds)(e.timestamp):void 0,signature:e.signature?(0,n.fromBase64)(e.signature):void 0}}function B(e){return{blockId:O((0,l.assertObject)(e.block_id)),height:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.height)),round:(0,a.apiToSmallInt)(e.round),signatures:(0,l.assertArray)(e.signatures).map(x)}}function C(e){return{canonical:(0,l.assertBoolean)(e.canonical),header:A(e.signed_header.header),commit:B(e.signed_header.commit)}}function M(e){return{address:(0,n.fromHex)((0,l.assertNotEmpty)(e.address)),pubkey:v((0,l.assertObject)(e.pub_key)),votingPower:(0,a.apiToBigInt)((0,l.assertNotEmpty)(e.power))}}function D(e){return{genesisTime:(0,o.fromRfc3339WithNanoseconds)((0,l.assertNotEmpty)(e.genesis_time)),chainId:(0,l.assertNotEmpty)(e.chain_id),consensusParams:w(e.consensus_params),validators:e.validators?(0,l.assertArray)(e.validators).map(M):[],appHash:(0,n.fromHex)((0,l.assertSet)(e.app_hash)),appState:e.app_state}}function U(e){return{pubkey:v((0,l.assertObject)(e.pub_key)),votingPower:(0,a.apiToBigInt)((0,l.assertNotEmpty)(e.voting_power)),address:(0,n.fromHex)((0,l.assertNotEmpty)(e.address)),proposerPriority:e.proposer_priority?(0,a.apiToSmallInt)(e.proposer_priority):void 0}}function J(e){return{id:(0,n.fromHex)((0,l.assertNotEmpty)(e.id)),listenAddr:(0,l.assertNotEmpty)(e.listen_addr),network:(0,l.assertNotEmpty)(e.network),version:(0,l.assertString)(e.version),channels:(0,l.assertNotEmpty)(e.channels),moniker:(0,l.assertNotEmpty)(e.moniker),other:(0,l.dictionaryToStringMap)(e.other),protocolVersion:{app:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.protocol_version.app)),block:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.protocol_version.block)),p2p:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.protocol_version.p2p))}}}function j(e){let t=e.earliest_block_height?(0,a.apiToSmallInt)(e.earliest_block_height):void 0,r=e.earliest_block_time?(0,o.fromRfc3339WithNanoseconds)(e.earliest_block_time):void 0;return{earliestAppHash:e.earliest_app_hash?(0,n.fromHex)(e.earliest_app_hash):void 0,earliestBlockHash:e.earliest_block_hash?(0,n.fromHex)(e.earliest_block_hash):void 0,earliestBlockHeight:t||void 0,earliestBlockTime:(null==r?void 0:r.getTime())?r:void 0,latestBlockHash:(0,n.fromHex)((0,l.assertNotEmpty)(e.latest_block_hash)),latestAppHash:(0,n.fromHex)((0,l.assertNotEmpty)(e.latest_app_hash)),latestBlockTime:(0,o.fromRfc3339WithNanoseconds)((0,l.assertNotEmpty)(e.latest_block_time)),latestBlockHeight:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.latest_block_height)),catchingUp:(0,l.assertBoolean)(e.catching_up)}}function H(e){return{nodeInfo:J(e.node_info),syncInfo:j(e.sync_info),validatorInfo:U(e.validator_info)}}function q(e){return{data:(0,n.fromBase64)((0,l.assertNotEmpty)(e.data)),rootHash:(0,n.fromHex)((0,l.assertNotEmpty)(e.root_hash)),proof:{total:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.proof.total)),index:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.proof.index)),leafHash:(0,n.fromBase64)((0,l.assertNotEmpty)(e.proof.leaf_hash)),aunts:(0,l.assertArray)(e.proof.aunts).map(n.fromBase64)}}}function L(e){return{tx:(0,n.fromBase64)((0,l.assertNotEmpty)(e.tx)),result:y((0,l.assertObject)(e.tx_result)),height:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.height)),index:(0,a.apiToSmallInt)((0,l.assertNumber)(e.index)),hash:(0,n.fromHex)((0,l.assertNotEmpty)(e.hash)),proof:(0,l.may)(q,e.proof)}}function F(e){return{totalCount:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.total_count)),txs:(0,l.assertArray)(e.txs).map(L)}}function V(e){let t=(0,n.fromBase64)((0,l.assertNotEmpty)(e.tx));return{tx:t,hash:(0,u.hashTx)(t),result:y(e.result),height:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.height))}}function z(e){return{blockHeight:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.block_height)),validators:(0,l.assertArray)(e.validators).map(U),count:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.count)),total:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.total))}}function W(e){var t,r;return{header:A((0,l.assertObject)(e.header)),lastCommit:e.last_commit.block_id.hash?B((0,l.assertObject)(e.last_commit)):null,txs:e.data.txs?(0,l.assertArray)(e.data.txs).map(n.fromBase64):[],evidence:null!==(r=null===(t=e.evidence)||void 0===t?void 0:t.evidence)&&void 0!==r?r:[]}}function Q(e){return{blockId:O(e.block_id),block:W(e.block)}}function G(e){return{totalCount:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.total_count)),blocks:(0,l.assertArray)(e.blocks).map(Q)}}function K(e){return{total:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.total)),totalBytes:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.total_bytes))}}t.decodeEvent=g,t.decodeValidatorUpdate=_,t.decodeValidatorGenesis=M,t.decodeValidatorInfo=U;class Y{static decodeAbciInfo(e){return d((0,l.assertObject)(e.result.response))}static decodeAbciQuery(e){return p((0,l.assertObject)(e.result.response))}static decodeBlock(e){return Q(e.result)}static decodeBlockResults(e){return k(e.result)}static decodeBlockSearch(e){return G(e.result)}static decodeBlockchain(e){return R(e.result)}static decodeBroadcastTxSync(e){return E(e.result)}static decodeBroadcastTxAsync(e){return Y.decodeBroadcastTxSync(e)}static decodeBroadcastTxCommit(e){return T(e.result)}static decodeCommit(e){return C(e.result)}static decodeGenesis(e){return D((0,l.assertObject)(e.result.genesis))}static decodeHealth(){return null}static decodeNumUnconfirmedTxs(e){return K(e.result)}static decodeStatus(e){return H(e.result)}static decodeNewBlockEvent(e){return W(e.data.value.block)}static decodeNewBlockHeaderEvent(e){return A(e.data.value.header)}static decodeTxEvent(e){return V(e.data.value.TxResult)}static decodeTx(e){return L(e.result)}static decodeTxSearch(e){return F(e.result)}static decodeValidators(e){return z(e.result)}}t.Responses=Y},25660:function(e,t,r){"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Comet38Client=void 0;let a=r(69594),s=r(40064),l=r(97758),u=o(r(35174));class d{static async connect(e){let t;return t="object"==typeof e?new s.HttpClient(e):e.startsWith("http://")||e.startsWith("https://")?new s.HttpClient(e):new s.WebsocketClient(e),await this.detectVersion(t),d.create(t)}static async create(e){return new d(e)}static async detectVersion(e){let t=(0,a.createJsonRpcRequest)(u.Method.Status),r=(await e.execute(t)).result;if(!r||!r.node_info)throw Error("Unrecognized format for status response");let n=r.node_info.version;if("string"!=typeof n)throw Error("Unrecognized version format: must be string");return n}disconnect(){this.client.disconnect()}async abciInfo(){let e={method:u.Method.AbciInfo};return this.doCall(e,l.Params.encodeAbciInfo,l.Responses.decodeAbciInfo)}async abciQuery(e){let t={params:e,method:u.Method.AbciQuery};return this.doCall(t,l.Params.encodeAbciQuery,l.Responses.decodeAbciQuery)}async block(e){let t={method:u.Method.Block,params:{height:e}};return this.doCall(t,l.Params.encodeBlock,l.Responses.decodeBlock)}async blockResults(e){let t={method:u.Method.BlockResults,params:{height:e}};return this.doCall(t,l.Params.encodeBlockResults,l.Responses.decodeBlockResults)}async blockSearch(e){let t={params:e,method:u.Method.BlockSearch},r=await this.doCall(t,l.Params.encodeBlockSearch,l.Responses.decodeBlockSearch);return{...r,blocks:[...r.blocks].sort((e,t)=>e.block.header.height-t.block.header.height)}}async blockSearchAll(e){let t=e.page||1,r=[],n=!1;for(;!n;){let i=await this.blockSearch({...e,page:t});r.push(...i.blocks),r.lengthe.block.header.height-t.block.header.height),{totalCount:r.length,blocks:r}}async blockchain(e,t){let r={method:u.Method.Blockchain,params:{minHeight:e,maxHeight:t}};return this.doCall(r,l.Params.encodeBlockchain,l.Responses.decodeBlockchain)}async broadcastTxSync(e){let t={params:e,method:u.Method.BroadcastTxSync};return this.doCall(t,l.Params.encodeBroadcastTx,l.Responses.decodeBroadcastTxSync)}async broadcastTxAsync(e){let t={params:e,method:u.Method.BroadcastTxAsync};return this.doCall(t,l.Params.encodeBroadcastTx,l.Responses.decodeBroadcastTxAsync)}async broadcastTxCommit(e){let t={params:e,method:u.Method.BroadcastTxCommit};return this.doCall(t,l.Params.encodeBroadcastTx,l.Responses.decodeBroadcastTxCommit)}async commit(e){let t={method:u.Method.Commit,params:{height:e}};return this.doCall(t,l.Params.encodeCommit,l.Responses.decodeCommit)}async genesis(){let e={method:u.Method.Genesis};return this.doCall(e,l.Params.encodeGenesis,l.Responses.decodeGenesis)}async health(){let e={method:u.Method.Health};return this.doCall(e,l.Params.encodeHealth,l.Responses.decodeHealth)}async numUnconfirmedTxs(){let e={method:u.Method.NumUnconfirmedTxs};return this.doCall(e,l.Params.encodeNumUnconfirmedTxs,l.Responses.decodeNumUnconfirmedTxs)}async status(){let e={method:u.Method.Status};return this.doCall(e,l.Params.encodeStatus,l.Responses.decodeStatus)}subscribeNewBlock(){let e={method:u.Method.Subscribe,query:{type:u.SubscriptionEventType.NewBlock}};return this.subscribe(e,l.Responses.decodeNewBlockEvent)}subscribeNewBlockHeader(){let e={method:u.Method.Subscribe,query:{type:u.SubscriptionEventType.NewBlockHeader}};return this.subscribe(e,l.Responses.decodeNewBlockHeaderEvent)}subscribeTx(e){let t={method:u.Method.Subscribe,query:{type:u.SubscriptionEventType.Tx,raw:e}};return this.subscribe(t,l.Responses.decodeTxEvent)}async tx(e){let t={params:e,method:u.Method.Tx};return this.doCall(t,l.Params.encodeTx,l.Responses.decodeTx)}async txSearch(e){let t={params:e,method:u.Method.TxSearch};return this.doCall(t,l.Params.encodeTxSearch,l.Responses.decodeTxSearch)}async txSearchAll(e){let t=e.page||1,r=[],n=!1;for(;!n;){let i=await this.txSearch({...e,page:t});r.push(...i.txs),r.lengtht(e))}constructor(e){this.client=e}}t.Comet38Client=d},67020:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeBlockId=t.encodeVersion=t.encodeBytes=t.encodeTime=t.encodeUvarint=t.encodeString=t.dictionaryToStringMap=t.may=t.assertNotEmpty=t.assertObject=t.assertArray=t.assertNumber=t.assertString=t.assertBoolean=t.assertSet=void 0;let n=r(69721);function i(e){if(void 0===e)throw Error("Value must not be undefined");if(null===e)throw Error("Value must not be null");return e}function o(e){if(i(e),"boolean"!=typeof e)throw Error("Value must be a boolean");return e}function a(e){if(i(e),"string"!=typeof e)throw Error("Value must be a string");return e}function s(e){if(i(e),"number"!=typeof e)throw Error("Value must be a number");return e}function l(e){if(i(e),!Array.isArray(e))throw Error("Value must be a an array");return e}function u(e){if(i(e),"object"!=typeof e)throw Error("Value must be an object");if("[object Object]"!==Object.prototype.toString.call(e))throw Error("Value must be a simple object");return e}function d(e){if(i(e),"number"==typeof e&&0===e)throw Error("must provide a non-zero value");if(0===e.length)throw Error("must provide a non-empty value");return e}function c(e,t){return null==t?void 0:e(t)}function p(e){let t=new Map;for(let r of Object.keys(e)){let n=e[r];if("string"!=typeof n)throw Error("Found dictionary value of type other than string");t.set(r,n)}return t}function f(e){let t=(0,n.toUtf8)(e);return Uint8Array.from([t.length,...t])}function h(e){return e>=128?Uint8Array.from([255&e|128,...h(e>>7)]):Uint8Array.from([255&e])}function g(e){let t=e.getTime(),r=Math.floor(t/1e3),n=r?[8,...h(r)]:new Uint8Array,i=(e.nanoseconds||0)+t%1e3*1e6,o=i?[16,...h(i)]:new Uint8Array;return Uint8Array.from([...n,...o])}function m(e){if(e.length>=128)throw Error("Not implemented for byte arrays of length 128 or more");return e.length?Uint8Array.from([e.length,...e]):new Uint8Array}function y(e){let t=e.block?Uint8Array.from([8,...h(e.block)]):new Uint8Array,r=e.app?Uint8Array.from([16,...h(e.app)]):new Uint8Array;return Uint8Array.from([...t,...r])}function v(e){return Uint8Array.from([10,e.hash.length,...e.hash,18,e.parts.hash.length+4,8,e.parts.total,18,e.parts.hash.length,...e.parts.hash])}t.assertSet=i,t.assertBoolean=o,t.assertString=a,t.assertNumber=s,t.assertArray=l,t.assertObject=u,t.assertNotEmpty=d,t.may=c,t.dictionaryToStringMap=p,t.encodeString=f,t.encodeUvarint=h,t.encodeTime=g,t.encodeBytes=m,t.encodeVersion=y,t.encodeBlockId=v},40909:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hashBlock=t.hashTx=void 0;let n=r(49400),i=r(67020);function o(e){return(0,n.sha256)(e)}function a(e){if(e<1)throw Error("Cannot split an empty tree");let t=2**Math.floor(Math.log2(e));return t"".concat(e.key,"='").concat(e.value,"'")),...e.raw?[e.raw]:[]].join(" AND ")}Object.defineProperty(t,"__esModule",{value:!0}),t.buildQuery=t.SubscriptionEventType=t.Method=void 0,function(e){e.AbciInfo="abci_info",e.AbciQuery="abci_query",e.Block="block",e.Blockchain="blockchain",e.BlockResults="block_results",e.BlockSearch="block_search",e.BroadcastTxAsync="broadcast_tx_async",e.BroadcastTxSync="broadcast_tx_sync",e.BroadcastTxCommit="broadcast_tx_commit",e.Commit="commit",e.Genesis="genesis",e.Health="health",e.NumUnconfirmedTxs="num_unconfirmed_txs",e.Status="status",e.Subscribe="subscribe",e.Tx="tx",e.TxSearch="tx_search",e.Validators="validators",e.Unsubscribe="unsubscribe"}(r=t.Method||(t.Method={})),function(e){e.NewBlock="NewBlock",e.NewBlockHeader="NewBlockHeader",e.Tx="Tx"}(n=t.SubscriptionEventType||(t.SubscriptionEventType={})),t.buildQuery=i},69839:function(e,t){"use strict";var r;function n(e){return 0===e.code}function i(e){return 0===e.checkTx.code&&!!e.deliverTx&&0===e.deliverTx.code}Object.defineProperty(t,"__esModule",{value:!0}),t.VoteType=t.broadcastTxCommitSuccess=t.broadcastTxSyncSuccess=void 0,t.broadcastTxSyncSuccess=n,t.broadcastTxCommitSuccess=i,function(e){e[e.PreVote=1]="PreVote",e[e.PreCommit=2]="PreCommit"}(r=t.VoteType||(t.VoteType={}))},82002:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DateTime=t.toSeconds=t.fromSeconds=t.toRfc3339WithNanoseconds=t.fromRfc3339WithNanoseconds=void 0;let n=r(69721),i=r(35801);function o(e){let t=(0,n.fromRfc3339)(e),r=e.match(/\.(\d+)Z$/),i=r?r[1].slice(3):"";return t.nanoseconds=parseInt(i.padEnd(6,"0"),10),t}function a(e){var t,r;let n=e.toISOString(),i=null!==(r=null===(t=e.nanoseconds)||void 0===t?void 0:t.toString())&&void 0!==r?r:"";return"".concat(n.slice(0,-1)).concat(i.padStart(6,"0"),"Z")}function s(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=new i.Uint32(t).toNumber();if(r>999999999)throw Error("Nano seconds must not exceed 999999999");let n=new Date(1e3*e+Math.floor(r/1e6));return n.nanoseconds=r%1e6,n}function l(e){var t;return{seconds:Math.floor(e.getTime()/1e3),nanos:e.getTime()%1e3*1e6+(null!==(t=e.nanoseconds)&&void 0!==t?t:0)}}t.fromRfc3339WithNanoseconds=o,t.toRfc3339WithNanoseconds=a,t.fromSeconds=s,t.toSeconds=l;class u{static decode(e){return o(e)}static encode(e){return a(e)}}t.DateTime=u},43890:function(e,t,r){"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.BlockIdFlag=t.isTendermint37Client=t.isTendermint34Client=t.isComet38Client=t.connectComet=t.Tendermint37Client=t.tendermint37=t.Tendermint34Client=t.tendermint34=t.VoteType=t.SubscriptionEventType=t.Method=t.broadcastTxSyncSuccess=t.broadcastTxCommitSuccess=t.WebsocketClient=t.HttpClient=t.HttpBatchClient=t.Comet38Client=t.comet38=t.toSeconds=t.toRfc3339WithNanoseconds=t.fromSeconds=t.fromRfc3339WithNanoseconds=t.DateTime=t.rawSecp256k1PubkeyToRawAddress=t.rawEd25519PubkeyToRawAddress=t.pubkeyToRawAddress=t.pubkeyToAddress=void 0;var a=r(4157);Object.defineProperty(t,"pubkeyToAddress",{enumerable:!0,get:function(){return a.pubkeyToAddress}}),Object.defineProperty(t,"pubkeyToRawAddress",{enumerable:!0,get:function(){return a.pubkeyToRawAddress}}),Object.defineProperty(t,"rawEd25519PubkeyToRawAddress",{enumerable:!0,get:function(){return a.rawEd25519PubkeyToRawAddress}}),Object.defineProperty(t,"rawSecp256k1PubkeyToRawAddress",{enumerable:!0,get:function(){return a.rawSecp256k1PubkeyToRawAddress}});var s=r(82002);Object.defineProperty(t,"DateTime",{enumerable:!0,get:function(){return s.DateTime}}),Object.defineProperty(t,"fromRfc3339WithNanoseconds",{enumerable:!0,get:function(){return s.fromRfc3339WithNanoseconds}}),Object.defineProperty(t,"fromSeconds",{enumerable:!0,get:function(){return s.fromSeconds}}),Object.defineProperty(t,"toRfc3339WithNanoseconds",{enumerable:!0,get:function(){return s.toRfc3339WithNanoseconds}}),Object.defineProperty(t,"toSeconds",{enumerable:!0,get:function(){return s.toSeconds}}),t.comet38=o(r(38224));var l=r(38224);Object.defineProperty(t,"Comet38Client",{enumerable:!0,get:function(){return l.Comet38Client}});var u=r(40064);Object.defineProperty(t,"HttpBatchClient",{enumerable:!0,get:function(){return u.HttpBatchClient}}),Object.defineProperty(t,"HttpClient",{enumerable:!0,get:function(){return u.HttpClient}}),Object.defineProperty(t,"WebsocketClient",{enumerable:!0,get:function(){return u.WebsocketClient}});var d=r(26419);Object.defineProperty(t,"broadcastTxCommitSuccess",{enumerable:!0,get:function(){return d.broadcastTxCommitSuccess}}),Object.defineProperty(t,"broadcastTxSyncSuccess",{enumerable:!0,get:function(){return d.broadcastTxSyncSuccess}}),Object.defineProperty(t,"Method",{enumerable:!0,get:function(){return d.Method}}),Object.defineProperty(t,"SubscriptionEventType",{enumerable:!0,get:function(){return d.SubscriptionEventType}}),Object.defineProperty(t,"VoteType",{enumerable:!0,get:function(){return d.VoteType}}),t.tendermint34=o(r(26419));var c=r(26419);Object.defineProperty(t,"Tendermint34Client",{enumerable:!0,get:function(){return c.Tendermint34Client}}),t.tendermint37=o(r(18570));var p=r(18570);Object.defineProperty(t,"Tendermint37Client",{enumerable:!0,get:function(){return p.Tendermint37Client}});var f=r(98265);Object.defineProperty(t,"connectComet",{enumerable:!0,get:function(){return f.connectComet}}),Object.defineProperty(t,"isComet38Client",{enumerable:!0,get:function(){return f.isComet38Client}}),Object.defineProperty(t,"isTendermint34Client",{enumerable:!0,get:function(){return f.isTendermint34Client}}),Object.defineProperty(t,"isTendermint37Client",{enumerable:!0,get:function(){return f.isTendermint37Client}});var h=r(25492);Object.defineProperty(t,"BlockIdFlag",{enumerable:!0,get:function(){return h.BlockIdFlag}})},38496:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.smallIntToApi=t.apiToBigInt=t.apiToSmallInt=void 0;let n=r(35801),i=r(82276);function o(e){return("number"==typeof e?new n.Int53(e):n.Int53.fromString(e)).toNumber()}function a(e){if((0,i.assertString)(e),!e.match(/^-?[0-9]+$/))throw Error("Invalid string format");return BigInt(e)}function s(e){return new n.Int53(e).toString()}t.apiToSmallInt=o,t.apiToBigInt=a,t.smallIntToApi=s},69594:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createJsonRpcRequest=void 0;let r="123456789";function n(){return r[Math.floor(Math.random()*r.length)]}function i(){return parseInt(Array.from({length:12}).map(()=>n()).join(""),10)}function o(e,t){let r=t?{...t}:{};return{jsonrpc:"2.0",id:i(),method:e,params:r}}t.createJsonRpcRequest=o},65659:function(e,t,r){"use strict";var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.http=void 0;let i=n(r(64109));function o(e){if(e.status>=400)throw Error("Bad status on response: ".concat(e.status));return e}function a(e){return e.toString().includes("emitExperimentalWarning")}async function s(e,t,r,n){if("function"!=typeof fetch||a(fetch))return i.default.request({url:t,method:e,data:n,headers:r}).then(e=>e.data);{let i={method:e,body:n?JSON.stringify(n):void 0,headers:{"Content-Type":"application/json",...r}};return fetch(t,i).then(o).then(e=>e.json())}}t.http=s},19368:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HttpBatchClient=void 0;let n=r(79133),i=r(65659),o=r(94801),a={dispatchInterval:20,batchSizeLimit:20};class s{disconnect(){this.timer&&clearInterval(this.timer),this.timer=void 0}async execute(e){return new Promise((t,r)=>{this.queue.push({request:e,resolve:t,reject:r}),this.queue.length>=this.options.batchSizeLimit&&this.tick()})}validate(){if(!this.options.batchSizeLimit||!Number.isSafeInteger(this.options.batchSizeLimit)||this.options.batchSizeLimit<1)throw Error("batchSizeLimit must be a safe integer >= 1")}tick(){let e=this.queue.splice(0,this.options.batchSizeLimit);if(!e.length)return;let t=e.map(e=>e.request),r=t.map(e=>e.id);(0,i.http)("POST",this.url,this.headers,t).then(t=>{(Array.isArray(t)?t:[t]).forEach(t=>{let r=e.find(e=>e.request.id===t.id);if(!r)return;let{reject:i,resolve:o}=r,a=(0,n.parseJsonRpcResponse)(t);(0,n.isJsonRpcErrorResponse)(a)?i(Error(JSON.stringify(a.error))):o(a)})},t=>{for(let n of r){let r=e.find(e=>e.request.id===n);if(!r)return;r.reject(t)}})}constructor(e,t={}){var r,n;if(this.queue=[],this.options={batchSizeLimit:null!==(r=t.batchSizeLimit)&&void 0!==r?r:a.batchSizeLimit,dispatchInterval:null!==(n=t.dispatchInterval)&&void 0!==n?n:a.dispatchInterval},"string"==typeof e){if(!(0,o.hasProtocol)(e))throw Error("Endpoint URL is missing a protocol. Expected 'https://' or 'http://'.");this.url=e}else this.url=e.url,this.headers=e.headers;this.timer=setInterval(()=>this.tick(),t.dispatchInterval),this.validate()}}t.HttpBatchClient=s},83924:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HttpClient=void 0;let n=r(79133),i=r(65659),o=r(94801);class a{disconnect(){}async execute(e){let t=(0,n.parseJsonRpcResponse)(await (0,i.http)("POST",this.url,this.headers,e));if((0,n.isJsonRpcErrorResponse)(t))throw Error(JSON.stringify(t.error));return t}constructor(e){if("string"==typeof e){if(!(0,o.hasProtocol)(e))throw Error("Endpoint URL is missing a protocol. Expected 'https://' or 'http://'.");this.url=e}else this.url=e.url,this.headers=e.headers}}t.HttpClient=a},40064:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebsocketClient=t.instanceOfRpcStreamingClient=t.HttpClient=t.HttpBatchClient=void 0;var n=r(19368);Object.defineProperty(t,"HttpBatchClient",{enumerable:!0,get:function(){return n.HttpBatchClient}});var i=r(83924);Object.defineProperty(t,"HttpClient",{enumerable:!0,get:function(){return i.HttpClient}});var o=r(94801);Object.defineProperty(t,"instanceOfRpcStreamingClient",{enumerable:!0,get:function(){return o.instanceOfRpcStreamingClient}});var a=r(82259);Object.defineProperty(t,"WebsocketClient",{enumerable:!0,get:function(){return a.WebsocketClient}})},94801:function(e,t){"use strict";function r(e){return"function"==typeof e.listen}function n(e){return -1!==e.search("://")}Object.defineProperty(t,"__esModule",{value:!0}),t.hasProtocol=t.instanceOfRpcStreamingClient=void 0,t.instanceOfRpcStreamingClient=r,t.hasProtocol=n},82259:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebsocketClient=void 0;let n=r(79133),i=r(99593),o=r(15786),a=r(78518),s=r(94801);function l(e){throw e}function u(e){if("message"!==e.type)throw Error("Unexcepted message type on websocket: ".concat(e.type));return(0,n.parseJsonRpcResponse)(JSON.parse(e.data))}class d{start(e){if(this.running)throw Error("Already started. Please stop first before restarting.");this.running=!0,this.connectToClient(e),this.socket.queueRequest(JSON.stringify(this.request))}stop(){this.running=!1;let e={...this.request,method:"unsubscribe"};try{this.socket.queueRequest(JSON.stringify(e))}catch(e){if(e instanceof Error&&e.message.match(/socket has disconnected/i));else throw e}}connectToClient(e){let t=this.socket.events.map(u),r=t.filter(e=>e.id===this.request.id).subscribe({next:t=>{(0,n.isJsonRpcErrorResponse)(t)&&(this.closeSubscriptions(),e.error(JSON.stringify(t.error))),r.unsubscribe()}}),i=t.filter(e=>e.id===this.request.id).subscribe({next:t=>{(0,n.isJsonRpcErrorResponse)(t)?(this.closeSubscriptions(),e.error(JSON.stringify(t.error))):e.next(t.result)}}),o=t.subscribe({error:t=>{this.closeSubscriptions(),e.error(t)},complete:()=>{this.closeSubscriptions(),e.complete()}});this.subscriptions.push(r,i,o)}closeSubscriptions(){for(let e of this.subscriptions)e.unsubscribe();this.subscriptions=[]}constructor(e,t){this.running=!1,this.subscriptions=[],this.request=e,this.socket=t}}class c{async execute(e){let t=this.responseForRequestId(e.id);this.socket.queueRequest(JSON.stringify(e));let r=await t;if((0,n.isJsonRpcErrorResponse)(r))throw Error(JSON.stringify(r.error));return r}listen(e){if("subscribe"!==e.method)throw Error('Request method must be "subscribe" to start event listening');let t=e.params.query;if("string"!=typeof t)throw Error("request.params.query must be a string");if(!this.subscriptionStreams.has(t)){let r=new d(e,this.socket),n=a.Stream.create(r);this.subscriptionStreams.set(t,n)}return this.subscriptionStreams.get(t).filter(e=>void 0!==e.query)}async connected(){await this.socket.connectionStatus.waitFor(i.ConnectionStatus.Connected)}disconnect(){this.socket.disconnect()}async responseForRequestId(e){return(0,o.firstEvent)(this.jsonRpcResponseStream.filter(t=>t.id===e))}constructor(e,t=l){if(this.subscriptionStreams=new Map,!(0,s.hasProtocol)(e))throw Error("Base URL is missing a protocol. Expected 'ws://' or 'wss://'.");let r=e.endsWith("/")?"websocket":"/websocket";this.url=e+r,this.socket=new i.ReconnectingSocket(this.url);let n=this.socket.events.subscribe({error:e=>{t(e),n.unsubscribe()}});this.jsonRpcResponseStream=this.socket.events.map(u),this.socket.connect()}}t.WebsocketClient=c},96920:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Responses=t.Params=void 0;var n=r(45965);Object.defineProperty(t,"Params",{enumerable:!0,get:function(){return n.Params}});var i=r(93976);Object.defineProperty(t,"Responses",{enumerable:!0,get:function(){return i.Responses}})},45965:function(e,t,r){"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Params=void 0;let a=r(69721),s=r(38496),l=r(69594),u=r(82276),d=o(r(76378));function c(e){return{height:(0,u.may)(s.smallIntToApi,e.height)}}function p(e){return{minHeight:(0,u.may)(s.smallIntToApi,e.minHeight),maxHeight:(0,u.may)(s.smallIntToApi,e.maxHeight)}}function f(e){return{query:e.query,page:(0,u.may)(s.smallIntToApi,e.page),per_page:(0,u.may)(s.smallIntToApi,e.per_page),order_by:e.order_by}}function h(e){return{path:(0,u.assertNotEmpty)(e.path),data:(0,a.toHex)(e.data),height:(0,u.may)(s.smallIntToApi,e.height),prove:e.prove}}function g(e){return{tx:(0,a.toBase64)((0,u.assertNotEmpty)(e.tx))}}function m(e){return{hash:(0,a.toBase64)((0,u.assertNotEmpty)(e.hash)),prove:e.prove}}function y(e){return{query:e.query,prove:e.prove,page:(0,u.may)(s.smallIntToApi,e.page),per_page:(0,u.may)(s.smallIntToApi,e.per_page),order_by:e.order_by}}function v(e){return{height:(0,u.may)(s.smallIntToApi,e.height),page:(0,u.may)(s.smallIntToApi,e.page),per_page:(0,u.may)(s.smallIntToApi,e.per_page)}}class b{static encodeAbciInfo(e){return(0,l.createJsonRpcRequest)(e.method)}static encodeAbciQuery(e){return(0,l.createJsonRpcRequest)(e.method,h(e.params))}static encodeBlock(e){return(0,l.createJsonRpcRequest)(e.method,c(e.params))}static encodeBlockchain(e){return(0,l.createJsonRpcRequest)(e.method,p(e.params))}static encodeBlockResults(e){return(0,l.createJsonRpcRequest)(e.method,c(e.params))}static encodeBlockSearch(e){return(0,l.createJsonRpcRequest)(e.method,f(e.params))}static encodeBroadcastTx(e){return(0,l.createJsonRpcRequest)(e.method,g(e.params))}static encodeCommit(e){return(0,l.createJsonRpcRequest)(e.method,c(e.params))}static encodeGenesis(e){return(0,l.createJsonRpcRequest)(e.method)}static encodeHealth(e){return(0,l.createJsonRpcRequest)(e.method)}static encodeNumUnconfirmedTxs(e){return(0,l.createJsonRpcRequest)(e.method)}static encodeStatus(e){return(0,l.createJsonRpcRequest)(e.method)}static encodeSubscribe(e){let t={key:"tm.event",value:e.query.type},r=d.buildQuery({tags:[t],raw:e.query.raw});return(0,l.createJsonRpcRequest)("subscribe",{query:r})}static encodeTx(e){return(0,l.createJsonRpcRequest)(e.method,m(e.params))}static encodeTxSearch(e){return(0,l.createJsonRpcRequest)(e.method,y(e.params))}static encodeValidators(e){return(0,l.createJsonRpcRequest)(e.method,v(e.params))}}t.Params=b},93976:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Responses=t.decodeValidatorInfo=t.decodeValidatorGenesis=t.decodeValidatorUpdate=t.decodeEvent=void 0;let n=r(69721),i=r(67357),o=r(82002),a=r(38496),s=r(25492),l=r(82276),u=r(96568);function d(e){return{data:e.data,lastBlockHeight:(0,l.may)(a.apiToSmallInt,e.last_block_height),lastBlockAppHash:(0,l.may)(n.fromBase64,e.last_block_app_hash)}}function c(e){return{ops:e.ops.map(e=>({type:e.type,key:(0,n.fromBase64)(e.key),data:(0,n.fromBase64)(e.data)}))}}function p(e){var t,r,i,o;return{key:(0,n.fromBase64)((0,l.assertString)(null!==(t=e.key)&&void 0!==t?t:"")),value:(0,n.fromBase64)((0,l.assertString)(null!==(r=e.value)&&void 0!==r?r:"")),proof:(0,l.may)(c,e.proofOps),height:(0,l.may)(a.apiToSmallInt,e.height),code:(0,l.may)(a.apiToSmallInt,e.code),codespace:(0,l.assertString)(null!==(i=e.codespace)&&void 0!==i?i:""),index:(0,l.may)(a.apiToSmallInt,e.index),log:e.log,info:(0,l.assertString)(null!==(o=e.info)&&void 0!==o?o:"")}}function f(e){var t;return{key:(0,n.fromBase64)((0,l.assertNotEmpty)(e.key)),value:(0,n.fromBase64)((0,l.assertString)(null!==(t=e.value)&&void 0!==t?t:""))}}function h(e){return(0,l.assertArray)(e).map(f)}function g(e){return{type:e.type,attributes:e.attributes?h(e.attributes):[]}}function m(e){return(0,l.assertArray)(e).map(g)}function y(e){var t,r,i;return{code:(0,a.apiToSmallInt)((0,l.assertNumber)(null!==(t=e.code)&&void 0!==t?t:0)),codespace:e.codespace,log:e.log,data:(0,l.may)(n.fromBase64,e.data),events:e.events?m(e.events):[],gasWanted:(0,a.apiToBigInt)(null!==(r=e.gas_wanted)&&void 0!==r?r:"0"),gasUsed:(0,a.apiToBigInt)(null!==(i=e.gas_used)&&void 0!==i?i:"0")}}function v(e){if("Sum"in e){let[[t,r]]=Object.entries(e.Sum.value);return(0,i.assert)("ed25519"===t||"secp256k1"===t,"unknown pubkey type: ".concat(t)),{algorithm:t,data:(0,n.fromBase64)((0,l.assertNotEmpty)(r))}}switch(e.type){case"tendermint/PubKeyEd25519":return{algorithm:"ed25519",data:(0,n.fromBase64)((0,l.assertNotEmpty)(e.value))};case"tendermint/PubKeySecp256k1":return{algorithm:"secp256k1",data:(0,n.fromBase64)((0,l.assertNotEmpty)(e.value))};default:throw Error("unknown pubkey type: ".concat(e.type))}}function b(e){return{maxBytes:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.max_bytes)),maxGas:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.max_gas))}}function S(e){return{maxAgeNumBlocks:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.max_age_num_blocks)),maxAgeDuration:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.max_age_duration))}}function w(e){return{block:b((0,l.assertObject)(e.block)),evidence:S((0,l.assertObject)(e.evidence))}}function _(e){var t;return{pubkey:v((0,l.assertObject)(e.pub_key)),votingPower:(0,a.apiToBigInt)(null!==(t=e.power)&&void 0!==t?t:"0")}}function k(e){return{height:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.height)),results:(e.txs_results||[]).map(y),validatorUpdates:(e.validator_updates||[]).map(_),consensusUpdates:(0,l.may)(w,e.consensus_param_updates),beginBlockEvents:m(e.begin_block_events||[]),endBlockEvents:m(e.end_block_events||[])}}function O(e){return{hash:(0,n.fromHex)((0,l.assertNotEmpty)(e.hash)),parts:{total:(0,l.assertNotEmpty)(e.parts.total),hash:(0,n.fromHex)((0,l.assertNotEmpty)(e.parts.hash))}}}function P(e){var t;return{block:(0,a.apiToSmallInt)(e.block),app:(0,a.apiToSmallInt)(null!==(t=e.app)&&void 0!==t?t:0)}}function A(e){return{version:P(e.version),chainId:(0,l.assertNotEmpty)(e.chain_id),height:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.height)),time:(0,o.fromRfc3339WithNanoseconds)((0,l.assertNotEmpty)(e.time)),lastBlockId:e.last_block_id.hash?O(e.last_block_id):null,lastCommitHash:(0,n.fromHex)((0,l.assertSet)(e.last_commit_hash)),dataHash:(0,n.fromHex)((0,l.assertSet)(e.data_hash)),validatorsHash:(0,n.fromHex)((0,l.assertSet)(e.validators_hash)),nextValidatorsHash:(0,n.fromHex)((0,l.assertSet)(e.next_validators_hash)),consensusHash:(0,n.fromHex)((0,l.assertSet)(e.consensus_hash)),appHash:(0,n.fromHex)((0,l.assertSet)(e.app_hash)),lastResultsHash:(0,n.fromHex)((0,l.assertSet)(e.last_results_hash)),evidenceHash:(0,n.fromHex)((0,l.assertSet)(e.evidence_hash)),proposerAddress:(0,n.fromHex)((0,l.assertNotEmpty)(e.proposer_address))}}function I(e){return{blockId:O(e.block_id),blockSize:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.block_size)),header:A(e.header),numTxs:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.num_txs))}}function R(e){return{lastHeight:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.last_height)),blockMetas:(0,l.assertArray)(e.block_metas).map(I)}}function E(e){return{...y(e),hash:(0,n.fromHex)((0,l.assertNotEmpty)(e.hash))}}function T(e){return{height:(0,a.apiToSmallInt)(e.height),hash:(0,n.fromHex)((0,l.assertNotEmpty)(e.hash)),checkTx:y((0,l.assertObject)(e.check_tx)),deliverTx:(0,l.may)(y,e.deliver_tx)}}function N(e){return(0,i.assert)(e in s.BlockIdFlag),e}function x(e){return{blockIdFlag:N(e.block_id_flag),validatorAddress:e.validator_address?(0,n.fromHex)(e.validator_address):void 0,timestamp:e.timestamp?(0,o.fromRfc3339WithNanoseconds)(e.timestamp):void 0,signature:e.signature?(0,n.fromBase64)(e.signature):void 0}}function B(e){return{blockId:O((0,l.assertObject)(e.block_id)),height:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.height)),round:(0,a.apiToSmallInt)(e.round),signatures:(0,l.assertArray)(e.signatures).map(x)}}function C(e){return{canonical:(0,l.assertBoolean)(e.canonical),header:A(e.signed_header.header),commit:B(e.signed_header.commit)}}function M(e){return{address:(0,n.fromHex)((0,l.assertNotEmpty)(e.address)),pubkey:v((0,l.assertObject)(e.pub_key)),votingPower:(0,a.apiToBigInt)((0,l.assertNotEmpty)(e.power))}}function D(e){return{genesisTime:(0,o.fromRfc3339WithNanoseconds)((0,l.assertNotEmpty)(e.genesis_time)),chainId:(0,l.assertNotEmpty)(e.chain_id),consensusParams:w(e.consensus_params),validators:e.validators?(0,l.assertArray)(e.validators).map(M):[],appHash:(0,n.fromHex)((0,l.assertSet)(e.app_hash)),appState:e.app_state}}function U(e){return{pubkey:v((0,l.assertObject)(e.pub_key)),votingPower:(0,a.apiToBigInt)((0,l.assertNotEmpty)(e.voting_power)),address:(0,n.fromHex)((0,l.assertNotEmpty)(e.address)),proposerPriority:e.proposer_priority?(0,a.apiToSmallInt)(e.proposer_priority):void 0}}function J(e){return{id:(0,n.fromHex)((0,l.assertNotEmpty)(e.id)),listenAddr:(0,l.assertNotEmpty)(e.listen_addr),network:(0,l.assertNotEmpty)(e.network),version:(0,l.assertString)(e.version),channels:(0,l.assertNotEmpty)(e.channels),moniker:(0,l.assertNotEmpty)(e.moniker),other:(0,l.dictionaryToStringMap)(e.other),protocolVersion:{app:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.protocol_version.app)),block:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.protocol_version.block)),p2p:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.protocol_version.p2p))}}}function j(e){let t=e.earliest_block_height?(0,a.apiToSmallInt)(e.earliest_block_height):void 0,r=e.earliest_block_time?(0,o.fromRfc3339WithNanoseconds)(e.earliest_block_time):void 0;return{earliestAppHash:e.earliest_app_hash?(0,n.fromHex)(e.earliest_app_hash):void 0,earliestBlockHash:e.earliest_block_hash?(0,n.fromHex)(e.earliest_block_hash):void 0,earliestBlockHeight:t||void 0,earliestBlockTime:(null==r?void 0:r.getTime())?r:void 0,latestBlockHash:(0,n.fromHex)((0,l.assertNotEmpty)(e.latest_block_hash)),latestAppHash:(0,n.fromHex)((0,l.assertNotEmpty)(e.latest_app_hash)),latestBlockTime:(0,o.fromRfc3339WithNanoseconds)((0,l.assertNotEmpty)(e.latest_block_time)),latestBlockHeight:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.latest_block_height)),catchingUp:(0,l.assertBoolean)(e.catching_up)}}function H(e){return{nodeInfo:J(e.node_info),syncInfo:j(e.sync_info),validatorInfo:U(e.validator_info)}}function q(e){return{data:(0,n.fromBase64)((0,l.assertNotEmpty)(e.data)),rootHash:(0,n.fromHex)((0,l.assertNotEmpty)(e.root_hash)),proof:{total:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.proof.total)),index:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.proof.index)),leafHash:(0,n.fromBase64)((0,l.assertNotEmpty)(e.proof.leaf_hash)),aunts:(0,l.assertArray)(e.proof.aunts).map(n.fromBase64)}}}function L(e){return{tx:(0,n.fromBase64)((0,l.assertNotEmpty)(e.tx)),result:y((0,l.assertObject)(e.tx_result)),height:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.height)),index:(0,a.apiToSmallInt)((0,l.assertNumber)(e.index)),hash:(0,n.fromHex)((0,l.assertNotEmpty)(e.hash)),proof:(0,l.may)(q,e.proof)}}function F(e){return{totalCount:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.total_count)),txs:(0,l.assertArray)(e.txs).map(L)}}function V(e){let t=(0,n.fromBase64)((0,l.assertNotEmpty)(e.tx));return{tx:t,hash:(0,u.hashTx)(t),result:y(e.result),height:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.height))}}function z(e){return{blockHeight:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.block_height)),validators:(0,l.assertArray)(e.validators).map(U),count:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.count)),total:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.total))}}function W(e){var t,r;return{header:A((0,l.assertObject)(e.header)),lastCommit:e.last_commit.block_id.hash?B((0,l.assertObject)(e.last_commit)):null,txs:e.data.txs?(0,l.assertArray)(e.data.txs).map(n.fromBase64):[],evidence:null!==(r=null===(t=e.evidence)||void 0===t?void 0:t.evidence)&&void 0!==r?r:[]}}function Q(e){return{blockId:O(e.block_id),block:W(e.block)}}function G(e){return{totalCount:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.total_count)),blocks:(0,l.assertArray)(e.blocks).map(Q)}}function K(e){return{total:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.total)),totalBytes:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.total_bytes))}}t.decodeEvent=g,t.decodeValidatorUpdate=_,t.decodeValidatorGenesis=M,t.decodeValidatorInfo=U;class Y{static decodeAbciInfo(e){return d((0,l.assertObject)(e.result.response))}static decodeAbciQuery(e){return p((0,l.assertObject)(e.result.response))}static decodeBlock(e){return Q(e.result)}static decodeBlockResults(e){return k(e.result)}static decodeBlockSearch(e){return G(e.result)}static decodeBlockchain(e){return R(e.result)}static decodeBroadcastTxSync(e){return E(e.result)}static decodeBroadcastTxAsync(e){return Y.decodeBroadcastTxSync(e)}static decodeBroadcastTxCommit(e){return T(e.result)}static decodeCommit(e){return C(e.result)}static decodeGenesis(e){return D((0,l.assertObject)(e.result.genesis))}static decodeHealth(){return null}static decodeNumUnconfirmedTxs(e){return K(e.result)}static decodeStatus(e){return H(e.result)}static decodeNewBlockEvent(e){return W(e.data.value.block)}static decodeNewBlockHeaderEvent(e){return A(e.data.value.header)}static decodeTxEvent(e){return V(e.data.value.TxResult)}static decodeTx(e){return L(e.result)}static decodeTxSearch(e){return F(e.result)}static decodeValidators(e){return z(e.result)}}t.Responses=Y},82276:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeBlockId=t.encodeVersion=t.encodeBytes=t.encodeTime=t.encodeUvarint=t.encodeString=t.dictionaryToStringMap=t.may=t.assertNotEmpty=t.assertObject=t.assertArray=t.assertNumber=t.assertString=t.assertBoolean=t.assertSet=void 0;let n=r(69721);function i(e){if(void 0===e)throw Error("Value must not be undefined");if(null===e)throw Error("Value must not be null");return e}function o(e){if(i(e),"boolean"!=typeof e)throw Error("Value must be a boolean");return e}function a(e){if(i(e),"string"!=typeof e)throw Error("Value must be a string");return e}function s(e){if(i(e),"number"!=typeof e)throw Error("Value must be a number");return e}function l(e){if(i(e),!Array.isArray(e))throw Error("Value must be a an array");return e}function u(e){if(i(e),"object"!=typeof e)throw Error("Value must be an object");if("[object Object]"!==Object.prototype.toString.call(e))throw Error("Value must be a simple object");return e}function d(e){if(i(e),"number"==typeof e&&0===e)throw Error("must provide a non-zero value");if(0===e.length)throw Error("must provide a non-empty value");return e}function c(e,t){return null==t?void 0:e(t)}function p(e){let t=new Map;for(let r of Object.keys(e)){let n=e[r];if("string"!=typeof n)throw Error("Found dictionary value of type other than string");t.set(r,n)}return t}function f(e){let t=(0,n.toUtf8)(e);return Uint8Array.from([t.length,...t])}function h(e){return e>=128?Uint8Array.from([255&e|128,...h(e>>7)]):Uint8Array.from([255&e])}function g(e){let t=e.getTime(),r=Math.floor(t/1e3),n=r?[8,...h(r)]:new Uint8Array,i=(e.nanoseconds||0)+t%1e3*1e6,o=i?[16,...h(i)]:new Uint8Array;return Uint8Array.from([...n,...o])}function m(e){if(e.length>=128)throw Error("Not implemented for byte arrays of length 128 or more");return e.length?Uint8Array.from([e.length,...e]):new Uint8Array}function y(e){let t=e.block?Uint8Array.from([8,...h(e.block)]):new Uint8Array,r=e.app?Uint8Array.from([16,...h(e.app)]):new Uint8Array;return Uint8Array.from([...t,...r])}function v(e){return Uint8Array.from([10,e.hash.length,...e.hash,18,e.parts.hash.length+4,8,e.parts.total,18,e.parts.hash.length,...e.parts.hash])}t.assertSet=i,t.assertBoolean=o,t.assertString=a,t.assertNumber=s,t.assertArray=l,t.assertObject=u,t.assertNotEmpty=d,t.may=c,t.dictionaryToStringMap=p,t.encodeString=f,t.encodeUvarint=h,t.encodeTime=g,t.encodeBytes=m,t.encodeVersion=y,t.encodeBlockId=v},96568:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hashBlock=t.hashTx=void 0;let n=r(49400),i=r(82276);function o(e){return(0,n.sha256)(e)}function a(e){if(e<1)throw Error("Cannot split an empty tree");let t=2**Math.floor(Math.log2(e));return t"".concat(e.key,"='").concat(e.value,"'")),...e.raw?[e.raw]:[]].join(" AND ")}Object.defineProperty(t,"__esModule",{value:!0}),t.buildQuery=t.SubscriptionEventType=t.Method=void 0,function(e){e.AbciInfo="abci_info",e.AbciQuery="abci_query",e.Block="block",e.Blockchain="blockchain",e.BlockResults="block_results",e.BlockSearch="block_search",e.BroadcastTxAsync="broadcast_tx_async",e.BroadcastTxSync="broadcast_tx_sync",e.BroadcastTxCommit="broadcast_tx_commit",e.Commit="commit",e.Genesis="genesis",e.Health="health",e.NumUnconfirmedTxs="num_unconfirmed_txs",e.Status="status",e.Subscribe="subscribe",e.Tx="tx",e.TxSearch="tx_search",e.Validators="validators",e.Unsubscribe="unsubscribe"}(r=t.Method||(t.Method={})),function(e){e.NewBlock="NewBlock",e.NewBlockHeader="NewBlockHeader",e.Tx="Tx"}(n=t.SubscriptionEventType||(t.SubscriptionEventType={})),t.buildQuery=i},94152:function(e,t){"use strict";var r;function n(e){return 0===e.code}function i(e){return 0===e.checkTx.code&&!!e.deliverTx&&0===e.deliverTx.code}Object.defineProperty(t,"__esModule",{value:!0}),t.VoteType=t.broadcastTxCommitSuccess=t.broadcastTxSyncSuccess=void 0,t.broadcastTxSyncSuccess=n,t.broadcastTxCommitSuccess=i,function(e){e[e.PreVote=1]="PreVote",e[e.PreCommit=2]="PreCommit"}(r=t.VoteType||(t.VoteType={}))},73248:function(e,t,r){"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Tendermint34Client=void 0;let a=r(69594),s=r(40064),l=r(96920),u=o(r(76378));class d{static async connect(e){let t;return t="object"==typeof e?new s.HttpClient(e):e.startsWith("http://")||e.startsWith("https://")?new s.HttpClient(e):new s.WebsocketClient(e),await this.detectVersion(t),d.create(t)}static async create(e){return new d(e)}static async detectVersion(e){let t=(0,a.createJsonRpcRequest)(u.Method.Status),r=(await e.execute(t)).result;if(!r||!r.node_info)throw Error("Unrecognized format for status response");let n=r.node_info.version;if("string"!=typeof n)throw Error("Unrecognized version format: must be string");return n}disconnect(){this.client.disconnect()}async abciInfo(){let e={method:u.Method.AbciInfo};return this.doCall(e,l.Params.encodeAbciInfo,l.Responses.decodeAbciInfo)}async abciQuery(e){let t={params:e,method:u.Method.AbciQuery};return this.doCall(t,l.Params.encodeAbciQuery,l.Responses.decodeAbciQuery)}async block(e){let t={method:u.Method.Block,params:{height:e}};return this.doCall(t,l.Params.encodeBlock,l.Responses.decodeBlock)}async blockResults(e){let t={method:u.Method.BlockResults,params:{height:e}};return this.doCall(t,l.Params.encodeBlockResults,l.Responses.decodeBlockResults)}async blockSearch(e){let t={params:e,method:u.Method.BlockSearch},r=await this.doCall(t,l.Params.encodeBlockSearch,l.Responses.decodeBlockSearch);return{...r,blocks:[...r.blocks].sort((e,t)=>e.block.header.height-t.block.header.height)}}async blockSearchAll(e){let t=e.page||1,r=[],n=!1;for(;!n;){let i=await this.blockSearch({...e,page:t});r.push(...i.blocks),r.lengthe.block.header.height-t.block.header.height),{totalCount:r.length,blocks:r}}async blockchain(e,t){let r={method:u.Method.Blockchain,params:{minHeight:e,maxHeight:t}};return this.doCall(r,l.Params.encodeBlockchain,l.Responses.decodeBlockchain)}async broadcastTxSync(e){let t={params:e,method:u.Method.BroadcastTxSync};return this.doCall(t,l.Params.encodeBroadcastTx,l.Responses.decodeBroadcastTxSync)}async broadcastTxAsync(e){let t={params:e,method:u.Method.BroadcastTxAsync};return this.doCall(t,l.Params.encodeBroadcastTx,l.Responses.decodeBroadcastTxAsync)}async broadcastTxCommit(e){let t={params:e,method:u.Method.BroadcastTxCommit};return this.doCall(t,l.Params.encodeBroadcastTx,l.Responses.decodeBroadcastTxCommit)}async commit(e){let t={method:u.Method.Commit,params:{height:e}};return this.doCall(t,l.Params.encodeCommit,l.Responses.decodeCommit)}async genesis(){let e={method:u.Method.Genesis};return this.doCall(e,l.Params.encodeGenesis,l.Responses.decodeGenesis)}async health(){let e={method:u.Method.Health};return this.doCall(e,l.Params.encodeHealth,l.Responses.decodeHealth)}async numUnconfirmedTxs(){let e={method:u.Method.NumUnconfirmedTxs};return this.doCall(e,l.Params.encodeNumUnconfirmedTxs,l.Responses.decodeNumUnconfirmedTxs)}async status(){let e={method:u.Method.Status};return this.doCall(e,l.Params.encodeStatus,l.Responses.decodeStatus)}subscribeNewBlock(){let e={method:u.Method.Subscribe,query:{type:u.SubscriptionEventType.NewBlock}};return this.subscribe(e,l.Responses.decodeNewBlockEvent)}subscribeNewBlockHeader(){let e={method:u.Method.Subscribe,query:{type:u.SubscriptionEventType.NewBlockHeader}};return this.subscribe(e,l.Responses.decodeNewBlockHeaderEvent)}subscribeTx(e){let t={method:u.Method.Subscribe,query:{type:u.SubscriptionEventType.Tx,raw:e}};return this.subscribe(t,l.Responses.decodeTxEvent)}async tx(e){let t={params:e,method:u.Method.Tx};return this.doCall(t,l.Params.encodeTx,l.Responses.decodeTx)}async txSearch(e){let t={params:e,method:u.Method.TxSearch};return this.doCall(t,l.Params.encodeTxSearch,l.Responses.decodeTxSearch)}async txSearchAll(e){let t=e.page||1,r=[],n=!1;for(;!n;){let i=await this.txSearch({...e,page:t});r.push(...i.txs),r.lengtht(e))}constructor(e){this.client=e}}t.Tendermint34Client=d},54760:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Responses=t.Params=void 0;var n=r(34855);Object.defineProperty(t,"Params",{enumerable:!0,get:function(){return n.Params}});var i=r(95796);Object.defineProperty(t,"Responses",{enumerable:!0,get:function(){return i.Responses}})},34855:function(e,t,r){"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Params=void 0;let a=r(69721),s=r(38496),l=r(69594),u=r(90177),d=o(r(34720));function c(e){return{height:(0,u.may)(s.smallIntToApi,e.height)}}function p(e){return{minHeight:(0,u.may)(s.smallIntToApi,e.minHeight),maxHeight:(0,u.may)(s.smallIntToApi,e.maxHeight)}}function f(e){return{query:e.query,page:(0,u.may)(s.smallIntToApi,e.page),per_page:(0,u.may)(s.smallIntToApi,e.per_page),order_by:e.order_by}}function h(e){return{path:(0,u.assertNotEmpty)(e.path),data:(0,a.toHex)(e.data),height:(0,u.may)(s.smallIntToApi,e.height),prove:e.prove}}function g(e){return{tx:(0,a.toBase64)((0,u.assertNotEmpty)(e.tx))}}function m(e){return{hash:(0,a.toBase64)((0,u.assertNotEmpty)(e.hash)),prove:e.prove}}function y(e){return{query:e.query,prove:e.prove,page:(0,u.may)(s.smallIntToApi,e.page),per_page:(0,u.may)(s.smallIntToApi,e.per_page),order_by:e.order_by}}function v(e){return{height:(0,u.may)(s.smallIntToApi,e.height),page:(0,u.may)(s.smallIntToApi,e.page),per_page:(0,u.may)(s.smallIntToApi,e.per_page)}}class b{static encodeAbciInfo(e){return(0,l.createJsonRpcRequest)(e.method)}static encodeAbciQuery(e){return(0,l.createJsonRpcRequest)(e.method,h(e.params))}static encodeBlock(e){return(0,l.createJsonRpcRequest)(e.method,c(e.params))}static encodeBlockchain(e){return(0,l.createJsonRpcRequest)(e.method,p(e.params))}static encodeBlockResults(e){return(0,l.createJsonRpcRequest)(e.method,c(e.params))}static encodeBlockSearch(e){return(0,l.createJsonRpcRequest)(e.method,f(e.params))}static encodeBroadcastTx(e){return(0,l.createJsonRpcRequest)(e.method,g(e.params))}static encodeCommit(e){return(0,l.createJsonRpcRequest)(e.method,c(e.params))}static encodeGenesis(e){return(0,l.createJsonRpcRequest)(e.method)}static encodeHealth(e){return(0,l.createJsonRpcRequest)(e.method)}static encodeNumUnconfirmedTxs(e){return(0,l.createJsonRpcRequest)(e.method)}static encodeStatus(e){return(0,l.createJsonRpcRequest)(e.method)}static encodeSubscribe(e){let t={key:"tm.event",value:e.query.type},r=d.buildQuery({tags:[t],raw:e.query.raw});return(0,l.createJsonRpcRequest)("subscribe",{query:r})}static encodeTx(e){return(0,l.createJsonRpcRequest)(e.method,m(e.params))}static encodeTxSearch(e){return(0,l.createJsonRpcRequest)(e.method,y(e.params))}static encodeValidators(e){return(0,l.createJsonRpcRequest)(e.method,v(e.params))}}t.Params=b},95796:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Responses=t.decodeValidatorInfo=t.decodeValidatorGenesis=t.decodeValidatorUpdate=t.decodeEvent=void 0;let n=r(69721),i=r(67357),o=r(82002),a=r(38496),s=r(25492),l=r(90177),u=r(88475);function d(e){return{data:e.data,lastBlockHeight:(0,l.may)(a.apiToSmallInt,e.last_block_height),lastBlockAppHash:(0,l.may)(n.fromBase64,e.last_block_app_hash)}}function c(e){return{ops:e.ops.map(e=>({type:e.type,key:(0,n.fromBase64)(e.key),data:(0,n.fromBase64)(e.data)}))}}function p(e){var t,r,i,o;return{key:(0,n.fromBase64)((0,l.assertString)(null!==(t=e.key)&&void 0!==t?t:"")),value:(0,n.fromBase64)((0,l.assertString)(null!==(r=e.value)&&void 0!==r?r:"")),proof:(0,l.may)(c,e.proofOps),height:(0,l.may)(a.apiToSmallInt,e.height),code:(0,l.may)(a.apiToSmallInt,e.code),codespace:(0,l.assertString)(null!==(i=e.codespace)&&void 0!==i?i:""),index:(0,l.may)(a.apiToSmallInt,e.index),log:e.log,info:(0,l.assertString)(null!==(o=e.info)&&void 0!==o?o:"")}}function f(e){var t;return{key:(0,l.assertNotEmpty)(e.key),value:null!==(t=e.value)&&void 0!==t?t:""}}function h(e){return(0,l.assertArray)(e).map(f)}function g(e){return{type:e.type,attributes:e.attributes?h(e.attributes):[]}}function m(e){return(0,l.assertArray)(e).map(g)}function y(e){var t,r,i;return{code:(0,a.apiToSmallInt)((0,l.assertNumber)(null!==(t=e.code)&&void 0!==t?t:0)),codespace:e.codespace,log:e.log,data:(0,l.may)(n.fromBase64,e.data),events:e.events?m(e.events):[],gasWanted:(0,a.apiToBigInt)(null!==(r=e.gas_wanted)&&void 0!==r?r:"0"),gasUsed:(0,a.apiToBigInt)(null!==(i=e.gas_used)&&void 0!==i?i:"0")}}function v(e){if("Sum"in e){let[[t,r]]=Object.entries(e.Sum.value);return(0,i.assert)("ed25519"===t||"secp256k1"===t,"unknown pubkey type: ".concat(t)),{algorithm:t,data:(0,n.fromBase64)((0,l.assertNotEmpty)(r))}}switch(e.type){case"tendermint/PubKeyEd25519":return{algorithm:"ed25519",data:(0,n.fromBase64)((0,l.assertNotEmpty)(e.value))};case"tendermint/PubKeySecp256k1":return{algorithm:"secp256k1",data:(0,n.fromBase64)((0,l.assertNotEmpty)(e.value))};default:throw Error("unknown pubkey type: ".concat(e.type))}}function b(e){return{maxBytes:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.max_bytes)),maxGas:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.max_gas))}}function S(e){return{maxAgeNumBlocks:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.max_age_num_blocks)),maxAgeDuration:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.max_age_duration))}}function w(e){return{block:b((0,l.assertObject)(e.block)),evidence:S((0,l.assertObject)(e.evidence))}}function _(e){var t;return{pubkey:v((0,l.assertObject)(e.pub_key)),votingPower:(0,a.apiToBigInt)(null!==(t=e.power)&&void 0!==t?t:"0")}}function k(e){return{height:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.height)),results:(e.txs_results||[]).map(y),validatorUpdates:(e.validator_updates||[]).map(_),consensusUpdates:(0,l.may)(w,e.consensus_param_updates),beginBlockEvents:m(e.begin_block_events||[]),endBlockEvents:m(e.end_block_events||[])}}function O(e){return{hash:(0,n.fromHex)((0,l.assertNotEmpty)(e.hash)),parts:{total:(0,l.assertNotEmpty)(e.parts.total),hash:(0,n.fromHex)((0,l.assertNotEmpty)(e.parts.hash))}}}function P(e){var t;return{block:(0,a.apiToSmallInt)(e.block),app:(0,a.apiToSmallInt)(null!==(t=e.app)&&void 0!==t?t:0)}}function A(e){return{version:P(e.version),chainId:(0,l.assertNotEmpty)(e.chain_id),height:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.height)),time:(0,o.fromRfc3339WithNanoseconds)((0,l.assertNotEmpty)(e.time)),lastBlockId:e.last_block_id.hash?O(e.last_block_id):null,lastCommitHash:(0,n.fromHex)((0,l.assertSet)(e.last_commit_hash)),dataHash:(0,n.fromHex)((0,l.assertSet)(e.data_hash)),validatorsHash:(0,n.fromHex)((0,l.assertSet)(e.validators_hash)),nextValidatorsHash:(0,n.fromHex)((0,l.assertSet)(e.next_validators_hash)),consensusHash:(0,n.fromHex)((0,l.assertSet)(e.consensus_hash)),appHash:(0,n.fromHex)((0,l.assertSet)(e.app_hash)),lastResultsHash:(0,n.fromHex)((0,l.assertSet)(e.last_results_hash)),evidenceHash:(0,n.fromHex)((0,l.assertSet)(e.evidence_hash)),proposerAddress:(0,n.fromHex)((0,l.assertNotEmpty)(e.proposer_address))}}function I(e){return{blockId:O(e.block_id),blockSize:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.block_size)),header:A(e.header),numTxs:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.num_txs))}}function R(e){return{lastHeight:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.last_height)),blockMetas:(0,l.assertArray)(e.block_metas).map(I)}}function E(e){return{...y(e),hash:(0,n.fromHex)((0,l.assertNotEmpty)(e.hash))}}function T(e){return{height:(0,a.apiToSmallInt)(e.height),hash:(0,n.fromHex)((0,l.assertNotEmpty)(e.hash)),checkTx:y((0,l.assertObject)(e.check_tx)),deliverTx:(0,l.may)(y,e.deliver_tx)}}function N(e){return(0,i.assert)(e in s.BlockIdFlag),e}function x(e){return{blockIdFlag:N(e.block_id_flag),validatorAddress:e.validator_address?(0,n.fromHex)(e.validator_address):void 0,timestamp:e.timestamp?(0,o.fromRfc3339WithNanoseconds)(e.timestamp):void 0,signature:e.signature?(0,n.fromBase64)(e.signature):void 0}}function B(e){return{blockId:O((0,l.assertObject)(e.block_id)),height:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.height)),round:(0,a.apiToSmallInt)(e.round),signatures:(0,l.assertArray)(e.signatures).map(x)}}function C(e){return{canonical:(0,l.assertBoolean)(e.canonical),header:A(e.signed_header.header),commit:B(e.signed_header.commit)}}function M(e){return{address:(0,n.fromHex)((0,l.assertNotEmpty)(e.address)),pubkey:v((0,l.assertObject)(e.pub_key)),votingPower:(0,a.apiToBigInt)((0,l.assertNotEmpty)(e.power))}}function D(e){return{genesisTime:(0,o.fromRfc3339WithNanoseconds)((0,l.assertNotEmpty)(e.genesis_time)),chainId:(0,l.assertNotEmpty)(e.chain_id),consensusParams:w(e.consensus_params),validators:e.validators?(0,l.assertArray)(e.validators).map(M):[],appHash:(0,n.fromHex)((0,l.assertSet)(e.app_hash)),appState:e.app_state}}function U(e){return{pubkey:v((0,l.assertObject)(e.pub_key)),votingPower:(0,a.apiToBigInt)((0,l.assertNotEmpty)(e.voting_power)),address:(0,n.fromHex)((0,l.assertNotEmpty)(e.address)),proposerPriority:e.proposer_priority?(0,a.apiToSmallInt)(e.proposer_priority):void 0}}function J(e){return{id:(0,n.fromHex)((0,l.assertNotEmpty)(e.id)),listenAddr:(0,l.assertNotEmpty)(e.listen_addr),network:(0,l.assertNotEmpty)(e.network),version:(0,l.assertString)(e.version),channels:(0,l.assertNotEmpty)(e.channels),moniker:(0,l.assertNotEmpty)(e.moniker),other:(0,l.dictionaryToStringMap)(e.other),protocolVersion:{app:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.protocol_version.app)),block:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.protocol_version.block)),p2p:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.protocol_version.p2p))}}}function j(e){let t=e.earliest_block_height?(0,a.apiToSmallInt)(e.earliest_block_height):void 0,r=e.earliest_block_time?(0,o.fromRfc3339WithNanoseconds)(e.earliest_block_time):void 0;return{earliestAppHash:e.earliest_app_hash?(0,n.fromHex)(e.earliest_app_hash):void 0,earliestBlockHash:e.earliest_block_hash?(0,n.fromHex)(e.earliest_block_hash):void 0,earliestBlockHeight:t||void 0,earliestBlockTime:(null==r?void 0:r.getTime())?r:void 0,latestBlockHash:(0,n.fromHex)((0,l.assertNotEmpty)(e.latest_block_hash)),latestAppHash:(0,n.fromHex)((0,l.assertNotEmpty)(e.latest_app_hash)),latestBlockTime:(0,o.fromRfc3339WithNanoseconds)((0,l.assertNotEmpty)(e.latest_block_time)),latestBlockHeight:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.latest_block_height)),catchingUp:(0,l.assertBoolean)(e.catching_up)}}function H(e){return{nodeInfo:J(e.node_info),syncInfo:j(e.sync_info),validatorInfo:U(e.validator_info)}}function q(e){return{data:(0,n.fromBase64)((0,l.assertNotEmpty)(e.data)),rootHash:(0,n.fromHex)((0,l.assertNotEmpty)(e.root_hash)),proof:{total:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.proof.total)),index:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.proof.index)),leafHash:(0,n.fromBase64)((0,l.assertNotEmpty)(e.proof.leaf_hash)),aunts:(0,l.assertArray)(e.proof.aunts).map(n.fromBase64)}}}function L(e){return{tx:(0,n.fromBase64)((0,l.assertNotEmpty)(e.tx)),result:y((0,l.assertObject)(e.tx_result)),height:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.height)),index:(0,a.apiToSmallInt)((0,l.assertNumber)(e.index)),hash:(0,n.fromHex)((0,l.assertNotEmpty)(e.hash)),proof:(0,l.may)(q,e.proof)}}function F(e){return{totalCount:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.total_count)),txs:(0,l.assertArray)(e.txs).map(L)}}function V(e){let t=(0,n.fromBase64)((0,l.assertNotEmpty)(e.tx));return{tx:t,hash:(0,u.hashTx)(t),result:y(e.result),height:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.height))}}function z(e){return{blockHeight:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.block_height)),validators:(0,l.assertArray)(e.validators).map(U),count:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.count)),total:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.total))}}function W(e){var t,r;return{header:A((0,l.assertObject)(e.header)),lastCommit:e.last_commit.block_id.hash?B((0,l.assertObject)(e.last_commit)):null,txs:e.data.txs?(0,l.assertArray)(e.data.txs).map(n.fromBase64):[],evidence:null!==(r=null===(t=e.evidence)||void 0===t?void 0:t.evidence)&&void 0!==r?r:[]}}function Q(e){return{blockId:O(e.block_id),block:W(e.block)}}function G(e){return{totalCount:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.total_count)),blocks:(0,l.assertArray)(e.blocks).map(Q)}}function K(e){return{total:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.total)),totalBytes:(0,a.apiToSmallInt)((0,l.assertNotEmpty)(e.total_bytes))}}t.decodeEvent=g,t.decodeValidatorUpdate=_,t.decodeValidatorGenesis=M,t.decodeValidatorInfo=U;class Y{static decodeAbciInfo(e){return d((0,l.assertObject)(e.result.response))}static decodeAbciQuery(e){return p((0,l.assertObject)(e.result.response))}static decodeBlock(e){return Q(e.result)}static decodeBlockResults(e){return k(e.result)}static decodeBlockSearch(e){return G(e.result)}static decodeBlockchain(e){return R(e.result)}static decodeBroadcastTxSync(e){return E(e.result)}static decodeBroadcastTxAsync(e){return Y.decodeBroadcastTxSync(e)}static decodeBroadcastTxCommit(e){return T(e.result)}static decodeCommit(e){return C(e.result)}static decodeGenesis(e){return D((0,l.assertObject)(e.result.genesis))}static decodeHealth(){return null}static decodeNumUnconfirmedTxs(e){return K(e.result)}static decodeStatus(e){return H(e.result)}static decodeNewBlockEvent(e){return W(e.data.value.block)}static decodeNewBlockHeaderEvent(e){return A(e.data.value.header)}static decodeTxEvent(e){return V(e.data.value.TxResult)}static decodeTx(e){return L(e.result)}static decodeTxSearch(e){return F(e.result)}static decodeValidators(e){return z(e.result)}}t.Responses=Y},90177:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeBlockId=t.encodeVersion=t.encodeBytes=t.encodeTime=t.encodeUvarint=t.encodeString=t.dictionaryToStringMap=t.may=t.assertNotEmpty=t.assertObject=t.assertArray=t.assertNumber=t.assertString=t.assertBoolean=t.assertSet=void 0;let n=r(69721);function i(e){if(void 0===e)throw Error("Value must not be undefined");if(null===e)throw Error("Value must not be null");return e}function o(e){if(i(e),"boolean"!=typeof e)throw Error("Value must be a boolean");return e}function a(e){if(i(e),"string"!=typeof e)throw Error("Value must be a string");return e}function s(e){if(i(e),"number"!=typeof e)throw Error("Value must be a number");return e}function l(e){if(i(e),!Array.isArray(e))throw Error("Value must be a an array");return e}function u(e){if(i(e),"object"!=typeof e)throw Error("Value must be an object");if("[object Object]"!==Object.prototype.toString.call(e))throw Error("Value must be a simple object");return e}function d(e){if(i(e),"number"==typeof e&&0===e)throw Error("must provide a non-zero value");if(0===e.length)throw Error("must provide a non-empty value");return e}function c(e,t){return null==t?void 0:e(t)}function p(e){let t=new Map;for(let r of Object.keys(e)){let n=e[r];if("string"!=typeof n)throw Error("Found dictionary value of type other than string");t.set(r,n)}return t}function f(e){let t=(0,n.toUtf8)(e);return Uint8Array.from([t.length,...t])}function h(e){return e>=128?Uint8Array.from([255&e|128,...h(e>>7)]):Uint8Array.from([255&e])}function g(e){let t=e.getTime(),r=Math.floor(t/1e3),n=r?[8,...h(r)]:new Uint8Array,i=(e.nanoseconds||0)+t%1e3*1e6,o=i?[16,...h(i)]:new Uint8Array;return Uint8Array.from([...n,...o])}function m(e){if(e.length>=128)throw Error("Not implemented for byte arrays of length 128 or more");return e.length?Uint8Array.from([e.length,...e]):new Uint8Array}function y(e){let t=e.block?Uint8Array.from([8,...h(e.block)]):new Uint8Array,r=e.app?Uint8Array.from([16,...h(e.app)]):new Uint8Array;return Uint8Array.from([...t,...r])}function v(e){return Uint8Array.from([10,e.hash.length,...e.hash,18,e.parts.hash.length+4,8,e.parts.total,18,e.parts.hash.length,...e.parts.hash])}t.assertSet=i,t.assertBoolean=o,t.assertString=a,t.assertNumber=s,t.assertArray=l,t.assertObject=u,t.assertNotEmpty=d,t.may=c,t.dictionaryToStringMap=p,t.encodeString=f,t.encodeUvarint=h,t.encodeTime=g,t.encodeBytes=m,t.encodeVersion=y,t.encodeBlockId=v},88475:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hashBlock=t.hashTx=void 0;let n=r(49400),i=r(90177);function o(e){return(0,n.sha256)(e)}function a(e){if(e<1)throw Error("Cannot split an empty tree");let t=2**Math.floor(Math.log2(e));return t"".concat(e.key,"='").concat(e.value,"'")),...e.raw?[e.raw]:[]].join(" AND ")}Object.defineProperty(t,"__esModule",{value:!0}),t.buildQuery=t.SubscriptionEventType=t.Method=void 0,function(e){e.AbciInfo="abci_info",e.AbciQuery="abci_query",e.Block="block",e.Blockchain="blockchain",e.BlockResults="block_results",e.BlockSearch="block_search",e.BroadcastTxAsync="broadcast_tx_async",e.BroadcastTxSync="broadcast_tx_sync",e.BroadcastTxCommit="broadcast_tx_commit",e.Commit="commit",e.Genesis="genesis",e.Health="health",e.NumUnconfirmedTxs="num_unconfirmed_txs",e.Status="status",e.Subscribe="subscribe",e.Tx="tx",e.TxSearch="tx_search",e.Validators="validators",e.Unsubscribe="unsubscribe"}(r=t.Method||(t.Method={})),function(e){e.NewBlock="NewBlock",e.NewBlockHeader="NewBlockHeader",e.Tx="Tx"}(n=t.SubscriptionEventType||(t.SubscriptionEventType={})),t.buildQuery=i},81017:function(e,t){"use strict";var r;function n(e){return 0===e.code}function i(e){return 0===e.checkTx.code&&!!e.deliverTx&&0===e.deliverTx.code}Object.defineProperty(t,"__esModule",{value:!0}),t.VoteType=t.broadcastTxCommitSuccess=t.broadcastTxSyncSuccess=void 0,t.broadcastTxSyncSuccess=n,t.broadcastTxCommitSuccess=i,function(e){e[e.PreVote=1]="PreVote",e[e.PreCommit=2]="PreCommit"}(r=t.VoteType||(t.VoteType={}))},35621:function(e,t,r){"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Tendermint37Client=void 0;let a=r(69594),s=r(40064),l=r(54760),u=o(r(34720));class d{static async connect(e){let t;return t="object"==typeof e?new s.HttpClient(e):e.startsWith("http://")||e.startsWith("https://")?new s.HttpClient(e):new s.WebsocketClient(e),await this.detectVersion(t),d.create(t)}static async create(e){return new d(e)}static async detectVersion(e){let t=(0,a.createJsonRpcRequest)(u.Method.Status),r=(await e.execute(t)).result;if(!r||!r.node_info)throw Error("Unrecognized format for status response");let n=r.node_info.version;if("string"!=typeof n)throw Error("Unrecognized version format: must be string");return n}disconnect(){this.client.disconnect()}async abciInfo(){let e={method:u.Method.AbciInfo};return this.doCall(e,l.Params.encodeAbciInfo,l.Responses.decodeAbciInfo)}async abciQuery(e){let t={params:e,method:u.Method.AbciQuery};return this.doCall(t,l.Params.encodeAbciQuery,l.Responses.decodeAbciQuery)}async block(e){let t={method:u.Method.Block,params:{height:e}};return this.doCall(t,l.Params.encodeBlock,l.Responses.decodeBlock)}async blockResults(e){let t={method:u.Method.BlockResults,params:{height:e}};return this.doCall(t,l.Params.encodeBlockResults,l.Responses.decodeBlockResults)}async blockSearch(e){let t={params:e,method:u.Method.BlockSearch},r=await this.doCall(t,l.Params.encodeBlockSearch,l.Responses.decodeBlockSearch);return{...r,blocks:[...r.blocks].sort((e,t)=>e.block.header.height-t.block.header.height)}}async blockSearchAll(e){let t=e.page||1,r=[],n=!1;for(;!n;){let i=await this.blockSearch({...e,page:t});r.push(...i.blocks),r.lengthe.block.header.height-t.block.header.height),{totalCount:r.length,blocks:r}}async blockchain(e,t){let r={method:u.Method.Blockchain,params:{minHeight:e,maxHeight:t}};return this.doCall(r,l.Params.encodeBlockchain,l.Responses.decodeBlockchain)}async broadcastTxSync(e){let t={params:e,method:u.Method.BroadcastTxSync};return this.doCall(t,l.Params.encodeBroadcastTx,l.Responses.decodeBroadcastTxSync)}async broadcastTxAsync(e){let t={params:e,method:u.Method.BroadcastTxAsync};return this.doCall(t,l.Params.encodeBroadcastTx,l.Responses.decodeBroadcastTxAsync)}async broadcastTxCommit(e){let t={params:e,method:u.Method.BroadcastTxCommit};return this.doCall(t,l.Params.encodeBroadcastTx,l.Responses.decodeBroadcastTxCommit)}async commit(e){let t={method:u.Method.Commit,params:{height:e}};return this.doCall(t,l.Params.encodeCommit,l.Responses.decodeCommit)}async genesis(){let e={method:u.Method.Genesis};return this.doCall(e,l.Params.encodeGenesis,l.Responses.decodeGenesis)}async health(){let e={method:u.Method.Health};return this.doCall(e,l.Params.encodeHealth,l.Responses.decodeHealth)}async numUnconfirmedTxs(){let e={method:u.Method.NumUnconfirmedTxs};return this.doCall(e,l.Params.encodeNumUnconfirmedTxs,l.Responses.decodeNumUnconfirmedTxs)}async status(){let e={method:u.Method.Status};return this.doCall(e,l.Params.encodeStatus,l.Responses.decodeStatus)}subscribeNewBlock(){let e={method:u.Method.Subscribe,query:{type:u.SubscriptionEventType.NewBlock}};return this.subscribe(e,l.Responses.decodeNewBlockEvent)}subscribeNewBlockHeader(){let e={method:u.Method.Subscribe,query:{type:u.SubscriptionEventType.NewBlockHeader}};return this.subscribe(e,l.Responses.decodeNewBlockHeaderEvent)}subscribeTx(e){let t={method:u.Method.Subscribe,query:{type:u.SubscriptionEventType.Tx,raw:e}};return this.subscribe(t,l.Responses.decodeTxEvent)}async tx(e){let t={params:e,method:u.Method.Tx};return this.doCall(t,l.Params.encodeTx,l.Responses.decodeTx)}async txSearch(e){let t={params:e,method:u.Method.TxSearch};return this.doCall(t,l.Params.encodeTxSearch,l.Responses.decodeTxSearch)}async txSearchAll(e){let t=e.page||1,r=[],n=!1;for(;!n;){let i=await this.txSearch({...e,page:t});r.push(...i.txs),r.lengtht(e))}constructor(e){this.client=e}}t.Tendermint37Client=d},98265:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.connectComet=t.isComet38Client=t.isTendermint37Client=t.isTendermint34Client=void 0;let n=r(38224),i=r(26419),o=r(18570);function a(e){return e instanceof i.Tendermint34Client}function s(e){return e instanceof o.Tendermint37Client}function l(e){return e instanceof n.Comet38Client}async function u(e){let t;let r=await o.Tendermint37Client.connect(e),a=(await r.status()).nodeInfo.version;return a.startsWith("0.37.")?t=r:a.startsWith("0.38.")?(r.disconnect(),t=await n.Comet38Client.connect(e)):(r.disconnect(),t=await i.Tendermint34Client.connect(e)),t}t.isTendermint34Client=a,t.isTendermint37Client=s,t.isComet38Client=l,t.connectComet=u},25492:function(e,t){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.BlockIdFlag=void 0,function(e){e[e.Unknown=0]="Unknown",e[e.Absent=1]="Absent",e[e.Commit=2]="Commit",e[e.Nil=3]="Nil",e[e.Unrecognized=-1]="Unrecognized"}(r=t.BlockIdFlag||(t.BlockIdFlag={}))},68365:function(e,t){"use strict";function r(e,t){if(e.length!==t.length)return!1;for(let r=0;rsetTimeout(t,e))}Object.defineProperty(t,"__esModule",{value:!0}),t.sleep=void 0,t.sleep=r},39492:function(e,t,r){"use strict";var n=r(23663).Buffer;function i(e){return"object"==typeof e&&null!==e}function o(e){return!(!i(e)||"[object Uint8Array]"!==Object.prototype.toString.call(e)||void 0!==n&&void 0!==n.isBuffer&&n.isBuffer(e))}function a(e){return void 0!==e}Object.defineProperty(t,"__esModule",{value:!0}),t.isDefined=t.isUint8Array=t.isNonNullObject=void 0,t.isNonNullObject=i,t.isUint8Array=o,t.isDefined=a},86731:function(e,t,r){"use strict";r.r(t),r.d(t,{getAddress:function(){return C},getContractAddress:function(){return U},getCreate2Address:function(){return J},getIcapAddress:function(){return D},isAddress:function(){return M}});var n=r(46347),i=r(34108),o=r.n(i),a=r(89648);let s="bignumber/5.7.0";var l=o().BN;let u=new a.Yd(s),d={},c=9007199254740991,p=!1;class f{fromTwos(e){return g(m(this).fromTwos(e))}toTwos(e){return g(m(this).toTwos(e))}abs(){return"-"===this._hex[0]?f.from(this._hex.substring(1)):this}add(e){return g(m(this).add(m(e)))}sub(e){return g(m(this).sub(m(e)))}div(e){return f.from(e).isZero()&&y("division-by-zero","div"),g(m(this).div(m(e)))}mul(e){return g(m(this).mul(m(e)))}mod(e){let t=m(e);return t.isNeg()&&y("division-by-zero","mod"),g(m(this).umod(t))}pow(e){let t=m(e);return t.isNeg()&&y("negative-power","pow"),g(m(this).pow(t))}and(e){let t=m(e);return(this.isNegative()||t.isNeg())&&y("unbound-bitwise-result","and"),g(m(this).and(t))}or(e){let t=m(e);return(this.isNegative()||t.isNeg())&&y("unbound-bitwise-result","or"),g(m(this).or(t))}xor(e){let t=m(e);return(this.isNegative()||t.isNeg())&&y("unbound-bitwise-result","xor"),g(m(this).xor(t))}mask(e){return(this.isNegative()||e<0)&&y("negative-width","mask"),g(m(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&y("negative-width","shl"),g(m(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&y("negative-width","shr"),g(m(this).shrn(e))}eq(e){return m(this).eq(m(e))}lt(e){return m(this).lt(m(e))}lte(e){return m(this).lte(m(e))}gt(e){return m(this).gt(m(e))}gte(e){return m(this).gte(m(e))}isNegative(){return"-"===this._hex[0]}isZero(){return m(this).isZero()}toNumber(){try{return m(this).toNumber()}catch(e){y("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch(e){}return u.throwError("this platform does not support BigInt",a.Yd.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(10===arguments[0]?p||(p=!0,u.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?u.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",a.Yd.errors.UNEXPECTED_ARGUMENT,{}):u.throwError("BigNumber.toString does not accept parameters",a.Yd.errors.UNEXPECTED_ARGUMENT,{})),m(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof f)return e;if("string"==typeof e)return e.match(/^-?0x[0-9a-f]+$/i)?new f(d,h(e)):e.match(/^-?[0-9]+$/)?new f(d,h(new l(e))):u.throwArgumentError("invalid BigNumber string","value",e);if("number"==typeof e)return e%1&&y("underflow","BigNumber.from",e),(e>=c||e<=-c)&&y("overflow","BigNumber.from",e),f.from(String(e));let t=e;if("bigint"==typeof t)return f.from(t.toString());if((0,n._t)(t))return f.from((0,n.Dv)(t));if(t){if(t.toHexString){let e=t.toHexString();if("string"==typeof e)return f.from(e)}else{let e=t._hex;if(null==e&&"BigNumber"===t.type&&(e=t.hex),"string"==typeof e&&((0,n.A7)(e)||"-"===e[0]&&(0,n.A7)(e.substring(1))))return f.from(e)}}return u.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!!(e&&e._isBigNumber)}constructor(e,t){e!==d&&u.throwError("cannot call constructor directly; use BigNumber.from",a.Yd.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=t,this._isBigNumber=!0,Object.freeze(this)}}function h(e){if("string"!=typeof e)return h(e.toString(16));if("-"===e[0])return("-"===(e=e.substring(1))[0]&&u.throwArgumentError("invalid hex","value",e),"0x00"===(e=h(e)))?e:"-"+e;if("0x"!==e.substring(0,2)&&(e="0x"+e),"0x"===e)return"0x00";for(e.length%2&&(e="0x0"+e.substring(2));e.length>4&&"0x00"===e.substring(0,4);)e="0x"+e.substring(4);return e}function g(e){return f.from(h(e))}function m(e){let t=f.from(e).toHexString();return"-"===t[0]?new l("-"+t.substring(3),16):new l(t.substring(2),16)}function y(e,t,r){let n={fault:e,operation:t};return null!=r&&(n.value=r),u.throwError(e,a.Yd.errors.NUMERIC_FAULT,n)}function v(e){return new l(e,36).toString(16)}function b(e){return new l(e,16).toString(36)}var S=r(69774);let w="rlp/5.7.0",_=new a.Yd(w);function k(e){let t=[];for(;e;)t.unshift(255&e),e>>=8;return t}function O(e){if(Array.isArray(e)){let t=[];if(e.forEach(function(e){t=t.concat(O(e))}),t.length<=55)return t.unshift(192+t.length),t;let r=k(t.length);return r.unshift(247+r.length),r.concat(t)}(0,n.Zq)(e)||_.throwArgumentError("RLP object must be BytesLike","object",e);let t=Array.prototype.slice.call((0,n.lE)(e));if(1===t.length&&t[0]<=127)return t;if(t.length<=55)return t.unshift(128+t.length),t;let r=k(t.length);return r.unshift(183+r.length),r.concat(t)}function P(e){return(0,n.Dv)(O(e))}let A="address/5.7.0",I=new a.Yd(A);function R(e){(0,n.A7)(e,20)||I.throwArgumentError("invalid address","address",e);let t=(e=e.toLowerCase()).substring(2).split(""),r=new Uint8Array(40);for(let e=0;e<40;e++)r[e]=t[e].charCodeAt(0);let i=(0,n.lE)((0,S.keccak256)(r));for(let e=0;e<40;e+=2)i[e>>1]>>4>=8&&(t[e]=t[e].toUpperCase()),(15&i[e>>1])>=8&&(t[e+1]=t[e+1].toUpperCase());return"0x"+t.join("")}let E=9007199254740991;function T(e){return Math.log10?Math.log10(e):Math.log(e)/Math.LN10}let N={};for(let e=0;e<10;e++)N[String(e)]=String(e);for(let e=0;e<26;e++)N[String.fromCharCode(65+e)]=String(10+e);let x=Math.floor(T(E));function B(e){let t=(e=(e=e.toUpperCase()).substring(4)+e.substring(0,2)+"00").split("").map(e=>N[e]).join("");for(;t.length>=x;){let e=t.substring(0,x);t=parseInt(e,10)%97+t.substring(e.length)}let r=String(98-parseInt(t,10)%97);for(;r.length<2;)r="0"+r;return r}function C(e){let t=null;if("string"!=typeof e&&I.throwArgumentError("invalid address","address",e),e.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==e.substring(0,2)&&(e="0x"+e),t=R(e),e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&t!==e&&I.throwArgumentError("bad address checksum","address",e);else if(e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(e.substring(2,4)!==B(e)&&I.throwArgumentError("bad icap checksum","address",e),t=v(e.substring(4));t.length<40;)t="0"+t;t=R("0x"+t)}else I.throwArgumentError("invalid address","address",e);return t}function M(e){try{return C(e),!0}catch(e){}return!1}function D(e){let t=b(C(e).substring(2)).toUpperCase();for(;t.length<30;)t="0"+t;return"XE"+B("XE00"+t)+t}function U(e){let t=null;try{t=C(e.from)}catch(t){I.throwArgumentError("missing from address","transaction",e)}let r=(0,n.G1)((0,n.lE)(f.from(e.nonce).toHexString()));return C((0,n.p3)((0,S.keccak256)(P([t,r])),12))}function J(e,t,r){return 32!==(0,n.E1)(t)&&I.throwArgumentError("salt must be 32 bytes","salt",t),32!==(0,n.E1)(r)&&I.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",r),C((0,n.p3)((0,S.keccak256)((0,n.zo)(["0xff",C(e),t,r])),12))}},46347:function(e,t,r){"use strict";r.d(t,{lE:function(){return c},zo:function(){return p},E1:function(){return y},p3:function(){return v},Dv:function(){return m},_t:function(){return d},Zq:function(){return l},A7:function(){return h},G1:function(){return f}});var n=r(89648);let i="bytes/5.7.0",o=new n.Yd(i);function a(e){return!!e.toHexString}function s(e){return e.slice||(e.slice=function(){let t=Array.prototype.slice.call(arguments);return s(new Uint8Array(Array.prototype.slice.apply(e,t)))}),e}function l(e){return h(e)&&!(e.length%2)||d(e)}function u(e){return"number"==typeof e&&e==e&&e%1==0}function d(e){if(null==e)return!1;if(e.constructor===Uint8Array)return!0;if("string"==typeof e||!u(e.length)||e.length<0)return!1;for(let t=0;t=256)return!1}return!0}function c(e,t){if(t||(t={}),"number"==typeof e){o.checkSafeUint53(e,"invalid arrayify value");let t=[];for(;e;)t.unshift(255&e),e=parseInt(String(e/256));return 0===t.length&&t.push(0),s(new Uint8Array(t))}if(t.allowMissingPrefix&&"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),a(e)&&(e=e.toHexString()),h(e)){let r=e.substring(2);r.length%2&&("left"===t.hexPad?r="0"+r:"right"===t.hexPad?r+="0":o.throwArgumentError("hex data is odd-length","value",e));let n=[];for(let e=0;ec(e)),r=t.reduce((e,t)=>e+t.length,0),n=new Uint8Array(r);return t.reduce((e,t)=>(n.set(t,e),e+t.length),0),s(n)}function f(e){let t=c(e);if(0===t.length)return t;let r=0;for(;r>4]+g[15&n]}return t}return o.throwArgumentError("invalid hexlify value","value",e)}function y(e){if("string"!=typeof e)e=m(e);else if(!h(e)||e.length%2)return null;return(e.length-2)/2}function v(e,t,r){return("string"!=typeof e?e=m(e):(!h(e)||e.length%2)&&o.throwArgumentError("invalid hexData","value",e),t=2+2*t,null!=r)?"0x"+e.substring(t,2+2*r):"0x"+e.substring(t)}},69774:function(e,t,r){"use strict";r.r(t),r.d(t,{keccak256:function(){return a}});var n=r(99857),i=r.n(n),o=r(46347);function a(e){return"0x"+i().keccak_256((0,o.lE)(e))}},89648:function(e,t,r){"use strict";var n,i;r.d(t,{Yd:function(){return f}});let o="logger/5.7.0",a=!1,s=!1,l={debug:1,default:2,info:2,warning:3,error:4,off:5},u=2,d=null,c=function(){try{let e=[];if(["NFD","NFC","NFKD","NFKC"].forEach(t=>{try{if("test"!=="test".normalize(t))throw Error("bad normalize")}catch(r){e.push(t)}}),e.length)throw Error("missing "+e.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw Error("broken implementation")}catch(e){return e.message}return null}();!function(e){e.DEBUG="DEBUG",e.INFO="INFO",e.WARNING="WARNING",e.ERROR="ERROR",e.OFF="OFF"}(n||(n={})),function(e){e.UNKNOWN_ERROR="UNKNOWN_ERROR",e.NOT_IMPLEMENTED="NOT_IMPLEMENTED",e.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",e.NETWORK_ERROR="NETWORK_ERROR",e.SERVER_ERROR="SERVER_ERROR",e.TIMEOUT="TIMEOUT",e.BUFFER_OVERRUN="BUFFER_OVERRUN",e.NUMERIC_FAULT="NUMERIC_FAULT",e.MISSING_NEW="MISSING_NEW",e.INVALID_ARGUMENT="INVALID_ARGUMENT",e.MISSING_ARGUMENT="MISSING_ARGUMENT",e.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",e.CALL_EXCEPTION="CALL_EXCEPTION",e.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",e.NONCE_EXPIRED="NONCE_EXPIRED",e.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",e.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",e.TRANSACTION_REPLACED="TRANSACTION_REPLACED",e.ACTION_REJECTED="ACTION_REJECTED"}(i||(i={}));let p="0123456789abcdef";class f{_log(e,t){let r=e.toLowerCase();null==l[r]&&this.throwArgumentError("invalid log level name","logLevel",e),u>l[r]||console.log.apply(console,t)}debug(){for(var e=arguments.length,t=Array(e),r=0;r{let t=r[e];try{if(t instanceof Uint8Array){let r="";for(let e=0;e>4]+p[15&t[e]];n.push(e+"=Uint8Array(0x"+r+")")}else n.push(e+"="+JSON.stringify(t))}catch(t){n.push(e+"="+JSON.stringify(r[e].toString()))}}),n.push("code=".concat(t)),n.push("version=".concat(this.version));let o=e,a="";switch(t){case i.NUMERIC_FAULT:{a="NUMERIC_FAULT";let t=e;switch(t){case"overflow":case"underflow":case"division-by-zero":a+="-"+t;break;case"negative-power":case"negative-width":a+="-unsupported";break;case"unbound-bitwise-result":a+="-unbound-result"}break}case i.CALL_EXCEPTION:case i.INSUFFICIENT_FUNDS:case i.MISSING_NEW:case i.NONCE_EXPIRED:case i.REPLACEMENT_UNDERPRICED:case i.TRANSACTION_REPLACED:case i.UNPREDICTABLE_GAS_LIMIT:a=t}a&&(e+=" [ See: https://links.ethers.org/v5-errors-"+a+" ]"),n.length&&(e+=" ("+n.join(", ")+")");let l=Error(e);return l.reason=o,l.code=t,Object.keys(r).forEach(function(e){l[e]=r[e]}),l}throwError(e,t,r){throw this.makeError(e,t,r)}throwArgumentError(e,t,r){return this.throwError(e,f.errors.INVALID_ARGUMENT,{argument:t,value:r})}assert(e,t,r,n){e||this.throwError(t,r,n)}assertArgument(e,t,r,n){e||this.throwArgumentError(t,r,n)}checkNormalize(e){null==e&&(e="platform missing String.prototype.normalize"),c&&this.throwError("platform missing String.prototype.normalize",f.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:c})}checkSafeUint53(e,t){"number"==typeof e&&(null==t&&(t="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(t,f.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(t,f.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,t,r){r=r?": "+r:"",et&&this.throwError("too many arguments"+r,f.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:t})}checkNew(e,t){(e===Object||null==e)&&this.throwError("missing new",f.errors.MISSING_NEW,{name:t.name})}checkAbstract(e,t){e===t?this.throwError("cannot instantiate abstract class "+JSON.stringify(t.name)+" directly; use a sub-class",f.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||null==e)&&this.throwError("missing new",f.errors.MISSING_NEW,{name:t.name})}static globalLogger(){return d||(d=new f(o)),d}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",f.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),a){if(!e)return;this.globalLogger().throwError("error censorship permanent",f.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}s=!!e,a=!!t}static setLogLevel(e){let t=l[e.toLowerCase()];if(null==t){f.globalLogger().warn("invalid log level - "+e);return}u=t}static from(e){return new f(e)}constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}}f.errors=i,f.levels=n},24711:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DenomHelper=void 0;let n=r(23663),i=r(36173);class o{static ibcDenom(e,t){let r=[];for(let t of e)r.push("".concat(t.portId,"/").concat(t.channelId));let o=r.join("/"),a="".concat(o,"/").concat(t);return"ibc/"+n.Buffer.from(i.Hash.sha256(n.Buffer.from(a))).toString("hex").toUpperCase()}get denom(){return this._denom}get type(){return this._type||"native"}get contractAddress(){return this._contractAddress}constructor(e){this._denom=e;let t=this.denom.split(/(\w+):(\w+):(.+)/).filter(Boolean);if(1!==t.length&&3!==t.length)throw Error("Invalid denom: ".concat(this.denom));this._type=3===t.length?t[0]:"",this._contractAddress=3===t.length?t[1]:""}}t.DenomHelper=o},73755:function(e,t){"use strict";function r(e){return e.replace(//g,"\\u003e").replace(/&/g,"\\u0026")}function n(e){return e.replace(/\\u003c/g,"<").replace(/\\u003e/g,">").replace(/\\u0026/g,"&")}Object.defineProperty(t,"__esModule",{value:!0}),t.unescapeHTML=t.escapeHTML=void 0,t.escapeHTML=r,t.unescapeHTML=n},47280:function(e,t){"use strict";function r(e){let t=e.split(".");if(2===t.length&&t[0].length>0&&t[1].length>0)return[t[0],t[1]]}function n(e,t){let n=r(e);return!!n&&n[1]===t}Object.defineProperty(t,"__esModule",{value:!0}),t.validateICNSName=t.parseICNSName=void 0,t.parseICNSName=r,t.validateICNSName=n},79394:function(e,t,r){"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(37666),t),i(r(24711),t),i(r(51604),t),i(r(67142),t),i(r(73755),t),i(r(96924),t),i(r(47280),t),i(r(14167),t),i(r(51109),t)},96924:function(e,t,r){"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(61002),t)},61002:function(e,t){"use strict";function r(e){if("object"!=typeof e||null===e)return e;if(Array.isArray(e))return e.map(r);let t=Object.keys(e).sort(),n={};return t.forEach(t=>{n[t]=r(e[t])}),n}function n(e){return JSON.stringify(r(e))}Object.defineProperty(t,"__esModule",{value:!0}),t.sortedJsonByKeyStringify=t.sortObjectByKey=void 0,t.sortObjectByKey=r,t.sortedJsonByKeyStringify=n},17021:function(e,t){"use strict";var r=function(e,t,r,n){function i(e){return e instanceof r?e:new r(function(t){t(e)})}return new(r||(r=Promise))(function(r,o){function a(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){e.done?r(e.value):i(e.value).then(a,s)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.BaseKVStore=void 0;class n{get(e){return r(this,void 0,void 0,function*(){let t=this.prefix()+"/"+e;return(yield this.provider.get(t))[t]})}set(e,t){let r=this.prefix()+"/"+e;return this.provider.set({[r]:t})}prefix(){return this._prefix}constructor(e,t){this.provider=e,this._prefix=t}}t.BaseKVStore=n},36382:function(e,t,r){"use strict";var n=function(e,t,r,n){function i(e){return e instanceof r?e:new r(function(t){t(e)})}return new(r||(r=Promise))(function(r,o){function a(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){e.done?r(e.value):i(e.value).then(a,s)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionKVStore=void 0;let i=r(17021);class o extends i.BaseKVStore{multiGet(e){var t;return n(this,void 0,void 0,function*(){e=Array.from(new Set(e));let r=null!==(t=yield o.KVStoreProvider.multiGet(e.map(e=>this.prefix()+"/"+e)))&&void 0!==t?t:{};for(let e of Object.keys(r))r[e.slice(this.prefix().length+1)]=r[e],delete r[e];return r})}constructor(e){if(o.KVStoreProvider||("undefined"==typeof browser?console.log("You should use ExtensionKVStore on the extension environment."):browser.storage&&browser.storage.local?o.KVStoreProvider={get:browser.storage.local.get,set:browser.storage.local.set,multiGet:browser.storage.local.get}:console.log("The 'browser' exists, but it doesn't seem to be an extension environment. This can happen in Safari browser.")),!o.KVStoreProvider)throw Error("Can't initialize kv store for browser extension");super(o.KVStoreProvider,e)}}t.ExtensionKVStore=o},37666:function(e,t,r){"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(37212),t),i(r(36382),t),i(r(17021),t),i(r(46393),t),i(r(32370),t),i(r(32676),t),i(r(23527),t),i(r(26121),t)},32676:function(e,t){"use strict";var r=function(e,t,r,n){function i(e){return e instanceof r?e:new r(function(t){t(e)})}return new(r||(r=Promise))(function(r,o){function a(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){e.done?r(e.value):i(e.value).then(a,s)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.IndexedDBKVStore=void 0;class n{get(e){return r(this,void 0,void 0,function*(){let t=(yield this.getDB()).transaction([this.prefix()],"readonly").objectStore(this.prefix());return new Promise((r,n)=>{let i=t.get(e);i.onerror=e=>{e.stopPropagation(),n(e.target)},i.onsuccess=()=>{i.result?r(i.result.data):r(void 0)}})})}set(e,t){return r(this,void 0,void 0,function*(){if(null===t){let t=(yield this.getDB()).transaction([this.prefix()],"readwrite").objectStore(this.prefix());return new Promise((r,n)=>{let i=t.delete(e);i.onerror=e=>{e.stopPropagation(),n(e.target)},i.onsuccess=()=>{r()}})}{let r=(yield this.getDB()).transaction([this.prefix()],"readwrite").objectStore(this.prefix());return new Promise((n,i)=>{let o=r.put({key:e,data:t});o.onerror=e=>{e.stopPropagation(),i(e.target)},o.onsuccess=()=>{n()}})}})}prefix(){return this._prefix}getDB(){return r(this,void 0,void 0,function*(){return this.cachedDB?this.cachedDB:new Promise((e,t)=>{let r=window.indexedDB.open(this.prefix());r.onerror=e=>{e.stopPropagation(),t(e.target)},r.onupgradeneeded=e=>{e.target.result.createObjectStore(this.prefix(),{keyPath:"key"})},r.onsuccess=()=>{this.cachedDB=r.result,e(r.result)}})})}constructor(e){this._prefix=e}}t.IndexedDBKVStore=n},37212:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},32370:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LocalKVStore=void 0;class r{get(e){let t=this.prefix()+"/"+e,r=localStorage.getItem(t);return null===r?Promise.resolve(void 0):Promise.resolve(JSON.parse(r))}set(e,t){let r=this.prefix()+"/"+e;return null===t?Promise.resolve(localStorage.removeItem(r)):Promise.resolve(localStorage.setItem(r,JSON.stringify(t)))}prefix(){return this._prefix}constructor(e){this._prefix=e}}t.LocalKVStore=r},46393:function(e,t,r){"use strict";r(49079),Object.defineProperty(t,"__esModule",{value:!0}),t.MemoryKVStore=void 0;let n=r(17021);class i{get(e){return Promise.resolve({[e]:this.store[e]})}set(e){return this.store=Object.assign(Object.assign({},this.store),e),Promise.resolve()}checkNotPrimitiveField(e){Object.keys(e).forEach(t=>{let r=e[t];if(null!=r&&"object"==typeof r){if(r.constructor!==Object&&r.constructor!==Array)throw Error("".concat(t," may not be serializable: ").concat(r.constructor.name));this.checkNotPrimitiveField(r)}})}constructor(){this.store={}}}class o extends n.BaseKVStore{constructor(e){super(new i,e)}}t.MemoryKVStore=o},26121:function(e,t){"use strict";var r=function(e,t,r,n){function i(e){return e instanceof r?e:new r(function(t){t(e)})}return new(r||(r=Promise))(function(r,o){function a(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){e.done?r(e.value):i(e.value).then(a,s)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.WrapMultiGetKVStore=void 0;class n{multiGet(e){return r(this,void 0,void 0,function*(){e=Array.from(new Set(e));let t={},n=[];for(let i of e)n.push(r(this,void 0,void 0,function*(){t[i]=yield this.kvStore.get(i)}));return yield Promise.all(n),t})}constructor(e){this.kvStore=e}}t.WrapMultiGetKVStore=n},23527:function(e,t){"use strict";var r=function(e,t,r,n){function i(e){return e instanceof r?e:new r(function(t){t(e)})}return new(r||(r=Promise))(function(r,o){function a(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){e.done?r(e.value):i(e.value).then(a,s)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.PrefixKVStore=void 0;class n{prefix(){return this._prefix}get(e){return r(this,void 0,void 0,function*(){let t=this.prefix()+"/"+e;return yield this.kvStore.get(t)})}set(e,t){return r(this,void 0,void 0,function*(){let r=this.prefix()+"/"+e;return yield this.kvStore.set(r,t)})}constructor(e,t){this.kvStore=e,this._prefix=t}}t.PrefixKVStore=n},92039:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebounceActionTimer=void 0;let n=r(61015);class i{call(e,t){return new Promise(r=>{let n=0===this.requests.length;this.requests.push({args:e,action:t,resolver:r}),n&&this.startTimer()})}startTimer(){this.startTime=Date.now(),this.nextTick(this.tick)}nextTick(e){if(this.debounceMs<=0){Promise.resolve().then(e);return}window.requestAnimationFrame?window.requestAnimationFrame(e):setTimeout(e,this.debounceMs)}constructor(e,t){this.debounceMs=e,this.handler=t,this.requests=[],this.startTime=0,this.tick=()=>{let e=this.debounceMs<=0;if(this.debounceMs>0&&Date.now()-this.startTime>=this.debounceMs&&(e=!0),e){let e=this.requests.slice(),t=this.handler(e);"object"==typeof t&&"then"in t?Promise.resolve(t).then(t=>{this.handleResponses(e,t)}):this.handleResponses(e,t),this.requests=[]}else this.nextTick(this.tick)},this.handleResponses=(e,t)=>{for(let r of((0,n.runInAction)(()=>{for(let r=0;r=t.maxRetries)throw n;t.onFailed&&t.onFailed(n);let e=t.waitMsAfterError||0;e>0&&(null!=t.maxWaitMsAfterError&&t.maxWaitMsAfterError>0&&(e=Math.min(e=Math.pow(2,r)*e,t.maxWaitMsAfterError)),yield(0,i.sleep)(e)),r++}})}function a(e,t){return o(e,Object.assign(Object.assign({},t),{maxRetries:Number.MAX_SAFE_INTEGER}))}t.retry=o,t.retryInfinite=a},51109:function(e,t){"use strict";function r(e){return new Promise(t=>setTimeout(t,e))}Object.defineProperty(t,"__esModule",{value:!0}),t.sleep=void 0,t.sleep=r},47372:function(e,t){"use strict";var r=function(e,t,r,n){function i(e){return e instanceof r?e:new r(function(t){t(e)})}return new(r||(r=Promise))(function(r,o){function a(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){e.done?r(e.value):i(e.value).then(a,s)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.Debouncer=void 0;class n{static promise(e){let t;var n=this;return function(){for(var i=arguments.length,o=Array(i),a=0;a2&&void 0!==arguments[2]&&arguments[2];return n(this,void 0,void 0,function*(){let n=yield(0,o.simpleFetch)(e,"/cosmos/auth/v1beta1/accounts/".concat(t),{validateStatus:function(e){return e>=200&&e<300||404===e}});return a.fromProtoJSON(n.data,r?t:"")})}static fromProtoJSON(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(!e.account){if(!t)throw Error("Account's address is unknown: ".concat(JSON.stringify(e)));return new a("",t,new i.Int(0),new i.Int(0))}let r=e.account,n=r["@type"]||"",o=r.BaseAccount||r.baseAccount||r.base_account;o&&(r=o);let s=r.account;s&&(r=s);let l=r.BaseVestingAccount||r.baseVestingAccount||r.base_vesting_account;if(l){let e=(r=l).BaseAccount||r.baseAccount||r.base_account;e&&(r=e)}let u=r.address;if(!u){if(!t)throw Error("Account's address is unknown: ".concat(JSON.stringify(e)));u=t}let d=r.account_number,c=r.sequence;return new a(n,u,new i.Int(d||"0"),new i.Int(c||"0"))}getType(){return this.type}getAddress(){return this.address}getAccountNumber(){return this.accountNumber}getSequence(){return this.sequence}constructor(e,t,r,n){this.type=e,this.address=t,this.accountNumber=r,this.sequence=n}}t.BaseAccount=a},14042:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.verifyADR36Amino=t.verifyADR36AminoSignDoc=t.makeADR36AminoSignDoc=t.checkAndValidateADR36AminoSignDoc=void 0;let n=r(77735),i=r(6756),o=r(23663),a=r(36173);function s(e,t){if(!(e&&e.msgs&&Array.isArray(e.msgs)&&1===e.msgs.length&&"sign/MsgSignData"===e.msgs[0].type))return!1;if(""!==e.chain_id)throw Error("Chain id should be empty string for ADR-36 signing");if(""!==e.memo)throw Error("Memo should be empty string for ADR-36 signing");if("0"!==e.account_number)throw Error('Account number should be "0" for ADR-36 signing');if("0"!==e.sequence)throw Error('Sequence should be "0" for ADR-36 signing');if("0"!==e.fee.gas)throw Error('Gas should be "0" for ADR-36 signing');if(0!==e.fee.amount.length)throw Error("Fee amount should be empty array for ADR-36 signing");let r=e.msgs[0];if("sign/MsgSignData"!==r.type)throw Error("Invalid type of ADR-36 sign msg: ".concat(r.type));if(!r.value)throw Error("Empty value in the msg");let n=r.value.signer;if(!n)throw Error("Empty signer in the ADR-36 msg");i.Bech32Address.validate(n,t);let a=r.value.data;if(!a)throw Error("Empty data in the ADR-36 msg");let s=o.Buffer.from(a,"base64");if(s.toString("base64")!==a)throw Error("Data is not encoded by base64");if(0===s.length)throw Error("Empty data in the ADR-36 msg");return!0}function l(e,t){return{chain_id:"",account_number:"0",sequence:"0",fee:{gas:"0",amount:[]},msgs:[{type:"sign/MsgSignData",value:{signer:e,data:t=o.Buffer.from(t).toString("base64")}}],memo:""}}function u(e,t,r,o){let l=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"secp256k1";if(!s(t,e))throw Error("Invalid sign doc for ADR-36");let u=new a.PubKeySecp256k1(r);if(("ethsecp256k1"===l?new i.Bech32Address(u.getEthAddress()).toBech32(e):new i.Bech32Address(u.getCosmosAddress()).toBech32(e))!==t.msgs[0].value.signer)throw Error("Unmatched signer");let d=(0,n.serializeSignDoc)(t);return u.verifyDigest32("ethsecp256k1"===l?a.Hash.keccak256(d):a.Hash.sha256(d),o)}function d(e,t,r,n,i){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"secp256k1";return u(e,l(t,r),n,i,o)}t.checkAndValidateADR36AminoSignDoc=s,t.makeADR36AminoSignDoc=l,t.verifyADR36AminoSignDoc=u,t.verifyADR36Amino=d},59892:function(e,t,r){"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(14042),t)},6756:function(e,t,r){"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Bech32Address=void 0;let a=o(r(45613)),s=r(23663),l=r(86731);class u{static shortenAddress(e,t){if(t>=e.length)return e;let r=e.indexOf("1"),n=e.slice(0,r),i=e.slice(r+1);if(t-=n.length,t-=3,(t-=1)<=0)return"";let o=Math.floor(i.length/2),a=i.slice(0,o),s=i.slice(o);for(;t0?a=a.slice(0,a.length-1):s=s.slice(1);return n+"1"+a+"..."+s}static fromBech32(e,t){let r=a.default.decode(e);if(t&&r.prefix!==t)throw Error("Unmatched prefix");return new u(new Uint8Array((0,a.fromWords)(r.words)))}static validate(e,t){let{prefix:r}=a.default.decode(e);if(t&&t!==r)throw Error("Unexpected prefix (expected: ".concat(t,", actual: ").concat(r,")"))}static defaultBech32Config(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"val",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"cons",n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"pub",i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"oper";return{bech32PrefixAccAddr:e,bech32PrefixAccPub:e+n,bech32PrefixValAddr:e+t+i,bech32PrefixValPub:e+t+i+n,bech32PrefixConsAddr:e+t+r,bech32PrefixConsPub:e+t+r+n}}toBech32(e){let t=a.default.toWords(this.address);return a.default.encode(e,t)}toHex(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0],t=s.Buffer.from(this.address).toString("hex");if(0===t.length)throw Error("Empty address");return e?(0,l.getAddress)("0x"+t):"0x"+t}constructor(e){this.address=e}}t.Bech32Address=u},63016:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChainIdHelper=void 0;class r{static parse(e){if("injective-777"===e||"injective-888"===e)return{identifier:e,version:0};let t=e.split(r.VersionFormatRegExp).filter(Boolean);return 2!==t.length?{identifier:e,version:0}:{identifier:t[0],version:parseInt(t[1])}}static hasChainVersion(e){return r.parse(e).identifier!==e}}t.ChainIdHelper=r,r.VersionFormatRegExp=/(.+)-([\d]+)/},524:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EthermintChainIdHelper=void 0;let n=r(63016);class i{static parse(e){let t=n.ChainIdHelper.parse(e);if(e.startsWith("injective"))return["injective-777","injective-888"].includes(e)?Object.assign({ethChainId:5},t):Object.assign({ethChainId:1},t);let r=e.match("^([a-z]{1,})_{1}([1-9][0-9]*)-{1}([1-9][0-9]*)$");if(!r||4!==r.length||""===r[1]||Number.isNaN(parseFloat(r[2]))||!Number.isInteger(parseFloat(r[2])))throw Error("Invalid chainId for ethermint: ".concat(e));return Object.assign(Object.assign({},t),{ethChainId:parseFloat(r[2])})}}t.EthermintChainIdHelper=i},57771:function(e,t,r){"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(63016),t),i(r(524),t)},64471:function(e,t,r){"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(88649),t),i(r(6756),t),i(r(57771),t),i(r(87774),t),i(r(40705),t),i(r(59892),t),i(r(77735),t)},25919:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeSignDoc=t.encodeSecp256k1Signature=t.encodeSecp256k1Pubkey=void 0;let n=r(23663),i=r(79394);function o(e){if(33!==e.length||2!==e[0]&&3!==e[0])throw Error("Public key must be compressed secp256k1, i.e. 33 bytes starting with 0x02 or 0x03");return{type:"tendermint/PubKeySecp256k1",value:n.Buffer.from(e).toString("base64")}}function a(e,t){if(64!==t.length)throw Error("Signature must be 64 bytes long. Cosmos SDK uses a 2x32 byte fixed length encoding for the secp256k1 signature integers r and s.");return{pub_key:o(e),signature:n.Buffer.from(t).toString("base64")}}function s(e){return n.Buffer.from((0,i.escapeHTML)((0,i.sortedJsonByKeyStringify)(e)))}t.encodeSecp256k1Pubkey=o,t.encodeSecp256k1Signature=a,t.serializeSignDoc=s},77735:function(e,t,r){"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(25919),t)},70098:function(e,t,r){"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.defaultProtoCodec=t.ProtoCodec=void 0;let o=r(92486),a=r(24611),s=r(47431),l=r(85311),u=r(43846),d=r(28319),c=r(77398),p=r(39383),f=r(28382),h=r(16729),g=r(68557),m=r(86398),y=r(72235),v=r(97583),b=r(23663);i(r(16729),t);class S{unpackAnyFactory(e){if(this.typeUrlMap.has(e))return this.typeUrlMap.get(e)}unpackAny(e){let t=this.unpackAnyFactory(e.typeUrl);if(!t)return new h.UnknownMessage(e.typeUrl,e.value);let r=t.decode(e.value);return Object.assign(Object.assign({},e),{unpacked:r})}unpackedAnyToJSONRecursive(e){if(e instanceof h.UnknownMessage)return e.toJSON();let t=this.unpackAnyFactory(e.typeUrl);if(t&&"unpacked"in e&&e.unpacked){let r=e=>{let t="object"==typeof e&&!(e instanceof h.UnknownMessage)&&"typeUrl"in e&&e.typeUrl&&"string"==typeof e.typeUrl&&"value"in e&&e.value&&"string"==typeof e.value;if(t)try{b.Buffer.from(e.value,"base64")}catch(e){return!1}return t},n=e=>{let t=this.unpackAnyFactory(e.typeUrl),r=b.Buffer.from(e.value,"base64");if(!t)return new h.UnknownMessage(e.typeUrl,r).toJSON();let n=t.decode(r);return{typeUrl:e.typeUrl,value:t.toJSON(n)}},i=e=>{if(Array.isArray(e))for(let t=0;tthis.protoCodec.unpackedAnyToJSONRecursive(e))}),authInfo:n.AuthInfo.toJSON(this.authInfo),chainId:this.chainId,accountNumber:this.accountNumber});let e=n.SignDocDirectAux.toJSON(this.signDoc);return e.bodyBytes&&delete e.bodyBytes,(0,a.sortObjectByKey)(Object.assign(Object.assign({},e),{txBody:Object.assign(Object.assign({},n.TxBody.toJSON(this.txBody)),{messages:this.txMsgs.map(e=>this.protoCodec.unpackedAnyToJSONRecursive(e))})}))}constructor(e,t=i.defaultProtoCodec){this.signDoc=e,this.protoCodec=t}}t.ProtoSignDocDecoder=s},40705:function(e,t,r){"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(70098),t),i(r(49710),t),i(r(4050),t)},4050:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SignDocWrapper=void 0;let n=r(49710),i=r(55618),o=r(59892);class a{static fromAminoSignDoc(e){return new a(e)}static fromDirectSignDoc(e){return new a(e)}static fromDirectAuxSignDoc(e){return new a(e)}static fromDirectSignDocBytes(e){return new a(i.SignDoc.decode(e))}static fromDirectAuxSignDocBytes(e){return new a(i.SignDocDirectAux.decode(e))}clone(){return new a(this.signDoc)}get protoSignDoc(){if("amino"===this.mode)throw Error("Sign doc is encoded as Amino Json");if("msgs"in this.signDoc)throw Error("Unexpected error");return this._protoSignDoc||(this._protoSignDoc=new n.ProtoSignDocDecoder(this.signDoc)),this._protoSignDoc}get aminoSignDoc(){if("direct"===this.mode)throw Error("Sign doc is encoded as Protobuf");if(!("msgs"in this.signDoc))throw Error("Unexpected error");return this.signDoc}get chainId(){return"direct"===this.mode?this.protoSignDoc.chainId:this.aminoSignDoc.chain_id}get memo(){return"direct"===this.mode?this.protoSignDoc.txBody.memo:this.aminoSignDoc.memo}get fees(){var e,t;if("direct"===this.mode){let r=[];for(let n of null!==(t=null===(e=this.protoSignDoc.authInfo.fee)||void 0===e?void 0:e.amount)&&void 0!==t?t:[]){if(null==n.denom||null==n.amount)throw Error("Invalid fee");r.push({denom:n.denom,amount:n.amount})}return r}return this.aminoSignDoc.fee.amount}get payer(){var e;return"direct"===this.mode?null===(e=this.protoSignDoc.authInfo.fee)||void 0===e?void 0:e.payer:this.aminoSignDoc.fee.payer}get granter(){var e;return"direct"===this.mode?null===(e=this.protoSignDoc.authInfo.fee)||void 0===e?void 0:e.granter:this.aminoSignDoc.fee.granter}get gas(){var e;return"direct"===this.mode?(null===(e=this.protoSignDoc.authInfo.fee)||void 0===e?void 0:e.gasLimit)?parseInt(this.protoSignDoc.authInfo.fee.gasLimit):0:parseInt(this.aminoSignDoc.fee.gas)}constructor(e){this.signDoc=e,this.isDirectAux=!1,"msgs"in e?this.mode="amino":(this.mode="direct",this.isDirectAux=!("authInfoBytes"in e)),"amino"===this.mode?this.isADR36SignDoc=(0,o.checkAndValidateADR36AminoSignDoc)(this.aminoSignDoc):this.isADR36SignDoc=!1}}t.SignDocWrapper=a},87774:function(e,t,r){"use strict";var n,i=function(e,t,r,n){function i(e){return e instanceof r?e:new r(function(t){t(e)})}return new(r||(r=Promise))(function(r,o){function a(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){e.done?r(e.value):i(e.value).then(a,s)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.TendermintTxTracer=t.WsReadyState=void 0;let o=r(23663);!function(e){e[e.CONNECTING=0]="CONNECTING",e[e.OPEN=1]="OPEN",e[e.CLOSING=2]="CLOSING",e[e.CLOSED=3]="CLOSED",e[e.NONE=4]="NONE"}(n=t.WsReadyState||(t.WsReadyState={}));class a{getWsEndpoint(){let e=this.url;if(e.startsWith("http")&&(e=e.replace("http","ws")),!e.endsWith(this.wsEndpoint)){let t=this.wsEndpoint.startsWith("/")?this.wsEndpoint:"/"+this.wsEndpoint;e=e.endsWith("/")?e+t.slice(1):e+t}return e}close(){this.ws.close()}get readyState(){switch(this.ws.readyState){case 0:return n.CONNECTING;case 1:return n.OPEN;case 2:return n.CLOSING;case 3:return n.CLOSED;default:return n.NONE}}addEventListener(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)}subscribeBlock(e){return this.newBlockSubscribes.push({handler:e}),1===this.newBlockSubscribes.length&&this.sendSubscribeBlockRpc(),()=>{this.newBlockSubscribes=this.newBlockSubscribes.filter(t=>t.handler!==e)}}sendSubscribeBlockRpc(){this.readyState===n.OPEN&&this.ws.send(JSON.stringify({jsonrpc:"2.0",method:"subscribe",params:["tm.event='NewBlock'"],id:1}))}traceTx(e){let t=!1;return new Promise(r=>{this.queryTx(e).then(t=>{if(e instanceof Uint8Array||(null==t?void 0:t.total_count)!=="0"){r(t);return}}).catch(()=>{}),i(this,void 0,void 0,function*(){for(;!t&&this.readyState!==n.CLOSED&&this.readyState!==n.CLOSING;)yield new Promise(e=>setTimeout(e,1e4)),this.queryTx(e).then(t=>{if(e instanceof Uint8Array||(null==t?void 0:t.total_count)!=="0"){r(t);return}}).catch(()=>{})}),this.subscribeTx(e).then(r)}).then(e=>(t=!0,new Promise(t=>{setTimeout(()=>t(e),100)})))}subscribeTx(e){if(e instanceof Uint8Array){let t=this.createRandomId(),r={query:"tm.event='Tx' AND tx.hash='".concat(o.Buffer.from(e).toString("hex").toUpperCase(),"'")};return new Promise((e,n)=>{this.txSubscribes.set(t,{params:r,resolver:e,rejector:n}),this.sendSubscribeTxRpc(t,r)})}{let t=this.createRandomId(),r={query:"tm.event='Tx' and "+Object.keys(e).map(t=>({key:t,value:e[t]})).map(e=>"".concat(e.key,"=").concat("string"==typeof e.value?"'".concat(e.value,"'"):e.value)).join(" and "),page:"1",per_page:"1",order_by:"asc"};return new Promise((e,n)=>{this.txSubscribes.set(t,{params:r,resolver:e,rejector:n}),this.sendSubscribeTxRpc(t,r)})}}sendSubscribeTxRpc(e,t){this.readyState===n.OPEN&&this.ws.send(JSON.stringify({jsonrpc:"2.0",method:"subscribe",params:t,id:e}))}queryTx(e){if(e instanceof Uint8Array)return this.query("tx",{hash:o.Buffer.from(e).toString("base64"),prove:!1});{let t={query:Object.keys(e).map(t=>({key:t,value:e[t]})).map(e=>"".concat(e.key,"=").concat("string"==typeof e.value?"'".concat(e.value,"'"):e.value)).join(" and "),page:"1",per_page:"1",order_by:"asc"};return this.query("tx_search",t)}}query(e,t){let r=this.createRandomId();return new Promise((n,i)=>{this.pendingQueries.set(r,{method:e,params:t,resolver:n,rejector:i}),this.sendQueryRpc(r,e,t)})}sendQueryRpc(e,t,r){this.readyState===n.OPEN&&this.ws.send(JSON.stringify({jsonrpc:"2.0",method:t,params:r,id:e}))}createRandomId(){return parseInt(Array.from({length:6}).map(()=>Math.floor(100*Math.random())).join(""))}constructor(e,t,r={}){this.url=e,this.wsEndpoint=t,this.options=r,this.newBlockSubscribes=[],this.txSubscribes=new Map,this.pendingQueries=new Map,this.listeners={},this.onOpen=e=>{var t;for(let[e,t]of(this.newBlockSubscribes.length>0&&this.sendSubscribeBlockRpc(),this.txSubscribes))this.sendSubscribeTxRpc(e,t.params);for(let[e,t]of this.pendingQueries)this.sendQueryRpc(e,t.method,t.params);for(let r of null!==(t=this.listeners.open)&&void 0!==t?t:[])r(e)},this.onMessage=e=>{var t,r,n,i,o,a;for(let r of null!==(t=this.listeners.message)&&void 0!==t?t:[])r(e);if(e.data)try{let t=JSON.parse(e.data);if((null==t?void 0:t.id)&&this.pendingQueries.has(t.id)&&(t.error?this.pendingQueries.get(t.id).rejector(Error(t.error.data||t.error.message)):(null===(r=t.result)||void 0===r?void 0:r.tx_result)?this.pendingQueries.get(t.id).resolver(t.result.tx_result):this.pendingQueries.get(t.id).resolver(t.result),this.pendingQueries.delete(t.id)),(null===(i=null===(n=null==t?void 0:t.result)||void 0===n?void 0:n.data)||void 0===i?void 0:i.type)==="tendermint/event/NewBlock")for(let e of this.newBlockSubscribes)e.handler(t.result.data.value);(null===(a=null===(o=null==t?void 0:t.result)||void 0===o?void 0:o.data)||void 0===a?void 0:a.type)==="tendermint/event/Tx"&&(null==t?void 0:t.id)&&this.txSubscribes.has(t.id)&&(t.error?this.txSubscribes.get(t.id).rejector(Error(t.error.data||t.error.message)):this.txSubscribes.get(t.id).resolver(t.result.data.value.TxResult.result),this.txSubscribes.delete(t.id))}catch(e){console.log("Tendermint websocket jsonrpc response is not JSON: ".concat(e.message||e.toString()))}},this.onClose=e=>{var t;for(let r of null!==(t=this.listeners.close)&&void 0!==t?t:[])r(e)},this.onError=e=>{var t;for(let r of null!==(t=this.listeners.error)&&void 0!==t?t:[])r(e);this.close()},this.ws=this.options.wsObject?new this.options.wsObject(this.getWsEndpoint()):new WebSocket(this.getWsEndpoint()),this.ws.onopen=this.onOpen,this.ws.onmessage=this.onMessage,this.ws.onclose=this.onClose,this.ws.onerror=this.onError}}t.TendermintTxTracer=a},45613:function(e){"use strict";for(var t="qpzry9x8gf2tvdw0s3jn54khce6mua7l",r={},n=0;n>25;return(33554431&e)<<5^996825010&-(t>>0&1)^642813549&-(t>>1&1)^513874426&-(t>>2&1)^1027748829&-(t>>3&1)^705979059&-(t>>4&1)}function a(e){for(var t=1,r=0;r126)return"Invalid prefix ("+e+")";t=o(t)^n>>5}for(r=0,t=o(t);rn)throw TypeError("Exceeds length limit");var i=a(e=e.toLowerCase());if("string"==typeof i)throw Error(i);for(var s=e+"1",l=0;l>5!=0)throw Error("Non 5-bit word");i=o(i)^u,s+=t.charAt(u)}for(l=0;l<6;++l)i=o(i);for(i^=1,l=0;l<6;++l){var d=i>>(5-l)*5&31;s+=t.charAt(d)}return s}function l(e,t){if(t=t||90,e.length<8)return e+" too short";if(e.length>t)return"Exceeds length limit";var n=e.toLowerCase(),i=e.toUpperCase();if(e!==n&&e!==i)return"Mixed-case string "+e;var s=(e=n).lastIndexOf("1");if(-1===s)return"No separator character for "+e;if(0===s)return"Missing prefix for "+e;var l=e.slice(0,s),u=e.slice(s+1);if(u.length<6)return"Data too short";var d=a(l);if("string"==typeof d)return d;for(var c=[],p=0;p=u.length||c.push(h)}return 1!==d?"Invalid checksum for "+e:{prefix:l,words:c}}function u(){var e=l.apply(null,arguments);if("object"==typeof e)return e}function d(e){var t=l.apply(null,arguments);if("object"==typeof t)return t;throw Error(t)}function c(e,t,r,n){for(var i=0,o=0,a=(1<=r;)s.push(i>>(o-=r)&a);if(n)o>0&&s.push(i<=t)return"Excess padding";if(i<1&&void 0!==arguments[1]?arguments[1]:e.length,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return e.substring(0,t)+"…"+e.substring(e.length-r,e.length)}}t.Hash=a},36173:function(e,t,r){"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(36609),t),i(r(33901),t),i(r(13470),t)},33901:function(e,t,r){"use strict";var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.PubKeySecp256k1=t.PrivKeySecp256k1=void 0;let i=r(23254),o=n(r(95617)),a=r(23663),s=r(13470);class l{static generateRandomKey(){let e=new i.ec("secp256k1");return new l(a.Buffer.from(e.genKeyPair().getPrivate().toArray()))}toBytes(){return new Uint8Array(this.privKey)}getPubKey(){let e=new i.ec("secp256k1").keyFromPrivate(this.privKey);return new u(new Uint8Array(e.getPublic().encodeCompressed("array")))}signDigest32(e){if(32!==e.length)throw Error("Invalid length of digest to sign: ".concat(e.length));let t=new i.ec("secp256k1").keyFromPrivate(this.privKey).sign(e,{canonical:!0});return{r:new Uint8Array(t.r.toArray("be",32)),s:new Uint8Array(t.s.toArray("be",32)),v:t.recoveryParam}}constructor(e){this.privKey=e}}t.PrivKeySecp256k1=l;class u{toBytes(e){if(e&&65===this.pubKey.length||!e&&33===this.pubKey.length)return this.pubKey;let t=this.toKeyPair();return new Uint8Array(e?a.Buffer.from(t.getPublic().encode("hex",!1),"hex"):a.Buffer.from(t.getPublic().encodeCompressed("hex"),"hex"))}getAddress(){return this.getCosmosAddress()}getCosmosAddress(){let e=o.default.SHA256(o.default.lib.WordArray.create(this.toBytes(!1))).toString();return e=o.default.RIPEMD160(o.default.enc.Hex.parse(e)).toString(),new Uint8Array(a.Buffer.from(e,"hex"))}getEthAddress(){return s.Hash.keccak256(this.toBytes(!0).slice(1)).slice(-20)}toKeyPair(){return new i.ec("secp256k1").keyFromPublic(a.Buffer.from(this.pubKey).toString("hex"),"hex")}verifyDigest32(e,t){if(32!==e.length)throw Error("Invalid length of digest to verify: ".concat(e.length));if(64!==t.length)throw Error("Invalid length of signature: ".concat(t.length));let r=new i.ec("secp256k1"),n=t.slice(0,32),o=t.slice(32);return r.verify(e,{r:a.Buffer.from(n).toString("hex"),s:a.Buffer.from(o).toString("hex")},this.toKeyPair())}constructor(e){if(this.pubKey=e,33!==e.length&&65!==e.length)throw Error("Invalid length of public key: ".concat(e.length))}}t.PubKeySecp256k1=u},36609:function(e,t,r){"use strict";var n=function(e,t,r,n){function i(e){return e instanceof r?e:new r(function(t){t(e)})}return new(r||(r=Promise))(function(r,o){function a(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){e.done?r(e.value):i(e.value).then(a,s)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.Mnemonic=void 0;let i=r(84639),o=r(53609),a=r(78110),s=r(23663);class l{static generateWallet(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"m/44'/118'/0'/0/0",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:256;return n(this,void 0,void 0,function*(){let n=yield l.generateSeed(e,i);return{privKey:l.generateWalletFromMnemonic(n,t,r),mnemonic:n}})}static validateMnemonic(e){return i.validateMnemonic(e)}static generateSeed(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:128;return n(this,void 0,void 0,function*(){if(t%32!=0)throw TypeError("invalid entropy");let r=new Uint8Array(t/8);return r=yield e(r),i.entropyToMnemonic(s.Buffer.from(r).toString("hex"))})}static generateWalletFromMnemonic(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"m/44'/118'/0'/0/0",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",n=i.mnemonicToSeedSync(e,r),a=o.fromSeed(n).derivePath(t).privateKey;if(!a)throw Error("null hd key");return a}static generateMasterSeedFromMnemonic(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=i.mnemonicToSeedSync(e,t),n=o.fromSeed(r);return s.Buffer.from(a.decode(n.toBase58()))}static generatePrivateKeyFromMasterSeed(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"m/44'/118'/0'/0/0",r=o.fromBase58(a.encode(e)).derivePath(t).privateKey;if(!r)throw Error("null hd key");return r}}t.Mnemonic=l},92486:function(e,t,r){"use strict";var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MsgInstallBundleResponse=t.MsgInstallBundle=t.MsgProvisionResponse=t.MsgProvision=t.MsgWalletSpendActionResponse=t.MsgWalletSpendAction=t.MsgWalletActionResponse=t.MsgWalletAction=t.MsgDeliverInboundResponse=t.MsgDeliverInbound=t.protobufPackage=void 0;let i=n(r(40059)),o=n(r(81667));function a(){return{messages:[],nums:[],ack:"0",submitter:new Uint8Array}}function s(){return{}}function l(){return{owner:new Uint8Array,action:""}}function u(){return{}}function d(){return{owner:new Uint8Array,spendAction:""}}function c(){return{}}function p(){return{nickname:"",address:new Uint8Array,powerFlags:[],submitter:new Uint8Array}}function f(){return{}}function h(){return{bundle:"",submitter:new Uint8Array,compressedBundle:new Uint8Array,uncompressedSize:"0"}}function g(){return{}}t.protobufPackage="agoric.swingset",t.MsgDeliverInbound={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();for(let r of e.messages)t.uint32(10).string(r);for(let r of(t.uint32(18).fork(),e.nums))t.uint64(r);return t.ldelim(),"0"!==e.ack&&t.uint32(24).uint64(e.ack),0!==e.submitter.length&&t.uint32(34).bytes(e.submitter),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=a();for(;r.pos>>3){case 1:i.messages.push(r.string());break;case 2:if((7&e)==2){let e=r.uint32()+r.pos;for(;r.pos({messages:Array.isArray(null==e?void 0:e.messages)?e.messages.map(e=>String(e)):[],nums:Array.isArray(null==e?void 0:e.nums)?e.nums.map(e=>String(e)):[],ack:_(e.ack)?String(e.ack):"0",submitter:_(e.submitter)?v(e.submitter):new Uint8Array}),toJSON(e){let t={};return e.messages?t.messages=e.messages.map(e=>e):t.messages=[],e.nums?t.nums=e.nums.map(e=>e):t.nums=[],void 0!==e.ack&&(t.ack=e.ack),void 0!==e.submitter&&(t.submitter=S(void 0!==e.submitter?e.submitter:new Uint8Array)),t},fromPartial(e){var t,r,n,i;let o=a();return o.messages=(null===(t=e.messages)||void 0===t?void 0:t.map(e=>e))||[],o.nums=(null===(r=e.nums)||void 0===r?void 0:r.map(e=>e))||[],o.ack=null!==(n=e.ack)&&void 0!==n?n:"0",o.submitter=null!==(i=e.submitter)&&void 0!==i?i:new Uint8Array,o}},t.MsgDeliverInboundResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=s();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>s()},t.MsgWalletAction={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return 0!==e.owner.length&&t.uint32(10).bytes(e.owner),""!==e.action&&t.uint32(18).string(e.action),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=l();for(;r.pos>>3){case 1:i.owner=r.bytes();break;case 2:i.action=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({owner:_(e.owner)?v(e.owner):new Uint8Array,action:_(e.action)?String(e.action):""}),toJSON(e){let t={};return void 0!==e.owner&&(t.owner=S(void 0!==e.owner?e.owner:new Uint8Array)),void 0!==e.action&&(t.action=e.action),t},fromPartial(e){var t,r;let n=l();return n.owner=null!==(t=e.owner)&&void 0!==t?t:new Uint8Array,n.action=null!==(r=e.action)&&void 0!==r?r:"",n}},t.MsgWalletActionResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=u();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>u()},t.MsgWalletSpendAction={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return 0!==e.owner.length&&t.uint32(10).bytes(e.owner),""!==e.spendAction&&t.uint32(18).string(e.spendAction),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=d();for(;r.pos>>3){case 1:i.owner=r.bytes();break;case 2:i.spendAction=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({owner:_(e.owner)?v(e.owner):new Uint8Array,spendAction:_(e.spendAction)?String(e.spendAction):""}),toJSON(e){let t={};return void 0!==e.owner&&(t.owner=S(void 0!==e.owner?e.owner:new Uint8Array)),void 0!==e.spendAction&&(t.spendAction=e.spendAction),t},fromPartial(e){var t,r;let n=d();return n.owner=null!==(t=e.owner)&&void 0!==t?t:new Uint8Array,n.spendAction=null!==(r=e.spendAction)&&void 0!==r?r:"",n}},t.MsgWalletSpendActionResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=c();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>c()},t.MsgProvision={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();for(let r of(""!==e.nickname&&t.uint32(10).string(e.nickname),0!==e.address.length&&t.uint32(18).bytes(e.address),e.powerFlags))t.uint32(26).string(r);return 0!==e.submitter.length&&t.uint32(34).bytes(e.submitter),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=p();for(;r.pos>>3){case 1:i.nickname=r.string();break;case 2:i.address=r.bytes();break;case 3:i.powerFlags.push(r.string());break;case 4:i.submitter=r.bytes();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({nickname:_(e.nickname)?String(e.nickname):"",address:_(e.address)?v(e.address):new Uint8Array,powerFlags:Array.isArray(null==e?void 0:e.powerFlags)?e.powerFlags.map(e=>String(e)):[],submitter:_(e.submitter)?v(e.submitter):new Uint8Array}),toJSON(e){let t={};return void 0!==e.nickname&&(t.nickname=e.nickname),void 0!==e.address&&(t.address=S(void 0!==e.address?e.address:new Uint8Array)),e.powerFlags?t.powerFlags=e.powerFlags.map(e=>e):t.powerFlags=[],void 0!==e.submitter&&(t.submitter=S(void 0!==e.submitter?e.submitter:new Uint8Array)),t},fromPartial(e){var t,r,n,i;let o=p();return o.nickname=null!==(t=e.nickname)&&void 0!==t?t:"",o.address=null!==(r=e.address)&&void 0!==r?r:new Uint8Array,o.powerFlags=(null===(n=e.powerFlags)||void 0===n?void 0:n.map(e=>e))||[],o.submitter=null!==(i=e.submitter)&&void 0!==i?i:new Uint8Array,o}},t.MsgProvisionResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=f();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>f()},t.MsgInstallBundle={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.bundle&&t.uint32(10).string(e.bundle),0!==e.submitter.length&&t.uint32(18).bytes(e.submitter),0!==e.compressedBundle.length&&t.uint32(26).bytes(e.compressedBundle),"0"!==e.uncompressedSize&&t.uint32(32).int64(e.uncompressedSize),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=h();for(;r.pos>>3){case 1:i.bundle=r.string();break;case 2:i.submitter=r.bytes();break;case 3:i.compressedBundle=r.bytes();break;case 4:i.uncompressedSize=w(r.int64());break;default:r.skipType(7&e)}}return i},fromJSON:e=>({bundle:_(e.bundle)?String(e.bundle):"",submitter:_(e.submitter)?v(e.submitter):new Uint8Array,compressedBundle:_(e.compressedBundle)?v(e.compressedBundle):new Uint8Array,uncompressedSize:_(e.uncompressedSize)?String(e.uncompressedSize):"0"}),toJSON(e){let t={};return void 0!==e.bundle&&(t.bundle=e.bundle),void 0!==e.submitter&&(t.submitter=S(void 0!==e.submitter?e.submitter:new Uint8Array)),void 0!==e.compressedBundle&&(t.compressedBundle=S(void 0!==e.compressedBundle?e.compressedBundle:new Uint8Array)),void 0!==e.uncompressedSize&&(t.uncompressedSize=e.uncompressedSize),t},fromPartial(e){var t,r,n,i;let o=h();return o.bundle=null!==(t=e.bundle)&&void 0!==t?t:"",o.submitter=null!==(r=e.submitter)&&void 0!==r?r:new Uint8Array,o.compressedBundle=null!==(n=e.compressedBundle)&&void 0!==n?n:new Uint8Array,o.uncompressedSize=null!==(i=e.uncompressedSize)&&void 0!==i?i:"0",o}},t.MsgInstallBundleResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=g();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>g()};var m=void 0!==m?m:"undefined"!=typeof self?self:window;let y=m.atob||(e=>m.Buffer.from(e,"base64").toString("binary"));function v(e){let t=y(e),r=new Uint8Array(t.length);for(let e=0;em.Buffer.from(e,"binary").toString("base64"));function S(e){let t=[];for(let r of e)t.push(String.fromCharCode(r));return b(t.join(""))}function w(e){return e.toString()}function _(e){return null!=e}o.default.util.Long!==i.default&&(o.default.util.Long=i.default,o.default.configure())},68557:function(e,t,r){"use strict";var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Grant=t.GenericAuthorization=t.protobufPackage=void 0;let i=n(r(40059)),o=n(r(81667)),a=r(90338),s=r(28446);function l(){return{msg:""}}function u(){return{authorization:void 0,expiration:void 0}}function d(e){return{seconds:Math.trunc(e.getTime()/1e3).toString(),nanos:e.getTime()%1e3*1e6}}function c(e){let t=1e3*Number(e.seconds);return new Date(t+=e.nanos/1e6)}function p(e){return e instanceof Date?e:"string"==typeof e?new Date(e):c(a.Timestamp.fromJSON(e))}function f(e){return null!=e}t.protobufPackage="cosmos.authz.v1beta1",t.GenericAuthorization={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.msg&&t.uint32(10).string(e.msg),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=l();for(;r.pos>>3==1?i.msg=r.string():r.skipType(7&e)}return i},fromJSON:e=>({msg:f(e.msg)?String(e.msg):""}),toJSON(e){let t={};return void 0!==e.msg&&(t.msg=e.msg),t},fromPartial(e){var t;let r=l();return r.msg=null!==(t=e.msg)&&void 0!==t?t:"",r}},t.Grant={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return void 0!==e.authorization&&s.Any.encode(e.authorization,t.uint32(10).fork()).ldelim(),void 0!==e.expiration&&a.Timestamp.encode(d(e.expiration),t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=u();for(;r.pos>>3){case 1:i.authorization=s.Any.decode(r,r.uint32());break;case 2:i.expiration=c(a.Timestamp.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return i},fromJSON:e=>({authorization:f(e.authorization)?s.Any.fromJSON(e.authorization):void 0,expiration:f(e.expiration)?p(e.expiration):void 0}),toJSON(e){let t={};return void 0!==e.authorization&&(t.authorization=e.authorization?s.Any.toJSON(e.authorization):void 0),void 0!==e.expiration&&(t.expiration=e.expiration.toISOString()),t},fromPartial(e){var t;let r=u();return r.authorization=void 0!==e.authorization&&null!==e.authorization?s.Any.fromPartial(e.authorization):void 0,r.expiration=null!==(t=e.expiration)&&void 0!==t?t:void 0,r}},o.default.util.Long!==i.default&&(o.default.util.Long=i.default,o.default.configure())},85311:function(e,t,r){"use strict";var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MsgRevokeResponse=t.MsgRevoke=t.MsgGrantResponse=t.MsgExec=t.MsgExecResponse=t.MsgGrant=t.protobufPackage=void 0;let i=n(r(40059)),o=n(r(81667)),a=r(68557),s=r(28446);function l(){return{granter:"",grantee:"",grant:void 0}}function u(){return{results:[]}}function d(){return{grantee:"",msgs:[]}}function c(){return{}}function p(){return{granter:"",grantee:"",msgTypeUrl:""}}function f(){return{}}t.protobufPackage="cosmos.authz.v1beta1",t.MsgGrant={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.granter&&t.uint32(10).string(e.granter),""!==e.grantee&&t.uint32(18).string(e.grantee),void 0!==e.grant&&a.Grant.encode(e.grant,t.uint32(26).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=l();for(;r.pos>>3){case 1:i.granter=r.string();break;case 2:i.grantee=r.string();break;case 3:i.grant=a.Grant.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON:e=>({granter:b(e.granter)?String(e.granter):"",grantee:b(e.grantee)?String(e.grantee):"",grant:b(e.grant)?a.Grant.fromJSON(e.grant):void 0}),toJSON(e){let t={};return void 0!==e.granter&&(t.granter=e.granter),void 0!==e.grantee&&(t.grantee=e.grantee),void 0!==e.grant&&(t.grant=e.grant?a.Grant.toJSON(e.grant):void 0),t},fromPartial(e){var t,r;let n=l();return n.granter=null!==(t=e.granter)&&void 0!==t?t:"",n.grantee=null!==(r=e.grantee)&&void 0!==r?r:"",n.grant=void 0!==e.grant&&null!==e.grant?a.Grant.fromPartial(e.grant):void 0,n}},t.MsgExecResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();for(let r of e.results)t.uint32(10).bytes(r);return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=u();for(;r.pos>>3==1?i.results.push(r.bytes()):r.skipType(7&e)}return i},fromJSON:e=>({results:Array.isArray(null==e?void 0:e.results)?e.results.map(e=>m(e)):[]}),toJSON(e){let t={};return e.results?t.results=e.results.map(e=>v(void 0!==e?e:new Uint8Array)):t.results=[],t},fromPartial(e){var t;let r=u();return r.results=(null===(t=e.results)||void 0===t?void 0:t.map(e=>e))||[],r}},t.MsgExec={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();for(let r of(""!==e.grantee&&t.uint32(10).string(e.grantee),e.msgs))s.Any.encode(r,t.uint32(18).fork()).ldelim();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=d();for(;r.pos>>3){case 1:i.grantee=r.string();break;case 2:i.msgs.push(s.Any.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return i},fromJSON:e=>({grantee:b(e.grantee)?String(e.grantee):"",msgs:Array.isArray(null==e?void 0:e.msgs)?e.msgs.map(e=>s.Any.fromJSON(e)):[]}),toJSON(e){let t={};return void 0!==e.grantee&&(t.grantee=e.grantee),e.msgs?t.msgs=e.msgs.map(e=>e?s.Any.toJSON(e):void 0):t.msgs=[],t},fromPartial(e){var t,r;let n=d();return n.grantee=null!==(t=e.grantee)&&void 0!==t?t:"",n.msgs=(null===(r=e.msgs)||void 0===r?void 0:r.map(e=>s.Any.fromPartial(e)))||[],n}},t.MsgGrantResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=c();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>c()},t.MsgRevoke={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.granter&&t.uint32(10).string(e.granter),""!==e.grantee&&t.uint32(18).string(e.grantee),""!==e.msgTypeUrl&&t.uint32(26).string(e.msgTypeUrl),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=p();for(;r.pos>>3){case 1:i.granter=r.string();break;case 2:i.grantee=r.string();break;case 3:i.msgTypeUrl=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({granter:b(e.granter)?String(e.granter):"",grantee:b(e.grantee)?String(e.grantee):"",msgTypeUrl:b(e.msgTypeUrl)?String(e.msgTypeUrl):""}),toJSON(e){let t={};return void 0!==e.granter&&(t.granter=e.granter),void 0!==e.grantee&&(t.grantee=e.grantee),void 0!==e.msgTypeUrl&&(t.msgTypeUrl=e.msgTypeUrl),t},fromPartial(e){var t,r,n;let i=p();return i.granter=null!==(t=e.granter)&&void 0!==t?t:"",i.grantee=null!==(r=e.grantee)&&void 0!==r?r:"",i.msgTypeUrl=null!==(n=e.msgTypeUrl)&&void 0!==n?n:"",i}},t.MsgRevokeResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=f();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>f()};var h=void 0!==h?h:"undefined"!=typeof self?self:window;let g=h.atob||(e=>h.Buffer.from(e,"base64").toString("binary"));function m(e){let t=g(e),r=new Uint8Array(t.length);for(let e=0;eh.Buffer.from(e,"binary").toString("base64"));function v(e){let t=[];for(let r of e)t.push(String.fromCharCode(r));return y(t.join(""))}function b(e){return null!=e}o.default.util.Long!==i.default&&(o.default.util.Long=i.default,o.default.configure())},72235:function(e,t,r){"use strict";var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.SendAuthorization=t.protobufPackage=void 0;let i=n(r(40059)),o=n(r(81667)),a=r(80054);function s(){return{spendLimit:[]}}t.protobufPackage="cosmos.bank.v1beta1",t.SendAuthorization={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();for(let r of e.spendLimit)a.Coin.encode(r,t.uint32(10).fork()).ldelim();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=s();for(;r.pos>>3==1?i.spendLimit.push(a.Coin.decode(r,r.uint32())):r.skipType(7&e)}return i},fromJSON:e=>({spendLimit:Array.isArray(null==e?void 0:e.spendLimit)?e.spendLimit.map(e=>a.Coin.fromJSON(e)):[]}),toJSON(e){let t={};return e.spendLimit?t.spendLimit=e.spendLimit.map(e=>e?a.Coin.toJSON(e):void 0):t.spendLimit=[],t},fromPartial(e){var t;let r=s();return r.spendLimit=(null===(t=e.spendLimit)||void 0===t?void 0:t.map(e=>a.Coin.fromPartial(e)))||[],r}},o.default.util.Long!==i.default&&(o.default.util.Long=i.default,o.default.configure())},96291:function(e,t,r){"use strict";var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Metadata=t.DenomUnit=t.Supply=t.Output=t.Input=t.SendEnabled=t.Params=t.protobufPackage=void 0;let i=n(r(40059)),o=n(r(81667)),a=r(80054);function s(){return{sendEnabled:[],defaultSendEnabled:!1}}function l(){return{denom:"",enabled:!1}}function u(){return{address:"",coins:[]}}function d(){return{address:"",coins:[]}}function c(){return{total:[]}}function p(){return{denom:"",exponent:0,aliases:[]}}function f(){return{description:"",denomUnits:[],base:"",display:"",name:"",symbol:""}}function h(e){return null!=e}t.protobufPackage="cosmos.bank.v1beta1",t.Params={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();for(let n of e.sendEnabled)t.SendEnabled.encode(n,r.uint32(10).fork()).ldelim();return!0===e.defaultSendEnabled&&r.uint32(16).bool(e.defaultSendEnabled),r},decode(e,r){let n=e instanceof o.default.Reader?e:new o.default.Reader(e),i=void 0===r?n.len:n.pos+r,a=s();for(;n.pos>>3){case 1:a.sendEnabled.push(t.SendEnabled.decode(n,n.uint32()));break;case 2:a.defaultSendEnabled=n.bool();break;default:n.skipType(7&e)}}return a},fromJSON:e=>({sendEnabled:Array.isArray(null==e?void 0:e.sendEnabled)?e.sendEnabled.map(e=>t.SendEnabled.fromJSON(e)):[],defaultSendEnabled:!!h(e.defaultSendEnabled)&&!!e.defaultSendEnabled}),toJSON(e){let r={};return e.sendEnabled?r.sendEnabled=e.sendEnabled.map(e=>e?t.SendEnabled.toJSON(e):void 0):r.sendEnabled=[],void 0!==e.defaultSendEnabled&&(r.defaultSendEnabled=e.defaultSendEnabled),r},fromPartial(e){var r,n;let i=s();return i.sendEnabled=(null===(r=e.sendEnabled)||void 0===r?void 0:r.map(e=>t.SendEnabled.fromPartial(e)))||[],i.defaultSendEnabled=null!==(n=e.defaultSendEnabled)&&void 0!==n&&n,i}},t.SendEnabled={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.denom&&t.uint32(10).string(e.denom),!0===e.enabled&&t.uint32(16).bool(e.enabled),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=l();for(;r.pos>>3){case 1:i.denom=r.string();break;case 2:i.enabled=r.bool();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({denom:h(e.denom)?String(e.denom):"",enabled:!!h(e.enabled)&&!!e.enabled}),toJSON(e){let t={};return void 0!==e.denom&&(t.denom=e.denom),void 0!==e.enabled&&(t.enabled=e.enabled),t},fromPartial(e){var t,r;let n=l();return n.denom=null!==(t=e.denom)&&void 0!==t?t:"",n.enabled=null!==(r=e.enabled)&&void 0!==r&&r,n}},t.Input={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();for(let r of(""!==e.address&&t.uint32(10).string(e.address),e.coins))a.Coin.encode(r,t.uint32(18).fork()).ldelim();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=u();for(;r.pos>>3){case 1:i.address=r.string();break;case 2:i.coins.push(a.Coin.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return i},fromJSON:e=>({address:h(e.address)?String(e.address):"",coins:Array.isArray(null==e?void 0:e.coins)?e.coins.map(e=>a.Coin.fromJSON(e)):[]}),toJSON(e){let t={};return void 0!==e.address&&(t.address=e.address),e.coins?t.coins=e.coins.map(e=>e?a.Coin.toJSON(e):void 0):t.coins=[],t},fromPartial(e){var t,r;let n=u();return n.address=null!==(t=e.address)&&void 0!==t?t:"",n.coins=(null===(r=e.coins)||void 0===r?void 0:r.map(e=>a.Coin.fromPartial(e)))||[],n}},t.Output={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();for(let r of(""!==e.address&&t.uint32(10).string(e.address),e.coins))a.Coin.encode(r,t.uint32(18).fork()).ldelim();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=d();for(;r.pos>>3){case 1:i.address=r.string();break;case 2:i.coins.push(a.Coin.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return i},fromJSON:e=>({address:h(e.address)?String(e.address):"",coins:Array.isArray(null==e?void 0:e.coins)?e.coins.map(e=>a.Coin.fromJSON(e)):[]}),toJSON(e){let t={};return void 0!==e.address&&(t.address=e.address),e.coins?t.coins=e.coins.map(e=>e?a.Coin.toJSON(e):void 0):t.coins=[],t},fromPartial(e){var t,r;let n=d();return n.address=null!==(t=e.address)&&void 0!==t?t:"",n.coins=(null===(r=e.coins)||void 0===r?void 0:r.map(e=>a.Coin.fromPartial(e)))||[],n}},t.Supply={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();for(let r of e.total)a.Coin.encode(r,t.uint32(10).fork()).ldelim();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=c();for(;r.pos>>3==1?i.total.push(a.Coin.decode(r,r.uint32())):r.skipType(7&e)}return i},fromJSON:e=>({total:Array.isArray(null==e?void 0:e.total)?e.total.map(e=>a.Coin.fromJSON(e)):[]}),toJSON(e){let t={};return e.total?t.total=e.total.map(e=>e?a.Coin.toJSON(e):void 0):t.total=[],t},fromPartial(e){var t;let r=c();return r.total=(null===(t=e.total)||void 0===t?void 0:t.map(e=>a.Coin.fromPartial(e)))||[],r}},t.DenomUnit={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();for(let r of(""!==e.denom&&t.uint32(10).string(e.denom),0!==e.exponent&&t.uint32(16).uint32(e.exponent),e.aliases))t.uint32(26).string(r);return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=p();for(;r.pos>>3){case 1:i.denom=r.string();break;case 2:i.exponent=r.uint32();break;case 3:i.aliases.push(r.string());break;default:r.skipType(7&e)}}return i},fromJSON:e=>({denom:h(e.denom)?String(e.denom):"",exponent:h(e.exponent)?Number(e.exponent):0,aliases:Array.isArray(null==e?void 0:e.aliases)?e.aliases.map(e=>String(e)):[]}),toJSON(e){let t={};return void 0!==e.denom&&(t.denom=e.denom),void 0!==e.exponent&&(t.exponent=Math.round(e.exponent)),e.aliases?t.aliases=e.aliases.map(e=>e):t.aliases=[],t},fromPartial(e){var t,r,n;let i=p();return i.denom=null!==(t=e.denom)&&void 0!==t?t:"",i.exponent=null!==(r=e.exponent)&&void 0!==r?r:0,i.aliases=(null===(n=e.aliases)||void 0===n?void 0:n.map(e=>e))||[],i}},t.Metadata={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();for(let n of(""!==e.description&&r.uint32(10).string(e.description),e.denomUnits))t.DenomUnit.encode(n,r.uint32(18).fork()).ldelim();return""!==e.base&&r.uint32(26).string(e.base),""!==e.display&&r.uint32(34).string(e.display),""!==e.name&&r.uint32(42).string(e.name),""!==e.symbol&&r.uint32(50).string(e.symbol),r},decode(e,r){let n=e instanceof o.default.Reader?e:new o.default.Reader(e),i=void 0===r?n.len:n.pos+r,a=f();for(;n.pos>>3){case 1:a.description=n.string();break;case 2:a.denomUnits.push(t.DenomUnit.decode(n,n.uint32()));break;case 3:a.base=n.string();break;case 4:a.display=n.string();break;case 5:a.name=n.string();break;case 6:a.symbol=n.string();break;default:n.skipType(7&e)}}return a},fromJSON:e=>({description:h(e.description)?String(e.description):"",denomUnits:Array.isArray(null==e?void 0:e.denomUnits)?e.denomUnits.map(e=>t.DenomUnit.fromJSON(e)):[],base:h(e.base)?String(e.base):"",display:h(e.display)?String(e.display):"",name:h(e.name)?String(e.name):"",symbol:h(e.symbol)?String(e.symbol):""}),toJSON(e){let r={};return void 0!==e.description&&(r.description=e.description),e.denomUnits?r.denomUnits=e.denomUnits.map(e=>e?t.DenomUnit.toJSON(e):void 0):r.denomUnits=[],void 0!==e.base&&(r.base=e.base),void 0!==e.display&&(r.display=e.display),void 0!==e.name&&(r.name=e.name),void 0!==e.symbol&&(r.symbol=e.symbol),r},fromPartial(e){var r,n,i,o,a,s;let l=f();return l.description=null!==(r=e.description)&&void 0!==r?r:"",l.denomUnits=(null===(n=e.denomUnits)||void 0===n?void 0:n.map(e=>t.DenomUnit.fromPartial(e)))||[],l.base=null!==(i=e.base)&&void 0!==i?i:"",l.display=null!==(o=e.display)&&void 0!==o?o:"",l.name=null!==(a=e.name)&&void 0!==a?a:"",l.symbol=null!==(s=e.symbol)&&void 0!==s?s:"",l}},o.default.util.Long!==i.default&&(o.default.util.Long=i.default,o.default.configure())},24611:function(e,t,r){"use strict";var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MsgMultiSendResponse=t.MsgMultiSend=t.MsgSendResponse=t.MsgSend=t.protobufPackage=void 0;let i=n(r(40059)),o=n(r(81667)),a=r(80054),s=r(96291);function l(){return{fromAddress:"",toAddress:"",amount:[]}}function u(){return{}}function d(){return{inputs:[],outputs:[]}}function c(){return{}}function p(e){return null!=e}t.protobufPackage="cosmos.bank.v1beta1",t.MsgSend={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();for(let r of(""!==e.fromAddress&&t.uint32(10).string(e.fromAddress),""!==e.toAddress&&t.uint32(18).string(e.toAddress),e.amount))a.Coin.encode(r,t.uint32(26).fork()).ldelim();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=l();for(;r.pos>>3){case 1:i.fromAddress=r.string();break;case 2:i.toAddress=r.string();break;case 3:i.amount.push(a.Coin.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return i},fromJSON:e=>({fromAddress:p(e.fromAddress)?String(e.fromAddress):"",toAddress:p(e.toAddress)?String(e.toAddress):"",amount:Array.isArray(null==e?void 0:e.amount)?e.amount.map(e=>a.Coin.fromJSON(e)):[]}),toJSON(e){let t={};return void 0!==e.fromAddress&&(t.fromAddress=e.fromAddress),void 0!==e.toAddress&&(t.toAddress=e.toAddress),e.amount?t.amount=e.amount.map(e=>e?a.Coin.toJSON(e):void 0):t.amount=[],t},fromPartial(e){var t,r,n;let i=l();return i.fromAddress=null!==(t=e.fromAddress)&&void 0!==t?t:"",i.toAddress=null!==(r=e.toAddress)&&void 0!==r?r:"",i.amount=(null===(n=e.amount)||void 0===n?void 0:n.map(e=>a.Coin.fromPartial(e)))||[],i}},t.MsgSendResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=u();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>u()},t.MsgMultiSend={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();for(let r of e.inputs)s.Input.encode(r,t.uint32(10).fork()).ldelim();for(let r of e.outputs)s.Output.encode(r,t.uint32(18).fork()).ldelim();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=d();for(;r.pos>>3){case 1:i.inputs.push(s.Input.decode(r,r.uint32()));break;case 2:i.outputs.push(s.Output.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return i},fromJSON:e=>({inputs:Array.isArray(null==e?void 0:e.inputs)?e.inputs.map(e=>s.Input.fromJSON(e)):[],outputs:Array.isArray(null==e?void 0:e.outputs)?e.outputs.map(e=>s.Output.fromJSON(e)):[]}),toJSON(e){let t={};return e.inputs?t.inputs=e.inputs.map(e=>e?s.Input.toJSON(e):void 0):t.inputs=[],e.outputs?t.outputs=e.outputs.map(e=>e?s.Output.toJSON(e):void 0):t.outputs=[],t},fromPartial(e){var t,r;let n=d();return n.inputs=(null===(t=e.inputs)||void 0===t?void 0:t.map(e=>s.Input.fromPartial(e)))||[],n.outputs=(null===(r=e.outputs)||void 0===r?void 0:r.map(e=>s.Output.fromPartial(e)))||[],n}},t.MsgMultiSendResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=c();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>c()},o.default.util.Long!==i.default&&(o.default.util.Long=i.default,o.default.configure())},80054:function(e,t,r){"use strict";var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.DecProto=t.IntProto=t.DecCoin=t.Coin=t.protobufPackage=void 0;let i=n(r(40059)),o=n(r(81667));function a(){return{denom:"",amount:""}}function s(){return{denom:"",amount:""}}function l(){return{int:""}}function u(){return{dec:""}}function d(e){return null!=e}t.protobufPackage="cosmos.base.v1beta1",t.Coin={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.denom&&t.uint32(10).string(e.denom),""!==e.amount&&t.uint32(18).string(e.amount),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=a();for(;r.pos>>3){case 1:i.denom=r.string();break;case 2:i.amount=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({denom:d(e.denom)?String(e.denom):"",amount:d(e.amount)?String(e.amount):""}),toJSON(e){let t={};return void 0!==e.denom&&(t.denom=e.denom),void 0!==e.amount&&(t.amount=e.amount),t},fromPartial(e){var t,r;let n=a();return n.denom=null!==(t=e.denom)&&void 0!==t?t:"",n.amount=null!==(r=e.amount)&&void 0!==r?r:"",n}},t.DecCoin={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.denom&&t.uint32(10).string(e.denom),""!==e.amount&&t.uint32(18).string(e.amount),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=s();for(;r.pos>>3){case 1:i.denom=r.string();break;case 2:i.amount=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({denom:d(e.denom)?String(e.denom):"",amount:d(e.amount)?String(e.amount):""}),toJSON(e){let t={};return void 0!==e.denom&&(t.denom=e.denom),void 0!==e.amount&&(t.amount=e.amount),t},fromPartial(e){var t,r;let n=s();return n.denom=null!==(t=e.denom)&&void 0!==t?t:"",n.amount=null!==(r=e.amount)&&void 0!==r?r:"",n}},t.IntProto={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.int&&t.uint32(10).string(e.int),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=l();for(;r.pos>>3==1?i.int=r.string():r.skipType(7&e)}return i},fromJSON:e=>({int:d(e.int)?String(e.int):""}),toJSON(e){let t={};return void 0!==e.int&&(t.int=e.int),t},fromPartial(e){var t;let r=l();return r.int=null!==(t=e.int)&&void 0!==t?t:"",r}},t.DecProto={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.dec&&t.uint32(10).string(e.dec),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=u();for(;r.pos>>3==1?i.dec=r.string():r.skipType(7&e)}return i},fromJSON:e=>({dec:d(e.dec)?String(e.dec):""}),toJSON(e){let t={};return void 0!==e.dec&&(t.dec=e.dec),t},fromPartial(e){var t;let r=u();return r.dec=null!==(t=e.dec)&&void 0!==t?t:"",r}},o.default.util.Long!==i.default&&(o.default.util.Long=i.default,o.default.configure())},61097:function(e,t,r){"use strict";var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.CompactBitArray=t.MultiSignature=t.protobufPackage=void 0;let i=n(r(40059)),o=n(r(81667));function a(){return{signatures:[]}}function s(){return{extraBitsStored:0,elems:new Uint8Array}}t.protobufPackage="cosmos.crypto.multisig.v1beta1",t.MultiSignature={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();for(let r of e.signatures)t.uint32(10).bytes(r);return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=a();for(;r.pos>>3==1?i.signatures.push(r.bytes()):r.skipType(7&e)}return i},fromJSON:e=>({signatures:Array.isArray(null==e?void 0:e.signatures)?e.signatures.map(e=>d(e)):[]}),toJSON(e){let t={};return e.signatures?t.signatures=e.signatures.map(e=>p(void 0!==e?e:new Uint8Array)):t.signatures=[],t},fromPartial(e){var t;let r=a();return r.signatures=(null===(t=e.signatures)||void 0===t?void 0:t.map(e=>e))||[],r}},t.CompactBitArray={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return 0!==e.extraBitsStored&&t.uint32(8).uint32(e.extraBitsStored),0!==e.elems.length&&t.uint32(18).bytes(e.elems),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=s();for(;r.pos>>3){case 1:i.extraBitsStored=r.uint32();break;case 2:i.elems=r.bytes();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({extraBitsStored:f(e.extraBitsStored)?Number(e.extraBitsStored):0,elems:f(e.elems)?d(e.elems):new Uint8Array}),toJSON(e){let t={};return void 0!==e.extraBitsStored&&(t.extraBitsStored=Math.round(e.extraBitsStored)),void 0!==e.elems&&(t.elems=p(void 0!==e.elems?e.elems:new Uint8Array)),t},fromPartial(e){var t,r;let n=s();return n.extraBitsStored=null!==(t=e.extraBitsStored)&&void 0!==t?t:0,n.elems=null!==(r=e.elems)&&void 0!==r?r:new Uint8Array,n}};var l=void 0!==l?l:"undefined"!=typeof self?self:window;let u=l.atob||(e=>l.Buffer.from(e,"base64").toString("binary"));function d(e){let t=u(e),r=new Uint8Array(t.length);for(let e=0;el.Buffer.from(e,"binary").toString("base64"));function p(e){let t=[];for(let r of e)t.push(String.fromCharCode(r));return c(t.join(""))}function f(e){return null!=e}o.default.util.Long!==i.default&&(o.default.util.Long=i.default,o.default.configure())},28319:function(e,t,r){"use strict";var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MsgFundCommunityPoolResponse=t.MsgFundCommunityPool=t.MsgWithdrawValidatorCommissionResponse=t.MsgWithdrawValidatorCommission=t.MsgWithdrawDelegatorRewardResponse=t.MsgWithdrawDelegatorReward=t.MsgSetWithdrawAddressResponse=t.MsgSetWithdrawAddress=t.protobufPackage=void 0;let i=n(r(40059)),o=n(r(81667)),a=r(80054);function s(){return{delegatorAddress:"",withdrawAddress:""}}function l(){return{}}function u(){return{delegatorAddress:"",validatorAddress:""}}function d(){return{}}function c(){return{validatorAddress:""}}function p(){return{}}function f(){return{amount:[],depositor:""}}function h(){return{}}function g(e){return null!=e}t.protobufPackage="cosmos.distribution.v1beta1",t.MsgSetWithdrawAddress={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),""!==e.withdrawAddress&&t.uint32(18).string(e.withdrawAddress),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=s();for(;r.pos>>3){case 1:i.delegatorAddress=r.string();break;case 2:i.withdrawAddress=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({delegatorAddress:g(e.delegatorAddress)?String(e.delegatorAddress):"",withdrawAddress:g(e.withdrawAddress)?String(e.withdrawAddress):""}),toJSON(e){let t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.withdrawAddress&&(t.withdrawAddress=e.withdrawAddress),t},fromPartial(e){var t,r;let n=s();return n.delegatorAddress=null!==(t=e.delegatorAddress)&&void 0!==t?t:"",n.withdrawAddress=null!==(r=e.withdrawAddress)&&void 0!==r?r:"",n}},t.MsgSetWithdrawAddressResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=l();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>l()},t.MsgWithdrawDelegatorReward={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),""!==e.validatorAddress&&t.uint32(18).string(e.validatorAddress),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=u();for(;r.pos>>3){case 1:i.delegatorAddress=r.string();break;case 2:i.validatorAddress=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({delegatorAddress:g(e.delegatorAddress)?String(e.delegatorAddress):"",validatorAddress:g(e.validatorAddress)?String(e.validatorAddress):""}),toJSON(e){let t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),t},fromPartial(e){var t,r;let n=u();return n.delegatorAddress=null!==(t=e.delegatorAddress)&&void 0!==t?t:"",n.validatorAddress=null!==(r=e.validatorAddress)&&void 0!==r?r:"",n}},t.MsgWithdrawDelegatorRewardResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=d();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>d()},t.MsgWithdrawValidatorCommission={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.validatorAddress&&t.uint32(10).string(e.validatorAddress),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=c();for(;r.pos>>3==1?i.validatorAddress=r.string():r.skipType(7&e)}return i},fromJSON:e=>({validatorAddress:g(e.validatorAddress)?String(e.validatorAddress):""}),toJSON(e){let t={};return void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),t},fromPartial(e){var t;let r=c();return r.validatorAddress=null!==(t=e.validatorAddress)&&void 0!==t?t:"",r}},t.MsgWithdrawValidatorCommissionResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=p();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>p()},t.MsgFundCommunityPool={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();for(let r of e.amount)a.Coin.encode(r,t.uint32(10).fork()).ldelim();return""!==e.depositor&&t.uint32(18).string(e.depositor),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=f();for(;r.pos>>3){case 1:i.amount.push(a.Coin.decode(r,r.uint32()));break;case 2:i.depositor=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({amount:Array.isArray(null==e?void 0:e.amount)?e.amount.map(e=>a.Coin.fromJSON(e)):[],depositor:g(e.depositor)?String(e.depositor):""}),toJSON(e){let t={};return e.amount?t.amount=e.amount.map(e=>e?a.Coin.toJSON(e):void 0):t.amount=[],void 0!==e.depositor&&(t.depositor=e.depositor),t},fromPartial(e){var t,r;let n=f();return n.amount=(null===(t=e.amount)||void 0===t?void 0:t.map(e=>a.Coin.fromPartial(e)))||[],n.depositor=null!==(r=e.depositor)&&void 0!==r?r:"",n}},t.MsgFundCommunityPoolResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=h();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>h()},o.default.util.Long!==i.default&&(o.default.util.Long=i.default,o.default.configure())},20666:function(e,t,r){"use strict";var n,i,o=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.TallyParams=t.VotingParams=t.DepositParams=t.Vote=t.TallyResult=t.Proposal=t.Deposit=t.TextProposal=t.WeightedVoteOption=t.proposalStatusToJSON=t.proposalStatusFromJSON=t.ProposalStatus=t.voteOptionToJSON=t.voteOptionFromJSON=t.VoteOption=t.protobufPackage=void 0;let a=o(r(40059)),s=o(r(81667)),l=r(90338),u=r(80054),d=r(28446),c=r(81555);function p(e){switch(e){case 0:case"VOTE_OPTION_UNSPECIFIED":return n.VOTE_OPTION_UNSPECIFIED;case 1:case"VOTE_OPTION_YES":return n.VOTE_OPTION_YES;case 2:case"VOTE_OPTION_ABSTAIN":return n.VOTE_OPTION_ABSTAIN;case 3:case"VOTE_OPTION_NO":return n.VOTE_OPTION_NO;case 4:case"VOTE_OPTION_NO_WITH_VETO":return n.VOTE_OPTION_NO_WITH_VETO;default:return n.UNRECOGNIZED}}function f(e){switch(e){case n.VOTE_OPTION_UNSPECIFIED:return"VOTE_OPTION_UNSPECIFIED";case n.VOTE_OPTION_YES:return"VOTE_OPTION_YES";case n.VOTE_OPTION_ABSTAIN:return"VOTE_OPTION_ABSTAIN";case n.VOTE_OPTION_NO:return"VOTE_OPTION_NO";case n.VOTE_OPTION_NO_WITH_VETO:return"VOTE_OPTION_NO_WITH_VETO";default:return"UNKNOWN"}}function h(e){switch(e){case 0:case"PROPOSAL_STATUS_UNSPECIFIED":return i.PROPOSAL_STATUS_UNSPECIFIED;case 1:case"PROPOSAL_STATUS_DEPOSIT_PERIOD":return i.PROPOSAL_STATUS_DEPOSIT_PERIOD;case 2:case"PROPOSAL_STATUS_VOTING_PERIOD":return i.PROPOSAL_STATUS_VOTING_PERIOD;case 3:case"PROPOSAL_STATUS_PASSED":return i.PROPOSAL_STATUS_PASSED;case 4:case"PROPOSAL_STATUS_REJECTED":return i.PROPOSAL_STATUS_REJECTED;case 5:case"PROPOSAL_STATUS_FAILED":return i.PROPOSAL_STATUS_FAILED;default:return i.UNRECOGNIZED}}function g(e){switch(e){case i.PROPOSAL_STATUS_UNSPECIFIED:return"PROPOSAL_STATUS_UNSPECIFIED";case i.PROPOSAL_STATUS_DEPOSIT_PERIOD:return"PROPOSAL_STATUS_DEPOSIT_PERIOD";case i.PROPOSAL_STATUS_VOTING_PERIOD:return"PROPOSAL_STATUS_VOTING_PERIOD";case i.PROPOSAL_STATUS_PASSED:return"PROPOSAL_STATUS_PASSED";case i.PROPOSAL_STATUS_REJECTED:return"PROPOSAL_STATUS_REJECTED";case i.PROPOSAL_STATUS_FAILED:return"PROPOSAL_STATUS_FAILED";default:return"UNKNOWN"}}function m(){return{option:0,weight:""}}function y(){return{title:"",description:""}}function v(){return{proposalId:"0",depositor:"",amount:[]}}function b(){return{proposalId:"0",content:void 0,status:0,finalTallyResult:void 0,submitTime:void 0,depositEndTime:void 0,totalDeposit:[],votingStartTime:void 0,votingEndTime:void 0}}function S(){return{yes:"",abstain:"",no:"",noWithVeto:""}}function w(){return{proposalId:"0",voter:"",option:0,options:[]}}function _(){return{minDeposit:[],maxDepositPeriod:void 0}}function k(){return{votingPeriod:void 0}}function O(){return{quorum:new Uint8Array,threshold:new Uint8Array,vetoThreshold:new Uint8Array}}t.protobufPackage="cosmos.gov.v1beta1",function(e){e[e.VOTE_OPTION_UNSPECIFIED=0]="VOTE_OPTION_UNSPECIFIED",e[e.VOTE_OPTION_YES=1]="VOTE_OPTION_YES",e[e.VOTE_OPTION_ABSTAIN=2]="VOTE_OPTION_ABSTAIN",e[e.VOTE_OPTION_NO=3]="VOTE_OPTION_NO",e[e.VOTE_OPTION_NO_WITH_VETO=4]="VOTE_OPTION_NO_WITH_VETO",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(n=t.VoteOption||(t.VoteOption={})),t.voteOptionFromJSON=p,t.voteOptionToJSON=f,function(e){e[e.PROPOSAL_STATUS_UNSPECIFIED=0]="PROPOSAL_STATUS_UNSPECIFIED",e[e.PROPOSAL_STATUS_DEPOSIT_PERIOD=1]="PROPOSAL_STATUS_DEPOSIT_PERIOD",e[e.PROPOSAL_STATUS_VOTING_PERIOD=2]="PROPOSAL_STATUS_VOTING_PERIOD",e[e.PROPOSAL_STATUS_PASSED=3]="PROPOSAL_STATUS_PASSED",e[e.PROPOSAL_STATUS_REJECTED=4]="PROPOSAL_STATUS_REJECTED",e[e.PROPOSAL_STATUS_FAILED=5]="PROPOSAL_STATUS_FAILED",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(i=t.ProposalStatus||(t.ProposalStatus={})),t.proposalStatusFromJSON=h,t.proposalStatusToJSON=g,t.WeightedVoteOption={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return 0!==e.option&&t.uint32(8).int32(e.option),""!==e.weight&&t.uint32(18).string(e.weight),t},decode(e,t){let r=e instanceof s.default.Reader?e:new s.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=m();for(;r.pos>>3){case 1:i.option=r.int32();break;case 2:i.weight=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({option:C(e.option)?p(e.option):0,weight:C(e.weight)?String(e.weight):""}),toJSON(e){let t={};return void 0!==e.option&&(t.option=f(e.option)),void 0!==e.weight&&(t.weight=e.weight),t},fromPartial(e){var t,r;let n=m();return n.option=null!==(t=e.option)&&void 0!==t?t:0,n.weight=null!==(r=e.weight)&&void 0!==r?r:"",n}},t.TextProposal={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return""!==e.title&&t.uint32(10).string(e.title),""!==e.description&&t.uint32(18).string(e.description),t},decode(e,t){let r=e instanceof s.default.Reader?e:new s.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=y();for(;r.pos>>3){case 1:i.title=r.string();break;case 2:i.description=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({title:C(e.title)?String(e.title):"",description:C(e.description)?String(e.description):""}),toJSON(e){let t={};return void 0!==e.title&&(t.title=e.title),void 0!==e.description&&(t.description=e.description),t},fromPartial(e){var t,r;let n=y();return n.title=null!==(t=e.title)&&void 0!==t?t:"",n.description=null!==(r=e.description)&&void 0!==r?r:"",n}},t.Deposit={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();for(let r of("0"!==e.proposalId&&t.uint32(8).uint64(e.proposalId),""!==e.depositor&&t.uint32(18).string(e.depositor),e.amount))u.Coin.encode(r,t.uint32(26).fork()).ldelim();return t},decode(e,t){let r=e instanceof s.default.Reader?e:new s.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=v();for(;r.pos>>3){case 1:i.proposalId=B(r.uint64());break;case 2:i.depositor=r.string();break;case 3:i.amount.push(u.Coin.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return i},fromJSON:e=>({proposalId:C(e.proposalId)?String(e.proposalId):"0",depositor:C(e.depositor)?String(e.depositor):"",amount:Array.isArray(null==e?void 0:e.amount)?e.amount.map(e=>u.Coin.fromJSON(e)):[]}),toJSON(e){let t={};return void 0!==e.proposalId&&(t.proposalId=e.proposalId),void 0!==e.depositor&&(t.depositor=e.depositor),e.amount?t.amount=e.amount.map(e=>e?u.Coin.toJSON(e):void 0):t.amount=[],t},fromPartial(e){var t,r,n;let i=v();return i.proposalId=null!==(t=e.proposalId)&&void 0!==t?t:"0",i.depositor=null!==(r=e.depositor)&&void 0!==r?r:"",i.amount=(null===(n=e.amount)||void 0===n?void 0:n.map(e=>u.Coin.fromPartial(e)))||[],i}},t.Proposal={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();for(let n of("0"!==e.proposalId&&r.uint32(8).uint64(e.proposalId),void 0!==e.content&&d.Any.encode(e.content,r.uint32(18).fork()).ldelim(),0!==e.status&&r.uint32(24).int32(e.status),void 0!==e.finalTallyResult&&t.TallyResult.encode(e.finalTallyResult,r.uint32(34).fork()).ldelim(),void 0!==e.submitTime&&l.Timestamp.encode(T(e.submitTime),r.uint32(42).fork()).ldelim(),void 0!==e.depositEndTime&&l.Timestamp.encode(T(e.depositEndTime),r.uint32(50).fork()).ldelim(),e.totalDeposit))u.Coin.encode(n,r.uint32(58).fork()).ldelim();return void 0!==e.votingStartTime&&l.Timestamp.encode(T(e.votingStartTime),r.uint32(66).fork()).ldelim(),void 0!==e.votingEndTime&&l.Timestamp.encode(T(e.votingEndTime),r.uint32(74).fork()).ldelim(),r},decode(e,r){let n=e instanceof s.default.Reader?e:new s.default.Reader(e),i=void 0===r?n.len:n.pos+r,o=b();for(;n.pos>>3){case 1:o.proposalId=B(n.uint64());break;case 2:o.content=d.Any.decode(n,n.uint32());break;case 3:o.status=n.int32();break;case 4:o.finalTallyResult=t.TallyResult.decode(n,n.uint32());break;case 5:o.submitTime=N(l.Timestamp.decode(n,n.uint32()));break;case 6:o.depositEndTime=N(l.Timestamp.decode(n,n.uint32()));break;case 7:o.totalDeposit.push(u.Coin.decode(n,n.uint32()));break;case 8:o.votingStartTime=N(l.Timestamp.decode(n,n.uint32()));break;case 9:o.votingEndTime=N(l.Timestamp.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return o},fromJSON:e=>({proposalId:C(e.proposalId)?String(e.proposalId):"0",content:C(e.content)?d.Any.fromJSON(e.content):void 0,status:C(e.status)?h(e.status):0,finalTallyResult:C(e.finalTallyResult)?t.TallyResult.fromJSON(e.finalTallyResult):void 0,submitTime:C(e.submitTime)?x(e.submitTime):void 0,depositEndTime:C(e.depositEndTime)?x(e.depositEndTime):void 0,totalDeposit:Array.isArray(null==e?void 0:e.totalDeposit)?e.totalDeposit.map(e=>u.Coin.fromJSON(e)):[],votingStartTime:C(e.votingStartTime)?x(e.votingStartTime):void 0,votingEndTime:C(e.votingEndTime)?x(e.votingEndTime):void 0}),toJSON(e){let r={};return void 0!==e.proposalId&&(r.proposalId=e.proposalId),void 0!==e.content&&(r.content=e.content?d.Any.toJSON(e.content):void 0),void 0!==e.status&&(r.status=g(e.status)),void 0!==e.finalTallyResult&&(r.finalTallyResult=e.finalTallyResult?t.TallyResult.toJSON(e.finalTallyResult):void 0),void 0!==e.submitTime&&(r.submitTime=e.submitTime.toISOString()),void 0!==e.depositEndTime&&(r.depositEndTime=e.depositEndTime.toISOString()),e.totalDeposit?r.totalDeposit=e.totalDeposit.map(e=>e?u.Coin.toJSON(e):void 0):r.totalDeposit=[],void 0!==e.votingStartTime&&(r.votingStartTime=e.votingStartTime.toISOString()),void 0!==e.votingEndTime&&(r.votingEndTime=e.votingEndTime.toISOString()),r},fromPartial(e){var r,n,i,o,a,s,l;let c=b();return c.proposalId=null!==(r=e.proposalId)&&void 0!==r?r:"0",c.content=void 0!==e.content&&null!==e.content?d.Any.fromPartial(e.content):void 0,c.status=null!==(n=e.status)&&void 0!==n?n:0,c.finalTallyResult=void 0!==e.finalTallyResult&&null!==e.finalTallyResult?t.TallyResult.fromPartial(e.finalTallyResult):void 0,c.submitTime=null!==(i=e.submitTime)&&void 0!==i?i:void 0,c.depositEndTime=null!==(o=e.depositEndTime)&&void 0!==o?o:void 0,c.totalDeposit=(null===(a=e.totalDeposit)||void 0===a?void 0:a.map(e=>u.Coin.fromPartial(e)))||[],c.votingStartTime=null!==(s=e.votingStartTime)&&void 0!==s?s:void 0,c.votingEndTime=null!==(l=e.votingEndTime)&&void 0!==l?l:void 0,c}},t.TallyResult={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return""!==e.yes&&t.uint32(10).string(e.yes),""!==e.abstain&&t.uint32(18).string(e.abstain),""!==e.no&&t.uint32(26).string(e.no),""!==e.noWithVeto&&t.uint32(34).string(e.noWithVeto),t},decode(e,t){let r=e instanceof s.default.Reader?e:new s.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=S();for(;r.pos>>3){case 1:i.yes=r.string();break;case 2:i.abstain=r.string();break;case 3:i.no=r.string();break;case 4:i.noWithVeto=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({yes:C(e.yes)?String(e.yes):"",abstain:C(e.abstain)?String(e.abstain):"",no:C(e.no)?String(e.no):"",noWithVeto:C(e.noWithVeto)?String(e.noWithVeto):""}),toJSON(e){let t={};return void 0!==e.yes&&(t.yes=e.yes),void 0!==e.abstain&&(t.abstain=e.abstain),void 0!==e.no&&(t.no=e.no),void 0!==e.noWithVeto&&(t.noWithVeto=e.noWithVeto),t},fromPartial(e){var t,r,n,i;let o=S();return o.yes=null!==(t=e.yes)&&void 0!==t?t:"",o.abstain=null!==(r=e.abstain)&&void 0!==r?r:"",o.no=null!==(n=e.no)&&void 0!==n?n:"",o.noWithVeto=null!==(i=e.noWithVeto)&&void 0!==i?i:"",o}},t.Vote={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();for(let n of("0"!==e.proposalId&&r.uint32(8).uint64(e.proposalId),""!==e.voter&&r.uint32(18).string(e.voter),0!==e.option&&r.uint32(24).int32(e.option),e.options))t.WeightedVoteOption.encode(n,r.uint32(34).fork()).ldelim();return r},decode(e,r){let n=e instanceof s.default.Reader?e:new s.default.Reader(e),i=void 0===r?n.len:n.pos+r,o=w();for(;n.pos>>3){case 1:o.proposalId=B(n.uint64());break;case 2:o.voter=n.string();break;case 3:o.option=n.int32();break;case 4:o.options.push(t.WeightedVoteOption.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return o},fromJSON:e=>({proposalId:C(e.proposalId)?String(e.proposalId):"0",voter:C(e.voter)?String(e.voter):"",option:C(e.option)?p(e.option):0,options:Array.isArray(null==e?void 0:e.options)?e.options.map(e=>t.WeightedVoteOption.fromJSON(e)):[]}),toJSON(e){let r={};return void 0!==e.proposalId&&(r.proposalId=e.proposalId),void 0!==e.voter&&(r.voter=e.voter),void 0!==e.option&&(r.option=f(e.option)),e.options?r.options=e.options.map(e=>e?t.WeightedVoteOption.toJSON(e):void 0):r.options=[],r},fromPartial(e){var r,n,i,o;let a=w();return a.proposalId=null!==(r=e.proposalId)&&void 0!==r?r:"0",a.voter=null!==(n=e.voter)&&void 0!==n?n:"",a.option=null!==(i=e.option)&&void 0!==i?i:0,a.options=(null===(o=e.options)||void 0===o?void 0:o.map(e=>t.WeightedVoteOption.fromPartial(e)))||[],a}},t.DepositParams={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();for(let r of e.minDeposit)u.Coin.encode(r,t.uint32(10).fork()).ldelim();return void 0!==e.maxDepositPeriod&&c.Duration.encode(e.maxDepositPeriod,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof s.default.Reader?e:new s.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=_();for(;r.pos>>3){case 1:i.minDeposit.push(u.Coin.decode(r,r.uint32()));break;case 2:i.maxDepositPeriod=c.Duration.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON:e=>({minDeposit:Array.isArray(null==e?void 0:e.minDeposit)?e.minDeposit.map(e=>u.Coin.fromJSON(e)):[],maxDepositPeriod:C(e.maxDepositPeriod)?c.Duration.fromJSON(e.maxDepositPeriod):void 0}),toJSON(e){let t={};return e.minDeposit?t.minDeposit=e.minDeposit.map(e=>e?u.Coin.toJSON(e):void 0):t.minDeposit=[],void 0!==e.maxDepositPeriod&&(t.maxDepositPeriod=e.maxDepositPeriod?c.Duration.toJSON(e.maxDepositPeriod):void 0),t},fromPartial(e){var t;let r=_();return r.minDeposit=(null===(t=e.minDeposit)||void 0===t?void 0:t.map(e=>u.Coin.fromPartial(e)))||[],r.maxDepositPeriod=void 0!==e.maxDepositPeriod&&null!==e.maxDepositPeriod?c.Duration.fromPartial(e.maxDepositPeriod):void 0,r}},t.VotingParams={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return void 0!==e.votingPeriod&&c.Duration.encode(e.votingPeriod,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof s.default.Reader?e:new s.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=k();for(;r.pos>>3==1?i.votingPeriod=c.Duration.decode(r,r.uint32()):r.skipType(7&e)}return i},fromJSON:e=>({votingPeriod:C(e.votingPeriod)?c.Duration.fromJSON(e.votingPeriod):void 0}),toJSON(e){let t={};return void 0!==e.votingPeriod&&(t.votingPeriod=e.votingPeriod?c.Duration.toJSON(e.votingPeriod):void 0),t},fromPartial(e){let t=k();return t.votingPeriod=void 0!==e.votingPeriod&&null!==e.votingPeriod?c.Duration.fromPartial(e.votingPeriod):void 0,t}},t.TallyParams={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return 0!==e.quorum.length&&t.uint32(10).bytes(e.quorum),0!==e.threshold.length&&t.uint32(18).bytes(e.threshold),0!==e.vetoThreshold.length&&t.uint32(26).bytes(e.vetoThreshold),t},decode(e,t){let r=e instanceof s.default.Reader?e:new s.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=O();for(;r.pos>>3){case 1:i.quorum=r.bytes();break;case 2:i.threshold=r.bytes();break;case 3:i.vetoThreshold=r.bytes();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({quorum:C(e.quorum)?I(e.quorum):new Uint8Array,threshold:C(e.threshold)?I(e.threshold):new Uint8Array,vetoThreshold:C(e.vetoThreshold)?I(e.vetoThreshold):new Uint8Array}),toJSON(e){let t={};return void 0!==e.quorum&&(t.quorum=E(void 0!==e.quorum?e.quorum:new Uint8Array)),void 0!==e.threshold&&(t.threshold=E(void 0!==e.threshold?e.threshold:new Uint8Array)),void 0!==e.vetoThreshold&&(t.vetoThreshold=E(void 0!==e.vetoThreshold?e.vetoThreshold:new Uint8Array)),t},fromPartial(e){var t,r,n;let i=O();return i.quorum=null!==(t=e.quorum)&&void 0!==t?t:new Uint8Array,i.threshold=null!==(r=e.threshold)&&void 0!==r?r:new Uint8Array,i.vetoThreshold=null!==(n=e.vetoThreshold)&&void 0!==n?n:new Uint8Array,i}};var P=void 0!==P?P:"undefined"!=typeof self?self:window;let A=P.atob||(e=>P.Buffer.from(e,"base64").toString("binary"));function I(e){let t=A(e),r=new Uint8Array(t.length);for(let e=0;eP.Buffer.from(e,"binary").toString("base64"));function E(e){let t=[];for(let r of e)t.push(String.fromCharCode(r));return R(t.join(""))}function T(e){return{seconds:Math.trunc(e.getTime()/1e3).toString(),nanos:e.getTime()%1e3*1e6}}function N(e){let t=1e3*Number(e.seconds);return new Date(t+=e.nanos/1e6)}function x(e){return e instanceof Date?e:"string"==typeof e?new Date(e):N(l.Timestamp.fromJSON(e))}function B(e){return e.toString()}function C(e){return null!=e}s.default.util.Long!==a.default&&(s.default.util.Long=a.default,s.default.configure())},43846:function(e,t,r){"use strict";var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MsgDepositResponse=t.MsgDeposit=t.MsgVoteWeightedResponse=t.MsgVoteWeighted=t.MsgVoteResponse=t.MsgVote=t.MsgSubmitProposalResponse=t.MsgSubmitProposal=t.protobufPackage=void 0;let i=n(r(40059)),o=n(r(81667)),a=r(20666),s=r(28446),l=r(80054);function u(){return{content:void 0,initialDeposit:[],proposer:""}}function d(){return{proposalId:"0"}}function c(){return{proposalId:"0",voter:"",option:0}}function p(){return{}}function f(){return{proposalId:"0",voter:"",options:[]}}function h(){return{}}function g(){return{proposalId:"0",depositor:"",amount:[]}}function m(){return{}}function y(e){return e.toString()}function v(e){return null!=e}t.protobufPackage="cosmos.gov.v1beta1",t.MsgSubmitProposal={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();for(let r of(void 0!==e.content&&s.Any.encode(e.content,t.uint32(10).fork()).ldelim(),e.initialDeposit))l.Coin.encode(r,t.uint32(18).fork()).ldelim();return""!==e.proposer&&t.uint32(26).string(e.proposer),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=u();for(;r.pos>>3){case 1:i.content=s.Any.decode(r,r.uint32());break;case 2:i.initialDeposit.push(l.Coin.decode(r,r.uint32()));break;case 3:i.proposer=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({content:v(e.content)?s.Any.fromJSON(e.content):void 0,initialDeposit:Array.isArray(null==e?void 0:e.initialDeposit)?e.initialDeposit.map(e=>l.Coin.fromJSON(e)):[],proposer:v(e.proposer)?String(e.proposer):""}),toJSON(e){let t={};return void 0!==e.content&&(t.content=e.content?s.Any.toJSON(e.content):void 0),e.initialDeposit?t.initialDeposit=e.initialDeposit.map(e=>e?l.Coin.toJSON(e):void 0):t.initialDeposit=[],void 0!==e.proposer&&(t.proposer=e.proposer),t},fromPartial(e){var t,r;let n=u();return n.content=void 0!==e.content&&null!==e.content?s.Any.fromPartial(e.content):void 0,n.initialDeposit=(null===(t=e.initialDeposit)||void 0===t?void 0:t.map(e=>l.Coin.fromPartial(e)))||[],n.proposer=null!==(r=e.proposer)&&void 0!==r?r:"",n}},t.MsgSubmitProposalResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return"0"!==e.proposalId&&t.uint32(8).uint64(e.proposalId),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=d();for(;r.pos>>3==1?i.proposalId=y(r.uint64()):r.skipType(7&e)}return i},fromJSON:e=>({proposalId:v(e.proposalId)?String(e.proposalId):"0"}),toJSON(e){let t={};return void 0!==e.proposalId&&(t.proposalId=e.proposalId),t},fromPartial(e){var t;let r=d();return r.proposalId=null!==(t=e.proposalId)&&void 0!==t?t:"0",r}},t.MsgVote={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return"0"!==e.proposalId&&t.uint32(8).uint64(e.proposalId),""!==e.voter&&t.uint32(18).string(e.voter),0!==e.option&&t.uint32(24).int32(e.option),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=c();for(;r.pos>>3){case 1:i.proposalId=y(r.uint64());break;case 2:i.voter=r.string();break;case 3:i.option=r.int32();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({proposalId:v(e.proposalId)?String(e.proposalId):"0",voter:v(e.voter)?String(e.voter):"",option:v(e.option)?(0,a.voteOptionFromJSON)(e.option):0}),toJSON(e){let t={};return void 0!==e.proposalId&&(t.proposalId=e.proposalId),void 0!==e.voter&&(t.voter=e.voter),void 0!==e.option&&(t.option=(0,a.voteOptionToJSON)(e.option)),t},fromPartial(e){var t,r,n;let i=c();return i.proposalId=null!==(t=e.proposalId)&&void 0!==t?t:"0",i.voter=null!==(r=e.voter)&&void 0!==r?r:"",i.option=null!==(n=e.option)&&void 0!==n?n:0,i}},t.MsgVoteResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=p();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>p()},t.MsgVoteWeighted={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();for(let r of("0"!==e.proposalId&&t.uint32(8).uint64(e.proposalId),""!==e.voter&&t.uint32(18).string(e.voter),e.options))a.WeightedVoteOption.encode(r,t.uint32(26).fork()).ldelim();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=f();for(;r.pos>>3){case 1:i.proposalId=y(r.uint64());break;case 2:i.voter=r.string();break;case 3:i.options.push(a.WeightedVoteOption.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return i},fromJSON:e=>({proposalId:v(e.proposalId)?String(e.proposalId):"0",voter:v(e.voter)?String(e.voter):"",options:Array.isArray(null==e?void 0:e.options)?e.options.map(e=>a.WeightedVoteOption.fromJSON(e)):[]}),toJSON(e){let t={};return void 0!==e.proposalId&&(t.proposalId=e.proposalId),void 0!==e.voter&&(t.voter=e.voter),e.options?t.options=e.options.map(e=>e?a.WeightedVoteOption.toJSON(e):void 0):t.options=[],t},fromPartial(e){var t,r,n;let i=f();return i.proposalId=null!==(t=e.proposalId)&&void 0!==t?t:"0",i.voter=null!==(r=e.voter)&&void 0!==r?r:"",i.options=(null===(n=e.options)||void 0===n?void 0:n.map(e=>a.WeightedVoteOption.fromPartial(e)))||[],i}},t.MsgVoteWeightedResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=h();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>h()},t.MsgDeposit={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();for(let r of("0"!==e.proposalId&&t.uint32(8).uint64(e.proposalId),""!==e.depositor&&t.uint32(18).string(e.depositor),e.amount))l.Coin.encode(r,t.uint32(26).fork()).ldelim();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=g();for(;r.pos>>3){case 1:i.proposalId=y(r.uint64());break;case 2:i.depositor=r.string();break;case 3:i.amount.push(l.Coin.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return i},fromJSON:e=>({proposalId:v(e.proposalId)?String(e.proposalId):"0",depositor:v(e.depositor)?String(e.depositor):"",amount:Array.isArray(null==e?void 0:e.amount)?e.amount.map(e=>l.Coin.fromJSON(e)):[]}),toJSON(e){let t={};return void 0!==e.proposalId&&(t.proposalId=e.proposalId),void 0!==e.depositor&&(t.depositor=e.depositor),e.amount?t.amount=e.amount.map(e=>e?l.Coin.toJSON(e):void 0):t.amount=[],t},fromPartial(e){var t,r,n;let i=g();return i.proposalId=null!==(t=e.proposalId)&&void 0!==t?t:"0",i.depositor=null!==(r=e.depositor)&&void 0!==r?r:"",i.amount=(null===(n=e.amount)||void 0===n?void 0:n.map(e=>l.Coin.fromPartial(e)))||[],i}},t.MsgDepositResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=m();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>m()},o.default.util.Long!==i.default&&(o.default.util.Long=i.default,o.default.configure())},86398:function(e,t,r){"use strict";var n,i=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.StakeAuthorization_Validators=t.StakeAuthorization=t.authorizationTypeToJSON=t.authorizationTypeFromJSON=t.AuthorizationType=t.protobufPackage=void 0;let o=i(r(40059)),a=i(r(81667)),s=r(80054);function l(e){switch(e){case 0:case"AUTHORIZATION_TYPE_UNSPECIFIED":return n.AUTHORIZATION_TYPE_UNSPECIFIED;case 1:case"AUTHORIZATION_TYPE_DELEGATE":return n.AUTHORIZATION_TYPE_DELEGATE;case 2:case"AUTHORIZATION_TYPE_UNDELEGATE":return n.AUTHORIZATION_TYPE_UNDELEGATE;case 3:case"AUTHORIZATION_TYPE_REDELEGATE":return n.AUTHORIZATION_TYPE_REDELEGATE;default:return n.UNRECOGNIZED}}function u(e){switch(e){case n.AUTHORIZATION_TYPE_UNSPECIFIED:return"AUTHORIZATION_TYPE_UNSPECIFIED";case n.AUTHORIZATION_TYPE_DELEGATE:return"AUTHORIZATION_TYPE_DELEGATE";case n.AUTHORIZATION_TYPE_UNDELEGATE:return"AUTHORIZATION_TYPE_UNDELEGATE";case n.AUTHORIZATION_TYPE_REDELEGATE:return"AUTHORIZATION_TYPE_REDELEGATE";default:return"UNKNOWN"}}function d(){return{maxTokens:void 0,allowList:void 0,denyList:void 0,authorizationType:0}}function c(){return{address:[]}}function p(e){return null!=e}t.protobufPackage="cosmos.staking.v1beta1",function(e){e[e.AUTHORIZATION_TYPE_UNSPECIFIED=0]="AUTHORIZATION_TYPE_UNSPECIFIED",e[e.AUTHORIZATION_TYPE_DELEGATE=1]="AUTHORIZATION_TYPE_DELEGATE",e[e.AUTHORIZATION_TYPE_UNDELEGATE=2]="AUTHORIZATION_TYPE_UNDELEGATE",e[e.AUTHORIZATION_TYPE_REDELEGATE=3]="AUTHORIZATION_TYPE_REDELEGATE",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(n=t.AuthorizationType||(t.AuthorizationType={})),t.authorizationTypeFromJSON=l,t.authorizationTypeToJSON=u,t.StakeAuthorization={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();return void 0!==e.maxTokens&&s.Coin.encode(e.maxTokens,r.uint32(10).fork()).ldelim(),void 0!==e.allowList&&t.StakeAuthorization_Validators.encode(e.allowList,r.uint32(18).fork()).ldelim(),void 0!==e.denyList&&t.StakeAuthorization_Validators.encode(e.denyList,r.uint32(26).fork()).ldelim(),0!==e.authorizationType&&r.uint32(32).int32(e.authorizationType),r},decode(e,r){let n=e instanceof a.default.Reader?e:new a.default.Reader(e),i=void 0===r?n.len:n.pos+r,o=d();for(;n.pos>>3){case 1:o.maxTokens=s.Coin.decode(n,n.uint32());break;case 2:o.allowList=t.StakeAuthorization_Validators.decode(n,n.uint32());break;case 3:o.denyList=t.StakeAuthorization_Validators.decode(n,n.uint32());break;case 4:o.authorizationType=n.int32();break;default:n.skipType(7&e)}}return o},fromJSON:e=>({maxTokens:p(e.maxTokens)?s.Coin.fromJSON(e.maxTokens):void 0,allowList:p(e.allowList)?t.StakeAuthorization_Validators.fromJSON(e.allowList):void 0,denyList:p(e.denyList)?t.StakeAuthorization_Validators.fromJSON(e.denyList):void 0,authorizationType:p(e.authorizationType)?l(e.authorizationType):0}),toJSON(e){let r={};return void 0!==e.maxTokens&&(r.maxTokens=e.maxTokens?s.Coin.toJSON(e.maxTokens):void 0),void 0!==e.allowList&&(r.allowList=e.allowList?t.StakeAuthorization_Validators.toJSON(e.allowList):void 0),void 0!==e.denyList&&(r.denyList=e.denyList?t.StakeAuthorization_Validators.toJSON(e.denyList):void 0),void 0!==e.authorizationType&&(r.authorizationType=u(e.authorizationType)),r},fromPartial(e){var r;let n=d();return n.maxTokens=void 0!==e.maxTokens&&null!==e.maxTokens?s.Coin.fromPartial(e.maxTokens):void 0,n.allowList=void 0!==e.allowList&&null!==e.allowList?t.StakeAuthorization_Validators.fromPartial(e.allowList):void 0,n.denyList=void 0!==e.denyList&&null!==e.denyList?t.StakeAuthorization_Validators.fromPartial(e.denyList):void 0,n.authorizationType=null!==(r=e.authorizationType)&&void 0!==r?r:0,n}},t.StakeAuthorization_Validators={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();for(let r of e.address)t.uint32(10).string(r);return t},decode(e,t){let r=e instanceof a.default.Reader?e:new a.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=c();for(;r.pos>>3==1?i.address.push(r.string()):r.skipType(7&e)}return i},fromJSON:e=>({address:Array.isArray(null==e?void 0:e.address)?e.address.map(e=>String(e)):[]}),toJSON(e){let t={};return e.address?t.address=e.address.map(e=>e):t.address=[],t},fromPartial(e){var t;let r=c();return r.address=(null===(t=e.address)||void 0===t?void 0:t.map(e=>e))||[],r}},a.default.util.Long!==o.default&&(a.default.util.Long=o.default,a.default.configure())},60159:function(e,t,r){"use strict";var n,i=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Pool=t.RedelegationResponse=t.RedelegationEntryResponse=t.DelegationResponse=t.Params=t.Redelegation=t.RedelegationEntry=t.UnbondingDelegationEntry=t.UnbondingDelegation=t.Delegation=t.DVVTriplets=t.DVVTriplet=t.DVPairs=t.DVPair=t.ValAddresses=t.Validator=t.Description=t.Commission=t.CommissionRates=t.HistoricalInfo=t.bondStatusToJSON=t.bondStatusFromJSON=t.BondStatus=t.protobufPackage=void 0;let o=i(r(40059)),a=i(r(81667)),s=r(90338),l=r(35444),u=r(28446),d=r(81555),c=r(80054);function p(e){switch(e){case 0:case"BOND_STATUS_UNSPECIFIED":return n.BOND_STATUS_UNSPECIFIED;case 1:case"BOND_STATUS_UNBONDED":return n.BOND_STATUS_UNBONDED;case 2:case"BOND_STATUS_UNBONDING":return n.BOND_STATUS_UNBONDING;case 3:case"BOND_STATUS_BONDED":return n.BOND_STATUS_BONDED;default:return n.UNRECOGNIZED}}function f(e){switch(e){case n.BOND_STATUS_UNSPECIFIED:return"BOND_STATUS_UNSPECIFIED";case n.BOND_STATUS_UNBONDED:return"BOND_STATUS_UNBONDED";case n.BOND_STATUS_UNBONDING:return"BOND_STATUS_UNBONDING";case n.BOND_STATUS_BONDED:return"BOND_STATUS_BONDED";default:return"UNKNOWN"}}function h(){return{header:void 0,valset:[]}}function g(){return{rate:"",maxRate:"",maxChangeRate:""}}function m(){return{commissionRates:void 0,updateTime:void 0}}function y(){return{moniker:"",identity:"",website:"",securityContact:"",details:""}}function v(){return{operatorAddress:"",consensusPubkey:void 0,jailed:!1,status:0,tokens:"",delegatorShares:"",description:void 0,unbondingHeight:"0",unbondingTime:void 0,commission:void 0,minSelfDelegation:""}}function b(){return{addresses:[]}}function S(){return{delegatorAddress:"",validatorAddress:""}}function w(){return{pairs:[]}}function _(){return{delegatorAddress:"",validatorSrcAddress:"",validatorDstAddress:""}}function k(){return{triplets:[]}}function O(){return{delegatorAddress:"",validatorAddress:"",shares:""}}function P(){return{delegatorAddress:"",validatorAddress:"",entries:[]}}function A(){return{creationHeight:"0",completionTime:void 0,initialBalance:"",balance:""}}function I(){return{creationHeight:"0",completionTime:void 0,initialBalance:"",sharesDst:""}}function R(){return{delegatorAddress:"",validatorSrcAddress:"",validatorDstAddress:"",entries:[]}}function E(){return{unbondingTime:void 0,maxValidators:0,maxEntries:0,historicalEntries:0,bondDenom:""}}function T(){return{delegation:void 0,balance:void 0}}function N(){return{redelegationEntry:void 0,balance:""}}function x(){return{redelegation:void 0,entries:[]}}function B(){return{notBondedTokens:"",bondedTokens:""}}function C(e){return{seconds:Math.trunc(e.getTime()/1e3).toString(),nanos:e.getTime()%1e3*1e6}}function M(e){let t=1e3*Number(e.seconds);return new Date(t+=e.nanos/1e6)}function D(e){return e instanceof Date?e:"string"==typeof e?new Date(e):M(s.Timestamp.fromJSON(e))}function U(e){return e.toString()}function J(e){return null!=e}t.protobufPackage="cosmos.staking.v1beta1",function(e){e[e.BOND_STATUS_UNSPECIFIED=0]="BOND_STATUS_UNSPECIFIED",e[e.BOND_STATUS_UNBONDED=1]="BOND_STATUS_UNBONDED",e[e.BOND_STATUS_UNBONDING=2]="BOND_STATUS_UNBONDING",e[e.BOND_STATUS_BONDED=3]="BOND_STATUS_BONDED",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(n=t.BondStatus||(t.BondStatus={})),t.bondStatusFromJSON=p,t.bondStatusToJSON=f,t.HistoricalInfo={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();for(let n of(void 0!==e.header&&l.Header.encode(e.header,r.uint32(10).fork()).ldelim(),e.valset))t.Validator.encode(n,r.uint32(18).fork()).ldelim();return r},decode(e,r){let n=e instanceof a.default.Reader?e:new a.default.Reader(e),i=void 0===r?n.len:n.pos+r,o=h();for(;n.pos>>3){case 1:o.header=l.Header.decode(n,n.uint32());break;case 2:o.valset.push(t.Validator.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return o},fromJSON:e=>({header:J(e.header)?l.Header.fromJSON(e.header):void 0,valset:Array.isArray(null==e?void 0:e.valset)?e.valset.map(e=>t.Validator.fromJSON(e)):[]}),toJSON(e){let r={};return void 0!==e.header&&(r.header=e.header?l.Header.toJSON(e.header):void 0),e.valset?r.valset=e.valset.map(e=>e?t.Validator.toJSON(e):void 0):r.valset=[],r},fromPartial(e){var r;let n=h();return n.header=void 0!==e.header&&null!==e.header?l.Header.fromPartial(e.header):void 0,n.valset=(null===(r=e.valset)||void 0===r?void 0:r.map(e=>t.Validator.fromPartial(e)))||[],n}},t.CommissionRates={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();return""!==e.rate&&t.uint32(10).string(e.rate),""!==e.maxRate&&t.uint32(18).string(e.maxRate),""!==e.maxChangeRate&&t.uint32(26).string(e.maxChangeRate),t},decode(e,t){let r=e instanceof a.default.Reader?e:new a.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=g();for(;r.pos>>3){case 1:i.rate=r.string();break;case 2:i.maxRate=r.string();break;case 3:i.maxChangeRate=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({rate:J(e.rate)?String(e.rate):"",maxRate:J(e.maxRate)?String(e.maxRate):"",maxChangeRate:J(e.maxChangeRate)?String(e.maxChangeRate):""}),toJSON(e){let t={};return void 0!==e.rate&&(t.rate=e.rate),void 0!==e.maxRate&&(t.maxRate=e.maxRate),void 0!==e.maxChangeRate&&(t.maxChangeRate=e.maxChangeRate),t},fromPartial(e){var t,r,n;let i=g();return i.rate=null!==(t=e.rate)&&void 0!==t?t:"",i.maxRate=null!==(r=e.maxRate)&&void 0!==r?r:"",i.maxChangeRate=null!==(n=e.maxChangeRate)&&void 0!==n?n:"",i}},t.Commission={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();return void 0!==e.commissionRates&&t.CommissionRates.encode(e.commissionRates,r.uint32(10).fork()).ldelim(),void 0!==e.updateTime&&s.Timestamp.encode(C(e.updateTime),r.uint32(18).fork()).ldelim(),r},decode(e,r){let n=e instanceof a.default.Reader?e:new a.default.Reader(e),i=void 0===r?n.len:n.pos+r,o=m();for(;n.pos>>3){case 1:o.commissionRates=t.CommissionRates.decode(n,n.uint32());break;case 2:o.updateTime=M(s.Timestamp.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return o},fromJSON:e=>({commissionRates:J(e.commissionRates)?t.CommissionRates.fromJSON(e.commissionRates):void 0,updateTime:J(e.updateTime)?D(e.updateTime):void 0}),toJSON(e){let r={};return void 0!==e.commissionRates&&(r.commissionRates=e.commissionRates?t.CommissionRates.toJSON(e.commissionRates):void 0),void 0!==e.updateTime&&(r.updateTime=e.updateTime.toISOString()),r},fromPartial(e){var r;let n=m();return n.commissionRates=void 0!==e.commissionRates&&null!==e.commissionRates?t.CommissionRates.fromPartial(e.commissionRates):void 0,n.updateTime=null!==(r=e.updateTime)&&void 0!==r?r:void 0,n}},t.Description={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();return""!==e.moniker&&t.uint32(10).string(e.moniker),""!==e.identity&&t.uint32(18).string(e.identity),""!==e.website&&t.uint32(26).string(e.website),""!==e.securityContact&&t.uint32(34).string(e.securityContact),""!==e.details&&t.uint32(42).string(e.details),t},decode(e,t){let r=e instanceof a.default.Reader?e:new a.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=y();for(;r.pos>>3){case 1:i.moniker=r.string();break;case 2:i.identity=r.string();break;case 3:i.website=r.string();break;case 4:i.securityContact=r.string();break;case 5:i.details=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({moniker:J(e.moniker)?String(e.moniker):"",identity:J(e.identity)?String(e.identity):"",website:J(e.website)?String(e.website):"",securityContact:J(e.securityContact)?String(e.securityContact):"",details:J(e.details)?String(e.details):""}),toJSON(e){let t={};return void 0!==e.moniker&&(t.moniker=e.moniker),void 0!==e.identity&&(t.identity=e.identity),void 0!==e.website&&(t.website=e.website),void 0!==e.securityContact&&(t.securityContact=e.securityContact),void 0!==e.details&&(t.details=e.details),t},fromPartial(e){var t,r,n,i,o;let a=y();return a.moniker=null!==(t=e.moniker)&&void 0!==t?t:"",a.identity=null!==(r=e.identity)&&void 0!==r?r:"",a.website=null!==(n=e.website)&&void 0!==n?n:"",a.securityContact=null!==(i=e.securityContact)&&void 0!==i?i:"",a.details=null!==(o=e.details)&&void 0!==o?o:"",a}},t.Validator={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();return""!==e.operatorAddress&&r.uint32(10).string(e.operatorAddress),void 0!==e.consensusPubkey&&u.Any.encode(e.consensusPubkey,r.uint32(18).fork()).ldelim(),!0===e.jailed&&r.uint32(24).bool(e.jailed),0!==e.status&&r.uint32(32).int32(e.status),""!==e.tokens&&r.uint32(42).string(e.tokens),""!==e.delegatorShares&&r.uint32(50).string(e.delegatorShares),void 0!==e.description&&t.Description.encode(e.description,r.uint32(58).fork()).ldelim(),"0"!==e.unbondingHeight&&r.uint32(64).int64(e.unbondingHeight),void 0!==e.unbondingTime&&s.Timestamp.encode(C(e.unbondingTime),r.uint32(74).fork()).ldelim(),void 0!==e.commission&&t.Commission.encode(e.commission,r.uint32(82).fork()).ldelim(),""!==e.minSelfDelegation&&r.uint32(90).string(e.minSelfDelegation),r},decode(e,r){let n=e instanceof a.default.Reader?e:new a.default.Reader(e),i=void 0===r?n.len:n.pos+r,o=v();for(;n.pos>>3){case 1:o.operatorAddress=n.string();break;case 2:o.consensusPubkey=u.Any.decode(n,n.uint32());break;case 3:o.jailed=n.bool();break;case 4:o.status=n.int32();break;case 5:o.tokens=n.string();break;case 6:o.delegatorShares=n.string();break;case 7:o.description=t.Description.decode(n,n.uint32());break;case 8:o.unbondingHeight=U(n.int64());break;case 9:o.unbondingTime=M(s.Timestamp.decode(n,n.uint32()));break;case 10:o.commission=t.Commission.decode(n,n.uint32());break;case 11:o.minSelfDelegation=n.string();break;default:n.skipType(7&e)}}return o},fromJSON:e=>({operatorAddress:J(e.operatorAddress)?String(e.operatorAddress):"",consensusPubkey:J(e.consensusPubkey)?u.Any.fromJSON(e.consensusPubkey):void 0,jailed:!!J(e.jailed)&&!!e.jailed,status:J(e.status)?p(e.status):0,tokens:J(e.tokens)?String(e.tokens):"",delegatorShares:J(e.delegatorShares)?String(e.delegatorShares):"",description:J(e.description)?t.Description.fromJSON(e.description):void 0,unbondingHeight:J(e.unbondingHeight)?String(e.unbondingHeight):"0",unbondingTime:J(e.unbondingTime)?D(e.unbondingTime):void 0,commission:J(e.commission)?t.Commission.fromJSON(e.commission):void 0,minSelfDelegation:J(e.minSelfDelegation)?String(e.minSelfDelegation):""}),toJSON(e){let r={};return void 0!==e.operatorAddress&&(r.operatorAddress=e.operatorAddress),void 0!==e.consensusPubkey&&(r.consensusPubkey=e.consensusPubkey?u.Any.toJSON(e.consensusPubkey):void 0),void 0!==e.jailed&&(r.jailed=e.jailed),void 0!==e.status&&(r.status=f(e.status)),void 0!==e.tokens&&(r.tokens=e.tokens),void 0!==e.delegatorShares&&(r.delegatorShares=e.delegatorShares),void 0!==e.description&&(r.description=e.description?t.Description.toJSON(e.description):void 0),void 0!==e.unbondingHeight&&(r.unbondingHeight=e.unbondingHeight),void 0!==e.unbondingTime&&(r.unbondingTime=e.unbondingTime.toISOString()),void 0!==e.commission&&(r.commission=e.commission?t.Commission.toJSON(e.commission):void 0),void 0!==e.minSelfDelegation&&(r.minSelfDelegation=e.minSelfDelegation),r},fromPartial(e){var r,n,i,o,a,s,l,d;let c=v();return c.operatorAddress=null!==(r=e.operatorAddress)&&void 0!==r?r:"",c.consensusPubkey=void 0!==e.consensusPubkey&&null!==e.consensusPubkey?u.Any.fromPartial(e.consensusPubkey):void 0,c.jailed=null!==(n=e.jailed)&&void 0!==n&&n,c.status=null!==(i=e.status)&&void 0!==i?i:0,c.tokens=null!==(o=e.tokens)&&void 0!==o?o:"",c.delegatorShares=null!==(a=e.delegatorShares)&&void 0!==a?a:"",c.description=void 0!==e.description&&null!==e.description?t.Description.fromPartial(e.description):void 0,c.unbondingHeight=null!==(s=e.unbondingHeight)&&void 0!==s?s:"0",c.unbondingTime=null!==(l=e.unbondingTime)&&void 0!==l?l:void 0,c.commission=void 0!==e.commission&&null!==e.commission?t.Commission.fromPartial(e.commission):void 0,c.minSelfDelegation=null!==(d=e.minSelfDelegation)&&void 0!==d?d:"",c}},t.ValAddresses={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();for(let r of e.addresses)t.uint32(10).string(r);return t},decode(e,t){let r=e instanceof a.default.Reader?e:new a.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=b();for(;r.pos>>3==1?i.addresses.push(r.string()):r.skipType(7&e)}return i},fromJSON:e=>({addresses:Array.isArray(null==e?void 0:e.addresses)?e.addresses.map(e=>String(e)):[]}),toJSON(e){let t={};return e.addresses?t.addresses=e.addresses.map(e=>e):t.addresses=[],t},fromPartial(e){var t;let r=b();return r.addresses=(null===(t=e.addresses)||void 0===t?void 0:t.map(e=>e))||[],r}},t.DVPair={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();return""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),""!==e.validatorAddress&&t.uint32(18).string(e.validatorAddress),t},decode(e,t){let r=e instanceof a.default.Reader?e:new a.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=S();for(;r.pos>>3){case 1:i.delegatorAddress=r.string();break;case 2:i.validatorAddress=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({delegatorAddress:J(e.delegatorAddress)?String(e.delegatorAddress):"",validatorAddress:J(e.validatorAddress)?String(e.validatorAddress):""}),toJSON(e){let t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),t},fromPartial(e){var t,r;let n=S();return n.delegatorAddress=null!==(t=e.delegatorAddress)&&void 0!==t?t:"",n.validatorAddress=null!==(r=e.validatorAddress)&&void 0!==r?r:"",n}},t.DVPairs={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();for(let n of e.pairs)t.DVPair.encode(n,r.uint32(10).fork()).ldelim();return r},decode(e,r){let n=e instanceof a.default.Reader?e:new a.default.Reader(e),i=void 0===r?n.len:n.pos+r,o=w();for(;n.pos>>3==1?o.pairs.push(t.DVPair.decode(n,n.uint32())):n.skipType(7&e)}return o},fromJSON:e=>({pairs:Array.isArray(null==e?void 0:e.pairs)?e.pairs.map(e=>t.DVPair.fromJSON(e)):[]}),toJSON(e){let r={};return e.pairs?r.pairs=e.pairs.map(e=>e?t.DVPair.toJSON(e):void 0):r.pairs=[],r},fromPartial(e){var r;let n=w();return n.pairs=(null===(r=e.pairs)||void 0===r?void 0:r.map(e=>t.DVPair.fromPartial(e)))||[],n}},t.DVVTriplet={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();return""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),""!==e.validatorSrcAddress&&t.uint32(18).string(e.validatorSrcAddress),""!==e.validatorDstAddress&&t.uint32(26).string(e.validatorDstAddress),t},decode(e,t){let r=e instanceof a.default.Reader?e:new a.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=_();for(;r.pos>>3){case 1:i.delegatorAddress=r.string();break;case 2:i.validatorSrcAddress=r.string();break;case 3:i.validatorDstAddress=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({delegatorAddress:J(e.delegatorAddress)?String(e.delegatorAddress):"",validatorSrcAddress:J(e.validatorSrcAddress)?String(e.validatorSrcAddress):"",validatorDstAddress:J(e.validatorDstAddress)?String(e.validatorDstAddress):""}),toJSON(e){let t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.validatorSrcAddress&&(t.validatorSrcAddress=e.validatorSrcAddress),void 0!==e.validatorDstAddress&&(t.validatorDstAddress=e.validatorDstAddress),t},fromPartial(e){var t,r,n;let i=_();return i.delegatorAddress=null!==(t=e.delegatorAddress)&&void 0!==t?t:"",i.validatorSrcAddress=null!==(r=e.validatorSrcAddress)&&void 0!==r?r:"",i.validatorDstAddress=null!==(n=e.validatorDstAddress)&&void 0!==n?n:"",i}},t.DVVTriplets={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();for(let n of e.triplets)t.DVVTriplet.encode(n,r.uint32(10).fork()).ldelim();return r},decode(e,r){let n=e instanceof a.default.Reader?e:new a.default.Reader(e),i=void 0===r?n.len:n.pos+r,o=k();for(;n.pos>>3==1?o.triplets.push(t.DVVTriplet.decode(n,n.uint32())):n.skipType(7&e)}return o},fromJSON:e=>({triplets:Array.isArray(null==e?void 0:e.triplets)?e.triplets.map(e=>t.DVVTriplet.fromJSON(e)):[]}),toJSON(e){let r={};return e.triplets?r.triplets=e.triplets.map(e=>e?t.DVVTriplet.toJSON(e):void 0):r.triplets=[],r},fromPartial(e){var r;let n=k();return n.triplets=(null===(r=e.triplets)||void 0===r?void 0:r.map(e=>t.DVVTriplet.fromPartial(e)))||[],n}},t.Delegation={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();return""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),""!==e.validatorAddress&&t.uint32(18).string(e.validatorAddress),""!==e.shares&&t.uint32(26).string(e.shares),t},decode(e,t){let r=e instanceof a.default.Reader?e:new a.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=O();for(;r.pos>>3){case 1:i.delegatorAddress=r.string();break;case 2:i.validatorAddress=r.string();break;case 3:i.shares=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({delegatorAddress:J(e.delegatorAddress)?String(e.delegatorAddress):"",validatorAddress:J(e.validatorAddress)?String(e.validatorAddress):"",shares:J(e.shares)?String(e.shares):""}),toJSON(e){let t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),void 0!==e.shares&&(t.shares=e.shares),t},fromPartial(e){var t,r,n;let i=O();return i.delegatorAddress=null!==(t=e.delegatorAddress)&&void 0!==t?t:"",i.validatorAddress=null!==(r=e.validatorAddress)&&void 0!==r?r:"",i.shares=null!==(n=e.shares)&&void 0!==n?n:"",i}},t.UnbondingDelegation={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();for(let n of(""!==e.delegatorAddress&&r.uint32(10).string(e.delegatorAddress),""!==e.validatorAddress&&r.uint32(18).string(e.validatorAddress),e.entries))t.UnbondingDelegationEntry.encode(n,r.uint32(26).fork()).ldelim();return r},decode(e,r){let n=e instanceof a.default.Reader?e:new a.default.Reader(e),i=void 0===r?n.len:n.pos+r,o=P();for(;n.pos>>3){case 1:o.delegatorAddress=n.string();break;case 2:o.validatorAddress=n.string();break;case 3:o.entries.push(t.UnbondingDelegationEntry.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return o},fromJSON:e=>({delegatorAddress:J(e.delegatorAddress)?String(e.delegatorAddress):"",validatorAddress:J(e.validatorAddress)?String(e.validatorAddress):"",entries:Array.isArray(null==e?void 0:e.entries)?e.entries.map(e=>t.UnbondingDelegationEntry.fromJSON(e)):[]}),toJSON(e){let r={};return void 0!==e.delegatorAddress&&(r.delegatorAddress=e.delegatorAddress),void 0!==e.validatorAddress&&(r.validatorAddress=e.validatorAddress),e.entries?r.entries=e.entries.map(e=>e?t.UnbondingDelegationEntry.toJSON(e):void 0):r.entries=[],r},fromPartial(e){var r,n,i;let o=P();return o.delegatorAddress=null!==(r=e.delegatorAddress)&&void 0!==r?r:"",o.validatorAddress=null!==(n=e.validatorAddress)&&void 0!==n?n:"",o.entries=(null===(i=e.entries)||void 0===i?void 0:i.map(e=>t.UnbondingDelegationEntry.fromPartial(e)))||[],o}},t.UnbondingDelegationEntry={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();return"0"!==e.creationHeight&&t.uint32(8).int64(e.creationHeight),void 0!==e.completionTime&&s.Timestamp.encode(C(e.completionTime),t.uint32(18).fork()).ldelim(),""!==e.initialBalance&&t.uint32(26).string(e.initialBalance),""!==e.balance&&t.uint32(34).string(e.balance),t},decode(e,t){let r=e instanceof a.default.Reader?e:new a.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=A();for(;r.pos>>3){case 1:i.creationHeight=U(r.int64());break;case 2:i.completionTime=M(s.Timestamp.decode(r,r.uint32()));break;case 3:i.initialBalance=r.string();break;case 4:i.balance=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({creationHeight:J(e.creationHeight)?String(e.creationHeight):"0",completionTime:J(e.completionTime)?D(e.completionTime):void 0,initialBalance:J(e.initialBalance)?String(e.initialBalance):"",balance:J(e.balance)?String(e.balance):""}),toJSON(e){let t={};return void 0!==e.creationHeight&&(t.creationHeight=e.creationHeight),void 0!==e.completionTime&&(t.completionTime=e.completionTime.toISOString()),void 0!==e.initialBalance&&(t.initialBalance=e.initialBalance),void 0!==e.balance&&(t.balance=e.balance),t},fromPartial(e){var t,r,n,i;let o=A();return o.creationHeight=null!==(t=e.creationHeight)&&void 0!==t?t:"0",o.completionTime=null!==(r=e.completionTime)&&void 0!==r?r:void 0,o.initialBalance=null!==(n=e.initialBalance)&&void 0!==n?n:"",o.balance=null!==(i=e.balance)&&void 0!==i?i:"",o}},t.RedelegationEntry={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();return"0"!==e.creationHeight&&t.uint32(8).int64(e.creationHeight),void 0!==e.completionTime&&s.Timestamp.encode(C(e.completionTime),t.uint32(18).fork()).ldelim(),""!==e.initialBalance&&t.uint32(26).string(e.initialBalance),""!==e.sharesDst&&t.uint32(34).string(e.sharesDst),t},decode(e,t){let r=e instanceof a.default.Reader?e:new a.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=I();for(;r.pos>>3){case 1:i.creationHeight=U(r.int64());break;case 2:i.completionTime=M(s.Timestamp.decode(r,r.uint32()));break;case 3:i.initialBalance=r.string();break;case 4:i.sharesDst=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({creationHeight:J(e.creationHeight)?String(e.creationHeight):"0",completionTime:J(e.completionTime)?D(e.completionTime):void 0,initialBalance:J(e.initialBalance)?String(e.initialBalance):"",sharesDst:J(e.sharesDst)?String(e.sharesDst):""}),toJSON(e){let t={};return void 0!==e.creationHeight&&(t.creationHeight=e.creationHeight),void 0!==e.completionTime&&(t.completionTime=e.completionTime.toISOString()),void 0!==e.initialBalance&&(t.initialBalance=e.initialBalance),void 0!==e.sharesDst&&(t.sharesDst=e.sharesDst),t},fromPartial(e){var t,r,n,i;let o=I();return o.creationHeight=null!==(t=e.creationHeight)&&void 0!==t?t:"0",o.completionTime=null!==(r=e.completionTime)&&void 0!==r?r:void 0,o.initialBalance=null!==(n=e.initialBalance)&&void 0!==n?n:"",o.sharesDst=null!==(i=e.sharesDst)&&void 0!==i?i:"",o}},t.Redelegation={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();for(let n of(""!==e.delegatorAddress&&r.uint32(10).string(e.delegatorAddress),""!==e.validatorSrcAddress&&r.uint32(18).string(e.validatorSrcAddress),""!==e.validatorDstAddress&&r.uint32(26).string(e.validatorDstAddress),e.entries))t.RedelegationEntry.encode(n,r.uint32(34).fork()).ldelim();return r},decode(e,r){let n=e instanceof a.default.Reader?e:new a.default.Reader(e),i=void 0===r?n.len:n.pos+r,o=R();for(;n.pos>>3){case 1:o.delegatorAddress=n.string();break;case 2:o.validatorSrcAddress=n.string();break;case 3:o.validatorDstAddress=n.string();break;case 4:o.entries.push(t.RedelegationEntry.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return o},fromJSON:e=>({delegatorAddress:J(e.delegatorAddress)?String(e.delegatorAddress):"",validatorSrcAddress:J(e.validatorSrcAddress)?String(e.validatorSrcAddress):"",validatorDstAddress:J(e.validatorDstAddress)?String(e.validatorDstAddress):"",entries:Array.isArray(null==e?void 0:e.entries)?e.entries.map(e=>t.RedelegationEntry.fromJSON(e)):[]}),toJSON(e){let r={};return void 0!==e.delegatorAddress&&(r.delegatorAddress=e.delegatorAddress),void 0!==e.validatorSrcAddress&&(r.validatorSrcAddress=e.validatorSrcAddress),void 0!==e.validatorDstAddress&&(r.validatorDstAddress=e.validatorDstAddress),e.entries?r.entries=e.entries.map(e=>e?t.RedelegationEntry.toJSON(e):void 0):r.entries=[],r},fromPartial(e){var r,n,i,o;let a=R();return a.delegatorAddress=null!==(r=e.delegatorAddress)&&void 0!==r?r:"",a.validatorSrcAddress=null!==(n=e.validatorSrcAddress)&&void 0!==n?n:"",a.validatorDstAddress=null!==(i=e.validatorDstAddress)&&void 0!==i?i:"",a.entries=(null===(o=e.entries)||void 0===o?void 0:o.map(e=>t.RedelegationEntry.fromPartial(e)))||[],a}},t.Params={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();return void 0!==e.unbondingTime&&d.Duration.encode(e.unbondingTime,t.uint32(10).fork()).ldelim(),0!==e.maxValidators&&t.uint32(16).uint32(e.maxValidators),0!==e.maxEntries&&t.uint32(24).uint32(e.maxEntries),0!==e.historicalEntries&&t.uint32(32).uint32(e.historicalEntries),""!==e.bondDenom&&t.uint32(42).string(e.bondDenom),t},decode(e,t){let r=e instanceof a.default.Reader?e:new a.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=E();for(;r.pos>>3){case 1:i.unbondingTime=d.Duration.decode(r,r.uint32());break;case 2:i.maxValidators=r.uint32();break;case 3:i.maxEntries=r.uint32();break;case 4:i.historicalEntries=r.uint32();break;case 5:i.bondDenom=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({unbondingTime:J(e.unbondingTime)?d.Duration.fromJSON(e.unbondingTime):void 0,maxValidators:J(e.maxValidators)?Number(e.maxValidators):0,maxEntries:J(e.maxEntries)?Number(e.maxEntries):0,historicalEntries:J(e.historicalEntries)?Number(e.historicalEntries):0,bondDenom:J(e.bondDenom)?String(e.bondDenom):""}),toJSON(e){let t={};return void 0!==e.unbondingTime&&(t.unbondingTime=e.unbondingTime?d.Duration.toJSON(e.unbondingTime):void 0),void 0!==e.maxValidators&&(t.maxValidators=Math.round(e.maxValidators)),void 0!==e.maxEntries&&(t.maxEntries=Math.round(e.maxEntries)),void 0!==e.historicalEntries&&(t.historicalEntries=Math.round(e.historicalEntries)),void 0!==e.bondDenom&&(t.bondDenom=e.bondDenom),t},fromPartial(e){var t,r,n,i;let o=E();return o.unbondingTime=void 0!==e.unbondingTime&&null!==e.unbondingTime?d.Duration.fromPartial(e.unbondingTime):void 0,o.maxValidators=null!==(t=e.maxValidators)&&void 0!==t?t:0,o.maxEntries=null!==(r=e.maxEntries)&&void 0!==r?r:0,o.historicalEntries=null!==(n=e.historicalEntries)&&void 0!==n?n:0,o.bondDenom=null!==(i=e.bondDenom)&&void 0!==i?i:"",o}},t.DelegationResponse={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();return void 0!==e.delegation&&t.Delegation.encode(e.delegation,r.uint32(10).fork()).ldelim(),void 0!==e.balance&&c.Coin.encode(e.balance,r.uint32(18).fork()).ldelim(),r},decode(e,r){let n=e instanceof a.default.Reader?e:new a.default.Reader(e),i=void 0===r?n.len:n.pos+r,o=T();for(;n.pos>>3){case 1:o.delegation=t.Delegation.decode(n,n.uint32());break;case 2:o.balance=c.Coin.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON:e=>({delegation:J(e.delegation)?t.Delegation.fromJSON(e.delegation):void 0,balance:J(e.balance)?c.Coin.fromJSON(e.balance):void 0}),toJSON(e){let r={};return void 0!==e.delegation&&(r.delegation=e.delegation?t.Delegation.toJSON(e.delegation):void 0),void 0!==e.balance&&(r.balance=e.balance?c.Coin.toJSON(e.balance):void 0),r},fromPartial(e){let r=T();return r.delegation=void 0!==e.delegation&&null!==e.delegation?t.Delegation.fromPartial(e.delegation):void 0,r.balance=void 0!==e.balance&&null!==e.balance?c.Coin.fromPartial(e.balance):void 0,r}},t.RedelegationEntryResponse={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();return void 0!==e.redelegationEntry&&t.RedelegationEntry.encode(e.redelegationEntry,r.uint32(10).fork()).ldelim(),""!==e.balance&&r.uint32(34).string(e.balance),r},decode(e,r){let n=e instanceof a.default.Reader?e:new a.default.Reader(e),i=void 0===r?n.len:n.pos+r,o=N();for(;n.pos>>3){case 1:o.redelegationEntry=t.RedelegationEntry.decode(n,n.uint32());break;case 4:o.balance=n.string();break;default:n.skipType(7&e)}}return o},fromJSON:e=>({redelegationEntry:J(e.redelegationEntry)?t.RedelegationEntry.fromJSON(e.redelegationEntry):void 0,balance:J(e.balance)?String(e.balance):""}),toJSON(e){let r={};return void 0!==e.redelegationEntry&&(r.redelegationEntry=e.redelegationEntry?t.RedelegationEntry.toJSON(e.redelegationEntry):void 0),void 0!==e.balance&&(r.balance=e.balance),r},fromPartial(e){var r;let n=N();return n.redelegationEntry=void 0!==e.redelegationEntry&&null!==e.redelegationEntry?t.RedelegationEntry.fromPartial(e.redelegationEntry):void 0,n.balance=null!==(r=e.balance)&&void 0!==r?r:"",n}},t.RedelegationResponse={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();for(let n of(void 0!==e.redelegation&&t.Redelegation.encode(e.redelegation,r.uint32(10).fork()).ldelim(),e.entries))t.RedelegationEntryResponse.encode(n,r.uint32(18).fork()).ldelim();return r},decode(e,r){let n=e instanceof a.default.Reader?e:new a.default.Reader(e),i=void 0===r?n.len:n.pos+r,o=x();for(;n.pos>>3){case 1:o.redelegation=t.Redelegation.decode(n,n.uint32());break;case 2:o.entries.push(t.RedelegationEntryResponse.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return o},fromJSON:e=>({redelegation:J(e.redelegation)?t.Redelegation.fromJSON(e.redelegation):void 0,entries:Array.isArray(null==e?void 0:e.entries)?e.entries.map(e=>t.RedelegationEntryResponse.fromJSON(e)):[]}),toJSON(e){let r={};return void 0!==e.redelegation&&(r.redelegation=e.redelegation?t.Redelegation.toJSON(e.redelegation):void 0),e.entries?r.entries=e.entries.map(e=>e?t.RedelegationEntryResponse.toJSON(e):void 0):r.entries=[],r},fromPartial(e){var r;let n=x();return n.redelegation=void 0!==e.redelegation&&null!==e.redelegation?t.Redelegation.fromPartial(e.redelegation):void 0,n.entries=(null===(r=e.entries)||void 0===r?void 0:r.map(e=>t.RedelegationEntryResponse.fromPartial(e)))||[],n}},t.Pool={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();return""!==e.notBondedTokens&&t.uint32(10).string(e.notBondedTokens),""!==e.bondedTokens&&t.uint32(18).string(e.bondedTokens),t},decode(e,t){let r=e instanceof a.default.Reader?e:new a.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=B();for(;r.pos>>3){case 1:i.notBondedTokens=r.string();break;case 2:i.bondedTokens=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({notBondedTokens:J(e.notBondedTokens)?String(e.notBondedTokens):"",bondedTokens:J(e.bondedTokens)?String(e.bondedTokens):""}),toJSON(e){let t={};return void 0!==e.notBondedTokens&&(t.notBondedTokens=e.notBondedTokens),void 0!==e.bondedTokens&&(t.bondedTokens=e.bondedTokens),t},fromPartial(e){var t,r;let n=B();return n.notBondedTokens=null!==(t=e.notBondedTokens)&&void 0!==t?t:"",n.bondedTokens=null!==(r=e.bondedTokens)&&void 0!==r?r:"",n}},a.default.util.Long!==o.default&&(a.default.util.Long=o.default,a.default.configure())},47431:function(e,t,r){"use strict";var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MsgValidatorBondResponse=t.MsgValidatorBond=t.MsgEnableTokenizeSharesResponse=t.MsgEnableTokenizeShares=t.MsgDisableTokenizeSharesResponse=t.MsgDisableTokenizeShares=t.MsgTransferTokenizeShareRecordResponse=t.MsgTransferTokenizeShareRecord=t.MsgRedeemTokensForSharesResponse=t.MsgRedeemTokensForShares=t.MsgTokenizeSharesResponse=t.MsgTokenizeShares=t.MsgCancelUnbondingDelegationResponse=t.MsgCancelUnbondingDelegation=t.MsgUnbondValidatorResponse=t.MsgUnbondValidator=t.MsgUndelegateResponse=t.MsgUndelegate=t.MsgBeginRedelegateResponse=t.MsgBeginRedelegate=t.MsgDelegateResponse=t.MsgDelegate=t.MsgEditValidatorResponse=t.MsgEditValidator=t.MsgCreateValidatorResponse=t.MsgCreateValidator=t.protobufPackage=void 0;let i=n(r(40059)),o=n(r(81667)),a=r(90338),s=r(60159),l=r(28446),u=r(80054);function d(){return{description:void 0,commission:void 0,minSelfDelegation:"",delegatorAddress:"",validatorAddress:"",pubkey:void 0,value:void 0}}function c(){return{}}function p(){return{description:void 0,validatorAddress:"",commissionRate:"",minSelfDelegation:""}}function f(){return{}}function h(){return{delegatorAddress:"",validatorAddress:"",amount:void 0}}function g(){return{}}function m(){return{delegatorAddress:"",validatorSrcAddress:"",validatorDstAddress:"",amount:void 0}}function y(){return{completionTime:void 0}}function v(){return{delegatorAddress:"",validatorAddress:"",amount:void 0}}function b(){return{completionTime:void 0}}function S(){return{validatorAddress:""}}function w(){return{}}function _(){return{delegatorAddress:"",validatorAddress:"",amount:void 0,creationHeight:"0"}}function k(){return{}}function O(){return{delegatorAddress:"",validatorAddress:"",amount:void 0,tokenizedShareOwner:""}}function P(){return{amount:void 0}}function A(){return{delegatorAddress:"",amount:void 0}}function I(){return{amount:void 0}}function R(){return{tokenizeShareRecordId:"0",sender:"",newOwner:""}}function E(){return{}}function T(){return{delegatorAddress:""}}function N(){return{}}function x(){return{delegatorAddress:""}}function B(){return{completionTime:void 0}}function C(){return{delegatorAddress:"",validatorAddress:""}}function M(){return{}}function D(e){return{seconds:Math.trunc(e.getTime()/1e3).toString(),nanos:e.getTime()%1e3*1e6}}function U(e){let t=1e3*Number(e.seconds);return new Date(t+=e.nanos/1e6)}function J(e){return e instanceof Date?e:"string"==typeof e?new Date(e):U(a.Timestamp.fromJSON(e))}function j(e){return e.toString()}function H(e){return null!=e}t.protobufPackage="cosmos.staking.v1beta1",t.MsgCreateValidator={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return void 0!==e.description&&s.Description.encode(e.description,t.uint32(10).fork()).ldelim(),void 0!==e.commission&&s.CommissionRates.encode(e.commission,t.uint32(18).fork()).ldelim(),""!==e.minSelfDelegation&&t.uint32(26).string(e.minSelfDelegation),""!==e.delegatorAddress&&t.uint32(34).string(e.delegatorAddress),""!==e.validatorAddress&&t.uint32(42).string(e.validatorAddress),void 0!==e.pubkey&&l.Any.encode(e.pubkey,t.uint32(50).fork()).ldelim(),void 0!==e.value&&u.Coin.encode(e.value,t.uint32(58).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=d();for(;r.pos>>3){case 1:i.description=s.Description.decode(r,r.uint32());break;case 2:i.commission=s.CommissionRates.decode(r,r.uint32());break;case 3:i.minSelfDelegation=r.string();break;case 4:i.delegatorAddress=r.string();break;case 5:i.validatorAddress=r.string();break;case 6:i.pubkey=l.Any.decode(r,r.uint32());break;case 7:i.value=u.Coin.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON:e=>({description:H(e.description)?s.Description.fromJSON(e.description):void 0,commission:H(e.commission)?s.CommissionRates.fromJSON(e.commission):void 0,minSelfDelegation:H(e.minSelfDelegation)?String(e.minSelfDelegation):"",delegatorAddress:H(e.delegatorAddress)?String(e.delegatorAddress):"",validatorAddress:H(e.validatorAddress)?String(e.validatorAddress):"",pubkey:H(e.pubkey)?l.Any.fromJSON(e.pubkey):void 0,value:H(e.value)?u.Coin.fromJSON(e.value):void 0}),toJSON(e){let t={};return void 0!==e.description&&(t.description=e.description?s.Description.toJSON(e.description):void 0),void 0!==e.commission&&(t.commission=e.commission?s.CommissionRates.toJSON(e.commission):void 0),void 0!==e.minSelfDelegation&&(t.minSelfDelegation=e.minSelfDelegation),void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),void 0!==e.pubkey&&(t.pubkey=e.pubkey?l.Any.toJSON(e.pubkey):void 0),void 0!==e.value&&(t.value=e.value?u.Coin.toJSON(e.value):void 0),t},fromPartial(e){var t,r,n;let i=d();return i.description=void 0!==e.description&&null!==e.description?s.Description.fromPartial(e.description):void 0,i.commission=void 0!==e.commission&&null!==e.commission?s.CommissionRates.fromPartial(e.commission):void 0,i.minSelfDelegation=null!==(t=e.minSelfDelegation)&&void 0!==t?t:"",i.delegatorAddress=null!==(r=e.delegatorAddress)&&void 0!==r?r:"",i.validatorAddress=null!==(n=e.validatorAddress)&&void 0!==n?n:"",i.pubkey=void 0!==e.pubkey&&null!==e.pubkey?l.Any.fromPartial(e.pubkey):void 0,i.value=void 0!==e.value&&null!==e.value?u.Coin.fromPartial(e.value):void 0,i}},t.MsgCreateValidatorResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=c();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>c()},t.MsgEditValidator={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return void 0!==e.description&&s.Description.encode(e.description,t.uint32(10).fork()).ldelim(),""!==e.validatorAddress&&t.uint32(18).string(e.validatorAddress),""!==e.commissionRate&&t.uint32(26).string(e.commissionRate),""!==e.minSelfDelegation&&t.uint32(34).string(e.minSelfDelegation),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=p();for(;r.pos>>3){case 1:i.description=s.Description.decode(r,r.uint32());break;case 2:i.validatorAddress=r.string();break;case 3:i.commissionRate=r.string();break;case 4:i.minSelfDelegation=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({description:H(e.description)?s.Description.fromJSON(e.description):void 0,validatorAddress:H(e.validatorAddress)?String(e.validatorAddress):"",commissionRate:H(e.commissionRate)?String(e.commissionRate):"",minSelfDelegation:H(e.minSelfDelegation)?String(e.minSelfDelegation):""}),toJSON(e){let t={};return void 0!==e.description&&(t.description=e.description?s.Description.toJSON(e.description):void 0),void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),void 0!==e.commissionRate&&(t.commissionRate=e.commissionRate),void 0!==e.minSelfDelegation&&(t.minSelfDelegation=e.minSelfDelegation),t},fromPartial(e){var t,r,n;let i=p();return i.description=void 0!==e.description&&null!==e.description?s.Description.fromPartial(e.description):void 0,i.validatorAddress=null!==(t=e.validatorAddress)&&void 0!==t?t:"",i.commissionRate=null!==(r=e.commissionRate)&&void 0!==r?r:"",i.minSelfDelegation=null!==(n=e.minSelfDelegation)&&void 0!==n?n:"",i}},t.MsgEditValidatorResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=f();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>f()},t.MsgDelegate={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),""!==e.validatorAddress&&t.uint32(18).string(e.validatorAddress),void 0!==e.amount&&u.Coin.encode(e.amount,t.uint32(26).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=h();for(;r.pos>>3){case 1:i.delegatorAddress=r.string();break;case 2:i.validatorAddress=r.string();break;case 3:i.amount=u.Coin.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON:e=>({delegatorAddress:H(e.delegatorAddress)?String(e.delegatorAddress):"",validatorAddress:H(e.validatorAddress)?String(e.validatorAddress):"",amount:H(e.amount)?u.Coin.fromJSON(e.amount):void 0}),toJSON(e){let t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),void 0!==e.amount&&(t.amount=e.amount?u.Coin.toJSON(e.amount):void 0),t},fromPartial(e){var t,r;let n=h();return n.delegatorAddress=null!==(t=e.delegatorAddress)&&void 0!==t?t:"",n.validatorAddress=null!==(r=e.validatorAddress)&&void 0!==r?r:"",n.amount=void 0!==e.amount&&null!==e.amount?u.Coin.fromPartial(e.amount):void 0,n}},t.MsgDelegateResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=g();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>g()},t.MsgBeginRedelegate={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),""!==e.validatorSrcAddress&&t.uint32(18).string(e.validatorSrcAddress),""!==e.validatorDstAddress&&t.uint32(26).string(e.validatorDstAddress),void 0!==e.amount&&u.Coin.encode(e.amount,t.uint32(34).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=m();for(;r.pos>>3){case 1:i.delegatorAddress=r.string();break;case 2:i.validatorSrcAddress=r.string();break;case 3:i.validatorDstAddress=r.string();break;case 4:i.amount=u.Coin.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON:e=>({delegatorAddress:H(e.delegatorAddress)?String(e.delegatorAddress):"",validatorSrcAddress:H(e.validatorSrcAddress)?String(e.validatorSrcAddress):"",validatorDstAddress:H(e.validatorDstAddress)?String(e.validatorDstAddress):"",amount:H(e.amount)?u.Coin.fromJSON(e.amount):void 0}),toJSON(e){let t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.validatorSrcAddress&&(t.validatorSrcAddress=e.validatorSrcAddress),void 0!==e.validatorDstAddress&&(t.validatorDstAddress=e.validatorDstAddress),void 0!==e.amount&&(t.amount=e.amount?u.Coin.toJSON(e.amount):void 0),t},fromPartial(e){var t,r,n;let i=m();return i.delegatorAddress=null!==(t=e.delegatorAddress)&&void 0!==t?t:"",i.validatorSrcAddress=null!==(r=e.validatorSrcAddress)&&void 0!==r?r:"",i.validatorDstAddress=null!==(n=e.validatorDstAddress)&&void 0!==n?n:"",i.amount=void 0!==e.amount&&null!==e.amount?u.Coin.fromPartial(e.amount):void 0,i}},t.MsgBeginRedelegateResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return void 0!==e.completionTime&&a.Timestamp.encode(D(e.completionTime),t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=y();for(;r.pos>>3==1?i.completionTime=U(a.Timestamp.decode(r,r.uint32())):r.skipType(7&e)}return i},fromJSON:e=>({completionTime:H(e.completionTime)?J(e.completionTime):void 0}),toJSON(e){let t={};return void 0!==e.completionTime&&(t.completionTime=e.completionTime.toISOString()),t},fromPartial(e){var t;let r=y();return r.completionTime=null!==(t=e.completionTime)&&void 0!==t?t:void 0,r}},t.MsgUndelegate={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),""!==e.validatorAddress&&t.uint32(18).string(e.validatorAddress),void 0!==e.amount&&u.Coin.encode(e.amount,t.uint32(26).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=v();for(;r.pos>>3){case 1:i.delegatorAddress=r.string();break;case 2:i.validatorAddress=r.string();break;case 3:i.amount=u.Coin.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON:e=>({delegatorAddress:H(e.delegatorAddress)?String(e.delegatorAddress):"",validatorAddress:H(e.validatorAddress)?String(e.validatorAddress):"",amount:H(e.amount)?u.Coin.fromJSON(e.amount):void 0}),toJSON(e){let t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),void 0!==e.amount&&(t.amount=e.amount?u.Coin.toJSON(e.amount):void 0),t},fromPartial(e){var t,r;let n=v();return n.delegatorAddress=null!==(t=e.delegatorAddress)&&void 0!==t?t:"",n.validatorAddress=null!==(r=e.validatorAddress)&&void 0!==r?r:"",n.amount=void 0!==e.amount&&null!==e.amount?u.Coin.fromPartial(e.amount):void 0,n}},t.MsgUndelegateResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return void 0!==e.completionTime&&a.Timestamp.encode(D(e.completionTime),t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=b();for(;r.pos>>3==1?i.completionTime=U(a.Timestamp.decode(r,r.uint32())):r.skipType(7&e)}return i},fromJSON:e=>({completionTime:H(e.completionTime)?J(e.completionTime):void 0}),toJSON(e){let t={};return void 0!==e.completionTime&&(t.completionTime=e.completionTime.toISOString()),t},fromPartial(e){var t;let r=b();return r.completionTime=null!==(t=e.completionTime)&&void 0!==t?t:void 0,r}},t.MsgUnbondValidator={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.validatorAddress&&t.uint32(10).string(e.validatorAddress),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=S();for(;r.pos>>3==1?i.validatorAddress=r.string():r.skipType(7&e)}return i},fromJSON:e=>({validatorAddress:H(e.validatorAddress)?String(e.validatorAddress):""}),toJSON(e){let t={};return void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),t},fromPartial(e){var t;let r=S();return r.validatorAddress=null!==(t=e.validatorAddress)&&void 0!==t?t:"",r}},t.MsgUnbondValidatorResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=w();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>w()},t.MsgCancelUnbondingDelegation={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),""!==e.validatorAddress&&t.uint32(18).string(e.validatorAddress),void 0!==e.amount&&u.Coin.encode(e.amount,t.uint32(26).fork()).ldelim(),"0"!==e.creationHeight&&t.uint32(32).int64(e.creationHeight),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=_();for(;r.pos>>3){case 1:i.delegatorAddress=r.string();break;case 2:i.validatorAddress=r.string();break;case 3:i.amount=u.Coin.decode(r,r.uint32());break;case 4:i.creationHeight=j(r.int64());break;default:r.skipType(7&e)}}return i},fromJSON:e=>({delegatorAddress:H(e.delegatorAddress)?String(e.delegatorAddress):"",validatorAddress:H(e.validatorAddress)?String(e.validatorAddress):"",amount:H(e.amount)?u.Coin.fromJSON(e.amount):void 0,creationHeight:H(e.creationHeight)?String(e.creationHeight):"0"}),toJSON(e){let t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),void 0!==e.amount&&(t.amount=e.amount?u.Coin.toJSON(e.amount):void 0),void 0!==e.creationHeight&&(t.creationHeight=e.creationHeight),t},fromPartial(e){var t,r,n;let i=_();return i.delegatorAddress=null!==(t=e.delegatorAddress)&&void 0!==t?t:"",i.validatorAddress=null!==(r=e.validatorAddress)&&void 0!==r?r:"",i.amount=void 0!==e.amount&&null!==e.amount?u.Coin.fromPartial(e.amount):void 0,i.creationHeight=null!==(n=e.creationHeight)&&void 0!==n?n:"0",i}},t.MsgCancelUnbondingDelegationResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=k();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>k()},t.MsgTokenizeShares={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),""!==e.validatorAddress&&t.uint32(18).string(e.validatorAddress),void 0!==e.amount&&u.Coin.encode(e.amount,t.uint32(26).fork()).ldelim(),""!==e.tokenizedShareOwner&&t.uint32(34).string(e.tokenizedShareOwner),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=O();for(;r.pos>>3){case 1:i.delegatorAddress=r.string();break;case 2:i.validatorAddress=r.string();break;case 3:i.amount=u.Coin.decode(r,r.uint32());break;case 4:i.tokenizedShareOwner=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({delegatorAddress:H(e.delegatorAddress)?String(e.delegatorAddress):"",validatorAddress:H(e.validatorAddress)?String(e.validatorAddress):"",amount:H(e.amount)?u.Coin.fromJSON(e.amount):void 0,tokenizedShareOwner:H(e.tokenizedShareOwner)?String(e.tokenizedShareOwner):""}),toJSON(e){let t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),void 0!==e.amount&&(t.amount=e.amount?u.Coin.toJSON(e.amount):void 0),void 0!==e.tokenizedShareOwner&&(t.tokenizedShareOwner=e.tokenizedShareOwner),t},fromPartial(e){var t,r,n;let i=O();return i.delegatorAddress=null!==(t=e.delegatorAddress)&&void 0!==t?t:"",i.validatorAddress=null!==(r=e.validatorAddress)&&void 0!==r?r:"",i.amount=void 0!==e.amount&&null!==e.amount?u.Coin.fromPartial(e.amount):void 0,i.tokenizedShareOwner=null!==(n=e.tokenizedShareOwner)&&void 0!==n?n:"",i}},t.MsgTokenizeSharesResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return void 0!==e.amount&&u.Coin.encode(e.amount,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=P();for(;r.pos>>3==1?i.amount=u.Coin.decode(r,r.uint32()):r.skipType(7&e)}return i},fromJSON:e=>({amount:H(e.amount)?u.Coin.fromJSON(e.amount):void 0}),toJSON(e){let t={};return void 0!==e.amount&&(t.amount=e.amount?u.Coin.toJSON(e.amount):void 0),t},fromPartial(e){let t=P();return t.amount=void 0!==e.amount&&null!==e.amount?u.Coin.fromPartial(e.amount):void 0,t}},t.MsgRedeemTokensForShares={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),void 0!==e.amount&&u.Coin.encode(e.amount,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=A();for(;r.pos>>3){case 1:i.delegatorAddress=r.string();break;case 2:i.amount=u.Coin.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON:e=>({delegatorAddress:H(e.delegatorAddress)?String(e.delegatorAddress):"",amount:H(e.amount)?u.Coin.fromJSON(e.amount):void 0}),toJSON(e){let t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.amount&&(t.amount=e.amount?u.Coin.toJSON(e.amount):void 0),t},fromPartial(e){var t;let r=A();return r.delegatorAddress=null!==(t=e.delegatorAddress)&&void 0!==t?t:"",r.amount=void 0!==e.amount&&null!==e.amount?u.Coin.fromPartial(e.amount):void 0,r}},t.MsgRedeemTokensForSharesResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return void 0!==e.amount&&u.Coin.encode(e.amount,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=I();for(;r.pos>>3==1?i.amount=u.Coin.decode(r,r.uint32()):r.skipType(7&e)}return i},fromJSON:e=>({amount:H(e.amount)?u.Coin.fromJSON(e.amount):void 0}),toJSON(e){let t={};return void 0!==e.amount&&(t.amount=e.amount?u.Coin.toJSON(e.amount):void 0),t},fromPartial(e){let t=I();return t.amount=void 0!==e.amount&&null!==e.amount?u.Coin.fromPartial(e.amount):void 0,t}},t.MsgTransferTokenizeShareRecord={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return"0"!==e.tokenizeShareRecordId&&t.uint32(8).uint64(e.tokenizeShareRecordId),""!==e.sender&&t.uint32(18).string(e.sender),""!==e.newOwner&&t.uint32(26).string(e.newOwner),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=R();for(;r.pos>>3){case 1:i.tokenizeShareRecordId=j(r.uint64());break;case 2:i.sender=r.string();break;case 3:i.newOwner=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({tokenizeShareRecordId:H(e.tokenizeShareRecordId)?String(e.tokenizeShareRecordId):"0",sender:H(e.sender)?String(e.sender):"",newOwner:H(e.newOwner)?String(e.newOwner):""}),toJSON(e){let t={};return void 0!==e.tokenizeShareRecordId&&(t.tokenizeShareRecordId=e.tokenizeShareRecordId),void 0!==e.sender&&(t.sender=e.sender),void 0!==e.newOwner&&(t.newOwner=e.newOwner),t},fromPartial(e){var t,r,n;let i=R();return i.tokenizeShareRecordId=null!==(t=e.tokenizeShareRecordId)&&void 0!==t?t:"0",i.sender=null!==(r=e.sender)&&void 0!==r?r:"",i.newOwner=null!==(n=e.newOwner)&&void 0!==n?n:"",i}},t.MsgTransferTokenizeShareRecordResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=E();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>E()},t.MsgDisableTokenizeShares={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=T();for(;r.pos>>3==1?i.delegatorAddress=r.string():r.skipType(7&e)}return i},fromJSON:e=>({delegatorAddress:H(e.delegatorAddress)?String(e.delegatorAddress):""}),toJSON(e){let t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),t},fromPartial(e){var t;let r=T();return r.delegatorAddress=null!==(t=e.delegatorAddress)&&void 0!==t?t:"",r}},t.MsgDisableTokenizeSharesResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=N();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>N()},t.MsgEnableTokenizeShares={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=x();for(;r.pos>>3==1?i.delegatorAddress=r.string():r.skipType(7&e)}return i},fromJSON:e=>({delegatorAddress:H(e.delegatorAddress)?String(e.delegatorAddress):""}),toJSON(e){let t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),t},fromPartial(e){var t;let r=x();return r.delegatorAddress=null!==(t=e.delegatorAddress)&&void 0!==t?t:"",r}},t.MsgEnableTokenizeSharesResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return void 0!==e.completionTime&&a.Timestamp.encode(D(e.completionTime),t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=B();for(;r.pos>>3==1?i.completionTime=U(a.Timestamp.decode(r,r.uint32())):r.skipType(7&e)}return i},fromJSON:e=>({completionTime:H(e.completionTime)?J(e.completionTime):void 0}),toJSON(e){let t={};return void 0!==e.completionTime&&(t.completionTime=e.completionTime.toISOString()),t},fromPartial(e){var t;let r=B();return r.completionTime=null!==(t=e.completionTime)&&void 0!==t?t:void 0,r}},t.MsgValidatorBond={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),""!==e.validatorAddress&&t.uint32(18).string(e.validatorAddress),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=C();for(;r.pos>>3){case 1:i.delegatorAddress=r.string();break;case 2:i.validatorAddress=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({delegatorAddress:H(e.delegatorAddress)?String(e.delegatorAddress):"",validatorAddress:H(e.validatorAddress)?String(e.validatorAddress):""}),toJSON(e){let t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),t},fromPartial(e){var t,r;let n=C();return n.delegatorAddress=null!==(t=e.delegatorAddress)&&void 0!==t?t:"",n.validatorAddress=null!==(r=e.validatorAddress)&&void 0!==r?r:"",n}},t.MsgValidatorBondResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=M();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>M()},o.default.util.Long!==i.default&&(o.default.util.Long=i.default,o.default.configure())},99402:function(e,t,r){"use strict";var n,i=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.SignatureDescriptor_Data_Multi=t.SignatureDescriptor_Data_Single=t.SignatureDescriptor_Data=t.SignatureDescriptor=t.SignatureDescriptors=t.signModeToJSON=t.signModeFromJSON=t.SignMode=t.protobufPackage=void 0;let o=i(r(40059)),a=i(r(81667)),s=r(28446),l=r(61097);function u(e){switch(e){case 0:case"SIGN_MODE_UNSPECIFIED":return n.SIGN_MODE_UNSPECIFIED;case 1:case"SIGN_MODE_DIRECT":return n.SIGN_MODE_DIRECT;case 2:case"SIGN_MODE_TEXTUAL":return n.SIGN_MODE_TEXTUAL;case 3:case"SIGN_MODE_DIRECT_AUX":return n.SIGN_MODE_DIRECT_AUX;case 127:case"SIGN_MODE_LEGACY_AMINO_JSON":return n.SIGN_MODE_LEGACY_AMINO_JSON;case 191:case"SIGN_MODE_EIP_191":return n.SIGN_MODE_EIP_191;default:return n.UNRECOGNIZED}}function d(e){switch(e){case n.SIGN_MODE_UNSPECIFIED:return"SIGN_MODE_UNSPECIFIED";case n.SIGN_MODE_DIRECT:return"SIGN_MODE_DIRECT";case n.SIGN_MODE_TEXTUAL:return"SIGN_MODE_TEXTUAL";case n.SIGN_MODE_DIRECT_AUX:return"SIGN_MODE_DIRECT_AUX";case n.SIGN_MODE_LEGACY_AMINO_JSON:return"SIGN_MODE_LEGACY_AMINO_JSON";case n.SIGN_MODE_EIP_191:return"SIGN_MODE_EIP_191";default:return"UNKNOWN"}}function c(){return{signatures:[]}}function p(){return{publicKey:void 0,data:void 0,sequence:"0"}}function f(){return{single:void 0,multi:void 0}}function h(){return{mode:0,signature:new Uint8Array}}function g(){return{bitarray:void 0,signatures:[]}}t.protobufPackage="cosmos.tx.signing.v1beta1",function(e){e[e.SIGN_MODE_UNSPECIFIED=0]="SIGN_MODE_UNSPECIFIED",e[e.SIGN_MODE_DIRECT=1]="SIGN_MODE_DIRECT",e[e.SIGN_MODE_TEXTUAL=2]="SIGN_MODE_TEXTUAL",e[e.SIGN_MODE_DIRECT_AUX=3]="SIGN_MODE_DIRECT_AUX",e[e.SIGN_MODE_LEGACY_AMINO_JSON=127]="SIGN_MODE_LEGACY_AMINO_JSON",e[e.SIGN_MODE_EIP_191=191]="SIGN_MODE_EIP_191",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(n=t.SignMode||(t.SignMode={})),t.signModeFromJSON=u,t.signModeToJSON=d,t.SignatureDescriptors={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();for(let n of e.signatures)t.SignatureDescriptor.encode(n,r.uint32(10).fork()).ldelim();return r},decode(e,r){let n=e instanceof a.default.Reader?e:new a.default.Reader(e),i=void 0===r?n.len:n.pos+r,o=c();for(;n.pos>>3==1?o.signatures.push(t.SignatureDescriptor.decode(n,n.uint32())):n.skipType(7&e)}return o},fromJSON:e=>({signatures:Array.isArray(null==e?void 0:e.signatures)?e.signatures.map(e=>t.SignatureDescriptor.fromJSON(e)):[]}),toJSON(e){let r={};return e.signatures?r.signatures=e.signatures.map(e=>e?t.SignatureDescriptor.toJSON(e):void 0):r.signatures=[],r},fromPartial(e){var r;let n=c();return n.signatures=(null===(r=e.signatures)||void 0===r?void 0:r.map(e=>t.SignatureDescriptor.fromPartial(e)))||[],n}},t.SignatureDescriptor={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();return void 0!==e.publicKey&&s.Any.encode(e.publicKey,r.uint32(10).fork()).ldelim(),void 0!==e.data&&t.SignatureDescriptor_Data.encode(e.data,r.uint32(18).fork()).ldelim(),"0"!==e.sequence&&r.uint32(24).uint64(e.sequence),r},decode(e,r){let n=e instanceof a.default.Reader?e:new a.default.Reader(e),i=void 0===r?n.len:n.pos+r,o=p();for(;n.pos>>3){case 1:o.publicKey=s.Any.decode(n,n.uint32());break;case 2:o.data=t.SignatureDescriptor_Data.decode(n,n.uint32());break;case 3:o.sequence=w(n.uint64());break;default:n.skipType(7&e)}}return o},fromJSON:e=>({publicKey:_(e.publicKey)?s.Any.fromJSON(e.publicKey):void 0,data:_(e.data)?t.SignatureDescriptor_Data.fromJSON(e.data):void 0,sequence:_(e.sequence)?String(e.sequence):"0"}),toJSON(e){let r={};return void 0!==e.publicKey&&(r.publicKey=e.publicKey?s.Any.toJSON(e.publicKey):void 0),void 0!==e.data&&(r.data=e.data?t.SignatureDescriptor_Data.toJSON(e.data):void 0),void 0!==e.sequence&&(r.sequence=e.sequence),r},fromPartial(e){var r;let n=p();return n.publicKey=void 0!==e.publicKey&&null!==e.publicKey?s.Any.fromPartial(e.publicKey):void 0,n.data=void 0!==e.data&&null!==e.data?t.SignatureDescriptor_Data.fromPartial(e.data):void 0,n.sequence=null!==(r=e.sequence)&&void 0!==r?r:"0",n}},t.SignatureDescriptor_Data={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();return void 0!==e.single&&t.SignatureDescriptor_Data_Single.encode(e.single,r.uint32(10).fork()).ldelim(),void 0!==e.multi&&t.SignatureDescriptor_Data_Multi.encode(e.multi,r.uint32(18).fork()).ldelim(),r},decode(e,r){let n=e instanceof a.default.Reader?e:new a.default.Reader(e),i=void 0===r?n.len:n.pos+r,o=f();for(;n.pos>>3){case 1:o.single=t.SignatureDescriptor_Data_Single.decode(n,n.uint32());break;case 2:o.multi=t.SignatureDescriptor_Data_Multi.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON:e=>({single:_(e.single)?t.SignatureDescriptor_Data_Single.fromJSON(e.single):void 0,multi:_(e.multi)?t.SignatureDescriptor_Data_Multi.fromJSON(e.multi):void 0}),toJSON(e){let r={};return void 0!==e.single&&(r.single=e.single?t.SignatureDescriptor_Data_Single.toJSON(e.single):void 0),void 0!==e.multi&&(r.multi=e.multi?t.SignatureDescriptor_Data_Multi.toJSON(e.multi):void 0),r},fromPartial(e){let r=f();return r.single=void 0!==e.single&&null!==e.single?t.SignatureDescriptor_Data_Single.fromPartial(e.single):void 0,r.multi=void 0!==e.multi&&null!==e.multi?t.SignatureDescriptor_Data_Multi.fromPartial(e.multi):void 0,r}},t.SignatureDescriptor_Data_Single={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();return 0!==e.mode&&t.uint32(8).int32(e.mode),0!==e.signature.length&&t.uint32(18).bytes(e.signature),t},decode(e,t){let r=e instanceof a.default.Reader?e:new a.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=h();for(;r.pos>>3){case 1:i.mode=r.int32();break;case 2:i.signature=r.bytes();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({mode:_(e.mode)?u(e.mode):0,signature:_(e.signature)?v(e.signature):new Uint8Array}),toJSON(e){let t={};return void 0!==e.mode&&(t.mode=d(e.mode)),void 0!==e.signature&&(t.signature=S(void 0!==e.signature?e.signature:new Uint8Array)),t},fromPartial(e){var t,r;let n=h();return n.mode=null!==(t=e.mode)&&void 0!==t?t:0,n.signature=null!==(r=e.signature)&&void 0!==r?r:new Uint8Array,n}},t.SignatureDescriptor_Data_Multi={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();for(let n of(void 0!==e.bitarray&&l.CompactBitArray.encode(e.bitarray,r.uint32(10).fork()).ldelim(),e.signatures))t.SignatureDescriptor_Data.encode(n,r.uint32(18).fork()).ldelim();return r},decode(e,r){let n=e instanceof a.default.Reader?e:new a.default.Reader(e),i=void 0===r?n.len:n.pos+r,o=g();for(;n.pos>>3){case 1:o.bitarray=l.CompactBitArray.decode(n,n.uint32());break;case 2:o.signatures.push(t.SignatureDescriptor_Data.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return o},fromJSON:e=>({bitarray:_(e.bitarray)?l.CompactBitArray.fromJSON(e.bitarray):void 0,signatures:Array.isArray(null==e?void 0:e.signatures)?e.signatures.map(e=>t.SignatureDescriptor_Data.fromJSON(e)):[]}),toJSON(e){let r={};return void 0!==e.bitarray&&(r.bitarray=e.bitarray?l.CompactBitArray.toJSON(e.bitarray):void 0),e.signatures?r.signatures=e.signatures.map(e=>e?t.SignatureDescriptor_Data.toJSON(e):void 0):r.signatures=[],r},fromPartial(e){var r;let n=g();return n.bitarray=void 0!==e.bitarray&&null!==e.bitarray?l.CompactBitArray.fromPartial(e.bitarray):void 0,n.signatures=(null===(r=e.signatures)||void 0===r?void 0:r.map(e=>t.SignatureDescriptor_Data.fromPartial(e)))||[],n}};var m=void 0!==m?m:"undefined"!=typeof self?self:window;let y=m.atob||(e=>m.Buffer.from(e,"base64").toString("binary"));function v(e){let t=y(e),r=new Uint8Array(t.length);for(let e=0;em.Buffer.from(e,"binary").toString("base64"));function S(e){let t=[];for(let r of e)t.push(String.fromCharCode(r));return b(t.join(""))}function w(e){return e.toString()}function _(e){return null!=e}a.default.util.Long!==o.default&&(a.default.util.Long=o.default,a.default.configure())},55618:function(e,t,r){"use strict";var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.AuxSignerData=t.Fee=t.ModeInfo_Multi=t.ModeInfo_Single=t.ModeInfo=t.SignerInfo=t.AuthInfo=t.TxBody=t.SignDocDirectAux=t.SignDoc=t.TxRaw=t.Tx=t.protobufPackage=void 0;let i=n(r(40059)),o=n(r(81667)),a=r(99402),s=r(28446),l=r(61097),u=r(80054);function d(){return{body:void 0,authInfo:void 0,signatures:[]}}function c(){return{bodyBytes:new Uint8Array,authInfoBytes:new Uint8Array,signatures:[]}}function p(){return{bodyBytes:new Uint8Array,authInfoBytes:new Uint8Array,chainId:"",accountNumber:"0"}}function f(){return{bodyBytes:new Uint8Array,publicKey:void 0,chainId:"",accountNumber:"0",sequence:"0"}}function h(){return{messages:[],memo:"",timeoutHeight:"0",extensionOptions:[],nonCriticalExtensionOptions:[]}}function g(){return{signerInfos:[],fee:void 0}}function m(){return{publicKey:void 0,modeInfo:void 0,sequence:"0"}}function y(){return{single:void 0,multi:void 0}}function v(){return{mode:0}}function b(){return{bitarray:void 0,modeInfos:[]}}function S(){return{amount:[],gasLimit:"0",payer:"",granter:""}}function w(){return{address:"",signDoc:void 0,mode:0,sig:new Uint8Array}}t.protobufPackage="cosmos.tx.v1beta1",t.Tx={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();for(let n of(void 0!==e.body&&t.TxBody.encode(e.body,r.uint32(10).fork()).ldelim(),void 0!==e.authInfo&&t.AuthInfo.encode(e.authInfo,r.uint32(18).fork()).ldelim(),e.signatures))r.uint32(26).bytes(n);return r},decode(e,r){let n=e instanceof o.default.Reader?e:new o.default.Reader(e),i=void 0===r?n.len:n.pos+r,a=d();for(;n.pos>>3){case 1:a.body=t.TxBody.decode(n,n.uint32());break;case 2:a.authInfo=t.AuthInfo.decode(n,n.uint32());break;case 3:a.signatures.push(n.bytes());break;default:n.skipType(7&e)}}return a},fromJSON:e=>({body:R(e.body)?t.TxBody.fromJSON(e.body):void 0,authInfo:R(e.authInfo)?t.AuthInfo.fromJSON(e.authInfo):void 0,signatures:Array.isArray(null==e?void 0:e.signatures)?e.signatures.map(e=>O(e)):[]}),toJSON(e){let r={};return void 0!==e.body&&(r.body=e.body?t.TxBody.toJSON(e.body):void 0),void 0!==e.authInfo&&(r.authInfo=e.authInfo?t.AuthInfo.toJSON(e.authInfo):void 0),e.signatures?r.signatures=e.signatures.map(e=>A(void 0!==e?e:new Uint8Array)):r.signatures=[],r},fromPartial(e){var r;let n=d();return n.body=void 0!==e.body&&null!==e.body?t.TxBody.fromPartial(e.body):void 0,n.authInfo=void 0!==e.authInfo&&null!==e.authInfo?t.AuthInfo.fromPartial(e.authInfo):void 0,n.signatures=(null===(r=e.signatures)||void 0===r?void 0:r.map(e=>e))||[],n}},t.TxRaw={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();for(let r of(0!==e.bodyBytes.length&&t.uint32(10).bytes(e.bodyBytes),0!==e.authInfoBytes.length&&t.uint32(18).bytes(e.authInfoBytes),e.signatures))t.uint32(26).bytes(r);return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=c();for(;r.pos>>3){case 1:i.bodyBytes=r.bytes();break;case 2:i.authInfoBytes=r.bytes();break;case 3:i.signatures.push(r.bytes());break;default:r.skipType(7&e)}}return i},fromJSON:e=>({bodyBytes:R(e.bodyBytes)?O(e.bodyBytes):new Uint8Array,authInfoBytes:R(e.authInfoBytes)?O(e.authInfoBytes):new Uint8Array,signatures:Array.isArray(null==e?void 0:e.signatures)?e.signatures.map(e=>O(e)):[]}),toJSON(e){let t={};return void 0!==e.bodyBytes&&(t.bodyBytes=A(void 0!==e.bodyBytes?e.bodyBytes:new Uint8Array)),void 0!==e.authInfoBytes&&(t.authInfoBytes=A(void 0!==e.authInfoBytes?e.authInfoBytes:new Uint8Array)),e.signatures?t.signatures=e.signatures.map(e=>A(void 0!==e?e:new Uint8Array)):t.signatures=[],t},fromPartial(e){var t,r,n;let i=c();return i.bodyBytes=null!==(t=e.bodyBytes)&&void 0!==t?t:new Uint8Array,i.authInfoBytes=null!==(r=e.authInfoBytes)&&void 0!==r?r:new Uint8Array,i.signatures=(null===(n=e.signatures)||void 0===n?void 0:n.map(e=>e))||[],i}},t.SignDoc={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return 0!==e.bodyBytes.length&&t.uint32(10).bytes(e.bodyBytes),0!==e.authInfoBytes.length&&t.uint32(18).bytes(e.authInfoBytes),""!==e.chainId&&t.uint32(26).string(e.chainId),"0"!==e.accountNumber&&t.uint32(32).uint64(e.accountNumber),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=p();for(;r.pos>>3){case 1:i.bodyBytes=r.bytes();break;case 2:i.authInfoBytes=r.bytes();break;case 3:i.chainId=r.string();break;case 4:i.accountNumber=I(r.uint64());break;default:r.skipType(7&e)}}return i},fromJSON:e=>({bodyBytes:R(e.bodyBytes)?O(e.bodyBytes):new Uint8Array,authInfoBytes:R(e.authInfoBytes)?O(e.authInfoBytes):new Uint8Array,chainId:R(e.chainId)?String(e.chainId):"",accountNumber:R(e.accountNumber)?String(e.accountNumber):"0"}),toJSON(e){let t={};return void 0!==e.bodyBytes&&(t.bodyBytes=A(void 0!==e.bodyBytes?e.bodyBytes:new Uint8Array)),void 0!==e.authInfoBytes&&(t.authInfoBytes=A(void 0!==e.authInfoBytes?e.authInfoBytes:new Uint8Array)),void 0!==e.chainId&&(t.chainId=e.chainId),void 0!==e.accountNumber&&(t.accountNumber=e.accountNumber),t},fromPartial(e){var t,r,n,i;let o=p();return o.bodyBytes=null!==(t=e.bodyBytes)&&void 0!==t?t:new Uint8Array,o.authInfoBytes=null!==(r=e.authInfoBytes)&&void 0!==r?r:new Uint8Array,o.chainId=null!==(n=e.chainId)&&void 0!==n?n:"",o.accountNumber=null!==(i=e.accountNumber)&&void 0!==i?i:"0",o}},t.SignDocDirectAux={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return 0!==e.bodyBytes.length&&t.uint32(10).bytes(e.bodyBytes),void 0!==e.publicKey&&s.Any.encode(e.publicKey,t.uint32(18).fork()).ldelim(),""!==e.chainId&&t.uint32(26).string(e.chainId),"0"!==e.accountNumber&&t.uint32(32).uint64(e.accountNumber),"0"!==e.sequence&&t.uint32(40).uint64(e.sequence),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=f();for(;r.pos>>3){case 1:i.bodyBytes=r.bytes();break;case 2:i.publicKey=s.Any.decode(r,r.uint32());break;case 3:i.chainId=r.string();break;case 4:i.accountNumber=I(r.uint64());break;case 5:i.sequence=I(r.uint64());break;default:r.skipType(7&e)}}return i},fromJSON:e=>({bodyBytes:R(e.bodyBytes)?O(e.bodyBytes):new Uint8Array,publicKey:R(e.publicKey)?s.Any.fromJSON(e.publicKey):void 0,chainId:R(e.chainId)?String(e.chainId):"",accountNumber:R(e.accountNumber)?String(e.accountNumber):"0",sequence:R(e.sequence)?String(e.sequence):"0"}),toJSON(e){let t={};return void 0!==e.bodyBytes&&(t.bodyBytes=A(void 0!==e.bodyBytes?e.bodyBytes:new Uint8Array)),void 0!==e.publicKey&&(t.publicKey=e.publicKey?s.Any.toJSON(e.publicKey):void 0),void 0!==e.chainId&&(t.chainId=e.chainId),void 0!==e.accountNumber&&(t.accountNumber=e.accountNumber),void 0!==e.sequence&&(t.sequence=e.sequence),t},fromPartial(e){var t,r,n,i;let o=f();return o.bodyBytes=null!==(t=e.bodyBytes)&&void 0!==t?t:new Uint8Array,o.publicKey=void 0!==e.publicKey&&null!==e.publicKey?s.Any.fromPartial(e.publicKey):void 0,o.chainId=null!==(r=e.chainId)&&void 0!==r?r:"",o.accountNumber=null!==(n=e.accountNumber)&&void 0!==n?n:"0",o.sequence=null!==(i=e.sequence)&&void 0!==i?i:"0",o}},t.TxBody={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();for(let r of e.messages)s.Any.encode(r,t.uint32(10).fork()).ldelim();for(let r of(""!==e.memo&&t.uint32(18).string(e.memo),"0"!==e.timeoutHeight&&t.uint32(24).uint64(e.timeoutHeight),e.extensionOptions))s.Any.encode(r,t.uint32(8186).fork()).ldelim();for(let r of e.nonCriticalExtensionOptions)s.Any.encode(r,t.uint32(16378).fork()).ldelim();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=h();for(;r.pos>>3){case 1:i.messages.push(s.Any.decode(r,r.uint32()));break;case 2:i.memo=r.string();break;case 3:i.timeoutHeight=I(r.uint64());break;case 1023:i.extensionOptions.push(s.Any.decode(r,r.uint32()));break;case 2047:i.nonCriticalExtensionOptions.push(s.Any.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return i},fromJSON:e=>({messages:Array.isArray(null==e?void 0:e.messages)?e.messages.map(e=>s.Any.fromJSON(e)):[],memo:R(e.memo)?String(e.memo):"",timeoutHeight:R(e.timeoutHeight)?String(e.timeoutHeight):"0",extensionOptions:Array.isArray(null==e?void 0:e.extensionOptions)?e.extensionOptions.map(e=>s.Any.fromJSON(e)):[],nonCriticalExtensionOptions:Array.isArray(null==e?void 0:e.nonCriticalExtensionOptions)?e.nonCriticalExtensionOptions.map(e=>s.Any.fromJSON(e)):[]}),toJSON(e){let t={};return e.messages?t.messages=e.messages.map(e=>e?s.Any.toJSON(e):void 0):t.messages=[],void 0!==e.memo&&(t.memo=e.memo),void 0!==e.timeoutHeight&&(t.timeoutHeight=e.timeoutHeight),e.extensionOptions?t.extensionOptions=e.extensionOptions.map(e=>e?s.Any.toJSON(e):void 0):t.extensionOptions=[],e.nonCriticalExtensionOptions?t.nonCriticalExtensionOptions=e.nonCriticalExtensionOptions.map(e=>e?s.Any.toJSON(e):void 0):t.nonCriticalExtensionOptions=[],t},fromPartial(e){var t,r,n,i,o;let a=h();return a.messages=(null===(t=e.messages)||void 0===t?void 0:t.map(e=>s.Any.fromPartial(e)))||[],a.memo=null!==(r=e.memo)&&void 0!==r?r:"",a.timeoutHeight=null!==(n=e.timeoutHeight)&&void 0!==n?n:"0",a.extensionOptions=(null===(i=e.extensionOptions)||void 0===i?void 0:i.map(e=>s.Any.fromPartial(e)))||[],a.nonCriticalExtensionOptions=(null===(o=e.nonCriticalExtensionOptions)||void 0===o?void 0:o.map(e=>s.Any.fromPartial(e)))||[],a}},t.AuthInfo={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();for(let n of e.signerInfos)t.SignerInfo.encode(n,r.uint32(10).fork()).ldelim();return void 0!==e.fee&&t.Fee.encode(e.fee,r.uint32(18).fork()).ldelim(),r},decode(e,r){let n=e instanceof o.default.Reader?e:new o.default.Reader(e),i=void 0===r?n.len:n.pos+r,a=g();for(;n.pos>>3){case 1:a.signerInfos.push(t.SignerInfo.decode(n,n.uint32()));break;case 2:a.fee=t.Fee.decode(n,n.uint32());break;default:n.skipType(7&e)}}return a},fromJSON:e=>({signerInfos:Array.isArray(null==e?void 0:e.signerInfos)?e.signerInfos.map(e=>t.SignerInfo.fromJSON(e)):[],fee:R(e.fee)?t.Fee.fromJSON(e.fee):void 0}),toJSON(e){let r={};return e.signerInfos?r.signerInfos=e.signerInfos.map(e=>e?t.SignerInfo.toJSON(e):void 0):r.signerInfos=[],void 0!==e.fee&&(r.fee=e.fee?t.Fee.toJSON(e.fee):void 0),r},fromPartial(e){var r;let n=g();return n.signerInfos=(null===(r=e.signerInfos)||void 0===r?void 0:r.map(e=>t.SignerInfo.fromPartial(e)))||[],n.fee=void 0!==e.fee&&null!==e.fee?t.Fee.fromPartial(e.fee):void 0,n}},t.SignerInfo={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return void 0!==e.publicKey&&s.Any.encode(e.publicKey,r.uint32(10).fork()).ldelim(),void 0!==e.modeInfo&&t.ModeInfo.encode(e.modeInfo,r.uint32(18).fork()).ldelim(),"0"!==e.sequence&&r.uint32(24).uint64(e.sequence),r},decode(e,r){let n=e instanceof o.default.Reader?e:new o.default.Reader(e),i=void 0===r?n.len:n.pos+r,a=m();for(;n.pos>>3){case 1:a.publicKey=s.Any.decode(n,n.uint32());break;case 2:a.modeInfo=t.ModeInfo.decode(n,n.uint32());break;case 3:a.sequence=I(n.uint64());break;default:n.skipType(7&e)}}return a},fromJSON:e=>({publicKey:R(e.publicKey)?s.Any.fromJSON(e.publicKey):void 0,modeInfo:R(e.modeInfo)?t.ModeInfo.fromJSON(e.modeInfo):void 0,sequence:R(e.sequence)?String(e.sequence):"0"}),toJSON(e){let r={};return void 0!==e.publicKey&&(r.publicKey=e.publicKey?s.Any.toJSON(e.publicKey):void 0),void 0!==e.modeInfo&&(r.modeInfo=e.modeInfo?t.ModeInfo.toJSON(e.modeInfo):void 0),void 0!==e.sequence&&(r.sequence=e.sequence),r},fromPartial(e){var r;let n=m();return n.publicKey=void 0!==e.publicKey&&null!==e.publicKey?s.Any.fromPartial(e.publicKey):void 0,n.modeInfo=void 0!==e.modeInfo&&null!==e.modeInfo?t.ModeInfo.fromPartial(e.modeInfo):void 0,n.sequence=null!==(r=e.sequence)&&void 0!==r?r:"0",n}},t.ModeInfo={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return void 0!==e.single&&t.ModeInfo_Single.encode(e.single,r.uint32(10).fork()).ldelim(),void 0!==e.multi&&t.ModeInfo_Multi.encode(e.multi,r.uint32(18).fork()).ldelim(),r},decode(e,r){let n=e instanceof o.default.Reader?e:new o.default.Reader(e),i=void 0===r?n.len:n.pos+r,a=y();for(;n.pos>>3){case 1:a.single=t.ModeInfo_Single.decode(n,n.uint32());break;case 2:a.multi=t.ModeInfo_Multi.decode(n,n.uint32());break;default:n.skipType(7&e)}}return a},fromJSON:e=>({single:R(e.single)?t.ModeInfo_Single.fromJSON(e.single):void 0,multi:R(e.multi)?t.ModeInfo_Multi.fromJSON(e.multi):void 0}),toJSON(e){let r={};return void 0!==e.single&&(r.single=e.single?t.ModeInfo_Single.toJSON(e.single):void 0),void 0!==e.multi&&(r.multi=e.multi?t.ModeInfo_Multi.toJSON(e.multi):void 0),r},fromPartial(e){let r=y();return r.single=void 0!==e.single&&null!==e.single?t.ModeInfo_Single.fromPartial(e.single):void 0,r.multi=void 0!==e.multi&&null!==e.multi?t.ModeInfo_Multi.fromPartial(e.multi):void 0,r}},t.ModeInfo_Single={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return 0!==e.mode&&t.uint32(8).int32(e.mode),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=v();for(;r.pos>>3==1?i.mode=r.int32():r.skipType(7&e)}return i},fromJSON:e=>({mode:R(e.mode)?(0,a.signModeFromJSON)(e.mode):0}),toJSON(e){let t={};return void 0!==e.mode&&(t.mode=(0,a.signModeToJSON)(e.mode)),t},fromPartial(e){var t;let r=v();return r.mode=null!==(t=e.mode)&&void 0!==t?t:0,r}},t.ModeInfo_Multi={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();for(let n of(void 0!==e.bitarray&&l.CompactBitArray.encode(e.bitarray,r.uint32(10).fork()).ldelim(),e.modeInfos))t.ModeInfo.encode(n,r.uint32(18).fork()).ldelim();return r},decode(e,r){let n=e instanceof o.default.Reader?e:new o.default.Reader(e),i=void 0===r?n.len:n.pos+r,a=b();for(;n.pos>>3){case 1:a.bitarray=l.CompactBitArray.decode(n,n.uint32());break;case 2:a.modeInfos.push(t.ModeInfo.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return a},fromJSON:e=>({bitarray:R(e.bitarray)?l.CompactBitArray.fromJSON(e.bitarray):void 0,modeInfos:Array.isArray(null==e?void 0:e.modeInfos)?e.modeInfos.map(e=>t.ModeInfo.fromJSON(e)):[]}),toJSON(e){let r={};return void 0!==e.bitarray&&(r.bitarray=e.bitarray?l.CompactBitArray.toJSON(e.bitarray):void 0),e.modeInfos?r.modeInfos=e.modeInfos.map(e=>e?t.ModeInfo.toJSON(e):void 0):r.modeInfos=[],r},fromPartial(e){var r;let n=b();return n.bitarray=void 0!==e.bitarray&&null!==e.bitarray?l.CompactBitArray.fromPartial(e.bitarray):void 0,n.modeInfos=(null===(r=e.modeInfos)||void 0===r?void 0:r.map(e=>t.ModeInfo.fromPartial(e)))||[],n}},t.Fee={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();for(let r of e.amount)u.Coin.encode(r,t.uint32(10).fork()).ldelim();return"0"!==e.gasLimit&&t.uint32(16).uint64(e.gasLimit),""!==e.payer&&t.uint32(26).string(e.payer),""!==e.granter&&t.uint32(34).string(e.granter),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=S();for(;r.pos>>3){case 1:i.amount.push(u.Coin.decode(r,r.uint32()));break;case 2:i.gasLimit=I(r.uint64());break;case 3:i.payer=r.string();break;case 4:i.granter=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({amount:Array.isArray(null==e?void 0:e.amount)?e.amount.map(e=>u.Coin.fromJSON(e)):[],gasLimit:R(e.gasLimit)?String(e.gasLimit):"0",payer:R(e.payer)?String(e.payer):"",granter:R(e.granter)?String(e.granter):""}),toJSON(e){let t={};return e.amount?t.amount=e.amount.map(e=>e?u.Coin.toJSON(e):void 0):t.amount=[],void 0!==e.gasLimit&&(t.gasLimit=e.gasLimit),void 0!==e.payer&&(t.payer=e.payer),void 0!==e.granter&&(t.granter=e.granter),t},fromPartial(e){var t,r,n,i;let o=S();return o.amount=(null===(t=e.amount)||void 0===t?void 0:t.map(e=>u.Coin.fromPartial(e)))||[],o.gasLimit=null!==(r=e.gasLimit)&&void 0!==r?r:"0",o.payer=null!==(n=e.payer)&&void 0!==n?n:"",o.granter=null!==(i=e.granter)&&void 0!==i?i:"",o}},t.AuxSignerData={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.address&&r.uint32(10).string(e.address),void 0!==e.signDoc&&t.SignDocDirectAux.encode(e.signDoc,r.uint32(18).fork()).ldelim(),0!==e.mode&&r.uint32(24).int32(e.mode),0!==e.sig.length&&r.uint32(34).bytes(e.sig),r},decode(e,r){let n=e instanceof o.default.Reader?e:new o.default.Reader(e),i=void 0===r?n.len:n.pos+r,a=w();for(;n.pos>>3){case 1:a.address=n.string();break;case 2:a.signDoc=t.SignDocDirectAux.decode(n,n.uint32());break;case 3:a.mode=n.int32();break;case 4:a.sig=n.bytes();break;default:n.skipType(7&e)}}return a},fromJSON:e=>({address:R(e.address)?String(e.address):"",signDoc:R(e.signDoc)?t.SignDocDirectAux.fromJSON(e.signDoc):void 0,mode:R(e.mode)?(0,a.signModeFromJSON)(e.mode):0,sig:R(e.sig)?O(e.sig):new Uint8Array}),toJSON(e){let r={};return void 0!==e.address&&(r.address=e.address),void 0!==e.signDoc&&(r.signDoc=e.signDoc?t.SignDocDirectAux.toJSON(e.signDoc):void 0),void 0!==e.mode&&(r.mode=(0,a.signModeToJSON)(e.mode)),void 0!==e.sig&&(r.sig=A(void 0!==e.sig?e.sig:new Uint8Array)),r},fromPartial(e){var r,n,i;let o=w();return o.address=null!==(r=e.address)&&void 0!==r?r:"",o.signDoc=void 0!==e.signDoc&&null!==e.signDoc?t.SignDocDirectAux.fromPartial(e.signDoc):void 0,o.mode=null!==(n=e.mode)&&void 0!==n?n:0,o.sig=null!==(i=e.sig)&&void 0!==i?i:new Uint8Array,o}};var _=void 0!==_?_:"undefined"!=typeof self?self:window;let k=_.atob||(e=>_.Buffer.from(e,"base64").toString("binary"));function O(e){let t=k(e),r=new Uint8Array(t.length);for(let e=0;e_.Buffer.from(e,"binary").toString("base64"));function A(e){let t=[];for(let r of e)t.push(String.fromCharCode(r));return P(t.join(""))}function I(e){return e.toString()}function R(e){return null!=e}o.default.util.Long!==i.default&&(o.default.util.Long=i.default,o.default.configure())},94464:function(e,t,r){"use strict";var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ModuleVersion=t.CancelSoftwareUpgradeProposal=t.SoftwareUpgradeProposal=t.Plan=t.protobufPackage=void 0;let i=n(r(40059)),o=n(r(81667)),a=r(90338),s=r(28446);function l(){return{name:"",time:void 0,height:"0",info:"",upgradedClientState:void 0}}function u(){return{title:"",description:"",plan:void 0}}function d(){return{title:"",description:""}}function c(){return{name:"",version:"0"}}function p(e){return{seconds:Math.trunc(e.getTime()/1e3).toString(),nanos:e.getTime()%1e3*1e6}}function f(e){let t=1e3*Number(e.seconds);return new Date(t+=e.nanos/1e6)}function h(e){return e instanceof Date?e:"string"==typeof e?new Date(e):f(a.Timestamp.fromJSON(e))}function g(e){return e.toString()}function m(e){return null!=e}t.protobufPackage="cosmos.upgrade.v1beta1",t.Plan={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.name&&t.uint32(10).string(e.name),void 0!==e.time&&a.Timestamp.encode(p(e.time),t.uint32(18).fork()).ldelim(),"0"!==e.height&&t.uint32(24).int64(e.height),""!==e.info&&t.uint32(34).string(e.info),void 0!==e.upgradedClientState&&s.Any.encode(e.upgradedClientState,t.uint32(42).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=l();for(;r.pos>>3){case 1:i.name=r.string();break;case 2:i.time=f(a.Timestamp.decode(r,r.uint32()));break;case 3:i.height=g(r.int64());break;case 4:i.info=r.string();break;case 5:i.upgradedClientState=s.Any.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON:e=>({name:m(e.name)?String(e.name):"",time:m(e.time)?h(e.time):void 0,height:m(e.height)?String(e.height):"0",info:m(e.info)?String(e.info):"",upgradedClientState:m(e.upgradedClientState)?s.Any.fromJSON(e.upgradedClientState):void 0}),toJSON(e){let t={};return void 0!==e.name&&(t.name=e.name),void 0!==e.time&&(t.time=e.time.toISOString()),void 0!==e.height&&(t.height=e.height),void 0!==e.info&&(t.info=e.info),void 0!==e.upgradedClientState&&(t.upgradedClientState=e.upgradedClientState?s.Any.toJSON(e.upgradedClientState):void 0),t},fromPartial(e){var t,r,n,i;let o=l();return o.name=null!==(t=e.name)&&void 0!==t?t:"",o.time=null!==(r=e.time)&&void 0!==r?r:void 0,o.height=null!==(n=e.height)&&void 0!==n?n:"0",o.info=null!==(i=e.info)&&void 0!==i?i:"",o.upgradedClientState=void 0!==e.upgradedClientState&&null!==e.upgradedClientState?s.Any.fromPartial(e.upgradedClientState):void 0,o}},t.SoftwareUpgradeProposal={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.title&&r.uint32(10).string(e.title),""!==e.description&&r.uint32(18).string(e.description),void 0!==e.plan&&t.Plan.encode(e.plan,r.uint32(26).fork()).ldelim(),r},decode(e,r){let n=e instanceof o.default.Reader?e:new o.default.Reader(e),i=void 0===r?n.len:n.pos+r,a=u();for(;n.pos>>3){case 1:a.title=n.string();break;case 2:a.description=n.string();break;case 3:a.plan=t.Plan.decode(n,n.uint32());break;default:n.skipType(7&e)}}return a},fromJSON:e=>({title:m(e.title)?String(e.title):"",description:m(e.description)?String(e.description):"",plan:m(e.plan)?t.Plan.fromJSON(e.plan):void 0}),toJSON(e){let r={};return void 0!==e.title&&(r.title=e.title),void 0!==e.description&&(r.description=e.description),void 0!==e.plan&&(r.plan=e.plan?t.Plan.toJSON(e.plan):void 0),r},fromPartial(e){var r,n;let i=u();return i.title=null!==(r=e.title)&&void 0!==r?r:"",i.description=null!==(n=e.description)&&void 0!==n?n:"",i.plan=void 0!==e.plan&&null!==e.plan?t.Plan.fromPartial(e.plan):void 0,i}},t.CancelSoftwareUpgradeProposal={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.title&&t.uint32(10).string(e.title),""!==e.description&&t.uint32(18).string(e.description),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=d();for(;r.pos>>3){case 1:i.title=r.string();break;case 2:i.description=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({title:m(e.title)?String(e.title):"",description:m(e.description)?String(e.description):""}),toJSON(e){let t={};return void 0!==e.title&&(t.title=e.title),void 0!==e.description&&(t.description=e.description),t},fromPartial(e){var t,r;let n=d();return n.title=null!==(t=e.title)&&void 0!==t?t:"",n.description=null!==(r=e.description)&&void 0!==r?r:"",n}},t.ModuleVersion={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.name&&t.uint32(10).string(e.name),"0"!==e.version&&t.uint32(16).uint64(e.version),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=c();for(;r.pos>>3){case 1:i.name=r.string();break;case 2:i.version=g(r.uint64());break;default:r.skipType(7&e)}}return i},fromJSON:e=>({name:m(e.name)?String(e.name):"",version:m(e.version)?String(e.version):"0"}),toJSON(e){let t={};return void 0!==e.name&&(t.name=e.name),void 0!==e.version&&(t.version=e.version),t},fromPartial(e){var t,r;let n=c();return n.name=null!==(t=e.name)&&void 0!==t?t:"",n.version=null!==(r=e.version)&&void 0!==r?r:"0",n}},o.default.util.Long!==i.default&&(o.default.util.Long=i.default,o.default.configure())},77398:function(e,t,r){"use strict";var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MsgClearAdminResponse=t.MsgClearAdmin=t.MsgUpdateAdminResponse=t.MsgUpdateAdmin=t.MsgMigrateContractResponse=t.MsgMigrateContract=t.MsgExecuteContractResponse=t.MsgExecuteContract=t.MsgInstantiateContractResponse=t.MsgInstantiateContract=t.MsgStoreCodeResponse=t.MsgStoreCode=t.protobufPackage=void 0;let i=n(r(40059)),o=n(r(81667)),a=r(40747),s=r(80054);function l(){return{sender:"",wasmByteCode:new Uint8Array,instantiatePermission:void 0}}function u(){return{codeId:"0"}}function d(){return{sender:"",admin:"",codeId:"0",label:"",msg:new Uint8Array,funds:[]}}function c(){return{address:"",data:new Uint8Array}}function p(){return{sender:"",contract:"",msg:new Uint8Array,funds:[]}}function f(){return{data:new Uint8Array}}function h(){return{sender:"",contract:"",codeId:"0",msg:new Uint8Array}}function g(){return{data:new Uint8Array}}function m(){return{sender:"",newAdmin:"",contract:""}}function y(){return{}}function v(){return{sender:"",contract:""}}function b(){return{}}t.protobufPackage="cosmwasm.wasm.v1",t.MsgStoreCode={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.sender&&t.uint32(10).string(e.sender),0!==e.wasmByteCode.length&&t.uint32(18).bytes(e.wasmByteCode),void 0!==e.instantiatePermission&&a.AccessConfig.encode(e.instantiatePermission,t.uint32(42).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=l();for(;r.pos>>3){case 1:i.sender=r.string();break;case 2:i.wasmByteCode=r.bytes();break;case 5:i.instantiatePermission=a.AccessConfig.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON:e=>({sender:A(e.sender)?String(e.sender):"",wasmByteCode:A(e.wasmByteCode)?_(e.wasmByteCode):new Uint8Array,instantiatePermission:A(e.instantiatePermission)?a.AccessConfig.fromJSON(e.instantiatePermission):void 0}),toJSON(e){let t={};return void 0!==e.sender&&(t.sender=e.sender),void 0!==e.wasmByteCode&&(t.wasmByteCode=O(void 0!==e.wasmByteCode?e.wasmByteCode:new Uint8Array)),void 0!==e.instantiatePermission&&(t.instantiatePermission=e.instantiatePermission?a.AccessConfig.toJSON(e.instantiatePermission):void 0),t},fromPartial(e){var t,r;let n=l();return n.sender=null!==(t=e.sender)&&void 0!==t?t:"",n.wasmByteCode=null!==(r=e.wasmByteCode)&&void 0!==r?r:new Uint8Array,n.instantiatePermission=void 0!==e.instantiatePermission&&null!==e.instantiatePermission?a.AccessConfig.fromPartial(e.instantiatePermission):void 0,n}},t.MsgStoreCodeResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return"0"!==e.codeId&&t.uint32(8).uint64(e.codeId),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=u();for(;r.pos>>3==1?i.codeId=P(r.uint64()):r.skipType(7&e)}return i},fromJSON:e=>({codeId:A(e.codeId)?String(e.codeId):"0"}),toJSON(e){let t={};return void 0!==e.codeId&&(t.codeId=e.codeId),t},fromPartial(e){var t;let r=u();return r.codeId=null!==(t=e.codeId)&&void 0!==t?t:"0",r}},t.MsgInstantiateContract={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();for(let r of(""!==e.sender&&t.uint32(10).string(e.sender),""!==e.admin&&t.uint32(18).string(e.admin),"0"!==e.codeId&&t.uint32(24).uint64(e.codeId),""!==e.label&&t.uint32(34).string(e.label),0!==e.msg.length&&t.uint32(42).bytes(e.msg),e.funds))s.Coin.encode(r,t.uint32(50).fork()).ldelim();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=d();for(;r.pos>>3){case 1:i.sender=r.string();break;case 2:i.admin=r.string();break;case 3:i.codeId=P(r.uint64());break;case 4:i.label=r.string();break;case 5:i.msg=r.bytes();break;case 6:i.funds.push(s.Coin.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return i},fromJSON:e=>({sender:A(e.sender)?String(e.sender):"",admin:A(e.admin)?String(e.admin):"",codeId:A(e.codeId)?String(e.codeId):"0",label:A(e.label)?String(e.label):"",msg:A(e.msg)?_(e.msg):new Uint8Array,funds:Array.isArray(null==e?void 0:e.funds)?e.funds.map(e=>s.Coin.fromJSON(e)):[]}),toJSON(e){let t={};return void 0!==e.sender&&(t.sender=e.sender),void 0!==e.admin&&(t.admin=e.admin),void 0!==e.codeId&&(t.codeId=e.codeId),void 0!==e.label&&(t.label=e.label),void 0!==e.msg&&(t.msg=O(void 0!==e.msg?e.msg:new Uint8Array)),e.funds?t.funds=e.funds.map(e=>e?s.Coin.toJSON(e):void 0):t.funds=[],t},fromPartial(e){var t,r,n,i,o,a;let l=d();return l.sender=null!==(t=e.sender)&&void 0!==t?t:"",l.admin=null!==(r=e.admin)&&void 0!==r?r:"",l.codeId=null!==(n=e.codeId)&&void 0!==n?n:"0",l.label=null!==(i=e.label)&&void 0!==i?i:"",l.msg=null!==(o=e.msg)&&void 0!==o?o:new Uint8Array,l.funds=(null===(a=e.funds)||void 0===a?void 0:a.map(e=>s.Coin.fromPartial(e)))||[],l}},t.MsgInstantiateContractResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.address&&t.uint32(10).string(e.address),0!==e.data.length&&t.uint32(18).bytes(e.data),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=c();for(;r.pos>>3){case 1:i.address=r.string();break;case 2:i.data=r.bytes();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({address:A(e.address)?String(e.address):"",data:A(e.data)?_(e.data):new Uint8Array}),toJSON(e){let t={};return void 0!==e.address&&(t.address=e.address),void 0!==e.data&&(t.data=O(void 0!==e.data?e.data:new Uint8Array)),t},fromPartial(e){var t,r;let n=c();return n.address=null!==(t=e.address)&&void 0!==t?t:"",n.data=null!==(r=e.data)&&void 0!==r?r:new Uint8Array,n}},t.MsgExecuteContract={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();for(let r of(""!==e.sender&&t.uint32(10).string(e.sender),""!==e.contract&&t.uint32(18).string(e.contract),0!==e.msg.length&&t.uint32(26).bytes(e.msg),e.funds))s.Coin.encode(r,t.uint32(42).fork()).ldelim();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=p();for(;r.pos>>3){case 1:i.sender=r.string();break;case 2:i.contract=r.string();break;case 3:i.msg=r.bytes();break;case 5:i.funds.push(s.Coin.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return i},fromJSON:e=>({sender:A(e.sender)?String(e.sender):"",contract:A(e.contract)?String(e.contract):"",msg:A(e.msg)?_(e.msg):new Uint8Array,funds:Array.isArray(null==e?void 0:e.funds)?e.funds.map(e=>s.Coin.fromJSON(e)):[]}),toJSON(e){let t={};return void 0!==e.sender&&(t.sender=e.sender),void 0!==e.contract&&(t.contract=e.contract),void 0!==e.msg&&(t.msg=O(void 0!==e.msg?e.msg:new Uint8Array)),e.funds?t.funds=e.funds.map(e=>e?s.Coin.toJSON(e):void 0):t.funds=[],t},fromPartial(e){var t,r,n,i;let o=p();return o.sender=null!==(t=e.sender)&&void 0!==t?t:"",o.contract=null!==(r=e.contract)&&void 0!==r?r:"",o.msg=null!==(n=e.msg)&&void 0!==n?n:new Uint8Array,o.funds=(null===(i=e.funds)||void 0===i?void 0:i.map(e=>s.Coin.fromPartial(e)))||[],o}},t.MsgExecuteContractResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return 0!==e.data.length&&t.uint32(10).bytes(e.data),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=f();for(;r.pos>>3==1?i.data=r.bytes():r.skipType(7&e)}return i},fromJSON:e=>({data:A(e.data)?_(e.data):new Uint8Array}),toJSON(e){let t={};return void 0!==e.data&&(t.data=O(void 0!==e.data?e.data:new Uint8Array)),t},fromPartial(e){var t;let r=f();return r.data=null!==(t=e.data)&&void 0!==t?t:new Uint8Array,r}},t.MsgMigrateContract={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.sender&&t.uint32(10).string(e.sender),""!==e.contract&&t.uint32(18).string(e.contract),"0"!==e.codeId&&t.uint32(24).uint64(e.codeId),0!==e.msg.length&&t.uint32(34).bytes(e.msg),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=h();for(;r.pos>>3){case 1:i.sender=r.string();break;case 2:i.contract=r.string();break;case 3:i.codeId=P(r.uint64());break;case 4:i.msg=r.bytes();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({sender:A(e.sender)?String(e.sender):"",contract:A(e.contract)?String(e.contract):"",codeId:A(e.codeId)?String(e.codeId):"0",msg:A(e.msg)?_(e.msg):new Uint8Array}),toJSON(e){let t={};return void 0!==e.sender&&(t.sender=e.sender),void 0!==e.contract&&(t.contract=e.contract),void 0!==e.codeId&&(t.codeId=e.codeId),void 0!==e.msg&&(t.msg=O(void 0!==e.msg?e.msg:new Uint8Array)),t},fromPartial(e){var t,r,n,i;let o=h();return o.sender=null!==(t=e.sender)&&void 0!==t?t:"",o.contract=null!==(r=e.contract)&&void 0!==r?r:"",o.codeId=null!==(n=e.codeId)&&void 0!==n?n:"0",o.msg=null!==(i=e.msg)&&void 0!==i?i:new Uint8Array,o}},t.MsgMigrateContractResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return 0!==e.data.length&&t.uint32(10).bytes(e.data),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=g();for(;r.pos>>3==1?i.data=r.bytes():r.skipType(7&e)}return i},fromJSON:e=>({data:A(e.data)?_(e.data):new Uint8Array}),toJSON(e){let t={};return void 0!==e.data&&(t.data=O(void 0!==e.data?e.data:new Uint8Array)),t},fromPartial(e){var t;let r=g();return r.data=null!==(t=e.data)&&void 0!==t?t:new Uint8Array,r}},t.MsgUpdateAdmin={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.sender&&t.uint32(10).string(e.sender),""!==e.newAdmin&&t.uint32(18).string(e.newAdmin),""!==e.contract&&t.uint32(26).string(e.contract),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=m();for(;r.pos>>3){case 1:i.sender=r.string();break;case 2:i.newAdmin=r.string();break;case 3:i.contract=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({sender:A(e.sender)?String(e.sender):"",newAdmin:A(e.newAdmin)?String(e.newAdmin):"",contract:A(e.contract)?String(e.contract):""}),toJSON(e){let t={};return void 0!==e.sender&&(t.sender=e.sender),void 0!==e.newAdmin&&(t.newAdmin=e.newAdmin),void 0!==e.contract&&(t.contract=e.contract),t},fromPartial(e){var t,r,n;let i=m();return i.sender=null!==(t=e.sender)&&void 0!==t?t:"",i.newAdmin=null!==(r=e.newAdmin)&&void 0!==r?r:"",i.contract=null!==(n=e.contract)&&void 0!==n?n:"",i}},t.MsgUpdateAdminResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=y();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>y()},t.MsgClearAdmin={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.sender&&t.uint32(10).string(e.sender),""!==e.contract&&t.uint32(26).string(e.contract),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=v();for(;r.pos>>3){case 1:i.sender=r.string();break;case 3:i.contract=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({sender:A(e.sender)?String(e.sender):"",contract:A(e.contract)?String(e.contract):""}),toJSON(e){let t={};return void 0!==e.sender&&(t.sender=e.sender),void 0!==e.contract&&(t.contract=e.contract),t},fromPartial(e){var t,r;let n=v();return n.sender=null!==(t=e.sender)&&void 0!==t?t:"",n.contract=null!==(r=e.contract)&&void 0!==r?r:"",n}},t.MsgClearAdminResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=b();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>b()};var S=void 0!==S?S:"undefined"!=typeof self?self:window;let w=S.atob||(e=>S.Buffer.from(e,"base64").toString("binary"));function _(e){let t=w(e),r=new Uint8Array(t.length);for(let e=0;eS.Buffer.from(e,"binary").toString("base64"));function O(e){let t=[];for(let r of e)t.push(String.fromCharCode(r));return k(t.join(""))}function P(e){return e.toString()}function A(e){return null!=e}o.default.util.Long!==i.default&&(o.default.util.Long=i.default,o.default.configure())},40747:function(e,t,r){"use strict";var n,i,o=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Model=t.AbsoluteTxPosition=t.ContractCodeHistoryEntry=t.ContractInfo=t.CodeInfo=t.Params=t.AccessConfig=t.AccessTypeParam=t.contractCodeHistoryOperationTypeToJSON=t.contractCodeHistoryOperationTypeFromJSON=t.ContractCodeHistoryOperationType=t.accessTypeToJSON=t.accessTypeFromJSON=t.AccessType=t.protobufPackage=void 0;let a=o(r(40059)),s=o(r(81667)),l=r(28446);function u(e){switch(e){case 0:case"ACCESS_TYPE_UNSPECIFIED":return n.ACCESS_TYPE_UNSPECIFIED;case 1:case"ACCESS_TYPE_NOBODY":return n.ACCESS_TYPE_NOBODY;case 2:case"ACCESS_TYPE_ONLY_ADDRESS":return n.ACCESS_TYPE_ONLY_ADDRESS;case 3:case"ACCESS_TYPE_EVERYBODY":return n.ACCESS_TYPE_EVERYBODY;default:return n.UNRECOGNIZED}}function d(e){switch(e){case n.ACCESS_TYPE_UNSPECIFIED:return"ACCESS_TYPE_UNSPECIFIED";case n.ACCESS_TYPE_NOBODY:return"ACCESS_TYPE_NOBODY";case n.ACCESS_TYPE_ONLY_ADDRESS:return"ACCESS_TYPE_ONLY_ADDRESS";case n.ACCESS_TYPE_EVERYBODY:return"ACCESS_TYPE_EVERYBODY";default:return"UNKNOWN"}}function c(e){switch(e){case 0:case"CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED":return i.CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED;case 1:case"CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT":return i.CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT;case 2:case"CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE":return i.CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE;case 3:case"CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS":return i.CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS;default:return i.UNRECOGNIZED}}function p(e){switch(e){case i.CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED:return"CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED";case i.CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT:return"CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT";case i.CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE:return"CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE";case i.CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS:return"CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS";default:return"UNKNOWN"}}function f(){return{value:0}}function h(){return{permission:0,address:""}}function g(){return{codeUploadAccess:void 0,instantiateDefaultPermission:0,maxWasmCodeSize:"0"}}function m(){return{codeHash:new Uint8Array,creator:"",instantiateConfig:void 0}}function y(){return{codeId:"0",creator:"",admin:"",label:"",created:void 0,ibcPortId:"",extension:void 0}}function v(){return{operation:0,codeId:"0",updated:void 0,msg:new Uint8Array}}function b(){return{blockHeight:"0",txIndex:"0"}}function S(){return{key:new Uint8Array,value:new Uint8Array}}t.protobufPackage="cosmwasm.wasm.v1",function(e){e[e.ACCESS_TYPE_UNSPECIFIED=0]="ACCESS_TYPE_UNSPECIFIED",e[e.ACCESS_TYPE_NOBODY=1]="ACCESS_TYPE_NOBODY",e[e.ACCESS_TYPE_ONLY_ADDRESS=2]="ACCESS_TYPE_ONLY_ADDRESS",e[e.ACCESS_TYPE_EVERYBODY=3]="ACCESS_TYPE_EVERYBODY",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(n=t.AccessType||(t.AccessType={})),t.accessTypeFromJSON=u,t.accessTypeToJSON=d,function(e){e[e.CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED=0]="CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED",e[e.CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT=1]="CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT",e[e.CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE=2]="CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE",e[e.CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS=3]="CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(i=t.ContractCodeHistoryOperationType||(t.ContractCodeHistoryOperationType={})),t.contractCodeHistoryOperationTypeFromJSON=c,t.contractCodeHistoryOperationTypeToJSON=p,t.AccessTypeParam={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return 0!==e.value&&t.uint32(8).int32(e.value),t},decode(e,t){let r=e instanceof s.default.Reader?e:new s.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=f();for(;r.pos>>3==1?i.value=r.int32():r.skipType(7&e)}return i},fromJSON:e=>({value:I(e.value)?u(e.value):0}),toJSON(e){let t={};return void 0!==e.value&&(t.value=d(e.value)),t},fromPartial(e){var t;let r=f();return r.value=null!==(t=e.value)&&void 0!==t?t:0,r}},t.AccessConfig={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return 0!==e.permission&&t.uint32(8).int32(e.permission),""!==e.address&&t.uint32(18).string(e.address),t},decode(e,t){let r=e instanceof s.default.Reader?e:new s.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=h();for(;r.pos>>3){case 1:i.permission=r.int32();break;case 2:i.address=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({permission:I(e.permission)?u(e.permission):0,address:I(e.address)?String(e.address):""}),toJSON(e){let t={};return void 0!==e.permission&&(t.permission=d(e.permission)),void 0!==e.address&&(t.address=e.address),t},fromPartial(e){var t,r;let n=h();return n.permission=null!==(t=e.permission)&&void 0!==t?t:0,n.address=null!==(r=e.address)&&void 0!==r?r:"",n}},t.Params={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return void 0!==e.codeUploadAccess&&t.AccessConfig.encode(e.codeUploadAccess,r.uint32(10).fork()).ldelim(),0!==e.instantiateDefaultPermission&&r.uint32(16).int32(e.instantiateDefaultPermission),"0"!==e.maxWasmCodeSize&&r.uint32(24).uint64(e.maxWasmCodeSize),r},decode(e,r){let n=e instanceof s.default.Reader?e:new s.default.Reader(e),i=void 0===r?n.len:n.pos+r,o=g();for(;n.pos>>3){case 1:o.codeUploadAccess=t.AccessConfig.decode(n,n.uint32());break;case 2:o.instantiateDefaultPermission=n.int32();break;case 3:o.maxWasmCodeSize=A(n.uint64());break;default:n.skipType(7&e)}}return o},fromJSON:e=>({codeUploadAccess:I(e.codeUploadAccess)?t.AccessConfig.fromJSON(e.codeUploadAccess):void 0,instantiateDefaultPermission:I(e.instantiateDefaultPermission)?u(e.instantiateDefaultPermission):0,maxWasmCodeSize:I(e.maxWasmCodeSize)?String(e.maxWasmCodeSize):"0"}),toJSON(e){let r={};return void 0!==e.codeUploadAccess&&(r.codeUploadAccess=e.codeUploadAccess?t.AccessConfig.toJSON(e.codeUploadAccess):void 0),void 0!==e.instantiateDefaultPermission&&(r.instantiateDefaultPermission=d(e.instantiateDefaultPermission)),void 0!==e.maxWasmCodeSize&&(r.maxWasmCodeSize=e.maxWasmCodeSize),r},fromPartial(e){var r,n;let i=g();return i.codeUploadAccess=void 0!==e.codeUploadAccess&&null!==e.codeUploadAccess?t.AccessConfig.fromPartial(e.codeUploadAccess):void 0,i.instantiateDefaultPermission=null!==(r=e.instantiateDefaultPermission)&&void 0!==r?r:0,i.maxWasmCodeSize=null!==(n=e.maxWasmCodeSize)&&void 0!==n?n:"0",i}},t.CodeInfo={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return 0!==e.codeHash.length&&r.uint32(10).bytes(e.codeHash),""!==e.creator&&r.uint32(18).string(e.creator),void 0!==e.instantiateConfig&&t.AccessConfig.encode(e.instantiateConfig,r.uint32(42).fork()).ldelim(),r},decode(e,r){let n=e instanceof s.default.Reader?e:new s.default.Reader(e),i=void 0===r?n.len:n.pos+r,o=m();for(;n.pos>>3){case 1:o.codeHash=n.bytes();break;case 2:o.creator=n.string();break;case 5:o.instantiateConfig=t.AccessConfig.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON:e=>({codeHash:I(e.codeHash)?k(e.codeHash):new Uint8Array,creator:I(e.creator)?String(e.creator):"",instantiateConfig:I(e.instantiateConfig)?t.AccessConfig.fromJSON(e.instantiateConfig):void 0}),toJSON(e){let r={};return void 0!==e.codeHash&&(r.codeHash=P(void 0!==e.codeHash?e.codeHash:new Uint8Array)),void 0!==e.creator&&(r.creator=e.creator),void 0!==e.instantiateConfig&&(r.instantiateConfig=e.instantiateConfig?t.AccessConfig.toJSON(e.instantiateConfig):void 0),r},fromPartial(e){var r,n;let i=m();return i.codeHash=null!==(r=e.codeHash)&&void 0!==r?r:new Uint8Array,i.creator=null!==(n=e.creator)&&void 0!==n?n:"",i.instantiateConfig=void 0!==e.instantiateConfig&&null!==e.instantiateConfig?t.AccessConfig.fromPartial(e.instantiateConfig):void 0,i}},t.ContractInfo={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return"0"!==e.codeId&&r.uint32(8).uint64(e.codeId),""!==e.creator&&r.uint32(18).string(e.creator),""!==e.admin&&r.uint32(26).string(e.admin),""!==e.label&&r.uint32(34).string(e.label),void 0!==e.created&&t.AbsoluteTxPosition.encode(e.created,r.uint32(42).fork()).ldelim(),""!==e.ibcPortId&&r.uint32(50).string(e.ibcPortId),void 0!==e.extension&&l.Any.encode(e.extension,r.uint32(58).fork()).ldelim(),r},decode(e,r){let n=e instanceof s.default.Reader?e:new s.default.Reader(e),i=void 0===r?n.len:n.pos+r,o=y();for(;n.pos>>3){case 1:o.codeId=A(n.uint64());break;case 2:o.creator=n.string();break;case 3:o.admin=n.string();break;case 4:o.label=n.string();break;case 5:o.created=t.AbsoluteTxPosition.decode(n,n.uint32());break;case 6:o.ibcPortId=n.string();break;case 7:o.extension=l.Any.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON:e=>({codeId:I(e.codeId)?String(e.codeId):"0",creator:I(e.creator)?String(e.creator):"",admin:I(e.admin)?String(e.admin):"",label:I(e.label)?String(e.label):"",created:I(e.created)?t.AbsoluteTxPosition.fromJSON(e.created):void 0,ibcPortId:I(e.ibcPortId)?String(e.ibcPortId):"",extension:I(e.extension)?l.Any.fromJSON(e.extension):void 0}),toJSON(e){let r={};return void 0!==e.codeId&&(r.codeId=e.codeId),void 0!==e.creator&&(r.creator=e.creator),void 0!==e.admin&&(r.admin=e.admin),void 0!==e.label&&(r.label=e.label),void 0!==e.created&&(r.created=e.created?t.AbsoluteTxPosition.toJSON(e.created):void 0),void 0!==e.ibcPortId&&(r.ibcPortId=e.ibcPortId),void 0!==e.extension&&(r.extension=e.extension?l.Any.toJSON(e.extension):void 0),r},fromPartial(e){var r,n,i,o,a;let s=y();return s.codeId=null!==(r=e.codeId)&&void 0!==r?r:"0",s.creator=null!==(n=e.creator)&&void 0!==n?n:"",s.admin=null!==(i=e.admin)&&void 0!==i?i:"",s.label=null!==(o=e.label)&&void 0!==o?o:"",s.created=void 0!==e.created&&null!==e.created?t.AbsoluteTxPosition.fromPartial(e.created):void 0,s.ibcPortId=null!==(a=e.ibcPortId)&&void 0!==a?a:"",s.extension=void 0!==e.extension&&null!==e.extension?l.Any.fromPartial(e.extension):void 0,s}},t.ContractCodeHistoryEntry={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return 0!==e.operation&&r.uint32(8).int32(e.operation),"0"!==e.codeId&&r.uint32(16).uint64(e.codeId),void 0!==e.updated&&t.AbsoluteTxPosition.encode(e.updated,r.uint32(26).fork()).ldelim(),0!==e.msg.length&&r.uint32(34).bytes(e.msg),r},decode(e,r){let n=e instanceof s.default.Reader?e:new s.default.Reader(e),i=void 0===r?n.len:n.pos+r,o=v();for(;n.pos>>3){case 1:o.operation=n.int32();break;case 2:o.codeId=A(n.uint64());break;case 3:o.updated=t.AbsoluteTxPosition.decode(n,n.uint32());break;case 4:o.msg=n.bytes();break;default:n.skipType(7&e)}}return o},fromJSON:e=>({operation:I(e.operation)?c(e.operation):0,codeId:I(e.codeId)?String(e.codeId):"0",updated:I(e.updated)?t.AbsoluteTxPosition.fromJSON(e.updated):void 0,msg:I(e.msg)?k(e.msg):new Uint8Array}),toJSON(e){let r={};return void 0!==e.operation&&(r.operation=p(e.operation)),void 0!==e.codeId&&(r.codeId=e.codeId),void 0!==e.updated&&(r.updated=e.updated?t.AbsoluteTxPosition.toJSON(e.updated):void 0),void 0!==e.msg&&(r.msg=P(void 0!==e.msg?e.msg:new Uint8Array)),r},fromPartial(e){var r,n,i;let o=v();return o.operation=null!==(r=e.operation)&&void 0!==r?r:0,o.codeId=null!==(n=e.codeId)&&void 0!==n?n:"0",o.updated=void 0!==e.updated&&null!==e.updated?t.AbsoluteTxPosition.fromPartial(e.updated):void 0,o.msg=null!==(i=e.msg)&&void 0!==i?i:new Uint8Array,o}},t.AbsoluteTxPosition={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return"0"!==e.blockHeight&&t.uint32(8).uint64(e.blockHeight),"0"!==e.txIndex&&t.uint32(16).uint64(e.txIndex),t},decode(e,t){let r=e instanceof s.default.Reader?e:new s.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=b();for(;r.pos>>3){case 1:i.blockHeight=A(r.uint64());break;case 2:i.txIndex=A(r.uint64());break;default:r.skipType(7&e)}}return i},fromJSON:e=>({blockHeight:I(e.blockHeight)?String(e.blockHeight):"0",txIndex:I(e.txIndex)?String(e.txIndex):"0"}),toJSON(e){let t={};return void 0!==e.blockHeight&&(t.blockHeight=e.blockHeight),void 0!==e.txIndex&&(t.txIndex=e.txIndex),t},fromPartial(e){var t,r;let n=b();return n.blockHeight=null!==(t=e.blockHeight)&&void 0!==t?t:"0",n.txIndex=null!==(r=e.txIndex)&&void 0!==r?r:"0",n}},t.Model={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return 0!==e.key.length&&t.uint32(10).bytes(e.key),0!==e.value.length&&t.uint32(18).bytes(e.value),t},decode(e,t){let r=e instanceof s.default.Reader?e:new s.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=S();for(;r.pos>>3){case 1:i.key=r.bytes();break;case 2:i.value=r.bytes();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({key:I(e.key)?k(e.key):new Uint8Array,value:I(e.value)?k(e.value):new Uint8Array}),toJSON(e){let t={};return void 0!==e.key&&(t.key=P(void 0!==e.key?e.key:new Uint8Array)),void 0!==e.value&&(t.value=P(void 0!==e.value?e.value:new Uint8Array)),t},fromPartial(e){var t,r;let n=S();return n.key=null!==(t=e.key)&&void 0!==t?t:new Uint8Array,n.value=null!==(r=e.value)&&void 0!==r?r:new Uint8Array,n}};var w=void 0!==w?w:"undefined"!=typeof self?self:window;let _=w.atob||(e=>w.Buffer.from(e,"base64").toString("binary"));function k(e){let t=_(e),r=new Uint8Array(t.length);for(let e=0;ew.Buffer.from(e,"binary").toString("base64"));function P(e){let t=[];for(let r of e)t.push(String.fromCharCode(r));return O(t.join(""))}function A(e){return e.toString()}function I(e){return null!=e}s.default.util.Long!==a.default&&(s.default.util.Long=a.default,s.default.configure())},28446:function(e,t,r){"use strict";var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Any=t.protobufPackage=void 0;let i=n(r(40059)),o=n(r(81667));function a(){return{typeUrl:"",value:new Uint8Array}}t.protobufPackage="google.protobuf",t.Any={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.typeUrl&&t.uint32(10).string(e.typeUrl),0!==e.value.length&&t.uint32(18).bytes(e.value),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=a();for(;r.pos>>3){case 1:i.typeUrl=r.string();break;case 2:i.value=r.bytes();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({typeUrl:p(e.typeUrl)?String(e.typeUrl):"",value:p(e.value)?u(e.value):new Uint8Array}),toJSON(e){let t={};return void 0!==e.typeUrl&&(t.typeUrl=e.typeUrl),void 0!==e.value&&(t.value=c(void 0!==e.value?e.value:new Uint8Array)),t},fromPartial(e){var t,r;let n=a();return n.typeUrl=null!==(t=e.typeUrl)&&void 0!==t?t:"",n.value=null!==(r=e.value)&&void 0!==r?r:new Uint8Array,n}};var s=void 0!==s?s:"undefined"!=typeof self?self:window;let l=s.atob||(e=>s.Buffer.from(e,"base64").toString("binary"));function u(e){let t=l(e),r=new Uint8Array(t.length);for(let e=0;es.Buffer.from(e,"binary").toString("base64"));function c(e){let t=[];for(let r of e)t.push(String.fromCharCode(r));return d(t.join(""))}function p(e){return null!=e}o.default.util.Long!==i.default&&(o.default.util.Long=i.default,o.default.configure())},81555:function(e,t,r){"use strict";var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Duration=t.protobufPackage=void 0;let i=n(r(40059)),o=n(r(81667));function a(){return{seconds:"0",nanos:0}}function s(e){return e.toString()}function l(e){return null!=e}t.protobufPackage="google.protobuf",t.Duration={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return"0"!==e.seconds&&t.uint32(8).int64(e.seconds),0!==e.nanos&&t.uint32(16).int32(e.nanos),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=a();for(;r.pos>>3){case 1:i.seconds=s(r.int64());break;case 2:i.nanos=r.int32();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({seconds:l(e.seconds)?String(e.seconds):"0",nanos:l(e.nanos)?Number(e.nanos):0}),toJSON(e){let t={};return void 0!==e.seconds&&(t.seconds=e.seconds),void 0!==e.nanos&&(t.nanos=Math.round(e.nanos)),t},fromPartial(e){var t,r;let n=a();return n.seconds=null!==(t=e.seconds)&&void 0!==t?t:"0",n.nanos=null!==(r=e.nanos)&&void 0!==r?r:0,n}},o.default.util.Long!==i.default&&(o.default.util.Long=i.default,o.default.configure())},90338:function(e,t,r){"use strict";var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Timestamp=t.protobufPackage=void 0;let i=n(r(40059)),o=n(r(81667));function a(){return{seconds:"0",nanos:0}}function s(e){return e.toString()}function l(e){return null!=e}t.protobufPackage="google.protobuf",t.Timestamp={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return"0"!==e.seconds&&t.uint32(8).int64(e.seconds),0!==e.nanos&&t.uint32(16).int32(e.nanos),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=a();for(;r.pos>>3){case 1:i.seconds=s(r.int64());break;case 2:i.nanos=r.int32();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({seconds:l(e.seconds)?String(e.seconds):"0",nanos:l(e.nanos)?Number(e.nanos):0}),toJSON(e){let t={};return void 0!==e.seconds&&(t.seconds=e.seconds),void 0!==e.nanos&&(t.nanos=Math.round(e.nanos)),t},fromPartial(e){var t,r;let n=a();return n.seconds=null!==(t=e.seconds)&&void 0!==t?t:"0",n.nanos=null!==(r=e.nanos)&&void 0!==r?r:0,n}},o.default.util.Long!==i.default&&(o.default.util.Long=i.default,o.default.configure())},22772:function(e,t,r){"use strict";var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.IdentifiedPacketFees=t.PacketFees=t.PacketFee=t.Fee=t.protobufPackage=void 0;let i=n(r(40059)),o=n(r(81667)),a=r(80054),s=r(75794);function l(){return{recvFee:[],ackFee:[],timeoutFee:[]}}function u(){return{fee:void 0,refundAddress:"",relayers:[]}}function d(){return{packetFees:[]}}function c(){return{packetId:void 0,packetFees:[]}}function p(e){return null!=e}t.protobufPackage="ibc.applications.fee.v1",t.Fee={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();for(let r of e.recvFee)a.Coin.encode(r,t.uint32(10).fork()).ldelim();for(let r of e.ackFee)a.Coin.encode(r,t.uint32(18).fork()).ldelim();for(let r of e.timeoutFee)a.Coin.encode(r,t.uint32(26).fork()).ldelim();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=l();for(;r.pos>>3){case 1:i.recvFee.push(a.Coin.decode(r,r.uint32()));break;case 2:i.ackFee.push(a.Coin.decode(r,r.uint32()));break;case 3:i.timeoutFee.push(a.Coin.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return i},fromJSON:e=>({recvFee:Array.isArray(null==e?void 0:e.recvFee)?e.recvFee.map(e=>a.Coin.fromJSON(e)):[],ackFee:Array.isArray(null==e?void 0:e.ackFee)?e.ackFee.map(e=>a.Coin.fromJSON(e)):[],timeoutFee:Array.isArray(null==e?void 0:e.timeoutFee)?e.timeoutFee.map(e=>a.Coin.fromJSON(e)):[]}),toJSON(e){let t={};return e.recvFee?t.recvFee=e.recvFee.map(e=>e?a.Coin.toJSON(e):void 0):t.recvFee=[],e.ackFee?t.ackFee=e.ackFee.map(e=>e?a.Coin.toJSON(e):void 0):t.ackFee=[],e.timeoutFee?t.timeoutFee=e.timeoutFee.map(e=>e?a.Coin.toJSON(e):void 0):t.timeoutFee=[],t},fromPartial(e){var t,r,n;let i=l();return i.recvFee=(null===(t=e.recvFee)||void 0===t?void 0:t.map(e=>a.Coin.fromPartial(e)))||[],i.ackFee=(null===(r=e.ackFee)||void 0===r?void 0:r.map(e=>a.Coin.fromPartial(e)))||[],i.timeoutFee=(null===(n=e.timeoutFee)||void 0===n?void 0:n.map(e=>a.Coin.fromPartial(e)))||[],i}},t.PacketFee={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();for(let n of(void 0!==e.fee&&t.Fee.encode(e.fee,r.uint32(10).fork()).ldelim(),""!==e.refundAddress&&r.uint32(18).string(e.refundAddress),e.relayers))r.uint32(26).string(n);return r},decode(e,r){let n=e instanceof o.default.Reader?e:new o.default.Reader(e),i=void 0===r?n.len:n.pos+r,a=u();for(;n.pos>>3){case 1:a.fee=t.Fee.decode(n,n.uint32());break;case 2:a.refundAddress=n.string();break;case 3:a.relayers.push(n.string());break;default:n.skipType(7&e)}}return a},fromJSON:e=>({fee:p(e.fee)?t.Fee.fromJSON(e.fee):void 0,refundAddress:p(e.refundAddress)?String(e.refundAddress):"",relayers:Array.isArray(null==e?void 0:e.relayers)?e.relayers.map(e=>String(e)):[]}),toJSON(e){let r={};return void 0!==e.fee&&(r.fee=e.fee?t.Fee.toJSON(e.fee):void 0),void 0!==e.refundAddress&&(r.refundAddress=e.refundAddress),e.relayers?r.relayers=e.relayers.map(e=>e):r.relayers=[],r},fromPartial(e){var r,n;let i=u();return i.fee=void 0!==e.fee&&null!==e.fee?t.Fee.fromPartial(e.fee):void 0,i.refundAddress=null!==(r=e.refundAddress)&&void 0!==r?r:"",i.relayers=(null===(n=e.relayers)||void 0===n?void 0:n.map(e=>e))||[],i}},t.PacketFees={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();for(let n of e.packetFees)t.PacketFee.encode(n,r.uint32(10).fork()).ldelim();return r},decode(e,r){let n=e instanceof o.default.Reader?e:new o.default.Reader(e),i=void 0===r?n.len:n.pos+r,a=d();for(;n.pos>>3==1?a.packetFees.push(t.PacketFee.decode(n,n.uint32())):n.skipType(7&e)}return a},fromJSON:e=>({packetFees:Array.isArray(null==e?void 0:e.packetFees)?e.packetFees.map(e=>t.PacketFee.fromJSON(e)):[]}),toJSON(e){let r={};return e.packetFees?r.packetFees=e.packetFees.map(e=>e?t.PacketFee.toJSON(e):void 0):r.packetFees=[],r},fromPartial(e){var r;let n=d();return n.packetFees=(null===(r=e.packetFees)||void 0===r?void 0:r.map(e=>t.PacketFee.fromPartial(e)))||[],n}},t.IdentifiedPacketFees={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();for(let n of(void 0!==e.packetId&&s.PacketId.encode(e.packetId,r.uint32(10).fork()).ldelim(),e.packetFees))t.PacketFee.encode(n,r.uint32(18).fork()).ldelim();return r},decode(e,r){let n=e instanceof o.default.Reader?e:new o.default.Reader(e),i=void 0===r?n.len:n.pos+r,a=c();for(;n.pos>>3){case 1:a.packetId=s.PacketId.decode(n,n.uint32());break;case 2:a.packetFees.push(t.PacketFee.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return a},fromJSON:e=>({packetId:p(e.packetId)?s.PacketId.fromJSON(e.packetId):void 0,packetFees:Array.isArray(null==e?void 0:e.packetFees)?e.packetFees.map(e=>t.PacketFee.fromJSON(e)):[]}),toJSON(e){let r={};return void 0!==e.packetId&&(r.packetId=e.packetId?s.PacketId.toJSON(e.packetId):void 0),e.packetFees?r.packetFees=e.packetFees.map(e=>e?t.PacketFee.toJSON(e):void 0):r.packetFees=[],r},fromPartial(e){var r;let n=c();return n.packetId=void 0!==e.packetId&&null!==e.packetId?s.PacketId.fromPartial(e.packetId):void 0,n.packetFees=(null===(r=e.packetFees)||void 0===r?void 0:r.map(e=>t.PacketFee.fromPartial(e)))||[],n}},o.default.util.Long!==i.default&&(o.default.util.Long=i.default,o.default.configure())},28382:function(e,t,r){"use strict";var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MsgPayPacketFeeAsyncResponse=t.MsgPayPacketFeeAsync=t.MsgPayPacketFeeResponse=t.MsgPayPacketFee=t.MsgRegisterCounterpartyPayeeResponse=t.MsgRegisterCounterpartyPayee=t.MsgRegisterPayeeResponse=t.MsgRegisterPayee=t.protobufPackage=void 0;let i=n(r(40059)),o=n(r(81667)),a=r(22772),s=r(75794);function l(){return{portId:"",channelId:"",relayer:"",payee:""}}function u(){return{}}function d(){return{portId:"",channelId:"",relayer:"",counterpartyPayee:""}}function c(){return{}}function p(){return{fee:void 0,sourcePortId:"",sourceChannelId:"",signer:"",relayers:[]}}function f(){return{}}function h(){return{packetId:void 0,packetFee:void 0}}function g(){return{}}function m(e){return null!=e}t.protobufPackage="ibc.applications.fee.v1",t.MsgRegisterPayee={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.portId&&t.uint32(10).string(e.portId),""!==e.channelId&&t.uint32(18).string(e.channelId),""!==e.relayer&&t.uint32(26).string(e.relayer),""!==e.payee&&t.uint32(34).string(e.payee),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=l();for(;r.pos>>3){case 1:i.portId=r.string();break;case 2:i.channelId=r.string();break;case 3:i.relayer=r.string();break;case 4:i.payee=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({portId:m(e.portId)?String(e.portId):"",channelId:m(e.channelId)?String(e.channelId):"",relayer:m(e.relayer)?String(e.relayer):"",payee:m(e.payee)?String(e.payee):""}),toJSON(e){let t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.channelId&&(t.channelId=e.channelId),void 0!==e.relayer&&(t.relayer=e.relayer),void 0!==e.payee&&(t.payee=e.payee),t},fromPartial(e){var t,r,n,i;let o=l();return o.portId=null!==(t=e.portId)&&void 0!==t?t:"",o.channelId=null!==(r=e.channelId)&&void 0!==r?r:"",o.relayer=null!==(n=e.relayer)&&void 0!==n?n:"",o.payee=null!==(i=e.payee)&&void 0!==i?i:"",o}},t.MsgRegisterPayeeResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=u();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>u()},t.MsgRegisterCounterpartyPayee={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.portId&&t.uint32(10).string(e.portId),""!==e.channelId&&t.uint32(18).string(e.channelId),""!==e.relayer&&t.uint32(26).string(e.relayer),""!==e.counterpartyPayee&&t.uint32(34).string(e.counterpartyPayee),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=d();for(;r.pos>>3){case 1:i.portId=r.string();break;case 2:i.channelId=r.string();break;case 3:i.relayer=r.string();break;case 4:i.counterpartyPayee=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({portId:m(e.portId)?String(e.portId):"",channelId:m(e.channelId)?String(e.channelId):"",relayer:m(e.relayer)?String(e.relayer):"",counterpartyPayee:m(e.counterpartyPayee)?String(e.counterpartyPayee):""}),toJSON(e){let t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.channelId&&(t.channelId=e.channelId),void 0!==e.relayer&&(t.relayer=e.relayer),void 0!==e.counterpartyPayee&&(t.counterpartyPayee=e.counterpartyPayee),t},fromPartial(e){var t,r,n,i;let o=d();return o.portId=null!==(t=e.portId)&&void 0!==t?t:"",o.channelId=null!==(r=e.channelId)&&void 0!==r?r:"",o.relayer=null!==(n=e.relayer)&&void 0!==n?n:"",o.counterpartyPayee=null!==(i=e.counterpartyPayee)&&void 0!==i?i:"",o}},t.MsgRegisterCounterpartyPayeeResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=c();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>c()},t.MsgPayPacketFee={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();for(let r of(void 0!==e.fee&&a.Fee.encode(e.fee,t.uint32(10).fork()).ldelim(),""!==e.sourcePortId&&t.uint32(18).string(e.sourcePortId),""!==e.sourceChannelId&&t.uint32(26).string(e.sourceChannelId),""!==e.signer&&t.uint32(34).string(e.signer),e.relayers))t.uint32(42).string(r);return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=p();for(;r.pos>>3){case 1:i.fee=a.Fee.decode(r,r.uint32());break;case 2:i.sourcePortId=r.string();break;case 3:i.sourceChannelId=r.string();break;case 4:i.signer=r.string();break;case 5:i.relayers.push(r.string());break;default:r.skipType(7&e)}}return i},fromJSON:e=>({fee:m(e.fee)?a.Fee.fromJSON(e.fee):void 0,sourcePortId:m(e.sourcePortId)?String(e.sourcePortId):"",sourceChannelId:m(e.sourceChannelId)?String(e.sourceChannelId):"",signer:m(e.signer)?String(e.signer):"",relayers:Array.isArray(null==e?void 0:e.relayers)?e.relayers.map(e=>String(e)):[]}),toJSON(e){let t={};return void 0!==e.fee&&(t.fee=e.fee?a.Fee.toJSON(e.fee):void 0),void 0!==e.sourcePortId&&(t.sourcePortId=e.sourcePortId),void 0!==e.sourceChannelId&&(t.sourceChannelId=e.sourceChannelId),void 0!==e.signer&&(t.signer=e.signer),e.relayers?t.relayers=e.relayers.map(e=>e):t.relayers=[],t},fromPartial(e){var t,r,n,i;let o=p();return o.fee=void 0!==e.fee&&null!==e.fee?a.Fee.fromPartial(e.fee):void 0,o.sourcePortId=null!==(t=e.sourcePortId)&&void 0!==t?t:"",o.sourceChannelId=null!==(r=e.sourceChannelId)&&void 0!==r?r:"",o.signer=null!==(n=e.signer)&&void 0!==n?n:"",o.relayers=(null===(i=e.relayers)||void 0===i?void 0:i.map(e=>e))||[],o}},t.MsgPayPacketFeeResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=f();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>f()},t.MsgPayPacketFeeAsync={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return void 0!==e.packetId&&s.PacketId.encode(e.packetId,t.uint32(10).fork()).ldelim(),void 0!==e.packetFee&&a.PacketFee.encode(e.packetFee,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=h();for(;r.pos>>3){case 1:i.packetId=s.PacketId.decode(r,r.uint32());break;case 2:i.packetFee=a.PacketFee.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON:e=>({packetId:m(e.packetId)?s.PacketId.fromJSON(e.packetId):void 0,packetFee:m(e.packetFee)?a.PacketFee.fromJSON(e.packetFee):void 0}),toJSON(e){let t={};return void 0!==e.packetId&&(t.packetId=e.packetId?s.PacketId.toJSON(e.packetId):void 0),void 0!==e.packetFee&&(t.packetFee=e.packetFee?a.PacketFee.toJSON(e.packetFee):void 0),t},fromPartial(e){let t=h();return t.packetId=void 0!==e.packetId&&null!==e.packetId?s.PacketId.fromPartial(e.packetId):void 0,t.packetFee=void 0!==e.packetFee&&null!==e.packetFee?a.PacketFee.fromPartial(e.packetFee):void 0,t}},t.MsgPayPacketFeeAsyncResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=g();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>g()},o.default.util.Long!==i.default&&(o.default.util.Long=i.default,o.default.configure())},39383:function(e,t,r){"use strict";var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MsgTransferResponse=t.MsgTransfer=t.protobufPackage=void 0;let i=n(r(40059)),o=n(r(81667)),a=r(80054),s=r(85182);function l(){return{sourcePort:"",sourceChannel:"",token:void 0,sender:"",receiver:"",timeoutHeight:void 0,timeoutTimestamp:"0",memo:""}}function u(){return{}}function d(e){return e.toString()}function c(e){return null!=e}t.protobufPackage="ibc.applications.transfer.v1",t.MsgTransfer={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.sourcePort&&t.uint32(10).string(e.sourcePort),""!==e.sourceChannel&&t.uint32(18).string(e.sourceChannel),void 0!==e.token&&a.Coin.encode(e.token,t.uint32(26).fork()).ldelim(),""!==e.sender&&t.uint32(34).string(e.sender),""!==e.receiver&&t.uint32(42).string(e.receiver),void 0!==e.timeoutHeight&&s.Height.encode(e.timeoutHeight,t.uint32(50).fork()).ldelim(),"0"!==e.timeoutTimestamp&&t.uint32(56).uint64(e.timeoutTimestamp),""!==e.memo&&t.uint32(66).string(e.memo),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=l();for(;r.pos>>3){case 1:i.sourcePort=r.string();break;case 2:i.sourceChannel=r.string();break;case 3:i.token=a.Coin.decode(r,r.uint32());break;case 4:i.sender=r.string();break;case 5:i.receiver=r.string();break;case 6:i.timeoutHeight=s.Height.decode(r,r.uint32());break;case 7:i.timeoutTimestamp=d(r.uint64());break;case 8:i.memo=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({sourcePort:c(e.sourcePort)?String(e.sourcePort):"",sourceChannel:c(e.sourceChannel)?String(e.sourceChannel):"",token:c(e.token)?a.Coin.fromJSON(e.token):void 0,sender:c(e.sender)?String(e.sender):"",receiver:c(e.receiver)?String(e.receiver):"",timeoutHeight:c(e.timeoutHeight)?s.Height.fromJSON(e.timeoutHeight):void 0,timeoutTimestamp:c(e.timeoutTimestamp)?String(e.timeoutTimestamp):"0",memo:c(e.memo)?String(e.memo):""}),toJSON(e){let t={};return void 0!==e.sourcePort&&(t.sourcePort=e.sourcePort),void 0!==e.sourceChannel&&(t.sourceChannel=e.sourceChannel),void 0!==e.token&&(t.token=e.token?a.Coin.toJSON(e.token):void 0),void 0!==e.sender&&(t.sender=e.sender),void 0!==e.receiver&&(t.receiver=e.receiver),void 0!==e.timeoutHeight&&(t.timeoutHeight=e.timeoutHeight?s.Height.toJSON(e.timeoutHeight):void 0),void 0!==e.timeoutTimestamp&&(t.timeoutTimestamp=e.timeoutTimestamp),void 0!==e.memo&&(t.memo=e.memo),t},fromPartial(e){var t,r,n,i,o,u;let d=l();return d.sourcePort=null!==(t=e.sourcePort)&&void 0!==t?t:"",d.sourceChannel=null!==(r=e.sourceChannel)&&void 0!==r?r:"",d.token=void 0!==e.token&&null!==e.token?a.Coin.fromPartial(e.token):void 0,d.sender=null!==(n=e.sender)&&void 0!==n?n:"",d.receiver=null!==(i=e.receiver)&&void 0!==i?i:"",d.timeoutHeight=void 0!==e.timeoutHeight&&null!==e.timeoutHeight?s.Height.fromPartial(e.timeoutHeight):void 0,d.timeoutTimestamp=null!==(o=e.timeoutTimestamp)&&void 0!==o?o:"0",d.memo=null!==(u=e.memo)&&void 0!==u?u:"",d}},t.MsgTransferResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=u();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>u()},o.default.util.Long!==i.default&&(o.default.util.Long=i.default,o.default.configure())},75794:function(e,t,r){"use strict";var n,i,o=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Timeout=t.Acknowledgement=t.PacketId=t.PacketState=t.Packet=t.Counterparty=t.IdentifiedChannel=t.Channel=t.orderToJSON=t.orderFromJSON=t.Order=t.stateToJSON=t.stateFromJSON=t.State=t.protobufPackage=void 0;let a=o(r(40059)),s=o(r(81667)),l=r(85182);function u(e){switch(e){case 0:case"STATE_UNINITIALIZED_UNSPECIFIED":return n.STATE_UNINITIALIZED_UNSPECIFIED;case 1:case"STATE_INIT":return n.STATE_INIT;case 2:case"STATE_TRYOPEN":return n.STATE_TRYOPEN;case 3:case"STATE_OPEN":return n.STATE_OPEN;case 4:case"STATE_CLOSED":return n.STATE_CLOSED;default:return n.UNRECOGNIZED}}function d(e){switch(e){case n.STATE_UNINITIALIZED_UNSPECIFIED:return"STATE_UNINITIALIZED_UNSPECIFIED";case n.STATE_INIT:return"STATE_INIT";case n.STATE_TRYOPEN:return"STATE_TRYOPEN";case n.STATE_OPEN:return"STATE_OPEN";case n.STATE_CLOSED:return"STATE_CLOSED";default:return"UNKNOWN"}}function c(e){switch(e){case 0:case"ORDER_NONE_UNSPECIFIED":return i.ORDER_NONE_UNSPECIFIED;case 1:case"ORDER_UNORDERED":return i.ORDER_UNORDERED;case 2:case"ORDER_ORDERED":return i.ORDER_ORDERED;default:return i.UNRECOGNIZED}}function p(e){switch(e){case i.ORDER_NONE_UNSPECIFIED:return"ORDER_NONE_UNSPECIFIED";case i.ORDER_UNORDERED:return"ORDER_UNORDERED";case i.ORDER_ORDERED:return"ORDER_ORDERED";default:return"UNKNOWN"}}function f(){return{state:0,ordering:0,counterparty:void 0,connectionHops:[],version:""}}function h(){return{state:0,ordering:0,counterparty:void 0,connectionHops:[],version:"",portId:"",channelId:""}}function g(){return{portId:"",channelId:""}}function m(){return{sequence:"0",sourcePort:"",sourceChannel:"",destinationPort:"",destinationChannel:"",data:new Uint8Array,timeoutHeight:void 0,timeoutTimestamp:"0"}}function y(){return{portId:"",channelId:"",sequence:"0",data:new Uint8Array}}function v(){return{portId:"",channelId:"",sequence:"0"}}function b(){return{result:void 0,error:void 0}}function S(){return{height:void 0,timestamp:"0"}}t.protobufPackage="ibc.core.channel.v1",function(e){e[e.STATE_UNINITIALIZED_UNSPECIFIED=0]="STATE_UNINITIALIZED_UNSPECIFIED",e[e.STATE_INIT=1]="STATE_INIT",e[e.STATE_TRYOPEN=2]="STATE_TRYOPEN",e[e.STATE_OPEN=3]="STATE_OPEN",e[e.STATE_CLOSED=4]="STATE_CLOSED",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(n=t.State||(t.State={})),t.stateFromJSON=u,t.stateToJSON=d,function(e){e[e.ORDER_NONE_UNSPECIFIED=0]="ORDER_NONE_UNSPECIFIED",e[e.ORDER_UNORDERED=1]="ORDER_UNORDERED",e[e.ORDER_ORDERED=2]="ORDER_ORDERED",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(i=t.Order||(t.Order={})),t.orderFromJSON=c,t.orderToJSON=p,t.Channel={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();for(let n of(0!==e.state&&r.uint32(8).int32(e.state),0!==e.ordering&&r.uint32(16).int32(e.ordering),void 0!==e.counterparty&&t.Counterparty.encode(e.counterparty,r.uint32(26).fork()).ldelim(),e.connectionHops))r.uint32(34).string(n);return""!==e.version&&r.uint32(42).string(e.version),r},decode(e,r){let n=e instanceof s.default.Reader?e:new s.default.Reader(e),i=void 0===r?n.len:n.pos+r,o=f();for(;n.pos>>3){case 1:o.state=n.int32();break;case 2:o.ordering=n.int32();break;case 3:o.counterparty=t.Counterparty.decode(n,n.uint32());break;case 4:o.connectionHops.push(n.string());break;case 5:o.version=n.string();break;default:n.skipType(7&e)}}return o},fromJSON:e=>({state:I(e.state)?u(e.state):0,ordering:I(e.ordering)?c(e.ordering):0,counterparty:I(e.counterparty)?t.Counterparty.fromJSON(e.counterparty):void 0,connectionHops:Array.isArray(null==e?void 0:e.connectionHops)?e.connectionHops.map(e=>String(e)):[],version:I(e.version)?String(e.version):""}),toJSON(e){let r={};return void 0!==e.state&&(r.state=d(e.state)),void 0!==e.ordering&&(r.ordering=p(e.ordering)),void 0!==e.counterparty&&(r.counterparty=e.counterparty?t.Counterparty.toJSON(e.counterparty):void 0),e.connectionHops?r.connectionHops=e.connectionHops.map(e=>e):r.connectionHops=[],void 0!==e.version&&(r.version=e.version),r},fromPartial(e){var r,n,i,o;let a=f();return a.state=null!==(r=e.state)&&void 0!==r?r:0,a.ordering=null!==(n=e.ordering)&&void 0!==n?n:0,a.counterparty=void 0!==e.counterparty&&null!==e.counterparty?t.Counterparty.fromPartial(e.counterparty):void 0,a.connectionHops=(null===(i=e.connectionHops)||void 0===i?void 0:i.map(e=>e))||[],a.version=null!==(o=e.version)&&void 0!==o?o:"",a}},t.IdentifiedChannel={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();for(let n of(0!==e.state&&r.uint32(8).int32(e.state),0!==e.ordering&&r.uint32(16).int32(e.ordering),void 0!==e.counterparty&&t.Counterparty.encode(e.counterparty,r.uint32(26).fork()).ldelim(),e.connectionHops))r.uint32(34).string(n);return""!==e.version&&r.uint32(42).string(e.version),""!==e.portId&&r.uint32(50).string(e.portId),""!==e.channelId&&r.uint32(58).string(e.channelId),r},decode(e,r){let n=e instanceof s.default.Reader?e:new s.default.Reader(e),i=void 0===r?n.len:n.pos+r,o=h();for(;n.pos>>3){case 1:o.state=n.int32();break;case 2:o.ordering=n.int32();break;case 3:o.counterparty=t.Counterparty.decode(n,n.uint32());break;case 4:o.connectionHops.push(n.string());break;case 5:o.version=n.string();break;case 6:o.portId=n.string();break;case 7:o.channelId=n.string();break;default:n.skipType(7&e)}}return o},fromJSON:e=>({state:I(e.state)?u(e.state):0,ordering:I(e.ordering)?c(e.ordering):0,counterparty:I(e.counterparty)?t.Counterparty.fromJSON(e.counterparty):void 0,connectionHops:Array.isArray(null==e?void 0:e.connectionHops)?e.connectionHops.map(e=>String(e)):[],version:I(e.version)?String(e.version):"",portId:I(e.portId)?String(e.portId):"",channelId:I(e.channelId)?String(e.channelId):""}),toJSON(e){let r={};return void 0!==e.state&&(r.state=d(e.state)),void 0!==e.ordering&&(r.ordering=p(e.ordering)),void 0!==e.counterparty&&(r.counterparty=e.counterparty?t.Counterparty.toJSON(e.counterparty):void 0),e.connectionHops?r.connectionHops=e.connectionHops.map(e=>e):r.connectionHops=[],void 0!==e.version&&(r.version=e.version),void 0!==e.portId&&(r.portId=e.portId),void 0!==e.channelId&&(r.channelId=e.channelId),r},fromPartial(e){var r,n,i,o,a,s;let l=h();return l.state=null!==(r=e.state)&&void 0!==r?r:0,l.ordering=null!==(n=e.ordering)&&void 0!==n?n:0,l.counterparty=void 0!==e.counterparty&&null!==e.counterparty?t.Counterparty.fromPartial(e.counterparty):void 0,l.connectionHops=(null===(i=e.connectionHops)||void 0===i?void 0:i.map(e=>e))||[],l.version=null!==(o=e.version)&&void 0!==o?o:"",l.portId=null!==(a=e.portId)&&void 0!==a?a:"",l.channelId=null!==(s=e.channelId)&&void 0!==s?s:"",l}},t.Counterparty={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return""!==e.portId&&t.uint32(10).string(e.portId),""!==e.channelId&&t.uint32(18).string(e.channelId),t},decode(e,t){let r=e instanceof s.default.Reader?e:new s.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=g();for(;r.pos>>3){case 1:i.portId=r.string();break;case 2:i.channelId=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({portId:I(e.portId)?String(e.portId):"",channelId:I(e.channelId)?String(e.channelId):""}),toJSON(e){let t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.channelId&&(t.channelId=e.channelId),t},fromPartial(e){var t,r;let n=g();return n.portId=null!==(t=e.portId)&&void 0!==t?t:"",n.channelId=null!==(r=e.channelId)&&void 0!==r?r:"",n}},t.Packet={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return"0"!==e.sequence&&t.uint32(8).uint64(e.sequence),""!==e.sourcePort&&t.uint32(18).string(e.sourcePort),""!==e.sourceChannel&&t.uint32(26).string(e.sourceChannel),""!==e.destinationPort&&t.uint32(34).string(e.destinationPort),""!==e.destinationChannel&&t.uint32(42).string(e.destinationChannel),0!==e.data.length&&t.uint32(50).bytes(e.data),void 0!==e.timeoutHeight&&l.Height.encode(e.timeoutHeight,t.uint32(58).fork()).ldelim(),"0"!==e.timeoutTimestamp&&t.uint32(64).uint64(e.timeoutTimestamp),t},decode(e,t){let r=e instanceof s.default.Reader?e:new s.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=m();for(;r.pos>>3){case 1:i.sequence=A(r.uint64());break;case 2:i.sourcePort=r.string();break;case 3:i.sourceChannel=r.string();break;case 4:i.destinationPort=r.string();break;case 5:i.destinationChannel=r.string();break;case 6:i.data=r.bytes();break;case 7:i.timeoutHeight=l.Height.decode(r,r.uint32());break;case 8:i.timeoutTimestamp=A(r.uint64());break;default:r.skipType(7&e)}}return i},fromJSON:e=>({sequence:I(e.sequence)?String(e.sequence):"0",sourcePort:I(e.sourcePort)?String(e.sourcePort):"",sourceChannel:I(e.sourceChannel)?String(e.sourceChannel):"",destinationPort:I(e.destinationPort)?String(e.destinationPort):"",destinationChannel:I(e.destinationChannel)?String(e.destinationChannel):"",data:I(e.data)?k(e.data):new Uint8Array,timeoutHeight:I(e.timeoutHeight)?l.Height.fromJSON(e.timeoutHeight):void 0,timeoutTimestamp:I(e.timeoutTimestamp)?String(e.timeoutTimestamp):"0"}),toJSON(e){let t={};return void 0!==e.sequence&&(t.sequence=e.sequence),void 0!==e.sourcePort&&(t.sourcePort=e.sourcePort),void 0!==e.sourceChannel&&(t.sourceChannel=e.sourceChannel),void 0!==e.destinationPort&&(t.destinationPort=e.destinationPort),void 0!==e.destinationChannel&&(t.destinationChannel=e.destinationChannel),void 0!==e.data&&(t.data=P(void 0!==e.data?e.data:new Uint8Array)),void 0!==e.timeoutHeight&&(t.timeoutHeight=e.timeoutHeight?l.Height.toJSON(e.timeoutHeight):void 0),void 0!==e.timeoutTimestamp&&(t.timeoutTimestamp=e.timeoutTimestamp),t},fromPartial(e){var t,r,n,i,o,a,s;let u=m();return u.sequence=null!==(t=e.sequence)&&void 0!==t?t:"0",u.sourcePort=null!==(r=e.sourcePort)&&void 0!==r?r:"",u.sourceChannel=null!==(n=e.sourceChannel)&&void 0!==n?n:"",u.destinationPort=null!==(i=e.destinationPort)&&void 0!==i?i:"",u.destinationChannel=null!==(o=e.destinationChannel)&&void 0!==o?o:"",u.data=null!==(a=e.data)&&void 0!==a?a:new Uint8Array,u.timeoutHeight=void 0!==e.timeoutHeight&&null!==e.timeoutHeight?l.Height.fromPartial(e.timeoutHeight):void 0,u.timeoutTimestamp=null!==(s=e.timeoutTimestamp)&&void 0!==s?s:"0",u}},t.PacketState={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return""!==e.portId&&t.uint32(10).string(e.portId),""!==e.channelId&&t.uint32(18).string(e.channelId),"0"!==e.sequence&&t.uint32(24).uint64(e.sequence),0!==e.data.length&&t.uint32(34).bytes(e.data),t},decode(e,t){let r=e instanceof s.default.Reader?e:new s.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=y();for(;r.pos>>3){case 1:i.portId=r.string();break;case 2:i.channelId=r.string();break;case 3:i.sequence=A(r.uint64());break;case 4:i.data=r.bytes();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({portId:I(e.portId)?String(e.portId):"",channelId:I(e.channelId)?String(e.channelId):"",sequence:I(e.sequence)?String(e.sequence):"0",data:I(e.data)?k(e.data):new Uint8Array}),toJSON(e){let t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.channelId&&(t.channelId=e.channelId),void 0!==e.sequence&&(t.sequence=e.sequence),void 0!==e.data&&(t.data=P(void 0!==e.data?e.data:new Uint8Array)),t},fromPartial(e){var t,r,n,i;let o=y();return o.portId=null!==(t=e.portId)&&void 0!==t?t:"",o.channelId=null!==(r=e.channelId)&&void 0!==r?r:"",o.sequence=null!==(n=e.sequence)&&void 0!==n?n:"0",o.data=null!==(i=e.data)&&void 0!==i?i:new Uint8Array,o}},t.PacketId={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return""!==e.portId&&t.uint32(10).string(e.portId),""!==e.channelId&&t.uint32(18).string(e.channelId),"0"!==e.sequence&&t.uint32(24).uint64(e.sequence),t},decode(e,t){let r=e instanceof s.default.Reader?e:new s.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=v();for(;r.pos>>3){case 1:i.portId=r.string();break;case 2:i.channelId=r.string();break;case 3:i.sequence=A(r.uint64());break;default:r.skipType(7&e)}}return i},fromJSON:e=>({portId:I(e.portId)?String(e.portId):"",channelId:I(e.channelId)?String(e.channelId):"",sequence:I(e.sequence)?String(e.sequence):"0"}),toJSON(e){let t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.channelId&&(t.channelId=e.channelId),void 0!==e.sequence&&(t.sequence=e.sequence),t},fromPartial(e){var t,r,n;let i=v();return i.portId=null!==(t=e.portId)&&void 0!==t?t:"",i.channelId=null!==(r=e.channelId)&&void 0!==r?r:"",i.sequence=null!==(n=e.sequence)&&void 0!==n?n:"0",i}},t.Acknowledgement={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return void 0!==e.result&&t.uint32(170).bytes(e.result),void 0!==e.error&&t.uint32(178).string(e.error),t},decode(e,t){let r=e instanceof s.default.Reader?e:new s.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=b();for(;r.pos>>3){case 21:i.result=r.bytes();break;case 22:i.error=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({result:I(e.result)?k(e.result):void 0,error:I(e.error)?String(e.error):void 0}),toJSON(e){let t={};return void 0!==e.result&&(t.result=void 0!==e.result?P(e.result):void 0),void 0!==e.error&&(t.error=e.error),t},fromPartial(e){var t,r;let n=b();return n.result=null!==(t=e.result)&&void 0!==t?t:void 0,n.error=null!==(r=e.error)&&void 0!==r?r:void 0,n}},t.Timeout={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return void 0!==e.height&&l.Height.encode(e.height,t.uint32(10).fork()).ldelim(),"0"!==e.timestamp&&t.uint32(16).uint64(e.timestamp),t},decode(e,t){let r=e instanceof s.default.Reader?e:new s.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=S();for(;r.pos>>3){case 1:i.height=l.Height.decode(r,r.uint32());break;case 2:i.timestamp=A(r.uint64());break;default:r.skipType(7&e)}}return i},fromJSON:e=>({height:I(e.height)?l.Height.fromJSON(e.height):void 0,timestamp:I(e.timestamp)?String(e.timestamp):"0"}),toJSON(e){let t={};return void 0!==e.height&&(t.height=e.height?l.Height.toJSON(e.height):void 0),void 0!==e.timestamp&&(t.timestamp=e.timestamp),t},fromPartial(e){var t;let r=S();return r.height=void 0!==e.height&&null!==e.height?l.Height.fromPartial(e.height):void 0,r.timestamp=null!==(t=e.timestamp)&&void 0!==t?t:"0",r}};var w=void 0!==w?w:"undefined"!=typeof self?self:window;let _=w.atob||(e=>w.Buffer.from(e,"base64").toString("binary"));function k(e){let t=_(e),r=new Uint8Array(t.length);for(let e=0;ew.Buffer.from(e,"binary").toString("base64"));function P(e){let t=[];for(let r of e)t.push(String.fromCharCode(r));return O(t.join(""))}function A(e){return e.toString()}function I(e){return null!=e}s.default.util.Long!==a.default&&(s.default.util.Long=a.default,s.default.configure())},85182:function(e,t,r){"use strict";var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Params=t.Height=t.UpgradeProposal=t.ClientUpdateProposal=t.ClientConsensusStates=t.ConsensusStateWithHeight=t.IdentifiedClientState=t.protobufPackage=void 0;let i=n(r(40059)),o=n(r(81667)),a=r(28446),s=r(94464);function l(){return{clientId:"",clientState:void 0}}function u(){return{height:void 0,consensusState:void 0}}function d(){return{clientId:"",consensusStates:[]}}function c(){return{title:"",description:"",subjectClientId:"",substituteClientId:""}}function p(){return{title:"",description:"",plan:void 0,upgradedClientState:void 0}}function f(){return{revisionNumber:"0",revisionHeight:"0"}}function h(){return{allowedClients:[]}}function g(e){return e.toString()}function m(e){return null!=e}t.protobufPackage="ibc.core.client.v1",t.IdentifiedClientState={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.clientId&&t.uint32(10).string(e.clientId),void 0!==e.clientState&&a.Any.encode(e.clientState,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=l();for(;r.pos>>3){case 1:i.clientId=r.string();break;case 2:i.clientState=a.Any.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON:e=>({clientId:m(e.clientId)?String(e.clientId):"",clientState:m(e.clientState)?a.Any.fromJSON(e.clientState):void 0}),toJSON(e){let t={};return void 0!==e.clientId&&(t.clientId=e.clientId),void 0!==e.clientState&&(t.clientState=e.clientState?a.Any.toJSON(e.clientState):void 0),t},fromPartial(e){var t;let r=l();return r.clientId=null!==(t=e.clientId)&&void 0!==t?t:"",r.clientState=void 0!==e.clientState&&null!==e.clientState?a.Any.fromPartial(e.clientState):void 0,r}},t.ConsensusStateWithHeight={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return void 0!==e.height&&t.Height.encode(e.height,r.uint32(10).fork()).ldelim(),void 0!==e.consensusState&&a.Any.encode(e.consensusState,r.uint32(18).fork()).ldelim(),r},decode(e,r){let n=e instanceof o.default.Reader?e:new o.default.Reader(e),i=void 0===r?n.len:n.pos+r,s=u();for(;n.pos>>3){case 1:s.height=t.Height.decode(n,n.uint32());break;case 2:s.consensusState=a.Any.decode(n,n.uint32());break;default:n.skipType(7&e)}}return s},fromJSON:e=>({height:m(e.height)?t.Height.fromJSON(e.height):void 0,consensusState:m(e.consensusState)?a.Any.fromJSON(e.consensusState):void 0}),toJSON(e){let r={};return void 0!==e.height&&(r.height=e.height?t.Height.toJSON(e.height):void 0),void 0!==e.consensusState&&(r.consensusState=e.consensusState?a.Any.toJSON(e.consensusState):void 0),r},fromPartial(e){let r=u();return r.height=void 0!==e.height&&null!==e.height?t.Height.fromPartial(e.height):void 0,r.consensusState=void 0!==e.consensusState&&null!==e.consensusState?a.Any.fromPartial(e.consensusState):void 0,r}},t.ClientConsensusStates={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();for(let n of(""!==e.clientId&&r.uint32(10).string(e.clientId),e.consensusStates))t.ConsensusStateWithHeight.encode(n,r.uint32(18).fork()).ldelim();return r},decode(e,r){let n=e instanceof o.default.Reader?e:new o.default.Reader(e),i=void 0===r?n.len:n.pos+r,a=d();for(;n.pos>>3){case 1:a.clientId=n.string();break;case 2:a.consensusStates.push(t.ConsensusStateWithHeight.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return a},fromJSON:e=>({clientId:m(e.clientId)?String(e.clientId):"",consensusStates:Array.isArray(null==e?void 0:e.consensusStates)?e.consensusStates.map(e=>t.ConsensusStateWithHeight.fromJSON(e)):[]}),toJSON(e){let r={};return void 0!==e.clientId&&(r.clientId=e.clientId),e.consensusStates?r.consensusStates=e.consensusStates.map(e=>e?t.ConsensusStateWithHeight.toJSON(e):void 0):r.consensusStates=[],r},fromPartial(e){var r,n;let i=d();return i.clientId=null!==(r=e.clientId)&&void 0!==r?r:"",i.consensusStates=(null===(n=e.consensusStates)||void 0===n?void 0:n.map(e=>t.ConsensusStateWithHeight.fromPartial(e)))||[],i}},t.ClientUpdateProposal={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.title&&t.uint32(10).string(e.title),""!==e.description&&t.uint32(18).string(e.description),""!==e.subjectClientId&&t.uint32(26).string(e.subjectClientId),""!==e.substituteClientId&&t.uint32(34).string(e.substituteClientId),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=c();for(;r.pos>>3){case 1:i.title=r.string();break;case 2:i.description=r.string();break;case 3:i.subjectClientId=r.string();break;case 4:i.substituteClientId=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({title:m(e.title)?String(e.title):"",description:m(e.description)?String(e.description):"",subjectClientId:m(e.subjectClientId)?String(e.subjectClientId):"",substituteClientId:m(e.substituteClientId)?String(e.substituteClientId):""}),toJSON(e){let t={};return void 0!==e.title&&(t.title=e.title),void 0!==e.description&&(t.description=e.description),void 0!==e.subjectClientId&&(t.subjectClientId=e.subjectClientId),void 0!==e.substituteClientId&&(t.substituteClientId=e.substituteClientId),t},fromPartial(e){var t,r,n,i;let o=c();return o.title=null!==(t=e.title)&&void 0!==t?t:"",o.description=null!==(r=e.description)&&void 0!==r?r:"",o.subjectClientId=null!==(n=e.subjectClientId)&&void 0!==n?n:"",o.substituteClientId=null!==(i=e.substituteClientId)&&void 0!==i?i:"",o}},t.UpgradeProposal={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.title&&t.uint32(10).string(e.title),""!==e.description&&t.uint32(18).string(e.description),void 0!==e.plan&&s.Plan.encode(e.plan,t.uint32(26).fork()).ldelim(),void 0!==e.upgradedClientState&&a.Any.encode(e.upgradedClientState,t.uint32(34).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=p();for(;r.pos>>3){case 1:i.title=r.string();break;case 2:i.description=r.string();break;case 3:i.plan=s.Plan.decode(r,r.uint32());break;case 4:i.upgradedClientState=a.Any.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON:e=>({title:m(e.title)?String(e.title):"",description:m(e.description)?String(e.description):"",plan:m(e.plan)?s.Plan.fromJSON(e.plan):void 0,upgradedClientState:m(e.upgradedClientState)?a.Any.fromJSON(e.upgradedClientState):void 0}),toJSON(e){let t={};return void 0!==e.title&&(t.title=e.title),void 0!==e.description&&(t.description=e.description),void 0!==e.plan&&(t.plan=e.plan?s.Plan.toJSON(e.plan):void 0),void 0!==e.upgradedClientState&&(t.upgradedClientState=e.upgradedClientState?a.Any.toJSON(e.upgradedClientState):void 0),t},fromPartial(e){var t,r;let n=p();return n.title=null!==(t=e.title)&&void 0!==t?t:"",n.description=null!==(r=e.description)&&void 0!==r?r:"",n.plan=void 0!==e.plan&&null!==e.plan?s.Plan.fromPartial(e.plan):void 0,n.upgradedClientState=void 0!==e.upgradedClientState&&null!==e.upgradedClientState?a.Any.fromPartial(e.upgradedClientState):void 0,n}},t.Height={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return"0"!==e.revisionNumber&&t.uint32(8).uint64(e.revisionNumber),"0"!==e.revisionHeight&&t.uint32(16).uint64(e.revisionHeight),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=f();for(;r.pos>>3){case 1:i.revisionNumber=g(r.uint64());break;case 2:i.revisionHeight=g(r.uint64());break;default:r.skipType(7&e)}}return i},fromJSON:e=>({revisionNumber:m(e.revisionNumber)?String(e.revisionNumber):"0",revisionHeight:m(e.revisionHeight)?String(e.revisionHeight):"0"}),toJSON(e){let t={};return void 0!==e.revisionNumber&&(t.revisionNumber=e.revisionNumber),void 0!==e.revisionHeight&&(t.revisionHeight=e.revisionHeight),t},fromPartial(e){var t,r;let n=f();return n.revisionNumber=null!==(t=e.revisionNumber)&&void 0!==t?t:"0",n.revisionHeight=null!==(r=e.revisionHeight)&&void 0!==r?r:"0",n}},t.Params={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();for(let r of e.allowedClients)t.uint32(10).string(r);return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=h();for(;r.pos>>3==1?i.allowedClients.push(r.string()):r.skipType(7&e)}return i},fromJSON:e=>({allowedClients:Array.isArray(null==e?void 0:e.allowedClients)?e.allowedClients.map(e=>String(e)):[]}),toJSON(e){let t={};return e.allowedClients?t.allowedClients=e.allowedClients.map(e=>e):t.allowedClients=[],t},fromPartial(e){var t;let r=h();return r.allowedClients=(null===(t=e.allowedClients)||void 0===t?void 0:t.map(e=>e))||[],r}},o.default.util.Long!==i.default&&(o.default.util.Long=i.default,o.default.configure())},18811:function(e,t,r){"use strict";var n,i=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.iCAAccountTypeToJSON=t.iCAAccountTypeFromJSON=t.ICAAccountType=t.protobufPackage=void 0;let o=i(r(40059)),a=i(r(81667));function s(e){switch(e){case 0:case"DELEGATION":return n.DELEGATION;case 1:case"FEE":return n.FEE;case 2:case"WITHDRAWAL":return n.WITHDRAWAL;case 3:case"REDEMPTION":return n.REDEMPTION;default:return n.UNRECOGNIZED}}function l(e){switch(e){case n.DELEGATION:return"DELEGATION";case n.FEE:return"FEE";case n.WITHDRAWAL:return"WITHDRAWAL";case n.REDEMPTION:return"REDEMPTION";default:return"UNKNOWN"}}t.protobufPackage="stride.stakeibc",function(e){e[e.DELEGATION=0]="DELEGATION",e[e.FEE=1]="FEE",e[e.WITHDRAWAL=2]="WITHDRAWAL",e[e.REDEMPTION=3]="REDEMPTION",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(n=t.ICAAccountType||(t.ICAAccountType={})),t.iCAAccountTypeFromJSON=s,t.iCAAccountTypeToJSON=l,a.default.util.Long!==o.default&&(a.default.util.Long=o.default,a.default.configure())},97583:function(e,t,r){"use strict";var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MsgCalibrateDelegationResponse=t.MsgCalibrateDelegation=t.MsgUndelegateHostResponse=t.MsgUndelegateHost=t.MsgUpdateValidatorSharesExchRateResponse=t.MsgUpdateValidatorSharesExchRate=t.MsgRestoreInterchainAccountResponse=t.MsgRestoreInterchainAccount=t.MsgDeleteValidatorResponse=t.MsgDeleteValidator=t.MsgChangeValidatorWeightResponse=t.MsgChangeValidatorWeight=t.MsgAddValidatorsResponse=t.MsgAddValidators=t.MsgRebalanceValidatorsResponse=t.MsgRebalanceValidators=t.MsgClaimUndelegatedTokensResponse=t.MsgClaimUndelegatedTokens=t.MsgRegisterHostZoneResponse=t.MsgRegisterHostZone=t.MsgRedeemStakeResponse=t.MsgRedeemStake=t.MsgClearBalanceResponse=t.MsgClearBalance=t.MsgLSMLiquidStakeResponse=t.MsgLSMLiquidStake=t.MsgLiquidStakeResponse=t.MsgLiquidStake=t.MsgUpdateInnerRedemptionRateBoundsResponse=t.MsgUpdateInnerRedemptionRateBounds=t.protobufPackage=void 0;let i=n(r(40059)),o=n(r(81667)),a=r(18811),s=r(50980);function l(){return{creator:"",chainId:"",minInnerRedemptionRate:"",maxInnerRedemptionRate:""}}function u(){return{}}function d(){return{creator:"",amount:"",hostDenom:""}}function c(){return{}}function p(){return{creator:"",amount:"",lsmTokenIbcDenom:""}}function f(){return{transactionComplete:!1}}function h(){return{creator:"",chainId:"",amount:"",channel:""}}function g(){return{}}function m(){return{creator:"",amount:"",hostZone:"",receiver:""}}function y(){return{}}function v(){return{connectionId:"",bech32prefix:"",hostDenom:"",ibcDenom:"",creator:"",transferChannelId:"",unbondingPeriod:"0",minRedemptionRate:"",maxRedemptionRate:"",lsmLiquidStakeEnabled:!1}}function b(){return{}}function S(){return{creator:"",hostZoneId:"",epoch:"0",sender:""}}function w(){return{}}function _(){return{creator:"",hostZone:"",numRebalance:"0"}}function k(){return{}}function O(){return{creator:"",hostZone:"",validators:[]}}function P(){return{}}function A(){return{creator:"",hostZone:"",valAddr:"",weight:"0"}}function I(){return{}}function R(){return{creator:"",hostZone:"",valAddr:""}}function E(){return{}}function T(){return{creator:"",chainId:"",accountType:0}}function N(){return{}}function x(){return{creator:"",chainId:"",valoper:""}}function B(){return{}}function C(){return{creator:"",amount:""}}function M(){return{}}function D(){return{creator:"",chainId:"",valoper:""}}function U(){return{}}function J(e){return e.toString()}function j(e){return null!=e}t.protobufPackage="stride.stakeibc",t.MsgUpdateInnerRedemptionRateBounds={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.creator&&t.uint32(10).string(e.creator),""!==e.chainId&&t.uint32(18).string(e.chainId),""!==e.minInnerRedemptionRate&&t.uint32(26).string(e.minInnerRedemptionRate),""!==e.maxInnerRedemptionRate&&t.uint32(34).string(e.maxInnerRedemptionRate),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=l();for(;r.pos>>3){case 1:i.creator=r.string();break;case 2:i.chainId=r.string();break;case 3:i.minInnerRedemptionRate=r.string();break;case 4:i.maxInnerRedemptionRate=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({creator:j(e.creator)?String(e.creator):"",chainId:j(e.chainId)?String(e.chainId):"",minInnerRedemptionRate:j(e.minInnerRedemptionRate)?String(e.minInnerRedemptionRate):"",maxInnerRedemptionRate:j(e.maxInnerRedemptionRate)?String(e.maxInnerRedemptionRate):""}),toJSON(e){let t={};return void 0!==e.creator&&(t.creator=e.creator),void 0!==e.chainId&&(t.chainId=e.chainId),void 0!==e.minInnerRedemptionRate&&(t.minInnerRedemptionRate=e.minInnerRedemptionRate),void 0!==e.maxInnerRedemptionRate&&(t.maxInnerRedemptionRate=e.maxInnerRedemptionRate),t},fromPartial(e){var t,r,n,i;let o=l();return o.creator=null!==(t=e.creator)&&void 0!==t?t:"",o.chainId=null!==(r=e.chainId)&&void 0!==r?r:"",o.minInnerRedemptionRate=null!==(n=e.minInnerRedemptionRate)&&void 0!==n?n:"",o.maxInnerRedemptionRate=null!==(i=e.maxInnerRedemptionRate)&&void 0!==i?i:"",o}},t.MsgUpdateInnerRedemptionRateBoundsResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=u();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>u()},t.MsgLiquidStake={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.creator&&t.uint32(10).string(e.creator),""!==e.amount&&t.uint32(18).string(e.amount),""!==e.hostDenom&&t.uint32(26).string(e.hostDenom),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=d();for(;r.pos>>3){case 1:i.creator=r.string();break;case 2:i.amount=r.string();break;case 3:i.hostDenom=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({creator:j(e.creator)?String(e.creator):"",amount:j(e.amount)?String(e.amount):"",hostDenom:j(e.hostDenom)?String(e.hostDenom):""}),toJSON(e){let t={};return void 0!==e.creator&&(t.creator=e.creator),void 0!==e.amount&&(t.amount=e.amount),void 0!==e.hostDenom&&(t.hostDenom=e.hostDenom),t},fromPartial(e){var t,r,n;let i=d();return i.creator=null!==(t=e.creator)&&void 0!==t?t:"",i.amount=null!==(r=e.amount)&&void 0!==r?r:"",i.hostDenom=null!==(n=e.hostDenom)&&void 0!==n?n:"",i}},t.MsgLiquidStakeResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=c();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>c()},t.MsgLSMLiquidStake={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.creator&&t.uint32(10).string(e.creator),""!==e.amount&&t.uint32(18).string(e.amount),""!==e.lsmTokenIbcDenom&&t.uint32(26).string(e.lsmTokenIbcDenom),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=p();for(;r.pos>>3){case 1:i.creator=r.string();break;case 2:i.amount=r.string();break;case 3:i.lsmTokenIbcDenom=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({creator:j(e.creator)?String(e.creator):"",amount:j(e.amount)?String(e.amount):"",lsmTokenIbcDenom:j(e.lsmTokenIbcDenom)?String(e.lsmTokenIbcDenom):""}),toJSON(e){let t={};return void 0!==e.creator&&(t.creator=e.creator),void 0!==e.amount&&(t.amount=e.amount),void 0!==e.lsmTokenIbcDenom&&(t.lsmTokenIbcDenom=e.lsmTokenIbcDenom),t},fromPartial(e){var t,r,n;let i=p();return i.creator=null!==(t=e.creator)&&void 0!==t?t:"",i.amount=null!==(r=e.amount)&&void 0!==r?r:"",i.lsmTokenIbcDenom=null!==(n=e.lsmTokenIbcDenom)&&void 0!==n?n:"",i}},t.MsgLSMLiquidStakeResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return!0===e.transactionComplete&&t.uint32(8).bool(e.transactionComplete),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=f();for(;r.pos>>3==1?i.transactionComplete=r.bool():r.skipType(7&e)}return i},fromJSON:e=>({transactionComplete:!!j(e.transactionComplete)&&!!e.transactionComplete}),toJSON(e){let t={};return void 0!==e.transactionComplete&&(t.transactionComplete=e.transactionComplete),t},fromPartial(e){var t;let r=f();return r.transactionComplete=null!==(t=e.transactionComplete)&&void 0!==t&&t,r}},t.MsgClearBalance={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.creator&&t.uint32(10).string(e.creator),""!==e.chainId&&t.uint32(18).string(e.chainId),""!==e.amount&&t.uint32(26).string(e.amount),""!==e.channel&&t.uint32(34).string(e.channel),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=h();for(;r.pos>>3){case 1:i.creator=r.string();break;case 2:i.chainId=r.string();break;case 3:i.amount=r.string();break;case 4:i.channel=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({creator:j(e.creator)?String(e.creator):"",chainId:j(e.chainId)?String(e.chainId):"",amount:j(e.amount)?String(e.amount):"",channel:j(e.channel)?String(e.channel):""}),toJSON(e){let t={};return void 0!==e.creator&&(t.creator=e.creator),void 0!==e.chainId&&(t.chainId=e.chainId),void 0!==e.amount&&(t.amount=e.amount),void 0!==e.channel&&(t.channel=e.channel),t},fromPartial(e){var t,r,n,i;let o=h();return o.creator=null!==(t=e.creator)&&void 0!==t?t:"",o.chainId=null!==(r=e.chainId)&&void 0!==r?r:"",o.amount=null!==(n=e.amount)&&void 0!==n?n:"",o.channel=null!==(i=e.channel)&&void 0!==i?i:"",o}},t.MsgClearBalanceResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=g();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>g()},t.MsgRedeemStake={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.creator&&t.uint32(10).string(e.creator),""!==e.amount&&t.uint32(18).string(e.amount),""!==e.hostZone&&t.uint32(26).string(e.hostZone),""!==e.receiver&&t.uint32(34).string(e.receiver),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=m();for(;r.pos>>3){case 1:i.creator=r.string();break;case 2:i.amount=r.string();break;case 3:i.hostZone=r.string();break;case 4:i.receiver=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({creator:j(e.creator)?String(e.creator):"",amount:j(e.amount)?String(e.amount):"",hostZone:j(e.hostZone)?String(e.hostZone):"",receiver:j(e.receiver)?String(e.receiver):""}),toJSON(e){let t={};return void 0!==e.creator&&(t.creator=e.creator),void 0!==e.amount&&(t.amount=e.amount),void 0!==e.hostZone&&(t.hostZone=e.hostZone),void 0!==e.receiver&&(t.receiver=e.receiver),t},fromPartial(e){var t,r,n,i;let o=m();return o.creator=null!==(t=e.creator)&&void 0!==t?t:"",o.amount=null!==(r=e.amount)&&void 0!==r?r:"",o.hostZone=null!==(n=e.hostZone)&&void 0!==n?n:"",o.receiver=null!==(i=e.receiver)&&void 0!==i?i:"",o}},t.MsgRedeemStakeResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=y();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>y()},t.MsgRegisterHostZone={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.connectionId&&t.uint32(18).string(e.connectionId),""!==e.bech32prefix&&t.uint32(98).string(e.bech32prefix),""!==e.hostDenom&&t.uint32(34).string(e.hostDenom),""!==e.ibcDenom&&t.uint32(42).string(e.ibcDenom),""!==e.creator&&t.uint32(50).string(e.creator),""!==e.transferChannelId&&t.uint32(82).string(e.transferChannelId),"0"!==e.unbondingPeriod&&t.uint32(88).uint64(e.unbondingPeriod),""!==e.minRedemptionRate&&t.uint32(106).string(e.minRedemptionRate),""!==e.maxRedemptionRate&&t.uint32(114).string(e.maxRedemptionRate),!0===e.lsmLiquidStakeEnabled&&t.uint32(120).bool(e.lsmLiquidStakeEnabled),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=v();for(;r.pos>>3){case 2:i.connectionId=r.string();break;case 12:i.bech32prefix=r.string();break;case 4:i.hostDenom=r.string();break;case 5:i.ibcDenom=r.string();break;case 6:i.creator=r.string();break;case 10:i.transferChannelId=r.string();break;case 11:i.unbondingPeriod=J(r.uint64());break;case 13:i.minRedemptionRate=r.string();break;case 14:i.maxRedemptionRate=r.string();break;case 15:i.lsmLiquidStakeEnabled=r.bool();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({connectionId:j(e.connectionId)?String(e.connectionId):"",bech32prefix:j(e.bech32prefix)?String(e.bech32prefix):"",hostDenom:j(e.hostDenom)?String(e.hostDenom):"",ibcDenom:j(e.ibcDenom)?String(e.ibcDenom):"",creator:j(e.creator)?String(e.creator):"",transferChannelId:j(e.transferChannelId)?String(e.transferChannelId):"",unbondingPeriod:j(e.unbondingPeriod)?String(e.unbondingPeriod):"0",minRedemptionRate:j(e.minRedemptionRate)?String(e.minRedemptionRate):"",maxRedemptionRate:j(e.maxRedemptionRate)?String(e.maxRedemptionRate):"",lsmLiquidStakeEnabled:!!j(e.lsmLiquidStakeEnabled)&&!!e.lsmLiquidStakeEnabled}),toJSON(e){let t={};return void 0!==e.connectionId&&(t.connectionId=e.connectionId),void 0!==e.bech32prefix&&(t.bech32prefix=e.bech32prefix),void 0!==e.hostDenom&&(t.hostDenom=e.hostDenom),void 0!==e.ibcDenom&&(t.ibcDenom=e.ibcDenom),void 0!==e.creator&&(t.creator=e.creator),void 0!==e.transferChannelId&&(t.transferChannelId=e.transferChannelId),void 0!==e.unbondingPeriod&&(t.unbondingPeriod=e.unbondingPeriod),void 0!==e.minRedemptionRate&&(t.minRedemptionRate=e.minRedemptionRate),void 0!==e.maxRedemptionRate&&(t.maxRedemptionRate=e.maxRedemptionRate),void 0!==e.lsmLiquidStakeEnabled&&(t.lsmLiquidStakeEnabled=e.lsmLiquidStakeEnabled),t},fromPartial(e){var t,r,n,i,o,a,s,l,u,d;let c=v();return c.connectionId=null!==(t=e.connectionId)&&void 0!==t?t:"",c.bech32prefix=null!==(r=e.bech32prefix)&&void 0!==r?r:"",c.hostDenom=null!==(n=e.hostDenom)&&void 0!==n?n:"",c.ibcDenom=null!==(i=e.ibcDenom)&&void 0!==i?i:"",c.creator=null!==(o=e.creator)&&void 0!==o?o:"",c.transferChannelId=null!==(a=e.transferChannelId)&&void 0!==a?a:"",c.unbondingPeriod=null!==(s=e.unbondingPeriod)&&void 0!==s?s:"0",c.minRedemptionRate=null!==(l=e.minRedemptionRate)&&void 0!==l?l:"",c.maxRedemptionRate=null!==(u=e.maxRedemptionRate)&&void 0!==u?u:"",c.lsmLiquidStakeEnabled=null!==(d=e.lsmLiquidStakeEnabled)&&void 0!==d&&d,c}},t.MsgRegisterHostZoneResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=b();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>b()},t.MsgClaimUndelegatedTokens={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.creator&&t.uint32(10).string(e.creator),""!==e.hostZoneId&&t.uint32(18).string(e.hostZoneId),"0"!==e.epoch&&t.uint32(24).uint64(e.epoch),""!==e.sender&&t.uint32(34).string(e.sender),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=S();for(;r.pos>>3){case 1:i.creator=r.string();break;case 2:i.hostZoneId=r.string();break;case 3:i.epoch=J(r.uint64());break;case 4:i.sender=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({creator:j(e.creator)?String(e.creator):"",hostZoneId:j(e.hostZoneId)?String(e.hostZoneId):"",epoch:j(e.epoch)?String(e.epoch):"0",sender:j(e.sender)?String(e.sender):""}),toJSON(e){let t={};return void 0!==e.creator&&(t.creator=e.creator),void 0!==e.hostZoneId&&(t.hostZoneId=e.hostZoneId),void 0!==e.epoch&&(t.epoch=e.epoch),void 0!==e.sender&&(t.sender=e.sender),t},fromPartial(e){var t,r,n,i;let o=S();return o.creator=null!==(t=e.creator)&&void 0!==t?t:"",o.hostZoneId=null!==(r=e.hostZoneId)&&void 0!==r?r:"",o.epoch=null!==(n=e.epoch)&&void 0!==n?n:"0",o.sender=null!==(i=e.sender)&&void 0!==i?i:"",o}},t.MsgClaimUndelegatedTokensResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=w();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>w()},t.MsgRebalanceValidators={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.creator&&t.uint32(10).string(e.creator),""!==e.hostZone&&t.uint32(18).string(e.hostZone),"0"!==e.numRebalance&&t.uint32(24).uint64(e.numRebalance),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=_();for(;r.pos>>3){case 1:i.creator=r.string();break;case 2:i.hostZone=r.string();break;case 3:i.numRebalance=J(r.uint64());break;default:r.skipType(7&e)}}return i},fromJSON:e=>({creator:j(e.creator)?String(e.creator):"",hostZone:j(e.hostZone)?String(e.hostZone):"",numRebalance:j(e.numRebalance)?String(e.numRebalance):"0"}),toJSON(e){let t={};return void 0!==e.creator&&(t.creator=e.creator),void 0!==e.hostZone&&(t.hostZone=e.hostZone),void 0!==e.numRebalance&&(t.numRebalance=e.numRebalance),t},fromPartial(e){var t,r,n;let i=_();return i.creator=null!==(t=e.creator)&&void 0!==t?t:"",i.hostZone=null!==(r=e.hostZone)&&void 0!==r?r:"",i.numRebalance=null!==(n=e.numRebalance)&&void 0!==n?n:"0",i}},t.MsgRebalanceValidatorsResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=k();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>k()},t.MsgAddValidators={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();for(let r of(""!==e.creator&&t.uint32(10).string(e.creator),""!==e.hostZone&&t.uint32(18).string(e.hostZone),e.validators))s.Validator.encode(r,t.uint32(26).fork()).ldelim();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=O();for(;r.pos>>3){case 1:i.creator=r.string();break;case 2:i.hostZone=r.string();break;case 3:i.validators.push(s.Validator.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return i},fromJSON:e=>({creator:j(e.creator)?String(e.creator):"",hostZone:j(e.hostZone)?String(e.hostZone):"",validators:Array.isArray(null==e?void 0:e.validators)?e.validators.map(e=>s.Validator.fromJSON(e)):[]}),toJSON(e){let t={};return void 0!==e.creator&&(t.creator=e.creator),void 0!==e.hostZone&&(t.hostZone=e.hostZone),e.validators?t.validators=e.validators.map(e=>e?s.Validator.toJSON(e):void 0):t.validators=[],t},fromPartial(e){var t,r,n;let i=O();return i.creator=null!==(t=e.creator)&&void 0!==t?t:"",i.hostZone=null!==(r=e.hostZone)&&void 0!==r?r:"",i.validators=(null===(n=e.validators)||void 0===n?void 0:n.map(e=>s.Validator.fromPartial(e)))||[],i}},t.MsgAddValidatorsResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=P();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>P()},t.MsgChangeValidatorWeight={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.creator&&t.uint32(10).string(e.creator),""!==e.hostZone&&t.uint32(18).string(e.hostZone),""!==e.valAddr&&t.uint32(26).string(e.valAddr),"0"!==e.weight&&t.uint32(32).uint64(e.weight),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=A();for(;r.pos>>3){case 1:i.creator=r.string();break;case 2:i.hostZone=r.string();break;case 3:i.valAddr=r.string();break;case 4:i.weight=J(r.uint64());break;default:r.skipType(7&e)}}return i},fromJSON:e=>({creator:j(e.creator)?String(e.creator):"",hostZone:j(e.hostZone)?String(e.hostZone):"",valAddr:j(e.valAddr)?String(e.valAddr):"",weight:j(e.weight)?String(e.weight):"0"}),toJSON(e){let t={};return void 0!==e.creator&&(t.creator=e.creator),void 0!==e.hostZone&&(t.hostZone=e.hostZone),void 0!==e.valAddr&&(t.valAddr=e.valAddr),void 0!==e.weight&&(t.weight=e.weight),t},fromPartial(e){var t,r,n,i;let o=A();return o.creator=null!==(t=e.creator)&&void 0!==t?t:"",o.hostZone=null!==(r=e.hostZone)&&void 0!==r?r:"",o.valAddr=null!==(n=e.valAddr)&&void 0!==n?n:"",o.weight=null!==(i=e.weight)&&void 0!==i?i:"0",o}},t.MsgChangeValidatorWeightResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=I();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>I()},t.MsgDeleteValidator={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.creator&&t.uint32(10).string(e.creator),""!==e.hostZone&&t.uint32(18).string(e.hostZone),""!==e.valAddr&&t.uint32(26).string(e.valAddr),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=R();for(;r.pos>>3){case 1:i.creator=r.string();break;case 2:i.hostZone=r.string();break;case 3:i.valAddr=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({creator:j(e.creator)?String(e.creator):"",hostZone:j(e.hostZone)?String(e.hostZone):"",valAddr:j(e.valAddr)?String(e.valAddr):""}),toJSON(e){let t={};return void 0!==e.creator&&(t.creator=e.creator),void 0!==e.hostZone&&(t.hostZone=e.hostZone),void 0!==e.valAddr&&(t.valAddr=e.valAddr),t},fromPartial(e){var t,r,n;let i=R();return i.creator=null!==(t=e.creator)&&void 0!==t?t:"",i.hostZone=null!==(r=e.hostZone)&&void 0!==r?r:"",i.valAddr=null!==(n=e.valAddr)&&void 0!==n?n:"",i}},t.MsgDeleteValidatorResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=E();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>E()},t.MsgRestoreInterchainAccount={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.creator&&t.uint32(10).string(e.creator),""!==e.chainId&&t.uint32(18).string(e.chainId),0!==e.accountType&&t.uint32(24).int32(e.accountType),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=T();for(;r.pos>>3){case 1:i.creator=r.string();break;case 2:i.chainId=r.string();break;case 3:i.accountType=r.int32();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({creator:j(e.creator)?String(e.creator):"",chainId:j(e.chainId)?String(e.chainId):"",accountType:j(e.accountType)?(0,a.iCAAccountTypeFromJSON)(e.accountType):0}),toJSON(e){let t={};return void 0!==e.creator&&(t.creator=e.creator),void 0!==e.chainId&&(t.chainId=e.chainId),void 0!==e.accountType&&(t.accountType=(0,a.iCAAccountTypeToJSON)(e.accountType)),t},fromPartial(e){var t,r,n;let i=T();return i.creator=null!==(t=e.creator)&&void 0!==t?t:"",i.chainId=null!==(r=e.chainId)&&void 0!==r?r:"",i.accountType=null!==(n=e.accountType)&&void 0!==n?n:0,i}},t.MsgRestoreInterchainAccountResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=N();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>N()},t.MsgUpdateValidatorSharesExchRate={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.creator&&t.uint32(10).string(e.creator),""!==e.chainId&&t.uint32(18).string(e.chainId),""!==e.valoper&&t.uint32(26).string(e.valoper),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=x();for(;r.pos>>3){case 1:i.creator=r.string();break;case 2:i.chainId=r.string();break;case 3:i.valoper=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({creator:j(e.creator)?String(e.creator):"",chainId:j(e.chainId)?String(e.chainId):"",valoper:j(e.valoper)?String(e.valoper):""}),toJSON(e){let t={};return void 0!==e.creator&&(t.creator=e.creator),void 0!==e.chainId&&(t.chainId=e.chainId),void 0!==e.valoper&&(t.valoper=e.valoper),t},fromPartial(e){var t,r,n;let i=x();return i.creator=null!==(t=e.creator)&&void 0!==t?t:"",i.chainId=null!==(r=e.chainId)&&void 0!==r?r:"",i.valoper=null!==(n=e.valoper)&&void 0!==n?n:"",i}},t.MsgUpdateValidatorSharesExchRateResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=B();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>B()},t.MsgUndelegateHost={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.creator&&t.uint32(10).string(e.creator),""!==e.amount&&t.uint32(18).string(e.amount),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=C();for(;r.pos>>3){case 1:i.creator=r.string();break;case 2:i.amount=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({creator:j(e.creator)?String(e.creator):"",amount:j(e.amount)?String(e.amount):""}),toJSON(e){let t={};return void 0!==e.creator&&(t.creator=e.creator),void 0!==e.amount&&(t.amount=e.amount),t},fromPartial(e){var t,r;let n=C();return n.creator=null!==(t=e.creator)&&void 0!==t?t:"",n.amount=null!==(r=e.amount)&&void 0!==r?r:"",n}},t.MsgUndelegateHostResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=M();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>M()},t.MsgCalibrateDelegation={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.creator&&t.uint32(10).string(e.creator),""!==e.chainId&&t.uint32(18).string(e.chainId),""!==e.valoper&&t.uint32(26).string(e.valoper),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=D();for(;r.pos>>3){case 1:i.creator=r.string();break;case 2:i.chainId=r.string();break;case 3:i.valoper=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({creator:j(e.creator)?String(e.creator):"",chainId:j(e.chainId)?String(e.chainId):"",valoper:j(e.valoper)?String(e.valoper):""}),toJSON(e){let t={};return void 0!==e.creator&&(t.creator=e.creator),void 0!==e.chainId&&(t.chainId=e.chainId),void 0!==e.valoper&&(t.valoper=e.valoper),t},fromPartial(e){var t,r,n;let i=D();return i.creator=null!==(t=e.creator)&&void 0!==t?t:"",i.chainId=null!==(r=e.chainId)&&void 0!==r?r:"",i.valoper=null!==(n=e.valoper)&&void 0!==n?n:"",i}},t.MsgCalibrateDelegationResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=U();for(;r.pos({}),toJSON:e=>({}),fromPartial:e=>U()},o.default.util.Long!==i.default&&(o.default.util.Long=i.default,o.default.configure())},50980:function(e,t,r){"use strict";var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Validator=t.protobufPackage=void 0;let i=n(r(40059)),o=n(r(81667));function a(){return{name:"",address:"",weight:"0",delegation:"",slashQueryProgressTracker:"",slashQueryCheckpoint:"",sharesToTokensRate:"",delegationChangesInProgress:"0",slashQueryInProgress:!1}}function s(e){return e.toString()}function l(e){return null!=e}t.protobufPackage="stride.stakeibc",t.Validator={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.name&&t.uint32(10).string(e.name),""!==e.address&&t.uint32(18).string(e.address),"0"!==e.weight&&t.uint32(48).uint64(e.weight),""!==e.delegation&&t.uint32(42).string(e.delegation),""!==e.slashQueryProgressTracker&&t.uint32(74).string(e.slashQueryProgressTracker),""!==e.slashQueryCheckpoint&&t.uint32(98).string(e.slashQueryCheckpoint),""!==e.sharesToTokensRate&&t.uint32(82).string(e.sharesToTokensRate),"0"!==e.delegationChangesInProgress&&t.uint32(88).int64(e.delegationChangesInProgress),!0===e.slashQueryInProgress&&t.uint32(104).bool(e.slashQueryInProgress),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=a();for(;r.pos>>3){case 1:i.name=r.string();break;case 2:i.address=r.string();break;case 6:i.weight=s(r.uint64());break;case 5:i.delegation=r.string();break;case 9:i.slashQueryProgressTracker=r.string();break;case 12:i.slashQueryCheckpoint=r.string();break;case 10:i.sharesToTokensRate=r.string();break;case 11:i.delegationChangesInProgress=s(r.int64());break;case 13:i.slashQueryInProgress=r.bool();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({name:l(e.name)?String(e.name):"",address:l(e.address)?String(e.address):"",weight:l(e.weight)?String(e.weight):"0",delegation:l(e.delegation)?String(e.delegation):"",slashQueryProgressTracker:l(e.slashQueryProgressTracker)?String(e.slashQueryProgressTracker):"",slashQueryCheckpoint:l(e.slashQueryCheckpoint)?String(e.slashQueryCheckpoint):"",sharesToTokensRate:l(e.sharesToTokensRate)?String(e.sharesToTokensRate):"",delegationChangesInProgress:l(e.delegationChangesInProgress)?String(e.delegationChangesInProgress):"0",slashQueryInProgress:!!l(e.slashQueryInProgress)&&!!e.slashQueryInProgress}),toJSON(e){let t={};return void 0!==e.name&&(t.name=e.name),void 0!==e.address&&(t.address=e.address),void 0!==e.weight&&(t.weight=e.weight),void 0!==e.delegation&&(t.delegation=e.delegation),void 0!==e.slashQueryProgressTracker&&(t.slashQueryProgressTracker=e.slashQueryProgressTracker),void 0!==e.slashQueryCheckpoint&&(t.slashQueryCheckpoint=e.slashQueryCheckpoint),void 0!==e.sharesToTokensRate&&(t.sharesToTokensRate=e.sharesToTokensRate),void 0!==e.delegationChangesInProgress&&(t.delegationChangesInProgress=e.delegationChangesInProgress),void 0!==e.slashQueryInProgress&&(t.slashQueryInProgress=e.slashQueryInProgress),t},fromPartial(e){var t,r,n,i,o,s,l,u,d;let c=a();return c.name=null!==(t=e.name)&&void 0!==t?t:"",c.address=null!==(r=e.address)&&void 0!==r?r:"",c.weight=null!==(n=e.weight)&&void 0!==n?n:"0",c.delegation=null!==(i=e.delegation)&&void 0!==i?i:"",c.slashQueryProgressTracker=null!==(o=e.slashQueryProgressTracker)&&void 0!==o?o:"",c.slashQueryCheckpoint=null!==(s=e.slashQueryCheckpoint)&&void 0!==s?s:"",c.sharesToTokensRate=null!==(l=e.sharesToTokensRate)&&void 0!==l?l:"",c.delegationChangesInProgress=null!==(u=e.delegationChangesInProgress)&&void 0!==u?u:"0",c.slashQueryInProgress=null!==(d=e.slashQueryInProgress)&&void 0!==d&&d,c}},o.default.util.Long!==i.default&&(o.default.util.Long=i.default,o.default.configure())},99027:function(e,t,r){"use strict";var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.PublicKey=t.protobufPackage=void 0;let i=n(r(40059)),o=n(r(81667));function a(){return{ed25519:void 0,secp256k1:void 0}}t.protobufPackage="tendermint.crypto",t.PublicKey={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return void 0!==e.ed25519&&t.uint32(10).bytes(e.ed25519),void 0!==e.secp256k1&&t.uint32(18).bytes(e.secp256k1),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=a();for(;r.pos>>3){case 1:i.ed25519=r.bytes();break;case 2:i.secp256k1=r.bytes();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({ed25519:p(e.ed25519)?u(e.ed25519):void 0,secp256k1:p(e.secp256k1)?u(e.secp256k1):void 0}),toJSON(e){let t={};return void 0!==e.ed25519&&(t.ed25519=void 0!==e.ed25519?c(e.ed25519):void 0),void 0!==e.secp256k1&&(t.secp256k1=void 0!==e.secp256k1?c(e.secp256k1):void 0),t},fromPartial(e){var t,r;let n=a();return n.ed25519=null!==(t=e.ed25519)&&void 0!==t?t:void 0,n.secp256k1=null!==(r=e.secp256k1)&&void 0!==r?r:void 0,n}};var s=void 0!==s?s:"undefined"!=typeof self?self:window;let l=s.atob||(e=>s.Buffer.from(e,"base64").toString("binary"));function u(e){let t=l(e),r=new Uint8Array(t.length);for(let e=0;es.Buffer.from(e,"binary").toString("base64"));function c(e){let t=[];for(let r of e)t.push(String.fromCharCode(r));return d(t.join(""))}function p(e){return null!=e}o.default.util.Long!==i.default&&(o.default.util.Long=i.default,o.default.configure())},22709:function(e,t,r){"use strict";var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ProofOps=t.ProofOp=t.DominoOp=t.ValueOp=t.Proof=t.protobufPackage=void 0;let i=n(r(40059)),o=n(r(81667));function a(){return{total:"0",index:"0",leafHash:new Uint8Array,aunts:[]}}function s(){return{key:new Uint8Array,proof:void 0}}function l(){return{key:"",input:"",output:""}}function u(){return{type:"",key:new Uint8Array,data:new Uint8Array}}function d(){return{ops:[]}}t.protobufPackage="tendermint.crypto",t.Proof={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();for(let r of("0"!==e.total&&t.uint32(8).int64(e.total),"0"!==e.index&&t.uint32(16).int64(e.index),0!==e.leafHash.length&&t.uint32(26).bytes(e.leafHash),e.aunts))t.uint32(34).bytes(r);return t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=a();for(;r.pos>>3){case 1:i.total=m(r.int64());break;case 2:i.index=m(r.int64());break;case 3:i.leafHash=r.bytes();break;case 4:i.aunts.push(r.bytes());break;default:r.skipType(7&e)}}return i},fromJSON:e=>({total:y(e.total)?String(e.total):"0",index:y(e.index)?String(e.index):"0",leafHash:y(e.leafHash)?f(e.leafHash):new Uint8Array,aunts:Array.isArray(null==e?void 0:e.aunts)?e.aunts.map(e=>f(e)):[]}),toJSON(e){let t={};return void 0!==e.total&&(t.total=e.total),void 0!==e.index&&(t.index=e.index),void 0!==e.leafHash&&(t.leafHash=g(void 0!==e.leafHash?e.leafHash:new Uint8Array)),e.aunts?t.aunts=e.aunts.map(e=>g(void 0!==e?e:new Uint8Array)):t.aunts=[],t},fromPartial(e){var t,r,n,i;let o=a();return o.total=null!==(t=e.total)&&void 0!==t?t:"0",o.index=null!==(r=e.index)&&void 0!==r?r:"0",o.leafHash=null!==(n=e.leafHash)&&void 0!==n?n:new Uint8Array,o.aunts=(null===(i=e.aunts)||void 0===i?void 0:i.map(e=>e))||[],o}},t.ValueOp={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return 0!==e.key.length&&r.uint32(10).bytes(e.key),void 0!==e.proof&&t.Proof.encode(e.proof,r.uint32(18).fork()).ldelim(),r},decode(e,r){let n=e instanceof o.default.Reader?e:new o.default.Reader(e),i=void 0===r?n.len:n.pos+r,a=s();for(;n.pos>>3){case 1:a.key=n.bytes();break;case 2:a.proof=t.Proof.decode(n,n.uint32());break;default:n.skipType(7&e)}}return a},fromJSON:e=>({key:y(e.key)?f(e.key):new Uint8Array,proof:y(e.proof)?t.Proof.fromJSON(e.proof):void 0}),toJSON(e){let r={};return void 0!==e.key&&(r.key=g(void 0!==e.key?e.key:new Uint8Array)),void 0!==e.proof&&(r.proof=e.proof?t.Proof.toJSON(e.proof):void 0),r},fromPartial(e){var r;let n=s();return n.key=null!==(r=e.key)&&void 0!==r?r:new Uint8Array,n.proof=void 0!==e.proof&&null!==e.proof?t.Proof.fromPartial(e.proof):void 0,n}},t.DominoOp={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.key&&t.uint32(10).string(e.key),""!==e.input&&t.uint32(18).string(e.input),""!==e.output&&t.uint32(26).string(e.output),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=l();for(;r.pos>>3){case 1:i.key=r.string();break;case 2:i.input=r.string();break;case 3:i.output=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({key:y(e.key)?String(e.key):"",input:y(e.input)?String(e.input):"",output:y(e.output)?String(e.output):""}),toJSON(e){let t={};return void 0!==e.key&&(t.key=e.key),void 0!==e.input&&(t.input=e.input),void 0!==e.output&&(t.output=e.output),t},fromPartial(e){var t,r,n;let i=l();return i.key=null!==(t=e.key)&&void 0!==t?t:"",i.input=null!==(r=e.input)&&void 0!==r?r:"",i.output=null!==(n=e.output)&&void 0!==n?n:"",i}},t.ProofOp={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.type&&t.uint32(10).string(e.type),0!==e.key.length&&t.uint32(18).bytes(e.key),0!==e.data.length&&t.uint32(26).bytes(e.data),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=u();for(;r.pos>>3){case 1:i.type=r.string();break;case 2:i.key=r.bytes();break;case 3:i.data=r.bytes();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({type:y(e.type)?String(e.type):"",key:y(e.key)?f(e.key):new Uint8Array,data:y(e.data)?f(e.data):new Uint8Array}),toJSON(e){let t={};return void 0!==e.type&&(t.type=e.type),void 0!==e.key&&(t.key=g(void 0!==e.key?e.key:new Uint8Array)),void 0!==e.data&&(t.data=g(void 0!==e.data?e.data:new Uint8Array)),t},fromPartial(e){var t,r,n;let i=u();return i.type=null!==(t=e.type)&&void 0!==t?t:"",i.key=null!==(r=e.key)&&void 0!==r?r:new Uint8Array,i.data=null!==(n=e.data)&&void 0!==n?n:new Uint8Array,i}},t.ProofOps={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();for(let n of e.ops)t.ProofOp.encode(n,r.uint32(10).fork()).ldelim();return r},decode(e,r){let n=e instanceof o.default.Reader?e:new o.default.Reader(e),i=void 0===r?n.len:n.pos+r,a=d();for(;n.pos>>3==1?a.ops.push(t.ProofOp.decode(n,n.uint32())):n.skipType(7&e)}return a},fromJSON:e=>({ops:Array.isArray(null==e?void 0:e.ops)?e.ops.map(e=>t.ProofOp.fromJSON(e)):[]}),toJSON(e){let r={};return e.ops?r.ops=e.ops.map(e=>e?t.ProofOp.toJSON(e):void 0):r.ops=[],r},fromPartial(e){var r;let n=d();return n.ops=(null===(r=e.ops)||void 0===r?void 0:r.map(e=>t.ProofOp.fromPartial(e)))||[],n}};var c=void 0!==c?c:"undefined"!=typeof self?self:window;let p=c.atob||(e=>c.Buffer.from(e,"base64").toString("binary"));function f(e){let t=p(e),r=new Uint8Array(t.length);for(let e=0;ec.Buffer.from(e,"binary").toString("base64"));function g(e){let t=[];for(let r of e)t.push(String.fromCharCode(r));return h(t.join(""))}function m(e){return e.toString()}function y(e){return null!=e}o.default.util.Long!==i.default&&(o.default.util.Long=i.default,o.default.configure())},35444:function(e,t,r){"use strict";var n,i,o=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.TxProof=t.BlockMeta=t.LightBlock=t.SignedHeader=t.Proposal=t.CommitSig=t.Commit=t.Vote=t.Data=t.Header=t.BlockID=t.Part=t.PartSetHeader=t.signedMsgTypeToJSON=t.signedMsgTypeFromJSON=t.SignedMsgType=t.blockIDFlagToJSON=t.blockIDFlagFromJSON=t.BlockIDFlag=t.protobufPackage=void 0;let a=o(r(40059)),s=o(r(81667)),l=r(90338),u=r(22709),d=r(81766),c=r(86674);function p(e){switch(e){case 0:case"BLOCK_ID_FLAG_UNKNOWN":return n.BLOCK_ID_FLAG_UNKNOWN;case 1:case"BLOCK_ID_FLAG_ABSENT":return n.BLOCK_ID_FLAG_ABSENT;case 2:case"BLOCK_ID_FLAG_COMMIT":return n.BLOCK_ID_FLAG_COMMIT;case 3:case"BLOCK_ID_FLAG_NIL":return n.BLOCK_ID_FLAG_NIL;default:return n.UNRECOGNIZED}}function f(e){switch(e){case n.BLOCK_ID_FLAG_UNKNOWN:return"BLOCK_ID_FLAG_UNKNOWN";case n.BLOCK_ID_FLAG_ABSENT:return"BLOCK_ID_FLAG_ABSENT";case n.BLOCK_ID_FLAG_COMMIT:return"BLOCK_ID_FLAG_COMMIT";case n.BLOCK_ID_FLAG_NIL:return"BLOCK_ID_FLAG_NIL";default:return"UNKNOWN"}}function h(e){switch(e){case 0:case"SIGNED_MSG_TYPE_UNKNOWN":return i.SIGNED_MSG_TYPE_UNKNOWN;case 1:case"SIGNED_MSG_TYPE_PREVOTE":return i.SIGNED_MSG_TYPE_PREVOTE;case 2:case"SIGNED_MSG_TYPE_PRECOMMIT":return i.SIGNED_MSG_TYPE_PRECOMMIT;case 32:case"SIGNED_MSG_TYPE_PROPOSAL":return i.SIGNED_MSG_TYPE_PROPOSAL;default:return i.UNRECOGNIZED}}function g(e){switch(e){case i.SIGNED_MSG_TYPE_UNKNOWN:return"SIGNED_MSG_TYPE_UNKNOWN";case i.SIGNED_MSG_TYPE_PREVOTE:return"SIGNED_MSG_TYPE_PREVOTE";case i.SIGNED_MSG_TYPE_PRECOMMIT:return"SIGNED_MSG_TYPE_PRECOMMIT";case i.SIGNED_MSG_TYPE_PROPOSAL:return"SIGNED_MSG_TYPE_PROPOSAL";default:return"UNKNOWN"}}function m(){return{total:0,hash:new Uint8Array}}function y(){return{index:0,bytes:new Uint8Array,proof:void 0}}function v(){return{hash:new Uint8Array,partSetHeader:void 0}}function b(){return{version:void 0,chainId:"",height:"0",time:void 0,lastBlockId:void 0,lastCommitHash:new Uint8Array,dataHash:new Uint8Array,validatorsHash:new Uint8Array,nextValidatorsHash:new Uint8Array,consensusHash:new Uint8Array,appHash:new Uint8Array,lastResultsHash:new Uint8Array,evidenceHash:new Uint8Array,proposerAddress:new Uint8Array}}function S(){return{txs:[]}}function w(){return{type:0,height:"0",round:0,blockId:void 0,timestamp:void 0,validatorAddress:new Uint8Array,validatorIndex:0,signature:new Uint8Array}}function _(){return{height:"0",round:0,blockId:void 0,signatures:[]}}function k(){return{blockIdFlag:0,validatorAddress:new Uint8Array,timestamp:void 0,signature:new Uint8Array}}function O(){return{type:0,height:"0",round:0,polRound:0,blockId:void 0,timestamp:void 0,signature:new Uint8Array}}function P(){return{header:void 0,commit:void 0}}function A(){return{signedHeader:void 0,validatorSet:void 0}}function I(){return{blockId:void 0,blockSize:"0",header:void 0,numTxs:"0"}}function R(){return{rootHash:new Uint8Array,data:new Uint8Array,proof:void 0}}t.protobufPackage="tendermint.types",function(e){e[e.BLOCK_ID_FLAG_UNKNOWN=0]="BLOCK_ID_FLAG_UNKNOWN",e[e.BLOCK_ID_FLAG_ABSENT=1]="BLOCK_ID_FLAG_ABSENT",e[e.BLOCK_ID_FLAG_COMMIT=2]="BLOCK_ID_FLAG_COMMIT",e[e.BLOCK_ID_FLAG_NIL=3]="BLOCK_ID_FLAG_NIL",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(n=t.BlockIDFlag||(t.BlockIDFlag={})),t.blockIDFlagFromJSON=p,t.blockIDFlagToJSON=f,function(e){e[e.SIGNED_MSG_TYPE_UNKNOWN=0]="SIGNED_MSG_TYPE_UNKNOWN",e[e.SIGNED_MSG_TYPE_PREVOTE=1]="SIGNED_MSG_TYPE_PREVOTE",e[e.SIGNED_MSG_TYPE_PRECOMMIT=2]="SIGNED_MSG_TYPE_PRECOMMIT",e[e.SIGNED_MSG_TYPE_PROPOSAL=32]="SIGNED_MSG_TYPE_PROPOSAL",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(i=t.SignedMsgType||(t.SignedMsgType={})),t.signedMsgTypeFromJSON=h,t.signedMsgTypeToJSON=g,t.PartSetHeader={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return 0!==e.total&&t.uint32(8).uint32(e.total),0!==e.hash.length&&t.uint32(18).bytes(e.hash),t},decode(e,t){let r=e instanceof s.default.Reader?e:new s.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=m();for(;r.pos>>3){case 1:i.total=r.uint32();break;case 2:i.hash=r.bytes();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({total:J(e.total)?Number(e.total):0,hash:J(e.hash)?N(e.hash):new Uint8Array}),toJSON(e){let t={};return void 0!==e.total&&(t.total=Math.round(e.total)),void 0!==e.hash&&(t.hash=B(void 0!==e.hash?e.hash:new Uint8Array)),t},fromPartial(e){var t,r;let n=m();return n.total=null!==(t=e.total)&&void 0!==t?t:0,n.hash=null!==(r=e.hash)&&void 0!==r?r:new Uint8Array,n}},t.Part={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return 0!==e.index&&t.uint32(8).uint32(e.index),0!==e.bytes.length&&t.uint32(18).bytes(e.bytes),void 0!==e.proof&&u.Proof.encode(e.proof,t.uint32(26).fork()).ldelim(),t},decode(e,t){let r=e instanceof s.default.Reader?e:new s.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=y();for(;r.pos>>3){case 1:i.index=r.uint32();break;case 2:i.bytes=r.bytes();break;case 3:i.proof=u.Proof.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON:e=>({index:J(e.index)?Number(e.index):0,bytes:J(e.bytes)?N(e.bytes):new Uint8Array,proof:J(e.proof)?u.Proof.fromJSON(e.proof):void 0}),toJSON(e){let t={};return void 0!==e.index&&(t.index=Math.round(e.index)),void 0!==e.bytes&&(t.bytes=B(void 0!==e.bytes?e.bytes:new Uint8Array)),void 0!==e.proof&&(t.proof=e.proof?u.Proof.toJSON(e.proof):void 0),t},fromPartial(e){var t,r;let n=y();return n.index=null!==(t=e.index)&&void 0!==t?t:0,n.bytes=null!==(r=e.bytes)&&void 0!==r?r:new Uint8Array,n.proof=void 0!==e.proof&&null!==e.proof?u.Proof.fromPartial(e.proof):void 0,n}},t.BlockID={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return 0!==e.hash.length&&r.uint32(10).bytes(e.hash),void 0!==e.partSetHeader&&t.PartSetHeader.encode(e.partSetHeader,r.uint32(18).fork()).ldelim(),r},decode(e,r){let n=e instanceof s.default.Reader?e:new s.default.Reader(e),i=void 0===r?n.len:n.pos+r,o=v();for(;n.pos>>3){case 1:o.hash=n.bytes();break;case 2:o.partSetHeader=t.PartSetHeader.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON:e=>({hash:J(e.hash)?N(e.hash):new Uint8Array,partSetHeader:J(e.partSetHeader)?t.PartSetHeader.fromJSON(e.partSetHeader):void 0}),toJSON(e){let r={};return void 0!==e.hash&&(r.hash=B(void 0!==e.hash?e.hash:new Uint8Array)),void 0!==e.partSetHeader&&(r.partSetHeader=e.partSetHeader?t.PartSetHeader.toJSON(e.partSetHeader):void 0),r},fromPartial(e){var r;let n=v();return n.hash=null!==(r=e.hash)&&void 0!==r?r:new Uint8Array,n.partSetHeader=void 0!==e.partSetHeader&&null!==e.partSetHeader?t.PartSetHeader.fromPartial(e.partSetHeader):void 0,n}},t.Header={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return void 0!==e.version&&d.Consensus.encode(e.version,r.uint32(10).fork()).ldelim(),""!==e.chainId&&r.uint32(18).string(e.chainId),"0"!==e.height&&r.uint32(24).int64(e.height),void 0!==e.time&&l.Timestamp.encode(C(e.time),r.uint32(34).fork()).ldelim(),void 0!==e.lastBlockId&&t.BlockID.encode(e.lastBlockId,r.uint32(42).fork()).ldelim(),0!==e.lastCommitHash.length&&r.uint32(50).bytes(e.lastCommitHash),0!==e.dataHash.length&&r.uint32(58).bytes(e.dataHash),0!==e.validatorsHash.length&&r.uint32(66).bytes(e.validatorsHash),0!==e.nextValidatorsHash.length&&r.uint32(74).bytes(e.nextValidatorsHash),0!==e.consensusHash.length&&r.uint32(82).bytes(e.consensusHash),0!==e.appHash.length&&r.uint32(90).bytes(e.appHash),0!==e.lastResultsHash.length&&r.uint32(98).bytes(e.lastResultsHash),0!==e.evidenceHash.length&&r.uint32(106).bytes(e.evidenceHash),0!==e.proposerAddress.length&&r.uint32(114).bytes(e.proposerAddress),r},decode(e,r){let n=e instanceof s.default.Reader?e:new s.default.Reader(e),i=void 0===r?n.len:n.pos+r,o=b();for(;n.pos>>3){case 1:o.version=d.Consensus.decode(n,n.uint32());break;case 2:o.chainId=n.string();break;case 3:o.height=U(n.int64());break;case 4:o.time=M(l.Timestamp.decode(n,n.uint32()));break;case 5:o.lastBlockId=t.BlockID.decode(n,n.uint32());break;case 6:o.lastCommitHash=n.bytes();break;case 7:o.dataHash=n.bytes();break;case 8:o.validatorsHash=n.bytes();break;case 9:o.nextValidatorsHash=n.bytes();break;case 10:o.consensusHash=n.bytes();break;case 11:o.appHash=n.bytes();break;case 12:o.lastResultsHash=n.bytes();break;case 13:o.evidenceHash=n.bytes();break;case 14:o.proposerAddress=n.bytes();break;default:n.skipType(7&e)}}return o},fromJSON:e=>({version:J(e.version)?d.Consensus.fromJSON(e.version):void 0,chainId:J(e.chainId)?String(e.chainId):"",height:J(e.height)?String(e.height):"0",time:J(e.time)?D(e.time):void 0,lastBlockId:J(e.lastBlockId)?t.BlockID.fromJSON(e.lastBlockId):void 0,lastCommitHash:J(e.lastCommitHash)?N(e.lastCommitHash):new Uint8Array,dataHash:J(e.dataHash)?N(e.dataHash):new Uint8Array,validatorsHash:J(e.validatorsHash)?N(e.validatorsHash):new Uint8Array,nextValidatorsHash:J(e.nextValidatorsHash)?N(e.nextValidatorsHash):new Uint8Array,consensusHash:J(e.consensusHash)?N(e.consensusHash):new Uint8Array,appHash:J(e.appHash)?N(e.appHash):new Uint8Array,lastResultsHash:J(e.lastResultsHash)?N(e.lastResultsHash):new Uint8Array,evidenceHash:J(e.evidenceHash)?N(e.evidenceHash):new Uint8Array,proposerAddress:J(e.proposerAddress)?N(e.proposerAddress):new Uint8Array}),toJSON(e){let r={};return void 0!==e.version&&(r.version=e.version?d.Consensus.toJSON(e.version):void 0),void 0!==e.chainId&&(r.chainId=e.chainId),void 0!==e.height&&(r.height=e.height),void 0!==e.time&&(r.time=e.time.toISOString()),void 0!==e.lastBlockId&&(r.lastBlockId=e.lastBlockId?t.BlockID.toJSON(e.lastBlockId):void 0),void 0!==e.lastCommitHash&&(r.lastCommitHash=B(void 0!==e.lastCommitHash?e.lastCommitHash:new Uint8Array)),void 0!==e.dataHash&&(r.dataHash=B(void 0!==e.dataHash?e.dataHash:new Uint8Array)),void 0!==e.validatorsHash&&(r.validatorsHash=B(void 0!==e.validatorsHash?e.validatorsHash:new Uint8Array)),void 0!==e.nextValidatorsHash&&(r.nextValidatorsHash=B(void 0!==e.nextValidatorsHash?e.nextValidatorsHash:new Uint8Array)),void 0!==e.consensusHash&&(r.consensusHash=B(void 0!==e.consensusHash?e.consensusHash:new Uint8Array)),void 0!==e.appHash&&(r.appHash=B(void 0!==e.appHash?e.appHash:new Uint8Array)),void 0!==e.lastResultsHash&&(r.lastResultsHash=B(void 0!==e.lastResultsHash?e.lastResultsHash:new Uint8Array)),void 0!==e.evidenceHash&&(r.evidenceHash=B(void 0!==e.evidenceHash?e.evidenceHash:new Uint8Array)),void 0!==e.proposerAddress&&(r.proposerAddress=B(void 0!==e.proposerAddress?e.proposerAddress:new Uint8Array)),r},fromPartial(e){var r,n,i,o,a,s,l,u,c,p,f,h;let g=b();return g.version=void 0!==e.version&&null!==e.version?d.Consensus.fromPartial(e.version):void 0,g.chainId=null!==(r=e.chainId)&&void 0!==r?r:"",g.height=null!==(n=e.height)&&void 0!==n?n:"0",g.time=null!==(i=e.time)&&void 0!==i?i:void 0,g.lastBlockId=void 0!==e.lastBlockId&&null!==e.lastBlockId?t.BlockID.fromPartial(e.lastBlockId):void 0,g.lastCommitHash=null!==(o=e.lastCommitHash)&&void 0!==o?o:new Uint8Array,g.dataHash=null!==(a=e.dataHash)&&void 0!==a?a:new Uint8Array,g.validatorsHash=null!==(s=e.validatorsHash)&&void 0!==s?s:new Uint8Array,g.nextValidatorsHash=null!==(l=e.nextValidatorsHash)&&void 0!==l?l:new Uint8Array,g.consensusHash=null!==(u=e.consensusHash)&&void 0!==u?u:new Uint8Array,g.appHash=null!==(c=e.appHash)&&void 0!==c?c:new Uint8Array,g.lastResultsHash=null!==(p=e.lastResultsHash)&&void 0!==p?p:new Uint8Array,g.evidenceHash=null!==(f=e.evidenceHash)&&void 0!==f?f:new Uint8Array,g.proposerAddress=null!==(h=e.proposerAddress)&&void 0!==h?h:new Uint8Array,g}},t.Data={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();for(let r of e.txs)t.uint32(10).bytes(r);return t},decode(e,t){let r=e instanceof s.default.Reader?e:new s.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=S();for(;r.pos>>3==1?i.txs.push(r.bytes()):r.skipType(7&e)}return i},fromJSON:e=>({txs:Array.isArray(null==e?void 0:e.txs)?e.txs.map(e=>N(e)):[]}),toJSON(e){let t={};return e.txs?t.txs=e.txs.map(e=>B(void 0!==e?e:new Uint8Array)):t.txs=[],t},fromPartial(e){var t;let r=S();return r.txs=(null===(t=e.txs)||void 0===t?void 0:t.map(e=>e))||[],r}},t.Vote={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return 0!==e.type&&r.uint32(8).int32(e.type),"0"!==e.height&&r.uint32(16).int64(e.height),0!==e.round&&r.uint32(24).int32(e.round),void 0!==e.blockId&&t.BlockID.encode(e.blockId,r.uint32(34).fork()).ldelim(),void 0!==e.timestamp&&l.Timestamp.encode(C(e.timestamp),r.uint32(42).fork()).ldelim(),0!==e.validatorAddress.length&&r.uint32(50).bytes(e.validatorAddress),0!==e.validatorIndex&&r.uint32(56).int32(e.validatorIndex),0!==e.signature.length&&r.uint32(66).bytes(e.signature),r},decode(e,r){let n=e instanceof s.default.Reader?e:new s.default.Reader(e),i=void 0===r?n.len:n.pos+r,o=w();for(;n.pos>>3){case 1:o.type=n.int32();break;case 2:o.height=U(n.int64());break;case 3:o.round=n.int32();break;case 4:o.blockId=t.BlockID.decode(n,n.uint32());break;case 5:o.timestamp=M(l.Timestamp.decode(n,n.uint32()));break;case 6:o.validatorAddress=n.bytes();break;case 7:o.validatorIndex=n.int32();break;case 8:o.signature=n.bytes();break;default:n.skipType(7&e)}}return o},fromJSON:e=>({type:J(e.type)?h(e.type):0,height:J(e.height)?String(e.height):"0",round:J(e.round)?Number(e.round):0,blockId:J(e.blockId)?t.BlockID.fromJSON(e.blockId):void 0,timestamp:J(e.timestamp)?D(e.timestamp):void 0,validatorAddress:J(e.validatorAddress)?N(e.validatorAddress):new Uint8Array,validatorIndex:J(e.validatorIndex)?Number(e.validatorIndex):0,signature:J(e.signature)?N(e.signature):new Uint8Array}),toJSON(e){let r={};return void 0!==e.type&&(r.type=g(e.type)),void 0!==e.height&&(r.height=e.height),void 0!==e.round&&(r.round=Math.round(e.round)),void 0!==e.blockId&&(r.blockId=e.blockId?t.BlockID.toJSON(e.blockId):void 0),void 0!==e.timestamp&&(r.timestamp=e.timestamp.toISOString()),void 0!==e.validatorAddress&&(r.validatorAddress=B(void 0!==e.validatorAddress?e.validatorAddress:new Uint8Array)),void 0!==e.validatorIndex&&(r.validatorIndex=Math.round(e.validatorIndex)),void 0!==e.signature&&(r.signature=B(void 0!==e.signature?e.signature:new Uint8Array)),r},fromPartial(e){var r,n,i,o,a,s,l;let u=w();return u.type=null!==(r=e.type)&&void 0!==r?r:0,u.height=null!==(n=e.height)&&void 0!==n?n:"0",u.round=null!==(i=e.round)&&void 0!==i?i:0,u.blockId=void 0!==e.blockId&&null!==e.blockId?t.BlockID.fromPartial(e.blockId):void 0,u.timestamp=null!==(o=e.timestamp)&&void 0!==o?o:void 0,u.validatorAddress=null!==(a=e.validatorAddress)&&void 0!==a?a:new Uint8Array,u.validatorIndex=null!==(s=e.validatorIndex)&&void 0!==s?s:0,u.signature=null!==(l=e.signature)&&void 0!==l?l:new Uint8Array,u}},t.Commit={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();for(let n of("0"!==e.height&&r.uint32(8).int64(e.height),0!==e.round&&r.uint32(16).int32(e.round),void 0!==e.blockId&&t.BlockID.encode(e.blockId,r.uint32(26).fork()).ldelim(),e.signatures))t.CommitSig.encode(n,r.uint32(34).fork()).ldelim();return r},decode(e,r){let n=e instanceof s.default.Reader?e:new s.default.Reader(e),i=void 0===r?n.len:n.pos+r,o=_();for(;n.pos>>3){case 1:o.height=U(n.int64());break;case 2:o.round=n.int32();break;case 3:o.blockId=t.BlockID.decode(n,n.uint32());break;case 4:o.signatures.push(t.CommitSig.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return o},fromJSON:e=>({height:J(e.height)?String(e.height):"0",round:J(e.round)?Number(e.round):0,blockId:J(e.blockId)?t.BlockID.fromJSON(e.blockId):void 0,signatures:Array.isArray(null==e?void 0:e.signatures)?e.signatures.map(e=>t.CommitSig.fromJSON(e)):[]}),toJSON(e){let r={};return void 0!==e.height&&(r.height=e.height),void 0!==e.round&&(r.round=Math.round(e.round)),void 0!==e.blockId&&(r.blockId=e.blockId?t.BlockID.toJSON(e.blockId):void 0),e.signatures?r.signatures=e.signatures.map(e=>e?t.CommitSig.toJSON(e):void 0):r.signatures=[],r},fromPartial(e){var r,n,i;let o=_();return o.height=null!==(r=e.height)&&void 0!==r?r:"0",o.round=null!==(n=e.round)&&void 0!==n?n:0,o.blockId=void 0!==e.blockId&&null!==e.blockId?t.BlockID.fromPartial(e.blockId):void 0,o.signatures=(null===(i=e.signatures)||void 0===i?void 0:i.map(e=>t.CommitSig.fromPartial(e)))||[],o}},t.CommitSig={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return 0!==e.blockIdFlag&&t.uint32(8).int32(e.blockIdFlag),0!==e.validatorAddress.length&&t.uint32(18).bytes(e.validatorAddress),void 0!==e.timestamp&&l.Timestamp.encode(C(e.timestamp),t.uint32(26).fork()).ldelim(),0!==e.signature.length&&t.uint32(34).bytes(e.signature),t},decode(e,t){let r=e instanceof s.default.Reader?e:new s.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=k();for(;r.pos>>3){case 1:i.blockIdFlag=r.int32();break;case 2:i.validatorAddress=r.bytes();break;case 3:i.timestamp=M(l.Timestamp.decode(r,r.uint32()));break;case 4:i.signature=r.bytes();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({blockIdFlag:J(e.blockIdFlag)?p(e.blockIdFlag):0,validatorAddress:J(e.validatorAddress)?N(e.validatorAddress):new Uint8Array,timestamp:J(e.timestamp)?D(e.timestamp):void 0,signature:J(e.signature)?N(e.signature):new Uint8Array}),toJSON(e){let t={};return void 0!==e.blockIdFlag&&(t.blockIdFlag=f(e.blockIdFlag)),void 0!==e.validatorAddress&&(t.validatorAddress=B(void 0!==e.validatorAddress?e.validatorAddress:new Uint8Array)),void 0!==e.timestamp&&(t.timestamp=e.timestamp.toISOString()),void 0!==e.signature&&(t.signature=B(void 0!==e.signature?e.signature:new Uint8Array)),t},fromPartial(e){var t,r,n,i;let o=k();return o.blockIdFlag=null!==(t=e.blockIdFlag)&&void 0!==t?t:0,o.validatorAddress=null!==(r=e.validatorAddress)&&void 0!==r?r:new Uint8Array,o.timestamp=null!==(n=e.timestamp)&&void 0!==n?n:void 0,o.signature=null!==(i=e.signature)&&void 0!==i?i:new Uint8Array,o}},t.Proposal={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return 0!==e.type&&r.uint32(8).int32(e.type),"0"!==e.height&&r.uint32(16).int64(e.height),0!==e.round&&r.uint32(24).int32(e.round),0!==e.polRound&&r.uint32(32).int32(e.polRound),void 0!==e.blockId&&t.BlockID.encode(e.blockId,r.uint32(42).fork()).ldelim(),void 0!==e.timestamp&&l.Timestamp.encode(C(e.timestamp),r.uint32(50).fork()).ldelim(),0!==e.signature.length&&r.uint32(58).bytes(e.signature),r},decode(e,r){let n=e instanceof s.default.Reader?e:new s.default.Reader(e),i=void 0===r?n.len:n.pos+r,o=O();for(;n.pos>>3){case 1:o.type=n.int32();break;case 2:o.height=U(n.int64());break;case 3:o.round=n.int32();break;case 4:o.polRound=n.int32();break;case 5:o.blockId=t.BlockID.decode(n,n.uint32());break;case 6:o.timestamp=M(l.Timestamp.decode(n,n.uint32()));break;case 7:o.signature=n.bytes();break;default:n.skipType(7&e)}}return o},fromJSON:e=>({type:J(e.type)?h(e.type):0,height:J(e.height)?String(e.height):"0",round:J(e.round)?Number(e.round):0,polRound:J(e.polRound)?Number(e.polRound):0,blockId:J(e.blockId)?t.BlockID.fromJSON(e.blockId):void 0,timestamp:J(e.timestamp)?D(e.timestamp):void 0,signature:J(e.signature)?N(e.signature):new Uint8Array}),toJSON(e){let r={};return void 0!==e.type&&(r.type=g(e.type)),void 0!==e.height&&(r.height=e.height),void 0!==e.round&&(r.round=Math.round(e.round)),void 0!==e.polRound&&(r.polRound=Math.round(e.polRound)),void 0!==e.blockId&&(r.blockId=e.blockId?t.BlockID.toJSON(e.blockId):void 0),void 0!==e.timestamp&&(r.timestamp=e.timestamp.toISOString()),void 0!==e.signature&&(r.signature=B(void 0!==e.signature?e.signature:new Uint8Array)),r},fromPartial(e){var r,n,i,o,a,s;let l=O();return l.type=null!==(r=e.type)&&void 0!==r?r:0,l.height=null!==(n=e.height)&&void 0!==n?n:"0",l.round=null!==(i=e.round)&&void 0!==i?i:0,l.polRound=null!==(o=e.polRound)&&void 0!==o?o:0,l.blockId=void 0!==e.blockId&&null!==e.blockId?t.BlockID.fromPartial(e.blockId):void 0,l.timestamp=null!==(a=e.timestamp)&&void 0!==a?a:void 0,l.signature=null!==(s=e.signature)&&void 0!==s?s:new Uint8Array,l}},t.SignedHeader={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return void 0!==e.header&&t.Header.encode(e.header,r.uint32(10).fork()).ldelim(),void 0!==e.commit&&t.Commit.encode(e.commit,r.uint32(18).fork()).ldelim(),r},decode(e,r){let n=e instanceof s.default.Reader?e:new s.default.Reader(e),i=void 0===r?n.len:n.pos+r,o=P();for(;n.pos>>3){case 1:o.header=t.Header.decode(n,n.uint32());break;case 2:o.commit=t.Commit.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON:e=>({header:J(e.header)?t.Header.fromJSON(e.header):void 0,commit:J(e.commit)?t.Commit.fromJSON(e.commit):void 0}),toJSON(e){let r={};return void 0!==e.header&&(r.header=e.header?t.Header.toJSON(e.header):void 0),void 0!==e.commit&&(r.commit=e.commit?t.Commit.toJSON(e.commit):void 0),r},fromPartial(e){let r=P();return r.header=void 0!==e.header&&null!==e.header?t.Header.fromPartial(e.header):void 0,r.commit=void 0!==e.commit&&null!==e.commit?t.Commit.fromPartial(e.commit):void 0,r}},t.LightBlock={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return void 0!==e.signedHeader&&t.SignedHeader.encode(e.signedHeader,r.uint32(10).fork()).ldelim(),void 0!==e.validatorSet&&c.ValidatorSet.encode(e.validatorSet,r.uint32(18).fork()).ldelim(),r},decode(e,r){let n=e instanceof s.default.Reader?e:new s.default.Reader(e),i=void 0===r?n.len:n.pos+r,o=A();for(;n.pos>>3){case 1:o.signedHeader=t.SignedHeader.decode(n,n.uint32());break;case 2:o.validatorSet=c.ValidatorSet.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON:e=>({signedHeader:J(e.signedHeader)?t.SignedHeader.fromJSON(e.signedHeader):void 0,validatorSet:J(e.validatorSet)?c.ValidatorSet.fromJSON(e.validatorSet):void 0}),toJSON(e){let r={};return void 0!==e.signedHeader&&(r.signedHeader=e.signedHeader?t.SignedHeader.toJSON(e.signedHeader):void 0),void 0!==e.validatorSet&&(r.validatorSet=e.validatorSet?c.ValidatorSet.toJSON(e.validatorSet):void 0),r},fromPartial(e){let r=A();return r.signedHeader=void 0!==e.signedHeader&&null!==e.signedHeader?t.SignedHeader.fromPartial(e.signedHeader):void 0,r.validatorSet=void 0!==e.validatorSet&&null!==e.validatorSet?c.ValidatorSet.fromPartial(e.validatorSet):void 0,r}},t.BlockMeta={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return void 0!==e.blockId&&t.BlockID.encode(e.blockId,r.uint32(10).fork()).ldelim(),"0"!==e.blockSize&&r.uint32(16).int64(e.blockSize),void 0!==e.header&&t.Header.encode(e.header,r.uint32(26).fork()).ldelim(),"0"!==e.numTxs&&r.uint32(32).int64(e.numTxs),r},decode(e,r){let n=e instanceof s.default.Reader?e:new s.default.Reader(e),i=void 0===r?n.len:n.pos+r,o=I();for(;n.pos>>3){case 1:o.blockId=t.BlockID.decode(n,n.uint32());break;case 2:o.blockSize=U(n.int64());break;case 3:o.header=t.Header.decode(n,n.uint32());break;case 4:o.numTxs=U(n.int64());break;default:n.skipType(7&e)}}return o},fromJSON:e=>({blockId:J(e.blockId)?t.BlockID.fromJSON(e.blockId):void 0,blockSize:J(e.blockSize)?String(e.blockSize):"0",header:J(e.header)?t.Header.fromJSON(e.header):void 0,numTxs:J(e.numTxs)?String(e.numTxs):"0"}),toJSON(e){let r={};return void 0!==e.blockId&&(r.blockId=e.blockId?t.BlockID.toJSON(e.blockId):void 0),void 0!==e.blockSize&&(r.blockSize=e.blockSize),void 0!==e.header&&(r.header=e.header?t.Header.toJSON(e.header):void 0),void 0!==e.numTxs&&(r.numTxs=e.numTxs),r},fromPartial(e){var r,n;let i=I();return i.blockId=void 0!==e.blockId&&null!==e.blockId?t.BlockID.fromPartial(e.blockId):void 0,i.blockSize=null!==(r=e.blockSize)&&void 0!==r?r:"0",i.header=void 0!==e.header&&null!==e.header?t.Header.fromPartial(e.header):void 0,i.numTxs=null!==(n=e.numTxs)&&void 0!==n?n:"0",i}},t.TxProof={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return 0!==e.rootHash.length&&t.uint32(10).bytes(e.rootHash),0!==e.data.length&&t.uint32(18).bytes(e.data),void 0!==e.proof&&u.Proof.encode(e.proof,t.uint32(26).fork()).ldelim(),t},decode(e,t){let r=e instanceof s.default.Reader?e:new s.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=R();for(;r.pos>>3){case 1:i.rootHash=r.bytes();break;case 2:i.data=r.bytes();break;case 3:i.proof=u.Proof.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON:e=>({rootHash:J(e.rootHash)?N(e.rootHash):new Uint8Array,data:J(e.data)?N(e.data):new Uint8Array,proof:J(e.proof)?u.Proof.fromJSON(e.proof):void 0}),toJSON(e){let t={};return void 0!==e.rootHash&&(t.rootHash=B(void 0!==e.rootHash?e.rootHash:new Uint8Array)),void 0!==e.data&&(t.data=B(void 0!==e.data?e.data:new Uint8Array)),void 0!==e.proof&&(t.proof=e.proof?u.Proof.toJSON(e.proof):void 0),t},fromPartial(e){var t,r;let n=R();return n.rootHash=null!==(t=e.rootHash)&&void 0!==t?t:new Uint8Array,n.data=null!==(r=e.data)&&void 0!==r?r:new Uint8Array,n.proof=void 0!==e.proof&&null!==e.proof?u.Proof.fromPartial(e.proof):void 0,n}};var E=void 0!==E?E:"undefined"!=typeof self?self:window;let T=E.atob||(e=>E.Buffer.from(e,"base64").toString("binary"));function N(e){let t=T(e),r=new Uint8Array(t.length);for(let e=0;eE.Buffer.from(e,"binary").toString("base64"));function B(e){let t=[];for(let r of e)t.push(String.fromCharCode(r));return x(t.join(""))}function C(e){return{seconds:Math.trunc(e.getTime()/1e3).toString(),nanos:e.getTime()%1e3*1e6}}function M(e){let t=1e3*Number(e.seconds);return new Date(t+=e.nanos/1e6)}function D(e){return e instanceof Date?e:"string"==typeof e?new Date(e):M(l.Timestamp.fromJSON(e))}function U(e){return e.toString()}function J(e){return null!=e}s.default.util.Long!==a.default&&(s.default.util.Long=a.default,s.default.configure())},86674:function(e,t,r){"use strict";var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.SimpleValidator=t.Validator=t.ValidatorSet=t.protobufPackage=void 0;let i=n(r(40059)),o=n(r(81667)),a=r(99027);function s(){return{validators:[],proposer:void 0,totalVotingPower:"0"}}function l(){return{address:new Uint8Array,pubKey:void 0,votingPower:"0",proposerPriority:"0"}}function u(){return{pubKey:void 0,votingPower:"0"}}t.protobufPackage="tendermint.types",t.ValidatorSet={encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();for(let n of e.validators)t.Validator.encode(n,r.uint32(10).fork()).ldelim();return void 0!==e.proposer&&t.Validator.encode(e.proposer,r.uint32(18).fork()).ldelim(),"0"!==e.totalVotingPower&&r.uint32(24).int64(e.totalVotingPower),r},decode(e,r){let n=e instanceof o.default.Reader?e:new o.default.Reader(e),i=void 0===r?n.len:n.pos+r,a=s();for(;n.pos>>3){case 1:a.validators.push(t.Validator.decode(n,n.uint32()));break;case 2:a.proposer=t.Validator.decode(n,n.uint32());break;case 3:a.totalVotingPower=g(n.int64());break;default:n.skipType(7&e)}}return a},fromJSON:e=>({validators:Array.isArray(null==e?void 0:e.validators)?e.validators.map(e=>t.Validator.fromJSON(e)):[],proposer:m(e.proposer)?t.Validator.fromJSON(e.proposer):void 0,totalVotingPower:m(e.totalVotingPower)?String(e.totalVotingPower):"0"}),toJSON(e){let r={};return e.validators?r.validators=e.validators.map(e=>e?t.Validator.toJSON(e):void 0):r.validators=[],void 0!==e.proposer&&(r.proposer=e.proposer?t.Validator.toJSON(e.proposer):void 0),void 0!==e.totalVotingPower&&(r.totalVotingPower=e.totalVotingPower),r},fromPartial(e){var r,n;let i=s();return i.validators=(null===(r=e.validators)||void 0===r?void 0:r.map(e=>t.Validator.fromPartial(e)))||[],i.proposer=void 0!==e.proposer&&null!==e.proposer?t.Validator.fromPartial(e.proposer):void 0,i.totalVotingPower=null!==(n=e.totalVotingPower)&&void 0!==n?n:"0",i}},t.Validator={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return 0!==e.address.length&&t.uint32(10).bytes(e.address),void 0!==e.pubKey&&a.PublicKey.encode(e.pubKey,t.uint32(18).fork()).ldelim(),"0"!==e.votingPower&&t.uint32(24).int64(e.votingPower),"0"!==e.proposerPriority&&t.uint32(32).int64(e.proposerPriority),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=l();for(;r.pos>>3){case 1:i.address=r.bytes();break;case 2:i.pubKey=a.PublicKey.decode(r,r.uint32());break;case 3:i.votingPower=g(r.int64());break;case 4:i.proposerPriority=g(r.int64());break;default:r.skipType(7&e)}}return i},fromJSON:e=>({address:m(e.address)?p(e.address):new Uint8Array,pubKey:m(e.pubKey)?a.PublicKey.fromJSON(e.pubKey):void 0,votingPower:m(e.votingPower)?String(e.votingPower):"0",proposerPriority:m(e.proposerPriority)?String(e.proposerPriority):"0"}),toJSON(e){let t={};return void 0!==e.address&&(t.address=h(void 0!==e.address?e.address:new Uint8Array)),void 0!==e.pubKey&&(t.pubKey=e.pubKey?a.PublicKey.toJSON(e.pubKey):void 0),void 0!==e.votingPower&&(t.votingPower=e.votingPower),void 0!==e.proposerPriority&&(t.proposerPriority=e.proposerPriority),t},fromPartial(e){var t,r,n;let i=l();return i.address=null!==(t=e.address)&&void 0!==t?t:new Uint8Array,i.pubKey=void 0!==e.pubKey&&null!==e.pubKey?a.PublicKey.fromPartial(e.pubKey):void 0,i.votingPower=null!==(r=e.votingPower)&&void 0!==r?r:"0",i.proposerPriority=null!==(n=e.proposerPriority)&&void 0!==n?n:"0",i}},t.SimpleValidator={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return void 0!==e.pubKey&&a.PublicKey.encode(e.pubKey,t.uint32(10).fork()).ldelim(),"0"!==e.votingPower&&t.uint32(16).int64(e.votingPower),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=u();for(;r.pos>>3){case 1:i.pubKey=a.PublicKey.decode(r,r.uint32());break;case 2:i.votingPower=g(r.int64());break;default:r.skipType(7&e)}}return i},fromJSON:e=>({pubKey:m(e.pubKey)?a.PublicKey.fromJSON(e.pubKey):void 0,votingPower:m(e.votingPower)?String(e.votingPower):"0"}),toJSON(e){let t={};return void 0!==e.pubKey&&(t.pubKey=e.pubKey?a.PublicKey.toJSON(e.pubKey):void 0),void 0!==e.votingPower&&(t.votingPower=e.votingPower),t},fromPartial(e){var t;let r=u();return r.pubKey=void 0!==e.pubKey&&null!==e.pubKey?a.PublicKey.fromPartial(e.pubKey):void 0,r.votingPower=null!==(t=e.votingPower)&&void 0!==t?t:"0",r}};var d=void 0!==d?d:"undefined"!=typeof self?self:window;let c=d.atob||(e=>d.Buffer.from(e,"base64").toString("binary"));function p(e){let t=c(e),r=new Uint8Array(t.length);for(let e=0;ed.Buffer.from(e,"binary").toString("base64"));function h(e){let t=[];for(let r of e)t.push(String.fromCharCode(r));return f(t.join(""))}function g(e){return e.toString()}function m(e){return null!=e}o.default.util.Long!==i.default&&(o.default.util.Long=i.default,o.default.configure())},81766:function(e,t,r){"use strict";var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Consensus=t.App=t.protobufPackage=void 0;let i=n(r(40059)),o=n(r(81667));function a(){return{protocol:"0",software:""}}function s(){return{block:"0",app:"0"}}function l(e){return e.toString()}function u(e){return null!=e}t.protobufPackage="tendermint.version",t.App={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return"0"!==e.protocol&&t.uint32(8).uint64(e.protocol),""!==e.software&&t.uint32(18).string(e.software),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=a();for(;r.pos>>3){case 1:i.protocol=l(r.uint64());break;case 2:i.software=r.string();break;default:r.skipType(7&e)}}return i},fromJSON:e=>({protocol:u(e.protocol)?String(e.protocol):"0",software:u(e.software)?String(e.software):""}),toJSON(e){let t={};return void 0!==e.protocol&&(t.protocol=e.protocol),void 0!==e.software&&(t.software=e.software),t},fromPartial(e){var t,r;let n=a();return n.protocol=null!==(t=e.protocol)&&void 0!==t?t:"0",n.software=null!==(r=e.software)&&void 0!==r?r:"",n}},t.Consensus={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return"0"!==e.block&&t.uint32(8).uint64(e.block),"0"!==e.app&&t.uint32(16).uint64(e.app),t},decode(e,t){let r=e instanceof o.default.Reader?e:new o.default.Reader(e),n=void 0===t?r.len:r.pos+t,i=s();for(;r.pos>>3){case 1:i.block=l(r.uint64());break;case 2:i.app=l(r.uint64());break;default:r.skipType(7&e)}}return i},fromJSON:e=>({block:u(e.block)?String(e.block):"0",app:u(e.app)?String(e.app):"0"}),toJSON(e){let t={};return void 0!==e.block&&(t.block=e.block),void 0!==e.app&&(t.app=e.app),t},fromPartial(e){var t,r;let n=s();return n.block=null!==(t=e.block)&&void 0!==t?t:"0",n.app=null!==(r=e.app)&&void 0!==r?r:"0",n}},o.default.util.Long!==i.default&&(o.default.util.Long=i.default,o.default.configure())},40457:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isSimpleFetchError=t.SimpleFetchError=void 0;class r extends Error{constructor(e,t,n){super("Failed to get response from ".concat(new URL(t,e).toString())),this.baseURL=e,this.url=t,this.response=n,Object.setPrototypeOf(this,r.prototype)}}function n(e){return e instanceof r}t.SimpleFetchError=r,t.isSimpleFetchError=n},37900:function(e,t,r){"use strict";var n=function(e,t,r,n){function i(e){return e instanceof r?e:new r(function(t){t(e)})}return new(r||(r=Promise))(function(r,o){function a(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){e.done?r(e.value):i(e.value).then(a,s)}l((n=n.apply(e,t||[])).next())})},i=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(e);it.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};Object.defineProperty(t,"__esModule",{value:!0}),t.simpleFetch=t.makeURL=void 0;let o=r(40457);function a(e,t){let r=new URL(e);return e=l(r.origin),t=l(r.pathname)+"/"+s(t),l(e+"/"+s(t))}function s(e){return e.length>0&&"/"===e[0]?e.slice(1):e}function l(e){return e.length>0&&"/"===e[e.length-1]?e.slice(0,e.length-1):e}function u(e,t,r){return n(this,void 0,void 0,function*(){let n;"string"!=typeof t&&(t&&(r=t),t=""),"/"===t&&(t="");let s=a(e,t),l=r||{},{headers:u}=l,c=i(l,["headers"]),p=yield fetch(s,Object.assign({headers:Object.assign({accept:"application/json, text/plain, */*"},u)},c));if(204===p.status)n=void 0;else if((p.headers.get("content-type")||"").startsWith("application/json"))n=yield p.json();else{let e=yield p.text(),t=e.trim();n=t.startsWith("{")&&t.endsWith("}")?JSON.parse(t):e}let f={url:s,data:n,headers:p.headers,status:p.status,statusText:p.statusText};if(!((null==r?void 0:r.validateStatus)||d)(p.status))throw new o.SimpleFetchError(e,t,f);return f})}function d(e){return e>=200&&e<300}t.makeURL=a,t.simpleFetch=u},41320:function(e,t,r){"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(37900),t),i(r(40457),t),i(r(84306),t)},84306:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},21623:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CoinPretty=void 0;let n=r(93844),i=r(61155),o=r(18903);class a{get options(){return Object.assign(Object.assign({},this._options),this.intPretty.options)}get denom(){return this.currency.coinDenom}get currency(){return this._currency}setCurrency(e){let t=this.clone();return t.intPretty=this.intPretty.moveDecimalPointRight(this._currency.coinDecimals-e.coinDecimals),t._currency=e,t}separator(e){let t=this.clone();return t._options.separator=e,t}upperCase(e){let t=this.clone();return t._options.upperCase=e,t._options.lowerCase=!e,t}lowerCase(e){let t=this.clone();return t._options.lowerCase=e,t._options.upperCase=!e,t}hideDenom(e){let t=this.clone();return t._options.hideDenom=e,t}hideIBCMetadata(e){let t=this.clone();return t._options.hideIBCMetadata=e,t}moveDecimalPointLeft(e){let t=this.clone();return t.intPretty=t.intPretty.moveDecimalPointLeft(e),t}moveDecimalPointRight(e){let t=this.clone();return t.intPretty=t.intPretty.moveDecimalPointRight(e),t}increasePrecision(e){return this.moveDecimalPointLeft(e)}decreasePrecision(e){return this.moveDecimalPointRight(e)}maxDecimals(e){let t=this.clone();return t.intPretty=t.intPretty.maxDecimals(e),t}inequalitySymbol(e){let t=this.clone();return t.intPretty=t.intPretty.inequalitySymbol(e),t}inequalitySymbolSeparator(e){let t=this.clone();return t.intPretty=t.intPretty.inequalitySymbolSeparator(e),t}trim(e){let t=this.clone();return t.intPretty=t.intPretty.trim(e),t}shrink(e){let t=this.clone();return t.intPretty=t.intPretty.shrink(e),t}locale(e){let t=this.clone();return t.intPretty=t.intPretty.locale(e),t}ready(e){let t=this.clone();return t.intPretty=t.intPretty.ready(e),t}get isReady(){return this.intPretty.isReady}add(e){let t=e instanceof a;if(t&&"currency"in e&&this.currency.coinMinimalDenom!==e.currency.coinMinimalDenom)return this.clone();"toDec"in e&&(e=e.toDec());let r=this.clone();return r.intPretty=r.intPretty.add(t?e:e.mul(o.DecUtils.getTenExponentNInPrecisionRange(-this._currency.coinDecimals))),r}sub(e){let t=e instanceof a;if(t&&"currency"in e&&this.currency.coinMinimalDenom!==e.currency.coinMinimalDenom)return this.clone();"toDec"in e&&(e=e.toDec());let r=this.clone();return r.intPretty=r.intPretty.sub(t?e:e.mul(o.DecUtils.getTenExponentNInPrecisionRange(-this._currency.coinDecimals))),r}mul(e){let t=this.clone();return t.intPretty=t.intPretty.mul(e),t}quo(e){let t=this.clone();return t.intPretty=t.intPretty.quo(e),t}toDec(){return this.intPretty.toDec()}toCoin(){let e=this.toDec().mulTruncate(o.DecUtils.getTenExponentNInPrecisionRange(this.currency.coinDecimals)).truncate();return{denom:this.currency.coinMinimalDenom,amount:e.toString()}}toString(){let e=this.denom;this._options.hideIBCMetadata&&"originCurrency"in this.currency&&this.currency.originCurrency&&(e=this.currency.originCurrency.coinDenom),this._options.upperCase&&(e=e.toUpperCase()),this._options.lowerCase&&(e=e.toLowerCase());let t=this._options.separator;return this._options.hideDenom&&(e="",t=""),this.intPretty.toStringWithSymbols("","".concat(t).concat(e))}clone(){let e=new a(this._currency,0);return e._options=Object.assign({},this._options),e.intPretty=this.intPretty.clone(),e}constructor(e,t){this._currency=e,this._options={separator:" ",upperCase:!1,lowerCase:!1,hideDenom:!1,hideIBCMetadata:!1},"object"==typeof t&&"toDec"in t?t=t.toDec():t instanceof i.Dec||(t=new i.Dec(t)),this.intPretty=new n.IntPretty(t.quoTruncate(o.DecUtils.getTenExponentNInPrecisionRange(e.coinDecimals))).maxDecimals(e.coinDecimals)}}t.CoinPretty=a},19531:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CoinUtils=void 0;let n=r(33960),i=r(33086),o=r(61155),a=r(18903),s=r(77173);class l{static createCoinsFromPrimitives(e){return e.map(e=>new n.Coin(e.denom,e.amount))}static amountOf(e,t){let r=e.find(e=>e.denom===t);return r?r.amount:new i.Int(0)}static exclude(e,t){return e.filter(e=>0===t.indexOf(e.denom))}static concat(){for(var e=arguments.length,t=Array(e),r=0;r{let r=e.find(e=>e.denom===t.denom);if(r){let i=new n.Coin(r.denom,r.amount.add(t.amount));e.push(i)}else{let r=new n.Coin(t.denom,t.amount);e.push(r)}return e};return i.reduce(o,[])}static getCoinFromDecimals(e,t,r){let i=e.find(e=>e.coinDenom===r);if(!i)throw Error("Invalid currency");let a=new o.Dec(1);for(let e=0;ee.coinMinimalDenom===t.denom);r||(r={coinDecimals:0,coinDenom:t.denom,coinMinimalDenom:t.denom});let n=new o.Dec(1);for(let e=0;e3&&void 0!==arguments[3]&&arguments[3];if(e.equals(new o.Dec(0)))return"0";let i=e.isNegative(),a=e.abs().truncate(),s=e.abs().sub(new o.Dec(a)),u=Math.max(r-a.toString().length+1,t),d=0===u?"":s.toString(u).replace("0.","");return(i?"-":"")+(n?l.integerStringToUSLocaleString(a.toString()):a.toString())+(d.length>0?".":"")+d}static coinToTrimmedString(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:" ",n=new o.Dec(e.amount).quoTruncate(a.DecUtils.getPrecisionDec(t.coinDecimals));return"".concat(a.DecUtils.trim(n)).concat(r).concat(t.coinDenom)}}t.CoinUtils=l,l.integerStringToUSLocaleString=s.integerStringToUSLocaleString},33960:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Coin=void 0;let n=r(33086);class i{static parse(e){let t=RegExp("([0-9]+)[ ]*([a-zA-Z]+)$").exec(e);if(!t||3!==t.length)throw Error("Invalid coin str");return new i(t[2],t[1])}toString(){return"".concat(this.amount.toString()).concat(this.denom)}constructor(e,t){this.denom=e,this.amount=t instanceof n.Int?t:new n.Int(t)}}t.Coin=i},18903:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DecUtils=void 0;let n=r(61155),i=r(33086);class o{static trim(e){let t="string"==typeof e?e:e.toString();if(0>t.indexOf("."))return t;for(let e=t.length-1;e>=0;e--)if("0"===t[e])t=t.slice(0,e);else break;return t.length>0&&"."===t[t.length-1]&&(t=t.slice(0,t.length-1)),t}static getTenExponentN(e){if(e<-n.Dec.precision)throw Error("Too little precision");if(o.tenExponentNs[e.toString()])return o.tenExponentNs[e.toString()];let t=new n.Dec(10).pow(new i.Int(e));return o.tenExponentNs[e.toString()]=t,t}static getTenExponentNInPrecisionRange(e){if(e>n.Dec.precision)throw Error("Too much precision");return o.getTenExponentN(e)}static getPrecisionDec(e){return o.getTenExponentNInPrecisionRange(e)}}t.DecUtils=o,o.tenExponentNs={}},61155:function(e,t,r){"use strict";var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Dec=void 0;let i=n(r(47909)),o=r(33086),a=r(88404),s=r(77173);class l{static calcPrecisionMultiplier(e){if(e<0)throw Error("Invalid prec");if(e>l.precision)throw Error("Too much precision");let t=e.toString(),r=l.precisionMultipliers.get(t);if(r)return r;let n=l.precision-e,o=(0,i.default)(10).pow(n);return l.precisionMultipliers.set(t,o),o}static reduceDecimalsFromString(e){let t=e.indexOf(".");if(t<0)return{res:e,isDownToZero:!1};let r=e.length-1-t-l.precision;if(r<=0)return{res:e,isDownToZero:!1};let n=e.slice(0,e.length-r);return{res:n,isDownToZero:/^[0.]*$/.test(n)}}checkBitLen(){if(this.int.abs().gt(l.maxDec))throw Error("Integer out of range ".concat(this.int.toString()))}isZero(){return this.int.eq((0,i.default)(0))}isNegative(){return this.int.isNegative()}isPositive(){return this.int.isPositive()}equals(e){return this.int.eq(e.int)}gt(e){return this.int.gt(e.int)}gte(e){return this.int.geq(e.int)}lt(e){return this.int.lt(e.int)}lte(e){return this.int.leq(e.int)}neg(){return new l(this.int.negate(),l.precision)}abs(){return new l(this.int.abs(),l.precision)}add(e){return new l(this.int.add(e.int),l.precision)}sub(e){return new l(this.int.subtract(e.int),l.precision)}pow(e){if(e.isZero())return new l(1);if(e.isNegative())return new l(1).quo(this.pow(e.abs()));let t=new l(this.int,l.precision),r=new l(1);for(let n=e;n.gt(new o.Int(1));n=n.div(new o.Int(2)))n.mod(new o.Int(2)).isZero()||(r=r.mul(t)),t=t.mul(t);return t.mul(r)}approxSqrt(){return this.approxRoot(2)}approxRoot(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:300;if(this.isNegative())return this.neg().approxRoot(e).neg();if(1===e||this.isZero()||this.equals(l.one))return this;if(0===e)return l.one;let[r,n]=[l.one,l.one];for(let i=0;n.abs().gt(l.smallestDec)&&i0&&void 0!==arguments[0]?arguments[0]:l.precision,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=l.calcPrecisionMultiplier(0),{quotient:n,remainder:o}=this.int.abs().divmod(r),a=o.toString(10);for(let e=0,t=a.length;e0?"."+a:"")}round(){return new o.Int(this.chopPrecisionAndRound())}roundUp(){return new o.Int(this.chopPrecisionAndRoundUp())}truncate(){return new o.Int(this.chopPrecisionAndTruncate())}roundDec(){return new l(this.chopPrecisionAndRound(),0)}roundUpDec(){return new l(this.chopPrecisionAndRoundUp(),0)}truncateDec(){return new l(this.chopPrecisionAndTruncate(),0)}constructor(e,t=0){if("number"==typeof e&&(e=e.toString()),"string"==typeof e){if(0===e.length)throw Error("empty string");if(!(0,a.isValidDecimalString)(e)){if((0,a.isExponentDecString)(e))e=(0,a.exponentDecStringToDecString)(e);else throw Error("invalid decimal: ".concat(e))}let r=l.reduceDecimalsFromString(e);r.isDownToZero&&console.log("WARNING: Got ".concat(e,". Dec can only handle up to 18 decimals. However, since the decimal point of the input exceeds 18 digits, the remainder is discarded. As a result, input becomes 0.")),(e=r.res).indexOf(".")>=0&&(t=e.length-e.indexOf(".")-1,e=e.replace(".","")),this.int=(0,i.default)(e)}else e instanceof o.Int?this.int=(0,i.default)(e.toString()):e instanceof o.Uint?this.int=(0,i.default)(e.toString()):this.int=(0,i.default)(e);this.int=this.int.multiply(l.calcPrecisionMultiplier(t)),this.checkBitLen()}}t.Dec=l,l.precision=18,l.decimalPrecisionBits=60,l.maxDec=(0,i.default)("133499189745056880149688856635597007162669032647290798121690100488888732861290034376435130433535"),l.precisionMultipliers=new Map,l.zero=new l(0),l.smallestDec=new l("1",l.precision),l.one=new l(1),o.Int.prototype.toDec=function(){return new l(this)},o.Uint.prototype.toDec=function(){return new l(this)}},88404:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.exponentDecStringToDecString=t.isExponentDecString=t.isValidDecimalString=t.isValidIntegerString=void 0;let r=/^-?\d+$/,n=/^-?\d+.?\d*$/,i=/^(-?)([\d.]+)e([-+])([\d]+)$/;function o(e){return r.test(e)}function a(e){return n.test(e)}function s(e){return i.test(e)}function l(e){let t="";for(let r=0;r0&&"0"===e[0];)e=e.slice(1);return 0===e.length||"."===e[0]?"0"+e:e}function d(e){let t=e.split(i);if(6!==t.length)return e;let r="-"===t[1],n=t[2],o=n.indexOf("."),a=parseInt(t[4])*("-"===t[3]?-1:1);o>=0&&(a-=n.length-o-1,n=u(n.replace(".","")));let s=r?"-":"";if(!(a<0))return s+n+l(a);if(n.length>-a){let e=n.length+a;return s+(n.slice(0,e)+".")+n.slice(e)}return s+"0."+l(-(n.length+a))+n}t.isValidIntegerString=o,t.isValidDecimalString=a,t.isExponentDecString=s,t.exponentDecStringToDecString=d},72097:function(e,t,r){"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(93844),t),i(r(21623),t),i(r(33960),t),i(r(33086),t),i(r(61155),t),i(r(19531),t),i(r(18903),t),i(r(47611),t),i(r(31389),t)},93844:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IntPretty=void 0;let n=r(33086),i=r(61155),o=r(18903),a=r(19531);class s{get options(){return this._options}moveDecimalPointLeft(e){let t=this.clone();return t.floatingDecimalPointRight+=-e,t}moveDecimalPointRight(e){let t=this.clone();return t.floatingDecimalPointRight+=e,t}increasePrecision(e){return this.moveDecimalPointLeft(e)}decreasePrecision(e){return this.moveDecimalPointRight(e)}maxDecimals(e){let t=this.clone();return t._options.maxDecimals=e,t}inequalitySymbol(e){let t=this.clone();return t._options.inequalitySymbol=e,t}inequalitySymbolSeparator(e){let t=this.clone();return t._options.inequalitySymbolSeparator=e,t}trim(e){let t=this.clone();return t._options.trim=e,t}shrink(e){let t=this.clone();return t._options.shrink=e,t}locale(e){let t=this.clone();return t._options.locale=e,t}ready(e){let t=this.clone();return t._options.ready=e,t}get isReady(){return this._options.ready}add(e){e instanceof i.Dec||(e=e.toDec());let t=new s(this.toDec().add(e));return t._options=Object.assign({},this._options),t}sub(e){e instanceof i.Dec||(e=e.toDec());let t=new s(this.toDec().sub(e));return t._options=Object.assign({},this._options),t}mul(e){e instanceof i.Dec||(e=e.toDec());let t=new s(this.toDec().mul(e));return t._options=Object.assign({},this._options),t}quo(e){e instanceof i.Dec||(e=e.toDec());let t=new s(this.toDec().quo(e));return t._options=Object.assign({},this._options),t}toDec(){if(0===this.floatingDecimalPointRight)return this.dec;if(this.floatingDecimalPointRight>0)return this.dec.mulTruncate(o.DecUtils.getTenExponentN(this.floatingDecimalPointRight));{let e=-this.floatingDecimalPointRight,t=this.dec;for(;e>0;)if(e>=i.Dec.precision)t=t.mulTruncate(o.DecUtils.getTenExponentN(-i.Dec.precision)),e-=i.Dec.precision;else{t=t.mulTruncate(o.DecUtils.getTenExponentN(-(e%i.Dec.precision)));break}return t}}toString(){return this.toStringWithSymbols("","")}toStringWithSymbols(e,t){let r;let n=this.toDec();if(this._options.inequalitySymbol&&!n.isZero()&&n.abs().lt(o.DecUtils.getTenExponentN(-this._options.maxDecimals))){let r=n.isNegative();return"".concat(r?">":"<").concat(this._options.inequalitySymbolSeparator).concat(r?"-":"").concat(e).concat(o.DecUtils.getTenExponentN(-this._options.maxDecimals).toString(this._options.maxDecimals,this._options.locale)).concat(t)}r=this._options.shrink?a.CoinUtils.shrinkDecimals(n,0,this._options.maxDecimals,this._options.locale):n.toString(this._options.maxDecimals,this._options.locale),this._options.trim&&(r=o.DecUtils.trim(r));let i="-"===r.charAt(0);return i&&(r=r.slice(1)),"".concat(i?"-":"").concat(e).concat(r).concat(t)}clone(){let e=new s(this.dec);return e.dec=this.dec,e.floatingDecimalPointRight=this.floatingDecimalPointRight,e._options=Object.assign({},this._options),e}constructor(e){if(this.floatingDecimalPointRight=0,this._options={maxDecimals:0,trim:!1,shrink:!1,ready:!0,locale:!0,inequalitySymbol:!1,inequalitySymbolSeparator:" "},"object"==typeof e&&"toDec"in e?e=e.toDec():e instanceof i.Dec||(e=new i.Dec(e)),e.isZero()){this.dec=e;return}let t=e,r=0;for(let e=0;e<18&&!(!t.truncate().equals(new n.Int(0))&&t.equals(new i.Dec(t.truncate())));e++)t=t.mul(new i.Dec(10)),r++;this.dec=e,this._options.maxDecimals=r}}t.IntPretty=s},33086:function(e,t,r){"use strict";var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Uint=t.Int=void 0;let i=n(r(47909)),o=r(88404);class a{checkBitLen(){if(this.int.abs().gt(a.maxInt))throw Error("Integer out of range ".concat(this.int.toString()))}toString(){return this.int.toString(10)}isNegative(){return this.int.isNegative()}isPositive(){return this.int.isPositive()}isZero(){return this.int.eq((0,i.default)(0))}equals(e){return this.int.equals(e.int)}gt(e){return this.int.gt(e.int)}gte(e){return this.int.greaterOrEquals(e.int)}lt(e){return this.int.lt(e.int)}lte(e){return this.int.lesserOrEquals(e.int)}abs(){return new a(this.int.abs())}absUInt(){return new s(this.int.abs())}add(e){return new a(this.int.add(e.int))}sub(e){return new a(this.int.subtract(e.int))}mul(e){return new a(this.int.multiply(e.int))}div(e){return new a(this.int.divide(e.int))}mod(e){return new a(this.int.mod(e.int))}neg(){return new a(this.int.negate())}pow(e){return new a(this.int.pow(e.toBigNumber()))}toBigNumber(){return this.int}constructor(e){if("number"==typeof e&&(e=e.toString()),"string"==typeof e){if(!(0,o.isValidIntegerString)(e)){if((0,o.isExponentDecString)(e))e=(0,o.exponentDecStringToDecString)(e);else throw Error("invalid integer: ".concat(e))}this.int=(0,i.default)(e)}else this.int=(0,i.default)(e);this.checkBitLen()}}t.Int=a,a.maxInt=(0,i.default)("115792089237316195423570985008687907853269984665640564039457584007913129639935");class s{checkBitLen(){if(this.uint.abs().bitLength().gt(256))throw Error("Integer out of range ".concat(this.uint.toString()))}toString(){return this.uint.toString(10)}isZero(){return this.uint.eq((0,i.default)(0))}equals(e){return this.uint.equals(e.uint)}gt(e){return this.uint.gt(e.uint)}gte(e){return this.uint.greaterOrEquals(e.uint)}lt(e){return this.uint.lt(e.uint)}lte(e){return this.uint.lesserOrEquals(e.uint)}add(e){return new s(this.uint.add(e.uint))}sub(e){return new s(this.uint.subtract(e.uint))}mul(e){return new s(this.uint.multiply(e.uint))}div(e){return new s(this.uint.divide(e.uint))}mod(e){return new s(this.uint.mod(e.uint))}pow(e){return new s(this.uint.pow(e.toBigNumber()))}toBigNumber(){return this.uint}constructor(e){if("number"==typeof e&&(e=e.toString()),"string"==typeof e){if(!(0,o.isValidIntegerString)(e)){if((0,o.isExponentDecString)(e))e=(0,o.exponentDecStringToDecString)(e);else throw Error("invalid integer: ".concat(e))}this.uint=(0,i.default)(e)}else this.uint=(0,i.default)(e);if(this.uint.isNegative())throw TypeError("Uint should not be negative");this.checkBitLen()}}t.Uint=s},47611:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PricePretty=void 0;let n=r(93844),i=r(18903);class o{get options(){return Object.assign(Object.assign({},this.intPretty.options),this._options)}get symbol(){return this._fiatCurrency.symbol}get fiatCurrency(){return this._fiatCurrency}separator(e){let t=this.clone();return t._options.separator=e,t}upperCase(e){let t=this.clone();return t._options.upperCase=e,t._options.lowerCase=!e,t}lowerCase(e){let t=this.clone();return t._options.lowerCase=e,t._options.upperCase=!e,t}moveDecimalPointLeft(e){let t=this.clone();return t.intPretty=t.intPretty.moveDecimalPointLeft(e),t}moveDecimalPointRight(e){let t=this.clone();return t.intPretty=t.intPretty.moveDecimalPointRight(e),t}increasePrecision(e){return this.moveDecimalPointLeft(e)}decreasePrecision(e){return this.moveDecimalPointRight(e)}maxDecimals(e){let t=this.clone();return t.intPretty=t.intPretty.maxDecimals(e),t}inequalitySymbol(e){let t=this.clone();return t.intPretty=t.intPretty.inequalitySymbol(e),t}inequalitySymbolSeparator(e){let t=this.clone();return t.intPretty=t.intPretty.inequalitySymbolSeparator(e),t}trim(e){let t=this.clone();return t.intPretty=t.intPretty.trim(e),t}shrink(e){let t=this.clone();return t.intPretty=t.intPretty.shrink(e),t}locale(e){let t=this.clone();return t._options.locale=e,t}ready(e){let t=this.clone();return t.intPretty=t.intPretty.ready(e),t}get isReady(){return this.intPretty.isReady}add(e){let t=this.clone();return t.intPretty=t.intPretty.add(e),t}sub(e){let t=this.clone();return t.intPretty=t.intPretty.sub(e),t}mul(e){let t=this.clone();return t.intPretty=t.intPretty.mul(e),t}quo(e){let t=this.clone();return t.intPretty=t.intPretty.quo(e),t}toDec(){return this.intPretty.toDec()}toString(){let e=this.symbol;this._options.upperCase&&(e=e.toUpperCase()),this._options.lowerCase&&(e=e.toLowerCase());let t=this.toDec(),r=this.options;if(r.inequalitySymbol&&!t.isZero()&&t.abs().lt(i.DecUtils.getTenExponentN(-r.maxDecimals)))return this.intPretty.toStringWithSymbols("".concat(e).concat(this._options.separator),"");let n=parseFloat(this.intPretty.toString()).toLocaleString(r.locale,{maximumFractionDigits:r.maxDecimals}),o="-"===n.charAt(0);return o&&(n=n.slice(1)),"".concat(o?"-":"").concat(e).concat(this._options.separator).concat(n)}clone(){let e=new o(this._fiatCurrency,0);return e._options=Object.assign({},this._options),e.intPretty=this.intPretty.clone(),e}constructor(e,t){this._fiatCurrency=e,this._options={separator:"",upperCase:!1,lowerCase:!1,locale:"en-US"},this.intPretty=new n.IntPretty(t).maxDecimals(e.maxDecimals).shrink(!0).trim(!0).locale(!1).inequalitySymbol(!0),this._options.locale=e.locale}}t.PricePretty=o},31389:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RatePretty=void 0;let n=r(93844);class i{get options(){return Object.assign(Object.assign({},this.intPretty.options),this._options)}separator(e){let t=this.clone();return t._options.separator=e,t}symbol(e){let t=this.clone();return t._options.symbol=e,t}moveDecimalPointLeft(e){let t=this.clone();return t.intPretty=t.intPretty.moveDecimalPointLeft(e),t}moveDecimalPointRight(e){let t=this.clone();return t.intPretty=t.intPretty.moveDecimalPointRight(e),t}maxDecimals(e){let t=this.clone();return t.intPretty=t.intPretty.maxDecimals(e),t}inequalitySymbol(e){let t=this.clone();return t.intPretty=t.intPretty.inequalitySymbol(e),t}inequalitySymbolSeparator(e){let t=this.clone();return t.intPretty=t.intPretty.inequalitySymbolSeparator(e),t}trim(e){let t=this.clone();return t.intPretty=t.intPretty.trim(e),t}shrink(e){let t=this.clone();return t.intPretty=t.intPretty.shrink(e),t}locale(e){let t=this.clone();return t.intPretty=t.intPretty.locale(e),t}ready(e){let t=this.clone();return t.intPretty=t.intPretty.ready(e),t}get isReady(){return this.intPretty.isReady}add(e){let t=this.clone();return t.intPretty=t.intPretty.add(e),t}sub(e){let t=this.clone();return t.intPretty=t.intPretty.sub(e),t}mul(e){let t=this.clone();return t.intPretty=t.intPretty.mul(e),t}quo(e){let t=this.clone();return t.intPretty=t.intPretty.quo(e),t}toDec(){return this.intPretty.toDec()}toString(){return this.intPretty.moveDecimalPointRight(2).toStringWithSymbols("","".concat(this._options.separator).concat(this._options.symbol))}clone(){let e=new i(0);return e._options=Object.assign({},this._options),e.intPretty=this.intPretty.clone(),e}constructor(e){this._options={separator:"",symbol:"%"},this.intPretty=new n.IntPretty(e),this.intPretty=this.intPretty.maxDecimals(3).shrink(!1).trim(!0).locale(!0).inequalitySymbol(!0)}}t.RatePretty=i},77173:function(e,t){"use strict";function r(e){if(e.indexOf(".")>=0)throw Error("".concat(e," is not integer"));if("undefined"!=typeof BigInt)return BigInt(e).toLocaleString("en-US");let t=e,r=[];for(let e=t.length;e>0;e-=3)r.push(t.slice(Math.max(0,e-3),e));return r.reverse().join(",")}Object.defineProperty(t,"__esModule",{value:!0}),t.integerStringToUSLocaleString=void 0,t.integerStringToUSLocaleString=r},20996:function(e,t,r){"use strict";r.d(t,{d:function(){return c}});var n=r(64090),i=r(14255),o=r(66871),a=function(e){let t=n.useRef(e);return(0,o.Z)(()=>{t.current=e}),n.useRef(function(){for(var e=arguments.length,r=Array(e),n=0;n(setTimeout(()=>{g.current=!0},0),()=>{g.current=!1}),[]);let y=(0,i.Z)(t.ref,h),v=a(e=>{let t;let n=m.current;m.current=!1;let i=s(h.current);if(!(!g.current||!h.current||"clientX"in e&&d(e,i))){if(f.current){f.current=!1;return}(t=e.composedPath?e.composedPath().indexOf(h.current)>-1:!i.documentElement.contains(e.target)||h.current.contains(e.target))||!r&&n||c(e)}}),b=e=>r=>{m.current=!0;let n=t.props[e];n&&n(r)},S={ref:y};return!1!==p&&(S[p]=b(p)),n.useEffect(()=>{if(!1!==p){let e=u(p),t=s(h.current),r=()=>{f.current=!0};return t.addEventListener(e,v),t.addEventListener("touchmove",r),()=>{t.removeEventListener(e,v),t.removeEventListener("touchmove",r)}}},[v,p]),!1!==o&&(S[o]=b(o)),n.useEffect(()=>{if(!1!==o){let e=u(o),t=s(h.current);return t.addEventListener(e,v),()=>{t.removeEventListener(e,v)}}},[v,o]),(0,l.jsx)(n.Fragment,{children:n.cloneElement(t,S)})}},32283:function(e,t,r){"use strict";r.d(t,{G:function(){return tr}});var n=r(14749);function i(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n=0||(i[r]=e[r]);return i}var o=r(64090);let a=Math.min,s=Math.max,l=Math.round,u=Math.floor,d=e=>({x:e,y:e}),c={left:"right",right:"left",bottom:"top",top:"bottom"},p={start:"end",end:"start"};function f(e,t,r){return s(e,a(t,r))}function h(e,t){return"function"==typeof e?e(t):e}function g(e){return e.split("-")[0]}function m(e){return e.split("-")[1]}function y(e){return"x"===e?"y":"x"}function v(e){return"y"===e?"height":"width"}function b(e){return["top","bottom"].includes(g(e))?"y":"x"}function S(e){return y(b(e))}function w(e,t,r){void 0===r&&(r=!1);let n=m(e),i=S(e),o=v(i),a="x"===i?n===(r?"end":"start")?"right":"left":"start"===n?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=A(a)),[a,A(a)]}function _(e){let t=A(e);return[k(e),t,k(t)]}function k(e){return e.replace(/start|end/g,e=>p[e])}function O(e,t,r){let n=["left","right"],i=["right","left"],o=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":if(r)return t?i:n;return t?n:i;case"left":case"right":return t?o:a;default:return[]}}function P(e,t,r,n){let i=m(e),o=O(g(e),"start"===r,n);return i&&(o=o.map(e=>e+"-"+i),t&&(o=o.concat(o.map(k)))),o}function A(e){return e.replace(/left|right|bottom|top/g,e=>c[e])}function I(e){return{top:0,right:0,bottom:0,left:0,...e}}function R(e){return"number"!=typeof e?I(e):{top:e,right:e,bottom:e,left:e}}function E(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function T(e,t,r){let n,{reference:i,floating:o}=e,a=b(t),s=S(t),l=v(s),u=g(t),d="y"===a,c=i.x+i.width/2-o.width/2,p=i.y+i.height/2-o.height/2,f=i[l]/2-o[l]/2;switch(u){case"top":n={x:c,y:i.y-o.height};break;case"bottom":n={x:c,y:i.y+i.height};break;case"right":n={x:i.x+i.width,y:p};break;case"left":n={x:i.x-o.width,y:p};break;default:n={x:i.x,y:i.y}}switch(m(t)){case"start":n[s]-=f*(r&&d?-1:1);break;case"end":n[s]+=f*(r&&d?-1:1)}return n}let N=async(e,t,r)=>{let{placement:n="bottom",strategy:i="absolute",middleware:o=[],platform:a}=r,s=o.filter(Boolean),l=await (null==a.isRTL?void 0:a.isRTL(t)),u=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:d,y:c}=T(u,n,l),p=n,f={},h=0;for(let r=0;re<=0)){let e=((null==(i=l.flip)?void 0:i.index)||0)+1,t=T[e];if(t)return{data:{index:e,overflows:C},reset:{placement:t}};let r=null==(o=C.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:o.placement;if(!r)switch(v){case"bestFit":{let e=null==(a=C.map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:a[0];e&&(r=e);break}case"initialPlacement":r=d}if(s!==r)return{reset:{placement:r}}}return{}}}};async function C(e,t){let{placement:r,platform:n,elements:i}=e,o=await (null==n.isRTL?void 0:n.isRTL(i.floating)),a=g(r),s=m(r),l="y"===b(r),u=["left","top"].includes(a)?-1:1,d=o&&l?-1:1,c=h(t,e),{mainAxis:p,crossAxis:f,alignmentAxis:y}="number"==typeof c?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...c};return s&&"number"==typeof y&&(f="end"===s?-1*y:y),l?{x:f*d,y:p*u}:{x:p*u,y:f*d}}let M=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var r,n;let{x:i,y:o,placement:a,middlewareData:s}=t,l=await C(t,e);return a===(null==(r=s.offset)?void 0:r.placement)&&null!=(n=s.arrow)&&n.alignmentOffset?{}:{x:i+l.x,y:o+l.y,data:{...l,placement:a}}}}},D=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){let{x:r,y:n,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:e=>{let{x:t,y:r}=e;return{x:t,y:r}}},...l}=h(e,t),u={x:r,y:n},d=await x(t,l),c=b(g(i)),p=y(c),m=u[p],v=u[c];if(o){let e="y"===p?"top":"left",t="y"===p?"bottom":"right",r=m+d[e],n=m-d[t];m=f(r,m,n)}if(a){let e="y"===c?"top":"left",t="y"===c?"bottom":"right",r=v+d[e],n=v-d[t];v=f(r,v,n)}let S=s.fn({...t,[p]:m,[c]:v});return{...S,data:{x:S.x-r,y:S.y-n}}}}};function U(e){return H(e)?(e.nodeName||"").toLowerCase():"#document"}function J(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function j(e){var t;return null==(t=(H(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function H(e){return e instanceof Node||e instanceof J(e).Node}function q(e){return e instanceof Element||e instanceof J(e).Element}function L(e){return e instanceof HTMLElement||e instanceof J(e).HTMLElement}function F(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof J(e).ShadowRoot)}function V(e){let{overflow:t,overflowX:r,overflowY:n,display:i}=Y(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(i)}function z(e){return["table","td","th"].includes(U(e))}function W(e){let t=G(),r=Y(e);return"none"!==r.transform||"none"!==r.perspective||!!r.containerType&&"normal"!==r.containerType||!t&&!!r.backdropFilter&&"none"!==r.backdropFilter||!t&&!!r.filter&&"none"!==r.filter||["transform","perspective","filter"].some(e=>(r.willChange||"").includes(e))||["paint","layout","strict","content"].some(e=>(r.contain||"").includes(e))}function Q(e){let t=X(e);for(;L(t)&&!K(t);){if(W(t))return t;t=X(t)}return null}function G(){return"undefined"!=typeof CSS&&!!CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")}function K(e){return["html","body","#document"].includes(U(e))}function Y(e){return J(e).getComputedStyle(e)}function Z(e){return q(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function X(e){if("html"===U(e))return e;let t=e.assignedSlot||e.parentNode||F(e)&&e.host||j(e);return F(t)?t.host:t}function $(e){let t=X(e);return K(t)?e.ownerDocument?e.ownerDocument.body:e.body:L(t)&&V(t)?t:$(t)}function ee(e,t,r){var n;void 0===t&&(t=[]),void 0===r&&(r=!0);let i=$(e),o=i===(null==(n=e.ownerDocument)?void 0:n.body),a=J(i);return o?t.concat(a,a.visualViewport||[],V(i)?i:[],a.frameElement&&r?ee(a.frameElement):[]):t.concat(i,ee(i,[],r))}function et(e){let t=Y(e),r=parseFloat(t.width)||0,n=parseFloat(t.height)||0,i=L(e),o=i?e.offsetWidth:r,a=i?e.offsetHeight:n,s=l(r)!==o||l(n)!==a;return s&&(r=o,n=a),{width:r,height:n,$:s}}function er(e){return q(e)?e:e.contextElement}function en(e){let t=er(e);if(!L(t))return d(1);let r=t.getBoundingClientRect(),{width:n,height:i,$:o}=et(t),a=(o?l(r.width):r.width)/n,s=(o?l(r.height):r.height)/i;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}let ei=d(0);function eo(e){let t=J(e);return G()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:ei}function ea(e,t,r){return void 0===t&&(t=!1),!!r&&(!t||r===J(e))&&t}function es(e,t,r,n){void 0===t&&(t=!1),void 0===r&&(r=!1);let i=e.getBoundingClientRect(),o=er(e),a=d(1);t&&(n?q(n)&&(a=en(n)):a=en(e));let s=ea(o,r,n)?eo(o):d(0),l=(i.left+s.x)/a.x,u=(i.top+s.y)/a.y,c=i.width/a.x,p=i.height/a.y;if(o){let e=J(o),t=n&&q(n)?J(n):n,r=e,i=r.frameElement;for(;i&&n&&t!==r;){let e=en(i),t=i.getBoundingClientRect(),n=Y(i),o=t.left+(i.clientLeft+parseFloat(n.paddingLeft))*e.x,a=t.top+(i.clientTop+parseFloat(n.paddingTop))*e.y;l*=e.x,u*=e.y,c*=e.x,p*=e.y,l+=o,u+=a,i=(r=J(i)).frameElement}}return E({width:c,height:p,x:l,y:u})}let el=[":popover-open",":modal"];function eu(e){return el.some(t=>{try{return e.matches(t)}catch(e){return!1}})}function ed(e){return es(j(e)).left+Z(e).scrollLeft}function ec(e){let t=j(e),r=Z(e),n=e.ownerDocument.body,i=s(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),o=s(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight),a=-r.scrollLeft+ed(e),l=-r.scrollTop;return"rtl"===Y(n).direction&&(a+=s(t.clientWidth,n.clientWidth)-i),{width:i,height:o,x:a,y:l}}function ep(e,t){let r=J(e),n=j(e),i=r.visualViewport,o=n.clientWidth,a=n.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;let e=G();(!e||e&&"fixed"===t)&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}function ef(e,t){let r=es(e,!0,"fixed"===t),n=r.top+e.clientTop,i=r.left+e.clientLeft,o=L(e)?en(e):d(1),a=e.clientWidth*o.x;return{width:a,height:e.clientHeight*o.y,x:i*o.x,y:n*o.y}}function eh(e,t,r){let n;if("viewport"===t)n=ep(e,r);else if("document"===t)n=ec(j(e));else if(q(t))n=ef(t,r);else{let r=eo(e);n={...t,x:t.x-r.x,y:t.y-r.y}}return E(n)}function eg(e,t){let r=X(e);return!(r===t||!q(r)||K(r))&&("fixed"===Y(r).position||eg(r,t))}function em(e,t){let r=t.get(e);if(r)return r;let n=ee(e,[],!1).filter(e=>q(e)&&"body"!==U(e)),i=null,o="fixed"===Y(e).position,a=o?X(e):e;for(;q(a)&&!K(a);){let t=Y(a),r=W(a);r||"fixed"!==t.position||(i=null),(o?!r&&!i:!r&&"static"===t.position&&!!i&&["absolute","fixed"].includes(i.position)||V(a)&&!r&&eg(e,a))?n=n.filter(e=>e!==a):i=t,a=X(a)}return t.set(e,n),n}function ey(e,t,r){let n=L(t),i=j(t),o="fixed"===r,a=es(e,!0,o,t),s={scrollLeft:0,scrollTop:0},l=d(0);if(n||!n&&!o){if(("body"!==U(t)||V(i))&&(s=Z(t)),n){let e=es(t,!0,o,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else i&&(l.x=ed(i))}return{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function ev(e,t){return L(e)&&"fixed"!==Y(e).position?t?t(e):e.offsetParent:null}function eb(e,t){let r=J(e);if(!L(e)||eu(e))return r;let n=ev(e,t);for(;n&&z(n)&&"static"===Y(n).position;)n=ev(n,t);return n&&("html"===U(n)||"body"===U(n)&&"static"===Y(n).position&&!W(n))?r:n||Q(e)||r}let eS=async function(e){let t=this.getOffsetParent||eb,r=this.getDimensions;return{reference:ey(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,...await r(e.floating)}}},ew={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e,o="fixed"===i,a=j(n),s=!!t&&eu(t.floating);if(n===a||s&&o)return r;let l={scrollLeft:0,scrollTop:0},u=d(1),c=d(0),p=L(n);if((p||!p&&!o)&&(("body"!==U(n)||V(a))&&(l=Z(n)),L(n))){let e=es(n);u=en(n),c.x=e.x+n.clientLeft,c.y=e.y+n.clientTop}return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-l.scrollLeft*u.x+c.x,y:r.y*u.y-l.scrollTop*u.y+c.y}},getDocumentElement:j,getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e,o=[..."clippingAncestors"===r?em(t,this._c):[].concat(r),n],l=o[0],u=o.reduce((e,r)=>{let n=eh(t,r,i);return e.top=s(n.top,e.top),e.right=a(n.right,e.right),e.bottom=a(n.bottom,e.bottom),e.left=s(n.left,e.left),e},eh(t,l,i));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}},getOffsetParent:eb,getElementRects:eS,getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){let{width:t,height:r}=et(e);return{width:t,height:r}},getScale:en,isElement:q,isRTL:function(e){return"rtl"===Y(e).direction}};function e_(e,t){let r,n=null,i=j(e);function o(){var e;clearTimeout(r),null==(e=n)||e.disconnect(),n=null}function l(d,c){void 0===d&&(d=!1),void 0===c&&(c=1),o();let{left:p,top:f,width:h,height:g}=e.getBoundingClientRect();if(d||t(),!h||!g)return;let m=u(f),y={rootMargin:-m+"px "+-u(i.clientWidth-(p+h))+"px "+-u(i.clientHeight-(f+g))+"px "+-u(p)+"px",threshold:s(0,a(1,c))||1},v=!0;function b(e){let t=e[0].intersectionRatio;if(t!==c){if(!v)return l();t?l(!1,t):r=setTimeout(()=>{l(!1,1e-7)},100)}v=!1}try{n=new IntersectionObserver(b,{...y,root:i.ownerDocument})}catch(e){n=new IntersectionObserver(b,y)}n.observe(e)}return l(!0),o}function ek(e,t,r,n){let i;void 0===n&&(n={});let{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:u=!1}=n,d=er(e),c=o||a?[...d?ee(d):[],...ee(t)]:[];c.forEach(e=>{o&&e.addEventListener("scroll",r,{passive:!0}),a&&e.addEventListener("resize",r)});let p=d&&l?e_(d,r):null,f=-1,h=null;s&&(h=new ResizeObserver(e=>{let[n]=e;n&&n.target===d&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;null==(e=h)||e.observe(t)})),r()}),d&&!u&&h.observe(d),h.observe(t));let g=u?es(e):null;function m(){let t=es(e);g&&(t.x!==g.x||t.y!==g.y||t.width!==g.width||t.height!==g.height)&&r(),g=t,i=requestAnimationFrame(m)}return u&&m(),r(),()=>{var e;c.forEach(e=>{o&&e.removeEventListener("scroll",r),a&&e.removeEventListener("resize",r)}),null==p||p(),null==(e=h)||e.disconnect(),h=null,u&&cancelAnimationFrame(i)}}let eO=D,eP=B,eA=(e,t,r)=>{let n=new Map,i={platform:ew,...r},o={...i.platform,_c:n};return N(e,t,{...i,platform:o})};var eI=r(89542),eR="undefined"!=typeof document?o.useLayoutEffect:o.useEffect;function eE(e,t){let r,n,i;if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if((r=e.length)!==t.length)return!1;for(n=r;0!=n--;)if(!eE(e[n],t[n]))return!1;return!0}if((r=(i=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(n=r;0!=n--;)if(!({}).hasOwnProperty.call(t,i[n]))return!1;for(n=r;0!=n--;){let r=i[n];if(("_owner"!==r||!e.$$typeof)&&!eE(e[r],t[r]))return!1}return!0}return e!=e&&t!=t}function eT(e){return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function eN(e,t){let r=eT(e);return Math.round(t*r)/r}function ex(e){let t=o.useRef(e);return eR(()=>{t.current=e}),t}function eB(e){void 0===e&&(e={});let{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:i,elements:{reference:a,floating:s}={},transform:l=!0,whileElementsMounted:u,open:d}=e,[c,p]=o.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[f,h]=o.useState(n);eE(f,n)||h(n);let[g,m]=o.useState(null),[y,v]=o.useState(null),b=o.useCallback(e=>{e!==k.current&&(k.current=e,m(e))},[]),S=o.useCallback(e=>{e!==O.current&&(O.current=e,v(e))},[]),w=a||g,_=s||y,k=o.useRef(null),O=o.useRef(null),P=o.useRef(c),A=null!=u,I=ex(u),R=ex(i),E=o.useCallback(()=>{if(!k.current||!O.current)return;let e={placement:t,strategy:r,middleware:f};R.current&&(e.platform=R.current),eA(k.current,O.current,e).then(e=>{let t={...e,isPositioned:!0};T.current&&!eE(P.current,t)&&(P.current=t,eI.flushSync(()=>{p(t)}))})},[f,t,r,R]);eR(()=>{!1===d&&P.current.isPositioned&&(P.current.isPositioned=!1,p(e=>({...e,isPositioned:!1})))},[d]);let T=o.useRef(!1);eR(()=>(T.current=!0,()=>{T.current=!1}),[]),eR(()=>{if(w&&(k.current=w),_&&(O.current=_),w&&_){if(I.current)return I.current(w,_,E);E()}},[w,_,E,I,A]);let N=o.useMemo(()=>({reference:k,floating:O,setReference:b,setFloating:S}),[b,S]),x=o.useMemo(()=>({reference:w,floating:_}),[w,_]),B=o.useMemo(()=>{let e={position:r,left:0,top:0};if(!x.floating)return e;let t=eN(x.floating,c.x),n=eN(x.floating,c.y);return l?{...e,transform:"translate("+t+"px, "+n+"px)",...eT(x.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:t,top:n}},[r,l,x.floating,c.x,c.y]);return o.useMemo(()=>({...c,update:E,refs:N,elements:x,floatingStyles:B}),[c,E,N,x,B])}var eC=r(14255),eM=r(66871);function eD(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,n={};return Object.keys(e).forEach(i=>{n[i]=e[i].reduce((e,n)=>{if(n){let i=t(n);""!==i&&e.push(i),r&&r[n]&&e.push(r[n])}return e},[]).join(" ")}),n}var eU=r(5250),eJ=r(3827);function ej(e){return"function"==typeof e?e():e}let eH=o.forwardRef(function(e,t){let{children:r,container:n,disablePortal:i=!1}=e,[a,s]=o.useState(null),l=(0,eC.Z)(o.isValidElement(r)?r.ref:null,t);if((0,eM.Z)(()=>{i||s(ej(n)||document.body)},[n,i]),(0,eM.Z)(()=>{if(a&&!i)return(0,eU.Z)(t,a),()=>{(0,eU.Z)(t,null)}},[t,a,i]),i){if(o.isValidElement(r)){let e={ref:l};return o.cloneElement(r,e)}return(0,eJ.jsx)(o.Fragment,{children:r})}return(0,eJ.jsx)(o.Fragment,{children:a?eI.createPortal(r,a):a})});function eq(e){return"string"==typeof e}function eL(e,t,r){return void 0===e||eq(e)?t:(0,n.Z)({},t,{ownerState:(0,n.Z)({},t.ownerState,r)})}var eF=r(75504);function eV(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(void 0===e)return{};let r={};return Object.keys(e).filter(r=>r.match(/^on[A-Z]/)&&"function"==typeof e[r]&&!t.includes(r)).forEach(t=>{r[t]=e[t]}),r}function ez(e){if(void 0===e)return{};let t={};return Object.keys(e).filter(t=>!(t.match(/^on[A-Z]/)&&"function"==typeof e[t])).forEach(r=>{t[r]=e[r]}),t}function eW(e){let{getSlotProps:t,additionalProps:r,externalSlotProps:i,externalForwardedProps:o,className:a}=e;if(!t){let e=(0,eF.Z)(null==r?void 0:r.className,a,null==o?void 0:o.className,null==i?void 0:i.className),t=(0,n.Z)({},null==r?void 0:r.style,null==o?void 0:o.style,null==i?void 0:i.style),s=(0,n.Z)({},r,o,i);return e.length>0&&(s.className=e),Object.keys(t).length>0&&(s.style=t),{props:s,internalRef:void 0}}let s=eV((0,n.Z)({},o,i)),l=ez(i),u=ez(o),d=t(s),c=(0,eF.Z)(null==d?void 0:d.className,null==r?void 0:r.className,a,null==o?void 0:o.className,null==i?void 0:i.className),p=(0,n.Z)({},null==d?void 0:d.style,null==r?void 0:r.style,null==o?void 0:o.style,null==i?void 0:i.style),f=(0,n.Z)({},d,r,u,l);return c.length>0&&(f.className=c),Object.keys(p).length>0&&(f.style=p),{props:f,internalRef:d.ref}}function eQ(e,t,r){return"function"==typeof e?e(t,r):e}let eG=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function eK(e){var t;let{elementType:r,externalSlotProps:o,ownerState:a,skipResolvingSlotProps:s=!1}=e,l=i(e,eG),u=s?{}:eQ(o,a),{props:d,internalRef:c}=eW((0,n.Z)({},l,{externalSlotProps:u})),p=(0,eC.Z)(c,null==u?void 0:u.ref,null==(t=e.additionalProps)?void 0:t.ref);return eL(r,(0,n.Z)({},d,{ref:p}),a)}let eY={disableDefaultClasses:!1},eZ=o.createContext(eY);function eX(e){let{disableDefaultClasses:t}=o.useContext(eZ);return r=>t?"":e(r)}let e$={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"},e0="base";function e1(e){return"".concat(e0,"--").concat(e)}function e2(e,t){return"".concat(e0,"-").concat(e,"-").concat(t)}function e3(e,t){let r=e$[t];return r?e1(r):e2(e,t)}let e6="Popup";function e4(e){return e3(e6,e)}function e8(e){let t;let[r,n]=o.useState(!0),i=o.useRef(!1),a=o.useRef(0),[s,l]=o.useState(!1),u=o.useRef(e);o.useEffect(()=>{!e&&a.current>0&&u.current!==e&&(i.current=!0,n(!1)),u.current=e},[e]);let d=o.useCallback(()=>{i.current=!1,n(!0)},[]),c=o.useCallback(()=>(a.current+=1,l(!0),()=>{a.current-=1,0===a.current&&l(!1)}),[]);return t=s?!e&&!i.current&&r:!e,{contextValue:o.useMemo(()=>({requestedEnter:e,onExited:d,registerTransition:c,hasExited:t}),[d,e,c,t]),hasExited:t}}!function(e,t){let r={};t.forEach(t=>{r[t]=e3(e,t)})}(e6,["root","open"]);let e5=o.createContext(null),e7=o.createContext(null),e9=["anchor","children","container","disablePortal","keepMounted","middleware","offset","open","placement","slotProps","slots","strategy"];function te(e){let{open:t}=e;return eD({root:["root",t&&"open"]},eX(e4))}function tt(e){return"function"==typeof e?e():e}let tr=o.forwardRef(function(e,t){var r;let{anchor:a,children:s,container:l,disablePortal:u=!1,keepMounted:d=!1,middleware:c,offset:p=0,open:f=!1,placement:h="bottom",slotProps:g={},slots:m={},strategy:y="absolute"}=e,v=i(e,e9),{refs:b,elements:S,floatingStyles:w,update:_,placement:k}=eB({elements:{reference:tt(a)},open:f,middleware:null!=c?c:[M(null!=p?p:0),eP(),eO()],placement:h,strategy:y,whileElementsMounted:d?void 0:ek}),O=(0,eC.Z)(b.setFloating,t);(0,eM.Z)(()=>{if(d&&f&&S.reference&&S.floating)return ek(S.reference,S.floating,_)},[d,f,S,_]);let P=(0,n.Z)({},e,{disablePortal:u,keepMounted:d,offset:M,open:f,placement:h,finalPlacement:k,strategy:y}),{contextValue:A,hasExited:I}=e8(f),R=d&&I?"hidden":void 0,E=te(P),T=null!=(r=null==m?void 0:m.root)?r:"div",N=eK({elementType:T,externalSlotProps:g.root,externalForwardedProps:v,ownerState:P,className:E.root,additionalProps:{ref:O,role:"tooltip",style:(0,n.Z)({},w,{visibility:R})}}),x=o.useMemo(()=>({placement:k}),[k]);return d||!I?(0,eJ.jsx)(eH,{disablePortal:u,container:l,children:(0,eJ.jsx)(e7.Provider,{value:x,children:(0,eJ.jsx)(e5.Provider,{value:A,children:(0,eJ.jsx)(T,(0,n.Z)({},N,{children:s}))})})}):null})},5250:function(e,t,r){"use strict";function n(e,t){"function"==typeof e?e(t):e&&(e.current=t)}r.d(t,{Z:function(){return n}})},66871:function(e,t,r){"use strict";let n=r(64090).useLayoutEffect;t.Z=n},14255:function(e,t,r){"use strict";r.d(t,{Z:function(){return o}});var n=r(64090),i=r(5250);function o(){for(var e=arguments.length,t=Array(e),r=0;rt.every(e=>null==e)?null:e=>{t.forEach(t=>{(0,i.Z)(t,e)})},t)}},65727:function(e,t){"use strict";function r(e){if(!Number.isSafeInteger(e)||e<0)throw Error("Wrong positive integer: ".concat(e))}function n(e){if("boolean"!=typeof e)throw Error("Expected boolean, not ".concat(e))}function i(e){return e instanceof Uint8Array||null!=e&&"object"==typeof e&&"Uint8Array"===e.constructor.name}function o(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n0&&!r.includes(e.length))throw Error("Expected Uint8Array of length ".concat(r,", not of length=").concat(e.length))}function a(e){if("function"!=typeof e||"function"!=typeof e.create)throw Error("Hash should be wrapped by utils.wrapConstructor");r(e.outputLen),r(e.blockLen)}function s(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];if(e.destroyed)throw Error("Hash instance has been destroyed");if(t&&e.finished)throw Error("Hash#digest() has already been called")}function l(e,t){o(e);let r=t.outputLen;if(e.length>i&o),s=Number(r&o),l=n?4:0,u=n?0:4;e.setUint32(t+l,a,n),e.setUint32(t+u,s,n)}class a extends i.Hash{update(e){(0,n.exists)(this);let{view:t,buffer:r,blockLen:o}=this,a=(e=(0,i.toBytes)(e)).length;for(let n=0;na-l&&(this.process(r,0),l=0);for(let e=l;ep.length)throw Error("_sha2: outputLen bigger than state");for(let e=0;e1&&void 0!==arguments[1]&&arguments[1];return t?{h:Number(e&r),l:Number(e>>n&r)}:{h:0|Number(e>>n&r),l:0|Number(e&r)}}function o(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=new Uint32Array(e.length),n=new Uint32Array(e.length);for(let o=0;oBigInt(e>>>0)<>>0);t.toBig=a;let s=(e,t,r)=>e>>>r;t.shrSH=s;let l=(e,t,r)=>e<<32-r|t>>>r;t.shrSL=l;let u=(e,t,r)=>e>>>r|t<<32-r;t.rotrSH=u;let d=(e,t,r)=>e<<32-r|t>>>r;t.rotrSL=d;let c=(e,t,r)=>e<<64-r|t>>>r-32;t.rotrBH=c;let p=(e,t,r)=>e>>>r-32|t<<64-r;t.rotrBL=p;let f=(e,t)=>t;t.rotr32H=f;let h=(e,t)=>e;t.rotr32L=h;let g=(e,t,r)=>e<>>32-r;t.rotlSH=g;let m=(e,t,r)=>t<>>32-r;t.rotlSL=m;let y=(e,t,r)=>t<>>64-r;t.rotlBH=y;let v=(e,t,r)=>e<>>64-r;function b(e,t,r,n){let i=(t>>>0)+(n>>>0);return{h:e+r+(i/4294967296|0)|0,l:0|i}}t.rotlBL=v,t.add=b;let S=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0);t.add3L=S;let w=(e,t,r,n)=>t+r+n+(e/4294967296|0)|0;t.add3H=w;let _=(e,t,r,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0);t.add4L=_;let k=(e,t,r,n,i)=>t+r+n+i+(e/4294967296|0)|0;t.add4H=k;let O=(e,t,r,n,i)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0)+(i>>>0);t.add5L=O;let P=(e,t,r,n,i,o)=>t+r+n+i+o+(e/4294967296|0)|0;t.add5H=P;let A={fromBig:i,split:o,toBig:a,shrSH:s,shrSL:l,rotrSH:u,rotrSL:d,rotrBH:c,rotrBL:p,rotr32H:f,rotr32L:h,rotlSH:g,rotlSL:m,rotlBH:y,rotlBL:v,add:b,add3L:S,add3H:w,add4L:_,add4H:k,add5H:P,add5L:O};t.default=A},32125:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.crypto=void 0,t.crypto="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0},55543:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hmac=t.HMAC=void 0;let n=r(65727),i=r(83245);class o extends i.Hash{update(e){return(0,n.exists)(this),this.iHash.update(e),this}digestInto(e){(0,n.exists)(this),(0,n.bytes)(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){let e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));let{oHash:t,iHash:r,finished:n,destroyed:i,blockLen:o,outputLen:a}=this;return e.finished=n,e.destroyed=i,e.blockLen=o,e.outputLen=a,e.oHash=t._cloneInto(e.oHash),e.iHash=r._cloneInto(e.iHash),e}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}constructor(e,t){super(),this.finished=!1,this.destroyed=!1,(0,n.hash)(e);let r=(0,i.toBytes)(t);if(this.iHash=e.create(),"function"!=typeof this.iHash.update)throw Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let o=this.blockLen,a=new Uint8Array(o);a.set(r.length>o?e.create().update(r).digest():r);for(let e=0;enew o(e,t).update(r).digest();t.hmac=a,t.hmac.create=(e,t)=>new o(e,t)},78496:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pbkdf2Async=t.pbkdf2=void 0;let n=r(65727),i=r(55543),o=r(83245);function a(e,t,r,a){(0,n.hash)(e);let{c:s,dkLen:l,asyncTick:u}=(0,o.checkOpts)({dkLen:32,asyncTick:10},a);if((0,n.number)(s),(0,n.number)(l),(0,n.number)(u),s<1)throw Error("PBKDF2: iterations (c) should be >= 1");let d=(0,o.toBytes)(t),c=(0,o.toBytes)(r),p=new Uint8Array(l),f=i.hmac.create(e,d),h=f._cloneInto().update(c);return{c:s,dkLen:l,asyncTick:u,DK:p,PRF:f,PRFSalt:h}}function s(e,t,r,n,i){return e.destroy(),t.destroy(),n&&n.destroy(),i.fill(0),r}function l(e,t,r,n){let i;let{c:l,dkLen:u,DK:d,PRF:c,PRFSalt:p}=a(e,t,r,n),f=new Uint8Array(4),h=(0,o.createView)(f),g=new Uint8Array(c.outputLen);for(let e=1,t=0;t{p._cloneInto(i).update(m).digestInto(m);for(let e=0;et),s=a.map(e=>(9*e+5)%16),l=[a],u=[s];for(let e=0;e<4;e++)for(let t of[l,u])t.push(t[e].map(e=>o[e]));let d=[[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8],[12,13,11,15,6,9,9,7,12,15,11,13,7,8,7,7],[13,15,14,11,7,7,6,8,13,14,13,12,5,5,6,9],[14,11,12,14,8,6,5,5,15,12,15,14,9,9,8,6],[15,12,13,13,9,5,8,6,14,11,12,11,8,6,5,5]].map(e=>new Uint8Array(e)),c=l.map((e,t)=>e.map(e=>d[t][e])),p=u.map((e,t)=>e.map(e=>d[t][e])),f=new Uint32Array([0,1518500249,1859775393,2400959708,2840853838]),h=new Uint32Array([1352829926,1548603684,1836072691,2053994217,0]),g=(e,t)=>e<>>32-t;function m(e,t,r,n){return 0===e?t^r^n:1===e?t&r|~t&n:2===e?(t|~r)^n:3===e?t&n|r&~n:t^(r|~n)}let y=new Uint32Array(16);class v extends n.SHA2{get(){let{h0:e,h1:t,h2:r,h3:n,h4:i}=this;return[e,t,r,n,i]}set(e,t,r,n,i){this.h0=0|e,this.h1=0|t,this.h2=0|r,this.h3=0|n,this.h4=0|i}process(e,t){for(let r=0;r<16;r++,t+=4)y[r]=e.getUint32(t,!0);let r=0|this.h0,n=r,i=0|this.h1,o=i,a=0|this.h2,s=a,d=0|this.h3,v=d,b=0|this.h4,S=b;for(let e=0;e<5;e++){let t=4-e,w=f[e],_=h[e],k=l[e],O=u[e],P=c[e],A=p[e];for(let t=0;t<16;t++){let n=g(r+m(e,i,a,d)+y[k[t]]+w,P[t])+b|0;r=b,b=d,d=0|g(a,10),a=i,i=n}for(let e=0;e<16;e++){let r=g(n+m(t,o,s,v)+y[O[e]]+_,A[e])+S|0;n=S,S=v,v=0|g(s,10),s=o,o=r}}this.set(this.h1+a+v|0,this.h2+d+S|0,this.h3+b+n|0,this.h4+r+o|0,this.h0+i+s|0)}roundClean(){y.fill(0)}destroy(){this.destroyed=!0,this.buffer.fill(0),this.set(0,0,0,0,0)}constructor(){super(64,20,8,!0),this.h0=1732584193,this.h1=-271733879,this.h2=-1732584194,this.h3=271733878,this.h4=-1009589776}}t.RIPEMD160=v,t.ripemd160=(0,i.wrapConstructor)(()=>new v)},23928:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sha224=t.sha256=void 0;let n=r(46133),i=r(83245),o=(e,t,r)=>e&t^~e&r,a=(e,t,r)=>e&t^e&r^t&r,s=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),l=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),u=new Uint32Array(64);class d extends n.SHA2{get(){let{A:e,B:t,C:r,D:n,E:i,F:o,G:a,H:s}=this;return[e,t,r,n,i,o,a,s]}set(e,t,r,n,i,o,a,s){this.A=0|e,this.B=0|t,this.C=0|r,this.D=0|n,this.E=0|i,this.F=0|o,this.G=0|a,this.H=0|s}process(e,t){for(let r=0;r<16;r++,t+=4)u[r]=e.getUint32(t,!1);for(let e=16;e<64;e++){let t=u[e-15],r=u[e-2],n=(0,i.rotr)(t,7)^(0,i.rotr)(t,18)^t>>>3,o=(0,i.rotr)(r,17)^(0,i.rotr)(r,19)^r>>>10;u[e]=o+u[e-7]+n+u[e-16]|0}let{A:r,B:n,C:l,D:d,E:c,F:p,G:f,H:h}=this;for(let e=0;e<64;e++){let t=h+((0,i.rotr)(c,6)^(0,i.rotr)(c,11)^(0,i.rotr)(c,25))+o(c,p,f)+s[e]+u[e]|0,g=((0,i.rotr)(r,2)^(0,i.rotr)(r,13)^(0,i.rotr)(r,22))+a(r,n,l)|0;h=f,f=p,p=c,c=d+t|0,d=l,l=n,n=r,r=t+g|0}r=r+this.A|0,n=n+this.B|0,l=l+this.C|0,d=d+this.D|0,c=c+this.E|0,p=p+this.F|0,f=f+this.G|0,h=h+this.H|0,this.set(r,n,l,d,c,p,f,h)}roundClean(){u.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}constructor(){super(64,32,8,!1),this.A=0|l[0],this.B=0|l[1],this.C=0|l[2],this.D=0|l[3],this.E=0|l[4],this.F=0|l[5],this.G=0|l[6],this.H=0|l[7]}}class c extends d{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}t.sha256=(0,i.wrapConstructor)(()=>new d),t.sha224=(0,i.wrapConstructor)(()=>new c)},3141:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.shake256=t.shake128=t.keccak_512=t.keccak_384=t.keccak_256=t.keccak_224=t.sha3_512=t.sha3_384=t.sha3_256=t.sha3_224=t.Keccak=t.keccakP=void 0;let n=r(65727),i=r(78852),o=r(83245),[a,s,l]=[[],[],[]],u=BigInt(0),d=BigInt(1),c=BigInt(2),p=BigInt(7),f=BigInt(256),h=BigInt(113);for(let e=0,t=d,r=1,n=0;e<24;e++){[r,n]=[n,(2*r+3*n)%5],a.push(2*(5*n+r)),s.push((e+1)*(e+2)/2%64);let i=u;for(let e=0;e<7;e++)(t=(t<>p)*h)%f)&c&&(i^=d<<(d<r>32?(0,i.rotlBH)(e,t,r):(0,i.rotlSH)(e,t,r),v=(e,t,r)=>r>32?(0,i.rotlBL)(e,t,r):(0,i.rotlSL)(e,t,r);function b(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:24,r=new Uint32Array(10);for(let n=24-t;n<24;n++){for(let t=0;t<10;t++)r[t]=e[t]^e[t+10]^e[t+20]^e[t+30]^e[t+40];for(let t=0;t<10;t+=2){let n=(t+8)%10,i=(t+2)%10,o=r[i],a=r[i+1],s=y(o,a,1)^r[n],l=v(o,a,1)^r[n+1];for(let r=0;r<50;r+=10)e[t+r]^=s,e[t+r+1]^=l}let t=e[2],i=e[3];for(let r=0;r<24;r++){let n=s[r],o=y(t,i,n),l=v(t,i,n),u=a[r];t=e[u],i=e[u+1],e[u]=o,e[u+1]=l}for(let t=0;t<50;t+=10){for(let n=0;n<10;n++)r[n]=e[t+n];for(let n=0;n<10;n++)e[t+n]^=~r[(n+2)%10]&r[(n+4)%10]}e[0]^=g[n],e[1]^=m[n]}r.fill(0)}t.keccakP=b;class S extends o.Hash{keccak(){b(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){(0,n.exists)(this);let{blockLen:t,state:r}=this,i=(e=(0,o.toBytes)(e)).length;for(let n=0;n=r&&this.keccak();let o=Math.min(r-this.posOut,i-n);e.set(t.subarray(this.posOut,this.posOut+o),n),this.posOut+=o,n+=o}return e}xofInto(e){if(!this.enableXOF)throw Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return(0,n.number)(e),this.xofInto(new Uint8Array(e))}digestInto(e){if((0,n.output)(e,this),this.finished)throw Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){let{blockLen:t,suffix:r,outputLen:n,rounds:i,enableXOF:o}=this;return e||(e=new S(t,r,n,o,i)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=i,e.suffix=r,e.outputLen=n,e.enableXOF=o,e.destroyed=this.destroyed,e}constructor(e,t,r,i=!1,a=24){if(super(),this.blockLen=e,this.suffix=t,this.outputLen=r,this.enableXOF=i,this.rounds=a,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,(0,n.number)(r),0>=this.blockLen||this.blockLen>=200)throw Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,o.u32)(this.state)}}t.Keccak=S;let w=(e,t,r)=>(0,o.wrapConstructor)(()=>new S(t,e,r));t.sha3_224=w(6,144,28),t.sha3_256=w(6,136,32),t.sha3_384=w(6,104,48),t.sha3_512=w(6,72,64),t.keccak_224=w(1,144,28),t.keccak_256=w(1,136,32),t.keccak_384=w(1,104,48),t.keccak_512=w(1,72,64);let _=(e,t,r)=>(0,o.wrapXOFConstructorWithOpts)(function(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new S(t,e,void 0===n.dkLen?r:n.dkLen,!0)});t.shake128=_(31,168,16),t.shake256=_(31,136,32)},93996:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sha384=t.sha512_256=t.sha512_224=t.sha512=t.SHA512=void 0;let n=r(46133),i=r(78852),o=r(83245),[a,s]=i.default.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(e=>BigInt(e))),l=new Uint32Array(80),u=new Uint32Array(80);class d extends n.SHA2{get(){let{Ah:e,Al:t,Bh:r,Bl:n,Ch:i,Cl:o,Dh:a,Dl:s,Eh:l,El:u,Fh:d,Fl:c,Gh:p,Gl:f,Hh:h,Hl:g}=this;return[e,t,r,n,i,o,a,s,l,u,d,c,p,f,h,g]}set(e,t,r,n,i,o,a,s,l,u,d,c,p,f,h,g){this.Ah=0|e,this.Al=0|t,this.Bh=0|r,this.Bl=0|n,this.Ch=0|i,this.Cl=0|o,this.Dh=0|a,this.Dl=0|s,this.Eh=0|l,this.El=0|u,this.Fh=0|d,this.Fl=0|c,this.Gh=0|p,this.Gl=0|f,this.Hh=0|h,this.Hl=0|g}process(e,t){for(let r=0;r<16;r++,t+=4)l[r]=e.getUint32(t),u[r]=e.getUint32(t+=4);for(let e=16;e<80;e++){let t=0|l[e-15],r=0|u[e-15],n=i.default.rotrSH(t,r,1)^i.default.rotrSH(t,r,8)^i.default.shrSH(t,r,7),o=i.default.rotrSL(t,r,1)^i.default.rotrSL(t,r,8)^i.default.shrSL(t,r,7),a=0|l[e-2],s=0|u[e-2],d=i.default.rotrSH(a,s,19)^i.default.rotrBH(a,s,61)^i.default.shrSH(a,s,6),c=i.default.rotrSL(a,s,19)^i.default.rotrBL(a,s,61)^i.default.shrSL(a,s,6),p=i.default.add4L(o,c,u[e-7],u[e-16]),f=i.default.add4H(p,n,d,l[e-7],l[e-16]);l[e]=0|f,u[e]=0|p}let{Ah:r,Al:n,Bh:o,Bl:d,Ch:c,Cl:p,Dh:f,Dl:h,Eh:g,El:m,Fh:y,Fl:v,Gh:b,Gl:S,Hh:w,Hl:_}=this;for(let e=0;e<80;e++){let t=i.default.rotrSH(g,m,14)^i.default.rotrSH(g,m,18)^i.default.rotrBH(g,m,41),k=i.default.rotrSL(g,m,14)^i.default.rotrSL(g,m,18)^i.default.rotrBL(g,m,41),O=g&y^~g&b,P=m&v^~m&S,A=i.default.add5L(_,k,P,s[e],u[e]),I=i.default.add5H(A,w,t,O,a[e],l[e]),R=0|A,E=i.default.rotrSH(r,n,28)^i.default.rotrBH(r,n,34)^i.default.rotrBH(r,n,39),T=i.default.rotrSL(r,n,28)^i.default.rotrBL(r,n,34)^i.default.rotrBL(r,n,39),N=r&o^r&c^o&c,x=n&d^n&p^d&p;w=0|b,_=0|S,b=0|y,S=0|v,y=0|g,v=0|m,({h:g,l:m}=i.default.add(0|f,0|h,0|I,0|R)),f=0|c,h=0|p,c=0|o,p=0|d,o=0|r,d=0|n;let B=i.default.add3L(R,T,x);r=i.default.add3H(B,I,E,N),n=0|B}({h:r,l:n}=i.default.add(0|this.Ah,0|this.Al,0|r,0|n)),({h:o,l:d}=i.default.add(0|this.Bh,0|this.Bl,0|o,0|d)),({h:c,l:p}=i.default.add(0|this.Ch,0|this.Cl,0|c,0|p)),({h:f,l:h}=i.default.add(0|this.Dh,0|this.Dl,0|f,0|h)),({h:g,l:m}=i.default.add(0|this.Eh,0|this.El,0|g,0|m)),({h:y,l:v}=i.default.add(0|this.Fh,0|this.Fl,0|y,0|v)),({h:b,l:S}=i.default.add(0|this.Gh,0|this.Gl,0|b,0|S)),({h:w,l:_}=i.default.add(0|this.Hh,0|this.Hl,0|w,0|_)),this.set(r,n,o,d,c,p,f,h,g,m,y,v,b,S,w,_)}roundClean(){l.fill(0),u.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}}t.SHA512=d;class c extends d{constructor(){super(),this.Ah=-1942145080,this.Al=424955298,this.Bh=1944164710,this.Bl=-1982016298,this.Ch=502970286,this.Cl=855612546,this.Dh=1738396948,this.Dl=1479516111,this.Eh=258812777,this.El=2077511080,this.Fh=2011393907,this.Fl=79989058,this.Gh=1067287976,this.Gl=1780299464,this.Hh=286451373,this.Hl=-1848208735,this.outputLen=28}}class p extends d{constructor(){super(),this.Ah=573645204,this.Al=-64227540,this.Bh=-1621794909,this.Bl=-934517566,this.Ch=596883563,this.Cl=1867755857,this.Dh=-1774684391,this.Dl=1497426621,this.Eh=-1775747358,this.El=-1467023389,this.Fh=-1101128155,this.Fl=1401305490,this.Gh=721525244,this.Gl=746961066,this.Hh=246885852,this.Hl=-2117784414,this.outputLen=32}}class f extends d{constructor(){super(),this.Ah=-876896931,this.Al=-1056596264,this.Bh=1654270250,this.Bl=914150663,this.Ch=-1856437926,this.Cl=812702999,this.Dh=355462360,this.Dl=-150054599,this.Eh=1731405415,this.El=-4191439,this.Fh=-1900787065,this.Fl=1750603025,this.Gh=-619958771,this.Gl=1694076839,this.Hh=1203062813,this.Hl=-1090891868,this.outputLen=48}}t.sha512=(0,o.wrapConstructor)(()=>new d),t.sha512_224=(0,o.wrapConstructor)(()=>new c),t.sha512_256=(0,o.wrapConstructor)(()=>new p),t.sha384=(0,o.wrapConstructor)(()=>new f)},83245:function(e,t,r){"use strict";/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */Object.defineProperty(t,"__esModule",{value:!0}),t.randomBytes=t.wrapXOFConstructorWithOpts=t.wrapConstructorWithOpts=t.wrapConstructor=t.checkOpts=t.Hash=t.concatBytes=t.toBytes=t.utf8ToBytes=t.asyncLoop=t.nextTick=t.hexToBytes=t.bytesToHex=t.isLE=t.rotr=t.createView=t.u32=t.u8=void 0;let n=r(32125),i=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength);t.u8=i;let o=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4));function a(e){return e instanceof Uint8Array||null!=e&&"object"==typeof e&&"Uint8Array"===e.constructor.name}t.u32=o;let s=e=>new DataView(e.buffer,e.byteOffset,e.byteLength);t.createView=s;let l=(e,t)=>e<<32-t|e>>>t;if(t.rotr=l,t.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],!t.isLE)throw Error("Non little-endian hardware is not supported");let u=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function d(e){if(!a(e))throw Error("Uint8Array expected");let t="";for(let r=0;r=c._0&&e<=c._9?e-c._0:e>=c._A&&e<=c._F?e-(c._A-10):e>=c._a&&e<=c._f?e-(c._a-10):void 0}function f(e){if("string"!=typeof e)throw Error("hex string expected, got "+typeof e);let t=e.length,r=t/2;if(t%2)throw Error("padded hex string expected, got unpadded hex of length "+t);let n=new Uint8Array(r);for(let t=0,i=0;t{};async function g(e,r,n){let i=Date.now();for(let o=0;o=0&&ee().update(y(t)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}function k(e){let t=(t,r)=>e(r).update(y(t)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=t=>e(t),t}function O(e){let t=(t,r)=>e(r).update(y(t)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=t=>e(t),t}function P(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:32;if(n.crypto&&"function"==typeof n.crypto.getRandomValues)return n.crypto.getRandomValues(new Uint8Array(e));throw Error("crypto.getRandomValues must be defined")}t.checkOpts=w,t.wrapConstructor=_,t.wrapConstructorWithOpts=k,t.wrapXOFConstructorWithOpts=O,t.randomBytes=P},2807:function(e,t,r){"use strict";var n,i;r.d(t,{TD:function(){return i},z:function(){return n}}),function(e){e.symbol=Symbol.for("protobuf-ts/unknown"),e.onRead=(r,n,i,o,a)=>{(t(n)?n[e.symbol]:n[e.symbol]=[]).push({no:i,wireType:o,data:a})},e.onWrite=(t,r,n)=>{for(let{no:t,wireType:i,data:o}of e.list(r))n.tag(t,i).raw(o)},e.list=(r,n)=>{if(t(r)){let t=r[e.symbol];return n?t.filter(e=>e.no==n):t}return[]},e.last=(t,r)=>e.list(t,r).slice(-1)[0];let t=t=>t&&Array.isArray(t[e.symbol])}(n||(n={})),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"}(i||(i={}))},65619:function(e,t,r){"use strict";let n;r.d(t,{C:function(){return ec}});let i=Symbol.for("protobuf-ts/message-type");function o(e){let t=!1,r=[];for(let n=0;n2&&void 0!==arguments[2]&&arguments[2];if(t<0)return!0;if(null==e||"object"!=typeof e)return!1;this.prepare();let n=Object.keys(e),i=this.data;if(n.length!n.includes(e))||!r&&n.some(e=>!i.known.includes(e)))return!1;if(t<1)return!0;for(let n of i.oneofs){let i=e[n];if(!s(i))return!1;if(void 0===i.oneofKind)continue;let o=this.fields.find(e=>e.localName===i.oneofKind);if(!o||!this.field(i[i.oneofKind],o,r,t))return!1}for(let n of this.fields)if(void 0===n.oneof&&!this.field(e[n.localName],n,r,t))return!1;return!0}field(e,t,r,n){let i=t.repeat;switch(t.kind){case"scalar":if(void 0===e)return t.opt;if(i)return this.scalars(e,t.T,n,t.L);return this.scalar(e,t.T,t.L);case"enum":if(void 0===e)return t.opt;if(i)return this.scalars(e,q.INT32,n);return this.scalar(e,q.INT32);case"message":if(void 0===e)break;if(i)return this.messages(e,t.T(),r,n);return this.message(e,t.T(),r,n);case"map":if("object"!=typeof e||null===e)return!1;if(n<2)break;if(!this.mapKeys(e,t.K,n))return!1;switch(t.V.kind){case"scalar":return this.scalars(Object.values(e),t.V.T,n,t.V.L);case"enum":return this.scalars(Object.values(e),q.INT32,n);case"message":return this.messages(Object.values(e),t.V.T(),r,n)}}return!0}message(e,t,r,n){return r?t.isAssignable(e,n):t.is(e,n)}messages(e,t,r,n){if(!Array.isArray(e))return!1;if(n<2)return!0;if(r){for(let r=0;rparseInt(e)),t,r);case q.BOOL:return this.scalars(n.slice(0,r).map(e=>"true"==e||"false"!=e&&e),t,r);default:return this.scalars(n,t,r,L.STRING)}}constructor(e){var t;this.fields=null!==(t=e.fields)&&void 0!==t?t:[]}}function u(e){let t=typeof e;if("object"==t){if(Array.isArray(e))return"array";if(null===e)return"null"}return t}function d(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}let c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),p=[];for(let e=0;e>4,a=o,i=2;break;case 2:r[n++]=(15&a)<<4|(60&o)>>2,a=o,i=3;break;case 3:r[n++]=(3&a)<<6|o,i=0}}if(1==i)throw Error("invalid base64 string.");return r.subarray(0,n)}function h(e){let t="",r=0,n,i=0;for(let o=0;o>2],i=(3&n)<<4,r=1;break;case 1:t+=c[i|n>>4],i=(15&n)<<2,r=2;break;case 2:t+=c[i|n>>6]+c[63&n],r=0}return r&&(t+=c[i]+"=",1==r&&(t+="=")),t}function g(){let e=0,t=0;for(let r=0;r<28;r+=7){let n=this.buf[this.pos++];if(e|=(127&n)<>4,(128&r)==0)return this.assertBounds(),[e,t];for(let r=3;r<=31;r+=7){let n=this.buf[this.pos++];if(t|=(127&n)<>>n,o=!(i>>>7==0&&0==t),a=(o?128|i:i)&255;if(r.push(a),!o)return}let n=e>>>28&15|(7&t)<<4,i=t>>3!=0;if(r.push((i?128|n:n)&255),i){for(let e=3;e<31;e+=7){let n=t>>>e,i=n>>>7!=0,o=(i?128|n:n)&255;if(r.push(o),!i)return}r.push(t>>>31&1)}}p["-".charCodeAt(0)]=c.indexOf("+"),p["_".charCodeAt(0)]=c.indexOf("/");let y=4294967296;function v(e){let t="-"==e[0];t&&(e=e.slice(1));let r=1e6,n=0,i=0;function o(t,o){let a=Number(e.slice(t,o));i*=r,(n=n*r+a)>=y&&(i+=n/y|0,n%=y)}return o(-24,-18),o(-18,-12),o(-12,-6),o(-6),[t,n,i]}function b(e,t){if(t>>>0<=2097151)return""+(y*t+(e>>>0));let r=16777215&e,n=(e>>>24|t<<8)>>>0&16777215,i=t>>16&65535,o=r+6777216*n+6710656*i,a=n+8147497*i,s=2*i,l=1e7;function u(e,t){let r=e?String(e):"";return t?"0000000".slice(r.length)+r:r}return o>=1e7&&(a+=Math.floor(o/l),o%=l),a>=l&&(s+=Math.floor(a/l),a%=l),u(s,0)+u(a,s)+u(o,1)}function S(e,t){if(e>=0){for(;e>127;)t.push(127&e|128),e>>>=7;t.push(e)}else{for(let r=0;r<9;r++)t.push(127&e|128),e>>=7;t.push(1)}}function w(){let e=this.buf[this.pos++],t=127&e;if((128&e)==0||(t|=(127&(e=this.buf[this.pos++]))<<7,(128&e)==0)||(t|=(127&(e=this.buf[this.pos++]))<<14,(128&e)==0)||(t|=(127&(e=this.buf[this.pos++]))<<21,(128&e)==0))return this.assertBounds(),t;t|=(15&(e=this.buf[this.pos++]))<<28;for(let t=5;(128&e)!=0&&t<10;t++)e=this.buf[this.pos++];if((128&e)!=0)throw Error("invalid varint");return this.assertBounds(),t>>>0}function _(e){if(!e)throw Error("BigInt unavailable, see https://github.com/timostamm/protobuf-ts/blob/v1.0.8/MANUAL.md#bigint-support")}!function(){let e=new DataView(new ArrayBuffer(8));n=void 0!==globalThis.BigInt&&"function"==typeof e.getBigInt64&&"function"==typeof e.getBigUint64&&"function"==typeof e.setBigInt64&&"function"==typeof e.setBigUint64?{MIN:BigInt("-9223372036854775808"),MAX:BigInt("9223372036854775807"),UMIN:BigInt("0"),UMAX:BigInt("18446744073709551615"),C:BigInt,V:e}:void 0}();let k=/^-?[0-9]+$/,O=4294967296,P=2147483648;class A{isZero(){return 0==this.lo&&0==this.hi}toNumber(){let e=this.hi*O+(this.lo>>>0);if(!Number.isSafeInteger(e))throw Error("cannot convert to safe number");return e}constructor(e,t){this.lo=0|e,this.hi=0|t}}class I extends A{static from(e){if(n)switch(typeof e){case"string":if("0"==e)return this.ZERO;if(""==e)throw Error("string is no integer");e=n.C(e);case"number":if(0===e)return this.ZERO;e=n.C(e);case"bigint":if(!e)return this.ZERO;if(en.UMAX)throw Error("ulong too large");return n.V.setBigUint64(0,e,!0),new I(n.V.getInt32(0,!0),n.V.getInt32(4,!0))}else switch(typeof e){case"string":if("0"==e)return this.ZERO;if(e=e.trim(),!k.test(e))throw Error("string is no integer");let[t,r,i]=v(e);if(t)throw Error("signed value for ulong");return new I(r,i);case"number":if(0==e)return this.ZERO;if(!Number.isSafeInteger(e))throw Error("number is no integer");if(e<0)throw Error("signed value for ulong");return new I(e,e/O)}throw Error("unknown value "+typeof e)}toString(){return n?this.toBigInt().toString():b(this.lo,this.hi)}toBigInt(){return _(n),n.V.setInt32(0,this.lo,!0),n.V.setInt32(4,this.hi,!0),n.V.getBigUint64(0,!0)}}I.ZERO=new I(0,0);class R extends A{static from(e){if(n)switch(typeof e){case"string":if("0"==e)return this.ZERO;if(""==e)throw Error("string is no integer");e=n.C(e);case"number":if(0===e)return this.ZERO;e=n.C(e);case"bigint":if(!e)return this.ZERO;if(en.MAX)throw Error("signed long too large");return n.V.setBigInt64(0,e,!0),new R(n.V.getInt32(0,!0),n.V.getInt32(4,!0))}else switch(typeof e){case"string":if("0"==e)return this.ZERO;if(e=e.trim(),!k.test(e))throw Error("string is no integer");let[t,r,i]=v(e);if(t){if(i>P||i==P&&0!=r)throw Error("signed long too small")}else if(i>=P)throw Error("signed long too large");let o=new R(r,i);return t?o.negate():o;case"number":if(0==e)return this.ZERO;if(!Number.isSafeInteger(e))throw Error("number is no integer");return e>0?new R(e,e/O):new R(-e,-e/O).negate()}throw Error("unknown value "+typeof e)}isNegative(){return(this.hi&P)!=0}negate(){let e=~this.hi,t=this.lo;return t?t=~t+1:e+=1,new R(t,e)}toString(){if(n)return this.toBigInt().toString();if(this.isNegative()){let e=this.negate();return"-"+b(e.lo,e.hi)}return b(this.lo,this.hi)}toBigInt(){return _(n),n.V.setInt32(0,this.lo,!0),n.V.setInt32(4,this.hi,!0),n.V.getBigInt64(0,!0)}}function E(e,t){if(!e)throw Error(t)}R.ZERO=new R(0,0);let T=34028234663852886e22,N=-34028234663852886e22,x=4294967295,B=2147483647,C=-2147483648;function M(e){if("number"!=typeof e)throw Error("invalid int 32: "+typeof e);if(!Number.isInteger(e)||e>B||ex||e<0)throw Error("invalid uint 32: "+e)}function U(e){if("number"!=typeof e)throw Error("invalid float 32: "+typeof e);if(Number.isFinite(e)&&(e>T||e0)&&(n=i)}else if(e.repeat){E(Array.isArray(t));let i=[];switch(e.kind){case"scalar":for(let r=0;r0||r.emitDefaultValues)&&(n=i)}else switch(e.kind){case"scalar":n=this.scalar(e.T,t,e.name,e.opt,r.emitDefaultValues);break;case"enum":n=this.enum(e.T(),t,e.name,e.opt,r.emitDefaultValues,r.enumAsInteger);break;case"message":n=this.message(e.T(),t,e.name,r)}return n}enum(e,t,r,n,i,o){if("google.protobuf.NullValue"==e[0])return i||n?null:void 0;if(void 0===t){E(n);return}if(0!==t||i||n)return(E("number"==typeof t),E(Number.isInteger(t)),o||!e[1].hasOwnProperty(t))?t:e[2]?e[2]+e[1][t]:e[1][t]}message(e,t,r,n){return void 0===t?n.emitDefaultValues?null:void 0:e.internalJsonWrite(t,n)}scalar(e,t,r,n,i){if(void 0===t){E(n);return}let o=i||n;switch(e){case q.INT32:case q.SFIXED32:case q.SINT32:if(0===t)return o?0:void 0;return M(t),t;case q.FIXED32:case q.UINT32:if(0===t)return o?0:void 0;return D(t),t;case q.FLOAT:U(t);case q.DOUBLE:if(0===t)return o?0:void 0;if(E("number"==typeof t),Number.isNaN(t))return"NaN";if(t===Number.POSITIVE_INFINITY)return"Infinity";if(t===Number.NEGATIVE_INFINITY)return"-Infinity";return t;case q.STRING:if(""===t)return o?"":void 0;return E("string"==typeof t),t;case q.BOOL:if(!1===t)return!o&&void 0;return E("boolean"==typeof t),t;case q.UINT64:case q.FIXED64:E("number"==typeof t||"string"==typeof t||"bigint"==typeof t);let a=I.from(t);if(a.isZero()&&!o)return;return a.toString();case q.INT64:case q.SFIXED64:case q.SINT64:E("number"==typeof t||"string"==typeof t||"bigint"==typeof t);let s=R.from(t);if(s.isZero()&&!o)return;return s.toString();case q.BYTES:if(E(t instanceof Uint8Array),!t.byteLength)return o?"":void 0;return h(t)}}constructor(e){var t;this.fields=null!==(t=e.fields)&&void 0!==t?t:[]}}var q,L,F,V=r(2807);function z(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:L.STRING;switch(e){case q.BOOL:return!1;case q.UINT64:case q.FIXED64:return J(I.ZERO,t);case q.INT64:case q.SFIXED64:case q.SINT64:return J(R.ZERO,t);case q.DOUBLE:case q.FLOAT:return 0;case q.BYTES:return new Uint8Array(0);case q.STRING:return"";default:return 0}}class W{prepare(){var e;if(!this.fieldNoToField){let t=null!==(e=this.info.fields)&&void 0!==e?e:[];this.fieldNoToField=new Map(t.map(e=>[e.no,e]))}}read(e,t,r,n){this.prepare();let i=void 0===n?e.len:e.pos+n;for(;e.pose.no-t.no)}}write(e,t,r){for(let n of(this.prepare(),this.fields)){let i,o,a=n.repeat,s=n.localName;if(n.oneof){let t=e[n.oneof];if(t.oneofKind!==s)continue;i=t[s],o=!0}else i=e[s],o=!1;switch(n.kind){case"scalar":case"enum":let l="enum"==n.kind?q.INT32:n.T;if(a){if(E(Array.isArray(i)),a==F.PACKED)this.packed(t,l,n.no,i);else for(let e of i)this.scalar(t,l,n.no,e,!0)}else void 0===i?E(n.opt):this.scalar(t,l,n.no,i,o||n.opt);break;case"message":if(a)for(let e of(E(Array.isArray(i)),i))this.message(t,r,n.T(),n.no,e);else this.message(t,r,n.T(),n.no,i);break;case"map":for(let[e,o]of(E("object"==typeof i&&null!==i),Object.entries(i)))this.mapEntry(t,r,n,e,o)}}let n=r.writeUnknownFields;!1!==n&&(!0===n?V.z.onWrite:n)(this.info.typeName,e,t)}mapEntry(e,t,r,n,i){e.tag(r.no,V.TD.LengthDelimited),e.fork();let o=n;switch(r.K){case q.INT32:case q.FIXED32:case q.UINT32:case q.SFIXED32:case q.SINT32:o=Number.parseInt(n);break;case q.BOOL:E("true"==n||"false"==n),o="true"==n}switch(this.scalar(e,r.K,1,o,!0),r.V.kind){case"scalar":this.scalar(e,r.V.T,2,i,!0);break;case"enum":this.scalar(e,q.INT32,2,i,!0);break;case"message":this.message(e,t,r.V.T(),2,i)}e.join()}message(e,t,r,n,i){void 0!==i&&(r.internalBinaryWrite(i,e.tag(n,V.TD.LengthDelimited).fork(),t),e.join())}scalar(e,t,r,n,i){let[o,a,s]=this.scalarInfo(t,n);(!s||i)&&(e.tag(r,o),e[a](n))}packed(e,t,r,n){if(!n.length)return;E(t!==q.BYTES&&t!==q.STRING),e.tag(r,V.TD.LengthDelimited),e.fork();let[,i]=this.scalarInfo(t);for(let t=0;tnew es};function ea(e){return e?Object.assign(Object.assign({},eo),e):eo}class es{finish(){this.chunks.push(new Uint8Array(this.buf));let e=0;for(let t=0;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(D(e);e>127;)this.buf.push(127&e|128),e>>>=7;return this.buf.push(e),this}int32(e){return M(e),S(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.textEncoder.encode(e);return this.uint32(t.byteLength),this.raw(t)}float(e){U(e);let t=new Uint8Array(4);return new DataView(t.buffer).setFloat32(0,e,!0),this.raw(t)}double(e){let t=new Uint8Array(8);return new DataView(t.buffer).setFloat64(0,e,!0),this.raw(t)}fixed32(e){D(e);let t=new Uint8Array(4);return new DataView(t.buffer).setUint32(0,e,!0),this.raw(t)}sfixed32(e){M(e);let t=new Uint8Array(4);return new DataView(t.buffer).setInt32(0,e,!0),this.raw(t)}sint32(e){return M(e),S(e=(e<<1^e>>31)>>>0,this.buf),this}sfixed64(e){let t=new Uint8Array(8),r=new DataView(t.buffer),n=R.from(e);return r.setInt32(0,n.lo,!0),r.setInt32(4,n.hi,!0),this.raw(t)}fixed64(e){let t=new Uint8Array(8),r=new DataView(t.buffer),n=I.from(e);return r.setInt32(0,n.lo,!0),r.setInt32(4,n.hi,!0),this.raw(t)}int64(e){let t=R.from(e);return m(t.lo,t.hi,this.buf),this}sint64(e){let t=R.from(e),r=t.hi>>31;return m(t.lo<<1^r,(t.hi<<1|t.lo>>>31)^r,this.buf),this}uint64(e){let t=I.from(e);return m(t.lo,t.hi,this.buf),this}constructor(e){this.stack=[],this.textEncoder=null!=e?e:new TextEncoder,this.chunks=[],this.buf=[]}}let el={readUnknownField:!0,readerFactory:e=>new ed(e)};function eu(e){return e?Object.assign(Object.assign({},el),e):el}class ed{tag(){let e=this.uint32(),t=e>>>3,r=7&e;if(t<=0||r<0||r>5)throw Error("illegal tag: field no "+t+" wire type "+r);return[t,r]}skip(e){let t=this.pos;switch(e){case V.TD.Varint:for(;128&this.buf[this.pos++];);break;case V.TD.Bit64:this.pos+=4;case V.TD.Bit32:this.pos+=4;break;case V.TD.LengthDelimited:let r=this.uint32();this.pos+=r;break;case V.TD.StartGroup:let n;for(;(n=this.tag()[1])!==V.TD.EndGroup;)this.skip(n);break;default:throw Error("cant skip wire type "+e)}return this.assertBounds(),this.buf.subarray(t,this.pos)}assertBounds(){if(this.pos>this.len)throw RangeError("premature EOF")}int32(){return 0|this.uint32()}sint32(){let e=this.uint32();return e>>>1^-(1&e)}int64(){return new R(...this.varint64())}uint64(){return new I(...this.varint64())}sint64(){let[e,t]=this.varint64(),r=-(1&e);return new R(e=(e>>>1|(1&t)<<31)^r,t=t>>>1^r)}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 new I(this.sfixed32(),this.sfixed32())}sfixed64(){return new R(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.textDecoder.decode(this.bytes())}constructor(e,t){this.varint64=g,this.uint32=w,this.buf=e,this.len=e.length,this.pos=0,this.view=new DataView(e.buffer,e.byteOffset,e.byteLength),this.textDecoder=null!=t?t:new TextDecoder("utf-8",{fatal:!0,ignoreBOM:!0})}}class ec{create(e){let t=G(this);return void 0!==e&&(0,K.l)(this,t,e),t}clone(e){let t=this.create();return(0,K.l)(this,t,e),t}equals(e,t){return ee(this,e,t)}is(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.defaultCheckDepth;return this.refTypeCheck.is(e,t,!1)}isAssignable(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.defaultCheckDepth;return this.refTypeCheck.is(e,t,!0)}mergePartial(e,t){(0,K.l)(this,e,t)}fromBinary(e,t){let r=eu(t);return this.internalBinaryRead(r.readerFactory(e),e.byteLength,r)}fromJson(e,t){return this.internalJsonRead(e,X(t))}fromJsonString(e,t){let r=JSON.parse(e);return this.fromJson(r,t)}toJson(e,t){return this.internalJsonWrite(e,$(t))}toJsonString(e,t){var r;return JSON.stringify(this.toJson(e,t),null,null!==(r=null==t?void 0:t.prettySpaces)&&void 0!==r?r:0)}toBinary(e,t){let r=ea(t);return this.internalBinaryWrite(e,r.writerFactory(),r).finish()}internalJsonRead(e,t,r){if(null!==e&&"object"==typeof e&&!Array.isArray(e)){let n=null!=r?r:this.create();return this.refJsonReader.read(e,n,t),n}throw Error("Unable to parse message ".concat(this.typeName," from JSON ").concat(u(e),"."))}internalJsonWrite(e,t){return this.refJsonWriter.write(e,t)}internalBinaryWrite(e,t,r){return this.refBinWriter.write(e,t,r),t}internalBinaryRead(e,t,r,n){let i=null!=n?n:this.create();return this.refBinReader.read(e,i,r,t),i}constructor(e,t,r){this.defaultCheckDepth=16,this.typeName=e,this.fields=t.map(a),this.options=null!=r?r:{},this.messagePrototype=Object.defineProperty({},i,{value:this}),this.refTypeCheck=new l(this),this.refJsonReader=new j(this),this.refJsonWriter=new H(this),this.refBinReader=new W(this),this.refBinWriter=new Q(this)}}},73654:function(e,t,r){"use strict";function n(e,t,r){let n,i=r,o;for(let r of e.fields){let e=r.localName;if(r.oneof){let a=i[r.oneof];if((null==a?void 0:a.oneofKind)==void 0)continue;if(n=a[e],(o=t[r.oneof]).oneofKind=a.oneofKind,void 0==n){delete o[e];continue}}else if(n=i[e],o=t,void 0==n)continue;switch(r.repeat&&(o[e].length=n.length),r.kind){case"scalar":case"enum":if(r.repeat)for(let t=0;t1&&"="===e.charAt(t);)++r;return Math.ceil(3*e.length)/4-r};for(var n=Array(64),i=Array(123),o=0;o<64;)i[n[o]=o<26?o+65:o<52?o+71:o<62?o-4:o-59|43]=o++;r.encode=function(e,t,r){for(var i,o=null,a=[],s=0,l=0;t>2],i=(3&u)<<4,l=1;break;case 1:a[s++]=n[i|u>>4],i=(15&u)<<2,l=2;break;case 2:a[s++]=n[i|u>>6],a[s++]=n[63&u],l=0}s>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,a)),s=0)}return(l&&(a[s++]=n[i],a[s++]=61,1===l&&(a[s++]=61)),o)?(s&&o.push(String.fromCharCode.apply(String,a.slice(0,s))),o.join("")):String.fromCharCode.apply(String,a.slice(0,s))};var a="invalid encoding";r.decode=function(e,t,r){for(var n,o=r,s=0,l=0;l1)break;if(void 0===(u=i[u]))throw Error(a);switch(s){case 0:n=u,s=1;break;case 1:t[r++]=n<<2|(48&u)>>4,n=u,s=2;break;case 2:t[r++]=(15&n)<<4|(60&u)>>2,n=u,s=3;break;case 3:t[r++]=(3&n)<<6|u,s=0}}if(1===s)throw Error(a);return r-o},r.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}},94218:function(e){"use strict";function t(){this._listeners={}}e.exports=t,t.prototype.on=function(e,t,r){return(this._listeners[e]||(this._listeners[e]=[])).push({fn:t,ctx:r||this}),this},t.prototype.off=function(e,t){if(void 0===e)this._listeners={};else if(void 0===t)this._listeners[e]=[];else for(var r=this._listeners[e],n=0;n0?0:2147483648,r,n);else if(isNaN(t))e(2143289344,r,n);else if(t>34028234663852886e22)e((i<<31|2139095040)>>>0,r,n);else if(t<11754943508222875e-54)e((i<<31|Math.round(t/1401298464324817e-60))>>>0,r,n);else{var o=Math.floor(Math.log(t)/Math.LN2),a=8388607&Math.round(t*Math.pow(2,-o)*8388608);e((i<<31|o+127<<23|a)>>>0,r,n)}}function a(e,t,r){var n=e(t,r),i=(n>>31)*2+1,o=n>>>23&255,a=8388607&n;return 255===o?a?NaN:1/0*i:0===o?1401298464324817e-60*i*a:i*Math.pow(2,o-150)*(a+8388608)}e.writeFloatLE=t.bind(null,r),e.writeFloatBE=t.bind(null,n),e.readFloatLE=a.bind(null,i),e.readFloatBE=a.bind(null,o)}(),"undefined"!=typeof Float64Array?function(){var t=new Float64Array([-0]),r=new Uint8Array(t.buffer),n=128===r[7];function i(e,n,i){t[0]=e,n[i]=r[0],n[i+1]=r[1],n[i+2]=r[2],n[i+3]=r[3],n[i+4]=r[4],n[i+5]=r[5],n[i+6]=r[6],n[i+7]=r[7]}function o(e,n,i){t[0]=e,n[i]=r[7],n[i+1]=r[6],n[i+2]=r[5],n[i+3]=r[4],n[i+4]=r[3],n[i+5]=r[2],n[i+6]=r[1],n[i+7]=r[0]}function a(e,n){return r[0]=e[n],r[1]=e[n+1],r[2]=e[n+2],r[3]=e[n+3],r[4]=e[n+4],r[5]=e[n+5],r[6]=e[n+6],r[7]=e[n+7],t[0]}function s(e,n){return r[7]=e[n],r[6]=e[n+1],r[5]=e[n+2],r[4]=e[n+3],r[3]=e[n+4],r[2]=e[n+5],r[1]=e[n+6],r[0]=e[n+7],t[0]}e.writeDoubleLE=n?i:o,e.writeDoubleBE=n?o:i,e.readDoubleLE=n?a:s,e.readDoubleBE=n?s:a}():function(){function t(e,t,r,n,i,o){var a,s=n<0?1:0;if(s&&(n=-n),0===n)e(0,i,o+t),e(1/n>0?0:2147483648,i,o+r);else if(isNaN(n))e(0,i,o+t),e(2146959360,i,o+r);else if(n>17976931348623157e292)e(0,i,o+t),e((s<<31|2146435072)>>>0,i,o+r);else if(n<22250738585072014e-324)e((a=n/5e-324)>>>0,i,o+t),e((s<<31|a/4294967296)>>>0,i,o+r);else{var l=Math.floor(Math.log(n)/Math.LN2);1024===l&&(l=1023),e(4503599627370496*(a=n*Math.pow(2,-l))>>>0,i,o+t),e((s<<31|l+1023<<20|1048576*a&1048575)>>>0,i,o+r)}}function a(e,t,r,n,i){var o=e(n,i+t),a=e(n,i+r),s=(a>>31)*2+1,l=a>>>20&2047,u=4294967296*(1048575&a)+o;return 2047===l?u?NaN:1/0*s:0===l?5e-324*s*u:s*Math.pow(2,l-1075)*(u+4503599627370496)}e.writeDoubleLE=t.bind(null,r,0,4),e.writeDoubleBE=t.bind(null,n,4,0),e.readDoubleLE=a.bind(null,i,0,4),e.readDoubleBE=a.bind(null,o,4,0)}(),e}function r(e,t,r){t[r]=255&e,t[r+1]=e>>>8&255,t[r+2]=e>>>16&255,t[r+3]=e>>>24}function n(e,t,r){t[r]=e>>>24,t[r+1]=e>>>16&255,t[r+2]=e>>>8&255,t[r+3]=255&e}function i(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}function o(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}e.exports=t(t)},79123:function(module){"use strict";function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(e){}return null}module.exports=inquire},39448:function(e){"use strict";function t(e,t,r){var n=r||8192,i=n>>>1,o=null,a=n;return function(r){if(r<1||r>i)return e(r);a+r>n&&(o=e(n),a=0);var s=t.call(o,a,a+=r);return 7&a&&(a=(7|a)+1),s}}e.exports=t},44645:function(e,t){"use strict";var r=t;r.length=function(e){for(var t=0,r=0,n=0;n191&&n<224?o[a++]=(31&n)<<6|63&e[t++]:n>239&&n<365?(n=((7&n)<<18|(63&e[t++])<<12|(63&e[t++])<<6|63&e[t++])-65536,o[a++]=55296+(n>>10),o[a++]=56320+(1023&n)):o[a++]=(15&n)<<12|(63&e[t++])<<6|63&e[t++],a>8191&&((i||(i=[])).push(String.fromCharCode.apply(String,o)),a=0);return i?(a&&i.push(String.fromCharCode.apply(String,o.slice(0,a))),i.join("")):String.fromCharCode.apply(String,o.slice(0,a))},r.write=function(e,t,r){for(var n,i,o=r,a=0;a>6|192:((64512&n)==55296&&(64512&(i=e.charCodeAt(a+1)))==56320?(n=65536+((1023&n)<<10)+(1023&i),++a,t[r++]=n>>18|240,t[r++]=n>>12&63|128):t[r++]=n>>12|224,t[r++]=n>>6&63|128),t[r++]=63&n|128);return r-o}},94762:function(e,t,r){"use strict";var n=r(47226).Buffer;function i(e){if(e.length>=255)throw TypeError("Alphabet too long");for(var t=new Uint8Array(256),r=0;r>>0,d=new Uint8Array(a);e[r];){var c=t[e.charCodeAt(r)];if(255===c)return;for(var p=0,f=a-1;(0!==c||p>>0,d[f]=c%256>>>0,c=c/256>>>0;if(0!==c)throw Error("Non-zero carry");o=p,r++}for(var h=a-o;h!==a&&0===d[h];)h++;var g=n.allocUnsafe(i+(a-h));g.fill(0,0,i);for(var m=i;h!==a;)g[m++]=d[h++];return g}function p(e){var t=c(e);if(t)return t;throw Error("Non-base"+s+" character")}return{encode:function(t){if((Array.isArray(t)||t instanceof Uint8Array)&&(t=n.from(t)),!n.isBuffer(t))throw TypeError("Expected Buffer");if(0===t.length)return"";for(var r=0,i=0,o=0,a=t.length;o!==a&&0===t[o];)o++,r++;for(var u=(a-o)*d+1>>>0,c=new Uint8Array(u);o!==a;){for(var p=t[o],f=0,h=u-1;(0!==p||f>>0,c[h]=p%s>>>0,p=p/s>>>0;if(0!==p)throw Error("Non-zero carry");i=f,o++}for(var g=u-i;g!==u&&0===c[g];)g++;for(var m=l.repeat(r);g0)throw Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");-1===r&&(r=t);var n=r===t?0:4-r%4;return[r,n]}function u(e){var t=l(e),r=t[0],n=t[1];return(r+n)*3/4-n}function d(e,t,r){return(t+r)*3/4-r}function c(e){var t,r,o=l(e),a=o[0],s=o[1],u=new i(d(e,a,s)),c=0,p=s>0?a-4:a;for(r=0;r>16&255,u[c++]=t>>8&255,u[c++]=255&t;return 2===s&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,u[c++]=255&t),1===s&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,u[c++]=t>>8&255,u[c++]=255&t),u}function p(e){return r[e>>18&63]+r[e>>12&63]+r[e>>6&63]+r[63&e]}function f(e,t,r){for(var n=[],i=t;il?l:s+a));return 1===i?o.push(r[(t=e[n-1])>>2]+r[t<<4&63]+"=="):2===i&&o.push(r[(t=(e[n-2]<<8)+e[n-1])>>10]+r[t>>4&63]+r[t<<2&63]+"="),o.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},73746:function(e,t){"use strict";var r;r={value:!0},r=t.gW=void 0;let n="qpzry9x8gf2tvdw0s3jn54khce6mua7l",i={};for(let e=0;e>25;return(33554431&e)<<5^996825010&-(t>>0&1)^642813549&-(t>>1&1)^513874426&-(t>>2&1)^1027748829&-(t>>3&1)^705979059&-(t>>4&1)}function a(e){let t=1;for(let r=0;r126)return"Invalid prefix ("+e+")";t=o(t)^n>>5}t=o(t);for(let r=0;r=r;)s.push(i>>(o-=r)&a);if(n)o>0&&s.push(i<=t)return"Excess padding";if(i<r)return"Exceeds length limit";let n=e.toLowerCase(),s=e.toUpperCase();if(e!==n&&e!==s)return"Mixed-case string "+e;let l=(e=n).lastIndexOf("1");if(-1===l)return"No separator character for "+e;if(0===l)return"Missing prefix for "+e;let u=e.slice(0,l),d=e.slice(l+1);if(d.length<6)return"Data too short";let c=a(u);if("string"==typeof c)return c;let p=[];for(let e=0;e=d.length||p.push(r)}return c!==t?"Invalid checksum for "+e:{prefix:u,words:p}}return t="bech32"===e?1:734539939,{decodeUnsafe:function(e,t){let n=r(e,t);if("object"==typeof n)return n},decode:function(e,t){let n=r(e,t);if("object"==typeof n)return n;throw Error(n)},encode:function(e,r,i){if(i=i||90,e.length+7+r.length>i)throw TypeError("Exceeds length limit");let s=a(e=e.toLowerCase());if("string"==typeof s)throw Error(s);let l=e+"1";for(let e=0;e>5!=0)throw Error("Non 5-bit word");s=o(s)^t,l+=n.charAt(t)}for(let e=0;e<6;++e)s=o(s);s^=t;for(let e=0;e<6;++e){let t=s>>(5-e)*5&31;l+=n.charAt(t)}return l},toWords:l,fromWordsUnsafe:u,fromWords:d}}t.gW=c("bech32"),c("bech32m")},47909:function(e,t,r){"use strict";e=r.nmd(e);var n,i=function(e){var t=1e7,r=7,n=9007199254740992,o=f(9007199254740992),a="0123456789abcdefghijklmnopqrstuvwxyz",s="function"==typeof BigInt;function l(e,t,r,n){return void 0===e?l[0]:void 0!==t&&(10!=+t||r)?X(e,t,r,n):eo(e)}function u(e,t){this.value=e,this.sign=t,this.isSmall=!1}function d(e){this.value=e,this.sign=e<0,this.isSmall=!0}function c(e){this.value=e}function p(e){return-nM(e,o))switch(r){case 0:return 0;case 1:return e[0];case 2:return e[0]+e[1]*t;default:return e[0]+(e[1]+e[2]*t)*t}return e}function g(e){for(var t=e.length;0===e[--t];);e.length=t+1}function m(e){for(var t=Array(e),r=-1;++r0?Math.floor(e):Math.ceil(e)}function v(e,r){var n,i,o=e.length,a=r.length,s=Array(o),l=0,u=t;for(i=0;i=u?1:0,s[i]=n-l*u;for(;i0&&s.push(l),s}function b(e,t){return e.length>=t.length?v(e,t):v(t,e)}function S(e,r){var n,i,o=e.length,a=Array(o),s=t;for(i=0;i0;)a[i++]=r%s,r=Math.floor(r/s);return a}function w(e,r){var n,i,o=e.length,a=r.length,s=Array(o),l=0,u=t;for(n=0;n=0?n=w(e,t):(n=w(t,e),r=!r),"number"==typeof(n=h(n)))?(r&&(n=-n),new d(n)):new u(n,r)}function k(e,r,n){var i,o,a=e.length,s=Array(a),l=-r,c=t;for(i=0;i0;)a[i++]=l%s,l=Math.floor(l/s);return a}function A(e,t){for(var r=[];t-- >0;)r.push(0);return r.concat(e)}function I(e,t){var r=Math.max(e.length,t.length);if(r<=30)return O(e,t);r=Math.ceil(r/2);var n=e.slice(r),i=e.slice(0,r),o=t.slice(r),a=t.slice(0,r),s=I(i,a),l=I(n,o),u=I(b(i,n),b(a,o)),d=b(b(s,A(w(w(u,s),l),r)),A(l,2*r));return g(d),d}function R(e,t){return -.012*e-.012*t+15e-6*e*t>0}function E(e,r,n){return e=0;i--){for(n=p-1,v[i+c]!==g&&(n=Math.floor((v[i+c]*p+v[i+c-1])/g)),o=0,a=0,l=b.length,s=0;sM(c,r)){d.push(0);continue}i=c.length,o=c[i-1]*p+c[i-2],a=r[u-1]*p+r[u-2],i>u&&(o=(o+1)*p),n=Math.ceil(o/a);do{if(0>=M(s=P(r,n),c))break;n--}while(n);d.push(n),c=w(c,s)}return d.reverse(),[h(d),h(c)]}function B(e,r){var n,i,o,a,s=e.length,l=m(s),u=t;for(o=0,n=s-1;n>=0;--n)i=y((a=o*u+e[n])/r),o=a-i*r,l[n]=0|i;return[l,0|o]}function C(e,r){var n,i,o=eo(r);if(s)return[new c(e.value/o.value),new c(e.value%o.value)];var a=e.value,p=o.value;if(0===p)throw Error("Cannot divide by zero");if(e.isSmall)return o.isSmall?[new d(y(a/p)),new d(a%p)]:[l[0],e];if(o.isSmall){if(1===p)return[e,l[0]];if(-1==p)return[e.negate(),l[0]];var g=Math.abs(p);if(gt.length?1:-1;for(var r=e.length-1;r>=0;r--)if(e[r]!==t[r])return e[r]>t[r]?1:-1;return 0}function D(e){var t=e.abs();return!t.isUnit()&&(!!(t.equals(2)||t.equals(3)||t.equals(5))||!(t.isEven()||t.isDivisibleBy(3)||t.isDivisibleBy(5))&&(!!t.lesser(49)||void 0))}function U(e,t){for(var r,n,o,a=e.prev(),s=a,l=0;s.isEven();)s=s.divide(2),l++;e:for(n=0;n=0)},d.prototype.minus=d.prototype.subtract,c.prototype.subtract=function(e){return new c(this.value-eo(e).value)},c.prototype.minus=c.prototype.subtract,u.prototype.negate=function(){return new u(this.value,!this.sign)},d.prototype.negate=function(){var e=this.sign,t=new d(-this.value);return t.sign=!e,t},c.prototype.negate=function(){return new c(-this.value)},u.prototype.abs=function(){return new u(this.value,!1)},d.prototype.abs=function(){return new d(Math.abs(this.value))},c.prototype.abs=function(){return new c(this.value>=0?this.value:-this.value)},u.prototype.multiply=function(e){var r,n=eo(e),i=this.value,o=n.value,a=this.sign!==n.sign;if(n.isSmall){if(0===o)return l[0];if(1===o)return this;if(-1===o)return this.negate();if((r=Math.abs(o))n?1:-1:-1},c.prototype.compareAbs=function(e){var t=this.value,r=eo(e).value;return(t=t>=0?t:-t)===(r=r>=0?r:-r)?0:t>r?1:-1},u.prototype.compare=function(e){if(e===1/0)return -1;if(e===-1/0)return 1;var t=eo(e),r=this.value,n=t.value;return this.sign!==t.sign?t.sign?1:-1:t.isSmall?this.sign?-1:1:M(r,n)*(this.sign?-1:1)},u.prototype.compareTo=u.prototype.compare,d.prototype.compare=function(e){if(e===1/0)return -1;if(e===-1/0)return 1;var t=eo(e),r=this.value,n=t.value;return t.isSmall?r==n?0:r>n?1:-1:r<0!==t.sign?r<0?-1:1:r<0?1:-1},d.prototype.compareTo=d.prototype.compare,c.prototype.compare=function(e){if(e===1/0)return -1;if(e===-1/0)return 1;var t=this.value,r=eo(e).value;return t===r?0:t>r?1:-1},c.prototype.compareTo=c.prototype.compare,u.prototype.equals=function(e){return 0===this.compare(e)},c.prototype.eq=c.prototype.equals=d.prototype.eq=d.prototype.equals=u.prototype.eq=u.prototype.equals,u.prototype.notEquals=function(e){return 0!==this.compare(e)},c.prototype.neq=c.prototype.notEquals=d.prototype.neq=d.prototype.notEquals=u.prototype.neq=u.prototype.notEquals,u.prototype.greater=function(e){return this.compare(e)>0},c.prototype.gt=c.prototype.greater=d.prototype.gt=d.prototype.greater=u.prototype.gt=u.prototype.greater,u.prototype.lesser=function(e){return 0>this.compare(e)},c.prototype.lt=c.prototype.lesser=d.prototype.lt=d.prototype.lesser=u.prototype.lt=u.prototype.lesser,u.prototype.greaterOrEquals=function(e){return this.compare(e)>=0},c.prototype.geq=c.prototype.greaterOrEquals=d.prototype.geq=d.prototype.greaterOrEquals=u.prototype.geq=u.prototype.greaterOrEquals,u.prototype.lesserOrEquals=function(e){return 0>=this.compare(e)},c.prototype.leq=c.prototype.lesserOrEquals=d.prototype.leq=d.prototype.lesserOrEquals=u.prototype.leq=u.prototype.lesserOrEquals,u.prototype.isEven=function(){return(1&this.value[0])==0},d.prototype.isEven=function(){return(1&this.value)==0},c.prototype.isEven=function(){return(this.value&BigInt(1))===BigInt(0)},u.prototype.isOdd=function(){return(1&this.value[0])==1},d.prototype.isOdd=function(){return(1&this.value)==1},c.prototype.isOdd=function(){return(this.value&BigInt(1))===BigInt(1)},u.prototype.isPositive=function(){return!this.sign},d.prototype.isPositive=function(){return this.value>0},c.prototype.isPositive=d.prototype.isPositive,u.prototype.isNegative=function(){return this.sign},d.prototype.isNegative=function(){return this.value<0},c.prototype.isNegative=d.prototype.isNegative,u.prototype.isUnit=function(){return!1},d.prototype.isUnit=function(){return 1===Math.abs(this.value)},c.prototype.isUnit=function(){return this.abs().value===BigInt(1)},u.prototype.isZero=function(){return!1},d.prototype.isZero=function(){return 0===this.value},c.prototype.isZero=function(){return this.value===BigInt(0)},u.prototype.isDivisibleBy=function(e){var t=eo(e);return!t.isZero()&&(!!t.isUnit()||(0===t.compareAbs(2)?this.isEven():this.mod(t).isZero()))},c.prototype.isDivisibleBy=d.prototype.isDivisibleBy=u.prototype.isDivisibleBy,u.prototype.isPrime=function(t){var r=D(this);if(e!==r)return r;var n=this.abs(),o=n.bitLength();if(o<=64)return U(n,[2,3,5,7,11,13,17,19,23,29,31,37]);for(var a=Math.log(2)*o.toJSNumber(),s=Math.ceil(!0===t?2*Math.pow(a,2):a),l=[],u=0;u-n?new d(e-1):new u(o,!0)},c.prototype.prev=function(){return new c(this.value-BigInt(1))};for(var J=[1];2*J[J.length-1]<=t;)J.push(2*J[J.length-1]);var j=J.length,H=J[j-1];function q(e){return Math.abs(e)<=t}function L(e,t,r){t=eo(t);for(var n=e.isNegative(),o=t.isNegative(),a=n?e.not():e,s=o?t.not():t,l=0,u=0,d=null,c=null,p=[];!a.isZero()||!s.isZero();)l=(d=C(a,H))[1].toJSNumber(),n&&(l=H-1-l),u=(c=C(s,H))[1].toJSNumber(),o&&(u=H-1-u),a=d[0],s=c[0],p.push(r(l,u));for(var f=0!==r(n?1:0,o?1:0)?i(-1):i(0),h=p.length-1;h>=0;h-=1)f=f.multiply(H).add(i(p[h]));return f}u.prototype.shiftLeft=function(e){var t=eo(e).toJSNumber();if(!q(t))throw Error(String(t)+" is too large for shifting.");if(t<0)return this.shiftRight(-t);var r=this;if(r.isZero())return r;for(;t>=j;)r=r.multiply(H),t-=j-1;return r.multiply(J[t])},c.prototype.shiftLeft=d.prototype.shiftLeft=u.prototype.shiftLeft,u.prototype.shiftRight=function(e){var t,r=eo(e).toJSNumber();if(!q(r))throw Error(String(r)+" is too large for shifting.");if(r<0)return this.shiftLeft(-r);for(var n=this;r>=j;){if(n.isZero()||n.isNegative()&&n.isUnit())return n;n=(t=C(n,H))[1].isNegative()?t[0].prev():t[0],r-=j-1}return(t=C(n,J[r]))[1].isNegative()?t[0].prev():t[0]},c.prototype.shiftRight=d.prototype.shiftRight=u.prototype.shiftRight,u.prototype.not=function(){return this.negate().prev()},c.prototype.not=d.prototype.not=u.prototype.not,u.prototype.and=function(e){return L(this,e,function(e,t){return e&t})},c.prototype.and=d.prototype.and=u.prototype.and,u.prototype.or=function(e){return L(this,e,function(e,t){return e|t})},c.prototype.or=d.prototype.or=u.prototype.or,u.prototype.xor=function(e){return L(this,e,function(e,t){return e^t})},c.prototype.xor=d.prototype.xor=u.prototype.xor;var F=1073741824,V=(t&-t)*(t&-t)|1073741824;function z(e){var r=e.value,n="number"==typeof r?r|F:"bigint"==typeof r?r|BigInt(F):r[0]+r[1]*t|V;return n&-n}function W(e,t){if(0>=t.compareTo(e)){var r=W(e,t.square(t)),n=r.p,o=r.e,a=n.multiply(t);return 0>=a.compareTo(e)?{p:a,e:2*o+1}:{p:n,e:2*o}}return{p:i(1),e:0}}function Q(e,t){return e=eo(e),t=eo(t),e.greater(t)?e:t}function G(e,t){return e=eo(e),t=eo(t),e.lesser(t)?e:t}function K(e,t){if(e=eo(e).abs(),t=eo(t).abs(),e.equals(t))return e;if(e.isZero())return t;if(t.isZero())return e;for(var r,n,i=l[1];e.isEven()&&t.isEven();)r=G(z(e),z(t)),e=e.divide(r),t=t.divide(r),i=i.multiply(r);for(;e.isEven();)e=e.divide(z(e));do{for(;t.isEven();)t=t.divide(z(t));e.greater(t)&&(n=t,t=e,e=n),t=t.subtract(e)}while(!t.isZero());return i.isUnit()?e:e.multiply(i)}function Y(e,t){return e=eo(e).abs(),t=eo(t).abs(),e.divide(K(e,t)).multiply(t)}function Z(e,r,n){e=eo(e);var i=n||Math.random,o=G(e,r=eo(r)),a=Q(e,r).subtract(o).add(1);if(a.isSmall)return o.add(Math.floor(i()*a));for(var s=et(a,t).value,u=[],d=!0,c=0;ce.compareTo(i(0))&&(e=e.negate().subtract(i(1))),0===e.compareTo(i(0)))?i(0):i(W(e,i(2)).e).add(i(1))},c.prototype.bitLength=d.prototype.bitLength=u.prototype.bitLength;var X=function(e,t,r,n){r=r||a,e=String(e),n||(e=e.toLowerCase(),r=r.toLowerCase());var i,o=e.length,s=Math.abs(t),l={};for(i=0;i=s){if("1"===u&&1===s)continue;throw Error(u+" is not a valid digit in base "+t+".")}}t=eo(t);var d=[],c="-"===e[0];for(i=c?1:0;i"!==e[i]&&i=0;n--)i=i.add(e[n].times(o)),o=o.times(t);return r?i.negate():i}function ee(e,t){return e<(t=t||a).length?t[e]:"<"+e+">"}function et(e,t){if((t=i(t)).isZero()){if(e.isZero())return{value:[0],isNegative:!1};throw Error("Cannot convert nonzero numbers to base 0.")}if(t.equals(-1)){if(e.isZero())return{value:[0],isNegative:!1};if(e.isNegative())return{value:[].concat.apply([],Array.apply(null,Array(-e.toJSNumber())).map(Array.prototype.valueOf,[1,0])),isNegative:!1};var r=Array.apply(null,Array(e.toJSNumber()-1)).map(Array.prototype.valueOf,[0,1]);return r.unshift([1]),{value:[].concat.apply([],r),isNegative:!1}}var n=!1;if(e.isNegative()&&t.isPositive()&&(n=!0,e=e.abs()),t.isUnit())return e.isZero()?{value:[0],isNegative:!1}:{value:Array.apply(null,Array(e.toJSNumber())).map(Number.prototype.valueOf,1),isNegative:n};for(var o,a=[],s=e;s.isNegative()||s.compareAbs(t)>=0;){s=(o=s.divmod(t)).quotient;var l=o.remainder;l.isNegative()&&(l=t.minus(l).abs(),s=s.next()),a.push(l.toJSNumber())}return a.push(s.toJSNumber()),{value:a.reverse(),isNegative:n}}function er(e,t,r){var n=et(e,t);return(n.isNegative?"-":"")+n.value.map(function(e){return ee(e,r)}).join("")}function en(e){if(p(+e)){var t=+e;if(t===y(t))return s?new c(BigInt(t)):new d(t);throw Error("Invalid integer: "+e)}var n="-"===e[0];n&&(e=e.slice(1));var i=e.split(/e/i);if(i.length>2)throw Error("Invalid integer: "+i.join("e"));if(2===i.length){var o=i[1];if("+"===o[0]&&(o=o.slice(1)),(o=+o)!==y(o)||!p(o))throw Error("Invalid integer: "+o+" is not a valid exponent.");var a=i[0],l=a.indexOf(".");if(l>=0&&(o-=a.length-l-1,a=a.slice(0,l)+a.slice(l+1)),o<0)throw Error("Cannot include negative exponent part for integers");a+=Array(o+1).join("0"),e=a}if(!/^([0-9][0-9]*)$/.test(e))throw Error("Invalid integer: "+e);if(s)return new c(BigInt(n?"-"+e:e));for(var f=[],h=e.length,m=r,v=h-m;h>0;)f.push(+e.slice(v,h)),(v-=m)<0&&(v=0),h-=m;return g(f),new u(f,n)}function ei(e){if(s)return new c(BigInt(e));if(p(e)){if(e!==y(e))throw Error(e+" is not an integer.");return new d(e)}return en(e.toString())}function eo(e){return"number"==typeof e?ei(e):"string"==typeof e?en(e):"bigint"==typeof e?new c(e):e}u.prototype.toArray=function(e){return et(this,e)},d.prototype.toArray=function(e){return et(this,e)},c.prototype.toArray=function(e){return et(this,e)},u.prototype.toString=function(t,r){if(e===t&&(t=10),10!==t||r)return er(this,t,r);for(var n,i=this.value,o=i.length,a=String(i[--o]),s="0000000";--o>=0;)a+=s.slice((n=String(i[o])).length)+n;return(this.sign?"-":"")+a},d.prototype.toString=function(t,r){return(e===t&&(t=10),10!=t||r)?er(this,t,r):String(this.value)},c.prototype.toString=d.prototype.toString,c.prototype.toJSON=u.prototype.toJSON=d.prototype.toJSON=function(){return this.toString()},u.prototype.valueOf=function(){return parseInt(this.toString(),10)},u.prototype.toJSNumber=u.prototype.valueOf,d.prototype.valueOf=function(){return this.value},d.prototype.toJSNumber=d.prototype.valueOf,c.prototype.valueOf=c.prototype.toJSNumber=function(){return parseInt(this.toString(),10)};for(var ea=0;ea<1e3;ea++)l[ea]=eo(ea),ea>0&&(l[-ea]=eo(-ea));return l.one=l[1],l.zero=l[0],l.minusOne=l[-1],l.max=Q,l.min=G,l.gcd=K,l.lcm=Y,l.isInstance=function(e){return e instanceof u||e instanceof d||e instanceof c},l.randBetween=Z,l.fromArray=function(e,t,r){return $(e.map(eo),eo(t||10),r)},l}();e.hasOwnProperty("exports")&&(e.exports=i),void 0!==(n=(function(){return i}).call(t,r,t,e))&&(e.exports=n)},12717:function(e,t,r){"use strict";var n=r(23663).Buffer;Object.defineProperty(t,"__esModule",{value:!0});let i=r(39266),o=r(78110),a=r(26498),s=r(81403),l=r(55234),u=s.BufferN(32),d=s.compile({wif:s.UInt8,bip32:{public:s.UInt32,private:s.UInt32}}),c={messagePrefix:"\x18Bitcoin Signed Message:\n",bech32:"bc",bip32:{public:76067358,private:76066276},pubKeyHash:0,scriptHash:5,wif:128},p=2147483648,f=2147483647;function h(e){return s.String(e)&&null!==e.match(/^(m\/)?(\d+'?\/)*\d+'?$/)}function g(e){return s.UInt32(e)&&e<=f}class m{get depth(){return this.__DEPTH}get index(){return this.__INDEX}get parentFingerprint(){return this.__PARENT_FINGERPRINT}get publicKey(){return void 0===this.__Q&&(this.__Q=a.pointFromScalar(this.__D,!0)),this.__Q}get privateKey(){return this.__D}get identifier(){return i.hash160(this.publicKey)}get fingerprint(){return this.identifier.slice(0,4)}get compressed(){return!0}isNeutered(){return void 0===this.__D}neutered(){return w(this.publicKey,this.chainCode,this.network,this.depth,this.index,this.parentFingerprint)}toBase58(){let e=this.network,t=this.isNeutered()?e.bip32.public:e.bip32.private,r=n.allocUnsafe(78);return r.writeUInt32BE(t,0),r.writeUInt8(this.depth,4),r.writeUInt32BE(this.parentFingerprint,5),r.writeUInt32BE(this.index,9),this.chainCode.copy(r,13),this.isNeutered()?this.publicKey.copy(r,45):(r.writeUInt8(0,45),this.privateKey.copy(r,46)),o.encode(r)}toWIF(){if(!this.privateKey)throw TypeError("Missing private key");return l.encode(this.network.wif,this.privateKey,!0)}derive(e){let t;s(s.UInt32,e);let r=e>=p,o=n.allocUnsafe(37);if(r){if(this.isNeutered())throw TypeError("Missing private key for hardened child key");o[0]=0,this.privateKey.copy(o,1),o.writeUInt32BE(e,33)}else this.publicKey.copy(o,0),o.writeUInt32BE(e,33);let l=i.hmacSHA512(this.chainCode,o),u=l.slice(0,32),d=l.slice(32);if(!a.isPrivate(u))return this.derive(e+1);if(this.isNeutered()){let r=a.pointAddScalar(this.publicKey,u,!0);if(null===r)return this.derive(e+1);t=w(r,d,this.network,this.depth+1,e,this.fingerprint.readUInt32BE(0))}else{let r=a.privateAdd(this.privateKey,u);if(null==r)return this.derive(e+1);t=b(r,d,this.network,this.depth+1,e,this.fingerprint.readUInt32BE(0))}return t}deriveHardened(e){return s(g,e),this.derive(e+p)}derivePath(e){s(h,e);let t=e.split("/");if("m"===t[0]){if(this.parentFingerprint)throw TypeError("Expected master, got child");t=t.slice(1)}return t.reduce((e,t)=>{let r;return"'"===t.slice(-1)?(r=parseInt(t.slice(0,-1),10),e.deriveHardened(r)):(r=parseInt(t,10),e.derive(r))},this)}sign(e,t){if(!this.privateKey)throw Error("Missing private key");if(void 0===t&&(t=this.lowR),!1===t)return a.sign(e,this.privateKey);{let t=a.sign(e,this.privateKey),r=n.alloc(32,0),i=0;for(;t[0]>127;)i++,r.writeUIntLE(i,0,6),t=a.signWithEntropy(e,this.privateKey,r);return t}}verify(e,t){return a.verify(e,this.publicKey,t)}constructor(e,t,r,n,i=0,o=0,a=0){this.__D=e,this.__Q=t,this.chainCode=r,this.network=n,this.__DEPTH=i,this.__INDEX=o,this.__PARENT_FINGERPRINT=a,s(d,n),this.lowR=!1}}function y(e,t){let r;let n=o.decode(e);if(78!==n.length)throw TypeError("Invalid buffer length");t=t||c;let i=n.readUInt32BE(0);if(i!==t.bip32.private&&i!==t.bip32.public)throw TypeError("Invalid network version");let a=n[4],s=n.readUInt32BE(5);if(0===a&&0!==s)throw TypeError("Invalid parent fingerprint");let l=n.readUInt32BE(9);if(0===a&&0!==l)throw TypeError("Invalid index");let u=n.slice(13,45);if(i===t.bip32.private){if(0!==n.readUInt8(45))throw TypeError("Invalid private key");r=b(n.slice(46,78),u,t,a,l,s)}else r=w(n.slice(45,78),u,t,a,l,s);return r}function v(e,t,r){return b(e,t,r)}function b(e,t,r,n,i,o){if(s({privateKey:u,chainCode:u},{privateKey:e,chainCode:t}),r=r||c,!a.isPrivate(e))throw TypeError("Private key not in range [1, n)");return new m(e,void 0,t,r,n,i,o)}function S(e,t,r){return w(e,t,r)}function w(e,t,r,n,i,o){if(s({publicKey:s.BufferN(33),chainCode:u},{publicKey:e,chainCode:t}),r=r||c,!a.isPoint(e))throw TypeError("Point is not on the curve");return new m(void 0,e,t,r,n,i,o)}function _(e,t){if(s(s.Buffer,e),e.length<16)throw TypeError("Seed should be at least 128 bits");if(e.length>64)throw TypeError("Seed should be at most 512 bits");t=t||c;let r=i.hmacSHA512(n.from("Bitcoin seed","utf8"),e);return v(r.slice(0,32),r.slice(32),t)}t.fromBase58=y,t.fromPrivateKey=v,t.fromPublicKey=S,t.fromSeed=_},39266:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let n=r(85191),i=r(42716);function o(e){let t=n("sha256").update(e).digest();try{return n("rmd160").update(t).digest()}catch(e){return n("ripemd160").update(t).digest()}}function a(e,t){return i("sha512",e).update(t).digest()}t.hash160=o,t.hmacSHA512=a},53609:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(12717);t.fromSeed=n.fromSeed,t.fromBase58=n.fromBase58,t.fromPublicKey=n.fromPublicKey,t.fromPrivateKey=n.fromPrivateKey},52014:function(e,t,r){"use strict";let n;Object.defineProperty(t,"__esModule",{value:!0});let i={};t.wordlists=i,t._default=n;try{t._default=n=r(25384),i.czech=n}catch(e){}try{t._default=n=r(70056),i.chinese_simplified=n}catch(e){}try{t._default=n=r(52571),i.chinese_traditional=n}catch(e){}try{t._default=n=r(96788),i.korean=n}catch(e){}try{t._default=n=r(67810),i.french=n}catch(e){}try{t._default=n=r(57778),i.italian=n}catch(e){}try{t._default=n=r(26634),i.spanish=n}catch(e){}try{t._default=n=r(3544),i.japanese=n,i.JA=n}catch(e){}try{t._default=n=r(43475),i.portuguese=n}catch(e){}try{t._default=n=r(44012),i.english=n,i.EN=n}catch(e){}},84639:function(e,t,r){"use strict";var n=r(23663).Buffer;Object.defineProperty(t,"__esModule",{value:!0});let i=r(23928),o=r(93996),a=r(78496),s=r(83245),l=r(52014),u=l._default,d="Invalid mnemonic",c="Invalid entropy",p="Invalid mnemonic checksum",f="A wordlist is required but a default could not be found.\nPlease pass a 2048 word array explicitly.";function h(e){return(e||"").normalize("NFKD")}function g(e,t,r){for(;e.lengthg(e.toString(2),"0",8)).join("")}function v(e){let t=8*e.length/32;return y(Array.from(i.sha256(Uint8Array.from(e)))).slice(0,t)}function b(e){return"mnemonic"+(e||"")}function S(e,t){let r=Uint8Array.from(n.from(h(e),"utf8")),i=Uint8Array.from(n.from(b(h(t)),"utf8")),s=a.pbkdf2(o.sha512,r,i,{c:2048,dkLen:64});return n.from(s)}function w(e,t){let r=Uint8Array.from(n.from(h(e),"utf8")),i=Uint8Array.from(n.from(b(h(t)),"utf8"));return a.pbkdf2Async(o.sha512,r,i,{c:2048,dkLen:64}).then(e=>n.from(e))}function _(e,t){if(!(t=t||u))throw Error(f);let r=h(e).split(" ");if(r.length%3!=0)throw Error(d);let i=r.map(e=>{let r=t.indexOf(e);if(-1===r)throw Error(d);return g(r.toString(2),"0",11)}).join(""),o=32*Math.floor(i.length/33),a=i.slice(0,o),s=i.slice(o),l=a.match(/(.{1,8})/g).map(m);if(l.length<16||l.length>32||l.length%4!=0)throw Error(c);let y=n.from(l);if(v(y)!==s)throw Error(p);return y.toString("hex")}function k(e,t){if(n.isBuffer(e)||(e=n.from(e,"hex")),!(t=t||u))throw Error(f);if(e.length<16||e.length>32||e.length%4!=0)throw TypeError(c);let r=(y(Array.from(e))+v(e)).match(/(.{1,11})/g).map(e=>t[m(e)]);return"あいこくしん"===t[0]?r.join(" "):r.join(" ")}function O(e,t,r){if((e=e||128)%32!=0)throw TypeError(c);return k((t=t||(e=>n.from(s.randomBytes(e))))(e/8),r)}function P(e,t){try{_(e,t)}catch(e){return!1}return!0}function A(e){let t=l.wordlists[e];if(t)u=t;else throw Error('Could not find wordlist for language "'+e+'"')}function I(){if(!u)throw Error("No Default Wordlist set");return Object.keys(l.wordlists).filter(e=>"JA"!==e&&"EN"!==e&&l.wordlists[e].every((e,t)=>e===u[t]))[0]}t.mnemonicToSeedSync=S,t.mnemonicToSeed=w,t.mnemonicToEntropy=_,t.entropyToMnemonic=k,t.generateMnemonic=O,t.validateMnemonic=P,t.setDefaultWordlist=A,t.getDefaultWordlist=I;var R=r(52014);t.wordlists=R.wordlists},34108:function(e,t,r){!function(e,t){"use strict";function n(e,t){if(!e)throw Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function o(e,t,r){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&(("le"===t||"be"===t)&&(r=t,t=10),this._init(e||0,t||10,r||"be"))}"object"==typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{c=void 0!==window.Buffer?window.Buffer:r(46601).Buffer}catch(e){}function a(e,t){var r=e.charCodeAt(t);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+e)}function s(e,t,r){var n=a(e,r);return r-1>=t&&(n|=a(e,r-1)<<4),n}function l(e,t,r,i){for(var o=0,a=0,s=Math.min(e.length,r),l=t;l=49?u-49+10:u>=17?u-17+10:u,n(u>=0&&a0?e:t},o.min=function(e,t){return 0>e.cmp(t)?e:t},o.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;a-=3)o=e[a]|e[a-1]<<8|e[a-2]<<16,this.words[i]|=o<>>26-s&67108863,(s+=24)>=26&&(s-=26,i++);else if("le"===r)for(a=0,i=0;a>>26-s&67108863,(s+=24)>=26&&(s-=26,i++);return this._strip()},o.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=Array(this.length);for(var n,i=0;i=t;i-=2)n=s(e,t,i)<=18?(o-=18,a+=1,this.words[a]|=n>>>26):o+=8;else for(i=(e.length-t)%2==0?t+1:t;i=18?(o-=18,a+=1,this.words[a]|=n>>>26):o+=8;this._strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,a=o%n,s=Math.min(o,o-a)+r,u=0,d=r;d1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=d}catch(e){o.prototype.inspect=d}else o.prototype.inspect=d;function d(){return(this.red?""}var c,p=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],h=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];o.prototype.toString=function(e,t){if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var r,i=0,o=0,a=0;a>>24-i&16777215,(i+=2)>=26&&(i-=26,a--),r=0!==o||a!==this.length-1?p[6-l.length]+l+r:l+r}for(0!==o&&(r=o.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var u=f[e],d=h[e];r="";var c=this.clone();for(c.negative=0;!c.isZero();){var g=c.modrn(d).toString(e);r=(c=c.idivn(d)).isZero()?g+r:p[u-g.length]+g+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16,2)},c&&(o.prototype.toBuffer=function(e,t){return this.toArrayLike(c,e,t)}),o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};var g=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)};function m(e){for(var t=Array(e.bitLength()),r=0;r>>i&1}return t}function y(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],a=i*o,s=67108863&a,l=a/67108864|0;r.words[0]=s;for(var u=1;u>>26,c=67108863&l,p=Math.min(u,t.length-1),f=Math.max(0,u-e.length+1);f<=p;f++){var h=u-f|0;d+=(a=(i=0|e.words[h])*(o=0|t.words[f])+c)/67108864|0,c=67108863&a}r.words[u]=0|c,l=0|d}return 0!==l?r.words[u]=0|l:r.length--,r._strip()}o.prototype.toArrayLike=function(e,t,r){this._strip();var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0");var a=g(e,o);return this["_toArrayLike"+("le"===t?"LE":"BE")](a,i),a},o.prototype._toArrayLikeLE=function(e,t){for(var r=0,n=0,i=0,o=0;i>8&255),r>16&255),6===o?(r>24&255),n=0,o=0):(n=a>>>24,o+=2)}if(r=0&&(e[r--]=a>>8&255),r>=0&&(e[r--]=a>>16&255),6===o?(r>=0&&(e[r--]=a>>24&255),n=0,o=0):(n=a>>>24,o+=2)}if(r>=0)for(e[r--]=n;r>=0;)e[r--]=0},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return(8191&t)==0&&(r+=13,t>>>=13),(127&t)==0&&(r+=7,t>>>=7),(15&t)==0&&(r+=4,t>>>=4),(3&t)==0&&(r+=2,t>>>=2),(1&t)==0&&r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return(this.length-1)*26+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){this.length>e.length?(t=this,r=e):(t=e,r=this);for(var t,r,n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),t?this.words[r]=this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var t,r,n,i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;oe.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t,r,n=this.iadd(e);return e.negative=1,n._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(t=this,r=e):(t=e,r=this);for(var o=0,a=0;a>26,this.words[a]=67108863&n;for(;0!==o&&a>26,this.words[a]=67108863&n;if(0===o&&a>>13,f=0|a[1],h=8191&f,g=f>>>13,m=0|a[2],y=8191&m,v=m>>>13,b=0|a[3],S=8191&b,w=b>>>13,_=0|a[4],k=8191&_,O=_>>>13,P=0|a[5],A=8191&P,I=P>>>13,R=0|a[6],E=8191&R,T=R>>>13,N=0|a[7],x=8191&N,B=N>>>13,C=0|a[8],M=8191&C,D=C>>>13,U=0|a[9],J=8191&U,j=U>>>13,H=0|s[0],q=8191&H,L=H>>>13,F=0|s[1],V=8191&F,z=F>>>13,W=0|s[2],Q=8191&W,G=W>>>13,K=0|s[3],Y=8191&K,Z=K>>>13,X=0|s[4],$=8191&X,ee=X>>>13,et=0|s[5],er=8191&et,en=et>>>13,ei=0|s[6],eo=8191&ei,ea=ei>>>13,es=0|s[7],el=8191&es,eu=es>>>13,ed=0|s[8],ec=8191&ed,ep=ed>>>13,ef=0|s[9],eh=8191&ef,eg=ef>>>13;r.negative=e.negative^t.negative,r.length=19;var em=(u+(n=Math.imul(c,q))|0)+((8191&(i=(i=Math.imul(c,L))+Math.imul(p,q)|0))<<13)|0;u=((o=Math.imul(p,L))+(i>>>13)|0)+(em>>>26)|0,em&=67108863,n=Math.imul(h,q),i=(i=Math.imul(h,L))+Math.imul(g,q)|0,o=Math.imul(g,L);var ey=(u+(n=n+Math.imul(c,V)|0)|0)+((8191&(i=(i=i+Math.imul(c,z)|0)+Math.imul(p,V)|0))<<13)|0;u=((o=o+Math.imul(p,z)|0)+(i>>>13)|0)+(ey>>>26)|0,ey&=67108863,n=Math.imul(y,q),i=(i=Math.imul(y,L))+Math.imul(v,q)|0,o=Math.imul(v,L),n=n+Math.imul(h,V)|0,i=(i=i+Math.imul(h,z)|0)+Math.imul(g,V)|0,o=o+Math.imul(g,z)|0;var ev=(u+(n=n+Math.imul(c,Q)|0)|0)+((8191&(i=(i=i+Math.imul(c,G)|0)+Math.imul(p,Q)|0))<<13)|0;u=((o=o+Math.imul(p,G)|0)+(i>>>13)|0)+(ev>>>26)|0,ev&=67108863,n=Math.imul(S,q),i=(i=Math.imul(S,L))+Math.imul(w,q)|0,o=Math.imul(w,L),n=n+Math.imul(y,V)|0,i=(i=i+Math.imul(y,z)|0)+Math.imul(v,V)|0,o=o+Math.imul(v,z)|0,n=n+Math.imul(h,Q)|0,i=(i=i+Math.imul(h,G)|0)+Math.imul(g,Q)|0,o=o+Math.imul(g,G)|0;var eb=(u+(n=n+Math.imul(c,Y)|0)|0)+((8191&(i=(i=i+Math.imul(c,Z)|0)+Math.imul(p,Y)|0))<<13)|0;u=((o=o+Math.imul(p,Z)|0)+(i>>>13)|0)+(eb>>>26)|0,eb&=67108863,n=Math.imul(k,q),i=(i=Math.imul(k,L))+Math.imul(O,q)|0,o=Math.imul(O,L),n=n+Math.imul(S,V)|0,i=(i=i+Math.imul(S,z)|0)+Math.imul(w,V)|0,o=o+Math.imul(w,z)|0,n=n+Math.imul(y,Q)|0,i=(i=i+Math.imul(y,G)|0)+Math.imul(v,Q)|0,o=o+Math.imul(v,G)|0,n=n+Math.imul(h,Y)|0,i=(i=i+Math.imul(h,Z)|0)+Math.imul(g,Y)|0,o=o+Math.imul(g,Z)|0;var eS=(u+(n=n+Math.imul(c,$)|0)|0)+((8191&(i=(i=i+Math.imul(c,ee)|0)+Math.imul(p,$)|0))<<13)|0;u=((o=o+Math.imul(p,ee)|0)+(i>>>13)|0)+(eS>>>26)|0,eS&=67108863,n=Math.imul(A,q),i=(i=Math.imul(A,L))+Math.imul(I,q)|0,o=Math.imul(I,L),n=n+Math.imul(k,V)|0,i=(i=i+Math.imul(k,z)|0)+Math.imul(O,V)|0,o=o+Math.imul(O,z)|0,n=n+Math.imul(S,Q)|0,i=(i=i+Math.imul(S,G)|0)+Math.imul(w,Q)|0,o=o+Math.imul(w,G)|0,n=n+Math.imul(y,Y)|0,i=(i=i+Math.imul(y,Z)|0)+Math.imul(v,Y)|0,o=o+Math.imul(v,Z)|0,n=n+Math.imul(h,$)|0,i=(i=i+Math.imul(h,ee)|0)+Math.imul(g,$)|0,o=o+Math.imul(g,ee)|0;var ew=(u+(n=n+Math.imul(c,er)|0)|0)+((8191&(i=(i=i+Math.imul(c,en)|0)+Math.imul(p,er)|0))<<13)|0;u=((o=o+Math.imul(p,en)|0)+(i>>>13)|0)+(ew>>>26)|0,ew&=67108863,n=Math.imul(E,q),i=(i=Math.imul(E,L))+Math.imul(T,q)|0,o=Math.imul(T,L),n=n+Math.imul(A,V)|0,i=(i=i+Math.imul(A,z)|0)+Math.imul(I,V)|0,o=o+Math.imul(I,z)|0,n=n+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,G)|0)+Math.imul(O,Q)|0,o=o+Math.imul(O,G)|0,n=n+Math.imul(S,Y)|0,i=(i=i+Math.imul(S,Z)|0)+Math.imul(w,Y)|0,o=o+Math.imul(w,Z)|0,n=n+Math.imul(y,$)|0,i=(i=i+Math.imul(y,ee)|0)+Math.imul(v,$)|0,o=o+Math.imul(v,ee)|0,n=n+Math.imul(h,er)|0,i=(i=i+Math.imul(h,en)|0)+Math.imul(g,er)|0,o=o+Math.imul(g,en)|0;var e_=(u+(n=n+Math.imul(c,eo)|0)|0)+((8191&(i=(i=i+Math.imul(c,ea)|0)+Math.imul(p,eo)|0))<<13)|0;u=((o=o+Math.imul(p,ea)|0)+(i>>>13)|0)+(e_>>>26)|0,e_&=67108863,n=Math.imul(x,q),i=(i=Math.imul(x,L))+Math.imul(B,q)|0,o=Math.imul(B,L),n=n+Math.imul(E,V)|0,i=(i=i+Math.imul(E,z)|0)+Math.imul(T,V)|0,o=o+Math.imul(T,z)|0,n=n+Math.imul(A,Q)|0,i=(i=i+Math.imul(A,G)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,G)|0,n=n+Math.imul(k,Y)|0,i=(i=i+Math.imul(k,Z)|0)+Math.imul(O,Y)|0,o=o+Math.imul(O,Z)|0,n=n+Math.imul(S,$)|0,i=(i=i+Math.imul(S,ee)|0)+Math.imul(w,$)|0,o=o+Math.imul(w,ee)|0,n=n+Math.imul(y,er)|0,i=(i=i+Math.imul(y,en)|0)+Math.imul(v,er)|0,o=o+Math.imul(v,en)|0,n=n+Math.imul(h,eo)|0,i=(i=i+Math.imul(h,ea)|0)+Math.imul(g,eo)|0,o=o+Math.imul(g,ea)|0;var ek=(u+(n=n+Math.imul(c,el)|0)|0)+((8191&(i=(i=i+Math.imul(c,eu)|0)+Math.imul(p,el)|0))<<13)|0;u=((o=o+Math.imul(p,eu)|0)+(i>>>13)|0)+(ek>>>26)|0,ek&=67108863,n=Math.imul(M,q),i=(i=Math.imul(M,L))+Math.imul(D,q)|0,o=Math.imul(D,L),n=n+Math.imul(x,V)|0,i=(i=i+Math.imul(x,z)|0)+Math.imul(B,V)|0,o=o+Math.imul(B,z)|0,n=n+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,G)|0)+Math.imul(T,Q)|0,o=o+Math.imul(T,G)|0,n=n+Math.imul(A,Y)|0,i=(i=i+Math.imul(A,Z)|0)+Math.imul(I,Y)|0,o=o+Math.imul(I,Z)|0,n=n+Math.imul(k,$)|0,i=(i=i+Math.imul(k,ee)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,ee)|0,n=n+Math.imul(S,er)|0,i=(i=i+Math.imul(S,en)|0)+Math.imul(w,er)|0,o=o+Math.imul(w,en)|0,n=n+Math.imul(y,eo)|0,i=(i=i+Math.imul(y,ea)|0)+Math.imul(v,eo)|0,o=o+Math.imul(v,ea)|0,n=n+Math.imul(h,el)|0,i=(i=i+Math.imul(h,eu)|0)+Math.imul(g,el)|0,o=o+Math.imul(g,eu)|0;var eO=(u+(n=n+Math.imul(c,ec)|0)|0)+((8191&(i=(i=i+Math.imul(c,ep)|0)+Math.imul(p,ec)|0))<<13)|0;u=((o=o+Math.imul(p,ep)|0)+(i>>>13)|0)+(eO>>>26)|0,eO&=67108863,n=Math.imul(J,q),i=(i=Math.imul(J,L))+Math.imul(j,q)|0,o=Math.imul(j,L),n=n+Math.imul(M,V)|0,i=(i=i+Math.imul(M,z)|0)+Math.imul(D,V)|0,o=o+Math.imul(D,z)|0,n=n+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,G)|0)+Math.imul(B,Q)|0,o=o+Math.imul(B,G)|0,n=n+Math.imul(E,Y)|0,i=(i=i+Math.imul(E,Z)|0)+Math.imul(T,Y)|0,o=o+Math.imul(T,Z)|0,n=n+Math.imul(A,$)|0,i=(i=i+Math.imul(A,ee)|0)+Math.imul(I,$)|0,o=o+Math.imul(I,ee)|0,n=n+Math.imul(k,er)|0,i=(i=i+Math.imul(k,en)|0)+Math.imul(O,er)|0,o=o+Math.imul(O,en)|0,n=n+Math.imul(S,eo)|0,i=(i=i+Math.imul(S,ea)|0)+Math.imul(w,eo)|0,o=o+Math.imul(w,ea)|0,n=n+Math.imul(y,el)|0,i=(i=i+Math.imul(y,eu)|0)+Math.imul(v,el)|0,o=o+Math.imul(v,eu)|0,n=n+Math.imul(h,ec)|0,i=(i=i+Math.imul(h,ep)|0)+Math.imul(g,ec)|0,o=o+Math.imul(g,ep)|0;var eP=(u+(n=n+Math.imul(c,eh)|0)|0)+((8191&(i=(i=i+Math.imul(c,eg)|0)+Math.imul(p,eh)|0))<<13)|0;u=((o=o+Math.imul(p,eg)|0)+(i>>>13)|0)+(eP>>>26)|0,eP&=67108863,n=Math.imul(J,V),i=(i=Math.imul(J,z))+Math.imul(j,V)|0,o=Math.imul(j,z),n=n+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,G)|0)+Math.imul(D,Q)|0,o=o+Math.imul(D,G)|0,n=n+Math.imul(x,Y)|0,i=(i=i+Math.imul(x,Z)|0)+Math.imul(B,Y)|0,o=o+Math.imul(B,Z)|0,n=n+Math.imul(E,$)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,ee)|0,n=n+Math.imul(A,er)|0,i=(i=i+Math.imul(A,en)|0)+Math.imul(I,er)|0,o=o+Math.imul(I,en)|0,n=n+Math.imul(k,eo)|0,i=(i=i+Math.imul(k,ea)|0)+Math.imul(O,eo)|0,o=o+Math.imul(O,ea)|0,n=n+Math.imul(S,el)|0,i=(i=i+Math.imul(S,eu)|0)+Math.imul(w,el)|0,o=o+Math.imul(w,eu)|0,n=n+Math.imul(y,ec)|0,i=(i=i+Math.imul(y,ep)|0)+Math.imul(v,ec)|0,o=o+Math.imul(v,ep)|0;var eA=(u+(n=n+Math.imul(h,eh)|0)|0)+((8191&(i=(i=i+Math.imul(h,eg)|0)+Math.imul(g,eh)|0))<<13)|0;u=((o=o+Math.imul(g,eg)|0)+(i>>>13)|0)+(eA>>>26)|0,eA&=67108863,n=Math.imul(J,Q),i=(i=Math.imul(J,G))+Math.imul(j,Q)|0,o=Math.imul(j,G),n=n+Math.imul(M,Y)|0,i=(i=i+Math.imul(M,Z)|0)+Math.imul(D,Y)|0,o=o+Math.imul(D,Z)|0,n=n+Math.imul(x,$)|0,i=(i=i+Math.imul(x,ee)|0)+Math.imul(B,$)|0,o=o+Math.imul(B,ee)|0,n=n+Math.imul(E,er)|0,i=(i=i+Math.imul(E,en)|0)+Math.imul(T,er)|0,o=o+Math.imul(T,en)|0,n=n+Math.imul(A,eo)|0,i=(i=i+Math.imul(A,ea)|0)+Math.imul(I,eo)|0,o=o+Math.imul(I,ea)|0,n=n+Math.imul(k,el)|0,i=(i=i+Math.imul(k,eu)|0)+Math.imul(O,el)|0,o=o+Math.imul(O,eu)|0,n=n+Math.imul(S,ec)|0,i=(i=i+Math.imul(S,ep)|0)+Math.imul(w,ec)|0,o=o+Math.imul(w,ep)|0;var eI=(u+(n=n+Math.imul(y,eh)|0)|0)+((8191&(i=(i=i+Math.imul(y,eg)|0)+Math.imul(v,eh)|0))<<13)|0;u=((o=o+Math.imul(v,eg)|0)+(i>>>13)|0)+(eI>>>26)|0,eI&=67108863,n=Math.imul(J,Y),i=(i=Math.imul(J,Z))+Math.imul(j,Y)|0,o=Math.imul(j,Z),n=n+Math.imul(M,$)|0,i=(i=i+Math.imul(M,ee)|0)+Math.imul(D,$)|0,o=o+Math.imul(D,ee)|0,n=n+Math.imul(x,er)|0,i=(i=i+Math.imul(x,en)|0)+Math.imul(B,er)|0,o=o+Math.imul(B,en)|0,n=n+Math.imul(E,eo)|0,i=(i=i+Math.imul(E,ea)|0)+Math.imul(T,eo)|0,o=o+Math.imul(T,ea)|0,n=n+Math.imul(A,el)|0,i=(i=i+Math.imul(A,eu)|0)+Math.imul(I,el)|0,o=o+Math.imul(I,eu)|0,n=n+Math.imul(k,ec)|0,i=(i=i+Math.imul(k,ep)|0)+Math.imul(O,ec)|0,o=o+Math.imul(O,ep)|0;var eR=(u+(n=n+Math.imul(S,eh)|0)|0)+((8191&(i=(i=i+Math.imul(S,eg)|0)+Math.imul(w,eh)|0))<<13)|0;u=((o=o+Math.imul(w,eg)|0)+(i>>>13)|0)+(eR>>>26)|0,eR&=67108863,n=Math.imul(J,$),i=(i=Math.imul(J,ee))+Math.imul(j,$)|0,o=Math.imul(j,ee),n=n+Math.imul(M,er)|0,i=(i=i+Math.imul(M,en)|0)+Math.imul(D,er)|0,o=o+Math.imul(D,en)|0,n=n+Math.imul(x,eo)|0,i=(i=i+Math.imul(x,ea)|0)+Math.imul(B,eo)|0,o=o+Math.imul(B,ea)|0,n=n+Math.imul(E,el)|0,i=(i=i+Math.imul(E,eu)|0)+Math.imul(T,el)|0,o=o+Math.imul(T,eu)|0,n=n+Math.imul(A,ec)|0,i=(i=i+Math.imul(A,ep)|0)+Math.imul(I,ec)|0,o=o+Math.imul(I,ep)|0;var eE=(u+(n=n+Math.imul(k,eh)|0)|0)+((8191&(i=(i=i+Math.imul(k,eg)|0)+Math.imul(O,eh)|0))<<13)|0;u=((o=o+Math.imul(O,eg)|0)+(i>>>13)|0)+(eE>>>26)|0,eE&=67108863,n=Math.imul(J,er),i=(i=Math.imul(J,en))+Math.imul(j,er)|0,o=Math.imul(j,en),n=n+Math.imul(M,eo)|0,i=(i=i+Math.imul(M,ea)|0)+Math.imul(D,eo)|0,o=o+Math.imul(D,ea)|0,n=n+Math.imul(x,el)|0,i=(i=i+Math.imul(x,eu)|0)+Math.imul(B,el)|0,o=o+Math.imul(B,eu)|0,n=n+Math.imul(E,ec)|0,i=(i=i+Math.imul(E,ep)|0)+Math.imul(T,ec)|0,o=o+Math.imul(T,ep)|0;var eT=(u+(n=n+Math.imul(A,eh)|0)|0)+((8191&(i=(i=i+Math.imul(A,eg)|0)+Math.imul(I,eh)|0))<<13)|0;u=((o=o+Math.imul(I,eg)|0)+(i>>>13)|0)+(eT>>>26)|0,eT&=67108863,n=Math.imul(J,eo),i=(i=Math.imul(J,ea))+Math.imul(j,eo)|0,o=Math.imul(j,ea),n=n+Math.imul(M,el)|0,i=(i=i+Math.imul(M,eu)|0)+Math.imul(D,el)|0,o=o+Math.imul(D,eu)|0,n=n+Math.imul(x,ec)|0,i=(i=i+Math.imul(x,ep)|0)+Math.imul(B,ec)|0,o=o+Math.imul(B,ep)|0;var eN=(u+(n=n+Math.imul(E,eh)|0)|0)+((8191&(i=(i=i+Math.imul(E,eg)|0)+Math.imul(T,eh)|0))<<13)|0;u=((o=o+Math.imul(T,eg)|0)+(i>>>13)|0)+(eN>>>26)|0,eN&=67108863,n=Math.imul(J,el),i=(i=Math.imul(J,eu))+Math.imul(j,el)|0,o=Math.imul(j,eu),n=n+Math.imul(M,ec)|0,i=(i=i+Math.imul(M,ep)|0)+Math.imul(D,ec)|0,o=o+Math.imul(D,ep)|0;var ex=(u+(n=n+Math.imul(x,eh)|0)|0)+((8191&(i=(i=i+Math.imul(x,eg)|0)+Math.imul(B,eh)|0))<<13)|0;u=((o=o+Math.imul(B,eg)|0)+(i>>>13)|0)+(ex>>>26)|0,ex&=67108863,n=Math.imul(J,ec),i=(i=Math.imul(J,ep))+Math.imul(j,ec)|0,o=Math.imul(j,ep);var eB=(u+(n=n+Math.imul(M,eh)|0)|0)+((8191&(i=(i=i+Math.imul(M,eg)|0)+Math.imul(D,eh)|0))<<13)|0;u=((o=o+Math.imul(D,eg)|0)+(i>>>13)|0)+(eB>>>26)|0,eB&=67108863;var eC=(u+(n=Math.imul(J,eh))|0)+((8191&(i=(i=Math.imul(J,eg))+Math.imul(j,eh)|0))<<13)|0;return u=((o=Math.imul(j,eg))+(i>>>13)|0)+(eC>>>26)|0,eC&=67108863,l[0]=em,l[1]=ey,l[2]=ev,l[3]=eb,l[4]=eS,l[5]=ew,l[6]=e_,l[7]=ek,l[8]=eO,l[9]=eP,l[10]=eA,l[11]=eI,l[12]=eR,l[13]=eE,l[14]=eT,l[15]=eN,l[16]=ex,l[17]=eB,l[18]=eC,0!==u&&(l[19]=u,r.length++),r};function b(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r._strip()}function S(e,t,r){return b(e,t,r)}function w(e,t){this.x=e,this.y=t}Math.imul||(v=y),o.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?v(this,e,t):r<63?y(this,e,t):r<1024?b(this,e,t):S(this,e,t)},w.prototype.makeRBT=function(e){for(var t=Array(e),r=o.prototype._countBits(e)-1,n=0;n>=1;return n},w.prototype.permute=function(e,t,r,n,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*t;a>=26,r+=(o/67108864|0)+(a>>>26),this.words[i]=67108863&a}return 0!==r&&(this.words[i]=r,this.length++),t?this.ineg():this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=m(e);if(0===t.length)return new o(1);for(var r=this,n=0;n=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(t=0;t>>26-r}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var i,o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,u=0;u=0&&(0!==d||u>=i);u--){var c=0|this.words[u];this.words[u]=d<<26-o|c>>>o,d=c&s}return l&&0!==d&&(l.words[l.length++]=d),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(l/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===s)return this._strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(e,t){var r,n=this.length-e.length,i=this.clone(),a=e,s=0|a.words[a.length-1];0!=(n=26-this._countBits(s))&&(a=a.ushln(n),i.iushln(n),s=0|a.words[a.length-1]);var l=i.length-a.length;if("mod"!==t){(r=new o(null)).length=l+1,r.words=Array(r.length);for(var u=0;u=0;c--){var p=(0|i.words[a.length+c])*67108864+(0|i.words[a.length+c-1]);for(p=Math.min(p/s|0,67108863),i._ishlnsubmul(a,p,c);0!==i.negative;)p--,i.negative=0,i._ishlnsubmul(a,1,c),i.isZero()||(i.negative^=1);r&&(r.words[c]=p)}return r&&r._strip(),i._strip(),"div"!==t&&0!==n&&i.iushrn(n),{div:r||null,mod:i}},o.prototype.divmod=function(e,t,r){var i,a,s;return(n(!e.isZero()),this.isZero())?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(e)),{div:i,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):(this.negative&e.negative)!=0?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||0>this.cmp(e)?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modrn(e.words[0]))}:this._wordDiv(e,t)},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modrn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=67108864%e,i=0,o=this.length-1;o>=0;o--)i=(r*i+(0|this.words[o]))%e;return t?-i:i},o.prototype.modn=function(e){return this.modrn(e)},o.prototype.idivn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*r;this.words[i]=o/e|0,r=o%e}return this._strip(),t?this.ineg():this},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),a=new o(0),s=new o(0),l=new o(1),u=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++u;for(var d=r.clone(),c=t.clone();!t.isZero();){for(var p=0,f=1;(t.words[0]&f)==0&&p<26;++p,f<<=1);if(p>0)for(t.iushrn(p);p-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(d),a.isub(c)),i.iushrn(1),a.iushrn(1);for(var h=0,g=1;(r.words[0]&g)==0&&h<26;++h,g<<=1);if(h>0)for(r.iushrn(h);h-- >0;)(s.isOdd()||l.isOdd())&&(s.iadd(d),l.isub(c)),s.iushrn(1),l.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(s),a.isub(l)):(r.isub(t),s.isub(i),l.isub(a))}return{a:s,b:l,gcd:r.iushln(u)}},o.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t,r=this,i=e.clone();r=0!==r.negative?r.umod(e):r.clone();for(var a=new o(1),s=new o(0),l=i.clone();r.cmpn(1)>0&&i.cmpn(1)>0;){for(var u=0,d=1;(r.words[0]&d)==0&&u<26;++u,d<<=1);if(u>0)for(r.iushrn(u);u-- >0;)a.isOdd()&&a.iadd(l),a.iushrn(1);for(var c=0,p=1;(i.words[0]&p)==0&&c<26;++c,p<<=1);if(c>0)for(i.iushrn(c);c-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);r.cmp(i)>=0?(r.isub(i),a.isub(s)):(i.isub(r),s.isub(a))}return 0>(t=0===r.cmpn(1)?a:s).cmpn(0)&&t.iadd(e),t},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return(1&this.words[0])==0},o.prototype.isOdd=function(){return(1&this.words[0])==1},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return -1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:ie.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){ni&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return -1===this.cmpn(e)},o.prototype.lt=function(e){return -1===this.cmp(e)},o.prototype.lten=function(e){return 0>=this.cmpn(e)},o.prototype.lte=function(e){return 0>=this.cmp(e)},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new R(e)},o.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var _={k256:null,p224:null,p192:null,p25519:null};function k(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function O(){k.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function P(){k.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function A(){k.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function I(){k.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function R(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function E(e){R.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}k.prototype._tmp=function(){var e=new o(null);return e.words=Array(Math.ceil(this.n/13)),e},k.prototype.ireduce=function(e){var t,r=e;do this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength();while(t>this.n);var n=t0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},k.prototype.split=function(e,t){e.iushrn(this.n,0,t)},k.prototype.imulK=function(e){return e.imul(this.k)},i(O,k),O.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i>>22,o=a}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},O.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){var t;if(_[e])return _[e];if("k256"===e)t=new O;else if("p224"===e)t=new P;else if("p192"===e)t=new A;else if("p25519"===e)t=new I;else throw Error("Unknown prime "+e);return _[e]=t,t},R.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},R.prototype._verify2=function(e,t){n((e.negative|t.negative)==0,"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},R.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(u(e,e.umod(this.m)._forceRed(this)),e)},R.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},R.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},R.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},R.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return 0>r.cmpn(0)&&r.iadd(this.m),r._forceRed(this)},R.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return 0>r.cmpn(0)&&r.iadd(this.m),r},R.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},R.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},R.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},R.prototype.isqr=function(e){return this.imul(e,e.clone())},R.prototype.sqr=function(e){return this.mul(e,e)},R.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),l=s.redNeg(),u=this.m.subn(1).iushrn(1),d=this.m.bitLength();for(d=new o(2*d*d).toRed(this);0!==this.pow(d,u).cmp(l);)d.redIAdd(l);for(var c=this.pow(d,i),p=this.pow(e,i.addn(1).iushrn(1)),f=this.pow(e,i),h=a;0!==f.cmp(s);){for(var g=f,m=0;0!==g.cmp(s);m++)g=g.redSqr();n(m=0;i--){for(var d=t.words[i],c=u-1;c>=0;c--){var p=d>>c&1;if(a!==n[0]&&(a=this.sqr(a)),0===p&&0===s){l=0;continue}s<<=1,s|=p,(++l===r||0===i&&0===c)&&(a=this.mul(a,n[s]),l=0,s=0)}u=26}return a},R.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},R.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new E(e)},i(E,R),E.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},E.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},E.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):0>i.cmpn(0)&&(o=i.iadd(this.m)),o._forceRed(this)},E.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):0>i.cmpn(0)&&(a=i.iadd(this.m)),a._forceRed(this)},E.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},81658:function(e,t,r){"use strict";var n;function i(e){this.rand=e}if(e.exports=function(e){return n||(n=new i(null)),n.generate(e)},e.exports.Rand=i,i.prototype.generate=function(e){return this._rand(e)},i.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),r=0;r * @license MIT - */let n=r(66033),i=r(61531),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=u,t.SlowBuffer=S,t.INSPECT_MAX_BYTES=50;let a=2147483647;function s(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}function l(e){if(e>a)throw RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,u.prototype),t}function u(e,t,r){if("number"==typeof e){if("string"==typeof t)throw TypeError('The "string" argument must be of type string. Received type number');return f(e)}return d(e,t,r)}function d(e,t,r){if("string"==typeof e)return h(e,t);if(ArrayBuffer.isView(e))return m(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(ea(e,ArrayBuffer)||e&&ea(e.buffer,ArrayBuffer)||"undefined"!=typeof SharedArrayBuffer&&(ea(e,SharedArrayBuffer)||e&&ea(e.buffer,SharedArrayBuffer)))return y(e,t,r);if("number"==typeof e)throw TypeError('The "value" argument must not be of type number. Received type number');let n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return u.from(n,t,r);let i=v(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return u.from(e[Symbol.toPrimitive]("string"),t,r);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function c(e){if("number"!=typeof e)throw TypeError('"size" argument must be of type number');if(e<0)throw RangeError('The value "'+e+'" is invalid for option "size"')}function p(e,t,r){return(c(e),e<=0)?l(e):void 0!==t?"string"==typeof r?l(e).fill(t,r):l(e).fill(t):l(e)}function f(e){return c(e),l(e<0?0:0|b(e))}function h(e,t){if(("string"!=typeof t||""===t)&&(t="utf8"),!u.isEncoding(t))throw TypeError("Unknown encoding: "+t);let r=0|w(e,t),n=l(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}function g(e){let t=e.length<0?0:0|b(e.length),r=l(t);for(let n=0;n=a)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|e}function S(e){return+e!=e&&(e=0),u.alloc(+e)}function w(e,t){if(u.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||ea(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return et(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return ei(e).length;default:if(i)return n?-1:et(e).length;t=(""+t).toLowerCase(),i=!0}}function _(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0||(r>>>=0)<=(t>>>=0)))return"";for(e||(e="utf8");;)switch(e){case"hex":return U(this,t,r);case"utf8":case"utf-8":return x(this,t,r);case"ascii":return M(this,t,r);case"latin1":case"binary":return D(this,t,r);case"base64":return N(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return J(this,t,r);default:if(n)throw TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function k(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}function O(e,t,r,n,i){if(0===e.length)return -1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),es(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return -1;r=e.length-1}else if(r<0){if(!i)return -1;r=0}if("string"==typeof t&&(t=u.from(t,n)),u.isBuffer(t))return 0===t.length?-1:P(e,t,r,n,i);if("number"==typeof t)return(t&=255,"function"==typeof Uint8Array.prototype.indexOf)?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):P(e,[t],r,n,i);throw TypeError("val must be string, number or Buffer")}function P(e,t,r,n,i){let o,a=1,s=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return -1;a=2,s/=2,l/=2,r/=2}function u(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){let n=-1;for(o=r;os&&(r=s-l),o=r;o>=0;o--){let r=!0;for(let n=0;no&&(n=o):n=o;let a=t.length;for(n>a/2&&(n=a/2),i=0;i239?4:t>223?3:t>191?2:1;if(i+a<=r){let r,n,s,l;switch(a){case 1:t<128&&(o=t);break;case 2:(192&(r=e[i+1]))==128&&(l=(31&t)<<6|63&r)>127&&(o=l);break;case 3:r=e[i+1],n=e[i+2],(192&r)==128&&(192&n)==128&&(l=(15&t)<<12|(63&r)<<6|63&n)>2047&&(l<55296||l>57343)&&(o=l);break;case 4:r=e[i+1],n=e[i+2],s=e[i+3],(192&r)==128&&(192&n)==128&&(192&s)==128&&(l=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&s)>65535&&l<1114112&&(o=l)}}null===o?(o=65533,a=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=a}return C(n)}t.kMaxLength=a,u.TYPED_ARRAY_SUPPORT=s(),u.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(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}}),u.poolSize=8192,u.from=function(e,t,r){return d(e,t,r)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array),u.alloc=function(e,t,r){return p(e,t,r)},u.allocUnsafe=function(e){return f(e)},u.allocUnsafeSlow=function(e){return f(e)},u.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==u.prototype},u.compare=function(e,t){if(ea(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),ea(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(e)||!u.isBuffer(t))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let i=0,o=Math.min(r,n);in.length?(u.isBuffer(t)||(t=u.from(t)),t.copy(n,i)):Uint8Array.prototype.set.call(n,t,i);else if(u.isBuffer(t))t.copy(n,i);else throw TypeError('"list" argument must be an Array of Buffers');i+=t.length}return n},u.byteLength=w,u.prototype._isBuffer=!0,u.prototype.swap16=function(){let e=this.length;if(e%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tr&&(e+=" ... "),""},o&&(u.prototype[o]=u.prototype.inspect),u.prototype.compare=function(e,t,r,n,i){if(ea(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(e))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return -1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;let o=i-n,a=r-t,s=Math.min(o,a),l=this.slice(n,i),d=e.slice(t,r);for(let e=0;e>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return A(this,e,t,r);case"utf8":case"utf-8":return I(this,e,t,r);case"ascii":case"latin1":case"binary":return R(this,e,t,r);case"base64":return E(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,e,t,r);default:if(o)throw TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};let B=4096;function C(e){let t=e.length;if(t<=B)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn)&&(r=n);let i="";for(let n=t;nr)throw RangeError("Trying to access beyond buffer length")}function H(e,t,r,n,i,o){if(!u.isBuffer(e))throw TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw RangeError("Index out of range")}function q(e,t,r,n,i){Y(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,r}function L(e,t,r,n,i){Y(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o>>=8,e[r+6]=o,o>>=8,e[r+5]=o,o>>=8,e[r+4]=o;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=a,a>>=8,e[r+2]=a,a>>=8,e[r+1]=a,a>>=8,e[r]=a,r+8}function F(e,t,r,n,i,o){if(r+n>e.length||r<0)throw RangeError("Index out of range")}function V(e,t,r,n,o){return t=+t,r>>>=0,o||F(e,t,r,4,34028234663852886e22,-34028234663852886e22),i.write(e,t,r,n,23,4),r+4}function W(e,t,r,n,o){return t=+t,r>>>=0,o||F(e,t,r,8,17976931348623157e292,-17976931348623157e292),i.write(e,t,r,n,52,8),r+8}u.prototype.slice=function(e,t){let r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t>>=0,t>>>=0,r||j(e,t,this.length);let n=this[e],i=1,o=0;for(;++o>>=0,t>>>=0,r||j(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n},u.prototype.readUint8=u.prototype.readUInt8=function(e,t){return e>>>=0,t||j(e,1,this.length),this[e]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(e,t){return e>>>=0,t||j(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(e,t){return e>>>=0,t||j(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(e,t){return e>>>=0,t||j(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(e,t){return e>>>=0,t||j(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readBigUInt64LE=eu(function(e){Z(e>>>=0,"offset");let t=this[e],r=this[e+7];(void 0===t||void 0===r)&&X(e,this.length-8);let n=t+256*this[++e]+65536*this[++e]+16777216*this[++e],i=this[++e]+256*this[++e]+65536*this[++e]+16777216*r;return BigInt(n)+(BigInt(i)<>>=0,"offset");let t=this[e],r=this[e+7];(void 0===t||void 0===r)&&X(e,this.length-8);let n=16777216*t+65536*this[++e]+256*this[++e]+this[++e],i=16777216*this[++e]+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<>>=0,t>>>=0,r||j(e,t,this.length);let n=this[e],i=1,o=0;for(;++o=(i*=128)&&(n-=Math.pow(2,8*t)),n},u.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||j(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},u.prototype.readInt8=function(e,t){return(e>>>=0,t||j(e,1,this.length),128&this[e])?-((255-this[e]+1)*1):this[e]},u.prototype.readInt16LE=function(e,t){e>>>=0,t||j(e,2,this.length);let r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(e,t){e>>>=0,t||j(e,2,this.length);let r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(e,t){return e>>>=0,t||j(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return e>>>=0,t||j(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readBigInt64LE=eu(function(e){Z(e>>>=0,"offset");let t=this[e],r=this[e+7];return(void 0===t||void 0===r)&&X(e,this.length-8),(BigInt(this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24))<>>=0,"offset");let t=this[e],r=this[e+7];return(void 0===t||void 0===r)&&X(e,this.length-8),(BigInt((t<<24)+65536*this[++e]+256*this[++e]+this[++e])<>>=0,t||j(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return e>>>=0,t||j(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return e>>>=0,t||j(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return e>>>=0,t||j(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){let n=Math.pow(2,8*r)-1;H(this,e,t,r,n,0)}let i=1,o=0;for(this[t]=255&e;++o>>=0,r>>>=0,!n){let n=Math.pow(2,8*r)-1;H(this,e,t,r,n,0)}let i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},u.prototype.writeUint8=u.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||H(this,e,t,1,255,0),this[t]=255&e,t+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||H(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||H(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||H(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},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||H(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},u.prototype.writeBigUInt64LE=eu(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return q(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeBigUInt64BE=eu(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return L(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){let n=Math.pow(2,8*r-1);H(this,e,t,r,n-1,-n)}let i=0,o=1,a=0;for(this[t]=255&e;++i>0)-a&255;return t+r},u.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){let n=Math.pow(2,8*r-1);H(this,e,t,r,n-1,-n)}let i=r-1,o=1,a=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/o>>0)-a&255;return t+r},u.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||H(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||H(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||H(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||H(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},u.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||H(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},u.prototype.writeBigInt64LE=eu(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return q(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeBigInt64BE=eu(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return L(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeFloatLE=function(e,t,r){return V(this,e,t,!0,r)},u.prototype.writeFloatBE=function(e,t,r){return V(this,e,t,!1,r)},u.prototype.writeDoubleLE=function(e,t,r){return W(this,e,t,!0,r)},u.prototype.writeDoubleBE=function(e,t,r){return W(this,e,t,!1,r)},u.prototype.copy=function(e,t,r,n){if(!u.isBuffer(e))throw TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw RangeError("Index out of range");if(n<0)throw RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i=n+4;r-=3)t="_".concat(e.slice(r-3,r)).concat(t);return"".concat(e.slice(0,r)).concat(t)}function K(e,t,r){Z(t,"offset"),(void 0===e[t]||void 0===e[t+r])&&X(t,e.length-(r+1))}function Y(e,t,r,n,i,o){if(e>r||e3?0===t||t===BigInt(0)?">= 0".concat(i," and < 2").concat(i," ** ").concat((o+1)*8).concat(i):">= -(2".concat(i," ** ").concat((o+1)*8-1).concat(i,") and < 2 ** ")+"".concat((o+1)*8-1).concat(i):">= ".concat(t).concat(i," and <= ").concat(r).concat(i),new z.ERR_OUT_OF_RANGE("value",n,e)}K(n,i,o)}function Z(e,t){if("number"!=typeof e)throw new z.ERR_INVALID_ARG_TYPE(t,"number",e)}function X(e,t,r){if(Math.floor(e)!==e)throw Z(e,r),new z.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new z.ERR_BUFFER_OUT_OF_BOUNDS;throw new z.ERR_OUT_OF_RANGE(r||"offset",">= ".concat(r?1:0," and <= ").concat(t),e)}G("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?"".concat(e," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"},RangeError),G("ERR_INVALID_ARG_TYPE",function(e,t){return'The "'.concat(e,'" argument must be of type number. Received type ').concat(typeof t)},TypeError),G("ERR_OUT_OF_RANGE",function(e,t,r){let n='The value of "'.concat(e,'" is out of range.'),i=r;return Number.isInteger(r)&&Math.abs(r)>4294967296?i=Q(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=Q(i)),i+="n"),n+=" It must be ".concat(t,". Received ").concat(i)},RangeError);let $=/[^+/0-9A-Za-z-_]/g;function ee(e){if((e=(e=e.split("=")[0]).trim().replace($,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}function et(e,t){let r;t=t||1/0;let n=e.length,i=null,o=[];for(let a=0;a55295&&r<57344){if(!i){if(r>56319||a+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else if(r<1114112){if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return o}function er(e){let t=[];for(let r=0;r>8,i.push(r%256),i.push(n);return i}function ei(e){return n.toByteArray(ee(e))}function eo(e,t,r,n){let i;for(i=0;i=t.length)&&!(i>=e.length);++i)t[i+r]=e[i];return i}function ea(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function es(e){return e!=e}let el=function(){let e="0123456789abcdef",t=Array(256);for(let r=0;r<16;++r){let n=16*r;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function eu(e){return"undefined"==typeof BigInt?ed:e}function ed(){throw Error("BigInt not supported")}},73842:function(e,t,r){"use strict";var n=r(47226).Buffer,i=r(37906).Transform,o=r(55144).StringDecoder;function a(e){i.call(this),this.hashMode="string"==typeof e,this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}r(39541)(a,i),a.prototype.update=function(e,t,r){"string"==typeof e&&(e=n.from(e,t));var i=this._update(e);return this.hashMode?this:(r&&(i=this._toString(i,r)),i)},a.prototype.setAutoPadding=function(){},a.prototype.getAuthTag=function(){throw Error("trying to get auth tag in unsupported state")},a.prototype.setAuthTag=function(){throw Error("trying to set auth tag in unsupported state")},a.prototype.setAAD=function(){throw Error("trying to set aad in unsupported state")},a.prototype._transform=function(e,t,r){var n;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(e){n=e}finally{r(n)}},a.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(e){t=e}e(t)},a.prototype._finalOrDigest=function(e){var t=this.__final()||n.alloc(0);return e&&(t=this._toString(t,e,!0)),t},a.prototype._toString=function(e,t,r){if(this._decoder||(this._decoder=new o(t),this._encoding=t),this._encoding!==t)throw Error("can't switch encodings");var n=this._decoder.write(e);return r&&(n+=this._decoder.end()),n},e.exports=a},46554:function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.BinaryWriter=t.BinaryReader=t.WireType=void 0;let i=r(41804),o=r(15344);!function(e){e[e.Varint=0]="Varint",e[e.Fixed64=1]="Fixed64",e[e.Bytes=2]="Bytes",e[e.Fixed32=5]="Fixed32"}(n||(t.WireType=n={}));class a{assertBounds(){if(this.pos>this.len)throw RangeError("premature EOF")}tag(){let e=this.uint32(),t=e>>>3,r=7&e;if(t<=0||r<0||r>5)throw Error("illegal tag: field no "+t+" wire type "+r);return[t,r,e]}skip(e){if("number"==typeof e){if(this.pos+e>this.len)throw p(this,e);this.pos+=e}else do if(this.pos>=this.len)throw p(this);while(128&this.buf[this.pos++]);return this}skipType(e){switch(e){case n.Varint:this.skip();break;case n.Fixed64:this.skip(8);break;case n.Bytes:this.skip(this.uint32());break;case 3:for(;4!=(e=7&this.uint32());)this.skipType(e);break;case n.Fixed32:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this}uint32(){return o.varint32read.bind(this)()}int32(){return 0|this.uint32()}sint32(){let e=this.uint32();return e%2==1?-((e+1)/2):e/2}fixed32(){let e=(0,o.readUInt32)(this.buf,this.pos);return this.pos+=4,e}sfixed32(){let e=(0,o.readInt32)(this.buf,this.pos);return this.pos+=4,e}int64(){let[e,t]=o.varint64read.bind(this)();return BigInt((0,o.int64ToString)(e,t))}uint64(){let[e,t]=o.varint64read.bind(this)();return BigInt((0,o.uInt64ToString)(e,t))}sint64(){let[e,t]=o.varint64read.bind(this)();return[e,t]=(0,o.zzDecode)(e,t),BigInt((0,o.int64ToString)(e,t))}fixed64(){let e=this.sfixed32(),t=this.sfixed32();return BigInt((0,o.uInt64ToString)(e,t))}sfixed64(){let e=this.sfixed32(),t=this.sfixed32();return BigInt((0,o.int64ToString)(e,t))}float(){throw Error("float not supported")}double(){throw Error("double not supported")}bool(){let[e,t]=o.varint64read.bind(this)();return 0!==e||0!==t}bytes(){let e=this.uint32(),t=this.pos;return this.pos+=e,this.assertBounds(),this.buf.subarray(t,t+e)}string(){let e=this.bytes();return(0,i.utf8Read)(e,0,e.length)}constructor(e){this.buf=new Uint8Array(e||0),this.pos=0,this.type=0,this.len=this.buf.length}}t.BinaryReader=a;class s{proceed(e,t){this.fn&&this.fn(this.val,e,t)}constructor(e,t,r){this.fn=e,this.len=t,this.val=r}}class l{constructor(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}}class u{static create(){return new u}static alloc(e){return"undefined"!=typeof Uint8Array?c(e=>new Uint8Array(e),Uint8Array.prototype.subarray)(e):Array(e)}_push(e,t,r){return this.tail=this.tail.next=new s(e,t,r),this.len+=t,this}finish(){let e=this.head.next,t=0,r=u.alloc(this.len);for(;e;)e.proceed(r,t),t+=e.len,e=e.next;return r}fork(){return this.states=new l(this),this.head=this.tail=new s(null,0,0),this.len=0,this}reset(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new s(null,0,0),this.len=0),this}ldelim(){let e=this.head,t=this.tail,r=this.len;return this.reset().uint32(r),r&&(this.tail.next=e.next,this.tail=t,this.len+=r),this}tag(e,t){return this.uint32((e<<3|t)>>>0)}uint32(e){return this.len+=(this.tail=this.tail.next=new s(o.writeVarint32,(e>>>=0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this}int32(e){return e<0?this._push(o.writeVarint64,10,(0,o.int64FromString)(e.toString())):this.uint32(e)}sint32(e){return this.uint32((e<<1^e>>31)>>>0)}int64(e){let{lo:t,hi:r}=(0,o.int64FromString)(e.toString());return this._push(o.writeVarint64,(0,o.int64Length)(t,r),{lo:t,hi:r})}sint64(e){let{lo:t,hi:r}=(0,o.int64FromString)(e.toString());return[t,r]=(0,o.zzEncode)(t,r),this._push(o.writeVarint64,(0,o.int64Length)(t,r),{lo:t,hi:r})}fixed64(e){let{lo:t,hi:r}=(0,o.int64FromString)(e.toString());return this._push(o.writeFixed32,4,t)._push(o.writeFixed32,4,r)}bool(e){return this._push(o.writeByte,1,e?1:0)}fixed32(e){return this._push(o.writeFixed32,4,e>>>0)}float(e){throw Error("float not supported"+e)}double(e){throw Error("double not supported"+e)}bytes(e){let t=e.length>>>0;return t?this.uint32(t)._push(d,t,e):this._push(o.writeByte,1,0)}string(e){let t=(0,i.utf8Length)(e);return t?this.uint32(t)._push(i.utf8Write,t,e):this._push(o.writeByte,1,0)}constructor(){this.len=0,this.uint64=u.prototype.int64,this.sfixed64=u.prototype.fixed64,this.sfixed32=u.prototype.fixed32,this.head=new s(null,0,0),this.tail=this.head,this.states=null}}function d(e,t,r){if("undefined"!=typeof Uint8Array)t.set(e,r);else for(let n=0;n>>1,o=null,a=n;return function(r){if(r<1||r>i)return e(r);a+r>n&&(o=e(n),a=0);let s=t.call(o,a,a+=r);return 7&a&&(a=(7|a)+1),s}}function p(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}t.BinaryWriter=u},54910:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Params=t.ModuleCredential=t.ModuleAccount=t.BaseAccount=t.protobufPackage=void 0;let n=r(11879),i=r(46554),o=r(99133);function a(){return{address:"",pubKey:void 0,accountNumber:BigInt(0),sequence:BigInt(0)}}function s(){return{baseAccount:void 0,name:"",permissions:[]}}function l(){return{moduleName:"",derivationKeys:[]}}function u(){return{maxMemoCharacters:BigInt(0),txSigLimit:BigInt(0),txSizeCostPerByte:BigInt(0),sigVerifyCostEd25519:BigInt(0),sigVerifyCostSecp256k1:BigInt(0)}}t.protobufPackage="cosmos.auth.v1beta1",t.BaseAccount={typeUrl:"/cosmos.auth.v1beta1.BaseAccount",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();return""!==e.address&&t.uint32(10).string(e.address),void 0!==e.pubKey&&n.Any.encode(e.pubKey,t.uint32(18).fork()).ldelim(),e.accountNumber!==BigInt(0)&&t.uint32(24).uint64(e.accountNumber),e.sequence!==BigInt(0)&&t.uint32(32).uint64(e.sequence),t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),o=void 0===t?r.len:r.pos+t,s=a();for(;r.pos>>3){case 1:s.address=r.string();break;case 2:s.pubKey=n.Any.decode(r,r.uint32());break;case 3:s.accountNumber=r.uint64();break;case 4:s.sequence=r.uint64();break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=a();return(0,o.isSet)(e.address)&&(t.address=String(e.address)),(0,o.isSet)(e.pubKey)&&(t.pubKey=n.Any.fromJSON(e.pubKey)),(0,o.isSet)(e.accountNumber)&&(t.accountNumber=BigInt(e.accountNumber.toString())),(0,o.isSet)(e.sequence)&&(t.sequence=BigInt(e.sequence.toString())),t},toJSON(e){let t={};return void 0!==e.address&&(t.address=e.address),void 0!==e.pubKey&&(t.pubKey=e.pubKey?n.Any.toJSON(e.pubKey):void 0),void 0!==e.accountNumber&&(t.accountNumber=(e.accountNumber||BigInt(0)).toString()),void 0!==e.sequence&&(t.sequence=(e.sequence||BigInt(0)).toString()),t},fromPartial(e){var t;let r=a();return r.address=null!==(t=e.address)&&void 0!==t?t:"",void 0!==e.pubKey&&null!==e.pubKey&&(r.pubKey=n.Any.fromPartial(e.pubKey)),void 0!==e.accountNumber&&null!==e.accountNumber&&(r.accountNumber=BigInt(e.accountNumber.toString())),void 0!==e.sequence&&null!==e.sequence&&(r.sequence=BigInt(e.sequence.toString())),r}},t.ModuleAccount={typeUrl:"/cosmos.auth.v1beta1.ModuleAccount",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();for(let n of(void 0!==e.baseAccount&&t.BaseAccount.encode(e.baseAccount,r.uint32(10).fork()).ldelim(),""!==e.name&&r.uint32(18).string(e.name),e.permissions))r.uint32(26).string(n);return r},decode(e,r){let n=e instanceof i.BinaryReader?e:new i.BinaryReader(e),o=void 0===r?n.len:n.pos+r,a=s();for(;n.pos>>3){case 1:a.baseAccount=t.BaseAccount.decode(n,n.uint32());break;case 2:a.name=n.string();break;case 3:a.permissions.push(n.string());break;default:n.skipType(7&e)}}return a},fromJSON(e){let r=s();return(0,o.isSet)(e.baseAccount)&&(r.baseAccount=t.BaseAccount.fromJSON(e.baseAccount)),(0,o.isSet)(e.name)&&(r.name=String(e.name)),Array.isArray(null==e?void 0:e.permissions)&&(r.permissions=e.permissions.map(e=>String(e))),r},toJSON(e){let r={};return void 0!==e.baseAccount&&(r.baseAccount=e.baseAccount?t.BaseAccount.toJSON(e.baseAccount):void 0),void 0!==e.name&&(r.name=e.name),e.permissions?r.permissions=e.permissions.map(e=>e):r.permissions=[],r},fromPartial(e){var r,n;let i=s();return void 0!==e.baseAccount&&null!==e.baseAccount&&(i.baseAccount=t.BaseAccount.fromPartial(e.baseAccount)),i.name=null!==(n=e.name)&&void 0!==n?n:"",i.permissions=(null===(r=e.permissions)||void 0===r?void 0:r.map(e=>e))||[],i}},t.ModuleCredential={typeUrl:"/cosmos.auth.v1beta1.ModuleCredential",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();for(let r of(""!==e.moduleName&&t.uint32(10).string(e.moduleName),e.derivationKeys))t.uint32(18).bytes(r);return t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=l();for(;r.pos>>3){case 1:o.moduleName=r.string();break;case 2:o.derivationKeys.push(r.bytes());break;default:r.skipType(7&e)}}return o},fromJSON(e){let t=l();return(0,o.isSet)(e.moduleName)&&(t.moduleName=String(e.moduleName)),Array.isArray(null==e?void 0:e.derivationKeys)&&(t.derivationKeys=e.derivationKeys.map(e=>(0,o.bytesFromBase64)(e))),t},toJSON(e){let t={};return void 0!==e.moduleName&&(t.moduleName=e.moduleName),e.derivationKeys?t.derivationKeys=e.derivationKeys.map(e=>(0,o.base64FromBytes)(void 0!==e?e:new Uint8Array)):t.derivationKeys=[],t},fromPartial(e){var t,r;let n=l();return n.moduleName=null!==(r=e.moduleName)&&void 0!==r?r:"",n.derivationKeys=(null===(t=e.derivationKeys)||void 0===t?void 0:t.map(e=>e))||[],n}},t.Params={typeUrl:"/cosmos.auth.v1beta1.Params",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();return e.maxMemoCharacters!==BigInt(0)&&t.uint32(8).uint64(e.maxMemoCharacters),e.txSigLimit!==BigInt(0)&&t.uint32(16).uint64(e.txSigLimit),e.txSizeCostPerByte!==BigInt(0)&&t.uint32(24).uint64(e.txSizeCostPerByte),e.sigVerifyCostEd25519!==BigInt(0)&&t.uint32(32).uint64(e.sigVerifyCostEd25519),e.sigVerifyCostSecp256k1!==BigInt(0)&&t.uint32(40).uint64(e.sigVerifyCostSecp256k1),t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=u();for(;r.pos>>3){case 1:o.maxMemoCharacters=r.uint64();break;case 2:o.txSigLimit=r.uint64();break;case 3:o.txSizeCostPerByte=r.uint64();break;case 4:o.sigVerifyCostEd25519=r.uint64();break;case 5:o.sigVerifyCostSecp256k1=r.uint64();break;default:r.skipType(7&e)}}return o},fromJSON(e){let t=u();return(0,o.isSet)(e.maxMemoCharacters)&&(t.maxMemoCharacters=BigInt(e.maxMemoCharacters.toString())),(0,o.isSet)(e.txSigLimit)&&(t.txSigLimit=BigInt(e.txSigLimit.toString())),(0,o.isSet)(e.txSizeCostPerByte)&&(t.txSizeCostPerByte=BigInt(e.txSizeCostPerByte.toString())),(0,o.isSet)(e.sigVerifyCostEd25519)&&(t.sigVerifyCostEd25519=BigInt(e.sigVerifyCostEd25519.toString())),(0,o.isSet)(e.sigVerifyCostSecp256k1)&&(t.sigVerifyCostSecp256k1=BigInt(e.sigVerifyCostSecp256k1.toString())),t},toJSON(e){let t={};return void 0!==e.maxMemoCharacters&&(t.maxMemoCharacters=(e.maxMemoCharacters||BigInt(0)).toString()),void 0!==e.txSigLimit&&(t.txSigLimit=(e.txSigLimit||BigInt(0)).toString()),void 0!==e.txSizeCostPerByte&&(t.txSizeCostPerByte=(e.txSizeCostPerByte||BigInt(0)).toString()),void 0!==e.sigVerifyCostEd25519&&(t.sigVerifyCostEd25519=(e.sigVerifyCostEd25519||BigInt(0)).toString()),void 0!==e.sigVerifyCostSecp256k1&&(t.sigVerifyCostSecp256k1=(e.sigVerifyCostSecp256k1||BigInt(0)).toString()),t},fromPartial(e){let t=u();return void 0!==e.maxMemoCharacters&&null!==e.maxMemoCharacters&&(t.maxMemoCharacters=BigInt(e.maxMemoCharacters.toString())),void 0!==e.txSigLimit&&null!==e.txSigLimit&&(t.txSigLimit=BigInt(e.txSigLimit.toString())),void 0!==e.txSizeCostPerByte&&null!==e.txSizeCostPerByte&&(t.txSizeCostPerByte=BigInt(e.txSizeCostPerByte.toString())),void 0!==e.sigVerifyCostEd25519&&null!==e.sigVerifyCostEd25519&&(t.sigVerifyCostEd25519=BigInt(e.sigVerifyCostEd25519.toString())),void 0!==e.sigVerifyCostSecp256k1&&null!==e.sigVerifyCostSecp256k1&&(t.sigVerifyCostSecp256k1=BigInt(e.sigVerifyCostSecp256k1.toString())),t}}},37547:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QueryClientImpl=t.QueryAccountInfoResponse=t.QueryAccountInfoRequest=t.QueryAccountAddressByIDResponse=t.QueryAccountAddressByIDRequest=t.AddressStringToBytesResponse=t.AddressStringToBytesRequest=t.AddressBytesToStringResponse=t.AddressBytesToStringRequest=t.Bech32PrefixResponse=t.Bech32PrefixRequest=t.QueryModuleAccountByNameResponse=t.QueryModuleAccountByNameRequest=t.QueryModuleAccountsResponse=t.QueryModuleAccountsRequest=t.QueryParamsResponse=t.QueryParamsRequest=t.QueryAccountResponse=t.QueryAccountRequest=t.QueryAccountsResponse=t.QueryAccountsRequest=t.protobufPackage=void 0;let n=r(86141),i=r(11879),o=r(54910),a=r(46554),s=r(99133);function l(){return{pagination:void 0}}function u(){return{accounts:[],pagination:void 0}}function d(){return{address:""}}function c(){return{account:void 0}}function p(){return{}}function f(){return{params:o.Params.fromPartial({})}}function h(){return{}}function g(){return{accounts:[]}}function m(){return{name:""}}function y(){return{account:void 0}}function v(){return{}}function b(){return{bech32Prefix:""}}function S(){return{addressBytes:new Uint8Array}}function w(){return{addressString:""}}function _(){return{addressString:""}}function k(){return{addressBytes:new Uint8Array}}function O(){return{id:BigInt(0),accountId:BigInt(0)}}function P(){return{accountAddress:""}}function A(){return{address:""}}function I(){return{info:void 0}}t.protobufPackage="cosmos.auth.v1beta1",t.QueryAccountsRequest={typeUrl:"/cosmos.auth.v1beta1.QueryAccountsRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return void 0!==e.pagination&&n.PageRequest.encode(e.pagination,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),i=void 0===t?r.len:r.pos+t,o=l();for(;r.pos>>3==1?o.pagination=n.PageRequest.decode(r,r.uint32()):r.skipType(7&e)}return o},fromJSON(e){let t=l();return(0,s.isSet)(e.pagination)&&(t.pagination=n.PageRequest.fromJSON(e.pagination)),t},toJSON(e){let t={};return void 0!==e.pagination&&(t.pagination=e.pagination?n.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){let t=l();return void 0!==e.pagination&&null!==e.pagination&&(t.pagination=n.PageRequest.fromPartial(e.pagination)),t}},t.QueryAccountsResponse={typeUrl:"/cosmos.auth.v1beta1.QueryAccountsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();for(let r of e.accounts)i.Any.encode(r,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&n.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),o=void 0===t?r.len:r.pos+t,s=u();for(;r.pos>>3){case 1:s.accounts.push(i.Any.decode(r,r.uint32()));break;case 2:s.pagination=n.PageResponse.decode(r,r.uint32());break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=u();return Array.isArray(null==e?void 0:e.accounts)&&(t.accounts=e.accounts.map(e=>i.Any.fromJSON(e))),(0,s.isSet)(e.pagination)&&(t.pagination=n.PageResponse.fromJSON(e.pagination)),t},toJSON(e){let t={};return e.accounts?t.accounts=e.accounts.map(e=>e?i.Any.toJSON(e):void 0):t.accounts=[],void 0!==e.pagination&&(t.pagination=e.pagination?n.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=u();return r.accounts=(null===(t=e.accounts)||void 0===t?void 0:t.map(e=>i.Any.fromPartial(e)))||[],void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageResponse.fromPartial(e.pagination)),r}},t.QueryAccountRequest={typeUrl:"/cosmos.auth.v1beta1.QueryAccountRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.address&&t.uint32(10).string(e.address),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=d();for(;r.pos>>3==1?i.address=r.string():r.skipType(7&e)}return i},fromJSON(e){let t=d();return(0,s.isSet)(e.address)&&(t.address=String(e.address)),t},toJSON(e){let t={};return void 0!==e.address&&(t.address=e.address),t},fromPartial(e){var t;let r=d();return r.address=null!==(t=e.address)&&void 0!==t?t:"",r}},t.QueryAccountResponse={typeUrl:"/cosmos.auth.v1beta1.QueryAccountResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return void 0!==e.account&&i.Any.encode(e.account,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=c();for(;r.pos>>3==1?o.account=i.Any.decode(r,r.uint32()):r.skipType(7&e)}return o},fromJSON(e){let t=c();return(0,s.isSet)(e.account)&&(t.account=i.Any.fromJSON(e.account)),t},toJSON(e){let t={};return void 0!==e.account&&(t.account=e.account?i.Any.toJSON(e.account):void 0),t},fromPartial(e){let t=c();return void 0!==e.account&&null!==e.account&&(t.account=i.Any.fromPartial(e.account)),t}},t.QueryParamsRequest={typeUrl:"/cosmos.auth.v1beta1.QueryParamsRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=p();for(;r.posp(),toJSON:e=>({}),fromPartial:e=>p()},t.QueryParamsResponse={typeUrl:"/cosmos.auth.v1beta1.QueryParamsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return void 0!==e.params&&o.Params.encode(e.params,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=f();for(;r.pos>>3==1?i.params=o.Params.decode(r,r.uint32()):r.skipType(7&e)}return i},fromJSON(e){let t=f();return(0,s.isSet)(e.params)&&(t.params=o.Params.fromJSON(e.params)),t},toJSON(e){let t={};return void 0!==e.params&&(t.params=e.params?o.Params.toJSON(e.params):void 0),t},fromPartial(e){let t=f();return void 0!==e.params&&null!==e.params&&(t.params=o.Params.fromPartial(e.params)),t}},t.QueryModuleAccountsRequest={typeUrl:"/cosmos.auth.v1beta1.QueryModuleAccountsRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=h();for(;r.posh(),toJSON:e=>({}),fromPartial:e=>h()},t.QueryModuleAccountsResponse={typeUrl:"/cosmos.auth.v1beta1.QueryModuleAccountsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();for(let r of e.accounts)i.Any.encode(r,t.uint32(10).fork()).ldelim();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=g();for(;r.pos>>3==1?o.accounts.push(i.Any.decode(r,r.uint32())):r.skipType(7&e)}return o},fromJSON(e){let t=g();return Array.isArray(null==e?void 0:e.accounts)&&(t.accounts=e.accounts.map(e=>i.Any.fromJSON(e))),t},toJSON(e){let t={};return e.accounts?t.accounts=e.accounts.map(e=>e?i.Any.toJSON(e):void 0):t.accounts=[],t},fromPartial(e){var t;let r=g();return r.accounts=(null===(t=e.accounts)||void 0===t?void 0:t.map(e=>i.Any.fromPartial(e)))||[],r}},t.QueryModuleAccountByNameRequest={typeUrl:"/cosmos.auth.v1beta1.QueryModuleAccountByNameRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.name&&t.uint32(10).string(e.name),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=m();for(;r.pos>>3==1?i.name=r.string():r.skipType(7&e)}return i},fromJSON(e){let t=m();return(0,s.isSet)(e.name)&&(t.name=String(e.name)),t},toJSON(e){let t={};return void 0!==e.name&&(t.name=e.name),t},fromPartial(e){var t;let r=m();return r.name=null!==(t=e.name)&&void 0!==t?t:"",r}},t.QueryModuleAccountByNameResponse={typeUrl:"/cosmos.auth.v1beta1.QueryModuleAccountByNameResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return void 0!==e.account&&i.Any.encode(e.account,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=y();for(;r.pos>>3==1?o.account=i.Any.decode(r,r.uint32()):r.skipType(7&e)}return o},fromJSON(e){let t=y();return(0,s.isSet)(e.account)&&(t.account=i.Any.fromJSON(e.account)),t},toJSON(e){let t={};return void 0!==e.account&&(t.account=e.account?i.Any.toJSON(e.account):void 0),t},fromPartial(e){let t=y();return void 0!==e.account&&null!==e.account&&(t.account=i.Any.fromPartial(e.account)),t}},t.Bech32PrefixRequest={typeUrl:"/cosmos.auth.v1beta1.Bech32PrefixRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=v();for(;r.posv(),toJSON:e=>({}),fromPartial:e=>v()},t.Bech32PrefixResponse={typeUrl:"/cosmos.auth.v1beta1.Bech32PrefixResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.bech32Prefix&&t.uint32(10).string(e.bech32Prefix),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=b();for(;r.pos>>3==1?i.bech32Prefix=r.string():r.skipType(7&e)}return i},fromJSON(e){let t=b();return(0,s.isSet)(e.bech32Prefix)&&(t.bech32Prefix=String(e.bech32Prefix)),t},toJSON(e){let t={};return void 0!==e.bech32Prefix&&(t.bech32Prefix=e.bech32Prefix),t},fromPartial(e){var t;let r=b();return r.bech32Prefix=null!==(t=e.bech32Prefix)&&void 0!==t?t:"",r}},t.AddressBytesToStringRequest={typeUrl:"/cosmos.auth.v1beta1.AddressBytesToStringRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return 0!==e.addressBytes.length&&t.uint32(10).bytes(e.addressBytes),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=S();for(;r.pos>>3==1?i.addressBytes=r.bytes():r.skipType(7&e)}return i},fromJSON(e){let t=S();return(0,s.isSet)(e.addressBytes)&&(t.addressBytes=(0,s.bytesFromBase64)(e.addressBytes)),t},toJSON(e){let t={};return void 0!==e.addressBytes&&(t.addressBytes=(0,s.base64FromBytes)(void 0!==e.addressBytes?e.addressBytes:new Uint8Array)),t},fromPartial(e){var t;let r=S();return r.addressBytes=null!==(t=e.addressBytes)&&void 0!==t?t:new Uint8Array,r}},t.AddressBytesToStringResponse={typeUrl:"/cosmos.auth.v1beta1.AddressBytesToStringResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.addressString&&t.uint32(10).string(e.addressString),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=w();for(;r.pos>>3==1?i.addressString=r.string():r.skipType(7&e)}return i},fromJSON(e){let t=w();return(0,s.isSet)(e.addressString)&&(t.addressString=String(e.addressString)),t},toJSON(e){let t={};return void 0!==e.addressString&&(t.addressString=e.addressString),t},fromPartial(e){var t;let r=w();return r.addressString=null!==(t=e.addressString)&&void 0!==t?t:"",r}},t.AddressStringToBytesRequest={typeUrl:"/cosmos.auth.v1beta1.AddressStringToBytesRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.addressString&&t.uint32(10).string(e.addressString),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=_();for(;r.pos>>3==1?i.addressString=r.string():r.skipType(7&e)}return i},fromJSON(e){let t=_();return(0,s.isSet)(e.addressString)&&(t.addressString=String(e.addressString)),t},toJSON(e){let t={};return void 0!==e.addressString&&(t.addressString=e.addressString),t},fromPartial(e){var t;let r=_();return r.addressString=null!==(t=e.addressString)&&void 0!==t?t:"",r}},t.AddressStringToBytesResponse={typeUrl:"/cosmos.auth.v1beta1.AddressStringToBytesResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return 0!==e.addressBytes.length&&t.uint32(10).bytes(e.addressBytes),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=k();for(;r.pos>>3==1?i.addressBytes=r.bytes():r.skipType(7&e)}return i},fromJSON(e){let t=k();return(0,s.isSet)(e.addressBytes)&&(t.addressBytes=(0,s.bytesFromBase64)(e.addressBytes)),t},toJSON(e){let t={};return void 0!==e.addressBytes&&(t.addressBytes=(0,s.base64FromBytes)(void 0!==e.addressBytes?e.addressBytes:new Uint8Array)),t},fromPartial(e){var t;let r=k();return r.addressBytes=null!==(t=e.addressBytes)&&void 0!==t?t:new Uint8Array,r}},t.QueryAccountAddressByIDRequest={typeUrl:"/cosmos.auth.v1beta1.QueryAccountAddressByIDRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return e.id!==BigInt(0)&&t.uint32(8).int64(e.id),e.accountId!==BigInt(0)&&t.uint32(16).uint64(e.accountId),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=O();for(;r.pos>>3){case 1:i.id=r.int64();break;case 2:i.accountId=r.uint64();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=O();return(0,s.isSet)(e.id)&&(t.id=BigInt(e.id.toString())),(0,s.isSet)(e.accountId)&&(t.accountId=BigInt(e.accountId.toString())),t},toJSON(e){let t={};return void 0!==e.id&&(t.id=(e.id||BigInt(0)).toString()),void 0!==e.accountId&&(t.accountId=(e.accountId||BigInt(0)).toString()),t},fromPartial(e){let t=O();return void 0!==e.id&&null!==e.id&&(t.id=BigInt(e.id.toString())),void 0!==e.accountId&&null!==e.accountId&&(t.accountId=BigInt(e.accountId.toString())),t}},t.QueryAccountAddressByIDResponse={typeUrl:"/cosmos.auth.v1beta1.QueryAccountAddressByIDResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.accountAddress&&t.uint32(10).string(e.accountAddress),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=P();for(;r.pos>>3==1?i.accountAddress=r.string():r.skipType(7&e)}return i},fromJSON(e){let t=P();return(0,s.isSet)(e.accountAddress)&&(t.accountAddress=String(e.accountAddress)),t},toJSON(e){let t={};return void 0!==e.accountAddress&&(t.accountAddress=e.accountAddress),t},fromPartial(e){var t;let r=P();return r.accountAddress=null!==(t=e.accountAddress)&&void 0!==t?t:"",r}},t.QueryAccountInfoRequest={typeUrl:"/cosmos.auth.v1beta1.QueryAccountInfoRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.address&&t.uint32(10).string(e.address),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=A();for(;r.pos>>3==1?i.address=r.string():r.skipType(7&e)}return i},fromJSON(e){let t=A();return(0,s.isSet)(e.address)&&(t.address=String(e.address)),t},toJSON(e){let t={};return void 0!==e.address&&(t.address=e.address),t},fromPartial(e){var t;let r=A();return r.address=null!==(t=e.address)&&void 0!==t?t:"",r}},t.QueryAccountInfoResponse={typeUrl:"/cosmos.auth.v1beta1.QueryAccountInfoResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return void 0!==e.info&&o.BaseAccount.encode(e.info,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=I();for(;r.pos>>3==1?i.info=o.BaseAccount.decode(r,r.uint32()):r.skipType(7&e)}return i},fromJSON(e){let t=I();return(0,s.isSet)(e.info)&&(t.info=o.BaseAccount.fromJSON(e.info)),t},toJSON(e){let t={};return void 0!==e.info&&(t.info=e.info?o.BaseAccount.toJSON(e.info):void 0),t},fromPartial(e){let t=I();return void 0!==e.info&&null!==e.info&&(t.info=o.BaseAccount.fromPartial(e.info)),t}};class R{Accounts(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{pagination:n.PageRequest.fromPartial({})},r=t.QueryAccountsRequest.encode(e).finish();return this.rpc.request("cosmos.auth.v1beta1.Query","Accounts",r).then(e=>t.QueryAccountsResponse.decode(new a.BinaryReader(e)))}Account(e){let r=t.QueryAccountRequest.encode(e).finish();return this.rpc.request("cosmos.auth.v1beta1.Query","Account",r).then(e=>t.QueryAccountResponse.decode(new a.BinaryReader(e)))}AccountAddressByID(e){let r=t.QueryAccountAddressByIDRequest.encode(e).finish();return this.rpc.request("cosmos.auth.v1beta1.Query","AccountAddressByID",r).then(e=>t.QueryAccountAddressByIDResponse.decode(new a.BinaryReader(e)))}Params(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.QueryParamsRequest.encode(e).finish();return this.rpc.request("cosmos.auth.v1beta1.Query","Params",r).then(e=>t.QueryParamsResponse.decode(new a.BinaryReader(e)))}ModuleAccounts(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.QueryModuleAccountsRequest.encode(e).finish();return this.rpc.request("cosmos.auth.v1beta1.Query","ModuleAccounts",r).then(e=>t.QueryModuleAccountsResponse.decode(new a.BinaryReader(e)))}ModuleAccountByName(e){let r=t.QueryModuleAccountByNameRequest.encode(e).finish();return this.rpc.request("cosmos.auth.v1beta1.Query","ModuleAccountByName",r).then(e=>t.QueryModuleAccountByNameResponse.decode(new a.BinaryReader(e)))}Bech32Prefix(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.Bech32PrefixRequest.encode(e).finish();return this.rpc.request("cosmos.auth.v1beta1.Query","Bech32Prefix",r).then(e=>t.Bech32PrefixResponse.decode(new a.BinaryReader(e)))}AddressBytesToString(e){let r=t.AddressBytesToStringRequest.encode(e).finish();return this.rpc.request("cosmos.auth.v1beta1.Query","AddressBytesToString",r).then(e=>t.AddressBytesToStringResponse.decode(new a.BinaryReader(e)))}AddressStringToBytes(e){let r=t.AddressStringToBytesRequest.encode(e).finish();return this.rpc.request("cosmos.auth.v1beta1.Query","AddressStringToBytes",r).then(e=>t.AddressStringToBytesResponse.decode(new a.BinaryReader(e)))}AccountInfo(e){let r=t.QueryAccountInfoRequest.encode(e).finish();return this.rpc.request("cosmos.auth.v1beta1.Query","AccountInfo",r).then(e=>t.QueryAccountInfoResponse.decode(new a.BinaryReader(e)))}constructor(e){this.rpc=e,this.Accounts=this.Accounts.bind(this),this.Account=this.Account.bind(this),this.AccountAddressByID=this.AccountAddressByID.bind(this),this.Params=this.Params.bind(this),this.ModuleAccounts=this.ModuleAccounts.bind(this),this.ModuleAccountByName=this.ModuleAccountByName.bind(this),this.Bech32Prefix=this.Bech32Prefix.bind(this),this.AddressBytesToString=this.AddressBytesToString.bind(this),this.AddressStringToBytes=this.AddressStringToBytes.bind(this),this.AccountInfo=this.AccountInfo.bind(this)}}t.QueryClientImpl=R},51564:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GrantQueueItem=t.GrantAuthorization=t.Grant=t.GenericAuthorization=t.protobufPackage=void 0;let n=r(11879),i=r(9990),o=r(46554),a=r(99133);function s(){return{msg:""}}function l(){return{authorization:void 0,expiration:void 0}}function u(){return{granter:"",grantee:"",authorization:void 0,expiration:void 0}}function d(){return{msgTypeUrls:[]}}t.protobufPackage="cosmos.authz.v1beta1",t.GenericAuthorization={typeUrl:"/cosmos.authz.v1beta1.GenericAuthorization",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.msg&&t.uint32(10).string(e.msg),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=s();for(;r.pos>>3==1?i.msg=r.string():r.skipType(7&e)}return i},fromJSON(e){let t=s();return(0,a.isSet)(e.msg)&&(t.msg=String(e.msg)),t},toJSON(e){let t={};return void 0!==e.msg&&(t.msg=e.msg),t},fromPartial(e){var t;let r=s();return r.msg=null!==(t=e.msg)&&void 0!==t?t:"",r}},t.Grant={typeUrl:"/cosmos.authz.v1beta1.Grant",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return void 0!==e.authorization&&n.Any.encode(e.authorization,t.uint32(10).fork()).ldelim(),void 0!==e.expiration&&i.Timestamp.encode(e.expiration,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),a=void 0===t?r.len:r.pos+t,s=l();for(;r.pos>>3){case 1:s.authorization=n.Any.decode(r,r.uint32());break;case 2:s.expiration=i.Timestamp.decode(r,r.uint32());break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=l();return(0,a.isSet)(e.authorization)&&(t.authorization=n.Any.fromJSON(e.authorization)),(0,a.isSet)(e.expiration)&&(t.expiration=(0,a.fromJsonTimestamp)(e.expiration)),t},toJSON(e){let t={};return void 0!==e.authorization&&(t.authorization=e.authorization?n.Any.toJSON(e.authorization):void 0),void 0!==e.expiration&&(t.expiration=(0,a.fromTimestamp)(e.expiration).toISOString()),t},fromPartial(e){let t=l();return void 0!==e.authorization&&null!==e.authorization&&(t.authorization=n.Any.fromPartial(e.authorization)),void 0!==e.expiration&&null!==e.expiration&&(t.expiration=i.Timestamp.fromPartial(e.expiration)),t}},t.GrantAuthorization={typeUrl:"/cosmos.authz.v1beta1.GrantAuthorization",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.granter&&t.uint32(10).string(e.granter),""!==e.grantee&&t.uint32(18).string(e.grantee),void 0!==e.authorization&&n.Any.encode(e.authorization,t.uint32(26).fork()).ldelim(),void 0!==e.expiration&&i.Timestamp.encode(e.expiration,t.uint32(34).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),a=void 0===t?r.len:r.pos+t,s=u();for(;r.pos>>3){case 1:s.granter=r.string();break;case 2:s.grantee=r.string();break;case 3:s.authorization=n.Any.decode(r,r.uint32());break;case 4:s.expiration=i.Timestamp.decode(r,r.uint32());break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=u();return(0,a.isSet)(e.granter)&&(t.granter=String(e.granter)),(0,a.isSet)(e.grantee)&&(t.grantee=String(e.grantee)),(0,a.isSet)(e.authorization)&&(t.authorization=n.Any.fromJSON(e.authorization)),(0,a.isSet)(e.expiration)&&(t.expiration=(0,a.fromJsonTimestamp)(e.expiration)),t},toJSON(e){let t={};return void 0!==e.granter&&(t.granter=e.granter),void 0!==e.grantee&&(t.grantee=e.grantee),void 0!==e.authorization&&(t.authorization=e.authorization?n.Any.toJSON(e.authorization):void 0),void 0!==e.expiration&&(t.expiration=(0,a.fromTimestamp)(e.expiration).toISOString()),t},fromPartial(e){var t,r;let o=u();return o.granter=null!==(t=e.granter)&&void 0!==t?t:"",o.grantee=null!==(r=e.grantee)&&void 0!==r?r:"",void 0!==e.authorization&&null!==e.authorization&&(o.authorization=n.Any.fromPartial(e.authorization)),void 0!==e.expiration&&null!==e.expiration&&(o.expiration=i.Timestamp.fromPartial(e.expiration)),o}},t.GrantQueueItem={typeUrl:"/cosmos.authz.v1beta1.GrantQueueItem",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of e.msgTypeUrls)t.uint32(10).string(r);return t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=d();for(;r.pos>>3==1?i.msgTypeUrls.push(r.string()):r.skipType(7&e)}return i},fromJSON(e){let t=d();return Array.isArray(null==e?void 0:e.msgTypeUrls)&&(t.msgTypeUrls=e.msgTypeUrls.map(e=>String(e))),t},toJSON(e){let t={};return e.msgTypeUrls?t.msgTypeUrls=e.msgTypeUrls.map(e=>e):t.msgTypeUrls=[],t},fromPartial(e){var t;let r=d();return r.msgTypeUrls=(null===(t=e.msgTypeUrls)||void 0===t?void 0:t.map(e=>e))||[],r}}},629:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QueryClientImpl=t.QueryGranteeGrantsResponse=t.QueryGranteeGrantsRequest=t.QueryGranterGrantsResponse=t.QueryGranterGrantsRequest=t.QueryGrantsResponse=t.QueryGrantsRequest=t.protobufPackage=void 0;let n=r(86141),i=r(51564),o=r(46554),a=r(99133);function s(){return{granter:"",grantee:"",msgTypeUrl:"",pagination:void 0}}function l(){return{grants:[],pagination:void 0}}function u(){return{granter:"",pagination:void 0}}function d(){return{grants:[],pagination:void 0}}function c(){return{grantee:"",pagination:void 0}}function p(){return{grants:[],pagination:void 0}}t.protobufPackage="cosmos.authz.v1beta1",t.QueryGrantsRequest={typeUrl:"/cosmos.authz.v1beta1.QueryGrantsRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.granter&&t.uint32(10).string(e.granter),""!==e.grantee&&t.uint32(18).string(e.grantee),""!==e.msgTypeUrl&&t.uint32(26).string(e.msgTypeUrl),void 0!==e.pagination&&n.PageRequest.encode(e.pagination,t.uint32(34).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=s();for(;r.pos>>3){case 1:a.granter=r.string();break;case 2:a.grantee=r.string();break;case 3:a.msgTypeUrl=r.string();break;case 4:a.pagination=n.PageRequest.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=s();return(0,a.isSet)(e.granter)&&(t.granter=String(e.granter)),(0,a.isSet)(e.grantee)&&(t.grantee=String(e.grantee)),(0,a.isSet)(e.msgTypeUrl)&&(t.msgTypeUrl=String(e.msgTypeUrl)),(0,a.isSet)(e.pagination)&&(t.pagination=n.PageRequest.fromJSON(e.pagination)),t},toJSON(e){let t={};return void 0!==e.granter&&(t.granter=e.granter),void 0!==e.grantee&&(t.grantee=e.grantee),void 0!==e.msgTypeUrl&&(t.msgTypeUrl=e.msgTypeUrl),void 0!==e.pagination&&(t.pagination=e.pagination?n.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){var t,r,i;let o=s();return o.granter=null!==(t=e.granter)&&void 0!==t?t:"",o.grantee=null!==(r=e.grantee)&&void 0!==r?r:"",o.msgTypeUrl=null!==(i=e.msgTypeUrl)&&void 0!==i?i:"",void 0!==e.pagination&&null!==e.pagination&&(o.pagination=n.PageRequest.fromPartial(e.pagination)),o}},t.QueryGrantsResponse={typeUrl:"/cosmos.authz.v1beta1.QueryGrantsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of e.grants)i.Grant.encode(r,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&n.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),a=void 0===t?r.len:r.pos+t,s=l();for(;r.pos>>3){case 1:s.grants.push(i.Grant.decode(r,r.uint32()));break;case 2:s.pagination=n.PageResponse.decode(r,r.uint32());break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=l();return Array.isArray(null==e?void 0:e.grants)&&(t.grants=e.grants.map(e=>i.Grant.fromJSON(e))),(0,a.isSet)(e.pagination)&&(t.pagination=n.PageResponse.fromJSON(e.pagination)),t},toJSON(e){let t={};return e.grants?t.grants=e.grants.map(e=>e?i.Grant.toJSON(e):void 0):t.grants=[],void 0!==e.pagination&&(t.pagination=e.pagination?n.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=l();return r.grants=(null===(t=e.grants)||void 0===t?void 0:t.map(e=>i.Grant.fromPartial(e)))||[],void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageResponse.fromPartial(e.pagination)),r}},t.QueryGranterGrantsRequest={typeUrl:"/cosmos.authz.v1beta1.QueryGranterGrantsRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.granter&&t.uint32(10).string(e.granter),void 0!==e.pagination&&n.PageRequest.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=u();for(;r.pos>>3){case 1:a.granter=r.string();break;case 2:a.pagination=n.PageRequest.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=u();return(0,a.isSet)(e.granter)&&(t.granter=String(e.granter)),(0,a.isSet)(e.pagination)&&(t.pagination=n.PageRequest.fromJSON(e.pagination)),t},toJSON(e){let t={};return void 0!==e.granter&&(t.granter=e.granter),void 0!==e.pagination&&(t.pagination=e.pagination?n.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=u();return r.granter=null!==(t=e.granter)&&void 0!==t?t:"",void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageRequest.fromPartial(e.pagination)),r}},t.QueryGranterGrantsResponse={typeUrl:"/cosmos.authz.v1beta1.QueryGranterGrantsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of e.grants)i.GrantAuthorization.encode(r,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&n.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),a=void 0===t?r.len:r.pos+t,s=d();for(;r.pos>>3){case 1:s.grants.push(i.GrantAuthorization.decode(r,r.uint32()));break;case 2:s.pagination=n.PageResponse.decode(r,r.uint32());break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=d();return Array.isArray(null==e?void 0:e.grants)&&(t.grants=e.grants.map(e=>i.GrantAuthorization.fromJSON(e))),(0,a.isSet)(e.pagination)&&(t.pagination=n.PageResponse.fromJSON(e.pagination)),t},toJSON(e){let t={};return e.grants?t.grants=e.grants.map(e=>e?i.GrantAuthorization.toJSON(e):void 0):t.grants=[],void 0!==e.pagination&&(t.pagination=e.pagination?n.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=d();return r.grants=(null===(t=e.grants)||void 0===t?void 0:t.map(e=>i.GrantAuthorization.fromPartial(e)))||[],void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageResponse.fromPartial(e.pagination)),r}},t.QueryGranteeGrantsRequest={typeUrl:"/cosmos.authz.v1beta1.QueryGranteeGrantsRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.grantee&&t.uint32(10).string(e.grantee),void 0!==e.pagination&&n.PageRequest.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=c();for(;r.pos>>3){case 1:a.grantee=r.string();break;case 2:a.pagination=n.PageRequest.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=c();return(0,a.isSet)(e.grantee)&&(t.grantee=String(e.grantee)),(0,a.isSet)(e.pagination)&&(t.pagination=n.PageRequest.fromJSON(e.pagination)),t},toJSON(e){let t={};return void 0!==e.grantee&&(t.grantee=e.grantee),void 0!==e.pagination&&(t.pagination=e.pagination?n.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=c();return r.grantee=null!==(t=e.grantee)&&void 0!==t?t:"",void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageRequest.fromPartial(e.pagination)),r}},t.QueryGranteeGrantsResponse={typeUrl:"/cosmos.authz.v1beta1.QueryGranteeGrantsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of e.grants)i.GrantAuthorization.encode(r,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&n.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),a=void 0===t?r.len:r.pos+t,s=p();for(;r.pos>>3){case 1:s.grants.push(i.GrantAuthorization.decode(r,r.uint32()));break;case 2:s.pagination=n.PageResponse.decode(r,r.uint32());break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=p();return Array.isArray(null==e?void 0:e.grants)&&(t.grants=e.grants.map(e=>i.GrantAuthorization.fromJSON(e))),(0,a.isSet)(e.pagination)&&(t.pagination=n.PageResponse.fromJSON(e.pagination)),t},toJSON(e){let t={};return e.grants?t.grants=e.grants.map(e=>e?i.GrantAuthorization.toJSON(e):void 0):t.grants=[],void 0!==e.pagination&&(t.pagination=e.pagination?n.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=p();return r.grants=(null===(t=e.grants)||void 0===t?void 0:t.map(e=>i.GrantAuthorization.fromPartial(e)))||[],void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageResponse.fromPartial(e.pagination)),r}};class f{Grants(e){let r=t.QueryGrantsRequest.encode(e).finish();return this.rpc.request("cosmos.authz.v1beta1.Query","Grants",r).then(e=>t.QueryGrantsResponse.decode(new o.BinaryReader(e)))}GranterGrants(e){let r=t.QueryGranterGrantsRequest.encode(e).finish();return this.rpc.request("cosmos.authz.v1beta1.Query","GranterGrants",r).then(e=>t.QueryGranterGrantsResponse.decode(new o.BinaryReader(e)))}GranteeGrants(e){let r=t.QueryGranteeGrantsRequest.encode(e).finish();return this.rpc.request("cosmos.authz.v1beta1.Query","GranteeGrants",r).then(e=>t.QueryGranteeGrantsResponse.decode(new o.BinaryReader(e)))}constructor(e){this.rpc=e,this.Grants=this.Grants.bind(this),this.GranterGrants=this.GranterGrants.bind(this),this.GranteeGrants=this.GranteeGrants.bind(this)}}t.QueryClientImpl=f},97481:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MsgClientImpl=t.MsgRevokeResponse=t.MsgRevoke=t.MsgGrantResponse=t.MsgExec=t.MsgExecResponse=t.MsgGrant=t.protobufPackage=void 0;let n=r(51564),i=r(11879),o=r(46554),a=r(99133);function s(){return{granter:"",grantee:"",grant:n.Grant.fromPartial({})}}function l(){return{results:[]}}function u(){return{grantee:"",msgs:[]}}function d(){return{}}function c(){return{granter:"",grantee:"",msgTypeUrl:""}}function p(){return{}}t.protobufPackage="cosmos.authz.v1beta1",t.MsgGrant={typeUrl:"/cosmos.authz.v1beta1.MsgGrant",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.granter&&t.uint32(10).string(e.granter),""!==e.grantee&&t.uint32(18).string(e.grantee),void 0!==e.grant&&n.Grant.encode(e.grant,t.uint32(26).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=s();for(;r.pos>>3){case 1:a.granter=r.string();break;case 2:a.grantee=r.string();break;case 3:a.grant=n.Grant.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=s();return(0,a.isSet)(e.granter)&&(t.granter=String(e.granter)),(0,a.isSet)(e.grantee)&&(t.grantee=String(e.grantee)),(0,a.isSet)(e.grant)&&(t.grant=n.Grant.fromJSON(e.grant)),t},toJSON(e){let t={};return void 0!==e.granter&&(t.granter=e.granter),void 0!==e.grantee&&(t.grantee=e.grantee),void 0!==e.grant&&(t.grant=e.grant?n.Grant.toJSON(e.grant):void 0),t},fromPartial(e){var t,r;let i=s();return i.granter=null!==(t=e.granter)&&void 0!==t?t:"",i.grantee=null!==(r=e.grantee)&&void 0!==r?r:"",void 0!==e.grant&&null!==e.grant&&(i.grant=n.Grant.fromPartial(e.grant)),i}},t.MsgExecResponse={typeUrl:"/cosmos.authz.v1beta1.MsgExecResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of e.results)t.uint32(10).bytes(r);return t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=l();for(;r.pos>>3==1?i.results.push(r.bytes()):r.skipType(7&e)}return i},fromJSON(e){let t=l();return Array.isArray(null==e?void 0:e.results)&&(t.results=e.results.map(e=>(0,a.bytesFromBase64)(e))),t},toJSON(e){let t={};return e.results?t.results=e.results.map(e=>(0,a.base64FromBytes)(void 0!==e?e:new Uint8Array)):t.results=[],t},fromPartial(e){var t;let r=l();return r.results=(null===(t=e.results)||void 0===t?void 0:t.map(e=>e))||[],r}},t.MsgExec={typeUrl:"/cosmos.authz.v1beta1.MsgExec",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of(""!==e.grantee&&t.uint32(10).string(e.grantee),e.msgs))i.Any.encode(r,t.uint32(18).fork()).ldelim();return t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,a=u();for(;r.pos>>3){case 1:a.grantee=r.string();break;case 2:a.msgs.push(i.Any.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=u();return(0,a.isSet)(e.grantee)&&(t.grantee=String(e.grantee)),Array.isArray(null==e?void 0:e.msgs)&&(t.msgs=e.msgs.map(e=>i.Any.fromJSON(e))),t},toJSON(e){let t={};return void 0!==e.grantee&&(t.grantee=e.grantee),e.msgs?t.msgs=e.msgs.map(e=>e?i.Any.toJSON(e):void 0):t.msgs=[],t},fromPartial(e){var t,r;let n=u();return n.grantee=null!==(r=e.grantee)&&void 0!==r?r:"",n.msgs=(null===(t=e.msgs)||void 0===t?void 0:t.map(e=>i.Any.fromPartial(e)))||[],n}},t.MsgGrantResponse={typeUrl:"/cosmos.authz.v1beta1.MsgGrantResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=d();for(;r.posd(),toJSON:e=>({}),fromPartial:e=>d()},t.MsgRevoke={typeUrl:"/cosmos.authz.v1beta1.MsgRevoke",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.granter&&t.uint32(10).string(e.granter),""!==e.grantee&&t.uint32(18).string(e.grantee),""!==e.msgTypeUrl&&t.uint32(26).string(e.msgTypeUrl),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=c();for(;r.pos>>3){case 1:i.granter=r.string();break;case 2:i.grantee=r.string();break;case 3:i.msgTypeUrl=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=c();return(0,a.isSet)(e.granter)&&(t.granter=String(e.granter)),(0,a.isSet)(e.grantee)&&(t.grantee=String(e.grantee)),(0,a.isSet)(e.msgTypeUrl)&&(t.msgTypeUrl=String(e.msgTypeUrl)),t},toJSON(e){let t={};return void 0!==e.granter&&(t.granter=e.granter),void 0!==e.grantee&&(t.grantee=e.grantee),void 0!==e.msgTypeUrl&&(t.msgTypeUrl=e.msgTypeUrl),t},fromPartial(e){var t,r,n;let i=c();return i.granter=null!==(t=e.granter)&&void 0!==t?t:"",i.grantee=null!==(r=e.grantee)&&void 0!==r?r:"",i.msgTypeUrl=null!==(n=e.msgTypeUrl)&&void 0!==n?n:"",i}},t.MsgRevokeResponse={typeUrl:"/cosmos.authz.v1beta1.MsgRevokeResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=p();for(;r.posp(),toJSON:e=>({}),fromPartial:e=>p()};class f{Grant(e){let r=t.MsgGrant.encode(e).finish();return this.rpc.request("cosmos.authz.v1beta1.Msg","Grant",r).then(e=>t.MsgGrantResponse.decode(new o.BinaryReader(e)))}Exec(e){let r=t.MsgExec.encode(e).finish();return this.rpc.request("cosmos.authz.v1beta1.Msg","Exec",r).then(e=>t.MsgExecResponse.decode(new o.BinaryReader(e)))}Revoke(e){let r=t.MsgRevoke.encode(e).finish();return this.rpc.request("cosmos.authz.v1beta1.Msg","Revoke",r).then(e=>t.MsgRevokeResponse.decode(new o.BinaryReader(e)))}constructor(e){this.rpc=e,this.Grant=this.Grant.bind(this),this.Exec=this.Exec.bind(this),this.Revoke=this.Revoke.bind(this)}}t.MsgClientImpl=f},42951:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Metadata=t.DenomUnit=t.Supply=t.Output=t.Input=t.SendEnabled=t.Params=t.protobufPackage=void 0;let n=r(14841),i=r(46554),o=r(99133);function a(){return{sendEnabled:[],defaultSendEnabled:!1}}function s(){return{denom:"",enabled:!1}}function l(){return{address:"",coins:[]}}function u(){return{address:"",coins:[]}}function d(){return{total:[]}}function c(){return{denom:"",exponent:0,aliases:[]}}function p(){return{description:"",denomUnits:[],base:"",display:"",name:"",symbol:"",uri:"",uriHash:""}}t.protobufPackage="cosmos.bank.v1beta1",t.Params={typeUrl:"/cosmos.bank.v1beta1.Params",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();for(let n of e.sendEnabled)t.SendEnabled.encode(n,r.uint32(10).fork()).ldelim();return!0===e.defaultSendEnabled&&r.uint32(16).bool(e.defaultSendEnabled),r},decode(e,r){let n=e instanceof i.BinaryReader?e:new i.BinaryReader(e),o=void 0===r?n.len:n.pos+r,s=a();for(;n.pos>>3){case 1:s.sendEnabled.push(t.SendEnabled.decode(n,n.uint32()));break;case 2:s.defaultSendEnabled=n.bool();break;default:n.skipType(7&e)}}return s},fromJSON(e){let r=a();return Array.isArray(null==e?void 0:e.sendEnabled)&&(r.sendEnabled=e.sendEnabled.map(e=>t.SendEnabled.fromJSON(e))),(0,o.isSet)(e.defaultSendEnabled)&&(r.defaultSendEnabled=!!e.defaultSendEnabled),r},toJSON(e){let r={};return e.sendEnabled?r.sendEnabled=e.sendEnabled.map(e=>e?t.SendEnabled.toJSON(e):void 0):r.sendEnabled=[],void 0!==e.defaultSendEnabled&&(r.defaultSendEnabled=e.defaultSendEnabled),r},fromPartial(e){var r,n;let i=a();return i.sendEnabled=(null===(r=e.sendEnabled)||void 0===r?void 0:r.map(e=>t.SendEnabled.fromPartial(e)))||[],i.defaultSendEnabled=null!==(n=e.defaultSendEnabled)&&void 0!==n&&n,i}},t.SendEnabled={typeUrl:"/cosmos.bank.v1beta1.SendEnabled",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();return""!==e.denom&&t.uint32(10).string(e.denom),!0===e.enabled&&t.uint32(16).bool(e.enabled),t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=s();for(;r.pos>>3){case 1:o.denom=r.string();break;case 2:o.enabled=r.bool();break;default:r.skipType(7&e)}}return o},fromJSON(e){let t=s();return(0,o.isSet)(e.denom)&&(t.denom=String(e.denom)),(0,o.isSet)(e.enabled)&&(t.enabled=!!e.enabled),t},toJSON(e){let t={};return void 0!==e.denom&&(t.denom=e.denom),void 0!==e.enabled&&(t.enabled=e.enabled),t},fromPartial(e){var t,r;let n=s();return n.denom=null!==(t=e.denom)&&void 0!==t?t:"",n.enabled=null!==(r=e.enabled)&&void 0!==r&&r,n}},t.Input={typeUrl:"/cosmos.bank.v1beta1.Input",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();for(let r of(""!==e.address&&t.uint32(10).string(e.address),e.coins))n.Coin.encode(r,t.uint32(18).fork()).ldelim();return t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),o=void 0===t?r.len:r.pos+t,a=l();for(;r.pos>>3){case 1:a.address=r.string();break;case 2:a.coins.push(n.Coin.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=l();return(0,o.isSet)(e.address)&&(t.address=String(e.address)),Array.isArray(null==e?void 0:e.coins)&&(t.coins=e.coins.map(e=>n.Coin.fromJSON(e))),t},toJSON(e){let t={};return void 0!==e.address&&(t.address=e.address),e.coins?t.coins=e.coins.map(e=>e?n.Coin.toJSON(e):void 0):t.coins=[],t},fromPartial(e){var t,r;let i=l();return i.address=null!==(r=e.address)&&void 0!==r?r:"",i.coins=(null===(t=e.coins)||void 0===t?void 0:t.map(e=>n.Coin.fromPartial(e)))||[],i}},t.Output={typeUrl:"/cosmos.bank.v1beta1.Output",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();for(let r of(""!==e.address&&t.uint32(10).string(e.address),e.coins))n.Coin.encode(r,t.uint32(18).fork()).ldelim();return t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),o=void 0===t?r.len:r.pos+t,a=u();for(;r.pos>>3){case 1:a.address=r.string();break;case 2:a.coins.push(n.Coin.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=u();return(0,o.isSet)(e.address)&&(t.address=String(e.address)),Array.isArray(null==e?void 0:e.coins)&&(t.coins=e.coins.map(e=>n.Coin.fromJSON(e))),t},toJSON(e){let t={};return void 0!==e.address&&(t.address=e.address),e.coins?t.coins=e.coins.map(e=>e?n.Coin.toJSON(e):void 0):t.coins=[],t},fromPartial(e){var t,r;let i=u();return i.address=null!==(r=e.address)&&void 0!==r?r:"",i.coins=(null===(t=e.coins)||void 0===t?void 0:t.map(e=>n.Coin.fromPartial(e)))||[],i}},t.Supply={typeUrl:"/cosmos.bank.v1beta1.Supply",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();for(let r of e.total)n.Coin.encode(r,t.uint32(10).fork()).ldelim();return t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),o=void 0===t?r.len:r.pos+t,a=d();for(;r.pos>>3==1?a.total.push(n.Coin.decode(r,r.uint32())):r.skipType(7&e)}return a},fromJSON(e){let t=d();return Array.isArray(null==e?void 0:e.total)&&(t.total=e.total.map(e=>n.Coin.fromJSON(e))),t},toJSON(e){let t={};return e.total?t.total=e.total.map(e=>e?n.Coin.toJSON(e):void 0):t.total=[],t},fromPartial(e){var t;let r=d();return r.total=(null===(t=e.total)||void 0===t?void 0:t.map(e=>n.Coin.fromPartial(e)))||[],r}},t.DenomUnit={typeUrl:"/cosmos.bank.v1beta1.DenomUnit",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();for(let r of(""!==e.denom&&t.uint32(10).string(e.denom),0!==e.exponent&&t.uint32(16).uint32(e.exponent),e.aliases))t.uint32(26).string(r);return t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=c();for(;r.pos>>3){case 1:o.denom=r.string();break;case 2:o.exponent=r.uint32();break;case 3:o.aliases.push(r.string());break;default:r.skipType(7&e)}}return o},fromJSON(e){let t=c();return(0,o.isSet)(e.denom)&&(t.denom=String(e.denom)),(0,o.isSet)(e.exponent)&&(t.exponent=Number(e.exponent)),Array.isArray(null==e?void 0:e.aliases)&&(t.aliases=e.aliases.map(e=>String(e))),t},toJSON(e){let t={};return void 0!==e.denom&&(t.denom=e.denom),void 0!==e.exponent&&(t.exponent=Math.round(e.exponent)),e.aliases?t.aliases=e.aliases.map(e=>e):t.aliases=[],t},fromPartial(e){var t,r,n;let i=c();return i.denom=null!==(r=e.denom)&&void 0!==r?r:"",i.exponent=null!==(n=e.exponent)&&void 0!==n?n:0,i.aliases=(null===(t=e.aliases)||void 0===t?void 0:t.map(e=>e))||[],i}},t.Metadata={typeUrl:"/cosmos.bank.v1beta1.Metadata",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();for(let n of(""!==e.description&&r.uint32(10).string(e.description),e.denomUnits))t.DenomUnit.encode(n,r.uint32(18).fork()).ldelim();return""!==e.base&&r.uint32(26).string(e.base),""!==e.display&&r.uint32(34).string(e.display),""!==e.name&&r.uint32(42).string(e.name),""!==e.symbol&&r.uint32(50).string(e.symbol),""!==e.uri&&r.uint32(58).string(e.uri),""!==e.uriHash&&r.uint32(66).string(e.uriHash),r},decode(e,r){let n=e instanceof i.BinaryReader?e:new i.BinaryReader(e),o=void 0===r?n.len:n.pos+r,a=p();for(;n.pos>>3){case 1:a.description=n.string();break;case 2:a.denomUnits.push(t.DenomUnit.decode(n,n.uint32()));break;case 3:a.base=n.string();break;case 4:a.display=n.string();break;case 5:a.name=n.string();break;case 6:a.symbol=n.string();break;case 7:a.uri=n.string();break;case 8:a.uriHash=n.string();break;default:n.skipType(7&e)}}return a},fromJSON(e){let r=p();return(0,o.isSet)(e.description)&&(r.description=String(e.description)),Array.isArray(null==e?void 0:e.denomUnits)&&(r.denomUnits=e.denomUnits.map(e=>t.DenomUnit.fromJSON(e))),(0,o.isSet)(e.base)&&(r.base=String(e.base)),(0,o.isSet)(e.display)&&(r.display=String(e.display)),(0,o.isSet)(e.name)&&(r.name=String(e.name)),(0,o.isSet)(e.symbol)&&(r.symbol=String(e.symbol)),(0,o.isSet)(e.uri)&&(r.uri=String(e.uri)),(0,o.isSet)(e.uriHash)&&(r.uriHash=String(e.uriHash)),r},toJSON(e){let r={};return void 0!==e.description&&(r.description=e.description),e.denomUnits?r.denomUnits=e.denomUnits.map(e=>e?t.DenomUnit.toJSON(e):void 0):r.denomUnits=[],void 0!==e.base&&(r.base=e.base),void 0!==e.display&&(r.display=e.display),void 0!==e.name&&(r.name=e.name),void 0!==e.symbol&&(r.symbol=e.symbol),void 0!==e.uri&&(r.uri=e.uri),void 0!==e.uriHash&&(r.uriHash=e.uriHash),r},fromPartial(e){var r,n,i,o,a,s,l,u;let d=p();return d.description=null!==(n=e.description)&&void 0!==n?n:"",d.denomUnits=(null===(r=e.denomUnits)||void 0===r?void 0:r.map(e=>t.DenomUnit.fromPartial(e)))||[],d.base=null!==(i=e.base)&&void 0!==i?i:"",d.display=null!==(o=e.display)&&void 0!==o?o:"",d.name=null!==(a=e.name)&&void 0!==a?a:"",d.symbol=null!==(s=e.symbol)&&void 0!==s?s:"",d.uri=null!==(l=e.uri)&&void 0!==l?l:"",d.uriHash=null!==(u=e.uriHash)&&void 0!==u?u:"",d}}},4818:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QueryClientImpl=t.QuerySendEnabledResponse=t.QuerySendEnabledRequest=t.QueryDenomOwnersResponse=t.DenomOwner=t.QueryDenomOwnersRequest=t.QueryDenomMetadataResponse=t.QueryDenomMetadataRequest=t.QueryDenomsMetadataResponse=t.QueryDenomsMetadataRequest=t.QueryParamsResponse=t.QueryParamsRequest=t.QuerySupplyOfResponse=t.QuerySupplyOfRequest=t.QueryTotalSupplyResponse=t.QueryTotalSupplyRequest=t.QuerySpendableBalanceByDenomResponse=t.QuerySpendableBalanceByDenomRequest=t.QuerySpendableBalancesResponse=t.QuerySpendableBalancesRequest=t.QueryAllBalancesResponse=t.QueryAllBalancesRequest=t.QueryBalanceResponse=t.QueryBalanceRequest=t.protobufPackage=void 0;let n=r(86141),i=r(14841),o=r(42951),a=r(46554),s=r(99133);function l(){return{address:"",denom:""}}function u(){return{balance:void 0}}function d(){return{address:"",pagination:void 0}}function c(){return{balances:[],pagination:void 0}}function p(){return{address:"",pagination:void 0}}function f(){return{balances:[],pagination:void 0}}function h(){return{address:"",denom:""}}function g(){return{balance:void 0}}function m(){return{pagination:void 0}}function y(){return{supply:[],pagination:void 0}}function v(){return{denom:""}}function b(){return{amount:i.Coin.fromPartial({})}}function S(){return{}}function w(){return{params:o.Params.fromPartial({})}}function _(){return{pagination:void 0}}function k(){return{metadatas:[],pagination:void 0}}function O(){return{denom:""}}function P(){return{metadata:o.Metadata.fromPartial({})}}function A(){return{denom:"",pagination:void 0}}function I(){return{address:"",balance:i.Coin.fromPartial({})}}function R(){return{denomOwners:[],pagination:void 0}}function E(){return{denoms:[],pagination:void 0}}function T(){return{sendEnabled:[],pagination:void 0}}t.protobufPackage="cosmos.bank.v1beta1",t.QueryBalanceRequest={typeUrl:"/cosmos.bank.v1beta1.QueryBalanceRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.address&&t.uint32(10).string(e.address),""!==e.denom&&t.uint32(18).string(e.denom),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=l();for(;r.pos>>3){case 1:i.address=r.string();break;case 2:i.denom=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=l();return(0,s.isSet)(e.address)&&(t.address=String(e.address)),(0,s.isSet)(e.denom)&&(t.denom=String(e.denom)),t},toJSON(e){let t={};return void 0!==e.address&&(t.address=e.address),void 0!==e.denom&&(t.denom=e.denom),t},fromPartial(e){var t,r;let n=l();return n.address=null!==(t=e.address)&&void 0!==t?t:"",n.denom=null!==(r=e.denom)&&void 0!==r?r:"",n}},t.QueryBalanceResponse={typeUrl:"/cosmos.bank.v1beta1.QueryBalanceResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return void 0!==e.balance&&i.Coin.encode(e.balance,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=u();for(;r.pos>>3==1?o.balance=i.Coin.decode(r,r.uint32()):r.skipType(7&e)}return o},fromJSON(e){let t=u();return(0,s.isSet)(e.balance)&&(t.balance=i.Coin.fromJSON(e.balance)),t},toJSON(e){let t={};return void 0!==e.balance&&(t.balance=e.balance?i.Coin.toJSON(e.balance):void 0),t},fromPartial(e){let t=u();return void 0!==e.balance&&null!==e.balance&&(t.balance=i.Coin.fromPartial(e.balance)),t}},t.QueryAllBalancesRequest={typeUrl:"/cosmos.bank.v1beta1.QueryAllBalancesRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.address&&t.uint32(10).string(e.address),void 0!==e.pagination&&n.PageRequest.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),i=void 0===t?r.len:r.pos+t,o=d();for(;r.pos>>3){case 1:o.address=r.string();break;case 2:o.pagination=n.PageRequest.decode(r,r.uint32());break;default:r.skipType(7&e)}}return o},fromJSON(e){let t=d();return(0,s.isSet)(e.address)&&(t.address=String(e.address)),(0,s.isSet)(e.pagination)&&(t.pagination=n.PageRequest.fromJSON(e.pagination)),t},toJSON(e){let t={};return void 0!==e.address&&(t.address=e.address),void 0!==e.pagination&&(t.pagination=e.pagination?n.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=d();return r.address=null!==(t=e.address)&&void 0!==t?t:"",void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageRequest.fromPartial(e.pagination)),r}},t.QueryAllBalancesResponse={typeUrl:"/cosmos.bank.v1beta1.QueryAllBalancesResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();for(let r of e.balances)i.Coin.encode(r,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&n.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),o=void 0===t?r.len:r.pos+t,s=c();for(;r.pos>>3){case 1:s.balances.push(i.Coin.decode(r,r.uint32()));break;case 2:s.pagination=n.PageResponse.decode(r,r.uint32());break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=c();return Array.isArray(null==e?void 0:e.balances)&&(t.balances=e.balances.map(e=>i.Coin.fromJSON(e))),(0,s.isSet)(e.pagination)&&(t.pagination=n.PageResponse.fromJSON(e.pagination)),t},toJSON(e){let t={};return e.balances?t.balances=e.balances.map(e=>e?i.Coin.toJSON(e):void 0):t.balances=[],void 0!==e.pagination&&(t.pagination=e.pagination?n.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=c();return r.balances=(null===(t=e.balances)||void 0===t?void 0:t.map(e=>i.Coin.fromPartial(e)))||[],void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageResponse.fromPartial(e.pagination)),r}},t.QuerySpendableBalancesRequest={typeUrl:"/cosmos.bank.v1beta1.QuerySpendableBalancesRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.address&&t.uint32(10).string(e.address),void 0!==e.pagination&&n.PageRequest.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),i=void 0===t?r.len:r.pos+t,o=p();for(;r.pos>>3){case 1:o.address=r.string();break;case 2:o.pagination=n.PageRequest.decode(r,r.uint32());break;default:r.skipType(7&e)}}return o},fromJSON(e){let t=p();return(0,s.isSet)(e.address)&&(t.address=String(e.address)),(0,s.isSet)(e.pagination)&&(t.pagination=n.PageRequest.fromJSON(e.pagination)),t},toJSON(e){let t={};return void 0!==e.address&&(t.address=e.address),void 0!==e.pagination&&(t.pagination=e.pagination?n.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=p();return r.address=null!==(t=e.address)&&void 0!==t?t:"",void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageRequest.fromPartial(e.pagination)),r}},t.QuerySpendableBalancesResponse={typeUrl:"/cosmos.bank.v1beta1.QuerySpendableBalancesResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();for(let r of e.balances)i.Coin.encode(r,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&n.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),o=void 0===t?r.len:r.pos+t,s=f();for(;r.pos>>3){case 1:s.balances.push(i.Coin.decode(r,r.uint32()));break;case 2:s.pagination=n.PageResponse.decode(r,r.uint32());break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=f();return Array.isArray(null==e?void 0:e.balances)&&(t.balances=e.balances.map(e=>i.Coin.fromJSON(e))),(0,s.isSet)(e.pagination)&&(t.pagination=n.PageResponse.fromJSON(e.pagination)),t},toJSON(e){let t={};return e.balances?t.balances=e.balances.map(e=>e?i.Coin.toJSON(e):void 0):t.balances=[],void 0!==e.pagination&&(t.pagination=e.pagination?n.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=f();return r.balances=(null===(t=e.balances)||void 0===t?void 0:t.map(e=>i.Coin.fromPartial(e)))||[],void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageResponse.fromPartial(e.pagination)),r}},t.QuerySpendableBalanceByDenomRequest={typeUrl:"/cosmos.bank.v1beta1.QuerySpendableBalanceByDenomRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.address&&t.uint32(10).string(e.address),""!==e.denom&&t.uint32(18).string(e.denom),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=h();for(;r.pos>>3){case 1:i.address=r.string();break;case 2:i.denom=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=h();return(0,s.isSet)(e.address)&&(t.address=String(e.address)),(0,s.isSet)(e.denom)&&(t.denom=String(e.denom)),t},toJSON(e){let t={};return void 0!==e.address&&(t.address=e.address),void 0!==e.denom&&(t.denom=e.denom),t},fromPartial(e){var t,r;let n=h();return n.address=null!==(t=e.address)&&void 0!==t?t:"",n.denom=null!==(r=e.denom)&&void 0!==r?r:"",n}},t.QuerySpendableBalanceByDenomResponse={typeUrl:"/cosmos.bank.v1beta1.QuerySpendableBalanceByDenomResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return void 0!==e.balance&&i.Coin.encode(e.balance,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=g();for(;r.pos>>3==1?o.balance=i.Coin.decode(r,r.uint32()):r.skipType(7&e)}return o},fromJSON(e){let t=g();return(0,s.isSet)(e.balance)&&(t.balance=i.Coin.fromJSON(e.balance)),t},toJSON(e){let t={};return void 0!==e.balance&&(t.balance=e.balance?i.Coin.toJSON(e.balance):void 0),t},fromPartial(e){let t=g();return void 0!==e.balance&&null!==e.balance&&(t.balance=i.Coin.fromPartial(e.balance)),t}},t.QueryTotalSupplyRequest={typeUrl:"/cosmos.bank.v1beta1.QueryTotalSupplyRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return void 0!==e.pagination&&n.PageRequest.encode(e.pagination,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),i=void 0===t?r.len:r.pos+t,o=m();for(;r.pos>>3==1?o.pagination=n.PageRequest.decode(r,r.uint32()):r.skipType(7&e)}return o},fromJSON(e){let t=m();return(0,s.isSet)(e.pagination)&&(t.pagination=n.PageRequest.fromJSON(e.pagination)),t},toJSON(e){let t={};return void 0!==e.pagination&&(t.pagination=e.pagination?n.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){let t=m();return void 0!==e.pagination&&null!==e.pagination&&(t.pagination=n.PageRequest.fromPartial(e.pagination)),t}},t.QueryTotalSupplyResponse={typeUrl:"/cosmos.bank.v1beta1.QueryTotalSupplyResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();for(let r of e.supply)i.Coin.encode(r,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&n.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),o=void 0===t?r.len:r.pos+t,s=y();for(;r.pos>>3){case 1:s.supply.push(i.Coin.decode(r,r.uint32()));break;case 2:s.pagination=n.PageResponse.decode(r,r.uint32());break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=y();return Array.isArray(null==e?void 0:e.supply)&&(t.supply=e.supply.map(e=>i.Coin.fromJSON(e))),(0,s.isSet)(e.pagination)&&(t.pagination=n.PageResponse.fromJSON(e.pagination)),t},toJSON(e){let t={};return e.supply?t.supply=e.supply.map(e=>e?i.Coin.toJSON(e):void 0):t.supply=[],void 0!==e.pagination&&(t.pagination=e.pagination?n.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=y();return r.supply=(null===(t=e.supply)||void 0===t?void 0:t.map(e=>i.Coin.fromPartial(e)))||[],void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageResponse.fromPartial(e.pagination)),r}},t.QuerySupplyOfRequest={typeUrl:"/cosmos.bank.v1beta1.QuerySupplyOfRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.denom&&t.uint32(10).string(e.denom),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=v();for(;r.pos>>3==1?i.denom=r.string():r.skipType(7&e)}return i},fromJSON(e){let t=v();return(0,s.isSet)(e.denom)&&(t.denom=String(e.denom)),t},toJSON(e){let t={};return void 0!==e.denom&&(t.denom=e.denom),t},fromPartial(e){var t;let r=v();return r.denom=null!==(t=e.denom)&&void 0!==t?t:"",r}},t.QuerySupplyOfResponse={typeUrl:"/cosmos.bank.v1beta1.QuerySupplyOfResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return void 0!==e.amount&&i.Coin.encode(e.amount,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=b();for(;r.pos>>3==1?o.amount=i.Coin.decode(r,r.uint32()):r.skipType(7&e)}return o},fromJSON(e){let t=b();return(0,s.isSet)(e.amount)&&(t.amount=i.Coin.fromJSON(e.amount)),t},toJSON(e){let t={};return void 0!==e.amount&&(t.amount=e.amount?i.Coin.toJSON(e.amount):void 0),t},fromPartial(e){let t=b();return void 0!==e.amount&&null!==e.amount&&(t.amount=i.Coin.fromPartial(e.amount)),t}},t.QueryParamsRequest={typeUrl:"/cosmos.bank.v1beta1.QueryParamsRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=S();for(;r.posS(),toJSON:e=>({}),fromPartial:e=>S()},t.QueryParamsResponse={typeUrl:"/cosmos.bank.v1beta1.QueryParamsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return void 0!==e.params&&o.Params.encode(e.params,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=w();for(;r.pos>>3==1?i.params=o.Params.decode(r,r.uint32()):r.skipType(7&e)}return i},fromJSON(e){let t=w();return(0,s.isSet)(e.params)&&(t.params=o.Params.fromJSON(e.params)),t},toJSON(e){let t={};return void 0!==e.params&&(t.params=e.params?o.Params.toJSON(e.params):void 0),t},fromPartial(e){let t=w();return void 0!==e.params&&null!==e.params&&(t.params=o.Params.fromPartial(e.params)),t}},t.QueryDenomsMetadataRequest={typeUrl:"/cosmos.bank.v1beta1.QueryDenomsMetadataRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return void 0!==e.pagination&&n.PageRequest.encode(e.pagination,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),i=void 0===t?r.len:r.pos+t,o=_();for(;r.pos>>3==1?o.pagination=n.PageRequest.decode(r,r.uint32()):r.skipType(7&e)}return o},fromJSON(e){let t=_();return(0,s.isSet)(e.pagination)&&(t.pagination=n.PageRequest.fromJSON(e.pagination)),t},toJSON(e){let t={};return void 0!==e.pagination&&(t.pagination=e.pagination?n.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){let t=_();return void 0!==e.pagination&&null!==e.pagination&&(t.pagination=n.PageRequest.fromPartial(e.pagination)),t}},t.QueryDenomsMetadataResponse={typeUrl:"/cosmos.bank.v1beta1.QueryDenomsMetadataResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();for(let r of e.metadatas)o.Metadata.encode(r,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&n.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),i=void 0===t?r.len:r.pos+t,s=k();for(;r.pos>>3){case 1:s.metadatas.push(o.Metadata.decode(r,r.uint32()));break;case 2:s.pagination=n.PageResponse.decode(r,r.uint32());break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=k();return Array.isArray(null==e?void 0:e.metadatas)&&(t.metadatas=e.metadatas.map(e=>o.Metadata.fromJSON(e))),(0,s.isSet)(e.pagination)&&(t.pagination=n.PageResponse.fromJSON(e.pagination)),t},toJSON(e){let t={};return e.metadatas?t.metadatas=e.metadatas.map(e=>e?o.Metadata.toJSON(e):void 0):t.metadatas=[],void 0!==e.pagination&&(t.pagination=e.pagination?n.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=k();return r.metadatas=(null===(t=e.metadatas)||void 0===t?void 0:t.map(e=>o.Metadata.fromPartial(e)))||[],void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageResponse.fromPartial(e.pagination)),r}},t.QueryDenomMetadataRequest={typeUrl:"/cosmos.bank.v1beta1.QueryDenomMetadataRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.denom&&t.uint32(10).string(e.denom),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=O();for(;r.pos>>3==1?i.denom=r.string():r.skipType(7&e)}return i},fromJSON(e){let t=O();return(0,s.isSet)(e.denom)&&(t.denom=String(e.denom)),t},toJSON(e){let t={};return void 0!==e.denom&&(t.denom=e.denom),t},fromPartial(e){var t;let r=O();return r.denom=null!==(t=e.denom)&&void 0!==t?t:"",r}},t.QueryDenomMetadataResponse={typeUrl:"/cosmos.bank.v1beta1.QueryDenomMetadataResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return void 0!==e.metadata&&o.Metadata.encode(e.metadata,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=P();for(;r.pos>>3==1?i.metadata=o.Metadata.decode(r,r.uint32()):r.skipType(7&e)}return i},fromJSON(e){let t=P();return(0,s.isSet)(e.metadata)&&(t.metadata=o.Metadata.fromJSON(e.metadata)),t},toJSON(e){let t={};return void 0!==e.metadata&&(t.metadata=e.metadata?o.Metadata.toJSON(e.metadata):void 0),t},fromPartial(e){let t=P();return void 0!==e.metadata&&null!==e.metadata&&(t.metadata=o.Metadata.fromPartial(e.metadata)),t}},t.QueryDenomOwnersRequest={typeUrl:"/cosmos.bank.v1beta1.QueryDenomOwnersRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.denom&&t.uint32(10).string(e.denom),void 0!==e.pagination&&n.PageRequest.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),i=void 0===t?r.len:r.pos+t,o=A();for(;r.pos>>3){case 1:o.denom=r.string();break;case 2:o.pagination=n.PageRequest.decode(r,r.uint32());break;default:r.skipType(7&e)}}return o},fromJSON(e){let t=A();return(0,s.isSet)(e.denom)&&(t.denom=String(e.denom)),(0,s.isSet)(e.pagination)&&(t.pagination=n.PageRequest.fromJSON(e.pagination)),t},toJSON(e){let t={};return void 0!==e.denom&&(t.denom=e.denom),void 0!==e.pagination&&(t.pagination=e.pagination?n.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=A();return r.denom=null!==(t=e.denom)&&void 0!==t?t:"",void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageRequest.fromPartial(e.pagination)),r}},t.DenomOwner={typeUrl:"/cosmos.bank.v1beta1.DenomOwner",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.address&&t.uint32(10).string(e.address),void 0!==e.balance&&i.Coin.encode(e.balance,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=I();for(;r.pos>>3){case 1:o.address=r.string();break;case 2:o.balance=i.Coin.decode(r,r.uint32());break;default:r.skipType(7&e)}}return o},fromJSON(e){let t=I();return(0,s.isSet)(e.address)&&(t.address=String(e.address)),(0,s.isSet)(e.balance)&&(t.balance=i.Coin.fromJSON(e.balance)),t},toJSON(e){let t={};return void 0!==e.address&&(t.address=e.address),void 0!==e.balance&&(t.balance=e.balance?i.Coin.toJSON(e.balance):void 0),t},fromPartial(e){var t;let r=I();return r.address=null!==(t=e.address)&&void 0!==t?t:"",void 0!==e.balance&&null!==e.balance&&(r.balance=i.Coin.fromPartial(e.balance)),r}},t.QueryDenomOwnersResponse={typeUrl:"/cosmos.bank.v1beta1.QueryDenomOwnersResponse",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();for(let n of e.denomOwners)t.DenomOwner.encode(n,r.uint32(10).fork()).ldelim();return void 0!==e.pagination&&n.PageResponse.encode(e.pagination,r.uint32(18).fork()).ldelim(),r},decode(e,r){let i=e instanceof a.BinaryReader?e:new a.BinaryReader(e),o=void 0===r?i.len:i.pos+r,s=R();for(;i.pos>>3){case 1:s.denomOwners.push(t.DenomOwner.decode(i,i.uint32()));break;case 2:s.pagination=n.PageResponse.decode(i,i.uint32());break;default:i.skipType(7&e)}}return s},fromJSON(e){let r=R();return Array.isArray(null==e?void 0:e.denomOwners)&&(r.denomOwners=e.denomOwners.map(e=>t.DenomOwner.fromJSON(e))),(0,s.isSet)(e.pagination)&&(r.pagination=n.PageResponse.fromJSON(e.pagination)),r},toJSON(e){let r={};return e.denomOwners?r.denomOwners=e.denomOwners.map(e=>e?t.DenomOwner.toJSON(e):void 0):r.denomOwners=[],void 0!==e.pagination&&(r.pagination=e.pagination?n.PageResponse.toJSON(e.pagination):void 0),r},fromPartial(e){var r;let i=R();return i.denomOwners=(null===(r=e.denomOwners)||void 0===r?void 0:r.map(e=>t.DenomOwner.fromPartial(e)))||[],void 0!==e.pagination&&null!==e.pagination&&(i.pagination=n.PageResponse.fromPartial(e.pagination)),i}},t.QuerySendEnabledRequest={typeUrl:"/cosmos.bank.v1beta1.QuerySendEnabledRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();for(let r of e.denoms)t.uint32(10).string(r);return void 0!==e.pagination&&n.PageRequest.encode(e.pagination,t.uint32(794).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),i=void 0===t?r.len:r.pos+t,o=E();for(;r.pos>>3){case 1:o.denoms.push(r.string());break;case 99:o.pagination=n.PageRequest.decode(r,r.uint32());break;default:r.skipType(7&e)}}return o},fromJSON(e){let t=E();return Array.isArray(null==e?void 0:e.denoms)&&(t.denoms=e.denoms.map(e=>String(e))),(0,s.isSet)(e.pagination)&&(t.pagination=n.PageRequest.fromJSON(e.pagination)),t},toJSON(e){let t={};return e.denoms?t.denoms=e.denoms.map(e=>e):t.denoms=[],void 0!==e.pagination&&(t.pagination=e.pagination?n.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=E();return r.denoms=(null===(t=e.denoms)||void 0===t?void 0:t.map(e=>e))||[],void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageRequest.fromPartial(e.pagination)),r}},t.QuerySendEnabledResponse={typeUrl:"/cosmos.bank.v1beta1.QuerySendEnabledResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();for(let r of e.sendEnabled)o.SendEnabled.encode(r,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&n.PageResponse.encode(e.pagination,t.uint32(794).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),i=void 0===t?r.len:r.pos+t,s=T();for(;r.pos>>3){case 1:s.sendEnabled.push(o.SendEnabled.decode(r,r.uint32()));break;case 99:s.pagination=n.PageResponse.decode(r,r.uint32());break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=T();return Array.isArray(null==e?void 0:e.sendEnabled)&&(t.sendEnabled=e.sendEnabled.map(e=>o.SendEnabled.fromJSON(e))),(0,s.isSet)(e.pagination)&&(t.pagination=n.PageResponse.fromJSON(e.pagination)),t},toJSON(e){let t={};return e.sendEnabled?t.sendEnabled=e.sendEnabled.map(e=>e?o.SendEnabled.toJSON(e):void 0):t.sendEnabled=[],void 0!==e.pagination&&(t.pagination=e.pagination?n.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=T();return r.sendEnabled=(null===(t=e.sendEnabled)||void 0===t?void 0:t.map(e=>o.SendEnabled.fromPartial(e)))||[],void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageResponse.fromPartial(e.pagination)),r}};class N{Balance(e){let r=t.QueryBalanceRequest.encode(e).finish();return this.rpc.request("cosmos.bank.v1beta1.Query","Balance",r).then(e=>t.QueryBalanceResponse.decode(new a.BinaryReader(e)))}AllBalances(e){let r=t.QueryAllBalancesRequest.encode(e).finish();return this.rpc.request("cosmos.bank.v1beta1.Query","AllBalances",r).then(e=>t.QueryAllBalancesResponse.decode(new a.BinaryReader(e)))}SpendableBalances(e){let r=t.QuerySpendableBalancesRequest.encode(e).finish();return this.rpc.request("cosmos.bank.v1beta1.Query","SpendableBalances",r).then(e=>t.QuerySpendableBalancesResponse.decode(new a.BinaryReader(e)))}SpendableBalanceByDenom(e){let r=t.QuerySpendableBalanceByDenomRequest.encode(e).finish();return this.rpc.request("cosmos.bank.v1beta1.Query","SpendableBalanceByDenom",r).then(e=>t.QuerySpendableBalanceByDenomResponse.decode(new a.BinaryReader(e)))}TotalSupply(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{pagination:n.PageRequest.fromPartial({})},r=t.QueryTotalSupplyRequest.encode(e).finish();return this.rpc.request("cosmos.bank.v1beta1.Query","TotalSupply",r).then(e=>t.QueryTotalSupplyResponse.decode(new a.BinaryReader(e)))}SupplyOf(e){let r=t.QuerySupplyOfRequest.encode(e).finish();return this.rpc.request("cosmos.bank.v1beta1.Query","SupplyOf",r).then(e=>t.QuerySupplyOfResponse.decode(new a.BinaryReader(e)))}Params(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.QueryParamsRequest.encode(e).finish();return this.rpc.request("cosmos.bank.v1beta1.Query","Params",r).then(e=>t.QueryParamsResponse.decode(new a.BinaryReader(e)))}DenomMetadata(e){let r=t.QueryDenomMetadataRequest.encode(e).finish();return this.rpc.request("cosmos.bank.v1beta1.Query","DenomMetadata",r).then(e=>t.QueryDenomMetadataResponse.decode(new a.BinaryReader(e)))}DenomsMetadata(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{pagination:n.PageRequest.fromPartial({})},r=t.QueryDenomsMetadataRequest.encode(e).finish();return this.rpc.request("cosmos.bank.v1beta1.Query","DenomsMetadata",r).then(e=>t.QueryDenomsMetadataResponse.decode(new a.BinaryReader(e)))}DenomOwners(e){let r=t.QueryDenomOwnersRequest.encode(e).finish();return this.rpc.request("cosmos.bank.v1beta1.Query","DenomOwners",r).then(e=>t.QueryDenomOwnersResponse.decode(new a.BinaryReader(e)))}SendEnabled(e){let r=t.QuerySendEnabledRequest.encode(e).finish();return this.rpc.request("cosmos.bank.v1beta1.Query","SendEnabled",r).then(e=>t.QuerySendEnabledResponse.decode(new a.BinaryReader(e)))}constructor(e){this.rpc=e,this.Balance=this.Balance.bind(this),this.AllBalances=this.AllBalances.bind(this),this.SpendableBalances=this.SpendableBalances.bind(this),this.SpendableBalanceByDenom=this.SpendableBalanceByDenom.bind(this),this.TotalSupply=this.TotalSupply.bind(this),this.SupplyOf=this.SupplyOf.bind(this),this.Params=this.Params.bind(this),this.DenomMetadata=this.DenomMetadata.bind(this),this.DenomsMetadata=this.DenomsMetadata.bind(this),this.DenomOwners=this.DenomOwners.bind(this),this.SendEnabled=this.SendEnabled.bind(this)}}t.QueryClientImpl=N},45413:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MsgClientImpl=t.MsgSetSendEnabledResponse=t.MsgSetSendEnabled=t.MsgUpdateParamsResponse=t.MsgUpdateParams=t.MsgMultiSendResponse=t.MsgMultiSend=t.MsgSendResponse=t.MsgSend=t.protobufPackage=void 0;let n=r(14841),i=r(42951),o=r(46554),a=r(99133);function s(){return{fromAddress:"",toAddress:"",amount:[]}}function l(){return{}}function u(){return{inputs:[],outputs:[]}}function d(){return{}}function c(){return{authority:"",params:i.Params.fromPartial({})}}function p(){return{}}function f(){return{authority:"",sendEnabled:[],useDefaultFor:[]}}function h(){return{}}t.protobufPackage="cosmos.bank.v1beta1",t.MsgSend={typeUrl:"/cosmos.bank.v1beta1.MsgSend",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of(""!==e.fromAddress&&t.uint32(10).string(e.fromAddress),""!==e.toAddress&&t.uint32(18).string(e.toAddress),e.amount))n.Coin.encode(r,t.uint32(26).fork()).ldelim();return t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=s();for(;r.pos>>3){case 1:a.fromAddress=r.string();break;case 2:a.toAddress=r.string();break;case 3:a.amount.push(n.Coin.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=s();return(0,a.isSet)(e.fromAddress)&&(t.fromAddress=String(e.fromAddress)),(0,a.isSet)(e.toAddress)&&(t.toAddress=String(e.toAddress)),Array.isArray(null==e?void 0:e.amount)&&(t.amount=e.amount.map(e=>n.Coin.fromJSON(e))),t},toJSON(e){let t={};return void 0!==e.fromAddress&&(t.fromAddress=e.fromAddress),void 0!==e.toAddress&&(t.toAddress=e.toAddress),e.amount?t.amount=e.amount.map(e=>e?n.Coin.toJSON(e):void 0):t.amount=[],t},fromPartial(e){var t,r,i;let o=s();return o.fromAddress=null!==(r=e.fromAddress)&&void 0!==r?r:"",o.toAddress=null!==(i=e.toAddress)&&void 0!==i?i:"",o.amount=(null===(t=e.amount)||void 0===t?void 0:t.map(e=>n.Coin.fromPartial(e)))||[],o}},t.MsgSendResponse={typeUrl:"/cosmos.bank.v1beta1.MsgSendResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=l();for(;r.posl(),toJSON:e=>({}),fromPartial:e=>l()},t.MsgMultiSend={typeUrl:"/cosmos.bank.v1beta1.MsgMultiSend",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of e.inputs)i.Input.encode(r,t.uint32(10).fork()).ldelim();for(let r of e.outputs)i.Output.encode(r,t.uint32(18).fork()).ldelim();return t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,a=u();for(;r.pos>>3){case 1:a.inputs.push(i.Input.decode(r,r.uint32()));break;case 2:a.outputs.push(i.Output.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=u();return Array.isArray(null==e?void 0:e.inputs)&&(t.inputs=e.inputs.map(e=>i.Input.fromJSON(e))),Array.isArray(null==e?void 0:e.outputs)&&(t.outputs=e.outputs.map(e=>i.Output.fromJSON(e))),t},toJSON(e){let t={};return e.inputs?t.inputs=e.inputs.map(e=>e?i.Input.toJSON(e):void 0):t.inputs=[],e.outputs?t.outputs=e.outputs.map(e=>e?i.Output.toJSON(e):void 0):t.outputs=[],t},fromPartial(e){var t,r;let n=u();return n.inputs=(null===(t=e.inputs)||void 0===t?void 0:t.map(e=>i.Input.fromPartial(e)))||[],n.outputs=(null===(r=e.outputs)||void 0===r?void 0:r.map(e=>i.Output.fromPartial(e)))||[],n}},t.MsgMultiSendResponse={typeUrl:"/cosmos.bank.v1beta1.MsgMultiSendResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=d();for(;r.posd(),toJSON:e=>({}),fromPartial:e=>d()},t.MsgUpdateParams={typeUrl:"/cosmos.bank.v1beta1.MsgUpdateParams",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.authority&&t.uint32(10).string(e.authority),void 0!==e.params&&i.Params.encode(e.params,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,a=c();for(;r.pos>>3){case 1:a.authority=r.string();break;case 2:a.params=i.Params.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=c();return(0,a.isSet)(e.authority)&&(t.authority=String(e.authority)),(0,a.isSet)(e.params)&&(t.params=i.Params.fromJSON(e.params)),t},toJSON(e){let t={};return void 0!==e.authority&&(t.authority=e.authority),void 0!==e.params&&(t.params=e.params?i.Params.toJSON(e.params):void 0),t},fromPartial(e){var t;let r=c();return r.authority=null!==(t=e.authority)&&void 0!==t?t:"",void 0!==e.params&&null!==e.params&&(r.params=i.Params.fromPartial(e.params)),r}},t.MsgUpdateParamsResponse={typeUrl:"/cosmos.bank.v1beta1.MsgUpdateParamsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=p();for(;r.posp(),toJSON:e=>({}),fromPartial:e=>p()},t.MsgSetSendEnabled={typeUrl:"/cosmos.bank.v1beta1.MsgSetSendEnabled",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of(""!==e.authority&&t.uint32(10).string(e.authority),e.sendEnabled))i.SendEnabled.encode(r,t.uint32(18).fork()).ldelim();for(let r of e.useDefaultFor)t.uint32(26).string(r);return t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,a=f();for(;r.pos>>3){case 1:a.authority=r.string();break;case 2:a.sendEnabled.push(i.SendEnabled.decode(r,r.uint32()));break;case 3:a.useDefaultFor.push(r.string());break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=f();return(0,a.isSet)(e.authority)&&(t.authority=String(e.authority)),Array.isArray(null==e?void 0:e.sendEnabled)&&(t.sendEnabled=e.sendEnabled.map(e=>i.SendEnabled.fromJSON(e))),Array.isArray(null==e?void 0:e.useDefaultFor)&&(t.useDefaultFor=e.useDefaultFor.map(e=>String(e))),t},toJSON(e){let t={};return void 0!==e.authority&&(t.authority=e.authority),e.sendEnabled?t.sendEnabled=e.sendEnabled.map(e=>e?i.SendEnabled.toJSON(e):void 0):t.sendEnabled=[],e.useDefaultFor?t.useDefaultFor=e.useDefaultFor.map(e=>e):t.useDefaultFor=[],t},fromPartial(e){var t,r,n;let o=f();return o.authority=null!==(n=e.authority)&&void 0!==n?n:"",o.sendEnabled=(null===(t=e.sendEnabled)||void 0===t?void 0:t.map(e=>i.SendEnabled.fromPartial(e)))||[],o.useDefaultFor=(null===(r=e.useDefaultFor)||void 0===r?void 0:r.map(e=>e))||[],o}},t.MsgSetSendEnabledResponse={typeUrl:"/cosmos.bank.v1beta1.MsgSetSendEnabledResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=h();for(;r.posh(),toJSON:e=>({}),fromPartial:e=>h()};class g{Send(e){let r=t.MsgSend.encode(e).finish();return this.rpc.request("cosmos.bank.v1beta1.Msg","Send",r).then(e=>t.MsgSendResponse.decode(new o.BinaryReader(e)))}MultiSend(e){let r=t.MsgMultiSend.encode(e).finish();return this.rpc.request("cosmos.bank.v1beta1.Msg","MultiSend",r).then(e=>t.MsgMultiSendResponse.decode(new o.BinaryReader(e)))}UpdateParams(e){let r=t.MsgUpdateParams.encode(e).finish();return this.rpc.request("cosmos.bank.v1beta1.Msg","UpdateParams",r).then(e=>t.MsgUpdateParamsResponse.decode(new o.BinaryReader(e)))}SetSendEnabled(e){let r=t.MsgSetSendEnabled.encode(e).finish();return this.rpc.request("cosmos.bank.v1beta1.Msg","SetSendEnabled",r).then(e=>t.MsgSetSendEnabledResponse.decode(new o.BinaryReader(e)))}constructor(e){this.rpc=e,this.Send=this.Send.bind(this),this.MultiSend=this.MultiSend.bind(this),this.UpdateParams=this.UpdateParams.bind(this),this.SetSendEnabled=this.SetSendEnabled.bind(this)}}t.MsgClientImpl=g},94534:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SearchTxsResult=t.TxMsgData=t.MsgData=t.SimulationResponse=t.Result=t.GasInfo=t.Attribute=t.StringEvent=t.ABCIMessageLog=t.TxResponse=t.protobufPackage=void 0;let n=r(11879),i=r(52942),o=r(46554),a=r(99133);function s(){return{height:BigInt(0),txhash:"",codespace:"",code:0,data:"",rawLog:"",logs:[],info:"",gasWanted:BigInt(0),gasUsed:BigInt(0),tx:void 0,timestamp:"",events:[]}}function l(){return{msgIndex:0,log:"",events:[]}}function u(){return{type:"",attributes:[]}}function d(){return{key:"",value:""}}function c(){return{gasWanted:BigInt(0),gasUsed:BigInt(0)}}function p(){return{data:new Uint8Array,log:"",events:[],msgResponses:[]}}function f(){return{gasInfo:t.GasInfo.fromPartial({}),result:void 0}}function h(){return{msgType:"",data:new Uint8Array}}function g(){return{data:[],msgResponses:[]}}function m(){return{totalCount:BigInt(0),count:BigInt(0),pageNumber:BigInt(0),pageTotal:BigInt(0),limit:BigInt(0),txs:[]}}t.protobufPackage="cosmos.base.abci.v1beta1",t.TxResponse={typeUrl:"/cosmos.base.abci.v1beta1.TxResponse",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let n of(e.height!==BigInt(0)&&r.uint32(8).int64(e.height),""!==e.txhash&&r.uint32(18).string(e.txhash),""!==e.codespace&&r.uint32(26).string(e.codespace),0!==e.code&&r.uint32(32).uint32(e.code),""!==e.data&&r.uint32(42).string(e.data),""!==e.rawLog&&r.uint32(50).string(e.rawLog),e.logs))t.ABCIMessageLog.encode(n,r.uint32(58).fork()).ldelim();for(let t of(""!==e.info&&r.uint32(66).string(e.info),e.gasWanted!==BigInt(0)&&r.uint32(72).int64(e.gasWanted),e.gasUsed!==BigInt(0)&&r.uint32(80).int64(e.gasUsed),void 0!==e.tx&&n.Any.encode(e.tx,r.uint32(90).fork()).ldelim(),""!==e.timestamp&&r.uint32(98).string(e.timestamp),e.events))i.Event.encode(t,r.uint32(106).fork()).ldelim();return r},decode(e,r){let a=e instanceof o.BinaryReader?e:new o.BinaryReader(e),l=void 0===r?a.len:a.pos+r,u=s();for(;a.pos>>3){case 1:u.height=a.int64();break;case 2:u.txhash=a.string();break;case 3:u.codespace=a.string();break;case 4:u.code=a.uint32();break;case 5:u.data=a.string();break;case 6:u.rawLog=a.string();break;case 7:u.logs.push(t.ABCIMessageLog.decode(a,a.uint32()));break;case 8:u.info=a.string();break;case 9:u.gasWanted=a.int64();break;case 10:u.gasUsed=a.int64();break;case 11:u.tx=n.Any.decode(a,a.uint32());break;case 12:u.timestamp=a.string();break;case 13:u.events.push(i.Event.decode(a,a.uint32()));break;default:a.skipType(7&e)}}return u},fromJSON(e){let r=s();return(0,a.isSet)(e.height)&&(r.height=BigInt(e.height.toString())),(0,a.isSet)(e.txhash)&&(r.txhash=String(e.txhash)),(0,a.isSet)(e.codespace)&&(r.codespace=String(e.codespace)),(0,a.isSet)(e.code)&&(r.code=Number(e.code)),(0,a.isSet)(e.data)&&(r.data=String(e.data)),(0,a.isSet)(e.rawLog)&&(r.rawLog=String(e.rawLog)),Array.isArray(null==e?void 0:e.logs)&&(r.logs=e.logs.map(e=>t.ABCIMessageLog.fromJSON(e))),(0,a.isSet)(e.info)&&(r.info=String(e.info)),(0,a.isSet)(e.gasWanted)&&(r.gasWanted=BigInt(e.gasWanted.toString())),(0,a.isSet)(e.gasUsed)&&(r.gasUsed=BigInt(e.gasUsed.toString())),(0,a.isSet)(e.tx)&&(r.tx=n.Any.fromJSON(e.tx)),(0,a.isSet)(e.timestamp)&&(r.timestamp=String(e.timestamp)),Array.isArray(null==e?void 0:e.events)&&(r.events=e.events.map(e=>i.Event.fromJSON(e))),r},toJSON(e){let r={};return void 0!==e.height&&(r.height=(e.height||BigInt(0)).toString()),void 0!==e.txhash&&(r.txhash=e.txhash),void 0!==e.codespace&&(r.codespace=e.codespace),void 0!==e.code&&(r.code=Math.round(e.code)),void 0!==e.data&&(r.data=e.data),void 0!==e.rawLog&&(r.rawLog=e.rawLog),e.logs?r.logs=e.logs.map(e=>e?t.ABCIMessageLog.toJSON(e):void 0):r.logs=[],void 0!==e.info&&(r.info=e.info),void 0!==e.gasWanted&&(r.gasWanted=(e.gasWanted||BigInt(0)).toString()),void 0!==e.gasUsed&&(r.gasUsed=(e.gasUsed||BigInt(0)).toString()),void 0!==e.tx&&(r.tx=e.tx?n.Any.toJSON(e.tx):void 0),void 0!==e.timestamp&&(r.timestamp=e.timestamp),e.events?r.events=e.events.map(e=>e?i.Event.toJSON(e):void 0):r.events=[],r},fromPartial(e){var r,o,a,l,u,d,c,p,f;let h=s();return void 0!==e.height&&null!==e.height&&(h.height=BigInt(e.height.toString())),h.txhash=null!==(a=e.txhash)&&void 0!==a?a:"",h.codespace=null!==(l=e.codespace)&&void 0!==l?l:"",h.code=null!==(u=e.code)&&void 0!==u?u:0,h.data=null!==(d=e.data)&&void 0!==d?d:"",h.rawLog=null!==(c=e.rawLog)&&void 0!==c?c:"",h.logs=(null===(r=e.logs)||void 0===r?void 0:r.map(e=>t.ABCIMessageLog.fromPartial(e)))||[],h.info=null!==(p=e.info)&&void 0!==p?p:"",void 0!==e.gasWanted&&null!==e.gasWanted&&(h.gasWanted=BigInt(e.gasWanted.toString())),void 0!==e.gasUsed&&null!==e.gasUsed&&(h.gasUsed=BigInt(e.gasUsed.toString())),void 0!==e.tx&&null!==e.tx&&(h.tx=n.Any.fromPartial(e.tx)),h.timestamp=null!==(f=e.timestamp)&&void 0!==f?f:"",h.events=(null===(o=e.events)||void 0===o?void 0:o.map(e=>i.Event.fromPartial(e)))||[],h}},t.ABCIMessageLog={typeUrl:"/cosmos.base.abci.v1beta1.ABCIMessageLog",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let n of(0!==e.msgIndex&&r.uint32(8).uint32(e.msgIndex),""!==e.log&&r.uint32(18).string(e.log),e.events))t.StringEvent.encode(n,r.uint32(26).fork()).ldelim();return r},decode(e,r){let n=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===r?n.len:n.pos+r,a=l();for(;n.pos>>3){case 1:a.msgIndex=n.uint32();break;case 2:a.log=n.string();break;case 3:a.events.push(t.StringEvent.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return a},fromJSON(e){let r=l();return(0,a.isSet)(e.msgIndex)&&(r.msgIndex=Number(e.msgIndex)),(0,a.isSet)(e.log)&&(r.log=String(e.log)),Array.isArray(null==e?void 0:e.events)&&(r.events=e.events.map(e=>t.StringEvent.fromJSON(e))),r},toJSON(e){let r={};return void 0!==e.msgIndex&&(r.msgIndex=Math.round(e.msgIndex)),void 0!==e.log&&(r.log=e.log),e.events?r.events=e.events.map(e=>e?t.StringEvent.toJSON(e):void 0):r.events=[],r},fromPartial(e){var r,n,i;let o=l();return o.msgIndex=null!==(n=e.msgIndex)&&void 0!==n?n:0,o.log=null!==(i=e.log)&&void 0!==i?i:"",o.events=(null===(r=e.events)||void 0===r?void 0:r.map(e=>t.StringEvent.fromPartial(e)))||[],o}},t.StringEvent={typeUrl:"/cosmos.base.abci.v1beta1.StringEvent",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let n of(""!==e.type&&r.uint32(10).string(e.type),e.attributes))t.Attribute.encode(n,r.uint32(18).fork()).ldelim();return r},decode(e,r){let n=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===r?n.len:n.pos+r,a=u();for(;n.pos>>3){case 1:a.type=n.string();break;case 2:a.attributes.push(t.Attribute.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return a},fromJSON(e){let r=u();return(0,a.isSet)(e.type)&&(r.type=String(e.type)),Array.isArray(null==e?void 0:e.attributes)&&(r.attributes=e.attributes.map(e=>t.Attribute.fromJSON(e))),r},toJSON(e){let r={};return void 0!==e.type&&(r.type=e.type),e.attributes?r.attributes=e.attributes.map(e=>e?t.Attribute.toJSON(e):void 0):r.attributes=[],r},fromPartial(e){var r,n;let i=u();return i.type=null!==(n=e.type)&&void 0!==n?n:"",i.attributes=(null===(r=e.attributes)||void 0===r?void 0:r.map(e=>t.Attribute.fromPartial(e)))||[],i}},t.Attribute={typeUrl:"/cosmos.base.abci.v1beta1.Attribute",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.key&&t.uint32(10).string(e.key),""!==e.value&&t.uint32(18).string(e.value),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=d();for(;r.pos>>3){case 1:i.key=r.string();break;case 2:i.value=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=d();return(0,a.isSet)(e.key)&&(t.key=String(e.key)),(0,a.isSet)(e.value)&&(t.value=String(e.value)),t},toJSON(e){let t={};return void 0!==e.key&&(t.key=e.key),void 0!==e.value&&(t.value=e.value),t},fromPartial(e){var t,r;let n=d();return n.key=null!==(t=e.key)&&void 0!==t?t:"",n.value=null!==(r=e.value)&&void 0!==r?r:"",n}},t.GasInfo={typeUrl:"/cosmos.base.abci.v1beta1.GasInfo",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return e.gasWanted!==BigInt(0)&&t.uint32(8).uint64(e.gasWanted),e.gasUsed!==BigInt(0)&&t.uint32(16).uint64(e.gasUsed),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=c();for(;r.pos>>3){case 1:i.gasWanted=r.uint64();break;case 2:i.gasUsed=r.uint64();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=c();return(0,a.isSet)(e.gasWanted)&&(t.gasWanted=BigInt(e.gasWanted.toString())),(0,a.isSet)(e.gasUsed)&&(t.gasUsed=BigInt(e.gasUsed.toString())),t},toJSON(e){let t={};return void 0!==e.gasWanted&&(t.gasWanted=(e.gasWanted||BigInt(0)).toString()),void 0!==e.gasUsed&&(t.gasUsed=(e.gasUsed||BigInt(0)).toString()),t},fromPartial(e){let t=c();return void 0!==e.gasWanted&&null!==e.gasWanted&&(t.gasWanted=BigInt(e.gasWanted.toString())),void 0!==e.gasUsed&&null!==e.gasUsed&&(t.gasUsed=BigInt(e.gasUsed.toString())),t}},t.Result={typeUrl:"/cosmos.base.abci.v1beta1.Result",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of(0!==e.data.length&&t.uint32(10).bytes(e.data),""!==e.log&&t.uint32(18).string(e.log),e.events))i.Event.encode(r,t.uint32(26).fork()).ldelim();for(let r of e.msgResponses)n.Any.encode(r,t.uint32(34).fork()).ldelim();return t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),a=void 0===t?r.len:r.pos+t,s=p();for(;r.pos>>3){case 1:s.data=r.bytes();break;case 2:s.log=r.string();break;case 3:s.events.push(i.Event.decode(r,r.uint32()));break;case 4:s.msgResponses.push(n.Any.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=p();return(0,a.isSet)(e.data)&&(t.data=(0,a.bytesFromBase64)(e.data)),(0,a.isSet)(e.log)&&(t.log=String(e.log)),Array.isArray(null==e?void 0:e.events)&&(t.events=e.events.map(e=>i.Event.fromJSON(e))),Array.isArray(null==e?void 0:e.msgResponses)&&(t.msgResponses=e.msgResponses.map(e=>n.Any.fromJSON(e))),t},toJSON(e){let t={};return void 0!==e.data&&(t.data=(0,a.base64FromBytes)(void 0!==e.data?e.data:new Uint8Array)),void 0!==e.log&&(t.log=e.log),e.events?t.events=e.events.map(e=>e?i.Event.toJSON(e):void 0):t.events=[],e.msgResponses?t.msgResponses=e.msgResponses.map(e=>e?n.Any.toJSON(e):void 0):t.msgResponses=[],t},fromPartial(e){var t,r,o,a;let s=p();return s.data=null!==(o=e.data)&&void 0!==o?o:new Uint8Array,s.log=null!==(a=e.log)&&void 0!==a?a:"",s.events=(null===(t=e.events)||void 0===t?void 0:t.map(e=>i.Event.fromPartial(e)))||[],s.msgResponses=(null===(r=e.msgResponses)||void 0===r?void 0:r.map(e=>n.Any.fromPartial(e)))||[],s}},t.SimulationResponse={typeUrl:"/cosmos.base.abci.v1beta1.SimulationResponse",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return void 0!==e.gasInfo&&t.GasInfo.encode(e.gasInfo,r.uint32(10).fork()).ldelim(),void 0!==e.result&&t.Result.encode(e.result,r.uint32(18).fork()).ldelim(),r},decode(e,r){let n=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===r?n.len:n.pos+r,a=f();for(;n.pos>>3){case 1:a.gasInfo=t.GasInfo.decode(n,n.uint32());break;case 2:a.result=t.Result.decode(n,n.uint32());break;default:n.skipType(7&e)}}return a},fromJSON(e){let r=f();return(0,a.isSet)(e.gasInfo)&&(r.gasInfo=t.GasInfo.fromJSON(e.gasInfo)),(0,a.isSet)(e.result)&&(r.result=t.Result.fromJSON(e.result)),r},toJSON(e){let r={};return void 0!==e.gasInfo&&(r.gasInfo=e.gasInfo?t.GasInfo.toJSON(e.gasInfo):void 0),void 0!==e.result&&(r.result=e.result?t.Result.toJSON(e.result):void 0),r},fromPartial(e){let r=f();return void 0!==e.gasInfo&&null!==e.gasInfo&&(r.gasInfo=t.GasInfo.fromPartial(e.gasInfo)),void 0!==e.result&&null!==e.result&&(r.result=t.Result.fromPartial(e.result)),r}},t.MsgData={typeUrl:"/cosmos.base.abci.v1beta1.MsgData",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.msgType&&t.uint32(10).string(e.msgType),0!==e.data.length&&t.uint32(18).bytes(e.data),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=h();for(;r.pos>>3){case 1:i.msgType=r.string();break;case 2:i.data=r.bytes();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=h();return(0,a.isSet)(e.msgType)&&(t.msgType=String(e.msgType)),(0,a.isSet)(e.data)&&(t.data=(0,a.bytesFromBase64)(e.data)),t},toJSON(e){let t={};return void 0!==e.msgType&&(t.msgType=e.msgType),void 0!==e.data&&(t.data=(0,a.base64FromBytes)(void 0!==e.data?e.data:new Uint8Array)),t},fromPartial(e){var t,r;let n=h();return n.msgType=null!==(t=e.msgType)&&void 0!==t?t:"",n.data=null!==(r=e.data)&&void 0!==r?r:new Uint8Array,n}},t.TxMsgData={typeUrl:"/cosmos.base.abci.v1beta1.TxMsgData",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let n of e.data)t.MsgData.encode(n,r.uint32(10).fork()).ldelim();for(let t of e.msgResponses)n.Any.encode(t,r.uint32(18).fork()).ldelim();return r},decode(e,r){let i=e instanceof o.BinaryReader?e:new o.BinaryReader(e),a=void 0===r?i.len:i.pos+r,s=g();for(;i.pos>>3){case 1:s.data.push(t.MsgData.decode(i,i.uint32()));break;case 2:s.msgResponses.push(n.Any.decode(i,i.uint32()));break;default:i.skipType(7&e)}}return s},fromJSON(e){let r=g();return Array.isArray(null==e?void 0:e.data)&&(r.data=e.data.map(e=>t.MsgData.fromJSON(e))),Array.isArray(null==e?void 0:e.msgResponses)&&(r.msgResponses=e.msgResponses.map(e=>n.Any.fromJSON(e))),r},toJSON(e){let r={};return e.data?r.data=e.data.map(e=>e?t.MsgData.toJSON(e):void 0):r.data=[],e.msgResponses?r.msgResponses=e.msgResponses.map(e=>e?n.Any.toJSON(e):void 0):r.msgResponses=[],r},fromPartial(e){var r,i;let o=g();return o.data=(null===(r=e.data)||void 0===r?void 0:r.map(e=>t.MsgData.fromPartial(e)))||[],o.msgResponses=(null===(i=e.msgResponses)||void 0===i?void 0:i.map(e=>n.Any.fromPartial(e)))||[],o}},t.SearchTxsResult={typeUrl:"/cosmos.base.abci.v1beta1.SearchTxsResult",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let n of(e.totalCount!==BigInt(0)&&r.uint32(8).uint64(e.totalCount),e.count!==BigInt(0)&&r.uint32(16).uint64(e.count),e.pageNumber!==BigInt(0)&&r.uint32(24).uint64(e.pageNumber),e.pageTotal!==BigInt(0)&&r.uint32(32).uint64(e.pageTotal),e.limit!==BigInt(0)&&r.uint32(40).uint64(e.limit),e.txs))t.TxResponse.encode(n,r.uint32(50).fork()).ldelim();return r},decode(e,r){let n=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===r?n.len:n.pos+r,a=m();for(;n.pos>>3){case 1:a.totalCount=n.uint64();break;case 2:a.count=n.uint64();break;case 3:a.pageNumber=n.uint64();break;case 4:a.pageTotal=n.uint64();break;case 5:a.limit=n.uint64();break;case 6:a.txs.push(t.TxResponse.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return a},fromJSON(e){let r=m();return(0,a.isSet)(e.totalCount)&&(r.totalCount=BigInt(e.totalCount.toString())),(0,a.isSet)(e.count)&&(r.count=BigInt(e.count.toString())),(0,a.isSet)(e.pageNumber)&&(r.pageNumber=BigInt(e.pageNumber.toString())),(0,a.isSet)(e.pageTotal)&&(r.pageTotal=BigInt(e.pageTotal.toString())),(0,a.isSet)(e.limit)&&(r.limit=BigInt(e.limit.toString())),Array.isArray(null==e?void 0:e.txs)&&(r.txs=e.txs.map(e=>t.TxResponse.fromJSON(e))),r},toJSON(e){let r={};return void 0!==e.totalCount&&(r.totalCount=(e.totalCount||BigInt(0)).toString()),void 0!==e.count&&(r.count=(e.count||BigInt(0)).toString()),void 0!==e.pageNumber&&(r.pageNumber=(e.pageNumber||BigInt(0)).toString()),void 0!==e.pageTotal&&(r.pageTotal=(e.pageTotal||BigInt(0)).toString()),void 0!==e.limit&&(r.limit=(e.limit||BigInt(0)).toString()),e.txs?r.txs=e.txs.map(e=>e?t.TxResponse.toJSON(e):void 0):r.txs=[],r},fromPartial(e){var r;let n=m();return void 0!==e.totalCount&&null!==e.totalCount&&(n.totalCount=BigInt(e.totalCount.toString())),void 0!==e.count&&null!==e.count&&(n.count=BigInt(e.count.toString())),void 0!==e.pageNumber&&null!==e.pageNumber&&(n.pageNumber=BigInt(e.pageNumber.toString())),void 0!==e.pageTotal&&null!==e.pageTotal&&(n.pageTotal=BigInt(e.pageTotal.toString())),void 0!==e.limit&&null!==e.limit&&(n.limit=BigInt(e.limit.toString())),n.txs=(null===(r=e.txs)||void 0===r?void 0:r.map(e=>t.TxResponse.fromPartial(e)))||[],n}}},86141:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PageResponse=t.PageRequest=t.protobufPackage=void 0;let n=r(46554),i=r(99133);function o(){return{key:new Uint8Array,offset:BigInt(0),limit:BigInt(0),countTotal:!1,reverse:!1}}function a(){return{nextKey:new Uint8Array,total:BigInt(0)}}t.protobufPackage="cosmos.base.query.v1beta1",t.PageRequest={typeUrl:"/cosmos.base.query.v1beta1.PageRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.BinaryWriter.create();return 0!==e.key.length&&t.uint32(10).bytes(e.key),e.offset!==BigInt(0)&&t.uint32(16).uint64(e.offset),e.limit!==BigInt(0)&&t.uint32(24).uint64(e.limit),!0===e.countTotal&&t.uint32(32).bool(e.countTotal),!0===e.reverse&&t.uint32(40).bool(e.reverse),t},decode(e,t){let r=e instanceof n.BinaryReader?e:new n.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=o();for(;r.pos>>3){case 1:a.key=r.bytes();break;case 2:a.offset=r.uint64();break;case 3:a.limit=r.uint64();break;case 4:a.countTotal=r.bool();break;case 5:a.reverse=r.bool();break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=o();return(0,i.isSet)(e.key)&&(t.key=(0,i.bytesFromBase64)(e.key)),(0,i.isSet)(e.offset)&&(t.offset=BigInt(e.offset.toString())),(0,i.isSet)(e.limit)&&(t.limit=BigInt(e.limit.toString())),(0,i.isSet)(e.countTotal)&&(t.countTotal=!!e.countTotal),(0,i.isSet)(e.reverse)&&(t.reverse=!!e.reverse),t},toJSON(e){let t={};return void 0!==e.key&&(t.key=(0,i.base64FromBytes)(void 0!==e.key?e.key:new Uint8Array)),void 0!==e.offset&&(t.offset=(e.offset||BigInt(0)).toString()),void 0!==e.limit&&(t.limit=(e.limit||BigInt(0)).toString()),void 0!==e.countTotal&&(t.countTotal=e.countTotal),void 0!==e.reverse&&(t.reverse=e.reverse),t},fromPartial(e){var t,r,n;let i=o();return i.key=null!==(t=e.key)&&void 0!==t?t:new Uint8Array,void 0!==e.offset&&null!==e.offset&&(i.offset=BigInt(e.offset.toString())),void 0!==e.limit&&null!==e.limit&&(i.limit=BigInt(e.limit.toString())),i.countTotal=null!==(r=e.countTotal)&&void 0!==r&&r,i.reverse=null!==(n=e.reverse)&&void 0!==n&&n,i}},t.PageResponse={typeUrl:"/cosmos.base.query.v1beta1.PageResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.BinaryWriter.create();return 0!==e.nextKey.length&&t.uint32(10).bytes(e.nextKey),e.total!==BigInt(0)&&t.uint32(16).uint64(e.total),t},decode(e,t){let r=e instanceof n.BinaryReader?e:new n.BinaryReader(e),i=void 0===t?r.len:r.pos+t,o=a();for(;r.pos>>3){case 1:o.nextKey=r.bytes();break;case 2:o.total=r.uint64();break;default:r.skipType(7&e)}}return o},fromJSON(e){let t=a();return(0,i.isSet)(e.nextKey)&&(t.nextKey=(0,i.bytesFromBase64)(e.nextKey)),(0,i.isSet)(e.total)&&(t.total=BigInt(e.total.toString())),t},toJSON(e){let t={};return void 0!==e.nextKey&&(t.nextKey=(0,i.base64FromBytes)(void 0!==e.nextKey?e.nextKey:new Uint8Array)),void 0!==e.total&&(t.total=(e.total||BigInt(0)).toString()),t},fromPartial(e){var t;let r=a();return r.nextKey=null!==(t=e.nextKey)&&void 0!==t?t:new Uint8Array,void 0!==e.total&&null!==e.total&&(r.total=BigInt(e.total.toString())),r}}},14841:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DecProto=t.IntProto=t.DecCoin=t.Coin=t.protobufPackage=void 0;let n=r(46554),i=r(99133);function o(){return{denom:"",amount:""}}function a(){return{denom:"",amount:""}}function s(){return{int:""}}function l(){return{dec:""}}t.protobufPackage="cosmos.base.v1beta1",t.Coin={typeUrl:"/cosmos.base.v1beta1.Coin",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.BinaryWriter.create();return""!==e.denom&&t.uint32(10).string(e.denom),""!==e.amount&&t.uint32(18).string(e.amount),t},decode(e,t){let r=e instanceof n.BinaryReader?e:new n.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=o();for(;r.pos>>3){case 1:a.denom=r.string();break;case 2:a.amount=r.string();break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=o();return(0,i.isSet)(e.denom)&&(t.denom=String(e.denom)),(0,i.isSet)(e.amount)&&(t.amount=String(e.amount)),t},toJSON(e){let t={};return void 0!==e.denom&&(t.denom=e.denom),void 0!==e.amount&&(t.amount=e.amount),t},fromPartial(e){var t,r;let n=o();return n.denom=null!==(t=e.denom)&&void 0!==t?t:"",n.amount=null!==(r=e.amount)&&void 0!==r?r:"",n}},t.DecCoin={typeUrl:"/cosmos.base.v1beta1.DecCoin",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.BinaryWriter.create();return""!==e.denom&&t.uint32(10).string(e.denom),""!==e.amount&&t.uint32(18).string(e.amount),t},decode(e,t){let r=e instanceof n.BinaryReader?e:new n.BinaryReader(e),i=void 0===t?r.len:r.pos+t,o=a();for(;r.pos>>3){case 1:o.denom=r.string();break;case 2:o.amount=r.string();break;default:r.skipType(7&e)}}return o},fromJSON(e){let t=a();return(0,i.isSet)(e.denom)&&(t.denom=String(e.denom)),(0,i.isSet)(e.amount)&&(t.amount=String(e.amount)),t},toJSON(e){let t={};return void 0!==e.denom&&(t.denom=e.denom),void 0!==e.amount&&(t.amount=e.amount),t},fromPartial(e){var t,r;let n=a();return n.denom=null!==(t=e.denom)&&void 0!==t?t:"",n.amount=null!==(r=e.amount)&&void 0!==r?r:"",n}},t.IntProto={typeUrl:"/cosmos.base.v1beta1.IntProto",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.BinaryWriter.create();return""!==e.int&&t.uint32(10).string(e.int),t},decode(e,t){let r=e instanceof n.BinaryReader?e:new n.BinaryReader(e),i=void 0===t?r.len:r.pos+t,o=s();for(;r.pos>>3==1?o.int=r.string():r.skipType(7&e)}return o},fromJSON(e){let t=s();return(0,i.isSet)(e.int)&&(t.int=String(e.int)),t},toJSON(e){let t={};return void 0!==e.int&&(t.int=e.int),t},fromPartial(e){var t;let r=s();return r.int=null!==(t=e.int)&&void 0!==t?t:"",r}},t.DecProto={typeUrl:"/cosmos.base.v1beta1.DecProto",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.BinaryWriter.create();return""!==e.dec&&t.uint32(10).string(e.dec),t},decode(e,t){let r=e instanceof n.BinaryReader?e:new n.BinaryReader(e),i=void 0===t?r.len:r.pos+t,o=l();for(;r.pos>>3==1?o.dec=r.string():r.skipType(7&e)}return o},fromJSON(e){let t=l();return(0,i.isSet)(e.dec)&&(t.dec=String(e.dec)),t},toJSON(e){let t={};return void 0!==e.dec&&(t.dec=e.dec),t},fromPartial(e){var t;let r=l();return r.dec=null!==(t=e.dec)&&void 0!==t?t:"",r}}},61010:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PrivKey=t.PubKey=t.protobufPackage=void 0;let n=r(46554),i=r(99133);function o(){return{key:new Uint8Array}}function a(){return{key:new Uint8Array}}t.protobufPackage="cosmos.crypto.ed25519",t.PubKey={typeUrl:"/cosmos.crypto.ed25519.PubKey",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.BinaryWriter.create();return 0!==e.key.length&&t.uint32(10).bytes(e.key),t},decode(e,t){let r=e instanceof n.BinaryReader?e:new n.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=o();for(;r.pos>>3==1?a.key=r.bytes():r.skipType(7&e)}return a},fromJSON(e){let t=o();return(0,i.isSet)(e.key)&&(t.key=(0,i.bytesFromBase64)(e.key)),t},toJSON(e){let t={};return void 0!==e.key&&(t.key=(0,i.base64FromBytes)(void 0!==e.key?e.key:new Uint8Array)),t},fromPartial(e){var t;let r=o();return r.key=null!==(t=e.key)&&void 0!==t?t:new Uint8Array,r}},t.PrivKey={typeUrl:"/cosmos.crypto.ed25519.PrivKey",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.BinaryWriter.create();return 0!==e.key.length&&t.uint32(10).bytes(e.key),t},decode(e,t){let r=e instanceof n.BinaryReader?e:new n.BinaryReader(e),i=void 0===t?r.len:r.pos+t,o=a();for(;r.pos>>3==1?o.key=r.bytes():r.skipType(7&e)}return o},fromJSON(e){let t=a();return(0,i.isSet)(e.key)&&(t.key=(0,i.bytesFromBase64)(e.key)),t},toJSON(e){let t={};return void 0!==e.key&&(t.key=(0,i.base64FromBytes)(void 0!==e.key?e.key:new Uint8Array)),t},fromPartial(e){var t;let r=a();return r.key=null!==(t=e.key)&&void 0!==t?t:new Uint8Array,r}}},56907:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LegacyAminoPubKey=t.protobufPackage=void 0;let n=r(11879),i=r(46554),o=r(99133);function a(){return{threshold:0,publicKeys:[]}}t.protobufPackage="cosmos.crypto.multisig",t.LegacyAminoPubKey={typeUrl:"/cosmos.crypto.multisig.LegacyAminoPubKey",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();for(let r of(0!==e.threshold&&t.uint32(8).uint32(e.threshold),e.publicKeys))n.Any.encode(r,t.uint32(18).fork()).ldelim();return t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),o=void 0===t?r.len:r.pos+t,s=a();for(;r.pos>>3){case 1:s.threshold=r.uint32();break;case 2:s.publicKeys.push(n.Any.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=a();return(0,o.isSet)(e.threshold)&&(t.threshold=Number(e.threshold)),Array.isArray(null==e?void 0:e.publicKeys)&&(t.publicKeys=e.publicKeys.map(e=>n.Any.fromJSON(e))),t},toJSON(e){let t={};return void 0!==e.threshold&&(t.threshold=Math.round(e.threshold)),e.publicKeys?t.publicKeys=e.publicKeys.map(e=>e?n.Any.toJSON(e):void 0):t.publicKeys=[],t},fromPartial(e){var t,r;let i=a();return i.threshold=null!==(r=e.threshold)&&void 0!==r?r:0,i.publicKeys=(null===(t=e.publicKeys)||void 0===t?void 0:t.map(e=>n.Any.fromPartial(e)))||[],i}}},50263:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CompactBitArray=t.MultiSignature=t.protobufPackage=void 0;let n=r(46554),i=r(99133);function o(){return{signatures:[]}}function a(){return{extraBitsStored:0,elems:new Uint8Array}}t.protobufPackage="cosmos.crypto.multisig.v1beta1",t.MultiSignature={typeUrl:"/cosmos.crypto.multisig.v1beta1.MultiSignature",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.BinaryWriter.create();for(let r of e.signatures)t.uint32(10).bytes(r);return t},decode(e,t){let r=e instanceof n.BinaryReader?e:new n.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=o();for(;r.pos>>3==1?a.signatures.push(r.bytes()):r.skipType(7&e)}return a},fromJSON(e){let t=o();return Array.isArray(null==e?void 0:e.signatures)&&(t.signatures=e.signatures.map(e=>(0,i.bytesFromBase64)(e))),t},toJSON(e){let t={};return e.signatures?t.signatures=e.signatures.map(e=>(0,i.base64FromBytes)(void 0!==e?e:new Uint8Array)):t.signatures=[],t},fromPartial(e){var t;let r=o();return r.signatures=(null===(t=e.signatures)||void 0===t?void 0:t.map(e=>e))||[],r}},t.CompactBitArray={typeUrl:"/cosmos.crypto.multisig.v1beta1.CompactBitArray",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.BinaryWriter.create();return 0!==e.extraBitsStored&&t.uint32(8).uint32(e.extraBitsStored),0!==e.elems.length&&t.uint32(18).bytes(e.elems),t},decode(e,t){let r=e instanceof n.BinaryReader?e:new n.BinaryReader(e),i=void 0===t?r.len:r.pos+t,o=a();for(;r.pos>>3){case 1:o.extraBitsStored=r.uint32();break;case 2:o.elems=r.bytes();break;default:r.skipType(7&e)}}return o},fromJSON(e){let t=a();return(0,i.isSet)(e.extraBitsStored)&&(t.extraBitsStored=Number(e.extraBitsStored)),(0,i.isSet)(e.elems)&&(t.elems=(0,i.bytesFromBase64)(e.elems)),t},toJSON(e){let t={};return void 0!==e.extraBitsStored&&(t.extraBitsStored=Math.round(e.extraBitsStored)),void 0!==e.elems&&(t.elems=(0,i.base64FromBytes)(void 0!==e.elems?e.elems:new Uint8Array)),t},fromPartial(e){var t,r;let n=a();return n.extraBitsStored=null!==(t=e.extraBitsStored)&&void 0!==t?t:0,n.elems=null!==(r=e.elems)&&void 0!==r?r:new Uint8Array,n}}},57622:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PrivKey=t.PubKey=t.protobufPackage=void 0;let n=r(46554),i=r(99133);function o(){return{key:new Uint8Array}}function a(){return{key:new Uint8Array}}t.protobufPackage="cosmos.crypto.secp256k1",t.PubKey={typeUrl:"/cosmos.crypto.secp256k1.PubKey",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.BinaryWriter.create();return 0!==e.key.length&&t.uint32(10).bytes(e.key),t},decode(e,t){let r=e instanceof n.BinaryReader?e:new n.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=o();for(;r.pos>>3==1?a.key=r.bytes():r.skipType(7&e)}return a},fromJSON(e){let t=o();return(0,i.isSet)(e.key)&&(t.key=(0,i.bytesFromBase64)(e.key)),t},toJSON(e){let t={};return void 0!==e.key&&(t.key=(0,i.base64FromBytes)(void 0!==e.key?e.key:new Uint8Array)),t},fromPartial(e){var t;let r=o();return r.key=null!==(t=e.key)&&void 0!==t?t:new Uint8Array,r}},t.PrivKey={typeUrl:"/cosmos.crypto.secp256k1.PrivKey",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.BinaryWriter.create();return 0!==e.key.length&&t.uint32(10).bytes(e.key),t},decode(e,t){let r=e instanceof n.BinaryReader?e:new n.BinaryReader(e),i=void 0===t?r.len:r.pos+t,o=a();for(;r.pos>>3==1?o.key=r.bytes():r.skipType(7&e)}return o},fromJSON(e){let t=a();return(0,i.isSet)(e.key)&&(t.key=(0,i.bytesFromBase64)(e.key)),t},toJSON(e){let t={};return void 0!==e.key&&(t.key=(0,i.base64FromBytes)(void 0!==e.key?e.key:new Uint8Array)),t},fromPartial(e){var t;let r=a();return r.key=null!==(t=e.key)&&void 0!==t?t:new Uint8Array,r}}},92312:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CommunityPoolSpendProposalWithDeposit=t.DelegationDelegatorReward=t.DelegatorStartingInfo=t.CommunityPoolSpendProposal=t.FeePool=t.ValidatorSlashEvents=t.ValidatorSlashEvent=t.ValidatorOutstandingRewards=t.ValidatorAccumulatedCommission=t.ValidatorCurrentRewards=t.ValidatorHistoricalRewards=t.Params=t.protobufPackage=void 0;let n=r(14841),i=r(46554),o=r(99133);function a(){return{communityTax:"",baseProposerReward:"",bonusProposerReward:"",withdrawAddrEnabled:!1}}function s(){return{cumulativeRewardRatio:[],referenceCount:0}}function l(){return{rewards:[],period:BigInt(0)}}function u(){return{commission:[]}}function d(){return{rewards:[]}}function c(){return{validatorPeriod:BigInt(0),fraction:""}}function p(){return{validatorSlashEvents:[]}}function f(){return{communityPool:[]}}function h(){return{title:"",description:"",recipient:"",amount:[]}}function g(){return{previousPeriod:BigInt(0),stake:"",height:BigInt(0)}}function m(){return{validatorAddress:"",reward:[]}}function y(){return{title:"",description:"",recipient:"",amount:"",deposit:""}}t.protobufPackage="cosmos.distribution.v1beta1",t.Params={typeUrl:"/cosmos.distribution.v1beta1.Params",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();return""!==e.communityTax&&t.uint32(10).string(e.communityTax),""!==e.baseProposerReward&&t.uint32(18).string(e.baseProposerReward),""!==e.bonusProposerReward&&t.uint32(26).string(e.bonusProposerReward),!0===e.withdrawAddrEnabled&&t.uint32(32).bool(e.withdrawAddrEnabled),t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=a();for(;r.pos>>3){case 1:o.communityTax=r.string();break;case 2:o.baseProposerReward=r.string();break;case 3:o.bonusProposerReward=r.string();break;case 4:o.withdrawAddrEnabled=r.bool();break;default:r.skipType(7&e)}}return o},fromJSON(e){let t=a();return(0,o.isSet)(e.communityTax)&&(t.communityTax=String(e.communityTax)),(0,o.isSet)(e.baseProposerReward)&&(t.baseProposerReward=String(e.baseProposerReward)),(0,o.isSet)(e.bonusProposerReward)&&(t.bonusProposerReward=String(e.bonusProposerReward)),(0,o.isSet)(e.withdrawAddrEnabled)&&(t.withdrawAddrEnabled=!!e.withdrawAddrEnabled),t},toJSON(e){let t={};return void 0!==e.communityTax&&(t.communityTax=e.communityTax),void 0!==e.baseProposerReward&&(t.baseProposerReward=e.baseProposerReward),void 0!==e.bonusProposerReward&&(t.bonusProposerReward=e.bonusProposerReward),void 0!==e.withdrawAddrEnabled&&(t.withdrawAddrEnabled=e.withdrawAddrEnabled),t},fromPartial(e){var t,r,n,i;let o=a();return o.communityTax=null!==(t=e.communityTax)&&void 0!==t?t:"",o.baseProposerReward=null!==(r=e.baseProposerReward)&&void 0!==r?r:"",o.bonusProposerReward=null!==(n=e.bonusProposerReward)&&void 0!==n?n:"",o.withdrawAddrEnabled=null!==(i=e.withdrawAddrEnabled)&&void 0!==i&&i,o}},t.ValidatorHistoricalRewards={typeUrl:"/cosmos.distribution.v1beta1.ValidatorHistoricalRewards",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();for(let r of e.cumulativeRewardRatio)n.DecCoin.encode(r,t.uint32(10).fork()).ldelim();return 0!==e.referenceCount&&t.uint32(16).uint32(e.referenceCount),t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),o=void 0===t?r.len:r.pos+t,a=s();for(;r.pos>>3){case 1:a.cumulativeRewardRatio.push(n.DecCoin.decode(r,r.uint32()));break;case 2:a.referenceCount=r.uint32();break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=s();return Array.isArray(null==e?void 0:e.cumulativeRewardRatio)&&(t.cumulativeRewardRatio=e.cumulativeRewardRatio.map(e=>n.DecCoin.fromJSON(e))),(0,o.isSet)(e.referenceCount)&&(t.referenceCount=Number(e.referenceCount)),t},toJSON(e){let t={};return e.cumulativeRewardRatio?t.cumulativeRewardRatio=e.cumulativeRewardRatio.map(e=>e?n.DecCoin.toJSON(e):void 0):t.cumulativeRewardRatio=[],void 0!==e.referenceCount&&(t.referenceCount=Math.round(e.referenceCount)),t},fromPartial(e){var t,r;let i=s();return i.cumulativeRewardRatio=(null===(t=e.cumulativeRewardRatio)||void 0===t?void 0:t.map(e=>n.DecCoin.fromPartial(e)))||[],i.referenceCount=null!==(r=e.referenceCount)&&void 0!==r?r:0,i}},t.ValidatorCurrentRewards={typeUrl:"/cosmos.distribution.v1beta1.ValidatorCurrentRewards",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();for(let r of e.rewards)n.DecCoin.encode(r,t.uint32(10).fork()).ldelim();return e.period!==BigInt(0)&&t.uint32(16).uint64(e.period),t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),o=void 0===t?r.len:r.pos+t,a=l();for(;r.pos>>3){case 1:a.rewards.push(n.DecCoin.decode(r,r.uint32()));break;case 2:a.period=r.uint64();break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=l();return Array.isArray(null==e?void 0:e.rewards)&&(t.rewards=e.rewards.map(e=>n.DecCoin.fromJSON(e))),(0,o.isSet)(e.period)&&(t.period=BigInt(e.period.toString())),t},toJSON(e){let t={};return e.rewards?t.rewards=e.rewards.map(e=>e?n.DecCoin.toJSON(e):void 0):t.rewards=[],void 0!==e.period&&(t.period=(e.period||BigInt(0)).toString()),t},fromPartial(e){var t;let r=l();return r.rewards=(null===(t=e.rewards)||void 0===t?void 0:t.map(e=>n.DecCoin.fromPartial(e)))||[],void 0!==e.period&&null!==e.period&&(r.period=BigInt(e.period.toString())),r}},t.ValidatorAccumulatedCommission={typeUrl:"/cosmos.distribution.v1beta1.ValidatorAccumulatedCommission",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();for(let r of e.commission)n.DecCoin.encode(r,t.uint32(10).fork()).ldelim();return t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),o=void 0===t?r.len:r.pos+t,a=u();for(;r.pos>>3==1?a.commission.push(n.DecCoin.decode(r,r.uint32())):r.skipType(7&e)}return a},fromJSON(e){let t=u();return Array.isArray(null==e?void 0:e.commission)&&(t.commission=e.commission.map(e=>n.DecCoin.fromJSON(e))),t},toJSON(e){let t={};return e.commission?t.commission=e.commission.map(e=>e?n.DecCoin.toJSON(e):void 0):t.commission=[],t},fromPartial(e){var t;let r=u();return r.commission=(null===(t=e.commission)||void 0===t?void 0:t.map(e=>n.DecCoin.fromPartial(e)))||[],r}},t.ValidatorOutstandingRewards={typeUrl:"/cosmos.distribution.v1beta1.ValidatorOutstandingRewards",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();for(let r of e.rewards)n.DecCoin.encode(r,t.uint32(10).fork()).ldelim();return t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),o=void 0===t?r.len:r.pos+t,a=d();for(;r.pos>>3==1?a.rewards.push(n.DecCoin.decode(r,r.uint32())):r.skipType(7&e)}return a},fromJSON(e){let t=d();return Array.isArray(null==e?void 0:e.rewards)&&(t.rewards=e.rewards.map(e=>n.DecCoin.fromJSON(e))),t},toJSON(e){let t={};return e.rewards?t.rewards=e.rewards.map(e=>e?n.DecCoin.toJSON(e):void 0):t.rewards=[],t},fromPartial(e){var t;let r=d();return r.rewards=(null===(t=e.rewards)||void 0===t?void 0:t.map(e=>n.DecCoin.fromPartial(e)))||[],r}},t.ValidatorSlashEvent={typeUrl:"/cosmos.distribution.v1beta1.ValidatorSlashEvent",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();return e.validatorPeriod!==BigInt(0)&&t.uint32(8).uint64(e.validatorPeriod),""!==e.fraction&&t.uint32(18).string(e.fraction),t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=c();for(;r.pos>>3){case 1:o.validatorPeriod=r.uint64();break;case 2:o.fraction=r.string();break;default:r.skipType(7&e)}}return o},fromJSON(e){let t=c();return(0,o.isSet)(e.validatorPeriod)&&(t.validatorPeriod=BigInt(e.validatorPeriod.toString())),(0,o.isSet)(e.fraction)&&(t.fraction=String(e.fraction)),t},toJSON(e){let t={};return void 0!==e.validatorPeriod&&(t.validatorPeriod=(e.validatorPeriod||BigInt(0)).toString()),void 0!==e.fraction&&(t.fraction=e.fraction),t},fromPartial(e){var t;let r=c();return void 0!==e.validatorPeriod&&null!==e.validatorPeriod&&(r.validatorPeriod=BigInt(e.validatorPeriod.toString())),r.fraction=null!==(t=e.fraction)&&void 0!==t?t:"",r}},t.ValidatorSlashEvents={typeUrl:"/cosmos.distribution.v1beta1.ValidatorSlashEvents",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();for(let n of e.validatorSlashEvents)t.ValidatorSlashEvent.encode(n,r.uint32(10).fork()).ldelim();return r},decode(e,r){let n=e instanceof i.BinaryReader?e:new i.BinaryReader(e),o=void 0===r?n.len:n.pos+r,a=p();for(;n.pos>>3==1?a.validatorSlashEvents.push(t.ValidatorSlashEvent.decode(n,n.uint32())):n.skipType(7&e)}return a},fromJSON(e){let r=p();return Array.isArray(null==e?void 0:e.validatorSlashEvents)&&(r.validatorSlashEvents=e.validatorSlashEvents.map(e=>t.ValidatorSlashEvent.fromJSON(e))),r},toJSON(e){let r={};return e.validatorSlashEvents?r.validatorSlashEvents=e.validatorSlashEvents.map(e=>e?t.ValidatorSlashEvent.toJSON(e):void 0):r.validatorSlashEvents=[],r},fromPartial(e){var r;let n=p();return n.validatorSlashEvents=(null===(r=e.validatorSlashEvents)||void 0===r?void 0:r.map(e=>t.ValidatorSlashEvent.fromPartial(e)))||[],n}},t.FeePool={typeUrl:"/cosmos.distribution.v1beta1.FeePool",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();for(let r of e.communityPool)n.DecCoin.encode(r,t.uint32(10).fork()).ldelim();return t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),o=void 0===t?r.len:r.pos+t,a=f();for(;r.pos>>3==1?a.communityPool.push(n.DecCoin.decode(r,r.uint32())):r.skipType(7&e)}return a},fromJSON(e){let t=f();return Array.isArray(null==e?void 0:e.communityPool)&&(t.communityPool=e.communityPool.map(e=>n.DecCoin.fromJSON(e))),t},toJSON(e){let t={};return e.communityPool?t.communityPool=e.communityPool.map(e=>e?n.DecCoin.toJSON(e):void 0):t.communityPool=[],t},fromPartial(e){var t;let r=f();return r.communityPool=(null===(t=e.communityPool)||void 0===t?void 0:t.map(e=>n.DecCoin.fromPartial(e)))||[],r}},t.CommunityPoolSpendProposal={typeUrl:"/cosmos.distribution.v1beta1.CommunityPoolSpendProposal",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();for(let r of(""!==e.title&&t.uint32(10).string(e.title),""!==e.description&&t.uint32(18).string(e.description),""!==e.recipient&&t.uint32(26).string(e.recipient),e.amount))n.Coin.encode(r,t.uint32(34).fork()).ldelim();return t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),o=void 0===t?r.len:r.pos+t,a=h();for(;r.pos>>3){case 1:a.title=r.string();break;case 2:a.description=r.string();break;case 3:a.recipient=r.string();break;case 4:a.amount.push(n.Coin.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=h();return(0,o.isSet)(e.title)&&(t.title=String(e.title)),(0,o.isSet)(e.description)&&(t.description=String(e.description)),(0,o.isSet)(e.recipient)&&(t.recipient=String(e.recipient)),Array.isArray(null==e?void 0:e.amount)&&(t.amount=e.amount.map(e=>n.Coin.fromJSON(e))),t},toJSON(e){let t={};return void 0!==e.title&&(t.title=e.title),void 0!==e.description&&(t.description=e.description),void 0!==e.recipient&&(t.recipient=e.recipient),e.amount?t.amount=e.amount.map(e=>e?n.Coin.toJSON(e):void 0):t.amount=[],t},fromPartial(e){var t,r,i,o;let a=h();return a.title=null!==(r=e.title)&&void 0!==r?r:"",a.description=null!==(i=e.description)&&void 0!==i?i:"",a.recipient=null!==(o=e.recipient)&&void 0!==o?o:"",a.amount=(null===(t=e.amount)||void 0===t?void 0:t.map(e=>n.Coin.fromPartial(e)))||[],a}},t.DelegatorStartingInfo={typeUrl:"/cosmos.distribution.v1beta1.DelegatorStartingInfo",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();return e.previousPeriod!==BigInt(0)&&t.uint32(8).uint64(e.previousPeriod),""!==e.stake&&t.uint32(18).string(e.stake),e.height!==BigInt(0)&&t.uint32(24).uint64(e.height),t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=g();for(;r.pos>>3){case 1:o.previousPeriod=r.uint64();break;case 2:o.stake=r.string();break;case 3:o.height=r.uint64();break;default:r.skipType(7&e)}}return o},fromJSON(e){let t=g();return(0,o.isSet)(e.previousPeriod)&&(t.previousPeriod=BigInt(e.previousPeriod.toString())),(0,o.isSet)(e.stake)&&(t.stake=String(e.stake)),(0,o.isSet)(e.height)&&(t.height=BigInt(e.height.toString())),t},toJSON(e){let t={};return void 0!==e.previousPeriod&&(t.previousPeriod=(e.previousPeriod||BigInt(0)).toString()),void 0!==e.stake&&(t.stake=e.stake),void 0!==e.height&&(t.height=(e.height||BigInt(0)).toString()),t},fromPartial(e){var t;let r=g();return void 0!==e.previousPeriod&&null!==e.previousPeriod&&(r.previousPeriod=BigInt(e.previousPeriod.toString())),r.stake=null!==(t=e.stake)&&void 0!==t?t:"",void 0!==e.height&&null!==e.height&&(r.height=BigInt(e.height.toString())),r}},t.DelegationDelegatorReward={typeUrl:"/cosmos.distribution.v1beta1.DelegationDelegatorReward",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();for(let r of(""!==e.validatorAddress&&t.uint32(10).string(e.validatorAddress),e.reward))n.DecCoin.encode(r,t.uint32(18).fork()).ldelim();return t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),o=void 0===t?r.len:r.pos+t,a=m();for(;r.pos>>3){case 1:a.validatorAddress=r.string();break;case 2:a.reward.push(n.DecCoin.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=m();return(0,o.isSet)(e.validatorAddress)&&(t.validatorAddress=String(e.validatorAddress)),Array.isArray(null==e?void 0:e.reward)&&(t.reward=e.reward.map(e=>n.DecCoin.fromJSON(e))),t},toJSON(e){let t={};return void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),e.reward?t.reward=e.reward.map(e=>e?n.DecCoin.toJSON(e):void 0):t.reward=[],t},fromPartial(e){var t,r;let i=m();return i.validatorAddress=null!==(r=e.validatorAddress)&&void 0!==r?r:"",i.reward=(null===(t=e.reward)||void 0===t?void 0:t.map(e=>n.DecCoin.fromPartial(e)))||[],i}},t.CommunityPoolSpendProposalWithDeposit={typeUrl:"/cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();return""!==e.title&&t.uint32(10).string(e.title),""!==e.description&&t.uint32(18).string(e.description),""!==e.recipient&&t.uint32(26).string(e.recipient),""!==e.amount&&t.uint32(34).string(e.amount),""!==e.deposit&&t.uint32(42).string(e.deposit),t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=y();for(;r.pos>>3){case 1:o.title=r.string();break;case 2:o.description=r.string();break;case 3:o.recipient=r.string();break;case 4:o.amount=r.string();break;case 5:o.deposit=r.string();break;default:r.skipType(7&e)}}return o},fromJSON(e){let t=y();return(0,o.isSet)(e.title)&&(t.title=String(e.title)),(0,o.isSet)(e.description)&&(t.description=String(e.description)),(0,o.isSet)(e.recipient)&&(t.recipient=String(e.recipient)),(0,o.isSet)(e.amount)&&(t.amount=String(e.amount)),(0,o.isSet)(e.deposit)&&(t.deposit=String(e.deposit)),t},toJSON(e){let t={};return void 0!==e.title&&(t.title=e.title),void 0!==e.description&&(t.description=e.description),void 0!==e.recipient&&(t.recipient=e.recipient),void 0!==e.amount&&(t.amount=e.amount),void 0!==e.deposit&&(t.deposit=e.deposit),t},fromPartial(e){var t,r,n,i,o;let a=y();return a.title=null!==(t=e.title)&&void 0!==t?t:"",a.description=null!==(r=e.description)&&void 0!==r?r:"",a.recipient=null!==(n=e.recipient)&&void 0!==n?n:"",a.amount=null!==(i=e.amount)&&void 0!==i?i:"",a.deposit=null!==(o=e.deposit)&&void 0!==o?o:"",a}}},91029:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QueryClientImpl=t.QueryCommunityPoolResponse=t.QueryCommunityPoolRequest=t.QueryDelegatorWithdrawAddressResponse=t.QueryDelegatorWithdrawAddressRequest=t.QueryDelegatorValidatorsResponse=t.QueryDelegatorValidatorsRequest=t.QueryDelegationTotalRewardsResponse=t.QueryDelegationTotalRewardsRequest=t.QueryDelegationRewardsResponse=t.QueryDelegationRewardsRequest=t.QueryValidatorSlashesResponse=t.QueryValidatorSlashesRequest=t.QueryValidatorCommissionResponse=t.QueryValidatorCommissionRequest=t.QueryValidatorOutstandingRewardsResponse=t.QueryValidatorOutstandingRewardsRequest=t.QueryValidatorDistributionInfoResponse=t.QueryValidatorDistributionInfoRequest=t.QueryParamsResponse=t.QueryParamsRequest=t.protobufPackage=void 0;let n=r(86141),i=r(92312),o=r(14841),a=r(46554),s=r(99133);function l(){return{}}function u(){return{params:i.Params.fromPartial({})}}function d(){return{validatorAddress:""}}function c(){return{operatorAddress:"",selfBondRewards:[],commission:[]}}function p(){return{validatorAddress:""}}function f(){return{rewards:i.ValidatorOutstandingRewards.fromPartial({})}}function h(){return{validatorAddress:""}}function g(){return{commission:i.ValidatorAccumulatedCommission.fromPartial({})}}function m(){return{validatorAddress:"",startingHeight:BigInt(0),endingHeight:BigInt(0),pagination:void 0}}function y(){return{slashes:[],pagination:void 0}}function v(){return{delegatorAddress:"",validatorAddress:""}}function b(){return{rewards:[]}}function S(){return{delegatorAddress:""}}function w(){return{rewards:[],total:[]}}function _(){return{delegatorAddress:""}}function k(){return{validators:[]}}function O(){return{delegatorAddress:""}}function P(){return{withdrawAddress:""}}function A(){return{}}function I(){return{pool:[]}}t.protobufPackage="cosmos.distribution.v1beta1",t.QueryParamsRequest={typeUrl:"/cosmos.distribution.v1beta1.QueryParamsRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=l();for(;r.posl(),toJSON:e=>({}),fromPartial:e=>l()},t.QueryParamsResponse={typeUrl:"/cosmos.distribution.v1beta1.QueryParamsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return void 0!==e.params&&i.Params.encode(e.params,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=u();for(;r.pos>>3==1?o.params=i.Params.decode(r,r.uint32()):r.skipType(7&e)}return o},fromJSON(e){let t=u();return(0,s.isSet)(e.params)&&(t.params=i.Params.fromJSON(e.params)),t},toJSON(e){let t={};return void 0!==e.params&&(t.params=e.params?i.Params.toJSON(e.params):void 0),t},fromPartial(e){let t=u();return void 0!==e.params&&null!==e.params&&(t.params=i.Params.fromPartial(e.params)),t}},t.QueryValidatorDistributionInfoRequest={typeUrl:"/cosmos.distribution.v1beta1.QueryValidatorDistributionInfoRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.validatorAddress&&t.uint32(10).string(e.validatorAddress),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=d();for(;r.pos>>3==1?i.validatorAddress=r.string():r.skipType(7&e)}return i},fromJSON(e){let t=d();return(0,s.isSet)(e.validatorAddress)&&(t.validatorAddress=String(e.validatorAddress)),t},toJSON(e){let t={};return void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),t},fromPartial(e){var t;let r=d();return r.validatorAddress=null!==(t=e.validatorAddress)&&void 0!==t?t:"",r}},t.QueryValidatorDistributionInfoResponse={typeUrl:"/cosmos.distribution.v1beta1.QueryValidatorDistributionInfoResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();for(let r of(""!==e.operatorAddress&&t.uint32(10).string(e.operatorAddress),e.selfBondRewards))o.DecCoin.encode(r,t.uint32(18).fork()).ldelim();for(let r of e.commission)o.DecCoin.encode(r,t.uint32(26).fork()).ldelim();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=c();for(;r.pos>>3){case 1:i.operatorAddress=r.string();break;case 2:i.selfBondRewards.push(o.DecCoin.decode(r,r.uint32()));break;case 3:i.commission.push(o.DecCoin.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=c();return(0,s.isSet)(e.operatorAddress)&&(t.operatorAddress=String(e.operatorAddress)),Array.isArray(null==e?void 0:e.selfBondRewards)&&(t.selfBondRewards=e.selfBondRewards.map(e=>o.DecCoin.fromJSON(e))),Array.isArray(null==e?void 0:e.commission)&&(t.commission=e.commission.map(e=>o.DecCoin.fromJSON(e))),t},toJSON(e){let t={};return void 0!==e.operatorAddress&&(t.operatorAddress=e.operatorAddress),e.selfBondRewards?t.selfBondRewards=e.selfBondRewards.map(e=>e?o.DecCoin.toJSON(e):void 0):t.selfBondRewards=[],e.commission?t.commission=e.commission.map(e=>e?o.DecCoin.toJSON(e):void 0):t.commission=[],t},fromPartial(e){var t,r,n;let i=c();return i.operatorAddress=null!==(n=e.operatorAddress)&&void 0!==n?n:"",i.selfBondRewards=(null===(t=e.selfBondRewards)||void 0===t?void 0:t.map(e=>o.DecCoin.fromPartial(e)))||[],i.commission=(null===(r=e.commission)||void 0===r?void 0:r.map(e=>o.DecCoin.fromPartial(e)))||[],i}},t.QueryValidatorOutstandingRewardsRequest={typeUrl:"/cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.validatorAddress&&t.uint32(10).string(e.validatorAddress),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=p();for(;r.pos>>3==1?i.validatorAddress=r.string():r.skipType(7&e)}return i},fromJSON(e){let t=p();return(0,s.isSet)(e.validatorAddress)&&(t.validatorAddress=String(e.validatorAddress)),t},toJSON(e){let t={};return void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),t},fromPartial(e){var t;let r=p();return r.validatorAddress=null!==(t=e.validatorAddress)&&void 0!==t?t:"",r}},t.QueryValidatorOutstandingRewardsResponse={typeUrl:"/cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return void 0!==e.rewards&&i.ValidatorOutstandingRewards.encode(e.rewards,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=f();for(;r.pos>>3==1?o.rewards=i.ValidatorOutstandingRewards.decode(r,r.uint32()):r.skipType(7&e)}return o},fromJSON(e){let t=f();return(0,s.isSet)(e.rewards)&&(t.rewards=i.ValidatorOutstandingRewards.fromJSON(e.rewards)),t},toJSON(e){let t={};return void 0!==e.rewards&&(t.rewards=e.rewards?i.ValidatorOutstandingRewards.toJSON(e.rewards):void 0),t},fromPartial(e){let t=f();return void 0!==e.rewards&&null!==e.rewards&&(t.rewards=i.ValidatorOutstandingRewards.fromPartial(e.rewards)),t}},t.QueryValidatorCommissionRequest={typeUrl:"/cosmos.distribution.v1beta1.QueryValidatorCommissionRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.validatorAddress&&t.uint32(10).string(e.validatorAddress),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=h();for(;r.pos>>3==1?i.validatorAddress=r.string():r.skipType(7&e)}return i},fromJSON(e){let t=h();return(0,s.isSet)(e.validatorAddress)&&(t.validatorAddress=String(e.validatorAddress)),t},toJSON(e){let t={};return void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),t},fromPartial(e){var t;let r=h();return r.validatorAddress=null!==(t=e.validatorAddress)&&void 0!==t?t:"",r}},t.QueryValidatorCommissionResponse={typeUrl:"/cosmos.distribution.v1beta1.QueryValidatorCommissionResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return void 0!==e.commission&&i.ValidatorAccumulatedCommission.encode(e.commission,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=g();for(;r.pos>>3==1?o.commission=i.ValidatorAccumulatedCommission.decode(r,r.uint32()):r.skipType(7&e)}return o},fromJSON(e){let t=g();return(0,s.isSet)(e.commission)&&(t.commission=i.ValidatorAccumulatedCommission.fromJSON(e.commission)),t},toJSON(e){let t={};return void 0!==e.commission&&(t.commission=e.commission?i.ValidatorAccumulatedCommission.toJSON(e.commission):void 0),t},fromPartial(e){let t=g();return void 0!==e.commission&&null!==e.commission&&(t.commission=i.ValidatorAccumulatedCommission.fromPartial(e.commission)),t}},t.QueryValidatorSlashesRequest={typeUrl:"/cosmos.distribution.v1beta1.QueryValidatorSlashesRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.validatorAddress&&t.uint32(10).string(e.validatorAddress),e.startingHeight!==BigInt(0)&&t.uint32(16).uint64(e.startingHeight),e.endingHeight!==BigInt(0)&&t.uint32(24).uint64(e.endingHeight),void 0!==e.pagination&&n.PageRequest.encode(e.pagination,t.uint32(34).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),i=void 0===t?r.len:r.pos+t,o=m();for(;r.pos>>3){case 1:o.validatorAddress=r.string();break;case 2:o.startingHeight=r.uint64();break;case 3:o.endingHeight=r.uint64();break;case 4:o.pagination=n.PageRequest.decode(r,r.uint32());break;default:r.skipType(7&e)}}return o},fromJSON(e){let t=m();return(0,s.isSet)(e.validatorAddress)&&(t.validatorAddress=String(e.validatorAddress)),(0,s.isSet)(e.startingHeight)&&(t.startingHeight=BigInt(e.startingHeight.toString())),(0,s.isSet)(e.endingHeight)&&(t.endingHeight=BigInt(e.endingHeight.toString())),(0,s.isSet)(e.pagination)&&(t.pagination=n.PageRequest.fromJSON(e.pagination)),t},toJSON(e){let t={};return void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),void 0!==e.startingHeight&&(t.startingHeight=(e.startingHeight||BigInt(0)).toString()),void 0!==e.endingHeight&&(t.endingHeight=(e.endingHeight||BigInt(0)).toString()),void 0!==e.pagination&&(t.pagination=e.pagination?n.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=m();return r.validatorAddress=null!==(t=e.validatorAddress)&&void 0!==t?t:"",void 0!==e.startingHeight&&null!==e.startingHeight&&(r.startingHeight=BigInt(e.startingHeight.toString())),void 0!==e.endingHeight&&null!==e.endingHeight&&(r.endingHeight=BigInt(e.endingHeight.toString())),void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageRequest.fromPartial(e.pagination)),r}},t.QueryValidatorSlashesResponse={typeUrl:"/cosmos.distribution.v1beta1.QueryValidatorSlashesResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();for(let r of e.slashes)i.ValidatorSlashEvent.encode(r,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&n.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),o=void 0===t?r.len:r.pos+t,s=y();for(;r.pos>>3){case 1:s.slashes.push(i.ValidatorSlashEvent.decode(r,r.uint32()));break;case 2:s.pagination=n.PageResponse.decode(r,r.uint32());break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=y();return Array.isArray(null==e?void 0:e.slashes)&&(t.slashes=e.slashes.map(e=>i.ValidatorSlashEvent.fromJSON(e))),(0,s.isSet)(e.pagination)&&(t.pagination=n.PageResponse.fromJSON(e.pagination)),t},toJSON(e){let t={};return e.slashes?t.slashes=e.slashes.map(e=>e?i.ValidatorSlashEvent.toJSON(e):void 0):t.slashes=[],void 0!==e.pagination&&(t.pagination=e.pagination?n.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=y();return r.slashes=(null===(t=e.slashes)||void 0===t?void 0:t.map(e=>i.ValidatorSlashEvent.fromPartial(e)))||[],void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageResponse.fromPartial(e.pagination)),r}},t.QueryDelegationRewardsRequest={typeUrl:"/cosmos.distribution.v1beta1.QueryDelegationRewardsRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),""!==e.validatorAddress&&t.uint32(18).string(e.validatorAddress),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=v();for(;r.pos>>3){case 1:i.delegatorAddress=r.string();break;case 2:i.validatorAddress=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=v();return(0,s.isSet)(e.delegatorAddress)&&(t.delegatorAddress=String(e.delegatorAddress)),(0,s.isSet)(e.validatorAddress)&&(t.validatorAddress=String(e.validatorAddress)),t},toJSON(e){let t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),t},fromPartial(e){var t,r;let n=v();return n.delegatorAddress=null!==(t=e.delegatorAddress)&&void 0!==t?t:"",n.validatorAddress=null!==(r=e.validatorAddress)&&void 0!==r?r:"",n}},t.QueryDelegationRewardsResponse={typeUrl:"/cosmos.distribution.v1beta1.QueryDelegationRewardsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();for(let r of e.rewards)o.DecCoin.encode(r,t.uint32(10).fork()).ldelim();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=b();for(;r.pos>>3==1?i.rewards.push(o.DecCoin.decode(r,r.uint32())):r.skipType(7&e)}return i},fromJSON(e){let t=b();return Array.isArray(null==e?void 0:e.rewards)&&(t.rewards=e.rewards.map(e=>o.DecCoin.fromJSON(e))),t},toJSON(e){let t={};return e.rewards?t.rewards=e.rewards.map(e=>e?o.DecCoin.toJSON(e):void 0):t.rewards=[],t},fromPartial(e){var t;let r=b();return r.rewards=(null===(t=e.rewards)||void 0===t?void 0:t.map(e=>o.DecCoin.fromPartial(e)))||[],r}},t.QueryDelegationTotalRewardsRequest={typeUrl:"/cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=S();for(;r.pos>>3==1?i.delegatorAddress=r.string():r.skipType(7&e)}return i},fromJSON(e){let t=S();return(0,s.isSet)(e.delegatorAddress)&&(t.delegatorAddress=String(e.delegatorAddress)),t},toJSON(e){let t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),t},fromPartial(e){var t;let r=S();return r.delegatorAddress=null!==(t=e.delegatorAddress)&&void 0!==t?t:"",r}},t.QueryDelegationTotalRewardsResponse={typeUrl:"/cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();for(let r of e.rewards)i.DelegationDelegatorReward.encode(r,t.uint32(10).fork()).ldelim();for(let r of e.total)o.DecCoin.encode(r,t.uint32(18).fork()).ldelim();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,s=w();for(;r.pos>>3){case 1:s.rewards.push(i.DelegationDelegatorReward.decode(r,r.uint32()));break;case 2:s.total.push(o.DecCoin.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=w();return Array.isArray(null==e?void 0:e.rewards)&&(t.rewards=e.rewards.map(e=>i.DelegationDelegatorReward.fromJSON(e))),Array.isArray(null==e?void 0:e.total)&&(t.total=e.total.map(e=>o.DecCoin.fromJSON(e))),t},toJSON(e){let t={};return e.rewards?t.rewards=e.rewards.map(e=>e?i.DelegationDelegatorReward.toJSON(e):void 0):t.rewards=[],e.total?t.total=e.total.map(e=>e?o.DecCoin.toJSON(e):void 0):t.total=[],t},fromPartial(e){var t,r;let n=w();return n.rewards=(null===(t=e.rewards)||void 0===t?void 0:t.map(e=>i.DelegationDelegatorReward.fromPartial(e)))||[],n.total=(null===(r=e.total)||void 0===r?void 0:r.map(e=>o.DecCoin.fromPartial(e)))||[],n}},t.QueryDelegatorValidatorsRequest={typeUrl:"/cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=_();for(;r.pos>>3==1?i.delegatorAddress=r.string():r.skipType(7&e)}return i},fromJSON(e){let t=_();return(0,s.isSet)(e.delegatorAddress)&&(t.delegatorAddress=String(e.delegatorAddress)),t},toJSON(e){let t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),t},fromPartial(e){var t;let r=_();return r.delegatorAddress=null!==(t=e.delegatorAddress)&&void 0!==t?t:"",r}},t.QueryDelegatorValidatorsResponse={typeUrl:"/cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();for(let r of e.validators)t.uint32(10).string(r);return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=k();for(;r.pos>>3==1?i.validators.push(r.string()):r.skipType(7&e)}return i},fromJSON(e){let t=k();return Array.isArray(null==e?void 0:e.validators)&&(t.validators=e.validators.map(e=>String(e))),t},toJSON(e){let t={};return e.validators?t.validators=e.validators.map(e=>e):t.validators=[],t},fromPartial(e){var t;let r=k();return r.validators=(null===(t=e.validators)||void 0===t?void 0:t.map(e=>e))||[],r}},t.QueryDelegatorWithdrawAddressRequest={typeUrl:"/cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=O();for(;r.pos>>3==1?i.delegatorAddress=r.string():r.skipType(7&e)}return i},fromJSON(e){let t=O();return(0,s.isSet)(e.delegatorAddress)&&(t.delegatorAddress=String(e.delegatorAddress)),t},toJSON(e){let t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),t},fromPartial(e){var t;let r=O();return r.delegatorAddress=null!==(t=e.delegatorAddress)&&void 0!==t?t:"",r}},t.QueryDelegatorWithdrawAddressResponse={typeUrl:"/cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.withdrawAddress&&t.uint32(10).string(e.withdrawAddress),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=P();for(;r.pos>>3==1?i.withdrawAddress=r.string():r.skipType(7&e)}return i},fromJSON(e){let t=P();return(0,s.isSet)(e.withdrawAddress)&&(t.withdrawAddress=String(e.withdrawAddress)),t},toJSON(e){let t={};return void 0!==e.withdrawAddress&&(t.withdrawAddress=e.withdrawAddress),t},fromPartial(e){var t;let r=P();return r.withdrawAddress=null!==(t=e.withdrawAddress)&&void 0!==t?t:"",r}},t.QueryCommunityPoolRequest={typeUrl:"/cosmos.distribution.v1beta1.QueryCommunityPoolRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=A();for(;r.posA(),toJSON:e=>({}),fromPartial:e=>A()},t.QueryCommunityPoolResponse={typeUrl:"/cosmos.distribution.v1beta1.QueryCommunityPoolResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();for(let r of e.pool)o.DecCoin.encode(r,t.uint32(10).fork()).ldelim();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=I();for(;r.pos>>3==1?i.pool.push(o.DecCoin.decode(r,r.uint32())):r.skipType(7&e)}return i},fromJSON(e){let t=I();return Array.isArray(null==e?void 0:e.pool)&&(t.pool=e.pool.map(e=>o.DecCoin.fromJSON(e))),t},toJSON(e){let t={};return e.pool?t.pool=e.pool.map(e=>e?o.DecCoin.toJSON(e):void 0):t.pool=[],t},fromPartial(e){var t;let r=I();return r.pool=(null===(t=e.pool)||void 0===t?void 0:t.map(e=>o.DecCoin.fromPartial(e)))||[],r}};class R{Params(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.QueryParamsRequest.encode(e).finish();return this.rpc.request("cosmos.distribution.v1beta1.Query","Params",r).then(e=>t.QueryParamsResponse.decode(new a.BinaryReader(e)))}ValidatorDistributionInfo(e){let r=t.QueryValidatorDistributionInfoRequest.encode(e).finish();return this.rpc.request("cosmos.distribution.v1beta1.Query","ValidatorDistributionInfo",r).then(e=>t.QueryValidatorDistributionInfoResponse.decode(new a.BinaryReader(e)))}ValidatorOutstandingRewards(e){let r=t.QueryValidatorOutstandingRewardsRequest.encode(e).finish();return this.rpc.request("cosmos.distribution.v1beta1.Query","ValidatorOutstandingRewards",r).then(e=>t.QueryValidatorOutstandingRewardsResponse.decode(new a.BinaryReader(e)))}ValidatorCommission(e){let r=t.QueryValidatorCommissionRequest.encode(e).finish();return this.rpc.request("cosmos.distribution.v1beta1.Query","ValidatorCommission",r).then(e=>t.QueryValidatorCommissionResponse.decode(new a.BinaryReader(e)))}ValidatorSlashes(e){let r=t.QueryValidatorSlashesRequest.encode(e).finish();return this.rpc.request("cosmos.distribution.v1beta1.Query","ValidatorSlashes",r).then(e=>t.QueryValidatorSlashesResponse.decode(new a.BinaryReader(e)))}DelegationRewards(e){let r=t.QueryDelegationRewardsRequest.encode(e).finish();return this.rpc.request("cosmos.distribution.v1beta1.Query","DelegationRewards",r).then(e=>t.QueryDelegationRewardsResponse.decode(new a.BinaryReader(e)))}DelegationTotalRewards(e){let r=t.QueryDelegationTotalRewardsRequest.encode(e).finish();return this.rpc.request("cosmos.distribution.v1beta1.Query","DelegationTotalRewards",r).then(e=>t.QueryDelegationTotalRewardsResponse.decode(new a.BinaryReader(e)))}DelegatorValidators(e){let r=t.QueryDelegatorValidatorsRequest.encode(e).finish();return this.rpc.request("cosmos.distribution.v1beta1.Query","DelegatorValidators",r).then(e=>t.QueryDelegatorValidatorsResponse.decode(new a.BinaryReader(e)))}DelegatorWithdrawAddress(e){let r=t.QueryDelegatorWithdrawAddressRequest.encode(e).finish();return this.rpc.request("cosmos.distribution.v1beta1.Query","DelegatorWithdrawAddress",r).then(e=>t.QueryDelegatorWithdrawAddressResponse.decode(new a.BinaryReader(e)))}CommunityPool(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.QueryCommunityPoolRequest.encode(e).finish();return this.rpc.request("cosmos.distribution.v1beta1.Query","CommunityPool",r).then(e=>t.QueryCommunityPoolResponse.decode(new a.BinaryReader(e)))}constructor(e){this.rpc=e,this.Params=this.Params.bind(this),this.ValidatorDistributionInfo=this.ValidatorDistributionInfo.bind(this),this.ValidatorOutstandingRewards=this.ValidatorOutstandingRewards.bind(this),this.ValidatorCommission=this.ValidatorCommission.bind(this),this.ValidatorSlashes=this.ValidatorSlashes.bind(this),this.DelegationRewards=this.DelegationRewards.bind(this),this.DelegationTotalRewards=this.DelegationTotalRewards.bind(this),this.DelegatorValidators=this.DelegatorValidators.bind(this),this.DelegatorWithdrawAddress=this.DelegatorWithdrawAddress.bind(this),this.CommunityPool=this.CommunityPool.bind(this)}}t.QueryClientImpl=R},53856:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MsgClientImpl=t.MsgCommunityPoolSpendResponse=t.MsgCommunityPoolSpend=t.MsgUpdateParamsResponse=t.MsgUpdateParams=t.MsgFundCommunityPoolResponse=t.MsgFundCommunityPool=t.MsgWithdrawValidatorCommissionResponse=t.MsgWithdrawValidatorCommission=t.MsgWithdrawDelegatorRewardResponse=t.MsgWithdrawDelegatorReward=t.MsgSetWithdrawAddressResponse=t.MsgSetWithdrawAddress=t.protobufPackage=void 0;let n=r(14841),i=r(92312),o=r(46554),a=r(99133);function s(){return{delegatorAddress:"",withdrawAddress:""}}function l(){return{}}function u(){return{delegatorAddress:"",validatorAddress:""}}function d(){return{amount:[]}}function c(){return{validatorAddress:""}}function p(){return{amount:[]}}function f(){return{amount:[],depositor:""}}function h(){return{}}function g(){return{authority:"",params:i.Params.fromPartial({})}}function m(){return{}}function y(){return{authority:"",recipient:"",amount:[]}}function v(){return{}}t.protobufPackage="cosmos.distribution.v1beta1",t.MsgSetWithdrawAddress={typeUrl:"/cosmos.distribution.v1beta1.MsgSetWithdrawAddress",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),""!==e.withdrawAddress&&t.uint32(18).string(e.withdrawAddress),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=s();for(;r.pos>>3){case 1:i.delegatorAddress=r.string();break;case 2:i.withdrawAddress=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=s();return(0,a.isSet)(e.delegatorAddress)&&(t.delegatorAddress=String(e.delegatorAddress)),(0,a.isSet)(e.withdrawAddress)&&(t.withdrawAddress=String(e.withdrawAddress)),t},toJSON(e){let t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.withdrawAddress&&(t.withdrawAddress=e.withdrawAddress),t},fromPartial(e){var t,r;let n=s();return n.delegatorAddress=null!==(t=e.delegatorAddress)&&void 0!==t?t:"",n.withdrawAddress=null!==(r=e.withdrawAddress)&&void 0!==r?r:"",n}},t.MsgSetWithdrawAddressResponse={typeUrl:"/cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=l();for(;r.posl(),toJSON:e=>({}),fromPartial:e=>l()},t.MsgWithdrawDelegatorReward={typeUrl:"/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),""!==e.validatorAddress&&t.uint32(18).string(e.validatorAddress),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=u();for(;r.pos>>3){case 1:i.delegatorAddress=r.string();break;case 2:i.validatorAddress=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=u();return(0,a.isSet)(e.delegatorAddress)&&(t.delegatorAddress=String(e.delegatorAddress)),(0,a.isSet)(e.validatorAddress)&&(t.validatorAddress=String(e.validatorAddress)),t},toJSON(e){let t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),t},fromPartial(e){var t,r;let n=u();return n.delegatorAddress=null!==(t=e.delegatorAddress)&&void 0!==t?t:"",n.validatorAddress=null!==(r=e.validatorAddress)&&void 0!==r?r:"",n}},t.MsgWithdrawDelegatorRewardResponse={typeUrl:"/cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of e.amount)n.Coin.encode(r,t.uint32(10).fork()).ldelim();return t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=d();for(;r.pos>>3==1?a.amount.push(n.Coin.decode(r,r.uint32())):r.skipType(7&e)}return a},fromJSON(e){let t=d();return Array.isArray(null==e?void 0:e.amount)&&(t.amount=e.amount.map(e=>n.Coin.fromJSON(e))),t},toJSON(e){let t={};return e.amount?t.amount=e.amount.map(e=>e?n.Coin.toJSON(e):void 0):t.amount=[],t},fromPartial(e){var t;let r=d();return r.amount=(null===(t=e.amount)||void 0===t?void 0:t.map(e=>n.Coin.fromPartial(e)))||[],r}},t.MsgWithdrawValidatorCommission={typeUrl:"/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.validatorAddress&&t.uint32(10).string(e.validatorAddress),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=c();for(;r.pos>>3==1?i.validatorAddress=r.string():r.skipType(7&e)}return i},fromJSON(e){let t=c();return(0,a.isSet)(e.validatorAddress)&&(t.validatorAddress=String(e.validatorAddress)),t},toJSON(e){let t={};return void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),t},fromPartial(e){var t;let r=c();return r.validatorAddress=null!==(t=e.validatorAddress)&&void 0!==t?t:"",r}},t.MsgWithdrawValidatorCommissionResponse={typeUrl:"/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of e.amount)n.Coin.encode(r,t.uint32(10).fork()).ldelim();return t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=p();for(;r.pos>>3==1?a.amount.push(n.Coin.decode(r,r.uint32())):r.skipType(7&e)}return a},fromJSON(e){let t=p();return Array.isArray(null==e?void 0:e.amount)&&(t.amount=e.amount.map(e=>n.Coin.fromJSON(e))),t},toJSON(e){let t={};return e.amount?t.amount=e.amount.map(e=>e?n.Coin.toJSON(e):void 0):t.amount=[],t},fromPartial(e){var t;let r=p();return r.amount=(null===(t=e.amount)||void 0===t?void 0:t.map(e=>n.Coin.fromPartial(e)))||[],r}},t.MsgFundCommunityPool={typeUrl:"/cosmos.distribution.v1beta1.MsgFundCommunityPool",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of e.amount)n.Coin.encode(r,t.uint32(10).fork()).ldelim();return""!==e.depositor&&t.uint32(18).string(e.depositor),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=f();for(;r.pos>>3){case 1:a.amount.push(n.Coin.decode(r,r.uint32()));break;case 2:a.depositor=r.string();break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=f();return Array.isArray(null==e?void 0:e.amount)&&(t.amount=e.amount.map(e=>n.Coin.fromJSON(e))),(0,a.isSet)(e.depositor)&&(t.depositor=String(e.depositor)),t},toJSON(e){let t={};return e.amount?t.amount=e.amount.map(e=>e?n.Coin.toJSON(e):void 0):t.amount=[],void 0!==e.depositor&&(t.depositor=e.depositor),t},fromPartial(e){var t,r;let i=f();return i.amount=(null===(t=e.amount)||void 0===t?void 0:t.map(e=>n.Coin.fromPartial(e)))||[],i.depositor=null!==(r=e.depositor)&&void 0!==r?r:"",i}},t.MsgFundCommunityPoolResponse={typeUrl:"/cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=h();for(;r.posh(),toJSON:e=>({}),fromPartial:e=>h()},t.MsgUpdateParams={typeUrl:"/cosmos.distribution.v1beta1.MsgUpdateParams",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.authority&&t.uint32(10).string(e.authority),void 0!==e.params&&i.Params.encode(e.params,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,a=g();for(;r.pos>>3){case 1:a.authority=r.string();break;case 2:a.params=i.Params.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=g();return(0,a.isSet)(e.authority)&&(t.authority=String(e.authority)),(0,a.isSet)(e.params)&&(t.params=i.Params.fromJSON(e.params)),t},toJSON(e){let t={};return void 0!==e.authority&&(t.authority=e.authority),void 0!==e.params&&(t.params=e.params?i.Params.toJSON(e.params):void 0),t},fromPartial(e){var t;let r=g();return r.authority=null!==(t=e.authority)&&void 0!==t?t:"",void 0!==e.params&&null!==e.params&&(r.params=i.Params.fromPartial(e.params)),r}},t.MsgUpdateParamsResponse={typeUrl:"/cosmos.distribution.v1beta1.MsgUpdateParamsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=m();for(;r.posm(),toJSON:e=>({}),fromPartial:e=>m()},t.MsgCommunityPoolSpend={typeUrl:"/cosmos.distribution.v1beta1.MsgCommunityPoolSpend",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of(""!==e.authority&&t.uint32(10).string(e.authority),""!==e.recipient&&t.uint32(18).string(e.recipient),e.amount))n.Coin.encode(r,t.uint32(26).fork()).ldelim();return t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=y();for(;r.pos>>3){case 1:a.authority=r.string();break;case 2:a.recipient=r.string();break;case 3:a.amount.push(n.Coin.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=y();return(0,a.isSet)(e.authority)&&(t.authority=String(e.authority)),(0,a.isSet)(e.recipient)&&(t.recipient=String(e.recipient)),Array.isArray(null==e?void 0:e.amount)&&(t.amount=e.amount.map(e=>n.Coin.fromJSON(e))),t},toJSON(e){let t={};return void 0!==e.authority&&(t.authority=e.authority),void 0!==e.recipient&&(t.recipient=e.recipient),e.amount?t.amount=e.amount.map(e=>e?n.Coin.toJSON(e):void 0):t.amount=[],t},fromPartial(e){var t,r,i;let o=y();return o.authority=null!==(r=e.authority)&&void 0!==r?r:"",o.recipient=null!==(i=e.recipient)&&void 0!==i?i:"",o.amount=(null===(t=e.amount)||void 0===t?void 0:t.map(e=>n.Coin.fromPartial(e)))||[],o}},t.MsgCommunityPoolSpendResponse={typeUrl:"/cosmos.distribution.v1beta1.MsgCommunityPoolSpendResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=v();for(;r.posv(),toJSON:e=>({}),fromPartial:e=>v()};class b{SetWithdrawAddress(e){let r=t.MsgSetWithdrawAddress.encode(e).finish();return this.rpc.request("cosmos.distribution.v1beta1.Msg","SetWithdrawAddress",r).then(e=>t.MsgSetWithdrawAddressResponse.decode(new o.BinaryReader(e)))}WithdrawDelegatorReward(e){let r=t.MsgWithdrawDelegatorReward.encode(e).finish();return this.rpc.request("cosmos.distribution.v1beta1.Msg","WithdrawDelegatorReward",r).then(e=>t.MsgWithdrawDelegatorRewardResponse.decode(new o.BinaryReader(e)))}WithdrawValidatorCommission(e){let r=t.MsgWithdrawValidatorCommission.encode(e).finish();return this.rpc.request("cosmos.distribution.v1beta1.Msg","WithdrawValidatorCommission",r).then(e=>t.MsgWithdrawValidatorCommissionResponse.decode(new o.BinaryReader(e)))}FundCommunityPool(e){let r=t.MsgFundCommunityPool.encode(e).finish();return this.rpc.request("cosmos.distribution.v1beta1.Msg","FundCommunityPool",r).then(e=>t.MsgFundCommunityPoolResponse.decode(new o.BinaryReader(e)))}UpdateParams(e){let r=t.MsgUpdateParams.encode(e).finish();return this.rpc.request("cosmos.distribution.v1beta1.Msg","UpdateParams",r).then(e=>t.MsgUpdateParamsResponse.decode(new o.BinaryReader(e)))}CommunityPoolSpend(e){let r=t.MsgCommunityPoolSpend.encode(e).finish();return this.rpc.request("cosmos.distribution.v1beta1.Msg","CommunityPoolSpend",r).then(e=>t.MsgCommunityPoolSpendResponse.decode(new o.BinaryReader(e)))}constructor(e){this.rpc=e,this.SetWithdrawAddress=this.SetWithdrawAddress.bind(this),this.WithdrawDelegatorReward=this.WithdrawDelegatorReward.bind(this),this.WithdrawValidatorCommission=this.WithdrawValidatorCommission.bind(this),this.FundCommunityPool=this.FundCommunityPool.bind(this),this.UpdateParams=this.UpdateParams.bind(this),this.CommunityPoolSpend=this.CommunityPoolSpend.bind(this)}}t.MsgClientImpl=b},24474:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Grant=t.AllowedMsgAllowance=t.PeriodicAllowance=t.BasicAllowance=t.protobufPackage=void 0;let n=r(14841),i=r(9990),o=r(84849),a=r(11879),s=r(46554),l=r(99133);function u(){return{spendLimit:[],expiration:void 0}}function d(){return{basic:t.BasicAllowance.fromPartial({}),period:o.Duration.fromPartial({}),periodSpendLimit:[],periodCanSpend:[],periodReset:i.Timestamp.fromPartial({})}}function c(){return{allowance:void 0,allowedMessages:[]}}function p(){return{granter:"",grantee:"",allowance:void 0}}t.protobufPackage="cosmos.feegrant.v1beta1",t.BasicAllowance={typeUrl:"/cosmos.feegrant.v1beta1.BasicAllowance",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();for(let r of e.spendLimit)n.Coin.encode(r,t.uint32(10).fork()).ldelim();return void 0!==e.expiration&&i.Timestamp.encode(e.expiration,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),o=void 0===t?r.len:r.pos+t,a=u();for(;r.pos>>3){case 1:a.spendLimit.push(n.Coin.decode(r,r.uint32()));break;case 2:a.expiration=i.Timestamp.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=u();return Array.isArray(null==e?void 0:e.spendLimit)&&(t.spendLimit=e.spendLimit.map(e=>n.Coin.fromJSON(e))),(0,l.isSet)(e.expiration)&&(t.expiration=(0,l.fromJsonTimestamp)(e.expiration)),t},toJSON(e){let t={};return e.spendLimit?t.spendLimit=e.spendLimit.map(e=>e?n.Coin.toJSON(e):void 0):t.spendLimit=[],void 0!==e.expiration&&(t.expiration=(0,l.fromTimestamp)(e.expiration).toISOString()),t},fromPartial(e){var t;let r=u();return r.spendLimit=(null===(t=e.spendLimit)||void 0===t?void 0:t.map(e=>n.Coin.fromPartial(e)))||[],void 0!==e.expiration&&null!==e.expiration&&(r.expiration=i.Timestamp.fromPartial(e.expiration)),r}},t.PeriodicAllowance={typeUrl:"/cosmos.feegrant.v1beta1.PeriodicAllowance",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();for(let i of(void 0!==e.basic&&t.BasicAllowance.encode(e.basic,r.uint32(10).fork()).ldelim(),void 0!==e.period&&o.Duration.encode(e.period,r.uint32(18).fork()).ldelim(),e.periodSpendLimit))n.Coin.encode(i,r.uint32(26).fork()).ldelim();for(let t of e.periodCanSpend)n.Coin.encode(t,r.uint32(34).fork()).ldelim();return void 0!==e.periodReset&&i.Timestamp.encode(e.periodReset,r.uint32(42).fork()).ldelim(),r},decode(e,r){let a=e instanceof s.BinaryReader?e:new s.BinaryReader(e),l=void 0===r?a.len:a.pos+r,u=d();for(;a.pos>>3){case 1:u.basic=t.BasicAllowance.decode(a,a.uint32());break;case 2:u.period=o.Duration.decode(a,a.uint32());break;case 3:u.periodSpendLimit.push(n.Coin.decode(a,a.uint32()));break;case 4:u.periodCanSpend.push(n.Coin.decode(a,a.uint32()));break;case 5:u.periodReset=i.Timestamp.decode(a,a.uint32());break;default:a.skipType(7&e)}}return u},fromJSON(e){let r=d();return(0,l.isSet)(e.basic)&&(r.basic=t.BasicAllowance.fromJSON(e.basic)),(0,l.isSet)(e.period)&&(r.period=o.Duration.fromJSON(e.period)),Array.isArray(null==e?void 0:e.periodSpendLimit)&&(r.periodSpendLimit=e.periodSpendLimit.map(e=>n.Coin.fromJSON(e))),Array.isArray(null==e?void 0:e.periodCanSpend)&&(r.periodCanSpend=e.periodCanSpend.map(e=>n.Coin.fromJSON(e))),(0,l.isSet)(e.periodReset)&&(r.periodReset=(0,l.fromJsonTimestamp)(e.periodReset)),r},toJSON(e){let r={};return void 0!==e.basic&&(r.basic=e.basic?t.BasicAllowance.toJSON(e.basic):void 0),void 0!==e.period&&(r.period=e.period?o.Duration.toJSON(e.period):void 0),e.periodSpendLimit?r.periodSpendLimit=e.periodSpendLimit.map(e=>e?n.Coin.toJSON(e):void 0):r.periodSpendLimit=[],e.periodCanSpend?r.periodCanSpend=e.periodCanSpend.map(e=>e?n.Coin.toJSON(e):void 0):r.periodCanSpend=[],void 0!==e.periodReset&&(r.periodReset=(0,l.fromTimestamp)(e.periodReset).toISOString()),r},fromPartial(e){var r,a;let s=d();return void 0!==e.basic&&null!==e.basic&&(s.basic=t.BasicAllowance.fromPartial(e.basic)),void 0!==e.period&&null!==e.period&&(s.period=o.Duration.fromPartial(e.period)),s.periodSpendLimit=(null===(r=e.periodSpendLimit)||void 0===r?void 0:r.map(e=>n.Coin.fromPartial(e)))||[],s.periodCanSpend=(null===(a=e.periodCanSpend)||void 0===a?void 0:a.map(e=>n.Coin.fromPartial(e)))||[],void 0!==e.periodReset&&null!==e.periodReset&&(s.periodReset=i.Timestamp.fromPartial(e.periodReset)),s}},t.AllowedMsgAllowance={typeUrl:"/cosmos.feegrant.v1beta1.AllowedMsgAllowance",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();for(let r of(void 0!==e.allowance&&a.Any.encode(e.allowance,t.uint32(10).fork()).ldelim(),e.allowedMessages))t.uint32(18).string(r);return t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=c();for(;r.pos>>3){case 1:i.allowance=a.Any.decode(r,r.uint32());break;case 2:i.allowedMessages.push(r.string());break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=c();return(0,l.isSet)(e.allowance)&&(t.allowance=a.Any.fromJSON(e.allowance)),Array.isArray(null==e?void 0:e.allowedMessages)&&(t.allowedMessages=e.allowedMessages.map(e=>String(e))),t},toJSON(e){let t={};return void 0!==e.allowance&&(t.allowance=e.allowance?a.Any.toJSON(e.allowance):void 0),e.allowedMessages?t.allowedMessages=e.allowedMessages.map(e=>e):t.allowedMessages=[],t},fromPartial(e){var t;let r=c();return void 0!==e.allowance&&null!==e.allowance&&(r.allowance=a.Any.fromPartial(e.allowance)),r.allowedMessages=(null===(t=e.allowedMessages)||void 0===t?void 0:t.map(e=>e))||[],r}},t.Grant={typeUrl:"/cosmos.feegrant.v1beta1.Grant",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return""!==e.granter&&t.uint32(10).string(e.granter),""!==e.grantee&&t.uint32(18).string(e.grantee),void 0!==e.allowance&&a.Any.encode(e.allowance,t.uint32(26).fork()).ldelim(),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=p();for(;r.pos>>3){case 1:i.granter=r.string();break;case 2:i.grantee=r.string();break;case 3:i.allowance=a.Any.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=p();return(0,l.isSet)(e.granter)&&(t.granter=String(e.granter)),(0,l.isSet)(e.grantee)&&(t.grantee=String(e.grantee)),(0,l.isSet)(e.allowance)&&(t.allowance=a.Any.fromJSON(e.allowance)),t},toJSON(e){let t={};return void 0!==e.granter&&(t.granter=e.granter),void 0!==e.grantee&&(t.grantee=e.grantee),void 0!==e.allowance&&(t.allowance=e.allowance?a.Any.toJSON(e.allowance):void 0),t},fromPartial(e){var t,r;let n=p();return n.granter=null!==(t=e.granter)&&void 0!==t?t:"",n.grantee=null!==(r=e.grantee)&&void 0!==r?r:"",void 0!==e.allowance&&null!==e.allowance&&(n.allowance=a.Any.fromPartial(e.allowance)),n}}},75122:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QueryClientImpl=t.QueryAllowancesByGranterResponse=t.QueryAllowancesByGranterRequest=t.QueryAllowancesResponse=t.QueryAllowancesRequest=t.QueryAllowanceResponse=t.QueryAllowanceRequest=t.protobufPackage=void 0;let n=r(86141),i=r(24474),o=r(46554),a=r(99133);function s(){return{granter:"",grantee:""}}function l(){return{allowance:void 0}}function u(){return{grantee:"",pagination:void 0}}function d(){return{allowances:[],pagination:void 0}}function c(){return{granter:"",pagination:void 0}}function p(){return{allowances:[],pagination:void 0}}t.protobufPackage="cosmos.feegrant.v1beta1",t.QueryAllowanceRequest={typeUrl:"/cosmos.feegrant.v1beta1.QueryAllowanceRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.granter&&t.uint32(10).string(e.granter),""!==e.grantee&&t.uint32(18).string(e.grantee),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=s();for(;r.pos>>3){case 1:i.granter=r.string();break;case 2:i.grantee=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=s();return(0,a.isSet)(e.granter)&&(t.granter=String(e.granter)),(0,a.isSet)(e.grantee)&&(t.grantee=String(e.grantee)),t},toJSON(e){let t={};return void 0!==e.granter&&(t.granter=e.granter),void 0!==e.grantee&&(t.grantee=e.grantee),t},fromPartial(e){var t,r;let n=s();return n.granter=null!==(t=e.granter)&&void 0!==t?t:"",n.grantee=null!==(r=e.grantee)&&void 0!==r?r:"",n}},t.QueryAllowanceResponse={typeUrl:"/cosmos.feegrant.v1beta1.QueryAllowanceResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return void 0!==e.allowance&&i.Grant.encode(e.allowance,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,a=l();for(;r.pos>>3==1?a.allowance=i.Grant.decode(r,r.uint32()):r.skipType(7&e)}return a},fromJSON(e){let t=l();return(0,a.isSet)(e.allowance)&&(t.allowance=i.Grant.fromJSON(e.allowance)),t},toJSON(e){let t={};return void 0!==e.allowance&&(t.allowance=e.allowance?i.Grant.toJSON(e.allowance):void 0),t},fromPartial(e){let t=l();return void 0!==e.allowance&&null!==e.allowance&&(t.allowance=i.Grant.fromPartial(e.allowance)),t}},t.QueryAllowancesRequest={typeUrl:"/cosmos.feegrant.v1beta1.QueryAllowancesRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.grantee&&t.uint32(10).string(e.grantee),void 0!==e.pagination&&n.PageRequest.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=u();for(;r.pos>>3){case 1:a.grantee=r.string();break;case 2:a.pagination=n.PageRequest.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=u();return(0,a.isSet)(e.grantee)&&(t.grantee=String(e.grantee)),(0,a.isSet)(e.pagination)&&(t.pagination=n.PageRequest.fromJSON(e.pagination)),t},toJSON(e){let t={};return void 0!==e.grantee&&(t.grantee=e.grantee),void 0!==e.pagination&&(t.pagination=e.pagination?n.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=u();return r.grantee=null!==(t=e.grantee)&&void 0!==t?t:"",void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageRequest.fromPartial(e.pagination)),r}},t.QueryAllowancesResponse={typeUrl:"/cosmos.feegrant.v1beta1.QueryAllowancesResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of e.allowances)i.Grant.encode(r,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&n.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),a=void 0===t?r.len:r.pos+t,s=d();for(;r.pos>>3){case 1:s.allowances.push(i.Grant.decode(r,r.uint32()));break;case 2:s.pagination=n.PageResponse.decode(r,r.uint32());break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=d();return Array.isArray(null==e?void 0:e.allowances)&&(t.allowances=e.allowances.map(e=>i.Grant.fromJSON(e))),(0,a.isSet)(e.pagination)&&(t.pagination=n.PageResponse.fromJSON(e.pagination)),t},toJSON(e){let t={};return e.allowances?t.allowances=e.allowances.map(e=>e?i.Grant.toJSON(e):void 0):t.allowances=[],void 0!==e.pagination&&(t.pagination=e.pagination?n.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=d();return r.allowances=(null===(t=e.allowances)||void 0===t?void 0:t.map(e=>i.Grant.fromPartial(e)))||[],void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageResponse.fromPartial(e.pagination)),r}},t.QueryAllowancesByGranterRequest={typeUrl:"/cosmos.feegrant.v1beta1.QueryAllowancesByGranterRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.granter&&t.uint32(10).string(e.granter),void 0!==e.pagination&&n.PageRequest.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=c();for(;r.pos>>3){case 1:a.granter=r.string();break;case 2:a.pagination=n.PageRequest.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=c();return(0,a.isSet)(e.granter)&&(t.granter=String(e.granter)),(0,a.isSet)(e.pagination)&&(t.pagination=n.PageRequest.fromJSON(e.pagination)),t},toJSON(e){let t={};return void 0!==e.granter&&(t.granter=e.granter),void 0!==e.pagination&&(t.pagination=e.pagination?n.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=c();return r.granter=null!==(t=e.granter)&&void 0!==t?t:"",void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageRequest.fromPartial(e.pagination)),r}},t.QueryAllowancesByGranterResponse={typeUrl:"/cosmos.feegrant.v1beta1.QueryAllowancesByGranterResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of e.allowances)i.Grant.encode(r,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&n.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),a=void 0===t?r.len:r.pos+t,s=p();for(;r.pos>>3){case 1:s.allowances.push(i.Grant.decode(r,r.uint32()));break;case 2:s.pagination=n.PageResponse.decode(r,r.uint32());break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=p();return Array.isArray(null==e?void 0:e.allowances)&&(t.allowances=e.allowances.map(e=>i.Grant.fromJSON(e))),(0,a.isSet)(e.pagination)&&(t.pagination=n.PageResponse.fromJSON(e.pagination)),t},toJSON(e){let t={};return e.allowances?t.allowances=e.allowances.map(e=>e?i.Grant.toJSON(e):void 0):t.allowances=[],void 0!==e.pagination&&(t.pagination=e.pagination?n.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=p();return r.allowances=(null===(t=e.allowances)||void 0===t?void 0:t.map(e=>i.Grant.fromPartial(e)))||[],void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageResponse.fromPartial(e.pagination)),r}};class f{Allowance(e){let r=t.QueryAllowanceRequest.encode(e).finish();return this.rpc.request("cosmos.feegrant.v1beta1.Query","Allowance",r).then(e=>t.QueryAllowanceResponse.decode(new o.BinaryReader(e)))}Allowances(e){let r=t.QueryAllowancesRequest.encode(e).finish();return this.rpc.request("cosmos.feegrant.v1beta1.Query","Allowances",r).then(e=>t.QueryAllowancesResponse.decode(new o.BinaryReader(e)))}AllowancesByGranter(e){let r=t.QueryAllowancesByGranterRequest.encode(e).finish();return this.rpc.request("cosmos.feegrant.v1beta1.Query","AllowancesByGranter",r).then(e=>t.QueryAllowancesByGranterResponse.decode(new o.BinaryReader(e)))}constructor(e){this.rpc=e,this.Allowance=this.Allowance.bind(this),this.Allowances=this.Allowances.bind(this),this.AllowancesByGranter=this.AllowancesByGranter.bind(this)}}t.QueryClientImpl=f},2034:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MsgClientImpl=t.MsgRevokeAllowanceResponse=t.MsgRevokeAllowance=t.MsgGrantAllowanceResponse=t.MsgGrantAllowance=t.protobufPackage=void 0;let n=r(11879),i=r(46554),o=r(99133);function a(){return{granter:"",grantee:"",allowance:void 0}}function s(){return{}}function l(){return{granter:"",grantee:""}}function u(){return{}}t.protobufPackage="cosmos.feegrant.v1beta1",t.MsgGrantAllowance={typeUrl:"/cosmos.feegrant.v1beta1.MsgGrantAllowance",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();return""!==e.granter&&t.uint32(10).string(e.granter),""!==e.grantee&&t.uint32(18).string(e.grantee),void 0!==e.allowance&&n.Any.encode(e.allowance,t.uint32(26).fork()).ldelim(),t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),o=void 0===t?r.len:r.pos+t,s=a();for(;r.pos>>3){case 1:s.granter=r.string();break;case 2:s.grantee=r.string();break;case 3:s.allowance=n.Any.decode(r,r.uint32());break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=a();return(0,o.isSet)(e.granter)&&(t.granter=String(e.granter)),(0,o.isSet)(e.grantee)&&(t.grantee=String(e.grantee)),(0,o.isSet)(e.allowance)&&(t.allowance=n.Any.fromJSON(e.allowance)),t},toJSON(e){let t={};return void 0!==e.granter&&(t.granter=e.granter),void 0!==e.grantee&&(t.grantee=e.grantee),void 0!==e.allowance&&(t.allowance=e.allowance?n.Any.toJSON(e.allowance):void 0),t},fromPartial(e){var t,r;let i=a();return i.granter=null!==(t=e.granter)&&void 0!==t?t:"",i.grantee=null!==(r=e.grantee)&&void 0!==r?r:"",void 0!==e.allowance&&null!==e.allowance&&(i.allowance=n.Any.fromPartial(e.allowance)),i}},t.MsgGrantAllowanceResponse={typeUrl:"/cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();return t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=s();for(;r.poss(),toJSON:e=>({}),fromPartial:e=>s()},t.MsgRevokeAllowance={typeUrl:"/cosmos.feegrant.v1beta1.MsgRevokeAllowance",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();return""!==e.granter&&t.uint32(10).string(e.granter),""!==e.grantee&&t.uint32(18).string(e.grantee),t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=l();for(;r.pos>>3){case 1:o.granter=r.string();break;case 2:o.grantee=r.string();break;default:r.skipType(7&e)}}return o},fromJSON(e){let t=l();return(0,o.isSet)(e.granter)&&(t.granter=String(e.granter)),(0,o.isSet)(e.grantee)&&(t.grantee=String(e.grantee)),t},toJSON(e){let t={};return void 0!==e.granter&&(t.granter=e.granter),void 0!==e.grantee&&(t.grantee=e.grantee),t},fromPartial(e){var t,r;let n=l();return n.granter=null!==(t=e.granter)&&void 0!==t?t:"",n.grantee=null!==(r=e.grantee)&&void 0!==r?r:"",n}},t.MsgRevokeAllowanceResponse={typeUrl:"/cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();return t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=u();for(;r.posu(),toJSON:e=>({}),fromPartial:e=>u()};class d{GrantAllowance(e){let r=t.MsgGrantAllowance.encode(e).finish();return this.rpc.request("cosmos.feegrant.v1beta1.Msg","GrantAllowance",r).then(e=>t.MsgGrantAllowanceResponse.decode(new i.BinaryReader(e)))}RevokeAllowance(e){let r=t.MsgRevokeAllowance.encode(e).finish();return this.rpc.request("cosmos.feegrant.v1beta1.Msg","RevokeAllowance",r).then(e=>t.MsgRevokeAllowanceResponse.decode(new i.BinaryReader(e)))}constructor(e){this.rpc=e,this.GrantAllowance=this.GrantAllowance.bind(this),this.RevokeAllowance=this.RevokeAllowance.bind(this)}}t.MsgClientImpl=d},95653:function(e,t,r){"use strict";var n,i;Object.defineProperty(t,"__esModule",{value:!0}),t.Params=t.TallyParams=t.VotingParams=t.DepositParams=t.Vote=t.TallyResult=t.Proposal=t.Deposit=t.WeightedVoteOption=t.proposalStatusToJSON=t.proposalStatusFromJSON=t.ProposalStatus=t.voteOptionToJSON=t.voteOptionFromJSON=t.VoteOption=t.protobufPackage=void 0;let o=r(14841),a=r(11879),s=r(9990),l=r(84849),u=r(46554),d=r(99133);function c(e){switch(e){case 0:case"VOTE_OPTION_UNSPECIFIED":return n.VOTE_OPTION_UNSPECIFIED;case 1:case"VOTE_OPTION_YES":return n.VOTE_OPTION_YES;case 2:case"VOTE_OPTION_ABSTAIN":return n.VOTE_OPTION_ABSTAIN;case 3:case"VOTE_OPTION_NO":return n.VOTE_OPTION_NO;case 4:case"VOTE_OPTION_NO_WITH_VETO":return n.VOTE_OPTION_NO_WITH_VETO;default:return n.UNRECOGNIZED}}function p(e){switch(e){case n.VOTE_OPTION_UNSPECIFIED:return"VOTE_OPTION_UNSPECIFIED";case n.VOTE_OPTION_YES:return"VOTE_OPTION_YES";case n.VOTE_OPTION_ABSTAIN:return"VOTE_OPTION_ABSTAIN";case n.VOTE_OPTION_NO:return"VOTE_OPTION_NO";case n.VOTE_OPTION_NO_WITH_VETO:return"VOTE_OPTION_NO_WITH_VETO";case n.UNRECOGNIZED:default:return"UNRECOGNIZED"}}function f(e){switch(e){case 0:case"PROPOSAL_STATUS_UNSPECIFIED":return i.PROPOSAL_STATUS_UNSPECIFIED;case 1:case"PROPOSAL_STATUS_DEPOSIT_PERIOD":return i.PROPOSAL_STATUS_DEPOSIT_PERIOD;case 2:case"PROPOSAL_STATUS_VOTING_PERIOD":return i.PROPOSAL_STATUS_VOTING_PERIOD;case 3:case"PROPOSAL_STATUS_PASSED":return i.PROPOSAL_STATUS_PASSED;case 4:case"PROPOSAL_STATUS_REJECTED":return i.PROPOSAL_STATUS_REJECTED;case 5:case"PROPOSAL_STATUS_FAILED":return i.PROPOSAL_STATUS_FAILED;default:return i.UNRECOGNIZED}}function h(e){switch(e){case i.PROPOSAL_STATUS_UNSPECIFIED:return"PROPOSAL_STATUS_UNSPECIFIED";case i.PROPOSAL_STATUS_DEPOSIT_PERIOD:return"PROPOSAL_STATUS_DEPOSIT_PERIOD";case i.PROPOSAL_STATUS_VOTING_PERIOD:return"PROPOSAL_STATUS_VOTING_PERIOD";case i.PROPOSAL_STATUS_PASSED:return"PROPOSAL_STATUS_PASSED";case i.PROPOSAL_STATUS_REJECTED:return"PROPOSAL_STATUS_REJECTED";case i.PROPOSAL_STATUS_FAILED:return"PROPOSAL_STATUS_FAILED";case i.UNRECOGNIZED:default:return"UNRECOGNIZED"}}function g(){return{option:0,weight:""}}function m(){return{proposalId:BigInt(0),depositor:"",amount:[]}}function y(){return{id:BigInt(0),messages:[],status:0,finalTallyResult:void 0,submitTime:void 0,depositEndTime:void 0,totalDeposit:[],votingStartTime:void 0,votingEndTime:void 0,metadata:"",title:"",summary:"",proposer:""}}function v(){return{yesCount:"",abstainCount:"",noCount:"",noWithVetoCount:""}}function b(){return{proposalId:BigInt(0),voter:"",options:[],metadata:""}}function S(){return{minDeposit:[],maxDepositPeriod:void 0}}function w(){return{votingPeriod:void 0}}function _(){return{quorum:"",threshold:"",vetoThreshold:""}}function k(){return{minDeposit:[],maxDepositPeriod:void 0,votingPeriod:void 0,quorum:"",threshold:"",vetoThreshold:"",minInitialDepositRatio:"",burnVoteQuorum:!1,burnProposalDepositPrevote:!1,burnVoteVeto:!1}}t.protobufPackage="cosmos.gov.v1",function(e){e[e.VOTE_OPTION_UNSPECIFIED=0]="VOTE_OPTION_UNSPECIFIED",e[e.VOTE_OPTION_YES=1]="VOTE_OPTION_YES",e[e.VOTE_OPTION_ABSTAIN=2]="VOTE_OPTION_ABSTAIN",e[e.VOTE_OPTION_NO=3]="VOTE_OPTION_NO",e[e.VOTE_OPTION_NO_WITH_VETO=4]="VOTE_OPTION_NO_WITH_VETO",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(n||(t.VoteOption=n={})),t.voteOptionFromJSON=c,t.voteOptionToJSON=p,function(e){e[e.PROPOSAL_STATUS_UNSPECIFIED=0]="PROPOSAL_STATUS_UNSPECIFIED",e[e.PROPOSAL_STATUS_DEPOSIT_PERIOD=1]="PROPOSAL_STATUS_DEPOSIT_PERIOD",e[e.PROPOSAL_STATUS_VOTING_PERIOD=2]="PROPOSAL_STATUS_VOTING_PERIOD",e[e.PROPOSAL_STATUS_PASSED=3]="PROPOSAL_STATUS_PASSED",e[e.PROPOSAL_STATUS_REJECTED=4]="PROPOSAL_STATUS_REJECTED",e[e.PROPOSAL_STATUS_FAILED=5]="PROPOSAL_STATUS_FAILED",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(i||(t.ProposalStatus=i={})),t.proposalStatusFromJSON=f,t.proposalStatusToJSON=h,t.WeightedVoteOption={typeUrl:"/cosmos.gov.v1.WeightedVoteOption",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.BinaryWriter.create();return 0!==e.option&&t.uint32(8).int32(e.option),""!==e.weight&&t.uint32(18).string(e.weight),t},decode(e,t){let r=e instanceof u.BinaryReader?e:new u.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=g();for(;r.pos>>3){case 1:i.option=r.int32();break;case 2:i.weight=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=g();return(0,d.isSet)(e.option)&&(t.option=c(e.option)),(0,d.isSet)(e.weight)&&(t.weight=String(e.weight)),t},toJSON(e){let t={};return void 0!==e.option&&(t.option=p(e.option)),void 0!==e.weight&&(t.weight=e.weight),t},fromPartial(e){var t,r;let n=g();return n.option=null!==(t=e.option)&&void 0!==t?t:0,n.weight=null!==(r=e.weight)&&void 0!==r?r:"",n}},t.Deposit={typeUrl:"/cosmos.gov.v1.Deposit",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.BinaryWriter.create();for(let r of(e.proposalId!==BigInt(0)&&t.uint32(8).uint64(e.proposalId),""!==e.depositor&&t.uint32(18).string(e.depositor),e.amount))o.Coin.encode(r,t.uint32(26).fork()).ldelim();return t},decode(e,t){let r=e instanceof u.BinaryReader?e:new u.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=m();for(;r.pos>>3){case 1:i.proposalId=r.uint64();break;case 2:i.depositor=r.string();break;case 3:i.amount.push(o.Coin.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=m();return(0,d.isSet)(e.proposalId)&&(t.proposalId=BigInt(e.proposalId.toString())),(0,d.isSet)(e.depositor)&&(t.depositor=String(e.depositor)),Array.isArray(null==e?void 0:e.amount)&&(t.amount=e.amount.map(e=>o.Coin.fromJSON(e))),t},toJSON(e){let t={};return void 0!==e.proposalId&&(t.proposalId=(e.proposalId||BigInt(0)).toString()),void 0!==e.depositor&&(t.depositor=e.depositor),e.amount?t.amount=e.amount.map(e=>e?o.Coin.toJSON(e):void 0):t.amount=[],t},fromPartial(e){var t,r;let n=m();return void 0!==e.proposalId&&null!==e.proposalId&&(n.proposalId=BigInt(e.proposalId.toString())),n.depositor=null!==(r=e.depositor)&&void 0!==r?r:"",n.amount=(null===(t=e.amount)||void 0===t?void 0:t.map(e=>o.Coin.fromPartial(e)))||[],n}},t.Proposal={typeUrl:"/cosmos.gov.v1.Proposal",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.BinaryWriter.create();for(let t of(e.id!==BigInt(0)&&r.uint32(8).uint64(e.id),e.messages))a.Any.encode(t,r.uint32(18).fork()).ldelim();for(let n of(0!==e.status&&r.uint32(24).int32(e.status),void 0!==e.finalTallyResult&&t.TallyResult.encode(e.finalTallyResult,r.uint32(34).fork()).ldelim(),void 0!==e.submitTime&&s.Timestamp.encode(e.submitTime,r.uint32(42).fork()).ldelim(),void 0!==e.depositEndTime&&s.Timestamp.encode(e.depositEndTime,r.uint32(50).fork()).ldelim(),e.totalDeposit))o.Coin.encode(n,r.uint32(58).fork()).ldelim();return void 0!==e.votingStartTime&&s.Timestamp.encode(e.votingStartTime,r.uint32(66).fork()).ldelim(),void 0!==e.votingEndTime&&s.Timestamp.encode(e.votingEndTime,r.uint32(74).fork()).ldelim(),""!==e.metadata&&r.uint32(82).string(e.metadata),""!==e.title&&r.uint32(90).string(e.title),""!==e.summary&&r.uint32(98).string(e.summary),""!==e.proposer&&r.uint32(106).string(e.proposer),r},decode(e,r){let n=e instanceof u.BinaryReader?e:new u.BinaryReader(e),i=void 0===r?n.len:n.pos+r,l=y();for(;n.pos>>3){case 1:l.id=n.uint64();break;case 2:l.messages.push(a.Any.decode(n,n.uint32()));break;case 3:l.status=n.int32();break;case 4:l.finalTallyResult=t.TallyResult.decode(n,n.uint32());break;case 5:l.submitTime=s.Timestamp.decode(n,n.uint32());break;case 6:l.depositEndTime=s.Timestamp.decode(n,n.uint32());break;case 7:l.totalDeposit.push(o.Coin.decode(n,n.uint32()));break;case 8:l.votingStartTime=s.Timestamp.decode(n,n.uint32());break;case 9:l.votingEndTime=s.Timestamp.decode(n,n.uint32());break;case 10:l.metadata=n.string();break;case 11:l.title=n.string();break;case 12:l.summary=n.string();break;case 13:l.proposer=n.string();break;default:n.skipType(7&e)}}return l},fromJSON(e){let r=y();return(0,d.isSet)(e.id)&&(r.id=BigInt(e.id.toString())),Array.isArray(null==e?void 0:e.messages)&&(r.messages=e.messages.map(e=>a.Any.fromJSON(e))),(0,d.isSet)(e.status)&&(r.status=f(e.status)),(0,d.isSet)(e.finalTallyResult)&&(r.finalTallyResult=t.TallyResult.fromJSON(e.finalTallyResult)),(0,d.isSet)(e.submitTime)&&(r.submitTime=(0,d.fromJsonTimestamp)(e.submitTime)),(0,d.isSet)(e.depositEndTime)&&(r.depositEndTime=(0,d.fromJsonTimestamp)(e.depositEndTime)),Array.isArray(null==e?void 0:e.totalDeposit)&&(r.totalDeposit=e.totalDeposit.map(e=>o.Coin.fromJSON(e))),(0,d.isSet)(e.votingStartTime)&&(r.votingStartTime=(0,d.fromJsonTimestamp)(e.votingStartTime)),(0,d.isSet)(e.votingEndTime)&&(r.votingEndTime=(0,d.fromJsonTimestamp)(e.votingEndTime)),(0,d.isSet)(e.metadata)&&(r.metadata=String(e.metadata)),(0,d.isSet)(e.title)&&(r.title=String(e.title)),(0,d.isSet)(e.summary)&&(r.summary=String(e.summary)),(0,d.isSet)(e.proposer)&&(r.proposer=String(e.proposer)),r},toJSON(e){let r={};return void 0!==e.id&&(r.id=(e.id||BigInt(0)).toString()),e.messages?r.messages=e.messages.map(e=>e?a.Any.toJSON(e):void 0):r.messages=[],void 0!==e.status&&(r.status=h(e.status)),void 0!==e.finalTallyResult&&(r.finalTallyResult=e.finalTallyResult?t.TallyResult.toJSON(e.finalTallyResult):void 0),void 0!==e.submitTime&&(r.submitTime=(0,d.fromTimestamp)(e.submitTime).toISOString()),void 0!==e.depositEndTime&&(r.depositEndTime=(0,d.fromTimestamp)(e.depositEndTime).toISOString()),e.totalDeposit?r.totalDeposit=e.totalDeposit.map(e=>e?o.Coin.toJSON(e):void 0):r.totalDeposit=[],void 0!==e.votingStartTime&&(r.votingStartTime=(0,d.fromTimestamp)(e.votingStartTime).toISOString()),void 0!==e.votingEndTime&&(r.votingEndTime=(0,d.fromTimestamp)(e.votingEndTime).toISOString()),void 0!==e.metadata&&(r.metadata=e.metadata),void 0!==e.title&&(r.title=e.title),void 0!==e.summary&&(r.summary=e.summary),void 0!==e.proposer&&(r.proposer=e.proposer),r},fromPartial(e){var r,n,i,l,u,d,c;let p=y();return void 0!==e.id&&null!==e.id&&(p.id=BigInt(e.id.toString())),p.messages=(null===(r=e.messages)||void 0===r?void 0:r.map(e=>a.Any.fromPartial(e)))||[],p.status=null!==(i=e.status)&&void 0!==i?i:0,void 0!==e.finalTallyResult&&null!==e.finalTallyResult&&(p.finalTallyResult=t.TallyResult.fromPartial(e.finalTallyResult)),void 0!==e.submitTime&&null!==e.submitTime&&(p.submitTime=s.Timestamp.fromPartial(e.submitTime)),void 0!==e.depositEndTime&&null!==e.depositEndTime&&(p.depositEndTime=s.Timestamp.fromPartial(e.depositEndTime)),p.totalDeposit=(null===(n=e.totalDeposit)||void 0===n?void 0:n.map(e=>o.Coin.fromPartial(e)))||[],void 0!==e.votingStartTime&&null!==e.votingStartTime&&(p.votingStartTime=s.Timestamp.fromPartial(e.votingStartTime)),void 0!==e.votingEndTime&&null!==e.votingEndTime&&(p.votingEndTime=s.Timestamp.fromPartial(e.votingEndTime)),p.metadata=null!==(l=e.metadata)&&void 0!==l?l:"",p.title=null!==(u=e.title)&&void 0!==u?u:"",p.summary=null!==(d=e.summary)&&void 0!==d?d:"",p.proposer=null!==(c=e.proposer)&&void 0!==c?c:"",p}},t.TallyResult={typeUrl:"/cosmos.gov.v1.TallyResult",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.BinaryWriter.create();return""!==e.yesCount&&t.uint32(10).string(e.yesCount),""!==e.abstainCount&&t.uint32(18).string(e.abstainCount),""!==e.noCount&&t.uint32(26).string(e.noCount),""!==e.noWithVetoCount&&t.uint32(34).string(e.noWithVetoCount),t},decode(e,t){let r=e instanceof u.BinaryReader?e:new u.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=v();for(;r.pos>>3){case 1:i.yesCount=r.string();break;case 2:i.abstainCount=r.string();break;case 3:i.noCount=r.string();break;case 4:i.noWithVetoCount=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=v();return(0,d.isSet)(e.yesCount)&&(t.yesCount=String(e.yesCount)),(0,d.isSet)(e.abstainCount)&&(t.abstainCount=String(e.abstainCount)),(0,d.isSet)(e.noCount)&&(t.noCount=String(e.noCount)),(0,d.isSet)(e.noWithVetoCount)&&(t.noWithVetoCount=String(e.noWithVetoCount)),t},toJSON(e){let t={};return void 0!==e.yesCount&&(t.yesCount=e.yesCount),void 0!==e.abstainCount&&(t.abstainCount=e.abstainCount),void 0!==e.noCount&&(t.noCount=e.noCount),void 0!==e.noWithVetoCount&&(t.noWithVetoCount=e.noWithVetoCount),t},fromPartial(e){var t,r,n,i;let o=v();return o.yesCount=null!==(t=e.yesCount)&&void 0!==t?t:"",o.abstainCount=null!==(r=e.abstainCount)&&void 0!==r?r:"",o.noCount=null!==(n=e.noCount)&&void 0!==n?n:"",o.noWithVetoCount=null!==(i=e.noWithVetoCount)&&void 0!==i?i:"",o}},t.Vote={typeUrl:"/cosmos.gov.v1.Vote",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.BinaryWriter.create();for(let n of(e.proposalId!==BigInt(0)&&r.uint32(8).uint64(e.proposalId),""!==e.voter&&r.uint32(18).string(e.voter),e.options))t.WeightedVoteOption.encode(n,r.uint32(34).fork()).ldelim();return""!==e.metadata&&r.uint32(42).string(e.metadata),r},decode(e,r){let n=e instanceof u.BinaryReader?e:new u.BinaryReader(e),i=void 0===r?n.len:n.pos+r,o=b();for(;n.pos>>3){case 1:o.proposalId=n.uint64();break;case 2:o.voter=n.string();break;case 4:o.options.push(t.WeightedVoteOption.decode(n,n.uint32()));break;case 5:o.metadata=n.string();break;default:n.skipType(7&e)}}return o},fromJSON(e){let r=b();return(0,d.isSet)(e.proposalId)&&(r.proposalId=BigInt(e.proposalId.toString())),(0,d.isSet)(e.voter)&&(r.voter=String(e.voter)),Array.isArray(null==e?void 0:e.options)&&(r.options=e.options.map(e=>t.WeightedVoteOption.fromJSON(e))),(0,d.isSet)(e.metadata)&&(r.metadata=String(e.metadata)),r},toJSON(e){let r={};return void 0!==e.proposalId&&(r.proposalId=(e.proposalId||BigInt(0)).toString()),void 0!==e.voter&&(r.voter=e.voter),e.options?r.options=e.options.map(e=>e?t.WeightedVoteOption.toJSON(e):void 0):r.options=[],void 0!==e.metadata&&(r.metadata=e.metadata),r},fromPartial(e){var r,n,i;let o=b();return void 0!==e.proposalId&&null!==e.proposalId&&(o.proposalId=BigInt(e.proposalId.toString())),o.voter=null!==(n=e.voter)&&void 0!==n?n:"",o.options=(null===(r=e.options)||void 0===r?void 0:r.map(e=>t.WeightedVoteOption.fromPartial(e)))||[],o.metadata=null!==(i=e.metadata)&&void 0!==i?i:"",o}},t.DepositParams={typeUrl:"/cosmos.gov.v1.DepositParams",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.BinaryWriter.create();for(let r of e.minDeposit)o.Coin.encode(r,t.uint32(10).fork()).ldelim();return void 0!==e.maxDepositPeriod&&l.Duration.encode(e.maxDepositPeriod,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof u.BinaryReader?e:new u.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=S();for(;r.pos>>3){case 1:i.minDeposit.push(o.Coin.decode(r,r.uint32()));break;case 2:i.maxDepositPeriod=l.Duration.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=S();return Array.isArray(null==e?void 0:e.minDeposit)&&(t.minDeposit=e.minDeposit.map(e=>o.Coin.fromJSON(e))),(0,d.isSet)(e.maxDepositPeriod)&&(t.maxDepositPeriod=l.Duration.fromJSON(e.maxDepositPeriod)),t},toJSON(e){let t={};return e.minDeposit?t.minDeposit=e.minDeposit.map(e=>e?o.Coin.toJSON(e):void 0):t.minDeposit=[],void 0!==e.maxDepositPeriod&&(t.maxDepositPeriod=e.maxDepositPeriod?l.Duration.toJSON(e.maxDepositPeriod):void 0),t},fromPartial(e){var t;let r=S();return r.minDeposit=(null===(t=e.minDeposit)||void 0===t?void 0:t.map(e=>o.Coin.fromPartial(e)))||[],void 0!==e.maxDepositPeriod&&null!==e.maxDepositPeriod&&(r.maxDepositPeriod=l.Duration.fromPartial(e.maxDepositPeriod)),r}},t.VotingParams={typeUrl:"/cosmos.gov.v1.VotingParams",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.BinaryWriter.create();return void 0!==e.votingPeriod&&l.Duration.encode(e.votingPeriod,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof u.BinaryReader?e:new u.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=w();for(;r.pos>>3==1?i.votingPeriod=l.Duration.decode(r,r.uint32()):r.skipType(7&e)}return i},fromJSON(e){let t=w();return(0,d.isSet)(e.votingPeriod)&&(t.votingPeriod=l.Duration.fromJSON(e.votingPeriod)),t},toJSON(e){let t={};return void 0!==e.votingPeriod&&(t.votingPeriod=e.votingPeriod?l.Duration.toJSON(e.votingPeriod):void 0),t},fromPartial(e){let t=w();return void 0!==e.votingPeriod&&null!==e.votingPeriod&&(t.votingPeriod=l.Duration.fromPartial(e.votingPeriod)),t}},t.TallyParams={typeUrl:"/cosmos.gov.v1.TallyParams",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.BinaryWriter.create();return""!==e.quorum&&t.uint32(10).string(e.quorum),""!==e.threshold&&t.uint32(18).string(e.threshold),""!==e.vetoThreshold&&t.uint32(26).string(e.vetoThreshold),t},decode(e,t){let r=e instanceof u.BinaryReader?e:new u.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=_();for(;r.pos>>3){case 1:i.quorum=r.string();break;case 2:i.threshold=r.string();break;case 3:i.vetoThreshold=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=_();return(0,d.isSet)(e.quorum)&&(t.quorum=String(e.quorum)),(0,d.isSet)(e.threshold)&&(t.threshold=String(e.threshold)),(0,d.isSet)(e.vetoThreshold)&&(t.vetoThreshold=String(e.vetoThreshold)),t},toJSON(e){let t={};return void 0!==e.quorum&&(t.quorum=e.quorum),void 0!==e.threshold&&(t.threshold=e.threshold),void 0!==e.vetoThreshold&&(t.vetoThreshold=e.vetoThreshold),t},fromPartial(e){var t,r,n;let i=_();return i.quorum=null!==(t=e.quorum)&&void 0!==t?t:"",i.threshold=null!==(r=e.threshold)&&void 0!==r?r:"",i.vetoThreshold=null!==(n=e.vetoThreshold)&&void 0!==n?n:"",i}},t.Params={typeUrl:"/cosmos.gov.v1.Params",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.BinaryWriter.create();for(let r of e.minDeposit)o.Coin.encode(r,t.uint32(10).fork()).ldelim();return void 0!==e.maxDepositPeriod&&l.Duration.encode(e.maxDepositPeriod,t.uint32(18).fork()).ldelim(),void 0!==e.votingPeriod&&l.Duration.encode(e.votingPeriod,t.uint32(26).fork()).ldelim(),""!==e.quorum&&t.uint32(34).string(e.quorum),""!==e.threshold&&t.uint32(42).string(e.threshold),""!==e.vetoThreshold&&t.uint32(50).string(e.vetoThreshold),""!==e.minInitialDepositRatio&&t.uint32(58).string(e.minInitialDepositRatio),!0===e.burnVoteQuorum&&t.uint32(104).bool(e.burnVoteQuorum),!0===e.burnProposalDepositPrevote&&t.uint32(112).bool(e.burnProposalDepositPrevote),!0===e.burnVoteVeto&&t.uint32(120).bool(e.burnVoteVeto),t},decode(e,t){let r=e instanceof u.BinaryReader?e:new u.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=k();for(;r.pos>>3){case 1:i.minDeposit.push(o.Coin.decode(r,r.uint32()));break;case 2:i.maxDepositPeriod=l.Duration.decode(r,r.uint32());break;case 3:i.votingPeriod=l.Duration.decode(r,r.uint32());break;case 4:i.quorum=r.string();break;case 5:i.threshold=r.string();break;case 6:i.vetoThreshold=r.string();break;case 7:i.minInitialDepositRatio=r.string();break;case 13:i.burnVoteQuorum=r.bool();break;case 14:i.burnProposalDepositPrevote=r.bool();break;case 15:i.burnVoteVeto=r.bool();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=k();return Array.isArray(null==e?void 0:e.minDeposit)&&(t.minDeposit=e.minDeposit.map(e=>o.Coin.fromJSON(e))),(0,d.isSet)(e.maxDepositPeriod)&&(t.maxDepositPeriod=l.Duration.fromJSON(e.maxDepositPeriod)),(0,d.isSet)(e.votingPeriod)&&(t.votingPeriod=l.Duration.fromJSON(e.votingPeriod)),(0,d.isSet)(e.quorum)&&(t.quorum=String(e.quorum)),(0,d.isSet)(e.threshold)&&(t.threshold=String(e.threshold)),(0,d.isSet)(e.vetoThreshold)&&(t.vetoThreshold=String(e.vetoThreshold)),(0,d.isSet)(e.minInitialDepositRatio)&&(t.minInitialDepositRatio=String(e.minInitialDepositRatio)),(0,d.isSet)(e.burnVoteQuorum)&&(t.burnVoteQuorum=!!e.burnVoteQuorum),(0,d.isSet)(e.burnProposalDepositPrevote)&&(t.burnProposalDepositPrevote=!!e.burnProposalDepositPrevote),(0,d.isSet)(e.burnVoteVeto)&&(t.burnVoteVeto=!!e.burnVoteVeto),t},toJSON(e){let t={};return e.minDeposit?t.minDeposit=e.minDeposit.map(e=>e?o.Coin.toJSON(e):void 0):t.minDeposit=[],void 0!==e.maxDepositPeriod&&(t.maxDepositPeriod=e.maxDepositPeriod?l.Duration.toJSON(e.maxDepositPeriod):void 0),void 0!==e.votingPeriod&&(t.votingPeriod=e.votingPeriod?l.Duration.toJSON(e.votingPeriod):void 0),void 0!==e.quorum&&(t.quorum=e.quorum),void 0!==e.threshold&&(t.threshold=e.threshold),void 0!==e.vetoThreshold&&(t.vetoThreshold=e.vetoThreshold),void 0!==e.minInitialDepositRatio&&(t.minInitialDepositRatio=e.minInitialDepositRatio),void 0!==e.burnVoteQuorum&&(t.burnVoteQuorum=e.burnVoteQuorum),void 0!==e.burnProposalDepositPrevote&&(t.burnProposalDepositPrevote=e.burnProposalDepositPrevote),void 0!==e.burnVoteVeto&&(t.burnVoteVeto=e.burnVoteVeto),t},fromPartial(e){var t,r,n,i,a,s,u,d;let c=k();return c.minDeposit=(null===(t=e.minDeposit)||void 0===t?void 0:t.map(e=>o.Coin.fromPartial(e)))||[],void 0!==e.maxDepositPeriod&&null!==e.maxDepositPeriod&&(c.maxDepositPeriod=l.Duration.fromPartial(e.maxDepositPeriod)),void 0!==e.votingPeriod&&null!==e.votingPeriod&&(c.votingPeriod=l.Duration.fromPartial(e.votingPeriod)),c.quorum=null!==(r=e.quorum)&&void 0!==r?r:"",c.threshold=null!==(n=e.threshold)&&void 0!==n?n:"",c.vetoThreshold=null!==(i=e.vetoThreshold)&&void 0!==i?i:"",c.minInitialDepositRatio=null!==(a=e.minInitialDepositRatio)&&void 0!==a?a:"",c.burnVoteQuorum=null!==(s=e.burnVoteQuorum)&&void 0!==s&&s,c.burnProposalDepositPrevote=null!==(u=e.burnProposalDepositPrevote)&&void 0!==u&&u,c.burnVoteVeto=null!==(d=e.burnVoteVeto)&&void 0!==d&&d,c}}},98743:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MsgClientImpl=t.MsgUpdateParamsResponse=t.MsgUpdateParams=t.MsgDepositResponse=t.MsgDeposit=t.MsgVoteWeightedResponse=t.MsgVoteWeighted=t.MsgVoteResponse=t.MsgVote=t.MsgExecLegacyContentResponse=t.MsgExecLegacyContent=t.MsgSubmitProposalResponse=t.MsgSubmitProposal=t.protobufPackage=void 0;let n=r(11879),i=r(14841),o=r(95653),a=r(46554),s=r(99133);function l(){return{messages:[],initialDeposit:[],proposer:"",metadata:"",title:"",summary:""}}function u(){return{proposalId:BigInt(0)}}function d(){return{content:void 0,authority:""}}function c(){return{}}function p(){return{proposalId:BigInt(0),voter:"",option:0,metadata:""}}function f(){return{}}function h(){return{proposalId:BigInt(0),voter:"",options:[],metadata:""}}function g(){return{}}function m(){return{proposalId:BigInt(0),depositor:"",amount:[]}}function y(){return{}}function v(){return{authority:"",params:o.Params.fromPartial({})}}function b(){return{}}t.protobufPackage="cosmos.gov.v1",t.MsgSubmitProposal={typeUrl:"/cosmos.gov.v1.MsgSubmitProposal",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();for(let r of e.messages)n.Any.encode(r,t.uint32(10).fork()).ldelim();for(let r of e.initialDeposit)i.Coin.encode(r,t.uint32(18).fork()).ldelim();return""!==e.proposer&&t.uint32(26).string(e.proposer),""!==e.metadata&&t.uint32(34).string(e.metadata),""!==e.title&&t.uint32(42).string(e.title),""!==e.summary&&t.uint32(50).string(e.summary),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),o=void 0===t?r.len:r.pos+t,s=l();for(;r.pos>>3){case 1:s.messages.push(n.Any.decode(r,r.uint32()));break;case 2:s.initialDeposit.push(i.Coin.decode(r,r.uint32()));break;case 3:s.proposer=r.string();break;case 4:s.metadata=r.string();break;case 5:s.title=r.string();break;case 6:s.summary=r.string();break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=l();return Array.isArray(null==e?void 0:e.messages)&&(t.messages=e.messages.map(e=>n.Any.fromJSON(e))),Array.isArray(null==e?void 0:e.initialDeposit)&&(t.initialDeposit=e.initialDeposit.map(e=>i.Coin.fromJSON(e))),(0,s.isSet)(e.proposer)&&(t.proposer=String(e.proposer)),(0,s.isSet)(e.metadata)&&(t.metadata=String(e.metadata)),(0,s.isSet)(e.title)&&(t.title=String(e.title)),(0,s.isSet)(e.summary)&&(t.summary=String(e.summary)),t},toJSON(e){let t={};return e.messages?t.messages=e.messages.map(e=>e?n.Any.toJSON(e):void 0):t.messages=[],e.initialDeposit?t.initialDeposit=e.initialDeposit.map(e=>e?i.Coin.toJSON(e):void 0):t.initialDeposit=[],void 0!==e.proposer&&(t.proposer=e.proposer),void 0!==e.metadata&&(t.metadata=e.metadata),void 0!==e.title&&(t.title=e.title),void 0!==e.summary&&(t.summary=e.summary),t},fromPartial(e){var t,r,o,a,s,u;let d=l();return d.messages=(null===(t=e.messages)||void 0===t?void 0:t.map(e=>n.Any.fromPartial(e)))||[],d.initialDeposit=(null===(r=e.initialDeposit)||void 0===r?void 0:r.map(e=>i.Coin.fromPartial(e)))||[],d.proposer=null!==(o=e.proposer)&&void 0!==o?o:"",d.metadata=null!==(a=e.metadata)&&void 0!==a?a:"",d.title=null!==(s=e.title)&&void 0!==s?s:"",d.summary=null!==(u=e.summary)&&void 0!==u?u:"",d}},t.MsgSubmitProposalResponse={typeUrl:"/cosmos.gov.v1.MsgSubmitProposalResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return e.proposalId!==BigInt(0)&&t.uint32(8).uint64(e.proposalId),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=u();for(;r.pos>>3==1?i.proposalId=r.uint64():r.skipType(7&e)}return i},fromJSON(e){let t=u();return(0,s.isSet)(e.proposalId)&&(t.proposalId=BigInt(e.proposalId.toString())),t},toJSON(e){let t={};return void 0!==e.proposalId&&(t.proposalId=(e.proposalId||BigInt(0)).toString()),t},fromPartial(e){let t=u();return void 0!==e.proposalId&&null!==e.proposalId&&(t.proposalId=BigInt(e.proposalId.toString())),t}},t.MsgExecLegacyContent={typeUrl:"/cosmos.gov.v1.MsgExecLegacyContent",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return void 0!==e.content&&n.Any.encode(e.content,t.uint32(10).fork()).ldelim(),""!==e.authority&&t.uint32(18).string(e.authority),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),i=void 0===t?r.len:r.pos+t,o=d();for(;r.pos>>3){case 1:o.content=n.Any.decode(r,r.uint32());break;case 2:o.authority=r.string();break;default:r.skipType(7&e)}}return o},fromJSON(e){let t=d();return(0,s.isSet)(e.content)&&(t.content=n.Any.fromJSON(e.content)),(0,s.isSet)(e.authority)&&(t.authority=String(e.authority)),t},toJSON(e){let t={};return void 0!==e.content&&(t.content=e.content?n.Any.toJSON(e.content):void 0),void 0!==e.authority&&(t.authority=e.authority),t},fromPartial(e){var t;let r=d();return void 0!==e.content&&null!==e.content&&(r.content=n.Any.fromPartial(e.content)),r.authority=null!==(t=e.authority)&&void 0!==t?t:"",r}},t.MsgExecLegacyContentResponse={typeUrl:"/cosmos.gov.v1.MsgExecLegacyContentResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=c();for(;r.posc(),toJSON:e=>({}),fromPartial:e=>c()},t.MsgVote={typeUrl:"/cosmos.gov.v1.MsgVote",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return e.proposalId!==BigInt(0)&&t.uint32(8).uint64(e.proposalId),""!==e.voter&&t.uint32(18).string(e.voter),0!==e.option&&t.uint32(24).int32(e.option),""!==e.metadata&&t.uint32(34).string(e.metadata),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=p();for(;r.pos>>3){case 1:i.proposalId=r.uint64();break;case 2:i.voter=r.string();break;case 3:i.option=r.int32();break;case 4:i.metadata=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=p();return(0,s.isSet)(e.proposalId)&&(t.proposalId=BigInt(e.proposalId.toString())),(0,s.isSet)(e.voter)&&(t.voter=String(e.voter)),(0,s.isSet)(e.option)&&(t.option=(0,o.voteOptionFromJSON)(e.option)),(0,s.isSet)(e.metadata)&&(t.metadata=String(e.metadata)),t},toJSON(e){let t={};return void 0!==e.proposalId&&(t.proposalId=(e.proposalId||BigInt(0)).toString()),void 0!==e.voter&&(t.voter=e.voter),void 0!==e.option&&(t.option=(0,o.voteOptionToJSON)(e.option)),void 0!==e.metadata&&(t.metadata=e.metadata),t},fromPartial(e){var t,r,n;let i=p();return void 0!==e.proposalId&&null!==e.proposalId&&(i.proposalId=BigInt(e.proposalId.toString())),i.voter=null!==(t=e.voter)&&void 0!==t?t:"",i.option=null!==(r=e.option)&&void 0!==r?r:0,i.metadata=null!==(n=e.metadata)&&void 0!==n?n:"",i}},t.MsgVoteResponse={typeUrl:"/cosmos.gov.v1.MsgVoteResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=f();for(;r.posf(),toJSON:e=>({}),fromPartial:e=>f()},t.MsgVoteWeighted={typeUrl:"/cosmos.gov.v1.MsgVoteWeighted",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();for(let r of(e.proposalId!==BigInt(0)&&t.uint32(8).uint64(e.proposalId),""!==e.voter&&t.uint32(18).string(e.voter),e.options))o.WeightedVoteOption.encode(r,t.uint32(26).fork()).ldelim();return""!==e.metadata&&t.uint32(34).string(e.metadata),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=h();for(;r.pos>>3){case 1:i.proposalId=r.uint64();break;case 2:i.voter=r.string();break;case 3:i.options.push(o.WeightedVoteOption.decode(r,r.uint32()));break;case 4:i.metadata=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=h();return(0,s.isSet)(e.proposalId)&&(t.proposalId=BigInt(e.proposalId.toString())),(0,s.isSet)(e.voter)&&(t.voter=String(e.voter)),Array.isArray(null==e?void 0:e.options)&&(t.options=e.options.map(e=>o.WeightedVoteOption.fromJSON(e))),(0,s.isSet)(e.metadata)&&(t.metadata=String(e.metadata)),t},toJSON(e){let t={};return void 0!==e.proposalId&&(t.proposalId=(e.proposalId||BigInt(0)).toString()),void 0!==e.voter&&(t.voter=e.voter),e.options?t.options=e.options.map(e=>e?o.WeightedVoteOption.toJSON(e):void 0):t.options=[],void 0!==e.metadata&&(t.metadata=e.metadata),t},fromPartial(e){var t,r,n;let i=h();return void 0!==e.proposalId&&null!==e.proposalId&&(i.proposalId=BigInt(e.proposalId.toString())),i.voter=null!==(r=e.voter)&&void 0!==r?r:"",i.options=(null===(t=e.options)||void 0===t?void 0:t.map(e=>o.WeightedVoteOption.fromPartial(e)))||[],i.metadata=null!==(n=e.metadata)&&void 0!==n?n:"",i}},t.MsgVoteWeightedResponse={typeUrl:"/cosmos.gov.v1.MsgVoteWeightedResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=g();for(;r.posg(),toJSON:e=>({}),fromPartial:e=>g()},t.MsgDeposit={typeUrl:"/cosmos.gov.v1.MsgDeposit",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();for(let r of(e.proposalId!==BigInt(0)&&t.uint32(8).uint64(e.proposalId),""!==e.depositor&&t.uint32(18).string(e.depositor),e.amount))i.Coin.encode(r,t.uint32(26).fork()).ldelim();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=m();for(;r.pos>>3){case 1:o.proposalId=r.uint64();break;case 2:o.depositor=r.string();break;case 3:o.amount.push(i.Coin.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return o},fromJSON(e){let t=m();return(0,s.isSet)(e.proposalId)&&(t.proposalId=BigInt(e.proposalId.toString())),(0,s.isSet)(e.depositor)&&(t.depositor=String(e.depositor)),Array.isArray(null==e?void 0:e.amount)&&(t.amount=e.amount.map(e=>i.Coin.fromJSON(e))),t},toJSON(e){let t={};return void 0!==e.proposalId&&(t.proposalId=(e.proposalId||BigInt(0)).toString()),void 0!==e.depositor&&(t.depositor=e.depositor),e.amount?t.amount=e.amount.map(e=>e?i.Coin.toJSON(e):void 0):t.amount=[],t},fromPartial(e){var t,r;let n=m();return void 0!==e.proposalId&&null!==e.proposalId&&(n.proposalId=BigInt(e.proposalId.toString())),n.depositor=null!==(r=e.depositor)&&void 0!==r?r:"",n.amount=(null===(t=e.amount)||void 0===t?void 0:t.map(e=>i.Coin.fromPartial(e)))||[],n}},t.MsgDepositResponse={typeUrl:"/cosmos.gov.v1.MsgDepositResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=y();for(;r.posy(),toJSON:e=>({}),fromPartial:e=>y()},t.MsgUpdateParams={typeUrl:"/cosmos.gov.v1.MsgUpdateParams",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.authority&&t.uint32(10).string(e.authority),void 0!==e.params&&o.Params.encode(e.params,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=v();for(;r.pos>>3){case 1:i.authority=r.string();break;case 2:i.params=o.Params.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=v();return(0,s.isSet)(e.authority)&&(t.authority=String(e.authority)),(0,s.isSet)(e.params)&&(t.params=o.Params.fromJSON(e.params)),t},toJSON(e){let t={};return void 0!==e.authority&&(t.authority=e.authority),void 0!==e.params&&(t.params=e.params?o.Params.toJSON(e.params):void 0),t},fromPartial(e){var t;let r=v();return r.authority=null!==(t=e.authority)&&void 0!==t?t:"",void 0!==e.params&&null!==e.params&&(r.params=o.Params.fromPartial(e.params)),r}},t.MsgUpdateParamsResponse={typeUrl:"/cosmos.gov.v1.MsgUpdateParamsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=b();for(;r.posb(),toJSON:e=>({}),fromPartial:e=>b()};class S{SubmitProposal(e){let r=t.MsgSubmitProposal.encode(e).finish();return this.rpc.request("cosmos.gov.v1.Msg","SubmitProposal",r).then(e=>t.MsgSubmitProposalResponse.decode(new a.BinaryReader(e)))}ExecLegacyContent(e){let r=t.MsgExecLegacyContent.encode(e).finish();return this.rpc.request("cosmos.gov.v1.Msg","ExecLegacyContent",r).then(e=>t.MsgExecLegacyContentResponse.decode(new a.BinaryReader(e)))}Vote(e){let r=t.MsgVote.encode(e).finish();return this.rpc.request("cosmos.gov.v1.Msg","Vote",r).then(e=>t.MsgVoteResponse.decode(new a.BinaryReader(e)))}VoteWeighted(e){let r=t.MsgVoteWeighted.encode(e).finish();return this.rpc.request("cosmos.gov.v1.Msg","VoteWeighted",r).then(e=>t.MsgVoteWeightedResponse.decode(new a.BinaryReader(e)))}Deposit(e){let r=t.MsgDeposit.encode(e).finish();return this.rpc.request("cosmos.gov.v1.Msg","Deposit",r).then(e=>t.MsgDepositResponse.decode(new a.BinaryReader(e)))}UpdateParams(e){let r=t.MsgUpdateParams.encode(e).finish();return this.rpc.request("cosmos.gov.v1.Msg","UpdateParams",r).then(e=>t.MsgUpdateParamsResponse.decode(new a.BinaryReader(e)))}constructor(e){this.rpc=e,this.SubmitProposal=this.SubmitProposal.bind(this),this.ExecLegacyContent=this.ExecLegacyContent.bind(this),this.Vote=this.Vote.bind(this),this.VoteWeighted=this.VoteWeighted.bind(this),this.Deposit=this.Deposit.bind(this),this.UpdateParams=this.UpdateParams.bind(this)}}t.MsgClientImpl=S},5309:function(e,t,r){"use strict";var n,i;Object.defineProperty(t,"__esModule",{value:!0}),t.TallyParams=t.VotingParams=t.DepositParams=t.Vote=t.TallyResult=t.Proposal=t.Deposit=t.TextProposal=t.WeightedVoteOption=t.proposalStatusToJSON=t.proposalStatusFromJSON=t.ProposalStatus=t.voteOptionToJSON=t.voteOptionFromJSON=t.VoteOption=t.protobufPackage=void 0;let o=r(14841),a=r(11879),s=r(9990),l=r(84849),u=r(46554),d=r(99133);function c(e){switch(e){case 0:case"VOTE_OPTION_UNSPECIFIED":return n.VOTE_OPTION_UNSPECIFIED;case 1:case"VOTE_OPTION_YES":return n.VOTE_OPTION_YES;case 2:case"VOTE_OPTION_ABSTAIN":return n.VOTE_OPTION_ABSTAIN;case 3:case"VOTE_OPTION_NO":return n.VOTE_OPTION_NO;case 4:case"VOTE_OPTION_NO_WITH_VETO":return n.VOTE_OPTION_NO_WITH_VETO;default:return n.UNRECOGNIZED}}function p(e){switch(e){case n.VOTE_OPTION_UNSPECIFIED:return"VOTE_OPTION_UNSPECIFIED";case n.VOTE_OPTION_YES:return"VOTE_OPTION_YES";case n.VOTE_OPTION_ABSTAIN:return"VOTE_OPTION_ABSTAIN";case n.VOTE_OPTION_NO:return"VOTE_OPTION_NO";case n.VOTE_OPTION_NO_WITH_VETO:return"VOTE_OPTION_NO_WITH_VETO";case n.UNRECOGNIZED:default:return"UNRECOGNIZED"}}function f(e){switch(e){case 0:case"PROPOSAL_STATUS_UNSPECIFIED":return i.PROPOSAL_STATUS_UNSPECIFIED;case 1:case"PROPOSAL_STATUS_DEPOSIT_PERIOD":return i.PROPOSAL_STATUS_DEPOSIT_PERIOD;case 2:case"PROPOSAL_STATUS_VOTING_PERIOD":return i.PROPOSAL_STATUS_VOTING_PERIOD;case 3:case"PROPOSAL_STATUS_PASSED":return i.PROPOSAL_STATUS_PASSED;case 4:case"PROPOSAL_STATUS_REJECTED":return i.PROPOSAL_STATUS_REJECTED;case 5:case"PROPOSAL_STATUS_FAILED":return i.PROPOSAL_STATUS_FAILED;default:return i.UNRECOGNIZED}}function h(e){switch(e){case i.PROPOSAL_STATUS_UNSPECIFIED:return"PROPOSAL_STATUS_UNSPECIFIED";case i.PROPOSAL_STATUS_DEPOSIT_PERIOD:return"PROPOSAL_STATUS_DEPOSIT_PERIOD";case i.PROPOSAL_STATUS_VOTING_PERIOD:return"PROPOSAL_STATUS_VOTING_PERIOD";case i.PROPOSAL_STATUS_PASSED:return"PROPOSAL_STATUS_PASSED";case i.PROPOSAL_STATUS_REJECTED:return"PROPOSAL_STATUS_REJECTED";case i.PROPOSAL_STATUS_FAILED:return"PROPOSAL_STATUS_FAILED";case i.UNRECOGNIZED:default:return"UNRECOGNIZED"}}function g(){return{option:0,weight:""}}function m(){return{title:"",description:""}}function y(){return{proposalId:BigInt(0),depositor:"",amount:[]}}function v(){return{proposalId:BigInt(0),content:void 0,status:0,finalTallyResult:t.TallyResult.fromPartial({}),submitTime:s.Timestamp.fromPartial({}),depositEndTime:s.Timestamp.fromPartial({}),totalDeposit:[],votingStartTime:s.Timestamp.fromPartial({}),votingEndTime:s.Timestamp.fromPartial({})}}function b(){return{yes:"",abstain:"",no:"",noWithVeto:""}}function S(){return{proposalId:BigInt(0),voter:"",option:0,options:[]}}function w(){return{minDeposit:[],maxDepositPeriod:l.Duration.fromPartial({})}}function _(){return{votingPeriod:l.Duration.fromPartial({})}}function k(){return{quorum:new Uint8Array,threshold:new Uint8Array,vetoThreshold:new Uint8Array}}t.protobufPackage="cosmos.gov.v1beta1",function(e){e[e.VOTE_OPTION_UNSPECIFIED=0]="VOTE_OPTION_UNSPECIFIED",e[e.VOTE_OPTION_YES=1]="VOTE_OPTION_YES",e[e.VOTE_OPTION_ABSTAIN=2]="VOTE_OPTION_ABSTAIN",e[e.VOTE_OPTION_NO=3]="VOTE_OPTION_NO",e[e.VOTE_OPTION_NO_WITH_VETO=4]="VOTE_OPTION_NO_WITH_VETO",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(n||(t.VoteOption=n={})),t.voteOptionFromJSON=c,t.voteOptionToJSON=p,function(e){e[e.PROPOSAL_STATUS_UNSPECIFIED=0]="PROPOSAL_STATUS_UNSPECIFIED",e[e.PROPOSAL_STATUS_DEPOSIT_PERIOD=1]="PROPOSAL_STATUS_DEPOSIT_PERIOD",e[e.PROPOSAL_STATUS_VOTING_PERIOD=2]="PROPOSAL_STATUS_VOTING_PERIOD",e[e.PROPOSAL_STATUS_PASSED=3]="PROPOSAL_STATUS_PASSED",e[e.PROPOSAL_STATUS_REJECTED=4]="PROPOSAL_STATUS_REJECTED",e[e.PROPOSAL_STATUS_FAILED=5]="PROPOSAL_STATUS_FAILED",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(i||(t.ProposalStatus=i={})),t.proposalStatusFromJSON=f,t.proposalStatusToJSON=h,t.WeightedVoteOption={typeUrl:"/cosmos.gov.v1beta1.WeightedVoteOption",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.BinaryWriter.create();return 0!==e.option&&t.uint32(8).int32(e.option),""!==e.weight&&t.uint32(18).string(e.weight),t},decode(e,t){let r=e instanceof u.BinaryReader?e:new u.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=g();for(;r.pos>>3){case 1:i.option=r.int32();break;case 2:i.weight=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=g();return(0,d.isSet)(e.option)&&(t.option=c(e.option)),(0,d.isSet)(e.weight)&&(t.weight=String(e.weight)),t},toJSON(e){let t={};return void 0!==e.option&&(t.option=p(e.option)),void 0!==e.weight&&(t.weight=e.weight),t},fromPartial(e){var t,r;let n=g();return n.option=null!==(t=e.option)&&void 0!==t?t:0,n.weight=null!==(r=e.weight)&&void 0!==r?r:"",n}},t.TextProposal={typeUrl:"/cosmos.gov.v1beta1.TextProposal",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.BinaryWriter.create();return""!==e.title&&t.uint32(10).string(e.title),""!==e.description&&t.uint32(18).string(e.description),t},decode(e,t){let r=e instanceof u.BinaryReader?e:new u.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=m();for(;r.pos>>3){case 1:i.title=r.string();break;case 2:i.description=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=m();return(0,d.isSet)(e.title)&&(t.title=String(e.title)),(0,d.isSet)(e.description)&&(t.description=String(e.description)),t},toJSON(e){let t={};return void 0!==e.title&&(t.title=e.title),void 0!==e.description&&(t.description=e.description),t},fromPartial(e){var t,r;let n=m();return n.title=null!==(t=e.title)&&void 0!==t?t:"",n.description=null!==(r=e.description)&&void 0!==r?r:"",n}},t.Deposit={typeUrl:"/cosmos.gov.v1beta1.Deposit",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.BinaryWriter.create();for(let r of(e.proposalId!==BigInt(0)&&t.uint32(8).uint64(e.proposalId),""!==e.depositor&&t.uint32(18).string(e.depositor),e.amount))o.Coin.encode(r,t.uint32(26).fork()).ldelim();return t},decode(e,t){let r=e instanceof u.BinaryReader?e:new u.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=y();for(;r.pos>>3){case 1:i.proposalId=r.uint64();break;case 2:i.depositor=r.string();break;case 3:i.amount.push(o.Coin.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=y();return(0,d.isSet)(e.proposalId)&&(t.proposalId=BigInt(e.proposalId.toString())),(0,d.isSet)(e.depositor)&&(t.depositor=String(e.depositor)),Array.isArray(null==e?void 0:e.amount)&&(t.amount=e.amount.map(e=>o.Coin.fromJSON(e))),t},toJSON(e){let t={};return void 0!==e.proposalId&&(t.proposalId=(e.proposalId||BigInt(0)).toString()),void 0!==e.depositor&&(t.depositor=e.depositor),e.amount?t.amount=e.amount.map(e=>e?o.Coin.toJSON(e):void 0):t.amount=[],t},fromPartial(e){var t,r;let n=y();return void 0!==e.proposalId&&null!==e.proposalId&&(n.proposalId=BigInt(e.proposalId.toString())),n.depositor=null!==(r=e.depositor)&&void 0!==r?r:"",n.amount=(null===(t=e.amount)||void 0===t?void 0:t.map(e=>o.Coin.fromPartial(e)))||[],n}},t.Proposal={typeUrl:"/cosmos.gov.v1beta1.Proposal",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.BinaryWriter.create();for(let n of(e.proposalId!==BigInt(0)&&r.uint32(8).uint64(e.proposalId),void 0!==e.content&&a.Any.encode(e.content,r.uint32(18).fork()).ldelim(),0!==e.status&&r.uint32(24).int32(e.status),void 0!==e.finalTallyResult&&t.TallyResult.encode(e.finalTallyResult,r.uint32(34).fork()).ldelim(),void 0!==e.submitTime&&s.Timestamp.encode(e.submitTime,r.uint32(42).fork()).ldelim(),void 0!==e.depositEndTime&&s.Timestamp.encode(e.depositEndTime,r.uint32(50).fork()).ldelim(),e.totalDeposit))o.Coin.encode(n,r.uint32(58).fork()).ldelim();return void 0!==e.votingStartTime&&s.Timestamp.encode(e.votingStartTime,r.uint32(66).fork()).ldelim(),void 0!==e.votingEndTime&&s.Timestamp.encode(e.votingEndTime,r.uint32(74).fork()).ldelim(),r},decode(e,r){let n=e instanceof u.BinaryReader?e:new u.BinaryReader(e),i=void 0===r?n.len:n.pos+r,l=v();for(;n.pos>>3){case 1:l.proposalId=n.uint64();break;case 2:l.content=a.Any.decode(n,n.uint32());break;case 3:l.status=n.int32();break;case 4:l.finalTallyResult=t.TallyResult.decode(n,n.uint32());break;case 5:l.submitTime=s.Timestamp.decode(n,n.uint32());break;case 6:l.depositEndTime=s.Timestamp.decode(n,n.uint32());break;case 7:l.totalDeposit.push(o.Coin.decode(n,n.uint32()));break;case 8:l.votingStartTime=s.Timestamp.decode(n,n.uint32());break;case 9:l.votingEndTime=s.Timestamp.decode(n,n.uint32());break;default:n.skipType(7&e)}}return l},fromJSON(e){let r=v();return(0,d.isSet)(e.proposalId)&&(r.proposalId=BigInt(e.proposalId.toString())),(0,d.isSet)(e.content)&&(r.content=a.Any.fromJSON(e.content)),(0,d.isSet)(e.status)&&(r.status=f(e.status)),(0,d.isSet)(e.finalTallyResult)&&(r.finalTallyResult=t.TallyResult.fromJSON(e.finalTallyResult)),(0,d.isSet)(e.submitTime)&&(r.submitTime=(0,d.fromJsonTimestamp)(e.submitTime)),(0,d.isSet)(e.depositEndTime)&&(r.depositEndTime=(0,d.fromJsonTimestamp)(e.depositEndTime)),Array.isArray(null==e?void 0:e.totalDeposit)&&(r.totalDeposit=e.totalDeposit.map(e=>o.Coin.fromJSON(e))),(0,d.isSet)(e.votingStartTime)&&(r.votingStartTime=(0,d.fromJsonTimestamp)(e.votingStartTime)),(0,d.isSet)(e.votingEndTime)&&(r.votingEndTime=(0,d.fromJsonTimestamp)(e.votingEndTime)),r},toJSON(e){let r={};return void 0!==e.proposalId&&(r.proposalId=(e.proposalId||BigInt(0)).toString()),void 0!==e.content&&(r.content=e.content?a.Any.toJSON(e.content):void 0),void 0!==e.status&&(r.status=h(e.status)),void 0!==e.finalTallyResult&&(r.finalTallyResult=e.finalTallyResult?t.TallyResult.toJSON(e.finalTallyResult):void 0),void 0!==e.submitTime&&(r.submitTime=(0,d.fromTimestamp)(e.submitTime).toISOString()),void 0!==e.depositEndTime&&(r.depositEndTime=(0,d.fromTimestamp)(e.depositEndTime).toISOString()),e.totalDeposit?r.totalDeposit=e.totalDeposit.map(e=>e?o.Coin.toJSON(e):void 0):r.totalDeposit=[],void 0!==e.votingStartTime&&(r.votingStartTime=(0,d.fromTimestamp)(e.votingStartTime).toISOString()),void 0!==e.votingEndTime&&(r.votingEndTime=(0,d.fromTimestamp)(e.votingEndTime).toISOString()),r},fromPartial(e){var r,n;let i=v();return void 0!==e.proposalId&&null!==e.proposalId&&(i.proposalId=BigInt(e.proposalId.toString())),void 0!==e.content&&null!==e.content&&(i.content=a.Any.fromPartial(e.content)),i.status=null!==(n=e.status)&&void 0!==n?n:0,void 0!==e.finalTallyResult&&null!==e.finalTallyResult&&(i.finalTallyResult=t.TallyResult.fromPartial(e.finalTallyResult)),void 0!==e.submitTime&&null!==e.submitTime&&(i.submitTime=s.Timestamp.fromPartial(e.submitTime)),void 0!==e.depositEndTime&&null!==e.depositEndTime&&(i.depositEndTime=s.Timestamp.fromPartial(e.depositEndTime)),i.totalDeposit=(null===(r=e.totalDeposit)||void 0===r?void 0:r.map(e=>o.Coin.fromPartial(e)))||[],void 0!==e.votingStartTime&&null!==e.votingStartTime&&(i.votingStartTime=s.Timestamp.fromPartial(e.votingStartTime)),void 0!==e.votingEndTime&&null!==e.votingEndTime&&(i.votingEndTime=s.Timestamp.fromPartial(e.votingEndTime)),i}},t.TallyResult={typeUrl:"/cosmos.gov.v1beta1.TallyResult",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.BinaryWriter.create();return""!==e.yes&&t.uint32(10).string(e.yes),""!==e.abstain&&t.uint32(18).string(e.abstain),""!==e.no&&t.uint32(26).string(e.no),""!==e.noWithVeto&&t.uint32(34).string(e.noWithVeto),t},decode(e,t){let r=e instanceof u.BinaryReader?e:new u.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=b();for(;r.pos>>3){case 1:i.yes=r.string();break;case 2:i.abstain=r.string();break;case 3:i.no=r.string();break;case 4:i.noWithVeto=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=b();return(0,d.isSet)(e.yes)&&(t.yes=String(e.yes)),(0,d.isSet)(e.abstain)&&(t.abstain=String(e.abstain)),(0,d.isSet)(e.no)&&(t.no=String(e.no)),(0,d.isSet)(e.noWithVeto)&&(t.noWithVeto=String(e.noWithVeto)),t},toJSON(e){let t={};return void 0!==e.yes&&(t.yes=e.yes),void 0!==e.abstain&&(t.abstain=e.abstain),void 0!==e.no&&(t.no=e.no),void 0!==e.noWithVeto&&(t.noWithVeto=e.noWithVeto),t},fromPartial(e){var t,r,n,i;let o=b();return o.yes=null!==(t=e.yes)&&void 0!==t?t:"",o.abstain=null!==(r=e.abstain)&&void 0!==r?r:"",o.no=null!==(n=e.no)&&void 0!==n?n:"",o.noWithVeto=null!==(i=e.noWithVeto)&&void 0!==i?i:"",o}},t.Vote={typeUrl:"/cosmos.gov.v1beta1.Vote",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.BinaryWriter.create();for(let n of(e.proposalId!==BigInt(0)&&r.uint32(8).uint64(e.proposalId),""!==e.voter&&r.uint32(18).string(e.voter),0!==e.option&&r.uint32(24).int32(e.option),e.options))t.WeightedVoteOption.encode(n,r.uint32(34).fork()).ldelim();return r},decode(e,r){let n=e instanceof u.BinaryReader?e:new u.BinaryReader(e),i=void 0===r?n.len:n.pos+r,o=S();for(;n.pos>>3){case 1:o.proposalId=n.uint64();break;case 2:o.voter=n.string();break;case 3:o.option=n.int32();break;case 4:o.options.push(t.WeightedVoteOption.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return o},fromJSON(e){let r=S();return(0,d.isSet)(e.proposalId)&&(r.proposalId=BigInt(e.proposalId.toString())),(0,d.isSet)(e.voter)&&(r.voter=String(e.voter)),(0,d.isSet)(e.option)&&(r.option=c(e.option)),Array.isArray(null==e?void 0:e.options)&&(r.options=e.options.map(e=>t.WeightedVoteOption.fromJSON(e))),r},toJSON(e){let r={};return void 0!==e.proposalId&&(r.proposalId=(e.proposalId||BigInt(0)).toString()),void 0!==e.voter&&(r.voter=e.voter),void 0!==e.option&&(r.option=p(e.option)),e.options?r.options=e.options.map(e=>e?t.WeightedVoteOption.toJSON(e):void 0):r.options=[],r},fromPartial(e){var r,n,i;let o=S();return void 0!==e.proposalId&&null!==e.proposalId&&(o.proposalId=BigInt(e.proposalId.toString())),o.voter=null!==(n=e.voter)&&void 0!==n?n:"",o.option=null!==(i=e.option)&&void 0!==i?i:0,o.options=(null===(r=e.options)||void 0===r?void 0:r.map(e=>t.WeightedVoteOption.fromPartial(e)))||[],o}},t.DepositParams={typeUrl:"/cosmos.gov.v1beta1.DepositParams",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.BinaryWriter.create();for(let r of e.minDeposit)o.Coin.encode(r,t.uint32(10).fork()).ldelim();return void 0!==e.maxDepositPeriod&&l.Duration.encode(e.maxDepositPeriod,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof u.BinaryReader?e:new u.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=w();for(;r.pos>>3){case 1:i.minDeposit.push(o.Coin.decode(r,r.uint32()));break;case 2:i.maxDepositPeriod=l.Duration.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=w();return Array.isArray(null==e?void 0:e.minDeposit)&&(t.minDeposit=e.minDeposit.map(e=>o.Coin.fromJSON(e))),(0,d.isSet)(e.maxDepositPeriod)&&(t.maxDepositPeriod=l.Duration.fromJSON(e.maxDepositPeriod)),t},toJSON(e){let t={};return e.minDeposit?t.minDeposit=e.minDeposit.map(e=>e?o.Coin.toJSON(e):void 0):t.minDeposit=[],void 0!==e.maxDepositPeriod&&(t.maxDepositPeriod=e.maxDepositPeriod?l.Duration.toJSON(e.maxDepositPeriod):void 0),t},fromPartial(e){var t;let r=w();return r.minDeposit=(null===(t=e.minDeposit)||void 0===t?void 0:t.map(e=>o.Coin.fromPartial(e)))||[],void 0!==e.maxDepositPeriod&&null!==e.maxDepositPeriod&&(r.maxDepositPeriod=l.Duration.fromPartial(e.maxDepositPeriod)),r}},t.VotingParams={typeUrl:"/cosmos.gov.v1beta1.VotingParams",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.BinaryWriter.create();return void 0!==e.votingPeriod&&l.Duration.encode(e.votingPeriod,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof u.BinaryReader?e:new u.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=_();for(;r.pos>>3==1?i.votingPeriod=l.Duration.decode(r,r.uint32()):r.skipType(7&e)}return i},fromJSON(e){let t=_();return(0,d.isSet)(e.votingPeriod)&&(t.votingPeriod=l.Duration.fromJSON(e.votingPeriod)),t},toJSON(e){let t={};return void 0!==e.votingPeriod&&(t.votingPeriod=e.votingPeriod?l.Duration.toJSON(e.votingPeriod):void 0),t},fromPartial(e){let t=_();return void 0!==e.votingPeriod&&null!==e.votingPeriod&&(t.votingPeriod=l.Duration.fromPartial(e.votingPeriod)),t}},t.TallyParams={typeUrl:"/cosmos.gov.v1beta1.TallyParams",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.BinaryWriter.create();return 0!==e.quorum.length&&t.uint32(10).bytes(e.quorum),0!==e.threshold.length&&t.uint32(18).bytes(e.threshold),0!==e.vetoThreshold.length&&t.uint32(26).bytes(e.vetoThreshold),t},decode(e,t){let r=e instanceof u.BinaryReader?e:new u.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=k();for(;r.pos>>3){case 1:i.quorum=r.bytes();break;case 2:i.threshold=r.bytes();break;case 3:i.vetoThreshold=r.bytes();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=k();return(0,d.isSet)(e.quorum)&&(t.quorum=(0,d.bytesFromBase64)(e.quorum)),(0,d.isSet)(e.threshold)&&(t.threshold=(0,d.bytesFromBase64)(e.threshold)),(0,d.isSet)(e.vetoThreshold)&&(t.vetoThreshold=(0,d.bytesFromBase64)(e.vetoThreshold)),t},toJSON(e){let t={};return void 0!==e.quorum&&(t.quorum=(0,d.base64FromBytes)(void 0!==e.quorum?e.quorum:new Uint8Array)),void 0!==e.threshold&&(t.threshold=(0,d.base64FromBytes)(void 0!==e.threshold?e.threshold:new Uint8Array)),void 0!==e.vetoThreshold&&(t.vetoThreshold=(0,d.base64FromBytes)(void 0!==e.vetoThreshold?e.vetoThreshold:new Uint8Array)),t},fromPartial(e){var t,r,n;let i=k();return i.quorum=null!==(t=e.quorum)&&void 0!==t?t:new Uint8Array,i.threshold=null!==(r=e.threshold)&&void 0!==r?r:new Uint8Array,i.vetoThreshold=null!==(n=e.vetoThreshold)&&void 0!==n?n:new Uint8Array,i}}},22962:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QueryClientImpl=t.QueryTallyResultResponse=t.QueryTallyResultRequest=t.QueryDepositsResponse=t.QueryDepositsRequest=t.QueryDepositResponse=t.QueryDepositRequest=t.QueryParamsResponse=t.QueryParamsRequest=t.QueryVotesResponse=t.QueryVotesRequest=t.QueryVoteResponse=t.QueryVoteRequest=t.QueryProposalsResponse=t.QueryProposalsRequest=t.QueryProposalResponse=t.QueryProposalRequest=t.protobufPackage=void 0;let n=r(5309),i=r(86141),o=r(46554),a=r(99133);function s(){return{proposalId:BigInt(0)}}function l(){return{proposal:n.Proposal.fromPartial({})}}function u(){return{proposalStatus:0,voter:"",depositor:"",pagination:void 0}}function d(){return{proposals:[],pagination:void 0}}function c(){return{proposalId:BigInt(0),voter:""}}function p(){return{vote:n.Vote.fromPartial({})}}function f(){return{proposalId:BigInt(0),pagination:void 0}}function h(){return{votes:[],pagination:void 0}}function g(){return{paramsType:""}}function m(){return{votingParams:n.VotingParams.fromPartial({}),depositParams:n.DepositParams.fromPartial({}),tallyParams:n.TallyParams.fromPartial({})}}function y(){return{proposalId:BigInt(0),depositor:""}}function v(){return{deposit:n.Deposit.fromPartial({})}}function b(){return{proposalId:BigInt(0),pagination:void 0}}function S(){return{deposits:[],pagination:void 0}}function w(){return{proposalId:BigInt(0)}}function _(){return{tally:n.TallyResult.fromPartial({})}}t.protobufPackage="cosmos.gov.v1beta1",t.QueryProposalRequest={typeUrl:"/cosmos.gov.v1beta1.QueryProposalRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return e.proposalId!==BigInt(0)&&t.uint32(8).uint64(e.proposalId),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=s();for(;r.pos>>3==1?i.proposalId=r.uint64():r.skipType(7&e)}return i},fromJSON(e){let t=s();return(0,a.isSet)(e.proposalId)&&(t.proposalId=BigInt(e.proposalId.toString())),t},toJSON(e){let t={};return void 0!==e.proposalId&&(t.proposalId=(e.proposalId||BigInt(0)).toString()),t},fromPartial(e){let t=s();return void 0!==e.proposalId&&null!==e.proposalId&&(t.proposalId=BigInt(e.proposalId.toString())),t}},t.QueryProposalResponse={typeUrl:"/cosmos.gov.v1beta1.QueryProposalResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return void 0!==e.proposal&&n.Proposal.encode(e.proposal,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=l();for(;r.pos>>3==1?a.proposal=n.Proposal.decode(r,r.uint32()):r.skipType(7&e)}return a},fromJSON(e){let t=l();return(0,a.isSet)(e.proposal)&&(t.proposal=n.Proposal.fromJSON(e.proposal)),t},toJSON(e){let t={};return void 0!==e.proposal&&(t.proposal=e.proposal?n.Proposal.toJSON(e.proposal):void 0),t},fromPartial(e){let t=l();return void 0!==e.proposal&&null!==e.proposal&&(t.proposal=n.Proposal.fromPartial(e.proposal)),t}},t.QueryProposalsRequest={typeUrl:"/cosmos.gov.v1beta1.QueryProposalsRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return 0!==e.proposalStatus&&t.uint32(8).int32(e.proposalStatus),""!==e.voter&&t.uint32(18).string(e.voter),""!==e.depositor&&t.uint32(26).string(e.depositor),void 0!==e.pagination&&i.PageRequest.encode(e.pagination,t.uint32(34).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,a=u();for(;r.pos>>3){case 1:a.proposalStatus=r.int32();break;case 2:a.voter=r.string();break;case 3:a.depositor=r.string();break;case 4:a.pagination=i.PageRequest.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=u();return(0,a.isSet)(e.proposalStatus)&&(t.proposalStatus=(0,n.proposalStatusFromJSON)(e.proposalStatus)),(0,a.isSet)(e.voter)&&(t.voter=String(e.voter)),(0,a.isSet)(e.depositor)&&(t.depositor=String(e.depositor)),(0,a.isSet)(e.pagination)&&(t.pagination=i.PageRequest.fromJSON(e.pagination)),t},toJSON(e){let t={};return void 0!==e.proposalStatus&&(t.proposalStatus=(0,n.proposalStatusToJSON)(e.proposalStatus)),void 0!==e.voter&&(t.voter=e.voter),void 0!==e.depositor&&(t.depositor=e.depositor),void 0!==e.pagination&&(t.pagination=e.pagination?i.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){var t,r,n;let o=u();return o.proposalStatus=null!==(t=e.proposalStatus)&&void 0!==t?t:0,o.voter=null!==(r=e.voter)&&void 0!==r?r:"",o.depositor=null!==(n=e.depositor)&&void 0!==n?n:"",void 0!==e.pagination&&null!==e.pagination&&(o.pagination=i.PageRequest.fromPartial(e.pagination)),o}},t.QueryProposalsResponse={typeUrl:"/cosmos.gov.v1beta1.QueryProposalsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of e.proposals)n.Proposal.encode(r,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&i.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),a=void 0===t?r.len:r.pos+t,s=d();for(;r.pos>>3){case 1:s.proposals.push(n.Proposal.decode(r,r.uint32()));break;case 2:s.pagination=i.PageResponse.decode(r,r.uint32());break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=d();return Array.isArray(null==e?void 0:e.proposals)&&(t.proposals=e.proposals.map(e=>n.Proposal.fromJSON(e))),(0,a.isSet)(e.pagination)&&(t.pagination=i.PageResponse.fromJSON(e.pagination)),t},toJSON(e){let t={};return e.proposals?t.proposals=e.proposals.map(e=>e?n.Proposal.toJSON(e):void 0):t.proposals=[],void 0!==e.pagination&&(t.pagination=e.pagination?i.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=d();return r.proposals=(null===(t=e.proposals)||void 0===t?void 0:t.map(e=>n.Proposal.fromPartial(e)))||[],void 0!==e.pagination&&null!==e.pagination&&(r.pagination=i.PageResponse.fromPartial(e.pagination)),r}},t.QueryVoteRequest={typeUrl:"/cosmos.gov.v1beta1.QueryVoteRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return e.proposalId!==BigInt(0)&&t.uint32(8).uint64(e.proposalId),""!==e.voter&&t.uint32(18).string(e.voter),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=c();for(;r.pos>>3){case 1:i.proposalId=r.uint64();break;case 2:i.voter=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=c();return(0,a.isSet)(e.proposalId)&&(t.proposalId=BigInt(e.proposalId.toString())),(0,a.isSet)(e.voter)&&(t.voter=String(e.voter)),t},toJSON(e){let t={};return void 0!==e.proposalId&&(t.proposalId=(e.proposalId||BigInt(0)).toString()),void 0!==e.voter&&(t.voter=e.voter),t},fromPartial(e){var t;let r=c();return void 0!==e.proposalId&&null!==e.proposalId&&(r.proposalId=BigInt(e.proposalId.toString())),r.voter=null!==(t=e.voter)&&void 0!==t?t:"",r}},t.QueryVoteResponse={typeUrl:"/cosmos.gov.v1beta1.QueryVoteResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return void 0!==e.vote&&n.Vote.encode(e.vote,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=p();for(;r.pos>>3==1?a.vote=n.Vote.decode(r,r.uint32()):r.skipType(7&e)}return a},fromJSON(e){let t=p();return(0,a.isSet)(e.vote)&&(t.vote=n.Vote.fromJSON(e.vote)),t},toJSON(e){let t={};return void 0!==e.vote&&(t.vote=e.vote?n.Vote.toJSON(e.vote):void 0),t},fromPartial(e){let t=p();return void 0!==e.vote&&null!==e.vote&&(t.vote=n.Vote.fromPartial(e.vote)),t}},t.QueryVotesRequest={typeUrl:"/cosmos.gov.v1beta1.QueryVotesRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return e.proposalId!==BigInt(0)&&t.uint32(8).uint64(e.proposalId),void 0!==e.pagination&&i.PageRequest.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,a=f();for(;r.pos>>3){case 1:a.proposalId=r.uint64();break;case 2:a.pagination=i.PageRequest.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=f();return(0,a.isSet)(e.proposalId)&&(t.proposalId=BigInt(e.proposalId.toString())),(0,a.isSet)(e.pagination)&&(t.pagination=i.PageRequest.fromJSON(e.pagination)),t},toJSON(e){let t={};return void 0!==e.proposalId&&(t.proposalId=(e.proposalId||BigInt(0)).toString()),void 0!==e.pagination&&(t.pagination=e.pagination?i.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){let t=f();return void 0!==e.proposalId&&null!==e.proposalId&&(t.proposalId=BigInt(e.proposalId.toString())),void 0!==e.pagination&&null!==e.pagination&&(t.pagination=i.PageRequest.fromPartial(e.pagination)),t}},t.QueryVotesResponse={typeUrl:"/cosmos.gov.v1beta1.QueryVotesResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of e.votes)n.Vote.encode(r,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&i.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),a=void 0===t?r.len:r.pos+t,s=h();for(;r.pos>>3){case 1:s.votes.push(n.Vote.decode(r,r.uint32()));break;case 2:s.pagination=i.PageResponse.decode(r,r.uint32());break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=h();return Array.isArray(null==e?void 0:e.votes)&&(t.votes=e.votes.map(e=>n.Vote.fromJSON(e))),(0,a.isSet)(e.pagination)&&(t.pagination=i.PageResponse.fromJSON(e.pagination)),t},toJSON(e){let t={};return e.votes?t.votes=e.votes.map(e=>e?n.Vote.toJSON(e):void 0):t.votes=[],void 0!==e.pagination&&(t.pagination=e.pagination?i.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=h();return r.votes=(null===(t=e.votes)||void 0===t?void 0:t.map(e=>n.Vote.fromPartial(e)))||[],void 0!==e.pagination&&null!==e.pagination&&(r.pagination=i.PageResponse.fromPartial(e.pagination)),r}},t.QueryParamsRequest={typeUrl:"/cosmos.gov.v1beta1.QueryParamsRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.paramsType&&t.uint32(10).string(e.paramsType),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=g();for(;r.pos>>3==1?i.paramsType=r.string():r.skipType(7&e)}return i},fromJSON(e){let t=g();return(0,a.isSet)(e.paramsType)&&(t.paramsType=String(e.paramsType)),t},toJSON(e){let t={};return void 0!==e.paramsType&&(t.paramsType=e.paramsType),t},fromPartial(e){var t;let r=g();return r.paramsType=null!==(t=e.paramsType)&&void 0!==t?t:"",r}},t.QueryParamsResponse={typeUrl:"/cosmos.gov.v1beta1.QueryParamsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return void 0!==e.votingParams&&n.VotingParams.encode(e.votingParams,t.uint32(10).fork()).ldelim(),void 0!==e.depositParams&&n.DepositParams.encode(e.depositParams,t.uint32(18).fork()).ldelim(),void 0!==e.tallyParams&&n.TallyParams.encode(e.tallyParams,t.uint32(26).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=m();for(;r.pos>>3){case 1:a.votingParams=n.VotingParams.decode(r,r.uint32());break;case 2:a.depositParams=n.DepositParams.decode(r,r.uint32());break;case 3:a.tallyParams=n.TallyParams.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=m();return(0,a.isSet)(e.votingParams)&&(t.votingParams=n.VotingParams.fromJSON(e.votingParams)),(0,a.isSet)(e.depositParams)&&(t.depositParams=n.DepositParams.fromJSON(e.depositParams)),(0,a.isSet)(e.tallyParams)&&(t.tallyParams=n.TallyParams.fromJSON(e.tallyParams)),t},toJSON(e){let t={};return void 0!==e.votingParams&&(t.votingParams=e.votingParams?n.VotingParams.toJSON(e.votingParams):void 0),void 0!==e.depositParams&&(t.depositParams=e.depositParams?n.DepositParams.toJSON(e.depositParams):void 0),void 0!==e.tallyParams&&(t.tallyParams=e.tallyParams?n.TallyParams.toJSON(e.tallyParams):void 0),t},fromPartial(e){let t=m();return void 0!==e.votingParams&&null!==e.votingParams&&(t.votingParams=n.VotingParams.fromPartial(e.votingParams)),void 0!==e.depositParams&&null!==e.depositParams&&(t.depositParams=n.DepositParams.fromPartial(e.depositParams)),void 0!==e.tallyParams&&null!==e.tallyParams&&(t.tallyParams=n.TallyParams.fromPartial(e.tallyParams)),t}},t.QueryDepositRequest={typeUrl:"/cosmos.gov.v1beta1.QueryDepositRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return e.proposalId!==BigInt(0)&&t.uint32(8).uint64(e.proposalId),""!==e.depositor&&t.uint32(18).string(e.depositor),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=y();for(;r.pos>>3){case 1:i.proposalId=r.uint64();break;case 2:i.depositor=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=y();return(0,a.isSet)(e.proposalId)&&(t.proposalId=BigInt(e.proposalId.toString())),(0,a.isSet)(e.depositor)&&(t.depositor=String(e.depositor)),t},toJSON(e){let t={};return void 0!==e.proposalId&&(t.proposalId=(e.proposalId||BigInt(0)).toString()),void 0!==e.depositor&&(t.depositor=e.depositor),t},fromPartial(e){var t;let r=y();return void 0!==e.proposalId&&null!==e.proposalId&&(r.proposalId=BigInt(e.proposalId.toString())),r.depositor=null!==(t=e.depositor)&&void 0!==t?t:"",r}},t.QueryDepositResponse={typeUrl:"/cosmos.gov.v1beta1.QueryDepositResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return void 0!==e.deposit&&n.Deposit.encode(e.deposit,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=v();for(;r.pos>>3==1?a.deposit=n.Deposit.decode(r,r.uint32()):r.skipType(7&e)}return a},fromJSON(e){let t=v();return(0,a.isSet)(e.deposit)&&(t.deposit=n.Deposit.fromJSON(e.deposit)),t},toJSON(e){let t={};return void 0!==e.deposit&&(t.deposit=e.deposit?n.Deposit.toJSON(e.deposit):void 0),t},fromPartial(e){let t=v();return void 0!==e.deposit&&null!==e.deposit&&(t.deposit=n.Deposit.fromPartial(e.deposit)),t}},t.QueryDepositsRequest={typeUrl:"/cosmos.gov.v1beta1.QueryDepositsRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return e.proposalId!==BigInt(0)&&t.uint32(8).uint64(e.proposalId),void 0!==e.pagination&&i.PageRequest.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,a=b();for(;r.pos>>3){case 1:a.proposalId=r.uint64();break;case 2:a.pagination=i.PageRequest.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=b();return(0,a.isSet)(e.proposalId)&&(t.proposalId=BigInt(e.proposalId.toString())),(0,a.isSet)(e.pagination)&&(t.pagination=i.PageRequest.fromJSON(e.pagination)),t},toJSON(e){let t={};return void 0!==e.proposalId&&(t.proposalId=(e.proposalId||BigInt(0)).toString()),void 0!==e.pagination&&(t.pagination=e.pagination?i.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){let t=b();return void 0!==e.proposalId&&null!==e.proposalId&&(t.proposalId=BigInt(e.proposalId.toString())),void 0!==e.pagination&&null!==e.pagination&&(t.pagination=i.PageRequest.fromPartial(e.pagination)),t}},t.QueryDepositsResponse={typeUrl:"/cosmos.gov.v1beta1.QueryDepositsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of e.deposits)n.Deposit.encode(r,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&i.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),a=void 0===t?r.len:r.pos+t,s=S();for(;r.pos>>3){case 1:s.deposits.push(n.Deposit.decode(r,r.uint32()));break;case 2:s.pagination=i.PageResponse.decode(r,r.uint32());break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=S();return Array.isArray(null==e?void 0:e.deposits)&&(t.deposits=e.deposits.map(e=>n.Deposit.fromJSON(e))),(0,a.isSet)(e.pagination)&&(t.pagination=i.PageResponse.fromJSON(e.pagination)),t},toJSON(e){let t={};return e.deposits?t.deposits=e.deposits.map(e=>e?n.Deposit.toJSON(e):void 0):t.deposits=[],void 0!==e.pagination&&(t.pagination=e.pagination?i.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=S();return r.deposits=(null===(t=e.deposits)||void 0===t?void 0:t.map(e=>n.Deposit.fromPartial(e)))||[],void 0!==e.pagination&&null!==e.pagination&&(r.pagination=i.PageResponse.fromPartial(e.pagination)),r}},t.QueryTallyResultRequest={typeUrl:"/cosmos.gov.v1beta1.QueryTallyResultRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return e.proposalId!==BigInt(0)&&t.uint32(8).uint64(e.proposalId),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=w();for(;r.pos>>3==1?i.proposalId=r.uint64():r.skipType(7&e)}return i},fromJSON(e){let t=w();return(0,a.isSet)(e.proposalId)&&(t.proposalId=BigInt(e.proposalId.toString())),t},toJSON(e){let t={};return void 0!==e.proposalId&&(t.proposalId=(e.proposalId||BigInt(0)).toString()),t},fromPartial(e){let t=w();return void 0!==e.proposalId&&null!==e.proposalId&&(t.proposalId=BigInt(e.proposalId.toString())),t}},t.QueryTallyResultResponse={typeUrl:"/cosmos.gov.v1beta1.QueryTallyResultResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return void 0!==e.tally&&n.TallyResult.encode(e.tally,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=_();for(;r.pos>>3==1?a.tally=n.TallyResult.decode(r,r.uint32()):r.skipType(7&e)}return a},fromJSON(e){let t=_();return(0,a.isSet)(e.tally)&&(t.tally=n.TallyResult.fromJSON(e.tally)),t},toJSON(e){let t={};return void 0!==e.tally&&(t.tally=e.tally?n.TallyResult.toJSON(e.tally):void 0),t},fromPartial(e){let t=_();return void 0!==e.tally&&null!==e.tally&&(t.tally=n.TallyResult.fromPartial(e.tally)),t}};class k{Proposal(e){let r=t.QueryProposalRequest.encode(e).finish();return this.rpc.request("cosmos.gov.v1beta1.Query","Proposal",r).then(e=>t.QueryProposalResponse.decode(new o.BinaryReader(e)))}Proposals(e){let r=t.QueryProposalsRequest.encode(e).finish();return this.rpc.request("cosmos.gov.v1beta1.Query","Proposals",r).then(e=>t.QueryProposalsResponse.decode(new o.BinaryReader(e)))}Vote(e){let r=t.QueryVoteRequest.encode(e).finish();return this.rpc.request("cosmos.gov.v1beta1.Query","Vote",r).then(e=>t.QueryVoteResponse.decode(new o.BinaryReader(e)))}Votes(e){let r=t.QueryVotesRequest.encode(e).finish();return this.rpc.request("cosmos.gov.v1beta1.Query","Votes",r).then(e=>t.QueryVotesResponse.decode(new o.BinaryReader(e)))}Params(e){let r=t.QueryParamsRequest.encode(e).finish();return this.rpc.request("cosmos.gov.v1beta1.Query","Params",r).then(e=>t.QueryParamsResponse.decode(new o.BinaryReader(e)))}Deposit(e){let r=t.QueryDepositRequest.encode(e).finish();return this.rpc.request("cosmos.gov.v1beta1.Query","Deposit",r).then(e=>t.QueryDepositResponse.decode(new o.BinaryReader(e)))}Deposits(e){let r=t.QueryDepositsRequest.encode(e).finish();return this.rpc.request("cosmos.gov.v1beta1.Query","Deposits",r).then(e=>t.QueryDepositsResponse.decode(new o.BinaryReader(e)))}TallyResult(e){let r=t.QueryTallyResultRequest.encode(e).finish();return this.rpc.request("cosmos.gov.v1beta1.Query","TallyResult",r).then(e=>t.QueryTallyResultResponse.decode(new o.BinaryReader(e)))}constructor(e){this.rpc=e,this.Proposal=this.Proposal.bind(this),this.Proposals=this.Proposals.bind(this),this.Vote=this.Vote.bind(this),this.Votes=this.Votes.bind(this),this.Params=this.Params.bind(this),this.Deposit=this.Deposit.bind(this),this.Deposits=this.Deposits.bind(this),this.TallyResult=this.TallyResult.bind(this)}}t.QueryClientImpl=k},76925:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MsgClientImpl=t.MsgDepositResponse=t.MsgDeposit=t.MsgVoteWeightedResponse=t.MsgVoteWeighted=t.MsgVoteResponse=t.MsgVote=t.MsgSubmitProposalResponse=t.MsgSubmitProposal=t.protobufPackage=void 0;let n=r(11879),i=r(14841),o=r(5309),a=r(46554),s=r(99133);function l(){return{content:void 0,initialDeposit:[],proposer:""}}function u(){return{proposalId:BigInt(0)}}function d(){return{proposalId:BigInt(0),voter:"",option:0}}function c(){return{}}function p(){return{proposalId:BigInt(0),voter:"",options:[]}}function f(){return{}}function h(){return{proposalId:BigInt(0),depositor:"",amount:[]}}function g(){return{}}t.protobufPackage="cosmos.gov.v1beta1",t.MsgSubmitProposal={typeUrl:"/cosmos.gov.v1beta1.MsgSubmitProposal",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();for(let r of(void 0!==e.content&&n.Any.encode(e.content,t.uint32(10).fork()).ldelim(),e.initialDeposit))i.Coin.encode(r,t.uint32(18).fork()).ldelim();return""!==e.proposer&&t.uint32(26).string(e.proposer),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),o=void 0===t?r.len:r.pos+t,s=l();for(;r.pos>>3){case 1:s.content=n.Any.decode(r,r.uint32());break;case 2:s.initialDeposit.push(i.Coin.decode(r,r.uint32()));break;case 3:s.proposer=r.string();break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=l();return(0,s.isSet)(e.content)&&(t.content=n.Any.fromJSON(e.content)),Array.isArray(null==e?void 0:e.initialDeposit)&&(t.initialDeposit=e.initialDeposit.map(e=>i.Coin.fromJSON(e))),(0,s.isSet)(e.proposer)&&(t.proposer=String(e.proposer)),t},toJSON(e){let t={};return void 0!==e.content&&(t.content=e.content?n.Any.toJSON(e.content):void 0),e.initialDeposit?t.initialDeposit=e.initialDeposit.map(e=>e?i.Coin.toJSON(e):void 0):t.initialDeposit=[],void 0!==e.proposer&&(t.proposer=e.proposer),t},fromPartial(e){var t,r;let o=l();return void 0!==e.content&&null!==e.content&&(o.content=n.Any.fromPartial(e.content)),o.initialDeposit=(null===(t=e.initialDeposit)||void 0===t?void 0:t.map(e=>i.Coin.fromPartial(e)))||[],o.proposer=null!==(r=e.proposer)&&void 0!==r?r:"",o}},t.MsgSubmitProposalResponse={typeUrl:"/cosmos.gov.v1beta1.MsgSubmitProposalResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return e.proposalId!==BigInt(0)&&t.uint32(8).uint64(e.proposalId),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=u();for(;r.pos>>3==1?i.proposalId=r.uint64():r.skipType(7&e)}return i},fromJSON(e){let t=u();return(0,s.isSet)(e.proposalId)&&(t.proposalId=BigInt(e.proposalId.toString())),t},toJSON(e){let t={};return void 0!==e.proposalId&&(t.proposalId=(e.proposalId||BigInt(0)).toString()),t},fromPartial(e){let t=u();return void 0!==e.proposalId&&null!==e.proposalId&&(t.proposalId=BigInt(e.proposalId.toString())),t}},t.MsgVote={typeUrl:"/cosmos.gov.v1beta1.MsgVote",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return e.proposalId!==BigInt(0)&&t.uint32(8).uint64(e.proposalId),""!==e.voter&&t.uint32(18).string(e.voter),0!==e.option&&t.uint32(24).int32(e.option),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=d();for(;r.pos>>3){case 1:i.proposalId=r.uint64();break;case 2:i.voter=r.string();break;case 3:i.option=r.int32();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=d();return(0,s.isSet)(e.proposalId)&&(t.proposalId=BigInt(e.proposalId.toString())),(0,s.isSet)(e.voter)&&(t.voter=String(e.voter)),(0,s.isSet)(e.option)&&(t.option=(0,o.voteOptionFromJSON)(e.option)),t},toJSON(e){let t={};return void 0!==e.proposalId&&(t.proposalId=(e.proposalId||BigInt(0)).toString()),void 0!==e.voter&&(t.voter=e.voter),void 0!==e.option&&(t.option=(0,o.voteOptionToJSON)(e.option)),t},fromPartial(e){var t,r;let n=d();return void 0!==e.proposalId&&null!==e.proposalId&&(n.proposalId=BigInt(e.proposalId.toString())),n.voter=null!==(t=e.voter)&&void 0!==t?t:"",n.option=null!==(r=e.option)&&void 0!==r?r:0,n}},t.MsgVoteResponse={typeUrl:"/cosmos.gov.v1beta1.MsgVoteResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=c();for(;r.posc(),toJSON:e=>({}),fromPartial:e=>c()},t.MsgVoteWeighted={typeUrl:"/cosmos.gov.v1beta1.MsgVoteWeighted",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();for(let r of(e.proposalId!==BigInt(0)&&t.uint32(8).uint64(e.proposalId),""!==e.voter&&t.uint32(18).string(e.voter),e.options))o.WeightedVoteOption.encode(r,t.uint32(26).fork()).ldelim();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=p();for(;r.pos>>3){case 1:i.proposalId=r.uint64();break;case 2:i.voter=r.string();break;case 3:i.options.push(o.WeightedVoteOption.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=p();return(0,s.isSet)(e.proposalId)&&(t.proposalId=BigInt(e.proposalId.toString())),(0,s.isSet)(e.voter)&&(t.voter=String(e.voter)),Array.isArray(null==e?void 0:e.options)&&(t.options=e.options.map(e=>o.WeightedVoteOption.fromJSON(e))),t},toJSON(e){let t={};return void 0!==e.proposalId&&(t.proposalId=(e.proposalId||BigInt(0)).toString()),void 0!==e.voter&&(t.voter=e.voter),e.options?t.options=e.options.map(e=>e?o.WeightedVoteOption.toJSON(e):void 0):t.options=[],t},fromPartial(e){var t,r;let n=p();return void 0!==e.proposalId&&null!==e.proposalId&&(n.proposalId=BigInt(e.proposalId.toString())),n.voter=null!==(r=e.voter)&&void 0!==r?r:"",n.options=(null===(t=e.options)||void 0===t?void 0:t.map(e=>o.WeightedVoteOption.fromPartial(e)))||[],n}},t.MsgVoteWeightedResponse={typeUrl:"/cosmos.gov.v1beta1.MsgVoteWeightedResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=f();for(;r.posf(),toJSON:e=>({}),fromPartial:e=>f()},t.MsgDeposit={typeUrl:"/cosmos.gov.v1beta1.MsgDeposit",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();for(let r of(e.proposalId!==BigInt(0)&&t.uint32(8).uint64(e.proposalId),""!==e.depositor&&t.uint32(18).string(e.depositor),e.amount))i.Coin.encode(r,t.uint32(26).fork()).ldelim();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=h();for(;r.pos>>3){case 1:o.proposalId=r.uint64();break;case 2:o.depositor=r.string();break;case 3:o.amount.push(i.Coin.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return o},fromJSON(e){let t=h();return(0,s.isSet)(e.proposalId)&&(t.proposalId=BigInt(e.proposalId.toString())),(0,s.isSet)(e.depositor)&&(t.depositor=String(e.depositor)),Array.isArray(null==e?void 0:e.amount)&&(t.amount=e.amount.map(e=>i.Coin.fromJSON(e))),t},toJSON(e){let t={};return void 0!==e.proposalId&&(t.proposalId=(e.proposalId||BigInt(0)).toString()),void 0!==e.depositor&&(t.depositor=e.depositor),e.amount?t.amount=e.amount.map(e=>e?i.Coin.toJSON(e):void 0):t.amount=[],t},fromPartial(e){var t,r;let n=h();return void 0!==e.proposalId&&null!==e.proposalId&&(n.proposalId=BigInt(e.proposalId.toString())),n.depositor=null!==(r=e.depositor)&&void 0!==r?r:"",n.amount=(null===(t=e.amount)||void 0===t?void 0:t.map(e=>i.Coin.fromPartial(e)))||[],n}},t.MsgDepositResponse={typeUrl:"/cosmos.gov.v1beta1.MsgDepositResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=g();for(;r.posg(),toJSON:e=>({}),fromPartial:e=>g()};class m{SubmitProposal(e){let r=t.MsgSubmitProposal.encode(e).finish();return this.rpc.request("cosmos.gov.v1beta1.Msg","SubmitProposal",r).then(e=>t.MsgSubmitProposalResponse.decode(new a.BinaryReader(e)))}Vote(e){let r=t.MsgVote.encode(e).finish();return this.rpc.request("cosmos.gov.v1beta1.Msg","Vote",r).then(e=>t.MsgVoteResponse.decode(new a.BinaryReader(e)))}VoteWeighted(e){let r=t.MsgVoteWeighted.encode(e).finish();return this.rpc.request("cosmos.gov.v1beta1.Msg","VoteWeighted",r).then(e=>t.MsgVoteWeightedResponse.decode(new a.BinaryReader(e)))}Deposit(e){let r=t.MsgDeposit.encode(e).finish();return this.rpc.request("cosmos.gov.v1beta1.Msg","Deposit",r).then(e=>t.MsgDepositResponse.decode(new a.BinaryReader(e)))}constructor(e){this.rpc=e,this.SubmitProposal=this.SubmitProposal.bind(this),this.Vote=this.Vote.bind(this),this.VoteWeighted=this.VoteWeighted.bind(this),this.Deposit=this.Deposit.bind(this)}}t.MsgClientImpl=m},51691:function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.MsgClientImpl=t.MsgLeaveGroupResponse=t.MsgLeaveGroup=t.MsgExecResponse=t.MsgExec=t.MsgVoteResponse=t.MsgVote=t.MsgWithdrawProposalResponse=t.MsgWithdrawProposal=t.MsgSubmitProposalResponse=t.MsgSubmitProposal=t.MsgUpdateGroupPolicyMetadataResponse=t.MsgUpdateGroupPolicyMetadata=t.MsgUpdateGroupPolicyDecisionPolicyResponse=t.MsgUpdateGroupPolicyDecisionPolicy=t.MsgCreateGroupWithPolicyResponse=t.MsgCreateGroupWithPolicy=t.MsgUpdateGroupPolicyAdminResponse=t.MsgUpdateGroupPolicyAdmin=t.MsgCreateGroupPolicyResponse=t.MsgCreateGroupPolicy=t.MsgUpdateGroupMetadataResponse=t.MsgUpdateGroupMetadata=t.MsgUpdateGroupAdminResponse=t.MsgUpdateGroupAdmin=t.MsgUpdateGroupMembersResponse=t.MsgUpdateGroupMembers=t.MsgCreateGroupResponse=t.MsgCreateGroup=t.execToJSON=t.execFromJSON=t.Exec=t.protobufPackage=void 0;let i=r(1264),o=r(11879),a=r(46554),s=r(99133);function l(e){switch(e){case 0:case"EXEC_UNSPECIFIED":return n.EXEC_UNSPECIFIED;case 1:case"EXEC_TRY":return n.EXEC_TRY;default:return n.UNRECOGNIZED}}function u(e){switch(e){case n.EXEC_UNSPECIFIED:return"EXEC_UNSPECIFIED";case n.EXEC_TRY:return"EXEC_TRY";case n.UNRECOGNIZED:default:return"UNRECOGNIZED"}}function d(){return{admin:"",members:[],metadata:""}}function c(){return{groupId:BigInt(0)}}function p(){return{admin:"",groupId:BigInt(0),memberUpdates:[]}}function f(){return{}}function h(){return{admin:"",groupId:BigInt(0),newAdmin:""}}function g(){return{}}function m(){return{admin:"",groupId:BigInt(0),metadata:""}}function y(){return{}}function v(){return{admin:"",groupId:BigInt(0),metadata:"",decisionPolicy:void 0}}function b(){return{address:""}}function S(){return{admin:"",groupPolicyAddress:"",newAdmin:""}}function w(){return{}}function _(){return{admin:"",members:[],groupMetadata:"",groupPolicyMetadata:"",groupPolicyAsAdmin:!1,decisionPolicy:void 0}}function k(){return{groupId:BigInt(0),groupPolicyAddress:""}}function O(){return{admin:"",groupPolicyAddress:"",decisionPolicy:void 0}}function P(){return{}}function A(){return{admin:"",groupPolicyAddress:"",metadata:""}}function I(){return{}}function R(){return{groupPolicyAddress:"",proposers:[],metadata:"",messages:[],exec:0,title:"",summary:""}}function E(){return{proposalId:BigInt(0)}}function T(){return{proposalId:BigInt(0),address:""}}function N(){return{}}function x(){return{proposalId:BigInt(0),voter:"",option:0,metadata:"",exec:0}}function B(){return{}}function C(){return{proposalId:BigInt(0),executor:""}}function M(){return{result:0}}function D(){return{address:"",groupId:BigInt(0)}}function U(){return{}}t.protobufPackage="cosmos.group.v1",function(e){e[e.EXEC_UNSPECIFIED=0]="EXEC_UNSPECIFIED",e[e.EXEC_TRY=1]="EXEC_TRY",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(n||(t.Exec=n={})),t.execFromJSON=l,t.execToJSON=u,t.MsgCreateGroup={typeUrl:"/cosmos.group.v1.MsgCreateGroup",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();for(let r of(""!==e.admin&&t.uint32(10).string(e.admin),e.members))i.MemberRequest.encode(r,t.uint32(18).fork()).ldelim();return""!==e.metadata&&t.uint32(26).string(e.metadata),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=d();for(;r.pos>>3){case 1:o.admin=r.string();break;case 2:o.members.push(i.MemberRequest.decode(r,r.uint32()));break;case 3:o.metadata=r.string();break;default:r.skipType(7&e)}}return o},fromJSON(e){let t=d();return(0,s.isSet)(e.admin)&&(t.admin=String(e.admin)),Array.isArray(null==e?void 0:e.members)&&(t.members=e.members.map(e=>i.MemberRequest.fromJSON(e))),(0,s.isSet)(e.metadata)&&(t.metadata=String(e.metadata)),t},toJSON(e){let t={};return void 0!==e.admin&&(t.admin=e.admin),e.members?t.members=e.members.map(e=>e?i.MemberRequest.toJSON(e):void 0):t.members=[],void 0!==e.metadata&&(t.metadata=e.metadata),t},fromPartial(e){var t,r,n;let o=d();return o.admin=null!==(r=e.admin)&&void 0!==r?r:"",o.members=(null===(t=e.members)||void 0===t?void 0:t.map(e=>i.MemberRequest.fromPartial(e)))||[],o.metadata=null!==(n=e.metadata)&&void 0!==n?n:"",o}},t.MsgCreateGroupResponse={typeUrl:"/cosmos.group.v1.MsgCreateGroupResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return e.groupId!==BigInt(0)&&t.uint32(8).uint64(e.groupId),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=c();for(;r.pos>>3==1?i.groupId=r.uint64():r.skipType(7&e)}return i},fromJSON(e){let t=c();return(0,s.isSet)(e.groupId)&&(t.groupId=BigInt(e.groupId.toString())),t},toJSON(e){let t={};return void 0!==e.groupId&&(t.groupId=(e.groupId||BigInt(0)).toString()),t},fromPartial(e){let t=c();return void 0!==e.groupId&&null!==e.groupId&&(t.groupId=BigInt(e.groupId.toString())),t}},t.MsgUpdateGroupMembers={typeUrl:"/cosmos.group.v1.MsgUpdateGroupMembers",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();for(let r of(""!==e.admin&&t.uint32(10).string(e.admin),e.groupId!==BigInt(0)&&t.uint32(16).uint64(e.groupId),e.memberUpdates))i.MemberRequest.encode(r,t.uint32(26).fork()).ldelim();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=p();for(;r.pos>>3){case 1:o.admin=r.string();break;case 2:o.groupId=r.uint64();break;case 3:o.memberUpdates.push(i.MemberRequest.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return o},fromJSON(e){let t=p();return(0,s.isSet)(e.admin)&&(t.admin=String(e.admin)),(0,s.isSet)(e.groupId)&&(t.groupId=BigInt(e.groupId.toString())),Array.isArray(null==e?void 0:e.memberUpdates)&&(t.memberUpdates=e.memberUpdates.map(e=>i.MemberRequest.fromJSON(e))),t},toJSON(e){let t={};return void 0!==e.admin&&(t.admin=e.admin),void 0!==e.groupId&&(t.groupId=(e.groupId||BigInt(0)).toString()),e.memberUpdates?t.memberUpdates=e.memberUpdates.map(e=>e?i.MemberRequest.toJSON(e):void 0):t.memberUpdates=[],t},fromPartial(e){var t,r;let n=p();return n.admin=null!==(r=e.admin)&&void 0!==r?r:"",void 0!==e.groupId&&null!==e.groupId&&(n.groupId=BigInt(e.groupId.toString())),n.memberUpdates=(null===(t=e.memberUpdates)||void 0===t?void 0:t.map(e=>i.MemberRequest.fromPartial(e)))||[],n}},t.MsgUpdateGroupMembersResponse={typeUrl:"/cosmos.group.v1.MsgUpdateGroupMembersResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=f();for(;r.posf(),toJSON:e=>({}),fromPartial:e=>f()},t.MsgUpdateGroupAdmin={typeUrl:"/cosmos.group.v1.MsgUpdateGroupAdmin",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.admin&&t.uint32(10).string(e.admin),e.groupId!==BigInt(0)&&t.uint32(16).uint64(e.groupId),""!==e.newAdmin&&t.uint32(26).string(e.newAdmin),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=h();for(;r.pos>>3){case 1:i.admin=r.string();break;case 2:i.groupId=r.uint64();break;case 3:i.newAdmin=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=h();return(0,s.isSet)(e.admin)&&(t.admin=String(e.admin)),(0,s.isSet)(e.groupId)&&(t.groupId=BigInt(e.groupId.toString())),(0,s.isSet)(e.newAdmin)&&(t.newAdmin=String(e.newAdmin)),t},toJSON(e){let t={};return void 0!==e.admin&&(t.admin=e.admin),void 0!==e.groupId&&(t.groupId=(e.groupId||BigInt(0)).toString()),void 0!==e.newAdmin&&(t.newAdmin=e.newAdmin),t},fromPartial(e){var t,r;let n=h();return n.admin=null!==(t=e.admin)&&void 0!==t?t:"",void 0!==e.groupId&&null!==e.groupId&&(n.groupId=BigInt(e.groupId.toString())),n.newAdmin=null!==(r=e.newAdmin)&&void 0!==r?r:"",n}},t.MsgUpdateGroupAdminResponse={typeUrl:"/cosmos.group.v1.MsgUpdateGroupAdminResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=g();for(;r.posg(),toJSON:e=>({}),fromPartial:e=>g()},t.MsgUpdateGroupMetadata={typeUrl:"/cosmos.group.v1.MsgUpdateGroupMetadata",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.admin&&t.uint32(10).string(e.admin),e.groupId!==BigInt(0)&&t.uint32(16).uint64(e.groupId),""!==e.metadata&&t.uint32(26).string(e.metadata),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=m();for(;r.pos>>3){case 1:i.admin=r.string();break;case 2:i.groupId=r.uint64();break;case 3:i.metadata=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=m();return(0,s.isSet)(e.admin)&&(t.admin=String(e.admin)),(0,s.isSet)(e.groupId)&&(t.groupId=BigInt(e.groupId.toString())),(0,s.isSet)(e.metadata)&&(t.metadata=String(e.metadata)),t},toJSON(e){let t={};return void 0!==e.admin&&(t.admin=e.admin),void 0!==e.groupId&&(t.groupId=(e.groupId||BigInt(0)).toString()),void 0!==e.metadata&&(t.metadata=e.metadata),t},fromPartial(e){var t,r;let n=m();return n.admin=null!==(t=e.admin)&&void 0!==t?t:"",void 0!==e.groupId&&null!==e.groupId&&(n.groupId=BigInt(e.groupId.toString())),n.metadata=null!==(r=e.metadata)&&void 0!==r?r:"",n}},t.MsgUpdateGroupMetadataResponse={typeUrl:"/cosmos.group.v1.MsgUpdateGroupMetadataResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=y();for(;r.posy(),toJSON:e=>({}),fromPartial:e=>y()},t.MsgCreateGroupPolicy={typeUrl:"/cosmos.group.v1.MsgCreateGroupPolicy",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.admin&&t.uint32(10).string(e.admin),e.groupId!==BigInt(0)&&t.uint32(16).uint64(e.groupId),""!==e.metadata&&t.uint32(26).string(e.metadata),void 0!==e.decisionPolicy&&o.Any.encode(e.decisionPolicy,t.uint32(34).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=v();for(;r.pos>>3){case 1:i.admin=r.string();break;case 2:i.groupId=r.uint64();break;case 3:i.metadata=r.string();break;case 4:i.decisionPolicy=o.Any.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=v();return(0,s.isSet)(e.admin)&&(t.admin=String(e.admin)),(0,s.isSet)(e.groupId)&&(t.groupId=BigInt(e.groupId.toString())),(0,s.isSet)(e.metadata)&&(t.metadata=String(e.metadata)),(0,s.isSet)(e.decisionPolicy)&&(t.decisionPolicy=o.Any.fromJSON(e.decisionPolicy)),t},toJSON(e){let t={};return void 0!==e.admin&&(t.admin=e.admin),void 0!==e.groupId&&(t.groupId=(e.groupId||BigInt(0)).toString()),void 0!==e.metadata&&(t.metadata=e.metadata),void 0!==e.decisionPolicy&&(t.decisionPolicy=e.decisionPolicy?o.Any.toJSON(e.decisionPolicy):void 0),t},fromPartial(e){var t,r;let n=v();return n.admin=null!==(t=e.admin)&&void 0!==t?t:"",void 0!==e.groupId&&null!==e.groupId&&(n.groupId=BigInt(e.groupId.toString())),n.metadata=null!==(r=e.metadata)&&void 0!==r?r:"",void 0!==e.decisionPolicy&&null!==e.decisionPolicy&&(n.decisionPolicy=o.Any.fromPartial(e.decisionPolicy)),n}},t.MsgCreateGroupPolicyResponse={typeUrl:"/cosmos.group.v1.MsgCreateGroupPolicyResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.address&&t.uint32(10).string(e.address),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=b();for(;r.pos>>3==1?i.address=r.string():r.skipType(7&e)}return i},fromJSON(e){let t=b();return(0,s.isSet)(e.address)&&(t.address=String(e.address)),t},toJSON(e){let t={};return void 0!==e.address&&(t.address=e.address),t},fromPartial(e){var t;let r=b();return r.address=null!==(t=e.address)&&void 0!==t?t:"",r}},t.MsgUpdateGroupPolicyAdmin={typeUrl:"/cosmos.group.v1.MsgUpdateGroupPolicyAdmin",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.admin&&t.uint32(10).string(e.admin),""!==e.groupPolicyAddress&&t.uint32(18).string(e.groupPolicyAddress),""!==e.newAdmin&&t.uint32(26).string(e.newAdmin),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=S();for(;r.pos>>3){case 1:i.admin=r.string();break;case 2:i.groupPolicyAddress=r.string();break;case 3:i.newAdmin=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=S();return(0,s.isSet)(e.admin)&&(t.admin=String(e.admin)),(0,s.isSet)(e.groupPolicyAddress)&&(t.groupPolicyAddress=String(e.groupPolicyAddress)),(0,s.isSet)(e.newAdmin)&&(t.newAdmin=String(e.newAdmin)),t},toJSON(e){let t={};return void 0!==e.admin&&(t.admin=e.admin),void 0!==e.groupPolicyAddress&&(t.groupPolicyAddress=e.groupPolicyAddress),void 0!==e.newAdmin&&(t.newAdmin=e.newAdmin),t},fromPartial(e){var t,r,n;let i=S();return i.admin=null!==(t=e.admin)&&void 0!==t?t:"",i.groupPolicyAddress=null!==(r=e.groupPolicyAddress)&&void 0!==r?r:"",i.newAdmin=null!==(n=e.newAdmin)&&void 0!==n?n:"",i}},t.MsgUpdateGroupPolicyAdminResponse={typeUrl:"/cosmos.group.v1.MsgUpdateGroupPolicyAdminResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=w();for(;r.posw(),toJSON:e=>({}),fromPartial:e=>w()},t.MsgCreateGroupWithPolicy={typeUrl:"/cosmos.group.v1.MsgCreateGroupWithPolicy",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();for(let r of(""!==e.admin&&t.uint32(10).string(e.admin),e.members))i.MemberRequest.encode(r,t.uint32(18).fork()).ldelim();return""!==e.groupMetadata&&t.uint32(26).string(e.groupMetadata),""!==e.groupPolicyMetadata&&t.uint32(34).string(e.groupPolicyMetadata),!0===e.groupPolicyAsAdmin&&t.uint32(40).bool(e.groupPolicyAsAdmin),void 0!==e.decisionPolicy&&o.Any.encode(e.decisionPolicy,t.uint32(50).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,s=_();for(;r.pos>>3){case 1:s.admin=r.string();break;case 2:s.members.push(i.MemberRequest.decode(r,r.uint32()));break;case 3:s.groupMetadata=r.string();break;case 4:s.groupPolicyMetadata=r.string();break;case 5:s.groupPolicyAsAdmin=r.bool();break;case 6:s.decisionPolicy=o.Any.decode(r,r.uint32());break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=_();return(0,s.isSet)(e.admin)&&(t.admin=String(e.admin)),Array.isArray(null==e?void 0:e.members)&&(t.members=e.members.map(e=>i.MemberRequest.fromJSON(e))),(0,s.isSet)(e.groupMetadata)&&(t.groupMetadata=String(e.groupMetadata)),(0,s.isSet)(e.groupPolicyMetadata)&&(t.groupPolicyMetadata=String(e.groupPolicyMetadata)),(0,s.isSet)(e.groupPolicyAsAdmin)&&(t.groupPolicyAsAdmin=!!e.groupPolicyAsAdmin),(0,s.isSet)(e.decisionPolicy)&&(t.decisionPolicy=o.Any.fromJSON(e.decisionPolicy)),t},toJSON(e){let t={};return void 0!==e.admin&&(t.admin=e.admin),e.members?t.members=e.members.map(e=>e?i.MemberRequest.toJSON(e):void 0):t.members=[],void 0!==e.groupMetadata&&(t.groupMetadata=e.groupMetadata),void 0!==e.groupPolicyMetadata&&(t.groupPolicyMetadata=e.groupPolicyMetadata),void 0!==e.groupPolicyAsAdmin&&(t.groupPolicyAsAdmin=e.groupPolicyAsAdmin),void 0!==e.decisionPolicy&&(t.decisionPolicy=e.decisionPolicy?o.Any.toJSON(e.decisionPolicy):void 0),t},fromPartial(e){var t,r,n,a,s;let l=_();return l.admin=null!==(r=e.admin)&&void 0!==r?r:"",l.members=(null===(t=e.members)||void 0===t?void 0:t.map(e=>i.MemberRequest.fromPartial(e)))||[],l.groupMetadata=null!==(n=e.groupMetadata)&&void 0!==n?n:"",l.groupPolicyMetadata=null!==(a=e.groupPolicyMetadata)&&void 0!==a?a:"",l.groupPolicyAsAdmin=null!==(s=e.groupPolicyAsAdmin)&&void 0!==s&&s,void 0!==e.decisionPolicy&&null!==e.decisionPolicy&&(l.decisionPolicy=o.Any.fromPartial(e.decisionPolicy)),l}},t.MsgCreateGroupWithPolicyResponse={typeUrl:"/cosmos.group.v1.MsgCreateGroupWithPolicyResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return e.groupId!==BigInt(0)&&t.uint32(8).uint64(e.groupId),""!==e.groupPolicyAddress&&t.uint32(18).string(e.groupPolicyAddress),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=k();for(;r.pos>>3){case 1:i.groupId=r.uint64();break;case 2:i.groupPolicyAddress=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=k();return(0,s.isSet)(e.groupId)&&(t.groupId=BigInt(e.groupId.toString())),(0,s.isSet)(e.groupPolicyAddress)&&(t.groupPolicyAddress=String(e.groupPolicyAddress)),t},toJSON(e){let t={};return void 0!==e.groupId&&(t.groupId=(e.groupId||BigInt(0)).toString()),void 0!==e.groupPolicyAddress&&(t.groupPolicyAddress=e.groupPolicyAddress),t},fromPartial(e){var t;let r=k();return void 0!==e.groupId&&null!==e.groupId&&(r.groupId=BigInt(e.groupId.toString())),r.groupPolicyAddress=null!==(t=e.groupPolicyAddress)&&void 0!==t?t:"",r}},t.MsgUpdateGroupPolicyDecisionPolicy={typeUrl:"/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.admin&&t.uint32(10).string(e.admin),""!==e.groupPolicyAddress&&t.uint32(18).string(e.groupPolicyAddress),void 0!==e.decisionPolicy&&o.Any.encode(e.decisionPolicy,t.uint32(26).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=O();for(;r.pos>>3){case 1:i.admin=r.string();break;case 2:i.groupPolicyAddress=r.string();break;case 3:i.decisionPolicy=o.Any.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=O();return(0,s.isSet)(e.admin)&&(t.admin=String(e.admin)),(0,s.isSet)(e.groupPolicyAddress)&&(t.groupPolicyAddress=String(e.groupPolicyAddress)),(0,s.isSet)(e.decisionPolicy)&&(t.decisionPolicy=o.Any.fromJSON(e.decisionPolicy)),t},toJSON(e){let t={};return void 0!==e.admin&&(t.admin=e.admin),void 0!==e.groupPolicyAddress&&(t.groupPolicyAddress=e.groupPolicyAddress),void 0!==e.decisionPolicy&&(t.decisionPolicy=e.decisionPolicy?o.Any.toJSON(e.decisionPolicy):void 0),t},fromPartial(e){var t,r;let n=O();return n.admin=null!==(t=e.admin)&&void 0!==t?t:"",n.groupPolicyAddress=null!==(r=e.groupPolicyAddress)&&void 0!==r?r:"",void 0!==e.decisionPolicy&&null!==e.decisionPolicy&&(n.decisionPolicy=o.Any.fromPartial(e.decisionPolicy)),n}},t.MsgUpdateGroupPolicyDecisionPolicyResponse={typeUrl:"/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicyResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=P();for(;r.posP(),toJSON:e=>({}),fromPartial:e=>P()},t.MsgUpdateGroupPolicyMetadata={typeUrl:"/cosmos.group.v1.MsgUpdateGroupPolicyMetadata",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.admin&&t.uint32(10).string(e.admin),""!==e.groupPolicyAddress&&t.uint32(18).string(e.groupPolicyAddress),""!==e.metadata&&t.uint32(26).string(e.metadata),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=A();for(;r.pos>>3){case 1:i.admin=r.string();break;case 2:i.groupPolicyAddress=r.string();break;case 3:i.metadata=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=A();return(0,s.isSet)(e.admin)&&(t.admin=String(e.admin)),(0,s.isSet)(e.groupPolicyAddress)&&(t.groupPolicyAddress=String(e.groupPolicyAddress)),(0,s.isSet)(e.metadata)&&(t.metadata=String(e.metadata)),t},toJSON(e){let t={};return void 0!==e.admin&&(t.admin=e.admin),void 0!==e.groupPolicyAddress&&(t.groupPolicyAddress=e.groupPolicyAddress),void 0!==e.metadata&&(t.metadata=e.metadata),t},fromPartial(e){var t,r,n;let i=A();return i.admin=null!==(t=e.admin)&&void 0!==t?t:"",i.groupPolicyAddress=null!==(r=e.groupPolicyAddress)&&void 0!==r?r:"",i.metadata=null!==(n=e.metadata)&&void 0!==n?n:"",i}},t.MsgUpdateGroupPolicyMetadataResponse={typeUrl:"/cosmos.group.v1.MsgUpdateGroupPolicyMetadataResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=I();for(;r.posI(),toJSON:e=>({}),fromPartial:e=>I()},t.MsgSubmitProposal={typeUrl:"/cosmos.group.v1.MsgSubmitProposal",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();for(let r of(""!==e.groupPolicyAddress&&t.uint32(10).string(e.groupPolicyAddress),e.proposers))t.uint32(18).string(r);for(let r of(""!==e.metadata&&t.uint32(26).string(e.metadata),e.messages))o.Any.encode(r,t.uint32(34).fork()).ldelim();return 0!==e.exec&&t.uint32(40).int32(e.exec),""!==e.title&&t.uint32(50).string(e.title),""!==e.summary&&t.uint32(58).string(e.summary),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=R();for(;r.pos>>3){case 1:i.groupPolicyAddress=r.string();break;case 2:i.proposers.push(r.string());break;case 3:i.metadata=r.string();break;case 4:i.messages.push(o.Any.decode(r,r.uint32()));break;case 5:i.exec=r.int32();break;case 6:i.title=r.string();break;case 7:i.summary=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=R();return(0,s.isSet)(e.groupPolicyAddress)&&(t.groupPolicyAddress=String(e.groupPolicyAddress)),Array.isArray(null==e?void 0:e.proposers)&&(t.proposers=e.proposers.map(e=>String(e))),(0,s.isSet)(e.metadata)&&(t.metadata=String(e.metadata)),Array.isArray(null==e?void 0:e.messages)&&(t.messages=e.messages.map(e=>o.Any.fromJSON(e))),(0,s.isSet)(e.exec)&&(t.exec=l(e.exec)),(0,s.isSet)(e.title)&&(t.title=String(e.title)),(0,s.isSet)(e.summary)&&(t.summary=String(e.summary)),t},toJSON(e){let t={};return void 0!==e.groupPolicyAddress&&(t.groupPolicyAddress=e.groupPolicyAddress),e.proposers?t.proposers=e.proposers.map(e=>e):t.proposers=[],void 0!==e.metadata&&(t.metadata=e.metadata),e.messages?t.messages=e.messages.map(e=>e?o.Any.toJSON(e):void 0):t.messages=[],void 0!==e.exec&&(t.exec=u(e.exec)),void 0!==e.title&&(t.title=e.title),void 0!==e.summary&&(t.summary=e.summary),t},fromPartial(e){var t,r,n,i,a,s,l;let u=R();return u.groupPolicyAddress=null!==(n=e.groupPolicyAddress)&&void 0!==n?n:"",u.proposers=(null===(t=e.proposers)||void 0===t?void 0:t.map(e=>e))||[],u.metadata=null!==(i=e.metadata)&&void 0!==i?i:"",u.messages=(null===(r=e.messages)||void 0===r?void 0:r.map(e=>o.Any.fromPartial(e)))||[],u.exec=null!==(a=e.exec)&&void 0!==a?a:0,u.title=null!==(s=e.title)&&void 0!==s?s:"",u.summary=null!==(l=e.summary)&&void 0!==l?l:"",u}},t.MsgSubmitProposalResponse={typeUrl:"/cosmos.group.v1.MsgSubmitProposalResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return e.proposalId!==BigInt(0)&&t.uint32(8).uint64(e.proposalId),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=E();for(;r.pos>>3==1?i.proposalId=r.uint64():r.skipType(7&e)}return i},fromJSON(e){let t=E();return(0,s.isSet)(e.proposalId)&&(t.proposalId=BigInt(e.proposalId.toString())),t},toJSON(e){let t={};return void 0!==e.proposalId&&(t.proposalId=(e.proposalId||BigInt(0)).toString()),t},fromPartial(e){let t=E();return void 0!==e.proposalId&&null!==e.proposalId&&(t.proposalId=BigInt(e.proposalId.toString())),t}},t.MsgWithdrawProposal={typeUrl:"/cosmos.group.v1.MsgWithdrawProposal",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return e.proposalId!==BigInt(0)&&t.uint32(8).uint64(e.proposalId),""!==e.address&&t.uint32(18).string(e.address),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=T();for(;r.pos>>3){case 1:i.proposalId=r.uint64();break;case 2:i.address=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=T();return(0,s.isSet)(e.proposalId)&&(t.proposalId=BigInt(e.proposalId.toString())),(0,s.isSet)(e.address)&&(t.address=String(e.address)),t},toJSON(e){let t={};return void 0!==e.proposalId&&(t.proposalId=(e.proposalId||BigInt(0)).toString()),void 0!==e.address&&(t.address=e.address),t},fromPartial(e){var t;let r=T();return void 0!==e.proposalId&&null!==e.proposalId&&(r.proposalId=BigInt(e.proposalId.toString())),r.address=null!==(t=e.address)&&void 0!==t?t:"",r}},t.MsgWithdrawProposalResponse={typeUrl:"/cosmos.group.v1.MsgWithdrawProposalResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=N();for(;r.posN(),toJSON:e=>({}),fromPartial:e=>N()},t.MsgVote={typeUrl:"/cosmos.group.v1.MsgVote",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return e.proposalId!==BigInt(0)&&t.uint32(8).uint64(e.proposalId),""!==e.voter&&t.uint32(18).string(e.voter),0!==e.option&&t.uint32(24).int32(e.option),""!==e.metadata&&t.uint32(34).string(e.metadata),0!==e.exec&&t.uint32(40).int32(e.exec),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=x();for(;r.pos>>3){case 1:i.proposalId=r.uint64();break;case 2:i.voter=r.string();break;case 3:i.option=r.int32();break;case 4:i.metadata=r.string();break;case 5:i.exec=r.int32();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=x();return(0,s.isSet)(e.proposalId)&&(t.proposalId=BigInt(e.proposalId.toString())),(0,s.isSet)(e.voter)&&(t.voter=String(e.voter)),(0,s.isSet)(e.option)&&(t.option=(0,i.voteOptionFromJSON)(e.option)),(0,s.isSet)(e.metadata)&&(t.metadata=String(e.metadata)),(0,s.isSet)(e.exec)&&(t.exec=l(e.exec)),t},toJSON(e){let t={};return void 0!==e.proposalId&&(t.proposalId=(e.proposalId||BigInt(0)).toString()),void 0!==e.voter&&(t.voter=e.voter),void 0!==e.option&&(t.option=(0,i.voteOptionToJSON)(e.option)),void 0!==e.metadata&&(t.metadata=e.metadata),void 0!==e.exec&&(t.exec=u(e.exec)),t},fromPartial(e){var t,r,n,i;let o=x();return void 0!==e.proposalId&&null!==e.proposalId&&(o.proposalId=BigInt(e.proposalId.toString())),o.voter=null!==(t=e.voter)&&void 0!==t?t:"",o.option=null!==(r=e.option)&&void 0!==r?r:0,o.metadata=null!==(n=e.metadata)&&void 0!==n?n:"",o.exec=null!==(i=e.exec)&&void 0!==i?i:0,o}},t.MsgVoteResponse={typeUrl:"/cosmos.group.v1.MsgVoteResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=B();for(;r.posB(),toJSON:e=>({}),fromPartial:e=>B()},t.MsgExec={typeUrl:"/cosmos.group.v1.MsgExec",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return e.proposalId!==BigInt(0)&&t.uint32(8).uint64(e.proposalId),""!==e.executor&&t.uint32(18).string(e.executor),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=C();for(;r.pos>>3){case 1:i.proposalId=r.uint64();break;case 2:i.executor=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=C();return(0,s.isSet)(e.proposalId)&&(t.proposalId=BigInt(e.proposalId.toString())),(0,s.isSet)(e.executor)&&(t.executor=String(e.executor)),t},toJSON(e){let t={};return void 0!==e.proposalId&&(t.proposalId=(e.proposalId||BigInt(0)).toString()),void 0!==e.executor&&(t.executor=e.executor),t},fromPartial(e){var t;let r=C();return void 0!==e.proposalId&&null!==e.proposalId&&(r.proposalId=BigInt(e.proposalId.toString())),r.executor=null!==(t=e.executor)&&void 0!==t?t:"",r}},t.MsgExecResponse={typeUrl:"/cosmos.group.v1.MsgExecResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return 0!==e.result&&t.uint32(16).int32(e.result),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=M();for(;r.pos>>3==2?i.result=r.int32():r.skipType(7&e)}return i},fromJSON(e){let t=M();return(0,s.isSet)(e.result)&&(t.result=(0,i.proposalExecutorResultFromJSON)(e.result)),t},toJSON(e){let t={};return void 0!==e.result&&(t.result=(0,i.proposalExecutorResultToJSON)(e.result)),t},fromPartial(e){var t;let r=M();return r.result=null!==(t=e.result)&&void 0!==t?t:0,r}},t.MsgLeaveGroup={typeUrl:"/cosmos.group.v1.MsgLeaveGroup",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.address&&t.uint32(10).string(e.address),e.groupId!==BigInt(0)&&t.uint32(16).uint64(e.groupId),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=D();for(;r.pos>>3){case 1:i.address=r.string();break;case 2:i.groupId=r.uint64();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=D();return(0,s.isSet)(e.address)&&(t.address=String(e.address)),(0,s.isSet)(e.groupId)&&(t.groupId=BigInt(e.groupId.toString())),t},toJSON(e){let t={};return void 0!==e.address&&(t.address=e.address),void 0!==e.groupId&&(t.groupId=(e.groupId||BigInt(0)).toString()),t},fromPartial(e){var t;let r=D();return r.address=null!==(t=e.address)&&void 0!==t?t:"",void 0!==e.groupId&&null!==e.groupId&&(r.groupId=BigInt(e.groupId.toString())),r}},t.MsgLeaveGroupResponse={typeUrl:"/cosmos.group.v1.MsgLeaveGroupResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=U();for(;r.posU(),toJSON:e=>({}),fromPartial:e=>U()};class J{CreateGroup(e){let r=t.MsgCreateGroup.encode(e).finish();return this.rpc.request("cosmos.group.v1.Msg","CreateGroup",r).then(e=>t.MsgCreateGroupResponse.decode(new a.BinaryReader(e)))}UpdateGroupMembers(e){let r=t.MsgUpdateGroupMembers.encode(e).finish();return this.rpc.request("cosmos.group.v1.Msg","UpdateGroupMembers",r).then(e=>t.MsgUpdateGroupMembersResponse.decode(new a.BinaryReader(e)))}UpdateGroupAdmin(e){let r=t.MsgUpdateGroupAdmin.encode(e).finish();return this.rpc.request("cosmos.group.v1.Msg","UpdateGroupAdmin",r).then(e=>t.MsgUpdateGroupAdminResponse.decode(new a.BinaryReader(e)))}UpdateGroupMetadata(e){let r=t.MsgUpdateGroupMetadata.encode(e).finish();return this.rpc.request("cosmos.group.v1.Msg","UpdateGroupMetadata",r).then(e=>t.MsgUpdateGroupMetadataResponse.decode(new a.BinaryReader(e)))}CreateGroupPolicy(e){let r=t.MsgCreateGroupPolicy.encode(e).finish();return this.rpc.request("cosmos.group.v1.Msg","CreateGroupPolicy",r).then(e=>t.MsgCreateGroupPolicyResponse.decode(new a.BinaryReader(e)))}CreateGroupWithPolicy(e){let r=t.MsgCreateGroupWithPolicy.encode(e).finish();return this.rpc.request("cosmos.group.v1.Msg","CreateGroupWithPolicy",r).then(e=>t.MsgCreateGroupWithPolicyResponse.decode(new a.BinaryReader(e)))}UpdateGroupPolicyAdmin(e){let r=t.MsgUpdateGroupPolicyAdmin.encode(e).finish();return this.rpc.request("cosmos.group.v1.Msg","UpdateGroupPolicyAdmin",r).then(e=>t.MsgUpdateGroupPolicyAdminResponse.decode(new a.BinaryReader(e)))}UpdateGroupPolicyDecisionPolicy(e){let r=t.MsgUpdateGroupPolicyDecisionPolicy.encode(e).finish();return this.rpc.request("cosmos.group.v1.Msg","UpdateGroupPolicyDecisionPolicy",r).then(e=>t.MsgUpdateGroupPolicyDecisionPolicyResponse.decode(new a.BinaryReader(e)))}UpdateGroupPolicyMetadata(e){let r=t.MsgUpdateGroupPolicyMetadata.encode(e).finish();return this.rpc.request("cosmos.group.v1.Msg","UpdateGroupPolicyMetadata",r).then(e=>t.MsgUpdateGroupPolicyMetadataResponse.decode(new a.BinaryReader(e)))}SubmitProposal(e){let r=t.MsgSubmitProposal.encode(e).finish();return this.rpc.request("cosmos.group.v1.Msg","SubmitProposal",r).then(e=>t.MsgSubmitProposalResponse.decode(new a.BinaryReader(e)))}WithdrawProposal(e){let r=t.MsgWithdrawProposal.encode(e).finish();return this.rpc.request("cosmos.group.v1.Msg","WithdrawProposal",r).then(e=>t.MsgWithdrawProposalResponse.decode(new a.BinaryReader(e)))}Vote(e){let r=t.MsgVote.encode(e).finish();return this.rpc.request("cosmos.group.v1.Msg","Vote",r).then(e=>t.MsgVoteResponse.decode(new a.BinaryReader(e)))}Exec(e){let r=t.MsgExec.encode(e).finish();return this.rpc.request("cosmos.group.v1.Msg","Exec",r).then(e=>t.MsgExecResponse.decode(new a.BinaryReader(e)))}LeaveGroup(e){let r=t.MsgLeaveGroup.encode(e).finish();return this.rpc.request("cosmos.group.v1.Msg","LeaveGroup",r).then(e=>t.MsgLeaveGroupResponse.decode(new a.BinaryReader(e)))}constructor(e){this.rpc=e,this.CreateGroup=this.CreateGroup.bind(this),this.UpdateGroupMembers=this.UpdateGroupMembers.bind(this),this.UpdateGroupAdmin=this.UpdateGroupAdmin.bind(this),this.UpdateGroupMetadata=this.UpdateGroupMetadata.bind(this),this.CreateGroupPolicy=this.CreateGroupPolicy.bind(this),this.CreateGroupWithPolicy=this.CreateGroupWithPolicy.bind(this),this.UpdateGroupPolicyAdmin=this.UpdateGroupPolicyAdmin.bind(this),this.UpdateGroupPolicyDecisionPolicy=this.UpdateGroupPolicyDecisionPolicy.bind(this),this.UpdateGroupPolicyMetadata=this.UpdateGroupPolicyMetadata.bind(this),this.SubmitProposal=this.SubmitProposal.bind(this),this.WithdrawProposal=this.WithdrawProposal.bind(this),this.Vote=this.Vote.bind(this),this.Exec=this.Exec.bind(this),this.LeaveGroup=this.LeaveGroup.bind(this)}}t.MsgClientImpl=J},1264:function(e,t,r){"use strict";var n,i,o;Object.defineProperty(t,"__esModule",{value:!0}),t.Vote=t.TallyResult=t.Proposal=t.GroupPolicyInfo=t.GroupMember=t.GroupInfo=t.DecisionPolicyWindows=t.PercentageDecisionPolicy=t.ThresholdDecisionPolicy=t.MemberRequest=t.Member=t.proposalExecutorResultToJSON=t.proposalExecutorResultFromJSON=t.ProposalExecutorResult=t.proposalStatusToJSON=t.proposalStatusFromJSON=t.ProposalStatus=t.voteOptionToJSON=t.voteOptionFromJSON=t.VoteOption=t.protobufPackage=void 0;let a=r(9990),s=r(84849),l=r(11879),u=r(46554),d=r(99133);function c(e){switch(e){case 0:case"VOTE_OPTION_UNSPECIFIED":return n.VOTE_OPTION_UNSPECIFIED;case 1:case"VOTE_OPTION_YES":return n.VOTE_OPTION_YES;case 2:case"VOTE_OPTION_ABSTAIN":return n.VOTE_OPTION_ABSTAIN;case 3:case"VOTE_OPTION_NO":return n.VOTE_OPTION_NO;case 4:case"VOTE_OPTION_NO_WITH_VETO":return n.VOTE_OPTION_NO_WITH_VETO;default:return n.UNRECOGNIZED}}function p(e){switch(e){case n.VOTE_OPTION_UNSPECIFIED:return"VOTE_OPTION_UNSPECIFIED";case n.VOTE_OPTION_YES:return"VOTE_OPTION_YES";case n.VOTE_OPTION_ABSTAIN:return"VOTE_OPTION_ABSTAIN";case n.VOTE_OPTION_NO:return"VOTE_OPTION_NO";case n.VOTE_OPTION_NO_WITH_VETO:return"VOTE_OPTION_NO_WITH_VETO";case n.UNRECOGNIZED:default:return"UNRECOGNIZED"}}function f(e){switch(e){case 0:case"PROPOSAL_STATUS_UNSPECIFIED":return i.PROPOSAL_STATUS_UNSPECIFIED;case 1:case"PROPOSAL_STATUS_SUBMITTED":return i.PROPOSAL_STATUS_SUBMITTED;case 2:case"PROPOSAL_STATUS_ACCEPTED":return i.PROPOSAL_STATUS_ACCEPTED;case 3:case"PROPOSAL_STATUS_REJECTED":return i.PROPOSAL_STATUS_REJECTED;case 4:case"PROPOSAL_STATUS_ABORTED":return i.PROPOSAL_STATUS_ABORTED;case 5:case"PROPOSAL_STATUS_WITHDRAWN":return i.PROPOSAL_STATUS_WITHDRAWN;default:return i.UNRECOGNIZED}}function h(e){switch(e){case i.PROPOSAL_STATUS_UNSPECIFIED:return"PROPOSAL_STATUS_UNSPECIFIED";case i.PROPOSAL_STATUS_SUBMITTED:return"PROPOSAL_STATUS_SUBMITTED";case i.PROPOSAL_STATUS_ACCEPTED:return"PROPOSAL_STATUS_ACCEPTED";case i.PROPOSAL_STATUS_REJECTED:return"PROPOSAL_STATUS_REJECTED";case i.PROPOSAL_STATUS_ABORTED:return"PROPOSAL_STATUS_ABORTED";case i.PROPOSAL_STATUS_WITHDRAWN:return"PROPOSAL_STATUS_WITHDRAWN";case i.UNRECOGNIZED:default:return"UNRECOGNIZED"}}function g(e){switch(e){case 0:case"PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED":return o.PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED;case 1:case"PROPOSAL_EXECUTOR_RESULT_NOT_RUN":return o.PROPOSAL_EXECUTOR_RESULT_NOT_RUN;case 2:case"PROPOSAL_EXECUTOR_RESULT_SUCCESS":return o.PROPOSAL_EXECUTOR_RESULT_SUCCESS;case 3:case"PROPOSAL_EXECUTOR_RESULT_FAILURE":return o.PROPOSAL_EXECUTOR_RESULT_FAILURE;default:return o.UNRECOGNIZED}}function m(e){switch(e){case o.PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED:return"PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED";case o.PROPOSAL_EXECUTOR_RESULT_NOT_RUN:return"PROPOSAL_EXECUTOR_RESULT_NOT_RUN";case o.PROPOSAL_EXECUTOR_RESULT_SUCCESS:return"PROPOSAL_EXECUTOR_RESULT_SUCCESS";case o.PROPOSAL_EXECUTOR_RESULT_FAILURE:return"PROPOSAL_EXECUTOR_RESULT_FAILURE";case o.UNRECOGNIZED:default:return"UNRECOGNIZED"}}function y(){return{address:"",weight:"",metadata:"",addedAt:a.Timestamp.fromPartial({})}}function v(){return{address:"",weight:"",metadata:""}}function b(){return{threshold:"",windows:void 0}}function S(){return{percentage:"",windows:void 0}}function w(){return{votingPeriod:s.Duration.fromPartial({}),minExecutionPeriod:s.Duration.fromPartial({})}}function _(){return{id:BigInt(0),admin:"",metadata:"",version:BigInt(0),totalWeight:"",createdAt:a.Timestamp.fromPartial({})}}function k(){return{groupId:BigInt(0),member:void 0}}function O(){return{address:"",groupId:BigInt(0),admin:"",metadata:"",version:BigInt(0),decisionPolicy:void 0,createdAt:a.Timestamp.fromPartial({})}}function P(){return{id:BigInt(0),groupPolicyAddress:"",metadata:"",proposers:[],submitTime:a.Timestamp.fromPartial({}),groupVersion:BigInt(0),groupPolicyVersion:BigInt(0),status:0,finalTallyResult:t.TallyResult.fromPartial({}),votingPeriodEnd:a.Timestamp.fromPartial({}),executorResult:0,messages:[],title:"",summary:""}}function A(){return{yesCount:"",abstainCount:"",noCount:"",noWithVetoCount:""}}function I(){return{proposalId:BigInt(0),voter:"",option:0,metadata:"",submitTime:a.Timestamp.fromPartial({})}}t.protobufPackage="cosmos.group.v1",function(e){e[e.VOTE_OPTION_UNSPECIFIED=0]="VOTE_OPTION_UNSPECIFIED",e[e.VOTE_OPTION_YES=1]="VOTE_OPTION_YES",e[e.VOTE_OPTION_ABSTAIN=2]="VOTE_OPTION_ABSTAIN",e[e.VOTE_OPTION_NO=3]="VOTE_OPTION_NO",e[e.VOTE_OPTION_NO_WITH_VETO=4]="VOTE_OPTION_NO_WITH_VETO",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(n||(t.VoteOption=n={})),t.voteOptionFromJSON=c,t.voteOptionToJSON=p,function(e){e[e.PROPOSAL_STATUS_UNSPECIFIED=0]="PROPOSAL_STATUS_UNSPECIFIED",e[e.PROPOSAL_STATUS_SUBMITTED=1]="PROPOSAL_STATUS_SUBMITTED",e[e.PROPOSAL_STATUS_ACCEPTED=2]="PROPOSAL_STATUS_ACCEPTED",e[e.PROPOSAL_STATUS_REJECTED=3]="PROPOSAL_STATUS_REJECTED",e[e.PROPOSAL_STATUS_ABORTED=4]="PROPOSAL_STATUS_ABORTED",e[e.PROPOSAL_STATUS_WITHDRAWN=5]="PROPOSAL_STATUS_WITHDRAWN",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(i||(t.ProposalStatus=i={})),t.proposalStatusFromJSON=f,t.proposalStatusToJSON=h,function(e){e[e.PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED=0]="PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED",e[e.PROPOSAL_EXECUTOR_RESULT_NOT_RUN=1]="PROPOSAL_EXECUTOR_RESULT_NOT_RUN",e[e.PROPOSAL_EXECUTOR_RESULT_SUCCESS=2]="PROPOSAL_EXECUTOR_RESULT_SUCCESS",e[e.PROPOSAL_EXECUTOR_RESULT_FAILURE=3]="PROPOSAL_EXECUTOR_RESULT_FAILURE",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(o||(t.ProposalExecutorResult=o={})),t.proposalExecutorResultFromJSON=g,t.proposalExecutorResultToJSON=m,t.Member={typeUrl:"/cosmos.group.v1.Member",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.BinaryWriter.create();return""!==e.address&&t.uint32(10).string(e.address),""!==e.weight&&t.uint32(18).string(e.weight),""!==e.metadata&&t.uint32(26).string(e.metadata),void 0!==e.addedAt&&a.Timestamp.encode(e.addedAt,t.uint32(34).fork()).ldelim(),t},decode(e,t){let r=e instanceof u.BinaryReader?e:new u.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=y();for(;r.pos>>3){case 1:i.address=r.string();break;case 2:i.weight=r.string();break;case 3:i.metadata=r.string();break;case 4:i.addedAt=a.Timestamp.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=y();return(0,d.isSet)(e.address)&&(t.address=String(e.address)),(0,d.isSet)(e.weight)&&(t.weight=String(e.weight)),(0,d.isSet)(e.metadata)&&(t.metadata=String(e.metadata)),(0,d.isSet)(e.addedAt)&&(t.addedAt=(0,d.fromJsonTimestamp)(e.addedAt)),t},toJSON(e){let t={};return void 0!==e.address&&(t.address=e.address),void 0!==e.weight&&(t.weight=e.weight),void 0!==e.metadata&&(t.metadata=e.metadata),void 0!==e.addedAt&&(t.addedAt=(0,d.fromTimestamp)(e.addedAt).toISOString()),t},fromPartial(e){var t,r,n;let i=y();return i.address=null!==(t=e.address)&&void 0!==t?t:"",i.weight=null!==(r=e.weight)&&void 0!==r?r:"",i.metadata=null!==(n=e.metadata)&&void 0!==n?n:"",void 0!==e.addedAt&&null!==e.addedAt&&(i.addedAt=a.Timestamp.fromPartial(e.addedAt)),i}},t.MemberRequest={typeUrl:"/cosmos.group.v1.MemberRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.BinaryWriter.create();return""!==e.address&&t.uint32(10).string(e.address),""!==e.weight&&t.uint32(18).string(e.weight),""!==e.metadata&&t.uint32(26).string(e.metadata),t},decode(e,t){let r=e instanceof u.BinaryReader?e:new u.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=v();for(;r.pos>>3){case 1:i.address=r.string();break;case 2:i.weight=r.string();break;case 3:i.metadata=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=v();return(0,d.isSet)(e.address)&&(t.address=String(e.address)),(0,d.isSet)(e.weight)&&(t.weight=String(e.weight)),(0,d.isSet)(e.metadata)&&(t.metadata=String(e.metadata)),t},toJSON(e){let t={};return void 0!==e.address&&(t.address=e.address),void 0!==e.weight&&(t.weight=e.weight),void 0!==e.metadata&&(t.metadata=e.metadata),t},fromPartial(e){var t,r,n;let i=v();return i.address=null!==(t=e.address)&&void 0!==t?t:"",i.weight=null!==(r=e.weight)&&void 0!==r?r:"",i.metadata=null!==(n=e.metadata)&&void 0!==n?n:"",i}},t.ThresholdDecisionPolicy={typeUrl:"/cosmos.group.v1.ThresholdDecisionPolicy",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.BinaryWriter.create();return""!==e.threshold&&r.uint32(10).string(e.threshold),void 0!==e.windows&&t.DecisionPolicyWindows.encode(e.windows,r.uint32(18).fork()).ldelim(),r},decode(e,r){let n=e instanceof u.BinaryReader?e:new u.BinaryReader(e),i=void 0===r?n.len:n.pos+r,o=b();for(;n.pos>>3){case 1:o.threshold=n.string();break;case 2:o.windows=t.DecisionPolicyWindows.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){let r=b();return(0,d.isSet)(e.threshold)&&(r.threshold=String(e.threshold)),(0,d.isSet)(e.windows)&&(r.windows=t.DecisionPolicyWindows.fromJSON(e.windows)),r},toJSON(e){let r={};return void 0!==e.threshold&&(r.threshold=e.threshold),void 0!==e.windows&&(r.windows=e.windows?t.DecisionPolicyWindows.toJSON(e.windows):void 0),r},fromPartial(e){var r;let n=b();return n.threshold=null!==(r=e.threshold)&&void 0!==r?r:"",void 0!==e.windows&&null!==e.windows&&(n.windows=t.DecisionPolicyWindows.fromPartial(e.windows)),n}},t.PercentageDecisionPolicy={typeUrl:"/cosmos.group.v1.PercentageDecisionPolicy",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.BinaryWriter.create();return""!==e.percentage&&r.uint32(10).string(e.percentage),void 0!==e.windows&&t.DecisionPolicyWindows.encode(e.windows,r.uint32(18).fork()).ldelim(),r},decode(e,r){let n=e instanceof u.BinaryReader?e:new u.BinaryReader(e),i=void 0===r?n.len:n.pos+r,o=S();for(;n.pos>>3){case 1:o.percentage=n.string();break;case 2:o.windows=t.DecisionPolicyWindows.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){let r=S();return(0,d.isSet)(e.percentage)&&(r.percentage=String(e.percentage)),(0,d.isSet)(e.windows)&&(r.windows=t.DecisionPolicyWindows.fromJSON(e.windows)),r},toJSON(e){let r={};return void 0!==e.percentage&&(r.percentage=e.percentage),void 0!==e.windows&&(r.windows=e.windows?t.DecisionPolicyWindows.toJSON(e.windows):void 0),r},fromPartial(e){var r;let n=S();return n.percentage=null!==(r=e.percentage)&&void 0!==r?r:"",void 0!==e.windows&&null!==e.windows&&(n.windows=t.DecisionPolicyWindows.fromPartial(e.windows)),n}},t.DecisionPolicyWindows={typeUrl:"/cosmos.group.v1.DecisionPolicyWindows",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.BinaryWriter.create();return void 0!==e.votingPeriod&&s.Duration.encode(e.votingPeriod,t.uint32(10).fork()).ldelim(),void 0!==e.minExecutionPeriod&&s.Duration.encode(e.minExecutionPeriod,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof u.BinaryReader?e:new u.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=w();for(;r.pos>>3){case 1:i.votingPeriod=s.Duration.decode(r,r.uint32());break;case 2:i.minExecutionPeriod=s.Duration.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=w();return(0,d.isSet)(e.votingPeriod)&&(t.votingPeriod=s.Duration.fromJSON(e.votingPeriod)),(0,d.isSet)(e.minExecutionPeriod)&&(t.minExecutionPeriod=s.Duration.fromJSON(e.minExecutionPeriod)),t},toJSON(e){let t={};return void 0!==e.votingPeriod&&(t.votingPeriod=e.votingPeriod?s.Duration.toJSON(e.votingPeriod):void 0),void 0!==e.minExecutionPeriod&&(t.minExecutionPeriod=e.minExecutionPeriod?s.Duration.toJSON(e.minExecutionPeriod):void 0),t},fromPartial(e){let t=w();return void 0!==e.votingPeriod&&null!==e.votingPeriod&&(t.votingPeriod=s.Duration.fromPartial(e.votingPeriod)),void 0!==e.minExecutionPeriod&&null!==e.minExecutionPeriod&&(t.minExecutionPeriod=s.Duration.fromPartial(e.minExecutionPeriod)),t}},t.GroupInfo={typeUrl:"/cosmos.group.v1.GroupInfo",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.BinaryWriter.create();return e.id!==BigInt(0)&&t.uint32(8).uint64(e.id),""!==e.admin&&t.uint32(18).string(e.admin),""!==e.metadata&&t.uint32(26).string(e.metadata),e.version!==BigInt(0)&&t.uint32(32).uint64(e.version),""!==e.totalWeight&&t.uint32(42).string(e.totalWeight),void 0!==e.createdAt&&a.Timestamp.encode(e.createdAt,t.uint32(50).fork()).ldelim(),t},decode(e,t){let r=e instanceof u.BinaryReader?e:new u.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=_();for(;r.pos>>3){case 1:i.id=r.uint64();break;case 2:i.admin=r.string();break;case 3:i.metadata=r.string();break;case 4:i.version=r.uint64();break;case 5:i.totalWeight=r.string();break;case 6:i.createdAt=a.Timestamp.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=_();return(0,d.isSet)(e.id)&&(t.id=BigInt(e.id.toString())),(0,d.isSet)(e.admin)&&(t.admin=String(e.admin)),(0,d.isSet)(e.metadata)&&(t.metadata=String(e.metadata)),(0,d.isSet)(e.version)&&(t.version=BigInt(e.version.toString())),(0,d.isSet)(e.totalWeight)&&(t.totalWeight=String(e.totalWeight)),(0,d.isSet)(e.createdAt)&&(t.createdAt=(0,d.fromJsonTimestamp)(e.createdAt)),t},toJSON(e){let t={};return void 0!==e.id&&(t.id=(e.id||BigInt(0)).toString()),void 0!==e.admin&&(t.admin=e.admin),void 0!==e.metadata&&(t.metadata=e.metadata),void 0!==e.version&&(t.version=(e.version||BigInt(0)).toString()),void 0!==e.totalWeight&&(t.totalWeight=e.totalWeight),void 0!==e.createdAt&&(t.createdAt=(0,d.fromTimestamp)(e.createdAt).toISOString()),t},fromPartial(e){var t,r,n;let i=_();return void 0!==e.id&&null!==e.id&&(i.id=BigInt(e.id.toString())),i.admin=null!==(t=e.admin)&&void 0!==t?t:"",i.metadata=null!==(r=e.metadata)&&void 0!==r?r:"",void 0!==e.version&&null!==e.version&&(i.version=BigInt(e.version.toString())),i.totalWeight=null!==(n=e.totalWeight)&&void 0!==n?n:"",void 0!==e.createdAt&&null!==e.createdAt&&(i.createdAt=a.Timestamp.fromPartial(e.createdAt)),i}},t.GroupMember={typeUrl:"/cosmos.group.v1.GroupMember",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.BinaryWriter.create();return e.groupId!==BigInt(0)&&r.uint32(8).uint64(e.groupId),void 0!==e.member&&t.Member.encode(e.member,r.uint32(18).fork()).ldelim(),r},decode(e,r){let n=e instanceof u.BinaryReader?e:new u.BinaryReader(e),i=void 0===r?n.len:n.pos+r,o=k();for(;n.pos>>3){case 1:o.groupId=n.uint64();break;case 2:o.member=t.Member.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){let r=k();return(0,d.isSet)(e.groupId)&&(r.groupId=BigInt(e.groupId.toString())),(0,d.isSet)(e.member)&&(r.member=t.Member.fromJSON(e.member)),r},toJSON(e){let r={};return void 0!==e.groupId&&(r.groupId=(e.groupId||BigInt(0)).toString()),void 0!==e.member&&(r.member=e.member?t.Member.toJSON(e.member):void 0),r},fromPartial(e){let r=k();return void 0!==e.groupId&&null!==e.groupId&&(r.groupId=BigInt(e.groupId.toString())),void 0!==e.member&&null!==e.member&&(r.member=t.Member.fromPartial(e.member)),r}},t.GroupPolicyInfo={typeUrl:"/cosmos.group.v1.GroupPolicyInfo",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.BinaryWriter.create();return""!==e.address&&t.uint32(10).string(e.address),e.groupId!==BigInt(0)&&t.uint32(16).uint64(e.groupId),""!==e.admin&&t.uint32(26).string(e.admin),""!==e.metadata&&t.uint32(34).string(e.metadata),e.version!==BigInt(0)&&t.uint32(40).uint64(e.version),void 0!==e.decisionPolicy&&l.Any.encode(e.decisionPolicy,t.uint32(50).fork()).ldelim(),void 0!==e.createdAt&&a.Timestamp.encode(e.createdAt,t.uint32(58).fork()).ldelim(),t},decode(e,t){let r=e instanceof u.BinaryReader?e:new u.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=O();for(;r.pos>>3){case 1:i.address=r.string();break;case 2:i.groupId=r.uint64();break;case 3:i.admin=r.string();break;case 4:i.metadata=r.string();break;case 5:i.version=r.uint64();break;case 6:i.decisionPolicy=l.Any.decode(r,r.uint32());break;case 7:i.createdAt=a.Timestamp.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=O();return(0,d.isSet)(e.address)&&(t.address=String(e.address)),(0,d.isSet)(e.groupId)&&(t.groupId=BigInt(e.groupId.toString())),(0,d.isSet)(e.admin)&&(t.admin=String(e.admin)),(0,d.isSet)(e.metadata)&&(t.metadata=String(e.metadata)),(0,d.isSet)(e.version)&&(t.version=BigInt(e.version.toString())),(0,d.isSet)(e.decisionPolicy)&&(t.decisionPolicy=l.Any.fromJSON(e.decisionPolicy)),(0,d.isSet)(e.createdAt)&&(t.createdAt=(0,d.fromJsonTimestamp)(e.createdAt)),t},toJSON(e){let t={};return void 0!==e.address&&(t.address=e.address),void 0!==e.groupId&&(t.groupId=(e.groupId||BigInt(0)).toString()),void 0!==e.admin&&(t.admin=e.admin),void 0!==e.metadata&&(t.metadata=e.metadata),void 0!==e.version&&(t.version=(e.version||BigInt(0)).toString()),void 0!==e.decisionPolicy&&(t.decisionPolicy=e.decisionPolicy?l.Any.toJSON(e.decisionPolicy):void 0),void 0!==e.createdAt&&(t.createdAt=(0,d.fromTimestamp)(e.createdAt).toISOString()),t},fromPartial(e){var t,r,n;let i=O();return i.address=null!==(t=e.address)&&void 0!==t?t:"",void 0!==e.groupId&&null!==e.groupId&&(i.groupId=BigInt(e.groupId.toString())),i.admin=null!==(r=e.admin)&&void 0!==r?r:"",i.metadata=null!==(n=e.metadata)&&void 0!==n?n:"",void 0!==e.version&&null!==e.version&&(i.version=BigInt(e.version.toString())),void 0!==e.decisionPolicy&&null!==e.decisionPolicy&&(i.decisionPolicy=l.Any.fromPartial(e.decisionPolicy)),void 0!==e.createdAt&&null!==e.createdAt&&(i.createdAt=a.Timestamp.fromPartial(e.createdAt)),i}},t.Proposal={typeUrl:"/cosmos.group.v1.Proposal",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.BinaryWriter.create();for(let t of(e.id!==BigInt(0)&&r.uint32(8).uint64(e.id),""!==e.groupPolicyAddress&&r.uint32(18).string(e.groupPolicyAddress),""!==e.metadata&&r.uint32(26).string(e.metadata),e.proposers))r.uint32(34).string(t);for(let n of(void 0!==e.submitTime&&a.Timestamp.encode(e.submitTime,r.uint32(42).fork()).ldelim(),e.groupVersion!==BigInt(0)&&r.uint32(48).uint64(e.groupVersion),e.groupPolicyVersion!==BigInt(0)&&r.uint32(56).uint64(e.groupPolicyVersion),0!==e.status&&r.uint32(64).int32(e.status),void 0!==e.finalTallyResult&&t.TallyResult.encode(e.finalTallyResult,r.uint32(74).fork()).ldelim(),void 0!==e.votingPeriodEnd&&a.Timestamp.encode(e.votingPeriodEnd,r.uint32(82).fork()).ldelim(),0!==e.executorResult&&r.uint32(88).int32(e.executorResult),e.messages))l.Any.encode(n,r.uint32(98).fork()).ldelim();return""!==e.title&&r.uint32(106).string(e.title),""!==e.summary&&r.uint32(114).string(e.summary),r},decode(e,r){let n=e instanceof u.BinaryReader?e:new u.BinaryReader(e),i=void 0===r?n.len:n.pos+r,o=P();for(;n.pos>>3){case 1:o.id=n.uint64();break;case 2:o.groupPolicyAddress=n.string();break;case 3:o.metadata=n.string();break;case 4:o.proposers.push(n.string());break;case 5:o.submitTime=a.Timestamp.decode(n,n.uint32());break;case 6:o.groupVersion=n.uint64();break;case 7:o.groupPolicyVersion=n.uint64();break;case 8:o.status=n.int32();break;case 9:o.finalTallyResult=t.TallyResult.decode(n,n.uint32());break;case 10:o.votingPeriodEnd=a.Timestamp.decode(n,n.uint32());break;case 11:o.executorResult=n.int32();break;case 12:o.messages.push(l.Any.decode(n,n.uint32()));break;case 13:o.title=n.string();break;case 14:o.summary=n.string();break;default:n.skipType(7&e)}}return o},fromJSON(e){let r=P();return(0,d.isSet)(e.id)&&(r.id=BigInt(e.id.toString())),(0,d.isSet)(e.groupPolicyAddress)&&(r.groupPolicyAddress=String(e.groupPolicyAddress)),(0,d.isSet)(e.metadata)&&(r.metadata=String(e.metadata)),Array.isArray(null==e?void 0:e.proposers)&&(r.proposers=e.proposers.map(e=>String(e))),(0,d.isSet)(e.submitTime)&&(r.submitTime=(0,d.fromJsonTimestamp)(e.submitTime)),(0,d.isSet)(e.groupVersion)&&(r.groupVersion=BigInt(e.groupVersion.toString())),(0,d.isSet)(e.groupPolicyVersion)&&(r.groupPolicyVersion=BigInt(e.groupPolicyVersion.toString())),(0,d.isSet)(e.status)&&(r.status=f(e.status)),(0,d.isSet)(e.finalTallyResult)&&(r.finalTallyResult=t.TallyResult.fromJSON(e.finalTallyResult)),(0,d.isSet)(e.votingPeriodEnd)&&(r.votingPeriodEnd=(0,d.fromJsonTimestamp)(e.votingPeriodEnd)),(0,d.isSet)(e.executorResult)&&(r.executorResult=g(e.executorResult)),Array.isArray(null==e?void 0:e.messages)&&(r.messages=e.messages.map(e=>l.Any.fromJSON(e))),(0,d.isSet)(e.title)&&(r.title=String(e.title)),(0,d.isSet)(e.summary)&&(r.summary=String(e.summary)),r},toJSON(e){let r={};return void 0!==e.id&&(r.id=(e.id||BigInt(0)).toString()),void 0!==e.groupPolicyAddress&&(r.groupPolicyAddress=e.groupPolicyAddress),void 0!==e.metadata&&(r.metadata=e.metadata),e.proposers?r.proposers=e.proposers.map(e=>e):r.proposers=[],void 0!==e.submitTime&&(r.submitTime=(0,d.fromTimestamp)(e.submitTime).toISOString()),void 0!==e.groupVersion&&(r.groupVersion=(e.groupVersion||BigInt(0)).toString()),void 0!==e.groupPolicyVersion&&(r.groupPolicyVersion=(e.groupPolicyVersion||BigInt(0)).toString()),void 0!==e.status&&(r.status=h(e.status)),void 0!==e.finalTallyResult&&(r.finalTallyResult=e.finalTallyResult?t.TallyResult.toJSON(e.finalTallyResult):void 0),void 0!==e.votingPeriodEnd&&(r.votingPeriodEnd=(0,d.fromTimestamp)(e.votingPeriodEnd).toISOString()),void 0!==e.executorResult&&(r.executorResult=m(e.executorResult)),e.messages?r.messages=e.messages.map(e=>e?l.Any.toJSON(e):void 0):r.messages=[],void 0!==e.title&&(r.title=e.title),void 0!==e.summary&&(r.summary=e.summary),r},fromPartial(e){var r,n,i,o,s,u,d,c;let p=P();return void 0!==e.id&&null!==e.id&&(p.id=BigInt(e.id.toString())),p.groupPolicyAddress=null!==(i=e.groupPolicyAddress)&&void 0!==i?i:"",p.metadata=null!==(o=e.metadata)&&void 0!==o?o:"",p.proposers=(null===(r=e.proposers)||void 0===r?void 0:r.map(e=>e))||[],void 0!==e.submitTime&&null!==e.submitTime&&(p.submitTime=a.Timestamp.fromPartial(e.submitTime)),void 0!==e.groupVersion&&null!==e.groupVersion&&(p.groupVersion=BigInt(e.groupVersion.toString())),void 0!==e.groupPolicyVersion&&null!==e.groupPolicyVersion&&(p.groupPolicyVersion=BigInt(e.groupPolicyVersion.toString())),p.status=null!==(s=e.status)&&void 0!==s?s:0,void 0!==e.finalTallyResult&&null!==e.finalTallyResult&&(p.finalTallyResult=t.TallyResult.fromPartial(e.finalTallyResult)),void 0!==e.votingPeriodEnd&&null!==e.votingPeriodEnd&&(p.votingPeriodEnd=a.Timestamp.fromPartial(e.votingPeriodEnd)),p.executorResult=null!==(u=e.executorResult)&&void 0!==u?u:0,p.messages=(null===(n=e.messages)||void 0===n?void 0:n.map(e=>l.Any.fromPartial(e)))||[],p.title=null!==(d=e.title)&&void 0!==d?d:"",p.summary=null!==(c=e.summary)&&void 0!==c?c:"",p}},t.TallyResult={typeUrl:"/cosmos.group.v1.TallyResult",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.BinaryWriter.create();return""!==e.yesCount&&t.uint32(10).string(e.yesCount),""!==e.abstainCount&&t.uint32(18).string(e.abstainCount),""!==e.noCount&&t.uint32(26).string(e.noCount),""!==e.noWithVetoCount&&t.uint32(34).string(e.noWithVetoCount),t},decode(e,t){let r=e instanceof u.BinaryReader?e:new u.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=A();for(;r.pos>>3){case 1:i.yesCount=r.string();break;case 2:i.abstainCount=r.string();break;case 3:i.noCount=r.string();break;case 4:i.noWithVetoCount=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=A();return(0,d.isSet)(e.yesCount)&&(t.yesCount=String(e.yesCount)),(0,d.isSet)(e.abstainCount)&&(t.abstainCount=String(e.abstainCount)),(0,d.isSet)(e.noCount)&&(t.noCount=String(e.noCount)),(0,d.isSet)(e.noWithVetoCount)&&(t.noWithVetoCount=String(e.noWithVetoCount)),t},toJSON(e){let t={};return void 0!==e.yesCount&&(t.yesCount=e.yesCount),void 0!==e.abstainCount&&(t.abstainCount=e.abstainCount),void 0!==e.noCount&&(t.noCount=e.noCount),void 0!==e.noWithVetoCount&&(t.noWithVetoCount=e.noWithVetoCount),t},fromPartial(e){var t,r,n,i;let o=A();return o.yesCount=null!==(t=e.yesCount)&&void 0!==t?t:"",o.abstainCount=null!==(r=e.abstainCount)&&void 0!==r?r:"",o.noCount=null!==(n=e.noCount)&&void 0!==n?n:"",o.noWithVetoCount=null!==(i=e.noWithVetoCount)&&void 0!==i?i:"",o}},t.Vote={typeUrl:"/cosmos.group.v1.Vote",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.BinaryWriter.create();return e.proposalId!==BigInt(0)&&t.uint32(8).uint64(e.proposalId),""!==e.voter&&t.uint32(18).string(e.voter),0!==e.option&&t.uint32(24).int32(e.option),""!==e.metadata&&t.uint32(34).string(e.metadata),void 0!==e.submitTime&&a.Timestamp.encode(e.submitTime,t.uint32(42).fork()).ldelim(),t},decode(e,t){let r=e instanceof u.BinaryReader?e:new u.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=I();for(;r.pos>>3){case 1:i.proposalId=r.uint64();break;case 2:i.voter=r.string();break;case 3:i.option=r.int32();break;case 4:i.metadata=r.string();break;case 5:i.submitTime=a.Timestamp.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=I();return(0,d.isSet)(e.proposalId)&&(t.proposalId=BigInt(e.proposalId.toString())),(0,d.isSet)(e.voter)&&(t.voter=String(e.voter)),(0,d.isSet)(e.option)&&(t.option=c(e.option)),(0,d.isSet)(e.metadata)&&(t.metadata=String(e.metadata)),(0,d.isSet)(e.submitTime)&&(t.submitTime=(0,d.fromJsonTimestamp)(e.submitTime)),t},toJSON(e){let t={};return void 0!==e.proposalId&&(t.proposalId=(e.proposalId||BigInt(0)).toString()),void 0!==e.voter&&(t.voter=e.voter),void 0!==e.option&&(t.option=p(e.option)),void 0!==e.metadata&&(t.metadata=e.metadata),void 0!==e.submitTime&&(t.submitTime=(0,d.fromTimestamp)(e.submitTime).toISOString()),t},fromPartial(e){var t,r,n;let i=I();return void 0!==e.proposalId&&null!==e.proposalId&&(i.proposalId=BigInt(e.proposalId.toString())),i.voter=null!==(t=e.voter)&&void 0!==t?t:"",i.option=null!==(r=e.option)&&void 0!==r?r:0,i.metadata=null!==(n=e.metadata)&&void 0!==n?n:"",void 0!==e.submitTime&&null!==e.submitTime&&(i.submitTime=a.Timestamp.fromPartial(e.submitTime)),i}}},88401:function(e,t,r){"use strict";var n,i;Object.defineProperty(t,"__esModule",{value:!0}),t.CompressedNonExistenceProof=t.CompressedExistenceProof=t.CompressedBatchEntry=t.CompressedBatchProof=t.BatchEntry=t.BatchProof=t.InnerSpec=t.ProofSpec=t.InnerOp=t.LeafOp=t.CommitmentProof=t.NonExistenceProof=t.ExistenceProof=t.lengthOpToJSON=t.lengthOpFromJSON=t.LengthOp=t.hashOpToJSON=t.hashOpFromJSON=t.HashOp=t.protobufPackage=void 0;let o=r(46554),a=r(99133);function s(e){switch(e){case 0:case"NO_HASH":return n.NO_HASH;case 1:case"SHA256":return n.SHA256;case 2:case"SHA512":return n.SHA512;case 3:case"KECCAK":return n.KECCAK;case 4:case"RIPEMD160":return n.RIPEMD160;case 5:case"BITCOIN":return n.BITCOIN;case 6:case"SHA512_256":return n.SHA512_256;default:return n.UNRECOGNIZED}}function l(e){switch(e){case n.NO_HASH:return"NO_HASH";case n.SHA256:return"SHA256";case n.SHA512:return"SHA512";case n.KECCAK:return"KECCAK";case n.RIPEMD160:return"RIPEMD160";case n.BITCOIN:return"BITCOIN";case n.SHA512_256:return"SHA512_256";case n.UNRECOGNIZED:default:return"UNRECOGNIZED"}}function u(e){switch(e){case 0:case"NO_PREFIX":return i.NO_PREFIX;case 1:case"VAR_PROTO":return i.VAR_PROTO;case 2:case"VAR_RLP":return i.VAR_RLP;case 3:case"FIXED32_BIG":return i.FIXED32_BIG;case 4:case"FIXED32_LITTLE":return i.FIXED32_LITTLE;case 5:case"FIXED64_BIG":return i.FIXED64_BIG;case 6:case"FIXED64_LITTLE":return i.FIXED64_LITTLE;case 7:case"REQUIRE_32_BYTES":return i.REQUIRE_32_BYTES;case 8:case"REQUIRE_64_BYTES":return i.REQUIRE_64_BYTES;default:return i.UNRECOGNIZED}}function d(e){switch(e){case i.NO_PREFIX:return"NO_PREFIX";case i.VAR_PROTO:return"VAR_PROTO";case i.VAR_RLP:return"VAR_RLP";case i.FIXED32_BIG:return"FIXED32_BIG";case i.FIXED32_LITTLE:return"FIXED32_LITTLE";case i.FIXED64_BIG:return"FIXED64_BIG";case i.FIXED64_LITTLE:return"FIXED64_LITTLE";case i.REQUIRE_32_BYTES:return"REQUIRE_32_BYTES";case i.REQUIRE_64_BYTES:return"REQUIRE_64_BYTES";case i.UNRECOGNIZED:default:return"UNRECOGNIZED"}}function c(){return{key:new Uint8Array,value:new Uint8Array,leaf:void 0,path:[]}}function p(){return{key:new Uint8Array,left:void 0,right:void 0}}function f(){return{exist:void 0,nonexist:void 0,batch:void 0,compressed:void 0}}function h(){return{hash:0,prehashKey:0,prehashValue:0,length:0,prefix:new Uint8Array}}function g(){return{hash:0,prefix:new Uint8Array,suffix:new Uint8Array}}function m(){return{leafSpec:void 0,innerSpec:void 0,maxDepth:0,minDepth:0}}function y(){return{childOrder:[],childSize:0,minPrefixLength:0,maxPrefixLength:0,emptyChild:new Uint8Array,hash:0}}function v(){return{entries:[]}}function b(){return{exist:void 0,nonexist:void 0}}function S(){return{entries:[],lookupInners:[]}}function w(){return{exist:void 0,nonexist:void 0}}function _(){return{key:new Uint8Array,value:new Uint8Array,leaf:void 0,path:[]}}function k(){return{key:new Uint8Array,left:void 0,right:void 0}}t.protobufPackage="cosmos.ics23.v1",function(e){e[e.NO_HASH=0]="NO_HASH",e[e.SHA256=1]="SHA256",e[e.SHA512=2]="SHA512",e[e.KECCAK=3]="KECCAK",e[e.RIPEMD160=4]="RIPEMD160",e[e.BITCOIN=5]="BITCOIN",e[e.SHA512_256=6]="SHA512_256",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(n||(t.HashOp=n={})),t.hashOpFromJSON=s,t.hashOpToJSON=l,function(e){e[e.NO_PREFIX=0]="NO_PREFIX",e[e.VAR_PROTO=1]="VAR_PROTO",e[e.VAR_RLP=2]="VAR_RLP",e[e.FIXED32_BIG=3]="FIXED32_BIG",e[e.FIXED32_LITTLE=4]="FIXED32_LITTLE",e[e.FIXED64_BIG=5]="FIXED64_BIG",e[e.FIXED64_LITTLE=6]="FIXED64_LITTLE",e[e.REQUIRE_32_BYTES=7]="REQUIRE_32_BYTES",e[e.REQUIRE_64_BYTES=8]="REQUIRE_64_BYTES",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(i||(t.LengthOp=i={})),t.lengthOpFromJSON=u,t.lengthOpToJSON=d,t.ExistenceProof={typeUrl:"/cosmos.ics23.v1.ExistenceProof",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let n of(0!==e.key.length&&r.uint32(10).bytes(e.key),0!==e.value.length&&r.uint32(18).bytes(e.value),void 0!==e.leaf&&t.LeafOp.encode(e.leaf,r.uint32(26).fork()).ldelim(),e.path))t.InnerOp.encode(n,r.uint32(34).fork()).ldelim();return r},decode(e,r){let n=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===r?n.len:n.pos+r,a=c();for(;n.pos>>3){case 1:a.key=n.bytes();break;case 2:a.value=n.bytes();break;case 3:a.leaf=t.LeafOp.decode(n,n.uint32());break;case 4:a.path.push(t.InnerOp.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return a},fromJSON(e){let r=c();return(0,a.isSet)(e.key)&&(r.key=(0,a.bytesFromBase64)(e.key)),(0,a.isSet)(e.value)&&(r.value=(0,a.bytesFromBase64)(e.value)),(0,a.isSet)(e.leaf)&&(r.leaf=t.LeafOp.fromJSON(e.leaf)),Array.isArray(null==e?void 0:e.path)&&(r.path=e.path.map(e=>t.InnerOp.fromJSON(e))),r},toJSON(e){let r={};return void 0!==e.key&&(r.key=(0,a.base64FromBytes)(void 0!==e.key?e.key:new Uint8Array)),void 0!==e.value&&(r.value=(0,a.base64FromBytes)(void 0!==e.value?e.value:new Uint8Array)),void 0!==e.leaf&&(r.leaf=e.leaf?t.LeafOp.toJSON(e.leaf):void 0),e.path?r.path=e.path.map(e=>e?t.InnerOp.toJSON(e):void 0):r.path=[],r},fromPartial(e){var r,n,i;let o=c();return o.key=null!==(n=e.key)&&void 0!==n?n:new Uint8Array,o.value=null!==(i=e.value)&&void 0!==i?i:new Uint8Array,void 0!==e.leaf&&null!==e.leaf&&(o.leaf=t.LeafOp.fromPartial(e.leaf)),o.path=(null===(r=e.path)||void 0===r?void 0:r.map(e=>t.InnerOp.fromPartial(e)))||[],o}},t.NonExistenceProof={typeUrl:"/cosmos.ics23.v1.NonExistenceProof",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return 0!==e.key.length&&r.uint32(10).bytes(e.key),void 0!==e.left&&t.ExistenceProof.encode(e.left,r.uint32(18).fork()).ldelim(),void 0!==e.right&&t.ExistenceProof.encode(e.right,r.uint32(26).fork()).ldelim(),r},decode(e,r){let n=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===r?n.len:n.pos+r,a=p();for(;n.pos>>3){case 1:a.key=n.bytes();break;case 2:a.left=t.ExistenceProof.decode(n,n.uint32());break;case 3:a.right=t.ExistenceProof.decode(n,n.uint32());break;default:n.skipType(7&e)}}return a},fromJSON(e){let r=p();return(0,a.isSet)(e.key)&&(r.key=(0,a.bytesFromBase64)(e.key)),(0,a.isSet)(e.left)&&(r.left=t.ExistenceProof.fromJSON(e.left)),(0,a.isSet)(e.right)&&(r.right=t.ExistenceProof.fromJSON(e.right)),r},toJSON(e){let r={};return void 0!==e.key&&(r.key=(0,a.base64FromBytes)(void 0!==e.key?e.key:new Uint8Array)),void 0!==e.left&&(r.left=e.left?t.ExistenceProof.toJSON(e.left):void 0),void 0!==e.right&&(r.right=e.right?t.ExistenceProof.toJSON(e.right):void 0),r},fromPartial(e){var r;let n=p();return n.key=null!==(r=e.key)&&void 0!==r?r:new Uint8Array,void 0!==e.left&&null!==e.left&&(n.left=t.ExistenceProof.fromPartial(e.left)),void 0!==e.right&&null!==e.right&&(n.right=t.ExistenceProof.fromPartial(e.right)),n}},t.CommitmentProof={typeUrl:"/cosmos.ics23.v1.CommitmentProof",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return void 0!==e.exist&&t.ExistenceProof.encode(e.exist,r.uint32(10).fork()).ldelim(),void 0!==e.nonexist&&t.NonExistenceProof.encode(e.nonexist,r.uint32(18).fork()).ldelim(),void 0!==e.batch&&t.BatchProof.encode(e.batch,r.uint32(26).fork()).ldelim(),void 0!==e.compressed&&t.CompressedBatchProof.encode(e.compressed,r.uint32(34).fork()).ldelim(),r},decode(e,r){let n=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===r?n.len:n.pos+r,a=f();for(;n.pos>>3){case 1:a.exist=t.ExistenceProof.decode(n,n.uint32());break;case 2:a.nonexist=t.NonExistenceProof.decode(n,n.uint32());break;case 3:a.batch=t.BatchProof.decode(n,n.uint32());break;case 4:a.compressed=t.CompressedBatchProof.decode(n,n.uint32());break;default:n.skipType(7&e)}}return a},fromJSON(e){let r=f();return(0,a.isSet)(e.exist)&&(r.exist=t.ExistenceProof.fromJSON(e.exist)),(0,a.isSet)(e.nonexist)&&(r.nonexist=t.NonExistenceProof.fromJSON(e.nonexist)),(0,a.isSet)(e.batch)&&(r.batch=t.BatchProof.fromJSON(e.batch)),(0,a.isSet)(e.compressed)&&(r.compressed=t.CompressedBatchProof.fromJSON(e.compressed)),r},toJSON(e){let r={};return void 0!==e.exist&&(r.exist=e.exist?t.ExistenceProof.toJSON(e.exist):void 0),void 0!==e.nonexist&&(r.nonexist=e.nonexist?t.NonExistenceProof.toJSON(e.nonexist):void 0),void 0!==e.batch&&(r.batch=e.batch?t.BatchProof.toJSON(e.batch):void 0),void 0!==e.compressed&&(r.compressed=e.compressed?t.CompressedBatchProof.toJSON(e.compressed):void 0),r},fromPartial(e){let r=f();return void 0!==e.exist&&null!==e.exist&&(r.exist=t.ExistenceProof.fromPartial(e.exist)),void 0!==e.nonexist&&null!==e.nonexist&&(r.nonexist=t.NonExistenceProof.fromPartial(e.nonexist)),void 0!==e.batch&&null!==e.batch&&(r.batch=t.BatchProof.fromPartial(e.batch)),void 0!==e.compressed&&null!==e.compressed&&(r.compressed=t.CompressedBatchProof.fromPartial(e.compressed)),r}},t.LeafOp={typeUrl:"/cosmos.ics23.v1.LeafOp",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return 0!==e.hash&&t.uint32(8).int32(e.hash),0!==e.prehashKey&&t.uint32(16).int32(e.prehashKey),0!==e.prehashValue&&t.uint32(24).int32(e.prehashValue),0!==e.length&&t.uint32(32).int32(e.length),0!==e.prefix.length&&t.uint32(42).bytes(e.prefix),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=h();for(;r.pos>>3){case 1:i.hash=r.int32();break;case 2:i.prehashKey=r.int32();break;case 3:i.prehashValue=r.int32();break;case 4:i.length=r.int32();break;case 5:i.prefix=r.bytes();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=h();return(0,a.isSet)(e.hash)&&(t.hash=s(e.hash)),(0,a.isSet)(e.prehashKey)&&(t.prehashKey=s(e.prehashKey)),(0,a.isSet)(e.prehashValue)&&(t.prehashValue=s(e.prehashValue)),(0,a.isSet)(e.length)&&(t.length=u(e.length)),(0,a.isSet)(e.prefix)&&(t.prefix=(0,a.bytesFromBase64)(e.prefix)),t},toJSON(e){let t={};return void 0!==e.hash&&(t.hash=l(e.hash)),void 0!==e.prehashKey&&(t.prehashKey=l(e.prehashKey)),void 0!==e.prehashValue&&(t.prehashValue=l(e.prehashValue)),void 0!==e.length&&(t.length=d(e.length)),void 0!==e.prefix&&(t.prefix=(0,a.base64FromBytes)(void 0!==e.prefix?e.prefix:new Uint8Array)),t},fromPartial(e){var t,r,n,i,o;let a=h();return a.hash=null!==(t=e.hash)&&void 0!==t?t:0,a.prehashKey=null!==(r=e.prehashKey)&&void 0!==r?r:0,a.prehashValue=null!==(n=e.prehashValue)&&void 0!==n?n:0,a.length=null!==(i=e.length)&&void 0!==i?i:0,a.prefix=null!==(o=e.prefix)&&void 0!==o?o:new Uint8Array,a}},t.InnerOp={typeUrl:"/cosmos.ics23.v1.InnerOp",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return 0!==e.hash&&t.uint32(8).int32(e.hash),0!==e.prefix.length&&t.uint32(18).bytes(e.prefix),0!==e.suffix.length&&t.uint32(26).bytes(e.suffix),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=g();for(;r.pos>>3){case 1:i.hash=r.int32();break;case 2:i.prefix=r.bytes();break;case 3:i.suffix=r.bytes();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=g();return(0,a.isSet)(e.hash)&&(t.hash=s(e.hash)),(0,a.isSet)(e.prefix)&&(t.prefix=(0,a.bytesFromBase64)(e.prefix)),(0,a.isSet)(e.suffix)&&(t.suffix=(0,a.bytesFromBase64)(e.suffix)),t},toJSON(e){let t={};return void 0!==e.hash&&(t.hash=l(e.hash)),void 0!==e.prefix&&(t.prefix=(0,a.base64FromBytes)(void 0!==e.prefix?e.prefix:new Uint8Array)),void 0!==e.suffix&&(t.suffix=(0,a.base64FromBytes)(void 0!==e.suffix?e.suffix:new Uint8Array)),t},fromPartial(e){var t,r,n;let i=g();return i.hash=null!==(t=e.hash)&&void 0!==t?t:0,i.prefix=null!==(r=e.prefix)&&void 0!==r?r:new Uint8Array,i.suffix=null!==(n=e.suffix)&&void 0!==n?n:new Uint8Array,i}},t.ProofSpec={typeUrl:"/cosmos.ics23.v1.ProofSpec",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return void 0!==e.leafSpec&&t.LeafOp.encode(e.leafSpec,r.uint32(10).fork()).ldelim(),void 0!==e.innerSpec&&t.InnerSpec.encode(e.innerSpec,r.uint32(18).fork()).ldelim(),0!==e.maxDepth&&r.uint32(24).int32(e.maxDepth),0!==e.minDepth&&r.uint32(32).int32(e.minDepth),r},decode(e,r){let n=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===r?n.len:n.pos+r,a=m();for(;n.pos>>3){case 1:a.leafSpec=t.LeafOp.decode(n,n.uint32());break;case 2:a.innerSpec=t.InnerSpec.decode(n,n.uint32());break;case 3:a.maxDepth=n.int32();break;case 4:a.minDepth=n.int32();break;default:n.skipType(7&e)}}return a},fromJSON(e){let r=m();return(0,a.isSet)(e.leafSpec)&&(r.leafSpec=t.LeafOp.fromJSON(e.leafSpec)),(0,a.isSet)(e.innerSpec)&&(r.innerSpec=t.InnerSpec.fromJSON(e.innerSpec)),(0,a.isSet)(e.maxDepth)&&(r.maxDepth=Number(e.maxDepth)),(0,a.isSet)(e.minDepth)&&(r.minDepth=Number(e.minDepth)),r},toJSON(e){let r={};return void 0!==e.leafSpec&&(r.leafSpec=e.leafSpec?t.LeafOp.toJSON(e.leafSpec):void 0),void 0!==e.innerSpec&&(r.innerSpec=e.innerSpec?t.InnerSpec.toJSON(e.innerSpec):void 0),void 0!==e.maxDepth&&(r.maxDepth=Math.round(e.maxDepth)),void 0!==e.minDepth&&(r.minDepth=Math.round(e.minDepth)),r},fromPartial(e){var r,n;let i=m();return void 0!==e.leafSpec&&null!==e.leafSpec&&(i.leafSpec=t.LeafOp.fromPartial(e.leafSpec)),void 0!==e.innerSpec&&null!==e.innerSpec&&(i.innerSpec=t.InnerSpec.fromPartial(e.innerSpec)),i.maxDepth=null!==(r=e.maxDepth)&&void 0!==r?r:0,i.minDepth=null!==(n=e.minDepth)&&void 0!==n?n:0,i}},t.InnerSpec={typeUrl:"/cosmos.ics23.v1.InnerSpec",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of(t.uint32(10).fork(),e.childOrder))t.int32(r);return t.ldelim(),0!==e.childSize&&t.uint32(16).int32(e.childSize),0!==e.minPrefixLength&&t.uint32(24).int32(e.minPrefixLength),0!==e.maxPrefixLength&&t.uint32(32).int32(e.maxPrefixLength),0!==e.emptyChild.length&&t.uint32(42).bytes(e.emptyChild),0!==e.hash&&t.uint32(48).int32(e.hash),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=y();for(;r.pos>>3){case 1:if((7&e)==2){let e=r.uint32()+r.pos;for(;r.posNumber(e))),(0,a.isSet)(e.childSize)&&(t.childSize=Number(e.childSize)),(0,a.isSet)(e.minPrefixLength)&&(t.minPrefixLength=Number(e.minPrefixLength)),(0,a.isSet)(e.maxPrefixLength)&&(t.maxPrefixLength=Number(e.maxPrefixLength)),(0,a.isSet)(e.emptyChild)&&(t.emptyChild=(0,a.bytesFromBase64)(e.emptyChild)),(0,a.isSet)(e.hash)&&(t.hash=s(e.hash)),t},toJSON(e){let t={};return e.childOrder?t.childOrder=e.childOrder.map(e=>Math.round(e)):t.childOrder=[],void 0!==e.childSize&&(t.childSize=Math.round(e.childSize)),void 0!==e.minPrefixLength&&(t.minPrefixLength=Math.round(e.minPrefixLength)),void 0!==e.maxPrefixLength&&(t.maxPrefixLength=Math.round(e.maxPrefixLength)),void 0!==e.emptyChild&&(t.emptyChild=(0,a.base64FromBytes)(void 0!==e.emptyChild?e.emptyChild:new Uint8Array)),void 0!==e.hash&&(t.hash=l(e.hash)),t},fromPartial(e){var t,r,n,i,o,a;let s=y();return s.childOrder=(null===(t=e.childOrder)||void 0===t?void 0:t.map(e=>e))||[],s.childSize=null!==(r=e.childSize)&&void 0!==r?r:0,s.minPrefixLength=null!==(n=e.minPrefixLength)&&void 0!==n?n:0,s.maxPrefixLength=null!==(i=e.maxPrefixLength)&&void 0!==i?i:0,s.emptyChild=null!==(o=e.emptyChild)&&void 0!==o?o:new Uint8Array,s.hash=null!==(a=e.hash)&&void 0!==a?a:0,s}},t.BatchProof={typeUrl:"/cosmos.ics23.v1.BatchProof",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let n of e.entries)t.BatchEntry.encode(n,r.uint32(10).fork()).ldelim();return r},decode(e,r){let n=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===r?n.len:n.pos+r,a=v();for(;n.pos>>3==1?a.entries.push(t.BatchEntry.decode(n,n.uint32())):n.skipType(7&e)}return a},fromJSON(e){let r=v();return Array.isArray(null==e?void 0:e.entries)&&(r.entries=e.entries.map(e=>t.BatchEntry.fromJSON(e))),r},toJSON(e){let r={};return e.entries?r.entries=e.entries.map(e=>e?t.BatchEntry.toJSON(e):void 0):r.entries=[],r},fromPartial(e){var r;let n=v();return n.entries=(null===(r=e.entries)||void 0===r?void 0:r.map(e=>t.BatchEntry.fromPartial(e)))||[],n}},t.BatchEntry={typeUrl:"/cosmos.ics23.v1.BatchEntry",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return void 0!==e.exist&&t.ExistenceProof.encode(e.exist,r.uint32(10).fork()).ldelim(),void 0!==e.nonexist&&t.NonExistenceProof.encode(e.nonexist,r.uint32(18).fork()).ldelim(),r},decode(e,r){let n=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===r?n.len:n.pos+r,a=b();for(;n.pos>>3){case 1:a.exist=t.ExistenceProof.decode(n,n.uint32());break;case 2:a.nonexist=t.NonExistenceProof.decode(n,n.uint32());break;default:n.skipType(7&e)}}return a},fromJSON(e){let r=b();return(0,a.isSet)(e.exist)&&(r.exist=t.ExistenceProof.fromJSON(e.exist)),(0,a.isSet)(e.nonexist)&&(r.nonexist=t.NonExistenceProof.fromJSON(e.nonexist)),r},toJSON(e){let r={};return void 0!==e.exist&&(r.exist=e.exist?t.ExistenceProof.toJSON(e.exist):void 0),void 0!==e.nonexist&&(r.nonexist=e.nonexist?t.NonExistenceProof.toJSON(e.nonexist):void 0),r},fromPartial(e){let r=b();return void 0!==e.exist&&null!==e.exist&&(r.exist=t.ExistenceProof.fromPartial(e.exist)),void 0!==e.nonexist&&null!==e.nonexist&&(r.nonexist=t.NonExistenceProof.fromPartial(e.nonexist)),r}},t.CompressedBatchProof={typeUrl:"/cosmos.ics23.v1.CompressedBatchProof",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let n of e.entries)t.CompressedBatchEntry.encode(n,r.uint32(10).fork()).ldelim();for(let n of e.lookupInners)t.InnerOp.encode(n,r.uint32(18).fork()).ldelim();return r},decode(e,r){let n=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===r?n.len:n.pos+r,a=S();for(;n.pos>>3){case 1:a.entries.push(t.CompressedBatchEntry.decode(n,n.uint32()));break;case 2:a.lookupInners.push(t.InnerOp.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return a},fromJSON(e){let r=S();return Array.isArray(null==e?void 0:e.entries)&&(r.entries=e.entries.map(e=>t.CompressedBatchEntry.fromJSON(e))),Array.isArray(null==e?void 0:e.lookupInners)&&(r.lookupInners=e.lookupInners.map(e=>t.InnerOp.fromJSON(e))),r},toJSON(e){let r={};return e.entries?r.entries=e.entries.map(e=>e?t.CompressedBatchEntry.toJSON(e):void 0):r.entries=[],e.lookupInners?r.lookupInners=e.lookupInners.map(e=>e?t.InnerOp.toJSON(e):void 0):r.lookupInners=[],r},fromPartial(e){var r,n;let i=S();return i.entries=(null===(r=e.entries)||void 0===r?void 0:r.map(e=>t.CompressedBatchEntry.fromPartial(e)))||[],i.lookupInners=(null===(n=e.lookupInners)||void 0===n?void 0:n.map(e=>t.InnerOp.fromPartial(e)))||[],i}},t.CompressedBatchEntry={typeUrl:"/cosmos.ics23.v1.CompressedBatchEntry",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return void 0!==e.exist&&t.CompressedExistenceProof.encode(e.exist,r.uint32(10).fork()).ldelim(),void 0!==e.nonexist&&t.CompressedNonExistenceProof.encode(e.nonexist,r.uint32(18).fork()).ldelim(),r},decode(e,r){let n=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===r?n.len:n.pos+r,a=w();for(;n.pos>>3){case 1:a.exist=t.CompressedExistenceProof.decode(n,n.uint32());break;case 2:a.nonexist=t.CompressedNonExistenceProof.decode(n,n.uint32());break;default:n.skipType(7&e)}}return a},fromJSON(e){let r=w();return(0,a.isSet)(e.exist)&&(r.exist=t.CompressedExistenceProof.fromJSON(e.exist)),(0,a.isSet)(e.nonexist)&&(r.nonexist=t.CompressedNonExistenceProof.fromJSON(e.nonexist)),r},toJSON(e){let r={};return void 0!==e.exist&&(r.exist=e.exist?t.CompressedExistenceProof.toJSON(e.exist):void 0),void 0!==e.nonexist&&(r.nonexist=e.nonexist?t.CompressedNonExistenceProof.toJSON(e.nonexist):void 0),r},fromPartial(e){let r=w();return void 0!==e.exist&&null!==e.exist&&(r.exist=t.CompressedExistenceProof.fromPartial(e.exist)),void 0!==e.nonexist&&null!==e.nonexist&&(r.nonexist=t.CompressedNonExistenceProof.fromPartial(e.nonexist)),r}},t.CompressedExistenceProof={typeUrl:"/cosmos.ics23.v1.CompressedExistenceProof",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let n of(0!==e.key.length&&r.uint32(10).bytes(e.key),0!==e.value.length&&r.uint32(18).bytes(e.value),void 0!==e.leaf&&t.LeafOp.encode(e.leaf,r.uint32(26).fork()).ldelim(),r.uint32(34).fork(),e.path))r.int32(n);return r.ldelim(),r},decode(e,r){let n=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===r?n.len:n.pos+r,a=_();for(;n.pos>>3){case 1:a.key=n.bytes();break;case 2:a.value=n.bytes();break;case 3:a.leaf=t.LeafOp.decode(n,n.uint32());break;case 4:if((7&e)==2){let e=n.uint32()+n.pos;for(;n.posNumber(e))),r},toJSON(e){let r={};return void 0!==e.key&&(r.key=(0,a.base64FromBytes)(void 0!==e.key?e.key:new Uint8Array)),void 0!==e.value&&(r.value=(0,a.base64FromBytes)(void 0!==e.value?e.value:new Uint8Array)),void 0!==e.leaf&&(r.leaf=e.leaf?t.LeafOp.toJSON(e.leaf):void 0),e.path?r.path=e.path.map(e=>Math.round(e)):r.path=[],r},fromPartial(e){var r,n,i;let o=_();return o.key=null!==(n=e.key)&&void 0!==n?n:new Uint8Array,o.value=null!==(i=e.value)&&void 0!==i?i:new Uint8Array,void 0!==e.leaf&&null!==e.leaf&&(o.leaf=t.LeafOp.fromPartial(e.leaf)),o.path=(null===(r=e.path)||void 0===r?void 0:r.map(e=>e))||[],o}},t.CompressedNonExistenceProof={typeUrl:"/cosmos.ics23.v1.CompressedNonExistenceProof",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return 0!==e.key.length&&r.uint32(10).bytes(e.key),void 0!==e.left&&t.CompressedExistenceProof.encode(e.left,r.uint32(18).fork()).ldelim(),void 0!==e.right&&t.CompressedExistenceProof.encode(e.right,r.uint32(26).fork()).ldelim(),r},decode(e,r){let n=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===r?n.len:n.pos+r,a=k();for(;n.pos>>3){case 1:a.key=n.bytes();break;case 2:a.left=t.CompressedExistenceProof.decode(n,n.uint32());break;case 3:a.right=t.CompressedExistenceProof.decode(n,n.uint32());break;default:n.skipType(7&e)}}return a},fromJSON(e){let r=k();return(0,a.isSet)(e.key)&&(r.key=(0,a.bytesFromBase64)(e.key)),(0,a.isSet)(e.left)&&(r.left=t.CompressedExistenceProof.fromJSON(e.left)),(0,a.isSet)(e.right)&&(r.right=t.CompressedExistenceProof.fromJSON(e.right)),r},toJSON(e){let r={};return void 0!==e.key&&(r.key=(0,a.base64FromBytes)(void 0!==e.key?e.key:new Uint8Array)),void 0!==e.left&&(r.left=e.left?t.CompressedExistenceProof.toJSON(e.left):void 0),void 0!==e.right&&(r.right=e.right?t.CompressedExistenceProof.toJSON(e.right):void 0),r},fromPartial(e){var r;let n=k();return n.key=null!==(r=e.key)&&void 0!==r?r:new Uint8Array,void 0!==e.left&&null!==e.left&&(n.left=t.CompressedExistenceProof.fromPartial(e.left)),void 0!==e.right&&null!==e.right&&(n.right=t.CompressedExistenceProof.fromPartial(e.right)),n}}},70784:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Params=t.Minter=t.protobufPackage=void 0;let n=r(46554),i=r(99133);function o(){return{inflation:"",annualProvisions:""}}function a(){return{mintDenom:"",inflationRateChange:"",inflationMax:"",inflationMin:"",goalBonded:"",blocksPerYear:BigInt(0)}}t.protobufPackage="cosmos.mint.v1beta1",t.Minter={typeUrl:"/cosmos.mint.v1beta1.Minter",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.BinaryWriter.create();return""!==e.inflation&&t.uint32(10).string(e.inflation),""!==e.annualProvisions&&t.uint32(18).string(e.annualProvisions),t},decode(e,t){let r=e instanceof n.BinaryReader?e:new n.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=o();for(;r.pos>>3){case 1:a.inflation=r.string();break;case 2:a.annualProvisions=r.string();break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=o();return(0,i.isSet)(e.inflation)&&(t.inflation=String(e.inflation)),(0,i.isSet)(e.annualProvisions)&&(t.annualProvisions=String(e.annualProvisions)),t},toJSON(e){let t={};return void 0!==e.inflation&&(t.inflation=e.inflation),void 0!==e.annualProvisions&&(t.annualProvisions=e.annualProvisions),t},fromPartial(e){var t,r;let n=o();return n.inflation=null!==(t=e.inflation)&&void 0!==t?t:"",n.annualProvisions=null!==(r=e.annualProvisions)&&void 0!==r?r:"",n}},t.Params={typeUrl:"/cosmos.mint.v1beta1.Params",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.BinaryWriter.create();return""!==e.mintDenom&&t.uint32(10).string(e.mintDenom),""!==e.inflationRateChange&&t.uint32(18).string(e.inflationRateChange),""!==e.inflationMax&&t.uint32(26).string(e.inflationMax),""!==e.inflationMin&&t.uint32(34).string(e.inflationMin),""!==e.goalBonded&&t.uint32(42).string(e.goalBonded),e.blocksPerYear!==BigInt(0)&&t.uint32(48).uint64(e.blocksPerYear),t},decode(e,t){let r=e instanceof n.BinaryReader?e:new n.BinaryReader(e),i=void 0===t?r.len:r.pos+t,o=a();for(;r.pos>>3){case 1:o.mintDenom=r.string();break;case 2:o.inflationRateChange=r.string();break;case 3:o.inflationMax=r.string();break;case 4:o.inflationMin=r.string();break;case 5:o.goalBonded=r.string();break;case 6:o.blocksPerYear=r.uint64();break;default:r.skipType(7&e)}}return o},fromJSON(e){let t=a();return(0,i.isSet)(e.mintDenom)&&(t.mintDenom=String(e.mintDenom)),(0,i.isSet)(e.inflationRateChange)&&(t.inflationRateChange=String(e.inflationRateChange)),(0,i.isSet)(e.inflationMax)&&(t.inflationMax=String(e.inflationMax)),(0,i.isSet)(e.inflationMin)&&(t.inflationMin=String(e.inflationMin)),(0,i.isSet)(e.goalBonded)&&(t.goalBonded=String(e.goalBonded)),(0,i.isSet)(e.blocksPerYear)&&(t.blocksPerYear=BigInt(e.blocksPerYear.toString())),t},toJSON(e){let t={};return void 0!==e.mintDenom&&(t.mintDenom=e.mintDenom),void 0!==e.inflationRateChange&&(t.inflationRateChange=e.inflationRateChange),void 0!==e.inflationMax&&(t.inflationMax=e.inflationMax),void 0!==e.inflationMin&&(t.inflationMin=e.inflationMin),void 0!==e.goalBonded&&(t.goalBonded=e.goalBonded),void 0!==e.blocksPerYear&&(t.blocksPerYear=(e.blocksPerYear||BigInt(0)).toString()),t},fromPartial(e){var t,r,n,i,o;let s=a();return s.mintDenom=null!==(t=e.mintDenom)&&void 0!==t?t:"",s.inflationRateChange=null!==(r=e.inflationRateChange)&&void 0!==r?r:"",s.inflationMax=null!==(n=e.inflationMax)&&void 0!==n?n:"",s.inflationMin=null!==(i=e.inflationMin)&&void 0!==i?i:"",s.goalBonded=null!==(o=e.goalBonded)&&void 0!==o?o:"",void 0!==e.blocksPerYear&&null!==e.blocksPerYear&&(s.blocksPerYear=BigInt(e.blocksPerYear.toString())),s}}},16093:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QueryClientImpl=t.QueryAnnualProvisionsResponse=t.QueryAnnualProvisionsRequest=t.QueryInflationResponse=t.QueryInflationRequest=t.QueryParamsResponse=t.QueryParamsRequest=t.protobufPackage=void 0;let n=r(70784),i=r(46554),o=r(99133);function a(){return{}}function s(){return{params:n.Params.fromPartial({})}}function l(){return{}}function u(){return{inflation:new Uint8Array}}function d(){return{}}function c(){return{annualProvisions:new Uint8Array}}t.protobufPackage="cosmos.mint.v1beta1",t.QueryParamsRequest={typeUrl:"/cosmos.mint.v1beta1.QueryParamsRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();return t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=a();for(;r.posa(),toJSON:e=>({}),fromPartial:e=>a()},t.QueryParamsResponse={typeUrl:"/cosmos.mint.v1beta1.QueryParamsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();return void 0!==e.params&&n.Params.encode(e.params,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),o=void 0===t?r.len:r.pos+t,a=s();for(;r.pos>>3==1?a.params=n.Params.decode(r,r.uint32()):r.skipType(7&e)}return a},fromJSON(e){let t=s();return(0,o.isSet)(e.params)&&(t.params=n.Params.fromJSON(e.params)),t},toJSON(e){let t={};return void 0!==e.params&&(t.params=e.params?n.Params.toJSON(e.params):void 0),t},fromPartial(e){let t=s();return void 0!==e.params&&null!==e.params&&(t.params=n.Params.fromPartial(e.params)),t}},t.QueryInflationRequest={typeUrl:"/cosmos.mint.v1beta1.QueryInflationRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();return t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=l();for(;r.posl(),toJSON:e=>({}),fromPartial:e=>l()},t.QueryInflationResponse={typeUrl:"/cosmos.mint.v1beta1.QueryInflationResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();return 0!==e.inflation.length&&t.uint32(10).bytes(e.inflation),t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=u();for(;r.pos>>3==1?o.inflation=r.bytes():r.skipType(7&e)}return o},fromJSON(e){let t=u();return(0,o.isSet)(e.inflation)&&(t.inflation=(0,o.bytesFromBase64)(e.inflation)),t},toJSON(e){let t={};return void 0!==e.inflation&&(t.inflation=(0,o.base64FromBytes)(void 0!==e.inflation?e.inflation:new Uint8Array)),t},fromPartial(e){var t;let r=u();return r.inflation=null!==(t=e.inflation)&&void 0!==t?t:new Uint8Array,r}},t.QueryAnnualProvisionsRequest={typeUrl:"/cosmos.mint.v1beta1.QueryAnnualProvisionsRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();return t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=d();for(;r.posd(),toJSON:e=>({}),fromPartial:e=>d()},t.QueryAnnualProvisionsResponse={typeUrl:"/cosmos.mint.v1beta1.QueryAnnualProvisionsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();return 0!==e.annualProvisions.length&&t.uint32(10).bytes(e.annualProvisions),t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=c();for(;r.pos>>3==1?o.annualProvisions=r.bytes():r.skipType(7&e)}return o},fromJSON(e){let t=c();return(0,o.isSet)(e.annualProvisions)&&(t.annualProvisions=(0,o.bytesFromBase64)(e.annualProvisions)),t},toJSON(e){let t={};return void 0!==e.annualProvisions&&(t.annualProvisions=(0,o.base64FromBytes)(void 0!==e.annualProvisions?e.annualProvisions:new Uint8Array)),t},fromPartial(e){var t;let r=c();return r.annualProvisions=null!==(t=e.annualProvisions)&&void 0!==t?t:new Uint8Array,r}};class p{Params(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.QueryParamsRequest.encode(e).finish();return this.rpc.request("cosmos.mint.v1beta1.Query","Params",r).then(e=>t.QueryParamsResponse.decode(new i.BinaryReader(e)))}Inflation(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.QueryInflationRequest.encode(e).finish();return this.rpc.request("cosmos.mint.v1beta1.Query","Inflation",r).then(e=>t.QueryInflationResponse.decode(new i.BinaryReader(e)))}AnnualProvisions(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.QueryAnnualProvisionsRequest.encode(e).finish();return this.rpc.request("cosmos.mint.v1beta1.Query","AnnualProvisions",r).then(e=>t.QueryAnnualProvisionsResponse.decode(new i.BinaryReader(e)))}constructor(e){this.rpc=e,this.Params=this.Params.bind(this),this.Inflation=this.Inflation.bind(this),this.AnnualProvisions=this.AnnualProvisions.bind(this)}}t.QueryClientImpl=p},87778:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QueryClientImpl=t.QuerySigningInfosResponse=t.QuerySigningInfosRequest=t.QuerySigningInfoResponse=t.QuerySigningInfoRequest=t.QueryParamsResponse=t.QueryParamsRequest=t.protobufPackage=void 0;let n=r(86141),i=r(87052),o=r(46554),a=r(99133);function s(){return{}}function l(){return{params:i.Params.fromPartial({})}}function u(){return{consAddress:""}}function d(){return{valSigningInfo:i.ValidatorSigningInfo.fromPartial({})}}function c(){return{pagination:void 0}}function p(){return{info:[],pagination:void 0}}t.protobufPackage="cosmos.slashing.v1beta1",t.QueryParamsRequest={typeUrl:"/cosmos.slashing.v1beta1.QueryParamsRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=s();for(;r.poss(),toJSON:e=>({}),fromPartial:e=>s()},t.QueryParamsResponse={typeUrl:"/cosmos.slashing.v1beta1.QueryParamsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return void 0!==e.params&&i.Params.encode(e.params,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,a=l();for(;r.pos>>3==1?a.params=i.Params.decode(r,r.uint32()):r.skipType(7&e)}return a},fromJSON(e){let t=l();return(0,a.isSet)(e.params)&&(t.params=i.Params.fromJSON(e.params)),t},toJSON(e){let t={};return void 0!==e.params&&(t.params=e.params?i.Params.toJSON(e.params):void 0),t},fromPartial(e){let t=l();return void 0!==e.params&&null!==e.params&&(t.params=i.Params.fromPartial(e.params)),t}},t.QuerySigningInfoRequest={typeUrl:"/cosmos.slashing.v1beta1.QuerySigningInfoRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.consAddress&&t.uint32(10).string(e.consAddress),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=u();for(;r.pos>>3==1?i.consAddress=r.string():r.skipType(7&e)}return i},fromJSON(e){let t=u();return(0,a.isSet)(e.consAddress)&&(t.consAddress=String(e.consAddress)),t},toJSON(e){let t={};return void 0!==e.consAddress&&(t.consAddress=e.consAddress),t},fromPartial(e){var t;let r=u();return r.consAddress=null!==(t=e.consAddress)&&void 0!==t?t:"",r}},t.QuerySigningInfoResponse={typeUrl:"/cosmos.slashing.v1beta1.QuerySigningInfoResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return void 0!==e.valSigningInfo&&i.ValidatorSigningInfo.encode(e.valSigningInfo,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,a=d();for(;r.pos>>3==1?a.valSigningInfo=i.ValidatorSigningInfo.decode(r,r.uint32()):r.skipType(7&e)}return a},fromJSON(e){let t=d();return(0,a.isSet)(e.valSigningInfo)&&(t.valSigningInfo=i.ValidatorSigningInfo.fromJSON(e.valSigningInfo)),t},toJSON(e){let t={};return void 0!==e.valSigningInfo&&(t.valSigningInfo=e.valSigningInfo?i.ValidatorSigningInfo.toJSON(e.valSigningInfo):void 0),t},fromPartial(e){let t=d();return void 0!==e.valSigningInfo&&null!==e.valSigningInfo&&(t.valSigningInfo=i.ValidatorSigningInfo.fromPartial(e.valSigningInfo)),t}},t.QuerySigningInfosRequest={typeUrl:"/cosmos.slashing.v1beta1.QuerySigningInfosRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return void 0!==e.pagination&&n.PageRequest.encode(e.pagination,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=c();for(;r.pos>>3==1?a.pagination=n.PageRequest.decode(r,r.uint32()):r.skipType(7&e)}return a},fromJSON(e){let t=c();return(0,a.isSet)(e.pagination)&&(t.pagination=n.PageRequest.fromJSON(e.pagination)),t},toJSON(e){let t={};return void 0!==e.pagination&&(t.pagination=e.pagination?n.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){let t=c();return void 0!==e.pagination&&null!==e.pagination&&(t.pagination=n.PageRequest.fromPartial(e.pagination)),t}},t.QuerySigningInfosResponse={typeUrl:"/cosmos.slashing.v1beta1.QuerySigningInfosResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of e.info)i.ValidatorSigningInfo.encode(r,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&n.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),a=void 0===t?r.len:r.pos+t,s=p();for(;r.pos>>3){case 1:s.info.push(i.ValidatorSigningInfo.decode(r,r.uint32()));break;case 2:s.pagination=n.PageResponse.decode(r,r.uint32());break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=p();return Array.isArray(null==e?void 0:e.info)&&(t.info=e.info.map(e=>i.ValidatorSigningInfo.fromJSON(e))),(0,a.isSet)(e.pagination)&&(t.pagination=n.PageResponse.fromJSON(e.pagination)),t},toJSON(e){let t={};return e.info?t.info=e.info.map(e=>e?i.ValidatorSigningInfo.toJSON(e):void 0):t.info=[],void 0!==e.pagination&&(t.pagination=e.pagination?n.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=p();return r.info=(null===(t=e.info)||void 0===t?void 0:t.map(e=>i.ValidatorSigningInfo.fromPartial(e)))||[],void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageResponse.fromPartial(e.pagination)),r}};class f{Params(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.QueryParamsRequest.encode(e).finish();return this.rpc.request("cosmos.slashing.v1beta1.Query","Params",r).then(e=>t.QueryParamsResponse.decode(new o.BinaryReader(e)))}SigningInfo(e){let r=t.QuerySigningInfoRequest.encode(e).finish();return this.rpc.request("cosmos.slashing.v1beta1.Query","SigningInfo",r).then(e=>t.QuerySigningInfoResponse.decode(new o.BinaryReader(e)))}SigningInfos(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{pagination:n.PageRequest.fromPartial({})},r=t.QuerySigningInfosRequest.encode(e).finish();return this.rpc.request("cosmos.slashing.v1beta1.Query","SigningInfos",r).then(e=>t.QuerySigningInfosResponse.decode(new o.BinaryReader(e)))}constructor(e){this.rpc=e,this.Params=this.Params.bind(this),this.SigningInfo=this.SigningInfo.bind(this),this.SigningInfos=this.SigningInfos.bind(this)}}t.QueryClientImpl=f},87052:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Params=t.ValidatorSigningInfo=t.protobufPackage=void 0;let n=r(9990),i=r(84849),o=r(46554),a=r(99133);function s(){return{address:"",startHeight:BigInt(0),indexOffset:BigInt(0),jailedUntil:n.Timestamp.fromPartial({}),tombstoned:!1,missedBlocksCounter:BigInt(0)}}function l(){return{signedBlocksWindow:BigInt(0),minSignedPerWindow:new Uint8Array,downtimeJailDuration:i.Duration.fromPartial({}),slashFractionDoubleSign:new Uint8Array,slashFractionDowntime:new Uint8Array}}t.protobufPackage="cosmos.slashing.v1beta1",t.ValidatorSigningInfo={typeUrl:"/cosmos.slashing.v1beta1.ValidatorSigningInfo",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.address&&t.uint32(10).string(e.address),e.startHeight!==BigInt(0)&&t.uint32(16).int64(e.startHeight),e.indexOffset!==BigInt(0)&&t.uint32(24).int64(e.indexOffset),void 0!==e.jailedUntil&&n.Timestamp.encode(e.jailedUntil,t.uint32(34).fork()).ldelim(),!0===e.tombstoned&&t.uint32(40).bool(e.tombstoned),e.missedBlocksCounter!==BigInt(0)&&t.uint32(48).int64(e.missedBlocksCounter),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=s();for(;r.pos>>3){case 1:a.address=r.string();break;case 2:a.startHeight=r.int64();break;case 3:a.indexOffset=r.int64();break;case 4:a.jailedUntil=n.Timestamp.decode(r,r.uint32());break;case 5:a.tombstoned=r.bool();break;case 6:a.missedBlocksCounter=r.int64();break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=s();return(0,a.isSet)(e.address)&&(t.address=String(e.address)),(0,a.isSet)(e.startHeight)&&(t.startHeight=BigInt(e.startHeight.toString())),(0,a.isSet)(e.indexOffset)&&(t.indexOffset=BigInt(e.indexOffset.toString())),(0,a.isSet)(e.jailedUntil)&&(t.jailedUntil=(0,a.fromJsonTimestamp)(e.jailedUntil)),(0,a.isSet)(e.tombstoned)&&(t.tombstoned=!!e.tombstoned),(0,a.isSet)(e.missedBlocksCounter)&&(t.missedBlocksCounter=BigInt(e.missedBlocksCounter.toString())),t},toJSON(e){let t={};return void 0!==e.address&&(t.address=e.address),void 0!==e.startHeight&&(t.startHeight=(e.startHeight||BigInt(0)).toString()),void 0!==e.indexOffset&&(t.indexOffset=(e.indexOffset||BigInt(0)).toString()),void 0!==e.jailedUntil&&(t.jailedUntil=(0,a.fromTimestamp)(e.jailedUntil).toISOString()),void 0!==e.tombstoned&&(t.tombstoned=e.tombstoned),void 0!==e.missedBlocksCounter&&(t.missedBlocksCounter=(e.missedBlocksCounter||BigInt(0)).toString()),t},fromPartial(e){var t,r;let i=s();return i.address=null!==(t=e.address)&&void 0!==t?t:"",void 0!==e.startHeight&&null!==e.startHeight&&(i.startHeight=BigInt(e.startHeight.toString())),void 0!==e.indexOffset&&null!==e.indexOffset&&(i.indexOffset=BigInt(e.indexOffset.toString())),void 0!==e.jailedUntil&&null!==e.jailedUntil&&(i.jailedUntil=n.Timestamp.fromPartial(e.jailedUntil)),i.tombstoned=null!==(r=e.tombstoned)&&void 0!==r&&r,void 0!==e.missedBlocksCounter&&null!==e.missedBlocksCounter&&(i.missedBlocksCounter=BigInt(e.missedBlocksCounter.toString())),i}},t.Params={typeUrl:"/cosmos.slashing.v1beta1.Params",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return e.signedBlocksWindow!==BigInt(0)&&t.uint32(8).int64(e.signedBlocksWindow),0!==e.minSignedPerWindow.length&&t.uint32(18).bytes(e.minSignedPerWindow),void 0!==e.downtimeJailDuration&&i.Duration.encode(e.downtimeJailDuration,t.uint32(26).fork()).ldelim(),0!==e.slashFractionDoubleSign.length&&t.uint32(34).bytes(e.slashFractionDoubleSign),0!==e.slashFractionDowntime.length&&t.uint32(42).bytes(e.slashFractionDowntime),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,a=l();for(;r.pos>>3){case 1:a.signedBlocksWindow=r.int64();break;case 2:a.minSignedPerWindow=r.bytes();break;case 3:a.downtimeJailDuration=i.Duration.decode(r,r.uint32());break;case 4:a.slashFractionDoubleSign=r.bytes();break;case 5:a.slashFractionDowntime=r.bytes();break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=l();return(0,a.isSet)(e.signedBlocksWindow)&&(t.signedBlocksWindow=BigInt(e.signedBlocksWindow.toString())),(0,a.isSet)(e.minSignedPerWindow)&&(t.minSignedPerWindow=(0,a.bytesFromBase64)(e.minSignedPerWindow)),(0,a.isSet)(e.downtimeJailDuration)&&(t.downtimeJailDuration=i.Duration.fromJSON(e.downtimeJailDuration)),(0,a.isSet)(e.slashFractionDoubleSign)&&(t.slashFractionDoubleSign=(0,a.bytesFromBase64)(e.slashFractionDoubleSign)),(0,a.isSet)(e.slashFractionDowntime)&&(t.slashFractionDowntime=(0,a.bytesFromBase64)(e.slashFractionDowntime)),t},toJSON(e){let t={};return void 0!==e.signedBlocksWindow&&(t.signedBlocksWindow=(e.signedBlocksWindow||BigInt(0)).toString()),void 0!==e.minSignedPerWindow&&(t.minSignedPerWindow=(0,a.base64FromBytes)(void 0!==e.minSignedPerWindow?e.minSignedPerWindow:new Uint8Array)),void 0!==e.downtimeJailDuration&&(t.downtimeJailDuration=e.downtimeJailDuration?i.Duration.toJSON(e.downtimeJailDuration):void 0),void 0!==e.slashFractionDoubleSign&&(t.slashFractionDoubleSign=(0,a.base64FromBytes)(void 0!==e.slashFractionDoubleSign?e.slashFractionDoubleSign:new Uint8Array)),void 0!==e.slashFractionDowntime&&(t.slashFractionDowntime=(0,a.base64FromBytes)(void 0!==e.slashFractionDowntime?e.slashFractionDowntime:new Uint8Array)),t},fromPartial(e){var t,r,n;let o=l();return void 0!==e.signedBlocksWindow&&null!==e.signedBlocksWindow&&(o.signedBlocksWindow=BigInt(e.signedBlocksWindow.toString())),o.minSignedPerWindow=null!==(t=e.minSignedPerWindow)&&void 0!==t?t:new Uint8Array,void 0!==e.downtimeJailDuration&&null!==e.downtimeJailDuration&&(o.downtimeJailDuration=i.Duration.fromPartial(e.downtimeJailDuration)),o.slashFractionDoubleSign=null!==(r=e.slashFractionDoubleSign)&&void 0!==r?r:new Uint8Array,o.slashFractionDowntime=null!==(n=e.slashFractionDowntime)&&void 0!==n?n:new Uint8Array,o}}},32776:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QueryClientImpl=t.QueryParamsResponse=t.QueryParamsRequest=t.QueryPoolResponse=t.QueryPoolRequest=t.QueryHistoricalInfoResponse=t.QueryHistoricalInfoRequest=t.QueryDelegatorValidatorResponse=t.QueryDelegatorValidatorRequest=t.QueryDelegatorValidatorsResponse=t.QueryDelegatorValidatorsRequest=t.QueryRedelegationsResponse=t.QueryRedelegationsRequest=t.QueryDelegatorUnbondingDelegationsResponse=t.QueryDelegatorUnbondingDelegationsRequest=t.QueryDelegatorDelegationsResponse=t.QueryDelegatorDelegationsRequest=t.QueryUnbondingDelegationResponse=t.QueryUnbondingDelegationRequest=t.QueryDelegationResponse=t.QueryDelegationRequest=t.QueryValidatorUnbondingDelegationsResponse=t.QueryValidatorUnbondingDelegationsRequest=t.QueryValidatorDelegationsResponse=t.QueryValidatorDelegationsRequest=t.QueryValidatorResponse=t.QueryValidatorRequest=t.QueryValidatorsResponse=t.QueryValidatorsRequest=t.protobufPackage=void 0;let n=r(86141),i=r(20534),o=r(46554),a=r(99133);function s(){return{status:"",pagination:void 0}}function l(){return{validators:[],pagination:void 0}}function u(){return{validatorAddr:""}}function d(){return{validator:i.Validator.fromPartial({})}}function c(){return{validatorAddr:"",pagination:void 0}}function p(){return{delegationResponses:[],pagination:void 0}}function f(){return{validatorAddr:"",pagination:void 0}}function h(){return{unbondingResponses:[],pagination:void 0}}function g(){return{delegatorAddr:"",validatorAddr:""}}function m(){return{delegationResponse:void 0}}function y(){return{delegatorAddr:"",validatorAddr:""}}function v(){return{unbond:i.UnbondingDelegation.fromPartial({})}}function b(){return{delegatorAddr:"",pagination:void 0}}function S(){return{delegationResponses:[],pagination:void 0}}function w(){return{delegatorAddr:"",pagination:void 0}}function _(){return{unbondingResponses:[],pagination:void 0}}function k(){return{delegatorAddr:"",srcValidatorAddr:"",dstValidatorAddr:"",pagination:void 0}}function O(){return{redelegationResponses:[],pagination:void 0}}function P(){return{delegatorAddr:"",pagination:void 0}}function A(){return{validators:[],pagination:void 0}}function I(){return{delegatorAddr:"",validatorAddr:""}}function R(){return{validator:i.Validator.fromPartial({})}}function E(){return{height:BigInt(0)}}function T(){return{hist:void 0}}function N(){return{}}function x(){return{pool:i.Pool.fromPartial({})}}function B(){return{}}function C(){return{params:i.Params.fromPartial({})}}t.protobufPackage="cosmos.staking.v1beta1",t.QueryValidatorsRequest={typeUrl:"/cosmos.staking.v1beta1.QueryValidatorsRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.status&&t.uint32(10).string(e.status),void 0!==e.pagination&&n.PageRequest.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=s();for(;r.pos>>3){case 1:a.status=r.string();break;case 2:a.pagination=n.PageRequest.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=s();return(0,a.isSet)(e.status)&&(t.status=String(e.status)),(0,a.isSet)(e.pagination)&&(t.pagination=n.PageRequest.fromJSON(e.pagination)),t},toJSON(e){let t={};return void 0!==e.status&&(t.status=e.status),void 0!==e.pagination&&(t.pagination=e.pagination?n.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=s();return r.status=null!==(t=e.status)&&void 0!==t?t:"",void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageRequest.fromPartial(e.pagination)),r}},t.QueryValidatorsResponse={typeUrl:"/cosmos.staking.v1beta1.QueryValidatorsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of e.validators)i.Validator.encode(r,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&n.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),a=void 0===t?r.len:r.pos+t,s=l();for(;r.pos>>3){case 1:s.validators.push(i.Validator.decode(r,r.uint32()));break;case 2:s.pagination=n.PageResponse.decode(r,r.uint32());break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=l();return Array.isArray(null==e?void 0:e.validators)&&(t.validators=e.validators.map(e=>i.Validator.fromJSON(e))),(0,a.isSet)(e.pagination)&&(t.pagination=n.PageResponse.fromJSON(e.pagination)),t},toJSON(e){let t={};return e.validators?t.validators=e.validators.map(e=>e?i.Validator.toJSON(e):void 0):t.validators=[],void 0!==e.pagination&&(t.pagination=e.pagination?n.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=l();return r.validators=(null===(t=e.validators)||void 0===t?void 0:t.map(e=>i.Validator.fromPartial(e)))||[],void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageResponse.fromPartial(e.pagination)),r}},t.QueryValidatorRequest={typeUrl:"/cosmos.staking.v1beta1.QueryValidatorRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.validatorAddr&&t.uint32(10).string(e.validatorAddr),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=u();for(;r.pos>>3==1?i.validatorAddr=r.string():r.skipType(7&e)}return i},fromJSON(e){let t=u();return(0,a.isSet)(e.validatorAddr)&&(t.validatorAddr=String(e.validatorAddr)),t},toJSON(e){let t={};return void 0!==e.validatorAddr&&(t.validatorAddr=e.validatorAddr),t},fromPartial(e){var t;let r=u();return r.validatorAddr=null!==(t=e.validatorAddr)&&void 0!==t?t:"",r}},t.QueryValidatorResponse={typeUrl:"/cosmos.staking.v1beta1.QueryValidatorResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return void 0!==e.validator&&i.Validator.encode(e.validator,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,a=d();for(;r.pos>>3==1?a.validator=i.Validator.decode(r,r.uint32()):r.skipType(7&e)}return a},fromJSON(e){let t=d();return(0,a.isSet)(e.validator)&&(t.validator=i.Validator.fromJSON(e.validator)),t},toJSON(e){let t={};return void 0!==e.validator&&(t.validator=e.validator?i.Validator.toJSON(e.validator):void 0),t},fromPartial(e){let t=d();return void 0!==e.validator&&null!==e.validator&&(t.validator=i.Validator.fromPartial(e.validator)),t}},t.QueryValidatorDelegationsRequest={typeUrl:"/cosmos.staking.v1beta1.QueryValidatorDelegationsRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.validatorAddr&&t.uint32(10).string(e.validatorAddr),void 0!==e.pagination&&n.PageRequest.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=c();for(;r.pos>>3){case 1:a.validatorAddr=r.string();break;case 2:a.pagination=n.PageRequest.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=c();return(0,a.isSet)(e.validatorAddr)&&(t.validatorAddr=String(e.validatorAddr)),(0,a.isSet)(e.pagination)&&(t.pagination=n.PageRequest.fromJSON(e.pagination)),t},toJSON(e){let t={};return void 0!==e.validatorAddr&&(t.validatorAddr=e.validatorAddr),void 0!==e.pagination&&(t.pagination=e.pagination?n.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=c();return r.validatorAddr=null!==(t=e.validatorAddr)&&void 0!==t?t:"",void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageRequest.fromPartial(e.pagination)),r}},t.QueryValidatorDelegationsResponse={typeUrl:"/cosmos.staking.v1beta1.QueryValidatorDelegationsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of e.delegationResponses)i.DelegationResponse.encode(r,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&n.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),a=void 0===t?r.len:r.pos+t,s=p();for(;r.pos>>3){case 1:s.delegationResponses.push(i.DelegationResponse.decode(r,r.uint32()));break;case 2:s.pagination=n.PageResponse.decode(r,r.uint32());break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=p();return Array.isArray(null==e?void 0:e.delegationResponses)&&(t.delegationResponses=e.delegationResponses.map(e=>i.DelegationResponse.fromJSON(e))),(0,a.isSet)(e.pagination)&&(t.pagination=n.PageResponse.fromJSON(e.pagination)),t},toJSON(e){let t={};return e.delegationResponses?t.delegationResponses=e.delegationResponses.map(e=>e?i.DelegationResponse.toJSON(e):void 0):t.delegationResponses=[],void 0!==e.pagination&&(t.pagination=e.pagination?n.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=p();return r.delegationResponses=(null===(t=e.delegationResponses)||void 0===t?void 0:t.map(e=>i.DelegationResponse.fromPartial(e)))||[],void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageResponse.fromPartial(e.pagination)),r}},t.QueryValidatorUnbondingDelegationsRequest={typeUrl:"/cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.validatorAddr&&t.uint32(10).string(e.validatorAddr),void 0!==e.pagination&&n.PageRequest.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=f();for(;r.pos>>3){case 1:a.validatorAddr=r.string();break;case 2:a.pagination=n.PageRequest.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=f();return(0,a.isSet)(e.validatorAddr)&&(t.validatorAddr=String(e.validatorAddr)),(0,a.isSet)(e.pagination)&&(t.pagination=n.PageRequest.fromJSON(e.pagination)),t},toJSON(e){let t={};return void 0!==e.validatorAddr&&(t.validatorAddr=e.validatorAddr),void 0!==e.pagination&&(t.pagination=e.pagination?n.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=f();return r.validatorAddr=null!==(t=e.validatorAddr)&&void 0!==t?t:"",void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageRequest.fromPartial(e.pagination)),r}},t.QueryValidatorUnbondingDelegationsResponse={typeUrl:"/cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of e.unbondingResponses)i.UnbondingDelegation.encode(r,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&n.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),a=void 0===t?r.len:r.pos+t,s=h();for(;r.pos>>3){case 1:s.unbondingResponses.push(i.UnbondingDelegation.decode(r,r.uint32()));break;case 2:s.pagination=n.PageResponse.decode(r,r.uint32());break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=h();return Array.isArray(null==e?void 0:e.unbondingResponses)&&(t.unbondingResponses=e.unbondingResponses.map(e=>i.UnbondingDelegation.fromJSON(e))),(0,a.isSet)(e.pagination)&&(t.pagination=n.PageResponse.fromJSON(e.pagination)),t},toJSON(e){let t={};return e.unbondingResponses?t.unbondingResponses=e.unbondingResponses.map(e=>e?i.UnbondingDelegation.toJSON(e):void 0):t.unbondingResponses=[],void 0!==e.pagination&&(t.pagination=e.pagination?n.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=h();return r.unbondingResponses=(null===(t=e.unbondingResponses)||void 0===t?void 0:t.map(e=>i.UnbondingDelegation.fromPartial(e)))||[],void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageResponse.fromPartial(e.pagination)),r}},t.QueryDelegationRequest={typeUrl:"/cosmos.staking.v1beta1.QueryDelegationRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.delegatorAddr&&t.uint32(10).string(e.delegatorAddr),""!==e.validatorAddr&&t.uint32(18).string(e.validatorAddr),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=g();for(;r.pos>>3){case 1:i.delegatorAddr=r.string();break;case 2:i.validatorAddr=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=g();return(0,a.isSet)(e.delegatorAddr)&&(t.delegatorAddr=String(e.delegatorAddr)),(0,a.isSet)(e.validatorAddr)&&(t.validatorAddr=String(e.validatorAddr)),t},toJSON(e){let t={};return void 0!==e.delegatorAddr&&(t.delegatorAddr=e.delegatorAddr),void 0!==e.validatorAddr&&(t.validatorAddr=e.validatorAddr),t},fromPartial(e){var t,r;let n=g();return n.delegatorAddr=null!==(t=e.delegatorAddr)&&void 0!==t?t:"",n.validatorAddr=null!==(r=e.validatorAddr)&&void 0!==r?r:"",n}},t.QueryDelegationResponse={typeUrl:"/cosmos.staking.v1beta1.QueryDelegationResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return void 0!==e.delegationResponse&&i.DelegationResponse.encode(e.delegationResponse,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,a=m();for(;r.pos>>3==1?a.delegationResponse=i.DelegationResponse.decode(r,r.uint32()):r.skipType(7&e)}return a},fromJSON(e){let t=m();return(0,a.isSet)(e.delegationResponse)&&(t.delegationResponse=i.DelegationResponse.fromJSON(e.delegationResponse)),t},toJSON(e){let t={};return void 0!==e.delegationResponse&&(t.delegationResponse=e.delegationResponse?i.DelegationResponse.toJSON(e.delegationResponse):void 0),t},fromPartial(e){let t=m();return void 0!==e.delegationResponse&&null!==e.delegationResponse&&(t.delegationResponse=i.DelegationResponse.fromPartial(e.delegationResponse)),t}},t.QueryUnbondingDelegationRequest={typeUrl:"/cosmos.staking.v1beta1.QueryUnbondingDelegationRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.delegatorAddr&&t.uint32(10).string(e.delegatorAddr),""!==e.validatorAddr&&t.uint32(18).string(e.validatorAddr),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=y();for(;r.pos>>3){case 1:i.delegatorAddr=r.string();break;case 2:i.validatorAddr=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=y();return(0,a.isSet)(e.delegatorAddr)&&(t.delegatorAddr=String(e.delegatorAddr)),(0,a.isSet)(e.validatorAddr)&&(t.validatorAddr=String(e.validatorAddr)),t},toJSON(e){let t={};return void 0!==e.delegatorAddr&&(t.delegatorAddr=e.delegatorAddr),void 0!==e.validatorAddr&&(t.validatorAddr=e.validatorAddr),t},fromPartial(e){var t,r;let n=y();return n.delegatorAddr=null!==(t=e.delegatorAddr)&&void 0!==t?t:"",n.validatorAddr=null!==(r=e.validatorAddr)&&void 0!==r?r:"",n}},t.QueryUnbondingDelegationResponse={typeUrl:"/cosmos.staking.v1beta1.QueryUnbondingDelegationResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return void 0!==e.unbond&&i.UnbondingDelegation.encode(e.unbond,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,a=v();for(;r.pos>>3==1?a.unbond=i.UnbondingDelegation.decode(r,r.uint32()):r.skipType(7&e)}return a},fromJSON(e){let t=v();return(0,a.isSet)(e.unbond)&&(t.unbond=i.UnbondingDelegation.fromJSON(e.unbond)),t},toJSON(e){let t={};return void 0!==e.unbond&&(t.unbond=e.unbond?i.UnbondingDelegation.toJSON(e.unbond):void 0),t},fromPartial(e){let t=v();return void 0!==e.unbond&&null!==e.unbond&&(t.unbond=i.UnbondingDelegation.fromPartial(e.unbond)),t}},t.QueryDelegatorDelegationsRequest={typeUrl:"/cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.delegatorAddr&&t.uint32(10).string(e.delegatorAddr),void 0!==e.pagination&&n.PageRequest.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=b();for(;r.pos>>3){case 1:a.delegatorAddr=r.string();break;case 2:a.pagination=n.PageRequest.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=b();return(0,a.isSet)(e.delegatorAddr)&&(t.delegatorAddr=String(e.delegatorAddr)),(0,a.isSet)(e.pagination)&&(t.pagination=n.PageRequest.fromJSON(e.pagination)),t},toJSON(e){let t={};return void 0!==e.delegatorAddr&&(t.delegatorAddr=e.delegatorAddr),void 0!==e.pagination&&(t.pagination=e.pagination?n.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=b();return r.delegatorAddr=null!==(t=e.delegatorAddr)&&void 0!==t?t:"",void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageRequest.fromPartial(e.pagination)),r}},t.QueryDelegatorDelegationsResponse={typeUrl:"/cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of e.delegationResponses)i.DelegationResponse.encode(r,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&n.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),a=void 0===t?r.len:r.pos+t,s=S();for(;r.pos>>3){case 1:s.delegationResponses.push(i.DelegationResponse.decode(r,r.uint32()));break;case 2:s.pagination=n.PageResponse.decode(r,r.uint32());break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=S();return Array.isArray(null==e?void 0:e.delegationResponses)&&(t.delegationResponses=e.delegationResponses.map(e=>i.DelegationResponse.fromJSON(e))),(0,a.isSet)(e.pagination)&&(t.pagination=n.PageResponse.fromJSON(e.pagination)),t},toJSON(e){let t={};return e.delegationResponses?t.delegationResponses=e.delegationResponses.map(e=>e?i.DelegationResponse.toJSON(e):void 0):t.delegationResponses=[],void 0!==e.pagination&&(t.pagination=e.pagination?n.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=S();return r.delegationResponses=(null===(t=e.delegationResponses)||void 0===t?void 0:t.map(e=>i.DelegationResponse.fromPartial(e)))||[],void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageResponse.fromPartial(e.pagination)),r}},t.QueryDelegatorUnbondingDelegationsRequest={typeUrl:"/cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.delegatorAddr&&t.uint32(10).string(e.delegatorAddr),void 0!==e.pagination&&n.PageRequest.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=w();for(;r.pos>>3){case 1:a.delegatorAddr=r.string();break;case 2:a.pagination=n.PageRequest.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=w();return(0,a.isSet)(e.delegatorAddr)&&(t.delegatorAddr=String(e.delegatorAddr)),(0,a.isSet)(e.pagination)&&(t.pagination=n.PageRequest.fromJSON(e.pagination)),t},toJSON(e){let t={};return void 0!==e.delegatorAddr&&(t.delegatorAddr=e.delegatorAddr),void 0!==e.pagination&&(t.pagination=e.pagination?n.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=w();return r.delegatorAddr=null!==(t=e.delegatorAddr)&&void 0!==t?t:"",void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageRequest.fromPartial(e.pagination)),r}},t.QueryDelegatorUnbondingDelegationsResponse={typeUrl:"/cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of e.unbondingResponses)i.UnbondingDelegation.encode(r,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&n.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),a=void 0===t?r.len:r.pos+t,s=_();for(;r.pos>>3){case 1:s.unbondingResponses.push(i.UnbondingDelegation.decode(r,r.uint32()));break;case 2:s.pagination=n.PageResponse.decode(r,r.uint32());break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=_();return Array.isArray(null==e?void 0:e.unbondingResponses)&&(t.unbondingResponses=e.unbondingResponses.map(e=>i.UnbondingDelegation.fromJSON(e))),(0,a.isSet)(e.pagination)&&(t.pagination=n.PageResponse.fromJSON(e.pagination)),t},toJSON(e){let t={};return e.unbondingResponses?t.unbondingResponses=e.unbondingResponses.map(e=>e?i.UnbondingDelegation.toJSON(e):void 0):t.unbondingResponses=[],void 0!==e.pagination&&(t.pagination=e.pagination?n.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=_();return r.unbondingResponses=(null===(t=e.unbondingResponses)||void 0===t?void 0:t.map(e=>i.UnbondingDelegation.fromPartial(e)))||[],void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageResponse.fromPartial(e.pagination)),r}},t.QueryRedelegationsRequest={typeUrl:"/cosmos.staking.v1beta1.QueryRedelegationsRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.delegatorAddr&&t.uint32(10).string(e.delegatorAddr),""!==e.srcValidatorAddr&&t.uint32(18).string(e.srcValidatorAddr),""!==e.dstValidatorAddr&&t.uint32(26).string(e.dstValidatorAddr),void 0!==e.pagination&&n.PageRequest.encode(e.pagination,t.uint32(34).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=k();for(;r.pos>>3){case 1:a.delegatorAddr=r.string();break;case 2:a.srcValidatorAddr=r.string();break;case 3:a.dstValidatorAddr=r.string();break;case 4:a.pagination=n.PageRequest.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=k();return(0,a.isSet)(e.delegatorAddr)&&(t.delegatorAddr=String(e.delegatorAddr)),(0,a.isSet)(e.srcValidatorAddr)&&(t.srcValidatorAddr=String(e.srcValidatorAddr)),(0,a.isSet)(e.dstValidatorAddr)&&(t.dstValidatorAddr=String(e.dstValidatorAddr)),(0,a.isSet)(e.pagination)&&(t.pagination=n.PageRequest.fromJSON(e.pagination)),t},toJSON(e){let t={};return void 0!==e.delegatorAddr&&(t.delegatorAddr=e.delegatorAddr),void 0!==e.srcValidatorAddr&&(t.srcValidatorAddr=e.srcValidatorAddr),void 0!==e.dstValidatorAddr&&(t.dstValidatorAddr=e.dstValidatorAddr),void 0!==e.pagination&&(t.pagination=e.pagination?n.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){var t,r,i;let o=k();return o.delegatorAddr=null!==(t=e.delegatorAddr)&&void 0!==t?t:"",o.srcValidatorAddr=null!==(r=e.srcValidatorAddr)&&void 0!==r?r:"",o.dstValidatorAddr=null!==(i=e.dstValidatorAddr)&&void 0!==i?i:"",void 0!==e.pagination&&null!==e.pagination&&(o.pagination=n.PageRequest.fromPartial(e.pagination)),o}},t.QueryRedelegationsResponse={typeUrl:"/cosmos.staking.v1beta1.QueryRedelegationsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of e.redelegationResponses)i.RedelegationResponse.encode(r,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&n.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),a=void 0===t?r.len:r.pos+t,s=O();for(;r.pos>>3){case 1:s.redelegationResponses.push(i.RedelegationResponse.decode(r,r.uint32()));break;case 2:s.pagination=n.PageResponse.decode(r,r.uint32());break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=O();return Array.isArray(null==e?void 0:e.redelegationResponses)&&(t.redelegationResponses=e.redelegationResponses.map(e=>i.RedelegationResponse.fromJSON(e))),(0,a.isSet)(e.pagination)&&(t.pagination=n.PageResponse.fromJSON(e.pagination)),t},toJSON(e){let t={};return e.redelegationResponses?t.redelegationResponses=e.redelegationResponses.map(e=>e?i.RedelegationResponse.toJSON(e):void 0):t.redelegationResponses=[],void 0!==e.pagination&&(t.pagination=e.pagination?n.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=O();return r.redelegationResponses=(null===(t=e.redelegationResponses)||void 0===t?void 0:t.map(e=>i.RedelegationResponse.fromPartial(e)))||[],void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageResponse.fromPartial(e.pagination)),r}},t.QueryDelegatorValidatorsRequest={typeUrl:"/cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.delegatorAddr&&t.uint32(10).string(e.delegatorAddr),void 0!==e.pagination&&n.PageRequest.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=P();for(;r.pos>>3){case 1:a.delegatorAddr=r.string();break;case 2:a.pagination=n.PageRequest.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=P();return(0,a.isSet)(e.delegatorAddr)&&(t.delegatorAddr=String(e.delegatorAddr)),(0,a.isSet)(e.pagination)&&(t.pagination=n.PageRequest.fromJSON(e.pagination)),t},toJSON(e){let t={};return void 0!==e.delegatorAddr&&(t.delegatorAddr=e.delegatorAddr),void 0!==e.pagination&&(t.pagination=e.pagination?n.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=P();return r.delegatorAddr=null!==(t=e.delegatorAddr)&&void 0!==t?t:"",void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageRequest.fromPartial(e.pagination)),r}},t.QueryDelegatorValidatorsResponse={typeUrl:"/cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of e.validators)i.Validator.encode(r,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&n.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),a=void 0===t?r.len:r.pos+t,s=A();for(;r.pos>>3){case 1:s.validators.push(i.Validator.decode(r,r.uint32()));break;case 2:s.pagination=n.PageResponse.decode(r,r.uint32());break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=A();return Array.isArray(null==e?void 0:e.validators)&&(t.validators=e.validators.map(e=>i.Validator.fromJSON(e))),(0,a.isSet)(e.pagination)&&(t.pagination=n.PageResponse.fromJSON(e.pagination)),t},toJSON(e){let t={};return e.validators?t.validators=e.validators.map(e=>e?i.Validator.toJSON(e):void 0):t.validators=[],void 0!==e.pagination&&(t.pagination=e.pagination?n.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=A();return r.validators=(null===(t=e.validators)||void 0===t?void 0:t.map(e=>i.Validator.fromPartial(e)))||[],void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageResponse.fromPartial(e.pagination)),r}},t.QueryDelegatorValidatorRequest={typeUrl:"/cosmos.staking.v1beta1.QueryDelegatorValidatorRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.delegatorAddr&&t.uint32(10).string(e.delegatorAddr),""!==e.validatorAddr&&t.uint32(18).string(e.validatorAddr),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=I();for(;r.pos>>3){case 1:i.delegatorAddr=r.string();break;case 2:i.validatorAddr=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=I();return(0,a.isSet)(e.delegatorAddr)&&(t.delegatorAddr=String(e.delegatorAddr)),(0,a.isSet)(e.validatorAddr)&&(t.validatorAddr=String(e.validatorAddr)),t},toJSON(e){let t={};return void 0!==e.delegatorAddr&&(t.delegatorAddr=e.delegatorAddr),void 0!==e.validatorAddr&&(t.validatorAddr=e.validatorAddr),t},fromPartial(e){var t,r;let n=I();return n.delegatorAddr=null!==(t=e.delegatorAddr)&&void 0!==t?t:"",n.validatorAddr=null!==(r=e.validatorAddr)&&void 0!==r?r:"",n}},t.QueryDelegatorValidatorResponse={typeUrl:"/cosmos.staking.v1beta1.QueryDelegatorValidatorResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return void 0!==e.validator&&i.Validator.encode(e.validator,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,a=R();for(;r.pos>>3==1?a.validator=i.Validator.decode(r,r.uint32()):r.skipType(7&e)}return a},fromJSON(e){let t=R();return(0,a.isSet)(e.validator)&&(t.validator=i.Validator.fromJSON(e.validator)),t},toJSON(e){let t={};return void 0!==e.validator&&(t.validator=e.validator?i.Validator.toJSON(e.validator):void 0),t},fromPartial(e){let t=R();return void 0!==e.validator&&null!==e.validator&&(t.validator=i.Validator.fromPartial(e.validator)),t}},t.QueryHistoricalInfoRequest={typeUrl:"/cosmos.staking.v1beta1.QueryHistoricalInfoRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return e.height!==BigInt(0)&&t.uint32(8).int64(e.height),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=E();for(;r.pos>>3==1?i.height=r.int64():r.skipType(7&e)}return i},fromJSON(e){let t=E();return(0,a.isSet)(e.height)&&(t.height=BigInt(e.height.toString())),t},toJSON(e){let t={};return void 0!==e.height&&(t.height=(e.height||BigInt(0)).toString()),t},fromPartial(e){let t=E();return void 0!==e.height&&null!==e.height&&(t.height=BigInt(e.height.toString())),t}},t.QueryHistoricalInfoResponse={typeUrl:"/cosmos.staking.v1beta1.QueryHistoricalInfoResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return void 0!==e.hist&&i.HistoricalInfo.encode(e.hist,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,a=T();for(;r.pos>>3==1?a.hist=i.HistoricalInfo.decode(r,r.uint32()):r.skipType(7&e)}return a},fromJSON(e){let t=T();return(0,a.isSet)(e.hist)&&(t.hist=i.HistoricalInfo.fromJSON(e.hist)),t},toJSON(e){let t={};return void 0!==e.hist&&(t.hist=e.hist?i.HistoricalInfo.toJSON(e.hist):void 0),t},fromPartial(e){let t=T();return void 0!==e.hist&&null!==e.hist&&(t.hist=i.HistoricalInfo.fromPartial(e.hist)),t}},t.QueryPoolRequest={typeUrl:"/cosmos.staking.v1beta1.QueryPoolRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=N();for(;r.posN(),toJSON:e=>({}),fromPartial:e=>N()},t.QueryPoolResponse={typeUrl:"/cosmos.staking.v1beta1.QueryPoolResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return void 0!==e.pool&&i.Pool.encode(e.pool,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,a=x();for(;r.pos>>3==1?a.pool=i.Pool.decode(r,r.uint32()):r.skipType(7&e)}return a},fromJSON(e){let t=x();return(0,a.isSet)(e.pool)&&(t.pool=i.Pool.fromJSON(e.pool)),t},toJSON(e){let t={};return void 0!==e.pool&&(t.pool=e.pool?i.Pool.toJSON(e.pool):void 0),t},fromPartial(e){let t=x();return void 0!==e.pool&&null!==e.pool&&(t.pool=i.Pool.fromPartial(e.pool)),t}},t.QueryParamsRequest={typeUrl:"/cosmos.staking.v1beta1.QueryParamsRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=B();for(;r.posB(),toJSON:e=>({}),fromPartial:e=>B()},t.QueryParamsResponse={typeUrl:"/cosmos.staking.v1beta1.QueryParamsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return void 0!==e.params&&i.Params.encode(e.params,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,a=C();for(;r.pos>>3==1?a.params=i.Params.decode(r,r.uint32()):r.skipType(7&e)}return a},fromJSON(e){let t=C();return(0,a.isSet)(e.params)&&(t.params=i.Params.fromJSON(e.params)),t},toJSON(e){let t={};return void 0!==e.params&&(t.params=e.params?i.Params.toJSON(e.params):void 0),t},fromPartial(e){let t=C();return void 0!==e.params&&null!==e.params&&(t.params=i.Params.fromPartial(e.params)),t}};class M{Validators(e){let r=t.QueryValidatorsRequest.encode(e).finish();return this.rpc.request("cosmos.staking.v1beta1.Query","Validators",r).then(e=>t.QueryValidatorsResponse.decode(new o.BinaryReader(e)))}Validator(e){let r=t.QueryValidatorRequest.encode(e).finish();return this.rpc.request("cosmos.staking.v1beta1.Query","Validator",r).then(e=>t.QueryValidatorResponse.decode(new o.BinaryReader(e)))}ValidatorDelegations(e){let r=t.QueryValidatorDelegationsRequest.encode(e).finish();return this.rpc.request("cosmos.staking.v1beta1.Query","ValidatorDelegations",r).then(e=>t.QueryValidatorDelegationsResponse.decode(new o.BinaryReader(e)))}ValidatorUnbondingDelegations(e){let r=t.QueryValidatorUnbondingDelegationsRequest.encode(e).finish();return this.rpc.request("cosmos.staking.v1beta1.Query","ValidatorUnbondingDelegations",r).then(e=>t.QueryValidatorUnbondingDelegationsResponse.decode(new o.BinaryReader(e)))}Delegation(e){let r=t.QueryDelegationRequest.encode(e).finish();return this.rpc.request("cosmos.staking.v1beta1.Query","Delegation",r).then(e=>t.QueryDelegationResponse.decode(new o.BinaryReader(e)))}UnbondingDelegation(e){let r=t.QueryUnbondingDelegationRequest.encode(e).finish();return this.rpc.request("cosmos.staking.v1beta1.Query","UnbondingDelegation",r).then(e=>t.QueryUnbondingDelegationResponse.decode(new o.BinaryReader(e)))}DelegatorDelegations(e){let r=t.QueryDelegatorDelegationsRequest.encode(e).finish();return this.rpc.request("cosmos.staking.v1beta1.Query","DelegatorDelegations",r).then(e=>t.QueryDelegatorDelegationsResponse.decode(new o.BinaryReader(e)))}DelegatorUnbondingDelegations(e){let r=t.QueryDelegatorUnbondingDelegationsRequest.encode(e).finish();return this.rpc.request("cosmos.staking.v1beta1.Query","DelegatorUnbondingDelegations",r).then(e=>t.QueryDelegatorUnbondingDelegationsResponse.decode(new o.BinaryReader(e)))}Redelegations(e){let r=t.QueryRedelegationsRequest.encode(e).finish();return this.rpc.request("cosmos.staking.v1beta1.Query","Redelegations",r).then(e=>t.QueryRedelegationsResponse.decode(new o.BinaryReader(e)))}DelegatorValidators(e){let r=t.QueryDelegatorValidatorsRequest.encode(e).finish();return this.rpc.request("cosmos.staking.v1beta1.Query","DelegatorValidators",r).then(e=>t.QueryDelegatorValidatorsResponse.decode(new o.BinaryReader(e)))}DelegatorValidator(e){let r=t.QueryDelegatorValidatorRequest.encode(e).finish();return this.rpc.request("cosmos.staking.v1beta1.Query","DelegatorValidator",r).then(e=>t.QueryDelegatorValidatorResponse.decode(new o.BinaryReader(e)))}HistoricalInfo(e){let r=t.QueryHistoricalInfoRequest.encode(e).finish();return this.rpc.request("cosmos.staking.v1beta1.Query","HistoricalInfo",r).then(e=>t.QueryHistoricalInfoResponse.decode(new o.BinaryReader(e)))}Pool(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.QueryPoolRequest.encode(e).finish();return this.rpc.request("cosmos.staking.v1beta1.Query","Pool",r).then(e=>t.QueryPoolResponse.decode(new o.BinaryReader(e)))}Params(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.QueryParamsRequest.encode(e).finish();return this.rpc.request("cosmos.staking.v1beta1.Query","Params",r).then(e=>t.QueryParamsResponse.decode(new o.BinaryReader(e)))}constructor(e){this.rpc=e,this.Validators=this.Validators.bind(this),this.Validator=this.Validator.bind(this),this.ValidatorDelegations=this.ValidatorDelegations.bind(this),this.ValidatorUnbondingDelegations=this.ValidatorUnbondingDelegations.bind(this),this.Delegation=this.Delegation.bind(this),this.UnbondingDelegation=this.UnbondingDelegation.bind(this),this.DelegatorDelegations=this.DelegatorDelegations.bind(this),this.DelegatorUnbondingDelegations=this.DelegatorUnbondingDelegations.bind(this),this.Redelegations=this.Redelegations.bind(this),this.DelegatorValidators=this.DelegatorValidators.bind(this),this.DelegatorValidator=this.DelegatorValidator.bind(this),this.HistoricalInfo=this.HistoricalInfo.bind(this),this.Pool=this.Pool.bind(this),this.Params=this.Params.bind(this)}}t.QueryClientImpl=M},20534:function(e,t,r){"use strict";var n,i;Object.defineProperty(t,"__esModule",{value:!0}),t.ValidatorUpdates=t.Pool=t.RedelegationResponse=t.RedelegationEntryResponse=t.DelegationResponse=t.Params=t.Redelegation=t.RedelegationEntry=t.UnbondingDelegationEntry=t.UnbondingDelegation=t.Delegation=t.DVVTriplets=t.DVVTriplet=t.DVPairs=t.DVPair=t.ValAddresses=t.Validator=t.Description=t.Commission=t.CommissionRates=t.HistoricalInfo=t.infractionToJSON=t.infractionFromJSON=t.Infraction=t.bondStatusToJSON=t.bondStatusFromJSON=t.BondStatus=t.protobufPackage=void 0;let o=r(92585),a=r(9990),s=r(11879),l=r(84849),u=r(14841),d=r(52942),c=r(46554),p=r(99133);function f(e){switch(e){case 0:case"BOND_STATUS_UNSPECIFIED":return n.BOND_STATUS_UNSPECIFIED;case 1:case"BOND_STATUS_UNBONDED":return n.BOND_STATUS_UNBONDED;case 2:case"BOND_STATUS_UNBONDING":return n.BOND_STATUS_UNBONDING;case 3:case"BOND_STATUS_BONDED":return n.BOND_STATUS_BONDED;default:return n.UNRECOGNIZED}}function h(e){switch(e){case n.BOND_STATUS_UNSPECIFIED:return"BOND_STATUS_UNSPECIFIED";case n.BOND_STATUS_UNBONDED:return"BOND_STATUS_UNBONDED";case n.BOND_STATUS_UNBONDING:return"BOND_STATUS_UNBONDING";case n.BOND_STATUS_BONDED:return"BOND_STATUS_BONDED";case n.UNRECOGNIZED:default:return"UNRECOGNIZED"}}function g(e){switch(e){case 0:case"INFRACTION_UNSPECIFIED":return i.INFRACTION_UNSPECIFIED;case 1:case"INFRACTION_DOUBLE_SIGN":return i.INFRACTION_DOUBLE_SIGN;case 2:case"INFRACTION_DOWNTIME":return i.INFRACTION_DOWNTIME;default:return i.UNRECOGNIZED}}function m(e){switch(e){case i.INFRACTION_UNSPECIFIED:return"INFRACTION_UNSPECIFIED";case i.INFRACTION_DOUBLE_SIGN:return"INFRACTION_DOUBLE_SIGN";case i.INFRACTION_DOWNTIME:return"INFRACTION_DOWNTIME";case i.UNRECOGNIZED:default:return"UNRECOGNIZED"}}function y(){return{header:o.Header.fromPartial({}),valset:[]}}function v(){return{rate:"",maxRate:"",maxChangeRate:""}}function b(){return{commissionRates:t.CommissionRates.fromPartial({}),updateTime:a.Timestamp.fromPartial({})}}function S(){return{moniker:"",identity:"",website:"",securityContact:"",details:""}}function w(){return{operatorAddress:"",consensusPubkey:void 0,jailed:!1,status:0,tokens:"",delegatorShares:"",description:t.Description.fromPartial({}),unbondingHeight:BigInt(0),unbondingTime:a.Timestamp.fromPartial({}),commission:t.Commission.fromPartial({}),minSelfDelegation:"",unbondingOnHoldRefCount:BigInt(0),unbondingIds:[]}}function _(){return{addresses:[]}}function k(){return{delegatorAddress:"",validatorAddress:""}}function O(){return{pairs:[]}}function P(){return{delegatorAddress:"",validatorSrcAddress:"",validatorDstAddress:""}}function A(){return{triplets:[]}}function I(){return{delegatorAddress:"",validatorAddress:"",shares:""}}function R(){return{delegatorAddress:"",validatorAddress:"",entries:[]}}function E(){return{creationHeight:BigInt(0),completionTime:a.Timestamp.fromPartial({}),initialBalance:"",balance:"",unbondingId:BigInt(0),unbondingOnHoldRefCount:BigInt(0)}}function T(){return{creationHeight:BigInt(0),completionTime:a.Timestamp.fromPartial({}),initialBalance:"",sharesDst:"",unbondingId:BigInt(0),unbondingOnHoldRefCount:BigInt(0)}}function N(){return{delegatorAddress:"",validatorSrcAddress:"",validatorDstAddress:"",entries:[]}}function x(){return{unbondingTime:l.Duration.fromPartial({}),maxValidators:0,maxEntries:0,historicalEntries:0,bondDenom:"",minCommissionRate:""}}function B(){return{delegation:t.Delegation.fromPartial({}),balance:u.Coin.fromPartial({})}}function C(){return{redelegationEntry:t.RedelegationEntry.fromPartial({}),balance:""}}function M(){return{redelegation:t.Redelegation.fromPartial({}),entries:[]}}function D(){return{notBondedTokens:"",bondedTokens:""}}function U(){return{updates:[]}}t.protobufPackage="cosmos.staking.v1beta1",function(e){e[e.BOND_STATUS_UNSPECIFIED=0]="BOND_STATUS_UNSPECIFIED",e[e.BOND_STATUS_UNBONDED=1]="BOND_STATUS_UNBONDED",e[e.BOND_STATUS_UNBONDING=2]="BOND_STATUS_UNBONDING",e[e.BOND_STATUS_BONDED=3]="BOND_STATUS_BONDED",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(n||(t.BondStatus=n={})),t.bondStatusFromJSON=f,t.bondStatusToJSON=h,function(e){e[e.INFRACTION_UNSPECIFIED=0]="INFRACTION_UNSPECIFIED",e[e.INFRACTION_DOUBLE_SIGN=1]="INFRACTION_DOUBLE_SIGN",e[e.INFRACTION_DOWNTIME=2]="INFRACTION_DOWNTIME",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(i||(t.Infraction=i={})),t.infractionFromJSON=g,t.infractionToJSON=m,t.HistoricalInfo={typeUrl:"/cosmos.staking.v1beta1.HistoricalInfo",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.BinaryWriter.create();for(let n of(void 0!==e.header&&o.Header.encode(e.header,r.uint32(10).fork()).ldelim(),e.valset))t.Validator.encode(n,r.uint32(18).fork()).ldelim();return r},decode(e,r){let n=e instanceof c.BinaryReader?e:new c.BinaryReader(e),i=void 0===r?n.len:n.pos+r,a=y();for(;n.pos>>3){case 1:a.header=o.Header.decode(n,n.uint32());break;case 2:a.valset.push(t.Validator.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return a},fromJSON(e){let r=y();return(0,p.isSet)(e.header)&&(r.header=o.Header.fromJSON(e.header)),Array.isArray(null==e?void 0:e.valset)&&(r.valset=e.valset.map(e=>t.Validator.fromJSON(e))),r},toJSON(e){let r={};return void 0!==e.header&&(r.header=e.header?o.Header.toJSON(e.header):void 0),e.valset?r.valset=e.valset.map(e=>e?t.Validator.toJSON(e):void 0):r.valset=[],r},fromPartial(e){var r;let n=y();return void 0!==e.header&&null!==e.header&&(n.header=o.Header.fromPartial(e.header)),n.valset=(null===(r=e.valset)||void 0===r?void 0:r.map(e=>t.Validator.fromPartial(e)))||[],n}},t.CommissionRates={typeUrl:"/cosmos.staking.v1beta1.CommissionRates",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.BinaryWriter.create();return""!==e.rate&&t.uint32(10).string(e.rate),""!==e.maxRate&&t.uint32(18).string(e.maxRate),""!==e.maxChangeRate&&t.uint32(26).string(e.maxChangeRate),t},decode(e,t){let r=e instanceof c.BinaryReader?e:new c.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=v();for(;r.pos>>3){case 1:i.rate=r.string();break;case 2:i.maxRate=r.string();break;case 3:i.maxChangeRate=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=v();return(0,p.isSet)(e.rate)&&(t.rate=String(e.rate)),(0,p.isSet)(e.maxRate)&&(t.maxRate=String(e.maxRate)),(0,p.isSet)(e.maxChangeRate)&&(t.maxChangeRate=String(e.maxChangeRate)),t},toJSON(e){let t={};return void 0!==e.rate&&(t.rate=e.rate),void 0!==e.maxRate&&(t.maxRate=e.maxRate),void 0!==e.maxChangeRate&&(t.maxChangeRate=e.maxChangeRate),t},fromPartial(e){var t,r,n;let i=v();return i.rate=null!==(t=e.rate)&&void 0!==t?t:"",i.maxRate=null!==(r=e.maxRate)&&void 0!==r?r:"",i.maxChangeRate=null!==(n=e.maxChangeRate)&&void 0!==n?n:"",i}},t.Commission={typeUrl:"/cosmos.staking.v1beta1.Commission",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.BinaryWriter.create();return void 0!==e.commissionRates&&t.CommissionRates.encode(e.commissionRates,r.uint32(10).fork()).ldelim(),void 0!==e.updateTime&&a.Timestamp.encode(e.updateTime,r.uint32(18).fork()).ldelim(),r},decode(e,r){let n=e instanceof c.BinaryReader?e:new c.BinaryReader(e),i=void 0===r?n.len:n.pos+r,o=b();for(;n.pos>>3){case 1:o.commissionRates=t.CommissionRates.decode(n,n.uint32());break;case 2:o.updateTime=a.Timestamp.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){let r=b();return(0,p.isSet)(e.commissionRates)&&(r.commissionRates=t.CommissionRates.fromJSON(e.commissionRates)),(0,p.isSet)(e.updateTime)&&(r.updateTime=(0,p.fromJsonTimestamp)(e.updateTime)),r},toJSON(e){let r={};return void 0!==e.commissionRates&&(r.commissionRates=e.commissionRates?t.CommissionRates.toJSON(e.commissionRates):void 0),void 0!==e.updateTime&&(r.updateTime=(0,p.fromTimestamp)(e.updateTime).toISOString()),r},fromPartial(e){let r=b();return void 0!==e.commissionRates&&null!==e.commissionRates&&(r.commissionRates=t.CommissionRates.fromPartial(e.commissionRates)),void 0!==e.updateTime&&null!==e.updateTime&&(r.updateTime=a.Timestamp.fromPartial(e.updateTime)),r}},t.Description={typeUrl:"/cosmos.staking.v1beta1.Description",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.BinaryWriter.create();return""!==e.moniker&&t.uint32(10).string(e.moniker),""!==e.identity&&t.uint32(18).string(e.identity),""!==e.website&&t.uint32(26).string(e.website),""!==e.securityContact&&t.uint32(34).string(e.securityContact),""!==e.details&&t.uint32(42).string(e.details),t},decode(e,t){let r=e instanceof c.BinaryReader?e:new c.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=S();for(;r.pos>>3){case 1:i.moniker=r.string();break;case 2:i.identity=r.string();break;case 3:i.website=r.string();break;case 4:i.securityContact=r.string();break;case 5:i.details=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=S();return(0,p.isSet)(e.moniker)&&(t.moniker=String(e.moniker)),(0,p.isSet)(e.identity)&&(t.identity=String(e.identity)),(0,p.isSet)(e.website)&&(t.website=String(e.website)),(0,p.isSet)(e.securityContact)&&(t.securityContact=String(e.securityContact)),(0,p.isSet)(e.details)&&(t.details=String(e.details)),t},toJSON(e){let t={};return void 0!==e.moniker&&(t.moniker=e.moniker),void 0!==e.identity&&(t.identity=e.identity),void 0!==e.website&&(t.website=e.website),void 0!==e.securityContact&&(t.securityContact=e.securityContact),void 0!==e.details&&(t.details=e.details),t},fromPartial(e){var t,r,n,i,o;let a=S();return a.moniker=null!==(t=e.moniker)&&void 0!==t?t:"",a.identity=null!==(r=e.identity)&&void 0!==r?r:"",a.website=null!==(n=e.website)&&void 0!==n?n:"",a.securityContact=null!==(i=e.securityContact)&&void 0!==i?i:"",a.details=null!==(o=e.details)&&void 0!==o?o:"",a}},t.Validator={typeUrl:"/cosmos.staking.v1beta1.Validator",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.BinaryWriter.create();for(let n of(""!==e.operatorAddress&&r.uint32(10).string(e.operatorAddress),void 0!==e.consensusPubkey&&s.Any.encode(e.consensusPubkey,r.uint32(18).fork()).ldelim(),!0===e.jailed&&r.uint32(24).bool(e.jailed),0!==e.status&&r.uint32(32).int32(e.status),""!==e.tokens&&r.uint32(42).string(e.tokens),""!==e.delegatorShares&&r.uint32(50).string(e.delegatorShares),void 0!==e.description&&t.Description.encode(e.description,r.uint32(58).fork()).ldelim(),e.unbondingHeight!==BigInt(0)&&r.uint32(64).int64(e.unbondingHeight),void 0!==e.unbondingTime&&a.Timestamp.encode(e.unbondingTime,r.uint32(74).fork()).ldelim(),void 0!==e.commission&&t.Commission.encode(e.commission,r.uint32(82).fork()).ldelim(),""!==e.minSelfDelegation&&r.uint32(90).string(e.minSelfDelegation),e.unbondingOnHoldRefCount!==BigInt(0)&&r.uint32(96).int64(e.unbondingOnHoldRefCount),r.uint32(106).fork(),e.unbondingIds))r.uint64(n);return r.ldelim(),r},decode(e,r){let n=e instanceof c.BinaryReader?e:new c.BinaryReader(e),i=void 0===r?n.len:n.pos+r,o=w();for(;n.pos>>3){case 1:o.operatorAddress=n.string();break;case 2:o.consensusPubkey=s.Any.decode(n,n.uint32());break;case 3:o.jailed=n.bool();break;case 4:o.status=n.int32();break;case 5:o.tokens=n.string();break;case 6:o.delegatorShares=n.string();break;case 7:o.description=t.Description.decode(n,n.uint32());break;case 8:o.unbondingHeight=n.int64();break;case 9:o.unbondingTime=a.Timestamp.decode(n,n.uint32());break;case 10:o.commission=t.Commission.decode(n,n.uint32());break;case 11:o.minSelfDelegation=n.string();break;case 12:o.unbondingOnHoldRefCount=n.int64();break;case 13:if((7&e)==2){let e=n.uint32()+n.pos;for(;n.posBigInt(e.toString()))),r},toJSON(e){let r={};return void 0!==e.operatorAddress&&(r.operatorAddress=e.operatorAddress),void 0!==e.consensusPubkey&&(r.consensusPubkey=e.consensusPubkey?s.Any.toJSON(e.consensusPubkey):void 0),void 0!==e.jailed&&(r.jailed=e.jailed),void 0!==e.status&&(r.status=h(e.status)),void 0!==e.tokens&&(r.tokens=e.tokens),void 0!==e.delegatorShares&&(r.delegatorShares=e.delegatorShares),void 0!==e.description&&(r.description=e.description?t.Description.toJSON(e.description):void 0),void 0!==e.unbondingHeight&&(r.unbondingHeight=(e.unbondingHeight||BigInt(0)).toString()),void 0!==e.unbondingTime&&(r.unbondingTime=(0,p.fromTimestamp)(e.unbondingTime).toISOString()),void 0!==e.commission&&(r.commission=e.commission?t.Commission.toJSON(e.commission):void 0),void 0!==e.minSelfDelegation&&(r.minSelfDelegation=e.minSelfDelegation),void 0!==e.unbondingOnHoldRefCount&&(r.unbondingOnHoldRefCount=(e.unbondingOnHoldRefCount||BigInt(0)).toString()),e.unbondingIds?r.unbondingIds=e.unbondingIds.map(e=>(e||BigInt(0)).toString()):r.unbondingIds=[],r},fromPartial(e){var r,n,i,o,l,u,d;let c=w();return c.operatorAddress=null!==(n=e.operatorAddress)&&void 0!==n?n:"",void 0!==e.consensusPubkey&&null!==e.consensusPubkey&&(c.consensusPubkey=s.Any.fromPartial(e.consensusPubkey)),c.jailed=null!==(i=e.jailed)&&void 0!==i&&i,c.status=null!==(o=e.status)&&void 0!==o?o:0,c.tokens=null!==(l=e.tokens)&&void 0!==l?l:"",c.delegatorShares=null!==(u=e.delegatorShares)&&void 0!==u?u:"",void 0!==e.description&&null!==e.description&&(c.description=t.Description.fromPartial(e.description)),void 0!==e.unbondingHeight&&null!==e.unbondingHeight&&(c.unbondingHeight=BigInt(e.unbondingHeight.toString())),void 0!==e.unbondingTime&&null!==e.unbondingTime&&(c.unbondingTime=a.Timestamp.fromPartial(e.unbondingTime)),void 0!==e.commission&&null!==e.commission&&(c.commission=t.Commission.fromPartial(e.commission)),c.minSelfDelegation=null!==(d=e.minSelfDelegation)&&void 0!==d?d:"",void 0!==e.unbondingOnHoldRefCount&&null!==e.unbondingOnHoldRefCount&&(c.unbondingOnHoldRefCount=BigInt(e.unbondingOnHoldRefCount.toString())),c.unbondingIds=(null===(r=e.unbondingIds)||void 0===r?void 0:r.map(e=>BigInt(e.toString())))||[],c}},t.ValAddresses={typeUrl:"/cosmos.staking.v1beta1.ValAddresses",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.BinaryWriter.create();for(let r of e.addresses)t.uint32(10).string(r);return t},decode(e,t){let r=e instanceof c.BinaryReader?e:new c.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=_();for(;r.pos>>3==1?i.addresses.push(r.string()):r.skipType(7&e)}return i},fromJSON(e){let t=_();return Array.isArray(null==e?void 0:e.addresses)&&(t.addresses=e.addresses.map(e=>String(e))),t},toJSON(e){let t={};return e.addresses?t.addresses=e.addresses.map(e=>e):t.addresses=[],t},fromPartial(e){var t;let r=_();return r.addresses=(null===(t=e.addresses)||void 0===t?void 0:t.map(e=>e))||[],r}},t.DVPair={typeUrl:"/cosmos.staking.v1beta1.DVPair",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.BinaryWriter.create();return""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),""!==e.validatorAddress&&t.uint32(18).string(e.validatorAddress),t},decode(e,t){let r=e instanceof c.BinaryReader?e:new c.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=k();for(;r.pos>>3){case 1:i.delegatorAddress=r.string();break;case 2:i.validatorAddress=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=k();return(0,p.isSet)(e.delegatorAddress)&&(t.delegatorAddress=String(e.delegatorAddress)),(0,p.isSet)(e.validatorAddress)&&(t.validatorAddress=String(e.validatorAddress)),t},toJSON(e){let t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),t},fromPartial(e){var t,r;let n=k();return n.delegatorAddress=null!==(t=e.delegatorAddress)&&void 0!==t?t:"",n.validatorAddress=null!==(r=e.validatorAddress)&&void 0!==r?r:"",n}},t.DVPairs={typeUrl:"/cosmos.staking.v1beta1.DVPairs",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.BinaryWriter.create();for(let n of e.pairs)t.DVPair.encode(n,r.uint32(10).fork()).ldelim();return r},decode(e,r){let n=e instanceof c.BinaryReader?e:new c.BinaryReader(e),i=void 0===r?n.len:n.pos+r,o=O();for(;n.pos>>3==1?o.pairs.push(t.DVPair.decode(n,n.uint32())):n.skipType(7&e)}return o},fromJSON(e){let r=O();return Array.isArray(null==e?void 0:e.pairs)&&(r.pairs=e.pairs.map(e=>t.DVPair.fromJSON(e))),r},toJSON(e){let r={};return e.pairs?r.pairs=e.pairs.map(e=>e?t.DVPair.toJSON(e):void 0):r.pairs=[],r},fromPartial(e){var r;let n=O();return n.pairs=(null===(r=e.pairs)||void 0===r?void 0:r.map(e=>t.DVPair.fromPartial(e)))||[],n}},t.DVVTriplet={typeUrl:"/cosmos.staking.v1beta1.DVVTriplet",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.BinaryWriter.create();return""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),""!==e.validatorSrcAddress&&t.uint32(18).string(e.validatorSrcAddress),""!==e.validatorDstAddress&&t.uint32(26).string(e.validatorDstAddress),t},decode(e,t){let r=e instanceof c.BinaryReader?e:new c.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=P();for(;r.pos>>3){case 1:i.delegatorAddress=r.string();break;case 2:i.validatorSrcAddress=r.string();break;case 3:i.validatorDstAddress=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=P();return(0,p.isSet)(e.delegatorAddress)&&(t.delegatorAddress=String(e.delegatorAddress)),(0,p.isSet)(e.validatorSrcAddress)&&(t.validatorSrcAddress=String(e.validatorSrcAddress)),(0,p.isSet)(e.validatorDstAddress)&&(t.validatorDstAddress=String(e.validatorDstAddress)),t},toJSON(e){let t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.validatorSrcAddress&&(t.validatorSrcAddress=e.validatorSrcAddress),void 0!==e.validatorDstAddress&&(t.validatorDstAddress=e.validatorDstAddress),t},fromPartial(e){var t,r,n;let i=P();return i.delegatorAddress=null!==(t=e.delegatorAddress)&&void 0!==t?t:"",i.validatorSrcAddress=null!==(r=e.validatorSrcAddress)&&void 0!==r?r:"",i.validatorDstAddress=null!==(n=e.validatorDstAddress)&&void 0!==n?n:"",i}},t.DVVTriplets={typeUrl:"/cosmos.staking.v1beta1.DVVTriplets",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.BinaryWriter.create();for(let n of e.triplets)t.DVVTriplet.encode(n,r.uint32(10).fork()).ldelim();return r},decode(e,r){let n=e instanceof c.BinaryReader?e:new c.BinaryReader(e),i=void 0===r?n.len:n.pos+r,o=A();for(;n.pos>>3==1?o.triplets.push(t.DVVTriplet.decode(n,n.uint32())):n.skipType(7&e)}return o},fromJSON(e){let r=A();return Array.isArray(null==e?void 0:e.triplets)&&(r.triplets=e.triplets.map(e=>t.DVVTriplet.fromJSON(e))),r},toJSON(e){let r={};return e.triplets?r.triplets=e.triplets.map(e=>e?t.DVVTriplet.toJSON(e):void 0):r.triplets=[],r},fromPartial(e){var r;let n=A();return n.triplets=(null===(r=e.triplets)||void 0===r?void 0:r.map(e=>t.DVVTriplet.fromPartial(e)))||[],n}},t.Delegation={typeUrl:"/cosmos.staking.v1beta1.Delegation",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.BinaryWriter.create();return""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),""!==e.validatorAddress&&t.uint32(18).string(e.validatorAddress),""!==e.shares&&t.uint32(26).string(e.shares),t},decode(e,t){let r=e instanceof c.BinaryReader?e:new c.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=I();for(;r.pos>>3){case 1:i.delegatorAddress=r.string();break;case 2:i.validatorAddress=r.string();break;case 3:i.shares=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=I();return(0,p.isSet)(e.delegatorAddress)&&(t.delegatorAddress=String(e.delegatorAddress)),(0,p.isSet)(e.validatorAddress)&&(t.validatorAddress=String(e.validatorAddress)),(0,p.isSet)(e.shares)&&(t.shares=String(e.shares)),t},toJSON(e){let t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),void 0!==e.shares&&(t.shares=e.shares),t},fromPartial(e){var t,r,n;let i=I();return i.delegatorAddress=null!==(t=e.delegatorAddress)&&void 0!==t?t:"",i.validatorAddress=null!==(r=e.validatorAddress)&&void 0!==r?r:"",i.shares=null!==(n=e.shares)&&void 0!==n?n:"",i}},t.UnbondingDelegation={typeUrl:"/cosmos.staking.v1beta1.UnbondingDelegation",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.BinaryWriter.create();for(let n of(""!==e.delegatorAddress&&r.uint32(10).string(e.delegatorAddress),""!==e.validatorAddress&&r.uint32(18).string(e.validatorAddress),e.entries))t.UnbondingDelegationEntry.encode(n,r.uint32(26).fork()).ldelim();return r},decode(e,r){let n=e instanceof c.BinaryReader?e:new c.BinaryReader(e),i=void 0===r?n.len:n.pos+r,o=R();for(;n.pos>>3){case 1:o.delegatorAddress=n.string();break;case 2:o.validatorAddress=n.string();break;case 3:o.entries.push(t.UnbondingDelegationEntry.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return o},fromJSON(e){let r=R();return(0,p.isSet)(e.delegatorAddress)&&(r.delegatorAddress=String(e.delegatorAddress)),(0,p.isSet)(e.validatorAddress)&&(r.validatorAddress=String(e.validatorAddress)),Array.isArray(null==e?void 0:e.entries)&&(r.entries=e.entries.map(e=>t.UnbondingDelegationEntry.fromJSON(e))),r},toJSON(e){let r={};return void 0!==e.delegatorAddress&&(r.delegatorAddress=e.delegatorAddress),void 0!==e.validatorAddress&&(r.validatorAddress=e.validatorAddress),e.entries?r.entries=e.entries.map(e=>e?t.UnbondingDelegationEntry.toJSON(e):void 0):r.entries=[],r},fromPartial(e){var r,n,i;let o=R();return o.delegatorAddress=null!==(n=e.delegatorAddress)&&void 0!==n?n:"",o.validatorAddress=null!==(i=e.validatorAddress)&&void 0!==i?i:"",o.entries=(null===(r=e.entries)||void 0===r?void 0:r.map(e=>t.UnbondingDelegationEntry.fromPartial(e)))||[],o}},t.UnbondingDelegationEntry={typeUrl:"/cosmos.staking.v1beta1.UnbondingDelegationEntry",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.BinaryWriter.create();return e.creationHeight!==BigInt(0)&&t.uint32(8).int64(e.creationHeight),void 0!==e.completionTime&&a.Timestamp.encode(e.completionTime,t.uint32(18).fork()).ldelim(),""!==e.initialBalance&&t.uint32(26).string(e.initialBalance),""!==e.balance&&t.uint32(34).string(e.balance),e.unbondingId!==BigInt(0)&&t.uint32(40).uint64(e.unbondingId),e.unbondingOnHoldRefCount!==BigInt(0)&&t.uint32(48).int64(e.unbondingOnHoldRefCount),t},decode(e,t){let r=e instanceof c.BinaryReader?e:new c.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=E();for(;r.pos>>3){case 1:i.creationHeight=r.int64();break;case 2:i.completionTime=a.Timestamp.decode(r,r.uint32());break;case 3:i.initialBalance=r.string();break;case 4:i.balance=r.string();break;case 5:i.unbondingId=r.uint64();break;case 6:i.unbondingOnHoldRefCount=r.int64();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=E();return(0,p.isSet)(e.creationHeight)&&(t.creationHeight=BigInt(e.creationHeight.toString())),(0,p.isSet)(e.completionTime)&&(t.completionTime=(0,p.fromJsonTimestamp)(e.completionTime)),(0,p.isSet)(e.initialBalance)&&(t.initialBalance=String(e.initialBalance)),(0,p.isSet)(e.balance)&&(t.balance=String(e.balance)),(0,p.isSet)(e.unbondingId)&&(t.unbondingId=BigInt(e.unbondingId.toString())),(0,p.isSet)(e.unbondingOnHoldRefCount)&&(t.unbondingOnHoldRefCount=BigInt(e.unbondingOnHoldRefCount.toString())),t},toJSON(e){let t={};return void 0!==e.creationHeight&&(t.creationHeight=(e.creationHeight||BigInt(0)).toString()),void 0!==e.completionTime&&(t.completionTime=(0,p.fromTimestamp)(e.completionTime).toISOString()),void 0!==e.initialBalance&&(t.initialBalance=e.initialBalance),void 0!==e.balance&&(t.balance=e.balance),void 0!==e.unbondingId&&(t.unbondingId=(e.unbondingId||BigInt(0)).toString()),void 0!==e.unbondingOnHoldRefCount&&(t.unbondingOnHoldRefCount=(e.unbondingOnHoldRefCount||BigInt(0)).toString()),t},fromPartial(e){var t,r;let n=E();return void 0!==e.creationHeight&&null!==e.creationHeight&&(n.creationHeight=BigInt(e.creationHeight.toString())),void 0!==e.completionTime&&null!==e.completionTime&&(n.completionTime=a.Timestamp.fromPartial(e.completionTime)),n.initialBalance=null!==(t=e.initialBalance)&&void 0!==t?t:"",n.balance=null!==(r=e.balance)&&void 0!==r?r:"",void 0!==e.unbondingId&&null!==e.unbondingId&&(n.unbondingId=BigInt(e.unbondingId.toString())),void 0!==e.unbondingOnHoldRefCount&&null!==e.unbondingOnHoldRefCount&&(n.unbondingOnHoldRefCount=BigInt(e.unbondingOnHoldRefCount.toString())),n}},t.RedelegationEntry={typeUrl:"/cosmos.staking.v1beta1.RedelegationEntry",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.BinaryWriter.create();return e.creationHeight!==BigInt(0)&&t.uint32(8).int64(e.creationHeight),void 0!==e.completionTime&&a.Timestamp.encode(e.completionTime,t.uint32(18).fork()).ldelim(),""!==e.initialBalance&&t.uint32(26).string(e.initialBalance),""!==e.sharesDst&&t.uint32(34).string(e.sharesDst),e.unbondingId!==BigInt(0)&&t.uint32(40).uint64(e.unbondingId),e.unbondingOnHoldRefCount!==BigInt(0)&&t.uint32(48).int64(e.unbondingOnHoldRefCount),t},decode(e,t){let r=e instanceof c.BinaryReader?e:new c.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=T();for(;r.pos>>3){case 1:i.creationHeight=r.int64();break;case 2:i.completionTime=a.Timestamp.decode(r,r.uint32());break;case 3:i.initialBalance=r.string();break;case 4:i.sharesDst=r.string();break;case 5:i.unbondingId=r.uint64();break;case 6:i.unbondingOnHoldRefCount=r.int64();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=T();return(0,p.isSet)(e.creationHeight)&&(t.creationHeight=BigInt(e.creationHeight.toString())),(0,p.isSet)(e.completionTime)&&(t.completionTime=(0,p.fromJsonTimestamp)(e.completionTime)),(0,p.isSet)(e.initialBalance)&&(t.initialBalance=String(e.initialBalance)),(0,p.isSet)(e.sharesDst)&&(t.sharesDst=String(e.sharesDst)),(0,p.isSet)(e.unbondingId)&&(t.unbondingId=BigInt(e.unbondingId.toString())),(0,p.isSet)(e.unbondingOnHoldRefCount)&&(t.unbondingOnHoldRefCount=BigInt(e.unbondingOnHoldRefCount.toString())),t},toJSON(e){let t={};return void 0!==e.creationHeight&&(t.creationHeight=(e.creationHeight||BigInt(0)).toString()),void 0!==e.completionTime&&(t.completionTime=(0,p.fromTimestamp)(e.completionTime).toISOString()),void 0!==e.initialBalance&&(t.initialBalance=e.initialBalance),void 0!==e.sharesDst&&(t.sharesDst=e.sharesDst),void 0!==e.unbondingId&&(t.unbondingId=(e.unbondingId||BigInt(0)).toString()),void 0!==e.unbondingOnHoldRefCount&&(t.unbondingOnHoldRefCount=(e.unbondingOnHoldRefCount||BigInt(0)).toString()),t},fromPartial(e){var t,r;let n=T();return void 0!==e.creationHeight&&null!==e.creationHeight&&(n.creationHeight=BigInt(e.creationHeight.toString())),void 0!==e.completionTime&&null!==e.completionTime&&(n.completionTime=a.Timestamp.fromPartial(e.completionTime)),n.initialBalance=null!==(t=e.initialBalance)&&void 0!==t?t:"",n.sharesDst=null!==(r=e.sharesDst)&&void 0!==r?r:"",void 0!==e.unbondingId&&null!==e.unbondingId&&(n.unbondingId=BigInt(e.unbondingId.toString())),void 0!==e.unbondingOnHoldRefCount&&null!==e.unbondingOnHoldRefCount&&(n.unbondingOnHoldRefCount=BigInt(e.unbondingOnHoldRefCount.toString())),n}},t.Redelegation={typeUrl:"/cosmos.staking.v1beta1.Redelegation",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.BinaryWriter.create();for(let n of(""!==e.delegatorAddress&&r.uint32(10).string(e.delegatorAddress),""!==e.validatorSrcAddress&&r.uint32(18).string(e.validatorSrcAddress),""!==e.validatorDstAddress&&r.uint32(26).string(e.validatorDstAddress),e.entries))t.RedelegationEntry.encode(n,r.uint32(34).fork()).ldelim();return r},decode(e,r){let n=e instanceof c.BinaryReader?e:new c.BinaryReader(e),i=void 0===r?n.len:n.pos+r,o=N();for(;n.pos>>3){case 1:o.delegatorAddress=n.string();break;case 2:o.validatorSrcAddress=n.string();break;case 3:o.validatorDstAddress=n.string();break;case 4:o.entries.push(t.RedelegationEntry.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return o},fromJSON(e){let r=N();return(0,p.isSet)(e.delegatorAddress)&&(r.delegatorAddress=String(e.delegatorAddress)),(0,p.isSet)(e.validatorSrcAddress)&&(r.validatorSrcAddress=String(e.validatorSrcAddress)),(0,p.isSet)(e.validatorDstAddress)&&(r.validatorDstAddress=String(e.validatorDstAddress)),Array.isArray(null==e?void 0:e.entries)&&(r.entries=e.entries.map(e=>t.RedelegationEntry.fromJSON(e))),r},toJSON(e){let r={};return void 0!==e.delegatorAddress&&(r.delegatorAddress=e.delegatorAddress),void 0!==e.validatorSrcAddress&&(r.validatorSrcAddress=e.validatorSrcAddress),void 0!==e.validatorDstAddress&&(r.validatorDstAddress=e.validatorDstAddress),e.entries?r.entries=e.entries.map(e=>e?t.RedelegationEntry.toJSON(e):void 0):r.entries=[],r},fromPartial(e){var r,n,i,o;let a=N();return a.delegatorAddress=null!==(n=e.delegatorAddress)&&void 0!==n?n:"",a.validatorSrcAddress=null!==(i=e.validatorSrcAddress)&&void 0!==i?i:"",a.validatorDstAddress=null!==(o=e.validatorDstAddress)&&void 0!==o?o:"",a.entries=(null===(r=e.entries)||void 0===r?void 0:r.map(e=>t.RedelegationEntry.fromPartial(e)))||[],a}},t.Params={typeUrl:"/cosmos.staking.v1beta1.Params",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.BinaryWriter.create();return void 0!==e.unbondingTime&&l.Duration.encode(e.unbondingTime,t.uint32(10).fork()).ldelim(),0!==e.maxValidators&&t.uint32(16).uint32(e.maxValidators),0!==e.maxEntries&&t.uint32(24).uint32(e.maxEntries),0!==e.historicalEntries&&t.uint32(32).uint32(e.historicalEntries),""!==e.bondDenom&&t.uint32(42).string(e.bondDenom),""!==e.minCommissionRate&&t.uint32(50).string(e.minCommissionRate),t},decode(e,t){let r=e instanceof c.BinaryReader?e:new c.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=x();for(;r.pos>>3){case 1:i.unbondingTime=l.Duration.decode(r,r.uint32());break;case 2:i.maxValidators=r.uint32();break;case 3:i.maxEntries=r.uint32();break;case 4:i.historicalEntries=r.uint32();break;case 5:i.bondDenom=r.string();break;case 6:i.minCommissionRate=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=x();return(0,p.isSet)(e.unbondingTime)&&(t.unbondingTime=l.Duration.fromJSON(e.unbondingTime)),(0,p.isSet)(e.maxValidators)&&(t.maxValidators=Number(e.maxValidators)),(0,p.isSet)(e.maxEntries)&&(t.maxEntries=Number(e.maxEntries)),(0,p.isSet)(e.historicalEntries)&&(t.historicalEntries=Number(e.historicalEntries)),(0,p.isSet)(e.bondDenom)&&(t.bondDenom=String(e.bondDenom)),(0,p.isSet)(e.minCommissionRate)&&(t.minCommissionRate=String(e.minCommissionRate)),t},toJSON(e){let t={};return void 0!==e.unbondingTime&&(t.unbondingTime=e.unbondingTime?l.Duration.toJSON(e.unbondingTime):void 0),void 0!==e.maxValidators&&(t.maxValidators=Math.round(e.maxValidators)),void 0!==e.maxEntries&&(t.maxEntries=Math.round(e.maxEntries)),void 0!==e.historicalEntries&&(t.historicalEntries=Math.round(e.historicalEntries)),void 0!==e.bondDenom&&(t.bondDenom=e.bondDenom),void 0!==e.minCommissionRate&&(t.minCommissionRate=e.minCommissionRate),t},fromPartial(e){var t,r,n,i,o;let a=x();return void 0!==e.unbondingTime&&null!==e.unbondingTime&&(a.unbondingTime=l.Duration.fromPartial(e.unbondingTime)),a.maxValidators=null!==(t=e.maxValidators)&&void 0!==t?t:0,a.maxEntries=null!==(r=e.maxEntries)&&void 0!==r?r:0,a.historicalEntries=null!==(n=e.historicalEntries)&&void 0!==n?n:0,a.bondDenom=null!==(i=e.bondDenom)&&void 0!==i?i:"",a.minCommissionRate=null!==(o=e.minCommissionRate)&&void 0!==o?o:"",a}},t.DelegationResponse={typeUrl:"/cosmos.staking.v1beta1.DelegationResponse",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.BinaryWriter.create();return void 0!==e.delegation&&t.Delegation.encode(e.delegation,r.uint32(10).fork()).ldelim(),void 0!==e.balance&&u.Coin.encode(e.balance,r.uint32(18).fork()).ldelim(),r},decode(e,r){let n=e instanceof c.BinaryReader?e:new c.BinaryReader(e),i=void 0===r?n.len:n.pos+r,o=B();for(;n.pos>>3){case 1:o.delegation=t.Delegation.decode(n,n.uint32());break;case 2:o.balance=u.Coin.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){let r=B();return(0,p.isSet)(e.delegation)&&(r.delegation=t.Delegation.fromJSON(e.delegation)),(0,p.isSet)(e.balance)&&(r.balance=u.Coin.fromJSON(e.balance)),r},toJSON(e){let r={};return void 0!==e.delegation&&(r.delegation=e.delegation?t.Delegation.toJSON(e.delegation):void 0),void 0!==e.balance&&(r.balance=e.balance?u.Coin.toJSON(e.balance):void 0),r},fromPartial(e){let r=B();return void 0!==e.delegation&&null!==e.delegation&&(r.delegation=t.Delegation.fromPartial(e.delegation)),void 0!==e.balance&&null!==e.balance&&(r.balance=u.Coin.fromPartial(e.balance)),r}},t.RedelegationEntryResponse={typeUrl:"/cosmos.staking.v1beta1.RedelegationEntryResponse",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.BinaryWriter.create();return void 0!==e.redelegationEntry&&t.RedelegationEntry.encode(e.redelegationEntry,r.uint32(10).fork()).ldelim(),""!==e.balance&&r.uint32(34).string(e.balance),r},decode(e,r){let n=e instanceof c.BinaryReader?e:new c.BinaryReader(e),i=void 0===r?n.len:n.pos+r,o=C();for(;n.pos>>3){case 1:o.redelegationEntry=t.RedelegationEntry.decode(n,n.uint32());break;case 4:o.balance=n.string();break;default:n.skipType(7&e)}}return o},fromJSON(e){let r=C();return(0,p.isSet)(e.redelegationEntry)&&(r.redelegationEntry=t.RedelegationEntry.fromJSON(e.redelegationEntry)),(0,p.isSet)(e.balance)&&(r.balance=String(e.balance)),r},toJSON(e){let r={};return void 0!==e.redelegationEntry&&(r.redelegationEntry=e.redelegationEntry?t.RedelegationEntry.toJSON(e.redelegationEntry):void 0),void 0!==e.balance&&(r.balance=e.balance),r},fromPartial(e){var r;let n=C();return void 0!==e.redelegationEntry&&null!==e.redelegationEntry&&(n.redelegationEntry=t.RedelegationEntry.fromPartial(e.redelegationEntry)),n.balance=null!==(r=e.balance)&&void 0!==r?r:"",n}},t.RedelegationResponse={typeUrl:"/cosmos.staking.v1beta1.RedelegationResponse",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.BinaryWriter.create();for(let n of(void 0!==e.redelegation&&t.Redelegation.encode(e.redelegation,r.uint32(10).fork()).ldelim(),e.entries))t.RedelegationEntryResponse.encode(n,r.uint32(18).fork()).ldelim();return r},decode(e,r){let n=e instanceof c.BinaryReader?e:new c.BinaryReader(e),i=void 0===r?n.len:n.pos+r,o=M();for(;n.pos>>3){case 1:o.redelegation=t.Redelegation.decode(n,n.uint32());break;case 2:o.entries.push(t.RedelegationEntryResponse.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return o},fromJSON(e){let r=M();return(0,p.isSet)(e.redelegation)&&(r.redelegation=t.Redelegation.fromJSON(e.redelegation)),Array.isArray(null==e?void 0:e.entries)&&(r.entries=e.entries.map(e=>t.RedelegationEntryResponse.fromJSON(e))),r},toJSON(e){let r={};return void 0!==e.redelegation&&(r.redelegation=e.redelegation?t.Redelegation.toJSON(e.redelegation):void 0),e.entries?r.entries=e.entries.map(e=>e?t.RedelegationEntryResponse.toJSON(e):void 0):r.entries=[],r},fromPartial(e){var r;let n=M();return void 0!==e.redelegation&&null!==e.redelegation&&(n.redelegation=t.Redelegation.fromPartial(e.redelegation)),n.entries=(null===(r=e.entries)||void 0===r?void 0:r.map(e=>t.RedelegationEntryResponse.fromPartial(e)))||[],n}},t.Pool={typeUrl:"/cosmos.staking.v1beta1.Pool",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.BinaryWriter.create();return""!==e.notBondedTokens&&t.uint32(10).string(e.notBondedTokens),""!==e.bondedTokens&&t.uint32(18).string(e.bondedTokens),t},decode(e,t){let r=e instanceof c.BinaryReader?e:new c.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=D();for(;r.pos>>3){case 1:i.notBondedTokens=r.string();break;case 2:i.bondedTokens=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=D();return(0,p.isSet)(e.notBondedTokens)&&(t.notBondedTokens=String(e.notBondedTokens)),(0,p.isSet)(e.bondedTokens)&&(t.bondedTokens=String(e.bondedTokens)),t},toJSON(e){let t={};return void 0!==e.notBondedTokens&&(t.notBondedTokens=e.notBondedTokens),void 0!==e.bondedTokens&&(t.bondedTokens=e.bondedTokens),t},fromPartial(e){var t,r;let n=D();return n.notBondedTokens=null!==(t=e.notBondedTokens)&&void 0!==t?t:"",n.bondedTokens=null!==(r=e.bondedTokens)&&void 0!==r?r:"",n}},t.ValidatorUpdates={typeUrl:"/cosmos.staking.v1beta1.ValidatorUpdates",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.BinaryWriter.create();for(let r of e.updates)d.ValidatorUpdate.encode(r,t.uint32(10).fork()).ldelim();return t},decode(e,t){let r=e instanceof c.BinaryReader?e:new c.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=U();for(;r.pos>>3==1?i.updates.push(d.ValidatorUpdate.decode(r,r.uint32())):r.skipType(7&e)}return i},fromJSON(e){let t=U();return Array.isArray(null==e?void 0:e.updates)&&(t.updates=e.updates.map(e=>d.ValidatorUpdate.fromJSON(e))),t},toJSON(e){let t={};return e.updates?t.updates=e.updates.map(e=>e?d.ValidatorUpdate.toJSON(e):void 0):t.updates=[],t},fromPartial(e){var t;let r=U();return r.updates=(null===(t=e.updates)||void 0===t?void 0:t.map(e=>d.ValidatorUpdate.fromPartial(e)))||[],r}}},62884:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MsgClientImpl=t.MsgUpdateParamsResponse=t.MsgUpdateParams=t.MsgCancelUnbondingDelegationResponse=t.MsgCancelUnbondingDelegation=t.MsgUndelegateResponse=t.MsgUndelegate=t.MsgBeginRedelegateResponse=t.MsgBeginRedelegate=t.MsgDelegateResponse=t.MsgDelegate=t.MsgEditValidatorResponse=t.MsgEditValidator=t.MsgCreateValidatorResponse=t.MsgCreateValidator=t.protobufPackage=void 0;let n=r(20534),i=r(11879),o=r(14841),a=r(9990),s=r(46554),l=r(99133);function u(){return{description:n.Description.fromPartial({}),commission:n.CommissionRates.fromPartial({}),minSelfDelegation:"",delegatorAddress:"",validatorAddress:"",pubkey:void 0,value:o.Coin.fromPartial({})}}function d(){return{}}function c(){return{description:n.Description.fromPartial({}),validatorAddress:"",commissionRate:"",minSelfDelegation:""}}function p(){return{}}function f(){return{delegatorAddress:"",validatorAddress:"",amount:o.Coin.fromPartial({})}}function h(){return{}}function g(){return{delegatorAddress:"",validatorSrcAddress:"",validatorDstAddress:"",amount:o.Coin.fromPartial({})}}function m(){return{completionTime:a.Timestamp.fromPartial({})}}function y(){return{delegatorAddress:"",validatorAddress:"",amount:o.Coin.fromPartial({})}}function v(){return{completionTime:a.Timestamp.fromPartial({})}}function b(){return{delegatorAddress:"",validatorAddress:"",amount:o.Coin.fromPartial({}),creationHeight:BigInt(0)}}function S(){return{}}function w(){return{authority:"",params:n.Params.fromPartial({})}}function _(){return{}}t.protobufPackage="cosmos.staking.v1beta1",t.MsgCreateValidator={typeUrl:"/cosmos.staking.v1beta1.MsgCreateValidator",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return void 0!==e.description&&n.Description.encode(e.description,t.uint32(10).fork()).ldelim(),void 0!==e.commission&&n.CommissionRates.encode(e.commission,t.uint32(18).fork()).ldelim(),""!==e.minSelfDelegation&&t.uint32(26).string(e.minSelfDelegation),""!==e.delegatorAddress&&t.uint32(34).string(e.delegatorAddress),""!==e.validatorAddress&&t.uint32(42).string(e.validatorAddress),void 0!==e.pubkey&&i.Any.encode(e.pubkey,t.uint32(50).fork()).ldelim(),void 0!==e.value&&o.Coin.encode(e.value,t.uint32(58).fork()).ldelim(),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),a=void 0===t?r.len:r.pos+t,l=u();for(;r.pos>>3){case 1:l.description=n.Description.decode(r,r.uint32());break;case 2:l.commission=n.CommissionRates.decode(r,r.uint32());break;case 3:l.minSelfDelegation=r.string();break;case 4:l.delegatorAddress=r.string();break;case 5:l.validatorAddress=r.string();break;case 6:l.pubkey=i.Any.decode(r,r.uint32());break;case 7:l.value=o.Coin.decode(r,r.uint32());break;default:r.skipType(7&e)}}return l},fromJSON(e){let t=u();return(0,l.isSet)(e.description)&&(t.description=n.Description.fromJSON(e.description)),(0,l.isSet)(e.commission)&&(t.commission=n.CommissionRates.fromJSON(e.commission)),(0,l.isSet)(e.minSelfDelegation)&&(t.minSelfDelegation=String(e.minSelfDelegation)),(0,l.isSet)(e.delegatorAddress)&&(t.delegatorAddress=String(e.delegatorAddress)),(0,l.isSet)(e.validatorAddress)&&(t.validatorAddress=String(e.validatorAddress)),(0,l.isSet)(e.pubkey)&&(t.pubkey=i.Any.fromJSON(e.pubkey)),(0,l.isSet)(e.value)&&(t.value=o.Coin.fromJSON(e.value)),t},toJSON(e){let t={};return void 0!==e.description&&(t.description=e.description?n.Description.toJSON(e.description):void 0),void 0!==e.commission&&(t.commission=e.commission?n.CommissionRates.toJSON(e.commission):void 0),void 0!==e.minSelfDelegation&&(t.minSelfDelegation=e.minSelfDelegation),void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),void 0!==e.pubkey&&(t.pubkey=e.pubkey?i.Any.toJSON(e.pubkey):void 0),void 0!==e.value&&(t.value=e.value?o.Coin.toJSON(e.value):void 0),t},fromPartial(e){var t,r,a;let s=u();return void 0!==e.description&&null!==e.description&&(s.description=n.Description.fromPartial(e.description)),void 0!==e.commission&&null!==e.commission&&(s.commission=n.CommissionRates.fromPartial(e.commission)),s.minSelfDelegation=null!==(t=e.minSelfDelegation)&&void 0!==t?t:"",s.delegatorAddress=null!==(r=e.delegatorAddress)&&void 0!==r?r:"",s.validatorAddress=null!==(a=e.validatorAddress)&&void 0!==a?a:"",void 0!==e.pubkey&&null!==e.pubkey&&(s.pubkey=i.Any.fromPartial(e.pubkey)),void 0!==e.value&&null!==e.value&&(s.value=o.Coin.fromPartial(e.value)),s}},t.MsgCreateValidatorResponse={typeUrl:"/cosmos.staking.v1beta1.MsgCreateValidatorResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=d();for(;r.posd(),toJSON:e=>({}),fromPartial:e=>d()},t.MsgEditValidator={typeUrl:"/cosmos.staking.v1beta1.MsgEditValidator",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return void 0!==e.description&&n.Description.encode(e.description,t.uint32(10).fork()).ldelim(),""!==e.validatorAddress&&t.uint32(18).string(e.validatorAddress),""!==e.commissionRate&&t.uint32(26).string(e.commissionRate),""!==e.minSelfDelegation&&t.uint32(34).string(e.minSelfDelegation),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),i=void 0===t?r.len:r.pos+t,o=c();for(;r.pos>>3){case 1:o.description=n.Description.decode(r,r.uint32());break;case 2:o.validatorAddress=r.string();break;case 3:o.commissionRate=r.string();break;case 4:o.minSelfDelegation=r.string();break;default:r.skipType(7&e)}}return o},fromJSON(e){let t=c();return(0,l.isSet)(e.description)&&(t.description=n.Description.fromJSON(e.description)),(0,l.isSet)(e.validatorAddress)&&(t.validatorAddress=String(e.validatorAddress)),(0,l.isSet)(e.commissionRate)&&(t.commissionRate=String(e.commissionRate)),(0,l.isSet)(e.minSelfDelegation)&&(t.minSelfDelegation=String(e.minSelfDelegation)),t},toJSON(e){let t={};return void 0!==e.description&&(t.description=e.description?n.Description.toJSON(e.description):void 0),void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),void 0!==e.commissionRate&&(t.commissionRate=e.commissionRate),void 0!==e.minSelfDelegation&&(t.minSelfDelegation=e.minSelfDelegation),t},fromPartial(e){var t,r,i;let o=c();return void 0!==e.description&&null!==e.description&&(o.description=n.Description.fromPartial(e.description)),o.validatorAddress=null!==(t=e.validatorAddress)&&void 0!==t?t:"",o.commissionRate=null!==(r=e.commissionRate)&&void 0!==r?r:"",o.minSelfDelegation=null!==(i=e.minSelfDelegation)&&void 0!==i?i:"",o}},t.MsgEditValidatorResponse={typeUrl:"/cosmos.staking.v1beta1.MsgEditValidatorResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=p();for(;r.posp(),toJSON:e=>({}),fromPartial:e=>p()},t.MsgDelegate={typeUrl:"/cosmos.staking.v1beta1.MsgDelegate",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),""!==e.validatorAddress&&t.uint32(18).string(e.validatorAddress),void 0!==e.amount&&o.Coin.encode(e.amount,t.uint32(26).fork()).ldelim(),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=f();for(;r.pos>>3){case 1:i.delegatorAddress=r.string();break;case 2:i.validatorAddress=r.string();break;case 3:i.amount=o.Coin.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=f();return(0,l.isSet)(e.delegatorAddress)&&(t.delegatorAddress=String(e.delegatorAddress)),(0,l.isSet)(e.validatorAddress)&&(t.validatorAddress=String(e.validatorAddress)),(0,l.isSet)(e.amount)&&(t.amount=o.Coin.fromJSON(e.amount)),t},toJSON(e){let t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),void 0!==e.amount&&(t.amount=e.amount?o.Coin.toJSON(e.amount):void 0),t},fromPartial(e){var t,r;let n=f();return n.delegatorAddress=null!==(t=e.delegatorAddress)&&void 0!==t?t:"",n.validatorAddress=null!==(r=e.validatorAddress)&&void 0!==r?r:"",void 0!==e.amount&&null!==e.amount&&(n.amount=o.Coin.fromPartial(e.amount)),n}},t.MsgDelegateResponse={typeUrl:"/cosmos.staking.v1beta1.MsgDelegateResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=h();for(;r.posh(),toJSON:e=>({}),fromPartial:e=>h()},t.MsgBeginRedelegate={typeUrl:"/cosmos.staking.v1beta1.MsgBeginRedelegate",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),""!==e.validatorSrcAddress&&t.uint32(18).string(e.validatorSrcAddress),""!==e.validatorDstAddress&&t.uint32(26).string(e.validatorDstAddress),void 0!==e.amount&&o.Coin.encode(e.amount,t.uint32(34).fork()).ldelim(),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=g();for(;r.pos>>3){case 1:i.delegatorAddress=r.string();break;case 2:i.validatorSrcAddress=r.string();break;case 3:i.validatorDstAddress=r.string();break;case 4:i.amount=o.Coin.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=g();return(0,l.isSet)(e.delegatorAddress)&&(t.delegatorAddress=String(e.delegatorAddress)),(0,l.isSet)(e.validatorSrcAddress)&&(t.validatorSrcAddress=String(e.validatorSrcAddress)),(0,l.isSet)(e.validatorDstAddress)&&(t.validatorDstAddress=String(e.validatorDstAddress)),(0,l.isSet)(e.amount)&&(t.amount=o.Coin.fromJSON(e.amount)),t},toJSON(e){let t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.validatorSrcAddress&&(t.validatorSrcAddress=e.validatorSrcAddress),void 0!==e.validatorDstAddress&&(t.validatorDstAddress=e.validatorDstAddress),void 0!==e.amount&&(t.amount=e.amount?o.Coin.toJSON(e.amount):void 0),t},fromPartial(e){var t,r,n;let i=g();return i.delegatorAddress=null!==(t=e.delegatorAddress)&&void 0!==t?t:"",i.validatorSrcAddress=null!==(r=e.validatorSrcAddress)&&void 0!==r?r:"",i.validatorDstAddress=null!==(n=e.validatorDstAddress)&&void 0!==n?n:"",void 0!==e.amount&&null!==e.amount&&(i.amount=o.Coin.fromPartial(e.amount)),i}},t.MsgBeginRedelegateResponse={typeUrl:"/cosmos.staking.v1beta1.MsgBeginRedelegateResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return void 0!==e.completionTime&&a.Timestamp.encode(e.completionTime,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=m();for(;r.pos>>3==1?i.completionTime=a.Timestamp.decode(r,r.uint32()):r.skipType(7&e)}return i},fromJSON(e){let t=m();return(0,l.isSet)(e.completionTime)&&(t.completionTime=(0,l.fromJsonTimestamp)(e.completionTime)),t},toJSON(e){let t={};return void 0!==e.completionTime&&(t.completionTime=(0,l.fromTimestamp)(e.completionTime).toISOString()),t},fromPartial(e){let t=m();return void 0!==e.completionTime&&null!==e.completionTime&&(t.completionTime=a.Timestamp.fromPartial(e.completionTime)),t}},t.MsgUndelegate={typeUrl:"/cosmos.staking.v1beta1.MsgUndelegate",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),""!==e.validatorAddress&&t.uint32(18).string(e.validatorAddress),void 0!==e.amount&&o.Coin.encode(e.amount,t.uint32(26).fork()).ldelim(),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=y();for(;r.pos>>3){case 1:i.delegatorAddress=r.string();break;case 2:i.validatorAddress=r.string();break;case 3:i.amount=o.Coin.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=y();return(0,l.isSet)(e.delegatorAddress)&&(t.delegatorAddress=String(e.delegatorAddress)),(0,l.isSet)(e.validatorAddress)&&(t.validatorAddress=String(e.validatorAddress)),(0,l.isSet)(e.amount)&&(t.amount=o.Coin.fromJSON(e.amount)),t},toJSON(e){let t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),void 0!==e.amount&&(t.amount=e.amount?o.Coin.toJSON(e.amount):void 0),t},fromPartial(e){var t,r;let n=y();return n.delegatorAddress=null!==(t=e.delegatorAddress)&&void 0!==t?t:"",n.validatorAddress=null!==(r=e.validatorAddress)&&void 0!==r?r:"",void 0!==e.amount&&null!==e.amount&&(n.amount=o.Coin.fromPartial(e.amount)),n}},t.MsgUndelegateResponse={typeUrl:"/cosmos.staking.v1beta1.MsgUndelegateResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return void 0!==e.completionTime&&a.Timestamp.encode(e.completionTime,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=v();for(;r.pos>>3==1?i.completionTime=a.Timestamp.decode(r,r.uint32()):r.skipType(7&e)}return i},fromJSON(e){let t=v();return(0,l.isSet)(e.completionTime)&&(t.completionTime=(0,l.fromJsonTimestamp)(e.completionTime)),t},toJSON(e){let t={};return void 0!==e.completionTime&&(t.completionTime=(0,l.fromTimestamp)(e.completionTime).toISOString()),t},fromPartial(e){let t=v();return void 0!==e.completionTime&&null!==e.completionTime&&(t.completionTime=a.Timestamp.fromPartial(e.completionTime)),t}},t.MsgCancelUnbondingDelegation={typeUrl:"/cosmos.staking.v1beta1.MsgCancelUnbondingDelegation",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),""!==e.validatorAddress&&t.uint32(18).string(e.validatorAddress),void 0!==e.amount&&o.Coin.encode(e.amount,t.uint32(26).fork()).ldelim(),e.creationHeight!==BigInt(0)&&t.uint32(32).int64(e.creationHeight),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=b();for(;r.pos>>3){case 1:i.delegatorAddress=r.string();break;case 2:i.validatorAddress=r.string();break;case 3:i.amount=o.Coin.decode(r,r.uint32());break;case 4:i.creationHeight=r.int64();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=b();return(0,l.isSet)(e.delegatorAddress)&&(t.delegatorAddress=String(e.delegatorAddress)),(0,l.isSet)(e.validatorAddress)&&(t.validatorAddress=String(e.validatorAddress)),(0,l.isSet)(e.amount)&&(t.amount=o.Coin.fromJSON(e.amount)),(0,l.isSet)(e.creationHeight)&&(t.creationHeight=BigInt(e.creationHeight.toString())),t},toJSON(e){let t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),void 0!==e.amount&&(t.amount=e.amount?o.Coin.toJSON(e.amount):void 0),void 0!==e.creationHeight&&(t.creationHeight=(e.creationHeight||BigInt(0)).toString()),t},fromPartial(e){var t,r;let n=b();return n.delegatorAddress=null!==(t=e.delegatorAddress)&&void 0!==t?t:"",n.validatorAddress=null!==(r=e.validatorAddress)&&void 0!==r?r:"",void 0!==e.amount&&null!==e.amount&&(n.amount=o.Coin.fromPartial(e.amount)),void 0!==e.creationHeight&&null!==e.creationHeight&&(n.creationHeight=BigInt(e.creationHeight.toString())),n}},t.MsgCancelUnbondingDelegationResponse={typeUrl:"/cosmos.staking.v1beta1.MsgCancelUnbondingDelegationResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=S();for(;r.posS(),toJSON:e=>({}),fromPartial:e=>S()},t.MsgUpdateParams={typeUrl:"/cosmos.staking.v1beta1.MsgUpdateParams",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return""!==e.authority&&t.uint32(10).string(e.authority),void 0!==e.params&&n.Params.encode(e.params,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),i=void 0===t?r.len:r.pos+t,o=w();for(;r.pos>>3){case 1:o.authority=r.string();break;case 2:o.params=n.Params.decode(r,r.uint32());break;default:r.skipType(7&e)}}return o},fromJSON(e){let t=w();return(0,l.isSet)(e.authority)&&(t.authority=String(e.authority)),(0,l.isSet)(e.params)&&(t.params=n.Params.fromJSON(e.params)),t},toJSON(e){let t={};return void 0!==e.authority&&(t.authority=e.authority),void 0!==e.params&&(t.params=e.params?n.Params.toJSON(e.params):void 0),t},fromPartial(e){var t;let r=w();return r.authority=null!==(t=e.authority)&&void 0!==t?t:"",void 0!==e.params&&null!==e.params&&(r.params=n.Params.fromPartial(e.params)),r}},t.MsgUpdateParamsResponse={typeUrl:"/cosmos.staking.v1beta1.MsgUpdateParamsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=_();for(;r.pos_(),toJSON:e=>({}),fromPartial:e=>_()};class k{CreateValidator(e){let r=t.MsgCreateValidator.encode(e).finish();return this.rpc.request("cosmos.staking.v1beta1.Msg","CreateValidator",r).then(e=>t.MsgCreateValidatorResponse.decode(new s.BinaryReader(e)))}EditValidator(e){let r=t.MsgEditValidator.encode(e).finish();return this.rpc.request("cosmos.staking.v1beta1.Msg","EditValidator",r).then(e=>t.MsgEditValidatorResponse.decode(new s.BinaryReader(e)))}Delegate(e){let r=t.MsgDelegate.encode(e).finish();return this.rpc.request("cosmos.staking.v1beta1.Msg","Delegate",r).then(e=>t.MsgDelegateResponse.decode(new s.BinaryReader(e)))}BeginRedelegate(e){let r=t.MsgBeginRedelegate.encode(e).finish();return this.rpc.request("cosmos.staking.v1beta1.Msg","BeginRedelegate",r).then(e=>t.MsgBeginRedelegateResponse.decode(new s.BinaryReader(e)))}Undelegate(e){let r=t.MsgUndelegate.encode(e).finish();return this.rpc.request("cosmos.staking.v1beta1.Msg","Undelegate",r).then(e=>t.MsgUndelegateResponse.decode(new s.BinaryReader(e)))}CancelUnbondingDelegation(e){let r=t.MsgCancelUnbondingDelegation.encode(e).finish();return this.rpc.request("cosmos.staking.v1beta1.Msg","CancelUnbondingDelegation",r).then(e=>t.MsgCancelUnbondingDelegationResponse.decode(new s.BinaryReader(e)))}UpdateParams(e){let r=t.MsgUpdateParams.encode(e).finish();return this.rpc.request("cosmos.staking.v1beta1.Msg","UpdateParams",r).then(e=>t.MsgUpdateParamsResponse.decode(new s.BinaryReader(e)))}constructor(e){this.rpc=e,this.CreateValidator=this.CreateValidator.bind(this),this.EditValidator=this.EditValidator.bind(this),this.Delegate=this.Delegate.bind(this),this.BeginRedelegate=this.BeginRedelegate.bind(this),this.Undelegate=this.Undelegate.bind(this),this.CancelUnbondingDelegation=this.CancelUnbondingDelegation.bind(this),this.UpdateParams=this.UpdateParams.bind(this)}}t.MsgClientImpl=k},2264:function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.SignatureDescriptor_Data_Multi=t.SignatureDescriptor_Data_Single=t.SignatureDescriptor_Data=t.SignatureDescriptor=t.SignatureDescriptors=t.signModeToJSON=t.signModeFromJSON=t.SignMode=t.protobufPackage=void 0;let i=r(50263),o=r(11879),a=r(46554),s=r(99133);function l(e){switch(e){case 0:case"SIGN_MODE_UNSPECIFIED":return n.SIGN_MODE_UNSPECIFIED;case 1:case"SIGN_MODE_DIRECT":return n.SIGN_MODE_DIRECT;case 2:case"SIGN_MODE_TEXTUAL":return n.SIGN_MODE_TEXTUAL;case 3:case"SIGN_MODE_DIRECT_AUX":return n.SIGN_MODE_DIRECT_AUX;case 127:case"SIGN_MODE_LEGACY_AMINO_JSON":return n.SIGN_MODE_LEGACY_AMINO_JSON;case 191:case"SIGN_MODE_EIP_191":return n.SIGN_MODE_EIP_191;default:return n.UNRECOGNIZED}}function u(e){switch(e){case n.SIGN_MODE_UNSPECIFIED:return"SIGN_MODE_UNSPECIFIED";case n.SIGN_MODE_DIRECT:return"SIGN_MODE_DIRECT";case n.SIGN_MODE_TEXTUAL:return"SIGN_MODE_TEXTUAL";case n.SIGN_MODE_DIRECT_AUX:return"SIGN_MODE_DIRECT_AUX";case n.SIGN_MODE_LEGACY_AMINO_JSON:return"SIGN_MODE_LEGACY_AMINO_JSON";case n.SIGN_MODE_EIP_191:return"SIGN_MODE_EIP_191";case n.UNRECOGNIZED:default:return"UNRECOGNIZED"}}function d(){return{signatures:[]}}function c(){return{publicKey:void 0,data:void 0,sequence:BigInt(0)}}function p(){return{single:void 0,multi:void 0}}function f(){return{mode:0,signature:new Uint8Array}}function h(){return{bitarray:void 0,signatures:[]}}t.protobufPackage="cosmos.tx.signing.v1beta1",function(e){e[e.SIGN_MODE_UNSPECIFIED=0]="SIGN_MODE_UNSPECIFIED",e[e.SIGN_MODE_DIRECT=1]="SIGN_MODE_DIRECT",e[e.SIGN_MODE_TEXTUAL=2]="SIGN_MODE_TEXTUAL",e[e.SIGN_MODE_DIRECT_AUX=3]="SIGN_MODE_DIRECT_AUX",e[e.SIGN_MODE_LEGACY_AMINO_JSON=127]="SIGN_MODE_LEGACY_AMINO_JSON",e[e.SIGN_MODE_EIP_191=191]="SIGN_MODE_EIP_191",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(n||(t.SignMode=n={})),t.signModeFromJSON=l,t.signModeToJSON=u,t.SignatureDescriptors={typeUrl:"/cosmos.tx.signing.v1beta1.SignatureDescriptors",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();for(let n of e.signatures)t.SignatureDescriptor.encode(n,r.uint32(10).fork()).ldelim();return r},decode(e,r){let n=e instanceof a.BinaryReader?e:new a.BinaryReader(e),i=void 0===r?n.len:n.pos+r,o=d();for(;n.pos>>3==1?o.signatures.push(t.SignatureDescriptor.decode(n,n.uint32())):n.skipType(7&e)}return o},fromJSON(e){let r=d();return Array.isArray(null==e?void 0:e.signatures)&&(r.signatures=e.signatures.map(e=>t.SignatureDescriptor.fromJSON(e))),r},toJSON(e){let r={};return e.signatures?r.signatures=e.signatures.map(e=>e?t.SignatureDescriptor.toJSON(e):void 0):r.signatures=[],r},fromPartial(e){var r;let n=d();return n.signatures=(null===(r=e.signatures)||void 0===r?void 0:r.map(e=>t.SignatureDescriptor.fromPartial(e)))||[],n}},t.SignatureDescriptor={typeUrl:"/cosmos.tx.signing.v1beta1.SignatureDescriptor",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return void 0!==e.publicKey&&o.Any.encode(e.publicKey,r.uint32(10).fork()).ldelim(),void 0!==e.data&&t.SignatureDescriptor_Data.encode(e.data,r.uint32(18).fork()).ldelim(),e.sequence!==BigInt(0)&&r.uint32(24).uint64(e.sequence),r},decode(e,r){let n=e instanceof a.BinaryReader?e:new a.BinaryReader(e),i=void 0===r?n.len:n.pos+r,s=c();for(;n.pos>>3){case 1:s.publicKey=o.Any.decode(n,n.uint32());break;case 2:s.data=t.SignatureDescriptor_Data.decode(n,n.uint32());break;case 3:s.sequence=n.uint64();break;default:n.skipType(7&e)}}return s},fromJSON(e){let r=c();return(0,s.isSet)(e.publicKey)&&(r.publicKey=o.Any.fromJSON(e.publicKey)),(0,s.isSet)(e.data)&&(r.data=t.SignatureDescriptor_Data.fromJSON(e.data)),(0,s.isSet)(e.sequence)&&(r.sequence=BigInt(e.sequence.toString())),r},toJSON(e){let r={};return void 0!==e.publicKey&&(r.publicKey=e.publicKey?o.Any.toJSON(e.publicKey):void 0),void 0!==e.data&&(r.data=e.data?t.SignatureDescriptor_Data.toJSON(e.data):void 0),void 0!==e.sequence&&(r.sequence=(e.sequence||BigInt(0)).toString()),r},fromPartial(e){let r=c();return void 0!==e.publicKey&&null!==e.publicKey&&(r.publicKey=o.Any.fromPartial(e.publicKey)),void 0!==e.data&&null!==e.data&&(r.data=t.SignatureDescriptor_Data.fromPartial(e.data)),void 0!==e.sequence&&null!==e.sequence&&(r.sequence=BigInt(e.sequence.toString())),r}},t.SignatureDescriptor_Data={typeUrl:"/cosmos.tx.signing.v1beta1.Data",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return void 0!==e.single&&t.SignatureDescriptor_Data_Single.encode(e.single,r.uint32(10).fork()).ldelim(),void 0!==e.multi&&t.SignatureDescriptor_Data_Multi.encode(e.multi,r.uint32(18).fork()).ldelim(),r},decode(e,r){let n=e instanceof a.BinaryReader?e:new a.BinaryReader(e),i=void 0===r?n.len:n.pos+r,o=p();for(;n.pos>>3){case 1:o.single=t.SignatureDescriptor_Data_Single.decode(n,n.uint32());break;case 2:o.multi=t.SignatureDescriptor_Data_Multi.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){let r=p();return(0,s.isSet)(e.single)&&(r.single=t.SignatureDescriptor_Data_Single.fromJSON(e.single)),(0,s.isSet)(e.multi)&&(r.multi=t.SignatureDescriptor_Data_Multi.fromJSON(e.multi)),r},toJSON(e){let r={};return void 0!==e.single&&(r.single=e.single?t.SignatureDescriptor_Data_Single.toJSON(e.single):void 0),void 0!==e.multi&&(r.multi=e.multi?t.SignatureDescriptor_Data_Multi.toJSON(e.multi):void 0),r},fromPartial(e){let r=p();return void 0!==e.single&&null!==e.single&&(r.single=t.SignatureDescriptor_Data_Single.fromPartial(e.single)),void 0!==e.multi&&null!==e.multi&&(r.multi=t.SignatureDescriptor_Data_Multi.fromPartial(e.multi)),r}},t.SignatureDescriptor_Data_Single={typeUrl:"/cosmos.tx.signing.v1beta1.Single",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return 0!==e.mode&&t.uint32(8).int32(e.mode),0!==e.signature.length&&t.uint32(18).bytes(e.signature),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=f();for(;r.pos>>3){case 1:i.mode=r.int32();break;case 2:i.signature=r.bytes();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=f();return(0,s.isSet)(e.mode)&&(t.mode=l(e.mode)),(0,s.isSet)(e.signature)&&(t.signature=(0,s.bytesFromBase64)(e.signature)),t},toJSON(e){let t={};return void 0!==e.mode&&(t.mode=u(e.mode)),void 0!==e.signature&&(t.signature=(0,s.base64FromBytes)(void 0!==e.signature?e.signature:new Uint8Array)),t},fromPartial(e){var t,r;let n=f();return n.mode=null!==(t=e.mode)&&void 0!==t?t:0,n.signature=null!==(r=e.signature)&&void 0!==r?r:new Uint8Array,n}},t.SignatureDescriptor_Data_Multi={typeUrl:"/cosmos.tx.signing.v1beta1.Multi",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();for(let n of(void 0!==e.bitarray&&i.CompactBitArray.encode(e.bitarray,r.uint32(10).fork()).ldelim(),e.signatures))t.SignatureDescriptor_Data.encode(n,r.uint32(18).fork()).ldelim();return r},decode(e,r){let n=e instanceof a.BinaryReader?e:new a.BinaryReader(e),o=void 0===r?n.len:n.pos+r,s=h();for(;n.pos>>3){case 1:s.bitarray=i.CompactBitArray.decode(n,n.uint32());break;case 2:s.signatures.push(t.SignatureDescriptor_Data.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return s},fromJSON(e){let r=h();return(0,s.isSet)(e.bitarray)&&(r.bitarray=i.CompactBitArray.fromJSON(e.bitarray)),Array.isArray(null==e?void 0:e.signatures)&&(r.signatures=e.signatures.map(e=>t.SignatureDescriptor_Data.fromJSON(e))),r},toJSON(e){let r={};return void 0!==e.bitarray&&(r.bitarray=e.bitarray?i.CompactBitArray.toJSON(e.bitarray):void 0),e.signatures?r.signatures=e.signatures.map(e=>e?t.SignatureDescriptor_Data.toJSON(e):void 0):r.signatures=[],r},fromPartial(e){var r;let n=h();return void 0!==e.bitarray&&null!==e.bitarray&&(n.bitarray=i.CompactBitArray.fromPartial(e.bitarray)),n.signatures=(null===(r=e.signatures)||void 0===r?void 0:r.map(e=>t.SignatureDescriptor_Data.fromPartial(e)))||[],n}}},32468:function(e,t,r){"use strict";var n,i;Object.defineProperty(t,"__esModule",{value:!0}),t.ServiceClientImpl=t.TxDecodeAminoResponse=t.TxDecodeAminoRequest=t.TxEncodeAminoResponse=t.TxEncodeAminoRequest=t.TxEncodeResponse=t.TxEncodeRequest=t.TxDecodeResponse=t.TxDecodeRequest=t.GetBlockWithTxsResponse=t.GetBlockWithTxsRequest=t.GetTxResponse=t.GetTxRequest=t.SimulateResponse=t.SimulateRequest=t.BroadcastTxResponse=t.BroadcastTxRequest=t.GetTxsEventResponse=t.GetTxsEventRequest=t.broadcastModeToJSON=t.broadcastModeFromJSON=t.BroadcastMode=t.orderByToJSON=t.orderByFromJSON=t.OrderBy=t.protobufPackage=void 0;let o=r(26136),a=r(86141),s=r(94534),l=r(92585),u=r(81334),d=r(46554),c=r(99133);function p(e){switch(e){case 0:case"ORDER_BY_UNSPECIFIED":return n.ORDER_BY_UNSPECIFIED;case 1:case"ORDER_BY_ASC":return n.ORDER_BY_ASC;case 2:case"ORDER_BY_DESC":return n.ORDER_BY_DESC;default:return n.UNRECOGNIZED}}function f(e){switch(e){case n.ORDER_BY_UNSPECIFIED:return"ORDER_BY_UNSPECIFIED";case n.ORDER_BY_ASC:return"ORDER_BY_ASC";case n.ORDER_BY_DESC:return"ORDER_BY_DESC";case n.UNRECOGNIZED:default:return"UNRECOGNIZED"}}function h(e){switch(e){case 0:case"BROADCAST_MODE_UNSPECIFIED":return i.BROADCAST_MODE_UNSPECIFIED;case 1:case"BROADCAST_MODE_BLOCK":return i.BROADCAST_MODE_BLOCK;case 2:case"BROADCAST_MODE_SYNC":return i.BROADCAST_MODE_SYNC;case 3:case"BROADCAST_MODE_ASYNC":return i.BROADCAST_MODE_ASYNC;default:return i.UNRECOGNIZED}}function g(e){switch(e){case i.BROADCAST_MODE_UNSPECIFIED:return"BROADCAST_MODE_UNSPECIFIED";case i.BROADCAST_MODE_BLOCK:return"BROADCAST_MODE_BLOCK";case i.BROADCAST_MODE_SYNC:return"BROADCAST_MODE_SYNC";case i.BROADCAST_MODE_ASYNC:return"BROADCAST_MODE_ASYNC";case i.UNRECOGNIZED:default:return"UNRECOGNIZED"}}function m(){return{events:[],pagination:void 0,orderBy:0,page:BigInt(0),limit:BigInt(0)}}function y(){return{txs:[],txResponses:[],pagination:void 0,total:BigInt(0)}}function v(){return{txBytes:new Uint8Array,mode:0}}function b(){return{txResponse:void 0}}function S(){return{tx:void 0,txBytes:new Uint8Array}}function w(){return{gasInfo:void 0,result:void 0}}function _(){return{hash:""}}function k(){return{tx:void 0,txResponse:void 0}}function O(){return{height:BigInt(0),pagination:void 0}}function P(){return{txs:[],blockId:void 0,block:void 0,pagination:void 0}}function A(){return{txBytes:new Uint8Array}}function I(){return{tx:void 0}}function R(){return{tx:void 0}}function E(){return{txBytes:new Uint8Array}}function T(){return{aminoJson:""}}function N(){return{aminoBinary:new Uint8Array}}function x(){return{aminoBinary:new Uint8Array}}function B(){return{aminoJson:""}}t.protobufPackage="cosmos.tx.v1beta1",function(e){e[e.ORDER_BY_UNSPECIFIED=0]="ORDER_BY_UNSPECIFIED",e[e.ORDER_BY_ASC=1]="ORDER_BY_ASC",e[e.ORDER_BY_DESC=2]="ORDER_BY_DESC",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(n||(t.OrderBy=n={})),t.orderByFromJSON=p,t.orderByToJSON=f,function(e){e[e.BROADCAST_MODE_UNSPECIFIED=0]="BROADCAST_MODE_UNSPECIFIED",e[e.BROADCAST_MODE_BLOCK=1]="BROADCAST_MODE_BLOCK",e[e.BROADCAST_MODE_SYNC=2]="BROADCAST_MODE_SYNC",e[e.BROADCAST_MODE_ASYNC=3]="BROADCAST_MODE_ASYNC",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(i||(t.BroadcastMode=i={})),t.broadcastModeFromJSON=h,t.broadcastModeToJSON=g,t.GetTxsEventRequest={typeUrl:"/cosmos.tx.v1beta1.GetTxsEventRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.BinaryWriter.create();for(let r of e.events)t.uint32(10).string(r);return void 0!==e.pagination&&a.PageRequest.encode(e.pagination,t.uint32(18).fork()).ldelim(),0!==e.orderBy&&t.uint32(24).int32(e.orderBy),e.page!==BigInt(0)&&t.uint32(32).uint64(e.page),e.limit!==BigInt(0)&&t.uint32(40).uint64(e.limit),t},decode(e,t){let r=e instanceof d.BinaryReader?e:new d.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=m();for(;r.pos>>3){case 1:i.events.push(r.string());break;case 2:i.pagination=a.PageRequest.decode(r,r.uint32());break;case 3:i.orderBy=r.int32();break;case 4:i.page=r.uint64();break;case 5:i.limit=r.uint64();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=m();return Array.isArray(null==e?void 0:e.events)&&(t.events=e.events.map(e=>String(e))),(0,c.isSet)(e.pagination)&&(t.pagination=a.PageRequest.fromJSON(e.pagination)),(0,c.isSet)(e.orderBy)&&(t.orderBy=p(e.orderBy)),(0,c.isSet)(e.page)&&(t.page=BigInt(e.page.toString())),(0,c.isSet)(e.limit)&&(t.limit=BigInt(e.limit.toString())),t},toJSON(e){let t={};return e.events?t.events=e.events.map(e=>e):t.events=[],void 0!==e.pagination&&(t.pagination=e.pagination?a.PageRequest.toJSON(e.pagination):void 0),void 0!==e.orderBy&&(t.orderBy=f(e.orderBy)),void 0!==e.page&&(t.page=(e.page||BigInt(0)).toString()),void 0!==e.limit&&(t.limit=(e.limit||BigInt(0)).toString()),t},fromPartial(e){var t,r;let n=m();return n.events=(null===(t=e.events)||void 0===t?void 0:t.map(e=>e))||[],void 0!==e.pagination&&null!==e.pagination&&(n.pagination=a.PageRequest.fromPartial(e.pagination)),n.orderBy=null!==(r=e.orderBy)&&void 0!==r?r:0,void 0!==e.page&&null!==e.page&&(n.page=BigInt(e.page.toString())),void 0!==e.limit&&null!==e.limit&&(n.limit=BigInt(e.limit.toString())),n}},t.GetTxsEventResponse={typeUrl:"/cosmos.tx.v1beta1.GetTxsEventResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.BinaryWriter.create();for(let r of e.txs)o.Tx.encode(r,t.uint32(10).fork()).ldelim();for(let r of e.txResponses)s.TxResponse.encode(r,t.uint32(18).fork()).ldelim();return void 0!==e.pagination&&a.PageResponse.encode(e.pagination,t.uint32(26).fork()).ldelim(),e.total!==BigInt(0)&&t.uint32(32).uint64(e.total),t},decode(e,t){let r=e instanceof d.BinaryReader?e:new d.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=y();for(;r.pos>>3){case 1:i.txs.push(o.Tx.decode(r,r.uint32()));break;case 2:i.txResponses.push(s.TxResponse.decode(r,r.uint32()));break;case 3:i.pagination=a.PageResponse.decode(r,r.uint32());break;case 4:i.total=r.uint64();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=y();return Array.isArray(null==e?void 0:e.txs)&&(t.txs=e.txs.map(e=>o.Tx.fromJSON(e))),Array.isArray(null==e?void 0:e.txResponses)&&(t.txResponses=e.txResponses.map(e=>s.TxResponse.fromJSON(e))),(0,c.isSet)(e.pagination)&&(t.pagination=a.PageResponse.fromJSON(e.pagination)),(0,c.isSet)(e.total)&&(t.total=BigInt(e.total.toString())),t},toJSON(e){let t={};return e.txs?t.txs=e.txs.map(e=>e?o.Tx.toJSON(e):void 0):t.txs=[],e.txResponses?t.txResponses=e.txResponses.map(e=>e?s.TxResponse.toJSON(e):void 0):t.txResponses=[],void 0!==e.pagination&&(t.pagination=e.pagination?a.PageResponse.toJSON(e.pagination):void 0),void 0!==e.total&&(t.total=(e.total||BigInt(0)).toString()),t},fromPartial(e){var t,r;let n=y();return n.txs=(null===(t=e.txs)||void 0===t?void 0:t.map(e=>o.Tx.fromPartial(e)))||[],n.txResponses=(null===(r=e.txResponses)||void 0===r?void 0:r.map(e=>s.TxResponse.fromPartial(e)))||[],void 0!==e.pagination&&null!==e.pagination&&(n.pagination=a.PageResponse.fromPartial(e.pagination)),void 0!==e.total&&null!==e.total&&(n.total=BigInt(e.total.toString())),n}},t.BroadcastTxRequest={typeUrl:"/cosmos.tx.v1beta1.BroadcastTxRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.BinaryWriter.create();return 0!==e.txBytes.length&&t.uint32(10).bytes(e.txBytes),0!==e.mode&&t.uint32(16).int32(e.mode),t},decode(e,t){let r=e instanceof d.BinaryReader?e:new d.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=v();for(;r.pos>>3){case 1:i.txBytes=r.bytes();break;case 2:i.mode=r.int32();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=v();return(0,c.isSet)(e.txBytes)&&(t.txBytes=(0,c.bytesFromBase64)(e.txBytes)),(0,c.isSet)(e.mode)&&(t.mode=h(e.mode)),t},toJSON(e){let t={};return void 0!==e.txBytes&&(t.txBytes=(0,c.base64FromBytes)(void 0!==e.txBytes?e.txBytes:new Uint8Array)),void 0!==e.mode&&(t.mode=g(e.mode)),t},fromPartial(e){var t,r;let n=v();return n.txBytes=null!==(t=e.txBytes)&&void 0!==t?t:new Uint8Array,n.mode=null!==(r=e.mode)&&void 0!==r?r:0,n}},t.BroadcastTxResponse={typeUrl:"/cosmos.tx.v1beta1.BroadcastTxResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.BinaryWriter.create();return void 0!==e.txResponse&&s.TxResponse.encode(e.txResponse,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof d.BinaryReader?e:new d.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=b();for(;r.pos>>3==1?i.txResponse=s.TxResponse.decode(r,r.uint32()):r.skipType(7&e)}return i},fromJSON(e){let t=b();return(0,c.isSet)(e.txResponse)&&(t.txResponse=s.TxResponse.fromJSON(e.txResponse)),t},toJSON(e){let t={};return void 0!==e.txResponse&&(t.txResponse=e.txResponse?s.TxResponse.toJSON(e.txResponse):void 0),t},fromPartial(e){let t=b();return void 0!==e.txResponse&&null!==e.txResponse&&(t.txResponse=s.TxResponse.fromPartial(e.txResponse)),t}},t.SimulateRequest={typeUrl:"/cosmos.tx.v1beta1.SimulateRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.BinaryWriter.create();return void 0!==e.tx&&o.Tx.encode(e.tx,t.uint32(10).fork()).ldelim(),0!==e.txBytes.length&&t.uint32(18).bytes(e.txBytes),t},decode(e,t){let r=e instanceof d.BinaryReader?e:new d.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=S();for(;r.pos>>3){case 1:i.tx=o.Tx.decode(r,r.uint32());break;case 2:i.txBytes=r.bytes();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=S();return(0,c.isSet)(e.tx)&&(t.tx=o.Tx.fromJSON(e.tx)),(0,c.isSet)(e.txBytes)&&(t.txBytes=(0,c.bytesFromBase64)(e.txBytes)),t},toJSON(e){let t={};return void 0!==e.tx&&(t.tx=e.tx?o.Tx.toJSON(e.tx):void 0),void 0!==e.txBytes&&(t.txBytes=(0,c.base64FromBytes)(void 0!==e.txBytes?e.txBytes:new Uint8Array)),t},fromPartial(e){var t;let r=S();return void 0!==e.tx&&null!==e.tx&&(r.tx=o.Tx.fromPartial(e.tx)),r.txBytes=null!==(t=e.txBytes)&&void 0!==t?t:new Uint8Array,r}},t.SimulateResponse={typeUrl:"/cosmos.tx.v1beta1.SimulateResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.BinaryWriter.create();return void 0!==e.gasInfo&&s.GasInfo.encode(e.gasInfo,t.uint32(10).fork()).ldelim(),void 0!==e.result&&s.Result.encode(e.result,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof d.BinaryReader?e:new d.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=w();for(;r.pos>>3){case 1:i.gasInfo=s.GasInfo.decode(r,r.uint32());break;case 2:i.result=s.Result.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=w();return(0,c.isSet)(e.gasInfo)&&(t.gasInfo=s.GasInfo.fromJSON(e.gasInfo)),(0,c.isSet)(e.result)&&(t.result=s.Result.fromJSON(e.result)),t},toJSON(e){let t={};return void 0!==e.gasInfo&&(t.gasInfo=e.gasInfo?s.GasInfo.toJSON(e.gasInfo):void 0),void 0!==e.result&&(t.result=e.result?s.Result.toJSON(e.result):void 0),t},fromPartial(e){let t=w();return void 0!==e.gasInfo&&null!==e.gasInfo&&(t.gasInfo=s.GasInfo.fromPartial(e.gasInfo)),void 0!==e.result&&null!==e.result&&(t.result=s.Result.fromPartial(e.result)),t}},t.GetTxRequest={typeUrl:"/cosmos.tx.v1beta1.GetTxRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.BinaryWriter.create();return""!==e.hash&&t.uint32(10).string(e.hash),t},decode(e,t){let r=e instanceof d.BinaryReader?e:new d.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=_();for(;r.pos>>3==1?i.hash=r.string():r.skipType(7&e)}return i},fromJSON(e){let t=_();return(0,c.isSet)(e.hash)&&(t.hash=String(e.hash)),t},toJSON(e){let t={};return void 0!==e.hash&&(t.hash=e.hash),t},fromPartial(e){var t;let r=_();return r.hash=null!==(t=e.hash)&&void 0!==t?t:"",r}},t.GetTxResponse={typeUrl:"/cosmos.tx.v1beta1.GetTxResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.BinaryWriter.create();return void 0!==e.tx&&o.Tx.encode(e.tx,t.uint32(10).fork()).ldelim(),void 0!==e.txResponse&&s.TxResponse.encode(e.txResponse,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof d.BinaryReader?e:new d.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=k();for(;r.pos>>3){case 1:i.tx=o.Tx.decode(r,r.uint32());break;case 2:i.txResponse=s.TxResponse.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=k();return(0,c.isSet)(e.tx)&&(t.tx=o.Tx.fromJSON(e.tx)),(0,c.isSet)(e.txResponse)&&(t.txResponse=s.TxResponse.fromJSON(e.txResponse)),t},toJSON(e){let t={};return void 0!==e.tx&&(t.tx=e.tx?o.Tx.toJSON(e.tx):void 0),void 0!==e.txResponse&&(t.txResponse=e.txResponse?s.TxResponse.toJSON(e.txResponse):void 0),t},fromPartial(e){let t=k();return void 0!==e.tx&&null!==e.tx&&(t.tx=o.Tx.fromPartial(e.tx)),void 0!==e.txResponse&&null!==e.txResponse&&(t.txResponse=s.TxResponse.fromPartial(e.txResponse)),t}},t.GetBlockWithTxsRequest={typeUrl:"/cosmos.tx.v1beta1.GetBlockWithTxsRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.BinaryWriter.create();return e.height!==BigInt(0)&&t.uint32(8).int64(e.height),void 0!==e.pagination&&a.PageRequest.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof d.BinaryReader?e:new d.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=O();for(;r.pos>>3){case 1:i.height=r.int64();break;case 2:i.pagination=a.PageRequest.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=O();return(0,c.isSet)(e.height)&&(t.height=BigInt(e.height.toString())),(0,c.isSet)(e.pagination)&&(t.pagination=a.PageRequest.fromJSON(e.pagination)),t},toJSON(e){let t={};return void 0!==e.height&&(t.height=(e.height||BigInt(0)).toString()),void 0!==e.pagination&&(t.pagination=e.pagination?a.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){let t=O();return void 0!==e.height&&null!==e.height&&(t.height=BigInt(e.height.toString())),void 0!==e.pagination&&null!==e.pagination&&(t.pagination=a.PageRequest.fromPartial(e.pagination)),t}},t.GetBlockWithTxsResponse={typeUrl:"/cosmos.tx.v1beta1.GetBlockWithTxsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.BinaryWriter.create();for(let r of e.txs)o.Tx.encode(r,t.uint32(10).fork()).ldelim();return void 0!==e.blockId&&l.BlockID.encode(e.blockId,t.uint32(18).fork()).ldelim(),void 0!==e.block&&u.Block.encode(e.block,t.uint32(26).fork()).ldelim(),void 0!==e.pagination&&a.PageResponse.encode(e.pagination,t.uint32(34).fork()).ldelim(),t},decode(e,t){let r=e instanceof d.BinaryReader?e:new d.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=P();for(;r.pos>>3){case 1:i.txs.push(o.Tx.decode(r,r.uint32()));break;case 2:i.blockId=l.BlockID.decode(r,r.uint32());break;case 3:i.block=u.Block.decode(r,r.uint32());break;case 4:i.pagination=a.PageResponse.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=P();return Array.isArray(null==e?void 0:e.txs)&&(t.txs=e.txs.map(e=>o.Tx.fromJSON(e))),(0,c.isSet)(e.blockId)&&(t.blockId=l.BlockID.fromJSON(e.blockId)),(0,c.isSet)(e.block)&&(t.block=u.Block.fromJSON(e.block)),(0,c.isSet)(e.pagination)&&(t.pagination=a.PageResponse.fromJSON(e.pagination)),t},toJSON(e){let t={};return e.txs?t.txs=e.txs.map(e=>e?o.Tx.toJSON(e):void 0):t.txs=[],void 0!==e.blockId&&(t.blockId=e.blockId?l.BlockID.toJSON(e.blockId):void 0),void 0!==e.block&&(t.block=e.block?u.Block.toJSON(e.block):void 0),void 0!==e.pagination&&(t.pagination=e.pagination?a.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=P();return r.txs=(null===(t=e.txs)||void 0===t?void 0:t.map(e=>o.Tx.fromPartial(e)))||[],void 0!==e.blockId&&null!==e.blockId&&(r.blockId=l.BlockID.fromPartial(e.blockId)),void 0!==e.block&&null!==e.block&&(r.block=u.Block.fromPartial(e.block)),void 0!==e.pagination&&null!==e.pagination&&(r.pagination=a.PageResponse.fromPartial(e.pagination)),r}},t.TxDecodeRequest={typeUrl:"/cosmos.tx.v1beta1.TxDecodeRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.BinaryWriter.create();return 0!==e.txBytes.length&&t.uint32(10).bytes(e.txBytes),t},decode(e,t){let r=e instanceof d.BinaryReader?e:new d.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=A();for(;r.pos>>3==1?i.txBytes=r.bytes():r.skipType(7&e)}return i},fromJSON(e){let t=A();return(0,c.isSet)(e.txBytes)&&(t.txBytes=(0,c.bytesFromBase64)(e.txBytes)),t},toJSON(e){let t={};return void 0!==e.txBytes&&(t.txBytes=(0,c.base64FromBytes)(void 0!==e.txBytes?e.txBytes:new Uint8Array)),t},fromPartial(e){var t;let r=A();return r.txBytes=null!==(t=e.txBytes)&&void 0!==t?t:new Uint8Array,r}},t.TxDecodeResponse={typeUrl:"/cosmos.tx.v1beta1.TxDecodeResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.BinaryWriter.create();return void 0!==e.tx&&o.Tx.encode(e.tx,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof d.BinaryReader?e:new d.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=I();for(;r.pos>>3==1?i.tx=o.Tx.decode(r,r.uint32()):r.skipType(7&e)}return i},fromJSON(e){let t=I();return(0,c.isSet)(e.tx)&&(t.tx=o.Tx.fromJSON(e.tx)),t},toJSON(e){let t={};return void 0!==e.tx&&(t.tx=e.tx?o.Tx.toJSON(e.tx):void 0),t},fromPartial(e){let t=I();return void 0!==e.tx&&null!==e.tx&&(t.tx=o.Tx.fromPartial(e.tx)),t}},t.TxEncodeRequest={typeUrl:"/cosmos.tx.v1beta1.TxEncodeRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.BinaryWriter.create();return void 0!==e.tx&&o.Tx.encode(e.tx,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof d.BinaryReader?e:new d.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=R();for(;r.pos>>3==1?i.tx=o.Tx.decode(r,r.uint32()):r.skipType(7&e)}return i},fromJSON(e){let t=R();return(0,c.isSet)(e.tx)&&(t.tx=o.Tx.fromJSON(e.tx)),t},toJSON(e){let t={};return void 0!==e.tx&&(t.tx=e.tx?o.Tx.toJSON(e.tx):void 0),t},fromPartial(e){let t=R();return void 0!==e.tx&&null!==e.tx&&(t.tx=o.Tx.fromPartial(e.tx)),t}},t.TxEncodeResponse={typeUrl:"/cosmos.tx.v1beta1.TxEncodeResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.BinaryWriter.create();return 0!==e.txBytes.length&&t.uint32(10).bytes(e.txBytes),t},decode(e,t){let r=e instanceof d.BinaryReader?e:new d.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=E();for(;r.pos>>3==1?i.txBytes=r.bytes():r.skipType(7&e)}return i},fromJSON(e){let t=E();return(0,c.isSet)(e.txBytes)&&(t.txBytes=(0,c.bytesFromBase64)(e.txBytes)),t},toJSON(e){let t={};return void 0!==e.txBytes&&(t.txBytes=(0,c.base64FromBytes)(void 0!==e.txBytes?e.txBytes:new Uint8Array)),t},fromPartial(e){var t;let r=E();return r.txBytes=null!==(t=e.txBytes)&&void 0!==t?t:new Uint8Array,r}},t.TxEncodeAminoRequest={typeUrl:"/cosmos.tx.v1beta1.TxEncodeAminoRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.BinaryWriter.create();return""!==e.aminoJson&&t.uint32(10).string(e.aminoJson),t},decode(e,t){let r=e instanceof d.BinaryReader?e:new d.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=T();for(;r.pos>>3==1?i.aminoJson=r.string():r.skipType(7&e)}return i},fromJSON(e){let t=T();return(0,c.isSet)(e.aminoJson)&&(t.aminoJson=String(e.aminoJson)),t},toJSON(e){let t={};return void 0!==e.aminoJson&&(t.aminoJson=e.aminoJson),t},fromPartial(e){var t;let r=T();return r.aminoJson=null!==(t=e.aminoJson)&&void 0!==t?t:"",r}},t.TxEncodeAminoResponse={typeUrl:"/cosmos.tx.v1beta1.TxEncodeAminoResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.BinaryWriter.create();return 0!==e.aminoBinary.length&&t.uint32(10).bytes(e.aminoBinary),t},decode(e,t){let r=e instanceof d.BinaryReader?e:new d.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=N();for(;r.pos>>3==1?i.aminoBinary=r.bytes():r.skipType(7&e)}return i},fromJSON(e){let t=N();return(0,c.isSet)(e.aminoBinary)&&(t.aminoBinary=(0,c.bytesFromBase64)(e.aminoBinary)),t},toJSON(e){let t={};return void 0!==e.aminoBinary&&(t.aminoBinary=(0,c.base64FromBytes)(void 0!==e.aminoBinary?e.aminoBinary:new Uint8Array)),t},fromPartial(e){var t;let r=N();return r.aminoBinary=null!==(t=e.aminoBinary)&&void 0!==t?t:new Uint8Array,r}},t.TxDecodeAminoRequest={typeUrl:"/cosmos.tx.v1beta1.TxDecodeAminoRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.BinaryWriter.create();return 0!==e.aminoBinary.length&&t.uint32(10).bytes(e.aminoBinary),t},decode(e,t){let r=e instanceof d.BinaryReader?e:new d.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=x();for(;r.pos>>3==1?i.aminoBinary=r.bytes():r.skipType(7&e)}return i},fromJSON(e){let t=x();return(0,c.isSet)(e.aminoBinary)&&(t.aminoBinary=(0,c.bytesFromBase64)(e.aminoBinary)),t},toJSON(e){let t={};return void 0!==e.aminoBinary&&(t.aminoBinary=(0,c.base64FromBytes)(void 0!==e.aminoBinary?e.aminoBinary:new Uint8Array)),t},fromPartial(e){var t;let r=x();return r.aminoBinary=null!==(t=e.aminoBinary)&&void 0!==t?t:new Uint8Array,r}},t.TxDecodeAminoResponse={typeUrl:"/cosmos.tx.v1beta1.TxDecodeAminoResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.BinaryWriter.create();return""!==e.aminoJson&&t.uint32(10).string(e.aminoJson),t},decode(e,t){let r=e instanceof d.BinaryReader?e:new d.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=B();for(;r.pos>>3==1?i.aminoJson=r.string():r.skipType(7&e)}return i},fromJSON(e){let t=B();return(0,c.isSet)(e.aminoJson)&&(t.aminoJson=String(e.aminoJson)),t},toJSON(e){let t={};return void 0!==e.aminoJson&&(t.aminoJson=e.aminoJson),t},fromPartial(e){var t;let r=B();return r.aminoJson=null!==(t=e.aminoJson)&&void 0!==t?t:"",r}};class C{Simulate(e){let r=t.SimulateRequest.encode(e).finish();return this.rpc.request("cosmos.tx.v1beta1.Service","Simulate",r).then(e=>t.SimulateResponse.decode(new d.BinaryReader(e)))}GetTx(e){let r=t.GetTxRequest.encode(e).finish();return this.rpc.request("cosmos.tx.v1beta1.Service","GetTx",r).then(e=>t.GetTxResponse.decode(new d.BinaryReader(e)))}BroadcastTx(e){let r=t.BroadcastTxRequest.encode(e).finish();return this.rpc.request("cosmos.tx.v1beta1.Service","BroadcastTx",r).then(e=>t.BroadcastTxResponse.decode(new d.BinaryReader(e)))}GetTxsEvent(e){let r=t.GetTxsEventRequest.encode(e).finish();return this.rpc.request("cosmos.tx.v1beta1.Service","GetTxsEvent",r).then(e=>t.GetTxsEventResponse.decode(new d.BinaryReader(e)))}GetBlockWithTxs(e){let r=t.GetBlockWithTxsRequest.encode(e).finish();return this.rpc.request("cosmos.tx.v1beta1.Service","GetBlockWithTxs",r).then(e=>t.GetBlockWithTxsResponse.decode(new d.BinaryReader(e)))}TxDecode(e){let r=t.TxDecodeRequest.encode(e).finish();return this.rpc.request("cosmos.tx.v1beta1.Service","TxDecode",r).then(e=>t.TxDecodeResponse.decode(new d.BinaryReader(e)))}TxEncode(e){let r=t.TxEncodeRequest.encode(e).finish();return this.rpc.request("cosmos.tx.v1beta1.Service","TxEncode",r).then(e=>t.TxEncodeResponse.decode(new d.BinaryReader(e)))}TxEncodeAmino(e){let r=t.TxEncodeAminoRequest.encode(e).finish();return this.rpc.request("cosmos.tx.v1beta1.Service","TxEncodeAmino",r).then(e=>t.TxEncodeAminoResponse.decode(new d.BinaryReader(e)))}TxDecodeAmino(e){let r=t.TxDecodeAminoRequest.encode(e).finish();return this.rpc.request("cosmos.tx.v1beta1.Service","TxDecodeAmino",r).then(e=>t.TxDecodeAminoResponse.decode(new d.BinaryReader(e)))}constructor(e){this.rpc=e,this.Simulate=this.Simulate.bind(this),this.GetTx=this.GetTx.bind(this),this.BroadcastTx=this.BroadcastTx.bind(this),this.GetTxsEvent=this.GetTxsEvent.bind(this),this.GetBlockWithTxs=this.GetBlockWithTxs.bind(this),this.TxDecode=this.TxDecode.bind(this),this.TxEncode=this.TxEncode.bind(this),this.TxEncodeAmino=this.TxEncodeAmino.bind(this),this.TxDecodeAmino=this.TxDecodeAmino.bind(this)}}t.ServiceClientImpl=C},26136:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AuxSignerData=t.Tip=t.Fee=t.ModeInfo_Multi=t.ModeInfo_Single=t.ModeInfo=t.SignerInfo=t.AuthInfo=t.TxBody=t.SignDocDirectAux=t.SignDoc=t.TxRaw=t.Tx=t.protobufPackage=void 0;let n=r(11879),i=r(2264),o=r(50263),a=r(14841),s=r(46554),l=r(99133);function u(){return{body:void 0,authInfo:void 0,signatures:[]}}function d(){return{bodyBytes:new Uint8Array,authInfoBytes:new Uint8Array,signatures:[]}}function c(){return{bodyBytes:new Uint8Array,authInfoBytes:new Uint8Array,chainId:"",accountNumber:BigInt(0)}}function p(){return{bodyBytes:new Uint8Array,publicKey:void 0,chainId:"",accountNumber:BigInt(0),sequence:BigInt(0),tip:void 0}}function f(){return{messages:[],memo:"",timeoutHeight:BigInt(0),extensionOptions:[],nonCriticalExtensionOptions:[]}}function h(){return{signerInfos:[],fee:void 0,tip:void 0}}function g(){return{publicKey:void 0,modeInfo:void 0,sequence:BigInt(0)}}function m(){return{single:void 0,multi:void 0}}function y(){return{mode:0}}function v(){return{bitarray:void 0,modeInfos:[]}}function b(){return{amount:[],gasLimit:BigInt(0),payer:"",granter:""}}function S(){return{amount:[],tipper:""}}function w(){return{address:"",signDoc:void 0,mode:0,sig:new Uint8Array}}t.protobufPackage="cosmos.tx.v1beta1",t.Tx={typeUrl:"/cosmos.tx.v1beta1.Tx",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();for(let n of(void 0!==e.body&&t.TxBody.encode(e.body,r.uint32(10).fork()).ldelim(),void 0!==e.authInfo&&t.AuthInfo.encode(e.authInfo,r.uint32(18).fork()).ldelim(),e.signatures))r.uint32(26).bytes(n);return r},decode(e,r){let n=e instanceof s.BinaryReader?e:new s.BinaryReader(e),i=void 0===r?n.len:n.pos+r,o=u();for(;n.pos>>3){case 1:o.body=t.TxBody.decode(n,n.uint32());break;case 2:o.authInfo=t.AuthInfo.decode(n,n.uint32());break;case 3:o.signatures.push(n.bytes());break;default:n.skipType(7&e)}}return o},fromJSON(e){let r=u();return(0,l.isSet)(e.body)&&(r.body=t.TxBody.fromJSON(e.body)),(0,l.isSet)(e.authInfo)&&(r.authInfo=t.AuthInfo.fromJSON(e.authInfo)),Array.isArray(null==e?void 0:e.signatures)&&(r.signatures=e.signatures.map(e=>(0,l.bytesFromBase64)(e))),r},toJSON(e){let r={};return void 0!==e.body&&(r.body=e.body?t.TxBody.toJSON(e.body):void 0),void 0!==e.authInfo&&(r.authInfo=e.authInfo?t.AuthInfo.toJSON(e.authInfo):void 0),e.signatures?r.signatures=e.signatures.map(e=>(0,l.base64FromBytes)(void 0!==e?e:new Uint8Array)):r.signatures=[],r},fromPartial(e){var r;let n=u();return void 0!==e.body&&null!==e.body&&(n.body=t.TxBody.fromPartial(e.body)),void 0!==e.authInfo&&null!==e.authInfo&&(n.authInfo=t.AuthInfo.fromPartial(e.authInfo)),n.signatures=(null===(r=e.signatures)||void 0===r?void 0:r.map(e=>e))||[],n}},t.TxRaw={typeUrl:"/cosmos.tx.v1beta1.TxRaw",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();for(let r of(0!==e.bodyBytes.length&&t.uint32(10).bytes(e.bodyBytes),0!==e.authInfoBytes.length&&t.uint32(18).bytes(e.authInfoBytes),e.signatures))t.uint32(26).bytes(r);return t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=d();for(;r.pos>>3){case 1:i.bodyBytes=r.bytes();break;case 2:i.authInfoBytes=r.bytes();break;case 3:i.signatures.push(r.bytes());break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=d();return(0,l.isSet)(e.bodyBytes)&&(t.bodyBytes=(0,l.bytesFromBase64)(e.bodyBytes)),(0,l.isSet)(e.authInfoBytes)&&(t.authInfoBytes=(0,l.bytesFromBase64)(e.authInfoBytes)),Array.isArray(null==e?void 0:e.signatures)&&(t.signatures=e.signatures.map(e=>(0,l.bytesFromBase64)(e))),t},toJSON(e){let t={};return void 0!==e.bodyBytes&&(t.bodyBytes=(0,l.base64FromBytes)(void 0!==e.bodyBytes?e.bodyBytes:new Uint8Array)),void 0!==e.authInfoBytes&&(t.authInfoBytes=(0,l.base64FromBytes)(void 0!==e.authInfoBytes?e.authInfoBytes:new Uint8Array)),e.signatures?t.signatures=e.signatures.map(e=>(0,l.base64FromBytes)(void 0!==e?e:new Uint8Array)):t.signatures=[],t},fromPartial(e){var t,r,n;let i=d();return i.bodyBytes=null!==(r=e.bodyBytes)&&void 0!==r?r:new Uint8Array,i.authInfoBytes=null!==(n=e.authInfoBytes)&&void 0!==n?n:new Uint8Array,i.signatures=(null===(t=e.signatures)||void 0===t?void 0:t.map(e=>e))||[],i}},t.SignDoc={typeUrl:"/cosmos.tx.v1beta1.SignDoc",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return 0!==e.bodyBytes.length&&t.uint32(10).bytes(e.bodyBytes),0!==e.authInfoBytes.length&&t.uint32(18).bytes(e.authInfoBytes),""!==e.chainId&&t.uint32(26).string(e.chainId),e.accountNumber!==BigInt(0)&&t.uint32(32).uint64(e.accountNumber),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=c();for(;r.pos>>3){case 1:i.bodyBytes=r.bytes();break;case 2:i.authInfoBytes=r.bytes();break;case 3:i.chainId=r.string();break;case 4:i.accountNumber=r.uint64();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=c();return(0,l.isSet)(e.bodyBytes)&&(t.bodyBytes=(0,l.bytesFromBase64)(e.bodyBytes)),(0,l.isSet)(e.authInfoBytes)&&(t.authInfoBytes=(0,l.bytesFromBase64)(e.authInfoBytes)),(0,l.isSet)(e.chainId)&&(t.chainId=String(e.chainId)),(0,l.isSet)(e.accountNumber)&&(t.accountNumber=BigInt(e.accountNumber.toString())),t},toJSON(e){let t={};return void 0!==e.bodyBytes&&(t.bodyBytes=(0,l.base64FromBytes)(void 0!==e.bodyBytes?e.bodyBytes:new Uint8Array)),void 0!==e.authInfoBytes&&(t.authInfoBytes=(0,l.base64FromBytes)(void 0!==e.authInfoBytes?e.authInfoBytes:new Uint8Array)),void 0!==e.chainId&&(t.chainId=e.chainId),void 0!==e.accountNumber&&(t.accountNumber=(e.accountNumber||BigInt(0)).toString()),t},fromPartial(e){var t,r,n;let i=c();return i.bodyBytes=null!==(t=e.bodyBytes)&&void 0!==t?t:new Uint8Array,i.authInfoBytes=null!==(r=e.authInfoBytes)&&void 0!==r?r:new Uint8Array,i.chainId=null!==(n=e.chainId)&&void 0!==n?n:"",void 0!==e.accountNumber&&null!==e.accountNumber&&(i.accountNumber=BigInt(e.accountNumber.toString())),i}},t.SignDocDirectAux={typeUrl:"/cosmos.tx.v1beta1.SignDocDirectAux",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return 0!==e.bodyBytes.length&&r.uint32(10).bytes(e.bodyBytes),void 0!==e.publicKey&&n.Any.encode(e.publicKey,r.uint32(18).fork()).ldelim(),""!==e.chainId&&r.uint32(26).string(e.chainId),e.accountNumber!==BigInt(0)&&r.uint32(32).uint64(e.accountNumber),e.sequence!==BigInt(0)&&r.uint32(40).uint64(e.sequence),void 0!==e.tip&&t.Tip.encode(e.tip,r.uint32(50).fork()).ldelim(),r},decode(e,r){let i=e instanceof s.BinaryReader?e:new s.BinaryReader(e),o=void 0===r?i.len:i.pos+r,a=p();for(;i.pos>>3){case 1:a.bodyBytes=i.bytes();break;case 2:a.publicKey=n.Any.decode(i,i.uint32());break;case 3:a.chainId=i.string();break;case 4:a.accountNumber=i.uint64();break;case 5:a.sequence=i.uint64();break;case 6:a.tip=t.Tip.decode(i,i.uint32());break;default:i.skipType(7&e)}}return a},fromJSON(e){let r=p();return(0,l.isSet)(e.bodyBytes)&&(r.bodyBytes=(0,l.bytesFromBase64)(e.bodyBytes)),(0,l.isSet)(e.publicKey)&&(r.publicKey=n.Any.fromJSON(e.publicKey)),(0,l.isSet)(e.chainId)&&(r.chainId=String(e.chainId)),(0,l.isSet)(e.accountNumber)&&(r.accountNumber=BigInt(e.accountNumber.toString())),(0,l.isSet)(e.sequence)&&(r.sequence=BigInt(e.sequence.toString())),(0,l.isSet)(e.tip)&&(r.tip=t.Tip.fromJSON(e.tip)),r},toJSON(e){let r={};return void 0!==e.bodyBytes&&(r.bodyBytes=(0,l.base64FromBytes)(void 0!==e.bodyBytes?e.bodyBytes:new Uint8Array)),void 0!==e.publicKey&&(r.publicKey=e.publicKey?n.Any.toJSON(e.publicKey):void 0),void 0!==e.chainId&&(r.chainId=e.chainId),void 0!==e.accountNumber&&(r.accountNumber=(e.accountNumber||BigInt(0)).toString()),void 0!==e.sequence&&(r.sequence=(e.sequence||BigInt(0)).toString()),void 0!==e.tip&&(r.tip=e.tip?t.Tip.toJSON(e.tip):void 0),r},fromPartial(e){var r,i;let o=p();return o.bodyBytes=null!==(r=e.bodyBytes)&&void 0!==r?r:new Uint8Array,void 0!==e.publicKey&&null!==e.publicKey&&(o.publicKey=n.Any.fromPartial(e.publicKey)),o.chainId=null!==(i=e.chainId)&&void 0!==i?i:"",void 0!==e.accountNumber&&null!==e.accountNumber&&(o.accountNumber=BigInt(e.accountNumber.toString())),void 0!==e.sequence&&null!==e.sequence&&(o.sequence=BigInt(e.sequence.toString())),void 0!==e.tip&&null!==e.tip&&(o.tip=t.Tip.fromPartial(e.tip)),o}},t.TxBody={typeUrl:"/cosmos.tx.v1beta1.TxBody",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();for(let r of e.messages)n.Any.encode(r,t.uint32(10).fork()).ldelim();for(let r of(""!==e.memo&&t.uint32(18).string(e.memo),e.timeoutHeight!==BigInt(0)&&t.uint32(24).uint64(e.timeoutHeight),e.extensionOptions))n.Any.encode(r,t.uint32(8186).fork()).ldelim();for(let r of e.nonCriticalExtensionOptions)n.Any.encode(r,t.uint32(16378).fork()).ldelim();return t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),i=void 0===t?r.len:r.pos+t,o=f();for(;r.pos>>3){case 1:o.messages.push(n.Any.decode(r,r.uint32()));break;case 2:o.memo=r.string();break;case 3:o.timeoutHeight=r.uint64();break;case 1023:o.extensionOptions.push(n.Any.decode(r,r.uint32()));break;case 2047:o.nonCriticalExtensionOptions.push(n.Any.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return o},fromJSON(e){let t=f();return Array.isArray(null==e?void 0:e.messages)&&(t.messages=e.messages.map(e=>n.Any.fromJSON(e))),(0,l.isSet)(e.memo)&&(t.memo=String(e.memo)),(0,l.isSet)(e.timeoutHeight)&&(t.timeoutHeight=BigInt(e.timeoutHeight.toString())),Array.isArray(null==e?void 0:e.extensionOptions)&&(t.extensionOptions=e.extensionOptions.map(e=>n.Any.fromJSON(e))),Array.isArray(null==e?void 0:e.nonCriticalExtensionOptions)&&(t.nonCriticalExtensionOptions=e.nonCriticalExtensionOptions.map(e=>n.Any.fromJSON(e))),t},toJSON(e){let t={};return e.messages?t.messages=e.messages.map(e=>e?n.Any.toJSON(e):void 0):t.messages=[],void 0!==e.memo&&(t.memo=e.memo),void 0!==e.timeoutHeight&&(t.timeoutHeight=(e.timeoutHeight||BigInt(0)).toString()),e.extensionOptions?t.extensionOptions=e.extensionOptions.map(e=>e?n.Any.toJSON(e):void 0):t.extensionOptions=[],e.nonCriticalExtensionOptions?t.nonCriticalExtensionOptions=e.nonCriticalExtensionOptions.map(e=>e?n.Any.toJSON(e):void 0):t.nonCriticalExtensionOptions=[],t},fromPartial(e){var t,r,i,o;let a=f();return a.messages=(null===(t=e.messages)||void 0===t?void 0:t.map(e=>n.Any.fromPartial(e)))||[],a.memo=null!==(o=e.memo)&&void 0!==o?o:"",void 0!==e.timeoutHeight&&null!==e.timeoutHeight&&(a.timeoutHeight=BigInt(e.timeoutHeight.toString())),a.extensionOptions=(null===(r=e.extensionOptions)||void 0===r?void 0:r.map(e=>n.Any.fromPartial(e)))||[],a.nonCriticalExtensionOptions=(null===(i=e.nonCriticalExtensionOptions)||void 0===i?void 0:i.map(e=>n.Any.fromPartial(e)))||[],a}},t.AuthInfo={typeUrl:"/cosmos.tx.v1beta1.AuthInfo",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();for(let n of e.signerInfos)t.SignerInfo.encode(n,r.uint32(10).fork()).ldelim();return void 0!==e.fee&&t.Fee.encode(e.fee,r.uint32(18).fork()).ldelim(),void 0!==e.tip&&t.Tip.encode(e.tip,r.uint32(26).fork()).ldelim(),r},decode(e,r){let n=e instanceof s.BinaryReader?e:new s.BinaryReader(e),i=void 0===r?n.len:n.pos+r,o=h();for(;n.pos>>3){case 1:o.signerInfos.push(t.SignerInfo.decode(n,n.uint32()));break;case 2:o.fee=t.Fee.decode(n,n.uint32());break;case 3:o.tip=t.Tip.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){let r=h();return Array.isArray(null==e?void 0:e.signerInfos)&&(r.signerInfos=e.signerInfos.map(e=>t.SignerInfo.fromJSON(e))),(0,l.isSet)(e.fee)&&(r.fee=t.Fee.fromJSON(e.fee)),(0,l.isSet)(e.tip)&&(r.tip=t.Tip.fromJSON(e.tip)),r},toJSON(e){let r={};return e.signerInfos?r.signerInfos=e.signerInfos.map(e=>e?t.SignerInfo.toJSON(e):void 0):r.signerInfos=[],void 0!==e.fee&&(r.fee=e.fee?t.Fee.toJSON(e.fee):void 0),void 0!==e.tip&&(r.tip=e.tip?t.Tip.toJSON(e.tip):void 0),r},fromPartial(e){var r;let n=h();return n.signerInfos=(null===(r=e.signerInfos)||void 0===r?void 0:r.map(e=>t.SignerInfo.fromPartial(e)))||[],void 0!==e.fee&&null!==e.fee&&(n.fee=t.Fee.fromPartial(e.fee)),void 0!==e.tip&&null!==e.tip&&(n.tip=t.Tip.fromPartial(e.tip)),n}},t.SignerInfo={typeUrl:"/cosmos.tx.v1beta1.SignerInfo",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return void 0!==e.publicKey&&n.Any.encode(e.publicKey,r.uint32(10).fork()).ldelim(),void 0!==e.modeInfo&&t.ModeInfo.encode(e.modeInfo,r.uint32(18).fork()).ldelim(),e.sequence!==BigInt(0)&&r.uint32(24).uint64(e.sequence),r},decode(e,r){let i=e instanceof s.BinaryReader?e:new s.BinaryReader(e),o=void 0===r?i.len:i.pos+r,a=g();for(;i.pos>>3){case 1:a.publicKey=n.Any.decode(i,i.uint32());break;case 2:a.modeInfo=t.ModeInfo.decode(i,i.uint32());break;case 3:a.sequence=i.uint64();break;default:i.skipType(7&e)}}return a},fromJSON(e){let r=g();return(0,l.isSet)(e.publicKey)&&(r.publicKey=n.Any.fromJSON(e.publicKey)),(0,l.isSet)(e.modeInfo)&&(r.modeInfo=t.ModeInfo.fromJSON(e.modeInfo)),(0,l.isSet)(e.sequence)&&(r.sequence=BigInt(e.sequence.toString())),r},toJSON(e){let r={};return void 0!==e.publicKey&&(r.publicKey=e.publicKey?n.Any.toJSON(e.publicKey):void 0),void 0!==e.modeInfo&&(r.modeInfo=e.modeInfo?t.ModeInfo.toJSON(e.modeInfo):void 0),void 0!==e.sequence&&(r.sequence=(e.sequence||BigInt(0)).toString()),r},fromPartial(e){let r=g();return void 0!==e.publicKey&&null!==e.publicKey&&(r.publicKey=n.Any.fromPartial(e.publicKey)),void 0!==e.modeInfo&&null!==e.modeInfo&&(r.modeInfo=t.ModeInfo.fromPartial(e.modeInfo)),void 0!==e.sequence&&null!==e.sequence&&(r.sequence=BigInt(e.sequence.toString())),r}},t.ModeInfo={typeUrl:"/cosmos.tx.v1beta1.ModeInfo",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return void 0!==e.single&&t.ModeInfo_Single.encode(e.single,r.uint32(10).fork()).ldelim(),void 0!==e.multi&&t.ModeInfo_Multi.encode(e.multi,r.uint32(18).fork()).ldelim(),r},decode(e,r){let n=e instanceof s.BinaryReader?e:new s.BinaryReader(e),i=void 0===r?n.len:n.pos+r,o=m();for(;n.pos>>3){case 1:o.single=t.ModeInfo_Single.decode(n,n.uint32());break;case 2:o.multi=t.ModeInfo_Multi.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){let r=m();return(0,l.isSet)(e.single)&&(r.single=t.ModeInfo_Single.fromJSON(e.single)),(0,l.isSet)(e.multi)&&(r.multi=t.ModeInfo_Multi.fromJSON(e.multi)),r},toJSON(e){let r={};return void 0!==e.single&&(r.single=e.single?t.ModeInfo_Single.toJSON(e.single):void 0),void 0!==e.multi&&(r.multi=e.multi?t.ModeInfo_Multi.toJSON(e.multi):void 0),r},fromPartial(e){let r=m();return void 0!==e.single&&null!==e.single&&(r.single=t.ModeInfo_Single.fromPartial(e.single)),void 0!==e.multi&&null!==e.multi&&(r.multi=t.ModeInfo_Multi.fromPartial(e.multi)),r}},t.ModeInfo_Single={typeUrl:"/cosmos.tx.v1beta1.Single",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return 0!==e.mode&&t.uint32(8).int32(e.mode),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=y();for(;r.pos>>3==1?i.mode=r.int32():r.skipType(7&e)}return i},fromJSON(e){let t=y();return(0,l.isSet)(e.mode)&&(t.mode=(0,i.signModeFromJSON)(e.mode)),t},toJSON(e){let t={};return void 0!==e.mode&&(t.mode=(0,i.signModeToJSON)(e.mode)),t},fromPartial(e){var t;let r=y();return r.mode=null!==(t=e.mode)&&void 0!==t?t:0,r}},t.ModeInfo_Multi={typeUrl:"/cosmos.tx.v1beta1.Multi",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();for(let n of(void 0!==e.bitarray&&o.CompactBitArray.encode(e.bitarray,r.uint32(10).fork()).ldelim(),e.modeInfos))t.ModeInfo.encode(n,r.uint32(18).fork()).ldelim();return r},decode(e,r){let n=e instanceof s.BinaryReader?e:new s.BinaryReader(e),i=void 0===r?n.len:n.pos+r,a=v();for(;n.pos>>3){case 1:a.bitarray=o.CompactBitArray.decode(n,n.uint32());break;case 2:a.modeInfos.push(t.ModeInfo.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return a},fromJSON(e){let r=v();return(0,l.isSet)(e.bitarray)&&(r.bitarray=o.CompactBitArray.fromJSON(e.bitarray)),Array.isArray(null==e?void 0:e.modeInfos)&&(r.modeInfos=e.modeInfos.map(e=>t.ModeInfo.fromJSON(e))),r},toJSON(e){let r={};return void 0!==e.bitarray&&(r.bitarray=e.bitarray?o.CompactBitArray.toJSON(e.bitarray):void 0),e.modeInfos?r.modeInfos=e.modeInfos.map(e=>e?t.ModeInfo.toJSON(e):void 0):r.modeInfos=[],r},fromPartial(e){var r;let n=v();return void 0!==e.bitarray&&null!==e.bitarray&&(n.bitarray=o.CompactBitArray.fromPartial(e.bitarray)),n.modeInfos=(null===(r=e.modeInfos)||void 0===r?void 0:r.map(e=>t.ModeInfo.fromPartial(e)))||[],n}},t.Fee={typeUrl:"/cosmos.tx.v1beta1.Fee",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();for(let r of e.amount)a.Coin.encode(r,t.uint32(10).fork()).ldelim();return e.gasLimit!==BigInt(0)&&t.uint32(16).uint64(e.gasLimit),""!==e.payer&&t.uint32(26).string(e.payer),""!==e.granter&&t.uint32(34).string(e.granter),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=b();for(;r.pos>>3){case 1:i.amount.push(a.Coin.decode(r,r.uint32()));break;case 2:i.gasLimit=r.uint64();break;case 3:i.payer=r.string();break;case 4:i.granter=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=b();return Array.isArray(null==e?void 0:e.amount)&&(t.amount=e.amount.map(e=>a.Coin.fromJSON(e))),(0,l.isSet)(e.gasLimit)&&(t.gasLimit=BigInt(e.gasLimit.toString())),(0,l.isSet)(e.payer)&&(t.payer=String(e.payer)),(0,l.isSet)(e.granter)&&(t.granter=String(e.granter)),t},toJSON(e){let t={};return e.amount?t.amount=e.amount.map(e=>e?a.Coin.toJSON(e):void 0):t.amount=[],void 0!==e.gasLimit&&(t.gasLimit=(e.gasLimit||BigInt(0)).toString()),void 0!==e.payer&&(t.payer=e.payer),void 0!==e.granter&&(t.granter=e.granter),t},fromPartial(e){var t,r,n;let i=b();return i.amount=(null===(t=e.amount)||void 0===t?void 0:t.map(e=>a.Coin.fromPartial(e)))||[],void 0!==e.gasLimit&&null!==e.gasLimit&&(i.gasLimit=BigInt(e.gasLimit.toString())),i.payer=null!==(r=e.payer)&&void 0!==r?r:"",i.granter=null!==(n=e.granter)&&void 0!==n?n:"",i}},t.Tip={typeUrl:"/cosmos.tx.v1beta1.Tip",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();for(let r of e.amount)a.Coin.encode(r,t.uint32(10).fork()).ldelim();return""!==e.tipper&&t.uint32(18).string(e.tipper),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=S();for(;r.pos>>3){case 1:i.amount.push(a.Coin.decode(r,r.uint32()));break;case 2:i.tipper=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=S();return Array.isArray(null==e?void 0:e.amount)&&(t.amount=e.amount.map(e=>a.Coin.fromJSON(e))),(0,l.isSet)(e.tipper)&&(t.tipper=String(e.tipper)),t},toJSON(e){let t={};return e.amount?t.amount=e.amount.map(e=>e?a.Coin.toJSON(e):void 0):t.amount=[],void 0!==e.tipper&&(t.tipper=e.tipper),t},fromPartial(e){var t,r;let n=S();return n.amount=(null===(t=e.amount)||void 0===t?void 0:t.map(e=>a.Coin.fromPartial(e)))||[],n.tipper=null!==(r=e.tipper)&&void 0!==r?r:"",n}},t.AuxSignerData={typeUrl:"/cosmos.tx.v1beta1.AuxSignerData",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return""!==e.address&&r.uint32(10).string(e.address),void 0!==e.signDoc&&t.SignDocDirectAux.encode(e.signDoc,r.uint32(18).fork()).ldelim(),0!==e.mode&&r.uint32(24).int32(e.mode),0!==e.sig.length&&r.uint32(34).bytes(e.sig),r},decode(e,r){let n=e instanceof s.BinaryReader?e:new s.BinaryReader(e),i=void 0===r?n.len:n.pos+r,o=w();for(;n.pos>>3){case 1:o.address=n.string();break;case 2:o.signDoc=t.SignDocDirectAux.decode(n,n.uint32());break;case 3:o.mode=n.int32();break;case 4:o.sig=n.bytes();break;default:n.skipType(7&e)}}return o},fromJSON(e){let r=w();return(0,l.isSet)(e.address)&&(r.address=String(e.address)),(0,l.isSet)(e.signDoc)&&(r.signDoc=t.SignDocDirectAux.fromJSON(e.signDoc)),(0,l.isSet)(e.mode)&&(r.mode=(0,i.signModeFromJSON)(e.mode)),(0,l.isSet)(e.sig)&&(r.sig=(0,l.bytesFromBase64)(e.sig)),r},toJSON(e){let r={};return void 0!==e.address&&(r.address=e.address),void 0!==e.signDoc&&(r.signDoc=e.signDoc?t.SignDocDirectAux.toJSON(e.signDoc):void 0),void 0!==e.mode&&(r.mode=(0,i.signModeToJSON)(e.mode)),void 0!==e.sig&&(r.sig=(0,l.base64FromBytes)(void 0!==e.sig?e.sig:new Uint8Array)),r},fromPartial(e){var r,n,i;let o=w();return o.address=null!==(r=e.address)&&void 0!==r?r:"",void 0!==e.signDoc&&null!==e.signDoc&&(o.signDoc=t.SignDocDirectAux.fromPartial(e.signDoc)),o.mode=null!==(n=e.mode)&&void 0!==n?n:0,o.sig=null!==(i=e.sig)&&void 0!==i?i:new Uint8Array,o}}},61819:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ModuleVersion=t.CancelSoftwareUpgradeProposal=t.SoftwareUpgradeProposal=t.Plan=t.protobufPackage=void 0;let n=r(9990),i=r(11879),o=r(46554),a=r(99133);function s(){return{name:"",time:n.Timestamp.fromPartial({}),height:BigInt(0),info:"",upgradedClientState:void 0}}function l(){return{title:"",description:"",plan:t.Plan.fromPartial({})}}function u(){return{title:"",description:""}}function d(){return{name:"",version:BigInt(0)}}t.protobufPackage="cosmos.upgrade.v1beta1",t.Plan={typeUrl:"/cosmos.upgrade.v1beta1.Plan",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.name&&t.uint32(10).string(e.name),void 0!==e.time&&n.Timestamp.encode(e.time,t.uint32(18).fork()).ldelim(),e.height!==BigInt(0)&&t.uint32(24).int64(e.height),""!==e.info&&t.uint32(34).string(e.info),void 0!==e.upgradedClientState&&i.Any.encode(e.upgradedClientState,t.uint32(42).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),a=void 0===t?r.len:r.pos+t,l=s();for(;r.pos>>3){case 1:l.name=r.string();break;case 2:l.time=n.Timestamp.decode(r,r.uint32());break;case 3:l.height=r.int64();break;case 4:l.info=r.string();break;case 5:l.upgradedClientState=i.Any.decode(r,r.uint32());break;default:r.skipType(7&e)}}return l},fromJSON(e){let t=s();return(0,a.isSet)(e.name)&&(t.name=String(e.name)),(0,a.isSet)(e.time)&&(t.time=(0,a.fromJsonTimestamp)(e.time)),(0,a.isSet)(e.height)&&(t.height=BigInt(e.height.toString())),(0,a.isSet)(e.info)&&(t.info=String(e.info)),(0,a.isSet)(e.upgradedClientState)&&(t.upgradedClientState=i.Any.fromJSON(e.upgradedClientState)),t},toJSON(e){let t={};return void 0!==e.name&&(t.name=e.name),void 0!==e.time&&(t.time=(0,a.fromTimestamp)(e.time).toISOString()),void 0!==e.height&&(t.height=(e.height||BigInt(0)).toString()),void 0!==e.info&&(t.info=e.info),void 0!==e.upgradedClientState&&(t.upgradedClientState=e.upgradedClientState?i.Any.toJSON(e.upgradedClientState):void 0),t},fromPartial(e){var t,r;let o=s();return o.name=null!==(t=e.name)&&void 0!==t?t:"",void 0!==e.time&&null!==e.time&&(o.time=n.Timestamp.fromPartial(e.time)),void 0!==e.height&&null!==e.height&&(o.height=BigInt(e.height.toString())),o.info=null!==(r=e.info)&&void 0!==r?r:"",void 0!==e.upgradedClientState&&null!==e.upgradedClientState&&(o.upgradedClientState=i.Any.fromPartial(e.upgradedClientState)),o}},t.SoftwareUpgradeProposal={typeUrl:"/cosmos.upgrade.v1beta1.SoftwareUpgradeProposal",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.title&&r.uint32(10).string(e.title),""!==e.description&&r.uint32(18).string(e.description),void 0!==e.plan&&t.Plan.encode(e.plan,r.uint32(26).fork()).ldelim(),r},decode(e,r){let n=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===r?n.len:n.pos+r,a=l();for(;n.pos>>3){case 1:a.title=n.string();break;case 2:a.description=n.string();break;case 3:a.plan=t.Plan.decode(n,n.uint32());break;default:n.skipType(7&e)}}return a},fromJSON(e){let r=l();return(0,a.isSet)(e.title)&&(r.title=String(e.title)),(0,a.isSet)(e.description)&&(r.description=String(e.description)),(0,a.isSet)(e.plan)&&(r.plan=t.Plan.fromJSON(e.plan)),r},toJSON(e){let r={};return void 0!==e.title&&(r.title=e.title),void 0!==e.description&&(r.description=e.description),void 0!==e.plan&&(r.plan=e.plan?t.Plan.toJSON(e.plan):void 0),r},fromPartial(e){var r,n;let i=l();return i.title=null!==(r=e.title)&&void 0!==r?r:"",i.description=null!==(n=e.description)&&void 0!==n?n:"",void 0!==e.plan&&null!==e.plan&&(i.plan=t.Plan.fromPartial(e.plan)),i}},t.CancelSoftwareUpgradeProposal={typeUrl:"/cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.title&&t.uint32(10).string(e.title),""!==e.description&&t.uint32(18).string(e.description),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=u();for(;r.pos>>3){case 1:i.title=r.string();break;case 2:i.description=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=u();return(0,a.isSet)(e.title)&&(t.title=String(e.title)),(0,a.isSet)(e.description)&&(t.description=String(e.description)),t},toJSON(e){let t={};return void 0!==e.title&&(t.title=e.title),void 0!==e.description&&(t.description=e.description),t},fromPartial(e){var t,r;let n=u();return n.title=null!==(t=e.title)&&void 0!==t?t:"",n.description=null!==(r=e.description)&&void 0!==r?r:"",n}},t.ModuleVersion={typeUrl:"/cosmos.upgrade.v1beta1.ModuleVersion",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.name&&t.uint32(10).string(e.name),e.version!==BigInt(0)&&t.uint32(16).uint64(e.version),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=d();for(;r.pos>>3){case 1:i.name=r.string();break;case 2:i.version=r.uint64();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=d();return(0,a.isSet)(e.name)&&(t.name=String(e.name)),(0,a.isSet)(e.version)&&(t.version=BigInt(e.version.toString())),t},toJSON(e){let t={};return void 0!==e.name&&(t.name=e.name),void 0!==e.version&&(t.version=(e.version||BigInt(0)).toString()),t},fromPartial(e){var t;let r=d();return r.name=null!==(t=e.name)&&void 0!==t?t:"",void 0!==e.version&&null!==e.version&&(r.version=BigInt(e.version.toString())),r}}},7633:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MsgClientImpl=t.MsgCreatePeriodicVestingAccountResponse=t.MsgCreatePeriodicVestingAccount=t.MsgCreatePermanentLockedAccountResponse=t.MsgCreatePermanentLockedAccount=t.MsgCreateVestingAccountResponse=t.MsgCreateVestingAccount=t.protobufPackage=void 0;let n=r(14841),i=r(18855),o=r(46554),a=r(99133);function s(){return{fromAddress:"",toAddress:"",amount:[],endTime:BigInt(0),delayed:!1}}function l(){return{}}function u(){return{fromAddress:"",toAddress:"",amount:[]}}function d(){return{}}function c(){return{fromAddress:"",toAddress:"",startTime:BigInt(0),vestingPeriods:[]}}function p(){return{}}t.protobufPackage="cosmos.vesting.v1beta1",t.MsgCreateVestingAccount={typeUrl:"/cosmos.vesting.v1beta1.MsgCreateVestingAccount",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of(""!==e.fromAddress&&t.uint32(10).string(e.fromAddress),""!==e.toAddress&&t.uint32(18).string(e.toAddress),e.amount))n.Coin.encode(r,t.uint32(26).fork()).ldelim();return e.endTime!==BigInt(0)&&t.uint32(32).int64(e.endTime),!0===e.delayed&&t.uint32(40).bool(e.delayed),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=s();for(;r.pos>>3){case 1:a.fromAddress=r.string();break;case 2:a.toAddress=r.string();break;case 3:a.amount.push(n.Coin.decode(r,r.uint32()));break;case 4:a.endTime=r.int64();break;case 5:a.delayed=r.bool();break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=s();return(0,a.isSet)(e.fromAddress)&&(t.fromAddress=String(e.fromAddress)),(0,a.isSet)(e.toAddress)&&(t.toAddress=String(e.toAddress)),Array.isArray(null==e?void 0:e.amount)&&(t.amount=e.amount.map(e=>n.Coin.fromJSON(e))),(0,a.isSet)(e.endTime)&&(t.endTime=BigInt(e.endTime.toString())),(0,a.isSet)(e.delayed)&&(t.delayed=!!e.delayed),t},toJSON(e){let t={};return void 0!==e.fromAddress&&(t.fromAddress=e.fromAddress),void 0!==e.toAddress&&(t.toAddress=e.toAddress),e.amount?t.amount=e.amount.map(e=>e?n.Coin.toJSON(e):void 0):t.amount=[],void 0!==e.endTime&&(t.endTime=(e.endTime||BigInt(0)).toString()),void 0!==e.delayed&&(t.delayed=e.delayed),t},fromPartial(e){var t,r,i,o;let a=s();return a.fromAddress=null!==(r=e.fromAddress)&&void 0!==r?r:"",a.toAddress=null!==(i=e.toAddress)&&void 0!==i?i:"",a.amount=(null===(t=e.amount)||void 0===t?void 0:t.map(e=>n.Coin.fromPartial(e)))||[],void 0!==e.endTime&&null!==e.endTime&&(a.endTime=BigInt(e.endTime.toString())),a.delayed=null!==(o=e.delayed)&&void 0!==o&&o,a}},t.MsgCreateVestingAccountResponse={typeUrl:"/cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=l();for(;r.posl(),toJSON:e=>({}),fromPartial:e=>l()},t.MsgCreatePermanentLockedAccount={typeUrl:"/cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of(""!==e.fromAddress&&t.uint32(10).string(e.fromAddress),""!==e.toAddress&&t.uint32(18).string(e.toAddress),e.amount))n.Coin.encode(r,t.uint32(26).fork()).ldelim();return t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=u();for(;r.pos>>3){case 1:a.fromAddress=r.string();break;case 2:a.toAddress=r.string();break;case 3:a.amount.push(n.Coin.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=u();return(0,a.isSet)(e.fromAddress)&&(t.fromAddress=String(e.fromAddress)),(0,a.isSet)(e.toAddress)&&(t.toAddress=String(e.toAddress)),Array.isArray(null==e?void 0:e.amount)&&(t.amount=e.amount.map(e=>n.Coin.fromJSON(e))),t},toJSON(e){let t={};return void 0!==e.fromAddress&&(t.fromAddress=e.fromAddress),void 0!==e.toAddress&&(t.toAddress=e.toAddress),e.amount?t.amount=e.amount.map(e=>e?n.Coin.toJSON(e):void 0):t.amount=[],t},fromPartial(e){var t,r,i;let o=u();return o.fromAddress=null!==(r=e.fromAddress)&&void 0!==r?r:"",o.toAddress=null!==(i=e.toAddress)&&void 0!==i?i:"",o.amount=(null===(t=e.amount)||void 0===t?void 0:t.map(e=>n.Coin.fromPartial(e)))||[],o}},t.MsgCreatePermanentLockedAccountResponse={typeUrl:"/cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccountResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=d();for(;r.posd(),toJSON:e=>({}),fromPartial:e=>d()},t.MsgCreatePeriodicVestingAccount={typeUrl:"/cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of(""!==e.fromAddress&&t.uint32(10).string(e.fromAddress),""!==e.toAddress&&t.uint32(18).string(e.toAddress),e.startTime!==BigInt(0)&&t.uint32(24).int64(e.startTime),e.vestingPeriods))i.Period.encode(r,t.uint32(34).fork()).ldelim();return t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,a=c();for(;r.pos>>3){case 1:a.fromAddress=r.string();break;case 2:a.toAddress=r.string();break;case 3:a.startTime=r.int64();break;case 4:a.vestingPeriods.push(i.Period.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=c();return(0,a.isSet)(e.fromAddress)&&(t.fromAddress=String(e.fromAddress)),(0,a.isSet)(e.toAddress)&&(t.toAddress=String(e.toAddress)),(0,a.isSet)(e.startTime)&&(t.startTime=BigInt(e.startTime.toString())),Array.isArray(null==e?void 0:e.vestingPeriods)&&(t.vestingPeriods=e.vestingPeriods.map(e=>i.Period.fromJSON(e))),t},toJSON(e){let t={};return void 0!==e.fromAddress&&(t.fromAddress=e.fromAddress),void 0!==e.toAddress&&(t.toAddress=e.toAddress),void 0!==e.startTime&&(t.startTime=(e.startTime||BigInt(0)).toString()),e.vestingPeriods?t.vestingPeriods=e.vestingPeriods.map(e=>e?i.Period.toJSON(e):void 0):t.vestingPeriods=[],t},fromPartial(e){var t,r,n;let o=c();return o.fromAddress=null!==(r=e.fromAddress)&&void 0!==r?r:"",o.toAddress=null!==(n=e.toAddress)&&void 0!==n?n:"",void 0!==e.startTime&&null!==e.startTime&&(o.startTime=BigInt(e.startTime.toString())),o.vestingPeriods=(null===(t=e.vestingPeriods)||void 0===t?void 0:t.map(e=>i.Period.fromPartial(e)))||[],o}},t.MsgCreatePeriodicVestingAccountResponse={typeUrl:"/cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccountResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=p();for(;r.posp(),toJSON:e=>({}),fromPartial:e=>p()};class f{CreateVestingAccount(e){let r=t.MsgCreateVestingAccount.encode(e).finish();return this.rpc.request("cosmos.vesting.v1beta1.Msg","CreateVestingAccount",r).then(e=>t.MsgCreateVestingAccountResponse.decode(new o.BinaryReader(e)))}CreatePermanentLockedAccount(e){let r=t.MsgCreatePermanentLockedAccount.encode(e).finish();return this.rpc.request("cosmos.vesting.v1beta1.Msg","CreatePermanentLockedAccount",r).then(e=>t.MsgCreatePermanentLockedAccountResponse.decode(new o.BinaryReader(e)))}CreatePeriodicVestingAccount(e){let r=t.MsgCreatePeriodicVestingAccount.encode(e).finish();return this.rpc.request("cosmos.vesting.v1beta1.Msg","CreatePeriodicVestingAccount",r).then(e=>t.MsgCreatePeriodicVestingAccountResponse.decode(new o.BinaryReader(e)))}constructor(e){this.rpc=e,this.CreateVestingAccount=this.CreateVestingAccount.bind(this),this.CreatePermanentLockedAccount=this.CreatePermanentLockedAccount.bind(this),this.CreatePeriodicVestingAccount=this.CreatePeriodicVestingAccount.bind(this)}}t.MsgClientImpl=f},18855:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PermanentLockedAccount=t.PeriodicVestingAccount=t.Period=t.DelayedVestingAccount=t.ContinuousVestingAccount=t.BaseVestingAccount=t.protobufPackage=void 0;let n=r(54910),i=r(14841),o=r(46554),a=r(99133);function s(){return{baseAccount:void 0,originalVesting:[],delegatedFree:[],delegatedVesting:[],endTime:BigInt(0)}}function l(){return{baseVestingAccount:void 0,startTime:BigInt(0)}}function u(){return{baseVestingAccount:void 0}}function d(){return{length:BigInt(0),amount:[]}}function c(){return{baseVestingAccount:void 0,startTime:BigInt(0),vestingPeriods:[]}}function p(){return{baseVestingAccount:void 0}}t.protobufPackage="cosmos.vesting.v1beta1",t.BaseVestingAccount={typeUrl:"/cosmos.vesting.v1beta1.BaseVestingAccount",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of(void 0!==e.baseAccount&&n.BaseAccount.encode(e.baseAccount,t.uint32(10).fork()).ldelim(),e.originalVesting))i.Coin.encode(r,t.uint32(18).fork()).ldelim();for(let r of e.delegatedFree)i.Coin.encode(r,t.uint32(26).fork()).ldelim();for(let r of e.delegatedVesting)i.Coin.encode(r,t.uint32(34).fork()).ldelim();return e.endTime!==BigInt(0)&&t.uint32(40).int64(e.endTime),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),a=void 0===t?r.len:r.pos+t,l=s();for(;r.pos>>3){case 1:l.baseAccount=n.BaseAccount.decode(r,r.uint32());break;case 2:l.originalVesting.push(i.Coin.decode(r,r.uint32()));break;case 3:l.delegatedFree.push(i.Coin.decode(r,r.uint32()));break;case 4:l.delegatedVesting.push(i.Coin.decode(r,r.uint32()));break;case 5:l.endTime=r.int64();break;default:r.skipType(7&e)}}return l},fromJSON(e){let t=s();return(0,a.isSet)(e.baseAccount)&&(t.baseAccount=n.BaseAccount.fromJSON(e.baseAccount)),Array.isArray(null==e?void 0:e.originalVesting)&&(t.originalVesting=e.originalVesting.map(e=>i.Coin.fromJSON(e))),Array.isArray(null==e?void 0:e.delegatedFree)&&(t.delegatedFree=e.delegatedFree.map(e=>i.Coin.fromJSON(e))),Array.isArray(null==e?void 0:e.delegatedVesting)&&(t.delegatedVesting=e.delegatedVesting.map(e=>i.Coin.fromJSON(e))),(0,a.isSet)(e.endTime)&&(t.endTime=BigInt(e.endTime.toString())),t},toJSON(e){let t={};return void 0!==e.baseAccount&&(t.baseAccount=e.baseAccount?n.BaseAccount.toJSON(e.baseAccount):void 0),e.originalVesting?t.originalVesting=e.originalVesting.map(e=>e?i.Coin.toJSON(e):void 0):t.originalVesting=[],e.delegatedFree?t.delegatedFree=e.delegatedFree.map(e=>e?i.Coin.toJSON(e):void 0):t.delegatedFree=[],e.delegatedVesting?t.delegatedVesting=e.delegatedVesting.map(e=>e?i.Coin.toJSON(e):void 0):t.delegatedVesting=[],void 0!==e.endTime&&(t.endTime=(e.endTime||BigInt(0)).toString()),t},fromPartial(e){var t,r,o;let a=s();return void 0!==e.baseAccount&&null!==e.baseAccount&&(a.baseAccount=n.BaseAccount.fromPartial(e.baseAccount)),a.originalVesting=(null===(t=e.originalVesting)||void 0===t?void 0:t.map(e=>i.Coin.fromPartial(e)))||[],a.delegatedFree=(null===(r=e.delegatedFree)||void 0===r?void 0:r.map(e=>i.Coin.fromPartial(e)))||[],a.delegatedVesting=(null===(o=e.delegatedVesting)||void 0===o?void 0:o.map(e=>i.Coin.fromPartial(e)))||[],void 0!==e.endTime&&null!==e.endTime&&(a.endTime=BigInt(e.endTime.toString())),a}},t.ContinuousVestingAccount={typeUrl:"/cosmos.vesting.v1beta1.ContinuousVestingAccount",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return void 0!==e.baseVestingAccount&&t.BaseVestingAccount.encode(e.baseVestingAccount,r.uint32(10).fork()).ldelim(),e.startTime!==BigInt(0)&&r.uint32(16).int64(e.startTime),r},decode(e,r){let n=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===r?n.len:n.pos+r,a=l();for(;n.pos>>3){case 1:a.baseVestingAccount=t.BaseVestingAccount.decode(n,n.uint32());break;case 2:a.startTime=n.int64();break;default:n.skipType(7&e)}}return a},fromJSON(e){let r=l();return(0,a.isSet)(e.baseVestingAccount)&&(r.baseVestingAccount=t.BaseVestingAccount.fromJSON(e.baseVestingAccount)),(0,a.isSet)(e.startTime)&&(r.startTime=BigInt(e.startTime.toString())),r},toJSON(e){let r={};return void 0!==e.baseVestingAccount&&(r.baseVestingAccount=e.baseVestingAccount?t.BaseVestingAccount.toJSON(e.baseVestingAccount):void 0),void 0!==e.startTime&&(r.startTime=(e.startTime||BigInt(0)).toString()),r},fromPartial(e){let r=l();return void 0!==e.baseVestingAccount&&null!==e.baseVestingAccount&&(r.baseVestingAccount=t.BaseVestingAccount.fromPartial(e.baseVestingAccount)),void 0!==e.startTime&&null!==e.startTime&&(r.startTime=BigInt(e.startTime.toString())),r}},t.DelayedVestingAccount={typeUrl:"/cosmos.vesting.v1beta1.DelayedVestingAccount",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return void 0!==e.baseVestingAccount&&t.BaseVestingAccount.encode(e.baseVestingAccount,r.uint32(10).fork()).ldelim(),r},decode(e,r){let n=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===r?n.len:n.pos+r,a=u();for(;n.pos>>3==1?a.baseVestingAccount=t.BaseVestingAccount.decode(n,n.uint32()):n.skipType(7&e)}return a},fromJSON(e){let r=u();return(0,a.isSet)(e.baseVestingAccount)&&(r.baseVestingAccount=t.BaseVestingAccount.fromJSON(e.baseVestingAccount)),r},toJSON(e){let r={};return void 0!==e.baseVestingAccount&&(r.baseVestingAccount=e.baseVestingAccount?t.BaseVestingAccount.toJSON(e.baseVestingAccount):void 0),r},fromPartial(e){let r=u();return void 0!==e.baseVestingAccount&&null!==e.baseVestingAccount&&(r.baseVestingAccount=t.BaseVestingAccount.fromPartial(e.baseVestingAccount)),r}},t.Period={typeUrl:"/cosmos.vesting.v1beta1.Period",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of(e.length!==BigInt(0)&&t.uint32(8).int64(e.length),e.amount))i.Coin.encode(r,t.uint32(18).fork()).ldelim();return t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,a=d();for(;r.pos>>3){case 1:a.length=r.int64();break;case 2:a.amount.push(i.Coin.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=d();return(0,a.isSet)(e.length)&&(t.length=BigInt(e.length.toString())),Array.isArray(null==e?void 0:e.amount)&&(t.amount=e.amount.map(e=>i.Coin.fromJSON(e))),t},toJSON(e){let t={};return void 0!==e.length&&(t.length=(e.length||BigInt(0)).toString()),e.amount?t.amount=e.amount.map(e=>e?i.Coin.toJSON(e):void 0):t.amount=[],t},fromPartial(e){var t;let r=d();return void 0!==e.length&&null!==e.length&&(r.length=BigInt(e.length.toString())),r.amount=(null===(t=e.amount)||void 0===t?void 0:t.map(e=>i.Coin.fromPartial(e)))||[],r}},t.PeriodicVestingAccount={typeUrl:"/cosmos.vesting.v1beta1.PeriodicVestingAccount",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let n of(void 0!==e.baseVestingAccount&&t.BaseVestingAccount.encode(e.baseVestingAccount,r.uint32(10).fork()).ldelim(),e.startTime!==BigInt(0)&&r.uint32(16).int64(e.startTime),e.vestingPeriods))t.Period.encode(n,r.uint32(26).fork()).ldelim();return r},decode(e,r){let n=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===r?n.len:n.pos+r,a=c();for(;n.pos>>3){case 1:a.baseVestingAccount=t.BaseVestingAccount.decode(n,n.uint32());break;case 2:a.startTime=n.int64();break;case 3:a.vestingPeriods.push(t.Period.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return a},fromJSON(e){let r=c();return(0,a.isSet)(e.baseVestingAccount)&&(r.baseVestingAccount=t.BaseVestingAccount.fromJSON(e.baseVestingAccount)),(0,a.isSet)(e.startTime)&&(r.startTime=BigInt(e.startTime.toString())),Array.isArray(null==e?void 0:e.vestingPeriods)&&(r.vestingPeriods=e.vestingPeriods.map(e=>t.Period.fromJSON(e))),r},toJSON(e){let r={};return void 0!==e.baseVestingAccount&&(r.baseVestingAccount=e.baseVestingAccount?t.BaseVestingAccount.toJSON(e.baseVestingAccount):void 0),void 0!==e.startTime&&(r.startTime=(e.startTime||BigInt(0)).toString()),e.vestingPeriods?r.vestingPeriods=e.vestingPeriods.map(e=>e?t.Period.toJSON(e):void 0):r.vestingPeriods=[],r},fromPartial(e){var r;let n=c();return void 0!==e.baseVestingAccount&&null!==e.baseVestingAccount&&(n.baseVestingAccount=t.BaseVestingAccount.fromPartial(e.baseVestingAccount)),void 0!==e.startTime&&null!==e.startTime&&(n.startTime=BigInt(e.startTime.toString())),n.vestingPeriods=(null===(r=e.vestingPeriods)||void 0===r?void 0:r.map(e=>t.Period.fromPartial(e)))||[],n}},t.PermanentLockedAccount={typeUrl:"/cosmos.vesting.v1beta1.PermanentLockedAccount",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return void 0!==e.baseVestingAccount&&t.BaseVestingAccount.encode(e.baseVestingAccount,r.uint32(10).fork()).ldelim(),r},decode(e,r){let n=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===r?n.len:n.pos+r,a=p();for(;n.pos>>3==1?a.baseVestingAccount=t.BaseVestingAccount.decode(n,n.uint32()):n.skipType(7&e)}return a},fromJSON(e){let r=p();return(0,a.isSet)(e.baseVestingAccount)&&(r.baseVestingAccount=t.BaseVestingAccount.fromJSON(e.baseVestingAccount)),r},toJSON(e){let r={};return void 0!==e.baseVestingAccount&&(r.baseVestingAccount=e.baseVestingAccount?t.BaseVestingAccount.toJSON(e.baseVestingAccount):void 0),r},fromPartial(e){let r=p();return void 0!==e.baseVestingAccount&&null!==e.baseVestingAccount&&(r.baseVestingAccount=t.BaseVestingAccount.fromPartial(e.baseVestingAccount)),r}}},81371:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QueryClientImpl=t.QueryContractsByCreatorResponse=t.QueryContractsByCreatorRequest=t.QueryParamsResponse=t.QueryParamsRequest=t.QueryPinnedCodesResponse=t.QueryPinnedCodesRequest=t.QueryCodesResponse=t.QueryCodesRequest=t.QueryCodeResponse=t.CodeInfoResponse=t.QueryCodeRequest=t.QuerySmartContractStateResponse=t.QuerySmartContractStateRequest=t.QueryRawContractStateResponse=t.QueryRawContractStateRequest=t.QueryAllContractStateResponse=t.QueryAllContractStateRequest=t.QueryContractsByCodeResponse=t.QueryContractsByCodeRequest=t.QueryContractHistoryResponse=t.QueryContractHistoryRequest=t.QueryContractInfoResponse=t.QueryContractInfoRequest=t.protobufPackage=void 0;let n=r(86141),i=r(20624),o=r(46554),a=r(99133);function s(){return{address:""}}function l(){return{address:"",contractInfo:i.ContractInfo.fromPartial({})}}function u(){return{address:"",pagination:void 0}}function d(){return{entries:[],pagination:void 0}}function c(){return{codeId:BigInt(0),pagination:void 0}}function p(){return{contracts:[],pagination:void 0}}function f(){return{address:"",pagination:void 0}}function h(){return{models:[],pagination:void 0}}function g(){return{address:"",queryData:new Uint8Array}}function m(){return{data:new Uint8Array}}function y(){return{address:"",queryData:new Uint8Array}}function v(){return{data:new Uint8Array}}function b(){return{codeId:BigInt(0)}}function S(){return{codeId:BigInt(0),creator:"",dataHash:new Uint8Array,instantiatePermission:i.AccessConfig.fromPartial({})}}function w(){return{codeInfo:void 0,data:new Uint8Array}}function _(){return{pagination:void 0}}function k(){return{codeInfos:[],pagination:void 0}}function O(){return{pagination:void 0}}function P(){return{codeIds:[],pagination:void 0}}function A(){return{}}function I(){return{params:i.Params.fromPartial({})}}function R(){return{creatorAddress:"",pagination:void 0}}function E(){return{contractAddresses:[],pagination:void 0}}t.protobufPackage="cosmwasm.wasm.v1",t.QueryContractInfoRequest={typeUrl:"/cosmwasm.wasm.v1.QueryContractInfoRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.address&&t.uint32(10).string(e.address),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=s();for(;r.pos>>3==1?i.address=r.string():r.skipType(7&e)}return i},fromJSON(e){let t=s();return(0,a.isSet)(e.address)&&(t.address=String(e.address)),t},toJSON(e){let t={};return void 0!==e.address&&(t.address=e.address),t},fromPartial(e){var t;let r=s();return r.address=null!==(t=e.address)&&void 0!==t?t:"",r}},t.QueryContractInfoResponse={typeUrl:"/cosmwasm.wasm.v1.QueryContractInfoResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.address&&t.uint32(10).string(e.address),void 0!==e.contractInfo&&i.ContractInfo.encode(e.contractInfo,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,a=l();for(;r.pos>>3){case 1:a.address=r.string();break;case 2:a.contractInfo=i.ContractInfo.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=l();return(0,a.isSet)(e.address)&&(t.address=String(e.address)),(0,a.isSet)(e.contractInfo)&&(t.contractInfo=i.ContractInfo.fromJSON(e.contractInfo)),t},toJSON(e){let t={};return void 0!==e.address&&(t.address=e.address),void 0!==e.contractInfo&&(t.contractInfo=e.contractInfo?i.ContractInfo.toJSON(e.contractInfo):void 0),t},fromPartial(e){var t;let r=l();return r.address=null!==(t=e.address)&&void 0!==t?t:"",void 0!==e.contractInfo&&null!==e.contractInfo&&(r.contractInfo=i.ContractInfo.fromPartial(e.contractInfo)),r}},t.QueryContractHistoryRequest={typeUrl:"/cosmwasm.wasm.v1.QueryContractHistoryRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.address&&t.uint32(10).string(e.address),void 0!==e.pagination&&n.PageRequest.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=u();for(;r.pos>>3){case 1:a.address=r.string();break;case 2:a.pagination=n.PageRequest.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=u();return(0,a.isSet)(e.address)&&(t.address=String(e.address)),(0,a.isSet)(e.pagination)&&(t.pagination=n.PageRequest.fromJSON(e.pagination)),t},toJSON(e){let t={};return void 0!==e.address&&(t.address=e.address),void 0!==e.pagination&&(t.pagination=e.pagination?n.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=u();return r.address=null!==(t=e.address)&&void 0!==t?t:"",void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageRequest.fromPartial(e.pagination)),r}},t.QueryContractHistoryResponse={typeUrl:"/cosmwasm.wasm.v1.QueryContractHistoryResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of e.entries)i.ContractCodeHistoryEntry.encode(r,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&n.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),a=void 0===t?r.len:r.pos+t,s=d();for(;r.pos>>3){case 1:s.entries.push(i.ContractCodeHistoryEntry.decode(r,r.uint32()));break;case 2:s.pagination=n.PageResponse.decode(r,r.uint32());break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=d();return Array.isArray(null==e?void 0:e.entries)&&(t.entries=e.entries.map(e=>i.ContractCodeHistoryEntry.fromJSON(e))),(0,a.isSet)(e.pagination)&&(t.pagination=n.PageResponse.fromJSON(e.pagination)),t},toJSON(e){let t={};return e.entries?t.entries=e.entries.map(e=>e?i.ContractCodeHistoryEntry.toJSON(e):void 0):t.entries=[],void 0!==e.pagination&&(t.pagination=e.pagination?n.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=d();return r.entries=(null===(t=e.entries)||void 0===t?void 0:t.map(e=>i.ContractCodeHistoryEntry.fromPartial(e)))||[],void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageResponse.fromPartial(e.pagination)),r}},t.QueryContractsByCodeRequest={typeUrl:"/cosmwasm.wasm.v1.QueryContractsByCodeRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return e.codeId!==BigInt(0)&&t.uint32(8).uint64(e.codeId),void 0!==e.pagination&&n.PageRequest.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=c();for(;r.pos>>3){case 1:a.codeId=r.uint64();break;case 2:a.pagination=n.PageRequest.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=c();return(0,a.isSet)(e.codeId)&&(t.codeId=BigInt(e.codeId.toString())),(0,a.isSet)(e.pagination)&&(t.pagination=n.PageRequest.fromJSON(e.pagination)),t},toJSON(e){let t={};return void 0!==e.codeId&&(t.codeId=(e.codeId||BigInt(0)).toString()),void 0!==e.pagination&&(t.pagination=e.pagination?n.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){let t=c();return void 0!==e.codeId&&null!==e.codeId&&(t.codeId=BigInt(e.codeId.toString())),void 0!==e.pagination&&null!==e.pagination&&(t.pagination=n.PageRequest.fromPartial(e.pagination)),t}},t.QueryContractsByCodeResponse={typeUrl:"/cosmwasm.wasm.v1.QueryContractsByCodeResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of e.contracts)t.uint32(10).string(r);return void 0!==e.pagination&&n.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=p();for(;r.pos>>3){case 1:a.contracts.push(r.string());break;case 2:a.pagination=n.PageResponse.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=p();return Array.isArray(null==e?void 0:e.contracts)&&(t.contracts=e.contracts.map(e=>String(e))),(0,a.isSet)(e.pagination)&&(t.pagination=n.PageResponse.fromJSON(e.pagination)),t},toJSON(e){let t={};return e.contracts?t.contracts=e.contracts.map(e=>e):t.contracts=[],void 0!==e.pagination&&(t.pagination=e.pagination?n.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=p();return r.contracts=(null===(t=e.contracts)||void 0===t?void 0:t.map(e=>e))||[],void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageResponse.fromPartial(e.pagination)),r}},t.QueryAllContractStateRequest={typeUrl:"/cosmwasm.wasm.v1.QueryAllContractStateRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.address&&t.uint32(10).string(e.address),void 0!==e.pagination&&n.PageRequest.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=f();for(;r.pos>>3){case 1:a.address=r.string();break;case 2:a.pagination=n.PageRequest.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=f();return(0,a.isSet)(e.address)&&(t.address=String(e.address)),(0,a.isSet)(e.pagination)&&(t.pagination=n.PageRequest.fromJSON(e.pagination)),t},toJSON(e){let t={};return void 0!==e.address&&(t.address=e.address),void 0!==e.pagination&&(t.pagination=e.pagination?n.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=f();return r.address=null!==(t=e.address)&&void 0!==t?t:"",void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageRequest.fromPartial(e.pagination)),r}},t.QueryAllContractStateResponse={typeUrl:"/cosmwasm.wasm.v1.QueryAllContractStateResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of e.models)i.Model.encode(r,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&n.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),a=void 0===t?r.len:r.pos+t,s=h();for(;r.pos>>3){case 1:s.models.push(i.Model.decode(r,r.uint32()));break;case 2:s.pagination=n.PageResponse.decode(r,r.uint32());break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=h();return Array.isArray(null==e?void 0:e.models)&&(t.models=e.models.map(e=>i.Model.fromJSON(e))),(0,a.isSet)(e.pagination)&&(t.pagination=n.PageResponse.fromJSON(e.pagination)),t},toJSON(e){let t={};return e.models?t.models=e.models.map(e=>e?i.Model.toJSON(e):void 0):t.models=[],void 0!==e.pagination&&(t.pagination=e.pagination?n.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=h();return r.models=(null===(t=e.models)||void 0===t?void 0:t.map(e=>i.Model.fromPartial(e)))||[],void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageResponse.fromPartial(e.pagination)),r}},t.QueryRawContractStateRequest={typeUrl:"/cosmwasm.wasm.v1.QueryRawContractStateRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.address&&t.uint32(10).string(e.address),0!==e.queryData.length&&t.uint32(18).bytes(e.queryData),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=g();for(;r.pos>>3){case 1:i.address=r.string();break;case 2:i.queryData=r.bytes();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=g();return(0,a.isSet)(e.address)&&(t.address=String(e.address)),(0,a.isSet)(e.queryData)&&(t.queryData=(0,a.bytesFromBase64)(e.queryData)),t},toJSON(e){let t={};return void 0!==e.address&&(t.address=e.address),void 0!==e.queryData&&(t.queryData=(0,a.base64FromBytes)(void 0!==e.queryData?e.queryData:new Uint8Array)),t},fromPartial(e){var t,r;let n=g();return n.address=null!==(t=e.address)&&void 0!==t?t:"",n.queryData=null!==(r=e.queryData)&&void 0!==r?r:new Uint8Array,n}},t.QueryRawContractStateResponse={typeUrl:"/cosmwasm.wasm.v1.QueryRawContractStateResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return 0!==e.data.length&&t.uint32(10).bytes(e.data),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=m();for(;r.pos>>3==1?i.data=r.bytes():r.skipType(7&e)}return i},fromJSON(e){let t=m();return(0,a.isSet)(e.data)&&(t.data=(0,a.bytesFromBase64)(e.data)),t},toJSON(e){let t={};return void 0!==e.data&&(t.data=(0,a.base64FromBytes)(void 0!==e.data?e.data:new Uint8Array)),t},fromPartial(e){var t;let r=m();return r.data=null!==(t=e.data)&&void 0!==t?t:new Uint8Array,r}},t.QuerySmartContractStateRequest={typeUrl:"/cosmwasm.wasm.v1.QuerySmartContractStateRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.address&&t.uint32(10).string(e.address),0!==e.queryData.length&&t.uint32(18).bytes(e.queryData),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=y();for(;r.pos>>3){case 1:i.address=r.string();break;case 2:i.queryData=r.bytes();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=y();return(0,a.isSet)(e.address)&&(t.address=String(e.address)),(0,a.isSet)(e.queryData)&&(t.queryData=(0,a.bytesFromBase64)(e.queryData)),t},toJSON(e){let t={};return void 0!==e.address&&(t.address=e.address),void 0!==e.queryData&&(t.queryData=(0,a.base64FromBytes)(void 0!==e.queryData?e.queryData:new Uint8Array)),t},fromPartial(e){var t,r;let n=y();return n.address=null!==(t=e.address)&&void 0!==t?t:"",n.queryData=null!==(r=e.queryData)&&void 0!==r?r:new Uint8Array,n}},t.QuerySmartContractStateResponse={typeUrl:"/cosmwasm.wasm.v1.QuerySmartContractStateResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return 0!==e.data.length&&t.uint32(10).bytes(e.data),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=v();for(;r.pos>>3==1?i.data=r.bytes():r.skipType(7&e)}return i},fromJSON(e){let t=v();return(0,a.isSet)(e.data)&&(t.data=(0,a.bytesFromBase64)(e.data)),t},toJSON(e){let t={};return void 0!==e.data&&(t.data=(0,a.base64FromBytes)(void 0!==e.data?e.data:new Uint8Array)),t},fromPartial(e){var t;let r=v();return r.data=null!==(t=e.data)&&void 0!==t?t:new Uint8Array,r}},t.QueryCodeRequest={typeUrl:"/cosmwasm.wasm.v1.QueryCodeRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return e.codeId!==BigInt(0)&&t.uint32(8).uint64(e.codeId),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=b();for(;r.pos>>3==1?i.codeId=r.uint64():r.skipType(7&e)}return i},fromJSON(e){let t=b();return(0,a.isSet)(e.codeId)&&(t.codeId=BigInt(e.codeId.toString())),t},toJSON(e){let t={};return void 0!==e.codeId&&(t.codeId=(e.codeId||BigInt(0)).toString()),t},fromPartial(e){let t=b();return void 0!==e.codeId&&null!==e.codeId&&(t.codeId=BigInt(e.codeId.toString())),t}},t.CodeInfoResponse={typeUrl:"/cosmwasm.wasm.v1.CodeInfoResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return e.codeId!==BigInt(0)&&t.uint32(8).uint64(e.codeId),""!==e.creator&&t.uint32(18).string(e.creator),0!==e.dataHash.length&&t.uint32(26).bytes(e.dataHash),void 0!==e.instantiatePermission&&i.AccessConfig.encode(e.instantiatePermission,t.uint32(50).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,a=S();for(;r.pos>>3){case 1:a.codeId=r.uint64();break;case 2:a.creator=r.string();break;case 3:a.dataHash=r.bytes();break;case 6:a.instantiatePermission=i.AccessConfig.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=S();return(0,a.isSet)(e.codeId)&&(t.codeId=BigInt(e.codeId.toString())),(0,a.isSet)(e.creator)&&(t.creator=String(e.creator)),(0,a.isSet)(e.dataHash)&&(t.dataHash=(0,a.bytesFromBase64)(e.dataHash)),(0,a.isSet)(e.instantiatePermission)&&(t.instantiatePermission=i.AccessConfig.fromJSON(e.instantiatePermission)),t},toJSON(e){let t={};return void 0!==e.codeId&&(t.codeId=(e.codeId||BigInt(0)).toString()),void 0!==e.creator&&(t.creator=e.creator),void 0!==e.dataHash&&(t.dataHash=(0,a.base64FromBytes)(void 0!==e.dataHash?e.dataHash:new Uint8Array)),void 0!==e.instantiatePermission&&(t.instantiatePermission=e.instantiatePermission?i.AccessConfig.toJSON(e.instantiatePermission):void 0),t},fromPartial(e){var t,r;let n=S();return void 0!==e.codeId&&null!==e.codeId&&(n.codeId=BigInt(e.codeId.toString())),n.creator=null!==(t=e.creator)&&void 0!==t?t:"",n.dataHash=null!==(r=e.dataHash)&&void 0!==r?r:new Uint8Array,void 0!==e.instantiatePermission&&null!==e.instantiatePermission&&(n.instantiatePermission=i.AccessConfig.fromPartial(e.instantiatePermission)),n}},t.QueryCodeResponse={typeUrl:"/cosmwasm.wasm.v1.QueryCodeResponse",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return void 0!==e.codeInfo&&t.CodeInfoResponse.encode(e.codeInfo,r.uint32(10).fork()).ldelim(),0!==e.data.length&&r.uint32(18).bytes(e.data),r},decode(e,r){let n=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===r?n.len:n.pos+r,a=w();for(;n.pos>>3){case 1:a.codeInfo=t.CodeInfoResponse.decode(n,n.uint32());break;case 2:a.data=n.bytes();break;default:n.skipType(7&e)}}return a},fromJSON(e){let r=w();return(0,a.isSet)(e.codeInfo)&&(r.codeInfo=t.CodeInfoResponse.fromJSON(e.codeInfo)),(0,a.isSet)(e.data)&&(r.data=(0,a.bytesFromBase64)(e.data)),r},toJSON(e){let r={};return void 0!==e.codeInfo&&(r.codeInfo=e.codeInfo?t.CodeInfoResponse.toJSON(e.codeInfo):void 0),void 0!==e.data&&(r.data=(0,a.base64FromBytes)(void 0!==e.data?e.data:new Uint8Array)),r},fromPartial(e){var r;let n=w();return void 0!==e.codeInfo&&null!==e.codeInfo&&(n.codeInfo=t.CodeInfoResponse.fromPartial(e.codeInfo)),n.data=null!==(r=e.data)&&void 0!==r?r:new Uint8Array,n}},t.QueryCodesRequest={typeUrl:"/cosmwasm.wasm.v1.QueryCodesRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return void 0!==e.pagination&&n.PageRequest.encode(e.pagination,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=_();for(;r.pos>>3==1?a.pagination=n.PageRequest.decode(r,r.uint32()):r.skipType(7&e)}return a},fromJSON(e){let t=_();return(0,a.isSet)(e.pagination)&&(t.pagination=n.PageRequest.fromJSON(e.pagination)),t},toJSON(e){let t={};return void 0!==e.pagination&&(t.pagination=e.pagination?n.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){let t=_();return void 0!==e.pagination&&null!==e.pagination&&(t.pagination=n.PageRequest.fromPartial(e.pagination)),t}},t.QueryCodesResponse={typeUrl:"/cosmwasm.wasm.v1.QueryCodesResponse",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let n of e.codeInfos)t.CodeInfoResponse.encode(n,r.uint32(10).fork()).ldelim();return void 0!==e.pagination&&n.PageResponse.encode(e.pagination,r.uint32(18).fork()).ldelim(),r},decode(e,r){let i=e instanceof o.BinaryReader?e:new o.BinaryReader(e),a=void 0===r?i.len:i.pos+r,s=k();for(;i.pos>>3){case 1:s.codeInfos.push(t.CodeInfoResponse.decode(i,i.uint32()));break;case 2:s.pagination=n.PageResponse.decode(i,i.uint32());break;default:i.skipType(7&e)}}return s},fromJSON(e){let r=k();return Array.isArray(null==e?void 0:e.codeInfos)&&(r.codeInfos=e.codeInfos.map(e=>t.CodeInfoResponse.fromJSON(e))),(0,a.isSet)(e.pagination)&&(r.pagination=n.PageResponse.fromJSON(e.pagination)),r},toJSON(e){let r={};return e.codeInfos?r.codeInfos=e.codeInfos.map(e=>e?t.CodeInfoResponse.toJSON(e):void 0):r.codeInfos=[],void 0!==e.pagination&&(r.pagination=e.pagination?n.PageResponse.toJSON(e.pagination):void 0),r},fromPartial(e){var r;let i=k();return i.codeInfos=(null===(r=e.codeInfos)||void 0===r?void 0:r.map(e=>t.CodeInfoResponse.fromPartial(e)))||[],void 0!==e.pagination&&null!==e.pagination&&(i.pagination=n.PageResponse.fromPartial(e.pagination)),i}},t.QueryPinnedCodesRequest={typeUrl:"/cosmwasm.wasm.v1.QueryPinnedCodesRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return void 0!==e.pagination&&n.PageRequest.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=O();for(;r.pos>>3==2?a.pagination=n.PageRequest.decode(r,r.uint32()):r.skipType(7&e)}return a},fromJSON(e){let t=O();return(0,a.isSet)(e.pagination)&&(t.pagination=n.PageRequest.fromJSON(e.pagination)),t},toJSON(e){let t={};return void 0!==e.pagination&&(t.pagination=e.pagination?n.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){let t=O();return void 0!==e.pagination&&null!==e.pagination&&(t.pagination=n.PageRequest.fromPartial(e.pagination)),t}},t.QueryPinnedCodesResponse={typeUrl:"/cosmwasm.wasm.v1.QueryPinnedCodesResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of(t.uint32(10).fork(),e.codeIds))t.uint64(r);return t.ldelim(),void 0!==e.pagination&&n.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=P();for(;r.pos>>3){case 1:if((7&e)==2){let e=r.uint32()+r.pos;for(;r.posBigInt(e.toString()))),(0,a.isSet)(e.pagination)&&(t.pagination=n.PageResponse.fromJSON(e.pagination)),t},toJSON(e){let t={};return e.codeIds?t.codeIds=e.codeIds.map(e=>(e||BigInt(0)).toString()):t.codeIds=[],void 0!==e.pagination&&(t.pagination=e.pagination?n.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=P();return r.codeIds=(null===(t=e.codeIds)||void 0===t?void 0:t.map(e=>BigInt(e.toString())))||[],void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageResponse.fromPartial(e.pagination)),r}},t.QueryParamsRequest={typeUrl:"/cosmwasm.wasm.v1.QueryParamsRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=A();for(;r.posA(),toJSON:e=>({}),fromPartial:e=>A()},t.QueryParamsResponse={typeUrl:"/cosmwasm.wasm.v1.QueryParamsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return void 0!==e.params&&i.Params.encode(e.params,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,a=I();for(;r.pos>>3==1?a.params=i.Params.decode(r,r.uint32()):r.skipType(7&e)}return a},fromJSON(e){let t=I();return(0,a.isSet)(e.params)&&(t.params=i.Params.fromJSON(e.params)),t},toJSON(e){let t={};return void 0!==e.params&&(t.params=e.params?i.Params.toJSON(e.params):void 0),t},fromPartial(e){let t=I();return void 0!==e.params&&null!==e.params&&(t.params=i.Params.fromPartial(e.params)),t}},t.QueryContractsByCreatorRequest={typeUrl:"/cosmwasm.wasm.v1.QueryContractsByCreatorRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.creatorAddress&&t.uint32(10).string(e.creatorAddress),void 0!==e.pagination&&n.PageRequest.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=R();for(;r.pos>>3){case 1:a.creatorAddress=r.string();break;case 2:a.pagination=n.PageRequest.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=R();return(0,a.isSet)(e.creatorAddress)&&(t.creatorAddress=String(e.creatorAddress)),(0,a.isSet)(e.pagination)&&(t.pagination=n.PageRequest.fromJSON(e.pagination)),t},toJSON(e){let t={};return void 0!==e.creatorAddress&&(t.creatorAddress=e.creatorAddress),void 0!==e.pagination&&(t.pagination=e.pagination?n.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=R();return r.creatorAddress=null!==(t=e.creatorAddress)&&void 0!==t?t:"",void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageRequest.fromPartial(e.pagination)),r}},t.QueryContractsByCreatorResponse={typeUrl:"/cosmwasm.wasm.v1.QueryContractsByCreatorResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of e.contractAddresses)t.uint32(10).string(r);return void 0!==e.pagination&&n.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=E();for(;r.pos>>3){case 1:a.contractAddresses.push(r.string());break;case 2:a.pagination=n.PageResponse.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=E();return Array.isArray(null==e?void 0:e.contractAddresses)&&(t.contractAddresses=e.contractAddresses.map(e=>String(e))),(0,a.isSet)(e.pagination)&&(t.pagination=n.PageResponse.fromJSON(e.pagination)),t},toJSON(e){let t={};return e.contractAddresses?t.contractAddresses=e.contractAddresses.map(e=>e):t.contractAddresses=[],void 0!==e.pagination&&(t.pagination=e.pagination?n.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=E();return r.contractAddresses=(null===(t=e.contractAddresses)||void 0===t?void 0:t.map(e=>e))||[],void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageResponse.fromPartial(e.pagination)),r}};class T{ContractInfo(e){let r=t.QueryContractInfoRequest.encode(e).finish();return this.rpc.request("cosmwasm.wasm.v1.Query","ContractInfo",r).then(e=>t.QueryContractInfoResponse.decode(new o.BinaryReader(e)))}ContractHistory(e){let r=t.QueryContractHistoryRequest.encode(e).finish();return this.rpc.request("cosmwasm.wasm.v1.Query","ContractHistory",r).then(e=>t.QueryContractHistoryResponse.decode(new o.BinaryReader(e)))}ContractsByCode(e){let r=t.QueryContractsByCodeRequest.encode(e).finish();return this.rpc.request("cosmwasm.wasm.v1.Query","ContractsByCode",r).then(e=>t.QueryContractsByCodeResponse.decode(new o.BinaryReader(e)))}AllContractState(e){let r=t.QueryAllContractStateRequest.encode(e).finish();return this.rpc.request("cosmwasm.wasm.v1.Query","AllContractState",r).then(e=>t.QueryAllContractStateResponse.decode(new o.BinaryReader(e)))}RawContractState(e){let r=t.QueryRawContractStateRequest.encode(e).finish();return this.rpc.request("cosmwasm.wasm.v1.Query","RawContractState",r).then(e=>t.QueryRawContractStateResponse.decode(new o.BinaryReader(e)))}SmartContractState(e){let r=t.QuerySmartContractStateRequest.encode(e).finish();return this.rpc.request("cosmwasm.wasm.v1.Query","SmartContractState",r).then(e=>t.QuerySmartContractStateResponse.decode(new o.BinaryReader(e)))}Code(e){let r=t.QueryCodeRequest.encode(e).finish();return this.rpc.request("cosmwasm.wasm.v1.Query","Code",r).then(e=>t.QueryCodeResponse.decode(new o.BinaryReader(e)))}Codes(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{pagination:n.PageRequest.fromPartial({})},r=t.QueryCodesRequest.encode(e).finish();return this.rpc.request("cosmwasm.wasm.v1.Query","Codes",r).then(e=>t.QueryCodesResponse.decode(new o.BinaryReader(e)))}PinnedCodes(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{pagination:n.PageRequest.fromPartial({})},r=t.QueryPinnedCodesRequest.encode(e).finish();return this.rpc.request("cosmwasm.wasm.v1.Query","PinnedCodes",r).then(e=>t.QueryPinnedCodesResponse.decode(new o.BinaryReader(e)))}Params(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.QueryParamsRequest.encode(e).finish();return this.rpc.request("cosmwasm.wasm.v1.Query","Params",r).then(e=>t.QueryParamsResponse.decode(new o.BinaryReader(e)))}ContractsByCreator(e){let r=t.QueryContractsByCreatorRequest.encode(e).finish();return this.rpc.request("cosmwasm.wasm.v1.Query","ContractsByCreator",r).then(e=>t.QueryContractsByCreatorResponse.decode(new o.BinaryReader(e)))}constructor(e){this.rpc=e,this.ContractInfo=this.ContractInfo.bind(this),this.ContractHistory=this.ContractHistory.bind(this),this.ContractsByCode=this.ContractsByCode.bind(this),this.AllContractState=this.AllContractState.bind(this),this.RawContractState=this.RawContractState.bind(this),this.SmartContractState=this.SmartContractState.bind(this),this.Code=this.Code.bind(this),this.Codes=this.Codes.bind(this),this.PinnedCodes=this.PinnedCodes.bind(this),this.Params=this.Params.bind(this),this.ContractsByCreator=this.ContractsByCreator.bind(this)}}t.QueryClientImpl=T},88242:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MsgClientImpl=t.MsgUpdateInstantiateConfigResponse=t.MsgUpdateInstantiateConfig=t.MsgClearAdminResponse=t.MsgClearAdmin=t.MsgUpdateAdminResponse=t.MsgUpdateAdmin=t.MsgMigrateContractResponse=t.MsgMigrateContract=t.MsgExecuteContractResponse=t.MsgExecuteContract=t.MsgInstantiateContract2Response=t.MsgInstantiateContractResponse=t.MsgInstantiateContract2=t.MsgInstantiateContract=t.MsgStoreCodeResponse=t.MsgStoreCode=t.protobufPackage=void 0;let n=r(20624),i=r(14841),o=r(46554),a=r(99133);function s(){return{sender:"",wasmByteCode:new Uint8Array,instantiatePermission:void 0}}function l(){return{codeId:BigInt(0),checksum:new Uint8Array}}function u(){return{sender:"",admin:"",codeId:BigInt(0),label:"",msg:new Uint8Array,funds:[]}}function d(){return{sender:"",admin:"",codeId:BigInt(0),label:"",msg:new Uint8Array,funds:[],salt:new Uint8Array,fixMsg:!1}}function c(){return{address:"",data:new Uint8Array}}function p(){return{address:"",data:new Uint8Array}}function f(){return{sender:"",contract:"",msg:new Uint8Array,funds:[]}}function h(){return{data:new Uint8Array}}function g(){return{sender:"",contract:"",codeId:BigInt(0),msg:new Uint8Array}}function m(){return{data:new Uint8Array}}function y(){return{sender:"",newAdmin:"",contract:""}}function v(){return{}}function b(){return{sender:"",contract:""}}function S(){return{}}function w(){return{sender:"",codeId:BigInt(0),newInstantiatePermission:void 0}}function _(){return{}}t.protobufPackage="cosmwasm.wasm.v1",t.MsgStoreCode={typeUrl:"/cosmwasm.wasm.v1.MsgStoreCode",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.sender&&t.uint32(10).string(e.sender),0!==e.wasmByteCode.length&&t.uint32(18).bytes(e.wasmByteCode),void 0!==e.instantiatePermission&&n.AccessConfig.encode(e.instantiatePermission,t.uint32(42).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=s();for(;r.pos>>3){case 1:a.sender=r.string();break;case 2:a.wasmByteCode=r.bytes();break;case 5:a.instantiatePermission=n.AccessConfig.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=s();return(0,a.isSet)(e.sender)&&(t.sender=String(e.sender)),(0,a.isSet)(e.wasmByteCode)&&(t.wasmByteCode=(0,a.bytesFromBase64)(e.wasmByteCode)),(0,a.isSet)(e.instantiatePermission)&&(t.instantiatePermission=n.AccessConfig.fromJSON(e.instantiatePermission)),t},toJSON(e){let t={};return void 0!==e.sender&&(t.sender=e.sender),void 0!==e.wasmByteCode&&(t.wasmByteCode=(0,a.base64FromBytes)(void 0!==e.wasmByteCode?e.wasmByteCode:new Uint8Array)),void 0!==e.instantiatePermission&&(t.instantiatePermission=e.instantiatePermission?n.AccessConfig.toJSON(e.instantiatePermission):void 0),t},fromPartial(e){var t,r;let i=s();return i.sender=null!==(t=e.sender)&&void 0!==t?t:"",i.wasmByteCode=null!==(r=e.wasmByteCode)&&void 0!==r?r:new Uint8Array,void 0!==e.instantiatePermission&&null!==e.instantiatePermission&&(i.instantiatePermission=n.AccessConfig.fromPartial(e.instantiatePermission)),i}},t.MsgStoreCodeResponse={typeUrl:"/cosmwasm.wasm.v1.MsgStoreCodeResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return e.codeId!==BigInt(0)&&t.uint32(8).uint64(e.codeId),0!==e.checksum.length&&t.uint32(18).bytes(e.checksum),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=l();for(;r.pos>>3){case 1:i.codeId=r.uint64();break;case 2:i.checksum=r.bytes();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=l();return(0,a.isSet)(e.codeId)&&(t.codeId=BigInt(e.codeId.toString())),(0,a.isSet)(e.checksum)&&(t.checksum=(0,a.bytesFromBase64)(e.checksum)),t},toJSON(e){let t={};return void 0!==e.codeId&&(t.codeId=(e.codeId||BigInt(0)).toString()),void 0!==e.checksum&&(t.checksum=(0,a.base64FromBytes)(void 0!==e.checksum?e.checksum:new Uint8Array)),t},fromPartial(e){var t;let r=l();return void 0!==e.codeId&&null!==e.codeId&&(r.codeId=BigInt(e.codeId.toString())),r.checksum=null!==(t=e.checksum)&&void 0!==t?t:new Uint8Array,r}},t.MsgInstantiateContract={typeUrl:"/cosmwasm.wasm.v1.MsgInstantiateContract",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of(""!==e.sender&&t.uint32(10).string(e.sender),""!==e.admin&&t.uint32(18).string(e.admin),e.codeId!==BigInt(0)&&t.uint32(24).uint64(e.codeId),""!==e.label&&t.uint32(34).string(e.label),0!==e.msg.length&&t.uint32(42).bytes(e.msg),e.funds))i.Coin.encode(r,t.uint32(50).fork()).ldelim();return t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,a=u();for(;r.pos>>3){case 1:a.sender=r.string();break;case 2:a.admin=r.string();break;case 3:a.codeId=r.uint64();break;case 4:a.label=r.string();break;case 5:a.msg=r.bytes();break;case 6:a.funds.push(i.Coin.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=u();return(0,a.isSet)(e.sender)&&(t.sender=String(e.sender)),(0,a.isSet)(e.admin)&&(t.admin=String(e.admin)),(0,a.isSet)(e.codeId)&&(t.codeId=BigInt(e.codeId.toString())),(0,a.isSet)(e.label)&&(t.label=String(e.label)),(0,a.isSet)(e.msg)&&(t.msg=(0,a.bytesFromBase64)(e.msg)),Array.isArray(null==e?void 0:e.funds)&&(t.funds=e.funds.map(e=>i.Coin.fromJSON(e))),t},toJSON(e){let t={};return void 0!==e.sender&&(t.sender=e.sender),void 0!==e.admin&&(t.admin=e.admin),void 0!==e.codeId&&(t.codeId=(e.codeId||BigInt(0)).toString()),void 0!==e.label&&(t.label=e.label),void 0!==e.msg&&(t.msg=(0,a.base64FromBytes)(void 0!==e.msg?e.msg:new Uint8Array)),e.funds?t.funds=e.funds.map(e=>e?i.Coin.toJSON(e):void 0):t.funds=[],t},fromPartial(e){var t,r,n,o,a;let s=u();return s.sender=null!==(r=e.sender)&&void 0!==r?r:"",s.admin=null!==(n=e.admin)&&void 0!==n?n:"",void 0!==e.codeId&&null!==e.codeId&&(s.codeId=BigInt(e.codeId.toString())),s.label=null!==(o=e.label)&&void 0!==o?o:"",s.msg=null!==(a=e.msg)&&void 0!==a?a:new Uint8Array,s.funds=(null===(t=e.funds)||void 0===t?void 0:t.map(e=>i.Coin.fromPartial(e)))||[],s}},t.MsgInstantiateContract2={typeUrl:"/cosmwasm.wasm.v1.MsgInstantiateContract2",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of(""!==e.sender&&t.uint32(10).string(e.sender),""!==e.admin&&t.uint32(18).string(e.admin),e.codeId!==BigInt(0)&&t.uint32(24).uint64(e.codeId),""!==e.label&&t.uint32(34).string(e.label),0!==e.msg.length&&t.uint32(42).bytes(e.msg),e.funds))i.Coin.encode(r,t.uint32(50).fork()).ldelim();return 0!==e.salt.length&&t.uint32(58).bytes(e.salt),!0===e.fixMsg&&t.uint32(64).bool(e.fixMsg),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,a=d();for(;r.pos>>3){case 1:a.sender=r.string();break;case 2:a.admin=r.string();break;case 3:a.codeId=r.uint64();break;case 4:a.label=r.string();break;case 5:a.msg=r.bytes();break;case 6:a.funds.push(i.Coin.decode(r,r.uint32()));break;case 7:a.salt=r.bytes();break;case 8:a.fixMsg=r.bool();break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=d();return(0,a.isSet)(e.sender)&&(t.sender=String(e.sender)),(0,a.isSet)(e.admin)&&(t.admin=String(e.admin)),(0,a.isSet)(e.codeId)&&(t.codeId=BigInt(e.codeId.toString())),(0,a.isSet)(e.label)&&(t.label=String(e.label)),(0,a.isSet)(e.msg)&&(t.msg=(0,a.bytesFromBase64)(e.msg)),Array.isArray(null==e?void 0:e.funds)&&(t.funds=e.funds.map(e=>i.Coin.fromJSON(e))),(0,a.isSet)(e.salt)&&(t.salt=(0,a.bytesFromBase64)(e.salt)),(0,a.isSet)(e.fixMsg)&&(t.fixMsg=!!e.fixMsg),t},toJSON(e){let t={};return void 0!==e.sender&&(t.sender=e.sender),void 0!==e.admin&&(t.admin=e.admin),void 0!==e.codeId&&(t.codeId=(e.codeId||BigInt(0)).toString()),void 0!==e.label&&(t.label=e.label),void 0!==e.msg&&(t.msg=(0,a.base64FromBytes)(void 0!==e.msg?e.msg:new Uint8Array)),e.funds?t.funds=e.funds.map(e=>e?i.Coin.toJSON(e):void 0):t.funds=[],void 0!==e.salt&&(t.salt=(0,a.base64FromBytes)(void 0!==e.salt?e.salt:new Uint8Array)),void 0!==e.fixMsg&&(t.fixMsg=e.fixMsg),t},fromPartial(e){var t,r,n,o,a,s,l;let u=d();return u.sender=null!==(r=e.sender)&&void 0!==r?r:"",u.admin=null!==(n=e.admin)&&void 0!==n?n:"",void 0!==e.codeId&&null!==e.codeId&&(u.codeId=BigInt(e.codeId.toString())),u.label=null!==(o=e.label)&&void 0!==o?o:"",u.msg=null!==(a=e.msg)&&void 0!==a?a:new Uint8Array,u.funds=(null===(t=e.funds)||void 0===t?void 0:t.map(e=>i.Coin.fromPartial(e)))||[],u.salt=null!==(s=e.salt)&&void 0!==s?s:new Uint8Array,u.fixMsg=null!==(l=e.fixMsg)&&void 0!==l&&l,u}},t.MsgInstantiateContractResponse={typeUrl:"/cosmwasm.wasm.v1.MsgInstantiateContractResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.address&&t.uint32(10).string(e.address),0!==e.data.length&&t.uint32(18).bytes(e.data),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=c();for(;r.pos>>3){case 1:i.address=r.string();break;case 2:i.data=r.bytes();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=c();return(0,a.isSet)(e.address)&&(t.address=String(e.address)),(0,a.isSet)(e.data)&&(t.data=(0,a.bytesFromBase64)(e.data)),t},toJSON(e){let t={};return void 0!==e.address&&(t.address=e.address),void 0!==e.data&&(t.data=(0,a.base64FromBytes)(void 0!==e.data?e.data:new Uint8Array)),t},fromPartial(e){var t,r;let n=c();return n.address=null!==(t=e.address)&&void 0!==t?t:"",n.data=null!==(r=e.data)&&void 0!==r?r:new Uint8Array,n}},t.MsgInstantiateContract2Response={typeUrl:"/cosmwasm.wasm.v1.MsgInstantiateContract2Response",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.address&&t.uint32(10).string(e.address),0!==e.data.length&&t.uint32(18).bytes(e.data),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=p();for(;r.pos>>3){case 1:i.address=r.string();break;case 2:i.data=r.bytes();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=p();return(0,a.isSet)(e.address)&&(t.address=String(e.address)),(0,a.isSet)(e.data)&&(t.data=(0,a.bytesFromBase64)(e.data)),t},toJSON(e){let t={};return void 0!==e.address&&(t.address=e.address),void 0!==e.data&&(t.data=(0,a.base64FromBytes)(void 0!==e.data?e.data:new Uint8Array)),t},fromPartial(e){var t,r;let n=p();return n.address=null!==(t=e.address)&&void 0!==t?t:"",n.data=null!==(r=e.data)&&void 0!==r?r:new Uint8Array,n}},t.MsgExecuteContract={typeUrl:"/cosmwasm.wasm.v1.MsgExecuteContract",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of(""!==e.sender&&t.uint32(10).string(e.sender),""!==e.contract&&t.uint32(18).string(e.contract),0!==e.msg.length&&t.uint32(26).bytes(e.msg),e.funds))i.Coin.encode(r,t.uint32(42).fork()).ldelim();return t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,a=f();for(;r.pos>>3){case 1:a.sender=r.string();break;case 2:a.contract=r.string();break;case 3:a.msg=r.bytes();break;case 5:a.funds.push(i.Coin.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=f();return(0,a.isSet)(e.sender)&&(t.sender=String(e.sender)),(0,a.isSet)(e.contract)&&(t.contract=String(e.contract)),(0,a.isSet)(e.msg)&&(t.msg=(0,a.bytesFromBase64)(e.msg)),Array.isArray(null==e?void 0:e.funds)&&(t.funds=e.funds.map(e=>i.Coin.fromJSON(e))),t},toJSON(e){let t={};return void 0!==e.sender&&(t.sender=e.sender),void 0!==e.contract&&(t.contract=e.contract),void 0!==e.msg&&(t.msg=(0,a.base64FromBytes)(void 0!==e.msg?e.msg:new Uint8Array)),e.funds?t.funds=e.funds.map(e=>e?i.Coin.toJSON(e):void 0):t.funds=[],t},fromPartial(e){var t,r,n,o;let a=f();return a.sender=null!==(r=e.sender)&&void 0!==r?r:"",a.contract=null!==(n=e.contract)&&void 0!==n?n:"",a.msg=null!==(o=e.msg)&&void 0!==o?o:new Uint8Array,a.funds=(null===(t=e.funds)||void 0===t?void 0:t.map(e=>i.Coin.fromPartial(e)))||[],a}},t.MsgExecuteContractResponse={typeUrl:"/cosmwasm.wasm.v1.MsgExecuteContractResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return 0!==e.data.length&&t.uint32(10).bytes(e.data),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=h();for(;r.pos>>3==1?i.data=r.bytes():r.skipType(7&e)}return i},fromJSON(e){let t=h();return(0,a.isSet)(e.data)&&(t.data=(0,a.bytesFromBase64)(e.data)),t},toJSON(e){let t={};return void 0!==e.data&&(t.data=(0,a.base64FromBytes)(void 0!==e.data?e.data:new Uint8Array)),t},fromPartial(e){var t;let r=h();return r.data=null!==(t=e.data)&&void 0!==t?t:new Uint8Array,r}},t.MsgMigrateContract={typeUrl:"/cosmwasm.wasm.v1.MsgMigrateContract",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.sender&&t.uint32(10).string(e.sender),""!==e.contract&&t.uint32(18).string(e.contract),e.codeId!==BigInt(0)&&t.uint32(24).uint64(e.codeId),0!==e.msg.length&&t.uint32(34).bytes(e.msg),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=g();for(;r.pos>>3){case 1:i.sender=r.string();break;case 2:i.contract=r.string();break;case 3:i.codeId=r.uint64();break;case 4:i.msg=r.bytes();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=g();return(0,a.isSet)(e.sender)&&(t.sender=String(e.sender)),(0,a.isSet)(e.contract)&&(t.contract=String(e.contract)),(0,a.isSet)(e.codeId)&&(t.codeId=BigInt(e.codeId.toString())),(0,a.isSet)(e.msg)&&(t.msg=(0,a.bytesFromBase64)(e.msg)),t},toJSON(e){let t={};return void 0!==e.sender&&(t.sender=e.sender),void 0!==e.contract&&(t.contract=e.contract),void 0!==e.codeId&&(t.codeId=(e.codeId||BigInt(0)).toString()),void 0!==e.msg&&(t.msg=(0,a.base64FromBytes)(void 0!==e.msg?e.msg:new Uint8Array)),t},fromPartial(e){var t,r,n;let i=g();return i.sender=null!==(t=e.sender)&&void 0!==t?t:"",i.contract=null!==(r=e.contract)&&void 0!==r?r:"",void 0!==e.codeId&&null!==e.codeId&&(i.codeId=BigInt(e.codeId.toString())),i.msg=null!==(n=e.msg)&&void 0!==n?n:new Uint8Array,i}},t.MsgMigrateContractResponse={typeUrl:"/cosmwasm.wasm.v1.MsgMigrateContractResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return 0!==e.data.length&&t.uint32(10).bytes(e.data),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=m();for(;r.pos>>3==1?i.data=r.bytes():r.skipType(7&e)}return i},fromJSON(e){let t=m();return(0,a.isSet)(e.data)&&(t.data=(0,a.bytesFromBase64)(e.data)),t},toJSON(e){let t={};return void 0!==e.data&&(t.data=(0,a.base64FromBytes)(void 0!==e.data?e.data:new Uint8Array)),t},fromPartial(e){var t;let r=m();return r.data=null!==(t=e.data)&&void 0!==t?t:new Uint8Array,r}},t.MsgUpdateAdmin={typeUrl:"/cosmwasm.wasm.v1.MsgUpdateAdmin",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.sender&&t.uint32(10).string(e.sender),""!==e.newAdmin&&t.uint32(18).string(e.newAdmin),""!==e.contract&&t.uint32(26).string(e.contract),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=y();for(;r.pos>>3){case 1:i.sender=r.string();break;case 2:i.newAdmin=r.string();break;case 3:i.contract=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=y();return(0,a.isSet)(e.sender)&&(t.sender=String(e.sender)),(0,a.isSet)(e.newAdmin)&&(t.newAdmin=String(e.newAdmin)),(0,a.isSet)(e.contract)&&(t.contract=String(e.contract)),t},toJSON(e){let t={};return void 0!==e.sender&&(t.sender=e.sender),void 0!==e.newAdmin&&(t.newAdmin=e.newAdmin),void 0!==e.contract&&(t.contract=e.contract),t},fromPartial(e){var t,r,n;let i=y();return i.sender=null!==(t=e.sender)&&void 0!==t?t:"",i.newAdmin=null!==(r=e.newAdmin)&&void 0!==r?r:"",i.contract=null!==(n=e.contract)&&void 0!==n?n:"",i}},t.MsgUpdateAdminResponse={typeUrl:"/cosmwasm.wasm.v1.MsgUpdateAdminResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=v();for(;r.posv(),toJSON:e=>({}),fromPartial:e=>v()},t.MsgClearAdmin={typeUrl:"/cosmwasm.wasm.v1.MsgClearAdmin",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.sender&&t.uint32(10).string(e.sender),""!==e.contract&&t.uint32(26).string(e.contract),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=b();for(;r.pos>>3){case 1:i.sender=r.string();break;case 3:i.contract=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=b();return(0,a.isSet)(e.sender)&&(t.sender=String(e.sender)),(0,a.isSet)(e.contract)&&(t.contract=String(e.contract)),t},toJSON(e){let t={};return void 0!==e.sender&&(t.sender=e.sender),void 0!==e.contract&&(t.contract=e.contract),t},fromPartial(e){var t,r;let n=b();return n.sender=null!==(t=e.sender)&&void 0!==t?t:"",n.contract=null!==(r=e.contract)&&void 0!==r?r:"",n}},t.MsgClearAdminResponse={typeUrl:"/cosmwasm.wasm.v1.MsgClearAdminResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=S();for(;r.posS(),toJSON:e=>({}),fromPartial:e=>S()},t.MsgUpdateInstantiateConfig={typeUrl:"/cosmwasm.wasm.v1.MsgUpdateInstantiateConfig",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.sender&&t.uint32(10).string(e.sender),e.codeId!==BigInt(0)&&t.uint32(16).uint64(e.codeId),void 0!==e.newInstantiatePermission&&n.AccessConfig.encode(e.newInstantiatePermission,t.uint32(26).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=w();for(;r.pos>>3){case 1:a.sender=r.string();break;case 2:a.codeId=r.uint64();break;case 3:a.newInstantiatePermission=n.AccessConfig.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=w();return(0,a.isSet)(e.sender)&&(t.sender=String(e.sender)),(0,a.isSet)(e.codeId)&&(t.codeId=BigInt(e.codeId.toString())),(0,a.isSet)(e.newInstantiatePermission)&&(t.newInstantiatePermission=n.AccessConfig.fromJSON(e.newInstantiatePermission)),t},toJSON(e){let t={};return void 0!==e.sender&&(t.sender=e.sender),void 0!==e.codeId&&(t.codeId=(e.codeId||BigInt(0)).toString()),void 0!==e.newInstantiatePermission&&(t.newInstantiatePermission=e.newInstantiatePermission?n.AccessConfig.toJSON(e.newInstantiatePermission):void 0),t},fromPartial(e){var t;let r=w();return r.sender=null!==(t=e.sender)&&void 0!==t?t:"",void 0!==e.codeId&&null!==e.codeId&&(r.codeId=BigInt(e.codeId.toString())),void 0!==e.newInstantiatePermission&&null!==e.newInstantiatePermission&&(r.newInstantiatePermission=n.AccessConfig.fromPartial(e.newInstantiatePermission)),r}},t.MsgUpdateInstantiateConfigResponse={typeUrl:"/cosmwasm.wasm.v1.MsgUpdateInstantiateConfigResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=_();for(;r.pos_(),toJSON:e=>({}),fromPartial:e=>_()};class k{StoreCode(e){let r=t.MsgStoreCode.encode(e).finish();return this.rpc.request("cosmwasm.wasm.v1.Msg","StoreCode",r).then(e=>t.MsgStoreCodeResponse.decode(new o.BinaryReader(e)))}InstantiateContract(e){let r=t.MsgInstantiateContract.encode(e).finish();return this.rpc.request("cosmwasm.wasm.v1.Msg","InstantiateContract",r).then(e=>t.MsgInstantiateContractResponse.decode(new o.BinaryReader(e)))}InstantiateContract2(e){let r=t.MsgInstantiateContract2.encode(e).finish();return this.rpc.request("cosmwasm.wasm.v1.Msg","InstantiateContract2",r).then(e=>t.MsgInstantiateContract2Response.decode(new o.BinaryReader(e)))}ExecuteContract(e){let r=t.MsgExecuteContract.encode(e).finish();return this.rpc.request("cosmwasm.wasm.v1.Msg","ExecuteContract",r).then(e=>t.MsgExecuteContractResponse.decode(new o.BinaryReader(e)))}MigrateContract(e){let r=t.MsgMigrateContract.encode(e).finish();return this.rpc.request("cosmwasm.wasm.v1.Msg","MigrateContract",r).then(e=>t.MsgMigrateContractResponse.decode(new o.BinaryReader(e)))}UpdateAdmin(e){let r=t.MsgUpdateAdmin.encode(e).finish();return this.rpc.request("cosmwasm.wasm.v1.Msg","UpdateAdmin",r).then(e=>t.MsgUpdateAdminResponse.decode(new o.BinaryReader(e)))}ClearAdmin(e){let r=t.MsgClearAdmin.encode(e).finish();return this.rpc.request("cosmwasm.wasm.v1.Msg","ClearAdmin",r).then(e=>t.MsgClearAdminResponse.decode(new o.BinaryReader(e)))}UpdateInstantiateConfig(e){let r=t.MsgUpdateInstantiateConfig.encode(e).finish();return this.rpc.request("cosmwasm.wasm.v1.Msg","UpdateInstantiateConfig",r).then(e=>t.MsgUpdateInstantiateConfigResponse.decode(new o.BinaryReader(e)))}constructor(e){this.rpc=e,this.StoreCode=this.StoreCode.bind(this),this.InstantiateContract=this.InstantiateContract.bind(this),this.InstantiateContract2=this.InstantiateContract2.bind(this),this.ExecuteContract=this.ExecuteContract.bind(this),this.MigrateContract=this.MigrateContract.bind(this),this.UpdateAdmin=this.UpdateAdmin.bind(this),this.ClearAdmin=this.ClearAdmin.bind(this),this.UpdateInstantiateConfig=this.UpdateInstantiateConfig.bind(this)}}t.MsgClientImpl=k},20624:function(e,t,r){"use strict";var n,i;Object.defineProperty(t,"__esModule",{value:!0}),t.Model=t.AbsoluteTxPosition=t.ContractCodeHistoryEntry=t.ContractInfo=t.CodeInfo=t.Params=t.AccessConfig=t.AccessTypeParam=t.contractCodeHistoryOperationTypeToJSON=t.contractCodeHistoryOperationTypeFromJSON=t.ContractCodeHistoryOperationType=t.accessTypeToJSON=t.accessTypeFromJSON=t.AccessType=t.protobufPackage=void 0;let o=r(11879),a=r(46554),s=r(99133);function l(e){switch(e){case 0:case"ACCESS_TYPE_UNSPECIFIED":return n.ACCESS_TYPE_UNSPECIFIED;case 1:case"ACCESS_TYPE_NOBODY":return n.ACCESS_TYPE_NOBODY;case 2:case"ACCESS_TYPE_ONLY_ADDRESS":return n.ACCESS_TYPE_ONLY_ADDRESS;case 3:case"ACCESS_TYPE_EVERYBODY":return n.ACCESS_TYPE_EVERYBODY;case 4:case"ACCESS_TYPE_ANY_OF_ADDRESSES":return n.ACCESS_TYPE_ANY_OF_ADDRESSES;default:return n.UNRECOGNIZED}}function u(e){switch(e){case n.ACCESS_TYPE_UNSPECIFIED:return"ACCESS_TYPE_UNSPECIFIED";case n.ACCESS_TYPE_NOBODY:return"ACCESS_TYPE_NOBODY";case n.ACCESS_TYPE_ONLY_ADDRESS:return"ACCESS_TYPE_ONLY_ADDRESS";case n.ACCESS_TYPE_EVERYBODY:return"ACCESS_TYPE_EVERYBODY";case n.ACCESS_TYPE_ANY_OF_ADDRESSES:return"ACCESS_TYPE_ANY_OF_ADDRESSES";case n.UNRECOGNIZED:default:return"UNRECOGNIZED"}}function d(e){switch(e){case 0:case"CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED":return i.CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED;case 1:case"CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT":return i.CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT;case 2:case"CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE":return i.CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE;case 3:case"CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS":return i.CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS;default:return i.UNRECOGNIZED}}function c(e){switch(e){case i.CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED:return"CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED";case i.CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT:return"CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT";case i.CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE:return"CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE";case i.CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS:return"CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS";case i.UNRECOGNIZED:default:return"UNRECOGNIZED"}}function p(){return{value:0}}function f(){return{permission:0,address:"",addresses:[]}}function h(){return{codeUploadAccess:t.AccessConfig.fromPartial({}),instantiateDefaultPermission:0}}function g(){return{codeHash:new Uint8Array,creator:"",instantiateConfig:t.AccessConfig.fromPartial({})}}function m(){return{codeId:BigInt(0),creator:"",admin:"",label:"",created:void 0,ibcPortId:"",extension:void 0}}function y(){return{operation:0,codeId:BigInt(0),updated:void 0,msg:new Uint8Array}}function v(){return{blockHeight:BigInt(0),txIndex:BigInt(0)}}function b(){return{key:new Uint8Array,value:new Uint8Array}}t.protobufPackage="cosmwasm.wasm.v1",function(e){e[e.ACCESS_TYPE_UNSPECIFIED=0]="ACCESS_TYPE_UNSPECIFIED",e[e.ACCESS_TYPE_NOBODY=1]="ACCESS_TYPE_NOBODY",e[e.ACCESS_TYPE_ONLY_ADDRESS=2]="ACCESS_TYPE_ONLY_ADDRESS",e[e.ACCESS_TYPE_EVERYBODY=3]="ACCESS_TYPE_EVERYBODY",e[e.ACCESS_TYPE_ANY_OF_ADDRESSES=4]="ACCESS_TYPE_ANY_OF_ADDRESSES",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(n||(t.AccessType=n={})),t.accessTypeFromJSON=l,t.accessTypeToJSON=u,function(e){e[e.CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED=0]="CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED",e[e.CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT=1]="CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT",e[e.CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE=2]="CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE",e[e.CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS=3]="CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(i||(t.ContractCodeHistoryOperationType=i={})),t.contractCodeHistoryOperationTypeFromJSON=d,t.contractCodeHistoryOperationTypeToJSON=c,t.AccessTypeParam={typeUrl:"/cosmwasm.wasm.v1.AccessTypeParam",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return 0!==e.value&&t.uint32(8).int32(e.value),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=p();for(;r.pos>>3==1?i.value=r.int32():r.skipType(7&e)}return i},fromJSON(e){let t=p();return(0,s.isSet)(e.value)&&(t.value=l(e.value)),t},toJSON(e){let t={};return void 0!==e.value&&(t.value=u(e.value)),t},fromPartial(e){var t;let r=p();return r.value=null!==(t=e.value)&&void 0!==t?t:0,r}},t.AccessConfig={typeUrl:"/cosmwasm.wasm.v1.AccessConfig",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();for(let r of(0!==e.permission&&t.uint32(8).int32(e.permission),""!==e.address&&t.uint32(18).string(e.address),e.addresses))t.uint32(26).string(r);return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=f();for(;r.pos>>3){case 1:i.permission=r.int32();break;case 2:i.address=r.string();break;case 3:i.addresses.push(r.string());break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=f();return(0,s.isSet)(e.permission)&&(t.permission=l(e.permission)),(0,s.isSet)(e.address)&&(t.address=String(e.address)),Array.isArray(null==e?void 0:e.addresses)&&(t.addresses=e.addresses.map(e=>String(e))),t},toJSON(e){let t={};return void 0!==e.permission&&(t.permission=u(e.permission)),void 0!==e.address&&(t.address=e.address),e.addresses?t.addresses=e.addresses.map(e=>e):t.addresses=[],t},fromPartial(e){var t,r,n;let i=f();return i.permission=null!==(r=e.permission)&&void 0!==r?r:0,i.address=null!==(n=e.address)&&void 0!==n?n:"",i.addresses=(null===(t=e.addresses)||void 0===t?void 0:t.map(e=>e))||[],i}},t.Params={typeUrl:"/cosmwasm.wasm.v1.Params",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return void 0!==e.codeUploadAccess&&t.AccessConfig.encode(e.codeUploadAccess,r.uint32(10).fork()).ldelim(),0!==e.instantiateDefaultPermission&&r.uint32(16).int32(e.instantiateDefaultPermission),r},decode(e,r){let n=e instanceof a.BinaryReader?e:new a.BinaryReader(e),i=void 0===r?n.len:n.pos+r,o=h();for(;n.pos>>3){case 1:o.codeUploadAccess=t.AccessConfig.decode(n,n.uint32());break;case 2:o.instantiateDefaultPermission=n.int32();break;default:n.skipType(7&e)}}return o},fromJSON(e){let r=h();return(0,s.isSet)(e.codeUploadAccess)&&(r.codeUploadAccess=t.AccessConfig.fromJSON(e.codeUploadAccess)),(0,s.isSet)(e.instantiateDefaultPermission)&&(r.instantiateDefaultPermission=l(e.instantiateDefaultPermission)),r},toJSON(e){let r={};return void 0!==e.codeUploadAccess&&(r.codeUploadAccess=e.codeUploadAccess?t.AccessConfig.toJSON(e.codeUploadAccess):void 0),void 0!==e.instantiateDefaultPermission&&(r.instantiateDefaultPermission=u(e.instantiateDefaultPermission)),r},fromPartial(e){var r;let n=h();return void 0!==e.codeUploadAccess&&null!==e.codeUploadAccess&&(n.codeUploadAccess=t.AccessConfig.fromPartial(e.codeUploadAccess)),n.instantiateDefaultPermission=null!==(r=e.instantiateDefaultPermission)&&void 0!==r?r:0,n}},t.CodeInfo={typeUrl:"/cosmwasm.wasm.v1.CodeInfo",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return 0!==e.codeHash.length&&r.uint32(10).bytes(e.codeHash),""!==e.creator&&r.uint32(18).string(e.creator),void 0!==e.instantiateConfig&&t.AccessConfig.encode(e.instantiateConfig,r.uint32(42).fork()).ldelim(),r},decode(e,r){let n=e instanceof a.BinaryReader?e:new a.BinaryReader(e),i=void 0===r?n.len:n.pos+r,o=g();for(;n.pos>>3){case 1:o.codeHash=n.bytes();break;case 2:o.creator=n.string();break;case 5:o.instantiateConfig=t.AccessConfig.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){let r=g();return(0,s.isSet)(e.codeHash)&&(r.codeHash=(0,s.bytesFromBase64)(e.codeHash)),(0,s.isSet)(e.creator)&&(r.creator=String(e.creator)),(0,s.isSet)(e.instantiateConfig)&&(r.instantiateConfig=t.AccessConfig.fromJSON(e.instantiateConfig)),r},toJSON(e){let r={};return void 0!==e.codeHash&&(r.codeHash=(0,s.base64FromBytes)(void 0!==e.codeHash?e.codeHash:new Uint8Array)),void 0!==e.creator&&(r.creator=e.creator),void 0!==e.instantiateConfig&&(r.instantiateConfig=e.instantiateConfig?t.AccessConfig.toJSON(e.instantiateConfig):void 0),r},fromPartial(e){var r,n;let i=g();return i.codeHash=null!==(r=e.codeHash)&&void 0!==r?r:new Uint8Array,i.creator=null!==(n=e.creator)&&void 0!==n?n:"",void 0!==e.instantiateConfig&&null!==e.instantiateConfig&&(i.instantiateConfig=t.AccessConfig.fromPartial(e.instantiateConfig)),i}},t.ContractInfo={typeUrl:"/cosmwasm.wasm.v1.ContractInfo",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return e.codeId!==BigInt(0)&&r.uint32(8).uint64(e.codeId),""!==e.creator&&r.uint32(18).string(e.creator),""!==e.admin&&r.uint32(26).string(e.admin),""!==e.label&&r.uint32(34).string(e.label),void 0!==e.created&&t.AbsoluteTxPosition.encode(e.created,r.uint32(42).fork()).ldelim(),""!==e.ibcPortId&&r.uint32(50).string(e.ibcPortId),void 0!==e.extension&&o.Any.encode(e.extension,r.uint32(58).fork()).ldelim(),r},decode(e,r){let n=e instanceof a.BinaryReader?e:new a.BinaryReader(e),i=void 0===r?n.len:n.pos+r,s=m();for(;n.pos>>3){case 1:s.codeId=n.uint64();break;case 2:s.creator=n.string();break;case 3:s.admin=n.string();break;case 4:s.label=n.string();break;case 5:s.created=t.AbsoluteTxPosition.decode(n,n.uint32());break;case 6:s.ibcPortId=n.string();break;case 7:s.extension=o.Any.decode(n,n.uint32());break;default:n.skipType(7&e)}}return s},fromJSON(e){let r=m();return(0,s.isSet)(e.codeId)&&(r.codeId=BigInt(e.codeId.toString())),(0,s.isSet)(e.creator)&&(r.creator=String(e.creator)),(0,s.isSet)(e.admin)&&(r.admin=String(e.admin)),(0,s.isSet)(e.label)&&(r.label=String(e.label)),(0,s.isSet)(e.created)&&(r.created=t.AbsoluteTxPosition.fromJSON(e.created)),(0,s.isSet)(e.ibcPortId)&&(r.ibcPortId=String(e.ibcPortId)),(0,s.isSet)(e.extension)&&(r.extension=o.Any.fromJSON(e.extension)),r},toJSON(e){let r={};return void 0!==e.codeId&&(r.codeId=(e.codeId||BigInt(0)).toString()),void 0!==e.creator&&(r.creator=e.creator),void 0!==e.admin&&(r.admin=e.admin),void 0!==e.label&&(r.label=e.label),void 0!==e.created&&(r.created=e.created?t.AbsoluteTxPosition.toJSON(e.created):void 0),void 0!==e.ibcPortId&&(r.ibcPortId=e.ibcPortId),void 0!==e.extension&&(r.extension=e.extension?o.Any.toJSON(e.extension):void 0),r},fromPartial(e){var r,n,i,a;let s=m();return void 0!==e.codeId&&null!==e.codeId&&(s.codeId=BigInt(e.codeId.toString())),s.creator=null!==(r=e.creator)&&void 0!==r?r:"",s.admin=null!==(n=e.admin)&&void 0!==n?n:"",s.label=null!==(i=e.label)&&void 0!==i?i:"",void 0!==e.created&&null!==e.created&&(s.created=t.AbsoluteTxPosition.fromPartial(e.created)),s.ibcPortId=null!==(a=e.ibcPortId)&&void 0!==a?a:"",void 0!==e.extension&&null!==e.extension&&(s.extension=o.Any.fromPartial(e.extension)),s}},t.ContractCodeHistoryEntry={typeUrl:"/cosmwasm.wasm.v1.ContractCodeHistoryEntry",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return 0!==e.operation&&r.uint32(8).int32(e.operation),e.codeId!==BigInt(0)&&r.uint32(16).uint64(e.codeId),void 0!==e.updated&&t.AbsoluteTxPosition.encode(e.updated,r.uint32(26).fork()).ldelim(),0!==e.msg.length&&r.uint32(34).bytes(e.msg),r},decode(e,r){let n=e instanceof a.BinaryReader?e:new a.BinaryReader(e),i=void 0===r?n.len:n.pos+r,o=y();for(;n.pos>>3){case 1:o.operation=n.int32();break;case 2:o.codeId=n.uint64();break;case 3:o.updated=t.AbsoluteTxPosition.decode(n,n.uint32());break;case 4:o.msg=n.bytes();break;default:n.skipType(7&e)}}return o},fromJSON(e){let r=y();return(0,s.isSet)(e.operation)&&(r.operation=d(e.operation)),(0,s.isSet)(e.codeId)&&(r.codeId=BigInt(e.codeId.toString())),(0,s.isSet)(e.updated)&&(r.updated=t.AbsoluteTxPosition.fromJSON(e.updated)),(0,s.isSet)(e.msg)&&(r.msg=(0,s.bytesFromBase64)(e.msg)),r},toJSON(e){let r={};return void 0!==e.operation&&(r.operation=c(e.operation)),void 0!==e.codeId&&(r.codeId=(e.codeId||BigInt(0)).toString()),void 0!==e.updated&&(r.updated=e.updated?t.AbsoluteTxPosition.toJSON(e.updated):void 0),void 0!==e.msg&&(r.msg=(0,s.base64FromBytes)(void 0!==e.msg?e.msg:new Uint8Array)),r},fromPartial(e){var r,n;let i=y();return i.operation=null!==(r=e.operation)&&void 0!==r?r:0,void 0!==e.codeId&&null!==e.codeId&&(i.codeId=BigInt(e.codeId.toString())),void 0!==e.updated&&null!==e.updated&&(i.updated=t.AbsoluteTxPosition.fromPartial(e.updated)),i.msg=null!==(n=e.msg)&&void 0!==n?n:new Uint8Array,i}},t.AbsoluteTxPosition={typeUrl:"/cosmwasm.wasm.v1.AbsoluteTxPosition",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return e.blockHeight!==BigInt(0)&&t.uint32(8).uint64(e.blockHeight),e.txIndex!==BigInt(0)&&t.uint32(16).uint64(e.txIndex),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=v();for(;r.pos>>3){case 1:i.blockHeight=r.uint64();break;case 2:i.txIndex=r.uint64();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=v();return(0,s.isSet)(e.blockHeight)&&(t.blockHeight=BigInt(e.blockHeight.toString())),(0,s.isSet)(e.txIndex)&&(t.txIndex=BigInt(e.txIndex.toString())),t},toJSON(e){let t={};return void 0!==e.blockHeight&&(t.blockHeight=(e.blockHeight||BigInt(0)).toString()),void 0!==e.txIndex&&(t.txIndex=(e.txIndex||BigInt(0)).toString()),t},fromPartial(e){let t=v();return void 0!==e.blockHeight&&null!==e.blockHeight&&(t.blockHeight=BigInt(e.blockHeight.toString())),void 0!==e.txIndex&&null!==e.txIndex&&(t.txIndex=BigInt(e.txIndex.toString())),t}},t.Model={typeUrl:"/cosmwasm.wasm.v1.Model",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return 0!==e.key.length&&t.uint32(10).bytes(e.key),0!==e.value.length&&t.uint32(18).bytes(e.value),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=b();for(;r.pos>>3){case 1:i.key=r.bytes();break;case 2:i.value=r.bytes();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=b();return(0,s.isSet)(e.key)&&(t.key=(0,s.bytesFromBase64)(e.key)),(0,s.isSet)(e.value)&&(t.value=(0,s.bytesFromBase64)(e.value)),t},toJSON(e){let t={};return void 0!==e.key&&(t.key=(0,s.base64FromBytes)(void 0!==e.key?e.key:new Uint8Array)),void 0!==e.value&&(t.value=(0,s.base64FromBytes)(void 0!==e.value?e.value:new Uint8Array)),t},fromPartial(e){var t,r;let n=b();return n.key=null!==(t=e.key)&&void 0!==t?t:new Uint8Array,n.value=null!==(r=e.value)&&void 0!==r?r:new Uint8Array,n}}},11879:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Any=t.protobufPackage=void 0;let n=r(46554),i=r(99133);function o(){return{typeUrl:"",value:new Uint8Array}}t.protobufPackage="google.protobuf",t.Any={typeUrl:"/google.protobuf.Any",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.BinaryWriter.create();return""!==e.typeUrl&&t.uint32(10).string(e.typeUrl),0!==e.value.length&&t.uint32(18).bytes(e.value),t},decode(e,t){let r=e instanceof n.BinaryReader?e:new n.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=o();for(;r.pos>>3){case 1:a.typeUrl=r.string();break;case 2:a.value=r.bytes();break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=o();return(0,i.isSet)(e.typeUrl)&&(t.typeUrl=String(e.typeUrl)),(0,i.isSet)(e.value)&&(t.value=(0,i.bytesFromBase64)(e.value)),t},toJSON(e){let t={};return void 0!==e.typeUrl&&(t.typeUrl=e.typeUrl),void 0!==e.value&&(t.value=(0,i.base64FromBytes)(void 0!==e.value?e.value:new Uint8Array)),t},fromPartial(e){var t,r;let n=o();return n.typeUrl=null!==(t=e.typeUrl)&&void 0!==t?t:"",n.value=null!==(r=e.value)&&void 0!==r?r:new Uint8Array,n}}},84849:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Duration=t.protobufPackage=void 0;let n=r(46554),i=r(99133);function o(){return{seconds:BigInt(0),nanos:0}}t.protobufPackage="google.protobuf",t.Duration={typeUrl:"/google.protobuf.Duration",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.BinaryWriter.create();return e.seconds!==BigInt(0)&&t.uint32(8).int64(e.seconds),0!==e.nanos&&t.uint32(16).int32(e.nanos),t},decode(e,t){let r=e instanceof n.BinaryReader?e:new n.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=o();for(;r.pos>>3){case 1:a.seconds=r.int64();break;case 2:a.nanos=r.int32();break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=o();return(0,i.isSet)(e.seconds)&&(t.seconds=BigInt(e.seconds.toString())),(0,i.isSet)(e.nanos)&&(t.nanos=Number(e.nanos)),t},toJSON(e){let t={};return void 0!==e.seconds&&(t.seconds=(e.seconds||BigInt(0)).toString()),void 0!==e.nanos&&(t.nanos=Math.round(e.nanos)),t},fromPartial(e){var t;let r=o();return void 0!==e.seconds&&null!==e.seconds&&(r.seconds=BigInt(e.seconds.toString())),r.nanos=null!==(t=e.nanos)&&void 0!==t?t:0,r}}},9990:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Timestamp=t.protobufPackage=void 0;let n=r(46554),i=r(99133);function o(){return{seconds:BigInt(0),nanos:0}}t.protobufPackage="google.protobuf",t.Timestamp={typeUrl:"/google.protobuf.Timestamp",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.BinaryWriter.create();return e.seconds!==BigInt(0)&&t.uint32(8).int64(e.seconds),0!==e.nanos&&t.uint32(16).int32(e.nanos),t},decode(e,t){let r=e instanceof n.BinaryReader?e:new n.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=o();for(;r.pos>>3){case 1:a.seconds=r.int64();break;case 2:a.nanos=r.int32();break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=o();return(0,i.isSet)(e.seconds)&&(t.seconds=BigInt(e.seconds.toString())),(0,i.isSet)(e.nanos)&&(t.nanos=Number(e.nanos)),t},toJSON(e){let t={};return void 0!==e.seconds&&(t.seconds=(e.seconds||BigInt(0)).toString()),void 0!==e.nanos&&(t.nanos=Math.round(e.nanos)),t},fromPartial(e){var t;let r=o();return void 0!==e.seconds&&null!==e.seconds&&(r.seconds=BigInt(e.seconds.toString())),r.nanos=null!==(t=e.nanos)&&void 0!==t?t:0,r}}},99133:function(e,t,r){"use strict";var n=r(23663).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.fromJsonTimestamp=t.fromTimestamp=t.toTimestamp=t.setPaginationParams=t.isObject=t.isSet=t.fromDuration=t.toDuration=t.omitDefault=t.base64FromBytes=t.bytesFromBase64=void 0;var i=void 0!==i?i:"undefined"!=typeof self?self:window;let o=i.atob||(e=>i.Buffer.from(e,"base64").toString("binary"));function a(e){let t=o(e),r=new Uint8Array(t.length);for(let e=0;ei.Buffer.from(e,"binary").toString("base64"));function l(e){let t=[];return e.forEach(e=>{t.push(String.fromCharCode(e))}),s(t.join(""))}function u(e){if("string"==typeof e)return""===e?void 0:e;if("number"==typeof e)return 0===e?void 0:e;if("bigint"==typeof e)return e===BigInt(0)?void 0:e;throw Error("Got unsupported type ".concat(typeof e))}function d(e){return{seconds:BigInt(Math.floor(parseInt(e)/1e9)),nanos:parseInt(e)%1e9}}function c(e){return(1e9*parseInt(e.seconds.toString())+e.nanos).toString()}function p(e){return null!=e}function f(e){return"object"==typeof e&&null!==e}t.base64FromBytes=l,t.omitDefault=u,t.toDuration=d,t.fromDuration=c,t.isSet=p,t.isObject=f;let h=(e,t)=>(t&&(void 0!==(null==t?void 0:t.countTotal)&&(e.params["pagination.count_total"]=t.countTotal),void 0!==(null==t?void 0:t.key)&&(e.params["pagination.key"]=n.from(t.key).toString("base64")),void 0!==(null==t?void 0:t.limit)&&(e.params["pagination.limit"]=t.limit.toString()),void 0!==(null==t?void 0:t.offset)&&(e.params["pagination.offset"]=t.offset.toString()),void 0!==(null==t?void 0:t.reverse)&&(e.params["pagination.reverse"]=t.reverse)),e);function g(e){return{seconds:b(e.getTime()/1e3),nanos:e.getTime()%1e3*1e6}}function m(e){let t=1e3*Number(e.seconds);return new Date(t+=e.nanos/1e6)}t.setPaginationParams=h,t.toTimestamp=g,t.fromTimestamp=m;let y=e=>({seconds:p(e.seconds)?BigInt(e.seconds.toString()):BigInt(0),nanos:p(e.nanos)?Number(e.nanos):0});function v(e){return e instanceof Date?g(e):"string"==typeof e?g(new Date(e)):y(e)}function b(e){return BigInt(Math.trunc(e))}t.fromJsonTimestamp=v},27780:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QueryClientImpl=t.QueryEscrowAddressResponse=t.QueryEscrowAddressRequest=t.QueryDenomHashResponse=t.QueryDenomHashRequest=t.QueryParamsResponse=t.QueryParamsRequest=t.QueryDenomTracesResponse=t.QueryDenomTracesRequest=t.QueryDenomTraceResponse=t.QueryDenomTraceRequest=t.protobufPackage=void 0;let n=r(86141),i=r(25879),o=r(46554),a=r(99133);function s(){return{hash:""}}function l(){return{denomTrace:void 0}}function u(){return{pagination:void 0}}function d(){return{denomTraces:[],pagination:void 0}}function c(){return{}}function p(){return{params:void 0}}function f(){return{trace:""}}function h(){return{hash:""}}function g(){return{portId:"",channelId:""}}function m(){return{escrowAddress:""}}t.protobufPackage="ibc.applications.transfer.v1",t.QueryDenomTraceRequest={typeUrl:"/ibc.applications.transfer.v1.QueryDenomTraceRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.hash&&t.uint32(10).string(e.hash),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=s();for(;r.pos>>3==1?i.hash=r.string():r.skipType(7&e)}return i},fromJSON(e){let t=s();return(0,a.isSet)(e.hash)&&(t.hash=String(e.hash)),t},toJSON(e){let t={};return void 0!==e.hash&&(t.hash=e.hash),t},fromPartial(e){var t;let r=s();return r.hash=null!==(t=e.hash)&&void 0!==t?t:"",r}},t.QueryDenomTraceResponse={typeUrl:"/ibc.applications.transfer.v1.QueryDenomTraceResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return void 0!==e.denomTrace&&i.DenomTrace.encode(e.denomTrace,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,a=l();for(;r.pos>>3==1?a.denomTrace=i.DenomTrace.decode(r,r.uint32()):r.skipType(7&e)}return a},fromJSON(e){let t=l();return(0,a.isSet)(e.denomTrace)&&(t.denomTrace=i.DenomTrace.fromJSON(e.denomTrace)),t},toJSON(e){let t={};return void 0!==e.denomTrace&&(t.denomTrace=e.denomTrace?i.DenomTrace.toJSON(e.denomTrace):void 0),t},fromPartial(e){let t=l();return void 0!==e.denomTrace&&null!==e.denomTrace&&(t.denomTrace=i.DenomTrace.fromPartial(e.denomTrace)),t}},t.QueryDenomTracesRequest={typeUrl:"/ibc.applications.transfer.v1.QueryDenomTracesRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return void 0!==e.pagination&&n.PageRequest.encode(e.pagination,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=u();for(;r.pos>>3==1?a.pagination=n.PageRequest.decode(r,r.uint32()):r.skipType(7&e)}return a},fromJSON(e){let t=u();return(0,a.isSet)(e.pagination)&&(t.pagination=n.PageRequest.fromJSON(e.pagination)),t},toJSON(e){let t={};return void 0!==e.pagination&&(t.pagination=e.pagination?n.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){let t=u();return void 0!==e.pagination&&null!==e.pagination&&(t.pagination=n.PageRequest.fromPartial(e.pagination)),t}},t.QueryDenomTracesResponse={typeUrl:"/ibc.applications.transfer.v1.QueryDenomTracesResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of e.denomTraces)i.DenomTrace.encode(r,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&n.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),a=void 0===t?r.len:r.pos+t,s=d();for(;r.pos>>3){case 1:s.denomTraces.push(i.DenomTrace.decode(r,r.uint32()));break;case 2:s.pagination=n.PageResponse.decode(r,r.uint32());break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=d();return Array.isArray(null==e?void 0:e.denomTraces)&&(t.denomTraces=e.denomTraces.map(e=>i.DenomTrace.fromJSON(e))),(0,a.isSet)(e.pagination)&&(t.pagination=n.PageResponse.fromJSON(e.pagination)),t},toJSON(e){let t={};return e.denomTraces?t.denomTraces=e.denomTraces.map(e=>e?i.DenomTrace.toJSON(e):void 0):t.denomTraces=[],void 0!==e.pagination&&(t.pagination=e.pagination?n.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=d();return r.denomTraces=(null===(t=e.denomTraces)||void 0===t?void 0:t.map(e=>i.DenomTrace.fromPartial(e)))||[],void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageResponse.fromPartial(e.pagination)),r}},t.QueryParamsRequest={typeUrl:"/ibc.applications.transfer.v1.QueryParamsRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=c();for(;r.posc(),toJSON:e=>({}),fromPartial:e=>c()},t.QueryParamsResponse={typeUrl:"/ibc.applications.transfer.v1.QueryParamsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return void 0!==e.params&&i.Params.encode(e.params,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,a=p();for(;r.pos>>3==1?a.params=i.Params.decode(r,r.uint32()):r.skipType(7&e)}return a},fromJSON(e){let t=p();return(0,a.isSet)(e.params)&&(t.params=i.Params.fromJSON(e.params)),t},toJSON(e){let t={};return void 0!==e.params&&(t.params=e.params?i.Params.toJSON(e.params):void 0),t},fromPartial(e){let t=p();return void 0!==e.params&&null!==e.params&&(t.params=i.Params.fromPartial(e.params)),t}},t.QueryDenomHashRequest={typeUrl:"/ibc.applications.transfer.v1.QueryDenomHashRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.trace&&t.uint32(10).string(e.trace),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=f();for(;r.pos>>3==1?i.trace=r.string():r.skipType(7&e)}return i},fromJSON(e){let t=f();return(0,a.isSet)(e.trace)&&(t.trace=String(e.trace)),t},toJSON(e){let t={};return void 0!==e.trace&&(t.trace=e.trace),t},fromPartial(e){var t;let r=f();return r.trace=null!==(t=e.trace)&&void 0!==t?t:"",r}},t.QueryDenomHashResponse={typeUrl:"/ibc.applications.transfer.v1.QueryDenomHashResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.hash&&t.uint32(10).string(e.hash),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=h();for(;r.pos>>3==1?i.hash=r.string():r.skipType(7&e)}return i},fromJSON(e){let t=h();return(0,a.isSet)(e.hash)&&(t.hash=String(e.hash)),t},toJSON(e){let t={};return void 0!==e.hash&&(t.hash=e.hash),t},fromPartial(e){var t;let r=h();return r.hash=null!==(t=e.hash)&&void 0!==t?t:"",r}},t.QueryEscrowAddressRequest={typeUrl:"/ibc.applications.transfer.v1.QueryEscrowAddressRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.portId&&t.uint32(10).string(e.portId),""!==e.channelId&&t.uint32(18).string(e.channelId),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=g();for(;r.pos>>3){case 1:i.portId=r.string();break;case 2:i.channelId=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=g();return(0,a.isSet)(e.portId)&&(t.portId=String(e.portId)),(0,a.isSet)(e.channelId)&&(t.channelId=String(e.channelId)),t},toJSON(e){let t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.channelId&&(t.channelId=e.channelId),t},fromPartial(e){var t,r;let n=g();return n.portId=null!==(t=e.portId)&&void 0!==t?t:"",n.channelId=null!==(r=e.channelId)&&void 0!==r?r:"",n}},t.QueryEscrowAddressResponse={typeUrl:"/ibc.applications.transfer.v1.QueryEscrowAddressResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.escrowAddress&&t.uint32(10).string(e.escrowAddress),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=m();for(;r.pos>>3==1?i.escrowAddress=r.string():r.skipType(7&e)}return i},fromJSON(e){let t=m();return(0,a.isSet)(e.escrowAddress)&&(t.escrowAddress=String(e.escrowAddress)),t},toJSON(e){let t={};return void 0!==e.escrowAddress&&(t.escrowAddress=e.escrowAddress),t},fromPartial(e){var t;let r=m();return r.escrowAddress=null!==(t=e.escrowAddress)&&void 0!==t?t:"",r}};class y{DenomTrace(e){let r=t.QueryDenomTraceRequest.encode(e).finish();return this.rpc.request("ibc.applications.transfer.v1.Query","DenomTrace",r).then(e=>t.QueryDenomTraceResponse.decode(new o.BinaryReader(e)))}DenomTraces(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{pagination:n.PageRequest.fromPartial({})},r=t.QueryDenomTracesRequest.encode(e).finish();return this.rpc.request("ibc.applications.transfer.v1.Query","DenomTraces",r).then(e=>t.QueryDenomTracesResponse.decode(new o.BinaryReader(e)))}Params(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.QueryParamsRequest.encode(e).finish();return this.rpc.request("ibc.applications.transfer.v1.Query","Params",r).then(e=>t.QueryParamsResponse.decode(new o.BinaryReader(e)))}DenomHash(e){let r=t.QueryDenomHashRequest.encode(e).finish();return this.rpc.request("ibc.applications.transfer.v1.Query","DenomHash",r).then(e=>t.QueryDenomHashResponse.decode(new o.BinaryReader(e)))}EscrowAddress(e){let r=t.QueryEscrowAddressRequest.encode(e).finish();return this.rpc.request("ibc.applications.transfer.v1.Query","EscrowAddress",r).then(e=>t.QueryEscrowAddressResponse.decode(new o.BinaryReader(e)))}constructor(e){this.rpc=e,this.DenomTrace=this.DenomTrace.bind(this),this.DenomTraces=this.DenomTraces.bind(this),this.Params=this.Params.bind(this),this.DenomHash=this.DenomHash.bind(this),this.EscrowAddress=this.EscrowAddress.bind(this)}}t.QueryClientImpl=y},25879:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Params=t.DenomTrace=t.protobufPackage=void 0;let n=r(46554),i=r(99133);function o(){return{path:"",baseDenom:""}}function a(){return{sendEnabled:!1,receiveEnabled:!1}}t.protobufPackage="ibc.applications.transfer.v1",t.DenomTrace={typeUrl:"/ibc.applications.transfer.v1.DenomTrace",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.BinaryWriter.create();return""!==e.path&&t.uint32(10).string(e.path),""!==e.baseDenom&&t.uint32(18).string(e.baseDenom),t},decode(e,t){let r=e instanceof n.BinaryReader?e:new n.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=o();for(;r.pos>>3){case 1:a.path=r.string();break;case 2:a.baseDenom=r.string();break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=o();return(0,i.isSet)(e.path)&&(t.path=String(e.path)),(0,i.isSet)(e.baseDenom)&&(t.baseDenom=String(e.baseDenom)),t},toJSON(e){let t={};return void 0!==e.path&&(t.path=e.path),void 0!==e.baseDenom&&(t.baseDenom=e.baseDenom),t},fromPartial(e){var t,r;let n=o();return n.path=null!==(t=e.path)&&void 0!==t?t:"",n.baseDenom=null!==(r=e.baseDenom)&&void 0!==r?r:"",n}},t.Params={typeUrl:"/ibc.applications.transfer.v1.Params",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.BinaryWriter.create();return!0===e.sendEnabled&&t.uint32(8).bool(e.sendEnabled),!0===e.receiveEnabled&&t.uint32(16).bool(e.receiveEnabled),t},decode(e,t){let r=e instanceof n.BinaryReader?e:new n.BinaryReader(e),i=void 0===t?r.len:r.pos+t,o=a();for(;r.pos>>3){case 1:o.sendEnabled=r.bool();break;case 2:o.receiveEnabled=r.bool();break;default:r.skipType(7&e)}}return o},fromJSON(e){let t=a();return(0,i.isSet)(e.sendEnabled)&&(t.sendEnabled=!!e.sendEnabled),(0,i.isSet)(e.receiveEnabled)&&(t.receiveEnabled=!!e.receiveEnabled),t},toJSON(e){let t={};return void 0!==e.sendEnabled&&(t.sendEnabled=e.sendEnabled),void 0!==e.receiveEnabled&&(t.receiveEnabled=e.receiveEnabled),t},fromPartial(e){var t,r;let n=a();return n.sendEnabled=null!==(t=e.sendEnabled)&&void 0!==t&&t,n.receiveEnabled=null!==(r=e.receiveEnabled)&&void 0!==r&&r,n}}},7337:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MsgClientImpl=t.MsgTransferResponse=t.MsgTransfer=t.protobufPackage=void 0;let n=r(14841),i=r(23489),o=r(46554),a=r(99133);function s(){return{sourcePort:"",sourceChannel:"",token:n.Coin.fromPartial({}),sender:"",receiver:"",timeoutHeight:i.Height.fromPartial({}),timeoutTimestamp:BigInt(0),memo:""}}function l(){return{sequence:BigInt(0)}}t.protobufPackage="ibc.applications.transfer.v1",t.MsgTransfer={typeUrl:"/ibc.applications.transfer.v1.MsgTransfer",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.sourcePort&&t.uint32(10).string(e.sourcePort),""!==e.sourceChannel&&t.uint32(18).string(e.sourceChannel),void 0!==e.token&&n.Coin.encode(e.token,t.uint32(26).fork()).ldelim(),""!==e.sender&&t.uint32(34).string(e.sender),""!==e.receiver&&t.uint32(42).string(e.receiver),void 0!==e.timeoutHeight&&i.Height.encode(e.timeoutHeight,t.uint32(50).fork()).ldelim(),e.timeoutTimestamp!==BigInt(0)&&t.uint32(56).uint64(e.timeoutTimestamp),""!==e.memo&&t.uint32(66).string(e.memo),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),a=void 0===t?r.len:r.pos+t,l=s();for(;r.pos>>3){case 1:l.sourcePort=r.string();break;case 2:l.sourceChannel=r.string();break;case 3:l.token=n.Coin.decode(r,r.uint32());break;case 4:l.sender=r.string();break;case 5:l.receiver=r.string();break;case 6:l.timeoutHeight=i.Height.decode(r,r.uint32());break;case 7:l.timeoutTimestamp=r.uint64();break;case 8:l.memo=r.string();break;default:r.skipType(7&e)}}return l},fromJSON(e){let t=s();return(0,a.isSet)(e.sourcePort)&&(t.sourcePort=String(e.sourcePort)),(0,a.isSet)(e.sourceChannel)&&(t.sourceChannel=String(e.sourceChannel)),(0,a.isSet)(e.token)&&(t.token=n.Coin.fromJSON(e.token)),(0,a.isSet)(e.sender)&&(t.sender=String(e.sender)),(0,a.isSet)(e.receiver)&&(t.receiver=String(e.receiver)),(0,a.isSet)(e.timeoutHeight)&&(t.timeoutHeight=i.Height.fromJSON(e.timeoutHeight)),(0,a.isSet)(e.timeoutTimestamp)&&(t.timeoutTimestamp=BigInt(e.timeoutTimestamp.toString())),(0,a.isSet)(e.memo)&&(t.memo=String(e.memo)),t},toJSON(e){let t={};return void 0!==e.sourcePort&&(t.sourcePort=e.sourcePort),void 0!==e.sourceChannel&&(t.sourceChannel=e.sourceChannel),void 0!==e.token&&(t.token=e.token?n.Coin.toJSON(e.token):void 0),void 0!==e.sender&&(t.sender=e.sender),void 0!==e.receiver&&(t.receiver=e.receiver),void 0!==e.timeoutHeight&&(t.timeoutHeight=e.timeoutHeight?i.Height.toJSON(e.timeoutHeight):void 0),void 0!==e.timeoutTimestamp&&(t.timeoutTimestamp=(e.timeoutTimestamp||BigInt(0)).toString()),void 0!==e.memo&&(t.memo=e.memo),t},fromPartial(e){var t,r,o,a,l;let u=s();return u.sourcePort=null!==(t=e.sourcePort)&&void 0!==t?t:"",u.sourceChannel=null!==(r=e.sourceChannel)&&void 0!==r?r:"",void 0!==e.token&&null!==e.token&&(u.token=n.Coin.fromPartial(e.token)),u.sender=null!==(o=e.sender)&&void 0!==o?o:"",u.receiver=null!==(a=e.receiver)&&void 0!==a?a:"",void 0!==e.timeoutHeight&&null!==e.timeoutHeight&&(u.timeoutHeight=i.Height.fromPartial(e.timeoutHeight)),void 0!==e.timeoutTimestamp&&null!==e.timeoutTimestamp&&(u.timeoutTimestamp=BigInt(e.timeoutTimestamp.toString())),u.memo=null!==(l=e.memo)&&void 0!==l?l:"",u}},t.MsgTransferResponse={typeUrl:"/ibc.applications.transfer.v1.MsgTransferResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return e.sequence!==BigInt(0)&&t.uint32(8).uint64(e.sequence),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=l();for(;r.pos>>3==1?i.sequence=r.uint64():r.skipType(7&e)}return i},fromJSON(e){let t=l();return(0,a.isSet)(e.sequence)&&(t.sequence=BigInt(e.sequence.toString())),t},toJSON(e){let t={};return void 0!==e.sequence&&(t.sequence=(e.sequence||BigInt(0)).toString()),t},fromPartial(e){let t=l();return void 0!==e.sequence&&null!==e.sequence&&(t.sequence=BigInt(e.sequence.toString())),t}};class u{Transfer(e){let r=t.MsgTransfer.encode(e).finish();return this.rpc.request("ibc.applications.transfer.v1.Msg","Transfer",r).then(e=>t.MsgTransferResponse.decode(new o.BinaryReader(e)))}constructor(e){this.rpc=e,this.Transfer=this.Transfer.bind(this)}}t.MsgClientImpl=u},83639:function(e,t,r){"use strict";var n,i;Object.defineProperty(t,"__esModule",{value:!0}),t.Acknowledgement=t.PacketId=t.PacketState=t.Packet=t.Counterparty=t.IdentifiedChannel=t.Channel=t.orderToJSON=t.orderFromJSON=t.Order=t.stateToJSON=t.stateFromJSON=t.State=t.protobufPackage=void 0;let o=r(23489),a=r(46554),s=r(99133);function l(e){switch(e){case 0:case"STATE_UNINITIALIZED_UNSPECIFIED":return n.STATE_UNINITIALIZED_UNSPECIFIED;case 1:case"STATE_INIT":return n.STATE_INIT;case 2:case"STATE_TRYOPEN":return n.STATE_TRYOPEN;case 3:case"STATE_OPEN":return n.STATE_OPEN;case 4:case"STATE_CLOSED":return n.STATE_CLOSED;default:return n.UNRECOGNIZED}}function u(e){switch(e){case n.STATE_UNINITIALIZED_UNSPECIFIED:return"STATE_UNINITIALIZED_UNSPECIFIED";case n.STATE_INIT:return"STATE_INIT";case n.STATE_TRYOPEN:return"STATE_TRYOPEN";case n.STATE_OPEN:return"STATE_OPEN";case n.STATE_CLOSED:return"STATE_CLOSED";case n.UNRECOGNIZED:default:return"UNRECOGNIZED"}}function d(e){switch(e){case 0:case"ORDER_NONE_UNSPECIFIED":return i.ORDER_NONE_UNSPECIFIED;case 1:case"ORDER_UNORDERED":return i.ORDER_UNORDERED;case 2:case"ORDER_ORDERED":return i.ORDER_ORDERED;default:return i.UNRECOGNIZED}}function c(e){switch(e){case i.ORDER_NONE_UNSPECIFIED:return"ORDER_NONE_UNSPECIFIED";case i.ORDER_UNORDERED:return"ORDER_UNORDERED";case i.ORDER_ORDERED:return"ORDER_ORDERED";case i.UNRECOGNIZED:default:return"UNRECOGNIZED"}}function p(){return{state:0,ordering:0,counterparty:t.Counterparty.fromPartial({}),connectionHops:[],version:""}}function f(){return{state:0,ordering:0,counterparty:t.Counterparty.fromPartial({}),connectionHops:[],version:"",portId:"",channelId:""}}function h(){return{portId:"",channelId:""}}function g(){return{sequence:BigInt(0),sourcePort:"",sourceChannel:"",destinationPort:"",destinationChannel:"",data:new Uint8Array,timeoutHeight:o.Height.fromPartial({}),timeoutTimestamp:BigInt(0)}}function m(){return{portId:"",channelId:"",sequence:BigInt(0),data:new Uint8Array}}function y(){return{portId:"",channelId:"",sequence:BigInt(0)}}function v(){return{result:void 0,error:void 0}}t.protobufPackage="ibc.core.channel.v1",function(e){e[e.STATE_UNINITIALIZED_UNSPECIFIED=0]="STATE_UNINITIALIZED_UNSPECIFIED",e[e.STATE_INIT=1]="STATE_INIT",e[e.STATE_TRYOPEN=2]="STATE_TRYOPEN",e[e.STATE_OPEN=3]="STATE_OPEN",e[e.STATE_CLOSED=4]="STATE_CLOSED",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(n||(t.State=n={})),t.stateFromJSON=l,t.stateToJSON=u,function(e){e[e.ORDER_NONE_UNSPECIFIED=0]="ORDER_NONE_UNSPECIFIED",e[e.ORDER_UNORDERED=1]="ORDER_UNORDERED",e[e.ORDER_ORDERED=2]="ORDER_ORDERED",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(i||(t.Order=i={})),t.orderFromJSON=d,t.orderToJSON=c,t.Channel={typeUrl:"/ibc.core.channel.v1.Channel",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();for(let n of(0!==e.state&&r.uint32(8).int32(e.state),0!==e.ordering&&r.uint32(16).int32(e.ordering),void 0!==e.counterparty&&t.Counterparty.encode(e.counterparty,r.uint32(26).fork()).ldelim(),e.connectionHops))r.uint32(34).string(n);return""!==e.version&&r.uint32(42).string(e.version),r},decode(e,r){let n=e instanceof a.BinaryReader?e:new a.BinaryReader(e),i=void 0===r?n.len:n.pos+r,o=p();for(;n.pos>>3){case 1:o.state=n.int32();break;case 2:o.ordering=n.int32();break;case 3:o.counterparty=t.Counterparty.decode(n,n.uint32());break;case 4:o.connectionHops.push(n.string());break;case 5:o.version=n.string();break;default:n.skipType(7&e)}}return o},fromJSON(e){let r=p();return(0,s.isSet)(e.state)&&(r.state=l(e.state)),(0,s.isSet)(e.ordering)&&(r.ordering=d(e.ordering)),(0,s.isSet)(e.counterparty)&&(r.counterparty=t.Counterparty.fromJSON(e.counterparty)),Array.isArray(null==e?void 0:e.connectionHops)&&(r.connectionHops=e.connectionHops.map(e=>String(e))),(0,s.isSet)(e.version)&&(r.version=String(e.version)),r},toJSON(e){let r={};return void 0!==e.state&&(r.state=u(e.state)),void 0!==e.ordering&&(r.ordering=c(e.ordering)),void 0!==e.counterparty&&(r.counterparty=e.counterparty?t.Counterparty.toJSON(e.counterparty):void 0),e.connectionHops?r.connectionHops=e.connectionHops.map(e=>e):r.connectionHops=[],void 0!==e.version&&(r.version=e.version),r},fromPartial(e){var r,n,i,o;let a=p();return a.state=null!==(n=e.state)&&void 0!==n?n:0,a.ordering=null!==(i=e.ordering)&&void 0!==i?i:0,void 0!==e.counterparty&&null!==e.counterparty&&(a.counterparty=t.Counterparty.fromPartial(e.counterparty)),a.connectionHops=(null===(r=e.connectionHops)||void 0===r?void 0:r.map(e=>e))||[],a.version=null!==(o=e.version)&&void 0!==o?o:"",a}},t.IdentifiedChannel={typeUrl:"/ibc.core.channel.v1.IdentifiedChannel",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();for(let n of(0!==e.state&&r.uint32(8).int32(e.state),0!==e.ordering&&r.uint32(16).int32(e.ordering),void 0!==e.counterparty&&t.Counterparty.encode(e.counterparty,r.uint32(26).fork()).ldelim(),e.connectionHops))r.uint32(34).string(n);return""!==e.version&&r.uint32(42).string(e.version),""!==e.portId&&r.uint32(50).string(e.portId),""!==e.channelId&&r.uint32(58).string(e.channelId),r},decode(e,r){let n=e instanceof a.BinaryReader?e:new a.BinaryReader(e),i=void 0===r?n.len:n.pos+r,o=f();for(;n.pos>>3){case 1:o.state=n.int32();break;case 2:o.ordering=n.int32();break;case 3:o.counterparty=t.Counterparty.decode(n,n.uint32());break;case 4:o.connectionHops.push(n.string());break;case 5:o.version=n.string();break;case 6:o.portId=n.string();break;case 7:o.channelId=n.string();break;default:n.skipType(7&e)}}return o},fromJSON(e){let r=f();return(0,s.isSet)(e.state)&&(r.state=l(e.state)),(0,s.isSet)(e.ordering)&&(r.ordering=d(e.ordering)),(0,s.isSet)(e.counterparty)&&(r.counterparty=t.Counterparty.fromJSON(e.counterparty)),Array.isArray(null==e?void 0:e.connectionHops)&&(r.connectionHops=e.connectionHops.map(e=>String(e))),(0,s.isSet)(e.version)&&(r.version=String(e.version)),(0,s.isSet)(e.portId)&&(r.portId=String(e.portId)),(0,s.isSet)(e.channelId)&&(r.channelId=String(e.channelId)),r},toJSON(e){let r={};return void 0!==e.state&&(r.state=u(e.state)),void 0!==e.ordering&&(r.ordering=c(e.ordering)),void 0!==e.counterparty&&(r.counterparty=e.counterparty?t.Counterparty.toJSON(e.counterparty):void 0),e.connectionHops?r.connectionHops=e.connectionHops.map(e=>e):r.connectionHops=[],void 0!==e.version&&(r.version=e.version),void 0!==e.portId&&(r.portId=e.portId),void 0!==e.channelId&&(r.channelId=e.channelId),r},fromPartial(e){var r,n,i,o,a,s;let l=f();return l.state=null!==(n=e.state)&&void 0!==n?n:0,l.ordering=null!==(i=e.ordering)&&void 0!==i?i:0,void 0!==e.counterparty&&null!==e.counterparty&&(l.counterparty=t.Counterparty.fromPartial(e.counterparty)),l.connectionHops=(null===(r=e.connectionHops)||void 0===r?void 0:r.map(e=>e))||[],l.version=null!==(o=e.version)&&void 0!==o?o:"",l.portId=null!==(a=e.portId)&&void 0!==a?a:"",l.channelId=null!==(s=e.channelId)&&void 0!==s?s:"",l}},t.Counterparty={typeUrl:"/ibc.core.channel.v1.Counterparty",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.portId&&t.uint32(10).string(e.portId),""!==e.channelId&&t.uint32(18).string(e.channelId),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=h();for(;r.pos>>3){case 1:i.portId=r.string();break;case 2:i.channelId=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=h();return(0,s.isSet)(e.portId)&&(t.portId=String(e.portId)),(0,s.isSet)(e.channelId)&&(t.channelId=String(e.channelId)),t},toJSON(e){let t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.channelId&&(t.channelId=e.channelId),t},fromPartial(e){var t,r;let n=h();return n.portId=null!==(t=e.portId)&&void 0!==t?t:"",n.channelId=null!==(r=e.channelId)&&void 0!==r?r:"",n}},t.Packet={typeUrl:"/ibc.core.channel.v1.Packet",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return e.sequence!==BigInt(0)&&t.uint32(8).uint64(e.sequence),""!==e.sourcePort&&t.uint32(18).string(e.sourcePort),""!==e.sourceChannel&&t.uint32(26).string(e.sourceChannel),""!==e.destinationPort&&t.uint32(34).string(e.destinationPort),""!==e.destinationChannel&&t.uint32(42).string(e.destinationChannel),0!==e.data.length&&t.uint32(50).bytes(e.data),void 0!==e.timeoutHeight&&o.Height.encode(e.timeoutHeight,t.uint32(58).fork()).ldelim(),e.timeoutTimestamp!==BigInt(0)&&t.uint32(64).uint64(e.timeoutTimestamp),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=g();for(;r.pos>>3){case 1:i.sequence=r.uint64();break;case 2:i.sourcePort=r.string();break;case 3:i.sourceChannel=r.string();break;case 4:i.destinationPort=r.string();break;case 5:i.destinationChannel=r.string();break;case 6:i.data=r.bytes();break;case 7:i.timeoutHeight=o.Height.decode(r,r.uint32());break;case 8:i.timeoutTimestamp=r.uint64();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=g();return(0,s.isSet)(e.sequence)&&(t.sequence=BigInt(e.sequence.toString())),(0,s.isSet)(e.sourcePort)&&(t.sourcePort=String(e.sourcePort)),(0,s.isSet)(e.sourceChannel)&&(t.sourceChannel=String(e.sourceChannel)),(0,s.isSet)(e.destinationPort)&&(t.destinationPort=String(e.destinationPort)),(0,s.isSet)(e.destinationChannel)&&(t.destinationChannel=String(e.destinationChannel)),(0,s.isSet)(e.data)&&(t.data=(0,s.bytesFromBase64)(e.data)),(0,s.isSet)(e.timeoutHeight)&&(t.timeoutHeight=o.Height.fromJSON(e.timeoutHeight)),(0,s.isSet)(e.timeoutTimestamp)&&(t.timeoutTimestamp=BigInt(e.timeoutTimestamp.toString())),t},toJSON(e){let t={};return void 0!==e.sequence&&(t.sequence=(e.sequence||BigInt(0)).toString()),void 0!==e.sourcePort&&(t.sourcePort=e.sourcePort),void 0!==e.sourceChannel&&(t.sourceChannel=e.sourceChannel),void 0!==e.destinationPort&&(t.destinationPort=e.destinationPort),void 0!==e.destinationChannel&&(t.destinationChannel=e.destinationChannel),void 0!==e.data&&(t.data=(0,s.base64FromBytes)(void 0!==e.data?e.data:new Uint8Array)),void 0!==e.timeoutHeight&&(t.timeoutHeight=e.timeoutHeight?o.Height.toJSON(e.timeoutHeight):void 0),void 0!==e.timeoutTimestamp&&(t.timeoutTimestamp=(e.timeoutTimestamp||BigInt(0)).toString()),t},fromPartial(e){var t,r,n,i,a;let s=g();return void 0!==e.sequence&&null!==e.sequence&&(s.sequence=BigInt(e.sequence.toString())),s.sourcePort=null!==(t=e.sourcePort)&&void 0!==t?t:"",s.sourceChannel=null!==(r=e.sourceChannel)&&void 0!==r?r:"",s.destinationPort=null!==(n=e.destinationPort)&&void 0!==n?n:"",s.destinationChannel=null!==(i=e.destinationChannel)&&void 0!==i?i:"",s.data=null!==(a=e.data)&&void 0!==a?a:new Uint8Array,void 0!==e.timeoutHeight&&null!==e.timeoutHeight&&(s.timeoutHeight=o.Height.fromPartial(e.timeoutHeight)),void 0!==e.timeoutTimestamp&&null!==e.timeoutTimestamp&&(s.timeoutTimestamp=BigInt(e.timeoutTimestamp.toString())),s}},t.PacketState={typeUrl:"/ibc.core.channel.v1.PacketState",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.portId&&t.uint32(10).string(e.portId),""!==e.channelId&&t.uint32(18).string(e.channelId),e.sequence!==BigInt(0)&&t.uint32(24).uint64(e.sequence),0!==e.data.length&&t.uint32(34).bytes(e.data),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=m();for(;r.pos>>3){case 1:i.portId=r.string();break;case 2:i.channelId=r.string();break;case 3:i.sequence=r.uint64();break;case 4:i.data=r.bytes();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=m();return(0,s.isSet)(e.portId)&&(t.portId=String(e.portId)),(0,s.isSet)(e.channelId)&&(t.channelId=String(e.channelId)),(0,s.isSet)(e.sequence)&&(t.sequence=BigInt(e.sequence.toString())),(0,s.isSet)(e.data)&&(t.data=(0,s.bytesFromBase64)(e.data)),t},toJSON(e){let t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.channelId&&(t.channelId=e.channelId),void 0!==e.sequence&&(t.sequence=(e.sequence||BigInt(0)).toString()),void 0!==e.data&&(t.data=(0,s.base64FromBytes)(void 0!==e.data?e.data:new Uint8Array)),t},fromPartial(e){var t,r,n;let i=m();return i.portId=null!==(t=e.portId)&&void 0!==t?t:"",i.channelId=null!==(r=e.channelId)&&void 0!==r?r:"",void 0!==e.sequence&&null!==e.sequence&&(i.sequence=BigInt(e.sequence.toString())),i.data=null!==(n=e.data)&&void 0!==n?n:new Uint8Array,i}},t.PacketId={typeUrl:"/ibc.core.channel.v1.PacketId",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.portId&&t.uint32(10).string(e.portId),""!==e.channelId&&t.uint32(18).string(e.channelId),e.sequence!==BigInt(0)&&t.uint32(24).uint64(e.sequence),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=y();for(;r.pos>>3){case 1:i.portId=r.string();break;case 2:i.channelId=r.string();break;case 3:i.sequence=r.uint64();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=y();return(0,s.isSet)(e.portId)&&(t.portId=String(e.portId)),(0,s.isSet)(e.channelId)&&(t.channelId=String(e.channelId)),(0,s.isSet)(e.sequence)&&(t.sequence=BigInt(e.sequence.toString())),t},toJSON(e){let t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.channelId&&(t.channelId=e.channelId),void 0!==e.sequence&&(t.sequence=(e.sequence||BigInt(0)).toString()),t},fromPartial(e){var t,r;let n=y();return n.portId=null!==(t=e.portId)&&void 0!==t?t:"",n.channelId=null!==(r=e.channelId)&&void 0!==r?r:"",void 0!==e.sequence&&null!==e.sequence&&(n.sequence=BigInt(e.sequence.toString())),n}},t.Acknowledgement={typeUrl:"/ibc.core.channel.v1.Acknowledgement",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return void 0!==e.result&&t.uint32(170).bytes(e.result),void 0!==e.error&&t.uint32(178).string(e.error),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=v();for(;r.pos>>3){case 21:i.result=r.bytes();break;case 22:i.error=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=v();return(0,s.isSet)(e.result)&&(t.result=(0,s.bytesFromBase64)(e.result)),(0,s.isSet)(e.error)&&(t.error=String(e.error)),t},toJSON(e){let t={};return void 0!==e.result&&(t.result=void 0!==e.result?(0,s.base64FromBytes)(e.result):void 0),void 0!==e.error&&(t.error=e.error),t},fromPartial(e){var t,r;let n=v();return n.result=null!==(t=e.result)&&void 0!==t?t:void 0,n.error=null!==(r=e.error)&&void 0!==r?r:void 0,n}}},50846:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QueryClientImpl=t.QueryNextSequenceReceiveResponse=t.QueryNextSequenceReceiveRequest=t.QueryUnreceivedAcksResponse=t.QueryUnreceivedAcksRequest=t.QueryUnreceivedPacketsResponse=t.QueryUnreceivedPacketsRequest=t.QueryPacketAcknowledgementsResponse=t.QueryPacketAcknowledgementsRequest=t.QueryPacketAcknowledgementResponse=t.QueryPacketAcknowledgementRequest=t.QueryPacketReceiptResponse=t.QueryPacketReceiptRequest=t.QueryPacketCommitmentsResponse=t.QueryPacketCommitmentsRequest=t.QueryPacketCommitmentResponse=t.QueryPacketCommitmentRequest=t.QueryChannelConsensusStateResponse=t.QueryChannelConsensusStateRequest=t.QueryChannelClientStateResponse=t.QueryChannelClientStateRequest=t.QueryConnectionChannelsResponse=t.QueryConnectionChannelsRequest=t.QueryChannelsResponse=t.QueryChannelsRequest=t.QueryChannelResponse=t.QueryChannelRequest=t.protobufPackage=void 0;let n=r(86141),i=r(83639),o=r(23489),a=r(11879),s=r(46554),l=r(99133);function u(){return{portId:"",channelId:""}}function d(){return{channel:void 0,proof:new Uint8Array,proofHeight:o.Height.fromPartial({})}}function c(){return{pagination:void 0}}function p(){return{channels:[],pagination:void 0,height:o.Height.fromPartial({})}}function f(){return{connection:"",pagination:void 0}}function h(){return{channels:[],pagination:void 0,height:o.Height.fromPartial({})}}function g(){return{portId:"",channelId:""}}function m(){return{identifiedClientState:void 0,proof:new Uint8Array,proofHeight:o.Height.fromPartial({})}}function y(){return{portId:"",channelId:"",revisionNumber:BigInt(0),revisionHeight:BigInt(0)}}function v(){return{consensusState:void 0,clientId:"",proof:new Uint8Array,proofHeight:o.Height.fromPartial({})}}function b(){return{portId:"",channelId:"",sequence:BigInt(0)}}function S(){return{commitment:new Uint8Array,proof:new Uint8Array,proofHeight:o.Height.fromPartial({})}}function w(){return{portId:"",channelId:"",pagination:void 0}}function _(){return{commitments:[],pagination:void 0,height:o.Height.fromPartial({})}}function k(){return{portId:"",channelId:"",sequence:BigInt(0)}}function O(){return{received:!1,proof:new Uint8Array,proofHeight:o.Height.fromPartial({})}}function P(){return{portId:"",channelId:"",sequence:BigInt(0)}}function A(){return{acknowledgement:new Uint8Array,proof:new Uint8Array,proofHeight:o.Height.fromPartial({})}}function I(){return{portId:"",channelId:"",pagination:void 0,packetCommitmentSequences:[]}}function R(){return{acknowledgements:[],pagination:void 0,height:o.Height.fromPartial({})}}function E(){return{portId:"",channelId:"",packetCommitmentSequences:[]}}function T(){return{sequences:[],height:o.Height.fromPartial({})}}function N(){return{portId:"",channelId:"",packetAckSequences:[]}}function x(){return{sequences:[],height:o.Height.fromPartial({})}}function B(){return{portId:"",channelId:""}}function C(){return{nextSequenceReceive:BigInt(0),proof:new Uint8Array,proofHeight:o.Height.fromPartial({})}}t.protobufPackage="ibc.core.channel.v1",t.QueryChannelRequest={typeUrl:"/ibc.core.channel.v1.QueryChannelRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return""!==e.portId&&t.uint32(10).string(e.portId),""!==e.channelId&&t.uint32(18).string(e.channelId),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=u();for(;r.pos>>3){case 1:i.portId=r.string();break;case 2:i.channelId=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=u();return(0,l.isSet)(e.portId)&&(t.portId=String(e.portId)),(0,l.isSet)(e.channelId)&&(t.channelId=String(e.channelId)),t},toJSON(e){let t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.channelId&&(t.channelId=e.channelId),t},fromPartial(e){var t,r;let n=u();return n.portId=null!==(t=e.portId)&&void 0!==t?t:"",n.channelId=null!==(r=e.channelId)&&void 0!==r?r:"",n}},t.QueryChannelResponse={typeUrl:"/ibc.core.channel.v1.QueryChannelResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return void 0!==e.channel&&i.Channel.encode(e.channel,t.uint32(10).fork()).ldelim(),0!==e.proof.length&&t.uint32(18).bytes(e.proof),void 0!==e.proofHeight&&o.Height.encode(e.proofHeight,t.uint32(26).fork()).ldelim(),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,a=d();for(;r.pos>>3){case 1:a.channel=i.Channel.decode(r,r.uint32());break;case 2:a.proof=r.bytes();break;case 3:a.proofHeight=o.Height.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=d();return(0,l.isSet)(e.channel)&&(t.channel=i.Channel.fromJSON(e.channel)),(0,l.isSet)(e.proof)&&(t.proof=(0,l.bytesFromBase64)(e.proof)),(0,l.isSet)(e.proofHeight)&&(t.proofHeight=o.Height.fromJSON(e.proofHeight)),t},toJSON(e){let t={};return void 0!==e.channel&&(t.channel=e.channel?i.Channel.toJSON(e.channel):void 0),void 0!==e.proof&&(t.proof=(0,l.base64FromBytes)(void 0!==e.proof?e.proof:new Uint8Array)),void 0!==e.proofHeight&&(t.proofHeight=e.proofHeight?o.Height.toJSON(e.proofHeight):void 0),t},fromPartial(e){var t;let r=d();return void 0!==e.channel&&null!==e.channel&&(r.channel=i.Channel.fromPartial(e.channel)),r.proof=null!==(t=e.proof)&&void 0!==t?t:new Uint8Array,void 0!==e.proofHeight&&null!==e.proofHeight&&(r.proofHeight=o.Height.fromPartial(e.proofHeight)),r}},t.QueryChannelsRequest={typeUrl:"/ibc.core.channel.v1.QueryChannelsRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return void 0!==e.pagination&&n.PageRequest.encode(e.pagination,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),i=void 0===t?r.len:r.pos+t,o=c();for(;r.pos>>3==1?o.pagination=n.PageRequest.decode(r,r.uint32()):r.skipType(7&e)}return o},fromJSON(e){let t=c();return(0,l.isSet)(e.pagination)&&(t.pagination=n.PageRequest.fromJSON(e.pagination)),t},toJSON(e){let t={};return void 0!==e.pagination&&(t.pagination=e.pagination?n.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){let t=c();return void 0!==e.pagination&&null!==e.pagination&&(t.pagination=n.PageRequest.fromPartial(e.pagination)),t}},t.QueryChannelsResponse={typeUrl:"/ibc.core.channel.v1.QueryChannelsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();for(let r of e.channels)i.IdentifiedChannel.encode(r,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&n.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),void 0!==e.height&&o.Height.encode(e.height,t.uint32(26).fork()).ldelim(),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),a=void 0===t?r.len:r.pos+t,l=p();for(;r.pos>>3){case 1:l.channels.push(i.IdentifiedChannel.decode(r,r.uint32()));break;case 2:l.pagination=n.PageResponse.decode(r,r.uint32());break;case 3:l.height=o.Height.decode(r,r.uint32());break;default:r.skipType(7&e)}}return l},fromJSON(e){let t=p();return Array.isArray(null==e?void 0:e.channels)&&(t.channels=e.channels.map(e=>i.IdentifiedChannel.fromJSON(e))),(0,l.isSet)(e.pagination)&&(t.pagination=n.PageResponse.fromJSON(e.pagination)),(0,l.isSet)(e.height)&&(t.height=o.Height.fromJSON(e.height)),t},toJSON(e){let t={};return e.channels?t.channels=e.channels.map(e=>e?i.IdentifiedChannel.toJSON(e):void 0):t.channels=[],void 0!==e.pagination&&(t.pagination=e.pagination?n.PageResponse.toJSON(e.pagination):void 0),void 0!==e.height&&(t.height=e.height?o.Height.toJSON(e.height):void 0),t},fromPartial(e){var t;let r=p();return r.channels=(null===(t=e.channels)||void 0===t?void 0:t.map(e=>i.IdentifiedChannel.fromPartial(e)))||[],void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageResponse.fromPartial(e.pagination)),void 0!==e.height&&null!==e.height&&(r.height=o.Height.fromPartial(e.height)),r}},t.QueryConnectionChannelsRequest={typeUrl:"/ibc.core.channel.v1.QueryConnectionChannelsRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return""!==e.connection&&t.uint32(10).string(e.connection),void 0!==e.pagination&&n.PageRequest.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),i=void 0===t?r.len:r.pos+t,o=f();for(;r.pos>>3){case 1:o.connection=r.string();break;case 2:o.pagination=n.PageRequest.decode(r,r.uint32());break;default:r.skipType(7&e)}}return o},fromJSON(e){let t=f();return(0,l.isSet)(e.connection)&&(t.connection=String(e.connection)),(0,l.isSet)(e.pagination)&&(t.pagination=n.PageRequest.fromJSON(e.pagination)),t},toJSON(e){let t={};return void 0!==e.connection&&(t.connection=e.connection),void 0!==e.pagination&&(t.pagination=e.pagination?n.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=f();return r.connection=null!==(t=e.connection)&&void 0!==t?t:"",void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageRequest.fromPartial(e.pagination)),r}},t.QueryConnectionChannelsResponse={typeUrl:"/ibc.core.channel.v1.QueryConnectionChannelsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();for(let r of e.channels)i.IdentifiedChannel.encode(r,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&n.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),void 0!==e.height&&o.Height.encode(e.height,t.uint32(26).fork()).ldelim(),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),a=void 0===t?r.len:r.pos+t,l=h();for(;r.pos>>3){case 1:l.channels.push(i.IdentifiedChannel.decode(r,r.uint32()));break;case 2:l.pagination=n.PageResponse.decode(r,r.uint32());break;case 3:l.height=o.Height.decode(r,r.uint32());break;default:r.skipType(7&e)}}return l},fromJSON(e){let t=h();return Array.isArray(null==e?void 0:e.channels)&&(t.channels=e.channels.map(e=>i.IdentifiedChannel.fromJSON(e))),(0,l.isSet)(e.pagination)&&(t.pagination=n.PageResponse.fromJSON(e.pagination)),(0,l.isSet)(e.height)&&(t.height=o.Height.fromJSON(e.height)),t},toJSON(e){let t={};return e.channels?t.channels=e.channels.map(e=>e?i.IdentifiedChannel.toJSON(e):void 0):t.channels=[],void 0!==e.pagination&&(t.pagination=e.pagination?n.PageResponse.toJSON(e.pagination):void 0),void 0!==e.height&&(t.height=e.height?o.Height.toJSON(e.height):void 0),t},fromPartial(e){var t;let r=h();return r.channels=(null===(t=e.channels)||void 0===t?void 0:t.map(e=>i.IdentifiedChannel.fromPartial(e)))||[],void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageResponse.fromPartial(e.pagination)),void 0!==e.height&&null!==e.height&&(r.height=o.Height.fromPartial(e.height)),r}},t.QueryChannelClientStateRequest={typeUrl:"/ibc.core.channel.v1.QueryChannelClientStateRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return""!==e.portId&&t.uint32(10).string(e.portId),""!==e.channelId&&t.uint32(18).string(e.channelId),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=g();for(;r.pos>>3){case 1:i.portId=r.string();break;case 2:i.channelId=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=g();return(0,l.isSet)(e.portId)&&(t.portId=String(e.portId)),(0,l.isSet)(e.channelId)&&(t.channelId=String(e.channelId)),t},toJSON(e){let t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.channelId&&(t.channelId=e.channelId),t},fromPartial(e){var t,r;let n=g();return n.portId=null!==(t=e.portId)&&void 0!==t?t:"",n.channelId=null!==(r=e.channelId)&&void 0!==r?r:"",n}},t.QueryChannelClientStateResponse={typeUrl:"/ibc.core.channel.v1.QueryChannelClientStateResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return void 0!==e.identifiedClientState&&o.IdentifiedClientState.encode(e.identifiedClientState,t.uint32(10).fork()).ldelim(),0!==e.proof.length&&t.uint32(18).bytes(e.proof),void 0!==e.proofHeight&&o.Height.encode(e.proofHeight,t.uint32(26).fork()).ldelim(),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=m();for(;r.pos>>3){case 1:i.identifiedClientState=o.IdentifiedClientState.decode(r,r.uint32());break;case 2:i.proof=r.bytes();break;case 3:i.proofHeight=o.Height.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=m();return(0,l.isSet)(e.identifiedClientState)&&(t.identifiedClientState=o.IdentifiedClientState.fromJSON(e.identifiedClientState)),(0,l.isSet)(e.proof)&&(t.proof=(0,l.bytesFromBase64)(e.proof)),(0,l.isSet)(e.proofHeight)&&(t.proofHeight=o.Height.fromJSON(e.proofHeight)),t},toJSON(e){let t={};return void 0!==e.identifiedClientState&&(t.identifiedClientState=e.identifiedClientState?o.IdentifiedClientState.toJSON(e.identifiedClientState):void 0),void 0!==e.proof&&(t.proof=(0,l.base64FromBytes)(void 0!==e.proof?e.proof:new Uint8Array)),void 0!==e.proofHeight&&(t.proofHeight=e.proofHeight?o.Height.toJSON(e.proofHeight):void 0),t},fromPartial(e){var t;let r=m();return void 0!==e.identifiedClientState&&null!==e.identifiedClientState&&(r.identifiedClientState=o.IdentifiedClientState.fromPartial(e.identifiedClientState)),r.proof=null!==(t=e.proof)&&void 0!==t?t:new Uint8Array,void 0!==e.proofHeight&&null!==e.proofHeight&&(r.proofHeight=o.Height.fromPartial(e.proofHeight)),r}},t.QueryChannelConsensusStateRequest={typeUrl:"/ibc.core.channel.v1.QueryChannelConsensusStateRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return""!==e.portId&&t.uint32(10).string(e.portId),""!==e.channelId&&t.uint32(18).string(e.channelId),e.revisionNumber!==BigInt(0)&&t.uint32(24).uint64(e.revisionNumber),e.revisionHeight!==BigInt(0)&&t.uint32(32).uint64(e.revisionHeight),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=y();for(;r.pos>>3){case 1:i.portId=r.string();break;case 2:i.channelId=r.string();break;case 3:i.revisionNumber=r.uint64();break;case 4:i.revisionHeight=r.uint64();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=y();return(0,l.isSet)(e.portId)&&(t.portId=String(e.portId)),(0,l.isSet)(e.channelId)&&(t.channelId=String(e.channelId)),(0,l.isSet)(e.revisionNumber)&&(t.revisionNumber=BigInt(e.revisionNumber.toString())),(0,l.isSet)(e.revisionHeight)&&(t.revisionHeight=BigInt(e.revisionHeight.toString())),t},toJSON(e){let t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.channelId&&(t.channelId=e.channelId),void 0!==e.revisionNumber&&(t.revisionNumber=(e.revisionNumber||BigInt(0)).toString()),void 0!==e.revisionHeight&&(t.revisionHeight=(e.revisionHeight||BigInt(0)).toString()),t},fromPartial(e){var t,r;let n=y();return n.portId=null!==(t=e.portId)&&void 0!==t?t:"",n.channelId=null!==(r=e.channelId)&&void 0!==r?r:"",void 0!==e.revisionNumber&&null!==e.revisionNumber&&(n.revisionNumber=BigInt(e.revisionNumber.toString())),void 0!==e.revisionHeight&&null!==e.revisionHeight&&(n.revisionHeight=BigInt(e.revisionHeight.toString())),n}},t.QueryChannelConsensusStateResponse={typeUrl:"/ibc.core.channel.v1.QueryChannelConsensusStateResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return void 0!==e.consensusState&&a.Any.encode(e.consensusState,t.uint32(10).fork()).ldelim(),""!==e.clientId&&t.uint32(18).string(e.clientId),0!==e.proof.length&&t.uint32(26).bytes(e.proof),void 0!==e.proofHeight&&o.Height.encode(e.proofHeight,t.uint32(34).fork()).ldelim(),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=v();for(;r.pos>>3){case 1:i.consensusState=a.Any.decode(r,r.uint32());break;case 2:i.clientId=r.string();break;case 3:i.proof=r.bytes();break;case 4:i.proofHeight=o.Height.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=v();return(0,l.isSet)(e.consensusState)&&(t.consensusState=a.Any.fromJSON(e.consensusState)),(0,l.isSet)(e.clientId)&&(t.clientId=String(e.clientId)),(0,l.isSet)(e.proof)&&(t.proof=(0,l.bytesFromBase64)(e.proof)),(0,l.isSet)(e.proofHeight)&&(t.proofHeight=o.Height.fromJSON(e.proofHeight)),t},toJSON(e){let t={};return void 0!==e.consensusState&&(t.consensusState=e.consensusState?a.Any.toJSON(e.consensusState):void 0),void 0!==e.clientId&&(t.clientId=e.clientId),void 0!==e.proof&&(t.proof=(0,l.base64FromBytes)(void 0!==e.proof?e.proof:new Uint8Array)),void 0!==e.proofHeight&&(t.proofHeight=e.proofHeight?o.Height.toJSON(e.proofHeight):void 0),t},fromPartial(e){var t,r;let n=v();return void 0!==e.consensusState&&null!==e.consensusState&&(n.consensusState=a.Any.fromPartial(e.consensusState)),n.clientId=null!==(t=e.clientId)&&void 0!==t?t:"",n.proof=null!==(r=e.proof)&&void 0!==r?r:new Uint8Array,void 0!==e.proofHeight&&null!==e.proofHeight&&(n.proofHeight=o.Height.fromPartial(e.proofHeight)),n}},t.QueryPacketCommitmentRequest={typeUrl:"/ibc.core.channel.v1.QueryPacketCommitmentRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return""!==e.portId&&t.uint32(10).string(e.portId),""!==e.channelId&&t.uint32(18).string(e.channelId),e.sequence!==BigInt(0)&&t.uint32(24).uint64(e.sequence),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=b();for(;r.pos>>3){case 1:i.portId=r.string();break;case 2:i.channelId=r.string();break;case 3:i.sequence=r.uint64();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=b();return(0,l.isSet)(e.portId)&&(t.portId=String(e.portId)),(0,l.isSet)(e.channelId)&&(t.channelId=String(e.channelId)),(0,l.isSet)(e.sequence)&&(t.sequence=BigInt(e.sequence.toString())),t},toJSON(e){let t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.channelId&&(t.channelId=e.channelId),void 0!==e.sequence&&(t.sequence=(e.sequence||BigInt(0)).toString()),t},fromPartial(e){var t,r;let n=b();return n.portId=null!==(t=e.portId)&&void 0!==t?t:"",n.channelId=null!==(r=e.channelId)&&void 0!==r?r:"",void 0!==e.sequence&&null!==e.sequence&&(n.sequence=BigInt(e.sequence.toString())),n}},t.QueryPacketCommitmentResponse={typeUrl:"/ibc.core.channel.v1.QueryPacketCommitmentResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return 0!==e.commitment.length&&t.uint32(10).bytes(e.commitment),0!==e.proof.length&&t.uint32(18).bytes(e.proof),void 0!==e.proofHeight&&o.Height.encode(e.proofHeight,t.uint32(26).fork()).ldelim(),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=S();for(;r.pos>>3){case 1:i.commitment=r.bytes();break;case 2:i.proof=r.bytes();break;case 3:i.proofHeight=o.Height.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=S();return(0,l.isSet)(e.commitment)&&(t.commitment=(0,l.bytesFromBase64)(e.commitment)),(0,l.isSet)(e.proof)&&(t.proof=(0,l.bytesFromBase64)(e.proof)),(0,l.isSet)(e.proofHeight)&&(t.proofHeight=o.Height.fromJSON(e.proofHeight)),t},toJSON(e){let t={};return void 0!==e.commitment&&(t.commitment=(0,l.base64FromBytes)(void 0!==e.commitment?e.commitment:new Uint8Array)),void 0!==e.proof&&(t.proof=(0,l.base64FromBytes)(void 0!==e.proof?e.proof:new Uint8Array)),void 0!==e.proofHeight&&(t.proofHeight=e.proofHeight?o.Height.toJSON(e.proofHeight):void 0),t},fromPartial(e){var t,r;let n=S();return n.commitment=null!==(t=e.commitment)&&void 0!==t?t:new Uint8Array,n.proof=null!==(r=e.proof)&&void 0!==r?r:new Uint8Array,void 0!==e.proofHeight&&null!==e.proofHeight&&(n.proofHeight=o.Height.fromPartial(e.proofHeight)),n}},t.QueryPacketCommitmentsRequest={typeUrl:"/ibc.core.channel.v1.QueryPacketCommitmentsRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return""!==e.portId&&t.uint32(10).string(e.portId),""!==e.channelId&&t.uint32(18).string(e.channelId),void 0!==e.pagination&&n.PageRequest.encode(e.pagination,t.uint32(26).fork()).ldelim(),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),i=void 0===t?r.len:r.pos+t,o=w();for(;r.pos>>3){case 1:o.portId=r.string();break;case 2:o.channelId=r.string();break;case 3:o.pagination=n.PageRequest.decode(r,r.uint32());break;default:r.skipType(7&e)}}return o},fromJSON(e){let t=w();return(0,l.isSet)(e.portId)&&(t.portId=String(e.portId)),(0,l.isSet)(e.channelId)&&(t.channelId=String(e.channelId)),(0,l.isSet)(e.pagination)&&(t.pagination=n.PageRequest.fromJSON(e.pagination)),t},toJSON(e){let t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.channelId&&(t.channelId=e.channelId),void 0!==e.pagination&&(t.pagination=e.pagination?n.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){var t,r;let i=w();return i.portId=null!==(t=e.portId)&&void 0!==t?t:"",i.channelId=null!==(r=e.channelId)&&void 0!==r?r:"",void 0!==e.pagination&&null!==e.pagination&&(i.pagination=n.PageRequest.fromPartial(e.pagination)),i}},t.QueryPacketCommitmentsResponse={typeUrl:"/ibc.core.channel.v1.QueryPacketCommitmentsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();for(let r of e.commitments)i.PacketState.encode(r,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&n.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),void 0!==e.height&&o.Height.encode(e.height,t.uint32(26).fork()).ldelim(),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),a=void 0===t?r.len:r.pos+t,l=_();for(;r.pos>>3){case 1:l.commitments.push(i.PacketState.decode(r,r.uint32()));break;case 2:l.pagination=n.PageResponse.decode(r,r.uint32());break;case 3:l.height=o.Height.decode(r,r.uint32());break;default:r.skipType(7&e)}}return l},fromJSON(e){let t=_();return Array.isArray(null==e?void 0:e.commitments)&&(t.commitments=e.commitments.map(e=>i.PacketState.fromJSON(e))),(0,l.isSet)(e.pagination)&&(t.pagination=n.PageResponse.fromJSON(e.pagination)),(0,l.isSet)(e.height)&&(t.height=o.Height.fromJSON(e.height)),t},toJSON(e){let t={};return e.commitments?t.commitments=e.commitments.map(e=>e?i.PacketState.toJSON(e):void 0):t.commitments=[],void 0!==e.pagination&&(t.pagination=e.pagination?n.PageResponse.toJSON(e.pagination):void 0),void 0!==e.height&&(t.height=e.height?o.Height.toJSON(e.height):void 0),t},fromPartial(e){var t;let r=_();return r.commitments=(null===(t=e.commitments)||void 0===t?void 0:t.map(e=>i.PacketState.fromPartial(e)))||[],void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageResponse.fromPartial(e.pagination)),void 0!==e.height&&null!==e.height&&(r.height=o.Height.fromPartial(e.height)),r}},t.QueryPacketReceiptRequest={typeUrl:"/ibc.core.channel.v1.QueryPacketReceiptRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return""!==e.portId&&t.uint32(10).string(e.portId),""!==e.channelId&&t.uint32(18).string(e.channelId),e.sequence!==BigInt(0)&&t.uint32(24).uint64(e.sequence),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=k();for(;r.pos>>3){case 1:i.portId=r.string();break;case 2:i.channelId=r.string();break;case 3:i.sequence=r.uint64();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=k();return(0,l.isSet)(e.portId)&&(t.portId=String(e.portId)),(0,l.isSet)(e.channelId)&&(t.channelId=String(e.channelId)),(0,l.isSet)(e.sequence)&&(t.sequence=BigInt(e.sequence.toString())),t},toJSON(e){let t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.channelId&&(t.channelId=e.channelId),void 0!==e.sequence&&(t.sequence=(e.sequence||BigInt(0)).toString()),t},fromPartial(e){var t,r;let n=k();return n.portId=null!==(t=e.portId)&&void 0!==t?t:"",n.channelId=null!==(r=e.channelId)&&void 0!==r?r:"",void 0!==e.sequence&&null!==e.sequence&&(n.sequence=BigInt(e.sequence.toString())),n}},t.QueryPacketReceiptResponse={typeUrl:"/ibc.core.channel.v1.QueryPacketReceiptResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return!0===e.received&&t.uint32(16).bool(e.received),0!==e.proof.length&&t.uint32(26).bytes(e.proof),void 0!==e.proofHeight&&o.Height.encode(e.proofHeight,t.uint32(34).fork()).ldelim(),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=O();for(;r.pos>>3){case 2:i.received=r.bool();break;case 3:i.proof=r.bytes();break;case 4:i.proofHeight=o.Height.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=O();return(0,l.isSet)(e.received)&&(t.received=!!e.received),(0,l.isSet)(e.proof)&&(t.proof=(0,l.bytesFromBase64)(e.proof)),(0,l.isSet)(e.proofHeight)&&(t.proofHeight=o.Height.fromJSON(e.proofHeight)),t},toJSON(e){let t={};return void 0!==e.received&&(t.received=e.received),void 0!==e.proof&&(t.proof=(0,l.base64FromBytes)(void 0!==e.proof?e.proof:new Uint8Array)),void 0!==e.proofHeight&&(t.proofHeight=e.proofHeight?o.Height.toJSON(e.proofHeight):void 0),t},fromPartial(e){var t,r;let n=O();return n.received=null!==(t=e.received)&&void 0!==t&&t,n.proof=null!==(r=e.proof)&&void 0!==r?r:new Uint8Array,void 0!==e.proofHeight&&null!==e.proofHeight&&(n.proofHeight=o.Height.fromPartial(e.proofHeight)),n}},t.QueryPacketAcknowledgementRequest={typeUrl:"/ibc.core.channel.v1.QueryPacketAcknowledgementRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return""!==e.portId&&t.uint32(10).string(e.portId),""!==e.channelId&&t.uint32(18).string(e.channelId),e.sequence!==BigInt(0)&&t.uint32(24).uint64(e.sequence),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=P();for(;r.pos>>3){case 1:i.portId=r.string();break;case 2:i.channelId=r.string();break;case 3:i.sequence=r.uint64();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=P();return(0,l.isSet)(e.portId)&&(t.portId=String(e.portId)),(0,l.isSet)(e.channelId)&&(t.channelId=String(e.channelId)),(0,l.isSet)(e.sequence)&&(t.sequence=BigInt(e.sequence.toString())),t},toJSON(e){let t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.channelId&&(t.channelId=e.channelId),void 0!==e.sequence&&(t.sequence=(e.sequence||BigInt(0)).toString()),t},fromPartial(e){var t,r;let n=P();return n.portId=null!==(t=e.portId)&&void 0!==t?t:"",n.channelId=null!==(r=e.channelId)&&void 0!==r?r:"",void 0!==e.sequence&&null!==e.sequence&&(n.sequence=BigInt(e.sequence.toString())),n}},t.QueryPacketAcknowledgementResponse={typeUrl:"/ibc.core.channel.v1.QueryPacketAcknowledgementResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return 0!==e.acknowledgement.length&&t.uint32(10).bytes(e.acknowledgement),0!==e.proof.length&&t.uint32(18).bytes(e.proof),void 0!==e.proofHeight&&o.Height.encode(e.proofHeight,t.uint32(26).fork()).ldelim(),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=A();for(;r.pos>>3){case 1:i.acknowledgement=r.bytes();break;case 2:i.proof=r.bytes();break;case 3:i.proofHeight=o.Height.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=A();return(0,l.isSet)(e.acknowledgement)&&(t.acknowledgement=(0,l.bytesFromBase64)(e.acknowledgement)),(0,l.isSet)(e.proof)&&(t.proof=(0,l.bytesFromBase64)(e.proof)),(0,l.isSet)(e.proofHeight)&&(t.proofHeight=o.Height.fromJSON(e.proofHeight)),t},toJSON(e){let t={};return void 0!==e.acknowledgement&&(t.acknowledgement=(0,l.base64FromBytes)(void 0!==e.acknowledgement?e.acknowledgement:new Uint8Array)),void 0!==e.proof&&(t.proof=(0,l.base64FromBytes)(void 0!==e.proof?e.proof:new Uint8Array)),void 0!==e.proofHeight&&(t.proofHeight=e.proofHeight?o.Height.toJSON(e.proofHeight):void 0),t},fromPartial(e){var t,r;let n=A();return n.acknowledgement=null!==(t=e.acknowledgement)&&void 0!==t?t:new Uint8Array,n.proof=null!==(r=e.proof)&&void 0!==r?r:new Uint8Array,void 0!==e.proofHeight&&null!==e.proofHeight&&(n.proofHeight=o.Height.fromPartial(e.proofHeight)),n}},t.QueryPacketAcknowledgementsRequest={typeUrl:"/ibc.core.channel.v1.QueryPacketAcknowledgementsRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();for(let r of(""!==e.portId&&t.uint32(10).string(e.portId),""!==e.channelId&&t.uint32(18).string(e.channelId),void 0!==e.pagination&&n.PageRequest.encode(e.pagination,t.uint32(26).fork()).ldelim(),t.uint32(34).fork(),e.packetCommitmentSequences))t.uint64(r);return t.ldelim(),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),i=void 0===t?r.len:r.pos+t,o=I();for(;r.pos>>3){case 1:o.portId=r.string();break;case 2:o.channelId=r.string();break;case 3:o.pagination=n.PageRequest.decode(r,r.uint32());break;case 4:if((7&e)==2){let e=r.uint32()+r.pos;for(;r.posBigInt(e.toString()))),t},toJSON(e){let t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.channelId&&(t.channelId=e.channelId),void 0!==e.pagination&&(t.pagination=e.pagination?n.PageRequest.toJSON(e.pagination):void 0),e.packetCommitmentSequences?t.packetCommitmentSequences=e.packetCommitmentSequences.map(e=>(e||BigInt(0)).toString()):t.packetCommitmentSequences=[],t},fromPartial(e){var t,r,i;let o=I();return o.portId=null!==(r=e.portId)&&void 0!==r?r:"",o.channelId=null!==(i=e.channelId)&&void 0!==i?i:"",void 0!==e.pagination&&null!==e.pagination&&(o.pagination=n.PageRequest.fromPartial(e.pagination)),o.packetCommitmentSequences=(null===(t=e.packetCommitmentSequences)||void 0===t?void 0:t.map(e=>BigInt(e.toString())))||[],o}},t.QueryPacketAcknowledgementsResponse={typeUrl:"/ibc.core.channel.v1.QueryPacketAcknowledgementsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();for(let r of e.acknowledgements)i.PacketState.encode(r,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&n.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),void 0!==e.height&&o.Height.encode(e.height,t.uint32(26).fork()).ldelim(),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),a=void 0===t?r.len:r.pos+t,l=R();for(;r.pos>>3){case 1:l.acknowledgements.push(i.PacketState.decode(r,r.uint32()));break;case 2:l.pagination=n.PageResponse.decode(r,r.uint32());break;case 3:l.height=o.Height.decode(r,r.uint32());break;default:r.skipType(7&e)}}return l},fromJSON(e){let t=R();return Array.isArray(null==e?void 0:e.acknowledgements)&&(t.acknowledgements=e.acknowledgements.map(e=>i.PacketState.fromJSON(e))),(0,l.isSet)(e.pagination)&&(t.pagination=n.PageResponse.fromJSON(e.pagination)),(0,l.isSet)(e.height)&&(t.height=o.Height.fromJSON(e.height)),t},toJSON(e){let t={};return e.acknowledgements?t.acknowledgements=e.acknowledgements.map(e=>e?i.PacketState.toJSON(e):void 0):t.acknowledgements=[],void 0!==e.pagination&&(t.pagination=e.pagination?n.PageResponse.toJSON(e.pagination):void 0),void 0!==e.height&&(t.height=e.height?o.Height.toJSON(e.height):void 0),t},fromPartial(e){var t;let r=R();return r.acknowledgements=(null===(t=e.acknowledgements)||void 0===t?void 0:t.map(e=>i.PacketState.fromPartial(e)))||[],void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageResponse.fromPartial(e.pagination)),void 0!==e.height&&null!==e.height&&(r.height=o.Height.fromPartial(e.height)),r}},t.QueryUnreceivedPacketsRequest={typeUrl:"/ibc.core.channel.v1.QueryUnreceivedPacketsRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();for(let r of(""!==e.portId&&t.uint32(10).string(e.portId),""!==e.channelId&&t.uint32(18).string(e.channelId),t.uint32(26).fork(),e.packetCommitmentSequences))t.uint64(r);return t.ldelim(),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=E();for(;r.pos>>3){case 1:i.portId=r.string();break;case 2:i.channelId=r.string();break;case 3:if((7&e)==2){let e=r.uint32()+r.pos;for(;r.posBigInt(e.toString()))),t},toJSON(e){let t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.channelId&&(t.channelId=e.channelId),e.packetCommitmentSequences?t.packetCommitmentSequences=e.packetCommitmentSequences.map(e=>(e||BigInt(0)).toString()):t.packetCommitmentSequences=[],t},fromPartial(e){var t,r,n;let i=E();return i.portId=null!==(r=e.portId)&&void 0!==r?r:"",i.channelId=null!==(n=e.channelId)&&void 0!==n?n:"",i.packetCommitmentSequences=(null===(t=e.packetCommitmentSequences)||void 0===t?void 0:t.map(e=>BigInt(e.toString())))||[],i}},t.QueryUnreceivedPacketsResponse={typeUrl:"/ibc.core.channel.v1.QueryUnreceivedPacketsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();for(let r of(t.uint32(10).fork(),e.sequences))t.uint64(r);return t.ldelim(),void 0!==e.height&&o.Height.encode(e.height,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=T();for(;r.pos>>3){case 1:if((7&e)==2){let e=r.uint32()+r.pos;for(;r.posBigInt(e.toString()))),(0,l.isSet)(e.height)&&(t.height=o.Height.fromJSON(e.height)),t},toJSON(e){let t={};return e.sequences?t.sequences=e.sequences.map(e=>(e||BigInt(0)).toString()):t.sequences=[],void 0!==e.height&&(t.height=e.height?o.Height.toJSON(e.height):void 0),t},fromPartial(e){var t;let r=T();return r.sequences=(null===(t=e.sequences)||void 0===t?void 0:t.map(e=>BigInt(e.toString())))||[],void 0!==e.height&&null!==e.height&&(r.height=o.Height.fromPartial(e.height)),r}},t.QueryUnreceivedAcksRequest={typeUrl:"/ibc.core.channel.v1.QueryUnreceivedAcksRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();for(let r of(""!==e.portId&&t.uint32(10).string(e.portId),""!==e.channelId&&t.uint32(18).string(e.channelId),t.uint32(26).fork(),e.packetAckSequences))t.uint64(r);return t.ldelim(),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=N();for(;r.pos>>3){case 1:i.portId=r.string();break;case 2:i.channelId=r.string();break;case 3:if((7&e)==2){let e=r.uint32()+r.pos;for(;r.posBigInt(e.toString()))),t},toJSON(e){let t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.channelId&&(t.channelId=e.channelId),e.packetAckSequences?t.packetAckSequences=e.packetAckSequences.map(e=>(e||BigInt(0)).toString()):t.packetAckSequences=[],t},fromPartial(e){var t,r,n;let i=N();return i.portId=null!==(r=e.portId)&&void 0!==r?r:"",i.channelId=null!==(n=e.channelId)&&void 0!==n?n:"",i.packetAckSequences=(null===(t=e.packetAckSequences)||void 0===t?void 0:t.map(e=>BigInt(e.toString())))||[],i}},t.QueryUnreceivedAcksResponse={typeUrl:"/ibc.core.channel.v1.QueryUnreceivedAcksResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();for(let r of(t.uint32(10).fork(),e.sequences))t.uint64(r);return t.ldelim(),void 0!==e.height&&o.Height.encode(e.height,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=x();for(;r.pos>>3){case 1:if((7&e)==2){let e=r.uint32()+r.pos;for(;r.posBigInt(e.toString()))),(0,l.isSet)(e.height)&&(t.height=o.Height.fromJSON(e.height)),t},toJSON(e){let t={};return e.sequences?t.sequences=e.sequences.map(e=>(e||BigInt(0)).toString()):t.sequences=[],void 0!==e.height&&(t.height=e.height?o.Height.toJSON(e.height):void 0),t},fromPartial(e){var t;let r=x();return r.sequences=(null===(t=e.sequences)||void 0===t?void 0:t.map(e=>BigInt(e.toString())))||[],void 0!==e.height&&null!==e.height&&(r.height=o.Height.fromPartial(e.height)),r}},t.QueryNextSequenceReceiveRequest={typeUrl:"/ibc.core.channel.v1.QueryNextSequenceReceiveRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return""!==e.portId&&t.uint32(10).string(e.portId),""!==e.channelId&&t.uint32(18).string(e.channelId),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=B();for(;r.pos>>3){case 1:i.portId=r.string();break;case 2:i.channelId=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=B();return(0,l.isSet)(e.portId)&&(t.portId=String(e.portId)),(0,l.isSet)(e.channelId)&&(t.channelId=String(e.channelId)),t},toJSON(e){let t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.channelId&&(t.channelId=e.channelId),t},fromPartial(e){var t,r;let n=B();return n.portId=null!==(t=e.portId)&&void 0!==t?t:"",n.channelId=null!==(r=e.channelId)&&void 0!==r?r:"",n}},t.QueryNextSequenceReceiveResponse={typeUrl:"/ibc.core.channel.v1.QueryNextSequenceReceiveResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return e.nextSequenceReceive!==BigInt(0)&&t.uint32(8).uint64(e.nextSequenceReceive),0!==e.proof.length&&t.uint32(18).bytes(e.proof),void 0!==e.proofHeight&&o.Height.encode(e.proofHeight,t.uint32(26).fork()).ldelim(),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=C();for(;r.pos>>3){case 1:i.nextSequenceReceive=r.uint64();break;case 2:i.proof=r.bytes();break;case 3:i.proofHeight=o.Height.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=C();return(0,l.isSet)(e.nextSequenceReceive)&&(t.nextSequenceReceive=BigInt(e.nextSequenceReceive.toString())),(0,l.isSet)(e.proof)&&(t.proof=(0,l.bytesFromBase64)(e.proof)),(0,l.isSet)(e.proofHeight)&&(t.proofHeight=o.Height.fromJSON(e.proofHeight)),t},toJSON(e){let t={};return void 0!==e.nextSequenceReceive&&(t.nextSequenceReceive=(e.nextSequenceReceive||BigInt(0)).toString()),void 0!==e.proof&&(t.proof=(0,l.base64FromBytes)(void 0!==e.proof?e.proof:new Uint8Array)),void 0!==e.proofHeight&&(t.proofHeight=e.proofHeight?o.Height.toJSON(e.proofHeight):void 0),t},fromPartial(e){var t;let r=C();return void 0!==e.nextSequenceReceive&&null!==e.nextSequenceReceive&&(r.nextSequenceReceive=BigInt(e.nextSequenceReceive.toString())),r.proof=null!==(t=e.proof)&&void 0!==t?t:new Uint8Array,void 0!==e.proofHeight&&null!==e.proofHeight&&(r.proofHeight=o.Height.fromPartial(e.proofHeight)),r}};class M{Channel(e){let r=t.QueryChannelRequest.encode(e).finish();return this.rpc.request("ibc.core.channel.v1.Query","Channel",r).then(e=>t.QueryChannelResponse.decode(new s.BinaryReader(e)))}Channels(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{pagination:n.PageRequest.fromPartial({})},r=t.QueryChannelsRequest.encode(e).finish();return this.rpc.request("ibc.core.channel.v1.Query","Channels",r).then(e=>t.QueryChannelsResponse.decode(new s.BinaryReader(e)))}ConnectionChannels(e){let r=t.QueryConnectionChannelsRequest.encode(e).finish();return this.rpc.request("ibc.core.channel.v1.Query","ConnectionChannels",r).then(e=>t.QueryConnectionChannelsResponse.decode(new s.BinaryReader(e)))}ChannelClientState(e){let r=t.QueryChannelClientStateRequest.encode(e).finish();return this.rpc.request("ibc.core.channel.v1.Query","ChannelClientState",r).then(e=>t.QueryChannelClientStateResponse.decode(new s.BinaryReader(e)))}ChannelConsensusState(e){let r=t.QueryChannelConsensusStateRequest.encode(e).finish();return this.rpc.request("ibc.core.channel.v1.Query","ChannelConsensusState",r).then(e=>t.QueryChannelConsensusStateResponse.decode(new s.BinaryReader(e)))}PacketCommitment(e){let r=t.QueryPacketCommitmentRequest.encode(e).finish();return this.rpc.request("ibc.core.channel.v1.Query","PacketCommitment",r).then(e=>t.QueryPacketCommitmentResponse.decode(new s.BinaryReader(e)))}PacketCommitments(e){let r=t.QueryPacketCommitmentsRequest.encode(e).finish();return this.rpc.request("ibc.core.channel.v1.Query","PacketCommitments",r).then(e=>t.QueryPacketCommitmentsResponse.decode(new s.BinaryReader(e)))}PacketReceipt(e){let r=t.QueryPacketReceiptRequest.encode(e).finish();return this.rpc.request("ibc.core.channel.v1.Query","PacketReceipt",r).then(e=>t.QueryPacketReceiptResponse.decode(new s.BinaryReader(e)))}PacketAcknowledgement(e){let r=t.QueryPacketAcknowledgementRequest.encode(e).finish();return this.rpc.request("ibc.core.channel.v1.Query","PacketAcknowledgement",r).then(e=>t.QueryPacketAcknowledgementResponse.decode(new s.BinaryReader(e)))}PacketAcknowledgements(e){let r=t.QueryPacketAcknowledgementsRequest.encode(e).finish();return this.rpc.request("ibc.core.channel.v1.Query","PacketAcknowledgements",r).then(e=>t.QueryPacketAcknowledgementsResponse.decode(new s.BinaryReader(e)))}UnreceivedPackets(e){let r=t.QueryUnreceivedPacketsRequest.encode(e).finish();return this.rpc.request("ibc.core.channel.v1.Query","UnreceivedPackets",r).then(e=>t.QueryUnreceivedPacketsResponse.decode(new s.BinaryReader(e)))}UnreceivedAcks(e){let r=t.QueryUnreceivedAcksRequest.encode(e).finish();return this.rpc.request("ibc.core.channel.v1.Query","UnreceivedAcks",r).then(e=>t.QueryUnreceivedAcksResponse.decode(new s.BinaryReader(e)))}NextSequenceReceive(e){let r=t.QueryNextSequenceReceiveRequest.encode(e).finish();return this.rpc.request("ibc.core.channel.v1.Query","NextSequenceReceive",r).then(e=>t.QueryNextSequenceReceiveResponse.decode(new s.BinaryReader(e)))}constructor(e){this.rpc=e,this.Channel=this.Channel.bind(this),this.Channels=this.Channels.bind(this),this.ConnectionChannels=this.ConnectionChannels.bind(this),this.ChannelClientState=this.ChannelClientState.bind(this),this.ChannelConsensusState=this.ChannelConsensusState.bind(this),this.PacketCommitment=this.PacketCommitment.bind(this),this.PacketCommitments=this.PacketCommitments.bind(this),this.PacketReceipt=this.PacketReceipt.bind(this),this.PacketAcknowledgement=this.PacketAcknowledgement.bind(this),this.PacketAcknowledgements=this.PacketAcknowledgements.bind(this),this.UnreceivedPackets=this.UnreceivedPackets.bind(this),this.UnreceivedAcks=this.UnreceivedAcks.bind(this),this.NextSequenceReceive=this.NextSequenceReceive.bind(this)}}t.QueryClientImpl=M},52230:function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.MsgClientImpl=t.MsgAcknowledgementResponse=t.MsgAcknowledgement=t.MsgTimeoutOnCloseResponse=t.MsgTimeoutOnClose=t.MsgTimeoutResponse=t.MsgTimeout=t.MsgRecvPacketResponse=t.MsgRecvPacket=t.MsgChannelCloseConfirmResponse=t.MsgChannelCloseConfirm=t.MsgChannelCloseInitResponse=t.MsgChannelCloseInit=t.MsgChannelOpenConfirmResponse=t.MsgChannelOpenConfirm=t.MsgChannelOpenAckResponse=t.MsgChannelOpenAck=t.MsgChannelOpenTryResponse=t.MsgChannelOpenTry=t.MsgChannelOpenInitResponse=t.MsgChannelOpenInit=t.responseResultTypeToJSON=t.responseResultTypeFromJSON=t.ResponseResultType=t.protobufPackage=void 0;let i=r(83639),o=r(23489),a=r(46554),s=r(99133);function l(e){switch(e){case 0:case"RESPONSE_RESULT_TYPE_UNSPECIFIED":return n.RESPONSE_RESULT_TYPE_UNSPECIFIED;case 1:case"RESPONSE_RESULT_TYPE_NOOP":return n.RESPONSE_RESULT_TYPE_NOOP;case 2:case"RESPONSE_RESULT_TYPE_SUCCESS":return n.RESPONSE_RESULT_TYPE_SUCCESS;default:return n.UNRECOGNIZED}}function u(e){switch(e){case n.RESPONSE_RESULT_TYPE_UNSPECIFIED:return"RESPONSE_RESULT_TYPE_UNSPECIFIED";case n.RESPONSE_RESULT_TYPE_NOOP:return"RESPONSE_RESULT_TYPE_NOOP";case n.RESPONSE_RESULT_TYPE_SUCCESS:return"RESPONSE_RESULT_TYPE_SUCCESS";case n.UNRECOGNIZED:default:return"UNRECOGNIZED"}}function d(){return{portId:"",channel:i.Channel.fromPartial({}),signer:""}}function c(){return{channelId:"",version:""}}function p(){return{portId:"",previousChannelId:"",channel:i.Channel.fromPartial({}),counterpartyVersion:"",proofInit:new Uint8Array,proofHeight:o.Height.fromPartial({}),signer:""}}function f(){return{version:""}}function h(){return{portId:"",channelId:"",counterpartyChannelId:"",counterpartyVersion:"",proofTry:new Uint8Array,proofHeight:o.Height.fromPartial({}),signer:""}}function g(){return{}}function m(){return{portId:"",channelId:"",proofAck:new Uint8Array,proofHeight:o.Height.fromPartial({}),signer:""}}function y(){return{}}function v(){return{portId:"",channelId:"",signer:""}}function b(){return{}}function S(){return{portId:"",channelId:"",proofInit:new Uint8Array,proofHeight:o.Height.fromPartial({}),signer:""}}function w(){return{}}function _(){return{packet:i.Packet.fromPartial({}),proofCommitment:new Uint8Array,proofHeight:o.Height.fromPartial({}),signer:""}}function k(){return{result:0}}function O(){return{packet:i.Packet.fromPartial({}),proofUnreceived:new Uint8Array,proofHeight:o.Height.fromPartial({}),nextSequenceRecv:BigInt(0),signer:""}}function P(){return{result:0}}function A(){return{packet:i.Packet.fromPartial({}),proofUnreceived:new Uint8Array,proofClose:new Uint8Array,proofHeight:o.Height.fromPartial({}),nextSequenceRecv:BigInt(0),signer:""}}function I(){return{result:0}}function R(){return{packet:i.Packet.fromPartial({}),acknowledgement:new Uint8Array,proofAcked:new Uint8Array,proofHeight:o.Height.fromPartial({}),signer:""}}function E(){return{result:0}}t.protobufPackage="ibc.core.channel.v1",function(e){e[e.RESPONSE_RESULT_TYPE_UNSPECIFIED=0]="RESPONSE_RESULT_TYPE_UNSPECIFIED",e[e.RESPONSE_RESULT_TYPE_NOOP=1]="RESPONSE_RESULT_TYPE_NOOP",e[e.RESPONSE_RESULT_TYPE_SUCCESS=2]="RESPONSE_RESULT_TYPE_SUCCESS",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(n||(t.ResponseResultType=n={})),t.responseResultTypeFromJSON=l,t.responseResultTypeToJSON=u,t.MsgChannelOpenInit={typeUrl:"/ibc.core.channel.v1.MsgChannelOpenInit",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.portId&&t.uint32(10).string(e.portId),void 0!==e.channel&&i.Channel.encode(e.channel,t.uint32(18).fork()).ldelim(),""!==e.signer&&t.uint32(26).string(e.signer),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=d();for(;r.pos>>3){case 1:o.portId=r.string();break;case 2:o.channel=i.Channel.decode(r,r.uint32());break;case 3:o.signer=r.string();break;default:r.skipType(7&e)}}return o},fromJSON(e){let t=d();return(0,s.isSet)(e.portId)&&(t.portId=String(e.portId)),(0,s.isSet)(e.channel)&&(t.channel=i.Channel.fromJSON(e.channel)),(0,s.isSet)(e.signer)&&(t.signer=String(e.signer)),t},toJSON(e){let t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.channel&&(t.channel=e.channel?i.Channel.toJSON(e.channel):void 0),void 0!==e.signer&&(t.signer=e.signer),t},fromPartial(e){var t,r;let n=d();return n.portId=null!==(t=e.portId)&&void 0!==t?t:"",void 0!==e.channel&&null!==e.channel&&(n.channel=i.Channel.fromPartial(e.channel)),n.signer=null!==(r=e.signer)&&void 0!==r?r:"",n}},t.MsgChannelOpenInitResponse={typeUrl:"/ibc.core.channel.v1.MsgChannelOpenInitResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.channelId&&t.uint32(10).string(e.channelId),""!==e.version&&t.uint32(18).string(e.version),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=c();for(;r.pos>>3){case 1:i.channelId=r.string();break;case 2:i.version=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=c();return(0,s.isSet)(e.channelId)&&(t.channelId=String(e.channelId)),(0,s.isSet)(e.version)&&(t.version=String(e.version)),t},toJSON(e){let t={};return void 0!==e.channelId&&(t.channelId=e.channelId),void 0!==e.version&&(t.version=e.version),t},fromPartial(e){var t,r;let n=c();return n.channelId=null!==(t=e.channelId)&&void 0!==t?t:"",n.version=null!==(r=e.version)&&void 0!==r?r:"",n}},t.MsgChannelOpenTry={typeUrl:"/ibc.core.channel.v1.MsgChannelOpenTry",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.portId&&t.uint32(10).string(e.portId),""!==e.previousChannelId&&t.uint32(18).string(e.previousChannelId),void 0!==e.channel&&i.Channel.encode(e.channel,t.uint32(26).fork()).ldelim(),""!==e.counterpartyVersion&&t.uint32(34).string(e.counterpartyVersion),0!==e.proofInit.length&&t.uint32(42).bytes(e.proofInit),void 0!==e.proofHeight&&o.Height.encode(e.proofHeight,t.uint32(50).fork()).ldelim(),""!==e.signer&&t.uint32(58).string(e.signer),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,s=p();for(;r.pos>>3){case 1:s.portId=r.string();break;case 2:s.previousChannelId=r.string();break;case 3:s.channel=i.Channel.decode(r,r.uint32());break;case 4:s.counterpartyVersion=r.string();break;case 5:s.proofInit=r.bytes();break;case 6:s.proofHeight=o.Height.decode(r,r.uint32());break;case 7:s.signer=r.string();break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=p();return(0,s.isSet)(e.portId)&&(t.portId=String(e.portId)),(0,s.isSet)(e.previousChannelId)&&(t.previousChannelId=String(e.previousChannelId)),(0,s.isSet)(e.channel)&&(t.channel=i.Channel.fromJSON(e.channel)),(0,s.isSet)(e.counterpartyVersion)&&(t.counterpartyVersion=String(e.counterpartyVersion)),(0,s.isSet)(e.proofInit)&&(t.proofInit=(0,s.bytesFromBase64)(e.proofInit)),(0,s.isSet)(e.proofHeight)&&(t.proofHeight=o.Height.fromJSON(e.proofHeight)),(0,s.isSet)(e.signer)&&(t.signer=String(e.signer)),t},toJSON(e){let t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.previousChannelId&&(t.previousChannelId=e.previousChannelId),void 0!==e.channel&&(t.channel=e.channel?i.Channel.toJSON(e.channel):void 0),void 0!==e.counterpartyVersion&&(t.counterpartyVersion=e.counterpartyVersion),void 0!==e.proofInit&&(t.proofInit=(0,s.base64FromBytes)(void 0!==e.proofInit?e.proofInit:new Uint8Array)),void 0!==e.proofHeight&&(t.proofHeight=e.proofHeight?o.Height.toJSON(e.proofHeight):void 0),void 0!==e.signer&&(t.signer=e.signer),t},fromPartial(e){var t,r,n,a,s;let l=p();return l.portId=null!==(t=e.portId)&&void 0!==t?t:"",l.previousChannelId=null!==(r=e.previousChannelId)&&void 0!==r?r:"",void 0!==e.channel&&null!==e.channel&&(l.channel=i.Channel.fromPartial(e.channel)),l.counterpartyVersion=null!==(n=e.counterpartyVersion)&&void 0!==n?n:"",l.proofInit=null!==(a=e.proofInit)&&void 0!==a?a:new Uint8Array,void 0!==e.proofHeight&&null!==e.proofHeight&&(l.proofHeight=o.Height.fromPartial(e.proofHeight)),l.signer=null!==(s=e.signer)&&void 0!==s?s:"",l}},t.MsgChannelOpenTryResponse={typeUrl:"/ibc.core.channel.v1.MsgChannelOpenTryResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.version&&t.uint32(10).string(e.version),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=f();for(;r.pos>>3==1?i.version=r.string():r.skipType(7&e)}return i},fromJSON(e){let t=f();return(0,s.isSet)(e.version)&&(t.version=String(e.version)),t},toJSON(e){let t={};return void 0!==e.version&&(t.version=e.version),t},fromPartial(e){var t;let r=f();return r.version=null!==(t=e.version)&&void 0!==t?t:"",r}},t.MsgChannelOpenAck={typeUrl:"/ibc.core.channel.v1.MsgChannelOpenAck",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.portId&&t.uint32(10).string(e.portId),""!==e.channelId&&t.uint32(18).string(e.channelId),""!==e.counterpartyChannelId&&t.uint32(26).string(e.counterpartyChannelId),""!==e.counterpartyVersion&&t.uint32(34).string(e.counterpartyVersion),0!==e.proofTry.length&&t.uint32(42).bytes(e.proofTry),void 0!==e.proofHeight&&o.Height.encode(e.proofHeight,t.uint32(50).fork()).ldelim(),""!==e.signer&&t.uint32(58).string(e.signer),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=h();for(;r.pos>>3){case 1:i.portId=r.string();break;case 2:i.channelId=r.string();break;case 3:i.counterpartyChannelId=r.string();break;case 4:i.counterpartyVersion=r.string();break;case 5:i.proofTry=r.bytes();break;case 6:i.proofHeight=o.Height.decode(r,r.uint32());break;case 7:i.signer=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=h();return(0,s.isSet)(e.portId)&&(t.portId=String(e.portId)),(0,s.isSet)(e.channelId)&&(t.channelId=String(e.channelId)),(0,s.isSet)(e.counterpartyChannelId)&&(t.counterpartyChannelId=String(e.counterpartyChannelId)),(0,s.isSet)(e.counterpartyVersion)&&(t.counterpartyVersion=String(e.counterpartyVersion)),(0,s.isSet)(e.proofTry)&&(t.proofTry=(0,s.bytesFromBase64)(e.proofTry)),(0,s.isSet)(e.proofHeight)&&(t.proofHeight=o.Height.fromJSON(e.proofHeight)),(0,s.isSet)(e.signer)&&(t.signer=String(e.signer)),t},toJSON(e){let t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.channelId&&(t.channelId=e.channelId),void 0!==e.counterpartyChannelId&&(t.counterpartyChannelId=e.counterpartyChannelId),void 0!==e.counterpartyVersion&&(t.counterpartyVersion=e.counterpartyVersion),void 0!==e.proofTry&&(t.proofTry=(0,s.base64FromBytes)(void 0!==e.proofTry?e.proofTry:new Uint8Array)),void 0!==e.proofHeight&&(t.proofHeight=e.proofHeight?o.Height.toJSON(e.proofHeight):void 0),void 0!==e.signer&&(t.signer=e.signer),t},fromPartial(e){var t,r,n,i,a,s;let l=h();return l.portId=null!==(t=e.portId)&&void 0!==t?t:"",l.channelId=null!==(r=e.channelId)&&void 0!==r?r:"",l.counterpartyChannelId=null!==(n=e.counterpartyChannelId)&&void 0!==n?n:"",l.counterpartyVersion=null!==(i=e.counterpartyVersion)&&void 0!==i?i:"",l.proofTry=null!==(a=e.proofTry)&&void 0!==a?a:new Uint8Array,void 0!==e.proofHeight&&null!==e.proofHeight&&(l.proofHeight=o.Height.fromPartial(e.proofHeight)),l.signer=null!==(s=e.signer)&&void 0!==s?s:"",l}},t.MsgChannelOpenAckResponse={typeUrl:"/ibc.core.channel.v1.MsgChannelOpenAckResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=g();for(;r.posg(),toJSON:e=>({}),fromPartial:e=>g()},t.MsgChannelOpenConfirm={typeUrl:"/ibc.core.channel.v1.MsgChannelOpenConfirm",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.portId&&t.uint32(10).string(e.portId),""!==e.channelId&&t.uint32(18).string(e.channelId),0!==e.proofAck.length&&t.uint32(26).bytes(e.proofAck),void 0!==e.proofHeight&&o.Height.encode(e.proofHeight,t.uint32(34).fork()).ldelim(),""!==e.signer&&t.uint32(42).string(e.signer),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=m();for(;r.pos>>3){case 1:i.portId=r.string();break;case 2:i.channelId=r.string();break;case 3:i.proofAck=r.bytes();break;case 4:i.proofHeight=o.Height.decode(r,r.uint32());break;case 5:i.signer=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=m();return(0,s.isSet)(e.portId)&&(t.portId=String(e.portId)),(0,s.isSet)(e.channelId)&&(t.channelId=String(e.channelId)),(0,s.isSet)(e.proofAck)&&(t.proofAck=(0,s.bytesFromBase64)(e.proofAck)),(0,s.isSet)(e.proofHeight)&&(t.proofHeight=o.Height.fromJSON(e.proofHeight)),(0,s.isSet)(e.signer)&&(t.signer=String(e.signer)),t},toJSON(e){let t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.channelId&&(t.channelId=e.channelId),void 0!==e.proofAck&&(t.proofAck=(0,s.base64FromBytes)(void 0!==e.proofAck?e.proofAck:new Uint8Array)),void 0!==e.proofHeight&&(t.proofHeight=e.proofHeight?o.Height.toJSON(e.proofHeight):void 0),void 0!==e.signer&&(t.signer=e.signer),t},fromPartial(e){var t,r,n,i;let a=m();return a.portId=null!==(t=e.portId)&&void 0!==t?t:"",a.channelId=null!==(r=e.channelId)&&void 0!==r?r:"",a.proofAck=null!==(n=e.proofAck)&&void 0!==n?n:new Uint8Array,void 0!==e.proofHeight&&null!==e.proofHeight&&(a.proofHeight=o.Height.fromPartial(e.proofHeight)),a.signer=null!==(i=e.signer)&&void 0!==i?i:"",a}},t.MsgChannelOpenConfirmResponse={typeUrl:"/ibc.core.channel.v1.MsgChannelOpenConfirmResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=y();for(;r.posy(),toJSON:e=>({}),fromPartial:e=>y()},t.MsgChannelCloseInit={typeUrl:"/ibc.core.channel.v1.MsgChannelCloseInit",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.portId&&t.uint32(10).string(e.portId),""!==e.channelId&&t.uint32(18).string(e.channelId),""!==e.signer&&t.uint32(26).string(e.signer),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=v();for(;r.pos>>3){case 1:i.portId=r.string();break;case 2:i.channelId=r.string();break;case 3:i.signer=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=v();return(0,s.isSet)(e.portId)&&(t.portId=String(e.portId)),(0,s.isSet)(e.channelId)&&(t.channelId=String(e.channelId)),(0,s.isSet)(e.signer)&&(t.signer=String(e.signer)),t},toJSON(e){let t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.channelId&&(t.channelId=e.channelId),void 0!==e.signer&&(t.signer=e.signer),t},fromPartial(e){var t,r,n;let i=v();return i.portId=null!==(t=e.portId)&&void 0!==t?t:"",i.channelId=null!==(r=e.channelId)&&void 0!==r?r:"",i.signer=null!==(n=e.signer)&&void 0!==n?n:"",i}},t.MsgChannelCloseInitResponse={typeUrl:"/ibc.core.channel.v1.MsgChannelCloseInitResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=b();for(;r.posb(),toJSON:e=>({}),fromPartial:e=>b()},t.MsgChannelCloseConfirm={typeUrl:"/ibc.core.channel.v1.MsgChannelCloseConfirm",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.portId&&t.uint32(10).string(e.portId),""!==e.channelId&&t.uint32(18).string(e.channelId),0!==e.proofInit.length&&t.uint32(26).bytes(e.proofInit),void 0!==e.proofHeight&&o.Height.encode(e.proofHeight,t.uint32(34).fork()).ldelim(),""!==e.signer&&t.uint32(42).string(e.signer),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=S();for(;r.pos>>3){case 1:i.portId=r.string();break;case 2:i.channelId=r.string();break;case 3:i.proofInit=r.bytes();break;case 4:i.proofHeight=o.Height.decode(r,r.uint32());break;case 5:i.signer=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=S();return(0,s.isSet)(e.portId)&&(t.portId=String(e.portId)),(0,s.isSet)(e.channelId)&&(t.channelId=String(e.channelId)),(0,s.isSet)(e.proofInit)&&(t.proofInit=(0,s.bytesFromBase64)(e.proofInit)),(0,s.isSet)(e.proofHeight)&&(t.proofHeight=o.Height.fromJSON(e.proofHeight)),(0,s.isSet)(e.signer)&&(t.signer=String(e.signer)),t},toJSON(e){let t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.channelId&&(t.channelId=e.channelId),void 0!==e.proofInit&&(t.proofInit=(0,s.base64FromBytes)(void 0!==e.proofInit?e.proofInit:new Uint8Array)),void 0!==e.proofHeight&&(t.proofHeight=e.proofHeight?o.Height.toJSON(e.proofHeight):void 0),void 0!==e.signer&&(t.signer=e.signer),t},fromPartial(e){var t,r,n,i;let a=S();return a.portId=null!==(t=e.portId)&&void 0!==t?t:"",a.channelId=null!==(r=e.channelId)&&void 0!==r?r:"",a.proofInit=null!==(n=e.proofInit)&&void 0!==n?n:new Uint8Array,void 0!==e.proofHeight&&null!==e.proofHeight&&(a.proofHeight=o.Height.fromPartial(e.proofHeight)),a.signer=null!==(i=e.signer)&&void 0!==i?i:"",a}},t.MsgChannelCloseConfirmResponse={typeUrl:"/ibc.core.channel.v1.MsgChannelCloseConfirmResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=w();for(;r.posw(),toJSON:e=>({}),fromPartial:e=>w()},t.MsgRecvPacket={typeUrl:"/ibc.core.channel.v1.MsgRecvPacket",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return void 0!==e.packet&&i.Packet.encode(e.packet,t.uint32(10).fork()).ldelim(),0!==e.proofCommitment.length&&t.uint32(18).bytes(e.proofCommitment),void 0!==e.proofHeight&&o.Height.encode(e.proofHeight,t.uint32(26).fork()).ldelim(),""!==e.signer&&t.uint32(34).string(e.signer),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,s=_();for(;r.pos>>3){case 1:s.packet=i.Packet.decode(r,r.uint32());break;case 2:s.proofCommitment=r.bytes();break;case 3:s.proofHeight=o.Height.decode(r,r.uint32());break;case 4:s.signer=r.string();break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=_();return(0,s.isSet)(e.packet)&&(t.packet=i.Packet.fromJSON(e.packet)),(0,s.isSet)(e.proofCommitment)&&(t.proofCommitment=(0,s.bytesFromBase64)(e.proofCommitment)),(0,s.isSet)(e.proofHeight)&&(t.proofHeight=o.Height.fromJSON(e.proofHeight)),(0,s.isSet)(e.signer)&&(t.signer=String(e.signer)),t},toJSON(e){let t={};return void 0!==e.packet&&(t.packet=e.packet?i.Packet.toJSON(e.packet):void 0),void 0!==e.proofCommitment&&(t.proofCommitment=(0,s.base64FromBytes)(void 0!==e.proofCommitment?e.proofCommitment:new Uint8Array)),void 0!==e.proofHeight&&(t.proofHeight=e.proofHeight?o.Height.toJSON(e.proofHeight):void 0),void 0!==e.signer&&(t.signer=e.signer),t},fromPartial(e){var t,r;let n=_();return void 0!==e.packet&&null!==e.packet&&(n.packet=i.Packet.fromPartial(e.packet)),n.proofCommitment=null!==(t=e.proofCommitment)&&void 0!==t?t:new Uint8Array,void 0!==e.proofHeight&&null!==e.proofHeight&&(n.proofHeight=o.Height.fromPartial(e.proofHeight)),n.signer=null!==(r=e.signer)&&void 0!==r?r:"",n}},t.MsgRecvPacketResponse={typeUrl:"/ibc.core.channel.v1.MsgRecvPacketResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return 0!==e.result&&t.uint32(8).int32(e.result),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=k();for(;r.pos>>3==1?i.result=r.int32():r.skipType(7&e)}return i},fromJSON(e){let t=k();return(0,s.isSet)(e.result)&&(t.result=l(e.result)),t},toJSON(e){let t={};return void 0!==e.result&&(t.result=u(e.result)),t},fromPartial(e){var t;let r=k();return r.result=null!==(t=e.result)&&void 0!==t?t:0,r}},t.MsgTimeout={typeUrl:"/ibc.core.channel.v1.MsgTimeout",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return void 0!==e.packet&&i.Packet.encode(e.packet,t.uint32(10).fork()).ldelim(),0!==e.proofUnreceived.length&&t.uint32(18).bytes(e.proofUnreceived),void 0!==e.proofHeight&&o.Height.encode(e.proofHeight,t.uint32(26).fork()).ldelim(),e.nextSequenceRecv!==BigInt(0)&&t.uint32(32).uint64(e.nextSequenceRecv),""!==e.signer&&t.uint32(42).string(e.signer),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,s=O();for(;r.pos>>3){case 1:s.packet=i.Packet.decode(r,r.uint32());break;case 2:s.proofUnreceived=r.bytes();break;case 3:s.proofHeight=o.Height.decode(r,r.uint32());break;case 4:s.nextSequenceRecv=r.uint64();break;case 5:s.signer=r.string();break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=O();return(0,s.isSet)(e.packet)&&(t.packet=i.Packet.fromJSON(e.packet)),(0,s.isSet)(e.proofUnreceived)&&(t.proofUnreceived=(0,s.bytesFromBase64)(e.proofUnreceived)),(0,s.isSet)(e.proofHeight)&&(t.proofHeight=o.Height.fromJSON(e.proofHeight)),(0,s.isSet)(e.nextSequenceRecv)&&(t.nextSequenceRecv=BigInt(e.nextSequenceRecv.toString())),(0,s.isSet)(e.signer)&&(t.signer=String(e.signer)),t},toJSON(e){let t={};return void 0!==e.packet&&(t.packet=e.packet?i.Packet.toJSON(e.packet):void 0),void 0!==e.proofUnreceived&&(t.proofUnreceived=(0,s.base64FromBytes)(void 0!==e.proofUnreceived?e.proofUnreceived:new Uint8Array)),void 0!==e.proofHeight&&(t.proofHeight=e.proofHeight?o.Height.toJSON(e.proofHeight):void 0),void 0!==e.nextSequenceRecv&&(t.nextSequenceRecv=(e.nextSequenceRecv||BigInt(0)).toString()),void 0!==e.signer&&(t.signer=e.signer),t},fromPartial(e){var t,r;let n=O();return void 0!==e.packet&&null!==e.packet&&(n.packet=i.Packet.fromPartial(e.packet)),n.proofUnreceived=null!==(t=e.proofUnreceived)&&void 0!==t?t:new Uint8Array,void 0!==e.proofHeight&&null!==e.proofHeight&&(n.proofHeight=o.Height.fromPartial(e.proofHeight)),void 0!==e.nextSequenceRecv&&null!==e.nextSequenceRecv&&(n.nextSequenceRecv=BigInt(e.nextSequenceRecv.toString())),n.signer=null!==(r=e.signer)&&void 0!==r?r:"",n}},t.MsgTimeoutResponse={typeUrl:"/ibc.core.channel.v1.MsgTimeoutResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return 0!==e.result&&t.uint32(8).int32(e.result),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=P();for(;r.pos>>3==1?i.result=r.int32():r.skipType(7&e)}return i},fromJSON(e){let t=P();return(0,s.isSet)(e.result)&&(t.result=l(e.result)),t},toJSON(e){let t={};return void 0!==e.result&&(t.result=u(e.result)),t},fromPartial(e){var t;let r=P();return r.result=null!==(t=e.result)&&void 0!==t?t:0,r}},t.MsgTimeoutOnClose={typeUrl:"/ibc.core.channel.v1.MsgTimeoutOnClose",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return void 0!==e.packet&&i.Packet.encode(e.packet,t.uint32(10).fork()).ldelim(),0!==e.proofUnreceived.length&&t.uint32(18).bytes(e.proofUnreceived),0!==e.proofClose.length&&t.uint32(26).bytes(e.proofClose),void 0!==e.proofHeight&&o.Height.encode(e.proofHeight,t.uint32(34).fork()).ldelim(),e.nextSequenceRecv!==BigInt(0)&&t.uint32(40).uint64(e.nextSequenceRecv),""!==e.signer&&t.uint32(50).string(e.signer),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,s=A();for(;r.pos>>3){case 1:s.packet=i.Packet.decode(r,r.uint32());break;case 2:s.proofUnreceived=r.bytes();break;case 3:s.proofClose=r.bytes();break;case 4:s.proofHeight=o.Height.decode(r,r.uint32());break;case 5:s.nextSequenceRecv=r.uint64();break;case 6:s.signer=r.string();break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=A();return(0,s.isSet)(e.packet)&&(t.packet=i.Packet.fromJSON(e.packet)),(0,s.isSet)(e.proofUnreceived)&&(t.proofUnreceived=(0,s.bytesFromBase64)(e.proofUnreceived)),(0,s.isSet)(e.proofClose)&&(t.proofClose=(0,s.bytesFromBase64)(e.proofClose)),(0,s.isSet)(e.proofHeight)&&(t.proofHeight=o.Height.fromJSON(e.proofHeight)),(0,s.isSet)(e.nextSequenceRecv)&&(t.nextSequenceRecv=BigInt(e.nextSequenceRecv.toString())),(0,s.isSet)(e.signer)&&(t.signer=String(e.signer)),t},toJSON(e){let t={};return void 0!==e.packet&&(t.packet=e.packet?i.Packet.toJSON(e.packet):void 0),void 0!==e.proofUnreceived&&(t.proofUnreceived=(0,s.base64FromBytes)(void 0!==e.proofUnreceived?e.proofUnreceived:new Uint8Array)),void 0!==e.proofClose&&(t.proofClose=(0,s.base64FromBytes)(void 0!==e.proofClose?e.proofClose:new Uint8Array)),void 0!==e.proofHeight&&(t.proofHeight=e.proofHeight?o.Height.toJSON(e.proofHeight):void 0),void 0!==e.nextSequenceRecv&&(t.nextSequenceRecv=(e.nextSequenceRecv||BigInt(0)).toString()),void 0!==e.signer&&(t.signer=e.signer),t},fromPartial(e){var t,r,n;let a=A();return void 0!==e.packet&&null!==e.packet&&(a.packet=i.Packet.fromPartial(e.packet)),a.proofUnreceived=null!==(t=e.proofUnreceived)&&void 0!==t?t:new Uint8Array,a.proofClose=null!==(r=e.proofClose)&&void 0!==r?r:new Uint8Array,void 0!==e.proofHeight&&null!==e.proofHeight&&(a.proofHeight=o.Height.fromPartial(e.proofHeight)),void 0!==e.nextSequenceRecv&&null!==e.nextSequenceRecv&&(a.nextSequenceRecv=BigInt(e.nextSequenceRecv.toString())),a.signer=null!==(n=e.signer)&&void 0!==n?n:"",a}},t.MsgTimeoutOnCloseResponse={typeUrl:"/ibc.core.channel.v1.MsgTimeoutOnCloseResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return 0!==e.result&&t.uint32(8).int32(e.result),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=I();for(;r.pos>>3==1?i.result=r.int32():r.skipType(7&e)}return i},fromJSON(e){let t=I();return(0,s.isSet)(e.result)&&(t.result=l(e.result)),t},toJSON(e){let t={};return void 0!==e.result&&(t.result=u(e.result)),t},fromPartial(e){var t;let r=I();return r.result=null!==(t=e.result)&&void 0!==t?t:0,r}},t.MsgAcknowledgement={typeUrl:"/ibc.core.channel.v1.MsgAcknowledgement",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return void 0!==e.packet&&i.Packet.encode(e.packet,t.uint32(10).fork()).ldelim(),0!==e.acknowledgement.length&&t.uint32(18).bytes(e.acknowledgement),0!==e.proofAcked.length&&t.uint32(26).bytes(e.proofAcked),void 0!==e.proofHeight&&o.Height.encode(e.proofHeight,t.uint32(34).fork()).ldelim(),""!==e.signer&&t.uint32(42).string(e.signer),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,s=R();for(;r.pos>>3){case 1:s.packet=i.Packet.decode(r,r.uint32());break;case 2:s.acknowledgement=r.bytes();break;case 3:s.proofAcked=r.bytes();break;case 4:s.proofHeight=o.Height.decode(r,r.uint32());break;case 5:s.signer=r.string();break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=R();return(0,s.isSet)(e.packet)&&(t.packet=i.Packet.fromJSON(e.packet)),(0,s.isSet)(e.acknowledgement)&&(t.acknowledgement=(0,s.bytesFromBase64)(e.acknowledgement)),(0,s.isSet)(e.proofAcked)&&(t.proofAcked=(0,s.bytesFromBase64)(e.proofAcked)),(0,s.isSet)(e.proofHeight)&&(t.proofHeight=o.Height.fromJSON(e.proofHeight)),(0,s.isSet)(e.signer)&&(t.signer=String(e.signer)),t},toJSON(e){let t={};return void 0!==e.packet&&(t.packet=e.packet?i.Packet.toJSON(e.packet):void 0),void 0!==e.acknowledgement&&(t.acknowledgement=(0,s.base64FromBytes)(void 0!==e.acknowledgement?e.acknowledgement:new Uint8Array)),void 0!==e.proofAcked&&(t.proofAcked=(0,s.base64FromBytes)(void 0!==e.proofAcked?e.proofAcked:new Uint8Array)),void 0!==e.proofHeight&&(t.proofHeight=e.proofHeight?o.Height.toJSON(e.proofHeight):void 0),void 0!==e.signer&&(t.signer=e.signer),t},fromPartial(e){var t,r,n;let a=R();return void 0!==e.packet&&null!==e.packet&&(a.packet=i.Packet.fromPartial(e.packet)),a.acknowledgement=null!==(t=e.acknowledgement)&&void 0!==t?t:new Uint8Array,a.proofAcked=null!==(r=e.proofAcked)&&void 0!==r?r:new Uint8Array,void 0!==e.proofHeight&&null!==e.proofHeight&&(a.proofHeight=o.Height.fromPartial(e.proofHeight)),a.signer=null!==(n=e.signer)&&void 0!==n?n:"",a}},t.MsgAcknowledgementResponse={typeUrl:"/ibc.core.channel.v1.MsgAcknowledgementResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return 0!==e.result&&t.uint32(8).int32(e.result),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=E();for(;r.pos>>3==1?i.result=r.int32():r.skipType(7&e)}return i},fromJSON(e){let t=E();return(0,s.isSet)(e.result)&&(t.result=l(e.result)),t},toJSON(e){let t={};return void 0!==e.result&&(t.result=u(e.result)),t},fromPartial(e){var t;let r=E();return r.result=null!==(t=e.result)&&void 0!==t?t:0,r}};class T{ChannelOpenInit(e){let r=t.MsgChannelOpenInit.encode(e).finish();return this.rpc.request("ibc.core.channel.v1.Msg","ChannelOpenInit",r).then(e=>t.MsgChannelOpenInitResponse.decode(new a.BinaryReader(e)))}ChannelOpenTry(e){let r=t.MsgChannelOpenTry.encode(e).finish();return this.rpc.request("ibc.core.channel.v1.Msg","ChannelOpenTry",r).then(e=>t.MsgChannelOpenTryResponse.decode(new a.BinaryReader(e)))}ChannelOpenAck(e){let r=t.MsgChannelOpenAck.encode(e).finish();return this.rpc.request("ibc.core.channel.v1.Msg","ChannelOpenAck",r).then(e=>t.MsgChannelOpenAckResponse.decode(new a.BinaryReader(e)))}ChannelOpenConfirm(e){let r=t.MsgChannelOpenConfirm.encode(e).finish();return this.rpc.request("ibc.core.channel.v1.Msg","ChannelOpenConfirm",r).then(e=>t.MsgChannelOpenConfirmResponse.decode(new a.BinaryReader(e)))}ChannelCloseInit(e){let r=t.MsgChannelCloseInit.encode(e).finish();return this.rpc.request("ibc.core.channel.v1.Msg","ChannelCloseInit",r).then(e=>t.MsgChannelCloseInitResponse.decode(new a.BinaryReader(e)))}ChannelCloseConfirm(e){let r=t.MsgChannelCloseConfirm.encode(e).finish();return this.rpc.request("ibc.core.channel.v1.Msg","ChannelCloseConfirm",r).then(e=>t.MsgChannelCloseConfirmResponse.decode(new a.BinaryReader(e)))}RecvPacket(e){let r=t.MsgRecvPacket.encode(e).finish();return this.rpc.request("ibc.core.channel.v1.Msg","RecvPacket",r).then(e=>t.MsgRecvPacketResponse.decode(new a.BinaryReader(e)))}Timeout(e){let r=t.MsgTimeout.encode(e).finish();return this.rpc.request("ibc.core.channel.v1.Msg","Timeout",r).then(e=>t.MsgTimeoutResponse.decode(new a.BinaryReader(e)))}TimeoutOnClose(e){let r=t.MsgTimeoutOnClose.encode(e).finish();return this.rpc.request("ibc.core.channel.v1.Msg","TimeoutOnClose",r).then(e=>t.MsgTimeoutOnCloseResponse.decode(new a.BinaryReader(e)))}Acknowledgement(e){let r=t.MsgAcknowledgement.encode(e).finish();return this.rpc.request("ibc.core.channel.v1.Msg","Acknowledgement",r).then(e=>t.MsgAcknowledgementResponse.decode(new a.BinaryReader(e)))}constructor(e){this.rpc=e,this.ChannelOpenInit=this.ChannelOpenInit.bind(this),this.ChannelOpenTry=this.ChannelOpenTry.bind(this),this.ChannelOpenAck=this.ChannelOpenAck.bind(this),this.ChannelOpenConfirm=this.ChannelOpenConfirm.bind(this),this.ChannelCloseInit=this.ChannelCloseInit.bind(this),this.ChannelCloseConfirm=this.ChannelCloseConfirm.bind(this),this.RecvPacket=this.RecvPacket.bind(this),this.Timeout=this.Timeout.bind(this),this.TimeoutOnClose=this.TimeoutOnClose.bind(this),this.Acknowledgement=this.Acknowledgement.bind(this)}}t.MsgClientImpl=T},23489:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Params=t.Height=t.UpgradeProposal=t.ClientUpdateProposal=t.ClientConsensusStates=t.ConsensusStateWithHeight=t.IdentifiedClientState=t.protobufPackage=void 0;let n=r(11879),i=r(61819),o=r(46554),a=r(99133);function s(){return{clientId:"",clientState:void 0}}function l(){return{height:t.Height.fromPartial({}),consensusState:void 0}}function u(){return{clientId:"",consensusStates:[]}}function d(){return{title:"",description:"",subjectClientId:"",substituteClientId:""}}function c(){return{title:"",description:"",plan:i.Plan.fromPartial({}),upgradedClientState:void 0}}function p(){return{revisionNumber:BigInt(0),revisionHeight:BigInt(0)}}function f(){return{allowedClients:[]}}t.protobufPackage="ibc.core.client.v1",t.IdentifiedClientState={typeUrl:"/ibc.core.client.v1.IdentifiedClientState",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.clientId&&t.uint32(10).string(e.clientId),void 0!==e.clientState&&n.Any.encode(e.clientState,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=s();for(;r.pos>>3){case 1:a.clientId=r.string();break;case 2:a.clientState=n.Any.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=s();return(0,a.isSet)(e.clientId)&&(t.clientId=String(e.clientId)),(0,a.isSet)(e.clientState)&&(t.clientState=n.Any.fromJSON(e.clientState)),t},toJSON(e){let t={};return void 0!==e.clientId&&(t.clientId=e.clientId),void 0!==e.clientState&&(t.clientState=e.clientState?n.Any.toJSON(e.clientState):void 0),t},fromPartial(e){var t;let r=s();return r.clientId=null!==(t=e.clientId)&&void 0!==t?t:"",void 0!==e.clientState&&null!==e.clientState&&(r.clientState=n.Any.fromPartial(e.clientState)),r}},t.ConsensusStateWithHeight={typeUrl:"/ibc.core.client.v1.ConsensusStateWithHeight",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return void 0!==e.height&&t.Height.encode(e.height,r.uint32(10).fork()).ldelim(),void 0!==e.consensusState&&n.Any.encode(e.consensusState,r.uint32(18).fork()).ldelim(),r},decode(e,r){let i=e instanceof o.BinaryReader?e:new o.BinaryReader(e),a=void 0===r?i.len:i.pos+r,s=l();for(;i.pos>>3){case 1:s.height=t.Height.decode(i,i.uint32());break;case 2:s.consensusState=n.Any.decode(i,i.uint32());break;default:i.skipType(7&e)}}return s},fromJSON(e){let r=l();return(0,a.isSet)(e.height)&&(r.height=t.Height.fromJSON(e.height)),(0,a.isSet)(e.consensusState)&&(r.consensusState=n.Any.fromJSON(e.consensusState)),r},toJSON(e){let r={};return void 0!==e.height&&(r.height=e.height?t.Height.toJSON(e.height):void 0),void 0!==e.consensusState&&(r.consensusState=e.consensusState?n.Any.toJSON(e.consensusState):void 0),r},fromPartial(e){let r=l();return void 0!==e.height&&null!==e.height&&(r.height=t.Height.fromPartial(e.height)),void 0!==e.consensusState&&null!==e.consensusState&&(r.consensusState=n.Any.fromPartial(e.consensusState)),r}},t.ClientConsensusStates={typeUrl:"/ibc.core.client.v1.ClientConsensusStates",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let n of(""!==e.clientId&&r.uint32(10).string(e.clientId),e.consensusStates))t.ConsensusStateWithHeight.encode(n,r.uint32(18).fork()).ldelim();return r},decode(e,r){let n=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===r?n.len:n.pos+r,a=u();for(;n.pos>>3){case 1:a.clientId=n.string();break;case 2:a.consensusStates.push(t.ConsensusStateWithHeight.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return a},fromJSON(e){let r=u();return(0,a.isSet)(e.clientId)&&(r.clientId=String(e.clientId)),Array.isArray(null==e?void 0:e.consensusStates)&&(r.consensusStates=e.consensusStates.map(e=>t.ConsensusStateWithHeight.fromJSON(e))),r},toJSON(e){let r={};return void 0!==e.clientId&&(r.clientId=e.clientId),e.consensusStates?r.consensusStates=e.consensusStates.map(e=>e?t.ConsensusStateWithHeight.toJSON(e):void 0):r.consensusStates=[],r},fromPartial(e){var r,n;let i=u();return i.clientId=null!==(n=e.clientId)&&void 0!==n?n:"",i.consensusStates=(null===(r=e.consensusStates)||void 0===r?void 0:r.map(e=>t.ConsensusStateWithHeight.fromPartial(e)))||[],i}},t.ClientUpdateProposal={typeUrl:"/ibc.core.client.v1.ClientUpdateProposal",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.title&&t.uint32(10).string(e.title),""!==e.description&&t.uint32(18).string(e.description),""!==e.subjectClientId&&t.uint32(26).string(e.subjectClientId),""!==e.substituteClientId&&t.uint32(34).string(e.substituteClientId),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=d();for(;r.pos>>3){case 1:i.title=r.string();break;case 2:i.description=r.string();break;case 3:i.subjectClientId=r.string();break;case 4:i.substituteClientId=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=d();return(0,a.isSet)(e.title)&&(t.title=String(e.title)),(0,a.isSet)(e.description)&&(t.description=String(e.description)),(0,a.isSet)(e.subjectClientId)&&(t.subjectClientId=String(e.subjectClientId)),(0,a.isSet)(e.substituteClientId)&&(t.substituteClientId=String(e.substituteClientId)),t},toJSON(e){let t={};return void 0!==e.title&&(t.title=e.title),void 0!==e.description&&(t.description=e.description),void 0!==e.subjectClientId&&(t.subjectClientId=e.subjectClientId),void 0!==e.substituteClientId&&(t.substituteClientId=e.substituteClientId),t},fromPartial(e){var t,r,n,i;let o=d();return o.title=null!==(t=e.title)&&void 0!==t?t:"",o.description=null!==(r=e.description)&&void 0!==r?r:"",o.subjectClientId=null!==(n=e.subjectClientId)&&void 0!==n?n:"",o.substituteClientId=null!==(i=e.substituteClientId)&&void 0!==i?i:"",o}},t.UpgradeProposal={typeUrl:"/ibc.core.client.v1.UpgradeProposal",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.title&&t.uint32(10).string(e.title),""!==e.description&&t.uint32(18).string(e.description),void 0!==e.plan&&i.Plan.encode(e.plan,t.uint32(26).fork()).ldelim(),void 0!==e.upgradedClientState&&n.Any.encode(e.upgradedClientState,t.uint32(34).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),a=void 0===t?r.len:r.pos+t,s=c();for(;r.pos>>3){case 1:s.title=r.string();break;case 2:s.description=r.string();break;case 3:s.plan=i.Plan.decode(r,r.uint32());break;case 4:s.upgradedClientState=n.Any.decode(r,r.uint32());break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=c();return(0,a.isSet)(e.title)&&(t.title=String(e.title)),(0,a.isSet)(e.description)&&(t.description=String(e.description)),(0,a.isSet)(e.plan)&&(t.plan=i.Plan.fromJSON(e.plan)),(0,a.isSet)(e.upgradedClientState)&&(t.upgradedClientState=n.Any.fromJSON(e.upgradedClientState)),t},toJSON(e){let t={};return void 0!==e.title&&(t.title=e.title),void 0!==e.description&&(t.description=e.description),void 0!==e.plan&&(t.plan=e.plan?i.Plan.toJSON(e.plan):void 0),void 0!==e.upgradedClientState&&(t.upgradedClientState=e.upgradedClientState?n.Any.toJSON(e.upgradedClientState):void 0),t},fromPartial(e){var t,r;let o=c();return o.title=null!==(t=e.title)&&void 0!==t?t:"",o.description=null!==(r=e.description)&&void 0!==r?r:"",void 0!==e.plan&&null!==e.plan&&(o.plan=i.Plan.fromPartial(e.plan)),void 0!==e.upgradedClientState&&null!==e.upgradedClientState&&(o.upgradedClientState=n.Any.fromPartial(e.upgradedClientState)),o}},t.Height={typeUrl:"/ibc.core.client.v1.Height",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return e.revisionNumber!==BigInt(0)&&t.uint32(8).uint64(e.revisionNumber),e.revisionHeight!==BigInt(0)&&t.uint32(16).uint64(e.revisionHeight),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=p();for(;r.pos>>3){case 1:i.revisionNumber=r.uint64();break;case 2:i.revisionHeight=r.uint64();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=p();return(0,a.isSet)(e.revisionNumber)&&(t.revisionNumber=BigInt(e.revisionNumber.toString())),(0,a.isSet)(e.revisionHeight)&&(t.revisionHeight=BigInt(e.revisionHeight.toString())),t},toJSON(e){let t={};return void 0!==e.revisionNumber&&(t.revisionNumber=(e.revisionNumber||BigInt(0)).toString()),void 0!==e.revisionHeight&&(t.revisionHeight=(e.revisionHeight||BigInt(0)).toString()),t},fromPartial(e){let t=p();return void 0!==e.revisionNumber&&null!==e.revisionNumber&&(t.revisionNumber=BigInt(e.revisionNumber.toString())),void 0!==e.revisionHeight&&null!==e.revisionHeight&&(t.revisionHeight=BigInt(e.revisionHeight.toString())),t}},t.Params={typeUrl:"/ibc.core.client.v1.Params",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of e.allowedClients)t.uint32(10).string(r);return t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=f();for(;r.pos>>3==1?i.allowedClients.push(r.string()):r.skipType(7&e)}return i},fromJSON(e){let t=f();return Array.isArray(null==e?void 0:e.allowedClients)&&(t.allowedClients=e.allowedClients.map(e=>String(e))),t},toJSON(e){let t={};return e.allowedClients?t.allowedClients=e.allowedClients.map(e=>e):t.allowedClients=[],t},fromPartial(e){var t;let r=f();return r.allowedClients=(null===(t=e.allowedClients)||void 0===t?void 0:t.map(e=>e))||[],r}}},35838:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QueryClientImpl=t.QueryUpgradedConsensusStateResponse=t.QueryUpgradedConsensusStateRequest=t.QueryUpgradedClientStateResponse=t.QueryUpgradedClientStateRequest=t.QueryClientParamsResponse=t.QueryClientParamsRequest=t.QueryClientStatusResponse=t.QueryClientStatusRequest=t.QueryConsensusStateHeightsResponse=t.QueryConsensusStateHeightsRequest=t.QueryConsensusStatesResponse=t.QueryConsensusStatesRequest=t.QueryConsensusStateResponse=t.QueryConsensusStateRequest=t.QueryClientStatesResponse=t.QueryClientStatesRequest=t.QueryClientStateResponse=t.QueryClientStateRequest=t.protobufPackage=void 0;let n=r(86141),i=r(11879),o=r(23489),a=r(46554),s=r(99133);function l(){return{clientId:""}}function u(){return{clientState:void 0,proof:new Uint8Array,proofHeight:o.Height.fromPartial({})}}function d(){return{pagination:void 0}}function c(){return{clientStates:[],pagination:void 0}}function p(){return{clientId:"",revisionNumber:BigInt(0),revisionHeight:BigInt(0),latestHeight:!1}}function f(){return{consensusState:void 0,proof:new Uint8Array,proofHeight:o.Height.fromPartial({})}}function h(){return{clientId:"",pagination:void 0}}function g(){return{consensusStates:[],pagination:void 0}}function m(){return{clientId:"",pagination:void 0}}function y(){return{consensusStateHeights:[],pagination:void 0}}function v(){return{clientId:""}}function b(){return{status:""}}function S(){return{}}function w(){return{params:void 0}}function _(){return{}}function k(){return{upgradedClientState:void 0}}function O(){return{}}function P(){return{upgradedConsensusState:void 0}}t.protobufPackage="ibc.core.client.v1",t.QueryClientStateRequest={typeUrl:"/ibc.core.client.v1.QueryClientStateRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.clientId&&t.uint32(10).string(e.clientId),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=l();for(;r.pos>>3==1?i.clientId=r.string():r.skipType(7&e)}return i},fromJSON(e){let t=l();return(0,s.isSet)(e.clientId)&&(t.clientId=String(e.clientId)),t},toJSON(e){let t={};return void 0!==e.clientId&&(t.clientId=e.clientId),t},fromPartial(e){var t;let r=l();return r.clientId=null!==(t=e.clientId)&&void 0!==t?t:"",r}},t.QueryClientStateResponse={typeUrl:"/ibc.core.client.v1.QueryClientStateResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return void 0!==e.clientState&&i.Any.encode(e.clientState,t.uint32(10).fork()).ldelim(),0!==e.proof.length&&t.uint32(18).bytes(e.proof),void 0!==e.proofHeight&&o.Height.encode(e.proofHeight,t.uint32(26).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,s=u();for(;r.pos>>3){case 1:s.clientState=i.Any.decode(r,r.uint32());break;case 2:s.proof=r.bytes();break;case 3:s.proofHeight=o.Height.decode(r,r.uint32());break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=u();return(0,s.isSet)(e.clientState)&&(t.clientState=i.Any.fromJSON(e.clientState)),(0,s.isSet)(e.proof)&&(t.proof=(0,s.bytesFromBase64)(e.proof)),(0,s.isSet)(e.proofHeight)&&(t.proofHeight=o.Height.fromJSON(e.proofHeight)),t},toJSON(e){let t={};return void 0!==e.clientState&&(t.clientState=e.clientState?i.Any.toJSON(e.clientState):void 0),void 0!==e.proof&&(t.proof=(0,s.base64FromBytes)(void 0!==e.proof?e.proof:new Uint8Array)),void 0!==e.proofHeight&&(t.proofHeight=e.proofHeight?o.Height.toJSON(e.proofHeight):void 0),t},fromPartial(e){var t;let r=u();return void 0!==e.clientState&&null!==e.clientState&&(r.clientState=i.Any.fromPartial(e.clientState)),r.proof=null!==(t=e.proof)&&void 0!==t?t:new Uint8Array,void 0!==e.proofHeight&&null!==e.proofHeight&&(r.proofHeight=o.Height.fromPartial(e.proofHeight)),r}},t.QueryClientStatesRequest={typeUrl:"/ibc.core.client.v1.QueryClientStatesRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return void 0!==e.pagination&&n.PageRequest.encode(e.pagination,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),i=void 0===t?r.len:r.pos+t,o=d();for(;r.pos>>3==1?o.pagination=n.PageRequest.decode(r,r.uint32()):r.skipType(7&e)}return o},fromJSON(e){let t=d();return(0,s.isSet)(e.pagination)&&(t.pagination=n.PageRequest.fromJSON(e.pagination)),t},toJSON(e){let t={};return void 0!==e.pagination&&(t.pagination=e.pagination?n.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){let t=d();return void 0!==e.pagination&&null!==e.pagination&&(t.pagination=n.PageRequest.fromPartial(e.pagination)),t}},t.QueryClientStatesResponse={typeUrl:"/ibc.core.client.v1.QueryClientStatesResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();for(let r of e.clientStates)o.IdentifiedClientState.encode(r,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&n.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),i=void 0===t?r.len:r.pos+t,s=c();for(;r.pos>>3){case 1:s.clientStates.push(o.IdentifiedClientState.decode(r,r.uint32()));break;case 2:s.pagination=n.PageResponse.decode(r,r.uint32());break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=c();return Array.isArray(null==e?void 0:e.clientStates)&&(t.clientStates=e.clientStates.map(e=>o.IdentifiedClientState.fromJSON(e))),(0,s.isSet)(e.pagination)&&(t.pagination=n.PageResponse.fromJSON(e.pagination)),t},toJSON(e){let t={};return e.clientStates?t.clientStates=e.clientStates.map(e=>e?o.IdentifiedClientState.toJSON(e):void 0):t.clientStates=[],void 0!==e.pagination&&(t.pagination=e.pagination?n.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=c();return r.clientStates=(null===(t=e.clientStates)||void 0===t?void 0:t.map(e=>o.IdentifiedClientState.fromPartial(e)))||[],void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageResponse.fromPartial(e.pagination)),r}},t.QueryConsensusStateRequest={typeUrl:"/ibc.core.client.v1.QueryConsensusStateRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.clientId&&t.uint32(10).string(e.clientId),e.revisionNumber!==BigInt(0)&&t.uint32(16).uint64(e.revisionNumber),e.revisionHeight!==BigInt(0)&&t.uint32(24).uint64(e.revisionHeight),!0===e.latestHeight&&t.uint32(32).bool(e.latestHeight),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=p();for(;r.pos>>3){case 1:i.clientId=r.string();break;case 2:i.revisionNumber=r.uint64();break;case 3:i.revisionHeight=r.uint64();break;case 4:i.latestHeight=r.bool();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=p();return(0,s.isSet)(e.clientId)&&(t.clientId=String(e.clientId)),(0,s.isSet)(e.revisionNumber)&&(t.revisionNumber=BigInt(e.revisionNumber.toString())),(0,s.isSet)(e.revisionHeight)&&(t.revisionHeight=BigInt(e.revisionHeight.toString())),(0,s.isSet)(e.latestHeight)&&(t.latestHeight=!!e.latestHeight),t},toJSON(e){let t={};return void 0!==e.clientId&&(t.clientId=e.clientId),void 0!==e.revisionNumber&&(t.revisionNumber=(e.revisionNumber||BigInt(0)).toString()),void 0!==e.revisionHeight&&(t.revisionHeight=(e.revisionHeight||BigInt(0)).toString()),void 0!==e.latestHeight&&(t.latestHeight=e.latestHeight),t},fromPartial(e){var t,r;let n=p();return n.clientId=null!==(t=e.clientId)&&void 0!==t?t:"",void 0!==e.revisionNumber&&null!==e.revisionNumber&&(n.revisionNumber=BigInt(e.revisionNumber.toString())),void 0!==e.revisionHeight&&null!==e.revisionHeight&&(n.revisionHeight=BigInt(e.revisionHeight.toString())),n.latestHeight=null!==(r=e.latestHeight)&&void 0!==r&&r,n}},t.QueryConsensusStateResponse={typeUrl:"/ibc.core.client.v1.QueryConsensusStateResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return void 0!==e.consensusState&&i.Any.encode(e.consensusState,t.uint32(10).fork()).ldelim(),0!==e.proof.length&&t.uint32(18).bytes(e.proof),void 0!==e.proofHeight&&o.Height.encode(e.proofHeight,t.uint32(26).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,s=f();for(;r.pos>>3){case 1:s.consensusState=i.Any.decode(r,r.uint32());break;case 2:s.proof=r.bytes();break;case 3:s.proofHeight=o.Height.decode(r,r.uint32());break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=f();return(0,s.isSet)(e.consensusState)&&(t.consensusState=i.Any.fromJSON(e.consensusState)),(0,s.isSet)(e.proof)&&(t.proof=(0,s.bytesFromBase64)(e.proof)),(0,s.isSet)(e.proofHeight)&&(t.proofHeight=o.Height.fromJSON(e.proofHeight)),t},toJSON(e){let t={};return void 0!==e.consensusState&&(t.consensusState=e.consensusState?i.Any.toJSON(e.consensusState):void 0),void 0!==e.proof&&(t.proof=(0,s.base64FromBytes)(void 0!==e.proof?e.proof:new Uint8Array)),void 0!==e.proofHeight&&(t.proofHeight=e.proofHeight?o.Height.toJSON(e.proofHeight):void 0),t},fromPartial(e){var t;let r=f();return void 0!==e.consensusState&&null!==e.consensusState&&(r.consensusState=i.Any.fromPartial(e.consensusState)),r.proof=null!==(t=e.proof)&&void 0!==t?t:new Uint8Array,void 0!==e.proofHeight&&null!==e.proofHeight&&(r.proofHeight=o.Height.fromPartial(e.proofHeight)),r}},t.QueryConsensusStatesRequest={typeUrl:"/ibc.core.client.v1.QueryConsensusStatesRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.clientId&&t.uint32(10).string(e.clientId),void 0!==e.pagination&&n.PageRequest.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),i=void 0===t?r.len:r.pos+t,o=h();for(;r.pos>>3){case 1:o.clientId=r.string();break;case 2:o.pagination=n.PageRequest.decode(r,r.uint32());break;default:r.skipType(7&e)}}return o},fromJSON(e){let t=h();return(0,s.isSet)(e.clientId)&&(t.clientId=String(e.clientId)),(0,s.isSet)(e.pagination)&&(t.pagination=n.PageRequest.fromJSON(e.pagination)),t},toJSON(e){let t={};return void 0!==e.clientId&&(t.clientId=e.clientId),void 0!==e.pagination&&(t.pagination=e.pagination?n.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=h();return r.clientId=null!==(t=e.clientId)&&void 0!==t?t:"",void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageRequest.fromPartial(e.pagination)),r}},t.QueryConsensusStatesResponse={typeUrl:"/ibc.core.client.v1.QueryConsensusStatesResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();for(let r of e.consensusStates)o.ConsensusStateWithHeight.encode(r,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&n.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),i=void 0===t?r.len:r.pos+t,s=g();for(;r.pos>>3){case 1:s.consensusStates.push(o.ConsensusStateWithHeight.decode(r,r.uint32()));break;case 2:s.pagination=n.PageResponse.decode(r,r.uint32());break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=g();return Array.isArray(null==e?void 0:e.consensusStates)&&(t.consensusStates=e.consensusStates.map(e=>o.ConsensusStateWithHeight.fromJSON(e))),(0,s.isSet)(e.pagination)&&(t.pagination=n.PageResponse.fromJSON(e.pagination)),t},toJSON(e){let t={};return e.consensusStates?t.consensusStates=e.consensusStates.map(e=>e?o.ConsensusStateWithHeight.toJSON(e):void 0):t.consensusStates=[],void 0!==e.pagination&&(t.pagination=e.pagination?n.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=g();return r.consensusStates=(null===(t=e.consensusStates)||void 0===t?void 0:t.map(e=>o.ConsensusStateWithHeight.fromPartial(e)))||[],void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageResponse.fromPartial(e.pagination)),r}},t.QueryConsensusStateHeightsRequest={typeUrl:"/ibc.core.client.v1.QueryConsensusStateHeightsRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.clientId&&t.uint32(10).string(e.clientId),void 0!==e.pagination&&n.PageRequest.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),i=void 0===t?r.len:r.pos+t,o=m();for(;r.pos>>3){case 1:o.clientId=r.string();break;case 2:o.pagination=n.PageRequest.decode(r,r.uint32());break;default:r.skipType(7&e)}}return o},fromJSON(e){let t=m();return(0,s.isSet)(e.clientId)&&(t.clientId=String(e.clientId)),(0,s.isSet)(e.pagination)&&(t.pagination=n.PageRequest.fromJSON(e.pagination)),t},toJSON(e){let t={};return void 0!==e.clientId&&(t.clientId=e.clientId),void 0!==e.pagination&&(t.pagination=e.pagination?n.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=m();return r.clientId=null!==(t=e.clientId)&&void 0!==t?t:"",void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageRequest.fromPartial(e.pagination)),r}},t.QueryConsensusStateHeightsResponse={typeUrl:"/ibc.core.client.v1.QueryConsensusStateHeightsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();for(let r of e.consensusStateHeights)o.Height.encode(r,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&n.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),i=void 0===t?r.len:r.pos+t,s=y();for(;r.pos>>3){case 1:s.consensusStateHeights.push(o.Height.decode(r,r.uint32()));break;case 2:s.pagination=n.PageResponse.decode(r,r.uint32());break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=y();return Array.isArray(null==e?void 0:e.consensusStateHeights)&&(t.consensusStateHeights=e.consensusStateHeights.map(e=>o.Height.fromJSON(e))),(0,s.isSet)(e.pagination)&&(t.pagination=n.PageResponse.fromJSON(e.pagination)),t},toJSON(e){let t={};return e.consensusStateHeights?t.consensusStateHeights=e.consensusStateHeights.map(e=>e?o.Height.toJSON(e):void 0):t.consensusStateHeights=[],void 0!==e.pagination&&(t.pagination=e.pagination?n.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=y();return r.consensusStateHeights=(null===(t=e.consensusStateHeights)||void 0===t?void 0:t.map(e=>o.Height.fromPartial(e)))||[],void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageResponse.fromPartial(e.pagination)),r}},t.QueryClientStatusRequest={typeUrl:"/ibc.core.client.v1.QueryClientStatusRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.clientId&&t.uint32(10).string(e.clientId),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=v();for(;r.pos>>3==1?i.clientId=r.string():r.skipType(7&e)}return i},fromJSON(e){let t=v();return(0,s.isSet)(e.clientId)&&(t.clientId=String(e.clientId)),t},toJSON(e){let t={};return void 0!==e.clientId&&(t.clientId=e.clientId),t},fromPartial(e){var t;let r=v();return r.clientId=null!==(t=e.clientId)&&void 0!==t?t:"",r}},t.QueryClientStatusResponse={typeUrl:"/ibc.core.client.v1.QueryClientStatusResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.status&&t.uint32(10).string(e.status),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=b();for(;r.pos>>3==1?i.status=r.string():r.skipType(7&e)}return i},fromJSON(e){let t=b();return(0,s.isSet)(e.status)&&(t.status=String(e.status)),t},toJSON(e){let t={};return void 0!==e.status&&(t.status=e.status),t},fromPartial(e){var t;let r=b();return r.status=null!==(t=e.status)&&void 0!==t?t:"",r}},t.QueryClientParamsRequest={typeUrl:"/ibc.core.client.v1.QueryClientParamsRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=S();for(;r.posS(),toJSON:e=>({}),fromPartial:e=>S()},t.QueryClientParamsResponse={typeUrl:"/ibc.core.client.v1.QueryClientParamsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return void 0!==e.params&&o.Params.encode(e.params,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=w();for(;r.pos>>3==1?i.params=o.Params.decode(r,r.uint32()):r.skipType(7&e)}return i},fromJSON(e){let t=w();return(0,s.isSet)(e.params)&&(t.params=o.Params.fromJSON(e.params)),t},toJSON(e){let t={};return void 0!==e.params&&(t.params=e.params?o.Params.toJSON(e.params):void 0),t},fromPartial(e){let t=w();return void 0!==e.params&&null!==e.params&&(t.params=o.Params.fromPartial(e.params)),t}},t.QueryUpgradedClientStateRequest={typeUrl:"/ibc.core.client.v1.QueryUpgradedClientStateRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=_();for(;r.pos_(),toJSON:e=>({}),fromPartial:e=>_()},t.QueryUpgradedClientStateResponse={typeUrl:"/ibc.core.client.v1.QueryUpgradedClientStateResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return void 0!==e.upgradedClientState&&i.Any.encode(e.upgradedClientState,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=k();for(;r.pos>>3==1?o.upgradedClientState=i.Any.decode(r,r.uint32()):r.skipType(7&e)}return o},fromJSON(e){let t=k();return(0,s.isSet)(e.upgradedClientState)&&(t.upgradedClientState=i.Any.fromJSON(e.upgradedClientState)),t},toJSON(e){let t={};return void 0!==e.upgradedClientState&&(t.upgradedClientState=e.upgradedClientState?i.Any.toJSON(e.upgradedClientState):void 0),t},fromPartial(e){let t=k();return void 0!==e.upgradedClientState&&null!==e.upgradedClientState&&(t.upgradedClientState=i.Any.fromPartial(e.upgradedClientState)),t}},t.QueryUpgradedConsensusStateRequest={typeUrl:"/ibc.core.client.v1.QueryUpgradedConsensusStateRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=O();for(;r.posO(),toJSON:e=>({}),fromPartial:e=>O()},t.QueryUpgradedConsensusStateResponse={typeUrl:"/ibc.core.client.v1.QueryUpgradedConsensusStateResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return void 0!==e.upgradedConsensusState&&i.Any.encode(e.upgradedConsensusState,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=P();for(;r.pos>>3==1?o.upgradedConsensusState=i.Any.decode(r,r.uint32()):r.skipType(7&e)}return o},fromJSON(e){let t=P();return(0,s.isSet)(e.upgradedConsensusState)&&(t.upgradedConsensusState=i.Any.fromJSON(e.upgradedConsensusState)),t},toJSON(e){let t={};return void 0!==e.upgradedConsensusState&&(t.upgradedConsensusState=e.upgradedConsensusState?i.Any.toJSON(e.upgradedConsensusState):void 0),t},fromPartial(e){let t=P();return void 0!==e.upgradedConsensusState&&null!==e.upgradedConsensusState&&(t.upgradedConsensusState=i.Any.fromPartial(e.upgradedConsensusState)),t}};class A{ClientState(e){let r=t.QueryClientStateRequest.encode(e).finish();return this.rpc.request("ibc.core.client.v1.Query","ClientState",r).then(e=>t.QueryClientStateResponse.decode(new a.BinaryReader(e)))}ClientStates(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{pagination:n.PageRequest.fromPartial({})},r=t.QueryClientStatesRequest.encode(e).finish();return this.rpc.request("ibc.core.client.v1.Query","ClientStates",r).then(e=>t.QueryClientStatesResponse.decode(new a.BinaryReader(e)))}ConsensusState(e){let r=t.QueryConsensusStateRequest.encode(e).finish();return this.rpc.request("ibc.core.client.v1.Query","ConsensusState",r).then(e=>t.QueryConsensusStateResponse.decode(new a.BinaryReader(e)))}ConsensusStates(e){let r=t.QueryConsensusStatesRequest.encode(e).finish();return this.rpc.request("ibc.core.client.v1.Query","ConsensusStates",r).then(e=>t.QueryConsensusStatesResponse.decode(new a.BinaryReader(e)))}ConsensusStateHeights(e){let r=t.QueryConsensusStateHeightsRequest.encode(e).finish();return this.rpc.request("ibc.core.client.v1.Query","ConsensusStateHeights",r).then(e=>t.QueryConsensusStateHeightsResponse.decode(new a.BinaryReader(e)))}ClientStatus(e){let r=t.QueryClientStatusRequest.encode(e).finish();return this.rpc.request("ibc.core.client.v1.Query","ClientStatus",r).then(e=>t.QueryClientStatusResponse.decode(new a.BinaryReader(e)))}ClientParams(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.QueryClientParamsRequest.encode(e).finish();return this.rpc.request("ibc.core.client.v1.Query","ClientParams",r).then(e=>t.QueryClientParamsResponse.decode(new a.BinaryReader(e)))}UpgradedClientState(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.QueryUpgradedClientStateRequest.encode(e).finish();return this.rpc.request("ibc.core.client.v1.Query","UpgradedClientState",r).then(e=>t.QueryUpgradedClientStateResponse.decode(new a.BinaryReader(e)))}UpgradedConsensusState(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.QueryUpgradedConsensusStateRequest.encode(e).finish();return this.rpc.request("ibc.core.client.v1.Query","UpgradedConsensusState",r).then(e=>t.QueryUpgradedConsensusStateResponse.decode(new a.BinaryReader(e)))}constructor(e){this.rpc=e,this.ClientState=this.ClientState.bind(this),this.ClientStates=this.ClientStates.bind(this),this.ConsensusState=this.ConsensusState.bind(this),this.ConsensusStates=this.ConsensusStates.bind(this),this.ConsensusStateHeights=this.ConsensusStateHeights.bind(this),this.ClientStatus=this.ClientStatus.bind(this),this.ClientParams=this.ClientParams.bind(this),this.UpgradedClientState=this.UpgradedClientState.bind(this),this.UpgradedConsensusState=this.UpgradedConsensusState.bind(this)}}t.QueryClientImpl=A},42274:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MsgClientImpl=t.MsgSubmitMisbehaviourResponse=t.MsgSubmitMisbehaviour=t.MsgUpgradeClientResponse=t.MsgUpgradeClient=t.MsgUpdateClientResponse=t.MsgUpdateClient=t.MsgCreateClientResponse=t.MsgCreateClient=t.protobufPackage=void 0;let n=r(11879),i=r(46554),o=r(99133);function a(){return{clientState:void 0,consensusState:void 0,signer:""}}function s(){return{}}function l(){return{clientId:"",clientMessage:void 0,signer:""}}function u(){return{}}function d(){return{clientId:"",clientState:void 0,consensusState:void 0,proofUpgradeClient:new Uint8Array,proofUpgradeConsensusState:new Uint8Array,signer:""}}function c(){return{}}function p(){return{clientId:"",misbehaviour:void 0,signer:""}}function f(){return{}}t.protobufPackage="ibc.core.client.v1",t.MsgCreateClient={typeUrl:"/ibc.core.client.v1.MsgCreateClient",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();return void 0!==e.clientState&&n.Any.encode(e.clientState,t.uint32(10).fork()).ldelim(),void 0!==e.consensusState&&n.Any.encode(e.consensusState,t.uint32(18).fork()).ldelim(),""!==e.signer&&t.uint32(26).string(e.signer),t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),o=void 0===t?r.len:r.pos+t,s=a();for(;r.pos>>3){case 1:s.clientState=n.Any.decode(r,r.uint32());break;case 2:s.consensusState=n.Any.decode(r,r.uint32());break;case 3:s.signer=r.string();break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=a();return(0,o.isSet)(e.clientState)&&(t.clientState=n.Any.fromJSON(e.clientState)),(0,o.isSet)(e.consensusState)&&(t.consensusState=n.Any.fromJSON(e.consensusState)),(0,o.isSet)(e.signer)&&(t.signer=String(e.signer)),t},toJSON(e){let t={};return void 0!==e.clientState&&(t.clientState=e.clientState?n.Any.toJSON(e.clientState):void 0),void 0!==e.consensusState&&(t.consensusState=e.consensusState?n.Any.toJSON(e.consensusState):void 0),void 0!==e.signer&&(t.signer=e.signer),t},fromPartial(e){var t;let r=a();return void 0!==e.clientState&&null!==e.clientState&&(r.clientState=n.Any.fromPartial(e.clientState)),void 0!==e.consensusState&&null!==e.consensusState&&(r.consensusState=n.Any.fromPartial(e.consensusState)),r.signer=null!==(t=e.signer)&&void 0!==t?t:"",r}},t.MsgCreateClientResponse={typeUrl:"/ibc.core.client.v1.MsgCreateClientResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();return t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=s();for(;r.poss(),toJSON:e=>({}),fromPartial:e=>s()},t.MsgUpdateClient={typeUrl:"/ibc.core.client.v1.MsgUpdateClient",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();return""!==e.clientId&&t.uint32(10).string(e.clientId),void 0!==e.clientMessage&&n.Any.encode(e.clientMessage,t.uint32(18).fork()).ldelim(),""!==e.signer&&t.uint32(26).string(e.signer),t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),o=void 0===t?r.len:r.pos+t,a=l();for(;r.pos>>3){case 1:a.clientId=r.string();break;case 2:a.clientMessage=n.Any.decode(r,r.uint32());break;case 3:a.signer=r.string();break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=l();return(0,o.isSet)(e.clientId)&&(t.clientId=String(e.clientId)),(0,o.isSet)(e.clientMessage)&&(t.clientMessage=n.Any.fromJSON(e.clientMessage)),(0,o.isSet)(e.signer)&&(t.signer=String(e.signer)),t},toJSON(e){let t={};return void 0!==e.clientId&&(t.clientId=e.clientId),void 0!==e.clientMessage&&(t.clientMessage=e.clientMessage?n.Any.toJSON(e.clientMessage):void 0),void 0!==e.signer&&(t.signer=e.signer),t},fromPartial(e){var t,r;let i=l();return i.clientId=null!==(t=e.clientId)&&void 0!==t?t:"",void 0!==e.clientMessage&&null!==e.clientMessage&&(i.clientMessage=n.Any.fromPartial(e.clientMessage)),i.signer=null!==(r=e.signer)&&void 0!==r?r:"",i}},t.MsgUpdateClientResponse={typeUrl:"/ibc.core.client.v1.MsgUpdateClientResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();return t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=u();for(;r.posu(),toJSON:e=>({}),fromPartial:e=>u()},t.MsgUpgradeClient={typeUrl:"/ibc.core.client.v1.MsgUpgradeClient",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();return""!==e.clientId&&t.uint32(10).string(e.clientId),void 0!==e.clientState&&n.Any.encode(e.clientState,t.uint32(18).fork()).ldelim(),void 0!==e.consensusState&&n.Any.encode(e.consensusState,t.uint32(26).fork()).ldelim(),0!==e.proofUpgradeClient.length&&t.uint32(34).bytes(e.proofUpgradeClient),0!==e.proofUpgradeConsensusState.length&&t.uint32(42).bytes(e.proofUpgradeConsensusState),""!==e.signer&&t.uint32(50).string(e.signer),t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),o=void 0===t?r.len:r.pos+t,a=d();for(;r.pos>>3){case 1:a.clientId=r.string();break;case 2:a.clientState=n.Any.decode(r,r.uint32());break;case 3:a.consensusState=n.Any.decode(r,r.uint32());break;case 4:a.proofUpgradeClient=r.bytes();break;case 5:a.proofUpgradeConsensusState=r.bytes();break;case 6:a.signer=r.string();break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=d();return(0,o.isSet)(e.clientId)&&(t.clientId=String(e.clientId)),(0,o.isSet)(e.clientState)&&(t.clientState=n.Any.fromJSON(e.clientState)),(0,o.isSet)(e.consensusState)&&(t.consensusState=n.Any.fromJSON(e.consensusState)),(0,o.isSet)(e.proofUpgradeClient)&&(t.proofUpgradeClient=(0,o.bytesFromBase64)(e.proofUpgradeClient)),(0,o.isSet)(e.proofUpgradeConsensusState)&&(t.proofUpgradeConsensusState=(0,o.bytesFromBase64)(e.proofUpgradeConsensusState)),(0,o.isSet)(e.signer)&&(t.signer=String(e.signer)),t},toJSON(e){let t={};return void 0!==e.clientId&&(t.clientId=e.clientId),void 0!==e.clientState&&(t.clientState=e.clientState?n.Any.toJSON(e.clientState):void 0),void 0!==e.consensusState&&(t.consensusState=e.consensusState?n.Any.toJSON(e.consensusState):void 0),void 0!==e.proofUpgradeClient&&(t.proofUpgradeClient=(0,o.base64FromBytes)(void 0!==e.proofUpgradeClient?e.proofUpgradeClient:new Uint8Array)),void 0!==e.proofUpgradeConsensusState&&(t.proofUpgradeConsensusState=(0,o.base64FromBytes)(void 0!==e.proofUpgradeConsensusState?e.proofUpgradeConsensusState:new Uint8Array)),void 0!==e.signer&&(t.signer=e.signer),t},fromPartial(e){var t,r,i,o;let a=d();return a.clientId=null!==(t=e.clientId)&&void 0!==t?t:"",void 0!==e.clientState&&null!==e.clientState&&(a.clientState=n.Any.fromPartial(e.clientState)),void 0!==e.consensusState&&null!==e.consensusState&&(a.consensusState=n.Any.fromPartial(e.consensusState)),a.proofUpgradeClient=null!==(r=e.proofUpgradeClient)&&void 0!==r?r:new Uint8Array,a.proofUpgradeConsensusState=null!==(i=e.proofUpgradeConsensusState)&&void 0!==i?i:new Uint8Array,a.signer=null!==(o=e.signer)&&void 0!==o?o:"",a}},t.MsgUpgradeClientResponse={typeUrl:"/ibc.core.client.v1.MsgUpgradeClientResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();return t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=c();for(;r.posc(),toJSON:e=>({}),fromPartial:e=>c()},t.MsgSubmitMisbehaviour={typeUrl:"/ibc.core.client.v1.MsgSubmitMisbehaviour",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();return""!==e.clientId&&t.uint32(10).string(e.clientId),void 0!==e.misbehaviour&&n.Any.encode(e.misbehaviour,t.uint32(18).fork()).ldelim(),""!==e.signer&&t.uint32(26).string(e.signer),t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),o=void 0===t?r.len:r.pos+t,a=p();for(;r.pos>>3){case 1:a.clientId=r.string();break;case 2:a.misbehaviour=n.Any.decode(r,r.uint32());break;case 3:a.signer=r.string();break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=p();return(0,o.isSet)(e.clientId)&&(t.clientId=String(e.clientId)),(0,o.isSet)(e.misbehaviour)&&(t.misbehaviour=n.Any.fromJSON(e.misbehaviour)),(0,o.isSet)(e.signer)&&(t.signer=String(e.signer)),t},toJSON(e){let t={};return void 0!==e.clientId&&(t.clientId=e.clientId),void 0!==e.misbehaviour&&(t.misbehaviour=e.misbehaviour?n.Any.toJSON(e.misbehaviour):void 0),void 0!==e.signer&&(t.signer=e.signer),t},fromPartial(e){var t,r;let i=p();return i.clientId=null!==(t=e.clientId)&&void 0!==t?t:"",void 0!==e.misbehaviour&&null!==e.misbehaviour&&(i.misbehaviour=n.Any.fromPartial(e.misbehaviour)),i.signer=null!==(r=e.signer)&&void 0!==r?r:"",i}},t.MsgSubmitMisbehaviourResponse={typeUrl:"/ibc.core.client.v1.MsgSubmitMisbehaviourResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();return t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=f();for(;r.posf(),toJSON:e=>({}),fromPartial:e=>f()};class h{CreateClient(e){let r=t.MsgCreateClient.encode(e).finish();return this.rpc.request("ibc.core.client.v1.Msg","CreateClient",r).then(e=>t.MsgCreateClientResponse.decode(new i.BinaryReader(e)))}UpdateClient(e){let r=t.MsgUpdateClient.encode(e).finish();return this.rpc.request("ibc.core.client.v1.Msg","UpdateClient",r).then(e=>t.MsgUpdateClientResponse.decode(new i.BinaryReader(e)))}UpgradeClient(e){let r=t.MsgUpgradeClient.encode(e).finish();return this.rpc.request("ibc.core.client.v1.Msg","UpgradeClient",r).then(e=>t.MsgUpgradeClientResponse.decode(new i.BinaryReader(e)))}SubmitMisbehaviour(e){let r=t.MsgSubmitMisbehaviour.encode(e).finish();return this.rpc.request("ibc.core.client.v1.Msg","SubmitMisbehaviour",r).then(e=>t.MsgSubmitMisbehaviourResponse.decode(new i.BinaryReader(e)))}constructor(e){this.rpc=e,this.CreateClient=this.CreateClient.bind(this),this.UpdateClient=this.UpdateClient.bind(this),this.UpgradeClient=this.UpgradeClient.bind(this),this.SubmitMisbehaviour=this.SubmitMisbehaviour.bind(this)}}t.MsgClientImpl=h},56891:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MerkleProof=t.MerklePath=t.MerklePrefix=t.MerkleRoot=t.protobufPackage=void 0;let n=r(88401),i=r(46554),o=r(99133);function a(){return{hash:new Uint8Array}}function s(){return{keyPrefix:new Uint8Array}}function l(){return{keyPath:[]}}function u(){return{proofs:[]}}t.protobufPackage="ibc.core.commitment.v1",t.MerkleRoot={typeUrl:"/ibc.core.commitment.v1.MerkleRoot",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();return 0!==e.hash.length&&t.uint32(10).bytes(e.hash),t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=a();for(;r.pos>>3==1?o.hash=r.bytes():r.skipType(7&e)}return o},fromJSON(e){let t=a();return(0,o.isSet)(e.hash)&&(t.hash=(0,o.bytesFromBase64)(e.hash)),t},toJSON(e){let t={};return void 0!==e.hash&&(t.hash=(0,o.base64FromBytes)(void 0!==e.hash?e.hash:new Uint8Array)),t},fromPartial(e){var t;let r=a();return r.hash=null!==(t=e.hash)&&void 0!==t?t:new Uint8Array,r}},t.MerklePrefix={typeUrl:"/ibc.core.commitment.v1.MerklePrefix",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();return 0!==e.keyPrefix.length&&t.uint32(10).bytes(e.keyPrefix),t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=s();for(;r.pos>>3==1?o.keyPrefix=r.bytes():r.skipType(7&e)}return o},fromJSON(e){let t=s();return(0,o.isSet)(e.keyPrefix)&&(t.keyPrefix=(0,o.bytesFromBase64)(e.keyPrefix)),t},toJSON(e){let t={};return void 0!==e.keyPrefix&&(t.keyPrefix=(0,o.base64FromBytes)(void 0!==e.keyPrefix?e.keyPrefix:new Uint8Array)),t},fromPartial(e){var t;let r=s();return r.keyPrefix=null!==(t=e.keyPrefix)&&void 0!==t?t:new Uint8Array,r}},t.MerklePath={typeUrl:"/ibc.core.commitment.v1.MerklePath",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();for(let r of e.keyPath)t.uint32(10).string(r);return t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=l();for(;r.pos>>3==1?o.keyPath.push(r.string()):r.skipType(7&e)}return o},fromJSON(e){let t=l();return Array.isArray(null==e?void 0:e.keyPath)&&(t.keyPath=e.keyPath.map(e=>String(e))),t},toJSON(e){let t={};return e.keyPath?t.keyPath=e.keyPath.map(e=>e):t.keyPath=[],t},fromPartial(e){var t;let r=l();return r.keyPath=(null===(t=e.keyPath)||void 0===t?void 0:t.map(e=>e))||[],r}},t.MerkleProof={typeUrl:"/ibc.core.commitment.v1.MerkleProof",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();for(let r of e.proofs)n.CommitmentProof.encode(r,t.uint32(10).fork()).ldelim();return t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),o=void 0===t?r.len:r.pos+t,a=u();for(;r.pos>>3==1?a.proofs.push(n.CommitmentProof.decode(r,r.uint32())):r.skipType(7&e)}return a},fromJSON(e){let t=u();return Array.isArray(null==e?void 0:e.proofs)&&(t.proofs=e.proofs.map(e=>n.CommitmentProof.fromJSON(e))),t},toJSON(e){let t={};return e.proofs?t.proofs=e.proofs.map(e=>e?n.CommitmentProof.toJSON(e):void 0):t.proofs=[],t},fromPartial(e){var t;let r=u();return r.proofs=(null===(t=e.proofs)||void 0===t?void 0:t.map(e=>n.CommitmentProof.fromPartial(e)))||[],r}}},9496:function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Params=t.Version=t.ConnectionPaths=t.ClientPaths=t.Counterparty=t.IdentifiedConnection=t.ConnectionEnd=t.stateToJSON=t.stateFromJSON=t.State=t.protobufPackage=void 0;let i=r(56891),o=r(46554),a=r(99133);function s(e){switch(e){case 0:case"STATE_UNINITIALIZED_UNSPECIFIED":return n.STATE_UNINITIALIZED_UNSPECIFIED;case 1:case"STATE_INIT":return n.STATE_INIT;case 2:case"STATE_TRYOPEN":return n.STATE_TRYOPEN;case 3:case"STATE_OPEN":return n.STATE_OPEN;default:return n.UNRECOGNIZED}}function l(e){switch(e){case n.STATE_UNINITIALIZED_UNSPECIFIED:return"STATE_UNINITIALIZED_UNSPECIFIED";case n.STATE_INIT:return"STATE_INIT";case n.STATE_TRYOPEN:return"STATE_TRYOPEN";case n.STATE_OPEN:return"STATE_OPEN";case n.UNRECOGNIZED:default:return"UNRECOGNIZED"}}function u(){return{clientId:"",versions:[],state:0,counterparty:t.Counterparty.fromPartial({}),delayPeriod:BigInt(0)}}function d(){return{id:"",clientId:"",versions:[],state:0,counterparty:t.Counterparty.fromPartial({}),delayPeriod:BigInt(0)}}function c(){return{clientId:"",connectionId:"",prefix:i.MerklePrefix.fromPartial({})}}function p(){return{paths:[]}}function f(){return{clientId:"",paths:[]}}function h(){return{identifier:"",features:[]}}function g(){return{maxExpectedTimePerBlock:BigInt(0)}}t.protobufPackage="ibc.core.connection.v1",function(e){e[e.STATE_UNINITIALIZED_UNSPECIFIED=0]="STATE_UNINITIALIZED_UNSPECIFIED",e[e.STATE_INIT=1]="STATE_INIT",e[e.STATE_TRYOPEN=2]="STATE_TRYOPEN",e[e.STATE_OPEN=3]="STATE_OPEN",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(n||(t.State=n={})),t.stateFromJSON=s,t.stateToJSON=l,t.ConnectionEnd={typeUrl:"/ibc.core.connection.v1.ConnectionEnd",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let n of(""!==e.clientId&&r.uint32(10).string(e.clientId),e.versions))t.Version.encode(n,r.uint32(18).fork()).ldelim();return 0!==e.state&&r.uint32(24).int32(e.state),void 0!==e.counterparty&&t.Counterparty.encode(e.counterparty,r.uint32(34).fork()).ldelim(),e.delayPeriod!==BigInt(0)&&r.uint32(40).uint64(e.delayPeriod),r},decode(e,r){let n=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===r?n.len:n.pos+r,a=u();for(;n.pos>>3){case 1:a.clientId=n.string();break;case 2:a.versions.push(t.Version.decode(n,n.uint32()));break;case 3:a.state=n.int32();break;case 4:a.counterparty=t.Counterparty.decode(n,n.uint32());break;case 5:a.delayPeriod=n.uint64();break;default:n.skipType(7&e)}}return a},fromJSON(e){let r=u();return(0,a.isSet)(e.clientId)&&(r.clientId=String(e.clientId)),Array.isArray(null==e?void 0:e.versions)&&(r.versions=e.versions.map(e=>t.Version.fromJSON(e))),(0,a.isSet)(e.state)&&(r.state=s(e.state)),(0,a.isSet)(e.counterparty)&&(r.counterparty=t.Counterparty.fromJSON(e.counterparty)),(0,a.isSet)(e.delayPeriod)&&(r.delayPeriod=BigInt(e.delayPeriod.toString())),r},toJSON(e){let r={};return void 0!==e.clientId&&(r.clientId=e.clientId),e.versions?r.versions=e.versions.map(e=>e?t.Version.toJSON(e):void 0):r.versions=[],void 0!==e.state&&(r.state=l(e.state)),void 0!==e.counterparty&&(r.counterparty=e.counterparty?t.Counterparty.toJSON(e.counterparty):void 0),void 0!==e.delayPeriod&&(r.delayPeriod=(e.delayPeriod||BigInt(0)).toString()),r},fromPartial(e){var r,n,i;let o=u();return o.clientId=null!==(n=e.clientId)&&void 0!==n?n:"",o.versions=(null===(r=e.versions)||void 0===r?void 0:r.map(e=>t.Version.fromPartial(e)))||[],o.state=null!==(i=e.state)&&void 0!==i?i:0,void 0!==e.counterparty&&null!==e.counterparty&&(o.counterparty=t.Counterparty.fromPartial(e.counterparty)),void 0!==e.delayPeriod&&null!==e.delayPeriod&&(o.delayPeriod=BigInt(e.delayPeriod.toString())),o}},t.IdentifiedConnection={typeUrl:"/ibc.core.connection.v1.IdentifiedConnection",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let n of(""!==e.id&&r.uint32(10).string(e.id),""!==e.clientId&&r.uint32(18).string(e.clientId),e.versions))t.Version.encode(n,r.uint32(26).fork()).ldelim();return 0!==e.state&&r.uint32(32).int32(e.state),void 0!==e.counterparty&&t.Counterparty.encode(e.counterparty,r.uint32(42).fork()).ldelim(),e.delayPeriod!==BigInt(0)&&r.uint32(48).uint64(e.delayPeriod),r},decode(e,r){let n=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===r?n.len:n.pos+r,a=d();for(;n.pos>>3){case 1:a.id=n.string();break;case 2:a.clientId=n.string();break;case 3:a.versions.push(t.Version.decode(n,n.uint32()));break;case 4:a.state=n.int32();break;case 5:a.counterparty=t.Counterparty.decode(n,n.uint32());break;case 6:a.delayPeriod=n.uint64();break;default:n.skipType(7&e)}}return a},fromJSON(e){let r=d();return(0,a.isSet)(e.id)&&(r.id=String(e.id)),(0,a.isSet)(e.clientId)&&(r.clientId=String(e.clientId)),Array.isArray(null==e?void 0:e.versions)&&(r.versions=e.versions.map(e=>t.Version.fromJSON(e))),(0,a.isSet)(e.state)&&(r.state=s(e.state)),(0,a.isSet)(e.counterparty)&&(r.counterparty=t.Counterparty.fromJSON(e.counterparty)),(0,a.isSet)(e.delayPeriod)&&(r.delayPeriod=BigInt(e.delayPeriod.toString())),r},toJSON(e){let r={};return void 0!==e.id&&(r.id=e.id),void 0!==e.clientId&&(r.clientId=e.clientId),e.versions?r.versions=e.versions.map(e=>e?t.Version.toJSON(e):void 0):r.versions=[],void 0!==e.state&&(r.state=l(e.state)),void 0!==e.counterparty&&(r.counterparty=e.counterparty?t.Counterparty.toJSON(e.counterparty):void 0),void 0!==e.delayPeriod&&(r.delayPeriod=(e.delayPeriod||BigInt(0)).toString()),r},fromPartial(e){var r,n,i,o;let a=d();return a.id=null!==(n=e.id)&&void 0!==n?n:"",a.clientId=null!==(i=e.clientId)&&void 0!==i?i:"",a.versions=(null===(r=e.versions)||void 0===r?void 0:r.map(e=>t.Version.fromPartial(e)))||[],a.state=null!==(o=e.state)&&void 0!==o?o:0,void 0!==e.counterparty&&null!==e.counterparty&&(a.counterparty=t.Counterparty.fromPartial(e.counterparty)),void 0!==e.delayPeriod&&null!==e.delayPeriod&&(a.delayPeriod=BigInt(e.delayPeriod.toString())),a}},t.Counterparty={typeUrl:"/ibc.core.connection.v1.Counterparty",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.clientId&&t.uint32(10).string(e.clientId),""!==e.connectionId&&t.uint32(18).string(e.connectionId),void 0!==e.prefix&&i.MerklePrefix.encode(e.prefix,t.uint32(26).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,a=c();for(;r.pos>>3){case 1:a.clientId=r.string();break;case 2:a.connectionId=r.string();break;case 3:a.prefix=i.MerklePrefix.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=c();return(0,a.isSet)(e.clientId)&&(t.clientId=String(e.clientId)),(0,a.isSet)(e.connectionId)&&(t.connectionId=String(e.connectionId)),(0,a.isSet)(e.prefix)&&(t.prefix=i.MerklePrefix.fromJSON(e.prefix)),t},toJSON(e){let t={};return void 0!==e.clientId&&(t.clientId=e.clientId),void 0!==e.connectionId&&(t.connectionId=e.connectionId),void 0!==e.prefix&&(t.prefix=e.prefix?i.MerklePrefix.toJSON(e.prefix):void 0),t},fromPartial(e){var t,r;let n=c();return n.clientId=null!==(t=e.clientId)&&void 0!==t?t:"",n.connectionId=null!==(r=e.connectionId)&&void 0!==r?r:"",void 0!==e.prefix&&null!==e.prefix&&(n.prefix=i.MerklePrefix.fromPartial(e.prefix)),n}},t.ClientPaths={typeUrl:"/ibc.core.connection.v1.ClientPaths",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of e.paths)t.uint32(10).string(r);return t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=p();for(;r.pos>>3==1?i.paths.push(r.string()):r.skipType(7&e)}return i},fromJSON(e){let t=p();return Array.isArray(null==e?void 0:e.paths)&&(t.paths=e.paths.map(e=>String(e))),t},toJSON(e){let t={};return e.paths?t.paths=e.paths.map(e=>e):t.paths=[],t},fromPartial(e){var t;let r=p();return r.paths=(null===(t=e.paths)||void 0===t?void 0:t.map(e=>e))||[],r}},t.ConnectionPaths={typeUrl:"/ibc.core.connection.v1.ConnectionPaths",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of(""!==e.clientId&&t.uint32(10).string(e.clientId),e.paths))t.uint32(18).string(r);return t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=f();for(;r.pos>>3){case 1:i.clientId=r.string();break;case 2:i.paths.push(r.string());break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=f();return(0,a.isSet)(e.clientId)&&(t.clientId=String(e.clientId)),Array.isArray(null==e?void 0:e.paths)&&(t.paths=e.paths.map(e=>String(e))),t},toJSON(e){let t={};return void 0!==e.clientId&&(t.clientId=e.clientId),e.paths?t.paths=e.paths.map(e=>e):t.paths=[],t},fromPartial(e){var t,r;let n=f();return n.clientId=null!==(r=e.clientId)&&void 0!==r?r:"",n.paths=(null===(t=e.paths)||void 0===t?void 0:t.map(e=>e))||[],n}},t.Version={typeUrl:"/ibc.core.connection.v1.Version",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of(""!==e.identifier&&t.uint32(10).string(e.identifier),e.features))t.uint32(18).string(r);return t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=h();for(;r.pos>>3){case 1:i.identifier=r.string();break;case 2:i.features.push(r.string());break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=h();return(0,a.isSet)(e.identifier)&&(t.identifier=String(e.identifier)),Array.isArray(null==e?void 0:e.features)&&(t.features=e.features.map(e=>String(e))),t},toJSON(e){let t={};return void 0!==e.identifier&&(t.identifier=e.identifier),e.features?t.features=e.features.map(e=>e):t.features=[],t},fromPartial(e){var t,r;let n=h();return n.identifier=null!==(r=e.identifier)&&void 0!==r?r:"",n.features=(null===(t=e.features)||void 0===t?void 0:t.map(e=>e))||[],n}},t.Params={typeUrl:"/ibc.core.connection.v1.Params",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return e.maxExpectedTimePerBlock!==BigInt(0)&&t.uint32(8).uint64(e.maxExpectedTimePerBlock),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=g();for(;r.pos>>3==1?i.maxExpectedTimePerBlock=r.uint64():r.skipType(7&e)}return i},fromJSON(e){let t=g();return(0,a.isSet)(e.maxExpectedTimePerBlock)&&(t.maxExpectedTimePerBlock=BigInt(e.maxExpectedTimePerBlock.toString())),t},toJSON(e){let t={};return void 0!==e.maxExpectedTimePerBlock&&(t.maxExpectedTimePerBlock=(e.maxExpectedTimePerBlock||BigInt(0)).toString()),t},fromPartial(e){let t=g();return void 0!==e.maxExpectedTimePerBlock&&null!==e.maxExpectedTimePerBlock&&(t.maxExpectedTimePerBlock=BigInt(e.maxExpectedTimePerBlock.toString())),t}}},66784:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QueryClientImpl=t.QueryConnectionParamsResponse=t.QueryConnectionParamsRequest=t.QueryConnectionConsensusStateResponse=t.QueryConnectionConsensusStateRequest=t.QueryConnectionClientStateResponse=t.QueryConnectionClientStateRequest=t.QueryClientConnectionsResponse=t.QueryClientConnectionsRequest=t.QueryConnectionsResponse=t.QueryConnectionsRequest=t.QueryConnectionResponse=t.QueryConnectionRequest=t.protobufPackage=void 0;let n=r(86141),i=r(9496),o=r(23489),a=r(11879),s=r(46554),l=r(99133);function u(){return{connectionId:""}}function d(){return{connection:void 0,proof:new Uint8Array,proofHeight:o.Height.fromPartial({})}}function c(){return{pagination:void 0}}function p(){return{connections:[],pagination:void 0,height:o.Height.fromPartial({})}}function f(){return{clientId:""}}function h(){return{connectionPaths:[],proof:new Uint8Array,proofHeight:o.Height.fromPartial({})}}function g(){return{connectionId:""}}function m(){return{identifiedClientState:void 0,proof:new Uint8Array,proofHeight:o.Height.fromPartial({})}}function y(){return{connectionId:"",revisionNumber:BigInt(0),revisionHeight:BigInt(0)}}function v(){return{consensusState:void 0,clientId:"",proof:new Uint8Array,proofHeight:o.Height.fromPartial({})}}function b(){return{}}function S(){return{params:void 0}}t.protobufPackage="ibc.core.connection.v1",t.QueryConnectionRequest={typeUrl:"/ibc.core.connection.v1.QueryConnectionRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return""!==e.connectionId&&t.uint32(10).string(e.connectionId),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=u();for(;r.pos>>3==1?i.connectionId=r.string():r.skipType(7&e)}return i},fromJSON(e){let t=u();return(0,l.isSet)(e.connectionId)&&(t.connectionId=String(e.connectionId)),t},toJSON(e){let t={};return void 0!==e.connectionId&&(t.connectionId=e.connectionId),t},fromPartial(e){var t;let r=u();return r.connectionId=null!==(t=e.connectionId)&&void 0!==t?t:"",r}},t.QueryConnectionResponse={typeUrl:"/ibc.core.connection.v1.QueryConnectionResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return void 0!==e.connection&&i.ConnectionEnd.encode(e.connection,t.uint32(10).fork()).ldelim(),0!==e.proof.length&&t.uint32(18).bytes(e.proof),void 0!==e.proofHeight&&o.Height.encode(e.proofHeight,t.uint32(26).fork()).ldelim(),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,a=d();for(;r.pos>>3){case 1:a.connection=i.ConnectionEnd.decode(r,r.uint32());break;case 2:a.proof=r.bytes();break;case 3:a.proofHeight=o.Height.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=d();return(0,l.isSet)(e.connection)&&(t.connection=i.ConnectionEnd.fromJSON(e.connection)),(0,l.isSet)(e.proof)&&(t.proof=(0,l.bytesFromBase64)(e.proof)),(0,l.isSet)(e.proofHeight)&&(t.proofHeight=o.Height.fromJSON(e.proofHeight)),t},toJSON(e){let t={};return void 0!==e.connection&&(t.connection=e.connection?i.ConnectionEnd.toJSON(e.connection):void 0),void 0!==e.proof&&(t.proof=(0,l.base64FromBytes)(void 0!==e.proof?e.proof:new Uint8Array)),void 0!==e.proofHeight&&(t.proofHeight=e.proofHeight?o.Height.toJSON(e.proofHeight):void 0),t},fromPartial(e){var t;let r=d();return void 0!==e.connection&&null!==e.connection&&(r.connection=i.ConnectionEnd.fromPartial(e.connection)),r.proof=null!==(t=e.proof)&&void 0!==t?t:new Uint8Array,void 0!==e.proofHeight&&null!==e.proofHeight&&(r.proofHeight=o.Height.fromPartial(e.proofHeight)),r}},t.QueryConnectionsRequest={typeUrl:"/ibc.core.connection.v1.QueryConnectionsRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return void 0!==e.pagination&&n.PageRequest.encode(e.pagination,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),i=void 0===t?r.len:r.pos+t,o=c();for(;r.pos>>3==1?o.pagination=n.PageRequest.decode(r,r.uint32()):r.skipType(7&e)}return o},fromJSON(e){let t=c();return(0,l.isSet)(e.pagination)&&(t.pagination=n.PageRequest.fromJSON(e.pagination)),t},toJSON(e){let t={};return void 0!==e.pagination&&(t.pagination=e.pagination?n.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){let t=c();return void 0!==e.pagination&&null!==e.pagination&&(t.pagination=n.PageRequest.fromPartial(e.pagination)),t}},t.QueryConnectionsResponse={typeUrl:"/ibc.core.connection.v1.QueryConnectionsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();for(let r of e.connections)i.IdentifiedConnection.encode(r,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&n.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),void 0!==e.height&&o.Height.encode(e.height,t.uint32(26).fork()).ldelim(),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),a=void 0===t?r.len:r.pos+t,l=p();for(;r.pos>>3){case 1:l.connections.push(i.IdentifiedConnection.decode(r,r.uint32()));break;case 2:l.pagination=n.PageResponse.decode(r,r.uint32());break;case 3:l.height=o.Height.decode(r,r.uint32());break;default:r.skipType(7&e)}}return l},fromJSON(e){let t=p();return Array.isArray(null==e?void 0:e.connections)&&(t.connections=e.connections.map(e=>i.IdentifiedConnection.fromJSON(e))),(0,l.isSet)(e.pagination)&&(t.pagination=n.PageResponse.fromJSON(e.pagination)),(0,l.isSet)(e.height)&&(t.height=o.Height.fromJSON(e.height)),t},toJSON(e){let t={};return e.connections?t.connections=e.connections.map(e=>e?i.IdentifiedConnection.toJSON(e):void 0):t.connections=[],void 0!==e.pagination&&(t.pagination=e.pagination?n.PageResponse.toJSON(e.pagination):void 0),void 0!==e.height&&(t.height=e.height?o.Height.toJSON(e.height):void 0),t},fromPartial(e){var t;let r=p();return r.connections=(null===(t=e.connections)||void 0===t?void 0:t.map(e=>i.IdentifiedConnection.fromPartial(e)))||[],void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageResponse.fromPartial(e.pagination)),void 0!==e.height&&null!==e.height&&(r.height=o.Height.fromPartial(e.height)),r}},t.QueryClientConnectionsRequest={typeUrl:"/ibc.core.connection.v1.QueryClientConnectionsRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return""!==e.clientId&&t.uint32(10).string(e.clientId),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=f();for(;r.pos>>3==1?i.clientId=r.string():r.skipType(7&e)}return i},fromJSON(e){let t=f();return(0,l.isSet)(e.clientId)&&(t.clientId=String(e.clientId)),t},toJSON(e){let t={};return void 0!==e.clientId&&(t.clientId=e.clientId),t},fromPartial(e){var t;let r=f();return r.clientId=null!==(t=e.clientId)&&void 0!==t?t:"",r}},t.QueryClientConnectionsResponse={typeUrl:"/ibc.core.connection.v1.QueryClientConnectionsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();for(let r of e.connectionPaths)t.uint32(10).string(r);return 0!==e.proof.length&&t.uint32(18).bytes(e.proof),void 0!==e.proofHeight&&o.Height.encode(e.proofHeight,t.uint32(26).fork()).ldelim(),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=h();for(;r.pos>>3){case 1:i.connectionPaths.push(r.string());break;case 2:i.proof=r.bytes();break;case 3:i.proofHeight=o.Height.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=h();return Array.isArray(null==e?void 0:e.connectionPaths)&&(t.connectionPaths=e.connectionPaths.map(e=>String(e))),(0,l.isSet)(e.proof)&&(t.proof=(0,l.bytesFromBase64)(e.proof)),(0,l.isSet)(e.proofHeight)&&(t.proofHeight=o.Height.fromJSON(e.proofHeight)),t},toJSON(e){let t={};return e.connectionPaths?t.connectionPaths=e.connectionPaths.map(e=>e):t.connectionPaths=[],void 0!==e.proof&&(t.proof=(0,l.base64FromBytes)(void 0!==e.proof?e.proof:new Uint8Array)),void 0!==e.proofHeight&&(t.proofHeight=e.proofHeight?o.Height.toJSON(e.proofHeight):void 0),t},fromPartial(e){var t,r;let n=h();return n.connectionPaths=(null===(t=e.connectionPaths)||void 0===t?void 0:t.map(e=>e))||[],n.proof=null!==(r=e.proof)&&void 0!==r?r:new Uint8Array,void 0!==e.proofHeight&&null!==e.proofHeight&&(n.proofHeight=o.Height.fromPartial(e.proofHeight)),n}},t.QueryConnectionClientStateRequest={typeUrl:"/ibc.core.connection.v1.QueryConnectionClientStateRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return""!==e.connectionId&&t.uint32(10).string(e.connectionId),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=g();for(;r.pos>>3==1?i.connectionId=r.string():r.skipType(7&e)}return i},fromJSON(e){let t=g();return(0,l.isSet)(e.connectionId)&&(t.connectionId=String(e.connectionId)),t},toJSON(e){let t={};return void 0!==e.connectionId&&(t.connectionId=e.connectionId),t},fromPartial(e){var t;let r=g();return r.connectionId=null!==(t=e.connectionId)&&void 0!==t?t:"",r}},t.QueryConnectionClientStateResponse={typeUrl:"/ibc.core.connection.v1.QueryConnectionClientStateResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return void 0!==e.identifiedClientState&&o.IdentifiedClientState.encode(e.identifiedClientState,t.uint32(10).fork()).ldelim(),0!==e.proof.length&&t.uint32(18).bytes(e.proof),void 0!==e.proofHeight&&o.Height.encode(e.proofHeight,t.uint32(26).fork()).ldelim(),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=m();for(;r.pos>>3){case 1:i.identifiedClientState=o.IdentifiedClientState.decode(r,r.uint32());break;case 2:i.proof=r.bytes();break;case 3:i.proofHeight=o.Height.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=m();return(0,l.isSet)(e.identifiedClientState)&&(t.identifiedClientState=o.IdentifiedClientState.fromJSON(e.identifiedClientState)),(0,l.isSet)(e.proof)&&(t.proof=(0,l.bytesFromBase64)(e.proof)),(0,l.isSet)(e.proofHeight)&&(t.proofHeight=o.Height.fromJSON(e.proofHeight)),t},toJSON(e){let t={};return void 0!==e.identifiedClientState&&(t.identifiedClientState=e.identifiedClientState?o.IdentifiedClientState.toJSON(e.identifiedClientState):void 0),void 0!==e.proof&&(t.proof=(0,l.base64FromBytes)(void 0!==e.proof?e.proof:new Uint8Array)),void 0!==e.proofHeight&&(t.proofHeight=e.proofHeight?o.Height.toJSON(e.proofHeight):void 0),t},fromPartial(e){var t;let r=m();return void 0!==e.identifiedClientState&&null!==e.identifiedClientState&&(r.identifiedClientState=o.IdentifiedClientState.fromPartial(e.identifiedClientState)),r.proof=null!==(t=e.proof)&&void 0!==t?t:new Uint8Array,void 0!==e.proofHeight&&null!==e.proofHeight&&(r.proofHeight=o.Height.fromPartial(e.proofHeight)),r}},t.QueryConnectionConsensusStateRequest={typeUrl:"/ibc.core.connection.v1.QueryConnectionConsensusStateRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return""!==e.connectionId&&t.uint32(10).string(e.connectionId),e.revisionNumber!==BigInt(0)&&t.uint32(16).uint64(e.revisionNumber),e.revisionHeight!==BigInt(0)&&t.uint32(24).uint64(e.revisionHeight),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=y();for(;r.pos>>3){case 1:i.connectionId=r.string();break;case 2:i.revisionNumber=r.uint64();break;case 3:i.revisionHeight=r.uint64();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=y();return(0,l.isSet)(e.connectionId)&&(t.connectionId=String(e.connectionId)),(0,l.isSet)(e.revisionNumber)&&(t.revisionNumber=BigInt(e.revisionNumber.toString())),(0,l.isSet)(e.revisionHeight)&&(t.revisionHeight=BigInt(e.revisionHeight.toString())),t},toJSON(e){let t={};return void 0!==e.connectionId&&(t.connectionId=e.connectionId),void 0!==e.revisionNumber&&(t.revisionNumber=(e.revisionNumber||BigInt(0)).toString()),void 0!==e.revisionHeight&&(t.revisionHeight=(e.revisionHeight||BigInt(0)).toString()),t},fromPartial(e){var t;let r=y();return r.connectionId=null!==(t=e.connectionId)&&void 0!==t?t:"",void 0!==e.revisionNumber&&null!==e.revisionNumber&&(r.revisionNumber=BigInt(e.revisionNumber.toString())),void 0!==e.revisionHeight&&null!==e.revisionHeight&&(r.revisionHeight=BigInt(e.revisionHeight.toString())),r}},t.QueryConnectionConsensusStateResponse={typeUrl:"/ibc.core.connection.v1.QueryConnectionConsensusStateResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return void 0!==e.consensusState&&a.Any.encode(e.consensusState,t.uint32(10).fork()).ldelim(),""!==e.clientId&&t.uint32(18).string(e.clientId),0!==e.proof.length&&t.uint32(26).bytes(e.proof),void 0!==e.proofHeight&&o.Height.encode(e.proofHeight,t.uint32(34).fork()).ldelim(),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=v();for(;r.pos>>3){case 1:i.consensusState=a.Any.decode(r,r.uint32());break;case 2:i.clientId=r.string();break;case 3:i.proof=r.bytes();break;case 4:i.proofHeight=o.Height.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=v();return(0,l.isSet)(e.consensusState)&&(t.consensusState=a.Any.fromJSON(e.consensusState)),(0,l.isSet)(e.clientId)&&(t.clientId=String(e.clientId)),(0,l.isSet)(e.proof)&&(t.proof=(0,l.bytesFromBase64)(e.proof)),(0,l.isSet)(e.proofHeight)&&(t.proofHeight=o.Height.fromJSON(e.proofHeight)),t},toJSON(e){let t={};return void 0!==e.consensusState&&(t.consensusState=e.consensusState?a.Any.toJSON(e.consensusState):void 0),void 0!==e.clientId&&(t.clientId=e.clientId),void 0!==e.proof&&(t.proof=(0,l.base64FromBytes)(void 0!==e.proof?e.proof:new Uint8Array)),void 0!==e.proofHeight&&(t.proofHeight=e.proofHeight?o.Height.toJSON(e.proofHeight):void 0),t},fromPartial(e){var t,r;let n=v();return void 0!==e.consensusState&&null!==e.consensusState&&(n.consensusState=a.Any.fromPartial(e.consensusState)),n.clientId=null!==(t=e.clientId)&&void 0!==t?t:"",n.proof=null!==(r=e.proof)&&void 0!==r?r:new Uint8Array,void 0!==e.proofHeight&&null!==e.proofHeight&&(n.proofHeight=o.Height.fromPartial(e.proofHeight)),n}},t.QueryConnectionParamsRequest={typeUrl:"/ibc.core.connection.v1.QueryConnectionParamsRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=b();for(;r.posb(),toJSON:e=>({}),fromPartial:e=>b()},t.QueryConnectionParamsResponse={typeUrl:"/ibc.core.connection.v1.QueryConnectionParamsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return void 0!==e.params&&o.Params.encode(e.params,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=S();for(;r.pos>>3==1?i.params=o.Params.decode(r,r.uint32()):r.skipType(7&e)}return i},fromJSON(e){let t=S();return(0,l.isSet)(e.params)&&(t.params=o.Params.fromJSON(e.params)),t},toJSON(e){let t={};return void 0!==e.params&&(t.params=e.params?o.Params.toJSON(e.params):void 0),t},fromPartial(e){let t=S();return void 0!==e.params&&null!==e.params&&(t.params=o.Params.fromPartial(e.params)),t}};class w{Connection(e){let r=t.QueryConnectionRequest.encode(e).finish();return this.rpc.request("ibc.core.connection.v1.Query","Connection",r).then(e=>t.QueryConnectionResponse.decode(new s.BinaryReader(e)))}Connections(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{pagination:n.PageRequest.fromPartial({})},r=t.QueryConnectionsRequest.encode(e).finish();return this.rpc.request("ibc.core.connection.v1.Query","Connections",r).then(e=>t.QueryConnectionsResponse.decode(new s.BinaryReader(e)))}ClientConnections(e){let r=t.QueryClientConnectionsRequest.encode(e).finish();return this.rpc.request("ibc.core.connection.v1.Query","ClientConnections",r).then(e=>t.QueryClientConnectionsResponse.decode(new s.BinaryReader(e)))}ConnectionClientState(e){let r=t.QueryConnectionClientStateRequest.encode(e).finish();return this.rpc.request("ibc.core.connection.v1.Query","ConnectionClientState",r).then(e=>t.QueryConnectionClientStateResponse.decode(new s.BinaryReader(e)))}ConnectionConsensusState(e){let r=t.QueryConnectionConsensusStateRequest.encode(e).finish();return this.rpc.request("ibc.core.connection.v1.Query","ConnectionConsensusState",r).then(e=>t.QueryConnectionConsensusStateResponse.decode(new s.BinaryReader(e)))}ConnectionParams(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.QueryConnectionParamsRequest.encode(e).finish();return this.rpc.request("ibc.core.connection.v1.Query","ConnectionParams",r).then(e=>t.QueryConnectionParamsResponse.decode(new s.BinaryReader(e)))}constructor(e){this.rpc=e,this.Connection=this.Connection.bind(this),this.Connections=this.Connections.bind(this),this.ClientConnections=this.ClientConnections.bind(this),this.ConnectionClientState=this.ConnectionClientState.bind(this),this.ConnectionConsensusState=this.ConnectionConsensusState.bind(this),this.ConnectionParams=this.ConnectionParams.bind(this)}}t.QueryClientImpl=w},17244:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MsgClientImpl=t.MsgConnectionOpenConfirmResponse=t.MsgConnectionOpenConfirm=t.MsgConnectionOpenAckResponse=t.MsgConnectionOpenAck=t.MsgConnectionOpenTryResponse=t.MsgConnectionOpenTry=t.MsgConnectionOpenInitResponse=t.MsgConnectionOpenInit=t.protobufPackage=void 0;let n=r(9496),i=r(11879),o=r(23489),a=r(46554),s=r(99133);function l(){return{clientId:"",counterparty:n.Counterparty.fromPartial({}),version:void 0,delayPeriod:BigInt(0),signer:""}}function u(){return{}}function d(){return{clientId:"",previousConnectionId:"",clientState:void 0,counterparty:n.Counterparty.fromPartial({}),delayPeriod:BigInt(0),counterpartyVersions:[],proofHeight:o.Height.fromPartial({}),proofInit:new Uint8Array,proofClient:new Uint8Array,proofConsensus:new Uint8Array,consensusHeight:o.Height.fromPartial({}),signer:"",hostConsensusStateProof:new Uint8Array}}function c(){return{}}function p(){return{connectionId:"",counterpartyConnectionId:"",version:void 0,clientState:void 0,proofHeight:o.Height.fromPartial({}),proofTry:new Uint8Array,proofClient:new Uint8Array,proofConsensus:new Uint8Array,consensusHeight:o.Height.fromPartial({}),signer:"",hostConsensusStateProof:new Uint8Array}}function f(){return{}}function h(){return{connectionId:"",proofAck:new Uint8Array,proofHeight:o.Height.fromPartial({}),signer:""}}function g(){return{}}t.protobufPackage="ibc.core.connection.v1",t.MsgConnectionOpenInit={typeUrl:"/ibc.core.connection.v1.MsgConnectionOpenInit",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.clientId&&t.uint32(10).string(e.clientId),void 0!==e.counterparty&&n.Counterparty.encode(e.counterparty,t.uint32(18).fork()).ldelim(),void 0!==e.version&&n.Version.encode(e.version,t.uint32(26).fork()).ldelim(),e.delayPeriod!==BigInt(0)&&t.uint32(32).uint64(e.delayPeriod),""!==e.signer&&t.uint32(42).string(e.signer),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),i=void 0===t?r.len:r.pos+t,o=l();for(;r.pos>>3){case 1:o.clientId=r.string();break;case 2:o.counterparty=n.Counterparty.decode(r,r.uint32());break;case 3:o.version=n.Version.decode(r,r.uint32());break;case 4:o.delayPeriod=r.uint64();break;case 5:o.signer=r.string();break;default:r.skipType(7&e)}}return o},fromJSON(e){let t=l();return(0,s.isSet)(e.clientId)&&(t.clientId=String(e.clientId)),(0,s.isSet)(e.counterparty)&&(t.counterparty=n.Counterparty.fromJSON(e.counterparty)),(0,s.isSet)(e.version)&&(t.version=n.Version.fromJSON(e.version)),(0,s.isSet)(e.delayPeriod)&&(t.delayPeriod=BigInt(e.delayPeriod.toString())),(0,s.isSet)(e.signer)&&(t.signer=String(e.signer)),t},toJSON(e){let t={};return void 0!==e.clientId&&(t.clientId=e.clientId),void 0!==e.counterparty&&(t.counterparty=e.counterparty?n.Counterparty.toJSON(e.counterparty):void 0),void 0!==e.version&&(t.version=e.version?n.Version.toJSON(e.version):void 0),void 0!==e.delayPeriod&&(t.delayPeriod=(e.delayPeriod||BigInt(0)).toString()),void 0!==e.signer&&(t.signer=e.signer),t},fromPartial(e){var t,r;let i=l();return i.clientId=null!==(t=e.clientId)&&void 0!==t?t:"",void 0!==e.counterparty&&null!==e.counterparty&&(i.counterparty=n.Counterparty.fromPartial(e.counterparty)),void 0!==e.version&&null!==e.version&&(i.version=n.Version.fromPartial(e.version)),void 0!==e.delayPeriod&&null!==e.delayPeriod&&(i.delayPeriod=BigInt(e.delayPeriod.toString())),i.signer=null!==(r=e.signer)&&void 0!==r?r:"",i}},t.MsgConnectionOpenInitResponse={typeUrl:"/ibc.core.connection.v1.MsgConnectionOpenInitResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=u();for(;r.posu(),toJSON:e=>({}),fromPartial:e=>u()},t.MsgConnectionOpenTry={typeUrl:"/ibc.core.connection.v1.MsgConnectionOpenTry",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();for(let r of(""!==e.clientId&&t.uint32(10).string(e.clientId),""!==e.previousConnectionId&&t.uint32(18).string(e.previousConnectionId),void 0!==e.clientState&&i.Any.encode(e.clientState,t.uint32(26).fork()).ldelim(),void 0!==e.counterparty&&n.Counterparty.encode(e.counterparty,t.uint32(34).fork()).ldelim(),e.delayPeriod!==BigInt(0)&&t.uint32(40).uint64(e.delayPeriod),e.counterpartyVersions))n.Version.encode(r,t.uint32(50).fork()).ldelim();return void 0!==e.proofHeight&&o.Height.encode(e.proofHeight,t.uint32(58).fork()).ldelim(),0!==e.proofInit.length&&t.uint32(66).bytes(e.proofInit),0!==e.proofClient.length&&t.uint32(74).bytes(e.proofClient),0!==e.proofConsensus.length&&t.uint32(82).bytes(e.proofConsensus),void 0!==e.consensusHeight&&o.Height.encode(e.consensusHeight,t.uint32(90).fork()).ldelim(),""!==e.signer&&t.uint32(98).string(e.signer),0!==e.hostConsensusStateProof.length&&t.uint32(106).bytes(e.hostConsensusStateProof),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),s=void 0===t?r.len:r.pos+t,l=d();for(;r.pos>>3){case 1:l.clientId=r.string();break;case 2:l.previousConnectionId=r.string();break;case 3:l.clientState=i.Any.decode(r,r.uint32());break;case 4:l.counterparty=n.Counterparty.decode(r,r.uint32());break;case 5:l.delayPeriod=r.uint64();break;case 6:l.counterpartyVersions.push(n.Version.decode(r,r.uint32()));break;case 7:l.proofHeight=o.Height.decode(r,r.uint32());break;case 8:l.proofInit=r.bytes();break;case 9:l.proofClient=r.bytes();break;case 10:l.proofConsensus=r.bytes();break;case 11:l.consensusHeight=o.Height.decode(r,r.uint32());break;case 12:l.signer=r.string();break;case 13:l.hostConsensusStateProof=r.bytes();break;default:r.skipType(7&e)}}return l},fromJSON(e){let t=d();return(0,s.isSet)(e.clientId)&&(t.clientId=String(e.clientId)),(0,s.isSet)(e.previousConnectionId)&&(t.previousConnectionId=String(e.previousConnectionId)),(0,s.isSet)(e.clientState)&&(t.clientState=i.Any.fromJSON(e.clientState)),(0,s.isSet)(e.counterparty)&&(t.counterparty=n.Counterparty.fromJSON(e.counterparty)),(0,s.isSet)(e.delayPeriod)&&(t.delayPeriod=BigInt(e.delayPeriod.toString())),Array.isArray(null==e?void 0:e.counterpartyVersions)&&(t.counterpartyVersions=e.counterpartyVersions.map(e=>n.Version.fromJSON(e))),(0,s.isSet)(e.proofHeight)&&(t.proofHeight=o.Height.fromJSON(e.proofHeight)),(0,s.isSet)(e.proofInit)&&(t.proofInit=(0,s.bytesFromBase64)(e.proofInit)),(0,s.isSet)(e.proofClient)&&(t.proofClient=(0,s.bytesFromBase64)(e.proofClient)),(0,s.isSet)(e.proofConsensus)&&(t.proofConsensus=(0,s.bytesFromBase64)(e.proofConsensus)),(0,s.isSet)(e.consensusHeight)&&(t.consensusHeight=o.Height.fromJSON(e.consensusHeight)),(0,s.isSet)(e.signer)&&(t.signer=String(e.signer)),(0,s.isSet)(e.hostConsensusStateProof)&&(t.hostConsensusStateProof=(0,s.bytesFromBase64)(e.hostConsensusStateProof)),t},toJSON(e){let t={};return void 0!==e.clientId&&(t.clientId=e.clientId),void 0!==e.previousConnectionId&&(t.previousConnectionId=e.previousConnectionId),void 0!==e.clientState&&(t.clientState=e.clientState?i.Any.toJSON(e.clientState):void 0),void 0!==e.counterparty&&(t.counterparty=e.counterparty?n.Counterparty.toJSON(e.counterparty):void 0),void 0!==e.delayPeriod&&(t.delayPeriod=(e.delayPeriod||BigInt(0)).toString()),e.counterpartyVersions?t.counterpartyVersions=e.counterpartyVersions.map(e=>e?n.Version.toJSON(e):void 0):t.counterpartyVersions=[],void 0!==e.proofHeight&&(t.proofHeight=e.proofHeight?o.Height.toJSON(e.proofHeight):void 0),void 0!==e.proofInit&&(t.proofInit=(0,s.base64FromBytes)(void 0!==e.proofInit?e.proofInit:new Uint8Array)),void 0!==e.proofClient&&(t.proofClient=(0,s.base64FromBytes)(void 0!==e.proofClient?e.proofClient:new Uint8Array)),void 0!==e.proofConsensus&&(t.proofConsensus=(0,s.base64FromBytes)(void 0!==e.proofConsensus?e.proofConsensus:new Uint8Array)),void 0!==e.consensusHeight&&(t.consensusHeight=e.consensusHeight?o.Height.toJSON(e.consensusHeight):void 0),void 0!==e.signer&&(t.signer=e.signer),void 0!==e.hostConsensusStateProof&&(t.hostConsensusStateProof=(0,s.base64FromBytes)(void 0!==e.hostConsensusStateProof?e.hostConsensusStateProof:new Uint8Array)),t},fromPartial(e){var t,r,a,s,l,u,c,p;let f=d();return f.clientId=null!==(r=e.clientId)&&void 0!==r?r:"",f.previousConnectionId=null!==(a=e.previousConnectionId)&&void 0!==a?a:"",void 0!==e.clientState&&null!==e.clientState&&(f.clientState=i.Any.fromPartial(e.clientState)),void 0!==e.counterparty&&null!==e.counterparty&&(f.counterparty=n.Counterparty.fromPartial(e.counterparty)),void 0!==e.delayPeriod&&null!==e.delayPeriod&&(f.delayPeriod=BigInt(e.delayPeriod.toString())),f.counterpartyVersions=(null===(t=e.counterpartyVersions)||void 0===t?void 0:t.map(e=>n.Version.fromPartial(e)))||[],void 0!==e.proofHeight&&null!==e.proofHeight&&(f.proofHeight=o.Height.fromPartial(e.proofHeight)),f.proofInit=null!==(s=e.proofInit)&&void 0!==s?s:new Uint8Array,f.proofClient=null!==(l=e.proofClient)&&void 0!==l?l:new Uint8Array,f.proofConsensus=null!==(u=e.proofConsensus)&&void 0!==u?u:new Uint8Array,void 0!==e.consensusHeight&&null!==e.consensusHeight&&(f.consensusHeight=o.Height.fromPartial(e.consensusHeight)),f.signer=null!==(c=e.signer)&&void 0!==c?c:"",f.hostConsensusStateProof=null!==(p=e.hostConsensusStateProof)&&void 0!==p?p:new Uint8Array,f}},t.MsgConnectionOpenTryResponse={typeUrl:"/ibc.core.connection.v1.MsgConnectionOpenTryResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=c();for(;r.posc(),toJSON:e=>({}),fromPartial:e=>c()},t.MsgConnectionOpenAck={typeUrl:"/ibc.core.connection.v1.MsgConnectionOpenAck",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.connectionId&&t.uint32(10).string(e.connectionId),""!==e.counterpartyConnectionId&&t.uint32(18).string(e.counterpartyConnectionId),void 0!==e.version&&n.Version.encode(e.version,t.uint32(26).fork()).ldelim(),void 0!==e.clientState&&i.Any.encode(e.clientState,t.uint32(34).fork()).ldelim(),void 0!==e.proofHeight&&o.Height.encode(e.proofHeight,t.uint32(42).fork()).ldelim(),0!==e.proofTry.length&&t.uint32(50).bytes(e.proofTry),0!==e.proofClient.length&&t.uint32(58).bytes(e.proofClient),0!==e.proofConsensus.length&&t.uint32(66).bytes(e.proofConsensus),void 0!==e.consensusHeight&&o.Height.encode(e.consensusHeight,t.uint32(74).fork()).ldelim(),""!==e.signer&&t.uint32(82).string(e.signer),0!==e.hostConsensusStateProof.length&&t.uint32(90).bytes(e.hostConsensusStateProof),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),s=void 0===t?r.len:r.pos+t,l=p();for(;r.pos>>3){case 1:l.connectionId=r.string();break;case 2:l.counterpartyConnectionId=r.string();break;case 3:l.version=n.Version.decode(r,r.uint32());break;case 4:l.clientState=i.Any.decode(r,r.uint32());break;case 5:l.proofHeight=o.Height.decode(r,r.uint32());break;case 6:l.proofTry=r.bytes();break;case 7:l.proofClient=r.bytes();break;case 8:l.proofConsensus=r.bytes();break;case 9:l.consensusHeight=o.Height.decode(r,r.uint32());break;case 10:l.signer=r.string();break;case 11:l.hostConsensusStateProof=r.bytes();break;default:r.skipType(7&e)}}return l},fromJSON(e){let t=p();return(0,s.isSet)(e.connectionId)&&(t.connectionId=String(e.connectionId)),(0,s.isSet)(e.counterpartyConnectionId)&&(t.counterpartyConnectionId=String(e.counterpartyConnectionId)),(0,s.isSet)(e.version)&&(t.version=n.Version.fromJSON(e.version)),(0,s.isSet)(e.clientState)&&(t.clientState=i.Any.fromJSON(e.clientState)),(0,s.isSet)(e.proofHeight)&&(t.proofHeight=o.Height.fromJSON(e.proofHeight)),(0,s.isSet)(e.proofTry)&&(t.proofTry=(0,s.bytesFromBase64)(e.proofTry)),(0,s.isSet)(e.proofClient)&&(t.proofClient=(0,s.bytesFromBase64)(e.proofClient)),(0,s.isSet)(e.proofConsensus)&&(t.proofConsensus=(0,s.bytesFromBase64)(e.proofConsensus)),(0,s.isSet)(e.consensusHeight)&&(t.consensusHeight=o.Height.fromJSON(e.consensusHeight)),(0,s.isSet)(e.signer)&&(t.signer=String(e.signer)),(0,s.isSet)(e.hostConsensusStateProof)&&(t.hostConsensusStateProof=(0,s.bytesFromBase64)(e.hostConsensusStateProof)),t},toJSON(e){let t={};return void 0!==e.connectionId&&(t.connectionId=e.connectionId),void 0!==e.counterpartyConnectionId&&(t.counterpartyConnectionId=e.counterpartyConnectionId),void 0!==e.version&&(t.version=e.version?n.Version.toJSON(e.version):void 0),void 0!==e.clientState&&(t.clientState=e.clientState?i.Any.toJSON(e.clientState):void 0),void 0!==e.proofHeight&&(t.proofHeight=e.proofHeight?o.Height.toJSON(e.proofHeight):void 0),void 0!==e.proofTry&&(t.proofTry=(0,s.base64FromBytes)(void 0!==e.proofTry?e.proofTry:new Uint8Array)),void 0!==e.proofClient&&(t.proofClient=(0,s.base64FromBytes)(void 0!==e.proofClient?e.proofClient:new Uint8Array)),void 0!==e.proofConsensus&&(t.proofConsensus=(0,s.base64FromBytes)(void 0!==e.proofConsensus?e.proofConsensus:new Uint8Array)),void 0!==e.consensusHeight&&(t.consensusHeight=e.consensusHeight?o.Height.toJSON(e.consensusHeight):void 0),void 0!==e.signer&&(t.signer=e.signer),void 0!==e.hostConsensusStateProof&&(t.hostConsensusStateProof=(0,s.base64FromBytes)(void 0!==e.hostConsensusStateProof?e.hostConsensusStateProof:new Uint8Array)),t},fromPartial(e){var t,r,a,s,l,u,d;let c=p();return c.connectionId=null!==(t=e.connectionId)&&void 0!==t?t:"",c.counterpartyConnectionId=null!==(r=e.counterpartyConnectionId)&&void 0!==r?r:"",void 0!==e.version&&null!==e.version&&(c.version=n.Version.fromPartial(e.version)),void 0!==e.clientState&&null!==e.clientState&&(c.clientState=i.Any.fromPartial(e.clientState)),void 0!==e.proofHeight&&null!==e.proofHeight&&(c.proofHeight=o.Height.fromPartial(e.proofHeight)),c.proofTry=null!==(a=e.proofTry)&&void 0!==a?a:new Uint8Array,c.proofClient=null!==(s=e.proofClient)&&void 0!==s?s:new Uint8Array,c.proofConsensus=null!==(l=e.proofConsensus)&&void 0!==l?l:new Uint8Array,void 0!==e.consensusHeight&&null!==e.consensusHeight&&(c.consensusHeight=o.Height.fromPartial(e.consensusHeight)),c.signer=null!==(u=e.signer)&&void 0!==u?u:"",c.hostConsensusStateProof=null!==(d=e.hostConsensusStateProof)&&void 0!==d?d:new Uint8Array,c}},t.MsgConnectionOpenAckResponse={typeUrl:"/ibc.core.connection.v1.MsgConnectionOpenAckResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=f();for(;r.posf(),toJSON:e=>({}),fromPartial:e=>f()},t.MsgConnectionOpenConfirm={typeUrl:"/ibc.core.connection.v1.MsgConnectionOpenConfirm",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.connectionId&&t.uint32(10).string(e.connectionId),0!==e.proofAck.length&&t.uint32(18).bytes(e.proofAck),void 0!==e.proofHeight&&o.Height.encode(e.proofHeight,t.uint32(26).fork()).ldelim(),""!==e.signer&&t.uint32(34).string(e.signer),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=h();for(;r.pos>>3){case 1:i.connectionId=r.string();break;case 2:i.proofAck=r.bytes();break;case 3:i.proofHeight=o.Height.decode(r,r.uint32());break;case 4:i.signer=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=h();return(0,s.isSet)(e.connectionId)&&(t.connectionId=String(e.connectionId)),(0,s.isSet)(e.proofAck)&&(t.proofAck=(0,s.bytesFromBase64)(e.proofAck)),(0,s.isSet)(e.proofHeight)&&(t.proofHeight=o.Height.fromJSON(e.proofHeight)),(0,s.isSet)(e.signer)&&(t.signer=String(e.signer)),t},toJSON(e){let t={};return void 0!==e.connectionId&&(t.connectionId=e.connectionId),void 0!==e.proofAck&&(t.proofAck=(0,s.base64FromBytes)(void 0!==e.proofAck?e.proofAck:new Uint8Array)),void 0!==e.proofHeight&&(t.proofHeight=e.proofHeight?o.Height.toJSON(e.proofHeight):void 0),void 0!==e.signer&&(t.signer=e.signer),t},fromPartial(e){var t,r,n;let i=h();return i.connectionId=null!==(t=e.connectionId)&&void 0!==t?t:"",i.proofAck=null!==(r=e.proofAck)&&void 0!==r?r:new Uint8Array,void 0!==e.proofHeight&&null!==e.proofHeight&&(i.proofHeight=o.Height.fromPartial(e.proofHeight)),i.signer=null!==(n=e.signer)&&void 0!==n?n:"",i}},t.MsgConnectionOpenConfirmResponse={typeUrl:"/ibc.core.connection.v1.MsgConnectionOpenConfirmResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=g();for(;r.posg(),toJSON:e=>({}),fromPartial:e=>g()};class m{ConnectionOpenInit(e){let r=t.MsgConnectionOpenInit.encode(e).finish();return this.rpc.request("ibc.core.connection.v1.Msg","ConnectionOpenInit",r).then(e=>t.MsgConnectionOpenInitResponse.decode(new a.BinaryReader(e)))}ConnectionOpenTry(e){let r=t.MsgConnectionOpenTry.encode(e).finish();return this.rpc.request("ibc.core.connection.v1.Msg","ConnectionOpenTry",r).then(e=>t.MsgConnectionOpenTryResponse.decode(new a.BinaryReader(e)))}ConnectionOpenAck(e){let r=t.MsgConnectionOpenAck.encode(e).finish();return this.rpc.request("ibc.core.connection.v1.Msg","ConnectionOpenAck",r).then(e=>t.MsgConnectionOpenAckResponse.decode(new a.BinaryReader(e)))}ConnectionOpenConfirm(e){let r=t.MsgConnectionOpenConfirm.encode(e).finish();return this.rpc.request("ibc.core.connection.v1.Msg","ConnectionOpenConfirm",r).then(e=>t.MsgConnectionOpenConfirmResponse.decode(new a.BinaryReader(e)))}constructor(e){this.rpc=e,this.ConnectionOpenInit=this.ConnectionOpenInit.bind(this),this.ConnectionOpenTry=this.ConnectionOpenTry.bind(this),this.ConnectionOpenAck=this.ConnectionOpenAck.bind(this),this.ConnectionOpenConfirm=this.ConnectionOpenConfirm.bind(this)}}t.MsgClientImpl=m},70710:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Fraction=t.Header=t.Misbehaviour=t.ConsensusState=t.ClientState=t.protobufPackage=void 0;let n=r(84849),i=r(23489),o=r(88401),a=r(9990),s=r(56891),l=r(92585),u=r(83292),d=r(46554),c=r(99133);function p(){return{chainId:"",trustLevel:t.Fraction.fromPartial({}),trustingPeriod:n.Duration.fromPartial({}),unbondingPeriod:n.Duration.fromPartial({}),maxClockDrift:n.Duration.fromPartial({}),frozenHeight:i.Height.fromPartial({}),latestHeight:i.Height.fromPartial({}),proofSpecs:[],upgradePath:[],allowUpdateAfterExpiry:!1,allowUpdateAfterMisbehaviour:!1}}function f(){return{timestamp:a.Timestamp.fromPartial({}),root:s.MerkleRoot.fromPartial({}),nextValidatorsHash:new Uint8Array}}function h(){return{clientId:"",header1:void 0,header2:void 0}}function g(){return{signedHeader:void 0,validatorSet:void 0,trustedHeight:i.Height.fromPartial({}),trustedValidators:void 0}}function m(){return{numerator:BigInt(0),denominator:BigInt(0)}}t.protobufPackage="ibc.lightclients.tendermint.v1",t.ClientState={typeUrl:"/ibc.lightclients.tendermint.v1.ClientState",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.BinaryWriter.create();for(let a of(""!==e.chainId&&r.uint32(10).string(e.chainId),void 0!==e.trustLevel&&t.Fraction.encode(e.trustLevel,r.uint32(18).fork()).ldelim(),void 0!==e.trustingPeriod&&n.Duration.encode(e.trustingPeriod,r.uint32(26).fork()).ldelim(),void 0!==e.unbondingPeriod&&n.Duration.encode(e.unbondingPeriod,r.uint32(34).fork()).ldelim(),void 0!==e.maxClockDrift&&n.Duration.encode(e.maxClockDrift,r.uint32(42).fork()).ldelim(),void 0!==e.frozenHeight&&i.Height.encode(e.frozenHeight,r.uint32(50).fork()).ldelim(),void 0!==e.latestHeight&&i.Height.encode(e.latestHeight,r.uint32(58).fork()).ldelim(),e.proofSpecs))o.ProofSpec.encode(a,r.uint32(66).fork()).ldelim();for(let t of e.upgradePath)r.uint32(74).string(t);return!0===e.allowUpdateAfterExpiry&&r.uint32(80).bool(e.allowUpdateAfterExpiry),!0===e.allowUpdateAfterMisbehaviour&&r.uint32(88).bool(e.allowUpdateAfterMisbehaviour),r},decode(e,r){let a=e instanceof d.BinaryReader?e:new d.BinaryReader(e),s=void 0===r?a.len:a.pos+r,l=p();for(;a.pos>>3){case 1:l.chainId=a.string();break;case 2:l.trustLevel=t.Fraction.decode(a,a.uint32());break;case 3:l.trustingPeriod=n.Duration.decode(a,a.uint32());break;case 4:l.unbondingPeriod=n.Duration.decode(a,a.uint32());break;case 5:l.maxClockDrift=n.Duration.decode(a,a.uint32());break;case 6:l.frozenHeight=i.Height.decode(a,a.uint32());break;case 7:l.latestHeight=i.Height.decode(a,a.uint32());break;case 8:l.proofSpecs.push(o.ProofSpec.decode(a,a.uint32()));break;case 9:l.upgradePath.push(a.string());break;case 10:l.allowUpdateAfterExpiry=a.bool();break;case 11:l.allowUpdateAfterMisbehaviour=a.bool();break;default:a.skipType(7&e)}}return l},fromJSON(e){let r=p();return(0,c.isSet)(e.chainId)&&(r.chainId=String(e.chainId)),(0,c.isSet)(e.trustLevel)&&(r.trustLevel=t.Fraction.fromJSON(e.trustLevel)),(0,c.isSet)(e.trustingPeriod)&&(r.trustingPeriod=n.Duration.fromJSON(e.trustingPeriod)),(0,c.isSet)(e.unbondingPeriod)&&(r.unbondingPeriod=n.Duration.fromJSON(e.unbondingPeriod)),(0,c.isSet)(e.maxClockDrift)&&(r.maxClockDrift=n.Duration.fromJSON(e.maxClockDrift)),(0,c.isSet)(e.frozenHeight)&&(r.frozenHeight=i.Height.fromJSON(e.frozenHeight)),(0,c.isSet)(e.latestHeight)&&(r.latestHeight=i.Height.fromJSON(e.latestHeight)),Array.isArray(null==e?void 0:e.proofSpecs)&&(r.proofSpecs=e.proofSpecs.map(e=>o.ProofSpec.fromJSON(e))),Array.isArray(null==e?void 0:e.upgradePath)&&(r.upgradePath=e.upgradePath.map(e=>String(e))),(0,c.isSet)(e.allowUpdateAfterExpiry)&&(r.allowUpdateAfterExpiry=!!e.allowUpdateAfterExpiry),(0,c.isSet)(e.allowUpdateAfterMisbehaviour)&&(r.allowUpdateAfterMisbehaviour=!!e.allowUpdateAfterMisbehaviour),r},toJSON(e){let r={};return void 0!==e.chainId&&(r.chainId=e.chainId),void 0!==e.trustLevel&&(r.trustLevel=e.trustLevel?t.Fraction.toJSON(e.trustLevel):void 0),void 0!==e.trustingPeriod&&(r.trustingPeriod=e.trustingPeriod?n.Duration.toJSON(e.trustingPeriod):void 0),void 0!==e.unbondingPeriod&&(r.unbondingPeriod=e.unbondingPeriod?n.Duration.toJSON(e.unbondingPeriod):void 0),void 0!==e.maxClockDrift&&(r.maxClockDrift=e.maxClockDrift?n.Duration.toJSON(e.maxClockDrift):void 0),void 0!==e.frozenHeight&&(r.frozenHeight=e.frozenHeight?i.Height.toJSON(e.frozenHeight):void 0),void 0!==e.latestHeight&&(r.latestHeight=e.latestHeight?i.Height.toJSON(e.latestHeight):void 0),e.proofSpecs?r.proofSpecs=e.proofSpecs.map(e=>e?o.ProofSpec.toJSON(e):void 0):r.proofSpecs=[],e.upgradePath?r.upgradePath=e.upgradePath.map(e=>e):r.upgradePath=[],void 0!==e.allowUpdateAfterExpiry&&(r.allowUpdateAfterExpiry=e.allowUpdateAfterExpiry),void 0!==e.allowUpdateAfterMisbehaviour&&(r.allowUpdateAfterMisbehaviour=e.allowUpdateAfterMisbehaviour),r},fromPartial(e){var r,a,s,l,u;let d=p();return d.chainId=null!==(s=e.chainId)&&void 0!==s?s:"",void 0!==e.trustLevel&&null!==e.trustLevel&&(d.trustLevel=t.Fraction.fromPartial(e.trustLevel)),void 0!==e.trustingPeriod&&null!==e.trustingPeriod&&(d.trustingPeriod=n.Duration.fromPartial(e.trustingPeriod)),void 0!==e.unbondingPeriod&&null!==e.unbondingPeriod&&(d.unbondingPeriod=n.Duration.fromPartial(e.unbondingPeriod)),void 0!==e.maxClockDrift&&null!==e.maxClockDrift&&(d.maxClockDrift=n.Duration.fromPartial(e.maxClockDrift)),void 0!==e.frozenHeight&&null!==e.frozenHeight&&(d.frozenHeight=i.Height.fromPartial(e.frozenHeight)),void 0!==e.latestHeight&&null!==e.latestHeight&&(d.latestHeight=i.Height.fromPartial(e.latestHeight)),d.proofSpecs=(null===(r=e.proofSpecs)||void 0===r?void 0:r.map(e=>o.ProofSpec.fromPartial(e)))||[],d.upgradePath=(null===(a=e.upgradePath)||void 0===a?void 0:a.map(e=>e))||[],d.allowUpdateAfterExpiry=null!==(l=e.allowUpdateAfterExpiry)&&void 0!==l&&l,d.allowUpdateAfterMisbehaviour=null!==(u=e.allowUpdateAfterMisbehaviour)&&void 0!==u&&u,d}},t.ConsensusState={typeUrl:"/ibc.lightclients.tendermint.v1.ConsensusState",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.BinaryWriter.create();return void 0!==e.timestamp&&a.Timestamp.encode(e.timestamp,t.uint32(10).fork()).ldelim(),void 0!==e.root&&s.MerkleRoot.encode(e.root,t.uint32(18).fork()).ldelim(),0!==e.nextValidatorsHash.length&&t.uint32(26).bytes(e.nextValidatorsHash),t},decode(e,t){let r=e instanceof d.BinaryReader?e:new d.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=f();for(;r.pos>>3){case 1:i.timestamp=a.Timestamp.decode(r,r.uint32());break;case 2:i.root=s.MerkleRoot.decode(r,r.uint32());break;case 3:i.nextValidatorsHash=r.bytes();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=f();return(0,c.isSet)(e.timestamp)&&(t.timestamp=(0,c.fromJsonTimestamp)(e.timestamp)),(0,c.isSet)(e.root)&&(t.root=s.MerkleRoot.fromJSON(e.root)),(0,c.isSet)(e.nextValidatorsHash)&&(t.nextValidatorsHash=(0,c.bytesFromBase64)(e.nextValidatorsHash)),t},toJSON(e){let t={};return void 0!==e.timestamp&&(t.timestamp=(0,c.fromTimestamp)(e.timestamp).toISOString()),void 0!==e.root&&(t.root=e.root?s.MerkleRoot.toJSON(e.root):void 0),void 0!==e.nextValidatorsHash&&(t.nextValidatorsHash=(0,c.base64FromBytes)(void 0!==e.nextValidatorsHash?e.nextValidatorsHash:new Uint8Array)),t},fromPartial(e){var t;let r=f();return void 0!==e.timestamp&&null!==e.timestamp&&(r.timestamp=a.Timestamp.fromPartial(e.timestamp)),void 0!==e.root&&null!==e.root&&(r.root=s.MerkleRoot.fromPartial(e.root)),r.nextValidatorsHash=null!==(t=e.nextValidatorsHash)&&void 0!==t?t:new Uint8Array,r}},t.Misbehaviour={typeUrl:"/ibc.lightclients.tendermint.v1.Misbehaviour",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.BinaryWriter.create();return""!==e.clientId&&r.uint32(10).string(e.clientId),void 0!==e.header1&&t.Header.encode(e.header1,r.uint32(18).fork()).ldelim(),void 0!==e.header2&&t.Header.encode(e.header2,r.uint32(26).fork()).ldelim(),r},decode(e,r){let n=e instanceof d.BinaryReader?e:new d.BinaryReader(e),i=void 0===r?n.len:n.pos+r,o=h();for(;n.pos>>3){case 1:o.clientId=n.string();break;case 2:o.header1=t.Header.decode(n,n.uint32());break;case 3:o.header2=t.Header.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){let r=h();return(0,c.isSet)(e.clientId)&&(r.clientId=String(e.clientId)),(0,c.isSet)(e.header1)&&(r.header1=t.Header.fromJSON(e.header1)),(0,c.isSet)(e.header2)&&(r.header2=t.Header.fromJSON(e.header2)),r},toJSON(e){let r={};return void 0!==e.clientId&&(r.clientId=e.clientId),void 0!==e.header1&&(r.header1=e.header1?t.Header.toJSON(e.header1):void 0),void 0!==e.header2&&(r.header2=e.header2?t.Header.toJSON(e.header2):void 0),r},fromPartial(e){var r;let n=h();return n.clientId=null!==(r=e.clientId)&&void 0!==r?r:"",void 0!==e.header1&&null!==e.header1&&(n.header1=t.Header.fromPartial(e.header1)),void 0!==e.header2&&null!==e.header2&&(n.header2=t.Header.fromPartial(e.header2)),n}},t.Header={typeUrl:"/ibc.lightclients.tendermint.v1.Header",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.BinaryWriter.create();return void 0!==e.signedHeader&&l.SignedHeader.encode(e.signedHeader,t.uint32(10).fork()).ldelim(),void 0!==e.validatorSet&&u.ValidatorSet.encode(e.validatorSet,t.uint32(18).fork()).ldelim(),void 0!==e.trustedHeight&&i.Height.encode(e.trustedHeight,t.uint32(26).fork()).ldelim(),void 0!==e.trustedValidators&&u.ValidatorSet.encode(e.trustedValidators,t.uint32(34).fork()).ldelim(),t},decode(e,t){let r=e instanceof d.BinaryReader?e:new d.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=g();for(;r.pos>>3){case 1:o.signedHeader=l.SignedHeader.decode(r,r.uint32());break;case 2:o.validatorSet=u.ValidatorSet.decode(r,r.uint32());break;case 3:o.trustedHeight=i.Height.decode(r,r.uint32());break;case 4:o.trustedValidators=u.ValidatorSet.decode(r,r.uint32());break;default:r.skipType(7&e)}}return o},fromJSON(e){let t=g();return(0,c.isSet)(e.signedHeader)&&(t.signedHeader=l.SignedHeader.fromJSON(e.signedHeader)),(0,c.isSet)(e.validatorSet)&&(t.validatorSet=u.ValidatorSet.fromJSON(e.validatorSet)),(0,c.isSet)(e.trustedHeight)&&(t.trustedHeight=i.Height.fromJSON(e.trustedHeight)),(0,c.isSet)(e.trustedValidators)&&(t.trustedValidators=u.ValidatorSet.fromJSON(e.trustedValidators)),t},toJSON(e){let t={};return void 0!==e.signedHeader&&(t.signedHeader=e.signedHeader?l.SignedHeader.toJSON(e.signedHeader):void 0),void 0!==e.validatorSet&&(t.validatorSet=e.validatorSet?u.ValidatorSet.toJSON(e.validatorSet):void 0),void 0!==e.trustedHeight&&(t.trustedHeight=e.trustedHeight?i.Height.toJSON(e.trustedHeight):void 0),void 0!==e.trustedValidators&&(t.trustedValidators=e.trustedValidators?u.ValidatorSet.toJSON(e.trustedValidators):void 0),t},fromPartial(e){let t=g();return void 0!==e.signedHeader&&null!==e.signedHeader&&(t.signedHeader=l.SignedHeader.fromPartial(e.signedHeader)),void 0!==e.validatorSet&&null!==e.validatorSet&&(t.validatorSet=u.ValidatorSet.fromPartial(e.validatorSet)),void 0!==e.trustedHeight&&null!==e.trustedHeight&&(t.trustedHeight=i.Height.fromPartial(e.trustedHeight)),void 0!==e.trustedValidators&&null!==e.trustedValidators&&(t.trustedValidators=u.ValidatorSet.fromPartial(e.trustedValidators)),t}},t.Fraction={typeUrl:"/ibc.lightclients.tendermint.v1.Fraction",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.BinaryWriter.create();return e.numerator!==BigInt(0)&&t.uint32(8).uint64(e.numerator),e.denominator!==BigInt(0)&&t.uint32(16).uint64(e.denominator),t},decode(e,t){let r=e instanceof d.BinaryReader?e:new d.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=m();for(;r.pos>>3){case 1:i.numerator=r.uint64();break;case 2:i.denominator=r.uint64();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=m();return(0,c.isSet)(e.numerator)&&(t.numerator=BigInt(e.numerator.toString())),(0,c.isSet)(e.denominator)&&(t.denominator=BigInt(e.denominator.toString())),t},toJSON(e){let t={};return void 0!==e.numerator&&(t.numerator=(e.numerator||BigInt(0)).toString()),void 0!==e.denominator&&(t.denominator=(e.denominator||BigInt(0)).toString()),t},fromPartial(e){let t=m();return void 0!==e.numerator&&null!==e.numerator&&(t.numerator=BigInt(e.numerator.toString())),void 0!==e.denominator&&null!==e.denominator&&(t.denominator=BigInt(e.denominator.toString())),t}}},29598:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PublicKey=t.protobufPackage=void 0;let n=r(46554),i=r(99133);function o(){return{ed25519:void 0,secp256k1:void 0}}t.protobufPackage="tendermint.crypto",t.PublicKey={typeUrl:"/tendermint.crypto.PublicKey",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.BinaryWriter.create();return void 0!==e.ed25519&&t.uint32(10).bytes(e.ed25519),void 0!==e.secp256k1&&t.uint32(18).bytes(e.secp256k1),t},decode(e,t){let r=e instanceof n.BinaryReader?e:new n.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=o();for(;r.pos>>3){case 1:a.ed25519=r.bytes();break;case 2:a.secp256k1=r.bytes();break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=o();return(0,i.isSet)(e.ed25519)&&(t.ed25519=(0,i.bytesFromBase64)(e.ed25519)),(0,i.isSet)(e.secp256k1)&&(t.secp256k1=(0,i.bytesFromBase64)(e.secp256k1)),t},toJSON(e){let t={};return void 0!==e.ed25519&&(t.ed25519=void 0!==e.ed25519?(0,i.base64FromBytes)(e.ed25519):void 0),void 0!==e.secp256k1&&(t.secp256k1=void 0!==e.secp256k1?(0,i.base64FromBytes)(e.secp256k1):void 0),t},fromPartial(e){var t,r;let n=o();return n.ed25519=null!==(t=e.ed25519)&&void 0!==t?t:void 0,n.secp256k1=null!==(r=e.secp256k1)&&void 0!==r?r:void 0,n}}},86818:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProofOps=t.ProofOp=t.DominoOp=t.ValueOp=t.Proof=t.protobufPackage=void 0;let n=r(46554),i=r(99133);function o(){return{total:BigInt(0),index:BigInt(0),leafHash:new Uint8Array,aunts:[]}}function a(){return{key:new Uint8Array,proof:void 0}}function s(){return{key:"",input:"",output:""}}function l(){return{type:"",key:new Uint8Array,data:new Uint8Array}}function u(){return{ops:[]}}t.protobufPackage="tendermint.crypto",t.Proof={typeUrl:"/tendermint.crypto.Proof",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.BinaryWriter.create();for(let r of(e.total!==BigInt(0)&&t.uint32(8).int64(e.total),e.index!==BigInt(0)&&t.uint32(16).int64(e.index),0!==e.leafHash.length&&t.uint32(26).bytes(e.leafHash),e.aunts))t.uint32(34).bytes(r);return t},decode(e,t){let r=e instanceof n.BinaryReader?e:new n.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=o();for(;r.pos>>3){case 1:a.total=r.int64();break;case 2:a.index=r.int64();break;case 3:a.leafHash=r.bytes();break;case 4:a.aunts.push(r.bytes());break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=o();return(0,i.isSet)(e.total)&&(t.total=BigInt(e.total.toString())),(0,i.isSet)(e.index)&&(t.index=BigInt(e.index.toString())),(0,i.isSet)(e.leafHash)&&(t.leafHash=(0,i.bytesFromBase64)(e.leafHash)),Array.isArray(null==e?void 0:e.aunts)&&(t.aunts=e.aunts.map(e=>(0,i.bytesFromBase64)(e))),t},toJSON(e){let t={};return void 0!==e.total&&(t.total=(e.total||BigInt(0)).toString()),void 0!==e.index&&(t.index=(e.index||BigInt(0)).toString()),void 0!==e.leafHash&&(t.leafHash=(0,i.base64FromBytes)(void 0!==e.leafHash?e.leafHash:new Uint8Array)),e.aunts?t.aunts=e.aunts.map(e=>(0,i.base64FromBytes)(void 0!==e?e:new Uint8Array)):t.aunts=[],t},fromPartial(e){var t,r;let n=o();return void 0!==e.total&&null!==e.total&&(n.total=BigInt(e.total.toString())),void 0!==e.index&&null!==e.index&&(n.index=BigInt(e.index.toString())),n.leafHash=null!==(r=e.leafHash)&&void 0!==r?r:new Uint8Array,n.aunts=(null===(t=e.aunts)||void 0===t?void 0:t.map(e=>e))||[],n}},t.ValueOp={typeUrl:"/tendermint.crypto.ValueOp",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.BinaryWriter.create();return 0!==e.key.length&&r.uint32(10).bytes(e.key),void 0!==e.proof&&t.Proof.encode(e.proof,r.uint32(18).fork()).ldelim(),r},decode(e,r){let i=e instanceof n.BinaryReader?e:new n.BinaryReader(e),o=void 0===r?i.len:i.pos+r,s=a();for(;i.pos>>3){case 1:s.key=i.bytes();break;case 2:s.proof=t.Proof.decode(i,i.uint32());break;default:i.skipType(7&e)}}return s},fromJSON(e){let r=a();return(0,i.isSet)(e.key)&&(r.key=(0,i.bytesFromBase64)(e.key)),(0,i.isSet)(e.proof)&&(r.proof=t.Proof.fromJSON(e.proof)),r},toJSON(e){let r={};return void 0!==e.key&&(r.key=(0,i.base64FromBytes)(void 0!==e.key?e.key:new Uint8Array)),void 0!==e.proof&&(r.proof=e.proof?t.Proof.toJSON(e.proof):void 0),r},fromPartial(e){var r;let n=a();return n.key=null!==(r=e.key)&&void 0!==r?r:new Uint8Array,void 0!==e.proof&&null!==e.proof&&(n.proof=t.Proof.fromPartial(e.proof)),n}},t.DominoOp={typeUrl:"/tendermint.crypto.DominoOp",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.BinaryWriter.create();return""!==e.key&&t.uint32(10).string(e.key),""!==e.input&&t.uint32(18).string(e.input),""!==e.output&&t.uint32(26).string(e.output),t},decode(e,t){let r=e instanceof n.BinaryReader?e:new n.BinaryReader(e),i=void 0===t?r.len:r.pos+t,o=s();for(;r.pos>>3){case 1:o.key=r.string();break;case 2:o.input=r.string();break;case 3:o.output=r.string();break;default:r.skipType(7&e)}}return o},fromJSON(e){let t=s();return(0,i.isSet)(e.key)&&(t.key=String(e.key)),(0,i.isSet)(e.input)&&(t.input=String(e.input)),(0,i.isSet)(e.output)&&(t.output=String(e.output)),t},toJSON(e){let t={};return void 0!==e.key&&(t.key=e.key),void 0!==e.input&&(t.input=e.input),void 0!==e.output&&(t.output=e.output),t},fromPartial(e){var t,r,n;let i=s();return i.key=null!==(t=e.key)&&void 0!==t?t:"",i.input=null!==(r=e.input)&&void 0!==r?r:"",i.output=null!==(n=e.output)&&void 0!==n?n:"",i}},t.ProofOp={typeUrl:"/tendermint.crypto.ProofOp",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.BinaryWriter.create();return""!==e.type&&t.uint32(10).string(e.type),0!==e.key.length&&t.uint32(18).bytes(e.key),0!==e.data.length&&t.uint32(26).bytes(e.data),t},decode(e,t){let r=e instanceof n.BinaryReader?e:new n.BinaryReader(e),i=void 0===t?r.len:r.pos+t,o=l();for(;r.pos>>3){case 1:o.type=r.string();break;case 2:o.key=r.bytes();break;case 3:o.data=r.bytes();break;default:r.skipType(7&e)}}return o},fromJSON(e){let t=l();return(0,i.isSet)(e.type)&&(t.type=String(e.type)),(0,i.isSet)(e.key)&&(t.key=(0,i.bytesFromBase64)(e.key)),(0,i.isSet)(e.data)&&(t.data=(0,i.bytesFromBase64)(e.data)),t},toJSON(e){let t={};return void 0!==e.type&&(t.type=e.type),void 0!==e.key&&(t.key=(0,i.base64FromBytes)(void 0!==e.key?e.key:new Uint8Array)),void 0!==e.data&&(t.data=(0,i.base64FromBytes)(void 0!==e.data?e.data:new Uint8Array)),t},fromPartial(e){var t,r,n;let i=l();return i.type=null!==(t=e.type)&&void 0!==t?t:"",i.key=null!==(r=e.key)&&void 0!==r?r:new Uint8Array,i.data=null!==(n=e.data)&&void 0!==n?n:new Uint8Array,i}},t.ProofOps={typeUrl:"/tendermint.crypto.ProofOps",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.BinaryWriter.create();for(let n of e.ops)t.ProofOp.encode(n,r.uint32(10).fork()).ldelim();return r},decode(e,r){let i=e instanceof n.BinaryReader?e:new n.BinaryReader(e),o=void 0===r?i.len:i.pos+r,a=u();for(;i.pos>>3==1?a.ops.push(t.ProofOp.decode(i,i.uint32())):i.skipType(7&e)}return a},fromJSON(e){let r=u();return Array.isArray(null==e?void 0:e.ops)&&(r.ops=e.ops.map(e=>t.ProofOp.fromJSON(e))),r},toJSON(e){let r={};return e.ops?r.ops=e.ops.map(e=>e?t.ProofOp.toJSON(e):void 0):r.ops=[],r},fromPartial(e){var r;let n=u();return n.ops=(null===(r=e.ops)||void 0===r?void 0:r.map(e=>t.ProofOp.fromPartial(e)))||[],n}}},81334:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Block=t.protobufPackage=void 0;let n=r(92585),i=r(82738),o=r(46554),a=r(99133);function s(){return{header:n.Header.fromPartial({}),data:n.Data.fromPartial({}),evidence:i.EvidenceList.fromPartial({}),lastCommit:void 0}}t.protobufPackage="tendermint.types",t.Block={typeUrl:"/tendermint.types.Block",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return void 0!==e.header&&n.Header.encode(e.header,t.uint32(10).fork()).ldelim(),void 0!==e.data&&n.Data.encode(e.data,t.uint32(18).fork()).ldelim(),void 0!==e.evidence&&i.EvidenceList.encode(e.evidence,t.uint32(26).fork()).ldelim(),void 0!==e.lastCommit&&n.Commit.encode(e.lastCommit,t.uint32(34).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),a=void 0===t?r.len:r.pos+t,l=s();for(;r.pos>>3){case 1:l.header=n.Header.decode(r,r.uint32());break;case 2:l.data=n.Data.decode(r,r.uint32());break;case 3:l.evidence=i.EvidenceList.decode(r,r.uint32());break;case 4:l.lastCommit=n.Commit.decode(r,r.uint32());break;default:r.skipType(7&e)}}return l},fromJSON(e){let t=s();return(0,a.isSet)(e.header)&&(t.header=n.Header.fromJSON(e.header)),(0,a.isSet)(e.data)&&(t.data=n.Data.fromJSON(e.data)),(0,a.isSet)(e.evidence)&&(t.evidence=i.EvidenceList.fromJSON(e.evidence)),(0,a.isSet)(e.lastCommit)&&(t.lastCommit=n.Commit.fromJSON(e.lastCommit)),t},toJSON(e){let t={};return void 0!==e.header&&(t.header=e.header?n.Header.toJSON(e.header):void 0),void 0!==e.data&&(t.data=e.data?n.Data.toJSON(e.data):void 0),void 0!==e.evidence&&(t.evidence=e.evidence?i.EvidenceList.toJSON(e.evidence):void 0),void 0!==e.lastCommit&&(t.lastCommit=e.lastCommit?n.Commit.toJSON(e.lastCommit):void 0),t},fromPartial(e){let t=s();return void 0!==e.header&&null!==e.header&&(t.header=n.Header.fromPartial(e.header)),void 0!==e.data&&null!==e.data&&(t.data=n.Data.fromPartial(e.data)),void 0!==e.evidence&&null!==e.evidence&&(t.evidence=i.EvidenceList.fromPartial(e.evidence)),void 0!==e.lastCommit&&null!==e.lastCommit&&(t.lastCommit=n.Commit.fromPartial(e.lastCommit)),t}}},82738:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EvidenceList=t.LightClientAttackEvidence=t.DuplicateVoteEvidence=t.Evidence=t.protobufPackage=void 0;let n=r(92585),i=r(9990),o=r(83292),a=r(46554),s=r(99133);function l(){return{duplicateVoteEvidence:void 0,lightClientAttackEvidence:void 0}}function u(){return{voteA:void 0,voteB:void 0,totalVotingPower:BigInt(0),validatorPower:BigInt(0),timestamp:i.Timestamp.fromPartial({})}}function d(){return{conflictingBlock:void 0,commonHeight:BigInt(0),byzantineValidators:[],totalVotingPower:BigInt(0),timestamp:i.Timestamp.fromPartial({})}}function c(){return{evidence:[]}}t.protobufPackage="tendermint.types",t.Evidence={typeUrl:"/tendermint.types.Evidence",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return void 0!==e.duplicateVoteEvidence&&t.DuplicateVoteEvidence.encode(e.duplicateVoteEvidence,r.uint32(10).fork()).ldelim(),void 0!==e.lightClientAttackEvidence&&t.LightClientAttackEvidence.encode(e.lightClientAttackEvidence,r.uint32(18).fork()).ldelim(),r},decode(e,r){let n=e instanceof a.BinaryReader?e:new a.BinaryReader(e),i=void 0===r?n.len:n.pos+r,o=l();for(;n.pos>>3){case 1:o.duplicateVoteEvidence=t.DuplicateVoteEvidence.decode(n,n.uint32());break;case 2:o.lightClientAttackEvidence=t.LightClientAttackEvidence.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){let r=l();return(0,s.isSet)(e.duplicateVoteEvidence)&&(r.duplicateVoteEvidence=t.DuplicateVoteEvidence.fromJSON(e.duplicateVoteEvidence)),(0,s.isSet)(e.lightClientAttackEvidence)&&(r.lightClientAttackEvidence=t.LightClientAttackEvidence.fromJSON(e.lightClientAttackEvidence)),r},toJSON(e){let r={};return void 0!==e.duplicateVoteEvidence&&(r.duplicateVoteEvidence=e.duplicateVoteEvidence?t.DuplicateVoteEvidence.toJSON(e.duplicateVoteEvidence):void 0),void 0!==e.lightClientAttackEvidence&&(r.lightClientAttackEvidence=e.lightClientAttackEvidence?t.LightClientAttackEvidence.toJSON(e.lightClientAttackEvidence):void 0),r},fromPartial(e){let r=l();return void 0!==e.duplicateVoteEvidence&&null!==e.duplicateVoteEvidence&&(r.duplicateVoteEvidence=t.DuplicateVoteEvidence.fromPartial(e.duplicateVoteEvidence)),void 0!==e.lightClientAttackEvidence&&null!==e.lightClientAttackEvidence&&(r.lightClientAttackEvidence=t.LightClientAttackEvidence.fromPartial(e.lightClientAttackEvidence)),r}},t.DuplicateVoteEvidence={typeUrl:"/tendermint.types.DuplicateVoteEvidence",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return void 0!==e.voteA&&n.Vote.encode(e.voteA,t.uint32(10).fork()).ldelim(),void 0!==e.voteB&&n.Vote.encode(e.voteB,t.uint32(18).fork()).ldelim(),e.totalVotingPower!==BigInt(0)&&t.uint32(24).int64(e.totalVotingPower),e.validatorPower!==BigInt(0)&&t.uint32(32).int64(e.validatorPower),void 0!==e.timestamp&&i.Timestamp.encode(e.timestamp,t.uint32(42).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),o=void 0===t?r.len:r.pos+t,s=u();for(;r.pos>>3){case 1:s.voteA=n.Vote.decode(r,r.uint32());break;case 2:s.voteB=n.Vote.decode(r,r.uint32());break;case 3:s.totalVotingPower=r.int64();break;case 4:s.validatorPower=r.int64();break;case 5:s.timestamp=i.Timestamp.decode(r,r.uint32());break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=u();return(0,s.isSet)(e.voteA)&&(t.voteA=n.Vote.fromJSON(e.voteA)),(0,s.isSet)(e.voteB)&&(t.voteB=n.Vote.fromJSON(e.voteB)),(0,s.isSet)(e.totalVotingPower)&&(t.totalVotingPower=BigInt(e.totalVotingPower.toString())),(0,s.isSet)(e.validatorPower)&&(t.validatorPower=BigInt(e.validatorPower.toString())),(0,s.isSet)(e.timestamp)&&(t.timestamp=(0,s.fromJsonTimestamp)(e.timestamp)),t},toJSON(e){let t={};return void 0!==e.voteA&&(t.voteA=e.voteA?n.Vote.toJSON(e.voteA):void 0),void 0!==e.voteB&&(t.voteB=e.voteB?n.Vote.toJSON(e.voteB):void 0),void 0!==e.totalVotingPower&&(t.totalVotingPower=(e.totalVotingPower||BigInt(0)).toString()),void 0!==e.validatorPower&&(t.validatorPower=(e.validatorPower||BigInt(0)).toString()),void 0!==e.timestamp&&(t.timestamp=(0,s.fromTimestamp)(e.timestamp).toISOString()),t},fromPartial(e){let t=u();return void 0!==e.voteA&&null!==e.voteA&&(t.voteA=n.Vote.fromPartial(e.voteA)),void 0!==e.voteB&&null!==e.voteB&&(t.voteB=n.Vote.fromPartial(e.voteB)),void 0!==e.totalVotingPower&&null!==e.totalVotingPower&&(t.totalVotingPower=BigInt(e.totalVotingPower.toString())),void 0!==e.validatorPower&&null!==e.validatorPower&&(t.validatorPower=BigInt(e.validatorPower.toString())),void 0!==e.timestamp&&null!==e.timestamp&&(t.timestamp=i.Timestamp.fromPartial(e.timestamp)),t}},t.LightClientAttackEvidence={typeUrl:"/tendermint.types.LightClientAttackEvidence",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();for(let r of(void 0!==e.conflictingBlock&&n.LightBlock.encode(e.conflictingBlock,t.uint32(10).fork()).ldelim(),e.commonHeight!==BigInt(0)&&t.uint32(16).int64(e.commonHeight),e.byzantineValidators))o.Validator.encode(r,t.uint32(26).fork()).ldelim();return e.totalVotingPower!==BigInt(0)&&t.uint32(32).int64(e.totalVotingPower),void 0!==e.timestamp&&i.Timestamp.encode(e.timestamp,t.uint32(42).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),s=void 0===t?r.len:r.pos+t,l=d();for(;r.pos>>3){case 1:l.conflictingBlock=n.LightBlock.decode(r,r.uint32());break;case 2:l.commonHeight=r.int64();break;case 3:l.byzantineValidators.push(o.Validator.decode(r,r.uint32()));break;case 4:l.totalVotingPower=r.int64();break;case 5:l.timestamp=i.Timestamp.decode(r,r.uint32());break;default:r.skipType(7&e)}}return l},fromJSON(e){let t=d();return(0,s.isSet)(e.conflictingBlock)&&(t.conflictingBlock=n.LightBlock.fromJSON(e.conflictingBlock)),(0,s.isSet)(e.commonHeight)&&(t.commonHeight=BigInt(e.commonHeight.toString())),Array.isArray(null==e?void 0:e.byzantineValidators)&&(t.byzantineValidators=e.byzantineValidators.map(e=>o.Validator.fromJSON(e))),(0,s.isSet)(e.totalVotingPower)&&(t.totalVotingPower=BigInt(e.totalVotingPower.toString())),(0,s.isSet)(e.timestamp)&&(t.timestamp=(0,s.fromJsonTimestamp)(e.timestamp)),t},toJSON(e){let t={};return void 0!==e.conflictingBlock&&(t.conflictingBlock=e.conflictingBlock?n.LightBlock.toJSON(e.conflictingBlock):void 0),void 0!==e.commonHeight&&(t.commonHeight=(e.commonHeight||BigInt(0)).toString()),e.byzantineValidators?t.byzantineValidators=e.byzantineValidators.map(e=>e?o.Validator.toJSON(e):void 0):t.byzantineValidators=[],void 0!==e.totalVotingPower&&(t.totalVotingPower=(e.totalVotingPower||BigInt(0)).toString()),void 0!==e.timestamp&&(t.timestamp=(0,s.fromTimestamp)(e.timestamp).toISOString()),t},fromPartial(e){var t;let r=d();return void 0!==e.conflictingBlock&&null!==e.conflictingBlock&&(r.conflictingBlock=n.LightBlock.fromPartial(e.conflictingBlock)),void 0!==e.commonHeight&&null!==e.commonHeight&&(r.commonHeight=BigInt(e.commonHeight.toString())),r.byzantineValidators=(null===(t=e.byzantineValidators)||void 0===t?void 0:t.map(e=>o.Validator.fromPartial(e)))||[],void 0!==e.totalVotingPower&&null!==e.totalVotingPower&&(r.totalVotingPower=BigInt(e.totalVotingPower.toString())),void 0!==e.timestamp&&null!==e.timestamp&&(r.timestamp=i.Timestamp.fromPartial(e.timestamp)),r}},t.EvidenceList={typeUrl:"/tendermint.types.EvidenceList",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();for(let n of e.evidence)t.Evidence.encode(n,r.uint32(10).fork()).ldelim();return r},decode(e,r){let n=e instanceof a.BinaryReader?e:new a.BinaryReader(e),i=void 0===r?n.len:n.pos+r,o=c();for(;n.pos>>3==1?o.evidence.push(t.Evidence.decode(n,n.uint32())):n.skipType(7&e)}return o},fromJSON(e){let r=c();return Array.isArray(null==e?void 0:e.evidence)&&(r.evidence=e.evidence.map(e=>t.Evidence.fromJSON(e))),r},toJSON(e){let r={};return e.evidence?r.evidence=e.evidence.map(e=>e?t.Evidence.toJSON(e):void 0):r.evidence=[],r},fromPartial(e){var r;let n=c();return n.evidence=(null===(r=e.evidence)||void 0===r?void 0:r.map(e=>t.Evidence.fromPartial(e)))||[],n}}},55315:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HashedParams=t.VersionParams=t.ValidatorParams=t.EvidenceParams=t.BlockParams=t.ConsensusParams=t.protobufPackage=void 0;let n=r(84849),i=r(46554),o=r(99133);function a(){return{block:void 0,evidence:void 0,validator:void 0,version:void 0}}function s(){return{maxBytes:BigInt(0),maxGas:BigInt(0)}}function l(){return{maxAgeNumBlocks:BigInt(0),maxAgeDuration:n.Duration.fromPartial({}),maxBytes:BigInt(0)}}function u(){return{pubKeyTypes:[]}}function d(){return{app:BigInt(0)}}function c(){return{blockMaxBytes:BigInt(0),blockMaxGas:BigInt(0)}}t.protobufPackage="tendermint.types",t.ConsensusParams={typeUrl:"/tendermint.types.ConsensusParams",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();return void 0!==e.block&&t.BlockParams.encode(e.block,r.uint32(10).fork()).ldelim(),void 0!==e.evidence&&t.EvidenceParams.encode(e.evidence,r.uint32(18).fork()).ldelim(),void 0!==e.validator&&t.ValidatorParams.encode(e.validator,r.uint32(26).fork()).ldelim(),void 0!==e.version&&t.VersionParams.encode(e.version,r.uint32(34).fork()).ldelim(),r},decode(e,r){let n=e instanceof i.BinaryReader?e:new i.BinaryReader(e),o=void 0===r?n.len:n.pos+r,s=a();for(;n.pos>>3){case 1:s.block=t.BlockParams.decode(n,n.uint32());break;case 2:s.evidence=t.EvidenceParams.decode(n,n.uint32());break;case 3:s.validator=t.ValidatorParams.decode(n,n.uint32());break;case 4:s.version=t.VersionParams.decode(n,n.uint32());break;default:n.skipType(7&e)}}return s},fromJSON(e){let r=a();return(0,o.isSet)(e.block)&&(r.block=t.BlockParams.fromJSON(e.block)),(0,o.isSet)(e.evidence)&&(r.evidence=t.EvidenceParams.fromJSON(e.evidence)),(0,o.isSet)(e.validator)&&(r.validator=t.ValidatorParams.fromJSON(e.validator)),(0,o.isSet)(e.version)&&(r.version=t.VersionParams.fromJSON(e.version)),r},toJSON(e){let r={};return void 0!==e.block&&(r.block=e.block?t.BlockParams.toJSON(e.block):void 0),void 0!==e.evidence&&(r.evidence=e.evidence?t.EvidenceParams.toJSON(e.evidence):void 0),void 0!==e.validator&&(r.validator=e.validator?t.ValidatorParams.toJSON(e.validator):void 0),void 0!==e.version&&(r.version=e.version?t.VersionParams.toJSON(e.version):void 0),r},fromPartial(e){let r=a();return void 0!==e.block&&null!==e.block&&(r.block=t.BlockParams.fromPartial(e.block)),void 0!==e.evidence&&null!==e.evidence&&(r.evidence=t.EvidenceParams.fromPartial(e.evidence)),void 0!==e.validator&&null!==e.validator&&(r.validator=t.ValidatorParams.fromPartial(e.validator)),void 0!==e.version&&null!==e.version&&(r.version=t.VersionParams.fromPartial(e.version)),r}},t.BlockParams={typeUrl:"/tendermint.types.BlockParams",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();return e.maxBytes!==BigInt(0)&&t.uint32(8).int64(e.maxBytes),e.maxGas!==BigInt(0)&&t.uint32(16).int64(e.maxGas),t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=s();for(;r.pos>>3){case 1:o.maxBytes=r.int64();break;case 2:o.maxGas=r.int64();break;default:r.skipType(7&e)}}return o},fromJSON(e){let t=s();return(0,o.isSet)(e.maxBytes)&&(t.maxBytes=BigInt(e.maxBytes.toString())),(0,o.isSet)(e.maxGas)&&(t.maxGas=BigInt(e.maxGas.toString())),t},toJSON(e){let t={};return void 0!==e.maxBytes&&(t.maxBytes=(e.maxBytes||BigInt(0)).toString()),void 0!==e.maxGas&&(t.maxGas=(e.maxGas||BigInt(0)).toString()),t},fromPartial(e){let t=s();return void 0!==e.maxBytes&&null!==e.maxBytes&&(t.maxBytes=BigInt(e.maxBytes.toString())),void 0!==e.maxGas&&null!==e.maxGas&&(t.maxGas=BigInt(e.maxGas.toString())),t}},t.EvidenceParams={typeUrl:"/tendermint.types.EvidenceParams",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();return e.maxAgeNumBlocks!==BigInt(0)&&t.uint32(8).int64(e.maxAgeNumBlocks),void 0!==e.maxAgeDuration&&n.Duration.encode(e.maxAgeDuration,t.uint32(18).fork()).ldelim(),e.maxBytes!==BigInt(0)&&t.uint32(24).int64(e.maxBytes),t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),o=void 0===t?r.len:r.pos+t,a=l();for(;r.pos>>3){case 1:a.maxAgeNumBlocks=r.int64();break;case 2:a.maxAgeDuration=n.Duration.decode(r,r.uint32());break;case 3:a.maxBytes=r.int64();break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=l();return(0,o.isSet)(e.maxAgeNumBlocks)&&(t.maxAgeNumBlocks=BigInt(e.maxAgeNumBlocks.toString())),(0,o.isSet)(e.maxAgeDuration)&&(t.maxAgeDuration=n.Duration.fromJSON(e.maxAgeDuration)),(0,o.isSet)(e.maxBytes)&&(t.maxBytes=BigInt(e.maxBytes.toString())),t},toJSON(e){let t={};return void 0!==e.maxAgeNumBlocks&&(t.maxAgeNumBlocks=(e.maxAgeNumBlocks||BigInt(0)).toString()),void 0!==e.maxAgeDuration&&(t.maxAgeDuration=e.maxAgeDuration?n.Duration.toJSON(e.maxAgeDuration):void 0),void 0!==e.maxBytes&&(t.maxBytes=(e.maxBytes||BigInt(0)).toString()),t},fromPartial(e){let t=l();return void 0!==e.maxAgeNumBlocks&&null!==e.maxAgeNumBlocks&&(t.maxAgeNumBlocks=BigInt(e.maxAgeNumBlocks.toString())),void 0!==e.maxAgeDuration&&null!==e.maxAgeDuration&&(t.maxAgeDuration=n.Duration.fromPartial(e.maxAgeDuration)),void 0!==e.maxBytes&&null!==e.maxBytes&&(t.maxBytes=BigInt(e.maxBytes.toString())),t}},t.ValidatorParams={typeUrl:"/tendermint.types.ValidatorParams",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();for(let r of e.pubKeyTypes)t.uint32(10).string(r);return t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=u();for(;r.pos>>3==1?o.pubKeyTypes.push(r.string()):r.skipType(7&e)}return o},fromJSON(e){let t=u();return Array.isArray(null==e?void 0:e.pubKeyTypes)&&(t.pubKeyTypes=e.pubKeyTypes.map(e=>String(e))),t},toJSON(e){let t={};return e.pubKeyTypes?t.pubKeyTypes=e.pubKeyTypes.map(e=>e):t.pubKeyTypes=[],t},fromPartial(e){var t;let r=u();return r.pubKeyTypes=(null===(t=e.pubKeyTypes)||void 0===t?void 0:t.map(e=>e))||[],r}},t.VersionParams={typeUrl:"/tendermint.types.VersionParams",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();return e.app!==BigInt(0)&&t.uint32(8).uint64(e.app),t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=d();for(;r.pos>>3==1?o.app=r.uint64():r.skipType(7&e)}return o},fromJSON(e){let t=d();return(0,o.isSet)(e.app)&&(t.app=BigInt(e.app.toString())),t},toJSON(e){let t={};return void 0!==e.app&&(t.app=(e.app||BigInt(0)).toString()),t},fromPartial(e){let t=d();return void 0!==e.app&&null!==e.app&&(t.app=BigInt(e.app.toString())),t}},t.HashedParams={typeUrl:"/tendermint.types.HashedParams",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();return e.blockMaxBytes!==BigInt(0)&&t.uint32(8).int64(e.blockMaxBytes),e.blockMaxGas!==BigInt(0)&&t.uint32(16).int64(e.blockMaxGas),t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=c();for(;r.pos>>3){case 1:o.blockMaxBytes=r.int64();break;case 2:o.blockMaxGas=r.int64();break;default:r.skipType(7&e)}}return o},fromJSON(e){let t=c();return(0,o.isSet)(e.blockMaxBytes)&&(t.blockMaxBytes=BigInt(e.blockMaxBytes.toString())),(0,o.isSet)(e.blockMaxGas)&&(t.blockMaxGas=BigInt(e.blockMaxGas.toString())),t},toJSON(e){let t={};return void 0!==e.blockMaxBytes&&(t.blockMaxBytes=(e.blockMaxBytes||BigInt(0)).toString()),void 0!==e.blockMaxGas&&(t.blockMaxGas=(e.blockMaxGas||BigInt(0)).toString()),t},fromPartial(e){let t=c();return void 0!==e.blockMaxBytes&&null!==e.blockMaxBytes&&(t.blockMaxBytes=BigInt(e.blockMaxBytes.toString())),void 0!==e.blockMaxGas&&null!==e.blockMaxGas&&(t.blockMaxGas=BigInt(e.blockMaxGas.toString())),t}}},92585:function(e,t,r){"use strict";var n,i;Object.defineProperty(t,"__esModule",{value:!0}),t.TxProof=t.BlockMeta=t.LightBlock=t.SignedHeader=t.Proposal=t.CommitSig=t.Commit=t.Vote=t.Data=t.Header=t.BlockID=t.Part=t.PartSetHeader=t.signedMsgTypeToJSON=t.signedMsgTypeFromJSON=t.SignedMsgType=t.blockIDFlagToJSON=t.blockIDFlagFromJSON=t.BlockIDFlag=t.protobufPackage=void 0;let o=r(86818),a=r(76426),s=r(9990),l=r(83292),u=r(46554),d=r(99133);function c(e){switch(e){case 0:case"BLOCK_ID_FLAG_UNKNOWN":return n.BLOCK_ID_FLAG_UNKNOWN;case 1:case"BLOCK_ID_FLAG_ABSENT":return n.BLOCK_ID_FLAG_ABSENT;case 2:case"BLOCK_ID_FLAG_COMMIT":return n.BLOCK_ID_FLAG_COMMIT;case 3:case"BLOCK_ID_FLAG_NIL":return n.BLOCK_ID_FLAG_NIL;default:return n.UNRECOGNIZED}}function p(e){switch(e){case n.BLOCK_ID_FLAG_UNKNOWN:return"BLOCK_ID_FLAG_UNKNOWN";case n.BLOCK_ID_FLAG_ABSENT:return"BLOCK_ID_FLAG_ABSENT";case n.BLOCK_ID_FLAG_COMMIT:return"BLOCK_ID_FLAG_COMMIT";case n.BLOCK_ID_FLAG_NIL:return"BLOCK_ID_FLAG_NIL";case n.UNRECOGNIZED:default:return"UNRECOGNIZED"}}function f(e){switch(e){case 0:case"SIGNED_MSG_TYPE_UNKNOWN":return i.SIGNED_MSG_TYPE_UNKNOWN;case 1:case"SIGNED_MSG_TYPE_PREVOTE":return i.SIGNED_MSG_TYPE_PREVOTE;case 2:case"SIGNED_MSG_TYPE_PRECOMMIT":return i.SIGNED_MSG_TYPE_PRECOMMIT;case 32:case"SIGNED_MSG_TYPE_PROPOSAL":return i.SIGNED_MSG_TYPE_PROPOSAL;default:return i.UNRECOGNIZED}}function h(e){switch(e){case i.SIGNED_MSG_TYPE_UNKNOWN:return"SIGNED_MSG_TYPE_UNKNOWN";case i.SIGNED_MSG_TYPE_PREVOTE:return"SIGNED_MSG_TYPE_PREVOTE";case i.SIGNED_MSG_TYPE_PRECOMMIT:return"SIGNED_MSG_TYPE_PRECOMMIT";case i.SIGNED_MSG_TYPE_PROPOSAL:return"SIGNED_MSG_TYPE_PROPOSAL";case i.UNRECOGNIZED:default:return"UNRECOGNIZED"}}function g(){return{total:0,hash:new Uint8Array}}function m(){return{index:0,bytes:new Uint8Array,proof:o.Proof.fromPartial({})}}function y(){return{hash:new Uint8Array,partSetHeader:t.PartSetHeader.fromPartial({})}}function v(){return{version:a.Consensus.fromPartial({}),chainId:"",height:BigInt(0),time:s.Timestamp.fromPartial({}),lastBlockId:t.BlockID.fromPartial({}),lastCommitHash:new Uint8Array,dataHash:new Uint8Array,validatorsHash:new Uint8Array,nextValidatorsHash:new Uint8Array,consensusHash:new Uint8Array,appHash:new Uint8Array,lastResultsHash:new Uint8Array,evidenceHash:new Uint8Array,proposerAddress:new Uint8Array}}function b(){return{txs:[]}}function S(){return{type:0,height:BigInt(0),round:0,blockId:t.BlockID.fromPartial({}),timestamp:s.Timestamp.fromPartial({}),validatorAddress:new Uint8Array,validatorIndex:0,signature:new Uint8Array}}function w(){return{height:BigInt(0),round:0,blockId:t.BlockID.fromPartial({}),signatures:[]}}function _(){return{blockIdFlag:0,validatorAddress:new Uint8Array,timestamp:s.Timestamp.fromPartial({}),signature:new Uint8Array}}function k(){return{type:0,height:BigInt(0),round:0,polRound:0,blockId:t.BlockID.fromPartial({}),timestamp:s.Timestamp.fromPartial({}),signature:new Uint8Array}}function O(){return{header:void 0,commit:void 0}}function P(){return{signedHeader:void 0,validatorSet:void 0}}function A(){return{blockId:t.BlockID.fromPartial({}),blockSize:BigInt(0),header:t.Header.fromPartial({}),numTxs:BigInt(0)}}function I(){return{rootHash:new Uint8Array,data:new Uint8Array,proof:void 0}}t.protobufPackage="tendermint.types",function(e){e[e.BLOCK_ID_FLAG_UNKNOWN=0]="BLOCK_ID_FLAG_UNKNOWN",e[e.BLOCK_ID_FLAG_ABSENT=1]="BLOCK_ID_FLAG_ABSENT",e[e.BLOCK_ID_FLAG_COMMIT=2]="BLOCK_ID_FLAG_COMMIT",e[e.BLOCK_ID_FLAG_NIL=3]="BLOCK_ID_FLAG_NIL",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(n||(t.BlockIDFlag=n={})),t.blockIDFlagFromJSON=c,t.blockIDFlagToJSON=p,function(e){e[e.SIGNED_MSG_TYPE_UNKNOWN=0]="SIGNED_MSG_TYPE_UNKNOWN",e[e.SIGNED_MSG_TYPE_PREVOTE=1]="SIGNED_MSG_TYPE_PREVOTE",e[e.SIGNED_MSG_TYPE_PRECOMMIT=2]="SIGNED_MSG_TYPE_PRECOMMIT",e[e.SIGNED_MSG_TYPE_PROPOSAL=32]="SIGNED_MSG_TYPE_PROPOSAL",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(i||(t.SignedMsgType=i={})),t.signedMsgTypeFromJSON=f,t.signedMsgTypeToJSON=h,t.PartSetHeader={typeUrl:"/tendermint.types.PartSetHeader",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.BinaryWriter.create();return 0!==e.total&&t.uint32(8).uint32(e.total),0!==e.hash.length&&t.uint32(18).bytes(e.hash),t},decode(e,t){let r=e instanceof u.BinaryReader?e:new u.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=g();for(;r.pos>>3){case 1:i.total=r.uint32();break;case 2:i.hash=r.bytes();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=g();return(0,d.isSet)(e.total)&&(t.total=Number(e.total)),(0,d.isSet)(e.hash)&&(t.hash=(0,d.bytesFromBase64)(e.hash)),t},toJSON(e){let t={};return void 0!==e.total&&(t.total=Math.round(e.total)),void 0!==e.hash&&(t.hash=(0,d.base64FromBytes)(void 0!==e.hash?e.hash:new Uint8Array)),t},fromPartial(e){var t,r;let n=g();return n.total=null!==(t=e.total)&&void 0!==t?t:0,n.hash=null!==(r=e.hash)&&void 0!==r?r:new Uint8Array,n}},t.Part={typeUrl:"/tendermint.types.Part",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.BinaryWriter.create();return 0!==e.index&&t.uint32(8).uint32(e.index),0!==e.bytes.length&&t.uint32(18).bytes(e.bytes),void 0!==e.proof&&o.Proof.encode(e.proof,t.uint32(26).fork()).ldelim(),t},decode(e,t){let r=e instanceof u.BinaryReader?e:new u.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=m();for(;r.pos>>3){case 1:i.index=r.uint32();break;case 2:i.bytes=r.bytes();break;case 3:i.proof=o.Proof.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=m();return(0,d.isSet)(e.index)&&(t.index=Number(e.index)),(0,d.isSet)(e.bytes)&&(t.bytes=(0,d.bytesFromBase64)(e.bytes)),(0,d.isSet)(e.proof)&&(t.proof=o.Proof.fromJSON(e.proof)),t},toJSON(e){let t={};return void 0!==e.index&&(t.index=Math.round(e.index)),void 0!==e.bytes&&(t.bytes=(0,d.base64FromBytes)(void 0!==e.bytes?e.bytes:new Uint8Array)),void 0!==e.proof&&(t.proof=e.proof?o.Proof.toJSON(e.proof):void 0),t},fromPartial(e){var t,r;let n=m();return n.index=null!==(t=e.index)&&void 0!==t?t:0,n.bytes=null!==(r=e.bytes)&&void 0!==r?r:new Uint8Array,void 0!==e.proof&&null!==e.proof&&(n.proof=o.Proof.fromPartial(e.proof)),n}},t.BlockID={typeUrl:"/tendermint.types.BlockID",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.BinaryWriter.create();return 0!==e.hash.length&&r.uint32(10).bytes(e.hash),void 0!==e.partSetHeader&&t.PartSetHeader.encode(e.partSetHeader,r.uint32(18).fork()).ldelim(),r},decode(e,r){let n=e instanceof u.BinaryReader?e:new u.BinaryReader(e),i=void 0===r?n.len:n.pos+r,o=y();for(;n.pos>>3){case 1:o.hash=n.bytes();break;case 2:o.partSetHeader=t.PartSetHeader.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){let r=y();return(0,d.isSet)(e.hash)&&(r.hash=(0,d.bytesFromBase64)(e.hash)),(0,d.isSet)(e.partSetHeader)&&(r.partSetHeader=t.PartSetHeader.fromJSON(e.partSetHeader)),r},toJSON(e){let r={};return void 0!==e.hash&&(r.hash=(0,d.base64FromBytes)(void 0!==e.hash?e.hash:new Uint8Array)),void 0!==e.partSetHeader&&(r.partSetHeader=e.partSetHeader?t.PartSetHeader.toJSON(e.partSetHeader):void 0),r},fromPartial(e){var r;let n=y();return n.hash=null!==(r=e.hash)&&void 0!==r?r:new Uint8Array,void 0!==e.partSetHeader&&null!==e.partSetHeader&&(n.partSetHeader=t.PartSetHeader.fromPartial(e.partSetHeader)),n}},t.Header={typeUrl:"/tendermint.types.Header",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.BinaryWriter.create();return void 0!==e.version&&a.Consensus.encode(e.version,r.uint32(10).fork()).ldelim(),""!==e.chainId&&r.uint32(18).string(e.chainId),e.height!==BigInt(0)&&r.uint32(24).int64(e.height),void 0!==e.time&&s.Timestamp.encode(e.time,r.uint32(34).fork()).ldelim(),void 0!==e.lastBlockId&&t.BlockID.encode(e.lastBlockId,r.uint32(42).fork()).ldelim(),0!==e.lastCommitHash.length&&r.uint32(50).bytes(e.lastCommitHash),0!==e.dataHash.length&&r.uint32(58).bytes(e.dataHash),0!==e.validatorsHash.length&&r.uint32(66).bytes(e.validatorsHash),0!==e.nextValidatorsHash.length&&r.uint32(74).bytes(e.nextValidatorsHash),0!==e.consensusHash.length&&r.uint32(82).bytes(e.consensusHash),0!==e.appHash.length&&r.uint32(90).bytes(e.appHash),0!==e.lastResultsHash.length&&r.uint32(98).bytes(e.lastResultsHash),0!==e.evidenceHash.length&&r.uint32(106).bytes(e.evidenceHash),0!==e.proposerAddress.length&&r.uint32(114).bytes(e.proposerAddress),r},decode(e,r){let n=e instanceof u.BinaryReader?e:new u.BinaryReader(e),i=void 0===r?n.len:n.pos+r,o=v();for(;n.pos>>3){case 1:o.version=a.Consensus.decode(n,n.uint32());break;case 2:o.chainId=n.string();break;case 3:o.height=n.int64();break;case 4:o.time=s.Timestamp.decode(n,n.uint32());break;case 5:o.lastBlockId=t.BlockID.decode(n,n.uint32());break;case 6:o.lastCommitHash=n.bytes();break;case 7:o.dataHash=n.bytes();break;case 8:o.validatorsHash=n.bytes();break;case 9:o.nextValidatorsHash=n.bytes();break;case 10:o.consensusHash=n.bytes();break;case 11:o.appHash=n.bytes();break;case 12:o.lastResultsHash=n.bytes();break;case 13:o.evidenceHash=n.bytes();break;case 14:o.proposerAddress=n.bytes();break;default:n.skipType(7&e)}}return o},fromJSON(e){let r=v();return(0,d.isSet)(e.version)&&(r.version=a.Consensus.fromJSON(e.version)),(0,d.isSet)(e.chainId)&&(r.chainId=String(e.chainId)),(0,d.isSet)(e.height)&&(r.height=BigInt(e.height.toString())),(0,d.isSet)(e.time)&&(r.time=(0,d.fromJsonTimestamp)(e.time)),(0,d.isSet)(e.lastBlockId)&&(r.lastBlockId=t.BlockID.fromJSON(e.lastBlockId)),(0,d.isSet)(e.lastCommitHash)&&(r.lastCommitHash=(0,d.bytesFromBase64)(e.lastCommitHash)),(0,d.isSet)(e.dataHash)&&(r.dataHash=(0,d.bytesFromBase64)(e.dataHash)),(0,d.isSet)(e.validatorsHash)&&(r.validatorsHash=(0,d.bytesFromBase64)(e.validatorsHash)),(0,d.isSet)(e.nextValidatorsHash)&&(r.nextValidatorsHash=(0,d.bytesFromBase64)(e.nextValidatorsHash)),(0,d.isSet)(e.consensusHash)&&(r.consensusHash=(0,d.bytesFromBase64)(e.consensusHash)),(0,d.isSet)(e.appHash)&&(r.appHash=(0,d.bytesFromBase64)(e.appHash)),(0,d.isSet)(e.lastResultsHash)&&(r.lastResultsHash=(0,d.bytesFromBase64)(e.lastResultsHash)),(0,d.isSet)(e.evidenceHash)&&(r.evidenceHash=(0,d.bytesFromBase64)(e.evidenceHash)),(0,d.isSet)(e.proposerAddress)&&(r.proposerAddress=(0,d.bytesFromBase64)(e.proposerAddress)),r},toJSON(e){let r={};return void 0!==e.version&&(r.version=e.version?a.Consensus.toJSON(e.version):void 0),void 0!==e.chainId&&(r.chainId=e.chainId),void 0!==e.height&&(r.height=(e.height||BigInt(0)).toString()),void 0!==e.time&&(r.time=(0,d.fromTimestamp)(e.time).toISOString()),void 0!==e.lastBlockId&&(r.lastBlockId=e.lastBlockId?t.BlockID.toJSON(e.lastBlockId):void 0),void 0!==e.lastCommitHash&&(r.lastCommitHash=(0,d.base64FromBytes)(void 0!==e.lastCommitHash?e.lastCommitHash:new Uint8Array)),void 0!==e.dataHash&&(r.dataHash=(0,d.base64FromBytes)(void 0!==e.dataHash?e.dataHash:new Uint8Array)),void 0!==e.validatorsHash&&(r.validatorsHash=(0,d.base64FromBytes)(void 0!==e.validatorsHash?e.validatorsHash:new Uint8Array)),void 0!==e.nextValidatorsHash&&(r.nextValidatorsHash=(0,d.base64FromBytes)(void 0!==e.nextValidatorsHash?e.nextValidatorsHash:new Uint8Array)),void 0!==e.consensusHash&&(r.consensusHash=(0,d.base64FromBytes)(void 0!==e.consensusHash?e.consensusHash:new Uint8Array)),void 0!==e.appHash&&(r.appHash=(0,d.base64FromBytes)(void 0!==e.appHash?e.appHash:new Uint8Array)),void 0!==e.lastResultsHash&&(r.lastResultsHash=(0,d.base64FromBytes)(void 0!==e.lastResultsHash?e.lastResultsHash:new Uint8Array)),void 0!==e.evidenceHash&&(r.evidenceHash=(0,d.base64FromBytes)(void 0!==e.evidenceHash?e.evidenceHash:new Uint8Array)),void 0!==e.proposerAddress&&(r.proposerAddress=(0,d.base64FromBytes)(void 0!==e.proposerAddress?e.proposerAddress:new Uint8Array)),r},fromPartial(e){var r,n,i,o,l,u,d,c,p,f;let h=v();return void 0!==e.version&&null!==e.version&&(h.version=a.Consensus.fromPartial(e.version)),h.chainId=null!==(r=e.chainId)&&void 0!==r?r:"",void 0!==e.height&&null!==e.height&&(h.height=BigInt(e.height.toString())),void 0!==e.time&&null!==e.time&&(h.time=s.Timestamp.fromPartial(e.time)),void 0!==e.lastBlockId&&null!==e.lastBlockId&&(h.lastBlockId=t.BlockID.fromPartial(e.lastBlockId)),h.lastCommitHash=null!==(n=e.lastCommitHash)&&void 0!==n?n:new Uint8Array,h.dataHash=null!==(i=e.dataHash)&&void 0!==i?i:new Uint8Array,h.validatorsHash=null!==(o=e.validatorsHash)&&void 0!==o?o:new Uint8Array,h.nextValidatorsHash=null!==(l=e.nextValidatorsHash)&&void 0!==l?l:new Uint8Array,h.consensusHash=null!==(u=e.consensusHash)&&void 0!==u?u:new Uint8Array,h.appHash=null!==(d=e.appHash)&&void 0!==d?d:new Uint8Array,h.lastResultsHash=null!==(c=e.lastResultsHash)&&void 0!==c?c:new Uint8Array,h.evidenceHash=null!==(p=e.evidenceHash)&&void 0!==p?p:new Uint8Array,h.proposerAddress=null!==(f=e.proposerAddress)&&void 0!==f?f:new Uint8Array,h}},t.Data={typeUrl:"/tendermint.types.Data",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.BinaryWriter.create();for(let r of e.txs)t.uint32(10).bytes(r);return t},decode(e,t){let r=e instanceof u.BinaryReader?e:new u.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=b();for(;r.pos>>3==1?i.txs.push(r.bytes()):r.skipType(7&e)}return i},fromJSON(e){let t=b();return Array.isArray(null==e?void 0:e.txs)&&(t.txs=e.txs.map(e=>(0,d.bytesFromBase64)(e))),t},toJSON(e){let t={};return e.txs?t.txs=e.txs.map(e=>(0,d.base64FromBytes)(void 0!==e?e:new Uint8Array)):t.txs=[],t},fromPartial(e){var t;let r=b();return r.txs=(null===(t=e.txs)||void 0===t?void 0:t.map(e=>e))||[],r}},t.Vote={typeUrl:"/tendermint.types.Vote",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.BinaryWriter.create();return 0!==e.type&&r.uint32(8).int32(e.type),e.height!==BigInt(0)&&r.uint32(16).int64(e.height),0!==e.round&&r.uint32(24).int32(e.round),void 0!==e.blockId&&t.BlockID.encode(e.blockId,r.uint32(34).fork()).ldelim(),void 0!==e.timestamp&&s.Timestamp.encode(e.timestamp,r.uint32(42).fork()).ldelim(),0!==e.validatorAddress.length&&r.uint32(50).bytes(e.validatorAddress),0!==e.validatorIndex&&r.uint32(56).int32(e.validatorIndex),0!==e.signature.length&&r.uint32(66).bytes(e.signature),r},decode(e,r){let n=e instanceof u.BinaryReader?e:new u.BinaryReader(e),i=void 0===r?n.len:n.pos+r,o=S();for(;n.pos>>3){case 1:o.type=n.int32();break;case 2:o.height=n.int64();break;case 3:o.round=n.int32();break;case 4:o.blockId=t.BlockID.decode(n,n.uint32());break;case 5:o.timestamp=s.Timestamp.decode(n,n.uint32());break;case 6:o.validatorAddress=n.bytes();break;case 7:o.validatorIndex=n.int32();break;case 8:o.signature=n.bytes();break;default:n.skipType(7&e)}}return o},fromJSON(e){let r=S();return(0,d.isSet)(e.type)&&(r.type=f(e.type)),(0,d.isSet)(e.height)&&(r.height=BigInt(e.height.toString())),(0,d.isSet)(e.round)&&(r.round=Number(e.round)),(0,d.isSet)(e.blockId)&&(r.blockId=t.BlockID.fromJSON(e.blockId)),(0,d.isSet)(e.timestamp)&&(r.timestamp=(0,d.fromJsonTimestamp)(e.timestamp)),(0,d.isSet)(e.validatorAddress)&&(r.validatorAddress=(0,d.bytesFromBase64)(e.validatorAddress)),(0,d.isSet)(e.validatorIndex)&&(r.validatorIndex=Number(e.validatorIndex)),(0,d.isSet)(e.signature)&&(r.signature=(0,d.bytesFromBase64)(e.signature)),r},toJSON(e){let r={};return void 0!==e.type&&(r.type=h(e.type)),void 0!==e.height&&(r.height=(e.height||BigInt(0)).toString()),void 0!==e.round&&(r.round=Math.round(e.round)),void 0!==e.blockId&&(r.blockId=e.blockId?t.BlockID.toJSON(e.blockId):void 0),void 0!==e.timestamp&&(r.timestamp=(0,d.fromTimestamp)(e.timestamp).toISOString()),void 0!==e.validatorAddress&&(r.validatorAddress=(0,d.base64FromBytes)(void 0!==e.validatorAddress?e.validatorAddress:new Uint8Array)),void 0!==e.validatorIndex&&(r.validatorIndex=Math.round(e.validatorIndex)),void 0!==e.signature&&(r.signature=(0,d.base64FromBytes)(void 0!==e.signature?e.signature:new Uint8Array)),r},fromPartial(e){var r,n,i,o,a;let l=S();return l.type=null!==(r=e.type)&&void 0!==r?r:0,void 0!==e.height&&null!==e.height&&(l.height=BigInt(e.height.toString())),l.round=null!==(n=e.round)&&void 0!==n?n:0,void 0!==e.blockId&&null!==e.blockId&&(l.blockId=t.BlockID.fromPartial(e.blockId)),void 0!==e.timestamp&&null!==e.timestamp&&(l.timestamp=s.Timestamp.fromPartial(e.timestamp)),l.validatorAddress=null!==(i=e.validatorAddress)&&void 0!==i?i:new Uint8Array,l.validatorIndex=null!==(o=e.validatorIndex)&&void 0!==o?o:0,l.signature=null!==(a=e.signature)&&void 0!==a?a:new Uint8Array,l}},t.Commit={typeUrl:"/tendermint.types.Commit",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.BinaryWriter.create();for(let n of(e.height!==BigInt(0)&&r.uint32(8).int64(e.height),0!==e.round&&r.uint32(16).int32(e.round),void 0!==e.blockId&&t.BlockID.encode(e.blockId,r.uint32(26).fork()).ldelim(),e.signatures))t.CommitSig.encode(n,r.uint32(34).fork()).ldelim();return r},decode(e,r){let n=e instanceof u.BinaryReader?e:new u.BinaryReader(e),i=void 0===r?n.len:n.pos+r,o=w();for(;n.pos>>3){case 1:o.height=n.int64();break;case 2:o.round=n.int32();break;case 3:o.blockId=t.BlockID.decode(n,n.uint32());break;case 4:o.signatures.push(t.CommitSig.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return o},fromJSON(e){let r=w();return(0,d.isSet)(e.height)&&(r.height=BigInt(e.height.toString())),(0,d.isSet)(e.round)&&(r.round=Number(e.round)),(0,d.isSet)(e.blockId)&&(r.blockId=t.BlockID.fromJSON(e.blockId)),Array.isArray(null==e?void 0:e.signatures)&&(r.signatures=e.signatures.map(e=>t.CommitSig.fromJSON(e))),r},toJSON(e){let r={};return void 0!==e.height&&(r.height=(e.height||BigInt(0)).toString()),void 0!==e.round&&(r.round=Math.round(e.round)),void 0!==e.blockId&&(r.blockId=e.blockId?t.BlockID.toJSON(e.blockId):void 0),e.signatures?r.signatures=e.signatures.map(e=>e?t.CommitSig.toJSON(e):void 0):r.signatures=[],r},fromPartial(e){var r,n;let i=w();return void 0!==e.height&&null!==e.height&&(i.height=BigInt(e.height.toString())),i.round=null!==(n=e.round)&&void 0!==n?n:0,void 0!==e.blockId&&null!==e.blockId&&(i.blockId=t.BlockID.fromPartial(e.blockId)),i.signatures=(null===(r=e.signatures)||void 0===r?void 0:r.map(e=>t.CommitSig.fromPartial(e)))||[],i}},t.CommitSig={typeUrl:"/tendermint.types.CommitSig",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.BinaryWriter.create();return 0!==e.blockIdFlag&&t.uint32(8).int32(e.blockIdFlag),0!==e.validatorAddress.length&&t.uint32(18).bytes(e.validatorAddress),void 0!==e.timestamp&&s.Timestamp.encode(e.timestamp,t.uint32(26).fork()).ldelim(),0!==e.signature.length&&t.uint32(34).bytes(e.signature),t},decode(e,t){let r=e instanceof u.BinaryReader?e:new u.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=_();for(;r.pos>>3){case 1:i.blockIdFlag=r.int32();break;case 2:i.validatorAddress=r.bytes();break;case 3:i.timestamp=s.Timestamp.decode(r,r.uint32());break;case 4:i.signature=r.bytes();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=_();return(0,d.isSet)(e.blockIdFlag)&&(t.blockIdFlag=c(e.blockIdFlag)),(0,d.isSet)(e.validatorAddress)&&(t.validatorAddress=(0,d.bytesFromBase64)(e.validatorAddress)),(0,d.isSet)(e.timestamp)&&(t.timestamp=(0,d.fromJsonTimestamp)(e.timestamp)),(0,d.isSet)(e.signature)&&(t.signature=(0,d.bytesFromBase64)(e.signature)),t},toJSON(e){let t={};return void 0!==e.blockIdFlag&&(t.blockIdFlag=p(e.blockIdFlag)),void 0!==e.validatorAddress&&(t.validatorAddress=(0,d.base64FromBytes)(void 0!==e.validatorAddress?e.validatorAddress:new Uint8Array)),void 0!==e.timestamp&&(t.timestamp=(0,d.fromTimestamp)(e.timestamp).toISOString()),void 0!==e.signature&&(t.signature=(0,d.base64FromBytes)(void 0!==e.signature?e.signature:new Uint8Array)),t},fromPartial(e){var t,r,n;let i=_();return i.blockIdFlag=null!==(t=e.blockIdFlag)&&void 0!==t?t:0,i.validatorAddress=null!==(r=e.validatorAddress)&&void 0!==r?r:new Uint8Array,void 0!==e.timestamp&&null!==e.timestamp&&(i.timestamp=s.Timestamp.fromPartial(e.timestamp)),i.signature=null!==(n=e.signature)&&void 0!==n?n:new Uint8Array,i}},t.Proposal={typeUrl:"/tendermint.types.Proposal",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.BinaryWriter.create();return 0!==e.type&&r.uint32(8).int32(e.type),e.height!==BigInt(0)&&r.uint32(16).int64(e.height),0!==e.round&&r.uint32(24).int32(e.round),0!==e.polRound&&r.uint32(32).int32(e.polRound),void 0!==e.blockId&&t.BlockID.encode(e.blockId,r.uint32(42).fork()).ldelim(),void 0!==e.timestamp&&s.Timestamp.encode(e.timestamp,r.uint32(50).fork()).ldelim(),0!==e.signature.length&&r.uint32(58).bytes(e.signature),r},decode(e,r){let n=e instanceof u.BinaryReader?e:new u.BinaryReader(e),i=void 0===r?n.len:n.pos+r,o=k();for(;n.pos>>3){case 1:o.type=n.int32();break;case 2:o.height=n.int64();break;case 3:o.round=n.int32();break;case 4:o.polRound=n.int32();break;case 5:o.blockId=t.BlockID.decode(n,n.uint32());break;case 6:o.timestamp=s.Timestamp.decode(n,n.uint32());break;case 7:o.signature=n.bytes();break;default:n.skipType(7&e)}}return o},fromJSON(e){let r=k();return(0,d.isSet)(e.type)&&(r.type=f(e.type)),(0,d.isSet)(e.height)&&(r.height=BigInt(e.height.toString())),(0,d.isSet)(e.round)&&(r.round=Number(e.round)),(0,d.isSet)(e.polRound)&&(r.polRound=Number(e.polRound)),(0,d.isSet)(e.blockId)&&(r.blockId=t.BlockID.fromJSON(e.blockId)),(0,d.isSet)(e.timestamp)&&(r.timestamp=(0,d.fromJsonTimestamp)(e.timestamp)),(0,d.isSet)(e.signature)&&(r.signature=(0,d.bytesFromBase64)(e.signature)),r},toJSON(e){let r={};return void 0!==e.type&&(r.type=h(e.type)),void 0!==e.height&&(r.height=(e.height||BigInt(0)).toString()),void 0!==e.round&&(r.round=Math.round(e.round)),void 0!==e.polRound&&(r.polRound=Math.round(e.polRound)),void 0!==e.blockId&&(r.blockId=e.blockId?t.BlockID.toJSON(e.blockId):void 0),void 0!==e.timestamp&&(r.timestamp=(0,d.fromTimestamp)(e.timestamp).toISOString()),void 0!==e.signature&&(r.signature=(0,d.base64FromBytes)(void 0!==e.signature?e.signature:new Uint8Array)),r},fromPartial(e){var r,n,i,o;let a=k();return a.type=null!==(r=e.type)&&void 0!==r?r:0,void 0!==e.height&&null!==e.height&&(a.height=BigInt(e.height.toString())),a.round=null!==(n=e.round)&&void 0!==n?n:0,a.polRound=null!==(i=e.polRound)&&void 0!==i?i:0,void 0!==e.blockId&&null!==e.blockId&&(a.blockId=t.BlockID.fromPartial(e.blockId)),void 0!==e.timestamp&&null!==e.timestamp&&(a.timestamp=s.Timestamp.fromPartial(e.timestamp)),a.signature=null!==(o=e.signature)&&void 0!==o?o:new Uint8Array,a}},t.SignedHeader={typeUrl:"/tendermint.types.SignedHeader",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.BinaryWriter.create();return void 0!==e.header&&t.Header.encode(e.header,r.uint32(10).fork()).ldelim(),void 0!==e.commit&&t.Commit.encode(e.commit,r.uint32(18).fork()).ldelim(),r},decode(e,r){let n=e instanceof u.BinaryReader?e:new u.BinaryReader(e),i=void 0===r?n.len:n.pos+r,o=O();for(;n.pos>>3){case 1:o.header=t.Header.decode(n,n.uint32());break;case 2:o.commit=t.Commit.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){let r=O();return(0,d.isSet)(e.header)&&(r.header=t.Header.fromJSON(e.header)),(0,d.isSet)(e.commit)&&(r.commit=t.Commit.fromJSON(e.commit)),r},toJSON(e){let r={};return void 0!==e.header&&(r.header=e.header?t.Header.toJSON(e.header):void 0),void 0!==e.commit&&(r.commit=e.commit?t.Commit.toJSON(e.commit):void 0),r},fromPartial(e){let r=O();return void 0!==e.header&&null!==e.header&&(r.header=t.Header.fromPartial(e.header)),void 0!==e.commit&&null!==e.commit&&(r.commit=t.Commit.fromPartial(e.commit)),r}},t.LightBlock={typeUrl:"/tendermint.types.LightBlock",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.BinaryWriter.create();return void 0!==e.signedHeader&&t.SignedHeader.encode(e.signedHeader,r.uint32(10).fork()).ldelim(),void 0!==e.validatorSet&&l.ValidatorSet.encode(e.validatorSet,r.uint32(18).fork()).ldelim(),r},decode(e,r){let n=e instanceof u.BinaryReader?e:new u.BinaryReader(e),i=void 0===r?n.len:n.pos+r,o=P();for(;n.pos>>3){case 1:o.signedHeader=t.SignedHeader.decode(n,n.uint32());break;case 2:o.validatorSet=l.ValidatorSet.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){let r=P();return(0,d.isSet)(e.signedHeader)&&(r.signedHeader=t.SignedHeader.fromJSON(e.signedHeader)),(0,d.isSet)(e.validatorSet)&&(r.validatorSet=l.ValidatorSet.fromJSON(e.validatorSet)),r},toJSON(e){let r={};return void 0!==e.signedHeader&&(r.signedHeader=e.signedHeader?t.SignedHeader.toJSON(e.signedHeader):void 0),void 0!==e.validatorSet&&(r.validatorSet=e.validatorSet?l.ValidatorSet.toJSON(e.validatorSet):void 0),r},fromPartial(e){let r=P();return void 0!==e.signedHeader&&null!==e.signedHeader&&(r.signedHeader=t.SignedHeader.fromPartial(e.signedHeader)),void 0!==e.validatorSet&&null!==e.validatorSet&&(r.validatorSet=l.ValidatorSet.fromPartial(e.validatorSet)),r}},t.BlockMeta={typeUrl:"/tendermint.types.BlockMeta",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.BinaryWriter.create();return void 0!==e.blockId&&t.BlockID.encode(e.blockId,r.uint32(10).fork()).ldelim(),e.blockSize!==BigInt(0)&&r.uint32(16).int64(e.blockSize),void 0!==e.header&&t.Header.encode(e.header,r.uint32(26).fork()).ldelim(),e.numTxs!==BigInt(0)&&r.uint32(32).int64(e.numTxs),r},decode(e,r){let n=e instanceof u.BinaryReader?e:new u.BinaryReader(e),i=void 0===r?n.len:n.pos+r,o=A();for(;n.pos>>3){case 1:o.blockId=t.BlockID.decode(n,n.uint32());break;case 2:o.blockSize=n.int64();break;case 3:o.header=t.Header.decode(n,n.uint32());break;case 4:o.numTxs=n.int64();break;default:n.skipType(7&e)}}return o},fromJSON(e){let r=A();return(0,d.isSet)(e.blockId)&&(r.blockId=t.BlockID.fromJSON(e.blockId)),(0,d.isSet)(e.blockSize)&&(r.blockSize=BigInt(e.blockSize.toString())),(0,d.isSet)(e.header)&&(r.header=t.Header.fromJSON(e.header)),(0,d.isSet)(e.numTxs)&&(r.numTxs=BigInt(e.numTxs.toString())),r},toJSON(e){let r={};return void 0!==e.blockId&&(r.blockId=e.blockId?t.BlockID.toJSON(e.blockId):void 0),void 0!==e.blockSize&&(r.blockSize=(e.blockSize||BigInt(0)).toString()),void 0!==e.header&&(r.header=e.header?t.Header.toJSON(e.header):void 0),void 0!==e.numTxs&&(r.numTxs=(e.numTxs||BigInt(0)).toString()),r},fromPartial(e){let r=A();return void 0!==e.blockId&&null!==e.blockId&&(r.blockId=t.BlockID.fromPartial(e.blockId)),void 0!==e.blockSize&&null!==e.blockSize&&(r.blockSize=BigInt(e.blockSize.toString())),void 0!==e.header&&null!==e.header&&(r.header=t.Header.fromPartial(e.header)),void 0!==e.numTxs&&null!==e.numTxs&&(r.numTxs=BigInt(e.numTxs.toString())),r}},t.TxProof={typeUrl:"/tendermint.types.TxProof",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.BinaryWriter.create();return 0!==e.rootHash.length&&t.uint32(10).bytes(e.rootHash),0!==e.data.length&&t.uint32(18).bytes(e.data),void 0!==e.proof&&o.Proof.encode(e.proof,t.uint32(26).fork()).ldelim(),t},decode(e,t){let r=e instanceof u.BinaryReader?e:new u.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=I();for(;r.pos>>3){case 1:i.rootHash=r.bytes();break;case 2:i.data=r.bytes();break;case 3:i.proof=o.Proof.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=I();return(0,d.isSet)(e.rootHash)&&(t.rootHash=(0,d.bytesFromBase64)(e.rootHash)),(0,d.isSet)(e.data)&&(t.data=(0,d.bytesFromBase64)(e.data)),(0,d.isSet)(e.proof)&&(t.proof=o.Proof.fromJSON(e.proof)),t},toJSON(e){let t={};return void 0!==e.rootHash&&(t.rootHash=(0,d.base64FromBytes)(void 0!==e.rootHash?e.rootHash:new Uint8Array)),void 0!==e.data&&(t.data=(0,d.base64FromBytes)(void 0!==e.data?e.data:new Uint8Array)),void 0!==e.proof&&(t.proof=e.proof?o.Proof.toJSON(e.proof):void 0),t},fromPartial(e){var t,r;let n=I();return n.rootHash=null!==(t=e.rootHash)&&void 0!==t?t:new Uint8Array,n.data=null!==(r=e.data)&&void 0!==r?r:new Uint8Array,void 0!==e.proof&&null!==e.proof&&(n.proof=o.Proof.fromPartial(e.proof)),n}}},83292:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SimpleValidator=t.Validator=t.ValidatorSet=t.protobufPackage=void 0;let n=r(29598),i=r(46554),o=r(99133);function a(){return{validators:[],proposer:void 0,totalVotingPower:BigInt(0)}}function s(){return{address:new Uint8Array,pubKey:n.PublicKey.fromPartial({}),votingPower:BigInt(0),proposerPriority:BigInt(0)}}function l(){return{pubKey:void 0,votingPower:BigInt(0)}}t.protobufPackage="tendermint.types",t.ValidatorSet={typeUrl:"/tendermint.types.ValidatorSet",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();for(let n of e.validators)t.Validator.encode(n,r.uint32(10).fork()).ldelim();return void 0!==e.proposer&&t.Validator.encode(e.proposer,r.uint32(18).fork()).ldelim(),e.totalVotingPower!==BigInt(0)&&r.uint32(24).int64(e.totalVotingPower),r},decode(e,r){let n=e instanceof i.BinaryReader?e:new i.BinaryReader(e),o=void 0===r?n.len:n.pos+r,s=a();for(;n.pos>>3){case 1:s.validators.push(t.Validator.decode(n,n.uint32()));break;case 2:s.proposer=t.Validator.decode(n,n.uint32());break;case 3:s.totalVotingPower=n.int64();break;default:n.skipType(7&e)}}return s},fromJSON(e){let r=a();return Array.isArray(null==e?void 0:e.validators)&&(r.validators=e.validators.map(e=>t.Validator.fromJSON(e))),(0,o.isSet)(e.proposer)&&(r.proposer=t.Validator.fromJSON(e.proposer)),(0,o.isSet)(e.totalVotingPower)&&(r.totalVotingPower=BigInt(e.totalVotingPower.toString())),r},toJSON(e){let r={};return e.validators?r.validators=e.validators.map(e=>e?t.Validator.toJSON(e):void 0):r.validators=[],void 0!==e.proposer&&(r.proposer=e.proposer?t.Validator.toJSON(e.proposer):void 0),void 0!==e.totalVotingPower&&(r.totalVotingPower=(e.totalVotingPower||BigInt(0)).toString()),r},fromPartial(e){var r;let n=a();return n.validators=(null===(r=e.validators)||void 0===r?void 0:r.map(e=>t.Validator.fromPartial(e)))||[],void 0!==e.proposer&&null!==e.proposer&&(n.proposer=t.Validator.fromPartial(e.proposer)),void 0!==e.totalVotingPower&&null!==e.totalVotingPower&&(n.totalVotingPower=BigInt(e.totalVotingPower.toString())),n}},t.Validator={typeUrl:"/tendermint.types.Validator",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();return 0!==e.address.length&&t.uint32(10).bytes(e.address),void 0!==e.pubKey&&n.PublicKey.encode(e.pubKey,t.uint32(18).fork()).ldelim(),e.votingPower!==BigInt(0)&&t.uint32(24).int64(e.votingPower),e.proposerPriority!==BigInt(0)&&t.uint32(32).int64(e.proposerPriority),t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),o=void 0===t?r.len:r.pos+t,a=s();for(;r.pos>>3){case 1:a.address=r.bytes();break;case 2:a.pubKey=n.PublicKey.decode(r,r.uint32());break;case 3:a.votingPower=r.int64();break;case 4:a.proposerPriority=r.int64();break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=s();return(0,o.isSet)(e.address)&&(t.address=(0,o.bytesFromBase64)(e.address)),(0,o.isSet)(e.pubKey)&&(t.pubKey=n.PublicKey.fromJSON(e.pubKey)),(0,o.isSet)(e.votingPower)&&(t.votingPower=BigInt(e.votingPower.toString())),(0,o.isSet)(e.proposerPriority)&&(t.proposerPriority=BigInt(e.proposerPriority.toString())),t},toJSON(e){let t={};return void 0!==e.address&&(t.address=(0,o.base64FromBytes)(void 0!==e.address?e.address:new Uint8Array)),void 0!==e.pubKey&&(t.pubKey=e.pubKey?n.PublicKey.toJSON(e.pubKey):void 0),void 0!==e.votingPower&&(t.votingPower=(e.votingPower||BigInt(0)).toString()),void 0!==e.proposerPriority&&(t.proposerPriority=(e.proposerPriority||BigInt(0)).toString()),t},fromPartial(e){var t;let r=s();return r.address=null!==(t=e.address)&&void 0!==t?t:new Uint8Array,void 0!==e.pubKey&&null!==e.pubKey&&(r.pubKey=n.PublicKey.fromPartial(e.pubKey)),void 0!==e.votingPower&&null!==e.votingPower&&(r.votingPower=BigInt(e.votingPower.toString())),void 0!==e.proposerPriority&&null!==e.proposerPriority&&(r.proposerPriority=BigInt(e.proposerPriority.toString())),r}},t.SimpleValidator={typeUrl:"/tendermint.types.SimpleValidator",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();return void 0!==e.pubKey&&n.PublicKey.encode(e.pubKey,t.uint32(10).fork()).ldelim(),e.votingPower!==BigInt(0)&&t.uint32(16).int64(e.votingPower),t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),o=void 0===t?r.len:r.pos+t,a=l();for(;r.pos>>3){case 1:a.pubKey=n.PublicKey.decode(r,r.uint32());break;case 2:a.votingPower=r.int64();break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=l();return(0,o.isSet)(e.pubKey)&&(t.pubKey=n.PublicKey.fromJSON(e.pubKey)),(0,o.isSet)(e.votingPower)&&(t.votingPower=BigInt(e.votingPower.toString())),t},toJSON(e){let t={};return void 0!==e.pubKey&&(t.pubKey=e.pubKey?n.PublicKey.toJSON(e.pubKey):void 0),void 0!==e.votingPower&&(t.votingPower=(e.votingPower||BigInt(0)).toString()),t},fromPartial(e){let t=l();return void 0!==e.pubKey&&null!==e.pubKey&&(t.pubKey=n.PublicKey.fromPartial(e.pubKey)),void 0!==e.votingPower&&null!==e.votingPower&&(t.votingPower=BigInt(e.votingPower.toString())),t}}},76426:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Consensus=t.App=t.protobufPackage=void 0;let n=r(46554),i=r(99133);function o(){return{protocol:BigInt(0),software:""}}function a(){return{block:BigInt(0),app:BigInt(0)}}t.protobufPackage="tendermint.version",t.App={typeUrl:"/tendermint.version.App",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.BinaryWriter.create();return e.protocol!==BigInt(0)&&t.uint32(8).uint64(e.protocol),""!==e.software&&t.uint32(18).string(e.software),t},decode(e,t){let r=e instanceof n.BinaryReader?e:new n.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=o();for(;r.pos>>3){case 1:a.protocol=r.uint64();break;case 2:a.software=r.string();break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=o();return(0,i.isSet)(e.protocol)&&(t.protocol=BigInt(e.protocol.toString())),(0,i.isSet)(e.software)&&(t.software=String(e.software)),t},toJSON(e){let t={};return void 0!==e.protocol&&(t.protocol=(e.protocol||BigInt(0)).toString()),void 0!==e.software&&(t.software=e.software),t},fromPartial(e){var t;let r=o();return void 0!==e.protocol&&null!==e.protocol&&(r.protocol=BigInt(e.protocol.toString())),r.software=null!==(t=e.software)&&void 0!==t?t:"",r}},t.Consensus={typeUrl:"/tendermint.version.Consensus",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.BinaryWriter.create();return e.block!==BigInt(0)&&t.uint32(8).uint64(e.block),e.app!==BigInt(0)&&t.uint32(16).uint64(e.app),t},decode(e,t){let r=e instanceof n.BinaryReader?e:new n.BinaryReader(e),i=void 0===t?r.len:r.pos+t,o=a();for(;r.pos>>3){case 1:o.block=r.uint64();break;case 2:o.app=r.uint64();break;default:r.skipType(7&e)}}return o},fromJSON(e){let t=a();return(0,i.isSet)(e.block)&&(t.block=BigInt(e.block.toString())),(0,i.isSet)(e.app)&&(t.app=BigInt(e.app.toString())),t},toJSON(e){let t={};return void 0!==e.block&&(t.block=(e.block||BigInt(0)).toString()),void 0!==e.app&&(t.app=(e.app||BigInt(0)).toString()),t},fromPartial(e){let t=a();return void 0!==e.block&&null!==e.block&&(t.block=BigInt(e.block.toString())),void 0!==e.app&&null!==e.app&&(t.app=BigInt(e.app.toString())),t}}},41804:function(e,t){"use strict";function r(e){let t=0,r=0;for(let n=0;n191&&a<224?n[o++]=(31&a)<<6|63&e[t++]:a>239&&a<365?(a=((7&a)<<18|(63&e[t++])<<12|(63&e[t++])<<6|63&e[t++])-65536,n[o++]=55296+(a>>10),n[o++]=56320+(1023&a)):n[o++]=(15&a)<<12|(63&e[t++])<<6|63&e[t++],o>8191&&((i||(i=[])).push(String.fromCharCode(...n)),o=0);return i?(o&&i.push(String.fromCharCode(...n.slice(0,o))),i.join("")):String.fromCharCode(...n.slice(0,o))}function i(e,t,r){let n,i;let o=r;for(let o=0;o>6|192:((64512&n)==55296&&(64512&(i=e.charCodeAt(o+1)))==56320?(n=65536+((1023&n)<<10)+(1023&i),++o,t[r++]=n>>18|240,t[r++]=n>>12&63|128):t[r++]=n>>12|224,t[r++]=n>>6&63|128),t[r++]=63&n|128);return r-o}Object.defineProperty(t,"__esModule",{value:!0}),t.utf8Write=t.utf8Read=t.utf8Length=void 0,t.utf8Length=r,t.utf8Read=n,t.utf8Write=i},15344:function(e,t){"use strict";function r(){let e=0,t=0;for(let r=0;r<28;r+=7){let n=this.buf[this.pos++];if(e|=(127&n)<>4,(128&r)==0)return this.assertBounds(),[e,t];for(let r=3;r<=31;r+=7){let n=this.buf[this.pos++];if(t|=(127&n)<>>n,o=!(i>>>7==0&&0==t),a=(o?128|i:i)&255;if(r.push(a),!o)return}let n=e>>>28&15|(7&t)<<4,i=t>>3!=0;if(r.push((i?128|n:n)&255),i){for(let e=3;e<31;e+=7){let n=t>>>e,i=n>>>7!=0,o=(i?128|n:n)&255;if(r.push(o),!i)return}r.push(t>>>31&1)}}Object.defineProperty(t,"__esModule",{value:!0}),t.writeByte=t.writeFixed32=t.int64Length=t.writeVarint64=t.writeVarint32=t.readInt32=t.readUInt32=t.zzDecode=t.zzEncode=t.varint32read=t.varint32write=t.uInt64ToString=t.int64ToString=t.int64FromString=t.varint64write=t.varint64read=void 0,t.varint64read=r,t.varint64write=n;let i=4294967296;function o(e){let t="-"===e[0];t&&(e=e.slice(1));let r=1e6,n=0,o=0;function a(t,a){let s=Number(e.slice(t,a));o*=r,(n=n*r+s)>=i&&(o+=n/i|0,n%=i)}return a(-24,-18),a(-18,-12),a(-12,-6),a(-6),t?d(n,o):u(n,o)}function a(e,t){let r=u(e,t),n=2147483648&r.hi;n&&(r=d(r.lo,r.hi));let i=s(r.lo,r.hi);return n?"-"+i:i}function s(e,t){if({lo:e,hi:t}=l(e,t),t<=2097151)return String(i*t+e);let r=16777215&e,n=(e>>>24|t<<8)&16777215,o=t>>16&65535,a=r+6777216*n+6710656*o,s=n+8147497*o,u=2*o,d=1e7;return a>=1e7&&(s+=Math.floor(a/d),a%=d),s>=d&&(u+=Math.floor(s/d),s%=d),u.toString()+c(s)+c(a)}function l(e,t){return{lo:e>>>0,hi:t>>>0}}function u(e,t){return{lo:0|e,hi:0|t}}function d(e,t){return t=~t,e?e=~e+1:t+=1,u(e,t)}t.int64FromString=o,t.int64ToString=a,t.uInt64ToString=s;let c=e=>{let t=String(e);return"0000000".slice(t.length)+t};function p(e,t){if(e>=0){for(;e>127;)t.push(127&e|128),e>>>=7;t.push(e)}else{for(let r=0;r<9;r++)t.push(127&e|128),e>>=7;t.push(1)}}function f(){let e=this.buf[this.pos++],t=127&e;if((128&e)==0||(t|=(127&(e=this.buf[this.pos++]))<<7,(128&e)==0)||(t|=(127&(e=this.buf[this.pos++]))<<14,(128&e)==0)||(t|=(127&(e=this.buf[this.pos++]))<<21,(128&e)==0))return this.assertBounds(),t;t|=(15&(e=this.buf[this.pos++]))<<28;for(let t=5;(128&e)!=0&&t<10;t++)e=this.buf[this.pos++];if((128&e)!=0)throw Error("invalid varint");return this.assertBounds(),t>>>0}function h(e,t){let r=t>>31;return t=((t<<1|e>>>31)^r)>>>0,[e=(e<<1^r)>>>0,t]}function g(e,t){let r=-(1&e);return[e=((e>>>1|t<<31)^r)>>>0,t=(t>>>1^r)>>>0]}function m(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+16777216*e[t+3]}function y(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+(e[t+3]<<24)}function v(e,t,r){for(;e>127;)t[r++]=127&e|128,e>>>=7;t[r]=e}function b(e,t,r){for(;e.hi;)t[r++]=127&e.lo|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[r++]=127&e.lo|128,e.lo=e.lo>>>7;t[r++]=e.lo}function S(e,t){let r=e,n=(e>>>28|t<<4)>>>0,i=t>>>24;return 0===i?0===n?r<16384?r<128?1:2:r<2097152?3:4:n<16384?n<128?5:6:n<2097152?7:8:i<128?9:10}function w(e,t,r){t[r]=255&e,t[r+1]=e>>>8&255,t[r+2]=e>>>16&255,t[r+3]=e>>>24}function _(e,t,r){t[r]=255&e}t.varint32write=p,t.varint32read=f,t.zzEncode=h,t.zzDecode=g,t.readUInt32=m,t.readInt32=y,t.writeVarint32=v,t.writeVarint64=b,t.int64Length=S,t.writeFixed32=w,t.writeByte=_},85191:function(e,t,r){"use strict";var n=r(39541),i=r(67957),o=r(97834),a=r(90414),s=r(73842);function l(e){s.call(this,"digest"),this._hash=e}n(l,s),l.prototype._update=function(e){this._hash.update(e)},l.prototype._final=function(){return this._hash.digest()},e.exports=function(e){return"md5"===(e=e.toLowerCase())?new i:"rmd160"===e||"ripemd160"===e?new o:new l(a(e))}},31120:function(e,t,r){"use strict";var n=r(67957);e.exports=function(e){return new n().update(e).digest()}},42716:function(e,t,r){"use strict";var n=r(39541),i=r(8519),o=r(73842),a=r(47226).Buffer,s=r(31120),l=r(97834),u=r(90414),d=a.alloc(128);function c(e,t){o.call(this,"digest"),"string"==typeof t&&(t=a.from(t));var r="sha512"===e||"sha384"===e?128:64;this._alg=e,this._key=t,t.length>r?t=("rmd160"===e?new l:u(e)).update(t).digest():t.lengths?t=e(t):t.length>>8^255&h^99,i[r]=h,o[h]=r;var g=e[r],m=e[g],y=e[m],v=257*e[h]^16843008*h;a[r]=v<<24|v>>>8,s[r]=v<<16|v>>>16,l[r]=v<<8|v>>>24,u[r]=v;var v=16843009*y^65537*m^257*g^16843008*r;d[h]=v<<24|v>>>8,c[h]=v<<16|v>>>16,p[h]=v<<8|v>>>24,f[h]=v,r?(r=g^e[e[e[y^g]]],n^=e[e[n]]):r=n=1}}();var h=[0,1,2,4,8,16,32,64,128,27,54],g=n.AES=r.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e,t=this._keyPriorReset=this._key,r=t.words,n=t.sigBytes/4,o=((this._nRounds=n+6)+1)*4,a=this._keySchedule=[],s=0;s6&&s%n==4&&(e=i[e>>>24]<<24|i[e>>>16&255]<<16|i[e>>>8&255]<<8|i[255&e]):e=(i[(e=e<<8|e>>>24)>>>24]<<24|i[e>>>16&255]<<16|i[e>>>8&255]<<8|i[255&e])^h[s/n|0]<<24,a[s]=a[s-n]^e);for(var l=this._invKeySchedule=[],u=0;u>>24]]^c[i[e>>>16&255]]^p[i[e>>>8&255]]^f[i[255&e]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,a,s,l,u,i)},decryptBlock:function(e,t){var r=e[t+1];e[t+1]=e[t+3],e[t+3]=r,this._doCryptBlock(e,t,this._invKeySchedule,d,c,p,f,o);var r=e[t+1];e[t+1]=e[t+3],e[t+3]=r},_doCryptBlock:function(e,t,r,n,i,o,a,s){for(var l=this._nRounds,u=e[t]^r[0],d=e[t+1]^r[1],c=e[t+2]^r[2],p=e[t+3]^r[3],f=4,h=1;h>>24]^i[d>>>16&255]^o[c>>>8&255]^a[255&p]^r[f++],m=n[d>>>24]^i[c>>>16&255]^o[p>>>8&255]^a[255&u]^r[f++],y=n[c>>>24]^i[p>>>16&255]^o[u>>>8&255]^a[255&d]^r[f++],v=n[p>>>24]^i[u>>>16&255]^o[d>>>8&255]^a[255&c]^r[f++];u=g,d=m,c=y,p=v}var g=(s[u>>>24]<<24|s[d>>>16&255]<<16|s[c>>>8&255]<<8|s[255&p])^r[f++],m=(s[d>>>24]<<24|s[c>>>16&255]<<16|s[p>>>8&255]<<8|s[255&u])^r[f++],y=(s[c>>>24]<<24|s[p>>>16&255]<<16|s[u>>>8&255]<<8|s[255&d])^r[f++],v=(s[p>>>24]<<24|s[u>>>16&255]<<16|s[d>>>8&255]<<8|s[255&c])^r[f++];e[t]=g,e[t+1]=m,e[t+2]=y,e[t+3]=v},keySize:8});t.AES=r._createHelper(g)}(),e.AES})},36909:function(e,t,r){"use strict";!function(n,i,o){e.exports=t=i(r(32646),r(7679),r(22236),r(82948),r(95989))}(0,function(e){return!function(){var t=e,r=t.lib.BlockCipher,n=t.algo;let i=16,o=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],a=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var s={pbox:[],sbox:[]};function l(e,t){let r=t>>24&255,n=t>>16&255,i=t>>8&255,o=255&t,a=e.sbox[0][r]+e.sbox[1][n];return a^=e.sbox[2][i],a+=e.sbox[3][o]}function u(e,t,r){let n,o=t,a=r;for(let t=0;t1;--t)o^=e.pbox[t],a=l(e,o)^a,n=o,o=a,a=n;return n=o,o=a,a=n^e.pbox[1],{left:o^=e.pbox[0],right:a}}function c(e,t,r){for(let t=0;t<4;t++){e.sbox[t]=[];for(let r=0;r<256;r++)e.sbox[t][r]=a[t][r]}let n=0;for(let a=0;a=r&&(n=0);let s=0,l=0,d=0;for(let t=0;t>>2];e.sigBytes-=t}};r.BlockCipher=u.extend({cfg:u.cfg.extend({mode:p,padding:f}),reset:function(){u.reset.call(this);var e,t=this.cfg,r=t.iv,n=t.mode;this._xformMode==this._ENC_XFORM_MODE?e=n.createEncryptor:(e=n.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==e?this._mode.init(this,r&&r.words):(this._mode=e.call(n,this,r&&r.words),this._mode.__creator=e)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e,t=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(t.pad(this._data,this.blockSize),e=this._process(!0)):(e=this._process(!0),t.unpad(e)),e},blockSize:4});var h=r.CipherParams=n.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),g=(t.format={}).OpenSSL={stringify:function(e){var t,r=e.ciphertext,n=e.salt;return(t=n?i.create([1398893684,1701076831]).concat(n).concat(r):r).toString(s)},parse:function(e){var t,r=s.parse(e),n=r.words;return 1398893684==n[0]&&1701076831==n[1]&&(t=i.create(n.slice(2,4)),n.splice(0,4),r.sigBytes-=16),h.create({ciphertext:r,salt:t})}},m=r.SerializableCipher=n.extend({cfg:n.extend({format:g}),encrypt:function(e,t,r,n){n=this.cfg.extend(n);var i=e.createEncryptor(r,n),o=i.finalize(t),a=i.cfg;return h.create({ciphertext:o,key:r,iv:a.iv,algorithm:e,mode:a.mode,padding:a.padding,blockSize:e.blockSize,formatter:n.format})},decrypt:function(e,t,r,n){return n=this.cfg.extend(n),t=this._parse(t,n.format),e.createDecryptor(r,n).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),y=(t.kdf={}).OpenSSL={execute:function(e,t,r,n,o){if(n||(n=i.random(8)),o)var a=l.create({keySize:t+r,hasher:o}).compute(e,n);else var a=l.create({keySize:t+r}).compute(e,n);var s=i.create(a.words.slice(t),4*r);return a.sigBytes=4*t,h.create({key:a,iv:s,salt:n})}},v=r.PasswordBasedCipher=m.extend({cfg:m.cfg.extend({kdf:y}),encrypt:function(e,t,r,n){var i=(n=this.cfg.extend(n)).kdf.execute(r,e.keySize,e.ivSize,n.salt,n.hasher);n.iv=i.iv;var o=m.encrypt.call(this,e,t,i.key,n);return o.mixIn(i),o},decrypt:function(e,t,r,n){n=this.cfg.extend(n),t=this._parse(t,n.format);var i=n.kdf.execute(r,e.keySize,e.ivSize,t.salt,n.hasher);return n.iv=i.iv,m.decrypt.call(this,e,t,i.key,n)}})}()})},32646:function(e,t,r){"use strict";!function(r,n){e.exports=t=n()}(0,function(){var e=e||function(e,t){if(window.crypto&&(n=window.crypto),"undefined"!=typeof self&&self.crypto&&(n=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(n=globalThis.crypto),!n&&window.msCrypto&&(n=window.msCrypto),!n&&void 0!==r.g&&r.g.crypto&&(n=r.g.crypto),!n)try{n=r(42480)}catch(e){}var n,i=function(){if(n){if("function"==typeof n.getRandomValues)try{return n.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof n.randomBytes)try{return n.randomBytes(4).readInt32LE()}catch(e){}}throw Error("Native crypto module could not be used to get secure random number.")},o=Object.create||function(){function e(){}return function(t){var r;return e.prototype=t,r=new e,e.prototype=null,r}}(),a={},s=a.lib={},l=s.Base=function(){return{extend:function(e){var t=o(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),u=s.WordArray=l.extend({init:function(e,t){e=this.words=e||[],void 0!=t?this.sigBytes=t:this.sigBytes=4*e.length},toString:function(e){return(e||c).stringify(this)},concat:function(e){var t=this.words,r=e.words,n=this.sigBytes,i=e.sigBytes;if(this.clamp(),n%4)for(var o=0;o>>2]>>>24-o%4*8&255;t[n+o>>>2]|=a<<24-(n+o)%4*8}else for(var s=0;s>>2]=r[s>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,r=this.sigBytes;t[r>>>2]&=4294967295<<32-r%4*8,t.length=e.ceil(r/4)},clone:function(){var e=l.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],r=0;r>>2]>>>24-i%4*8&255;n.push((o>>>4).toString(16)),n.push((15&o).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;return new u.init(r,t/2)}},p=d.Latin1={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;i>>2]>>>24-i%4*8&255;n.push(String.fromCharCode(o))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n>>2]|=(255&e.charCodeAt(n))<<24-n%4*8;return new u.init(r,t)}},f=d.Utf8={stringify:function(e){try{return decodeURIComponent(escape(p.stringify(e)))}catch(e){throw Error("Malformed UTF-8 data")}},parse:function(e){return p.parse(unescape(encodeURIComponent(e)))}},h=s.BufferedBlockAlgorithm=l.extend({reset:function(){this._data=new u.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=f.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var r,n=this._data,i=n.words,o=n.sigBytes,a=this.blockSize,s=o/(4*a),l=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*a,d=e.min(4*l,o);if(l){for(var c=0;c>>6-a%4*2;i[o>>>2]|=s<<24-o%4*8,o++}return r.create(i,o)}t.enc.Base64={stringify:function(e){var t=e.words,r=e.sigBytes,n=this._map;e.clamp();for(var i=[],o=0;o>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,s=0;s<4&&o+.75*s>>6*(3-s)&63));var l=n.charAt(64);if(l)for(;i.length%4;)i.push(l);return i.join("")},parse:function(e){var t=e.length,r=this._map,i=this._reverseMap;if(!i){i=this._reverseMap=[];for(var o=0;o>>6-a%4*2;i[o>>>2]|=s<<24-o%4*8,o++}return r.create(i,o)}t.enc.Base64url={stringify:function(e,t){void 0===t&&(t=!0);var r=e.words,n=e.sigBytes,i=t?this._safe_map:this._map;e.clamp();for(var o=[],a=0;a>>2]>>>24-a%4*8&255)<<16|(r[a+1>>>2]>>>24-(a+1)%4*8&255)<<8|r[a+2>>>2]>>>24-(a+2)%4*8&255,l=0;l<4&&a+.75*l>>6*(3-l)&63));var u=i.charAt(64);if(u)for(;o.length%4;)o.push(u);return o.join("")},parse:function(e,t){void 0===t&&(t=!0);var r=e.length,i=t?this._safe_map:this._map,o=this._reverseMap;if(!o){o=this._reverseMap=[];for(var a=0;a>>8&16711935}n.Utf16=n.Utf16BE={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;i>>2]>>>16-i%4*8&65535;n.push(String.fromCharCode(o))}return n.join("")},parse:function(e){for(var t=e.length,n=[],i=0;i>>1]|=e.charCodeAt(i)<<16-i%2*16;return r.create(n,2*t)}},n.Utf16LE={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],o=0;o>>2]>>>16-o%4*8&65535);n.push(String.fromCharCode(a))}return n.join("")},parse:function(e){for(var t=e.length,n=[],o=0;o>>1]|=i(e.charCodeAt(o)<<16-o%2*16);return r.create(n,2*t)}}}(),e.enc.Utf16})},82948:function(e,t,r){"use strict";!function(n,i,o){e.exports=t=i(r(32646),r(68206),r(11450))}(0,function(e){return!function(){var t=e,r=t.lib,n=r.Base,i=r.WordArray,o=t.algo,a=o.MD5,s=o.EvpKDF=n.extend({cfg:n.extend({keySize:4,hasher:a,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var r,n=this.cfg,o=n.hasher.create(),a=i.create(),s=a.words,l=n.keySize,u=n.iterations;s.lengthi&&(t=e.finalize(t)),t.clamp();for(var o=this._oKey=t.clone(),a=this._iKey=t.clone(),s=o.words,l=a.words,u=0;u>>2]|=e[i]<<24-i%4*8;r.call(this,n,t)}else r.apply(this,arguments)}).prototype=t}}(),e.lib.WordArray})},22236:function(e,t,r){"use strict";!function(n,i){e.exports=t=i(r(32646))}(0,function(e){return!function(t){var r=e,n=r.lib,i=n.WordArray,o=n.Hasher,a=r.algo,s=[];!function(){for(var e=0;e<64;e++)s[e]=4294967296*t.abs(t.sin(e+1))|0}();var l=a.MD5=o.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var r=0;r<16;r++){var n=t+r,i=e[n];e[n]=(i<<8|i>>>24)&16711935|(i<<24|i>>>8)&4278255360}var o=this._hash.words,a=e[t+0],l=e[t+1],f=e[t+2],h=e[t+3],g=e[t+4],m=e[t+5],y=e[t+6],v=e[t+7],b=e[t+8],S=e[t+9],w=e[t+10],_=e[t+11],k=e[t+12],O=e[t+13],P=e[t+14],A=e[t+15],I=o[0],R=o[1],E=o[2],T=o[3];I=u(I,R,E,T,a,7,s[0]),T=u(T,I,R,E,l,12,s[1]),E=u(E,T,I,R,f,17,s[2]),R=u(R,E,T,I,h,22,s[3]),I=u(I,R,E,T,g,7,s[4]),T=u(T,I,R,E,m,12,s[5]),E=u(E,T,I,R,y,17,s[6]),R=u(R,E,T,I,v,22,s[7]),I=u(I,R,E,T,b,7,s[8]),T=u(T,I,R,E,S,12,s[9]),E=u(E,T,I,R,w,17,s[10]),R=u(R,E,T,I,_,22,s[11]),I=u(I,R,E,T,k,7,s[12]),T=u(T,I,R,E,O,12,s[13]),E=u(E,T,I,R,P,17,s[14]),R=u(R,E,T,I,A,22,s[15]),I=d(I,R,E,T,l,5,s[16]),T=d(T,I,R,E,y,9,s[17]),E=d(E,T,I,R,_,14,s[18]),R=d(R,E,T,I,a,20,s[19]),I=d(I,R,E,T,m,5,s[20]),T=d(T,I,R,E,w,9,s[21]),E=d(E,T,I,R,A,14,s[22]),R=d(R,E,T,I,g,20,s[23]),I=d(I,R,E,T,S,5,s[24]),T=d(T,I,R,E,P,9,s[25]),E=d(E,T,I,R,h,14,s[26]),R=d(R,E,T,I,b,20,s[27]),I=d(I,R,E,T,O,5,s[28]),T=d(T,I,R,E,f,9,s[29]),E=d(E,T,I,R,v,14,s[30]),R=d(R,E,T,I,k,20,s[31]),I=c(I,R,E,T,m,4,s[32]),T=c(T,I,R,E,b,11,s[33]),E=c(E,T,I,R,_,16,s[34]),R=c(R,E,T,I,P,23,s[35]),I=c(I,R,E,T,l,4,s[36]),T=c(T,I,R,E,g,11,s[37]),E=c(E,T,I,R,v,16,s[38]),R=c(R,E,T,I,w,23,s[39]),I=c(I,R,E,T,O,4,s[40]),T=c(T,I,R,E,a,11,s[41]),E=c(E,T,I,R,h,16,s[42]),R=c(R,E,T,I,y,23,s[43]),I=c(I,R,E,T,S,4,s[44]),T=c(T,I,R,E,k,11,s[45]),E=c(E,T,I,R,A,16,s[46]),R=c(R,E,T,I,f,23,s[47]),I=p(I,R,E,T,a,6,s[48]),T=p(T,I,R,E,v,10,s[49]),E=p(E,T,I,R,P,15,s[50]),R=p(R,E,T,I,m,21,s[51]),I=p(I,R,E,T,k,6,s[52]),T=p(T,I,R,E,h,10,s[53]),E=p(E,T,I,R,w,15,s[54]),R=p(R,E,T,I,l,21,s[55]),I=p(I,R,E,T,b,6,s[56]),T=p(T,I,R,E,A,10,s[57]),E=p(E,T,I,R,y,15,s[58]),R=p(R,E,T,I,O,21,s[59]),I=p(I,R,E,T,g,6,s[60]),T=p(T,I,R,E,_,10,s[61]),E=p(E,T,I,R,f,15,s[62]),R=p(R,E,T,I,S,21,s[63]),o[0]=o[0]+I|0,o[1]=o[1]+R|0,o[2]=o[2]+E|0,o[3]=o[3]+T|0},_doFinalize:function(){var e=this._data,r=e.words,n=8*this._nDataBytes,i=8*e.sigBytes;r[i>>>5]|=128<<24-i%32;var o=t.floor(n/4294967296),a=n;r[(i+64>>>9<<4)+15]=(o<<8|o>>>24)&16711935|(o<<24|o>>>8)&4278255360,r[(i+64>>>9<<4)+14]=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360,e.sigBytes=(r.length+1)*4,this._process();for(var s=this._hash,l=s.words,u=0;u<4;u++){var d=l[u];l[u]=(d<<8|d>>>24)&16711935|(d<<24|d>>>8)&4278255360}return s},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});function u(e,t,r,n,i,o,a){var s=e+(t&r|~t&n)+i+a;return(s<>>32-o)+t}function d(e,t,r,n,i,o,a){var s=e+(t&n|r&~n)+i+a;return(s<>>32-o)+t}function c(e,t,r,n,i,o,a){var s=e+(t^r^n)+i+a;return(s<>>32-o)+t}function p(e,t,r,n,i,o,a){var s=e+(r^(t|~n))+i+a;return(s<>>32-o)+t}r.MD5=o._createHelper(l),r.HmacMD5=o._createHmacHelper(l)}(Math),e.MD5})},67939:function(e,t,r){"use strict";!function(n,i,o){e.exports=t=i(r(32646),r(95989))}(0,function(e){return e.mode.CFB=function(){var t=e.lib.BlockCipherMode.extend();function r(e,t,r,n){var i,o=this._iv;o?(i=o.slice(0),this._iv=void 0):i=this._prevBlock,n.encryptBlock(i,0);for(var a=0;aa)throw RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,u.prototype),t}function u(e,t,r){if("number"==typeof e){if("string"==typeof t)throw TypeError('The "string" argument must be of type string. Received type number');return f(e)}return d(e,t,r)}function d(e,t,r){if("string"==typeof e)return h(e,t);if(ArrayBuffer.isView(e))return m(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(ea(e,ArrayBuffer)||e&&ea(e.buffer,ArrayBuffer)||"undefined"!=typeof SharedArrayBuffer&&(ea(e,SharedArrayBuffer)||e&&ea(e.buffer,SharedArrayBuffer)))return y(e,t,r);if("number"==typeof e)throw TypeError('The "value" argument must not be of type number. Received type number');let n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return u.from(n,t,r);let i=v(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return u.from(e[Symbol.toPrimitive]("string"),t,r);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function c(e){if("number"!=typeof e)throw TypeError('"size" argument must be of type number');if(e<0)throw RangeError('The value "'+e+'" is invalid for option "size"')}function p(e,t,r){return(c(e),e<=0)?l(e):void 0!==t?"string"==typeof r?l(e).fill(t,r):l(e).fill(t):l(e)}function f(e){return c(e),l(e<0?0:0|b(e))}function h(e,t){if(("string"!=typeof t||""===t)&&(t="utf8"),!u.isEncoding(t))throw TypeError("Unknown encoding: "+t);let r=0|w(e,t),n=l(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}function g(e){let t=e.length<0?0:0|b(e.length),r=l(t);for(let n=0;n=a)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|e}function S(e){return+e!=e&&(e=0),u.alloc(+e)}function w(e,t){if(u.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||ea(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return et(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return ei(e).length;default:if(i)return n?-1:et(e).length;t=(""+t).toLowerCase(),i=!0}}function _(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0||(r>>>=0)<=(t>>>=0)))return"";for(e||(e="utf8");;)switch(e){case"hex":return U(this,t,r);case"utf8":case"utf-8":return x(this,t,r);case"ascii":return M(this,t,r);case"latin1":case"binary":return D(this,t,r);case"base64":return N(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return J(this,t,r);default:if(n)throw TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function k(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}function O(e,t,r,n,i){if(0===e.length)return -1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),es(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return -1;r=e.length-1}else if(r<0){if(!i)return -1;r=0}if("string"==typeof t&&(t=u.from(t,n)),u.isBuffer(t))return 0===t.length?-1:P(e,t,r,n,i);if("number"==typeof t)return(t&=255,"function"==typeof Uint8Array.prototype.indexOf)?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):P(e,[t],r,n,i);throw TypeError("val must be string, number or Buffer")}function P(e,t,r,n,i){let o,a=1,s=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return -1;a=2,s/=2,l/=2,r/=2}function u(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){let n=-1;for(o=r;os&&(r=s-l),o=r;o>=0;o--){let r=!0;for(let n=0;no&&(n=o):n=o;let a=t.length;for(n>a/2&&(n=a/2),i=0;i239?4:t>223?3:t>191?2:1;if(i+a<=r){let r,n,s,l;switch(a){case 1:t<128&&(o=t);break;case 2:(192&(r=e[i+1]))==128&&(l=(31&t)<<6|63&r)>127&&(o=l);break;case 3:r=e[i+1],n=e[i+2],(192&r)==128&&(192&n)==128&&(l=(15&t)<<12|(63&r)<<6|63&n)>2047&&(l<55296||l>57343)&&(o=l);break;case 4:r=e[i+1],n=e[i+2],s=e[i+3],(192&r)==128&&(192&n)==128&&(192&s)==128&&(l=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&s)>65535&&l<1114112&&(o=l)}}null===o?(o=65533,a=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=a}return C(n)}t.kMaxLength=a,u.TYPED_ARRAY_SUPPORT=s(),u.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(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}}),u.poolSize=8192,u.from=function(e,t,r){return d(e,t,r)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array),u.alloc=function(e,t,r){return p(e,t,r)},u.allocUnsafe=function(e){return f(e)},u.allocUnsafeSlow=function(e){return f(e)},u.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==u.prototype},u.compare=function(e,t){if(ea(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),ea(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(e)||!u.isBuffer(t))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let i=0,o=Math.min(r,n);in.length?(u.isBuffer(t)||(t=u.from(t)),t.copy(n,i)):Uint8Array.prototype.set.call(n,t,i);else if(u.isBuffer(t))t.copy(n,i);else throw TypeError('"list" argument must be an Array of Buffers');i+=t.length}return n},u.byteLength=w,u.prototype._isBuffer=!0,u.prototype.swap16=function(){let e=this.length;if(e%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tr&&(e+=" ... "),""},o&&(u.prototype[o]=u.prototype.inspect),u.prototype.compare=function(e,t,r,n,i){if(ea(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(e))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return -1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;let o=i-n,a=r-t,s=Math.min(o,a),l=this.slice(n,i),d=e.slice(t,r);for(let e=0;e>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return A(this,e,t,r);case"utf8":case"utf-8":return I(this,e,t,r);case"ascii":case"latin1":case"binary":return R(this,e,t,r);case"base64":return E(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,e,t,r);default:if(o)throw TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};let B=4096;function C(e){let t=e.length;if(t<=B)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn)&&(r=n);let i="";for(let n=t;nr)throw RangeError("Trying to access beyond buffer length")}function H(e,t,r,n,i,o){if(!u.isBuffer(e))throw TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw RangeError("Index out of range")}function q(e,t,r,n,i){Y(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,r}function L(e,t,r,n,i){Y(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o>>=8,e[r+6]=o,o>>=8,e[r+5]=o,o>>=8,e[r+4]=o;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=a,a>>=8,e[r+2]=a,a>>=8,e[r+1]=a,a>>=8,e[r]=a,r+8}function F(e,t,r,n,i,o){if(r+n>e.length||r<0)throw RangeError("Index out of range")}function V(e,t,r,n,o){return t=+t,r>>>=0,o||F(e,t,r,4,34028234663852886e22,-34028234663852886e22),i.write(e,t,r,n,23,4),r+4}function z(e,t,r,n,o){return t=+t,r>>>=0,o||F(e,t,r,8,17976931348623157e292,-17976931348623157e292),i.write(e,t,r,n,52,8),r+8}u.prototype.slice=function(e,t){let r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t>>=0,t>>>=0,r||j(e,t,this.length);let n=this[e],i=1,o=0;for(;++o>>=0,t>>>=0,r||j(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n},u.prototype.readUint8=u.prototype.readUInt8=function(e,t){return e>>>=0,t||j(e,1,this.length),this[e]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(e,t){return e>>>=0,t||j(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(e,t){return e>>>=0,t||j(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(e,t){return e>>>=0,t||j(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(e,t){return e>>>=0,t||j(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readBigUInt64LE=eu(function(e){Z(e>>>=0,"offset");let t=this[e],r=this[e+7];(void 0===t||void 0===r)&&X(e,this.length-8);let n=t+256*this[++e]+65536*this[++e]+16777216*this[++e],i=this[++e]+256*this[++e]+65536*this[++e]+16777216*r;return BigInt(n)+(BigInt(i)<>>=0,"offset");let t=this[e],r=this[e+7];(void 0===t||void 0===r)&&X(e,this.length-8);let n=16777216*t+65536*this[++e]+256*this[++e]+this[++e],i=16777216*this[++e]+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<>>=0,t>>>=0,r||j(e,t,this.length);let n=this[e],i=1,o=0;for(;++o=(i*=128)&&(n-=Math.pow(2,8*t)),n},u.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||j(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},u.prototype.readInt8=function(e,t){return(e>>>=0,t||j(e,1,this.length),128&this[e])?-((255-this[e]+1)*1):this[e]},u.prototype.readInt16LE=function(e,t){e>>>=0,t||j(e,2,this.length);let r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(e,t){e>>>=0,t||j(e,2,this.length);let r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(e,t){return e>>>=0,t||j(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return e>>>=0,t||j(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readBigInt64LE=eu(function(e){Z(e>>>=0,"offset");let t=this[e],r=this[e+7];return(void 0===t||void 0===r)&&X(e,this.length-8),(BigInt(this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24))<>>=0,"offset");let t=this[e],r=this[e+7];return(void 0===t||void 0===r)&&X(e,this.length-8),(BigInt((t<<24)+65536*this[++e]+256*this[++e]+this[++e])<>>=0,t||j(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return e>>>=0,t||j(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return e>>>=0,t||j(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return e>>>=0,t||j(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){let n=Math.pow(2,8*r)-1;H(this,e,t,r,n,0)}let i=1,o=0;for(this[t]=255&e;++o>>=0,r>>>=0,!n){let n=Math.pow(2,8*r)-1;H(this,e,t,r,n,0)}let i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},u.prototype.writeUint8=u.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||H(this,e,t,1,255,0),this[t]=255&e,t+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||H(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||H(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||H(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},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||H(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},u.prototype.writeBigUInt64LE=eu(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return q(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeBigUInt64BE=eu(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return L(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){let n=Math.pow(2,8*r-1);H(this,e,t,r,n-1,-n)}let i=0,o=1,a=0;for(this[t]=255&e;++i>0)-a&255;return t+r},u.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){let n=Math.pow(2,8*r-1);H(this,e,t,r,n-1,-n)}let i=r-1,o=1,a=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/o>>0)-a&255;return t+r},u.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||H(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||H(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||H(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||H(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},u.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||H(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},u.prototype.writeBigInt64LE=eu(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return q(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeBigInt64BE=eu(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return L(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeFloatLE=function(e,t,r){return V(this,e,t,!0,r)},u.prototype.writeFloatBE=function(e,t,r){return V(this,e,t,!1,r)},u.prototype.writeDoubleLE=function(e,t,r){return z(this,e,t,!0,r)},u.prototype.writeDoubleBE=function(e,t,r){return z(this,e,t,!1,r)},u.prototype.copy=function(e,t,r,n){if(!u.isBuffer(e))throw TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw RangeError("Index out of range");if(n<0)throw RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i=n+4;r-=3)t="_".concat(e.slice(r-3,r)).concat(t);return"".concat(e.slice(0,r)).concat(t)}function K(e,t,r){Z(t,"offset"),(void 0===e[t]||void 0===e[t+r])&&X(t,e.length-(r+1))}function Y(e,t,r,n,i,o){if(e>r||e3?0===t||t===BigInt(0)?">= 0".concat(i," and < 2").concat(i," ** ").concat((o+1)*8).concat(i):">= -(2".concat(i," ** ").concat((o+1)*8-1).concat(i,") and < 2 ** ")+"".concat((o+1)*8-1).concat(i):">= ".concat(t).concat(i," and <= ").concat(r).concat(i),new W.ERR_OUT_OF_RANGE("value",n,e)}K(n,i,o)}function Z(e,t){if("number"!=typeof e)throw new W.ERR_INVALID_ARG_TYPE(t,"number",e)}function X(e,t,r){if(Math.floor(e)!==e)throw Z(e,r),new W.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new W.ERR_BUFFER_OUT_OF_BOUNDS;throw new W.ERR_OUT_OF_RANGE(r||"offset",">= ".concat(r?1:0," and <= ").concat(t),e)}Q("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?"".concat(e," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"},RangeError),Q("ERR_INVALID_ARG_TYPE",function(e,t){return'The "'.concat(e,'" argument must be of type number. Received type ').concat(typeof t)},TypeError),Q("ERR_OUT_OF_RANGE",function(e,t,r){let n='The value of "'.concat(e,'" is out of range.'),i=r;return Number.isInteger(r)&&Math.abs(r)>4294967296?i=G(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=G(i)),i+="n"),n+=" It must be ".concat(t,". Received ").concat(i)},RangeError);let $=/[^+/0-9A-Za-z-_]/g;function ee(e){if((e=(e=e.split("=")[0]).trim().replace($,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}function et(e,t){let r;t=t||1/0;let n=e.length,i=null,o=[];for(let a=0;a55295&&r<57344){if(!i){if(r>56319||a+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else if(r<1114112){if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return o}function er(e){let t=[];for(let r=0;r>8,i.push(r%256),i.push(n);return i}function ei(e){return n.toByteArray(ee(e))}function eo(e,t,r,n){let i;for(i=0;i=t.length)&&!(i>=e.length);++i)t[i+r]=e[i];return i}function ea(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function es(e){return e!=e}let el=function(){let e="0123456789abcdef",t=Array(256);for(let r=0;r<16;++r){let n=16*r;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function eu(e){return"undefined"==typeof BigInt?ed:e}function ed(){throw Error("BigInt not supported")}},73842:function(e,t,r){"use strict";var n=r(47226).Buffer,i=r(37906).Transform,o=r(55144).StringDecoder;function a(e){i.call(this),this.hashMode="string"==typeof e,this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}r(39541)(a,i),a.prototype.update=function(e,t,r){"string"==typeof e&&(e=n.from(e,t));var i=this._update(e);return this.hashMode?this:(r&&(i=this._toString(i,r)),i)},a.prototype.setAutoPadding=function(){},a.prototype.getAuthTag=function(){throw Error("trying to get auth tag in unsupported state")},a.prototype.setAuthTag=function(){throw Error("trying to set auth tag in unsupported state")},a.prototype.setAAD=function(){throw Error("trying to set aad in unsupported state")},a.prototype._transform=function(e,t,r){var n;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(e){n=e}finally{r(n)}},a.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(e){t=e}e(t)},a.prototype._finalOrDigest=function(e){var t=this.__final()||n.alloc(0);return e&&(t=this._toString(t,e,!0)),t},a.prototype._toString=function(e,t,r){if(this._decoder||(this._decoder=new o(t),this._encoding=t),this._encoding!==t)throw Error("can't switch encodings");var n=this._decoder.write(e);return r&&(n+=this._decoder.end()),n},e.exports=a},46554:function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.BinaryWriter=t.BinaryReader=t.WireType=void 0;let i=r(41804),o=r(15344);!function(e){e[e.Varint=0]="Varint",e[e.Fixed64=1]="Fixed64",e[e.Bytes=2]="Bytes",e[e.Fixed32=5]="Fixed32"}(n||(t.WireType=n={}));class a{assertBounds(){if(this.pos>this.len)throw RangeError("premature EOF")}tag(){let e=this.uint32(),t=e>>>3,r=7&e;if(t<=0||r<0||r>5)throw Error("illegal tag: field no "+t+" wire type "+r);return[t,r,e]}skip(e){if("number"==typeof e){if(this.pos+e>this.len)throw p(this,e);this.pos+=e}else do if(this.pos>=this.len)throw p(this);while(128&this.buf[this.pos++]);return this}skipType(e){switch(e){case n.Varint:this.skip();break;case n.Fixed64:this.skip(8);break;case n.Bytes:this.skip(this.uint32());break;case 3:for(;4!=(e=7&this.uint32());)this.skipType(e);break;case n.Fixed32:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this}uint32(){return o.varint32read.bind(this)()}int32(){return 0|this.uint32()}sint32(){let e=this.uint32();return e%2==1?-((e+1)/2):e/2}fixed32(){let e=(0,o.readUInt32)(this.buf,this.pos);return this.pos+=4,e}sfixed32(){let e=(0,o.readInt32)(this.buf,this.pos);return this.pos+=4,e}int64(){let[e,t]=o.varint64read.bind(this)();return BigInt((0,o.int64ToString)(e,t))}uint64(){let[e,t]=o.varint64read.bind(this)();return BigInt((0,o.uInt64ToString)(e,t))}sint64(){let[e,t]=o.varint64read.bind(this)();return[e,t]=(0,o.zzDecode)(e,t),BigInt((0,o.int64ToString)(e,t))}fixed64(){let e=this.sfixed32(),t=this.sfixed32();return BigInt((0,o.uInt64ToString)(e,t))}sfixed64(){let e=this.sfixed32(),t=this.sfixed32();return BigInt((0,o.int64ToString)(e,t))}float(){throw Error("float not supported")}double(){throw Error("double not supported")}bool(){let[e,t]=o.varint64read.bind(this)();return 0!==e||0!==t}bytes(){let e=this.uint32(),t=this.pos;return this.pos+=e,this.assertBounds(),this.buf.subarray(t,t+e)}string(){let e=this.bytes();return(0,i.utf8Read)(e,0,e.length)}constructor(e){this.buf=new Uint8Array(e||0),this.pos=0,this.type=0,this.len=this.buf.length}}t.BinaryReader=a;class s{proceed(e,t){this.fn&&this.fn(this.val,e,t)}constructor(e,t,r){this.fn=e,this.len=t,this.val=r}}class l{constructor(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}}class u{static create(){return new u}static alloc(e){return"undefined"!=typeof Uint8Array?c(e=>new Uint8Array(e),Uint8Array.prototype.subarray)(e):Array(e)}_push(e,t,r){return this.tail=this.tail.next=new s(e,t,r),this.len+=t,this}finish(){let e=this.head.next,t=0,r=u.alloc(this.len);for(;e;)e.proceed(r,t),t+=e.len,e=e.next;return r}fork(){return this.states=new l(this),this.head=this.tail=new s(null,0,0),this.len=0,this}reset(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new s(null,0,0),this.len=0),this}ldelim(){let e=this.head,t=this.tail,r=this.len;return this.reset().uint32(r),r&&(this.tail.next=e.next,this.tail=t,this.len+=r),this}tag(e,t){return this.uint32((e<<3|t)>>>0)}uint32(e){return this.len+=(this.tail=this.tail.next=new s(o.writeVarint32,(e>>>=0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this}int32(e){return e<0?this._push(o.writeVarint64,10,(0,o.int64FromString)(e.toString())):this.uint32(e)}sint32(e){return this.uint32((e<<1^e>>31)>>>0)}int64(e){let{lo:t,hi:r}=(0,o.int64FromString)(e.toString());return this._push(o.writeVarint64,(0,o.int64Length)(t,r),{lo:t,hi:r})}sint64(e){let{lo:t,hi:r}=(0,o.int64FromString)(e.toString());return[t,r]=(0,o.zzEncode)(t,r),this._push(o.writeVarint64,(0,o.int64Length)(t,r),{lo:t,hi:r})}fixed64(e){let{lo:t,hi:r}=(0,o.int64FromString)(e.toString());return this._push(o.writeFixed32,4,t)._push(o.writeFixed32,4,r)}bool(e){return this._push(o.writeByte,1,e?1:0)}fixed32(e){return this._push(o.writeFixed32,4,e>>>0)}float(e){throw Error("float not supported"+e)}double(e){throw Error("double not supported"+e)}bytes(e){let t=e.length>>>0;return t?this.uint32(t)._push(d,t,e):this._push(o.writeByte,1,0)}string(e){let t=(0,i.utf8Length)(e);return t?this.uint32(t)._push(i.utf8Write,t,e):this._push(o.writeByte,1,0)}constructor(){this.len=0,this.uint64=u.prototype.int64,this.sfixed64=u.prototype.fixed64,this.sfixed32=u.prototype.fixed32,this.head=new s(null,0,0),this.tail=this.head,this.states=null}}function d(e,t,r){if("undefined"!=typeof Uint8Array)t.set(e,r);else for(let n=0;n>>1,o=null,a=n;return function(r){if(r<1||r>i)return e(r);a+r>n&&(o=e(n),a=0);let s=t.call(o,a,a+=r);return 7&a&&(a=(7|a)+1),s}}function p(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}t.BinaryWriter=u},54910:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Params=t.ModuleCredential=t.ModuleAccount=t.BaseAccount=t.protobufPackage=void 0;let n=r(11879),i=r(46554),o=r(99133);function a(){return{address:"",pubKey:void 0,accountNumber:BigInt(0),sequence:BigInt(0)}}function s(){return{baseAccount:void 0,name:"",permissions:[]}}function l(){return{moduleName:"",derivationKeys:[]}}function u(){return{maxMemoCharacters:BigInt(0),txSigLimit:BigInt(0),txSizeCostPerByte:BigInt(0),sigVerifyCostEd25519:BigInt(0),sigVerifyCostSecp256k1:BigInt(0)}}t.protobufPackage="cosmos.auth.v1beta1",t.BaseAccount={typeUrl:"/cosmos.auth.v1beta1.BaseAccount",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();return""!==e.address&&t.uint32(10).string(e.address),void 0!==e.pubKey&&n.Any.encode(e.pubKey,t.uint32(18).fork()).ldelim(),e.accountNumber!==BigInt(0)&&t.uint32(24).uint64(e.accountNumber),e.sequence!==BigInt(0)&&t.uint32(32).uint64(e.sequence),t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),o=void 0===t?r.len:r.pos+t,s=a();for(;r.pos>>3){case 1:s.address=r.string();break;case 2:s.pubKey=n.Any.decode(r,r.uint32());break;case 3:s.accountNumber=r.uint64();break;case 4:s.sequence=r.uint64();break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=a();return(0,o.isSet)(e.address)&&(t.address=String(e.address)),(0,o.isSet)(e.pubKey)&&(t.pubKey=n.Any.fromJSON(e.pubKey)),(0,o.isSet)(e.accountNumber)&&(t.accountNumber=BigInt(e.accountNumber.toString())),(0,o.isSet)(e.sequence)&&(t.sequence=BigInt(e.sequence.toString())),t},toJSON(e){let t={};return void 0!==e.address&&(t.address=e.address),void 0!==e.pubKey&&(t.pubKey=e.pubKey?n.Any.toJSON(e.pubKey):void 0),void 0!==e.accountNumber&&(t.accountNumber=(e.accountNumber||BigInt(0)).toString()),void 0!==e.sequence&&(t.sequence=(e.sequence||BigInt(0)).toString()),t},fromPartial(e){var t;let r=a();return r.address=null!==(t=e.address)&&void 0!==t?t:"",void 0!==e.pubKey&&null!==e.pubKey&&(r.pubKey=n.Any.fromPartial(e.pubKey)),void 0!==e.accountNumber&&null!==e.accountNumber&&(r.accountNumber=BigInt(e.accountNumber.toString())),void 0!==e.sequence&&null!==e.sequence&&(r.sequence=BigInt(e.sequence.toString())),r}},t.ModuleAccount={typeUrl:"/cosmos.auth.v1beta1.ModuleAccount",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();for(let n of(void 0!==e.baseAccount&&t.BaseAccount.encode(e.baseAccount,r.uint32(10).fork()).ldelim(),""!==e.name&&r.uint32(18).string(e.name),e.permissions))r.uint32(26).string(n);return r},decode(e,r){let n=e instanceof i.BinaryReader?e:new i.BinaryReader(e),o=void 0===r?n.len:n.pos+r,a=s();for(;n.pos>>3){case 1:a.baseAccount=t.BaseAccount.decode(n,n.uint32());break;case 2:a.name=n.string();break;case 3:a.permissions.push(n.string());break;default:n.skipType(7&e)}}return a},fromJSON(e){let r=s();return(0,o.isSet)(e.baseAccount)&&(r.baseAccount=t.BaseAccount.fromJSON(e.baseAccount)),(0,o.isSet)(e.name)&&(r.name=String(e.name)),Array.isArray(null==e?void 0:e.permissions)&&(r.permissions=e.permissions.map(e=>String(e))),r},toJSON(e){let r={};return void 0!==e.baseAccount&&(r.baseAccount=e.baseAccount?t.BaseAccount.toJSON(e.baseAccount):void 0),void 0!==e.name&&(r.name=e.name),e.permissions?r.permissions=e.permissions.map(e=>e):r.permissions=[],r},fromPartial(e){var r,n;let i=s();return void 0!==e.baseAccount&&null!==e.baseAccount&&(i.baseAccount=t.BaseAccount.fromPartial(e.baseAccount)),i.name=null!==(n=e.name)&&void 0!==n?n:"",i.permissions=(null===(r=e.permissions)||void 0===r?void 0:r.map(e=>e))||[],i}},t.ModuleCredential={typeUrl:"/cosmos.auth.v1beta1.ModuleCredential",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();for(let r of(""!==e.moduleName&&t.uint32(10).string(e.moduleName),e.derivationKeys))t.uint32(18).bytes(r);return t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=l();for(;r.pos>>3){case 1:o.moduleName=r.string();break;case 2:o.derivationKeys.push(r.bytes());break;default:r.skipType(7&e)}}return o},fromJSON(e){let t=l();return(0,o.isSet)(e.moduleName)&&(t.moduleName=String(e.moduleName)),Array.isArray(null==e?void 0:e.derivationKeys)&&(t.derivationKeys=e.derivationKeys.map(e=>(0,o.bytesFromBase64)(e))),t},toJSON(e){let t={};return void 0!==e.moduleName&&(t.moduleName=e.moduleName),e.derivationKeys?t.derivationKeys=e.derivationKeys.map(e=>(0,o.base64FromBytes)(void 0!==e?e:new Uint8Array)):t.derivationKeys=[],t},fromPartial(e){var t,r;let n=l();return n.moduleName=null!==(r=e.moduleName)&&void 0!==r?r:"",n.derivationKeys=(null===(t=e.derivationKeys)||void 0===t?void 0:t.map(e=>e))||[],n}},t.Params={typeUrl:"/cosmos.auth.v1beta1.Params",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();return e.maxMemoCharacters!==BigInt(0)&&t.uint32(8).uint64(e.maxMemoCharacters),e.txSigLimit!==BigInt(0)&&t.uint32(16).uint64(e.txSigLimit),e.txSizeCostPerByte!==BigInt(0)&&t.uint32(24).uint64(e.txSizeCostPerByte),e.sigVerifyCostEd25519!==BigInt(0)&&t.uint32(32).uint64(e.sigVerifyCostEd25519),e.sigVerifyCostSecp256k1!==BigInt(0)&&t.uint32(40).uint64(e.sigVerifyCostSecp256k1),t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=u();for(;r.pos>>3){case 1:o.maxMemoCharacters=r.uint64();break;case 2:o.txSigLimit=r.uint64();break;case 3:o.txSizeCostPerByte=r.uint64();break;case 4:o.sigVerifyCostEd25519=r.uint64();break;case 5:o.sigVerifyCostSecp256k1=r.uint64();break;default:r.skipType(7&e)}}return o},fromJSON(e){let t=u();return(0,o.isSet)(e.maxMemoCharacters)&&(t.maxMemoCharacters=BigInt(e.maxMemoCharacters.toString())),(0,o.isSet)(e.txSigLimit)&&(t.txSigLimit=BigInt(e.txSigLimit.toString())),(0,o.isSet)(e.txSizeCostPerByte)&&(t.txSizeCostPerByte=BigInt(e.txSizeCostPerByte.toString())),(0,o.isSet)(e.sigVerifyCostEd25519)&&(t.sigVerifyCostEd25519=BigInt(e.sigVerifyCostEd25519.toString())),(0,o.isSet)(e.sigVerifyCostSecp256k1)&&(t.sigVerifyCostSecp256k1=BigInt(e.sigVerifyCostSecp256k1.toString())),t},toJSON(e){let t={};return void 0!==e.maxMemoCharacters&&(t.maxMemoCharacters=(e.maxMemoCharacters||BigInt(0)).toString()),void 0!==e.txSigLimit&&(t.txSigLimit=(e.txSigLimit||BigInt(0)).toString()),void 0!==e.txSizeCostPerByte&&(t.txSizeCostPerByte=(e.txSizeCostPerByte||BigInt(0)).toString()),void 0!==e.sigVerifyCostEd25519&&(t.sigVerifyCostEd25519=(e.sigVerifyCostEd25519||BigInt(0)).toString()),void 0!==e.sigVerifyCostSecp256k1&&(t.sigVerifyCostSecp256k1=(e.sigVerifyCostSecp256k1||BigInt(0)).toString()),t},fromPartial(e){let t=u();return void 0!==e.maxMemoCharacters&&null!==e.maxMemoCharacters&&(t.maxMemoCharacters=BigInt(e.maxMemoCharacters.toString())),void 0!==e.txSigLimit&&null!==e.txSigLimit&&(t.txSigLimit=BigInt(e.txSigLimit.toString())),void 0!==e.txSizeCostPerByte&&null!==e.txSizeCostPerByte&&(t.txSizeCostPerByte=BigInt(e.txSizeCostPerByte.toString())),void 0!==e.sigVerifyCostEd25519&&null!==e.sigVerifyCostEd25519&&(t.sigVerifyCostEd25519=BigInt(e.sigVerifyCostEd25519.toString())),void 0!==e.sigVerifyCostSecp256k1&&null!==e.sigVerifyCostSecp256k1&&(t.sigVerifyCostSecp256k1=BigInt(e.sigVerifyCostSecp256k1.toString())),t}}},37547:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QueryClientImpl=t.QueryAccountInfoResponse=t.QueryAccountInfoRequest=t.QueryAccountAddressByIDResponse=t.QueryAccountAddressByIDRequest=t.AddressStringToBytesResponse=t.AddressStringToBytesRequest=t.AddressBytesToStringResponse=t.AddressBytesToStringRequest=t.Bech32PrefixResponse=t.Bech32PrefixRequest=t.QueryModuleAccountByNameResponse=t.QueryModuleAccountByNameRequest=t.QueryModuleAccountsResponse=t.QueryModuleAccountsRequest=t.QueryParamsResponse=t.QueryParamsRequest=t.QueryAccountResponse=t.QueryAccountRequest=t.QueryAccountsResponse=t.QueryAccountsRequest=t.protobufPackage=void 0;let n=r(86141),i=r(11879),o=r(54910),a=r(46554),s=r(99133);function l(){return{pagination:void 0}}function u(){return{accounts:[],pagination:void 0}}function d(){return{address:""}}function c(){return{account:void 0}}function p(){return{}}function f(){return{params:o.Params.fromPartial({})}}function h(){return{}}function g(){return{accounts:[]}}function m(){return{name:""}}function y(){return{account:void 0}}function v(){return{}}function b(){return{bech32Prefix:""}}function S(){return{addressBytes:new Uint8Array}}function w(){return{addressString:""}}function _(){return{addressString:""}}function k(){return{addressBytes:new Uint8Array}}function O(){return{id:BigInt(0),accountId:BigInt(0)}}function P(){return{accountAddress:""}}function A(){return{address:""}}function I(){return{info:void 0}}t.protobufPackage="cosmos.auth.v1beta1",t.QueryAccountsRequest={typeUrl:"/cosmos.auth.v1beta1.QueryAccountsRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return void 0!==e.pagination&&n.PageRequest.encode(e.pagination,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),i=void 0===t?r.len:r.pos+t,o=l();for(;r.pos>>3==1?o.pagination=n.PageRequest.decode(r,r.uint32()):r.skipType(7&e)}return o},fromJSON(e){let t=l();return(0,s.isSet)(e.pagination)&&(t.pagination=n.PageRequest.fromJSON(e.pagination)),t},toJSON(e){let t={};return void 0!==e.pagination&&(t.pagination=e.pagination?n.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){let t=l();return void 0!==e.pagination&&null!==e.pagination&&(t.pagination=n.PageRequest.fromPartial(e.pagination)),t}},t.QueryAccountsResponse={typeUrl:"/cosmos.auth.v1beta1.QueryAccountsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();for(let r of e.accounts)i.Any.encode(r,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&n.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),o=void 0===t?r.len:r.pos+t,s=u();for(;r.pos>>3){case 1:s.accounts.push(i.Any.decode(r,r.uint32()));break;case 2:s.pagination=n.PageResponse.decode(r,r.uint32());break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=u();return Array.isArray(null==e?void 0:e.accounts)&&(t.accounts=e.accounts.map(e=>i.Any.fromJSON(e))),(0,s.isSet)(e.pagination)&&(t.pagination=n.PageResponse.fromJSON(e.pagination)),t},toJSON(e){let t={};return e.accounts?t.accounts=e.accounts.map(e=>e?i.Any.toJSON(e):void 0):t.accounts=[],void 0!==e.pagination&&(t.pagination=e.pagination?n.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=u();return r.accounts=(null===(t=e.accounts)||void 0===t?void 0:t.map(e=>i.Any.fromPartial(e)))||[],void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageResponse.fromPartial(e.pagination)),r}},t.QueryAccountRequest={typeUrl:"/cosmos.auth.v1beta1.QueryAccountRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.address&&t.uint32(10).string(e.address),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=d();for(;r.pos>>3==1?i.address=r.string():r.skipType(7&e)}return i},fromJSON(e){let t=d();return(0,s.isSet)(e.address)&&(t.address=String(e.address)),t},toJSON(e){let t={};return void 0!==e.address&&(t.address=e.address),t},fromPartial(e){var t;let r=d();return r.address=null!==(t=e.address)&&void 0!==t?t:"",r}},t.QueryAccountResponse={typeUrl:"/cosmos.auth.v1beta1.QueryAccountResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return void 0!==e.account&&i.Any.encode(e.account,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=c();for(;r.pos>>3==1?o.account=i.Any.decode(r,r.uint32()):r.skipType(7&e)}return o},fromJSON(e){let t=c();return(0,s.isSet)(e.account)&&(t.account=i.Any.fromJSON(e.account)),t},toJSON(e){let t={};return void 0!==e.account&&(t.account=e.account?i.Any.toJSON(e.account):void 0),t},fromPartial(e){let t=c();return void 0!==e.account&&null!==e.account&&(t.account=i.Any.fromPartial(e.account)),t}},t.QueryParamsRequest={typeUrl:"/cosmos.auth.v1beta1.QueryParamsRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=p();for(;r.posp(),toJSON:e=>({}),fromPartial:e=>p()},t.QueryParamsResponse={typeUrl:"/cosmos.auth.v1beta1.QueryParamsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return void 0!==e.params&&o.Params.encode(e.params,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=f();for(;r.pos>>3==1?i.params=o.Params.decode(r,r.uint32()):r.skipType(7&e)}return i},fromJSON(e){let t=f();return(0,s.isSet)(e.params)&&(t.params=o.Params.fromJSON(e.params)),t},toJSON(e){let t={};return void 0!==e.params&&(t.params=e.params?o.Params.toJSON(e.params):void 0),t},fromPartial(e){let t=f();return void 0!==e.params&&null!==e.params&&(t.params=o.Params.fromPartial(e.params)),t}},t.QueryModuleAccountsRequest={typeUrl:"/cosmos.auth.v1beta1.QueryModuleAccountsRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=h();for(;r.posh(),toJSON:e=>({}),fromPartial:e=>h()},t.QueryModuleAccountsResponse={typeUrl:"/cosmos.auth.v1beta1.QueryModuleAccountsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();for(let r of e.accounts)i.Any.encode(r,t.uint32(10).fork()).ldelim();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=g();for(;r.pos>>3==1?o.accounts.push(i.Any.decode(r,r.uint32())):r.skipType(7&e)}return o},fromJSON(e){let t=g();return Array.isArray(null==e?void 0:e.accounts)&&(t.accounts=e.accounts.map(e=>i.Any.fromJSON(e))),t},toJSON(e){let t={};return e.accounts?t.accounts=e.accounts.map(e=>e?i.Any.toJSON(e):void 0):t.accounts=[],t},fromPartial(e){var t;let r=g();return r.accounts=(null===(t=e.accounts)||void 0===t?void 0:t.map(e=>i.Any.fromPartial(e)))||[],r}},t.QueryModuleAccountByNameRequest={typeUrl:"/cosmos.auth.v1beta1.QueryModuleAccountByNameRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.name&&t.uint32(10).string(e.name),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=m();for(;r.pos>>3==1?i.name=r.string():r.skipType(7&e)}return i},fromJSON(e){let t=m();return(0,s.isSet)(e.name)&&(t.name=String(e.name)),t},toJSON(e){let t={};return void 0!==e.name&&(t.name=e.name),t},fromPartial(e){var t;let r=m();return r.name=null!==(t=e.name)&&void 0!==t?t:"",r}},t.QueryModuleAccountByNameResponse={typeUrl:"/cosmos.auth.v1beta1.QueryModuleAccountByNameResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return void 0!==e.account&&i.Any.encode(e.account,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=y();for(;r.pos>>3==1?o.account=i.Any.decode(r,r.uint32()):r.skipType(7&e)}return o},fromJSON(e){let t=y();return(0,s.isSet)(e.account)&&(t.account=i.Any.fromJSON(e.account)),t},toJSON(e){let t={};return void 0!==e.account&&(t.account=e.account?i.Any.toJSON(e.account):void 0),t},fromPartial(e){let t=y();return void 0!==e.account&&null!==e.account&&(t.account=i.Any.fromPartial(e.account)),t}},t.Bech32PrefixRequest={typeUrl:"/cosmos.auth.v1beta1.Bech32PrefixRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=v();for(;r.posv(),toJSON:e=>({}),fromPartial:e=>v()},t.Bech32PrefixResponse={typeUrl:"/cosmos.auth.v1beta1.Bech32PrefixResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.bech32Prefix&&t.uint32(10).string(e.bech32Prefix),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=b();for(;r.pos>>3==1?i.bech32Prefix=r.string():r.skipType(7&e)}return i},fromJSON(e){let t=b();return(0,s.isSet)(e.bech32Prefix)&&(t.bech32Prefix=String(e.bech32Prefix)),t},toJSON(e){let t={};return void 0!==e.bech32Prefix&&(t.bech32Prefix=e.bech32Prefix),t},fromPartial(e){var t;let r=b();return r.bech32Prefix=null!==(t=e.bech32Prefix)&&void 0!==t?t:"",r}},t.AddressBytesToStringRequest={typeUrl:"/cosmos.auth.v1beta1.AddressBytesToStringRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return 0!==e.addressBytes.length&&t.uint32(10).bytes(e.addressBytes),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=S();for(;r.pos>>3==1?i.addressBytes=r.bytes():r.skipType(7&e)}return i},fromJSON(e){let t=S();return(0,s.isSet)(e.addressBytes)&&(t.addressBytes=(0,s.bytesFromBase64)(e.addressBytes)),t},toJSON(e){let t={};return void 0!==e.addressBytes&&(t.addressBytes=(0,s.base64FromBytes)(void 0!==e.addressBytes?e.addressBytes:new Uint8Array)),t},fromPartial(e){var t;let r=S();return r.addressBytes=null!==(t=e.addressBytes)&&void 0!==t?t:new Uint8Array,r}},t.AddressBytesToStringResponse={typeUrl:"/cosmos.auth.v1beta1.AddressBytesToStringResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.addressString&&t.uint32(10).string(e.addressString),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=w();for(;r.pos>>3==1?i.addressString=r.string():r.skipType(7&e)}return i},fromJSON(e){let t=w();return(0,s.isSet)(e.addressString)&&(t.addressString=String(e.addressString)),t},toJSON(e){let t={};return void 0!==e.addressString&&(t.addressString=e.addressString),t},fromPartial(e){var t;let r=w();return r.addressString=null!==(t=e.addressString)&&void 0!==t?t:"",r}},t.AddressStringToBytesRequest={typeUrl:"/cosmos.auth.v1beta1.AddressStringToBytesRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.addressString&&t.uint32(10).string(e.addressString),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=_();for(;r.pos>>3==1?i.addressString=r.string():r.skipType(7&e)}return i},fromJSON(e){let t=_();return(0,s.isSet)(e.addressString)&&(t.addressString=String(e.addressString)),t},toJSON(e){let t={};return void 0!==e.addressString&&(t.addressString=e.addressString),t},fromPartial(e){var t;let r=_();return r.addressString=null!==(t=e.addressString)&&void 0!==t?t:"",r}},t.AddressStringToBytesResponse={typeUrl:"/cosmos.auth.v1beta1.AddressStringToBytesResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return 0!==e.addressBytes.length&&t.uint32(10).bytes(e.addressBytes),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=k();for(;r.pos>>3==1?i.addressBytes=r.bytes():r.skipType(7&e)}return i},fromJSON(e){let t=k();return(0,s.isSet)(e.addressBytes)&&(t.addressBytes=(0,s.bytesFromBase64)(e.addressBytes)),t},toJSON(e){let t={};return void 0!==e.addressBytes&&(t.addressBytes=(0,s.base64FromBytes)(void 0!==e.addressBytes?e.addressBytes:new Uint8Array)),t},fromPartial(e){var t;let r=k();return r.addressBytes=null!==(t=e.addressBytes)&&void 0!==t?t:new Uint8Array,r}},t.QueryAccountAddressByIDRequest={typeUrl:"/cosmos.auth.v1beta1.QueryAccountAddressByIDRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return e.id!==BigInt(0)&&t.uint32(8).int64(e.id),e.accountId!==BigInt(0)&&t.uint32(16).uint64(e.accountId),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=O();for(;r.pos>>3){case 1:i.id=r.int64();break;case 2:i.accountId=r.uint64();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=O();return(0,s.isSet)(e.id)&&(t.id=BigInt(e.id.toString())),(0,s.isSet)(e.accountId)&&(t.accountId=BigInt(e.accountId.toString())),t},toJSON(e){let t={};return void 0!==e.id&&(t.id=(e.id||BigInt(0)).toString()),void 0!==e.accountId&&(t.accountId=(e.accountId||BigInt(0)).toString()),t},fromPartial(e){let t=O();return void 0!==e.id&&null!==e.id&&(t.id=BigInt(e.id.toString())),void 0!==e.accountId&&null!==e.accountId&&(t.accountId=BigInt(e.accountId.toString())),t}},t.QueryAccountAddressByIDResponse={typeUrl:"/cosmos.auth.v1beta1.QueryAccountAddressByIDResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.accountAddress&&t.uint32(10).string(e.accountAddress),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=P();for(;r.pos>>3==1?i.accountAddress=r.string():r.skipType(7&e)}return i},fromJSON(e){let t=P();return(0,s.isSet)(e.accountAddress)&&(t.accountAddress=String(e.accountAddress)),t},toJSON(e){let t={};return void 0!==e.accountAddress&&(t.accountAddress=e.accountAddress),t},fromPartial(e){var t;let r=P();return r.accountAddress=null!==(t=e.accountAddress)&&void 0!==t?t:"",r}},t.QueryAccountInfoRequest={typeUrl:"/cosmos.auth.v1beta1.QueryAccountInfoRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.address&&t.uint32(10).string(e.address),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=A();for(;r.pos>>3==1?i.address=r.string():r.skipType(7&e)}return i},fromJSON(e){let t=A();return(0,s.isSet)(e.address)&&(t.address=String(e.address)),t},toJSON(e){let t={};return void 0!==e.address&&(t.address=e.address),t},fromPartial(e){var t;let r=A();return r.address=null!==(t=e.address)&&void 0!==t?t:"",r}},t.QueryAccountInfoResponse={typeUrl:"/cosmos.auth.v1beta1.QueryAccountInfoResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return void 0!==e.info&&o.BaseAccount.encode(e.info,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=I();for(;r.pos>>3==1?i.info=o.BaseAccount.decode(r,r.uint32()):r.skipType(7&e)}return i},fromJSON(e){let t=I();return(0,s.isSet)(e.info)&&(t.info=o.BaseAccount.fromJSON(e.info)),t},toJSON(e){let t={};return void 0!==e.info&&(t.info=e.info?o.BaseAccount.toJSON(e.info):void 0),t},fromPartial(e){let t=I();return void 0!==e.info&&null!==e.info&&(t.info=o.BaseAccount.fromPartial(e.info)),t}};class R{Accounts(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{pagination:n.PageRequest.fromPartial({})},r=t.QueryAccountsRequest.encode(e).finish();return this.rpc.request("cosmos.auth.v1beta1.Query","Accounts",r).then(e=>t.QueryAccountsResponse.decode(new a.BinaryReader(e)))}Account(e){let r=t.QueryAccountRequest.encode(e).finish();return this.rpc.request("cosmos.auth.v1beta1.Query","Account",r).then(e=>t.QueryAccountResponse.decode(new a.BinaryReader(e)))}AccountAddressByID(e){let r=t.QueryAccountAddressByIDRequest.encode(e).finish();return this.rpc.request("cosmos.auth.v1beta1.Query","AccountAddressByID",r).then(e=>t.QueryAccountAddressByIDResponse.decode(new a.BinaryReader(e)))}Params(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.QueryParamsRequest.encode(e).finish();return this.rpc.request("cosmos.auth.v1beta1.Query","Params",r).then(e=>t.QueryParamsResponse.decode(new a.BinaryReader(e)))}ModuleAccounts(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.QueryModuleAccountsRequest.encode(e).finish();return this.rpc.request("cosmos.auth.v1beta1.Query","ModuleAccounts",r).then(e=>t.QueryModuleAccountsResponse.decode(new a.BinaryReader(e)))}ModuleAccountByName(e){let r=t.QueryModuleAccountByNameRequest.encode(e).finish();return this.rpc.request("cosmos.auth.v1beta1.Query","ModuleAccountByName",r).then(e=>t.QueryModuleAccountByNameResponse.decode(new a.BinaryReader(e)))}Bech32Prefix(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.Bech32PrefixRequest.encode(e).finish();return this.rpc.request("cosmos.auth.v1beta1.Query","Bech32Prefix",r).then(e=>t.Bech32PrefixResponse.decode(new a.BinaryReader(e)))}AddressBytesToString(e){let r=t.AddressBytesToStringRequest.encode(e).finish();return this.rpc.request("cosmos.auth.v1beta1.Query","AddressBytesToString",r).then(e=>t.AddressBytesToStringResponse.decode(new a.BinaryReader(e)))}AddressStringToBytes(e){let r=t.AddressStringToBytesRequest.encode(e).finish();return this.rpc.request("cosmos.auth.v1beta1.Query","AddressStringToBytes",r).then(e=>t.AddressStringToBytesResponse.decode(new a.BinaryReader(e)))}AccountInfo(e){let r=t.QueryAccountInfoRequest.encode(e).finish();return this.rpc.request("cosmos.auth.v1beta1.Query","AccountInfo",r).then(e=>t.QueryAccountInfoResponse.decode(new a.BinaryReader(e)))}constructor(e){this.rpc=e,this.Accounts=this.Accounts.bind(this),this.Account=this.Account.bind(this),this.AccountAddressByID=this.AccountAddressByID.bind(this),this.Params=this.Params.bind(this),this.ModuleAccounts=this.ModuleAccounts.bind(this),this.ModuleAccountByName=this.ModuleAccountByName.bind(this),this.Bech32Prefix=this.Bech32Prefix.bind(this),this.AddressBytesToString=this.AddressBytesToString.bind(this),this.AddressStringToBytes=this.AddressStringToBytes.bind(this),this.AccountInfo=this.AccountInfo.bind(this)}}t.QueryClientImpl=R},51564:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GrantQueueItem=t.GrantAuthorization=t.Grant=t.GenericAuthorization=t.protobufPackage=void 0;let n=r(11879),i=r(9990),o=r(46554),a=r(99133);function s(){return{msg:""}}function l(){return{authorization:void 0,expiration:void 0}}function u(){return{granter:"",grantee:"",authorization:void 0,expiration:void 0}}function d(){return{msgTypeUrls:[]}}t.protobufPackage="cosmos.authz.v1beta1",t.GenericAuthorization={typeUrl:"/cosmos.authz.v1beta1.GenericAuthorization",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.msg&&t.uint32(10).string(e.msg),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=s();for(;r.pos>>3==1?i.msg=r.string():r.skipType(7&e)}return i},fromJSON(e){let t=s();return(0,a.isSet)(e.msg)&&(t.msg=String(e.msg)),t},toJSON(e){let t={};return void 0!==e.msg&&(t.msg=e.msg),t},fromPartial(e){var t;let r=s();return r.msg=null!==(t=e.msg)&&void 0!==t?t:"",r}},t.Grant={typeUrl:"/cosmos.authz.v1beta1.Grant",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return void 0!==e.authorization&&n.Any.encode(e.authorization,t.uint32(10).fork()).ldelim(),void 0!==e.expiration&&i.Timestamp.encode(e.expiration,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),a=void 0===t?r.len:r.pos+t,s=l();for(;r.pos>>3){case 1:s.authorization=n.Any.decode(r,r.uint32());break;case 2:s.expiration=i.Timestamp.decode(r,r.uint32());break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=l();return(0,a.isSet)(e.authorization)&&(t.authorization=n.Any.fromJSON(e.authorization)),(0,a.isSet)(e.expiration)&&(t.expiration=(0,a.fromJsonTimestamp)(e.expiration)),t},toJSON(e){let t={};return void 0!==e.authorization&&(t.authorization=e.authorization?n.Any.toJSON(e.authorization):void 0),void 0!==e.expiration&&(t.expiration=(0,a.fromTimestamp)(e.expiration).toISOString()),t},fromPartial(e){let t=l();return void 0!==e.authorization&&null!==e.authorization&&(t.authorization=n.Any.fromPartial(e.authorization)),void 0!==e.expiration&&null!==e.expiration&&(t.expiration=i.Timestamp.fromPartial(e.expiration)),t}},t.GrantAuthorization={typeUrl:"/cosmos.authz.v1beta1.GrantAuthorization",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.granter&&t.uint32(10).string(e.granter),""!==e.grantee&&t.uint32(18).string(e.grantee),void 0!==e.authorization&&n.Any.encode(e.authorization,t.uint32(26).fork()).ldelim(),void 0!==e.expiration&&i.Timestamp.encode(e.expiration,t.uint32(34).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),a=void 0===t?r.len:r.pos+t,s=u();for(;r.pos>>3){case 1:s.granter=r.string();break;case 2:s.grantee=r.string();break;case 3:s.authorization=n.Any.decode(r,r.uint32());break;case 4:s.expiration=i.Timestamp.decode(r,r.uint32());break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=u();return(0,a.isSet)(e.granter)&&(t.granter=String(e.granter)),(0,a.isSet)(e.grantee)&&(t.grantee=String(e.grantee)),(0,a.isSet)(e.authorization)&&(t.authorization=n.Any.fromJSON(e.authorization)),(0,a.isSet)(e.expiration)&&(t.expiration=(0,a.fromJsonTimestamp)(e.expiration)),t},toJSON(e){let t={};return void 0!==e.granter&&(t.granter=e.granter),void 0!==e.grantee&&(t.grantee=e.grantee),void 0!==e.authorization&&(t.authorization=e.authorization?n.Any.toJSON(e.authorization):void 0),void 0!==e.expiration&&(t.expiration=(0,a.fromTimestamp)(e.expiration).toISOString()),t},fromPartial(e){var t,r;let o=u();return o.granter=null!==(t=e.granter)&&void 0!==t?t:"",o.grantee=null!==(r=e.grantee)&&void 0!==r?r:"",void 0!==e.authorization&&null!==e.authorization&&(o.authorization=n.Any.fromPartial(e.authorization)),void 0!==e.expiration&&null!==e.expiration&&(o.expiration=i.Timestamp.fromPartial(e.expiration)),o}},t.GrantQueueItem={typeUrl:"/cosmos.authz.v1beta1.GrantQueueItem",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of e.msgTypeUrls)t.uint32(10).string(r);return t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=d();for(;r.pos>>3==1?i.msgTypeUrls.push(r.string()):r.skipType(7&e)}return i},fromJSON(e){let t=d();return Array.isArray(null==e?void 0:e.msgTypeUrls)&&(t.msgTypeUrls=e.msgTypeUrls.map(e=>String(e))),t},toJSON(e){let t={};return e.msgTypeUrls?t.msgTypeUrls=e.msgTypeUrls.map(e=>e):t.msgTypeUrls=[],t},fromPartial(e){var t;let r=d();return r.msgTypeUrls=(null===(t=e.msgTypeUrls)||void 0===t?void 0:t.map(e=>e))||[],r}}},629:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QueryClientImpl=t.QueryGranteeGrantsResponse=t.QueryGranteeGrantsRequest=t.QueryGranterGrantsResponse=t.QueryGranterGrantsRequest=t.QueryGrantsResponse=t.QueryGrantsRequest=t.protobufPackage=void 0;let n=r(86141),i=r(51564),o=r(46554),a=r(99133);function s(){return{granter:"",grantee:"",msgTypeUrl:"",pagination:void 0}}function l(){return{grants:[],pagination:void 0}}function u(){return{granter:"",pagination:void 0}}function d(){return{grants:[],pagination:void 0}}function c(){return{grantee:"",pagination:void 0}}function p(){return{grants:[],pagination:void 0}}t.protobufPackage="cosmos.authz.v1beta1",t.QueryGrantsRequest={typeUrl:"/cosmos.authz.v1beta1.QueryGrantsRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.granter&&t.uint32(10).string(e.granter),""!==e.grantee&&t.uint32(18).string(e.grantee),""!==e.msgTypeUrl&&t.uint32(26).string(e.msgTypeUrl),void 0!==e.pagination&&n.PageRequest.encode(e.pagination,t.uint32(34).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=s();for(;r.pos>>3){case 1:a.granter=r.string();break;case 2:a.grantee=r.string();break;case 3:a.msgTypeUrl=r.string();break;case 4:a.pagination=n.PageRequest.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=s();return(0,a.isSet)(e.granter)&&(t.granter=String(e.granter)),(0,a.isSet)(e.grantee)&&(t.grantee=String(e.grantee)),(0,a.isSet)(e.msgTypeUrl)&&(t.msgTypeUrl=String(e.msgTypeUrl)),(0,a.isSet)(e.pagination)&&(t.pagination=n.PageRequest.fromJSON(e.pagination)),t},toJSON(e){let t={};return void 0!==e.granter&&(t.granter=e.granter),void 0!==e.grantee&&(t.grantee=e.grantee),void 0!==e.msgTypeUrl&&(t.msgTypeUrl=e.msgTypeUrl),void 0!==e.pagination&&(t.pagination=e.pagination?n.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){var t,r,i;let o=s();return o.granter=null!==(t=e.granter)&&void 0!==t?t:"",o.grantee=null!==(r=e.grantee)&&void 0!==r?r:"",o.msgTypeUrl=null!==(i=e.msgTypeUrl)&&void 0!==i?i:"",void 0!==e.pagination&&null!==e.pagination&&(o.pagination=n.PageRequest.fromPartial(e.pagination)),o}},t.QueryGrantsResponse={typeUrl:"/cosmos.authz.v1beta1.QueryGrantsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of e.grants)i.Grant.encode(r,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&n.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),a=void 0===t?r.len:r.pos+t,s=l();for(;r.pos>>3){case 1:s.grants.push(i.Grant.decode(r,r.uint32()));break;case 2:s.pagination=n.PageResponse.decode(r,r.uint32());break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=l();return Array.isArray(null==e?void 0:e.grants)&&(t.grants=e.grants.map(e=>i.Grant.fromJSON(e))),(0,a.isSet)(e.pagination)&&(t.pagination=n.PageResponse.fromJSON(e.pagination)),t},toJSON(e){let t={};return e.grants?t.grants=e.grants.map(e=>e?i.Grant.toJSON(e):void 0):t.grants=[],void 0!==e.pagination&&(t.pagination=e.pagination?n.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=l();return r.grants=(null===(t=e.grants)||void 0===t?void 0:t.map(e=>i.Grant.fromPartial(e)))||[],void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageResponse.fromPartial(e.pagination)),r}},t.QueryGranterGrantsRequest={typeUrl:"/cosmos.authz.v1beta1.QueryGranterGrantsRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.granter&&t.uint32(10).string(e.granter),void 0!==e.pagination&&n.PageRequest.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=u();for(;r.pos>>3){case 1:a.granter=r.string();break;case 2:a.pagination=n.PageRequest.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=u();return(0,a.isSet)(e.granter)&&(t.granter=String(e.granter)),(0,a.isSet)(e.pagination)&&(t.pagination=n.PageRequest.fromJSON(e.pagination)),t},toJSON(e){let t={};return void 0!==e.granter&&(t.granter=e.granter),void 0!==e.pagination&&(t.pagination=e.pagination?n.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=u();return r.granter=null!==(t=e.granter)&&void 0!==t?t:"",void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageRequest.fromPartial(e.pagination)),r}},t.QueryGranterGrantsResponse={typeUrl:"/cosmos.authz.v1beta1.QueryGranterGrantsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of e.grants)i.GrantAuthorization.encode(r,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&n.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),a=void 0===t?r.len:r.pos+t,s=d();for(;r.pos>>3){case 1:s.grants.push(i.GrantAuthorization.decode(r,r.uint32()));break;case 2:s.pagination=n.PageResponse.decode(r,r.uint32());break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=d();return Array.isArray(null==e?void 0:e.grants)&&(t.grants=e.grants.map(e=>i.GrantAuthorization.fromJSON(e))),(0,a.isSet)(e.pagination)&&(t.pagination=n.PageResponse.fromJSON(e.pagination)),t},toJSON(e){let t={};return e.grants?t.grants=e.grants.map(e=>e?i.GrantAuthorization.toJSON(e):void 0):t.grants=[],void 0!==e.pagination&&(t.pagination=e.pagination?n.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=d();return r.grants=(null===(t=e.grants)||void 0===t?void 0:t.map(e=>i.GrantAuthorization.fromPartial(e)))||[],void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageResponse.fromPartial(e.pagination)),r}},t.QueryGranteeGrantsRequest={typeUrl:"/cosmos.authz.v1beta1.QueryGranteeGrantsRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.grantee&&t.uint32(10).string(e.grantee),void 0!==e.pagination&&n.PageRequest.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=c();for(;r.pos>>3){case 1:a.grantee=r.string();break;case 2:a.pagination=n.PageRequest.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=c();return(0,a.isSet)(e.grantee)&&(t.grantee=String(e.grantee)),(0,a.isSet)(e.pagination)&&(t.pagination=n.PageRequest.fromJSON(e.pagination)),t},toJSON(e){let t={};return void 0!==e.grantee&&(t.grantee=e.grantee),void 0!==e.pagination&&(t.pagination=e.pagination?n.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=c();return r.grantee=null!==(t=e.grantee)&&void 0!==t?t:"",void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageRequest.fromPartial(e.pagination)),r}},t.QueryGranteeGrantsResponse={typeUrl:"/cosmos.authz.v1beta1.QueryGranteeGrantsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of e.grants)i.GrantAuthorization.encode(r,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&n.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),a=void 0===t?r.len:r.pos+t,s=p();for(;r.pos>>3){case 1:s.grants.push(i.GrantAuthorization.decode(r,r.uint32()));break;case 2:s.pagination=n.PageResponse.decode(r,r.uint32());break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=p();return Array.isArray(null==e?void 0:e.grants)&&(t.grants=e.grants.map(e=>i.GrantAuthorization.fromJSON(e))),(0,a.isSet)(e.pagination)&&(t.pagination=n.PageResponse.fromJSON(e.pagination)),t},toJSON(e){let t={};return e.grants?t.grants=e.grants.map(e=>e?i.GrantAuthorization.toJSON(e):void 0):t.grants=[],void 0!==e.pagination&&(t.pagination=e.pagination?n.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=p();return r.grants=(null===(t=e.grants)||void 0===t?void 0:t.map(e=>i.GrantAuthorization.fromPartial(e)))||[],void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageResponse.fromPartial(e.pagination)),r}};class f{Grants(e){let r=t.QueryGrantsRequest.encode(e).finish();return this.rpc.request("cosmos.authz.v1beta1.Query","Grants",r).then(e=>t.QueryGrantsResponse.decode(new o.BinaryReader(e)))}GranterGrants(e){let r=t.QueryGranterGrantsRequest.encode(e).finish();return this.rpc.request("cosmos.authz.v1beta1.Query","GranterGrants",r).then(e=>t.QueryGranterGrantsResponse.decode(new o.BinaryReader(e)))}GranteeGrants(e){let r=t.QueryGranteeGrantsRequest.encode(e).finish();return this.rpc.request("cosmos.authz.v1beta1.Query","GranteeGrants",r).then(e=>t.QueryGranteeGrantsResponse.decode(new o.BinaryReader(e)))}constructor(e){this.rpc=e,this.Grants=this.Grants.bind(this),this.GranterGrants=this.GranterGrants.bind(this),this.GranteeGrants=this.GranteeGrants.bind(this)}}t.QueryClientImpl=f},97481:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MsgClientImpl=t.MsgRevokeResponse=t.MsgRevoke=t.MsgGrantResponse=t.MsgExec=t.MsgExecResponse=t.MsgGrant=t.protobufPackage=void 0;let n=r(51564),i=r(11879),o=r(46554),a=r(99133);function s(){return{granter:"",grantee:"",grant:n.Grant.fromPartial({})}}function l(){return{results:[]}}function u(){return{grantee:"",msgs:[]}}function d(){return{}}function c(){return{granter:"",grantee:"",msgTypeUrl:""}}function p(){return{}}t.protobufPackage="cosmos.authz.v1beta1",t.MsgGrant={typeUrl:"/cosmos.authz.v1beta1.MsgGrant",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.granter&&t.uint32(10).string(e.granter),""!==e.grantee&&t.uint32(18).string(e.grantee),void 0!==e.grant&&n.Grant.encode(e.grant,t.uint32(26).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=s();for(;r.pos>>3){case 1:a.granter=r.string();break;case 2:a.grantee=r.string();break;case 3:a.grant=n.Grant.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=s();return(0,a.isSet)(e.granter)&&(t.granter=String(e.granter)),(0,a.isSet)(e.grantee)&&(t.grantee=String(e.grantee)),(0,a.isSet)(e.grant)&&(t.grant=n.Grant.fromJSON(e.grant)),t},toJSON(e){let t={};return void 0!==e.granter&&(t.granter=e.granter),void 0!==e.grantee&&(t.grantee=e.grantee),void 0!==e.grant&&(t.grant=e.grant?n.Grant.toJSON(e.grant):void 0),t},fromPartial(e){var t,r;let i=s();return i.granter=null!==(t=e.granter)&&void 0!==t?t:"",i.grantee=null!==(r=e.grantee)&&void 0!==r?r:"",void 0!==e.grant&&null!==e.grant&&(i.grant=n.Grant.fromPartial(e.grant)),i}},t.MsgExecResponse={typeUrl:"/cosmos.authz.v1beta1.MsgExecResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of e.results)t.uint32(10).bytes(r);return t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=l();for(;r.pos>>3==1?i.results.push(r.bytes()):r.skipType(7&e)}return i},fromJSON(e){let t=l();return Array.isArray(null==e?void 0:e.results)&&(t.results=e.results.map(e=>(0,a.bytesFromBase64)(e))),t},toJSON(e){let t={};return e.results?t.results=e.results.map(e=>(0,a.base64FromBytes)(void 0!==e?e:new Uint8Array)):t.results=[],t},fromPartial(e){var t;let r=l();return r.results=(null===(t=e.results)||void 0===t?void 0:t.map(e=>e))||[],r}},t.MsgExec={typeUrl:"/cosmos.authz.v1beta1.MsgExec",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of(""!==e.grantee&&t.uint32(10).string(e.grantee),e.msgs))i.Any.encode(r,t.uint32(18).fork()).ldelim();return t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,a=u();for(;r.pos>>3){case 1:a.grantee=r.string();break;case 2:a.msgs.push(i.Any.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=u();return(0,a.isSet)(e.grantee)&&(t.grantee=String(e.grantee)),Array.isArray(null==e?void 0:e.msgs)&&(t.msgs=e.msgs.map(e=>i.Any.fromJSON(e))),t},toJSON(e){let t={};return void 0!==e.grantee&&(t.grantee=e.grantee),e.msgs?t.msgs=e.msgs.map(e=>e?i.Any.toJSON(e):void 0):t.msgs=[],t},fromPartial(e){var t,r;let n=u();return n.grantee=null!==(r=e.grantee)&&void 0!==r?r:"",n.msgs=(null===(t=e.msgs)||void 0===t?void 0:t.map(e=>i.Any.fromPartial(e)))||[],n}},t.MsgGrantResponse={typeUrl:"/cosmos.authz.v1beta1.MsgGrantResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=d();for(;r.posd(),toJSON:e=>({}),fromPartial:e=>d()},t.MsgRevoke={typeUrl:"/cosmos.authz.v1beta1.MsgRevoke",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.granter&&t.uint32(10).string(e.granter),""!==e.grantee&&t.uint32(18).string(e.grantee),""!==e.msgTypeUrl&&t.uint32(26).string(e.msgTypeUrl),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=c();for(;r.pos>>3){case 1:i.granter=r.string();break;case 2:i.grantee=r.string();break;case 3:i.msgTypeUrl=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=c();return(0,a.isSet)(e.granter)&&(t.granter=String(e.granter)),(0,a.isSet)(e.grantee)&&(t.grantee=String(e.grantee)),(0,a.isSet)(e.msgTypeUrl)&&(t.msgTypeUrl=String(e.msgTypeUrl)),t},toJSON(e){let t={};return void 0!==e.granter&&(t.granter=e.granter),void 0!==e.grantee&&(t.grantee=e.grantee),void 0!==e.msgTypeUrl&&(t.msgTypeUrl=e.msgTypeUrl),t},fromPartial(e){var t,r,n;let i=c();return i.granter=null!==(t=e.granter)&&void 0!==t?t:"",i.grantee=null!==(r=e.grantee)&&void 0!==r?r:"",i.msgTypeUrl=null!==(n=e.msgTypeUrl)&&void 0!==n?n:"",i}},t.MsgRevokeResponse={typeUrl:"/cosmos.authz.v1beta1.MsgRevokeResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=p();for(;r.posp(),toJSON:e=>({}),fromPartial:e=>p()};class f{Grant(e){let r=t.MsgGrant.encode(e).finish();return this.rpc.request("cosmos.authz.v1beta1.Msg","Grant",r).then(e=>t.MsgGrantResponse.decode(new o.BinaryReader(e)))}Exec(e){let r=t.MsgExec.encode(e).finish();return this.rpc.request("cosmos.authz.v1beta1.Msg","Exec",r).then(e=>t.MsgExecResponse.decode(new o.BinaryReader(e)))}Revoke(e){let r=t.MsgRevoke.encode(e).finish();return this.rpc.request("cosmos.authz.v1beta1.Msg","Revoke",r).then(e=>t.MsgRevokeResponse.decode(new o.BinaryReader(e)))}constructor(e){this.rpc=e,this.Grant=this.Grant.bind(this),this.Exec=this.Exec.bind(this),this.Revoke=this.Revoke.bind(this)}}t.MsgClientImpl=f},42951:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Metadata=t.DenomUnit=t.Supply=t.Output=t.Input=t.SendEnabled=t.Params=t.protobufPackage=void 0;let n=r(14841),i=r(46554),o=r(99133);function a(){return{sendEnabled:[],defaultSendEnabled:!1}}function s(){return{denom:"",enabled:!1}}function l(){return{address:"",coins:[]}}function u(){return{address:"",coins:[]}}function d(){return{total:[]}}function c(){return{denom:"",exponent:0,aliases:[]}}function p(){return{description:"",denomUnits:[],base:"",display:"",name:"",symbol:"",uri:"",uriHash:""}}t.protobufPackage="cosmos.bank.v1beta1",t.Params={typeUrl:"/cosmos.bank.v1beta1.Params",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();for(let n of e.sendEnabled)t.SendEnabled.encode(n,r.uint32(10).fork()).ldelim();return!0===e.defaultSendEnabled&&r.uint32(16).bool(e.defaultSendEnabled),r},decode(e,r){let n=e instanceof i.BinaryReader?e:new i.BinaryReader(e),o=void 0===r?n.len:n.pos+r,s=a();for(;n.pos>>3){case 1:s.sendEnabled.push(t.SendEnabled.decode(n,n.uint32()));break;case 2:s.defaultSendEnabled=n.bool();break;default:n.skipType(7&e)}}return s},fromJSON(e){let r=a();return Array.isArray(null==e?void 0:e.sendEnabled)&&(r.sendEnabled=e.sendEnabled.map(e=>t.SendEnabled.fromJSON(e))),(0,o.isSet)(e.defaultSendEnabled)&&(r.defaultSendEnabled=!!e.defaultSendEnabled),r},toJSON(e){let r={};return e.sendEnabled?r.sendEnabled=e.sendEnabled.map(e=>e?t.SendEnabled.toJSON(e):void 0):r.sendEnabled=[],void 0!==e.defaultSendEnabled&&(r.defaultSendEnabled=e.defaultSendEnabled),r},fromPartial(e){var r,n;let i=a();return i.sendEnabled=(null===(r=e.sendEnabled)||void 0===r?void 0:r.map(e=>t.SendEnabled.fromPartial(e)))||[],i.defaultSendEnabled=null!==(n=e.defaultSendEnabled)&&void 0!==n&&n,i}},t.SendEnabled={typeUrl:"/cosmos.bank.v1beta1.SendEnabled",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();return""!==e.denom&&t.uint32(10).string(e.denom),!0===e.enabled&&t.uint32(16).bool(e.enabled),t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=s();for(;r.pos>>3){case 1:o.denom=r.string();break;case 2:o.enabled=r.bool();break;default:r.skipType(7&e)}}return o},fromJSON(e){let t=s();return(0,o.isSet)(e.denom)&&(t.denom=String(e.denom)),(0,o.isSet)(e.enabled)&&(t.enabled=!!e.enabled),t},toJSON(e){let t={};return void 0!==e.denom&&(t.denom=e.denom),void 0!==e.enabled&&(t.enabled=e.enabled),t},fromPartial(e){var t,r;let n=s();return n.denom=null!==(t=e.denom)&&void 0!==t?t:"",n.enabled=null!==(r=e.enabled)&&void 0!==r&&r,n}},t.Input={typeUrl:"/cosmos.bank.v1beta1.Input",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();for(let r of(""!==e.address&&t.uint32(10).string(e.address),e.coins))n.Coin.encode(r,t.uint32(18).fork()).ldelim();return t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),o=void 0===t?r.len:r.pos+t,a=l();for(;r.pos>>3){case 1:a.address=r.string();break;case 2:a.coins.push(n.Coin.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=l();return(0,o.isSet)(e.address)&&(t.address=String(e.address)),Array.isArray(null==e?void 0:e.coins)&&(t.coins=e.coins.map(e=>n.Coin.fromJSON(e))),t},toJSON(e){let t={};return void 0!==e.address&&(t.address=e.address),e.coins?t.coins=e.coins.map(e=>e?n.Coin.toJSON(e):void 0):t.coins=[],t},fromPartial(e){var t,r;let i=l();return i.address=null!==(r=e.address)&&void 0!==r?r:"",i.coins=(null===(t=e.coins)||void 0===t?void 0:t.map(e=>n.Coin.fromPartial(e)))||[],i}},t.Output={typeUrl:"/cosmos.bank.v1beta1.Output",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();for(let r of(""!==e.address&&t.uint32(10).string(e.address),e.coins))n.Coin.encode(r,t.uint32(18).fork()).ldelim();return t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),o=void 0===t?r.len:r.pos+t,a=u();for(;r.pos>>3){case 1:a.address=r.string();break;case 2:a.coins.push(n.Coin.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=u();return(0,o.isSet)(e.address)&&(t.address=String(e.address)),Array.isArray(null==e?void 0:e.coins)&&(t.coins=e.coins.map(e=>n.Coin.fromJSON(e))),t},toJSON(e){let t={};return void 0!==e.address&&(t.address=e.address),e.coins?t.coins=e.coins.map(e=>e?n.Coin.toJSON(e):void 0):t.coins=[],t},fromPartial(e){var t,r;let i=u();return i.address=null!==(r=e.address)&&void 0!==r?r:"",i.coins=(null===(t=e.coins)||void 0===t?void 0:t.map(e=>n.Coin.fromPartial(e)))||[],i}},t.Supply={typeUrl:"/cosmos.bank.v1beta1.Supply",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();for(let r of e.total)n.Coin.encode(r,t.uint32(10).fork()).ldelim();return t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),o=void 0===t?r.len:r.pos+t,a=d();for(;r.pos>>3==1?a.total.push(n.Coin.decode(r,r.uint32())):r.skipType(7&e)}return a},fromJSON(e){let t=d();return Array.isArray(null==e?void 0:e.total)&&(t.total=e.total.map(e=>n.Coin.fromJSON(e))),t},toJSON(e){let t={};return e.total?t.total=e.total.map(e=>e?n.Coin.toJSON(e):void 0):t.total=[],t},fromPartial(e){var t;let r=d();return r.total=(null===(t=e.total)||void 0===t?void 0:t.map(e=>n.Coin.fromPartial(e)))||[],r}},t.DenomUnit={typeUrl:"/cosmos.bank.v1beta1.DenomUnit",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();for(let r of(""!==e.denom&&t.uint32(10).string(e.denom),0!==e.exponent&&t.uint32(16).uint32(e.exponent),e.aliases))t.uint32(26).string(r);return t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=c();for(;r.pos>>3){case 1:o.denom=r.string();break;case 2:o.exponent=r.uint32();break;case 3:o.aliases.push(r.string());break;default:r.skipType(7&e)}}return o},fromJSON(e){let t=c();return(0,o.isSet)(e.denom)&&(t.denom=String(e.denom)),(0,o.isSet)(e.exponent)&&(t.exponent=Number(e.exponent)),Array.isArray(null==e?void 0:e.aliases)&&(t.aliases=e.aliases.map(e=>String(e))),t},toJSON(e){let t={};return void 0!==e.denom&&(t.denom=e.denom),void 0!==e.exponent&&(t.exponent=Math.round(e.exponent)),e.aliases?t.aliases=e.aliases.map(e=>e):t.aliases=[],t},fromPartial(e){var t,r,n;let i=c();return i.denom=null!==(r=e.denom)&&void 0!==r?r:"",i.exponent=null!==(n=e.exponent)&&void 0!==n?n:0,i.aliases=(null===(t=e.aliases)||void 0===t?void 0:t.map(e=>e))||[],i}},t.Metadata={typeUrl:"/cosmos.bank.v1beta1.Metadata",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();for(let n of(""!==e.description&&r.uint32(10).string(e.description),e.denomUnits))t.DenomUnit.encode(n,r.uint32(18).fork()).ldelim();return""!==e.base&&r.uint32(26).string(e.base),""!==e.display&&r.uint32(34).string(e.display),""!==e.name&&r.uint32(42).string(e.name),""!==e.symbol&&r.uint32(50).string(e.symbol),""!==e.uri&&r.uint32(58).string(e.uri),""!==e.uriHash&&r.uint32(66).string(e.uriHash),r},decode(e,r){let n=e instanceof i.BinaryReader?e:new i.BinaryReader(e),o=void 0===r?n.len:n.pos+r,a=p();for(;n.pos>>3){case 1:a.description=n.string();break;case 2:a.denomUnits.push(t.DenomUnit.decode(n,n.uint32()));break;case 3:a.base=n.string();break;case 4:a.display=n.string();break;case 5:a.name=n.string();break;case 6:a.symbol=n.string();break;case 7:a.uri=n.string();break;case 8:a.uriHash=n.string();break;default:n.skipType(7&e)}}return a},fromJSON(e){let r=p();return(0,o.isSet)(e.description)&&(r.description=String(e.description)),Array.isArray(null==e?void 0:e.denomUnits)&&(r.denomUnits=e.denomUnits.map(e=>t.DenomUnit.fromJSON(e))),(0,o.isSet)(e.base)&&(r.base=String(e.base)),(0,o.isSet)(e.display)&&(r.display=String(e.display)),(0,o.isSet)(e.name)&&(r.name=String(e.name)),(0,o.isSet)(e.symbol)&&(r.symbol=String(e.symbol)),(0,o.isSet)(e.uri)&&(r.uri=String(e.uri)),(0,o.isSet)(e.uriHash)&&(r.uriHash=String(e.uriHash)),r},toJSON(e){let r={};return void 0!==e.description&&(r.description=e.description),e.denomUnits?r.denomUnits=e.denomUnits.map(e=>e?t.DenomUnit.toJSON(e):void 0):r.denomUnits=[],void 0!==e.base&&(r.base=e.base),void 0!==e.display&&(r.display=e.display),void 0!==e.name&&(r.name=e.name),void 0!==e.symbol&&(r.symbol=e.symbol),void 0!==e.uri&&(r.uri=e.uri),void 0!==e.uriHash&&(r.uriHash=e.uriHash),r},fromPartial(e){var r,n,i,o,a,s,l,u;let d=p();return d.description=null!==(n=e.description)&&void 0!==n?n:"",d.denomUnits=(null===(r=e.denomUnits)||void 0===r?void 0:r.map(e=>t.DenomUnit.fromPartial(e)))||[],d.base=null!==(i=e.base)&&void 0!==i?i:"",d.display=null!==(o=e.display)&&void 0!==o?o:"",d.name=null!==(a=e.name)&&void 0!==a?a:"",d.symbol=null!==(s=e.symbol)&&void 0!==s?s:"",d.uri=null!==(l=e.uri)&&void 0!==l?l:"",d.uriHash=null!==(u=e.uriHash)&&void 0!==u?u:"",d}}},4818:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QueryClientImpl=t.QuerySendEnabledResponse=t.QuerySendEnabledRequest=t.QueryDenomOwnersResponse=t.DenomOwner=t.QueryDenomOwnersRequest=t.QueryDenomMetadataResponse=t.QueryDenomMetadataRequest=t.QueryDenomsMetadataResponse=t.QueryDenomsMetadataRequest=t.QueryParamsResponse=t.QueryParamsRequest=t.QuerySupplyOfResponse=t.QuerySupplyOfRequest=t.QueryTotalSupplyResponse=t.QueryTotalSupplyRequest=t.QuerySpendableBalanceByDenomResponse=t.QuerySpendableBalanceByDenomRequest=t.QuerySpendableBalancesResponse=t.QuerySpendableBalancesRequest=t.QueryAllBalancesResponse=t.QueryAllBalancesRequest=t.QueryBalanceResponse=t.QueryBalanceRequest=t.protobufPackage=void 0;let n=r(86141),i=r(14841),o=r(42951),a=r(46554),s=r(99133);function l(){return{address:"",denom:""}}function u(){return{balance:void 0}}function d(){return{address:"",pagination:void 0}}function c(){return{balances:[],pagination:void 0}}function p(){return{address:"",pagination:void 0}}function f(){return{balances:[],pagination:void 0}}function h(){return{address:"",denom:""}}function g(){return{balance:void 0}}function m(){return{pagination:void 0}}function y(){return{supply:[],pagination:void 0}}function v(){return{denom:""}}function b(){return{amount:i.Coin.fromPartial({})}}function S(){return{}}function w(){return{params:o.Params.fromPartial({})}}function _(){return{pagination:void 0}}function k(){return{metadatas:[],pagination:void 0}}function O(){return{denom:""}}function P(){return{metadata:o.Metadata.fromPartial({})}}function A(){return{denom:"",pagination:void 0}}function I(){return{address:"",balance:i.Coin.fromPartial({})}}function R(){return{denomOwners:[],pagination:void 0}}function E(){return{denoms:[],pagination:void 0}}function T(){return{sendEnabled:[],pagination:void 0}}t.protobufPackage="cosmos.bank.v1beta1",t.QueryBalanceRequest={typeUrl:"/cosmos.bank.v1beta1.QueryBalanceRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.address&&t.uint32(10).string(e.address),""!==e.denom&&t.uint32(18).string(e.denom),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=l();for(;r.pos>>3){case 1:i.address=r.string();break;case 2:i.denom=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=l();return(0,s.isSet)(e.address)&&(t.address=String(e.address)),(0,s.isSet)(e.denom)&&(t.denom=String(e.denom)),t},toJSON(e){let t={};return void 0!==e.address&&(t.address=e.address),void 0!==e.denom&&(t.denom=e.denom),t},fromPartial(e){var t,r;let n=l();return n.address=null!==(t=e.address)&&void 0!==t?t:"",n.denom=null!==(r=e.denom)&&void 0!==r?r:"",n}},t.QueryBalanceResponse={typeUrl:"/cosmos.bank.v1beta1.QueryBalanceResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return void 0!==e.balance&&i.Coin.encode(e.balance,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=u();for(;r.pos>>3==1?o.balance=i.Coin.decode(r,r.uint32()):r.skipType(7&e)}return o},fromJSON(e){let t=u();return(0,s.isSet)(e.balance)&&(t.balance=i.Coin.fromJSON(e.balance)),t},toJSON(e){let t={};return void 0!==e.balance&&(t.balance=e.balance?i.Coin.toJSON(e.balance):void 0),t},fromPartial(e){let t=u();return void 0!==e.balance&&null!==e.balance&&(t.balance=i.Coin.fromPartial(e.balance)),t}},t.QueryAllBalancesRequest={typeUrl:"/cosmos.bank.v1beta1.QueryAllBalancesRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.address&&t.uint32(10).string(e.address),void 0!==e.pagination&&n.PageRequest.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),i=void 0===t?r.len:r.pos+t,o=d();for(;r.pos>>3){case 1:o.address=r.string();break;case 2:o.pagination=n.PageRequest.decode(r,r.uint32());break;default:r.skipType(7&e)}}return o},fromJSON(e){let t=d();return(0,s.isSet)(e.address)&&(t.address=String(e.address)),(0,s.isSet)(e.pagination)&&(t.pagination=n.PageRequest.fromJSON(e.pagination)),t},toJSON(e){let t={};return void 0!==e.address&&(t.address=e.address),void 0!==e.pagination&&(t.pagination=e.pagination?n.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=d();return r.address=null!==(t=e.address)&&void 0!==t?t:"",void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageRequest.fromPartial(e.pagination)),r}},t.QueryAllBalancesResponse={typeUrl:"/cosmos.bank.v1beta1.QueryAllBalancesResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();for(let r of e.balances)i.Coin.encode(r,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&n.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),o=void 0===t?r.len:r.pos+t,s=c();for(;r.pos>>3){case 1:s.balances.push(i.Coin.decode(r,r.uint32()));break;case 2:s.pagination=n.PageResponse.decode(r,r.uint32());break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=c();return Array.isArray(null==e?void 0:e.balances)&&(t.balances=e.balances.map(e=>i.Coin.fromJSON(e))),(0,s.isSet)(e.pagination)&&(t.pagination=n.PageResponse.fromJSON(e.pagination)),t},toJSON(e){let t={};return e.balances?t.balances=e.balances.map(e=>e?i.Coin.toJSON(e):void 0):t.balances=[],void 0!==e.pagination&&(t.pagination=e.pagination?n.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=c();return r.balances=(null===(t=e.balances)||void 0===t?void 0:t.map(e=>i.Coin.fromPartial(e)))||[],void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageResponse.fromPartial(e.pagination)),r}},t.QuerySpendableBalancesRequest={typeUrl:"/cosmos.bank.v1beta1.QuerySpendableBalancesRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.address&&t.uint32(10).string(e.address),void 0!==e.pagination&&n.PageRequest.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),i=void 0===t?r.len:r.pos+t,o=p();for(;r.pos>>3){case 1:o.address=r.string();break;case 2:o.pagination=n.PageRequest.decode(r,r.uint32());break;default:r.skipType(7&e)}}return o},fromJSON(e){let t=p();return(0,s.isSet)(e.address)&&(t.address=String(e.address)),(0,s.isSet)(e.pagination)&&(t.pagination=n.PageRequest.fromJSON(e.pagination)),t},toJSON(e){let t={};return void 0!==e.address&&(t.address=e.address),void 0!==e.pagination&&(t.pagination=e.pagination?n.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=p();return r.address=null!==(t=e.address)&&void 0!==t?t:"",void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageRequest.fromPartial(e.pagination)),r}},t.QuerySpendableBalancesResponse={typeUrl:"/cosmos.bank.v1beta1.QuerySpendableBalancesResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();for(let r of e.balances)i.Coin.encode(r,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&n.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),o=void 0===t?r.len:r.pos+t,s=f();for(;r.pos>>3){case 1:s.balances.push(i.Coin.decode(r,r.uint32()));break;case 2:s.pagination=n.PageResponse.decode(r,r.uint32());break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=f();return Array.isArray(null==e?void 0:e.balances)&&(t.balances=e.balances.map(e=>i.Coin.fromJSON(e))),(0,s.isSet)(e.pagination)&&(t.pagination=n.PageResponse.fromJSON(e.pagination)),t},toJSON(e){let t={};return e.balances?t.balances=e.balances.map(e=>e?i.Coin.toJSON(e):void 0):t.balances=[],void 0!==e.pagination&&(t.pagination=e.pagination?n.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=f();return r.balances=(null===(t=e.balances)||void 0===t?void 0:t.map(e=>i.Coin.fromPartial(e)))||[],void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageResponse.fromPartial(e.pagination)),r}},t.QuerySpendableBalanceByDenomRequest={typeUrl:"/cosmos.bank.v1beta1.QuerySpendableBalanceByDenomRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.address&&t.uint32(10).string(e.address),""!==e.denom&&t.uint32(18).string(e.denom),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=h();for(;r.pos>>3){case 1:i.address=r.string();break;case 2:i.denom=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=h();return(0,s.isSet)(e.address)&&(t.address=String(e.address)),(0,s.isSet)(e.denom)&&(t.denom=String(e.denom)),t},toJSON(e){let t={};return void 0!==e.address&&(t.address=e.address),void 0!==e.denom&&(t.denom=e.denom),t},fromPartial(e){var t,r;let n=h();return n.address=null!==(t=e.address)&&void 0!==t?t:"",n.denom=null!==(r=e.denom)&&void 0!==r?r:"",n}},t.QuerySpendableBalanceByDenomResponse={typeUrl:"/cosmos.bank.v1beta1.QuerySpendableBalanceByDenomResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return void 0!==e.balance&&i.Coin.encode(e.balance,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=g();for(;r.pos>>3==1?o.balance=i.Coin.decode(r,r.uint32()):r.skipType(7&e)}return o},fromJSON(e){let t=g();return(0,s.isSet)(e.balance)&&(t.balance=i.Coin.fromJSON(e.balance)),t},toJSON(e){let t={};return void 0!==e.balance&&(t.balance=e.balance?i.Coin.toJSON(e.balance):void 0),t},fromPartial(e){let t=g();return void 0!==e.balance&&null!==e.balance&&(t.balance=i.Coin.fromPartial(e.balance)),t}},t.QueryTotalSupplyRequest={typeUrl:"/cosmos.bank.v1beta1.QueryTotalSupplyRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return void 0!==e.pagination&&n.PageRequest.encode(e.pagination,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),i=void 0===t?r.len:r.pos+t,o=m();for(;r.pos>>3==1?o.pagination=n.PageRequest.decode(r,r.uint32()):r.skipType(7&e)}return o},fromJSON(e){let t=m();return(0,s.isSet)(e.pagination)&&(t.pagination=n.PageRequest.fromJSON(e.pagination)),t},toJSON(e){let t={};return void 0!==e.pagination&&(t.pagination=e.pagination?n.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){let t=m();return void 0!==e.pagination&&null!==e.pagination&&(t.pagination=n.PageRequest.fromPartial(e.pagination)),t}},t.QueryTotalSupplyResponse={typeUrl:"/cosmos.bank.v1beta1.QueryTotalSupplyResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();for(let r of e.supply)i.Coin.encode(r,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&n.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),o=void 0===t?r.len:r.pos+t,s=y();for(;r.pos>>3){case 1:s.supply.push(i.Coin.decode(r,r.uint32()));break;case 2:s.pagination=n.PageResponse.decode(r,r.uint32());break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=y();return Array.isArray(null==e?void 0:e.supply)&&(t.supply=e.supply.map(e=>i.Coin.fromJSON(e))),(0,s.isSet)(e.pagination)&&(t.pagination=n.PageResponse.fromJSON(e.pagination)),t},toJSON(e){let t={};return e.supply?t.supply=e.supply.map(e=>e?i.Coin.toJSON(e):void 0):t.supply=[],void 0!==e.pagination&&(t.pagination=e.pagination?n.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=y();return r.supply=(null===(t=e.supply)||void 0===t?void 0:t.map(e=>i.Coin.fromPartial(e)))||[],void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageResponse.fromPartial(e.pagination)),r}},t.QuerySupplyOfRequest={typeUrl:"/cosmos.bank.v1beta1.QuerySupplyOfRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.denom&&t.uint32(10).string(e.denom),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=v();for(;r.pos>>3==1?i.denom=r.string():r.skipType(7&e)}return i},fromJSON(e){let t=v();return(0,s.isSet)(e.denom)&&(t.denom=String(e.denom)),t},toJSON(e){let t={};return void 0!==e.denom&&(t.denom=e.denom),t},fromPartial(e){var t;let r=v();return r.denom=null!==(t=e.denom)&&void 0!==t?t:"",r}},t.QuerySupplyOfResponse={typeUrl:"/cosmos.bank.v1beta1.QuerySupplyOfResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return void 0!==e.amount&&i.Coin.encode(e.amount,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=b();for(;r.pos>>3==1?o.amount=i.Coin.decode(r,r.uint32()):r.skipType(7&e)}return o},fromJSON(e){let t=b();return(0,s.isSet)(e.amount)&&(t.amount=i.Coin.fromJSON(e.amount)),t},toJSON(e){let t={};return void 0!==e.amount&&(t.amount=e.amount?i.Coin.toJSON(e.amount):void 0),t},fromPartial(e){let t=b();return void 0!==e.amount&&null!==e.amount&&(t.amount=i.Coin.fromPartial(e.amount)),t}},t.QueryParamsRequest={typeUrl:"/cosmos.bank.v1beta1.QueryParamsRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=S();for(;r.posS(),toJSON:e=>({}),fromPartial:e=>S()},t.QueryParamsResponse={typeUrl:"/cosmos.bank.v1beta1.QueryParamsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return void 0!==e.params&&o.Params.encode(e.params,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=w();for(;r.pos>>3==1?i.params=o.Params.decode(r,r.uint32()):r.skipType(7&e)}return i},fromJSON(e){let t=w();return(0,s.isSet)(e.params)&&(t.params=o.Params.fromJSON(e.params)),t},toJSON(e){let t={};return void 0!==e.params&&(t.params=e.params?o.Params.toJSON(e.params):void 0),t},fromPartial(e){let t=w();return void 0!==e.params&&null!==e.params&&(t.params=o.Params.fromPartial(e.params)),t}},t.QueryDenomsMetadataRequest={typeUrl:"/cosmos.bank.v1beta1.QueryDenomsMetadataRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return void 0!==e.pagination&&n.PageRequest.encode(e.pagination,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),i=void 0===t?r.len:r.pos+t,o=_();for(;r.pos>>3==1?o.pagination=n.PageRequest.decode(r,r.uint32()):r.skipType(7&e)}return o},fromJSON(e){let t=_();return(0,s.isSet)(e.pagination)&&(t.pagination=n.PageRequest.fromJSON(e.pagination)),t},toJSON(e){let t={};return void 0!==e.pagination&&(t.pagination=e.pagination?n.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){let t=_();return void 0!==e.pagination&&null!==e.pagination&&(t.pagination=n.PageRequest.fromPartial(e.pagination)),t}},t.QueryDenomsMetadataResponse={typeUrl:"/cosmos.bank.v1beta1.QueryDenomsMetadataResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();for(let r of e.metadatas)o.Metadata.encode(r,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&n.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),i=void 0===t?r.len:r.pos+t,s=k();for(;r.pos>>3){case 1:s.metadatas.push(o.Metadata.decode(r,r.uint32()));break;case 2:s.pagination=n.PageResponse.decode(r,r.uint32());break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=k();return Array.isArray(null==e?void 0:e.metadatas)&&(t.metadatas=e.metadatas.map(e=>o.Metadata.fromJSON(e))),(0,s.isSet)(e.pagination)&&(t.pagination=n.PageResponse.fromJSON(e.pagination)),t},toJSON(e){let t={};return e.metadatas?t.metadatas=e.metadatas.map(e=>e?o.Metadata.toJSON(e):void 0):t.metadatas=[],void 0!==e.pagination&&(t.pagination=e.pagination?n.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=k();return r.metadatas=(null===(t=e.metadatas)||void 0===t?void 0:t.map(e=>o.Metadata.fromPartial(e)))||[],void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageResponse.fromPartial(e.pagination)),r}},t.QueryDenomMetadataRequest={typeUrl:"/cosmos.bank.v1beta1.QueryDenomMetadataRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.denom&&t.uint32(10).string(e.denom),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=O();for(;r.pos>>3==1?i.denom=r.string():r.skipType(7&e)}return i},fromJSON(e){let t=O();return(0,s.isSet)(e.denom)&&(t.denom=String(e.denom)),t},toJSON(e){let t={};return void 0!==e.denom&&(t.denom=e.denom),t},fromPartial(e){var t;let r=O();return r.denom=null!==(t=e.denom)&&void 0!==t?t:"",r}},t.QueryDenomMetadataResponse={typeUrl:"/cosmos.bank.v1beta1.QueryDenomMetadataResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return void 0!==e.metadata&&o.Metadata.encode(e.metadata,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=P();for(;r.pos>>3==1?i.metadata=o.Metadata.decode(r,r.uint32()):r.skipType(7&e)}return i},fromJSON(e){let t=P();return(0,s.isSet)(e.metadata)&&(t.metadata=o.Metadata.fromJSON(e.metadata)),t},toJSON(e){let t={};return void 0!==e.metadata&&(t.metadata=e.metadata?o.Metadata.toJSON(e.metadata):void 0),t},fromPartial(e){let t=P();return void 0!==e.metadata&&null!==e.metadata&&(t.metadata=o.Metadata.fromPartial(e.metadata)),t}},t.QueryDenomOwnersRequest={typeUrl:"/cosmos.bank.v1beta1.QueryDenomOwnersRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.denom&&t.uint32(10).string(e.denom),void 0!==e.pagination&&n.PageRequest.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),i=void 0===t?r.len:r.pos+t,o=A();for(;r.pos>>3){case 1:o.denom=r.string();break;case 2:o.pagination=n.PageRequest.decode(r,r.uint32());break;default:r.skipType(7&e)}}return o},fromJSON(e){let t=A();return(0,s.isSet)(e.denom)&&(t.denom=String(e.denom)),(0,s.isSet)(e.pagination)&&(t.pagination=n.PageRequest.fromJSON(e.pagination)),t},toJSON(e){let t={};return void 0!==e.denom&&(t.denom=e.denom),void 0!==e.pagination&&(t.pagination=e.pagination?n.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=A();return r.denom=null!==(t=e.denom)&&void 0!==t?t:"",void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageRequest.fromPartial(e.pagination)),r}},t.DenomOwner={typeUrl:"/cosmos.bank.v1beta1.DenomOwner",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.address&&t.uint32(10).string(e.address),void 0!==e.balance&&i.Coin.encode(e.balance,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=I();for(;r.pos>>3){case 1:o.address=r.string();break;case 2:o.balance=i.Coin.decode(r,r.uint32());break;default:r.skipType(7&e)}}return o},fromJSON(e){let t=I();return(0,s.isSet)(e.address)&&(t.address=String(e.address)),(0,s.isSet)(e.balance)&&(t.balance=i.Coin.fromJSON(e.balance)),t},toJSON(e){let t={};return void 0!==e.address&&(t.address=e.address),void 0!==e.balance&&(t.balance=e.balance?i.Coin.toJSON(e.balance):void 0),t},fromPartial(e){var t;let r=I();return r.address=null!==(t=e.address)&&void 0!==t?t:"",void 0!==e.balance&&null!==e.balance&&(r.balance=i.Coin.fromPartial(e.balance)),r}},t.QueryDenomOwnersResponse={typeUrl:"/cosmos.bank.v1beta1.QueryDenomOwnersResponse",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();for(let n of e.denomOwners)t.DenomOwner.encode(n,r.uint32(10).fork()).ldelim();return void 0!==e.pagination&&n.PageResponse.encode(e.pagination,r.uint32(18).fork()).ldelim(),r},decode(e,r){let i=e instanceof a.BinaryReader?e:new a.BinaryReader(e),o=void 0===r?i.len:i.pos+r,s=R();for(;i.pos>>3){case 1:s.denomOwners.push(t.DenomOwner.decode(i,i.uint32()));break;case 2:s.pagination=n.PageResponse.decode(i,i.uint32());break;default:i.skipType(7&e)}}return s},fromJSON(e){let r=R();return Array.isArray(null==e?void 0:e.denomOwners)&&(r.denomOwners=e.denomOwners.map(e=>t.DenomOwner.fromJSON(e))),(0,s.isSet)(e.pagination)&&(r.pagination=n.PageResponse.fromJSON(e.pagination)),r},toJSON(e){let r={};return e.denomOwners?r.denomOwners=e.denomOwners.map(e=>e?t.DenomOwner.toJSON(e):void 0):r.denomOwners=[],void 0!==e.pagination&&(r.pagination=e.pagination?n.PageResponse.toJSON(e.pagination):void 0),r},fromPartial(e){var r;let i=R();return i.denomOwners=(null===(r=e.denomOwners)||void 0===r?void 0:r.map(e=>t.DenomOwner.fromPartial(e)))||[],void 0!==e.pagination&&null!==e.pagination&&(i.pagination=n.PageResponse.fromPartial(e.pagination)),i}},t.QuerySendEnabledRequest={typeUrl:"/cosmos.bank.v1beta1.QuerySendEnabledRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();for(let r of e.denoms)t.uint32(10).string(r);return void 0!==e.pagination&&n.PageRequest.encode(e.pagination,t.uint32(794).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),i=void 0===t?r.len:r.pos+t,o=E();for(;r.pos>>3){case 1:o.denoms.push(r.string());break;case 99:o.pagination=n.PageRequest.decode(r,r.uint32());break;default:r.skipType(7&e)}}return o},fromJSON(e){let t=E();return Array.isArray(null==e?void 0:e.denoms)&&(t.denoms=e.denoms.map(e=>String(e))),(0,s.isSet)(e.pagination)&&(t.pagination=n.PageRequest.fromJSON(e.pagination)),t},toJSON(e){let t={};return e.denoms?t.denoms=e.denoms.map(e=>e):t.denoms=[],void 0!==e.pagination&&(t.pagination=e.pagination?n.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=E();return r.denoms=(null===(t=e.denoms)||void 0===t?void 0:t.map(e=>e))||[],void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageRequest.fromPartial(e.pagination)),r}},t.QuerySendEnabledResponse={typeUrl:"/cosmos.bank.v1beta1.QuerySendEnabledResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();for(let r of e.sendEnabled)o.SendEnabled.encode(r,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&n.PageResponse.encode(e.pagination,t.uint32(794).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),i=void 0===t?r.len:r.pos+t,s=T();for(;r.pos>>3){case 1:s.sendEnabled.push(o.SendEnabled.decode(r,r.uint32()));break;case 99:s.pagination=n.PageResponse.decode(r,r.uint32());break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=T();return Array.isArray(null==e?void 0:e.sendEnabled)&&(t.sendEnabled=e.sendEnabled.map(e=>o.SendEnabled.fromJSON(e))),(0,s.isSet)(e.pagination)&&(t.pagination=n.PageResponse.fromJSON(e.pagination)),t},toJSON(e){let t={};return e.sendEnabled?t.sendEnabled=e.sendEnabled.map(e=>e?o.SendEnabled.toJSON(e):void 0):t.sendEnabled=[],void 0!==e.pagination&&(t.pagination=e.pagination?n.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=T();return r.sendEnabled=(null===(t=e.sendEnabled)||void 0===t?void 0:t.map(e=>o.SendEnabled.fromPartial(e)))||[],void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageResponse.fromPartial(e.pagination)),r}};class N{Balance(e){let r=t.QueryBalanceRequest.encode(e).finish();return this.rpc.request("cosmos.bank.v1beta1.Query","Balance",r).then(e=>t.QueryBalanceResponse.decode(new a.BinaryReader(e)))}AllBalances(e){let r=t.QueryAllBalancesRequest.encode(e).finish();return this.rpc.request("cosmos.bank.v1beta1.Query","AllBalances",r).then(e=>t.QueryAllBalancesResponse.decode(new a.BinaryReader(e)))}SpendableBalances(e){let r=t.QuerySpendableBalancesRequest.encode(e).finish();return this.rpc.request("cosmos.bank.v1beta1.Query","SpendableBalances",r).then(e=>t.QuerySpendableBalancesResponse.decode(new a.BinaryReader(e)))}SpendableBalanceByDenom(e){let r=t.QuerySpendableBalanceByDenomRequest.encode(e).finish();return this.rpc.request("cosmos.bank.v1beta1.Query","SpendableBalanceByDenom",r).then(e=>t.QuerySpendableBalanceByDenomResponse.decode(new a.BinaryReader(e)))}TotalSupply(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{pagination:n.PageRequest.fromPartial({})},r=t.QueryTotalSupplyRequest.encode(e).finish();return this.rpc.request("cosmos.bank.v1beta1.Query","TotalSupply",r).then(e=>t.QueryTotalSupplyResponse.decode(new a.BinaryReader(e)))}SupplyOf(e){let r=t.QuerySupplyOfRequest.encode(e).finish();return this.rpc.request("cosmos.bank.v1beta1.Query","SupplyOf",r).then(e=>t.QuerySupplyOfResponse.decode(new a.BinaryReader(e)))}Params(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.QueryParamsRequest.encode(e).finish();return this.rpc.request("cosmos.bank.v1beta1.Query","Params",r).then(e=>t.QueryParamsResponse.decode(new a.BinaryReader(e)))}DenomMetadata(e){let r=t.QueryDenomMetadataRequest.encode(e).finish();return this.rpc.request("cosmos.bank.v1beta1.Query","DenomMetadata",r).then(e=>t.QueryDenomMetadataResponse.decode(new a.BinaryReader(e)))}DenomsMetadata(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{pagination:n.PageRequest.fromPartial({})},r=t.QueryDenomsMetadataRequest.encode(e).finish();return this.rpc.request("cosmos.bank.v1beta1.Query","DenomsMetadata",r).then(e=>t.QueryDenomsMetadataResponse.decode(new a.BinaryReader(e)))}DenomOwners(e){let r=t.QueryDenomOwnersRequest.encode(e).finish();return this.rpc.request("cosmos.bank.v1beta1.Query","DenomOwners",r).then(e=>t.QueryDenomOwnersResponse.decode(new a.BinaryReader(e)))}SendEnabled(e){let r=t.QuerySendEnabledRequest.encode(e).finish();return this.rpc.request("cosmos.bank.v1beta1.Query","SendEnabled",r).then(e=>t.QuerySendEnabledResponse.decode(new a.BinaryReader(e)))}constructor(e){this.rpc=e,this.Balance=this.Balance.bind(this),this.AllBalances=this.AllBalances.bind(this),this.SpendableBalances=this.SpendableBalances.bind(this),this.SpendableBalanceByDenom=this.SpendableBalanceByDenom.bind(this),this.TotalSupply=this.TotalSupply.bind(this),this.SupplyOf=this.SupplyOf.bind(this),this.Params=this.Params.bind(this),this.DenomMetadata=this.DenomMetadata.bind(this),this.DenomsMetadata=this.DenomsMetadata.bind(this),this.DenomOwners=this.DenomOwners.bind(this),this.SendEnabled=this.SendEnabled.bind(this)}}t.QueryClientImpl=N},45413:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MsgClientImpl=t.MsgSetSendEnabledResponse=t.MsgSetSendEnabled=t.MsgUpdateParamsResponse=t.MsgUpdateParams=t.MsgMultiSendResponse=t.MsgMultiSend=t.MsgSendResponse=t.MsgSend=t.protobufPackage=void 0;let n=r(14841),i=r(42951),o=r(46554),a=r(99133);function s(){return{fromAddress:"",toAddress:"",amount:[]}}function l(){return{}}function u(){return{inputs:[],outputs:[]}}function d(){return{}}function c(){return{authority:"",params:i.Params.fromPartial({})}}function p(){return{}}function f(){return{authority:"",sendEnabled:[],useDefaultFor:[]}}function h(){return{}}t.protobufPackage="cosmos.bank.v1beta1",t.MsgSend={typeUrl:"/cosmos.bank.v1beta1.MsgSend",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of(""!==e.fromAddress&&t.uint32(10).string(e.fromAddress),""!==e.toAddress&&t.uint32(18).string(e.toAddress),e.amount))n.Coin.encode(r,t.uint32(26).fork()).ldelim();return t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=s();for(;r.pos>>3){case 1:a.fromAddress=r.string();break;case 2:a.toAddress=r.string();break;case 3:a.amount.push(n.Coin.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=s();return(0,a.isSet)(e.fromAddress)&&(t.fromAddress=String(e.fromAddress)),(0,a.isSet)(e.toAddress)&&(t.toAddress=String(e.toAddress)),Array.isArray(null==e?void 0:e.amount)&&(t.amount=e.amount.map(e=>n.Coin.fromJSON(e))),t},toJSON(e){let t={};return void 0!==e.fromAddress&&(t.fromAddress=e.fromAddress),void 0!==e.toAddress&&(t.toAddress=e.toAddress),e.amount?t.amount=e.amount.map(e=>e?n.Coin.toJSON(e):void 0):t.amount=[],t},fromPartial(e){var t,r,i;let o=s();return o.fromAddress=null!==(r=e.fromAddress)&&void 0!==r?r:"",o.toAddress=null!==(i=e.toAddress)&&void 0!==i?i:"",o.amount=(null===(t=e.amount)||void 0===t?void 0:t.map(e=>n.Coin.fromPartial(e)))||[],o}},t.MsgSendResponse={typeUrl:"/cosmos.bank.v1beta1.MsgSendResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=l();for(;r.posl(),toJSON:e=>({}),fromPartial:e=>l()},t.MsgMultiSend={typeUrl:"/cosmos.bank.v1beta1.MsgMultiSend",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of e.inputs)i.Input.encode(r,t.uint32(10).fork()).ldelim();for(let r of e.outputs)i.Output.encode(r,t.uint32(18).fork()).ldelim();return t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,a=u();for(;r.pos>>3){case 1:a.inputs.push(i.Input.decode(r,r.uint32()));break;case 2:a.outputs.push(i.Output.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=u();return Array.isArray(null==e?void 0:e.inputs)&&(t.inputs=e.inputs.map(e=>i.Input.fromJSON(e))),Array.isArray(null==e?void 0:e.outputs)&&(t.outputs=e.outputs.map(e=>i.Output.fromJSON(e))),t},toJSON(e){let t={};return e.inputs?t.inputs=e.inputs.map(e=>e?i.Input.toJSON(e):void 0):t.inputs=[],e.outputs?t.outputs=e.outputs.map(e=>e?i.Output.toJSON(e):void 0):t.outputs=[],t},fromPartial(e){var t,r;let n=u();return n.inputs=(null===(t=e.inputs)||void 0===t?void 0:t.map(e=>i.Input.fromPartial(e)))||[],n.outputs=(null===(r=e.outputs)||void 0===r?void 0:r.map(e=>i.Output.fromPartial(e)))||[],n}},t.MsgMultiSendResponse={typeUrl:"/cosmos.bank.v1beta1.MsgMultiSendResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=d();for(;r.posd(),toJSON:e=>({}),fromPartial:e=>d()},t.MsgUpdateParams={typeUrl:"/cosmos.bank.v1beta1.MsgUpdateParams",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.authority&&t.uint32(10).string(e.authority),void 0!==e.params&&i.Params.encode(e.params,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,a=c();for(;r.pos>>3){case 1:a.authority=r.string();break;case 2:a.params=i.Params.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=c();return(0,a.isSet)(e.authority)&&(t.authority=String(e.authority)),(0,a.isSet)(e.params)&&(t.params=i.Params.fromJSON(e.params)),t},toJSON(e){let t={};return void 0!==e.authority&&(t.authority=e.authority),void 0!==e.params&&(t.params=e.params?i.Params.toJSON(e.params):void 0),t},fromPartial(e){var t;let r=c();return r.authority=null!==(t=e.authority)&&void 0!==t?t:"",void 0!==e.params&&null!==e.params&&(r.params=i.Params.fromPartial(e.params)),r}},t.MsgUpdateParamsResponse={typeUrl:"/cosmos.bank.v1beta1.MsgUpdateParamsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=p();for(;r.posp(),toJSON:e=>({}),fromPartial:e=>p()},t.MsgSetSendEnabled={typeUrl:"/cosmos.bank.v1beta1.MsgSetSendEnabled",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of(""!==e.authority&&t.uint32(10).string(e.authority),e.sendEnabled))i.SendEnabled.encode(r,t.uint32(18).fork()).ldelim();for(let r of e.useDefaultFor)t.uint32(26).string(r);return t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,a=f();for(;r.pos>>3){case 1:a.authority=r.string();break;case 2:a.sendEnabled.push(i.SendEnabled.decode(r,r.uint32()));break;case 3:a.useDefaultFor.push(r.string());break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=f();return(0,a.isSet)(e.authority)&&(t.authority=String(e.authority)),Array.isArray(null==e?void 0:e.sendEnabled)&&(t.sendEnabled=e.sendEnabled.map(e=>i.SendEnabled.fromJSON(e))),Array.isArray(null==e?void 0:e.useDefaultFor)&&(t.useDefaultFor=e.useDefaultFor.map(e=>String(e))),t},toJSON(e){let t={};return void 0!==e.authority&&(t.authority=e.authority),e.sendEnabled?t.sendEnabled=e.sendEnabled.map(e=>e?i.SendEnabled.toJSON(e):void 0):t.sendEnabled=[],e.useDefaultFor?t.useDefaultFor=e.useDefaultFor.map(e=>e):t.useDefaultFor=[],t},fromPartial(e){var t,r,n;let o=f();return o.authority=null!==(n=e.authority)&&void 0!==n?n:"",o.sendEnabled=(null===(t=e.sendEnabled)||void 0===t?void 0:t.map(e=>i.SendEnabled.fromPartial(e)))||[],o.useDefaultFor=(null===(r=e.useDefaultFor)||void 0===r?void 0:r.map(e=>e))||[],o}},t.MsgSetSendEnabledResponse={typeUrl:"/cosmos.bank.v1beta1.MsgSetSendEnabledResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=h();for(;r.posh(),toJSON:e=>({}),fromPartial:e=>h()};class g{Send(e){let r=t.MsgSend.encode(e).finish();return this.rpc.request("cosmos.bank.v1beta1.Msg","Send",r).then(e=>t.MsgSendResponse.decode(new o.BinaryReader(e)))}MultiSend(e){let r=t.MsgMultiSend.encode(e).finish();return this.rpc.request("cosmos.bank.v1beta1.Msg","MultiSend",r).then(e=>t.MsgMultiSendResponse.decode(new o.BinaryReader(e)))}UpdateParams(e){let r=t.MsgUpdateParams.encode(e).finish();return this.rpc.request("cosmos.bank.v1beta1.Msg","UpdateParams",r).then(e=>t.MsgUpdateParamsResponse.decode(new o.BinaryReader(e)))}SetSendEnabled(e){let r=t.MsgSetSendEnabled.encode(e).finish();return this.rpc.request("cosmos.bank.v1beta1.Msg","SetSendEnabled",r).then(e=>t.MsgSetSendEnabledResponse.decode(new o.BinaryReader(e)))}constructor(e){this.rpc=e,this.Send=this.Send.bind(this),this.MultiSend=this.MultiSend.bind(this),this.UpdateParams=this.UpdateParams.bind(this),this.SetSendEnabled=this.SetSendEnabled.bind(this)}}t.MsgClientImpl=g},94534:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SearchTxsResult=t.TxMsgData=t.MsgData=t.SimulationResponse=t.Result=t.GasInfo=t.Attribute=t.StringEvent=t.ABCIMessageLog=t.TxResponse=t.protobufPackage=void 0;let n=r(11879),i=r(52942),o=r(46554),a=r(99133);function s(){return{height:BigInt(0),txhash:"",codespace:"",code:0,data:"",rawLog:"",logs:[],info:"",gasWanted:BigInt(0),gasUsed:BigInt(0),tx:void 0,timestamp:"",events:[]}}function l(){return{msgIndex:0,log:"",events:[]}}function u(){return{type:"",attributes:[]}}function d(){return{key:"",value:""}}function c(){return{gasWanted:BigInt(0),gasUsed:BigInt(0)}}function p(){return{data:new Uint8Array,log:"",events:[],msgResponses:[]}}function f(){return{gasInfo:t.GasInfo.fromPartial({}),result:void 0}}function h(){return{msgType:"",data:new Uint8Array}}function g(){return{data:[],msgResponses:[]}}function m(){return{totalCount:BigInt(0),count:BigInt(0),pageNumber:BigInt(0),pageTotal:BigInt(0),limit:BigInt(0),txs:[]}}t.protobufPackage="cosmos.base.abci.v1beta1",t.TxResponse={typeUrl:"/cosmos.base.abci.v1beta1.TxResponse",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let n of(e.height!==BigInt(0)&&r.uint32(8).int64(e.height),""!==e.txhash&&r.uint32(18).string(e.txhash),""!==e.codespace&&r.uint32(26).string(e.codespace),0!==e.code&&r.uint32(32).uint32(e.code),""!==e.data&&r.uint32(42).string(e.data),""!==e.rawLog&&r.uint32(50).string(e.rawLog),e.logs))t.ABCIMessageLog.encode(n,r.uint32(58).fork()).ldelim();for(let t of(""!==e.info&&r.uint32(66).string(e.info),e.gasWanted!==BigInt(0)&&r.uint32(72).int64(e.gasWanted),e.gasUsed!==BigInt(0)&&r.uint32(80).int64(e.gasUsed),void 0!==e.tx&&n.Any.encode(e.tx,r.uint32(90).fork()).ldelim(),""!==e.timestamp&&r.uint32(98).string(e.timestamp),e.events))i.Event.encode(t,r.uint32(106).fork()).ldelim();return r},decode(e,r){let a=e instanceof o.BinaryReader?e:new o.BinaryReader(e),l=void 0===r?a.len:a.pos+r,u=s();for(;a.pos>>3){case 1:u.height=a.int64();break;case 2:u.txhash=a.string();break;case 3:u.codespace=a.string();break;case 4:u.code=a.uint32();break;case 5:u.data=a.string();break;case 6:u.rawLog=a.string();break;case 7:u.logs.push(t.ABCIMessageLog.decode(a,a.uint32()));break;case 8:u.info=a.string();break;case 9:u.gasWanted=a.int64();break;case 10:u.gasUsed=a.int64();break;case 11:u.tx=n.Any.decode(a,a.uint32());break;case 12:u.timestamp=a.string();break;case 13:u.events.push(i.Event.decode(a,a.uint32()));break;default:a.skipType(7&e)}}return u},fromJSON(e){let r=s();return(0,a.isSet)(e.height)&&(r.height=BigInt(e.height.toString())),(0,a.isSet)(e.txhash)&&(r.txhash=String(e.txhash)),(0,a.isSet)(e.codespace)&&(r.codespace=String(e.codespace)),(0,a.isSet)(e.code)&&(r.code=Number(e.code)),(0,a.isSet)(e.data)&&(r.data=String(e.data)),(0,a.isSet)(e.rawLog)&&(r.rawLog=String(e.rawLog)),Array.isArray(null==e?void 0:e.logs)&&(r.logs=e.logs.map(e=>t.ABCIMessageLog.fromJSON(e))),(0,a.isSet)(e.info)&&(r.info=String(e.info)),(0,a.isSet)(e.gasWanted)&&(r.gasWanted=BigInt(e.gasWanted.toString())),(0,a.isSet)(e.gasUsed)&&(r.gasUsed=BigInt(e.gasUsed.toString())),(0,a.isSet)(e.tx)&&(r.tx=n.Any.fromJSON(e.tx)),(0,a.isSet)(e.timestamp)&&(r.timestamp=String(e.timestamp)),Array.isArray(null==e?void 0:e.events)&&(r.events=e.events.map(e=>i.Event.fromJSON(e))),r},toJSON(e){let r={};return void 0!==e.height&&(r.height=(e.height||BigInt(0)).toString()),void 0!==e.txhash&&(r.txhash=e.txhash),void 0!==e.codespace&&(r.codespace=e.codespace),void 0!==e.code&&(r.code=Math.round(e.code)),void 0!==e.data&&(r.data=e.data),void 0!==e.rawLog&&(r.rawLog=e.rawLog),e.logs?r.logs=e.logs.map(e=>e?t.ABCIMessageLog.toJSON(e):void 0):r.logs=[],void 0!==e.info&&(r.info=e.info),void 0!==e.gasWanted&&(r.gasWanted=(e.gasWanted||BigInt(0)).toString()),void 0!==e.gasUsed&&(r.gasUsed=(e.gasUsed||BigInt(0)).toString()),void 0!==e.tx&&(r.tx=e.tx?n.Any.toJSON(e.tx):void 0),void 0!==e.timestamp&&(r.timestamp=e.timestamp),e.events?r.events=e.events.map(e=>e?i.Event.toJSON(e):void 0):r.events=[],r},fromPartial(e){var r,o,a,l,u,d,c,p,f;let h=s();return void 0!==e.height&&null!==e.height&&(h.height=BigInt(e.height.toString())),h.txhash=null!==(a=e.txhash)&&void 0!==a?a:"",h.codespace=null!==(l=e.codespace)&&void 0!==l?l:"",h.code=null!==(u=e.code)&&void 0!==u?u:0,h.data=null!==(d=e.data)&&void 0!==d?d:"",h.rawLog=null!==(c=e.rawLog)&&void 0!==c?c:"",h.logs=(null===(r=e.logs)||void 0===r?void 0:r.map(e=>t.ABCIMessageLog.fromPartial(e)))||[],h.info=null!==(p=e.info)&&void 0!==p?p:"",void 0!==e.gasWanted&&null!==e.gasWanted&&(h.gasWanted=BigInt(e.gasWanted.toString())),void 0!==e.gasUsed&&null!==e.gasUsed&&(h.gasUsed=BigInt(e.gasUsed.toString())),void 0!==e.tx&&null!==e.tx&&(h.tx=n.Any.fromPartial(e.tx)),h.timestamp=null!==(f=e.timestamp)&&void 0!==f?f:"",h.events=(null===(o=e.events)||void 0===o?void 0:o.map(e=>i.Event.fromPartial(e)))||[],h}},t.ABCIMessageLog={typeUrl:"/cosmos.base.abci.v1beta1.ABCIMessageLog",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let n of(0!==e.msgIndex&&r.uint32(8).uint32(e.msgIndex),""!==e.log&&r.uint32(18).string(e.log),e.events))t.StringEvent.encode(n,r.uint32(26).fork()).ldelim();return r},decode(e,r){let n=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===r?n.len:n.pos+r,a=l();for(;n.pos>>3){case 1:a.msgIndex=n.uint32();break;case 2:a.log=n.string();break;case 3:a.events.push(t.StringEvent.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return a},fromJSON(e){let r=l();return(0,a.isSet)(e.msgIndex)&&(r.msgIndex=Number(e.msgIndex)),(0,a.isSet)(e.log)&&(r.log=String(e.log)),Array.isArray(null==e?void 0:e.events)&&(r.events=e.events.map(e=>t.StringEvent.fromJSON(e))),r},toJSON(e){let r={};return void 0!==e.msgIndex&&(r.msgIndex=Math.round(e.msgIndex)),void 0!==e.log&&(r.log=e.log),e.events?r.events=e.events.map(e=>e?t.StringEvent.toJSON(e):void 0):r.events=[],r},fromPartial(e){var r,n,i;let o=l();return o.msgIndex=null!==(n=e.msgIndex)&&void 0!==n?n:0,o.log=null!==(i=e.log)&&void 0!==i?i:"",o.events=(null===(r=e.events)||void 0===r?void 0:r.map(e=>t.StringEvent.fromPartial(e)))||[],o}},t.StringEvent={typeUrl:"/cosmos.base.abci.v1beta1.StringEvent",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let n of(""!==e.type&&r.uint32(10).string(e.type),e.attributes))t.Attribute.encode(n,r.uint32(18).fork()).ldelim();return r},decode(e,r){let n=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===r?n.len:n.pos+r,a=u();for(;n.pos>>3){case 1:a.type=n.string();break;case 2:a.attributes.push(t.Attribute.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return a},fromJSON(e){let r=u();return(0,a.isSet)(e.type)&&(r.type=String(e.type)),Array.isArray(null==e?void 0:e.attributes)&&(r.attributes=e.attributes.map(e=>t.Attribute.fromJSON(e))),r},toJSON(e){let r={};return void 0!==e.type&&(r.type=e.type),e.attributes?r.attributes=e.attributes.map(e=>e?t.Attribute.toJSON(e):void 0):r.attributes=[],r},fromPartial(e){var r,n;let i=u();return i.type=null!==(n=e.type)&&void 0!==n?n:"",i.attributes=(null===(r=e.attributes)||void 0===r?void 0:r.map(e=>t.Attribute.fromPartial(e)))||[],i}},t.Attribute={typeUrl:"/cosmos.base.abci.v1beta1.Attribute",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.key&&t.uint32(10).string(e.key),""!==e.value&&t.uint32(18).string(e.value),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=d();for(;r.pos>>3){case 1:i.key=r.string();break;case 2:i.value=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=d();return(0,a.isSet)(e.key)&&(t.key=String(e.key)),(0,a.isSet)(e.value)&&(t.value=String(e.value)),t},toJSON(e){let t={};return void 0!==e.key&&(t.key=e.key),void 0!==e.value&&(t.value=e.value),t},fromPartial(e){var t,r;let n=d();return n.key=null!==(t=e.key)&&void 0!==t?t:"",n.value=null!==(r=e.value)&&void 0!==r?r:"",n}},t.GasInfo={typeUrl:"/cosmos.base.abci.v1beta1.GasInfo",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return e.gasWanted!==BigInt(0)&&t.uint32(8).uint64(e.gasWanted),e.gasUsed!==BigInt(0)&&t.uint32(16).uint64(e.gasUsed),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=c();for(;r.pos>>3){case 1:i.gasWanted=r.uint64();break;case 2:i.gasUsed=r.uint64();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=c();return(0,a.isSet)(e.gasWanted)&&(t.gasWanted=BigInt(e.gasWanted.toString())),(0,a.isSet)(e.gasUsed)&&(t.gasUsed=BigInt(e.gasUsed.toString())),t},toJSON(e){let t={};return void 0!==e.gasWanted&&(t.gasWanted=(e.gasWanted||BigInt(0)).toString()),void 0!==e.gasUsed&&(t.gasUsed=(e.gasUsed||BigInt(0)).toString()),t},fromPartial(e){let t=c();return void 0!==e.gasWanted&&null!==e.gasWanted&&(t.gasWanted=BigInt(e.gasWanted.toString())),void 0!==e.gasUsed&&null!==e.gasUsed&&(t.gasUsed=BigInt(e.gasUsed.toString())),t}},t.Result={typeUrl:"/cosmos.base.abci.v1beta1.Result",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of(0!==e.data.length&&t.uint32(10).bytes(e.data),""!==e.log&&t.uint32(18).string(e.log),e.events))i.Event.encode(r,t.uint32(26).fork()).ldelim();for(let r of e.msgResponses)n.Any.encode(r,t.uint32(34).fork()).ldelim();return t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),a=void 0===t?r.len:r.pos+t,s=p();for(;r.pos>>3){case 1:s.data=r.bytes();break;case 2:s.log=r.string();break;case 3:s.events.push(i.Event.decode(r,r.uint32()));break;case 4:s.msgResponses.push(n.Any.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=p();return(0,a.isSet)(e.data)&&(t.data=(0,a.bytesFromBase64)(e.data)),(0,a.isSet)(e.log)&&(t.log=String(e.log)),Array.isArray(null==e?void 0:e.events)&&(t.events=e.events.map(e=>i.Event.fromJSON(e))),Array.isArray(null==e?void 0:e.msgResponses)&&(t.msgResponses=e.msgResponses.map(e=>n.Any.fromJSON(e))),t},toJSON(e){let t={};return void 0!==e.data&&(t.data=(0,a.base64FromBytes)(void 0!==e.data?e.data:new Uint8Array)),void 0!==e.log&&(t.log=e.log),e.events?t.events=e.events.map(e=>e?i.Event.toJSON(e):void 0):t.events=[],e.msgResponses?t.msgResponses=e.msgResponses.map(e=>e?n.Any.toJSON(e):void 0):t.msgResponses=[],t},fromPartial(e){var t,r,o,a;let s=p();return s.data=null!==(o=e.data)&&void 0!==o?o:new Uint8Array,s.log=null!==(a=e.log)&&void 0!==a?a:"",s.events=(null===(t=e.events)||void 0===t?void 0:t.map(e=>i.Event.fromPartial(e)))||[],s.msgResponses=(null===(r=e.msgResponses)||void 0===r?void 0:r.map(e=>n.Any.fromPartial(e)))||[],s}},t.SimulationResponse={typeUrl:"/cosmos.base.abci.v1beta1.SimulationResponse",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return void 0!==e.gasInfo&&t.GasInfo.encode(e.gasInfo,r.uint32(10).fork()).ldelim(),void 0!==e.result&&t.Result.encode(e.result,r.uint32(18).fork()).ldelim(),r},decode(e,r){let n=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===r?n.len:n.pos+r,a=f();for(;n.pos>>3){case 1:a.gasInfo=t.GasInfo.decode(n,n.uint32());break;case 2:a.result=t.Result.decode(n,n.uint32());break;default:n.skipType(7&e)}}return a},fromJSON(e){let r=f();return(0,a.isSet)(e.gasInfo)&&(r.gasInfo=t.GasInfo.fromJSON(e.gasInfo)),(0,a.isSet)(e.result)&&(r.result=t.Result.fromJSON(e.result)),r},toJSON(e){let r={};return void 0!==e.gasInfo&&(r.gasInfo=e.gasInfo?t.GasInfo.toJSON(e.gasInfo):void 0),void 0!==e.result&&(r.result=e.result?t.Result.toJSON(e.result):void 0),r},fromPartial(e){let r=f();return void 0!==e.gasInfo&&null!==e.gasInfo&&(r.gasInfo=t.GasInfo.fromPartial(e.gasInfo)),void 0!==e.result&&null!==e.result&&(r.result=t.Result.fromPartial(e.result)),r}},t.MsgData={typeUrl:"/cosmos.base.abci.v1beta1.MsgData",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.msgType&&t.uint32(10).string(e.msgType),0!==e.data.length&&t.uint32(18).bytes(e.data),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=h();for(;r.pos>>3){case 1:i.msgType=r.string();break;case 2:i.data=r.bytes();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=h();return(0,a.isSet)(e.msgType)&&(t.msgType=String(e.msgType)),(0,a.isSet)(e.data)&&(t.data=(0,a.bytesFromBase64)(e.data)),t},toJSON(e){let t={};return void 0!==e.msgType&&(t.msgType=e.msgType),void 0!==e.data&&(t.data=(0,a.base64FromBytes)(void 0!==e.data?e.data:new Uint8Array)),t},fromPartial(e){var t,r;let n=h();return n.msgType=null!==(t=e.msgType)&&void 0!==t?t:"",n.data=null!==(r=e.data)&&void 0!==r?r:new Uint8Array,n}},t.TxMsgData={typeUrl:"/cosmos.base.abci.v1beta1.TxMsgData",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let n of e.data)t.MsgData.encode(n,r.uint32(10).fork()).ldelim();for(let t of e.msgResponses)n.Any.encode(t,r.uint32(18).fork()).ldelim();return r},decode(e,r){let i=e instanceof o.BinaryReader?e:new o.BinaryReader(e),a=void 0===r?i.len:i.pos+r,s=g();for(;i.pos>>3){case 1:s.data.push(t.MsgData.decode(i,i.uint32()));break;case 2:s.msgResponses.push(n.Any.decode(i,i.uint32()));break;default:i.skipType(7&e)}}return s},fromJSON(e){let r=g();return Array.isArray(null==e?void 0:e.data)&&(r.data=e.data.map(e=>t.MsgData.fromJSON(e))),Array.isArray(null==e?void 0:e.msgResponses)&&(r.msgResponses=e.msgResponses.map(e=>n.Any.fromJSON(e))),r},toJSON(e){let r={};return e.data?r.data=e.data.map(e=>e?t.MsgData.toJSON(e):void 0):r.data=[],e.msgResponses?r.msgResponses=e.msgResponses.map(e=>e?n.Any.toJSON(e):void 0):r.msgResponses=[],r},fromPartial(e){var r,i;let o=g();return o.data=(null===(r=e.data)||void 0===r?void 0:r.map(e=>t.MsgData.fromPartial(e)))||[],o.msgResponses=(null===(i=e.msgResponses)||void 0===i?void 0:i.map(e=>n.Any.fromPartial(e)))||[],o}},t.SearchTxsResult={typeUrl:"/cosmos.base.abci.v1beta1.SearchTxsResult",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let n of(e.totalCount!==BigInt(0)&&r.uint32(8).uint64(e.totalCount),e.count!==BigInt(0)&&r.uint32(16).uint64(e.count),e.pageNumber!==BigInt(0)&&r.uint32(24).uint64(e.pageNumber),e.pageTotal!==BigInt(0)&&r.uint32(32).uint64(e.pageTotal),e.limit!==BigInt(0)&&r.uint32(40).uint64(e.limit),e.txs))t.TxResponse.encode(n,r.uint32(50).fork()).ldelim();return r},decode(e,r){let n=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===r?n.len:n.pos+r,a=m();for(;n.pos>>3){case 1:a.totalCount=n.uint64();break;case 2:a.count=n.uint64();break;case 3:a.pageNumber=n.uint64();break;case 4:a.pageTotal=n.uint64();break;case 5:a.limit=n.uint64();break;case 6:a.txs.push(t.TxResponse.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return a},fromJSON(e){let r=m();return(0,a.isSet)(e.totalCount)&&(r.totalCount=BigInt(e.totalCount.toString())),(0,a.isSet)(e.count)&&(r.count=BigInt(e.count.toString())),(0,a.isSet)(e.pageNumber)&&(r.pageNumber=BigInt(e.pageNumber.toString())),(0,a.isSet)(e.pageTotal)&&(r.pageTotal=BigInt(e.pageTotal.toString())),(0,a.isSet)(e.limit)&&(r.limit=BigInt(e.limit.toString())),Array.isArray(null==e?void 0:e.txs)&&(r.txs=e.txs.map(e=>t.TxResponse.fromJSON(e))),r},toJSON(e){let r={};return void 0!==e.totalCount&&(r.totalCount=(e.totalCount||BigInt(0)).toString()),void 0!==e.count&&(r.count=(e.count||BigInt(0)).toString()),void 0!==e.pageNumber&&(r.pageNumber=(e.pageNumber||BigInt(0)).toString()),void 0!==e.pageTotal&&(r.pageTotal=(e.pageTotal||BigInt(0)).toString()),void 0!==e.limit&&(r.limit=(e.limit||BigInt(0)).toString()),e.txs?r.txs=e.txs.map(e=>e?t.TxResponse.toJSON(e):void 0):r.txs=[],r},fromPartial(e){var r;let n=m();return void 0!==e.totalCount&&null!==e.totalCount&&(n.totalCount=BigInt(e.totalCount.toString())),void 0!==e.count&&null!==e.count&&(n.count=BigInt(e.count.toString())),void 0!==e.pageNumber&&null!==e.pageNumber&&(n.pageNumber=BigInt(e.pageNumber.toString())),void 0!==e.pageTotal&&null!==e.pageTotal&&(n.pageTotal=BigInt(e.pageTotal.toString())),void 0!==e.limit&&null!==e.limit&&(n.limit=BigInt(e.limit.toString())),n.txs=(null===(r=e.txs)||void 0===r?void 0:r.map(e=>t.TxResponse.fromPartial(e)))||[],n}}},86141:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PageResponse=t.PageRequest=t.protobufPackage=void 0;let n=r(46554),i=r(99133);function o(){return{key:new Uint8Array,offset:BigInt(0),limit:BigInt(0),countTotal:!1,reverse:!1}}function a(){return{nextKey:new Uint8Array,total:BigInt(0)}}t.protobufPackage="cosmos.base.query.v1beta1",t.PageRequest={typeUrl:"/cosmos.base.query.v1beta1.PageRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.BinaryWriter.create();return 0!==e.key.length&&t.uint32(10).bytes(e.key),e.offset!==BigInt(0)&&t.uint32(16).uint64(e.offset),e.limit!==BigInt(0)&&t.uint32(24).uint64(e.limit),!0===e.countTotal&&t.uint32(32).bool(e.countTotal),!0===e.reverse&&t.uint32(40).bool(e.reverse),t},decode(e,t){let r=e instanceof n.BinaryReader?e:new n.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=o();for(;r.pos>>3){case 1:a.key=r.bytes();break;case 2:a.offset=r.uint64();break;case 3:a.limit=r.uint64();break;case 4:a.countTotal=r.bool();break;case 5:a.reverse=r.bool();break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=o();return(0,i.isSet)(e.key)&&(t.key=(0,i.bytesFromBase64)(e.key)),(0,i.isSet)(e.offset)&&(t.offset=BigInt(e.offset.toString())),(0,i.isSet)(e.limit)&&(t.limit=BigInt(e.limit.toString())),(0,i.isSet)(e.countTotal)&&(t.countTotal=!!e.countTotal),(0,i.isSet)(e.reverse)&&(t.reverse=!!e.reverse),t},toJSON(e){let t={};return void 0!==e.key&&(t.key=(0,i.base64FromBytes)(void 0!==e.key?e.key:new Uint8Array)),void 0!==e.offset&&(t.offset=(e.offset||BigInt(0)).toString()),void 0!==e.limit&&(t.limit=(e.limit||BigInt(0)).toString()),void 0!==e.countTotal&&(t.countTotal=e.countTotal),void 0!==e.reverse&&(t.reverse=e.reverse),t},fromPartial(e){var t,r,n;let i=o();return i.key=null!==(t=e.key)&&void 0!==t?t:new Uint8Array,void 0!==e.offset&&null!==e.offset&&(i.offset=BigInt(e.offset.toString())),void 0!==e.limit&&null!==e.limit&&(i.limit=BigInt(e.limit.toString())),i.countTotal=null!==(r=e.countTotal)&&void 0!==r&&r,i.reverse=null!==(n=e.reverse)&&void 0!==n&&n,i}},t.PageResponse={typeUrl:"/cosmos.base.query.v1beta1.PageResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.BinaryWriter.create();return 0!==e.nextKey.length&&t.uint32(10).bytes(e.nextKey),e.total!==BigInt(0)&&t.uint32(16).uint64(e.total),t},decode(e,t){let r=e instanceof n.BinaryReader?e:new n.BinaryReader(e),i=void 0===t?r.len:r.pos+t,o=a();for(;r.pos>>3){case 1:o.nextKey=r.bytes();break;case 2:o.total=r.uint64();break;default:r.skipType(7&e)}}return o},fromJSON(e){let t=a();return(0,i.isSet)(e.nextKey)&&(t.nextKey=(0,i.bytesFromBase64)(e.nextKey)),(0,i.isSet)(e.total)&&(t.total=BigInt(e.total.toString())),t},toJSON(e){let t={};return void 0!==e.nextKey&&(t.nextKey=(0,i.base64FromBytes)(void 0!==e.nextKey?e.nextKey:new Uint8Array)),void 0!==e.total&&(t.total=(e.total||BigInt(0)).toString()),t},fromPartial(e){var t;let r=a();return r.nextKey=null!==(t=e.nextKey)&&void 0!==t?t:new Uint8Array,void 0!==e.total&&null!==e.total&&(r.total=BigInt(e.total.toString())),r}}},14841:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DecProto=t.IntProto=t.DecCoin=t.Coin=t.protobufPackage=void 0;let n=r(46554),i=r(99133);function o(){return{denom:"",amount:""}}function a(){return{denom:"",amount:""}}function s(){return{int:""}}function l(){return{dec:""}}t.protobufPackage="cosmos.base.v1beta1",t.Coin={typeUrl:"/cosmos.base.v1beta1.Coin",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.BinaryWriter.create();return""!==e.denom&&t.uint32(10).string(e.denom),""!==e.amount&&t.uint32(18).string(e.amount),t},decode(e,t){let r=e instanceof n.BinaryReader?e:new n.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=o();for(;r.pos>>3){case 1:a.denom=r.string();break;case 2:a.amount=r.string();break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=o();return(0,i.isSet)(e.denom)&&(t.denom=String(e.denom)),(0,i.isSet)(e.amount)&&(t.amount=String(e.amount)),t},toJSON(e){let t={};return void 0!==e.denom&&(t.denom=e.denom),void 0!==e.amount&&(t.amount=e.amount),t},fromPartial(e){var t,r;let n=o();return n.denom=null!==(t=e.denom)&&void 0!==t?t:"",n.amount=null!==(r=e.amount)&&void 0!==r?r:"",n}},t.DecCoin={typeUrl:"/cosmos.base.v1beta1.DecCoin",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.BinaryWriter.create();return""!==e.denom&&t.uint32(10).string(e.denom),""!==e.amount&&t.uint32(18).string(e.amount),t},decode(e,t){let r=e instanceof n.BinaryReader?e:new n.BinaryReader(e),i=void 0===t?r.len:r.pos+t,o=a();for(;r.pos>>3){case 1:o.denom=r.string();break;case 2:o.amount=r.string();break;default:r.skipType(7&e)}}return o},fromJSON(e){let t=a();return(0,i.isSet)(e.denom)&&(t.denom=String(e.denom)),(0,i.isSet)(e.amount)&&(t.amount=String(e.amount)),t},toJSON(e){let t={};return void 0!==e.denom&&(t.denom=e.denom),void 0!==e.amount&&(t.amount=e.amount),t},fromPartial(e){var t,r;let n=a();return n.denom=null!==(t=e.denom)&&void 0!==t?t:"",n.amount=null!==(r=e.amount)&&void 0!==r?r:"",n}},t.IntProto={typeUrl:"/cosmos.base.v1beta1.IntProto",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.BinaryWriter.create();return""!==e.int&&t.uint32(10).string(e.int),t},decode(e,t){let r=e instanceof n.BinaryReader?e:new n.BinaryReader(e),i=void 0===t?r.len:r.pos+t,o=s();for(;r.pos>>3==1?o.int=r.string():r.skipType(7&e)}return o},fromJSON(e){let t=s();return(0,i.isSet)(e.int)&&(t.int=String(e.int)),t},toJSON(e){let t={};return void 0!==e.int&&(t.int=e.int),t},fromPartial(e){var t;let r=s();return r.int=null!==(t=e.int)&&void 0!==t?t:"",r}},t.DecProto={typeUrl:"/cosmos.base.v1beta1.DecProto",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.BinaryWriter.create();return""!==e.dec&&t.uint32(10).string(e.dec),t},decode(e,t){let r=e instanceof n.BinaryReader?e:new n.BinaryReader(e),i=void 0===t?r.len:r.pos+t,o=l();for(;r.pos>>3==1?o.dec=r.string():r.skipType(7&e)}return o},fromJSON(e){let t=l();return(0,i.isSet)(e.dec)&&(t.dec=String(e.dec)),t},toJSON(e){let t={};return void 0!==e.dec&&(t.dec=e.dec),t},fromPartial(e){var t;let r=l();return r.dec=null!==(t=e.dec)&&void 0!==t?t:"",r}}},61010:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PrivKey=t.PubKey=t.protobufPackage=void 0;let n=r(46554),i=r(99133);function o(){return{key:new Uint8Array}}function a(){return{key:new Uint8Array}}t.protobufPackage="cosmos.crypto.ed25519",t.PubKey={typeUrl:"/cosmos.crypto.ed25519.PubKey",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.BinaryWriter.create();return 0!==e.key.length&&t.uint32(10).bytes(e.key),t},decode(e,t){let r=e instanceof n.BinaryReader?e:new n.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=o();for(;r.pos>>3==1?a.key=r.bytes():r.skipType(7&e)}return a},fromJSON(e){let t=o();return(0,i.isSet)(e.key)&&(t.key=(0,i.bytesFromBase64)(e.key)),t},toJSON(e){let t={};return void 0!==e.key&&(t.key=(0,i.base64FromBytes)(void 0!==e.key?e.key:new Uint8Array)),t},fromPartial(e){var t;let r=o();return r.key=null!==(t=e.key)&&void 0!==t?t:new Uint8Array,r}},t.PrivKey={typeUrl:"/cosmos.crypto.ed25519.PrivKey",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.BinaryWriter.create();return 0!==e.key.length&&t.uint32(10).bytes(e.key),t},decode(e,t){let r=e instanceof n.BinaryReader?e:new n.BinaryReader(e),i=void 0===t?r.len:r.pos+t,o=a();for(;r.pos>>3==1?o.key=r.bytes():r.skipType(7&e)}return o},fromJSON(e){let t=a();return(0,i.isSet)(e.key)&&(t.key=(0,i.bytesFromBase64)(e.key)),t},toJSON(e){let t={};return void 0!==e.key&&(t.key=(0,i.base64FromBytes)(void 0!==e.key?e.key:new Uint8Array)),t},fromPartial(e){var t;let r=a();return r.key=null!==(t=e.key)&&void 0!==t?t:new Uint8Array,r}}},56907:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LegacyAminoPubKey=t.protobufPackage=void 0;let n=r(11879),i=r(46554),o=r(99133);function a(){return{threshold:0,publicKeys:[]}}t.protobufPackage="cosmos.crypto.multisig",t.LegacyAminoPubKey={typeUrl:"/cosmos.crypto.multisig.LegacyAminoPubKey",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();for(let r of(0!==e.threshold&&t.uint32(8).uint32(e.threshold),e.publicKeys))n.Any.encode(r,t.uint32(18).fork()).ldelim();return t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),o=void 0===t?r.len:r.pos+t,s=a();for(;r.pos>>3){case 1:s.threshold=r.uint32();break;case 2:s.publicKeys.push(n.Any.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=a();return(0,o.isSet)(e.threshold)&&(t.threshold=Number(e.threshold)),Array.isArray(null==e?void 0:e.publicKeys)&&(t.publicKeys=e.publicKeys.map(e=>n.Any.fromJSON(e))),t},toJSON(e){let t={};return void 0!==e.threshold&&(t.threshold=Math.round(e.threshold)),e.publicKeys?t.publicKeys=e.publicKeys.map(e=>e?n.Any.toJSON(e):void 0):t.publicKeys=[],t},fromPartial(e){var t,r;let i=a();return i.threshold=null!==(r=e.threshold)&&void 0!==r?r:0,i.publicKeys=(null===(t=e.publicKeys)||void 0===t?void 0:t.map(e=>n.Any.fromPartial(e)))||[],i}}},50263:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CompactBitArray=t.MultiSignature=t.protobufPackage=void 0;let n=r(46554),i=r(99133);function o(){return{signatures:[]}}function a(){return{extraBitsStored:0,elems:new Uint8Array}}t.protobufPackage="cosmos.crypto.multisig.v1beta1",t.MultiSignature={typeUrl:"/cosmos.crypto.multisig.v1beta1.MultiSignature",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.BinaryWriter.create();for(let r of e.signatures)t.uint32(10).bytes(r);return t},decode(e,t){let r=e instanceof n.BinaryReader?e:new n.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=o();for(;r.pos>>3==1?a.signatures.push(r.bytes()):r.skipType(7&e)}return a},fromJSON(e){let t=o();return Array.isArray(null==e?void 0:e.signatures)&&(t.signatures=e.signatures.map(e=>(0,i.bytesFromBase64)(e))),t},toJSON(e){let t={};return e.signatures?t.signatures=e.signatures.map(e=>(0,i.base64FromBytes)(void 0!==e?e:new Uint8Array)):t.signatures=[],t},fromPartial(e){var t;let r=o();return r.signatures=(null===(t=e.signatures)||void 0===t?void 0:t.map(e=>e))||[],r}},t.CompactBitArray={typeUrl:"/cosmos.crypto.multisig.v1beta1.CompactBitArray",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.BinaryWriter.create();return 0!==e.extraBitsStored&&t.uint32(8).uint32(e.extraBitsStored),0!==e.elems.length&&t.uint32(18).bytes(e.elems),t},decode(e,t){let r=e instanceof n.BinaryReader?e:new n.BinaryReader(e),i=void 0===t?r.len:r.pos+t,o=a();for(;r.pos>>3){case 1:o.extraBitsStored=r.uint32();break;case 2:o.elems=r.bytes();break;default:r.skipType(7&e)}}return o},fromJSON(e){let t=a();return(0,i.isSet)(e.extraBitsStored)&&(t.extraBitsStored=Number(e.extraBitsStored)),(0,i.isSet)(e.elems)&&(t.elems=(0,i.bytesFromBase64)(e.elems)),t},toJSON(e){let t={};return void 0!==e.extraBitsStored&&(t.extraBitsStored=Math.round(e.extraBitsStored)),void 0!==e.elems&&(t.elems=(0,i.base64FromBytes)(void 0!==e.elems?e.elems:new Uint8Array)),t},fromPartial(e){var t,r;let n=a();return n.extraBitsStored=null!==(t=e.extraBitsStored)&&void 0!==t?t:0,n.elems=null!==(r=e.elems)&&void 0!==r?r:new Uint8Array,n}}},57622:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PrivKey=t.PubKey=t.protobufPackage=void 0;let n=r(46554),i=r(99133);function o(){return{key:new Uint8Array}}function a(){return{key:new Uint8Array}}t.protobufPackage="cosmos.crypto.secp256k1",t.PubKey={typeUrl:"/cosmos.crypto.secp256k1.PubKey",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.BinaryWriter.create();return 0!==e.key.length&&t.uint32(10).bytes(e.key),t},decode(e,t){let r=e instanceof n.BinaryReader?e:new n.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=o();for(;r.pos>>3==1?a.key=r.bytes():r.skipType(7&e)}return a},fromJSON(e){let t=o();return(0,i.isSet)(e.key)&&(t.key=(0,i.bytesFromBase64)(e.key)),t},toJSON(e){let t={};return void 0!==e.key&&(t.key=(0,i.base64FromBytes)(void 0!==e.key?e.key:new Uint8Array)),t},fromPartial(e){var t;let r=o();return r.key=null!==(t=e.key)&&void 0!==t?t:new Uint8Array,r}},t.PrivKey={typeUrl:"/cosmos.crypto.secp256k1.PrivKey",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.BinaryWriter.create();return 0!==e.key.length&&t.uint32(10).bytes(e.key),t},decode(e,t){let r=e instanceof n.BinaryReader?e:new n.BinaryReader(e),i=void 0===t?r.len:r.pos+t,o=a();for(;r.pos>>3==1?o.key=r.bytes():r.skipType(7&e)}return o},fromJSON(e){let t=a();return(0,i.isSet)(e.key)&&(t.key=(0,i.bytesFromBase64)(e.key)),t},toJSON(e){let t={};return void 0!==e.key&&(t.key=(0,i.base64FromBytes)(void 0!==e.key?e.key:new Uint8Array)),t},fromPartial(e){var t;let r=a();return r.key=null!==(t=e.key)&&void 0!==t?t:new Uint8Array,r}}},92312:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CommunityPoolSpendProposalWithDeposit=t.DelegationDelegatorReward=t.DelegatorStartingInfo=t.CommunityPoolSpendProposal=t.FeePool=t.ValidatorSlashEvents=t.ValidatorSlashEvent=t.ValidatorOutstandingRewards=t.ValidatorAccumulatedCommission=t.ValidatorCurrentRewards=t.ValidatorHistoricalRewards=t.Params=t.protobufPackage=void 0;let n=r(14841),i=r(46554),o=r(99133);function a(){return{communityTax:"",baseProposerReward:"",bonusProposerReward:"",withdrawAddrEnabled:!1}}function s(){return{cumulativeRewardRatio:[],referenceCount:0}}function l(){return{rewards:[],period:BigInt(0)}}function u(){return{commission:[]}}function d(){return{rewards:[]}}function c(){return{validatorPeriod:BigInt(0),fraction:""}}function p(){return{validatorSlashEvents:[]}}function f(){return{communityPool:[]}}function h(){return{title:"",description:"",recipient:"",amount:[]}}function g(){return{previousPeriod:BigInt(0),stake:"",height:BigInt(0)}}function m(){return{validatorAddress:"",reward:[]}}function y(){return{title:"",description:"",recipient:"",amount:"",deposit:""}}t.protobufPackage="cosmos.distribution.v1beta1",t.Params={typeUrl:"/cosmos.distribution.v1beta1.Params",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();return""!==e.communityTax&&t.uint32(10).string(e.communityTax),""!==e.baseProposerReward&&t.uint32(18).string(e.baseProposerReward),""!==e.bonusProposerReward&&t.uint32(26).string(e.bonusProposerReward),!0===e.withdrawAddrEnabled&&t.uint32(32).bool(e.withdrawAddrEnabled),t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=a();for(;r.pos>>3){case 1:o.communityTax=r.string();break;case 2:o.baseProposerReward=r.string();break;case 3:o.bonusProposerReward=r.string();break;case 4:o.withdrawAddrEnabled=r.bool();break;default:r.skipType(7&e)}}return o},fromJSON(e){let t=a();return(0,o.isSet)(e.communityTax)&&(t.communityTax=String(e.communityTax)),(0,o.isSet)(e.baseProposerReward)&&(t.baseProposerReward=String(e.baseProposerReward)),(0,o.isSet)(e.bonusProposerReward)&&(t.bonusProposerReward=String(e.bonusProposerReward)),(0,o.isSet)(e.withdrawAddrEnabled)&&(t.withdrawAddrEnabled=!!e.withdrawAddrEnabled),t},toJSON(e){let t={};return void 0!==e.communityTax&&(t.communityTax=e.communityTax),void 0!==e.baseProposerReward&&(t.baseProposerReward=e.baseProposerReward),void 0!==e.bonusProposerReward&&(t.bonusProposerReward=e.bonusProposerReward),void 0!==e.withdrawAddrEnabled&&(t.withdrawAddrEnabled=e.withdrawAddrEnabled),t},fromPartial(e){var t,r,n,i;let o=a();return o.communityTax=null!==(t=e.communityTax)&&void 0!==t?t:"",o.baseProposerReward=null!==(r=e.baseProposerReward)&&void 0!==r?r:"",o.bonusProposerReward=null!==(n=e.bonusProposerReward)&&void 0!==n?n:"",o.withdrawAddrEnabled=null!==(i=e.withdrawAddrEnabled)&&void 0!==i&&i,o}},t.ValidatorHistoricalRewards={typeUrl:"/cosmos.distribution.v1beta1.ValidatorHistoricalRewards",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();for(let r of e.cumulativeRewardRatio)n.DecCoin.encode(r,t.uint32(10).fork()).ldelim();return 0!==e.referenceCount&&t.uint32(16).uint32(e.referenceCount),t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),o=void 0===t?r.len:r.pos+t,a=s();for(;r.pos>>3){case 1:a.cumulativeRewardRatio.push(n.DecCoin.decode(r,r.uint32()));break;case 2:a.referenceCount=r.uint32();break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=s();return Array.isArray(null==e?void 0:e.cumulativeRewardRatio)&&(t.cumulativeRewardRatio=e.cumulativeRewardRatio.map(e=>n.DecCoin.fromJSON(e))),(0,o.isSet)(e.referenceCount)&&(t.referenceCount=Number(e.referenceCount)),t},toJSON(e){let t={};return e.cumulativeRewardRatio?t.cumulativeRewardRatio=e.cumulativeRewardRatio.map(e=>e?n.DecCoin.toJSON(e):void 0):t.cumulativeRewardRatio=[],void 0!==e.referenceCount&&(t.referenceCount=Math.round(e.referenceCount)),t},fromPartial(e){var t,r;let i=s();return i.cumulativeRewardRatio=(null===(t=e.cumulativeRewardRatio)||void 0===t?void 0:t.map(e=>n.DecCoin.fromPartial(e)))||[],i.referenceCount=null!==(r=e.referenceCount)&&void 0!==r?r:0,i}},t.ValidatorCurrentRewards={typeUrl:"/cosmos.distribution.v1beta1.ValidatorCurrentRewards",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();for(let r of e.rewards)n.DecCoin.encode(r,t.uint32(10).fork()).ldelim();return e.period!==BigInt(0)&&t.uint32(16).uint64(e.period),t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),o=void 0===t?r.len:r.pos+t,a=l();for(;r.pos>>3){case 1:a.rewards.push(n.DecCoin.decode(r,r.uint32()));break;case 2:a.period=r.uint64();break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=l();return Array.isArray(null==e?void 0:e.rewards)&&(t.rewards=e.rewards.map(e=>n.DecCoin.fromJSON(e))),(0,o.isSet)(e.period)&&(t.period=BigInt(e.period.toString())),t},toJSON(e){let t={};return e.rewards?t.rewards=e.rewards.map(e=>e?n.DecCoin.toJSON(e):void 0):t.rewards=[],void 0!==e.period&&(t.period=(e.period||BigInt(0)).toString()),t},fromPartial(e){var t;let r=l();return r.rewards=(null===(t=e.rewards)||void 0===t?void 0:t.map(e=>n.DecCoin.fromPartial(e)))||[],void 0!==e.period&&null!==e.period&&(r.period=BigInt(e.period.toString())),r}},t.ValidatorAccumulatedCommission={typeUrl:"/cosmos.distribution.v1beta1.ValidatorAccumulatedCommission",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();for(let r of e.commission)n.DecCoin.encode(r,t.uint32(10).fork()).ldelim();return t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),o=void 0===t?r.len:r.pos+t,a=u();for(;r.pos>>3==1?a.commission.push(n.DecCoin.decode(r,r.uint32())):r.skipType(7&e)}return a},fromJSON(e){let t=u();return Array.isArray(null==e?void 0:e.commission)&&(t.commission=e.commission.map(e=>n.DecCoin.fromJSON(e))),t},toJSON(e){let t={};return e.commission?t.commission=e.commission.map(e=>e?n.DecCoin.toJSON(e):void 0):t.commission=[],t},fromPartial(e){var t;let r=u();return r.commission=(null===(t=e.commission)||void 0===t?void 0:t.map(e=>n.DecCoin.fromPartial(e)))||[],r}},t.ValidatorOutstandingRewards={typeUrl:"/cosmos.distribution.v1beta1.ValidatorOutstandingRewards",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();for(let r of e.rewards)n.DecCoin.encode(r,t.uint32(10).fork()).ldelim();return t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),o=void 0===t?r.len:r.pos+t,a=d();for(;r.pos>>3==1?a.rewards.push(n.DecCoin.decode(r,r.uint32())):r.skipType(7&e)}return a},fromJSON(e){let t=d();return Array.isArray(null==e?void 0:e.rewards)&&(t.rewards=e.rewards.map(e=>n.DecCoin.fromJSON(e))),t},toJSON(e){let t={};return e.rewards?t.rewards=e.rewards.map(e=>e?n.DecCoin.toJSON(e):void 0):t.rewards=[],t},fromPartial(e){var t;let r=d();return r.rewards=(null===(t=e.rewards)||void 0===t?void 0:t.map(e=>n.DecCoin.fromPartial(e)))||[],r}},t.ValidatorSlashEvent={typeUrl:"/cosmos.distribution.v1beta1.ValidatorSlashEvent",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();return e.validatorPeriod!==BigInt(0)&&t.uint32(8).uint64(e.validatorPeriod),""!==e.fraction&&t.uint32(18).string(e.fraction),t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=c();for(;r.pos>>3){case 1:o.validatorPeriod=r.uint64();break;case 2:o.fraction=r.string();break;default:r.skipType(7&e)}}return o},fromJSON(e){let t=c();return(0,o.isSet)(e.validatorPeriod)&&(t.validatorPeriod=BigInt(e.validatorPeriod.toString())),(0,o.isSet)(e.fraction)&&(t.fraction=String(e.fraction)),t},toJSON(e){let t={};return void 0!==e.validatorPeriod&&(t.validatorPeriod=(e.validatorPeriod||BigInt(0)).toString()),void 0!==e.fraction&&(t.fraction=e.fraction),t},fromPartial(e){var t;let r=c();return void 0!==e.validatorPeriod&&null!==e.validatorPeriod&&(r.validatorPeriod=BigInt(e.validatorPeriod.toString())),r.fraction=null!==(t=e.fraction)&&void 0!==t?t:"",r}},t.ValidatorSlashEvents={typeUrl:"/cosmos.distribution.v1beta1.ValidatorSlashEvents",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();for(let n of e.validatorSlashEvents)t.ValidatorSlashEvent.encode(n,r.uint32(10).fork()).ldelim();return r},decode(e,r){let n=e instanceof i.BinaryReader?e:new i.BinaryReader(e),o=void 0===r?n.len:n.pos+r,a=p();for(;n.pos>>3==1?a.validatorSlashEvents.push(t.ValidatorSlashEvent.decode(n,n.uint32())):n.skipType(7&e)}return a},fromJSON(e){let r=p();return Array.isArray(null==e?void 0:e.validatorSlashEvents)&&(r.validatorSlashEvents=e.validatorSlashEvents.map(e=>t.ValidatorSlashEvent.fromJSON(e))),r},toJSON(e){let r={};return e.validatorSlashEvents?r.validatorSlashEvents=e.validatorSlashEvents.map(e=>e?t.ValidatorSlashEvent.toJSON(e):void 0):r.validatorSlashEvents=[],r},fromPartial(e){var r;let n=p();return n.validatorSlashEvents=(null===(r=e.validatorSlashEvents)||void 0===r?void 0:r.map(e=>t.ValidatorSlashEvent.fromPartial(e)))||[],n}},t.FeePool={typeUrl:"/cosmos.distribution.v1beta1.FeePool",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();for(let r of e.communityPool)n.DecCoin.encode(r,t.uint32(10).fork()).ldelim();return t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),o=void 0===t?r.len:r.pos+t,a=f();for(;r.pos>>3==1?a.communityPool.push(n.DecCoin.decode(r,r.uint32())):r.skipType(7&e)}return a},fromJSON(e){let t=f();return Array.isArray(null==e?void 0:e.communityPool)&&(t.communityPool=e.communityPool.map(e=>n.DecCoin.fromJSON(e))),t},toJSON(e){let t={};return e.communityPool?t.communityPool=e.communityPool.map(e=>e?n.DecCoin.toJSON(e):void 0):t.communityPool=[],t},fromPartial(e){var t;let r=f();return r.communityPool=(null===(t=e.communityPool)||void 0===t?void 0:t.map(e=>n.DecCoin.fromPartial(e)))||[],r}},t.CommunityPoolSpendProposal={typeUrl:"/cosmos.distribution.v1beta1.CommunityPoolSpendProposal",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();for(let r of(""!==e.title&&t.uint32(10).string(e.title),""!==e.description&&t.uint32(18).string(e.description),""!==e.recipient&&t.uint32(26).string(e.recipient),e.amount))n.Coin.encode(r,t.uint32(34).fork()).ldelim();return t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),o=void 0===t?r.len:r.pos+t,a=h();for(;r.pos>>3){case 1:a.title=r.string();break;case 2:a.description=r.string();break;case 3:a.recipient=r.string();break;case 4:a.amount.push(n.Coin.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=h();return(0,o.isSet)(e.title)&&(t.title=String(e.title)),(0,o.isSet)(e.description)&&(t.description=String(e.description)),(0,o.isSet)(e.recipient)&&(t.recipient=String(e.recipient)),Array.isArray(null==e?void 0:e.amount)&&(t.amount=e.amount.map(e=>n.Coin.fromJSON(e))),t},toJSON(e){let t={};return void 0!==e.title&&(t.title=e.title),void 0!==e.description&&(t.description=e.description),void 0!==e.recipient&&(t.recipient=e.recipient),e.amount?t.amount=e.amount.map(e=>e?n.Coin.toJSON(e):void 0):t.amount=[],t},fromPartial(e){var t,r,i,o;let a=h();return a.title=null!==(r=e.title)&&void 0!==r?r:"",a.description=null!==(i=e.description)&&void 0!==i?i:"",a.recipient=null!==(o=e.recipient)&&void 0!==o?o:"",a.amount=(null===(t=e.amount)||void 0===t?void 0:t.map(e=>n.Coin.fromPartial(e)))||[],a}},t.DelegatorStartingInfo={typeUrl:"/cosmos.distribution.v1beta1.DelegatorStartingInfo",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();return e.previousPeriod!==BigInt(0)&&t.uint32(8).uint64(e.previousPeriod),""!==e.stake&&t.uint32(18).string(e.stake),e.height!==BigInt(0)&&t.uint32(24).uint64(e.height),t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=g();for(;r.pos>>3){case 1:o.previousPeriod=r.uint64();break;case 2:o.stake=r.string();break;case 3:o.height=r.uint64();break;default:r.skipType(7&e)}}return o},fromJSON(e){let t=g();return(0,o.isSet)(e.previousPeriod)&&(t.previousPeriod=BigInt(e.previousPeriod.toString())),(0,o.isSet)(e.stake)&&(t.stake=String(e.stake)),(0,o.isSet)(e.height)&&(t.height=BigInt(e.height.toString())),t},toJSON(e){let t={};return void 0!==e.previousPeriod&&(t.previousPeriod=(e.previousPeriod||BigInt(0)).toString()),void 0!==e.stake&&(t.stake=e.stake),void 0!==e.height&&(t.height=(e.height||BigInt(0)).toString()),t},fromPartial(e){var t;let r=g();return void 0!==e.previousPeriod&&null!==e.previousPeriod&&(r.previousPeriod=BigInt(e.previousPeriod.toString())),r.stake=null!==(t=e.stake)&&void 0!==t?t:"",void 0!==e.height&&null!==e.height&&(r.height=BigInt(e.height.toString())),r}},t.DelegationDelegatorReward={typeUrl:"/cosmos.distribution.v1beta1.DelegationDelegatorReward",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();for(let r of(""!==e.validatorAddress&&t.uint32(10).string(e.validatorAddress),e.reward))n.DecCoin.encode(r,t.uint32(18).fork()).ldelim();return t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),o=void 0===t?r.len:r.pos+t,a=m();for(;r.pos>>3){case 1:a.validatorAddress=r.string();break;case 2:a.reward.push(n.DecCoin.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=m();return(0,o.isSet)(e.validatorAddress)&&(t.validatorAddress=String(e.validatorAddress)),Array.isArray(null==e?void 0:e.reward)&&(t.reward=e.reward.map(e=>n.DecCoin.fromJSON(e))),t},toJSON(e){let t={};return void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),e.reward?t.reward=e.reward.map(e=>e?n.DecCoin.toJSON(e):void 0):t.reward=[],t},fromPartial(e){var t,r;let i=m();return i.validatorAddress=null!==(r=e.validatorAddress)&&void 0!==r?r:"",i.reward=(null===(t=e.reward)||void 0===t?void 0:t.map(e=>n.DecCoin.fromPartial(e)))||[],i}},t.CommunityPoolSpendProposalWithDeposit={typeUrl:"/cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();return""!==e.title&&t.uint32(10).string(e.title),""!==e.description&&t.uint32(18).string(e.description),""!==e.recipient&&t.uint32(26).string(e.recipient),""!==e.amount&&t.uint32(34).string(e.amount),""!==e.deposit&&t.uint32(42).string(e.deposit),t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=y();for(;r.pos>>3){case 1:o.title=r.string();break;case 2:o.description=r.string();break;case 3:o.recipient=r.string();break;case 4:o.amount=r.string();break;case 5:o.deposit=r.string();break;default:r.skipType(7&e)}}return o},fromJSON(e){let t=y();return(0,o.isSet)(e.title)&&(t.title=String(e.title)),(0,o.isSet)(e.description)&&(t.description=String(e.description)),(0,o.isSet)(e.recipient)&&(t.recipient=String(e.recipient)),(0,o.isSet)(e.amount)&&(t.amount=String(e.amount)),(0,o.isSet)(e.deposit)&&(t.deposit=String(e.deposit)),t},toJSON(e){let t={};return void 0!==e.title&&(t.title=e.title),void 0!==e.description&&(t.description=e.description),void 0!==e.recipient&&(t.recipient=e.recipient),void 0!==e.amount&&(t.amount=e.amount),void 0!==e.deposit&&(t.deposit=e.deposit),t},fromPartial(e){var t,r,n,i,o;let a=y();return a.title=null!==(t=e.title)&&void 0!==t?t:"",a.description=null!==(r=e.description)&&void 0!==r?r:"",a.recipient=null!==(n=e.recipient)&&void 0!==n?n:"",a.amount=null!==(i=e.amount)&&void 0!==i?i:"",a.deposit=null!==(o=e.deposit)&&void 0!==o?o:"",a}}},91029:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QueryClientImpl=t.QueryCommunityPoolResponse=t.QueryCommunityPoolRequest=t.QueryDelegatorWithdrawAddressResponse=t.QueryDelegatorWithdrawAddressRequest=t.QueryDelegatorValidatorsResponse=t.QueryDelegatorValidatorsRequest=t.QueryDelegationTotalRewardsResponse=t.QueryDelegationTotalRewardsRequest=t.QueryDelegationRewardsResponse=t.QueryDelegationRewardsRequest=t.QueryValidatorSlashesResponse=t.QueryValidatorSlashesRequest=t.QueryValidatorCommissionResponse=t.QueryValidatorCommissionRequest=t.QueryValidatorOutstandingRewardsResponse=t.QueryValidatorOutstandingRewardsRequest=t.QueryValidatorDistributionInfoResponse=t.QueryValidatorDistributionInfoRequest=t.QueryParamsResponse=t.QueryParamsRequest=t.protobufPackage=void 0;let n=r(86141),i=r(92312),o=r(14841),a=r(46554),s=r(99133);function l(){return{}}function u(){return{params:i.Params.fromPartial({})}}function d(){return{validatorAddress:""}}function c(){return{operatorAddress:"",selfBondRewards:[],commission:[]}}function p(){return{validatorAddress:""}}function f(){return{rewards:i.ValidatorOutstandingRewards.fromPartial({})}}function h(){return{validatorAddress:""}}function g(){return{commission:i.ValidatorAccumulatedCommission.fromPartial({})}}function m(){return{validatorAddress:"",startingHeight:BigInt(0),endingHeight:BigInt(0),pagination:void 0}}function y(){return{slashes:[],pagination:void 0}}function v(){return{delegatorAddress:"",validatorAddress:""}}function b(){return{rewards:[]}}function S(){return{delegatorAddress:""}}function w(){return{rewards:[],total:[]}}function _(){return{delegatorAddress:""}}function k(){return{validators:[]}}function O(){return{delegatorAddress:""}}function P(){return{withdrawAddress:""}}function A(){return{}}function I(){return{pool:[]}}t.protobufPackage="cosmos.distribution.v1beta1",t.QueryParamsRequest={typeUrl:"/cosmos.distribution.v1beta1.QueryParamsRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=l();for(;r.posl(),toJSON:e=>({}),fromPartial:e=>l()},t.QueryParamsResponse={typeUrl:"/cosmos.distribution.v1beta1.QueryParamsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return void 0!==e.params&&i.Params.encode(e.params,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=u();for(;r.pos>>3==1?o.params=i.Params.decode(r,r.uint32()):r.skipType(7&e)}return o},fromJSON(e){let t=u();return(0,s.isSet)(e.params)&&(t.params=i.Params.fromJSON(e.params)),t},toJSON(e){let t={};return void 0!==e.params&&(t.params=e.params?i.Params.toJSON(e.params):void 0),t},fromPartial(e){let t=u();return void 0!==e.params&&null!==e.params&&(t.params=i.Params.fromPartial(e.params)),t}},t.QueryValidatorDistributionInfoRequest={typeUrl:"/cosmos.distribution.v1beta1.QueryValidatorDistributionInfoRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.validatorAddress&&t.uint32(10).string(e.validatorAddress),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=d();for(;r.pos>>3==1?i.validatorAddress=r.string():r.skipType(7&e)}return i},fromJSON(e){let t=d();return(0,s.isSet)(e.validatorAddress)&&(t.validatorAddress=String(e.validatorAddress)),t},toJSON(e){let t={};return void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),t},fromPartial(e){var t;let r=d();return r.validatorAddress=null!==(t=e.validatorAddress)&&void 0!==t?t:"",r}},t.QueryValidatorDistributionInfoResponse={typeUrl:"/cosmos.distribution.v1beta1.QueryValidatorDistributionInfoResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();for(let r of(""!==e.operatorAddress&&t.uint32(10).string(e.operatorAddress),e.selfBondRewards))o.DecCoin.encode(r,t.uint32(18).fork()).ldelim();for(let r of e.commission)o.DecCoin.encode(r,t.uint32(26).fork()).ldelim();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=c();for(;r.pos>>3){case 1:i.operatorAddress=r.string();break;case 2:i.selfBondRewards.push(o.DecCoin.decode(r,r.uint32()));break;case 3:i.commission.push(o.DecCoin.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=c();return(0,s.isSet)(e.operatorAddress)&&(t.operatorAddress=String(e.operatorAddress)),Array.isArray(null==e?void 0:e.selfBondRewards)&&(t.selfBondRewards=e.selfBondRewards.map(e=>o.DecCoin.fromJSON(e))),Array.isArray(null==e?void 0:e.commission)&&(t.commission=e.commission.map(e=>o.DecCoin.fromJSON(e))),t},toJSON(e){let t={};return void 0!==e.operatorAddress&&(t.operatorAddress=e.operatorAddress),e.selfBondRewards?t.selfBondRewards=e.selfBondRewards.map(e=>e?o.DecCoin.toJSON(e):void 0):t.selfBondRewards=[],e.commission?t.commission=e.commission.map(e=>e?o.DecCoin.toJSON(e):void 0):t.commission=[],t},fromPartial(e){var t,r,n;let i=c();return i.operatorAddress=null!==(n=e.operatorAddress)&&void 0!==n?n:"",i.selfBondRewards=(null===(t=e.selfBondRewards)||void 0===t?void 0:t.map(e=>o.DecCoin.fromPartial(e)))||[],i.commission=(null===(r=e.commission)||void 0===r?void 0:r.map(e=>o.DecCoin.fromPartial(e)))||[],i}},t.QueryValidatorOutstandingRewardsRequest={typeUrl:"/cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.validatorAddress&&t.uint32(10).string(e.validatorAddress),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=p();for(;r.pos>>3==1?i.validatorAddress=r.string():r.skipType(7&e)}return i},fromJSON(e){let t=p();return(0,s.isSet)(e.validatorAddress)&&(t.validatorAddress=String(e.validatorAddress)),t},toJSON(e){let t={};return void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),t},fromPartial(e){var t;let r=p();return r.validatorAddress=null!==(t=e.validatorAddress)&&void 0!==t?t:"",r}},t.QueryValidatorOutstandingRewardsResponse={typeUrl:"/cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return void 0!==e.rewards&&i.ValidatorOutstandingRewards.encode(e.rewards,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=f();for(;r.pos>>3==1?o.rewards=i.ValidatorOutstandingRewards.decode(r,r.uint32()):r.skipType(7&e)}return o},fromJSON(e){let t=f();return(0,s.isSet)(e.rewards)&&(t.rewards=i.ValidatorOutstandingRewards.fromJSON(e.rewards)),t},toJSON(e){let t={};return void 0!==e.rewards&&(t.rewards=e.rewards?i.ValidatorOutstandingRewards.toJSON(e.rewards):void 0),t},fromPartial(e){let t=f();return void 0!==e.rewards&&null!==e.rewards&&(t.rewards=i.ValidatorOutstandingRewards.fromPartial(e.rewards)),t}},t.QueryValidatorCommissionRequest={typeUrl:"/cosmos.distribution.v1beta1.QueryValidatorCommissionRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.validatorAddress&&t.uint32(10).string(e.validatorAddress),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=h();for(;r.pos>>3==1?i.validatorAddress=r.string():r.skipType(7&e)}return i},fromJSON(e){let t=h();return(0,s.isSet)(e.validatorAddress)&&(t.validatorAddress=String(e.validatorAddress)),t},toJSON(e){let t={};return void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),t},fromPartial(e){var t;let r=h();return r.validatorAddress=null!==(t=e.validatorAddress)&&void 0!==t?t:"",r}},t.QueryValidatorCommissionResponse={typeUrl:"/cosmos.distribution.v1beta1.QueryValidatorCommissionResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return void 0!==e.commission&&i.ValidatorAccumulatedCommission.encode(e.commission,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=g();for(;r.pos>>3==1?o.commission=i.ValidatorAccumulatedCommission.decode(r,r.uint32()):r.skipType(7&e)}return o},fromJSON(e){let t=g();return(0,s.isSet)(e.commission)&&(t.commission=i.ValidatorAccumulatedCommission.fromJSON(e.commission)),t},toJSON(e){let t={};return void 0!==e.commission&&(t.commission=e.commission?i.ValidatorAccumulatedCommission.toJSON(e.commission):void 0),t},fromPartial(e){let t=g();return void 0!==e.commission&&null!==e.commission&&(t.commission=i.ValidatorAccumulatedCommission.fromPartial(e.commission)),t}},t.QueryValidatorSlashesRequest={typeUrl:"/cosmos.distribution.v1beta1.QueryValidatorSlashesRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.validatorAddress&&t.uint32(10).string(e.validatorAddress),e.startingHeight!==BigInt(0)&&t.uint32(16).uint64(e.startingHeight),e.endingHeight!==BigInt(0)&&t.uint32(24).uint64(e.endingHeight),void 0!==e.pagination&&n.PageRequest.encode(e.pagination,t.uint32(34).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),i=void 0===t?r.len:r.pos+t,o=m();for(;r.pos>>3){case 1:o.validatorAddress=r.string();break;case 2:o.startingHeight=r.uint64();break;case 3:o.endingHeight=r.uint64();break;case 4:o.pagination=n.PageRequest.decode(r,r.uint32());break;default:r.skipType(7&e)}}return o},fromJSON(e){let t=m();return(0,s.isSet)(e.validatorAddress)&&(t.validatorAddress=String(e.validatorAddress)),(0,s.isSet)(e.startingHeight)&&(t.startingHeight=BigInt(e.startingHeight.toString())),(0,s.isSet)(e.endingHeight)&&(t.endingHeight=BigInt(e.endingHeight.toString())),(0,s.isSet)(e.pagination)&&(t.pagination=n.PageRequest.fromJSON(e.pagination)),t},toJSON(e){let t={};return void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),void 0!==e.startingHeight&&(t.startingHeight=(e.startingHeight||BigInt(0)).toString()),void 0!==e.endingHeight&&(t.endingHeight=(e.endingHeight||BigInt(0)).toString()),void 0!==e.pagination&&(t.pagination=e.pagination?n.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=m();return r.validatorAddress=null!==(t=e.validatorAddress)&&void 0!==t?t:"",void 0!==e.startingHeight&&null!==e.startingHeight&&(r.startingHeight=BigInt(e.startingHeight.toString())),void 0!==e.endingHeight&&null!==e.endingHeight&&(r.endingHeight=BigInt(e.endingHeight.toString())),void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageRequest.fromPartial(e.pagination)),r}},t.QueryValidatorSlashesResponse={typeUrl:"/cosmos.distribution.v1beta1.QueryValidatorSlashesResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();for(let r of e.slashes)i.ValidatorSlashEvent.encode(r,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&n.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),o=void 0===t?r.len:r.pos+t,s=y();for(;r.pos>>3){case 1:s.slashes.push(i.ValidatorSlashEvent.decode(r,r.uint32()));break;case 2:s.pagination=n.PageResponse.decode(r,r.uint32());break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=y();return Array.isArray(null==e?void 0:e.slashes)&&(t.slashes=e.slashes.map(e=>i.ValidatorSlashEvent.fromJSON(e))),(0,s.isSet)(e.pagination)&&(t.pagination=n.PageResponse.fromJSON(e.pagination)),t},toJSON(e){let t={};return e.slashes?t.slashes=e.slashes.map(e=>e?i.ValidatorSlashEvent.toJSON(e):void 0):t.slashes=[],void 0!==e.pagination&&(t.pagination=e.pagination?n.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=y();return r.slashes=(null===(t=e.slashes)||void 0===t?void 0:t.map(e=>i.ValidatorSlashEvent.fromPartial(e)))||[],void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageResponse.fromPartial(e.pagination)),r}},t.QueryDelegationRewardsRequest={typeUrl:"/cosmos.distribution.v1beta1.QueryDelegationRewardsRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),""!==e.validatorAddress&&t.uint32(18).string(e.validatorAddress),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=v();for(;r.pos>>3){case 1:i.delegatorAddress=r.string();break;case 2:i.validatorAddress=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=v();return(0,s.isSet)(e.delegatorAddress)&&(t.delegatorAddress=String(e.delegatorAddress)),(0,s.isSet)(e.validatorAddress)&&(t.validatorAddress=String(e.validatorAddress)),t},toJSON(e){let t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),t},fromPartial(e){var t,r;let n=v();return n.delegatorAddress=null!==(t=e.delegatorAddress)&&void 0!==t?t:"",n.validatorAddress=null!==(r=e.validatorAddress)&&void 0!==r?r:"",n}},t.QueryDelegationRewardsResponse={typeUrl:"/cosmos.distribution.v1beta1.QueryDelegationRewardsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();for(let r of e.rewards)o.DecCoin.encode(r,t.uint32(10).fork()).ldelim();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=b();for(;r.pos>>3==1?i.rewards.push(o.DecCoin.decode(r,r.uint32())):r.skipType(7&e)}return i},fromJSON(e){let t=b();return Array.isArray(null==e?void 0:e.rewards)&&(t.rewards=e.rewards.map(e=>o.DecCoin.fromJSON(e))),t},toJSON(e){let t={};return e.rewards?t.rewards=e.rewards.map(e=>e?o.DecCoin.toJSON(e):void 0):t.rewards=[],t},fromPartial(e){var t;let r=b();return r.rewards=(null===(t=e.rewards)||void 0===t?void 0:t.map(e=>o.DecCoin.fromPartial(e)))||[],r}},t.QueryDelegationTotalRewardsRequest={typeUrl:"/cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=S();for(;r.pos>>3==1?i.delegatorAddress=r.string():r.skipType(7&e)}return i},fromJSON(e){let t=S();return(0,s.isSet)(e.delegatorAddress)&&(t.delegatorAddress=String(e.delegatorAddress)),t},toJSON(e){let t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),t},fromPartial(e){var t;let r=S();return r.delegatorAddress=null!==(t=e.delegatorAddress)&&void 0!==t?t:"",r}},t.QueryDelegationTotalRewardsResponse={typeUrl:"/cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();for(let r of e.rewards)i.DelegationDelegatorReward.encode(r,t.uint32(10).fork()).ldelim();for(let r of e.total)o.DecCoin.encode(r,t.uint32(18).fork()).ldelim();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,s=w();for(;r.pos>>3){case 1:s.rewards.push(i.DelegationDelegatorReward.decode(r,r.uint32()));break;case 2:s.total.push(o.DecCoin.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=w();return Array.isArray(null==e?void 0:e.rewards)&&(t.rewards=e.rewards.map(e=>i.DelegationDelegatorReward.fromJSON(e))),Array.isArray(null==e?void 0:e.total)&&(t.total=e.total.map(e=>o.DecCoin.fromJSON(e))),t},toJSON(e){let t={};return e.rewards?t.rewards=e.rewards.map(e=>e?i.DelegationDelegatorReward.toJSON(e):void 0):t.rewards=[],e.total?t.total=e.total.map(e=>e?o.DecCoin.toJSON(e):void 0):t.total=[],t},fromPartial(e){var t,r;let n=w();return n.rewards=(null===(t=e.rewards)||void 0===t?void 0:t.map(e=>i.DelegationDelegatorReward.fromPartial(e)))||[],n.total=(null===(r=e.total)||void 0===r?void 0:r.map(e=>o.DecCoin.fromPartial(e)))||[],n}},t.QueryDelegatorValidatorsRequest={typeUrl:"/cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=_();for(;r.pos>>3==1?i.delegatorAddress=r.string():r.skipType(7&e)}return i},fromJSON(e){let t=_();return(0,s.isSet)(e.delegatorAddress)&&(t.delegatorAddress=String(e.delegatorAddress)),t},toJSON(e){let t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),t},fromPartial(e){var t;let r=_();return r.delegatorAddress=null!==(t=e.delegatorAddress)&&void 0!==t?t:"",r}},t.QueryDelegatorValidatorsResponse={typeUrl:"/cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();for(let r of e.validators)t.uint32(10).string(r);return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=k();for(;r.pos>>3==1?i.validators.push(r.string()):r.skipType(7&e)}return i},fromJSON(e){let t=k();return Array.isArray(null==e?void 0:e.validators)&&(t.validators=e.validators.map(e=>String(e))),t},toJSON(e){let t={};return e.validators?t.validators=e.validators.map(e=>e):t.validators=[],t},fromPartial(e){var t;let r=k();return r.validators=(null===(t=e.validators)||void 0===t?void 0:t.map(e=>e))||[],r}},t.QueryDelegatorWithdrawAddressRequest={typeUrl:"/cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=O();for(;r.pos>>3==1?i.delegatorAddress=r.string():r.skipType(7&e)}return i},fromJSON(e){let t=O();return(0,s.isSet)(e.delegatorAddress)&&(t.delegatorAddress=String(e.delegatorAddress)),t},toJSON(e){let t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),t},fromPartial(e){var t;let r=O();return r.delegatorAddress=null!==(t=e.delegatorAddress)&&void 0!==t?t:"",r}},t.QueryDelegatorWithdrawAddressResponse={typeUrl:"/cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.withdrawAddress&&t.uint32(10).string(e.withdrawAddress),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=P();for(;r.pos>>3==1?i.withdrawAddress=r.string():r.skipType(7&e)}return i},fromJSON(e){let t=P();return(0,s.isSet)(e.withdrawAddress)&&(t.withdrawAddress=String(e.withdrawAddress)),t},toJSON(e){let t={};return void 0!==e.withdrawAddress&&(t.withdrawAddress=e.withdrawAddress),t},fromPartial(e){var t;let r=P();return r.withdrawAddress=null!==(t=e.withdrawAddress)&&void 0!==t?t:"",r}},t.QueryCommunityPoolRequest={typeUrl:"/cosmos.distribution.v1beta1.QueryCommunityPoolRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=A();for(;r.posA(),toJSON:e=>({}),fromPartial:e=>A()},t.QueryCommunityPoolResponse={typeUrl:"/cosmos.distribution.v1beta1.QueryCommunityPoolResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();for(let r of e.pool)o.DecCoin.encode(r,t.uint32(10).fork()).ldelim();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=I();for(;r.pos>>3==1?i.pool.push(o.DecCoin.decode(r,r.uint32())):r.skipType(7&e)}return i},fromJSON(e){let t=I();return Array.isArray(null==e?void 0:e.pool)&&(t.pool=e.pool.map(e=>o.DecCoin.fromJSON(e))),t},toJSON(e){let t={};return e.pool?t.pool=e.pool.map(e=>e?o.DecCoin.toJSON(e):void 0):t.pool=[],t},fromPartial(e){var t;let r=I();return r.pool=(null===(t=e.pool)||void 0===t?void 0:t.map(e=>o.DecCoin.fromPartial(e)))||[],r}};class R{Params(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.QueryParamsRequest.encode(e).finish();return this.rpc.request("cosmos.distribution.v1beta1.Query","Params",r).then(e=>t.QueryParamsResponse.decode(new a.BinaryReader(e)))}ValidatorDistributionInfo(e){let r=t.QueryValidatorDistributionInfoRequest.encode(e).finish();return this.rpc.request("cosmos.distribution.v1beta1.Query","ValidatorDistributionInfo",r).then(e=>t.QueryValidatorDistributionInfoResponse.decode(new a.BinaryReader(e)))}ValidatorOutstandingRewards(e){let r=t.QueryValidatorOutstandingRewardsRequest.encode(e).finish();return this.rpc.request("cosmos.distribution.v1beta1.Query","ValidatorOutstandingRewards",r).then(e=>t.QueryValidatorOutstandingRewardsResponse.decode(new a.BinaryReader(e)))}ValidatorCommission(e){let r=t.QueryValidatorCommissionRequest.encode(e).finish();return this.rpc.request("cosmos.distribution.v1beta1.Query","ValidatorCommission",r).then(e=>t.QueryValidatorCommissionResponse.decode(new a.BinaryReader(e)))}ValidatorSlashes(e){let r=t.QueryValidatorSlashesRequest.encode(e).finish();return this.rpc.request("cosmos.distribution.v1beta1.Query","ValidatorSlashes",r).then(e=>t.QueryValidatorSlashesResponse.decode(new a.BinaryReader(e)))}DelegationRewards(e){let r=t.QueryDelegationRewardsRequest.encode(e).finish();return this.rpc.request("cosmos.distribution.v1beta1.Query","DelegationRewards",r).then(e=>t.QueryDelegationRewardsResponse.decode(new a.BinaryReader(e)))}DelegationTotalRewards(e){let r=t.QueryDelegationTotalRewardsRequest.encode(e).finish();return this.rpc.request("cosmos.distribution.v1beta1.Query","DelegationTotalRewards",r).then(e=>t.QueryDelegationTotalRewardsResponse.decode(new a.BinaryReader(e)))}DelegatorValidators(e){let r=t.QueryDelegatorValidatorsRequest.encode(e).finish();return this.rpc.request("cosmos.distribution.v1beta1.Query","DelegatorValidators",r).then(e=>t.QueryDelegatorValidatorsResponse.decode(new a.BinaryReader(e)))}DelegatorWithdrawAddress(e){let r=t.QueryDelegatorWithdrawAddressRequest.encode(e).finish();return this.rpc.request("cosmos.distribution.v1beta1.Query","DelegatorWithdrawAddress",r).then(e=>t.QueryDelegatorWithdrawAddressResponse.decode(new a.BinaryReader(e)))}CommunityPool(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.QueryCommunityPoolRequest.encode(e).finish();return this.rpc.request("cosmos.distribution.v1beta1.Query","CommunityPool",r).then(e=>t.QueryCommunityPoolResponse.decode(new a.BinaryReader(e)))}constructor(e){this.rpc=e,this.Params=this.Params.bind(this),this.ValidatorDistributionInfo=this.ValidatorDistributionInfo.bind(this),this.ValidatorOutstandingRewards=this.ValidatorOutstandingRewards.bind(this),this.ValidatorCommission=this.ValidatorCommission.bind(this),this.ValidatorSlashes=this.ValidatorSlashes.bind(this),this.DelegationRewards=this.DelegationRewards.bind(this),this.DelegationTotalRewards=this.DelegationTotalRewards.bind(this),this.DelegatorValidators=this.DelegatorValidators.bind(this),this.DelegatorWithdrawAddress=this.DelegatorWithdrawAddress.bind(this),this.CommunityPool=this.CommunityPool.bind(this)}}t.QueryClientImpl=R},53856:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MsgClientImpl=t.MsgCommunityPoolSpendResponse=t.MsgCommunityPoolSpend=t.MsgUpdateParamsResponse=t.MsgUpdateParams=t.MsgFundCommunityPoolResponse=t.MsgFundCommunityPool=t.MsgWithdrawValidatorCommissionResponse=t.MsgWithdrawValidatorCommission=t.MsgWithdrawDelegatorRewardResponse=t.MsgWithdrawDelegatorReward=t.MsgSetWithdrawAddressResponse=t.MsgSetWithdrawAddress=t.protobufPackage=void 0;let n=r(14841),i=r(92312),o=r(46554),a=r(99133);function s(){return{delegatorAddress:"",withdrawAddress:""}}function l(){return{}}function u(){return{delegatorAddress:"",validatorAddress:""}}function d(){return{amount:[]}}function c(){return{validatorAddress:""}}function p(){return{amount:[]}}function f(){return{amount:[],depositor:""}}function h(){return{}}function g(){return{authority:"",params:i.Params.fromPartial({})}}function m(){return{}}function y(){return{authority:"",recipient:"",amount:[]}}function v(){return{}}t.protobufPackage="cosmos.distribution.v1beta1",t.MsgSetWithdrawAddress={typeUrl:"/cosmos.distribution.v1beta1.MsgSetWithdrawAddress",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),""!==e.withdrawAddress&&t.uint32(18).string(e.withdrawAddress),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=s();for(;r.pos>>3){case 1:i.delegatorAddress=r.string();break;case 2:i.withdrawAddress=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=s();return(0,a.isSet)(e.delegatorAddress)&&(t.delegatorAddress=String(e.delegatorAddress)),(0,a.isSet)(e.withdrawAddress)&&(t.withdrawAddress=String(e.withdrawAddress)),t},toJSON(e){let t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.withdrawAddress&&(t.withdrawAddress=e.withdrawAddress),t},fromPartial(e){var t,r;let n=s();return n.delegatorAddress=null!==(t=e.delegatorAddress)&&void 0!==t?t:"",n.withdrawAddress=null!==(r=e.withdrawAddress)&&void 0!==r?r:"",n}},t.MsgSetWithdrawAddressResponse={typeUrl:"/cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=l();for(;r.posl(),toJSON:e=>({}),fromPartial:e=>l()},t.MsgWithdrawDelegatorReward={typeUrl:"/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),""!==e.validatorAddress&&t.uint32(18).string(e.validatorAddress),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=u();for(;r.pos>>3){case 1:i.delegatorAddress=r.string();break;case 2:i.validatorAddress=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=u();return(0,a.isSet)(e.delegatorAddress)&&(t.delegatorAddress=String(e.delegatorAddress)),(0,a.isSet)(e.validatorAddress)&&(t.validatorAddress=String(e.validatorAddress)),t},toJSON(e){let t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),t},fromPartial(e){var t,r;let n=u();return n.delegatorAddress=null!==(t=e.delegatorAddress)&&void 0!==t?t:"",n.validatorAddress=null!==(r=e.validatorAddress)&&void 0!==r?r:"",n}},t.MsgWithdrawDelegatorRewardResponse={typeUrl:"/cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of e.amount)n.Coin.encode(r,t.uint32(10).fork()).ldelim();return t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=d();for(;r.pos>>3==1?a.amount.push(n.Coin.decode(r,r.uint32())):r.skipType(7&e)}return a},fromJSON(e){let t=d();return Array.isArray(null==e?void 0:e.amount)&&(t.amount=e.amount.map(e=>n.Coin.fromJSON(e))),t},toJSON(e){let t={};return e.amount?t.amount=e.amount.map(e=>e?n.Coin.toJSON(e):void 0):t.amount=[],t},fromPartial(e){var t;let r=d();return r.amount=(null===(t=e.amount)||void 0===t?void 0:t.map(e=>n.Coin.fromPartial(e)))||[],r}},t.MsgWithdrawValidatorCommission={typeUrl:"/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.validatorAddress&&t.uint32(10).string(e.validatorAddress),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=c();for(;r.pos>>3==1?i.validatorAddress=r.string():r.skipType(7&e)}return i},fromJSON(e){let t=c();return(0,a.isSet)(e.validatorAddress)&&(t.validatorAddress=String(e.validatorAddress)),t},toJSON(e){let t={};return void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),t},fromPartial(e){var t;let r=c();return r.validatorAddress=null!==(t=e.validatorAddress)&&void 0!==t?t:"",r}},t.MsgWithdrawValidatorCommissionResponse={typeUrl:"/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of e.amount)n.Coin.encode(r,t.uint32(10).fork()).ldelim();return t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=p();for(;r.pos>>3==1?a.amount.push(n.Coin.decode(r,r.uint32())):r.skipType(7&e)}return a},fromJSON(e){let t=p();return Array.isArray(null==e?void 0:e.amount)&&(t.amount=e.amount.map(e=>n.Coin.fromJSON(e))),t},toJSON(e){let t={};return e.amount?t.amount=e.amount.map(e=>e?n.Coin.toJSON(e):void 0):t.amount=[],t},fromPartial(e){var t;let r=p();return r.amount=(null===(t=e.amount)||void 0===t?void 0:t.map(e=>n.Coin.fromPartial(e)))||[],r}},t.MsgFundCommunityPool={typeUrl:"/cosmos.distribution.v1beta1.MsgFundCommunityPool",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of e.amount)n.Coin.encode(r,t.uint32(10).fork()).ldelim();return""!==e.depositor&&t.uint32(18).string(e.depositor),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=f();for(;r.pos>>3){case 1:a.amount.push(n.Coin.decode(r,r.uint32()));break;case 2:a.depositor=r.string();break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=f();return Array.isArray(null==e?void 0:e.amount)&&(t.amount=e.amount.map(e=>n.Coin.fromJSON(e))),(0,a.isSet)(e.depositor)&&(t.depositor=String(e.depositor)),t},toJSON(e){let t={};return e.amount?t.amount=e.amount.map(e=>e?n.Coin.toJSON(e):void 0):t.amount=[],void 0!==e.depositor&&(t.depositor=e.depositor),t},fromPartial(e){var t,r;let i=f();return i.amount=(null===(t=e.amount)||void 0===t?void 0:t.map(e=>n.Coin.fromPartial(e)))||[],i.depositor=null!==(r=e.depositor)&&void 0!==r?r:"",i}},t.MsgFundCommunityPoolResponse={typeUrl:"/cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=h();for(;r.posh(),toJSON:e=>({}),fromPartial:e=>h()},t.MsgUpdateParams={typeUrl:"/cosmos.distribution.v1beta1.MsgUpdateParams",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.authority&&t.uint32(10).string(e.authority),void 0!==e.params&&i.Params.encode(e.params,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,a=g();for(;r.pos>>3){case 1:a.authority=r.string();break;case 2:a.params=i.Params.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=g();return(0,a.isSet)(e.authority)&&(t.authority=String(e.authority)),(0,a.isSet)(e.params)&&(t.params=i.Params.fromJSON(e.params)),t},toJSON(e){let t={};return void 0!==e.authority&&(t.authority=e.authority),void 0!==e.params&&(t.params=e.params?i.Params.toJSON(e.params):void 0),t},fromPartial(e){var t;let r=g();return r.authority=null!==(t=e.authority)&&void 0!==t?t:"",void 0!==e.params&&null!==e.params&&(r.params=i.Params.fromPartial(e.params)),r}},t.MsgUpdateParamsResponse={typeUrl:"/cosmos.distribution.v1beta1.MsgUpdateParamsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=m();for(;r.posm(),toJSON:e=>({}),fromPartial:e=>m()},t.MsgCommunityPoolSpend={typeUrl:"/cosmos.distribution.v1beta1.MsgCommunityPoolSpend",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of(""!==e.authority&&t.uint32(10).string(e.authority),""!==e.recipient&&t.uint32(18).string(e.recipient),e.amount))n.Coin.encode(r,t.uint32(26).fork()).ldelim();return t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=y();for(;r.pos>>3){case 1:a.authority=r.string();break;case 2:a.recipient=r.string();break;case 3:a.amount.push(n.Coin.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=y();return(0,a.isSet)(e.authority)&&(t.authority=String(e.authority)),(0,a.isSet)(e.recipient)&&(t.recipient=String(e.recipient)),Array.isArray(null==e?void 0:e.amount)&&(t.amount=e.amount.map(e=>n.Coin.fromJSON(e))),t},toJSON(e){let t={};return void 0!==e.authority&&(t.authority=e.authority),void 0!==e.recipient&&(t.recipient=e.recipient),e.amount?t.amount=e.amount.map(e=>e?n.Coin.toJSON(e):void 0):t.amount=[],t},fromPartial(e){var t,r,i;let o=y();return o.authority=null!==(r=e.authority)&&void 0!==r?r:"",o.recipient=null!==(i=e.recipient)&&void 0!==i?i:"",o.amount=(null===(t=e.amount)||void 0===t?void 0:t.map(e=>n.Coin.fromPartial(e)))||[],o}},t.MsgCommunityPoolSpendResponse={typeUrl:"/cosmos.distribution.v1beta1.MsgCommunityPoolSpendResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=v();for(;r.posv(),toJSON:e=>({}),fromPartial:e=>v()};class b{SetWithdrawAddress(e){let r=t.MsgSetWithdrawAddress.encode(e).finish();return this.rpc.request("cosmos.distribution.v1beta1.Msg","SetWithdrawAddress",r).then(e=>t.MsgSetWithdrawAddressResponse.decode(new o.BinaryReader(e)))}WithdrawDelegatorReward(e){let r=t.MsgWithdrawDelegatorReward.encode(e).finish();return this.rpc.request("cosmos.distribution.v1beta1.Msg","WithdrawDelegatorReward",r).then(e=>t.MsgWithdrawDelegatorRewardResponse.decode(new o.BinaryReader(e)))}WithdrawValidatorCommission(e){let r=t.MsgWithdrawValidatorCommission.encode(e).finish();return this.rpc.request("cosmos.distribution.v1beta1.Msg","WithdrawValidatorCommission",r).then(e=>t.MsgWithdrawValidatorCommissionResponse.decode(new o.BinaryReader(e)))}FundCommunityPool(e){let r=t.MsgFundCommunityPool.encode(e).finish();return this.rpc.request("cosmos.distribution.v1beta1.Msg","FundCommunityPool",r).then(e=>t.MsgFundCommunityPoolResponse.decode(new o.BinaryReader(e)))}UpdateParams(e){let r=t.MsgUpdateParams.encode(e).finish();return this.rpc.request("cosmos.distribution.v1beta1.Msg","UpdateParams",r).then(e=>t.MsgUpdateParamsResponse.decode(new o.BinaryReader(e)))}CommunityPoolSpend(e){let r=t.MsgCommunityPoolSpend.encode(e).finish();return this.rpc.request("cosmos.distribution.v1beta1.Msg","CommunityPoolSpend",r).then(e=>t.MsgCommunityPoolSpendResponse.decode(new o.BinaryReader(e)))}constructor(e){this.rpc=e,this.SetWithdrawAddress=this.SetWithdrawAddress.bind(this),this.WithdrawDelegatorReward=this.WithdrawDelegatorReward.bind(this),this.WithdrawValidatorCommission=this.WithdrawValidatorCommission.bind(this),this.FundCommunityPool=this.FundCommunityPool.bind(this),this.UpdateParams=this.UpdateParams.bind(this),this.CommunityPoolSpend=this.CommunityPoolSpend.bind(this)}}t.MsgClientImpl=b},24474:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Grant=t.AllowedMsgAllowance=t.PeriodicAllowance=t.BasicAllowance=t.protobufPackage=void 0;let n=r(14841),i=r(9990),o=r(84849),a=r(11879),s=r(46554),l=r(99133);function u(){return{spendLimit:[],expiration:void 0}}function d(){return{basic:t.BasicAllowance.fromPartial({}),period:o.Duration.fromPartial({}),periodSpendLimit:[],periodCanSpend:[],periodReset:i.Timestamp.fromPartial({})}}function c(){return{allowance:void 0,allowedMessages:[]}}function p(){return{granter:"",grantee:"",allowance:void 0}}t.protobufPackage="cosmos.feegrant.v1beta1",t.BasicAllowance={typeUrl:"/cosmos.feegrant.v1beta1.BasicAllowance",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();for(let r of e.spendLimit)n.Coin.encode(r,t.uint32(10).fork()).ldelim();return void 0!==e.expiration&&i.Timestamp.encode(e.expiration,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),o=void 0===t?r.len:r.pos+t,a=u();for(;r.pos>>3){case 1:a.spendLimit.push(n.Coin.decode(r,r.uint32()));break;case 2:a.expiration=i.Timestamp.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=u();return Array.isArray(null==e?void 0:e.spendLimit)&&(t.spendLimit=e.spendLimit.map(e=>n.Coin.fromJSON(e))),(0,l.isSet)(e.expiration)&&(t.expiration=(0,l.fromJsonTimestamp)(e.expiration)),t},toJSON(e){let t={};return e.spendLimit?t.spendLimit=e.spendLimit.map(e=>e?n.Coin.toJSON(e):void 0):t.spendLimit=[],void 0!==e.expiration&&(t.expiration=(0,l.fromTimestamp)(e.expiration).toISOString()),t},fromPartial(e){var t;let r=u();return r.spendLimit=(null===(t=e.spendLimit)||void 0===t?void 0:t.map(e=>n.Coin.fromPartial(e)))||[],void 0!==e.expiration&&null!==e.expiration&&(r.expiration=i.Timestamp.fromPartial(e.expiration)),r}},t.PeriodicAllowance={typeUrl:"/cosmos.feegrant.v1beta1.PeriodicAllowance",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();for(let i of(void 0!==e.basic&&t.BasicAllowance.encode(e.basic,r.uint32(10).fork()).ldelim(),void 0!==e.period&&o.Duration.encode(e.period,r.uint32(18).fork()).ldelim(),e.periodSpendLimit))n.Coin.encode(i,r.uint32(26).fork()).ldelim();for(let t of e.periodCanSpend)n.Coin.encode(t,r.uint32(34).fork()).ldelim();return void 0!==e.periodReset&&i.Timestamp.encode(e.periodReset,r.uint32(42).fork()).ldelim(),r},decode(e,r){let a=e instanceof s.BinaryReader?e:new s.BinaryReader(e),l=void 0===r?a.len:a.pos+r,u=d();for(;a.pos>>3){case 1:u.basic=t.BasicAllowance.decode(a,a.uint32());break;case 2:u.period=o.Duration.decode(a,a.uint32());break;case 3:u.periodSpendLimit.push(n.Coin.decode(a,a.uint32()));break;case 4:u.periodCanSpend.push(n.Coin.decode(a,a.uint32()));break;case 5:u.periodReset=i.Timestamp.decode(a,a.uint32());break;default:a.skipType(7&e)}}return u},fromJSON(e){let r=d();return(0,l.isSet)(e.basic)&&(r.basic=t.BasicAllowance.fromJSON(e.basic)),(0,l.isSet)(e.period)&&(r.period=o.Duration.fromJSON(e.period)),Array.isArray(null==e?void 0:e.periodSpendLimit)&&(r.periodSpendLimit=e.periodSpendLimit.map(e=>n.Coin.fromJSON(e))),Array.isArray(null==e?void 0:e.periodCanSpend)&&(r.periodCanSpend=e.periodCanSpend.map(e=>n.Coin.fromJSON(e))),(0,l.isSet)(e.periodReset)&&(r.periodReset=(0,l.fromJsonTimestamp)(e.periodReset)),r},toJSON(e){let r={};return void 0!==e.basic&&(r.basic=e.basic?t.BasicAllowance.toJSON(e.basic):void 0),void 0!==e.period&&(r.period=e.period?o.Duration.toJSON(e.period):void 0),e.periodSpendLimit?r.periodSpendLimit=e.periodSpendLimit.map(e=>e?n.Coin.toJSON(e):void 0):r.periodSpendLimit=[],e.periodCanSpend?r.periodCanSpend=e.periodCanSpend.map(e=>e?n.Coin.toJSON(e):void 0):r.periodCanSpend=[],void 0!==e.periodReset&&(r.periodReset=(0,l.fromTimestamp)(e.periodReset).toISOString()),r},fromPartial(e){var r,a;let s=d();return void 0!==e.basic&&null!==e.basic&&(s.basic=t.BasicAllowance.fromPartial(e.basic)),void 0!==e.period&&null!==e.period&&(s.period=o.Duration.fromPartial(e.period)),s.periodSpendLimit=(null===(r=e.periodSpendLimit)||void 0===r?void 0:r.map(e=>n.Coin.fromPartial(e)))||[],s.periodCanSpend=(null===(a=e.periodCanSpend)||void 0===a?void 0:a.map(e=>n.Coin.fromPartial(e)))||[],void 0!==e.periodReset&&null!==e.periodReset&&(s.periodReset=i.Timestamp.fromPartial(e.periodReset)),s}},t.AllowedMsgAllowance={typeUrl:"/cosmos.feegrant.v1beta1.AllowedMsgAllowance",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();for(let r of(void 0!==e.allowance&&a.Any.encode(e.allowance,t.uint32(10).fork()).ldelim(),e.allowedMessages))t.uint32(18).string(r);return t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=c();for(;r.pos>>3){case 1:i.allowance=a.Any.decode(r,r.uint32());break;case 2:i.allowedMessages.push(r.string());break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=c();return(0,l.isSet)(e.allowance)&&(t.allowance=a.Any.fromJSON(e.allowance)),Array.isArray(null==e?void 0:e.allowedMessages)&&(t.allowedMessages=e.allowedMessages.map(e=>String(e))),t},toJSON(e){let t={};return void 0!==e.allowance&&(t.allowance=e.allowance?a.Any.toJSON(e.allowance):void 0),e.allowedMessages?t.allowedMessages=e.allowedMessages.map(e=>e):t.allowedMessages=[],t},fromPartial(e){var t;let r=c();return void 0!==e.allowance&&null!==e.allowance&&(r.allowance=a.Any.fromPartial(e.allowance)),r.allowedMessages=(null===(t=e.allowedMessages)||void 0===t?void 0:t.map(e=>e))||[],r}},t.Grant={typeUrl:"/cosmos.feegrant.v1beta1.Grant",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return""!==e.granter&&t.uint32(10).string(e.granter),""!==e.grantee&&t.uint32(18).string(e.grantee),void 0!==e.allowance&&a.Any.encode(e.allowance,t.uint32(26).fork()).ldelim(),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=p();for(;r.pos>>3){case 1:i.granter=r.string();break;case 2:i.grantee=r.string();break;case 3:i.allowance=a.Any.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=p();return(0,l.isSet)(e.granter)&&(t.granter=String(e.granter)),(0,l.isSet)(e.grantee)&&(t.grantee=String(e.grantee)),(0,l.isSet)(e.allowance)&&(t.allowance=a.Any.fromJSON(e.allowance)),t},toJSON(e){let t={};return void 0!==e.granter&&(t.granter=e.granter),void 0!==e.grantee&&(t.grantee=e.grantee),void 0!==e.allowance&&(t.allowance=e.allowance?a.Any.toJSON(e.allowance):void 0),t},fromPartial(e){var t,r;let n=p();return n.granter=null!==(t=e.granter)&&void 0!==t?t:"",n.grantee=null!==(r=e.grantee)&&void 0!==r?r:"",void 0!==e.allowance&&null!==e.allowance&&(n.allowance=a.Any.fromPartial(e.allowance)),n}}},75122:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QueryClientImpl=t.QueryAllowancesByGranterResponse=t.QueryAllowancesByGranterRequest=t.QueryAllowancesResponse=t.QueryAllowancesRequest=t.QueryAllowanceResponse=t.QueryAllowanceRequest=t.protobufPackage=void 0;let n=r(86141),i=r(24474),o=r(46554),a=r(99133);function s(){return{granter:"",grantee:""}}function l(){return{allowance:void 0}}function u(){return{grantee:"",pagination:void 0}}function d(){return{allowances:[],pagination:void 0}}function c(){return{granter:"",pagination:void 0}}function p(){return{allowances:[],pagination:void 0}}t.protobufPackage="cosmos.feegrant.v1beta1",t.QueryAllowanceRequest={typeUrl:"/cosmos.feegrant.v1beta1.QueryAllowanceRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.granter&&t.uint32(10).string(e.granter),""!==e.grantee&&t.uint32(18).string(e.grantee),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=s();for(;r.pos>>3){case 1:i.granter=r.string();break;case 2:i.grantee=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=s();return(0,a.isSet)(e.granter)&&(t.granter=String(e.granter)),(0,a.isSet)(e.grantee)&&(t.grantee=String(e.grantee)),t},toJSON(e){let t={};return void 0!==e.granter&&(t.granter=e.granter),void 0!==e.grantee&&(t.grantee=e.grantee),t},fromPartial(e){var t,r;let n=s();return n.granter=null!==(t=e.granter)&&void 0!==t?t:"",n.grantee=null!==(r=e.grantee)&&void 0!==r?r:"",n}},t.QueryAllowanceResponse={typeUrl:"/cosmos.feegrant.v1beta1.QueryAllowanceResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return void 0!==e.allowance&&i.Grant.encode(e.allowance,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,a=l();for(;r.pos>>3==1?a.allowance=i.Grant.decode(r,r.uint32()):r.skipType(7&e)}return a},fromJSON(e){let t=l();return(0,a.isSet)(e.allowance)&&(t.allowance=i.Grant.fromJSON(e.allowance)),t},toJSON(e){let t={};return void 0!==e.allowance&&(t.allowance=e.allowance?i.Grant.toJSON(e.allowance):void 0),t},fromPartial(e){let t=l();return void 0!==e.allowance&&null!==e.allowance&&(t.allowance=i.Grant.fromPartial(e.allowance)),t}},t.QueryAllowancesRequest={typeUrl:"/cosmos.feegrant.v1beta1.QueryAllowancesRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.grantee&&t.uint32(10).string(e.grantee),void 0!==e.pagination&&n.PageRequest.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=u();for(;r.pos>>3){case 1:a.grantee=r.string();break;case 2:a.pagination=n.PageRequest.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=u();return(0,a.isSet)(e.grantee)&&(t.grantee=String(e.grantee)),(0,a.isSet)(e.pagination)&&(t.pagination=n.PageRequest.fromJSON(e.pagination)),t},toJSON(e){let t={};return void 0!==e.grantee&&(t.grantee=e.grantee),void 0!==e.pagination&&(t.pagination=e.pagination?n.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=u();return r.grantee=null!==(t=e.grantee)&&void 0!==t?t:"",void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageRequest.fromPartial(e.pagination)),r}},t.QueryAllowancesResponse={typeUrl:"/cosmos.feegrant.v1beta1.QueryAllowancesResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of e.allowances)i.Grant.encode(r,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&n.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),a=void 0===t?r.len:r.pos+t,s=d();for(;r.pos>>3){case 1:s.allowances.push(i.Grant.decode(r,r.uint32()));break;case 2:s.pagination=n.PageResponse.decode(r,r.uint32());break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=d();return Array.isArray(null==e?void 0:e.allowances)&&(t.allowances=e.allowances.map(e=>i.Grant.fromJSON(e))),(0,a.isSet)(e.pagination)&&(t.pagination=n.PageResponse.fromJSON(e.pagination)),t},toJSON(e){let t={};return e.allowances?t.allowances=e.allowances.map(e=>e?i.Grant.toJSON(e):void 0):t.allowances=[],void 0!==e.pagination&&(t.pagination=e.pagination?n.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=d();return r.allowances=(null===(t=e.allowances)||void 0===t?void 0:t.map(e=>i.Grant.fromPartial(e)))||[],void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageResponse.fromPartial(e.pagination)),r}},t.QueryAllowancesByGranterRequest={typeUrl:"/cosmos.feegrant.v1beta1.QueryAllowancesByGranterRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.granter&&t.uint32(10).string(e.granter),void 0!==e.pagination&&n.PageRequest.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=c();for(;r.pos>>3){case 1:a.granter=r.string();break;case 2:a.pagination=n.PageRequest.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=c();return(0,a.isSet)(e.granter)&&(t.granter=String(e.granter)),(0,a.isSet)(e.pagination)&&(t.pagination=n.PageRequest.fromJSON(e.pagination)),t},toJSON(e){let t={};return void 0!==e.granter&&(t.granter=e.granter),void 0!==e.pagination&&(t.pagination=e.pagination?n.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=c();return r.granter=null!==(t=e.granter)&&void 0!==t?t:"",void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageRequest.fromPartial(e.pagination)),r}},t.QueryAllowancesByGranterResponse={typeUrl:"/cosmos.feegrant.v1beta1.QueryAllowancesByGranterResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of e.allowances)i.Grant.encode(r,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&n.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),a=void 0===t?r.len:r.pos+t,s=p();for(;r.pos>>3){case 1:s.allowances.push(i.Grant.decode(r,r.uint32()));break;case 2:s.pagination=n.PageResponse.decode(r,r.uint32());break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=p();return Array.isArray(null==e?void 0:e.allowances)&&(t.allowances=e.allowances.map(e=>i.Grant.fromJSON(e))),(0,a.isSet)(e.pagination)&&(t.pagination=n.PageResponse.fromJSON(e.pagination)),t},toJSON(e){let t={};return e.allowances?t.allowances=e.allowances.map(e=>e?i.Grant.toJSON(e):void 0):t.allowances=[],void 0!==e.pagination&&(t.pagination=e.pagination?n.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=p();return r.allowances=(null===(t=e.allowances)||void 0===t?void 0:t.map(e=>i.Grant.fromPartial(e)))||[],void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageResponse.fromPartial(e.pagination)),r}};class f{Allowance(e){let r=t.QueryAllowanceRequest.encode(e).finish();return this.rpc.request("cosmos.feegrant.v1beta1.Query","Allowance",r).then(e=>t.QueryAllowanceResponse.decode(new o.BinaryReader(e)))}Allowances(e){let r=t.QueryAllowancesRequest.encode(e).finish();return this.rpc.request("cosmos.feegrant.v1beta1.Query","Allowances",r).then(e=>t.QueryAllowancesResponse.decode(new o.BinaryReader(e)))}AllowancesByGranter(e){let r=t.QueryAllowancesByGranterRequest.encode(e).finish();return this.rpc.request("cosmos.feegrant.v1beta1.Query","AllowancesByGranter",r).then(e=>t.QueryAllowancesByGranterResponse.decode(new o.BinaryReader(e)))}constructor(e){this.rpc=e,this.Allowance=this.Allowance.bind(this),this.Allowances=this.Allowances.bind(this),this.AllowancesByGranter=this.AllowancesByGranter.bind(this)}}t.QueryClientImpl=f},2034:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MsgClientImpl=t.MsgRevokeAllowanceResponse=t.MsgRevokeAllowance=t.MsgGrantAllowanceResponse=t.MsgGrantAllowance=t.protobufPackage=void 0;let n=r(11879),i=r(46554),o=r(99133);function a(){return{granter:"",grantee:"",allowance:void 0}}function s(){return{}}function l(){return{granter:"",grantee:""}}function u(){return{}}t.protobufPackage="cosmos.feegrant.v1beta1",t.MsgGrantAllowance={typeUrl:"/cosmos.feegrant.v1beta1.MsgGrantAllowance",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();return""!==e.granter&&t.uint32(10).string(e.granter),""!==e.grantee&&t.uint32(18).string(e.grantee),void 0!==e.allowance&&n.Any.encode(e.allowance,t.uint32(26).fork()).ldelim(),t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),o=void 0===t?r.len:r.pos+t,s=a();for(;r.pos>>3){case 1:s.granter=r.string();break;case 2:s.grantee=r.string();break;case 3:s.allowance=n.Any.decode(r,r.uint32());break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=a();return(0,o.isSet)(e.granter)&&(t.granter=String(e.granter)),(0,o.isSet)(e.grantee)&&(t.grantee=String(e.grantee)),(0,o.isSet)(e.allowance)&&(t.allowance=n.Any.fromJSON(e.allowance)),t},toJSON(e){let t={};return void 0!==e.granter&&(t.granter=e.granter),void 0!==e.grantee&&(t.grantee=e.grantee),void 0!==e.allowance&&(t.allowance=e.allowance?n.Any.toJSON(e.allowance):void 0),t},fromPartial(e){var t,r;let i=a();return i.granter=null!==(t=e.granter)&&void 0!==t?t:"",i.grantee=null!==(r=e.grantee)&&void 0!==r?r:"",void 0!==e.allowance&&null!==e.allowance&&(i.allowance=n.Any.fromPartial(e.allowance)),i}},t.MsgGrantAllowanceResponse={typeUrl:"/cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();return t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=s();for(;r.poss(),toJSON:e=>({}),fromPartial:e=>s()},t.MsgRevokeAllowance={typeUrl:"/cosmos.feegrant.v1beta1.MsgRevokeAllowance",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();return""!==e.granter&&t.uint32(10).string(e.granter),""!==e.grantee&&t.uint32(18).string(e.grantee),t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=l();for(;r.pos>>3){case 1:o.granter=r.string();break;case 2:o.grantee=r.string();break;default:r.skipType(7&e)}}return o},fromJSON(e){let t=l();return(0,o.isSet)(e.granter)&&(t.granter=String(e.granter)),(0,o.isSet)(e.grantee)&&(t.grantee=String(e.grantee)),t},toJSON(e){let t={};return void 0!==e.granter&&(t.granter=e.granter),void 0!==e.grantee&&(t.grantee=e.grantee),t},fromPartial(e){var t,r;let n=l();return n.granter=null!==(t=e.granter)&&void 0!==t?t:"",n.grantee=null!==(r=e.grantee)&&void 0!==r?r:"",n}},t.MsgRevokeAllowanceResponse={typeUrl:"/cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();return t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=u();for(;r.posu(),toJSON:e=>({}),fromPartial:e=>u()};class d{GrantAllowance(e){let r=t.MsgGrantAllowance.encode(e).finish();return this.rpc.request("cosmos.feegrant.v1beta1.Msg","GrantAllowance",r).then(e=>t.MsgGrantAllowanceResponse.decode(new i.BinaryReader(e)))}RevokeAllowance(e){let r=t.MsgRevokeAllowance.encode(e).finish();return this.rpc.request("cosmos.feegrant.v1beta1.Msg","RevokeAllowance",r).then(e=>t.MsgRevokeAllowanceResponse.decode(new i.BinaryReader(e)))}constructor(e){this.rpc=e,this.GrantAllowance=this.GrantAllowance.bind(this),this.RevokeAllowance=this.RevokeAllowance.bind(this)}}t.MsgClientImpl=d},95653:function(e,t,r){"use strict";var n,i;Object.defineProperty(t,"__esModule",{value:!0}),t.Params=t.TallyParams=t.VotingParams=t.DepositParams=t.Vote=t.TallyResult=t.Proposal=t.Deposit=t.WeightedVoteOption=t.proposalStatusToJSON=t.proposalStatusFromJSON=t.ProposalStatus=t.voteOptionToJSON=t.voteOptionFromJSON=t.VoteOption=t.protobufPackage=void 0;let o=r(14841),a=r(11879),s=r(9990),l=r(84849),u=r(46554),d=r(99133);function c(e){switch(e){case 0:case"VOTE_OPTION_UNSPECIFIED":return n.VOTE_OPTION_UNSPECIFIED;case 1:case"VOTE_OPTION_YES":return n.VOTE_OPTION_YES;case 2:case"VOTE_OPTION_ABSTAIN":return n.VOTE_OPTION_ABSTAIN;case 3:case"VOTE_OPTION_NO":return n.VOTE_OPTION_NO;case 4:case"VOTE_OPTION_NO_WITH_VETO":return n.VOTE_OPTION_NO_WITH_VETO;default:return n.UNRECOGNIZED}}function p(e){switch(e){case n.VOTE_OPTION_UNSPECIFIED:return"VOTE_OPTION_UNSPECIFIED";case n.VOTE_OPTION_YES:return"VOTE_OPTION_YES";case n.VOTE_OPTION_ABSTAIN:return"VOTE_OPTION_ABSTAIN";case n.VOTE_OPTION_NO:return"VOTE_OPTION_NO";case n.VOTE_OPTION_NO_WITH_VETO:return"VOTE_OPTION_NO_WITH_VETO";case n.UNRECOGNIZED:default:return"UNRECOGNIZED"}}function f(e){switch(e){case 0:case"PROPOSAL_STATUS_UNSPECIFIED":return i.PROPOSAL_STATUS_UNSPECIFIED;case 1:case"PROPOSAL_STATUS_DEPOSIT_PERIOD":return i.PROPOSAL_STATUS_DEPOSIT_PERIOD;case 2:case"PROPOSAL_STATUS_VOTING_PERIOD":return i.PROPOSAL_STATUS_VOTING_PERIOD;case 3:case"PROPOSAL_STATUS_PASSED":return i.PROPOSAL_STATUS_PASSED;case 4:case"PROPOSAL_STATUS_REJECTED":return i.PROPOSAL_STATUS_REJECTED;case 5:case"PROPOSAL_STATUS_FAILED":return i.PROPOSAL_STATUS_FAILED;default:return i.UNRECOGNIZED}}function h(e){switch(e){case i.PROPOSAL_STATUS_UNSPECIFIED:return"PROPOSAL_STATUS_UNSPECIFIED";case i.PROPOSAL_STATUS_DEPOSIT_PERIOD:return"PROPOSAL_STATUS_DEPOSIT_PERIOD";case i.PROPOSAL_STATUS_VOTING_PERIOD:return"PROPOSAL_STATUS_VOTING_PERIOD";case i.PROPOSAL_STATUS_PASSED:return"PROPOSAL_STATUS_PASSED";case i.PROPOSAL_STATUS_REJECTED:return"PROPOSAL_STATUS_REJECTED";case i.PROPOSAL_STATUS_FAILED:return"PROPOSAL_STATUS_FAILED";case i.UNRECOGNIZED:default:return"UNRECOGNIZED"}}function g(){return{option:0,weight:""}}function m(){return{proposalId:BigInt(0),depositor:"",amount:[]}}function y(){return{id:BigInt(0),messages:[],status:0,finalTallyResult:void 0,submitTime:void 0,depositEndTime:void 0,totalDeposit:[],votingStartTime:void 0,votingEndTime:void 0,metadata:"",title:"",summary:"",proposer:""}}function v(){return{yesCount:"",abstainCount:"",noCount:"",noWithVetoCount:""}}function b(){return{proposalId:BigInt(0),voter:"",options:[],metadata:""}}function S(){return{minDeposit:[],maxDepositPeriod:void 0}}function w(){return{votingPeriod:void 0}}function _(){return{quorum:"",threshold:"",vetoThreshold:""}}function k(){return{minDeposit:[],maxDepositPeriod:void 0,votingPeriod:void 0,quorum:"",threshold:"",vetoThreshold:"",minInitialDepositRatio:"",burnVoteQuorum:!1,burnProposalDepositPrevote:!1,burnVoteVeto:!1}}t.protobufPackage="cosmos.gov.v1",function(e){e[e.VOTE_OPTION_UNSPECIFIED=0]="VOTE_OPTION_UNSPECIFIED",e[e.VOTE_OPTION_YES=1]="VOTE_OPTION_YES",e[e.VOTE_OPTION_ABSTAIN=2]="VOTE_OPTION_ABSTAIN",e[e.VOTE_OPTION_NO=3]="VOTE_OPTION_NO",e[e.VOTE_OPTION_NO_WITH_VETO=4]="VOTE_OPTION_NO_WITH_VETO",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(n||(t.VoteOption=n={})),t.voteOptionFromJSON=c,t.voteOptionToJSON=p,function(e){e[e.PROPOSAL_STATUS_UNSPECIFIED=0]="PROPOSAL_STATUS_UNSPECIFIED",e[e.PROPOSAL_STATUS_DEPOSIT_PERIOD=1]="PROPOSAL_STATUS_DEPOSIT_PERIOD",e[e.PROPOSAL_STATUS_VOTING_PERIOD=2]="PROPOSAL_STATUS_VOTING_PERIOD",e[e.PROPOSAL_STATUS_PASSED=3]="PROPOSAL_STATUS_PASSED",e[e.PROPOSAL_STATUS_REJECTED=4]="PROPOSAL_STATUS_REJECTED",e[e.PROPOSAL_STATUS_FAILED=5]="PROPOSAL_STATUS_FAILED",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(i||(t.ProposalStatus=i={})),t.proposalStatusFromJSON=f,t.proposalStatusToJSON=h,t.WeightedVoteOption={typeUrl:"/cosmos.gov.v1.WeightedVoteOption",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.BinaryWriter.create();return 0!==e.option&&t.uint32(8).int32(e.option),""!==e.weight&&t.uint32(18).string(e.weight),t},decode(e,t){let r=e instanceof u.BinaryReader?e:new u.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=g();for(;r.pos>>3){case 1:i.option=r.int32();break;case 2:i.weight=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=g();return(0,d.isSet)(e.option)&&(t.option=c(e.option)),(0,d.isSet)(e.weight)&&(t.weight=String(e.weight)),t},toJSON(e){let t={};return void 0!==e.option&&(t.option=p(e.option)),void 0!==e.weight&&(t.weight=e.weight),t},fromPartial(e){var t,r;let n=g();return n.option=null!==(t=e.option)&&void 0!==t?t:0,n.weight=null!==(r=e.weight)&&void 0!==r?r:"",n}},t.Deposit={typeUrl:"/cosmos.gov.v1.Deposit",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.BinaryWriter.create();for(let r of(e.proposalId!==BigInt(0)&&t.uint32(8).uint64(e.proposalId),""!==e.depositor&&t.uint32(18).string(e.depositor),e.amount))o.Coin.encode(r,t.uint32(26).fork()).ldelim();return t},decode(e,t){let r=e instanceof u.BinaryReader?e:new u.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=m();for(;r.pos>>3){case 1:i.proposalId=r.uint64();break;case 2:i.depositor=r.string();break;case 3:i.amount.push(o.Coin.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=m();return(0,d.isSet)(e.proposalId)&&(t.proposalId=BigInt(e.proposalId.toString())),(0,d.isSet)(e.depositor)&&(t.depositor=String(e.depositor)),Array.isArray(null==e?void 0:e.amount)&&(t.amount=e.amount.map(e=>o.Coin.fromJSON(e))),t},toJSON(e){let t={};return void 0!==e.proposalId&&(t.proposalId=(e.proposalId||BigInt(0)).toString()),void 0!==e.depositor&&(t.depositor=e.depositor),e.amount?t.amount=e.amount.map(e=>e?o.Coin.toJSON(e):void 0):t.amount=[],t},fromPartial(e){var t,r;let n=m();return void 0!==e.proposalId&&null!==e.proposalId&&(n.proposalId=BigInt(e.proposalId.toString())),n.depositor=null!==(r=e.depositor)&&void 0!==r?r:"",n.amount=(null===(t=e.amount)||void 0===t?void 0:t.map(e=>o.Coin.fromPartial(e)))||[],n}},t.Proposal={typeUrl:"/cosmos.gov.v1.Proposal",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.BinaryWriter.create();for(let t of(e.id!==BigInt(0)&&r.uint32(8).uint64(e.id),e.messages))a.Any.encode(t,r.uint32(18).fork()).ldelim();for(let n of(0!==e.status&&r.uint32(24).int32(e.status),void 0!==e.finalTallyResult&&t.TallyResult.encode(e.finalTallyResult,r.uint32(34).fork()).ldelim(),void 0!==e.submitTime&&s.Timestamp.encode(e.submitTime,r.uint32(42).fork()).ldelim(),void 0!==e.depositEndTime&&s.Timestamp.encode(e.depositEndTime,r.uint32(50).fork()).ldelim(),e.totalDeposit))o.Coin.encode(n,r.uint32(58).fork()).ldelim();return void 0!==e.votingStartTime&&s.Timestamp.encode(e.votingStartTime,r.uint32(66).fork()).ldelim(),void 0!==e.votingEndTime&&s.Timestamp.encode(e.votingEndTime,r.uint32(74).fork()).ldelim(),""!==e.metadata&&r.uint32(82).string(e.metadata),""!==e.title&&r.uint32(90).string(e.title),""!==e.summary&&r.uint32(98).string(e.summary),""!==e.proposer&&r.uint32(106).string(e.proposer),r},decode(e,r){let n=e instanceof u.BinaryReader?e:new u.BinaryReader(e),i=void 0===r?n.len:n.pos+r,l=y();for(;n.pos>>3){case 1:l.id=n.uint64();break;case 2:l.messages.push(a.Any.decode(n,n.uint32()));break;case 3:l.status=n.int32();break;case 4:l.finalTallyResult=t.TallyResult.decode(n,n.uint32());break;case 5:l.submitTime=s.Timestamp.decode(n,n.uint32());break;case 6:l.depositEndTime=s.Timestamp.decode(n,n.uint32());break;case 7:l.totalDeposit.push(o.Coin.decode(n,n.uint32()));break;case 8:l.votingStartTime=s.Timestamp.decode(n,n.uint32());break;case 9:l.votingEndTime=s.Timestamp.decode(n,n.uint32());break;case 10:l.metadata=n.string();break;case 11:l.title=n.string();break;case 12:l.summary=n.string();break;case 13:l.proposer=n.string();break;default:n.skipType(7&e)}}return l},fromJSON(e){let r=y();return(0,d.isSet)(e.id)&&(r.id=BigInt(e.id.toString())),Array.isArray(null==e?void 0:e.messages)&&(r.messages=e.messages.map(e=>a.Any.fromJSON(e))),(0,d.isSet)(e.status)&&(r.status=f(e.status)),(0,d.isSet)(e.finalTallyResult)&&(r.finalTallyResult=t.TallyResult.fromJSON(e.finalTallyResult)),(0,d.isSet)(e.submitTime)&&(r.submitTime=(0,d.fromJsonTimestamp)(e.submitTime)),(0,d.isSet)(e.depositEndTime)&&(r.depositEndTime=(0,d.fromJsonTimestamp)(e.depositEndTime)),Array.isArray(null==e?void 0:e.totalDeposit)&&(r.totalDeposit=e.totalDeposit.map(e=>o.Coin.fromJSON(e))),(0,d.isSet)(e.votingStartTime)&&(r.votingStartTime=(0,d.fromJsonTimestamp)(e.votingStartTime)),(0,d.isSet)(e.votingEndTime)&&(r.votingEndTime=(0,d.fromJsonTimestamp)(e.votingEndTime)),(0,d.isSet)(e.metadata)&&(r.metadata=String(e.metadata)),(0,d.isSet)(e.title)&&(r.title=String(e.title)),(0,d.isSet)(e.summary)&&(r.summary=String(e.summary)),(0,d.isSet)(e.proposer)&&(r.proposer=String(e.proposer)),r},toJSON(e){let r={};return void 0!==e.id&&(r.id=(e.id||BigInt(0)).toString()),e.messages?r.messages=e.messages.map(e=>e?a.Any.toJSON(e):void 0):r.messages=[],void 0!==e.status&&(r.status=h(e.status)),void 0!==e.finalTallyResult&&(r.finalTallyResult=e.finalTallyResult?t.TallyResult.toJSON(e.finalTallyResult):void 0),void 0!==e.submitTime&&(r.submitTime=(0,d.fromTimestamp)(e.submitTime).toISOString()),void 0!==e.depositEndTime&&(r.depositEndTime=(0,d.fromTimestamp)(e.depositEndTime).toISOString()),e.totalDeposit?r.totalDeposit=e.totalDeposit.map(e=>e?o.Coin.toJSON(e):void 0):r.totalDeposit=[],void 0!==e.votingStartTime&&(r.votingStartTime=(0,d.fromTimestamp)(e.votingStartTime).toISOString()),void 0!==e.votingEndTime&&(r.votingEndTime=(0,d.fromTimestamp)(e.votingEndTime).toISOString()),void 0!==e.metadata&&(r.metadata=e.metadata),void 0!==e.title&&(r.title=e.title),void 0!==e.summary&&(r.summary=e.summary),void 0!==e.proposer&&(r.proposer=e.proposer),r},fromPartial(e){var r,n,i,l,u,d,c;let p=y();return void 0!==e.id&&null!==e.id&&(p.id=BigInt(e.id.toString())),p.messages=(null===(r=e.messages)||void 0===r?void 0:r.map(e=>a.Any.fromPartial(e)))||[],p.status=null!==(i=e.status)&&void 0!==i?i:0,void 0!==e.finalTallyResult&&null!==e.finalTallyResult&&(p.finalTallyResult=t.TallyResult.fromPartial(e.finalTallyResult)),void 0!==e.submitTime&&null!==e.submitTime&&(p.submitTime=s.Timestamp.fromPartial(e.submitTime)),void 0!==e.depositEndTime&&null!==e.depositEndTime&&(p.depositEndTime=s.Timestamp.fromPartial(e.depositEndTime)),p.totalDeposit=(null===(n=e.totalDeposit)||void 0===n?void 0:n.map(e=>o.Coin.fromPartial(e)))||[],void 0!==e.votingStartTime&&null!==e.votingStartTime&&(p.votingStartTime=s.Timestamp.fromPartial(e.votingStartTime)),void 0!==e.votingEndTime&&null!==e.votingEndTime&&(p.votingEndTime=s.Timestamp.fromPartial(e.votingEndTime)),p.metadata=null!==(l=e.metadata)&&void 0!==l?l:"",p.title=null!==(u=e.title)&&void 0!==u?u:"",p.summary=null!==(d=e.summary)&&void 0!==d?d:"",p.proposer=null!==(c=e.proposer)&&void 0!==c?c:"",p}},t.TallyResult={typeUrl:"/cosmos.gov.v1.TallyResult",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.BinaryWriter.create();return""!==e.yesCount&&t.uint32(10).string(e.yesCount),""!==e.abstainCount&&t.uint32(18).string(e.abstainCount),""!==e.noCount&&t.uint32(26).string(e.noCount),""!==e.noWithVetoCount&&t.uint32(34).string(e.noWithVetoCount),t},decode(e,t){let r=e instanceof u.BinaryReader?e:new u.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=v();for(;r.pos>>3){case 1:i.yesCount=r.string();break;case 2:i.abstainCount=r.string();break;case 3:i.noCount=r.string();break;case 4:i.noWithVetoCount=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=v();return(0,d.isSet)(e.yesCount)&&(t.yesCount=String(e.yesCount)),(0,d.isSet)(e.abstainCount)&&(t.abstainCount=String(e.abstainCount)),(0,d.isSet)(e.noCount)&&(t.noCount=String(e.noCount)),(0,d.isSet)(e.noWithVetoCount)&&(t.noWithVetoCount=String(e.noWithVetoCount)),t},toJSON(e){let t={};return void 0!==e.yesCount&&(t.yesCount=e.yesCount),void 0!==e.abstainCount&&(t.abstainCount=e.abstainCount),void 0!==e.noCount&&(t.noCount=e.noCount),void 0!==e.noWithVetoCount&&(t.noWithVetoCount=e.noWithVetoCount),t},fromPartial(e){var t,r,n,i;let o=v();return o.yesCount=null!==(t=e.yesCount)&&void 0!==t?t:"",o.abstainCount=null!==(r=e.abstainCount)&&void 0!==r?r:"",o.noCount=null!==(n=e.noCount)&&void 0!==n?n:"",o.noWithVetoCount=null!==(i=e.noWithVetoCount)&&void 0!==i?i:"",o}},t.Vote={typeUrl:"/cosmos.gov.v1.Vote",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.BinaryWriter.create();for(let n of(e.proposalId!==BigInt(0)&&r.uint32(8).uint64(e.proposalId),""!==e.voter&&r.uint32(18).string(e.voter),e.options))t.WeightedVoteOption.encode(n,r.uint32(34).fork()).ldelim();return""!==e.metadata&&r.uint32(42).string(e.metadata),r},decode(e,r){let n=e instanceof u.BinaryReader?e:new u.BinaryReader(e),i=void 0===r?n.len:n.pos+r,o=b();for(;n.pos>>3){case 1:o.proposalId=n.uint64();break;case 2:o.voter=n.string();break;case 4:o.options.push(t.WeightedVoteOption.decode(n,n.uint32()));break;case 5:o.metadata=n.string();break;default:n.skipType(7&e)}}return o},fromJSON(e){let r=b();return(0,d.isSet)(e.proposalId)&&(r.proposalId=BigInt(e.proposalId.toString())),(0,d.isSet)(e.voter)&&(r.voter=String(e.voter)),Array.isArray(null==e?void 0:e.options)&&(r.options=e.options.map(e=>t.WeightedVoteOption.fromJSON(e))),(0,d.isSet)(e.metadata)&&(r.metadata=String(e.metadata)),r},toJSON(e){let r={};return void 0!==e.proposalId&&(r.proposalId=(e.proposalId||BigInt(0)).toString()),void 0!==e.voter&&(r.voter=e.voter),e.options?r.options=e.options.map(e=>e?t.WeightedVoteOption.toJSON(e):void 0):r.options=[],void 0!==e.metadata&&(r.metadata=e.metadata),r},fromPartial(e){var r,n,i;let o=b();return void 0!==e.proposalId&&null!==e.proposalId&&(o.proposalId=BigInt(e.proposalId.toString())),o.voter=null!==(n=e.voter)&&void 0!==n?n:"",o.options=(null===(r=e.options)||void 0===r?void 0:r.map(e=>t.WeightedVoteOption.fromPartial(e)))||[],o.metadata=null!==(i=e.metadata)&&void 0!==i?i:"",o}},t.DepositParams={typeUrl:"/cosmos.gov.v1.DepositParams",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.BinaryWriter.create();for(let r of e.minDeposit)o.Coin.encode(r,t.uint32(10).fork()).ldelim();return void 0!==e.maxDepositPeriod&&l.Duration.encode(e.maxDepositPeriod,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof u.BinaryReader?e:new u.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=S();for(;r.pos>>3){case 1:i.minDeposit.push(o.Coin.decode(r,r.uint32()));break;case 2:i.maxDepositPeriod=l.Duration.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=S();return Array.isArray(null==e?void 0:e.minDeposit)&&(t.minDeposit=e.minDeposit.map(e=>o.Coin.fromJSON(e))),(0,d.isSet)(e.maxDepositPeriod)&&(t.maxDepositPeriod=l.Duration.fromJSON(e.maxDepositPeriod)),t},toJSON(e){let t={};return e.minDeposit?t.minDeposit=e.minDeposit.map(e=>e?o.Coin.toJSON(e):void 0):t.minDeposit=[],void 0!==e.maxDepositPeriod&&(t.maxDepositPeriod=e.maxDepositPeriod?l.Duration.toJSON(e.maxDepositPeriod):void 0),t},fromPartial(e){var t;let r=S();return r.minDeposit=(null===(t=e.minDeposit)||void 0===t?void 0:t.map(e=>o.Coin.fromPartial(e)))||[],void 0!==e.maxDepositPeriod&&null!==e.maxDepositPeriod&&(r.maxDepositPeriod=l.Duration.fromPartial(e.maxDepositPeriod)),r}},t.VotingParams={typeUrl:"/cosmos.gov.v1.VotingParams",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.BinaryWriter.create();return void 0!==e.votingPeriod&&l.Duration.encode(e.votingPeriod,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof u.BinaryReader?e:new u.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=w();for(;r.pos>>3==1?i.votingPeriod=l.Duration.decode(r,r.uint32()):r.skipType(7&e)}return i},fromJSON(e){let t=w();return(0,d.isSet)(e.votingPeriod)&&(t.votingPeriod=l.Duration.fromJSON(e.votingPeriod)),t},toJSON(e){let t={};return void 0!==e.votingPeriod&&(t.votingPeriod=e.votingPeriod?l.Duration.toJSON(e.votingPeriod):void 0),t},fromPartial(e){let t=w();return void 0!==e.votingPeriod&&null!==e.votingPeriod&&(t.votingPeriod=l.Duration.fromPartial(e.votingPeriod)),t}},t.TallyParams={typeUrl:"/cosmos.gov.v1.TallyParams",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.BinaryWriter.create();return""!==e.quorum&&t.uint32(10).string(e.quorum),""!==e.threshold&&t.uint32(18).string(e.threshold),""!==e.vetoThreshold&&t.uint32(26).string(e.vetoThreshold),t},decode(e,t){let r=e instanceof u.BinaryReader?e:new u.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=_();for(;r.pos>>3){case 1:i.quorum=r.string();break;case 2:i.threshold=r.string();break;case 3:i.vetoThreshold=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=_();return(0,d.isSet)(e.quorum)&&(t.quorum=String(e.quorum)),(0,d.isSet)(e.threshold)&&(t.threshold=String(e.threshold)),(0,d.isSet)(e.vetoThreshold)&&(t.vetoThreshold=String(e.vetoThreshold)),t},toJSON(e){let t={};return void 0!==e.quorum&&(t.quorum=e.quorum),void 0!==e.threshold&&(t.threshold=e.threshold),void 0!==e.vetoThreshold&&(t.vetoThreshold=e.vetoThreshold),t},fromPartial(e){var t,r,n;let i=_();return i.quorum=null!==(t=e.quorum)&&void 0!==t?t:"",i.threshold=null!==(r=e.threshold)&&void 0!==r?r:"",i.vetoThreshold=null!==(n=e.vetoThreshold)&&void 0!==n?n:"",i}},t.Params={typeUrl:"/cosmos.gov.v1.Params",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.BinaryWriter.create();for(let r of e.minDeposit)o.Coin.encode(r,t.uint32(10).fork()).ldelim();return void 0!==e.maxDepositPeriod&&l.Duration.encode(e.maxDepositPeriod,t.uint32(18).fork()).ldelim(),void 0!==e.votingPeriod&&l.Duration.encode(e.votingPeriod,t.uint32(26).fork()).ldelim(),""!==e.quorum&&t.uint32(34).string(e.quorum),""!==e.threshold&&t.uint32(42).string(e.threshold),""!==e.vetoThreshold&&t.uint32(50).string(e.vetoThreshold),""!==e.minInitialDepositRatio&&t.uint32(58).string(e.minInitialDepositRatio),!0===e.burnVoteQuorum&&t.uint32(104).bool(e.burnVoteQuorum),!0===e.burnProposalDepositPrevote&&t.uint32(112).bool(e.burnProposalDepositPrevote),!0===e.burnVoteVeto&&t.uint32(120).bool(e.burnVoteVeto),t},decode(e,t){let r=e instanceof u.BinaryReader?e:new u.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=k();for(;r.pos>>3){case 1:i.minDeposit.push(o.Coin.decode(r,r.uint32()));break;case 2:i.maxDepositPeriod=l.Duration.decode(r,r.uint32());break;case 3:i.votingPeriod=l.Duration.decode(r,r.uint32());break;case 4:i.quorum=r.string();break;case 5:i.threshold=r.string();break;case 6:i.vetoThreshold=r.string();break;case 7:i.minInitialDepositRatio=r.string();break;case 13:i.burnVoteQuorum=r.bool();break;case 14:i.burnProposalDepositPrevote=r.bool();break;case 15:i.burnVoteVeto=r.bool();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=k();return Array.isArray(null==e?void 0:e.minDeposit)&&(t.minDeposit=e.minDeposit.map(e=>o.Coin.fromJSON(e))),(0,d.isSet)(e.maxDepositPeriod)&&(t.maxDepositPeriod=l.Duration.fromJSON(e.maxDepositPeriod)),(0,d.isSet)(e.votingPeriod)&&(t.votingPeriod=l.Duration.fromJSON(e.votingPeriod)),(0,d.isSet)(e.quorum)&&(t.quorum=String(e.quorum)),(0,d.isSet)(e.threshold)&&(t.threshold=String(e.threshold)),(0,d.isSet)(e.vetoThreshold)&&(t.vetoThreshold=String(e.vetoThreshold)),(0,d.isSet)(e.minInitialDepositRatio)&&(t.minInitialDepositRatio=String(e.minInitialDepositRatio)),(0,d.isSet)(e.burnVoteQuorum)&&(t.burnVoteQuorum=!!e.burnVoteQuorum),(0,d.isSet)(e.burnProposalDepositPrevote)&&(t.burnProposalDepositPrevote=!!e.burnProposalDepositPrevote),(0,d.isSet)(e.burnVoteVeto)&&(t.burnVoteVeto=!!e.burnVoteVeto),t},toJSON(e){let t={};return e.minDeposit?t.minDeposit=e.minDeposit.map(e=>e?o.Coin.toJSON(e):void 0):t.minDeposit=[],void 0!==e.maxDepositPeriod&&(t.maxDepositPeriod=e.maxDepositPeriod?l.Duration.toJSON(e.maxDepositPeriod):void 0),void 0!==e.votingPeriod&&(t.votingPeriod=e.votingPeriod?l.Duration.toJSON(e.votingPeriod):void 0),void 0!==e.quorum&&(t.quorum=e.quorum),void 0!==e.threshold&&(t.threshold=e.threshold),void 0!==e.vetoThreshold&&(t.vetoThreshold=e.vetoThreshold),void 0!==e.minInitialDepositRatio&&(t.minInitialDepositRatio=e.minInitialDepositRatio),void 0!==e.burnVoteQuorum&&(t.burnVoteQuorum=e.burnVoteQuorum),void 0!==e.burnProposalDepositPrevote&&(t.burnProposalDepositPrevote=e.burnProposalDepositPrevote),void 0!==e.burnVoteVeto&&(t.burnVoteVeto=e.burnVoteVeto),t},fromPartial(e){var t,r,n,i,a,s,u,d;let c=k();return c.minDeposit=(null===(t=e.minDeposit)||void 0===t?void 0:t.map(e=>o.Coin.fromPartial(e)))||[],void 0!==e.maxDepositPeriod&&null!==e.maxDepositPeriod&&(c.maxDepositPeriod=l.Duration.fromPartial(e.maxDepositPeriod)),void 0!==e.votingPeriod&&null!==e.votingPeriod&&(c.votingPeriod=l.Duration.fromPartial(e.votingPeriod)),c.quorum=null!==(r=e.quorum)&&void 0!==r?r:"",c.threshold=null!==(n=e.threshold)&&void 0!==n?n:"",c.vetoThreshold=null!==(i=e.vetoThreshold)&&void 0!==i?i:"",c.minInitialDepositRatio=null!==(a=e.minInitialDepositRatio)&&void 0!==a?a:"",c.burnVoteQuorum=null!==(s=e.burnVoteQuorum)&&void 0!==s&&s,c.burnProposalDepositPrevote=null!==(u=e.burnProposalDepositPrevote)&&void 0!==u&&u,c.burnVoteVeto=null!==(d=e.burnVoteVeto)&&void 0!==d&&d,c}}},98743:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MsgClientImpl=t.MsgUpdateParamsResponse=t.MsgUpdateParams=t.MsgDepositResponse=t.MsgDeposit=t.MsgVoteWeightedResponse=t.MsgVoteWeighted=t.MsgVoteResponse=t.MsgVote=t.MsgExecLegacyContentResponse=t.MsgExecLegacyContent=t.MsgSubmitProposalResponse=t.MsgSubmitProposal=t.protobufPackage=void 0;let n=r(11879),i=r(14841),o=r(95653),a=r(46554),s=r(99133);function l(){return{messages:[],initialDeposit:[],proposer:"",metadata:"",title:"",summary:""}}function u(){return{proposalId:BigInt(0)}}function d(){return{content:void 0,authority:""}}function c(){return{}}function p(){return{proposalId:BigInt(0),voter:"",option:0,metadata:""}}function f(){return{}}function h(){return{proposalId:BigInt(0),voter:"",options:[],metadata:""}}function g(){return{}}function m(){return{proposalId:BigInt(0),depositor:"",amount:[]}}function y(){return{}}function v(){return{authority:"",params:o.Params.fromPartial({})}}function b(){return{}}t.protobufPackage="cosmos.gov.v1",t.MsgSubmitProposal={typeUrl:"/cosmos.gov.v1.MsgSubmitProposal",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();for(let r of e.messages)n.Any.encode(r,t.uint32(10).fork()).ldelim();for(let r of e.initialDeposit)i.Coin.encode(r,t.uint32(18).fork()).ldelim();return""!==e.proposer&&t.uint32(26).string(e.proposer),""!==e.metadata&&t.uint32(34).string(e.metadata),""!==e.title&&t.uint32(42).string(e.title),""!==e.summary&&t.uint32(50).string(e.summary),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),o=void 0===t?r.len:r.pos+t,s=l();for(;r.pos>>3){case 1:s.messages.push(n.Any.decode(r,r.uint32()));break;case 2:s.initialDeposit.push(i.Coin.decode(r,r.uint32()));break;case 3:s.proposer=r.string();break;case 4:s.metadata=r.string();break;case 5:s.title=r.string();break;case 6:s.summary=r.string();break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=l();return Array.isArray(null==e?void 0:e.messages)&&(t.messages=e.messages.map(e=>n.Any.fromJSON(e))),Array.isArray(null==e?void 0:e.initialDeposit)&&(t.initialDeposit=e.initialDeposit.map(e=>i.Coin.fromJSON(e))),(0,s.isSet)(e.proposer)&&(t.proposer=String(e.proposer)),(0,s.isSet)(e.metadata)&&(t.metadata=String(e.metadata)),(0,s.isSet)(e.title)&&(t.title=String(e.title)),(0,s.isSet)(e.summary)&&(t.summary=String(e.summary)),t},toJSON(e){let t={};return e.messages?t.messages=e.messages.map(e=>e?n.Any.toJSON(e):void 0):t.messages=[],e.initialDeposit?t.initialDeposit=e.initialDeposit.map(e=>e?i.Coin.toJSON(e):void 0):t.initialDeposit=[],void 0!==e.proposer&&(t.proposer=e.proposer),void 0!==e.metadata&&(t.metadata=e.metadata),void 0!==e.title&&(t.title=e.title),void 0!==e.summary&&(t.summary=e.summary),t},fromPartial(e){var t,r,o,a,s,u;let d=l();return d.messages=(null===(t=e.messages)||void 0===t?void 0:t.map(e=>n.Any.fromPartial(e)))||[],d.initialDeposit=(null===(r=e.initialDeposit)||void 0===r?void 0:r.map(e=>i.Coin.fromPartial(e)))||[],d.proposer=null!==(o=e.proposer)&&void 0!==o?o:"",d.metadata=null!==(a=e.metadata)&&void 0!==a?a:"",d.title=null!==(s=e.title)&&void 0!==s?s:"",d.summary=null!==(u=e.summary)&&void 0!==u?u:"",d}},t.MsgSubmitProposalResponse={typeUrl:"/cosmos.gov.v1.MsgSubmitProposalResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return e.proposalId!==BigInt(0)&&t.uint32(8).uint64(e.proposalId),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=u();for(;r.pos>>3==1?i.proposalId=r.uint64():r.skipType(7&e)}return i},fromJSON(e){let t=u();return(0,s.isSet)(e.proposalId)&&(t.proposalId=BigInt(e.proposalId.toString())),t},toJSON(e){let t={};return void 0!==e.proposalId&&(t.proposalId=(e.proposalId||BigInt(0)).toString()),t},fromPartial(e){let t=u();return void 0!==e.proposalId&&null!==e.proposalId&&(t.proposalId=BigInt(e.proposalId.toString())),t}},t.MsgExecLegacyContent={typeUrl:"/cosmos.gov.v1.MsgExecLegacyContent",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return void 0!==e.content&&n.Any.encode(e.content,t.uint32(10).fork()).ldelim(),""!==e.authority&&t.uint32(18).string(e.authority),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),i=void 0===t?r.len:r.pos+t,o=d();for(;r.pos>>3){case 1:o.content=n.Any.decode(r,r.uint32());break;case 2:o.authority=r.string();break;default:r.skipType(7&e)}}return o},fromJSON(e){let t=d();return(0,s.isSet)(e.content)&&(t.content=n.Any.fromJSON(e.content)),(0,s.isSet)(e.authority)&&(t.authority=String(e.authority)),t},toJSON(e){let t={};return void 0!==e.content&&(t.content=e.content?n.Any.toJSON(e.content):void 0),void 0!==e.authority&&(t.authority=e.authority),t},fromPartial(e){var t;let r=d();return void 0!==e.content&&null!==e.content&&(r.content=n.Any.fromPartial(e.content)),r.authority=null!==(t=e.authority)&&void 0!==t?t:"",r}},t.MsgExecLegacyContentResponse={typeUrl:"/cosmos.gov.v1.MsgExecLegacyContentResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=c();for(;r.posc(),toJSON:e=>({}),fromPartial:e=>c()},t.MsgVote={typeUrl:"/cosmos.gov.v1.MsgVote",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return e.proposalId!==BigInt(0)&&t.uint32(8).uint64(e.proposalId),""!==e.voter&&t.uint32(18).string(e.voter),0!==e.option&&t.uint32(24).int32(e.option),""!==e.metadata&&t.uint32(34).string(e.metadata),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=p();for(;r.pos>>3){case 1:i.proposalId=r.uint64();break;case 2:i.voter=r.string();break;case 3:i.option=r.int32();break;case 4:i.metadata=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=p();return(0,s.isSet)(e.proposalId)&&(t.proposalId=BigInt(e.proposalId.toString())),(0,s.isSet)(e.voter)&&(t.voter=String(e.voter)),(0,s.isSet)(e.option)&&(t.option=(0,o.voteOptionFromJSON)(e.option)),(0,s.isSet)(e.metadata)&&(t.metadata=String(e.metadata)),t},toJSON(e){let t={};return void 0!==e.proposalId&&(t.proposalId=(e.proposalId||BigInt(0)).toString()),void 0!==e.voter&&(t.voter=e.voter),void 0!==e.option&&(t.option=(0,o.voteOptionToJSON)(e.option)),void 0!==e.metadata&&(t.metadata=e.metadata),t},fromPartial(e){var t,r,n;let i=p();return void 0!==e.proposalId&&null!==e.proposalId&&(i.proposalId=BigInt(e.proposalId.toString())),i.voter=null!==(t=e.voter)&&void 0!==t?t:"",i.option=null!==(r=e.option)&&void 0!==r?r:0,i.metadata=null!==(n=e.metadata)&&void 0!==n?n:"",i}},t.MsgVoteResponse={typeUrl:"/cosmos.gov.v1.MsgVoteResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=f();for(;r.posf(),toJSON:e=>({}),fromPartial:e=>f()},t.MsgVoteWeighted={typeUrl:"/cosmos.gov.v1.MsgVoteWeighted",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();for(let r of(e.proposalId!==BigInt(0)&&t.uint32(8).uint64(e.proposalId),""!==e.voter&&t.uint32(18).string(e.voter),e.options))o.WeightedVoteOption.encode(r,t.uint32(26).fork()).ldelim();return""!==e.metadata&&t.uint32(34).string(e.metadata),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=h();for(;r.pos>>3){case 1:i.proposalId=r.uint64();break;case 2:i.voter=r.string();break;case 3:i.options.push(o.WeightedVoteOption.decode(r,r.uint32()));break;case 4:i.metadata=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=h();return(0,s.isSet)(e.proposalId)&&(t.proposalId=BigInt(e.proposalId.toString())),(0,s.isSet)(e.voter)&&(t.voter=String(e.voter)),Array.isArray(null==e?void 0:e.options)&&(t.options=e.options.map(e=>o.WeightedVoteOption.fromJSON(e))),(0,s.isSet)(e.metadata)&&(t.metadata=String(e.metadata)),t},toJSON(e){let t={};return void 0!==e.proposalId&&(t.proposalId=(e.proposalId||BigInt(0)).toString()),void 0!==e.voter&&(t.voter=e.voter),e.options?t.options=e.options.map(e=>e?o.WeightedVoteOption.toJSON(e):void 0):t.options=[],void 0!==e.metadata&&(t.metadata=e.metadata),t},fromPartial(e){var t,r,n;let i=h();return void 0!==e.proposalId&&null!==e.proposalId&&(i.proposalId=BigInt(e.proposalId.toString())),i.voter=null!==(r=e.voter)&&void 0!==r?r:"",i.options=(null===(t=e.options)||void 0===t?void 0:t.map(e=>o.WeightedVoteOption.fromPartial(e)))||[],i.metadata=null!==(n=e.metadata)&&void 0!==n?n:"",i}},t.MsgVoteWeightedResponse={typeUrl:"/cosmos.gov.v1.MsgVoteWeightedResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=g();for(;r.posg(),toJSON:e=>({}),fromPartial:e=>g()},t.MsgDeposit={typeUrl:"/cosmos.gov.v1.MsgDeposit",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();for(let r of(e.proposalId!==BigInt(0)&&t.uint32(8).uint64(e.proposalId),""!==e.depositor&&t.uint32(18).string(e.depositor),e.amount))i.Coin.encode(r,t.uint32(26).fork()).ldelim();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=m();for(;r.pos>>3){case 1:o.proposalId=r.uint64();break;case 2:o.depositor=r.string();break;case 3:o.amount.push(i.Coin.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return o},fromJSON(e){let t=m();return(0,s.isSet)(e.proposalId)&&(t.proposalId=BigInt(e.proposalId.toString())),(0,s.isSet)(e.depositor)&&(t.depositor=String(e.depositor)),Array.isArray(null==e?void 0:e.amount)&&(t.amount=e.amount.map(e=>i.Coin.fromJSON(e))),t},toJSON(e){let t={};return void 0!==e.proposalId&&(t.proposalId=(e.proposalId||BigInt(0)).toString()),void 0!==e.depositor&&(t.depositor=e.depositor),e.amount?t.amount=e.amount.map(e=>e?i.Coin.toJSON(e):void 0):t.amount=[],t},fromPartial(e){var t,r;let n=m();return void 0!==e.proposalId&&null!==e.proposalId&&(n.proposalId=BigInt(e.proposalId.toString())),n.depositor=null!==(r=e.depositor)&&void 0!==r?r:"",n.amount=(null===(t=e.amount)||void 0===t?void 0:t.map(e=>i.Coin.fromPartial(e)))||[],n}},t.MsgDepositResponse={typeUrl:"/cosmos.gov.v1.MsgDepositResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=y();for(;r.posy(),toJSON:e=>({}),fromPartial:e=>y()},t.MsgUpdateParams={typeUrl:"/cosmos.gov.v1.MsgUpdateParams",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.authority&&t.uint32(10).string(e.authority),void 0!==e.params&&o.Params.encode(e.params,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=v();for(;r.pos>>3){case 1:i.authority=r.string();break;case 2:i.params=o.Params.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=v();return(0,s.isSet)(e.authority)&&(t.authority=String(e.authority)),(0,s.isSet)(e.params)&&(t.params=o.Params.fromJSON(e.params)),t},toJSON(e){let t={};return void 0!==e.authority&&(t.authority=e.authority),void 0!==e.params&&(t.params=e.params?o.Params.toJSON(e.params):void 0),t},fromPartial(e){var t;let r=v();return r.authority=null!==(t=e.authority)&&void 0!==t?t:"",void 0!==e.params&&null!==e.params&&(r.params=o.Params.fromPartial(e.params)),r}},t.MsgUpdateParamsResponse={typeUrl:"/cosmos.gov.v1.MsgUpdateParamsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=b();for(;r.posb(),toJSON:e=>({}),fromPartial:e=>b()};class S{SubmitProposal(e){let r=t.MsgSubmitProposal.encode(e).finish();return this.rpc.request("cosmos.gov.v1.Msg","SubmitProposal",r).then(e=>t.MsgSubmitProposalResponse.decode(new a.BinaryReader(e)))}ExecLegacyContent(e){let r=t.MsgExecLegacyContent.encode(e).finish();return this.rpc.request("cosmos.gov.v1.Msg","ExecLegacyContent",r).then(e=>t.MsgExecLegacyContentResponse.decode(new a.BinaryReader(e)))}Vote(e){let r=t.MsgVote.encode(e).finish();return this.rpc.request("cosmos.gov.v1.Msg","Vote",r).then(e=>t.MsgVoteResponse.decode(new a.BinaryReader(e)))}VoteWeighted(e){let r=t.MsgVoteWeighted.encode(e).finish();return this.rpc.request("cosmos.gov.v1.Msg","VoteWeighted",r).then(e=>t.MsgVoteWeightedResponse.decode(new a.BinaryReader(e)))}Deposit(e){let r=t.MsgDeposit.encode(e).finish();return this.rpc.request("cosmos.gov.v1.Msg","Deposit",r).then(e=>t.MsgDepositResponse.decode(new a.BinaryReader(e)))}UpdateParams(e){let r=t.MsgUpdateParams.encode(e).finish();return this.rpc.request("cosmos.gov.v1.Msg","UpdateParams",r).then(e=>t.MsgUpdateParamsResponse.decode(new a.BinaryReader(e)))}constructor(e){this.rpc=e,this.SubmitProposal=this.SubmitProposal.bind(this),this.ExecLegacyContent=this.ExecLegacyContent.bind(this),this.Vote=this.Vote.bind(this),this.VoteWeighted=this.VoteWeighted.bind(this),this.Deposit=this.Deposit.bind(this),this.UpdateParams=this.UpdateParams.bind(this)}}t.MsgClientImpl=S},5309:function(e,t,r){"use strict";var n,i;Object.defineProperty(t,"__esModule",{value:!0}),t.TallyParams=t.VotingParams=t.DepositParams=t.Vote=t.TallyResult=t.Proposal=t.Deposit=t.TextProposal=t.WeightedVoteOption=t.proposalStatusToJSON=t.proposalStatusFromJSON=t.ProposalStatus=t.voteOptionToJSON=t.voteOptionFromJSON=t.VoteOption=t.protobufPackage=void 0;let o=r(14841),a=r(11879),s=r(9990),l=r(84849),u=r(46554),d=r(99133);function c(e){switch(e){case 0:case"VOTE_OPTION_UNSPECIFIED":return n.VOTE_OPTION_UNSPECIFIED;case 1:case"VOTE_OPTION_YES":return n.VOTE_OPTION_YES;case 2:case"VOTE_OPTION_ABSTAIN":return n.VOTE_OPTION_ABSTAIN;case 3:case"VOTE_OPTION_NO":return n.VOTE_OPTION_NO;case 4:case"VOTE_OPTION_NO_WITH_VETO":return n.VOTE_OPTION_NO_WITH_VETO;default:return n.UNRECOGNIZED}}function p(e){switch(e){case n.VOTE_OPTION_UNSPECIFIED:return"VOTE_OPTION_UNSPECIFIED";case n.VOTE_OPTION_YES:return"VOTE_OPTION_YES";case n.VOTE_OPTION_ABSTAIN:return"VOTE_OPTION_ABSTAIN";case n.VOTE_OPTION_NO:return"VOTE_OPTION_NO";case n.VOTE_OPTION_NO_WITH_VETO:return"VOTE_OPTION_NO_WITH_VETO";case n.UNRECOGNIZED:default:return"UNRECOGNIZED"}}function f(e){switch(e){case 0:case"PROPOSAL_STATUS_UNSPECIFIED":return i.PROPOSAL_STATUS_UNSPECIFIED;case 1:case"PROPOSAL_STATUS_DEPOSIT_PERIOD":return i.PROPOSAL_STATUS_DEPOSIT_PERIOD;case 2:case"PROPOSAL_STATUS_VOTING_PERIOD":return i.PROPOSAL_STATUS_VOTING_PERIOD;case 3:case"PROPOSAL_STATUS_PASSED":return i.PROPOSAL_STATUS_PASSED;case 4:case"PROPOSAL_STATUS_REJECTED":return i.PROPOSAL_STATUS_REJECTED;case 5:case"PROPOSAL_STATUS_FAILED":return i.PROPOSAL_STATUS_FAILED;default:return i.UNRECOGNIZED}}function h(e){switch(e){case i.PROPOSAL_STATUS_UNSPECIFIED:return"PROPOSAL_STATUS_UNSPECIFIED";case i.PROPOSAL_STATUS_DEPOSIT_PERIOD:return"PROPOSAL_STATUS_DEPOSIT_PERIOD";case i.PROPOSAL_STATUS_VOTING_PERIOD:return"PROPOSAL_STATUS_VOTING_PERIOD";case i.PROPOSAL_STATUS_PASSED:return"PROPOSAL_STATUS_PASSED";case i.PROPOSAL_STATUS_REJECTED:return"PROPOSAL_STATUS_REJECTED";case i.PROPOSAL_STATUS_FAILED:return"PROPOSAL_STATUS_FAILED";case i.UNRECOGNIZED:default:return"UNRECOGNIZED"}}function g(){return{option:0,weight:""}}function m(){return{title:"",description:""}}function y(){return{proposalId:BigInt(0),depositor:"",amount:[]}}function v(){return{proposalId:BigInt(0),content:void 0,status:0,finalTallyResult:t.TallyResult.fromPartial({}),submitTime:s.Timestamp.fromPartial({}),depositEndTime:s.Timestamp.fromPartial({}),totalDeposit:[],votingStartTime:s.Timestamp.fromPartial({}),votingEndTime:s.Timestamp.fromPartial({})}}function b(){return{yes:"",abstain:"",no:"",noWithVeto:""}}function S(){return{proposalId:BigInt(0),voter:"",option:0,options:[]}}function w(){return{minDeposit:[],maxDepositPeriod:l.Duration.fromPartial({})}}function _(){return{votingPeriod:l.Duration.fromPartial({})}}function k(){return{quorum:new Uint8Array,threshold:new Uint8Array,vetoThreshold:new Uint8Array}}t.protobufPackage="cosmos.gov.v1beta1",function(e){e[e.VOTE_OPTION_UNSPECIFIED=0]="VOTE_OPTION_UNSPECIFIED",e[e.VOTE_OPTION_YES=1]="VOTE_OPTION_YES",e[e.VOTE_OPTION_ABSTAIN=2]="VOTE_OPTION_ABSTAIN",e[e.VOTE_OPTION_NO=3]="VOTE_OPTION_NO",e[e.VOTE_OPTION_NO_WITH_VETO=4]="VOTE_OPTION_NO_WITH_VETO",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(n||(t.VoteOption=n={})),t.voteOptionFromJSON=c,t.voteOptionToJSON=p,function(e){e[e.PROPOSAL_STATUS_UNSPECIFIED=0]="PROPOSAL_STATUS_UNSPECIFIED",e[e.PROPOSAL_STATUS_DEPOSIT_PERIOD=1]="PROPOSAL_STATUS_DEPOSIT_PERIOD",e[e.PROPOSAL_STATUS_VOTING_PERIOD=2]="PROPOSAL_STATUS_VOTING_PERIOD",e[e.PROPOSAL_STATUS_PASSED=3]="PROPOSAL_STATUS_PASSED",e[e.PROPOSAL_STATUS_REJECTED=4]="PROPOSAL_STATUS_REJECTED",e[e.PROPOSAL_STATUS_FAILED=5]="PROPOSAL_STATUS_FAILED",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(i||(t.ProposalStatus=i={})),t.proposalStatusFromJSON=f,t.proposalStatusToJSON=h,t.WeightedVoteOption={typeUrl:"/cosmos.gov.v1beta1.WeightedVoteOption",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.BinaryWriter.create();return 0!==e.option&&t.uint32(8).int32(e.option),""!==e.weight&&t.uint32(18).string(e.weight),t},decode(e,t){let r=e instanceof u.BinaryReader?e:new u.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=g();for(;r.pos>>3){case 1:i.option=r.int32();break;case 2:i.weight=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=g();return(0,d.isSet)(e.option)&&(t.option=c(e.option)),(0,d.isSet)(e.weight)&&(t.weight=String(e.weight)),t},toJSON(e){let t={};return void 0!==e.option&&(t.option=p(e.option)),void 0!==e.weight&&(t.weight=e.weight),t},fromPartial(e){var t,r;let n=g();return n.option=null!==(t=e.option)&&void 0!==t?t:0,n.weight=null!==(r=e.weight)&&void 0!==r?r:"",n}},t.TextProposal={typeUrl:"/cosmos.gov.v1beta1.TextProposal",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.BinaryWriter.create();return""!==e.title&&t.uint32(10).string(e.title),""!==e.description&&t.uint32(18).string(e.description),t},decode(e,t){let r=e instanceof u.BinaryReader?e:new u.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=m();for(;r.pos>>3){case 1:i.title=r.string();break;case 2:i.description=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=m();return(0,d.isSet)(e.title)&&(t.title=String(e.title)),(0,d.isSet)(e.description)&&(t.description=String(e.description)),t},toJSON(e){let t={};return void 0!==e.title&&(t.title=e.title),void 0!==e.description&&(t.description=e.description),t},fromPartial(e){var t,r;let n=m();return n.title=null!==(t=e.title)&&void 0!==t?t:"",n.description=null!==(r=e.description)&&void 0!==r?r:"",n}},t.Deposit={typeUrl:"/cosmos.gov.v1beta1.Deposit",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.BinaryWriter.create();for(let r of(e.proposalId!==BigInt(0)&&t.uint32(8).uint64(e.proposalId),""!==e.depositor&&t.uint32(18).string(e.depositor),e.amount))o.Coin.encode(r,t.uint32(26).fork()).ldelim();return t},decode(e,t){let r=e instanceof u.BinaryReader?e:new u.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=y();for(;r.pos>>3){case 1:i.proposalId=r.uint64();break;case 2:i.depositor=r.string();break;case 3:i.amount.push(o.Coin.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=y();return(0,d.isSet)(e.proposalId)&&(t.proposalId=BigInt(e.proposalId.toString())),(0,d.isSet)(e.depositor)&&(t.depositor=String(e.depositor)),Array.isArray(null==e?void 0:e.amount)&&(t.amount=e.amount.map(e=>o.Coin.fromJSON(e))),t},toJSON(e){let t={};return void 0!==e.proposalId&&(t.proposalId=(e.proposalId||BigInt(0)).toString()),void 0!==e.depositor&&(t.depositor=e.depositor),e.amount?t.amount=e.amount.map(e=>e?o.Coin.toJSON(e):void 0):t.amount=[],t},fromPartial(e){var t,r;let n=y();return void 0!==e.proposalId&&null!==e.proposalId&&(n.proposalId=BigInt(e.proposalId.toString())),n.depositor=null!==(r=e.depositor)&&void 0!==r?r:"",n.amount=(null===(t=e.amount)||void 0===t?void 0:t.map(e=>o.Coin.fromPartial(e)))||[],n}},t.Proposal={typeUrl:"/cosmos.gov.v1beta1.Proposal",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.BinaryWriter.create();for(let n of(e.proposalId!==BigInt(0)&&r.uint32(8).uint64(e.proposalId),void 0!==e.content&&a.Any.encode(e.content,r.uint32(18).fork()).ldelim(),0!==e.status&&r.uint32(24).int32(e.status),void 0!==e.finalTallyResult&&t.TallyResult.encode(e.finalTallyResult,r.uint32(34).fork()).ldelim(),void 0!==e.submitTime&&s.Timestamp.encode(e.submitTime,r.uint32(42).fork()).ldelim(),void 0!==e.depositEndTime&&s.Timestamp.encode(e.depositEndTime,r.uint32(50).fork()).ldelim(),e.totalDeposit))o.Coin.encode(n,r.uint32(58).fork()).ldelim();return void 0!==e.votingStartTime&&s.Timestamp.encode(e.votingStartTime,r.uint32(66).fork()).ldelim(),void 0!==e.votingEndTime&&s.Timestamp.encode(e.votingEndTime,r.uint32(74).fork()).ldelim(),r},decode(e,r){let n=e instanceof u.BinaryReader?e:new u.BinaryReader(e),i=void 0===r?n.len:n.pos+r,l=v();for(;n.pos>>3){case 1:l.proposalId=n.uint64();break;case 2:l.content=a.Any.decode(n,n.uint32());break;case 3:l.status=n.int32();break;case 4:l.finalTallyResult=t.TallyResult.decode(n,n.uint32());break;case 5:l.submitTime=s.Timestamp.decode(n,n.uint32());break;case 6:l.depositEndTime=s.Timestamp.decode(n,n.uint32());break;case 7:l.totalDeposit.push(o.Coin.decode(n,n.uint32()));break;case 8:l.votingStartTime=s.Timestamp.decode(n,n.uint32());break;case 9:l.votingEndTime=s.Timestamp.decode(n,n.uint32());break;default:n.skipType(7&e)}}return l},fromJSON(e){let r=v();return(0,d.isSet)(e.proposalId)&&(r.proposalId=BigInt(e.proposalId.toString())),(0,d.isSet)(e.content)&&(r.content=a.Any.fromJSON(e.content)),(0,d.isSet)(e.status)&&(r.status=f(e.status)),(0,d.isSet)(e.finalTallyResult)&&(r.finalTallyResult=t.TallyResult.fromJSON(e.finalTallyResult)),(0,d.isSet)(e.submitTime)&&(r.submitTime=(0,d.fromJsonTimestamp)(e.submitTime)),(0,d.isSet)(e.depositEndTime)&&(r.depositEndTime=(0,d.fromJsonTimestamp)(e.depositEndTime)),Array.isArray(null==e?void 0:e.totalDeposit)&&(r.totalDeposit=e.totalDeposit.map(e=>o.Coin.fromJSON(e))),(0,d.isSet)(e.votingStartTime)&&(r.votingStartTime=(0,d.fromJsonTimestamp)(e.votingStartTime)),(0,d.isSet)(e.votingEndTime)&&(r.votingEndTime=(0,d.fromJsonTimestamp)(e.votingEndTime)),r},toJSON(e){let r={};return void 0!==e.proposalId&&(r.proposalId=(e.proposalId||BigInt(0)).toString()),void 0!==e.content&&(r.content=e.content?a.Any.toJSON(e.content):void 0),void 0!==e.status&&(r.status=h(e.status)),void 0!==e.finalTallyResult&&(r.finalTallyResult=e.finalTallyResult?t.TallyResult.toJSON(e.finalTallyResult):void 0),void 0!==e.submitTime&&(r.submitTime=(0,d.fromTimestamp)(e.submitTime).toISOString()),void 0!==e.depositEndTime&&(r.depositEndTime=(0,d.fromTimestamp)(e.depositEndTime).toISOString()),e.totalDeposit?r.totalDeposit=e.totalDeposit.map(e=>e?o.Coin.toJSON(e):void 0):r.totalDeposit=[],void 0!==e.votingStartTime&&(r.votingStartTime=(0,d.fromTimestamp)(e.votingStartTime).toISOString()),void 0!==e.votingEndTime&&(r.votingEndTime=(0,d.fromTimestamp)(e.votingEndTime).toISOString()),r},fromPartial(e){var r,n;let i=v();return void 0!==e.proposalId&&null!==e.proposalId&&(i.proposalId=BigInt(e.proposalId.toString())),void 0!==e.content&&null!==e.content&&(i.content=a.Any.fromPartial(e.content)),i.status=null!==(n=e.status)&&void 0!==n?n:0,void 0!==e.finalTallyResult&&null!==e.finalTallyResult&&(i.finalTallyResult=t.TallyResult.fromPartial(e.finalTallyResult)),void 0!==e.submitTime&&null!==e.submitTime&&(i.submitTime=s.Timestamp.fromPartial(e.submitTime)),void 0!==e.depositEndTime&&null!==e.depositEndTime&&(i.depositEndTime=s.Timestamp.fromPartial(e.depositEndTime)),i.totalDeposit=(null===(r=e.totalDeposit)||void 0===r?void 0:r.map(e=>o.Coin.fromPartial(e)))||[],void 0!==e.votingStartTime&&null!==e.votingStartTime&&(i.votingStartTime=s.Timestamp.fromPartial(e.votingStartTime)),void 0!==e.votingEndTime&&null!==e.votingEndTime&&(i.votingEndTime=s.Timestamp.fromPartial(e.votingEndTime)),i}},t.TallyResult={typeUrl:"/cosmos.gov.v1beta1.TallyResult",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.BinaryWriter.create();return""!==e.yes&&t.uint32(10).string(e.yes),""!==e.abstain&&t.uint32(18).string(e.abstain),""!==e.no&&t.uint32(26).string(e.no),""!==e.noWithVeto&&t.uint32(34).string(e.noWithVeto),t},decode(e,t){let r=e instanceof u.BinaryReader?e:new u.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=b();for(;r.pos>>3){case 1:i.yes=r.string();break;case 2:i.abstain=r.string();break;case 3:i.no=r.string();break;case 4:i.noWithVeto=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=b();return(0,d.isSet)(e.yes)&&(t.yes=String(e.yes)),(0,d.isSet)(e.abstain)&&(t.abstain=String(e.abstain)),(0,d.isSet)(e.no)&&(t.no=String(e.no)),(0,d.isSet)(e.noWithVeto)&&(t.noWithVeto=String(e.noWithVeto)),t},toJSON(e){let t={};return void 0!==e.yes&&(t.yes=e.yes),void 0!==e.abstain&&(t.abstain=e.abstain),void 0!==e.no&&(t.no=e.no),void 0!==e.noWithVeto&&(t.noWithVeto=e.noWithVeto),t},fromPartial(e){var t,r,n,i;let o=b();return o.yes=null!==(t=e.yes)&&void 0!==t?t:"",o.abstain=null!==(r=e.abstain)&&void 0!==r?r:"",o.no=null!==(n=e.no)&&void 0!==n?n:"",o.noWithVeto=null!==(i=e.noWithVeto)&&void 0!==i?i:"",o}},t.Vote={typeUrl:"/cosmos.gov.v1beta1.Vote",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.BinaryWriter.create();for(let n of(e.proposalId!==BigInt(0)&&r.uint32(8).uint64(e.proposalId),""!==e.voter&&r.uint32(18).string(e.voter),0!==e.option&&r.uint32(24).int32(e.option),e.options))t.WeightedVoteOption.encode(n,r.uint32(34).fork()).ldelim();return r},decode(e,r){let n=e instanceof u.BinaryReader?e:new u.BinaryReader(e),i=void 0===r?n.len:n.pos+r,o=S();for(;n.pos>>3){case 1:o.proposalId=n.uint64();break;case 2:o.voter=n.string();break;case 3:o.option=n.int32();break;case 4:o.options.push(t.WeightedVoteOption.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return o},fromJSON(e){let r=S();return(0,d.isSet)(e.proposalId)&&(r.proposalId=BigInt(e.proposalId.toString())),(0,d.isSet)(e.voter)&&(r.voter=String(e.voter)),(0,d.isSet)(e.option)&&(r.option=c(e.option)),Array.isArray(null==e?void 0:e.options)&&(r.options=e.options.map(e=>t.WeightedVoteOption.fromJSON(e))),r},toJSON(e){let r={};return void 0!==e.proposalId&&(r.proposalId=(e.proposalId||BigInt(0)).toString()),void 0!==e.voter&&(r.voter=e.voter),void 0!==e.option&&(r.option=p(e.option)),e.options?r.options=e.options.map(e=>e?t.WeightedVoteOption.toJSON(e):void 0):r.options=[],r},fromPartial(e){var r,n,i;let o=S();return void 0!==e.proposalId&&null!==e.proposalId&&(o.proposalId=BigInt(e.proposalId.toString())),o.voter=null!==(n=e.voter)&&void 0!==n?n:"",o.option=null!==(i=e.option)&&void 0!==i?i:0,o.options=(null===(r=e.options)||void 0===r?void 0:r.map(e=>t.WeightedVoteOption.fromPartial(e)))||[],o}},t.DepositParams={typeUrl:"/cosmos.gov.v1beta1.DepositParams",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.BinaryWriter.create();for(let r of e.minDeposit)o.Coin.encode(r,t.uint32(10).fork()).ldelim();return void 0!==e.maxDepositPeriod&&l.Duration.encode(e.maxDepositPeriod,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof u.BinaryReader?e:new u.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=w();for(;r.pos>>3){case 1:i.minDeposit.push(o.Coin.decode(r,r.uint32()));break;case 2:i.maxDepositPeriod=l.Duration.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=w();return Array.isArray(null==e?void 0:e.minDeposit)&&(t.minDeposit=e.minDeposit.map(e=>o.Coin.fromJSON(e))),(0,d.isSet)(e.maxDepositPeriod)&&(t.maxDepositPeriod=l.Duration.fromJSON(e.maxDepositPeriod)),t},toJSON(e){let t={};return e.minDeposit?t.minDeposit=e.minDeposit.map(e=>e?o.Coin.toJSON(e):void 0):t.minDeposit=[],void 0!==e.maxDepositPeriod&&(t.maxDepositPeriod=e.maxDepositPeriod?l.Duration.toJSON(e.maxDepositPeriod):void 0),t},fromPartial(e){var t;let r=w();return r.minDeposit=(null===(t=e.minDeposit)||void 0===t?void 0:t.map(e=>o.Coin.fromPartial(e)))||[],void 0!==e.maxDepositPeriod&&null!==e.maxDepositPeriod&&(r.maxDepositPeriod=l.Duration.fromPartial(e.maxDepositPeriod)),r}},t.VotingParams={typeUrl:"/cosmos.gov.v1beta1.VotingParams",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.BinaryWriter.create();return void 0!==e.votingPeriod&&l.Duration.encode(e.votingPeriod,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof u.BinaryReader?e:new u.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=_();for(;r.pos>>3==1?i.votingPeriod=l.Duration.decode(r,r.uint32()):r.skipType(7&e)}return i},fromJSON(e){let t=_();return(0,d.isSet)(e.votingPeriod)&&(t.votingPeriod=l.Duration.fromJSON(e.votingPeriod)),t},toJSON(e){let t={};return void 0!==e.votingPeriod&&(t.votingPeriod=e.votingPeriod?l.Duration.toJSON(e.votingPeriod):void 0),t},fromPartial(e){let t=_();return void 0!==e.votingPeriod&&null!==e.votingPeriod&&(t.votingPeriod=l.Duration.fromPartial(e.votingPeriod)),t}},t.TallyParams={typeUrl:"/cosmos.gov.v1beta1.TallyParams",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.BinaryWriter.create();return 0!==e.quorum.length&&t.uint32(10).bytes(e.quorum),0!==e.threshold.length&&t.uint32(18).bytes(e.threshold),0!==e.vetoThreshold.length&&t.uint32(26).bytes(e.vetoThreshold),t},decode(e,t){let r=e instanceof u.BinaryReader?e:new u.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=k();for(;r.pos>>3){case 1:i.quorum=r.bytes();break;case 2:i.threshold=r.bytes();break;case 3:i.vetoThreshold=r.bytes();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=k();return(0,d.isSet)(e.quorum)&&(t.quorum=(0,d.bytesFromBase64)(e.quorum)),(0,d.isSet)(e.threshold)&&(t.threshold=(0,d.bytesFromBase64)(e.threshold)),(0,d.isSet)(e.vetoThreshold)&&(t.vetoThreshold=(0,d.bytesFromBase64)(e.vetoThreshold)),t},toJSON(e){let t={};return void 0!==e.quorum&&(t.quorum=(0,d.base64FromBytes)(void 0!==e.quorum?e.quorum:new Uint8Array)),void 0!==e.threshold&&(t.threshold=(0,d.base64FromBytes)(void 0!==e.threshold?e.threshold:new Uint8Array)),void 0!==e.vetoThreshold&&(t.vetoThreshold=(0,d.base64FromBytes)(void 0!==e.vetoThreshold?e.vetoThreshold:new Uint8Array)),t},fromPartial(e){var t,r,n;let i=k();return i.quorum=null!==(t=e.quorum)&&void 0!==t?t:new Uint8Array,i.threshold=null!==(r=e.threshold)&&void 0!==r?r:new Uint8Array,i.vetoThreshold=null!==(n=e.vetoThreshold)&&void 0!==n?n:new Uint8Array,i}}},22962:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QueryClientImpl=t.QueryTallyResultResponse=t.QueryTallyResultRequest=t.QueryDepositsResponse=t.QueryDepositsRequest=t.QueryDepositResponse=t.QueryDepositRequest=t.QueryParamsResponse=t.QueryParamsRequest=t.QueryVotesResponse=t.QueryVotesRequest=t.QueryVoteResponse=t.QueryVoteRequest=t.QueryProposalsResponse=t.QueryProposalsRequest=t.QueryProposalResponse=t.QueryProposalRequest=t.protobufPackage=void 0;let n=r(5309),i=r(86141),o=r(46554),a=r(99133);function s(){return{proposalId:BigInt(0)}}function l(){return{proposal:n.Proposal.fromPartial({})}}function u(){return{proposalStatus:0,voter:"",depositor:"",pagination:void 0}}function d(){return{proposals:[],pagination:void 0}}function c(){return{proposalId:BigInt(0),voter:""}}function p(){return{vote:n.Vote.fromPartial({})}}function f(){return{proposalId:BigInt(0),pagination:void 0}}function h(){return{votes:[],pagination:void 0}}function g(){return{paramsType:""}}function m(){return{votingParams:n.VotingParams.fromPartial({}),depositParams:n.DepositParams.fromPartial({}),tallyParams:n.TallyParams.fromPartial({})}}function y(){return{proposalId:BigInt(0),depositor:""}}function v(){return{deposit:n.Deposit.fromPartial({})}}function b(){return{proposalId:BigInt(0),pagination:void 0}}function S(){return{deposits:[],pagination:void 0}}function w(){return{proposalId:BigInt(0)}}function _(){return{tally:n.TallyResult.fromPartial({})}}t.protobufPackage="cosmos.gov.v1beta1",t.QueryProposalRequest={typeUrl:"/cosmos.gov.v1beta1.QueryProposalRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return e.proposalId!==BigInt(0)&&t.uint32(8).uint64(e.proposalId),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=s();for(;r.pos>>3==1?i.proposalId=r.uint64():r.skipType(7&e)}return i},fromJSON(e){let t=s();return(0,a.isSet)(e.proposalId)&&(t.proposalId=BigInt(e.proposalId.toString())),t},toJSON(e){let t={};return void 0!==e.proposalId&&(t.proposalId=(e.proposalId||BigInt(0)).toString()),t},fromPartial(e){let t=s();return void 0!==e.proposalId&&null!==e.proposalId&&(t.proposalId=BigInt(e.proposalId.toString())),t}},t.QueryProposalResponse={typeUrl:"/cosmos.gov.v1beta1.QueryProposalResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return void 0!==e.proposal&&n.Proposal.encode(e.proposal,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=l();for(;r.pos>>3==1?a.proposal=n.Proposal.decode(r,r.uint32()):r.skipType(7&e)}return a},fromJSON(e){let t=l();return(0,a.isSet)(e.proposal)&&(t.proposal=n.Proposal.fromJSON(e.proposal)),t},toJSON(e){let t={};return void 0!==e.proposal&&(t.proposal=e.proposal?n.Proposal.toJSON(e.proposal):void 0),t},fromPartial(e){let t=l();return void 0!==e.proposal&&null!==e.proposal&&(t.proposal=n.Proposal.fromPartial(e.proposal)),t}},t.QueryProposalsRequest={typeUrl:"/cosmos.gov.v1beta1.QueryProposalsRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return 0!==e.proposalStatus&&t.uint32(8).int32(e.proposalStatus),""!==e.voter&&t.uint32(18).string(e.voter),""!==e.depositor&&t.uint32(26).string(e.depositor),void 0!==e.pagination&&i.PageRequest.encode(e.pagination,t.uint32(34).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,a=u();for(;r.pos>>3){case 1:a.proposalStatus=r.int32();break;case 2:a.voter=r.string();break;case 3:a.depositor=r.string();break;case 4:a.pagination=i.PageRequest.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=u();return(0,a.isSet)(e.proposalStatus)&&(t.proposalStatus=(0,n.proposalStatusFromJSON)(e.proposalStatus)),(0,a.isSet)(e.voter)&&(t.voter=String(e.voter)),(0,a.isSet)(e.depositor)&&(t.depositor=String(e.depositor)),(0,a.isSet)(e.pagination)&&(t.pagination=i.PageRequest.fromJSON(e.pagination)),t},toJSON(e){let t={};return void 0!==e.proposalStatus&&(t.proposalStatus=(0,n.proposalStatusToJSON)(e.proposalStatus)),void 0!==e.voter&&(t.voter=e.voter),void 0!==e.depositor&&(t.depositor=e.depositor),void 0!==e.pagination&&(t.pagination=e.pagination?i.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){var t,r,n;let o=u();return o.proposalStatus=null!==(t=e.proposalStatus)&&void 0!==t?t:0,o.voter=null!==(r=e.voter)&&void 0!==r?r:"",o.depositor=null!==(n=e.depositor)&&void 0!==n?n:"",void 0!==e.pagination&&null!==e.pagination&&(o.pagination=i.PageRequest.fromPartial(e.pagination)),o}},t.QueryProposalsResponse={typeUrl:"/cosmos.gov.v1beta1.QueryProposalsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of e.proposals)n.Proposal.encode(r,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&i.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),a=void 0===t?r.len:r.pos+t,s=d();for(;r.pos>>3){case 1:s.proposals.push(n.Proposal.decode(r,r.uint32()));break;case 2:s.pagination=i.PageResponse.decode(r,r.uint32());break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=d();return Array.isArray(null==e?void 0:e.proposals)&&(t.proposals=e.proposals.map(e=>n.Proposal.fromJSON(e))),(0,a.isSet)(e.pagination)&&(t.pagination=i.PageResponse.fromJSON(e.pagination)),t},toJSON(e){let t={};return e.proposals?t.proposals=e.proposals.map(e=>e?n.Proposal.toJSON(e):void 0):t.proposals=[],void 0!==e.pagination&&(t.pagination=e.pagination?i.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=d();return r.proposals=(null===(t=e.proposals)||void 0===t?void 0:t.map(e=>n.Proposal.fromPartial(e)))||[],void 0!==e.pagination&&null!==e.pagination&&(r.pagination=i.PageResponse.fromPartial(e.pagination)),r}},t.QueryVoteRequest={typeUrl:"/cosmos.gov.v1beta1.QueryVoteRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return e.proposalId!==BigInt(0)&&t.uint32(8).uint64(e.proposalId),""!==e.voter&&t.uint32(18).string(e.voter),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=c();for(;r.pos>>3){case 1:i.proposalId=r.uint64();break;case 2:i.voter=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=c();return(0,a.isSet)(e.proposalId)&&(t.proposalId=BigInt(e.proposalId.toString())),(0,a.isSet)(e.voter)&&(t.voter=String(e.voter)),t},toJSON(e){let t={};return void 0!==e.proposalId&&(t.proposalId=(e.proposalId||BigInt(0)).toString()),void 0!==e.voter&&(t.voter=e.voter),t},fromPartial(e){var t;let r=c();return void 0!==e.proposalId&&null!==e.proposalId&&(r.proposalId=BigInt(e.proposalId.toString())),r.voter=null!==(t=e.voter)&&void 0!==t?t:"",r}},t.QueryVoteResponse={typeUrl:"/cosmos.gov.v1beta1.QueryVoteResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return void 0!==e.vote&&n.Vote.encode(e.vote,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=p();for(;r.pos>>3==1?a.vote=n.Vote.decode(r,r.uint32()):r.skipType(7&e)}return a},fromJSON(e){let t=p();return(0,a.isSet)(e.vote)&&(t.vote=n.Vote.fromJSON(e.vote)),t},toJSON(e){let t={};return void 0!==e.vote&&(t.vote=e.vote?n.Vote.toJSON(e.vote):void 0),t},fromPartial(e){let t=p();return void 0!==e.vote&&null!==e.vote&&(t.vote=n.Vote.fromPartial(e.vote)),t}},t.QueryVotesRequest={typeUrl:"/cosmos.gov.v1beta1.QueryVotesRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return e.proposalId!==BigInt(0)&&t.uint32(8).uint64(e.proposalId),void 0!==e.pagination&&i.PageRequest.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,a=f();for(;r.pos>>3){case 1:a.proposalId=r.uint64();break;case 2:a.pagination=i.PageRequest.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=f();return(0,a.isSet)(e.proposalId)&&(t.proposalId=BigInt(e.proposalId.toString())),(0,a.isSet)(e.pagination)&&(t.pagination=i.PageRequest.fromJSON(e.pagination)),t},toJSON(e){let t={};return void 0!==e.proposalId&&(t.proposalId=(e.proposalId||BigInt(0)).toString()),void 0!==e.pagination&&(t.pagination=e.pagination?i.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){let t=f();return void 0!==e.proposalId&&null!==e.proposalId&&(t.proposalId=BigInt(e.proposalId.toString())),void 0!==e.pagination&&null!==e.pagination&&(t.pagination=i.PageRequest.fromPartial(e.pagination)),t}},t.QueryVotesResponse={typeUrl:"/cosmos.gov.v1beta1.QueryVotesResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of e.votes)n.Vote.encode(r,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&i.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),a=void 0===t?r.len:r.pos+t,s=h();for(;r.pos>>3){case 1:s.votes.push(n.Vote.decode(r,r.uint32()));break;case 2:s.pagination=i.PageResponse.decode(r,r.uint32());break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=h();return Array.isArray(null==e?void 0:e.votes)&&(t.votes=e.votes.map(e=>n.Vote.fromJSON(e))),(0,a.isSet)(e.pagination)&&(t.pagination=i.PageResponse.fromJSON(e.pagination)),t},toJSON(e){let t={};return e.votes?t.votes=e.votes.map(e=>e?n.Vote.toJSON(e):void 0):t.votes=[],void 0!==e.pagination&&(t.pagination=e.pagination?i.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=h();return r.votes=(null===(t=e.votes)||void 0===t?void 0:t.map(e=>n.Vote.fromPartial(e)))||[],void 0!==e.pagination&&null!==e.pagination&&(r.pagination=i.PageResponse.fromPartial(e.pagination)),r}},t.QueryParamsRequest={typeUrl:"/cosmos.gov.v1beta1.QueryParamsRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.paramsType&&t.uint32(10).string(e.paramsType),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=g();for(;r.pos>>3==1?i.paramsType=r.string():r.skipType(7&e)}return i},fromJSON(e){let t=g();return(0,a.isSet)(e.paramsType)&&(t.paramsType=String(e.paramsType)),t},toJSON(e){let t={};return void 0!==e.paramsType&&(t.paramsType=e.paramsType),t},fromPartial(e){var t;let r=g();return r.paramsType=null!==(t=e.paramsType)&&void 0!==t?t:"",r}},t.QueryParamsResponse={typeUrl:"/cosmos.gov.v1beta1.QueryParamsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return void 0!==e.votingParams&&n.VotingParams.encode(e.votingParams,t.uint32(10).fork()).ldelim(),void 0!==e.depositParams&&n.DepositParams.encode(e.depositParams,t.uint32(18).fork()).ldelim(),void 0!==e.tallyParams&&n.TallyParams.encode(e.tallyParams,t.uint32(26).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=m();for(;r.pos>>3){case 1:a.votingParams=n.VotingParams.decode(r,r.uint32());break;case 2:a.depositParams=n.DepositParams.decode(r,r.uint32());break;case 3:a.tallyParams=n.TallyParams.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=m();return(0,a.isSet)(e.votingParams)&&(t.votingParams=n.VotingParams.fromJSON(e.votingParams)),(0,a.isSet)(e.depositParams)&&(t.depositParams=n.DepositParams.fromJSON(e.depositParams)),(0,a.isSet)(e.tallyParams)&&(t.tallyParams=n.TallyParams.fromJSON(e.tallyParams)),t},toJSON(e){let t={};return void 0!==e.votingParams&&(t.votingParams=e.votingParams?n.VotingParams.toJSON(e.votingParams):void 0),void 0!==e.depositParams&&(t.depositParams=e.depositParams?n.DepositParams.toJSON(e.depositParams):void 0),void 0!==e.tallyParams&&(t.tallyParams=e.tallyParams?n.TallyParams.toJSON(e.tallyParams):void 0),t},fromPartial(e){let t=m();return void 0!==e.votingParams&&null!==e.votingParams&&(t.votingParams=n.VotingParams.fromPartial(e.votingParams)),void 0!==e.depositParams&&null!==e.depositParams&&(t.depositParams=n.DepositParams.fromPartial(e.depositParams)),void 0!==e.tallyParams&&null!==e.tallyParams&&(t.tallyParams=n.TallyParams.fromPartial(e.tallyParams)),t}},t.QueryDepositRequest={typeUrl:"/cosmos.gov.v1beta1.QueryDepositRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return e.proposalId!==BigInt(0)&&t.uint32(8).uint64(e.proposalId),""!==e.depositor&&t.uint32(18).string(e.depositor),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=y();for(;r.pos>>3){case 1:i.proposalId=r.uint64();break;case 2:i.depositor=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=y();return(0,a.isSet)(e.proposalId)&&(t.proposalId=BigInt(e.proposalId.toString())),(0,a.isSet)(e.depositor)&&(t.depositor=String(e.depositor)),t},toJSON(e){let t={};return void 0!==e.proposalId&&(t.proposalId=(e.proposalId||BigInt(0)).toString()),void 0!==e.depositor&&(t.depositor=e.depositor),t},fromPartial(e){var t;let r=y();return void 0!==e.proposalId&&null!==e.proposalId&&(r.proposalId=BigInt(e.proposalId.toString())),r.depositor=null!==(t=e.depositor)&&void 0!==t?t:"",r}},t.QueryDepositResponse={typeUrl:"/cosmos.gov.v1beta1.QueryDepositResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return void 0!==e.deposit&&n.Deposit.encode(e.deposit,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=v();for(;r.pos>>3==1?a.deposit=n.Deposit.decode(r,r.uint32()):r.skipType(7&e)}return a},fromJSON(e){let t=v();return(0,a.isSet)(e.deposit)&&(t.deposit=n.Deposit.fromJSON(e.deposit)),t},toJSON(e){let t={};return void 0!==e.deposit&&(t.deposit=e.deposit?n.Deposit.toJSON(e.deposit):void 0),t},fromPartial(e){let t=v();return void 0!==e.deposit&&null!==e.deposit&&(t.deposit=n.Deposit.fromPartial(e.deposit)),t}},t.QueryDepositsRequest={typeUrl:"/cosmos.gov.v1beta1.QueryDepositsRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return e.proposalId!==BigInt(0)&&t.uint32(8).uint64(e.proposalId),void 0!==e.pagination&&i.PageRequest.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,a=b();for(;r.pos>>3){case 1:a.proposalId=r.uint64();break;case 2:a.pagination=i.PageRequest.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=b();return(0,a.isSet)(e.proposalId)&&(t.proposalId=BigInt(e.proposalId.toString())),(0,a.isSet)(e.pagination)&&(t.pagination=i.PageRequest.fromJSON(e.pagination)),t},toJSON(e){let t={};return void 0!==e.proposalId&&(t.proposalId=(e.proposalId||BigInt(0)).toString()),void 0!==e.pagination&&(t.pagination=e.pagination?i.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){let t=b();return void 0!==e.proposalId&&null!==e.proposalId&&(t.proposalId=BigInt(e.proposalId.toString())),void 0!==e.pagination&&null!==e.pagination&&(t.pagination=i.PageRequest.fromPartial(e.pagination)),t}},t.QueryDepositsResponse={typeUrl:"/cosmos.gov.v1beta1.QueryDepositsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of e.deposits)n.Deposit.encode(r,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&i.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),a=void 0===t?r.len:r.pos+t,s=S();for(;r.pos>>3){case 1:s.deposits.push(n.Deposit.decode(r,r.uint32()));break;case 2:s.pagination=i.PageResponse.decode(r,r.uint32());break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=S();return Array.isArray(null==e?void 0:e.deposits)&&(t.deposits=e.deposits.map(e=>n.Deposit.fromJSON(e))),(0,a.isSet)(e.pagination)&&(t.pagination=i.PageResponse.fromJSON(e.pagination)),t},toJSON(e){let t={};return e.deposits?t.deposits=e.deposits.map(e=>e?n.Deposit.toJSON(e):void 0):t.deposits=[],void 0!==e.pagination&&(t.pagination=e.pagination?i.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=S();return r.deposits=(null===(t=e.deposits)||void 0===t?void 0:t.map(e=>n.Deposit.fromPartial(e)))||[],void 0!==e.pagination&&null!==e.pagination&&(r.pagination=i.PageResponse.fromPartial(e.pagination)),r}},t.QueryTallyResultRequest={typeUrl:"/cosmos.gov.v1beta1.QueryTallyResultRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return e.proposalId!==BigInt(0)&&t.uint32(8).uint64(e.proposalId),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=w();for(;r.pos>>3==1?i.proposalId=r.uint64():r.skipType(7&e)}return i},fromJSON(e){let t=w();return(0,a.isSet)(e.proposalId)&&(t.proposalId=BigInt(e.proposalId.toString())),t},toJSON(e){let t={};return void 0!==e.proposalId&&(t.proposalId=(e.proposalId||BigInt(0)).toString()),t},fromPartial(e){let t=w();return void 0!==e.proposalId&&null!==e.proposalId&&(t.proposalId=BigInt(e.proposalId.toString())),t}},t.QueryTallyResultResponse={typeUrl:"/cosmos.gov.v1beta1.QueryTallyResultResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return void 0!==e.tally&&n.TallyResult.encode(e.tally,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=_();for(;r.pos>>3==1?a.tally=n.TallyResult.decode(r,r.uint32()):r.skipType(7&e)}return a},fromJSON(e){let t=_();return(0,a.isSet)(e.tally)&&(t.tally=n.TallyResult.fromJSON(e.tally)),t},toJSON(e){let t={};return void 0!==e.tally&&(t.tally=e.tally?n.TallyResult.toJSON(e.tally):void 0),t},fromPartial(e){let t=_();return void 0!==e.tally&&null!==e.tally&&(t.tally=n.TallyResult.fromPartial(e.tally)),t}};class k{Proposal(e){let r=t.QueryProposalRequest.encode(e).finish();return this.rpc.request("cosmos.gov.v1beta1.Query","Proposal",r).then(e=>t.QueryProposalResponse.decode(new o.BinaryReader(e)))}Proposals(e){let r=t.QueryProposalsRequest.encode(e).finish();return this.rpc.request("cosmos.gov.v1beta1.Query","Proposals",r).then(e=>t.QueryProposalsResponse.decode(new o.BinaryReader(e)))}Vote(e){let r=t.QueryVoteRequest.encode(e).finish();return this.rpc.request("cosmos.gov.v1beta1.Query","Vote",r).then(e=>t.QueryVoteResponse.decode(new o.BinaryReader(e)))}Votes(e){let r=t.QueryVotesRequest.encode(e).finish();return this.rpc.request("cosmos.gov.v1beta1.Query","Votes",r).then(e=>t.QueryVotesResponse.decode(new o.BinaryReader(e)))}Params(e){let r=t.QueryParamsRequest.encode(e).finish();return this.rpc.request("cosmos.gov.v1beta1.Query","Params",r).then(e=>t.QueryParamsResponse.decode(new o.BinaryReader(e)))}Deposit(e){let r=t.QueryDepositRequest.encode(e).finish();return this.rpc.request("cosmos.gov.v1beta1.Query","Deposit",r).then(e=>t.QueryDepositResponse.decode(new o.BinaryReader(e)))}Deposits(e){let r=t.QueryDepositsRequest.encode(e).finish();return this.rpc.request("cosmos.gov.v1beta1.Query","Deposits",r).then(e=>t.QueryDepositsResponse.decode(new o.BinaryReader(e)))}TallyResult(e){let r=t.QueryTallyResultRequest.encode(e).finish();return this.rpc.request("cosmos.gov.v1beta1.Query","TallyResult",r).then(e=>t.QueryTallyResultResponse.decode(new o.BinaryReader(e)))}constructor(e){this.rpc=e,this.Proposal=this.Proposal.bind(this),this.Proposals=this.Proposals.bind(this),this.Vote=this.Vote.bind(this),this.Votes=this.Votes.bind(this),this.Params=this.Params.bind(this),this.Deposit=this.Deposit.bind(this),this.Deposits=this.Deposits.bind(this),this.TallyResult=this.TallyResult.bind(this)}}t.QueryClientImpl=k},76925:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MsgClientImpl=t.MsgDepositResponse=t.MsgDeposit=t.MsgVoteWeightedResponse=t.MsgVoteWeighted=t.MsgVoteResponse=t.MsgVote=t.MsgSubmitProposalResponse=t.MsgSubmitProposal=t.protobufPackage=void 0;let n=r(11879),i=r(14841),o=r(5309),a=r(46554),s=r(99133);function l(){return{content:void 0,initialDeposit:[],proposer:""}}function u(){return{proposalId:BigInt(0)}}function d(){return{proposalId:BigInt(0),voter:"",option:0}}function c(){return{}}function p(){return{proposalId:BigInt(0),voter:"",options:[]}}function f(){return{}}function h(){return{proposalId:BigInt(0),depositor:"",amount:[]}}function g(){return{}}t.protobufPackage="cosmos.gov.v1beta1",t.MsgSubmitProposal={typeUrl:"/cosmos.gov.v1beta1.MsgSubmitProposal",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();for(let r of(void 0!==e.content&&n.Any.encode(e.content,t.uint32(10).fork()).ldelim(),e.initialDeposit))i.Coin.encode(r,t.uint32(18).fork()).ldelim();return""!==e.proposer&&t.uint32(26).string(e.proposer),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),o=void 0===t?r.len:r.pos+t,s=l();for(;r.pos>>3){case 1:s.content=n.Any.decode(r,r.uint32());break;case 2:s.initialDeposit.push(i.Coin.decode(r,r.uint32()));break;case 3:s.proposer=r.string();break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=l();return(0,s.isSet)(e.content)&&(t.content=n.Any.fromJSON(e.content)),Array.isArray(null==e?void 0:e.initialDeposit)&&(t.initialDeposit=e.initialDeposit.map(e=>i.Coin.fromJSON(e))),(0,s.isSet)(e.proposer)&&(t.proposer=String(e.proposer)),t},toJSON(e){let t={};return void 0!==e.content&&(t.content=e.content?n.Any.toJSON(e.content):void 0),e.initialDeposit?t.initialDeposit=e.initialDeposit.map(e=>e?i.Coin.toJSON(e):void 0):t.initialDeposit=[],void 0!==e.proposer&&(t.proposer=e.proposer),t},fromPartial(e){var t,r;let o=l();return void 0!==e.content&&null!==e.content&&(o.content=n.Any.fromPartial(e.content)),o.initialDeposit=(null===(t=e.initialDeposit)||void 0===t?void 0:t.map(e=>i.Coin.fromPartial(e)))||[],o.proposer=null!==(r=e.proposer)&&void 0!==r?r:"",o}},t.MsgSubmitProposalResponse={typeUrl:"/cosmos.gov.v1beta1.MsgSubmitProposalResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return e.proposalId!==BigInt(0)&&t.uint32(8).uint64(e.proposalId),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=u();for(;r.pos>>3==1?i.proposalId=r.uint64():r.skipType(7&e)}return i},fromJSON(e){let t=u();return(0,s.isSet)(e.proposalId)&&(t.proposalId=BigInt(e.proposalId.toString())),t},toJSON(e){let t={};return void 0!==e.proposalId&&(t.proposalId=(e.proposalId||BigInt(0)).toString()),t},fromPartial(e){let t=u();return void 0!==e.proposalId&&null!==e.proposalId&&(t.proposalId=BigInt(e.proposalId.toString())),t}},t.MsgVote={typeUrl:"/cosmos.gov.v1beta1.MsgVote",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return e.proposalId!==BigInt(0)&&t.uint32(8).uint64(e.proposalId),""!==e.voter&&t.uint32(18).string(e.voter),0!==e.option&&t.uint32(24).int32(e.option),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=d();for(;r.pos>>3){case 1:i.proposalId=r.uint64();break;case 2:i.voter=r.string();break;case 3:i.option=r.int32();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=d();return(0,s.isSet)(e.proposalId)&&(t.proposalId=BigInt(e.proposalId.toString())),(0,s.isSet)(e.voter)&&(t.voter=String(e.voter)),(0,s.isSet)(e.option)&&(t.option=(0,o.voteOptionFromJSON)(e.option)),t},toJSON(e){let t={};return void 0!==e.proposalId&&(t.proposalId=(e.proposalId||BigInt(0)).toString()),void 0!==e.voter&&(t.voter=e.voter),void 0!==e.option&&(t.option=(0,o.voteOptionToJSON)(e.option)),t},fromPartial(e){var t,r;let n=d();return void 0!==e.proposalId&&null!==e.proposalId&&(n.proposalId=BigInt(e.proposalId.toString())),n.voter=null!==(t=e.voter)&&void 0!==t?t:"",n.option=null!==(r=e.option)&&void 0!==r?r:0,n}},t.MsgVoteResponse={typeUrl:"/cosmos.gov.v1beta1.MsgVoteResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=c();for(;r.posc(),toJSON:e=>({}),fromPartial:e=>c()},t.MsgVoteWeighted={typeUrl:"/cosmos.gov.v1beta1.MsgVoteWeighted",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();for(let r of(e.proposalId!==BigInt(0)&&t.uint32(8).uint64(e.proposalId),""!==e.voter&&t.uint32(18).string(e.voter),e.options))o.WeightedVoteOption.encode(r,t.uint32(26).fork()).ldelim();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=p();for(;r.pos>>3){case 1:i.proposalId=r.uint64();break;case 2:i.voter=r.string();break;case 3:i.options.push(o.WeightedVoteOption.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=p();return(0,s.isSet)(e.proposalId)&&(t.proposalId=BigInt(e.proposalId.toString())),(0,s.isSet)(e.voter)&&(t.voter=String(e.voter)),Array.isArray(null==e?void 0:e.options)&&(t.options=e.options.map(e=>o.WeightedVoteOption.fromJSON(e))),t},toJSON(e){let t={};return void 0!==e.proposalId&&(t.proposalId=(e.proposalId||BigInt(0)).toString()),void 0!==e.voter&&(t.voter=e.voter),e.options?t.options=e.options.map(e=>e?o.WeightedVoteOption.toJSON(e):void 0):t.options=[],t},fromPartial(e){var t,r;let n=p();return void 0!==e.proposalId&&null!==e.proposalId&&(n.proposalId=BigInt(e.proposalId.toString())),n.voter=null!==(r=e.voter)&&void 0!==r?r:"",n.options=(null===(t=e.options)||void 0===t?void 0:t.map(e=>o.WeightedVoteOption.fromPartial(e)))||[],n}},t.MsgVoteWeightedResponse={typeUrl:"/cosmos.gov.v1beta1.MsgVoteWeightedResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=f();for(;r.posf(),toJSON:e=>({}),fromPartial:e=>f()},t.MsgDeposit={typeUrl:"/cosmos.gov.v1beta1.MsgDeposit",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();for(let r of(e.proposalId!==BigInt(0)&&t.uint32(8).uint64(e.proposalId),""!==e.depositor&&t.uint32(18).string(e.depositor),e.amount))i.Coin.encode(r,t.uint32(26).fork()).ldelim();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=h();for(;r.pos>>3){case 1:o.proposalId=r.uint64();break;case 2:o.depositor=r.string();break;case 3:o.amount.push(i.Coin.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return o},fromJSON(e){let t=h();return(0,s.isSet)(e.proposalId)&&(t.proposalId=BigInt(e.proposalId.toString())),(0,s.isSet)(e.depositor)&&(t.depositor=String(e.depositor)),Array.isArray(null==e?void 0:e.amount)&&(t.amount=e.amount.map(e=>i.Coin.fromJSON(e))),t},toJSON(e){let t={};return void 0!==e.proposalId&&(t.proposalId=(e.proposalId||BigInt(0)).toString()),void 0!==e.depositor&&(t.depositor=e.depositor),e.amount?t.amount=e.amount.map(e=>e?i.Coin.toJSON(e):void 0):t.amount=[],t},fromPartial(e){var t,r;let n=h();return void 0!==e.proposalId&&null!==e.proposalId&&(n.proposalId=BigInt(e.proposalId.toString())),n.depositor=null!==(r=e.depositor)&&void 0!==r?r:"",n.amount=(null===(t=e.amount)||void 0===t?void 0:t.map(e=>i.Coin.fromPartial(e)))||[],n}},t.MsgDepositResponse={typeUrl:"/cosmos.gov.v1beta1.MsgDepositResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=g();for(;r.posg(),toJSON:e=>({}),fromPartial:e=>g()};class m{SubmitProposal(e){let r=t.MsgSubmitProposal.encode(e).finish();return this.rpc.request("cosmos.gov.v1beta1.Msg","SubmitProposal",r).then(e=>t.MsgSubmitProposalResponse.decode(new a.BinaryReader(e)))}Vote(e){let r=t.MsgVote.encode(e).finish();return this.rpc.request("cosmos.gov.v1beta1.Msg","Vote",r).then(e=>t.MsgVoteResponse.decode(new a.BinaryReader(e)))}VoteWeighted(e){let r=t.MsgVoteWeighted.encode(e).finish();return this.rpc.request("cosmos.gov.v1beta1.Msg","VoteWeighted",r).then(e=>t.MsgVoteWeightedResponse.decode(new a.BinaryReader(e)))}Deposit(e){let r=t.MsgDeposit.encode(e).finish();return this.rpc.request("cosmos.gov.v1beta1.Msg","Deposit",r).then(e=>t.MsgDepositResponse.decode(new a.BinaryReader(e)))}constructor(e){this.rpc=e,this.SubmitProposal=this.SubmitProposal.bind(this),this.Vote=this.Vote.bind(this),this.VoteWeighted=this.VoteWeighted.bind(this),this.Deposit=this.Deposit.bind(this)}}t.MsgClientImpl=m},51691:function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.MsgClientImpl=t.MsgLeaveGroupResponse=t.MsgLeaveGroup=t.MsgExecResponse=t.MsgExec=t.MsgVoteResponse=t.MsgVote=t.MsgWithdrawProposalResponse=t.MsgWithdrawProposal=t.MsgSubmitProposalResponse=t.MsgSubmitProposal=t.MsgUpdateGroupPolicyMetadataResponse=t.MsgUpdateGroupPolicyMetadata=t.MsgUpdateGroupPolicyDecisionPolicyResponse=t.MsgUpdateGroupPolicyDecisionPolicy=t.MsgCreateGroupWithPolicyResponse=t.MsgCreateGroupWithPolicy=t.MsgUpdateGroupPolicyAdminResponse=t.MsgUpdateGroupPolicyAdmin=t.MsgCreateGroupPolicyResponse=t.MsgCreateGroupPolicy=t.MsgUpdateGroupMetadataResponse=t.MsgUpdateGroupMetadata=t.MsgUpdateGroupAdminResponse=t.MsgUpdateGroupAdmin=t.MsgUpdateGroupMembersResponse=t.MsgUpdateGroupMembers=t.MsgCreateGroupResponse=t.MsgCreateGroup=t.execToJSON=t.execFromJSON=t.Exec=t.protobufPackage=void 0;let i=r(1264),o=r(11879),a=r(46554),s=r(99133);function l(e){switch(e){case 0:case"EXEC_UNSPECIFIED":return n.EXEC_UNSPECIFIED;case 1:case"EXEC_TRY":return n.EXEC_TRY;default:return n.UNRECOGNIZED}}function u(e){switch(e){case n.EXEC_UNSPECIFIED:return"EXEC_UNSPECIFIED";case n.EXEC_TRY:return"EXEC_TRY";case n.UNRECOGNIZED:default:return"UNRECOGNIZED"}}function d(){return{admin:"",members:[],metadata:""}}function c(){return{groupId:BigInt(0)}}function p(){return{admin:"",groupId:BigInt(0),memberUpdates:[]}}function f(){return{}}function h(){return{admin:"",groupId:BigInt(0),newAdmin:""}}function g(){return{}}function m(){return{admin:"",groupId:BigInt(0),metadata:""}}function y(){return{}}function v(){return{admin:"",groupId:BigInt(0),metadata:"",decisionPolicy:void 0}}function b(){return{address:""}}function S(){return{admin:"",groupPolicyAddress:"",newAdmin:""}}function w(){return{}}function _(){return{admin:"",members:[],groupMetadata:"",groupPolicyMetadata:"",groupPolicyAsAdmin:!1,decisionPolicy:void 0}}function k(){return{groupId:BigInt(0),groupPolicyAddress:""}}function O(){return{admin:"",groupPolicyAddress:"",decisionPolicy:void 0}}function P(){return{}}function A(){return{admin:"",groupPolicyAddress:"",metadata:""}}function I(){return{}}function R(){return{groupPolicyAddress:"",proposers:[],metadata:"",messages:[],exec:0,title:"",summary:""}}function E(){return{proposalId:BigInt(0)}}function T(){return{proposalId:BigInt(0),address:""}}function N(){return{}}function x(){return{proposalId:BigInt(0),voter:"",option:0,metadata:"",exec:0}}function B(){return{}}function C(){return{proposalId:BigInt(0),executor:""}}function M(){return{result:0}}function D(){return{address:"",groupId:BigInt(0)}}function U(){return{}}t.protobufPackage="cosmos.group.v1",function(e){e[e.EXEC_UNSPECIFIED=0]="EXEC_UNSPECIFIED",e[e.EXEC_TRY=1]="EXEC_TRY",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(n||(t.Exec=n={})),t.execFromJSON=l,t.execToJSON=u,t.MsgCreateGroup={typeUrl:"/cosmos.group.v1.MsgCreateGroup",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();for(let r of(""!==e.admin&&t.uint32(10).string(e.admin),e.members))i.MemberRequest.encode(r,t.uint32(18).fork()).ldelim();return""!==e.metadata&&t.uint32(26).string(e.metadata),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=d();for(;r.pos>>3){case 1:o.admin=r.string();break;case 2:o.members.push(i.MemberRequest.decode(r,r.uint32()));break;case 3:o.metadata=r.string();break;default:r.skipType(7&e)}}return o},fromJSON(e){let t=d();return(0,s.isSet)(e.admin)&&(t.admin=String(e.admin)),Array.isArray(null==e?void 0:e.members)&&(t.members=e.members.map(e=>i.MemberRequest.fromJSON(e))),(0,s.isSet)(e.metadata)&&(t.metadata=String(e.metadata)),t},toJSON(e){let t={};return void 0!==e.admin&&(t.admin=e.admin),e.members?t.members=e.members.map(e=>e?i.MemberRequest.toJSON(e):void 0):t.members=[],void 0!==e.metadata&&(t.metadata=e.metadata),t},fromPartial(e){var t,r,n;let o=d();return o.admin=null!==(r=e.admin)&&void 0!==r?r:"",o.members=(null===(t=e.members)||void 0===t?void 0:t.map(e=>i.MemberRequest.fromPartial(e)))||[],o.metadata=null!==(n=e.metadata)&&void 0!==n?n:"",o}},t.MsgCreateGroupResponse={typeUrl:"/cosmos.group.v1.MsgCreateGroupResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return e.groupId!==BigInt(0)&&t.uint32(8).uint64(e.groupId),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=c();for(;r.pos>>3==1?i.groupId=r.uint64():r.skipType(7&e)}return i},fromJSON(e){let t=c();return(0,s.isSet)(e.groupId)&&(t.groupId=BigInt(e.groupId.toString())),t},toJSON(e){let t={};return void 0!==e.groupId&&(t.groupId=(e.groupId||BigInt(0)).toString()),t},fromPartial(e){let t=c();return void 0!==e.groupId&&null!==e.groupId&&(t.groupId=BigInt(e.groupId.toString())),t}},t.MsgUpdateGroupMembers={typeUrl:"/cosmos.group.v1.MsgUpdateGroupMembers",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();for(let r of(""!==e.admin&&t.uint32(10).string(e.admin),e.groupId!==BigInt(0)&&t.uint32(16).uint64(e.groupId),e.memberUpdates))i.MemberRequest.encode(r,t.uint32(26).fork()).ldelim();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=p();for(;r.pos>>3){case 1:o.admin=r.string();break;case 2:o.groupId=r.uint64();break;case 3:o.memberUpdates.push(i.MemberRequest.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return o},fromJSON(e){let t=p();return(0,s.isSet)(e.admin)&&(t.admin=String(e.admin)),(0,s.isSet)(e.groupId)&&(t.groupId=BigInt(e.groupId.toString())),Array.isArray(null==e?void 0:e.memberUpdates)&&(t.memberUpdates=e.memberUpdates.map(e=>i.MemberRequest.fromJSON(e))),t},toJSON(e){let t={};return void 0!==e.admin&&(t.admin=e.admin),void 0!==e.groupId&&(t.groupId=(e.groupId||BigInt(0)).toString()),e.memberUpdates?t.memberUpdates=e.memberUpdates.map(e=>e?i.MemberRequest.toJSON(e):void 0):t.memberUpdates=[],t},fromPartial(e){var t,r;let n=p();return n.admin=null!==(r=e.admin)&&void 0!==r?r:"",void 0!==e.groupId&&null!==e.groupId&&(n.groupId=BigInt(e.groupId.toString())),n.memberUpdates=(null===(t=e.memberUpdates)||void 0===t?void 0:t.map(e=>i.MemberRequest.fromPartial(e)))||[],n}},t.MsgUpdateGroupMembersResponse={typeUrl:"/cosmos.group.v1.MsgUpdateGroupMembersResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=f();for(;r.posf(),toJSON:e=>({}),fromPartial:e=>f()},t.MsgUpdateGroupAdmin={typeUrl:"/cosmos.group.v1.MsgUpdateGroupAdmin",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.admin&&t.uint32(10).string(e.admin),e.groupId!==BigInt(0)&&t.uint32(16).uint64(e.groupId),""!==e.newAdmin&&t.uint32(26).string(e.newAdmin),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=h();for(;r.pos>>3){case 1:i.admin=r.string();break;case 2:i.groupId=r.uint64();break;case 3:i.newAdmin=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=h();return(0,s.isSet)(e.admin)&&(t.admin=String(e.admin)),(0,s.isSet)(e.groupId)&&(t.groupId=BigInt(e.groupId.toString())),(0,s.isSet)(e.newAdmin)&&(t.newAdmin=String(e.newAdmin)),t},toJSON(e){let t={};return void 0!==e.admin&&(t.admin=e.admin),void 0!==e.groupId&&(t.groupId=(e.groupId||BigInt(0)).toString()),void 0!==e.newAdmin&&(t.newAdmin=e.newAdmin),t},fromPartial(e){var t,r;let n=h();return n.admin=null!==(t=e.admin)&&void 0!==t?t:"",void 0!==e.groupId&&null!==e.groupId&&(n.groupId=BigInt(e.groupId.toString())),n.newAdmin=null!==(r=e.newAdmin)&&void 0!==r?r:"",n}},t.MsgUpdateGroupAdminResponse={typeUrl:"/cosmos.group.v1.MsgUpdateGroupAdminResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=g();for(;r.posg(),toJSON:e=>({}),fromPartial:e=>g()},t.MsgUpdateGroupMetadata={typeUrl:"/cosmos.group.v1.MsgUpdateGroupMetadata",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.admin&&t.uint32(10).string(e.admin),e.groupId!==BigInt(0)&&t.uint32(16).uint64(e.groupId),""!==e.metadata&&t.uint32(26).string(e.metadata),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=m();for(;r.pos>>3){case 1:i.admin=r.string();break;case 2:i.groupId=r.uint64();break;case 3:i.metadata=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=m();return(0,s.isSet)(e.admin)&&(t.admin=String(e.admin)),(0,s.isSet)(e.groupId)&&(t.groupId=BigInt(e.groupId.toString())),(0,s.isSet)(e.metadata)&&(t.metadata=String(e.metadata)),t},toJSON(e){let t={};return void 0!==e.admin&&(t.admin=e.admin),void 0!==e.groupId&&(t.groupId=(e.groupId||BigInt(0)).toString()),void 0!==e.metadata&&(t.metadata=e.metadata),t},fromPartial(e){var t,r;let n=m();return n.admin=null!==(t=e.admin)&&void 0!==t?t:"",void 0!==e.groupId&&null!==e.groupId&&(n.groupId=BigInt(e.groupId.toString())),n.metadata=null!==(r=e.metadata)&&void 0!==r?r:"",n}},t.MsgUpdateGroupMetadataResponse={typeUrl:"/cosmos.group.v1.MsgUpdateGroupMetadataResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=y();for(;r.posy(),toJSON:e=>({}),fromPartial:e=>y()},t.MsgCreateGroupPolicy={typeUrl:"/cosmos.group.v1.MsgCreateGroupPolicy",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.admin&&t.uint32(10).string(e.admin),e.groupId!==BigInt(0)&&t.uint32(16).uint64(e.groupId),""!==e.metadata&&t.uint32(26).string(e.metadata),void 0!==e.decisionPolicy&&o.Any.encode(e.decisionPolicy,t.uint32(34).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=v();for(;r.pos>>3){case 1:i.admin=r.string();break;case 2:i.groupId=r.uint64();break;case 3:i.metadata=r.string();break;case 4:i.decisionPolicy=o.Any.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=v();return(0,s.isSet)(e.admin)&&(t.admin=String(e.admin)),(0,s.isSet)(e.groupId)&&(t.groupId=BigInt(e.groupId.toString())),(0,s.isSet)(e.metadata)&&(t.metadata=String(e.metadata)),(0,s.isSet)(e.decisionPolicy)&&(t.decisionPolicy=o.Any.fromJSON(e.decisionPolicy)),t},toJSON(e){let t={};return void 0!==e.admin&&(t.admin=e.admin),void 0!==e.groupId&&(t.groupId=(e.groupId||BigInt(0)).toString()),void 0!==e.metadata&&(t.metadata=e.metadata),void 0!==e.decisionPolicy&&(t.decisionPolicy=e.decisionPolicy?o.Any.toJSON(e.decisionPolicy):void 0),t},fromPartial(e){var t,r;let n=v();return n.admin=null!==(t=e.admin)&&void 0!==t?t:"",void 0!==e.groupId&&null!==e.groupId&&(n.groupId=BigInt(e.groupId.toString())),n.metadata=null!==(r=e.metadata)&&void 0!==r?r:"",void 0!==e.decisionPolicy&&null!==e.decisionPolicy&&(n.decisionPolicy=o.Any.fromPartial(e.decisionPolicy)),n}},t.MsgCreateGroupPolicyResponse={typeUrl:"/cosmos.group.v1.MsgCreateGroupPolicyResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.address&&t.uint32(10).string(e.address),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=b();for(;r.pos>>3==1?i.address=r.string():r.skipType(7&e)}return i},fromJSON(e){let t=b();return(0,s.isSet)(e.address)&&(t.address=String(e.address)),t},toJSON(e){let t={};return void 0!==e.address&&(t.address=e.address),t},fromPartial(e){var t;let r=b();return r.address=null!==(t=e.address)&&void 0!==t?t:"",r}},t.MsgUpdateGroupPolicyAdmin={typeUrl:"/cosmos.group.v1.MsgUpdateGroupPolicyAdmin",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.admin&&t.uint32(10).string(e.admin),""!==e.groupPolicyAddress&&t.uint32(18).string(e.groupPolicyAddress),""!==e.newAdmin&&t.uint32(26).string(e.newAdmin),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=S();for(;r.pos>>3){case 1:i.admin=r.string();break;case 2:i.groupPolicyAddress=r.string();break;case 3:i.newAdmin=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=S();return(0,s.isSet)(e.admin)&&(t.admin=String(e.admin)),(0,s.isSet)(e.groupPolicyAddress)&&(t.groupPolicyAddress=String(e.groupPolicyAddress)),(0,s.isSet)(e.newAdmin)&&(t.newAdmin=String(e.newAdmin)),t},toJSON(e){let t={};return void 0!==e.admin&&(t.admin=e.admin),void 0!==e.groupPolicyAddress&&(t.groupPolicyAddress=e.groupPolicyAddress),void 0!==e.newAdmin&&(t.newAdmin=e.newAdmin),t},fromPartial(e){var t,r,n;let i=S();return i.admin=null!==(t=e.admin)&&void 0!==t?t:"",i.groupPolicyAddress=null!==(r=e.groupPolicyAddress)&&void 0!==r?r:"",i.newAdmin=null!==(n=e.newAdmin)&&void 0!==n?n:"",i}},t.MsgUpdateGroupPolicyAdminResponse={typeUrl:"/cosmos.group.v1.MsgUpdateGroupPolicyAdminResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=w();for(;r.posw(),toJSON:e=>({}),fromPartial:e=>w()},t.MsgCreateGroupWithPolicy={typeUrl:"/cosmos.group.v1.MsgCreateGroupWithPolicy",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();for(let r of(""!==e.admin&&t.uint32(10).string(e.admin),e.members))i.MemberRequest.encode(r,t.uint32(18).fork()).ldelim();return""!==e.groupMetadata&&t.uint32(26).string(e.groupMetadata),""!==e.groupPolicyMetadata&&t.uint32(34).string(e.groupPolicyMetadata),!0===e.groupPolicyAsAdmin&&t.uint32(40).bool(e.groupPolicyAsAdmin),void 0!==e.decisionPolicy&&o.Any.encode(e.decisionPolicy,t.uint32(50).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,s=_();for(;r.pos>>3){case 1:s.admin=r.string();break;case 2:s.members.push(i.MemberRequest.decode(r,r.uint32()));break;case 3:s.groupMetadata=r.string();break;case 4:s.groupPolicyMetadata=r.string();break;case 5:s.groupPolicyAsAdmin=r.bool();break;case 6:s.decisionPolicy=o.Any.decode(r,r.uint32());break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=_();return(0,s.isSet)(e.admin)&&(t.admin=String(e.admin)),Array.isArray(null==e?void 0:e.members)&&(t.members=e.members.map(e=>i.MemberRequest.fromJSON(e))),(0,s.isSet)(e.groupMetadata)&&(t.groupMetadata=String(e.groupMetadata)),(0,s.isSet)(e.groupPolicyMetadata)&&(t.groupPolicyMetadata=String(e.groupPolicyMetadata)),(0,s.isSet)(e.groupPolicyAsAdmin)&&(t.groupPolicyAsAdmin=!!e.groupPolicyAsAdmin),(0,s.isSet)(e.decisionPolicy)&&(t.decisionPolicy=o.Any.fromJSON(e.decisionPolicy)),t},toJSON(e){let t={};return void 0!==e.admin&&(t.admin=e.admin),e.members?t.members=e.members.map(e=>e?i.MemberRequest.toJSON(e):void 0):t.members=[],void 0!==e.groupMetadata&&(t.groupMetadata=e.groupMetadata),void 0!==e.groupPolicyMetadata&&(t.groupPolicyMetadata=e.groupPolicyMetadata),void 0!==e.groupPolicyAsAdmin&&(t.groupPolicyAsAdmin=e.groupPolicyAsAdmin),void 0!==e.decisionPolicy&&(t.decisionPolicy=e.decisionPolicy?o.Any.toJSON(e.decisionPolicy):void 0),t},fromPartial(e){var t,r,n,a,s;let l=_();return l.admin=null!==(r=e.admin)&&void 0!==r?r:"",l.members=(null===(t=e.members)||void 0===t?void 0:t.map(e=>i.MemberRequest.fromPartial(e)))||[],l.groupMetadata=null!==(n=e.groupMetadata)&&void 0!==n?n:"",l.groupPolicyMetadata=null!==(a=e.groupPolicyMetadata)&&void 0!==a?a:"",l.groupPolicyAsAdmin=null!==(s=e.groupPolicyAsAdmin)&&void 0!==s&&s,void 0!==e.decisionPolicy&&null!==e.decisionPolicy&&(l.decisionPolicy=o.Any.fromPartial(e.decisionPolicy)),l}},t.MsgCreateGroupWithPolicyResponse={typeUrl:"/cosmos.group.v1.MsgCreateGroupWithPolicyResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return e.groupId!==BigInt(0)&&t.uint32(8).uint64(e.groupId),""!==e.groupPolicyAddress&&t.uint32(18).string(e.groupPolicyAddress),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=k();for(;r.pos>>3){case 1:i.groupId=r.uint64();break;case 2:i.groupPolicyAddress=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=k();return(0,s.isSet)(e.groupId)&&(t.groupId=BigInt(e.groupId.toString())),(0,s.isSet)(e.groupPolicyAddress)&&(t.groupPolicyAddress=String(e.groupPolicyAddress)),t},toJSON(e){let t={};return void 0!==e.groupId&&(t.groupId=(e.groupId||BigInt(0)).toString()),void 0!==e.groupPolicyAddress&&(t.groupPolicyAddress=e.groupPolicyAddress),t},fromPartial(e){var t;let r=k();return void 0!==e.groupId&&null!==e.groupId&&(r.groupId=BigInt(e.groupId.toString())),r.groupPolicyAddress=null!==(t=e.groupPolicyAddress)&&void 0!==t?t:"",r}},t.MsgUpdateGroupPolicyDecisionPolicy={typeUrl:"/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.admin&&t.uint32(10).string(e.admin),""!==e.groupPolicyAddress&&t.uint32(18).string(e.groupPolicyAddress),void 0!==e.decisionPolicy&&o.Any.encode(e.decisionPolicy,t.uint32(26).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=O();for(;r.pos>>3){case 1:i.admin=r.string();break;case 2:i.groupPolicyAddress=r.string();break;case 3:i.decisionPolicy=o.Any.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=O();return(0,s.isSet)(e.admin)&&(t.admin=String(e.admin)),(0,s.isSet)(e.groupPolicyAddress)&&(t.groupPolicyAddress=String(e.groupPolicyAddress)),(0,s.isSet)(e.decisionPolicy)&&(t.decisionPolicy=o.Any.fromJSON(e.decisionPolicy)),t},toJSON(e){let t={};return void 0!==e.admin&&(t.admin=e.admin),void 0!==e.groupPolicyAddress&&(t.groupPolicyAddress=e.groupPolicyAddress),void 0!==e.decisionPolicy&&(t.decisionPolicy=e.decisionPolicy?o.Any.toJSON(e.decisionPolicy):void 0),t},fromPartial(e){var t,r;let n=O();return n.admin=null!==(t=e.admin)&&void 0!==t?t:"",n.groupPolicyAddress=null!==(r=e.groupPolicyAddress)&&void 0!==r?r:"",void 0!==e.decisionPolicy&&null!==e.decisionPolicy&&(n.decisionPolicy=o.Any.fromPartial(e.decisionPolicy)),n}},t.MsgUpdateGroupPolicyDecisionPolicyResponse={typeUrl:"/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicyResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=P();for(;r.posP(),toJSON:e=>({}),fromPartial:e=>P()},t.MsgUpdateGroupPolicyMetadata={typeUrl:"/cosmos.group.v1.MsgUpdateGroupPolicyMetadata",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.admin&&t.uint32(10).string(e.admin),""!==e.groupPolicyAddress&&t.uint32(18).string(e.groupPolicyAddress),""!==e.metadata&&t.uint32(26).string(e.metadata),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=A();for(;r.pos>>3){case 1:i.admin=r.string();break;case 2:i.groupPolicyAddress=r.string();break;case 3:i.metadata=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=A();return(0,s.isSet)(e.admin)&&(t.admin=String(e.admin)),(0,s.isSet)(e.groupPolicyAddress)&&(t.groupPolicyAddress=String(e.groupPolicyAddress)),(0,s.isSet)(e.metadata)&&(t.metadata=String(e.metadata)),t},toJSON(e){let t={};return void 0!==e.admin&&(t.admin=e.admin),void 0!==e.groupPolicyAddress&&(t.groupPolicyAddress=e.groupPolicyAddress),void 0!==e.metadata&&(t.metadata=e.metadata),t},fromPartial(e){var t,r,n;let i=A();return i.admin=null!==(t=e.admin)&&void 0!==t?t:"",i.groupPolicyAddress=null!==(r=e.groupPolicyAddress)&&void 0!==r?r:"",i.metadata=null!==(n=e.metadata)&&void 0!==n?n:"",i}},t.MsgUpdateGroupPolicyMetadataResponse={typeUrl:"/cosmos.group.v1.MsgUpdateGroupPolicyMetadataResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=I();for(;r.posI(),toJSON:e=>({}),fromPartial:e=>I()},t.MsgSubmitProposal={typeUrl:"/cosmos.group.v1.MsgSubmitProposal",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();for(let r of(""!==e.groupPolicyAddress&&t.uint32(10).string(e.groupPolicyAddress),e.proposers))t.uint32(18).string(r);for(let r of(""!==e.metadata&&t.uint32(26).string(e.metadata),e.messages))o.Any.encode(r,t.uint32(34).fork()).ldelim();return 0!==e.exec&&t.uint32(40).int32(e.exec),""!==e.title&&t.uint32(50).string(e.title),""!==e.summary&&t.uint32(58).string(e.summary),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=R();for(;r.pos>>3){case 1:i.groupPolicyAddress=r.string();break;case 2:i.proposers.push(r.string());break;case 3:i.metadata=r.string();break;case 4:i.messages.push(o.Any.decode(r,r.uint32()));break;case 5:i.exec=r.int32();break;case 6:i.title=r.string();break;case 7:i.summary=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=R();return(0,s.isSet)(e.groupPolicyAddress)&&(t.groupPolicyAddress=String(e.groupPolicyAddress)),Array.isArray(null==e?void 0:e.proposers)&&(t.proposers=e.proposers.map(e=>String(e))),(0,s.isSet)(e.metadata)&&(t.metadata=String(e.metadata)),Array.isArray(null==e?void 0:e.messages)&&(t.messages=e.messages.map(e=>o.Any.fromJSON(e))),(0,s.isSet)(e.exec)&&(t.exec=l(e.exec)),(0,s.isSet)(e.title)&&(t.title=String(e.title)),(0,s.isSet)(e.summary)&&(t.summary=String(e.summary)),t},toJSON(e){let t={};return void 0!==e.groupPolicyAddress&&(t.groupPolicyAddress=e.groupPolicyAddress),e.proposers?t.proposers=e.proposers.map(e=>e):t.proposers=[],void 0!==e.metadata&&(t.metadata=e.metadata),e.messages?t.messages=e.messages.map(e=>e?o.Any.toJSON(e):void 0):t.messages=[],void 0!==e.exec&&(t.exec=u(e.exec)),void 0!==e.title&&(t.title=e.title),void 0!==e.summary&&(t.summary=e.summary),t},fromPartial(e){var t,r,n,i,a,s,l;let u=R();return u.groupPolicyAddress=null!==(n=e.groupPolicyAddress)&&void 0!==n?n:"",u.proposers=(null===(t=e.proposers)||void 0===t?void 0:t.map(e=>e))||[],u.metadata=null!==(i=e.metadata)&&void 0!==i?i:"",u.messages=(null===(r=e.messages)||void 0===r?void 0:r.map(e=>o.Any.fromPartial(e)))||[],u.exec=null!==(a=e.exec)&&void 0!==a?a:0,u.title=null!==(s=e.title)&&void 0!==s?s:"",u.summary=null!==(l=e.summary)&&void 0!==l?l:"",u}},t.MsgSubmitProposalResponse={typeUrl:"/cosmos.group.v1.MsgSubmitProposalResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return e.proposalId!==BigInt(0)&&t.uint32(8).uint64(e.proposalId),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=E();for(;r.pos>>3==1?i.proposalId=r.uint64():r.skipType(7&e)}return i},fromJSON(e){let t=E();return(0,s.isSet)(e.proposalId)&&(t.proposalId=BigInt(e.proposalId.toString())),t},toJSON(e){let t={};return void 0!==e.proposalId&&(t.proposalId=(e.proposalId||BigInt(0)).toString()),t},fromPartial(e){let t=E();return void 0!==e.proposalId&&null!==e.proposalId&&(t.proposalId=BigInt(e.proposalId.toString())),t}},t.MsgWithdrawProposal={typeUrl:"/cosmos.group.v1.MsgWithdrawProposal",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return e.proposalId!==BigInt(0)&&t.uint32(8).uint64(e.proposalId),""!==e.address&&t.uint32(18).string(e.address),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=T();for(;r.pos>>3){case 1:i.proposalId=r.uint64();break;case 2:i.address=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=T();return(0,s.isSet)(e.proposalId)&&(t.proposalId=BigInt(e.proposalId.toString())),(0,s.isSet)(e.address)&&(t.address=String(e.address)),t},toJSON(e){let t={};return void 0!==e.proposalId&&(t.proposalId=(e.proposalId||BigInt(0)).toString()),void 0!==e.address&&(t.address=e.address),t},fromPartial(e){var t;let r=T();return void 0!==e.proposalId&&null!==e.proposalId&&(r.proposalId=BigInt(e.proposalId.toString())),r.address=null!==(t=e.address)&&void 0!==t?t:"",r}},t.MsgWithdrawProposalResponse={typeUrl:"/cosmos.group.v1.MsgWithdrawProposalResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=N();for(;r.posN(),toJSON:e=>({}),fromPartial:e=>N()},t.MsgVote={typeUrl:"/cosmos.group.v1.MsgVote",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return e.proposalId!==BigInt(0)&&t.uint32(8).uint64(e.proposalId),""!==e.voter&&t.uint32(18).string(e.voter),0!==e.option&&t.uint32(24).int32(e.option),""!==e.metadata&&t.uint32(34).string(e.metadata),0!==e.exec&&t.uint32(40).int32(e.exec),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=x();for(;r.pos>>3){case 1:i.proposalId=r.uint64();break;case 2:i.voter=r.string();break;case 3:i.option=r.int32();break;case 4:i.metadata=r.string();break;case 5:i.exec=r.int32();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=x();return(0,s.isSet)(e.proposalId)&&(t.proposalId=BigInt(e.proposalId.toString())),(0,s.isSet)(e.voter)&&(t.voter=String(e.voter)),(0,s.isSet)(e.option)&&(t.option=(0,i.voteOptionFromJSON)(e.option)),(0,s.isSet)(e.metadata)&&(t.metadata=String(e.metadata)),(0,s.isSet)(e.exec)&&(t.exec=l(e.exec)),t},toJSON(e){let t={};return void 0!==e.proposalId&&(t.proposalId=(e.proposalId||BigInt(0)).toString()),void 0!==e.voter&&(t.voter=e.voter),void 0!==e.option&&(t.option=(0,i.voteOptionToJSON)(e.option)),void 0!==e.metadata&&(t.metadata=e.metadata),void 0!==e.exec&&(t.exec=u(e.exec)),t},fromPartial(e){var t,r,n,i;let o=x();return void 0!==e.proposalId&&null!==e.proposalId&&(o.proposalId=BigInt(e.proposalId.toString())),o.voter=null!==(t=e.voter)&&void 0!==t?t:"",o.option=null!==(r=e.option)&&void 0!==r?r:0,o.metadata=null!==(n=e.metadata)&&void 0!==n?n:"",o.exec=null!==(i=e.exec)&&void 0!==i?i:0,o}},t.MsgVoteResponse={typeUrl:"/cosmos.group.v1.MsgVoteResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=B();for(;r.posB(),toJSON:e=>({}),fromPartial:e=>B()},t.MsgExec={typeUrl:"/cosmos.group.v1.MsgExec",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return e.proposalId!==BigInt(0)&&t.uint32(8).uint64(e.proposalId),""!==e.executor&&t.uint32(18).string(e.executor),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=C();for(;r.pos>>3){case 1:i.proposalId=r.uint64();break;case 2:i.executor=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=C();return(0,s.isSet)(e.proposalId)&&(t.proposalId=BigInt(e.proposalId.toString())),(0,s.isSet)(e.executor)&&(t.executor=String(e.executor)),t},toJSON(e){let t={};return void 0!==e.proposalId&&(t.proposalId=(e.proposalId||BigInt(0)).toString()),void 0!==e.executor&&(t.executor=e.executor),t},fromPartial(e){var t;let r=C();return void 0!==e.proposalId&&null!==e.proposalId&&(r.proposalId=BigInt(e.proposalId.toString())),r.executor=null!==(t=e.executor)&&void 0!==t?t:"",r}},t.MsgExecResponse={typeUrl:"/cosmos.group.v1.MsgExecResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return 0!==e.result&&t.uint32(16).int32(e.result),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=M();for(;r.pos>>3==2?i.result=r.int32():r.skipType(7&e)}return i},fromJSON(e){let t=M();return(0,s.isSet)(e.result)&&(t.result=(0,i.proposalExecutorResultFromJSON)(e.result)),t},toJSON(e){let t={};return void 0!==e.result&&(t.result=(0,i.proposalExecutorResultToJSON)(e.result)),t},fromPartial(e){var t;let r=M();return r.result=null!==(t=e.result)&&void 0!==t?t:0,r}},t.MsgLeaveGroup={typeUrl:"/cosmos.group.v1.MsgLeaveGroup",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.address&&t.uint32(10).string(e.address),e.groupId!==BigInt(0)&&t.uint32(16).uint64(e.groupId),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=D();for(;r.pos>>3){case 1:i.address=r.string();break;case 2:i.groupId=r.uint64();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=D();return(0,s.isSet)(e.address)&&(t.address=String(e.address)),(0,s.isSet)(e.groupId)&&(t.groupId=BigInt(e.groupId.toString())),t},toJSON(e){let t={};return void 0!==e.address&&(t.address=e.address),void 0!==e.groupId&&(t.groupId=(e.groupId||BigInt(0)).toString()),t},fromPartial(e){var t;let r=D();return r.address=null!==(t=e.address)&&void 0!==t?t:"",void 0!==e.groupId&&null!==e.groupId&&(r.groupId=BigInt(e.groupId.toString())),r}},t.MsgLeaveGroupResponse={typeUrl:"/cosmos.group.v1.MsgLeaveGroupResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=U();for(;r.posU(),toJSON:e=>({}),fromPartial:e=>U()};class J{CreateGroup(e){let r=t.MsgCreateGroup.encode(e).finish();return this.rpc.request("cosmos.group.v1.Msg","CreateGroup",r).then(e=>t.MsgCreateGroupResponse.decode(new a.BinaryReader(e)))}UpdateGroupMembers(e){let r=t.MsgUpdateGroupMembers.encode(e).finish();return this.rpc.request("cosmos.group.v1.Msg","UpdateGroupMembers",r).then(e=>t.MsgUpdateGroupMembersResponse.decode(new a.BinaryReader(e)))}UpdateGroupAdmin(e){let r=t.MsgUpdateGroupAdmin.encode(e).finish();return this.rpc.request("cosmos.group.v1.Msg","UpdateGroupAdmin",r).then(e=>t.MsgUpdateGroupAdminResponse.decode(new a.BinaryReader(e)))}UpdateGroupMetadata(e){let r=t.MsgUpdateGroupMetadata.encode(e).finish();return this.rpc.request("cosmos.group.v1.Msg","UpdateGroupMetadata",r).then(e=>t.MsgUpdateGroupMetadataResponse.decode(new a.BinaryReader(e)))}CreateGroupPolicy(e){let r=t.MsgCreateGroupPolicy.encode(e).finish();return this.rpc.request("cosmos.group.v1.Msg","CreateGroupPolicy",r).then(e=>t.MsgCreateGroupPolicyResponse.decode(new a.BinaryReader(e)))}CreateGroupWithPolicy(e){let r=t.MsgCreateGroupWithPolicy.encode(e).finish();return this.rpc.request("cosmos.group.v1.Msg","CreateGroupWithPolicy",r).then(e=>t.MsgCreateGroupWithPolicyResponse.decode(new a.BinaryReader(e)))}UpdateGroupPolicyAdmin(e){let r=t.MsgUpdateGroupPolicyAdmin.encode(e).finish();return this.rpc.request("cosmos.group.v1.Msg","UpdateGroupPolicyAdmin",r).then(e=>t.MsgUpdateGroupPolicyAdminResponse.decode(new a.BinaryReader(e)))}UpdateGroupPolicyDecisionPolicy(e){let r=t.MsgUpdateGroupPolicyDecisionPolicy.encode(e).finish();return this.rpc.request("cosmos.group.v1.Msg","UpdateGroupPolicyDecisionPolicy",r).then(e=>t.MsgUpdateGroupPolicyDecisionPolicyResponse.decode(new a.BinaryReader(e)))}UpdateGroupPolicyMetadata(e){let r=t.MsgUpdateGroupPolicyMetadata.encode(e).finish();return this.rpc.request("cosmos.group.v1.Msg","UpdateGroupPolicyMetadata",r).then(e=>t.MsgUpdateGroupPolicyMetadataResponse.decode(new a.BinaryReader(e)))}SubmitProposal(e){let r=t.MsgSubmitProposal.encode(e).finish();return this.rpc.request("cosmos.group.v1.Msg","SubmitProposal",r).then(e=>t.MsgSubmitProposalResponse.decode(new a.BinaryReader(e)))}WithdrawProposal(e){let r=t.MsgWithdrawProposal.encode(e).finish();return this.rpc.request("cosmos.group.v1.Msg","WithdrawProposal",r).then(e=>t.MsgWithdrawProposalResponse.decode(new a.BinaryReader(e)))}Vote(e){let r=t.MsgVote.encode(e).finish();return this.rpc.request("cosmos.group.v1.Msg","Vote",r).then(e=>t.MsgVoteResponse.decode(new a.BinaryReader(e)))}Exec(e){let r=t.MsgExec.encode(e).finish();return this.rpc.request("cosmos.group.v1.Msg","Exec",r).then(e=>t.MsgExecResponse.decode(new a.BinaryReader(e)))}LeaveGroup(e){let r=t.MsgLeaveGroup.encode(e).finish();return this.rpc.request("cosmos.group.v1.Msg","LeaveGroup",r).then(e=>t.MsgLeaveGroupResponse.decode(new a.BinaryReader(e)))}constructor(e){this.rpc=e,this.CreateGroup=this.CreateGroup.bind(this),this.UpdateGroupMembers=this.UpdateGroupMembers.bind(this),this.UpdateGroupAdmin=this.UpdateGroupAdmin.bind(this),this.UpdateGroupMetadata=this.UpdateGroupMetadata.bind(this),this.CreateGroupPolicy=this.CreateGroupPolicy.bind(this),this.CreateGroupWithPolicy=this.CreateGroupWithPolicy.bind(this),this.UpdateGroupPolicyAdmin=this.UpdateGroupPolicyAdmin.bind(this),this.UpdateGroupPolicyDecisionPolicy=this.UpdateGroupPolicyDecisionPolicy.bind(this),this.UpdateGroupPolicyMetadata=this.UpdateGroupPolicyMetadata.bind(this),this.SubmitProposal=this.SubmitProposal.bind(this),this.WithdrawProposal=this.WithdrawProposal.bind(this),this.Vote=this.Vote.bind(this),this.Exec=this.Exec.bind(this),this.LeaveGroup=this.LeaveGroup.bind(this)}}t.MsgClientImpl=J},1264:function(e,t,r){"use strict";var n,i,o;Object.defineProperty(t,"__esModule",{value:!0}),t.Vote=t.TallyResult=t.Proposal=t.GroupPolicyInfo=t.GroupMember=t.GroupInfo=t.DecisionPolicyWindows=t.PercentageDecisionPolicy=t.ThresholdDecisionPolicy=t.MemberRequest=t.Member=t.proposalExecutorResultToJSON=t.proposalExecutorResultFromJSON=t.ProposalExecutorResult=t.proposalStatusToJSON=t.proposalStatusFromJSON=t.ProposalStatus=t.voteOptionToJSON=t.voteOptionFromJSON=t.VoteOption=t.protobufPackage=void 0;let a=r(9990),s=r(84849),l=r(11879),u=r(46554),d=r(99133);function c(e){switch(e){case 0:case"VOTE_OPTION_UNSPECIFIED":return n.VOTE_OPTION_UNSPECIFIED;case 1:case"VOTE_OPTION_YES":return n.VOTE_OPTION_YES;case 2:case"VOTE_OPTION_ABSTAIN":return n.VOTE_OPTION_ABSTAIN;case 3:case"VOTE_OPTION_NO":return n.VOTE_OPTION_NO;case 4:case"VOTE_OPTION_NO_WITH_VETO":return n.VOTE_OPTION_NO_WITH_VETO;default:return n.UNRECOGNIZED}}function p(e){switch(e){case n.VOTE_OPTION_UNSPECIFIED:return"VOTE_OPTION_UNSPECIFIED";case n.VOTE_OPTION_YES:return"VOTE_OPTION_YES";case n.VOTE_OPTION_ABSTAIN:return"VOTE_OPTION_ABSTAIN";case n.VOTE_OPTION_NO:return"VOTE_OPTION_NO";case n.VOTE_OPTION_NO_WITH_VETO:return"VOTE_OPTION_NO_WITH_VETO";case n.UNRECOGNIZED:default:return"UNRECOGNIZED"}}function f(e){switch(e){case 0:case"PROPOSAL_STATUS_UNSPECIFIED":return i.PROPOSAL_STATUS_UNSPECIFIED;case 1:case"PROPOSAL_STATUS_SUBMITTED":return i.PROPOSAL_STATUS_SUBMITTED;case 2:case"PROPOSAL_STATUS_ACCEPTED":return i.PROPOSAL_STATUS_ACCEPTED;case 3:case"PROPOSAL_STATUS_REJECTED":return i.PROPOSAL_STATUS_REJECTED;case 4:case"PROPOSAL_STATUS_ABORTED":return i.PROPOSAL_STATUS_ABORTED;case 5:case"PROPOSAL_STATUS_WITHDRAWN":return i.PROPOSAL_STATUS_WITHDRAWN;default:return i.UNRECOGNIZED}}function h(e){switch(e){case i.PROPOSAL_STATUS_UNSPECIFIED:return"PROPOSAL_STATUS_UNSPECIFIED";case i.PROPOSAL_STATUS_SUBMITTED:return"PROPOSAL_STATUS_SUBMITTED";case i.PROPOSAL_STATUS_ACCEPTED:return"PROPOSAL_STATUS_ACCEPTED";case i.PROPOSAL_STATUS_REJECTED:return"PROPOSAL_STATUS_REJECTED";case i.PROPOSAL_STATUS_ABORTED:return"PROPOSAL_STATUS_ABORTED";case i.PROPOSAL_STATUS_WITHDRAWN:return"PROPOSAL_STATUS_WITHDRAWN";case i.UNRECOGNIZED:default:return"UNRECOGNIZED"}}function g(e){switch(e){case 0:case"PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED":return o.PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED;case 1:case"PROPOSAL_EXECUTOR_RESULT_NOT_RUN":return o.PROPOSAL_EXECUTOR_RESULT_NOT_RUN;case 2:case"PROPOSAL_EXECUTOR_RESULT_SUCCESS":return o.PROPOSAL_EXECUTOR_RESULT_SUCCESS;case 3:case"PROPOSAL_EXECUTOR_RESULT_FAILURE":return o.PROPOSAL_EXECUTOR_RESULT_FAILURE;default:return o.UNRECOGNIZED}}function m(e){switch(e){case o.PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED:return"PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED";case o.PROPOSAL_EXECUTOR_RESULT_NOT_RUN:return"PROPOSAL_EXECUTOR_RESULT_NOT_RUN";case o.PROPOSAL_EXECUTOR_RESULT_SUCCESS:return"PROPOSAL_EXECUTOR_RESULT_SUCCESS";case o.PROPOSAL_EXECUTOR_RESULT_FAILURE:return"PROPOSAL_EXECUTOR_RESULT_FAILURE";case o.UNRECOGNIZED:default:return"UNRECOGNIZED"}}function y(){return{address:"",weight:"",metadata:"",addedAt:a.Timestamp.fromPartial({})}}function v(){return{address:"",weight:"",metadata:""}}function b(){return{threshold:"",windows:void 0}}function S(){return{percentage:"",windows:void 0}}function w(){return{votingPeriod:s.Duration.fromPartial({}),minExecutionPeriod:s.Duration.fromPartial({})}}function _(){return{id:BigInt(0),admin:"",metadata:"",version:BigInt(0),totalWeight:"",createdAt:a.Timestamp.fromPartial({})}}function k(){return{groupId:BigInt(0),member:void 0}}function O(){return{address:"",groupId:BigInt(0),admin:"",metadata:"",version:BigInt(0),decisionPolicy:void 0,createdAt:a.Timestamp.fromPartial({})}}function P(){return{id:BigInt(0),groupPolicyAddress:"",metadata:"",proposers:[],submitTime:a.Timestamp.fromPartial({}),groupVersion:BigInt(0),groupPolicyVersion:BigInt(0),status:0,finalTallyResult:t.TallyResult.fromPartial({}),votingPeriodEnd:a.Timestamp.fromPartial({}),executorResult:0,messages:[],title:"",summary:""}}function A(){return{yesCount:"",abstainCount:"",noCount:"",noWithVetoCount:""}}function I(){return{proposalId:BigInt(0),voter:"",option:0,metadata:"",submitTime:a.Timestamp.fromPartial({})}}t.protobufPackage="cosmos.group.v1",function(e){e[e.VOTE_OPTION_UNSPECIFIED=0]="VOTE_OPTION_UNSPECIFIED",e[e.VOTE_OPTION_YES=1]="VOTE_OPTION_YES",e[e.VOTE_OPTION_ABSTAIN=2]="VOTE_OPTION_ABSTAIN",e[e.VOTE_OPTION_NO=3]="VOTE_OPTION_NO",e[e.VOTE_OPTION_NO_WITH_VETO=4]="VOTE_OPTION_NO_WITH_VETO",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(n||(t.VoteOption=n={})),t.voteOptionFromJSON=c,t.voteOptionToJSON=p,function(e){e[e.PROPOSAL_STATUS_UNSPECIFIED=0]="PROPOSAL_STATUS_UNSPECIFIED",e[e.PROPOSAL_STATUS_SUBMITTED=1]="PROPOSAL_STATUS_SUBMITTED",e[e.PROPOSAL_STATUS_ACCEPTED=2]="PROPOSAL_STATUS_ACCEPTED",e[e.PROPOSAL_STATUS_REJECTED=3]="PROPOSAL_STATUS_REJECTED",e[e.PROPOSAL_STATUS_ABORTED=4]="PROPOSAL_STATUS_ABORTED",e[e.PROPOSAL_STATUS_WITHDRAWN=5]="PROPOSAL_STATUS_WITHDRAWN",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(i||(t.ProposalStatus=i={})),t.proposalStatusFromJSON=f,t.proposalStatusToJSON=h,function(e){e[e.PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED=0]="PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED",e[e.PROPOSAL_EXECUTOR_RESULT_NOT_RUN=1]="PROPOSAL_EXECUTOR_RESULT_NOT_RUN",e[e.PROPOSAL_EXECUTOR_RESULT_SUCCESS=2]="PROPOSAL_EXECUTOR_RESULT_SUCCESS",e[e.PROPOSAL_EXECUTOR_RESULT_FAILURE=3]="PROPOSAL_EXECUTOR_RESULT_FAILURE",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(o||(t.ProposalExecutorResult=o={})),t.proposalExecutorResultFromJSON=g,t.proposalExecutorResultToJSON=m,t.Member={typeUrl:"/cosmos.group.v1.Member",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.BinaryWriter.create();return""!==e.address&&t.uint32(10).string(e.address),""!==e.weight&&t.uint32(18).string(e.weight),""!==e.metadata&&t.uint32(26).string(e.metadata),void 0!==e.addedAt&&a.Timestamp.encode(e.addedAt,t.uint32(34).fork()).ldelim(),t},decode(e,t){let r=e instanceof u.BinaryReader?e:new u.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=y();for(;r.pos>>3){case 1:i.address=r.string();break;case 2:i.weight=r.string();break;case 3:i.metadata=r.string();break;case 4:i.addedAt=a.Timestamp.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=y();return(0,d.isSet)(e.address)&&(t.address=String(e.address)),(0,d.isSet)(e.weight)&&(t.weight=String(e.weight)),(0,d.isSet)(e.metadata)&&(t.metadata=String(e.metadata)),(0,d.isSet)(e.addedAt)&&(t.addedAt=(0,d.fromJsonTimestamp)(e.addedAt)),t},toJSON(e){let t={};return void 0!==e.address&&(t.address=e.address),void 0!==e.weight&&(t.weight=e.weight),void 0!==e.metadata&&(t.metadata=e.metadata),void 0!==e.addedAt&&(t.addedAt=(0,d.fromTimestamp)(e.addedAt).toISOString()),t},fromPartial(e){var t,r,n;let i=y();return i.address=null!==(t=e.address)&&void 0!==t?t:"",i.weight=null!==(r=e.weight)&&void 0!==r?r:"",i.metadata=null!==(n=e.metadata)&&void 0!==n?n:"",void 0!==e.addedAt&&null!==e.addedAt&&(i.addedAt=a.Timestamp.fromPartial(e.addedAt)),i}},t.MemberRequest={typeUrl:"/cosmos.group.v1.MemberRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.BinaryWriter.create();return""!==e.address&&t.uint32(10).string(e.address),""!==e.weight&&t.uint32(18).string(e.weight),""!==e.metadata&&t.uint32(26).string(e.metadata),t},decode(e,t){let r=e instanceof u.BinaryReader?e:new u.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=v();for(;r.pos>>3){case 1:i.address=r.string();break;case 2:i.weight=r.string();break;case 3:i.metadata=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=v();return(0,d.isSet)(e.address)&&(t.address=String(e.address)),(0,d.isSet)(e.weight)&&(t.weight=String(e.weight)),(0,d.isSet)(e.metadata)&&(t.metadata=String(e.metadata)),t},toJSON(e){let t={};return void 0!==e.address&&(t.address=e.address),void 0!==e.weight&&(t.weight=e.weight),void 0!==e.metadata&&(t.metadata=e.metadata),t},fromPartial(e){var t,r,n;let i=v();return i.address=null!==(t=e.address)&&void 0!==t?t:"",i.weight=null!==(r=e.weight)&&void 0!==r?r:"",i.metadata=null!==(n=e.metadata)&&void 0!==n?n:"",i}},t.ThresholdDecisionPolicy={typeUrl:"/cosmos.group.v1.ThresholdDecisionPolicy",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.BinaryWriter.create();return""!==e.threshold&&r.uint32(10).string(e.threshold),void 0!==e.windows&&t.DecisionPolicyWindows.encode(e.windows,r.uint32(18).fork()).ldelim(),r},decode(e,r){let n=e instanceof u.BinaryReader?e:new u.BinaryReader(e),i=void 0===r?n.len:n.pos+r,o=b();for(;n.pos>>3){case 1:o.threshold=n.string();break;case 2:o.windows=t.DecisionPolicyWindows.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){let r=b();return(0,d.isSet)(e.threshold)&&(r.threshold=String(e.threshold)),(0,d.isSet)(e.windows)&&(r.windows=t.DecisionPolicyWindows.fromJSON(e.windows)),r},toJSON(e){let r={};return void 0!==e.threshold&&(r.threshold=e.threshold),void 0!==e.windows&&(r.windows=e.windows?t.DecisionPolicyWindows.toJSON(e.windows):void 0),r},fromPartial(e){var r;let n=b();return n.threshold=null!==(r=e.threshold)&&void 0!==r?r:"",void 0!==e.windows&&null!==e.windows&&(n.windows=t.DecisionPolicyWindows.fromPartial(e.windows)),n}},t.PercentageDecisionPolicy={typeUrl:"/cosmos.group.v1.PercentageDecisionPolicy",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.BinaryWriter.create();return""!==e.percentage&&r.uint32(10).string(e.percentage),void 0!==e.windows&&t.DecisionPolicyWindows.encode(e.windows,r.uint32(18).fork()).ldelim(),r},decode(e,r){let n=e instanceof u.BinaryReader?e:new u.BinaryReader(e),i=void 0===r?n.len:n.pos+r,o=S();for(;n.pos>>3){case 1:o.percentage=n.string();break;case 2:o.windows=t.DecisionPolicyWindows.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){let r=S();return(0,d.isSet)(e.percentage)&&(r.percentage=String(e.percentage)),(0,d.isSet)(e.windows)&&(r.windows=t.DecisionPolicyWindows.fromJSON(e.windows)),r},toJSON(e){let r={};return void 0!==e.percentage&&(r.percentage=e.percentage),void 0!==e.windows&&(r.windows=e.windows?t.DecisionPolicyWindows.toJSON(e.windows):void 0),r},fromPartial(e){var r;let n=S();return n.percentage=null!==(r=e.percentage)&&void 0!==r?r:"",void 0!==e.windows&&null!==e.windows&&(n.windows=t.DecisionPolicyWindows.fromPartial(e.windows)),n}},t.DecisionPolicyWindows={typeUrl:"/cosmos.group.v1.DecisionPolicyWindows",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.BinaryWriter.create();return void 0!==e.votingPeriod&&s.Duration.encode(e.votingPeriod,t.uint32(10).fork()).ldelim(),void 0!==e.minExecutionPeriod&&s.Duration.encode(e.minExecutionPeriod,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof u.BinaryReader?e:new u.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=w();for(;r.pos>>3){case 1:i.votingPeriod=s.Duration.decode(r,r.uint32());break;case 2:i.minExecutionPeriod=s.Duration.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=w();return(0,d.isSet)(e.votingPeriod)&&(t.votingPeriod=s.Duration.fromJSON(e.votingPeriod)),(0,d.isSet)(e.minExecutionPeriod)&&(t.minExecutionPeriod=s.Duration.fromJSON(e.minExecutionPeriod)),t},toJSON(e){let t={};return void 0!==e.votingPeriod&&(t.votingPeriod=e.votingPeriod?s.Duration.toJSON(e.votingPeriod):void 0),void 0!==e.minExecutionPeriod&&(t.minExecutionPeriod=e.minExecutionPeriod?s.Duration.toJSON(e.minExecutionPeriod):void 0),t},fromPartial(e){let t=w();return void 0!==e.votingPeriod&&null!==e.votingPeriod&&(t.votingPeriod=s.Duration.fromPartial(e.votingPeriod)),void 0!==e.minExecutionPeriod&&null!==e.minExecutionPeriod&&(t.minExecutionPeriod=s.Duration.fromPartial(e.minExecutionPeriod)),t}},t.GroupInfo={typeUrl:"/cosmos.group.v1.GroupInfo",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.BinaryWriter.create();return e.id!==BigInt(0)&&t.uint32(8).uint64(e.id),""!==e.admin&&t.uint32(18).string(e.admin),""!==e.metadata&&t.uint32(26).string(e.metadata),e.version!==BigInt(0)&&t.uint32(32).uint64(e.version),""!==e.totalWeight&&t.uint32(42).string(e.totalWeight),void 0!==e.createdAt&&a.Timestamp.encode(e.createdAt,t.uint32(50).fork()).ldelim(),t},decode(e,t){let r=e instanceof u.BinaryReader?e:new u.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=_();for(;r.pos>>3){case 1:i.id=r.uint64();break;case 2:i.admin=r.string();break;case 3:i.metadata=r.string();break;case 4:i.version=r.uint64();break;case 5:i.totalWeight=r.string();break;case 6:i.createdAt=a.Timestamp.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=_();return(0,d.isSet)(e.id)&&(t.id=BigInt(e.id.toString())),(0,d.isSet)(e.admin)&&(t.admin=String(e.admin)),(0,d.isSet)(e.metadata)&&(t.metadata=String(e.metadata)),(0,d.isSet)(e.version)&&(t.version=BigInt(e.version.toString())),(0,d.isSet)(e.totalWeight)&&(t.totalWeight=String(e.totalWeight)),(0,d.isSet)(e.createdAt)&&(t.createdAt=(0,d.fromJsonTimestamp)(e.createdAt)),t},toJSON(e){let t={};return void 0!==e.id&&(t.id=(e.id||BigInt(0)).toString()),void 0!==e.admin&&(t.admin=e.admin),void 0!==e.metadata&&(t.metadata=e.metadata),void 0!==e.version&&(t.version=(e.version||BigInt(0)).toString()),void 0!==e.totalWeight&&(t.totalWeight=e.totalWeight),void 0!==e.createdAt&&(t.createdAt=(0,d.fromTimestamp)(e.createdAt).toISOString()),t},fromPartial(e){var t,r,n;let i=_();return void 0!==e.id&&null!==e.id&&(i.id=BigInt(e.id.toString())),i.admin=null!==(t=e.admin)&&void 0!==t?t:"",i.metadata=null!==(r=e.metadata)&&void 0!==r?r:"",void 0!==e.version&&null!==e.version&&(i.version=BigInt(e.version.toString())),i.totalWeight=null!==(n=e.totalWeight)&&void 0!==n?n:"",void 0!==e.createdAt&&null!==e.createdAt&&(i.createdAt=a.Timestamp.fromPartial(e.createdAt)),i}},t.GroupMember={typeUrl:"/cosmos.group.v1.GroupMember",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.BinaryWriter.create();return e.groupId!==BigInt(0)&&r.uint32(8).uint64(e.groupId),void 0!==e.member&&t.Member.encode(e.member,r.uint32(18).fork()).ldelim(),r},decode(e,r){let n=e instanceof u.BinaryReader?e:new u.BinaryReader(e),i=void 0===r?n.len:n.pos+r,o=k();for(;n.pos>>3){case 1:o.groupId=n.uint64();break;case 2:o.member=t.Member.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){let r=k();return(0,d.isSet)(e.groupId)&&(r.groupId=BigInt(e.groupId.toString())),(0,d.isSet)(e.member)&&(r.member=t.Member.fromJSON(e.member)),r},toJSON(e){let r={};return void 0!==e.groupId&&(r.groupId=(e.groupId||BigInt(0)).toString()),void 0!==e.member&&(r.member=e.member?t.Member.toJSON(e.member):void 0),r},fromPartial(e){let r=k();return void 0!==e.groupId&&null!==e.groupId&&(r.groupId=BigInt(e.groupId.toString())),void 0!==e.member&&null!==e.member&&(r.member=t.Member.fromPartial(e.member)),r}},t.GroupPolicyInfo={typeUrl:"/cosmos.group.v1.GroupPolicyInfo",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.BinaryWriter.create();return""!==e.address&&t.uint32(10).string(e.address),e.groupId!==BigInt(0)&&t.uint32(16).uint64(e.groupId),""!==e.admin&&t.uint32(26).string(e.admin),""!==e.metadata&&t.uint32(34).string(e.metadata),e.version!==BigInt(0)&&t.uint32(40).uint64(e.version),void 0!==e.decisionPolicy&&l.Any.encode(e.decisionPolicy,t.uint32(50).fork()).ldelim(),void 0!==e.createdAt&&a.Timestamp.encode(e.createdAt,t.uint32(58).fork()).ldelim(),t},decode(e,t){let r=e instanceof u.BinaryReader?e:new u.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=O();for(;r.pos>>3){case 1:i.address=r.string();break;case 2:i.groupId=r.uint64();break;case 3:i.admin=r.string();break;case 4:i.metadata=r.string();break;case 5:i.version=r.uint64();break;case 6:i.decisionPolicy=l.Any.decode(r,r.uint32());break;case 7:i.createdAt=a.Timestamp.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=O();return(0,d.isSet)(e.address)&&(t.address=String(e.address)),(0,d.isSet)(e.groupId)&&(t.groupId=BigInt(e.groupId.toString())),(0,d.isSet)(e.admin)&&(t.admin=String(e.admin)),(0,d.isSet)(e.metadata)&&(t.metadata=String(e.metadata)),(0,d.isSet)(e.version)&&(t.version=BigInt(e.version.toString())),(0,d.isSet)(e.decisionPolicy)&&(t.decisionPolicy=l.Any.fromJSON(e.decisionPolicy)),(0,d.isSet)(e.createdAt)&&(t.createdAt=(0,d.fromJsonTimestamp)(e.createdAt)),t},toJSON(e){let t={};return void 0!==e.address&&(t.address=e.address),void 0!==e.groupId&&(t.groupId=(e.groupId||BigInt(0)).toString()),void 0!==e.admin&&(t.admin=e.admin),void 0!==e.metadata&&(t.metadata=e.metadata),void 0!==e.version&&(t.version=(e.version||BigInt(0)).toString()),void 0!==e.decisionPolicy&&(t.decisionPolicy=e.decisionPolicy?l.Any.toJSON(e.decisionPolicy):void 0),void 0!==e.createdAt&&(t.createdAt=(0,d.fromTimestamp)(e.createdAt).toISOString()),t},fromPartial(e){var t,r,n;let i=O();return i.address=null!==(t=e.address)&&void 0!==t?t:"",void 0!==e.groupId&&null!==e.groupId&&(i.groupId=BigInt(e.groupId.toString())),i.admin=null!==(r=e.admin)&&void 0!==r?r:"",i.metadata=null!==(n=e.metadata)&&void 0!==n?n:"",void 0!==e.version&&null!==e.version&&(i.version=BigInt(e.version.toString())),void 0!==e.decisionPolicy&&null!==e.decisionPolicy&&(i.decisionPolicy=l.Any.fromPartial(e.decisionPolicy)),void 0!==e.createdAt&&null!==e.createdAt&&(i.createdAt=a.Timestamp.fromPartial(e.createdAt)),i}},t.Proposal={typeUrl:"/cosmos.group.v1.Proposal",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.BinaryWriter.create();for(let t of(e.id!==BigInt(0)&&r.uint32(8).uint64(e.id),""!==e.groupPolicyAddress&&r.uint32(18).string(e.groupPolicyAddress),""!==e.metadata&&r.uint32(26).string(e.metadata),e.proposers))r.uint32(34).string(t);for(let n of(void 0!==e.submitTime&&a.Timestamp.encode(e.submitTime,r.uint32(42).fork()).ldelim(),e.groupVersion!==BigInt(0)&&r.uint32(48).uint64(e.groupVersion),e.groupPolicyVersion!==BigInt(0)&&r.uint32(56).uint64(e.groupPolicyVersion),0!==e.status&&r.uint32(64).int32(e.status),void 0!==e.finalTallyResult&&t.TallyResult.encode(e.finalTallyResult,r.uint32(74).fork()).ldelim(),void 0!==e.votingPeriodEnd&&a.Timestamp.encode(e.votingPeriodEnd,r.uint32(82).fork()).ldelim(),0!==e.executorResult&&r.uint32(88).int32(e.executorResult),e.messages))l.Any.encode(n,r.uint32(98).fork()).ldelim();return""!==e.title&&r.uint32(106).string(e.title),""!==e.summary&&r.uint32(114).string(e.summary),r},decode(e,r){let n=e instanceof u.BinaryReader?e:new u.BinaryReader(e),i=void 0===r?n.len:n.pos+r,o=P();for(;n.pos>>3){case 1:o.id=n.uint64();break;case 2:o.groupPolicyAddress=n.string();break;case 3:o.metadata=n.string();break;case 4:o.proposers.push(n.string());break;case 5:o.submitTime=a.Timestamp.decode(n,n.uint32());break;case 6:o.groupVersion=n.uint64();break;case 7:o.groupPolicyVersion=n.uint64();break;case 8:o.status=n.int32();break;case 9:o.finalTallyResult=t.TallyResult.decode(n,n.uint32());break;case 10:o.votingPeriodEnd=a.Timestamp.decode(n,n.uint32());break;case 11:o.executorResult=n.int32();break;case 12:o.messages.push(l.Any.decode(n,n.uint32()));break;case 13:o.title=n.string();break;case 14:o.summary=n.string();break;default:n.skipType(7&e)}}return o},fromJSON(e){let r=P();return(0,d.isSet)(e.id)&&(r.id=BigInt(e.id.toString())),(0,d.isSet)(e.groupPolicyAddress)&&(r.groupPolicyAddress=String(e.groupPolicyAddress)),(0,d.isSet)(e.metadata)&&(r.metadata=String(e.metadata)),Array.isArray(null==e?void 0:e.proposers)&&(r.proposers=e.proposers.map(e=>String(e))),(0,d.isSet)(e.submitTime)&&(r.submitTime=(0,d.fromJsonTimestamp)(e.submitTime)),(0,d.isSet)(e.groupVersion)&&(r.groupVersion=BigInt(e.groupVersion.toString())),(0,d.isSet)(e.groupPolicyVersion)&&(r.groupPolicyVersion=BigInt(e.groupPolicyVersion.toString())),(0,d.isSet)(e.status)&&(r.status=f(e.status)),(0,d.isSet)(e.finalTallyResult)&&(r.finalTallyResult=t.TallyResult.fromJSON(e.finalTallyResult)),(0,d.isSet)(e.votingPeriodEnd)&&(r.votingPeriodEnd=(0,d.fromJsonTimestamp)(e.votingPeriodEnd)),(0,d.isSet)(e.executorResult)&&(r.executorResult=g(e.executorResult)),Array.isArray(null==e?void 0:e.messages)&&(r.messages=e.messages.map(e=>l.Any.fromJSON(e))),(0,d.isSet)(e.title)&&(r.title=String(e.title)),(0,d.isSet)(e.summary)&&(r.summary=String(e.summary)),r},toJSON(e){let r={};return void 0!==e.id&&(r.id=(e.id||BigInt(0)).toString()),void 0!==e.groupPolicyAddress&&(r.groupPolicyAddress=e.groupPolicyAddress),void 0!==e.metadata&&(r.metadata=e.metadata),e.proposers?r.proposers=e.proposers.map(e=>e):r.proposers=[],void 0!==e.submitTime&&(r.submitTime=(0,d.fromTimestamp)(e.submitTime).toISOString()),void 0!==e.groupVersion&&(r.groupVersion=(e.groupVersion||BigInt(0)).toString()),void 0!==e.groupPolicyVersion&&(r.groupPolicyVersion=(e.groupPolicyVersion||BigInt(0)).toString()),void 0!==e.status&&(r.status=h(e.status)),void 0!==e.finalTallyResult&&(r.finalTallyResult=e.finalTallyResult?t.TallyResult.toJSON(e.finalTallyResult):void 0),void 0!==e.votingPeriodEnd&&(r.votingPeriodEnd=(0,d.fromTimestamp)(e.votingPeriodEnd).toISOString()),void 0!==e.executorResult&&(r.executorResult=m(e.executorResult)),e.messages?r.messages=e.messages.map(e=>e?l.Any.toJSON(e):void 0):r.messages=[],void 0!==e.title&&(r.title=e.title),void 0!==e.summary&&(r.summary=e.summary),r},fromPartial(e){var r,n,i,o,s,u,d,c;let p=P();return void 0!==e.id&&null!==e.id&&(p.id=BigInt(e.id.toString())),p.groupPolicyAddress=null!==(i=e.groupPolicyAddress)&&void 0!==i?i:"",p.metadata=null!==(o=e.metadata)&&void 0!==o?o:"",p.proposers=(null===(r=e.proposers)||void 0===r?void 0:r.map(e=>e))||[],void 0!==e.submitTime&&null!==e.submitTime&&(p.submitTime=a.Timestamp.fromPartial(e.submitTime)),void 0!==e.groupVersion&&null!==e.groupVersion&&(p.groupVersion=BigInt(e.groupVersion.toString())),void 0!==e.groupPolicyVersion&&null!==e.groupPolicyVersion&&(p.groupPolicyVersion=BigInt(e.groupPolicyVersion.toString())),p.status=null!==(s=e.status)&&void 0!==s?s:0,void 0!==e.finalTallyResult&&null!==e.finalTallyResult&&(p.finalTallyResult=t.TallyResult.fromPartial(e.finalTallyResult)),void 0!==e.votingPeriodEnd&&null!==e.votingPeriodEnd&&(p.votingPeriodEnd=a.Timestamp.fromPartial(e.votingPeriodEnd)),p.executorResult=null!==(u=e.executorResult)&&void 0!==u?u:0,p.messages=(null===(n=e.messages)||void 0===n?void 0:n.map(e=>l.Any.fromPartial(e)))||[],p.title=null!==(d=e.title)&&void 0!==d?d:"",p.summary=null!==(c=e.summary)&&void 0!==c?c:"",p}},t.TallyResult={typeUrl:"/cosmos.group.v1.TallyResult",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.BinaryWriter.create();return""!==e.yesCount&&t.uint32(10).string(e.yesCount),""!==e.abstainCount&&t.uint32(18).string(e.abstainCount),""!==e.noCount&&t.uint32(26).string(e.noCount),""!==e.noWithVetoCount&&t.uint32(34).string(e.noWithVetoCount),t},decode(e,t){let r=e instanceof u.BinaryReader?e:new u.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=A();for(;r.pos>>3){case 1:i.yesCount=r.string();break;case 2:i.abstainCount=r.string();break;case 3:i.noCount=r.string();break;case 4:i.noWithVetoCount=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=A();return(0,d.isSet)(e.yesCount)&&(t.yesCount=String(e.yesCount)),(0,d.isSet)(e.abstainCount)&&(t.abstainCount=String(e.abstainCount)),(0,d.isSet)(e.noCount)&&(t.noCount=String(e.noCount)),(0,d.isSet)(e.noWithVetoCount)&&(t.noWithVetoCount=String(e.noWithVetoCount)),t},toJSON(e){let t={};return void 0!==e.yesCount&&(t.yesCount=e.yesCount),void 0!==e.abstainCount&&(t.abstainCount=e.abstainCount),void 0!==e.noCount&&(t.noCount=e.noCount),void 0!==e.noWithVetoCount&&(t.noWithVetoCount=e.noWithVetoCount),t},fromPartial(e){var t,r,n,i;let o=A();return o.yesCount=null!==(t=e.yesCount)&&void 0!==t?t:"",o.abstainCount=null!==(r=e.abstainCount)&&void 0!==r?r:"",o.noCount=null!==(n=e.noCount)&&void 0!==n?n:"",o.noWithVetoCount=null!==(i=e.noWithVetoCount)&&void 0!==i?i:"",o}},t.Vote={typeUrl:"/cosmos.group.v1.Vote",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.BinaryWriter.create();return e.proposalId!==BigInt(0)&&t.uint32(8).uint64(e.proposalId),""!==e.voter&&t.uint32(18).string(e.voter),0!==e.option&&t.uint32(24).int32(e.option),""!==e.metadata&&t.uint32(34).string(e.metadata),void 0!==e.submitTime&&a.Timestamp.encode(e.submitTime,t.uint32(42).fork()).ldelim(),t},decode(e,t){let r=e instanceof u.BinaryReader?e:new u.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=I();for(;r.pos>>3){case 1:i.proposalId=r.uint64();break;case 2:i.voter=r.string();break;case 3:i.option=r.int32();break;case 4:i.metadata=r.string();break;case 5:i.submitTime=a.Timestamp.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=I();return(0,d.isSet)(e.proposalId)&&(t.proposalId=BigInt(e.proposalId.toString())),(0,d.isSet)(e.voter)&&(t.voter=String(e.voter)),(0,d.isSet)(e.option)&&(t.option=c(e.option)),(0,d.isSet)(e.metadata)&&(t.metadata=String(e.metadata)),(0,d.isSet)(e.submitTime)&&(t.submitTime=(0,d.fromJsonTimestamp)(e.submitTime)),t},toJSON(e){let t={};return void 0!==e.proposalId&&(t.proposalId=(e.proposalId||BigInt(0)).toString()),void 0!==e.voter&&(t.voter=e.voter),void 0!==e.option&&(t.option=p(e.option)),void 0!==e.metadata&&(t.metadata=e.metadata),void 0!==e.submitTime&&(t.submitTime=(0,d.fromTimestamp)(e.submitTime).toISOString()),t},fromPartial(e){var t,r,n;let i=I();return void 0!==e.proposalId&&null!==e.proposalId&&(i.proposalId=BigInt(e.proposalId.toString())),i.voter=null!==(t=e.voter)&&void 0!==t?t:"",i.option=null!==(r=e.option)&&void 0!==r?r:0,i.metadata=null!==(n=e.metadata)&&void 0!==n?n:"",void 0!==e.submitTime&&null!==e.submitTime&&(i.submitTime=a.Timestamp.fromPartial(e.submitTime)),i}}},88401:function(e,t,r){"use strict";var n,i;Object.defineProperty(t,"__esModule",{value:!0}),t.CompressedNonExistenceProof=t.CompressedExistenceProof=t.CompressedBatchEntry=t.CompressedBatchProof=t.BatchEntry=t.BatchProof=t.InnerSpec=t.ProofSpec=t.InnerOp=t.LeafOp=t.CommitmentProof=t.NonExistenceProof=t.ExistenceProof=t.lengthOpToJSON=t.lengthOpFromJSON=t.LengthOp=t.hashOpToJSON=t.hashOpFromJSON=t.HashOp=t.protobufPackage=void 0;let o=r(46554),a=r(99133);function s(e){switch(e){case 0:case"NO_HASH":return n.NO_HASH;case 1:case"SHA256":return n.SHA256;case 2:case"SHA512":return n.SHA512;case 3:case"KECCAK":return n.KECCAK;case 4:case"RIPEMD160":return n.RIPEMD160;case 5:case"BITCOIN":return n.BITCOIN;case 6:case"SHA512_256":return n.SHA512_256;default:return n.UNRECOGNIZED}}function l(e){switch(e){case n.NO_HASH:return"NO_HASH";case n.SHA256:return"SHA256";case n.SHA512:return"SHA512";case n.KECCAK:return"KECCAK";case n.RIPEMD160:return"RIPEMD160";case n.BITCOIN:return"BITCOIN";case n.SHA512_256:return"SHA512_256";case n.UNRECOGNIZED:default:return"UNRECOGNIZED"}}function u(e){switch(e){case 0:case"NO_PREFIX":return i.NO_PREFIX;case 1:case"VAR_PROTO":return i.VAR_PROTO;case 2:case"VAR_RLP":return i.VAR_RLP;case 3:case"FIXED32_BIG":return i.FIXED32_BIG;case 4:case"FIXED32_LITTLE":return i.FIXED32_LITTLE;case 5:case"FIXED64_BIG":return i.FIXED64_BIG;case 6:case"FIXED64_LITTLE":return i.FIXED64_LITTLE;case 7:case"REQUIRE_32_BYTES":return i.REQUIRE_32_BYTES;case 8:case"REQUIRE_64_BYTES":return i.REQUIRE_64_BYTES;default:return i.UNRECOGNIZED}}function d(e){switch(e){case i.NO_PREFIX:return"NO_PREFIX";case i.VAR_PROTO:return"VAR_PROTO";case i.VAR_RLP:return"VAR_RLP";case i.FIXED32_BIG:return"FIXED32_BIG";case i.FIXED32_LITTLE:return"FIXED32_LITTLE";case i.FIXED64_BIG:return"FIXED64_BIG";case i.FIXED64_LITTLE:return"FIXED64_LITTLE";case i.REQUIRE_32_BYTES:return"REQUIRE_32_BYTES";case i.REQUIRE_64_BYTES:return"REQUIRE_64_BYTES";case i.UNRECOGNIZED:default:return"UNRECOGNIZED"}}function c(){return{key:new Uint8Array,value:new Uint8Array,leaf:void 0,path:[]}}function p(){return{key:new Uint8Array,left:void 0,right:void 0}}function f(){return{exist:void 0,nonexist:void 0,batch:void 0,compressed:void 0}}function h(){return{hash:0,prehashKey:0,prehashValue:0,length:0,prefix:new Uint8Array}}function g(){return{hash:0,prefix:new Uint8Array,suffix:new Uint8Array}}function m(){return{leafSpec:void 0,innerSpec:void 0,maxDepth:0,minDepth:0}}function y(){return{childOrder:[],childSize:0,minPrefixLength:0,maxPrefixLength:0,emptyChild:new Uint8Array,hash:0}}function v(){return{entries:[]}}function b(){return{exist:void 0,nonexist:void 0}}function S(){return{entries:[],lookupInners:[]}}function w(){return{exist:void 0,nonexist:void 0}}function _(){return{key:new Uint8Array,value:new Uint8Array,leaf:void 0,path:[]}}function k(){return{key:new Uint8Array,left:void 0,right:void 0}}t.protobufPackage="cosmos.ics23.v1",function(e){e[e.NO_HASH=0]="NO_HASH",e[e.SHA256=1]="SHA256",e[e.SHA512=2]="SHA512",e[e.KECCAK=3]="KECCAK",e[e.RIPEMD160=4]="RIPEMD160",e[e.BITCOIN=5]="BITCOIN",e[e.SHA512_256=6]="SHA512_256",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(n||(t.HashOp=n={})),t.hashOpFromJSON=s,t.hashOpToJSON=l,function(e){e[e.NO_PREFIX=0]="NO_PREFIX",e[e.VAR_PROTO=1]="VAR_PROTO",e[e.VAR_RLP=2]="VAR_RLP",e[e.FIXED32_BIG=3]="FIXED32_BIG",e[e.FIXED32_LITTLE=4]="FIXED32_LITTLE",e[e.FIXED64_BIG=5]="FIXED64_BIG",e[e.FIXED64_LITTLE=6]="FIXED64_LITTLE",e[e.REQUIRE_32_BYTES=7]="REQUIRE_32_BYTES",e[e.REQUIRE_64_BYTES=8]="REQUIRE_64_BYTES",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(i||(t.LengthOp=i={})),t.lengthOpFromJSON=u,t.lengthOpToJSON=d,t.ExistenceProof={typeUrl:"/cosmos.ics23.v1.ExistenceProof",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let n of(0!==e.key.length&&r.uint32(10).bytes(e.key),0!==e.value.length&&r.uint32(18).bytes(e.value),void 0!==e.leaf&&t.LeafOp.encode(e.leaf,r.uint32(26).fork()).ldelim(),e.path))t.InnerOp.encode(n,r.uint32(34).fork()).ldelim();return r},decode(e,r){let n=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===r?n.len:n.pos+r,a=c();for(;n.pos>>3){case 1:a.key=n.bytes();break;case 2:a.value=n.bytes();break;case 3:a.leaf=t.LeafOp.decode(n,n.uint32());break;case 4:a.path.push(t.InnerOp.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return a},fromJSON(e){let r=c();return(0,a.isSet)(e.key)&&(r.key=(0,a.bytesFromBase64)(e.key)),(0,a.isSet)(e.value)&&(r.value=(0,a.bytesFromBase64)(e.value)),(0,a.isSet)(e.leaf)&&(r.leaf=t.LeafOp.fromJSON(e.leaf)),Array.isArray(null==e?void 0:e.path)&&(r.path=e.path.map(e=>t.InnerOp.fromJSON(e))),r},toJSON(e){let r={};return void 0!==e.key&&(r.key=(0,a.base64FromBytes)(void 0!==e.key?e.key:new Uint8Array)),void 0!==e.value&&(r.value=(0,a.base64FromBytes)(void 0!==e.value?e.value:new Uint8Array)),void 0!==e.leaf&&(r.leaf=e.leaf?t.LeafOp.toJSON(e.leaf):void 0),e.path?r.path=e.path.map(e=>e?t.InnerOp.toJSON(e):void 0):r.path=[],r},fromPartial(e){var r,n,i;let o=c();return o.key=null!==(n=e.key)&&void 0!==n?n:new Uint8Array,o.value=null!==(i=e.value)&&void 0!==i?i:new Uint8Array,void 0!==e.leaf&&null!==e.leaf&&(o.leaf=t.LeafOp.fromPartial(e.leaf)),o.path=(null===(r=e.path)||void 0===r?void 0:r.map(e=>t.InnerOp.fromPartial(e)))||[],o}},t.NonExistenceProof={typeUrl:"/cosmos.ics23.v1.NonExistenceProof",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return 0!==e.key.length&&r.uint32(10).bytes(e.key),void 0!==e.left&&t.ExistenceProof.encode(e.left,r.uint32(18).fork()).ldelim(),void 0!==e.right&&t.ExistenceProof.encode(e.right,r.uint32(26).fork()).ldelim(),r},decode(e,r){let n=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===r?n.len:n.pos+r,a=p();for(;n.pos>>3){case 1:a.key=n.bytes();break;case 2:a.left=t.ExistenceProof.decode(n,n.uint32());break;case 3:a.right=t.ExistenceProof.decode(n,n.uint32());break;default:n.skipType(7&e)}}return a},fromJSON(e){let r=p();return(0,a.isSet)(e.key)&&(r.key=(0,a.bytesFromBase64)(e.key)),(0,a.isSet)(e.left)&&(r.left=t.ExistenceProof.fromJSON(e.left)),(0,a.isSet)(e.right)&&(r.right=t.ExistenceProof.fromJSON(e.right)),r},toJSON(e){let r={};return void 0!==e.key&&(r.key=(0,a.base64FromBytes)(void 0!==e.key?e.key:new Uint8Array)),void 0!==e.left&&(r.left=e.left?t.ExistenceProof.toJSON(e.left):void 0),void 0!==e.right&&(r.right=e.right?t.ExistenceProof.toJSON(e.right):void 0),r},fromPartial(e){var r;let n=p();return n.key=null!==(r=e.key)&&void 0!==r?r:new Uint8Array,void 0!==e.left&&null!==e.left&&(n.left=t.ExistenceProof.fromPartial(e.left)),void 0!==e.right&&null!==e.right&&(n.right=t.ExistenceProof.fromPartial(e.right)),n}},t.CommitmentProof={typeUrl:"/cosmos.ics23.v1.CommitmentProof",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return void 0!==e.exist&&t.ExistenceProof.encode(e.exist,r.uint32(10).fork()).ldelim(),void 0!==e.nonexist&&t.NonExistenceProof.encode(e.nonexist,r.uint32(18).fork()).ldelim(),void 0!==e.batch&&t.BatchProof.encode(e.batch,r.uint32(26).fork()).ldelim(),void 0!==e.compressed&&t.CompressedBatchProof.encode(e.compressed,r.uint32(34).fork()).ldelim(),r},decode(e,r){let n=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===r?n.len:n.pos+r,a=f();for(;n.pos>>3){case 1:a.exist=t.ExistenceProof.decode(n,n.uint32());break;case 2:a.nonexist=t.NonExistenceProof.decode(n,n.uint32());break;case 3:a.batch=t.BatchProof.decode(n,n.uint32());break;case 4:a.compressed=t.CompressedBatchProof.decode(n,n.uint32());break;default:n.skipType(7&e)}}return a},fromJSON(e){let r=f();return(0,a.isSet)(e.exist)&&(r.exist=t.ExistenceProof.fromJSON(e.exist)),(0,a.isSet)(e.nonexist)&&(r.nonexist=t.NonExistenceProof.fromJSON(e.nonexist)),(0,a.isSet)(e.batch)&&(r.batch=t.BatchProof.fromJSON(e.batch)),(0,a.isSet)(e.compressed)&&(r.compressed=t.CompressedBatchProof.fromJSON(e.compressed)),r},toJSON(e){let r={};return void 0!==e.exist&&(r.exist=e.exist?t.ExistenceProof.toJSON(e.exist):void 0),void 0!==e.nonexist&&(r.nonexist=e.nonexist?t.NonExistenceProof.toJSON(e.nonexist):void 0),void 0!==e.batch&&(r.batch=e.batch?t.BatchProof.toJSON(e.batch):void 0),void 0!==e.compressed&&(r.compressed=e.compressed?t.CompressedBatchProof.toJSON(e.compressed):void 0),r},fromPartial(e){let r=f();return void 0!==e.exist&&null!==e.exist&&(r.exist=t.ExistenceProof.fromPartial(e.exist)),void 0!==e.nonexist&&null!==e.nonexist&&(r.nonexist=t.NonExistenceProof.fromPartial(e.nonexist)),void 0!==e.batch&&null!==e.batch&&(r.batch=t.BatchProof.fromPartial(e.batch)),void 0!==e.compressed&&null!==e.compressed&&(r.compressed=t.CompressedBatchProof.fromPartial(e.compressed)),r}},t.LeafOp={typeUrl:"/cosmos.ics23.v1.LeafOp",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return 0!==e.hash&&t.uint32(8).int32(e.hash),0!==e.prehashKey&&t.uint32(16).int32(e.prehashKey),0!==e.prehashValue&&t.uint32(24).int32(e.prehashValue),0!==e.length&&t.uint32(32).int32(e.length),0!==e.prefix.length&&t.uint32(42).bytes(e.prefix),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=h();for(;r.pos>>3){case 1:i.hash=r.int32();break;case 2:i.prehashKey=r.int32();break;case 3:i.prehashValue=r.int32();break;case 4:i.length=r.int32();break;case 5:i.prefix=r.bytes();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=h();return(0,a.isSet)(e.hash)&&(t.hash=s(e.hash)),(0,a.isSet)(e.prehashKey)&&(t.prehashKey=s(e.prehashKey)),(0,a.isSet)(e.prehashValue)&&(t.prehashValue=s(e.prehashValue)),(0,a.isSet)(e.length)&&(t.length=u(e.length)),(0,a.isSet)(e.prefix)&&(t.prefix=(0,a.bytesFromBase64)(e.prefix)),t},toJSON(e){let t={};return void 0!==e.hash&&(t.hash=l(e.hash)),void 0!==e.prehashKey&&(t.prehashKey=l(e.prehashKey)),void 0!==e.prehashValue&&(t.prehashValue=l(e.prehashValue)),void 0!==e.length&&(t.length=d(e.length)),void 0!==e.prefix&&(t.prefix=(0,a.base64FromBytes)(void 0!==e.prefix?e.prefix:new Uint8Array)),t},fromPartial(e){var t,r,n,i,o;let a=h();return a.hash=null!==(t=e.hash)&&void 0!==t?t:0,a.prehashKey=null!==(r=e.prehashKey)&&void 0!==r?r:0,a.prehashValue=null!==(n=e.prehashValue)&&void 0!==n?n:0,a.length=null!==(i=e.length)&&void 0!==i?i:0,a.prefix=null!==(o=e.prefix)&&void 0!==o?o:new Uint8Array,a}},t.InnerOp={typeUrl:"/cosmos.ics23.v1.InnerOp",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return 0!==e.hash&&t.uint32(8).int32(e.hash),0!==e.prefix.length&&t.uint32(18).bytes(e.prefix),0!==e.suffix.length&&t.uint32(26).bytes(e.suffix),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=g();for(;r.pos>>3){case 1:i.hash=r.int32();break;case 2:i.prefix=r.bytes();break;case 3:i.suffix=r.bytes();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=g();return(0,a.isSet)(e.hash)&&(t.hash=s(e.hash)),(0,a.isSet)(e.prefix)&&(t.prefix=(0,a.bytesFromBase64)(e.prefix)),(0,a.isSet)(e.suffix)&&(t.suffix=(0,a.bytesFromBase64)(e.suffix)),t},toJSON(e){let t={};return void 0!==e.hash&&(t.hash=l(e.hash)),void 0!==e.prefix&&(t.prefix=(0,a.base64FromBytes)(void 0!==e.prefix?e.prefix:new Uint8Array)),void 0!==e.suffix&&(t.suffix=(0,a.base64FromBytes)(void 0!==e.suffix?e.suffix:new Uint8Array)),t},fromPartial(e){var t,r,n;let i=g();return i.hash=null!==(t=e.hash)&&void 0!==t?t:0,i.prefix=null!==(r=e.prefix)&&void 0!==r?r:new Uint8Array,i.suffix=null!==(n=e.suffix)&&void 0!==n?n:new Uint8Array,i}},t.ProofSpec={typeUrl:"/cosmos.ics23.v1.ProofSpec",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return void 0!==e.leafSpec&&t.LeafOp.encode(e.leafSpec,r.uint32(10).fork()).ldelim(),void 0!==e.innerSpec&&t.InnerSpec.encode(e.innerSpec,r.uint32(18).fork()).ldelim(),0!==e.maxDepth&&r.uint32(24).int32(e.maxDepth),0!==e.minDepth&&r.uint32(32).int32(e.minDepth),r},decode(e,r){let n=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===r?n.len:n.pos+r,a=m();for(;n.pos>>3){case 1:a.leafSpec=t.LeafOp.decode(n,n.uint32());break;case 2:a.innerSpec=t.InnerSpec.decode(n,n.uint32());break;case 3:a.maxDepth=n.int32();break;case 4:a.minDepth=n.int32();break;default:n.skipType(7&e)}}return a},fromJSON(e){let r=m();return(0,a.isSet)(e.leafSpec)&&(r.leafSpec=t.LeafOp.fromJSON(e.leafSpec)),(0,a.isSet)(e.innerSpec)&&(r.innerSpec=t.InnerSpec.fromJSON(e.innerSpec)),(0,a.isSet)(e.maxDepth)&&(r.maxDepth=Number(e.maxDepth)),(0,a.isSet)(e.minDepth)&&(r.minDepth=Number(e.minDepth)),r},toJSON(e){let r={};return void 0!==e.leafSpec&&(r.leafSpec=e.leafSpec?t.LeafOp.toJSON(e.leafSpec):void 0),void 0!==e.innerSpec&&(r.innerSpec=e.innerSpec?t.InnerSpec.toJSON(e.innerSpec):void 0),void 0!==e.maxDepth&&(r.maxDepth=Math.round(e.maxDepth)),void 0!==e.minDepth&&(r.minDepth=Math.round(e.minDepth)),r},fromPartial(e){var r,n;let i=m();return void 0!==e.leafSpec&&null!==e.leafSpec&&(i.leafSpec=t.LeafOp.fromPartial(e.leafSpec)),void 0!==e.innerSpec&&null!==e.innerSpec&&(i.innerSpec=t.InnerSpec.fromPartial(e.innerSpec)),i.maxDepth=null!==(r=e.maxDepth)&&void 0!==r?r:0,i.minDepth=null!==(n=e.minDepth)&&void 0!==n?n:0,i}},t.InnerSpec={typeUrl:"/cosmos.ics23.v1.InnerSpec",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of(t.uint32(10).fork(),e.childOrder))t.int32(r);return t.ldelim(),0!==e.childSize&&t.uint32(16).int32(e.childSize),0!==e.minPrefixLength&&t.uint32(24).int32(e.minPrefixLength),0!==e.maxPrefixLength&&t.uint32(32).int32(e.maxPrefixLength),0!==e.emptyChild.length&&t.uint32(42).bytes(e.emptyChild),0!==e.hash&&t.uint32(48).int32(e.hash),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=y();for(;r.pos>>3){case 1:if((7&e)==2){let e=r.uint32()+r.pos;for(;r.posNumber(e))),(0,a.isSet)(e.childSize)&&(t.childSize=Number(e.childSize)),(0,a.isSet)(e.minPrefixLength)&&(t.minPrefixLength=Number(e.minPrefixLength)),(0,a.isSet)(e.maxPrefixLength)&&(t.maxPrefixLength=Number(e.maxPrefixLength)),(0,a.isSet)(e.emptyChild)&&(t.emptyChild=(0,a.bytesFromBase64)(e.emptyChild)),(0,a.isSet)(e.hash)&&(t.hash=s(e.hash)),t},toJSON(e){let t={};return e.childOrder?t.childOrder=e.childOrder.map(e=>Math.round(e)):t.childOrder=[],void 0!==e.childSize&&(t.childSize=Math.round(e.childSize)),void 0!==e.minPrefixLength&&(t.minPrefixLength=Math.round(e.minPrefixLength)),void 0!==e.maxPrefixLength&&(t.maxPrefixLength=Math.round(e.maxPrefixLength)),void 0!==e.emptyChild&&(t.emptyChild=(0,a.base64FromBytes)(void 0!==e.emptyChild?e.emptyChild:new Uint8Array)),void 0!==e.hash&&(t.hash=l(e.hash)),t},fromPartial(e){var t,r,n,i,o,a;let s=y();return s.childOrder=(null===(t=e.childOrder)||void 0===t?void 0:t.map(e=>e))||[],s.childSize=null!==(r=e.childSize)&&void 0!==r?r:0,s.minPrefixLength=null!==(n=e.minPrefixLength)&&void 0!==n?n:0,s.maxPrefixLength=null!==(i=e.maxPrefixLength)&&void 0!==i?i:0,s.emptyChild=null!==(o=e.emptyChild)&&void 0!==o?o:new Uint8Array,s.hash=null!==(a=e.hash)&&void 0!==a?a:0,s}},t.BatchProof={typeUrl:"/cosmos.ics23.v1.BatchProof",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let n of e.entries)t.BatchEntry.encode(n,r.uint32(10).fork()).ldelim();return r},decode(e,r){let n=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===r?n.len:n.pos+r,a=v();for(;n.pos>>3==1?a.entries.push(t.BatchEntry.decode(n,n.uint32())):n.skipType(7&e)}return a},fromJSON(e){let r=v();return Array.isArray(null==e?void 0:e.entries)&&(r.entries=e.entries.map(e=>t.BatchEntry.fromJSON(e))),r},toJSON(e){let r={};return e.entries?r.entries=e.entries.map(e=>e?t.BatchEntry.toJSON(e):void 0):r.entries=[],r},fromPartial(e){var r;let n=v();return n.entries=(null===(r=e.entries)||void 0===r?void 0:r.map(e=>t.BatchEntry.fromPartial(e)))||[],n}},t.BatchEntry={typeUrl:"/cosmos.ics23.v1.BatchEntry",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return void 0!==e.exist&&t.ExistenceProof.encode(e.exist,r.uint32(10).fork()).ldelim(),void 0!==e.nonexist&&t.NonExistenceProof.encode(e.nonexist,r.uint32(18).fork()).ldelim(),r},decode(e,r){let n=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===r?n.len:n.pos+r,a=b();for(;n.pos>>3){case 1:a.exist=t.ExistenceProof.decode(n,n.uint32());break;case 2:a.nonexist=t.NonExistenceProof.decode(n,n.uint32());break;default:n.skipType(7&e)}}return a},fromJSON(e){let r=b();return(0,a.isSet)(e.exist)&&(r.exist=t.ExistenceProof.fromJSON(e.exist)),(0,a.isSet)(e.nonexist)&&(r.nonexist=t.NonExistenceProof.fromJSON(e.nonexist)),r},toJSON(e){let r={};return void 0!==e.exist&&(r.exist=e.exist?t.ExistenceProof.toJSON(e.exist):void 0),void 0!==e.nonexist&&(r.nonexist=e.nonexist?t.NonExistenceProof.toJSON(e.nonexist):void 0),r},fromPartial(e){let r=b();return void 0!==e.exist&&null!==e.exist&&(r.exist=t.ExistenceProof.fromPartial(e.exist)),void 0!==e.nonexist&&null!==e.nonexist&&(r.nonexist=t.NonExistenceProof.fromPartial(e.nonexist)),r}},t.CompressedBatchProof={typeUrl:"/cosmos.ics23.v1.CompressedBatchProof",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let n of e.entries)t.CompressedBatchEntry.encode(n,r.uint32(10).fork()).ldelim();for(let n of e.lookupInners)t.InnerOp.encode(n,r.uint32(18).fork()).ldelim();return r},decode(e,r){let n=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===r?n.len:n.pos+r,a=S();for(;n.pos>>3){case 1:a.entries.push(t.CompressedBatchEntry.decode(n,n.uint32()));break;case 2:a.lookupInners.push(t.InnerOp.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return a},fromJSON(e){let r=S();return Array.isArray(null==e?void 0:e.entries)&&(r.entries=e.entries.map(e=>t.CompressedBatchEntry.fromJSON(e))),Array.isArray(null==e?void 0:e.lookupInners)&&(r.lookupInners=e.lookupInners.map(e=>t.InnerOp.fromJSON(e))),r},toJSON(e){let r={};return e.entries?r.entries=e.entries.map(e=>e?t.CompressedBatchEntry.toJSON(e):void 0):r.entries=[],e.lookupInners?r.lookupInners=e.lookupInners.map(e=>e?t.InnerOp.toJSON(e):void 0):r.lookupInners=[],r},fromPartial(e){var r,n;let i=S();return i.entries=(null===(r=e.entries)||void 0===r?void 0:r.map(e=>t.CompressedBatchEntry.fromPartial(e)))||[],i.lookupInners=(null===(n=e.lookupInners)||void 0===n?void 0:n.map(e=>t.InnerOp.fromPartial(e)))||[],i}},t.CompressedBatchEntry={typeUrl:"/cosmos.ics23.v1.CompressedBatchEntry",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return void 0!==e.exist&&t.CompressedExistenceProof.encode(e.exist,r.uint32(10).fork()).ldelim(),void 0!==e.nonexist&&t.CompressedNonExistenceProof.encode(e.nonexist,r.uint32(18).fork()).ldelim(),r},decode(e,r){let n=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===r?n.len:n.pos+r,a=w();for(;n.pos>>3){case 1:a.exist=t.CompressedExistenceProof.decode(n,n.uint32());break;case 2:a.nonexist=t.CompressedNonExistenceProof.decode(n,n.uint32());break;default:n.skipType(7&e)}}return a},fromJSON(e){let r=w();return(0,a.isSet)(e.exist)&&(r.exist=t.CompressedExistenceProof.fromJSON(e.exist)),(0,a.isSet)(e.nonexist)&&(r.nonexist=t.CompressedNonExistenceProof.fromJSON(e.nonexist)),r},toJSON(e){let r={};return void 0!==e.exist&&(r.exist=e.exist?t.CompressedExistenceProof.toJSON(e.exist):void 0),void 0!==e.nonexist&&(r.nonexist=e.nonexist?t.CompressedNonExistenceProof.toJSON(e.nonexist):void 0),r},fromPartial(e){let r=w();return void 0!==e.exist&&null!==e.exist&&(r.exist=t.CompressedExistenceProof.fromPartial(e.exist)),void 0!==e.nonexist&&null!==e.nonexist&&(r.nonexist=t.CompressedNonExistenceProof.fromPartial(e.nonexist)),r}},t.CompressedExistenceProof={typeUrl:"/cosmos.ics23.v1.CompressedExistenceProof",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let n of(0!==e.key.length&&r.uint32(10).bytes(e.key),0!==e.value.length&&r.uint32(18).bytes(e.value),void 0!==e.leaf&&t.LeafOp.encode(e.leaf,r.uint32(26).fork()).ldelim(),r.uint32(34).fork(),e.path))r.int32(n);return r.ldelim(),r},decode(e,r){let n=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===r?n.len:n.pos+r,a=_();for(;n.pos>>3){case 1:a.key=n.bytes();break;case 2:a.value=n.bytes();break;case 3:a.leaf=t.LeafOp.decode(n,n.uint32());break;case 4:if((7&e)==2){let e=n.uint32()+n.pos;for(;n.posNumber(e))),r},toJSON(e){let r={};return void 0!==e.key&&(r.key=(0,a.base64FromBytes)(void 0!==e.key?e.key:new Uint8Array)),void 0!==e.value&&(r.value=(0,a.base64FromBytes)(void 0!==e.value?e.value:new Uint8Array)),void 0!==e.leaf&&(r.leaf=e.leaf?t.LeafOp.toJSON(e.leaf):void 0),e.path?r.path=e.path.map(e=>Math.round(e)):r.path=[],r},fromPartial(e){var r,n,i;let o=_();return o.key=null!==(n=e.key)&&void 0!==n?n:new Uint8Array,o.value=null!==(i=e.value)&&void 0!==i?i:new Uint8Array,void 0!==e.leaf&&null!==e.leaf&&(o.leaf=t.LeafOp.fromPartial(e.leaf)),o.path=(null===(r=e.path)||void 0===r?void 0:r.map(e=>e))||[],o}},t.CompressedNonExistenceProof={typeUrl:"/cosmos.ics23.v1.CompressedNonExistenceProof",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return 0!==e.key.length&&r.uint32(10).bytes(e.key),void 0!==e.left&&t.CompressedExistenceProof.encode(e.left,r.uint32(18).fork()).ldelim(),void 0!==e.right&&t.CompressedExistenceProof.encode(e.right,r.uint32(26).fork()).ldelim(),r},decode(e,r){let n=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===r?n.len:n.pos+r,a=k();for(;n.pos>>3){case 1:a.key=n.bytes();break;case 2:a.left=t.CompressedExistenceProof.decode(n,n.uint32());break;case 3:a.right=t.CompressedExistenceProof.decode(n,n.uint32());break;default:n.skipType(7&e)}}return a},fromJSON(e){let r=k();return(0,a.isSet)(e.key)&&(r.key=(0,a.bytesFromBase64)(e.key)),(0,a.isSet)(e.left)&&(r.left=t.CompressedExistenceProof.fromJSON(e.left)),(0,a.isSet)(e.right)&&(r.right=t.CompressedExistenceProof.fromJSON(e.right)),r},toJSON(e){let r={};return void 0!==e.key&&(r.key=(0,a.base64FromBytes)(void 0!==e.key?e.key:new Uint8Array)),void 0!==e.left&&(r.left=e.left?t.CompressedExistenceProof.toJSON(e.left):void 0),void 0!==e.right&&(r.right=e.right?t.CompressedExistenceProof.toJSON(e.right):void 0),r},fromPartial(e){var r;let n=k();return n.key=null!==(r=e.key)&&void 0!==r?r:new Uint8Array,void 0!==e.left&&null!==e.left&&(n.left=t.CompressedExistenceProof.fromPartial(e.left)),void 0!==e.right&&null!==e.right&&(n.right=t.CompressedExistenceProof.fromPartial(e.right)),n}}},70784:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Params=t.Minter=t.protobufPackage=void 0;let n=r(46554),i=r(99133);function o(){return{inflation:"",annualProvisions:""}}function a(){return{mintDenom:"",inflationRateChange:"",inflationMax:"",inflationMin:"",goalBonded:"",blocksPerYear:BigInt(0)}}t.protobufPackage="cosmos.mint.v1beta1",t.Minter={typeUrl:"/cosmos.mint.v1beta1.Minter",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.BinaryWriter.create();return""!==e.inflation&&t.uint32(10).string(e.inflation),""!==e.annualProvisions&&t.uint32(18).string(e.annualProvisions),t},decode(e,t){let r=e instanceof n.BinaryReader?e:new n.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=o();for(;r.pos>>3){case 1:a.inflation=r.string();break;case 2:a.annualProvisions=r.string();break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=o();return(0,i.isSet)(e.inflation)&&(t.inflation=String(e.inflation)),(0,i.isSet)(e.annualProvisions)&&(t.annualProvisions=String(e.annualProvisions)),t},toJSON(e){let t={};return void 0!==e.inflation&&(t.inflation=e.inflation),void 0!==e.annualProvisions&&(t.annualProvisions=e.annualProvisions),t},fromPartial(e){var t,r;let n=o();return n.inflation=null!==(t=e.inflation)&&void 0!==t?t:"",n.annualProvisions=null!==(r=e.annualProvisions)&&void 0!==r?r:"",n}},t.Params={typeUrl:"/cosmos.mint.v1beta1.Params",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.BinaryWriter.create();return""!==e.mintDenom&&t.uint32(10).string(e.mintDenom),""!==e.inflationRateChange&&t.uint32(18).string(e.inflationRateChange),""!==e.inflationMax&&t.uint32(26).string(e.inflationMax),""!==e.inflationMin&&t.uint32(34).string(e.inflationMin),""!==e.goalBonded&&t.uint32(42).string(e.goalBonded),e.blocksPerYear!==BigInt(0)&&t.uint32(48).uint64(e.blocksPerYear),t},decode(e,t){let r=e instanceof n.BinaryReader?e:new n.BinaryReader(e),i=void 0===t?r.len:r.pos+t,o=a();for(;r.pos>>3){case 1:o.mintDenom=r.string();break;case 2:o.inflationRateChange=r.string();break;case 3:o.inflationMax=r.string();break;case 4:o.inflationMin=r.string();break;case 5:o.goalBonded=r.string();break;case 6:o.blocksPerYear=r.uint64();break;default:r.skipType(7&e)}}return o},fromJSON(e){let t=a();return(0,i.isSet)(e.mintDenom)&&(t.mintDenom=String(e.mintDenom)),(0,i.isSet)(e.inflationRateChange)&&(t.inflationRateChange=String(e.inflationRateChange)),(0,i.isSet)(e.inflationMax)&&(t.inflationMax=String(e.inflationMax)),(0,i.isSet)(e.inflationMin)&&(t.inflationMin=String(e.inflationMin)),(0,i.isSet)(e.goalBonded)&&(t.goalBonded=String(e.goalBonded)),(0,i.isSet)(e.blocksPerYear)&&(t.blocksPerYear=BigInt(e.blocksPerYear.toString())),t},toJSON(e){let t={};return void 0!==e.mintDenom&&(t.mintDenom=e.mintDenom),void 0!==e.inflationRateChange&&(t.inflationRateChange=e.inflationRateChange),void 0!==e.inflationMax&&(t.inflationMax=e.inflationMax),void 0!==e.inflationMin&&(t.inflationMin=e.inflationMin),void 0!==e.goalBonded&&(t.goalBonded=e.goalBonded),void 0!==e.blocksPerYear&&(t.blocksPerYear=(e.blocksPerYear||BigInt(0)).toString()),t},fromPartial(e){var t,r,n,i,o;let s=a();return s.mintDenom=null!==(t=e.mintDenom)&&void 0!==t?t:"",s.inflationRateChange=null!==(r=e.inflationRateChange)&&void 0!==r?r:"",s.inflationMax=null!==(n=e.inflationMax)&&void 0!==n?n:"",s.inflationMin=null!==(i=e.inflationMin)&&void 0!==i?i:"",s.goalBonded=null!==(o=e.goalBonded)&&void 0!==o?o:"",void 0!==e.blocksPerYear&&null!==e.blocksPerYear&&(s.blocksPerYear=BigInt(e.blocksPerYear.toString())),s}}},16093:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QueryClientImpl=t.QueryAnnualProvisionsResponse=t.QueryAnnualProvisionsRequest=t.QueryInflationResponse=t.QueryInflationRequest=t.QueryParamsResponse=t.QueryParamsRequest=t.protobufPackage=void 0;let n=r(70784),i=r(46554),o=r(99133);function a(){return{}}function s(){return{params:n.Params.fromPartial({})}}function l(){return{}}function u(){return{inflation:new Uint8Array}}function d(){return{}}function c(){return{annualProvisions:new Uint8Array}}t.protobufPackage="cosmos.mint.v1beta1",t.QueryParamsRequest={typeUrl:"/cosmos.mint.v1beta1.QueryParamsRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();return t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=a();for(;r.posa(),toJSON:e=>({}),fromPartial:e=>a()},t.QueryParamsResponse={typeUrl:"/cosmos.mint.v1beta1.QueryParamsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();return void 0!==e.params&&n.Params.encode(e.params,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),o=void 0===t?r.len:r.pos+t,a=s();for(;r.pos>>3==1?a.params=n.Params.decode(r,r.uint32()):r.skipType(7&e)}return a},fromJSON(e){let t=s();return(0,o.isSet)(e.params)&&(t.params=n.Params.fromJSON(e.params)),t},toJSON(e){let t={};return void 0!==e.params&&(t.params=e.params?n.Params.toJSON(e.params):void 0),t},fromPartial(e){let t=s();return void 0!==e.params&&null!==e.params&&(t.params=n.Params.fromPartial(e.params)),t}},t.QueryInflationRequest={typeUrl:"/cosmos.mint.v1beta1.QueryInflationRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();return t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=l();for(;r.posl(),toJSON:e=>({}),fromPartial:e=>l()},t.QueryInflationResponse={typeUrl:"/cosmos.mint.v1beta1.QueryInflationResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();return 0!==e.inflation.length&&t.uint32(10).bytes(e.inflation),t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=u();for(;r.pos>>3==1?o.inflation=r.bytes():r.skipType(7&e)}return o},fromJSON(e){let t=u();return(0,o.isSet)(e.inflation)&&(t.inflation=(0,o.bytesFromBase64)(e.inflation)),t},toJSON(e){let t={};return void 0!==e.inflation&&(t.inflation=(0,o.base64FromBytes)(void 0!==e.inflation?e.inflation:new Uint8Array)),t},fromPartial(e){var t;let r=u();return r.inflation=null!==(t=e.inflation)&&void 0!==t?t:new Uint8Array,r}},t.QueryAnnualProvisionsRequest={typeUrl:"/cosmos.mint.v1beta1.QueryAnnualProvisionsRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();return t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=d();for(;r.posd(),toJSON:e=>({}),fromPartial:e=>d()},t.QueryAnnualProvisionsResponse={typeUrl:"/cosmos.mint.v1beta1.QueryAnnualProvisionsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();return 0!==e.annualProvisions.length&&t.uint32(10).bytes(e.annualProvisions),t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=c();for(;r.pos>>3==1?o.annualProvisions=r.bytes():r.skipType(7&e)}return o},fromJSON(e){let t=c();return(0,o.isSet)(e.annualProvisions)&&(t.annualProvisions=(0,o.bytesFromBase64)(e.annualProvisions)),t},toJSON(e){let t={};return void 0!==e.annualProvisions&&(t.annualProvisions=(0,o.base64FromBytes)(void 0!==e.annualProvisions?e.annualProvisions:new Uint8Array)),t},fromPartial(e){var t;let r=c();return r.annualProvisions=null!==(t=e.annualProvisions)&&void 0!==t?t:new Uint8Array,r}};class p{Params(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.QueryParamsRequest.encode(e).finish();return this.rpc.request("cosmos.mint.v1beta1.Query","Params",r).then(e=>t.QueryParamsResponse.decode(new i.BinaryReader(e)))}Inflation(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.QueryInflationRequest.encode(e).finish();return this.rpc.request("cosmos.mint.v1beta1.Query","Inflation",r).then(e=>t.QueryInflationResponse.decode(new i.BinaryReader(e)))}AnnualProvisions(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.QueryAnnualProvisionsRequest.encode(e).finish();return this.rpc.request("cosmos.mint.v1beta1.Query","AnnualProvisions",r).then(e=>t.QueryAnnualProvisionsResponse.decode(new i.BinaryReader(e)))}constructor(e){this.rpc=e,this.Params=this.Params.bind(this),this.Inflation=this.Inflation.bind(this),this.AnnualProvisions=this.AnnualProvisions.bind(this)}}t.QueryClientImpl=p},87778:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QueryClientImpl=t.QuerySigningInfosResponse=t.QuerySigningInfosRequest=t.QuerySigningInfoResponse=t.QuerySigningInfoRequest=t.QueryParamsResponse=t.QueryParamsRequest=t.protobufPackage=void 0;let n=r(86141),i=r(87052),o=r(46554),a=r(99133);function s(){return{}}function l(){return{params:i.Params.fromPartial({})}}function u(){return{consAddress:""}}function d(){return{valSigningInfo:i.ValidatorSigningInfo.fromPartial({})}}function c(){return{pagination:void 0}}function p(){return{info:[],pagination:void 0}}t.protobufPackage="cosmos.slashing.v1beta1",t.QueryParamsRequest={typeUrl:"/cosmos.slashing.v1beta1.QueryParamsRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=s();for(;r.poss(),toJSON:e=>({}),fromPartial:e=>s()},t.QueryParamsResponse={typeUrl:"/cosmos.slashing.v1beta1.QueryParamsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return void 0!==e.params&&i.Params.encode(e.params,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,a=l();for(;r.pos>>3==1?a.params=i.Params.decode(r,r.uint32()):r.skipType(7&e)}return a},fromJSON(e){let t=l();return(0,a.isSet)(e.params)&&(t.params=i.Params.fromJSON(e.params)),t},toJSON(e){let t={};return void 0!==e.params&&(t.params=e.params?i.Params.toJSON(e.params):void 0),t},fromPartial(e){let t=l();return void 0!==e.params&&null!==e.params&&(t.params=i.Params.fromPartial(e.params)),t}},t.QuerySigningInfoRequest={typeUrl:"/cosmos.slashing.v1beta1.QuerySigningInfoRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.consAddress&&t.uint32(10).string(e.consAddress),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=u();for(;r.pos>>3==1?i.consAddress=r.string():r.skipType(7&e)}return i},fromJSON(e){let t=u();return(0,a.isSet)(e.consAddress)&&(t.consAddress=String(e.consAddress)),t},toJSON(e){let t={};return void 0!==e.consAddress&&(t.consAddress=e.consAddress),t},fromPartial(e){var t;let r=u();return r.consAddress=null!==(t=e.consAddress)&&void 0!==t?t:"",r}},t.QuerySigningInfoResponse={typeUrl:"/cosmos.slashing.v1beta1.QuerySigningInfoResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return void 0!==e.valSigningInfo&&i.ValidatorSigningInfo.encode(e.valSigningInfo,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,a=d();for(;r.pos>>3==1?a.valSigningInfo=i.ValidatorSigningInfo.decode(r,r.uint32()):r.skipType(7&e)}return a},fromJSON(e){let t=d();return(0,a.isSet)(e.valSigningInfo)&&(t.valSigningInfo=i.ValidatorSigningInfo.fromJSON(e.valSigningInfo)),t},toJSON(e){let t={};return void 0!==e.valSigningInfo&&(t.valSigningInfo=e.valSigningInfo?i.ValidatorSigningInfo.toJSON(e.valSigningInfo):void 0),t},fromPartial(e){let t=d();return void 0!==e.valSigningInfo&&null!==e.valSigningInfo&&(t.valSigningInfo=i.ValidatorSigningInfo.fromPartial(e.valSigningInfo)),t}},t.QuerySigningInfosRequest={typeUrl:"/cosmos.slashing.v1beta1.QuerySigningInfosRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return void 0!==e.pagination&&n.PageRequest.encode(e.pagination,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=c();for(;r.pos>>3==1?a.pagination=n.PageRequest.decode(r,r.uint32()):r.skipType(7&e)}return a},fromJSON(e){let t=c();return(0,a.isSet)(e.pagination)&&(t.pagination=n.PageRequest.fromJSON(e.pagination)),t},toJSON(e){let t={};return void 0!==e.pagination&&(t.pagination=e.pagination?n.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){let t=c();return void 0!==e.pagination&&null!==e.pagination&&(t.pagination=n.PageRequest.fromPartial(e.pagination)),t}},t.QuerySigningInfosResponse={typeUrl:"/cosmos.slashing.v1beta1.QuerySigningInfosResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of e.info)i.ValidatorSigningInfo.encode(r,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&n.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),a=void 0===t?r.len:r.pos+t,s=p();for(;r.pos>>3){case 1:s.info.push(i.ValidatorSigningInfo.decode(r,r.uint32()));break;case 2:s.pagination=n.PageResponse.decode(r,r.uint32());break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=p();return Array.isArray(null==e?void 0:e.info)&&(t.info=e.info.map(e=>i.ValidatorSigningInfo.fromJSON(e))),(0,a.isSet)(e.pagination)&&(t.pagination=n.PageResponse.fromJSON(e.pagination)),t},toJSON(e){let t={};return e.info?t.info=e.info.map(e=>e?i.ValidatorSigningInfo.toJSON(e):void 0):t.info=[],void 0!==e.pagination&&(t.pagination=e.pagination?n.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=p();return r.info=(null===(t=e.info)||void 0===t?void 0:t.map(e=>i.ValidatorSigningInfo.fromPartial(e)))||[],void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageResponse.fromPartial(e.pagination)),r}};class f{Params(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.QueryParamsRequest.encode(e).finish();return this.rpc.request("cosmos.slashing.v1beta1.Query","Params",r).then(e=>t.QueryParamsResponse.decode(new o.BinaryReader(e)))}SigningInfo(e){let r=t.QuerySigningInfoRequest.encode(e).finish();return this.rpc.request("cosmos.slashing.v1beta1.Query","SigningInfo",r).then(e=>t.QuerySigningInfoResponse.decode(new o.BinaryReader(e)))}SigningInfos(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{pagination:n.PageRequest.fromPartial({})},r=t.QuerySigningInfosRequest.encode(e).finish();return this.rpc.request("cosmos.slashing.v1beta1.Query","SigningInfos",r).then(e=>t.QuerySigningInfosResponse.decode(new o.BinaryReader(e)))}constructor(e){this.rpc=e,this.Params=this.Params.bind(this),this.SigningInfo=this.SigningInfo.bind(this),this.SigningInfos=this.SigningInfos.bind(this)}}t.QueryClientImpl=f},87052:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Params=t.ValidatorSigningInfo=t.protobufPackage=void 0;let n=r(9990),i=r(84849),o=r(46554),a=r(99133);function s(){return{address:"",startHeight:BigInt(0),indexOffset:BigInt(0),jailedUntil:n.Timestamp.fromPartial({}),tombstoned:!1,missedBlocksCounter:BigInt(0)}}function l(){return{signedBlocksWindow:BigInt(0),minSignedPerWindow:new Uint8Array,downtimeJailDuration:i.Duration.fromPartial({}),slashFractionDoubleSign:new Uint8Array,slashFractionDowntime:new Uint8Array}}t.protobufPackage="cosmos.slashing.v1beta1",t.ValidatorSigningInfo={typeUrl:"/cosmos.slashing.v1beta1.ValidatorSigningInfo",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.address&&t.uint32(10).string(e.address),e.startHeight!==BigInt(0)&&t.uint32(16).int64(e.startHeight),e.indexOffset!==BigInt(0)&&t.uint32(24).int64(e.indexOffset),void 0!==e.jailedUntil&&n.Timestamp.encode(e.jailedUntil,t.uint32(34).fork()).ldelim(),!0===e.tombstoned&&t.uint32(40).bool(e.tombstoned),e.missedBlocksCounter!==BigInt(0)&&t.uint32(48).int64(e.missedBlocksCounter),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=s();for(;r.pos>>3){case 1:a.address=r.string();break;case 2:a.startHeight=r.int64();break;case 3:a.indexOffset=r.int64();break;case 4:a.jailedUntil=n.Timestamp.decode(r,r.uint32());break;case 5:a.tombstoned=r.bool();break;case 6:a.missedBlocksCounter=r.int64();break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=s();return(0,a.isSet)(e.address)&&(t.address=String(e.address)),(0,a.isSet)(e.startHeight)&&(t.startHeight=BigInt(e.startHeight.toString())),(0,a.isSet)(e.indexOffset)&&(t.indexOffset=BigInt(e.indexOffset.toString())),(0,a.isSet)(e.jailedUntil)&&(t.jailedUntil=(0,a.fromJsonTimestamp)(e.jailedUntil)),(0,a.isSet)(e.tombstoned)&&(t.tombstoned=!!e.tombstoned),(0,a.isSet)(e.missedBlocksCounter)&&(t.missedBlocksCounter=BigInt(e.missedBlocksCounter.toString())),t},toJSON(e){let t={};return void 0!==e.address&&(t.address=e.address),void 0!==e.startHeight&&(t.startHeight=(e.startHeight||BigInt(0)).toString()),void 0!==e.indexOffset&&(t.indexOffset=(e.indexOffset||BigInt(0)).toString()),void 0!==e.jailedUntil&&(t.jailedUntil=(0,a.fromTimestamp)(e.jailedUntil).toISOString()),void 0!==e.tombstoned&&(t.tombstoned=e.tombstoned),void 0!==e.missedBlocksCounter&&(t.missedBlocksCounter=(e.missedBlocksCounter||BigInt(0)).toString()),t},fromPartial(e){var t,r;let i=s();return i.address=null!==(t=e.address)&&void 0!==t?t:"",void 0!==e.startHeight&&null!==e.startHeight&&(i.startHeight=BigInt(e.startHeight.toString())),void 0!==e.indexOffset&&null!==e.indexOffset&&(i.indexOffset=BigInt(e.indexOffset.toString())),void 0!==e.jailedUntil&&null!==e.jailedUntil&&(i.jailedUntil=n.Timestamp.fromPartial(e.jailedUntil)),i.tombstoned=null!==(r=e.tombstoned)&&void 0!==r&&r,void 0!==e.missedBlocksCounter&&null!==e.missedBlocksCounter&&(i.missedBlocksCounter=BigInt(e.missedBlocksCounter.toString())),i}},t.Params={typeUrl:"/cosmos.slashing.v1beta1.Params",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return e.signedBlocksWindow!==BigInt(0)&&t.uint32(8).int64(e.signedBlocksWindow),0!==e.minSignedPerWindow.length&&t.uint32(18).bytes(e.minSignedPerWindow),void 0!==e.downtimeJailDuration&&i.Duration.encode(e.downtimeJailDuration,t.uint32(26).fork()).ldelim(),0!==e.slashFractionDoubleSign.length&&t.uint32(34).bytes(e.slashFractionDoubleSign),0!==e.slashFractionDowntime.length&&t.uint32(42).bytes(e.slashFractionDowntime),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,a=l();for(;r.pos>>3){case 1:a.signedBlocksWindow=r.int64();break;case 2:a.minSignedPerWindow=r.bytes();break;case 3:a.downtimeJailDuration=i.Duration.decode(r,r.uint32());break;case 4:a.slashFractionDoubleSign=r.bytes();break;case 5:a.slashFractionDowntime=r.bytes();break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=l();return(0,a.isSet)(e.signedBlocksWindow)&&(t.signedBlocksWindow=BigInt(e.signedBlocksWindow.toString())),(0,a.isSet)(e.minSignedPerWindow)&&(t.minSignedPerWindow=(0,a.bytesFromBase64)(e.minSignedPerWindow)),(0,a.isSet)(e.downtimeJailDuration)&&(t.downtimeJailDuration=i.Duration.fromJSON(e.downtimeJailDuration)),(0,a.isSet)(e.slashFractionDoubleSign)&&(t.slashFractionDoubleSign=(0,a.bytesFromBase64)(e.slashFractionDoubleSign)),(0,a.isSet)(e.slashFractionDowntime)&&(t.slashFractionDowntime=(0,a.bytesFromBase64)(e.slashFractionDowntime)),t},toJSON(e){let t={};return void 0!==e.signedBlocksWindow&&(t.signedBlocksWindow=(e.signedBlocksWindow||BigInt(0)).toString()),void 0!==e.minSignedPerWindow&&(t.minSignedPerWindow=(0,a.base64FromBytes)(void 0!==e.minSignedPerWindow?e.minSignedPerWindow:new Uint8Array)),void 0!==e.downtimeJailDuration&&(t.downtimeJailDuration=e.downtimeJailDuration?i.Duration.toJSON(e.downtimeJailDuration):void 0),void 0!==e.slashFractionDoubleSign&&(t.slashFractionDoubleSign=(0,a.base64FromBytes)(void 0!==e.slashFractionDoubleSign?e.slashFractionDoubleSign:new Uint8Array)),void 0!==e.slashFractionDowntime&&(t.slashFractionDowntime=(0,a.base64FromBytes)(void 0!==e.slashFractionDowntime?e.slashFractionDowntime:new Uint8Array)),t},fromPartial(e){var t,r,n;let o=l();return void 0!==e.signedBlocksWindow&&null!==e.signedBlocksWindow&&(o.signedBlocksWindow=BigInt(e.signedBlocksWindow.toString())),o.minSignedPerWindow=null!==(t=e.minSignedPerWindow)&&void 0!==t?t:new Uint8Array,void 0!==e.downtimeJailDuration&&null!==e.downtimeJailDuration&&(o.downtimeJailDuration=i.Duration.fromPartial(e.downtimeJailDuration)),o.slashFractionDoubleSign=null!==(r=e.slashFractionDoubleSign)&&void 0!==r?r:new Uint8Array,o.slashFractionDowntime=null!==(n=e.slashFractionDowntime)&&void 0!==n?n:new Uint8Array,o}}},32776:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QueryClientImpl=t.QueryParamsResponse=t.QueryParamsRequest=t.QueryPoolResponse=t.QueryPoolRequest=t.QueryHistoricalInfoResponse=t.QueryHistoricalInfoRequest=t.QueryDelegatorValidatorResponse=t.QueryDelegatorValidatorRequest=t.QueryDelegatorValidatorsResponse=t.QueryDelegatorValidatorsRequest=t.QueryRedelegationsResponse=t.QueryRedelegationsRequest=t.QueryDelegatorUnbondingDelegationsResponse=t.QueryDelegatorUnbondingDelegationsRequest=t.QueryDelegatorDelegationsResponse=t.QueryDelegatorDelegationsRequest=t.QueryUnbondingDelegationResponse=t.QueryUnbondingDelegationRequest=t.QueryDelegationResponse=t.QueryDelegationRequest=t.QueryValidatorUnbondingDelegationsResponse=t.QueryValidatorUnbondingDelegationsRequest=t.QueryValidatorDelegationsResponse=t.QueryValidatorDelegationsRequest=t.QueryValidatorResponse=t.QueryValidatorRequest=t.QueryValidatorsResponse=t.QueryValidatorsRequest=t.protobufPackage=void 0;let n=r(86141),i=r(20534),o=r(46554),a=r(99133);function s(){return{status:"",pagination:void 0}}function l(){return{validators:[],pagination:void 0}}function u(){return{validatorAddr:""}}function d(){return{validator:i.Validator.fromPartial({})}}function c(){return{validatorAddr:"",pagination:void 0}}function p(){return{delegationResponses:[],pagination:void 0}}function f(){return{validatorAddr:"",pagination:void 0}}function h(){return{unbondingResponses:[],pagination:void 0}}function g(){return{delegatorAddr:"",validatorAddr:""}}function m(){return{delegationResponse:void 0}}function y(){return{delegatorAddr:"",validatorAddr:""}}function v(){return{unbond:i.UnbondingDelegation.fromPartial({})}}function b(){return{delegatorAddr:"",pagination:void 0}}function S(){return{delegationResponses:[],pagination:void 0}}function w(){return{delegatorAddr:"",pagination:void 0}}function _(){return{unbondingResponses:[],pagination:void 0}}function k(){return{delegatorAddr:"",srcValidatorAddr:"",dstValidatorAddr:"",pagination:void 0}}function O(){return{redelegationResponses:[],pagination:void 0}}function P(){return{delegatorAddr:"",pagination:void 0}}function A(){return{validators:[],pagination:void 0}}function I(){return{delegatorAddr:"",validatorAddr:""}}function R(){return{validator:i.Validator.fromPartial({})}}function E(){return{height:BigInt(0)}}function T(){return{hist:void 0}}function N(){return{}}function x(){return{pool:i.Pool.fromPartial({})}}function B(){return{}}function C(){return{params:i.Params.fromPartial({})}}t.protobufPackage="cosmos.staking.v1beta1",t.QueryValidatorsRequest={typeUrl:"/cosmos.staking.v1beta1.QueryValidatorsRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.status&&t.uint32(10).string(e.status),void 0!==e.pagination&&n.PageRequest.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=s();for(;r.pos>>3){case 1:a.status=r.string();break;case 2:a.pagination=n.PageRequest.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=s();return(0,a.isSet)(e.status)&&(t.status=String(e.status)),(0,a.isSet)(e.pagination)&&(t.pagination=n.PageRequest.fromJSON(e.pagination)),t},toJSON(e){let t={};return void 0!==e.status&&(t.status=e.status),void 0!==e.pagination&&(t.pagination=e.pagination?n.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=s();return r.status=null!==(t=e.status)&&void 0!==t?t:"",void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageRequest.fromPartial(e.pagination)),r}},t.QueryValidatorsResponse={typeUrl:"/cosmos.staking.v1beta1.QueryValidatorsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of e.validators)i.Validator.encode(r,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&n.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),a=void 0===t?r.len:r.pos+t,s=l();for(;r.pos>>3){case 1:s.validators.push(i.Validator.decode(r,r.uint32()));break;case 2:s.pagination=n.PageResponse.decode(r,r.uint32());break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=l();return Array.isArray(null==e?void 0:e.validators)&&(t.validators=e.validators.map(e=>i.Validator.fromJSON(e))),(0,a.isSet)(e.pagination)&&(t.pagination=n.PageResponse.fromJSON(e.pagination)),t},toJSON(e){let t={};return e.validators?t.validators=e.validators.map(e=>e?i.Validator.toJSON(e):void 0):t.validators=[],void 0!==e.pagination&&(t.pagination=e.pagination?n.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=l();return r.validators=(null===(t=e.validators)||void 0===t?void 0:t.map(e=>i.Validator.fromPartial(e)))||[],void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageResponse.fromPartial(e.pagination)),r}},t.QueryValidatorRequest={typeUrl:"/cosmos.staking.v1beta1.QueryValidatorRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.validatorAddr&&t.uint32(10).string(e.validatorAddr),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=u();for(;r.pos>>3==1?i.validatorAddr=r.string():r.skipType(7&e)}return i},fromJSON(e){let t=u();return(0,a.isSet)(e.validatorAddr)&&(t.validatorAddr=String(e.validatorAddr)),t},toJSON(e){let t={};return void 0!==e.validatorAddr&&(t.validatorAddr=e.validatorAddr),t},fromPartial(e){var t;let r=u();return r.validatorAddr=null!==(t=e.validatorAddr)&&void 0!==t?t:"",r}},t.QueryValidatorResponse={typeUrl:"/cosmos.staking.v1beta1.QueryValidatorResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return void 0!==e.validator&&i.Validator.encode(e.validator,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,a=d();for(;r.pos>>3==1?a.validator=i.Validator.decode(r,r.uint32()):r.skipType(7&e)}return a},fromJSON(e){let t=d();return(0,a.isSet)(e.validator)&&(t.validator=i.Validator.fromJSON(e.validator)),t},toJSON(e){let t={};return void 0!==e.validator&&(t.validator=e.validator?i.Validator.toJSON(e.validator):void 0),t},fromPartial(e){let t=d();return void 0!==e.validator&&null!==e.validator&&(t.validator=i.Validator.fromPartial(e.validator)),t}},t.QueryValidatorDelegationsRequest={typeUrl:"/cosmos.staking.v1beta1.QueryValidatorDelegationsRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.validatorAddr&&t.uint32(10).string(e.validatorAddr),void 0!==e.pagination&&n.PageRequest.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=c();for(;r.pos>>3){case 1:a.validatorAddr=r.string();break;case 2:a.pagination=n.PageRequest.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=c();return(0,a.isSet)(e.validatorAddr)&&(t.validatorAddr=String(e.validatorAddr)),(0,a.isSet)(e.pagination)&&(t.pagination=n.PageRequest.fromJSON(e.pagination)),t},toJSON(e){let t={};return void 0!==e.validatorAddr&&(t.validatorAddr=e.validatorAddr),void 0!==e.pagination&&(t.pagination=e.pagination?n.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=c();return r.validatorAddr=null!==(t=e.validatorAddr)&&void 0!==t?t:"",void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageRequest.fromPartial(e.pagination)),r}},t.QueryValidatorDelegationsResponse={typeUrl:"/cosmos.staking.v1beta1.QueryValidatorDelegationsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of e.delegationResponses)i.DelegationResponse.encode(r,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&n.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),a=void 0===t?r.len:r.pos+t,s=p();for(;r.pos>>3){case 1:s.delegationResponses.push(i.DelegationResponse.decode(r,r.uint32()));break;case 2:s.pagination=n.PageResponse.decode(r,r.uint32());break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=p();return Array.isArray(null==e?void 0:e.delegationResponses)&&(t.delegationResponses=e.delegationResponses.map(e=>i.DelegationResponse.fromJSON(e))),(0,a.isSet)(e.pagination)&&(t.pagination=n.PageResponse.fromJSON(e.pagination)),t},toJSON(e){let t={};return e.delegationResponses?t.delegationResponses=e.delegationResponses.map(e=>e?i.DelegationResponse.toJSON(e):void 0):t.delegationResponses=[],void 0!==e.pagination&&(t.pagination=e.pagination?n.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=p();return r.delegationResponses=(null===(t=e.delegationResponses)||void 0===t?void 0:t.map(e=>i.DelegationResponse.fromPartial(e)))||[],void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageResponse.fromPartial(e.pagination)),r}},t.QueryValidatorUnbondingDelegationsRequest={typeUrl:"/cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.validatorAddr&&t.uint32(10).string(e.validatorAddr),void 0!==e.pagination&&n.PageRequest.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=f();for(;r.pos>>3){case 1:a.validatorAddr=r.string();break;case 2:a.pagination=n.PageRequest.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=f();return(0,a.isSet)(e.validatorAddr)&&(t.validatorAddr=String(e.validatorAddr)),(0,a.isSet)(e.pagination)&&(t.pagination=n.PageRequest.fromJSON(e.pagination)),t},toJSON(e){let t={};return void 0!==e.validatorAddr&&(t.validatorAddr=e.validatorAddr),void 0!==e.pagination&&(t.pagination=e.pagination?n.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=f();return r.validatorAddr=null!==(t=e.validatorAddr)&&void 0!==t?t:"",void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageRequest.fromPartial(e.pagination)),r}},t.QueryValidatorUnbondingDelegationsResponse={typeUrl:"/cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of e.unbondingResponses)i.UnbondingDelegation.encode(r,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&n.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),a=void 0===t?r.len:r.pos+t,s=h();for(;r.pos>>3){case 1:s.unbondingResponses.push(i.UnbondingDelegation.decode(r,r.uint32()));break;case 2:s.pagination=n.PageResponse.decode(r,r.uint32());break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=h();return Array.isArray(null==e?void 0:e.unbondingResponses)&&(t.unbondingResponses=e.unbondingResponses.map(e=>i.UnbondingDelegation.fromJSON(e))),(0,a.isSet)(e.pagination)&&(t.pagination=n.PageResponse.fromJSON(e.pagination)),t},toJSON(e){let t={};return e.unbondingResponses?t.unbondingResponses=e.unbondingResponses.map(e=>e?i.UnbondingDelegation.toJSON(e):void 0):t.unbondingResponses=[],void 0!==e.pagination&&(t.pagination=e.pagination?n.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=h();return r.unbondingResponses=(null===(t=e.unbondingResponses)||void 0===t?void 0:t.map(e=>i.UnbondingDelegation.fromPartial(e)))||[],void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageResponse.fromPartial(e.pagination)),r}},t.QueryDelegationRequest={typeUrl:"/cosmos.staking.v1beta1.QueryDelegationRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.delegatorAddr&&t.uint32(10).string(e.delegatorAddr),""!==e.validatorAddr&&t.uint32(18).string(e.validatorAddr),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=g();for(;r.pos>>3){case 1:i.delegatorAddr=r.string();break;case 2:i.validatorAddr=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=g();return(0,a.isSet)(e.delegatorAddr)&&(t.delegatorAddr=String(e.delegatorAddr)),(0,a.isSet)(e.validatorAddr)&&(t.validatorAddr=String(e.validatorAddr)),t},toJSON(e){let t={};return void 0!==e.delegatorAddr&&(t.delegatorAddr=e.delegatorAddr),void 0!==e.validatorAddr&&(t.validatorAddr=e.validatorAddr),t},fromPartial(e){var t,r;let n=g();return n.delegatorAddr=null!==(t=e.delegatorAddr)&&void 0!==t?t:"",n.validatorAddr=null!==(r=e.validatorAddr)&&void 0!==r?r:"",n}},t.QueryDelegationResponse={typeUrl:"/cosmos.staking.v1beta1.QueryDelegationResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return void 0!==e.delegationResponse&&i.DelegationResponse.encode(e.delegationResponse,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,a=m();for(;r.pos>>3==1?a.delegationResponse=i.DelegationResponse.decode(r,r.uint32()):r.skipType(7&e)}return a},fromJSON(e){let t=m();return(0,a.isSet)(e.delegationResponse)&&(t.delegationResponse=i.DelegationResponse.fromJSON(e.delegationResponse)),t},toJSON(e){let t={};return void 0!==e.delegationResponse&&(t.delegationResponse=e.delegationResponse?i.DelegationResponse.toJSON(e.delegationResponse):void 0),t},fromPartial(e){let t=m();return void 0!==e.delegationResponse&&null!==e.delegationResponse&&(t.delegationResponse=i.DelegationResponse.fromPartial(e.delegationResponse)),t}},t.QueryUnbondingDelegationRequest={typeUrl:"/cosmos.staking.v1beta1.QueryUnbondingDelegationRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.delegatorAddr&&t.uint32(10).string(e.delegatorAddr),""!==e.validatorAddr&&t.uint32(18).string(e.validatorAddr),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=y();for(;r.pos>>3){case 1:i.delegatorAddr=r.string();break;case 2:i.validatorAddr=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=y();return(0,a.isSet)(e.delegatorAddr)&&(t.delegatorAddr=String(e.delegatorAddr)),(0,a.isSet)(e.validatorAddr)&&(t.validatorAddr=String(e.validatorAddr)),t},toJSON(e){let t={};return void 0!==e.delegatorAddr&&(t.delegatorAddr=e.delegatorAddr),void 0!==e.validatorAddr&&(t.validatorAddr=e.validatorAddr),t},fromPartial(e){var t,r;let n=y();return n.delegatorAddr=null!==(t=e.delegatorAddr)&&void 0!==t?t:"",n.validatorAddr=null!==(r=e.validatorAddr)&&void 0!==r?r:"",n}},t.QueryUnbondingDelegationResponse={typeUrl:"/cosmos.staking.v1beta1.QueryUnbondingDelegationResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return void 0!==e.unbond&&i.UnbondingDelegation.encode(e.unbond,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,a=v();for(;r.pos>>3==1?a.unbond=i.UnbondingDelegation.decode(r,r.uint32()):r.skipType(7&e)}return a},fromJSON(e){let t=v();return(0,a.isSet)(e.unbond)&&(t.unbond=i.UnbondingDelegation.fromJSON(e.unbond)),t},toJSON(e){let t={};return void 0!==e.unbond&&(t.unbond=e.unbond?i.UnbondingDelegation.toJSON(e.unbond):void 0),t},fromPartial(e){let t=v();return void 0!==e.unbond&&null!==e.unbond&&(t.unbond=i.UnbondingDelegation.fromPartial(e.unbond)),t}},t.QueryDelegatorDelegationsRequest={typeUrl:"/cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.delegatorAddr&&t.uint32(10).string(e.delegatorAddr),void 0!==e.pagination&&n.PageRequest.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=b();for(;r.pos>>3){case 1:a.delegatorAddr=r.string();break;case 2:a.pagination=n.PageRequest.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=b();return(0,a.isSet)(e.delegatorAddr)&&(t.delegatorAddr=String(e.delegatorAddr)),(0,a.isSet)(e.pagination)&&(t.pagination=n.PageRequest.fromJSON(e.pagination)),t},toJSON(e){let t={};return void 0!==e.delegatorAddr&&(t.delegatorAddr=e.delegatorAddr),void 0!==e.pagination&&(t.pagination=e.pagination?n.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=b();return r.delegatorAddr=null!==(t=e.delegatorAddr)&&void 0!==t?t:"",void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageRequest.fromPartial(e.pagination)),r}},t.QueryDelegatorDelegationsResponse={typeUrl:"/cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of e.delegationResponses)i.DelegationResponse.encode(r,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&n.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),a=void 0===t?r.len:r.pos+t,s=S();for(;r.pos>>3){case 1:s.delegationResponses.push(i.DelegationResponse.decode(r,r.uint32()));break;case 2:s.pagination=n.PageResponse.decode(r,r.uint32());break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=S();return Array.isArray(null==e?void 0:e.delegationResponses)&&(t.delegationResponses=e.delegationResponses.map(e=>i.DelegationResponse.fromJSON(e))),(0,a.isSet)(e.pagination)&&(t.pagination=n.PageResponse.fromJSON(e.pagination)),t},toJSON(e){let t={};return e.delegationResponses?t.delegationResponses=e.delegationResponses.map(e=>e?i.DelegationResponse.toJSON(e):void 0):t.delegationResponses=[],void 0!==e.pagination&&(t.pagination=e.pagination?n.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=S();return r.delegationResponses=(null===(t=e.delegationResponses)||void 0===t?void 0:t.map(e=>i.DelegationResponse.fromPartial(e)))||[],void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageResponse.fromPartial(e.pagination)),r}},t.QueryDelegatorUnbondingDelegationsRequest={typeUrl:"/cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.delegatorAddr&&t.uint32(10).string(e.delegatorAddr),void 0!==e.pagination&&n.PageRequest.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=w();for(;r.pos>>3){case 1:a.delegatorAddr=r.string();break;case 2:a.pagination=n.PageRequest.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=w();return(0,a.isSet)(e.delegatorAddr)&&(t.delegatorAddr=String(e.delegatorAddr)),(0,a.isSet)(e.pagination)&&(t.pagination=n.PageRequest.fromJSON(e.pagination)),t},toJSON(e){let t={};return void 0!==e.delegatorAddr&&(t.delegatorAddr=e.delegatorAddr),void 0!==e.pagination&&(t.pagination=e.pagination?n.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=w();return r.delegatorAddr=null!==(t=e.delegatorAddr)&&void 0!==t?t:"",void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageRequest.fromPartial(e.pagination)),r}},t.QueryDelegatorUnbondingDelegationsResponse={typeUrl:"/cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of e.unbondingResponses)i.UnbondingDelegation.encode(r,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&n.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),a=void 0===t?r.len:r.pos+t,s=_();for(;r.pos>>3){case 1:s.unbondingResponses.push(i.UnbondingDelegation.decode(r,r.uint32()));break;case 2:s.pagination=n.PageResponse.decode(r,r.uint32());break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=_();return Array.isArray(null==e?void 0:e.unbondingResponses)&&(t.unbondingResponses=e.unbondingResponses.map(e=>i.UnbondingDelegation.fromJSON(e))),(0,a.isSet)(e.pagination)&&(t.pagination=n.PageResponse.fromJSON(e.pagination)),t},toJSON(e){let t={};return e.unbondingResponses?t.unbondingResponses=e.unbondingResponses.map(e=>e?i.UnbondingDelegation.toJSON(e):void 0):t.unbondingResponses=[],void 0!==e.pagination&&(t.pagination=e.pagination?n.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=_();return r.unbondingResponses=(null===(t=e.unbondingResponses)||void 0===t?void 0:t.map(e=>i.UnbondingDelegation.fromPartial(e)))||[],void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageResponse.fromPartial(e.pagination)),r}},t.QueryRedelegationsRequest={typeUrl:"/cosmos.staking.v1beta1.QueryRedelegationsRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.delegatorAddr&&t.uint32(10).string(e.delegatorAddr),""!==e.srcValidatorAddr&&t.uint32(18).string(e.srcValidatorAddr),""!==e.dstValidatorAddr&&t.uint32(26).string(e.dstValidatorAddr),void 0!==e.pagination&&n.PageRequest.encode(e.pagination,t.uint32(34).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=k();for(;r.pos>>3){case 1:a.delegatorAddr=r.string();break;case 2:a.srcValidatorAddr=r.string();break;case 3:a.dstValidatorAddr=r.string();break;case 4:a.pagination=n.PageRequest.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=k();return(0,a.isSet)(e.delegatorAddr)&&(t.delegatorAddr=String(e.delegatorAddr)),(0,a.isSet)(e.srcValidatorAddr)&&(t.srcValidatorAddr=String(e.srcValidatorAddr)),(0,a.isSet)(e.dstValidatorAddr)&&(t.dstValidatorAddr=String(e.dstValidatorAddr)),(0,a.isSet)(e.pagination)&&(t.pagination=n.PageRequest.fromJSON(e.pagination)),t},toJSON(e){let t={};return void 0!==e.delegatorAddr&&(t.delegatorAddr=e.delegatorAddr),void 0!==e.srcValidatorAddr&&(t.srcValidatorAddr=e.srcValidatorAddr),void 0!==e.dstValidatorAddr&&(t.dstValidatorAddr=e.dstValidatorAddr),void 0!==e.pagination&&(t.pagination=e.pagination?n.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){var t,r,i;let o=k();return o.delegatorAddr=null!==(t=e.delegatorAddr)&&void 0!==t?t:"",o.srcValidatorAddr=null!==(r=e.srcValidatorAddr)&&void 0!==r?r:"",o.dstValidatorAddr=null!==(i=e.dstValidatorAddr)&&void 0!==i?i:"",void 0!==e.pagination&&null!==e.pagination&&(o.pagination=n.PageRequest.fromPartial(e.pagination)),o}},t.QueryRedelegationsResponse={typeUrl:"/cosmos.staking.v1beta1.QueryRedelegationsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of e.redelegationResponses)i.RedelegationResponse.encode(r,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&n.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),a=void 0===t?r.len:r.pos+t,s=O();for(;r.pos>>3){case 1:s.redelegationResponses.push(i.RedelegationResponse.decode(r,r.uint32()));break;case 2:s.pagination=n.PageResponse.decode(r,r.uint32());break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=O();return Array.isArray(null==e?void 0:e.redelegationResponses)&&(t.redelegationResponses=e.redelegationResponses.map(e=>i.RedelegationResponse.fromJSON(e))),(0,a.isSet)(e.pagination)&&(t.pagination=n.PageResponse.fromJSON(e.pagination)),t},toJSON(e){let t={};return e.redelegationResponses?t.redelegationResponses=e.redelegationResponses.map(e=>e?i.RedelegationResponse.toJSON(e):void 0):t.redelegationResponses=[],void 0!==e.pagination&&(t.pagination=e.pagination?n.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=O();return r.redelegationResponses=(null===(t=e.redelegationResponses)||void 0===t?void 0:t.map(e=>i.RedelegationResponse.fromPartial(e)))||[],void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageResponse.fromPartial(e.pagination)),r}},t.QueryDelegatorValidatorsRequest={typeUrl:"/cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.delegatorAddr&&t.uint32(10).string(e.delegatorAddr),void 0!==e.pagination&&n.PageRequest.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=P();for(;r.pos>>3){case 1:a.delegatorAddr=r.string();break;case 2:a.pagination=n.PageRequest.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=P();return(0,a.isSet)(e.delegatorAddr)&&(t.delegatorAddr=String(e.delegatorAddr)),(0,a.isSet)(e.pagination)&&(t.pagination=n.PageRequest.fromJSON(e.pagination)),t},toJSON(e){let t={};return void 0!==e.delegatorAddr&&(t.delegatorAddr=e.delegatorAddr),void 0!==e.pagination&&(t.pagination=e.pagination?n.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=P();return r.delegatorAddr=null!==(t=e.delegatorAddr)&&void 0!==t?t:"",void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageRequest.fromPartial(e.pagination)),r}},t.QueryDelegatorValidatorsResponse={typeUrl:"/cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of e.validators)i.Validator.encode(r,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&n.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),a=void 0===t?r.len:r.pos+t,s=A();for(;r.pos>>3){case 1:s.validators.push(i.Validator.decode(r,r.uint32()));break;case 2:s.pagination=n.PageResponse.decode(r,r.uint32());break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=A();return Array.isArray(null==e?void 0:e.validators)&&(t.validators=e.validators.map(e=>i.Validator.fromJSON(e))),(0,a.isSet)(e.pagination)&&(t.pagination=n.PageResponse.fromJSON(e.pagination)),t},toJSON(e){let t={};return e.validators?t.validators=e.validators.map(e=>e?i.Validator.toJSON(e):void 0):t.validators=[],void 0!==e.pagination&&(t.pagination=e.pagination?n.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=A();return r.validators=(null===(t=e.validators)||void 0===t?void 0:t.map(e=>i.Validator.fromPartial(e)))||[],void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageResponse.fromPartial(e.pagination)),r}},t.QueryDelegatorValidatorRequest={typeUrl:"/cosmos.staking.v1beta1.QueryDelegatorValidatorRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.delegatorAddr&&t.uint32(10).string(e.delegatorAddr),""!==e.validatorAddr&&t.uint32(18).string(e.validatorAddr),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=I();for(;r.pos>>3){case 1:i.delegatorAddr=r.string();break;case 2:i.validatorAddr=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=I();return(0,a.isSet)(e.delegatorAddr)&&(t.delegatorAddr=String(e.delegatorAddr)),(0,a.isSet)(e.validatorAddr)&&(t.validatorAddr=String(e.validatorAddr)),t},toJSON(e){let t={};return void 0!==e.delegatorAddr&&(t.delegatorAddr=e.delegatorAddr),void 0!==e.validatorAddr&&(t.validatorAddr=e.validatorAddr),t},fromPartial(e){var t,r;let n=I();return n.delegatorAddr=null!==(t=e.delegatorAddr)&&void 0!==t?t:"",n.validatorAddr=null!==(r=e.validatorAddr)&&void 0!==r?r:"",n}},t.QueryDelegatorValidatorResponse={typeUrl:"/cosmos.staking.v1beta1.QueryDelegatorValidatorResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return void 0!==e.validator&&i.Validator.encode(e.validator,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,a=R();for(;r.pos>>3==1?a.validator=i.Validator.decode(r,r.uint32()):r.skipType(7&e)}return a},fromJSON(e){let t=R();return(0,a.isSet)(e.validator)&&(t.validator=i.Validator.fromJSON(e.validator)),t},toJSON(e){let t={};return void 0!==e.validator&&(t.validator=e.validator?i.Validator.toJSON(e.validator):void 0),t},fromPartial(e){let t=R();return void 0!==e.validator&&null!==e.validator&&(t.validator=i.Validator.fromPartial(e.validator)),t}},t.QueryHistoricalInfoRequest={typeUrl:"/cosmos.staking.v1beta1.QueryHistoricalInfoRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return e.height!==BigInt(0)&&t.uint32(8).int64(e.height),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=E();for(;r.pos>>3==1?i.height=r.int64():r.skipType(7&e)}return i},fromJSON(e){let t=E();return(0,a.isSet)(e.height)&&(t.height=BigInt(e.height.toString())),t},toJSON(e){let t={};return void 0!==e.height&&(t.height=(e.height||BigInt(0)).toString()),t},fromPartial(e){let t=E();return void 0!==e.height&&null!==e.height&&(t.height=BigInt(e.height.toString())),t}},t.QueryHistoricalInfoResponse={typeUrl:"/cosmos.staking.v1beta1.QueryHistoricalInfoResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return void 0!==e.hist&&i.HistoricalInfo.encode(e.hist,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,a=T();for(;r.pos>>3==1?a.hist=i.HistoricalInfo.decode(r,r.uint32()):r.skipType(7&e)}return a},fromJSON(e){let t=T();return(0,a.isSet)(e.hist)&&(t.hist=i.HistoricalInfo.fromJSON(e.hist)),t},toJSON(e){let t={};return void 0!==e.hist&&(t.hist=e.hist?i.HistoricalInfo.toJSON(e.hist):void 0),t},fromPartial(e){let t=T();return void 0!==e.hist&&null!==e.hist&&(t.hist=i.HistoricalInfo.fromPartial(e.hist)),t}},t.QueryPoolRequest={typeUrl:"/cosmos.staking.v1beta1.QueryPoolRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=N();for(;r.posN(),toJSON:e=>({}),fromPartial:e=>N()},t.QueryPoolResponse={typeUrl:"/cosmos.staking.v1beta1.QueryPoolResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return void 0!==e.pool&&i.Pool.encode(e.pool,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,a=x();for(;r.pos>>3==1?a.pool=i.Pool.decode(r,r.uint32()):r.skipType(7&e)}return a},fromJSON(e){let t=x();return(0,a.isSet)(e.pool)&&(t.pool=i.Pool.fromJSON(e.pool)),t},toJSON(e){let t={};return void 0!==e.pool&&(t.pool=e.pool?i.Pool.toJSON(e.pool):void 0),t},fromPartial(e){let t=x();return void 0!==e.pool&&null!==e.pool&&(t.pool=i.Pool.fromPartial(e.pool)),t}},t.QueryParamsRequest={typeUrl:"/cosmos.staking.v1beta1.QueryParamsRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=B();for(;r.posB(),toJSON:e=>({}),fromPartial:e=>B()},t.QueryParamsResponse={typeUrl:"/cosmos.staking.v1beta1.QueryParamsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return void 0!==e.params&&i.Params.encode(e.params,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,a=C();for(;r.pos>>3==1?a.params=i.Params.decode(r,r.uint32()):r.skipType(7&e)}return a},fromJSON(e){let t=C();return(0,a.isSet)(e.params)&&(t.params=i.Params.fromJSON(e.params)),t},toJSON(e){let t={};return void 0!==e.params&&(t.params=e.params?i.Params.toJSON(e.params):void 0),t},fromPartial(e){let t=C();return void 0!==e.params&&null!==e.params&&(t.params=i.Params.fromPartial(e.params)),t}};class M{Validators(e){let r=t.QueryValidatorsRequest.encode(e).finish();return this.rpc.request("cosmos.staking.v1beta1.Query","Validators",r).then(e=>t.QueryValidatorsResponse.decode(new o.BinaryReader(e)))}Validator(e){let r=t.QueryValidatorRequest.encode(e).finish();return this.rpc.request("cosmos.staking.v1beta1.Query","Validator",r).then(e=>t.QueryValidatorResponse.decode(new o.BinaryReader(e)))}ValidatorDelegations(e){let r=t.QueryValidatorDelegationsRequest.encode(e).finish();return this.rpc.request("cosmos.staking.v1beta1.Query","ValidatorDelegations",r).then(e=>t.QueryValidatorDelegationsResponse.decode(new o.BinaryReader(e)))}ValidatorUnbondingDelegations(e){let r=t.QueryValidatorUnbondingDelegationsRequest.encode(e).finish();return this.rpc.request("cosmos.staking.v1beta1.Query","ValidatorUnbondingDelegations",r).then(e=>t.QueryValidatorUnbondingDelegationsResponse.decode(new o.BinaryReader(e)))}Delegation(e){let r=t.QueryDelegationRequest.encode(e).finish();return this.rpc.request("cosmos.staking.v1beta1.Query","Delegation",r).then(e=>t.QueryDelegationResponse.decode(new o.BinaryReader(e)))}UnbondingDelegation(e){let r=t.QueryUnbondingDelegationRequest.encode(e).finish();return this.rpc.request("cosmos.staking.v1beta1.Query","UnbondingDelegation",r).then(e=>t.QueryUnbondingDelegationResponse.decode(new o.BinaryReader(e)))}DelegatorDelegations(e){let r=t.QueryDelegatorDelegationsRequest.encode(e).finish();return this.rpc.request("cosmos.staking.v1beta1.Query","DelegatorDelegations",r).then(e=>t.QueryDelegatorDelegationsResponse.decode(new o.BinaryReader(e)))}DelegatorUnbondingDelegations(e){let r=t.QueryDelegatorUnbondingDelegationsRequest.encode(e).finish();return this.rpc.request("cosmos.staking.v1beta1.Query","DelegatorUnbondingDelegations",r).then(e=>t.QueryDelegatorUnbondingDelegationsResponse.decode(new o.BinaryReader(e)))}Redelegations(e){let r=t.QueryRedelegationsRequest.encode(e).finish();return this.rpc.request("cosmos.staking.v1beta1.Query","Redelegations",r).then(e=>t.QueryRedelegationsResponse.decode(new o.BinaryReader(e)))}DelegatorValidators(e){let r=t.QueryDelegatorValidatorsRequest.encode(e).finish();return this.rpc.request("cosmos.staking.v1beta1.Query","DelegatorValidators",r).then(e=>t.QueryDelegatorValidatorsResponse.decode(new o.BinaryReader(e)))}DelegatorValidator(e){let r=t.QueryDelegatorValidatorRequest.encode(e).finish();return this.rpc.request("cosmos.staking.v1beta1.Query","DelegatorValidator",r).then(e=>t.QueryDelegatorValidatorResponse.decode(new o.BinaryReader(e)))}HistoricalInfo(e){let r=t.QueryHistoricalInfoRequest.encode(e).finish();return this.rpc.request("cosmos.staking.v1beta1.Query","HistoricalInfo",r).then(e=>t.QueryHistoricalInfoResponse.decode(new o.BinaryReader(e)))}Pool(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.QueryPoolRequest.encode(e).finish();return this.rpc.request("cosmos.staking.v1beta1.Query","Pool",r).then(e=>t.QueryPoolResponse.decode(new o.BinaryReader(e)))}Params(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.QueryParamsRequest.encode(e).finish();return this.rpc.request("cosmos.staking.v1beta1.Query","Params",r).then(e=>t.QueryParamsResponse.decode(new o.BinaryReader(e)))}constructor(e){this.rpc=e,this.Validators=this.Validators.bind(this),this.Validator=this.Validator.bind(this),this.ValidatorDelegations=this.ValidatorDelegations.bind(this),this.ValidatorUnbondingDelegations=this.ValidatorUnbondingDelegations.bind(this),this.Delegation=this.Delegation.bind(this),this.UnbondingDelegation=this.UnbondingDelegation.bind(this),this.DelegatorDelegations=this.DelegatorDelegations.bind(this),this.DelegatorUnbondingDelegations=this.DelegatorUnbondingDelegations.bind(this),this.Redelegations=this.Redelegations.bind(this),this.DelegatorValidators=this.DelegatorValidators.bind(this),this.DelegatorValidator=this.DelegatorValidator.bind(this),this.HistoricalInfo=this.HistoricalInfo.bind(this),this.Pool=this.Pool.bind(this),this.Params=this.Params.bind(this)}}t.QueryClientImpl=M},20534:function(e,t,r){"use strict";var n,i;Object.defineProperty(t,"__esModule",{value:!0}),t.ValidatorUpdates=t.Pool=t.RedelegationResponse=t.RedelegationEntryResponse=t.DelegationResponse=t.Params=t.Redelegation=t.RedelegationEntry=t.UnbondingDelegationEntry=t.UnbondingDelegation=t.Delegation=t.DVVTriplets=t.DVVTriplet=t.DVPairs=t.DVPair=t.ValAddresses=t.Validator=t.Description=t.Commission=t.CommissionRates=t.HistoricalInfo=t.infractionToJSON=t.infractionFromJSON=t.Infraction=t.bondStatusToJSON=t.bondStatusFromJSON=t.BondStatus=t.protobufPackage=void 0;let o=r(92585),a=r(9990),s=r(11879),l=r(84849),u=r(14841),d=r(52942),c=r(46554),p=r(99133);function f(e){switch(e){case 0:case"BOND_STATUS_UNSPECIFIED":return n.BOND_STATUS_UNSPECIFIED;case 1:case"BOND_STATUS_UNBONDED":return n.BOND_STATUS_UNBONDED;case 2:case"BOND_STATUS_UNBONDING":return n.BOND_STATUS_UNBONDING;case 3:case"BOND_STATUS_BONDED":return n.BOND_STATUS_BONDED;default:return n.UNRECOGNIZED}}function h(e){switch(e){case n.BOND_STATUS_UNSPECIFIED:return"BOND_STATUS_UNSPECIFIED";case n.BOND_STATUS_UNBONDED:return"BOND_STATUS_UNBONDED";case n.BOND_STATUS_UNBONDING:return"BOND_STATUS_UNBONDING";case n.BOND_STATUS_BONDED:return"BOND_STATUS_BONDED";case n.UNRECOGNIZED:default:return"UNRECOGNIZED"}}function g(e){switch(e){case 0:case"INFRACTION_UNSPECIFIED":return i.INFRACTION_UNSPECIFIED;case 1:case"INFRACTION_DOUBLE_SIGN":return i.INFRACTION_DOUBLE_SIGN;case 2:case"INFRACTION_DOWNTIME":return i.INFRACTION_DOWNTIME;default:return i.UNRECOGNIZED}}function m(e){switch(e){case i.INFRACTION_UNSPECIFIED:return"INFRACTION_UNSPECIFIED";case i.INFRACTION_DOUBLE_SIGN:return"INFRACTION_DOUBLE_SIGN";case i.INFRACTION_DOWNTIME:return"INFRACTION_DOWNTIME";case i.UNRECOGNIZED:default:return"UNRECOGNIZED"}}function y(){return{header:o.Header.fromPartial({}),valset:[]}}function v(){return{rate:"",maxRate:"",maxChangeRate:""}}function b(){return{commissionRates:t.CommissionRates.fromPartial({}),updateTime:a.Timestamp.fromPartial({})}}function S(){return{moniker:"",identity:"",website:"",securityContact:"",details:""}}function w(){return{operatorAddress:"",consensusPubkey:void 0,jailed:!1,status:0,tokens:"",delegatorShares:"",description:t.Description.fromPartial({}),unbondingHeight:BigInt(0),unbondingTime:a.Timestamp.fromPartial({}),commission:t.Commission.fromPartial({}),minSelfDelegation:"",unbondingOnHoldRefCount:BigInt(0),unbondingIds:[]}}function _(){return{addresses:[]}}function k(){return{delegatorAddress:"",validatorAddress:""}}function O(){return{pairs:[]}}function P(){return{delegatorAddress:"",validatorSrcAddress:"",validatorDstAddress:""}}function A(){return{triplets:[]}}function I(){return{delegatorAddress:"",validatorAddress:"",shares:""}}function R(){return{delegatorAddress:"",validatorAddress:"",entries:[]}}function E(){return{creationHeight:BigInt(0),completionTime:a.Timestamp.fromPartial({}),initialBalance:"",balance:"",unbondingId:BigInt(0),unbondingOnHoldRefCount:BigInt(0)}}function T(){return{creationHeight:BigInt(0),completionTime:a.Timestamp.fromPartial({}),initialBalance:"",sharesDst:"",unbondingId:BigInt(0),unbondingOnHoldRefCount:BigInt(0)}}function N(){return{delegatorAddress:"",validatorSrcAddress:"",validatorDstAddress:"",entries:[]}}function x(){return{unbondingTime:l.Duration.fromPartial({}),maxValidators:0,maxEntries:0,historicalEntries:0,bondDenom:"",minCommissionRate:""}}function B(){return{delegation:t.Delegation.fromPartial({}),balance:u.Coin.fromPartial({})}}function C(){return{redelegationEntry:t.RedelegationEntry.fromPartial({}),balance:""}}function M(){return{redelegation:t.Redelegation.fromPartial({}),entries:[]}}function D(){return{notBondedTokens:"",bondedTokens:""}}function U(){return{updates:[]}}t.protobufPackage="cosmos.staking.v1beta1",function(e){e[e.BOND_STATUS_UNSPECIFIED=0]="BOND_STATUS_UNSPECIFIED",e[e.BOND_STATUS_UNBONDED=1]="BOND_STATUS_UNBONDED",e[e.BOND_STATUS_UNBONDING=2]="BOND_STATUS_UNBONDING",e[e.BOND_STATUS_BONDED=3]="BOND_STATUS_BONDED",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(n||(t.BondStatus=n={})),t.bondStatusFromJSON=f,t.bondStatusToJSON=h,function(e){e[e.INFRACTION_UNSPECIFIED=0]="INFRACTION_UNSPECIFIED",e[e.INFRACTION_DOUBLE_SIGN=1]="INFRACTION_DOUBLE_SIGN",e[e.INFRACTION_DOWNTIME=2]="INFRACTION_DOWNTIME",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(i||(t.Infraction=i={})),t.infractionFromJSON=g,t.infractionToJSON=m,t.HistoricalInfo={typeUrl:"/cosmos.staking.v1beta1.HistoricalInfo",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.BinaryWriter.create();for(let n of(void 0!==e.header&&o.Header.encode(e.header,r.uint32(10).fork()).ldelim(),e.valset))t.Validator.encode(n,r.uint32(18).fork()).ldelim();return r},decode(e,r){let n=e instanceof c.BinaryReader?e:new c.BinaryReader(e),i=void 0===r?n.len:n.pos+r,a=y();for(;n.pos>>3){case 1:a.header=o.Header.decode(n,n.uint32());break;case 2:a.valset.push(t.Validator.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return a},fromJSON(e){let r=y();return(0,p.isSet)(e.header)&&(r.header=o.Header.fromJSON(e.header)),Array.isArray(null==e?void 0:e.valset)&&(r.valset=e.valset.map(e=>t.Validator.fromJSON(e))),r},toJSON(e){let r={};return void 0!==e.header&&(r.header=e.header?o.Header.toJSON(e.header):void 0),e.valset?r.valset=e.valset.map(e=>e?t.Validator.toJSON(e):void 0):r.valset=[],r},fromPartial(e){var r;let n=y();return void 0!==e.header&&null!==e.header&&(n.header=o.Header.fromPartial(e.header)),n.valset=(null===(r=e.valset)||void 0===r?void 0:r.map(e=>t.Validator.fromPartial(e)))||[],n}},t.CommissionRates={typeUrl:"/cosmos.staking.v1beta1.CommissionRates",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.BinaryWriter.create();return""!==e.rate&&t.uint32(10).string(e.rate),""!==e.maxRate&&t.uint32(18).string(e.maxRate),""!==e.maxChangeRate&&t.uint32(26).string(e.maxChangeRate),t},decode(e,t){let r=e instanceof c.BinaryReader?e:new c.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=v();for(;r.pos>>3){case 1:i.rate=r.string();break;case 2:i.maxRate=r.string();break;case 3:i.maxChangeRate=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=v();return(0,p.isSet)(e.rate)&&(t.rate=String(e.rate)),(0,p.isSet)(e.maxRate)&&(t.maxRate=String(e.maxRate)),(0,p.isSet)(e.maxChangeRate)&&(t.maxChangeRate=String(e.maxChangeRate)),t},toJSON(e){let t={};return void 0!==e.rate&&(t.rate=e.rate),void 0!==e.maxRate&&(t.maxRate=e.maxRate),void 0!==e.maxChangeRate&&(t.maxChangeRate=e.maxChangeRate),t},fromPartial(e){var t,r,n;let i=v();return i.rate=null!==(t=e.rate)&&void 0!==t?t:"",i.maxRate=null!==(r=e.maxRate)&&void 0!==r?r:"",i.maxChangeRate=null!==(n=e.maxChangeRate)&&void 0!==n?n:"",i}},t.Commission={typeUrl:"/cosmos.staking.v1beta1.Commission",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.BinaryWriter.create();return void 0!==e.commissionRates&&t.CommissionRates.encode(e.commissionRates,r.uint32(10).fork()).ldelim(),void 0!==e.updateTime&&a.Timestamp.encode(e.updateTime,r.uint32(18).fork()).ldelim(),r},decode(e,r){let n=e instanceof c.BinaryReader?e:new c.BinaryReader(e),i=void 0===r?n.len:n.pos+r,o=b();for(;n.pos>>3){case 1:o.commissionRates=t.CommissionRates.decode(n,n.uint32());break;case 2:o.updateTime=a.Timestamp.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){let r=b();return(0,p.isSet)(e.commissionRates)&&(r.commissionRates=t.CommissionRates.fromJSON(e.commissionRates)),(0,p.isSet)(e.updateTime)&&(r.updateTime=(0,p.fromJsonTimestamp)(e.updateTime)),r},toJSON(e){let r={};return void 0!==e.commissionRates&&(r.commissionRates=e.commissionRates?t.CommissionRates.toJSON(e.commissionRates):void 0),void 0!==e.updateTime&&(r.updateTime=(0,p.fromTimestamp)(e.updateTime).toISOString()),r},fromPartial(e){let r=b();return void 0!==e.commissionRates&&null!==e.commissionRates&&(r.commissionRates=t.CommissionRates.fromPartial(e.commissionRates)),void 0!==e.updateTime&&null!==e.updateTime&&(r.updateTime=a.Timestamp.fromPartial(e.updateTime)),r}},t.Description={typeUrl:"/cosmos.staking.v1beta1.Description",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.BinaryWriter.create();return""!==e.moniker&&t.uint32(10).string(e.moniker),""!==e.identity&&t.uint32(18).string(e.identity),""!==e.website&&t.uint32(26).string(e.website),""!==e.securityContact&&t.uint32(34).string(e.securityContact),""!==e.details&&t.uint32(42).string(e.details),t},decode(e,t){let r=e instanceof c.BinaryReader?e:new c.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=S();for(;r.pos>>3){case 1:i.moniker=r.string();break;case 2:i.identity=r.string();break;case 3:i.website=r.string();break;case 4:i.securityContact=r.string();break;case 5:i.details=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=S();return(0,p.isSet)(e.moniker)&&(t.moniker=String(e.moniker)),(0,p.isSet)(e.identity)&&(t.identity=String(e.identity)),(0,p.isSet)(e.website)&&(t.website=String(e.website)),(0,p.isSet)(e.securityContact)&&(t.securityContact=String(e.securityContact)),(0,p.isSet)(e.details)&&(t.details=String(e.details)),t},toJSON(e){let t={};return void 0!==e.moniker&&(t.moniker=e.moniker),void 0!==e.identity&&(t.identity=e.identity),void 0!==e.website&&(t.website=e.website),void 0!==e.securityContact&&(t.securityContact=e.securityContact),void 0!==e.details&&(t.details=e.details),t},fromPartial(e){var t,r,n,i,o;let a=S();return a.moniker=null!==(t=e.moniker)&&void 0!==t?t:"",a.identity=null!==(r=e.identity)&&void 0!==r?r:"",a.website=null!==(n=e.website)&&void 0!==n?n:"",a.securityContact=null!==(i=e.securityContact)&&void 0!==i?i:"",a.details=null!==(o=e.details)&&void 0!==o?o:"",a}},t.Validator={typeUrl:"/cosmos.staking.v1beta1.Validator",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.BinaryWriter.create();for(let n of(""!==e.operatorAddress&&r.uint32(10).string(e.operatorAddress),void 0!==e.consensusPubkey&&s.Any.encode(e.consensusPubkey,r.uint32(18).fork()).ldelim(),!0===e.jailed&&r.uint32(24).bool(e.jailed),0!==e.status&&r.uint32(32).int32(e.status),""!==e.tokens&&r.uint32(42).string(e.tokens),""!==e.delegatorShares&&r.uint32(50).string(e.delegatorShares),void 0!==e.description&&t.Description.encode(e.description,r.uint32(58).fork()).ldelim(),e.unbondingHeight!==BigInt(0)&&r.uint32(64).int64(e.unbondingHeight),void 0!==e.unbondingTime&&a.Timestamp.encode(e.unbondingTime,r.uint32(74).fork()).ldelim(),void 0!==e.commission&&t.Commission.encode(e.commission,r.uint32(82).fork()).ldelim(),""!==e.minSelfDelegation&&r.uint32(90).string(e.minSelfDelegation),e.unbondingOnHoldRefCount!==BigInt(0)&&r.uint32(96).int64(e.unbondingOnHoldRefCount),r.uint32(106).fork(),e.unbondingIds))r.uint64(n);return r.ldelim(),r},decode(e,r){let n=e instanceof c.BinaryReader?e:new c.BinaryReader(e),i=void 0===r?n.len:n.pos+r,o=w();for(;n.pos>>3){case 1:o.operatorAddress=n.string();break;case 2:o.consensusPubkey=s.Any.decode(n,n.uint32());break;case 3:o.jailed=n.bool();break;case 4:o.status=n.int32();break;case 5:o.tokens=n.string();break;case 6:o.delegatorShares=n.string();break;case 7:o.description=t.Description.decode(n,n.uint32());break;case 8:o.unbondingHeight=n.int64();break;case 9:o.unbondingTime=a.Timestamp.decode(n,n.uint32());break;case 10:o.commission=t.Commission.decode(n,n.uint32());break;case 11:o.minSelfDelegation=n.string();break;case 12:o.unbondingOnHoldRefCount=n.int64();break;case 13:if((7&e)==2){let e=n.uint32()+n.pos;for(;n.posBigInt(e.toString()))),r},toJSON(e){let r={};return void 0!==e.operatorAddress&&(r.operatorAddress=e.operatorAddress),void 0!==e.consensusPubkey&&(r.consensusPubkey=e.consensusPubkey?s.Any.toJSON(e.consensusPubkey):void 0),void 0!==e.jailed&&(r.jailed=e.jailed),void 0!==e.status&&(r.status=h(e.status)),void 0!==e.tokens&&(r.tokens=e.tokens),void 0!==e.delegatorShares&&(r.delegatorShares=e.delegatorShares),void 0!==e.description&&(r.description=e.description?t.Description.toJSON(e.description):void 0),void 0!==e.unbondingHeight&&(r.unbondingHeight=(e.unbondingHeight||BigInt(0)).toString()),void 0!==e.unbondingTime&&(r.unbondingTime=(0,p.fromTimestamp)(e.unbondingTime).toISOString()),void 0!==e.commission&&(r.commission=e.commission?t.Commission.toJSON(e.commission):void 0),void 0!==e.minSelfDelegation&&(r.minSelfDelegation=e.minSelfDelegation),void 0!==e.unbondingOnHoldRefCount&&(r.unbondingOnHoldRefCount=(e.unbondingOnHoldRefCount||BigInt(0)).toString()),e.unbondingIds?r.unbondingIds=e.unbondingIds.map(e=>(e||BigInt(0)).toString()):r.unbondingIds=[],r},fromPartial(e){var r,n,i,o,l,u,d;let c=w();return c.operatorAddress=null!==(n=e.operatorAddress)&&void 0!==n?n:"",void 0!==e.consensusPubkey&&null!==e.consensusPubkey&&(c.consensusPubkey=s.Any.fromPartial(e.consensusPubkey)),c.jailed=null!==(i=e.jailed)&&void 0!==i&&i,c.status=null!==(o=e.status)&&void 0!==o?o:0,c.tokens=null!==(l=e.tokens)&&void 0!==l?l:"",c.delegatorShares=null!==(u=e.delegatorShares)&&void 0!==u?u:"",void 0!==e.description&&null!==e.description&&(c.description=t.Description.fromPartial(e.description)),void 0!==e.unbondingHeight&&null!==e.unbondingHeight&&(c.unbondingHeight=BigInt(e.unbondingHeight.toString())),void 0!==e.unbondingTime&&null!==e.unbondingTime&&(c.unbondingTime=a.Timestamp.fromPartial(e.unbondingTime)),void 0!==e.commission&&null!==e.commission&&(c.commission=t.Commission.fromPartial(e.commission)),c.minSelfDelegation=null!==(d=e.minSelfDelegation)&&void 0!==d?d:"",void 0!==e.unbondingOnHoldRefCount&&null!==e.unbondingOnHoldRefCount&&(c.unbondingOnHoldRefCount=BigInt(e.unbondingOnHoldRefCount.toString())),c.unbondingIds=(null===(r=e.unbondingIds)||void 0===r?void 0:r.map(e=>BigInt(e.toString())))||[],c}},t.ValAddresses={typeUrl:"/cosmos.staking.v1beta1.ValAddresses",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.BinaryWriter.create();for(let r of e.addresses)t.uint32(10).string(r);return t},decode(e,t){let r=e instanceof c.BinaryReader?e:new c.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=_();for(;r.pos>>3==1?i.addresses.push(r.string()):r.skipType(7&e)}return i},fromJSON(e){let t=_();return Array.isArray(null==e?void 0:e.addresses)&&(t.addresses=e.addresses.map(e=>String(e))),t},toJSON(e){let t={};return e.addresses?t.addresses=e.addresses.map(e=>e):t.addresses=[],t},fromPartial(e){var t;let r=_();return r.addresses=(null===(t=e.addresses)||void 0===t?void 0:t.map(e=>e))||[],r}},t.DVPair={typeUrl:"/cosmos.staking.v1beta1.DVPair",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.BinaryWriter.create();return""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),""!==e.validatorAddress&&t.uint32(18).string(e.validatorAddress),t},decode(e,t){let r=e instanceof c.BinaryReader?e:new c.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=k();for(;r.pos>>3){case 1:i.delegatorAddress=r.string();break;case 2:i.validatorAddress=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=k();return(0,p.isSet)(e.delegatorAddress)&&(t.delegatorAddress=String(e.delegatorAddress)),(0,p.isSet)(e.validatorAddress)&&(t.validatorAddress=String(e.validatorAddress)),t},toJSON(e){let t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),t},fromPartial(e){var t,r;let n=k();return n.delegatorAddress=null!==(t=e.delegatorAddress)&&void 0!==t?t:"",n.validatorAddress=null!==(r=e.validatorAddress)&&void 0!==r?r:"",n}},t.DVPairs={typeUrl:"/cosmos.staking.v1beta1.DVPairs",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.BinaryWriter.create();for(let n of e.pairs)t.DVPair.encode(n,r.uint32(10).fork()).ldelim();return r},decode(e,r){let n=e instanceof c.BinaryReader?e:new c.BinaryReader(e),i=void 0===r?n.len:n.pos+r,o=O();for(;n.pos>>3==1?o.pairs.push(t.DVPair.decode(n,n.uint32())):n.skipType(7&e)}return o},fromJSON(e){let r=O();return Array.isArray(null==e?void 0:e.pairs)&&(r.pairs=e.pairs.map(e=>t.DVPair.fromJSON(e))),r},toJSON(e){let r={};return e.pairs?r.pairs=e.pairs.map(e=>e?t.DVPair.toJSON(e):void 0):r.pairs=[],r},fromPartial(e){var r;let n=O();return n.pairs=(null===(r=e.pairs)||void 0===r?void 0:r.map(e=>t.DVPair.fromPartial(e)))||[],n}},t.DVVTriplet={typeUrl:"/cosmos.staking.v1beta1.DVVTriplet",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.BinaryWriter.create();return""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),""!==e.validatorSrcAddress&&t.uint32(18).string(e.validatorSrcAddress),""!==e.validatorDstAddress&&t.uint32(26).string(e.validatorDstAddress),t},decode(e,t){let r=e instanceof c.BinaryReader?e:new c.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=P();for(;r.pos>>3){case 1:i.delegatorAddress=r.string();break;case 2:i.validatorSrcAddress=r.string();break;case 3:i.validatorDstAddress=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=P();return(0,p.isSet)(e.delegatorAddress)&&(t.delegatorAddress=String(e.delegatorAddress)),(0,p.isSet)(e.validatorSrcAddress)&&(t.validatorSrcAddress=String(e.validatorSrcAddress)),(0,p.isSet)(e.validatorDstAddress)&&(t.validatorDstAddress=String(e.validatorDstAddress)),t},toJSON(e){let t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.validatorSrcAddress&&(t.validatorSrcAddress=e.validatorSrcAddress),void 0!==e.validatorDstAddress&&(t.validatorDstAddress=e.validatorDstAddress),t},fromPartial(e){var t,r,n;let i=P();return i.delegatorAddress=null!==(t=e.delegatorAddress)&&void 0!==t?t:"",i.validatorSrcAddress=null!==(r=e.validatorSrcAddress)&&void 0!==r?r:"",i.validatorDstAddress=null!==(n=e.validatorDstAddress)&&void 0!==n?n:"",i}},t.DVVTriplets={typeUrl:"/cosmos.staking.v1beta1.DVVTriplets",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.BinaryWriter.create();for(let n of e.triplets)t.DVVTriplet.encode(n,r.uint32(10).fork()).ldelim();return r},decode(e,r){let n=e instanceof c.BinaryReader?e:new c.BinaryReader(e),i=void 0===r?n.len:n.pos+r,o=A();for(;n.pos>>3==1?o.triplets.push(t.DVVTriplet.decode(n,n.uint32())):n.skipType(7&e)}return o},fromJSON(e){let r=A();return Array.isArray(null==e?void 0:e.triplets)&&(r.triplets=e.triplets.map(e=>t.DVVTriplet.fromJSON(e))),r},toJSON(e){let r={};return e.triplets?r.triplets=e.triplets.map(e=>e?t.DVVTriplet.toJSON(e):void 0):r.triplets=[],r},fromPartial(e){var r;let n=A();return n.triplets=(null===(r=e.triplets)||void 0===r?void 0:r.map(e=>t.DVVTriplet.fromPartial(e)))||[],n}},t.Delegation={typeUrl:"/cosmos.staking.v1beta1.Delegation",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.BinaryWriter.create();return""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),""!==e.validatorAddress&&t.uint32(18).string(e.validatorAddress),""!==e.shares&&t.uint32(26).string(e.shares),t},decode(e,t){let r=e instanceof c.BinaryReader?e:new c.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=I();for(;r.pos>>3){case 1:i.delegatorAddress=r.string();break;case 2:i.validatorAddress=r.string();break;case 3:i.shares=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=I();return(0,p.isSet)(e.delegatorAddress)&&(t.delegatorAddress=String(e.delegatorAddress)),(0,p.isSet)(e.validatorAddress)&&(t.validatorAddress=String(e.validatorAddress)),(0,p.isSet)(e.shares)&&(t.shares=String(e.shares)),t},toJSON(e){let t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),void 0!==e.shares&&(t.shares=e.shares),t},fromPartial(e){var t,r,n;let i=I();return i.delegatorAddress=null!==(t=e.delegatorAddress)&&void 0!==t?t:"",i.validatorAddress=null!==(r=e.validatorAddress)&&void 0!==r?r:"",i.shares=null!==(n=e.shares)&&void 0!==n?n:"",i}},t.UnbondingDelegation={typeUrl:"/cosmos.staking.v1beta1.UnbondingDelegation",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.BinaryWriter.create();for(let n of(""!==e.delegatorAddress&&r.uint32(10).string(e.delegatorAddress),""!==e.validatorAddress&&r.uint32(18).string(e.validatorAddress),e.entries))t.UnbondingDelegationEntry.encode(n,r.uint32(26).fork()).ldelim();return r},decode(e,r){let n=e instanceof c.BinaryReader?e:new c.BinaryReader(e),i=void 0===r?n.len:n.pos+r,o=R();for(;n.pos>>3){case 1:o.delegatorAddress=n.string();break;case 2:o.validatorAddress=n.string();break;case 3:o.entries.push(t.UnbondingDelegationEntry.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return o},fromJSON(e){let r=R();return(0,p.isSet)(e.delegatorAddress)&&(r.delegatorAddress=String(e.delegatorAddress)),(0,p.isSet)(e.validatorAddress)&&(r.validatorAddress=String(e.validatorAddress)),Array.isArray(null==e?void 0:e.entries)&&(r.entries=e.entries.map(e=>t.UnbondingDelegationEntry.fromJSON(e))),r},toJSON(e){let r={};return void 0!==e.delegatorAddress&&(r.delegatorAddress=e.delegatorAddress),void 0!==e.validatorAddress&&(r.validatorAddress=e.validatorAddress),e.entries?r.entries=e.entries.map(e=>e?t.UnbondingDelegationEntry.toJSON(e):void 0):r.entries=[],r},fromPartial(e){var r,n,i;let o=R();return o.delegatorAddress=null!==(n=e.delegatorAddress)&&void 0!==n?n:"",o.validatorAddress=null!==(i=e.validatorAddress)&&void 0!==i?i:"",o.entries=(null===(r=e.entries)||void 0===r?void 0:r.map(e=>t.UnbondingDelegationEntry.fromPartial(e)))||[],o}},t.UnbondingDelegationEntry={typeUrl:"/cosmos.staking.v1beta1.UnbondingDelegationEntry",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.BinaryWriter.create();return e.creationHeight!==BigInt(0)&&t.uint32(8).int64(e.creationHeight),void 0!==e.completionTime&&a.Timestamp.encode(e.completionTime,t.uint32(18).fork()).ldelim(),""!==e.initialBalance&&t.uint32(26).string(e.initialBalance),""!==e.balance&&t.uint32(34).string(e.balance),e.unbondingId!==BigInt(0)&&t.uint32(40).uint64(e.unbondingId),e.unbondingOnHoldRefCount!==BigInt(0)&&t.uint32(48).int64(e.unbondingOnHoldRefCount),t},decode(e,t){let r=e instanceof c.BinaryReader?e:new c.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=E();for(;r.pos>>3){case 1:i.creationHeight=r.int64();break;case 2:i.completionTime=a.Timestamp.decode(r,r.uint32());break;case 3:i.initialBalance=r.string();break;case 4:i.balance=r.string();break;case 5:i.unbondingId=r.uint64();break;case 6:i.unbondingOnHoldRefCount=r.int64();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=E();return(0,p.isSet)(e.creationHeight)&&(t.creationHeight=BigInt(e.creationHeight.toString())),(0,p.isSet)(e.completionTime)&&(t.completionTime=(0,p.fromJsonTimestamp)(e.completionTime)),(0,p.isSet)(e.initialBalance)&&(t.initialBalance=String(e.initialBalance)),(0,p.isSet)(e.balance)&&(t.balance=String(e.balance)),(0,p.isSet)(e.unbondingId)&&(t.unbondingId=BigInt(e.unbondingId.toString())),(0,p.isSet)(e.unbondingOnHoldRefCount)&&(t.unbondingOnHoldRefCount=BigInt(e.unbondingOnHoldRefCount.toString())),t},toJSON(e){let t={};return void 0!==e.creationHeight&&(t.creationHeight=(e.creationHeight||BigInt(0)).toString()),void 0!==e.completionTime&&(t.completionTime=(0,p.fromTimestamp)(e.completionTime).toISOString()),void 0!==e.initialBalance&&(t.initialBalance=e.initialBalance),void 0!==e.balance&&(t.balance=e.balance),void 0!==e.unbondingId&&(t.unbondingId=(e.unbondingId||BigInt(0)).toString()),void 0!==e.unbondingOnHoldRefCount&&(t.unbondingOnHoldRefCount=(e.unbondingOnHoldRefCount||BigInt(0)).toString()),t},fromPartial(e){var t,r;let n=E();return void 0!==e.creationHeight&&null!==e.creationHeight&&(n.creationHeight=BigInt(e.creationHeight.toString())),void 0!==e.completionTime&&null!==e.completionTime&&(n.completionTime=a.Timestamp.fromPartial(e.completionTime)),n.initialBalance=null!==(t=e.initialBalance)&&void 0!==t?t:"",n.balance=null!==(r=e.balance)&&void 0!==r?r:"",void 0!==e.unbondingId&&null!==e.unbondingId&&(n.unbondingId=BigInt(e.unbondingId.toString())),void 0!==e.unbondingOnHoldRefCount&&null!==e.unbondingOnHoldRefCount&&(n.unbondingOnHoldRefCount=BigInt(e.unbondingOnHoldRefCount.toString())),n}},t.RedelegationEntry={typeUrl:"/cosmos.staking.v1beta1.RedelegationEntry",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.BinaryWriter.create();return e.creationHeight!==BigInt(0)&&t.uint32(8).int64(e.creationHeight),void 0!==e.completionTime&&a.Timestamp.encode(e.completionTime,t.uint32(18).fork()).ldelim(),""!==e.initialBalance&&t.uint32(26).string(e.initialBalance),""!==e.sharesDst&&t.uint32(34).string(e.sharesDst),e.unbondingId!==BigInt(0)&&t.uint32(40).uint64(e.unbondingId),e.unbondingOnHoldRefCount!==BigInt(0)&&t.uint32(48).int64(e.unbondingOnHoldRefCount),t},decode(e,t){let r=e instanceof c.BinaryReader?e:new c.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=T();for(;r.pos>>3){case 1:i.creationHeight=r.int64();break;case 2:i.completionTime=a.Timestamp.decode(r,r.uint32());break;case 3:i.initialBalance=r.string();break;case 4:i.sharesDst=r.string();break;case 5:i.unbondingId=r.uint64();break;case 6:i.unbondingOnHoldRefCount=r.int64();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=T();return(0,p.isSet)(e.creationHeight)&&(t.creationHeight=BigInt(e.creationHeight.toString())),(0,p.isSet)(e.completionTime)&&(t.completionTime=(0,p.fromJsonTimestamp)(e.completionTime)),(0,p.isSet)(e.initialBalance)&&(t.initialBalance=String(e.initialBalance)),(0,p.isSet)(e.sharesDst)&&(t.sharesDst=String(e.sharesDst)),(0,p.isSet)(e.unbondingId)&&(t.unbondingId=BigInt(e.unbondingId.toString())),(0,p.isSet)(e.unbondingOnHoldRefCount)&&(t.unbondingOnHoldRefCount=BigInt(e.unbondingOnHoldRefCount.toString())),t},toJSON(e){let t={};return void 0!==e.creationHeight&&(t.creationHeight=(e.creationHeight||BigInt(0)).toString()),void 0!==e.completionTime&&(t.completionTime=(0,p.fromTimestamp)(e.completionTime).toISOString()),void 0!==e.initialBalance&&(t.initialBalance=e.initialBalance),void 0!==e.sharesDst&&(t.sharesDst=e.sharesDst),void 0!==e.unbondingId&&(t.unbondingId=(e.unbondingId||BigInt(0)).toString()),void 0!==e.unbondingOnHoldRefCount&&(t.unbondingOnHoldRefCount=(e.unbondingOnHoldRefCount||BigInt(0)).toString()),t},fromPartial(e){var t,r;let n=T();return void 0!==e.creationHeight&&null!==e.creationHeight&&(n.creationHeight=BigInt(e.creationHeight.toString())),void 0!==e.completionTime&&null!==e.completionTime&&(n.completionTime=a.Timestamp.fromPartial(e.completionTime)),n.initialBalance=null!==(t=e.initialBalance)&&void 0!==t?t:"",n.sharesDst=null!==(r=e.sharesDst)&&void 0!==r?r:"",void 0!==e.unbondingId&&null!==e.unbondingId&&(n.unbondingId=BigInt(e.unbondingId.toString())),void 0!==e.unbondingOnHoldRefCount&&null!==e.unbondingOnHoldRefCount&&(n.unbondingOnHoldRefCount=BigInt(e.unbondingOnHoldRefCount.toString())),n}},t.Redelegation={typeUrl:"/cosmos.staking.v1beta1.Redelegation",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.BinaryWriter.create();for(let n of(""!==e.delegatorAddress&&r.uint32(10).string(e.delegatorAddress),""!==e.validatorSrcAddress&&r.uint32(18).string(e.validatorSrcAddress),""!==e.validatorDstAddress&&r.uint32(26).string(e.validatorDstAddress),e.entries))t.RedelegationEntry.encode(n,r.uint32(34).fork()).ldelim();return r},decode(e,r){let n=e instanceof c.BinaryReader?e:new c.BinaryReader(e),i=void 0===r?n.len:n.pos+r,o=N();for(;n.pos>>3){case 1:o.delegatorAddress=n.string();break;case 2:o.validatorSrcAddress=n.string();break;case 3:o.validatorDstAddress=n.string();break;case 4:o.entries.push(t.RedelegationEntry.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return o},fromJSON(e){let r=N();return(0,p.isSet)(e.delegatorAddress)&&(r.delegatorAddress=String(e.delegatorAddress)),(0,p.isSet)(e.validatorSrcAddress)&&(r.validatorSrcAddress=String(e.validatorSrcAddress)),(0,p.isSet)(e.validatorDstAddress)&&(r.validatorDstAddress=String(e.validatorDstAddress)),Array.isArray(null==e?void 0:e.entries)&&(r.entries=e.entries.map(e=>t.RedelegationEntry.fromJSON(e))),r},toJSON(e){let r={};return void 0!==e.delegatorAddress&&(r.delegatorAddress=e.delegatorAddress),void 0!==e.validatorSrcAddress&&(r.validatorSrcAddress=e.validatorSrcAddress),void 0!==e.validatorDstAddress&&(r.validatorDstAddress=e.validatorDstAddress),e.entries?r.entries=e.entries.map(e=>e?t.RedelegationEntry.toJSON(e):void 0):r.entries=[],r},fromPartial(e){var r,n,i,o;let a=N();return a.delegatorAddress=null!==(n=e.delegatorAddress)&&void 0!==n?n:"",a.validatorSrcAddress=null!==(i=e.validatorSrcAddress)&&void 0!==i?i:"",a.validatorDstAddress=null!==(o=e.validatorDstAddress)&&void 0!==o?o:"",a.entries=(null===(r=e.entries)||void 0===r?void 0:r.map(e=>t.RedelegationEntry.fromPartial(e)))||[],a}},t.Params={typeUrl:"/cosmos.staking.v1beta1.Params",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.BinaryWriter.create();return void 0!==e.unbondingTime&&l.Duration.encode(e.unbondingTime,t.uint32(10).fork()).ldelim(),0!==e.maxValidators&&t.uint32(16).uint32(e.maxValidators),0!==e.maxEntries&&t.uint32(24).uint32(e.maxEntries),0!==e.historicalEntries&&t.uint32(32).uint32(e.historicalEntries),""!==e.bondDenom&&t.uint32(42).string(e.bondDenom),""!==e.minCommissionRate&&t.uint32(50).string(e.minCommissionRate),t},decode(e,t){let r=e instanceof c.BinaryReader?e:new c.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=x();for(;r.pos>>3){case 1:i.unbondingTime=l.Duration.decode(r,r.uint32());break;case 2:i.maxValidators=r.uint32();break;case 3:i.maxEntries=r.uint32();break;case 4:i.historicalEntries=r.uint32();break;case 5:i.bondDenom=r.string();break;case 6:i.minCommissionRate=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=x();return(0,p.isSet)(e.unbondingTime)&&(t.unbondingTime=l.Duration.fromJSON(e.unbondingTime)),(0,p.isSet)(e.maxValidators)&&(t.maxValidators=Number(e.maxValidators)),(0,p.isSet)(e.maxEntries)&&(t.maxEntries=Number(e.maxEntries)),(0,p.isSet)(e.historicalEntries)&&(t.historicalEntries=Number(e.historicalEntries)),(0,p.isSet)(e.bondDenom)&&(t.bondDenom=String(e.bondDenom)),(0,p.isSet)(e.minCommissionRate)&&(t.minCommissionRate=String(e.minCommissionRate)),t},toJSON(e){let t={};return void 0!==e.unbondingTime&&(t.unbondingTime=e.unbondingTime?l.Duration.toJSON(e.unbondingTime):void 0),void 0!==e.maxValidators&&(t.maxValidators=Math.round(e.maxValidators)),void 0!==e.maxEntries&&(t.maxEntries=Math.round(e.maxEntries)),void 0!==e.historicalEntries&&(t.historicalEntries=Math.round(e.historicalEntries)),void 0!==e.bondDenom&&(t.bondDenom=e.bondDenom),void 0!==e.minCommissionRate&&(t.minCommissionRate=e.minCommissionRate),t},fromPartial(e){var t,r,n,i,o;let a=x();return void 0!==e.unbondingTime&&null!==e.unbondingTime&&(a.unbondingTime=l.Duration.fromPartial(e.unbondingTime)),a.maxValidators=null!==(t=e.maxValidators)&&void 0!==t?t:0,a.maxEntries=null!==(r=e.maxEntries)&&void 0!==r?r:0,a.historicalEntries=null!==(n=e.historicalEntries)&&void 0!==n?n:0,a.bondDenom=null!==(i=e.bondDenom)&&void 0!==i?i:"",a.minCommissionRate=null!==(o=e.minCommissionRate)&&void 0!==o?o:"",a}},t.DelegationResponse={typeUrl:"/cosmos.staking.v1beta1.DelegationResponse",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.BinaryWriter.create();return void 0!==e.delegation&&t.Delegation.encode(e.delegation,r.uint32(10).fork()).ldelim(),void 0!==e.balance&&u.Coin.encode(e.balance,r.uint32(18).fork()).ldelim(),r},decode(e,r){let n=e instanceof c.BinaryReader?e:new c.BinaryReader(e),i=void 0===r?n.len:n.pos+r,o=B();for(;n.pos>>3){case 1:o.delegation=t.Delegation.decode(n,n.uint32());break;case 2:o.balance=u.Coin.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){let r=B();return(0,p.isSet)(e.delegation)&&(r.delegation=t.Delegation.fromJSON(e.delegation)),(0,p.isSet)(e.balance)&&(r.balance=u.Coin.fromJSON(e.balance)),r},toJSON(e){let r={};return void 0!==e.delegation&&(r.delegation=e.delegation?t.Delegation.toJSON(e.delegation):void 0),void 0!==e.balance&&(r.balance=e.balance?u.Coin.toJSON(e.balance):void 0),r},fromPartial(e){let r=B();return void 0!==e.delegation&&null!==e.delegation&&(r.delegation=t.Delegation.fromPartial(e.delegation)),void 0!==e.balance&&null!==e.balance&&(r.balance=u.Coin.fromPartial(e.balance)),r}},t.RedelegationEntryResponse={typeUrl:"/cosmos.staking.v1beta1.RedelegationEntryResponse",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.BinaryWriter.create();return void 0!==e.redelegationEntry&&t.RedelegationEntry.encode(e.redelegationEntry,r.uint32(10).fork()).ldelim(),""!==e.balance&&r.uint32(34).string(e.balance),r},decode(e,r){let n=e instanceof c.BinaryReader?e:new c.BinaryReader(e),i=void 0===r?n.len:n.pos+r,o=C();for(;n.pos>>3){case 1:o.redelegationEntry=t.RedelegationEntry.decode(n,n.uint32());break;case 4:o.balance=n.string();break;default:n.skipType(7&e)}}return o},fromJSON(e){let r=C();return(0,p.isSet)(e.redelegationEntry)&&(r.redelegationEntry=t.RedelegationEntry.fromJSON(e.redelegationEntry)),(0,p.isSet)(e.balance)&&(r.balance=String(e.balance)),r},toJSON(e){let r={};return void 0!==e.redelegationEntry&&(r.redelegationEntry=e.redelegationEntry?t.RedelegationEntry.toJSON(e.redelegationEntry):void 0),void 0!==e.balance&&(r.balance=e.balance),r},fromPartial(e){var r;let n=C();return void 0!==e.redelegationEntry&&null!==e.redelegationEntry&&(n.redelegationEntry=t.RedelegationEntry.fromPartial(e.redelegationEntry)),n.balance=null!==(r=e.balance)&&void 0!==r?r:"",n}},t.RedelegationResponse={typeUrl:"/cosmos.staking.v1beta1.RedelegationResponse",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.BinaryWriter.create();for(let n of(void 0!==e.redelegation&&t.Redelegation.encode(e.redelegation,r.uint32(10).fork()).ldelim(),e.entries))t.RedelegationEntryResponse.encode(n,r.uint32(18).fork()).ldelim();return r},decode(e,r){let n=e instanceof c.BinaryReader?e:new c.BinaryReader(e),i=void 0===r?n.len:n.pos+r,o=M();for(;n.pos>>3){case 1:o.redelegation=t.Redelegation.decode(n,n.uint32());break;case 2:o.entries.push(t.RedelegationEntryResponse.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return o},fromJSON(e){let r=M();return(0,p.isSet)(e.redelegation)&&(r.redelegation=t.Redelegation.fromJSON(e.redelegation)),Array.isArray(null==e?void 0:e.entries)&&(r.entries=e.entries.map(e=>t.RedelegationEntryResponse.fromJSON(e))),r},toJSON(e){let r={};return void 0!==e.redelegation&&(r.redelegation=e.redelegation?t.Redelegation.toJSON(e.redelegation):void 0),e.entries?r.entries=e.entries.map(e=>e?t.RedelegationEntryResponse.toJSON(e):void 0):r.entries=[],r},fromPartial(e){var r;let n=M();return void 0!==e.redelegation&&null!==e.redelegation&&(n.redelegation=t.Redelegation.fromPartial(e.redelegation)),n.entries=(null===(r=e.entries)||void 0===r?void 0:r.map(e=>t.RedelegationEntryResponse.fromPartial(e)))||[],n}},t.Pool={typeUrl:"/cosmos.staking.v1beta1.Pool",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.BinaryWriter.create();return""!==e.notBondedTokens&&t.uint32(10).string(e.notBondedTokens),""!==e.bondedTokens&&t.uint32(18).string(e.bondedTokens),t},decode(e,t){let r=e instanceof c.BinaryReader?e:new c.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=D();for(;r.pos>>3){case 1:i.notBondedTokens=r.string();break;case 2:i.bondedTokens=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=D();return(0,p.isSet)(e.notBondedTokens)&&(t.notBondedTokens=String(e.notBondedTokens)),(0,p.isSet)(e.bondedTokens)&&(t.bondedTokens=String(e.bondedTokens)),t},toJSON(e){let t={};return void 0!==e.notBondedTokens&&(t.notBondedTokens=e.notBondedTokens),void 0!==e.bondedTokens&&(t.bondedTokens=e.bondedTokens),t},fromPartial(e){var t,r;let n=D();return n.notBondedTokens=null!==(t=e.notBondedTokens)&&void 0!==t?t:"",n.bondedTokens=null!==(r=e.bondedTokens)&&void 0!==r?r:"",n}},t.ValidatorUpdates={typeUrl:"/cosmos.staking.v1beta1.ValidatorUpdates",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.BinaryWriter.create();for(let r of e.updates)d.ValidatorUpdate.encode(r,t.uint32(10).fork()).ldelim();return t},decode(e,t){let r=e instanceof c.BinaryReader?e:new c.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=U();for(;r.pos>>3==1?i.updates.push(d.ValidatorUpdate.decode(r,r.uint32())):r.skipType(7&e)}return i},fromJSON(e){let t=U();return Array.isArray(null==e?void 0:e.updates)&&(t.updates=e.updates.map(e=>d.ValidatorUpdate.fromJSON(e))),t},toJSON(e){let t={};return e.updates?t.updates=e.updates.map(e=>e?d.ValidatorUpdate.toJSON(e):void 0):t.updates=[],t},fromPartial(e){var t;let r=U();return r.updates=(null===(t=e.updates)||void 0===t?void 0:t.map(e=>d.ValidatorUpdate.fromPartial(e)))||[],r}}},62884:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MsgClientImpl=t.MsgUpdateParamsResponse=t.MsgUpdateParams=t.MsgCancelUnbondingDelegationResponse=t.MsgCancelUnbondingDelegation=t.MsgUndelegateResponse=t.MsgUndelegate=t.MsgBeginRedelegateResponse=t.MsgBeginRedelegate=t.MsgDelegateResponse=t.MsgDelegate=t.MsgEditValidatorResponse=t.MsgEditValidator=t.MsgCreateValidatorResponse=t.MsgCreateValidator=t.protobufPackage=void 0;let n=r(20534),i=r(11879),o=r(14841),a=r(9990),s=r(46554),l=r(99133);function u(){return{description:n.Description.fromPartial({}),commission:n.CommissionRates.fromPartial({}),minSelfDelegation:"",delegatorAddress:"",validatorAddress:"",pubkey:void 0,value:o.Coin.fromPartial({})}}function d(){return{}}function c(){return{description:n.Description.fromPartial({}),validatorAddress:"",commissionRate:"",minSelfDelegation:""}}function p(){return{}}function f(){return{delegatorAddress:"",validatorAddress:"",amount:o.Coin.fromPartial({})}}function h(){return{}}function g(){return{delegatorAddress:"",validatorSrcAddress:"",validatorDstAddress:"",amount:o.Coin.fromPartial({})}}function m(){return{completionTime:a.Timestamp.fromPartial({})}}function y(){return{delegatorAddress:"",validatorAddress:"",amount:o.Coin.fromPartial({})}}function v(){return{completionTime:a.Timestamp.fromPartial({})}}function b(){return{delegatorAddress:"",validatorAddress:"",amount:o.Coin.fromPartial({}),creationHeight:BigInt(0)}}function S(){return{}}function w(){return{authority:"",params:n.Params.fromPartial({})}}function _(){return{}}t.protobufPackage="cosmos.staking.v1beta1",t.MsgCreateValidator={typeUrl:"/cosmos.staking.v1beta1.MsgCreateValidator",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return void 0!==e.description&&n.Description.encode(e.description,t.uint32(10).fork()).ldelim(),void 0!==e.commission&&n.CommissionRates.encode(e.commission,t.uint32(18).fork()).ldelim(),""!==e.minSelfDelegation&&t.uint32(26).string(e.minSelfDelegation),""!==e.delegatorAddress&&t.uint32(34).string(e.delegatorAddress),""!==e.validatorAddress&&t.uint32(42).string(e.validatorAddress),void 0!==e.pubkey&&i.Any.encode(e.pubkey,t.uint32(50).fork()).ldelim(),void 0!==e.value&&o.Coin.encode(e.value,t.uint32(58).fork()).ldelim(),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),a=void 0===t?r.len:r.pos+t,l=u();for(;r.pos>>3){case 1:l.description=n.Description.decode(r,r.uint32());break;case 2:l.commission=n.CommissionRates.decode(r,r.uint32());break;case 3:l.minSelfDelegation=r.string();break;case 4:l.delegatorAddress=r.string();break;case 5:l.validatorAddress=r.string();break;case 6:l.pubkey=i.Any.decode(r,r.uint32());break;case 7:l.value=o.Coin.decode(r,r.uint32());break;default:r.skipType(7&e)}}return l},fromJSON(e){let t=u();return(0,l.isSet)(e.description)&&(t.description=n.Description.fromJSON(e.description)),(0,l.isSet)(e.commission)&&(t.commission=n.CommissionRates.fromJSON(e.commission)),(0,l.isSet)(e.minSelfDelegation)&&(t.minSelfDelegation=String(e.minSelfDelegation)),(0,l.isSet)(e.delegatorAddress)&&(t.delegatorAddress=String(e.delegatorAddress)),(0,l.isSet)(e.validatorAddress)&&(t.validatorAddress=String(e.validatorAddress)),(0,l.isSet)(e.pubkey)&&(t.pubkey=i.Any.fromJSON(e.pubkey)),(0,l.isSet)(e.value)&&(t.value=o.Coin.fromJSON(e.value)),t},toJSON(e){let t={};return void 0!==e.description&&(t.description=e.description?n.Description.toJSON(e.description):void 0),void 0!==e.commission&&(t.commission=e.commission?n.CommissionRates.toJSON(e.commission):void 0),void 0!==e.minSelfDelegation&&(t.minSelfDelegation=e.minSelfDelegation),void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),void 0!==e.pubkey&&(t.pubkey=e.pubkey?i.Any.toJSON(e.pubkey):void 0),void 0!==e.value&&(t.value=e.value?o.Coin.toJSON(e.value):void 0),t},fromPartial(e){var t,r,a;let s=u();return void 0!==e.description&&null!==e.description&&(s.description=n.Description.fromPartial(e.description)),void 0!==e.commission&&null!==e.commission&&(s.commission=n.CommissionRates.fromPartial(e.commission)),s.minSelfDelegation=null!==(t=e.minSelfDelegation)&&void 0!==t?t:"",s.delegatorAddress=null!==(r=e.delegatorAddress)&&void 0!==r?r:"",s.validatorAddress=null!==(a=e.validatorAddress)&&void 0!==a?a:"",void 0!==e.pubkey&&null!==e.pubkey&&(s.pubkey=i.Any.fromPartial(e.pubkey)),void 0!==e.value&&null!==e.value&&(s.value=o.Coin.fromPartial(e.value)),s}},t.MsgCreateValidatorResponse={typeUrl:"/cosmos.staking.v1beta1.MsgCreateValidatorResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=d();for(;r.posd(),toJSON:e=>({}),fromPartial:e=>d()},t.MsgEditValidator={typeUrl:"/cosmos.staking.v1beta1.MsgEditValidator",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return void 0!==e.description&&n.Description.encode(e.description,t.uint32(10).fork()).ldelim(),""!==e.validatorAddress&&t.uint32(18).string(e.validatorAddress),""!==e.commissionRate&&t.uint32(26).string(e.commissionRate),""!==e.minSelfDelegation&&t.uint32(34).string(e.minSelfDelegation),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),i=void 0===t?r.len:r.pos+t,o=c();for(;r.pos>>3){case 1:o.description=n.Description.decode(r,r.uint32());break;case 2:o.validatorAddress=r.string();break;case 3:o.commissionRate=r.string();break;case 4:o.minSelfDelegation=r.string();break;default:r.skipType(7&e)}}return o},fromJSON(e){let t=c();return(0,l.isSet)(e.description)&&(t.description=n.Description.fromJSON(e.description)),(0,l.isSet)(e.validatorAddress)&&(t.validatorAddress=String(e.validatorAddress)),(0,l.isSet)(e.commissionRate)&&(t.commissionRate=String(e.commissionRate)),(0,l.isSet)(e.minSelfDelegation)&&(t.minSelfDelegation=String(e.minSelfDelegation)),t},toJSON(e){let t={};return void 0!==e.description&&(t.description=e.description?n.Description.toJSON(e.description):void 0),void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),void 0!==e.commissionRate&&(t.commissionRate=e.commissionRate),void 0!==e.minSelfDelegation&&(t.minSelfDelegation=e.minSelfDelegation),t},fromPartial(e){var t,r,i;let o=c();return void 0!==e.description&&null!==e.description&&(o.description=n.Description.fromPartial(e.description)),o.validatorAddress=null!==(t=e.validatorAddress)&&void 0!==t?t:"",o.commissionRate=null!==(r=e.commissionRate)&&void 0!==r?r:"",o.minSelfDelegation=null!==(i=e.minSelfDelegation)&&void 0!==i?i:"",o}},t.MsgEditValidatorResponse={typeUrl:"/cosmos.staking.v1beta1.MsgEditValidatorResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=p();for(;r.posp(),toJSON:e=>({}),fromPartial:e=>p()},t.MsgDelegate={typeUrl:"/cosmos.staking.v1beta1.MsgDelegate",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),""!==e.validatorAddress&&t.uint32(18).string(e.validatorAddress),void 0!==e.amount&&o.Coin.encode(e.amount,t.uint32(26).fork()).ldelim(),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=f();for(;r.pos>>3){case 1:i.delegatorAddress=r.string();break;case 2:i.validatorAddress=r.string();break;case 3:i.amount=o.Coin.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=f();return(0,l.isSet)(e.delegatorAddress)&&(t.delegatorAddress=String(e.delegatorAddress)),(0,l.isSet)(e.validatorAddress)&&(t.validatorAddress=String(e.validatorAddress)),(0,l.isSet)(e.amount)&&(t.amount=o.Coin.fromJSON(e.amount)),t},toJSON(e){let t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),void 0!==e.amount&&(t.amount=e.amount?o.Coin.toJSON(e.amount):void 0),t},fromPartial(e){var t,r;let n=f();return n.delegatorAddress=null!==(t=e.delegatorAddress)&&void 0!==t?t:"",n.validatorAddress=null!==(r=e.validatorAddress)&&void 0!==r?r:"",void 0!==e.amount&&null!==e.amount&&(n.amount=o.Coin.fromPartial(e.amount)),n}},t.MsgDelegateResponse={typeUrl:"/cosmos.staking.v1beta1.MsgDelegateResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=h();for(;r.posh(),toJSON:e=>({}),fromPartial:e=>h()},t.MsgBeginRedelegate={typeUrl:"/cosmos.staking.v1beta1.MsgBeginRedelegate",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),""!==e.validatorSrcAddress&&t.uint32(18).string(e.validatorSrcAddress),""!==e.validatorDstAddress&&t.uint32(26).string(e.validatorDstAddress),void 0!==e.amount&&o.Coin.encode(e.amount,t.uint32(34).fork()).ldelim(),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=g();for(;r.pos>>3){case 1:i.delegatorAddress=r.string();break;case 2:i.validatorSrcAddress=r.string();break;case 3:i.validatorDstAddress=r.string();break;case 4:i.amount=o.Coin.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=g();return(0,l.isSet)(e.delegatorAddress)&&(t.delegatorAddress=String(e.delegatorAddress)),(0,l.isSet)(e.validatorSrcAddress)&&(t.validatorSrcAddress=String(e.validatorSrcAddress)),(0,l.isSet)(e.validatorDstAddress)&&(t.validatorDstAddress=String(e.validatorDstAddress)),(0,l.isSet)(e.amount)&&(t.amount=o.Coin.fromJSON(e.amount)),t},toJSON(e){let t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.validatorSrcAddress&&(t.validatorSrcAddress=e.validatorSrcAddress),void 0!==e.validatorDstAddress&&(t.validatorDstAddress=e.validatorDstAddress),void 0!==e.amount&&(t.amount=e.amount?o.Coin.toJSON(e.amount):void 0),t},fromPartial(e){var t,r,n;let i=g();return i.delegatorAddress=null!==(t=e.delegatorAddress)&&void 0!==t?t:"",i.validatorSrcAddress=null!==(r=e.validatorSrcAddress)&&void 0!==r?r:"",i.validatorDstAddress=null!==(n=e.validatorDstAddress)&&void 0!==n?n:"",void 0!==e.amount&&null!==e.amount&&(i.amount=o.Coin.fromPartial(e.amount)),i}},t.MsgBeginRedelegateResponse={typeUrl:"/cosmos.staking.v1beta1.MsgBeginRedelegateResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return void 0!==e.completionTime&&a.Timestamp.encode(e.completionTime,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=m();for(;r.pos>>3==1?i.completionTime=a.Timestamp.decode(r,r.uint32()):r.skipType(7&e)}return i},fromJSON(e){let t=m();return(0,l.isSet)(e.completionTime)&&(t.completionTime=(0,l.fromJsonTimestamp)(e.completionTime)),t},toJSON(e){let t={};return void 0!==e.completionTime&&(t.completionTime=(0,l.fromTimestamp)(e.completionTime).toISOString()),t},fromPartial(e){let t=m();return void 0!==e.completionTime&&null!==e.completionTime&&(t.completionTime=a.Timestamp.fromPartial(e.completionTime)),t}},t.MsgUndelegate={typeUrl:"/cosmos.staking.v1beta1.MsgUndelegate",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),""!==e.validatorAddress&&t.uint32(18).string(e.validatorAddress),void 0!==e.amount&&o.Coin.encode(e.amount,t.uint32(26).fork()).ldelim(),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=y();for(;r.pos>>3){case 1:i.delegatorAddress=r.string();break;case 2:i.validatorAddress=r.string();break;case 3:i.amount=o.Coin.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=y();return(0,l.isSet)(e.delegatorAddress)&&(t.delegatorAddress=String(e.delegatorAddress)),(0,l.isSet)(e.validatorAddress)&&(t.validatorAddress=String(e.validatorAddress)),(0,l.isSet)(e.amount)&&(t.amount=o.Coin.fromJSON(e.amount)),t},toJSON(e){let t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),void 0!==e.amount&&(t.amount=e.amount?o.Coin.toJSON(e.amount):void 0),t},fromPartial(e){var t,r;let n=y();return n.delegatorAddress=null!==(t=e.delegatorAddress)&&void 0!==t?t:"",n.validatorAddress=null!==(r=e.validatorAddress)&&void 0!==r?r:"",void 0!==e.amount&&null!==e.amount&&(n.amount=o.Coin.fromPartial(e.amount)),n}},t.MsgUndelegateResponse={typeUrl:"/cosmos.staking.v1beta1.MsgUndelegateResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return void 0!==e.completionTime&&a.Timestamp.encode(e.completionTime,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=v();for(;r.pos>>3==1?i.completionTime=a.Timestamp.decode(r,r.uint32()):r.skipType(7&e)}return i},fromJSON(e){let t=v();return(0,l.isSet)(e.completionTime)&&(t.completionTime=(0,l.fromJsonTimestamp)(e.completionTime)),t},toJSON(e){let t={};return void 0!==e.completionTime&&(t.completionTime=(0,l.fromTimestamp)(e.completionTime).toISOString()),t},fromPartial(e){let t=v();return void 0!==e.completionTime&&null!==e.completionTime&&(t.completionTime=a.Timestamp.fromPartial(e.completionTime)),t}},t.MsgCancelUnbondingDelegation={typeUrl:"/cosmos.staking.v1beta1.MsgCancelUnbondingDelegation",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),""!==e.validatorAddress&&t.uint32(18).string(e.validatorAddress),void 0!==e.amount&&o.Coin.encode(e.amount,t.uint32(26).fork()).ldelim(),e.creationHeight!==BigInt(0)&&t.uint32(32).int64(e.creationHeight),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=b();for(;r.pos>>3){case 1:i.delegatorAddress=r.string();break;case 2:i.validatorAddress=r.string();break;case 3:i.amount=o.Coin.decode(r,r.uint32());break;case 4:i.creationHeight=r.int64();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=b();return(0,l.isSet)(e.delegatorAddress)&&(t.delegatorAddress=String(e.delegatorAddress)),(0,l.isSet)(e.validatorAddress)&&(t.validatorAddress=String(e.validatorAddress)),(0,l.isSet)(e.amount)&&(t.amount=o.Coin.fromJSON(e.amount)),(0,l.isSet)(e.creationHeight)&&(t.creationHeight=BigInt(e.creationHeight.toString())),t},toJSON(e){let t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),void 0!==e.amount&&(t.amount=e.amount?o.Coin.toJSON(e.amount):void 0),void 0!==e.creationHeight&&(t.creationHeight=(e.creationHeight||BigInt(0)).toString()),t},fromPartial(e){var t,r;let n=b();return n.delegatorAddress=null!==(t=e.delegatorAddress)&&void 0!==t?t:"",n.validatorAddress=null!==(r=e.validatorAddress)&&void 0!==r?r:"",void 0!==e.amount&&null!==e.amount&&(n.amount=o.Coin.fromPartial(e.amount)),void 0!==e.creationHeight&&null!==e.creationHeight&&(n.creationHeight=BigInt(e.creationHeight.toString())),n}},t.MsgCancelUnbondingDelegationResponse={typeUrl:"/cosmos.staking.v1beta1.MsgCancelUnbondingDelegationResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=S();for(;r.posS(),toJSON:e=>({}),fromPartial:e=>S()},t.MsgUpdateParams={typeUrl:"/cosmos.staking.v1beta1.MsgUpdateParams",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return""!==e.authority&&t.uint32(10).string(e.authority),void 0!==e.params&&n.Params.encode(e.params,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),i=void 0===t?r.len:r.pos+t,o=w();for(;r.pos>>3){case 1:o.authority=r.string();break;case 2:o.params=n.Params.decode(r,r.uint32());break;default:r.skipType(7&e)}}return o},fromJSON(e){let t=w();return(0,l.isSet)(e.authority)&&(t.authority=String(e.authority)),(0,l.isSet)(e.params)&&(t.params=n.Params.fromJSON(e.params)),t},toJSON(e){let t={};return void 0!==e.authority&&(t.authority=e.authority),void 0!==e.params&&(t.params=e.params?n.Params.toJSON(e.params):void 0),t},fromPartial(e){var t;let r=w();return r.authority=null!==(t=e.authority)&&void 0!==t?t:"",void 0!==e.params&&null!==e.params&&(r.params=n.Params.fromPartial(e.params)),r}},t.MsgUpdateParamsResponse={typeUrl:"/cosmos.staking.v1beta1.MsgUpdateParamsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=_();for(;r.pos_(),toJSON:e=>({}),fromPartial:e=>_()};class k{CreateValidator(e){let r=t.MsgCreateValidator.encode(e).finish();return this.rpc.request("cosmos.staking.v1beta1.Msg","CreateValidator",r).then(e=>t.MsgCreateValidatorResponse.decode(new s.BinaryReader(e)))}EditValidator(e){let r=t.MsgEditValidator.encode(e).finish();return this.rpc.request("cosmos.staking.v1beta1.Msg","EditValidator",r).then(e=>t.MsgEditValidatorResponse.decode(new s.BinaryReader(e)))}Delegate(e){let r=t.MsgDelegate.encode(e).finish();return this.rpc.request("cosmos.staking.v1beta1.Msg","Delegate",r).then(e=>t.MsgDelegateResponse.decode(new s.BinaryReader(e)))}BeginRedelegate(e){let r=t.MsgBeginRedelegate.encode(e).finish();return this.rpc.request("cosmos.staking.v1beta1.Msg","BeginRedelegate",r).then(e=>t.MsgBeginRedelegateResponse.decode(new s.BinaryReader(e)))}Undelegate(e){let r=t.MsgUndelegate.encode(e).finish();return this.rpc.request("cosmos.staking.v1beta1.Msg","Undelegate",r).then(e=>t.MsgUndelegateResponse.decode(new s.BinaryReader(e)))}CancelUnbondingDelegation(e){let r=t.MsgCancelUnbondingDelegation.encode(e).finish();return this.rpc.request("cosmos.staking.v1beta1.Msg","CancelUnbondingDelegation",r).then(e=>t.MsgCancelUnbondingDelegationResponse.decode(new s.BinaryReader(e)))}UpdateParams(e){let r=t.MsgUpdateParams.encode(e).finish();return this.rpc.request("cosmos.staking.v1beta1.Msg","UpdateParams",r).then(e=>t.MsgUpdateParamsResponse.decode(new s.BinaryReader(e)))}constructor(e){this.rpc=e,this.CreateValidator=this.CreateValidator.bind(this),this.EditValidator=this.EditValidator.bind(this),this.Delegate=this.Delegate.bind(this),this.BeginRedelegate=this.BeginRedelegate.bind(this),this.Undelegate=this.Undelegate.bind(this),this.CancelUnbondingDelegation=this.CancelUnbondingDelegation.bind(this),this.UpdateParams=this.UpdateParams.bind(this)}}t.MsgClientImpl=k},2264:function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.SignatureDescriptor_Data_Multi=t.SignatureDescriptor_Data_Single=t.SignatureDescriptor_Data=t.SignatureDescriptor=t.SignatureDescriptors=t.signModeToJSON=t.signModeFromJSON=t.SignMode=t.protobufPackage=void 0;let i=r(50263),o=r(11879),a=r(46554),s=r(99133);function l(e){switch(e){case 0:case"SIGN_MODE_UNSPECIFIED":return n.SIGN_MODE_UNSPECIFIED;case 1:case"SIGN_MODE_DIRECT":return n.SIGN_MODE_DIRECT;case 2:case"SIGN_MODE_TEXTUAL":return n.SIGN_MODE_TEXTUAL;case 3:case"SIGN_MODE_DIRECT_AUX":return n.SIGN_MODE_DIRECT_AUX;case 127:case"SIGN_MODE_LEGACY_AMINO_JSON":return n.SIGN_MODE_LEGACY_AMINO_JSON;case 191:case"SIGN_MODE_EIP_191":return n.SIGN_MODE_EIP_191;default:return n.UNRECOGNIZED}}function u(e){switch(e){case n.SIGN_MODE_UNSPECIFIED:return"SIGN_MODE_UNSPECIFIED";case n.SIGN_MODE_DIRECT:return"SIGN_MODE_DIRECT";case n.SIGN_MODE_TEXTUAL:return"SIGN_MODE_TEXTUAL";case n.SIGN_MODE_DIRECT_AUX:return"SIGN_MODE_DIRECT_AUX";case n.SIGN_MODE_LEGACY_AMINO_JSON:return"SIGN_MODE_LEGACY_AMINO_JSON";case n.SIGN_MODE_EIP_191:return"SIGN_MODE_EIP_191";case n.UNRECOGNIZED:default:return"UNRECOGNIZED"}}function d(){return{signatures:[]}}function c(){return{publicKey:void 0,data:void 0,sequence:BigInt(0)}}function p(){return{single:void 0,multi:void 0}}function f(){return{mode:0,signature:new Uint8Array}}function h(){return{bitarray:void 0,signatures:[]}}t.protobufPackage="cosmos.tx.signing.v1beta1",function(e){e[e.SIGN_MODE_UNSPECIFIED=0]="SIGN_MODE_UNSPECIFIED",e[e.SIGN_MODE_DIRECT=1]="SIGN_MODE_DIRECT",e[e.SIGN_MODE_TEXTUAL=2]="SIGN_MODE_TEXTUAL",e[e.SIGN_MODE_DIRECT_AUX=3]="SIGN_MODE_DIRECT_AUX",e[e.SIGN_MODE_LEGACY_AMINO_JSON=127]="SIGN_MODE_LEGACY_AMINO_JSON",e[e.SIGN_MODE_EIP_191=191]="SIGN_MODE_EIP_191",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(n||(t.SignMode=n={})),t.signModeFromJSON=l,t.signModeToJSON=u,t.SignatureDescriptors={typeUrl:"/cosmos.tx.signing.v1beta1.SignatureDescriptors",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();for(let n of e.signatures)t.SignatureDescriptor.encode(n,r.uint32(10).fork()).ldelim();return r},decode(e,r){let n=e instanceof a.BinaryReader?e:new a.BinaryReader(e),i=void 0===r?n.len:n.pos+r,o=d();for(;n.pos>>3==1?o.signatures.push(t.SignatureDescriptor.decode(n,n.uint32())):n.skipType(7&e)}return o},fromJSON(e){let r=d();return Array.isArray(null==e?void 0:e.signatures)&&(r.signatures=e.signatures.map(e=>t.SignatureDescriptor.fromJSON(e))),r},toJSON(e){let r={};return e.signatures?r.signatures=e.signatures.map(e=>e?t.SignatureDescriptor.toJSON(e):void 0):r.signatures=[],r},fromPartial(e){var r;let n=d();return n.signatures=(null===(r=e.signatures)||void 0===r?void 0:r.map(e=>t.SignatureDescriptor.fromPartial(e)))||[],n}},t.SignatureDescriptor={typeUrl:"/cosmos.tx.signing.v1beta1.SignatureDescriptor",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return void 0!==e.publicKey&&o.Any.encode(e.publicKey,r.uint32(10).fork()).ldelim(),void 0!==e.data&&t.SignatureDescriptor_Data.encode(e.data,r.uint32(18).fork()).ldelim(),e.sequence!==BigInt(0)&&r.uint32(24).uint64(e.sequence),r},decode(e,r){let n=e instanceof a.BinaryReader?e:new a.BinaryReader(e),i=void 0===r?n.len:n.pos+r,s=c();for(;n.pos>>3){case 1:s.publicKey=o.Any.decode(n,n.uint32());break;case 2:s.data=t.SignatureDescriptor_Data.decode(n,n.uint32());break;case 3:s.sequence=n.uint64();break;default:n.skipType(7&e)}}return s},fromJSON(e){let r=c();return(0,s.isSet)(e.publicKey)&&(r.publicKey=o.Any.fromJSON(e.publicKey)),(0,s.isSet)(e.data)&&(r.data=t.SignatureDescriptor_Data.fromJSON(e.data)),(0,s.isSet)(e.sequence)&&(r.sequence=BigInt(e.sequence.toString())),r},toJSON(e){let r={};return void 0!==e.publicKey&&(r.publicKey=e.publicKey?o.Any.toJSON(e.publicKey):void 0),void 0!==e.data&&(r.data=e.data?t.SignatureDescriptor_Data.toJSON(e.data):void 0),void 0!==e.sequence&&(r.sequence=(e.sequence||BigInt(0)).toString()),r},fromPartial(e){let r=c();return void 0!==e.publicKey&&null!==e.publicKey&&(r.publicKey=o.Any.fromPartial(e.publicKey)),void 0!==e.data&&null!==e.data&&(r.data=t.SignatureDescriptor_Data.fromPartial(e.data)),void 0!==e.sequence&&null!==e.sequence&&(r.sequence=BigInt(e.sequence.toString())),r}},t.SignatureDescriptor_Data={typeUrl:"/cosmos.tx.signing.v1beta1.Data",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return void 0!==e.single&&t.SignatureDescriptor_Data_Single.encode(e.single,r.uint32(10).fork()).ldelim(),void 0!==e.multi&&t.SignatureDescriptor_Data_Multi.encode(e.multi,r.uint32(18).fork()).ldelim(),r},decode(e,r){let n=e instanceof a.BinaryReader?e:new a.BinaryReader(e),i=void 0===r?n.len:n.pos+r,o=p();for(;n.pos>>3){case 1:o.single=t.SignatureDescriptor_Data_Single.decode(n,n.uint32());break;case 2:o.multi=t.SignatureDescriptor_Data_Multi.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){let r=p();return(0,s.isSet)(e.single)&&(r.single=t.SignatureDescriptor_Data_Single.fromJSON(e.single)),(0,s.isSet)(e.multi)&&(r.multi=t.SignatureDescriptor_Data_Multi.fromJSON(e.multi)),r},toJSON(e){let r={};return void 0!==e.single&&(r.single=e.single?t.SignatureDescriptor_Data_Single.toJSON(e.single):void 0),void 0!==e.multi&&(r.multi=e.multi?t.SignatureDescriptor_Data_Multi.toJSON(e.multi):void 0),r},fromPartial(e){let r=p();return void 0!==e.single&&null!==e.single&&(r.single=t.SignatureDescriptor_Data_Single.fromPartial(e.single)),void 0!==e.multi&&null!==e.multi&&(r.multi=t.SignatureDescriptor_Data_Multi.fromPartial(e.multi)),r}},t.SignatureDescriptor_Data_Single={typeUrl:"/cosmos.tx.signing.v1beta1.Single",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return 0!==e.mode&&t.uint32(8).int32(e.mode),0!==e.signature.length&&t.uint32(18).bytes(e.signature),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=f();for(;r.pos>>3){case 1:i.mode=r.int32();break;case 2:i.signature=r.bytes();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=f();return(0,s.isSet)(e.mode)&&(t.mode=l(e.mode)),(0,s.isSet)(e.signature)&&(t.signature=(0,s.bytesFromBase64)(e.signature)),t},toJSON(e){let t={};return void 0!==e.mode&&(t.mode=u(e.mode)),void 0!==e.signature&&(t.signature=(0,s.base64FromBytes)(void 0!==e.signature?e.signature:new Uint8Array)),t},fromPartial(e){var t,r;let n=f();return n.mode=null!==(t=e.mode)&&void 0!==t?t:0,n.signature=null!==(r=e.signature)&&void 0!==r?r:new Uint8Array,n}},t.SignatureDescriptor_Data_Multi={typeUrl:"/cosmos.tx.signing.v1beta1.Multi",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();for(let n of(void 0!==e.bitarray&&i.CompactBitArray.encode(e.bitarray,r.uint32(10).fork()).ldelim(),e.signatures))t.SignatureDescriptor_Data.encode(n,r.uint32(18).fork()).ldelim();return r},decode(e,r){let n=e instanceof a.BinaryReader?e:new a.BinaryReader(e),o=void 0===r?n.len:n.pos+r,s=h();for(;n.pos>>3){case 1:s.bitarray=i.CompactBitArray.decode(n,n.uint32());break;case 2:s.signatures.push(t.SignatureDescriptor_Data.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return s},fromJSON(e){let r=h();return(0,s.isSet)(e.bitarray)&&(r.bitarray=i.CompactBitArray.fromJSON(e.bitarray)),Array.isArray(null==e?void 0:e.signatures)&&(r.signatures=e.signatures.map(e=>t.SignatureDescriptor_Data.fromJSON(e))),r},toJSON(e){let r={};return void 0!==e.bitarray&&(r.bitarray=e.bitarray?i.CompactBitArray.toJSON(e.bitarray):void 0),e.signatures?r.signatures=e.signatures.map(e=>e?t.SignatureDescriptor_Data.toJSON(e):void 0):r.signatures=[],r},fromPartial(e){var r;let n=h();return void 0!==e.bitarray&&null!==e.bitarray&&(n.bitarray=i.CompactBitArray.fromPartial(e.bitarray)),n.signatures=(null===(r=e.signatures)||void 0===r?void 0:r.map(e=>t.SignatureDescriptor_Data.fromPartial(e)))||[],n}}},32468:function(e,t,r){"use strict";var n,i;Object.defineProperty(t,"__esModule",{value:!0}),t.ServiceClientImpl=t.TxDecodeAminoResponse=t.TxDecodeAminoRequest=t.TxEncodeAminoResponse=t.TxEncodeAminoRequest=t.TxEncodeResponse=t.TxEncodeRequest=t.TxDecodeResponse=t.TxDecodeRequest=t.GetBlockWithTxsResponse=t.GetBlockWithTxsRequest=t.GetTxResponse=t.GetTxRequest=t.SimulateResponse=t.SimulateRequest=t.BroadcastTxResponse=t.BroadcastTxRequest=t.GetTxsEventResponse=t.GetTxsEventRequest=t.broadcastModeToJSON=t.broadcastModeFromJSON=t.BroadcastMode=t.orderByToJSON=t.orderByFromJSON=t.OrderBy=t.protobufPackage=void 0;let o=r(26136),a=r(86141),s=r(94534),l=r(92585),u=r(81334),d=r(46554),c=r(99133);function p(e){switch(e){case 0:case"ORDER_BY_UNSPECIFIED":return n.ORDER_BY_UNSPECIFIED;case 1:case"ORDER_BY_ASC":return n.ORDER_BY_ASC;case 2:case"ORDER_BY_DESC":return n.ORDER_BY_DESC;default:return n.UNRECOGNIZED}}function f(e){switch(e){case n.ORDER_BY_UNSPECIFIED:return"ORDER_BY_UNSPECIFIED";case n.ORDER_BY_ASC:return"ORDER_BY_ASC";case n.ORDER_BY_DESC:return"ORDER_BY_DESC";case n.UNRECOGNIZED:default:return"UNRECOGNIZED"}}function h(e){switch(e){case 0:case"BROADCAST_MODE_UNSPECIFIED":return i.BROADCAST_MODE_UNSPECIFIED;case 1:case"BROADCAST_MODE_BLOCK":return i.BROADCAST_MODE_BLOCK;case 2:case"BROADCAST_MODE_SYNC":return i.BROADCAST_MODE_SYNC;case 3:case"BROADCAST_MODE_ASYNC":return i.BROADCAST_MODE_ASYNC;default:return i.UNRECOGNIZED}}function g(e){switch(e){case i.BROADCAST_MODE_UNSPECIFIED:return"BROADCAST_MODE_UNSPECIFIED";case i.BROADCAST_MODE_BLOCK:return"BROADCAST_MODE_BLOCK";case i.BROADCAST_MODE_SYNC:return"BROADCAST_MODE_SYNC";case i.BROADCAST_MODE_ASYNC:return"BROADCAST_MODE_ASYNC";case i.UNRECOGNIZED:default:return"UNRECOGNIZED"}}function m(){return{events:[],pagination:void 0,orderBy:0,page:BigInt(0),limit:BigInt(0)}}function y(){return{txs:[],txResponses:[],pagination:void 0,total:BigInt(0)}}function v(){return{txBytes:new Uint8Array,mode:0}}function b(){return{txResponse:void 0}}function S(){return{tx:void 0,txBytes:new Uint8Array}}function w(){return{gasInfo:void 0,result:void 0}}function _(){return{hash:""}}function k(){return{tx:void 0,txResponse:void 0}}function O(){return{height:BigInt(0),pagination:void 0}}function P(){return{txs:[],blockId:void 0,block:void 0,pagination:void 0}}function A(){return{txBytes:new Uint8Array}}function I(){return{tx:void 0}}function R(){return{tx:void 0}}function E(){return{txBytes:new Uint8Array}}function T(){return{aminoJson:""}}function N(){return{aminoBinary:new Uint8Array}}function x(){return{aminoBinary:new Uint8Array}}function B(){return{aminoJson:""}}t.protobufPackage="cosmos.tx.v1beta1",function(e){e[e.ORDER_BY_UNSPECIFIED=0]="ORDER_BY_UNSPECIFIED",e[e.ORDER_BY_ASC=1]="ORDER_BY_ASC",e[e.ORDER_BY_DESC=2]="ORDER_BY_DESC",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(n||(t.OrderBy=n={})),t.orderByFromJSON=p,t.orderByToJSON=f,function(e){e[e.BROADCAST_MODE_UNSPECIFIED=0]="BROADCAST_MODE_UNSPECIFIED",e[e.BROADCAST_MODE_BLOCK=1]="BROADCAST_MODE_BLOCK",e[e.BROADCAST_MODE_SYNC=2]="BROADCAST_MODE_SYNC",e[e.BROADCAST_MODE_ASYNC=3]="BROADCAST_MODE_ASYNC",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(i||(t.BroadcastMode=i={})),t.broadcastModeFromJSON=h,t.broadcastModeToJSON=g,t.GetTxsEventRequest={typeUrl:"/cosmos.tx.v1beta1.GetTxsEventRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.BinaryWriter.create();for(let r of e.events)t.uint32(10).string(r);return void 0!==e.pagination&&a.PageRequest.encode(e.pagination,t.uint32(18).fork()).ldelim(),0!==e.orderBy&&t.uint32(24).int32(e.orderBy),e.page!==BigInt(0)&&t.uint32(32).uint64(e.page),e.limit!==BigInt(0)&&t.uint32(40).uint64(e.limit),t},decode(e,t){let r=e instanceof d.BinaryReader?e:new d.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=m();for(;r.pos>>3){case 1:i.events.push(r.string());break;case 2:i.pagination=a.PageRequest.decode(r,r.uint32());break;case 3:i.orderBy=r.int32();break;case 4:i.page=r.uint64();break;case 5:i.limit=r.uint64();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=m();return Array.isArray(null==e?void 0:e.events)&&(t.events=e.events.map(e=>String(e))),(0,c.isSet)(e.pagination)&&(t.pagination=a.PageRequest.fromJSON(e.pagination)),(0,c.isSet)(e.orderBy)&&(t.orderBy=p(e.orderBy)),(0,c.isSet)(e.page)&&(t.page=BigInt(e.page.toString())),(0,c.isSet)(e.limit)&&(t.limit=BigInt(e.limit.toString())),t},toJSON(e){let t={};return e.events?t.events=e.events.map(e=>e):t.events=[],void 0!==e.pagination&&(t.pagination=e.pagination?a.PageRequest.toJSON(e.pagination):void 0),void 0!==e.orderBy&&(t.orderBy=f(e.orderBy)),void 0!==e.page&&(t.page=(e.page||BigInt(0)).toString()),void 0!==e.limit&&(t.limit=(e.limit||BigInt(0)).toString()),t},fromPartial(e){var t,r;let n=m();return n.events=(null===(t=e.events)||void 0===t?void 0:t.map(e=>e))||[],void 0!==e.pagination&&null!==e.pagination&&(n.pagination=a.PageRequest.fromPartial(e.pagination)),n.orderBy=null!==(r=e.orderBy)&&void 0!==r?r:0,void 0!==e.page&&null!==e.page&&(n.page=BigInt(e.page.toString())),void 0!==e.limit&&null!==e.limit&&(n.limit=BigInt(e.limit.toString())),n}},t.GetTxsEventResponse={typeUrl:"/cosmos.tx.v1beta1.GetTxsEventResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.BinaryWriter.create();for(let r of e.txs)o.Tx.encode(r,t.uint32(10).fork()).ldelim();for(let r of e.txResponses)s.TxResponse.encode(r,t.uint32(18).fork()).ldelim();return void 0!==e.pagination&&a.PageResponse.encode(e.pagination,t.uint32(26).fork()).ldelim(),e.total!==BigInt(0)&&t.uint32(32).uint64(e.total),t},decode(e,t){let r=e instanceof d.BinaryReader?e:new d.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=y();for(;r.pos>>3){case 1:i.txs.push(o.Tx.decode(r,r.uint32()));break;case 2:i.txResponses.push(s.TxResponse.decode(r,r.uint32()));break;case 3:i.pagination=a.PageResponse.decode(r,r.uint32());break;case 4:i.total=r.uint64();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=y();return Array.isArray(null==e?void 0:e.txs)&&(t.txs=e.txs.map(e=>o.Tx.fromJSON(e))),Array.isArray(null==e?void 0:e.txResponses)&&(t.txResponses=e.txResponses.map(e=>s.TxResponse.fromJSON(e))),(0,c.isSet)(e.pagination)&&(t.pagination=a.PageResponse.fromJSON(e.pagination)),(0,c.isSet)(e.total)&&(t.total=BigInt(e.total.toString())),t},toJSON(e){let t={};return e.txs?t.txs=e.txs.map(e=>e?o.Tx.toJSON(e):void 0):t.txs=[],e.txResponses?t.txResponses=e.txResponses.map(e=>e?s.TxResponse.toJSON(e):void 0):t.txResponses=[],void 0!==e.pagination&&(t.pagination=e.pagination?a.PageResponse.toJSON(e.pagination):void 0),void 0!==e.total&&(t.total=(e.total||BigInt(0)).toString()),t},fromPartial(e){var t,r;let n=y();return n.txs=(null===(t=e.txs)||void 0===t?void 0:t.map(e=>o.Tx.fromPartial(e)))||[],n.txResponses=(null===(r=e.txResponses)||void 0===r?void 0:r.map(e=>s.TxResponse.fromPartial(e)))||[],void 0!==e.pagination&&null!==e.pagination&&(n.pagination=a.PageResponse.fromPartial(e.pagination)),void 0!==e.total&&null!==e.total&&(n.total=BigInt(e.total.toString())),n}},t.BroadcastTxRequest={typeUrl:"/cosmos.tx.v1beta1.BroadcastTxRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.BinaryWriter.create();return 0!==e.txBytes.length&&t.uint32(10).bytes(e.txBytes),0!==e.mode&&t.uint32(16).int32(e.mode),t},decode(e,t){let r=e instanceof d.BinaryReader?e:new d.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=v();for(;r.pos>>3){case 1:i.txBytes=r.bytes();break;case 2:i.mode=r.int32();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=v();return(0,c.isSet)(e.txBytes)&&(t.txBytes=(0,c.bytesFromBase64)(e.txBytes)),(0,c.isSet)(e.mode)&&(t.mode=h(e.mode)),t},toJSON(e){let t={};return void 0!==e.txBytes&&(t.txBytes=(0,c.base64FromBytes)(void 0!==e.txBytes?e.txBytes:new Uint8Array)),void 0!==e.mode&&(t.mode=g(e.mode)),t},fromPartial(e){var t,r;let n=v();return n.txBytes=null!==(t=e.txBytes)&&void 0!==t?t:new Uint8Array,n.mode=null!==(r=e.mode)&&void 0!==r?r:0,n}},t.BroadcastTxResponse={typeUrl:"/cosmos.tx.v1beta1.BroadcastTxResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.BinaryWriter.create();return void 0!==e.txResponse&&s.TxResponse.encode(e.txResponse,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof d.BinaryReader?e:new d.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=b();for(;r.pos>>3==1?i.txResponse=s.TxResponse.decode(r,r.uint32()):r.skipType(7&e)}return i},fromJSON(e){let t=b();return(0,c.isSet)(e.txResponse)&&(t.txResponse=s.TxResponse.fromJSON(e.txResponse)),t},toJSON(e){let t={};return void 0!==e.txResponse&&(t.txResponse=e.txResponse?s.TxResponse.toJSON(e.txResponse):void 0),t},fromPartial(e){let t=b();return void 0!==e.txResponse&&null!==e.txResponse&&(t.txResponse=s.TxResponse.fromPartial(e.txResponse)),t}},t.SimulateRequest={typeUrl:"/cosmos.tx.v1beta1.SimulateRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.BinaryWriter.create();return void 0!==e.tx&&o.Tx.encode(e.tx,t.uint32(10).fork()).ldelim(),0!==e.txBytes.length&&t.uint32(18).bytes(e.txBytes),t},decode(e,t){let r=e instanceof d.BinaryReader?e:new d.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=S();for(;r.pos>>3){case 1:i.tx=o.Tx.decode(r,r.uint32());break;case 2:i.txBytes=r.bytes();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=S();return(0,c.isSet)(e.tx)&&(t.tx=o.Tx.fromJSON(e.tx)),(0,c.isSet)(e.txBytes)&&(t.txBytes=(0,c.bytesFromBase64)(e.txBytes)),t},toJSON(e){let t={};return void 0!==e.tx&&(t.tx=e.tx?o.Tx.toJSON(e.tx):void 0),void 0!==e.txBytes&&(t.txBytes=(0,c.base64FromBytes)(void 0!==e.txBytes?e.txBytes:new Uint8Array)),t},fromPartial(e){var t;let r=S();return void 0!==e.tx&&null!==e.tx&&(r.tx=o.Tx.fromPartial(e.tx)),r.txBytes=null!==(t=e.txBytes)&&void 0!==t?t:new Uint8Array,r}},t.SimulateResponse={typeUrl:"/cosmos.tx.v1beta1.SimulateResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.BinaryWriter.create();return void 0!==e.gasInfo&&s.GasInfo.encode(e.gasInfo,t.uint32(10).fork()).ldelim(),void 0!==e.result&&s.Result.encode(e.result,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof d.BinaryReader?e:new d.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=w();for(;r.pos>>3){case 1:i.gasInfo=s.GasInfo.decode(r,r.uint32());break;case 2:i.result=s.Result.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=w();return(0,c.isSet)(e.gasInfo)&&(t.gasInfo=s.GasInfo.fromJSON(e.gasInfo)),(0,c.isSet)(e.result)&&(t.result=s.Result.fromJSON(e.result)),t},toJSON(e){let t={};return void 0!==e.gasInfo&&(t.gasInfo=e.gasInfo?s.GasInfo.toJSON(e.gasInfo):void 0),void 0!==e.result&&(t.result=e.result?s.Result.toJSON(e.result):void 0),t},fromPartial(e){let t=w();return void 0!==e.gasInfo&&null!==e.gasInfo&&(t.gasInfo=s.GasInfo.fromPartial(e.gasInfo)),void 0!==e.result&&null!==e.result&&(t.result=s.Result.fromPartial(e.result)),t}},t.GetTxRequest={typeUrl:"/cosmos.tx.v1beta1.GetTxRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.BinaryWriter.create();return""!==e.hash&&t.uint32(10).string(e.hash),t},decode(e,t){let r=e instanceof d.BinaryReader?e:new d.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=_();for(;r.pos>>3==1?i.hash=r.string():r.skipType(7&e)}return i},fromJSON(e){let t=_();return(0,c.isSet)(e.hash)&&(t.hash=String(e.hash)),t},toJSON(e){let t={};return void 0!==e.hash&&(t.hash=e.hash),t},fromPartial(e){var t;let r=_();return r.hash=null!==(t=e.hash)&&void 0!==t?t:"",r}},t.GetTxResponse={typeUrl:"/cosmos.tx.v1beta1.GetTxResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.BinaryWriter.create();return void 0!==e.tx&&o.Tx.encode(e.tx,t.uint32(10).fork()).ldelim(),void 0!==e.txResponse&&s.TxResponse.encode(e.txResponse,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof d.BinaryReader?e:new d.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=k();for(;r.pos>>3){case 1:i.tx=o.Tx.decode(r,r.uint32());break;case 2:i.txResponse=s.TxResponse.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=k();return(0,c.isSet)(e.tx)&&(t.tx=o.Tx.fromJSON(e.tx)),(0,c.isSet)(e.txResponse)&&(t.txResponse=s.TxResponse.fromJSON(e.txResponse)),t},toJSON(e){let t={};return void 0!==e.tx&&(t.tx=e.tx?o.Tx.toJSON(e.tx):void 0),void 0!==e.txResponse&&(t.txResponse=e.txResponse?s.TxResponse.toJSON(e.txResponse):void 0),t},fromPartial(e){let t=k();return void 0!==e.tx&&null!==e.tx&&(t.tx=o.Tx.fromPartial(e.tx)),void 0!==e.txResponse&&null!==e.txResponse&&(t.txResponse=s.TxResponse.fromPartial(e.txResponse)),t}},t.GetBlockWithTxsRequest={typeUrl:"/cosmos.tx.v1beta1.GetBlockWithTxsRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.BinaryWriter.create();return e.height!==BigInt(0)&&t.uint32(8).int64(e.height),void 0!==e.pagination&&a.PageRequest.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof d.BinaryReader?e:new d.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=O();for(;r.pos>>3){case 1:i.height=r.int64();break;case 2:i.pagination=a.PageRequest.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=O();return(0,c.isSet)(e.height)&&(t.height=BigInt(e.height.toString())),(0,c.isSet)(e.pagination)&&(t.pagination=a.PageRequest.fromJSON(e.pagination)),t},toJSON(e){let t={};return void 0!==e.height&&(t.height=(e.height||BigInt(0)).toString()),void 0!==e.pagination&&(t.pagination=e.pagination?a.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){let t=O();return void 0!==e.height&&null!==e.height&&(t.height=BigInt(e.height.toString())),void 0!==e.pagination&&null!==e.pagination&&(t.pagination=a.PageRequest.fromPartial(e.pagination)),t}},t.GetBlockWithTxsResponse={typeUrl:"/cosmos.tx.v1beta1.GetBlockWithTxsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.BinaryWriter.create();for(let r of e.txs)o.Tx.encode(r,t.uint32(10).fork()).ldelim();return void 0!==e.blockId&&l.BlockID.encode(e.blockId,t.uint32(18).fork()).ldelim(),void 0!==e.block&&u.Block.encode(e.block,t.uint32(26).fork()).ldelim(),void 0!==e.pagination&&a.PageResponse.encode(e.pagination,t.uint32(34).fork()).ldelim(),t},decode(e,t){let r=e instanceof d.BinaryReader?e:new d.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=P();for(;r.pos>>3){case 1:i.txs.push(o.Tx.decode(r,r.uint32()));break;case 2:i.blockId=l.BlockID.decode(r,r.uint32());break;case 3:i.block=u.Block.decode(r,r.uint32());break;case 4:i.pagination=a.PageResponse.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=P();return Array.isArray(null==e?void 0:e.txs)&&(t.txs=e.txs.map(e=>o.Tx.fromJSON(e))),(0,c.isSet)(e.blockId)&&(t.blockId=l.BlockID.fromJSON(e.blockId)),(0,c.isSet)(e.block)&&(t.block=u.Block.fromJSON(e.block)),(0,c.isSet)(e.pagination)&&(t.pagination=a.PageResponse.fromJSON(e.pagination)),t},toJSON(e){let t={};return e.txs?t.txs=e.txs.map(e=>e?o.Tx.toJSON(e):void 0):t.txs=[],void 0!==e.blockId&&(t.blockId=e.blockId?l.BlockID.toJSON(e.blockId):void 0),void 0!==e.block&&(t.block=e.block?u.Block.toJSON(e.block):void 0),void 0!==e.pagination&&(t.pagination=e.pagination?a.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=P();return r.txs=(null===(t=e.txs)||void 0===t?void 0:t.map(e=>o.Tx.fromPartial(e)))||[],void 0!==e.blockId&&null!==e.blockId&&(r.blockId=l.BlockID.fromPartial(e.blockId)),void 0!==e.block&&null!==e.block&&(r.block=u.Block.fromPartial(e.block)),void 0!==e.pagination&&null!==e.pagination&&(r.pagination=a.PageResponse.fromPartial(e.pagination)),r}},t.TxDecodeRequest={typeUrl:"/cosmos.tx.v1beta1.TxDecodeRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.BinaryWriter.create();return 0!==e.txBytes.length&&t.uint32(10).bytes(e.txBytes),t},decode(e,t){let r=e instanceof d.BinaryReader?e:new d.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=A();for(;r.pos>>3==1?i.txBytes=r.bytes():r.skipType(7&e)}return i},fromJSON(e){let t=A();return(0,c.isSet)(e.txBytes)&&(t.txBytes=(0,c.bytesFromBase64)(e.txBytes)),t},toJSON(e){let t={};return void 0!==e.txBytes&&(t.txBytes=(0,c.base64FromBytes)(void 0!==e.txBytes?e.txBytes:new Uint8Array)),t},fromPartial(e){var t;let r=A();return r.txBytes=null!==(t=e.txBytes)&&void 0!==t?t:new Uint8Array,r}},t.TxDecodeResponse={typeUrl:"/cosmos.tx.v1beta1.TxDecodeResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.BinaryWriter.create();return void 0!==e.tx&&o.Tx.encode(e.tx,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof d.BinaryReader?e:new d.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=I();for(;r.pos>>3==1?i.tx=o.Tx.decode(r,r.uint32()):r.skipType(7&e)}return i},fromJSON(e){let t=I();return(0,c.isSet)(e.tx)&&(t.tx=o.Tx.fromJSON(e.tx)),t},toJSON(e){let t={};return void 0!==e.tx&&(t.tx=e.tx?o.Tx.toJSON(e.tx):void 0),t},fromPartial(e){let t=I();return void 0!==e.tx&&null!==e.tx&&(t.tx=o.Tx.fromPartial(e.tx)),t}},t.TxEncodeRequest={typeUrl:"/cosmos.tx.v1beta1.TxEncodeRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.BinaryWriter.create();return void 0!==e.tx&&o.Tx.encode(e.tx,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof d.BinaryReader?e:new d.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=R();for(;r.pos>>3==1?i.tx=o.Tx.decode(r,r.uint32()):r.skipType(7&e)}return i},fromJSON(e){let t=R();return(0,c.isSet)(e.tx)&&(t.tx=o.Tx.fromJSON(e.tx)),t},toJSON(e){let t={};return void 0!==e.tx&&(t.tx=e.tx?o.Tx.toJSON(e.tx):void 0),t},fromPartial(e){let t=R();return void 0!==e.tx&&null!==e.tx&&(t.tx=o.Tx.fromPartial(e.tx)),t}},t.TxEncodeResponse={typeUrl:"/cosmos.tx.v1beta1.TxEncodeResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.BinaryWriter.create();return 0!==e.txBytes.length&&t.uint32(10).bytes(e.txBytes),t},decode(e,t){let r=e instanceof d.BinaryReader?e:new d.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=E();for(;r.pos>>3==1?i.txBytes=r.bytes():r.skipType(7&e)}return i},fromJSON(e){let t=E();return(0,c.isSet)(e.txBytes)&&(t.txBytes=(0,c.bytesFromBase64)(e.txBytes)),t},toJSON(e){let t={};return void 0!==e.txBytes&&(t.txBytes=(0,c.base64FromBytes)(void 0!==e.txBytes?e.txBytes:new Uint8Array)),t},fromPartial(e){var t;let r=E();return r.txBytes=null!==(t=e.txBytes)&&void 0!==t?t:new Uint8Array,r}},t.TxEncodeAminoRequest={typeUrl:"/cosmos.tx.v1beta1.TxEncodeAminoRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.BinaryWriter.create();return""!==e.aminoJson&&t.uint32(10).string(e.aminoJson),t},decode(e,t){let r=e instanceof d.BinaryReader?e:new d.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=T();for(;r.pos>>3==1?i.aminoJson=r.string():r.skipType(7&e)}return i},fromJSON(e){let t=T();return(0,c.isSet)(e.aminoJson)&&(t.aminoJson=String(e.aminoJson)),t},toJSON(e){let t={};return void 0!==e.aminoJson&&(t.aminoJson=e.aminoJson),t},fromPartial(e){var t;let r=T();return r.aminoJson=null!==(t=e.aminoJson)&&void 0!==t?t:"",r}},t.TxEncodeAminoResponse={typeUrl:"/cosmos.tx.v1beta1.TxEncodeAminoResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.BinaryWriter.create();return 0!==e.aminoBinary.length&&t.uint32(10).bytes(e.aminoBinary),t},decode(e,t){let r=e instanceof d.BinaryReader?e:new d.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=N();for(;r.pos>>3==1?i.aminoBinary=r.bytes():r.skipType(7&e)}return i},fromJSON(e){let t=N();return(0,c.isSet)(e.aminoBinary)&&(t.aminoBinary=(0,c.bytesFromBase64)(e.aminoBinary)),t},toJSON(e){let t={};return void 0!==e.aminoBinary&&(t.aminoBinary=(0,c.base64FromBytes)(void 0!==e.aminoBinary?e.aminoBinary:new Uint8Array)),t},fromPartial(e){var t;let r=N();return r.aminoBinary=null!==(t=e.aminoBinary)&&void 0!==t?t:new Uint8Array,r}},t.TxDecodeAminoRequest={typeUrl:"/cosmos.tx.v1beta1.TxDecodeAminoRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.BinaryWriter.create();return 0!==e.aminoBinary.length&&t.uint32(10).bytes(e.aminoBinary),t},decode(e,t){let r=e instanceof d.BinaryReader?e:new d.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=x();for(;r.pos>>3==1?i.aminoBinary=r.bytes():r.skipType(7&e)}return i},fromJSON(e){let t=x();return(0,c.isSet)(e.aminoBinary)&&(t.aminoBinary=(0,c.bytesFromBase64)(e.aminoBinary)),t},toJSON(e){let t={};return void 0!==e.aminoBinary&&(t.aminoBinary=(0,c.base64FromBytes)(void 0!==e.aminoBinary?e.aminoBinary:new Uint8Array)),t},fromPartial(e){var t;let r=x();return r.aminoBinary=null!==(t=e.aminoBinary)&&void 0!==t?t:new Uint8Array,r}},t.TxDecodeAminoResponse={typeUrl:"/cosmos.tx.v1beta1.TxDecodeAminoResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.BinaryWriter.create();return""!==e.aminoJson&&t.uint32(10).string(e.aminoJson),t},decode(e,t){let r=e instanceof d.BinaryReader?e:new d.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=B();for(;r.pos>>3==1?i.aminoJson=r.string():r.skipType(7&e)}return i},fromJSON(e){let t=B();return(0,c.isSet)(e.aminoJson)&&(t.aminoJson=String(e.aminoJson)),t},toJSON(e){let t={};return void 0!==e.aminoJson&&(t.aminoJson=e.aminoJson),t},fromPartial(e){var t;let r=B();return r.aminoJson=null!==(t=e.aminoJson)&&void 0!==t?t:"",r}};class C{Simulate(e){let r=t.SimulateRequest.encode(e).finish();return this.rpc.request("cosmos.tx.v1beta1.Service","Simulate",r).then(e=>t.SimulateResponse.decode(new d.BinaryReader(e)))}GetTx(e){let r=t.GetTxRequest.encode(e).finish();return this.rpc.request("cosmos.tx.v1beta1.Service","GetTx",r).then(e=>t.GetTxResponse.decode(new d.BinaryReader(e)))}BroadcastTx(e){let r=t.BroadcastTxRequest.encode(e).finish();return this.rpc.request("cosmos.tx.v1beta1.Service","BroadcastTx",r).then(e=>t.BroadcastTxResponse.decode(new d.BinaryReader(e)))}GetTxsEvent(e){let r=t.GetTxsEventRequest.encode(e).finish();return this.rpc.request("cosmos.tx.v1beta1.Service","GetTxsEvent",r).then(e=>t.GetTxsEventResponse.decode(new d.BinaryReader(e)))}GetBlockWithTxs(e){let r=t.GetBlockWithTxsRequest.encode(e).finish();return this.rpc.request("cosmos.tx.v1beta1.Service","GetBlockWithTxs",r).then(e=>t.GetBlockWithTxsResponse.decode(new d.BinaryReader(e)))}TxDecode(e){let r=t.TxDecodeRequest.encode(e).finish();return this.rpc.request("cosmos.tx.v1beta1.Service","TxDecode",r).then(e=>t.TxDecodeResponse.decode(new d.BinaryReader(e)))}TxEncode(e){let r=t.TxEncodeRequest.encode(e).finish();return this.rpc.request("cosmos.tx.v1beta1.Service","TxEncode",r).then(e=>t.TxEncodeResponse.decode(new d.BinaryReader(e)))}TxEncodeAmino(e){let r=t.TxEncodeAminoRequest.encode(e).finish();return this.rpc.request("cosmos.tx.v1beta1.Service","TxEncodeAmino",r).then(e=>t.TxEncodeAminoResponse.decode(new d.BinaryReader(e)))}TxDecodeAmino(e){let r=t.TxDecodeAminoRequest.encode(e).finish();return this.rpc.request("cosmos.tx.v1beta1.Service","TxDecodeAmino",r).then(e=>t.TxDecodeAminoResponse.decode(new d.BinaryReader(e)))}constructor(e){this.rpc=e,this.Simulate=this.Simulate.bind(this),this.GetTx=this.GetTx.bind(this),this.BroadcastTx=this.BroadcastTx.bind(this),this.GetTxsEvent=this.GetTxsEvent.bind(this),this.GetBlockWithTxs=this.GetBlockWithTxs.bind(this),this.TxDecode=this.TxDecode.bind(this),this.TxEncode=this.TxEncode.bind(this),this.TxEncodeAmino=this.TxEncodeAmino.bind(this),this.TxDecodeAmino=this.TxDecodeAmino.bind(this)}}t.ServiceClientImpl=C},26136:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AuxSignerData=t.Tip=t.Fee=t.ModeInfo_Multi=t.ModeInfo_Single=t.ModeInfo=t.SignerInfo=t.AuthInfo=t.TxBody=t.SignDocDirectAux=t.SignDoc=t.TxRaw=t.Tx=t.protobufPackage=void 0;let n=r(11879),i=r(2264),o=r(50263),a=r(14841),s=r(46554),l=r(99133);function u(){return{body:void 0,authInfo:void 0,signatures:[]}}function d(){return{bodyBytes:new Uint8Array,authInfoBytes:new Uint8Array,signatures:[]}}function c(){return{bodyBytes:new Uint8Array,authInfoBytes:new Uint8Array,chainId:"",accountNumber:BigInt(0)}}function p(){return{bodyBytes:new Uint8Array,publicKey:void 0,chainId:"",accountNumber:BigInt(0),sequence:BigInt(0),tip:void 0}}function f(){return{messages:[],memo:"",timeoutHeight:BigInt(0),extensionOptions:[],nonCriticalExtensionOptions:[]}}function h(){return{signerInfos:[],fee:void 0,tip:void 0}}function g(){return{publicKey:void 0,modeInfo:void 0,sequence:BigInt(0)}}function m(){return{single:void 0,multi:void 0}}function y(){return{mode:0}}function v(){return{bitarray:void 0,modeInfos:[]}}function b(){return{amount:[],gasLimit:BigInt(0),payer:"",granter:""}}function S(){return{amount:[],tipper:""}}function w(){return{address:"",signDoc:void 0,mode:0,sig:new Uint8Array}}t.protobufPackage="cosmos.tx.v1beta1",t.Tx={typeUrl:"/cosmos.tx.v1beta1.Tx",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();for(let n of(void 0!==e.body&&t.TxBody.encode(e.body,r.uint32(10).fork()).ldelim(),void 0!==e.authInfo&&t.AuthInfo.encode(e.authInfo,r.uint32(18).fork()).ldelim(),e.signatures))r.uint32(26).bytes(n);return r},decode(e,r){let n=e instanceof s.BinaryReader?e:new s.BinaryReader(e),i=void 0===r?n.len:n.pos+r,o=u();for(;n.pos>>3){case 1:o.body=t.TxBody.decode(n,n.uint32());break;case 2:o.authInfo=t.AuthInfo.decode(n,n.uint32());break;case 3:o.signatures.push(n.bytes());break;default:n.skipType(7&e)}}return o},fromJSON(e){let r=u();return(0,l.isSet)(e.body)&&(r.body=t.TxBody.fromJSON(e.body)),(0,l.isSet)(e.authInfo)&&(r.authInfo=t.AuthInfo.fromJSON(e.authInfo)),Array.isArray(null==e?void 0:e.signatures)&&(r.signatures=e.signatures.map(e=>(0,l.bytesFromBase64)(e))),r},toJSON(e){let r={};return void 0!==e.body&&(r.body=e.body?t.TxBody.toJSON(e.body):void 0),void 0!==e.authInfo&&(r.authInfo=e.authInfo?t.AuthInfo.toJSON(e.authInfo):void 0),e.signatures?r.signatures=e.signatures.map(e=>(0,l.base64FromBytes)(void 0!==e?e:new Uint8Array)):r.signatures=[],r},fromPartial(e){var r;let n=u();return void 0!==e.body&&null!==e.body&&(n.body=t.TxBody.fromPartial(e.body)),void 0!==e.authInfo&&null!==e.authInfo&&(n.authInfo=t.AuthInfo.fromPartial(e.authInfo)),n.signatures=(null===(r=e.signatures)||void 0===r?void 0:r.map(e=>e))||[],n}},t.TxRaw={typeUrl:"/cosmos.tx.v1beta1.TxRaw",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();for(let r of(0!==e.bodyBytes.length&&t.uint32(10).bytes(e.bodyBytes),0!==e.authInfoBytes.length&&t.uint32(18).bytes(e.authInfoBytes),e.signatures))t.uint32(26).bytes(r);return t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=d();for(;r.pos>>3){case 1:i.bodyBytes=r.bytes();break;case 2:i.authInfoBytes=r.bytes();break;case 3:i.signatures.push(r.bytes());break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=d();return(0,l.isSet)(e.bodyBytes)&&(t.bodyBytes=(0,l.bytesFromBase64)(e.bodyBytes)),(0,l.isSet)(e.authInfoBytes)&&(t.authInfoBytes=(0,l.bytesFromBase64)(e.authInfoBytes)),Array.isArray(null==e?void 0:e.signatures)&&(t.signatures=e.signatures.map(e=>(0,l.bytesFromBase64)(e))),t},toJSON(e){let t={};return void 0!==e.bodyBytes&&(t.bodyBytes=(0,l.base64FromBytes)(void 0!==e.bodyBytes?e.bodyBytes:new Uint8Array)),void 0!==e.authInfoBytes&&(t.authInfoBytes=(0,l.base64FromBytes)(void 0!==e.authInfoBytes?e.authInfoBytes:new Uint8Array)),e.signatures?t.signatures=e.signatures.map(e=>(0,l.base64FromBytes)(void 0!==e?e:new Uint8Array)):t.signatures=[],t},fromPartial(e){var t,r,n;let i=d();return i.bodyBytes=null!==(r=e.bodyBytes)&&void 0!==r?r:new Uint8Array,i.authInfoBytes=null!==(n=e.authInfoBytes)&&void 0!==n?n:new Uint8Array,i.signatures=(null===(t=e.signatures)||void 0===t?void 0:t.map(e=>e))||[],i}},t.SignDoc={typeUrl:"/cosmos.tx.v1beta1.SignDoc",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return 0!==e.bodyBytes.length&&t.uint32(10).bytes(e.bodyBytes),0!==e.authInfoBytes.length&&t.uint32(18).bytes(e.authInfoBytes),""!==e.chainId&&t.uint32(26).string(e.chainId),e.accountNumber!==BigInt(0)&&t.uint32(32).uint64(e.accountNumber),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=c();for(;r.pos>>3){case 1:i.bodyBytes=r.bytes();break;case 2:i.authInfoBytes=r.bytes();break;case 3:i.chainId=r.string();break;case 4:i.accountNumber=r.uint64();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=c();return(0,l.isSet)(e.bodyBytes)&&(t.bodyBytes=(0,l.bytesFromBase64)(e.bodyBytes)),(0,l.isSet)(e.authInfoBytes)&&(t.authInfoBytes=(0,l.bytesFromBase64)(e.authInfoBytes)),(0,l.isSet)(e.chainId)&&(t.chainId=String(e.chainId)),(0,l.isSet)(e.accountNumber)&&(t.accountNumber=BigInt(e.accountNumber.toString())),t},toJSON(e){let t={};return void 0!==e.bodyBytes&&(t.bodyBytes=(0,l.base64FromBytes)(void 0!==e.bodyBytes?e.bodyBytes:new Uint8Array)),void 0!==e.authInfoBytes&&(t.authInfoBytes=(0,l.base64FromBytes)(void 0!==e.authInfoBytes?e.authInfoBytes:new Uint8Array)),void 0!==e.chainId&&(t.chainId=e.chainId),void 0!==e.accountNumber&&(t.accountNumber=(e.accountNumber||BigInt(0)).toString()),t},fromPartial(e){var t,r,n;let i=c();return i.bodyBytes=null!==(t=e.bodyBytes)&&void 0!==t?t:new Uint8Array,i.authInfoBytes=null!==(r=e.authInfoBytes)&&void 0!==r?r:new Uint8Array,i.chainId=null!==(n=e.chainId)&&void 0!==n?n:"",void 0!==e.accountNumber&&null!==e.accountNumber&&(i.accountNumber=BigInt(e.accountNumber.toString())),i}},t.SignDocDirectAux={typeUrl:"/cosmos.tx.v1beta1.SignDocDirectAux",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return 0!==e.bodyBytes.length&&r.uint32(10).bytes(e.bodyBytes),void 0!==e.publicKey&&n.Any.encode(e.publicKey,r.uint32(18).fork()).ldelim(),""!==e.chainId&&r.uint32(26).string(e.chainId),e.accountNumber!==BigInt(0)&&r.uint32(32).uint64(e.accountNumber),e.sequence!==BigInt(0)&&r.uint32(40).uint64(e.sequence),void 0!==e.tip&&t.Tip.encode(e.tip,r.uint32(50).fork()).ldelim(),r},decode(e,r){let i=e instanceof s.BinaryReader?e:new s.BinaryReader(e),o=void 0===r?i.len:i.pos+r,a=p();for(;i.pos>>3){case 1:a.bodyBytes=i.bytes();break;case 2:a.publicKey=n.Any.decode(i,i.uint32());break;case 3:a.chainId=i.string();break;case 4:a.accountNumber=i.uint64();break;case 5:a.sequence=i.uint64();break;case 6:a.tip=t.Tip.decode(i,i.uint32());break;default:i.skipType(7&e)}}return a},fromJSON(e){let r=p();return(0,l.isSet)(e.bodyBytes)&&(r.bodyBytes=(0,l.bytesFromBase64)(e.bodyBytes)),(0,l.isSet)(e.publicKey)&&(r.publicKey=n.Any.fromJSON(e.publicKey)),(0,l.isSet)(e.chainId)&&(r.chainId=String(e.chainId)),(0,l.isSet)(e.accountNumber)&&(r.accountNumber=BigInt(e.accountNumber.toString())),(0,l.isSet)(e.sequence)&&(r.sequence=BigInt(e.sequence.toString())),(0,l.isSet)(e.tip)&&(r.tip=t.Tip.fromJSON(e.tip)),r},toJSON(e){let r={};return void 0!==e.bodyBytes&&(r.bodyBytes=(0,l.base64FromBytes)(void 0!==e.bodyBytes?e.bodyBytes:new Uint8Array)),void 0!==e.publicKey&&(r.publicKey=e.publicKey?n.Any.toJSON(e.publicKey):void 0),void 0!==e.chainId&&(r.chainId=e.chainId),void 0!==e.accountNumber&&(r.accountNumber=(e.accountNumber||BigInt(0)).toString()),void 0!==e.sequence&&(r.sequence=(e.sequence||BigInt(0)).toString()),void 0!==e.tip&&(r.tip=e.tip?t.Tip.toJSON(e.tip):void 0),r},fromPartial(e){var r,i;let o=p();return o.bodyBytes=null!==(r=e.bodyBytes)&&void 0!==r?r:new Uint8Array,void 0!==e.publicKey&&null!==e.publicKey&&(o.publicKey=n.Any.fromPartial(e.publicKey)),o.chainId=null!==(i=e.chainId)&&void 0!==i?i:"",void 0!==e.accountNumber&&null!==e.accountNumber&&(o.accountNumber=BigInt(e.accountNumber.toString())),void 0!==e.sequence&&null!==e.sequence&&(o.sequence=BigInt(e.sequence.toString())),void 0!==e.tip&&null!==e.tip&&(o.tip=t.Tip.fromPartial(e.tip)),o}},t.TxBody={typeUrl:"/cosmos.tx.v1beta1.TxBody",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();for(let r of e.messages)n.Any.encode(r,t.uint32(10).fork()).ldelim();for(let r of(""!==e.memo&&t.uint32(18).string(e.memo),e.timeoutHeight!==BigInt(0)&&t.uint32(24).uint64(e.timeoutHeight),e.extensionOptions))n.Any.encode(r,t.uint32(8186).fork()).ldelim();for(let r of e.nonCriticalExtensionOptions)n.Any.encode(r,t.uint32(16378).fork()).ldelim();return t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),i=void 0===t?r.len:r.pos+t,o=f();for(;r.pos>>3){case 1:o.messages.push(n.Any.decode(r,r.uint32()));break;case 2:o.memo=r.string();break;case 3:o.timeoutHeight=r.uint64();break;case 1023:o.extensionOptions.push(n.Any.decode(r,r.uint32()));break;case 2047:o.nonCriticalExtensionOptions.push(n.Any.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return o},fromJSON(e){let t=f();return Array.isArray(null==e?void 0:e.messages)&&(t.messages=e.messages.map(e=>n.Any.fromJSON(e))),(0,l.isSet)(e.memo)&&(t.memo=String(e.memo)),(0,l.isSet)(e.timeoutHeight)&&(t.timeoutHeight=BigInt(e.timeoutHeight.toString())),Array.isArray(null==e?void 0:e.extensionOptions)&&(t.extensionOptions=e.extensionOptions.map(e=>n.Any.fromJSON(e))),Array.isArray(null==e?void 0:e.nonCriticalExtensionOptions)&&(t.nonCriticalExtensionOptions=e.nonCriticalExtensionOptions.map(e=>n.Any.fromJSON(e))),t},toJSON(e){let t={};return e.messages?t.messages=e.messages.map(e=>e?n.Any.toJSON(e):void 0):t.messages=[],void 0!==e.memo&&(t.memo=e.memo),void 0!==e.timeoutHeight&&(t.timeoutHeight=(e.timeoutHeight||BigInt(0)).toString()),e.extensionOptions?t.extensionOptions=e.extensionOptions.map(e=>e?n.Any.toJSON(e):void 0):t.extensionOptions=[],e.nonCriticalExtensionOptions?t.nonCriticalExtensionOptions=e.nonCriticalExtensionOptions.map(e=>e?n.Any.toJSON(e):void 0):t.nonCriticalExtensionOptions=[],t},fromPartial(e){var t,r,i,o;let a=f();return a.messages=(null===(t=e.messages)||void 0===t?void 0:t.map(e=>n.Any.fromPartial(e)))||[],a.memo=null!==(o=e.memo)&&void 0!==o?o:"",void 0!==e.timeoutHeight&&null!==e.timeoutHeight&&(a.timeoutHeight=BigInt(e.timeoutHeight.toString())),a.extensionOptions=(null===(r=e.extensionOptions)||void 0===r?void 0:r.map(e=>n.Any.fromPartial(e)))||[],a.nonCriticalExtensionOptions=(null===(i=e.nonCriticalExtensionOptions)||void 0===i?void 0:i.map(e=>n.Any.fromPartial(e)))||[],a}},t.AuthInfo={typeUrl:"/cosmos.tx.v1beta1.AuthInfo",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();for(let n of e.signerInfos)t.SignerInfo.encode(n,r.uint32(10).fork()).ldelim();return void 0!==e.fee&&t.Fee.encode(e.fee,r.uint32(18).fork()).ldelim(),void 0!==e.tip&&t.Tip.encode(e.tip,r.uint32(26).fork()).ldelim(),r},decode(e,r){let n=e instanceof s.BinaryReader?e:new s.BinaryReader(e),i=void 0===r?n.len:n.pos+r,o=h();for(;n.pos>>3){case 1:o.signerInfos.push(t.SignerInfo.decode(n,n.uint32()));break;case 2:o.fee=t.Fee.decode(n,n.uint32());break;case 3:o.tip=t.Tip.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){let r=h();return Array.isArray(null==e?void 0:e.signerInfos)&&(r.signerInfos=e.signerInfos.map(e=>t.SignerInfo.fromJSON(e))),(0,l.isSet)(e.fee)&&(r.fee=t.Fee.fromJSON(e.fee)),(0,l.isSet)(e.tip)&&(r.tip=t.Tip.fromJSON(e.tip)),r},toJSON(e){let r={};return e.signerInfos?r.signerInfos=e.signerInfos.map(e=>e?t.SignerInfo.toJSON(e):void 0):r.signerInfos=[],void 0!==e.fee&&(r.fee=e.fee?t.Fee.toJSON(e.fee):void 0),void 0!==e.tip&&(r.tip=e.tip?t.Tip.toJSON(e.tip):void 0),r},fromPartial(e){var r;let n=h();return n.signerInfos=(null===(r=e.signerInfos)||void 0===r?void 0:r.map(e=>t.SignerInfo.fromPartial(e)))||[],void 0!==e.fee&&null!==e.fee&&(n.fee=t.Fee.fromPartial(e.fee)),void 0!==e.tip&&null!==e.tip&&(n.tip=t.Tip.fromPartial(e.tip)),n}},t.SignerInfo={typeUrl:"/cosmos.tx.v1beta1.SignerInfo",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return void 0!==e.publicKey&&n.Any.encode(e.publicKey,r.uint32(10).fork()).ldelim(),void 0!==e.modeInfo&&t.ModeInfo.encode(e.modeInfo,r.uint32(18).fork()).ldelim(),e.sequence!==BigInt(0)&&r.uint32(24).uint64(e.sequence),r},decode(e,r){let i=e instanceof s.BinaryReader?e:new s.BinaryReader(e),o=void 0===r?i.len:i.pos+r,a=g();for(;i.pos>>3){case 1:a.publicKey=n.Any.decode(i,i.uint32());break;case 2:a.modeInfo=t.ModeInfo.decode(i,i.uint32());break;case 3:a.sequence=i.uint64();break;default:i.skipType(7&e)}}return a},fromJSON(e){let r=g();return(0,l.isSet)(e.publicKey)&&(r.publicKey=n.Any.fromJSON(e.publicKey)),(0,l.isSet)(e.modeInfo)&&(r.modeInfo=t.ModeInfo.fromJSON(e.modeInfo)),(0,l.isSet)(e.sequence)&&(r.sequence=BigInt(e.sequence.toString())),r},toJSON(e){let r={};return void 0!==e.publicKey&&(r.publicKey=e.publicKey?n.Any.toJSON(e.publicKey):void 0),void 0!==e.modeInfo&&(r.modeInfo=e.modeInfo?t.ModeInfo.toJSON(e.modeInfo):void 0),void 0!==e.sequence&&(r.sequence=(e.sequence||BigInt(0)).toString()),r},fromPartial(e){let r=g();return void 0!==e.publicKey&&null!==e.publicKey&&(r.publicKey=n.Any.fromPartial(e.publicKey)),void 0!==e.modeInfo&&null!==e.modeInfo&&(r.modeInfo=t.ModeInfo.fromPartial(e.modeInfo)),void 0!==e.sequence&&null!==e.sequence&&(r.sequence=BigInt(e.sequence.toString())),r}},t.ModeInfo={typeUrl:"/cosmos.tx.v1beta1.ModeInfo",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return void 0!==e.single&&t.ModeInfo_Single.encode(e.single,r.uint32(10).fork()).ldelim(),void 0!==e.multi&&t.ModeInfo_Multi.encode(e.multi,r.uint32(18).fork()).ldelim(),r},decode(e,r){let n=e instanceof s.BinaryReader?e:new s.BinaryReader(e),i=void 0===r?n.len:n.pos+r,o=m();for(;n.pos>>3){case 1:o.single=t.ModeInfo_Single.decode(n,n.uint32());break;case 2:o.multi=t.ModeInfo_Multi.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){let r=m();return(0,l.isSet)(e.single)&&(r.single=t.ModeInfo_Single.fromJSON(e.single)),(0,l.isSet)(e.multi)&&(r.multi=t.ModeInfo_Multi.fromJSON(e.multi)),r},toJSON(e){let r={};return void 0!==e.single&&(r.single=e.single?t.ModeInfo_Single.toJSON(e.single):void 0),void 0!==e.multi&&(r.multi=e.multi?t.ModeInfo_Multi.toJSON(e.multi):void 0),r},fromPartial(e){let r=m();return void 0!==e.single&&null!==e.single&&(r.single=t.ModeInfo_Single.fromPartial(e.single)),void 0!==e.multi&&null!==e.multi&&(r.multi=t.ModeInfo_Multi.fromPartial(e.multi)),r}},t.ModeInfo_Single={typeUrl:"/cosmos.tx.v1beta1.Single",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return 0!==e.mode&&t.uint32(8).int32(e.mode),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=y();for(;r.pos>>3==1?i.mode=r.int32():r.skipType(7&e)}return i},fromJSON(e){let t=y();return(0,l.isSet)(e.mode)&&(t.mode=(0,i.signModeFromJSON)(e.mode)),t},toJSON(e){let t={};return void 0!==e.mode&&(t.mode=(0,i.signModeToJSON)(e.mode)),t},fromPartial(e){var t;let r=y();return r.mode=null!==(t=e.mode)&&void 0!==t?t:0,r}},t.ModeInfo_Multi={typeUrl:"/cosmos.tx.v1beta1.Multi",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();for(let n of(void 0!==e.bitarray&&o.CompactBitArray.encode(e.bitarray,r.uint32(10).fork()).ldelim(),e.modeInfos))t.ModeInfo.encode(n,r.uint32(18).fork()).ldelim();return r},decode(e,r){let n=e instanceof s.BinaryReader?e:new s.BinaryReader(e),i=void 0===r?n.len:n.pos+r,a=v();for(;n.pos>>3){case 1:a.bitarray=o.CompactBitArray.decode(n,n.uint32());break;case 2:a.modeInfos.push(t.ModeInfo.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return a},fromJSON(e){let r=v();return(0,l.isSet)(e.bitarray)&&(r.bitarray=o.CompactBitArray.fromJSON(e.bitarray)),Array.isArray(null==e?void 0:e.modeInfos)&&(r.modeInfos=e.modeInfos.map(e=>t.ModeInfo.fromJSON(e))),r},toJSON(e){let r={};return void 0!==e.bitarray&&(r.bitarray=e.bitarray?o.CompactBitArray.toJSON(e.bitarray):void 0),e.modeInfos?r.modeInfos=e.modeInfos.map(e=>e?t.ModeInfo.toJSON(e):void 0):r.modeInfos=[],r},fromPartial(e){var r;let n=v();return void 0!==e.bitarray&&null!==e.bitarray&&(n.bitarray=o.CompactBitArray.fromPartial(e.bitarray)),n.modeInfos=(null===(r=e.modeInfos)||void 0===r?void 0:r.map(e=>t.ModeInfo.fromPartial(e)))||[],n}},t.Fee={typeUrl:"/cosmos.tx.v1beta1.Fee",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();for(let r of e.amount)a.Coin.encode(r,t.uint32(10).fork()).ldelim();return e.gasLimit!==BigInt(0)&&t.uint32(16).uint64(e.gasLimit),""!==e.payer&&t.uint32(26).string(e.payer),""!==e.granter&&t.uint32(34).string(e.granter),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=b();for(;r.pos>>3){case 1:i.amount.push(a.Coin.decode(r,r.uint32()));break;case 2:i.gasLimit=r.uint64();break;case 3:i.payer=r.string();break;case 4:i.granter=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=b();return Array.isArray(null==e?void 0:e.amount)&&(t.amount=e.amount.map(e=>a.Coin.fromJSON(e))),(0,l.isSet)(e.gasLimit)&&(t.gasLimit=BigInt(e.gasLimit.toString())),(0,l.isSet)(e.payer)&&(t.payer=String(e.payer)),(0,l.isSet)(e.granter)&&(t.granter=String(e.granter)),t},toJSON(e){let t={};return e.amount?t.amount=e.amount.map(e=>e?a.Coin.toJSON(e):void 0):t.amount=[],void 0!==e.gasLimit&&(t.gasLimit=(e.gasLimit||BigInt(0)).toString()),void 0!==e.payer&&(t.payer=e.payer),void 0!==e.granter&&(t.granter=e.granter),t},fromPartial(e){var t,r,n;let i=b();return i.amount=(null===(t=e.amount)||void 0===t?void 0:t.map(e=>a.Coin.fromPartial(e)))||[],void 0!==e.gasLimit&&null!==e.gasLimit&&(i.gasLimit=BigInt(e.gasLimit.toString())),i.payer=null!==(r=e.payer)&&void 0!==r?r:"",i.granter=null!==(n=e.granter)&&void 0!==n?n:"",i}},t.Tip={typeUrl:"/cosmos.tx.v1beta1.Tip",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();for(let r of e.amount)a.Coin.encode(r,t.uint32(10).fork()).ldelim();return""!==e.tipper&&t.uint32(18).string(e.tipper),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=S();for(;r.pos>>3){case 1:i.amount.push(a.Coin.decode(r,r.uint32()));break;case 2:i.tipper=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=S();return Array.isArray(null==e?void 0:e.amount)&&(t.amount=e.amount.map(e=>a.Coin.fromJSON(e))),(0,l.isSet)(e.tipper)&&(t.tipper=String(e.tipper)),t},toJSON(e){let t={};return e.amount?t.amount=e.amount.map(e=>e?a.Coin.toJSON(e):void 0):t.amount=[],void 0!==e.tipper&&(t.tipper=e.tipper),t},fromPartial(e){var t,r;let n=S();return n.amount=(null===(t=e.amount)||void 0===t?void 0:t.map(e=>a.Coin.fromPartial(e)))||[],n.tipper=null!==(r=e.tipper)&&void 0!==r?r:"",n}},t.AuxSignerData={typeUrl:"/cosmos.tx.v1beta1.AuxSignerData",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return""!==e.address&&r.uint32(10).string(e.address),void 0!==e.signDoc&&t.SignDocDirectAux.encode(e.signDoc,r.uint32(18).fork()).ldelim(),0!==e.mode&&r.uint32(24).int32(e.mode),0!==e.sig.length&&r.uint32(34).bytes(e.sig),r},decode(e,r){let n=e instanceof s.BinaryReader?e:new s.BinaryReader(e),i=void 0===r?n.len:n.pos+r,o=w();for(;n.pos>>3){case 1:o.address=n.string();break;case 2:o.signDoc=t.SignDocDirectAux.decode(n,n.uint32());break;case 3:o.mode=n.int32();break;case 4:o.sig=n.bytes();break;default:n.skipType(7&e)}}return o},fromJSON(e){let r=w();return(0,l.isSet)(e.address)&&(r.address=String(e.address)),(0,l.isSet)(e.signDoc)&&(r.signDoc=t.SignDocDirectAux.fromJSON(e.signDoc)),(0,l.isSet)(e.mode)&&(r.mode=(0,i.signModeFromJSON)(e.mode)),(0,l.isSet)(e.sig)&&(r.sig=(0,l.bytesFromBase64)(e.sig)),r},toJSON(e){let r={};return void 0!==e.address&&(r.address=e.address),void 0!==e.signDoc&&(r.signDoc=e.signDoc?t.SignDocDirectAux.toJSON(e.signDoc):void 0),void 0!==e.mode&&(r.mode=(0,i.signModeToJSON)(e.mode)),void 0!==e.sig&&(r.sig=(0,l.base64FromBytes)(void 0!==e.sig?e.sig:new Uint8Array)),r},fromPartial(e){var r,n,i;let o=w();return o.address=null!==(r=e.address)&&void 0!==r?r:"",void 0!==e.signDoc&&null!==e.signDoc&&(o.signDoc=t.SignDocDirectAux.fromPartial(e.signDoc)),o.mode=null!==(n=e.mode)&&void 0!==n?n:0,o.sig=null!==(i=e.sig)&&void 0!==i?i:new Uint8Array,o}}},61819:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ModuleVersion=t.CancelSoftwareUpgradeProposal=t.SoftwareUpgradeProposal=t.Plan=t.protobufPackage=void 0;let n=r(9990),i=r(11879),o=r(46554),a=r(99133);function s(){return{name:"",time:n.Timestamp.fromPartial({}),height:BigInt(0),info:"",upgradedClientState:void 0}}function l(){return{title:"",description:"",plan:t.Plan.fromPartial({})}}function u(){return{title:"",description:""}}function d(){return{name:"",version:BigInt(0)}}t.protobufPackage="cosmos.upgrade.v1beta1",t.Plan={typeUrl:"/cosmos.upgrade.v1beta1.Plan",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.name&&t.uint32(10).string(e.name),void 0!==e.time&&n.Timestamp.encode(e.time,t.uint32(18).fork()).ldelim(),e.height!==BigInt(0)&&t.uint32(24).int64(e.height),""!==e.info&&t.uint32(34).string(e.info),void 0!==e.upgradedClientState&&i.Any.encode(e.upgradedClientState,t.uint32(42).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),a=void 0===t?r.len:r.pos+t,l=s();for(;r.pos>>3){case 1:l.name=r.string();break;case 2:l.time=n.Timestamp.decode(r,r.uint32());break;case 3:l.height=r.int64();break;case 4:l.info=r.string();break;case 5:l.upgradedClientState=i.Any.decode(r,r.uint32());break;default:r.skipType(7&e)}}return l},fromJSON(e){let t=s();return(0,a.isSet)(e.name)&&(t.name=String(e.name)),(0,a.isSet)(e.time)&&(t.time=(0,a.fromJsonTimestamp)(e.time)),(0,a.isSet)(e.height)&&(t.height=BigInt(e.height.toString())),(0,a.isSet)(e.info)&&(t.info=String(e.info)),(0,a.isSet)(e.upgradedClientState)&&(t.upgradedClientState=i.Any.fromJSON(e.upgradedClientState)),t},toJSON(e){let t={};return void 0!==e.name&&(t.name=e.name),void 0!==e.time&&(t.time=(0,a.fromTimestamp)(e.time).toISOString()),void 0!==e.height&&(t.height=(e.height||BigInt(0)).toString()),void 0!==e.info&&(t.info=e.info),void 0!==e.upgradedClientState&&(t.upgradedClientState=e.upgradedClientState?i.Any.toJSON(e.upgradedClientState):void 0),t},fromPartial(e){var t,r;let o=s();return o.name=null!==(t=e.name)&&void 0!==t?t:"",void 0!==e.time&&null!==e.time&&(o.time=n.Timestamp.fromPartial(e.time)),void 0!==e.height&&null!==e.height&&(o.height=BigInt(e.height.toString())),o.info=null!==(r=e.info)&&void 0!==r?r:"",void 0!==e.upgradedClientState&&null!==e.upgradedClientState&&(o.upgradedClientState=i.Any.fromPartial(e.upgradedClientState)),o}},t.SoftwareUpgradeProposal={typeUrl:"/cosmos.upgrade.v1beta1.SoftwareUpgradeProposal",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.title&&r.uint32(10).string(e.title),""!==e.description&&r.uint32(18).string(e.description),void 0!==e.plan&&t.Plan.encode(e.plan,r.uint32(26).fork()).ldelim(),r},decode(e,r){let n=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===r?n.len:n.pos+r,a=l();for(;n.pos>>3){case 1:a.title=n.string();break;case 2:a.description=n.string();break;case 3:a.plan=t.Plan.decode(n,n.uint32());break;default:n.skipType(7&e)}}return a},fromJSON(e){let r=l();return(0,a.isSet)(e.title)&&(r.title=String(e.title)),(0,a.isSet)(e.description)&&(r.description=String(e.description)),(0,a.isSet)(e.plan)&&(r.plan=t.Plan.fromJSON(e.plan)),r},toJSON(e){let r={};return void 0!==e.title&&(r.title=e.title),void 0!==e.description&&(r.description=e.description),void 0!==e.plan&&(r.plan=e.plan?t.Plan.toJSON(e.plan):void 0),r},fromPartial(e){var r,n;let i=l();return i.title=null!==(r=e.title)&&void 0!==r?r:"",i.description=null!==(n=e.description)&&void 0!==n?n:"",void 0!==e.plan&&null!==e.plan&&(i.plan=t.Plan.fromPartial(e.plan)),i}},t.CancelSoftwareUpgradeProposal={typeUrl:"/cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.title&&t.uint32(10).string(e.title),""!==e.description&&t.uint32(18).string(e.description),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=u();for(;r.pos>>3){case 1:i.title=r.string();break;case 2:i.description=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=u();return(0,a.isSet)(e.title)&&(t.title=String(e.title)),(0,a.isSet)(e.description)&&(t.description=String(e.description)),t},toJSON(e){let t={};return void 0!==e.title&&(t.title=e.title),void 0!==e.description&&(t.description=e.description),t},fromPartial(e){var t,r;let n=u();return n.title=null!==(t=e.title)&&void 0!==t?t:"",n.description=null!==(r=e.description)&&void 0!==r?r:"",n}},t.ModuleVersion={typeUrl:"/cosmos.upgrade.v1beta1.ModuleVersion",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.name&&t.uint32(10).string(e.name),e.version!==BigInt(0)&&t.uint32(16).uint64(e.version),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=d();for(;r.pos>>3){case 1:i.name=r.string();break;case 2:i.version=r.uint64();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=d();return(0,a.isSet)(e.name)&&(t.name=String(e.name)),(0,a.isSet)(e.version)&&(t.version=BigInt(e.version.toString())),t},toJSON(e){let t={};return void 0!==e.name&&(t.name=e.name),void 0!==e.version&&(t.version=(e.version||BigInt(0)).toString()),t},fromPartial(e){var t;let r=d();return r.name=null!==(t=e.name)&&void 0!==t?t:"",void 0!==e.version&&null!==e.version&&(r.version=BigInt(e.version.toString())),r}}},7633:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MsgClientImpl=t.MsgCreatePeriodicVestingAccountResponse=t.MsgCreatePeriodicVestingAccount=t.MsgCreatePermanentLockedAccountResponse=t.MsgCreatePermanentLockedAccount=t.MsgCreateVestingAccountResponse=t.MsgCreateVestingAccount=t.protobufPackage=void 0;let n=r(14841),i=r(18855),o=r(46554),a=r(99133);function s(){return{fromAddress:"",toAddress:"",amount:[],endTime:BigInt(0),delayed:!1}}function l(){return{}}function u(){return{fromAddress:"",toAddress:"",amount:[]}}function d(){return{}}function c(){return{fromAddress:"",toAddress:"",startTime:BigInt(0),vestingPeriods:[]}}function p(){return{}}t.protobufPackage="cosmos.vesting.v1beta1",t.MsgCreateVestingAccount={typeUrl:"/cosmos.vesting.v1beta1.MsgCreateVestingAccount",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of(""!==e.fromAddress&&t.uint32(10).string(e.fromAddress),""!==e.toAddress&&t.uint32(18).string(e.toAddress),e.amount))n.Coin.encode(r,t.uint32(26).fork()).ldelim();return e.endTime!==BigInt(0)&&t.uint32(32).int64(e.endTime),!0===e.delayed&&t.uint32(40).bool(e.delayed),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=s();for(;r.pos>>3){case 1:a.fromAddress=r.string();break;case 2:a.toAddress=r.string();break;case 3:a.amount.push(n.Coin.decode(r,r.uint32()));break;case 4:a.endTime=r.int64();break;case 5:a.delayed=r.bool();break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=s();return(0,a.isSet)(e.fromAddress)&&(t.fromAddress=String(e.fromAddress)),(0,a.isSet)(e.toAddress)&&(t.toAddress=String(e.toAddress)),Array.isArray(null==e?void 0:e.amount)&&(t.amount=e.amount.map(e=>n.Coin.fromJSON(e))),(0,a.isSet)(e.endTime)&&(t.endTime=BigInt(e.endTime.toString())),(0,a.isSet)(e.delayed)&&(t.delayed=!!e.delayed),t},toJSON(e){let t={};return void 0!==e.fromAddress&&(t.fromAddress=e.fromAddress),void 0!==e.toAddress&&(t.toAddress=e.toAddress),e.amount?t.amount=e.amount.map(e=>e?n.Coin.toJSON(e):void 0):t.amount=[],void 0!==e.endTime&&(t.endTime=(e.endTime||BigInt(0)).toString()),void 0!==e.delayed&&(t.delayed=e.delayed),t},fromPartial(e){var t,r,i,o;let a=s();return a.fromAddress=null!==(r=e.fromAddress)&&void 0!==r?r:"",a.toAddress=null!==(i=e.toAddress)&&void 0!==i?i:"",a.amount=(null===(t=e.amount)||void 0===t?void 0:t.map(e=>n.Coin.fromPartial(e)))||[],void 0!==e.endTime&&null!==e.endTime&&(a.endTime=BigInt(e.endTime.toString())),a.delayed=null!==(o=e.delayed)&&void 0!==o&&o,a}},t.MsgCreateVestingAccountResponse={typeUrl:"/cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=l();for(;r.posl(),toJSON:e=>({}),fromPartial:e=>l()},t.MsgCreatePermanentLockedAccount={typeUrl:"/cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of(""!==e.fromAddress&&t.uint32(10).string(e.fromAddress),""!==e.toAddress&&t.uint32(18).string(e.toAddress),e.amount))n.Coin.encode(r,t.uint32(26).fork()).ldelim();return t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=u();for(;r.pos>>3){case 1:a.fromAddress=r.string();break;case 2:a.toAddress=r.string();break;case 3:a.amount.push(n.Coin.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=u();return(0,a.isSet)(e.fromAddress)&&(t.fromAddress=String(e.fromAddress)),(0,a.isSet)(e.toAddress)&&(t.toAddress=String(e.toAddress)),Array.isArray(null==e?void 0:e.amount)&&(t.amount=e.amount.map(e=>n.Coin.fromJSON(e))),t},toJSON(e){let t={};return void 0!==e.fromAddress&&(t.fromAddress=e.fromAddress),void 0!==e.toAddress&&(t.toAddress=e.toAddress),e.amount?t.amount=e.amount.map(e=>e?n.Coin.toJSON(e):void 0):t.amount=[],t},fromPartial(e){var t,r,i;let o=u();return o.fromAddress=null!==(r=e.fromAddress)&&void 0!==r?r:"",o.toAddress=null!==(i=e.toAddress)&&void 0!==i?i:"",o.amount=(null===(t=e.amount)||void 0===t?void 0:t.map(e=>n.Coin.fromPartial(e)))||[],o}},t.MsgCreatePermanentLockedAccountResponse={typeUrl:"/cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccountResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=d();for(;r.posd(),toJSON:e=>({}),fromPartial:e=>d()},t.MsgCreatePeriodicVestingAccount={typeUrl:"/cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of(""!==e.fromAddress&&t.uint32(10).string(e.fromAddress),""!==e.toAddress&&t.uint32(18).string(e.toAddress),e.startTime!==BigInt(0)&&t.uint32(24).int64(e.startTime),e.vestingPeriods))i.Period.encode(r,t.uint32(34).fork()).ldelim();return t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,a=c();for(;r.pos>>3){case 1:a.fromAddress=r.string();break;case 2:a.toAddress=r.string();break;case 3:a.startTime=r.int64();break;case 4:a.vestingPeriods.push(i.Period.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=c();return(0,a.isSet)(e.fromAddress)&&(t.fromAddress=String(e.fromAddress)),(0,a.isSet)(e.toAddress)&&(t.toAddress=String(e.toAddress)),(0,a.isSet)(e.startTime)&&(t.startTime=BigInt(e.startTime.toString())),Array.isArray(null==e?void 0:e.vestingPeriods)&&(t.vestingPeriods=e.vestingPeriods.map(e=>i.Period.fromJSON(e))),t},toJSON(e){let t={};return void 0!==e.fromAddress&&(t.fromAddress=e.fromAddress),void 0!==e.toAddress&&(t.toAddress=e.toAddress),void 0!==e.startTime&&(t.startTime=(e.startTime||BigInt(0)).toString()),e.vestingPeriods?t.vestingPeriods=e.vestingPeriods.map(e=>e?i.Period.toJSON(e):void 0):t.vestingPeriods=[],t},fromPartial(e){var t,r,n;let o=c();return o.fromAddress=null!==(r=e.fromAddress)&&void 0!==r?r:"",o.toAddress=null!==(n=e.toAddress)&&void 0!==n?n:"",void 0!==e.startTime&&null!==e.startTime&&(o.startTime=BigInt(e.startTime.toString())),o.vestingPeriods=(null===(t=e.vestingPeriods)||void 0===t?void 0:t.map(e=>i.Period.fromPartial(e)))||[],o}},t.MsgCreatePeriodicVestingAccountResponse={typeUrl:"/cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccountResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=p();for(;r.posp(),toJSON:e=>({}),fromPartial:e=>p()};class f{CreateVestingAccount(e){let r=t.MsgCreateVestingAccount.encode(e).finish();return this.rpc.request("cosmos.vesting.v1beta1.Msg","CreateVestingAccount",r).then(e=>t.MsgCreateVestingAccountResponse.decode(new o.BinaryReader(e)))}CreatePermanentLockedAccount(e){let r=t.MsgCreatePermanentLockedAccount.encode(e).finish();return this.rpc.request("cosmos.vesting.v1beta1.Msg","CreatePermanentLockedAccount",r).then(e=>t.MsgCreatePermanentLockedAccountResponse.decode(new o.BinaryReader(e)))}CreatePeriodicVestingAccount(e){let r=t.MsgCreatePeriodicVestingAccount.encode(e).finish();return this.rpc.request("cosmos.vesting.v1beta1.Msg","CreatePeriodicVestingAccount",r).then(e=>t.MsgCreatePeriodicVestingAccountResponse.decode(new o.BinaryReader(e)))}constructor(e){this.rpc=e,this.CreateVestingAccount=this.CreateVestingAccount.bind(this),this.CreatePermanentLockedAccount=this.CreatePermanentLockedAccount.bind(this),this.CreatePeriodicVestingAccount=this.CreatePeriodicVestingAccount.bind(this)}}t.MsgClientImpl=f},18855:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PermanentLockedAccount=t.PeriodicVestingAccount=t.Period=t.DelayedVestingAccount=t.ContinuousVestingAccount=t.BaseVestingAccount=t.protobufPackage=void 0;let n=r(54910),i=r(14841),o=r(46554),a=r(99133);function s(){return{baseAccount:void 0,originalVesting:[],delegatedFree:[],delegatedVesting:[],endTime:BigInt(0)}}function l(){return{baseVestingAccount:void 0,startTime:BigInt(0)}}function u(){return{baseVestingAccount:void 0}}function d(){return{length:BigInt(0),amount:[]}}function c(){return{baseVestingAccount:void 0,startTime:BigInt(0),vestingPeriods:[]}}function p(){return{baseVestingAccount:void 0}}t.protobufPackage="cosmos.vesting.v1beta1",t.BaseVestingAccount={typeUrl:"/cosmos.vesting.v1beta1.BaseVestingAccount",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of(void 0!==e.baseAccount&&n.BaseAccount.encode(e.baseAccount,t.uint32(10).fork()).ldelim(),e.originalVesting))i.Coin.encode(r,t.uint32(18).fork()).ldelim();for(let r of e.delegatedFree)i.Coin.encode(r,t.uint32(26).fork()).ldelim();for(let r of e.delegatedVesting)i.Coin.encode(r,t.uint32(34).fork()).ldelim();return e.endTime!==BigInt(0)&&t.uint32(40).int64(e.endTime),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),a=void 0===t?r.len:r.pos+t,l=s();for(;r.pos>>3){case 1:l.baseAccount=n.BaseAccount.decode(r,r.uint32());break;case 2:l.originalVesting.push(i.Coin.decode(r,r.uint32()));break;case 3:l.delegatedFree.push(i.Coin.decode(r,r.uint32()));break;case 4:l.delegatedVesting.push(i.Coin.decode(r,r.uint32()));break;case 5:l.endTime=r.int64();break;default:r.skipType(7&e)}}return l},fromJSON(e){let t=s();return(0,a.isSet)(e.baseAccount)&&(t.baseAccount=n.BaseAccount.fromJSON(e.baseAccount)),Array.isArray(null==e?void 0:e.originalVesting)&&(t.originalVesting=e.originalVesting.map(e=>i.Coin.fromJSON(e))),Array.isArray(null==e?void 0:e.delegatedFree)&&(t.delegatedFree=e.delegatedFree.map(e=>i.Coin.fromJSON(e))),Array.isArray(null==e?void 0:e.delegatedVesting)&&(t.delegatedVesting=e.delegatedVesting.map(e=>i.Coin.fromJSON(e))),(0,a.isSet)(e.endTime)&&(t.endTime=BigInt(e.endTime.toString())),t},toJSON(e){let t={};return void 0!==e.baseAccount&&(t.baseAccount=e.baseAccount?n.BaseAccount.toJSON(e.baseAccount):void 0),e.originalVesting?t.originalVesting=e.originalVesting.map(e=>e?i.Coin.toJSON(e):void 0):t.originalVesting=[],e.delegatedFree?t.delegatedFree=e.delegatedFree.map(e=>e?i.Coin.toJSON(e):void 0):t.delegatedFree=[],e.delegatedVesting?t.delegatedVesting=e.delegatedVesting.map(e=>e?i.Coin.toJSON(e):void 0):t.delegatedVesting=[],void 0!==e.endTime&&(t.endTime=(e.endTime||BigInt(0)).toString()),t},fromPartial(e){var t,r,o;let a=s();return void 0!==e.baseAccount&&null!==e.baseAccount&&(a.baseAccount=n.BaseAccount.fromPartial(e.baseAccount)),a.originalVesting=(null===(t=e.originalVesting)||void 0===t?void 0:t.map(e=>i.Coin.fromPartial(e)))||[],a.delegatedFree=(null===(r=e.delegatedFree)||void 0===r?void 0:r.map(e=>i.Coin.fromPartial(e)))||[],a.delegatedVesting=(null===(o=e.delegatedVesting)||void 0===o?void 0:o.map(e=>i.Coin.fromPartial(e)))||[],void 0!==e.endTime&&null!==e.endTime&&(a.endTime=BigInt(e.endTime.toString())),a}},t.ContinuousVestingAccount={typeUrl:"/cosmos.vesting.v1beta1.ContinuousVestingAccount",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return void 0!==e.baseVestingAccount&&t.BaseVestingAccount.encode(e.baseVestingAccount,r.uint32(10).fork()).ldelim(),e.startTime!==BigInt(0)&&r.uint32(16).int64(e.startTime),r},decode(e,r){let n=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===r?n.len:n.pos+r,a=l();for(;n.pos>>3){case 1:a.baseVestingAccount=t.BaseVestingAccount.decode(n,n.uint32());break;case 2:a.startTime=n.int64();break;default:n.skipType(7&e)}}return a},fromJSON(e){let r=l();return(0,a.isSet)(e.baseVestingAccount)&&(r.baseVestingAccount=t.BaseVestingAccount.fromJSON(e.baseVestingAccount)),(0,a.isSet)(e.startTime)&&(r.startTime=BigInt(e.startTime.toString())),r},toJSON(e){let r={};return void 0!==e.baseVestingAccount&&(r.baseVestingAccount=e.baseVestingAccount?t.BaseVestingAccount.toJSON(e.baseVestingAccount):void 0),void 0!==e.startTime&&(r.startTime=(e.startTime||BigInt(0)).toString()),r},fromPartial(e){let r=l();return void 0!==e.baseVestingAccount&&null!==e.baseVestingAccount&&(r.baseVestingAccount=t.BaseVestingAccount.fromPartial(e.baseVestingAccount)),void 0!==e.startTime&&null!==e.startTime&&(r.startTime=BigInt(e.startTime.toString())),r}},t.DelayedVestingAccount={typeUrl:"/cosmos.vesting.v1beta1.DelayedVestingAccount",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return void 0!==e.baseVestingAccount&&t.BaseVestingAccount.encode(e.baseVestingAccount,r.uint32(10).fork()).ldelim(),r},decode(e,r){let n=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===r?n.len:n.pos+r,a=u();for(;n.pos>>3==1?a.baseVestingAccount=t.BaseVestingAccount.decode(n,n.uint32()):n.skipType(7&e)}return a},fromJSON(e){let r=u();return(0,a.isSet)(e.baseVestingAccount)&&(r.baseVestingAccount=t.BaseVestingAccount.fromJSON(e.baseVestingAccount)),r},toJSON(e){let r={};return void 0!==e.baseVestingAccount&&(r.baseVestingAccount=e.baseVestingAccount?t.BaseVestingAccount.toJSON(e.baseVestingAccount):void 0),r},fromPartial(e){let r=u();return void 0!==e.baseVestingAccount&&null!==e.baseVestingAccount&&(r.baseVestingAccount=t.BaseVestingAccount.fromPartial(e.baseVestingAccount)),r}},t.Period={typeUrl:"/cosmos.vesting.v1beta1.Period",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of(e.length!==BigInt(0)&&t.uint32(8).int64(e.length),e.amount))i.Coin.encode(r,t.uint32(18).fork()).ldelim();return t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,a=d();for(;r.pos>>3){case 1:a.length=r.int64();break;case 2:a.amount.push(i.Coin.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=d();return(0,a.isSet)(e.length)&&(t.length=BigInt(e.length.toString())),Array.isArray(null==e?void 0:e.amount)&&(t.amount=e.amount.map(e=>i.Coin.fromJSON(e))),t},toJSON(e){let t={};return void 0!==e.length&&(t.length=(e.length||BigInt(0)).toString()),e.amount?t.amount=e.amount.map(e=>e?i.Coin.toJSON(e):void 0):t.amount=[],t},fromPartial(e){var t;let r=d();return void 0!==e.length&&null!==e.length&&(r.length=BigInt(e.length.toString())),r.amount=(null===(t=e.amount)||void 0===t?void 0:t.map(e=>i.Coin.fromPartial(e)))||[],r}},t.PeriodicVestingAccount={typeUrl:"/cosmos.vesting.v1beta1.PeriodicVestingAccount",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let n of(void 0!==e.baseVestingAccount&&t.BaseVestingAccount.encode(e.baseVestingAccount,r.uint32(10).fork()).ldelim(),e.startTime!==BigInt(0)&&r.uint32(16).int64(e.startTime),e.vestingPeriods))t.Period.encode(n,r.uint32(26).fork()).ldelim();return r},decode(e,r){let n=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===r?n.len:n.pos+r,a=c();for(;n.pos>>3){case 1:a.baseVestingAccount=t.BaseVestingAccount.decode(n,n.uint32());break;case 2:a.startTime=n.int64();break;case 3:a.vestingPeriods.push(t.Period.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return a},fromJSON(e){let r=c();return(0,a.isSet)(e.baseVestingAccount)&&(r.baseVestingAccount=t.BaseVestingAccount.fromJSON(e.baseVestingAccount)),(0,a.isSet)(e.startTime)&&(r.startTime=BigInt(e.startTime.toString())),Array.isArray(null==e?void 0:e.vestingPeriods)&&(r.vestingPeriods=e.vestingPeriods.map(e=>t.Period.fromJSON(e))),r},toJSON(e){let r={};return void 0!==e.baseVestingAccount&&(r.baseVestingAccount=e.baseVestingAccount?t.BaseVestingAccount.toJSON(e.baseVestingAccount):void 0),void 0!==e.startTime&&(r.startTime=(e.startTime||BigInt(0)).toString()),e.vestingPeriods?r.vestingPeriods=e.vestingPeriods.map(e=>e?t.Period.toJSON(e):void 0):r.vestingPeriods=[],r},fromPartial(e){var r;let n=c();return void 0!==e.baseVestingAccount&&null!==e.baseVestingAccount&&(n.baseVestingAccount=t.BaseVestingAccount.fromPartial(e.baseVestingAccount)),void 0!==e.startTime&&null!==e.startTime&&(n.startTime=BigInt(e.startTime.toString())),n.vestingPeriods=(null===(r=e.vestingPeriods)||void 0===r?void 0:r.map(e=>t.Period.fromPartial(e)))||[],n}},t.PermanentLockedAccount={typeUrl:"/cosmos.vesting.v1beta1.PermanentLockedAccount",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return void 0!==e.baseVestingAccount&&t.BaseVestingAccount.encode(e.baseVestingAccount,r.uint32(10).fork()).ldelim(),r},decode(e,r){let n=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===r?n.len:n.pos+r,a=p();for(;n.pos>>3==1?a.baseVestingAccount=t.BaseVestingAccount.decode(n,n.uint32()):n.skipType(7&e)}return a},fromJSON(e){let r=p();return(0,a.isSet)(e.baseVestingAccount)&&(r.baseVestingAccount=t.BaseVestingAccount.fromJSON(e.baseVestingAccount)),r},toJSON(e){let r={};return void 0!==e.baseVestingAccount&&(r.baseVestingAccount=e.baseVestingAccount?t.BaseVestingAccount.toJSON(e.baseVestingAccount):void 0),r},fromPartial(e){let r=p();return void 0!==e.baseVestingAccount&&null!==e.baseVestingAccount&&(r.baseVestingAccount=t.BaseVestingAccount.fromPartial(e.baseVestingAccount)),r}}},81371:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QueryClientImpl=t.QueryContractsByCreatorResponse=t.QueryContractsByCreatorRequest=t.QueryParamsResponse=t.QueryParamsRequest=t.QueryPinnedCodesResponse=t.QueryPinnedCodesRequest=t.QueryCodesResponse=t.QueryCodesRequest=t.QueryCodeResponse=t.CodeInfoResponse=t.QueryCodeRequest=t.QuerySmartContractStateResponse=t.QuerySmartContractStateRequest=t.QueryRawContractStateResponse=t.QueryRawContractStateRequest=t.QueryAllContractStateResponse=t.QueryAllContractStateRequest=t.QueryContractsByCodeResponse=t.QueryContractsByCodeRequest=t.QueryContractHistoryResponse=t.QueryContractHistoryRequest=t.QueryContractInfoResponse=t.QueryContractInfoRequest=t.protobufPackage=void 0;let n=r(86141),i=r(20624),o=r(46554),a=r(99133);function s(){return{address:""}}function l(){return{address:"",contractInfo:i.ContractInfo.fromPartial({})}}function u(){return{address:"",pagination:void 0}}function d(){return{entries:[],pagination:void 0}}function c(){return{codeId:BigInt(0),pagination:void 0}}function p(){return{contracts:[],pagination:void 0}}function f(){return{address:"",pagination:void 0}}function h(){return{models:[],pagination:void 0}}function g(){return{address:"",queryData:new Uint8Array}}function m(){return{data:new Uint8Array}}function y(){return{address:"",queryData:new Uint8Array}}function v(){return{data:new Uint8Array}}function b(){return{codeId:BigInt(0)}}function S(){return{codeId:BigInt(0),creator:"",dataHash:new Uint8Array,instantiatePermission:i.AccessConfig.fromPartial({})}}function w(){return{codeInfo:void 0,data:new Uint8Array}}function _(){return{pagination:void 0}}function k(){return{codeInfos:[],pagination:void 0}}function O(){return{pagination:void 0}}function P(){return{codeIds:[],pagination:void 0}}function A(){return{}}function I(){return{params:i.Params.fromPartial({})}}function R(){return{creatorAddress:"",pagination:void 0}}function E(){return{contractAddresses:[],pagination:void 0}}t.protobufPackage="cosmwasm.wasm.v1",t.QueryContractInfoRequest={typeUrl:"/cosmwasm.wasm.v1.QueryContractInfoRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.address&&t.uint32(10).string(e.address),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=s();for(;r.pos>>3==1?i.address=r.string():r.skipType(7&e)}return i},fromJSON(e){let t=s();return(0,a.isSet)(e.address)&&(t.address=String(e.address)),t},toJSON(e){let t={};return void 0!==e.address&&(t.address=e.address),t},fromPartial(e){var t;let r=s();return r.address=null!==(t=e.address)&&void 0!==t?t:"",r}},t.QueryContractInfoResponse={typeUrl:"/cosmwasm.wasm.v1.QueryContractInfoResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.address&&t.uint32(10).string(e.address),void 0!==e.contractInfo&&i.ContractInfo.encode(e.contractInfo,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,a=l();for(;r.pos>>3){case 1:a.address=r.string();break;case 2:a.contractInfo=i.ContractInfo.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=l();return(0,a.isSet)(e.address)&&(t.address=String(e.address)),(0,a.isSet)(e.contractInfo)&&(t.contractInfo=i.ContractInfo.fromJSON(e.contractInfo)),t},toJSON(e){let t={};return void 0!==e.address&&(t.address=e.address),void 0!==e.contractInfo&&(t.contractInfo=e.contractInfo?i.ContractInfo.toJSON(e.contractInfo):void 0),t},fromPartial(e){var t;let r=l();return r.address=null!==(t=e.address)&&void 0!==t?t:"",void 0!==e.contractInfo&&null!==e.contractInfo&&(r.contractInfo=i.ContractInfo.fromPartial(e.contractInfo)),r}},t.QueryContractHistoryRequest={typeUrl:"/cosmwasm.wasm.v1.QueryContractHistoryRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.address&&t.uint32(10).string(e.address),void 0!==e.pagination&&n.PageRequest.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=u();for(;r.pos>>3){case 1:a.address=r.string();break;case 2:a.pagination=n.PageRequest.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=u();return(0,a.isSet)(e.address)&&(t.address=String(e.address)),(0,a.isSet)(e.pagination)&&(t.pagination=n.PageRequest.fromJSON(e.pagination)),t},toJSON(e){let t={};return void 0!==e.address&&(t.address=e.address),void 0!==e.pagination&&(t.pagination=e.pagination?n.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=u();return r.address=null!==(t=e.address)&&void 0!==t?t:"",void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageRequest.fromPartial(e.pagination)),r}},t.QueryContractHistoryResponse={typeUrl:"/cosmwasm.wasm.v1.QueryContractHistoryResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of e.entries)i.ContractCodeHistoryEntry.encode(r,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&n.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),a=void 0===t?r.len:r.pos+t,s=d();for(;r.pos>>3){case 1:s.entries.push(i.ContractCodeHistoryEntry.decode(r,r.uint32()));break;case 2:s.pagination=n.PageResponse.decode(r,r.uint32());break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=d();return Array.isArray(null==e?void 0:e.entries)&&(t.entries=e.entries.map(e=>i.ContractCodeHistoryEntry.fromJSON(e))),(0,a.isSet)(e.pagination)&&(t.pagination=n.PageResponse.fromJSON(e.pagination)),t},toJSON(e){let t={};return e.entries?t.entries=e.entries.map(e=>e?i.ContractCodeHistoryEntry.toJSON(e):void 0):t.entries=[],void 0!==e.pagination&&(t.pagination=e.pagination?n.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=d();return r.entries=(null===(t=e.entries)||void 0===t?void 0:t.map(e=>i.ContractCodeHistoryEntry.fromPartial(e)))||[],void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageResponse.fromPartial(e.pagination)),r}},t.QueryContractsByCodeRequest={typeUrl:"/cosmwasm.wasm.v1.QueryContractsByCodeRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return e.codeId!==BigInt(0)&&t.uint32(8).uint64(e.codeId),void 0!==e.pagination&&n.PageRequest.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=c();for(;r.pos>>3){case 1:a.codeId=r.uint64();break;case 2:a.pagination=n.PageRequest.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=c();return(0,a.isSet)(e.codeId)&&(t.codeId=BigInt(e.codeId.toString())),(0,a.isSet)(e.pagination)&&(t.pagination=n.PageRequest.fromJSON(e.pagination)),t},toJSON(e){let t={};return void 0!==e.codeId&&(t.codeId=(e.codeId||BigInt(0)).toString()),void 0!==e.pagination&&(t.pagination=e.pagination?n.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){let t=c();return void 0!==e.codeId&&null!==e.codeId&&(t.codeId=BigInt(e.codeId.toString())),void 0!==e.pagination&&null!==e.pagination&&(t.pagination=n.PageRequest.fromPartial(e.pagination)),t}},t.QueryContractsByCodeResponse={typeUrl:"/cosmwasm.wasm.v1.QueryContractsByCodeResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of e.contracts)t.uint32(10).string(r);return void 0!==e.pagination&&n.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=p();for(;r.pos>>3){case 1:a.contracts.push(r.string());break;case 2:a.pagination=n.PageResponse.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=p();return Array.isArray(null==e?void 0:e.contracts)&&(t.contracts=e.contracts.map(e=>String(e))),(0,a.isSet)(e.pagination)&&(t.pagination=n.PageResponse.fromJSON(e.pagination)),t},toJSON(e){let t={};return e.contracts?t.contracts=e.contracts.map(e=>e):t.contracts=[],void 0!==e.pagination&&(t.pagination=e.pagination?n.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=p();return r.contracts=(null===(t=e.contracts)||void 0===t?void 0:t.map(e=>e))||[],void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageResponse.fromPartial(e.pagination)),r}},t.QueryAllContractStateRequest={typeUrl:"/cosmwasm.wasm.v1.QueryAllContractStateRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.address&&t.uint32(10).string(e.address),void 0!==e.pagination&&n.PageRequest.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=f();for(;r.pos>>3){case 1:a.address=r.string();break;case 2:a.pagination=n.PageRequest.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=f();return(0,a.isSet)(e.address)&&(t.address=String(e.address)),(0,a.isSet)(e.pagination)&&(t.pagination=n.PageRequest.fromJSON(e.pagination)),t},toJSON(e){let t={};return void 0!==e.address&&(t.address=e.address),void 0!==e.pagination&&(t.pagination=e.pagination?n.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=f();return r.address=null!==(t=e.address)&&void 0!==t?t:"",void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageRequest.fromPartial(e.pagination)),r}},t.QueryAllContractStateResponse={typeUrl:"/cosmwasm.wasm.v1.QueryAllContractStateResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of e.models)i.Model.encode(r,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&n.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),a=void 0===t?r.len:r.pos+t,s=h();for(;r.pos>>3){case 1:s.models.push(i.Model.decode(r,r.uint32()));break;case 2:s.pagination=n.PageResponse.decode(r,r.uint32());break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=h();return Array.isArray(null==e?void 0:e.models)&&(t.models=e.models.map(e=>i.Model.fromJSON(e))),(0,a.isSet)(e.pagination)&&(t.pagination=n.PageResponse.fromJSON(e.pagination)),t},toJSON(e){let t={};return e.models?t.models=e.models.map(e=>e?i.Model.toJSON(e):void 0):t.models=[],void 0!==e.pagination&&(t.pagination=e.pagination?n.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=h();return r.models=(null===(t=e.models)||void 0===t?void 0:t.map(e=>i.Model.fromPartial(e)))||[],void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageResponse.fromPartial(e.pagination)),r}},t.QueryRawContractStateRequest={typeUrl:"/cosmwasm.wasm.v1.QueryRawContractStateRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.address&&t.uint32(10).string(e.address),0!==e.queryData.length&&t.uint32(18).bytes(e.queryData),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=g();for(;r.pos>>3){case 1:i.address=r.string();break;case 2:i.queryData=r.bytes();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=g();return(0,a.isSet)(e.address)&&(t.address=String(e.address)),(0,a.isSet)(e.queryData)&&(t.queryData=(0,a.bytesFromBase64)(e.queryData)),t},toJSON(e){let t={};return void 0!==e.address&&(t.address=e.address),void 0!==e.queryData&&(t.queryData=(0,a.base64FromBytes)(void 0!==e.queryData?e.queryData:new Uint8Array)),t},fromPartial(e){var t,r;let n=g();return n.address=null!==(t=e.address)&&void 0!==t?t:"",n.queryData=null!==(r=e.queryData)&&void 0!==r?r:new Uint8Array,n}},t.QueryRawContractStateResponse={typeUrl:"/cosmwasm.wasm.v1.QueryRawContractStateResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return 0!==e.data.length&&t.uint32(10).bytes(e.data),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=m();for(;r.pos>>3==1?i.data=r.bytes():r.skipType(7&e)}return i},fromJSON(e){let t=m();return(0,a.isSet)(e.data)&&(t.data=(0,a.bytesFromBase64)(e.data)),t},toJSON(e){let t={};return void 0!==e.data&&(t.data=(0,a.base64FromBytes)(void 0!==e.data?e.data:new Uint8Array)),t},fromPartial(e){var t;let r=m();return r.data=null!==(t=e.data)&&void 0!==t?t:new Uint8Array,r}},t.QuerySmartContractStateRequest={typeUrl:"/cosmwasm.wasm.v1.QuerySmartContractStateRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.address&&t.uint32(10).string(e.address),0!==e.queryData.length&&t.uint32(18).bytes(e.queryData),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=y();for(;r.pos>>3){case 1:i.address=r.string();break;case 2:i.queryData=r.bytes();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=y();return(0,a.isSet)(e.address)&&(t.address=String(e.address)),(0,a.isSet)(e.queryData)&&(t.queryData=(0,a.bytesFromBase64)(e.queryData)),t},toJSON(e){let t={};return void 0!==e.address&&(t.address=e.address),void 0!==e.queryData&&(t.queryData=(0,a.base64FromBytes)(void 0!==e.queryData?e.queryData:new Uint8Array)),t},fromPartial(e){var t,r;let n=y();return n.address=null!==(t=e.address)&&void 0!==t?t:"",n.queryData=null!==(r=e.queryData)&&void 0!==r?r:new Uint8Array,n}},t.QuerySmartContractStateResponse={typeUrl:"/cosmwasm.wasm.v1.QuerySmartContractStateResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return 0!==e.data.length&&t.uint32(10).bytes(e.data),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=v();for(;r.pos>>3==1?i.data=r.bytes():r.skipType(7&e)}return i},fromJSON(e){let t=v();return(0,a.isSet)(e.data)&&(t.data=(0,a.bytesFromBase64)(e.data)),t},toJSON(e){let t={};return void 0!==e.data&&(t.data=(0,a.base64FromBytes)(void 0!==e.data?e.data:new Uint8Array)),t},fromPartial(e){var t;let r=v();return r.data=null!==(t=e.data)&&void 0!==t?t:new Uint8Array,r}},t.QueryCodeRequest={typeUrl:"/cosmwasm.wasm.v1.QueryCodeRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return e.codeId!==BigInt(0)&&t.uint32(8).uint64(e.codeId),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=b();for(;r.pos>>3==1?i.codeId=r.uint64():r.skipType(7&e)}return i},fromJSON(e){let t=b();return(0,a.isSet)(e.codeId)&&(t.codeId=BigInt(e.codeId.toString())),t},toJSON(e){let t={};return void 0!==e.codeId&&(t.codeId=(e.codeId||BigInt(0)).toString()),t},fromPartial(e){let t=b();return void 0!==e.codeId&&null!==e.codeId&&(t.codeId=BigInt(e.codeId.toString())),t}},t.CodeInfoResponse={typeUrl:"/cosmwasm.wasm.v1.CodeInfoResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return e.codeId!==BigInt(0)&&t.uint32(8).uint64(e.codeId),""!==e.creator&&t.uint32(18).string(e.creator),0!==e.dataHash.length&&t.uint32(26).bytes(e.dataHash),void 0!==e.instantiatePermission&&i.AccessConfig.encode(e.instantiatePermission,t.uint32(50).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,a=S();for(;r.pos>>3){case 1:a.codeId=r.uint64();break;case 2:a.creator=r.string();break;case 3:a.dataHash=r.bytes();break;case 6:a.instantiatePermission=i.AccessConfig.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=S();return(0,a.isSet)(e.codeId)&&(t.codeId=BigInt(e.codeId.toString())),(0,a.isSet)(e.creator)&&(t.creator=String(e.creator)),(0,a.isSet)(e.dataHash)&&(t.dataHash=(0,a.bytesFromBase64)(e.dataHash)),(0,a.isSet)(e.instantiatePermission)&&(t.instantiatePermission=i.AccessConfig.fromJSON(e.instantiatePermission)),t},toJSON(e){let t={};return void 0!==e.codeId&&(t.codeId=(e.codeId||BigInt(0)).toString()),void 0!==e.creator&&(t.creator=e.creator),void 0!==e.dataHash&&(t.dataHash=(0,a.base64FromBytes)(void 0!==e.dataHash?e.dataHash:new Uint8Array)),void 0!==e.instantiatePermission&&(t.instantiatePermission=e.instantiatePermission?i.AccessConfig.toJSON(e.instantiatePermission):void 0),t},fromPartial(e){var t,r;let n=S();return void 0!==e.codeId&&null!==e.codeId&&(n.codeId=BigInt(e.codeId.toString())),n.creator=null!==(t=e.creator)&&void 0!==t?t:"",n.dataHash=null!==(r=e.dataHash)&&void 0!==r?r:new Uint8Array,void 0!==e.instantiatePermission&&null!==e.instantiatePermission&&(n.instantiatePermission=i.AccessConfig.fromPartial(e.instantiatePermission)),n}},t.QueryCodeResponse={typeUrl:"/cosmwasm.wasm.v1.QueryCodeResponse",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return void 0!==e.codeInfo&&t.CodeInfoResponse.encode(e.codeInfo,r.uint32(10).fork()).ldelim(),0!==e.data.length&&r.uint32(18).bytes(e.data),r},decode(e,r){let n=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===r?n.len:n.pos+r,a=w();for(;n.pos>>3){case 1:a.codeInfo=t.CodeInfoResponse.decode(n,n.uint32());break;case 2:a.data=n.bytes();break;default:n.skipType(7&e)}}return a},fromJSON(e){let r=w();return(0,a.isSet)(e.codeInfo)&&(r.codeInfo=t.CodeInfoResponse.fromJSON(e.codeInfo)),(0,a.isSet)(e.data)&&(r.data=(0,a.bytesFromBase64)(e.data)),r},toJSON(e){let r={};return void 0!==e.codeInfo&&(r.codeInfo=e.codeInfo?t.CodeInfoResponse.toJSON(e.codeInfo):void 0),void 0!==e.data&&(r.data=(0,a.base64FromBytes)(void 0!==e.data?e.data:new Uint8Array)),r},fromPartial(e){var r;let n=w();return void 0!==e.codeInfo&&null!==e.codeInfo&&(n.codeInfo=t.CodeInfoResponse.fromPartial(e.codeInfo)),n.data=null!==(r=e.data)&&void 0!==r?r:new Uint8Array,n}},t.QueryCodesRequest={typeUrl:"/cosmwasm.wasm.v1.QueryCodesRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return void 0!==e.pagination&&n.PageRequest.encode(e.pagination,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=_();for(;r.pos>>3==1?a.pagination=n.PageRequest.decode(r,r.uint32()):r.skipType(7&e)}return a},fromJSON(e){let t=_();return(0,a.isSet)(e.pagination)&&(t.pagination=n.PageRequest.fromJSON(e.pagination)),t},toJSON(e){let t={};return void 0!==e.pagination&&(t.pagination=e.pagination?n.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){let t=_();return void 0!==e.pagination&&null!==e.pagination&&(t.pagination=n.PageRequest.fromPartial(e.pagination)),t}},t.QueryCodesResponse={typeUrl:"/cosmwasm.wasm.v1.QueryCodesResponse",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let n of e.codeInfos)t.CodeInfoResponse.encode(n,r.uint32(10).fork()).ldelim();return void 0!==e.pagination&&n.PageResponse.encode(e.pagination,r.uint32(18).fork()).ldelim(),r},decode(e,r){let i=e instanceof o.BinaryReader?e:new o.BinaryReader(e),a=void 0===r?i.len:i.pos+r,s=k();for(;i.pos>>3){case 1:s.codeInfos.push(t.CodeInfoResponse.decode(i,i.uint32()));break;case 2:s.pagination=n.PageResponse.decode(i,i.uint32());break;default:i.skipType(7&e)}}return s},fromJSON(e){let r=k();return Array.isArray(null==e?void 0:e.codeInfos)&&(r.codeInfos=e.codeInfos.map(e=>t.CodeInfoResponse.fromJSON(e))),(0,a.isSet)(e.pagination)&&(r.pagination=n.PageResponse.fromJSON(e.pagination)),r},toJSON(e){let r={};return e.codeInfos?r.codeInfos=e.codeInfos.map(e=>e?t.CodeInfoResponse.toJSON(e):void 0):r.codeInfos=[],void 0!==e.pagination&&(r.pagination=e.pagination?n.PageResponse.toJSON(e.pagination):void 0),r},fromPartial(e){var r;let i=k();return i.codeInfos=(null===(r=e.codeInfos)||void 0===r?void 0:r.map(e=>t.CodeInfoResponse.fromPartial(e)))||[],void 0!==e.pagination&&null!==e.pagination&&(i.pagination=n.PageResponse.fromPartial(e.pagination)),i}},t.QueryPinnedCodesRequest={typeUrl:"/cosmwasm.wasm.v1.QueryPinnedCodesRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return void 0!==e.pagination&&n.PageRequest.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=O();for(;r.pos>>3==2?a.pagination=n.PageRequest.decode(r,r.uint32()):r.skipType(7&e)}return a},fromJSON(e){let t=O();return(0,a.isSet)(e.pagination)&&(t.pagination=n.PageRequest.fromJSON(e.pagination)),t},toJSON(e){let t={};return void 0!==e.pagination&&(t.pagination=e.pagination?n.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){let t=O();return void 0!==e.pagination&&null!==e.pagination&&(t.pagination=n.PageRequest.fromPartial(e.pagination)),t}},t.QueryPinnedCodesResponse={typeUrl:"/cosmwasm.wasm.v1.QueryPinnedCodesResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of(t.uint32(10).fork(),e.codeIds))t.uint64(r);return t.ldelim(),void 0!==e.pagination&&n.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=P();for(;r.pos>>3){case 1:if((7&e)==2){let e=r.uint32()+r.pos;for(;r.posBigInt(e.toString()))),(0,a.isSet)(e.pagination)&&(t.pagination=n.PageResponse.fromJSON(e.pagination)),t},toJSON(e){let t={};return e.codeIds?t.codeIds=e.codeIds.map(e=>(e||BigInt(0)).toString()):t.codeIds=[],void 0!==e.pagination&&(t.pagination=e.pagination?n.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=P();return r.codeIds=(null===(t=e.codeIds)||void 0===t?void 0:t.map(e=>BigInt(e.toString())))||[],void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageResponse.fromPartial(e.pagination)),r}},t.QueryParamsRequest={typeUrl:"/cosmwasm.wasm.v1.QueryParamsRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=A();for(;r.posA(),toJSON:e=>({}),fromPartial:e=>A()},t.QueryParamsResponse={typeUrl:"/cosmwasm.wasm.v1.QueryParamsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return void 0!==e.params&&i.Params.encode(e.params,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,a=I();for(;r.pos>>3==1?a.params=i.Params.decode(r,r.uint32()):r.skipType(7&e)}return a},fromJSON(e){let t=I();return(0,a.isSet)(e.params)&&(t.params=i.Params.fromJSON(e.params)),t},toJSON(e){let t={};return void 0!==e.params&&(t.params=e.params?i.Params.toJSON(e.params):void 0),t},fromPartial(e){let t=I();return void 0!==e.params&&null!==e.params&&(t.params=i.Params.fromPartial(e.params)),t}},t.QueryContractsByCreatorRequest={typeUrl:"/cosmwasm.wasm.v1.QueryContractsByCreatorRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.creatorAddress&&t.uint32(10).string(e.creatorAddress),void 0!==e.pagination&&n.PageRequest.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=R();for(;r.pos>>3){case 1:a.creatorAddress=r.string();break;case 2:a.pagination=n.PageRequest.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=R();return(0,a.isSet)(e.creatorAddress)&&(t.creatorAddress=String(e.creatorAddress)),(0,a.isSet)(e.pagination)&&(t.pagination=n.PageRequest.fromJSON(e.pagination)),t},toJSON(e){let t={};return void 0!==e.creatorAddress&&(t.creatorAddress=e.creatorAddress),void 0!==e.pagination&&(t.pagination=e.pagination?n.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=R();return r.creatorAddress=null!==(t=e.creatorAddress)&&void 0!==t?t:"",void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageRequest.fromPartial(e.pagination)),r}},t.QueryContractsByCreatorResponse={typeUrl:"/cosmwasm.wasm.v1.QueryContractsByCreatorResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of e.contractAddresses)t.uint32(10).string(r);return void 0!==e.pagination&&n.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=E();for(;r.pos>>3){case 1:a.contractAddresses.push(r.string());break;case 2:a.pagination=n.PageResponse.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=E();return Array.isArray(null==e?void 0:e.contractAddresses)&&(t.contractAddresses=e.contractAddresses.map(e=>String(e))),(0,a.isSet)(e.pagination)&&(t.pagination=n.PageResponse.fromJSON(e.pagination)),t},toJSON(e){let t={};return e.contractAddresses?t.contractAddresses=e.contractAddresses.map(e=>e):t.contractAddresses=[],void 0!==e.pagination&&(t.pagination=e.pagination?n.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=E();return r.contractAddresses=(null===(t=e.contractAddresses)||void 0===t?void 0:t.map(e=>e))||[],void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageResponse.fromPartial(e.pagination)),r}};class T{ContractInfo(e){let r=t.QueryContractInfoRequest.encode(e).finish();return this.rpc.request("cosmwasm.wasm.v1.Query","ContractInfo",r).then(e=>t.QueryContractInfoResponse.decode(new o.BinaryReader(e)))}ContractHistory(e){let r=t.QueryContractHistoryRequest.encode(e).finish();return this.rpc.request("cosmwasm.wasm.v1.Query","ContractHistory",r).then(e=>t.QueryContractHistoryResponse.decode(new o.BinaryReader(e)))}ContractsByCode(e){let r=t.QueryContractsByCodeRequest.encode(e).finish();return this.rpc.request("cosmwasm.wasm.v1.Query","ContractsByCode",r).then(e=>t.QueryContractsByCodeResponse.decode(new o.BinaryReader(e)))}AllContractState(e){let r=t.QueryAllContractStateRequest.encode(e).finish();return this.rpc.request("cosmwasm.wasm.v1.Query","AllContractState",r).then(e=>t.QueryAllContractStateResponse.decode(new o.BinaryReader(e)))}RawContractState(e){let r=t.QueryRawContractStateRequest.encode(e).finish();return this.rpc.request("cosmwasm.wasm.v1.Query","RawContractState",r).then(e=>t.QueryRawContractStateResponse.decode(new o.BinaryReader(e)))}SmartContractState(e){let r=t.QuerySmartContractStateRequest.encode(e).finish();return this.rpc.request("cosmwasm.wasm.v1.Query","SmartContractState",r).then(e=>t.QuerySmartContractStateResponse.decode(new o.BinaryReader(e)))}Code(e){let r=t.QueryCodeRequest.encode(e).finish();return this.rpc.request("cosmwasm.wasm.v1.Query","Code",r).then(e=>t.QueryCodeResponse.decode(new o.BinaryReader(e)))}Codes(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{pagination:n.PageRequest.fromPartial({})},r=t.QueryCodesRequest.encode(e).finish();return this.rpc.request("cosmwasm.wasm.v1.Query","Codes",r).then(e=>t.QueryCodesResponse.decode(new o.BinaryReader(e)))}PinnedCodes(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{pagination:n.PageRequest.fromPartial({})},r=t.QueryPinnedCodesRequest.encode(e).finish();return this.rpc.request("cosmwasm.wasm.v1.Query","PinnedCodes",r).then(e=>t.QueryPinnedCodesResponse.decode(new o.BinaryReader(e)))}Params(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.QueryParamsRequest.encode(e).finish();return this.rpc.request("cosmwasm.wasm.v1.Query","Params",r).then(e=>t.QueryParamsResponse.decode(new o.BinaryReader(e)))}ContractsByCreator(e){let r=t.QueryContractsByCreatorRequest.encode(e).finish();return this.rpc.request("cosmwasm.wasm.v1.Query","ContractsByCreator",r).then(e=>t.QueryContractsByCreatorResponse.decode(new o.BinaryReader(e)))}constructor(e){this.rpc=e,this.ContractInfo=this.ContractInfo.bind(this),this.ContractHistory=this.ContractHistory.bind(this),this.ContractsByCode=this.ContractsByCode.bind(this),this.AllContractState=this.AllContractState.bind(this),this.RawContractState=this.RawContractState.bind(this),this.SmartContractState=this.SmartContractState.bind(this),this.Code=this.Code.bind(this),this.Codes=this.Codes.bind(this),this.PinnedCodes=this.PinnedCodes.bind(this),this.Params=this.Params.bind(this),this.ContractsByCreator=this.ContractsByCreator.bind(this)}}t.QueryClientImpl=T},88242:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MsgClientImpl=t.MsgUpdateInstantiateConfigResponse=t.MsgUpdateInstantiateConfig=t.MsgClearAdminResponse=t.MsgClearAdmin=t.MsgUpdateAdminResponse=t.MsgUpdateAdmin=t.MsgMigrateContractResponse=t.MsgMigrateContract=t.MsgExecuteContractResponse=t.MsgExecuteContract=t.MsgInstantiateContract2Response=t.MsgInstantiateContractResponse=t.MsgInstantiateContract2=t.MsgInstantiateContract=t.MsgStoreCodeResponse=t.MsgStoreCode=t.protobufPackage=void 0;let n=r(20624),i=r(14841),o=r(46554),a=r(99133);function s(){return{sender:"",wasmByteCode:new Uint8Array,instantiatePermission:void 0}}function l(){return{codeId:BigInt(0),checksum:new Uint8Array}}function u(){return{sender:"",admin:"",codeId:BigInt(0),label:"",msg:new Uint8Array,funds:[]}}function d(){return{sender:"",admin:"",codeId:BigInt(0),label:"",msg:new Uint8Array,funds:[],salt:new Uint8Array,fixMsg:!1}}function c(){return{address:"",data:new Uint8Array}}function p(){return{address:"",data:new Uint8Array}}function f(){return{sender:"",contract:"",msg:new Uint8Array,funds:[]}}function h(){return{data:new Uint8Array}}function g(){return{sender:"",contract:"",codeId:BigInt(0),msg:new Uint8Array}}function m(){return{data:new Uint8Array}}function y(){return{sender:"",newAdmin:"",contract:""}}function v(){return{}}function b(){return{sender:"",contract:""}}function S(){return{}}function w(){return{sender:"",codeId:BigInt(0),newInstantiatePermission:void 0}}function _(){return{}}t.protobufPackage="cosmwasm.wasm.v1",t.MsgStoreCode={typeUrl:"/cosmwasm.wasm.v1.MsgStoreCode",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.sender&&t.uint32(10).string(e.sender),0!==e.wasmByteCode.length&&t.uint32(18).bytes(e.wasmByteCode),void 0!==e.instantiatePermission&&n.AccessConfig.encode(e.instantiatePermission,t.uint32(42).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=s();for(;r.pos>>3){case 1:a.sender=r.string();break;case 2:a.wasmByteCode=r.bytes();break;case 5:a.instantiatePermission=n.AccessConfig.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=s();return(0,a.isSet)(e.sender)&&(t.sender=String(e.sender)),(0,a.isSet)(e.wasmByteCode)&&(t.wasmByteCode=(0,a.bytesFromBase64)(e.wasmByteCode)),(0,a.isSet)(e.instantiatePermission)&&(t.instantiatePermission=n.AccessConfig.fromJSON(e.instantiatePermission)),t},toJSON(e){let t={};return void 0!==e.sender&&(t.sender=e.sender),void 0!==e.wasmByteCode&&(t.wasmByteCode=(0,a.base64FromBytes)(void 0!==e.wasmByteCode?e.wasmByteCode:new Uint8Array)),void 0!==e.instantiatePermission&&(t.instantiatePermission=e.instantiatePermission?n.AccessConfig.toJSON(e.instantiatePermission):void 0),t},fromPartial(e){var t,r;let i=s();return i.sender=null!==(t=e.sender)&&void 0!==t?t:"",i.wasmByteCode=null!==(r=e.wasmByteCode)&&void 0!==r?r:new Uint8Array,void 0!==e.instantiatePermission&&null!==e.instantiatePermission&&(i.instantiatePermission=n.AccessConfig.fromPartial(e.instantiatePermission)),i}},t.MsgStoreCodeResponse={typeUrl:"/cosmwasm.wasm.v1.MsgStoreCodeResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return e.codeId!==BigInt(0)&&t.uint32(8).uint64(e.codeId),0!==e.checksum.length&&t.uint32(18).bytes(e.checksum),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=l();for(;r.pos>>3){case 1:i.codeId=r.uint64();break;case 2:i.checksum=r.bytes();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=l();return(0,a.isSet)(e.codeId)&&(t.codeId=BigInt(e.codeId.toString())),(0,a.isSet)(e.checksum)&&(t.checksum=(0,a.bytesFromBase64)(e.checksum)),t},toJSON(e){let t={};return void 0!==e.codeId&&(t.codeId=(e.codeId||BigInt(0)).toString()),void 0!==e.checksum&&(t.checksum=(0,a.base64FromBytes)(void 0!==e.checksum?e.checksum:new Uint8Array)),t},fromPartial(e){var t;let r=l();return void 0!==e.codeId&&null!==e.codeId&&(r.codeId=BigInt(e.codeId.toString())),r.checksum=null!==(t=e.checksum)&&void 0!==t?t:new Uint8Array,r}},t.MsgInstantiateContract={typeUrl:"/cosmwasm.wasm.v1.MsgInstantiateContract",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of(""!==e.sender&&t.uint32(10).string(e.sender),""!==e.admin&&t.uint32(18).string(e.admin),e.codeId!==BigInt(0)&&t.uint32(24).uint64(e.codeId),""!==e.label&&t.uint32(34).string(e.label),0!==e.msg.length&&t.uint32(42).bytes(e.msg),e.funds))i.Coin.encode(r,t.uint32(50).fork()).ldelim();return t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,a=u();for(;r.pos>>3){case 1:a.sender=r.string();break;case 2:a.admin=r.string();break;case 3:a.codeId=r.uint64();break;case 4:a.label=r.string();break;case 5:a.msg=r.bytes();break;case 6:a.funds.push(i.Coin.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=u();return(0,a.isSet)(e.sender)&&(t.sender=String(e.sender)),(0,a.isSet)(e.admin)&&(t.admin=String(e.admin)),(0,a.isSet)(e.codeId)&&(t.codeId=BigInt(e.codeId.toString())),(0,a.isSet)(e.label)&&(t.label=String(e.label)),(0,a.isSet)(e.msg)&&(t.msg=(0,a.bytesFromBase64)(e.msg)),Array.isArray(null==e?void 0:e.funds)&&(t.funds=e.funds.map(e=>i.Coin.fromJSON(e))),t},toJSON(e){let t={};return void 0!==e.sender&&(t.sender=e.sender),void 0!==e.admin&&(t.admin=e.admin),void 0!==e.codeId&&(t.codeId=(e.codeId||BigInt(0)).toString()),void 0!==e.label&&(t.label=e.label),void 0!==e.msg&&(t.msg=(0,a.base64FromBytes)(void 0!==e.msg?e.msg:new Uint8Array)),e.funds?t.funds=e.funds.map(e=>e?i.Coin.toJSON(e):void 0):t.funds=[],t},fromPartial(e){var t,r,n,o,a;let s=u();return s.sender=null!==(r=e.sender)&&void 0!==r?r:"",s.admin=null!==(n=e.admin)&&void 0!==n?n:"",void 0!==e.codeId&&null!==e.codeId&&(s.codeId=BigInt(e.codeId.toString())),s.label=null!==(o=e.label)&&void 0!==o?o:"",s.msg=null!==(a=e.msg)&&void 0!==a?a:new Uint8Array,s.funds=(null===(t=e.funds)||void 0===t?void 0:t.map(e=>i.Coin.fromPartial(e)))||[],s}},t.MsgInstantiateContract2={typeUrl:"/cosmwasm.wasm.v1.MsgInstantiateContract2",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of(""!==e.sender&&t.uint32(10).string(e.sender),""!==e.admin&&t.uint32(18).string(e.admin),e.codeId!==BigInt(0)&&t.uint32(24).uint64(e.codeId),""!==e.label&&t.uint32(34).string(e.label),0!==e.msg.length&&t.uint32(42).bytes(e.msg),e.funds))i.Coin.encode(r,t.uint32(50).fork()).ldelim();return 0!==e.salt.length&&t.uint32(58).bytes(e.salt),!0===e.fixMsg&&t.uint32(64).bool(e.fixMsg),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,a=d();for(;r.pos>>3){case 1:a.sender=r.string();break;case 2:a.admin=r.string();break;case 3:a.codeId=r.uint64();break;case 4:a.label=r.string();break;case 5:a.msg=r.bytes();break;case 6:a.funds.push(i.Coin.decode(r,r.uint32()));break;case 7:a.salt=r.bytes();break;case 8:a.fixMsg=r.bool();break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=d();return(0,a.isSet)(e.sender)&&(t.sender=String(e.sender)),(0,a.isSet)(e.admin)&&(t.admin=String(e.admin)),(0,a.isSet)(e.codeId)&&(t.codeId=BigInt(e.codeId.toString())),(0,a.isSet)(e.label)&&(t.label=String(e.label)),(0,a.isSet)(e.msg)&&(t.msg=(0,a.bytesFromBase64)(e.msg)),Array.isArray(null==e?void 0:e.funds)&&(t.funds=e.funds.map(e=>i.Coin.fromJSON(e))),(0,a.isSet)(e.salt)&&(t.salt=(0,a.bytesFromBase64)(e.salt)),(0,a.isSet)(e.fixMsg)&&(t.fixMsg=!!e.fixMsg),t},toJSON(e){let t={};return void 0!==e.sender&&(t.sender=e.sender),void 0!==e.admin&&(t.admin=e.admin),void 0!==e.codeId&&(t.codeId=(e.codeId||BigInt(0)).toString()),void 0!==e.label&&(t.label=e.label),void 0!==e.msg&&(t.msg=(0,a.base64FromBytes)(void 0!==e.msg?e.msg:new Uint8Array)),e.funds?t.funds=e.funds.map(e=>e?i.Coin.toJSON(e):void 0):t.funds=[],void 0!==e.salt&&(t.salt=(0,a.base64FromBytes)(void 0!==e.salt?e.salt:new Uint8Array)),void 0!==e.fixMsg&&(t.fixMsg=e.fixMsg),t},fromPartial(e){var t,r,n,o,a,s,l;let u=d();return u.sender=null!==(r=e.sender)&&void 0!==r?r:"",u.admin=null!==(n=e.admin)&&void 0!==n?n:"",void 0!==e.codeId&&null!==e.codeId&&(u.codeId=BigInt(e.codeId.toString())),u.label=null!==(o=e.label)&&void 0!==o?o:"",u.msg=null!==(a=e.msg)&&void 0!==a?a:new Uint8Array,u.funds=(null===(t=e.funds)||void 0===t?void 0:t.map(e=>i.Coin.fromPartial(e)))||[],u.salt=null!==(s=e.salt)&&void 0!==s?s:new Uint8Array,u.fixMsg=null!==(l=e.fixMsg)&&void 0!==l&&l,u}},t.MsgInstantiateContractResponse={typeUrl:"/cosmwasm.wasm.v1.MsgInstantiateContractResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.address&&t.uint32(10).string(e.address),0!==e.data.length&&t.uint32(18).bytes(e.data),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=c();for(;r.pos>>3){case 1:i.address=r.string();break;case 2:i.data=r.bytes();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=c();return(0,a.isSet)(e.address)&&(t.address=String(e.address)),(0,a.isSet)(e.data)&&(t.data=(0,a.bytesFromBase64)(e.data)),t},toJSON(e){let t={};return void 0!==e.address&&(t.address=e.address),void 0!==e.data&&(t.data=(0,a.base64FromBytes)(void 0!==e.data?e.data:new Uint8Array)),t},fromPartial(e){var t,r;let n=c();return n.address=null!==(t=e.address)&&void 0!==t?t:"",n.data=null!==(r=e.data)&&void 0!==r?r:new Uint8Array,n}},t.MsgInstantiateContract2Response={typeUrl:"/cosmwasm.wasm.v1.MsgInstantiateContract2Response",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.address&&t.uint32(10).string(e.address),0!==e.data.length&&t.uint32(18).bytes(e.data),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=p();for(;r.pos>>3){case 1:i.address=r.string();break;case 2:i.data=r.bytes();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=p();return(0,a.isSet)(e.address)&&(t.address=String(e.address)),(0,a.isSet)(e.data)&&(t.data=(0,a.bytesFromBase64)(e.data)),t},toJSON(e){let t={};return void 0!==e.address&&(t.address=e.address),void 0!==e.data&&(t.data=(0,a.base64FromBytes)(void 0!==e.data?e.data:new Uint8Array)),t},fromPartial(e){var t,r;let n=p();return n.address=null!==(t=e.address)&&void 0!==t?t:"",n.data=null!==(r=e.data)&&void 0!==r?r:new Uint8Array,n}},t.MsgExecuteContract={typeUrl:"/cosmwasm.wasm.v1.MsgExecuteContract",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of(""!==e.sender&&t.uint32(10).string(e.sender),""!==e.contract&&t.uint32(18).string(e.contract),0!==e.msg.length&&t.uint32(26).bytes(e.msg),e.funds))i.Coin.encode(r,t.uint32(42).fork()).ldelim();return t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,a=f();for(;r.pos>>3){case 1:a.sender=r.string();break;case 2:a.contract=r.string();break;case 3:a.msg=r.bytes();break;case 5:a.funds.push(i.Coin.decode(r,r.uint32()));break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=f();return(0,a.isSet)(e.sender)&&(t.sender=String(e.sender)),(0,a.isSet)(e.contract)&&(t.contract=String(e.contract)),(0,a.isSet)(e.msg)&&(t.msg=(0,a.bytesFromBase64)(e.msg)),Array.isArray(null==e?void 0:e.funds)&&(t.funds=e.funds.map(e=>i.Coin.fromJSON(e))),t},toJSON(e){let t={};return void 0!==e.sender&&(t.sender=e.sender),void 0!==e.contract&&(t.contract=e.contract),void 0!==e.msg&&(t.msg=(0,a.base64FromBytes)(void 0!==e.msg?e.msg:new Uint8Array)),e.funds?t.funds=e.funds.map(e=>e?i.Coin.toJSON(e):void 0):t.funds=[],t},fromPartial(e){var t,r,n,o;let a=f();return a.sender=null!==(r=e.sender)&&void 0!==r?r:"",a.contract=null!==(n=e.contract)&&void 0!==n?n:"",a.msg=null!==(o=e.msg)&&void 0!==o?o:new Uint8Array,a.funds=(null===(t=e.funds)||void 0===t?void 0:t.map(e=>i.Coin.fromPartial(e)))||[],a}},t.MsgExecuteContractResponse={typeUrl:"/cosmwasm.wasm.v1.MsgExecuteContractResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return 0!==e.data.length&&t.uint32(10).bytes(e.data),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=h();for(;r.pos>>3==1?i.data=r.bytes():r.skipType(7&e)}return i},fromJSON(e){let t=h();return(0,a.isSet)(e.data)&&(t.data=(0,a.bytesFromBase64)(e.data)),t},toJSON(e){let t={};return void 0!==e.data&&(t.data=(0,a.base64FromBytes)(void 0!==e.data?e.data:new Uint8Array)),t},fromPartial(e){var t;let r=h();return r.data=null!==(t=e.data)&&void 0!==t?t:new Uint8Array,r}},t.MsgMigrateContract={typeUrl:"/cosmwasm.wasm.v1.MsgMigrateContract",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.sender&&t.uint32(10).string(e.sender),""!==e.contract&&t.uint32(18).string(e.contract),e.codeId!==BigInt(0)&&t.uint32(24).uint64(e.codeId),0!==e.msg.length&&t.uint32(34).bytes(e.msg),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=g();for(;r.pos>>3){case 1:i.sender=r.string();break;case 2:i.contract=r.string();break;case 3:i.codeId=r.uint64();break;case 4:i.msg=r.bytes();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=g();return(0,a.isSet)(e.sender)&&(t.sender=String(e.sender)),(0,a.isSet)(e.contract)&&(t.contract=String(e.contract)),(0,a.isSet)(e.codeId)&&(t.codeId=BigInt(e.codeId.toString())),(0,a.isSet)(e.msg)&&(t.msg=(0,a.bytesFromBase64)(e.msg)),t},toJSON(e){let t={};return void 0!==e.sender&&(t.sender=e.sender),void 0!==e.contract&&(t.contract=e.contract),void 0!==e.codeId&&(t.codeId=(e.codeId||BigInt(0)).toString()),void 0!==e.msg&&(t.msg=(0,a.base64FromBytes)(void 0!==e.msg?e.msg:new Uint8Array)),t},fromPartial(e){var t,r,n;let i=g();return i.sender=null!==(t=e.sender)&&void 0!==t?t:"",i.contract=null!==(r=e.contract)&&void 0!==r?r:"",void 0!==e.codeId&&null!==e.codeId&&(i.codeId=BigInt(e.codeId.toString())),i.msg=null!==(n=e.msg)&&void 0!==n?n:new Uint8Array,i}},t.MsgMigrateContractResponse={typeUrl:"/cosmwasm.wasm.v1.MsgMigrateContractResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return 0!==e.data.length&&t.uint32(10).bytes(e.data),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=m();for(;r.pos>>3==1?i.data=r.bytes():r.skipType(7&e)}return i},fromJSON(e){let t=m();return(0,a.isSet)(e.data)&&(t.data=(0,a.bytesFromBase64)(e.data)),t},toJSON(e){let t={};return void 0!==e.data&&(t.data=(0,a.base64FromBytes)(void 0!==e.data?e.data:new Uint8Array)),t},fromPartial(e){var t;let r=m();return r.data=null!==(t=e.data)&&void 0!==t?t:new Uint8Array,r}},t.MsgUpdateAdmin={typeUrl:"/cosmwasm.wasm.v1.MsgUpdateAdmin",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.sender&&t.uint32(10).string(e.sender),""!==e.newAdmin&&t.uint32(18).string(e.newAdmin),""!==e.contract&&t.uint32(26).string(e.contract),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=y();for(;r.pos>>3){case 1:i.sender=r.string();break;case 2:i.newAdmin=r.string();break;case 3:i.contract=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=y();return(0,a.isSet)(e.sender)&&(t.sender=String(e.sender)),(0,a.isSet)(e.newAdmin)&&(t.newAdmin=String(e.newAdmin)),(0,a.isSet)(e.contract)&&(t.contract=String(e.contract)),t},toJSON(e){let t={};return void 0!==e.sender&&(t.sender=e.sender),void 0!==e.newAdmin&&(t.newAdmin=e.newAdmin),void 0!==e.contract&&(t.contract=e.contract),t},fromPartial(e){var t,r,n;let i=y();return i.sender=null!==(t=e.sender)&&void 0!==t?t:"",i.newAdmin=null!==(r=e.newAdmin)&&void 0!==r?r:"",i.contract=null!==(n=e.contract)&&void 0!==n?n:"",i}},t.MsgUpdateAdminResponse={typeUrl:"/cosmwasm.wasm.v1.MsgUpdateAdminResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=v();for(;r.posv(),toJSON:e=>({}),fromPartial:e=>v()},t.MsgClearAdmin={typeUrl:"/cosmwasm.wasm.v1.MsgClearAdmin",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.sender&&t.uint32(10).string(e.sender),""!==e.contract&&t.uint32(26).string(e.contract),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=b();for(;r.pos>>3){case 1:i.sender=r.string();break;case 3:i.contract=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=b();return(0,a.isSet)(e.sender)&&(t.sender=String(e.sender)),(0,a.isSet)(e.contract)&&(t.contract=String(e.contract)),t},toJSON(e){let t={};return void 0!==e.sender&&(t.sender=e.sender),void 0!==e.contract&&(t.contract=e.contract),t},fromPartial(e){var t,r;let n=b();return n.sender=null!==(t=e.sender)&&void 0!==t?t:"",n.contract=null!==(r=e.contract)&&void 0!==r?r:"",n}},t.MsgClearAdminResponse={typeUrl:"/cosmwasm.wasm.v1.MsgClearAdminResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=S();for(;r.posS(),toJSON:e=>({}),fromPartial:e=>S()},t.MsgUpdateInstantiateConfig={typeUrl:"/cosmwasm.wasm.v1.MsgUpdateInstantiateConfig",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.sender&&t.uint32(10).string(e.sender),e.codeId!==BigInt(0)&&t.uint32(16).uint64(e.codeId),void 0!==e.newInstantiatePermission&&n.AccessConfig.encode(e.newInstantiatePermission,t.uint32(26).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=w();for(;r.pos>>3){case 1:a.sender=r.string();break;case 2:a.codeId=r.uint64();break;case 3:a.newInstantiatePermission=n.AccessConfig.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=w();return(0,a.isSet)(e.sender)&&(t.sender=String(e.sender)),(0,a.isSet)(e.codeId)&&(t.codeId=BigInt(e.codeId.toString())),(0,a.isSet)(e.newInstantiatePermission)&&(t.newInstantiatePermission=n.AccessConfig.fromJSON(e.newInstantiatePermission)),t},toJSON(e){let t={};return void 0!==e.sender&&(t.sender=e.sender),void 0!==e.codeId&&(t.codeId=(e.codeId||BigInt(0)).toString()),void 0!==e.newInstantiatePermission&&(t.newInstantiatePermission=e.newInstantiatePermission?n.AccessConfig.toJSON(e.newInstantiatePermission):void 0),t},fromPartial(e){var t;let r=w();return r.sender=null!==(t=e.sender)&&void 0!==t?t:"",void 0!==e.codeId&&null!==e.codeId&&(r.codeId=BigInt(e.codeId.toString())),void 0!==e.newInstantiatePermission&&null!==e.newInstantiatePermission&&(r.newInstantiatePermission=n.AccessConfig.fromPartial(e.newInstantiatePermission)),r}},t.MsgUpdateInstantiateConfigResponse={typeUrl:"/cosmwasm.wasm.v1.MsgUpdateInstantiateConfigResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=_();for(;r.pos_(),toJSON:e=>({}),fromPartial:e=>_()};class k{StoreCode(e){let r=t.MsgStoreCode.encode(e).finish();return this.rpc.request("cosmwasm.wasm.v1.Msg","StoreCode",r).then(e=>t.MsgStoreCodeResponse.decode(new o.BinaryReader(e)))}InstantiateContract(e){let r=t.MsgInstantiateContract.encode(e).finish();return this.rpc.request("cosmwasm.wasm.v1.Msg","InstantiateContract",r).then(e=>t.MsgInstantiateContractResponse.decode(new o.BinaryReader(e)))}InstantiateContract2(e){let r=t.MsgInstantiateContract2.encode(e).finish();return this.rpc.request("cosmwasm.wasm.v1.Msg","InstantiateContract2",r).then(e=>t.MsgInstantiateContract2Response.decode(new o.BinaryReader(e)))}ExecuteContract(e){let r=t.MsgExecuteContract.encode(e).finish();return this.rpc.request("cosmwasm.wasm.v1.Msg","ExecuteContract",r).then(e=>t.MsgExecuteContractResponse.decode(new o.BinaryReader(e)))}MigrateContract(e){let r=t.MsgMigrateContract.encode(e).finish();return this.rpc.request("cosmwasm.wasm.v1.Msg","MigrateContract",r).then(e=>t.MsgMigrateContractResponse.decode(new o.BinaryReader(e)))}UpdateAdmin(e){let r=t.MsgUpdateAdmin.encode(e).finish();return this.rpc.request("cosmwasm.wasm.v1.Msg","UpdateAdmin",r).then(e=>t.MsgUpdateAdminResponse.decode(new o.BinaryReader(e)))}ClearAdmin(e){let r=t.MsgClearAdmin.encode(e).finish();return this.rpc.request("cosmwasm.wasm.v1.Msg","ClearAdmin",r).then(e=>t.MsgClearAdminResponse.decode(new o.BinaryReader(e)))}UpdateInstantiateConfig(e){let r=t.MsgUpdateInstantiateConfig.encode(e).finish();return this.rpc.request("cosmwasm.wasm.v1.Msg","UpdateInstantiateConfig",r).then(e=>t.MsgUpdateInstantiateConfigResponse.decode(new o.BinaryReader(e)))}constructor(e){this.rpc=e,this.StoreCode=this.StoreCode.bind(this),this.InstantiateContract=this.InstantiateContract.bind(this),this.InstantiateContract2=this.InstantiateContract2.bind(this),this.ExecuteContract=this.ExecuteContract.bind(this),this.MigrateContract=this.MigrateContract.bind(this),this.UpdateAdmin=this.UpdateAdmin.bind(this),this.ClearAdmin=this.ClearAdmin.bind(this),this.UpdateInstantiateConfig=this.UpdateInstantiateConfig.bind(this)}}t.MsgClientImpl=k},20624:function(e,t,r){"use strict";var n,i;Object.defineProperty(t,"__esModule",{value:!0}),t.Model=t.AbsoluteTxPosition=t.ContractCodeHistoryEntry=t.ContractInfo=t.CodeInfo=t.Params=t.AccessConfig=t.AccessTypeParam=t.contractCodeHistoryOperationTypeToJSON=t.contractCodeHistoryOperationTypeFromJSON=t.ContractCodeHistoryOperationType=t.accessTypeToJSON=t.accessTypeFromJSON=t.AccessType=t.protobufPackage=void 0;let o=r(11879),a=r(46554),s=r(99133);function l(e){switch(e){case 0:case"ACCESS_TYPE_UNSPECIFIED":return n.ACCESS_TYPE_UNSPECIFIED;case 1:case"ACCESS_TYPE_NOBODY":return n.ACCESS_TYPE_NOBODY;case 2:case"ACCESS_TYPE_ONLY_ADDRESS":return n.ACCESS_TYPE_ONLY_ADDRESS;case 3:case"ACCESS_TYPE_EVERYBODY":return n.ACCESS_TYPE_EVERYBODY;case 4:case"ACCESS_TYPE_ANY_OF_ADDRESSES":return n.ACCESS_TYPE_ANY_OF_ADDRESSES;default:return n.UNRECOGNIZED}}function u(e){switch(e){case n.ACCESS_TYPE_UNSPECIFIED:return"ACCESS_TYPE_UNSPECIFIED";case n.ACCESS_TYPE_NOBODY:return"ACCESS_TYPE_NOBODY";case n.ACCESS_TYPE_ONLY_ADDRESS:return"ACCESS_TYPE_ONLY_ADDRESS";case n.ACCESS_TYPE_EVERYBODY:return"ACCESS_TYPE_EVERYBODY";case n.ACCESS_TYPE_ANY_OF_ADDRESSES:return"ACCESS_TYPE_ANY_OF_ADDRESSES";case n.UNRECOGNIZED:default:return"UNRECOGNIZED"}}function d(e){switch(e){case 0:case"CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED":return i.CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED;case 1:case"CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT":return i.CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT;case 2:case"CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE":return i.CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE;case 3:case"CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS":return i.CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS;default:return i.UNRECOGNIZED}}function c(e){switch(e){case i.CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED:return"CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED";case i.CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT:return"CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT";case i.CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE:return"CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE";case i.CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS:return"CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS";case i.UNRECOGNIZED:default:return"UNRECOGNIZED"}}function p(){return{value:0}}function f(){return{permission:0,address:"",addresses:[]}}function h(){return{codeUploadAccess:t.AccessConfig.fromPartial({}),instantiateDefaultPermission:0}}function g(){return{codeHash:new Uint8Array,creator:"",instantiateConfig:t.AccessConfig.fromPartial({})}}function m(){return{codeId:BigInt(0),creator:"",admin:"",label:"",created:void 0,ibcPortId:"",extension:void 0}}function y(){return{operation:0,codeId:BigInt(0),updated:void 0,msg:new Uint8Array}}function v(){return{blockHeight:BigInt(0),txIndex:BigInt(0)}}function b(){return{key:new Uint8Array,value:new Uint8Array}}t.protobufPackage="cosmwasm.wasm.v1",function(e){e[e.ACCESS_TYPE_UNSPECIFIED=0]="ACCESS_TYPE_UNSPECIFIED",e[e.ACCESS_TYPE_NOBODY=1]="ACCESS_TYPE_NOBODY",e[e.ACCESS_TYPE_ONLY_ADDRESS=2]="ACCESS_TYPE_ONLY_ADDRESS",e[e.ACCESS_TYPE_EVERYBODY=3]="ACCESS_TYPE_EVERYBODY",e[e.ACCESS_TYPE_ANY_OF_ADDRESSES=4]="ACCESS_TYPE_ANY_OF_ADDRESSES",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(n||(t.AccessType=n={})),t.accessTypeFromJSON=l,t.accessTypeToJSON=u,function(e){e[e.CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED=0]="CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED",e[e.CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT=1]="CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT",e[e.CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE=2]="CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE",e[e.CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS=3]="CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(i||(t.ContractCodeHistoryOperationType=i={})),t.contractCodeHistoryOperationTypeFromJSON=d,t.contractCodeHistoryOperationTypeToJSON=c,t.AccessTypeParam={typeUrl:"/cosmwasm.wasm.v1.AccessTypeParam",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return 0!==e.value&&t.uint32(8).int32(e.value),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=p();for(;r.pos>>3==1?i.value=r.int32():r.skipType(7&e)}return i},fromJSON(e){let t=p();return(0,s.isSet)(e.value)&&(t.value=l(e.value)),t},toJSON(e){let t={};return void 0!==e.value&&(t.value=u(e.value)),t},fromPartial(e){var t;let r=p();return r.value=null!==(t=e.value)&&void 0!==t?t:0,r}},t.AccessConfig={typeUrl:"/cosmwasm.wasm.v1.AccessConfig",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();for(let r of(0!==e.permission&&t.uint32(8).int32(e.permission),""!==e.address&&t.uint32(18).string(e.address),e.addresses))t.uint32(26).string(r);return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=f();for(;r.pos>>3){case 1:i.permission=r.int32();break;case 2:i.address=r.string();break;case 3:i.addresses.push(r.string());break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=f();return(0,s.isSet)(e.permission)&&(t.permission=l(e.permission)),(0,s.isSet)(e.address)&&(t.address=String(e.address)),Array.isArray(null==e?void 0:e.addresses)&&(t.addresses=e.addresses.map(e=>String(e))),t},toJSON(e){let t={};return void 0!==e.permission&&(t.permission=u(e.permission)),void 0!==e.address&&(t.address=e.address),e.addresses?t.addresses=e.addresses.map(e=>e):t.addresses=[],t},fromPartial(e){var t,r,n;let i=f();return i.permission=null!==(r=e.permission)&&void 0!==r?r:0,i.address=null!==(n=e.address)&&void 0!==n?n:"",i.addresses=(null===(t=e.addresses)||void 0===t?void 0:t.map(e=>e))||[],i}},t.Params={typeUrl:"/cosmwasm.wasm.v1.Params",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return void 0!==e.codeUploadAccess&&t.AccessConfig.encode(e.codeUploadAccess,r.uint32(10).fork()).ldelim(),0!==e.instantiateDefaultPermission&&r.uint32(16).int32(e.instantiateDefaultPermission),r},decode(e,r){let n=e instanceof a.BinaryReader?e:new a.BinaryReader(e),i=void 0===r?n.len:n.pos+r,o=h();for(;n.pos>>3){case 1:o.codeUploadAccess=t.AccessConfig.decode(n,n.uint32());break;case 2:o.instantiateDefaultPermission=n.int32();break;default:n.skipType(7&e)}}return o},fromJSON(e){let r=h();return(0,s.isSet)(e.codeUploadAccess)&&(r.codeUploadAccess=t.AccessConfig.fromJSON(e.codeUploadAccess)),(0,s.isSet)(e.instantiateDefaultPermission)&&(r.instantiateDefaultPermission=l(e.instantiateDefaultPermission)),r},toJSON(e){let r={};return void 0!==e.codeUploadAccess&&(r.codeUploadAccess=e.codeUploadAccess?t.AccessConfig.toJSON(e.codeUploadAccess):void 0),void 0!==e.instantiateDefaultPermission&&(r.instantiateDefaultPermission=u(e.instantiateDefaultPermission)),r},fromPartial(e){var r;let n=h();return void 0!==e.codeUploadAccess&&null!==e.codeUploadAccess&&(n.codeUploadAccess=t.AccessConfig.fromPartial(e.codeUploadAccess)),n.instantiateDefaultPermission=null!==(r=e.instantiateDefaultPermission)&&void 0!==r?r:0,n}},t.CodeInfo={typeUrl:"/cosmwasm.wasm.v1.CodeInfo",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return 0!==e.codeHash.length&&r.uint32(10).bytes(e.codeHash),""!==e.creator&&r.uint32(18).string(e.creator),void 0!==e.instantiateConfig&&t.AccessConfig.encode(e.instantiateConfig,r.uint32(42).fork()).ldelim(),r},decode(e,r){let n=e instanceof a.BinaryReader?e:new a.BinaryReader(e),i=void 0===r?n.len:n.pos+r,o=g();for(;n.pos>>3){case 1:o.codeHash=n.bytes();break;case 2:o.creator=n.string();break;case 5:o.instantiateConfig=t.AccessConfig.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){let r=g();return(0,s.isSet)(e.codeHash)&&(r.codeHash=(0,s.bytesFromBase64)(e.codeHash)),(0,s.isSet)(e.creator)&&(r.creator=String(e.creator)),(0,s.isSet)(e.instantiateConfig)&&(r.instantiateConfig=t.AccessConfig.fromJSON(e.instantiateConfig)),r},toJSON(e){let r={};return void 0!==e.codeHash&&(r.codeHash=(0,s.base64FromBytes)(void 0!==e.codeHash?e.codeHash:new Uint8Array)),void 0!==e.creator&&(r.creator=e.creator),void 0!==e.instantiateConfig&&(r.instantiateConfig=e.instantiateConfig?t.AccessConfig.toJSON(e.instantiateConfig):void 0),r},fromPartial(e){var r,n;let i=g();return i.codeHash=null!==(r=e.codeHash)&&void 0!==r?r:new Uint8Array,i.creator=null!==(n=e.creator)&&void 0!==n?n:"",void 0!==e.instantiateConfig&&null!==e.instantiateConfig&&(i.instantiateConfig=t.AccessConfig.fromPartial(e.instantiateConfig)),i}},t.ContractInfo={typeUrl:"/cosmwasm.wasm.v1.ContractInfo",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return e.codeId!==BigInt(0)&&r.uint32(8).uint64(e.codeId),""!==e.creator&&r.uint32(18).string(e.creator),""!==e.admin&&r.uint32(26).string(e.admin),""!==e.label&&r.uint32(34).string(e.label),void 0!==e.created&&t.AbsoluteTxPosition.encode(e.created,r.uint32(42).fork()).ldelim(),""!==e.ibcPortId&&r.uint32(50).string(e.ibcPortId),void 0!==e.extension&&o.Any.encode(e.extension,r.uint32(58).fork()).ldelim(),r},decode(e,r){let n=e instanceof a.BinaryReader?e:new a.BinaryReader(e),i=void 0===r?n.len:n.pos+r,s=m();for(;n.pos>>3){case 1:s.codeId=n.uint64();break;case 2:s.creator=n.string();break;case 3:s.admin=n.string();break;case 4:s.label=n.string();break;case 5:s.created=t.AbsoluteTxPosition.decode(n,n.uint32());break;case 6:s.ibcPortId=n.string();break;case 7:s.extension=o.Any.decode(n,n.uint32());break;default:n.skipType(7&e)}}return s},fromJSON(e){let r=m();return(0,s.isSet)(e.codeId)&&(r.codeId=BigInt(e.codeId.toString())),(0,s.isSet)(e.creator)&&(r.creator=String(e.creator)),(0,s.isSet)(e.admin)&&(r.admin=String(e.admin)),(0,s.isSet)(e.label)&&(r.label=String(e.label)),(0,s.isSet)(e.created)&&(r.created=t.AbsoluteTxPosition.fromJSON(e.created)),(0,s.isSet)(e.ibcPortId)&&(r.ibcPortId=String(e.ibcPortId)),(0,s.isSet)(e.extension)&&(r.extension=o.Any.fromJSON(e.extension)),r},toJSON(e){let r={};return void 0!==e.codeId&&(r.codeId=(e.codeId||BigInt(0)).toString()),void 0!==e.creator&&(r.creator=e.creator),void 0!==e.admin&&(r.admin=e.admin),void 0!==e.label&&(r.label=e.label),void 0!==e.created&&(r.created=e.created?t.AbsoluteTxPosition.toJSON(e.created):void 0),void 0!==e.ibcPortId&&(r.ibcPortId=e.ibcPortId),void 0!==e.extension&&(r.extension=e.extension?o.Any.toJSON(e.extension):void 0),r},fromPartial(e){var r,n,i,a;let s=m();return void 0!==e.codeId&&null!==e.codeId&&(s.codeId=BigInt(e.codeId.toString())),s.creator=null!==(r=e.creator)&&void 0!==r?r:"",s.admin=null!==(n=e.admin)&&void 0!==n?n:"",s.label=null!==(i=e.label)&&void 0!==i?i:"",void 0!==e.created&&null!==e.created&&(s.created=t.AbsoluteTxPosition.fromPartial(e.created)),s.ibcPortId=null!==(a=e.ibcPortId)&&void 0!==a?a:"",void 0!==e.extension&&null!==e.extension&&(s.extension=o.Any.fromPartial(e.extension)),s}},t.ContractCodeHistoryEntry={typeUrl:"/cosmwasm.wasm.v1.ContractCodeHistoryEntry",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return 0!==e.operation&&r.uint32(8).int32(e.operation),e.codeId!==BigInt(0)&&r.uint32(16).uint64(e.codeId),void 0!==e.updated&&t.AbsoluteTxPosition.encode(e.updated,r.uint32(26).fork()).ldelim(),0!==e.msg.length&&r.uint32(34).bytes(e.msg),r},decode(e,r){let n=e instanceof a.BinaryReader?e:new a.BinaryReader(e),i=void 0===r?n.len:n.pos+r,o=y();for(;n.pos>>3){case 1:o.operation=n.int32();break;case 2:o.codeId=n.uint64();break;case 3:o.updated=t.AbsoluteTxPosition.decode(n,n.uint32());break;case 4:o.msg=n.bytes();break;default:n.skipType(7&e)}}return o},fromJSON(e){let r=y();return(0,s.isSet)(e.operation)&&(r.operation=d(e.operation)),(0,s.isSet)(e.codeId)&&(r.codeId=BigInt(e.codeId.toString())),(0,s.isSet)(e.updated)&&(r.updated=t.AbsoluteTxPosition.fromJSON(e.updated)),(0,s.isSet)(e.msg)&&(r.msg=(0,s.bytesFromBase64)(e.msg)),r},toJSON(e){let r={};return void 0!==e.operation&&(r.operation=c(e.operation)),void 0!==e.codeId&&(r.codeId=(e.codeId||BigInt(0)).toString()),void 0!==e.updated&&(r.updated=e.updated?t.AbsoluteTxPosition.toJSON(e.updated):void 0),void 0!==e.msg&&(r.msg=(0,s.base64FromBytes)(void 0!==e.msg?e.msg:new Uint8Array)),r},fromPartial(e){var r,n;let i=y();return i.operation=null!==(r=e.operation)&&void 0!==r?r:0,void 0!==e.codeId&&null!==e.codeId&&(i.codeId=BigInt(e.codeId.toString())),void 0!==e.updated&&null!==e.updated&&(i.updated=t.AbsoluteTxPosition.fromPartial(e.updated)),i.msg=null!==(n=e.msg)&&void 0!==n?n:new Uint8Array,i}},t.AbsoluteTxPosition={typeUrl:"/cosmwasm.wasm.v1.AbsoluteTxPosition",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return e.blockHeight!==BigInt(0)&&t.uint32(8).uint64(e.blockHeight),e.txIndex!==BigInt(0)&&t.uint32(16).uint64(e.txIndex),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=v();for(;r.pos>>3){case 1:i.blockHeight=r.uint64();break;case 2:i.txIndex=r.uint64();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=v();return(0,s.isSet)(e.blockHeight)&&(t.blockHeight=BigInt(e.blockHeight.toString())),(0,s.isSet)(e.txIndex)&&(t.txIndex=BigInt(e.txIndex.toString())),t},toJSON(e){let t={};return void 0!==e.blockHeight&&(t.blockHeight=(e.blockHeight||BigInt(0)).toString()),void 0!==e.txIndex&&(t.txIndex=(e.txIndex||BigInt(0)).toString()),t},fromPartial(e){let t=v();return void 0!==e.blockHeight&&null!==e.blockHeight&&(t.blockHeight=BigInt(e.blockHeight.toString())),void 0!==e.txIndex&&null!==e.txIndex&&(t.txIndex=BigInt(e.txIndex.toString())),t}},t.Model={typeUrl:"/cosmwasm.wasm.v1.Model",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return 0!==e.key.length&&t.uint32(10).bytes(e.key),0!==e.value.length&&t.uint32(18).bytes(e.value),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=b();for(;r.pos>>3){case 1:i.key=r.bytes();break;case 2:i.value=r.bytes();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=b();return(0,s.isSet)(e.key)&&(t.key=(0,s.bytesFromBase64)(e.key)),(0,s.isSet)(e.value)&&(t.value=(0,s.bytesFromBase64)(e.value)),t},toJSON(e){let t={};return void 0!==e.key&&(t.key=(0,s.base64FromBytes)(void 0!==e.key?e.key:new Uint8Array)),void 0!==e.value&&(t.value=(0,s.base64FromBytes)(void 0!==e.value?e.value:new Uint8Array)),t},fromPartial(e){var t,r;let n=b();return n.key=null!==(t=e.key)&&void 0!==t?t:new Uint8Array,n.value=null!==(r=e.value)&&void 0!==r?r:new Uint8Array,n}}},11879:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Any=t.protobufPackage=void 0;let n=r(46554),i=r(99133);function o(){return{typeUrl:"",value:new Uint8Array}}t.protobufPackage="google.protobuf",t.Any={typeUrl:"/google.protobuf.Any",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.BinaryWriter.create();return""!==e.typeUrl&&t.uint32(10).string(e.typeUrl),0!==e.value.length&&t.uint32(18).bytes(e.value),t},decode(e,t){let r=e instanceof n.BinaryReader?e:new n.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=o();for(;r.pos>>3){case 1:a.typeUrl=r.string();break;case 2:a.value=r.bytes();break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=o();return(0,i.isSet)(e.typeUrl)&&(t.typeUrl=String(e.typeUrl)),(0,i.isSet)(e.value)&&(t.value=(0,i.bytesFromBase64)(e.value)),t},toJSON(e){let t={};return void 0!==e.typeUrl&&(t.typeUrl=e.typeUrl),void 0!==e.value&&(t.value=(0,i.base64FromBytes)(void 0!==e.value?e.value:new Uint8Array)),t},fromPartial(e){var t,r;let n=o();return n.typeUrl=null!==(t=e.typeUrl)&&void 0!==t?t:"",n.value=null!==(r=e.value)&&void 0!==r?r:new Uint8Array,n}}},84849:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Duration=t.protobufPackage=void 0;let n=r(46554),i=r(99133);function o(){return{seconds:BigInt(0),nanos:0}}t.protobufPackage="google.protobuf",t.Duration={typeUrl:"/google.protobuf.Duration",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.BinaryWriter.create();return e.seconds!==BigInt(0)&&t.uint32(8).int64(e.seconds),0!==e.nanos&&t.uint32(16).int32(e.nanos),t},decode(e,t){let r=e instanceof n.BinaryReader?e:new n.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=o();for(;r.pos>>3){case 1:a.seconds=r.int64();break;case 2:a.nanos=r.int32();break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=o();return(0,i.isSet)(e.seconds)&&(t.seconds=BigInt(e.seconds.toString())),(0,i.isSet)(e.nanos)&&(t.nanos=Number(e.nanos)),t},toJSON(e){let t={};return void 0!==e.seconds&&(t.seconds=(e.seconds||BigInt(0)).toString()),void 0!==e.nanos&&(t.nanos=Math.round(e.nanos)),t},fromPartial(e){var t;let r=o();return void 0!==e.seconds&&null!==e.seconds&&(r.seconds=BigInt(e.seconds.toString())),r.nanos=null!==(t=e.nanos)&&void 0!==t?t:0,r}}},9990:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Timestamp=t.protobufPackage=void 0;let n=r(46554),i=r(99133);function o(){return{seconds:BigInt(0),nanos:0}}t.protobufPackage="google.protobuf",t.Timestamp={typeUrl:"/google.protobuf.Timestamp",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.BinaryWriter.create();return e.seconds!==BigInt(0)&&t.uint32(8).int64(e.seconds),0!==e.nanos&&t.uint32(16).int32(e.nanos),t},decode(e,t){let r=e instanceof n.BinaryReader?e:new n.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=o();for(;r.pos>>3){case 1:a.seconds=r.int64();break;case 2:a.nanos=r.int32();break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=o();return(0,i.isSet)(e.seconds)&&(t.seconds=BigInt(e.seconds.toString())),(0,i.isSet)(e.nanos)&&(t.nanos=Number(e.nanos)),t},toJSON(e){let t={};return void 0!==e.seconds&&(t.seconds=(e.seconds||BigInt(0)).toString()),void 0!==e.nanos&&(t.nanos=Math.round(e.nanos)),t},fromPartial(e){var t;let r=o();return void 0!==e.seconds&&null!==e.seconds&&(r.seconds=BigInt(e.seconds.toString())),r.nanos=null!==(t=e.nanos)&&void 0!==t?t:0,r}}},99133:function(e,t,r){"use strict";var n=r(23663).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.fromJsonTimestamp=t.fromTimestamp=t.toTimestamp=t.setPaginationParams=t.isObject=t.isSet=t.fromDuration=t.toDuration=t.omitDefault=t.base64FromBytes=t.bytesFromBase64=void 0;var i=void 0!==i?i:"undefined"!=typeof self?self:window;let o=i.atob||(e=>i.Buffer.from(e,"base64").toString("binary"));function a(e){let t=o(e),r=new Uint8Array(t.length);for(let e=0;ei.Buffer.from(e,"binary").toString("base64"));function l(e){let t=[];return e.forEach(e=>{t.push(String.fromCharCode(e))}),s(t.join(""))}function u(e){if("string"==typeof e)return""===e?void 0:e;if("number"==typeof e)return 0===e?void 0:e;if("bigint"==typeof e)return e===BigInt(0)?void 0:e;throw Error("Got unsupported type ".concat(typeof e))}function d(e){return{seconds:BigInt(Math.floor(parseInt(e)/1e9)),nanos:parseInt(e)%1e9}}function c(e){return(1e9*parseInt(e.seconds.toString())+e.nanos).toString()}function p(e){return null!=e}function f(e){return"object"==typeof e&&null!==e}t.base64FromBytes=l,t.omitDefault=u,t.toDuration=d,t.fromDuration=c,t.isSet=p,t.isObject=f;let h=(e,t)=>(t&&(void 0!==(null==t?void 0:t.countTotal)&&(e.params["pagination.count_total"]=t.countTotal),void 0!==(null==t?void 0:t.key)&&(e.params["pagination.key"]=n.from(t.key).toString("base64")),void 0!==(null==t?void 0:t.limit)&&(e.params["pagination.limit"]=t.limit.toString()),void 0!==(null==t?void 0:t.offset)&&(e.params["pagination.offset"]=t.offset.toString()),void 0!==(null==t?void 0:t.reverse)&&(e.params["pagination.reverse"]=t.reverse)),e);function g(e){return{seconds:b(e.getTime()/1e3),nanos:e.getTime()%1e3*1e6}}function m(e){let t=1e3*Number(e.seconds);return new Date(t+=e.nanos/1e6)}t.setPaginationParams=h,t.toTimestamp=g,t.fromTimestamp=m;let y=e=>({seconds:p(e.seconds)?BigInt(e.seconds.toString()):BigInt(0),nanos:p(e.nanos)?Number(e.nanos):0});function v(e){return e instanceof Date?g(e):"string"==typeof e?g(new Date(e)):y(e)}function b(e){return BigInt(Math.trunc(e))}t.fromJsonTimestamp=v},27780:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QueryClientImpl=t.QueryEscrowAddressResponse=t.QueryEscrowAddressRequest=t.QueryDenomHashResponse=t.QueryDenomHashRequest=t.QueryParamsResponse=t.QueryParamsRequest=t.QueryDenomTracesResponse=t.QueryDenomTracesRequest=t.QueryDenomTraceResponse=t.QueryDenomTraceRequest=t.protobufPackage=void 0;let n=r(86141),i=r(25879),o=r(46554),a=r(99133);function s(){return{hash:""}}function l(){return{denomTrace:void 0}}function u(){return{pagination:void 0}}function d(){return{denomTraces:[],pagination:void 0}}function c(){return{}}function p(){return{params:void 0}}function f(){return{trace:""}}function h(){return{hash:""}}function g(){return{portId:"",channelId:""}}function m(){return{escrowAddress:""}}t.protobufPackage="ibc.applications.transfer.v1",t.QueryDenomTraceRequest={typeUrl:"/ibc.applications.transfer.v1.QueryDenomTraceRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.hash&&t.uint32(10).string(e.hash),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=s();for(;r.pos>>3==1?i.hash=r.string():r.skipType(7&e)}return i},fromJSON(e){let t=s();return(0,a.isSet)(e.hash)&&(t.hash=String(e.hash)),t},toJSON(e){let t={};return void 0!==e.hash&&(t.hash=e.hash),t},fromPartial(e){var t;let r=s();return r.hash=null!==(t=e.hash)&&void 0!==t?t:"",r}},t.QueryDenomTraceResponse={typeUrl:"/ibc.applications.transfer.v1.QueryDenomTraceResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return void 0!==e.denomTrace&&i.DenomTrace.encode(e.denomTrace,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,a=l();for(;r.pos>>3==1?a.denomTrace=i.DenomTrace.decode(r,r.uint32()):r.skipType(7&e)}return a},fromJSON(e){let t=l();return(0,a.isSet)(e.denomTrace)&&(t.denomTrace=i.DenomTrace.fromJSON(e.denomTrace)),t},toJSON(e){let t={};return void 0!==e.denomTrace&&(t.denomTrace=e.denomTrace?i.DenomTrace.toJSON(e.denomTrace):void 0),t},fromPartial(e){let t=l();return void 0!==e.denomTrace&&null!==e.denomTrace&&(t.denomTrace=i.DenomTrace.fromPartial(e.denomTrace)),t}},t.QueryDenomTracesRequest={typeUrl:"/ibc.applications.transfer.v1.QueryDenomTracesRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return void 0!==e.pagination&&n.PageRequest.encode(e.pagination,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=u();for(;r.pos>>3==1?a.pagination=n.PageRequest.decode(r,r.uint32()):r.skipType(7&e)}return a},fromJSON(e){let t=u();return(0,a.isSet)(e.pagination)&&(t.pagination=n.PageRequest.fromJSON(e.pagination)),t},toJSON(e){let t={};return void 0!==e.pagination&&(t.pagination=e.pagination?n.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){let t=u();return void 0!==e.pagination&&null!==e.pagination&&(t.pagination=n.PageRequest.fromPartial(e.pagination)),t}},t.QueryDenomTracesResponse={typeUrl:"/ibc.applications.transfer.v1.QueryDenomTracesResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of e.denomTraces)i.DenomTrace.encode(r,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&n.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),a=void 0===t?r.len:r.pos+t,s=d();for(;r.pos>>3){case 1:s.denomTraces.push(i.DenomTrace.decode(r,r.uint32()));break;case 2:s.pagination=n.PageResponse.decode(r,r.uint32());break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=d();return Array.isArray(null==e?void 0:e.denomTraces)&&(t.denomTraces=e.denomTraces.map(e=>i.DenomTrace.fromJSON(e))),(0,a.isSet)(e.pagination)&&(t.pagination=n.PageResponse.fromJSON(e.pagination)),t},toJSON(e){let t={};return e.denomTraces?t.denomTraces=e.denomTraces.map(e=>e?i.DenomTrace.toJSON(e):void 0):t.denomTraces=[],void 0!==e.pagination&&(t.pagination=e.pagination?n.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=d();return r.denomTraces=(null===(t=e.denomTraces)||void 0===t?void 0:t.map(e=>i.DenomTrace.fromPartial(e)))||[],void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageResponse.fromPartial(e.pagination)),r}},t.QueryParamsRequest={typeUrl:"/ibc.applications.transfer.v1.QueryParamsRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=c();for(;r.posc(),toJSON:e=>({}),fromPartial:e=>c()},t.QueryParamsResponse={typeUrl:"/ibc.applications.transfer.v1.QueryParamsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return void 0!==e.params&&i.Params.encode(e.params,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,a=p();for(;r.pos>>3==1?a.params=i.Params.decode(r,r.uint32()):r.skipType(7&e)}return a},fromJSON(e){let t=p();return(0,a.isSet)(e.params)&&(t.params=i.Params.fromJSON(e.params)),t},toJSON(e){let t={};return void 0!==e.params&&(t.params=e.params?i.Params.toJSON(e.params):void 0),t},fromPartial(e){let t=p();return void 0!==e.params&&null!==e.params&&(t.params=i.Params.fromPartial(e.params)),t}},t.QueryDenomHashRequest={typeUrl:"/ibc.applications.transfer.v1.QueryDenomHashRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.trace&&t.uint32(10).string(e.trace),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=f();for(;r.pos>>3==1?i.trace=r.string():r.skipType(7&e)}return i},fromJSON(e){let t=f();return(0,a.isSet)(e.trace)&&(t.trace=String(e.trace)),t},toJSON(e){let t={};return void 0!==e.trace&&(t.trace=e.trace),t},fromPartial(e){var t;let r=f();return r.trace=null!==(t=e.trace)&&void 0!==t?t:"",r}},t.QueryDenomHashResponse={typeUrl:"/ibc.applications.transfer.v1.QueryDenomHashResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.hash&&t.uint32(10).string(e.hash),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=h();for(;r.pos>>3==1?i.hash=r.string():r.skipType(7&e)}return i},fromJSON(e){let t=h();return(0,a.isSet)(e.hash)&&(t.hash=String(e.hash)),t},toJSON(e){let t={};return void 0!==e.hash&&(t.hash=e.hash),t},fromPartial(e){var t;let r=h();return r.hash=null!==(t=e.hash)&&void 0!==t?t:"",r}},t.QueryEscrowAddressRequest={typeUrl:"/ibc.applications.transfer.v1.QueryEscrowAddressRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.portId&&t.uint32(10).string(e.portId),""!==e.channelId&&t.uint32(18).string(e.channelId),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=g();for(;r.pos>>3){case 1:i.portId=r.string();break;case 2:i.channelId=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=g();return(0,a.isSet)(e.portId)&&(t.portId=String(e.portId)),(0,a.isSet)(e.channelId)&&(t.channelId=String(e.channelId)),t},toJSON(e){let t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.channelId&&(t.channelId=e.channelId),t},fromPartial(e){var t,r;let n=g();return n.portId=null!==(t=e.portId)&&void 0!==t?t:"",n.channelId=null!==(r=e.channelId)&&void 0!==r?r:"",n}},t.QueryEscrowAddressResponse={typeUrl:"/ibc.applications.transfer.v1.QueryEscrowAddressResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.escrowAddress&&t.uint32(10).string(e.escrowAddress),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=m();for(;r.pos>>3==1?i.escrowAddress=r.string():r.skipType(7&e)}return i},fromJSON(e){let t=m();return(0,a.isSet)(e.escrowAddress)&&(t.escrowAddress=String(e.escrowAddress)),t},toJSON(e){let t={};return void 0!==e.escrowAddress&&(t.escrowAddress=e.escrowAddress),t},fromPartial(e){var t;let r=m();return r.escrowAddress=null!==(t=e.escrowAddress)&&void 0!==t?t:"",r}};class y{DenomTrace(e){let r=t.QueryDenomTraceRequest.encode(e).finish();return this.rpc.request("ibc.applications.transfer.v1.Query","DenomTrace",r).then(e=>t.QueryDenomTraceResponse.decode(new o.BinaryReader(e)))}DenomTraces(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{pagination:n.PageRequest.fromPartial({})},r=t.QueryDenomTracesRequest.encode(e).finish();return this.rpc.request("ibc.applications.transfer.v1.Query","DenomTraces",r).then(e=>t.QueryDenomTracesResponse.decode(new o.BinaryReader(e)))}Params(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.QueryParamsRequest.encode(e).finish();return this.rpc.request("ibc.applications.transfer.v1.Query","Params",r).then(e=>t.QueryParamsResponse.decode(new o.BinaryReader(e)))}DenomHash(e){let r=t.QueryDenomHashRequest.encode(e).finish();return this.rpc.request("ibc.applications.transfer.v1.Query","DenomHash",r).then(e=>t.QueryDenomHashResponse.decode(new o.BinaryReader(e)))}EscrowAddress(e){let r=t.QueryEscrowAddressRequest.encode(e).finish();return this.rpc.request("ibc.applications.transfer.v1.Query","EscrowAddress",r).then(e=>t.QueryEscrowAddressResponse.decode(new o.BinaryReader(e)))}constructor(e){this.rpc=e,this.DenomTrace=this.DenomTrace.bind(this),this.DenomTraces=this.DenomTraces.bind(this),this.Params=this.Params.bind(this),this.DenomHash=this.DenomHash.bind(this),this.EscrowAddress=this.EscrowAddress.bind(this)}}t.QueryClientImpl=y},25879:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Params=t.DenomTrace=t.protobufPackage=void 0;let n=r(46554),i=r(99133);function o(){return{path:"",baseDenom:""}}function a(){return{sendEnabled:!1,receiveEnabled:!1}}t.protobufPackage="ibc.applications.transfer.v1",t.DenomTrace={typeUrl:"/ibc.applications.transfer.v1.DenomTrace",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.BinaryWriter.create();return""!==e.path&&t.uint32(10).string(e.path),""!==e.baseDenom&&t.uint32(18).string(e.baseDenom),t},decode(e,t){let r=e instanceof n.BinaryReader?e:new n.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=o();for(;r.pos>>3){case 1:a.path=r.string();break;case 2:a.baseDenom=r.string();break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=o();return(0,i.isSet)(e.path)&&(t.path=String(e.path)),(0,i.isSet)(e.baseDenom)&&(t.baseDenom=String(e.baseDenom)),t},toJSON(e){let t={};return void 0!==e.path&&(t.path=e.path),void 0!==e.baseDenom&&(t.baseDenom=e.baseDenom),t},fromPartial(e){var t,r;let n=o();return n.path=null!==(t=e.path)&&void 0!==t?t:"",n.baseDenom=null!==(r=e.baseDenom)&&void 0!==r?r:"",n}},t.Params={typeUrl:"/ibc.applications.transfer.v1.Params",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.BinaryWriter.create();return!0===e.sendEnabled&&t.uint32(8).bool(e.sendEnabled),!0===e.receiveEnabled&&t.uint32(16).bool(e.receiveEnabled),t},decode(e,t){let r=e instanceof n.BinaryReader?e:new n.BinaryReader(e),i=void 0===t?r.len:r.pos+t,o=a();for(;r.pos>>3){case 1:o.sendEnabled=r.bool();break;case 2:o.receiveEnabled=r.bool();break;default:r.skipType(7&e)}}return o},fromJSON(e){let t=a();return(0,i.isSet)(e.sendEnabled)&&(t.sendEnabled=!!e.sendEnabled),(0,i.isSet)(e.receiveEnabled)&&(t.receiveEnabled=!!e.receiveEnabled),t},toJSON(e){let t={};return void 0!==e.sendEnabled&&(t.sendEnabled=e.sendEnabled),void 0!==e.receiveEnabled&&(t.receiveEnabled=e.receiveEnabled),t},fromPartial(e){var t,r;let n=a();return n.sendEnabled=null!==(t=e.sendEnabled)&&void 0!==t&&t,n.receiveEnabled=null!==(r=e.receiveEnabled)&&void 0!==r&&r,n}}},7337:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MsgClientImpl=t.MsgTransferResponse=t.MsgTransfer=t.protobufPackage=void 0;let n=r(14841),i=r(23489),o=r(46554),a=r(99133);function s(){return{sourcePort:"",sourceChannel:"",token:n.Coin.fromPartial({}),sender:"",receiver:"",timeoutHeight:i.Height.fromPartial({}),timeoutTimestamp:BigInt(0),memo:""}}function l(){return{sequence:BigInt(0)}}t.protobufPackage="ibc.applications.transfer.v1",t.MsgTransfer={typeUrl:"/ibc.applications.transfer.v1.MsgTransfer",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.sourcePort&&t.uint32(10).string(e.sourcePort),""!==e.sourceChannel&&t.uint32(18).string(e.sourceChannel),void 0!==e.token&&n.Coin.encode(e.token,t.uint32(26).fork()).ldelim(),""!==e.sender&&t.uint32(34).string(e.sender),""!==e.receiver&&t.uint32(42).string(e.receiver),void 0!==e.timeoutHeight&&i.Height.encode(e.timeoutHeight,t.uint32(50).fork()).ldelim(),e.timeoutTimestamp!==BigInt(0)&&t.uint32(56).uint64(e.timeoutTimestamp),""!==e.memo&&t.uint32(66).string(e.memo),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),a=void 0===t?r.len:r.pos+t,l=s();for(;r.pos>>3){case 1:l.sourcePort=r.string();break;case 2:l.sourceChannel=r.string();break;case 3:l.token=n.Coin.decode(r,r.uint32());break;case 4:l.sender=r.string();break;case 5:l.receiver=r.string();break;case 6:l.timeoutHeight=i.Height.decode(r,r.uint32());break;case 7:l.timeoutTimestamp=r.uint64();break;case 8:l.memo=r.string();break;default:r.skipType(7&e)}}return l},fromJSON(e){let t=s();return(0,a.isSet)(e.sourcePort)&&(t.sourcePort=String(e.sourcePort)),(0,a.isSet)(e.sourceChannel)&&(t.sourceChannel=String(e.sourceChannel)),(0,a.isSet)(e.token)&&(t.token=n.Coin.fromJSON(e.token)),(0,a.isSet)(e.sender)&&(t.sender=String(e.sender)),(0,a.isSet)(e.receiver)&&(t.receiver=String(e.receiver)),(0,a.isSet)(e.timeoutHeight)&&(t.timeoutHeight=i.Height.fromJSON(e.timeoutHeight)),(0,a.isSet)(e.timeoutTimestamp)&&(t.timeoutTimestamp=BigInt(e.timeoutTimestamp.toString())),(0,a.isSet)(e.memo)&&(t.memo=String(e.memo)),t},toJSON(e){let t={};return void 0!==e.sourcePort&&(t.sourcePort=e.sourcePort),void 0!==e.sourceChannel&&(t.sourceChannel=e.sourceChannel),void 0!==e.token&&(t.token=e.token?n.Coin.toJSON(e.token):void 0),void 0!==e.sender&&(t.sender=e.sender),void 0!==e.receiver&&(t.receiver=e.receiver),void 0!==e.timeoutHeight&&(t.timeoutHeight=e.timeoutHeight?i.Height.toJSON(e.timeoutHeight):void 0),void 0!==e.timeoutTimestamp&&(t.timeoutTimestamp=(e.timeoutTimestamp||BigInt(0)).toString()),void 0!==e.memo&&(t.memo=e.memo),t},fromPartial(e){var t,r,o,a,l;let u=s();return u.sourcePort=null!==(t=e.sourcePort)&&void 0!==t?t:"",u.sourceChannel=null!==(r=e.sourceChannel)&&void 0!==r?r:"",void 0!==e.token&&null!==e.token&&(u.token=n.Coin.fromPartial(e.token)),u.sender=null!==(o=e.sender)&&void 0!==o?o:"",u.receiver=null!==(a=e.receiver)&&void 0!==a?a:"",void 0!==e.timeoutHeight&&null!==e.timeoutHeight&&(u.timeoutHeight=i.Height.fromPartial(e.timeoutHeight)),void 0!==e.timeoutTimestamp&&null!==e.timeoutTimestamp&&(u.timeoutTimestamp=BigInt(e.timeoutTimestamp.toString())),u.memo=null!==(l=e.memo)&&void 0!==l?l:"",u}},t.MsgTransferResponse={typeUrl:"/ibc.applications.transfer.v1.MsgTransferResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return e.sequence!==BigInt(0)&&t.uint32(8).uint64(e.sequence),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=l();for(;r.pos>>3==1?i.sequence=r.uint64():r.skipType(7&e)}return i},fromJSON(e){let t=l();return(0,a.isSet)(e.sequence)&&(t.sequence=BigInt(e.sequence.toString())),t},toJSON(e){let t={};return void 0!==e.sequence&&(t.sequence=(e.sequence||BigInt(0)).toString()),t},fromPartial(e){let t=l();return void 0!==e.sequence&&null!==e.sequence&&(t.sequence=BigInt(e.sequence.toString())),t}};class u{Transfer(e){let r=t.MsgTransfer.encode(e).finish();return this.rpc.request("ibc.applications.transfer.v1.Msg","Transfer",r).then(e=>t.MsgTransferResponse.decode(new o.BinaryReader(e)))}constructor(e){this.rpc=e,this.Transfer=this.Transfer.bind(this)}}t.MsgClientImpl=u},83639:function(e,t,r){"use strict";var n,i;Object.defineProperty(t,"__esModule",{value:!0}),t.Acknowledgement=t.PacketId=t.PacketState=t.Packet=t.Counterparty=t.IdentifiedChannel=t.Channel=t.orderToJSON=t.orderFromJSON=t.Order=t.stateToJSON=t.stateFromJSON=t.State=t.protobufPackage=void 0;let o=r(23489),a=r(46554),s=r(99133);function l(e){switch(e){case 0:case"STATE_UNINITIALIZED_UNSPECIFIED":return n.STATE_UNINITIALIZED_UNSPECIFIED;case 1:case"STATE_INIT":return n.STATE_INIT;case 2:case"STATE_TRYOPEN":return n.STATE_TRYOPEN;case 3:case"STATE_OPEN":return n.STATE_OPEN;case 4:case"STATE_CLOSED":return n.STATE_CLOSED;default:return n.UNRECOGNIZED}}function u(e){switch(e){case n.STATE_UNINITIALIZED_UNSPECIFIED:return"STATE_UNINITIALIZED_UNSPECIFIED";case n.STATE_INIT:return"STATE_INIT";case n.STATE_TRYOPEN:return"STATE_TRYOPEN";case n.STATE_OPEN:return"STATE_OPEN";case n.STATE_CLOSED:return"STATE_CLOSED";case n.UNRECOGNIZED:default:return"UNRECOGNIZED"}}function d(e){switch(e){case 0:case"ORDER_NONE_UNSPECIFIED":return i.ORDER_NONE_UNSPECIFIED;case 1:case"ORDER_UNORDERED":return i.ORDER_UNORDERED;case 2:case"ORDER_ORDERED":return i.ORDER_ORDERED;default:return i.UNRECOGNIZED}}function c(e){switch(e){case i.ORDER_NONE_UNSPECIFIED:return"ORDER_NONE_UNSPECIFIED";case i.ORDER_UNORDERED:return"ORDER_UNORDERED";case i.ORDER_ORDERED:return"ORDER_ORDERED";case i.UNRECOGNIZED:default:return"UNRECOGNIZED"}}function p(){return{state:0,ordering:0,counterparty:t.Counterparty.fromPartial({}),connectionHops:[],version:""}}function f(){return{state:0,ordering:0,counterparty:t.Counterparty.fromPartial({}),connectionHops:[],version:"",portId:"",channelId:""}}function h(){return{portId:"",channelId:""}}function g(){return{sequence:BigInt(0),sourcePort:"",sourceChannel:"",destinationPort:"",destinationChannel:"",data:new Uint8Array,timeoutHeight:o.Height.fromPartial({}),timeoutTimestamp:BigInt(0)}}function m(){return{portId:"",channelId:"",sequence:BigInt(0),data:new Uint8Array}}function y(){return{portId:"",channelId:"",sequence:BigInt(0)}}function v(){return{result:void 0,error:void 0}}t.protobufPackage="ibc.core.channel.v1",function(e){e[e.STATE_UNINITIALIZED_UNSPECIFIED=0]="STATE_UNINITIALIZED_UNSPECIFIED",e[e.STATE_INIT=1]="STATE_INIT",e[e.STATE_TRYOPEN=2]="STATE_TRYOPEN",e[e.STATE_OPEN=3]="STATE_OPEN",e[e.STATE_CLOSED=4]="STATE_CLOSED",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(n||(t.State=n={})),t.stateFromJSON=l,t.stateToJSON=u,function(e){e[e.ORDER_NONE_UNSPECIFIED=0]="ORDER_NONE_UNSPECIFIED",e[e.ORDER_UNORDERED=1]="ORDER_UNORDERED",e[e.ORDER_ORDERED=2]="ORDER_ORDERED",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(i||(t.Order=i={})),t.orderFromJSON=d,t.orderToJSON=c,t.Channel={typeUrl:"/ibc.core.channel.v1.Channel",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();for(let n of(0!==e.state&&r.uint32(8).int32(e.state),0!==e.ordering&&r.uint32(16).int32(e.ordering),void 0!==e.counterparty&&t.Counterparty.encode(e.counterparty,r.uint32(26).fork()).ldelim(),e.connectionHops))r.uint32(34).string(n);return""!==e.version&&r.uint32(42).string(e.version),r},decode(e,r){let n=e instanceof a.BinaryReader?e:new a.BinaryReader(e),i=void 0===r?n.len:n.pos+r,o=p();for(;n.pos>>3){case 1:o.state=n.int32();break;case 2:o.ordering=n.int32();break;case 3:o.counterparty=t.Counterparty.decode(n,n.uint32());break;case 4:o.connectionHops.push(n.string());break;case 5:o.version=n.string();break;default:n.skipType(7&e)}}return o},fromJSON(e){let r=p();return(0,s.isSet)(e.state)&&(r.state=l(e.state)),(0,s.isSet)(e.ordering)&&(r.ordering=d(e.ordering)),(0,s.isSet)(e.counterparty)&&(r.counterparty=t.Counterparty.fromJSON(e.counterparty)),Array.isArray(null==e?void 0:e.connectionHops)&&(r.connectionHops=e.connectionHops.map(e=>String(e))),(0,s.isSet)(e.version)&&(r.version=String(e.version)),r},toJSON(e){let r={};return void 0!==e.state&&(r.state=u(e.state)),void 0!==e.ordering&&(r.ordering=c(e.ordering)),void 0!==e.counterparty&&(r.counterparty=e.counterparty?t.Counterparty.toJSON(e.counterparty):void 0),e.connectionHops?r.connectionHops=e.connectionHops.map(e=>e):r.connectionHops=[],void 0!==e.version&&(r.version=e.version),r},fromPartial(e){var r,n,i,o;let a=p();return a.state=null!==(n=e.state)&&void 0!==n?n:0,a.ordering=null!==(i=e.ordering)&&void 0!==i?i:0,void 0!==e.counterparty&&null!==e.counterparty&&(a.counterparty=t.Counterparty.fromPartial(e.counterparty)),a.connectionHops=(null===(r=e.connectionHops)||void 0===r?void 0:r.map(e=>e))||[],a.version=null!==(o=e.version)&&void 0!==o?o:"",a}},t.IdentifiedChannel={typeUrl:"/ibc.core.channel.v1.IdentifiedChannel",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();for(let n of(0!==e.state&&r.uint32(8).int32(e.state),0!==e.ordering&&r.uint32(16).int32(e.ordering),void 0!==e.counterparty&&t.Counterparty.encode(e.counterparty,r.uint32(26).fork()).ldelim(),e.connectionHops))r.uint32(34).string(n);return""!==e.version&&r.uint32(42).string(e.version),""!==e.portId&&r.uint32(50).string(e.portId),""!==e.channelId&&r.uint32(58).string(e.channelId),r},decode(e,r){let n=e instanceof a.BinaryReader?e:new a.BinaryReader(e),i=void 0===r?n.len:n.pos+r,o=f();for(;n.pos>>3){case 1:o.state=n.int32();break;case 2:o.ordering=n.int32();break;case 3:o.counterparty=t.Counterparty.decode(n,n.uint32());break;case 4:o.connectionHops.push(n.string());break;case 5:o.version=n.string();break;case 6:o.portId=n.string();break;case 7:o.channelId=n.string();break;default:n.skipType(7&e)}}return o},fromJSON(e){let r=f();return(0,s.isSet)(e.state)&&(r.state=l(e.state)),(0,s.isSet)(e.ordering)&&(r.ordering=d(e.ordering)),(0,s.isSet)(e.counterparty)&&(r.counterparty=t.Counterparty.fromJSON(e.counterparty)),Array.isArray(null==e?void 0:e.connectionHops)&&(r.connectionHops=e.connectionHops.map(e=>String(e))),(0,s.isSet)(e.version)&&(r.version=String(e.version)),(0,s.isSet)(e.portId)&&(r.portId=String(e.portId)),(0,s.isSet)(e.channelId)&&(r.channelId=String(e.channelId)),r},toJSON(e){let r={};return void 0!==e.state&&(r.state=u(e.state)),void 0!==e.ordering&&(r.ordering=c(e.ordering)),void 0!==e.counterparty&&(r.counterparty=e.counterparty?t.Counterparty.toJSON(e.counterparty):void 0),e.connectionHops?r.connectionHops=e.connectionHops.map(e=>e):r.connectionHops=[],void 0!==e.version&&(r.version=e.version),void 0!==e.portId&&(r.portId=e.portId),void 0!==e.channelId&&(r.channelId=e.channelId),r},fromPartial(e){var r,n,i,o,a,s;let l=f();return l.state=null!==(n=e.state)&&void 0!==n?n:0,l.ordering=null!==(i=e.ordering)&&void 0!==i?i:0,void 0!==e.counterparty&&null!==e.counterparty&&(l.counterparty=t.Counterparty.fromPartial(e.counterparty)),l.connectionHops=(null===(r=e.connectionHops)||void 0===r?void 0:r.map(e=>e))||[],l.version=null!==(o=e.version)&&void 0!==o?o:"",l.portId=null!==(a=e.portId)&&void 0!==a?a:"",l.channelId=null!==(s=e.channelId)&&void 0!==s?s:"",l}},t.Counterparty={typeUrl:"/ibc.core.channel.v1.Counterparty",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.portId&&t.uint32(10).string(e.portId),""!==e.channelId&&t.uint32(18).string(e.channelId),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=h();for(;r.pos>>3){case 1:i.portId=r.string();break;case 2:i.channelId=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=h();return(0,s.isSet)(e.portId)&&(t.portId=String(e.portId)),(0,s.isSet)(e.channelId)&&(t.channelId=String(e.channelId)),t},toJSON(e){let t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.channelId&&(t.channelId=e.channelId),t},fromPartial(e){var t,r;let n=h();return n.portId=null!==(t=e.portId)&&void 0!==t?t:"",n.channelId=null!==(r=e.channelId)&&void 0!==r?r:"",n}},t.Packet={typeUrl:"/ibc.core.channel.v1.Packet",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return e.sequence!==BigInt(0)&&t.uint32(8).uint64(e.sequence),""!==e.sourcePort&&t.uint32(18).string(e.sourcePort),""!==e.sourceChannel&&t.uint32(26).string(e.sourceChannel),""!==e.destinationPort&&t.uint32(34).string(e.destinationPort),""!==e.destinationChannel&&t.uint32(42).string(e.destinationChannel),0!==e.data.length&&t.uint32(50).bytes(e.data),void 0!==e.timeoutHeight&&o.Height.encode(e.timeoutHeight,t.uint32(58).fork()).ldelim(),e.timeoutTimestamp!==BigInt(0)&&t.uint32(64).uint64(e.timeoutTimestamp),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=g();for(;r.pos>>3){case 1:i.sequence=r.uint64();break;case 2:i.sourcePort=r.string();break;case 3:i.sourceChannel=r.string();break;case 4:i.destinationPort=r.string();break;case 5:i.destinationChannel=r.string();break;case 6:i.data=r.bytes();break;case 7:i.timeoutHeight=o.Height.decode(r,r.uint32());break;case 8:i.timeoutTimestamp=r.uint64();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=g();return(0,s.isSet)(e.sequence)&&(t.sequence=BigInt(e.sequence.toString())),(0,s.isSet)(e.sourcePort)&&(t.sourcePort=String(e.sourcePort)),(0,s.isSet)(e.sourceChannel)&&(t.sourceChannel=String(e.sourceChannel)),(0,s.isSet)(e.destinationPort)&&(t.destinationPort=String(e.destinationPort)),(0,s.isSet)(e.destinationChannel)&&(t.destinationChannel=String(e.destinationChannel)),(0,s.isSet)(e.data)&&(t.data=(0,s.bytesFromBase64)(e.data)),(0,s.isSet)(e.timeoutHeight)&&(t.timeoutHeight=o.Height.fromJSON(e.timeoutHeight)),(0,s.isSet)(e.timeoutTimestamp)&&(t.timeoutTimestamp=BigInt(e.timeoutTimestamp.toString())),t},toJSON(e){let t={};return void 0!==e.sequence&&(t.sequence=(e.sequence||BigInt(0)).toString()),void 0!==e.sourcePort&&(t.sourcePort=e.sourcePort),void 0!==e.sourceChannel&&(t.sourceChannel=e.sourceChannel),void 0!==e.destinationPort&&(t.destinationPort=e.destinationPort),void 0!==e.destinationChannel&&(t.destinationChannel=e.destinationChannel),void 0!==e.data&&(t.data=(0,s.base64FromBytes)(void 0!==e.data?e.data:new Uint8Array)),void 0!==e.timeoutHeight&&(t.timeoutHeight=e.timeoutHeight?o.Height.toJSON(e.timeoutHeight):void 0),void 0!==e.timeoutTimestamp&&(t.timeoutTimestamp=(e.timeoutTimestamp||BigInt(0)).toString()),t},fromPartial(e){var t,r,n,i,a;let s=g();return void 0!==e.sequence&&null!==e.sequence&&(s.sequence=BigInt(e.sequence.toString())),s.sourcePort=null!==(t=e.sourcePort)&&void 0!==t?t:"",s.sourceChannel=null!==(r=e.sourceChannel)&&void 0!==r?r:"",s.destinationPort=null!==(n=e.destinationPort)&&void 0!==n?n:"",s.destinationChannel=null!==(i=e.destinationChannel)&&void 0!==i?i:"",s.data=null!==(a=e.data)&&void 0!==a?a:new Uint8Array,void 0!==e.timeoutHeight&&null!==e.timeoutHeight&&(s.timeoutHeight=o.Height.fromPartial(e.timeoutHeight)),void 0!==e.timeoutTimestamp&&null!==e.timeoutTimestamp&&(s.timeoutTimestamp=BigInt(e.timeoutTimestamp.toString())),s}},t.PacketState={typeUrl:"/ibc.core.channel.v1.PacketState",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.portId&&t.uint32(10).string(e.portId),""!==e.channelId&&t.uint32(18).string(e.channelId),e.sequence!==BigInt(0)&&t.uint32(24).uint64(e.sequence),0!==e.data.length&&t.uint32(34).bytes(e.data),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=m();for(;r.pos>>3){case 1:i.portId=r.string();break;case 2:i.channelId=r.string();break;case 3:i.sequence=r.uint64();break;case 4:i.data=r.bytes();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=m();return(0,s.isSet)(e.portId)&&(t.portId=String(e.portId)),(0,s.isSet)(e.channelId)&&(t.channelId=String(e.channelId)),(0,s.isSet)(e.sequence)&&(t.sequence=BigInt(e.sequence.toString())),(0,s.isSet)(e.data)&&(t.data=(0,s.bytesFromBase64)(e.data)),t},toJSON(e){let t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.channelId&&(t.channelId=e.channelId),void 0!==e.sequence&&(t.sequence=(e.sequence||BigInt(0)).toString()),void 0!==e.data&&(t.data=(0,s.base64FromBytes)(void 0!==e.data?e.data:new Uint8Array)),t},fromPartial(e){var t,r,n;let i=m();return i.portId=null!==(t=e.portId)&&void 0!==t?t:"",i.channelId=null!==(r=e.channelId)&&void 0!==r?r:"",void 0!==e.sequence&&null!==e.sequence&&(i.sequence=BigInt(e.sequence.toString())),i.data=null!==(n=e.data)&&void 0!==n?n:new Uint8Array,i}},t.PacketId={typeUrl:"/ibc.core.channel.v1.PacketId",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.portId&&t.uint32(10).string(e.portId),""!==e.channelId&&t.uint32(18).string(e.channelId),e.sequence!==BigInt(0)&&t.uint32(24).uint64(e.sequence),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=y();for(;r.pos>>3){case 1:i.portId=r.string();break;case 2:i.channelId=r.string();break;case 3:i.sequence=r.uint64();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=y();return(0,s.isSet)(e.portId)&&(t.portId=String(e.portId)),(0,s.isSet)(e.channelId)&&(t.channelId=String(e.channelId)),(0,s.isSet)(e.sequence)&&(t.sequence=BigInt(e.sequence.toString())),t},toJSON(e){let t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.channelId&&(t.channelId=e.channelId),void 0!==e.sequence&&(t.sequence=(e.sequence||BigInt(0)).toString()),t},fromPartial(e){var t,r;let n=y();return n.portId=null!==(t=e.portId)&&void 0!==t?t:"",n.channelId=null!==(r=e.channelId)&&void 0!==r?r:"",void 0!==e.sequence&&null!==e.sequence&&(n.sequence=BigInt(e.sequence.toString())),n}},t.Acknowledgement={typeUrl:"/ibc.core.channel.v1.Acknowledgement",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return void 0!==e.result&&t.uint32(170).bytes(e.result),void 0!==e.error&&t.uint32(178).string(e.error),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=v();for(;r.pos>>3){case 21:i.result=r.bytes();break;case 22:i.error=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=v();return(0,s.isSet)(e.result)&&(t.result=(0,s.bytesFromBase64)(e.result)),(0,s.isSet)(e.error)&&(t.error=String(e.error)),t},toJSON(e){let t={};return void 0!==e.result&&(t.result=void 0!==e.result?(0,s.base64FromBytes)(e.result):void 0),void 0!==e.error&&(t.error=e.error),t},fromPartial(e){var t,r;let n=v();return n.result=null!==(t=e.result)&&void 0!==t?t:void 0,n.error=null!==(r=e.error)&&void 0!==r?r:void 0,n}}},50846:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QueryClientImpl=t.QueryNextSequenceReceiveResponse=t.QueryNextSequenceReceiveRequest=t.QueryUnreceivedAcksResponse=t.QueryUnreceivedAcksRequest=t.QueryUnreceivedPacketsResponse=t.QueryUnreceivedPacketsRequest=t.QueryPacketAcknowledgementsResponse=t.QueryPacketAcknowledgementsRequest=t.QueryPacketAcknowledgementResponse=t.QueryPacketAcknowledgementRequest=t.QueryPacketReceiptResponse=t.QueryPacketReceiptRequest=t.QueryPacketCommitmentsResponse=t.QueryPacketCommitmentsRequest=t.QueryPacketCommitmentResponse=t.QueryPacketCommitmentRequest=t.QueryChannelConsensusStateResponse=t.QueryChannelConsensusStateRequest=t.QueryChannelClientStateResponse=t.QueryChannelClientStateRequest=t.QueryConnectionChannelsResponse=t.QueryConnectionChannelsRequest=t.QueryChannelsResponse=t.QueryChannelsRequest=t.QueryChannelResponse=t.QueryChannelRequest=t.protobufPackage=void 0;let n=r(86141),i=r(83639),o=r(23489),a=r(11879),s=r(46554),l=r(99133);function u(){return{portId:"",channelId:""}}function d(){return{channel:void 0,proof:new Uint8Array,proofHeight:o.Height.fromPartial({})}}function c(){return{pagination:void 0}}function p(){return{channels:[],pagination:void 0,height:o.Height.fromPartial({})}}function f(){return{connection:"",pagination:void 0}}function h(){return{channels:[],pagination:void 0,height:o.Height.fromPartial({})}}function g(){return{portId:"",channelId:""}}function m(){return{identifiedClientState:void 0,proof:new Uint8Array,proofHeight:o.Height.fromPartial({})}}function y(){return{portId:"",channelId:"",revisionNumber:BigInt(0),revisionHeight:BigInt(0)}}function v(){return{consensusState:void 0,clientId:"",proof:new Uint8Array,proofHeight:o.Height.fromPartial({})}}function b(){return{portId:"",channelId:"",sequence:BigInt(0)}}function S(){return{commitment:new Uint8Array,proof:new Uint8Array,proofHeight:o.Height.fromPartial({})}}function w(){return{portId:"",channelId:"",pagination:void 0}}function _(){return{commitments:[],pagination:void 0,height:o.Height.fromPartial({})}}function k(){return{portId:"",channelId:"",sequence:BigInt(0)}}function O(){return{received:!1,proof:new Uint8Array,proofHeight:o.Height.fromPartial({})}}function P(){return{portId:"",channelId:"",sequence:BigInt(0)}}function A(){return{acknowledgement:new Uint8Array,proof:new Uint8Array,proofHeight:o.Height.fromPartial({})}}function I(){return{portId:"",channelId:"",pagination:void 0,packetCommitmentSequences:[]}}function R(){return{acknowledgements:[],pagination:void 0,height:o.Height.fromPartial({})}}function E(){return{portId:"",channelId:"",packetCommitmentSequences:[]}}function T(){return{sequences:[],height:o.Height.fromPartial({})}}function N(){return{portId:"",channelId:"",packetAckSequences:[]}}function x(){return{sequences:[],height:o.Height.fromPartial({})}}function B(){return{portId:"",channelId:""}}function C(){return{nextSequenceReceive:BigInt(0),proof:new Uint8Array,proofHeight:o.Height.fromPartial({})}}t.protobufPackage="ibc.core.channel.v1",t.QueryChannelRequest={typeUrl:"/ibc.core.channel.v1.QueryChannelRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return""!==e.portId&&t.uint32(10).string(e.portId),""!==e.channelId&&t.uint32(18).string(e.channelId),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=u();for(;r.pos>>3){case 1:i.portId=r.string();break;case 2:i.channelId=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=u();return(0,l.isSet)(e.portId)&&(t.portId=String(e.portId)),(0,l.isSet)(e.channelId)&&(t.channelId=String(e.channelId)),t},toJSON(e){let t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.channelId&&(t.channelId=e.channelId),t},fromPartial(e){var t,r;let n=u();return n.portId=null!==(t=e.portId)&&void 0!==t?t:"",n.channelId=null!==(r=e.channelId)&&void 0!==r?r:"",n}},t.QueryChannelResponse={typeUrl:"/ibc.core.channel.v1.QueryChannelResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return void 0!==e.channel&&i.Channel.encode(e.channel,t.uint32(10).fork()).ldelim(),0!==e.proof.length&&t.uint32(18).bytes(e.proof),void 0!==e.proofHeight&&o.Height.encode(e.proofHeight,t.uint32(26).fork()).ldelim(),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,a=d();for(;r.pos>>3){case 1:a.channel=i.Channel.decode(r,r.uint32());break;case 2:a.proof=r.bytes();break;case 3:a.proofHeight=o.Height.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=d();return(0,l.isSet)(e.channel)&&(t.channel=i.Channel.fromJSON(e.channel)),(0,l.isSet)(e.proof)&&(t.proof=(0,l.bytesFromBase64)(e.proof)),(0,l.isSet)(e.proofHeight)&&(t.proofHeight=o.Height.fromJSON(e.proofHeight)),t},toJSON(e){let t={};return void 0!==e.channel&&(t.channel=e.channel?i.Channel.toJSON(e.channel):void 0),void 0!==e.proof&&(t.proof=(0,l.base64FromBytes)(void 0!==e.proof?e.proof:new Uint8Array)),void 0!==e.proofHeight&&(t.proofHeight=e.proofHeight?o.Height.toJSON(e.proofHeight):void 0),t},fromPartial(e){var t;let r=d();return void 0!==e.channel&&null!==e.channel&&(r.channel=i.Channel.fromPartial(e.channel)),r.proof=null!==(t=e.proof)&&void 0!==t?t:new Uint8Array,void 0!==e.proofHeight&&null!==e.proofHeight&&(r.proofHeight=o.Height.fromPartial(e.proofHeight)),r}},t.QueryChannelsRequest={typeUrl:"/ibc.core.channel.v1.QueryChannelsRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return void 0!==e.pagination&&n.PageRequest.encode(e.pagination,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),i=void 0===t?r.len:r.pos+t,o=c();for(;r.pos>>3==1?o.pagination=n.PageRequest.decode(r,r.uint32()):r.skipType(7&e)}return o},fromJSON(e){let t=c();return(0,l.isSet)(e.pagination)&&(t.pagination=n.PageRequest.fromJSON(e.pagination)),t},toJSON(e){let t={};return void 0!==e.pagination&&(t.pagination=e.pagination?n.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){let t=c();return void 0!==e.pagination&&null!==e.pagination&&(t.pagination=n.PageRequest.fromPartial(e.pagination)),t}},t.QueryChannelsResponse={typeUrl:"/ibc.core.channel.v1.QueryChannelsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();for(let r of e.channels)i.IdentifiedChannel.encode(r,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&n.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),void 0!==e.height&&o.Height.encode(e.height,t.uint32(26).fork()).ldelim(),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),a=void 0===t?r.len:r.pos+t,l=p();for(;r.pos>>3){case 1:l.channels.push(i.IdentifiedChannel.decode(r,r.uint32()));break;case 2:l.pagination=n.PageResponse.decode(r,r.uint32());break;case 3:l.height=o.Height.decode(r,r.uint32());break;default:r.skipType(7&e)}}return l},fromJSON(e){let t=p();return Array.isArray(null==e?void 0:e.channels)&&(t.channels=e.channels.map(e=>i.IdentifiedChannel.fromJSON(e))),(0,l.isSet)(e.pagination)&&(t.pagination=n.PageResponse.fromJSON(e.pagination)),(0,l.isSet)(e.height)&&(t.height=o.Height.fromJSON(e.height)),t},toJSON(e){let t={};return e.channels?t.channels=e.channels.map(e=>e?i.IdentifiedChannel.toJSON(e):void 0):t.channels=[],void 0!==e.pagination&&(t.pagination=e.pagination?n.PageResponse.toJSON(e.pagination):void 0),void 0!==e.height&&(t.height=e.height?o.Height.toJSON(e.height):void 0),t},fromPartial(e){var t;let r=p();return r.channels=(null===(t=e.channels)||void 0===t?void 0:t.map(e=>i.IdentifiedChannel.fromPartial(e)))||[],void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageResponse.fromPartial(e.pagination)),void 0!==e.height&&null!==e.height&&(r.height=o.Height.fromPartial(e.height)),r}},t.QueryConnectionChannelsRequest={typeUrl:"/ibc.core.channel.v1.QueryConnectionChannelsRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return""!==e.connection&&t.uint32(10).string(e.connection),void 0!==e.pagination&&n.PageRequest.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),i=void 0===t?r.len:r.pos+t,o=f();for(;r.pos>>3){case 1:o.connection=r.string();break;case 2:o.pagination=n.PageRequest.decode(r,r.uint32());break;default:r.skipType(7&e)}}return o},fromJSON(e){let t=f();return(0,l.isSet)(e.connection)&&(t.connection=String(e.connection)),(0,l.isSet)(e.pagination)&&(t.pagination=n.PageRequest.fromJSON(e.pagination)),t},toJSON(e){let t={};return void 0!==e.connection&&(t.connection=e.connection),void 0!==e.pagination&&(t.pagination=e.pagination?n.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=f();return r.connection=null!==(t=e.connection)&&void 0!==t?t:"",void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageRequest.fromPartial(e.pagination)),r}},t.QueryConnectionChannelsResponse={typeUrl:"/ibc.core.channel.v1.QueryConnectionChannelsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();for(let r of e.channels)i.IdentifiedChannel.encode(r,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&n.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),void 0!==e.height&&o.Height.encode(e.height,t.uint32(26).fork()).ldelim(),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),a=void 0===t?r.len:r.pos+t,l=h();for(;r.pos>>3){case 1:l.channels.push(i.IdentifiedChannel.decode(r,r.uint32()));break;case 2:l.pagination=n.PageResponse.decode(r,r.uint32());break;case 3:l.height=o.Height.decode(r,r.uint32());break;default:r.skipType(7&e)}}return l},fromJSON(e){let t=h();return Array.isArray(null==e?void 0:e.channels)&&(t.channels=e.channels.map(e=>i.IdentifiedChannel.fromJSON(e))),(0,l.isSet)(e.pagination)&&(t.pagination=n.PageResponse.fromJSON(e.pagination)),(0,l.isSet)(e.height)&&(t.height=o.Height.fromJSON(e.height)),t},toJSON(e){let t={};return e.channels?t.channels=e.channels.map(e=>e?i.IdentifiedChannel.toJSON(e):void 0):t.channels=[],void 0!==e.pagination&&(t.pagination=e.pagination?n.PageResponse.toJSON(e.pagination):void 0),void 0!==e.height&&(t.height=e.height?o.Height.toJSON(e.height):void 0),t},fromPartial(e){var t;let r=h();return r.channels=(null===(t=e.channels)||void 0===t?void 0:t.map(e=>i.IdentifiedChannel.fromPartial(e)))||[],void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageResponse.fromPartial(e.pagination)),void 0!==e.height&&null!==e.height&&(r.height=o.Height.fromPartial(e.height)),r}},t.QueryChannelClientStateRequest={typeUrl:"/ibc.core.channel.v1.QueryChannelClientStateRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return""!==e.portId&&t.uint32(10).string(e.portId),""!==e.channelId&&t.uint32(18).string(e.channelId),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=g();for(;r.pos>>3){case 1:i.portId=r.string();break;case 2:i.channelId=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=g();return(0,l.isSet)(e.portId)&&(t.portId=String(e.portId)),(0,l.isSet)(e.channelId)&&(t.channelId=String(e.channelId)),t},toJSON(e){let t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.channelId&&(t.channelId=e.channelId),t},fromPartial(e){var t,r;let n=g();return n.portId=null!==(t=e.portId)&&void 0!==t?t:"",n.channelId=null!==(r=e.channelId)&&void 0!==r?r:"",n}},t.QueryChannelClientStateResponse={typeUrl:"/ibc.core.channel.v1.QueryChannelClientStateResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return void 0!==e.identifiedClientState&&o.IdentifiedClientState.encode(e.identifiedClientState,t.uint32(10).fork()).ldelim(),0!==e.proof.length&&t.uint32(18).bytes(e.proof),void 0!==e.proofHeight&&o.Height.encode(e.proofHeight,t.uint32(26).fork()).ldelim(),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=m();for(;r.pos>>3){case 1:i.identifiedClientState=o.IdentifiedClientState.decode(r,r.uint32());break;case 2:i.proof=r.bytes();break;case 3:i.proofHeight=o.Height.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=m();return(0,l.isSet)(e.identifiedClientState)&&(t.identifiedClientState=o.IdentifiedClientState.fromJSON(e.identifiedClientState)),(0,l.isSet)(e.proof)&&(t.proof=(0,l.bytesFromBase64)(e.proof)),(0,l.isSet)(e.proofHeight)&&(t.proofHeight=o.Height.fromJSON(e.proofHeight)),t},toJSON(e){let t={};return void 0!==e.identifiedClientState&&(t.identifiedClientState=e.identifiedClientState?o.IdentifiedClientState.toJSON(e.identifiedClientState):void 0),void 0!==e.proof&&(t.proof=(0,l.base64FromBytes)(void 0!==e.proof?e.proof:new Uint8Array)),void 0!==e.proofHeight&&(t.proofHeight=e.proofHeight?o.Height.toJSON(e.proofHeight):void 0),t},fromPartial(e){var t;let r=m();return void 0!==e.identifiedClientState&&null!==e.identifiedClientState&&(r.identifiedClientState=o.IdentifiedClientState.fromPartial(e.identifiedClientState)),r.proof=null!==(t=e.proof)&&void 0!==t?t:new Uint8Array,void 0!==e.proofHeight&&null!==e.proofHeight&&(r.proofHeight=o.Height.fromPartial(e.proofHeight)),r}},t.QueryChannelConsensusStateRequest={typeUrl:"/ibc.core.channel.v1.QueryChannelConsensusStateRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return""!==e.portId&&t.uint32(10).string(e.portId),""!==e.channelId&&t.uint32(18).string(e.channelId),e.revisionNumber!==BigInt(0)&&t.uint32(24).uint64(e.revisionNumber),e.revisionHeight!==BigInt(0)&&t.uint32(32).uint64(e.revisionHeight),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=y();for(;r.pos>>3){case 1:i.portId=r.string();break;case 2:i.channelId=r.string();break;case 3:i.revisionNumber=r.uint64();break;case 4:i.revisionHeight=r.uint64();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=y();return(0,l.isSet)(e.portId)&&(t.portId=String(e.portId)),(0,l.isSet)(e.channelId)&&(t.channelId=String(e.channelId)),(0,l.isSet)(e.revisionNumber)&&(t.revisionNumber=BigInt(e.revisionNumber.toString())),(0,l.isSet)(e.revisionHeight)&&(t.revisionHeight=BigInt(e.revisionHeight.toString())),t},toJSON(e){let t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.channelId&&(t.channelId=e.channelId),void 0!==e.revisionNumber&&(t.revisionNumber=(e.revisionNumber||BigInt(0)).toString()),void 0!==e.revisionHeight&&(t.revisionHeight=(e.revisionHeight||BigInt(0)).toString()),t},fromPartial(e){var t,r;let n=y();return n.portId=null!==(t=e.portId)&&void 0!==t?t:"",n.channelId=null!==(r=e.channelId)&&void 0!==r?r:"",void 0!==e.revisionNumber&&null!==e.revisionNumber&&(n.revisionNumber=BigInt(e.revisionNumber.toString())),void 0!==e.revisionHeight&&null!==e.revisionHeight&&(n.revisionHeight=BigInt(e.revisionHeight.toString())),n}},t.QueryChannelConsensusStateResponse={typeUrl:"/ibc.core.channel.v1.QueryChannelConsensusStateResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return void 0!==e.consensusState&&a.Any.encode(e.consensusState,t.uint32(10).fork()).ldelim(),""!==e.clientId&&t.uint32(18).string(e.clientId),0!==e.proof.length&&t.uint32(26).bytes(e.proof),void 0!==e.proofHeight&&o.Height.encode(e.proofHeight,t.uint32(34).fork()).ldelim(),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=v();for(;r.pos>>3){case 1:i.consensusState=a.Any.decode(r,r.uint32());break;case 2:i.clientId=r.string();break;case 3:i.proof=r.bytes();break;case 4:i.proofHeight=o.Height.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=v();return(0,l.isSet)(e.consensusState)&&(t.consensusState=a.Any.fromJSON(e.consensusState)),(0,l.isSet)(e.clientId)&&(t.clientId=String(e.clientId)),(0,l.isSet)(e.proof)&&(t.proof=(0,l.bytesFromBase64)(e.proof)),(0,l.isSet)(e.proofHeight)&&(t.proofHeight=o.Height.fromJSON(e.proofHeight)),t},toJSON(e){let t={};return void 0!==e.consensusState&&(t.consensusState=e.consensusState?a.Any.toJSON(e.consensusState):void 0),void 0!==e.clientId&&(t.clientId=e.clientId),void 0!==e.proof&&(t.proof=(0,l.base64FromBytes)(void 0!==e.proof?e.proof:new Uint8Array)),void 0!==e.proofHeight&&(t.proofHeight=e.proofHeight?o.Height.toJSON(e.proofHeight):void 0),t},fromPartial(e){var t,r;let n=v();return void 0!==e.consensusState&&null!==e.consensusState&&(n.consensusState=a.Any.fromPartial(e.consensusState)),n.clientId=null!==(t=e.clientId)&&void 0!==t?t:"",n.proof=null!==(r=e.proof)&&void 0!==r?r:new Uint8Array,void 0!==e.proofHeight&&null!==e.proofHeight&&(n.proofHeight=o.Height.fromPartial(e.proofHeight)),n}},t.QueryPacketCommitmentRequest={typeUrl:"/ibc.core.channel.v1.QueryPacketCommitmentRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return""!==e.portId&&t.uint32(10).string(e.portId),""!==e.channelId&&t.uint32(18).string(e.channelId),e.sequence!==BigInt(0)&&t.uint32(24).uint64(e.sequence),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=b();for(;r.pos>>3){case 1:i.portId=r.string();break;case 2:i.channelId=r.string();break;case 3:i.sequence=r.uint64();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=b();return(0,l.isSet)(e.portId)&&(t.portId=String(e.portId)),(0,l.isSet)(e.channelId)&&(t.channelId=String(e.channelId)),(0,l.isSet)(e.sequence)&&(t.sequence=BigInt(e.sequence.toString())),t},toJSON(e){let t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.channelId&&(t.channelId=e.channelId),void 0!==e.sequence&&(t.sequence=(e.sequence||BigInt(0)).toString()),t},fromPartial(e){var t,r;let n=b();return n.portId=null!==(t=e.portId)&&void 0!==t?t:"",n.channelId=null!==(r=e.channelId)&&void 0!==r?r:"",void 0!==e.sequence&&null!==e.sequence&&(n.sequence=BigInt(e.sequence.toString())),n}},t.QueryPacketCommitmentResponse={typeUrl:"/ibc.core.channel.v1.QueryPacketCommitmentResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return 0!==e.commitment.length&&t.uint32(10).bytes(e.commitment),0!==e.proof.length&&t.uint32(18).bytes(e.proof),void 0!==e.proofHeight&&o.Height.encode(e.proofHeight,t.uint32(26).fork()).ldelim(),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=S();for(;r.pos>>3){case 1:i.commitment=r.bytes();break;case 2:i.proof=r.bytes();break;case 3:i.proofHeight=o.Height.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=S();return(0,l.isSet)(e.commitment)&&(t.commitment=(0,l.bytesFromBase64)(e.commitment)),(0,l.isSet)(e.proof)&&(t.proof=(0,l.bytesFromBase64)(e.proof)),(0,l.isSet)(e.proofHeight)&&(t.proofHeight=o.Height.fromJSON(e.proofHeight)),t},toJSON(e){let t={};return void 0!==e.commitment&&(t.commitment=(0,l.base64FromBytes)(void 0!==e.commitment?e.commitment:new Uint8Array)),void 0!==e.proof&&(t.proof=(0,l.base64FromBytes)(void 0!==e.proof?e.proof:new Uint8Array)),void 0!==e.proofHeight&&(t.proofHeight=e.proofHeight?o.Height.toJSON(e.proofHeight):void 0),t},fromPartial(e){var t,r;let n=S();return n.commitment=null!==(t=e.commitment)&&void 0!==t?t:new Uint8Array,n.proof=null!==(r=e.proof)&&void 0!==r?r:new Uint8Array,void 0!==e.proofHeight&&null!==e.proofHeight&&(n.proofHeight=o.Height.fromPartial(e.proofHeight)),n}},t.QueryPacketCommitmentsRequest={typeUrl:"/ibc.core.channel.v1.QueryPacketCommitmentsRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return""!==e.portId&&t.uint32(10).string(e.portId),""!==e.channelId&&t.uint32(18).string(e.channelId),void 0!==e.pagination&&n.PageRequest.encode(e.pagination,t.uint32(26).fork()).ldelim(),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),i=void 0===t?r.len:r.pos+t,o=w();for(;r.pos>>3){case 1:o.portId=r.string();break;case 2:o.channelId=r.string();break;case 3:o.pagination=n.PageRequest.decode(r,r.uint32());break;default:r.skipType(7&e)}}return o},fromJSON(e){let t=w();return(0,l.isSet)(e.portId)&&(t.portId=String(e.portId)),(0,l.isSet)(e.channelId)&&(t.channelId=String(e.channelId)),(0,l.isSet)(e.pagination)&&(t.pagination=n.PageRequest.fromJSON(e.pagination)),t},toJSON(e){let t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.channelId&&(t.channelId=e.channelId),void 0!==e.pagination&&(t.pagination=e.pagination?n.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){var t,r;let i=w();return i.portId=null!==(t=e.portId)&&void 0!==t?t:"",i.channelId=null!==(r=e.channelId)&&void 0!==r?r:"",void 0!==e.pagination&&null!==e.pagination&&(i.pagination=n.PageRequest.fromPartial(e.pagination)),i}},t.QueryPacketCommitmentsResponse={typeUrl:"/ibc.core.channel.v1.QueryPacketCommitmentsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();for(let r of e.commitments)i.PacketState.encode(r,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&n.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),void 0!==e.height&&o.Height.encode(e.height,t.uint32(26).fork()).ldelim(),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),a=void 0===t?r.len:r.pos+t,l=_();for(;r.pos>>3){case 1:l.commitments.push(i.PacketState.decode(r,r.uint32()));break;case 2:l.pagination=n.PageResponse.decode(r,r.uint32());break;case 3:l.height=o.Height.decode(r,r.uint32());break;default:r.skipType(7&e)}}return l},fromJSON(e){let t=_();return Array.isArray(null==e?void 0:e.commitments)&&(t.commitments=e.commitments.map(e=>i.PacketState.fromJSON(e))),(0,l.isSet)(e.pagination)&&(t.pagination=n.PageResponse.fromJSON(e.pagination)),(0,l.isSet)(e.height)&&(t.height=o.Height.fromJSON(e.height)),t},toJSON(e){let t={};return e.commitments?t.commitments=e.commitments.map(e=>e?i.PacketState.toJSON(e):void 0):t.commitments=[],void 0!==e.pagination&&(t.pagination=e.pagination?n.PageResponse.toJSON(e.pagination):void 0),void 0!==e.height&&(t.height=e.height?o.Height.toJSON(e.height):void 0),t},fromPartial(e){var t;let r=_();return r.commitments=(null===(t=e.commitments)||void 0===t?void 0:t.map(e=>i.PacketState.fromPartial(e)))||[],void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageResponse.fromPartial(e.pagination)),void 0!==e.height&&null!==e.height&&(r.height=o.Height.fromPartial(e.height)),r}},t.QueryPacketReceiptRequest={typeUrl:"/ibc.core.channel.v1.QueryPacketReceiptRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return""!==e.portId&&t.uint32(10).string(e.portId),""!==e.channelId&&t.uint32(18).string(e.channelId),e.sequence!==BigInt(0)&&t.uint32(24).uint64(e.sequence),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=k();for(;r.pos>>3){case 1:i.portId=r.string();break;case 2:i.channelId=r.string();break;case 3:i.sequence=r.uint64();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=k();return(0,l.isSet)(e.portId)&&(t.portId=String(e.portId)),(0,l.isSet)(e.channelId)&&(t.channelId=String(e.channelId)),(0,l.isSet)(e.sequence)&&(t.sequence=BigInt(e.sequence.toString())),t},toJSON(e){let t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.channelId&&(t.channelId=e.channelId),void 0!==e.sequence&&(t.sequence=(e.sequence||BigInt(0)).toString()),t},fromPartial(e){var t,r;let n=k();return n.portId=null!==(t=e.portId)&&void 0!==t?t:"",n.channelId=null!==(r=e.channelId)&&void 0!==r?r:"",void 0!==e.sequence&&null!==e.sequence&&(n.sequence=BigInt(e.sequence.toString())),n}},t.QueryPacketReceiptResponse={typeUrl:"/ibc.core.channel.v1.QueryPacketReceiptResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return!0===e.received&&t.uint32(16).bool(e.received),0!==e.proof.length&&t.uint32(26).bytes(e.proof),void 0!==e.proofHeight&&o.Height.encode(e.proofHeight,t.uint32(34).fork()).ldelim(),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=O();for(;r.pos>>3){case 2:i.received=r.bool();break;case 3:i.proof=r.bytes();break;case 4:i.proofHeight=o.Height.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=O();return(0,l.isSet)(e.received)&&(t.received=!!e.received),(0,l.isSet)(e.proof)&&(t.proof=(0,l.bytesFromBase64)(e.proof)),(0,l.isSet)(e.proofHeight)&&(t.proofHeight=o.Height.fromJSON(e.proofHeight)),t},toJSON(e){let t={};return void 0!==e.received&&(t.received=e.received),void 0!==e.proof&&(t.proof=(0,l.base64FromBytes)(void 0!==e.proof?e.proof:new Uint8Array)),void 0!==e.proofHeight&&(t.proofHeight=e.proofHeight?o.Height.toJSON(e.proofHeight):void 0),t},fromPartial(e){var t,r;let n=O();return n.received=null!==(t=e.received)&&void 0!==t&&t,n.proof=null!==(r=e.proof)&&void 0!==r?r:new Uint8Array,void 0!==e.proofHeight&&null!==e.proofHeight&&(n.proofHeight=o.Height.fromPartial(e.proofHeight)),n}},t.QueryPacketAcknowledgementRequest={typeUrl:"/ibc.core.channel.v1.QueryPacketAcknowledgementRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return""!==e.portId&&t.uint32(10).string(e.portId),""!==e.channelId&&t.uint32(18).string(e.channelId),e.sequence!==BigInt(0)&&t.uint32(24).uint64(e.sequence),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=P();for(;r.pos>>3){case 1:i.portId=r.string();break;case 2:i.channelId=r.string();break;case 3:i.sequence=r.uint64();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=P();return(0,l.isSet)(e.portId)&&(t.portId=String(e.portId)),(0,l.isSet)(e.channelId)&&(t.channelId=String(e.channelId)),(0,l.isSet)(e.sequence)&&(t.sequence=BigInt(e.sequence.toString())),t},toJSON(e){let t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.channelId&&(t.channelId=e.channelId),void 0!==e.sequence&&(t.sequence=(e.sequence||BigInt(0)).toString()),t},fromPartial(e){var t,r;let n=P();return n.portId=null!==(t=e.portId)&&void 0!==t?t:"",n.channelId=null!==(r=e.channelId)&&void 0!==r?r:"",void 0!==e.sequence&&null!==e.sequence&&(n.sequence=BigInt(e.sequence.toString())),n}},t.QueryPacketAcknowledgementResponse={typeUrl:"/ibc.core.channel.v1.QueryPacketAcknowledgementResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return 0!==e.acknowledgement.length&&t.uint32(10).bytes(e.acknowledgement),0!==e.proof.length&&t.uint32(18).bytes(e.proof),void 0!==e.proofHeight&&o.Height.encode(e.proofHeight,t.uint32(26).fork()).ldelim(),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=A();for(;r.pos>>3){case 1:i.acknowledgement=r.bytes();break;case 2:i.proof=r.bytes();break;case 3:i.proofHeight=o.Height.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=A();return(0,l.isSet)(e.acknowledgement)&&(t.acknowledgement=(0,l.bytesFromBase64)(e.acknowledgement)),(0,l.isSet)(e.proof)&&(t.proof=(0,l.bytesFromBase64)(e.proof)),(0,l.isSet)(e.proofHeight)&&(t.proofHeight=o.Height.fromJSON(e.proofHeight)),t},toJSON(e){let t={};return void 0!==e.acknowledgement&&(t.acknowledgement=(0,l.base64FromBytes)(void 0!==e.acknowledgement?e.acknowledgement:new Uint8Array)),void 0!==e.proof&&(t.proof=(0,l.base64FromBytes)(void 0!==e.proof?e.proof:new Uint8Array)),void 0!==e.proofHeight&&(t.proofHeight=e.proofHeight?o.Height.toJSON(e.proofHeight):void 0),t},fromPartial(e){var t,r;let n=A();return n.acknowledgement=null!==(t=e.acknowledgement)&&void 0!==t?t:new Uint8Array,n.proof=null!==(r=e.proof)&&void 0!==r?r:new Uint8Array,void 0!==e.proofHeight&&null!==e.proofHeight&&(n.proofHeight=o.Height.fromPartial(e.proofHeight)),n}},t.QueryPacketAcknowledgementsRequest={typeUrl:"/ibc.core.channel.v1.QueryPacketAcknowledgementsRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();for(let r of(""!==e.portId&&t.uint32(10).string(e.portId),""!==e.channelId&&t.uint32(18).string(e.channelId),void 0!==e.pagination&&n.PageRequest.encode(e.pagination,t.uint32(26).fork()).ldelim(),t.uint32(34).fork(),e.packetCommitmentSequences))t.uint64(r);return t.ldelim(),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),i=void 0===t?r.len:r.pos+t,o=I();for(;r.pos>>3){case 1:o.portId=r.string();break;case 2:o.channelId=r.string();break;case 3:o.pagination=n.PageRequest.decode(r,r.uint32());break;case 4:if((7&e)==2){let e=r.uint32()+r.pos;for(;r.posBigInt(e.toString()))),t},toJSON(e){let t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.channelId&&(t.channelId=e.channelId),void 0!==e.pagination&&(t.pagination=e.pagination?n.PageRequest.toJSON(e.pagination):void 0),e.packetCommitmentSequences?t.packetCommitmentSequences=e.packetCommitmentSequences.map(e=>(e||BigInt(0)).toString()):t.packetCommitmentSequences=[],t},fromPartial(e){var t,r,i;let o=I();return o.portId=null!==(r=e.portId)&&void 0!==r?r:"",o.channelId=null!==(i=e.channelId)&&void 0!==i?i:"",void 0!==e.pagination&&null!==e.pagination&&(o.pagination=n.PageRequest.fromPartial(e.pagination)),o.packetCommitmentSequences=(null===(t=e.packetCommitmentSequences)||void 0===t?void 0:t.map(e=>BigInt(e.toString())))||[],o}},t.QueryPacketAcknowledgementsResponse={typeUrl:"/ibc.core.channel.v1.QueryPacketAcknowledgementsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();for(let r of e.acknowledgements)i.PacketState.encode(r,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&n.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),void 0!==e.height&&o.Height.encode(e.height,t.uint32(26).fork()).ldelim(),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),a=void 0===t?r.len:r.pos+t,l=R();for(;r.pos>>3){case 1:l.acknowledgements.push(i.PacketState.decode(r,r.uint32()));break;case 2:l.pagination=n.PageResponse.decode(r,r.uint32());break;case 3:l.height=o.Height.decode(r,r.uint32());break;default:r.skipType(7&e)}}return l},fromJSON(e){let t=R();return Array.isArray(null==e?void 0:e.acknowledgements)&&(t.acknowledgements=e.acknowledgements.map(e=>i.PacketState.fromJSON(e))),(0,l.isSet)(e.pagination)&&(t.pagination=n.PageResponse.fromJSON(e.pagination)),(0,l.isSet)(e.height)&&(t.height=o.Height.fromJSON(e.height)),t},toJSON(e){let t={};return e.acknowledgements?t.acknowledgements=e.acknowledgements.map(e=>e?i.PacketState.toJSON(e):void 0):t.acknowledgements=[],void 0!==e.pagination&&(t.pagination=e.pagination?n.PageResponse.toJSON(e.pagination):void 0),void 0!==e.height&&(t.height=e.height?o.Height.toJSON(e.height):void 0),t},fromPartial(e){var t;let r=R();return r.acknowledgements=(null===(t=e.acknowledgements)||void 0===t?void 0:t.map(e=>i.PacketState.fromPartial(e)))||[],void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageResponse.fromPartial(e.pagination)),void 0!==e.height&&null!==e.height&&(r.height=o.Height.fromPartial(e.height)),r}},t.QueryUnreceivedPacketsRequest={typeUrl:"/ibc.core.channel.v1.QueryUnreceivedPacketsRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();for(let r of(""!==e.portId&&t.uint32(10).string(e.portId),""!==e.channelId&&t.uint32(18).string(e.channelId),t.uint32(26).fork(),e.packetCommitmentSequences))t.uint64(r);return t.ldelim(),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=E();for(;r.pos>>3){case 1:i.portId=r.string();break;case 2:i.channelId=r.string();break;case 3:if((7&e)==2){let e=r.uint32()+r.pos;for(;r.posBigInt(e.toString()))),t},toJSON(e){let t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.channelId&&(t.channelId=e.channelId),e.packetCommitmentSequences?t.packetCommitmentSequences=e.packetCommitmentSequences.map(e=>(e||BigInt(0)).toString()):t.packetCommitmentSequences=[],t},fromPartial(e){var t,r,n;let i=E();return i.portId=null!==(r=e.portId)&&void 0!==r?r:"",i.channelId=null!==(n=e.channelId)&&void 0!==n?n:"",i.packetCommitmentSequences=(null===(t=e.packetCommitmentSequences)||void 0===t?void 0:t.map(e=>BigInt(e.toString())))||[],i}},t.QueryUnreceivedPacketsResponse={typeUrl:"/ibc.core.channel.v1.QueryUnreceivedPacketsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();for(let r of(t.uint32(10).fork(),e.sequences))t.uint64(r);return t.ldelim(),void 0!==e.height&&o.Height.encode(e.height,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=T();for(;r.pos>>3){case 1:if((7&e)==2){let e=r.uint32()+r.pos;for(;r.posBigInt(e.toString()))),(0,l.isSet)(e.height)&&(t.height=o.Height.fromJSON(e.height)),t},toJSON(e){let t={};return e.sequences?t.sequences=e.sequences.map(e=>(e||BigInt(0)).toString()):t.sequences=[],void 0!==e.height&&(t.height=e.height?o.Height.toJSON(e.height):void 0),t},fromPartial(e){var t;let r=T();return r.sequences=(null===(t=e.sequences)||void 0===t?void 0:t.map(e=>BigInt(e.toString())))||[],void 0!==e.height&&null!==e.height&&(r.height=o.Height.fromPartial(e.height)),r}},t.QueryUnreceivedAcksRequest={typeUrl:"/ibc.core.channel.v1.QueryUnreceivedAcksRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();for(let r of(""!==e.portId&&t.uint32(10).string(e.portId),""!==e.channelId&&t.uint32(18).string(e.channelId),t.uint32(26).fork(),e.packetAckSequences))t.uint64(r);return t.ldelim(),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=N();for(;r.pos>>3){case 1:i.portId=r.string();break;case 2:i.channelId=r.string();break;case 3:if((7&e)==2){let e=r.uint32()+r.pos;for(;r.posBigInt(e.toString()))),t},toJSON(e){let t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.channelId&&(t.channelId=e.channelId),e.packetAckSequences?t.packetAckSequences=e.packetAckSequences.map(e=>(e||BigInt(0)).toString()):t.packetAckSequences=[],t},fromPartial(e){var t,r,n;let i=N();return i.portId=null!==(r=e.portId)&&void 0!==r?r:"",i.channelId=null!==(n=e.channelId)&&void 0!==n?n:"",i.packetAckSequences=(null===(t=e.packetAckSequences)||void 0===t?void 0:t.map(e=>BigInt(e.toString())))||[],i}},t.QueryUnreceivedAcksResponse={typeUrl:"/ibc.core.channel.v1.QueryUnreceivedAcksResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();for(let r of(t.uint32(10).fork(),e.sequences))t.uint64(r);return t.ldelim(),void 0!==e.height&&o.Height.encode(e.height,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=x();for(;r.pos>>3){case 1:if((7&e)==2){let e=r.uint32()+r.pos;for(;r.posBigInt(e.toString()))),(0,l.isSet)(e.height)&&(t.height=o.Height.fromJSON(e.height)),t},toJSON(e){let t={};return e.sequences?t.sequences=e.sequences.map(e=>(e||BigInt(0)).toString()):t.sequences=[],void 0!==e.height&&(t.height=e.height?o.Height.toJSON(e.height):void 0),t},fromPartial(e){var t;let r=x();return r.sequences=(null===(t=e.sequences)||void 0===t?void 0:t.map(e=>BigInt(e.toString())))||[],void 0!==e.height&&null!==e.height&&(r.height=o.Height.fromPartial(e.height)),r}},t.QueryNextSequenceReceiveRequest={typeUrl:"/ibc.core.channel.v1.QueryNextSequenceReceiveRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return""!==e.portId&&t.uint32(10).string(e.portId),""!==e.channelId&&t.uint32(18).string(e.channelId),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=B();for(;r.pos>>3){case 1:i.portId=r.string();break;case 2:i.channelId=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=B();return(0,l.isSet)(e.portId)&&(t.portId=String(e.portId)),(0,l.isSet)(e.channelId)&&(t.channelId=String(e.channelId)),t},toJSON(e){let t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.channelId&&(t.channelId=e.channelId),t},fromPartial(e){var t,r;let n=B();return n.portId=null!==(t=e.portId)&&void 0!==t?t:"",n.channelId=null!==(r=e.channelId)&&void 0!==r?r:"",n}},t.QueryNextSequenceReceiveResponse={typeUrl:"/ibc.core.channel.v1.QueryNextSequenceReceiveResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return e.nextSequenceReceive!==BigInt(0)&&t.uint32(8).uint64(e.nextSequenceReceive),0!==e.proof.length&&t.uint32(18).bytes(e.proof),void 0!==e.proofHeight&&o.Height.encode(e.proofHeight,t.uint32(26).fork()).ldelim(),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=C();for(;r.pos>>3){case 1:i.nextSequenceReceive=r.uint64();break;case 2:i.proof=r.bytes();break;case 3:i.proofHeight=o.Height.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=C();return(0,l.isSet)(e.nextSequenceReceive)&&(t.nextSequenceReceive=BigInt(e.nextSequenceReceive.toString())),(0,l.isSet)(e.proof)&&(t.proof=(0,l.bytesFromBase64)(e.proof)),(0,l.isSet)(e.proofHeight)&&(t.proofHeight=o.Height.fromJSON(e.proofHeight)),t},toJSON(e){let t={};return void 0!==e.nextSequenceReceive&&(t.nextSequenceReceive=(e.nextSequenceReceive||BigInt(0)).toString()),void 0!==e.proof&&(t.proof=(0,l.base64FromBytes)(void 0!==e.proof?e.proof:new Uint8Array)),void 0!==e.proofHeight&&(t.proofHeight=e.proofHeight?o.Height.toJSON(e.proofHeight):void 0),t},fromPartial(e){var t;let r=C();return void 0!==e.nextSequenceReceive&&null!==e.nextSequenceReceive&&(r.nextSequenceReceive=BigInt(e.nextSequenceReceive.toString())),r.proof=null!==(t=e.proof)&&void 0!==t?t:new Uint8Array,void 0!==e.proofHeight&&null!==e.proofHeight&&(r.proofHeight=o.Height.fromPartial(e.proofHeight)),r}};class M{Channel(e){let r=t.QueryChannelRequest.encode(e).finish();return this.rpc.request("ibc.core.channel.v1.Query","Channel",r).then(e=>t.QueryChannelResponse.decode(new s.BinaryReader(e)))}Channels(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{pagination:n.PageRequest.fromPartial({})},r=t.QueryChannelsRequest.encode(e).finish();return this.rpc.request("ibc.core.channel.v1.Query","Channels",r).then(e=>t.QueryChannelsResponse.decode(new s.BinaryReader(e)))}ConnectionChannels(e){let r=t.QueryConnectionChannelsRequest.encode(e).finish();return this.rpc.request("ibc.core.channel.v1.Query","ConnectionChannels",r).then(e=>t.QueryConnectionChannelsResponse.decode(new s.BinaryReader(e)))}ChannelClientState(e){let r=t.QueryChannelClientStateRequest.encode(e).finish();return this.rpc.request("ibc.core.channel.v1.Query","ChannelClientState",r).then(e=>t.QueryChannelClientStateResponse.decode(new s.BinaryReader(e)))}ChannelConsensusState(e){let r=t.QueryChannelConsensusStateRequest.encode(e).finish();return this.rpc.request("ibc.core.channel.v1.Query","ChannelConsensusState",r).then(e=>t.QueryChannelConsensusStateResponse.decode(new s.BinaryReader(e)))}PacketCommitment(e){let r=t.QueryPacketCommitmentRequest.encode(e).finish();return this.rpc.request("ibc.core.channel.v1.Query","PacketCommitment",r).then(e=>t.QueryPacketCommitmentResponse.decode(new s.BinaryReader(e)))}PacketCommitments(e){let r=t.QueryPacketCommitmentsRequest.encode(e).finish();return this.rpc.request("ibc.core.channel.v1.Query","PacketCommitments",r).then(e=>t.QueryPacketCommitmentsResponse.decode(new s.BinaryReader(e)))}PacketReceipt(e){let r=t.QueryPacketReceiptRequest.encode(e).finish();return this.rpc.request("ibc.core.channel.v1.Query","PacketReceipt",r).then(e=>t.QueryPacketReceiptResponse.decode(new s.BinaryReader(e)))}PacketAcknowledgement(e){let r=t.QueryPacketAcknowledgementRequest.encode(e).finish();return this.rpc.request("ibc.core.channel.v1.Query","PacketAcknowledgement",r).then(e=>t.QueryPacketAcknowledgementResponse.decode(new s.BinaryReader(e)))}PacketAcknowledgements(e){let r=t.QueryPacketAcknowledgementsRequest.encode(e).finish();return this.rpc.request("ibc.core.channel.v1.Query","PacketAcknowledgements",r).then(e=>t.QueryPacketAcknowledgementsResponse.decode(new s.BinaryReader(e)))}UnreceivedPackets(e){let r=t.QueryUnreceivedPacketsRequest.encode(e).finish();return this.rpc.request("ibc.core.channel.v1.Query","UnreceivedPackets",r).then(e=>t.QueryUnreceivedPacketsResponse.decode(new s.BinaryReader(e)))}UnreceivedAcks(e){let r=t.QueryUnreceivedAcksRequest.encode(e).finish();return this.rpc.request("ibc.core.channel.v1.Query","UnreceivedAcks",r).then(e=>t.QueryUnreceivedAcksResponse.decode(new s.BinaryReader(e)))}NextSequenceReceive(e){let r=t.QueryNextSequenceReceiveRequest.encode(e).finish();return this.rpc.request("ibc.core.channel.v1.Query","NextSequenceReceive",r).then(e=>t.QueryNextSequenceReceiveResponse.decode(new s.BinaryReader(e)))}constructor(e){this.rpc=e,this.Channel=this.Channel.bind(this),this.Channels=this.Channels.bind(this),this.ConnectionChannels=this.ConnectionChannels.bind(this),this.ChannelClientState=this.ChannelClientState.bind(this),this.ChannelConsensusState=this.ChannelConsensusState.bind(this),this.PacketCommitment=this.PacketCommitment.bind(this),this.PacketCommitments=this.PacketCommitments.bind(this),this.PacketReceipt=this.PacketReceipt.bind(this),this.PacketAcknowledgement=this.PacketAcknowledgement.bind(this),this.PacketAcknowledgements=this.PacketAcknowledgements.bind(this),this.UnreceivedPackets=this.UnreceivedPackets.bind(this),this.UnreceivedAcks=this.UnreceivedAcks.bind(this),this.NextSequenceReceive=this.NextSequenceReceive.bind(this)}}t.QueryClientImpl=M},52230:function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.MsgClientImpl=t.MsgAcknowledgementResponse=t.MsgAcknowledgement=t.MsgTimeoutOnCloseResponse=t.MsgTimeoutOnClose=t.MsgTimeoutResponse=t.MsgTimeout=t.MsgRecvPacketResponse=t.MsgRecvPacket=t.MsgChannelCloseConfirmResponse=t.MsgChannelCloseConfirm=t.MsgChannelCloseInitResponse=t.MsgChannelCloseInit=t.MsgChannelOpenConfirmResponse=t.MsgChannelOpenConfirm=t.MsgChannelOpenAckResponse=t.MsgChannelOpenAck=t.MsgChannelOpenTryResponse=t.MsgChannelOpenTry=t.MsgChannelOpenInitResponse=t.MsgChannelOpenInit=t.responseResultTypeToJSON=t.responseResultTypeFromJSON=t.ResponseResultType=t.protobufPackage=void 0;let i=r(83639),o=r(23489),a=r(46554),s=r(99133);function l(e){switch(e){case 0:case"RESPONSE_RESULT_TYPE_UNSPECIFIED":return n.RESPONSE_RESULT_TYPE_UNSPECIFIED;case 1:case"RESPONSE_RESULT_TYPE_NOOP":return n.RESPONSE_RESULT_TYPE_NOOP;case 2:case"RESPONSE_RESULT_TYPE_SUCCESS":return n.RESPONSE_RESULT_TYPE_SUCCESS;default:return n.UNRECOGNIZED}}function u(e){switch(e){case n.RESPONSE_RESULT_TYPE_UNSPECIFIED:return"RESPONSE_RESULT_TYPE_UNSPECIFIED";case n.RESPONSE_RESULT_TYPE_NOOP:return"RESPONSE_RESULT_TYPE_NOOP";case n.RESPONSE_RESULT_TYPE_SUCCESS:return"RESPONSE_RESULT_TYPE_SUCCESS";case n.UNRECOGNIZED:default:return"UNRECOGNIZED"}}function d(){return{portId:"",channel:i.Channel.fromPartial({}),signer:""}}function c(){return{channelId:"",version:""}}function p(){return{portId:"",previousChannelId:"",channel:i.Channel.fromPartial({}),counterpartyVersion:"",proofInit:new Uint8Array,proofHeight:o.Height.fromPartial({}),signer:""}}function f(){return{version:""}}function h(){return{portId:"",channelId:"",counterpartyChannelId:"",counterpartyVersion:"",proofTry:new Uint8Array,proofHeight:o.Height.fromPartial({}),signer:""}}function g(){return{}}function m(){return{portId:"",channelId:"",proofAck:new Uint8Array,proofHeight:o.Height.fromPartial({}),signer:""}}function y(){return{}}function v(){return{portId:"",channelId:"",signer:""}}function b(){return{}}function S(){return{portId:"",channelId:"",proofInit:new Uint8Array,proofHeight:o.Height.fromPartial({}),signer:""}}function w(){return{}}function _(){return{packet:i.Packet.fromPartial({}),proofCommitment:new Uint8Array,proofHeight:o.Height.fromPartial({}),signer:""}}function k(){return{result:0}}function O(){return{packet:i.Packet.fromPartial({}),proofUnreceived:new Uint8Array,proofHeight:o.Height.fromPartial({}),nextSequenceRecv:BigInt(0),signer:""}}function P(){return{result:0}}function A(){return{packet:i.Packet.fromPartial({}),proofUnreceived:new Uint8Array,proofClose:new Uint8Array,proofHeight:o.Height.fromPartial({}),nextSequenceRecv:BigInt(0),signer:""}}function I(){return{result:0}}function R(){return{packet:i.Packet.fromPartial({}),acknowledgement:new Uint8Array,proofAcked:new Uint8Array,proofHeight:o.Height.fromPartial({}),signer:""}}function E(){return{result:0}}t.protobufPackage="ibc.core.channel.v1",function(e){e[e.RESPONSE_RESULT_TYPE_UNSPECIFIED=0]="RESPONSE_RESULT_TYPE_UNSPECIFIED",e[e.RESPONSE_RESULT_TYPE_NOOP=1]="RESPONSE_RESULT_TYPE_NOOP",e[e.RESPONSE_RESULT_TYPE_SUCCESS=2]="RESPONSE_RESULT_TYPE_SUCCESS",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(n||(t.ResponseResultType=n={})),t.responseResultTypeFromJSON=l,t.responseResultTypeToJSON=u,t.MsgChannelOpenInit={typeUrl:"/ibc.core.channel.v1.MsgChannelOpenInit",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.portId&&t.uint32(10).string(e.portId),void 0!==e.channel&&i.Channel.encode(e.channel,t.uint32(18).fork()).ldelim(),""!==e.signer&&t.uint32(26).string(e.signer),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=d();for(;r.pos>>3){case 1:o.portId=r.string();break;case 2:o.channel=i.Channel.decode(r,r.uint32());break;case 3:o.signer=r.string();break;default:r.skipType(7&e)}}return o},fromJSON(e){let t=d();return(0,s.isSet)(e.portId)&&(t.portId=String(e.portId)),(0,s.isSet)(e.channel)&&(t.channel=i.Channel.fromJSON(e.channel)),(0,s.isSet)(e.signer)&&(t.signer=String(e.signer)),t},toJSON(e){let t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.channel&&(t.channel=e.channel?i.Channel.toJSON(e.channel):void 0),void 0!==e.signer&&(t.signer=e.signer),t},fromPartial(e){var t,r;let n=d();return n.portId=null!==(t=e.portId)&&void 0!==t?t:"",void 0!==e.channel&&null!==e.channel&&(n.channel=i.Channel.fromPartial(e.channel)),n.signer=null!==(r=e.signer)&&void 0!==r?r:"",n}},t.MsgChannelOpenInitResponse={typeUrl:"/ibc.core.channel.v1.MsgChannelOpenInitResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.channelId&&t.uint32(10).string(e.channelId),""!==e.version&&t.uint32(18).string(e.version),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=c();for(;r.pos>>3){case 1:i.channelId=r.string();break;case 2:i.version=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=c();return(0,s.isSet)(e.channelId)&&(t.channelId=String(e.channelId)),(0,s.isSet)(e.version)&&(t.version=String(e.version)),t},toJSON(e){let t={};return void 0!==e.channelId&&(t.channelId=e.channelId),void 0!==e.version&&(t.version=e.version),t},fromPartial(e){var t,r;let n=c();return n.channelId=null!==(t=e.channelId)&&void 0!==t?t:"",n.version=null!==(r=e.version)&&void 0!==r?r:"",n}},t.MsgChannelOpenTry={typeUrl:"/ibc.core.channel.v1.MsgChannelOpenTry",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.portId&&t.uint32(10).string(e.portId),""!==e.previousChannelId&&t.uint32(18).string(e.previousChannelId),void 0!==e.channel&&i.Channel.encode(e.channel,t.uint32(26).fork()).ldelim(),""!==e.counterpartyVersion&&t.uint32(34).string(e.counterpartyVersion),0!==e.proofInit.length&&t.uint32(42).bytes(e.proofInit),void 0!==e.proofHeight&&o.Height.encode(e.proofHeight,t.uint32(50).fork()).ldelim(),""!==e.signer&&t.uint32(58).string(e.signer),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,s=p();for(;r.pos>>3){case 1:s.portId=r.string();break;case 2:s.previousChannelId=r.string();break;case 3:s.channel=i.Channel.decode(r,r.uint32());break;case 4:s.counterpartyVersion=r.string();break;case 5:s.proofInit=r.bytes();break;case 6:s.proofHeight=o.Height.decode(r,r.uint32());break;case 7:s.signer=r.string();break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=p();return(0,s.isSet)(e.portId)&&(t.portId=String(e.portId)),(0,s.isSet)(e.previousChannelId)&&(t.previousChannelId=String(e.previousChannelId)),(0,s.isSet)(e.channel)&&(t.channel=i.Channel.fromJSON(e.channel)),(0,s.isSet)(e.counterpartyVersion)&&(t.counterpartyVersion=String(e.counterpartyVersion)),(0,s.isSet)(e.proofInit)&&(t.proofInit=(0,s.bytesFromBase64)(e.proofInit)),(0,s.isSet)(e.proofHeight)&&(t.proofHeight=o.Height.fromJSON(e.proofHeight)),(0,s.isSet)(e.signer)&&(t.signer=String(e.signer)),t},toJSON(e){let t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.previousChannelId&&(t.previousChannelId=e.previousChannelId),void 0!==e.channel&&(t.channel=e.channel?i.Channel.toJSON(e.channel):void 0),void 0!==e.counterpartyVersion&&(t.counterpartyVersion=e.counterpartyVersion),void 0!==e.proofInit&&(t.proofInit=(0,s.base64FromBytes)(void 0!==e.proofInit?e.proofInit:new Uint8Array)),void 0!==e.proofHeight&&(t.proofHeight=e.proofHeight?o.Height.toJSON(e.proofHeight):void 0),void 0!==e.signer&&(t.signer=e.signer),t},fromPartial(e){var t,r,n,a,s;let l=p();return l.portId=null!==(t=e.portId)&&void 0!==t?t:"",l.previousChannelId=null!==(r=e.previousChannelId)&&void 0!==r?r:"",void 0!==e.channel&&null!==e.channel&&(l.channel=i.Channel.fromPartial(e.channel)),l.counterpartyVersion=null!==(n=e.counterpartyVersion)&&void 0!==n?n:"",l.proofInit=null!==(a=e.proofInit)&&void 0!==a?a:new Uint8Array,void 0!==e.proofHeight&&null!==e.proofHeight&&(l.proofHeight=o.Height.fromPartial(e.proofHeight)),l.signer=null!==(s=e.signer)&&void 0!==s?s:"",l}},t.MsgChannelOpenTryResponse={typeUrl:"/ibc.core.channel.v1.MsgChannelOpenTryResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.version&&t.uint32(10).string(e.version),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=f();for(;r.pos>>3==1?i.version=r.string():r.skipType(7&e)}return i},fromJSON(e){let t=f();return(0,s.isSet)(e.version)&&(t.version=String(e.version)),t},toJSON(e){let t={};return void 0!==e.version&&(t.version=e.version),t},fromPartial(e){var t;let r=f();return r.version=null!==(t=e.version)&&void 0!==t?t:"",r}},t.MsgChannelOpenAck={typeUrl:"/ibc.core.channel.v1.MsgChannelOpenAck",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.portId&&t.uint32(10).string(e.portId),""!==e.channelId&&t.uint32(18).string(e.channelId),""!==e.counterpartyChannelId&&t.uint32(26).string(e.counterpartyChannelId),""!==e.counterpartyVersion&&t.uint32(34).string(e.counterpartyVersion),0!==e.proofTry.length&&t.uint32(42).bytes(e.proofTry),void 0!==e.proofHeight&&o.Height.encode(e.proofHeight,t.uint32(50).fork()).ldelim(),""!==e.signer&&t.uint32(58).string(e.signer),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=h();for(;r.pos>>3){case 1:i.portId=r.string();break;case 2:i.channelId=r.string();break;case 3:i.counterpartyChannelId=r.string();break;case 4:i.counterpartyVersion=r.string();break;case 5:i.proofTry=r.bytes();break;case 6:i.proofHeight=o.Height.decode(r,r.uint32());break;case 7:i.signer=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=h();return(0,s.isSet)(e.portId)&&(t.portId=String(e.portId)),(0,s.isSet)(e.channelId)&&(t.channelId=String(e.channelId)),(0,s.isSet)(e.counterpartyChannelId)&&(t.counterpartyChannelId=String(e.counterpartyChannelId)),(0,s.isSet)(e.counterpartyVersion)&&(t.counterpartyVersion=String(e.counterpartyVersion)),(0,s.isSet)(e.proofTry)&&(t.proofTry=(0,s.bytesFromBase64)(e.proofTry)),(0,s.isSet)(e.proofHeight)&&(t.proofHeight=o.Height.fromJSON(e.proofHeight)),(0,s.isSet)(e.signer)&&(t.signer=String(e.signer)),t},toJSON(e){let t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.channelId&&(t.channelId=e.channelId),void 0!==e.counterpartyChannelId&&(t.counterpartyChannelId=e.counterpartyChannelId),void 0!==e.counterpartyVersion&&(t.counterpartyVersion=e.counterpartyVersion),void 0!==e.proofTry&&(t.proofTry=(0,s.base64FromBytes)(void 0!==e.proofTry?e.proofTry:new Uint8Array)),void 0!==e.proofHeight&&(t.proofHeight=e.proofHeight?o.Height.toJSON(e.proofHeight):void 0),void 0!==e.signer&&(t.signer=e.signer),t},fromPartial(e){var t,r,n,i,a,s;let l=h();return l.portId=null!==(t=e.portId)&&void 0!==t?t:"",l.channelId=null!==(r=e.channelId)&&void 0!==r?r:"",l.counterpartyChannelId=null!==(n=e.counterpartyChannelId)&&void 0!==n?n:"",l.counterpartyVersion=null!==(i=e.counterpartyVersion)&&void 0!==i?i:"",l.proofTry=null!==(a=e.proofTry)&&void 0!==a?a:new Uint8Array,void 0!==e.proofHeight&&null!==e.proofHeight&&(l.proofHeight=o.Height.fromPartial(e.proofHeight)),l.signer=null!==(s=e.signer)&&void 0!==s?s:"",l}},t.MsgChannelOpenAckResponse={typeUrl:"/ibc.core.channel.v1.MsgChannelOpenAckResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=g();for(;r.posg(),toJSON:e=>({}),fromPartial:e=>g()},t.MsgChannelOpenConfirm={typeUrl:"/ibc.core.channel.v1.MsgChannelOpenConfirm",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.portId&&t.uint32(10).string(e.portId),""!==e.channelId&&t.uint32(18).string(e.channelId),0!==e.proofAck.length&&t.uint32(26).bytes(e.proofAck),void 0!==e.proofHeight&&o.Height.encode(e.proofHeight,t.uint32(34).fork()).ldelim(),""!==e.signer&&t.uint32(42).string(e.signer),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=m();for(;r.pos>>3){case 1:i.portId=r.string();break;case 2:i.channelId=r.string();break;case 3:i.proofAck=r.bytes();break;case 4:i.proofHeight=o.Height.decode(r,r.uint32());break;case 5:i.signer=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=m();return(0,s.isSet)(e.portId)&&(t.portId=String(e.portId)),(0,s.isSet)(e.channelId)&&(t.channelId=String(e.channelId)),(0,s.isSet)(e.proofAck)&&(t.proofAck=(0,s.bytesFromBase64)(e.proofAck)),(0,s.isSet)(e.proofHeight)&&(t.proofHeight=o.Height.fromJSON(e.proofHeight)),(0,s.isSet)(e.signer)&&(t.signer=String(e.signer)),t},toJSON(e){let t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.channelId&&(t.channelId=e.channelId),void 0!==e.proofAck&&(t.proofAck=(0,s.base64FromBytes)(void 0!==e.proofAck?e.proofAck:new Uint8Array)),void 0!==e.proofHeight&&(t.proofHeight=e.proofHeight?o.Height.toJSON(e.proofHeight):void 0),void 0!==e.signer&&(t.signer=e.signer),t},fromPartial(e){var t,r,n,i;let a=m();return a.portId=null!==(t=e.portId)&&void 0!==t?t:"",a.channelId=null!==(r=e.channelId)&&void 0!==r?r:"",a.proofAck=null!==(n=e.proofAck)&&void 0!==n?n:new Uint8Array,void 0!==e.proofHeight&&null!==e.proofHeight&&(a.proofHeight=o.Height.fromPartial(e.proofHeight)),a.signer=null!==(i=e.signer)&&void 0!==i?i:"",a}},t.MsgChannelOpenConfirmResponse={typeUrl:"/ibc.core.channel.v1.MsgChannelOpenConfirmResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=y();for(;r.posy(),toJSON:e=>({}),fromPartial:e=>y()},t.MsgChannelCloseInit={typeUrl:"/ibc.core.channel.v1.MsgChannelCloseInit",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.portId&&t.uint32(10).string(e.portId),""!==e.channelId&&t.uint32(18).string(e.channelId),""!==e.signer&&t.uint32(26).string(e.signer),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=v();for(;r.pos>>3){case 1:i.portId=r.string();break;case 2:i.channelId=r.string();break;case 3:i.signer=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=v();return(0,s.isSet)(e.portId)&&(t.portId=String(e.portId)),(0,s.isSet)(e.channelId)&&(t.channelId=String(e.channelId)),(0,s.isSet)(e.signer)&&(t.signer=String(e.signer)),t},toJSON(e){let t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.channelId&&(t.channelId=e.channelId),void 0!==e.signer&&(t.signer=e.signer),t},fromPartial(e){var t,r,n;let i=v();return i.portId=null!==(t=e.portId)&&void 0!==t?t:"",i.channelId=null!==(r=e.channelId)&&void 0!==r?r:"",i.signer=null!==(n=e.signer)&&void 0!==n?n:"",i}},t.MsgChannelCloseInitResponse={typeUrl:"/ibc.core.channel.v1.MsgChannelCloseInitResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=b();for(;r.posb(),toJSON:e=>({}),fromPartial:e=>b()},t.MsgChannelCloseConfirm={typeUrl:"/ibc.core.channel.v1.MsgChannelCloseConfirm",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.portId&&t.uint32(10).string(e.portId),""!==e.channelId&&t.uint32(18).string(e.channelId),0!==e.proofInit.length&&t.uint32(26).bytes(e.proofInit),void 0!==e.proofHeight&&o.Height.encode(e.proofHeight,t.uint32(34).fork()).ldelim(),""!==e.signer&&t.uint32(42).string(e.signer),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=S();for(;r.pos>>3){case 1:i.portId=r.string();break;case 2:i.channelId=r.string();break;case 3:i.proofInit=r.bytes();break;case 4:i.proofHeight=o.Height.decode(r,r.uint32());break;case 5:i.signer=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=S();return(0,s.isSet)(e.portId)&&(t.portId=String(e.portId)),(0,s.isSet)(e.channelId)&&(t.channelId=String(e.channelId)),(0,s.isSet)(e.proofInit)&&(t.proofInit=(0,s.bytesFromBase64)(e.proofInit)),(0,s.isSet)(e.proofHeight)&&(t.proofHeight=o.Height.fromJSON(e.proofHeight)),(0,s.isSet)(e.signer)&&(t.signer=String(e.signer)),t},toJSON(e){let t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.channelId&&(t.channelId=e.channelId),void 0!==e.proofInit&&(t.proofInit=(0,s.base64FromBytes)(void 0!==e.proofInit?e.proofInit:new Uint8Array)),void 0!==e.proofHeight&&(t.proofHeight=e.proofHeight?o.Height.toJSON(e.proofHeight):void 0),void 0!==e.signer&&(t.signer=e.signer),t},fromPartial(e){var t,r,n,i;let a=S();return a.portId=null!==(t=e.portId)&&void 0!==t?t:"",a.channelId=null!==(r=e.channelId)&&void 0!==r?r:"",a.proofInit=null!==(n=e.proofInit)&&void 0!==n?n:new Uint8Array,void 0!==e.proofHeight&&null!==e.proofHeight&&(a.proofHeight=o.Height.fromPartial(e.proofHeight)),a.signer=null!==(i=e.signer)&&void 0!==i?i:"",a}},t.MsgChannelCloseConfirmResponse={typeUrl:"/ibc.core.channel.v1.MsgChannelCloseConfirmResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=w();for(;r.posw(),toJSON:e=>({}),fromPartial:e=>w()},t.MsgRecvPacket={typeUrl:"/ibc.core.channel.v1.MsgRecvPacket",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return void 0!==e.packet&&i.Packet.encode(e.packet,t.uint32(10).fork()).ldelim(),0!==e.proofCommitment.length&&t.uint32(18).bytes(e.proofCommitment),void 0!==e.proofHeight&&o.Height.encode(e.proofHeight,t.uint32(26).fork()).ldelim(),""!==e.signer&&t.uint32(34).string(e.signer),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,s=_();for(;r.pos>>3){case 1:s.packet=i.Packet.decode(r,r.uint32());break;case 2:s.proofCommitment=r.bytes();break;case 3:s.proofHeight=o.Height.decode(r,r.uint32());break;case 4:s.signer=r.string();break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=_();return(0,s.isSet)(e.packet)&&(t.packet=i.Packet.fromJSON(e.packet)),(0,s.isSet)(e.proofCommitment)&&(t.proofCommitment=(0,s.bytesFromBase64)(e.proofCommitment)),(0,s.isSet)(e.proofHeight)&&(t.proofHeight=o.Height.fromJSON(e.proofHeight)),(0,s.isSet)(e.signer)&&(t.signer=String(e.signer)),t},toJSON(e){let t={};return void 0!==e.packet&&(t.packet=e.packet?i.Packet.toJSON(e.packet):void 0),void 0!==e.proofCommitment&&(t.proofCommitment=(0,s.base64FromBytes)(void 0!==e.proofCommitment?e.proofCommitment:new Uint8Array)),void 0!==e.proofHeight&&(t.proofHeight=e.proofHeight?o.Height.toJSON(e.proofHeight):void 0),void 0!==e.signer&&(t.signer=e.signer),t},fromPartial(e){var t,r;let n=_();return void 0!==e.packet&&null!==e.packet&&(n.packet=i.Packet.fromPartial(e.packet)),n.proofCommitment=null!==(t=e.proofCommitment)&&void 0!==t?t:new Uint8Array,void 0!==e.proofHeight&&null!==e.proofHeight&&(n.proofHeight=o.Height.fromPartial(e.proofHeight)),n.signer=null!==(r=e.signer)&&void 0!==r?r:"",n}},t.MsgRecvPacketResponse={typeUrl:"/ibc.core.channel.v1.MsgRecvPacketResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return 0!==e.result&&t.uint32(8).int32(e.result),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=k();for(;r.pos>>3==1?i.result=r.int32():r.skipType(7&e)}return i},fromJSON(e){let t=k();return(0,s.isSet)(e.result)&&(t.result=l(e.result)),t},toJSON(e){let t={};return void 0!==e.result&&(t.result=u(e.result)),t},fromPartial(e){var t;let r=k();return r.result=null!==(t=e.result)&&void 0!==t?t:0,r}},t.MsgTimeout={typeUrl:"/ibc.core.channel.v1.MsgTimeout",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return void 0!==e.packet&&i.Packet.encode(e.packet,t.uint32(10).fork()).ldelim(),0!==e.proofUnreceived.length&&t.uint32(18).bytes(e.proofUnreceived),void 0!==e.proofHeight&&o.Height.encode(e.proofHeight,t.uint32(26).fork()).ldelim(),e.nextSequenceRecv!==BigInt(0)&&t.uint32(32).uint64(e.nextSequenceRecv),""!==e.signer&&t.uint32(42).string(e.signer),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,s=O();for(;r.pos>>3){case 1:s.packet=i.Packet.decode(r,r.uint32());break;case 2:s.proofUnreceived=r.bytes();break;case 3:s.proofHeight=o.Height.decode(r,r.uint32());break;case 4:s.nextSequenceRecv=r.uint64();break;case 5:s.signer=r.string();break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=O();return(0,s.isSet)(e.packet)&&(t.packet=i.Packet.fromJSON(e.packet)),(0,s.isSet)(e.proofUnreceived)&&(t.proofUnreceived=(0,s.bytesFromBase64)(e.proofUnreceived)),(0,s.isSet)(e.proofHeight)&&(t.proofHeight=o.Height.fromJSON(e.proofHeight)),(0,s.isSet)(e.nextSequenceRecv)&&(t.nextSequenceRecv=BigInt(e.nextSequenceRecv.toString())),(0,s.isSet)(e.signer)&&(t.signer=String(e.signer)),t},toJSON(e){let t={};return void 0!==e.packet&&(t.packet=e.packet?i.Packet.toJSON(e.packet):void 0),void 0!==e.proofUnreceived&&(t.proofUnreceived=(0,s.base64FromBytes)(void 0!==e.proofUnreceived?e.proofUnreceived:new Uint8Array)),void 0!==e.proofHeight&&(t.proofHeight=e.proofHeight?o.Height.toJSON(e.proofHeight):void 0),void 0!==e.nextSequenceRecv&&(t.nextSequenceRecv=(e.nextSequenceRecv||BigInt(0)).toString()),void 0!==e.signer&&(t.signer=e.signer),t},fromPartial(e){var t,r;let n=O();return void 0!==e.packet&&null!==e.packet&&(n.packet=i.Packet.fromPartial(e.packet)),n.proofUnreceived=null!==(t=e.proofUnreceived)&&void 0!==t?t:new Uint8Array,void 0!==e.proofHeight&&null!==e.proofHeight&&(n.proofHeight=o.Height.fromPartial(e.proofHeight)),void 0!==e.nextSequenceRecv&&null!==e.nextSequenceRecv&&(n.nextSequenceRecv=BigInt(e.nextSequenceRecv.toString())),n.signer=null!==(r=e.signer)&&void 0!==r?r:"",n}},t.MsgTimeoutResponse={typeUrl:"/ibc.core.channel.v1.MsgTimeoutResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return 0!==e.result&&t.uint32(8).int32(e.result),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=P();for(;r.pos>>3==1?i.result=r.int32():r.skipType(7&e)}return i},fromJSON(e){let t=P();return(0,s.isSet)(e.result)&&(t.result=l(e.result)),t},toJSON(e){let t={};return void 0!==e.result&&(t.result=u(e.result)),t},fromPartial(e){var t;let r=P();return r.result=null!==(t=e.result)&&void 0!==t?t:0,r}},t.MsgTimeoutOnClose={typeUrl:"/ibc.core.channel.v1.MsgTimeoutOnClose",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return void 0!==e.packet&&i.Packet.encode(e.packet,t.uint32(10).fork()).ldelim(),0!==e.proofUnreceived.length&&t.uint32(18).bytes(e.proofUnreceived),0!==e.proofClose.length&&t.uint32(26).bytes(e.proofClose),void 0!==e.proofHeight&&o.Height.encode(e.proofHeight,t.uint32(34).fork()).ldelim(),e.nextSequenceRecv!==BigInt(0)&&t.uint32(40).uint64(e.nextSequenceRecv),""!==e.signer&&t.uint32(50).string(e.signer),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,s=A();for(;r.pos>>3){case 1:s.packet=i.Packet.decode(r,r.uint32());break;case 2:s.proofUnreceived=r.bytes();break;case 3:s.proofClose=r.bytes();break;case 4:s.proofHeight=o.Height.decode(r,r.uint32());break;case 5:s.nextSequenceRecv=r.uint64();break;case 6:s.signer=r.string();break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=A();return(0,s.isSet)(e.packet)&&(t.packet=i.Packet.fromJSON(e.packet)),(0,s.isSet)(e.proofUnreceived)&&(t.proofUnreceived=(0,s.bytesFromBase64)(e.proofUnreceived)),(0,s.isSet)(e.proofClose)&&(t.proofClose=(0,s.bytesFromBase64)(e.proofClose)),(0,s.isSet)(e.proofHeight)&&(t.proofHeight=o.Height.fromJSON(e.proofHeight)),(0,s.isSet)(e.nextSequenceRecv)&&(t.nextSequenceRecv=BigInt(e.nextSequenceRecv.toString())),(0,s.isSet)(e.signer)&&(t.signer=String(e.signer)),t},toJSON(e){let t={};return void 0!==e.packet&&(t.packet=e.packet?i.Packet.toJSON(e.packet):void 0),void 0!==e.proofUnreceived&&(t.proofUnreceived=(0,s.base64FromBytes)(void 0!==e.proofUnreceived?e.proofUnreceived:new Uint8Array)),void 0!==e.proofClose&&(t.proofClose=(0,s.base64FromBytes)(void 0!==e.proofClose?e.proofClose:new Uint8Array)),void 0!==e.proofHeight&&(t.proofHeight=e.proofHeight?o.Height.toJSON(e.proofHeight):void 0),void 0!==e.nextSequenceRecv&&(t.nextSequenceRecv=(e.nextSequenceRecv||BigInt(0)).toString()),void 0!==e.signer&&(t.signer=e.signer),t},fromPartial(e){var t,r,n;let a=A();return void 0!==e.packet&&null!==e.packet&&(a.packet=i.Packet.fromPartial(e.packet)),a.proofUnreceived=null!==(t=e.proofUnreceived)&&void 0!==t?t:new Uint8Array,a.proofClose=null!==(r=e.proofClose)&&void 0!==r?r:new Uint8Array,void 0!==e.proofHeight&&null!==e.proofHeight&&(a.proofHeight=o.Height.fromPartial(e.proofHeight)),void 0!==e.nextSequenceRecv&&null!==e.nextSequenceRecv&&(a.nextSequenceRecv=BigInt(e.nextSequenceRecv.toString())),a.signer=null!==(n=e.signer)&&void 0!==n?n:"",a}},t.MsgTimeoutOnCloseResponse={typeUrl:"/ibc.core.channel.v1.MsgTimeoutOnCloseResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return 0!==e.result&&t.uint32(8).int32(e.result),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=I();for(;r.pos>>3==1?i.result=r.int32():r.skipType(7&e)}return i},fromJSON(e){let t=I();return(0,s.isSet)(e.result)&&(t.result=l(e.result)),t},toJSON(e){let t={};return void 0!==e.result&&(t.result=u(e.result)),t},fromPartial(e){var t;let r=I();return r.result=null!==(t=e.result)&&void 0!==t?t:0,r}},t.MsgAcknowledgement={typeUrl:"/ibc.core.channel.v1.MsgAcknowledgement",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return void 0!==e.packet&&i.Packet.encode(e.packet,t.uint32(10).fork()).ldelim(),0!==e.acknowledgement.length&&t.uint32(18).bytes(e.acknowledgement),0!==e.proofAcked.length&&t.uint32(26).bytes(e.proofAcked),void 0!==e.proofHeight&&o.Height.encode(e.proofHeight,t.uint32(34).fork()).ldelim(),""!==e.signer&&t.uint32(42).string(e.signer),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,s=R();for(;r.pos>>3){case 1:s.packet=i.Packet.decode(r,r.uint32());break;case 2:s.acknowledgement=r.bytes();break;case 3:s.proofAcked=r.bytes();break;case 4:s.proofHeight=o.Height.decode(r,r.uint32());break;case 5:s.signer=r.string();break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=R();return(0,s.isSet)(e.packet)&&(t.packet=i.Packet.fromJSON(e.packet)),(0,s.isSet)(e.acknowledgement)&&(t.acknowledgement=(0,s.bytesFromBase64)(e.acknowledgement)),(0,s.isSet)(e.proofAcked)&&(t.proofAcked=(0,s.bytesFromBase64)(e.proofAcked)),(0,s.isSet)(e.proofHeight)&&(t.proofHeight=o.Height.fromJSON(e.proofHeight)),(0,s.isSet)(e.signer)&&(t.signer=String(e.signer)),t},toJSON(e){let t={};return void 0!==e.packet&&(t.packet=e.packet?i.Packet.toJSON(e.packet):void 0),void 0!==e.acknowledgement&&(t.acknowledgement=(0,s.base64FromBytes)(void 0!==e.acknowledgement?e.acknowledgement:new Uint8Array)),void 0!==e.proofAcked&&(t.proofAcked=(0,s.base64FromBytes)(void 0!==e.proofAcked?e.proofAcked:new Uint8Array)),void 0!==e.proofHeight&&(t.proofHeight=e.proofHeight?o.Height.toJSON(e.proofHeight):void 0),void 0!==e.signer&&(t.signer=e.signer),t},fromPartial(e){var t,r,n;let a=R();return void 0!==e.packet&&null!==e.packet&&(a.packet=i.Packet.fromPartial(e.packet)),a.acknowledgement=null!==(t=e.acknowledgement)&&void 0!==t?t:new Uint8Array,a.proofAcked=null!==(r=e.proofAcked)&&void 0!==r?r:new Uint8Array,void 0!==e.proofHeight&&null!==e.proofHeight&&(a.proofHeight=o.Height.fromPartial(e.proofHeight)),a.signer=null!==(n=e.signer)&&void 0!==n?n:"",a}},t.MsgAcknowledgementResponse={typeUrl:"/ibc.core.channel.v1.MsgAcknowledgementResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return 0!==e.result&&t.uint32(8).int32(e.result),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=E();for(;r.pos>>3==1?i.result=r.int32():r.skipType(7&e)}return i},fromJSON(e){let t=E();return(0,s.isSet)(e.result)&&(t.result=l(e.result)),t},toJSON(e){let t={};return void 0!==e.result&&(t.result=u(e.result)),t},fromPartial(e){var t;let r=E();return r.result=null!==(t=e.result)&&void 0!==t?t:0,r}};class T{ChannelOpenInit(e){let r=t.MsgChannelOpenInit.encode(e).finish();return this.rpc.request("ibc.core.channel.v1.Msg","ChannelOpenInit",r).then(e=>t.MsgChannelOpenInitResponse.decode(new a.BinaryReader(e)))}ChannelOpenTry(e){let r=t.MsgChannelOpenTry.encode(e).finish();return this.rpc.request("ibc.core.channel.v1.Msg","ChannelOpenTry",r).then(e=>t.MsgChannelOpenTryResponse.decode(new a.BinaryReader(e)))}ChannelOpenAck(e){let r=t.MsgChannelOpenAck.encode(e).finish();return this.rpc.request("ibc.core.channel.v1.Msg","ChannelOpenAck",r).then(e=>t.MsgChannelOpenAckResponse.decode(new a.BinaryReader(e)))}ChannelOpenConfirm(e){let r=t.MsgChannelOpenConfirm.encode(e).finish();return this.rpc.request("ibc.core.channel.v1.Msg","ChannelOpenConfirm",r).then(e=>t.MsgChannelOpenConfirmResponse.decode(new a.BinaryReader(e)))}ChannelCloseInit(e){let r=t.MsgChannelCloseInit.encode(e).finish();return this.rpc.request("ibc.core.channel.v1.Msg","ChannelCloseInit",r).then(e=>t.MsgChannelCloseInitResponse.decode(new a.BinaryReader(e)))}ChannelCloseConfirm(e){let r=t.MsgChannelCloseConfirm.encode(e).finish();return this.rpc.request("ibc.core.channel.v1.Msg","ChannelCloseConfirm",r).then(e=>t.MsgChannelCloseConfirmResponse.decode(new a.BinaryReader(e)))}RecvPacket(e){let r=t.MsgRecvPacket.encode(e).finish();return this.rpc.request("ibc.core.channel.v1.Msg","RecvPacket",r).then(e=>t.MsgRecvPacketResponse.decode(new a.BinaryReader(e)))}Timeout(e){let r=t.MsgTimeout.encode(e).finish();return this.rpc.request("ibc.core.channel.v1.Msg","Timeout",r).then(e=>t.MsgTimeoutResponse.decode(new a.BinaryReader(e)))}TimeoutOnClose(e){let r=t.MsgTimeoutOnClose.encode(e).finish();return this.rpc.request("ibc.core.channel.v1.Msg","TimeoutOnClose",r).then(e=>t.MsgTimeoutOnCloseResponse.decode(new a.BinaryReader(e)))}Acknowledgement(e){let r=t.MsgAcknowledgement.encode(e).finish();return this.rpc.request("ibc.core.channel.v1.Msg","Acknowledgement",r).then(e=>t.MsgAcknowledgementResponse.decode(new a.BinaryReader(e)))}constructor(e){this.rpc=e,this.ChannelOpenInit=this.ChannelOpenInit.bind(this),this.ChannelOpenTry=this.ChannelOpenTry.bind(this),this.ChannelOpenAck=this.ChannelOpenAck.bind(this),this.ChannelOpenConfirm=this.ChannelOpenConfirm.bind(this),this.ChannelCloseInit=this.ChannelCloseInit.bind(this),this.ChannelCloseConfirm=this.ChannelCloseConfirm.bind(this),this.RecvPacket=this.RecvPacket.bind(this),this.Timeout=this.Timeout.bind(this),this.TimeoutOnClose=this.TimeoutOnClose.bind(this),this.Acknowledgement=this.Acknowledgement.bind(this)}}t.MsgClientImpl=T},23489:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Params=t.Height=t.UpgradeProposal=t.ClientUpdateProposal=t.ClientConsensusStates=t.ConsensusStateWithHeight=t.IdentifiedClientState=t.protobufPackage=void 0;let n=r(11879),i=r(61819),o=r(46554),a=r(99133);function s(){return{clientId:"",clientState:void 0}}function l(){return{height:t.Height.fromPartial({}),consensusState:void 0}}function u(){return{clientId:"",consensusStates:[]}}function d(){return{title:"",description:"",subjectClientId:"",substituteClientId:""}}function c(){return{title:"",description:"",plan:i.Plan.fromPartial({}),upgradedClientState:void 0}}function p(){return{revisionNumber:BigInt(0),revisionHeight:BigInt(0)}}function f(){return{allowedClients:[]}}t.protobufPackage="ibc.core.client.v1",t.IdentifiedClientState={typeUrl:"/ibc.core.client.v1.IdentifiedClientState",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.clientId&&t.uint32(10).string(e.clientId),void 0!==e.clientState&&n.Any.encode(e.clientState,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=s();for(;r.pos>>3){case 1:a.clientId=r.string();break;case 2:a.clientState=n.Any.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=s();return(0,a.isSet)(e.clientId)&&(t.clientId=String(e.clientId)),(0,a.isSet)(e.clientState)&&(t.clientState=n.Any.fromJSON(e.clientState)),t},toJSON(e){let t={};return void 0!==e.clientId&&(t.clientId=e.clientId),void 0!==e.clientState&&(t.clientState=e.clientState?n.Any.toJSON(e.clientState):void 0),t},fromPartial(e){var t;let r=s();return r.clientId=null!==(t=e.clientId)&&void 0!==t?t:"",void 0!==e.clientState&&null!==e.clientState&&(r.clientState=n.Any.fromPartial(e.clientState)),r}},t.ConsensusStateWithHeight={typeUrl:"/ibc.core.client.v1.ConsensusStateWithHeight",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return void 0!==e.height&&t.Height.encode(e.height,r.uint32(10).fork()).ldelim(),void 0!==e.consensusState&&n.Any.encode(e.consensusState,r.uint32(18).fork()).ldelim(),r},decode(e,r){let i=e instanceof o.BinaryReader?e:new o.BinaryReader(e),a=void 0===r?i.len:i.pos+r,s=l();for(;i.pos>>3){case 1:s.height=t.Height.decode(i,i.uint32());break;case 2:s.consensusState=n.Any.decode(i,i.uint32());break;default:i.skipType(7&e)}}return s},fromJSON(e){let r=l();return(0,a.isSet)(e.height)&&(r.height=t.Height.fromJSON(e.height)),(0,a.isSet)(e.consensusState)&&(r.consensusState=n.Any.fromJSON(e.consensusState)),r},toJSON(e){let r={};return void 0!==e.height&&(r.height=e.height?t.Height.toJSON(e.height):void 0),void 0!==e.consensusState&&(r.consensusState=e.consensusState?n.Any.toJSON(e.consensusState):void 0),r},fromPartial(e){let r=l();return void 0!==e.height&&null!==e.height&&(r.height=t.Height.fromPartial(e.height)),void 0!==e.consensusState&&null!==e.consensusState&&(r.consensusState=n.Any.fromPartial(e.consensusState)),r}},t.ClientConsensusStates={typeUrl:"/ibc.core.client.v1.ClientConsensusStates",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let n of(""!==e.clientId&&r.uint32(10).string(e.clientId),e.consensusStates))t.ConsensusStateWithHeight.encode(n,r.uint32(18).fork()).ldelim();return r},decode(e,r){let n=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===r?n.len:n.pos+r,a=u();for(;n.pos>>3){case 1:a.clientId=n.string();break;case 2:a.consensusStates.push(t.ConsensusStateWithHeight.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return a},fromJSON(e){let r=u();return(0,a.isSet)(e.clientId)&&(r.clientId=String(e.clientId)),Array.isArray(null==e?void 0:e.consensusStates)&&(r.consensusStates=e.consensusStates.map(e=>t.ConsensusStateWithHeight.fromJSON(e))),r},toJSON(e){let r={};return void 0!==e.clientId&&(r.clientId=e.clientId),e.consensusStates?r.consensusStates=e.consensusStates.map(e=>e?t.ConsensusStateWithHeight.toJSON(e):void 0):r.consensusStates=[],r},fromPartial(e){var r,n;let i=u();return i.clientId=null!==(n=e.clientId)&&void 0!==n?n:"",i.consensusStates=(null===(r=e.consensusStates)||void 0===r?void 0:r.map(e=>t.ConsensusStateWithHeight.fromPartial(e)))||[],i}},t.ClientUpdateProposal={typeUrl:"/ibc.core.client.v1.ClientUpdateProposal",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.title&&t.uint32(10).string(e.title),""!==e.description&&t.uint32(18).string(e.description),""!==e.subjectClientId&&t.uint32(26).string(e.subjectClientId),""!==e.substituteClientId&&t.uint32(34).string(e.substituteClientId),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=d();for(;r.pos>>3){case 1:i.title=r.string();break;case 2:i.description=r.string();break;case 3:i.subjectClientId=r.string();break;case 4:i.substituteClientId=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=d();return(0,a.isSet)(e.title)&&(t.title=String(e.title)),(0,a.isSet)(e.description)&&(t.description=String(e.description)),(0,a.isSet)(e.subjectClientId)&&(t.subjectClientId=String(e.subjectClientId)),(0,a.isSet)(e.substituteClientId)&&(t.substituteClientId=String(e.substituteClientId)),t},toJSON(e){let t={};return void 0!==e.title&&(t.title=e.title),void 0!==e.description&&(t.description=e.description),void 0!==e.subjectClientId&&(t.subjectClientId=e.subjectClientId),void 0!==e.substituteClientId&&(t.substituteClientId=e.substituteClientId),t},fromPartial(e){var t,r,n,i;let o=d();return o.title=null!==(t=e.title)&&void 0!==t?t:"",o.description=null!==(r=e.description)&&void 0!==r?r:"",o.subjectClientId=null!==(n=e.subjectClientId)&&void 0!==n?n:"",o.substituteClientId=null!==(i=e.substituteClientId)&&void 0!==i?i:"",o}},t.UpgradeProposal={typeUrl:"/ibc.core.client.v1.UpgradeProposal",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.title&&t.uint32(10).string(e.title),""!==e.description&&t.uint32(18).string(e.description),void 0!==e.plan&&i.Plan.encode(e.plan,t.uint32(26).fork()).ldelim(),void 0!==e.upgradedClientState&&n.Any.encode(e.upgradedClientState,t.uint32(34).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),a=void 0===t?r.len:r.pos+t,s=c();for(;r.pos>>3){case 1:s.title=r.string();break;case 2:s.description=r.string();break;case 3:s.plan=i.Plan.decode(r,r.uint32());break;case 4:s.upgradedClientState=n.Any.decode(r,r.uint32());break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=c();return(0,a.isSet)(e.title)&&(t.title=String(e.title)),(0,a.isSet)(e.description)&&(t.description=String(e.description)),(0,a.isSet)(e.plan)&&(t.plan=i.Plan.fromJSON(e.plan)),(0,a.isSet)(e.upgradedClientState)&&(t.upgradedClientState=n.Any.fromJSON(e.upgradedClientState)),t},toJSON(e){let t={};return void 0!==e.title&&(t.title=e.title),void 0!==e.description&&(t.description=e.description),void 0!==e.plan&&(t.plan=e.plan?i.Plan.toJSON(e.plan):void 0),void 0!==e.upgradedClientState&&(t.upgradedClientState=e.upgradedClientState?n.Any.toJSON(e.upgradedClientState):void 0),t},fromPartial(e){var t,r;let o=c();return o.title=null!==(t=e.title)&&void 0!==t?t:"",o.description=null!==(r=e.description)&&void 0!==r?r:"",void 0!==e.plan&&null!==e.plan&&(o.plan=i.Plan.fromPartial(e.plan)),void 0!==e.upgradedClientState&&null!==e.upgradedClientState&&(o.upgradedClientState=n.Any.fromPartial(e.upgradedClientState)),o}},t.Height={typeUrl:"/ibc.core.client.v1.Height",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return e.revisionNumber!==BigInt(0)&&t.uint32(8).uint64(e.revisionNumber),e.revisionHeight!==BigInt(0)&&t.uint32(16).uint64(e.revisionHeight),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=p();for(;r.pos>>3){case 1:i.revisionNumber=r.uint64();break;case 2:i.revisionHeight=r.uint64();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=p();return(0,a.isSet)(e.revisionNumber)&&(t.revisionNumber=BigInt(e.revisionNumber.toString())),(0,a.isSet)(e.revisionHeight)&&(t.revisionHeight=BigInt(e.revisionHeight.toString())),t},toJSON(e){let t={};return void 0!==e.revisionNumber&&(t.revisionNumber=(e.revisionNumber||BigInt(0)).toString()),void 0!==e.revisionHeight&&(t.revisionHeight=(e.revisionHeight||BigInt(0)).toString()),t},fromPartial(e){let t=p();return void 0!==e.revisionNumber&&null!==e.revisionNumber&&(t.revisionNumber=BigInt(e.revisionNumber.toString())),void 0!==e.revisionHeight&&null!==e.revisionHeight&&(t.revisionHeight=BigInt(e.revisionHeight.toString())),t}},t.Params={typeUrl:"/ibc.core.client.v1.Params",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of e.allowedClients)t.uint32(10).string(r);return t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=f();for(;r.pos>>3==1?i.allowedClients.push(r.string()):r.skipType(7&e)}return i},fromJSON(e){let t=f();return Array.isArray(null==e?void 0:e.allowedClients)&&(t.allowedClients=e.allowedClients.map(e=>String(e))),t},toJSON(e){let t={};return e.allowedClients?t.allowedClients=e.allowedClients.map(e=>e):t.allowedClients=[],t},fromPartial(e){var t;let r=f();return r.allowedClients=(null===(t=e.allowedClients)||void 0===t?void 0:t.map(e=>e))||[],r}}},35838:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QueryClientImpl=t.QueryUpgradedConsensusStateResponse=t.QueryUpgradedConsensusStateRequest=t.QueryUpgradedClientStateResponse=t.QueryUpgradedClientStateRequest=t.QueryClientParamsResponse=t.QueryClientParamsRequest=t.QueryClientStatusResponse=t.QueryClientStatusRequest=t.QueryConsensusStateHeightsResponse=t.QueryConsensusStateHeightsRequest=t.QueryConsensusStatesResponse=t.QueryConsensusStatesRequest=t.QueryConsensusStateResponse=t.QueryConsensusStateRequest=t.QueryClientStatesResponse=t.QueryClientStatesRequest=t.QueryClientStateResponse=t.QueryClientStateRequest=t.protobufPackage=void 0;let n=r(86141),i=r(11879),o=r(23489),a=r(46554),s=r(99133);function l(){return{clientId:""}}function u(){return{clientState:void 0,proof:new Uint8Array,proofHeight:o.Height.fromPartial({})}}function d(){return{pagination:void 0}}function c(){return{clientStates:[],pagination:void 0}}function p(){return{clientId:"",revisionNumber:BigInt(0),revisionHeight:BigInt(0),latestHeight:!1}}function f(){return{consensusState:void 0,proof:new Uint8Array,proofHeight:o.Height.fromPartial({})}}function h(){return{clientId:"",pagination:void 0}}function g(){return{consensusStates:[],pagination:void 0}}function m(){return{clientId:"",pagination:void 0}}function y(){return{consensusStateHeights:[],pagination:void 0}}function v(){return{clientId:""}}function b(){return{status:""}}function S(){return{}}function w(){return{params:void 0}}function _(){return{}}function k(){return{upgradedClientState:void 0}}function O(){return{}}function P(){return{upgradedConsensusState:void 0}}t.protobufPackage="ibc.core.client.v1",t.QueryClientStateRequest={typeUrl:"/ibc.core.client.v1.QueryClientStateRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.clientId&&t.uint32(10).string(e.clientId),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=l();for(;r.pos>>3==1?i.clientId=r.string():r.skipType(7&e)}return i},fromJSON(e){let t=l();return(0,s.isSet)(e.clientId)&&(t.clientId=String(e.clientId)),t},toJSON(e){let t={};return void 0!==e.clientId&&(t.clientId=e.clientId),t},fromPartial(e){var t;let r=l();return r.clientId=null!==(t=e.clientId)&&void 0!==t?t:"",r}},t.QueryClientStateResponse={typeUrl:"/ibc.core.client.v1.QueryClientStateResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return void 0!==e.clientState&&i.Any.encode(e.clientState,t.uint32(10).fork()).ldelim(),0!==e.proof.length&&t.uint32(18).bytes(e.proof),void 0!==e.proofHeight&&o.Height.encode(e.proofHeight,t.uint32(26).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,s=u();for(;r.pos>>3){case 1:s.clientState=i.Any.decode(r,r.uint32());break;case 2:s.proof=r.bytes();break;case 3:s.proofHeight=o.Height.decode(r,r.uint32());break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=u();return(0,s.isSet)(e.clientState)&&(t.clientState=i.Any.fromJSON(e.clientState)),(0,s.isSet)(e.proof)&&(t.proof=(0,s.bytesFromBase64)(e.proof)),(0,s.isSet)(e.proofHeight)&&(t.proofHeight=o.Height.fromJSON(e.proofHeight)),t},toJSON(e){let t={};return void 0!==e.clientState&&(t.clientState=e.clientState?i.Any.toJSON(e.clientState):void 0),void 0!==e.proof&&(t.proof=(0,s.base64FromBytes)(void 0!==e.proof?e.proof:new Uint8Array)),void 0!==e.proofHeight&&(t.proofHeight=e.proofHeight?o.Height.toJSON(e.proofHeight):void 0),t},fromPartial(e){var t;let r=u();return void 0!==e.clientState&&null!==e.clientState&&(r.clientState=i.Any.fromPartial(e.clientState)),r.proof=null!==(t=e.proof)&&void 0!==t?t:new Uint8Array,void 0!==e.proofHeight&&null!==e.proofHeight&&(r.proofHeight=o.Height.fromPartial(e.proofHeight)),r}},t.QueryClientStatesRequest={typeUrl:"/ibc.core.client.v1.QueryClientStatesRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return void 0!==e.pagination&&n.PageRequest.encode(e.pagination,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),i=void 0===t?r.len:r.pos+t,o=d();for(;r.pos>>3==1?o.pagination=n.PageRequest.decode(r,r.uint32()):r.skipType(7&e)}return o},fromJSON(e){let t=d();return(0,s.isSet)(e.pagination)&&(t.pagination=n.PageRequest.fromJSON(e.pagination)),t},toJSON(e){let t={};return void 0!==e.pagination&&(t.pagination=e.pagination?n.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){let t=d();return void 0!==e.pagination&&null!==e.pagination&&(t.pagination=n.PageRequest.fromPartial(e.pagination)),t}},t.QueryClientStatesResponse={typeUrl:"/ibc.core.client.v1.QueryClientStatesResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();for(let r of e.clientStates)o.IdentifiedClientState.encode(r,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&n.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),i=void 0===t?r.len:r.pos+t,s=c();for(;r.pos>>3){case 1:s.clientStates.push(o.IdentifiedClientState.decode(r,r.uint32()));break;case 2:s.pagination=n.PageResponse.decode(r,r.uint32());break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=c();return Array.isArray(null==e?void 0:e.clientStates)&&(t.clientStates=e.clientStates.map(e=>o.IdentifiedClientState.fromJSON(e))),(0,s.isSet)(e.pagination)&&(t.pagination=n.PageResponse.fromJSON(e.pagination)),t},toJSON(e){let t={};return e.clientStates?t.clientStates=e.clientStates.map(e=>e?o.IdentifiedClientState.toJSON(e):void 0):t.clientStates=[],void 0!==e.pagination&&(t.pagination=e.pagination?n.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=c();return r.clientStates=(null===(t=e.clientStates)||void 0===t?void 0:t.map(e=>o.IdentifiedClientState.fromPartial(e)))||[],void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageResponse.fromPartial(e.pagination)),r}},t.QueryConsensusStateRequest={typeUrl:"/ibc.core.client.v1.QueryConsensusStateRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.clientId&&t.uint32(10).string(e.clientId),e.revisionNumber!==BigInt(0)&&t.uint32(16).uint64(e.revisionNumber),e.revisionHeight!==BigInt(0)&&t.uint32(24).uint64(e.revisionHeight),!0===e.latestHeight&&t.uint32(32).bool(e.latestHeight),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=p();for(;r.pos>>3){case 1:i.clientId=r.string();break;case 2:i.revisionNumber=r.uint64();break;case 3:i.revisionHeight=r.uint64();break;case 4:i.latestHeight=r.bool();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=p();return(0,s.isSet)(e.clientId)&&(t.clientId=String(e.clientId)),(0,s.isSet)(e.revisionNumber)&&(t.revisionNumber=BigInt(e.revisionNumber.toString())),(0,s.isSet)(e.revisionHeight)&&(t.revisionHeight=BigInt(e.revisionHeight.toString())),(0,s.isSet)(e.latestHeight)&&(t.latestHeight=!!e.latestHeight),t},toJSON(e){let t={};return void 0!==e.clientId&&(t.clientId=e.clientId),void 0!==e.revisionNumber&&(t.revisionNumber=(e.revisionNumber||BigInt(0)).toString()),void 0!==e.revisionHeight&&(t.revisionHeight=(e.revisionHeight||BigInt(0)).toString()),void 0!==e.latestHeight&&(t.latestHeight=e.latestHeight),t},fromPartial(e){var t,r;let n=p();return n.clientId=null!==(t=e.clientId)&&void 0!==t?t:"",void 0!==e.revisionNumber&&null!==e.revisionNumber&&(n.revisionNumber=BigInt(e.revisionNumber.toString())),void 0!==e.revisionHeight&&null!==e.revisionHeight&&(n.revisionHeight=BigInt(e.revisionHeight.toString())),n.latestHeight=null!==(r=e.latestHeight)&&void 0!==r&&r,n}},t.QueryConsensusStateResponse={typeUrl:"/ibc.core.client.v1.QueryConsensusStateResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return void 0!==e.consensusState&&i.Any.encode(e.consensusState,t.uint32(10).fork()).ldelim(),0!==e.proof.length&&t.uint32(18).bytes(e.proof),void 0!==e.proofHeight&&o.Height.encode(e.proofHeight,t.uint32(26).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,s=f();for(;r.pos>>3){case 1:s.consensusState=i.Any.decode(r,r.uint32());break;case 2:s.proof=r.bytes();break;case 3:s.proofHeight=o.Height.decode(r,r.uint32());break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=f();return(0,s.isSet)(e.consensusState)&&(t.consensusState=i.Any.fromJSON(e.consensusState)),(0,s.isSet)(e.proof)&&(t.proof=(0,s.bytesFromBase64)(e.proof)),(0,s.isSet)(e.proofHeight)&&(t.proofHeight=o.Height.fromJSON(e.proofHeight)),t},toJSON(e){let t={};return void 0!==e.consensusState&&(t.consensusState=e.consensusState?i.Any.toJSON(e.consensusState):void 0),void 0!==e.proof&&(t.proof=(0,s.base64FromBytes)(void 0!==e.proof?e.proof:new Uint8Array)),void 0!==e.proofHeight&&(t.proofHeight=e.proofHeight?o.Height.toJSON(e.proofHeight):void 0),t},fromPartial(e){var t;let r=f();return void 0!==e.consensusState&&null!==e.consensusState&&(r.consensusState=i.Any.fromPartial(e.consensusState)),r.proof=null!==(t=e.proof)&&void 0!==t?t:new Uint8Array,void 0!==e.proofHeight&&null!==e.proofHeight&&(r.proofHeight=o.Height.fromPartial(e.proofHeight)),r}},t.QueryConsensusStatesRequest={typeUrl:"/ibc.core.client.v1.QueryConsensusStatesRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.clientId&&t.uint32(10).string(e.clientId),void 0!==e.pagination&&n.PageRequest.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),i=void 0===t?r.len:r.pos+t,o=h();for(;r.pos>>3){case 1:o.clientId=r.string();break;case 2:o.pagination=n.PageRequest.decode(r,r.uint32());break;default:r.skipType(7&e)}}return o},fromJSON(e){let t=h();return(0,s.isSet)(e.clientId)&&(t.clientId=String(e.clientId)),(0,s.isSet)(e.pagination)&&(t.pagination=n.PageRequest.fromJSON(e.pagination)),t},toJSON(e){let t={};return void 0!==e.clientId&&(t.clientId=e.clientId),void 0!==e.pagination&&(t.pagination=e.pagination?n.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=h();return r.clientId=null!==(t=e.clientId)&&void 0!==t?t:"",void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageRequest.fromPartial(e.pagination)),r}},t.QueryConsensusStatesResponse={typeUrl:"/ibc.core.client.v1.QueryConsensusStatesResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();for(let r of e.consensusStates)o.ConsensusStateWithHeight.encode(r,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&n.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),i=void 0===t?r.len:r.pos+t,s=g();for(;r.pos>>3){case 1:s.consensusStates.push(o.ConsensusStateWithHeight.decode(r,r.uint32()));break;case 2:s.pagination=n.PageResponse.decode(r,r.uint32());break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=g();return Array.isArray(null==e?void 0:e.consensusStates)&&(t.consensusStates=e.consensusStates.map(e=>o.ConsensusStateWithHeight.fromJSON(e))),(0,s.isSet)(e.pagination)&&(t.pagination=n.PageResponse.fromJSON(e.pagination)),t},toJSON(e){let t={};return e.consensusStates?t.consensusStates=e.consensusStates.map(e=>e?o.ConsensusStateWithHeight.toJSON(e):void 0):t.consensusStates=[],void 0!==e.pagination&&(t.pagination=e.pagination?n.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=g();return r.consensusStates=(null===(t=e.consensusStates)||void 0===t?void 0:t.map(e=>o.ConsensusStateWithHeight.fromPartial(e)))||[],void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageResponse.fromPartial(e.pagination)),r}},t.QueryConsensusStateHeightsRequest={typeUrl:"/ibc.core.client.v1.QueryConsensusStateHeightsRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.clientId&&t.uint32(10).string(e.clientId),void 0!==e.pagination&&n.PageRequest.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),i=void 0===t?r.len:r.pos+t,o=m();for(;r.pos>>3){case 1:o.clientId=r.string();break;case 2:o.pagination=n.PageRequest.decode(r,r.uint32());break;default:r.skipType(7&e)}}return o},fromJSON(e){let t=m();return(0,s.isSet)(e.clientId)&&(t.clientId=String(e.clientId)),(0,s.isSet)(e.pagination)&&(t.pagination=n.PageRequest.fromJSON(e.pagination)),t},toJSON(e){let t={};return void 0!==e.clientId&&(t.clientId=e.clientId),void 0!==e.pagination&&(t.pagination=e.pagination?n.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=m();return r.clientId=null!==(t=e.clientId)&&void 0!==t?t:"",void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageRequest.fromPartial(e.pagination)),r}},t.QueryConsensusStateHeightsResponse={typeUrl:"/ibc.core.client.v1.QueryConsensusStateHeightsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();for(let r of e.consensusStateHeights)o.Height.encode(r,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&n.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),i=void 0===t?r.len:r.pos+t,s=y();for(;r.pos>>3){case 1:s.consensusStateHeights.push(o.Height.decode(r,r.uint32()));break;case 2:s.pagination=n.PageResponse.decode(r,r.uint32());break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=y();return Array.isArray(null==e?void 0:e.consensusStateHeights)&&(t.consensusStateHeights=e.consensusStateHeights.map(e=>o.Height.fromJSON(e))),(0,s.isSet)(e.pagination)&&(t.pagination=n.PageResponse.fromJSON(e.pagination)),t},toJSON(e){let t={};return e.consensusStateHeights?t.consensusStateHeights=e.consensusStateHeights.map(e=>e?o.Height.toJSON(e):void 0):t.consensusStateHeights=[],void 0!==e.pagination&&(t.pagination=e.pagination?n.PageResponse.toJSON(e.pagination):void 0),t},fromPartial(e){var t;let r=y();return r.consensusStateHeights=(null===(t=e.consensusStateHeights)||void 0===t?void 0:t.map(e=>o.Height.fromPartial(e)))||[],void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageResponse.fromPartial(e.pagination)),r}},t.QueryClientStatusRequest={typeUrl:"/ibc.core.client.v1.QueryClientStatusRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.clientId&&t.uint32(10).string(e.clientId),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=v();for(;r.pos>>3==1?i.clientId=r.string():r.skipType(7&e)}return i},fromJSON(e){let t=v();return(0,s.isSet)(e.clientId)&&(t.clientId=String(e.clientId)),t},toJSON(e){let t={};return void 0!==e.clientId&&(t.clientId=e.clientId),t},fromPartial(e){var t;let r=v();return r.clientId=null!==(t=e.clientId)&&void 0!==t?t:"",r}},t.QueryClientStatusResponse={typeUrl:"/ibc.core.client.v1.QueryClientStatusResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.status&&t.uint32(10).string(e.status),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=b();for(;r.pos>>3==1?i.status=r.string():r.skipType(7&e)}return i},fromJSON(e){let t=b();return(0,s.isSet)(e.status)&&(t.status=String(e.status)),t},toJSON(e){let t={};return void 0!==e.status&&(t.status=e.status),t},fromPartial(e){var t;let r=b();return r.status=null!==(t=e.status)&&void 0!==t?t:"",r}},t.QueryClientParamsRequest={typeUrl:"/ibc.core.client.v1.QueryClientParamsRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=S();for(;r.posS(),toJSON:e=>({}),fromPartial:e=>S()},t.QueryClientParamsResponse={typeUrl:"/ibc.core.client.v1.QueryClientParamsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return void 0!==e.params&&o.Params.encode(e.params,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=w();for(;r.pos>>3==1?i.params=o.Params.decode(r,r.uint32()):r.skipType(7&e)}return i},fromJSON(e){let t=w();return(0,s.isSet)(e.params)&&(t.params=o.Params.fromJSON(e.params)),t},toJSON(e){let t={};return void 0!==e.params&&(t.params=e.params?o.Params.toJSON(e.params):void 0),t},fromPartial(e){let t=w();return void 0!==e.params&&null!==e.params&&(t.params=o.Params.fromPartial(e.params)),t}},t.QueryUpgradedClientStateRequest={typeUrl:"/ibc.core.client.v1.QueryUpgradedClientStateRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=_();for(;r.pos_(),toJSON:e=>({}),fromPartial:e=>_()},t.QueryUpgradedClientStateResponse={typeUrl:"/ibc.core.client.v1.QueryUpgradedClientStateResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return void 0!==e.upgradedClientState&&i.Any.encode(e.upgradedClientState,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=k();for(;r.pos>>3==1?o.upgradedClientState=i.Any.decode(r,r.uint32()):r.skipType(7&e)}return o},fromJSON(e){let t=k();return(0,s.isSet)(e.upgradedClientState)&&(t.upgradedClientState=i.Any.fromJSON(e.upgradedClientState)),t},toJSON(e){let t={};return void 0!==e.upgradedClientState&&(t.upgradedClientState=e.upgradedClientState?i.Any.toJSON(e.upgradedClientState):void 0),t},fromPartial(e){let t=k();return void 0!==e.upgradedClientState&&null!==e.upgradedClientState&&(t.upgradedClientState=i.Any.fromPartial(e.upgradedClientState)),t}},t.QueryUpgradedConsensusStateRequest={typeUrl:"/ibc.core.client.v1.QueryUpgradedConsensusStateRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=O();for(;r.posO(),toJSON:e=>({}),fromPartial:e=>O()},t.QueryUpgradedConsensusStateResponse={typeUrl:"/ibc.core.client.v1.QueryUpgradedConsensusStateResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return void 0!==e.upgradedConsensusState&&i.Any.encode(e.upgradedConsensusState,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=P();for(;r.pos>>3==1?o.upgradedConsensusState=i.Any.decode(r,r.uint32()):r.skipType(7&e)}return o},fromJSON(e){let t=P();return(0,s.isSet)(e.upgradedConsensusState)&&(t.upgradedConsensusState=i.Any.fromJSON(e.upgradedConsensusState)),t},toJSON(e){let t={};return void 0!==e.upgradedConsensusState&&(t.upgradedConsensusState=e.upgradedConsensusState?i.Any.toJSON(e.upgradedConsensusState):void 0),t},fromPartial(e){let t=P();return void 0!==e.upgradedConsensusState&&null!==e.upgradedConsensusState&&(t.upgradedConsensusState=i.Any.fromPartial(e.upgradedConsensusState)),t}};class A{ClientState(e){let r=t.QueryClientStateRequest.encode(e).finish();return this.rpc.request("ibc.core.client.v1.Query","ClientState",r).then(e=>t.QueryClientStateResponse.decode(new a.BinaryReader(e)))}ClientStates(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{pagination:n.PageRequest.fromPartial({})},r=t.QueryClientStatesRequest.encode(e).finish();return this.rpc.request("ibc.core.client.v1.Query","ClientStates",r).then(e=>t.QueryClientStatesResponse.decode(new a.BinaryReader(e)))}ConsensusState(e){let r=t.QueryConsensusStateRequest.encode(e).finish();return this.rpc.request("ibc.core.client.v1.Query","ConsensusState",r).then(e=>t.QueryConsensusStateResponse.decode(new a.BinaryReader(e)))}ConsensusStates(e){let r=t.QueryConsensusStatesRequest.encode(e).finish();return this.rpc.request("ibc.core.client.v1.Query","ConsensusStates",r).then(e=>t.QueryConsensusStatesResponse.decode(new a.BinaryReader(e)))}ConsensusStateHeights(e){let r=t.QueryConsensusStateHeightsRequest.encode(e).finish();return this.rpc.request("ibc.core.client.v1.Query","ConsensusStateHeights",r).then(e=>t.QueryConsensusStateHeightsResponse.decode(new a.BinaryReader(e)))}ClientStatus(e){let r=t.QueryClientStatusRequest.encode(e).finish();return this.rpc.request("ibc.core.client.v1.Query","ClientStatus",r).then(e=>t.QueryClientStatusResponse.decode(new a.BinaryReader(e)))}ClientParams(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.QueryClientParamsRequest.encode(e).finish();return this.rpc.request("ibc.core.client.v1.Query","ClientParams",r).then(e=>t.QueryClientParamsResponse.decode(new a.BinaryReader(e)))}UpgradedClientState(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.QueryUpgradedClientStateRequest.encode(e).finish();return this.rpc.request("ibc.core.client.v1.Query","UpgradedClientState",r).then(e=>t.QueryUpgradedClientStateResponse.decode(new a.BinaryReader(e)))}UpgradedConsensusState(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.QueryUpgradedConsensusStateRequest.encode(e).finish();return this.rpc.request("ibc.core.client.v1.Query","UpgradedConsensusState",r).then(e=>t.QueryUpgradedConsensusStateResponse.decode(new a.BinaryReader(e)))}constructor(e){this.rpc=e,this.ClientState=this.ClientState.bind(this),this.ClientStates=this.ClientStates.bind(this),this.ConsensusState=this.ConsensusState.bind(this),this.ConsensusStates=this.ConsensusStates.bind(this),this.ConsensusStateHeights=this.ConsensusStateHeights.bind(this),this.ClientStatus=this.ClientStatus.bind(this),this.ClientParams=this.ClientParams.bind(this),this.UpgradedClientState=this.UpgradedClientState.bind(this),this.UpgradedConsensusState=this.UpgradedConsensusState.bind(this)}}t.QueryClientImpl=A},42274:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MsgClientImpl=t.MsgSubmitMisbehaviourResponse=t.MsgSubmitMisbehaviour=t.MsgUpgradeClientResponse=t.MsgUpgradeClient=t.MsgUpdateClientResponse=t.MsgUpdateClient=t.MsgCreateClientResponse=t.MsgCreateClient=t.protobufPackage=void 0;let n=r(11879),i=r(46554),o=r(99133);function a(){return{clientState:void 0,consensusState:void 0,signer:""}}function s(){return{}}function l(){return{clientId:"",clientMessage:void 0,signer:""}}function u(){return{}}function d(){return{clientId:"",clientState:void 0,consensusState:void 0,proofUpgradeClient:new Uint8Array,proofUpgradeConsensusState:new Uint8Array,signer:""}}function c(){return{}}function p(){return{clientId:"",misbehaviour:void 0,signer:""}}function f(){return{}}t.protobufPackage="ibc.core.client.v1",t.MsgCreateClient={typeUrl:"/ibc.core.client.v1.MsgCreateClient",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();return void 0!==e.clientState&&n.Any.encode(e.clientState,t.uint32(10).fork()).ldelim(),void 0!==e.consensusState&&n.Any.encode(e.consensusState,t.uint32(18).fork()).ldelim(),""!==e.signer&&t.uint32(26).string(e.signer),t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),o=void 0===t?r.len:r.pos+t,s=a();for(;r.pos>>3){case 1:s.clientState=n.Any.decode(r,r.uint32());break;case 2:s.consensusState=n.Any.decode(r,r.uint32());break;case 3:s.signer=r.string();break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=a();return(0,o.isSet)(e.clientState)&&(t.clientState=n.Any.fromJSON(e.clientState)),(0,o.isSet)(e.consensusState)&&(t.consensusState=n.Any.fromJSON(e.consensusState)),(0,o.isSet)(e.signer)&&(t.signer=String(e.signer)),t},toJSON(e){let t={};return void 0!==e.clientState&&(t.clientState=e.clientState?n.Any.toJSON(e.clientState):void 0),void 0!==e.consensusState&&(t.consensusState=e.consensusState?n.Any.toJSON(e.consensusState):void 0),void 0!==e.signer&&(t.signer=e.signer),t},fromPartial(e){var t;let r=a();return void 0!==e.clientState&&null!==e.clientState&&(r.clientState=n.Any.fromPartial(e.clientState)),void 0!==e.consensusState&&null!==e.consensusState&&(r.consensusState=n.Any.fromPartial(e.consensusState)),r.signer=null!==(t=e.signer)&&void 0!==t?t:"",r}},t.MsgCreateClientResponse={typeUrl:"/ibc.core.client.v1.MsgCreateClientResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();return t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=s();for(;r.poss(),toJSON:e=>({}),fromPartial:e=>s()},t.MsgUpdateClient={typeUrl:"/ibc.core.client.v1.MsgUpdateClient",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();return""!==e.clientId&&t.uint32(10).string(e.clientId),void 0!==e.clientMessage&&n.Any.encode(e.clientMessage,t.uint32(18).fork()).ldelim(),""!==e.signer&&t.uint32(26).string(e.signer),t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),o=void 0===t?r.len:r.pos+t,a=l();for(;r.pos>>3){case 1:a.clientId=r.string();break;case 2:a.clientMessage=n.Any.decode(r,r.uint32());break;case 3:a.signer=r.string();break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=l();return(0,o.isSet)(e.clientId)&&(t.clientId=String(e.clientId)),(0,o.isSet)(e.clientMessage)&&(t.clientMessage=n.Any.fromJSON(e.clientMessage)),(0,o.isSet)(e.signer)&&(t.signer=String(e.signer)),t},toJSON(e){let t={};return void 0!==e.clientId&&(t.clientId=e.clientId),void 0!==e.clientMessage&&(t.clientMessage=e.clientMessage?n.Any.toJSON(e.clientMessage):void 0),void 0!==e.signer&&(t.signer=e.signer),t},fromPartial(e){var t,r;let i=l();return i.clientId=null!==(t=e.clientId)&&void 0!==t?t:"",void 0!==e.clientMessage&&null!==e.clientMessage&&(i.clientMessage=n.Any.fromPartial(e.clientMessage)),i.signer=null!==(r=e.signer)&&void 0!==r?r:"",i}},t.MsgUpdateClientResponse={typeUrl:"/ibc.core.client.v1.MsgUpdateClientResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();return t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=u();for(;r.posu(),toJSON:e=>({}),fromPartial:e=>u()},t.MsgUpgradeClient={typeUrl:"/ibc.core.client.v1.MsgUpgradeClient",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();return""!==e.clientId&&t.uint32(10).string(e.clientId),void 0!==e.clientState&&n.Any.encode(e.clientState,t.uint32(18).fork()).ldelim(),void 0!==e.consensusState&&n.Any.encode(e.consensusState,t.uint32(26).fork()).ldelim(),0!==e.proofUpgradeClient.length&&t.uint32(34).bytes(e.proofUpgradeClient),0!==e.proofUpgradeConsensusState.length&&t.uint32(42).bytes(e.proofUpgradeConsensusState),""!==e.signer&&t.uint32(50).string(e.signer),t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),o=void 0===t?r.len:r.pos+t,a=d();for(;r.pos>>3){case 1:a.clientId=r.string();break;case 2:a.clientState=n.Any.decode(r,r.uint32());break;case 3:a.consensusState=n.Any.decode(r,r.uint32());break;case 4:a.proofUpgradeClient=r.bytes();break;case 5:a.proofUpgradeConsensusState=r.bytes();break;case 6:a.signer=r.string();break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=d();return(0,o.isSet)(e.clientId)&&(t.clientId=String(e.clientId)),(0,o.isSet)(e.clientState)&&(t.clientState=n.Any.fromJSON(e.clientState)),(0,o.isSet)(e.consensusState)&&(t.consensusState=n.Any.fromJSON(e.consensusState)),(0,o.isSet)(e.proofUpgradeClient)&&(t.proofUpgradeClient=(0,o.bytesFromBase64)(e.proofUpgradeClient)),(0,o.isSet)(e.proofUpgradeConsensusState)&&(t.proofUpgradeConsensusState=(0,o.bytesFromBase64)(e.proofUpgradeConsensusState)),(0,o.isSet)(e.signer)&&(t.signer=String(e.signer)),t},toJSON(e){let t={};return void 0!==e.clientId&&(t.clientId=e.clientId),void 0!==e.clientState&&(t.clientState=e.clientState?n.Any.toJSON(e.clientState):void 0),void 0!==e.consensusState&&(t.consensusState=e.consensusState?n.Any.toJSON(e.consensusState):void 0),void 0!==e.proofUpgradeClient&&(t.proofUpgradeClient=(0,o.base64FromBytes)(void 0!==e.proofUpgradeClient?e.proofUpgradeClient:new Uint8Array)),void 0!==e.proofUpgradeConsensusState&&(t.proofUpgradeConsensusState=(0,o.base64FromBytes)(void 0!==e.proofUpgradeConsensusState?e.proofUpgradeConsensusState:new Uint8Array)),void 0!==e.signer&&(t.signer=e.signer),t},fromPartial(e){var t,r,i,o;let a=d();return a.clientId=null!==(t=e.clientId)&&void 0!==t?t:"",void 0!==e.clientState&&null!==e.clientState&&(a.clientState=n.Any.fromPartial(e.clientState)),void 0!==e.consensusState&&null!==e.consensusState&&(a.consensusState=n.Any.fromPartial(e.consensusState)),a.proofUpgradeClient=null!==(r=e.proofUpgradeClient)&&void 0!==r?r:new Uint8Array,a.proofUpgradeConsensusState=null!==(i=e.proofUpgradeConsensusState)&&void 0!==i?i:new Uint8Array,a.signer=null!==(o=e.signer)&&void 0!==o?o:"",a}},t.MsgUpgradeClientResponse={typeUrl:"/ibc.core.client.v1.MsgUpgradeClientResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();return t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=c();for(;r.posc(),toJSON:e=>({}),fromPartial:e=>c()},t.MsgSubmitMisbehaviour={typeUrl:"/ibc.core.client.v1.MsgSubmitMisbehaviour",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();return""!==e.clientId&&t.uint32(10).string(e.clientId),void 0!==e.misbehaviour&&n.Any.encode(e.misbehaviour,t.uint32(18).fork()).ldelim(),""!==e.signer&&t.uint32(26).string(e.signer),t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),o=void 0===t?r.len:r.pos+t,a=p();for(;r.pos>>3){case 1:a.clientId=r.string();break;case 2:a.misbehaviour=n.Any.decode(r,r.uint32());break;case 3:a.signer=r.string();break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=p();return(0,o.isSet)(e.clientId)&&(t.clientId=String(e.clientId)),(0,o.isSet)(e.misbehaviour)&&(t.misbehaviour=n.Any.fromJSON(e.misbehaviour)),(0,o.isSet)(e.signer)&&(t.signer=String(e.signer)),t},toJSON(e){let t={};return void 0!==e.clientId&&(t.clientId=e.clientId),void 0!==e.misbehaviour&&(t.misbehaviour=e.misbehaviour?n.Any.toJSON(e.misbehaviour):void 0),void 0!==e.signer&&(t.signer=e.signer),t},fromPartial(e){var t,r;let i=p();return i.clientId=null!==(t=e.clientId)&&void 0!==t?t:"",void 0!==e.misbehaviour&&null!==e.misbehaviour&&(i.misbehaviour=n.Any.fromPartial(e.misbehaviour)),i.signer=null!==(r=e.signer)&&void 0!==r?r:"",i}},t.MsgSubmitMisbehaviourResponse={typeUrl:"/ibc.core.client.v1.MsgSubmitMisbehaviourResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();return t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=f();for(;r.posf(),toJSON:e=>({}),fromPartial:e=>f()};class h{CreateClient(e){let r=t.MsgCreateClient.encode(e).finish();return this.rpc.request("ibc.core.client.v1.Msg","CreateClient",r).then(e=>t.MsgCreateClientResponse.decode(new i.BinaryReader(e)))}UpdateClient(e){let r=t.MsgUpdateClient.encode(e).finish();return this.rpc.request("ibc.core.client.v1.Msg","UpdateClient",r).then(e=>t.MsgUpdateClientResponse.decode(new i.BinaryReader(e)))}UpgradeClient(e){let r=t.MsgUpgradeClient.encode(e).finish();return this.rpc.request("ibc.core.client.v1.Msg","UpgradeClient",r).then(e=>t.MsgUpgradeClientResponse.decode(new i.BinaryReader(e)))}SubmitMisbehaviour(e){let r=t.MsgSubmitMisbehaviour.encode(e).finish();return this.rpc.request("ibc.core.client.v1.Msg","SubmitMisbehaviour",r).then(e=>t.MsgSubmitMisbehaviourResponse.decode(new i.BinaryReader(e)))}constructor(e){this.rpc=e,this.CreateClient=this.CreateClient.bind(this),this.UpdateClient=this.UpdateClient.bind(this),this.UpgradeClient=this.UpgradeClient.bind(this),this.SubmitMisbehaviour=this.SubmitMisbehaviour.bind(this)}}t.MsgClientImpl=h},56891:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MerkleProof=t.MerklePath=t.MerklePrefix=t.MerkleRoot=t.protobufPackage=void 0;let n=r(88401),i=r(46554),o=r(99133);function a(){return{hash:new Uint8Array}}function s(){return{keyPrefix:new Uint8Array}}function l(){return{keyPath:[]}}function u(){return{proofs:[]}}t.protobufPackage="ibc.core.commitment.v1",t.MerkleRoot={typeUrl:"/ibc.core.commitment.v1.MerkleRoot",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();return 0!==e.hash.length&&t.uint32(10).bytes(e.hash),t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=a();for(;r.pos>>3==1?o.hash=r.bytes():r.skipType(7&e)}return o},fromJSON(e){let t=a();return(0,o.isSet)(e.hash)&&(t.hash=(0,o.bytesFromBase64)(e.hash)),t},toJSON(e){let t={};return void 0!==e.hash&&(t.hash=(0,o.base64FromBytes)(void 0!==e.hash?e.hash:new Uint8Array)),t},fromPartial(e){var t;let r=a();return r.hash=null!==(t=e.hash)&&void 0!==t?t:new Uint8Array,r}},t.MerklePrefix={typeUrl:"/ibc.core.commitment.v1.MerklePrefix",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();return 0!==e.keyPrefix.length&&t.uint32(10).bytes(e.keyPrefix),t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=s();for(;r.pos>>3==1?o.keyPrefix=r.bytes():r.skipType(7&e)}return o},fromJSON(e){let t=s();return(0,o.isSet)(e.keyPrefix)&&(t.keyPrefix=(0,o.bytesFromBase64)(e.keyPrefix)),t},toJSON(e){let t={};return void 0!==e.keyPrefix&&(t.keyPrefix=(0,o.base64FromBytes)(void 0!==e.keyPrefix?e.keyPrefix:new Uint8Array)),t},fromPartial(e){var t;let r=s();return r.keyPrefix=null!==(t=e.keyPrefix)&&void 0!==t?t:new Uint8Array,r}},t.MerklePath={typeUrl:"/ibc.core.commitment.v1.MerklePath",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();for(let r of e.keyPath)t.uint32(10).string(r);return t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=l();for(;r.pos>>3==1?o.keyPath.push(r.string()):r.skipType(7&e)}return o},fromJSON(e){let t=l();return Array.isArray(null==e?void 0:e.keyPath)&&(t.keyPath=e.keyPath.map(e=>String(e))),t},toJSON(e){let t={};return e.keyPath?t.keyPath=e.keyPath.map(e=>e):t.keyPath=[],t},fromPartial(e){var t;let r=l();return r.keyPath=(null===(t=e.keyPath)||void 0===t?void 0:t.map(e=>e))||[],r}},t.MerkleProof={typeUrl:"/ibc.core.commitment.v1.MerkleProof",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();for(let r of e.proofs)n.CommitmentProof.encode(r,t.uint32(10).fork()).ldelim();return t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),o=void 0===t?r.len:r.pos+t,a=u();for(;r.pos>>3==1?a.proofs.push(n.CommitmentProof.decode(r,r.uint32())):r.skipType(7&e)}return a},fromJSON(e){let t=u();return Array.isArray(null==e?void 0:e.proofs)&&(t.proofs=e.proofs.map(e=>n.CommitmentProof.fromJSON(e))),t},toJSON(e){let t={};return e.proofs?t.proofs=e.proofs.map(e=>e?n.CommitmentProof.toJSON(e):void 0):t.proofs=[],t},fromPartial(e){var t;let r=u();return r.proofs=(null===(t=e.proofs)||void 0===t?void 0:t.map(e=>n.CommitmentProof.fromPartial(e)))||[],r}}},9496:function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Params=t.Version=t.ConnectionPaths=t.ClientPaths=t.Counterparty=t.IdentifiedConnection=t.ConnectionEnd=t.stateToJSON=t.stateFromJSON=t.State=t.protobufPackage=void 0;let i=r(56891),o=r(46554),a=r(99133);function s(e){switch(e){case 0:case"STATE_UNINITIALIZED_UNSPECIFIED":return n.STATE_UNINITIALIZED_UNSPECIFIED;case 1:case"STATE_INIT":return n.STATE_INIT;case 2:case"STATE_TRYOPEN":return n.STATE_TRYOPEN;case 3:case"STATE_OPEN":return n.STATE_OPEN;default:return n.UNRECOGNIZED}}function l(e){switch(e){case n.STATE_UNINITIALIZED_UNSPECIFIED:return"STATE_UNINITIALIZED_UNSPECIFIED";case n.STATE_INIT:return"STATE_INIT";case n.STATE_TRYOPEN:return"STATE_TRYOPEN";case n.STATE_OPEN:return"STATE_OPEN";case n.UNRECOGNIZED:default:return"UNRECOGNIZED"}}function u(){return{clientId:"",versions:[],state:0,counterparty:t.Counterparty.fromPartial({}),delayPeriod:BigInt(0)}}function d(){return{id:"",clientId:"",versions:[],state:0,counterparty:t.Counterparty.fromPartial({}),delayPeriod:BigInt(0)}}function c(){return{clientId:"",connectionId:"",prefix:i.MerklePrefix.fromPartial({})}}function p(){return{paths:[]}}function f(){return{clientId:"",paths:[]}}function h(){return{identifier:"",features:[]}}function g(){return{maxExpectedTimePerBlock:BigInt(0)}}t.protobufPackage="ibc.core.connection.v1",function(e){e[e.STATE_UNINITIALIZED_UNSPECIFIED=0]="STATE_UNINITIALIZED_UNSPECIFIED",e[e.STATE_INIT=1]="STATE_INIT",e[e.STATE_TRYOPEN=2]="STATE_TRYOPEN",e[e.STATE_OPEN=3]="STATE_OPEN",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(n||(t.State=n={})),t.stateFromJSON=s,t.stateToJSON=l,t.ConnectionEnd={typeUrl:"/ibc.core.connection.v1.ConnectionEnd",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let n of(""!==e.clientId&&r.uint32(10).string(e.clientId),e.versions))t.Version.encode(n,r.uint32(18).fork()).ldelim();return 0!==e.state&&r.uint32(24).int32(e.state),void 0!==e.counterparty&&t.Counterparty.encode(e.counterparty,r.uint32(34).fork()).ldelim(),e.delayPeriod!==BigInt(0)&&r.uint32(40).uint64(e.delayPeriod),r},decode(e,r){let n=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===r?n.len:n.pos+r,a=u();for(;n.pos>>3){case 1:a.clientId=n.string();break;case 2:a.versions.push(t.Version.decode(n,n.uint32()));break;case 3:a.state=n.int32();break;case 4:a.counterparty=t.Counterparty.decode(n,n.uint32());break;case 5:a.delayPeriod=n.uint64();break;default:n.skipType(7&e)}}return a},fromJSON(e){let r=u();return(0,a.isSet)(e.clientId)&&(r.clientId=String(e.clientId)),Array.isArray(null==e?void 0:e.versions)&&(r.versions=e.versions.map(e=>t.Version.fromJSON(e))),(0,a.isSet)(e.state)&&(r.state=s(e.state)),(0,a.isSet)(e.counterparty)&&(r.counterparty=t.Counterparty.fromJSON(e.counterparty)),(0,a.isSet)(e.delayPeriod)&&(r.delayPeriod=BigInt(e.delayPeriod.toString())),r},toJSON(e){let r={};return void 0!==e.clientId&&(r.clientId=e.clientId),e.versions?r.versions=e.versions.map(e=>e?t.Version.toJSON(e):void 0):r.versions=[],void 0!==e.state&&(r.state=l(e.state)),void 0!==e.counterparty&&(r.counterparty=e.counterparty?t.Counterparty.toJSON(e.counterparty):void 0),void 0!==e.delayPeriod&&(r.delayPeriod=(e.delayPeriod||BigInt(0)).toString()),r},fromPartial(e){var r,n,i;let o=u();return o.clientId=null!==(n=e.clientId)&&void 0!==n?n:"",o.versions=(null===(r=e.versions)||void 0===r?void 0:r.map(e=>t.Version.fromPartial(e)))||[],o.state=null!==(i=e.state)&&void 0!==i?i:0,void 0!==e.counterparty&&null!==e.counterparty&&(o.counterparty=t.Counterparty.fromPartial(e.counterparty)),void 0!==e.delayPeriod&&null!==e.delayPeriod&&(o.delayPeriod=BigInt(e.delayPeriod.toString())),o}},t.IdentifiedConnection={typeUrl:"/ibc.core.connection.v1.IdentifiedConnection",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let n of(""!==e.id&&r.uint32(10).string(e.id),""!==e.clientId&&r.uint32(18).string(e.clientId),e.versions))t.Version.encode(n,r.uint32(26).fork()).ldelim();return 0!==e.state&&r.uint32(32).int32(e.state),void 0!==e.counterparty&&t.Counterparty.encode(e.counterparty,r.uint32(42).fork()).ldelim(),e.delayPeriod!==BigInt(0)&&r.uint32(48).uint64(e.delayPeriod),r},decode(e,r){let n=e instanceof o.BinaryReader?e:new o.BinaryReader(e),i=void 0===r?n.len:n.pos+r,a=d();for(;n.pos>>3){case 1:a.id=n.string();break;case 2:a.clientId=n.string();break;case 3:a.versions.push(t.Version.decode(n,n.uint32()));break;case 4:a.state=n.int32();break;case 5:a.counterparty=t.Counterparty.decode(n,n.uint32());break;case 6:a.delayPeriod=n.uint64();break;default:n.skipType(7&e)}}return a},fromJSON(e){let r=d();return(0,a.isSet)(e.id)&&(r.id=String(e.id)),(0,a.isSet)(e.clientId)&&(r.clientId=String(e.clientId)),Array.isArray(null==e?void 0:e.versions)&&(r.versions=e.versions.map(e=>t.Version.fromJSON(e))),(0,a.isSet)(e.state)&&(r.state=s(e.state)),(0,a.isSet)(e.counterparty)&&(r.counterparty=t.Counterparty.fromJSON(e.counterparty)),(0,a.isSet)(e.delayPeriod)&&(r.delayPeriod=BigInt(e.delayPeriod.toString())),r},toJSON(e){let r={};return void 0!==e.id&&(r.id=e.id),void 0!==e.clientId&&(r.clientId=e.clientId),e.versions?r.versions=e.versions.map(e=>e?t.Version.toJSON(e):void 0):r.versions=[],void 0!==e.state&&(r.state=l(e.state)),void 0!==e.counterparty&&(r.counterparty=e.counterparty?t.Counterparty.toJSON(e.counterparty):void 0),void 0!==e.delayPeriod&&(r.delayPeriod=(e.delayPeriod||BigInt(0)).toString()),r},fromPartial(e){var r,n,i,o;let a=d();return a.id=null!==(n=e.id)&&void 0!==n?n:"",a.clientId=null!==(i=e.clientId)&&void 0!==i?i:"",a.versions=(null===(r=e.versions)||void 0===r?void 0:r.map(e=>t.Version.fromPartial(e)))||[],a.state=null!==(o=e.state)&&void 0!==o?o:0,void 0!==e.counterparty&&null!==e.counterparty&&(a.counterparty=t.Counterparty.fromPartial(e.counterparty)),void 0!==e.delayPeriod&&null!==e.delayPeriod&&(a.delayPeriod=BigInt(e.delayPeriod.toString())),a}},t.Counterparty={typeUrl:"/ibc.core.connection.v1.Counterparty",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return""!==e.clientId&&t.uint32(10).string(e.clientId),""!==e.connectionId&&t.uint32(18).string(e.connectionId),void 0!==e.prefix&&i.MerklePrefix.encode(e.prefix,t.uint32(26).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,a=c();for(;r.pos>>3){case 1:a.clientId=r.string();break;case 2:a.connectionId=r.string();break;case 3:a.prefix=i.MerklePrefix.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=c();return(0,a.isSet)(e.clientId)&&(t.clientId=String(e.clientId)),(0,a.isSet)(e.connectionId)&&(t.connectionId=String(e.connectionId)),(0,a.isSet)(e.prefix)&&(t.prefix=i.MerklePrefix.fromJSON(e.prefix)),t},toJSON(e){let t={};return void 0!==e.clientId&&(t.clientId=e.clientId),void 0!==e.connectionId&&(t.connectionId=e.connectionId),void 0!==e.prefix&&(t.prefix=e.prefix?i.MerklePrefix.toJSON(e.prefix):void 0),t},fromPartial(e){var t,r;let n=c();return n.clientId=null!==(t=e.clientId)&&void 0!==t?t:"",n.connectionId=null!==(r=e.connectionId)&&void 0!==r?r:"",void 0!==e.prefix&&null!==e.prefix&&(n.prefix=i.MerklePrefix.fromPartial(e.prefix)),n}},t.ClientPaths={typeUrl:"/ibc.core.connection.v1.ClientPaths",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of e.paths)t.uint32(10).string(r);return t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=p();for(;r.pos>>3==1?i.paths.push(r.string()):r.skipType(7&e)}return i},fromJSON(e){let t=p();return Array.isArray(null==e?void 0:e.paths)&&(t.paths=e.paths.map(e=>String(e))),t},toJSON(e){let t={};return e.paths?t.paths=e.paths.map(e=>e):t.paths=[],t},fromPartial(e){var t;let r=p();return r.paths=(null===(t=e.paths)||void 0===t?void 0:t.map(e=>e))||[],r}},t.ConnectionPaths={typeUrl:"/ibc.core.connection.v1.ConnectionPaths",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of(""!==e.clientId&&t.uint32(10).string(e.clientId),e.paths))t.uint32(18).string(r);return t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=f();for(;r.pos>>3){case 1:i.clientId=r.string();break;case 2:i.paths.push(r.string());break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=f();return(0,a.isSet)(e.clientId)&&(t.clientId=String(e.clientId)),Array.isArray(null==e?void 0:e.paths)&&(t.paths=e.paths.map(e=>String(e))),t},toJSON(e){let t={};return void 0!==e.clientId&&(t.clientId=e.clientId),e.paths?t.paths=e.paths.map(e=>e):t.paths=[],t},fromPartial(e){var t,r;let n=f();return n.clientId=null!==(r=e.clientId)&&void 0!==r?r:"",n.paths=(null===(t=e.paths)||void 0===t?void 0:t.map(e=>e))||[],n}},t.Version={typeUrl:"/ibc.core.connection.v1.Version",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();for(let r of(""!==e.identifier&&t.uint32(10).string(e.identifier),e.features))t.uint32(18).string(r);return t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=h();for(;r.pos>>3){case 1:i.identifier=r.string();break;case 2:i.features.push(r.string());break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=h();return(0,a.isSet)(e.identifier)&&(t.identifier=String(e.identifier)),Array.isArray(null==e?void 0:e.features)&&(t.features=e.features.map(e=>String(e))),t},toJSON(e){let t={};return void 0!==e.identifier&&(t.identifier=e.identifier),e.features?t.features=e.features.map(e=>e):t.features=[],t},fromPartial(e){var t,r;let n=h();return n.identifier=null!==(r=e.identifier)&&void 0!==r?r:"",n.features=(null===(t=e.features)||void 0===t?void 0:t.map(e=>e))||[],n}},t.Params={typeUrl:"/ibc.core.connection.v1.Params",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return e.maxExpectedTimePerBlock!==BigInt(0)&&t.uint32(8).uint64(e.maxExpectedTimePerBlock),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=g();for(;r.pos>>3==1?i.maxExpectedTimePerBlock=r.uint64():r.skipType(7&e)}return i},fromJSON(e){let t=g();return(0,a.isSet)(e.maxExpectedTimePerBlock)&&(t.maxExpectedTimePerBlock=BigInt(e.maxExpectedTimePerBlock.toString())),t},toJSON(e){let t={};return void 0!==e.maxExpectedTimePerBlock&&(t.maxExpectedTimePerBlock=(e.maxExpectedTimePerBlock||BigInt(0)).toString()),t},fromPartial(e){let t=g();return void 0!==e.maxExpectedTimePerBlock&&null!==e.maxExpectedTimePerBlock&&(t.maxExpectedTimePerBlock=BigInt(e.maxExpectedTimePerBlock.toString())),t}}},66784:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QueryClientImpl=t.QueryConnectionParamsResponse=t.QueryConnectionParamsRequest=t.QueryConnectionConsensusStateResponse=t.QueryConnectionConsensusStateRequest=t.QueryConnectionClientStateResponse=t.QueryConnectionClientStateRequest=t.QueryClientConnectionsResponse=t.QueryClientConnectionsRequest=t.QueryConnectionsResponse=t.QueryConnectionsRequest=t.QueryConnectionResponse=t.QueryConnectionRequest=t.protobufPackage=void 0;let n=r(86141),i=r(9496),o=r(23489),a=r(11879),s=r(46554),l=r(99133);function u(){return{connectionId:""}}function d(){return{connection:void 0,proof:new Uint8Array,proofHeight:o.Height.fromPartial({})}}function c(){return{pagination:void 0}}function p(){return{connections:[],pagination:void 0,height:o.Height.fromPartial({})}}function f(){return{clientId:""}}function h(){return{connectionPaths:[],proof:new Uint8Array,proofHeight:o.Height.fromPartial({})}}function g(){return{connectionId:""}}function m(){return{identifiedClientState:void 0,proof:new Uint8Array,proofHeight:o.Height.fromPartial({})}}function y(){return{connectionId:"",revisionNumber:BigInt(0),revisionHeight:BigInt(0)}}function v(){return{consensusState:void 0,clientId:"",proof:new Uint8Array,proofHeight:o.Height.fromPartial({})}}function b(){return{}}function S(){return{params:void 0}}t.protobufPackage="ibc.core.connection.v1",t.QueryConnectionRequest={typeUrl:"/ibc.core.connection.v1.QueryConnectionRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return""!==e.connectionId&&t.uint32(10).string(e.connectionId),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=u();for(;r.pos>>3==1?i.connectionId=r.string():r.skipType(7&e)}return i},fromJSON(e){let t=u();return(0,l.isSet)(e.connectionId)&&(t.connectionId=String(e.connectionId)),t},toJSON(e){let t={};return void 0!==e.connectionId&&(t.connectionId=e.connectionId),t},fromPartial(e){var t;let r=u();return r.connectionId=null!==(t=e.connectionId)&&void 0!==t?t:"",r}},t.QueryConnectionResponse={typeUrl:"/ibc.core.connection.v1.QueryConnectionResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return void 0!==e.connection&&i.ConnectionEnd.encode(e.connection,t.uint32(10).fork()).ldelim(),0!==e.proof.length&&t.uint32(18).bytes(e.proof),void 0!==e.proofHeight&&o.Height.encode(e.proofHeight,t.uint32(26).fork()).ldelim(),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,a=d();for(;r.pos>>3){case 1:a.connection=i.ConnectionEnd.decode(r,r.uint32());break;case 2:a.proof=r.bytes();break;case 3:a.proofHeight=o.Height.decode(r,r.uint32());break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=d();return(0,l.isSet)(e.connection)&&(t.connection=i.ConnectionEnd.fromJSON(e.connection)),(0,l.isSet)(e.proof)&&(t.proof=(0,l.bytesFromBase64)(e.proof)),(0,l.isSet)(e.proofHeight)&&(t.proofHeight=o.Height.fromJSON(e.proofHeight)),t},toJSON(e){let t={};return void 0!==e.connection&&(t.connection=e.connection?i.ConnectionEnd.toJSON(e.connection):void 0),void 0!==e.proof&&(t.proof=(0,l.base64FromBytes)(void 0!==e.proof?e.proof:new Uint8Array)),void 0!==e.proofHeight&&(t.proofHeight=e.proofHeight?o.Height.toJSON(e.proofHeight):void 0),t},fromPartial(e){var t;let r=d();return void 0!==e.connection&&null!==e.connection&&(r.connection=i.ConnectionEnd.fromPartial(e.connection)),r.proof=null!==(t=e.proof)&&void 0!==t?t:new Uint8Array,void 0!==e.proofHeight&&null!==e.proofHeight&&(r.proofHeight=o.Height.fromPartial(e.proofHeight)),r}},t.QueryConnectionsRequest={typeUrl:"/ibc.core.connection.v1.QueryConnectionsRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return void 0!==e.pagination&&n.PageRequest.encode(e.pagination,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),i=void 0===t?r.len:r.pos+t,o=c();for(;r.pos>>3==1?o.pagination=n.PageRequest.decode(r,r.uint32()):r.skipType(7&e)}return o},fromJSON(e){let t=c();return(0,l.isSet)(e.pagination)&&(t.pagination=n.PageRequest.fromJSON(e.pagination)),t},toJSON(e){let t={};return void 0!==e.pagination&&(t.pagination=e.pagination?n.PageRequest.toJSON(e.pagination):void 0),t},fromPartial(e){let t=c();return void 0!==e.pagination&&null!==e.pagination&&(t.pagination=n.PageRequest.fromPartial(e.pagination)),t}},t.QueryConnectionsResponse={typeUrl:"/ibc.core.connection.v1.QueryConnectionsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();for(let r of e.connections)i.IdentifiedConnection.encode(r,t.uint32(10).fork()).ldelim();return void 0!==e.pagination&&n.PageResponse.encode(e.pagination,t.uint32(18).fork()).ldelim(),void 0!==e.height&&o.Height.encode(e.height,t.uint32(26).fork()).ldelim(),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),a=void 0===t?r.len:r.pos+t,l=p();for(;r.pos>>3){case 1:l.connections.push(i.IdentifiedConnection.decode(r,r.uint32()));break;case 2:l.pagination=n.PageResponse.decode(r,r.uint32());break;case 3:l.height=o.Height.decode(r,r.uint32());break;default:r.skipType(7&e)}}return l},fromJSON(e){let t=p();return Array.isArray(null==e?void 0:e.connections)&&(t.connections=e.connections.map(e=>i.IdentifiedConnection.fromJSON(e))),(0,l.isSet)(e.pagination)&&(t.pagination=n.PageResponse.fromJSON(e.pagination)),(0,l.isSet)(e.height)&&(t.height=o.Height.fromJSON(e.height)),t},toJSON(e){let t={};return e.connections?t.connections=e.connections.map(e=>e?i.IdentifiedConnection.toJSON(e):void 0):t.connections=[],void 0!==e.pagination&&(t.pagination=e.pagination?n.PageResponse.toJSON(e.pagination):void 0),void 0!==e.height&&(t.height=e.height?o.Height.toJSON(e.height):void 0),t},fromPartial(e){var t;let r=p();return r.connections=(null===(t=e.connections)||void 0===t?void 0:t.map(e=>i.IdentifiedConnection.fromPartial(e)))||[],void 0!==e.pagination&&null!==e.pagination&&(r.pagination=n.PageResponse.fromPartial(e.pagination)),void 0!==e.height&&null!==e.height&&(r.height=o.Height.fromPartial(e.height)),r}},t.QueryClientConnectionsRequest={typeUrl:"/ibc.core.connection.v1.QueryClientConnectionsRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return""!==e.clientId&&t.uint32(10).string(e.clientId),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=f();for(;r.pos>>3==1?i.clientId=r.string():r.skipType(7&e)}return i},fromJSON(e){let t=f();return(0,l.isSet)(e.clientId)&&(t.clientId=String(e.clientId)),t},toJSON(e){let t={};return void 0!==e.clientId&&(t.clientId=e.clientId),t},fromPartial(e){var t;let r=f();return r.clientId=null!==(t=e.clientId)&&void 0!==t?t:"",r}},t.QueryClientConnectionsResponse={typeUrl:"/ibc.core.connection.v1.QueryClientConnectionsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();for(let r of e.connectionPaths)t.uint32(10).string(r);return 0!==e.proof.length&&t.uint32(18).bytes(e.proof),void 0!==e.proofHeight&&o.Height.encode(e.proofHeight,t.uint32(26).fork()).ldelim(),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=h();for(;r.pos>>3){case 1:i.connectionPaths.push(r.string());break;case 2:i.proof=r.bytes();break;case 3:i.proofHeight=o.Height.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=h();return Array.isArray(null==e?void 0:e.connectionPaths)&&(t.connectionPaths=e.connectionPaths.map(e=>String(e))),(0,l.isSet)(e.proof)&&(t.proof=(0,l.bytesFromBase64)(e.proof)),(0,l.isSet)(e.proofHeight)&&(t.proofHeight=o.Height.fromJSON(e.proofHeight)),t},toJSON(e){let t={};return e.connectionPaths?t.connectionPaths=e.connectionPaths.map(e=>e):t.connectionPaths=[],void 0!==e.proof&&(t.proof=(0,l.base64FromBytes)(void 0!==e.proof?e.proof:new Uint8Array)),void 0!==e.proofHeight&&(t.proofHeight=e.proofHeight?o.Height.toJSON(e.proofHeight):void 0),t},fromPartial(e){var t,r;let n=h();return n.connectionPaths=(null===(t=e.connectionPaths)||void 0===t?void 0:t.map(e=>e))||[],n.proof=null!==(r=e.proof)&&void 0!==r?r:new Uint8Array,void 0!==e.proofHeight&&null!==e.proofHeight&&(n.proofHeight=o.Height.fromPartial(e.proofHeight)),n}},t.QueryConnectionClientStateRequest={typeUrl:"/ibc.core.connection.v1.QueryConnectionClientStateRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return""!==e.connectionId&&t.uint32(10).string(e.connectionId),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=g();for(;r.pos>>3==1?i.connectionId=r.string():r.skipType(7&e)}return i},fromJSON(e){let t=g();return(0,l.isSet)(e.connectionId)&&(t.connectionId=String(e.connectionId)),t},toJSON(e){let t={};return void 0!==e.connectionId&&(t.connectionId=e.connectionId),t},fromPartial(e){var t;let r=g();return r.connectionId=null!==(t=e.connectionId)&&void 0!==t?t:"",r}},t.QueryConnectionClientStateResponse={typeUrl:"/ibc.core.connection.v1.QueryConnectionClientStateResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return void 0!==e.identifiedClientState&&o.IdentifiedClientState.encode(e.identifiedClientState,t.uint32(10).fork()).ldelim(),0!==e.proof.length&&t.uint32(18).bytes(e.proof),void 0!==e.proofHeight&&o.Height.encode(e.proofHeight,t.uint32(26).fork()).ldelim(),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=m();for(;r.pos>>3){case 1:i.identifiedClientState=o.IdentifiedClientState.decode(r,r.uint32());break;case 2:i.proof=r.bytes();break;case 3:i.proofHeight=o.Height.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=m();return(0,l.isSet)(e.identifiedClientState)&&(t.identifiedClientState=o.IdentifiedClientState.fromJSON(e.identifiedClientState)),(0,l.isSet)(e.proof)&&(t.proof=(0,l.bytesFromBase64)(e.proof)),(0,l.isSet)(e.proofHeight)&&(t.proofHeight=o.Height.fromJSON(e.proofHeight)),t},toJSON(e){let t={};return void 0!==e.identifiedClientState&&(t.identifiedClientState=e.identifiedClientState?o.IdentifiedClientState.toJSON(e.identifiedClientState):void 0),void 0!==e.proof&&(t.proof=(0,l.base64FromBytes)(void 0!==e.proof?e.proof:new Uint8Array)),void 0!==e.proofHeight&&(t.proofHeight=e.proofHeight?o.Height.toJSON(e.proofHeight):void 0),t},fromPartial(e){var t;let r=m();return void 0!==e.identifiedClientState&&null!==e.identifiedClientState&&(r.identifiedClientState=o.IdentifiedClientState.fromPartial(e.identifiedClientState)),r.proof=null!==(t=e.proof)&&void 0!==t?t:new Uint8Array,void 0!==e.proofHeight&&null!==e.proofHeight&&(r.proofHeight=o.Height.fromPartial(e.proofHeight)),r}},t.QueryConnectionConsensusStateRequest={typeUrl:"/ibc.core.connection.v1.QueryConnectionConsensusStateRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return""!==e.connectionId&&t.uint32(10).string(e.connectionId),e.revisionNumber!==BigInt(0)&&t.uint32(16).uint64(e.revisionNumber),e.revisionHeight!==BigInt(0)&&t.uint32(24).uint64(e.revisionHeight),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=y();for(;r.pos>>3){case 1:i.connectionId=r.string();break;case 2:i.revisionNumber=r.uint64();break;case 3:i.revisionHeight=r.uint64();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=y();return(0,l.isSet)(e.connectionId)&&(t.connectionId=String(e.connectionId)),(0,l.isSet)(e.revisionNumber)&&(t.revisionNumber=BigInt(e.revisionNumber.toString())),(0,l.isSet)(e.revisionHeight)&&(t.revisionHeight=BigInt(e.revisionHeight.toString())),t},toJSON(e){let t={};return void 0!==e.connectionId&&(t.connectionId=e.connectionId),void 0!==e.revisionNumber&&(t.revisionNumber=(e.revisionNumber||BigInt(0)).toString()),void 0!==e.revisionHeight&&(t.revisionHeight=(e.revisionHeight||BigInt(0)).toString()),t},fromPartial(e){var t;let r=y();return r.connectionId=null!==(t=e.connectionId)&&void 0!==t?t:"",void 0!==e.revisionNumber&&null!==e.revisionNumber&&(r.revisionNumber=BigInt(e.revisionNumber.toString())),void 0!==e.revisionHeight&&null!==e.revisionHeight&&(r.revisionHeight=BigInt(e.revisionHeight.toString())),r}},t.QueryConnectionConsensusStateResponse={typeUrl:"/ibc.core.connection.v1.QueryConnectionConsensusStateResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return void 0!==e.consensusState&&a.Any.encode(e.consensusState,t.uint32(10).fork()).ldelim(),""!==e.clientId&&t.uint32(18).string(e.clientId),0!==e.proof.length&&t.uint32(26).bytes(e.proof),void 0!==e.proofHeight&&o.Height.encode(e.proofHeight,t.uint32(34).fork()).ldelim(),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=v();for(;r.pos>>3){case 1:i.consensusState=a.Any.decode(r,r.uint32());break;case 2:i.clientId=r.string();break;case 3:i.proof=r.bytes();break;case 4:i.proofHeight=o.Height.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=v();return(0,l.isSet)(e.consensusState)&&(t.consensusState=a.Any.fromJSON(e.consensusState)),(0,l.isSet)(e.clientId)&&(t.clientId=String(e.clientId)),(0,l.isSet)(e.proof)&&(t.proof=(0,l.bytesFromBase64)(e.proof)),(0,l.isSet)(e.proofHeight)&&(t.proofHeight=o.Height.fromJSON(e.proofHeight)),t},toJSON(e){let t={};return void 0!==e.consensusState&&(t.consensusState=e.consensusState?a.Any.toJSON(e.consensusState):void 0),void 0!==e.clientId&&(t.clientId=e.clientId),void 0!==e.proof&&(t.proof=(0,l.base64FromBytes)(void 0!==e.proof?e.proof:new Uint8Array)),void 0!==e.proofHeight&&(t.proofHeight=e.proofHeight?o.Height.toJSON(e.proofHeight):void 0),t},fromPartial(e){var t,r;let n=v();return void 0!==e.consensusState&&null!==e.consensusState&&(n.consensusState=a.Any.fromPartial(e.consensusState)),n.clientId=null!==(t=e.clientId)&&void 0!==t?t:"",n.proof=null!==(r=e.proof)&&void 0!==r?r:new Uint8Array,void 0!==e.proofHeight&&null!==e.proofHeight&&(n.proofHeight=o.Height.fromPartial(e.proofHeight)),n}},t.QueryConnectionParamsRequest={typeUrl:"/ibc.core.connection.v1.QueryConnectionParamsRequest",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=b();for(;r.posb(),toJSON:e=>({}),fromPartial:e=>b()},t.QueryConnectionParamsResponse={typeUrl:"/ibc.core.connection.v1.QueryConnectionParamsResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.BinaryWriter.create();return void 0!==e.params&&o.Params.encode(e.params,t.uint32(10).fork()).ldelim(),t},decode(e,t){let r=e instanceof s.BinaryReader?e:new s.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=S();for(;r.pos>>3==1?i.params=o.Params.decode(r,r.uint32()):r.skipType(7&e)}return i},fromJSON(e){let t=S();return(0,l.isSet)(e.params)&&(t.params=o.Params.fromJSON(e.params)),t},toJSON(e){let t={};return void 0!==e.params&&(t.params=e.params?o.Params.toJSON(e.params):void 0),t},fromPartial(e){let t=S();return void 0!==e.params&&null!==e.params&&(t.params=o.Params.fromPartial(e.params)),t}};class w{Connection(e){let r=t.QueryConnectionRequest.encode(e).finish();return this.rpc.request("ibc.core.connection.v1.Query","Connection",r).then(e=>t.QueryConnectionResponse.decode(new s.BinaryReader(e)))}Connections(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{pagination:n.PageRequest.fromPartial({})},r=t.QueryConnectionsRequest.encode(e).finish();return this.rpc.request("ibc.core.connection.v1.Query","Connections",r).then(e=>t.QueryConnectionsResponse.decode(new s.BinaryReader(e)))}ClientConnections(e){let r=t.QueryClientConnectionsRequest.encode(e).finish();return this.rpc.request("ibc.core.connection.v1.Query","ClientConnections",r).then(e=>t.QueryClientConnectionsResponse.decode(new s.BinaryReader(e)))}ConnectionClientState(e){let r=t.QueryConnectionClientStateRequest.encode(e).finish();return this.rpc.request("ibc.core.connection.v1.Query","ConnectionClientState",r).then(e=>t.QueryConnectionClientStateResponse.decode(new s.BinaryReader(e)))}ConnectionConsensusState(e){let r=t.QueryConnectionConsensusStateRequest.encode(e).finish();return this.rpc.request("ibc.core.connection.v1.Query","ConnectionConsensusState",r).then(e=>t.QueryConnectionConsensusStateResponse.decode(new s.BinaryReader(e)))}ConnectionParams(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.QueryConnectionParamsRequest.encode(e).finish();return this.rpc.request("ibc.core.connection.v1.Query","ConnectionParams",r).then(e=>t.QueryConnectionParamsResponse.decode(new s.BinaryReader(e)))}constructor(e){this.rpc=e,this.Connection=this.Connection.bind(this),this.Connections=this.Connections.bind(this),this.ClientConnections=this.ClientConnections.bind(this),this.ConnectionClientState=this.ConnectionClientState.bind(this),this.ConnectionConsensusState=this.ConnectionConsensusState.bind(this),this.ConnectionParams=this.ConnectionParams.bind(this)}}t.QueryClientImpl=w},17244:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MsgClientImpl=t.MsgConnectionOpenConfirmResponse=t.MsgConnectionOpenConfirm=t.MsgConnectionOpenAckResponse=t.MsgConnectionOpenAck=t.MsgConnectionOpenTryResponse=t.MsgConnectionOpenTry=t.MsgConnectionOpenInitResponse=t.MsgConnectionOpenInit=t.protobufPackage=void 0;let n=r(9496),i=r(11879),o=r(23489),a=r(46554),s=r(99133);function l(){return{clientId:"",counterparty:n.Counterparty.fromPartial({}),version:void 0,delayPeriod:BigInt(0),signer:""}}function u(){return{}}function d(){return{clientId:"",previousConnectionId:"",clientState:void 0,counterparty:n.Counterparty.fromPartial({}),delayPeriod:BigInt(0),counterpartyVersions:[],proofHeight:o.Height.fromPartial({}),proofInit:new Uint8Array,proofClient:new Uint8Array,proofConsensus:new Uint8Array,consensusHeight:o.Height.fromPartial({}),signer:"",hostConsensusStateProof:new Uint8Array}}function c(){return{}}function p(){return{connectionId:"",counterpartyConnectionId:"",version:void 0,clientState:void 0,proofHeight:o.Height.fromPartial({}),proofTry:new Uint8Array,proofClient:new Uint8Array,proofConsensus:new Uint8Array,consensusHeight:o.Height.fromPartial({}),signer:"",hostConsensusStateProof:new Uint8Array}}function f(){return{}}function h(){return{connectionId:"",proofAck:new Uint8Array,proofHeight:o.Height.fromPartial({}),signer:""}}function g(){return{}}t.protobufPackage="ibc.core.connection.v1",t.MsgConnectionOpenInit={typeUrl:"/ibc.core.connection.v1.MsgConnectionOpenInit",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.clientId&&t.uint32(10).string(e.clientId),void 0!==e.counterparty&&n.Counterparty.encode(e.counterparty,t.uint32(18).fork()).ldelim(),void 0!==e.version&&n.Version.encode(e.version,t.uint32(26).fork()).ldelim(),e.delayPeriod!==BigInt(0)&&t.uint32(32).uint64(e.delayPeriod),""!==e.signer&&t.uint32(42).string(e.signer),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),i=void 0===t?r.len:r.pos+t,o=l();for(;r.pos>>3){case 1:o.clientId=r.string();break;case 2:o.counterparty=n.Counterparty.decode(r,r.uint32());break;case 3:o.version=n.Version.decode(r,r.uint32());break;case 4:o.delayPeriod=r.uint64();break;case 5:o.signer=r.string();break;default:r.skipType(7&e)}}return o},fromJSON(e){let t=l();return(0,s.isSet)(e.clientId)&&(t.clientId=String(e.clientId)),(0,s.isSet)(e.counterparty)&&(t.counterparty=n.Counterparty.fromJSON(e.counterparty)),(0,s.isSet)(e.version)&&(t.version=n.Version.fromJSON(e.version)),(0,s.isSet)(e.delayPeriod)&&(t.delayPeriod=BigInt(e.delayPeriod.toString())),(0,s.isSet)(e.signer)&&(t.signer=String(e.signer)),t},toJSON(e){let t={};return void 0!==e.clientId&&(t.clientId=e.clientId),void 0!==e.counterparty&&(t.counterparty=e.counterparty?n.Counterparty.toJSON(e.counterparty):void 0),void 0!==e.version&&(t.version=e.version?n.Version.toJSON(e.version):void 0),void 0!==e.delayPeriod&&(t.delayPeriod=(e.delayPeriod||BigInt(0)).toString()),void 0!==e.signer&&(t.signer=e.signer),t},fromPartial(e){var t,r;let i=l();return i.clientId=null!==(t=e.clientId)&&void 0!==t?t:"",void 0!==e.counterparty&&null!==e.counterparty&&(i.counterparty=n.Counterparty.fromPartial(e.counterparty)),void 0!==e.version&&null!==e.version&&(i.version=n.Version.fromPartial(e.version)),void 0!==e.delayPeriod&&null!==e.delayPeriod&&(i.delayPeriod=BigInt(e.delayPeriod.toString())),i.signer=null!==(r=e.signer)&&void 0!==r?r:"",i}},t.MsgConnectionOpenInitResponse={typeUrl:"/ibc.core.connection.v1.MsgConnectionOpenInitResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=u();for(;r.posu(),toJSON:e=>({}),fromPartial:e=>u()},t.MsgConnectionOpenTry={typeUrl:"/ibc.core.connection.v1.MsgConnectionOpenTry",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();for(let r of(""!==e.clientId&&t.uint32(10).string(e.clientId),""!==e.previousConnectionId&&t.uint32(18).string(e.previousConnectionId),void 0!==e.clientState&&i.Any.encode(e.clientState,t.uint32(26).fork()).ldelim(),void 0!==e.counterparty&&n.Counterparty.encode(e.counterparty,t.uint32(34).fork()).ldelim(),e.delayPeriod!==BigInt(0)&&t.uint32(40).uint64(e.delayPeriod),e.counterpartyVersions))n.Version.encode(r,t.uint32(50).fork()).ldelim();return void 0!==e.proofHeight&&o.Height.encode(e.proofHeight,t.uint32(58).fork()).ldelim(),0!==e.proofInit.length&&t.uint32(66).bytes(e.proofInit),0!==e.proofClient.length&&t.uint32(74).bytes(e.proofClient),0!==e.proofConsensus.length&&t.uint32(82).bytes(e.proofConsensus),void 0!==e.consensusHeight&&o.Height.encode(e.consensusHeight,t.uint32(90).fork()).ldelim(),""!==e.signer&&t.uint32(98).string(e.signer),0!==e.hostConsensusStateProof.length&&t.uint32(106).bytes(e.hostConsensusStateProof),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),s=void 0===t?r.len:r.pos+t,l=d();for(;r.pos>>3){case 1:l.clientId=r.string();break;case 2:l.previousConnectionId=r.string();break;case 3:l.clientState=i.Any.decode(r,r.uint32());break;case 4:l.counterparty=n.Counterparty.decode(r,r.uint32());break;case 5:l.delayPeriod=r.uint64();break;case 6:l.counterpartyVersions.push(n.Version.decode(r,r.uint32()));break;case 7:l.proofHeight=o.Height.decode(r,r.uint32());break;case 8:l.proofInit=r.bytes();break;case 9:l.proofClient=r.bytes();break;case 10:l.proofConsensus=r.bytes();break;case 11:l.consensusHeight=o.Height.decode(r,r.uint32());break;case 12:l.signer=r.string();break;case 13:l.hostConsensusStateProof=r.bytes();break;default:r.skipType(7&e)}}return l},fromJSON(e){let t=d();return(0,s.isSet)(e.clientId)&&(t.clientId=String(e.clientId)),(0,s.isSet)(e.previousConnectionId)&&(t.previousConnectionId=String(e.previousConnectionId)),(0,s.isSet)(e.clientState)&&(t.clientState=i.Any.fromJSON(e.clientState)),(0,s.isSet)(e.counterparty)&&(t.counterparty=n.Counterparty.fromJSON(e.counterparty)),(0,s.isSet)(e.delayPeriod)&&(t.delayPeriod=BigInt(e.delayPeriod.toString())),Array.isArray(null==e?void 0:e.counterpartyVersions)&&(t.counterpartyVersions=e.counterpartyVersions.map(e=>n.Version.fromJSON(e))),(0,s.isSet)(e.proofHeight)&&(t.proofHeight=o.Height.fromJSON(e.proofHeight)),(0,s.isSet)(e.proofInit)&&(t.proofInit=(0,s.bytesFromBase64)(e.proofInit)),(0,s.isSet)(e.proofClient)&&(t.proofClient=(0,s.bytesFromBase64)(e.proofClient)),(0,s.isSet)(e.proofConsensus)&&(t.proofConsensus=(0,s.bytesFromBase64)(e.proofConsensus)),(0,s.isSet)(e.consensusHeight)&&(t.consensusHeight=o.Height.fromJSON(e.consensusHeight)),(0,s.isSet)(e.signer)&&(t.signer=String(e.signer)),(0,s.isSet)(e.hostConsensusStateProof)&&(t.hostConsensusStateProof=(0,s.bytesFromBase64)(e.hostConsensusStateProof)),t},toJSON(e){let t={};return void 0!==e.clientId&&(t.clientId=e.clientId),void 0!==e.previousConnectionId&&(t.previousConnectionId=e.previousConnectionId),void 0!==e.clientState&&(t.clientState=e.clientState?i.Any.toJSON(e.clientState):void 0),void 0!==e.counterparty&&(t.counterparty=e.counterparty?n.Counterparty.toJSON(e.counterparty):void 0),void 0!==e.delayPeriod&&(t.delayPeriod=(e.delayPeriod||BigInt(0)).toString()),e.counterpartyVersions?t.counterpartyVersions=e.counterpartyVersions.map(e=>e?n.Version.toJSON(e):void 0):t.counterpartyVersions=[],void 0!==e.proofHeight&&(t.proofHeight=e.proofHeight?o.Height.toJSON(e.proofHeight):void 0),void 0!==e.proofInit&&(t.proofInit=(0,s.base64FromBytes)(void 0!==e.proofInit?e.proofInit:new Uint8Array)),void 0!==e.proofClient&&(t.proofClient=(0,s.base64FromBytes)(void 0!==e.proofClient?e.proofClient:new Uint8Array)),void 0!==e.proofConsensus&&(t.proofConsensus=(0,s.base64FromBytes)(void 0!==e.proofConsensus?e.proofConsensus:new Uint8Array)),void 0!==e.consensusHeight&&(t.consensusHeight=e.consensusHeight?o.Height.toJSON(e.consensusHeight):void 0),void 0!==e.signer&&(t.signer=e.signer),void 0!==e.hostConsensusStateProof&&(t.hostConsensusStateProof=(0,s.base64FromBytes)(void 0!==e.hostConsensusStateProof?e.hostConsensusStateProof:new Uint8Array)),t},fromPartial(e){var t,r,a,s,l,u,c,p;let f=d();return f.clientId=null!==(r=e.clientId)&&void 0!==r?r:"",f.previousConnectionId=null!==(a=e.previousConnectionId)&&void 0!==a?a:"",void 0!==e.clientState&&null!==e.clientState&&(f.clientState=i.Any.fromPartial(e.clientState)),void 0!==e.counterparty&&null!==e.counterparty&&(f.counterparty=n.Counterparty.fromPartial(e.counterparty)),void 0!==e.delayPeriod&&null!==e.delayPeriod&&(f.delayPeriod=BigInt(e.delayPeriod.toString())),f.counterpartyVersions=(null===(t=e.counterpartyVersions)||void 0===t?void 0:t.map(e=>n.Version.fromPartial(e)))||[],void 0!==e.proofHeight&&null!==e.proofHeight&&(f.proofHeight=o.Height.fromPartial(e.proofHeight)),f.proofInit=null!==(s=e.proofInit)&&void 0!==s?s:new Uint8Array,f.proofClient=null!==(l=e.proofClient)&&void 0!==l?l:new Uint8Array,f.proofConsensus=null!==(u=e.proofConsensus)&&void 0!==u?u:new Uint8Array,void 0!==e.consensusHeight&&null!==e.consensusHeight&&(f.consensusHeight=o.Height.fromPartial(e.consensusHeight)),f.signer=null!==(c=e.signer)&&void 0!==c?c:"",f.hostConsensusStateProof=null!==(p=e.hostConsensusStateProof)&&void 0!==p?p:new Uint8Array,f}},t.MsgConnectionOpenTryResponse={typeUrl:"/ibc.core.connection.v1.MsgConnectionOpenTryResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=c();for(;r.posc(),toJSON:e=>({}),fromPartial:e=>c()},t.MsgConnectionOpenAck={typeUrl:"/ibc.core.connection.v1.MsgConnectionOpenAck",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.connectionId&&t.uint32(10).string(e.connectionId),""!==e.counterpartyConnectionId&&t.uint32(18).string(e.counterpartyConnectionId),void 0!==e.version&&n.Version.encode(e.version,t.uint32(26).fork()).ldelim(),void 0!==e.clientState&&i.Any.encode(e.clientState,t.uint32(34).fork()).ldelim(),void 0!==e.proofHeight&&o.Height.encode(e.proofHeight,t.uint32(42).fork()).ldelim(),0!==e.proofTry.length&&t.uint32(50).bytes(e.proofTry),0!==e.proofClient.length&&t.uint32(58).bytes(e.proofClient),0!==e.proofConsensus.length&&t.uint32(66).bytes(e.proofConsensus),void 0!==e.consensusHeight&&o.Height.encode(e.consensusHeight,t.uint32(74).fork()).ldelim(),""!==e.signer&&t.uint32(82).string(e.signer),0!==e.hostConsensusStateProof.length&&t.uint32(90).bytes(e.hostConsensusStateProof),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),s=void 0===t?r.len:r.pos+t,l=p();for(;r.pos>>3){case 1:l.connectionId=r.string();break;case 2:l.counterpartyConnectionId=r.string();break;case 3:l.version=n.Version.decode(r,r.uint32());break;case 4:l.clientState=i.Any.decode(r,r.uint32());break;case 5:l.proofHeight=o.Height.decode(r,r.uint32());break;case 6:l.proofTry=r.bytes();break;case 7:l.proofClient=r.bytes();break;case 8:l.proofConsensus=r.bytes();break;case 9:l.consensusHeight=o.Height.decode(r,r.uint32());break;case 10:l.signer=r.string();break;case 11:l.hostConsensusStateProof=r.bytes();break;default:r.skipType(7&e)}}return l},fromJSON(e){let t=p();return(0,s.isSet)(e.connectionId)&&(t.connectionId=String(e.connectionId)),(0,s.isSet)(e.counterpartyConnectionId)&&(t.counterpartyConnectionId=String(e.counterpartyConnectionId)),(0,s.isSet)(e.version)&&(t.version=n.Version.fromJSON(e.version)),(0,s.isSet)(e.clientState)&&(t.clientState=i.Any.fromJSON(e.clientState)),(0,s.isSet)(e.proofHeight)&&(t.proofHeight=o.Height.fromJSON(e.proofHeight)),(0,s.isSet)(e.proofTry)&&(t.proofTry=(0,s.bytesFromBase64)(e.proofTry)),(0,s.isSet)(e.proofClient)&&(t.proofClient=(0,s.bytesFromBase64)(e.proofClient)),(0,s.isSet)(e.proofConsensus)&&(t.proofConsensus=(0,s.bytesFromBase64)(e.proofConsensus)),(0,s.isSet)(e.consensusHeight)&&(t.consensusHeight=o.Height.fromJSON(e.consensusHeight)),(0,s.isSet)(e.signer)&&(t.signer=String(e.signer)),(0,s.isSet)(e.hostConsensusStateProof)&&(t.hostConsensusStateProof=(0,s.bytesFromBase64)(e.hostConsensusStateProof)),t},toJSON(e){let t={};return void 0!==e.connectionId&&(t.connectionId=e.connectionId),void 0!==e.counterpartyConnectionId&&(t.counterpartyConnectionId=e.counterpartyConnectionId),void 0!==e.version&&(t.version=e.version?n.Version.toJSON(e.version):void 0),void 0!==e.clientState&&(t.clientState=e.clientState?i.Any.toJSON(e.clientState):void 0),void 0!==e.proofHeight&&(t.proofHeight=e.proofHeight?o.Height.toJSON(e.proofHeight):void 0),void 0!==e.proofTry&&(t.proofTry=(0,s.base64FromBytes)(void 0!==e.proofTry?e.proofTry:new Uint8Array)),void 0!==e.proofClient&&(t.proofClient=(0,s.base64FromBytes)(void 0!==e.proofClient?e.proofClient:new Uint8Array)),void 0!==e.proofConsensus&&(t.proofConsensus=(0,s.base64FromBytes)(void 0!==e.proofConsensus?e.proofConsensus:new Uint8Array)),void 0!==e.consensusHeight&&(t.consensusHeight=e.consensusHeight?o.Height.toJSON(e.consensusHeight):void 0),void 0!==e.signer&&(t.signer=e.signer),void 0!==e.hostConsensusStateProof&&(t.hostConsensusStateProof=(0,s.base64FromBytes)(void 0!==e.hostConsensusStateProof?e.hostConsensusStateProof:new Uint8Array)),t},fromPartial(e){var t,r,a,s,l,u,d;let c=p();return c.connectionId=null!==(t=e.connectionId)&&void 0!==t?t:"",c.counterpartyConnectionId=null!==(r=e.counterpartyConnectionId)&&void 0!==r?r:"",void 0!==e.version&&null!==e.version&&(c.version=n.Version.fromPartial(e.version)),void 0!==e.clientState&&null!==e.clientState&&(c.clientState=i.Any.fromPartial(e.clientState)),void 0!==e.proofHeight&&null!==e.proofHeight&&(c.proofHeight=o.Height.fromPartial(e.proofHeight)),c.proofTry=null!==(a=e.proofTry)&&void 0!==a?a:new Uint8Array,c.proofClient=null!==(s=e.proofClient)&&void 0!==s?s:new Uint8Array,c.proofConsensus=null!==(l=e.proofConsensus)&&void 0!==l?l:new Uint8Array,void 0!==e.consensusHeight&&null!==e.consensusHeight&&(c.consensusHeight=o.Height.fromPartial(e.consensusHeight)),c.signer=null!==(u=e.signer)&&void 0!==u?u:"",c.hostConsensusStateProof=null!==(d=e.hostConsensusStateProof)&&void 0!==d?d:new Uint8Array,c}},t.MsgConnectionOpenAckResponse={typeUrl:"/ibc.core.connection.v1.MsgConnectionOpenAckResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=f();for(;r.posf(),toJSON:e=>({}),fromPartial:e=>f()},t.MsgConnectionOpenConfirm={typeUrl:"/ibc.core.connection.v1.MsgConnectionOpenConfirm",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return""!==e.connectionId&&t.uint32(10).string(e.connectionId),0!==e.proofAck.length&&t.uint32(18).bytes(e.proofAck),void 0!==e.proofHeight&&o.Height.encode(e.proofHeight,t.uint32(26).fork()).ldelim(),""!==e.signer&&t.uint32(34).string(e.signer),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=h();for(;r.pos>>3){case 1:i.connectionId=r.string();break;case 2:i.proofAck=r.bytes();break;case 3:i.proofHeight=o.Height.decode(r,r.uint32());break;case 4:i.signer=r.string();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=h();return(0,s.isSet)(e.connectionId)&&(t.connectionId=String(e.connectionId)),(0,s.isSet)(e.proofAck)&&(t.proofAck=(0,s.bytesFromBase64)(e.proofAck)),(0,s.isSet)(e.proofHeight)&&(t.proofHeight=o.Height.fromJSON(e.proofHeight)),(0,s.isSet)(e.signer)&&(t.signer=String(e.signer)),t},toJSON(e){let t={};return void 0!==e.connectionId&&(t.connectionId=e.connectionId),void 0!==e.proofAck&&(t.proofAck=(0,s.base64FromBytes)(void 0!==e.proofAck?e.proofAck:new Uint8Array)),void 0!==e.proofHeight&&(t.proofHeight=e.proofHeight?o.Height.toJSON(e.proofHeight):void 0),void 0!==e.signer&&(t.signer=e.signer),t},fromPartial(e){var t,r,n;let i=h();return i.connectionId=null!==(t=e.connectionId)&&void 0!==t?t:"",i.proofAck=null!==(r=e.proofAck)&&void 0!==r?r:new Uint8Array,void 0!==e.proofHeight&&null!==e.proofHeight&&(i.proofHeight=o.Height.fromPartial(e.proofHeight)),i.signer=null!==(n=e.signer)&&void 0!==n?n:"",i}},t.MsgConnectionOpenConfirmResponse={typeUrl:"/ibc.core.connection.v1.MsgConnectionOpenConfirmResponse",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=g();for(;r.posg(),toJSON:e=>({}),fromPartial:e=>g()};class m{ConnectionOpenInit(e){let r=t.MsgConnectionOpenInit.encode(e).finish();return this.rpc.request("ibc.core.connection.v1.Msg","ConnectionOpenInit",r).then(e=>t.MsgConnectionOpenInitResponse.decode(new a.BinaryReader(e)))}ConnectionOpenTry(e){let r=t.MsgConnectionOpenTry.encode(e).finish();return this.rpc.request("ibc.core.connection.v1.Msg","ConnectionOpenTry",r).then(e=>t.MsgConnectionOpenTryResponse.decode(new a.BinaryReader(e)))}ConnectionOpenAck(e){let r=t.MsgConnectionOpenAck.encode(e).finish();return this.rpc.request("ibc.core.connection.v1.Msg","ConnectionOpenAck",r).then(e=>t.MsgConnectionOpenAckResponse.decode(new a.BinaryReader(e)))}ConnectionOpenConfirm(e){let r=t.MsgConnectionOpenConfirm.encode(e).finish();return this.rpc.request("ibc.core.connection.v1.Msg","ConnectionOpenConfirm",r).then(e=>t.MsgConnectionOpenConfirmResponse.decode(new a.BinaryReader(e)))}constructor(e){this.rpc=e,this.ConnectionOpenInit=this.ConnectionOpenInit.bind(this),this.ConnectionOpenTry=this.ConnectionOpenTry.bind(this),this.ConnectionOpenAck=this.ConnectionOpenAck.bind(this),this.ConnectionOpenConfirm=this.ConnectionOpenConfirm.bind(this)}}t.MsgClientImpl=m},70710:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Fraction=t.Header=t.Misbehaviour=t.ConsensusState=t.ClientState=t.protobufPackage=void 0;let n=r(84849),i=r(23489),o=r(88401),a=r(9990),s=r(56891),l=r(92585),u=r(83292),d=r(46554),c=r(99133);function p(){return{chainId:"",trustLevel:t.Fraction.fromPartial({}),trustingPeriod:n.Duration.fromPartial({}),unbondingPeriod:n.Duration.fromPartial({}),maxClockDrift:n.Duration.fromPartial({}),frozenHeight:i.Height.fromPartial({}),latestHeight:i.Height.fromPartial({}),proofSpecs:[],upgradePath:[],allowUpdateAfterExpiry:!1,allowUpdateAfterMisbehaviour:!1}}function f(){return{timestamp:a.Timestamp.fromPartial({}),root:s.MerkleRoot.fromPartial({}),nextValidatorsHash:new Uint8Array}}function h(){return{clientId:"",header1:void 0,header2:void 0}}function g(){return{signedHeader:void 0,validatorSet:void 0,trustedHeight:i.Height.fromPartial({}),trustedValidators:void 0}}function m(){return{numerator:BigInt(0),denominator:BigInt(0)}}t.protobufPackage="ibc.lightclients.tendermint.v1",t.ClientState={typeUrl:"/ibc.lightclients.tendermint.v1.ClientState",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.BinaryWriter.create();for(let a of(""!==e.chainId&&r.uint32(10).string(e.chainId),void 0!==e.trustLevel&&t.Fraction.encode(e.trustLevel,r.uint32(18).fork()).ldelim(),void 0!==e.trustingPeriod&&n.Duration.encode(e.trustingPeriod,r.uint32(26).fork()).ldelim(),void 0!==e.unbondingPeriod&&n.Duration.encode(e.unbondingPeriod,r.uint32(34).fork()).ldelim(),void 0!==e.maxClockDrift&&n.Duration.encode(e.maxClockDrift,r.uint32(42).fork()).ldelim(),void 0!==e.frozenHeight&&i.Height.encode(e.frozenHeight,r.uint32(50).fork()).ldelim(),void 0!==e.latestHeight&&i.Height.encode(e.latestHeight,r.uint32(58).fork()).ldelim(),e.proofSpecs))o.ProofSpec.encode(a,r.uint32(66).fork()).ldelim();for(let t of e.upgradePath)r.uint32(74).string(t);return!0===e.allowUpdateAfterExpiry&&r.uint32(80).bool(e.allowUpdateAfterExpiry),!0===e.allowUpdateAfterMisbehaviour&&r.uint32(88).bool(e.allowUpdateAfterMisbehaviour),r},decode(e,r){let a=e instanceof d.BinaryReader?e:new d.BinaryReader(e),s=void 0===r?a.len:a.pos+r,l=p();for(;a.pos>>3){case 1:l.chainId=a.string();break;case 2:l.trustLevel=t.Fraction.decode(a,a.uint32());break;case 3:l.trustingPeriod=n.Duration.decode(a,a.uint32());break;case 4:l.unbondingPeriod=n.Duration.decode(a,a.uint32());break;case 5:l.maxClockDrift=n.Duration.decode(a,a.uint32());break;case 6:l.frozenHeight=i.Height.decode(a,a.uint32());break;case 7:l.latestHeight=i.Height.decode(a,a.uint32());break;case 8:l.proofSpecs.push(o.ProofSpec.decode(a,a.uint32()));break;case 9:l.upgradePath.push(a.string());break;case 10:l.allowUpdateAfterExpiry=a.bool();break;case 11:l.allowUpdateAfterMisbehaviour=a.bool();break;default:a.skipType(7&e)}}return l},fromJSON(e){let r=p();return(0,c.isSet)(e.chainId)&&(r.chainId=String(e.chainId)),(0,c.isSet)(e.trustLevel)&&(r.trustLevel=t.Fraction.fromJSON(e.trustLevel)),(0,c.isSet)(e.trustingPeriod)&&(r.trustingPeriod=n.Duration.fromJSON(e.trustingPeriod)),(0,c.isSet)(e.unbondingPeriod)&&(r.unbondingPeriod=n.Duration.fromJSON(e.unbondingPeriod)),(0,c.isSet)(e.maxClockDrift)&&(r.maxClockDrift=n.Duration.fromJSON(e.maxClockDrift)),(0,c.isSet)(e.frozenHeight)&&(r.frozenHeight=i.Height.fromJSON(e.frozenHeight)),(0,c.isSet)(e.latestHeight)&&(r.latestHeight=i.Height.fromJSON(e.latestHeight)),Array.isArray(null==e?void 0:e.proofSpecs)&&(r.proofSpecs=e.proofSpecs.map(e=>o.ProofSpec.fromJSON(e))),Array.isArray(null==e?void 0:e.upgradePath)&&(r.upgradePath=e.upgradePath.map(e=>String(e))),(0,c.isSet)(e.allowUpdateAfterExpiry)&&(r.allowUpdateAfterExpiry=!!e.allowUpdateAfterExpiry),(0,c.isSet)(e.allowUpdateAfterMisbehaviour)&&(r.allowUpdateAfterMisbehaviour=!!e.allowUpdateAfterMisbehaviour),r},toJSON(e){let r={};return void 0!==e.chainId&&(r.chainId=e.chainId),void 0!==e.trustLevel&&(r.trustLevel=e.trustLevel?t.Fraction.toJSON(e.trustLevel):void 0),void 0!==e.trustingPeriod&&(r.trustingPeriod=e.trustingPeriod?n.Duration.toJSON(e.trustingPeriod):void 0),void 0!==e.unbondingPeriod&&(r.unbondingPeriod=e.unbondingPeriod?n.Duration.toJSON(e.unbondingPeriod):void 0),void 0!==e.maxClockDrift&&(r.maxClockDrift=e.maxClockDrift?n.Duration.toJSON(e.maxClockDrift):void 0),void 0!==e.frozenHeight&&(r.frozenHeight=e.frozenHeight?i.Height.toJSON(e.frozenHeight):void 0),void 0!==e.latestHeight&&(r.latestHeight=e.latestHeight?i.Height.toJSON(e.latestHeight):void 0),e.proofSpecs?r.proofSpecs=e.proofSpecs.map(e=>e?o.ProofSpec.toJSON(e):void 0):r.proofSpecs=[],e.upgradePath?r.upgradePath=e.upgradePath.map(e=>e):r.upgradePath=[],void 0!==e.allowUpdateAfterExpiry&&(r.allowUpdateAfterExpiry=e.allowUpdateAfterExpiry),void 0!==e.allowUpdateAfterMisbehaviour&&(r.allowUpdateAfterMisbehaviour=e.allowUpdateAfterMisbehaviour),r},fromPartial(e){var r,a,s,l,u;let d=p();return d.chainId=null!==(s=e.chainId)&&void 0!==s?s:"",void 0!==e.trustLevel&&null!==e.trustLevel&&(d.trustLevel=t.Fraction.fromPartial(e.trustLevel)),void 0!==e.trustingPeriod&&null!==e.trustingPeriod&&(d.trustingPeriod=n.Duration.fromPartial(e.trustingPeriod)),void 0!==e.unbondingPeriod&&null!==e.unbondingPeriod&&(d.unbondingPeriod=n.Duration.fromPartial(e.unbondingPeriod)),void 0!==e.maxClockDrift&&null!==e.maxClockDrift&&(d.maxClockDrift=n.Duration.fromPartial(e.maxClockDrift)),void 0!==e.frozenHeight&&null!==e.frozenHeight&&(d.frozenHeight=i.Height.fromPartial(e.frozenHeight)),void 0!==e.latestHeight&&null!==e.latestHeight&&(d.latestHeight=i.Height.fromPartial(e.latestHeight)),d.proofSpecs=(null===(r=e.proofSpecs)||void 0===r?void 0:r.map(e=>o.ProofSpec.fromPartial(e)))||[],d.upgradePath=(null===(a=e.upgradePath)||void 0===a?void 0:a.map(e=>e))||[],d.allowUpdateAfterExpiry=null!==(l=e.allowUpdateAfterExpiry)&&void 0!==l&&l,d.allowUpdateAfterMisbehaviour=null!==(u=e.allowUpdateAfterMisbehaviour)&&void 0!==u&&u,d}},t.ConsensusState={typeUrl:"/ibc.lightclients.tendermint.v1.ConsensusState",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.BinaryWriter.create();return void 0!==e.timestamp&&a.Timestamp.encode(e.timestamp,t.uint32(10).fork()).ldelim(),void 0!==e.root&&s.MerkleRoot.encode(e.root,t.uint32(18).fork()).ldelim(),0!==e.nextValidatorsHash.length&&t.uint32(26).bytes(e.nextValidatorsHash),t},decode(e,t){let r=e instanceof d.BinaryReader?e:new d.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=f();for(;r.pos>>3){case 1:i.timestamp=a.Timestamp.decode(r,r.uint32());break;case 2:i.root=s.MerkleRoot.decode(r,r.uint32());break;case 3:i.nextValidatorsHash=r.bytes();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=f();return(0,c.isSet)(e.timestamp)&&(t.timestamp=(0,c.fromJsonTimestamp)(e.timestamp)),(0,c.isSet)(e.root)&&(t.root=s.MerkleRoot.fromJSON(e.root)),(0,c.isSet)(e.nextValidatorsHash)&&(t.nextValidatorsHash=(0,c.bytesFromBase64)(e.nextValidatorsHash)),t},toJSON(e){let t={};return void 0!==e.timestamp&&(t.timestamp=(0,c.fromTimestamp)(e.timestamp).toISOString()),void 0!==e.root&&(t.root=e.root?s.MerkleRoot.toJSON(e.root):void 0),void 0!==e.nextValidatorsHash&&(t.nextValidatorsHash=(0,c.base64FromBytes)(void 0!==e.nextValidatorsHash?e.nextValidatorsHash:new Uint8Array)),t},fromPartial(e){var t;let r=f();return void 0!==e.timestamp&&null!==e.timestamp&&(r.timestamp=a.Timestamp.fromPartial(e.timestamp)),void 0!==e.root&&null!==e.root&&(r.root=s.MerkleRoot.fromPartial(e.root)),r.nextValidatorsHash=null!==(t=e.nextValidatorsHash)&&void 0!==t?t:new Uint8Array,r}},t.Misbehaviour={typeUrl:"/ibc.lightclients.tendermint.v1.Misbehaviour",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.BinaryWriter.create();return""!==e.clientId&&r.uint32(10).string(e.clientId),void 0!==e.header1&&t.Header.encode(e.header1,r.uint32(18).fork()).ldelim(),void 0!==e.header2&&t.Header.encode(e.header2,r.uint32(26).fork()).ldelim(),r},decode(e,r){let n=e instanceof d.BinaryReader?e:new d.BinaryReader(e),i=void 0===r?n.len:n.pos+r,o=h();for(;n.pos>>3){case 1:o.clientId=n.string();break;case 2:o.header1=t.Header.decode(n,n.uint32());break;case 3:o.header2=t.Header.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){let r=h();return(0,c.isSet)(e.clientId)&&(r.clientId=String(e.clientId)),(0,c.isSet)(e.header1)&&(r.header1=t.Header.fromJSON(e.header1)),(0,c.isSet)(e.header2)&&(r.header2=t.Header.fromJSON(e.header2)),r},toJSON(e){let r={};return void 0!==e.clientId&&(r.clientId=e.clientId),void 0!==e.header1&&(r.header1=e.header1?t.Header.toJSON(e.header1):void 0),void 0!==e.header2&&(r.header2=e.header2?t.Header.toJSON(e.header2):void 0),r},fromPartial(e){var r;let n=h();return n.clientId=null!==(r=e.clientId)&&void 0!==r?r:"",void 0!==e.header1&&null!==e.header1&&(n.header1=t.Header.fromPartial(e.header1)),void 0!==e.header2&&null!==e.header2&&(n.header2=t.Header.fromPartial(e.header2)),n}},t.Header={typeUrl:"/ibc.lightclients.tendermint.v1.Header",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.BinaryWriter.create();return void 0!==e.signedHeader&&l.SignedHeader.encode(e.signedHeader,t.uint32(10).fork()).ldelim(),void 0!==e.validatorSet&&u.ValidatorSet.encode(e.validatorSet,t.uint32(18).fork()).ldelim(),void 0!==e.trustedHeight&&i.Height.encode(e.trustedHeight,t.uint32(26).fork()).ldelim(),void 0!==e.trustedValidators&&u.ValidatorSet.encode(e.trustedValidators,t.uint32(34).fork()).ldelim(),t},decode(e,t){let r=e instanceof d.BinaryReader?e:new d.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=g();for(;r.pos>>3){case 1:o.signedHeader=l.SignedHeader.decode(r,r.uint32());break;case 2:o.validatorSet=u.ValidatorSet.decode(r,r.uint32());break;case 3:o.trustedHeight=i.Height.decode(r,r.uint32());break;case 4:o.trustedValidators=u.ValidatorSet.decode(r,r.uint32());break;default:r.skipType(7&e)}}return o},fromJSON(e){let t=g();return(0,c.isSet)(e.signedHeader)&&(t.signedHeader=l.SignedHeader.fromJSON(e.signedHeader)),(0,c.isSet)(e.validatorSet)&&(t.validatorSet=u.ValidatorSet.fromJSON(e.validatorSet)),(0,c.isSet)(e.trustedHeight)&&(t.trustedHeight=i.Height.fromJSON(e.trustedHeight)),(0,c.isSet)(e.trustedValidators)&&(t.trustedValidators=u.ValidatorSet.fromJSON(e.trustedValidators)),t},toJSON(e){let t={};return void 0!==e.signedHeader&&(t.signedHeader=e.signedHeader?l.SignedHeader.toJSON(e.signedHeader):void 0),void 0!==e.validatorSet&&(t.validatorSet=e.validatorSet?u.ValidatorSet.toJSON(e.validatorSet):void 0),void 0!==e.trustedHeight&&(t.trustedHeight=e.trustedHeight?i.Height.toJSON(e.trustedHeight):void 0),void 0!==e.trustedValidators&&(t.trustedValidators=e.trustedValidators?u.ValidatorSet.toJSON(e.trustedValidators):void 0),t},fromPartial(e){let t=g();return void 0!==e.signedHeader&&null!==e.signedHeader&&(t.signedHeader=l.SignedHeader.fromPartial(e.signedHeader)),void 0!==e.validatorSet&&null!==e.validatorSet&&(t.validatorSet=u.ValidatorSet.fromPartial(e.validatorSet)),void 0!==e.trustedHeight&&null!==e.trustedHeight&&(t.trustedHeight=i.Height.fromPartial(e.trustedHeight)),void 0!==e.trustedValidators&&null!==e.trustedValidators&&(t.trustedValidators=u.ValidatorSet.fromPartial(e.trustedValidators)),t}},t.Fraction={typeUrl:"/ibc.lightclients.tendermint.v1.Fraction",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.BinaryWriter.create();return e.numerator!==BigInt(0)&&t.uint32(8).uint64(e.numerator),e.denominator!==BigInt(0)&&t.uint32(16).uint64(e.denominator),t},decode(e,t){let r=e instanceof d.BinaryReader?e:new d.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=m();for(;r.pos>>3){case 1:i.numerator=r.uint64();break;case 2:i.denominator=r.uint64();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=m();return(0,c.isSet)(e.numerator)&&(t.numerator=BigInt(e.numerator.toString())),(0,c.isSet)(e.denominator)&&(t.denominator=BigInt(e.denominator.toString())),t},toJSON(e){let t={};return void 0!==e.numerator&&(t.numerator=(e.numerator||BigInt(0)).toString()),void 0!==e.denominator&&(t.denominator=(e.denominator||BigInt(0)).toString()),t},fromPartial(e){let t=m();return void 0!==e.numerator&&null!==e.numerator&&(t.numerator=BigInt(e.numerator.toString())),void 0!==e.denominator&&null!==e.denominator&&(t.denominator=BigInt(e.denominator.toString())),t}}},29598:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PublicKey=t.protobufPackage=void 0;let n=r(46554),i=r(99133);function o(){return{ed25519:void 0,secp256k1:void 0}}t.protobufPackage="tendermint.crypto",t.PublicKey={typeUrl:"/tendermint.crypto.PublicKey",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.BinaryWriter.create();return void 0!==e.ed25519&&t.uint32(10).bytes(e.ed25519),void 0!==e.secp256k1&&t.uint32(18).bytes(e.secp256k1),t},decode(e,t){let r=e instanceof n.BinaryReader?e:new n.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=o();for(;r.pos>>3){case 1:a.ed25519=r.bytes();break;case 2:a.secp256k1=r.bytes();break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=o();return(0,i.isSet)(e.ed25519)&&(t.ed25519=(0,i.bytesFromBase64)(e.ed25519)),(0,i.isSet)(e.secp256k1)&&(t.secp256k1=(0,i.bytesFromBase64)(e.secp256k1)),t},toJSON(e){let t={};return void 0!==e.ed25519&&(t.ed25519=void 0!==e.ed25519?(0,i.base64FromBytes)(e.ed25519):void 0),void 0!==e.secp256k1&&(t.secp256k1=void 0!==e.secp256k1?(0,i.base64FromBytes)(e.secp256k1):void 0),t},fromPartial(e){var t,r;let n=o();return n.ed25519=null!==(t=e.ed25519)&&void 0!==t?t:void 0,n.secp256k1=null!==(r=e.secp256k1)&&void 0!==r?r:void 0,n}}},86818:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProofOps=t.ProofOp=t.DominoOp=t.ValueOp=t.Proof=t.protobufPackage=void 0;let n=r(46554),i=r(99133);function o(){return{total:BigInt(0),index:BigInt(0),leafHash:new Uint8Array,aunts:[]}}function a(){return{key:new Uint8Array,proof:void 0}}function s(){return{key:"",input:"",output:""}}function l(){return{type:"",key:new Uint8Array,data:new Uint8Array}}function u(){return{ops:[]}}t.protobufPackage="tendermint.crypto",t.Proof={typeUrl:"/tendermint.crypto.Proof",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.BinaryWriter.create();for(let r of(e.total!==BigInt(0)&&t.uint32(8).int64(e.total),e.index!==BigInt(0)&&t.uint32(16).int64(e.index),0!==e.leafHash.length&&t.uint32(26).bytes(e.leafHash),e.aunts))t.uint32(34).bytes(r);return t},decode(e,t){let r=e instanceof n.BinaryReader?e:new n.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=o();for(;r.pos>>3){case 1:a.total=r.int64();break;case 2:a.index=r.int64();break;case 3:a.leafHash=r.bytes();break;case 4:a.aunts.push(r.bytes());break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=o();return(0,i.isSet)(e.total)&&(t.total=BigInt(e.total.toString())),(0,i.isSet)(e.index)&&(t.index=BigInt(e.index.toString())),(0,i.isSet)(e.leafHash)&&(t.leafHash=(0,i.bytesFromBase64)(e.leafHash)),Array.isArray(null==e?void 0:e.aunts)&&(t.aunts=e.aunts.map(e=>(0,i.bytesFromBase64)(e))),t},toJSON(e){let t={};return void 0!==e.total&&(t.total=(e.total||BigInt(0)).toString()),void 0!==e.index&&(t.index=(e.index||BigInt(0)).toString()),void 0!==e.leafHash&&(t.leafHash=(0,i.base64FromBytes)(void 0!==e.leafHash?e.leafHash:new Uint8Array)),e.aunts?t.aunts=e.aunts.map(e=>(0,i.base64FromBytes)(void 0!==e?e:new Uint8Array)):t.aunts=[],t},fromPartial(e){var t,r;let n=o();return void 0!==e.total&&null!==e.total&&(n.total=BigInt(e.total.toString())),void 0!==e.index&&null!==e.index&&(n.index=BigInt(e.index.toString())),n.leafHash=null!==(r=e.leafHash)&&void 0!==r?r:new Uint8Array,n.aunts=(null===(t=e.aunts)||void 0===t?void 0:t.map(e=>e))||[],n}},t.ValueOp={typeUrl:"/tendermint.crypto.ValueOp",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.BinaryWriter.create();return 0!==e.key.length&&r.uint32(10).bytes(e.key),void 0!==e.proof&&t.Proof.encode(e.proof,r.uint32(18).fork()).ldelim(),r},decode(e,r){let i=e instanceof n.BinaryReader?e:new n.BinaryReader(e),o=void 0===r?i.len:i.pos+r,s=a();for(;i.pos>>3){case 1:s.key=i.bytes();break;case 2:s.proof=t.Proof.decode(i,i.uint32());break;default:i.skipType(7&e)}}return s},fromJSON(e){let r=a();return(0,i.isSet)(e.key)&&(r.key=(0,i.bytesFromBase64)(e.key)),(0,i.isSet)(e.proof)&&(r.proof=t.Proof.fromJSON(e.proof)),r},toJSON(e){let r={};return void 0!==e.key&&(r.key=(0,i.base64FromBytes)(void 0!==e.key?e.key:new Uint8Array)),void 0!==e.proof&&(r.proof=e.proof?t.Proof.toJSON(e.proof):void 0),r},fromPartial(e){var r;let n=a();return n.key=null!==(r=e.key)&&void 0!==r?r:new Uint8Array,void 0!==e.proof&&null!==e.proof&&(n.proof=t.Proof.fromPartial(e.proof)),n}},t.DominoOp={typeUrl:"/tendermint.crypto.DominoOp",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.BinaryWriter.create();return""!==e.key&&t.uint32(10).string(e.key),""!==e.input&&t.uint32(18).string(e.input),""!==e.output&&t.uint32(26).string(e.output),t},decode(e,t){let r=e instanceof n.BinaryReader?e:new n.BinaryReader(e),i=void 0===t?r.len:r.pos+t,o=s();for(;r.pos>>3){case 1:o.key=r.string();break;case 2:o.input=r.string();break;case 3:o.output=r.string();break;default:r.skipType(7&e)}}return o},fromJSON(e){let t=s();return(0,i.isSet)(e.key)&&(t.key=String(e.key)),(0,i.isSet)(e.input)&&(t.input=String(e.input)),(0,i.isSet)(e.output)&&(t.output=String(e.output)),t},toJSON(e){let t={};return void 0!==e.key&&(t.key=e.key),void 0!==e.input&&(t.input=e.input),void 0!==e.output&&(t.output=e.output),t},fromPartial(e){var t,r,n;let i=s();return i.key=null!==(t=e.key)&&void 0!==t?t:"",i.input=null!==(r=e.input)&&void 0!==r?r:"",i.output=null!==(n=e.output)&&void 0!==n?n:"",i}},t.ProofOp={typeUrl:"/tendermint.crypto.ProofOp",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.BinaryWriter.create();return""!==e.type&&t.uint32(10).string(e.type),0!==e.key.length&&t.uint32(18).bytes(e.key),0!==e.data.length&&t.uint32(26).bytes(e.data),t},decode(e,t){let r=e instanceof n.BinaryReader?e:new n.BinaryReader(e),i=void 0===t?r.len:r.pos+t,o=l();for(;r.pos>>3){case 1:o.type=r.string();break;case 2:o.key=r.bytes();break;case 3:o.data=r.bytes();break;default:r.skipType(7&e)}}return o},fromJSON(e){let t=l();return(0,i.isSet)(e.type)&&(t.type=String(e.type)),(0,i.isSet)(e.key)&&(t.key=(0,i.bytesFromBase64)(e.key)),(0,i.isSet)(e.data)&&(t.data=(0,i.bytesFromBase64)(e.data)),t},toJSON(e){let t={};return void 0!==e.type&&(t.type=e.type),void 0!==e.key&&(t.key=(0,i.base64FromBytes)(void 0!==e.key?e.key:new Uint8Array)),void 0!==e.data&&(t.data=(0,i.base64FromBytes)(void 0!==e.data?e.data:new Uint8Array)),t},fromPartial(e){var t,r,n;let i=l();return i.type=null!==(t=e.type)&&void 0!==t?t:"",i.key=null!==(r=e.key)&&void 0!==r?r:new Uint8Array,i.data=null!==(n=e.data)&&void 0!==n?n:new Uint8Array,i}},t.ProofOps={typeUrl:"/tendermint.crypto.ProofOps",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.BinaryWriter.create();for(let n of e.ops)t.ProofOp.encode(n,r.uint32(10).fork()).ldelim();return r},decode(e,r){let i=e instanceof n.BinaryReader?e:new n.BinaryReader(e),o=void 0===r?i.len:i.pos+r,a=u();for(;i.pos>>3==1?a.ops.push(t.ProofOp.decode(i,i.uint32())):i.skipType(7&e)}return a},fromJSON(e){let r=u();return Array.isArray(null==e?void 0:e.ops)&&(r.ops=e.ops.map(e=>t.ProofOp.fromJSON(e))),r},toJSON(e){let r={};return e.ops?r.ops=e.ops.map(e=>e?t.ProofOp.toJSON(e):void 0):r.ops=[],r},fromPartial(e){var r;let n=u();return n.ops=(null===(r=e.ops)||void 0===r?void 0:r.map(e=>t.ProofOp.fromPartial(e)))||[],n}}},81334:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Block=t.protobufPackage=void 0;let n=r(92585),i=r(82738),o=r(46554),a=r(99133);function s(){return{header:n.Header.fromPartial({}),data:n.Data.fromPartial({}),evidence:i.EvidenceList.fromPartial({}),lastCommit:void 0}}t.protobufPackage="tendermint.types",t.Block={typeUrl:"/tendermint.types.Block",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.BinaryWriter.create();return void 0!==e.header&&n.Header.encode(e.header,t.uint32(10).fork()).ldelim(),void 0!==e.data&&n.Data.encode(e.data,t.uint32(18).fork()).ldelim(),void 0!==e.evidence&&i.EvidenceList.encode(e.evidence,t.uint32(26).fork()).ldelim(),void 0!==e.lastCommit&&n.Commit.encode(e.lastCommit,t.uint32(34).fork()).ldelim(),t},decode(e,t){let r=e instanceof o.BinaryReader?e:new o.BinaryReader(e),a=void 0===t?r.len:r.pos+t,l=s();for(;r.pos>>3){case 1:l.header=n.Header.decode(r,r.uint32());break;case 2:l.data=n.Data.decode(r,r.uint32());break;case 3:l.evidence=i.EvidenceList.decode(r,r.uint32());break;case 4:l.lastCommit=n.Commit.decode(r,r.uint32());break;default:r.skipType(7&e)}}return l},fromJSON(e){let t=s();return(0,a.isSet)(e.header)&&(t.header=n.Header.fromJSON(e.header)),(0,a.isSet)(e.data)&&(t.data=n.Data.fromJSON(e.data)),(0,a.isSet)(e.evidence)&&(t.evidence=i.EvidenceList.fromJSON(e.evidence)),(0,a.isSet)(e.lastCommit)&&(t.lastCommit=n.Commit.fromJSON(e.lastCommit)),t},toJSON(e){let t={};return void 0!==e.header&&(t.header=e.header?n.Header.toJSON(e.header):void 0),void 0!==e.data&&(t.data=e.data?n.Data.toJSON(e.data):void 0),void 0!==e.evidence&&(t.evidence=e.evidence?i.EvidenceList.toJSON(e.evidence):void 0),void 0!==e.lastCommit&&(t.lastCommit=e.lastCommit?n.Commit.toJSON(e.lastCommit):void 0),t},fromPartial(e){let t=s();return void 0!==e.header&&null!==e.header&&(t.header=n.Header.fromPartial(e.header)),void 0!==e.data&&null!==e.data&&(t.data=n.Data.fromPartial(e.data)),void 0!==e.evidence&&null!==e.evidence&&(t.evidence=i.EvidenceList.fromPartial(e.evidence)),void 0!==e.lastCommit&&null!==e.lastCommit&&(t.lastCommit=n.Commit.fromPartial(e.lastCommit)),t}}},82738:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EvidenceList=t.LightClientAttackEvidence=t.DuplicateVoteEvidence=t.Evidence=t.protobufPackage=void 0;let n=r(92585),i=r(9990),o=r(83292),a=r(46554),s=r(99133);function l(){return{duplicateVoteEvidence:void 0,lightClientAttackEvidence:void 0}}function u(){return{voteA:void 0,voteB:void 0,totalVotingPower:BigInt(0),validatorPower:BigInt(0),timestamp:i.Timestamp.fromPartial({})}}function d(){return{conflictingBlock:void 0,commonHeight:BigInt(0),byzantineValidators:[],totalVotingPower:BigInt(0),timestamp:i.Timestamp.fromPartial({})}}function c(){return{evidence:[]}}t.protobufPackage="tendermint.types",t.Evidence={typeUrl:"/tendermint.types.Evidence",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return void 0!==e.duplicateVoteEvidence&&t.DuplicateVoteEvidence.encode(e.duplicateVoteEvidence,r.uint32(10).fork()).ldelim(),void 0!==e.lightClientAttackEvidence&&t.LightClientAttackEvidence.encode(e.lightClientAttackEvidence,r.uint32(18).fork()).ldelim(),r},decode(e,r){let n=e instanceof a.BinaryReader?e:new a.BinaryReader(e),i=void 0===r?n.len:n.pos+r,o=l();for(;n.pos>>3){case 1:o.duplicateVoteEvidence=t.DuplicateVoteEvidence.decode(n,n.uint32());break;case 2:o.lightClientAttackEvidence=t.LightClientAttackEvidence.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){let r=l();return(0,s.isSet)(e.duplicateVoteEvidence)&&(r.duplicateVoteEvidence=t.DuplicateVoteEvidence.fromJSON(e.duplicateVoteEvidence)),(0,s.isSet)(e.lightClientAttackEvidence)&&(r.lightClientAttackEvidence=t.LightClientAttackEvidence.fromJSON(e.lightClientAttackEvidence)),r},toJSON(e){let r={};return void 0!==e.duplicateVoteEvidence&&(r.duplicateVoteEvidence=e.duplicateVoteEvidence?t.DuplicateVoteEvidence.toJSON(e.duplicateVoteEvidence):void 0),void 0!==e.lightClientAttackEvidence&&(r.lightClientAttackEvidence=e.lightClientAttackEvidence?t.LightClientAttackEvidence.toJSON(e.lightClientAttackEvidence):void 0),r},fromPartial(e){let r=l();return void 0!==e.duplicateVoteEvidence&&null!==e.duplicateVoteEvidence&&(r.duplicateVoteEvidence=t.DuplicateVoteEvidence.fromPartial(e.duplicateVoteEvidence)),void 0!==e.lightClientAttackEvidence&&null!==e.lightClientAttackEvidence&&(r.lightClientAttackEvidence=t.LightClientAttackEvidence.fromPartial(e.lightClientAttackEvidence)),r}},t.DuplicateVoteEvidence={typeUrl:"/tendermint.types.DuplicateVoteEvidence",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();return void 0!==e.voteA&&n.Vote.encode(e.voteA,t.uint32(10).fork()).ldelim(),void 0!==e.voteB&&n.Vote.encode(e.voteB,t.uint32(18).fork()).ldelim(),e.totalVotingPower!==BigInt(0)&&t.uint32(24).int64(e.totalVotingPower),e.validatorPower!==BigInt(0)&&t.uint32(32).int64(e.validatorPower),void 0!==e.timestamp&&i.Timestamp.encode(e.timestamp,t.uint32(42).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),o=void 0===t?r.len:r.pos+t,s=u();for(;r.pos>>3){case 1:s.voteA=n.Vote.decode(r,r.uint32());break;case 2:s.voteB=n.Vote.decode(r,r.uint32());break;case 3:s.totalVotingPower=r.int64();break;case 4:s.validatorPower=r.int64();break;case 5:s.timestamp=i.Timestamp.decode(r,r.uint32());break;default:r.skipType(7&e)}}return s},fromJSON(e){let t=u();return(0,s.isSet)(e.voteA)&&(t.voteA=n.Vote.fromJSON(e.voteA)),(0,s.isSet)(e.voteB)&&(t.voteB=n.Vote.fromJSON(e.voteB)),(0,s.isSet)(e.totalVotingPower)&&(t.totalVotingPower=BigInt(e.totalVotingPower.toString())),(0,s.isSet)(e.validatorPower)&&(t.validatorPower=BigInt(e.validatorPower.toString())),(0,s.isSet)(e.timestamp)&&(t.timestamp=(0,s.fromJsonTimestamp)(e.timestamp)),t},toJSON(e){let t={};return void 0!==e.voteA&&(t.voteA=e.voteA?n.Vote.toJSON(e.voteA):void 0),void 0!==e.voteB&&(t.voteB=e.voteB?n.Vote.toJSON(e.voteB):void 0),void 0!==e.totalVotingPower&&(t.totalVotingPower=(e.totalVotingPower||BigInt(0)).toString()),void 0!==e.validatorPower&&(t.validatorPower=(e.validatorPower||BigInt(0)).toString()),void 0!==e.timestamp&&(t.timestamp=(0,s.fromTimestamp)(e.timestamp).toISOString()),t},fromPartial(e){let t=u();return void 0!==e.voteA&&null!==e.voteA&&(t.voteA=n.Vote.fromPartial(e.voteA)),void 0!==e.voteB&&null!==e.voteB&&(t.voteB=n.Vote.fromPartial(e.voteB)),void 0!==e.totalVotingPower&&null!==e.totalVotingPower&&(t.totalVotingPower=BigInt(e.totalVotingPower.toString())),void 0!==e.validatorPower&&null!==e.validatorPower&&(t.validatorPower=BigInt(e.validatorPower.toString())),void 0!==e.timestamp&&null!==e.timestamp&&(t.timestamp=i.Timestamp.fromPartial(e.timestamp)),t}},t.LightClientAttackEvidence={typeUrl:"/tendermint.types.LightClientAttackEvidence",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();for(let r of(void 0!==e.conflictingBlock&&n.LightBlock.encode(e.conflictingBlock,t.uint32(10).fork()).ldelim(),e.commonHeight!==BigInt(0)&&t.uint32(16).int64(e.commonHeight),e.byzantineValidators))o.Validator.encode(r,t.uint32(26).fork()).ldelim();return e.totalVotingPower!==BigInt(0)&&t.uint32(32).int64(e.totalVotingPower),void 0!==e.timestamp&&i.Timestamp.encode(e.timestamp,t.uint32(42).fork()).ldelim(),t},decode(e,t){let r=e instanceof a.BinaryReader?e:new a.BinaryReader(e),s=void 0===t?r.len:r.pos+t,l=d();for(;r.pos>>3){case 1:l.conflictingBlock=n.LightBlock.decode(r,r.uint32());break;case 2:l.commonHeight=r.int64();break;case 3:l.byzantineValidators.push(o.Validator.decode(r,r.uint32()));break;case 4:l.totalVotingPower=r.int64();break;case 5:l.timestamp=i.Timestamp.decode(r,r.uint32());break;default:r.skipType(7&e)}}return l},fromJSON(e){let t=d();return(0,s.isSet)(e.conflictingBlock)&&(t.conflictingBlock=n.LightBlock.fromJSON(e.conflictingBlock)),(0,s.isSet)(e.commonHeight)&&(t.commonHeight=BigInt(e.commonHeight.toString())),Array.isArray(null==e?void 0:e.byzantineValidators)&&(t.byzantineValidators=e.byzantineValidators.map(e=>o.Validator.fromJSON(e))),(0,s.isSet)(e.totalVotingPower)&&(t.totalVotingPower=BigInt(e.totalVotingPower.toString())),(0,s.isSet)(e.timestamp)&&(t.timestamp=(0,s.fromJsonTimestamp)(e.timestamp)),t},toJSON(e){let t={};return void 0!==e.conflictingBlock&&(t.conflictingBlock=e.conflictingBlock?n.LightBlock.toJSON(e.conflictingBlock):void 0),void 0!==e.commonHeight&&(t.commonHeight=(e.commonHeight||BigInt(0)).toString()),e.byzantineValidators?t.byzantineValidators=e.byzantineValidators.map(e=>e?o.Validator.toJSON(e):void 0):t.byzantineValidators=[],void 0!==e.totalVotingPower&&(t.totalVotingPower=(e.totalVotingPower||BigInt(0)).toString()),void 0!==e.timestamp&&(t.timestamp=(0,s.fromTimestamp)(e.timestamp).toISOString()),t},fromPartial(e){var t;let r=d();return void 0!==e.conflictingBlock&&null!==e.conflictingBlock&&(r.conflictingBlock=n.LightBlock.fromPartial(e.conflictingBlock)),void 0!==e.commonHeight&&null!==e.commonHeight&&(r.commonHeight=BigInt(e.commonHeight.toString())),r.byzantineValidators=(null===(t=e.byzantineValidators)||void 0===t?void 0:t.map(e=>o.Validator.fromPartial(e)))||[],void 0!==e.totalVotingPower&&null!==e.totalVotingPower&&(r.totalVotingPower=BigInt(e.totalVotingPower.toString())),void 0!==e.timestamp&&null!==e.timestamp&&(r.timestamp=i.Timestamp.fromPartial(e.timestamp)),r}},t.EvidenceList={typeUrl:"/tendermint.types.EvidenceList",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.BinaryWriter.create();for(let n of e.evidence)t.Evidence.encode(n,r.uint32(10).fork()).ldelim();return r},decode(e,r){let n=e instanceof a.BinaryReader?e:new a.BinaryReader(e),i=void 0===r?n.len:n.pos+r,o=c();for(;n.pos>>3==1?o.evidence.push(t.Evidence.decode(n,n.uint32())):n.skipType(7&e)}return o},fromJSON(e){let r=c();return Array.isArray(null==e?void 0:e.evidence)&&(r.evidence=e.evidence.map(e=>t.Evidence.fromJSON(e))),r},toJSON(e){let r={};return e.evidence?r.evidence=e.evidence.map(e=>e?t.Evidence.toJSON(e):void 0):r.evidence=[],r},fromPartial(e){var r;let n=c();return n.evidence=(null===(r=e.evidence)||void 0===r?void 0:r.map(e=>t.Evidence.fromPartial(e)))||[],n}}},55315:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HashedParams=t.VersionParams=t.ValidatorParams=t.EvidenceParams=t.BlockParams=t.ConsensusParams=t.protobufPackage=void 0;let n=r(84849),i=r(46554),o=r(99133);function a(){return{block:void 0,evidence:void 0,validator:void 0,version:void 0}}function s(){return{maxBytes:BigInt(0),maxGas:BigInt(0)}}function l(){return{maxAgeNumBlocks:BigInt(0),maxAgeDuration:n.Duration.fromPartial({}),maxBytes:BigInt(0)}}function u(){return{pubKeyTypes:[]}}function d(){return{app:BigInt(0)}}function c(){return{blockMaxBytes:BigInt(0),blockMaxGas:BigInt(0)}}t.protobufPackage="tendermint.types",t.ConsensusParams={typeUrl:"/tendermint.types.ConsensusParams",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();return void 0!==e.block&&t.BlockParams.encode(e.block,r.uint32(10).fork()).ldelim(),void 0!==e.evidence&&t.EvidenceParams.encode(e.evidence,r.uint32(18).fork()).ldelim(),void 0!==e.validator&&t.ValidatorParams.encode(e.validator,r.uint32(26).fork()).ldelim(),void 0!==e.version&&t.VersionParams.encode(e.version,r.uint32(34).fork()).ldelim(),r},decode(e,r){let n=e instanceof i.BinaryReader?e:new i.BinaryReader(e),o=void 0===r?n.len:n.pos+r,s=a();for(;n.pos>>3){case 1:s.block=t.BlockParams.decode(n,n.uint32());break;case 2:s.evidence=t.EvidenceParams.decode(n,n.uint32());break;case 3:s.validator=t.ValidatorParams.decode(n,n.uint32());break;case 4:s.version=t.VersionParams.decode(n,n.uint32());break;default:n.skipType(7&e)}}return s},fromJSON(e){let r=a();return(0,o.isSet)(e.block)&&(r.block=t.BlockParams.fromJSON(e.block)),(0,o.isSet)(e.evidence)&&(r.evidence=t.EvidenceParams.fromJSON(e.evidence)),(0,o.isSet)(e.validator)&&(r.validator=t.ValidatorParams.fromJSON(e.validator)),(0,o.isSet)(e.version)&&(r.version=t.VersionParams.fromJSON(e.version)),r},toJSON(e){let r={};return void 0!==e.block&&(r.block=e.block?t.BlockParams.toJSON(e.block):void 0),void 0!==e.evidence&&(r.evidence=e.evidence?t.EvidenceParams.toJSON(e.evidence):void 0),void 0!==e.validator&&(r.validator=e.validator?t.ValidatorParams.toJSON(e.validator):void 0),void 0!==e.version&&(r.version=e.version?t.VersionParams.toJSON(e.version):void 0),r},fromPartial(e){let r=a();return void 0!==e.block&&null!==e.block&&(r.block=t.BlockParams.fromPartial(e.block)),void 0!==e.evidence&&null!==e.evidence&&(r.evidence=t.EvidenceParams.fromPartial(e.evidence)),void 0!==e.validator&&null!==e.validator&&(r.validator=t.ValidatorParams.fromPartial(e.validator)),void 0!==e.version&&null!==e.version&&(r.version=t.VersionParams.fromPartial(e.version)),r}},t.BlockParams={typeUrl:"/tendermint.types.BlockParams",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();return e.maxBytes!==BigInt(0)&&t.uint32(8).int64(e.maxBytes),e.maxGas!==BigInt(0)&&t.uint32(16).int64(e.maxGas),t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=s();for(;r.pos>>3){case 1:o.maxBytes=r.int64();break;case 2:o.maxGas=r.int64();break;default:r.skipType(7&e)}}return o},fromJSON(e){let t=s();return(0,o.isSet)(e.maxBytes)&&(t.maxBytes=BigInt(e.maxBytes.toString())),(0,o.isSet)(e.maxGas)&&(t.maxGas=BigInt(e.maxGas.toString())),t},toJSON(e){let t={};return void 0!==e.maxBytes&&(t.maxBytes=(e.maxBytes||BigInt(0)).toString()),void 0!==e.maxGas&&(t.maxGas=(e.maxGas||BigInt(0)).toString()),t},fromPartial(e){let t=s();return void 0!==e.maxBytes&&null!==e.maxBytes&&(t.maxBytes=BigInt(e.maxBytes.toString())),void 0!==e.maxGas&&null!==e.maxGas&&(t.maxGas=BigInt(e.maxGas.toString())),t}},t.EvidenceParams={typeUrl:"/tendermint.types.EvidenceParams",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();return e.maxAgeNumBlocks!==BigInt(0)&&t.uint32(8).int64(e.maxAgeNumBlocks),void 0!==e.maxAgeDuration&&n.Duration.encode(e.maxAgeDuration,t.uint32(18).fork()).ldelim(),e.maxBytes!==BigInt(0)&&t.uint32(24).int64(e.maxBytes),t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),o=void 0===t?r.len:r.pos+t,a=l();for(;r.pos>>3){case 1:a.maxAgeNumBlocks=r.int64();break;case 2:a.maxAgeDuration=n.Duration.decode(r,r.uint32());break;case 3:a.maxBytes=r.int64();break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=l();return(0,o.isSet)(e.maxAgeNumBlocks)&&(t.maxAgeNumBlocks=BigInt(e.maxAgeNumBlocks.toString())),(0,o.isSet)(e.maxAgeDuration)&&(t.maxAgeDuration=n.Duration.fromJSON(e.maxAgeDuration)),(0,o.isSet)(e.maxBytes)&&(t.maxBytes=BigInt(e.maxBytes.toString())),t},toJSON(e){let t={};return void 0!==e.maxAgeNumBlocks&&(t.maxAgeNumBlocks=(e.maxAgeNumBlocks||BigInt(0)).toString()),void 0!==e.maxAgeDuration&&(t.maxAgeDuration=e.maxAgeDuration?n.Duration.toJSON(e.maxAgeDuration):void 0),void 0!==e.maxBytes&&(t.maxBytes=(e.maxBytes||BigInt(0)).toString()),t},fromPartial(e){let t=l();return void 0!==e.maxAgeNumBlocks&&null!==e.maxAgeNumBlocks&&(t.maxAgeNumBlocks=BigInt(e.maxAgeNumBlocks.toString())),void 0!==e.maxAgeDuration&&null!==e.maxAgeDuration&&(t.maxAgeDuration=n.Duration.fromPartial(e.maxAgeDuration)),void 0!==e.maxBytes&&null!==e.maxBytes&&(t.maxBytes=BigInt(e.maxBytes.toString())),t}},t.ValidatorParams={typeUrl:"/tendermint.types.ValidatorParams",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();for(let r of e.pubKeyTypes)t.uint32(10).string(r);return t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=u();for(;r.pos>>3==1?o.pubKeyTypes.push(r.string()):r.skipType(7&e)}return o},fromJSON(e){let t=u();return Array.isArray(null==e?void 0:e.pubKeyTypes)&&(t.pubKeyTypes=e.pubKeyTypes.map(e=>String(e))),t},toJSON(e){let t={};return e.pubKeyTypes?t.pubKeyTypes=e.pubKeyTypes.map(e=>e):t.pubKeyTypes=[],t},fromPartial(e){var t;let r=u();return r.pubKeyTypes=(null===(t=e.pubKeyTypes)||void 0===t?void 0:t.map(e=>e))||[],r}},t.VersionParams={typeUrl:"/tendermint.types.VersionParams",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();return e.app!==BigInt(0)&&t.uint32(8).uint64(e.app),t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=d();for(;r.pos>>3==1?o.app=r.uint64():r.skipType(7&e)}return o},fromJSON(e){let t=d();return(0,o.isSet)(e.app)&&(t.app=BigInt(e.app.toString())),t},toJSON(e){let t={};return void 0!==e.app&&(t.app=(e.app||BigInt(0)).toString()),t},fromPartial(e){let t=d();return void 0!==e.app&&null!==e.app&&(t.app=BigInt(e.app.toString())),t}},t.HashedParams={typeUrl:"/tendermint.types.HashedParams",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();return e.blockMaxBytes!==BigInt(0)&&t.uint32(8).int64(e.blockMaxBytes),e.blockMaxGas!==BigInt(0)&&t.uint32(16).int64(e.blockMaxGas),t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),n=void 0===t?r.len:r.pos+t,o=c();for(;r.pos>>3){case 1:o.blockMaxBytes=r.int64();break;case 2:o.blockMaxGas=r.int64();break;default:r.skipType(7&e)}}return o},fromJSON(e){let t=c();return(0,o.isSet)(e.blockMaxBytes)&&(t.blockMaxBytes=BigInt(e.blockMaxBytes.toString())),(0,o.isSet)(e.blockMaxGas)&&(t.blockMaxGas=BigInt(e.blockMaxGas.toString())),t},toJSON(e){let t={};return void 0!==e.blockMaxBytes&&(t.blockMaxBytes=(e.blockMaxBytes||BigInt(0)).toString()),void 0!==e.blockMaxGas&&(t.blockMaxGas=(e.blockMaxGas||BigInt(0)).toString()),t},fromPartial(e){let t=c();return void 0!==e.blockMaxBytes&&null!==e.blockMaxBytes&&(t.blockMaxBytes=BigInt(e.blockMaxBytes.toString())),void 0!==e.blockMaxGas&&null!==e.blockMaxGas&&(t.blockMaxGas=BigInt(e.blockMaxGas.toString())),t}}},92585:function(e,t,r){"use strict";var n,i;Object.defineProperty(t,"__esModule",{value:!0}),t.TxProof=t.BlockMeta=t.LightBlock=t.SignedHeader=t.Proposal=t.CommitSig=t.Commit=t.Vote=t.Data=t.Header=t.BlockID=t.Part=t.PartSetHeader=t.signedMsgTypeToJSON=t.signedMsgTypeFromJSON=t.SignedMsgType=t.blockIDFlagToJSON=t.blockIDFlagFromJSON=t.BlockIDFlag=t.protobufPackage=void 0;let o=r(86818),a=r(76426),s=r(9990),l=r(83292),u=r(46554),d=r(99133);function c(e){switch(e){case 0:case"BLOCK_ID_FLAG_UNKNOWN":return n.BLOCK_ID_FLAG_UNKNOWN;case 1:case"BLOCK_ID_FLAG_ABSENT":return n.BLOCK_ID_FLAG_ABSENT;case 2:case"BLOCK_ID_FLAG_COMMIT":return n.BLOCK_ID_FLAG_COMMIT;case 3:case"BLOCK_ID_FLAG_NIL":return n.BLOCK_ID_FLAG_NIL;default:return n.UNRECOGNIZED}}function p(e){switch(e){case n.BLOCK_ID_FLAG_UNKNOWN:return"BLOCK_ID_FLAG_UNKNOWN";case n.BLOCK_ID_FLAG_ABSENT:return"BLOCK_ID_FLAG_ABSENT";case n.BLOCK_ID_FLAG_COMMIT:return"BLOCK_ID_FLAG_COMMIT";case n.BLOCK_ID_FLAG_NIL:return"BLOCK_ID_FLAG_NIL";case n.UNRECOGNIZED:default:return"UNRECOGNIZED"}}function f(e){switch(e){case 0:case"SIGNED_MSG_TYPE_UNKNOWN":return i.SIGNED_MSG_TYPE_UNKNOWN;case 1:case"SIGNED_MSG_TYPE_PREVOTE":return i.SIGNED_MSG_TYPE_PREVOTE;case 2:case"SIGNED_MSG_TYPE_PRECOMMIT":return i.SIGNED_MSG_TYPE_PRECOMMIT;case 32:case"SIGNED_MSG_TYPE_PROPOSAL":return i.SIGNED_MSG_TYPE_PROPOSAL;default:return i.UNRECOGNIZED}}function h(e){switch(e){case i.SIGNED_MSG_TYPE_UNKNOWN:return"SIGNED_MSG_TYPE_UNKNOWN";case i.SIGNED_MSG_TYPE_PREVOTE:return"SIGNED_MSG_TYPE_PREVOTE";case i.SIGNED_MSG_TYPE_PRECOMMIT:return"SIGNED_MSG_TYPE_PRECOMMIT";case i.SIGNED_MSG_TYPE_PROPOSAL:return"SIGNED_MSG_TYPE_PROPOSAL";case i.UNRECOGNIZED:default:return"UNRECOGNIZED"}}function g(){return{total:0,hash:new Uint8Array}}function m(){return{index:0,bytes:new Uint8Array,proof:o.Proof.fromPartial({})}}function y(){return{hash:new Uint8Array,partSetHeader:t.PartSetHeader.fromPartial({})}}function v(){return{version:a.Consensus.fromPartial({}),chainId:"",height:BigInt(0),time:s.Timestamp.fromPartial({}),lastBlockId:t.BlockID.fromPartial({}),lastCommitHash:new Uint8Array,dataHash:new Uint8Array,validatorsHash:new Uint8Array,nextValidatorsHash:new Uint8Array,consensusHash:new Uint8Array,appHash:new Uint8Array,lastResultsHash:new Uint8Array,evidenceHash:new Uint8Array,proposerAddress:new Uint8Array}}function b(){return{txs:[]}}function S(){return{type:0,height:BigInt(0),round:0,blockId:t.BlockID.fromPartial({}),timestamp:s.Timestamp.fromPartial({}),validatorAddress:new Uint8Array,validatorIndex:0,signature:new Uint8Array}}function w(){return{height:BigInt(0),round:0,blockId:t.BlockID.fromPartial({}),signatures:[]}}function _(){return{blockIdFlag:0,validatorAddress:new Uint8Array,timestamp:s.Timestamp.fromPartial({}),signature:new Uint8Array}}function k(){return{type:0,height:BigInt(0),round:0,polRound:0,blockId:t.BlockID.fromPartial({}),timestamp:s.Timestamp.fromPartial({}),signature:new Uint8Array}}function O(){return{header:void 0,commit:void 0}}function P(){return{signedHeader:void 0,validatorSet:void 0}}function A(){return{blockId:t.BlockID.fromPartial({}),blockSize:BigInt(0),header:t.Header.fromPartial({}),numTxs:BigInt(0)}}function I(){return{rootHash:new Uint8Array,data:new Uint8Array,proof:void 0}}t.protobufPackage="tendermint.types",function(e){e[e.BLOCK_ID_FLAG_UNKNOWN=0]="BLOCK_ID_FLAG_UNKNOWN",e[e.BLOCK_ID_FLAG_ABSENT=1]="BLOCK_ID_FLAG_ABSENT",e[e.BLOCK_ID_FLAG_COMMIT=2]="BLOCK_ID_FLAG_COMMIT",e[e.BLOCK_ID_FLAG_NIL=3]="BLOCK_ID_FLAG_NIL",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(n||(t.BlockIDFlag=n={})),t.blockIDFlagFromJSON=c,t.blockIDFlagToJSON=p,function(e){e[e.SIGNED_MSG_TYPE_UNKNOWN=0]="SIGNED_MSG_TYPE_UNKNOWN",e[e.SIGNED_MSG_TYPE_PREVOTE=1]="SIGNED_MSG_TYPE_PREVOTE",e[e.SIGNED_MSG_TYPE_PRECOMMIT=2]="SIGNED_MSG_TYPE_PRECOMMIT",e[e.SIGNED_MSG_TYPE_PROPOSAL=32]="SIGNED_MSG_TYPE_PROPOSAL",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(i||(t.SignedMsgType=i={})),t.signedMsgTypeFromJSON=f,t.signedMsgTypeToJSON=h,t.PartSetHeader={typeUrl:"/tendermint.types.PartSetHeader",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.BinaryWriter.create();return 0!==e.total&&t.uint32(8).uint32(e.total),0!==e.hash.length&&t.uint32(18).bytes(e.hash),t},decode(e,t){let r=e instanceof u.BinaryReader?e:new u.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=g();for(;r.pos>>3){case 1:i.total=r.uint32();break;case 2:i.hash=r.bytes();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=g();return(0,d.isSet)(e.total)&&(t.total=Number(e.total)),(0,d.isSet)(e.hash)&&(t.hash=(0,d.bytesFromBase64)(e.hash)),t},toJSON(e){let t={};return void 0!==e.total&&(t.total=Math.round(e.total)),void 0!==e.hash&&(t.hash=(0,d.base64FromBytes)(void 0!==e.hash?e.hash:new Uint8Array)),t},fromPartial(e){var t,r;let n=g();return n.total=null!==(t=e.total)&&void 0!==t?t:0,n.hash=null!==(r=e.hash)&&void 0!==r?r:new Uint8Array,n}},t.Part={typeUrl:"/tendermint.types.Part",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.BinaryWriter.create();return 0!==e.index&&t.uint32(8).uint32(e.index),0!==e.bytes.length&&t.uint32(18).bytes(e.bytes),void 0!==e.proof&&o.Proof.encode(e.proof,t.uint32(26).fork()).ldelim(),t},decode(e,t){let r=e instanceof u.BinaryReader?e:new u.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=m();for(;r.pos>>3){case 1:i.index=r.uint32();break;case 2:i.bytes=r.bytes();break;case 3:i.proof=o.Proof.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=m();return(0,d.isSet)(e.index)&&(t.index=Number(e.index)),(0,d.isSet)(e.bytes)&&(t.bytes=(0,d.bytesFromBase64)(e.bytes)),(0,d.isSet)(e.proof)&&(t.proof=o.Proof.fromJSON(e.proof)),t},toJSON(e){let t={};return void 0!==e.index&&(t.index=Math.round(e.index)),void 0!==e.bytes&&(t.bytes=(0,d.base64FromBytes)(void 0!==e.bytes?e.bytes:new Uint8Array)),void 0!==e.proof&&(t.proof=e.proof?o.Proof.toJSON(e.proof):void 0),t},fromPartial(e){var t,r;let n=m();return n.index=null!==(t=e.index)&&void 0!==t?t:0,n.bytes=null!==(r=e.bytes)&&void 0!==r?r:new Uint8Array,void 0!==e.proof&&null!==e.proof&&(n.proof=o.Proof.fromPartial(e.proof)),n}},t.BlockID={typeUrl:"/tendermint.types.BlockID",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.BinaryWriter.create();return 0!==e.hash.length&&r.uint32(10).bytes(e.hash),void 0!==e.partSetHeader&&t.PartSetHeader.encode(e.partSetHeader,r.uint32(18).fork()).ldelim(),r},decode(e,r){let n=e instanceof u.BinaryReader?e:new u.BinaryReader(e),i=void 0===r?n.len:n.pos+r,o=y();for(;n.pos>>3){case 1:o.hash=n.bytes();break;case 2:o.partSetHeader=t.PartSetHeader.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){let r=y();return(0,d.isSet)(e.hash)&&(r.hash=(0,d.bytesFromBase64)(e.hash)),(0,d.isSet)(e.partSetHeader)&&(r.partSetHeader=t.PartSetHeader.fromJSON(e.partSetHeader)),r},toJSON(e){let r={};return void 0!==e.hash&&(r.hash=(0,d.base64FromBytes)(void 0!==e.hash?e.hash:new Uint8Array)),void 0!==e.partSetHeader&&(r.partSetHeader=e.partSetHeader?t.PartSetHeader.toJSON(e.partSetHeader):void 0),r},fromPartial(e){var r;let n=y();return n.hash=null!==(r=e.hash)&&void 0!==r?r:new Uint8Array,void 0!==e.partSetHeader&&null!==e.partSetHeader&&(n.partSetHeader=t.PartSetHeader.fromPartial(e.partSetHeader)),n}},t.Header={typeUrl:"/tendermint.types.Header",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.BinaryWriter.create();return void 0!==e.version&&a.Consensus.encode(e.version,r.uint32(10).fork()).ldelim(),""!==e.chainId&&r.uint32(18).string(e.chainId),e.height!==BigInt(0)&&r.uint32(24).int64(e.height),void 0!==e.time&&s.Timestamp.encode(e.time,r.uint32(34).fork()).ldelim(),void 0!==e.lastBlockId&&t.BlockID.encode(e.lastBlockId,r.uint32(42).fork()).ldelim(),0!==e.lastCommitHash.length&&r.uint32(50).bytes(e.lastCommitHash),0!==e.dataHash.length&&r.uint32(58).bytes(e.dataHash),0!==e.validatorsHash.length&&r.uint32(66).bytes(e.validatorsHash),0!==e.nextValidatorsHash.length&&r.uint32(74).bytes(e.nextValidatorsHash),0!==e.consensusHash.length&&r.uint32(82).bytes(e.consensusHash),0!==e.appHash.length&&r.uint32(90).bytes(e.appHash),0!==e.lastResultsHash.length&&r.uint32(98).bytes(e.lastResultsHash),0!==e.evidenceHash.length&&r.uint32(106).bytes(e.evidenceHash),0!==e.proposerAddress.length&&r.uint32(114).bytes(e.proposerAddress),r},decode(e,r){let n=e instanceof u.BinaryReader?e:new u.BinaryReader(e),i=void 0===r?n.len:n.pos+r,o=v();for(;n.pos>>3){case 1:o.version=a.Consensus.decode(n,n.uint32());break;case 2:o.chainId=n.string();break;case 3:o.height=n.int64();break;case 4:o.time=s.Timestamp.decode(n,n.uint32());break;case 5:o.lastBlockId=t.BlockID.decode(n,n.uint32());break;case 6:o.lastCommitHash=n.bytes();break;case 7:o.dataHash=n.bytes();break;case 8:o.validatorsHash=n.bytes();break;case 9:o.nextValidatorsHash=n.bytes();break;case 10:o.consensusHash=n.bytes();break;case 11:o.appHash=n.bytes();break;case 12:o.lastResultsHash=n.bytes();break;case 13:o.evidenceHash=n.bytes();break;case 14:o.proposerAddress=n.bytes();break;default:n.skipType(7&e)}}return o},fromJSON(e){let r=v();return(0,d.isSet)(e.version)&&(r.version=a.Consensus.fromJSON(e.version)),(0,d.isSet)(e.chainId)&&(r.chainId=String(e.chainId)),(0,d.isSet)(e.height)&&(r.height=BigInt(e.height.toString())),(0,d.isSet)(e.time)&&(r.time=(0,d.fromJsonTimestamp)(e.time)),(0,d.isSet)(e.lastBlockId)&&(r.lastBlockId=t.BlockID.fromJSON(e.lastBlockId)),(0,d.isSet)(e.lastCommitHash)&&(r.lastCommitHash=(0,d.bytesFromBase64)(e.lastCommitHash)),(0,d.isSet)(e.dataHash)&&(r.dataHash=(0,d.bytesFromBase64)(e.dataHash)),(0,d.isSet)(e.validatorsHash)&&(r.validatorsHash=(0,d.bytesFromBase64)(e.validatorsHash)),(0,d.isSet)(e.nextValidatorsHash)&&(r.nextValidatorsHash=(0,d.bytesFromBase64)(e.nextValidatorsHash)),(0,d.isSet)(e.consensusHash)&&(r.consensusHash=(0,d.bytesFromBase64)(e.consensusHash)),(0,d.isSet)(e.appHash)&&(r.appHash=(0,d.bytesFromBase64)(e.appHash)),(0,d.isSet)(e.lastResultsHash)&&(r.lastResultsHash=(0,d.bytesFromBase64)(e.lastResultsHash)),(0,d.isSet)(e.evidenceHash)&&(r.evidenceHash=(0,d.bytesFromBase64)(e.evidenceHash)),(0,d.isSet)(e.proposerAddress)&&(r.proposerAddress=(0,d.bytesFromBase64)(e.proposerAddress)),r},toJSON(e){let r={};return void 0!==e.version&&(r.version=e.version?a.Consensus.toJSON(e.version):void 0),void 0!==e.chainId&&(r.chainId=e.chainId),void 0!==e.height&&(r.height=(e.height||BigInt(0)).toString()),void 0!==e.time&&(r.time=(0,d.fromTimestamp)(e.time).toISOString()),void 0!==e.lastBlockId&&(r.lastBlockId=e.lastBlockId?t.BlockID.toJSON(e.lastBlockId):void 0),void 0!==e.lastCommitHash&&(r.lastCommitHash=(0,d.base64FromBytes)(void 0!==e.lastCommitHash?e.lastCommitHash:new Uint8Array)),void 0!==e.dataHash&&(r.dataHash=(0,d.base64FromBytes)(void 0!==e.dataHash?e.dataHash:new Uint8Array)),void 0!==e.validatorsHash&&(r.validatorsHash=(0,d.base64FromBytes)(void 0!==e.validatorsHash?e.validatorsHash:new Uint8Array)),void 0!==e.nextValidatorsHash&&(r.nextValidatorsHash=(0,d.base64FromBytes)(void 0!==e.nextValidatorsHash?e.nextValidatorsHash:new Uint8Array)),void 0!==e.consensusHash&&(r.consensusHash=(0,d.base64FromBytes)(void 0!==e.consensusHash?e.consensusHash:new Uint8Array)),void 0!==e.appHash&&(r.appHash=(0,d.base64FromBytes)(void 0!==e.appHash?e.appHash:new Uint8Array)),void 0!==e.lastResultsHash&&(r.lastResultsHash=(0,d.base64FromBytes)(void 0!==e.lastResultsHash?e.lastResultsHash:new Uint8Array)),void 0!==e.evidenceHash&&(r.evidenceHash=(0,d.base64FromBytes)(void 0!==e.evidenceHash?e.evidenceHash:new Uint8Array)),void 0!==e.proposerAddress&&(r.proposerAddress=(0,d.base64FromBytes)(void 0!==e.proposerAddress?e.proposerAddress:new Uint8Array)),r},fromPartial(e){var r,n,i,o,l,u,d,c,p,f;let h=v();return void 0!==e.version&&null!==e.version&&(h.version=a.Consensus.fromPartial(e.version)),h.chainId=null!==(r=e.chainId)&&void 0!==r?r:"",void 0!==e.height&&null!==e.height&&(h.height=BigInt(e.height.toString())),void 0!==e.time&&null!==e.time&&(h.time=s.Timestamp.fromPartial(e.time)),void 0!==e.lastBlockId&&null!==e.lastBlockId&&(h.lastBlockId=t.BlockID.fromPartial(e.lastBlockId)),h.lastCommitHash=null!==(n=e.lastCommitHash)&&void 0!==n?n:new Uint8Array,h.dataHash=null!==(i=e.dataHash)&&void 0!==i?i:new Uint8Array,h.validatorsHash=null!==(o=e.validatorsHash)&&void 0!==o?o:new Uint8Array,h.nextValidatorsHash=null!==(l=e.nextValidatorsHash)&&void 0!==l?l:new Uint8Array,h.consensusHash=null!==(u=e.consensusHash)&&void 0!==u?u:new Uint8Array,h.appHash=null!==(d=e.appHash)&&void 0!==d?d:new Uint8Array,h.lastResultsHash=null!==(c=e.lastResultsHash)&&void 0!==c?c:new Uint8Array,h.evidenceHash=null!==(p=e.evidenceHash)&&void 0!==p?p:new Uint8Array,h.proposerAddress=null!==(f=e.proposerAddress)&&void 0!==f?f:new Uint8Array,h}},t.Data={typeUrl:"/tendermint.types.Data",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.BinaryWriter.create();for(let r of e.txs)t.uint32(10).bytes(r);return t},decode(e,t){let r=e instanceof u.BinaryReader?e:new u.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=b();for(;r.pos>>3==1?i.txs.push(r.bytes()):r.skipType(7&e)}return i},fromJSON(e){let t=b();return Array.isArray(null==e?void 0:e.txs)&&(t.txs=e.txs.map(e=>(0,d.bytesFromBase64)(e))),t},toJSON(e){let t={};return e.txs?t.txs=e.txs.map(e=>(0,d.base64FromBytes)(void 0!==e?e:new Uint8Array)):t.txs=[],t},fromPartial(e){var t;let r=b();return r.txs=(null===(t=e.txs)||void 0===t?void 0:t.map(e=>e))||[],r}},t.Vote={typeUrl:"/tendermint.types.Vote",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.BinaryWriter.create();return 0!==e.type&&r.uint32(8).int32(e.type),e.height!==BigInt(0)&&r.uint32(16).int64(e.height),0!==e.round&&r.uint32(24).int32(e.round),void 0!==e.blockId&&t.BlockID.encode(e.blockId,r.uint32(34).fork()).ldelim(),void 0!==e.timestamp&&s.Timestamp.encode(e.timestamp,r.uint32(42).fork()).ldelim(),0!==e.validatorAddress.length&&r.uint32(50).bytes(e.validatorAddress),0!==e.validatorIndex&&r.uint32(56).int32(e.validatorIndex),0!==e.signature.length&&r.uint32(66).bytes(e.signature),r},decode(e,r){let n=e instanceof u.BinaryReader?e:new u.BinaryReader(e),i=void 0===r?n.len:n.pos+r,o=S();for(;n.pos>>3){case 1:o.type=n.int32();break;case 2:o.height=n.int64();break;case 3:o.round=n.int32();break;case 4:o.blockId=t.BlockID.decode(n,n.uint32());break;case 5:o.timestamp=s.Timestamp.decode(n,n.uint32());break;case 6:o.validatorAddress=n.bytes();break;case 7:o.validatorIndex=n.int32();break;case 8:o.signature=n.bytes();break;default:n.skipType(7&e)}}return o},fromJSON(e){let r=S();return(0,d.isSet)(e.type)&&(r.type=f(e.type)),(0,d.isSet)(e.height)&&(r.height=BigInt(e.height.toString())),(0,d.isSet)(e.round)&&(r.round=Number(e.round)),(0,d.isSet)(e.blockId)&&(r.blockId=t.BlockID.fromJSON(e.blockId)),(0,d.isSet)(e.timestamp)&&(r.timestamp=(0,d.fromJsonTimestamp)(e.timestamp)),(0,d.isSet)(e.validatorAddress)&&(r.validatorAddress=(0,d.bytesFromBase64)(e.validatorAddress)),(0,d.isSet)(e.validatorIndex)&&(r.validatorIndex=Number(e.validatorIndex)),(0,d.isSet)(e.signature)&&(r.signature=(0,d.bytesFromBase64)(e.signature)),r},toJSON(e){let r={};return void 0!==e.type&&(r.type=h(e.type)),void 0!==e.height&&(r.height=(e.height||BigInt(0)).toString()),void 0!==e.round&&(r.round=Math.round(e.round)),void 0!==e.blockId&&(r.blockId=e.blockId?t.BlockID.toJSON(e.blockId):void 0),void 0!==e.timestamp&&(r.timestamp=(0,d.fromTimestamp)(e.timestamp).toISOString()),void 0!==e.validatorAddress&&(r.validatorAddress=(0,d.base64FromBytes)(void 0!==e.validatorAddress?e.validatorAddress:new Uint8Array)),void 0!==e.validatorIndex&&(r.validatorIndex=Math.round(e.validatorIndex)),void 0!==e.signature&&(r.signature=(0,d.base64FromBytes)(void 0!==e.signature?e.signature:new Uint8Array)),r},fromPartial(e){var r,n,i,o,a;let l=S();return l.type=null!==(r=e.type)&&void 0!==r?r:0,void 0!==e.height&&null!==e.height&&(l.height=BigInt(e.height.toString())),l.round=null!==(n=e.round)&&void 0!==n?n:0,void 0!==e.blockId&&null!==e.blockId&&(l.blockId=t.BlockID.fromPartial(e.blockId)),void 0!==e.timestamp&&null!==e.timestamp&&(l.timestamp=s.Timestamp.fromPartial(e.timestamp)),l.validatorAddress=null!==(i=e.validatorAddress)&&void 0!==i?i:new Uint8Array,l.validatorIndex=null!==(o=e.validatorIndex)&&void 0!==o?o:0,l.signature=null!==(a=e.signature)&&void 0!==a?a:new Uint8Array,l}},t.Commit={typeUrl:"/tendermint.types.Commit",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.BinaryWriter.create();for(let n of(e.height!==BigInt(0)&&r.uint32(8).int64(e.height),0!==e.round&&r.uint32(16).int32(e.round),void 0!==e.blockId&&t.BlockID.encode(e.blockId,r.uint32(26).fork()).ldelim(),e.signatures))t.CommitSig.encode(n,r.uint32(34).fork()).ldelim();return r},decode(e,r){let n=e instanceof u.BinaryReader?e:new u.BinaryReader(e),i=void 0===r?n.len:n.pos+r,o=w();for(;n.pos>>3){case 1:o.height=n.int64();break;case 2:o.round=n.int32();break;case 3:o.blockId=t.BlockID.decode(n,n.uint32());break;case 4:o.signatures.push(t.CommitSig.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return o},fromJSON(e){let r=w();return(0,d.isSet)(e.height)&&(r.height=BigInt(e.height.toString())),(0,d.isSet)(e.round)&&(r.round=Number(e.round)),(0,d.isSet)(e.blockId)&&(r.blockId=t.BlockID.fromJSON(e.blockId)),Array.isArray(null==e?void 0:e.signatures)&&(r.signatures=e.signatures.map(e=>t.CommitSig.fromJSON(e))),r},toJSON(e){let r={};return void 0!==e.height&&(r.height=(e.height||BigInt(0)).toString()),void 0!==e.round&&(r.round=Math.round(e.round)),void 0!==e.blockId&&(r.blockId=e.blockId?t.BlockID.toJSON(e.blockId):void 0),e.signatures?r.signatures=e.signatures.map(e=>e?t.CommitSig.toJSON(e):void 0):r.signatures=[],r},fromPartial(e){var r,n;let i=w();return void 0!==e.height&&null!==e.height&&(i.height=BigInt(e.height.toString())),i.round=null!==(n=e.round)&&void 0!==n?n:0,void 0!==e.blockId&&null!==e.blockId&&(i.blockId=t.BlockID.fromPartial(e.blockId)),i.signatures=(null===(r=e.signatures)||void 0===r?void 0:r.map(e=>t.CommitSig.fromPartial(e)))||[],i}},t.CommitSig={typeUrl:"/tendermint.types.CommitSig",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.BinaryWriter.create();return 0!==e.blockIdFlag&&t.uint32(8).int32(e.blockIdFlag),0!==e.validatorAddress.length&&t.uint32(18).bytes(e.validatorAddress),void 0!==e.timestamp&&s.Timestamp.encode(e.timestamp,t.uint32(26).fork()).ldelim(),0!==e.signature.length&&t.uint32(34).bytes(e.signature),t},decode(e,t){let r=e instanceof u.BinaryReader?e:new u.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=_();for(;r.pos>>3){case 1:i.blockIdFlag=r.int32();break;case 2:i.validatorAddress=r.bytes();break;case 3:i.timestamp=s.Timestamp.decode(r,r.uint32());break;case 4:i.signature=r.bytes();break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=_();return(0,d.isSet)(e.blockIdFlag)&&(t.blockIdFlag=c(e.blockIdFlag)),(0,d.isSet)(e.validatorAddress)&&(t.validatorAddress=(0,d.bytesFromBase64)(e.validatorAddress)),(0,d.isSet)(e.timestamp)&&(t.timestamp=(0,d.fromJsonTimestamp)(e.timestamp)),(0,d.isSet)(e.signature)&&(t.signature=(0,d.bytesFromBase64)(e.signature)),t},toJSON(e){let t={};return void 0!==e.blockIdFlag&&(t.blockIdFlag=p(e.blockIdFlag)),void 0!==e.validatorAddress&&(t.validatorAddress=(0,d.base64FromBytes)(void 0!==e.validatorAddress?e.validatorAddress:new Uint8Array)),void 0!==e.timestamp&&(t.timestamp=(0,d.fromTimestamp)(e.timestamp).toISOString()),void 0!==e.signature&&(t.signature=(0,d.base64FromBytes)(void 0!==e.signature?e.signature:new Uint8Array)),t},fromPartial(e){var t,r,n;let i=_();return i.blockIdFlag=null!==(t=e.blockIdFlag)&&void 0!==t?t:0,i.validatorAddress=null!==(r=e.validatorAddress)&&void 0!==r?r:new Uint8Array,void 0!==e.timestamp&&null!==e.timestamp&&(i.timestamp=s.Timestamp.fromPartial(e.timestamp)),i.signature=null!==(n=e.signature)&&void 0!==n?n:new Uint8Array,i}},t.Proposal={typeUrl:"/tendermint.types.Proposal",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.BinaryWriter.create();return 0!==e.type&&r.uint32(8).int32(e.type),e.height!==BigInt(0)&&r.uint32(16).int64(e.height),0!==e.round&&r.uint32(24).int32(e.round),0!==e.polRound&&r.uint32(32).int32(e.polRound),void 0!==e.blockId&&t.BlockID.encode(e.blockId,r.uint32(42).fork()).ldelim(),void 0!==e.timestamp&&s.Timestamp.encode(e.timestamp,r.uint32(50).fork()).ldelim(),0!==e.signature.length&&r.uint32(58).bytes(e.signature),r},decode(e,r){let n=e instanceof u.BinaryReader?e:new u.BinaryReader(e),i=void 0===r?n.len:n.pos+r,o=k();for(;n.pos>>3){case 1:o.type=n.int32();break;case 2:o.height=n.int64();break;case 3:o.round=n.int32();break;case 4:o.polRound=n.int32();break;case 5:o.blockId=t.BlockID.decode(n,n.uint32());break;case 6:o.timestamp=s.Timestamp.decode(n,n.uint32());break;case 7:o.signature=n.bytes();break;default:n.skipType(7&e)}}return o},fromJSON(e){let r=k();return(0,d.isSet)(e.type)&&(r.type=f(e.type)),(0,d.isSet)(e.height)&&(r.height=BigInt(e.height.toString())),(0,d.isSet)(e.round)&&(r.round=Number(e.round)),(0,d.isSet)(e.polRound)&&(r.polRound=Number(e.polRound)),(0,d.isSet)(e.blockId)&&(r.blockId=t.BlockID.fromJSON(e.blockId)),(0,d.isSet)(e.timestamp)&&(r.timestamp=(0,d.fromJsonTimestamp)(e.timestamp)),(0,d.isSet)(e.signature)&&(r.signature=(0,d.bytesFromBase64)(e.signature)),r},toJSON(e){let r={};return void 0!==e.type&&(r.type=h(e.type)),void 0!==e.height&&(r.height=(e.height||BigInt(0)).toString()),void 0!==e.round&&(r.round=Math.round(e.round)),void 0!==e.polRound&&(r.polRound=Math.round(e.polRound)),void 0!==e.blockId&&(r.blockId=e.blockId?t.BlockID.toJSON(e.blockId):void 0),void 0!==e.timestamp&&(r.timestamp=(0,d.fromTimestamp)(e.timestamp).toISOString()),void 0!==e.signature&&(r.signature=(0,d.base64FromBytes)(void 0!==e.signature?e.signature:new Uint8Array)),r},fromPartial(e){var r,n,i,o;let a=k();return a.type=null!==(r=e.type)&&void 0!==r?r:0,void 0!==e.height&&null!==e.height&&(a.height=BigInt(e.height.toString())),a.round=null!==(n=e.round)&&void 0!==n?n:0,a.polRound=null!==(i=e.polRound)&&void 0!==i?i:0,void 0!==e.blockId&&null!==e.blockId&&(a.blockId=t.BlockID.fromPartial(e.blockId)),void 0!==e.timestamp&&null!==e.timestamp&&(a.timestamp=s.Timestamp.fromPartial(e.timestamp)),a.signature=null!==(o=e.signature)&&void 0!==o?o:new Uint8Array,a}},t.SignedHeader={typeUrl:"/tendermint.types.SignedHeader",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.BinaryWriter.create();return void 0!==e.header&&t.Header.encode(e.header,r.uint32(10).fork()).ldelim(),void 0!==e.commit&&t.Commit.encode(e.commit,r.uint32(18).fork()).ldelim(),r},decode(e,r){let n=e instanceof u.BinaryReader?e:new u.BinaryReader(e),i=void 0===r?n.len:n.pos+r,o=O();for(;n.pos>>3){case 1:o.header=t.Header.decode(n,n.uint32());break;case 2:o.commit=t.Commit.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){let r=O();return(0,d.isSet)(e.header)&&(r.header=t.Header.fromJSON(e.header)),(0,d.isSet)(e.commit)&&(r.commit=t.Commit.fromJSON(e.commit)),r},toJSON(e){let r={};return void 0!==e.header&&(r.header=e.header?t.Header.toJSON(e.header):void 0),void 0!==e.commit&&(r.commit=e.commit?t.Commit.toJSON(e.commit):void 0),r},fromPartial(e){let r=O();return void 0!==e.header&&null!==e.header&&(r.header=t.Header.fromPartial(e.header)),void 0!==e.commit&&null!==e.commit&&(r.commit=t.Commit.fromPartial(e.commit)),r}},t.LightBlock={typeUrl:"/tendermint.types.LightBlock",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.BinaryWriter.create();return void 0!==e.signedHeader&&t.SignedHeader.encode(e.signedHeader,r.uint32(10).fork()).ldelim(),void 0!==e.validatorSet&&l.ValidatorSet.encode(e.validatorSet,r.uint32(18).fork()).ldelim(),r},decode(e,r){let n=e instanceof u.BinaryReader?e:new u.BinaryReader(e),i=void 0===r?n.len:n.pos+r,o=P();for(;n.pos>>3){case 1:o.signedHeader=t.SignedHeader.decode(n,n.uint32());break;case 2:o.validatorSet=l.ValidatorSet.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(e){let r=P();return(0,d.isSet)(e.signedHeader)&&(r.signedHeader=t.SignedHeader.fromJSON(e.signedHeader)),(0,d.isSet)(e.validatorSet)&&(r.validatorSet=l.ValidatorSet.fromJSON(e.validatorSet)),r},toJSON(e){let r={};return void 0!==e.signedHeader&&(r.signedHeader=e.signedHeader?t.SignedHeader.toJSON(e.signedHeader):void 0),void 0!==e.validatorSet&&(r.validatorSet=e.validatorSet?l.ValidatorSet.toJSON(e.validatorSet):void 0),r},fromPartial(e){let r=P();return void 0!==e.signedHeader&&null!==e.signedHeader&&(r.signedHeader=t.SignedHeader.fromPartial(e.signedHeader)),void 0!==e.validatorSet&&null!==e.validatorSet&&(r.validatorSet=l.ValidatorSet.fromPartial(e.validatorSet)),r}},t.BlockMeta={typeUrl:"/tendermint.types.BlockMeta",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.BinaryWriter.create();return void 0!==e.blockId&&t.BlockID.encode(e.blockId,r.uint32(10).fork()).ldelim(),e.blockSize!==BigInt(0)&&r.uint32(16).int64(e.blockSize),void 0!==e.header&&t.Header.encode(e.header,r.uint32(26).fork()).ldelim(),e.numTxs!==BigInt(0)&&r.uint32(32).int64(e.numTxs),r},decode(e,r){let n=e instanceof u.BinaryReader?e:new u.BinaryReader(e),i=void 0===r?n.len:n.pos+r,o=A();for(;n.pos>>3){case 1:o.blockId=t.BlockID.decode(n,n.uint32());break;case 2:o.blockSize=n.int64();break;case 3:o.header=t.Header.decode(n,n.uint32());break;case 4:o.numTxs=n.int64();break;default:n.skipType(7&e)}}return o},fromJSON(e){let r=A();return(0,d.isSet)(e.blockId)&&(r.blockId=t.BlockID.fromJSON(e.blockId)),(0,d.isSet)(e.blockSize)&&(r.blockSize=BigInt(e.blockSize.toString())),(0,d.isSet)(e.header)&&(r.header=t.Header.fromJSON(e.header)),(0,d.isSet)(e.numTxs)&&(r.numTxs=BigInt(e.numTxs.toString())),r},toJSON(e){let r={};return void 0!==e.blockId&&(r.blockId=e.blockId?t.BlockID.toJSON(e.blockId):void 0),void 0!==e.blockSize&&(r.blockSize=(e.blockSize||BigInt(0)).toString()),void 0!==e.header&&(r.header=e.header?t.Header.toJSON(e.header):void 0),void 0!==e.numTxs&&(r.numTxs=(e.numTxs||BigInt(0)).toString()),r},fromPartial(e){let r=A();return void 0!==e.blockId&&null!==e.blockId&&(r.blockId=t.BlockID.fromPartial(e.blockId)),void 0!==e.blockSize&&null!==e.blockSize&&(r.blockSize=BigInt(e.blockSize.toString())),void 0!==e.header&&null!==e.header&&(r.header=t.Header.fromPartial(e.header)),void 0!==e.numTxs&&null!==e.numTxs&&(r.numTxs=BigInt(e.numTxs.toString())),r}},t.TxProof={typeUrl:"/tendermint.types.TxProof",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.BinaryWriter.create();return 0!==e.rootHash.length&&t.uint32(10).bytes(e.rootHash),0!==e.data.length&&t.uint32(18).bytes(e.data),void 0!==e.proof&&o.Proof.encode(e.proof,t.uint32(26).fork()).ldelim(),t},decode(e,t){let r=e instanceof u.BinaryReader?e:new u.BinaryReader(e),n=void 0===t?r.len:r.pos+t,i=I();for(;r.pos>>3){case 1:i.rootHash=r.bytes();break;case 2:i.data=r.bytes();break;case 3:i.proof=o.Proof.decode(r,r.uint32());break;default:r.skipType(7&e)}}return i},fromJSON(e){let t=I();return(0,d.isSet)(e.rootHash)&&(t.rootHash=(0,d.bytesFromBase64)(e.rootHash)),(0,d.isSet)(e.data)&&(t.data=(0,d.bytesFromBase64)(e.data)),(0,d.isSet)(e.proof)&&(t.proof=o.Proof.fromJSON(e.proof)),t},toJSON(e){let t={};return void 0!==e.rootHash&&(t.rootHash=(0,d.base64FromBytes)(void 0!==e.rootHash?e.rootHash:new Uint8Array)),void 0!==e.data&&(t.data=(0,d.base64FromBytes)(void 0!==e.data?e.data:new Uint8Array)),void 0!==e.proof&&(t.proof=e.proof?o.Proof.toJSON(e.proof):void 0),t},fromPartial(e){var t,r;let n=I();return n.rootHash=null!==(t=e.rootHash)&&void 0!==t?t:new Uint8Array,n.data=null!==(r=e.data)&&void 0!==r?r:new Uint8Array,void 0!==e.proof&&null!==e.proof&&(n.proof=o.Proof.fromPartial(e.proof)),n}}},83292:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SimpleValidator=t.Validator=t.ValidatorSet=t.protobufPackage=void 0;let n=r(29598),i=r(46554),o=r(99133);function a(){return{validators:[],proposer:void 0,totalVotingPower:BigInt(0)}}function s(){return{address:new Uint8Array,pubKey:n.PublicKey.fromPartial({}),votingPower:BigInt(0),proposerPriority:BigInt(0)}}function l(){return{pubKey:void 0,votingPower:BigInt(0)}}t.protobufPackage="tendermint.types",t.ValidatorSet={typeUrl:"/tendermint.types.ValidatorSet",encode(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();for(let n of e.validators)t.Validator.encode(n,r.uint32(10).fork()).ldelim();return void 0!==e.proposer&&t.Validator.encode(e.proposer,r.uint32(18).fork()).ldelim(),e.totalVotingPower!==BigInt(0)&&r.uint32(24).int64(e.totalVotingPower),r},decode(e,r){let n=e instanceof i.BinaryReader?e:new i.BinaryReader(e),o=void 0===r?n.len:n.pos+r,s=a();for(;n.pos>>3){case 1:s.validators.push(t.Validator.decode(n,n.uint32()));break;case 2:s.proposer=t.Validator.decode(n,n.uint32());break;case 3:s.totalVotingPower=n.int64();break;default:n.skipType(7&e)}}return s},fromJSON(e){let r=a();return Array.isArray(null==e?void 0:e.validators)&&(r.validators=e.validators.map(e=>t.Validator.fromJSON(e))),(0,o.isSet)(e.proposer)&&(r.proposer=t.Validator.fromJSON(e.proposer)),(0,o.isSet)(e.totalVotingPower)&&(r.totalVotingPower=BigInt(e.totalVotingPower.toString())),r},toJSON(e){let r={};return e.validators?r.validators=e.validators.map(e=>e?t.Validator.toJSON(e):void 0):r.validators=[],void 0!==e.proposer&&(r.proposer=e.proposer?t.Validator.toJSON(e.proposer):void 0),void 0!==e.totalVotingPower&&(r.totalVotingPower=(e.totalVotingPower||BigInt(0)).toString()),r},fromPartial(e){var r;let n=a();return n.validators=(null===(r=e.validators)||void 0===r?void 0:r.map(e=>t.Validator.fromPartial(e)))||[],void 0!==e.proposer&&null!==e.proposer&&(n.proposer=t.Validator.fromPartial(e.proposer)),void 0!==e.totalVotingPower&&null!==e.totalVotingPower&&(n.totalVotingPower=BigInt(e.totalVotingPower.toString())),n}},t.Validator={typeUrl:"/tendermint.types.Validator",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();return 0!==e.address.length&&t.uint32(10).bytes(e.address),void 0!==e.pubKey&&n.PublicKey.encode(e.pubKey,t.uint32(18).fork()).ldelim(),e.votingPower!==BigInt(0)&&t.uint32(24).int64(e.votingPower),e.proposerPriority!==BigInt(0)&&t.uint32(32).int64(e.proposerPriority),t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),o=void 0===t?r.len:r.pos+t,a=s();for(;r.pos>>3){case 1:a.address=r.bytes();break;case 2:a.pubKey=n.PublicKey.decode(r,r.uint32());break;case 3:a.votingPower=r.int64();break;case 4:a.proposerPriority=r.int64();break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=s();return(0,o.isSet)(e.address)&&(t.address=(0,o.bytesFromBase64)(e.address)),(0,o.isSet)(e.pubKey)&&(t.pubKey=n.PublicKey.fromJSON(e.pubKey)),(0,o.isSet)(e.votingPower)&&(t.votingPower=BigInt(e.votingPower.toString())),(0,o.isSet)(e.proposerPriority)&&(t.proposerPriority=BigInt(e.proposerPriority.toString())),t},toJSON(e){let t={};return void 0!==e.address&&(t.address=(0,o.base64FromBytes)(void 0!==e.address?e.address:new Uint8Array)),void 0!==e.pubKey&&(t.pubKey=e.pubKey?n.PublicKey.toJSON(e.pubKey):void 0),void 0!==e.votingPower&&(t.votingPower=(e.votingPower||BigInt(0)).toString()),void 0!==e.proposerPriority&&(t.proposerPriority=(e.proposerPriority||BigInt(0)).toString()),t},fromPartial(e){var t;let r=s();return r.address=null!==(t=e.address)&&void 0!==t?t:new Uint8Array,void 0!==e.pubKey&&null!==e.pubKey&&(r.pubKey=n.PublicKey.fromPartial(e.pubKey)),void 0!==e.votingPower&&null!==e.votingPower&&(r.votingPower=BigInt(e.votingPower.toString())),void 0!==e.proposerPriority&&null!==e.proposerPriority&&(r.proposerPriority=BigInt(e.proposerPriority.toString())),r}},t.SimpleValidator={typeUrl:"/tendermint.types.SimpleValidator",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.BinaryWriter.create();return void 0!==e.pubKey&&n.PublicKey.encode(e.pubKey,t.uint32(10).fork()).ldelim(),e.votingPower!==BigInt(0)&&t.uint32(16).int64(e.votingPower),t},decode(e,t){let r=e instanceof i.BinaryReader?e:new i.BinaryReader(e),o=void 0===t?r.len:r.pos+t,a=l();for(;r.pos>>3){case 1:a.pubKey=n.PublicKey.decode(r,r.uint32());break;case 2:a.votingPower=r.int64();break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=l();return(0,o.isSet)(e.pubKey)&&(t.pubKey=n.PublicKey.fromJSON(e.pubKey)),(0,o.isSet)(e.votingPower)&&(t.votingPower=BigInt(e.votingPower.toString())),t},toJSON(e){let t={};return void 0!==e.pubKey&&(t.pubKey=e.pubKey?n.PublicKey.toJSON(e.pubKey):void 0),void 0!==e.votingPower&&(t.votingPower=(e.votingPower||BigInt(0)).toString()),t},fromPartial(e){let t=l();return void 0!==e.pubKey&&null!==e.pubKey&&(t.pubKey=n.PublicKey.fromPartial(e.pubKey)),void 0!==e.votingPower&&null!==e.votingPower&&(t.votingPower=BigInt(e.votingPower.toString())),t}}},76426:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Consensus=t.App=t.protobufPackage=void 0;let n=r(46554),i=r(99133);function o(){return{protocol:BigInt(0),software:""}}function a(){return{block:BigInt(0),app:BigInt(0)}}t.protobufPackage="tendermint.version",t.App={typeUrl:"/tendermint.version.App",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.BinaryWriter.create();return e.protocol!==BigInt(0)&&t.uint32(8).uint64(e.protocol),""!==e.software&&t.uint32(18).string(e.software),t},decode(e,t){let r=e instanceof n.BinaryReader?e:new n.BinaryReader(e),i=void 0===t?r.len:r.pos+t,a=o();for(;r.pos>>3){case 1:a.protocol=r.uint64();break;case 2:a.software=r.string();break;default:r.skipType(7&e)}}return a},fromJSON(e){let t=o();return(0,i.isSet)(e.protocol)&&(t.protocol=BigInt(e.protocol.toString())),(0,i.isSet)(e.software)&&(t.software=String(e.software)),t},toJSON(e){let t={};return void 0!==e.protocol&&(t.protocol=(e.protocol||BigInt(0)).toString()),void 0!==e.software&&(t.software=e.software),t},fromPartial(e){var t;let r=o();return void 0!==e.protocol&&null!==e.protocol&&(r.protocol=BigInt(e.protocol.toString())),r.software=null!==(t=e.software)&&void 0!==t?t:"",r}},t.Consensus={typeUrl:"/tendermint.version.Consensus",encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.BinaryWriter.create();return e.block!==BigInt(0)&&t.uint32(8).uint64(e.block),e.app!==BigInt(0)&&t.uint32(16).uint64(e.app),t},decode(e,t){let r=e instanceof n.BinaryReader?e:new n.BinaryReader(e),i=void 0===t?r.len:r.pos+t,o=a();for(;r.pos>>3){case 1:o.block=r.uint64();break;case 2:o.app=r.uint64();break;default:r.skipType(7&e)}}return o},fromJSON(e){let t=a();return(0,i.isSet)(e.block)&&(t.block=BigInt(e.block.toString())),(0,i.isSet)(e.app)&&(t.app=BigInt(e.app.toString())),t},toJSON(e){let t={};return void 0!==e.block&&(t.block=(e.block||BigInt(0)).toString()),void 0!==e.app&&(t.app=(e.app||BigInt(0)).toString()),t},fromPartial(e){let t=a();return void 0!==e.block&&null!==e.block&&(t.block=BigInt(e.block.toString())),void 0!==e.app&&null!==e.app&&(t.app=BigInt(e.app.toString())),t}}},41804:function(e,t){"use strict";function r(e){let t=0,r=0;for(let n=0;n191&&a<224?n[o++]=(31&a)<<6|63&e[t++]:a>239&&a<365?(a=((7&a)<<18|(63&e[t++])<<12|(63&e[t++])<<6|63&e[t++])-65536,n[o++]=55296+(a>>10),n[o++]=56320+(1023&a)):n[o++]=(15&a)<<12|(63&e[t++])<<6|63&e[t++],o>8191&&((i||(i=[])).push(String.fromCharCode(...n)),o=0);return i?(o&&i.push(String.fromCharCode(...n.slice(0,o))),i.join("")):String.fromCharCode(...n.slice(0,o))}function i(e,t,r){let n,i;let o=r;for(let o=0;o>6|192:((64512&n)==55296&&(64512&(i=e.charCodeAt(o+1)))==56320?(n=65536+((1023&n)<<10)+(1023&i),++o,t[r++]=n>>18|240,t[r++]=n>>12&63|128):t[r++]=n>>12|224,t[r++]=n>>6&63|128),t[r++]=63&n|128);return r-o}Object.defineProperty(t,"__esModule",{value:!0}),t.utf8Write=t.utf8Read=t.utf8Length=void 0,t.utf8Length=r,t.utf8Read=n,t.utf8Write=i},15344:function(e,t){"use strict";function r(){let e=0,t=0;for(let r=0;r<28;r+=7){let n=this.buf[this.pos++];if(e|=(127&n)<>4,(128&r)==0)return this.assertBounds(),[e,t];for(let r=3;r<=31;r+=7){let n=this.buf[this.pos++];if(t|=(127&n)<>>n,o=!(i>>>7==0&&0==t),a=(o?128|i:i)&255;if(r.push(a),!o)return}let n=e>>>28&15|(7&t)<<4,i=t>>3!=0;if(r.push((i?128|n:n)&255),i){for(let e=3;e<31;e+=7){let n=t>>>e,i=n>>>7!=0,o=(i?128|n:n)&255;if(r.push(o),!i)return}r.push(t>>>31&1)}}Object.defineProperty(t,"__esModule",{value:!0}),t.writeByte=t.writeFixed32=t.int64Length=t.writeVarint64=t.writeVarint32=t.readInt32=t.readUInt32=t.zzDecode=t.zzEncode=t.varint32read=t.varint32write=t.uInt64ToString=t.int64ToString=t.int64FromString=t.varint64write=t.varint64read=void 0,t.varint64read=r,t.varint64write=n;let i=4294967296;function o(e){let t="-"===e[0];t&&(e=e.slice(1));let r=1e6,n=0,o=0;function a(t,a){let s=Number(e.slice(t,a));o*=r,(n=n*r+s)>=i&&(o+=n/i|0,n%=i)}return a(-24,-18),a(-18,-12),a(-12,-6),a(-6),t?d(n,o):u(n,o)}function a(e,t){let r=u(e,t),n=2147483648&r.hi;n&&(r=d(r.lo,r.hi));let i=s(r.lo,r.hi);return n?"-"+i:i}function s(e,t){if({lo:e,hi:t}=l(e,t),t<=2097151)return String(i*t+e);let r=16777215&e,n=(e>>>24|t<<8)&16777215,o=t>>16&65535,a=r+6777216*n+6710656*o,s=n+8147497*o,u=2*o,d=1e7;return a>=1e7&&(s+=Math.floor(a/d),a%=d),s>=d&&(u+=Math.floor(s/d),s%=d),u.toString()+c(s)+c(a)}function l(e,t){return{lo:e>>>0,hi:t>>>0}}function u(e,t){return{lo:0|e,hi:0|t}}function d(e,t){return t=~t,e?e=~e+1:t+=1,u(e,t)}t.int64FromString=o,t.int64ToString=a,t.uInt64ToString=s;let c=e=>{let t=String(e);return"0000000".slice(t.length)+t};function p(e,t){if(e>=0){for(;e>127;)t.push(127&e|128),e>>>=7;t.push(e)}else{for(let r=0;r<9;r++)t.push(127&e|128),e>>=7;t.push(1)}}function f(){let e=this.buf[this.pos++],t=127&e;if((128&e)==0||(t|=(127&(e=this.buf[this.pos++]))<<7,(128&e)==0)||(t|=(127&(e=this.buf[this.pos++]))<<14,(128&e)==0)||(t|=(127&(e=this.buf[this.pos++]))<<21,(128&e)==0))return this.assertBounds(),t;t|=(15&(e=this.buf[this.pos++]))<<28;for(let t=5;(128&e)!=0&&t<10;t++)e=this.buf[this.pos++];if((128&e)!=0)throw Error("invalid varint");return this.assertBounds(),t>>>0}function h(e,t){let r=t>>31;return t=((t<<1|e>>>31)^r)>>>0,[e=(e<<1^r)>>>0,t]}function g(e,t){let r=-(1&e);return[e=((e>>>1|t<<31)^r)>>>0,t=(t>>>1^r)>>>0]}function m(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+16777216*e[t+3]}function y(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+(e[t+3]<<24)}function v(e,t,r){for(;e>127;)t[r++]=127&e|128,e>>>=7;t[r]=e}function b(e,t,r){for(;e.hi;)t[r++]=127&e.lo|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[r++]=127&e.lo|128,e.lo=e.lo>>>7;t[r++]=e.lo}function S(e,t){let r=e,n=(e>>>28|t<<4)>>>0,i=t>>>24;return 0===i?0===n?r<16384?r<128?1:2:r<2097152?3:4:n<16384?n<128?5:6:n<2097152?7:8:i<128?9:10}function w(e,t,r){t[r]=255&e,t[r+1]=e>>>8&255,t[r+2]=e>>>16&255,t[r+3]=e>>>24}function _(e,t,r){t[r]=255&e}t.varint32write=p,t.varint32read=f,t.zzEncode=h,t.zzDecode=g,t.readUInt32=m,t.readInt32=y,t.writeVarint32=v,t.writeVarint64=b,t.int64Length=S,t.writeFixed32=w,t.writeByte=_},85191:function(e,t,r){"use strict";var n=r(39541),i=r(67957),o=r(97834),a=r(90414),s=r(73842);function l(e){s.call(this,"digest"),this._hash=e}n(l,s),l.prototype._update=function(e){this._hash.update(e)},l.prototype._final=function(){return this._hash.digest()},e.exports=function(e){return"md5"===(e=e.toLowerCase())?new i:"rmd160"===e||"ripemd160"===e?new o:new l(a(e))}},31120:function(e,t,r){"use strict";var n=r(67957);e.exports=function(e){return new n().update(e).digest()}},42716:function(e,t,r){"use strict";var n=r(39541),i=r(8519),o=r(73842),a=r(47226).Buffer,s=r(31120),l=r(97834),u=r(90414),d=a.alloc(128);function c(e,t){o.call(this,"digest"),"string"==typeof t&&(t=a.from(t));var r="sha512"===e||"sha384"===e?128:64;this._alg=e,this._key=t,t.length>r?t=("rmd160"===e?new l:u(e)).update(t).digest():t.lengths?t=e(t):t.length>>8^255&h^99,i[r]=h,o[h]=r;var g=e[r],m=e[g],y=e[m],v=257*e[h]^16843008*h;a[r]=v<<24|v>>>8,s[r]=v<<16|v>>>16,l[r]=v<<8|v>>>24,u[r]=v;var v=16843009*y^65537*m^257*g^16843008*r;d[h]=v<<24|v>>>8,c[h]=v<<16|v>>>16,p[h]=v<<8|v>>>24,f[h]=v,r?(r=g^e[e[e[y^g]]],n^=e[e[n]]):r=n=1}}();var h=[0,1,2,4,8,16,32,64,128,27,54],g=n.AES=r.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e,t=this._keyPriorReset=this._key,r=t.words,n=t.sigBytes/4,o=((this._nRounds=n+6)+1)*4,a=this._keySchedule=[],s=0;s6&&s%n==4&&(e=i[e>>>24]<<24|i[e>>>16&255]<<16|i[e>>>8&255]<<8|i[255&e]):e=(i[(e=e<<8|e>>>24)>>>24]<<24|i[e>>>16&255]<<16|i[e>>>8&255]<<8|i[255&e])^h[s/n|0]<<24,a[s]=a[s-n]^e);for(var l=this._invKeySchedule=[],u=0;u>>24]]^c[i[e>>>16&255]]^p[i[e>>>8&255]]^f[i[255&e]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,a,s,l,u,i)},decryptBlock:function(e,t){var r=e[t+1];e[t+1]=e[t+3],e[t+3]=r,this._doCryptBlock(e,t,this._invKeySchedule,d,c,p,f,o);var r=e[t+1];e[t+1]=e[t+3],e[t+3]=r},_doCryptBlock:function(e,t,r,n,i,o,a,s){for(var l=this._nRounds,u=e[t]^r[0],d=e[t+1]^r[1],c=e[t+2]^r[2],p=e[t+3]^r[3],f=4,h=1;h>>24]^i[d>>>16&255]^o[c>>>8&255]^a[255&p]^r[f++],m=n[d>>>24]^i[c>>>16&255]^o[p>>>8&255]^a[255&u]^r[f++],y=n[c>>>24]^i[p>>>16&255]^o[u>>>8&255]^a[255&d]^r[f++],v=n[p>>>24]^i[u>>>16&255]^o[d>>>8&255]^a[255&c]^r[f++];u=g,d=m,c=y,p=v}var g=(s[u>>>24]<<24|s[d>>>16&255]<<16|s[c>>>8&255]<<8|s[255&p])^r[f++],m=(s[d>>>24]<<24|s[c>>>16&255]<<16|s[p>>>8&255]<<8|s[255&u])^r[f++],y=(s[c>>>24]<<24|s[p>>>16&255]<<16|s[u>>>8&255]<<8|s[255&d])^r[f++],v=(s[p>>>24]<<24|s[u>>>16&255]<<16|s[d>>>8&255]<<8|s[255&c])^r[f++];e[t]=g,e[t+1]=m,e[t+2]=y,e[t+3]=v},keySize:8});t.AES=r._createHelper(g)}(),e.AES})},36909:function(e,t,r){"use strict";!function(n,i,o){e.exports=t=i(r(32646),r(7679),r(22236),r(82948),r(95989))}(0,function(e){return!function(){var t=e,r=t.lib.BlockCipher,n=t.algo;let i=16,o=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],a=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var s={pbox:[],sbox:[]};function l(e,t){let r=t>>24&255,n=t>>16&255,i=t>>8&255,o=255&t,a=e.sbox[0][r]+e.sbox[1][n];return a^=e.sbox[2][i],a+=e.sbox[3][o]}function u(e,t,r){let n,o=t,a=r;for(let t=0;t1;--t)o^=e.pbox[t],a=l(e,o)^a,n=o,o=a,a=n;return n=o,o=a,a=n^e.pbox[1],{left:o^=e.pbox[0],right:a}}function c(e,t,r){for(let t=0;t<4;t++){e.sbox[t]=[];for(let r=0;r<256;r++)e.sbox[t][r]=a[t][r]}let n=0;for(let a=0;a=r&&(n=0);let s=0,l=0,d=0;for(let t=0;t>>2];e.sigBytes-=t}};r.BlockCipher=u.extend({cfg:u.cfg.extend({mode:p,padding:f}),reset:function(){u.reset.call(this);var e,t=this.cfg,r=t.iv,n=t.mode;this._xformMode==this._ENC_XFORM_MODE?e=n.createEncryptor:(e=n.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==e?this._mode.init(this,r&&r.words):(this._mode=e.call(n,this,r&&r.words),this._mode.__creator=e)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e,t=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(t.pad(this._data,this.blockSize),e=this._process(!0)):(e=this._process(!0),t.unpad(e)),e},blockSize:4});var h=r.CipherParams=n.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),g=(t.format={}).OpenSSL={stringify:function(e){var t,r=e.ciphertext,n=e.salt;return(t=n?i.create([1398893684,1701076831]).concat(n).concat(r):r).toString(s)},parse:function(e){var t,r=s.parse(e),n=r.words;return 1398893684==n[0]&&1701076831==n[1]&&(t=i.create(n.slice(2,4)),n.splice(0,4),r.sigBytes-=16),h.create({ciphertext:r,salt:t})}},m=r.SerializableCipher=n.extend({cfg:n.extend({format:g}),encrypt:function(e,t,r,n){n=this.cfg.extend(n);var i=e.createEncryptor(r,n),o=i.finalize(t),a=i.cfg;return h.create({ciphertext:o,key:r,iv:a.iv,algorithm:e,mode:a.mode,padding:a.padding,blockSize:e.blockSize,formatter:n.format})},decrypt:function(e,t,r,n){return n=this.cfg.extend(n),t=this._parse(t,n.format),e.createDecryptor(r,n).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),y=(t.kdf={}).OpenSSL={execute:function(e,t,r,n,o){if(n||(n=i.random(8)),o)var a=l.create({keySize:t+r,hasher:o}).compute(e,n);else var a=l.create({keySize:t+r}).compute(e,n);var s=i.create(a.words.slice(t),4*r);return a.sigBytes=4*t,h.create({key:a,iv:s,salt:n})}},v=r.PasswordBasedCipher=m.extend({cfg:m.cfg.extend({kdf:y}),encrypt:function(e,t,r,n){var i=(n=this.cfg.extend(n)).kdf.execute(r,e.keySize,e.ivSize,n.salt,n.hasher);n.iv=i.iv;var o=m.encrypt.call(this,e,t,i.key,n);return o.mixIn(i),o},decrypt:function(e,t,r,n){n=this.cfg.extend(n),t=this._parse(t,n.format);var i=n.kdf.execute(r,e.keySize,e.ivSize,t.salt,n.hasher);return n.iv=i.iv,m.decrypt.call(this,e,t,i.key,n)}})}()})},32646:function(e,t,r){"use strict";!function(r,n){e.exports=t=n()}(0,function(){var e=e||function(e,t){if(window.crypto&&(n=window.crypto),"undefined"!=typeof self&&self.crypto&&(n=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(n=globalThis.crypto),!n&&window.msCrypto&&(n=window.msCrypto),!n&&void 0!==r.g&&r.g.crypto&&(n=r.g.crypto),!n)try{n=r(42480)}catch(e){}var n,i=function(){if(n){if("function"==typeof n.getRandomValues)try{return n.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof n.randomBytes)try{return n.randomBytes(4).readInt32LE()}catch(e){}}throw Error("Native crypto module could not be used to get secure random number.")},o=Object.create||function(){function e(){}return function(t){var r;return e.prototype=t,r=new e,e.prototype=null,r}}(),a={},s=a.lib={},l=s.Base=function(){return{extend:function(e){var t=o(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),u=s.WordArray=l.extend({init:function(e,t){e=this.words=e||[],void 0!=t?this.sigBytes=t:this.sigBytes=4*e.length},toString:function(e){return(e||c).stringify(this)},concat:function(e){var t=this.words,r=e.words,n=this.sigBytes,i=e.sigBytes;if(this.clamp(),n%4)for(var o=0;o>>2]>>>24-o%4*8&255;t[n+o>>>2]|=a<<24-(n+o)%4*8}else for(var s=0;s>>2]=r[s>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,r=this.sigBytes;t[r>>>2]&=4294967295<<32-r%4*8,t.length=e.ceil(r/4)},clone:function(){var e=l.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],r=0;r>>2]>>>24-i%4*8&255;n.push((o>>>4).toString(16)),n.push((15&o).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;return new u.init(r,t/2)}},p=d.Latin1={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;i>>2]>>>24-i%4*8&255;n.push(String.fromCharCode(o))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n>>2]|=(255&e.charCodeAt(n))<<24-n%4*8;return new u.init(r,t)}},f=d.Utf8={stringify:function(e){try{return decodeURIComponent(escape(p.stringify(e)))}catch(e){throw Error("Malformed UTF-8 data")}},parse:function(e){return p.parse(unescape(encodeURIComponent(e)))}},h=s.BufferedBlockAlgorithm=l.extend({reset:function(){this._data=new u.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=f.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var r,n=this._data,i=n.words,o=n.sigBytes,a=this.blockSize,s=o/(4*a),l=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*a,d=e.min(4*l,o);if(l){for(var c=0;c>>6-a%4*2;i[o>>>2]|=s<<24-o%4*8,o++}return r.create(i,o)}t.enc.Base64={stringify:function(e){var t=e.words,r=e.sigBytes,n=this._map;e.clamp();for(var i=[],o=0;o>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,s=0;s<4&&o+.75*s>>6*(3-s)&63));var l=n.charAt(64);if(l)for(;i.length%4;)i.push(l);return i.join("")},parse:function(e){var t=e.length,r=this._map,i=this._reverseMap;if(!i){i=this._reverseMap=[];for(var o=0;o>>6-a%4*2;i[o>>>2]|=s<<24-o%4*8,o++}return r.create(i,o)}t.enc.Base64url={stringify:function(e,t){void 0===t&&(t=!0);var r=e.words,n=e.sigBytes,i=t?this._safe_map:this._map;e.clamp();for(var o=[],a=0;a>>2]>>>24-a%4*8&255)<<16|(r[a+1>>>2]>>>24-(a+1)%4*8&255)<<8|r[a+2>>>2]>>>24-(a+2)%4*8&255,l=0;l<4&&a+.75*l>>6*(3-l)&63));var u=i.charAt(64);if(u)for(;o.length%4;)o.push(u);return o.join("")},parse:function(e,t){void 0===t&&(t=!0);var r=e.length,i=t?this._safe_map:this._map,o=this._reverseMap;if(!o){o=this._reverseMap=[];for(var a=0;a>>8&16711935}n.Utf16=n.Utf16BE={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;i>>2]>>>16-i%4*8&65535;n.push(String.fromCharCode(o))}return n.join("")},parse:function(e){for(var t=e.length,n=[],i=0;i>>1]|=e.charCodeAt(i)<<16-i%2*16;return r.create(n,2*t)}},n.Utf16LE={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],o=0;o>>2]>>>16-o%4*8&65535);n.push(String.fromCharCode(a))}return n.join("")},parse:function(e){for(var t=e.length,n=[],o=0;o>>1]|=i(e.charCodeAt(o)<<16-o%2*16);return r.create(n,2*t)}}}(),e.enc.Utf16})},82948:function(e,t,r){"use strict";!function(n,i,o){e.exports=t=i(r(32646),r(68206),r(11450))}(0,function(e){return!function(){var t=e,r=t.lib,n=r.Base,i=r.WordArray,o=t.algo,a=o.MD5,s=o.EvpKDF=n.extend({cfg:n.extend({keySize:4,hasher:a,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var r,n=this.cfg,o=n.hasher.create(),a=i.create(),s=a.words,l=n.keySize,u=n.iterations;s.lengthi&&(t=e.finalize(t)),t.clamp();for(var o=this._oKey=t.clone(),a=this._iKey=t.clone(),s=o.words,l=a.words,u=0;u>>2]|=e[i]<<24-i%4*8;r.call(this,n,t)}else r.apply(this,arguments)}).prototype=t}}(),e.lib.WordArray})},22236:function(e,t,r){"use strict";!function(n,i){e.exports=t=i(r(32646))}(0,function(e){return!function(t){var r=e,n=r.lib,i=n.WordArray,o=n.Hasher,a=r.algo,s=[];!function(){for(var e=0;e<64;e++)s[e]=4294967296*t.abs(t.sin(e+1))|0}();var l=a.MD5=o.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var r=0;r<16;r++){var n=t+r,i=e[n];e[n]=(i<<8|i>>>24)&16711935|(i<<24|i>>>8)&4278255360}var o=this._hash.words,a=e[t+0],l=e[t+1],f=e[t+2],h=e[t+3],g=e[t+4],m=e[t+5],y=e[t+6],v=e[t+7],b=e[t+8],S=e[t+9],w=e[t+10],_=e[t+11],k=e[t+12],O=e[t+13],P=e[t+14],A=e[t+15],I=o[0],R=o[1],E=o[2],T=o[3];I=u(I,R,E,T,a,7,s[0]),T=u(T,I,R,E,l,12,s[1]),E=u(E,T,I,R,f,17,s[2]),R=u(R,E,T,I,h,22,s[3]),I=u(I,R,E,T,g,7,s[4]),T=u(T,I,R,E,m,12,s[5]),E=u(E,T,I,R,y,17,s[6]),R=u(R,E,T,I,v,22,s[7]),I=u(I,R,E,T,b,7,s[8]),T=u(T,I,R,E,S,12,s[9]),E=u(E,T,I,R,w,17,s[10]),R=u(R,E,T,I,_,22,s[11]),I=u(I,R,E,T,k,7,s[12]),T=u(T,I,R,E,O,12,s[13]),E=u(E,T,I,R,P,17,s[14]),R=u(R,E,T,I,A,22,s[15]),I=d(I,R,E,T,l,5,s[16]),T=d(T,I,R,E,y,9,s[17]),E=d(E,T,I,R,_,14,s[18]),R=d(R,E,T,I,a,20,s[19]),I=d(I,R,E,T,m,5,s[20]),T=d(T,I,R,E,w,9,s[21]),E=d(E,T,I,R,A,14,s[22]),R=d(R,E,T,I,g,20,s[23]),I=d(I,R,E,T,S,5,s[24]),T=d(T,I,R,E,P,9,s[25]),E=d(E,T,I,R,h,14,s[26]),R=d(R,E,T,I,b,20,s[27]),I=d(I,R,E,T,O,5,s[28]),T=d(T,I,R,E,f,9,s[29]),E=d(E,T,I,R,v,14,s[30]),R=d(R,E,T,I,k,20,s[31]),I=c(I,R,E,T,m,4,s[32]),T=c(T,I,R,E,b,11,s[33]),E=c(E,T,I,R,_,16,s[34]),R=c(R,E,T,I,P,23,s[35]),I=c(I,R,E,T,l,4,s[36]),T=c(T,I,R,E,g,11,s[37]),E=c(E,T,I,R,v,16,s[38]),R=c(R,E,T,I,w,23,s[39]),I=c(I,R,E,T,O,4,s[40]),T=c(T,I,R,E,a,11,s[41]),E=c(E,T,I,R,h,16,s[42]),R=c(R,E,T,I,y,23,s[43]),I=c(I,R,E,T,S,4,s[44]),T=c(T,I,R,E,k,11,s[45]),E=c(E,T,I,R,A,16,s[46]),R=c(R,E,T,I,f,23,s[47]),I=p(I,R,E,T,a,6,s[48]),T=p(T,I,R,E,v,10,s[49]),E=p(E,T,I,R,P,15,s[50]),R=p(R,E,T,I,m,21,s[51]),I=p(I,R,E,T,k,6,s[52]),T=p(T,I,R,E,h,10,s[53]),E=p(E,T,I,R,w,15,s[54]),R=p(R,E,T,I,l,21,s[55]),I=p(I,R,E,T,b,6,s[56]),T=p(T,I,R,E,A,10,s[57]),E=p(E,T,I,R,y,15,s[58]),R=p(R,E,T,I,O,21,s[59]),I=p(I,R,E,T,g,6,s[60]),T=p(T,I,R,E,_,10,s[61]),E=p(E,T,I,R,f,15,s[62]),R=p(R,E,T,I,S,21,s[63]),o[0]=o[0]+I|0,o[1]=o[1]+R|0,o[2]=o[2]+E|0,o[3]=o[3]+T|0},_doFinalize:function(){var e=this._data,r=e.words,n=8*this._nDataBytes,i=8*e.sigBytes;r[i>>>5]|=128<<24-i%32;var o=t.floor(n/4294967296),a=n;r[(i+64>>>9<<4)+15]=(o<<8|o>>>24)&16711935|(o<<24|o>>>8)&4278255360,r[(i+64>>>9<<4)+14]=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360,e.sigBytes=(r.length+1)*4,this._process();for(var s=this._hash,l=s.words,u=0;u<4;u++){var d=l[u];l[u]=(d<<8|d>>>24)&16711935|(d<<24|d>>>8)&4278255360}return s},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});function u(e,t,r,n,i,o,a){var s=e+(t&r|~t&n)+i+a;return(s<>>32-o)+t}function d(e,t,r,n,i,o,a){var s=e+(t&n|r&~n)+i+a;return(s<>>32-o)+t}function c(e,t,r,n,i,o,a){var s=e+(t^r^n)+i+a;return(s<>>32-o)+t}function p(e,t,r,n,i,o,a){var s=e+(r^(t|~n))+i+a;return(s<>>32-o)+t}r.MD5=o._createHelper(l),r.HmacMD5=o._createHmacHelper(l)}(Math),e.MD5})},67939:function(e,t,r){"use strict";!function(n,i,o){e.exports=t=i(r(32646),r(95989))}(0,function(e){return e.mode.CFB=function(){var t=e.lib.BlockCipherMode.extend();function r(e,t,r,n){var i,o=this._iv;o?(i=o.slice(0),this._iv=void 0):i=this._prevBlock,n.encryptBlock(i,0);for(var a=0;a>>24)&16711935|(I<<24|I>>>8)&4278255360}var R=this._hash.words,E=c.words,T=p.words,N=s.words,x=l.words,B=u.words,C=d.words;f=r=R[0],S=n=R[1],w=i=R[2],_=o=R[3],k=a=R[4];for(var P=0;P<80;P+=1)O=r+e[t+N[P]]|0,P<16?O+=h(n,i,o)+E[0]:P<32?O+=g(n,i,o)+E[1]:P<48?O+=m(n,i,o)+E[2]:P<64?O+=y(n,i,o)+E[3]:O+=v(n,i,o)+E[4],O|=0,O=(O=b(O,B[P]))+a|0,r=a,a=o,o=b(i,10),i=n,n=O,O=f+e[t+x[P]]|0,P<16?O+=v(S,w,_)+T[0]:P<32?O+=y(S,w,_)+T[1]:P<48?O+=m(S,w,_)+T[2]:P<64?O+=g(S,w,_)+T[3]:O+=h(S,w,_)+T[4],O|=0,O=(O=b(O,C[P]))+k|0,f=k,k=_,_=b(w,10),w=S,S=O;O=R[1]+i+_|0,R[1]=R[2]+o+k|0,R[2]=R[3]+a+f|0,R[3]=R[4]+r+S|0,R[4]=R[0]+n+w|0,R[0]=O},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;t[n>>>5]|=128<<24-n%32,t[(n+64>>>9<<4)+14]=(r<<8|r>>>24)&16711935|(r<<24|r>>>8)&4278255360,e.sigBytes=(t.length+1)*4,this._process();for(var i=this._hash,o=i.words,a=0;a<5;a++){var s=o[a];o[a]=(s<<8|s>>>24)&16711935|(s<<24|s>>>8)&4278255360}return i},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});function h(e,t,r){return e^t^r}function g(e,t,r){return e&t|~e&r}function m(e,t,r){return(e|~t)^r}function y(e,t,r){return e&r|t&~r}function v(e,t,r){return e^(t|~r)}function b(e,t){return e<>>32-t}r.RIPEMD160=o._createHelper(f),r.HmacRIPEMD160=o._createHmacHelper(f)}(Math),e.RIPEMD160})},68206:function(e,t,r){"use strict";!function(n,i){e.exports=t=i(r(32646))}(0,function(e){return!function(){var t=e,r=t.lib,n=r.WordArray,i=r.Hasher,o=t.algo,a=[],s=o.SHA1=i.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var r=this._hash.words,n=r[0],i=r[1],o=r[2],s=r[3],l=r[4],u=0;u<80;u++){if(u<16)a[u]=0|e[t+u];else{var d=a[u-3]^a[u-8]^a[u-14]^a[u-16];a[u]=d<<1|d>>>31}var c=(n<<5|n>>>27)+l+a[u];u<20?c+=(i&o|~i&s)+1518500249:u<40?c+=(i^o^s)+1859775393:u<60?c+=(i&o|i&s|o&s)-1894007588:c+=(i^o^s)-899497514,l=s,s=o,o=i<<30|i>>>2,i=n,n=c}r[0]=r[0]+n|0,r[1]=r[1]+i|0,r[2]=r[2]+o|0,r[3]=r[3]+s|0,r[4]=r[4]+l|0},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;return t[n>>>5]|=128<<24-n%32,t[(n+64>>>9<<4)+14]=Math.floor(r/4294967296),t[(n+64>>>9<<4)+15]=r,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=i.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA1=i._createHelper(s),t.HmacSHA1=i._createHmacHelper(s)}(),e.SHA1})},8953:function(e,t,r){"use strict";!function(n,i,o){e.exports=t=i(r(32646),r(81689))}(0,function(e){return!function(){var t=e,r=t.lib.WordArray,n=t.algo,i=n.SHA256,o=n.SHA224=i.extend({_doReset:function(){this._hash=new r.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var e=i._doFinalize.call(this);return e.sigBytes-=4,e}});t.SHA224=i._createHelper(o),t.HmacSHA224=i._createHmacHelper(o)}(),e.SHA224})},81689:function(e,t,r){"use strict";!function(n,i){e.exports=t=i(r(32646))}(0,function(e){return!function(t){var r=e,n=r.lib,i=n.WordArray,o=n.Hasher,a=r.algo,s=[],l=[];!function(){function e(e){for(var r=t.sqrt(e),n=2;n<=r;n++)if(!(e%n))return!1;return!0}function r(e){return(e-(0|e))*4294967296|0}for(var n=2,i=0;i<64;)e(n)&&(i<8&&(s[i]=r(t.pow(n,.5))),l[i]=r(t.pow(n,1/3)),i++),n++}();var u=[],d=a.SHA256=o.extend({_doReset:function(){this._hash=new i.init(s.slice(0))},_doProcessBlock:function(e,t){for(var r=this._hash.words,n=r[0],i=r[1],o=r[2],a=r[3],s=r[4],d=r[5],c=r[6],p=r[7],f=0;f<64;f++){if(f<16)u[f]=0|e[t+f];else{var h=u[f-15],g=(h<<25|h>>>7)^(h<<14|h>>>18)^h>>>3,m=u[f-2],y=(m<<15|m>>>17)^(m<<13|m>>>19)^m>>>10;u[f]=g+u[f-7]+y+u[f-16]}var v=s&d^~s&c,b=n&i^n&o^i&o,S=(n<<30|n>>>2)^(n<<19|n>>>13)^(n<<10|n>>>22),w=p+((s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25))+v+l[f]+u[f],_=S+b;p=c,c=d,d=s,s=a+w|0,a=o,o=i,i=n,n=w+_|0}r[0]=r[0]+n|0,r[1]=r[1]+i|0,r[2]=r[2]+o|0,r[3]=r[3]+a|0,r[4]=r[4]+s|0,r[5]=r[5]+d|0,r[6]=r[6]+c|0,r[7]=r[7]+p|0},_doFinalize:function(){var e=this._data,r=e.words,n=8*this._nDataBytes,i=8*e.sigBytes;return r[i>>>5]|=128<<24-i%32,r[(i+64>>>9<<4)+14]=t.floor(n/4294967296),r[(i+64>>>9<<4)+15]=n,e.sigBytes=4*r.length,this._process(),this._hash},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});r.SHA256=o._createHelper(d),r.HmacSHA256=o._createHmacHelper(d)}(Math),e.SHA256})},82585:function(e,t,r){"use strict";!function(n,i,o){e.exports=t=i(r(32646),r(94738))}(0,function(e){return!function(t){var r=e,n=r.lib,i=n.WordArray,o=n.Hasher,a=r.x64.Word,s=r.algo,l=[],u=[],d=[];!function(){for(var e=1,t=0,r=0;r<24;r++){l[e+5*t]=(r+1)*(r+2)/2%64;var n=t%5,i=(2*e+3*t)%5;e=n,t=i}for(var e=0;e<5;e++)for(var t=0;t<5;t++)u[e+5*t]=t+(2*e+3*t)%5*5;for(var o=1,s=0;s<24;s++){for(var c=0,p=0,f=0;f<7;f++){if(1&o){var h=(1<>>24)&16711935|(o<<24|o>>>8)&4278255360,a=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360;var s=r[i];s.high^=a,s.low^=o}for(var p=0;p<24;p++){for(var f=0;f<5;f++){for(var h=0,g=0,m=0;m<5;m++){var s=r[f+5*m];h^=s.high,g^=s.low}var y=c[f];y.high=h,y.low=g}for(var f=0;f<5;f++)for(var v=c[(f+4)%5],b=c[(f+1)%5],S=b.high,w=b.low,h=v.high^(S<<1|w>>>31),g=v.low^(w<<1|S>>>31),m=0;m<5;m++){var s=r[f+5*m];s.high^=h,s.low^=g}for(var _=1;_<25;_++){var h,g,s=r[_],k=s.high,O=s.low,P=l[_];P<32?(h=k<>>32-P,g=O<>>32-P):(h=O<>>64-P,g=k<>>64-P);var A=c[u[_]];A.high=h,A.low=g}var I=c[0],R=r[0];I.high=R.high,I.low=R.low;for(var f=0;f<5;f++)for(var m=0;m<5;m++){var _=f+5*m,s=r[_],E=c[_],T=c[(f+1)%5+5*m],N=c[(f+2)%5+5*m];s.high=E.high^~T.high&N.high,s.low=E.low^~T.low&N.low}var s=r[0],x=d[p];s.high^=x.high,s.low^=x.low}},_doFinalize:function(){var e=this._data,r=e.words;this._nDataBytes;var n=8*e.sigBytes,o=32*this.blockSize;r[n>>>5]|=1<<24-n%32,r[(t.ceil((n+1)/o)*o>>>5)-1]|=128,e.sigBytes=4*r.length,this._process();for(var a=this._state,s=this.cfg.outputLength/8,l=s/8,u=[],d=0;d>>24)&16711935|(p<<24|p>>>8)&4278255360,f=(f<<8|f>>>24)&16711935|(f<<24|f>>>8)&4278255360,u.push(f),u.push(p)}return new i.init(u,s)},clone:function(){for(var e=o.clone.call(this),t=e._state=this._state.slice(0),r=0;r<25;r++)t[r]=t[r].clone();return e}});r.SHA3=o._createHelper(p),r.HmacSHA3=o._createHmacHelper(p)}(Math),e.SHA3})},62329:function(e,t,r){"use strict";!function(n,i,o){e.exports=t=i(r(32646),r(94738),r(9521))}(0,function(e){return!function(){var t=e,r=t.x64,n=r.Word,i=r.WordArray,o=t.algo,a=o.SHA512,s=o.SHA384=a.extend({_doReset:function(){this._hash=new i.init([new n.init(3418070365,3238371032),new n.init(1654270250,914150663),new n.init(2438529370,812702999),new n.init(355462360,4144912697),new n.init(1731405415,4290775857),new n.init(2394180231,1750603025),new n.init(3675008525,1694076839),new n.init(1203062813,3204075428)])},_doFinalize:function(){var e=a._doFinalize.call(this);return e.sigBytes-=16,e}});t.SHA384=a._createHelper(s),t.HmacSHA384=a._createHmacHelper(s)}(),e.SHA384})},9521:function(e,t,r){"use strict";!function(n,i,o){e.exports=t=i(r(32646),r(94738))}(0,function(e){return!function(){var t=e,r=t.lib.Hasher,n=t.x64,i=n.Word,o=n.WordArray,a=t.algo;function s(){return i.create.apply(i,arguments)}var l=[s(1116352408,3609767458),s(1899447441,602891725),s(3049323471,3964484399),s(3921009573,2173295548),s(961987163,4081628472),s(1508970993,3053834265),s(2453635748,2937671579),s(2870763221,3664609560),s(3624381080,2734883394),s(310598401,1164996542),s(607225278,1323610764),s(1426881987,3590304994),s(1925078388,4068182383),s(2162078206,991336113),s(2614888103,633803317),s(3248222580,3479774868),s(3835390401,2666613458),s(4022224774,944711139),s(264347078,2341262773),s(604807628,2007800933),s(770255983,1495990901),s(1249150122,1856431235),s(1555081692,3175218132),s(1996064986,2198950837),s(2554220882,3999719339),s(2821834349,766784016),s(2952996808,2566594879),s(3210313671,3203337956),s(3336571891,1034457026),s(3584528711,2466948901),s(113926993,3758326383),s(338241895,168717936),s(666307205,1188179964),s(773529912,1546045734),s(1294757372,1522805485),s(1396182291,2643833823),s(1695183700,2343527390),s(1986661051,1014477480),s(2177026350,1206759142),s(2456956037,344077627),s(2730485921,1290863460),s(2820302411,3158454273),s(3259730800,3505952657),s(3345764771,106217008),s(3516065817,3606008344),s(3600352804,1432725776),s(4094571909,1467031594),s(275423344,851169720),s(430227734,3100823752),s(506948616,1363258195),s(659060556,3750685593),s(883997877,3785050280),s(958139571,3318307427),s(1322822218,3812723403),s(1537002063,2003034995),s(1747873779,3602036899),s(1955562222,1575990012),s(2024104815,1125592928),s(2227730452,2716904306),s(2361852424,442776044),s(2428436474,593698344),s(2756734187,3733110249),s(3204031479,2999351573),s(3329325298,3815920427),s(3391569614,3928383900),s(3515267271,566280711),s(3940187606,3454069534),s(4118630271,4000239992),s(116418474,1914138554),s(174292421,2731055270),s(289380356,3203993006),s(460393269,320620315),s(685471733,587496836),s(852142971,1086792851),s(1017036298,365543100),s(1126000580,2618297676),s(1288033470,3409855158),s(1501505948,4234509866),s(1607167915,987167468),s(1816402316,1246189591)],u=[];!function(){for(var e=0;e<80;e++)u[e]=s()}();var d=a.SHA512=r.extend({_doReset:function(){this._hash=new o.init([new i.init(1779033703,4089235720),new i.init(3144134277,2227873595),new i.init(1013904242,4271175723),new i.init(2773480762,1595750129),new i.init(1359893119,2917565137),new i.init(2600822924,725511199),new i.init(528734635,4215389547),new i.init(1541459225,327033209)])},_doProcessBlock:function(e,t){for(var r=this._hash.words,n=r[0],i=r[1],o=r[2],a=r[3],s=r[4],d=r[5],c=r[6],p=r[7],f=n.high,h=n.low,g=i.high,m=i.low,y=o.high,v=o.low,b=a.high,S=a.low,w=s.high,_=s.low,k=d.high,O=d.low,P=c.high,A=c.low,I=p.high,R=p.low,E=f,T=h,N=g,x=m,B=y,C=v,M=b,D=S,U=w,J=_,j=k,H=O,q=P,L=A,F=I,V=R,W=0;W<80;W++){var z,G,Q=u[W];if(W<16)G=Q.high=0|e[t+2*W],z=Q.low=0|e[t+2*W+1];else{var K=u[W-15],Y=K.high,Z=K.low,X=(Y>>>1|Z<<31)^(Y>>>8|Z<<24)^Y>>>7,$=(Z>>>1|Y<<31)^(Z>>>8|Y<<24)^(Z>>>7|Y<<25),ee=u[W-2],et=ee.high,er=ee.low,en=(et>>>19|er<<13)^(et<<3|er>>>29)^et>>>6,ei=(er>>>19|et<<13)^(er<<3|et>>>29)^(er>>>6|et<<26),eo=u[W-7],ea=eo.high,es=eo.low,el=u[W-16],eu=el.high,ed=el.low;G=X+ea+((z=$+es)>>>0<$>>>0?1:0),z+=ei,G=G+en+(z>>>0>>0?1:0),z+=ed,G=G+eu+(z>>>0>>0?1:0),Q.high=G,Q.low=z}var ec=U&j^~U&q,ep=J&H^~J&L,ef=E&N^E&B^N&B,eh=T&x^T&C^x&C,eg=(E>>>28|T<<4)^(E<<30|T>>>2)^(E<<25|T>>>7),em=(T>>>28|E<<4)^(T<<30|E>>>2)^(T<<25|E>>>7),ey=(U>>>14|J<<18)^(U>>>18|J<<14)^(U<<23|J>>>9),ev=(J>>>14|U<<18)^(J>>>18|U<<14)^(J<<23|U>>>9),eb=l[W],eS=eb.high,ew=eb.low,e_=V+ev,ek=F+ey+(e_>>>0>>0?1:0),e_=e_+ep,ek=ek+ec+(e_>>>0>>0?1:0),e_=e_+ew,ek=ek+eS+(e_>>>0>>0?1:0),e_=e_+z,ek=ek+G+(e_>>>0>>0?1:0),eO=em+eh,eP=eg+ef+(eO>>>0>>0?1:0);F=q,V=L,q=j,L=H,j=U,H=J,U=M+ek+((J=D+e_|0)>>>0>>0?1:0)|0,M=B,D=C,B=N,C=x,N=E,x=T,E=ek+eP+((T=e_+eO|0)>>>0>>0?1:0)|0}h=n.low=h+T,n.high=f+E+(h>>>0>>0?1:0),m=i.low=m+x,i.high=g+N+(m>>>0>>0?1:0),v=o.low=v+C,o.high=y+B+(v>>>0>>0?1:0),S=a.low=S+D,a.high=b+M+(S>>>0>>0?1:0),_=s.low=_+J,s.high=w+U+(_>>>0>>0?1:0),O=d.low=O+H,d.high=k+j+(O>>>0>>0?1:0),A=c.low=A+L,c.high=P+q+(A>>>0>>0?1:0),R=p.low=R+V,p.high=I+F+(R>>>0>>0?1:0)},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;return t[n>>>5]|=128<<24-n%32,t[(n+128>>>10<<5)+30]=Math.floor(r/4294967296),t[(n+128>>>10<<5)+31]=r,e.sigBytes=4*t.length,this._process(),this._hash.toX32()},clone:function(){var e=r.clone.call(this);return e._hash=this._hash.clone(),e},blockSize:32});t.SHA512=r._createHelper(d),t.HmacSHA512=r._createHmacHelper(d)}(),e.SHA512})},41144:function(e,t,r){"use strict";!function(n,i,o){e.exports=t=i(r(32646),r(7679),r(22236),r(82948),r(95989))}(0,function(e){return!function(){var t=e,r=t.lib,n=r.WordArray,i=r.BlockCipher,o=t.algo,a=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],s=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],l=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],u=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],d=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],c=o.DES=i.extend({_doReset:function(){for(var e=this._key.words,t=[],r=0;r<56;r++){var n=a[r]-1;t[r]=e[n>>>5]>>>31-n%32&1}for(var i=this._subKeys=[],o=0;o<16;o++){for(var u=i[o]=[],d=l[o],r=0;r<24;r++)u[r/6|0]|=t[(s[r]-1+d)%28]<<31-r%6,u[4+(r/6|0)]|=t[28+(s[r+24]-1+d)%28]<<31-r%6;u[0]=u[0]<<1|u[0]>>>31;for(var r=1;r<7;r++)u[r]=u[r]>>>(r-1)*4+3;u[7]=u[7]<<5|u[7]>>>27}for(var c=this._invSubKeys=[],r=0;r<16;r++)c[r]=i[15-r]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._subKeys)},decryptBlock:function(e,t){this._doCryptBlock(e,t,this._invSubKeys)},_doCryptBlock:function(e,t,r){this._lBlock=e[t],this._rBlock=e[t+1],p.call(this,4,252645135),p.call(this,16,65535),f.call(this,2,858993459),f.call(this,8,16711935),p.call(this,1,1431655765);for(var n=0;n<16;n++){for(var i=r[n],o=this._lBlock,a=this._rBlock,s=0,l=0;l<8;l++)s|=u[l][((a^i[l])&d[l])>>>0];this._lBlock=a,this._rBlock=o^s}var c=this._lBlock;this._lBlock=this._rBlock,this._rBlock=c,p.call(this,1,1431655765),f.call(this,8,16711935),f.call(this,2,858993459),p.call(this,16,65535),p.call(this,4,252645135),e[t]=this._lBlock,e[t+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function p(e,t){var r=(this._lBlock>>>e^this._rBlock)&t;this._rBlock^=r,this._lBlock^=r<>>e^this._lBlock)&t;this._lBlock^=r,this._rBlock^=r<192.");var t=e.slice(0,2),r=e.length<4?e.slice(0,2):e.slice(2,4),i=e.length<6?e.slice(0,2):e.slice(4,6);this._des1=c.createEncryptor(n.create(t)),this._des2=c.createEncryptor(n.create(r)),this._des3=c.createEncryptor(n.create(i))},encryptBlock:function(e,t){this._des1.encryptBlock(e,t),this._des2.decryptBlock(e,t),this._des3.encryptBlock(e,t)},decryptBlock:function(e,t){this._des3.decryptBlock(e,t),this._des2.encryptBlock(e,t),this._des1.decryptBlock(e,t)},keySize:6,ivSize:2,blockSize:2});t.TripleDES=i._createHelper(h)}(),e.TripleDES})},94738:function(e,t,r){"use strict";!function(n,i){e.exports=t=i(r(32646))}(0,function(e){return!function(){var t=e,r=t.lib,n=r.Base,i=r.WordArray,o=t.x64={};o.Word=n.extend({init:function(e,t){this.high=e,this.low=t}}),o.WordArray=n.extend({init:function(e,t){e=this.words=e||[],void 0!=t?this.sigBytes=t:this.sigBytes=8*e.length},toX32:function(){for(var e=this.words,t=e.length,r=[],n=0;n3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new o("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new o("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new o("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new o("`loose`, if provided, must be a boolean");var s=arguments.length>3?arguments[3]:null,l=arguments.length>4?arguments[4]:null,u=arguments.length>5?arguments[5]:null,d=arguments.length>6&&arguments[6],c=!!a&&a(e,t);if(n)n(e,t,{configurable:null===u&&c?c.configurable:!u,enumerable:null===s&&c?c.enumerable:!s,value:r,writable:null===l&&c?c.writable:!l});else if(!d&&(s||l||u))throw new i("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");else e[t]=r}},96981:function(e,t,r){"use strict";var n=r(24752),i="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),o=Object.prototype.toString,a=Array.prototype.concat,s=r(22916),l=function(e){return"function"==typeof e&&"[object Function]"===o.call(e)},u=r(39223)(),d=function(e,t,r,n){if(t in e){if(!0===n){if(e[t]===r)return}else if(!l(n)||!n())return}u?s(e,t,r,!0):s(e,t,r)},c=function(e,t){var r=arguments.length>2?arguments[2]:{},o=n(t);i&&(o=a.call(o,Object.getOwnPropertySymbols(t)));for(var s=0;s0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function u(e,t){this.curve=e,this.type=t,this.precomputed=null}e.exports=l,l.prototype.point=function(){throw Error("Not implemented")},l.prototype.validate=function(){throw Error("Not implemented")},l.prototype._fixedNafMul=function(e,t){s(e.precomputed);var r,n,i=e._getDoubles(),a=o(t,1,this._bitLength),l=(1<=r;d--)n=(n<<1)+a[d];u.push(n)}for(var c=this.jpoint(null,null,null),p=this.jpoint(null,null,null),f=l;f>0;f--){for(r=0;r=0;u--){for(var d=0;u>=0&&0===a[u];u--)d++;if(u>=0&&d++,l=l.dblp(d),u<0)break;var c=a[u];s(0!==c),l="affine"===e.type?c>0?l.mixedAdd(i[c-1>>1]):l.mixedAdd(i[-c-1>>1].neg()):c>0?l.add(i[c-1>>1]):l.add(i[-c-1>>1].neg())}return"affine"===e.type?l.toP():l},l.prototype._wnafMulAdd=function(e,t,r,n,i){var s,l,u,d=this._wnafT1,c=this._wnafT2,p=this._wnafT3,f=0;for(s=0;s=1;s-=2){var g=s-1,m=s;if(1!==d[g]||1!==d[m]){p[g]=o(r[g],d[g],this._bitLength),p[m]=o(r[m],d[m],this._bitLength),f=Math.max(p[g].length,f),f=Math.max(p[m].length,f);continue}var y=[t[g],null,null,t[m]];0===t[g].y.cmp(t[m].y)?(y[1]=t[g].add(t[m]),y[2]=t[g].toJ().mixedAdd(t[m].neg())):0===t[g].y.cmp(t[m].y.redNeg())?(y[1]=t[g].toJ().mixedAdd(t[m]),y[2]=t[g].add(t[m].neg())):(y[1]=t[g].toJ().mixedAdd(t[m]),y[2]=t[g].toJ().mixedAdd(t[m].neg()));var v=[-3,-1,-5,-7,0,7,5,1,3],b=a(r[g],r[m]);for(l=0,f=Math.max(b[0].length,f),p[g]=Array(f),p[m]=Array(f);l=0;s--){for(var O=0;s>=0;){var P=!0;for(l=0;l=0&&O++,_=_.dblp(O),s<0)break;for(l=0;l0?u=c[l][A-1>>1]:A<0&&(u=c[l][-A-1>>1].neg()),_="affine"===u.type?_.mixedAdd(u):_.add(u))}}for(s=0;s=Math.ceil((e.bitLength()+1)/t.step)},u.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i":""},u.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},u.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var n=this.curve._mulA(e),i=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),o=n.redAdd(t),a=o.redSub(r),s=n.redSub(t),l=i.redMul(a),u=o.redMul(s),d=i.redMul(s),c=a.redMul(o);return this.curve.point(l,u,c,d)},u.prototype._projDbl=function(){var e,t,r,n,i,o,a=this.x.redAdd(this.y).redSqr(),s=this.x.redSqr(),l=this.y.redSqr();if(this.curve.twisted){var u=(n=this.curve._mulA(s)).redAdd(l);this.zOne?(e=a.redSub(s).redSub(l).redMul(u.redSub(this.curve.two)),t=u.redMul(n.redSub(l)),r=u.redSqr().redSub(u).redSub(u)):(i=this.z.redSqr(),o=u.redSub(i).redISub(i),e=a.redSub(s).redISub(l).redMul(o),t=u.redMul(n.redSub(l)),r=u.redMul(o))}else n=s.redAdd(l),i=this.curve._mulC(this.z).redSqr(),o=n.redSub(i).redSub(i),e=this.curve._mulC(a.redISub(n)).redMul(o),t=this.curve._mulC(n).redMul(s.redISub(l)),r=n.redMul(o);return this.curve.point(e,t,r)},u.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},u.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),r=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),n=this.t.redMul(this.curve.dd).redMul(e.t),i=this.z.redMul(e.z.redAdd(e.z)),o=r.redSub(t),a=i.redSub(n),s=i.redAdd(n),l=r.redAdd(t),u=o.redMul(a),d=s.redMul(l),c=o.redMul(l),p=a.redMul(s);return this.curve.point(u,d,p,c)},u.prototype._projAdd=function(e){var t,r,n=this.z.redMul(e.z),i=n.redSqr(),o=this.x.redMul(e.x),a=this.y.redMul(e.y),s=this.curve.d.redMul(o).redMul(a),l=i.redSub(s),u=i.redAdd(s),d=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(o).redISub(a),c=n.redMul(l).redMul(d);return this.curve.twisted?(t=n.redMul(u).redMul(a.redSub(this.curve._mulA(o))),r=l.redMul(u)):(t=n.redMul(u).redMul(a.redSub(o)),r=this.curve._mulC(l).redMul(u)),this.curve.point(c,t,r)},u.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},u.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},u.prototype.mulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!1)},u.prototype.jmulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!0)},u.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},u.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},u.prototype.getX=function(){return this.normalize(),this.x.fromRed()},u.prototype.getY=function(){return this.normalize(),this.y.fromRed()},u.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},u.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var r=e.clone(),n=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(n),0===this.x.cmp(t))return!0}},u.prototype.toP=u.prototype.normalize,u.prototype.mixedAdd=u.prototype.add},79702:function(e,t,r){"use strict";var n=t;n.base=r(59177),n.short=r(73545),n.mont=r(69136),n.edwards=r(58045)},69136:function(e,t,r){"use strict";var n=r(78442),i=r(39541),o=r(59177),a=r(38702);function s(e){o.call(this,"mont",e),this.a=new n(e.a,16).toRed(this.red),this.b=new n(e.b,16).toRed(this.red),this.i4=new n(4).toRed(this.red).redInvm(),this.two=new n(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function l(e,t,r){o.BasePoint.call(this,e,"projective"),null===t&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new n(t,16),this.z=new n(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}i(s,o),e.exports=s,s.prototype.validate=function(e){var t=e.normalize().x,r=t.redSqr(),n=r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t);return 0===n.redSqrt().redSqr().cmp(n)},i(l,o.BasePoint),s.prototype.decodePoint=function(e,t){return this.point(a.toArray(e,t),1)},s.prototype.point=function(e,t){return new l(this,e,t)},s.prototype.pointFromJSON=function(e){return l.fromJSON(this,e)},l.prototype.precompute=function(){},l.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},l.fromJSON=function(e,t){return new l(e,t[0],t[1]||e.one)},l.prototype.inspect=function(){return this.isInfinity()?"":""},l.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},l.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),r=e.redSub(t),n=e.redMul(t),i=r.redMul(t.redAdd(this.curve.a24.redMul(r)));return this.curve.point(n,i)},l.prototype.add=function(){throw Error("Not supported on Montgomery curve")},l.prototype.diffAdd=function(e,t){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=e.x.redAdd(e.z),o=e.x.redSub(e.z).redMul(r),a=i.redMul(n),s=t.z.redMul(o.redAdd(a).redSqr()),l=t.x.redMul(o.redISub(a).redSqr());return this.curve.point(s,l)},l.prototype.mul=function(e){for(var t=e.clone(),r=this,n=this.curve.point(null,null),i=this,o=[];0!==t.cmpn(0);t.iushrn(1))o.push(t.andln(1));for(var a=o.length-1;a>=0;a--)0===o[a]?(r=r.diffAdd(n,i),n=n.dbl()):(n=r.diffAdd(n,i),r=r.dbl());return n},l.prototype.mulAdd=function(){throw Error("Not supported on Montgomery curve")},l.prototype.jumlAdd=function(){throw Error("Not supported on Montgomery curve")},l.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},l.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},l.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},73545:function(e,t,r){"use strict";var n=r(38702),i=r(78442),o=r(39541),a=r(59177),s=n.assert;function l(e){a.call(this,"short",e),this.a=new i(e.a,16).toRed(this.red),this.b=new i(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=[,,,,],this._endoWnafT2=[,,,,]}function u(e,t,r,n){a.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new i(t,16),this.y=new i(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function d(e,t,r,n){a.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new i(0)):(this.x=new i(t,16),this.y=new i(r,16),this.z=new i(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}o(l,a),e.exports=l,l.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){if(e.beta)t=new i(e.beta,16).toRed(this.red);else{var t,r,n,o=this._getEndoRoots(this.p);t=(t=0>o[0].cmp(o[1])?o[0]:o[1]).toRed(this.red)}if(e.lambda)r=new i(e.lambda,16);else{var a=this._getEndoRoots(this.n);0===this.g.mul(a[0]).x.cmp(this.g.x.redMul(t))?r=a[0]:(r=a[1],s(0===this.g.mul(r).x.cmp(this.g.x.redMul(t))))}return n=e.basis?e.basis.map(function(e){return{a:new i(e.a,16),b:new i(e.b,16)}}):this._getEndoBasis(r),{beta:t,lambda:r,basis:n}}},l.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:i.mont(e),r=new i(2).toRed(t).redInvm(),n=r.redNeg(),o=new i(3).toRed(t).redNeg().redSqrt().redMul(r);return[n.redAdd(o).fromRed(),n.redSub(o).fromRed()]},l.prototype._getEndoBasis=function(e){for(var t,r,n,o,a,s,l,u,d,c=this.n.ushrn(Math.floor(this.n.bitLength()/2)),p=e,f=this.n.clone(),h=new i(1),g=new i(0),m=new i(0),y=new i(1),v=0;0!==p.cmpn(0);){var b=f.div(p);u=f.sub(b.mul(p)),d=m.sub(b.mul(h));var S=y.sub(b.mul(g));if(!n&&0>u.cmp(c))t=l.neg(),r=h,n=u.neg(),o=d;else if(n&&2==++v)break;l=u,f=p,p=u,m=h,h=d,y=g,g=S}a=u.neg(),s=d;var w=n.sqr().add(o.sqr());return a.sqr().add(s.sqr()).cmp(w)>=0&&(a=t,s=r),n.negative&&(n=n.neg(),o=o.neg()),a.negative&&(a=a.neg(),s=s.neg()),[{a:n,b:o},{a:a,b:s}]},l.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],i=n.b.mul(e).divRound(this.n),o=r.b.neg().mul(e).divRound(this.n),a=i.mul(r.a),s=o.mul(n.a),l=i.mul(r.b),u=o.mul(n.b);return{k1:e.sub(a).sub(s),k2:l.add(u).neg()}},l.prototype.pointFromX=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw Error("invalid point");var o=n.fromRed().isOdd();return(t&&!o||!t&&o)&&(n=n.redNeg()),this.point(e,n)},l.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},l.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o":""},u.prototype.isInfinity=function(){return this.inf},u.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e)||0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},u.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),a=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,a)},u.prototype.getX=function(){return this.x.fromRed()},u.prototype.getY=function(){return this.y.fromRed()},u.prototype.mul=function(e){return(e=new i(e,16),this.isInfinity())?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},u.prototype.mulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},u.prototype.jmulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},u.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},u.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},u.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},o(d,a.BasePoint),l.prototype.jpoint=function(e,t,r){return new d(this,e,t,r)},d.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},d.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},d.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),i=e.x.redMul(r),o=this.y.redMul(t.redMul(e.z)),a=e.y.redMul(r.redMul(this.z)),s=n.redSub(i),l=o.redSub(a);if(0===s.cmpn(0))return 0!==l.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=s.redSqr(),d=u.redMul(s),c=n.redMul(u),p=l.redSqr().redIAdd(d).redISub(c).redISub(c),f=l.redMul(c.redISub(p)).redISub(o.redMul(d)),h=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(p,f,h)},d.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),i=this.y,o=e.y.redMul(t).redMul(this.z),a=r.redSub(n),s=i.redSub(o);if(0===a.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var l=a.redSqr(),u=l.redMul(a),d=r.redMul(l),c=s.redSqr().redIAdd(u).redISub(d).redISub(d),p=s.redMul(d.redISub(c)).redISub(i.redMul(u)),f=this.z.redMul(a);return this.curve.jpoint(c,p,f)},d.prototype.dblp=function(e){if(0===e||this.isInfinity())return this;if(!e)return this.dbl();if(this.curve.zeroA||this.curve.threeA){var t,r=this;for(t=0;t=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},d.prototype.inspect=function(){return this.isInfinity()?"":""},d.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},76769:function(e,t,r){"use strict";var n,i=t,o=r(52689),a=r(79702),s=r(38702).assert;function l(e){"short"===e.type?this.curve=new a.short(e):"edwards"===e.type?this.curve=new a.edwards(e):this.curve=new a.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,s(this.g.validate(),"Invalid curve"),s(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function u(e,t){Object.defineProperty(i,e,{configurable:!0,enumerable:!0,get:function(){var r=new l(t);return Object.defineProperty(i,e,{configurable:!0,enumerable:!0,value:r}),r}})}i.PresetCurve=l,u("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:o.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),u("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:o.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),u("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:o.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),u("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:o.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),u("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:o.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),u("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["9"]}),u("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{n=r(13985)}catch(e){n=void 0}u("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:o.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",n]})},95085:function(e,t,r){"use strict";var n=r(78442),i=r(36418),o=r(38702),a=r(76769),s=r(81658),l=o.assert,u=r(50373),d=r(74973);function c(e){if(!(this instanceof c))return new c(e);"string"==typeof e&&(l(Object.prototype.hasOwnProperty.call(a,e),"Unknown curve "+e),e=a[e]),e instanceof a.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}e.exports=c,c.prototype.keyPair=function(e){return new u(this,e)},c.prototype.keyFromPrivate=function(e,t){return u.fromPrivate(this,e,t)},c.prototype.keyFromPublic=function(e,t){return u.fromPublic(this,e,t)},c.prototype.genKeyPair=function(e){e||(e={});for(var t=new i({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||s(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),o=this.n.sub(new n(2));;){var a=new n(t.generate(r));if(!(a.cmp(o)>0))return a.iaddn(1),this.keyFromPrivate(a)}},c.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return(r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0)?e.sub(this.n):e},c.prototype.sign=function(e,t,r,o){"object"==typeof r&&(o=r,r=null),o||(o={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new n(e,16));for(var a=this.n.byteLength(),s=t.getPrivate().toArray("be",a),l=e.toArray("be",a),u=new i({hash:this.hash,entropy:s,nonce:l,pers:o.pers,persEnc:o.persEnc||"utf8"}),c=this.n.sub(new n(1)),p=0;;p++){var f=o.k?o.k(p):new n(u.generate(this.n.byteLength()));if(!(0>=(f=this._truncateToN(f,!0)).cmpn(1)||f.cmp(c)>=0)){var h=this.g.mul(f);if(!h.isInfinity()){var g=h.getX(),m=g.umod(this.n);if(0!==m.cmpn(0)){var y=f.invm(this.n).mul(m.mul(t.getPrivate()).iadd(e));if(0!==(y=y.umod(this.n)).cmpn(0)){var v=(h.getY().isOdd()?1:0)|(0!==g.cmp(m)?2:0);return o.canonical&&y.cmp(this.nh)>0&&(y=this.n.sub(y),v^=1),new d({r:m,s:y,recoveryParam:v})}}}}}},c.prototype.verify=function(e,t,r,i){e=this._truncateToN(new n(e,16)),r=this.keyFromPublic(r,i);var o,a=(t=new d(t,"hex")).r,s=t.s;if(0>a.cmpn(1)||a.cmp(this.n)>=0||0>s.cmpn(1)||s.cmp(this.n)>=0)return!1;var l=s.invm(this.n),u=l.mul(e).umod(this.n),c=l.mul(a).umod(this.n);return this.curve._maxwellTrick?!(o=this.g.jmulAdd(u,r.getPublic(),c)).isInfinity()&&o.eqXToP(a):!(o=this.g.mulAdd(u,r.getPublic(),c)).isInfinity()&&0===o.getX().umod(this.n).cmp(a)},c.prototype.recoverPubKey=function(e,t,r,i){l((3&r)===r,"The recovery param is more than two bits"),t=new d(t,i);var o=this.n,a=new n(e),s=t.r,u=t.s,c=1&r,p=r>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&p)throw Error("Unable to find sencond key candinate");s=p?this.curve.pointFromX(s.add(this.curve.n),c):this.curve.pointFromX(s,c);var f=t.r.invm(o),h=o.sub(a).mul(f).umod(o),g=u.mul(f).umod(o);return this.g.mulAdd(h,s,g)},c.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new d(t,n)).recoveryParam)return t.recoveryParam;for(var i,o=0;o<4;o++){try{i=this.recoverPubKey(e,t,o)}catch(e){continue}if(i.eq(r))return o}throw Error("Unable to find valid recovery factor")}},50373:function(e,t,r){"use strict";var n=r(78442),i=r(38702).assert;function o(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}e.exports=o,o.fromPublic=function(e,t,r){return t instanceof o?t:new o(e,{pub:t,pubEnc:r})},o.fromPrivate=function(e,t,r){return t instanceof o?t:new o(e,{priv:t,privEnc:r})},o.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},o.prototype.getPublic=function(e,t){return("string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t)?this.pub.encode(t,e):this.pub},o.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},o.prototype._importPrivate=function(e,t){this.priv=new n(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},o.prototype._importPublic=function(e,t){if(e.x||e.y){"mont"===this.ec.curve.type?i(e.x,"Need x coordinate"):("short"===this.ec.curve.type||"edwards"===this.ec.curve.type)&&i(e.x&&e.y,"Need both x and y coordinate"),this.pub=this.ec.curve.point(e.x,e.y);return}this.pub=this.ec.curve.decodePoint(e,t)},o.prototype.derive=function(e){return e.validate()||i(e.validate(),"public point not validated"),e.mul(this.priv).getX()},o.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)},o.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},o.prototype.inspect=function(){return""}},74973:function(e,t,r){"use strict";var n=r(78442),i=r(38702),o=i.assert;function a(e,t){if(e instanceof a)return e;this._importDER(e,t)||(o(e.r&&e.s,"Signature without r or s"),this.r=new n(e.r,16),this.s=new n(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function s(){this.place=0}function l(e,t){var r=e[t.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;for(var i=0,o=0,a=t.place;o>>=0;return!(i<=127)&&(t.place=a,i)}function u(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&t>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}e.exports=a,a.prototype._importDER=function(e,t){e=i.toArray(e,t);var r=new s;if(48!==e[r.place++])return!1;var o=l(e,r);if(!1===o||o+r.place!==e.length||2!==e[r.place++])return!1;var a=l(e,r);if(!1===a)return!1;var u=e.slice(r.place,a+r.place);if(r.place+=a,2!==e[r.place++])return!1;var d=l(e,r);if(!1===d||e.length!==d+r.place)return!1;var c=e.slice(r.place,d+r.place);if(0===u[0]){if(!(128&u[1]))return!1;u=u.slice(1)}if(0===c[0]){if(!(128&c[1]))return!1;c=c.slice(1)}return this.r=new n(u),this.s=new n(c),this.recoveryParam=null,!0},a.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=u(t),r=u(r);!r[0]&&!(128&r[1]);)r=r.slice(1);var n=[2];d(n,t.length),(n=n.concat(t)).push(2),d(n,r.length);var o=n.concat(r),a=[48];return d(a,o.length),a=a.concat(o),i.encode(a,e)}},55498:function(e,t,r){"use strict";var n=r(52689),i=r(76769),o=r(38702),a=o.assert,s=o.parseBytes,l=r(35513),u=r(83813);function d(e){if(a("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof d))return new d(e);e=i[e].curve,this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=n.sha512}e.exports=d,d.prototype.sign=function(e,t){e=s(e);var r=this.keyFromSecret(t),n=this.hashInt(r.messagePrefix(),e),i=this.g.mul(n),o=this.encodePoint(i),a=this.hashInt(o,r.pubBytes(),e).mul(r.priv()),l=n.add(a).umod(this.curve.n);return this.makeSignature({R:i,S:l,Rencoded:o})},d.prototype.verify=function(e,t,r){e=s(e),t=this.makeSignature(t);var n=this.keyFromPublic(r),i=this.hashInt(t.Rencoded(),n.pubBytes(),e),o=this.g.mul(t.S());return t.R().add(n.pub().mul(i)).eq(o)},d.prototype.hashInt=function(){for(var e=this.hash(),t=0;t(i>>1)-1?(i>>1)-l:l,o.isubn(s)):s=0,n[a]=s,o.iushrn(1)}return n}function l(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var n=0,i=0;e.cmpn(-n)>0||t.cmpn(-i)>0;){var o,a,s,l=e.andln(3)+n&3,u=t.andln(3)+i&3;3===l&&(l=-1),3===u&&(u=-1),a=(1&l)==0?0:(3==(o=e.andln(7)+n&7)||5===o)&&2===u?-l:l,r[0].push(a),s=(1&u)==0?0:(3==(o=t.andln(7)+i&7)||5===o)&&2===l?-u:u,r[1].push(s),2*n===a+1&&(n=1-n),2*i===s+1&&(i=1-i),e.iushrn(1),t.iushrn(1)}return r}function u(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}}function d(e){return"string"==typeof e?n.toArray(e,"hex"):e}function c(e){return new i(e,"hex","le")}n.assert=o,n.toArray=a.toArray,n.zero2=a.zero2,n.toHex=a.toHex,n.encode=a.encode,n.getNAF=s,n.getJSF=l,n.cachedProperty=u,n.parseBytes=d,n.intFromLE=c},78442:function(e,t,r){!function(e,t){"use strict";function n(e,t){if(!e)throw Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function o(e,t,r){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&(("le"===t||"be"===t)&&(r=t,t=10),this._init(e||0,t||10,r||"be"))}"object"==typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{u=void 0!==window.Buffer?window.Buffer:r(85568).Buffer}catch(e){}function a(e,t){var r=e.charCodeAt(t);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function s(e,t,r){var n=a(e,r);return r-1>=t&&(n|=a(e,r-1)<<4),n}function l(e,t,r,n){for(var i=0,o=Math.min(e.length,r),a=t;a=49?i+=s-49+10:s>=17?i+=s-17+10:i+=s}return i}o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return 0>e.cmp(t)?e:t},o.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;a-=3)o=e[a]|e[a-1]<<8|e[a-2]<<16,this.words[i]|=o<>>26-s&67108863,(s+=24)>=26&&(s-=26,i++);else if("le"===r)for(a=0,i=0;a>>26-s&67108863,(s+=24)>=26&&(s-=26,i++);return this.strip()},o.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=Array(this.length);for(var n,i=0;i=t;i-=2)n=s(e,t,i)<=18?(o-=18,a+=1,this.words[a]|=n>>>26):o+=8;else for(i=(e.length-t)%2==0?t+1:t;i=18?(o-=18,a+=1,this.words[a]|=n>>>26):o+=8;this.strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,a=o%n,s=Math.min(o,o-a)+r,u=0,d=r;d1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var u,d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],c=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function f(e){for(var t=Array(e.bitLength()),r=0;r>>i}return t}function h(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],a=i*o,s=67108863&a,l=a/67108864|0;r.words[0]=s;for(var u=1;u>>26,c=67108863&l,p=Math.min(u,t.length-1),f=Math.max(0,u-e.length+1);f<=p;f++){var h=u-f|0;d+=(a=(i=0|e.words[h])*(o=0|t.words[f])+c)/67108864|0,c=67108863&a}r.words[u]=0|c,l=0|d}return 0!==l?r.words[u]=0|l:r.length--,r.strip()}o.prototype.toString=function(e,t){if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var r,i=0,o=0,a=0;a>>24-i&16777215)||a!==this.length-1?d[6-l.length]+l+r:l+r,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var u=c[e],f=p[e];r="";var h=this.clone();for(h.negative=0;!h.isZero();){var g=h.modn(f).toString(e);r=(h=h.idivn(f)).isZero()?g+r:d[u-g.length]+g+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(e,t){return n(void 0!==u),this.toArrayLike(u,e,t)},o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,r){var i,o,a=this.byteLength(),s=r||Math.max(1,a);n(a<=s,"byte array longer than desired length"),n(s>0,"Requested array length <= 0"),this.strip();var l="le"===t,u=new e(s),d=this.clone();if(l){for(o=0;!d.isZero();o++)i=d.andln(255),d.iushrn(8),u[o]=i;for(;o=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return(8191&t)==0&&(r+=13,t>>>=13),(127&t)==0&&(r+=7,t>>>=7),(15&t)==0&&(r+=4,t>>>=4),(3&t)==0&&(r+=2,t>>>=2),(1&t)==0&&r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return(this.length-1)*26+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){this.length>e.length?(t=this,r=e):(t=e,r=this);for(var t,r,n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),t?this.words[r]=this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var t,r,n,i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;oe.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t,r,n=this.iadd(e);return e.negative=1,n._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(t=this,r=e):(t=e,r=this);for(var o=0,a=0;a>26,this.words[a]=67108863&n;for(;0!==o&&a>26,this.words[a]=67108863&n;if(0===o&&a>>13,f=0|a[1],h=8191&f,g=f>>>13,m=0|a[2],y=8191&m,v=m>>>13,b=0|a[3],S=8191&b,w=b>>>13,_=0|a[4],k=8191&_,O=_>>>13,P=0|a[5],A=8191&P,I=P>>>13,R=0|a[6],E=8191&R,T=R>>>13,N=0|a[7],x=8191&N,B=N>>>13,C=0|a[8],M=8191&C,D=C>>>13,U=0|a[9],J=8191&U,j=U>>>13,H=0|s[0],q=8191&H,L=H>>>13,F=0|s[1],V=8191&F,W=F>>>13,z=0|s[2],G=8191&z,Q=z>>>13,K=0|s[3],Y=8191&K,Z=K>>>13,X=0|s[4],$=8191&X,ee=X>>>13,et=0|s[5],er=8191&et,en=et>>>13,ei=0|s[6],eo=8191&ei,ea=ei>>>13,es=0|s[7],el=8191&es,eu=es>>>13,ed=0|s[8],ec=8191&ed,ep=ed>>>13,ef=0|s[9],eh=8191&ef,eg=ef>>>13;r.negative=e.negative^t.negative,r.length=19;var em=(u+(n=Math.imul(c,q))|0)+((8191&(i=(i=Math.imul(c,L))+Math.imul(p,q)|0))<<13)|0;u=((o=Math.imul(p,L))+(i>>>13)|0)+(em>>>26)|0,em&=67108863,n=Math.imul(h,q),i=(i=Math.imul(h,L))+Math.imul(g,q)|0,o=Math.imul(g,L);var ey=(u+(n=n+Math.imul(c,V)|0)|0)+((8191&(i=(i=i+Math.imul(c,W)|0)+Math.imul(p,V)|0))<<13)|0;u=((o=o+Math.imul(p,W)|0)+(i>>>13)|0)+(ey>>>26)|0,ey&=67108863,n=Math.imul(y,q),i=(i=Math.imul(y,L))+Math.imul(v,q)|0,o=Math.imul(v,L),n=n+Math.imul(h,V)|0,i=(i=i+Math.imul(h,W)|0)+Math.imul(g,V)|0,o=o+Math.imul(g,W)|0;var ev=(u+(n=n+Math.imul(c,G)|0)|0)+((8191&(i=(i=i+Math.imul(c,Q)|0)+Math.imul(p,G)|0))<<13)|0;u=((o=o+Math.imul(p,Q)|0)+(i>>>13)|0)+(ev>>>26)|0,ev&=67108863,n=Math.imul(S,q),i=(i=Math.imul(S,L))+Math.imul(w,q)|0,o=Math.imul(w,L),n=n+Math.imul(y,V)|0,i=(i=i+Math.imul(y,W)|0)+Math.imul(v,V)|0,o=o+Math.imul(v,W)|0,n=n+Math.imul(h,G)|0,i=(i=i+Math.imul(h,Q)|0)+Math.imul(g,G)|0,o=o+Math.imul(g,Q)|0;var eb=(u+(n=n+Math.imul(c,Y)|0)|0)+((8191&(i=(i=i+Math.imul(c,Z)|0)+Math.imul(p,Y)|0))<<13)|0;u=((o=o+Math.imul(p,Z)|0)+(i>>>13)|0)+(eb>>>26)|0,eb&=67108863,n=Math.imul(k,q),i=(i=Math.imul(k,L))+Math.imul(O,q)|0,o=Math.imul(O,L),n=n+Math.imul(S,V)|0,i=(i=i+Math.imul(S,W)|0)+Math.imul(w,V)|0,o=o+Math.imul(w,W)|0,n=n+Math.imul(y,G)|0,i=(i=i+Math.imul(y,Q)|0)+Math.imul(v,G)|0,o=o+Math.imul(v,Q)|0,n=n+Math.imul(h,Y)|0,i=(i=i+Math.imul(h,Z)|0)+Math.imul(g,Y)|0,o=o+Math.imul(g,Z)|0;var eS=(u+(n=n+Math.imul(c,$)|0)|0)+((8191&(i=(i=i+Math.imul(c,ee)|0)+Math.imul(p,$)|0))<<13)|0;u=((o=o+Math.imul(p,ee)|0)+(i>>>13)|0)+(eS>>>26)|0,eS&=67108863,n=Math.imul(A,q),i=(i=Math.imul(A,L))+Math.imul(I,q)|0,o=Math.imul(I,L),n=n+Math.imul(k,V)|0,i=(i=i+Math.imul(k,W)|0)+Math.imul(O,V)|0,o=o+Math.imul(O,W)|0,n=n+Math.imul(S,G)|0,i=(i=i+Math.imul(S,Q)|0)+Math.imul(w,G)|0,o=o+Math.imul(w,Q)|0,n=n+Math.imul(y,Y)|0,i=(i=i+Math.imul(y,Z)|0)+Math.imul(v,Y)|0,o=o+Math.imul(v,Z)|0,n=n+Math.imul(h,$)|0,i=(i=i+Math.imul(h,ee)|0)+Math.imul(g,$)|0,o=o+Math.imul(g,ee)|0;var ew=(u+(n=n+Math.imul(c,er)|0)|0)+((8191&(i=(i=i+Math.imul(c,en)|0)+Math.imul(p,er)|0))<<13)|0;u=((o=o+Math.imul(p,en)|0)+(i>>>13)|0)+(ew>>>26)|0,ew&=67108863,n=Math.imul(E,q),i=(i=Math.imul(E,L))+Math.imul(T,q)|0,o=Math.imul(T,L),n=n+Math.imul(A,V)|0,i=(i=i+Math.imul(A,W)|0)+Math.imul(I,V)|0,o=o+Math.imul(I,W)|0,n=n+Math.imul(k,G)|0,i=(i=i+Math.imul(k,Q)|0)+Math.imul(O,G)|0,o=o+Math.imul(O,Q)|0,n=n+Math.imul(S,Y)|0,i=(i=i+Math.imul(S,Z)|0)+Math.imul(w,Y)|0,o=o+Math.imul(w,Z)|0,n=n+Math.imul(y,$)|0,i=(i=i+Math.imul(y,ee)|0)+Math.imul(v,$)|0,o=o+Math.imul(v,ee)|0,n=n+Math.imul(h,er)|0,i=(i=i+Math.imul(h,en)|0)+Math.imul(g,er)|0,o=o+Math.imul(g,en)|0;var e_=(u+(n=n+Math.imul(c,eo)|0)|0)+((8191&(i=(i=i+Math.imul(c,ea)|0)+Math.imul(p,eo)|0))<<13)|0;u=((o=o+Math.imul(p,ea)|0)+(i>>>13)|0)+(e_>>>26)|0,e_&=67108863,n=Math.imul(x,q),i=(i=Math.imul(x,L))+Math.imul(B,q)|0,o=Math.imul(B,L),n=n+Math.imul(E,V)|0,i=(i=i+Math.imul(E,W)|0)+Math.imul(T,V)|0,o=o+Math.imul(T,W)|0,n=n+Math.imul(A,G)|0,i=(i=i+Math.imul(A,Q)|0)+Math.imul(I,G)|0,o=o+Math.imul(I,Q)|0,n=n+Math.imul(k,Y)|0,i=(i=i+Math.imul(k,Z)|0)+Math.imul(O,Y)|0,o=o+Math.imul(O,Z)|0,n=n+Math.imul(S,$)|0,i=(i=i+Math.imul(S,ee)|0)+Math.imul(w,$)|0,o=o+Math.imul(w,ee)|0,n=n+Math.imul(y,er)|0,i=(i=i+Math.imul(y,en)|0)+Math.imul(v,er)|0,o=o+Math.imul(v,en)|0,n=n+Math.imul(h,eo)|0,i=(i=i+Math.imul(h,ea)|0)+Math.imul(g,eo)|0,o=o+Math.imul(g,ea)|0;var ek=(u+(n=n+Math.imul(c,el)|0)|0)+((8191&(i=(i=i+Math.imul(c,eu)|0)+Math.imul(p,el)|0))<<13)|0;u=((o=o+Math.imul(p,eu)|0)+(i>>>13)|0)+(ek>>>26)|0,ek&=67108863,n=Math.imul(M,q),i=(i=Math.imul(M,L))+Math.imul(D,q)|0,o=Math.imul(D,L),n=n+Math.imul(x,V)|0,i=(i=i+Math.imul(x,W)|0)+Math.imul(B,V)|0,o=o+Math.imul(B,W)|0,n=n+Math.imul(E,G)|0,i=(i=i+Math.imul(E,Q)|0)+Math.imul(T,G)|0,o=o+Math.imul(T,Q)|0,n=n+Math.imul(A,Y)|0,i=(i=i+Math.imul(A,Z)|0)+Math.imul(I,Y)|0,o=o+Math.imul(I,Z)|0,n=n+Math.imul(k,$)|0,i=(i=i+Math.imul(k,ee)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,ee)|0,n=n+Math.imul(S,er)|0,i=(i=i+Math.imul(S,en)|0)+Math.imul(w,er)|0,o=o+Math.imul(w,en)|0,n=n+Math.imul(y,eo)|0,i=(i=i+Math.imul(y,ea)|0)+Math.imul(v,eo)|0,o=o+Math.imul(v,ea)|0,n=n+Math.imul(h,el)|0,i=(i=i+Math.imul(h,eu)|0)+Math.imul(g,el)|0,o=o+Math.imul(g,eu)|0;var eO=(u+(n=n+Math.imul(c,ec)|0)|0)+((8191&(i=(i=i+Math.imul(c,ep)|0)+Math.imul(p,ec)|0))<<13)|0;u=((o=o+Math.imul(p,ep)|0)+(i>>>13)|0)+(eO>>>26)|0,eO&=67108863,n=Math.imul(J,q),i=(i=Math.imul(J,L))+Math.imul(j,q)|0,o=Math.imul(j,L),n=n+Math.imul(M,V)|0,i=(i=i+Math.imul(M,W)|0)+Math.imul(D,V)|0,o=o+Math.imul(D,W)|0,n=n+Math.imul(x,G)|0,i=(i=i+Math.imul(x,Q)|0)+Math.imul(B,G)|0,o=o+Math.imul(B,Q)|0,n=n+Math.imul(E,Y)|0,i=(i=i+Math.imul(E,Z)|0)+Math.imul(T,Y)|0,o=o+Math.imul(T,Z)|0,n=n+Math.imul(A,$)|0,i=(i=i+Math.imul(A,ee)|0)+Math.imul(I,$)|0,o=o+Math.imul(I,ee)|0,n=n+Math.imul(k,er)|0,i=(i=i+Math.imul(k,en)|0)+Math.imul(O,er)|0,o=o+Math.imul(O,en)|0,n=n+Math.imul(S,eo)|0,i=(i=i+Math.imul(S,ea)|0)+Math.imul(w,eo)|0,o=o+Math.imul(w,ea)|0,n=n+Math.imul(y,el)|0,i=(i=i+Math.imul(y,eu)|0)+Math.imul(v,el)|0,o=o+Math.imul(v,eu)|0,n=n+Math.imul(h,ec)|0,i=(i=i+Math.imul(h,ep)|0)+Math.imul(g,ec)|0,o=o+Math.imul(g,ep)|0;var eP=(u+(n=n+Math.imul(c,eh)|0)|0)+((8191&(i=(i=i+Math.imul(c,eg)|0)+Math.imul(p,eh)|0))<<13)|0;u=((o=o+Math.imul(p,eg)|0)+(i>>>13)|0)+(eP>>>26)|0,eP&=67108863,n=Math.imul(J,V),i=(i=Math.imul(J,W))+Math.imul(j,V)|0,o=Math.imul(j,W),n=n+Math.imul(M,G)|0,i=(i=i+Math.imul(M,Q)|0)+Math.imul(D,G)|0,o=o+Math.imul(D,Q)|0,n=n+Math.imul(x,Y)|0,i=(i=i+Math.imul(x,Z)|0)+Math.imul(B,Y)|0,o=o+Math.imul(B,Z)|0,n=n+Math.imul(E,$)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,ee)|0,n=n+Math.imul(A,er)|0,i=(i=i+Math.imul(A,en)|0)+Math.imul(I,er)|0,o=o+Math.imul(I,en)|0,n=n+Math.imul(k,eo)|0,i=(i=i+Math.imul(k,ea)|0)+Math.imul(O,eo)|0,o=o+Math.imul(O,ea)|0,n=n+Math.imul(S,el)|0,i=(i=i+Math.imul(S,eu)|0)+Math.imul(w,el)|0,o=o+Math.imul(w,eu)|0,n=n+Math.imul(y,ec)|0,i=(i=i+Math.imul(y,ep)|0)+Math.imul(v,ec)|0,o=o+Math.imul(v,ep)|0;var eA=(u+(n=n+Math.imul(h,eh)|0)|0)+((8191&(i=(i=i+Math.imul(h,eg)|0)+Math.imul(g,eh)|0))<<13)|0;u=((o=o+Math.imul(g,eg)|0)+(i>>>13)|0)+(eA>>>26)|0,eA&=67108863,n=Math.imul(J,G),i=(i=Math.imul(J,Q))+Math.imul(j,G)|0,o=Math.imul(j,Q),n=n+Math.imul(M,Y)|0,i=(i=i+Math.imul(M,Z)|0)+Math.imul(D,Y)|0,o=o+Math.imul(D,Z)|0,n=n+Math.imul(x,$)|0,i=(i=i+Math.imul(x,ee)|0)+Math.imul(B,$)|0,o=o+Math.imul(B,ee)|0,n=n+Math.imul(E,er)|0,i=(i=i+Math.imul(E,en)|0)+Math.imul(T,er)|0,o=o+Math.imul(T,en)|0,n=n+Math.imul(A,eo)|0,i=(i=i+Math.imul(A,ea)|0)+Math.imul(I,eo)|0,o=o+Math.imul(I,ea)|0,n=n+Math.imul(k,el)|0,i=(i=i+Math.imul(k,eu)|0)+Math.imul(O,el)|0,o=o+Math.imul(O,eu)|0,n=n+Math.imul(S,ec)|0,i=(i=i+Math.imul(S,ep)|0)+Math.imul(w,ec)|0,o=o+Math.imul(w,ep)|0;var eI=(u+(n=n+Math.imul(y,eh)|0)|0)+((8191&(i=(i=i+Math.imul(y,eg)|0)+Math.imul(v,eh)|0))<<13)|0;u=((o=o+Math.imul(v,eg)|0)+(i>>>13)|0)+(eI>>>26)|0,eI&=67108863,n=Math.imul(J,Y),i=(i=Math.imul(J,Z))+Math.imul(j,Y)|0,o=Math.imul(j,Z),n=n+Math.imul(M,$)|0,i=(i=i+Math.imul(M,ee)|0)+Math.imul(D,$)|0,o=o+Math.imul(D,ee)|0,n=n+Math.imul(x,er)|0,i=(i=i+Math.imul(x,en)|0)+Math.imul(B,er)|0,o=o+Math.imul(B,en)|0,n=n+Math.imul(E,eo)|0,i=(i=i+Math.imul(E,ea)|0)+Math.imul(T,eo)|0,o=o+Math.imul(T,ea)|0,n=n+Math.imul(A,el)|0,i=(i=i+Math.imul(A,eu)|0)+Math.imul(I,el)|0,o=o+Math.imul(I,eu)|0,n=n+Math.imul(k,ec)|0,i=(i=i+Math.imul(k,ep)|0)+Math.imul(O,ec)|0,o=o+Math.imul(O,ep)|0;var eR=(u+(n=n+Math.imul(S,eh)|0)|0)+((8191&(i=(i=i+Math.imul(S,eg)|0)+Math.imul(w,eh)|0))<<13)|0;u=((o=o+Math.imul(w,eg)|0)+(i>>>13)|0)+(eR>>>26)|0,eR&=67108863,n=Math.imul(J,$),i=(i=Math.imul(J,ee))+Math.imul(j,$)|0,o=Math.imul(j,ee),n=n+Math.imul(M,er)|0,i=(i=i+Math.imul(M,en)|0)+Math.imul(D,er)|0,o=o+Math.imul(D,en)|0,n=n+Math.imul(x,eo)|0,i=(i=i+Math.imul(x,ea)|0)+Math.imul(B,eo)|0,o=o+Math.imul(B,ea)|0,n=n+Math.imul(E,el)|0,i=(i=i+Math.imul(E,eu)|0)+Math.imul(T,el)|0,o=o+Math.imul(T,eu)|0,n=n+Math.imul(A,ec)|0,i=(i=i+Math.imul(A,ep)|0)+Math.imul(I,ec)|0,o=o+Math.imul(I,ep)|0;var eE=(u+(n=n+Math.imul(k,eh)|0)|0)+((8191&(i=(i=i+Math.imul(k,eg)|0)+Math.imul(O,eh)|0))<<13)|0;u=((o=o+Math.imul(O,eg)|0)+(i>>>13)|0)+(eE>>>26)|0,eE&=67108863,n=Math.imul(J,er),i=(i=Math.imul(J,en))+Math.imul(j,er)|0,o=Math.imul(j,en),n=n+Math.imul(M,eo)|0,i=(i=i+Math.imul(M,ea)|0)+Math.imul(D,eo)|0,o=o+Math.imul(D,ea)|0,n=n+Math.imul(x,el)|0,i=(i=i+Math.imul(x,eu)|0)+Math.imul(B,el)|0,o=o+Math.imul(B,eu)|0,n=n+Math.imul(E,ec)|0,i=(i=i+Math.imul(E,ep)|0)+Math.imul(T,ec)|0,o=o+Math.imul(T,ep)|0;var eT=(u+(n=n+Math.imul(A,eh)|0)|0)+((8191&(i=(i=i+Math.imul(A,eg)|0)+Math.imul(I,eh)|0))<<13)|0;u=((o=o+Math.imul(I,eg)|0)+(i>>>13)|0)+(eT>>>26)|0,eT&=67108863,n=Math.imul(J,eo),i=(i=Math.imul(J,ea))+Math.imul(j,eo)|0,o=Math.imul(j,ea),n=n+Math.imul(M,el)|0,i=(i=i+Math.imul(M,eu)|0)+Math.imul(D,el)|0,o=o+Math.imul(D,eu)|0,n=n+Math.imul(x,ec)|0,i=(i=i+Math.imul(x,ep)|0)+Math.imul(B,ec)|0,o=o+Math.imul(B,ep)|0;var eN=(u+(n=n+Math.imul(E,eh)|0)|0)+((8191&(i=(i=i+Math.imul(E,eg)|0)+Math.imul(T,eh)|0))<<13)|0;u=((o=o+Math.imul(T,eg)|0)+(i>>>13)|0)+(eN>>>26)|0,eN&=67108863,n=Math.imul(J,el),i=(i=Math.imul(J,eu))+Math.imul(j,el)|0,o=Math.imul(j,eu),n=n+Math.imul(M,ec)|0,i=(i=i+Math.imul(M,ep)|0)+Math.imul(D,ec)|0,o=o+Math.imul(D,ep)|0;var ex=(u+(n=n+Math.imul(x,eh)|0)|0)+((8191&(i=(i=i+Math.imul(x,eg)|0)+Math.imul(B,eh)|0))<<13)|0;u=((o=o+Math.imul(B,eg)|0)+(i>>>13)|0)+(ex>>>26)|0,ex&=67108863,n=Math.imul(J,ec),i=(i=Math.imul(J,ep))+Math.imul(j,ec)|0,o=Math.imul(j,ep);var eB=(u+(n=n+Math.imul(M,eh)|0)|0)+((8191&(i=(i=i+Math.imul(M,eg)|0)+Math.imul(D,eh)|0))<<13)|0;u=((o=o+Math.imul(D,eg)|0)+(i>>>13)|0)+(eB>>>26)|0,eB&=67108863;var eC=(u+(n=Math.imul(J,eh))|0)+((8191&(i=(i=Math.imul(J,eg))+Math.imul(j,eh)|0))<<13)|0;return u=((o=Math.imul(j,eg))+(i>>>13)|0)+(eC>>>26)|0,eC&=67108863,l[0]=em,l[1]=ey,l[2]=ev,l[3]=eb,l[4]=eS,l[5]=ew,l[6]=e_,l[7]=ek,l[8]=eO,l[9]=eP,l[10]=eA,l[11]=eI,l[12]=eR,l[13]=eE,l[14]=eT,l[15]=eN,l[16]=ex,l[17]=eB,l[18]=eC,0!==u&&(l[19]=u,r.length++),r};function m(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}function y(e,t,r){return new v().mulp(e,t,r)}function v(e,t){this.x=e,this.y=t}Math.imul||(g=h),o.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?g(this,e,t):r<63?h(this,e,t):r<1024?m(this,e,t):y(this,e,t)},v.prototype.makeRBT=function(e){for(var t=Array(e),r=o.prototype._countBits(e)-1,n=0;n>=1;return n},v.prototype.permute=function(e,t,r,n,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*t;a>=26,t+=(i/67108864|0)+(o>>>26),this.words[r]=67108863&o}return 0!==t&&(this.words[r]=t,this.length++),this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=f(e);if(0===t.length)return new o(1);for(var r=this,n=0;n=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(t=0;t>>26-r}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var i,o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,u=0;u=0&&(0!==d||u>=i);u--){var c=0|this.words[u];this.words[u]=d<<26-o|c>>>o,d=c&s}return l&&0!==d&&(l.words[l.length++]=d),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(l/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(e,t){var r,n=this.length-e.length,i=this.clone(),a=e,s=0|a.words[a.length-1];0!=(n=26-this._countBits(s))&&(a=a.ushln(n),i.iushln(n),s=0|a.words[a.length-1]);var l=i.length-a.length;if("mod"!==t){(r=new o(null)).length=l+1,r.words=Array(r.length);for(var u=0;u=0;c--){var p=(0|i.words[a.length+c])*67108864+(0|i.words[a.length+c-1]);for(p=Math.min(p/s|0,67108863),i._ishlnsubmul(a,p,c);0!==i.negative;)p--,i.negative=0,i._ishlnsubmul(a,1,c),i.isZero()||(i.negative^=1);r&&(r.words[c]=p)}return r&&r.strip(),i.strip(),"div"!==t&&0!==n&&i.iushrn(n),{div:r||null,mod:i}},o.prototype.divmod=function(e,t,r){var i,a,s;return(n(!e.isZero()),this.isZero())?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(e)),{div:i,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):(this.negative&e.negative)!=0?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||0>this.cmp(e)?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modn(e.words[0]))}:this._wordDiv(e,t)},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modn=function(e){n(e<=67108863);for(var t=67108864%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},o.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),a=new o(0),s=new o(0),l=new o(1),u=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++u;for(var d=r.clone(),c=t.clone();!t.isZero();){for(var p=0,f=1;(t.words[0]&f)==0&&p<26;++p,f<<=1);if(p>0)for(t.iushrn(p);p-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(d),a.isub(c)),i.iushrn(1),a.iushrn(1);for(var h=0,g=1;(r.words[0]&g)==0&&h<26;++h,g<<=1);if(h>0)for(r.iushrn(h);h-- >0;)(s.isOdd()||l.isOdd())&&(s.iadd(d),l.isub(c)),s.iushrn(1),l.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(s),a.isub(l)):(r.isub(t),s.isub(i),l.isub(a))}return{a:s,b:l,gcd:r.iushln(u)}},o.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t,r=this,i=e.clone();r=0!==r.negative?r.umod(e):r.clone();for(var a=new o(1),s=new o(0),l=i.clone();r.cmpn(1)>0&&i.cmpn(1)>0;){for(var u=0,d=1;(r.words[0]&d)==0&&u<26;++u,d<<=1);if(u>0)for(r.iushrn(u);u-- >0;)a.isOdd()&&a.iadd(l),a.iushrn(1);for(var c=0,p=1;(i.words[0]&p)==0&&c<26;++c,p<<=1);if(c>0)for(i.iushrn(c);c-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);r.cmp(i)>=0?(r.isub(i),a.isub(s)):(i.isub(r),s.isub(a))}return 0>(t=0===r.cmpn(1)?a:s).cmpn(0)&&t.iadd(e),t},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return(1&this.words[0])==0},o.prototype.isOdd=function(){return(1&this.words[0])==1},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return -1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:ie.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){ni&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return -1===this.cmpn(e)},o.prototype.lt=function(e){return -1===this.cmp(e)},o.prototype.lten=function(e){return 0>=this.cmpn(e)},o.prototype.lte=function(e){return 0>=this.cmp(e)},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new P(e)},o.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var b={k256:null,p224:null,p192:null,p25519:null};function S(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function w(){S.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function _(){S.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function k(){S.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function O(){S.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function P(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function A(e){P.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}S.prototype._tmp=function(){var e=new o(null);return e.words=Array(Math.ceil(this.n/13)),e},S.prototype.ireduce=function(e){var t,r=e;do this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength();while(t>this.n);var n=t0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},S.prototype.split=function(e,t){e.iushrn(this.n,0,t)},S.prototype.imulK=function(e){return e.imul(this.k)},i(w,S),w.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i>>22,o=a}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},w.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){var t;if(b[e])return b[e];if("k256"===e)t=new w;else if("p224"===e)t=new _;else if("p192"===e)t=new k;else if("p25519"===e)t=new O;else throw Error("Unknown prime "+e);return b[e]=t,t},P.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},P.prototype._verify2=function(e,t){n((e.negative|t.negative)==0,"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},P.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},P.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},P.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},P.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},P.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return 0>r.cmpn(0)&&r.iadd(this.m),r._forceRed(this)},P.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return 0>r.cmpn(0)&&r.iadd(this.m),r},P.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},P.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},P.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},P.prototype.isqr=function(e){return this.imul(e,e.clone())},P.prototype.sqr=function(e){return this.mul(e,e)},P.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),l=s.redNeg(),u=this.m.subn(1).iushrn(1),d=this.m.bitLength();for(d=new o(2*d*d).toRed(this);0!==this.pow(d,u).cmp(l);)d.redIAdd(l);for(var c=this.pow(d,i),p=this.pow(e,i.addn(1).iushrn(1)),f=this.pow(e,i),h=a;0!==f.cmp(s);){for(var g=f,m=0;0!==g.cmp(s);m++)g=g.redSqr();n(m=0;i--){for(var d=t.words[i],c=u-1;c>=0;c--){var p=d>>c&1;if(a!==n[0]&&(a=this.sqr(a)),0===p&&0===s){l=0;continue}s<<=1,s|=p,(++l===r||0===i&&0===c)&&(a=this.mul(a,n[s]),l=0,s=0)}u=26}return a},P.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},P.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new A(e)},i(A,P),A.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},A.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},A.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):0>i.cmpn(0)&&(o=i.iadd(this.m)),o._forceRed(this)},A.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):0>i.cmpn(0)&&(a=i.iadd(this.m)),a._forceRed(this)},A.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},73266:function(e,t,r){"use strict";var n=r(57569)("%Object.defineProperty%",!0)||!1;if(n)try{n({},"a",{value:1})}catch(e){n=!1}e.exports=n},35034:function(e){"use strict";e.exports=EvalError},13821:function(e){"use strict";e.exports=Error},54899:function(e){"use strict";e.exports=RangeError},67267:function(e){"use strict";e.exports=ReferenceError},71587:function(e){"use strict";e.exports=SyntaxError},7797:function(e){"use strict";e.exports=TypeError},40273:function(e){"use strict";e.exports=URIError},70094:function(e){"use strict";var t,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};function i(e){console&&console.warn&&console.warn(e)}t=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var o=Number.isNaN||function(e){return e!=e};function a(){a.init.call(this)}e.exports=a,e.exports.once=v,a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var s=10;function l(e){if("function"!=typeof e)throw TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function u(e){return void 0===e._maxListeners?a.defaultMaxListeners:e._maxListeners}function d(e,t,r,n){if(l(r),void 0===(a=e._events)?(a=e._events=Object.create(null),e._eventsCount=0):(void 0!==a.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),a=e._events),s=a[t]),void 0===s)s=a[t]=r,++e._eventsCount;else if("function"==typeof s?s=a[t]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(o=u(e))>0&&s.length>o&&!s.warned){s.warned=!0;var o,a,s,d=Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");d.name="MaxListenersExceededWarning",d.emitter=e,d.type=t,d.count=s.length,i(d)}return e}function c(){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 p(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=c.bind(n);return i.listener=r,n.wrapFn=i,i}function f(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?y(i):g(i,i.length)}function h(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function g(e,t){for(var r=Array(t),n=0;n0&&(a=t[0]),a instanceof Error)throw a;var a,s=Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var l=o[e];if(void 0===l)return!1;if("function"==typeof l)n(l,this,t);else for(var u=l.length,d=g(l,u),r=0;r=0;o--)if(r[o]===t||r[o].listener===t){a=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():m(r,i),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,a||t)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0==arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0==arguments.length){var i,o=Object.keys(r);for(n=0;n=0;n--)this.removeListener(e,t[n]);return this},a.prototype.listeners=function(e){return f(this,e,!0)},a.prototype.rawListeners=function(e){return f(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):h.call(e,t)},a.prototype.listenerCount=h,a.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},58634:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",r=Object.prototype.toString,n=Math.max,i="[object Function]",o=function(e,t){for(var r=[],n=0;n1&&"boolean"!=typeof t)throw new u('"allowMissing" argument must be a boolean');if(null===N(/^%?[^%]*%?$/,e))throw new l("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=C(e),n=r.length>0?r[0]:"",i=M("%"+n+"%",t),o=i.name,a=i.value,s=!1,d=i.alias;d&&(n=d[0],R(r,I([0,1],d)));for(var c=1,p=!0;c=r.length){var y=f(a,h);a=(p=!!y)&&"get"in y&&!("originalValue"in y.get)?y.get:a[h]}else p=A(a,h),a=a[h];p&&!s&&(w[o]=a)}}return a}},6520:function(e){"use strict";"undefined"!=typeof self?e.exports=self:e.exports=window},224:function(e,t,r){"use strict";var n=r(96981),i=r(6520),o=r(90060),a=r(11953),s=o(),l=function(){return s};n(l,{getPolyfill:o,implementation:i,shim:a}),e.exports=l},90060:function(e,t,r){"use strict";var n=r(6520);e.exports=function(){return"object"==typeof r.g&&r.g&&r.g.Math===Math&&r.g.Array===Array?r.g:n}},11953:function(e,t,r){"use strict";var n=r(96981),i=r(90060);e.exports=function(){var e=i();if(n.supportsDescriptors){var t=Object.getOwnPropertyDescriptor(e,"globalThis");(!t||t.configurable&&(t.enumerable||!t.writable||globalThis!==e))&&Object.defineProperty(e,"globalThis",{configurable:!0,enumerable:!1,value:e,writable:!0})}else("object"!=typeof globalThis||globalThis!==e)&&(e.globalThis=e);return e}},42574:function(e,t,r){"use strict";var n=r(57569)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(e){n=null}e.exports=n},77729:function(e,t,r){"use strict";r.d(t,{Ps:function(){return eo}});var n,i,o=r(69703);function a(e){return"object"==typeof e&&null!==e}function s(e,t){if(!e)throw Error(null!=t?t:"Unexpected invariant triggered.")}let l=/\r\n|[\n\r]/g;function u(e,t){let r=0,n=1;for(let i of e.body.matchAll(l)){if("number"==typeof i.index||s(!1),i.index>=t)break;r=i.index+i[0].length,n+=1}return{line:n,column:t+1-r}}function d(e){return c(e.source,u(e.source,e.start))}function c(e,t){let r=e.locationOffset.column-1,n="".padStart(r)+e.body,i=t.line-1,o=e.locationOffset.line-1,a=t.line+o,s=1===t.line?r:0,l=t.column+s,u="".concat(e.name,":").concat(a,":").concat(l,"\n"),d=n.split(/\r\n|[\n\r]/g),c=d[i];if(c.length>120){let e=Math.floor(l/80),t=l%80,r=[];for(let e=0;e["|",e]),["|","^".padStart(t)],["|",r[e+1]]])}return u+p([["".concat(a-1," |"),d[i-1]],["".concat(a," |"),c],["|","^".padStart(l)],["".concat(a+1," |"),d[i+1]]])}function p(e){let t=e.filter(e=>{let[t,r]=e;return void 0!==r}),r=Math.max(...t.map(e=>{let[t]=e;return t.length}));return t.map(e=>{let[t,n]=e;return t.padStart(r)+(n?" "+n:"")}).join("\n")}function f(e){let t=e[0];return null==t||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}class h extends Error{get[Symbol.toStringTag](){return"GraphQLError"}toString(){let e=this.message;if(this.nodes)for(let t of this.nodes)t.loc&&(e+="\n\n"+d(t.loc));else if(this.source&&this.locations)for(let t of this.locations)e+="\n\n"+c(this.source,t);return e}toJSON(){let e={message:this.message};return null!=this.locations&&(e.locations=this.locations),null!=this.path&&(e.path=this.path),null!=this.extensions&&Object.keys(this.extensions).length>0&&(e.extensions=this.extensions),e}constructor(e,...t){var r,n,i;let{nodes:o,source:s,positions:l,path:d,originalError:c,extensions:p}=f(t);super(e),this.name="GraphQLError",this.path=null!=d?d:void 0,this.originalError=null!=c?c:void 0,this.nodes=g(Array.isArray(o)?o:o?[o]:void 0);let m=g(null===(r=this.nodes)||void 0===r?void 0:r.map(e=>e.loc).filter(e=>null!=e));this.source=null!=s?s:null==m?void 0:null===(n=m[0])||void 0===n?void 0:n.source,this.positions=null!=l?l:null==m?void 0:m.map(e=>e.start),this.locations=l&&s?l.map(e=>u(s,e)):null==m?void 0:m.map(e=>u(e.source,e.start));let y=a(null==c?void 0:c.extensions)?null==c?void 0:c.extensions:void 0;this.extensions=null!==(i=null!=p?p:y)&&void 0!==i?i:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),null!=c&&c.stack?Object.defineProperty(this,"stack",{value:c.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,h):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}}function g(e){return void 0===e||0===e.length?void 0:e}function m(e,t,r){return new h("Syntax Error: ".concat(r),{source:e,positions:[t]})}var y=r(68246);!function(e){e.QUERY="QUERY",e.MUTATION="MUTATION",e.SUBSCRIPTION="SUBSCRIPTION",e.FIELD="FIELD",e.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",e.FRAGMENT_SPREAD="FRAGMENT_SPREAD",e.INLINE_FRAGMENT="INLINE_FRAGMENT",e.VARIABLE_DEFINITION="VARIABLE_DEFINITION",e.SCHEMA="SCHEMA",e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.FIELD_DEFINITION="FIELD_DEFINITION",e.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.ENUM_VALUE="ENUM_VALUE",e.INPUT_OBJECT="INPUT_OBJECT",e.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"}(n||(n={}));var v=r(11258),b=r(58549),S=r(1357);!function(e){e.SOF="",e.EOF="",e.BANG="!",e.DOLLAR="$",e.AMP="&",e.PAREN_L="(",e.PAREN_R=")",e.SPREAD="...",e.COLON=":",e.EQUALS="=",e.AT="@",e.BRACKET_L="[",e.BRACKET_R="]",e.BRACE_L="{",e.PIPE="|",e.BRACE_R="}",e.NAME="Name",e.INT="Int",e.FLOAT="Float",e.STRING="String",e.BLOCK_STRING="BlockString",e.COMMENT="Comment"}(i||(i={}));class w{get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let e=this.token;if(e.kind!==i.EOF)do if(e.next)e=e.next;else{let t=E(this,e.end);e.next=t,t.prev=e,e=t}while(e.kind===i.COMMENT);return e}constructor(e){let t=new y.WU(i.SOF,0,0,0,0);this.source=e,this.lastToken=t,this.token=t,this.line=1,this.lineStart=0}}function _(e){return e===i.BANG||e===i.DOLLAR||e===i.AMP||e===i.PAREN_L||e===i.PAREN_R||e===i.SPREAD||e===i.COLON||e===i.EQUALS||e===i.AT||e===i.BRACKET_L||e===i.BRACKET_R||e===i.BRACE_L||e===i.PIPE||e===i.BRACE_R}function k(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function O(e,t){return P(e.charCodeAt(t))&&A(e.charCodeAt(t+1))}function P(e){return e>=55296&&e<=56319}function A(e){return e>=56320&&e<=57343}function I(e,t){let r=e.source.body.codePointAt(t);if(void 0===r)return i.EOF;if(r>=32&&r<=126){let e=String.fromCodePoint(r);return'"'===e?"'\"'":'"'.concat(e,'"')}return"U+"+r.toString(16).toUpperCase().padStart(4,"0")}function R(e,t,r,n,i){let o=e.line,a=1+r-e.lineStart;return new y.WU(t,r,n,o,a,i)}function E(e,t){let r=e.source.body,n=r.length,o=t;for(;o=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function J(e,t){let r=e.source.body;switch(r.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:"\n",size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw m(e.source,t,'Invalid character escape sequence: "'.concat(r.slice(t,t+2),'".'))}function j(e,t){let r=e.source.body,n=r.length,o=e.lineStart,a=t+3,s=a,l="",u=[];for(;a0||(0,q.a)(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||(0,q.a)(!1,"column in locationOffset is 1-indexed and must be positive.")}}function W(e){return F(e,V)}function z(e,t){return new G(e,t).parseDocument()}class G{parseName(){let e=this.expectToken(i.NAME);return this.node(e,{kind:v.h.NAME,value:e.value})}parseDocument(){return this.node(this._lexer.token,{kind:v.h.DOCUMENT,definitions:this.many(i.SOF,this.parseDefinition,i.EOF)})}parseDefinition(){if(this.peek(i.BRACE_L))return this.parseOperationDefinition();let e=this.peekDescription(),t=e?this._lexer.lookahead():this._lexer.token;if(t.kind===i.NAME){switch(t.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}if(e)throw m(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(t.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(t)}parseOperationDefinition(){let e;let t=this._lexer.token;if(this.peek(i.BRACE_L))return this.node(t,{kind:v.h.OPERATION_DEFINITION,operation:y.ku.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});let r=this.parseOperationType();return this.peek(i.NAME)&&(e=this.parseName()),this.node(t,{kind:v.h.OPERATION_DEFINITION,operation:r,name:e,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){let e=this.expectToken(i.NAME);switch(e.value){case"query":return y.ku.QUERY;case"mutation":return y.ku.MUTATION;case"subscription":return y.ku.SUBSCRIPTION}throw this.unexpected(e)}parseVariableDefinitions(){return this.optionalMany(i.PAREN_L,this.parseVariableDefinition,i.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:v.h.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(i.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(i.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let e=this._lexer.token;return this.expectToken(i.DOLLAR),this.node(e,{kind:v.h.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:v.h.SELECTION_SET,selections:this.many(i.BRACE_L,this.parseSelection,i.BRACE_R)})}parseSelection(){return this.peek(i.SPREAD)?this.parseFragment():this.parseField()}parseField(){let e,t;let r=this._lexer.token,n=this.parseName();return this.expectOptionalToken(i.COLON)?(e=n,t=this.parseName()):t=n,this.node(r,{kind:v.h.FIELD,alias:e,name:t,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(i.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(e){let t=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(i.PAREN_L,t,i.PAREN_R)}parseArgument(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this._lexer.token,r=this.parseName();return this.expectToken(i.COLON),this.node(t,{kind:v.h.ARGUMENT,name:r,value:this.parseValueLiteral(e)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){let e=this._lexer.token;this.expectToken(i.SPREAD);let t=this.expectOptionalKeyword("on");return!t&&this.peek(i.NAME)?this.node(e,{kind:v.h.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(e,{kind:v.h.INLINE_FRAGMENT,typeCondition:t?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){let e=this._lexer.token;return(this.expectKeyword("fragment"),!0===this._options.allowLegacyFragmentVariables)?this.node(e,{kind:v.h.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(e,{kind:v.h.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if("on"===this._lexer.token.value)throw this.unexpected();return this.parseName()}parseValueLiteral(e){let t=this._lexer.token;switch(t.kind){case i.BRACKET_L:return this.parseList(e);case i.BRACE_L:return this.parseObject(e);case i.INT:return this.advanceLexer(),this.node(t,{kind:v.h.INT,value:t.value});case i.FLOAT:return this.advanceLexer(),this.node(t,{kind:v.h.FLOAT,value:t.value});case i.STRING:case i.BLOCK_STRING:return this.parseStringLiteral();case i.NAME:switch(this.advanceLexer(),t.value){case"true":return this.node(t,{kind:v.h.BOOLEAN,value:!0});case"false":return this.node(t,{kind:v.h.BOOLEAN,value:!1});case"null":return this.node(t,{kind:v.h.NULL});default:return this.node(t,{kind:v.h.ENUM,value:t.value})}case i.DOLLAR:if(e){if(this.expectToken(i.DOLLAR),this._lexer.token.kind===i.NAME){let e=this._lexer.token.value;throw m(this._lexer.source,t.start,'Unexpected variable "$'.concat(e,'" in constant value.'))}throw this.unexpected(t)}return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){let e=this._lexer.token;return this.advanceLexer(),this.node(e,{kind:v.h.STRING,value:e.value,block:e.kind===i.BLOCK_STRING})}parseList(e){let t=()=>this.parseValueLiteral(e);return this.node(this._lexer.token,{kind:v.h.LIST,values:this.any(i.BRACKET_L,t,i.BRACKET_R)})}parseObject(e){let t=()=>this.parseObjectField(e);return this.node(this._lexer.token,{kind:v.h.OBJECT,fields:this.any(i.BRACE_L,t,i.BRACE_R)})}parseObjectField(e){let t=this._lexer.token,r=this.parseName();return this.expectToken(i.COLON),this.node(t,{kind:v.h.OBJECT_FIELD,name:r,value:this.parseValueLiteral(e)})}parseDirectives(e){let t=[];for(;this.peek(i.AT);)t.push(this.parseDirective(e));return t}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(e){let t=this._lexer.token;return this.expectToken(i.AT),this.node(t,{kind:v.h.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e)})}parseTypeReference(){let e;let t=this._lexer.token;if(this.expectOptionalToken(i.BRACKET_L)){let r=this.parseTypeReference();this.expectToken(i.BRACKET_R),e=this.node(t,{kind:v.h.LIST_TYPE,type:r})}else e=this.parseNamedType();return this.expectOptionalToken(i.BANG)?this.node(t,{kind:v.h.NON_NULL_TYPE,type:e}):e}parseNamedType(){return this.node(this._lexer.token,{kind:v.h.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(i.STRING)||this.peek(i.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("schema");let r=this.parseConstDirectives(),n=this.many(i.BRACE_L,this.parseOperationTypeDefinition,i.BRACE_R);return this.node(e,{kind:v.h.SCHEMA_DEFINITION,description:t,directives:r,operationTypes:n})}parseOperationTypeDefinition(){let e=this._lexer.token,t=this.parseOperationType();this.expectToken(i.COLON);let r=this.parseNamedType();return this.node(e,{kind:v.h.OPERATION_TYPE_DEFINITION,operation:t,type:r})}parseScalarTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");let r=this.parseName(),n=this.parseConstDirectives();return this.node(e,{kind:v.h.SCALAR_TYPE_DEFINITION,description:t,name:r,directives:n})}parseObjectTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");let r=this.parseName(),n=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(e,{kind:v.h.OBJECT_TYPE_DEFINITION,description:t,name:r,interfaces:n,directives:i,fields:o})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(i.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(i.BRACE_L,this.parseFieldDefinition,i.BRACE_R)}parseFieldDefinition(){let e=this._lexer.token,t=this.parseDescription(),r=this.parseName(),n=this.parseArgumentDefs();this.expectToken(i.COLON);let o=this.parseTypeReference(),a=this.parseConstDirectives();return this.node(e,{kind:v.h.FIELD_DEFINITION,description:t,name:r,arguments:n,type:o,directives:a})}parseArgumentDefs(){return this.optionalMany(i.PAREN_L,this.parseInputValueDef,i.PAREN_R)}parseInputValueDef(){let e;let t=this._lexer.token,r=this.parseDescription(),n=this.parseName();this.expectToken(i.COLON);let o=this.parseTypeReference();this.expectOptionalToken(i.EQUALS)&&(e=this.parseConstValueLiteral());let a=this.parseConstDirectives();return this.node(t,{kind:v.h.INPUT_VALUE_DEFINITION,description:r,name:n,type:o,defaultValue:e,directives:a})}parseInterfaceTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");let r=this.parseName(),n=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(e,{kind:v.h.INTERFACE_TYPE_DEFINITION,description:t,name:r,interfaces:n,directives:i,fields:o})}parseUnionTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");let r=this.parseName(),n=this.parseConstDirectives(),i=this.parseUnionMemberTypes();return this.node(e,{kind:v.h.UNION_TYPE_DEFINITION,description:t,name:r,directives:n,types:i})}parseUnionMemberTypes(){return this.expectOptionalToken(i.EQUALS)?this.delimitedMany(i.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");let r=this.parseName(),n=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();return this.node(e,{kind:v.h.ENUM_TYPE_DEFINITION,description:t,name:r,directives:n,values:i})}parseEnumValuesDefinition(){return this.optionalMany(i.BRACE_L,this.parseEnumValueDefinition,i.BRACE_R)}parseEnumValueDefinition(){let e=this._lexer.token,t=this.parseDescription(),r=this.parseEnumValueName(),n=this.parseConstDirectives();return this.node(e,{kind:v.h.ENUM_VALUE_DEFINITION,description:t,name:r,directives:n})}parseEnumValueName(){if("true"===this._lexer.token.value||"false"===this._lexer.token.value||"null"===this._lexer.token.value)throw m(this._lexer.source,this._lexer.token.start,"".concat(Q(this._lexer.token)," is reserved and cannot be used for an enum value."));return this.parseName()}parseInputObjectTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");let r=this.parseName(),n=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();return this.node(e,{kind:v.h.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:r,directives:n,fields:i})}parseInputFieldsDefinition(){return this.optionalMany(i.BRACE_L,this.parseInputValueDef,i.BRACE_R)}parseTypeSystemExtension(){let e=this._lexer.lookahead();if(e.kind===i.NAME)switch(e.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(e)}parseSchemaExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");let t=this.parseConstDirectives(),r=this.optionalMany(i.BRACE_L,this.parseOperationTypeDefinition,i.BRACE_R);if(0===t.length&&0===r.length)throw this.unexpected();return this.node(e,{kind:v.h.SCHEMA_EXTENSION,directives:t,operationTypes:r})}parseScalarTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");let t=this.parseName(),r=this.parseConstDirectives();if(0===r.length)throw this.unexpected();return this.node(e,{kind:v.h.SCALAR_TYPE_EXTENSION,name:t,directives:r})}parseObjectTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");let t=this.parseName(),r=this.parseImplementsInterfaces(),n=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(0===r.length&&0===n.length&&0===i.length)throw this.unexpected();return this.node(e,{kind:v.h.OBJECT_TYPE_EXTENSION,name:t,interfaces:r,directives:n,fields:i})}parseInterfaceTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");let t=this.parseName(),r=this.parseImplementsInterfaces(),n=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(0===r.length&&0===n.length&&0===i.length)throw this.unexpected();return this.node(e,{kind:v.h.INTERFACE_TYPE_EXTENSION,name:t,interfaces:r,directives:n,fields:i})}parseUnionTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");let t=this.parseName(),r=this.parseConstDirectives(),n=this.parseUnionMemberTypes();if(0===r.length&&0===n.length)throw this.unexpected();return this.node(e,{kind:v.h.UNION_TYPE_EXTENSION,name:t,directives:r,types:n})}parseEnumTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");let t=this.parseName(),r=this.parseConstDirectives(),n=this.parseEnumValuesDefinition();if(0===r.length&&0===n.length)throw this.unexpected();return this.node(e,{kind:v.h.ENUM_TYPE_EXTENSION,name:t,directives:r,values:n})}parseInputObjectTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");let t=this.parseName(),r=this.parseConstDirectives(),n=this.parseInputFieldsDefinition();if(0===r.length&&0===n.length)throw this.unexpected();return this.node(e,{kind:v.h.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:r,fields:n})}parseDirectiveDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(i.AT);let r=this.parseName(),n=this.parseArgumentDefs(),o=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");let a=this.parseDirectiveLocations();return this.node(e,{kind:v.h.DIRECTIVE_DEFINITION,description:t,name:r,arguments:n,repeatable:o,locations:a})}parseDirectiveLocations(){return this.delimitedMany(i.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){let e=this._lexer.token,t=this.parseName();if(Object.prototype.hasOwnProperty.call(n,t.value))return t;throw this.unexpected(e)}node(e,t){return!0!==this._options.noLocation&&(t.loc=new y.Ye(e,this._lexer.lastToken,this._lexer.source)),t}peek(e){return this._lexer.token.kind===e}expectToken(e){let t=this._lexer.token;if(t.kind===e)return this.advanceLexer(),t;throw m(this._lexer.source,t.start,"Expected ".concat(K(e),", found ").concat(Q(t),"."))}expectOptionalToken(e){return this._lexer.token.kind===e&&(this.advanceLexer(),!0)}expectKeyword(e){let t=this._lexer.token;if(t.kind===i.NAME&&t.value===e)this.advanceLexer();else throw m(this._lexer.source,t.start,'Expected "'.concat(e,'", found ').concat(Q(t),"."))}expectOptionalKeyword(e){let t=this._lexer.token;return t.kind===i.NAME&&t.value===e&&(this.advanceLexer(),!0)}unexpected(e){let t=null!=e?e:this._lexer.token;return m(this._lexer.source,t.start,"Unexpected ".concat(Q(t),"."))}any(e,t,r){this.expectToken(e);let n=[];for(;!this.expectOptionalToken(r);)n.push(t.call(this));return n}optionalMany(e,t,r){if(this.expectOptionalToken(e)){let e=[];do e.push(t.call(this));while(!this.expectOptionalToken(r));return e}return[]}many(e,t,r){this.expectToken(e);let n=[];do n.push(t.call(this));while(!this.expectOptionalToken(r));return n}delimitedMany(e,t){this.expectOptionalToken(e);let r=[];do r.push(t.call(this));while(this.expectOptionalToken(e));return r}advanceLexer(){let{maxTokens:e}=this._options,t=this._lexer.advance();if(void 0!==e&&t.kind!==i.EOF&&(++this._tokenCounter,this._tokenCounter>e))throw m(this._lexer.source,t.start,"Document contains more that ".concat(e," tokens. Parsing aborted."))}constructor(e,t={}){let r=W(e)?e:new V(e);this._lexer=new w(r),this._options=t,this._tokenCounter=0}}function Q(e){let t=e.value;return K(e.kind)+(null!=t?' "'.concat(t,'"'):"")}function K(e){return _(e)?'"'.concat(e,'"'):e}var Y=new Map,Z=new Map,X=!0,$=!1;function ee(e){return e.replace(/[\s,]+/g," ").trim()}function et(e){return ee(e.source.body.substring(e.start,e.end))}function er(e){var t=new Set,r=[];return e.definitions.forEach(function(e){if("FragmentDefinition"===e.kind){var n=e.name.value,i=et(e.loc),o=Z.get(n);o&&!o.has(i)?X&&console.warn("Warning: fragment with name "+n+" already exists.\ngraphql-tag enforces all fragment names across your application to be unique; read more about\nthis in the docs: http://dev.apollodata.com/core/fragments.html#unique-names"):o||Z.set(n,o=new Set),o.add(i),t.has(i)||(t.add(i),r.push(e))}else r.push(e)}),(0,o.pi)((0,o.pi)({},e),{definitions:r})}function en(e){var t=new Set(e.definitions);t.forEach(function(e){e.loc&&delete e.loc,Object.keys(e).forEach(function(r){var n=e[r];n&&"object"==typeof n&&t.add(n)})});var r=e.loc;return r&&(delete r.startToken,delete r.endToken),e}function ei(e){var t=ee(e);if(!Y.has(t)){var r=z(e,{experimentalFragmentVariables:$,allowLegacyFragmentVariables:$});if(!r||"Document"!==r.kind)throw Error("Not a valid GraphQL document.");Y.set(t,en(er(r)))}return Y.get(t)}function eo(e){for(var t=[],r=1;r=this._blockSize;){for(var a=this._blockOffset;a0;++s)this._length[s]+=l,(l=this._length[s]/4294967296|0)>0&&(this._length[s]-=4294967296*l);return this},a.prototype._update=function(){throw Error("_update is not implemented")},a.prototype.digest=function(e){if(this._finalized)throw Error("Digest already called");this._finalized=!0;var t=this._digest();void 0!==e&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return t},a.prototype._digest=function(){throw Error("_digest is not implemented")},e.exports=a},34562:function(e){"use strict";function t(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var r={};function n(e,n,i){function o(e,t,r){return"string"==typeof n?n:n(e,t,r)}i||(i=Error);var a=function(e){function r(t,r,n){return e.call(this,o(t,r,n))||this}return t(r,e),r}(i);a.prototype.name=i.name,a.prototype.code=e,r[e]=a}function i(e,t){if(!Array.isArray(e))return"of ".concat(t," ").concat(String(e));var r=e.length;return(e=e.map(function(e){return String(e)}),r>2)?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}function o(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function a(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function s(e,t,r){return"number"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}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,r){if("string"==typeof t&&o(t,"not ")?(n="must not be",t=t.replace(/^not /,"")):n="must be",a(e," argument"))l="The ".concat(e," ").concat(n," ").concat(i(t,"type"));else{var n,l,u=s(e,".")?"property":"argument";l='The "'.concat(e,'" ').concat(u," ").concat(n," ").concat(i(t,"type"))}return l+". Received type ".concat(typeof r)},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.q=r},85992:function(e,t,r){"use strict";var n=r(49079),i=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=d;var o=r(3497),a=r(80838);r(39541)(d,o);for(var s=i(a.prototype),l=0;l0){if("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===c.prototype||(t=f(t)),n)s.endEmitted?O(e,new k):T(e,s,t,!0);else if(s.ended)O(e,new w);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(t=s.decoder.write(t),s.objectMode||0!==t.length?T(e,s,t,!1):J(e,s)):T(e,s,t,!1)}}else n||(s.reading=!1,J(e,s));return!s.ended&&(s.length=x?e=x:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function C(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=B(e)),e<=t.length)?e:t.ended?t.length:(t.needReadable=!0,0)}function M(e,t){if(i("onEofChunk"),!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?D(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,U(e)))}}function D(e){var t=e._readableState;i("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(i("emitReadable",t.flowing),t.emittedReadable=!0,l.nextTick(U,e))}function U(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,W(e)}function J(e,t){t.readingMore||(t.readingMore=!0,l.nextTick(j,e,t))}function j(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function L(e){i("readable nexttick read 0"),e.read(0)}function F(e,t){t.resumeScheduled||(t.resumeScheduled=!0,l.nextTick(V,e,t))}function V(e,t){i("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),W(e),t.flowing&&!t.reading&&e.read(0)}function W(e){var t=e._readableState;for(i("flow",t.flowing);t.flowing&&null!==e.read(););}function z(e,t){var r;return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r)}function G(e){var t=e._readableState;i("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,l.nextTick(Q,t,e))}function Q(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 r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function K(e,t){for(var r=0,n=e.length;r=r.highWaterMark:r.length>0)||r.ended))return i("read: emitReadable",r.length,r.ended),0===r.length&&r.ended?G(this):D(this),null;if(0===(e=C(e,r))&&r.ended)return 0===r.length&&G(this),null;var o=r.needReadable;return i("need readable",o),(0===r.length||r.length-e0?z(e,r):null)?(r.needReadable=r.length<=r.highWaterMark,e=0):(r.length-=e,r.awaitDrain=0),0===r.length&&(r.ended||(r.needReadable=!0),n!==e&&r.ended&&G(this)),null!==t&&this.emit("data",t),t},R.prototype._read=function(e){O(this,new _("_read()"))},R.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e)}n.pipesCount+=1,i("pipe count=%d opts=%j",n.pipesCount,t);var o=t&&!1===t.end||e===l.stdout||e===l.stderr?y:s;function a(e,t){i("onunpipe"),e===r&&t&&!1===t.hasUnpiped&&(t.hasUnpiped=!0,p())}function s(){i("onend"),e.end()}n.endEmitted?l.nextTick(o):r.once("end",o),e.on("unpipe",a);var d=H(r);e.on("drain",d);var c=!1;function p(){i("cleanup"),e.removeListener("close",g),e.removeListener("finish",m),e.removeListener("drain",d),e.removeListener("error",h),e.removeListener("unpipe",a),r.removeListener("end",s),r.removeListener("end",y),r.removeListener("data",f),c=!0,n.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&d()}function f(t){i("ondata");var o=e.write(t);i("dest.write",o),!1===o&&((1===n.pipesCount&&n.pipes===e||n.pipesCount>1&&-1!==K(n.pipes,e))&&!c&&(i("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function h(t){i("onerror",t),y(),e.removeListener("error",h),0===u(e,"error")&&O(e,t)}function g(){e.removeListener("finish",m),y()}function m(){i("onfinish"),e.removeListener("close",g),y()}function y(){i("unpipe"),r.unpipe(e)}return r.on("data",f),A(e,"error",h),e.once("close",g),e.once("finish",m),e.emit("pipe",r),n.flowing||(i("pipe resume"),r.resume()),e},R.prototype.unpipe=function(e){var t=this._readableState,r={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,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o0,!1!==n.flowing&&this.resume()):"readable"!==e||n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,i("on readable",n.length,n.reading),n.length?D(this):n.reading||l.nextTick(L,this)),r},R.prototype.addListener=R.prototype.on,R.prototype.removeListener=function(e,t){var r=d.prototype.removeListener.call(this,e,t);return"readable"===e&&l.nextTick(q,this),r},R.prototype.removeAllListeners=function(e){var t=d.prototype.removeAllListeners.apply(this,arguments);return("readable"===e||void 0===e)&&l.nextTick(q,this),t},R.prototype.resume=function(){var e=this._readableState;return e.flowing||(i("resume"),e.flowing=!e.readableListening,F(this,e)),e.paused=!1,this},R.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},R.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var o in e.on("end",function(){if(i("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)}),e.on("data",function(o){i("wrapped data"),r.decoder&&(o=r.decoder.write(o)),(!r.objectMode||null!=o)&&(r.objectMode||o&&o.length)&&(t.push(o)||(n=!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-1))throw new k(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(I.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(I.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),I.prototype._write=function(e,t,r){r(new y("_write()"))},I.prototype._writev=null,I.prototype.end=function(e,t,r){var n=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||F(this,n,r),this},Object.defineProperty(I.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(I.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),I.prototype.destroy=f.destroy,I.prototype._undestroy=f.undestroy,I.prototype._destroy=function(e,t){t(e)}},79601:function(e,t,r){"use strict";var n,i=r(49079);function o(e,t,r){return(t=a(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e){var t=s(e,"string");return"symbol"==typeof t?t:String(t)}function s(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var l=r(7078),u=Symbol("lastResolve"),d=Symbol("lastReject"),c=Symbol("error"),p=Symbol("ended"),f=Symbol("lastPromise"),h=Symbol("handlePromise"),g=Symbol("stream");function m(e,t){return{value:e,done:t}}function y(e){var t=e[u];if(null!==t){var r=e[g].read();null!==r&&(e[f]=null,e[u]=null,e[d]=null,t(m(r,!1)))}}function v(e){i.nextTick(y,e)}function b(e,t){return function(r,n){e.then(function(){if(t[p]){r(m(void 0,!0));return}t[h](r,n)},n)}}var S=Object.getPrototypeOf(function(){}),w=Object.setPrototypeOf((o(n={get stream(){return this[g]},next:function(){var e,t=this,r=this[c];if(null!==r)return Promise.reject(r);if(this[p])return Promise.resolve(m(void 0,!0));if(this[g].destroyed)return new Promise(function(e,r){i.nextTick(function(){t[c]?r(t[c]):e(m(void 0,!0))})});var n=this[f];if(n)e=new Promise(b(n,this));else{var o=this[g].read();if(null!==o)return Promise.resolve(m(o,!1));e=new Promise(this[h])}return this[f]=e,e}},Symbol.asyncIterator,function(){return this}),o(n,"return",function(){var e=this;return new Promise(function(t,r){e[g].destroy(null,function(e){if(e){r(e);return}t(m(void 0,!0))})})}),n),S),_=function(e){var t,r=Object.create(w,(o(t={},g,{value:e,writable:!0}),o(t,u,{value:null,writable:!0}),o(t,d,{value:null,writable:!0}),o(t,c,{value:null,writable:!0}),o(t,p,{value:e._readableState.endEmitted,writable:!0}),o(t,h,{value:function(e,t){var n=r[g].read();n?(r[f]=null,r[u]=null,r[d]=null,e(m(n,!1))):(r[u]=e,r[d]=t)},writable:!0}),t));return r[f]=null,l(e,function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[d];null!==t&&(r[f]=null,r[u]=null,r[d]=null,t(e)),r[c]=e;return}var n=r[u];null!==n&&(r[f]=null,r[u]=null,r[d]=null,n(m(void 0,!0))),r[p]=!0}),e.on("readable",v.bind(null,r)),r};e.exports=_},43179:function(e,t,r){"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function i(e){for(var t=1;t0?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,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return c.alloc(0);for(var t=c.allocUnsafe(e>>>0),r=this.head,n=0;r;)h(r.data,t,n),n+=r.data.length,r=r.next;return t}},{key:"consume",value:function(e,t){var r;return ei.length?i.length:e;if(o===i.length?n+=i:n+=i.slice(0,e),0==(e-=o)){o===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=c.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var i=r.data,o=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,o),0==(e-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,t}},{key:f,value:function(e,t){return p(this,i(i({},t),{},{depth:0,customInspect:!1}))}}]),e}()},37877:function(e,t,r){"use strict";var n=r(49079);function i(e,t){var r=this,i=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return i||s?t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,n.nextTick(l,this,e)):n.nextTick(l,this,e)):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?r._writableState?r._writableState.errorEmitted?n.nextTick(a,r):(r._writableState.errorEmitted=!0,n.nextTick(o,r,e)):n.nextTick(o,r,e):t?(n.nextTick(a,r),t(e)):n.nextTick(a,r)})),this}function o(e,t){l(e,t),a(e)}function a(e){(!e._writableState||e._writableState.emitClose)&&(!e._readableState||e._readableState.emitClose)&&e.emit("close")}function s(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function l(e,t){e.emit("error",t)}function u(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}e.exports={destroy:i,undestroy:s,errorOrDestroy:u}},7078:function(e,t,r){"use strict";var n=r(34562).q.ERR_STREAM_PREMATURE_CLOSE;function i(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=Array(r),i=0;i0,function(t){e||(e=t),t&&o.forEach(c),a||(o.forEach(c),i(e))})});return r.reduce(p)}e.exports=h},34122:function(e,t,r){"use strict";var n=r(34562).q.ERR_INVALID_OPT_VALUE;function i(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}function o(e,t,r,o){var a=i(t,o,r);if(null!=a){if(!(isFinite(a)&&Math.floor(a)===a)||a<0)throw new n(o?r:"highWaterMark",a);return Math.floor(a)}return e.objectMode?16:16384}e.exports={getHighWaterMark:o}},82431:function(e,t,r){"use strict";e.exports=r(70094).EventEmitter},49515:function(e,t,r){"use strict";(t=e.exports=r(3497)).Stream=t,t.Readable=t,t.Writable=r(80838),t.Duplex=r(85992),t.Transform=r(95113),t.PassThrough=r(80089),t.finished=r(7078),t.pipeline=r(64336)},52689:function(e,t,r){var n=t;n.utils=r(34710),n.common=r(95553),n.sha=r(9216),n.ripemd=r(63932),n.hmac=r(28401),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},95553:function(e,t,r){"use strict";var n=r(34710),i=r(37074);function o(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}t.BlockHash=o,o.prototype.update=function(e,t){if(e=n.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var r=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=n.join32(e,0,e.length-r,this.endian);for(var i=0;i>>24&255,n[i++]=e>>>16&255,n[i++]=e>>>8&255,n[i++]=255&e}else for(o=8,n[i++]=255&e,n[i++]=e>>>8&255,n[i++]=e>>>16&255,n[i++]=e>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0;othis.blockSize&&(e=new this.Hash().update(e).digest()),i(e.length<=this.blockSize);for(var t=e.length;t>>3}function c(e){return n(e,17)^n(e,19)^e>>>10}t.ft_1=i,t.ch32=o,t.maj32=a,t.p32=s,t.s0_256=l,t.s1_256=u,t.g0_256=d,t.g1_256=c},34710:function(e,t,r){"use strict";var n=r(37074),i=r(39541);function o(e,t){return(64512&e.charCodeAt(t))==55296&&!(t<0)&&!(t+1>=e.length)&&(64512&e.charCodeAt(t+1))==56320}function a(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"==typeof e){if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/ig,"")).length%2!=0&&(e="0"+e),i=0;i>6|192:(o(e,i)?(a=65536+((1023&a)<<10)+(1023&e.charCodeAt(++i)),r[n++]=a>>18|240,r[n++]=a>>12&63|128):r[n++]=a>>12|224,r[n++]=a>>6&63|128),r[n++]=63&a|128)}}else for(i=0;i>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function u(e,t){for(var r="",n=0;n>>0;return s}function f(e,t){for(var r=Array(4*e.length),n=0,i=0;n>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r}function h(e,t){return e>>>t|e<<32-t}function g(e,t){return e<>>32-t}function m(e,t){return e+t>>>0}function y(e,t,r){return e+t+r>>>0}function v(e,t,r,n){return e+t+r+n>>>0}function b(e,t,r,n,i){return e+t+r+n+i>>>0}function S(e,t,r,n){var i=e[t],o=n+e[t+1]>>>0,a=(o>>0,e[t+1]=o}function w(e,t,r,n){return(t+n>>>0>>0}function _(e,t,r,n){return t+n>>>0}function k(e,t,r,n,i,o,a,s){var l,u=t;return e+r+i+a+(l=0+((u=u+n>>>0)>>0)>>0)>>0}function O(e,t,r,n,i,o,a,s){return t+n+o+s>>>0}function P(e,t,r,n,i,o,a,s,l,u){var d,c=t;return e+r+i+a+l+(d=0+((c=c+n>>>0)>>0)>>0)>>0)>>0}function A(e,t,r,n,i,o,a,s,l,u){return t+n+o+s+u>>>0}function I(e,t,r){return(t<<32-r|e>>>r)>>>0}function R(e,t,r){return(e<<32-r|t>>>r)>>>0}function E(e,t,r){return e>>>r}function T(e,t,r){return(e<<32-r|t>>>r)>>>0}t.inherits=i,t.toArray=a,t.toHex=s,t.htonl=l,t.toHex32=u,t.zero2=d,t.zero8=c,t.join32=p,t.split32=f,t.rotr32=h,t.rotl32=g,t.sum32=m,t.sum32_3=y,t.sum32_4=v,t.sum32_5=b,t.sum64=S,t.sum64_hi=w,t.sum64_lo=_,t.sum64_4_hi=k,t.sum64_4_lo=O,t.sum64_5_hi=P,t.sum64_5_lo=A,t.rotr64_hi=I,t.rotr64_lo=R,t.shr64_hi=E,t.shr64_lo=T},96215:function(e,t,r){"use strict";var n=Function.prototype.call,i=Object.prototype.hasOwnProperty,o=r(60642);e.exports=o.call(n,i)},36418:function(e,t,r){"use strict";var n=r(52689),i=r(61556),o=r(37074);function a(e){if(!(this instanceof a))return new a(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=i.toArray(e.entropy,e.entropyEnc||"hex"),r=i.toArray(e.nonce,e.nonceEnc||"hex"),n=i.toArray(e.pers,e.persEnc||"hex");o(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}e.exports=a,a.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=Array(this.outLen/8),this.V=Array(this.outLen/8);for(var i=0;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},a.prototype.generate=function(e,t,r,n){if(this._reseed>this.reseedInterval)throw Error("Reseed is required");"string"!=typeof t&&(n=r,r=t,t=null),r&&(r=i.toArray(r,n||"hex"),this._update(r));for(var o=[];o.length */t.read=function(e,t,r,n,i){var o,a,s=8*i-n-1,l=(1<>1,d=-7,c=r?i-1:0,p=r?-1:1,f=e[t+c];for(c+=p,o=f&(1<<-d)-1,f>>=-d,d+=s;d>0;o=256*o+e[t+c],c+=p,d-=8);for(a=o&(1<<-d)-1,o>>=-d,d+=n;d>0;a=256*a+e[t+c],c+=p,d-=8);if(0===o)o=1-u;else{if(o===l)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,n),o-=u}return(f?-1:1)*a*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var a,s,l,u=8*o-i-1,d=(1<>1,p=23===i?5960464477539062e-23:0,f=n?0:o-1,h=n?1:-1,g=t<0||0===t&&1/t<0?1:0;for(isNaN(t=Math.abs(t))||t===1/0?(s=isNaN(t)?1:0,a=d):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),a+c>=1?t+=p/l:t+=p*Math.pow(2,1-c),t*l>=2&&(a++,l/=2),a+c>=d?(s=0,a=d):a+c>=1?(s=(t*l-1)*Math.pow(2,i),a+=c):(s=t*Math.pow(2,c-1)*Math.pow(2,i),a=0));i>=8;e[r+f]=255&s,f+=h,s/=256,i-=8);for(a=a<0;e[r+f]=255&a,f+=h,a/=256,u-=8);e[r+f-h]|=128*g}},39541:function(e){"use strict";"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 r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},66337:function(e,t,r){"use strict";var n=null;n="undefined"!=typeof WebSocket?WebSocket:"undefined"!=typeof MozWebSocket?MozWebSocket:void 0!==r.g?r.g.WebSocket||r.g.MozWebSocket:window.WebSocket||window.MozWebSocket,e.exports=n},99857:function(e,t,r){"use strict";var n,i=r(49079);!/** + */function(t){var r=e,n=r.lib,i=n.WordArray,o=n.Hasher,a=r.algo,s=i.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),l=i.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),u=i.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),d=i.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),c=i.create([0,1518500249,1859775393,2400959708,2840853838]),p=i.create([1352829926,1548603684,1836072691,2053994217,0]),f=a.RIPEMD160=o.extend({_doReset:function(){this._hash=i.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var r,n,i,o,a,f,S,w,_,k,O,P=0;P<16;P++){var A=t+P,I=e[A];e[A]=(I<<8|I>>>24)&16711935|(I<<24|I>>>8)&4278255360}var R=this._hash.words,E=c.words,T=p.words,N=s.words,x=l.words,B=u.words,C=d.words;f=r=R[0],S=n=R[1],w=i=R[2],_=o=R[3],k=a=R[4];for(var P=0;P<80;P+=1)O=r+e[t+N[P]]|0,P<16?O+=h(n,i,o)+E[0]:P<32?O+=g(n,i,o)+E[1]:P<48?O+=m(n,i,o)+E[2]:P<64?O+=y(n,i,o)+E[3]:O+=v(n,i,o)+E[4],O|=0,O=(O=b(O,B[P]))+a|0,r=a,a=o,o=b(i,10),i=n,n=O,O=f+e[t+x[P]]|0,P<16?O+=v(S,w,_)+T[0]:P<32?O+=y(S,w,_)+T[1]:P<48?O+=m(S,w,_)+T[2]:P<64?O+=g(S,w,_)+T[3]:O+=h(S,w,_)+T[4],O|=0,O=(O=b(O,C[P]))+k|0,f=k,k=_,_=b(w,10),w=S,S=O;O=R[1]+i+_|0,R[1]=R[2]+o+k|0,R[2]=R[3]+a+f|0,R[3]=R[4]+r+S|0,R[4]=R[0]+n+w|0,R[0]=O},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;t[n>>>5]|=128<<24-n%32,t[(n+64>>>9<<4)+14]=(r<<8|r>>>24)&16711935|(r<<24|r>>>8)&4278255360,e.sigBytes=(t.length+1)*4,this._process();for(var i=this._hash,o=i.words,a=0;a<5;a++){var s=o[a];o[a]=(s<<8|s>>>24)&16711935|(s<<24|s>>>8)&4278255360}return i},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});function h(e,t,r){return e^t^r}function g(e,t,r){return e&t|~e&r}function m(e,t,r){return(e|~t)^r}function y(e,t,r){return e&r|t&~r}function v(e,t,r){return e^(t|~r)}function b(e,t){return e<>>32-t}r.RIPEMD160=o._createHelper(f),r.HmacRIPEMD160=o._createHmacHelper(f)}(Math),e.RIPEMD160})},68206:function(e,t,r){"use strict";!function(n,i){e.exports=t=i(r(32646))}(0,function(e){return!function(){var t=e,r=t.lib,n=r.WordArray,i=r.Hasher,o=t.algo,a=[],s=o.SHA1=i.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var r=this._hash.words,n=r[0],i=r[1],o=r[2],s=r[3],l=r[4],u=0;u<80;u++){if(u<16)a[u]=0|e[t+u];else{var d=a[u-3]^a[u-8]^a[u-14]^a[u-16];a[u]=d<<1|d>>>31}var c=(n<<5|n>>>27)+l+a[u];u<20?c+=(i&o|~i&s)+1518500249:u<40?c+=(i^o^s)+1859775393:u<60?c+=(i&o|i&s|o&s)-1894007588:c+=(i^o^s)-899497514,l=s,s=o,o=i<<30|i>>>2,i=n,n=c}r[0]=r[0]+n|0,r[1]=r[1]+i|0,r[2]=r[2]+o|0,r[3]=r[3]+s|0,r[4]=r[4]+l|0},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;return t[n>>>5]|=128<<24-n%32,t[(n+64>>>9<<4)+14]=Math.floor(r/4294967296),t[(n+64>>>9<<4)+15]=r,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=i.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA1=i._createHelper(s),t.HmacSHA1=i._createHmacHelper(s)}(),e.SHA1})},8953:function(e,t,r){"use strict";!function(n,i,o){e.exports=t=i(r(32646),r(81689))}(0,function(e){return!function(){var t=e,r=t.lib.WordArray,n=t.algo,i=n.SHA256,o=n.SHA224=i.extend({_doReset:function(){this._hash=new r.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var e=i._doFinalize.call(this);return e.sigBytes-=4,e}});t.SHA224=i._createHelper(o),t.HmacSHA224=i._createHmacHelper(o)}(),e.SHA224})},81689:function(e,t,r){"use strict";!function(n,i){e.exports=t=i(r(32646))}(0,function(e){return!function(t){var r=e,n=r.lib,i=n.WordArray,o=n.Hasher,a=r.algo,s=[],l=[];!function(){function e(e){for(var r=t.sqrt(e),n=2;n<=r;n++)if(!(e%n))return!1;return!0}function r(e){return(e-(0|e))*4294967296|0}for(var n=2,i=0;i<64;)e(n)&&(i<8&&(s[i]=r(t.pow(n,.5))),l[i]=r(t.pow(n,1/3)),i++),n++}();var u=[],d=a.SHA256=o.extend({_doReset:function(){this._hash=new i.init(s.slice(0))},_doProcessBlock:function(e,t){for(var r=this._hash.words,n=r[0],i=r[1],o=r[2],a=r[3],s=r[4],d=r[5],c=r[6],p=r[7],f=0;f<64;f++){if(f<16)u[f]=0|e[t+f];else{var h=u[f-15],g=(h<<25|h>>>7)^(h<<14|h>>>18)^h>>>3,m=u[f-2],y=(m<<15|m>>>17)^(m<<13|m>>>19)^m>>>10;u[f]=g+u[f-7]+y+u[f-16]}var v=s&d^~s&c,b=n&i^n&o^i&o,S=(n<<30|n>>>2)^(n<<19|n>>>13)^(n<<10|n>>>22),w=p+((s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25))+v+l[f]+u[f],_=S+b;p=c,c=d,d=s,s=a+w|0,a=o,o=i,i=n,n=w+_|0}r[0]=r[0]+n|0,r[1]=r[1]+i|0,r[2]=r[2]+o|0,r[3]=r[3]+a|0,r[4]=r[4]+s|0,r[5]=r[5]+d|0,r[6]=r[6]+c|0,r[7]=r[7]+p|0},_doFinalize:function(){var e=this._data,r=e.words,n=8*this._nDataBytes,i=8*e.sigBytes;return r[i>>>5]|=128<<24-i%32,r[(i+64>>>9<<4)+14]=t.floor(n/4294967296),r[(i+64>>>9<<4)+15]=n,e.sigBytes=4*r.length,this._process(),this._hash},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});r.SHA256=o._createHelper(d),r.HmacSHA256=o._createHmacHelper(d)}(Math),e.SHA256})},82585:function(e,t,r){"use strict";!function(n,i,o){e.exports=t=i(r(32646),r(94738))}(0,function(e){return!function(t){var r=e,n=r.lib,i=n.WordArray,o=n.Hasher,a=r.x64.Word,s=r.algo,l=[],u=[],d=[];!function(){for(var e=1,t=0,r=0;r<24;r++){l[e+5*t]=(r+1)*(r+2)/2%64;var n=t%5,i=(2*e+3*t)%5;e=n,t=i}for(var e=0;e<5;e++)for(var t=0;t<5;t++)u[e+5*t]=t+(2*e+3*t)%5*5;for(var o=1,s=0;s<24;s++){for(var c=0,p=0,f=0;f<7;f++){if(1&o){var h=(1<>>24)&16711935|(o<<24|o>>>8)&4278255360,a=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360;var s=r[i];s.high^=a,s.low^=o}for(var p=0;p<24;p++){for(var f=0;f<5;f++){for(var h=0,g=0,m=0;m<5;m++){var s=r[f+5*m];h^=s.high,g^=s.low}var y=c[f];y.high=h,y.low=g}for(var f=0;f<5;f++)for(var v=c[(f+4)%5],b=c[(f+1)%5],S=b.high,w=b.low,h=v.high^(S<<1|w>>>31),g=v.low^(w<<1|S>>>31),m=0;m<5;m++){var s=r[f+5*m];s.high^=h,s.low^=g}for(var _=1;_<25;_++){var h,g,s=r[_],k=s.high,O=s.low,P=l[_];P<32?(h=k<>>32-P,g=O<>>32-P):(h=O<>>64-P,g=k<>>64-P);var A=c[u[_]];A.high=h,A.low=g}var I=c[0],R=r[0];I.high=R.high,I.low=R.low;for(var f=0;f<5;f++)for(var m=0;m<5;m++){var _=f+5*m,s=r[_],E=c[_],T=c[(f+1)%5+5*m],N=c[(f+2)%5+5*m];s.high=E.high^~T.high&N.high,s.low=E.low^~T.low&N.low}var s=r[0],x=d[p];s.high^=x.high,s.low^=x.low}},_doFinalize:function(){var e=this._data,r=e.words;this._nDataBytes;var n=8*e.sigBytes,o=32*this.blockSize;r[n>>>5]|=1<<24-n%32,r[(t.ceil((n+1)/o)*o>>>5)-1]|=128,e.sigBytes=4*r.length,this._process();for(var a=this._state,s=this.cfg.outputLength/8,l=s/8,u=[],d=0;d>>24)&16711935|(p<<24|p>>>8)&4278255360,f=(f<<8|f>>>24)&16711935|(f<<24|f>>>8)&4278255360,u.push(f),u.push(p)}return new i.init(u,s)},clone:function(){for(var e=o.clone.call(this),t=e._state=this._state.slice(0),r=0;r<25;r++)t[r]=t[r].clone();return e}});r.SHA3=o._createHelper(p),r.HmacSHA3=o._createHmacHelper(p)}(Math),e.SHA3})},62329:function(e,t,r){"use strict";!function(n,i,o){e.exports=t=i(r(32646),r(94738),r(9521))}(0,function(e){return!function(){var t=e,r=t.x64,n=r.Word,i=r.WordArray,o=t.algo,a=o.SHA512,s=o.SHA384=a.extend({_doReset:function(){this._hash=new i.init([new n.init(3418070365,3238371032),new n.init(1654270250,914150663),new n.init(2438529370,812702999),new n.init(355462360,4144912697),new n.init(1731405415,4290775857),new n.init(2394180231,1750603025),new n.init(3675008525,1694076839),new n.init(1203062813,3204075428)])},_doFinalize:function(){var e=a._doFinalize.call(this);return e.sigBytes-=16,e}});t.SHA384=a._createHelper(s),t.HmacSHA384=a._createHmacHelper(s)}(),e.SHA384})},9521:function(e,t,r){"use strict";!function(n,i,o){e.exports=t=i(r(32646),r(94738))}(0,function(e){return!function(){var t=e,r=t.lib.Hasher,n=t.x64,i=n.Word,o=n.WordArray,a=t.algo;function s(){return i.create.apply(i,arguments)}var l=[s(1116352408,3609767458),s(1899447441,602891725),s(3049323471,3964484399),s(3921009573,2173295548),s(961987163,4081628472),s(1508970993,3053834265),s(2453635748,2937671579),s(2870763221,3664609560),s(3624381080,2734883394),s(310598401,1164996542),s(607225278,1323610764),s(1426881987,3590304994),s(1925078388,4068182383),s(2162078206,991336113),s(2614888103,633803317),s(3248222580,3479774868),s(3835390401,2666613458),s(4022224774,944711139),s(264347078,2341262773),s(604807628,2007800933),s(770255983,1495990901),s(1249150122,1856431235),s(1555081692,3175218132),s(1996064986,2198950837),s(2554220882,3999719339),s(2821834349,766784016),s(2952996808,2566594879),s(3210313671,3203337956),s(3336571891,1034457026),s(3584528711,2466948901),s(113926993,3758326383),s(338241895,168717936),s(666307205,1188179964),s(773529912,1546045734),s(1294757372,1522805485),s(1396182291,2643833823),s(1695183700,2343527390),s(1986661051,1014477480),s(2177026350,1206759142),s(2456956037,344077627),s(2730485921,1290863460),s(2820302411,3158454273),s(3259730800,3505952657),s(3345764771,106217008),s(3516065817,3606008344),s(3600352804,1432725776),s(4094571909,1467031594),s(275423344,851169720),s(430227734,3100823752),s(506948616,1363258195),s(659060556,3750685593),s(883997877,3785050280),s(958139571,3318307427),s(1322822218,3812723403),s(1537002063,2003034995),s(1747873779,3602036899),s(1955562222,1575990012),s(2024104815,1125592928),s(2227730452,2716904306),s(2361852424,442776044),s(2428436474,593698344),s(2756734187,3733110249),s(3204031479,2999351573),s(3329325298,3815920427),s(3391569614,3928383900),s(3515267271,566280711),s(3940187606,3454069534),s(4118630271,4000239992),s(116418474,1914138554),s(174292421,2731055270),s(289380356,3203993006),s(460393269,320620315),s(685471733,587496836),s(852142971,1086792851),s(1017036298,365543100),s(1126000580,2618297676),s(1288033470,3409855158),s(1501505948,4234509866),s(1607167915,987167468),s(1816402316,1246189591)],u=[];!function(){for(var e=0;e<80;e++)u[e]=s()}();var d=a.SHA512=r.extend({_doReset:function(){this._hash=new o.init([new i.init(1779033703,4089235720),new i.init(3144134277,2227873595),new i.init(1013904242,4271175723),new i.init(2773480762,1595750129),new i.init(1359893119,2917565137),new i.init(2600822924,725511199),new i.init(528734635,4215389547),new i.init(1541459225,327033209)])},_doProcessBlock:function(e,t){for(var r=this._hash.words,n=r[0],i=r[1],o=r[2],a=r[3],s=r[4],d=r[5],c=r[6],p=r[7],f=n.high,h=n.low,g=i.high,m=i.low,y=o.high,v=o.low,b=a.high,S=a.low,w=s.high,_=s.low,k=d.high,O=d.low,P=c.high,A=c.low,I=p.high,R=p.low,E=f,T=h,N=g,x=m,B=y,C=v,M=b,D=S,U=w,J=_,j=k,H=O,q=P,L=A,F=I,V=R,z=0;z<80;z++){var W,Q,G=u[z];if(z<16)Q=G.high=0|e[t+2*z],W=G.low=0|e[t+2*z+1];else{var K=u[z-15],Y=K.high,Z=K.low,X=(Y>>>1|Z<<31)^(Y>>>8|Z<<24)^Y>>>7,$=(Z>>>1|Y<<31)^(Z>>>8|Y<<24)^(Z>>>7|Y<<25),ee=u[z-2],et=ee.high,er=ee.low,en=(et>>>19|er<<13)^(et<<3|er>>>29)^et>>>6,ei=(er>>>19|et<<13)^(er<<3|et>>>29)^(er>>>6|et<<26),eo=u[z-7],ea=eo.high,es=eo.low,el=u[z-16],eu=el.high,ed=el.low;Q=X+ea+((W=$+es)>>>0<$>>>0?1:0),W+=ei,Q=Q+en+(W>>>0>>0?1:0),W+=ed,Q=Q+eu+(W>>>0>>0?1:0),G.high=Q,G.low=W}var ec=U&j^~U&q,ep=J&H^~J&L,ef=E&N^E&B^N&B,eh=T&x^T&C^x&C,eg=(E>>>28|T<<4)^(E<<30|T>>>2)^(E<<25|T>>>7),em=(T>>>28|E<<4)^(T<<30|E>>>2)^(T<<25|E>>>7),ey=(U>>>14|J<<18)^(U>>>18|J<<14)^(U<<23|J>>>9),ev=(J>>>14|U<<18)^(J>>>18|U<<14)^(J<<23|U>>>9),eb=l[z],eS=eb.high,ew=eb.low,e_=V+ev,ek=F+ey+(e_>>>0>>0?1:0),e_=e_+ep,ek=ek+ec+(e_>>>0>>0?1:0),e_=e_+ew,ek=ek+eS+(e_>>>0>>0?1:0),e_=e_+W,ek=ek+Q+(e_>>>0>>0?1:0),eO=em+eh,eP=eg+ef+(eO>>>0>>0?1:0);F=q,V=L,q=j,L=H,j=U,H=J,U=M+ek+((J=D+e_|0)>>>0>>0?1:0)|0,M=B,D=C,B=N,C=x,N=E,x=T,E=ek+eP+((T=e_+eO|0)>>>0>>0?1:0)|0}h=n.low=h+T,n.high=f+E+(h>>>0>>0?1:0),m=i.low=m+x,i.high=g+N+(m>>>0>>0?1:0),v=o.low=v+C,o.high=y+B+(v>>>0>>0?1:0),S=a.low=S+D,a.high=b+M+(S>>>0>>0?1:0),_=s.low=_+J,s.high=w+U+(_>>>0>>0?1:0),O=d.low=O+H,d.high=k+j+(O>>>0>>0?1:0),A=c.low=A+L,c.high=P+q+(A>>>0>>0?1:0),R=p.low=R+V,p.high=I+F+(R>>>0>>0?1:0)},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;return t[n>>>5]|=128<<24-n%32,t[(n+128>>>10<<5)+30]=Math.floor(r/4294967296),t[(n+128>>>10<<5)+31]=r,e.sigBytes=4*t.length,this._process(),this._hash.toX32()},clone:function(){var e=r.clone.call(this);return e._hash=this._hash.clone(),e},blockSize:32});t.SHA512=r._createHelper(d),t.HmacSHA512=r._createHmacHelper(d)}(),e.SHA512})},41144:function(e,t,r){"use strict";!function(n,i,o){e.exports=t=i(r(32646),r(7679),r(22236),r(82948),r(95989))}(0,function(e){return!function(){var t=e,r=t.lib,n=r.WordArray,i=r.BlockCipher,o=t.algo,a=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],s=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],l=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],u=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],d=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],c=o.DES=i.extend({_doReset:function(){for(var e=this._key.words,t=[],r=0;r<56;r++){var n=a[r]-1;t[r]=e[n>>>5]>>>31-n%32&1}for(var i=this._subKeys=[],o=0;o<16;o++){for(var u=i[o]=[],d=l[o],r=0;r<24;r++)u[r/6|0]|=t[(s[r]-1+d)%28]<<31-r%6,u[4+(r/6|0)]|=t[28+(s[r+24]-1+d)%28]<<31-r%6;u[0]=u[0]<<1|u[0]>>>31;for(var r=1;r<7;r++)u[r]=u[r]>>>(r-1)*4+3;u[7]=u[7]<<5|u[7]>>>27}for(var c=this._invSubKeys=[],r=0;r<16;r++)c[r]=i[15-r]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._subKeys)},decryptBlock:function(e,t){this._doCryptBlock(e,t,this._invSubKeys)},_doCryptBlock:function(e,t,r){this._lBlock=e[t],this._rBlock=e[t+1],p.call(this,4,252645135),p.call(this,16,65535),f.call(this,2,858993459),f.call(this,8,16711935),p.call(this,1,1431655765);for(var n=0;n<16;n++){for(var i=r[n],o=this._lBlock,a=this._rBlock,s=0,l=0;l<8;l++)s|=u[l][((a^i[l])&d[l])>>>0];this._lBlock=a,this._rBlock=o^s}var c=this._lBlock;this._lBlock=this._rBlock,this._rBlock=c,p.call(this,1,1431655765),f.call(this,8,16711935),f.call(this,2,858993459),p.call(this,16,65535),p.call(this,4,252645135),e[t]=this._lBlock,e[t+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function p(e,t){var r=(this._lBlock>>>e^this._rBlock)&t;this._rBlock^=r,this._lBlock^=r<>>e^this._lBlock)&t;this._lBlock^=r,this._rBlock^=r<192.");var t=e.slice(0,2),r=e.length<4?e.slice(0,2):e.slice(2,4),i=e.length<6?e.slice(0,2):e.slice(4,6);this._des1=c.createEncryptor(n.create(t)),this._des2=c.createEncryptor(n.create(r)),this._des3=c.createEncryptor(n.create(i))},encryptBlock:function(e,t){this._des1.encryptBlock(e,t),this._des2.decryptBlock(e,t),this._des3.encryptBlock(e,t)},decryptBlock:function(e,t){this._des3.decryptBlock(e,t),this._des2.encryptBlock(e,t),this._des1.decryptBlock(e,t)},keySize:6,ivSize:2,blockSize:2});t.TripleDES=i._createHelper(h)}(),e.TripleDES})},94738:function(e,t,r){"use strict";!function(n,i){e.exports=t=i(r(32646))}(0,function(e){return!function(){var t=e,r=t.lib,n=r.Base,i=r.WordArray,o=t.x64={};o.Word=n.extend({init:function(e,t){this.high=e,this.low=t}}),o.WordArray=n.extend({init:function(e,t){e=this.words=e||[],void 0!=t?this.sigBytes=t:this.sigBytes=8*e.length},toX32:function(){for(var e=this.words,t=e.length,r=[],n=0;n3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new o("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new o("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new o("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new o("`loose`, if provided, must be a boolean");var s=arguments.length>3?arguments[3]:null,l=arguments.length>4?arguments[4]:null,u=arguments.length>5?arguments[5]:null,d=arguments.length>6&&arguments[6],c=!!a&&a(e,t);if(n)n(e,t,{configurable:null===u&&c?c.configurable:!u,enumerable:null===s&&c?c.enumerable:!s,value:r,writable:null===l&&c?c.writable:!l});else if(!d&&(s||l||u))throw new i("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");else e[t]=r}},96981:function(e,t,r){"use strict";var n=r(24752),i="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),o=Object.prototype.toString,a=Array.prototype.concat,s=r(22916),l=function(e){return"function"==typeof e&&"[object Function]"===o.call(e)},u=r(39223)(),d=function(e,t,r,n){if(t in e){if(!0===n){if(e[t]===r)return}else if(!l(n)||!n())return}u?s(e,t,r,!0):s(e,t,r)},c=function(e,t){var r=arguments.length>2?arguments[2]:{},o=n(t);i&&(o=a.call(o,Object.getOwnPropertySymbols(t)));for(var s=0;s0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function u(e,t){this.curve=e,this.type=t,this.precomputed=null}e.exports=l,l.prototype.point=function(){throw Error("Not implemented")},l.prototype.validate=function(){throw Error("Not implemented")},l.prototype._fixedNafMul=function(e,t){s(e.precomputed);var r,n,i=e._getDoubles(),a=o(t,1,this._bitLength),l=(1<=r;d--)n=(n<<1)+a[d];u.push(n)}for(var c=this.jpoint(null,null,null),p=this.jpoint(null,null,null),f=l;f>0;f--){for(r=0;r=0;u--){for(var d=0;u>=0&&0===a[u];u--)d++;if(u>=0&&d++,l=l.dblp(d),u<0)break;var c=a[u];s(0!==c),l="affine"===e.type?c>0?l.mixedAdd(i[c-1>>1]):l.mixedAdd(i[-c-1>>1].neg()):c>0?l.add(i[c-1>>1]):l.add(i[-c-1>>1].neg())}return"affine"===e.type?l.toP():l},l.prototype._wnafMulAdd=function(e,t,r,n,i){var s,l,u,d=this._wnafT1,c=this._wnafT2,p=this._wnafT3,f=0;for(s=0;s=1;s-=2){var g=s-1,m=s;if(1!==d[g]||1!==d[m]){p[g]=o(r[g],d[g],this._bitLength),p[m]=o(r[m],d[m],this._bitLength),f=Math.max(p[g].length,f),f=Math.max(p[m].length,f);continue}var y=[t[g],null,null,t[m]];0===t[g].y.cmp(t[m].y)?(y[1]=t[g].add(t[m]),y[2]=t[g].toJ().mixedAdd(t[m].neg())):0===t[g].y.cmp(t[m].y.redNeg())?(y[1]=t[g].toJ().mixedAdd(t[m]),y[2]=t[g].add(t[m].neg())):(y[1]=t[g].toJ().mixedAdd(t[m]),y[2]=t[g].toJ().mixedAdd(t[m].neg()));var v=[-3,-1,-5,-7,0,7,5,1,3],b=a(r[g],r[m]);for(l=0,f=Math.max(b[0].length,f),p[g]=Array(f),p[m]=Array(f);l=0;s--){for(var O=0;s>=0;){var P=!0;for(l=0;l=0&&O++,_=_.dblp(O),s<0)break;for(l=0;l0?u=c[l][A-1>>1]:A<0&&(u=c[l][-A-1>>1].neg()),_="affine"===u.type?_.mixedAdd(u):_.add(u))}}for(s=0;s=Math.ceil((e.bitLength()+1)/t.step)},u.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i":""},u.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},u.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var n=this.curve._mulA(e),i=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),o=n.redAdd(t),a=o.redSub(r),s=n.redSub(t),l=i.redMul(a),u=o.redMul(s),d=i.redMul(s),c=a.redMul(o);return this.curve.point(l,u,c,d)},u.prototype._projDbl=function(){var e,t,r,n,i,o,a=this.x.redAdd(this.y).redSqr(),s=this.x.redSqr(),l=this.y.redSqr();if(this.curve.twisted){var u=(n=this.curve._mulA(s)).redAdd(l);this.zOne?(e=a.redSub(s).redSub(l).redMul(u.redSub(this.curve.two)),t=u.redMul(n.redSub(l)),r=u.redSqr().redSub(u).redSub(u)):(i=this.z.redSqr(),o=u.redSub(i).redISub(i),e=a.redSub(s).redISub(l).redMul(o),t=u.redMul(n.redSub(l)),r=u.redMul(o))}else n=s.redAdd(l),i=this.curve._mulC(this.z).redSqr(),o=n.redSub(i).redSub(i),e=this.curve._mulC(a.redISub(n)).redMul(o),t=this.curve._mulC(n).redMul(s.redISub(l)),r=n.redMul(o);return this.curve.point(e,t,r)},u.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},u.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),r=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),n=this.t.redMul(this.curve.dd).redMul(e.t),i=this.z.redMul(e.z.redAdd(e.z)),o=r.redSub(t),a=i.redSub(n),s=i.redAdd(n),l=r.redAdd(t),u=o.redMul(a),d=s.redMul(l),c=o.redMul(l),p=a.redMul(s);return this.curve.point(u,d,p,c)},u.prototype._projAdd=function(e){var t,r,n=this.z.redMul(e.z),i=n.redSqr(),o=this.x.redMul(e.x),a=this.y.redMul(e.y),s=this.curve.d.redMul(o).redMul(a),l=i.redSub(s),u=i.redAdd(s),d=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(o).redISub(a),c=n.redMul(l).redMul(d);return this.curve.twisted?(t=n.redMul(u).redMul(a.redSub(this.curve._mulA(o))),r=l.redMul(u)):(t=n.redMul(u).redMul(a.redSub(o)),r=this.curve._mulC(l).redMul(u)),this.curve.point(c,t,r)},u.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},u.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},u.prototype.mulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!1)},u.prototype.jmulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!0)},u.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},u.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},u.prototype.getX=function(){return this.normalize(),this.x.fromRed()},u.prototype.getY=function(){return this.normalize(),this.y.fromRed()},u.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},u.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var r=e.clone(),n=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(n),0===this.x.cmp(t))return!0}},u.prototype.toP=u.prototype.normalize,u.prototype.mixedAdd=u.prototype.add},79702:function(e,t,r){"use strict";var n=t;n.base=r(59177),n.short=r(73545),n.mont=r(69136),n.edwards=r(58045)},69136:function(e,t,r){"use strict";var n=r(78442),i=r(39541),o=r(59177),a=r(38702);function s(e){o.call(this,"mont",e),this.a=new n(e.a,16).toRed(this.red),this.b=new n(e.b,16).toRed(this.red),this.i4=new n(4).toRed(this.red).redInvm(),this.two=new n(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function l(e,t,r){o.BasePoint.call(this,e,"projective"),null===t&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new n(t,16),this.z=new n(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}i(s,o),e.exports=s,s.prototype.validate=function(e){var t=e.normalize().x,r=t.redSqr(),n=r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t);return 0===n.redSqrt().redSqr().cmp(n)},i(l,o.BasePoint),s.prototype.decodePoint=function(e,t){return this.point(a.toArray(e,t),1)},s.prototype.point=function(e,t){return new l(this,e,t)},s.prototype.pointFromJSON=function(e){return l.fromJSON(this,e)},l.prototype.precompute=function(){},l.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},l.fromJSON=function(e,t){return new l(e,t[0],t[1]||e.one)},l.prototype.inspect=function(){return this.isInfinity()?"":""},l.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},l.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),r=e.redSub(t),n=e.redMul(t),i=r.redMul(t.redAdd(this.curve.a24.redMul(r)));return this.curve.point(n,i)},l.prototype.add=function(){throw Error("Not supported on Montgomery curve")},l.prototype.diffAdd=function(e,t){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=e.x.redAdd(e.z),o=e.x.redSub(e.z).redMul(r),a=i.redMul(n),s=t.z.redMul(o.redAdd(a).redSqr()),l=t.x.redMul(o.redISub(a).redSqr());return this.curve.point(s,l)},l.prototype.mul=function(e){for(var t=e.clone(),r=this,n=this.curve.point(null,null),i=this,o=[];0!==t.cmpn(0);t.iushrn(1))o.push(t.andln(1));for(var a=o.length-1;a>=0;a--)0===o[a]?(r=r.diffAdd(n,i),n=n.dbl()):(n=r.diffAdd(n,i),r=r.dbl());return n},l.prototype.mulAdd=function(){throw Error("Not supported on Montgomery curve")},l.prototype.jumlAdd=function(){throw Error("Not supported on Montgomery curve")},l.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},l.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},l.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},73545:function(e,t,r){"use strict";var n=r(38702),i=r(78442),o=r(39541),a=r(59177),s=n.assert;function l(e){a.call(this,"short",e),this.a=new i(e.a,16).toRed(this.red),this.b=new i(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=[,,,,],this._endoWnafT2=[,,,,]}function u(e,t,r,n){a.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new i(t,16),this.y=new i(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function d(e,t,r,n){a.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new i(0)):(this.x=new i(t,16),this.y=new i(r,16),this.z=new i(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}o(l,a),e.exports=l,l.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){if(e.beta)t=new i(e.beta,16).toRed(this.red);else{var t,r,n,o=this._getEndoRoots(this.p);t=(t=0>o[0].cmp(o[1])?o[0]:o[1]).toRed(this.red)}if(e.lambda)r=new i(e.lambda,16);else{var a=this._getEndoRoots(this.n);0===this.g.mul(a[0]).x.cmp(this.g.x.redMul(t))?r=a[0]:(r=a[1],s(0===this.g.mul(r).x.cmp(this.g.x.redMul(t))))}return n=e.basis?e.basis.map(function(e){return{a:new i(e.a,16),b:new i(e.b,16)}}):this._getEndoBasis(r),{beta:t,lambda:r,basis:n}}},l.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:i.mont(e),r=new i(2).toRed(t).redInvm(),n=r.redNeg(),o=new i(3).toRed(t).redNeg().redSqrt().redMul(r);return[n.redAdd(o).fromRed(),n.redSub(o).fromRed()]},l.prototype._getEndoBasis=function(e){for(var t,r,n,o,a,s,l,u,d,c=this.n.ushrn(Math.floor(this.n.bitLength()/2)),p=e,f=this.n.clone(),h=new i(1),g=new i(0),m=new i(0),y=new i(1),v=0;0!==p.cmpn(0);){var b=f.div(p);u=f.sub(b.mul(p)),d=m.sub(b.mul(h));var S=y.sub(b.mul(g));if(!n&&0>u.cmp(c))t=l.neg(),r=h,n=u.neg(),o=d;else if(n&&2==++v)break;l=u,f=p,p=u,m=h,h=d,y=g,g=S}a=u.neg(),s=d;var w=n.sqr().add(o.sqr());return a.sqr().add(s.sqr()).cmp(w)>=0&&(a=t,s=r),n.negative&&(n=n.neg(),o=o.neg()),a.negative&&(a=a.neg(),s=s.neg()),[{a:n,b:o},{a:a,b:s}]},l.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],i=n.b.mul(e).divRound(this.n),o=r.b.neg().mul(e).divRound(this.n),a=i.mul(r.a),s=o.mul(n.a),l=i.mul(r.b),u=o.mul(n.b);return{k1:e.sub(a).sub(s),k2:l.add(u).neg()}},l.prototype.pointFromX=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw Error("invalid point");var o=n.fromRed().isOdd();return(t&&!o||!t&&o)&&(n=n.redNeg()),this.point(e,n)},l.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},l.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o":""},u.prototype.isInfinity=function(){return this.inf},u.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e)||0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},u.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),a=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,a)},u.prototype.getX=function(){return this.x.fromRed()},u.prototype.getY=function(){return this.y.fromRed()},u.prototype.mul=function(e){return(e=new i(e,16),this.isInfinity())?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},u.prototype.mulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},u.prototype.jmulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},u.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},u.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},u.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},o(d,a.BasePoint),l.prototype.jpoint=function(e,t,r){return new d(this,e,t,r)},d.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},d.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},d.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),i=e.x.redMul(r),o=this.y.redMul(t.redMul(e.z)),a=e.y.redMul(r.redMul(this.z)),s=n.redSub(i),l=o.redSub(a);if(0===s.cmpn(0))return 0!==l.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=s.redSqr(),d=u.redMul(s),c=n.redMul(u),p=l.redSqr().redIAdd(d).redISub(c).redISub(c),f=l.redMul(c.redISub(p)).redISub(o.redMul(d)),h=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(p,f,h)},d.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),i=this.y,o=e.y.redMul(t).redMul(this.z),a=r.redSub(n),s=i.redSub(o);if(0===a.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var l=a.redSqr(),u=l.redMul(a),d=r.redMul(l),c=s.redSqr().redIAdd(u).redISub(d).redISub(d),p=s.redMul(d.redISub(c)).redISub(i.redMul(u)),f=this.z.redMul(a);return this.curve.jpoint(c,p,f)},d.prototype.dblp=function(e){if(0===e||this.isInfinity())return this;if(!e)return this.dbl();if(this.curve.zeroA||this.curve.threeA){var t,r=this;for(t=0;t=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},d.prototype.inspect=function(){return this.isInfinity()?"":""},d.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},76769:function(e,t,r){"use strict";var n,i=t,o=r(52689),a=r(79702),s=r(38702).assert;function l(e){"short"===e.type?this.curve=new a.short(e):"edwards"===e.type?this.curve=new a.edwards(e):this.curve=new a.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,s(this.g.validate(),"Invalid curve"),s(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function u(e,t){Object.defineProperty(i,e,{configurable:!0,enumerable:!0,get:function(){var r=new l(t);return Object.defineProperty(i,e,{configurable:!0,enumerable:!0,value:r}),r}})}i.PresetCurve=l,u("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:o.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),u("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:o.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),u("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:o.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),u("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:o.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),u("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:o.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),u("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["9"]}),u("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{n=r(13985)}catch(e){n=void 0}u("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:o.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",n]})},95085:function(e,t,r){"use strict";var n=r(78442),i=r(36418),o=r(38702),a=r(76769),s=r(81658),l=o.assert,u=r(50373),d=r(74973);function c(e){if(!(this instanceof c))return new c(e);"string"==typeof e&&(l(Object.prototype.hasOwnProperty.call(a,e),"Unknown curve "+e),e=a[e]),e instanceof a.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}e.exports=c,c.prototype.keyPair=function(e){return new u(this,e)},c.prototype.keyFromPrivate=function(e,t){return u.fromPrivate(this,e,t)},c.prototype.keyFromPublic=function(e,t){return u.fromPublic(this,e,t)},c.prototype.genKeyPair=function(e){e||(e={});for(var t=new i({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||s(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),o=this.n.sub(new n(2));;){var a=new n(t.generate(r));if(!(a.cmp(o)>0))return a.iaddn(1),this.keyFromPrivate(a)}},c.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return(r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0)?e.sub(this.n):e},c.prototype.sign=function(e,t,r,o){"object"==typeof r&&(o=r,r=null),o||(o={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new n(e,16));for(var a=this.n.byteLength(),s=t.getPrivate().toArray("be",a),l=e.toArray("be",a),u=new i({hash:this.hash,entropy:s,nonce:l,pers:o.pers,persEnc:o.persEnc||"utf8"}),c=this.n.sub(new n(1)),p=0;;p++){var f=o.k?o.k(p):new n(u.generate(this.n.byteLength()));if(!(0>=(f=this._truncateToN(f,!0)).cmpn(1)||f.cmp(c)>=0)){var h=this.g.mul(f);if(!h.isInfinity()){var g=h.getX(),m=g.umod(this.n);if(0!==m.cmpn(0)){var y=f.invm(this.n).mul(m.mul(t.getPrivate()).iadd(e));if(0!==(y=y.umod(this.n)).cmpn(0)){var v=(h.getY().isOdd()?1:0)|(0!==g.cmp(m)?2:0);return o.canonical&&y.cmp(this.nh)>0&&(y=this.n.sub(y),v^=1),new d({r:m,s:y,recoveryParam:v})}}}}}},c.prototype.verify=function(e,t,r,i){e=this._truncateToN(new n(e,16)),r=this.keyFromPublic(r,i);var o,a=(t=new d(t,"hex")).r,s=t.s;if(0>a.cmpn(1)||a.cmp(this.n)>=0||0>s.cmpn(1)||s.cmp(this.n)>=0)return!1;var l=s.invm(this.n),u=l.mul(e).umod(this.n),c=l.mul(a).umod(this.n);return this.curve._maxwellTrick?!(o=this.g.jmulAdd(u,r.getPublic(),c)).isInfinity()&&o.eqXToP(a):!(o=this.g.mulAdd(u,r.getPublic(),c)).isInfinity()&&0===o.getX().umod(this.n).cmp(a)},c.prototype.recoverPubKey=function(e,t,r,i){l((3&r)===r,"The recovery param is more than two bits"),t=new d(t,i);var o=this.n,a=new n(e),s=t.r,u=t.s,c=1&r,p=r>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&p)throw Error("Unable to find sencond key candinate");s=p?this.curve.pointFromX(s.add(this.curve.n),c):this.curve.pointFromX(s,c);var f=t.r.invm(o),h=o.sub(a).mul(f).umod(o),g=u.mul(f).umod(o);return this.g.mulAdd(h,s,g)},c.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new d(t,n)).recoveryParam)return t.recoveryParam;for(var i,o=0;o<4;o++){try{i=this.recoverPubKey(e,t,o)}catch(e){continue}if(i.eq(r))return o}throw Error("Unable to find valid recovery factor")}},50373:function(e,t,r){"use strict";var n=r(78442),i=r(38702).assert;function o(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}e.exports=o,o.fromPublic=function(e,t,r){return t instanceof o?t:new o(e,{pub:t,pubEnc:r})},o.fromPrivate=function(e,t,r){return t instanceof o?t:new o(e,{priv:t,privEnc:r})},o.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},o.prototype.getPublic=function(e,t){return("string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t)?this.pub.encode(t,e):this.pub},o.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},o.prototype._importPrivate=function(e,t){this.priv=new n(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},o.prototype._importPublic=function(e,t){if(e.x||e.y){"mont"===this.ec.curve.type?i(e.x,"Need x coordinate"):("short"===this.ec.curve.type||"edwards"===this.ec.curve.type)&&i(e.x&&e.y,"Need both x and y coordinate"),this.pub=this.ec.curve.point(e.x,e.y);return}this.pub=this.ec.curve.decodePoint(e,t)},o.prototype.derive=function(e){return e.validate()||i(e.validate(),"public point not validated"),e.mul(this.priv).getX()},o.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)},o.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},o.prototype.inspect=function(){return""}},74973:function(e,t,r){"use strict";var n=r(78442),i=r(38702),o=i.assert;function a(e,t){if(e instanceof a)return e;this._importDER(e,t)||(o(e.r&&e.s,"Signature without r or s"),this.r=new n(e.r,16),this.s=new n(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function s(){this.place=0}function l(e,t){var r=e[t.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;for(var i=0,o=0,a=t.place;o>>=0;return!(i<=127)&&(t.place=a,i)}function u(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&t>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}e.exports=a,a.prototype._importDER=function(e,t){e=i.toArray(e,t);var r=new s;if(48!==e[r.place++])return!1;var o=l(e,r);if(!1===o||o+r.place!==e.length||2!==e[r.place++])return!1;var a=l(e,r);if(!1===a)return!1;var u=e.slice(r.place,a+r.place);if(r.place+=a,2!==e[r.place++])return!1;var d=l(e,r);if(!1===d||e.length!==d+r.place)return!1;var c=e.slice(r.place,d+r.place);if(0===u[0]){if(!(128&u[1]))return!1;u=u.slice(1)}if(0===c[0]){if(!(128&c[1]))return!1;c=c.slice(1)}return this.r=new n(u),this.s=new n(c),this.recoveryParam=null,!0},a.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=u(t),r=u(r);!r[0]&&!(128&r[1]);)r=r.slice(1);var n=[2];d(n,t.length),(n=n.concat(t)).push(2),d(n,r.length);var o=n.concat(r),a=[48];return d(a,o.length),a=a.concat(o),i.encode(a,e)}},55498:function(e,t,r){"use strict";var n=r(52689),i=r(76769),o=r(38702),a=o.assert,s=o.parseBytes,l=r(35513),u=r(83813);function d(e){if(a("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof d))return new d(e);e=i[e].curve,this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=n.sha512}e.exports=d,d.prototype.sign=function(e,t){e=s(e);var r=this.keyFromSecret(t),n=this.hashInt(r.messagePrefix(),e),i=this.g.mul(n),o=this.encodePoint(i),a=this.hashInt(o,r.pubBytes(),e).mul(r.priv()),l=n.add(a).umod(this.curve.n);return this.makeSignature({R:i,S:l,Rencoded:o})},d.prototype.verify=function(e,t,r){e=s(e),t=this.makeSignature(t);var n=this.keyFromPublic(r),i=this.hashInt(t.Rencoded(),n.pubBytes(),e),o=this.g.mul(t.S());return t.R().add(n.pub().mul(i)).eq(o)},d.prototype.hashInt=function(){for(var e=this.hash(),t=0;t(i>>1)-1?(i>>1)-l:l,o.isubn(s)):s=0,n[a]=s,o.iushrn(1)}return n}function l(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var n=0,i=0;e.cmpn(-n)>0||t.cmpn(-i)>0;){var o,a,s,l=e.andln(3)+n&3,u=t.andln(3)+i&3;3===l&&(l=-1),3===u&&(u=-1),a=(1&l)==0?0:(3==(o=e.andln(7)+n&7)||5===o)&&2===u?-l:l,r[0].push(a),s=(1&u)==0?0:(3==(o=t.andln(7)+i&7)||5===o)&&2===l?-u:u,r[1].push(s),2*n===a+1&&(n=1-n),2*i===s+1&&(i=1-i),e.iushrn(1),t.iushrn(1)}return r}function u(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}}function d(e){return"string"==typeof e?n.toArray(e,"hex"):e}function c(e){return new i(e,"hex","le")}n.assert=o,n.toArray=a.toArray,n.zero2=a.zero2,n.toHex=a.toHex,n.encode=a.encode,n.getNAF=s,n.getJSF=l,n.cachedProperty=u,n.parseBytes=d,n.intFromLE=c},78442:function(e,t,r){!function(e,t){"use strict";function n(e,t){if(!e)throw Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function o(e,t,r){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&(("le"===t||"be"===t)&&(r=t,t=10),this._init(e||0,t||10,r||"be"))}"object"==typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{u=void 0!==window.Buffer?window.Buffer:r(85568).Buffer}catch(e){}function a(e,t){var r=e.charCodeAt(t);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function s(e,t,r){var n=a(e,r);return r-1>=t&&(n|=a(e,r-1)<<4),n}function l(e,t,r,n){for(var i=0,o=Math.min(e.length,r),a=t;a=49?i+=s-49+10:s>=17?i+=s-17+10:i+=s}return i}o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return 0>e.cmp(t)?e:t},o.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;a-=3)o=e[a]|e[a-1]<<8|e[a-2]<<16,this.words[i]|=o<>>26-s&67108863,(s+=24)>=26&&(s-=26,i++);else if("le"===r)for(a=0,i=0;a>>26-s&67108863,(s+=24)>=26&&(s-=26,i++);return this.strip()},o.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=Array(this.length);for(var n,i=0;i=t;i-=2)n=s(e,t,i)<=18?(o-=18,a+=1,this.words[a]|=n>>>26):o+=8;else for(i=(e.length-t)%2==0?t+1:t;i=18?(o-=18,a+=1,this.words[a]|=n>>>26):o+=8;this.strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,a=o%n,s=Math.min(o,o-a)+r,u=0,d=r;d1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var u,d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],c=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function f(e){for(var t=Array(e.bitLength()),r=0;r>>i}return t}function h(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],a=i*o,s=67108863&a,l=a/67108864|0;r.words[0]=s;for(var u=1;u>>26,c=67108863&l,p=Math.min(u,t.length-1),f=Math.max(0,u-e.length+1);f<=p;f++){var h=u-f|0;d+=(a=(i=0|e.words[h])*(o=0|t.words[f])+c)/67108864|0,c=67108863&a}r.words[u]=0|c,l=0|d}return 0!==l?r.words[u]=0|l:r.length--,r.strip()}o.prototype.toString=function(e,t){if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var r,i=0,o=0,a=0;a>>24-i&16777215)||a!==this.length-1?d[6-l.length]+l+r:l+r,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var u=c[e],f=p[e];r="";var h=this.clone();for(h.negative=0;!h.isZero();){var g=h.modn(f).toString(e);r=(h=h.idivn(f)).isZero()?g+r:d[u-g.length]+g+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(e,t){return n(void 0!==u),this.toArrayLike(u,e,t)},o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,r){var i,o,a=this.byteLength(),s=r||Math.max(1,a);n(a<=s,"byte array longer than desired length"),n(s>0,"Requested array length <= 0"),this.strip();var l="le"===t,u=new e(s),d=this.clone();if(l){for(o=0;!d.isZero();o++)i=d.andln(255),d.iushrn(8),u[o]=i;for(;o=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return(8191&t)==0&&(r+=13,t>>>=13),(127&t)==0&&(r+=7,t>>>=7),(15&t)==0&&(r+=4,t>>>=4),(3&t)==0&&(r+=2,t>>>=2),(1&t)==0&&r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return(this.length-1)*26+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){this.length>e.length?(t=this,r=e):(t=e,r=this);for(var t,r,n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),t?this.words[r]=this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var t,r,n,i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;oe.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t,r,n=this.iadd(e);return e.negative=1,n._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(t=this,r=e):(t=e,r=this);for(var o=0,a=0;a>26,this.words[a]=67108863&n;for(;0!==o&&a>26,this.words[a]=67108863&n;if(0===o&&a>>13,f=0|a[1],h=8191&f,g=f>>>13,m=0|a[2],y=8191&m,v=m>>>13,b=0|a[3],S=8191&b,w=b>>>13,_=0|a[4],k=8191&_,O=_>>>13,P=0|a[5],A=8191&P,I=P>>>13,R=0|a[6],E=8191&R,T=R>>>13,N=0|a[7],x=8191&N,B=N>>>13,C=0|a[8],M=8191&C,D=C>>>13,U=0|a[9],J=8191&U,j=U>>>13,H=0|s[0],q=8191&H,L=H>>>13,F=0|s[1],V=8191&F,z=F>>>13,W=0|s[2],Q=8191&W,G=W>>>13,K=0|s[3],Y=8191&K,Z=K>>>13,X=0|s[4],$=8191&X,ee=X>>>13,et=0|s[5],er=8191&et,en=et>>>13,ei=0|s[6],eo=8191&ei,ea=ei>>>13,es=0|s[7],el=8191&es,eu=es>>>13,ed=0|s[8],ec=8191&ed,ep=ed>>>13,ef=0|s[9],eh=8191&ef,eg=ef>>>13;r.negative=e.negative^t.negative,r.length=19;var em=(u+(n=Math.imul(c,q))|0)+((8191&(i=(i=Math.imul(c,L))+Math.imul(p,q)|0))<<13)|0;u=((o=Math.imul(p,L))+(i>>>13)|0)+(em>>>26)|0,em&=67108863,n=Math.imul(h,q),i=(i=Math.imul(h,L))+Math.imul(g,q)|0,o=Math.imul(g,L);var ey=(u+(n=n+Math.imul(c,V)|0)|0)+((8191&(i=(i=i+Math.imul(c,z)|0)+Math.imul(p,V)|0))<<13)|0;u=((o=o+Math.imul(p,z)|0)+(i>>>13)|0)+(ey>>>26)|0,ey&=67108863,n=Math.imul(y,q),i=(i=Math.imul(y,L))+Math.imul(v,q)|0,o=Math.imul(v,L),n=n+Math.imul(h,V)|0,i=(i=i+Math.imul(h,z)|0)+Math.imul(g,V)|0,o=o+Math.imul(g,z)|0;var ev=(u+(n=n+Math.imul(c,Q)|0)|0)+((8191&(i=(i=i+Math.imul(c,G)|0)+Math.imul(p,Q)|0))<<13)|0;u=((o=o+Math.imul(p,G)|0)+(i>>>13)|0)+(ev>>>26)|0,ev&=67108863,n=Math.imul(S,q),i=(i=Math.imul(S,L))+Math.imul(w,q)|0,o=Math.imul(w,L),n=n+Math.imul(y,V)|0,i=(i=i+Math.imul(y,z)|0)+Math.imul(v,V)|0,o=o+Math.imul(v,z)|0,n=n+Math.imul(h,Q)|0,i=(i=i+Math.imul(h,G)|0)+Math.imul(g,Q)|0,o=o+Math.imul(g,G)|0;var eb=(u+(n=n+Math.imul(c,Y)|0)|0)+((8191&(i=(i=i+Math.imul(c,Z)|0)+Math.imul(p,Y)|0))<<13)|0;u=((o=o+Math.imul(p,Z)|0)+(i>>>13)|0)+(eb>>>26)|0,eb&=67108863,n=Math.imul(k,q),i=(i=Math.imul(k,L))+Math.imul(O,q)|0,o=Math.imul(O,L),n=n+Math.imul(S,V)|0,i=(i=i+Math.imul(S,z)|0)+Math.imul(w,V)|0,o=o+Math.imul(w,z)|0,n=n+Math.imul(y,Q)|0,i=(i=i+Math.imul(y,G)|0)+Math.imul(v,Q)|0,o=o+Math.imul(v,G)|0,n=n+Math.imul(h,Y)|0,i=(i=i+Math.imul(h,Z)|0)+Math.imul(g,Y)|0,o=o+Math.imul(g,Z)|0;var eS=(u+(n=n+Math.imul(c,$)|0)|0)+((8191&(i=(i=i+Math.imul(c,ee)|0)+Math.imul(p,$)|0))<<13)|0;u=((o=o+Math.imul(p,ee)|0)+(i>>>13)|0)+(eS>>>26)|0,eS&=67108863,n=Math.imul(A,q),i=(i=Math.imul(A,L))+Math.imul(I,q)|0,o=Math.imul(I,L),n=n+Math.imul(k,V)|0,i=(i=i+Math.imul(k,z)|0)+Math.imul(O,V)|0,o=o+Math.imul(O,z)|0,n=n+Math.imul(S,Q)|0,i=(i=i+Math.imul(S,G)|0)+Math.imul(w,Q)|0,o=o+Math.imul(w,G)|0,n=n+Math.imul(y,Y)|0,i=(i=i+Math.imul(y,Z)|0)+Math.imul(v,Y)|0,o=o+Math.imul(v,Z)|0,n=n+Math.imul(h,$)|0,i=(i=i+Math.imul(h,ee)|0)+Math.imul(g,$)|0,o=o+Math.imul(g,ee)|0;var ew=(u+(n=n+Math.imul(c,er)|0)|0)+((8191&(i=(i=i+Math.imul(c,en)|0)+Math.imul(p,er)|0))<<13)|0;u=((o=o+Math.imul(p,en)|0)+(i>>>13)|0)+(ew>>>26)|0,ew&=67108863,n=Math.imul(E,q),i=(i=Math.imul(E,L))+Math.imul(T,q)|0,o=Math.imul(T,L),n=n+Math.imul(A,V)|0,i=(i=i+Math.imul(A,z)|0)+Math.imul(I,V)|0,o=o+Math.imul(I,z)|0,n=n+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,G)|0)+Math.imul(O,Q)|0,o=o+Math.imul(O,G)|0,n=n+Math.imul(S,Y)|0,i=(i=i+Math.imul(S,Z)|0)+Math.imul(w,Y)|0,o=o+Math.imul(w,Z)|0,n=n+Math.imul(y,$)|0,i=(i=i+Math.imul(y,ee)|0)+Math.imul(v,$)|0,o=o+Math.imul(v,ee)|0,n=n+Math.imul(h,er)|0,i=(i=i+Math.imul(h,en)|0)+Math.imul(g,er)|0,o=o+Math.imul(g,en)|0;var e_=(u+(n=n+Math.imul(c,eo)|0)|0)+((8191&(i=(i=i+Math.imul(c,ea)|0)+Math.imul(p,eo)|0))<<13)|0;u=((o=o+Math.imul(p,ea)|0)+(i>>>13)|0)+(e_>>>26)|0,e_&=67108863,n=Math.imul(x,q),i=(i=Math.imul(x,L))+Math.imul(B,q)|0,o=Math.imul(B,L),n=n+Math.imul(E,V)|0,i=(i=i+Math.imul(E,z)|0)+Math.imul(T,V)|0,o=o+Math.imul(T,z)|0,n=n+Math.imul(A,Q)|0,i=(i=i+Math.imul(A,G)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,G)|0,n=n+Math.imul(k,Y)|0,i=(i=i+Math.imul(k,Z)|0)+Math.imul(O,Y)|0,o=o+Math.imul(O,Z)|0,n=n+Math.imul(S,$)|0,i=(i=i+Math.imul(S,ee)|0)+Math.imul(w,$)|0,o=o+Math.imul(w,ee)|0,n=n+Math.imul(y,er)|0,i=(i=i+Math.imul(y,en)|0)+Math.imul(v,er)|0,o=o+Math.imul(v,en)|0,n=n+Math.imul(h,eo)|0,i=(i=i+Math.imul(h,ea)|0)+Math.imul(g,eo)|0,o=o+Math.imul(g,ea)|0;var ek=(u+(n=n+Math.imul(c,el)|0)|0)+((8191&(i=(i=i+Math.imul(c,eu)|0)+Math.imul(p,el)|0))<<13)|0;u=((o=o+Math.imul(p,eu)|0)+(i>>>13)|0)+(ek>>>26)|0,ek&=67108863,n=Math.imul(M,q),i=(i=Math.imul(M,L))+Math.imul(D,q)|0,o=Math.imul(D,L),n=n+Math.imul(x,V)|0,i=(i=i+Math.imul(x,z)|0)+Math.imul(B,V)|0,o=o+Math.imul(B,z)|0,n=n+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,G)|0)+Math.imul(T,Q)|0,o=o+Math.imul(T,G)|0,n=n+Math.imul(A,Y)|0,i=(i=i+Math.imul(A,Z)|0)+Math.imul(I,Y)|0,o=o+Math.imul(I,Z)|0,n=n+Math.imul(k,$)|0,i=(i=i+Math.imul(k,ee)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,ee)|0,n=n+Math.imul(S,er)|0,i=(i=i+Math.imul(S,en)|0)+Math.imul(w,er)|0,o=o+Math.imul(w,en)|0,n=n+Math.imul(y,eo)|0,i=(i=i+Math.imul(y,ea)|0)+Math.imul(v,eo)|0,o=o+Math.imul(v,ea)|0,n=n+Math.imul(h,el)|0,i=(i=i+Math.imul(h,eu)|0)+Math.imul(g,el)|0,o=o+Math.imul(g,eu)|0;var eO=(u+(n=n+Math.imul(c,ec)|0)|0)+((8191&(i=(i=i+Math.imul(c,ep)|0)+Math.imul(p,ec)|0))<<13)|0;u=((o=o+Math.imul(p,ep)|0)+(i>>>13)|0)+(eO>>>26)|0,eO&=67108863,n=Math.imul(J,q),i=(i=Math.imul(J,L))+Math.imul(j,q)|0,o=Math.imul(j,L),n=n+Math.imul(M,V)|0,i=(i=i+Math.imul(M,z)|0)+Math.imul(D,V)|0,o=o+Math.imul(D,z)|0,n=n+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,G)|0)+Math.imul(B,Q)|0,o=o+Math.imul(B,G)|0,n=n+Math.imul(E,Y)|0,i=(i=i+Math.imul(E,Z)|0)+Math.imul(T,Y)|0,o=o+Math.imul(T,Z)|0,n=n+Math.imul(A,$)|0,i=(i=i+Math.imul(A,ee)|0)+Math.imul(I,$)|0,o=o+Math.imul(I,ee)|0,n=n+Math.imul(k,er)|0,i=(i=i+Math.imul(k,en)|0)+Math.imul(O,er)|0,o=o+Math.imul(O,en)|0,n=n+Math.imul(S,eo)|0,i=(i=i+Math.imul(S,ea)|0)+Math.imul(w,eo)|0,o=o+Math.imul(w,ea)|0,n=n+Math.imul(y,el)|0,i=(i=i+Math.imul(y,eu)|0)+Math.imul(v,el)|0,o=o+Math.imul(v,eu)|0,n=n+Math.imul(h,ec)|0,i=(i=i+Math.imul(h,ep)|0)+Math.imul(g,ec)|0,o=o+Math.imul(g,ep)|0;var eP=(u+(n=n+Math.imul(c,eh)|0)|0)+((8191&(i=(i=i+Math.imul(c,eg)|0)+Math.imul(p,eh)|0))<<13)|0;u=((o=o+Math.imul(p,eg)|0)+(i>>>13)|0)+(eP>>>26)|0,eP&=67108863,n=Math.imul(J,V),i=(i=Math.imul(J,z))+Math.imul(j,V)|0,o=Math.imul(j,z),n=n+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,G)|0)+Math.imul(D,Q)|0,o=o+Math.imul(D,G)|0,n=n+Math.imul(x,Y)|0,i=(i=i+Math.imul(x,Z)|0)+Math.imul(B,Y)|0,o=o+Math.imul(B,Z)|0,n=n+Math.imul(E,$)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,ee)|0,n=n+Math.imul(A,er)|0,i=(i=i+Math.imul(A,en)|0)+Math.imul(I,er)|0,o=o+Math.imul(I,en)|0,n=n+Math.imul(k,eo)|0,i=(i=i+Math.imul(k,ea)|0)+Math.imul(O,eo)|0,o=o+Math.imul(O,ea)|0,n=n+Math.imul(S,el)|0,i=(i=i+Math.imul(S,eu)|0)+Math.imul(w,el)|0,o=o+Math.imul(w,eu)|0,n=n+Math.imul(y,ec)|0,i=(i=i+Math.imul(y,ep)|0)+Math.imul(v,ec)|0,o=o+Math.imul(v,ep)|0;var eA=(u+(n=n+Math.imul(h,eh)|0)|0)+((8191&(i=(i=i+Math.imul(h,eg)|0)+Math.imul(g,eh)|0))<<13)|0;u=((o=o+Math.imul(g,eg)|0)+(i>>>13)|0)+(eA>>>26)|0,eA&=67108863,n=Math.imul(J,Q),i=(i=Math.imul(J,G))+Math.imul(j,Q)|0,o=Math.imul(j,G),n=n+Math.imul(M,Y)|0,i=(i=i+Math.imul(M,Z)|0)+Math.imul(D,Y)|0,o=o+Math.imul(D,Z)|0,n=n+Math.imul(x,$)|0,i=(i=i+Math.imul(x,ee)|0)+Math.imul(B,$)|0,o=o+Math.imul(B,ee)|0,n=n+Math.imul(E,er)|0,i=(i=i+Math.imul(E,en)|0)+Math.imul(T,er)|0,o=o+Math.imul(T,en)|0,n=n+Math.imul(A,eo)|0,i=(i=i+Math.imul(A,ea)|0)+Math.imul(I,eo)|0,o=o+Math.imul(I,ea)|0,n=n+Math.imul(k,el)|0,i=(i=i+Math.imul(k,eu)|0)+Math.imul(O,el)|0,o=o+Math.imul(O,eu)|0,n=n+Math.imul(S,ec)|0,i=(i=i+Math.imul(S,ep)|0)+Math.imul(w,ec)|0,o=o+Math.imul(w,ep)|0;var eI=(u+(n=n+Math.imul(y,eh)|0)|0)+((8191&(i=(i=i+Math.imul(y,eg)|0)+Math.imul(v,eh)|0))<<13)|0;u=((o=o+Math.imul(v,eg)|0)+(i>>>13)|0)+(eI>>>26)|0,eI&=67108863,n=Math.imul(J,Y),i=(i=Math.imul(J,Z))+Math.imul(j,Y)|0,o=Math.imul(j,Z),n=n+Math.imul(M,$)|0,i=(i=i+Math.imul(M,ee)|0)+Math.imul(D,$)|0,o=o+Math.imul(D,ee)|0,n=n+Math.imul(x,er)|0,i=(i=i+Math.imul(x,en)|0)+Math.imul(B,er)|0,o=o+Math.imul(B,en)|0,n=n+Math.imul(E,eo)|0,i=(i=i+Math.imul(E,ea)|0)+Math.imul(T,eo)|0,o=o+Math.imul(T,ea)|0,n=n+Math.imul(A,el)|0,i=(i=i+Math.imul(A,eu)|0)+Math.imul(I,el)|0,o=o+Math.imul(I,eu)|0,n=n+Math.imul(k,ec)|0,i=(i=i+Math.imul(k,ep)|0)+Math.imul(O,ec)|0,o=o+Math.imul(O,ep)|0;var eR=(u+(n=n+Math.imul(S,eh)|0)|0)+((8191&(i=(i=i+Math.imul(S,eg)|0)+Math.imul(w,eh)|0))<<13)|0;u=((o=o+Math.imul(w,eg)|0)+(i>>>13)|0)+(eR>>>26)|0,eR&=67108863,n=Math.imul(J,$),i=(i=Math.imul(J,ee))+Math.imul(j,$)|0,o=Math.imul(j,ee),n=n+Math.imul(M,er)|0,i=(i=i+Math.imul(M,en)|0)+Math.imul(D,er)|0,o=o+Math.imul(D,en)|0,n=n+Math.imul(x,eo)|0,i=(i=i+Math.imul(x,ea)|0)+Math.imul(B,eo)|0,o=o+Math.imul(B,ea)|0,n=n+Math.imul(E,el)|0,i=(i=i+Math.imul(E,eu)|0)+Math.imul(T,el)|0,o=o+Math.imul(T,eu)|0,n=n+Math.imul(A,ec)|0,i=(i=i+Math.imul(A,ep)|0)+Math.imul(I,ec)|0,o=o+Math.imul(I,ep)|0;var eE=(u+(n=n+Math.imul(k,eh)|0)|0)+((8191&(i=(i=i+Math.imul(k,eg)|0)+Math.imul(O,eh)|0))<<13)|0;u=((o=o+Math.imul(O,eg)|0)+(i>>>13)|0)+(eE>>>26)|0,eE&=67108863,n=Math.imul(J,er),i=(i=Math.imul(J,en))+Math.imul(j,er)|0,o=Math.imul(j,en),n=n+Math.imul(M,eo)|0,i=(i=i+Math.imul(M,ea)|0)+Math.imul(D,eo)|0,o=o+Math.imul(D,ea)|0,n=n+Math.imul(x,el)|0,i=(i=i+Math.imul(x,eu)|0)+Math.imul(B,el)|0,o=o+Math.imul(B,eu)|0,n=n+Math.imul(E,ec)|0,i=(i=i+Math.imul(E,ep)|0)+Math.imul(T,ec)|0,o=o+Math.imul(T,ep)|0;var eT=(u+(n=n+Math.imul(A,eh)|0)|0)+((8191&(i=(i=i+Math.imul(A,eg)|0)+Math.imul(I,eh)|0))<<13)|0;u=((o=o+Math.imul(I,eg)|0)+(i>>>13)|0)+(eT>>>26)|0,eT&=67108863,n=Math.imul(J,eo),i=(i=Math.imul(J,ea))+Math.imul(j,eo)|0,o=Math.imul(j,ea),n=n+Math.imul(M,el)|0,i=(i=i+Math.imul(M,eu)|0)+Math.imul(D,el)|0,o=o+Math.imul(D,eu)|0,n=n+Math.imul(x,ec)|0,i=(i=i+Math.imul(x,ep)|0)+Math.imul(B,ec)|0,o=o+Math.imul(B,ep)|0;var eN=(u+(n=n+Math.imul(E,eh)|0)|0)+((8191&(i=(i=i+Math.imul(E,eg)|0)+Math.imul(T,eh)|0))<<13)|0;u=((o=o+Math.imul(T,eg)|0)+(i>>>13)|0)+(eN>>>26)|0,eN&=67108863,n=Math.imul(J,el),i=(i=Math.imul(J,eu))+Math.imul(j,el)|0,o=Math.imul(j,eu),n=n+Math.imul(M,ec)|0,i=(i=i+Math.imul(M,ep)|0)+Math.imul(D,ec)|0,o=o+Math.imul(D,ep)|0;var ex=(u+(n=n+Math.imul(x,eh)|0)|0)+((8191&(i=(i=i+Math.imul(x,eg)|0)+Math.imul(B,eh)|0))<<13)|0;u=((o=o+Math.imul(B,eg)|0)+(i>>>13)|0)+(ex>>>26)|0,ex&=67108863,n=Math.imul(J,ec),i=(i=Math.imul(J,ep))+Math.imul(j,ec)|0,o=Math.imul(j,ep);var eB=(u+(n=n+Math.imul(M,eh)|0)|0)+((8191&(i=(i=i+Math.imul(M,eg)|0)+Math.imul(D,eh)|0))<<13)|0;u=((o=o+Math.imul(D,eg)|0)+(i>>>13)|0)+(eB>>>26)|0,eB&=67108863;var eC=(u+(n=Math.imul(J,eh))|0)+((8191&(i=(i=Math.imul(J,eg))+Math.imul(j,eh)|0))<<13)|0;return u=((o=Math.imul(j,eg))+(i>>>13)|0)+(eC>>>26)|0,eC&=67108863,l[0]=em,l[1]=ey,l[2]=ev,l[3]=eb,l[4]=eS,l[5]=ew,l[6]=e_,l[7]=ek,l[8]=eO,l[9]=eP,l[10]=eA,l[11]=eI,l[12]=eR,l[13]=eE,l[14]=eT,l[15]=eN,l[16]=ex,l[17]=eB,l[18]=eC,0!==u&&(l[19]=u,r.length++),r};function m(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}function y(e,t,r){return new v().mulp(e,t,r)}function v(e,t){this.x=e,this.y=t}Math.imul||(g=h),o.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?g(this,e,t):r<63?h(this,e,t):r<1024?m(this,e,t):y(this,e,t)},v.prototype.makeRBT=function(e){for(var t=Array(e),r=o.prototype._countBits(e)-1,n=0;n>=1;return n},v.prototype.permute=function(e,t,r,n,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*t;a>=26,t+=(i/67108864|0)+(o>>>26),this.words[r]=67108863&o}return 0!==t&&(this.words[r]=t,this.length++),this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=f(e);if(0===t.length)return new o(1);for(var r=this,n=0;n=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(t=0;t>>26-r}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var i,o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,u=0;u=0&&(0!==d||u>=i);u--){var c=0|this.words[u];this.words[u]=d<<26-o|c>>>o,d=c&s}return l&&0!==d&&(l.words[l.length++]=d),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(l/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(e,t){var r,n=this.length-e.length,i=this.clone(),a=e,s=0|a.words[a.length-1];0!=(n=26-this._countBits(s))&&(a=a.ushln(n),i.iushln(n),s=0|a.words[a.length-1]);var l=i.length-a.length;if("mod"!==t){(r=new o(null)).length=l+1,r.words=Array(r.length);for(var u=0;u=0;c--){var p=(0|i.words[a.length+c])*67108864+(0|i.words[a.length+c-1]);for(p=Math.min(p/s|0,67108863),i._ishlnsubmul(a,p,c);0!==i.negative;)p--,i.negative=0,i._ishlnsubmul(a,1,c),i.isZero()||(i.negative^=1);r&&(r.words[c]=p)}return r&&r.strip(),i.strip(),"div"!==t&&0!==n&&i.iushrn(n),{div:r||null,mod:i}},o.prototype.divmod=function(e,t,r){var i,a,s;return(n(!e.isZero()),this.isZero())?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(e)),{div:i,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):(this.negative&e.negative)!=0?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||0>this.cmp(e)?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modn(e.words[0]))}:this._wordDiv(e,t)},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modn=function(e){n(e<=67108863);for(var t=67108864%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},o.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),a=new o(0),s=new o(0),l=new o(1),u=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++u;for(var d=r.clone(),c=t.clone();!t.isZero();){for(var p=0,f=1;(t.words[0]&f)==0&&p<26;++p,f<<=1);if(p>0)for(t.iushrn(p);p-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(d),a.isub(c)),i.iushrn(1),a.iushrn(1);for(var h=0,g=1;(r.words[0]&g)==0&&h<26;++h,g<<=1);if(h>0)for(r.iushrn(h);h-- >0;)(s.isOdd()||l.isOdd())&&(s.iadd(d),l.isub(c)),s.iushrn(1),l.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(s),a.isub(l)):(r.isub(t),s.isub(i),l.isub(a))}return{a:s,b:l,gcd:r.iushln(u)}},o.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t,r=this,i=e.clone();r=0!==r.negative?r.umod(e):r.clone();for(var a=new o(1),s=new o(0),l=i.clone();r.cmpn(1)>0&&i.cmpn(1)>0;){for(var u=0,d=1;(r.words[0]&d)==0&&u<26;++u,d<<=1);if(u>0)for(r.iushrn(u);u-- >0;)a.isOdd()&&a.iadd(l),a.iushrn(1);for(var c=0,p=1;(i.words[0]&p)==0&&c<26;++c,p<<=1);if(c>0)for(i.iushrn(c);c-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);r.cmp(i)>=0?(r.isub(i),a.isub(s)):(i.isub(r),s.isub(a))}return 0>(t=0===r.cmpn(1)?a:s).cmpn(0)&&t.iadd(e),t},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return(1&this.words[0])==0},o.prototype.isOdd=function(){return(1&this.words[0])==1},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return -1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:ie.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){ni&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return -1===this.cmpn(e)},o.prototype.lt=function(e){return -1===this.cmp(e)},o.prototype.lten=function(e){return 0>=this.cmpn(e)},o.prototype.lte=function(e){return 0>=this.cmp(e)},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new P(e)},o.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var b={k256:null,p224:null,p192:null,p25519:null};function S(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function w(){S.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function _(){S.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function k(){S.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function O(){S.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function P(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function A(e){P.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}S.prototype._tmp=function(){var e=new o(null);return e.words=Array(Math.ceil(this.n/13)),e},S.prototype.ireduce=function(e){var t,r=e;do this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength();while(t>this.n);var n=t0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},S.prototype.split=function(e,t){e.iushrn(this.n,0,t)},S.prototype.imulK=function(e){return e.imul(this.k)},i(w,S),w.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i>>22,o=a}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},w.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){var t;if(b[e])return b[e];if("k256"===e)t=new w;else if("p224"===e)t=new _;else if("p192"===e)t=new k;else if("p25519"===e)t=new O;else throw Error("Unknown prime "+e);return b[e]=t,t},P.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},P.prototype._verify2=function(e,t){n((e.negative|t.negative)==0,"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},P.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},P.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},P.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},P.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},P.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return 0>r.cmpn(0)&&r.iadd(this.m),r._forceRed(this)},P.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return 0>r.cmpn(0)&&r.iadd(this.m),r},P.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},P.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},P.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},P.prototype.isqr=function(e){return this.imul(e,e.clone())},P.prototype.sqr=function(e){return this.mul(e,e)},P.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),l=s.redNeg(),u=this.m.subn(1).iushrn(1),d=this.m.bitLength();for(d=new o(2*d*d).toRed(this);0!==this.pow(d,u).cmp(l);)d.redIAdd(l);for(var c=this.pow(d,i),p=this.pow(e,i.addn(1).iushrn(1)),f=this.pow(e,i),h=a;0!==f.cmp(s);){for(var g=f,m=0;0!==g.cmp(s);m++)g=g.redSqr();n(m=0;i--){for(var d=t.words[i],c=u-1;c>=0;c--){var p=d>>c&1;if(a!==n[0]&&(a=this.sqr(a)),0===p&&0===s){l=0;continue}s<<=1,s|=p,(++l===r||0===i&&0===c)&&(a=this.mul(a,n[s]),l=0,s=0)}u=26}return a},P.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},P.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new A(e)},i(A,P),A.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},A.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},A.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):0>i.cmpn(0)&&(o=i.iadd(this.m)),o._forceRed(this)},A.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):0>i.cmpn(0)&&(a=i.iadd(this.m)),a._forceRed(this)},A.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},73266:function(e,t,r){"use strict";var n=r(57569)("%Object.defineProperty%",!0)||!1;if(n)try{n({},"a",{value:1})}catch(e){n=!1}e.exports=n},35034:function(e){"use strict";e.exports=EvalError},13821:function(e){"use strict";e.exports=Error},54899:function(e){"use strict";e.exports=RangeError},67267:function(e){"use strict";e.exports=ReferenceError},71587:function(e){"use strict";e.exports=SyntaxError},7797:function(e){"use strict";e.exports=TypeError},40273:function(e){"use strict";e.exports=URIError},70094:function(e){"use strict";var t,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};function i(e){console&&console.warn&&console.warn(e)}t=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var o=Number.isNaN||function(e){return e!=e};function a(){a.init.call(this)}e.exports=a,e.exports.once=v,a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var s=10;function l(e){if("function"!=typeof e)throw TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function u(e){return void 0===e._maxListeners?a.defaultMaxListeners:e._maxListeners}function d(e,t,r,n){if(l(r),void 0===(a=e._events)?(a=e._events=Object.create(null),e._eventsCount=0):(void 0!==a.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),a=e._events),s=a[t]),void 0===s)s=a[t]=r,++e._eventsCount;else if("function"==typeof s?s=a[t]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(o=u(e))>0&&s.length>o&&!s.warned){s.warned=!0;var o,a,s,d=Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");d.name="MaxListenersExceededWarning",d.emitter=e,d.type=t,d.count=s.length,i(d)}return e}function c(){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 p(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=c.bind(n);return i.listener=r,n.wrapFn=i,i}function f(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?y(i):g(i,i.length)}function h(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function g(e,t){for(var r=Array(t),n=0;n0&&(a=t[0]),a instanceof Error)throw a;var a,s=Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var l=o[e];if(void 0===l)return!1;if("function"==typeof l)n(l,this,t);else for(var u=l.length,d=g(l,u),r=0;r=0;o--)if(r[o]===t||r[o].listener===t){a=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():m(r,i),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,a||t)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0==arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0==arguments.length){var i,o=Object.keys(r);for(n=0;n=0;n--)this.removeListener(e,t[n]);return this},a.prototype.listeners=function(e){return f(this,e,!0)},a.prototype.rawListeners=function(e){return f(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):h.call(e,t)},a.prototype.listenerCount=h,a.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},58634:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",r=Object.prototype.toString,n=Math.max,i="[object Function]",o=function(e,t){for(var r=[],n=0;n1&&"boolean"!=typeof t)throw new u('"allowMissing" argument must be a boolean');if(null===N(/^%?[^%]*%?$/,e))throw new l("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=C(e),n=r.length>0?r[0]:"",i=M("%"+n+"%",t),o=i.name,a=i.value,s=!1,d=i.alias;d&&(n=d[0],R(r,I([0,1],d)));for(var c=1,p=!0;c=r.length){var y=f(a,h);a=(p=!!y)&&"get"in y&&!("originalValue"in y.get)?y.get:a[h]}else p=A(a,h),a=a[h];p&&!s&&(w[o]=a)}}return a}},6520:function(e){"use strict";"undefined"!=typeof self?e.exports=self:e.exports=window},224:function(e,t,r){"use strict";var n=r(96981),i=r(6520),o=r(90060),a=r(11953),s=o(),l=function(){return s};n(l,{getPolyfill:o,implementation:i,shim:a}),e.exports=l},90060:function(e,t,r){"use strict";var n=r(6520);e.exports=function(){return"object"==typeof r.g&&r.g&&r.g.Math===Math&&r.g.Array===Array?r.g:n}},11953:function(e,t,r){"use strict";var n=r(96981),i=r(90060);e.exports=function(){var e=i();if(n.supportsDescriptors){var t=Object.getOwnPropertyDescriptor(e,"globalThis");(!t||t.configurable&&(t.enumerable||!t.writable||globalThis!==e))&&Object.defineProperty(e,"globalThis",{configurable:!0,enumerable:!1,value:e,writable:!0})}else("object"!=typeof globalThis||globalThis!==e)&&(e.globalThis=e);return e}},42574:function(e,t,r){"use strict";var n=r(57569)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(e){n=null}e.exports=n},77729:function(e,t,r){"use strict";r.d(t,{Ps:function(){return eo}});var n,i,o=r(69703);function a(e){return"object"==typeof e&&null!==e}function s(e,t){if(!e)throw Error(null!=t?t:"Unexpected invariant triggered.")}let l=/\r\n|[\n\r]/g;function u(e,t){let r=0,n=1;for(let i of e.body.matchAll(l)){if("number"==typeof i.index||s(!1),i.index>=t)break;r=i.index+i[0].length,n+=1}return{line:n,column:t+1-r}}function d(e){return c(e.source,u(e.source,e.start))}function c(e,t){let r=e.locationOffset.column-1,n="".padStart(r)+e.body,i=t.line-1,o=e.locationOffset.line-1,a=t.line+o,s=1===t.line?r:0,l=t.column+s,u="".concat(e.name,":").concat(a,":").concat(l,"\n"),d=n.split(/\r\n|[\n\r]/g),c=d[i];if(c.length>120){let e=Math.floor(l/80),t=l%80,r=[];for(let e=0;e["|",e]),["|","^".padStart(t)],["|",r[e+1]]])}return u+p([["".concat(a-1," |"),d[i-1]],["".concat(a," |"),c],["|","^".padStart(l)],["".concat(a+1," |"),d[i+1]]])}function p(e){let t=e.filter(e=>{let[t,r]=e;return void 0!==r}),r=Math.max(...t.map(e=>{let[t]=e;return t.length}));return t.map(e=>{let[t,n]=e;return t.padStart(r)+(n?" "+n:"")}).join("\n")}function f(e){let t=e[0];return null==t||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}class h extends Error{get[Symbol.toStringTag](){return"GraphQLError"}toString(){let e=this.message;if(this.nodes)for(let t of this.nodes)t.loc&&(e+="\n\n"+d(t.loc));else if(this.source&&this.locations)for(let t of this.locations)e+="\n\n"+c(this.source,t);return e}toJSON(){let e={message:this.message};return null!=this.locations&&(e.locations=this.locations),null!=this.path&&(e.path=this.path),null!=this.extensions&&Object.keys(this.extensions).length>0&&(e.extensions=this.extensions),e}constructor(e,...t){var r,n,i;let{nodes:o,source:s,positions:l,path:d,originalError:c,extensions:p}=f(t);super(e),this.name="GraphQLError",this.path=null!=d?d:void 0,this.originalError=null!=c?c:void 0,this.nodes=g(Array.isArray(o)?o:o?[o]:void 0);let m=g(null===(r=this.nodes)||void 0===r?void 0:r.map(e=>e.loc).filter(e=>null!=e));this.source=null!=s?s:null==m?void 0:null===(n=m[0])||void 0===n?void 0:n.source,this.positions=null!=l?l:null==m?void 0:m.map(e=>e.start),this.locations=l&&s?l.map(e=>u(s,e)):null==m?void 0:m.map(e=>u(e.source,e.start));let y=a(null==c?void 0:c.extensions)?null==c?void 0:c.extensions:void 0;this.extensions=null!==(i=null!=p?p:y)&&void 0!==i?i:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),null!=c&&c.stack?Object.defineProperty(this,"stack",{value:c.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,h):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}}function g(e){return void 0===e||0===e.length?void 0:e}function m(e,t,r){return new h("Syntax Error: ".concat(r),{source:e,positions:[t]})}var y=r(68246);!function(e){e.QUERY="QUERY",e.MUTATION="MUTATION",e.SUBSCRIPTION="SUBSCRIPTION",e.FIELD="FIELD",e.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",e.FRAGMENT_SPREAD="FRAGMENT_SPREAD",e.INLINE_FRAGMENT="INLINE_FRAGMENT",e.VARIABLE_DEFINITION="VARIABLE_DEFINITION",e.SCHEMA="SCHEMA",e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.FIELD_DEFINITION="FIELD_DEFINITION",e.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.ENUM_VALUE="ENUM_VALUE",e.INPUT_OBJECT="INPUT_OBJECT",e.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"}(n||(n={}));var v=r(11258),b=r(58549),S=r(1357);!function(e){e.SOF="",e.EOF="",e.BANG="!",e.DOLLAR="$",e.AMP="&",e.PAREN_L="(",e.PAREN_R=")",e.SPREAD="...",e.COLON=":",e.EQUALS="=",e.AT="@",e.BRACKET_L="[",e.BRACKET_R="]",e.BRACE_L="{",e.PIPE="|",e.BRACE_R="}",e.NAME="Name",e.INT="Int",e.FLOAT="Float",e.STRING="String",e.BLOCK_STRING="BlockString",e.COMMENT="Comment"}(i||(i={}));class w{get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let e=this.token;if(e.kind!==i.EOF)do if(e.next)e=e.next;else{let t=E(this,e.end);e.next=t,t.prev=e,e=t}while(e.kind===i.COMMENT);return e}constructor(e){let t=new y.WU(i.SOF,0,0,0,0);this.source=e,this.lastToken=t,this.token=t,this.line=1,this.lineStart=0}}function _(e){return e===i.BANG||e===i.DOLLAR||e===i.AMP||e===i.PAREN_L||e===i.PAREN_R||e===i.SPREAD||e===i.COLON||e===i.EQUALS||e===i.AT||e===i.BRACKET_L||e===i.BRACKET_R||e===i.BRACE_L||e===i.PIPE||e===i.BRACE_R}function k(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function O(e,t){return P(e.charCodeAt(t))&&A(e.charCodeAt(t+1))}function P(e){return e>=55296&&e<=56319}function A(e){return e>=56320&&e<=57343}function I(e,t){let r=e.source.body.codePointAt(t);if(void 0===r)return i.EOF;if(r>=32&&r<=126){let e=String.fromCodePoint(r);return'"'===e?"'\"'":'"'.concat(e,'"')}return"U+"+r.toString(16).toUpperCase().padStart(4,"0")}function R(e,t,r,n,i){let o=e.line,a=1+r-e.lineStart;return new y.WU(t,r,n,o,a,i)}function E(e,t){let r=e.source.body,n=r.length,o=t;for(;o=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function J(e,t){let r=e.source.body;switch(r.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:"\n",size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw m(e.source,t,'Invalid character escape sequence: "'.concat(r.slice(t,t+2),'".'))}function j(e,t){let r=e.source.body,n=r.length,o=e.lineStart,a=t+3,s=a,l="",u=[];for(;a0||(0,q.a)(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||(0,q.a)(!1,"column in locationOffset is 1-indexed and must be positive.")}}function z(e){return F(e,V)}function W(e,t){return new Q(e,t).parseDocument()}class Q{parseName(){let e=this.expectToken(i.NAME);return this.node(e,{kind:v.h.NAME,value:e.value})}parseDocument(){return this.node(this._lexer.token,{kind:v.h.DOCUMENT,definitions:this.many(i.SOF,this.parseDefinition,i.EOF)})}parseDefinition(){if(this.peek(i.BRACE_L))return this.parseOperationDefinition();let e=this.peekDescription(),t=e?this._lexer.lookahead():this._lexer.token;if(t.kind===i.NAME){switch(t.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}if(e)throw m(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(t.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(t)}parseOperationDefinition(){let e;let t=this._lexer.token;if(this.peek(i.BRACE_L))return this.node(t,{kind:v.h.OPERATION_DEFINITION,operation:y.ku.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});let r=this.parseOperationType();return this.peek(i.NAME)&&(e=this.parseName()),this.node(t,{kind:v.h.OPERATION_DEFINITION,operation:r,name:e,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){let e=this.expectToken(i.NAME);switch(e.value){case"query":return y.ku.QUERY;case"mutation":return y.ku.MUTATION;case"subscription":return y.ku.SUBSCRIPTION}throw this.unexpected(e)}parseVariableDefinitions(){return this.optionalMany(i.PAREN_L,this.parseVariableDefinition,i.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:v.h.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(i.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(i.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let e=this._lexer.token;return this.expectToken(i.DOLLAR),this.node(e,{kind:v.h.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:v.h.SELECTION_SET,selections:this.many(i.BRACE_L,this.parseSelection,i.BRACE_R)})}parseSelection(){return this.peek(i.SPREAD)?this.parseFragment():this.parseField()}parseField(){let e,t;let r=this._lexer.token,n=this.parseName();return this.expectOptionalToken(i.COLON)?(e=n,t=this.parseName()):t=n,this.node(r,{kind:v.h.FIELD,alias:e,name:t,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(i.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(e){let t=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(i.PAREN_L,t,i.PAREN_R)}parseArgument(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this._lexer.token,r=this.parseName();return this.expectToken(i.COLON),this.node(t,{kind:v.h.ARGUMENT,name:r,value:this.parseValueLiteral(e)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){let e=this._lexer.token;this.expectToken(i.SPREAD);let t=this.expectOptionalKeyword("on");return!t&&this.peek(i.NAME)?this.node(e,{kind:v.h.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(e,{kind:v.h.INLINE_FRAGMENT,typeCondition:t?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){let e=this._lexer.token;return(this.expectKeyword("fragment"),!0===this._options.allowLegacyFragmentVariables)?this.node(e,{kind:v.h.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(e,{kind:v.h.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if("on"===this._lexer.token.value)throw this.unexpected();return this.parseName()}parseValueLiteral(e){let t=this._lexer.token;switch(t.kind){case i.BRACKET_L:return this.parseList(e);case i.BRACE_L:return this.parseObject(e);case i.INT:return this.advanceLexer(),this.node(t,{kind:v.h.INT,value:t.value});case i.FLOAT:return this.advanceLexer(),this.node(t,{kind:v.h.FLOAT,value:t.value});case i.STRING:case i.BLOCK_STRING:return this.parseStringLiteral();case i.NAME:switch(this.advanceLexer(),t.value){case"true":return this.node(t,{kind:v.h.BOOLEAN,value:!0});case"false":return this.node(t,{kind:v.h.BOOLEAN,value:!1});case"null":return this.node(t,{kind:v.h.NULL});default:return this.node(t,{kind:v.h.ENUM,value:t.value})}case i.DOLLAR:if(e){if(this.expectToken(i.DOLLAR),this._lexer.token.kind===i.NAME){let e=this._lexer.token.value;throw m(this._lexer.source,t.start,'Unexpected variable "$'.concat(e,'" in constant value.'))}throw this.unexpected(t)}return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){let e=this._lexer.token;return this.advanceLexer(),this.node(e,{kind:v.h.STRING,value:e.value,block:e.kind===i.BLOCK_STRING})}parseList(e){let t=()=>this.parseValueLiteral(e);return this.node(this._lexer.token,{kind:v.h.LIST,values:this.any(i.BRACKET_L,t,i.BRACKET_R)})}parseObject(e){let t=()=>this.parseObjectField(e);return this.node(this._lexer.token,{kind:v.h.OBJECT,fields:this.any(i.BRACE_L,t,i.BRACE_R)})}parseObjectField(e){let t=this._lexer.token,r=this.parseName();return this.expectToken(i.COLON),this.node(t,{kind:v.h.OBJECT_FIELD,name:r,value:this.parseValueLiteral(e)})}parseDirectives(e){let t=[];for(;this.peek(i.AT);)t.push(this.parseDirective(e));return t}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(e){let t=this._lexer.token;return this.expectToken(i.AT),this.node(t,{kind:v.h.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e)})}parseTypeReference(){let e;let t=this._lexer.token;if(this.expectOptionalToken(i.BRACKET_L)){let r=this.parseTypeReference();this.expectToken(i.BRACKET_R),e=this.node(t,{kind:v.h.LIST_TYPE,type:r})}else e=this.parseNamedType();return this.expectOptionalToken(i.BANG)?this.node(t,{kind:v.h.NON_NULL_TYPE,type:e}):e}parseNamedType(){return this.node(this._lexer.token,{kind:v.h.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(i.STRING)||this.peek(i.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("schema");let r=this.parseConstDirectives(),n=this.many(i.BRACE_L,this.parseOperationTypeDefinition,i.BRACE_R);return this.node(e,{kind:v.h.SCHEMA_DEFINITION,description:t,directives:r,operationTypes:n})}parseOperationTypeDefinition(){let e=this._lexer.token,t=this.parseOperationType();this.expectToken(i.COLON);let r=this.parseNamedType();return this.node(e,{kind:v.h.OPERATION_TYPE_DEFINITION,operation:t,type:r})}parseScalarTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");let r=this.parseName(),n=this.parseConstDirectives();return this.node(e,{kind:v.h.SCALAR_TYPE_DEFINITION,description:t,name:r,directives:n})}parseObjectTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");let r=this.parseName(),n=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(e,{kind:v.h.OBJECT_TYPE_DEFINITION,description:t,name:r,interfaces:n,directives:i,fields:o})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(i.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(i.BRACE_L,this.parseFieldDefinition,i.BRACE_R)}parseFieldDefinition(){let e=this._lexer.token,t=this.parseDescription(),r=this.parseName(),n=this.parseArgumentDefs();this.expectToken(i.COLON);let o=this.parseTypeReference(),a=this.parseConstDirectives();return this.node(e,{kind:v.h.FIELD_DEFINITION,description:t,name:r,arguments:n,type:o,directives:a})}parseArgumentDefs(){return this.optionalMany(i.PAREN_L,this.parseInputValueDef,i.PAREN_R)}parseInputValueDef(){let e;let t=this._lexer.token,r=this.parseDescription(),n=this.parseName();this.expectToken(i.COLON);let o=this.parseTypeReference();this.expectOptionalToken(i.EQUALS)&&(e=this.parseConstValueLiteral());let a=this.parseConstDirectives();return this.node(t,{kind:v.h.INPUT_VALUE_DEFINITION,description:r,name:n,type:o,defaultValue:e,directives:a})}parseInterfaceTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");let r=this.parseName(),n=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(e,{kind:v.h.INTERFACE_TYPE_DEFINITION,description:t,name:r,interfaces:n,directives:i,fields:o})}parseUnionTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");let r=this.parseName(),n=this.parseConstDirectives(),i=this.parseUnionMemberTypes();return this.node(e,{kind:v.h.UNION_TYPE_DEFINITION,description:t,name:r,directives:n,types:i})}parseUnionMemberTypes(){return this.expectOptionalToken(i.EQUALS)?this.delimitedMany(i.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");let r=this.parseName(),n=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();return this.node(e,{kind:v.h.ENUM_TYPE_DEFINITION,description:t,name:r,directives:n,values:i})}parseEnumValuesDefinition(){return this.optionalMany(i.BRACE_L,this.parseEnumValueDefinition,i.BRACE_R)}parseEnumValueDefinition(){let e=this._lexer.token,t=this.parseDescription(),r=this.parseEnumValueName(),n=this.parseConstDirectives();return this.node(e,{kind:v.h.ENUM_VALUE_DEFINITION,description:t,name:r,directives:n})}parseEnumValueName(){if("true"===this._lexer.token.value||"false"===this._lexer.token.value||"null"===this._lexer.token.value)throw m(this._lexer.source,this._lexer.token.start,"".concat(G(this._lexer.token)," is reserved and cannot be used for an enum value."));return this.parseName()}parseInputObjectTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");let r=this.parseName(),n=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();return this.node(e,{kind:v.h.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:r,directives:n,fields:i})}parseInputFieldsDefinition(){return this.optionalMany(i.BRACE_L,this.parseInputValueDef,i.BRACE_R)}parseTypeSystemExtension(){let e=this._lexer.lookahead();if(e.kind===i.NAME)switch(e.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(e)}parseSchemaExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");let t=this.parseConstDirectives(),r=this.optionalMany(i.BRACE_L,this.parseOperationTypeDefinition,i.BRACE_R);if(0===t.length&&0===r.length)throw this.unexpected();return this.node(e,{kind:v.h.SCHEMA_EXTENSION,directives:t,operationTypes:r})}parseScalarTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");let t=this.parseName(),r=this.parseConstDirectives();if(0===r.length)throw this.unexpected();return this.node(e,{kind:v.h.SCALAR_TYPE_EXTENSION,name:t,directives:r})}parseObjectTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");let t=this.parseName(),r=this.parseImplementsInterfaces(),n=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(0===r.length&&0===n.length&&0===i.length)throw this.unexpected();return this.node(e,{kind:v.h.OBJECT_TYPE_EXTENSION,name:t,interfaces:r,directives:n,fields:i})}parseInterfaceTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");let t=this.parseName(),r=this.parseImplementsInterfaces(),n=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(0===r.length&&0===n.length&&0===i.length)throw this.unexpected();return this.node(e,{kind:v.h.INTERFACE_TYPE_EXTENSION,name:t,interfaces:r,directives:n,fields:i})}parseUnionTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");let t=this.parseName(),r=this.parseConstDirectives(),n=this.parseUnionMemberTypes();if(0===r.length&&0===n.length)throw this.unexpected();return this.node(e,{kind:v.h.UNION_TYPE_EXTENSION,name:t,directives:r,types:n})}parseEnumTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");let t=this.parseName(),r=this.parseConstDirectives(),n=this.parseEnumValuesDefinition();if(0===r.length&&0===n.length)throw this.unexpected();return this.node(e,{kind:v.h.ENUM_TYPE_EXTENSION,name:t,directives:r,values:n})}parseInputObjectTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");let t=this.parseName(),r=this.parseConstDirectives(),n=this.parseInputFieldsDefinition();if(0===r.length&&0===n.length)throw this.unexpected();return this.node(e,{kind:v.h.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:r,fields:n})}parseDirectiveDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(i.AT);let r=this.parseName(),n=this.parseArgumentDefs(),o=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");let a=this.parseDirectiveLocations();return this.node(e,{kind:v.h.DIRECTIVE_DEFINITION,description:t,name:r,arguments:n,repeatable:o,locations:a})}parseDirectiveLocations(){return this.delimitedMany(i.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){let e=this._lexer.token,t=this.parseName();if(Object.prototype.hasOwnProperty.call(n,t.value))return t;throw this.unexpected(e)}node(e,t){return!0!==this._options.noLocation&&(t.loc=new y.Ye(e,this._lexer.lastToken,this._lexer.source)),t}peek(e){return this._lexer.token.kind===e}expectToken(e){let t=this._lexer.token;if(t.kind===e)return this.advanceLexer(),t;throw m(this._lexer.source,t.start,"Expected ".concat(K(e),", found ").concat(G(t),"."))}expectOptionalToken(e){return this._lexer.token.kind===e&&(this.advanceLexer(),!0)}expectKeyword(e){let t=this._lexer.token;if(t.kind===i.NAME&&t.value===e)this.advanceLexer();else throw m(this._lexer.source,t.start,'Expected "'.concat(e,'", found ').concat(G(t),"."))}expectOptionalKeyword(e){let t=this._lexer.token;return t.kind===i.NAME&&t.value===e&&(this.advanceLexer(),!0)}unexpected(e){let t=null!=e?e:this._lexer.token;return m(this._lexer.source,t.start,"Unexpected ".concat(G(t),"."))}any(e,t,r){this.expectToken(e);let n=[];for(;!this.expectOptionalToken(r);)n.push(t.call(this));return n}optionalMany(e,t,r){if(this.expectOptionalToken(e)){let e=[];do e.push(t.call(this));while(!this.expectOptionalToken(r));return e}return[]}many(e,t,r){this.expectToken(e);let n=[];do n.push(t.call(this));while(!this.expectOptionalToken(r));return n}delimitedMany(e,t){this.expectOptionalToken(e);let r=[];do r.push(t.call(this));while(this.expectOptionalToken(e));return r}advanceLexer(){let{maxTokens:e}=this._options,t=this._lexer.advance();if(void 0!==e&&t.kind!==i.EOF&&(++this._tokenCounter,this._tokenCounter>e))throw m(this._lexer.source,t.start,"Document contains more that ".concat(e," tokens. Parsing aborted."))}constructor(e,t={}){let r=z(e)?e:new V(e);this._lexer=new w(r),this._options=t,this._tokenCounter=0}}function G(e){let t=e.value;return K(e.kind)+(null!=t?' "'.concat(t,'"'):"")}function K(e){return _(e)?'"'.concat(e,'"'):e}var Y=new Map,Z=new Map,X=!0,$=!1;function ee(e){return e.replace(/[\s,]+/g," ").trim()}function et(e){return ee(e.source.body.substring(e.start,e.end))}function er(e){var t=new Set,r=[];return e.definitions.forEach(function(e){if("FragmentDefinition"===e.kind){var n=e.name.value,i=et(e.loc),o=Z.get(n);o&&!o.has(i)?X&&console.warn("Warning: fragment with name "+n+" already exists.\ngraphql-tag enforces all fragment names across your application to be unique; read more about\nthis in the docs: http://dev.apollodata.com/core/fragments.html#unique-names"):o||Z.set(n,o=new Set),o.add(i),t.has(i)||(t.add(i),r.push(e))}else r.push(e)}),(0,o.pi)((0,o.pi)({},e),{definitions:r})}function en(e){var t=new Set(e.definitions);t.forEach(function(e){e.loc&&delete e.loc,Object.keys(e).forEach(function(r){var n=e[r];n&&"object"==typeof n&&t.add(n)})});var r=e.loc;return r&&(delete r.startToken,delete r.endToken),e}function ei(e){var t=ee(e);if(!Y.has(t)){var r=W(e,{experimentalFragmentVariables:$,allowLegacyFragmentVariables:$});if(!r||"Document"!==r.kind)throw Error("Not a valid GraphQL document.");Y.set(t,en(er(r)))}return Y.get(t)}function eo(e){for(var t=[],r=1;r=this._blockSize;){for(var a=this._blockOffset;a0;++s)this._length[s]+=l,(l=this._length[s]/4294967296|0)>0&&(this._length[s]-=4294967296*l);return this},a.prototype._update=function(){throw Error("_update is not implemented")},a.prototype.digest=function(e){if(this._finalized)throw Error("Digest already called");this._finalized=!0;var t=this._digest();void 0!==e&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return t},a.prototype._digest=function(){throw Error("_digest is not implemented")},e.exports=a},34562:function(e){"use strict";function t(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var r={};function n(e,n,i){function o(e,t,r){return"string"==typeof n?n:n(e,t,r)}i||(i=Error);var a=function(e){function r(t,r,n){return e.call(this,o(t,r,n))||this}return t(r,e),r}(i);a.prototype.name=i.name,a.prototype.code=e,r[e]=a}function i(e,t){if(!Array.isArray(e))return"of ".concat(t," ").concat(String(e));var r=e.length;return(e=e.map(function(e){return String(e)}),r>2)?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}function o(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function a(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function s(e,t,r){return"number"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}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,r){if("string"==typeof t&&o(t,"not ")?(n="must not be",t=t.replace(/^not /,"")):n="must be",a(e," argument"))l="The ".concat(e," ").concat(n," ").concat(i(t,"type"));else{var n,l,u=s(e,".")?"property":"argument";l='The "'.concat(e,'" ').concat(u," ").concat(n," ").concat(i(t,"type"))}return l+". Received type ".concat(typeof r)},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.q=r},85992:function(e,t,r){"use strict";var n=r(49079),i=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=d;var o=r(3497),a=r(80838);r(39541)(d,o);for(var s=i(a.prototype),l=0;l0){if("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===c.prototype||(t=f(t)),n)s.endEmitted?O(e,new k):T(e,s,t,!0);else if(s.ended)O(e,new w);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(t=s.decoder.write(t),s.objectMode||0!==t.length?T(e,s,t,!1):J(e,s)):T(e,s,t,!1)}}else n||(s.reading=!1,J(e,s));return!s.ended&&(s.length=x?e=x:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function C(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=B(e)),e<=t.length)?e:t.ended?t.length:(t.needReadable=!0,0)}function M(e,t){if(i("onEofChunk"),!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?D(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,U(e)))}}function D(e){var t=e._readableState;i("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(i("emitReadable",t.flowing),t.emittedReadable=!0,l.nextTick(U,e))}function U(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,z(e)}function J(e,t){t.readingMore||(t.readingMore=!0,l.nextTick(j,e,t))}function j(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function L(e){i("readable nexttick read 0"),e.read(0)}function F(e,t){t.resumeScheduled||(t.resumeScheduled=!0,l.nextTick(V,e,t))}function V(e,t){i("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),z(e),t.flowing&&!t.reading&&e.read(0)}function z(e){var t=e._readableState;for(i("flow",t.flowing);t.flowing&&null!==e.read(););}function W(e,t){var r;return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r)}function Q(e){var t=e._readableState;i("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,l.nextTick(G,t,e))}function G(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 r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function K(e,t){for(var r=0,n=e.length;r=r.highWaterMark:r.length>0)||r.ended))return i("read: emitReadable",r.length,r.ended),0===r.length&&r.ended?Q(this):D(this),null;if(0===(e=C(e,r))&&r.ended)return 0===r.length&&Q(this),null;var o=r.needReadable;return i("need readable",o),(0===r.length||r.length-e0?W(e,r):null)?(r.needReadable=r.length<=r.highWaterMark,e=0):(r.length-=e,r.awaitDrain=0),0===r.length&&(r.ended||(r.needReadable=!0),n!==e&&r.ended&&Q(this)),null!==t&&this.emit("data",t),t},R.prototype._read=function(e){O(this,new _("_read()"))},R.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e)}n.pipesCount+=1,i("pipe count=%d opts=%j",n.pipesCount,t);var o=t&&!1===t.end||e===l.stdout||e===l.stderr?y:s;function a(e,t){i("onunpipe"),e===r&&t&&!1===t.hasUnpiped&&(t.hasUnpiped=!0,p())}function s(){i("onend"),e.end()}n.endEmitted?l.nextTick(o):r.once("end",o),e.on("unpipe",a);var d=H(r);e.on("drain",d);var c=!1;function p(){i("cleanup"),e.removeListener("close",g),e.removeListener("finish",m),e.removeListener("drain",d),e.removeListener("error",h),e.removeListener("unpipe",a),r.removeListener("end",s),r.removeListener("end",y),r.removeListener("data",f),c=!0,n.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&d()}function f(t){i("ondata");var o=e.write(t);i("dest.write",o),!1===o&&((1===n.pipesCount&&n.pipes===e||n.pipesCount>1&&-1!==K(n.pipes,e))&&!c&&(i("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function h(t){i("onerror",t),y(),e.removeListener("error",h),0===u(e,"error")&&O(e,t)}function g(){e.removeListener("finish",m),y()}function m(){i("onfinish"),e.removeListener("close",g),y()}function y(){i("unpipe"),r.unpipe(e)}return r.on("data",f),A(e,"error",h),e.once("close",g),e.once("finish",m),e.emit("pipe",r),n.flowing||(i("pipe resume"),r.resume()),e},R.prototype.unpipe=function(e){var t=this._readableState,r={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,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o0,!1!==n.flowing&&this.resume()):"readable"!==e||n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,i("on readable",n.length,n.reading),n.length?D(this):n.reading||l.nextTick(L,this)),r},R.prototype.addListener=R.prototype.on,R.prototype.removeListener=function(e,t){var r=d.prototype.removeListener.call(this,e,t);return"readable"===e&&l.nextTick(q,this),r},R.prototype.removeAllListeners=function(e){var t=d.prototype.removeAllListeners.apply(this,arguments);return("readable"===e||void 0===e)&&l.nextTick(q,this),t},R.prototype.resume=function(){var e=this._readableState;return e.flowing||(i("resume"),e.flowing=!e.readableListening,F(this,e)),e.paused=!1,this},R.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},R.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var o in e.on("end",function(){if(i("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)}),e.on("data",function(o){i("wrapped data"),r.decoder&&(o=r.decoder.write(o)),(!r.objectMode||null!=o)&&(r.objectMode||o&&o.length)&&(t.push(o)||(n=!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-1))throw new k(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(I.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(I.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),I.prototype._write=function(e,t,r){r(new y("_write()"))},I.prototype._writev=null,I.prototype.end=function(e,t,r){var n=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||F(this,n,r),this},Object.defineProperty(I.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(I.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),I.prototype.destroy=f.destroy,I.prototype._undestroy=f.undestroy,I.prototype._destroy=function(e,t){t(e)}},79601:function(e,t,r){"use strict";var n,i=r(49079);function o(e,t,r){return(t=a(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e){var t=s(e,"string");return"symbol"==typeof t?t:String(t)}function s(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var l=r(7078),u=Symbol("lastResolve"),d=Symbol("lastReject"),c=Symbol("error"),p=Symbol("ended"),f=Symbol("lastPromise"),h=Symbol("handlePromise"),g=Symbol("stream");function m(e,t){return{value:e,done:t}}function y(e){var t=e[u];if(null!==t){var r=e[g].read();null!==r&&(e[f]=null,e[u]=null,e[d]=null,t(m(r,!1)))}}function v(e){i.nextTick(y,e)}function b(e,t){return function(r,n){e.then(function(){if(t[p]){r(m(void 0,!0));return}t[h](r,n)},n)}}var S=Object.getPrototypeOf(function(){}),w=Object.setPrototypeOf((o(n={get stream(){return this[g]},next:function(){var e,t=this,r=this[c];if(null!==r)return Promise.reject(r);if(this[p])return Promise.resolve(m(void 0,!0));if(this[g].destroyed)return new Promise(function(e,r){i.nextTick(function(){t[c]?r(t[c]):e(m(void 0,!0))})});var n=this[f];if(n)e=new Promise(b(n,this));else{var o=this[g].read();if(null!==o)return Promise.resolve(m(o,!1));e=new Promise(this[h])}return this[f]=e,e}},Symbol.asyncIterator,function(){return this}),o(n,"return",function(){var e=this;return new Promise(function(t,r){e[g].destroy(null,function(e){if(e){r(e);return}t(m(void 0,!0))})})}),n),S),_=function(e){var t,r=Object.create(w,(o(t={},g,{value:e,writable:!0}),o(t,u,{value:null,writable:!0}),o(t,d,{value:null,writable:!0}),o(t,c,{value:null,writable:!0}),o(t,p,{value:e._readableState.endEmitted,writable:!0}),o(t,h,{value:function(e,t){var n=r[g].read();n?(r[f]=null,r[u]=null,r[d]=null,e(m(n,!1))):(r[u]=e,r[d]=t)},writable:!0}),t));return r[f]=null,l(e,function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[d];null!==t&&(r[f]=null,r[u]=null,r[d]=null,t(e)),r[c]=e;return}var n=r[u];null!==n&&(r[f]=null,r[u]=null,r[d]=null,n(m(void 0,!0))),r[p]=!0}),e.on("readable",v.bind(null,r)),r};e.exports=_},43179:function(e,t,r){"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function i(e){for(var t=1;t0?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,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return c.alloc(0);for(var t=c.allocUnsafe(e>>>0),r=this.head,n=0;r;)h(r.data,t,n),n+=r.data.length,r=r.next;return t}},{key:"consume",value:function(e,t){var r;return ei.length?i.length:e;if(o===i.length?n+=i:n+=i.slice(0,e),0==(e-=o)){o===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=c.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var i=r.data,o=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,o),0==(e-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,t}},{key:f,value:function(e,t){return p(this,i(i({},t),{},{depth:0,customInspect:!1}))}}]),e}()},37877:function(e,t,r){"use strict";var n=r(49079);function i(e,t){var r=this,i=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return i||s?t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,n.nextTick(l,this,e)):n.nextTick(l,this,e)):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?r._writableState?r._writableState.errorEmitted?n.nextTick(a,r):(r._writableState.errorEmitted=!0,n.nextTick(o,r,e)):n.nextTick(o,r,e):t?(n.nextTick(a,r),t(e)):n.nextTick(a,r)})),this}function o(e,t){l(e,t),a(e)}function a(e){(!e._writableState||e._writableState.emitClose)&&(!e._readableState||e._readableState.emitClose)&&e.emit("close")}function s(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function l(e,t){e.emit("error",t)}function u(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}e.exports={destroy:i,undestroy:s,errorOrDestroy:u}},7078:function(e,t,r){"use strict";var n=r(34562).q.ERR_STREAM_PREMATURE_CLOSE;function i(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=Array(r),i=0;i0,function(t){e||(e=t),t&&o.forEach(c),a||(o.forEach(c),i(e))})});return r.reduce(p)}e.exports=h},34122:function(e,t,r){"use strict";var n=r(34562).q.ERR_INVALID_OPT_VALUE;function i(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}function o(e,t,r,o){var a=i(t,o,r);if(null!=a){if(!(isFinite(a)&&Math.floor(a)===a)||a<0)throw new n(o?r:"highWaterMark",a);return Math.floor(a)}return e.objectMode?16:16384}e.exports={getHighWaterMark:o}},82431:function(e,t,r){"use strict";e.exports=r(70094).EventEmitter},49515:function(e,t,r){"use strict";(t=e.exports=r(3497)).Stream=t,t.Readable=t,t.Writable=r(80838),t.Duplex=r(85992),t.Transform=r(95113),t.PassThrough=r(80089),t.finished=r(7078),t.pipeline=r(64336)},52689:function(e,t,r){var n=t;n.utils=r(34710),n.common=r(95553),n.sha=r(9216),n.ripemd=r(63932),n.hmac=r(28401),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},95553:function(e,t,r){"use strict";var n=r(34710),i=r(37074);function o(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}t.BlockHash=o,o.prototype.update=function(e,t){if(e=n.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var r=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=n.join32(e,0,e.length-r,this.endian);for(var i=0;i>>24&255,n[i++]=e>>>16&255,n[i++]=e>>>8&255,n[i++]=255&e}else for(o=8,n[i++]=255&e,n[i++]=e>>>8&255,n[i++]=e>>>16&255,n[i++]=e>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0;othis.blockSize&&(e=new this.Hash().update(e).digest()),i(e.length<=this.blockSize);for(var t=e.length;t>>3}function c(e){return n(e,17)^n(e,19)^e>>>10}t.ft_1=i,t.ch32=o,t.maj32=a,t.p32=s,t.s0_256=l,t.s1_256=u,t.g0_256=d,t.g1_256=c},34710:function(e,t,r){"use strict";var n=r(37074),i=r(39541);function o(e,t){return(64512&e.charCodeAt(t))==55296&&!(t<0)&&!(t+1>=e.length)&&(64512&e.charCodeAt(t+1))==56320}function a(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"==typeof e){if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/ig,"")).length%2!=0&&(e="0"+e),i=0;i>6|192:(o(e,i)?(a=65536+((1023&a)<<10)+(1023&e.charCodeAt(++i)),r[n++]=a>>18|240,r[n++]=a>>12&63|128):r[n++]=a>>12|224,r[n++]=a>>6&63|128),r[n++]=63&a|128)}}else for(i=0;i>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function u(e,t){for(var r="",n=0;n>>0;return s}function f(e,t){for(var r=Array(4*e.length),n=0,i=0;n>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r}function h(e,t){return e>>>t|e<<32-t}function g(e,t){return e<>>32-t}function m(e,t){return e+t>>>0}function y(e,t,r){return e+t+r>>>0}function v(e,t,r,n){return e+t+r+n>>>0}function b(e,t,r,n,i){return e+t+r+n+i>>>0}function S(e,t,r,n){var i=e[t],o=n+e[t+1]>>>0,a=(o>>0,e[t+1]=o}function w(e,t,r,n){return(t+n>>>0>>0}function _(e,t,r,n){return t+n>>>0}function k(e,t,r,n,i,o,a,s){var l,u=t;return e+r+i+a+(l=0+((u=u+n>>>0)>>0)>>0)>>0}function O(e,t,r,n,i,o,a,s){return t+n+o+s>>>0}function P(e,t,r,n,i,o,a,s,l,u){var d,c=t;return e+r+i+a+l+(d=0+((c=c+n>>>0)>>0)>>0)>>0)>>0}function A(e,t,r,n,i,o,a,s,l,u){return t+n+o+s+u>>>0}function I(e,t,r){return(t<<32-r|e>>>r)>>>0}function R(e,t,r){return(e<<32-r|t>>>r)>>>0}function E(e,t,r){return e>>>r}function T(e,t,r){return(e<<32-r|t>>>r)>>>0}t.inherits=i,t.toArray=a,t.toHex=s,t.htonl=l,t.toHex32=u,t.zero2=d,t.zero8=c,t.join32=p,t.split32=f,t.rotr32=h,t.rotl32=g,t.sum32=m,t.sum32_3=y,t.sum32_4=v,t.sum32_5=b,t.sum64=S,t.sum64_hi=w,t.sum64_lo=_,t.sum64_4_hi=k,t.sum64_4_lo=O,t.sum64_5_hi=P,t.sum64_5_lo=A,t.rotr64_hi=I,t.rotr64_lo=R,t.shr64_hi=E,t.shr64_lo=T},96215:function(e,t,r){"use strict";var n=Function.prototype.call,i=Object.prototype.hasOwnProperty,o=r(60642);e.exports=o.call(n,i)},36418:function(e,t,r){"use strict";var n=r(52689),i=r(61556),o=r(37074);function a(e){if(!(this instanceof a))return new a(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=i.toArray(e.entropy,e.entropyEnc||"hex"),r=i.toArray(e.nonce,e.nonceEnc||"hex"),n=i.toArray(e.pers,e.persEnc||"hex");o(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}e.exports=a,a.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=Array(this.outLen/8),this.V=Array(this.outLen/8);for(var i=0;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},a.prototype.generate=function(e,t,r,n){if(this._reseed>this.reseedInterval)throw Error("Reseed is required");"string"!=typeof t&&(n=r,r=t,t=null),r&&(r=i.toArray(r,n||"hex"),this._update(r));for(var o=[];o.length */t.read=function(e,t,r,n,i){var o,a,s=8*i-n-1,l=(1<>1,d=-7,c=r?i-1:0,p=r?-1:1,f=e[t+c];for(c+=p,o=f&(1<<-d)-1,f>>=-d,d+=s;d>0;o=256*o+e[t+c],c+=p,d-=8);for(a=o&(1<<-d)-1,o>>=-d,d+=n;d>0;a=256*a+e[t+c],c+=p,d-=8);if(0===o)o=1-u;else{if(o===l)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,n),o-=u}return(f?-1:1)*a*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var a,s,l,u=8*o-i-1,d=(1<>1,p=23===i?5960464477539062e-23:0,f=n?0:o-1,h=n?1:-1,g=t<0||0===t&&1/t<0?1:0;for(isNaN(t=Math.abs(t))||t===1/0?(s=isNaN(t)?1:0,a=d):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),a+c>=1?t+=p/l:t+=p*Math.pow(2,1-c),t*l>=2&&(a++,l/=2),a+c>=d?(s=0,a=d):a+c>=1?(s=(t*l-1)*Math.pow(2,i),a+=c):(s=t*Math.pow(2,c-1)*Math.pow(2,i),a=0));i>=8;e[r+f]=255&s,f+=h,s/=256,i-=8);for(a=a<0;e[r+f]=255&a,f+=h,a/=256,u-=8);e[r+f-h]|=128*g}},39541:function(e){"use strict";"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 r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},66337:function(e,t,r){"use strict";var n=null;n="undefined"!=typeof WebSocket?WebSocket:"undefined"!=typeof MozWebSocket?MozWebSocket:void 0!==r.g?r.g.WebSocket||r.g.MozWebSocket:window.WebSocket||window.MozWebSocket,e.exports=n},99857:function(e,t,r){"use strict";var n,i=r(49079);!/** * [js-sha3]{@link https://github.com/emn178/js-sha3} * * @version 0.8.0 * @author Chen, Yi-Cyuan [emn178@gmail.com] * @copyright Chen, Yi-Cyuan 2015-2018 * @license MIT - */function(){var o="input is invalid type",a="finalize already called",s=!0,l=window;l.JS_SHA3_NO_WINDOW&&(s=!1);var u=!s&&"object"==typeof self;!l.JS_SHA3_NO_NODE_JS&&"object"==typeof i&&i.versions&&i.versions.node?l=r.g:u&&(l=self);var d=!l.JS_SHA3_NO_COMMON_JS&&e.exports,c=r.amdO,p=!l.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,f="0123456789abcdef".split(""),h=[31,7936,2031616,520093696],g=[4,1024,262144,67108864],m=[1,256,65536,16777216],y=[6,1536,393216,100663296],v=[0,8,16,24],b=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],S=[224,256,384,512],w=[128,256],_=["hex","buffer","arrayBuffer","array","digest"],k={128:168,256:136};(l.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),p&&(l.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(e){return"object"==typeof e&&e.buffer&&e.buffer.constructor===ArrayBuffer});for(var O=function(e,t,r){return function(n){return new j(e,t,e).update(n)[r]()}},P=function(e,t,r){return function(n,i){return new j(e,t,i).update(n)[r]()}},A=function(e,t,r){return function(t,n,i,o){return N["cshake"+e].update(t,n,i,o)[r]()}},I=function(e,t,r){return function(t,n,i,o){return N["kmac"+e].update(t,n,i,o)[r]()}},R=function(e,t,r,n){for(var i=0;i<_.length;++i){var o=_[i];e[o]=t(r,n,o)}return e},E=function(e,t){var r=O(e,t,"hex");return r.create=function(){return new j(e,t,e)},r.update=function(e){return r.create().update(e)},R(r,O,e,t)},T=[{name:"keccak",padding:m,bits:S,createMethod:E},{name:"sha3",padding:y,bits:S,createMethod:E},{name:"shake",padding:h,bits:w,createMethod:function(e,t){var r=P(e,t,"hex");return r.create=function(r){return new j(e,t,r)},r.update=function(e,t){return r.create(t).update(e)},R(r,P,e,t)}},{name:"cshake",padding:g,bits:w,createMethod:function(e,t){var r=k[e],n=A(e,t,"hex");return n.create=function(n,i,o){return i||o?new j(e,t,n).bytepad([i,o],r):N["shake"+e].create(n)},n.update=function(e,t,r,i){return n.create(t,r,i).update(e)},R(n,A,e,t)}},{name:"kmac",padding:g,bits:w,createMethod:function(e,t){var r=k[e],n=I(e,t,"hex");return n.create=function(n,i,o){return new H(e,t,i).bytepad(["KMAC",o],r).bytepad([n],r)},n.update=function(e,t,r,i){return n.create(e,r,i).update(t)},R(n,I,e,t)}}],N={},x=[],B=0;B>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3;for(var n=0;n<50;++n)this.s[n]=0}function H(e,t,r){j.call(this,e,t,r)}j.prototype.update=function(e){if(this.finalized)throw Error(a);var t,r=typeof e;if("string"!==r){if("object"===r){if(null===e)throw Error(o);if(p&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!p||!ArrayBuffer.isView(e)))throw Error(o)}else throw Error(o);t=!0}for(var n,i,s=this.blocks,l=this.byteCount,u=e.length,d=this.blockCount,c=0,f=this.s;c>2]|=e[c]<>2]|=i<>2]|=(192|i>>6)<=57344?s[n>>2]|=(224|i>>12)<>2]|=(240|i>>18)<>2]|=(128|i>>12&63)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<=l){for(this.start=n-l,this.block=s[d],n=0;n>=8,r=255&e;r>0;)i.unshift(r),e>>=8,r=255&e,++n;return t?i.push(n):i.unshift(n),this.update(i),i.length},j.prototype.encodeString=function(e){var t,r=typeof e;if("string"!==r){if("object"===r){if(null===e)throw Error(o);if(p&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!p||!ArrayBuffer.isView(e)))throw Error(o)}else throw Error(o);t=!0}var n=0,i=e.length;if(t)n=i;else for(var a=0;a=57344?n+=3:(s=65536+((1023&s)<<10|1023&e.charCodeAt(++a)),n+=4)}return n+=this.encode(8*n),this.update(e),n},j.prototype.bytepad=function(e,t){for(var r=this.encode(t),n=0;n>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(t=1,e[0]=e[r];t>4&15]+f[15&e]+f[e>>12&15]+f[e>>8&15]+f[e>>20&15]+f[e>>16&15]+f[e>>28&15]+f[e>>24&15];a%t==0&&(q(r),o=0)}return i&&(s+=f[(e=r[o])>>4&15]+f[15&e],i>1&&(s+=f[e>>12&15]+f[e>>8&15]),i>2&&(s+=f[e>>20&15]+f[e>>16&15])),s},j.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,o=0,a=0,s=this.outputBits>>3;e=new ArrayBuffer(i?n+1<<2:s);for(var l=new Uint32Array(e);a>8&255,l[e+2]=t>>16&255,l[e+3]=t>>24&255;s%r==0&&q(n)}return o&&(e=s<<2,t=n[a],l[e]=255&t,o>1&&(l[e+1]=t>>8&255),o>2&&(l[e+2]=t>>16&255)),l},H.prototype=new j,H.prototype.finalize=function(){return this.encode(this.outputBits,!0),j.prototype.finalize.call(this)};var q=function(e){var t,r,n,i,o,a,s,l,u,d,c,p,f,h,g,m,y,v,S,w,_,k,O,P,A,I,R,E,T,N,x,B,C,M,D,U,J,j,H,q,L,F,V,W,z,G,Q,K,Y,Z,X,$,ee,et,er,en,ei,eo,ea,es,el,eu,ed;for(n=0;n<48;n+=2)i=e[0]^e[10]^e[20]^e[30]^e[40],o=e[1]^e[11]^e[21]^e[31]^e[41],a=e[2]^e[12]^e[22]^e[32]^e[42],s=e[3]^e[13]^e[23]^e[33]^e[43],l=e[4]^e[14]^e[24]^e[34]^e[44],u=e[5]^e[15]^e[25]^e[35]^e[45],d=e[6]^e[16]^e[26]^e[36]^e[46],c=e[7]^e[17]^e[27]^e[37]^e[47],p=e[8]^e[18]^e[28]^e[38]^e[48],f=e[9]^e[19]^e[29]^e[39]^e[49],t=p^(a<<1|s>>>31),r=f^(s<<1|a>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=i^(l<<1|u>>>31),r=o^(u<<1|l>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=a^(d<<1|c>>>31),r=s^(c<<1|d>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=l^(p<<1|f>>>31),r=u^(f<<1|p>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=d^(i<<1|o>>>31),r=c^(o<<1|i>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,h=e[0],g=e[1],G=e[11]<<4|e[10]>>>28,Q=e[10]<<4|e[11]>>>28,E=e[20]<<3|e[21]>>>29,T=e[21]<<3|e[20]>>>29,es=e[31]<<9|e[30]>>>23,el=e[30]<<9|e[31]>>>23,F=e[40]<<18|e[41]>>>14,V=e[41]<<18|e[40]>>>14,M=e[2]<<1|e[3]>>>31,D=e[3]<<1|e[2]>>>31,m=e[13]<<12|e[12]>>>20,y=e[12]<<12|e[13]>>>20,K=e[22]<<10|e[23]>>>22,Y=e[23]<<10|e[22]>>>22,N=e[33]<<13|e[32]>>>19,x=e[32]<<13|e[33]>>>19,eu=e[42]<<2|e[43]>>>30,ed=e[43]<<2|e[42]>>>30,et=e[5]<<30|e[4]>>>2,er=e[4]<<30|e[5]>>>2,U=e[14]<<6|e[15]>>>26,J=e[15]<<6|e[14]>>>26,v=e[25]<<11|e[24]>>>21,S=e[24]<<11|e[25]>>>21,Z=e[34]<<15|e[35]>>>17,X=e[35]<<15|e[34]>>>17,B=e[45]<<29|e[44]>>>3,C=e[44]<<29|e[45]>>>3,P=e[6]<<28|e[7]>>>4,A=e[7]<<28|e[6]>>>4,en=e[17]<<23|e[16]>>>9,ei=e[16]<<23|e[17]>>>9,j=e[26]<<25|e[27]>>>7,H=e[27]<<25|e[26]>>>7,w=e[36]<<21|e[37]>>>11,_=e[37]<<21|e[36]>>>11,$=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,W=e[8]<<27|e[9]>>>5,z=e[9]<<27|e[8]>>>5,I=e[18]<<20|e[19]>>>12,R=e[19]<<20|e[18]>>>12,eo=e[29]<<7|e[28]>>>25,ea=e[28]<<7|e[29]>>>25,q=e[38]<<8|e[39]>>>24,L=e[39]<<8|e[38]>>>24,k=e[48]<<14|e[49]>>>18,O=e[49]<<14|e[48]>>>18,e[0]=h^~m&v,e[1]=g^~y&S,e[10]=P^~I&E,e[11]=A^~R&T,e[20]=M^~U&j,e[21]=D^~J&H,e[30]=W^~G&K,e[31]=z^~Q&Y,e[40]=et^~en&eo,e[41]=er^~ei&ea,e[2]=m^~v&w,e[3]=y^~S&_,e[12]=I^~E&N,e[13]=R^~T&x,e[22]=U^~j&q,e[23]=J^~H&L,e[32]=G^~K&Z,e[33]=Q^~Y&X,e[42]=en^~eo&es,e[43]=ei^~ea&el,e[4]=v^~w&k,e[5]=S^~_&O,e[14]=E^~N&B,e[15]=T^~x&C,e[24]=j^~q&F,e[25]=H^~L&V,e[34]=K^~Z&$,e[35]=Y^~X&ee,e[44]=eo^~es&eu,e[45]=ea^~el&ed,e[6]=w^~k&h,e[7]=_^~O&g,e[16]=N^~B&P,e[17]=x^~C&A,e[26]=q^~F&M,e[27]=L^~V&D,e[36]=Z^~$&W,e[37]=X^~ee&z,e[46]=es^~eu&et,e[47]=el^~ed&er,e[8]=k^~h&m,e[9]=O^~g&y,e[18]=B^~P&I,e[19]=C^~A&R,e[28]=F^~M&U,e[29]=V^~D&J,e[38]=$^~W&G,e[39]=ee^~z&Q,e[48]=eu^~et&en,e[49]=ed^~er&ei,e[0]^=b[n],e[1]^=b[n+1]};if(d)e.exports=N;else{for(B=0;B=240?(d=4,l=!0):c>=224?(d=3,l=!0):c>=192?(d=2,l=!0):c<128&&(d=1,l=!0)}while(!l);for(var p=d-(s.length-u),f=0;f>8&-39)<<8|87+(t=e[o]>>>4)+(t-10>>8&-39)))+String.fromCharCode(n>>>8);return i}var l={ORIGINAL:1,ORIGINAL_NO_PADDING:3,URLSAFE:5,URLSAFE_NO_PADDING:7};function u(e){if(null==e)return l.URLSAFE_NO_PADDING;if(e!==l.ORIGINAL&&e!==l.ORIGINAL_NO_PADDING&&e!==l.URLSAFE&&e!=l.URLSAFE_NO_PADDING)throw Error("unsupported base64 variant");return e}function d(e,t){t=u(t);var n,i=[],o=0|Math.floor((e=w(i,e,"input")).length/3),s=e.length-3*o,l=4*o+(0!==s?0==(2&t)?4:2+(s>>>1):0),d=new h(l+1),c=g(e);return i.push(c),i.push(d.address),0===r._sodium_bin2base64(d.address,d.length,c,e.length,t)&&v(i,"conversion failed"),d.length=l,n=a(d.to_Uint8Array()),y(i),n}function c(e,t){var r=t||n;if(!p(r))throw Error(r+" output format is not available");if(e instanceof h){if("uint8array"===r)return e.to_Uint8Array();if("text"===r)return a(e.to_Uint8Array());if("hex"===r)return s(e.to_Uint8Array());if("base64"===r)return d(e.to_Uint8Array(),l.URLSAFE_NO_PADDING);throw Error('What is output format "'+r+'"?')}if("object"==typeof e){for(var i=Object.keys(e),o={},u=0;u>>24>>>8,l,d);var _=c(m,a);return y(s),_}function tf(e){var t=[];f(e);var n=new h(0|r._crypto_kdf_keybytes()),i=n.address;t.push(i),r._crypto_kdf_keygen(i);var o=c(n,e);return y(t),o}function th(e,t,n,i){var o=[];f(i),e=w(o,e,"clientPublicKey");var a,s=0|r._crypto_kx_publickeybytes();e.length!==s&&b(o,"invalid clientPublicKey length"),a=g(e),o.push(a),t=w(o,t,"clientSecretKey");var l,u=0|r._crypto_kx_secretkeybytes();t.length!==u&&b(o,"invalid clientSecretKey length"),l=g(t),o.push(l),n=w(o,n,"serverPublicKey");var d,p=0|r._crypto_kx_publickeybytes();n.length!==p&&b(o,"invalid serverPublicKey length"),d=g(n),o.push(d);var m=new h(0|r._crypto_kx_sessionkeybytes()),S=m.address;o.push(S);var _=new h(0|r._crypto_kx_sessionkeybytes()),k=_.address;if(o.push(k),0==(0|r._crypto_kx_client_session_keys(S,k,a,l,d))){var O=c({sharedRx:m,sharedTx:_},i);return y(o),O}v(o,"invalid usage")}function tg(e){var t=[];f(e);var n=new h(0|r._crypto_kx_publickeybytes()),i=n.address;t.push(i);var o=new h(0|r._crypto_kx_secretkeybytes()),a=o.address;if(t.push(a),0==(0|r._crypto_kx_keypair(i,a))){var s={publicKey:c(n,e),privateKey:c(o,e),keyType:"x25519"};return y(t),s}v(t,"internal error")}function tm(e,t){var n=[];f(t),e=w(n,e,"seed");var i,o=0|r._crypto_kx_seedbytes();e.length!==o&&b(n,"invalid seed length"),i=g(e),n.push(i);var a=new h(0|r._crypto_kx_publickeybytes()),s=a.address;n.push(s);var l=new h(0|r._crypto_kx_secretkeybytes()),u=l.address;if(n.push(u),0==(0|r._crypto_kx_seed_keypair(s,u,i))){var d={publicKey:c(a,t),privateKey:c(l,t),keyType:"x25519"};return y(n),d}v(n,"internal error")}function ty(e,t,n,i){var o=[];f(i),e=w(o,e,"serverPublicKey");var a,s=0|r._crypto_kx_publickeybytes();e.length!==s&&b(o,"invalid serverPublicKey length"),a=g(e),o.push(a),t=w(o,t,"serverSecretKey");var l,u=0|r._crypto_kx_secretkeybytes();t.length!==u&&b(o,"invalid serverSecretKey length"),l=g(t),o.push(l),n=w(o,n,"clientPublicKey");var d,p=0|r._crypto_kx_publickeybytes();n.length!==p&&b(o,"invalid clientPublicKey length"),d=g(n),o.push(d);var m=new h(0|r._crypto_kx_sessionkeybytes()),S=m.address;o.push(S);var _=new h(0|r._crypto_kx_sessionkeybytes()),k=_.address;if(o.push(k),0==(0|r._crypto_kx_server_session_keys(S,k,a,l,d))){var O=c({sharedRx:m,sharedTx:_},i);return y(o),O}v(o,"invalid usage")}function tv(e,t,n){var i=[];f(n);var o=g(e=w(i,e,"message")),a=e.length;i.push(o),t=w(i,t,"key");var s,l=0|r._crypto_onetimeauth_keybytes();t.length!==l&&b(i,"invalid key length"),s=g(t),i.push(s);var u=new h(0|r._crypto_onetimeauth_bytes()),d=u.address;if(i.push(d),0==(0|r._crypto_onetimeauth(d,o,a,0,s))){var p=c(u,n);return y(i),p}v(i,"invalid usage")}function tb(e,t){var n=[];f(t),S(n,e,"state_address");var i=new h(0|r._crypto_onetimeauth_bytes()),o=i.address;if(n.push(o),0==(0|r._crypto_onetimeauth_final(e,o))){var a=(r._free(e),c(i,t));return y(n),a}v(n,"invalid usage")}function tS(e,t){var n=[];f(t);var i=null;null!=e&&(i=g(e=w(n,e,"key")),e.length,n.push(i));var o=new h(144).address;if(0==(0|r._crypto_onetimeauth_init(o,i))){var a=o;return y(n),a}v(n,"invalid usage")}function tw(e){var t=[];f(e);var n=new h(0|r._crypto_onetimeauth_keybytes()),i=n.address;t.push(i),r._crypto_onetimeauth_keygen(i);var o=c(n,e);return y(t),o}function t_(e,t,n){var i=[];f(n),S(i,e,"state_address");var o=g(t=w(i,t,"message_chunk")),a=t.length;i.push(o),0!=(0|r._crypto_onetimeauth_update(e,o,a))&&v(i,"invalid usage"),y(i)}function tk(e,t,n){var i=[];e=w(i,e,"hash");var o,a=0|r._crypto_onetimeauth_bytes();e.length!==a&&b(i,"invalid hash length"),o=g(e),i.push(o);var s=g(t=w(i,t,"message")),l=t.length;i.push(s),n=w(i,n,"key");var u,d=0|r._crypto_onetimeauth_keybytes();n.length!==d&&b(i,"invalid key length"),u=g(n),i.push(u);var c=0==(0|r._crypto_onetimeauth_verify(o,s,l,0,u));return y(i),c}function tO(e,t,n,i,o,a,s){var l=[];f(s),S(l,e,"keyLength"),("number"!=typeof e||(0|e)!==e||e<0)&&b(l,"keyLength must be an unsigned integer");var u=g(t=w(l,t,"password")),d=t.length;l.push(u),n=w(l,n,"salt");var p,m=0|r._crypto_pwhash_saltbytes();n.length!==m&&b(l,"invalid salt length"),p=g(n),l.push(p),S(l,i,"opsLimit"),("number"!=typeof i||(0|i)!==i||i<0)&&b(l,"opsLimit must be an unsigned integer"),S(l,o,"memLimit"),("number"!=typeof o||(0|o)!==o||o<0)&&b(l,"memLimit must be an unsigned integer"),S(l,a,"algorithm"),("number"!=typeof a||(0|a)!==a||a<0)&&b(l,"algorithm must be an unsigned integer");var _=new h(0|e),k=_.address;if(l.push(k),0==(0|r._crypto_pwhash(k,e,0,u,d,0,p,i,0,o,a))){var O=c(_,s);return y(l),O}v(l,"invalid usage")}function tP(e,t,n,i,o,a){var s=[];f(a),S(s,e,"keyLength"),("number"!=typeof e||(0|e)!==e||e<0)&&b(s,"keyLength must be an unsigned integer");var l=g(t=w(s,t,"password")),u=t.length;s.push(l),n=w(s,n,"salt");var d,p=0|r._crypto_pwhash_scryptsalsa208sha256_saltbytes();n.length!==p&&b(s,"invalid salt length"),d=g(n),s.push(d),S(s,i,"opsLimit"),("number"!=typeof i||(0|i)!==i||i<0)&&b(s,"opsLimit must be an unsigned integer"),S(s,o,"memLimit"),("number"!=typeof o||(0|o)!==o||o<0)&&b(s,"memLimit must be an unsigned integer");var m=new h(0|e),_=m.address;if(s.push(_),0==(0|r._crypto_pwhash_scryptsalsa208sha256(_,e,0,l,u,0,d,i,0,o))){var k=c(m,a);return y(s),k}v(s,"invalid usage")}function tA(e,t,n,i,o,a,s){var l=[];f(s);var u=g(e=w(l,e,"password")),d=e.length;l.push(u);var p=g(t=w(l,t,"salt")),m=t.length;l.push(p),S(l,n,"opsLimit"),("number"!=typeof n||(0|n)!==n||n<0)&&b(l,"opsLimit must be an unsigned integer"),S(l,i,"r"),("number"!=typeof i||(0|i)!==i||i<0)&&b(l,"r must be an unsigned integer"),S(l,o,"p"),("number"!=typeof o||(0|o)!==o||o<0)&&b(l,"p must be an unsigned integer"),S(l,a,"keyLength"),("number"!=typeof a||(0|a)!==a||a<0)&&b(l,"keyLength must be an unsigned integer");var _=new h(0|a),k=_.address;if(l.push(k),0==(0|r._crypto_pwhash_scryptsalsa208sha256_ll(u,d,p,m,n,0,i,o,k,a))){var O=c(_,s);return y(l),O}v(l,"invalid usage")}function tI(e,t,n,i){var o=[];f(i);var a=g(e=w(o,e,"password")),s=e.length;o.push(a),S(o,t,"opsLimit"),("number"!=typeof t||(0|t)!==t||t<0)&&b(o,"opsLimit must be an unsigned integer"),S(o,n,"memLimit"),("number"!=typeof n||(0|n)!==n||n<0)&&b(o,"memLimit must be an unsigned integer");var l=new h(0|r._crypto_pwhash_scryptsalsa208sha256_strbytes()).address;if(o.push(l),0==(0|r._crypto_pwhash_scryptsalsa208sha256_str(l,a,s,0,t,0,n))){var u=r.UTF8ToString(l);return y(o),u}v(o,"invalid usage")}function tR(e,t,n){var i=[];f(n),"string"!=typeof e&&b(i,"hashed_password must be a string"),e=o(e+"\x00"),null!=s&&e.length-1!==s&&b(i,"invalid hashed_password length");var a=g(e),s=e.length-1;i.push(a);var l=g(t=w(i,t,"password")),u=t.length;i.push(l);var d=0==(0|r._crypto_pwhash_scryptsalsa208sha256_str_verify(a,l,u,0));return y(i),d}function tE(e,t,n,i){var o=[];f(i);var a=g(e=w(o,e,"password")),s=e.length;o.push(a),S(o,t,"opsLimit"),("number"!=typeof t||(0|t)!==t||t<0)&&b(o,"opsLimit must be an unsigned integer"),S(o,n,"memLimit"),("number"!=typeof n||(0|n)!==n||n<0)&&b(o,"memLimit must be an unsigned integer");var l=new h(0|r._crypto_pwhash_strbytes()).address;if(o.push(l),0==(0|r._crypto_pwhash_str(l,a,s,0,t,0,n))){var u=r.UTF8ToString(l);return y(o),u}v(o,"invalid usage")}function tT(e,t,n,i){var a=[];f(i),"string"!=typeof e&&b(a,"hashed_password must be a string"),e=o(e+"\x00"),null!=l&&e.length-1!==l&&b(a,"invalid hashed_password length");var s=g(e),l=e.length-1;a.push(s),S(a,t,"opsLimit"),("number"!=typeof t||(0|t)!==t||t<0)&&b(a,"opsLimit must be an unsigned integer"),S(a,n,"memLimit"),("number"!=typeof n||(0|n)!==n||n<0)&&b(a,"memLimit must be an unsigned integer");var u=0!=(0|r._crypto_pwhash_str_needs_rehash(s,t,0,n));return y(a),u}function tN(e,t,n){var i=[];f(n),"string"!=typeof e&&b(i,"hashed_password must be a string"),e=o(e+"\x00"),null!=s&&e.length-1!==s&&b(i,"invalid hashed_password length");var a=g(e),s=e.length-1;i.push(a);var l=g(t=w(i,t,"password")),u=t.length;i.push(l);var d=0==(0|r._crypto_pwhash_str_verify(a,l,u,0));return y(i),d}function tx(e,t,n){var i=[];f(n),e=w(i,e,"privateKey");var o,a=0|r._crypto_scalarmult_scalarbytes();e.length!==a&&b(i,"invalid privateKey length"),o=g(e),i.push(o),t=w(i,t,"publicKey");var s,l=0|r._crypto_scalarmult_bytes();t.length!==l&&b(i,"invalid publicKey length"),s=g(t),i.push(s);var u=new h(0|r._crypto_scalarmult_bytes()),d=u.address;if(i.push(d),0==(0|r._crypto_scalarmult(d,o,s))){var p=c(u,n);return y(i),p}v(i,"weak public key")}function tB(e,t){var n=[];f(t),e=w(n,e,"privateKey");var i,o=0|r._crypto_scalarmult_scalarbytes();e.length!==o&&b(n,"invalid privateKey length"),i=g(e),n.push(i);var a=new h(0|r._crypto_scalarmult_bytes()),s=a.address;if(n.push(s),0==(0|r._crypto_scalarmult_base(s,i))){var l=c(a,t);return y(n),l}v(n,"unknown error")}function tC(e,t,n){var i=[];f(n),e=w(i,e,"n");var o,a=0|r._crypto_scalarmult_ed25519_scalarbytes();e.length!==a&&b(i,"invalid n length"),o=g(e),i.push(o),t=w(i,t,"p");var s,l=0|r._crypto_scalarmult_ed25519_bytes();t.length!==l&&b(i,"invalid p length"),s=g(t),i.push(s);var u=new h(0|r._crypto_scalarmult_ed25519_bytes()),d=u.address;if(i.push(d),0==(0|r._crypto_scalarmult_ed25519(d,o,s))){var p=c(u,n);return y(i),p}v(i,"invalid point or scalar is 0")}function tM(e,t){var n=[];f(t),e=w(n,e,"scalar");var i,o=0|r._crypto_scalarmult_ed25519_scalarbytes();e.length!==o&&b(n,"invalid scalar length"),i=g(e),n.push(i);var a=new h(0|r._crypto_scalarmult_ed25519_bytes()),s=a.address;if(n.push(s),0==(0|r._crypto_scalarmult_ed25519_base(s,i))){var l=c(a,t);return y(n),l}v(n,"scalar is 0")}function tD(e,t){var n=[];f(t),e=w(n,e,"scalar");var i,o=0|r._crypto_scalarmult_ed25519_scalarbytes();e.length!==o&&b(n,"invalid scalar length"),i=g(e),n.push(i);var a=new h(0|r._crypto_scalarmult_ed25519_bytes()),s=a.address;if(n.push(s),0==(0|r._crypto_scalarmult_ed25519_base_noclamp(s,i))){var l=c(a,t);return y(n),l}v(n,"scalar is 0")}function tU(e,t,n){var i=[];f(n),e=w(i,e,"n");var o,a=0|r._crypto_scalarmult_ed25519_scalarbytes();e.length!==a&&b(i,"invalid n length"),o=g(e),i.push(o),t=w(i,t,"p");var s,l=0|r._crypto_scalarmult_ed25519_bytes();t.length!==l&&b(i,"invalid p length"),s=g(t),i.push(s);var u=new h(0|r._crypto_scalarmult_ed25519_bytes()),d=u.address;if(i.push(d),0==(0|r._crypto_scalarmult_ed25519_noclamp(d,o,s))){var p=c(u,n);return y(i),p}v(i,"invalid point or scalar is 0")}function tJ(e,t,n){var i=[];f(n),e=w(i,e,"scalar");var o,a=0|r._crypto_scalarmult_ristretto255_scalarbytes();e.length!==a&&b(i,"invalid scalar length"),o=g(e),i.push(o),t=w(i,t,"element");var s,l=0|r._crypto_scalarmult_ristretto255_bytes();t.length!==l&&b(i,"invalid element length"),s=g(t),i.push(s);var u=new h(0|r._crypto_scalarmult_ristretto255_bytes()),d=u.address;if(i.push(d),0==(0|r._crypto_scalarmult_ristretto255(d,o,s))){var p=c(u,n);return y(i),p}v(i,"result is identity element")}function tj(e,t){var n=[];f(t),e=w(n,e,"scalar");var i,o=0|r._crypto_core_ristretto255_scalarbytes();e.length!==o&&b(n,"invalid scalar length"),i=g(e),n.push(i);var a=new h(0|r._crypto_core_ristretto255_bytes()),s=a.address;if(n.push(s),0==(0|r._crypto_scalarmult_ristretto255_base(s,i))){var l=c(a,t);return y(n),l}v(n,"scalar is 0")}function tH(e,t,n,i){var o=[];f(i);var a=g(e=w(o,e,"message")),s=e.length;o.push(a),t=w(o,t,"nonce");var l,u=0|r._crypto_secretbox_noncebytes();t.length!==u&&b(o,"invalid nonce length"),l=g(t),o.push(l),n=w(o,n,"key");var d,p=0|r._crypto_secretbox_keybytes();n.length!==p&&b(o,"invalid key length"),d=g(n),o.push(d);var m=new h(0|s),S=m.address;o.push(S);var _=new h(0|r._crypto_secretbox_macbytes()),k=_.address;if(o.push(k),0==(0|r._crypto_secretbox_detached(S,k,a,s,0,l,d))){var O=c({mac:_,cipher:m},i);return y(o),O}v(o,"invalid usage")}function tq(e,t,n,i){var o=[];f(i);var a=g(e=w(o,e,"message")),s=e.length;o.push(a),t=w(o,t,"nonce");var l,u=0|r._crypto_secretbox_noncebytes();t.length!==u&&b(o,"invalid nonce length"),l=g(t),o.push(l),n=w(o,n,"key");var d,p=0|r._crypto_secretbox_keybytes();n.length!==p&&b(o,"invalid key length"),d=g(n),o.push(d);var m=new h(s+r._crypto_secretbox_macbytes()|0),S=m.address;if(o.push(S),0==(0|r._crypto_secretbox_easy(S,a,s,0,l,d))){var _=c(m,i);return y(o),_}v(o,"invalid usage")}function tL(e){var t=[];f(e);var n=new h(0|r._crypto_secretbox_keybytes()),i=n.address;t.push(i),r._crypto_secretbox_keygen(i);var o=c(n,e);return y(t),o}function tF(e,t,n,i,o){var a=[];f(o);var s=g(e=w(a,e,"ciphertext")),l=e.length;a.push(s),t=w(a,t,"mac");var u,d=0|r._crypto_secretbox_macbytes();t.length!==d&&b(a,"invalid mac length"),u=g(t),a.push(u),n=w(a,n,"nonce");var p,m=0|r._crypto_secretbox_noncebytes();n.length!==m&&b(a,"invalid nonce length"),p=g(n),a.push(p),i=w(a,i,"key");var S,_=0|r._crypto_secretbox_keybytes();i.length!==_&&b(a,"invalid key length"),S=g(i),a.push(S);var k=new h(0|l),O=k.address;if(a.push(O),0==(0|r._crypto_secretbox_open_detached(O,s,u,l,0,p,S))){var P=c(k,o);return y(a),P}v(a,"wrong secret key for the given ciphertext")}function tV(e,t,n,i){var o=[];f(i),e=w(o,e,"ciphertext");var a,s=r._crypto_secretbox_macbytes(),l=e.length;l>>0;return y([]),t}function rv(e,t){var n=[];f(t);for(var i=r._malloc(24),o=0;o<6;o++)r.setValue(i+4*o,r.Runtime.addFunction(e[["implementation_name","random","stir","uniform","buf","close"][o]]),"i32");0!=(0|r._randombytes_set_implementation(i))&&v(n,"unsupported implementation"),y(n)}function rb(e){f(e),r._randombytes_stir()}function rS(e,t){var n=[];f(t),S(n,e,"upper_bound"),("number"!=typeof e||(0|e)!==e||e<0)&&b(n,"upper_bound must be an unsigned integer");var i=r._randombytes_uniform(e)>>>0;return y(n),i}function rw(){var e=r._sodium_version_string(),t=r.UTF8ToString(e);return y([]),t}return h.prototype.to_Uint8Array=function(){var e=new Uint8Array(this.length);return e.set(r.HEAPU8.subarray(this.address,this.address+this.length)),e},e.add=function(e,t){if(!(e instanceof Uint8Array&&t instanceof Uint8Array))throw TypeError("Only Uint8Array instances can added");var r=e.length,n=0,i=0;if(t.length!=e.length)throw TypeError("Arguments must have the same length");for(i=0;i>=8,n+=e[i]+t[i],e[i]=255&n},e.base64_variants=l,e.compare=function(e,t){if(!(e instanceof Uint8Array&&t instanceof Uint8Array))throw TypeError("Only Uint8Array instances can be compared");if(e.length!==t.length)throw TypeError("Only instances of identical length can be compared");for(var r=0,n=1,i=e.length;i-- >0;)r|=t[i]-e[i]>>8&n,n&=(t[i]^e[i])-1>>8;return r+r+n-1},e.from_base64=function(e,t){t=u(t);var n,i=[],o=new h(3*(e=w(i,e,"input")).length/4),a=g(e),s=m(4),l=m(4);return i.push(a),i.push(o.address),i.push(o.result_bin_len_p),i.push(o.b64_end_p),0!==r._sodium_base642bin(o.address,o.length,a,e.length,0,s,l,t)&&v(i,"invalid input"),r.getValue(l,"i32")-a!==e.length&&v(i,"incomplete input"),o.length=r.getValue(s,"i32"),n=o.to_Uint8Array(),y(i),n},e.from_hex=function(e){var t,n=[],i=new h((e=w(n,e,"input")).length/2),o=g(e),a=m(4);return n.push(o),n.push(i.address),n.push(i.hex_end_p),0!==r._sodium_hex2bin(i.address,i.length,o,e.length,0,0,a)&&v(n,"invalid input"),r.getValue(a,"i32")-o!==e.length&&v(n,"incomplete input"),t=i.to_Uint8Array(),y(n),t},e.from_string=o,e.increment=function(e){if(!(e instanceof Uint8Array))throw TypeError("Only Uint8Array instances can be incremented");for(var t=256,r=0,n=e.length;r>=8,t+=e[r],e[r]=255&t},e.is_zero=function(e){if(!(e instanceof Uint8Array))throw TypeError("Only Uint8Array instances can be checked");for(var t=0,r=0,n=e.length;r 0");var n,i=[],o=m(4),a=1,s=0,l=0|e.length,u=new h(l+t);i.push(o),i.push(u.address);for(var d=u.address,c=u.address+l+t;d>>48|l>>>32|l>>>16|l))-1>>16);return 0!==r._sodium_pad(o,u.address,e.length,t,u.length)&&v(i,"internal error"),u.length=r.getValue(o,"i32"),n=u.to_Uint8Array(),y(i),n},e.unpad=function(e,t){if(!(e instanceof Uint8Array))throw TypeError("buffer must be a Uint8Array");if((t|=0)<=0)throw Error("block size must be > 0");var n=[],i=g(e),o=m(4);return n.push(i),n.push(o),0!==r._sodium_unpad(o,i,e.length,t)&&v(n,"unsupported/invalid padding"),e=(e=new Uint8Array(e)).subarray(0,r.getValue(o,"i32")),y(n),e},e.ready=i,e.symbols=function(){return Object.keys(e).sort()},e.to_base64=d,e.to_hex=s,e.to_string=a,e}var l="object"==typeof a.sodium&&"function"==typeof a.sodium.onload?a.sodium.onload:null;i=[t,r(90681)],void 0!==(o="function"==typeof(n=s)?n.apply(t,i):n)&&(e.exports=o),l&&a.sodium.ready.then(function(){l(a.sodium)})}(this)},40059:function(e){"use strict";e.exports=r;var t=null;try{t=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(e){}function r(e,t,r){this.low=0|e,this.high=0|t,this.unsigned=!!r}function n(e){return!0===(e&&e.__isLong__)}r.prototype.__isLong__,Object.defineProperty(r.prototype,"__isLong__",{value:!0}),r.isLong=n;var i={},o={};function a(e,t){var r,n,a;return t?(e>>>=0,(a=0<=e&&e<256)&&(n=o[e]))?n:(r=l(e,(0|e)<0?-1:0,!0),a&&(o[e]=r),r):(e|=0,(a=-128<=e&&e<128)&&(n=i[e]))?n:(r=l(e,e<0?-1:0,!1),a&&(i[e]=r),r)}function s(e,t){if(isNaN(e))return t?y:m;if(t){if(e<0)return y;if(e>=f)return _}else{if(e<=-h)return k;if(e+1>=h)return w}return e<0?s(-e,t).neg():l(e%p|0,e/p|0,t)}function l(e,t,n){return new r(e,t,n)}r.fromInt=a,r.fromNumber=s,r.fromBits=l;var u=Math.pow;function d(e,t,r){if(0===e.length)throw Error("empty string");if("NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return m;if("number"==typeof t?(r=t,t=!1):t=!!t,(r=r||10)<2||360)throw Error("interior hyphen");if(0===n)return d(e.substring(1),t,r).neg();for(var n,i=s(u(r,8)),o=m,a=0;a>>0:this.low},O.toNumber=function(){return this.unsigned?(this.high>>>0)*p+(this.low>>>0):this.high*p+(this.low>>>0)},O.toString=function(e){if((e=e||10)<2||36>>0).toString(e);if((o=l).isZero())return d+a;for(;d.length<6;)d="0"+d;a=""+d+a}},O.getHighBits=function(){return this.high},O.getHighBitsUnsigned=function(){return this.high>>>0},O.getLowBits=function(){return this.low},O.getLowBitsUnsigned=function(){return this.low>>>0},O.getNumBitsAbs=function(){if(this.isNegative())return this.eq(k)?64:this.neg().getNumBitsAbs();for(var e=0!=this.high?this.high:this.low,t=31;t>0&&(e&1<=0},O.isOdd=function(){return(1&this.low)==1},O.isEven=function(){return(1&this.low)==0},O.equals=function(e){return n(e)||(e=c(e)),(this.unsigned===e.unsigned||this.high>>>31!=1||e.high>>>31!=1)&&this.high===e.high&&this.low===e.low},O.eq=O.equals,O.notEquals=function(e){return!this.eq(e)},O.neq=O.notEquals,O.ne=O.notEquals,O.lessThan=function(e){return 0>this.comp(e)},O.lt=O.lessThan,O.lessThanOrEqual=function(e){return 0>=this.comp(e)},O.lte=O.lessThanOrEqual,O.le=O.lessThanOrEqual,O.greaterThan=function(e){return this.comp(e)>0},O.gt=O.greaterThan,O.greaterThanOrEqual=function(e){return this.comp(e)>=0},O.gte=O.greaterThanOrEqual,O.ge=O.greaterThanOrEqual,O.compare=function(e){if(n(e)||(e=c(e)),this.eq(e))return 0;var t=this.isNegative(),r=e.isNegative();return t&&!r?-1:!t&&r?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1},O.comp=O.compare,O.negate=function(){return!this.unsigned&&this.eq(k)?k:this.not().add(v)},O.neg=O.negate,O.add=function(e){n(e)||(e=c(e));var t,r,i=this.high>>>16,o=65535&this.high,a=this.low>>>16,s=65535&this.low,u=e.high>>>16,d=65535&e.high,p=e.low>>>16,f=65535&e.low,h=0,g=0;return t=0+((r=0+(s+f))>>>16),r&=65535,t+=a+p,g+=t>>>16,t&=65535,g+=o+d,h+=g>>>16,g&=65535,h+=i+u,l(t<<16|r,(h&=65535)<<16|g,this.unsigned)},O.subtract=function(e){return n(e)||(e=c(e)),this.add(e.neg())},O.sub=O.subtract,O.multiply=function(e){if(this.isZero())return m;if(n(e)||(e=c(e)),t)return l(t.mul(this.low,this.high,e.low,e.high),t.get_high(),this.unsigned);if(e.isZero())return m;if(this.eq(k))return e.isOdd()?k:m;if(e.eq(k))return this.isOdd()?k:m;if(this.isNegative())return e.isNegative()?this.neg().mul(e.neg()):this.neg().mul(e).neg();if(e.isNegative())return this.mul(e.neg()).neg();if(this.lt(g)&&e.lt(g))return s(this.toNumber()*e.toNumber(),this.unsigned);var r,i,o=this.high>>>16,a=65535&this.high,u=this.low>>>16,d=65535&this.low,p=e.high>>>16,f=65535&e.high,h=e.low>>>16,y=65535&e.low,v=0,b=0;return r=0+((i=0+d*y)>>>16),i&=65535,r+=u*y,b+=r>>>16,r&=65535,r+=d*h,b+=r>>>16,r&=65535,b+=a*y,v+=b>>>16,b&=65535,b+=u*h,v+=b>>>16,b&=65535,b+=d*f,v+=b>>>16,b&=65535,v+=o*y+a*h+u*f+d*p,l(r<<16|i,(v&=65535)<<16|b,this.unsigned)},O.mul=O.multiply,O.divide=function(e){if(n(e)||(e=c(e)),e.isZero())throw Error("division by zero");if(t){var r,i,o;return this.unsigned||-2147483648!==this.high||-1!==e.low||-1!==e.high?l((this.unsigned?t.div_u:t.div_s)(this.low,this.high,e.low,e.high),t.get_high(),this.unsigned):this}if(this.isZero())return this.unsigned?y:m;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return y;if(e.gt(this.shru(1)))return b;o=y}else{if(this.eq(k))return e.eq(v)||e.eq(S)?k:e.eq(k)?v:(r=this.shr(1).div(e).shl(1)).eq(m)?e.isNegative()?v:S:(i=this.sub(e.mul(r)),o=r.add(i.div(e)));if(e.eq(k))return this.unsigned?y:m;if(this.isNegative())return e.isNegative()?this.neg().div(e.neg()):this.neg().div(e).neg();if(e.isNegative())return this.div(e.neg()).neg();o=m}for(i=this;i.gte(e);){for(var a=Math.ceil(Math.log(r=Math.max(1,Math.floor(i.toNumber()/e.toNumber())))/Math.LN2),d=a<=48?1:u(2,a-48),p=s(r),f=p.mul(e);f.isNegative()||f.gt(i);)r-=d,f=(p=s(r,this.unsigned)).mul(e);p.isZero()&&(p=v),o=o.add(p),i=i.sub(f)}return o},O.div=O.divide,O.modulo=function(e){return(n(e)||(e=c(e)),t)?l((this.unsigned?t.rem_u:t.rem_s)(this.low,this.high,e.low,e.high),t.get_high(),this.unsigned):this.sub(this.div(e).mul(e))},O.mod=O.modulo,O.rem=O.modulo,O.not=function(){return l(~this.low,~this.high,this.unsigned)},O.and=function(e){return n(e)||(e=c(e)),l(this.low&e.low,this.high&e.high,this.unsigned)},O.or=function(e){return n(e)||(e=c(e)),l(this.low|e.low,this.high|e.high,this.unsigned)},O.xor=function(e){return n(e)||(e=c(e)),l(this.low^e.low,this.high^e.high,this.unsigned)},O.shiftLeft=function(e){return(n(e)&&(e=e.toInt()),0==(e&=63))?this:e<32?l(this.low<>>32-e,this.unsigned):l(0,this.low<>>e|this.high<<32-e,this.high>>e,this.unsigned):l(this.high>>e-32,this.high>=0?0:-1,this.unsigned)},O.shr=O.shiftRight,O.shiftRightUnsigned=function(e){if(n(e)&&(e=e.toInt()),0==(e&=63))return this;var t=this.high;return e<32?l(this.low>>>e|t<<32-e,t>>>e,this.unsigned):32===e?l(t,0,this.unsigned):l(t>>>e-32,0,this.unsigned)},O.shru=O.shiftRightUnsigned,O.shr_u=O.shiftRightUnsigned,O.toSigned=function(){return this.unsigned?l(this.low,this.high,!1):this},O.toUnsigned=function(){return this.unsigned?this:l(this.low,this.high,!0)},O.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},O.toBytesLE=function(){var e=this.high,t=this.low;return[255&t,t>>>8&255,t>>>16&255,t>>>24,255&e,e>>>8&255,e>>>16&255,e>>>24]},O.toBytesBE=function(){var e=this.high,t=this.low;return[e>>>24,e>>>16&255,e>>>8&255,255&e,t>>>24,t>>>16&255,t>>>8&255,255&t]},r.fromBytes=function(e,t,n){return n?r.fromBytesLE(e,t):r.fromBytesBE(e,t)},r.fromBytesLE=function(e,t){return new r(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,t)},r.fromBytesBE=function(e,t){return new r(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],t)}},67957:function(e,t,r){"use strict";var n=r(39541),i=r(73799),o=r(47226).Buffer,a=Array(16);function s(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function l(e,t){return e<>>32-t}function u(e,t,r,n,i,o,a){return l(e+(t&r|~t&n)+i+o|0,a)+t|0}function d(e,t,r,n,i,o,a){return l(e+(t&n|r&~n)+i+o|0,a)+t|0}function c(e,t,r,n,i,o,a){return l(e+(t^r^n)+i+o|0,a)+t|0}function p(e,t,r,n,i,o,a){return l(e+(r^(t|~n))+i+o|0,a)+t|0}n(s,i),s.prototype._update=function(){for(var e=a,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var r=this._a,n=this._b,i=this._c,o=this._d;r=u(r,n,i,o,e[0],3614090360,7),o=u(o,r,n,i,e[1],3905402710,12),i=u(i,o,r,n,e[2],606105819,17),n=u(n,i,o,r,e[3],3250441966,22),r=u(r,n,i,o,e[4],4118548399,7),o=u(o,r,n,i,e[5],1200080426,12),i=u(i,o,r,n,e[6],2821735955,17),n=u(n,i,o,r,e[7],4249261313,22),r=u(r,n,i,o,e[8],1770035416,7),o=u(o,r,n,i,e[9],2336552879,12),i=u(i,o,r,n,e[10],4294925233,17),n=u(n,i,o,r,e[11],2304563134,22),r=u(r,n,i,o,e[12],1804603682,7),o=u(o,r,n,i,e[13],4254626195,12),i=u(i,o,r,n,e[14],2792965006,17),n=u(n,i,o,r,e[15],1236535329,22),r=d(r,n,i,o,e[1],4129170786,5),o=d(o,r,n,i,e[6],3225465664,9),i=d(i,o,r,n,e[11],643717713,14),n=d(n,i,o,r,e[0],3921069994,20),r=d(r,n,i,o,e[5],3593408605,5),o=d(o,r,n,i,e[10],38016083,9),i=d(i,o,r,n,e[15],3634488961,14),n=d(n,i,o,r,e[4],3889429448,20),r=d(r,n,i,o,e[9],568446438,5),o=d(o,r,n,i,e[14],3275163606,9),i=d(i,o,r,n,e[3],4107603335,14),n=d(n,i,o,r,e[8],1163531501,20),r=d(r,n,i,o,e[13],2850285829,5),o=d(o,r,n,i,e[2],4243563512,9),i=d(i,o,r,n,e[7],1735328473,14),n=d(n,i,o,r,e[12],2368359562,20),r=c(r,n,i,o,e[5],4294588738,4),o=c(o,r,n,i,e[8],2272392833,11),i=c(i,o,r,n,e[11],1839030562,16),n=c(n,i,o,r,e[14],4259657740,23),r=c(r,n,i,o,e[1],2763975236,4),o=c(o,r,n,i,e[4],1272893353,11),i=c(i,o,r,n,e[7],4139469664,16),n=c(n,i,o,r,e[10],3200236656,23),r=c(r,n,i,o,e[13],681279174,4),o=c(o,r,n,i,e[0],3936430074,11),i=c(i,o,r,n,e[3],3572445317,16),n=c(n,i,o,r,e[6],76029189,23),r=c(r,n,i,o,e[9],3654602809,4),o=c(o,r,n,i,e[12],3873151461,11),i=c(i,o,r,n,e[15],530742520,16),n=c(n,i,o,r,e[2],3299628645,23),r=p(r,n,i,o,e[0],4096336452,6),o=p(o,r,n,i,e[7],1126891415,10),i=p(i,o,r,n,e[14],2878612391,15),n=p(n,i,o,r,e[5],4237533241,21),r=p(r,n,i,o,e[12],1700485571,6),o=p(o,r,n,i,e[3],2399980690,10),i=p(i,o,r,n,e[10],4293915773,15),n=p(n,i,o,r,e[1],2240044497,21),r=p(r,n,i,o,e[8],1873313359,6),o=p(o,r,n,i,e[15],4264355552,10),i=p(i,o,r,n,e[6],2734768916,15),n=p(n,i,o,r,e[13],1309151649,21),r=p(r,n,i,o,e[4],4149444226,6),o=p(o,r,n,i,e[11],3174756917,10),i=p(i,o,r,n,e[2],718787259,15),n=p(n,i,o,r,e[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+n|0,this._c=this._c+i|0,this._d=this._d+o|0},s.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=o.allocUnsafe(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e},e.exports=s},37074:function(e){"use strict";function t(e,t){if(!e)throw Error(t||"Assertion failed")}e.exports=t,t.equal=function(e,t,r){if(e!=t)throw Error(r||"Assertion failed: "+e+" != "+t)}},61556:function(e,t){"use strict";var r=t;function n(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"!=typeof e){for(var n=0;n>8,a=255&i;o?r.push(o,a):r.push(a)}return r}function i(e){return 1===e.length?"0"+e:e}function o(e){for(var t="",r=0;r1?t-1:0),n=1;n{})}}function b(e){let t=e.currentTarget.getAttribute("target");return t&&"_self"!==t||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.nativeEvent&&2===e.nativeEvent.which}function S(e,t,r,n,i,a,l,u,d){let{nodeName:c}=e.currentTarget;if("A"===c.toUpperCase()&&(b(e)||!d&&!(0,s.isLocalURL)(r)))return;e.preventDefault();let p=()=>{let e=null==l||l;"beforePopState"in t?t[i?"replace":"push"](r,n,{shallow:a,locale:u,scroll:e}):t[i?"replace":"push"](n||r,{scroll:e})};d?o.default.startTransition(p):p()}function w(e){return"string"==typeof e?e:(0,l.formatUrl)(e)}let _=o.default.forwardRef(function(e,t){let r,n;let{href:s,as:l,children:y,prefetch:b=null,passHref:_,replace:k,shallow:O,scroll:P,locale:A,onClick:I,onMouseEnter:R,onTouchStart:E,legacyBehavior:T=!1,...N}=e;r=y,T&&("string"==typeof r||"number"==typeof r)&&(r=(0,i.jsx)("a",{children:r}));let x=o.default.useContext(c.RouterContext),B=o.default.useContext(p.AppRouterContext),C=null!=x?x:B,M=!x,D=!1!==b,U=null===b?m.PrefetchKind.AUTO:m.PrefetchKind.FULL,{href:J,as:j}=o.default.useMemo(()=>{if(!x){let e=w(s);return{href:e,as:l?w(l):e}}let[e,t]=(0,a.resolveHref)(x,s,!0);return{href:e,as:l?(0,a.resolveHref)(x,l):t||e}},[x,s,l]),H=o.default.useRef(J),q=o.default.useRef(j);T&&(n=o.default.Children.only(r));let L=T?n&&"object"==typeof n&&n.ref:t,[F,V,W]=(0,f.useIntersection)({rootMargin:"200px"}),z=o.default.useCallback(e=>{(q.current!==j||H.current!==J)&&(W(),q.current=j,H.current=J),F(e),L&&("function"==typeof L?L(e):"object"==typeof L&&(L.current=e))},[j,L,J,W,F]);o.default.useEffect(()=>{C&&V&&D&&v(C,J,j,{locale:A},{kind:U},M)},[j,J,V,A,D,null==x?void 0:x.locale,C,M,U]);let G={ref:z,onClick(e){T||"function"!=typeof I||I(e),T&&n.props&&"function"==typeof n.props.onClick&&n.props.onClick(e),C&&!e.defaultPrevented&&S(e,C,J,j,k,O,P,A,M)},onMouseEnter(e){T||"function"!=typeof R||R(e),T&&n.props&&"function"==typeof n.props.onMouseEnter&&n.props.onMouseEnter(e),C&&(D||!M)&&v(C,J,j,{locale:A,priority:!0,bypassPrefetchedCheck:!0},{kind:U},M)},onTouchStart(e){T||"function"!=typeof E||E(e),T&&n.props&&"function"==typeof n.props.onTouchStart&&n.props.onTouchStart(e),C&&(D||!M)&&v(C,J,j,{locale:A,priority:!0,bypassPrefetchedCheck:!0},{kind:U},M)}};if((0,u.isAbsoluteUrl)(j))G.href=j;else if(!T||_||"a"===n.type&&!("href"in n.props)){let e=void 0!==A?A:null==x?void 0:x.locale,t=(null==x?void 0:x.isLocaleDomain)&&(0,h.getDomainLocale)(j,e,null==x?void 0:x.locales,null==x?void 0:x.domainLocales);G.href=t||(0,g.addBasePath)((0,d.addLocale)(j,e,null==x?void 0:x.defaultLocale))}return T?o.default.cloneElement(n,G):(0,i.jsx)("a",{...N,...G,children:r})});("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},52185:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{requestIdleCallback:function(){return r},cancelIdleCallback:function(){return n}});let r="undefined"!=typeof self&&self.requestIdleCallback&&self.requestIdleCallback.bind(window)||function(e){let t=Date.now();return self.setTimeout(function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-t))}})},1)},n="undefined"!=typeof self&&self.cancelIdleCallback&&self.cancelIdleCallback.bind(window)||function(e){return clearTimeout(e)};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},14542:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"resolveHref",{enumerable:!0,get:function(){return c}});let n=r(95770),i=r(11030),o=r(24544),a=r(36874),s=r(82139),l=r(17434),u=r(22360),d=r(96735);function c(e,t,r){let c;let p="string"==typeof t?t:(0,i.formatWithValidation)(t),f=p.match(/^[a-zA-Z]{1,}:\/\//),h=f?p.slice(f[0].length):p;if((h.split("?",1)[0]||"").match(/(\/\/|\\)/)){console.error("Invalid href '"+p+"' passed to next/router in page: '"+e.pathname+"'. Repeated forward-slashes (//) or backslashes \\ are not valid in the href.");let t=(0,a.normalizeRepeatedSlashes)(h);p=(f?f[0]:"")+t}if(!(0,l.isLocalURL)(p))return r?[p]:p;try{c=new URL(p.startsWith("#")?e.asPath:e.pathname,"http://n")}catch(e){c=new URL("/","http://n")}try{let e=new URL(p,c);e.pathname=(0,s.normalizePathTrailingSlash)(e.pathname);let t="";if((0,u.isDynamicRoute)(e.pathname)&&e.searchParams&&r){let r=(0,n.searchParamsToUrlQuery)(e.searchParams),{result:a,params:s}=(0,d.interpolateAs)(e.pathname,e.pathname,r);a&&(t=(0,i.formatWithValidation)({pathname:a,hash:e.hash,query:(0,o.omit)(r,s)}))}let a=e.origin===c.origin?e.href.slice(e.origin.length):e.href;return r?[a,t||a]:a}catch(e){return r?[p]:p}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},45291:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useIntersection",{enumerable:!0,get:function(){return d}});let n=r(64090),i=r(52185),o="function"==typeof IntersectionObserver,a=new Map,s=[];function l(e){let t;let r={root:e.root||null,margin:e.rootMargin||""},n=s.find(e=>e.root===r.root&&e.margin===r.margin);if(n&&(t=a.get(n)))return t;let i=new Map;return t={id:r,observer:new IntersectionObserver(e=>{e.forEach(e=>{let t=i.get(e.target),r=e.isIntersecting||e.intersectionRatio>0;t&&r&&t(r)})},e),elements:i},s.push(r),a.set(r,t),t}function u(e,t,r){let{id:n,observer:i,elements:o}=l(r);return o.set(e,t),i.observe(e),function(){if(o.delete(e),i.unobserve(e),0===o.size){i.disconnect(),a.delete(n);let e=s.findIndex(e=>e.root===n.root&&e.margin===n.margin);e>-1&&s.splice(e,1)}}}function d(e){let{rootRef:t,rootMargin:r,disabled:a}=e,s=a||!o,[l,d]=(0,n.useState)(!1),c=(0,n.useRef)(null),p=(0,n.useCallback)(e=>{c.current=e},[]);return(0,n.useEffect)(()=>{if(o){if(s||l)return;let e=c.current;if(e&&e.tagName)return u(e,e=>e&&d(e),{root:null==t?void 0:t.current,rootMargin:r})}else if(!l){let e=(0,i.requestIdleCallback)(()=>d(!0));return()=>(0,i.cancelIdleCallback)(e)}},[s,r,t,l,c.current]),[p,l,(0,n.useCallback)(()=>{d(!1)},[])]}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},13127:function(e){"use strict";var t="/";!function(){var r={229:function(e){var t,r,n,i=e.exports={};function o(){throw Error("setTimeout has not been defined")}function a(){throw Error("clearTimeout has not been defined")}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}function l(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{return r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var u=[],d=!1,c=-1;function p(){d&&n&&(d=!1,n.length?u=n.concat(u):c=-1,u.length&&f())}function f(){if(!d){var e=s(p);d=!0;for(var t=u.length;t;){for(n=u,u=[];++c1)for(var r=1;rString(e)),r>2)?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}}function i(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function o(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function a(e,t,r){return"number"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}r("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError),r("ERR_INVALID_ARG_TYPE",function(e,t,r){let s,l;if("string"==typeof t&&i(t,"not ")?(s="must not be",t=t.replace(/^not /,"")):s="must be",o(e," argument"))l="The ".concat(e," ").concat(s," ").concat(n(t,"type"));else{let r=a(e,".")?"property":"argument";l='The "'.concat(e,'" ').concat(r," ").concat(s," ").concat(n(t,"type"))}return l+". Received type ".concat(typeof r)},TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"}),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"}),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.q=t},403:function(e,t,r){var n=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=d;var o=r(709),a=r(337);r(782)(d,o);for(var s=n(a.prototype),l=0;l0){if("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===p.prototype||(t=h(t)),n)s.endEmitted?P(e,new O):N(e,s,t,!0);else if(s.ended)P(e,new _);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(t=s.decoder.write(t),s.objectMode||0!==t.length?N(e,s,t,!1):j(e,s)):N(e,s,t,!1)}}else n||(s.reading=!1,j(e,s));return!s.ended&&(s.length=B?e=B:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function M(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=C(e)),e<=t.length)?e:t.ended?t.length:(t.needReadable=!0,0)}function D(e,t){if(a("onEofChunk"),!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?U(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,J(e)))}}function U(e){var t=e._readableState;a("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(a("emitReadable",t.flowing),t.emittedReadable=!0,i.nextTick(J,e))}function J(e){var t=e._readableState;a("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,z(e)}function j(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(H,e,t))}function H(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function F(e){a("readable nexttick read 0"),e.read(0)}function V(e,t){t.resumeScheduled||(t.resumeScheduled=!0,i.nextTick(W,e,t))}function W(e,t){a("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),z(e),t.flowing&&!t.reading&&e.read(0)}function z(e){var t=e._readableState;for(a("flow",t.flowing);t.flowing&&null!==e.read(););}function G(e,t){var r;return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r)}function Q(e){var t=e._readableState;a("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,i.nextTick(K,t,e))}function K(e,t){if(a("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function Y(e,t){for(var r=0,n=e.length;r=r.highWaterMark:r.length>0)||r.ended))return a("read: emitReadable",r.length,r.ended),0===r.length&&r.ended?Q(this):U(this),null;if(0===(e=M(e,r))&&r.ended)return 0===r.length&&Q(this),null;var i=r.needReadable;return a("need readable",i),(0===r.length||r.length-e0?G(e,r):null)?(r.needReadable=r.length<=r.highWaterMark,e=0):(r.length-=e,r.awaitDrain=0),0===r.length&&(r.ended||(r.needReadable=!0),n!==e&&r.ended&&Q(this)),null!==t&&this.emit("data",t),t},E.prototype._read=function(e){P(this,new k("_read()"))},E.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e)}n.pipesCount+=1,a("pipe count=%d opts=%j",n.pipesCount,t);var o=t&&!1===t.end||e===i.stdout||e===i.stderr?y:l;function s(e,t){a("onunpipe"),e===r&&t&&!1===t.hasUnpiped&&(t.hasUnpiped=!0,p())}function l(){a("onend"),e.end()}n.endEmitted?i.nextTick(o):r.once("end",o),e.on("unpipe",s);var u=q(r);e.on("drain",u);var c=!1;function p(){a("cleanup"),e.removeListener("close",g),e.removeListener("finish",m),e.removeListener("drain",u),e.removeListener("error",h),e.removeListener("unpipe",s),r.removeListener("end",l),r.removeListener("end",y),r.removeListener("data",f),c=!0,n.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&u()}function f(t){a("ondata");var i=e.write(t);a("dest.write",i),!1===i&&((1===n.pipesCount&&n.pipes===e||n.pipesCount>1&&-1!==Y(n.pipes,e))&&!c&&(a("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function h(t){a("onerror",t),y(),e.removeListener("error",h),0===d(e,"error")&&P(e,t)}function g(){e.removeListener("finish",m),y()}function m(){a("onfinish"),e.removeListener("close",g),y()}function y(){a("unpipe"),r.unpipe(e)}return r.on("data",f),I(e,"error",h),e.once("close",g),e.once("finish",m),e.emit("pipe",r),n.flowing||(a("pipe resume"),r.resume()),e},E.prototype.unpipe=function(e){var t=this._readableState,r={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,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o0,!1!==n.flowing&&this.resume()):"readable"!==e||n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,a("on readable",n.length,n.reading),n.length?U(this):n.reading||i.nextTick(F,this)),r},E.prototype.addListener=E.prototype.on,E.prototype.removeListener=function(e,t){var r=c.prototype.removeListener.call(this,e,t);return"readable"===e&&i.nextTick(L,this),r},E.prototype.removeAllListeners=function(e){var t=c.prototype.removeAllListeners.apply(this,arguments);return("readable"===e||void 0===e)&&i.nextTick(L,this),t},E.prototype.resume=function(){var e=this._readableState;return e.flowing||(a("resume"),e.flowing=!e.readableListening,V(this,e)),e.paused=!1,this},E.prototype.pause=function(){return a("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(a("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},E.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",function(){if(a("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)}),e.on("data",function(i){a("wrapped data"),r.decoder&&(i=r.decoder.write(i)),(!r.objectMode||null!=i)&&(r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause()))}),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o-1))throw new O(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(R.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(R.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),R.prototype._write=function(e,t,r){r(new v("_write()"))},R.prototype._writev=null,R.prototype.end=function(e,t,r){var n=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||V(this,n,r),this},Object.defineProperty(R.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(R.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),R.prototype.destroy=h.destroy,R.prototype._undestroy=h.undestroy,R.prototype._destroy=function(e,t){t(e)}},871:function(e,t,r){function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var o,a=r(698),s=Symbol("lastResolve"),l=Symbol("lastReject"),u=Symbol("error"),d=Symbol("ended"),c=Symbol("lastPromise"),p=Symbol("handlePromise"),f=Symbol("stream");function h(e,t){return{value:e,done:t}}function g(e){var t=e[s];if(null!==t){var r=e[f].read();null!==r&&(e[c]=null,e[s]=null,e[l]=null,t(h(r,!1)))}}function m(e){i.nextTick(g,e)}function y(e,t){return function(r,n){e.then(function(){if(t[d]){r(h(void 0,!0));return}t[p](r,n)},n)}}var v=Object.getPrototypeOf(function(){}),b=Object.setPrototypeOf((n(o={get stream(){return this[f]},next:function(){var e,t=this,r=this[u];if(null!==r)return Promise.reject(r);if(this[d])return Promise.resolve(h(void 0,!0));if(this[f].destroyed)return new Promise(function(e,r){i.nextTick(function(){t[u]?r(t[u]):e(h(void 0,!0))})});var n=this[c];if(n)e=new Promise(y(n,this));else{var o=this[f].read();if(null!==o)return Promise.resolve(h(o,!1));e=new Promise(this[p])}return this[c]=e,e}},Symbol.asyncIterator,function(){return this}),n(o,"return",function(){var e=this;return new Promise(function(t,r){e[f].destroy(null,function(e){if(e){r(e);return}t(h(void 0,!0))})})}),o),v),S=function(e){var t,r=Object.create(b,(n(t={},f,{value:e,writable:!0}),n(t,s,{value:null,writable:!0}),n(t,l,{value:null,writable:!0}),n(t,u,{value:null,writable:!0}),n(t,d,{value:e._readableState.endEmitted,writable:!0}),n(t,p,{value:function(e,t){var n=r[f].read();n?(r[c]=null,r[s]=null,r[l]=null,e(h(n,!1))):(r[s]=e,r[l]=t)},writable:!0}),t));return r[c]=null,a(e,function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[l];null!==t&&(r[c]=null,r[s]=null,r[l]=null,t(e)),r[u]=e;return}var n=r[s];null!==n&&(r[c]=null,r[s]=null,r[l]=null,n(h(void 0,!0))),r[d]=!0}),e.on("readable",m.bind(null,r)),r};e.exports=S},379:function(e,t,r){function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function i(e){for(var t=1;t0?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,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return u.alloc(0);for(var t=u.allocUnsafe(e>>>0),r=this.head,n=0;r;)p(r.data,t,n),n+=r.data.length,r=r.next;return t}},{key:"consume",value:function(e,t){var r;return ei.length?i.length:e;if(o===i.length?n+=i:n+=i.slice(0,e),0==(e-=o)){o===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=u.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var i=r.data,o=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,o),0==(e-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,t}},{key:c,value:function(e,t){return d(this,i({},t,{depth:0,customInspect:!1}))}}]),e}()},25:function(e){function t(e,t){var o=this,s=this._readableState&&this._readableState.destroyed,l=this._writableState&&this._writableState.destroyed;return s||l?t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,i.nextTick(a,this,e)):i.nextTick(a,this,e)):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?o._writableState?o._writableState.errorEmitted?i.nextTick(n,o):(o._writableState.errorEmitted=!0,i.nextTick(r,o,e)):i.nextTick(r,o,e):t?(i.nextTick(n,o),t(e)):i.nextTick(n,o)})),this}function r(e,t){a(e,t),n(e)}function n(e){(!e._writableState||e._writableState.emitClose)&&(!e._readableState||e._readableState.emitClose)&&e.emit("close")}function o(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function a(e,t){e.emit("error",t)}function s(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}e.exports={destroy:t,undestroy:o,errorOrDestroy:s}},698:function(e,t,r){var n=r(646).q.ERR_STREAM_PREMATURE_CLOSE;function i(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=Array(r),i=0;i0,function(t){e||(e=t),t&&o.forEach(c),a||(o.forEach(c),i(e))})});return r.reduce(p)}e.exports=h},776:function(e,t,r){var n=r(646).q.ERR_INVALID_OPT_VALUE;function i(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}function o(e,t,r,o){var a=i(t,o,r);if(null!=a){if(!(isFinite(a)&&Math.floor(a)===a)||a<0)throw new n(o?r:"highWaterMark",a);return Math.floor(a)}return e.objectMode?16:16384}e.exports={getHighWaterMark:o}},678:function(e,t,r){e.exports=r(781)},55:function(e,t,r){var n=r(300),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(o(n,t),t.Buffer=a),a.prototype=Object.create(i.prototype),o(i,a),a.from=function(e,t,r){if("number"==typeof e)throw TypeError("Argument must not be a number");return i(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},a.allocUnsafe=function(e){if("number"!=typeof e)throw TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw TypeError("Argument must be a number");return n.SlowBuffer(e)}},173:function(e,t,r){e.exports=i;var n=r(361).EventEmitter;function i(){n.call(this)}r(782)(i,n),i.Readable=r(709),i.Writable=r(337),i.Duplex=r(403),i.Transform=r(170),i.PassThrough=r(889),i.finished=r(698),i.pipeline=r(442),i.Stream=i,i.prototype.pipe=function(e,t){var r=this;function i(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function o(){r.readable&&r.resume&&r.resume()}r.on("data",i),e.on("drain",o),e._isStdio||t&&!1===t.end||(r.on("end",s),r.on("close",l));var a=!1;function s(){a||(a=!0,e.end())}function l(){a||(a=!0,"function"==typeof e.destroy&&e.destroy())}function u(e){if(d(),0===n.listenerCount(this,"error"))throw e}function d(){r.removeListener("data",i),e.removeListener("drain",o),r.removeListener("end",s),r.removeListener("close",l),r.removeListener("error",u),e.removeListener("error",u),r.removeListener("end",d),r.removeListener("close",d),e.removeListener("close",d)}return r.on("error",u),e.on("error",u),r.on("end",d),r.on("close",d),e.on("close",d),e.emit("pipe",r),e}},704:function(e,t,r){var n=r(55).Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;if(!e)return"utf8";for(;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}function a(e){var t=o(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw Error("Unknown encoding: "+e);return t||e}function s(e){var t;switch(this.encoding=a(e),this.encoding){case"utf16le":this.text=h,this.end=g,t=4;break;case"utf8":this.fillLast=c,t=4;break;case"base64":this.text=m,this.end=y,t=3;break;default:this.write=v,this.end=b;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function l(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,t,r){var n=t.length-1;if(n=0?(i>0&&(e.lastNeed=i-1),i):--n=0?(i>0&&(e.lastNeed=i-2),i):--n=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0}function d(e,t,r){if((192&t[0])!=128)return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if((192&t[1])!=128)return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&(192&t[2])!=128)return e.lastNeed=2,"�"}}function c(e){var t=this.lastTotal-this.lastNeed,r=d(this,e,t);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):void(e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length)}function p(e,t){var r=u(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)}function f(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t}function h(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function g(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function m(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function y(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function v(e){return e.toString(this.encoding)}function b(e){return e&&e.length?this.write(e):""}t.s=s,s.prototype.write=function(e){var t,r;if(0===e.length)return"";if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r-1?i(r):r}},139:function(e,t,r){var n=r(174),i=r(925),o=i("%Function.prototype.apply%"),a=i("%Function.prototype.call%"),s=i("%Reflect.apply%",!0)||n.call(a,o),l=i("%Object.getOwnPropertyDescriptor%",!0),u=i("%Object.defineProperty%",!0),d=i("%Math.max%");if(u)try{u({},"a",{value:1})}catch(e){u=null}e.exports=function(e){var t=s(n,a,arguments);return l&&u&&l(t,"length").configurable&&u(t,"length",{value:1+d(0,e.length-(arguments.length-1))}),t};var c=function(){return s(n,o,arguments)};u?u(e.exports,"apply",{value:c}):e.exports.apply=c},144:function(e){var t=Object.prototype.hasOwnProperty,r=Object.prototype.toString;e.exports=function(e,n,i){if("[object Function]"!==r.call(n))throw TypeError("iterator must be a function");var o=e.length;if(o===+o)for(var a=0;a1&&"boolean"!=typeof t)throw new a('"allowMissing" argument must be a boolean');if(null===O(/^%?[^%]*%?$/g,e))throw new i("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=I(e),n=r.length>0?r[0]:"",o=R("%"+n+"%",t),s=o.name,u=o.value,d=!1,c=o.alias;c&&(n=c[0],w(r,S([0,1],c)));for(var p=1,f=!0;p=r.length){var v=l(u,h);u=(f=!!v)&&"get"in v&&!("originalValue"in v.get)?v.get:u[h]}else f=b(u,h),u=u[h];f&&!d&&(g[s]=u)}}return u}},925:function(e,t,r){var n,i=SyntaxError,o=Function,a=TypeError,s=function(e){try{return o('"use strict"; return ('+e+").constructor;")()}catch(e){}},l=Object.getOwnPropertyDescriptor;if(l)try{l({},"")}catch(e){l=null}var u=function(){throw new a},d=l?function(){try{return arguments.callee,u}catch(e){try{return l(arguments,"callee").get}catch(e){return u}}}():u,c=r(115)(),p=r(504)(),f=Object.getPrototypeOf||(p?function(e){return e.__proto__}:null),h={},g="undefined"!=typeof Uint8Array&&f?f(Uint8Array):n,m={"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":c&&f?f([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":h,"%AsyncGenerator%":h,"%AsyncGeneratorFunction%":h,"%AsyncIteratorPrototype%":h,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":o,"%GeneratorFunction%":h,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":c&&f?f(f([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&c&&f?f((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&c&&f?f((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":c&&f?f(""[Symbol.iterator]()):n,"%Symbol%":c?Symbol:n,"%SyntaxError%":i,"%ThrowTypeError%":d,"%TypedArray%":g,"%TypeError%":a,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet};if(f)try{null.error}catch(e){var y=f(f(e));m["%Error.prototype%"]=y}var v=function e(t){var r;if("%AsyncFunction%"===t)r=s("async function () {}");else if("%GeneratorFunction%"===t)r=s("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=s("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var i=e("%AsyncGenerator%");i&&f&&(r=f(i.prototype))}return m[t]=r,r},b={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},S=r(174),w=r(101),_=S.call(Function.call,Array.prototype.concat),k=S.call(Function.apply,Array.prototype.splice),O=S.call(Function.call,String.prototype.replace),P=S.call(Function.call,String.prototype.slice),A=S.call(Function.call,RegExp.prototype.exec),I=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,R=/\\(\\)?/g,E=function(e){var t=P(e,0,1),r=P(e,-1);if("%"===t&&"%"!==r)throw new i("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new i("invalid intrinsic syntax, expected opening `%`");var n=[];return O(e,I,function(e,t,r,i){n[n.length]=r?O(i,R,"$1"):t||e}),n},T=function(e,t){var r,n=e;if(w(b,n)&&(n="%"+(r=b[n])[0]+"%"),w(m,n)){var o=m[n];if(o===h&&(o=v(n)),void 0===o&&!t)throw new a("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new i("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new a('"allowMissing" argument must be a boolean');if(null===A(/^%?[^%]*%?$/,e))throw new i("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=E(e),n=r.length>0?r[0]:"",o=T("%"+n+"%",t),s=o.name,u=o.value,d=!1,c=o.alias;c&&(n=c[0],k(r,_([0,1],c)));for(var p=1,f=!0;p=r.length){var v=l(u,h);u=(f=!!v)&&"get"in v&&!("originalValue"in v.get)?v.get:u[h]}else f=w(u,h),u=u[h];f&&!d&&(m[s]=u)}}return u}},504:function(e){var t={foo:{}},r=Object;e.exports=function(){return({__proto__:t}).foo===t.foo&&!(({__proto__:null})instanceof r)}},942:function(e,t,r){var n="undefined"!=typeof Symbol&&Symbol,i=r(773);e.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&i()}},773:function(e){e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t||"[object Symbol]"!==Object.prototype.toString.call(t)||"[object Symbol]"!==Object.prototype.toString.call(r))return!1;var n=42;for(t in e[t]=n,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length||"function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var i=Object.getOwnPropertySymbols(e);if(1!==i.length||i[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(o.value!==n||!0!==o.enumerable)return!1}return!0}},115:function(e,t,r){var n="undefined"!=typeof Symbol&&Symbol,i=r(832);e.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&i()}},832:function(e){e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t||"[object Symbol]"!==Object.prototype.toString.call(t)||"[object Symbol]"!==Object.prototype.toString.call(r))return!1;var n=42;for(t in e[t]=n,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length||"function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var i=Object.getOwnPropertySymbols(e);if(1!==i.length||i[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(o.value!==n||!0!==o.enumerable)return!1}return!0}},101:function(e,t,r){var n=r(174);e.exports=n.call(Function.call,Object.prototype.hasOwnProperty)},782:function(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 r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},157:function(e){var t="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,r=Object.prototype.toString,n=function(e){return(!t||!e||"object"!=typeof e||!(Symbol.toStringTag in e))&&"[object Arguments]"===r.call(e)},i=function(e){return!!n(e)||null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Array]"!==r.call(e)&&"[object Function]"===r.call(e.callee)},o=function(){return n(arguments)}();n.isLegacyArguments=i,e.exports=o?n:i},391:function(e){var t=Object.prototype.toString,r=Function.prototype.toString,n=/^\s*(?:function)?\*/,i="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,o=Object.getPrototypeOf,a=function(){if(!i)return!1;try{return Function("return function*() {}")()}catch(e){}}(),s=a?o(a):{};e.exports=function(e){return"function"==typeof e&&(!!n.test(r.call(e))||(i?o(e)===s:"[object GeneratorFunction]"===t.call(e)))}},994:function(e,t,n){var i=n(144),o=n(349),a=n(256),s=a("Object.prototype.toString"),l=n(942)()&&"symbol"==typeof Symbol.toStringTag,u=o(),d=a("Array.prototype.indexOf",!0)||function(e,t){for(var r=0;r-1)}},369:function(e){e.exports=function(e){return e instanceof i}},584:function(e,t,r){var n=r(157),i=r(391),o=r(490),a=r(994);function s(e){return e.call.bind(e)}var l="undefined"!=typeof BigInt,u="undefined"!=typeof Symbol,d=s(Object.prototype.toString),c=s(Number.prototype.valueOf),p=s(String.prototype.valueOf),f=s(Boolean.prototype.valueOf);if(l)var h=s(BigInt.prototype.valueOf);if(u)var g=s(Symbol.prototype.valueOf);function m(e,t){if("object"!=typeof e)return!1;try{return t(e),!0}catch(e){return!1}}function y(e){return"undefined"!=typeof Promise&&e instanceof Promise||null!==e&&"object"==typeof e&&"function"==typeof e.then&&"function"==typeof e.catch}function v(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):a(e)||q(e)}function b(e){return"Uint8Array"===o(e)}function S(e){return"Uint8ClampedArray"===o(e)}function w(e){return"Uint16Array"===o(e)}function _(e){return"Uint32Array"===o(e)}function k(e){return"Int8Array"===o(e)}function O(e){return"Int16Array"===o(e)}function P(e){return"Int32Array"===o(e)}function A(e){return"Float32Array"===o(e)}function I(e){return"Float64Array"===o(e)}function R(e){return"BigInt64Array"===o(e)}function E(e){return"BigUint64Array"===o(e)}function T(e){return"[object Map]"===d(e)}function N(e){return"undefined"!=typeof Map&&(T.working?T(e):e instanceof Map)}function x(e){return"[object Set]"===d(e)}function B(e){return"undefined"!=typeof Set&&(x.working?x(e):e instanceof Set)}function C(e){return"[object WeakMap]"===d(e)}function M(e){return"undefined"!=typeof WeakMap&&(C.working?C(e):e instanceof WeakMap)}function D(e){return"[object WeakSet]"===d(e)}function U(e){return D(e)}function J(e){return"[object ArrayBuffer]"===d(e)}function j(e){return"undefined"!=typeof ArrayBuffer&&(J.working?J(e):e instanceof ArrayBuffer)}function H(e){return"[object DataView]"===d(e)}function q(e){return"undefined"!=typeof DataView&&(H.working?H(e):e instanceof DataView)}t.isArgumentsObject=n,t.isGeneratorFunction=i,t.isTypedArray=a,t.isPromise=y,t.isArrayBufferView=v,t.isUint8Array=b,t.isUint8ClampedArray=S,t.isUint16Array=w,t.isUint32Array=_,t.isInt8Array=k,t.isInt16Array=O,t.isInt32Array=P,t.isFloat32Array=A,t.isFloat64Array=I,t.isBigInt64Array=R,t.isBigUint64Array=E,T.working="undefined"!=typeof Map&&T(new Map),t.isMap=N,x.working="undefined"!=typeof Set&&x(new Set),t.isSet=B,C.working="undefined"!=typeof WeakMap&&C(new WeakMap),t.isWeakMap=M,D.working="undefined"!=typeof WeakSet&&D(new WeakSet),t.isWeakSet=U,J.working="undefined"!=typeof ArrayBuffer&&J(new ArrayBuffer),t.isArrayBuffer=j,H.working="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView&&H(new DataView(new ArrayBuffer(1),0,1)),t.isDataView=q;var L="undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function F(e){return"[object SharedArrayBuffer]"===d(e)}function V(e){return void 0!==L&&(void 0===F.working&&(F.working=F(new L)),F.working?F(e):e instanceof L)}function W(e){return"[object AsyncFunction]"===d(e)}function z(e){return"[object Map Iterator]"===d(e)}function G(e){return"[object Set Iterator]"===d(e)}function Q(e){return"[object Generator]"===d(e)}function K(e){return"[object WebAssembly.Module]"===d(e)}function Y(e){return m(e,c)}function Z(e){return m(e,p)}function X(e){return m(e,f)}function $(e){return l&&m(e,h)}function ee(e){return u&&m(e,g)}function et(e){return Y(e)||Z(e)||X(e)||$(e)||ee(e)}function er(e){return"undefined"!=typeof Uint8Array&&(j(e)||V(e))}t.isSharedArrayBuffer=V,t.isAsyncFunction=W,t.isMapIterator=z,t.isSetIterator=G,t.isGeneratorObject=Q,t.isWebAssemblyCompiledModule=K,t.isNumberObject=Y,t.isStringObject=Z,t.isBooleanObject=X,t.isBigIntObject=$,t.isSymbolObject=ee,t.isBoxedPrimitive=et,t.isAnyArrayBuffer=er,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(e){Object.defineProperty(t,e,{enumerable:!1,value:function(){throw Error(e+" is not supported in userland")}})})},177:function(e,t,r){var n=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),r={},n=0;n=o)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}}),s=n[r];r=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),S(r)?n.showHidden=r:r&&t._extend(n,r),A(n.showHidden)&&(n.showHidden=!1),A(n.depth)&&(n.depth=2),A(n.colors)&&(n.colors=!1),A(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=d),f(n,e,n.depth)}function d(e,t){var r=u.styles[t];return r?"\x1b["+u.colors[r][0]+"m"+e+"\x1b["+u.colors[r][1]+"m":e}function c(e,t){return e}function p(e){var t={};return e.forEach(function(e,r){t[e]=!0}),t}function f(e,r,n){if(e.customInspect&&r&&N(r.inspect)&&r.inspect!==t.inspect&&!(r.constructor&&r.constructor.prototype===r)){var i,o=r.inspect(n,e);return O(o)||(o=f(e,o,n)),o}var a=h(e,r);if(a)return a;var s=Object.keys(r),l=p(s);if(e.showHidden&&(s=Object.getOwnPropertyNames(r)),T(r)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return g(r);if(0===s.length){if(N(r)){var u=r.name?": "+r.name:"";return e.stylize("[Function"+u+"]","special")}if(I(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(E(r))return e.stylize(Date.prototype.toString.call(r),"date");if(T(r))return g(r)}var d="",c=!1,S=["{","}"];return(b(r)&&(c=!0,S=["[","]"]),N(r)&&(d=" [Function"+(r.name?": "+r.name:"")+"]"),I(r)&&(d=" "+RegExp.prototype.toString.call(r)),E(r)&&(d=" "+Date.prototype.toUTCString.call(r)),T(r)&&(d=" "+g(r)),0!==s.length||c&&0!=r.length)?n<0?I(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),i=c?m(e,r,n,l,s):s.map(function(t){return y(e,r,n,l,t,c)}),e.seen.pop(),v(i,d,S)):S[0]+d+S[1]}function h(e,t){if(A(t))return e.stylize("undefined","undefined");if(O(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return k(t)?e.stylize(""+t,"number"):S(t)?e.stylize(""+t,"boolean"):w(t)?e.stylize("null","null"):void 0}function g(e){return"["+Error.prototype.toString.call(e)+"]"}function m(e,t,r,n,i){for(var o=[],a=0,s=t.length;ae.seen.indexOf(l.value)?(s=w(r)?f(e,l.value,null):f(e,l.value,r-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+s.split("\n").map(function(e){return" "+e}).join("\n")):s=e.stylize("[Circular]","special")),A(a)){if(o&&i.match(/^\d+$/))return s;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function v(e,t,r){var n=0;return e.reduce(function(e,t){return n++,t.indexOf("\n")>=0&&n++,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}function b(e){return Array.isArray(e)}function S(e){return"boolean"==typeof e}function w(e){return null===e}function _(e){return null==e}function k(e){return"number"==typeof e}function O(e){return"string"==typeof e}function P(e){return"symbol"==typeof e}function A(e){return void 0===e}function I(e){return R(e)&&"[object RegExp]"===B(e)}function R(e){return"object"==typeof e&&null!==e}function E(e){return R(e)&&"[object Date]"===B(e)}function T(e){return R(e)&&("[object Error]"===B(e)||e instanceof Error)}function N(e){return"function"==typeof e}function x(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e}function B(e){return Object.prototype.toString.call(e)}function C(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(!a[e=e.toUpperCase()]){if(s.test(e)){var r=o.pid;a[e]=function(){var n=t.format.apply(t,arguments);console.error("%s %d: %s",e,r,n)}}else a[e]=function(){}}return a[e]},t.inspect=u,u.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},u.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.types=r(584),t.isArray=b,t.isBoolean=S,t.isNull=w,t.isNullOrUndefined=_,t.isNumber=k,t.isString=O,t.isSymbol=P,t.isUndefined=A,t.isRegExp=I,t.types.isRegExp=I,t.isObject=R,t.isDate=E,t.types.isDate=E,t.isError=T,t.types.isNativeError=T,t.isFunction=N,t.isPrimitive=x,t.isBuffer=r(369);var M=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function D(){var e=new Date,t=[C(e.getHours()),C(e.getMinutes()),C(e.getSeconds())].join(":");return[e.getDate(),M[e.getMonth()],t].join(" ")}function U(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){console.log("%s - %s",D(),t.format.apply(t,arguments))},t.inherits=r(782),t._extend=function(e,t){if(!t||!R(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};var J="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function j(e,t){if(!e){var r=Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}function H(e){if("function"!=typeof e)throw TypeError('The "original" argument must be of type Function');function t(){for(var t=[],r=0;r{let t=l[e]||"",{repeat:r,optional:n}=s[e],i="["+(r?"...":"")+e+"]";return n&&(i=(t?"":"/")+"["+i+"]"),r&&!Array.isArray(t)&&(t=[t]),(n||e in l)&&(o=o.replace(i,r?t.map(e=>encodeURIComponent(e)).join("/"):encodeURIComponent(t))||"/")})||(o=""),{params:u,result:o}}},11305:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isDynamicRoute",{enumerable:!0,get:function(){return o}});let n=r(94749),i=/\/\[[^/]+?\](?=\/|$)/;function o(e){return(0,n.isInterceptionRouteAppPath)(e)&&(e=(0,n.extractInterceptionRouteInformation)(e).interceptedRoute),i.test(e)}},17434:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isLocalURL",{enumerable:!0,get:function(){return o}});let n=r(36874),i=r(87379);function o(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,i.hasBasePath)(r.pathname)}catch(e){return!1}}},24544:function(e,t){"use strict";function r(e,t){let r={};return Object.keys(e).forEach(n=>{t.includes(n)||(r[n]=e[n])}),r}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"omit",{enumerable:!0,get:function(){return r}})},95770:function(e,t){"use strict";function r(e){let t={};return e.forEach((e,r)=>{void 0===t[r]?t[r]=e:Array.isArray(t[r])?t[r].push(e):t[r]=[t[r],e]}),t}function n(e){return"string"!=typeof e&&("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function i(e){let t=new URLSearchParams;return Object.entries(e).forEach(e=>{let[r,i]=e;Array.isArray(i)?i.forEach(e=>t.append(r,n(e))):t.set(r,n(i))}),t}function o(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n{Array.from(t.keys()).forEach(t=>e.delete(t)),t.forEach((t,r)=>e.append(r,t))}),e}Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{searchParamsToUrlQuery:function(){return r},urlQueryToSearchParams:function(){return i},assign:function(){return o}})},2395:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getRouteMatcher",{enumerable:!0,get:function(){return i}});let n=r(36874);function i(e){let{re:t,groups:r}=e;return e=>{let i=t.exec(e);if(!i)return!1;let o=e=>{try{return decodeURIComponent(e)}catch(e){throw new n.DecodeError("failed to decode param")}},a={};return Object.keys(r).forEach(e=>{let t=r[e],n=i[t.pos];void 0!==n&&(a[e]=~n.indexOf("/")?n.split("/").map(e=>o(e)):t.repeat?[o(n)]:o(n))}),a}}},19935:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{getRouteRegex:function(){return d},getNamedRouteRegex:function(){return h},getNamedMiddlewareRegex:function(){return g}});let n=r(94749),i=r(22202),o=r(95868),a="nxtP",s="nxtI";function l(e){let t=e.startsWith("[")&&e.endsWith("]");t&&(e=e.slice(1,-1));let r=e.startsWith("...");return r&&(e=e.slice(3)),{key:e,repeat:r,optional:t}}function u(e){let t=(0,o.removeTrailingSlash)(e).slice(1).split("/"),r={},a=1;return{parameterizedRoute:t.map(e=>{let t=n.INTERCEPTION_ROUTE_MARKERS.find(t=>e.startsWith(t)),o=e.match(/\[((?:\[.*\])|.+)\]/);if(t&&o){let{key:e,optional:n,repeat:s}=l(o[1]);return r[e]={pos:a++,repeat:s,optional:n},"/"+(0,i.escapeStringRegexp)(t)+"([^/]+?)"}if(!o)return"/"+(0,i.escapeStringRegexp)(e);{let{key:e,repeat:t,optional:n}=l(o[1]);return r[e]={pos:a++,repeat:t,optional:n},t?n?"(?:/(.+?))?":"/(.+?)":"/([^/]+?)"}}).join(""),groups:r}}function d(e){let{parameterizedRoute:t,groups:r}=u(e);return{re:RegExp("^"+t+"(?:/)?$"),groups:r}}function c(){let e=0;return()=>{let t="",r=++e;for(;r>0;)t+=String.fromCharCode(97+(r-1)%26),r=Math.floor((r-1)/26);return t}}function p(e){let{interceptionMarker:t,getSafeRouteKey:r,segment:n,routeKeys:o,keyPrefix:a}=e,{key:s,optional:u,repeat:d}=l(n),c=s.replace(/\W/g,"");a&&(c=""+a+c);let p=!1;(0===c.length||c.length>30)&&(p=!0),isNaN(parseInt(c.slice(0,1)))||(p=!0),p&&(c=r()),a?o[c]=""+a+s:o[c]=s;let f=t?(0,i.escapeStringRegexp)(t):"";return d?u?"(?:/"+f+"(?<"+c+">.+?))?":"/"+f+"(?<"+c+">.+?)":"/"+f+"(?<"+c+">[^/]+?)"}function f(e,t){let r=(0,o.removeTrailingSlash)(e).slice(1).split("/"),l=c(),u={};return{namedParameterizedRoute:r.map(e=>{let r=n.INTERCEPTION_ROUTE_MARKERS.some(t=>e.startsWith(t)),o=e.match(/\[((?:\[.*\])|.+)\]/);if(r&&o){let[r]=e.split(o[0]);return p({getSafeRouteKey:l,interceptionMarker:r,segment:o[1],routeKeys:u,keyPrefix:t?s:void 0})}return o?p({getSafeRouteKey:l,segment:o[1],routeKeys:u,keyPrefix:t?a:void 0}):"/"+(0,i.escapeStringRegexp)(e)}).join(""),routeKeys:u}}function h(e,t){let r=f(e,t);return{...d(e),namedRegex:"^"+r.namedParameterizedRoute+"(?:/)?$",routeKeys:r.routeKeys}}function g(e,t){let{parameterizedRoute:r}=u(e),{catchAll:n=!0}=t;if("/"===r)return{namedRegex:"^/"+(n?".*":"")+"$"};let{namedParameterizedRoute:i}=f(e,!1);return{namedRegex:"^"+i+(n?"(?:(/.*)?)":"")+"$"}}},97409:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getSortedRoutes",{enumerable:!0,get:function(){return n}});class r{insert(e){this._insert(e.split("/").filter(Boolean),[],!1)}smoosh(){return this._smoosh()}_smoosh(e){void 0===e&&(e="/");let t=[...this.children.keys()].sort();null!==this.slugName&&t.splice(t.indexOf("[]"),1),null!==this.restSlugName&&t.splice(t.indexOf("[...]"),1),null!==this.optionalRestSlugName&&t.splice(t.indexOf("[[...]]"),1);let r=t.map(t=>this.children.get(t)._smoosh(""+e+t+"/")).reduce((e,t)=>[...e,...t],[]);if(null!==this.slugName&&r.push(...this.children.get("[]")._smoosh(e+"["+this.slugName+"]/")),!this.placeholder){let t="/"===e?"/":e.slice(0,-1);if(null!=this.optionalRestSlugName)throw Error('You cannot define a route with the same specificity as a optional catch-all route ("'+t+'" and "'+t+"[[..."+this.optionalRestSlugName+']]").');r.unshift(t)}return null!==this.restSlugName&&r.push(...this.children.get("[...]")._smoosh(e+"[..."+this.restSlugName+"]/")),null!==this.optionalRestSlugName&&r.push(...this.children.get("[[...]]")._smoosh(e+"[[..."+this.optionalRestSlugName+"]]/")),r}_insert(e,t,n){if(0===e.length){this.placeholder=!1;return}if(n)throw Error("Catch-all must be the last part of the URL.");let i=e[0];if(i.startsWith("[")&&i.endsWith("]")){let r=i.slice(1,-1),a=!1;if(r.startsWith("[")&&r.endsWith("]")&&(r=r.slice(1,-1),a=!0),r.startsWith("...")&&(r=r.substring(3),n=!0),r.startsWith("[")||r.endsWith("]"))throw Error("Segment names may not start or end with extra brackets ('"+r+"').");if(r.startsWith("."))throw Error("Segment names may not start with erroneous periods ('"+r+"').");function o(e,r){if(null!==e&&e!==r)throw Error("You cannot use different slug names for the same dynamic path ('"+e+"' !== '"+r+"').");t.forEach(e=>{if(e===r)throw Error('You cannot have the same slug name "'+r+'" repeat within a single dynamic path');if(e.replace(/\W/g,"")===i.replace(/\W/g,""))throw Error('You cannot have the slug names "'+e+'" and "'+r+'" differ only by non-word symbols within a single dynamic path')}),t.push(r)}if(n){if(a){if(null!=this.restSlugName)throw Error('You cannot use both an required and optional catch-all route at the same level ("[...'+this.restSlugName+']" and "'+e[0]+'" ).');o(this.optionalRestSlugName,r),this.optionalRestSlugName=r,i="[[...]]"}else{if(null!=this.optionalRestSlugName)throw Error('You cannot use both an optional and required catch-all route at the same level ("[[...'+this.optionalRestSlugName+']]" and "'+e[0]+'").');o(this.restSlugName,r),this.restSlugName=r,i="[...]"}}else{if(a)throw Error('Optional route parameters are not yet supported ("'+e[0]+'").');o(this.slugName,r),this.slugName=r,i="[]"}}this.children.has(i)||this.children.set(i,new r),this.children.get(i)._insert(e.slice(1),t,n)}constructor(){this.placeholder=!0,this.children=new Map,this.slugName=null,this.restSlugName=null,this.optionalRestSlugName=null}}function n(e){let t=new r;return e.forEach(e=>t.insert(e)),t.smoosh()}},36874:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{WEB_VITALS:function(){return r},execOnce:function(){return n},isAbsoluteUrl:function(){return o},getLocationOrigin:function(){return a},getURL:function(){return s},getDisplayName:function(){return l},isResSent:function(){return u},normalizeRepeatedSlashes:function(){return d},loadGetInitialProps:function(){return c},SP:function(){return p},ST:function(){return f},DecodeError:function(){return h},NormalizeError:function(){return g},PageNotFoundError:function(){return m},MissingStaticPage:function(){return y},MiddlewareNotFoundError:function(){return v},stringifyError:function(){return b}});let r=["CLS","FCP","FID","INP","LCP","TTFB"];function n(e){let t,r=!1;return function(){for(var n=arguments.length,i=Array(n),o=0;oi.test(e);function a(){let{protocol:e,hostname:t,port:r}=window.location;return e+"//"+t+(r?":"+r:"")}function s(){let{href:e}=window.location,t=a();return e.substring(t.length)}function l(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function u(e){return e.finished||e.headersSent}function d(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?"?"+t.slice(1).join("?"):"")}async function c(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await c(t.Component,t.ctx)}:{};let n=await e.getInitialProps(t);if(r&&u(r))return n;if(!n)throw Error('"'+l(e)+'.getInitialProps()" should resolve to an object. But found "'+n+'" instead.');return n}let p="undefined"!=typeof performance,f=p&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class h extends Error{}class g extends Error{}class m extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message="Cannot find module for page: "+e}}class y extends Error{constructor(e,t){super(),this.message="Failed to load static file for page: "+e+" "+t}}class v extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function b(e){return JSON.stringify({message:e.message,stack:e.stack})}},40174:function(e,t,r){"use strict";var n;if(!Object.keys){var i=Object.prototype.hasOwnProperty,o=Object.prototype.toString,a=r(42947),s=Object.prototype.propertyIsEnumerable,l=!s.call({toString:null},"toString"),u=s.call(function(){},"prototype"),d=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],c=function(e){var t=e.constructor;return t&&t.prototype===e},p={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},f=function(){for(var e in window)try{if(!p["$"+e]&&i.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{c(window[e])}catch(e){return!0}}catch(e){return!0}return!1}(),h=function(e){if(!f)return c(e);try{return c(e)}catch(e){return!1}};n=function(e){var t=null!==e&&"object"==typeof e,r="[object Function]"===o.call(e),n=a(e),s=t&&"[object String]"===o.call(e),c=[];if(!t&&!r&&!n)throw TypeError("Object.keys called on a non-object");var p=u&&r;if(s&&e.length>0&&!i.call(e,0))for(var f=0;f0)for(var g=0;g=0&&"[object Function]"===t.call(e.callee)),n}},71821:function(e,t,r){"use strict";let{Deflate:n,deflate:i,deflateRaw:o,gzip:a}=r(96232),{Inflate:s,inflate:l,inflateRaw:u,ungzip:d}=r(36449),c=r(70113);e.exports.Deflate=n,e.exports.deflate=i,e.exports.deflateRaw=o,e.exports.gzip=a,e.exports.Inflate=s,e.exports.inflate=l,e.exports.inflateRaw=u,e.exports.ungzip=d,e.exports.constants=c},96232:function(e,t,r){"use strict";let n=r(75102),i=r(71387),o=r(94256),a=r(82077),s=r(75027),l=Object.prototype.toString,{Z_NO_FLUSH:u,Z_SYNC_FLUSH:d,Z_FULL_FLUSH:c,Z_FINISH:p,Z_OK:f,Z_STREAM_END:h,Z_DEFAULT_COMPRESSION:g,Z_DEFAULT_STRATEGY:m,Z_DEFLATED:y}=r(70113);function v(e){this.options=i.assign({level:g,method:y,chunkSize:16384,windowBits:15,memLevel:8,strategy:m},e||{});let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new s,this.strm.avail_out=0;let r=n.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(r!==f)throw Error(a[r]);if(t.header&&n.deflateSetHeader(this.strm,t.header),t.dictionary){let e;if(e="string"==typeof t.dictionary?o.string2buf(t.dictionary):"[object ArrayBuffer]"===l.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,(r=n.deflateSetDictionary(this.strm,e))!==f)throw Error(a[r]);this._dict_set=!0}}function b(e,t){let r=new v(t);if(r.push(e,!0),r.err)throw r.msg||a[r.err];return r.result}function S(e,t){return(t=t||{}).raw=!0,b(e,t)}function w(e,t){return(t=t||{}).gzip=!0,b(e,t)}v.prototype.push=function(e,t){let r,i;let a=this.strm,s=this.options.chunkSize;if(this.ended)return!1;for(i=t===~~t?t:!0===t?p:u,"string"==typeof e?a.input=o.string2buf(e):"[object ArrayBuffer]"===l.call(e)?a.input=new Uint8Array(e):a.input=e,a.next_in=0,a.avail_in=a.input.length;;){if(0===a.avail_out&&(a.output=new Uint8Array(s),a.next_out=0,a.avail_out=s),(i===d||i===c)&&a.avail_out<=6){this.onData(a.output.subarray(0,a.next_out)),a.avail_out=0;continue}if((r=n.deflate(a,i))===h)return a.next_out>0&&this.onData(a.output.subarray(0,a.next_out)),r=n.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===f;if(0===a.avail_out){this.onData(a.output);continue}if(i>0&&a.next_out>0){this.onData(a.output.subarray(0,a.next_out)),a.avail_out=0;continue}if(0===a.avail_in)break}return!0},v.prototype.onData=function(e){this.chunks.push(e)},v.prototype.onEnd=function(e){e===f&&(this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},e.exports.Deflate=v,e.exports.deflate=b,e.exports.deflateRaw=S,e.exports.gzip=w,e.exports.constants=r(70113)},36449:function(e,t,r){"use strict";let n=r(62450),i=r(71387),o=r(94256),a=r(82077),s=r(75027),l=r(85315),u=Object.prototype.toString,{Z_NO_FLUSH:d,Z_FINISH:c,Z_OK:p,Z_STREAM_END:f,Z_NEED_DICT:h,Z_STREAM_ERROR:g,Z_DATA_ERROR:m,Z_MEM_ERROR:y}=r(70113);function v(e){this.options=i.assign({chunkSize:65536,windowBits:15,to:""},e||{});let t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),t.windowBits>=0&&t.windowBits<16&&!(e&&e.windowBits)&&(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(15&t.windowBits)==0&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new s,this.strm.avail_out=0;let r=n.inflateInit2(this.strm,t.windowBits);if(r!==p||(this.header=new l,n.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=o.string2buf(t.dictionary):"[object ArrayBuffer]"===u.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=n.inflateSetDictionary(this.strm,t.dictionary))!==p)))throw Error(a[r])}function b(e,t){let r=new v(t);if(r.push(e),r.err)throw r.msg||a[r.err];return r.result}function S(e,t){return(t=t||{}).raw=!0,b(e,t)}v.prototype.push=function(e,t){let r,i,a;let s=this.strm,l=this.options.chunkSize,v=this.options.dictionary;if(this.ended)return!1;for(i=t===~~t?t:!0===t?c:d,"[object ArrayBuffer]"===u.call(e)?s.input=new Uint8Array(e):s.input=e,s.next_in=0,s.avail_in=s.input.length;;){for(0===s.avail_out&&(s.output=new Uint8Array(l),s.next_out=0,s.avail_out=l),(r=n.inflate(s,i))===h&&v&&((r=n.inflateSetDictionary(s,v))===p?r=n.inflate(s,i):r===m&&(r=h));s.avail_in>0&&r===f&&s.state.wrap>0&&0!==e[s.next_in];)n.inflateReset(s),r=n.inflate(s,i);switch(r){case g:case m:case h:case y:return this.onEnd(r),this.ended=!0,!1}if(a=s.avail_out,s.next_out&&(0===s.avail_out||r===f)){if("string"===this.options.to){let e=o.utf8border(s.output,s.next_out),t=s.next_out-e,r=o.buf2string(s.output,e);s.next_out=t,s.avail_out=l-t,t&&s.output.set(s.output.subarray(e,e+t),0),this.onData(r)}else this.onData(s.output.length===s.next_out?s.output:s.output.subarray(0,s.next_out))}if(r!==p||0!==a){if(r===f)return r=n.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,!0;if(0===s.avail_in)break}}return!0},v.prototype.onData=function(e){this.chunks.push(e)},v.prototype.onEnd=function(e){e===p&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},e.exports.Inflate=v,e.exports.inflate=b,e.exports.inflateRaw=S,e.exports.ungzip=b,e.exports.constants=r(70113)},71387:function(e){"use strict";let t=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);e.exports.assign=function(e){let r=Array.prototype.slice.call(arguments,1);for(;r.length;){let n=r.shift();if(n){if("object"!=typeof n)throw TypeError(n+"must be non-object");for(let r in n)t(n,r)&&(e[r]=n[r])}}return e},e.exports.flattenChunks=e=>{let t=0;for(let r=0,n=e.length;r=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;r[254]=r[254]=1,e.exports.string2buf=e=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return new TextEncoder().encode(e);let t,r,n,i,o,a=e.length,s=0;for(i=0;i>>6:(r<65536?t[o++]=224|r>>>12:(t[o++]=240|r>>>18,t[o++]=128|r>>>12&63),t[o++]=128|r>>>6&63),t[o++]=128|63&r);return t};let n=(e,r)=>{if(r<65534&&e.subarray&&t)return String.fromCharCode.apply(null,e.length===r?e:e.subarray(0,r));let n="";for(let t=0;t{let i,o;let a=t||e.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return new TextDecoder().decode(e.subarray(0,t));let s=Array(2*a);for(o=0,i=0;i4){s[o++]=65533,i+=n-1;continue}for(t&=2===n?31:3===n?15:7;n>1&&i1){s[o++]=65533;continue}t<65536?s[o++]=t:(t-=65536,s[o++]=55296|t>>10&1023,s[o++]=56320|1023&t)}return n(s,o)},e.exports.utf8border=(e,t)=>{(t=t||e.length)>e.length&&(t=e.length);let n=t-1;for(;n>=0&&(192&e[n])==128;)n--;return n<0||0===n?t:n+r[e[n]]>t?n:t}},35463:function(e){"use strict";let t=(e,t,r,n)=>{let i=65535&e|0,o=e>>>16&65535|0,a=0;for(;0!==r;){a=r>2e3?2e3:r,r-=a;do o=o+(i=i+t[n++]|0)|0;while(--a);i%=65521,o%=65521}return i|o<<16|0};e.exports=t},70113:function(e){"use strict";e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},26657:function(e){"use strict";let t=()=>{let e,t=[];for(var r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t},r=new Uint32Array(t()),n=(e,t,n,i)=>{let o=r,a=i+n;e^=-1;for(let r=i;r>>8^o[(e^t[r])&255];return -1^e};e.exports=n},75102:function(e,t,r){"use strict";let{_tr_init:n,_tr_stored_block:i,_tr_flush_block:o,_tr_tally:a,_tr_align:s}=r(4542),l=r(35463),u=r(26657),d=r(82077),{Z_NO_FLUSH:c,Z_PARTIAL_FLUSH:p,Z_FULL_FLUSH:f,Z_FINISH:h,Z_BLOCK:g,Z_OK:m,Z_STREAM_END:y,Z_STREAM_ERROR:v,Z_DATA_ERROR:b,Z_BUF_ERROR:S,Z_DEFAULT_COMPRESSION:w,Z_FILTERED:_,Z_HUFFMAN_ONLY:k,Z_RLE:O,Z_FIXED:P,Z_DEFAULT_STRATEGY:A,Z_UNKNOWN:I,Z_DEFLATED:R}=r(70113),E=9,T=15,N=8,x=286,B=30,C=19,M=573,D=15,U=3,J=258,j=262,H=32,q=42,L=57,F=69,V=73,W=91,z=103,G=113,Q=666,K=1,Y=2,Z=3,X=4,$=3,ee=(e,t)=>(e.msg=d[t],t),et=e=>2*e-(e>4?9:0),er=e=>{let t=e.length;for(;--t>=0;)e[t]=0},en=e=>{let t,r,n;let i=e.w_size;n=t=e.hash_size;do r=e.head[--n],e.head[n]=r>=i?r-i:0;while(--t);n=t=i;do r=e.prev[--n],e.prev[n]=r>=i?r-i:0;while(--t)},ei=(e,t,r)=>(t<{let t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),0!==r&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+r),e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))},ea=(e,t)=>{o(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,eo(e.strm)},es=(e,t)=>{e.pending_buf[e.pending++]=t},el=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t},eu=(e,t,r,n)=>{let i=e.avail_in;return(i>n&&(i=n),0===i)?0:(e.avail_in-=i,t.set(e.input.subarray(e.next_in,e.next_in+i),r),1===e.state.wrap?e.adler=l(e.adler,t,i,r):2===e.state.wrap&&(e.adler=u(e.adler,t,i,r)),e.next_in+=i,e.total_in+=i,i)},ed=(e,t)=>{let r,n,i=e.max_chain_length,o=e.strstart,a=e.prev_length,s=e.nice_match,l=e.strstart>e.w_size-j?e.strstart-(e.w_size-j):0,u=e.window,d=e.w_mask,c=e.prev,p=e.strstart+J,f=u[o+a-1],h=u[o+a];e.prev_length>=e.good_match&&(i>>=2),s>e.lookahead&&(s=e.lookahead);do{if(u[(r=t)+a]!==h||u[r+a-1]!==f||u[r]!==u[o]||u[++r]!==u[o+1])continue;o+=2,r++;do;while(u[++o]===u[++r]&&u[++o]===u[++r]&&u[++o]===u[++r]&&u[++o]===u[++r]&&u[++o]===u[++r]&&u[++o]===u[++r]&&u[++o]===u[++r]&&u[++o]===u[++r]&&oa){if(e.match_start=t,a=n,n>=s)break;f=u[o+a-1],h=u[o+a]}}while((t=c[t&d])>l&&0!=--i);return a<=e.lookahead?a:e.lookahead},ec=e=>{let t,r,n;let i=e.w_size;do{if(r=e.window_size-e.lookahead-e.strstart,e.strstart>=i+(i-j)&&(e.window.set(e.window.subarray(i,i+i-r),0),e.match_start-=i,e.strstart-=i,e.block_start-=i,e.insert>e.strstart&&(e.insert=e.strstart),en(e),r+=i),0===e.strm.avail_in)break;if(t=eu(e.strm,e.window,e.strstart+e.lookahead,r),e.lookahead+=t,e.lookahead+e.insert>=U)for(n=e.strstart-e.insert,e.ins_h=e.window[n],e.ins_h=ei(e,e.ins_h,e.window[n+1]);e.insert&&(e.ins_h=ei(e,e.ins_h,e.window[n+U-1]),e.prev[n&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=n,n++,e.insert--,!(e.lookahead+e.insert{let r=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,n,o,a,s=0,l=e.strm.avail_in;do{if(n=65535,a=e.bi_valid+42>>3,e.strm.avail_out(o=e.strstart-e.block_start)+e.strm.avail_in&&(n=o+e.strm.avail_in),n>a&&(n=a),n>8,e.pending_buf[e.pending-2]=~n,e.pending_buf[e.pending-1]=~n>>8,eo(e.strm),o&&(o>n&&(o=n),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+o),e.strm.next_out),e.strm.next_out+=o,e.strm.avail_out-=o,e.strm.total_out+=o,e.block_start+=o,n-=o),n&&(eu(e.strm,e.strm.output,e.strm.next_out,n),e.strm.next_out+=n,e.strm.avail_out-=n,e.strm.total_out+=n)}while(0===s);return((l-=e.strm.avail_in)&&(l>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=l&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.insert>e.strstart&&(e.insert=e.strstart)),e.window.set(e.strm.input.subarray(e.strm.next_in-l,e.strm.next_in),e.strstart),e.strstart+=l,e.insert+=l>e.w_size-e.insert?e.w_size-e.insert:l),e.block_start=e.strstart),e.high_watera&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,a+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),a>e.strm.avail_in&&(a=e.strm.avail_in),a&&(eu(e.strm,e.window,e.strstart,a),e.strstart+=a,e.insert+=a>e.w_size-e.insert?e.w_size-e.insert:a),e.high_water>3,r=(a=e.pending_buf_size-a>65535?65535:e.pending_buf_size-a)>e.w_size?e.w_size:a,((o=e.strstart-e.block_start)>=r||(o||t===h)&&t!==c&&0===e.strm.avail_in&&o<=a)&&(n=o>a?a:o,s=t===h&&0===e.strm.avail_in&&n===o?1:0,i(e,e.block_start,n,s),e.block_start+=n,eo(e.strm)),s?Z:K)},ef=(e,t)=>{let r,n;for(;;){if(e.lookahead=U&&(e.ins_h=ei(e,e.ins_h,e.window[e.strstart+U-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==r&&e.strstart-r<=e.w_size-j&&(e.match_length=ed(e,r)),e.match_length>=U){if(n=a(e,e.strstart-e.match_start,e.match_length-U),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=U){e.match_length--;do e.strstart++,e.ins_h=ei(e,e.ins_h,e.window[e.strstart+U-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=ei(e,e.ins_h,e.window[e.strstart+1])}else n=a(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(ea(e,!1),0===e.strm.avail_out))return K}return(e.insert=e.strstart{let r,n,i;for(;;){if(e.lookahead=U&&(e.ins_h=ei(e,e.ins_h,e.window[e.strstart+U-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=U-1,0!==r&&e.prev_length4096)&&(e.match_length=U-1)),e.prev_length>=U&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-U,n=a(e,e.strstart-1-e.prev_match,e.prev_length-U),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=i&&(e.ins_h=ei(e,e.ins_h,e.window[e.strstart+U-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(0!=--e.prev_length);if(e.match_available=0,e.match_length=U-1,e.strstart++,n&&(ea(e,!1),0===e.strm.avail_out))return K}else if(e.match_available){if((n=a(e,0,e.window[e.strstart-1]))&&ea(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return K}else e.match_available=1,e.strstart++,e.lookahead--}return(e.match_available&&(n=a(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart{let r,n,i,o;let s=e.window;for(;;){if(e.lookahead<=J){if(ec(e),e.lookahead<=J&&t===c)return K;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=U&&e.strstart>0&&(n=s[i=e.strstart-1])===s[++i]&&n===s[++i]&&n===s[++i]){o=e.strstart+J;do;while(n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&ie.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=U?(r=a(e,1,e.match_length-U),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=a(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(ea(e,!1),0===e.strm.avail_out))return K}return(e.insert=0,t===h)?(ea(e,!0),0===e.strm.avail_out)?Z:X:e.sym_next&&(ea(e,!1),0===e.strm.avail_out)?K:Y},em=(e,t)=>{let r;for(;;){if(0===e.lookahead&&(ec(e),0===e.lookahead)){if(t===c)return K;break}if(e.match_length=0,r=a(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(ea(e,!1),0===e.strm.avail_out))return K}return(e.insert=0,t===h)?(ea(e,!0),0===e.strm.avail_out)?Z:X:e.sym_next&&(ea(e,!1),0===e.strm.avail_out)?K:Y};function ey(e,t,r,n,i){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=n,this.func=i}let ev=[new ey(0,0,0,0,ep),new ey(4,4,8,4,ef),new ey(4,5,16,8,ef),new ey(4,6,32,32,ef),new ey(4,4,16,16,eh),new ey(8,16,32,32,eh),new ey(8,16,128,128,eh),new ey(8,32,128,256,eh),new ey(32,128,258,1024,eh),new ey(32,258,258,4096,eh)],eb=e=>{e.window_size=2*e.w_size,er(e.head),e.max_lazy_match=ev[e.level].max_lazy,e.good_match=ev[e.level].good_length,e.nice_match=ev[e.level].nice_length,e.max_chain_length=ev[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=U-1,e.match_available=0,e.ins_h=0};function eS(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=R,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(2*M),this.dyn_dtree=new Uint16Array((2*B+1)*2),this.bl_tree=new Uint16Array((2*C+1)*2),er(this.dyn_ltree),er(this.dyn_dtree),er(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(D+1),this.heap=new Uint16Array(2*x+1),er(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*x+1),er(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}let ew=e=>{if(!e)return 1;let t=e.state;return t&&t.strm===e&&(t.status===q||t.status===L||t.status===F||t.status===V||t.status===W||t.status===z||t.status===G||t.status===Q)?0:1},e_=e=>{if(ew(e))return ee(e,v);e.total_in=e.total_out=0,e.data_type=I;let t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=2===t.wrap?L:t.wrap?q:G,e.adler=2===t.wrap?0:1,t.last_flush=-2,n(t),m},ek=e=>{let t=e_(e);return t===m&&eb(e.state),t},eO=(e,t)=>ew(e)||2!==e.state.wrap?v:(e.state.gzhead=t,m),eP=(e,t,r,n,i,o)=>{if(!e)return v;let a=1;if(t===w&&(t=6),n<0?(a=0,n=-n):n>15&&(a=2,n-=16),i<1||i>E||r!==R||n<8||n>15||t<0||t>9||o<0||o>P||8===n&&1!==a)return ee(e,v);8===n&&(n=9);let s=new eS;return e.state=s,s.strm=e,s.status=q,s.wrap=a,s.gzhead=null,s.w_bits=n,s.w_size=1<eP(e,t,R,T,N,A),eI=(e,t)=>{if(ew(e)||t>g||t<0)return e?ee(e,v):v;let r=e.state;if(!e.output||0!==e.avail_in&&!e.input||r.status===Q&&t!==h)return ee(e,0===e.avail_out?S:v);let n=r.last_flush;if(r.last_flush=t,0!==r.pending){if(eo(e),0===e.avail_out)return r.last_flush=-1,m}else if(0===e.avail_in&&et(t)<=et(n)&&t!==h)return ee(e,S);if(r.status===Q&&0!==e.avail_in)return ee(e,S);if(r.status===q&&0===r.wrap&&(r.status=G),r.status===q){let t=R+(r.w_bits-8<<4)<<8,n=-1;if(t|=(n=r.strategy>=k||r.level<2?0:r.level<6?1:6===r.level?2:3)<<6,0!==r.strstart&&(t|=H),el(r,t+=31-t%31),0!==r.strstart&&(el(r,e.adler>>>16),el(r,65535&e.adler)),e.adler=1,r.status=G,eo(e),0!==r.pending)return r.last_flush=-1,m}if(r.status===L){if(e.adler=0,es(r,31),es(r,139),es(r,8),r.gzhead)es(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),es(r,255&r.gzhead.time),es(r,r.gzhead.time>>8&255),es(r,r.gzhead.time>>16&255),es(r,r.gzhead.time>>24&255),es(r,9===r.level?2:r.strategy>=k||r.level<2?4:0),es(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(es(r,255&r.gzhead.extra.length),es(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(e.adler=u(e.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=F;else if(es(r,0),es(r,0),es(r,0),es(r,0),es(r,0),es(r,9===r.level?2:r.strategy>=k||r.level<2?4:0),es(r,$),r.status=G,eo(e),0!==r.pending)return r.last_flush=-1,m}if(r.status===F){if(r.gzhead.extra){let t=r.pending,n=(65535&r.gzhead.extra.length)-r.gzindex;for(;r.pending+n>r.pending_buf_size;){let i=r.pending_buf_size-r.pending;if(r.pending_buf.set(r.gzhead.extra.subarray(r.gzindex,r.gzindex+i),r.pending),r.pending=r.pending_buf_size,r.gzhead.hcrc&&r.pending>t&&(e.adler=u(e.adler,r.pending_buf,r.pending-t,t)),r.gzindex+=i,eo(e),0!==r.pending)return r.last_flush=-1,m;t=0,n-=i}let i=new Uint8Array(r.gzhead.extra);r.pending_buf.set(i.subarray(r.gzindex,r.gzindex+n),r.pending),r.pending+=n,r.gzhead.hcrc&&r.pending>t&&(e.adler=u(e.adler,r.pending_buf,r.pending-t,t)),r.gzindex=0}r.status=V}if(r.status===V){if(r.gzhead.name){let t,n=r.pending;do{if(r.pending===r.pending_buf_size){if(r.gzhead.hcrc&&r.pending>n&&(e.adler=u(e.adler,r.pending_buf,r.pending-n,n)),eo(e),0!==r.pending)return r.last_flush=-1,m;n=0}t=r.gzindexn&&(e.adler=u(e.adler,r.pending_buf,r.pending-n,n)),r.gzindex=0}r.status=W}if(r.status===W){if(r.gzhead.comment){let t,n=r.pending;do{if(r.pending===r.pending_buf_size){if(r.gzhead.hcrc&&r.pending>n&&(e.adler=u(e.adler,r.pending_buf,r.pending-n,n)),eo(e),0!==r.pending)return r.last_flush=-1,m;n=0}t=r.gzindexn&&(e.adler=u(e.adler,r.pending_buf,r.pending-n,n))}r.status=z}if(r.status===z){if(r.gzhead.hcrc){if(r.pending+2>r.pending_buf_size&&(eo(e),0!==r.pending))return r.last_flush=-1,m;es(r,255&e.adler),es(r,e.adler>>8&255),e.adler=0}if(r.status=G,eo(e),0!==r.pending)return r.last_flush=-1,m}if(0!==e.avail_in||0!==r.lookahead||t!==c&&r.status!==Q){let n=0===r.level?ep(r,t):r.strategy===k?em(r,t):r.strategy===O?eg(r,t):ev[r.level].func(r,t);if((n===Z||n===X)&&(r.status=Q),n===K||n===Z)return 0===e.avail_out&&(r.last_flush=-1),m;if(n===Y&&(t===p?s(r):t!==g&&(i(r,0,0,!1),t===f&&(er(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),eo(e),0===e.avail_out))return r.last_flush=-1,m}return t!==h?m:r.wrap<=0?y:(2===r.wrap?(es(r,255&e.adler),es(r,e.adler>>8&255),es(r,e.adler>>16&255),es(r,e.adler>>24&255),es(r,255&e.total_in),es(r,e.total_in>>8&255),es(r,e.total_in>>16&255),es(r,e.total_in>>24&255)):(el(r,e.adler>>>16),el(r,65535&e.adler)),eo(e),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?m:y)},eR=e=>{if(ew(e))return v;let t=e.state.status;return e.state=null,t===G?ee(e,b):m},eE=(e,t)=>{let r=t.length;if(ew(e))return v;let n=e.state,i=n.wrap;if(2===i||1===i&&n.status!==q||n.lookahead)return v;if(1===i&&(e.adler=l(e.adler,t,r,0)),n.wrap=0,r>=n.w_size){0===i&&(er(n.head),n.strstart=0,n.block_start=0,n.insert=0);let e=new Uint8Array(n.w_size);e.set(t.subarray(r-n.w_size,r),0),t=e,r=n.w_size}let o=e.avail_in,a=e.next_in,s=e.input;for(e.avail_in=r,e.next_in=0,e.input=t,ec(n);n.lookahead>=U;){let e=n.strstart,t=n.lookahead-(U-1);do n.ins_h=ei(n,n.ins_h,n.window[e+U-1]),n.prev[e&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=e,e++;while(--t);n.strstart=e,n.lookahead=U-1,ec(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=U-1,n.match_available=0,e.next_in=a,e.input=s,e.avail_in=o,n.wrap=i,m};e.exports.deflateInit=eA,e.exports.deflateInit2=eP,e.exports.deflateReset=ek,e.exports.deflateResetKeep=e_,e.exports.deflateSetHeader=eO,e.exports.deflate=eI,e.exports.deflateEnd=eR,e.exports.deflateSetDictionary=eE,e.exports.deflateInfo="pako deflate (from Nodeca project)"},85315:function(e){"use strict";function t(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}e.exports=t},33424:function(e){"use strict";let t=16209,r=16191;e.exports=function(e,n){let i,o,a,s,l,u,d,c,p,f,h,g,m,y,v,b,S,w,_,k,O,P,A,I;let R=e.state;i=e.next_in,A=e.input,o=i+(e.avail_in-5),a=e.next_out,I=e.output,s=a-(n-e.avail_out),l=a+(e.avail_out-257),u=R.dmax,d=R.wsize,c=R.whave,p=R.wnext,f=R.window,h=R.hold,g=R.bits,m=R.lencode,y=R.distcode,v=(1<>>=w=S>>>24,g-=w,0==(w=S>>>16&255))I[a++]=65535&S;else if(16&w)for(_=65535&S,(w&=15)&&(g>>=w,g-=w),g<15&&(h+=A[i++]<>>=w=S>>>24,g-=w,16&(w=S>>>16&255)){if(k=65535&S,g<(w&=15)&&(h+=A[i++]<u){e.msg="invalid distance too far back",R.mode=t;break t}if(h>>>=w,g-=w,k>(w=a-s)){if((w=k-w)>c&&R.sane){e.msg="invalid distance too far back",R.mode=t;break t}if(O=0,P=f,0===p){if(O+=d-w,w<_){_-=w;do I[a++]=f[O++];while(--w);O=a-k,P=I}}else if(p2;)I[a++]=P[O++],I[a++]=P[O++],I[a++]=P[O++],_-=3;_&&(I[a++]=P[O++],_>1&&(I[a++]=P[O++]))}else{O=a-k;do I[a++]=I[O++],I[a++]=I[O++],I[a++]=I[O++],_-=3;while(_>2);_&&(I[a++]=I[O++],_>1&&(I[a++]=I[O++]))}}else if((64&w)==0){S=y[(65535&S)+(h&(1<>3,g-=_<<3,h&=(1<(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24);function eo(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}let ea=e=>{if(!e)return 1;let t=e.state;return!t||t.strm!==e||t.modeee?1:0},es=e=>{if(ea(e))return v;let t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=k,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(et),t.distcode=t.distdyn=new Int32Array(er),t.sane=1,t.back=-1,g},el=e=>{if(ea(e))return v;let t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,es(e)},eu=(e,t)=>{let r;if(ea(e))return v;let n=e.state;return(t<0?(r=0,t=-t):(r=(t>>4)+5,t<48&&(t&=15)),t&&(t<8||t>15))?v:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,el(e))},ed=(e,t)=>{if(!e)return v;let r=new eo;e.state=r,r.strm=e,r.window=null,r.mode=k;let n=eu(e,t);return n!==g&&(e.state=null),n},ec=e=>ed(e,en),ep=!0,ef=e=>{if(ep){n=new Int32Array(512),i=new Int32Array(32);let t=0;for(;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(l(d,e.lens,0,288,n,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;l(c,e.lens,0,32,i,0,e.work,{bits:5}),ep=!1}e.lencode=n,e.lenbits=9,e.distcode=i,e.distbits=5},eh=(e,t,r,n)=>{let i;let o=e.state;return null===o.window&&(o.wsize=1<=o.wsize?(o.window.set(t.subarray(r-o.wsize,r),0),o.wnext=0,o.whave=o.wsize):((i=o.wsize-o.wnext)>n&&(i=n),o.window.set(t.subarray(r-n,r-n+i),o.wnext),(n-=i)?(o.window.set(t.subarray(r-n,r),0),o.wnext=n,o.whave=o.wsize):(o.wnext+=i,o.wnext===o.wsize&&(o.wnext=0),o.whave{let r,n,i,ee,et,er,en,eo,es,el,eu,ed,ec,ep,eg,em,ey,ev,eb,eS,ew,e_,ek,eO;let eP=0,eA=new Uint8Array(4),eI=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(ea(e)||!e.output||!e.input&&0!==e.avail_in)return v;(r=e.state).mode===C&&(r.mode=M),et=e.next_out,i=e.output,en=e.avail_out,ee=e.next_in,n=e.input,er=e.avail_in,eo=r.hold,es=r.bits,el=er,eu=en,e_=g;r:for(;;)switch(r.mode){case k:if(0===r.wrap){r.mode=M;break}for(;es<16;){if(0===er)break r;er--,eo+=n[ee++]<>>8&255,r.check=a(r.check,eA,2,0),eo=0,es=0,r.mode=O;break}if(r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&eo)<<8)+(eo>>8))%31){e.msg="incorrect header check",r.mode=X;break}if((15&eo)!==_){e.msg="unknown compression method",r.mode=X;break}if(eo>>>=4,es-=4,ew=(15&eo)+8,0===r.wbits&&(r.wbits=ew),ew>15||ew>r.wbits){e.msg="invalid window size",r.mode=X;break}r.dmax=1<>8&1),512&r.flags&&4&r.wrap&&(eA[0]=255&eo,eA[1]=eo>>>8&255,r.check=a(r.check,eA,2,0)),eo=0,es=0,r.mode=P;case P:for(;es<32;){if(0===er)break r;er--,eo+=n[ee++]<>>8&255,eA[2]=eo>>>16&255,eA[3]=eo>>>24&255,r.check=a(r.check,eA,4,0)),eo=0,es=0,r.mode=A;case A:for(;es<16;){if(0===er)break r;er--,eo+=n[ee++]<>8),512&r.flags&&4&r.wrap&&(eA[0]=255&eo,eA[1]=eo>>>8&255,r.check=a(r.check,eA,2,0)),eo=0,es=0,r.mode=I;case I:if(1024&r.flags){for(;es<16;){if(0===er)break r;er--,eo+=n[ee++]<>>8&255,r.check=a(r.check,eA,2,0)),eo=0,es=0}else r.head&&(r.head.extra=null);r.mode=R;case R:if(1024&r.flags&&((ed=r.length)>er&&(ed=er),ed&&(r.head&&(ew=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Uint8Array(r.head.extra_len)),r.head.extra.set(n.subarray(ee,ee+ed),ew)),512&r.flags&&4&r.wrap&&(r.check=a(r.check,n,ed,ee)),er-=ed,ee+=ed,r.length-=ed),r.length))break r;r.length=0,r.mode=E;case E:if(2048&r.flags){if(0===er)break r;ed=0;do ew=n[ee+ed++],r.head&&ew&&r.length<65536&&(r.head.name+=String.fromCharCode(ew));while(ew&&ed>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=C;break;case x:for(;es<32;){if(0===er)break r;er--,eo+=n[ee++]<>>=7&es,es-=7&es,r.mode=K;break}for(;es<3;){if(0===er)break r;er--,eo+=n[ee++]<>>=1)){case 0:r.mode=D;break;case 1:if(ef(r),r.mode=L,t===h){eo>>>=2,es-=2;break r}break;case 2:r.mode=j;break;case 3:e.msg="invalid block type",r.mode=X}eo>>>=2,es-=2;break;case D:for(eo>>>=7&es,es-=7&es;es<32;){if(0===er)break r;er--,eo+=n[ee++]<>>16^65535)){e.msg="invalid stored block lengths",r.mode=X;break}if(r.length=65535&eo,eo=0,es=0,r.mode=U,t===h)break r;case U:r.mode=J;case J:if(ed=r.length){if(ed>er&&(ed=er),ed>en&&(ed=en),0===ed)break r;i.set(n.subarray(ee,ee+ed),et),er-=ed,ee+=ed,en-=ed,et+=ed,r.length-=ed;break}r.mode=C;break;case j:for(;es<14;){if(0===er)break r;er--,eo+=n[ee++]<>>=5,es-=5,r.ndist=(31&eo)+1,eo>>>=5,es-=5,r.ncode=(15&eo)+4,eo>>>=4,es-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=X;break}r.have=0,r.mode=H;case H:for(;r.have>>=3,es-=3}for(;r.have<19;)r.lens[eI[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,ek={bits:r.lenbits},e_=l(u,r.lens,0,19,r.lencode,0,r.work,ek),r.lenbits=ek.bits,e_){e.msg="invalid code lengths set",r.mode=X;break}r.have=0,r.mode=q;case q:for(;r.have>>24,em=eP>>>16&255,ey=65535&eP,!(eg<=es);){if(0===er)break r;er--,eo+=n[ee++]<>>=eg,es-=eg,r.lens[r.have++]=ey;else{if(16===ey){for(eO=eg+2;es>>=eg,es-=eg,0===r.have){e.msg="invalid bit length repeat",r.mode=X;break}ew=r.lens[r.have-1],ed=3+(3&eo),eo>>>=2,es-=2}else if(17===ey){for(eO=eg+3;es>>=eg,es-=eg,ew=0,ed=3+(7&eo),eo>>>=3,es-=3}else{for(eO=eg+7;es>>=eg,es-=eg,ew=0,ed=11+(127&eo),eo>>>=7,es-=7}if(r.have+ed>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=X;break}for(;ed--;)r.lens[r.have++]=ew}}if(r.mode===X)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=X;break}if(r.lenbits=9,ek={bits:r.lenbits},e_=l(d,r.lens,0,r.nlen,r.lencode,0,r.work,ek),r.lenbits=ek.bits,e_){e.msg="invalid literal/lengths set",r.mode=X;break}if(r.distbits=6,r.distcode=r.distdyn,ek={bits:r.distbits},e_=l(c,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,ek),r.distbits=ek.bits,e_){e.msg="invalid distances set",r.mode=X;break}if(r.mode=L,t===h)break r;case L:r.mode=F;case F:if(er>=6&&en>=258){e.next_out=et,e.avail_out=en,e.next_in=ee,e.avail_in=er,r.hold=eo,r.bits=es,s(e,eu),et=e.next_out,i=e.output,en=e.avail_out,ee=e.next_in,n=e.input,er=e.avail_in,eo=r.hold,es=r.bits,r.mode===C&&(r.back=-1);break}for(r.back=0;eg=(eP=r.lencode[eo&(1<>>24,em=eP>>>16&255,ey=65535&eP,!(eg<=es);){if(0===er)break r;er--,eo+=n[ee++]<>ev)])>>>24,em=eP>>>16&255,ey=65535&eP,!(ev+eg<=es);){if(0===er)break r;er--,eo+=n[ee++]<>>=ev,es-=ev,r.back+=ev}if(eo>>>=eg,es-=eg,r.back+=eg,r.length=ey,0===em){r.mode=Q;break}if(32&em){r.back=-1,r.mode=C;break}if(64&em){e.msg="invalid literal/length code",r.mode=X;break}r.extra=15&em,r.mode=V;case V:if(r.extra){for(eO=r.extra;es>>=r.extra,es-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=W;case W:for(;eg=(eP=r.distcode[eo&(1<>>24,em=eP>>>16&255,ey=65535&eP,!(eg<=es);){if(0===er)break r;er--,eo+=n[ee++]<>ev)])>>>24,em=eP>>>16&255,ey=65535&eP,!(ev+eg<=es);){if(0===er)break r;er--,eo+=n[ee++]<>>=ev,es-=ev,r.back+=ev}if(eo>>>=eg,es-=eg,r.back+=eg,64&em){e.msg="invalid distance code",r.mode=X;break}r.offset=ey,r.extra=15&em,r.mode=z;case z:if(r.extra){for(eO=r.extra;es>>=r.extra,es-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=X;break}r.mode=G;case G:if(0===en)break r;if(ed=eu-en,r.offset>ed){if((ed=r.offset-ed)>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=X;break}ed>r.wnext?(ed-=r.wnext,ec=r.wsize-ed):ec=r.wnext-ed,ed>r.length&&(ed=r.length),ep=r.window}else ep=i,ec=et-r.offset,ed=r.length;ed>en&&(ed=en),en-=ed,r.length-=ed;do i[et++]=ep[ec++];while(--ed);0===r.length&&(r.mode=F);break;case Q:if(0===en)break r;i[et++]=r.length,en--,r.mode=F;break;case K:if(r.wrap){for(;es<32;){if(0===er)break r;er--,eo|=n[ee++]<{if(ea(e))return v;let t=e.state;return t.window&&(t.window=null),e.state=null,g},ey=(e,t)=>{if(ea(e))return v;let r=e.state;return(2&r.wrap)==0?v:(r.head=t,t.done=!1,g)},ev=(e,t)=>{let r,n;let i=t.length;return ea(e)||0!==(r=e.state).wrap&&r.mode!==B?v:r.mode===B&&(n=o(n=1,t,i,0))!==r.check?b:eh(e,t,i,i)?(r.mode=$,S):(r.havedict=1,g)};e.exports.inflateReset=el,e.exports.inflateReset2=eu,e.exports.inflateResetKeep=es,e.exports.inflateInit=ec,e.exports.inflateInit2=ed,e.exports.inflate=eg,e.exports.inflateEnd=em,e.exports.inflateGetHeader=ey,e.exports.inflateSetDictionary=ev,e.exports.inflateInfo="pako inflate (from Nodeca project)"},88170:function(e){"use strict";let t=15,r=852,n=592,i=0,o=1,a=2,s=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),l=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),u=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),d=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]),c=(e,c,p,f,h,g,m,y)=>{let v,b,S,w,_,k,O,P,A;let I=y.bits,R=0,E=0,T=0,N=0,x=0,B=0,C=0,M=0,D=0,U=0,J=null,j=new Uint16Array(t+1),H=new Uint16Array(t+1),q=null;for(R=0;R<=t;R++)j[R]=0;for(E=0;E=1&&0===j[N];N--);if(x>N&&(x=N),0===N)return h[g++]=20971520,h[g++]=20971520,y.bits=1,0;for(T=1;T0&&(e===i||1!==N))return -1;for(R=1,H[1]=0;Rr||e===a&&D>n)return 1;for(;;){O=R-C,m[E]+1=k?(P=q[m[E]-k],A=J[m[E]-k]):(P=96,A=0),v=1<>C)+(b-=v)]=O<<24|P<<16|A|0;while(0!==b);for(v=1<>=1;if(0!==v?(U&=v-1,U+=v):U=0,E++,0==--j[R]){if(R===N)break;R=c[p+m[E]]}if(R>x&&(U&w)!==S){for(0===C&&(C=x),_+=T,M=1<<(B=R-C);B+Cr||e===a&&D>n)return 1;h[S=U&w]=x<<24|B<<16|_-g|0}}return 0!==U&&(h[_+U]=R-C<<24|4194304),y.bits=x,0};e.exports=c},82077:function(e){"use strict";e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},4542:function(e){"use strict";let t,r,n;let i=4,o=0,a=1,s=2;function l(e){let t=e.length;for(;--t>=0;)e[t]=0}let u=0,d=1,c=2,p=3,f=258,h=29,g=256,m=286,y=30,v=19,b=573,S=15,w=16,_=7,k=256,O=16,P=17,A=18,I=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),R=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),E=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),T=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),N=512,x=Array((m+2)*2);l(x);let B=Array(2*y);l(B);let C=Array(N);l(C);let M=Array(f-p+1);l(M);let D=Array(h);l(D);let U=Array(y);function J(e,t,r,n,i){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=e&&e.length}function j(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}l(U);let H=e=>e<256?C[e]:C[256+(e>>>7)],q=(e,t)=>{e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255},L=(e,t,r)=>{e.bi_valid>w-r?(e.bi_buf|=t<>w-e.bi_valid,e.bi_valid+=r-w):(e.bi_buf|=t<{L(e,r[2*t],r[2*t+1])},V=(e,t)=>{let r=0;do r|=1&e,e>>>=1,r<<=1;while(--t>0);return r>>>1},W=e=>{16===e.bi_valid?(q(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)},z=(e,t)=>{let r,n,i,o,a,s;let l=t.dyn_tree,u=t.max_code,d=t.stat_desc.static_tree,c=t.stat_desc.has_stree,p=t.stat_desc.extra_bits,f=t.stat_desc.extra_base,h=t.stat_desc.max_length,g=0;for(o=0;o<=S;o++)e.bl_count[o]=0;for(l[2*e.heap[e.heap_max]+1]=0,r=e.heap_max+1;rh&&(o=h,g++),l[2*n+1]=o,!(n>u)&&(e.bl_count[o]++,a=0,n>=f&&(a=p[n-f]),s=l[2*n],e.opt_len+=s*(o+a),c&&(e.static_len+=s*(d[2*n+1]+a)));if(0!==g){do{for(o=h-1;0===e.bl_count[o];)o--;e.bl_count[o]--,e.bl_count[o+1]+=2,e.bl_count[h]--,g-=2}while(g>0);for(o=h;0!==o;o--)for(n=e.bl_count[o];0!==n;)!((i=e.heap[--r])>u)&&(l[2*i+1]!==o&&(e.opt_len+=(o-l[2*i+1])*l[2*i],l[2*i+1]=o),n--)}},G=(e,t,r)=>{let n,i;let o=Array(S+1),a=0;for(n=1;n<=S;n++)a=a+r[n-1]<<1,o[n]=a;for(i=0;i<=t;i++){let t=e[2*i+1];0!==t&&(e[2*i]=V(o[t]++,t))}},Q=()=>{let e,i,o,a,s;let l=Array(S+1);for(a=0,o=0;a>=7;a{let t;for(t=0;t{e.bi_valid>8?q(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},Z=(e,t,r,n)=>{let i=2*t,o=2*r;return e[i]{let n=e.heap[r],i=r<<1;for(;i<=e.heap_len&&(i{let n,i,o,a;let s=0;if(0!==e.sym_next)do n=(255&e.pending_buf[e.sym_buf+s++])+((255&e.pending_buf[e.sym_buf+s++])<<8),i=e.pending_buf[e.sym_buf+s++],0===n?F(e,i,t):(F(e,(o=M[i])+g+1,t),0!==(a=I[o])&&L(e,i-=D[o],a),F(e,o=H(--n),r),0!==(a=R[o])&&L(e,n-=U[o],a));while(s{let r,n,i;let o=t.dyn_tree,a=t.stat_desc.static_tree,s=t.stat_desc.has_stree,l=t.stat_desc.elems,u=-1;for(r=0,e.heap_len=0,e.heap_max=b;r>1;r>=1;r--)X(e,o,r);i=l;do r=e.heap[1],e.heap[1]=e.heap[e.heap_len--],X(e,o,1),n=e.heap[1],e.heap[--e.heap_max]=r,e.heap[--e.heap_max]=n,o[2*i]=o[2*r]+o[2*n],e.depth[i]=(e.depth[r]>=e.depth[n]?e.depth[r]:e.depth[n])+1,o[2*r+1]=o[2*n+1]=i,e.heap[1]=i++,X(e,o,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],z(e,t),G(o,u,e.bl_count)},et=(e,t,r)=>{let n,i;let o=-1,a=t[1],s=0,l=7,u=4;for(0===a&&(l=138,u=3),t[(r+1)*2+1]=65535,n=0;n<=r;n++)i=a,a=t[(n+1)*2+1],++s{let n,i;let o=-1,a=t[1],s=0,l=7,u=4;for(0===a&&(l=138,u=3),n=0;n<=r;n++)if(i=a,a=t[(n+1)*2+1],!(++s{let t;for(et(e,e.dyn_ltree,e.l_desc.max_code),et(e,e.dyn_dtree,e.d_desc.max_code),ee(e,e.bl_desc),t=v-1;t>=3&&0===e.bl_tree[2*T[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t},ei=(e,t,r,n)=>{let i;for(L(e,t-257,5),L(e,r-1,5),L(e,n-4,4),i=0;i{let t,r=4093624447;for(t=0;t<=31;t++,r>>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return o;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return a;for(t=32;t{ea||(Q(),ea=!0),e.l_desc=new j(e.dyn_ltree,t),e.d_desc=new j(e.dyn_dtree,r),e.bl_desc=new j(e.bl_tree,n),e.bi_buf=0,e.bi_valid=0,K(e)},el=(e,t,r,n)=>{L(e,(u<<1)+(n?1:0),3),Y(e),q(e,r),q(e,~r),r&&e.pending_buf.set(e.window.subarray(t,t+r),e.pending),e.pending+=r},eu=e=>{L(e,d<<1,3),F(e,k,x),W(e)},ed=(e,t,r,n)=>{let o,a;let l=0;e.level>0?(e.strm.data_type===s&&(e.strm.data_type=eo(e)),ee(e,e.l_desc),ee(e,e.d_desc),l=en(e),o=e.opt_len+3+7>>>3,(a=e.static_len+3+7>>>3)<=o&&(o=a)):o=a=r+5,r+4<=o&&-1!==t?el(e,t,r,n):e.strategy===i||a===o?(L(e,(d<<1)+(n?1:0),3),$(e,x,B)):(L(e,(c<<1)+(n?1:0),3),ei(e,e.l_desc.max_code+1,e.d_desc.max_code+1,l+1),$(e,e.dyn_ltree,e.dyn_dtree)),K(e),n&&Y(e)},ec=(e,t,r)=>(e.pending_buf[e.sym_buf+e.sym_next++]=t,e.pending_buf[e.sym_buf+e.sym_next++]=t>>8,e.pending_buf[e.sym_buf+e.sym_next++]=r,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[(M[r]+g+1)*2]++,e.dyn_dtree[2*H(t)]++),e.sym_next===e.sym_end);e.exports._tr_init=es,e.exports._tr_stored_block=el,e.exports._tr_flush_block=ed,e.exports._tr_tally=ec,e.exports._tr_align=eu},75027:function(e){"use strict";function t(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}e.exports=t},81667:function(e,t,r){"use strict";e.exports=r(39022)},39022:function(e,t,r){"use strict";var n=t;function i(){n.util._configure(),n.Writer._configure(n.BufferWriter),n.Reader._configure(n.BufferReader)}n.build="minimal",n.Writer=r(42743),n.BufferWriter=r(69953),n.Reader=r(64167),n.BufferReader=r(74669),n.util=r(49325),n.rpc=r(41350),n.roots=r(61958),n.configure=i,i()},64167:function(e,t,r){"use strict";e.exports=l;var n,i=r(49325),o=i.LongBits,a=i.utf8;function s(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function l(e){this.buf=e,this.pos=0,this.len=e.length}var u="undefined"!=typeof Uint8Array?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new l(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new l(e);throw Error("illegal buffer")},d=function(){return i.Buffer?function(e){return(l.create=function(e){return i.Buffer.isBuffer(e)?new n(e):u(e)})(e)}:u};function c(){var e=new o(0,0),t=0;if(this.len-this.pos>4){for(;t<4;++t)if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e;t=0}else{for(;t<3;++t){if(this.pos>=this.len)throw s(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e}return e.lo=(e.lo|(127&this.buf[this.pos++])<<7*t)>>>0,e}if(this.len-this.pos>4){for(;t<5;++t)if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}else for(;t<5;++t){if(this.pos>=this.len)throw s(this);if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}function p(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function f(){if(this.pos+8>this.len)throw s(this,8);return new o(p(this.buf,this.pos+=4),p(this.buf,this.pos+=4))}l.create=d(),l.prototype._slice=i.Array.prototype.subarray||i.Array.prototype.slice,l.prototype.uint32=function(){var e=4294967295;return function(){if(e=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128||(e=(e|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)||(e=(e|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)||(e=(e|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)||(e=(e|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128))return e;if((this.pos+=5)>this.len)throw this.pos=this.len,s(this,10);return e}}(),l.prototype.int32=function(){return 0|this.uint32()},l.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)|0},l.prototype.bool=function(){return 0!==this.uint32()},l.prototype.fixed32=function(){if(this.pos+4>this.len)throw s(this,4);return p(this.buf,this.pos+=4)},l.prototype.sfixed32=function(){if(this.pos+4>this.len)throw s(this,4);return 0|p(this.buf,this.pos+=4)},l.prototype.float=function(){if(this.pos+4>this.len)throw s(this,4);var e=i.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e},l.prototype.double=function(){if(this.pos+8>this.len)throw s(this,4);var e=i.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e},l.prototype.bytes=function(){var e=this.uint32(),t=this.pos,r=this.pos+e;if(r>this.len)throw s(this,e);return(this.pos+=e,Array.isArray(this.buf))?this.buf.slice(t,r):t===r?new this.buf.constructor(0):this._slice.call(this.buf,t,r)},l.prototype.string=function(){var e=this.bytes();return a.read(e,0,e.length)},l.prototype.skip=function(e){if("number"==typeof e){if(this.pos+e>this.len)throw s(this,e);this.pos+=e}else do if(this.pos>=this.len)throw s(this);while(128&this.buf[this.pos++]);return this},l.prototype.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!=(e=7&this.uint32());)this.skipType(e);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this},l._configure=function(e){n=e,l.create=d(),n._configure();var t=i.Long?"toLong":"toNumber";i.merge(l.prototype,{int64:function(){return c.call(this)[t](!1)},uint64:function(){return c.call(this)[t](!0)},sint64:function(){return c.call(this).zzDecode()[t](!1)},fixed64:function(){return f.call(this)[t](!0)},sfixed64:function(){return f.call(this)[t](!1)}})}},74669:function(e,t,r){"use strict";e.exports=o;var n=r(64167);(o.prototype=Object.create(n.prototype)).constructor=o;var i=r(49325);function o(e){n.call(this,e)}o._configure=function(){i.Buffer&&(o.prototype._slice=i.Buffer.prototype.slice)},o.prototype.string=function(){var e=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+e,this.len))},o._configure()},61958:function(e){"use strict";e.exports={}},41350:function(e,t,r){"use strict";t.Service=r(36239)},36239:function(e,t,r){"use strict";e.exports=i;var n=r(49325);function i(e,t,r){if("function"!=typeof e)throw TypeError("rpcImpl must be a function");n.EventEmitter.call(this),this.rpcImpl=e,this.requestDelimited=!!t,this.responseDelimited=!!r}(i.prototype=Object.create(n.EventEmitter.prototype)).constructor=i,i.prototype.rpcCall=function e(t,r,i,o,a){if(!o)throw TypeError("request must be specified");var s=this;if(!a)return n.asPromise(e,s,t,r,i,o);if(!s.rpcImpl){setTimeout(function(){a(Error("already ended"))},0);return}try{return s.rpcImpl(t,r[s.requestDelimited?"encodeDelimited":"encode"](o).finish(),function(e,r){if(e)return s.emit("error",e,t),a(e);if(null===r){s.end(!0);return}if(!(r instanceof i))try{r=i[s.responseDelimited?"decodeDelimited":"decode"](r)}catch(e){return s.emit("error",e,t),a(e)}return s.emit("data",r,t),a(null,r)})}catch(e){s.emit("error",e,t),setTimeout(function(){a(e)},0);return}},i.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},68950:function(e,t,r){"use strict";e.exports=i;var n=r(49325);function i(e,t){this.lo=e>>>0,this.hi=t>>>0}var o=i.zero=new i(0,0);o.toNumber=function(){return 0},o.zzEncode=o.zzDecode=function(){return this},o.length=function(){return 1};var a=i.zeroHash="\x00\x00\x00\x00\x00\x00\x00\x00";i.fromNumber=function(e){if(0===e)return o;var t=e<0;t&&(e=-e);var r=e>>>0,n=(e-r)/4294967296>>>0;return t&&(n=~n>>>0,r=~r>>>0,++r>4294967295&&(r=0,++n>4294967295&&(n=0))),new i(r,n)},i.from=function(e){if("number"==typeof e)return i.fromNumber(e);if(n.isString(e)){if(!n.Long)return i.fromNumber(parseInt(e,10));e=n.Long.fromString(e)}return e.low||e.high?new i(e.low>>>0,e.high>>>0):o},i.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var t=~this.lo+1>>>0,r=~this.hi>>>0;return t||(r=r+1>>>0),-(t+4294967296*r)}return this.lo+4294967296*this.hi},i.prototype.toLong=function(e){return n.Long?new n.Long(0|this.lo,0|this.hi,!!e):{low:0|this.lo,high:0|this.hi,unsigned:!!e}};var s=String.prototype.charCodeAt;i.fromHash=function(e){return e===a?o:new i((s.call(e,0)|s.call(e,1)<<8|s.call(e,2)<<16|s.call(e,3)<<24)>>>0,(s.call(e,4)|s.call(e,5)<<8|s.call(e,6)<<16|s.call(e,7)<<24)>>>0)},i.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},i.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},i.prototype.zzDecode=function(){var e=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},i.prototype.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,r=this.hi>>>24;return 0===r?0===t?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:r<128?9:10}},49325:function(e,t,r){"use strict";var n=t;function i(e,t,r){for(var n=Object.keys(t),i=0;i0)},n.Buffer=function(){try{var e=n.inquire("buffer").Buffer;return e.prototype.utf8Write?e:null}catch(e){return null}}(),n._Buffer_from=null,n._Buffer_allocUnsafe=null,n.newBuffer=function(e){return"number"==typeof e?n.Buffer?n._Buffer_allocUnsafe(e):new n.Array(e):n.Buffer?n._Buffer_from(e):"undefined"==typeof Uint8Array?e:new Uint8Array(e)},n.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,n.Long=n.global.dcodeIO&&n.global.dcodeIO.Long||n.global.Long||n.inquire("long"),n.key2Re=/^true|false|0|1$/,n.key32Re=/^-?(?:0|[1-9][0-9]*)$/,n.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,n.longToHash=function(e){return e?n.LongBits.from(e).toHash():n.LongBits.zeroHash},n.longFromHash=function(e,t){var r=n.LongBits.fromHash(e);return n.Long?n.Long.fromBits(r.lo,r.hi,t):r.toNumber(!!t)},n.merge=i,n.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},n.newError=o,n.ProtocolError=o("ProtocolError"),n.oneOfGetter=function(e){for(var t={},r=0;r-1;--r)if(1===t[e[r]]&&void 0!==this[e[r]]&&null!==this[e[r]])return e[r]}},n.oneOfSetter=function(e){return function(t){for(var r=0;r127;)t[r++]=127&e|128,e>>>=7;t[r]=e}function g(e,t){this.len=e,this.next=void 0,this.val=t}function m(e,t,r){for(;e.hi;)t[r++]=127&e.lo|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[r++]=127&e.lo|128,e.lo=e.lo>>>7;t[r++]=e.lo}function y(e,t,r){t[r]=255&e,t[r+1]=e>>>8&255,t[r+2]=e>>>16&255,t[r+3]=e>>>24}c.create=p(),c.alloc=function(e){return new i.Array(e)},i.Array!==Array&&(c.alloc=i.pool(c.alloc,i.Array.prototype.subarray)),c.prototype._push=function(e,t,r){return this.tail=this.tail.next=new l(e,t,r),this.len+=t,this},g.prototype=Object.create(l.prototype),g.prototype.fn=h,c.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new g((e>>>=0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this},c.prototype.int32=function(e){return e<0?this._push(m,10,o.fromNumber(e)):this.uint32(e)},c.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},c.prototype.uint64=function(e){var t=o.from(e);return this._push(m,t.length(),t)},c.prototype.int64=c.prototype.uint64,c.prototype.sint64=function(e){var t=o.from(e).zzEncode();return this._push(m,t.length(),t)},c.prototype.bool=function(e){return this._push(f,1,e?1:0)},c.prototype.fixed32=function(e){return this._push(y,4,e>>>0)},c.prototype.sfixed32=c.prototype.fixed32,c.prototype.fixed64=function(e){var t=o.from(e);return this._push(y,4,t.lo)._push(y,4,t.hi)},c.prototype.sfixed64=c.prototype.fixed64,c.prototype.float=function(e){return this._push(i.float.writeFloatLE,4,e)},c.prototype.double=function(e){return this._push(i.float.writeDoubleLE,8,e)};var v=i.Array.prototype.set?function(e,t,r){t.set(e,r)}:function(e,t,r){for(var n=0;n>>0;if(!t)return this._push(f,1,0);if(i.isString(e)){var r=c.alloc(t=a.length(e));a.decode(e,r,0),e=r}return this.uint32(t)._push(v,t,e)},c.prototype.string=function(e){var t=s.length(e);return t?this.uint32(t)._push(s.write,t,e):this._push(f,1,0)},c.prototype.fork=function(){return this.states=new d(this),this.head=this.tail=new l(u,0,0),this.len=0,this},c.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new l(u,0,0),this.len=0),this},c.prototype.ldelim=function(){var e=this.head,t=this.tail,r=this.len;return this.reset().uint32(r),r&&(this.tail.next=e.next,this.tail=t,this.len+=r),this},c.prototype.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),r=0;e;)e.fn(e.val,t,r),r+=e.len,e=e.next;return t},c._configure=function(e){n=e,c.create=p(),n._configure()}},69953:function(e,t,r){"use strict";e.exports=o;var n=r(42743);(o.prototype=Object.create(n.prototype)).constructor=o;var i=r(49325);function o(){n.call(this)}function a(e,t,r){e.length<40?i.utf8.write(e,t,r):t.utf8Write?t.utf8Write(e,r):t.write(e,r)}o._configure=function(){o.alloc=i._Buffer_allocUnsafe,o.writeBytesBuffer=i.Buffer&&i.Buffer.prototype instanceof Uint8Array&&"set"===i.Buffer.prototype.set.name?function(e,t,r){t.set(e,r)}:function(e,t,r){if(e.copy)e.copy(t,r,0,e.length);else for(var n=0;n>>0;return this.uint32(t),t&&this._push(o.writeBytesBuffer,t,e),this},o.prototype.string=function(e){var t=i.Buffer.byteLength(e);return this.uint32(t),t&&this._push(a,t,e),this},o._configure()},97834:function(e,t,r){"use strict";var n=r(23663).Buffer,i=r(39541),o=r(73799),a=Array(16),s=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],l=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],u=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],d=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],c=[0,1518500249,1859775393,2400959708,2840853838],p=[1352829926,1548603684,1836072691,2053994217,0];function f(){o.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function h(e,t){return e<>>32-t}function g(e,t,r,n,i,o,a,s){return h(e+(t^r^n)+o+a|0,s)+i|0}function m(e,t,r,n,i,o,a,s){return h(e+(t&r|~t&n)+o+a|0,s)+i|0}function y(e,t,r,n,i,o,a,s){return h(e+((t|~r)^n)+o+a|0,s)+i|0}function v(e,t,r,n,i,o,a,s){return h(e+(t&n|r&~n)+o+a|0,s)+i|0}function b(e,t,r,n,i,o,a,s){return h(e+(t^(r|~n))+o+a|0,s)+i|0}i(f,o),f.prototype._update=function(){for(var e,t,r=a,n=0;n<16;++n)r[n]=this._block.readInt32LE(4*n);for(var i=0|this._a,o=0|this._b,f=0|this._c,S=0|this._d,w=0|this._e,_=0|this._a,k=0|this._b,O=0|this._c,P=0|this._d,A=0|this._e,I=0;I<80;I+=1)I<16?(e=g(i,o,f,S,w,r[s[I]],c[0],u[I]),t=b(_,k,O,P,A,r[l[I]],p[0],d[I])):I<32?(e=m(i,o,f,S,w,r[s[I]],c[1],u[I]),t=v(_,k,O,P,A,r[l[I]],p[1],d[I])):I<48?(e=y(i,o,f,S,w,r[s[I]],c[2],u[I]),t=y(_,k,O,P,A,r[l[I]],p[2],d[I])):I<64?(e=v(i,o,f,S,w,r[s[I]],c[3],u[I]),t=m(_,k,O,P,A,r[l[I]],p[3],d[I])):(e=b(i,o,f,S,w,r[s[I]],c[4],u[I]),t=g(_,k,O,P,A,r[l[I]],p[4],d[I])),i=w,w=S,S=h(f,10),f=o,o=e,_=A,A=P,P=h(O,10),O=k,k=t;var R=this._b+f+P|0;this._b=this._c+S+A|0,this._c=this._d+w+_|0,this._d=this._e+i+k|0,this._e=this._a+o+O|0,this._a=R},f.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=n.alloc?n.alloc(20):new n(20);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e},e.exports=f},47226:function(e,t,r){"use strict";/*! safe-buffer. MIT License. Feross Aboukhadijeh */var n=r(23663),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(o(n,t),t.Buffer=a),a.prototype=Object.create(i.prototype),o(i,a),a.from=function(e,t,r){if("number"==typeof e)throw TypeError("Argument must not be a number");return i(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},a.allocUnsafe=function(e){if("number"!=typeof e)throw TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw TypeError("Argument must be a number");return n.SlowBuffer(e)}},17338:function(e,t,r){"use strict";var n=r(47226).Buffer;function i(e,t){this._block=n.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}i.prototype.update=function(e,t){"string"==typeof e&&(t=t||"utf8",e=n.from(e,t));for(var r=this._block,i=this._blockSize,o=e.length,a=this._len,s=0;s=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(4294967295&r)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var o=this._hash();return e?o.toString(e):o},i.prototype._update=function(){throw Error("_update must be implemented by subclass")},e.exports=i},90414:function(e,t,r){"use strict";var n=e.exports=function(e){var t=n[e=e.toLowerCase()];if(!t)throw Error(e+" is not supported (we accept pull requests)");return new t};n.sha=r(15071),n.sha1=r(32815),n.sha224=r(86872),n.sha256=r(448),n.sha384=r(47531),n.sha512=r(79181)},15071:function(e,t,r){"use strict";var n=r(39541),i=r(17338),o=r(47226).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=Array(80);function l(){this.init(),this._w=s,i.call(this,64,56)}function u(e){return e<<5|e>>>27}function d(e){return e<<30|e>>>2}function c(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(l,i),l.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},l.prototype._update=function(e){for(var t=this._w,r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,s=0|this._e,l=0;l<16;++l)t[l]=e.readInt32BE(4*l);for(;l<80;++l)t[l]=t[l-3]^t[l-8]^t[l-14]^t[l-16];for(var p=0;p<80;++p){var f=~~(p/20),h=u(r)+c(f,n,i,o)+s+t[p]+a[f]|0;s=o,o=i,i=d(n),n=r,r=h}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=o+this._d|0,this._e=s+this._e|0},l.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=l},32815:function(e,t,r){"use strict";var n=r(39541),i=r(17338),o=r(47226).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=Array(80);function l(){this.init(),this._w=s,i.call(this,64,56)}function u(e){return e<<1|e>>>31}function d(e){return e<<5|e>>>27}function c(e){return e<<30|e>>>2}function p(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(l,i),l.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},l.prototype._update=function(e){for(var t=this._w,r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,s=0|this._e,l=0;l<16;++l)t[l]=e.readInt32BE(4*l);for(;l<80;++l)t[l]=u(t[l-3]^t[l-8]^t[l-14]^t[l-16]);for(var f=0;f<80;++f){var h=~~(f/20),g=d(r)+p(h,n,i,o)+s+t[f]+a[h]|0;s=o,o=i,i=c(n),n=r,r=g}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=o+this._d|0,this._e=s+this._e|0},l.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=l},86872:function(e,t,r){"use strict";var n=r(39541),i=r(448),o=r(17338),a=r(47226).Buffer,s=Array(64);function l(){this.init(),this._w=s,o.call(this,64,56)}n(l,i),l.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},l.prototype._hash=function(){var e=a.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},e.exports=l},448:function(e,t,r){"use strict";var n=r(39541),i=r(17338),o=r(47226).Buffer,a=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],s=Array(64);function l(){this.init(),this._w=s,i.call(this,64,56)}function u(e,t,r){return r^e&(t^r)}function d(e,t,r){return e&t|r&(e|t)}function c(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function p(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function f(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}function h(e){return(e>>>17|e<<15)^(e>>>19|e<<13)^e>>>10}n(l,i),l.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},l.prototype._update=function(e){for(var t=this._w,r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,s=0|this._e,l=0|this._f,g=0|this._g,m=0|this._h,y=0;y<16;++y)t[y]=e.readInt32BE(4*y);for(;y<64;++y)t[y]=h(t[y-2])+t[y-7]+f(t[y-15])+t[y-16]|0;for(var v=0;v<64;++v){var b=m+p(s)+u(s,l,g)+a[v]+t[v]|0,S=c(r)+d(r,n,i)|0;m=g,g=l,l=s,s=o+b|0,o=i,i=n,n=r,r=b+S|0}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=o+this._d|0,this._e=s+this._e|0,this._f=l+this._f|0,this._g=g+this._g|0,this._h=m+this._h|0},l.prototype._hash=function(){var e=o.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},e.exports=l},47531:function(e,t,r){"use strict";var n=r(39541),i=r(79181),o=r(17338),a=r(47226).Buffer,s=Array(160);function l(){this.init(),this._w=s,o.call(this,128,112)}n(l,i),l.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},l.prototype._hash=function(){var e=a.allocUnsafe(48);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e},e.exports=l},79181:function(e,t,r){"use strict";var n=r(39541),i=r(17338),o=r(47226).Buffer,a=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],s=Array(160);function l(){this.init(),this._w=s,i.call(this,128,112)}function u(e,t,r){return r^e&(t^r)}function d(e,t,r){return e&t|r&(e|t)}function c(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function p(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function f(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function h(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function g(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function m(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function y(e,t){return e>>>0>>0?1:0}n(l,i),l.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},l.prototype._update=function(e){for(var t=this._w,r=0|this._ah,n=0|this._bh,i=0|this._ch,o=0|this._dh,s=0|this._eh,l=0|this._fh,v=0|this._gh,b=0|this._hh,S=0|this._al,w=0|this._bl,_=0|this._cl,k=0|this._dl,O=0|this._el,P=0|this._fl,A=0|this._gl,I=0|this._hl,R=0;R<32;R+=2)t[R]=e.readInt32BE(4*R),t[R+1]=e.readInt32BE(4*R+4);for(;R<160;R+=2){var E=t[R-30],T=t[R-30+1],N=f(E,T),x=h(T,E),B=g(E=t[R-4],T=t[R-4+1]),C=m(T,E),M=t[R-14],D=t[R-14+1],U=t[R-32],J=t[R-32+1],j=x+D|0,H=N+M+y(j,x)|0;H=(H=H+B+y(j=j+C|0,C)|0)+U+y(j=j+J|0,J)|0,t[R]=H,t[R+1]=j}for(var q=0;q<160;q+=2){H=t[q],j=t[q+1];var L=d(r,n,i),F=d(S,w,_),V=c(r,S),W=c(S,r),z=p(s,O),G=p(O,s),Q=a[q],K=a[q+1],Y=u(s,l,v),Z=u(O,P,A),X=I+G|0,$=b+z+y(X,I)|0;$=($=($=$+Y+y(X=X+Z|0,Z)|0)+Q+y(X=X+K|0,K)|0)+H+y(X=X+j|0,j)|0;var ee=W+F|0,et=V+L+y(ee,W)|0;b=v,I=A,v=l,A=P,l=s,P=O,s=o+$+y(O=k+X|0,k)|0,o=i,k=_,i=n,_=w,n=r,w=S,r=$+et+y(S=X+ee|0,X)|0}this._al=this._al+S|0,this._bl=this._bl+w|0,this._cl=this._cl+_|0,this._dl=this._dl+k|0,this._el=this._el+O|0,this._fl=this._fl+P|0,this._gl=this._gl+A|0,this._hl=this._hl+I|0,this._ah=this._ah+r+y(this._al,S)|0,this._bh=this._bh+n+y(this._bl,w)|0,this._ch=this._ch+i+y(this._cl,_)|0,this._dh=this._dh+o+y(this._dl,k)|0,this._eh=this._eh+s+y(this._el,O)|0,this._fh=this._fh+l+y(this._fl,P)|0,this._gh=this._gh+v+y(this._gl,A)|0,this._hh=this._hh+b+y(this._hl,I)|0},l.prototype._hash=function(){var e=o.allocUnsafe(64);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e},e.exports=l},55144:function(e,t,r){"use strict";var n=r(11950).Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;if(!e)return"utf8";for(;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}function a(e){var t=o(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw Error("Unknown encoding: "+e);return t||e}function s(e){var t;switch(this.encoding=a(e),this.encoding){case"utf16le":this.text=h,this.end=g,t=4;break;case"utf8":this.fillLast=c,t=4;break;case"base64":this.text=m,this.end=y,t=3;break;default:this.write=v,this.end=b;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function l(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,t,r){var n=t.length-1;if(n=0?(i>0&&(e.lastNeed=i-1),i):--n=0?(i>0&&(e.lastNeed=i-2),i):--n=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0}function d(e,t,r){if((192&t[0])!=128)return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if((192&t[1])!=128)return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&(192&t[2])!=128)return e.lastNeed=2,"�"}}function c(e){var t=this.lastTotal-this.lastNeed,r=d(this,e,t);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):void(e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length)}function p(e,t){var r=u(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)}function f(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t}function h(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function g(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function m(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function y(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function v(e){return e.toString(this.encoding)}function b(e){return e&&e.length?this.write(e):""}t.StringDecoder=s,s.prototype.write=function(e){var t,r;if(0===e.length)return"";if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return re.compare(l)}function w(e){if(!n.isBuffer(e)||e.length<33)return!1;let t=e[0],r=e.slice(1,33);if(0===r.compare(s)||r.compare(u)>=0)return!1;if((2===t||3===t)&&33===e.length){try{E(e)}catch(e){return!1}return!0}let i=e.slice(33);return!(0===i.compare(s)||i.compare(u)>=0)&&4===t&&65===e.length}function _(e){return 4!==e[0]}function k(e){return!!w(e)&&_(e)}function O(e){return!!b(e)&&e.compare(s)>0&&0>e.compare(l)}function P(e){let t=e.slice(0,32),r=e.slice(32,64);return n.isBuffer(e)&&64===e.length&&0>t.compare(l)&&0>r.compare(l)}function A(e,t){return void 0===e&&void 0!==t?_(t):void 0===e||e}function I(e){return new i(e)}function R(e){return e.toArrayLike(n,"be",32)}function E(e){return o.curve.decodePoint(e)}function T(e,t){return n.from(e._encode(t))}function N(e,t,r){if(!w(e)||!w(t))throw TypeError(h);let n=E(e),i=E(t),o=n.add(i);return o.isInfinity()?null:T(o,A(r,e))}function x(e,t,r){if(!w(e))throw TypeError(h);if(!S(t))throw TypeError(g);let n=A(r,e),i=E(e);if(0===t.compare(s))return T(i,n);let o=I(t),a=p.mul(o),l=i.add(a);return l.isInfinity()?null:T(l,n)}function B(e,t){if(!w(e))throw TypeError(h);let r=E(e);if(r.isInfinity())throw TypeError(h);return T(r,A(t,e))}function C(e,t){if(!O(e))throw TypeError(f);let r=I(e),n=p.mul(r);return n.isInfinity()?null:T(n,A(t))}function M(e,t,r){if(!w(e))throw TypeError(h);if(!S(t))throw TypeError(g);let n=A(r,e),i=E(e),o=I(t),a=i.mul(o);return a.isInfinity()?null:T(a,n)}function D(e,t){if(!O(e))throw TypeError(f);if(!S(t))throw TypeError(g);let r=I(e),n=I(t),i=R(r.add(n).umod(d));return O(i)?i:null}function U(e,t){if(!O(e))throw TypeError(f);if(!S(t))throw TypeError(g);let r=I(e),n=I(t),i=R(r.sub(n).umod(d));return O(i)?i:null}function J(e,t){return H(e,t)}function j(e,t,r){return H(e,t,r)}function H(e,t,r){let i,o;if(!b(e))throw TypeError(m);if(!O(t))throw TypeError(f);if(void 0!==r&&!b(r))throw TypeError(v);let s=I(t),l=I(e);a(e,t,function(e){let t=I(e),r=p.mul(t);return!r.isInfinity()&&0!==(i=r.x.umod(d)).isZero()&&0!==(o=t.invm(d).mul(l.add(s.mul(i))).umod(d)).isZero()},O,r),o.cmp(c)>0&&(o=d.sub(o));let u=n.allocUnsafe(64);return R(i).copy(u,0),R(o).copy(u,32),u}function q(e,t,r,n){if(!b(e))throw TypeError(m);if(!w(t))throw TypeError(h);if(!P(r))throw TypeError(y);let i=E(t),o=I(r.slice(0,32)),a=I(r.slice(32,64));if(n&&a.cmp(c)>0||0>=o.gtn(0)||0>=a.gtn(0))return!1;let s=I(e),l=a.invm(d),u=s.mul(l).umod(d),f=o.mul(l).umod(d),g=p.mulAdd(u,i,f);return!g.isInfinity()&&g.x.umod(d).eq(o)}e.exports={isPoint:w,isPointCompressed:k,isPrivate:O,pointAdd:N,pointAddScalar:x,pointCompress:B,pointFromScalar:C,pointMultiply:M,privateAdd:D,privateSub:U,sign:J,signWithEntropy:j,verify:q}},9606:function(e,t,r){!function(e,t){"use strict";function n(e,t){if(!e)throw Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function o(e,t,r){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&(("le"===t||"be"===t)&&(r=t,t=10),this._init(e||0,t||10,r||"be"))}"object"==typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{u=void 0!==window.Buffer?window.Buffer:r(33370).Buffer}catch(e){}function a(e,t){var r=e.charCodeAt(t);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function s(e,t,r){var n=a(e,r);return r-1>=t&&(n|=a(e,r-1)<<4),n}function l(e,t,r,n){for(var i=0,o=Math.min(e.length,r),a=t;a=49?i+=s-49+10:s>=17?i+=s-17+10:i+=s}return i}o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return 0>e.cmp(t)?e:t},o.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;a-=3)o=e[a]|e[a-1]<<8|e[a-2]<<16,this.words[i]|=o<>>26-s&67108863,(s+=24)>=26&&(s-=26,i++);else if("le"===r)for(a=0,i=0;a>>26-s&67108863,(s+=24)>=26&&(s-=26,i++);return this.strip()},o.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=Array(this.length);for(var n,i=0;i=t;i-=2)n=s(e,t,i)<=18?(o-=18,a+=1,this.words[a]|=n>>>26):o+=8;else for(i=(e.length-t)%2==0?t+1:t;i=18?(o-=18,a+=1,this.words[a]|=n>>>26):o+=8;this.strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,a=o%n,s=Math.min(o,o-a)+r,u=0,d=r;d1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var u,d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],c=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function f(e){for(var t=Array(e.bitLength()),r=0;r>>i}return t}function h(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],a=i*o,s=67108863&a,l=a/67108864|0;r.words[0]=s;for(var u=1;u>>26,c=67108863&l,p=Math.min(u,t.length-1),f=Math.max(0,u-e.length+1);f<=p;f++){var h=u-f|0;d+=(a=(i=0|e.words[h])*(o=0|t.words[f])+c)/67108864|0,c=67108863&a}r.words[u]=0|c,l=0|d}return 0!==l?r.words[u]=0|l:r.length--,r.strip()}o.prototype.toString=function(e,t){if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var r,i=0,o=0,a=0;a>>24-i&16777215)||a!==this.length-1?d[6-l.length]+l+r:l+r,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var u=c[e],f=p[e];r="";var h=this.clone();for(h.negative=0;!h.isZero();){var g=h.modn(f).toString(e);r=(h=h.idivn(f)).isZero()?g+r:d[u-g.length]+g+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(e,t){return n(void 0!==u),this.toArrayLike(u,e,t)},o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,r){var i,o,a=this.byteLength(),s=r||Math.max(1,a);n(a<=s,"byte array longer than desired length"),n(s>0,"Requested array length <= 0"),this.strip();var l="le"===t,u=new e(s),d=this.clone();if(l){for(o=0;!d.isZero();o++)i=d.andln(255),d.iushrn(8),u[o]=i;for(;o=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return(8191&t)==0&&(r+=13,t>>>=13),(127&t)==0&&(r+=7,t>>>=7),(15&t)==0&&(r+=4,t>>>=4),(3&t)==0&&(r+=2,t>>>=2),(1&t)==0&&r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return(this.length-1)*26+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){this.length>e.length?(t=this,r=e):(t=e,r=this);for(var t,r,n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),t?this.words[r]=this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var t,r,n,i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;oe.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t,r,n=this.iadd(e);return e.negative=1,n._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(t=this,r=e):(t=e,r=this);for(var o=0,a=0;a>26,this.words[a]=67108863&n;for(;0!==o&&a>26,this.words[a]=67108863&n;if(0===o&&a>>13,f=0|a[1],h=8191&f,g=f>>>13,m=0|a[2],y=8191&m,v=m>>>13,b=0|a[3],S=8191&b,w=b>>>13,_=0|a[4],k=8191&_,O=_>>>13,P=0|a[5],A=8191&P,I=P>>>13,R=0|a[6],E=8191&R,T=R>>>13,N=0|a[7],x=8191&N,B=N>>>13,C=0|a[8],M=8191&C,D=C>>>13,U=0|a[9],J=8191&U,j=U>>>13,H=0|s[0],q=8191&H,L=H>>>13,F=0|s[1],V=8191&F,W=F>>>13,z=0|s[2],G=8191&z,Q=z>>>13,K=0|s[3],Y=8191&K,Z=K>>>13,X=0|s[4],$=8191&X,ee=X>>>13,et=0|s[5],er=8191&et,en=et>>>13,ei=0|s[6],eo=8191&ei,ea=ei>>>13,es=0|s[7],el=8191&es,eu=es>>>13,ed=0|s[8],ec=8191&ed,ep=ed>>>13,ef=0|s[9],eh=8191&ef,eg=ef>>>13;r.negative=e.negative^t.negative,r.length=19;var em=(u+(n=Math.imul(c,q))|0)+((8191&(i=(i=Math.imul(c,L))+Math.imul(p,q)|0))<<13)|0;u=((o=Math.imul(p,L))+(i>>>13)|0)+(em>>>26)|0,em&=67108863,n=Math.imul(h,q),i=(i=Math.imul(h,L))+Math.imul(g,q)|0,o=Math.imul(g,L);var ey=(u+(n=n+Math.imul(c,V)|0)|0)+((8191&(i=(i=i+Math.imul(c,W)|0)+Math.imul(p,V)|0))<<13)|0;u=((o=o+Math.imul(p,W)|0)+(i>>>13)|0)+(ey>>>26)|0,ey&=67108863,n=Math.imul(y,q),i=(i=Math.imul(y,L))+Math.imul(v,q)|0,o=Math.imul(v,L),n=n+Math.imul(h,V)|0,i=(i=i+Math.imul(h,W)|0)+Math.imul(g,V)|0,o=o+Math.imul(g,W)|0;var ev=(u+(n=n+Math.imul(c,G)|0)|0)+((8191&(i=(i=i+Math.imul(c,Q)|0)+Math.imul(p,G)|0))<<13)|0;u=((o=o+Math.imul(p,Q)|0)+(i>>>13)|0)+(ev>>>26)|0,ev&=67108863,n=Math.imul(S,q),i=(i=Math.imul(S,L))+Math.imul(w,q)|0,o=Math.imul(w,L),n=n+Math.imul(y,V)|0,i=(i=i+Math.imul(y,W)|0)+Math.imul(v,V)|0,o=o+Math.imul(v,W)|0,n=n+Math.imul(h,G)|0,i=(i=i+Math.imul(h,Q)|0)+Math.imul(g,G)|0,o=o+Math.imul(g,Q)|0;var eb=(u+(n=n+Math.imul(c,Y)|0)|0)+((8191&(i=(i=i+Math.imul(c,Z)|0)+Math.imul(p,Y)|0))<<13)|0;u=((o=o+Math.imul(p,Z)|0)+(i>>>13)|0)+(eb>>>26)|0,eb&=67108863,n=Math.imul(k,q),i=(i=Math.imul(k,L))+Math.imul(O,q)|0,o=Math.imul(O,L),n=n+Math.imul(S,V)|0,i=(i=i+Math.imul(S,W)|0)+Math.imul(w,V)|0,o=o+Math.imul(w,W)|0,n=n+Math.imul(y,G)|0,i=(i=i+Math.imul(y,Q)|0)+Math.imul(v,G)|0,o=o+Math.imul(v,Q)|0,n=n+Math.imul(h,Y)|0,i=(i=i+Math.imul(h,Z)|0)+Math.imul(g,Y)|0,o=o+Math.imul(g,Z)|0;var eS=(u+(n=n+Math.imul(c,$)|0)|0)+((8191&(i=(i=i+Math.imul(c,ee)|0)+Math.imul(p,$)|0))<<13)|0;u=((o=o+Math.imul(p,ee)|0)+(i>>>13)|0)+(eS>>>26)|0,eS&=67108863,n=Math.imul(A,q),i=(i=Math.imul(A,L))+Math.imul(I,q)|0,o=Math.imul(I,L),n=n+Math.imul(k,V)|0,i=(i=i+Math.imul(k,W)|0)+Math.imul(O,V)|0,o=o+Math.imul(O,W)|0,n=n+Math.imul(S,G)|0,i=(i=i+Math.imul(S,Q)|0)+Math.imul(w,G)|0,o=o+Math.imul(w,Q)|0,n=n+Math.imul(y,Y)|0,i=(i=i+Math.imul(y,Z)|0)+Math.imul(v,Y)|0,o=o+Math.imul(v,Z)|0,n=n+Math.imul(h,$)|0,i=(i=i+Math.imul(h,ee)|0)+Math.imul(g,$)|0,o=o+Math.imul(g,ee)|0;var ew=(u+(n=n+Math.imul(c,er)|0)|0)+((8191&(i=(i=i+Math.imul(c,en)|0)+Math.imul(p,er)|0))<<13)|0;u=((o=o+Math.imul(p,en)|0)+(i>>>13)|0)+(ew>>>26)|0,ew&=67108863,n=Math.imul(E,q),i=(i=Math.imul(E,L))+Math.imul(T,q)|0,o=Math.imul(T,L),n=n+Math.imul(A,V)|0,i=(i=i+Math.imul(A,W)|0)+Math.imul(I,V)|0,o=o+Math.imul(I,W)|0,n=n+Math.imul(k,G)|0,i=(i=i+Math.imul(k,Q)|0)+Math.imul(O,G)|0,o=o+Math.imul(O,Q)|0,n=n+Math.imul(S,Y)|0,i=(i=i+Math.imul(S,Z)|0)+Math.imul(w,Y)|0,o=o+Math.imul(w,Z)|0,n=n+Math.imul(y,$)|0,i=(i=i+Math.imul(y,ee)|0)+Math.imul(v,$)|0,o=o+Math.imul(v,ee)|0,n=n+Math.imul(h,er)|0,i=(i=i+Math.imul(h,en)|0)+Math.imul(g,er)|0,o=o+Math.imul(g,en)|0;var e_=(u+(n=n+Math.imul(c,eo)|0)|0)+((8191&(i=(i=i+Math.imul(c,ea)|0)+Math.imul(p,eo)|0))<<13)|0;u=((o=o+Math.imul(p,ea)|0)+(i>>>13)|0)+(e_>>>26)|0,e_&=67108863,n=Math.imul(x,q),i=(i=Math.imul(x,L))+Math.imul(B,q)|0,o=Math.imul(B,L),n=n+Math.imul(E,V)|0,i=(i=i+Math.imul(E,W)|0)+Math.imul(T,V)|0,o=o+Math.imul(T,W)|0,n=n+Math.imul(A,G)|0,i=(i=i+Math.imul(A,Q)|0)+Math.imul(I,G)|0,o=o+Math.imul(I,Q)|0,n=n+Math.imul(k,Y)|0,i=(i=i+Math.imul(k,Z)|0)+Math.imul(O,Y)|0,o=o+Math.imul(O,Z)|0,n=n+Math.imul(S,$)|0,i=(i=i+Math.imul(S,ee)|0)+Math.imul(w,$)|0,o=o+Math.imul(w,ee)|0,n=n+Math.imul(y,er)|0,i=(i=i+Math.imul(y,en)|0)+Math.imul(v,er)|0,o=o+Math.imul(v,en)|0,n=n+Math.imul(h,eo)|0,i=(i=i+Math.imul(h,ea)|0)+Math.imul(g,eo)|0,o=o+Math.imul(g,ea)|0;var ek=(u+(n=n+Math.imul(c,el)|0)|0)+((8191&(i=(i=i+Math.imul(c,eu)|0)+Math.imul(p,el)|0))<<13)|0;u=((o=o+Math.imul(p,eu)|0)+(i>>>13)|0)+(ek>>>26)|0,ek&=67108863,n=Math.imul(M,q),i=(i=Math.imul(M,L))+Math.imul(D,q)|0,o=Math.imul(D,L),n=n+Math.imul(x,V)|0,i=(i=i+Math.imul(x,W)|0)+Math.imul(B,V)|0,o=o+Math.imul(B,W)|0,n=n+Math.imul(E,G)|0,i=(i=i+Math.imul(E,Q)|0)+Math.imul(T,G)|0,o=o+Math.imul(T,Q)|0,n=n+Math.imul(A,Y)|0,i=(i=i+Math.imul(A,Z)|0)+Math.imul(I,Y)|0,o=o+Math.imul(I,Z)|0,n=n+Math.imul(k,$)|0,i=(i=i+Math.imul(k,ee)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,ee)|0,n=n+Math.imul(S,er)|0,i=(i=i+Math.imul(S,en)|0)+Math.imul(w,er)|0,o=o+Math.imul(w,en)|0,n=n+Math.imul(y,eo)|0,i=(i=i+Math.imul(y,ea)|0)+Math.imul(v,eo)|0,o=o+Math.imul(v,ea)|0,n=n+Math.imul(h,el)|0,i=(i=i+Math.imul(h,eu)|0)+Math.imul(g,el)|0,o=o+Math.imul(g,eu)|0;var eO=(u+(n=n+Math.imul(c,ec)|0)|0)+((8191&(i=(i=i+Math.imul(c,ep)|0)+Math.imul(p,ec)|0))<<13)|0;u=((o=o+Math.imul(p,ep)|0)+(i>>>13)|0)+(eO>>>26)|0,eO&=67108863,n=Math.imul(J,q),i=(i=Math.imul(J,L))+Math.imul(j,q)|0,o=Math.imul(j,L),n=n+Math.imul(M,V)|0,i=(i=i+Math.imul(M,W)|0)+Math.imul(D,V)|0,o=o+Math.imul(D,W)|0,n=n+Math.imul(x,G)|0,i=(i=i+Math.imul(x,Q)|0)+Math.imul(B,G)|0,o=o+Math.imul(B,Q)|0,n=n+Math.imul(E,Y)|0,i=(i=i+Math.imul(E,Z)|0)+Math.imul(T,Y)|0,o=o+Math.imul(T,Z)|0,n=n+Math.imul(A,$)|0,i=(i=i+Math.imul(A,ee)|0)+Math.imul(I,$)|0,o=o+Math.imul(I,ee)|0,n=n+Math.imul(k,er)|0,i=(i=i+Math.imul(k,en)|0)+Math.imul(O,er)|0,o=o+Math.imul(O,en)|0,n=n+Math.imul(S,eo)|0,i=(i=i+Math.imul(S,ea)|0)+Math.imul(w,eo)|0,o=o+Math.imul(w,ea)|0,n=n+Math.imul(y,el)|0,i=(i=i+Math.imul(y,eu)|0)+Math.imul(v,el)|0,o=o+Math.imul(v,eu)|0,n=n+Math.imul(h,ec)|0,i=(i=i+Math.imul(h,ep)|0)+Math.imul(g,ec)|0,o=o+Math.imul(g,ep)|0;var eP=(u+(n=n+Math.imul(c,eh)|0)|0)+((8191&(i=(i=i+Math.imul(c,eg)|0)+Math.imul(p,eh)|0))<<13)|0;u=((o=o+Math.imul(p,eg)|0)+(i>>>13)|0)+(eP>>>26)|0,eP&=67108863,n=Math.imul(J,V),i=(i=Math.imul(J,W))+Math.imul(j,V)|0,o=Math.imul(j,W),n=n+Math.imul(M,G)|0,i=(i=i+Math.imul(M,Q)|0)+Math.imul(D,G)|0,o=o+Math.imul(D,Q)|0,n=n+Math.imul(x,Y)|0,i=(i=i+Math.imul(x,Z)|0)+Math.imul(B,Y)|0,o=o+Math.imul(B,Z)|0,n=n+Math.imul(E,$)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,ee)|0,n=n+Math.imul(A,er)|0,i=(i=i+Math.imul(A,en)|0)+Math.imul(I,er)|0,o=o+Math.imul(I,en)|0,n=n+Math.imul(k,eo)|0,i=(i=i+Math.imul(k,ea)|0)+Math.imul(O,eo)|0,o=o+Math.imul(O,ea)|0,n=n+Math.imul(S,el)|0,i=(i=i+Math.imul(S,eu)|0)+Math.imul(w,el)|0,o=o+Math.imul(w,eu)|0,n=n+Math.imul(y,ec)|0,i=(i=i+Math.imul(y,ep)|0)+Math.imul(v,ec)|0,o=o+Math.imul(v,ep)|0;var eA=(u+(n=n+Math.imul(h,eh)|0)|0)+((8191&(i=(i=i+Math.imul(h,eg)|0)+Math.imul(g,eh)|0))<<13)|0;u=((o=o+Math.imul(g,eg)|0)+(i>>>13)|0)+(eA>>>26)|0,eA&=67108863,n=Math.imul(J,G),i=(i=Math.imul(J,Q))+Math.imul(j,G)|0,o=Math.imul(j,Q),n=n+Math.imul(M,Y)|0,i=(i=i+Math.imul(M,Z)|0)+Math.imul(D,Y)|0,o=o+Math.imul(D,Z)|0,n=n+Math.imul(x,$)|0,i=(i=i+Math.imul(x,ee)|0)+Math.imul(B,$)|0,o=o+Math.imul(B,ee)|0,n=n+Math.imul(E,er)|0,i=(i=i+Math.imul(E,en)|0)+Math.imul(T,er)|0,o=o+Math.imul(T,en)|0,n=n+Math.imul(A,eo)|0,i=(i=i+Math.imul(A,ea)|0)+Math.imul(I,eo)|0,o=o+Math.imul(I,ea)|0,n=n+Math.imul(k,el)|0,i=(i=i+Math.imul(k,eu)|0)+Math.imul(O,el)|0,o=o+Math.imul(O,eu)|0,n=n+Math.imul(S,ec)|0,i=(i=i+Math.imul(S,ep)|0)+Math.imul(w,ec)|0,o=o+Math.imul(w,ep)|0;var eI=(u+(n=n+Math.imul(y,eh)|0)|0)+((8191&(i=(i=i+Math.imul(y,eg)|0)+Math.imul(v,eh)|0))<<13)|0;u=((o=o+Math.imul(v,eg)|0)+(i>>>13)|0)+(eI>>>26)|0,eI&=67108863,n=Math.imul(J,Y),i=(i=Math.imul(J,Z))+Math.imul(j,Y)|0,o=Math.imul(j,Z),n=n+Math.imul(M,$)|0,i=(i=i+Math.imul(M,ee)|0)+Math.imul(D,$)|0,o=o+Math.imul(D,ee)|0,n=n+Math.imul(x,er)|0,i=(i=i+Math.imul(x,en)|0)+Math.imul(B,er)|0,o=o+Math.imul(B,en)|0,n=n+Math.imul(E,eo)|0,i=(i=i+Math.imul(E,ea)|0)+Math.imul(T,eo)|0,o=o+Math.imul(T,ea)|0,n=n+Math.imul(A,el)|0,i=(i=i+Math.imul(A,eu)|0)+Math.imul(I,el)|0,o=o+Math.imul(I,eu)|0,n=n+Math.imul(k,ec)|0,i=(i=i+Math.imul(k,ep)|0)+Math.imul(O,ec)|0,o=o+Math.imul(O,ep)|0;var eR=(u+(n=n+Math.imul(S,eh)|0)|0)+((8191&(i=(i=i+Math.imul(S,eg)|0)+Math.imul(w,eh)|0))<<13)|0;u=((o=o+Math.imul(w,eg)|0)+(i>>>13)|0)+(eR>>>26)|0,eR&=67108863,n=Math.imul(J,$),i=(i=Math.imul(J,ee))+Math.imul(j,$)|0,o=Math.imul(j,ee),n=n+Math.imul(M,er)|0,i=(i=i+Math.imul(M,en)|0)+Math.imul(D,er)|0,o=o+Math.imul(D,en)|0,n=n+Math.imul(x,eo)|0,i=(i=i+Math.imul(x,ea)|0)+Math.imul(B,eo)|0,o=o+Math.imul(B,ea)|0,n=n+Math.imul(E,el)|0,i=(i=i+Math.imul(E,eu)|0)+Math.imul(T,el)|0,o=o+Math.imul(T,eu)|0,n=n+Math.imul(A,ec)|0,i=(i=i+Math.imul(A,ep)|0)+Math.imul(I,ec)|0,o=o+Math.imul(I,ep)|0;var eE=(u+(n=n+Math.imul(k,eh)|0)|0)+((8191&(i=(i=i+Math.imul(k,eg)|0)+Math.imul(O,eh)|0))<<13)|0;u=((o=o+Math.imul(O,eg)|0)+(i>>>13)|0)+(eE>>>26)|0,eE&=67108863,n=Math.imul(J,er),i=(i=Math.imul(J,en))+Math.imul(j,er)|0,o=Math.imul(j,en),n=n+Math.imul(M,eo)|0,i=(i=i+Math.imul(M,ea)|0)+Math.imul(D,eo)|0,o=o+Math.imul(D,ea)|0,n=n+Math.imul(x,el)|0,i=(i=i+Math.imul(x,eu)|0)+Math.imul(B,el)|0,o=o+Math.imul(B,eu)|0,n=n+Math.imul(E,ec)|0,i=(i=i+Math.imul(E,ep)|0)+Math.imul(T,ec)|0,o=o+Math.imul(T,ep)|0;var eT=(u+(n=n+Math.imul(A,eh)|0)|0)+((8191&(i=(i=i+Math.imul(A,eg)|0)+Math.imul(I,eh)|0))<<13)|0;u=((o=o+Math.imul(I,eg)|0)+(i>>>13)|0)+(eT>>>26)|0,eT&=67108863,n=Math.imul(J,eo),i=(i=Math.imul(J,ea))+Math.imul(j,eo)|0,o=Math.imul(j,ea),n=n+Math.imul(M,el)|0,i=(i=i+Math.imul(M,eu)|0)+Math.imul(D,el)|0,o=o+Math.imul(D,eu)|0,n=n+Math.imul(x,ec)|0,i=(i=i+Math.imul(x,ep)|0)+Math.imul(B,ec)|0,o=o+Math.imul(B,ep)|0;var eN=(u+(n=n+Math.imul(E,eh)|0)|0)+((8191&(i=(i=i+Math.imul(E,eg)|0)+Math.imul(T,eh)|0))<<13)|0;u=((o=o+Math.imul(T,eg)|0)+(i>>>13)|0)+(eN>>>26)|0,eN&=67108863,n=Math.imul(J,el),i=(i=Math.imul(J,eu))+Math.imul(j,el)|0,o=Math.imul(j,eu),n=n+Math.imul(M,ec)|0,i=(i=i+Math.imul(M,ep)|0)+Math.imul(D,ec)|0,o=o+Math.imul(D,ep)|0;var ex=(u+(n=n+Math.imul(x,eh)|0)|0)+((8191&(i=(i=i+Math.imul(x,eg)|0)+Math.imul(B,eh)|0))<<13)|0;u=((o=o+Math.imul(B,eg)|0)+(i>>>13)|0)+(ex>>>26)|0,ex&=67108863,n=Math.imul(J,ec),i=(i=Math.imul(J,ep))+Math.imul(j,ec)|0,o=Math.imul(j,ep);var eB=(u+(n=n+Math.imul(M,eh)|0)|0)+((8191&(i=(i=i+Math.imul(M,eg)|0)+Math.imul(D,eh)|0))<<13)|0;u=((o=o+Math.imul(D,eg)|0)+(i>>>13)|0)+(eB>>>26)|0,eB&=67108863;var eC=(u+(n=Math.imul(J,eh))|0)+((8191&(i=(i=Math.imul(J,eg))+Math.imul(j,eh)|0))<<13)|0;return u=((o=Math.imul(j,eg))+(i>>>13)|0)+(eC>>>26)|0,eC&=67108863,l[0]=em,l[1]=ey,l[2]=ev,l[3]=eb,l[4]=eS,l[5]=ew,l[6]=e_,l[7]=ek,l[8]=eO,l[9]=eP,l[10]=eA,l[11]=eI,l[12]=eR,l[13]=eE,l[14]=eT,l[15]=eN,l[16]=ex,l[17]=eB,l[18]=eC,0!==u&&(l[19]=u,r.length++),r};function m(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}function y(e,t,r){return new v().mulp(e,t,r)}function v(e,t){this.x=e,this.y=t}Math.imul||(g=h),o.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?g(this,e,t):r<63?h(this,e,t):r<1024?m(this,e,t):y(this,e,t)},v.prototype.makeRBT=function(e){for(var t=Array(e),r=o.prototype._countBits(e)-1,n=0;n>=1;return n},v.prototype.permute=function(e,t,r,n,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*t;a>=26,t+=(i/67108864|0)+(o>>>26),this.words[r]=67108863&o}return 0!==t&&(this.words[r]=t,this.length++),this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=f(e);if(0===t.length)return new o(1);for(var r=this,n=0;n=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(t=0;t>>26-r}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var i,o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,u=0;u=0&&(0!==d||u>=i);u--){var c=0|this.words[u];this.words[u]=d<<26-o|c>>>o,d=c&s}return l&&0!==d&&(l.words[l.length++]=d),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(l/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(e,t){var r,n=this.length-e.length,i=this.clone(),a=e,s=0|a.words[a.length-1];0!=(n=26-this._countBits(s))&&(a=a.ushln(n),i.iushln(n),s=0|a.words[a.length-1]);var l=i.length-a.length;if("mod"!==t){(r=new o(null)).length=l+1,r.words=Array(r.length);for(var u=0;u=0;c--){var p=(0|i.words[a.length+c])*67108864+(0|i.words[a.length+c-1]);for(p=Math.min(p/s|0,67108863),i._ishlnsubmul(a,p,c);0!==i.negative;)p--,i.negative=0,i._ishlnsubmul(a,1,c),i.isZero()||(i.negative^=1);r&&(r.words[c]=p)}return r&&r.strip(),i.strip(),"div"!==t&&0!==n&&i.iushrn(n),{div:r||null,mod:i}},o.prototype.divmod=function(e,t,r){var i,a,s;return(n(!e.isZero()),this.isZero())?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(e)),{div:i,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):(this.negative&e.negative)!=0?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||0>this.cmp(e)?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modn(e.words[0]))}:this._wordDiv(e,t)},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modn=function(e){n(e<=67108863);for(var t=67108864%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},o.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),a=new o(0),s=new o(0),l=new o(1),u=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++u;for(var d=r.clone(),c=t.clone();!t.isZero();){for(var p=0,f=1;(t.words[0]&f)==0&&p<26;++p,f<<=1);if(p>0)for(t.iushrn(p);p-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(d),a.isub(c)),i.iushrn(1),a.iushrn(1);for(var h=0,g=1;(r.words[0]&g)==0&&h<26;++h,g<<=1);if(h>0)for(r.iushrn(h);h-- >0;)(s.isOdd()||l.isOdd())&&(s.iadd(d),l.isub(c)),s.iushrn(1),l.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(s),a.isub(l)):(r.isub(t),s.isub(i),l.isub(a))}return{a:s,b:l,gcd:r.iushln(u)}},o.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t,r=this,i=e.clone();r=0!==r.negative?r.umod(e):r.clone();for(var a=new o(1),s=new o(0),l=i.clone();r.cmpn(1)>0&&i.cmpn(1)>0;){for(var u=0,d=1;(r.words[0]&d)==0&&u<26;++u,d<<=1);if(u>0)for(r.iushrn(u);u-- >0;)a.isOdd()&&a.iadd(l),a.iushrn(1);for(var c=0,p=1;(i.words[0]&p)==0&&c<26;++c,p<<=1);if(c>0)for(i.iushrn(c);c-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);r.cmp(i)>=0?(r.isub(i),a.isub(s)):(i.isub(r),s.isub(a))}return 0>(t=0===r.cmpn(1)?a:s).cmpn(0)&&t.iadd(e),t},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return(1&this.words[0])==0},o.prototype.isOdd=function(){return(1&this.words[0])==1},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return -1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:ie.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){ni&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return -1===this.cmpn(e)},o.prototype.lt=function(e){return -1===this.cmp(e)},o.prototype.lten=function(e){return 0>=this.cmpn(e)},o.prototype.lte=function(e){return 0>=this.cmp(e)},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new P(e)},o.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var b={k256:null,p224:null,p192:null,p25519:null};function S(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function w(){S.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function _(){S.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function k(){S.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function O(){S.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function P(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function A(e){P.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}S.prototype._tmp=function(){var e=new o(null);return e.words=Array(Math.ceil(this.n/13)),e},S.prototype.ireduce=function(e){var t,r=e;do this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength();while(t>this.n);var n=t0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},S.prototype.split=function(e,t){e.iushrn(this.n,0,t)},S.prototype.imulK=function(e){return e.imul(this.k)},i(w,S),w.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i>>22,o=a}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},w.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){var t;if(b[e])return b[e];if("k256"===e)t=new w;else if("p224"===e)t=new _;else if("p192"===e)t=new k;else if("p25519"===e)t=new O;else throw Error("Unknown prime "+e);return b[e]=t,t},P.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},P.prototype._verify2=function(e,t){n((e.negative|t.negative)==0,"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},P.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},P.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},P.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},P.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},P.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return 0>r.cmpn(0)&&r.iadd(this.m),r._forceRed(this)},P.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return 0>r.cmpn(0)&&r.iadd(this.m),r},P.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},P.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},P.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},P.prototype.isqr=function(e){return this.imul(e,e.clone())},P.prototype.sqr=function(e){return this.mul(e,e)},P.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),l=s.redNeg(),u=this.m.subn(1).iushrn(1),d=this.m.bitLength();for(d=new o(2*d*d).toRed(this);0!==this.pow(d,u).cmp(l);)d.redIAdd(l);for(var c=this.pow(d,i),p=this.pow(e,i.addn(1).iushrn(1)),f=this.pow(e,i),h=a;0!==f.cmp(s);){for(var g=f,m=0;0!==g.cmp(s);m++)g=g.redSqr();n(m=0;i--){for(var d=t.words[i],c=u-1;c>=0;c--){var p=d>>c&1;if(a!==n[0]&&(a=this.sqr(a)),0===p&&0===s){l=0;continue}s<<=1,s|=p,(++l===r||0===i&&0===c)&&(a=this.mul(a,n[s]),l=0,s=0)}u=26}return a},P.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},P.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new A(e)},i(A,P),A.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},A.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},A.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):0>i.cmpn(0)&&(o=i.iadd(this.m)),o._forceRed(this)},A.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):0>i.cmpn(0)&&(a=i.iadd(this.m)),a._forceRed(this)},A.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},29531:function(e,t,r){"use strict";var n=r(23663).Buffer;let i=r(42716),o=n.alloc(1,1),a=n.alloc(1,0);function s(e,t,r,s,l){let u=n.alloc(32,0),d=n.alloc(32,1);u=i("sha256",u).update(d).update(a).update(t).update(e).update(l||"").digest(),d=i("sha256",u).update(d).digest(),u=i("sha256",u).update(d).update(o).update(t).update(e).update(l||"").digest(),d=i("sha256",u).update(d).digest();let c=d=i("sha256",u).update(d).digest();for(;!s(c)||!r(c);)u=i("sha256",u).update(d).update(a).digest(),d=i("sha256",u).update(d).digest(),c=d=i("sha256",u).update(d).digest();return c}e.exports=s},45885:function(e,t,r){"use strict";var n=r(29196);function i(e){return e.name||e.toString().match(/function (.*?)\s*\(/)[1]}function o(e){return n.Nil(e)?"":i(e.constructor)}function a(e){return n.Function(e)?"":n.String(e)?JSON.stringify(e):e&&n.Object(e)?"":e}function s(e,t){Error.captureStackTrace&&Error.captureStackTrace(e,t)}function l(e){return n.Function(e)?e.toJSON?e.toJSON():i(e):n.Array(e)?"Array":e&&n.Object(e)?"Object":void 0!==e?e:""}function u(e,t,r){var n=a(t);return"Expected "+l(e)+", got"+(""!==r?" "+r:"")+(""!==n?" "+n:"")}function d(e,t,r){r=r||o(t),this.message=u(e,t,r),s(this,d),this.__type=e,this.__value=t,this.__valueTypeName=r}function c(e,t,r,n,i){var o='" of type ';return"key"===t&&(o='" with key type '),u('property "'+l(r)+o+l(e),n,i)}function p(e,t,r,n,i){e?(i=i||o(n),this.message=c(e,r,t,n,i)):this.message='Unexpected property "'+t+'"',s(this,d),this.__label=r,this.__property=t,this.__type=e,this.__value=n,this.__valueTypeName=i}function f(e,t){return new d(e,{},t)}function h(e,t,r){return e instanceof p?(t=t+"."+e.__property,e=new p(e.__type,t,e.__label,e.__value,e.__valueTypeName)):e instanceof d&&(e=new p(e.__type,t,r,e.__value,e.__valueTypeName)),s(e),e}d.prototype=Object.create(Error.prototype),d.prototype.constructor=d,p.prototype=Object.create(Error.prototype),p.prototype.constructor=d,e.exports={TfTypeError:d,TfPropertyTypeError:p,tfCustomError:f,tfSubError:h,tfJSON:l,getValueTypeName:o}},61111:function(e,t,r){"use strict";var n=r(23663).Buffer,i=r(29196),o=r(45885);function a(e){return n.isBuffer(e)}function s(e){return"string"==typeof e&&/^([0-9a-f]{2})+$/i.test(e)}function l(e,t){var r=e.toJSON();function n(n){if(!e(n))return!1;if(n.length===t)return!0;throw o.tfCustomError(r+"(Length: "+t+")",r+"(Length: "+n.length+")")}return n.toJSON=function(){return r},n}var u=l.bind(null,i.Array),d=l.bind(null,a),c=l.bind(null,s),p=l.bind(null,i.String),f=9007199254740991,h={ArrayN:u,Buffer:a,BufferN:d,Finite:function(e){return"number"==typeof e&&isFinite(e)},Hex:s,HexN:c,Int8:function(e){return e<<24>>24===e},Int16:function(e){return e<<16>>16===e},Int32:function(e){return(0|e)===e},Int53:function(e){return"number"==typeof e&&e>=-f&&e<=f&&Math.floor(e)===e},Range:function(e,t,r){function n(n,i){return r(n,i)&&n>e&&n>>0===e},UInt53:function(e){return"number"==typeof e&&e>=0&&e<=f&&Math.floor(e)===e}};for(var g in h)h[g].toJSON=(function(e){return e}).bind(null,g);e.exports=h},81403:function(e,t,r){"use strict";var n=r(45885),i=r(29196),o=n.tfJSON,a=n.TfTypeError,s=n.TfPropertyTypeError,l=n.tfSubError,u=n.getValueTypeName,d={arrayOf:function(e,t){function r(r,n){return!(!i.Array(r)||i.Nil(r))&&(void 0===t.minLength||!(r.lengtht.maxLength))&&(void 0===t.length||r.length===t.length)&&r.every(function(t,r){try{return p(e,t,n)}catch(e){throw l(e,r)}})}return e=c(e),t=t||{},r.toJSON=function(){var r="["+o(e)+"]";return void 0!==t.length?r+="{"+t.length+"}":(void 0!==t.minLength||void 0!==t.maxLength)&&(r+="{"+(void 0===t.minLength?0:t.minLength)+","+(void 0===t.maxLength?1/0:t.maxLength)+"}"),r},r},maybe:function e(t){function r(r,n){return i.Nil(r)||t(r,n,e)}return t=c(t),r.toJSON=function(){return"?"+o(t)},r},map:function(e,t){function r(r,n){if(!i.Object(r)||i.Nil(r))return!1;for(var o in r){try{t&&p(t,o,n)}catch(e){throw l(e,o,"key")}try{var a=r[o];p(e,a,n)}catch(e){throw l(e,o)}}return!0}return e=c(e),t&&(t=c(t)),t?r.toJSON=function(){return"{"+o(t)+": "+o(e)+"}"}:r.toJSON=function(){return"{"+o(e)+"}"},r},object:function(e){var t={};for(var r in e)t[r]=c(e[r]);function n(e,r){if(!i.Object(e)||i.Nil(e))return!1;try{for(n in t){var n,o=t[n],a=e[n];p(o,a,r)}}catch(e){throw l(e,n)}if(r){for(n in e)if(!t[n])throw new s(void 0,n)}return!0}return n.toJSON=function(){return o(t)},n},anyOf:function(){var e=[].slice.call(arguments).map(c);function t(t,r){return e.some(function(e){try{return p(e,t,r)}catch(e){return!1}})}return t.toJSON=function(){return e.map(o).join("|")},t},allOf:function(){var e=[].slice.call(arguments).map(c);function t(t,r){return e.every(function(e){try{return p(e,t,r)}catch(e){return!1}})}return t.toJSON=function(){return e.map(o).join(" & ")},t},quacksLike:function(e){function t(t){return e===u(t)}return t.toJSON=function(){return e},t},tuple:function(){var e=[].slice.call(arguments).map(c);function t(t,r){return!(i.Nil(t)||i.Nil(t.length))&&(!r||t.length===e.length)&&e.every(function(e,n){try{return p(e,t[n],r)}catch(e){throw l(e,n)}})}return t.toJSON=function(){return"("+e.map(o).join(", ")+")"},t},value:function(e){function t(t){return t===e}return t.toJSON=function(){return e},t}};function c(e){if(i.String(e))return"?"===e[0]?d.maybe(e.slice(1)):i[e]||d.quacksLike(e);if(e&&i.Object(e)){if(i.Array(e)){if(1!==e.length)throw TypeError("Expected compile() parameter of type Array of length 1");return d.arrayOf(e[0])}return d.object(e)}return i.Function(e)?e:d.value(e)}function p(e,t,r,n){if(i.Function(e)){if(e(t,r))return!0;throw new a(n||e,t)}return p(c(e),t,r)}for(var f in d.oneOf=d.anyOf,i)p[f]=i[f];for(f in d)p[f]=d[f];var h=r(61111);for(f in h)p[f]=h[f];p.compile=c,p.TfTypeError=a,p.TfPropertyTypeError=s,e.exports=p},29196:function(e){"use strict";var t={Array:function(e){return null!=e&&e.constructor===Array},Boolean:function(e){return"boolean"==typeof e},Function:function(e){return"function"==typeof e},Nil:function(e){return null==e},Number:function(e){return"number"==typeof e},Object:function(e){return"object"==typeof e},String:function(e){return"string"==typeof e},"":function(){return!0}};for(var r in t.Null=t.Nil,t)t[r].toJSON=(function(e){return e}).bind(null,r);e.exports=t},88445:function(e,t,r){"use strict";function n(e,t){if(i("noDeprecation"))return e;var r=!1;return function(){if(!r){if(i("throwDeprecation"))throw Error(t);i("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}}function i(e){try{if(!r.g.localStorage)return!1}catch(e){return!1}var t=r.g.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}e.exports=n},55234:function(e,t,r){"use strict";var n=r(23663).Buffer,i=r(78110);function o(e,t){if(void 0!==t&&e[0]!==t)throw Error("Invalid network version");if(33===e.length)return{version:e[0],privateKey:e.slice(1,33),compressed:!1};if(34!==e.length)throw Error("Invalid WIF length");if(1!==e[33])throw Error("Invalid compression flag");return{version:e[0],privateKey:e.slice(1,33),compressed:!0}}function a(e,t,r){var i=new n(r?34:33);return i.writeUInt8(e,0),t.copy(i,1),r&&(i[33]=1),i}function s(e,t){return o(i.decode(e),t)}function l(e,t,r){return"number"==typeof e?i.encode(a(e,t,r)):i.encode(a(e.version,e.privateKey,e.compressed))}e.exports={decode:s,decodeRaw:o,encode:l,encodeRaw:a}},17335:function(e,t){"use strict";function r(e){var t,r=e.Symbol;if("function"==typeof r){if(r.observable)t=r.observable;else{t=r.for("https://github.com/benlesh/symbol-observable");try{r.observable=t}catch(e){}}}else t="@@observable";return t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r},29971:function(e,t,r){"use strict";e.exports=r(17335)},64109:function(e,t,r){"use strict";var n,i,o,a=r(23663).Buffer;function s(e,t){return function(){return e.apply(t,arguments)}}let{toString:l}=Object.prototype,{getPrototypeOf:u}=Object,d=(n=Object.create(null),e=>{let t=l.call(e);return n[t]||(n[t]=t.slice(8,-1).toLowerCase())}),c=e=>(e=e.toLowerCase(),t=>d(t)===e),p=e=>t=>typeof t===e,{isArray:f}=Array,h=p("undefined");function g(e){return null!==e&&!h(e)&&null!==e.constructor&&!h(e.constructor)&&b(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}let m=c("ArrayBuffer");function y(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&m(e.buffer)}let v=p("string"),b=p("function"),S=p("number"),w=e=>null!==e&&"object"==typeof e,_=e=>!0===e||!1===e,k=e=>{if("object"!==d(e))return!1;let t=u(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},O=c("Date"),P=c("File"),A=c("Blob"),I=c("FileList"),R=e=>w(e)&&b(e.pipe),E=e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||b(e.append)&&("formdata"===(t=d(e))||"object"===t&&b(e.toString)&&"[object FormData]"===e.toString()))},T=c("URLSearchParams"),N=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function x(e,t){let r,n,{allOwnKeys:i=!1}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(null!=e){if("object"!=typeof e&&(e=[e]),f(e))for(r=0,n=e.length;r0;)if(t===(r=n[i]).toLowerCase())return r;return null}let C="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:window,M=e=>!h(e)&&e!==C;function D(){let{caseless:e}=M(this)&&this||{},t={},r=(r,n)=>{let i=e&&B(t,n)||n;k(t[i])&&k(r)?t[i]=D(t[i],r):k(r)?t[i]=D({},r):f(r)?t[i]=r.slice():t[i]=r};for(let e=0,t=arguments.length;e3&&void 0!==arguments[3]?arguments[3]:{};return x(t,(t,n)=>{r&&b(t)?e[n]=s(t,r):e[n]=t},{allOwnKeys:n}),e},J=e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),j=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},H=(e,t,r,n)=>{let i,o,a;let s={};if(t=t||{},null==e)return t;do{for(o=(i=Object.getOwnPropertyNames(e)).length;o-- >0;)a=i[o],(!n||n(a,e,t))&&!s[a]&&(t[a]=e[a],s[a]=!0);e=!1!==r&&u(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},q=(e,t,r)=>{e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;let n=e.indexOf(t,r);return -1!==n&&n===r},L=e=>{if(!e)return null;if(f(e))return e;let t=e.length;if(!S(t))return null;let r=Array(t);for(;t-- >0;)r[t]=e[t];return r},F=(i="undefined"!=typeof Uint8Array&&u(Uint8Array),e=>i&&e instanceof i),V=(e,t)=>{let r;let n=(e&&e[Symbol.iterator]).call(e);for(;(r=n.next())&&!r.done;){let n=r.value;t.call(e,n[0],n[1])}},W=(e,t)=>{let r;let n=[];for(;null!==(r=e.exec(t));)n.push(r);return n},z=c("HTMLFormElement"),G=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,r){return t.toUpperCase()+r}),Q=(e=>{let{hasOwnProperty:t}=e;return(e,r)=>t.call(e,r)})(Object.prototype),K=c("RegExp"),Y=(e,t)=>{let r=Object.getOwnPropertyDescriptors(e),n={};x(r,(r,i)=>{let o;!1!==(o=t(r,i,e))&&(n[i]=o||r)}),Object.defineProperties(e,n)},Z=e=>{Y(e,(t,r)=>{if(b(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;if(b(e[r])){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},X=(e,t)=>{let r={};return(e=>{e.forEach(e=>{r[e]=!0})})(f(e)?e:String(e).split(t)),r},$=()=>{},ee=(e,t)=>Number.isFinite(e=+e)?e:t,et="abcdefghijklmnopqrstuvwxyz",er="0123456789",en={DIGIT:er,ALPHA:et,ALPHA_DIGIT:et+et.toUpperCase()+er},ei=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:16,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:en.ALPHA_DIGIT,r="",{length:n}=t;for(;e--;)r+=t[Math.random()*n|0];return r};function eo(e){return!!(e&&b(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])}let ea=e=>{let t=Array(10),r=(e,n)=>{if(w(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[n]=e;let i=f(e)?[]:{};return x(e,(e,t)=>{let o=r(e,n+1);h(o)||(i[t]=o)}),t[n]=void 0,i}}return e};return r(e,0)},es=c("AsyncFunction"),el=e=>e&&(w(e)||b(e))&&b(e.then)&&b(e.catch);var eu={isArray:f,isArrayBuffer:m,isBuffer:g,isFormData:E,isArrayBufferView:y,isString:v,isNumber:S,isBoolean:_,isObject:w,isPlainObject:k,isUndefined:h,isDate:O,isFile:P,isBlob:A,isRegExp:K,isFunction:b,isStream:R,isURLSearchParams:T,isTypedArray:F,isFileList:I,forEach:x,merge:D,extend:U,trim:N,stripBOM:J,inherits:j,toFlatObject:H,kindOf:d,kindOfTest:c,endsWith:q,toArray:L,forEachEntry:V,matchAll:W,isHTMLForm:z,hasOwnProperty:Q,hasOwnProp:Q,reduceDescriptors:Y,freezeMethods:Z,toObjectSet:X,toCamelCase:G,noop:$,toFiniteNumber:ee,findKey:B,global:C,isContextDefined:M,ALPHABET:en,generateString:ei,isSpecCompliantForm:eo,toJSONObject:ea,isAsyncFn:es,isThenable:el};function ed(e,t,r,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i)}eu.inherits(ed,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:eu.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});let ec=ed.prototype,ep={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{ep[e]={value:e}}),Object.defineProperties(ed,ep),Object.defineProperty(ec,"isAxiosError",{value:!0}),ed.from=(e,t,r,n,i,o)=>{let a=Object.create(ec);return eu.toFlatObject(e,a,function(e){return e!==Error.prototype},e=>"isAxiosError"!==e),ed.call(a,e.message,t,r,n,i),a.cause=e,a.name=e.name,o&&Object.assign(a,o),a};var ef=null;function eh(e){return eu.isPlainObject(e)||eu.isArray(e)}function eg(e){return eu.endsWith(e,"[]")?e.slice(0,-2):e}function em(e,t,r){return e?e.concat(t).map(function(e,t){return e=eg(e),!r&&t?"["+e+"]":e}).join(r?".":""):t}function ey(e){return eu.isArray(e)&&!e.some(eh)}let ev=eu.toFlatObject(eu,{},null,function(e){return/^is[A-Z]/.test(e)});function eb(e,t,r){if(!eu.isObject(e))throw TypeError("target must be an object");t=t||new FormData;let n=(r=eu.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!eu.isUndefined(t[e])})).metaTokens,i=r.visitor||d,o=r.dots,s=r.indexes,l=(r.Blob||"undefined"!=typeof Blob&&Blob)&&eu.isSpecCompliantForm(t);if(!eu.isFunction(i))throw TypeError("visitor must be a function");function u(e){if(null===e)return"";if(eu.isDate(e))return e.toISOString();if(!l&&eu.isBlob(e))throw new ed("Blob is not supported. Use a Buffer instead.");return eu.isArrayBuffer(e)||eu.isTypedArray(e)?l&&"function"==typeof Blob?new Blob([e]):a.from(e):e}function d(e,r,i){let a=e;if(e&&!i&&"object"==typeof e){if(eu.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(eu.isArray(e)&&ey(e)||(eu.isFileList(e)||eu.endsWith(r,"[]"))&&(a=eu.toArray(e)))return r=eg(r),a.forEach(function(e,n){eu.isUndefined(e)||null===e||t.append(!0===s?em([r],n,o):null===s?r:r+"[]",u(e))}),!1}return!!eh(e)||(t.append(em(i,r,o),u(e)),!1)}let c=[],p=Object.assign(ev,{defaultVisitor:d,convertValue:u,isVisitable:eh});function f(e,r){if(!eu.isUndefined(e)){if(-1!==c.indexOf(e))throw Error("Circular reference detected in "+r.join("."));c.push(e),eu.forEach(e,function(e,n){!0===(!(eu.isUndefined(e)||null===e)&&i.call(t,e,eu.isString(n)?n.trim():n,r,p))&&f(e,r?r.concat(n):[n])}),c.pop()}}if(!eu.isObject(e))throw TypeError("data must be an object");return f(e),t}function eS(e){let t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\x00"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function ew(e,t){this._pairs=[],e&&eb(e,this,t)}let e_=ew.prototype;function ek(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function eO(e,t,r){let n;if(!t)return e;let i=r&&r.encode||ek,o=r&&r.serialize;if(n=o?o(t,r):eu.isURLSearchParams(t)?t.toString():new ew(t,r).toString(i)){let t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+n}return e}e_.append=function(e,t){this._pairs.push([e,t])},e_.toString=function(e){let t=e?function(t){return e.call(this,t,eS)}:eS;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};class eP{use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){eu.forEach(this.handlers,function(t){null!==t&&e(t)})}constructor(){this.handlers=[]}}var eA=eP,eI={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},eR={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:ew,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};let eE="undefined"!=typeof document,eT=(o="undefined"!=typeof navigator&&navigator.product,eE&&0>["ReactNative","NativeScript","NS"].indexOf(o));var eN={...Object.freeze({__proto__:null,hasBrowserEnv:eE,hasStandardBrowserWebWorkerEnv:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,hasStandardBrowserEnv:eT}),...eR};function ex(e,t){return eb(e,new eN.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){return eN.isNode&&eu.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},t))}function eB(e){return eu.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}function eC(e){let t,r;let n={},i=Object.keys(e),o=i.length;for(t=0;t=e.length;return(o=!o&&eu.isArray(n)?n.length:o,s)?eu.hasOwnProp(n,o)?n[o]=[n[o],r]:n[o]=r:(n[o]&&eu.isObject(n[o])||(n[o]=[]),t(e,r,n[o],i)&&eu.isArray(n[o])&&(n[o]=eC(n[o]))),!a}if(eu.isFormData(e)&&eu.isFunction(e.entries)){let r={};return eu.forEachEntry(e,(e,n)=>{t(eB(e),n,r,0)}),r}return null}function eD(e,t,r){if(eu.isString(e))try{return(t||JSON.parse)(e),eu.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}let eU={transitional:eI,adapter:["xhr","http"],transformRequest:[function(e,t){let r;let n=t.getContentType()||"",i=n.indexOf("application/json")>-1,o=eu.isObject(e);if(o&&eu.isHTMLForm(e)&&(e=new FormData(e)),eu.isFormData(e))return i?JSON.stringify(eM(e)):e;if(eu.isArrayBuffer(e)||eu.isBuffer(e)||eu.isStream(e)||eu.isFile(e)||eu.isBlob(e))return e;if(eu.isArrayBufferView(e))return e.buffer;if(eu.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return ex(e,this.formSerializer).toString();if((r=eu.isFileList(e))||n.indexOf("multipart/form-data")>-1){let t=this.env&&this.env.FormData;return eb(r?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||i?(t.setContentType("application/json",!1),eD(e)):e}],transformResponse:[function(e){let t=this.transitional||eU.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(e&&eu.isString(e)&&(r&&!this.responseType||n)){let r=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(e){if(r){if("SyntaxError"===e.name)throw ed.from(e,ed.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:eN.classes.FormData,Blob:eN.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};eu.forEach(["delete","get","head","post","put","patch"],e=>{eU.headers[e]={}});var eJ=eU;let ej=eu.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);var eH=e=>{let t,r,n;let i={};return e&&e.split("\n").forEach(function(e){n=e.indexOf(":"),t=e.substring(0,n).trim().toLowerCase(),r=e.substring(n+1).trim(),!t||i[t]&&ej[t]||("set-cookie"===t?i[t]?i[t].push(r):i[t]=[r]:i[t]=i[t]?i[t]+", "+r:r)}),i};let eq=Symbol("internals");function eL(e){return e&&String(e).trim().toLowerCase()}function eF(e){return!1===e||null==e?e:eu.isArray(e)?e.map(eF):String(e)}function eV(e){let t;let r=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;for(;t=n.exec(e);)r[t[1]]=t[2];return r}let eW=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function ez(e,t,r,n,i){if(eu.isFunction(n))return n.call(this,t,r);if(i&&(t=r),eu.isString(t)){if(eu.isString(n))return -1!==t.indexOf(n);if(eu.isRegExp(n))return n.test(t)}}function eG(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,r)=>t.toUpperCase()+r)}function eQ(e,t){let r=eu.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(e,r,i){return this[n].call(this,t,e,r,i)},configurable:!0})})}class eK{set(e,t,r){let n=this;function i(e,t,r){let i=eL(t);if(!i)throw Error("header name must be a non-empty string");let o=eu.findKey(n,i);o&&void 0!==n[o]&&!0!==r&&(void 0!==r||!1===n[o])||(n[o||t]=eF(e))}let o=(e,t)=>eu.forEach(e,(e,r)=>i(e,r,t));return eu.isPlainObject(e)||e instanceof this.constructor?o(e,t):eu.isString(e)&&(e=e.trim())&&!eW(e)?o(eH(e),t):null!=e&&i(t,e,r),this}get(e,t){if(e=eL(e)){let r=eu.findKey(this,e);if(r){let e=this[r];if(!t)return e;if(!0===t)return eV(e);if(eu.isFunction(t))return t.call(this,e,r);if(eu.isRegExp(t))return t.exec(e);throw TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=eL(e)){let r=eu.findKey(this,e);return!!(r&&void 0!==this[r]&&(!t||ez(this,this[r],r,t)))}return!1}delete(e,t){let r=this,n=!1;function i(e){if(e=eL(e)){let i=eu.findKey(r,e);i&&(!t||ez(r,r[i],i,t))&&(delete r[i],n=!0)}}return eu.isArray(e)?e.forEach(i):i(e),n}clear(e){let t=Object.keys(this),r=t.length,n=!1;for(;r--;){let i=t[r];(!e||ez(this,this[i],i,e,!0))&&(delete this[i],n=!0)}return n}normalize(e){let t=this,r={};return eu.forEach(this,(n,i)=>{let o=eu.findKey(r,i);if(o){t[o]=eF(n),delete t[i];return}let a=e?eG(i):String(i).trim();a!==i&&delete t[i],t[a]=eF(n),r[a]=!0}),this}concat(){for(var e=arguments.length,t=Array(e),r=0;r{null!=r&&!1!==r&&(t[n]=e&&eu.isArray(r)?r.join(", "):r)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(e=>{let[t,r]=e;return t+": "+r}).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;ni.set(e)),i}static accessor(e){let t=(this[eq]=this[eq]={accessors:{}}).accessors,r=this.prototype;function n(e){let n=eL(e);t[n]||(eQ(r,e),t[n]=!0)}return eu.isArray(e)?e.forEach(n):n(e),this}constructor(e){e&&this.set(e)}}eK.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),eu.reduceDescriptors(eK.prototype,(e,t)=>{let{value:r}=e,n=t[0].toUpperCase()+t.slice(1);return{get:()=>r,set(e){this[n]=e}}}),eu.freezeMethods(eK);var eY=eK;function eZ(e,t){let r=this||eJ,n=t||r,i=eY.from(n.headers),o=n.data;return eu.forEach(e,function(e){o=e.call(r,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function eX(e){return!!(e&&e.__CANCEL__)}function e$(e,t,r){ed.call(this,null==e?"canceled":e,ed.ERR_CANCELED,t,r),this.name="CanceledError"}function e0(e,t,r){let n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new ed("Request failed with status code "+r.status,[ed.ERR_BAD_REQUEST,ed.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}eu.inherits(e$,ed,{__CANCEL__:!0});var e1=eN.hasStandardBrowserEnv?{write(e,t,r,n,i,o){let a=[e+"="+encodeURIComponent(t)];eu.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),eu.isString(n)&&a.push("path="+n),eu.isString(i)&&a.push("domain="+i),!0===o&&a.push("secure"),document.cookie=a.join("; ")},read(e){let t=document.cookie.match(RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function e2(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function e3(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function e6(e,t){return e&&!e2(t)?e3(e,t):t}var e4=eN.hasStandardBrowserEnv?function(){let e;let t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function n(e){let n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=n(window.location.href),function(t){let r=eu.isString(t)?n(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return function(){return!0}}();function e8(e){let t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function e5(e,t){let r;let n=Array(e=e||10),i=Array(e),o=0,a=0;return t=void 0!==t?t:1e3,function(s){let l=Date.now(),u=i[a];r||(r=l),n[o]=s,i[o]=l;let d=a,c=0;for(;d!==o;)c+=n[d++],d%=e;if((o=(o+1)%e)===a&&(a=(a+1)%e),l-r{let o=i.loaded,a=i.lengthComputable?i.total:void 0,s=o-r,l=n(s),u=o<=a;r=o;let d={loaded:o,total:a,progress:a?o/a:void 0,bytes:s,rate:l||void 0,estimated:l&&a&&u?(a-o)/l:void 0,event:i};d[t?"download":"upload"]=!0,e(d)}}let e9={http:ef,xhr:"undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,r){let n,i,o=e.data,a=eY.from(e.headers).normalize(),{responseType:s,withXSRFToken:l}=e;function u(){e.cancelToken&&e.cancelToken.unsubscribe(n),e.signal&&e.signal.removeEventListener("abort",n)}if(eu.isFormData(o)){if(eN.hasStandardBrowserEnv||eN.hasStandardBrowserWebWorkerEnv)a.setContentType(!1);else if(!1!==(i=a.getContentType())){let[e,...t]=i?i.split(";").map(e=>e.trim()).filter(Boolean):[];a.setContentType([e||"multipart/form-data",...t].join("; "))}}let d=new XMLHttpRequest;if(e.auth){let t=e.auth.username||"",r=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";a.set("Authorization","Basic "+btoa(t+":"+r))}let c=e6(e.baseURL,e.url);function p(){if(!d)return;let n=eY.from("getAllResponseHeaders"in d&&d.getAllResponseHeaders());e0(function(e){t(e),u()},function(e){r(e),u()},{data:s&&"text"!==s&&"json"!==s?d.response:d.responseText,status:d.status,statusText:d.statusText,headers:n,config:e,request:d}),d=null}if(d.open(e.method.toUpperCase(),eO(c,e.params,e.paramsSerializer),!0),d.timeout=e.timeout,"onloadend"in d?d.onloadend=p:d.onreadystatechange=function(){d&&4===d.readyState&&(0!==d.status||d.responseURL&&0===d.responseURL.indexOf("file:"))&&setTimeout(p)},d.onabort=function(){d&&(r(new ed("Request aborted",ed.ECONNABORTED,e,d)),d=null)},d.onerror=function(){r(new ed("Network Error",ed.ERR_NETWORK,e,d)),d=null},d.ontimeout=function(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",n=e.transitional||eI;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(new ed(t,n.clarifyTimeoutError?ed.ETIMEDOUT:ed.ECONNABORTED,e,d)),d=null},eN.hasStandardBrowserEnv&&(l&&eu.isFunction(l)&&(l=l(e)),l||!1!==l&&e4(c))){let t=e.xsrfHeaderName&&e.xsrfCookieName&&e1.read(e.xsrfCookieName);t&&a.set(e.xsrfHeaderName,t)}void 0===o&&a.setContentType(null),"setRequestHeader"in d&&eu.forEach(a.toJSON(),function(e,t){d.setRequestHeader(t,e)}),eu.isUndefined(e.withCredentials)||(d.withCredentials=!!e.withCredentials),s&&"json"!==s&&(d.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&d.addEventListener("progress",e7(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&d.upload&&d.upload.addEventListener("progress",e7(e.onUploadProgress)),(e.cancelToken||e.signal)&&(n=t=>{d&&(r(!t||t.type?new e$(null,e,d):t),d.abort(),d=null)},e.cancelToken&&e.cancelToken.subscribe(n),e.signal&&(e.signal.aborted?n():e.signal.addEventListener("abort",n)));let f=e8(c);if(f&&-1===eN.protocols.indexOf(f)){r(new ed("Unsupported protocol "+f+":",ed.ERR_BAD_REQUEST,e));return}d.send(o||null)})}};eu.forEach(e9,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});let te=e=>"- ".concat(e),tt=e=>eu.isFunction(e)||null===e||!1===e;var tr={getAdapter:e=>{let t,r;let{length:n}=e=eu.isArray(e)?e:[e],i={};for(let o=0;o{let[t,r]=e;return"adapter ".concat(t," ")+(!1===r?"is not supported by the environment":"is not available in the build")});throw new ed("There is no suitable adapter to dispatch the request "+(n?e.length>1?"since :\n"+e.map(te).join("\n"):" "+te(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return r},adapters:e9};function tn(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new e$(null,e)}function ti(e){return tn(e),e.headers=eY.from(e.headers),e.data=eZ.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),tr.getAdapter(e.adapter||eJ.adapter)(e).then(function(t){return tn(e),t.data=eZ.call(e,e.transformResponse,t),t.headers=eY.from(t.headers),t},function(t){return!eX(t)&&(tn(e),t&&t.response&&(t.response.data=eZ.call(e,e.transformResponse,t.response),t.response.headers=eY.from(t.response.headers))),Promise.reject(t)})}let to=e=>e instanceof eY?e.toJSON():e;function ta(e,t){t=t||{};let r={};function n(e,t,r){return eu.isPlainObject(e)&&eu.isPlainObject(t)?eu.merge.call({caseless:r},e,t):eu.isPlainObject(t)?eu.merge({},t):eu.isArray(t)?t.slice():t}function i(e,t,r){return eu.isUndefined(t)?eu.isUndefined(e)?void 0:n(void 0,e,r):n(e,t,r)}function o(e,t){if(!eu.isUndefined(t))return n(void 0,t)}function a(e,t){return eu.isUndefined(t)?eu.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function s(r,i,o){return o in t?n(r,i):o in e?n(void 0,r):void 0}let l={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(e,t)=>i(to(e),to(t),!0)};return eu.forEach(Object.keys(Object.assign({},e,t)),function(n){let o=l[n]||i,a=o(e[n],t[n],n);eu.isUndefined(a)&&o!==s||(r[n]=a)}),r}let ts="1.6.7",tl={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{tl[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});let tu={};tl.transitional=function(e,t,r){function n(e,t){return"[Axios v"+ts+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,i,o)=>{if(!1===e)throw new ed(n(i," has been removed"+(t?" in "+t:"")),ed.ERR_DEPRECATED);return t&&!tu[i]&&(tu[i]=!0,console.warn(n(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,i,o)}};var td={assertOptions:function(e,t,r){if("object"!=typeof e)throw new ed("options must be an object",ed.ERR_BAD_OPTION_VALUE);let n=Object.keys(e),i=n.length;for(;i-- >0;){let o=n[i],a=t[o];if(a){let t=e[o],r=void 0===t||a(t,o,e);if(!0!==r)throw new ed("option "+o+" must be "+r,ed.ERR_BAD_OPTION_VALUE);continue}if(!0!==r)throw new ed("Unknown option "+o,ed.ERR_BAD_OPTION)}},validators:tl};let tc=td.validators;class tp{async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t;Error.captureStackTrace?Error.captureStackTrace(t={}):t=Error();let r=t.stack?t.stack.replace(/^.+\n/,""):"";e.stack?r&&!String(e.stack).endsWith(r.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+r):e.stack=r}throw e}}_request(e,t){let r,n;"string"==typeof e?(t=t||{}).url=e:t=e||{};let{transitional:i,paramsSerializer:o,headers:a}=t=ta(this.defaults,t);void 0!==i&&td.assertOptions(i,{silentJSONParsing:tc.transitional(tc.boolean),forcedJSONParsing:tc.transitional(tc.boolean),clarifyTimeoutError:tc.transitional(tc.boolean)},!1),null!=o&&(eu.isFunction(o)?t.paramsSerializer={serialize:o}:td.assertOptions(o,{encode:tc.function,serialize:tc.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let s=a&&eu.merge(a.common,a[t.method]);a&&eu.forEach(["delete","get","head","post","put","patch","common"],e=>{delete a[e]}),t.headers=eY.concat(s,a);let l=[],u=!0;this.interceptors.request.forEach(function(e){("function"!=typeof e.runWhen||!1!==e.runWhen(t))&&(u=u&&e.synchronous,l.unshift(e.fulfilled,e.rejected))});let d=[];this.interceptors.response.forEach(function(e){d.push(e.fulfilled,e.rejected)});let c=0;if(!u){let e=[ti.bind(this),void 0];for(e.unshift.apply(e,l),e.push.apply(e,d),n=e.length,r=Promise.resolve(t);c{if(!r._listeners)return;let t=r._listeners.length;for(;t-- >0;)r._listeners[t](e);r._listeners=null}),this.promise.then=e=>{let t;let n=new Promise(e=>{r.subscribe(e),t=e}).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e(function(e,n,i){r.reason||(r.reason=new e$(e,n,i),t(r.reason))})}}var tg=th;function tm(e){return function(t){return e.apply(null,t)}}function ty(e){return eu.isObject(e)&&!0===e.isAxiosError}let tv={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(tv).forEach(e=>{let[t,r]=e;tv[r]=t});var tb=tv;function tS(e){let t=new tf(e),r=s(tf.prototype.request,t);return eu.extend(r,tf.prototype,t,{allOwnKeys:!0}),eu.extend(r,t,null,{allOwnKeys:!0}),r.create=function(t){return tS(ta(e,t))},r}let tw=tS(eJ);tw.Axios=tf,tw.CanceledError=e$,tw.CancelToken=tg,tw.isCancel=eX,tw.VERSION=ts,tw.toFormData=eb,tw.AxiosError=ed,tw.Cancel=tw.CanceledError,tw.all=function(e){return Promise.all(e)},tw.spread=tm,tw.isAxiosError=ty,tw.mergeConfig=ta,tw.AxiosHeaders=eY,tw.formToJSON=e=>eM(eu.isHTMLForm(e)?new FormData(e):e),tw.getAdapter=tr.getAdapter,tw.HttpStatusCode=tb,tw.default=tw,e.exports=tw},22963:function(e,t,r){"use strict";r.d(t,{h:function(){return eD}});var n=r(69703),i=r(71074),o=r(64571),a=r(49058),s=r(77362),l=r(56596),u=r(89933),d=r(22681),c=function(){function e(){this.assumeImmutableResults=!1,this.getFragmentDoc=(0,o.re)(s.Yk,{max:l.Q["cache.fragmentQueryDocuments"]||1e3,cache:u.k})}return e.prototype.batch=function(e){var t,r=this,n="string"==typeof e.optimistic?e.optimistic:!1===e.optimistic?null:void 0;return this.performTransaction(function(){return t=e.update(r)},n),t},e.prototype.recordOptimisticTransaction=function(e,t){this.performTransaction(e,t)},e.prototype.transformDocument=function(e){return e},e.prototype.transformForLink=function(e){return e},e.prototype.identify=function(e){},e.prototype.gc=function(){return[]},e.prototype.modify=function(e){return!1},e.prototype.readQuery=function(e,t){return void 0===t&&(t=!!e.optimistic),this.read((0,n.pi)((0,n.pi)({},e),{rootId:e.id||"ROOT_QUERY",optimistic:t}))},e.prototype.readFragment=function(e,t){return void 0===t&&(t=!!e.optimistic),this.read((0,n.pi)((0,n.pi)({},e),{query:this.getFragmentDoc(e.fragment,e.fragmentName),rootId:e.id,optimistic:t}))},e.prototype.writeQuery=function(e){var t=e.id,r=e.data,i=(0,n._T)(e,["id","data"]);return this.write(Object.assign(i,{dataId:t||"ROOT_QUERY",result:r}))},e.prototype.writeFragment=function(e){var t=e.id,r=e.data,i=e.fragment,o=e.fragmentName,a=(0,n._T)(e,["id","data","fragment","fragmentName"]);return this.write(Object.assign(a,{query:this.getFragmentDoc(i,o),dataId:t,result:r}))},e.prototype.updateQuery=function(e,t){return this.batch({update:function(r){var i=r.readQuery(e),o=t(i);return null==o?i:(r.writeQuery((0,n.pi)((0,n.pi)({},e),{data:o})),o)}})},e.prototype.updateFragment=function(e,t){return this.batch({update:function(r){var i=r.readFragment(e),o=t(i);return null==o?i:(r.writeFragment((0,n.pi)((0,n.pi)({},e),{data:o})),o)}})},e}();!1!==globalThis.__DEV__&&(c.prototype.getMemoryInternals=d.Kb);var p=function(e){function t(r,n,i,o){var a,s=e.call(this,r)||this;if(s.message=r,s.path=n,s.query=i,s.variables=o,Array.isArray(s.path)){s.missing=s.message;for(var l=s.path.length-1;l>=0;--l)s.missing=((a={})[s.path[l]]=s.missing,a)}else s.missing=s.path;return s.__proto__=t.prototype,s}return(0,n.ZT)(t,e),t}(Error),f=r(87205),h=r(88796),g=r(29446),m=r(92298),y=r(9774),v=r(11258),b=r(44022),S=r(6291),w=r(84661),_=r(23505),k=r(88403),O=r(25004);function P(e){var t=new Set([e]);return t.forEach(function(e){(0,O.s)(e)&&A(e)===e&&Object.getOwnPropertyNames(e).forEach(function(r){(0,O.s)(e[r])&&t.add(e[r])})}),e}function A(e){if(!1!==globalThis.__DEV__&&!Object.isFrozen(e))try{Object.freeze(e)}catch(e){if(e instanceof TypeError)return null;throw e}return e}function I(e){return!1!==globalThis.__DEV__&&P(e),e}var R=r(60430),E=r(26406),T=Object.prototype.hasOwnProperty;function N(e){return null==e}function x(e,t){var r=e.__typename,n=e.id,i=e._id;if("string"==typeof r&&(t&&(t.keyObject=N(n)?N(i)?void 0:{_id:i}:{id:n}),N(n)&&!N(i)&&(n=i),!N(n)))return"".concat(r,":").concat("number"==typeof n||"string"==typeof n?n:JSON.stringify(n))}var B={dataIdFromObject:x,addTypename:!0,resultCaching:!0,canonizeResults:!1};function C(e){return(0,S.o)(B,e)}function M(e){var t=e.canonizeResults;return void 0===t?B.canonizeResults:t}function D(e,t){return(0,y.Yk)(t)?e.get(t.__ref,"__typename"):t&&t.__typename}var U=/^[_a-z][_0-9a-z]*/i;function J(e){var t=e.match(U);return t?t[0]:e}function j(e,t,r){return!!(0,O.s)(t)&&((0,E.k)(t)?t.every(function(t){return j(e,t,r)}):e.selections.every(function(e){if((0,y.My)(e)&&(0,k.LZ)(e,r)){var n=(0,y.u2)(e);return T.call(t,n)&&(!e.selectionSet||j(e.selectionSet,t[n],r))}return!0}))}function H(e){return(0,O.s)(e)&&!(0,y.Yk)(e)&&!(0,E.k)(e)}function q(){return new _.w0}function L(e,t){var r=(0,s.F)((0,w.kU)(e));return{fragmentMap:r,lookupFragment:function(e){var n=r[e];return!n&&t&&(n=t.lookup(e)),n||null}}}var F=Object.create(null),V=function(){return F},W=Object.create(null),z=function(){function e(e,t){var r=this;this.policies=e,this.group=t,this.data=Object.create(null),this.rootIds=Object.create(null),this.refs=Object.create(null),this.getFieldValue=function(e,t){return I((0,y.Yk)(e)?r.get(e.__ref,t):e&&e[t])},this.canRead=function(e){return(0,y.Yk)(e)?r.has(e.__ref):"object"==typeof e},this.toReference=function(e,t){if("string"==typeof e)return(0,y.kQ)(e);if((0,y.Yk)(e))return e;var n=r.policies.identify(e)[0];if(n){var i=(0,y.kQ)(n);return t&&r.merge(n,e),i}}}return e.prototype.toObject=function(){return(0,n.pi)({},this.data)},e.prototype.has=function(e){return void 0!==this.lookup(e,!0)},e.prototype.get=function(e,t){if(this.group.depend(e,t),T.call(this.data,e)){var r=this.data[e];if(r&&T.call(r,t))return r[t]}return"__typename"===t&&T.call(this.policies.rootTypenamesById,e)?this.policies.rootTypenamesById[e]:this instanceof Y?this.parent.get(e,t):void 0},e.prototype.lookup=function(e,t){return(t&&this.group.depend(e,"__exists"),T.call(this.data,e))?this.data[e]:this instanceof Y?this.parent.lookup(e,t):this.policies.rootTypenamesById[e]?Object.create(null):void 0},e.prototype.merge=function(e,t){var r,n=this;(0,y.Yk)(e)&&(e=e.__ref),(0,y.Yk)(t)&&(t=t.__ref);var o="string"==typeof e?this.lookup(r=e):e,a="string"==typeof t?this.lookup(r=t):t;if(a){(0,i.kG)("string"==typeof r,1);var s=new _.w0(X).merge(o,a);if(this.data[r]=s,s!==o&&(delete this.refs[r],this.group.caching)){var l=Object.create(null);o||(l.__exists=1),Object.keys(a).forEach(function(e){if(!o||o[e]!==s[e]){l[e]=1;var t=J(e);t===e||n.policies.hasKeyArgs(s.__typename,t)||(l[t]=1),void 0!==s[e]||n instanceof Y||delete s[e]}}),l.__typename&&!(o&&o.__typename)&&this.policies.rootTypenamesById[r]===s.__typename&&delete l.__typename,Object.keys(l).forEach(function(e){return n.group.dirty(r,e)})}}},e.prototype.modify=function(e,t){var r=this,o=this.lookup(e);if(o){var a=Object.create(null),s=!1,l=!0,u={DELETE:F,INVALIDATE:W,isReference:y.Yk,toReference:this.toReference,canRead:this.canRead,readField:function(t,n){return r.policies.readField("string"==typeof t?{fieldName:t,from:n||(0,y.kQ)(e)}:t,{store:r})}};if(Object.keys(o).forEach(function(d){var c=J(d),p=o[d];if(void 0!==p){var f="function"==typeof t?t:t[d]||t[c];if(f){var h=f===V?F:f(I(p),(0,n.pi)((0,n.pi)({},u),{fieldName:c,storeFieldName:d,storage:r.getStorage(e,d)}));if(h===W)r.group.dirty(e,d);else if(h===F&&(h=void 0),h!==p&&(a[d]=h,s=!0,p=h,!1!==globalThis.__DEV__)){var g=function(e){if(void 0===r.lookup(e.__ref))return!1!==globalThis.__DEV__&&i.kG.warn(2,e),!0};if((0,y.Yk)(h))g(h);else if(Array.isArray(h))for(var m=!1,v=void 0,b=0,S=h;b0){var t=--this.rootIds[e];return t||delete this.rootIds[e],t}return 0},e.prototype.getRootIdSet=function(e){return void 0===e&&(e=new Set),Object.keys(this.rootIds).forEach(e.add,e),this instanceof Y?this.parent.getRootIdSet(e):Object.keys(this.policies.rootTypenamesById).forEach(e.add,e),e},e.prototype.gc=function(){var e=this,t=this.getRootIdSet(),r=this.toObject();t.forEach(function(n){T.call(r,n)&&(Object.keys(e.findChildRefIds(n)).forEach(t.add,t),delete r[n])});var n=Object.keys(r);if(n.length){for(var i=this;i instanceof Y;)i=i.parent;n.forEach(function(e){return i.delete(e)})}return n},e.prototype.findChildRefIds=function(e){if(!T.call(this.refs,e)){var t=this.refs[e]=Object.create(null),r=this.data[e];if(!r)return t;var n=new Set([r]);n.forEach(function(e){(0,y.Yk)(e)&&(t[e.__ref]=!0),(0,O.s)(e)&&Object.keys(e).forEach(function(t){var r=e[t];(0,O.s)(r)&&n.add(r)})})}return this.refs[e]},e.prototype.makeCacheKey=function(){return this.group.keyMaker.lookupArray(arguments)},e}(),G=function(){function e(e,t){void 0===t&&(t=null),this.caching=e,this.parent=t,this.d=null,this.resetCaching()}return e.prototype.resetCaching=function(){this.d=this.caching?(0,o.dP)():null,this.keyMaker=new R.B(b.mr)},e.prototype.depend=function(e,t){if(this.d){this.d(Q(e,t));var r=J(t);r!==t&&this.d(Q(e,r)),this.parent&&this.parent.depend(e,t)}},e.prototype.dirty=function(e,t){this.d&&this.d.dirty(Q(e,t),"__exists"===t?"forget":"setDirty")},e}();function Q(e,t){return t+"#"+e}function K(e,t){$(e)&&e.group.depend(t,"__exists")}!function(e){var t=function(e){function t(t){var r=t.policies,n=t.resultCaching,i=void 0===n||n,o=t.seed,a=e.call(this,r,new G(i))||this;return a.stump=new Z(a),a.storageTrie=new R.B(b.mr),o&&a.replace(o),a}return(0,n.ZT)(t,e),t.prototype.addLayer=function(e,t){return this.stump.addLayer(e,t)},t.prototype.removeLayer=function(){return this},t.prototype.getStorage=function(){return this.storageTrie.lookupArray(arguments)},t}(e);e.Root=t}(z||(z={}));var Y=function(e){function t(t,r,n,i){var o=e.call(this,r.policies,i)||this;return o.id=t,o.parent=r,o.replay=n,o.group=i,n(o),o}return(0,n.ZT)(t,e),t.prototype.addLayer=function(e,r){return new t(e,this,r,this.group)},t.prototype.removeLayer=function(e){var t=this,r=this.parent.removeLayer(e);return e===this.id?(this.group.caching&&Object.keys(this.data).forEach(function(e){var n=t.data[e],i=r.lookup(e);i?n?n!==i&&Object.keys(n).forEach(function(r){(0,a.D)(n[r],i[r])||t.group.dirty(e,r)}):(t.group.dirty(e,"__exists"),Object.keys(i).forEach(function(r){t.group.dirty(e,r)})):t.delete(e)}),r):r===this.parent?this:r.addLayer(this.id,this.replay)},t.prototype.toObject=function(){return(0,n.pi)((0,n.pi)({},this.parent.toObject()),this.data)},t.prototype.findChildRefIds=function(t){var r=this.parent.findChildRefIds(t);return T.call(this.data,t)?(0,n.pi)((0,n.pi)({},r),e.prototype.findChildRefIds.call(this,t)):r},t.prototype.getStorage=function(){for(var e=this.parent;e.parent;)e=e.parent;return e.getStorage.apply(e,arguments)},t}(z),Z=function(e){function t(t){return e.call(this,"EntityStore.Stump",t,function(){},new G(t.group.caching,t.group))||this}return(0,n.ZT)(t,e),t.prototype.removeLayer=function(){return this},t.prototype.merge=function(e,t){return this.parent.merge(e,t)},t}(Y);function X(e,t,r){var n=e[r],i=t[r];return(0,a.D)(n,i)?n:i}function $(e){return!!(e instanceof z&&e.group.caching)}function ee(e){return(0,O.s)(e)?(0,E.k)(e)?e.slice(0):(0,n.pi)({__proto__:Object.getPrototypeOf(e)},e):e}var et=function(){function e(){this.known=new(b.sy?WeakSet:Set),this.pool=new R.B(b.mr),this.passes=new WeakMap,this.keysByJSON=new Map,this.empty=this.admit({})}return e.prototype.isKnown=function(e){return(0,O.s)(e)&&this.known.has(e)},e.prototype.pass=function(e){if((0,O.s)(e)){var t=ee(e);return this.passes.set(t,e),t}return e},e.prototype.admit=function(e){var t=this;if((0,O.s)(e)){var r=this.passes.get(e);if(r)return r;switch(Object.getPrototypeOf(e)){case Array.prototype:if(this.known.has(e))break;var n=e.map(this.admit,this),i=this.pool.lookupArray(n);return i.array||(this.known.add(i.array=n),!1!==globalThis.__DEV__&&Object.freeze(n)),i.array;case null:case Object.prototype:if(this.known.has(e))break;var o=Object.getPrototypeOf(e),a=[o],s=this.sortedKeys(e);a.push(s.json);var l=a.length;s.sorted.forEach(function(r){a.push(t.admit(e[r]))});var i=this.pool.lookupArray(a);if(!i.object){var u=i.object=Object.create(o);this.known.add(u),s.sorted.forEach(function(e,t){u[e]=a[l+t]}),!1!==globalThis.__DEV__&&Object.freeze(u)}return i.object}}return e},e.prototype.sortedKeys=function(e){var t=Object.keys(e),r=this.pool.lookupArray(t);if(!r.keys){t.sort();var n=JSON.stringify(t);(r.keys=this.keysByJSON.get(n))||this.keysByJSON.set(n,r.keys={sorted:t,json:n})}return r.keys},e}();function er(e){return[e.selectionSet,e.objectOrReference,e.context,e.context.canonizeResults]}var en=function(){function e(e){var t=this;this.knownResults=new(b.mr?WeakMap:Map),this.config=(0,S.o)(e,{addTypename:!1!==e.addTypename,canonizeResults:M(e)}),this.canon=e.canon||new et,this.executeSelectionSet=(0,o.re)(function(e){var r,i=e.context.canonizeResults,o=er(e);o[3]=!i;var a=(r=t.executeSelectionSet).peek.apply(r,o);return a?i?(0,n.pi)((0,n.pi)({},a),{result:t.canon.admit(a.result)}):a:(K(e.context.store,e.enclosingRef.__ref),t.execSelectionSetImpl(e))},{max:this.config.resultCacheMaxSize||l.Q["inMemoryCache.executeSelectionSet"]||5e4,keyArgs:er,makeCacheKey:function(e,t,r,n){if($(r.store))return r.store.makeCacheKey(e,(0,y.Yk)(t)?t.__ref:t,r.varString,n)}}),this.executeSubSelectedArray=(0,o.re)(function(e){return K(e.context.store,e.enclosingRef.__ref),t.execSubSelectedArrayImpl(e)},{max:this.config.resultCacheMaxSize||l.Q["inMemoryCache.executeSubSelectedArray"]||1e4,makeCacheKey:function(e){var t=e.field,r=e.array,n=e.context;if($(n.store))return n.store.makeCacheKey(t,r,n.varString)}})}return e.prototype.resetCanon=function(){this.canon=new et},e.prototype.diffQueryAgainstStore=function(e){var t,r=e.store,i=e.query,o=e.rootId,a=void 0===o?"ROOT_QUERY":o,s=e.variables,l=e.returnPartialData,u=void 0===l||l,d=e.canonizeResults,c=void 0===d?this.config.canonizeResults:d,f=this.config.cache.policies;s=(0,n.pi)((0,n.pi)({},(0,w.O4)((0,w.iW)(i))),s);var h=(0,y.kQ)(a),m=this.executeSelectionSet({selectionSet:(0,w.p$)(i).selectionSet,objectOrReference:h,enclosingRef:h,context:(0,n.pi)({store:r,query:i,policies:f,variables:s,varString:(0,g.B)(s),canonizeResults:c},L(i,this.config.fragments))});if(m.missing&&(t=[new p(ei(m.missing),m.missing,i,s)],!u))throw t[0];return{result:m.result,complete:!t,missing:t}},e.prototype.isFresh=function(e,t,r,n){if($(n.store)&&this.knownResults.get(e)===r){var i=this.executeSelectionSet.peek(r,t,n,this.canon.isKnown(e));if(i&&e===i.result)return!0}return!1},e.prototype.execSelectionSetImpl=function(e){var t,r=this,n=e.selectionSet,o=e.objectOrReference,a=e.enclosingRef,l=e.context;if((0,y.Yk)(o)&&!l.policies.rootTypenamesById[o.__ref]&&!l.store.has(o.__ref))return{result:this.canon.empty,missing:"Dangling reference to missing ".concat(o.__ref," object")};var u=l.variables,d=l.policies,c=l.store.getFieldValue(o,"__typename"),p=[],f=new _.w0;function g(e,r){var n;return e.missing&&(t=f.merge(t,((n={})[r]=e.missing,n))),e.result}this.config.addTypename&&"string"==typeof c&&!d.rootIdsByTypename[c]&&p.push({__typename:c});var m=new Set(n.selections);m.forEach(function(e){var n,b;if((0,k.LZ)(e,u)){if((0,y.My)(e)){var S=d.readField({fieldName:e.name.value,field:e,variables:l.variables,from:o},l),w=(0,y.u2)(e);void 0===S?h.Gw.added(e)||(t=f.merge(t,((n={})[w]="Can't find field '".concat(e.name.value,"' on ").concat((0,y.Yk)(o)?o.__ref+" object":"object "+JSON.stringify(o,null,2)),n))):(0,E.k)(S)?S=g(r.executeSubSelectedArray({field:e,array:S,enclosingRef:a,context:l}),w):e.selectionSet?null!=S&&(S=g(r.executeSelectionSet({selectionSet:e.selectionSet,objectOrReference:S,enclosingRef:(0,y.Yk)(S)?S:a,context:l}),w)):l.canonizeResults&&(S=r.canon.pass(S)),void 0!==S&&p.push(((b={})[w]=S,b))}else{var _=(0,s.hi)(e,l.lookupFragment);if(!_&&e.kind===v.h.FRAGMENT_SPREAD)throw(0,i._K)(9,e.name.value);_&&d.fragmentMatches(_,c)&&_.selectionSet.selections.forEach(m.add,m)}}});var b={result:(0,_.bw)(p),missing:t},S=l.canonizeResults?this.canon.admit(b):I(b);return S.result&&this.knownResults.set(S.result,n),S},e.prototype.execSubSelectedArrayImpl=function(e){var t,r=this,n=e.field,i=e.array,o=e.enclosingRef,a=e.context,s=new _.w0;function l(e,r){var n;return e.missing&&(t=s.merge(t,((n={})[r]=e.missing,n))),e.result}return n.selectionSet&&(i=i.filter(a.store.canRead)),i=i.map(function(e,t){return null===e?null:(0,E.k)(e)?l(r.executeSubSelectedArray({field:n,array:e,enclosingRef:o,context:a}),t):n.selectionSet?l(r.executeSelectionSet({selectionSet:n.selectionSet,objectOrReference:e,enclosingRef:(0,y.Yk)(e)?e:o,context:a}),t):(!1!==globalThis.__DEV__&&eo(a.store,n,e),e)}),{result:a.canonizeResults?this.canon.admit(i):i,missing:t}},e}();function ei(e){try{JSON.stringify(e,function(e,t){if("string"==typeof t)throw t;return t})}catch(e){return e}}function eo(e,t,r){if(!t.selectionSet){var n=new Set([r]);n.forEach(function(r){(0,O.s)(r)&&((0,i.kG)(!(0,y.Yk)(r),10,D(e,r),t.name.value),Object.values(r).forEach(n.add,n))})}}var ea=r(52618),es=r(43741),el=r(94315),eu=Object.create(null);function ed(e){var t=JSON.stringify(e);return eu[t]||(eu[t]=Object.create(null))}function ec(e){var t=ed(e);return t.keyFieldsFn||(t.keyFieldsFn=function(t,r){var n=function(e,t){return r.readField(t,e)},o=r.keyObject=ef(e,function(e){var o=em(r.storeObject,e,n);return void 0===o&&t!==r.storeObject&&T.call(t,e[0])&&(o=em(t,e,eg)),(0,i.kG)(void 0!==o,4,e.join("."),t),o});return"".concat(r.typename,":").concat(JSON.stringify(o))})}function ep(e){var t=ed(e);return t.keyArgsFn||(t.keyArgsFn=function(t,r){var n=r.field,i=r.variables,o=r.fieldName,a=JSON.stringify(ef(e,function(e){var r=e[0],o=r.charAt(0);if("@"===o){if(n&&(0,E.O)(n.directives)){var a=r.slice(1),s=n.directives.find(function(e){return e.name.value===a}),l=s&&(0,y.NC)(s,i);return l&&em(l,e.slice(1))}return}if("$"===o){var u=r.slice(1);if(i&&T.call(i,u)){var d=e.slice(0);return d[0]=u,em(i,d)}return}if(t)return em(t,e)}));return(t||"{}"!==a)&&(o+=":"+a),o})}function ef(e,t){var r=new _.w0;return eh(e).reduce(function(e,n){var i,o=t(n);if(void 0!==o){for(var a=n.length-1;a>=0;--a)(i={})[n[a]]=o,o=i;e=r.merge(e,o)}return e},Object.create(null))}function eh(e){var t=ed(e);if(!t.paths){var r=t.paths=[],n=[];e.forEach(function(t,i){(0,E.k)(t)?(eh(t).forEach(function(e){return r.push(n.concat(e))}),n.length=0):(n.push(t),(0,E.k)(e[i+1])||(r.push(n.slice(0)),n.length=0))})}return t.paths}function eg(e,t){return e[t]}function em(e,t,r){return r=r||eg,ey(t.reduce(function e(t,n){return(0,E.k)(t)?t.map(function(t){return e(t,n)}):t&&r(t,n)},e))}function ey(e){return(0,O.s)(e)?(0,E.k)(e)?e.map(ey):ef(Object.keys(e).sort(),function(t){return em(e,t)}):e}function ev(e){return void 0!==e.args?e.args:e.field?(0,y.NC)(e.field,e.variables):null}var eb=function(){},eS=function(e,t){return t.fieldName},ew=function(e,t,r){return(0,r.mergeObjects)(e,t)},e_=function(e,t){return t},ek=function(){function e(e){this.config=e,this.typePolicies=Object.create(null),this.toBeAdded=Object.create(null),this.supertypeMap=new Map,this.fuzzySubtypes=new Map,this.rootIdsByTypename=Object.create(null),this.rootTypenamesById=Object.create(null),this.usingPossibleTypes=!1,this.config=(0,n.pi)({dataIdFromObject:x},e),this.cache=this.config.cache,this.setRootTypename("Query"),this.setRootTypename("Mutation"),this.setRootTypename("Subscription"),e.possibleTypes&&this.addPossibleTypes(e.possibleTypes),e.typePolicies&&this.addTypePolicies(e.typePolicies)}return e.prototype.identify=function(e,t){var r,i,o=this,a=t&&(t.typename||(null===(r=t.storeObject)||void 0===r?void 0:r.__typename))||e.__typename;if(a===this.rootTypenamesById.ROOT_QUERY)return["ROOT_QUERY"];for(var s=t&&t.storeObject||e,l=(0,n.pi)((0,n.pi)({},t),{typename:a,storeObject:s,readField:t&&t.readField||function(){var e=eP(arguments,s);return o.readField(e,{store:o.cache.data,variables:e.variables})}}),u=a&&this.getTypePolicy(a),d=u&&u.keyFn||this.config.dataIdFromObject;d;){var c=d((0,n.pi)((0,n.pi)({},e),s),l);if((0,E.k)(c))d=ec(c);else{i=c;break}}return i=i?String(i):void 0,l.keyObject?[i,l.keyObject]:[i]},e.prototype.addTypePolicies=function(e){var t=this;Object.keys(e).forEach(function(r){var i=e[r],o=i.queryType,a=i.mutationType,s=i.subscriptionType,l=(0,n._T)(i,["queryType","mutationType","subscriptionType"]);o&&t.setRootTypename("Query",r),a&&t.setRootTypename("Mutation",r),s&&t.setRootTypename("Subscription",r),T.call(t.toBeAdded,r)?t.toBeAdded[r].push(l):t.toBeAdded[r]=[l]})},e.prototype.updateTypePolicy=function(e,t){var r=this,n=this.getTypePolicy(e),i=t.keyFields,o=t.fields;function a(e,t){e.merge="function"==typeof t?t:!0===t?ew:!1===t?e_:e.merge}a(n,t.merge),n.keyFn=!1===i?eb:(0,E.k)(i)?ec(i):"function"==typeof i?i:n.keyFn,o&&Object.keys(o).forEach(function(t){var n=r.getFieldPolicy(e,t,!0),i=o[t];if("function"==typeof i)n.read=i;else{var s=i.keyArgs,l=i.read,u=i.merge;n.keyFn=!1===s?eS:(0,E.k)(s)?ep(s):"function"==typeof s?s:n.keyFn,"function"==typeof l&&(n.read=l),a(n,u)}n.read&&n.merge&&(n.keyFn=n.keyFn||eS)})},e.prototype.setRootTypename=function(e,t){void 0===t&&(t=e);var r="ROOT_"+e.toUpperCase(),n=this.rootTypenamesById[r];t!==n&&((0,i.kG)(!n||n===e,5,e),n&&delete this.rootIdsByTypename[n],this.rootIdsByTypename[t]=r,this.rootTypenamesById[r]=t)},e.prototype.addPossibleTypes=function(e){var t=this;this.usingPossibleTypes=!0,Object.keys(e).forEach(function(r){t.getSupertypeSet(r,!0),e[r].forEach(function(e){t.getSupertypeSet(e,!0).add(r);var n=e.match(U);n&&n[0]===e||t.fuzzySubtypes.set(e,new RegExp(e))})})},e.prototype.getTypePolicy=function(e){var t=this;if(!T.call(this.typePolicies,e)){var r=this.typePolicies[e]=Object.create(null);r.fields=Object.create(null);var i=this.supertypeMap.get(e);!i&&this.fuzzySubtypes.size&&(i=this.getSupertypeSet(e,!0),this.fuzzySubtypes.forEach(function(r,n){if(r.test(e)){var o=t.supertypeMap.get(n);o&&o.forEach(function(e){return i.add(e)})}})),i&&i.size&&i.forEach(function(e){var i=t.getTypePolicy(e),o=i.fields;Object.assign(r,(0,n._T)(i,["fields"])),Object.assign(r.fields,o)})}var o=this.toBeAdded[e];return o&&o.length&&o.splice(0).forEach(function(r){t.updateTypePolicy(e,r)}),this.typePolicies[e]},e.prototype.getFieldPolicy=function(e,t,r){if(e){var n=this.getTypePolicy(e).fields;return n[t]||r&&(n[t]=Object.create(null))}},e.prototype.getSupertypeSet=function(e,t){var r=this.supertypeMap.get(e);return!r&&t&&this.supertypeMap.set(e,r=new Set),r},e.prototype.fragmentMatches=function(e,t,r,n){var o=this;if(!e.typeCondition)return!0;if(!t)return!1;var a=e.typeCondition.name.value;if(t===a)return!0;if(this.usingPossibleTypes&&this.supertypeMap.has(a))for(var s=this.getSupertypeSet(t,!0),l=[s],u=function(e){var t=o.getSupertypeSet(e,!1);t&&t.size&&0>l.indexOf(t)&&l.push(t)},d=!!(r&&this.fuzzySubtypes.size),c=!1,p=0;p1?s:t}:(o=(0,n.pi)({},a),T.call(o,"from")||(o.from=t)),!1!==globalThis.__DEV__&&void 0===o.from&&!1!==globalThis.__DEV__&&i.kG.warn(7,(0,es.v)(Array.from(e))),void 0===o.variables&&(o.variables=r),o}function eA(e){return function(t,r){if((0,E.k)(t)||(0,E.k)(r))throw(0,i._K)(8);if((0,O.s)(t)&&(0,O.s)(r)){var o=e.getFieldValue(t,"__typename"),a=e.getFieldValue(r,"__typename");if(o&&a&&o!==a)return r;if((0,y.Yk)(t)&&H(r))return e.merge(t.__ref,r),t;if(H(t)&&(0,y.Yk)(r))return e.merge(t,r.__ref),r;if(H(t)&&H(r))return(0,n.pi)((0,n.pi)({},t),r)}return r}}function eI(e,t,r){var i="".concat(t).concat(r),o=e.flavors.get(i);return o||e.flavors.set(i,o=e.clientOnly===t&&e.deferred===r?e:(0,n.pi)((0,n.pi)({},e),{clientOnly:t,deferred:r})),o}var eR=function(){function e(e,t,r){this.cache=e,this.reader=t,this.fragments=r}return e.prototype.writeToStore=function(e,t){var r=this,o=t.query,a=t.result,s=t.dataId,l=t.variables,u=t.overwrite,d=(0,w.$H)(o),c=q();l=(0,n.pi)((0,n.pi)({},(0,w.O4)(d)),l);var p=(0,n.pi)((0,n.pi)({store:e,written:Object.create(null),merge:function(e,t){return c.merge(e,t)},variables:l,varString:(0,g.B)(l)},L(o,this.fragments)),{overwrite:!!u,incomingById:new Map,clientOnly:!1,deferred:!1,flavors:new Map}),f=this.processSelectionSet({result:a||Object.create(null),dataId:s,selectionSet:d.selectionSet,mergeTree:{map:new Map},context:p});if(!(0,y.Yk)(f))throw(0,i._K)(11,a);return p.incomingById.forEach(function(t,n){var i=t.storeObject,o=t.mergeTree,a=t.fieldNodeSet,s=(0,y.kQ)(n);if(o&&o.map.size){var l=r.applyMerges(o,s,i,p);if((0,y.Yk)(l))return;i=l}if(!1!==globalThis.__DEV__&&!p.overwrite){var u=Object.create(null);a.forEach(function(e){e.selectionSet&&(u[e.name.value]=!0)});var d=function(e){return!0===u[J(e)]},c=function(e){var t=o&&o.map.get(e);return!!(t&&t.info&&t.info.merge)};Object.keys(i).forEach(function(e){d(e)&&!c(e)&&eM(s,i,e,p.store)})}e.merge(n,i)}),e.retain(f.__ref),f},e.prototype.processSelectionSet=function(e){var t=this,r=e.dataId,o=e.result,a=e.selectionSet,s=e.context,l=e.mergeTree,u=this.cache.policies,d=Object.create(null),c=r&&u.rootTypenamesById[r]||(0,y.qw)(o,a,s.fragmentMap)||r&&s.store.get(r,"__typename");"string"==typeof c&&(d.__typename=c);var p=function(){var e=eP(arguments,d,s.variables);if((0,y.Yk)(e.from)){var t=s.incomingById.get(e.from.__ref);if(t){var r=u.readField((0,n.pi)((0,n.pi)({},e),{from:t.storeObject}),s);if(void 0!==r)return r}}return u.readField(e,s)},f=new Set;this.flattenFields(a,o,s,c).forEach(function(e,r){var n,a=o[(0,y.u2)(r)];if(f.add(r),void 0!==a){var s=u.getStoreFieldName({typename:c,fieldName:r.name.value,field:r,variables:e.variables}),g=eT(l,s),m=t.processFieldValue(a,r,r.selectionSet?eI(e,!1,!1):e,g),v=void 0;r.selectionSet&&((0,y.Yk)(m)||H(m))&&(v=p("__typename",m));var b=u.getMergeFunction(c,r.name.value,v);b?g.info={field:r,typename:c,merge:b}:eB(l,s),d=e.merge(d,((n={})[s]=m,n))}else!1===globalThis.__DEV__||e.clientOnly||e.deferred||h.Gw.added(r)||u.getReadFunction(c,r.name.value)||!1===globalThis.__DEV__||i.kG.error(12,(0,y.u2)(r),o)});try{var g=u.identify(o,{typename:c,selectionSet:a,fragmentMap:s.fragmentMap,storeObject:d,readField:p}),m=g[0],v=g[1];r=r||m,v&&(d=s.merge(d,v))}catch(e){if(!r)throw e}if("string"==typeof r){var b=(0,y.kQ)(r),S=s.written[r]||(s.written[r]=[]);if(S.indexOf(a)>=0||(S.push(a),this.reader&&this.reader.isFresh(o,b,a,s)))return b;var w=s.incomingById.get(r);return w?(w.storeObject=s.merge(w.storeObject,d),w.mergeTree=eN(w.mergeTree,l),f.forEach(function(e){return w.fieldNodeSet.add(e)})):s.incomingById.set(r,{storeObject:d,mergeTree:ex(l)?void 0:l,fieldNodeSet:f}),b}return d},e.prototype.processFieldValue=function(e,t,r,n){var i=this;return t.selectionSet&&null!==e?(0,E.k)(e)?e.map(function(e,o){var a=i.processFieldValue(e,t,r,eT(n,o));return eB(n,o),a}):this.processSelectionSet({result:e,selectionSet:t.selectionSet,context:r,mergeTree:n}):!1!==globalThis.__DEV__?(0,ea.X)(e):e},e.prototype.flattenFields=function(e,t,r,n){void 0===n&&(n=(0,y.qw)(t,e,r.fragmentMap));var o=new Map,a=this.cache.policies,l=new R.B(!1);return function e(u,d){var c=l.lookup(u,d.clientOnly,d.deferred);c.visited||(c.visited=!0,u.selections.forEach(function(l){if((0,k.LZ)(l,r.variables)){var u=d.clientOnly,c=d.deferred;if(!(u&&c)&&(0,E.O)(l.directives)&&l.directives.forEach(function(e){var t=e.name.value;if("client"===t&&(u=!0),"defer"===t){var n=(0,y.NC)(e,r.variables);n&&!1===n.if||(c=!0)}}),(0,y.My)(l)){var p=o.get(l);p&&(u=u&&p.clientOnly,c=c&&p.deferred),o.set(l,eI(r,u,c))}else{var f=(0,s.hi)(l,r.lookupFragment);if(!f&&l.kind===v.h.FRAGMENT_SPREAD)throw(0,i._K)(13,l.name.value);f&&a.fragmentMatches(f,n,t,r.variables)&&e(f.selectionSet,eI(r,u,c))}}}))}(e,r),o},e.prototype.applyMerges=function(e,t,r,o,a){var s=this;if(e.map.size&&!(0,y.Yk)(r)){var l,u,d=!(0,E.k)(r)&&((0,y.Yk)(t)||H(t))?t:void 0,c=r;d&&!a&&(a=[(0,y.Yk)(d)?d.__ref:d]);var p=function(e,t){return(0,E.k)(e)?"number"==typeof t?e[t]:void 0:o.store.getFieldValue(e,String(t))};e.map.forEach(function(e,t){var r=p(d,t),n=p(c,t);if(void 0!==n){a&&a.push(t);var l=s.applyMerges(e,r,n,o,a);l!==n&&(u=u||new Map).set(t,l),a&&(0,i.kG)(a.pop()===t)}}),u&&(r=(0,E.k)(c)?c.slice(0):(0,n.pi)({},c),u.forEach(function(e,t){r[t]=e}))}return e.info?this.cache.policies.runMergeFunction(t,r,e.info,o,a&&(l=o.store).getStorage.apply(l,a)):r},e}(),eE=[];function eT(e,t){var r=e.map;return r.has(t)||r.set(t,eE.pop()||{map:new Map}),r.get(t)}function eN(e,t){if(e===t||!t||ex(t))return e;if(!e||ex(e))return t;var r=e.info&&t.info?(0,n.pi)((0,n.pi)({},e.info),t.info):e.info||t.info,i=e.map.size&&t.map.size,o={info:r,map:i?new Map:e.map.size?e.map:t.map};if(i){var a=new Set(t.map.keys());e.map.forEach(function(e,r){o.map.set(r,eN(e,t.map.get(r))),a.delete(r)}),a.forEach(function(r){o.map.set(r,eN(t.map.get(r),e.map.get(r)))})}return o}function ex(e){return!e||!(e.info||e.map.size)}function eB(e,t){var r=e.map,n=r.get(t);n&&ex(n)&&(eE.push(n),r.delete(t))}var eC=new Set;function eM(e,t,r,n){var o=function(e){var t=n.getFieldValue(e,r);return"object"==typeof t&&t},s=o(e);if(s){var l=o(t);if(!(!l||(0,y.Yk)(s)||(0,a.D)(s,l)||Object.keys(s).every(function(e){return void 0!==n.getFieldValue(l,e)}))){var u=n.getFieldValue(e,"__typename")||n.getFieldValue(t,"__typename"),d=J(r),c="".concat(u,".").concat(d);if(!eC.has(c)){eC.add(c);var p=[];(0,E.k)(s)||(0,E.k)(l)||[s,l].forEach(function(e){var t=n.getFieldValue(e,"__typename");"string"!=typeof t||p.includes(t)||p.push(t)}),!1!==globalThis.__DEV__&&i.kG.warn(14,d,u,p.length?"either ensure all objects of type "+p.join(" and ")+" have an ID or a custom merge function, or ":"",c,s,l)}}}}var eD=function(e){function t(t){void 0===t&&(t={});var r=e.call(this)||this;return r.watches=new Set,r.addTypenameTransform=new f.A(h.Gw),r.assumeImmutableResults=!0,r.makeVar=el.QS,r.txCount=0,r.config=C(t),r.addTypename=!!r.config.addTypename,r.policies=new ek({cache:r,dataIdFromObject:r.config.dataIdFromObject,possibleTypes:r.config.possibleTypes,typePolicies:r.config.typePolicies}),r.init(),r}return(0,n.ZT)(t,e),t.prototype.init=function(){var e=this.data=new z.Root({policies:this.policies,resultCaching:this.config.resultCaching});this.optimisticData=e.stump,this.resetResultCache()},t.prototype.resetResultCache=function(e){var t=this,r=this.storeReader,n=this.config.fragments;this.storeWriter=new eR(this,this.storeReader=new en({cache:this,addTypename:this.addTypename,resultCacheMaxSize:this.config.resultCacheMaxSize,canonizeResults:M(this.config),canon:e?void 0:r&&r.canon,fragments:n}),n),this.maybeBroadcastWatch=(0,o.re)(function(e,r){return t.broadcastWatch(e,r)},{max:this.config.resultCacheMaxSize||l.Q["inMemoryCache.maybeBroadcastWatch"]||5e3,makeCacheKey:function(e){var r=e.optimistic?t.optimisticData:t.data;if($(r)){var n=e.optimistic,i=e.id,o=e.variables;return r.makeCacheKey(e.query,e.callback,(0,g.B)({optimistic:n,id:i,variables:o}))}}}),new Set([this.data.group,this.optimisticData.group]).forEach(function(e){return e.resetCaching()})},t.prototype.restore=function(e){return this.init(),e&&this.data.replace(e),this},t.prototype.extract=function(e){return void 0===e&&(e=!1),(e?this.optimisticData:this.data).extract()},t.prototype.read=function(e){var t=e.returnPartialData,r=void 0!==t&&t;try{return this.storeReader.diffQueryAgainstStore((0,n.pi)((0,n.pi)({},e),{store:e.optimistic?this.optimisticData:this.data,config:this.config,returnPartialData:r})).result||null}catch(e){if(e instanceof p)return null;throw e}},t.prototype.write=function(e){try{return++this.txCount,this.storeWriter.writeToStore(this.data,e)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.modify=function(e){if(T.call(e,"id")&&!e.id)return!1;var t=e.optimistic?this.optimisticData:this.data;try{return++this.txCount,t.modify(e.id||"ROOT_QUERY",e.fields)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.diff=function(e){return this.storeReader.diffQueryAgainstStore((0,n.pi)((0,n.pi)({},e),{store:e.optimistic?this.optimisticData:this.data,rootId:e.id||"ROOT_QUERY",config:this.config}))},t.prototype.watch=function(e){var t=this;return this.watches.size||(0,el._v)(this),this.watches.add(e),e.immediate&&this.maybeBroadcastWatch(e),function(){t.watches.delete(e)&&!t.watches.size&&(0,el.li)(t),t.maybeBroadcastWatch.forget(e)}},t.prototype.gc=function(e){g.B.reset(),m.S.reset(),this.addTypenameTransform.resetCache(),null===(t=this.config.fragments)||void 0===t||t.resetCaches();var t,r=this.optimisticData.gc();return e&&!this.txCount&&(e.resetResultCache?this.resetResultCache(e.resetResultIdentities):e.resetResultIdentities&&this.storeReader.resetCanon()),r},t.prototype.retain=function(e,t){return(t?this.optimisticData:this.data).retain(e)},t.prototype.release=function(e,t){return(t?this.optimisticData:this.data).release(e)},t.prototype.identify=function(e){if((0,y.Yk)(e))return e.__ref;try{return this.policies.identify(e)[0]}catch(e){!1!==globalThis.__DEV__&&i.kG.warn(e)}},t.prototype.evict=function(e){if(!e.id){if(T.call(e,"id"))return!1;e=(0,n.pi)((0,n.pi)({},e),{id:"ROOT_QUERY"})}try{return++this.txCount,this.optimisticData.evict(e,this.data)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.reset=function(e){var t=this;return this.init(),g.B.reset(),e&&e.discardWatches?(this.watches.forEach(function(e){return t.maybeBroadcastWatch.forget(e)}),this.watches.clear(),(0,el.li)(this)):this.broadcastWatches(),Promise.resolve()},t.prototype.removeOptimistic=function(e){var t=this.optimisticData.removeLayer(e);t!==this.optimisticData&&(this.optimisticData=t,this.broadcastWatches())},t.prototype.batch=function(e){var t,r=this,i=e.update,o=e.optimistic,a=void 0===o||o,s=e.removeOptimistic,l=e.onWatchUpdated,u=function(e){var n=r,o=n.data,a=n.optimisticData;++r.txCount,e&&(r.data=r.optimisticData=e);try{return t=i(r)}finally{--r.txCount,r.data=o,r.optimisticData=a}},d=new Set;return l&&!this.txCount&&this.broadcastWatches((0,n.pi)((0,n.pi)({},e),{onWatchUpdated:function(e){return d.add(e),!1}})),"string"==typeof a?this.optimisticData=this.optimisticData.addLayer(a,u):!1===a?u(this.data):u(),"string"==typeof s&&(this.optimisticData=this.optimisticData.removeLayer(s)),l&&d.size?(this.broadcastWatches((0,n.pi)((0,n.pi)({},e),{onWatchUpdated:function(e,t){var r=l.call(this,e,t);return!1!==r&&d.delete(e),r}})),d.size&&d.forEach(function(e){return r.maybeBroadcastWatch.dirty(e)})):this.broadcastWatches(e),t},t.prototype.performTransaction=function(e,t){return this.batch({update:e,optimistic:t||null!==t})},t.prototype.transformDocument=function(e){return this.addTypenameToDocument(this.addFragmentsToDocument(e))},t.prototype.broadcastWatches=function(e){var t=this;this.txCount||this.watches.forEach(function(r){return t.maybeBroadcastWatch(r,e)})},t.prototype.addFragmentsToDocument=function(e){var t=this.config.fragments;return t?t.transform(e):e},t.prototype.addTypenameToDocument=function(e){return this.addTypename?this.addTypenameTransform.transformDocument(e):e},t.prototype.broadcastWatch=function(e,t){var r=e.lastDiff,n=this.diff(e);(!t||(e.optimistic&&"string"==typeof t.optimistic&&(n.fromOptimisticTransaction=!0),!t.onWatchUpdated||!1!==t.onWatchUpdated.call(this,e,n,r)))&&(r&&(0,a.D)(r.result,n.result)||e.callback(e.lastDiff=n,r))},t}(c);!1!==globalThis.__DEV__&&(eD.prototype.getMemoryInternals=d.q4)},94315:function(e,t,r){"use strict";r.d(t,{QS:function(){return u},_v:function(){return l},ab:function(){return i},li:function(){return s}});var n=r(64571),i=new n.g7,o=new WeakMap;function a(e){var t=o.get(e);return t||o.set(e,t={vars:new Set,dep:(0,n.dP)()}),t}function s(e){a(e).vars.forEach(function(t){return t.forgetCache(e)})}function l(e){a(e).vars.forEach(function(t){return t.attachCache(e)})}function u(e){var t=new Set,r=new Set,n=function(s){if(arguments.length>0){if(e!==s){e=s,t.forEach(function(e){a(e).dep.dirty(n),d(e)});var l=Array.from(r);r.clear(),l.forEach(function(t){return t(e)})}}else{var u=i.getValue();u&&(o(u),a(u).dep(n))}return e};n.onNextChange=function(e){return r.add(e),function(){r.delete(e)}};var o=n.attachCache=function(e){return t.add(e),a(e).vars.add(n),n};return n.forgetCache=function(e){return t.delete(e)},n}function d(e){e.broadcastWatches&&e.broadcastWatches()}},42680:function(e,t,r){"use strict";r.d(t,{f:function(){return tm}});var n,i=r(69703),o=r(71074);function a(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=s(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function s(e,t){if(e){if("string"==typeof e)return l(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return l(e,t)}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r1,i=!1,o=arguments[1],a=o;return new r(function(r){return t.subscribe({next:function(t){var o=!i;if(i=!0,!o||n)try{a=e(a,t)}catch(e){return r.error(e)}else a=t},error:function(e){r.error(e)},complete:function(){if(!i&&!n)return r.error(TypeError("Cannot reduce an empty sequence"));r.next(a),r.complete()}})})},t.concat=function(){for(var e=this,t=arguments.length,r=Array(t),n=0;n=0&&i.splice(e,1),a()}});i.push(o)},error:function(e){n.error(e)},complete:function(){a()}});function a(){o.closed&&0===i.length&&n.complete()}return function(){i.forEach(function(e){return e.unsubscribe()}),o.unsubscribe()}})},t[g]=function(){return this},e.from=function(t){var r="function"==typeof this?this:e;if(null==t)throw TypeError(t+" is not an object");var n=y(t,g);if(n){var i=n.call(t);if(Object(i)!==i)throw TypeError(i+" is not an object");return b(i)&&i.constructor===r?i:new r(function(e){return i.subscribe(e)})}if(p("iterator")&&(n=y(t,h)))return new r(function(e){w(function(){if(!e.closed){for(var r,i=a(n.call(t));!(r=i()).done;){var o=r.value;if(e.next(o),e.closed)return}e.complete()}})});if(Array.isArray(t))return new r(function(e){w(function(){if(!e.closed){for(var r=0;rt.indexOf(i))throw(0,o._K)(43,i)}return e}function C(e,t){return t?t(e):E.of()}function M(e){return"function"==typeof e?new U(e):e}function D(e){return e.request.length<=1}var U=function(){function e(e){e&&(this.request=e)}return e.empty=function(){return new e(function(){return E.of()})},e.from=function(t){return 0===t.length?e.empty():t.map(M).reduce(function(e,t){return e.concat(t)})},e.split=function(t,r,n){var i,o=M(r),a=M(n||new e(C));return Object.assign(i=new e(D(o)&&D(a)?function(e){return t(e)?o.request(e)||E.of():a.request(e)||E.of()}:function(e,r){return t(e)?o.request(e,r)||E.of():a.request(e,r)||E.of()}),{left:o,right:a})},e.execute=function(e,t){return e.request(T(t.context,x(B(t))))||E.of()},e.concat=function(t,r){var n,i=M(t);if(D(i))return!1!==globalThis.__DEV__&&o.kG.warn(35,i),i;var a=M(r);return Object.assign(n=new e(D(a)?function(e){return i.request(e,function(e){return a.request(e)||E.of()})||E.of()}:function(e,t){return i.request(e,function(e){return a.request(e,t)||E.of()})||E.of()}),{left:i,right:a})},e.prototype.split=function(t,r,n){return this.concat(e.split(t,r,n||new e(C)))},e.prototype.concat=function(t){return e.concat(this,t)},e.prototype.request=function(e,t){throw(0,o._K)(36)},e.prototype.onError=function(e,t){if(t&&t.error)return t.error(e),!1;throw e},e.prototype.setOnError=function(e){return this.onError=e,this},e}(),J=U.execute,j=r(87755),H=r(88403),q=function(e,t){var r;try{r=JSON.stringify(e)}catch(e){var n=(0,o._K)(39,t,e.message);throw n.parseError=e,n}return r},L=function(e,t){return e.getContext().uri||("function"==typeof t?t(e):t||"/graphql")},F=r(44022);function V(e){var t,r=e[Symbol.asyncIterator]();return(t={next:function(){return r.next()}})[Symbol.asyncIterator]=function(){return this},t}function W(e){var t=null,r=null,n=!1,i=[],o=[];function a(e){if(!r){if(o.length){var t=o.shift();if(Array.isArray(t)&&t[0])return t[0]({value:e,done:!1})}i.push(e)}}function s(e){r=e,o.slice().forEach(function(t){t[1](e)}),t&&t()}function l(){n=!0,o.slice().forEach(function(e){e[0]({value:void 0,done:!0})}),t&&t()}function u(){return new Promise(function(e,t){return r?t(r):i.length?e({value:i.shift(),done:!1}):n?e({value:void 0,done:!0}):void o.push([e,t])})}t=function(){t=null,e.removeListener("data",a),e.removeListener("error",s),e.removeListener("end",l),e.removeListener("finish",l),e.removeListener("close",l)},e.on("data",a),e.on("error",s),e.on("end",l),e.on("finish",l),e.on("close",l);var d={next:function(){return u()}};return F.DN&&(d[Symbol.asyncIterator]=function(){return this}),d}function z(e){var t=!1,r={next:function(){return t?Promise.resolve({value:void 0,done:!0}):(t=!0,new Promise(function(t,r){e.then(function(e){t({value:e,done:!1})}).catch(r)}))}};return F.DN&&(r[Symbol.asyncIterator]=function(){return this}),r}function G(e){var t={next:function(){return e.read()}};return F.DN&&(t[Symbol.asyncIterator]=function(){return this}),t}function Q(e){return!!e.body}function K(e){return!!e.getReader}function Y(e){return!!(F.DN&&e[Symbol.asyncIterator])}function Z(e){return!!e.stream}function X(e){return!!e.arrayBuffer}function $(e){return!!e.pipe}function ee(e){var t=e;if(Q(e)&&(t=e.body),Y(t))return V(t);if(K(t))return G(t.getReader());if(Z(t))return G(t.stream().getReader());if(X(t))return z(t.arrayBuffer());if($(t))return W(t);throw Error("Unknown body type for responseIterator. Please pass a streamable response.")}var et=function(e,t,r){var n=Error(r);throw n.name="ServerError",n.response=e,n.statusCode=e.status,n.result=t,n},er=r(25004),en=Symbol();function ei(e){return!!e.extensions&&Array.isArray(e.extensions[en])}function eo(e){return e.hasOwnProperty("graphQLErrors")}var ea=function(e){var t=(0,i.ev)((0,i.ev)((0,i.ev)([],e.graphQLErrors,!0),e.clientErrors,!0),e.protocolErrors,!0);return e.networkError&&t.push(e.networkError),t.map(function(e){return(0,er.s)(e)&&e.message||"Error message not found."}).join("\n")},es=function(e){function t(r){var n=r.graphQLErrors,i=r.protocolErrors,o=r.clientErrors,a=r.networkError,s=r.errorMessage,l=r.extraInfo,u=e.call(this,s)||this;return u.name="ApolloError",u.graphQLErrors=n||[],u.protocolErrors=i||[],u.clientErrors=o||[],u.networkError=a||null,u.message=s||ea(u),u.extraInfo=l,u.__proto__=t.prototype,u}return(0,i.ZT)(t,e),t}(Error),el=r(26406),eu=r(23505);function ed(e){return"incremental"in e}function ec(e){return"hasNext"in e&&"data"in e}function ep(e){return ed(e)||ec(e)}function ef(e){return(0,er.s)(e)&&"payload"in e}function eh(e,t){var r=e,n=new eu.w0;return ed(t)&&(0,el.O)(t.incremental)&&t.incremental.forEach(function(e){for(var t=e.data,i=e.path,o=i.length-1;o>=0;--o){var a=i[o],s=isNaN(+a)?{}:[];s[a]=t,t=s}r=n.merge(r,t)}),r}var eg=Object.prototype.hasOwnProperty;function em(e,t){var r;return(0,i.mG)(this,void 0,void 0,function(){var n,o,a,s,l,u,d,c,p,f,h,g,m,y,v,b,S,w,_,k,O,P;return(0,i.Jh)(this,function(A){switch(A.label){case 0:if(void 0===TextDecoder)throw Error("TextDecoder must be defined in the environment: please import a polyfill.");n=new TextDecoder("utf-8"),o=null===(r=e.headers)||void 0===r?void 0:r.get("content-type"),a="boundary=",s=(null==o?void 0:o.includes(a))?null==o?void 0:o.substring((null==o?void 0:o.indexOf(a))+a.length).replace(/['"]/g,"").replace(/\;(.*)/gm,"").trim():"-",l="\r\n--".concat(s),u="",d=ee(e),c=!0,A.label=1;case 1:if(!c)return[3,3];return[4,d.next()];case 2:for(f=(p=A.sent()).value,h=p.done,g="string"==typeof f?f:n.decode(f),m=u.length-l.length+1,c=!h,u+=g,y=u.indexOf(l,m);y>-1;){if(v=void 0,v=(O=[u.slice(0,y),u.slice(y+l.length)])[0],u=O[1],b=v.indexOf("\r\n\r\n"),(S=ey(v.slice(0,b))["content-type"])&&-1===S.toLowerCase().indexOf("application/json"))throw Error("Unsupported patch content type: application/json is required.");if(w=v.slice(b)){if(Object.keys(_=ev(e,w)).length>1||"data"in _||"incremental"in _||"errors"in _||"payload"in _)ef(_)?(k={},"payload"in _&&(k=(0,i.pi)({},_.payload)),"errors"in _&&(k=(0,i.pi)((0,i.pi)({},k),{extensions:(0,i.pi)((0,i.pi)({},"extensions"in k?k.extensions:null),((P={})[en]=_.errors,P))})),t(k)):t(_);else if(1===Object.keys(_).length&&"hasNext"in _&&!_.hasNext)return[2]}y=u.indexOf(l)}return[3,1];case 3:return[2]}})})}function ey(e){var t={};return e.split("\n").forEach(function(e){var r=e.indexOf(":");if(r>-1){var n=e.slice(0,r).trim().toLowerCase(),i=e.slice(r+1).trim();t[n]=i}}),t}function ev(e,t){e.status>=300&&et(e,function(){try{return JSON.parse(t)}catch(e){return t}}(),"Response not successful: Received status code ".concat(e.status));try{return JSON.parse(t)}catch(n){var r=n;throw r.name="ServerParseError",r.response=e,r.statusCode=e.status,r.bodyText=t,r}}function eb(e,t){e.result&&e.result.errors&&e.result.data&&t.next(e.result),t.error(e)}function eS(e){return function(t){return t.text().then(function(e){return ev(t,e)}).then(function(r){return Array.isArray(r)||eg.call(r,"data")||eg.call(r,"errors")||et(t,r,"Server response was missing for query '".concat(Array.isArray(e)?e.map(function(e){return e.operationName}):e.operationName,"'.")),r})}}var ew=function(e){if(!e&&"undefined"==typeof fetch)throw(0,o._K)(37)},e_=r(92298),ek={http:{includeQuery:!0,includeExtensions:!1,preserveHeaderCase:!1},headers:{accept:"*/*","content-type":"application/json"},options:{method:"POST"}},eO=function(e,t){return t(e)};function eP(e,t){for(var r=[],n=2;n0},t.prototype.tearDownQuery=function(){this.isTornDown||(this.concast&&this.observer&&(this.concast.removeObserver(this.observer),delete this.concast,delete this.observer),this.stopPolling(),this.subscriptions.forEach(function(e){return e.unsubscribe()}),this.subscriptions.clear(),this.queryManager.stopQuery(this.queryId),this.observers.clear(),this.isTornDown=!0)},t.prototype.transformDocument=function(e){return this.queryManager.transform(e)},t}(E);function e6(e){var t=e.options,r=t.fetchPolicy,n=t.nextFetchPolicy;return"cache-and-network"===r||"network-only"===r?e.reobserve({fetchPolicy:"cache-first",nextFetchPolicy:function(e,t){return(this.nextFetchPolicy=n,"function"==typeof this.nextFetchPolicy)?this.nextFetchPolicy(e,t):r}}):e.reobserve()}function e4(e){!1!==globalThis.__DEV__&&o.kG.error(23,e.message,e.stack)}function e8(e){!1!==globalThis.__DEV__&&e&&!1!==globalThis.__DEV__&&o.kG.debug(24,e)}function e5(e){return"network-only"===e||"no-cache"===e||"standby"===e}eV(e3);var e7=r(11258);function e9(e){return e.kind===e7.h.FIELD||e.kind===e7.h.FRAGMENT_SPREAD||e.kind===e7.h.INLINE_FRAGMENT}var te=r(94315),tt=function(){function e(e){var t=e.cache,r=e.client,n=e.resolvers,i=e.fragmentMatcher;this.selectionsToResolveCache=new WeakMap,this.cache=t,r&&(this.client=r),n&&this.addResolvers(n),i&&this.setFragmentMatcher(i)}return e.prototype.addResolvers=function(e){var t=this;this.resolvers=this.resolvers||{},Array.isArray(e)?e.forEach(function(e){t.resolvers=(0,eu.Ee)(t.resolvers,e)}):this.resolvers=(0,eu.Ee)(this.resolvers,e)},e.prototype.setResolvers=function(e){this.resolvers={},this.addResolvers(e)},e.prototype.getResolvers=function(){return this.resolvers||{}},e.prototype.runResolvers=function(e){var t=e.document,r=e.remoteResult,n=e.context,o=e.variables,a=e.onlyRunForcedResolvers,s=void 0!==a&&a;return(0,i.mG)(this,void 0,void 0,function(){return(0,i.Jh)(this,function(e){return t?[2,this.resolveDocument(t,r.data,n,o,this.fragmentMatcher,s).then(function(e){return(0,i.pi)((0,i.pi)({},r),{data:e.result})})]:[2,r]})})},e.prototype.setFragmentMatcher=function(e){this.fragmentMatcher=e},e.prototype.getFragmentMatcher=function(){return this.fragmentMatcher},e.prototype.clientQuery=function(e){return(0,H.FS)(["client"],e)&&this.resolvers?e:null},e.prototype.serverQuery=function(e){return(0,eN.ob)(e)},e.prototype.prepareContext=function(e){var t=this.cache;return(0,i.pi)((0,i.pi)({},e),{cache:t,getCacheKey:function(e){return t.identify(e)}})},e.prototype.addExportedVariables=function(e,t,r){return void 0===t&&(t={}),void 0===r&&(r={}),(0,i.mG)(this,void 0,void 0,function(){return(0,i.Jh)(this,function(n){return e?[2,this.resolveDocument(e,this.buildRootValueFromCache(e,t)||{},this.prepareContext(r),t).then(function(e){return(0,i.pi)((0,i.pi)({},t),e.exportedVariables)})]:[2,(0,i.pi)({},t)]})})},e.prototype.shouldForceResolvers=function(e){var t=!1;return(0,eE.Vn)(e,{Directive:{enter:function(e){if("client"===e.name.value&&e.arguments&&(t=e.arguments.some(function(e){return"always"===e.name.value&&"BooleanValue"===e.value.kind&&!0===e.value.value})))return eE.$_}}}),t},e.prototype.buildRootValueFromCache=function(e,t){return this.cache.diff({query:(0,eN.aL)(e),variables:t,returnPartialData:!0,optimistic:!1}).result},e.prototype.resolveDocument=function(e,t,r,n,o,a){return void 0===r&&(r={}),void 0===n&&(n={}),void 0===o&&(o=function(){return!0}),void 0===a&&(a=!1),(0,i.mG)(this,void 0,void 0,function(){var s,l,u,d,c,p,f,h,g,m,y;return(0,i.Jh)(this,function(v){return s=(0,N.p$)(e),l=(0,N.kU)(e),u=(0,eY.F)(l),d=this.collectSelectionsToResolve(s,u),p=(c=s.operation)?c.charAt(0).toUpperCase()+c.slice(1):"Query",f=this,h=f.cache,g=f.client,m={fragmentMap:u,context:(0,i.pi)((0,i.pi)({},r),{cache:h,client:g}),variables:n,fragmentMatcher:o,defaultOperationType:p,exportedVariables:{},selectionsToResolve:d,onlyRunForcedResolvers:a},y=!1,[2,this.resolveSelectionSet(s.selectionSet,y,t,m).then(function(e){return{result:e,exportedVariables:m.exportedVariables}})]})})},e.prototype.resolveSelectionSet=function(e,t,r,n){return(0,i.mG)(this,void 0,void 0,function(){var a,s,l,u,d,c=this;return(0,i.Jh)(this,function(p){return a=n.fragmentMap,s=n.context,l=n.variables,u=[r],d=function(e){return(0,i.mG)(c,void 0,void 0,function(){var d,c;return(0,i.Jh)(this,function(i){return(t||n.selectionsToResolve.has(e))&&(0,H.LZ)(e,l)?(0,eq.My)(e)?[2,this.resolveField(e,t,r,n).then(function(t){var r;void 0!==t&&u.push(((r={})[(0,eq.u2)(e)]=t,r))})]:((0,eq.Ao)(e)?d=e:(d=a[e.name.value],(0,o.kG)(d,18,e.name.value)),d&&d.typeCondition&&(c=d.typeCondition.name.value,n.fragmentMatcher(r,c,s)))?[2,this.resolveSelectionSet(d.selectionSet,t,r,n).then(function(e){u.push(e)})]:[2]:[2]})})},[2,Promise.all(e.selections.map(d)).then(function(){return(0,eu.bw)(u)})]})})},e.prototype.resolveField=function(e,t,r,n){return(0,i.mG)(this,void 0,void 0,function(){var o,a,s,l,u,d,c,p,f,h=this;return(0,i.Jh)(this,function(i){return r?(o=n.variables,l=(a=e.name.value)!==(s=(0,eq.u2)(e)),d=Promise.resolve(u=r[s]||r[a]),(!n.onlyRunForcedResolvers||this.shouldForceResolvers(e))&&(c=r.__typename||n.defaultOperationType,(p=this.resolvers&&this.resolvers[c])&&(f=p[l?a:s])&&(d=Promise.resolve(te.ab.withValue(this.cache,f,[r,(0,eq.NC)(e,o),n.context,{field:e,fragmentMap:n.fragmentMap}])))),[2,d.then(function(r){if(void 0===r&&(r=u),e.directives&&e.directives.forEach(function(e){"export"===e.name.value&&e.arguments&&e.arguments.forEach(function(e){"as"===e.name.value&&"StringValue"===e.value.kind&&(n.exportedVariables[e.value.value]=r)})}),!e.selectionSet||null==r)return r;var i,o,a=null!==(o=null===(i=e.directives)||void 0===i?void 0:i.some(function(e){return"client"===e.name.value}))&&void 0!==o&&o;return Array.isArray(r)?h.resolveSubSelectedArray(e,t||a,r,n):e.selectionSet?h.resolveSelectionSet(e.selectionSet,t||a,r,n):void 0})]):[2,null]})})},e.prototype.resolveSubSelectedArray=function(e,t,r,n){var i=this;return Promise.all(r.map(function(r){return null===r?null:Array.isArray(r)?i.resolveSubSelectedArray(e,t,r,n):e.selectionSet?i.resolveSelectionSet(e.selectionSet,t,r,n):void 0}))},e.prototype.collectSelectionsToResolve=function(e,t){var r=function(e){return!Array.isArray(e)},n=this.selectionsToResolveCache;function i(e){if(!n.has(e)){var a=new Set;n.set(e,a),(0,eE.Vn)(e,{Directive:function(e,t,n,i,o){"client"===e.name.value&&o.forEach(function(e){r(e)&&e9(e)&&a.add(e)})},FragmentSpread:function(e,n,s,l,u){var d=t[e.name.value];(0,o.kG)(d,19,e.name.value);var c=i(d);c.size>0&&(u.forEach(function(e){r(e)&&e9(e)&&a.add(e)}),a.add(e),c.forEach(function(e){a.add(e)}))}})}return n.get(e)}return i(e)},e}(),tr=new(F.mr?WeakMap:Map);function tn(e,t){var r=e[t];"function"==typeof r&&(e[t]=function(){return tr.set(e,(tr.get(e)+1)%1e15),r.apply(this,arguments)})}function ti(e){e.notifyTimeout&&(clearTimeout(e.notifyTimeout),e.notifyTimeout=void 0)}var to=function(){function e(e,t){void 0===t&&(t=e.generateQueryId()),this.queryId=t,this.listeners=new Set,this.document=null,this.lastRequestId=1,this.stopped=!1,this.dirty=!1,this.observableQuery=null;var r=this.cache=e.cache;tr.has(r)||(tr.set(r,0),tn(r,"evict"),tn(r,"modify"),tn(r,"reset"))}return e.prototype.init=function(e){var t=e.networkStatus||n.loading;return this.variables&&this.networkStatus!==n.loading&&!(0,eM.D)(this.variables,e.variables)&&(t=n.setVariables),(0,eM.D)(e.variables,this.variables)||(this.lastDiff=void 0),Object.assign(this,{document:e.document,variables:e.variables,networkError:null,graphQLErrors:this.graphQLErrors||[],networkStatus:t}),e.observableQuery&&this.setObservableQuery(e.observableQuery),e.lastRequestId&&(this.lastRequestId=e.lastRequestId),this},e.prototype.reset=function(){ti(this),this.dirty=!1},e.prototype.resetDiff=function(){this.lastDiff=void 0},e.prototype.getDiff=function(){var e=this.getDiffOptions();if(this.lastDiff&&(0,eM.D)(e,this.lastDiff.options))return this.lastDiff.diff;this.updateWatch(this.variables);var t=this.observableQuery;if(t&&"no-cache"===t.options.fetchPolicy)return{complete:!1};var r=this.cache.diff(e);return this.updateLastDiff(r,e),r},e.prototype.updateLastDiff=function(e,t){this.lastDiff=e?{diff:e,options:t||this.getDiffOptions()}:void 0},e.prototype.getDiffOptions=function(e){var t;return void 0===e&&(e=this.variables),{query:this.document,variables:e,returnPartialData:!0,optimistic:!0,canonizeResults:null===(t=this.observableQuery)||void 0===t?void 0:t.options.canonizeResults}},e.prototype.setDiff=function(e){var t,r=this,n=this.lastDiff&&this.lastDiff.diff;(!e||e.complete||(null===(t=this.observableQuery)||void 0===t?void 0:t.options.returnPartialData)||n&&n.complete)&&(this.updateLastDiff(e),this.dirty||(0,eM.D)(n&&n.result,e&&e.result)||(this.dirty=!0,this.notifyTimeout||(this.notifyTimeout=setTimeout(function(){return r.notify()},0))))},e.prototype.setObservableQuery=function(e){var t=this;e!==this.observableQuery&&(this.oqListener&&this.listeners.delete(this.oqListener),this.observableQuery=e,e?(e.queryInfo=this,this.listeners.add(this.oqListener=function(){t.getDiff().fromOptimisticTransaction?e.observe():e6(e)})):delete this.oqListener)},e.prototype.notify=function(){var e=this;ti(this),this.shouldNotify()&&this.listeners.forEach(function(t){return t(e)}),this.dirty=!1},e.prototype.shouldNotify=function(){if(!this.dirty||!this.listeners.size)return!1;if(eG(this.networkStatus)&&this.observableQuery){var e=this.observableQuery.options.fetchPolicy;if("cache-only"!==e&&"cache-and-network"!==e)return!1}return!0},e.prototype.stop=function(){if(!this.stopped){this.stopped=!0,this.reset(),this.cancel(),this.cancel=e.prototype.cancel;var t=this.observableQuery;t&&t.stopPolling()}},e.prototype.cancel=function(){},e.prototype.updateWatch=function(e){var t=this;void 0===e&&(e=this.variables);var r=this.observableQuery;if(!r||"no-cache"!==r.options.fetchPolicy){var n=(0,i.pi)((0,i.pi)({},this.getDiffOptions(e)),{watcher:this,callback:function(e){return t.setDiff(e)}});this.lastWatch&&(0,eM.D)(n,this.lastWatch)||(this.cancel(),this.cancel=this.cache.watch(this.lastWatch=n))}},e.prototype.resetLastWrite=function(){this.lastWrite=void 0},e.prototype.shouldWrite=function(e,t){var r=this.lastWrite;return!(r&&r.dmCount===tr.get(this.cache)&&(0,eM.D)(t,r.variables)&&(0,eM.D)(e.data,r.result.data))},e.prototype.markResult=function(e,t,r,n){var i=this,o=new eu.w0,a=(0,el.O)(e.errors)?e.errors.slice(0):[];if(this.reset(),"incremental"in e&&(0,el.O)(e.incremental)){var s=eh(this.getDiff().result,e);e.data=s}else if("hasNext"in e&&e.hasNext){var l=this.getDiff();e.data=o.merge(l.result,e.data)}this.graphQLErrors=a,"no-cache"===r.fetchPolicy?this.updateLastDiff({result:e.data,complete:!0},this.getDiffOptions(r.variables)):0!==n&&(ta(e,r.errorPolicy)?this.cache.performTransaction(function(o){if(i.shouldWrite(e,r.variables))o.writeQuery({query:t,data:e.data,variables:r.variables,overwrite:1===n}),i.lastWrite={result:e,variables:r.variables,dmCount:tr.get(i.cache)};else if(i.lastDiff&&i.lastDiff.diff.complete){e.data=i.lastDiff.diff.result;return}var a=i.getDiffOptions(r.variables),s=o.diff(a);!i.stopped&&(0,eM.D)(i.variables,r.variables)&&i.updateWatch(r.variables),i.updateLastDiff(s,a),s.complete&&(e.data=s.result)}):this.lastWrite=void 0)},e.prototype.markReady=function(){return this.networkError=null,this.networkStatus=n.ready},e.prototype.markError=function(e){return this.networkStatus=n.error,this.lastWrite=void 0,this.reset(),e.graphQLErrors&&(this.graphQLErrors=e.graphQLErrors),e.networkError&&(this.networkError=e.networkError),e},e}();function ta(e,t){void 0===t&&(t="none");var r="ignore"===t||"all"===t,n=!ej(e);return!n&&r&&e.data&&(n=!0),n}var ts=r(60430),tl=r(40997),tu=r(56596),td=Object.prototype.hasOwnProperty,tc=Object.create(null),tp=function(){function e(e){var t=e.cache,r=e.link,n=e.defaultOptions,i=e.documentTransform,o=e.queryDeduplication,a=void 0!==o&&o,s=e.onBroadcast,l=e.ssrMode,u=void 0!==l&&l,d=e.clientAwareness,c=void 0===d?{}:d,p=e.localState,f=e.assumeImmutableResults,h=void 0===f?!!t.assumeImmutableResults:f,g=e.defaultContext,m=this;this.clientAwareness={},this.queries=new Map,this.fetchCancelFns=new Map,this.transformCache=new tl.s(tu.Q["queryManager.getDocumentInfo"]||2e3),this.queryIdCounter=1,this.requestIdCounter=1,this.mutationIdCounter=1,this.inFlightLinkObservables=new ts.B(!1);var y=new eU.A(function(e){return m.cache.transformDocument(e)},{cache:!1});this.cache=t,this.link=r,this.defaultOptions=n||Object.create(null),this.queryDeduplication=a,this.clientAwareness=c,this.localState=p||new tt({cache:t}),this.ssrMode=u,this.assumeImmutableResults=h,this.documentTransform=i?y.concat(i).concat(y):y,this.defaultContext=g||Object.create(null),(this.onBroadcast=s)&&(this.mutationStore=Object.create(null))}return e.prototype.stop=function(){var e=this;this.queries.forEach(function(t,r){e.stopQueryNoBroadcast(r)}),this.cancelPendingFetches((0,o._K)(25))},e.prototype.cancelPendingFetches=function(e){this.fetchCancelFns.forEach(function(t){return t(e)}),this.fetchCancelFns.clear()},e.prototype.mutate=function(e){var t,r,n=e.mutation,a=e.variables,s=e.optimisticResponse,l=e.updateQueries,u=e.refetchQueries,d=void 0===u?[]:u,c=e.awaitRefetchQueries,p=void 0!==c&&c,f=e.update,h=e.onQueryUpdated,g=e.fetchPolicy,m=void 0===g?(null===(t=this.defaultOptions.mutate)||void 0===t?void 0:t.fetchPolicy)||"network-only":g,y=e.errorPolicy,v=void 0===y?(null===(r=this.defaultOptions.mutate)||void 0===r?void 0:r.errorPolicy)||"none":y,b=e.keepRootFields,S=e.context;return(0,i.mG)(this,void 0,void 0,function(){var e,t,r,u,c;return(0,i.Jh)(this,function(g){switch(g.label){case 0:if((0,o.kG)(n,26),(0,o.kG)("network-only"===m||"no-cache"===m,27),e=this.generateMutationId(),n=this.cache.transformForLink(this.transform(n)),t=this.getDocumentInfo(n).hasClientExports,a=this.getVariables(n,a),!t)return[3,2];return[4,this.localState.addExportedVariables(n,a,S)];case 1:a=g.sent(),g.label=2;case 2:return r=this.mutationStore&&(this.mutationStore[e]={mutation:n,variables:a,loading:!0,error:null}),u=s&&this.markMutationOptimistic(s,{mutationId:e,document:n,variables:a,fetchPolicy:m,errorPolicy:v,context:S,updateQueries:l,update:f,keepRootFields:b}),this.broadcastQueries(),c=this,[2,new Promise(function(t,o){return eJ(c.getObservableFromLink(n,(0,i.pi)((0,i.pi)({},S),{optimisticResponse:u?s:void 0}),a,!1),function(t){if(ej(t)&&"none"===v)throw new es({graphQLErrors:eH(t)});r&&(r.loading=!1,r.error=null);var o=(0,i.pi)({},t);return"function"==typeof d&&(d=d(o)),"ignore"===v&&ej(o)&&delete o.errors,c.markMutationResult({mutationId:e,result:o,document:n,variables:a,fetchPolicy:m,errorPolicy:v,context:S,update:f,updateQueries:l,awaitRefetchQueries:p,refetchQueries:d,removeOptimistic:u?e:void 0,onQueryUpdated:h,keepRootFields:b})}).subscribe({next:function(e){c.broadcastQueries(),"hasNext"in e&&!1!==e.hasNext||t(e)},error:function(t){r&&(r.loading=!1,r.error=t),u&&c.cache.removeOptimistic(e),c.broadcastQueries(),o(t instanceof es?t:new es({networkError:t}))}})})]}})})},e.prototype.markMutationResult=function(e,t){var r=this;void 0===t&&(t=this.cache);var n=e.result,o=[],a="no-cache"===e.fetchPolicy;if(!a&&ta(n,e.errorPolicy)){if(ed(n)||o.push({result:n.data,dataId:"ROOT_MUTATION",query:e.document,variables:e.variables}),ed(n)&&(0,el.O)(n.incremental)){var s=t.diff({id:"ROOT_MUTATION",query:this.getDocumentInfo(e.document).asQuery,variables:e.variables,optimistic:!1,returnPartialData:!0}),l=void 0;s.result&&(l=eh(s.result,n)),void 0!==l&&(n.data=l,o.push({result:l,dataId:"ROOT_MUTATION",query:e.document,variables:e.variables}))}var u=e.updateQueries;u&&this.queries.forEach(function(e,i){var a=e.observableQuery,s=a&&a.queryName;if(s&&td.call(u,s)){var l=u[s],d=r.queries.get(i),c=d.document,p=d.variables,f=t.diff({query:c,variables:p,returnPartialData:!0,optimistic:!1}),h=f.result;if(f.complete&&h){var g=l(h,{mutationResult:n,queryName:c&&(0,N.rY)(c)||void 0,queryVariables:p});g&&o.push({result:g,dataId:"ROOT_QUERY",query:c,variables:p})}}})}if(o.length>0||(e.refetchQueries||"").length>0||e.update||e.onQueryUpdated||e.removeOptimistic){var d=[];if(this.refetchQueries({updateCache:function(t){a||o.forEach(function(e){return t.write(e)});var s=e.update,l=!ep(n)||ed(n)&&!n.hasNext;if(s){if(!a){var u=t.diff({id:"ROOT_MUTATION",query:r.getDocumentInfo(e.document).asQuery,variables:e.variables,optimistic:!1,returnPartialData:!0});u.complete&&("incremental"in(n=(0,i.pi)((0,i.pi)({},n),{data:u.result}))&&delete n.incremental,"hasNext"in n&&delete n.hasNext)}l&&s(t,n,{context:e.context,variables:e.variables})}a||e.keepRootFields||!l||t.modify({id:"ROOT_MUTATION",fields:function(e,t){var r=t.fieldName,n=t.DELETE;return"__typename"===r?e:n}})},include:e.refetchQueries,optimistic:!1,removeOptimistic:e.removeOptimistic,onQueryUpdated:e.onQueryUpdated||null}).forEach(function(e){return d.push(e)}),e.awaitRefetchQueries||e.onQueryUpdated)return Promise.all(d).then(function(){return n})}return Promise.resolve(n)},e.prototype.markMutationOptimistic=function(e,t){var r=this,n="function"==typeof e?e(t.variables,{IGNORE:tc}):e;return n!==tc&&(this.cache.recordOptimisticTransaction(function(e){try{r.markMutationResult((0,i.pi)((0,i.pi)({},t),{result:{data:n}}),e)}catch(e){!1!==globalThis.__DEV__&&o.kG.error(e)}},t.mutationId),!0)},e.prototype.fetchQuery=function(e,t,r){return this.fetchConcastWithInfo(e,t,r).concast.promise},e.prototype.getQueryStore=function(){var e=Object.create(null);return this.queries.forEach(function(t,r){e[r]={variables:t.variables,networkStatus:t.networkStatus,networkError:t.networkError,graphQLErrors:t.graphQLErrors}}),e},e.prototype.resetErrors=function(e){var t=this.queries.get(e);t&&(t.networkError=void 0,t.graphQLErrors=[])},e.prototype.transform=function(e){return this.documentTransform.transformDocument(e)},e.prototype.getDocumentInfo=function(e){var t=this.transformCache;if(!t.has(e)){var r={hasClientExports:(0,H.mj)(e),hasForcedResolvers:this.localState.shouldForceResolvers(e),hasNonreactiveDirective:(0,H.FS)(["nonreactive"],e),clientQuery:this.localState.clientQuery(e),serverQuery:(0,eN.bi)([{name:"client",remove:!0},{name:"connection"},{name:"nonreactive"}],e),defaultVars:(0,N.O4)((0,N.$H)(e)),asQuery:(0,i.pi)((0,i.pi)({},e),{definitions:e.definitions.map(function(e){return"OperationDefinition"===e.kind&&"query"!==e.operation?(0,i.pi)((0,i.pi)({},e),{operation:"query"}):e})})};t.set(e,r)}return t.get(e)},e.prototype.getVariables=function(e,t){return(0,i.pi)((0,i.pi)({},this.getDocumentInfo(e).defaultVars),t)},e.prototype.watchQuery=function(e){var t=this.transform(e.query);void 0===(e=(0,i.pi)((0,i.pi)({},e),{variables:this.getVariables(t,e.variables)})).notifyOnNetworkStatusChange&&(e.notifyOnNetworkStatusChange=!1);var r=new to(this),n=new e3({queryManager:this,queryInfo:r,options:e});return n.lastQuery=t,this.queries.set(n.queryId,r),r.init({document:t,observableQuery:n,variables:n.variables}),n},e.prototype.query=function(e,t){var r=this;return void 0===t&&(t=this.generateQueryId()),(0,o.kG)(e.query,28),(0,o.kG)("Document"===e.query.kind,29),(0,o.kG)(!e.returnPartialData,30),(0,o.kG)(!e.pollInterval,31),this.fetchQuery(t,(0,i.pi)((0,i.pi)({},e),{query:this.transform(e.query)})).finally(function(){return r.stopQuery(t)})},e.prototype.generateQueryId=function(){return String(this.queryIdCounter++)},e.prototype.generateRequestId=function(){return this.requestIdCounter++},e.prototype.generateMutationId=function(){return String(this.mutationIdCounter++)},e.prototype.stopQueryInStore=function(e){this.stopQueryInStoreNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryInStoreNoBroadcast=function(e){var t=this.queries.get(e);t&&t.stop()},e.prototype.clearStore=function(e){return void 0===e&&(e={discardWatches:!0}),this.cancelPendingFetches((0,o._K)(32)),this.queries.forEach(function(e){e.observableQuery?e.networkStatus=n.loading:e.stop()}),this.mutationStore&&(this.mutationStore=Object.create(null)),this.cache.reset(e)},e.prototype.getObservableQueries=function(e){var t=this;void 0===e&&(e="active");var r=new Map,n=new Map,a=new Set;return Array.isArray(e)&&e.forEach(function(e){"string"==typeof e?n.set(e,!1):(0,eq.JW)(e)?n.set(t.transform(e),!1):(0,er.s)(e)&&e.query&&a.add(e)}),this.queries.forEach(function(t,i){var o=t.observableQuery,a=t.document;if(o){if("all"===e){r.set(i,o);return}var s=o.queryName;if("standby"===o.options.fetchPolicy||"active"===e&&!o.hasObservers())return;("active"===e||s&&n.has(s)||a&&n.has(a))&&(r.set(i,o),s&&n.set(s,!0),a&&n.set(a,!0))}}),a.size&&a.forEach(function(e){var n=(0,eL.X)("legacyOneTimeQuery"),a=t.getQuery(n).init({document:e.query,variables:e.variables}),s=new e3({queryManager:t,queryInfo:a,options:(0,i.pi)((0,i.pi)({},e),{fetchPolicy:"network-only"})});(0,o.kG)(s.queryId===n),a.setObservableQuery(s),r.set(n,s)}),!1!==globalThis.__DEV__&&n.size&&n.forEach(function(e,t){e||!1===globalThis.__DEV__||o.kG.warn("string"==typeof t?33:34,t)}),r},e.prototype.reFetchObservableQueries=function(e){var t=this;void 0===e&&(e=!1);var r=[];return this.getObservableQueries(e?"all":"active").forEach(function(n,i){var o=n.options.fetchPolicy;n.resetLastResults(),(e||"standby"!==o&&"cache-only"!==o)&&r.push(n.refetch()),t.getQuery(i).setDiff(null)}),this.broadcastQueries(),Promise.all(r)},e.prototype.setObservableQuery=function(e){this.getQuery(e.queryId).setObservableQuery(e)},e.prototype.startGraphQLSubscription=function(e){var t=this,r=e.query,n=e.fetchPolicy,i=e.errorPolicy,o=void 0===i?"none":i,a=e.variables,s=e.context,l=void 0===s?{}:s;r=this.transform(r),a=this.getVariables(r,a);var u=function(e){return t.getObservableFromLink(r,l,e).map(function(i){"no-cache"!==n&&(ta(i,o)&&t.cache.write({query:r,result:i.data,dataId:"ROOT_SUBSCRIPTION",variables:e}),t.broadcastQueries());var a=ej(i),s=ei(i);if(a||s){var l={};if(a&&(l.graphQLErrors=i.errors),s&&(l.protocolErrors=i.extensions[en]),"none"===o||s)throw new es(l)}return"ignore"===o&&delete i.errors,i})};if(this.getDocumentInfo(r).hasClientExports){var d=this.localState.addExportedVariables(r,a,l).then(u);return new E(function(e){var t=null;return d.then(function(r){return t=r.subscribe(e)},e.error),function(){return t&&t.unsubscribe()}})}return u(a)},e.prototype.stopQuery=function(e){this.stopQueryNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryNoBroadcast=function(e){this.stopQueryInStoreNoBroadcast(e),this.removeQuery(e)},e.prototype.removeQuery=function(e){this.fetchCancelFns.delete(e),this.queries.has(e)&&(this.getQuery(e).stop(),this.queries.delete(e))},e.prototype.broadcastQueries=function(){this.onBroadcast&&this.onBroadcast(),this.queries.forEach(function(e){return e.notify()})},e.prototype.getLocalState=function(){return this.localState},e.prototype.getObservableFromLink=function(e,t,r,n){var o,a,s=this;void 0===n&&(n=null!==(o=null==t?void 0:t.queryDeduplication)&&void 0!==o?o:this.queryDeduplication);var l=this.getDocumentInfo(e),u=l.serverQuery,d=l.clientQuery;if(u){var c=this,p=c.inFlightLinkObservables,f=c.link,h={query:u,variables:r,operationName:(0,N.rY)(u)||void 0,context:this.prepareContext((0,i.pi)((0,i.pi)({},t),{forceFetch:!n}))};if(t=h.context,n){var g=(0,e_.S)(u),m=(0,eD.B)(r),y=p.lookup(g,m);if(!(a=y.observable)){var v=new ez([J(f,h)]);a=y.observable=v,v.beforeNext(function(){p.remove(g,m)})}}else a=new ez([J(f,h)])}else a=new ez([E.of({data:{}})]),t=this.prepareContext(t);return d&&(a=eJ(a,function(e){return s.localState.runResolvers({document:d,remoteResult:e,context:t,variables:r})})),a},e.prototype.getResultsFromLink=function(e,t,r){var i=e.lastRequestId=this.generateRequestId(),o=this.cache.transformForLink(r.query);return eJ(this.getObservableFromLink(o,r.context,r.variables),function(a){var s=eH(a),l=s.length>0;if(i>=e.lastRequestId){if(l&&"none"===r.errorPolicy)throw e.markError(new es({graphQLErrors:s}));e.markResult(a,o,r,t),e.markReady()}var u={data:a.data,loading:!1,networkStatus:n.ready};return l&&"ignore"!==r.errorPolicy&&(u.errors=s,u.networkStatus=n.error),u},function(t){var r=eo(t)?t:new es({networkError:t});throw i>=e.lastRequestId&&e.markError(r),r})},e.prototype.fetchConcastWithInfo=function(e,t,r,i){var o,a,s=this;void 0===r&&(r=n.loading),void 0===i&&(i=t.query);var l=this.getVariables(i,t.variables),u=this.getQuery(e),d=this.defaultOptions.watchQuery,c=t.fetchPolicy,p=void 0===c?d&&d.fetchPolicy||"cache-first":c,f=t.errorPolicy,h=void 0===f?d&&d.errorPolicy||"none":f,g=t.returnPartialData,m=void 0!==g&&g,y=t.notifyOnNetworkStatusChange,v=void 0!==y&&y,b=t.context,S=Object.assign({},t,{query:i,variables:l,fetchPolicy:p,errorPolicy:h,returnPartialData:m,notifyOnNetworkStatusChange:v,context:void 0===b?{}:b}),w=function(e){S.variables=e;var n=s.fetchQueryByPolicy(u,S,r);return"standby"!==S.fetchPolicy&&n.sources.length>0&&u.observableQuery&&u.observableQuery.applyNextFetchPolicy("after-fetch",t),n},_=function(){return s.fetchCancelFns.delete(e)};if(this.fetchCancelFns.set(e,function(e){_(),setTimeout(function(){return o.cancel(e)})}),this.getDocumentInfo(S.query).hasClientExports)o=new ez(this.localState.addExportedVariables(S.query,S.variables,S.context).then(w).then(function(e){return e.sources})),a=!0;else{var k=w(S.variables);a=k.fromLink,o=new ez(k.sources)}return o.promise.then(_,_),{concast:o,fromLink:a}},e.prototype.refetchQueries=function(e){var t=this,r=e.updateCache,n=e.include,i=e.optimistic,o=void 0!==i&&i,a=e.removeOptimistic,s=void 0===a?o?(0,eL.X)("refetchQueries"):void 0:a,l=e.onQueryUpdated,u=new Map;n&&this.getObservableQueries(n).forEach(function(e,r){u.set(r,{oq:e,lastDiff:t.getQuery(r).getDiff()})});var d=new Map;return r&&this.cache.batch({update:r,optimistic:o&&s||!1,removeOptimistic:s,onWatchUpdated:function(e,t,r){var n=e.watcher instanceof to&&e.watcher.observableQuery;if(n){if(l){u.delete(n.queryId);var i=l(n,t,r);return!0===i&&(i=n.refetch()),!1!==i&&d.set(n,i),i}null!==l&&u.set(n.queryId,{oq:n,lastDiff:r,diff:t})}}}),u.size&&u.forEach(function(e,r){var n,i=e.oq,o=e.lastDiff,a=e.diff;if(l){if(!a){var s=i.queryInfo;s.reset(),a=s.getDiff()}n=l(i,a,o)}l&&!0!==n||(n=i.refetch()),!1!==n&&d.set(i,n),r.indexOf("legacyOneTimeQuery")>=0&&t.stopQueryNoBroadcast(r)}),s&&this.cache.removeOptimistic(s),d},e.prototype.fetchQueryByPolicy=function(e,t,r){var o=this,a=t.query,s=t.variables,l=t.fetchPolicy,u=t.refetchWritePolicy,d=t.errorPolicy,c=t.returnPartialData,p=t.context,f=t.notifyOnNetworkStatusChange,h=e.networkStatus;e.init({document:a,variables:s,networkStatus:r});var g=function(){return e.getDiff()},m=function(t,r){void 0===r&&(r=e.networkStatus||n.loading);var l=t.result;!1===globalThis.__DEV__||c||(0,eM.D)(l,{})||e8(t.missing);var u=function(e){return E.of((0,i.pi)({data:e,loading:eG(r),networkStatus:r},t.complete?null:{partial:!0}))};return l&&o.getDocumentInfo(a).hasForcedResolvers?o.localState.runResolvers({document:a,remoteResult:{data:l},context:p,variables:s,onlyRunForcedResolvers:!0}).then(function(e){return u(e.data||void 0)}):"none"===d&&r===n.refetch&&Array.isArray(t.missing)?u(void 0):u(l)},y="no-cache"===l?0:r===n.refetch&&"merge"!==u?1:2,v=function(){return o.getResultsFromLink(e,y,{query:a,variables:s,context:p,fetchPolicy:l,errorPolicy:d})},b=f&&"number"==typeof h&&h!==r&&eG(r);switch(l){default:case"cache-first":var S=g();if(S.complete)return{fromLink:!1,sources:[m(S,e.markReady())]};if(c||b)return{fromLink:!0,sources:[m(S),v()]};return{fromLink:!0,sources:[v()]};case"cache-and-network":var S=g();if(S.complete||c||b)return{fromLink:!0,sources:[m(S),v()]};return{fromLink:!0,sources:[v()]};case"cache-only":return{fromLink:!1,sources:[m(g(),e.markReady())]};case"network-only":if(b)return{fromLink:!0,sources:[m(g()),v()]};return{fromLink:!0,sources:[v()]};case"no-cache":if(b)return{fromLink:!0,sources:[m(e.getDiff()),v()]};return{fromLink:!0,sources:[v()]};case"standby":return{fromLink:!1,sources:[]}}},e.prototype.getQuery=function(e){return e&&!this.queries.has(e)&&this.queries.set(e,new to(this,e)),this.queries.get(e)},e.prototype.prepareContext=function(e){void 0===e&&(e={});var t=this.localState.prepareContext(e);return(0,i.pi)((0,i.pi)((0,i.pi)({},this.defaultContext),t),{clientAwareness:this.clientAwareness})},e}();function tf(e,t){return(0,eQ.o)(e,t,t.variables&&{variables:(0,eQ.o)((0,i.pi)((0,i.pi)({},e&&e.variables),t.variables))})}var th=r(22681),tg=!1,tm=function(){function e(e){var t=this;if(this.resetStoreCallbacks=[],this.clearStoreCallbacks=[],!e.cache)throw(0,o._K)(15);var r=e.uri,n=e.credentials,i=e.headers,a=e.cache,s=e.documentTransform,l=e.ssrMode,u=void 0!==l&&l,d=e.ssrForceFetchDelay,c=void 0===d?0:d,p=e.connectToDevTools,f=void 0===p?!window.__APOLLO_CLIENT__&&!1!==globalThis.__DEV__:p,h=e.queryDeduplication,g=void 0===h||h,m=e.defaultOptions,y=e.defaultContext,v=e.assumeImmutableResults,b=void 0===v?a.assumeImmutableResults:v,S=e.resolvers,w=e.typeDefs,_=e.fragmentMatcher,k=e.name,O=e.version,P=e.link;P||(P=r?new eC({uri:r,credentials:n,headers:i}):U.empty()),this.link=P,this.cache=a,this.disableNetworkFetches=u||c>0,this.queryDeduplication=g,this.defaultOptions=m||Object.create(null),this.typeDefs=w,c&&setTimeout(function(){return t.disableNetworkFetches=!1},c),this.watchQuery=this.watchQuery.bind(this),this.query=this.query.bind(this),this.mutate=this.mutate.bind(this),this.resetStore=this.resetStore.bind(this),this.reFetchObservableQueries=this.reFetchObservableQueries.bind(this),this.version=j.i,this.localState=new tt({cache:a,client:this,resolvers:S,fragmentMatcher:_}),this.queryManager=new tp({cache:this.cache,link:this.link,defaultOptions:this.defaultOptions,defaultContext:y,documentTransform:s,queryDeduplication:g,ssrMode:u,clientAwareness:{name:k,version:O},localState:this.localState,assumeImmutableResults:b,onBroadcast:f?function(){t.devToolsHookCb&&t.devToolsHookCb({action:{},state:{queries:t.queryManager.getQueryStore(),mutations:t.queryManager.mutationStore||{}},dataWithOptimisticResults:t.cache.extract(!0)})}:void 0}),f&&this.connectToDevTools()}return e.prototype.connectToDevTools=function(){var e=window,t=Symbol.for("apollo.devtools");(e[t]=e[t]||[]).push(this),e.__APOLLO_CLIENT__=this,tg||!1===globalThis.__DEV__||(tg=!0,setTimeout(function(){if(window.document&&window.top===window.self&&!window.__APOLLO_DEVTOOLS_GLOBAL_HOOK__){var e=window.navigator,t=e&&e.userAgent,r=void 0;"string"==typeof t&&(t.indexOf("Chrome/")>-1?r="https://chrome.google.com/webstore/detail/apollo-client-developer-t/jdkknkkbebbapilgoeccciglkfbmbnfm":t.indexOf("Firefox/")>-1&&(r="https://addons.mozilla.org/en-US/firefox/addon/apollo-developer-tools/")),r&&!1!==globalThis.__DEV__&&o.kG.log("Download the Apollo DevTools for a better development experience: %s",r)}},1e4))},Object.defineProperty(e.prototype,"documentTransform",{get:function(){return this.queryManager.documentTransform},enumerable:!1,configurable:!0}),e.prototype.stop=function(){this.queryManager.stop()},e.prototype.watchQuery=function(e){return this.defaultOptions.watchQuery&&(e=tf(this.defaultOptions.watchQuery,e)),this.disableNetworkFetches&&("network-only"===e.fetchPolicy||"cache-and-network"===e.fetchPolicy)&&(e=(0,i.pi)((0,i.pi)({},e),{fetchPolicy:"cache-first"})),this.queryManager.watchQuery(e)},e.prototype.query=function(e){return this.defaultOptions.query&&(e=tf(this.defaultOptions.query,e)),(0,o.kG)("cache-and-network"!==e.fetchPolicy,16),this.disableNetworkFetches&&"network-only"===e.fetchPolicy&&(e=(0,i.pi)((0,i.pi)({},e),{fetchPolicy:"cache-first"})),this.queryManager.query(e)},e.prototype.mutate=function(e){return this.defaultOptions.mutate&&(e=tf(this.defaultOptions.mutate,e)),this.queryManager.mutate(e)},e.prototype.subscribe=function(e){return this.queryManager.startGraphQLSubscription(e)},e.prototype.readQuery=function(e,t){return void 0===t&&(t=!1),this.cache.readQuery(e,t)},e.prototype.readFragment=function(e,t){return void 0===t&&(t=!1),this.cache.readFragment(e,t)},e.prototype.writeQuery=function(e){var t=this.cache.writeQuery(e);return!1!==e.broadcast&&this.queryManager.broadcastQueries(),t},e.prototype.writeFragment=function(e){var t=this.cache.writeFragment(e);return!1!==e.broadcast&&this.queryManager.broadcastQueries(),t},e.prototype.__actionHookForDevTools=function(e){this.devToolsHookCb=e},e.prototype.__requestRaw=function(e){return J(this.link,e)},e.prototype.resetStore=function(){var e=this;return Promise.resolve().then(function(){return e.queryManager.clearStore({discardWatches:!1})}).then(function(){return Promise.all(e.resetStoreCallbacks.map(function(e){return e()}))}).then(function(){return e.reFetchObservableQueries()})},e.prototype.clearStore=function(){var e=this;return Promise.resolve().then(function(){return e.queryManager.clearStore({discardWatches:!0})}).then(function(){return Promise.all(e.clearStoreCallbacks.map(function(e){return e()}))})},e.prototype.onResetStore=function(e){var t=this;return this.resetStoreCallbacks.push(e),function(){t.resetStoreCallbacks=t.resetStoreCallbacks.filter(function(t){return t!==e})}},e.prototype.onClearStore=function(e){var t=this;return this.clearStoreCallbacks.push(e),function(){t.clearStoreCallbacks=t.clearStoreCallbacks.filter(function(t){return t!==e})}},e.prototype.reFetchObservableQueries=function(e){return this.queryManager.reFetchObservableQueries(e)},e.prototype.refetchQueries=function(e){var t=this.queryManager.refetchQueries(e),r=[],n=[];t.forEach(function(e,t){r.push(t),n.push(e)});var i=Promise.all(n);return i.queries=r,i.results=n,i.catch(function(e){!1!==globalThis.__DEV__&&o.kG.debug(17,e)}),i},e.prototype.getObservableQueries=function(e){return void 0===e&&(e="active"),this.queryManager.getObservableQueries(e)},e.prototype.extract=function(e){return this.cache.extract(e)},e.prototype.restore=function(e){return this.cache.restore(e)},e.prototype.addResolvers=function(e){this.localState.addResolvers(e)},e.prototype.setResolvers=function(e){this.localState.setResolvers(e)},e.prototype.getResolvers=function(){return this.localState.getResolvers()},e.prototype.setLocalStateFragmentMatcher=function(e){this.localState.setFragmentMatcher(e)},e.prototype.setLink=function(e){this.link=this.queryManager.link=e},Object.defineProperty(e.prototype,"defaultContext",{get:function(){return this.queryManager.defaultContext},enumerable:!1,configurable:!0}),e}();!1!==globalThis.__DEV__&&(tm.prototype.getMemoryInternals=th.su)},40997:function(e,t,r){"use strict";r.d(t,{L:function(){return l},s:function(){return s}});var n=r(89933),i=r(78390),o=new WeakSet;function a(e){o.has(e)||(o.add(e),setTimeout(function(){e.clean(),o.delete(e)},100))}var s=function(e,t){var r=new n.k(e,t);return r.set=function(e,t){return a(this),n.k.prototype.set.call(this,e,t)},r},l=function(e,t){var r=new i.e(e,t);return r.set=function(e,t){return a(this),i.e.prototype.set.call(this,e,t)},r}},22681:function(e,t,r){"use strict";r.d(t,{Kb:function(){return u},q4:function(){return l},su:function(){return s},zP:function(){return a}});var n=r(69703),i=r(56596),o={};function a(e,t){o[e]=t}var s=!1!==globalThis.__DEV__?c:void 0,l=!1!==globalThis.__DEV__?f:void 0,u=!1!==globalThis.__DEV__?p:void 0;function d(){return Object.fromEntries(Object.entries({parser:1e3,canonicalStringify:1e3,print:2e3,"documentTransform.cache":2e3,"queryManager.getDocumentInfo":2e3,"PersistedQueryLink.persistedQueryHashes":2e3,"fragmentRegistry.transform":2e3,"fragmentRegistry.lookup":1e3,"fragmentRegistry.findFragmentSpreads":4e3,"cache.fragmentQueryDocuments":1e3,"removeTypenameFromVariables.getVariableDefinitions":2e3,"inMemoryCache.maybeBroadcastWatch":5e3,"inMemoryCache.executeSelectionSet":5e4,"inMemoryCache.executeSubSelectedArray":1e4}).map(function(e){var t=e[0],r=e[1];return[t,i.Q[t]||r]}))}function c(){var e,t,r,i,a;if(!(!1!==globalThis.__DEV__))throw Error("only supported in development mode");return{limits:d(),sizes:(0,n.pi)({print:null===(e=o.print)||void 0===e?void 0:e.call(o),parser:null===(t=o.parser)||void 0===t?void 0:t.call(o),canonicalStringify:null===(r=o.canonicalStringify)||void 0===r?void 0:r.call(o),links:b(this.link),queryManager:{getDocumentInfo:this.queryManager.transformCache.size,documentTransforms:y(this.queryManager.documentTransform)}},null===(a=(i=this.cache).getMemoryInternals)||void 0===a?void 0:a.call(i))}}function p(){return{cache:{fragmentQueryDocuments:g(this.getFragmentDoc)}}}function f(){var e=this.config.fragments;return(0,n.pi)((0,n.pi)({},p.apply(this)),{addTypenameDocumentTransform:y(this.addTypenameTransform),inMemoryCache:{executeSelectionSet:g(this.storeReader.executeSelectionSet),executeSubSelectedArray:g(this.storeReader.executeSubSelectedArray),maybeBroadcastWatch:g(this.maybeBroadcastWatch)},fragmentRegistry:{findFragmentSpreads:g(null==e?void 0:e.findFragmentSpreads),lookup:g(null==e?void 0:e.lookup),transform:g(null==e?void 0:e.transform)}})}function h(e){return!!e&&"dirtyKey"in e}function g(e){return h(e)?e.size:void 0}function m(e){return null!=e}function y(e){return v(e).map(function(e){return{cache:e}})}function v(e){return e?(0,n.ev)((0,n.ev)([g(null==e?void 0:e.performWork)],v(null==e?void 0:e.left),!0),v(null==e?void 0:e.right),!0).filter(m):[]}function b(e){var t;return e?(0,n.ev)((0,n.ev)([null===(t=null==e?void 0:e.getMemoryInternals)||void 0===t?void 0:t.call(e)],b(null==e?void 0:e.left),!0),b(null==e?void 0:e.right),!0).filter(m):[]}},56596:function(e,t,r){"use strict";r.d(t,{Q:function(){return a}});var n=r(69703),i=r(71074),o=Symbol.for("apollo.cacheSize"),a=(0,n.pi)({},i.CO[o])},26406:function(e,t,r){"use strict";r.d(t,{O:function(){return i},k:function(){return n}});var n=Array.isArray;function i(e){return Array.isArray(e)&&e.length>0}},44022:function(e,t,r){"use strict";r.d(t,{DN:function(){return s},aS:function(){return a},mr:function(){return i},sy:function(){return o}});var n=r(71074),i="function"==typeof WeakMap&&!(0,n.wY)(function(){return"ReactNative"==navigator.product&&!global.HermesInternal}),o="function"==typeof WeakSet,a="function"==typeof Symbol&&"function"==typeof Symbol.for,s=a&&Symbol.asyncIterator;(0,n.wY)(function(){return window.document.createElement}),(0,n.wY)(function(){return navigator.userAgent.indexOf("jsdom")>=0})},29446:function(e,t,r){"use strict";r.d(t,{B:function(){return s}});var n,i=r(40997),o=r(56596),a=r(22681),s=Object.assign(function(e){return JSON.stringify(e,l)},{reset:function(){n=new i.L(o.Q.canonicalStringify||1e3)}});function l(e,t){if(t&&"object"==typeof t){var r=Object.getPrototypeOf(t);if(r===Object.prototype||null===r){var i=Object.keys(t);if(i.every(u))return t;var o=JSON.stringify(i),a=n.get(o);if(!a){i.sort();var s=JSON.stringify(i);a=n.get(s)||i,n.set(o,a),n.set(s,a)}var l=Object.create(r);return a.forEach(function(e){l[e]=t[e]}),l}}return t}function u(e,t,r){return 0===t||r[t-1]<=e}!1!==globalThis.__DEV__&&(0,a.zP)("canonicalStringify",function(){return n.size}),s.reset()},52618:function(e,t,r){"use strict";r.d(t,{X:function(){return i}});var n=Object.prototype.toString;function i(e){return o(e)}function o(e,t){switch(n.call(e)){case"[object Array]":if((t=t||new Map).has(e))return t.get(e);var r=e.slice(0);return t.set(e,r),r.forEach(function(e,n){r[n]=o(e,t)}),r;case"[object Object]":if((t=t||new Map).has(e))return t.get(e);var i=Object.create(Object.getPrototypeOf(e));return t.set(e,i),Object.keys(e).forEach(function(r){i[r]=o(e[r],t)}),i;default:return e}}},6291:function(e,t,r){"use strict";function n(){for(var e=[],t=0;t1)for(var n=new u,i=1;i")}},71074:function(e,t,r){"use strict";r.d(t,{CO:function(){return h},kG:function(){return y},wY:function(){return f},_K:function(){return v}});var n=r(69703),i="Invariant Violation",o=Object.setPrototypeOf,a=void 0===o?function(e,t){return e.__proto__=t,e}:o,s=function(e){function t(r){void 0===r&&(r=i);var n=e.call(this,"number"==typeof r?i+": "+r+" (see https://github.com/apollographql/invariant-packages)":r)||this;return n.framesToPop=1,n.name=i,a(n,t.prototype),n}return(0,n.ZT)(t,e),t}(Error);function l(e,t){if(!e)throw new s(t)}var u=["debug","log","warn","error","silent"],d=u.indexOf("log");function c(e){return function(){if(u.indexOf(e)>=d)return(console[e]||console.log).apply(console,arguments)}}!function(e){e.debug=c("debug"),e.log=c("log"),e.warn=c("warn"),e.error=c("error")}(l||(l={}));var p=r(87755);function f(e){try{return e()}catch(e){}}var h=f(function(){return globalThis})||f(function(){return window})||f(function(){return self})||f(function(){return global})||f(function(){return f.constructor("return this")()}),g=r(43741);function m(e){return function(t){for(var r=[],n=1;ne.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>f(e.definitions,"\n\n")},OperationDefinition:{leave(e){let t=g("(",f(e.variableDefinitions,", "),")"),r=f([e.operation,f([e.name,t]),f(e.directives," ")]," ");return("query"===r?"":r+" ")+e.selectionSet}},VariableDefinition:{leave:e=>{let{variable:t,type:r,defaultValue:n,directives:i}=e;return t+": "+r+g(" = ",n)+g(" ",f(i," "))}},SelectionSet:{leave:e=>{let{selections:t}=e;return h(t)}},Field:{leave(e){let{alias:t,name:r,arguments:n,directives:i,selectionSet:o}=e,a=g("",t,": ")+r,s=a+g("(",f(n,", "),")");return s.length>c&&(s=a+g("(\n",m(f(n,"\n")),"\n)")),f([s,f(i," "),o]," ")}},Argument:{leave:e=>{let{name:t,value:r}=e;return t+": "+r}},FragmentSpread:{leave:e=>{let{name:t,directives:r}=e;return"..."+t+g(" ",f(r," "))}},InlineFragment:{leave:e=>{let{typeCondition:t,directives:r,selectionSet:n}=e;return f(["...",g("on ",t),f(r," "),n]," ")}},FragmentDefinition:{leave:e=>{let{name:t,typeCondition:r,variableDefinitions:n,directives:i,selectionSet:o}=e;return"fragment ".concat(t).concat(g("(",f(n,", "),")")," ")+"on ".concat(r," ").concat(g("",f(i," ")," "))+o}},IntValue:{leave:e=>{let{value:t}=e;return t}},FloatValue:{leave:e=>{let{value:t}=e;return t}},StringValue:{leave:e=>{let{value:t,block:r}=e;return r?(0,i.LZ)(t):o(t)}},BooleanValue:{leave:e=>{let{value:t}=e;return t?"true":"false"}},NullValue:{leave:()=>"null"},EnumValue:{leave:e=>{let{value:t}=e;return t}},ListValue:{leave:e=>{let{values:t}=e;return"["+f(t,", ")+"]"}},ObjectValue:{leave:e=>{let{fields:t}=e;return"{"+f(t,", ")+"}"}},ObjectField:{leave:e=>{let{name:t,value:r}=e;return t+": "+r}},Directive:{leave:e=>{let{name:t,arguments:r}=e;return"@"+t+g("(",f(r,", "),")")}},NamedType:{leave:e=>{let{name:t}=e;return t}},ListType:{leave:e=>{let{type:t}=e;return"["+t+"]"}},NonNullType:{leave:e=>{let{type:t}=e;return t+"!"}},SchemaDefinition:{leave:e=>{let{description:t,directives:r,operationTypes:n}=e;return g("",t,"\n")+f(["schema",f(r," "),h(n)]," ")}},OperationTypeDefinition:{leave:e=>{let{operation:t,type:r}=e;return t+": "+r}},ScalarTypeDefinition:{leave:e=>{let{description:t,name:r,directives:n}=e;return g("",t,"\n")+f(["scalar",r,f(n," ")]," ")}},ObjectTypeDefinition:{leave:e=>{let{description:t,name:r,interfaces:n,directives:i,fields:o}=e;return g("",t,"\n")+f(["type",r,g("implements ",f(n," & ")),f(i," "),h(o)]," ")}},FieldDefinition:{leave:e=>{let{description:t,name:r,arguments:n,type:i,directives:o}=e;return g("",t,"\n")+r+(y(n)?g("(\n",m(f(n,"\n")),"\n)"):g("(",f(n,", "),")"))+": "+i+g(" ",f(o," "))}},InputValueDefinition:{leave:e=>{let{description:t,name:r,type:n,defaultValue:i,directives:o}=e;return g("",t,"\n")+f([r+": "+n,g("= ",i),f(o," ")]," ")}},InterfaceTypeDefinition:{leave:e=>{let{description:t,name:r,interfaces:n,directives:i,fields:o}=e;return g("",t,"\n")+f(["interface",r,g("implements ",f(n," & ")),f(i," "),h(o)]," ")}},UnionTypeDefinition:{leave:e=>{let{description:t,name:r,directives:n,types:i}=e;return g("",t,"\n")+f(["union",r,f(n," "),g("= ",f(i," | "))]," ")}},EnumTypeDefinition:{leave:e=>{let{description:t,name:r,directives:n,values:i}=e;return g("",t,"\n")+f(["enum",r,f(n," "),h(i)]," ")}},EnumValueDefinition:{leave:e=>{let{description:t,name:r,directives:n}=e;return g("",t,"\n")+f([r,f(n," ")]," ")}},InputObjectTypeDefinition:{leave:e=>{let{description:t,name:r,directives:n,fields:i}=e;return g("",t,"\n")+f(["input",r,f(n," "),h(i)]," ")}},DirectiveDefinition:{leave:e=>{let{description:t,name:r,arguments:n,repeatable:i,locations:o}=e;return g("",t,"\n")+"directive @"+r+(y(n)?g("(\n",m(f(n,"\n")),"\n)"):g("(",f(n,", "),")"))+(i?" repeatable":"")+" on "+f(o," | ")}},SchemaExtension:{leave:e=>{let{directives:t,operationTypes:r}=e;return f(["extend schema",f(t," "),h(r)]," ")}},ScalarTypeExtension:{leave:e=>{let{name:t,directives:r}=e;return f(["extend scalar",t,f(r," ")]," ")}},ObjectTypeExtension:{leave:e=>{let{name:t,interfaces:r,directives:n,fields:i}=e;return f(["extend type",t,g("implements ",f(r," & ")),f(n," "),h(i)]," ")}},InterfaceTypeExtension:{leave:e=>{let{name:t,interfaces:r,directives:n,fields:i}=e;return f(["extend interface",t,g("implements ",f(r," & ")),f(n," "),h(i)]," ")}},UnionTypeExtension:{leave:e=>{let{name:t,directives:r,types:n}=e;return f(["extend union",t,f(r," "),g("= ",f(n," | "))]," ")}},EnumTypeExtension:{leave:e=>{let{name:t,directives:r,values:n}=e;return f(["extend enum",t,f(r," "),h(n)]," ")}},InputObjectTypeExtension:{leave:e=>{let{name:t,directives:r,fields:n}=e;return f(["extend input",t,f(r," "),h(n)]," ")}}};function f(e){var t;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return null!==(t=null==e?void 0:e.filter(e=>e).join(r))&&void 0!==t?t:""}function h(e){return g("{\n",m(f(e,"\n")),"\n}")}function g(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return null!=t&&""!==t?e+t+r:""}function m(e){return g(" ",e.replace(/\n/g,"\n "))}function y(e){var t;return null!==(t=null==e?void 0:e.some(e=>e.includes("\n")))&&void 0!==t&&t}var v=r(40997),b=r(56596),S=r(22681),w=Object.assign(function(e){var t=n.get(e);return t||(t=d(e),n.set(e,t)),t},{reset:function(){n=new v.s(b.Q.print||2e3)}});w.reset(),!1!==globalThis.__DEV__&&(0,S.zP)("print",function(){return n?n.size:0})},9774:function(e,t,r){"use strict";r.d(t,{Ao:function(){return R},JW:function(){return u},My:function(){return I},NC:function(){return O},PT:function(){return k},Yk:function(){return l},kQ:function(){return s},qw:function(){return A},u2:function(){return P},vb:function(){return b},vf:function(){return S}});var n=r(71074),i=r(25004),o=r(77362),a=r(29446);function s(e){return{__ref:String(e)}}function l(e){return!!(e&&"object"==typeof e&&"string"==typeof e.__ref)}function u(e){return(0,i.s)(e)&&"Document"===e.kind&&Array.isArray(e.definitions)}function d(e){return"StringValue"===e.kind}function c(e){return"BooleanValue"===e.kind}function p(e){return"IntValue"===e.kind}function f(e){return"FloatValue"===e.kind}function h(e){return"Variable"===e.kind}function g(e){return"ObjectValue"===e.kind}function m(e){return"ListValue"===e.kind}function y(e){return"EnumValue"===e.kind}function v(e){return"NullValue"===e.kind}function b(e,t,r,i){if(p(r)||f(r))e[t.value]=Number(r.value);else if(c(r)||d(r))e[t.value]=r.value;else if(g(r)){var o={};r.fields.map(function(e){return b(o,e.name,e.value,i)}),e[t.value]=o}else if(h(r)){var a=(i||{})[r.name.value];e[t.value]=a}else if(m(r))e[t.value]=r.values.map(function(e){var r={};return b(r,t,e,i),r[t.value]});else if(y(r))e[t.value]=r.value;else if(v(r))e[t.value]=null;else throw(0,n._K)(82,t.value,r.kind)}function S(e,t){var r=null;e.directives&&(r={},e.directives.forEach(function(e){r[e.name.value]={},e.arguments&&e.arguments.forEach(function(n){var i=n.name,o=n.value;return b(r[e.name.value],i,o,t)})}));var n=null;return e.arguments&&e.arguments.length&&(n={},e.arguments.forEach(function(e){var r=e.name,i=e.value;return b(n,r,i,t)})),k(e.name.value,n,r)}var w=["connection","include","skip","client","rest","export","nonreactive"],_=a.B,k=Object.assign(function(e,t,r){if(t&&r&&r.connection&&r.connection.key){if(!r.connection.filter||!(r.connection.filter.length>0))return r.connection.key;var n=r.connection.filter?r.connection.filter:[];n.sort();var i={};return n.forEach(function(e){i[e]=t[e]}),"".concat(r.connection.key,"(").concat(_(i),")")}var o=e;if(t){var a=_(t);o+="(".concat(a,")")}return r&&Object.keys(r).forEach(function(e){-1===w.indexOf(e)&&(r[e]&&Object.keys(r[e]).length?o+="@".concat(e,"(").concat(_(r[e]),")"):o+="@".concat(e))}),o},{setStringify:function(e){var t=_;return _=e,t}});function O(e,t){if(e.arguments&&e.arguments.length){var r={};return e.arguments.forEach(function(e){return b(r,e.name,e.value,t)}),r}return null}function P(e){return e.alias?e.alias.value:e.name.value}function A(e,t,r){for(var n,i=0,a=t.selections;i=0;--p)t.definitions[p].kind===o.h.OPERATION_DEFINITION&&++c;var m=h(e),y=function(e){return(0,d.O)(e)&&e.map(m).some(function(e){return e&&e.remove})},v=new Map,b=!1,S={enter:function(e){if(y(e.directives))return b=!0,null}},w=(0,a.Vn)(t,{Field:S,InlineFragment:S,VariableDefinition:{enter:function(){return!1}},Variable:{enter:function(e,t,r,n,i){var o=u(i);o&&o.variables.add(e.name.value)}},FragmentSpread:{enter:function(e,t,r,n,i){if(y(e.directives))return b=!0,null;var o=u(i);o&&o.fragmentSpreads.add(e.name.value)}},FragmentDefinition:{enter:function(e,t,r,n){v.set(JSON.stringify(n),e)},leave:function(e,t,r,n){return e===v.get(JSON.stringify(n))?e:c>0&&e.selectionSet.selections.every(function(e){return e.kind===o.h.FIELD&&"__typename"===e.name.value})?(l(e.name.value).removed=!0,b=!0,null):void 0}},Directive:{leave:function(e){if(m(e))return b=!0,null}}});if(!b)return t;var _=function(e){return e.transitiveVars||(e.transitiveVars=new Set(e.variables),e.removed||e.fragmentSpreads.forEach(function(t){_(l(t)).transitiveVars.forEach(function(t){e.transitiveVars.add(t)})})),e},k=new Set;w.definitions.forEach(function(e){e.kind===o.h.OPERATION_DEFINITION?_(r(e.name&&e.name.value)).fragmentSpreads.forEach(function(e){k.add(e)}):e.kind!==o.h.FRAGMENT_DEFINITION||0!==c||l(e.name.value).removed||k.add(e.name.value)}),k.forEach(function(e){_(l(e)).fragmentSpreads.forEach(function(e){k.add(e)})});var O=function(e){return!!(!k.has(e)||l(e).removed)},P={enter:function(e){if(O(e.name.value))return null}};return f((0,a.Vn)(w,{FragmentSpread:P,FragmentDefinition:P,OperationDefinition:{leave:function(e){if(e.variableDefinitions){var t=_(r(e.name&&e.name.value)).transitiveVars;if(t.size{let{validator:t}=e;return t(a)}))?void 0:r.classGroupId}var f=/^\[(.+)\]$/;function h(e){if(f.test(e)){let t=f.exec(e)[1],r=null==t?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}}function g(e){let{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return b(Object.entries(e.classGroups),r).forEach(e=>{let[r,i]=e;m(i,n,r,t)}),n}function m(e,t,r,n){e.forEach(e=>{if("string"==typeof e){(""===e?t:y(t,e)).classGroupId=r;return}if("function"==typeof e){if(v(e)){m(e(n),t,r,n);return}t.validators.push({validator:e,classGroupId:r});return}Object.entries(e).forEach(e=>{let[i,o]=e;m(o,y(t,i),r,n)})})}function y(e,t){let r=e;return t.split(d).forEach(e=>{r.nextPart.has(e)||r.nextPart.set(e,{nextPart:new Map,validators:[]}),r=r.nextPart.get(e)}),r}function v(e){return e.isThemeGetter}function b(e,t){return t?e.map(e=>{let[r,n]=e;return[r,n.map(e=>"string"==typeof e?t+e:"object"==typeof e?Object.fromEntries(Object.entries(e).map(e=>{let[r,n]=e;return[t+r,n]})):e)]}):e}function S(e){if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,r=new Map,n=new Map;function i(i,o){r.set(i,o),++t>e&&(t=0,n=r,r=new Map)}return{get(e){let t=r.get(e);return void 0!==t?t:void 0!==(t=n.get(e))?(i(e,t),t):void 0},set(e,t){r.has(e)?r.set(e,t):i(e,t)}}}var w="!";function _(e){let t=e.separator,r=1===t.length,n=t[0],i=t.length;return function(e){let o;let a=[],s=0,l=0;for(let u=0;ul?o-l:void 0}}}function k(e){if(e.length<=1)return e;let t=[],r=[];return e.forEach(e=>{"["===e[0]?(t.push(...r.sort(),e),r=[]):r.push(e)}),t.push(...r.sort()),t}function O(e){return(0,s.ih)({cache:S(e.cacheSize),splitModifiers:_(e)},c(e))}var P=/\s+/;function A(e,t){let{splitModifiers:r,getClassGroupId:n,getConflictingClassGroupIds:i}=t,o=new Set;return e.trim().split(P).map(e=>{let{modifiers:t,hasImportantModifier:i,baseClassName:o,maybePostfixModifierPosition:a}=r(e),s=n(a?o.substring(0,a):o),l=!!a;if(!s){if(!a||!(s=n(o)))return{isTailwindClass:!1,originalClassName:e};l=!1}let u=k(t).join(":");return{isTailwindClass:!0,modifierId:i?u+w:u,classGroupId:s,originalClassName:e,hasPostfixModifier:l}}).reverse().filter(e=>{if(!e.isTailwindClass)return!0;let{modifierId:t,classGroupId:r,hasPostfixModifier:n}=e,a=t+r;return!o.has(a)&&(o.add(a),i(r,n).forEach(e=>o.add(t+e)),!0)}).reverse().map(e=>e.originalClassName).join(" ")}function I(){let e,t,r=0,n="";for(;r1?i-1:0),a=1;at(e),e()))).cache.get,n=t.cache.set,s=u,u(i)}function u(e){let i=r(e);if(i)return i;let o=A(e,t);return n(e,o),o}return function(){return s(I.apply(null,arguments))}}function T(e){let t=t=>t[e]||[];return t.isThemeGetter=!0,t}var N=/^\[(?:([a-z-]+):)?(.+)\]$/i,x=/^\d+\/\d+$/,B=new Set(["px","full","screen"]),C=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,M=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,D=/^-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,U=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function J(e){return H(e)||B.has(e)||x.test(e)}function j(e){return $(e,"length",ee)}function H(e){return!!e&&!Number.isNaN(Number(e))}function q(e){return $(e,"number",H)}function L(e){return!!e&&Number.isInteger(Number(e))}function F(e){return e.endsWith("%")&&H(e.slice(0,-1))}function V(e){return N.test(e)}function W(e){return C.test(e)}var z=new Set(["length","size","percentage"]);function G(e){return $(e,z,et)}function Q(e){return $(e,"position",et)}var K=new Set(["image","url"]);function Y(e){return $(e,K,en)}function Z(e){return $(e,"",er)}function X(){return!0}function $(e,t,r){let n=N.exec(e);return!!n&&(n[1]?"string"==typeof t?n[1]===t:t.has(n[1]):r(n[2]))}function ee(e){return M.test(e)}function et(){return!1}function er(e){return D.test(e)}function en(e){return U.test(e)}var ei=E(function(){let e=T("colors"),t=T("spacing"),r=T("blur"),n=T("brightness"),i=T("borderColor"),o=T("borderRadius"),a=T("borderSpacing"),s=T("borderWidth"),l=T("contrast"),u=T("grayscale"),d=T("hueRotate"),c=T("invert"),p=T("gap"),f=T("gradientColorStops"),h=T("gradientColorStopPositions"),g=T("inset"),m=T("margin"),y=T("opacity"),v=T("padding"),b=T("saturate"),S=T("scale"),w=T("sepia"),_=T("skew"),k=T("space"),O=T("translate"),P=()=>["auto","contain","none"],A=()=>["auto","hidden","clip","visible","scroll"],I=()=>["auto",V,t],R=()=>[V,t],E=()=>["",J,j],N=()=>["auto",H,V],x=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],B=()=>["solid","dashed","dotted","double","none"],C=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter"],M=()=>["start","end","center","between","around","evenly","stretch"],D=()=>["","0",V],U=()=>["auto","avoid","all","avoid-page","page","left","right","column"],z=()=>[H,q],K=()=>[H,V];return{cacheSize:500,separator:":",theme:{colors:[X],spacing:[J,j],blur:["none","",W,V],brightness:z(),borderColor:[e],borderRadius:["none","","full",W,V],borderSpacing:R(),borderWidth:E(),contrast:z(),grayscale:D(),hueRotate:K(),invert:D(),gap:R(),gradientColorStops:[e],gradientColorStopPositions:[F,j],inset:I(),margin:I(),opacity:z(),padding:R(),saturate:z(),scale:z(),sepia:D(),skew:K(),space:R(),translate:R()},classGroups:{aspect:[{aspect:["auto","square","video",V]}],container:["container"],columns:[{columns:[W]}],"break-after":[{"break-after":U()}],"break-before":[{"break-before":U()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none"]}],clear:[{clear:["left","right","both","none"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...x(),V]}],overflow:[{overflow:A()}],"overflow-x":[{"overflow-x":A()}],"overflow-y":[{"overflow-y":A()}],overscroll:[{overscroll:P()}],"overscroll-x":[{"overscroll-x":P()}],"overscroll-y":[{"overscroll-y":P()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",L,V]}],basis:[{basis:I()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",V]}],grow:[{grow:D()}],shrink:[{shrink:D()}],order:[{order:["first","last","none",L,V]}],"grid-cols":[{"grid-cols":[X]}],"col-start-end":[{col:["auto",{span:["full",L,V]},V]}],"col-start":[{"col-start":N()}],"col-end":[{"col-end":N()}],"grid-rows":[{"grid-rows":[X]}],"row-start-end":[{row:["auto",{span:[L,V]},V]}],"row-start":[{"row-start":N()}],"row-end":[{"row-end":N()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",V]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",V]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal",...M()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...M(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...M(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],m:[{m:[m]}],mx:[{mx:[m]}],my:[{my:[m]}],ms:[{ms:[m]}],me:[{me:[m]}],mt:[{mt:[m]}],mr:[{mr:[m]}],mb:[{mb:[m]}],ml:[{ml:[m]}],"space-x":[{"space-x":[k]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[k]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit",V,t]}],"min-w":[{"min-w":["min","max","fit",V,J]}],"max-w":[{"max-w":["0","none","full","min","max","fit","prose",{screen:[W]},W,V]}],h:[{h:[V,t,"auto","min","max","fit"]}],"min-h":[{"min-h":["min","max","fit",J,V]}],"max-h":[{"max-h":[V,t,"min","max","fit"]}],"font-size":[{text:["base",W,j]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",q]}],"font-family":[{font:[X]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",V]}],"line-clamp":[{"line-clamp":["none",H,q]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",J,V]}],"list-image":[{"list-image":["none",V]}],"list-style-type":[{list:["none","disc","decimal",V]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...B(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",J,j]}],"underline-offset":[{"underline-offset":["auto",J,V]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],indent:[{indent:R()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",V]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",V]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...x(),Q]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",G]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Y]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[h]}],"gradient-via-pos":[{via:[h]}],"gradient-to-pos":[{to:[h]}],"gradient-from":[{from:[f]}],"gradient-via":[{via:[f]}],"gradient-to":[{to:[f]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:[...B(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}],"divide-style":[{divide:B()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...B()]}],"outline-offset":[{"outline-offset":[J,V]}],"outline-w":[{outline:[J,j]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:E()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[J,j]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",W,Z]}],"shadow-color":[{shadow:[X]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":C()}],"bg-blend":[{"bg-blend":C()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",W,V]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[c]}],saturate:[{saturate:[b]}],sepia:[{sepia:[w]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[c]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[b]}],"backdrop-sepia":[{"backdrop-sepia":[w]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",V]}],duration:[{duration:K()}],ease:[{ease:["linear","in","out","in-out",V]}],delay:[{delay:K()}],animate:[{animate:["none","spin","ping","pulse","bounce",V]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[L,V]}],"translate-x":[{"translate-x":[O]}],"translate-y":[{"translate-y":[O]}],"skew-x":[{"skew-x":[_]}],"skew-y":[{"skew-y":[_]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",V]}],accent:[{accent:["auto",e]}],appearance:["appearance-none"],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",V]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":R()}],"scroll-mx":[{"scroll-mx":R()}],"scroll-my":[{"scroll-my":R()}],"scroll-ms":[{"scroll-ms":R()}],"scroll-me":[{"scroll-me":R()}],"scroll-mt":[{"scroll-mt":R()}],"scroll-mr":[{"scroll-mr":R()}],"scroll-mb":[{"scroll-mb":R()}],"scroll-ml":[{"scroll-ml":R()}],"scroll-p":[{"scroll-p":R()}],"scroll-px":[{"scroll-px":R()}],"scroll-py":[{"scroll-py":R()}],"scroll-ps":[{"scroll-ps":R()}],"scroll-pe":[{"scroll-pe":R()}],"scroll-pt":[{"scroll-pt":R()}],"scroll-pr":[{"scroll-pr":R()}],"scroll-pb":[{"scroll-pb":R()}],"scroll-pl":[{"scroll-pl":R()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",V]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[J,j,q]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}});function eo(){for(var e=arguments.length,t=Array(e),r=0;r{var r=e,{className:n,children:i}=r,o=(0,s.S0)(r,["className","children"]);return(0,ea.jsxs)("div",(0,s.EZ)((0,s.ih)({className:eo("ui-flex ui-p-4 ui-justify-center ui-items-center ui-fixed ui-inset-0 ui-h-screen ui-w-screen ui-z-[999]",n),ref:t},o),{children:[(0,ea.jsx)("div",{className:"ui-absolute ui-z-[999] ui-inset-0 ui-bg-modal-overlay ui-blur-md ui-bg-no-repeat ui-bg-cover ui-bg-center ui-bg-fixed ui-opacity-70"}),i]}))}).displayName="ModalAnchor";var el=()=>(0,ea.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"3rem",height:"3rem",viewBox:"0 0 100 100",preserveAspectRatio:"xMidYMid",children:(0,ea.jsx)("circle",{cx:"50",cy:"50",fill:"none",stroke:"currentColor",strokeWidth:"8",r:"35",strokeDasharray:"164.93361431346415 56.97787143782138",children:(0,ea.jsx)("animateTransform",{attributeName:"transform",type:"rotate",repeatCount:"indefinite",dur:"1.25s",values:"0 50 50;360 50 50",keyTimes:"0;1"})})}),eu=r(59115),ed=e=>{let{className:t}=e;return(0,ea.jsxs)("svg",{width:"160",height:"104",viewBox:"0 0 160 104",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:eo("ui-h-28 ui-w-40",t),children:[(0,ea.jsx)("rect",{width:"159.467",height:"104",rx:"12",fill:"white",fillOpacity:"0.2"}),(0,ea.jsx)("rect",{x:"0.5",y:"0.5",width:"158.467",height:"103",rx:"11.5",stroke:"white",strokeOpacity:"0.4"}),(0,ea.jsx)("circle",{cx:"12.1334",cy:"6.93203",r:"2.6",fill:"white",fillOpacity:"0.4"}),(0,ea.jsx)("circle",{cx:"22.5333",cy:"6.93203",r:"2.6",fill:"white",fillOpacity:"0.4"}),(0,ea.jsx)("circle",{cx:"32.9333",cy:"6.93203",r:"2.6",fill:"white",fillOpacity:"0.4"}),(0,ea.jsx)("line",{y1:"12.5",x2:"159.467",y2:"12.5",stroke:"white",strokeOpacity:"0.4"})]})},ec=r(14749);function ep(e,t){let{checkForDefaultPrevented:r=!0}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function(n){if(null==e||e(n),!1===r||!n.defaultPrevented)return null==t?void 0:t(n)}}function ef(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function eh(){for(var e=arguments.length,t=Array(e),r=0;rt.forEach(t=>ef(t,e))}function eg(){for(var e=arguments.length,t=Array(e),r=0;rn,Object.values(n));return(0,o.createElement)(r.Provider,{value:i},t)}function i(n){let i=(0,o.useContext)(r);if(i)return i;if(void 0!==t)return t;throw Error("`".concat(n,"` must be used within `").concat(e,"`"))}return n.displayName=e+"Provider",[n,i]}function ey(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=[];function n(t,n){let i=(0,o.createContext)(n),a=r.length;function s(t){let{scope:r,children:n,...s}=t,l=(null==r?void 0:r[e][a])||i,u=(0,o.useMemo)(()=>s,Object.values(s));return(0,o.createElement)(l.Provider,{value:u},n)}function l(r,s){let l=(null==s?void 0:s[e][a])||i,u=(0,o.useContext)(l);if(u)return u;if(void 0!==n)return n;throw Error("`".concat(r,"` must be used within `").concat(t,"`"))}return r=[...r,n],s.displayName=t+"Provider",[s,l]}let i=()=>{let t=r.map(e=>(0,o.createContext)(e));return function(r){let n=(null==r?void 0:r[e])||t;return(0,o.useMemo)(()=>({["__scope".concat(e)]:{...r,[e]:n}}),[r,n])}};return i.scopeName=e,[n,ev(i,...t)]}function ev(){for(var e=arguments.length,t=Array(e),r=0;r{let e=t.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(t){let r=e.reduce((e,r)=>{let{useScope:n,scopeName:i}=r,o=n(t)["__scope".concat(i)];return{...e,...o}},{});return(0,o.useMemo)(()=>({["__scope".concat(n.scopeName)]:r}),[r])}};return i.scopeName=n.scopeName,i}let eb=(null==globalThis?void 0:globalThis.document)?o.useLayoutEffect:()=>{},eS=a["useId".toString()]||(()=>void 0),ew=0;function e_(e){let[t,r]=o.useState(eS());return eb(()=>{e||r(e=>null!=e?e:String(ew++))},[e]),e||(t?"radix-".concat(t):"")}function ek(e){let t=(0,o.useRef)(e);return(0,o.useEffect)(()=>{t.current=e}),(0,o.useMemo)(()=>function(){for(var e,r=arguments.length,n=Array(r),i=0;i{}}=e,[i,a]=eP({defaultProp:r,onChange:n}),s=void 0!==t,l=s?t:i,u=ek(n);return[l,(0,o.useCallback)(e=>{if(s){let r=e,n="function"==typeof e?r(t):e;n!==t&&u(n)}else a(e)},[s,t,a,u])]}function eP(e){let{defaultProp:t,onChange:r}=e,n=(0,o.useState)(t),[i]=n,a=(0,o.useRef)(i),s=ek(r);return(0,o.useEffect)(()=>{a.current!==i&&(s(i),a.current=i)},[i,a,s]),n}var eA=r(89542);let eI=(0,o.forwardRef)((e,t)=>{let{children:r,...n}=e,i=o.Children.toArray(r),a=i.find(eT);if(a){let e=a.props.children,r=i.map(t=>t!==a?t:o.Children.count(e)>1?o.Children.only(null):(0,o.isValidElement)(e)?e.props.children:null);return(0,o.createElement)(eR,(0,ec.Z)({},n,{ref:t}),(0,o.isValidElement)(e)?(0,o.cloneElement)(e,void 0,r):null)}return(0,o.createElement)(eR,(0,ec.Z)({},n,{ref:t}),r)});eI.displayName="Slot";let eR=(0,o.forwardRef)((e,t)=>{let{children:r,...n}=e;return(0,o.isValidElement)(r)?(0,o.cloneElement)(r,{...eN(n,r.props),ref:t?eh(t,r.ref):r.ref}):o.Children.count(r)>1?o.Children.only(null):null});eR.displayName="SlotClone";let eE=e=>{let{children:t}=e;return(0,o.createElement)(o.Fragment,null,t)};function eT(e){return(0,o.isValidElement)(e)&&e.type===eE}function eN(e,t){let r={...t};for(let n in t){let i=e[n],o=t[n];/^on[A-Z]/.test(n)?i&&o?r[n]=function(){for(var e=arguments.length,t=Array(e),r=0;r{let r=(0,o.forwardRef)((e,r)=>{let{asChild:n,...i}=e,a=n?eI:t;return(0,o.useEffect)(()=>{window[Symbol.for("radix-ui")]=!0},[]),(0,o.createElement)(a,(0,ec.Z)({},i,{ref:r}))});return r.displayName="Primitive.".concat(t),{...e,[t]:r}},{});function eB(e,t){e&&(0,eA.flushSync)(()=>e.dispatchEvent(t))}function eC(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null==globalThis?void 0:globalThis.document,r=ek(e);(0,o.useEffect)(()=>{let e=e=>{"Escape"===e.key&&r(e)};return t.addEventListener("keydown",e),()=>t.removeEventListener("keydown",e)},[r,t])}let eM="dismissableLayer.update",eD="dismissableLayer.pointerDownOutside",eU="dismissableLayer.focusOutside",eJ=(0,o.createContext)({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ej=(0,o.forwardRef)((e,t)=>{var r;let{disableOutsidePointerEvents:i=!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:l,onInteractOutside:u,onDismiss:d,...c}=e,p=(0,o.useContext)(eJ),[f,h]=(0,o.useState)(null),g=null!==(r=null==f?void 0:f.ownerDocument)&&void 0!==r?r:null==globalThis?void 0:globalThis.document,[,m]=(0,o.useState)({}),y=eg(t,e=>h(e)),v=Array.from(p.layers),[b]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),S=v.indexOf(b),w=f?v.indexOf(f):-1,_=p.layersWithOutsidePointerEventsDisabled.size>0,k=w>=S,O=eH(e=>{let t=e.target,r=[...p.branches].some(e=>e.contains(t));!k||r||(null==s||s(e),null==u||u(e),e.defaultPrevented||null==d||d())},g),P=eq(e=>{let t=e.target;[...p.branches].some(e=>e.contains(t))||(null==l||l(e),null==u||u(e),e.defaultPrevented||null==d||d())},g);return eC(e=>{w!==p.layers.size-1||(null==a||a(e),!e.defaultPrevented&&d&&(e.preventDefault(),d()))},g),(0,o.useEffect)(()=>{if(f)return i&&(0===p.layersWithOutsidePointerEventsDisabled.size&&(n=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(f)),p.layers.add(f),eL(),()=>{i&&1===p.layersWithOutsidePointerEventsDisabled.size&&(g.body.style.pointerEvents=n)}},[f,g,i,p]),(0,o.useEffect)(()=>()=>{f&&(p.layers.delete(f),p.layersWithOutsidePointerEventsDisabled.delete(f),eL())},[f,p]),(0,o.useEffect)(()=>{let e=()=>m({});return document.addEventListener(eM,e),()=>document.removeEventListener(eM,e)},[]),(0,o.createElement)(ex.div,(0,ec.Z)({},c,{ref:y,style:{pointerEvents:_?k?"auto":"none":void 0,...e.style},onFocusCapture:ep(e.onFocusCapture,P.onFocusCapture),onBlurCapture:ep(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:ep(e.onPointerDownCapture,O.onPointerDownCapture)}))});function eH(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null==globalThis?void 0:globalThis.document,r=ek(e),n=(0,o.useRef)(!1),i=(0,o.useRef)(()=>{});return(0,o.useEffect)(()=>{let e=e=>{if(e.target&&!n.current){let n={originalEvent:e};function o(){eF(eD,r,n,{discrete:!0})}"touch"===e.pointerType?(t.removeEventListener("click",i.current),i.current=o,t.addEventListener("click",i.current,{once:!0})):o()}else t.removeEventListener("click",i.current);n.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",e),t.removeEventListener("click",i.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function eq(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null==globalThis?void 0:globalThis.document,r=ek(e),n=(0,o.useRef)(!1);return(0,o.useEffect)(()=>{let e=e=>{e.target&&!n.current&&eF(eU,r,{originalEvent:e},{discrete:!1})};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function eL(){let e=new CustomEvent(eM);document.dispatchEvent(e)}function eF(e,t,r,n){let{discrete:i}=n,o=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),i?eB(o,a):o.dispatchEvent(a)}let eV="focusScope.autoFocusOnMount",eW="focusScope.autoFocusOnUnmount",ez={bubbles:!1,cancelable:!0},eG=(0,o.forwardRef)((e,t)=>{let{loop:r=!1,trapped:n=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...s}=e,[l,u]=(0,o.useState)(null),d=ek(i),c=ek(a),p=(0,o.useRef)(null),f=eg(t,e=>u(e)),h=(0,o.useRef)({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;(0,o.useEffect)(()=>{if(n){function e(e){if(h.paused||!l)return;let t=e.target;l.contains(t)?p.current=t:e0(p.current,{select:!0})}function t(e){if(h.paused||!l)return;let t=e.relatedTarget;null===t||l.contains(t)||e0(p.current,{select:!0})}function r(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&e0(l)}document.addEventListener("focusin",e),document.addEventListener("focusout",t);let n=new MutationObserver(r);return l&&n.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),n.disconnect()}}},[n,l,h.paused]),(0,o.useEffect)(()=>{if(l){e1.add(h);let e=document.activeElement;if(!l.contains(e)){let t=new CustomEvent(eV,ez);l.addEventListener(eV,d),l.dispatchEvent(t),t.defaultPrevented||(eQ(e6(eY(l)),{select:!0}),document.activeElement===e&&e0(l))}return()=>{l.removeEventListener(eV,d),setTimeout(()=>{let t=new CustomEvent(eW,ez);l.addEventListener(eW,c),l.dispatchEvent(t),t.defaultPrevented||e0(null!=e?e:document.body,{select:!0}),l.removeEventListener(eW,c),e1.remove(h)},0)}}},[l,d,c,h]);let g=(0,o.useCallback)(e=>{if(!r&&!n||h.paused)return;let t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[n,o]=eK(t);n&&o?e.shiftKey||i!==o?e.shiftKey&&i===n&&(e.preventDefault(),r&&e0(o,{select:!0})):(e.preventDefault(),r&&e0(n,{select:!0})):i===t&&e.preventDefault()}},[r,n,h.paused]);return(0,o.createElement)(ex.div,(0,ec.Z)({tabIndex:-1},s,{ref:f,onKeyDown:g}))});function eQ(e){let{select:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=document.activeElement;for(let n of e)if(e0(n,{select:t}),document.activeElement!==r)return}function eK(e){let t=eY(e);return[eZ(t,e),eZ(t.reverse(),e)]}function eY(e){let t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function eZ(e,t){for(let r of e)if(!eX(r,{upTo:t}))return r}function eX(e,t){let{upTo:r}=t;if("hidden"===getComputedStyle(e).visibility)return!0;for(;e&&(void 0===r||e!==r);){if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function e$(e){return e instanceof HTMLInputElement&&"select"in e}function e0(e){let{select:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e&&e.focus){let r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&e$(e)&&t&&e.select()}}let e1=e2();function e2(){let e=[];return{add(t){let r=e[0];t!==r&&(null==r||r.pause()),(e=e3(e,t)).unshift(t)},remove(t){var r;null===(r=(e=e3(e,t))[0])||void 0===r||r.resume()}}}function e3(e,t){let r=[...e],n=r.indexOf(t);return -1!==n&&r.splice(n,1),r}function e6(e){return e.filter(e=>"A"!==e.tagName)}let e4=(0,o.forwardRef)((e,t)=>{var r;let{container:n=null==globalThis?void 0:null===(r=globalThis.document)||void 0===r?void 0:r.body,...i}=e;return n?eA.createPortal((0,o.createElement)(ex.div,(0,ec.Z)({},i,{ref:t})),n):null});function e8(e,t){return(0,o.useReducer)((e,r)=>{let n=t[e][r];return null!=n?n:e},e)}let e5=e=>{let{present:t,children:r}=e,n=e7(t),i="function"==typeof r?r({present:n.isPresent}):o.Children.only(r),a=eg(n.ref,i.ref);return"function"==typeof r||n.isPresent?(0,o.cloneElement)(i,{ref:a}):null};function e7(e){let[t,r]=(0,o.useState)(),n=(0,o.useRef)({}),i=(0,o.useRef)(e),a=(0,o.useRef)("none"),[s,l]=e8(e?"mounted":"unmounted",{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return(0,o.useEffect)(()=>{let e=e9(n.current);a.current="mounted"===s?e:"none"},[s]),eb(()=>{let t=n.current,r=i.current;if(r!==e){let n=a.current,o=e9(t);if(e)l("MOUNT");else if("none"===o||(null==t?void 0:t.display)==="none")l("UNMOUNT");else{let e=n!==o;r&&e?l("ANIMATION_OUT"):l("UNMOUNT")}i.current=e}},[e,l]),eb(()=>{if(t){let e=e=>{let r=e9(n.current).includes(e.animationName);e.target===t&&r&&(0,eA.flushSync)(()=>l("ANIMATION_END"))},r=e=>{e.target===t&&(a.current=e9(n.current))};return t.addEventListener("animationstart",r),t.addEventListener("animationcancel",e),t.addEventListener("animationend",e),()=>{t.removeEventListener("animationstart",r),t.removeEventListener("animationcancel",e),t.removeEventListener("animationend",e)}}l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:(0,o.useCallback)(e=>{e&&(n.current=getComputedStyle(e)),r(e)},[])}}function e9(e){return(null==e?void 0:e.animationName)||"none"}e5.displayName="Presence";let te=0;function tt(){(0,o.useEffect)(()=>{var e,t;let r=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",null!==(e=r[0])&&void 0!==e?e:tr()),document.body.insertAdjacentElement("beforeend",null!==(t=r[1])&&void 0!==t?t:tr()),te++,()=>{1===te&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),te--}},[])}function tr(){let e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var tn=r(69703),ti="right-scroll-bar-position",to="width-before-scroll-bar",ta="with-scroll-bars-hidden",ts="--removed-body-scroll-bar-size";function tl(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}function tu(e,t){var r=(0,o.useState)(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(value){var n=r.value;n!==value&&(r.value=value,r.callback(value,n))}}}})[0];return r.callback=t,r.facade}var td=new WeakMap;function tc(e,t){var r=tu(t||null,function(t){return e.forEach(function(e){return tl(e,t)})});return o.useLayoutEffect(function(){var t=td.get(r);if(t){var n=new Set(t),i=new Set(e),o=r.current;n.forEach(function(e){i.has(e)||tl(e,null)}),i.forEach(function(e){n.has(e)||tl(e,o)})}td.set(r,e)},[e]),r}function tp(e){return e}function tf(e,t){void 0===t&&(t=tp);var r=[],n=!1;return{read:function(){if(n)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(e){var i=t(e,n);return r.push(i),function(){r=r.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(n=!0;r.length;){var t=r;r=[],t.forEach(e)}r={push:function(t){return e(t)},filter:function(){return r}}},assignMedium:function(e){n=!0;var t=[];if(r.length){var i=r;r=[],i.forEach(e),t=r}var o=function(){var r=t;t=[],r.forEach(e)},a=function(){return Promise.resolve().then(o)};a(),r={push:function(e){t.push(e),a()},filter:function(e){return t=t.filter(e),r}}}}}var th=function(e){void 0===e&&(e={});var t=tf(null);return t.options=(0,tn.pi)({async:!0,ssr:!1},e),t}(),tg=function(){},tm=o.forwardRef(function(e,t){var r=o.useRef(null),n=o.useState({onScrollCapture:tg,onWheelCapture:tg,onTouchMoveCapture:tg}),i=n[0],a=n[1],s=e.forwardProps,l=e.children,u=e.className,d=e.removeScrollBar,c=e.enabled,p=e.shards,f=e.sideCar,h=e.noIsolation,g=e.inert,m=e.allowPinchZoom,y=e.as,v=void 0===y?"div":y,b=(0,tn._T)(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),S=f,w=tc([r,t]),_=(0,tn.pi)((0,tn.pi)({},b),i);return o.createElement(o.Fragment,null,c&&o.createElement(S,{sideCar:th,removeScrollBar:d,shards:p,noIsolation:h,inert:g,setCallbacks:a,allowPinchZoom:!!m,lockRef:r}),s?o.cloneElement(o.Children.only(l),(0,tn.pi)((0,tn.pi)({},_),{ref:w})):o.createElement(v,(0,tn.pi)({},_,{className:u,ref:w}),l))});tm.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},tm.classNames={fullWidth:to,zeroRight:ti};var ty=function(e){var t=e.sideCar,r=(0,tn._T)(e,["sideCar"]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw Error("Sidecar medium not found");return o.createElement(n,(0,tn.pi)({},r))};function tv(e,t){return e.useMedium(t),ty}ty.isSideCarExport=!0;var tb=function(){return i||r.nc};function tS(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=tb();return t&&e.setAttribute("nonce",t),e}function tw(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function t_(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}var tk=function(){var e=0,t=null;return{add:function(r){0==e&&(t=tS())&&(tw(t,r),t_(t)),e++},remove:function(){--e||!t||(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},tO=function(){var e=tk();return function(t,r){o.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},tP=function(){var e=tO();return function(t){return e(t.styles,t.dynamic),null}},tA=function(e){return parseInt(e||"",10)||0},tI=function(e){var t=window.getComputedStyle(document.body),r=t["padding"===e?"paddingLeft":"marginLeft"],n=t["padding"===e?"paddingTop":"marginTop"],i=t["padding"===e?"paddingRight":"marginRight"];return[tA(r),tA(n),tA(i)]},tR=function(e){void 0===e&&(e="margin");var t=tI(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},tE=tP(),tT="data-scroll-locked",tN=function(e,t,r,n){var i=e.left,o=e.top,a=e.right,s=e.gap;return void 0===r&&(r="margin"),"\n .".concat(ta," {\n overflow: hidden ").concat(n,";\n padding-right: ").concat(s,"px ").concat(n,";\n }\n body[").concat(tT,"] {\n overflow: hidden ").concat(n,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(n,";"),"margin"===r&&"\n padding-left: ".concat(i,"px;\n padding-top: ").concat(o,"px;\n padding-right: ").concat(a,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(s,"px ").concat(n,";\n "),"padding"===r&&"padding-right: ".concat(s,"px ").concat(n,";")].filter(Boolean).join(""),"\n }\n \n .").concat(ti," {\n right: ").concat(s,"px ").concat(n,";\n }\n \n .").concat(to," {\n margin-right: ").concat(s,"px ").concat(n,";\n }\n \n .").concat(ti," .").concat(ti," {\n right: 0 ").concat(n,";\n }\n \n .").concat(to," .").concat(to," {\n margin-right: 0 ").concat(n,";\n }\n \n body[").concat(tT,"] {\n ").concat(ts,": ").concat(s,"px;\n }\n")},tx=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,i=void 0===n?"margin":n,a=o.useMemo(function(){return tR(i)},[i]);return o.useEffect(function(){return document.body.setAttribute(tT,""),function(){document.body.removeAttribute(tT)}},[]),o.createElement(tE,{styles:tN(a,!t,i,r?"":"!important")})},tB=!1;try{var tC=Object.defineProperty({},"passive",{get:function(){return tB=!0,!0}});window.addEventListener("test",tC,tC),window.removeEventListener("test",tC,tC)}catch(e){tB=!1}var tM=!!tB&&{passive:!1},tD=function(e){return"TEXTAREA"===e.tagName},tU=function(e,t){var r=window.getComputedStyle(e);return"hidden"!==r[t]&&!(r.overflowY===r.overflowX&&!tD(e)&&"visible"===r[t])},tJ=function(e){return tU(e,"overflowY")},tj=function(e){return tU(e,"overflowX")},tH=function(e,t){var r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),tF(e,r)){var n=tV(e,r);if(n[1]>n[2])return!0}r=r.parentNode}while(r&&r!==document.body);return!1},tq=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},tL=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},tF=function(e,t){return"v"===e?tJ(t):tj(t)},tV=function(e,t){return"v"===e?tq(t):tL(t)},tW=function(e,t){return"h"===e&&"rtl"===t?-1:1},tz=function(e,t,r,n,i){var o=tW(e,window.getComputedStyle(t).direction),a=o*n,s=r.target,l=t.contains(s),u=!1,d=a>0,c=0,p=0;do{var f=tV(e,s),h=f[0],g=f[1]-f[2]-o*h;(h||g)&&tF(e,s)&&(c+=g,p+=h),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return d&&(i&&0===c||!i&&a>c)?u=!0:!d&&(i&&0===p||!i&&-a>p)&&(u=!0),u},tG=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},tQ=function(e){return[e.deltaX,e.deltaY]},tK=function(e){return e&&"current"in e?e.current:e},tY=function(e,t){return e[0]===t[0]&&e[1]===t[1]},tZ=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},tX=0,t$=[],t0=tv(th,function(e){var t=o.useRef([]),r=o.useRef([0,0]),n=o.useRef(),i=o.useState(tX++)[0],a=o.useState(function(){return tP()})[0],s=o.useRef(e);o.useEffect(function(){s.current=e},[e]),o.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var t=(0,tn.ev)([e.lockRef.current],(e.shards||[]).map(tK),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),t.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var l=o.useCallback(function(e,t){if("touches"in e&&2===e.touches.length)return!s.current.allowPinchZoom;var i,o=tG(e),a=r.current,l="deltaX"in e?e.deltaX:a[0]-o[0],u="deltaY"in e?e.deltaY:a[1]-o[1],d=e.target,c=Math.abs(l)>Math.abs(u)?"h":"v";if("touches"in e&&"h"===c&&"range"===d.type)return!1;var p=tH(c,d);if(!p)return!0;if(p?i=c:(i="v"===c?"h":"v",p=tH(c,d)),!p)return!1;if(!n.current&&"changedTouches"in e&&(l||u)&&(n.current=i),!i)return!0;var f=n.current||i;return tz(f,t,e,"h"===f?l:u,!0)},[]),u=o.useCallback(function(e){var r=e;if(t$.length&&t$[t$.length-1]===a){var n="deltaY"in r?tQ(r):tG(r),i=t.current.filter(function(e){return e.name===r.type&&e.target===r.target&&tY(e.delta,n)})[0];if(i&&i.should){r.cancelable&&r.preventDefault();return}if(!i){var o=(s.current.shards||[]).map(tK).filter(Boolean).filter(function(e){return e.contains(r.target)});(o.length>0?l(r,o[0]):!s.current.noIsolation)&&r.cancelable&&r.preventDefault()}}},[]),d=o.useCallback(function(e,r,n,i){var o={name:e,delta:r,target:n,should:i};t.current.push(o),setTimeout(function(){t.current=t.current.filter(function(e){return e!==o})},1)},[]),c=o.useCallback(function(e){r.current=tG(e),n.current=void 0},[]),p=o.useCallback(function(t){d(t.type,tQ(t),t.target,l(t,e.lockRef.current))},[]),f=o.useCallback(function(t){d(t.type,tG(t),t.target,l(t,e.lockRef.current))},[]);o.useEffect(function(){return t$.push(a),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:f}),document.addEventListener("wheel",u,tM),document.addEventListener("touchmove",u,tM),document.addEventListener("touchstart",c,tM),function(){t$=t$.filter(function(e){return e!==a}),document.removeEventListener("wheel",u,tM),document.removeEventListener("touchmove",u,tM),document.removeEventListener("touchstart",c,tM)}},[]);var h=e.removeScrollBar,g=e.inert;return o.createElement(o.Fragment,null,g?o.createElement(a,{styles:tZ(i)}):null,h?o.createElement(tx,{gapMode:"margin"}):null)}),t1=o.forwardRef(function(e,t){return o.createElement(tm,(0,tn.pi)({},e,{ref:t,sideCar:t0}))});t1.classNames=tm.classNames;var t2=t1,t3=function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},t6=new WeakMap,t4=new WeakMap,t8={},t5=0,t7=function(e){return e&&(e.host||t7(e.parentNode))},t9=function(e,t){return t.map(function(t){if(e.contains(t))return t;var r=t7(t);return r&&e.contains(r)?r:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)}).filter(function(e){return!!e})},re=function(e,t,r,n){var i=t9(t,Array.isArray(e)?e:[e]);t8[r]||(t8[r]=new WeakMap);var o=t8[r],a=[],s=new Set,l=new Set(i),u=function(e){!e||s.has(e)||(s.add(e),u(e.parentNode))};i.forEach(u);var d=function(e){!e||l.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))d(e);else{var t=e.getAttribute(n),i=null!==t&&"false"!==t,l=(t6.get(e)||0)+1,u=(o.get(e)||0)+1;t6.set(e,l),o.set(e,u),a.push(e),1===l&&i&&t4.set(e,!0),1===u&&e.setAttribute(r,"true"),i||e.setAttribute(n,"true")}})};return d(t),s.clear(),t5++,function(){a.forEach(function(e){var t=t6.get(e)-1,i=o.get(e)-1;t6.set(e,t),o.set(e,i),t||(t4.has(e)||e.removeAttribute(n),t4.delete(e)),i||e.removeAttribute(r)}),--t5||(t6=new WeakMap,t6=new WeakMap,t4=new WeakMap,t8={})}},rt=function(e,t,r){void 0===r&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),i=t||t3(e);return i?(n.push.apply(n,Array.from(i.querySelectorAll("[aria-live]"))),re(n,i,r,"aria-hidden")):function(){return null}};let rr="Dialog",[rn,ri]=ey(rr),[ro,ra]=rn(rr),rs=e=>{let{__scopeDialog:t,children:r,open:n,defaultOpen:i,onOpenChange:a,modal:s=!0}=e,l=(0,o.useRef)(null),u=(0,o.useRef)(null),[d=!1,c]=eO({prop:n,defaultProp:i,onChange:a});return(0,o.createElement)(ro,{scope:t,triggerRef:l,contentRef:u,contentId:e_(),titleId:e_(),descriptionId:e_(),open:d,onOpenChange:c,onOpenToggle:(0,o.useCallback)(()=>c(e=>!e),[c]),modal:s},r)},rl="DialogPortal",[ru,rd]=rn(rl,{forceMount:void 0}),rc=e=>{let{__scopeDialog:t,forceMount:r,children:n,container:i}=e,a=ra(rl,t);return(0,o.createElement)(ru,{scope:t,forceMount:r},o.Children.map(n,e=>(0,o.createElement)(e5,{present:r||a.open},(0,o.createElement)(e4,{asChild:!0,container:i},e))))},rp="DialogOverlay",rf=(0,o.forwardRef)((e,t)=>{let r=rd(rp,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,a=ra(rp,e.__scopeDialog);return a.modal?(0,o.createElement)(e5,{present:n||a.open},(0,o.createElement)(rh,(0,ec.Z)({},i,{ref:t}))):null}),rh=(0,o.forwardRef)((e,t)=>{let{__scopeDialog:r,...n}=e,i=ra(rp,r);return(0,o.createElement)(t2,{as:eI,allowPinchZoom:!0,shards:[i.contentRef]},(0,o.createElement)(ex.div,(0,ec.Z)({"data-state":rO(i.open)},n,{ref:t,style:{pointerEvents:"auto",...n.style}})))}),rg="DialogContent",rm=(0,o.forwardRef)((e,t)=>{let r=rd(rg,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,a=ra(rg,e.__scopeDialog);return(0,o.createElement)(e5,{present:n||a.open},a.modal?(0,o.createElement)(ry,(0,ec.Z)({},i,{ref:t})):(0,o.createElement)(rv,(0,ec.Z)({},i,{ref:t})))}),ry=(0,o.forwardRef)((e,t)=>{let r=ra(rg,e.__scopeDialog),n=(0,o.useRef)(null),i=eg(t,r.contentRef,n);return(0,o.useEffect)(()=>{let e=n.current;if(e)return rt(e)},[]),(0,o.createElement)(rb,(0,ec.Z)({},e,{ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ep(e.onCloseAutoFocus,e=>{var t;e.preventDefault(),null===(t=r.triggerRef.current)||void 0===t||t.focus()}),onPointerDownOutside:ep(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey;(2===t.button||r)&&e.preventDefault()}),onFocusOutside:ep(e.onFocusOutside,e=>e.preventDefault())}))}),rv=(0,o.forwardRef)((e,t)=>{let r=ra(rg,e.__scopeDialog),n=(0,o.useRef)(!1),i=(0,o.useRef)(!1);return(0,o.createElement)(rb,(0,ec.Z)({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var o,a;null===(o=e.onCloseAutoFocus)||void 0===o||o.call(e,t),t.defaultPrevented||(n.current||null===(a=r.triggerRef.current)||void 0===a||a.focus(),t.preventDefault()),n.current=!1,i.current=!1},onInteractOutside:t=>{var o,a;null===(o=e.onInteractOutside)||void 0===o||o.call(e,t),t.defaultPrevented||(n.current=!0,"pointerdown"!==t.detail.originalEvent.type||(i.current=!0));let s=t.target;(null===(a=r.triggerRef.current)||void 0===a?void 0:a.contains(s))&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&i.current&&t.preventDefault()}}))}),rb=(0,o.forwardRef)((e,t)=>{let{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:i,onCloseAutoFocus:a,...s}=e,l=ra(rg,r),u=eg(t,(0,o.useRef)(null));return tt(),(0,o.createElement)(o.Fragment,null,(0,o.createElement)(eG,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:i,onUnmountAutoFocus:a},(0,o.createElement)(ej,(0,ec.Z)({role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":rO(l.open)},s,{ref:u,onDismiss:()=>l.onOpenChange(!1)}))),!1)}),rS="DialogTitle",rw=(0,o.forwardRef)((e,t)=>{let{__scopeDialog:r,...n}=e,i=ra(rS,r);return(0,o.createElement)(ex.h2,(0,ec.Z)({id:i.titleId},n,{ref:t}))}),r_="DialogDescription",rk=(0,o.forwardRef)((e,t)=>{let{__scopeDialog:r,...n}=e,i=ra(r_,r);return(0,o.createElement)(ex.p,(0,ec.Z)({id:i.descriptionId},n,{ref:t}))});function rO(e){return e?"open":"closed"}let[rP,rA]=em("DialogTitleWarning",{contentName:rg,titleName:rS,docsSlug:"dialog"}),rI=rf,rR=rm,rE=rw,rT=rk;var rN=rs,rx=rc,rB=o.forwardRef((e,t)=>{var r=e,{className:n}=r,i=(0,s.S0)(r,["className"]);return(0,ea.jsx)(rI,(0,s.ih)({className:eo("ui-bg-black/80 ui-data-[state=open]:ui-animate-in ui-data-[state=closed]:ui-animate-out ui-data-[state=closed]:ui-fade-out-0 ui-data-[state=open]:ui-fade-in-0 ui-fixed ui-inset-0 ui-z-50 ui-backdrop-blur-lg",n),ref:t},i))});rB.displayName=rI.displayName;var rC=o.forwardRef((e,t)=>{var r=e,{className:n,children:i}=r,o=(0,s.S0)(r,["className","children"]);return(0,ea.jsxs)(rx,{children:[(0,ea.jsx)(rB,{}),(0,ea.jsx)("div",{className:"ui-absolute ui-h-screen ui-w-screen ui-inset-0 ui-bg-modal-overlay ui-backdrop-blur-3xl ui-opacity-40 ui-bg-no-repeat ui-bg-cover ui-bg-center ui-bg-fixed ui-z-[60]"}),(0,ea.jsx)(rR,(0,s.EZ)((0,s.ih)({className:eo("ui-bg-black/20 ui-backdrop-blur-2xl ui-data-[state=open]:ui-animate-in ui-data-[state=closed]:ui-animate-out ui-data-[state=closed]:ui-fade-out-0 ui-data-[state=open]:ui-fade-in-0 ui-data-[state=closed]:ui-zoom-out-95 ui-data-[state=open]:ui-zoom-in-95 ui-data-[state=closed]:ui-slide-out-to-left-1/2 ui-data-[state=closed]:ui-slide-out-to-top-[48%] ui-data-[state=open]:ui-slide-in-from-left-1/2 ui-data-[state=open]:ui-slide-in-from-top-[48%] ui-fixed ui-z-[70] ui-grid ui-w-full ui-max-w-lg ui-gap-4 ui-p-6 ui-duration-200 sm:ui-rounded-[48px] ui-left-[50%] ui-top-[50%] ui-translate-x-[-50%] ui-translate-y-[-50%]",n),ref:t},o),{children:i}))]})});rC.displayName=rR.displayName,o.forwardRef((e,t)=>{var r=e,{className:n}=r,i=(0,s.S0)(r,["className"]);return(0,ea.jsx)(rE,(0,s.ih)({className:eo("ui-text-lg ui-font-semibold ui-leading-none ui-tracking-tight",n),ref:t},i))}).displayName=rE.displayName,o.forwardRef((e,t)=>{var r=e,{className:n}=r,i=(0,s.S0)(r,["className"]);return(0,ea.jsx)(rT,(0,s.ih)({className:eo("ui-text-neutral-500 ui-text-sm",n),ref:t},i))}).displayName=rT.displayName;var rM={coinDenom:"XION",coinMinimalDenom:"uxion",coinDecimals:6,gasPriceStep:{low:.01,average:.025,high:.03}},rD={rpc:"undefined",rest:"undefined",chainId:"base",chainName:"Xion Testnet",bip44:{coinType:118},bech32Config:{bech32PrefixAccAddr:"xion",bech32PrefixValAddr:"xionvaloper",bech32PrefixValPub:"xionvaloperpub",bech32PrefixAccPub:"xionpub",bech32PrefixConsAddr:"xionvalcons",bech32PrefixConsPub:"xionvalconspub"},stakeCurrency:rM,currencies:[rM],feeCurrencies:[rM],features:["cosmwasm"]},rU={...rD,rpc:"https://testnet-rpc.xion-api.com:443",rest:"https://testnet-api.xion-api.com:443",chainId:"xion-testnet-1",chainName:"Xion Testnet"};({...rD});var rJ=r(18722),rj=r(83552),rH=r(67357),rq=r(36173),rL=r(49400),rF=r(69721),rV=r(64471),rW=r(48821),rz=r(58015),rG=r(46959),rQ=r(97481),rK=r(43890),rY=r(39272),rZ=class extends rG.Fl{get granteeAddress(){return this._granteeAddress}async getGranteeAccountData(){return this._signer.getAccounts().then(e=>{for(let t of e)if(t.address===this._granteeAddress)return t})}static async connectWithSigner(e,t,r){let n=await rK.Tendermint37Client.connect(e);return rZ.createWithSigner(n,t,r)}static async createWithSigner(e,t,r){return new rZ(e,t,r)}async getAccount(e){let t=await this.forceGetQueryClient().auth.account(e);return t?(0,rY.sf)(t):null}async signAndBroadcast(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";return e===this.granterAddress&&(e=this.granteeAddress,t=[{typeUrl:"/cosmos.authz.v1beta1.MsgExec",value:rQ.MsgExec.fromPartial({grantee:this.granteeAddress,msgs:t.map(e=>this.registry.encodeAsAny(e))})}]),super.signAndBroadcast(e,t,r,n)}async sign(e,t,r,n,i){return e===this.granterAddress&&(e=this.granteeAddress,t=[{typeUrl:"/cosmos.authz.v1beta1.MsgExec",value:rQ.MsgExec.fromPartial({grantee:e,msgs:t.map(e=>this.registry.encodeAsAny(e))})}]),super.sign(e,t,r,n,i)}constructor(e,t,{granterAddress:r,granteeAddress:n,...i}){if(super(e,t,i),void 0===r)throw Error("granterAddress is required");if(this.granterAddress=r,void 0===n)throw Error("granteeAddress is required");this._granteeAddress=n,this._signer=t}},rX=r(23663).Buffer,r$=(0,o.createContext)({});function r0(e){let{children:t,contracts:r,dashboardUrl:n="https://dashboard.burnt.com",rpcUrl:i=rU.rpc,restUrl:a=rU.rest,stake:s=!1,bank:l}=e,[u,d]=(0,o.useState)(""),[c,p]=(0,o.useState)(!1),[f,h]=(0,o.useState)(!1),[g,m]=(0,o.useState)(!1),[y,v]=(0,o.useState)(void 0),[b,S]=(0,o.useState)("");(0,o.useEffect)(()=>{"true"===new URLSearchParams(window.location.search).get("granted")&&m(!0)},[]);let w=()=>{p(!1),localStorage.removeItem("xion-authz-temp-account"),localStorage.removeItem("xion-authz-granter-account"),v(void 0),S("")};return(0,ea.jsx)(r$.Provider,{value:{isConnected:c,setIsConnected:p,isConnecting:f,setIsConnecting:h,abstraxionError:u,setAbstraxionError:d,abstraxionAccount:y,setAbstraxionAccount:v,granterAddress:b,showModal:g,setShowModal:m,setGranterAddress:S,contracts:r,dashboardUrl:n,rpcUrl:i,restUrl:a,stake:s,bank:l,logout:w},children:t})}var r1=()=>(0,ea.jsxs)(es,{children:[(0,ea.jsxs)("div",{className:"ui-flex ui-flex-col ui-w-full ui-text-center",children:[(0,ea.jsx)("h1",{className:"ui-w-full ui-tracking-tighter ui-text-3xl ui-font-bold ui-text-white ui-uppercase ui-mb-3",children:"Connecting..."}),(0,ea.jsx)("h2",{className:"ui-w-full ui-tracking-tighter ui-text-sm ui-mb-4 ui-text-neutral-500",children:"Signing you in... Don’t close the window."})]}),(0,ea.jsx)("div",{className:"ui-flex ui-h-full ui-w-full ui-items-center ui-justify-center ui-text-white",children:(0,ea.jsx)(el,{})})]});function r2(){return(0,ea.jsxs)("div",{className:"ui-flex ui-h-full ui-w-full ui-flex-col ui-items-start ui-justify-center ui-gap-4 ui-p-8 ui-text-center",children:[(0,ea.jsx)("h1",{className:"ui-text-3xl ui-font-bold ui-uppercase ui-tracking-tighter ui-text-white",children:"Oops! Something went wrong..."}),(0,ea.jsx)("h2",{className:"ui-tracking-tight ui-text-neutral-500",children:"Please try refreshing the page. If the problem continues, check your internet connection or try again later."}),(0,ea.jsx)(eu.z,{structure:"naked",fullWidth:!0,onClick:()=>{window.location.reload()},children:"Refresh the page"})]})}function r3(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1e3;return new Promise(t=>{setTimeout(t,e)})}function r6(){let{setIsConnecting:e,setIsConnected:t,setAbstraxionAccount:r,setGranterAddress:n,granterAddress:i,contracts:a,dashboardUrl:s,restUrl:l,stake:u,bank:d}=(0,o.useContext)(r$),c=(0,o.useRef)(!1),[p,f]=(0,o.useState)("");function h(e){n(e),localStorage.setItem("xion-authz-granter-account",e)}function g(e,t){let r=window.location.href,n=new URLSearchParams;d&&n.set("bank",JSON.stringify(d)),u&&n.set("stake","true"),n.set("grantee",e),t&&n.set("contracts",JSON.stringify(t)),n.set("redirect_uri",r);let i=n.toString();window.location.href="".concat(s,"?").concat(i)}async function m(){let e=await rJ.DirectSecp256k1HdWallet.generate(12,{prefix:"xion"}),t=await e.serialize("abstraxion");return localStorage.setItem("xion-authz-temp-account",t),e}async function y(t){if(!t)throw Error("No keypair address");e(!0);let r=!0;for(;r;)try{await r3(3e3);let e=await fetch("".concat(l,"/cosmos/authz/v1beta1/grants/grantee/").concat(t),{cache:"no-store"}),r=await e.json();if(r.grants.length>0){let e=r.grants.map(e=>e.granter),t=[...new Set(e)];t.length>1&&console.error("More than one granter found. Taking first."),h(t[0]);let n=new URL(window.location.href);n.searchParams.delete("granted"),history.pushState({},"",n.href);break}}catch(e){throw e}}return(0,o.useEffect)(()=>{async function n(){try{let n;let o=localStorage.getItem("xion-authz-temp-account");n=o?await rJ.DirectSecp256k1HdWallet.deserialize(o,"abstraxion"):await m();let s=new URLSearchParams(window.location.search).get("granted"),l=(await n.getAccounts())[0].address;f(l),s||i?s&&!i?(await y(l),e(!1),t(!0),r(n)):t(!0):g(l,a)}catch(e){console.log("Something went wrong: ",e)}}c.current||n(),c.current=!0},[]),(0,ea.jsxs)(es,{className:"ui-items-center",children:[(0,ea.jsxs)("div",{className:"ui-flex ui-flex-col ui-w-full ui-text-center",children:[(0,ea.jsx)("h1",{className:"ui-w-full ui-tracking-tighter ui-text-3xl ui-font-bold ui-text-white ui-uppercase ui-mb-3",children:"Secure account creation"}),(0,ea.jsx)("h2",{className:"ui-w-full ui-tracking-tighter ui-text-sm ui-mb-4 ui-text-neutral-500",children:"Please switch to the newly opened tab and enter your credentials to securely complete your account creation"})]}),(0,ea.jsx)(ed,{}),(0,ea.jsx)(eu.z,{onClick:()=>{g(p,a)},structure:"naked",children:"Have a Problem? Try Again"})]})}function r4(e){let{onClose:t}=e,{abstraxionError:r,isConnecting:n,isConnected:i,showModal:a,setShowModal:s}=(0,o.useContext)(r$);return((0,o.useEffect)(()=>{let e=e=>{e.key};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[t]),a)?i?(s(!1),null):(0,ea.jsx)(rN,{onOpenChange:t,open:a,children:(0,ea.jsx)(rC,{children:r?(0,ea.jsx)(r2,{}):n?(0,ea.jsx)(r1,{}):(0,ea.jsx)(r6,{})})}):null}function r8(e){let{children:t,config:r}=e;return(0,ea.jsx)(r0,{contracts:r.contracts,dashboardUrl:r.dashboardUrl,rpcUrl:r.rpcUrl,restUrl:r.restUrl,stake:r.stake,bank:r.bank,children:t})}var r5="directsecp256k1hdwallet-v1";function r7(e){return!!(0,rH.isNonNullObject)(e)&&"string"==typeof e.hdPath&&"string"==typeof e.prefix}var r9={bip39Password:"",hdPaths:[(0,rj.makeCosmoshubPath)(0)],prefix:"cosmos"},ne=class{static async fromMnemonic(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=new rL.EnglishMnemonic(e),n=await rL.Bip39.mnemonicToSeed(r,t.bip39Password);return new ne(r,{...t,seed:n})}static async deserialize(e,t){let r=JSON.parse(e);if(!(0,rH.isNonNullObject)(r))throw Error("Root document is not an object.");if(r.type===r5)return this.deserializeTypeV1(e,t);throw Error("Unsupported serialization type")}static async deserializeWithEncryptionKey(e,t){let r=JSON.parse(e);if(!(0,rH.isNonNullObject)(r))throw Error("Root document is not an object.");let n=r;if(n.type===r5){let e=await (0,rW.decrypt)((0,rF.fromBase64)(n.data),t,n.encryption),{mnemonic:r,accounts:i}=JSON.parse((0,rF.fromUtf8)(e));if((0,rH.assert)("string"==typeof r),!Array.isArray(i))throw Error("Property 'accounts' is not an array");if(!i.every(e=>r7(e)))throw Error("Account is not in the correct format.");let o=i[0].prefix;if(!i.every(e=>{let{prefix:t}=e;return t===o}))throw Error("Accounts do not all have the same prefix");let a=i.map(e=>{let{hdPath:t}=e;return(0,rL.stringToPath)(t)});return this.fromMnemonic(r,{hdPaths:a,prefix:o})}throw Error("Unsupported serialization type")}static async deserializeTypeV1(e,t){let r=JSON.parse(e);if(!(0,rH.isNonNullObject)(r))throw Error("Root document is not an object.");let n=await (0,rW.executeKdf)(t,r.kdf);return this.deserializeWithEncryptionKey(e,n)}async getKeyPair(e){let{privkey:t}=rL.Slip10.derivePath(rL.Slip10Curve.Secp256k1,this.seed,e),{pubkey:r}=await rL.Secp256k1.makeKeypair(t);return{privkey:t,pubkey:rL.Secp256k1.compressPubkey(r)}}async getAccountsWithPrivkeys(){return Promise.all(this.accounts.map(async e=>{let{hdPath:t,prefix:r}=e,{privkey:n,pubkey:i}=await this.getKeyPair(t),o=(0,rF.toBech32)(r,(0,rj.rawSecp256k1PubkeyToRawAddress)(i));return{algo:"secp256k1",privkey:n,pubkey:i,address:o}}))}constructor(e,t){var r,n;this.signArb=async(e,t)=>{let r=(await this.getAccountsWithPrivkeys()).find(t=>{let{address:r}=t;return r===e});if(void 0===r)throw Error("Address ".concat(e," not found in wallet"));let{privkey:n}=r,i=(0,rV.makeADR36AminoSignDoc)(e,t),o=(0,rV.serializeSignDoc)(i),a=rq.Hash.sha256(o),s=new rq.PrivKeySecp256k1(n).signDigest32(a);return rX.from(new Uint8Array([...s.r,...s.s])).toString("base64")};let i=null!==(r=t.prefix)&&void 0!==r?r:r9.prefix,o=null!==(n=t.hdPaths)&&void 0!==n?n:r9.hdPaths;this.secret=e,this.seed=t.seed,this.accounts=o.map(e=>({hdPath:e,prefix:i}))}},nt=()=>{let{isConnected:e,granterAddress:t,abstraxionAccount:r,isConnecting:n,setGranterAddress:i,setAbstraxionAccount:a,setIsConnected:s,setIsConnecting:l}=(0,o.useContext)(r$);return(0,o.useEffect)(()=>{async function e(){l(!0);let e=localStorage.getItem("xion-authz-temp-account");if(e){a(await rJ.DirectSecp256k1HdWallet.deserialize(e,"abstraxion"));let t=localStorage.getItem("xion-authz-granter-account");t&&(i(t),s(!0))}else localStorage.removeItem("xion-authz-granter-account"),a(void 0),i("");l(!1)}n||r||t||e()},[e,r,t]),{data:{bech32Address:t},isConnected:e}},nr=()=>{let{isConnected:e,abstraxionAccount:t,granterAddress:r,rpcUrl:n,logout:i}=(0,o.useContext)(r$),[a,s]=(0,o.useState)(void 0),l=async()=>{let e;let t=localStorage.getItem("xion-authz-temp-account");return t&&(e=await ne.deserialize(t,"abstraxion")),e},[u,d]=(0,o.useState)(void 0);return(0,o.useEffect)(()=>{(async function(){try{if(!t)throw Error("No account found.");if(!r)throw Error("No granter found.");let e=await t.getAccounts().then(e=>{if(0===e.length)throw Error("No account found.");return e[0].address}),i=await rZ.connectWithSigner(n||rU.rpc,t,{gasPrice:rz.GasPrice.fromString("0uxion"),granterAddress:r,granteeAddress:e}),o=await l();o&&s(o),d(i)}catch(e){console.log("Something went wrong: ",e),d(void 0)}})()},[e,t,r]),{client:u,signArb:null==a?void 0:a.signArb,logout:i}},nn=()=>{let{showModal:e,setShowModal:t}=(0,o.useContext)(r$);return[e,t]}},39272:function(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,{sf:function(){return customAccountFromAny}});var AAAlgo2,apolloClientInstance,_swc_helpers_tagged_template_literal__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(56093),_cosmjs_stargate__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(58015),bech32__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(73746),cosmjs_types_cosmos_tx_v1beta1_tx__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(26136),_cosmjs_proto_signing__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(18722),_cosmjs_tendermint_rpc__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(43890),cosmjs_types_cosmos_tx_signing_v1beta1_signing__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(2264),_cosmjs_amino__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(83552),_cosmjs_math__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(35801),_protobuf_ts_runtime__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__(65619),_protobuf_ts_runtime__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__(73654),_protobuf_ts_runtime__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__(2807),_cosmjs_utils__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(67357),_cosmjs_stargate_build_accounts__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(5491),_apollo_client__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__(77729),_apollo_client__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__(42680),_apollo_client__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__(22963),_cosmjs_cosmwasm_stargate__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(10823),cosmjs_types_cosmwasm_wasm_v1_tx__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__(88242),_cosmjs_crypto__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__(49400),Buffer=__webpack_require__(23663).Buffer;function _templateObject(){let e=(0,_swc_helpers_tagged_template_literal__WEBPACK_IMPORTED_MODULE_0__._)(["\n fragment SmartAccountFragment on SmartAccountAuthenticator {\n id\n type\n authenticator\n authenticatorIndex\n version\n }\n"]);return _templateObject=function(){return e},e}function _templateObject1(){let e=(0,_swc_helpers_tagged_template_literal__WEBPACK_IMPORTED_MODULE_0__._)(["\n ","\n query ($authenticator: String!) {\n smartAccounts(\n filter: {\n authenticators: { some: { authenticator: { equalTo: $authenticator } } }\n }\n ) {\n nodes {\n authenticators {\n nodes {\n ...SmartAccountFragment\n }\n }\n }\n }\n }\n"]);return _templateObject1=function(){return e},e}function _templateObject2(){let e=(0,_swc_helpers_tagged_template_literal__WEBPACK_IMPORTED_MODULE_0__._)(["\n ","\n query ($id: String!) {\n smartAccount(id: $id) {\n id\n latestAuthenticatorId\n authenticators {\n nodes {\n ...SmartAccountFragment\n }\n }\n }\n }\n"]);return _templateObject2=function(){return e},e}function _templateObject3(){let e=(0,_swc_helpers_tagged_template_literal__WEBPACK_IMPORTED_MODULE_0__._)(["\n ","\n query ($id: String!) {\n smartAccounts(filter: { id: { equalTo: $id } }) {\n nodes {\n authenticators {\n nodes {\n ...SmartAccountFragment\n }\n }\n }\n }\n }\n"]);return _templateObject3=function(){return e},e}function _templateObject4(){let e=(0,_swc_helpers_tagged_template_literal__WEBPACK_IMPORTED_MODULE_0__._)(["\n ","\n query ($id: String!, $index: Int!) {\n smartAccounts(filter: { id: { equalTo: $id } }) {\n nodes {\n authenticators(filter: { authenticatorIndex: { equalTo: $index } }) {\n nodes {\n ...SmartAccountFragment\n }\n }\n }\n }\n }\n"]);return _templateObject4=function(){return e},e}function _templateObject5(){let e=(0,_swc_helpers_tagged_template_literal__WEBPACK_IMPORTED_MODULE_0__._)(["\n ","\n query ($id: String!, $authenticator: String!) {\n smartAccounts(\n filter: {\n id: { equalTo: $id }\n authenticators: { some: { authenticator: { equalTo: $authenticator } } }\n }\n ) {\n nodes {\n authenticators {\n nodes {\n ...SmartAccountFragment\n }\n }\n }\n }\n }\n"]);return _templateObject5=function(){return e},e}function _templateObject6(){let e=(0,_swc_helpers_tagged_template_literal__WEBPACK_IMPORTED_MODULE_0__._)(["\n ","\n query ($id: String!, $type: String!) {\n smartAccounts(\n filter: {\n id: { equalTo: $id }\n authenticators: { some: { type: { equalTo: $type } } }\n }\n ) {\n nodes {\n authenticators {\n nodes {\n ...SmartAccountFragment\n }\n }\n }\n }\n }\n"]);return _templateObject6=function(){return e},e}function _templateObject7(){let e=(0,_swc_helpers_tagged_template_literal__WEBPACK_IMPORTED_MODULE_0__._)(["\n ","\n query ($id: String!, $type: String!, $authenticator: String!) {\n smartAccounts(\n filter: {\n id: { equalTo: $id }\n authenticators: {\n some: {\n authenticator: { equalTo: $authenticator }\n type: { equalTo: $type }\n }\n }\n }\n ) {\n nodes {\n authenticators {\n nodes {\n ...SmartAccountFragment\n }\n }\n }\n }\n }\n"]);return _templateObject7=function(){return e},e}var __create=Object.create,__defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty,__commonJS=(e,t)=>function(){return t||(0,e[__getOwnPropNames(e)[0]])((t={exports:{}}).exports,t),t.exports},__copyProps=(e,t,r,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of __getOwnPropNames(t))__hasOwnProp.call(e,i)||i===r||__defProp(e,i,{get:()=>t[i],enumerable:!(n=__getOwnPropDesc(t,i))||n.enumerable});return e},__toESM=(e,t,r)=>(r=null!=e?__create(__getProtoOf(e)):{},__copyProps(!t&&e&&e.__esModule?r:__defProp(r,"default",{value:e,enumerable:!0}),e)),require_aspromise=__commonJS({"../../node_modules/.pnpm/@protobufjs+aspromise@1.1.2/node_modules/@protobufjs/aspromise/index.js"(e,t){t.exports=r;function r(e,t){for(var r=Array(arguments.length-1),n=0,i=2,o=!0;i1&&"="===e.charAt(t);)++r;return Math.ceil(3*e.length)/4-r};var n=Array(64),i=Array(123);for(t=0;t<64;)i[n[t]=t<26?t+65:t<52?t+71:t<62?t-4:t-59|43]=t++;r.encode=function(e,t,r){for(var i,o=null,a=[],s=0,l=0;t>2],i=(3&u)<<4,l=1;break;case 1:a[s++]=n[i|u>>4],i=(15&u)<<2,l=2;break;case 2:a[s++]=n[i|u>>6],a[s++]=n[63&u],l=0}s>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,a)),s=0)}return(l&&(a[s++]=n[i],a[s++]=61,1===l&&(a[s++]=61)),o)?(s&&o.push(String.fromCharCode.apply(String,a.slice(0,s))),o.join("")):String.fromCharCode.apply(String,a.slice(0,s))};var o="invalid encoding";r.decode=function(e,t,r){for(var n,a=r,s=0,l=0;l1)break;if(void 0===(u=i[u]))throw Error(o);switch(s){case 0:n=u,s=1;break;case 1:t[r++]=n<<2|(48&u)>>4,n=u,s=2;break;case 2:t[r++]=(15&n)<<4|(60&u)>>2,n=u,s=3;break;case 3:t[r++]=(3&n)<<6|u,s=0}}if(1===s)throw Error(o);return r-a},r.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}}}),require_eventemitter=__commonJS({"../../node_modules/.pnpm/@protobufjs+eventemitter@1.1.0/node_modules/@protobufjs/eventemitter/index.js"(e,t){function r(){this._listeners={}}t.exports=r,r.prototype.on=function(e,t,r){return(this._listeners[e]||(this._listeners[e]=[])).push({fn:t,ctx:r||this}),this},r.prototype.off=function(e,t){if(void 0===e)this._listeners={};else if(void 0===t)this._listeners[e]=[];else for(var r=this._listeners[e],n=0;n0?0:2147483648,r,n);else if(isNaN(t))e(2143289344,r,n);else if(t>34028234663852886e22)e((i<<31|2139095040)>>>0,r,n);else if(t<11754943508222875e-54)e((i<<31|Math.round(t/1401298464324817e-60))>>>0,r,n);else{var o=Math.floor(Math.log(t)/Math.LN2),a=8388607&Math.round(t*Math.pow(2,-o)*8388608);e((i<<31|o+127<<23|a)>>>0,r,n)}}function r(e,t,r){var n=e(t,r),i=(n>>31)*2+1,o=n>>>23&255,a=8388607&n;return 255===o?a?NaN:1/0*i:0===o?1401298464324817e-60*i*a:i*Math.pow(2,o-150)*(a+8388608)}e.writeFloatLE=t.bind(null,n),e.writeFloatBE=t.bind(null,i),e.readFloatLE=r.bind(null,o),e.readFloatBE=r.bind(null,a)}(),"undefined"!=typeof Float64Array?function(){var t=new Float64Array([-0]),r=new Uint8Array(t.buffer),n=128===r[7];function i(e,n,i){t[0]=e,n[i]=r[0],n[i+1]=r[1],n[i+2]=r[2],n[i+3]=r[3],n[i+4]=r[4],n[i+5]=r[5],n[i+6]=r[6],n[i+7]=r[7]}function o(e,n,i){t[0]=e,n[i]=r[7],n[i+1]=r[6],n[i+2]=r[5],n[i+3]=r[4],n[i+4]=r[3],n[i+5]=r[2],n[i+6]=r[1],n[i+7]=r[0]}function a(e,n){return r[0]=e[n],r[1]=e[n+1],r[2]=e[n+2],r[3]=e[n+3],r[4]=e[n+4],r[5]=e[n+5],r[6]=e[n+6],r[7]=e[n+7],t[0]}function s(e,n){return r[7]=e[n],r[6]=e[n+1],r[5]=e[n+2],r[4]=e[n+3],r[3]=e[n+4],r[2]=e[n+5],r[1]=e[n+6],r[0]=e[n+7],t[0]}e.writeDoubleLE=n?i:o,e.writeDoubleBE=n?o:i,e.readDoubleLE=n?a:s,e.readDoubleBE=n?s:a}():function(){function t(e,t,r,n,i,o){var a,s=n<0?1:0;if(s&&(n=-n),0===n)e(0,i,o+t),e(1/n>0?0:2147483648,i,o+r);else if(isNaN(n))e(0,i,o+t),e(2146959360,i,o+r);else if(n>17976931348623157e292)e(0,i,o+t),e((s<<31|2146435072)>>>0,i,o+r);else if(n<22250738585072014e-324)e((a=n/5e-324)>>>0,i,o+t),e((s<<31|a/4294967296)>>>0,i,o+r);else{var l=Math.floor(Math.log(n)/Math.LN2);1024===l&&(l=1023),e(4503599627370496*(a=n*Math.pow(2,-l))>>>0,i,o+t),e((s<<31|l+1023<<20|1048576*a&1048575)>>>0,i,o+r)}}function r(e,t,r,n,i){var o=e(n,i+t),a=e(n,i+r),s=(a>>31)*2+1,l=a>>>20&2047,u=4294967296*(1048575&a)+o;return 2047===l?u?NaN:1/0*s:0===l?5e-324*s*u:s*Math.pow(2,l-1075)*(u+4503599627370496)}e.writeDoubleLE=t.bind(null,n,0,4),e.writeDoubleBE=t.bind(null,i,4,0),e.readDoubleLE=r.bind(null,o,0,4),e.readDoubleBE=r.bind(null,a,4,0)}(),e}function n(e,t,r){t[r]=255&e,t[r+1]=e>>>8&255,t[r+2]=e>>>16&255,t[r+3]=e>>>24}function i(e,t,r){t[r]=e>>>24,t[r+1]=e>>>16&255,t[r+2]=e>>>8&255,t[r+3]=255&e}function o(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}function a(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}t.exports=r(r)}}),require_inquire=__commonJS({"../../node_modules/.pnpm/@protobufjs+inquire@1.1.0/node_modules/@protobufjs/inquire/index.js"(exports,module){module.exports=inquire;function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(e){}return null}}}),require_utf8=__commonJS({"../../node_modules/.pnpm/@protobufjs+utf8@1.1.0/node_modules/@protobufjs/utf8/index.js"(e){var t=e;t.length=function(e){for(var t=0,r=0,n=0;n191&&n<224?o[a++]=(31&n)<<6|63&e[t++]:n>239&&n<365?(n=((7&n)<<18|(63&e[t++])<<12|(63&e[t++])<<6|63&e[t++])-65536,o[a++]=55296+(n>>10),o[a++]=56320+(1023&n)):o[a++]=(15&n)<<12|(63&e[t++])<<6|63&e[t++],a>8191&&((i||(i=[])).push(String.fromCharCode.apply(String,o)),a=0);return i?(a&&i.push(String.fromCharCode.apply(String,o.slice(0,a))),i.join("")):String.fromCharCode.apply(String,o.slice(0,a))},t.write=function(e,t,r){for(var n,i,o=r,a=0;a>6|192:((64512&n)==55296&&(64512&(i=e.charCodeAt(a+1)))==56320?(n=65536+((1023&n)<<10)+(1023&i),++a,t[r++]=n>>18|240,t[r++]=n>>12&63|128):t[r++]=n>>12|224,t[r++]=n>>6&63|128),t[r++]=63&n|128);return r-o}}}),require_pool=__commonJS({"../../node_modules/.pnpm/@protobufjs+pool@1.1.0/node_modules/@protobufjs/pool/index.js"(e,t){t.exports=r;function r(e,t,r){var n=r||8192,i=n>>>1,o=null,a=n;return function(r){if(r<1||r>i)return e(r);a+r>n&&(o=e(n),a=0);var s=t.call(o,a,a+=r);return 7&a&&(a=(7|a)+1),s}}}}),require_longbits=__commonJS({"../../node_modules/.pnpm/protobufjs@7.2.5/node_modules/protobufjs/src/util/longbits.js"(e,t){t.exports=n;var r=require_minimal();function n(e,t){this.lo=e>>>0,this.hi=t>>>0}var i=n.zero=new n(0,0);i.toNumber=function(){return 0},i.zzEncode=i.zzDecode=function(){return this},i.length=function(){return 1};var o=n.zeroHash="\x00\x00\x00\x00\x00\x00\x00\x00";n.fromNumber=function(e){if(0===e)return i;var t=e<0;t&&(e=-e);var r=e>>>0,o=(e-r)/4294967296>>>0;return t&&(o=~o>>>0,r=~r>>>0,++r>4294967295&&(r=0,++o>4294967295&&(o=0))),new n(r,o)},n.from=function(e){if("number"==typeof e)return n.fromNumber(e);if(r.isString(e)){if(!r.Long)return n.fromNumber(parseInt(e,10));e=r.Long.fromString(e)}return e.low||e.high?new n(e.low>>>0,e.high>>>0):i},n.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var t=~this.lo+1>>>0,r=~this.hi>>>0;return t||(r=r+1>>>0),-(t+4294967296*r)}return this.lo+4294967296*this.hi},n.prototype.toLong=function(e){return r.Long?new r.Long(0|this.lo,0|this.hi,!!e):{low:0|this.lo,high:0|this.hi,unsigned:!!e}};var a=String.prototype.charCodeAt;n.fromHash=function(e){return e===o?i:new n((a.call(e,0)|a.call(e,1)<<8|a.call(e,2)<<16|a.call(e,3)<<24)>>>0,(a.call(e,4)|a.call(e,5)<<8|a.call(e,6)<<16|a.call(e,7)<<24)>>>0)},n.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},n.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},n.prototype.zzDecode=function(){var e=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},n.prototype.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,r=this.hi>>>24;return 0===r?0===t?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:r<128?9:10}}}),require_minimal=__commonJS({"../../node_modules/.pnpm/protobufjs@7.2.5/node_modules/protobufjs/src/util/minimal.js"(e){var t=e;function r(e,t,r){for(var n=Object.keys(t),i=0;i0)},t.Buffer=function(){try{var e=t.inquire("buffer").Buffer;return e.prototype.utf8Write?e:null}catch(e){return null}}(),t._Buffer_from=null,t._Buffer_allocUnsafe=null,t.newBuffer=function(e){return"number"==typeof e?t.Buffer?t._Buffer_allocUnsafe(e):new t.Array(e):t.Buffer?t._Buffer_from(e):"undefined"==typeof Uint8Array?e:new Uint8Array(e)},t.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,t.Long=t.global.dcodeIO&&t.global.dcodeIO.Long||t.global.Long||t.inquire("long"),t.key2Re=/^true|false|0|1$/,t.key32Re=/^-?(?:0|[1-9][0-9]*)$/,t.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,t.longToHash=function(e){return e?t.LongBits.from(e).toHash():t.LongBits.zeroHash},t.longFromHash=function(e,r){var n=t.LongBits.fromHash(e);return t.Long?t.Long.fromBits(n.lo,n.hi,r):n.toNumber(!!r)},t.merge=r,t.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},t.newError=n,t.ProtocolError=n("ProtocolError"),t.oneOfGetter=function(e){for(var t={},r=0;r-1;--r)if(1===t[e[r]]&&void 0!==this[e[r]]&&null!==this[e[r]])return e[r]}},t.oneOfSetter=function(e){return function(t){for(var r=0;r127;)t[r++]=127&e|128,e>>>=7;t[r]=e}function h(e,t){this.len=e,this.next=void 0,this.val=t}function g(e,t,r){for(;e.hi;)t[r++]=127&e.lo|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[r++]=127&e.lo|128,e.lo=e.lo>>>7;t[r++]=e.lo}function m(e,t,r){t[r]=255&e,t[r+1]=e>>>8&255,t[r+2]=e>>>16&255,t[r+3]=e>>>24}d.create=c(),d.alloc=function(e){return new n.Array(e)},n.Array!==Array&&(d.alloc=n.pool(d.alloc,n.Array.prototype.subarray)),d.prototype._push=function(e,t,r){return this.tail=this.tail.next=new s(e,t,r),this.len+=t,this},h.prototype=Object.create(s.prototype),h.prototype.fn=f,d.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new h((e>>>=0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this},d.prototype.int32=function(e){return e<0?this._push(g,10,i.fromNumber(e)):this.uint32(e)},d.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},d.prototype.uint64=function(e){var t=i.from(e);return this._push(g,t.length(),t)},d.prototype.int64=d.prototype.uint64,d.prototype.sint64=function(e){var t=i.from(e).zzEncode();return this._push(g,t.length(),t)},d.prototype.bool=function(e){return this._push(p,1,e?1:0)},d.prototype.fixed32=function(e){return this._push(m,4,e>>>0)},d.prototype.sfixed32=d.prototype.fixed32,d.prototype.fixed64=function(e){var t=i.from(e);return this._push(m,4,t.lo)._push(m,4,t.hi)},d.prototype.sfixed64=d.prototype.fixed64,d.prototype.float=function(e){return this._push(n.float.writeFloatLE,4,e)},d.prototype.double=function(e){return this._push(n.float.writeDoubleLE,8,e)};var y=n.Array.prototype.set?function(e,t,r){t.set(e,r)}:function(e,t,r){for(var n=0;n>>0;if(!t)return this._push(p,1,0);if(n.isString(e)){var r=d.alloc(t=o.length(e));o.decode(e,r,0),e=r}return this.uint32(t)._push(y,t,e)},d.prototype.string=function(e){var t=a.length(e);return t?this.uint32(t)._push(a.write,t,e):this._push(p,1,0)},d.prototype.fork=function(){return this.states=new u(this),this.head=this.tail=new s(l,0,0),this.len=0,this},d.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new s(l,0,0),this.len=0),this},d.prototype.ldelim=function(){var e=this.head,t=this.tail,r=this.len;return this.reset().uint32(r),r&&(this.tail.next=e.next,this.tail=t,this.len+=r),this},d.prototype.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),r=0;e;)e.fn(e.val,t,r),r+=e.len,e=e.next;return t},d._configure=function(e){r=e,d.create=c(),r._configure()}}}),require_writer_buffer=__commonJS({"../../node_modules/.pnpm/protobufjs@7.2.5/node_modules/protobufjs/src/writer_buffer.js"(e,t){t.exports=i;var r=require_writer();(i.prototype=Object.create(r.prototype)).constructor=i;var n=require_minimal();function i(){r.call(this)}function o(e,t,r){e.length<40?n.utf8.write(e,t,r):t.utf8Write?t.utf8Write(e,r):t.write(e,r)}i._configure=function(){i.alloc=n._Buffer_allocUnsafe,i.writeBytesBuffer=n.Buffer&&n.Buffer.prototype instanceof Uint8Array&&"set"===n.Buffer.prototype.set.name?function(e,t,r){t.set(e,r)}:function(e,t,r){if(e.copy)e.copy(t,r,0,e.length);else for(var n=0;n>>0;return this.uint32(t),t&&this._push(i.writeBytesBuffer,t,e),this},i.prototype.string=function(e){var t=n.Buffer.byteLength(e);return this.uint32(t),t&&this._push(o,t,e),this},i._configure()}}),require_reader=__commonJS({"../../node_modules/.pnpm/protobufjs@7.2.5/node_modules/protobufjs/src/reader.js"(e,t){t.exports=s;var r,n=require_minimal(),i=n.LongBits,o=n.utf8;function a(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function s(e){this.buf=e,this.pos=0,this.len=e.length}var l="undefined"!=typeof Uint8Array?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new s(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new s(e);throw Error("illegal buffer")},u=function(){return n.Buffer?function(e){return(s.create=function(e){return n.Buffer.isBuffer(e)?new r(e):l(e)})(e)}:l};function d(){var e=new i(0,0),t=0;if(this.len-this.pos>4){for(;t<4;++t)if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e;t=0}else{for(;t<3;++t){if(this.pos>=this.len)throw a(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e}return e.lo=(e.lo|(127&this.buf[this.pos++])<<7*t)>>>0,e}if(this.len-this.pos>4){for(;t<5;++t)if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}else for(;t<5;++t){if(this.pos>=this.len)throw a(this);if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}function c(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function p(){if(this.pos+8>this.len)throw a(this,8);return new i(c(this.buf,this.pos+=4),c(this.buf,this.pos+=4))}s.create=u(),s.prototype._slice=n.Array.prototype.subarray||n.Array.prototype.slice,s.prototype.uint32=function(){var e=4294967295;return function(){if(e=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128||(e=(e|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)||(e=(e|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)||(e=(e|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)||(e=(e|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128))return e;if((this.pos+=5)>this.len)throw this.pos=this.len,a(this,10);return e}}(),s.prototype.int32=function(){return 0|this.uint32()},s.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)|0},s.prototype.bool=function(){return 0!==this.uint32()},s.prototype.fixed32=function(){if(this.pos+4>this.len)throw a(this,4);return c(this.buf,this.pos+=4)},s.prototype.sfixed32=function(){if(this.pos+4>this.len)throw a(this,4);return 0|c(this.buf,this.pos+=4)},s.prototype.float=function(){if(this.pos+4>this.len)throw a(this,4);var e=n.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e},s.prototype.double=function(){if(this.pos+8>this.len)throw a(this,4);var e=n.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e},s.prototype.bytes=function(){var e=this.uint32(),t=this.pos,r=this.pos+e;if(r>this.len)throw a(this,e);if(this.pos+=e,Array.isArray(this.buf))return this.buf.slice(t,r);if(t===r){var i=n.Buffer;return i?i.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,t,r)},s.prototype.string=function(){var e=this.bytes();return o.read(e,0,e.length)},s.prototype.skip=function(e){if("number"==typeof e){if(this.pos+e>this.len)throw a(this,e);this.pos+=e}else do if(this.pos>=this.len)throw a(this);while(128&this.buf[this.pos++]);return this},s.prototype.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!=(e=7&this.uint32());)this.skipType(e);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this},s._configure=function(e){r=e,s.create=u(),r._configure();var t=n.Long?"toLong":"toNumber";n.merge(s.prototype,{int64:function(){return d.call(this)[t](!1)},uint64:function(){return d.call(this)[t](!0)},sint64:function(){return d.call(this).zzDecode()[t](!1)},fixed64:function(){return p.call(this)[t](!0)},sfixed64:function(){return p.call(this)[t](!1)}})}}}),require_reader_buffer=__commonJS({"../../node_modules/.pnpm/protobufjs@7.2.5/node_modules/protobufjs/src/reader_buffer.js"(e,t){t.exports=i;var r=require_reader();(i.prototype=Object.create(r.prototype)).constructor=i;var n=require_minimal();function i(e){r.call(this,e)}i._configure=function(){n.Buffer&&(i.prototype._slice=n.Buffer.prototype.slice)},i.prototype.string=function(){var e=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+e,this.len))},i._configure()}}),require_service=__commonJS({"../../node_modules/.pnpm/protobufjs@7.2.5/node_modules/protobufjs/src/rpc/service.js"(e,t){t.exports=n;var r=require_minimal();function n(e,t,n){if("function"!=typeof e)throw TypeError("rpcImpl must be a function");r.EventEmitter.call(this),this.rpcImpl=e,this.requestDelimited=!!t,this.responseDelimited=!!n}(n.prototype=Object.create(r.EventEmitter.prototype)).constructor=n,n.prototype.rpcCall=function e(t,n,i,o,a){if(!o)throw TypeError("request must be specified");var s=this;if(!a)return r.asPromise(e,s,t,n,i,o);if(!s.rpcImpl){setTimeout(function(){a(Error("already ended"))},0);return}try{return s.rpcImpl(t,n[s.requestDelimited?"encodeDelimited":"encode"](o).finish(),function(e,r){if(e)return s.emit("error",e,t),a(e);if(null===r){s.end(!0);return}if(!(r instanceof i))try{r=i[s.responseDelimited?"decodeDelimited":"decode"](r)}catch(e){return s.emit("error",e,t),a(e)}return s.emit("data",r,t),a(null,r)})}catch(e){s.emit("error",e,t),setTimeout(function(){a(e)},0);return}},n.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}}}),require_rpc=__commonJS({"../../node_modules/.pnpm/protobufjs@7.2.5/node_modules/protobufjs/src/rpc.js"(e){e.Service=require_service()}}),require_roots=__commonJS({"../../node_modules/.pnpm/protobufjs@7.2.5/node_modules/protobufjs/src/roots.js"(e,t){t.exports={}}}),require_index_minimal=__commonJS({"../../node_modules/.pnpm/protobufjs@7.2.5/node_modules/protobufjs/src/index-minimal.js"(e){var t=e;function r(){t.util._configure(),t.Writer._configure(t.BufferWriter),t.Reader._configure(t.BufferReader)}t.build="minimal",t.Writer=require_writer(),t.BufferWriter=require_writer_buffer(),t.Reader=require_reader(),t.BufferReader=require_reader_buffer(),t.util=require_minimal(),t.rpc=require_rpc(),t.roots=require_roots(),t.configure=r,r()}}),require_minimal2=__commonJS({"../../node_modules/.pnpm/protobufjs@7.2.5/node_modules/protobufjs/minimal.js"(e,t){t.exports=require_index_minimal()}}),wasm=null;try{wasm=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(e){}function Long(e,t,r){this.low=0|e,this.high=0|t,this.unsigned=!!r}function isLong(e){return!0===(e&&e.__isLong__)}function ctz32(e){var t=Math.clz32(e&-e);return e?31-t:t}Long.prototype.__isLong__,Object.defineProperty(Long.prototype,"__isLong__",{value:!0}),Long.isLong=isLong;var INT_CACHE={},UINT_CACHE={};function fromInt(e,t){var r,n,i;return t?(e>>>=0,(i=0<=e&&e<256)&&(n=UINT_CACHE[e]))?n:(r=fromBits(e,0,!0),i&&(UINT_CACHE[e]=r),r):(e|=0,(i=-128<=e&&e<128)&&(n=INT_CACHE[e]))?n:(r=fromBits(e,e<0?-1:0,!1),i&&(INT_CACHE[e]=r),r)}function fromNumber(e,t){if(isNaN(e))return t?UZERO:ZERO;if(t){if(e<0)return UZERO;if(e>=TWO_PWR_64_DBL)return MAX_UNSIGNED_VALUE}else{if(e<=-TWO_PWR_63_DBL)return MIN_VALUE;if(e+1>=TWO_PWR_63_DBL)return MAX_VALUE}return e<0?fromNumber(-e,t).neg():fromBits(e%TWO_PWR_32_DBL|0,e/TWO_PWR_32_DBL|0,t)}function fromBits(e,t,r){return new Long(e,t,r)}Long.fromInt=fromInt,Long.fromNumber=fromNumber,Long.fromBits=fromBits;var pow_dbl=Math.pow;function fromString(e,t,r){if(0===e.length)throw Error("empty string");if("number"==typeof t?(r=t,t=!1):t=!!t,"NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return t?UZERO:ZERO;if((r=r||10)<2||360)throw Error("interior hyphen");if(0===n)return fromString(e.substring(1),t,r).neg();for(var n,i=fromNumber(pow_dbl(r,8)),o=ZERO,a=0;a>>0:this.low},LongPrototype.toNumber=function(){return this.unsigned?(this.high>>>0)*TWO_PWR_32_DBL+(this.low>>>0):this.high*TWO_PWR_32_DBL+(this.low>>>0)},LongPrototype.toString=function(e){if((e=e||10)<2||36>>0).toString(e);if((o=s).isZero())return l+a;for(;l.length<6;)l="0"+l;a=""+l+a}},LongPrototype.getHighBits=function(){return this.high},LongPrototype.getHighBitsUnsigned=function(){return this.high>>>0},LongPrototype.getLowBits=function(){return this.low},LongPrototype.getLowBitsUnsigned=function(){return this.low>>>0},LongPrototype.getNumBitsAbs=function(){if(this.isNegative())return this.eq(MIN_VALUE)?64:this.neg().getNumBitsAbs();for(var e=0!=this.high?this.high:this.low,t=31;t>0&&(e&1<=0},LongPrototype.isOdd=function(){return(1&this.low)==1},LongPrototype.isEven=function(){return(1&this.low)==0},LongPrototype.equals=function(e){return isLong(e)||(e=fromValue(e)),(this.unsigned===e.unsigned||this.high>>>31!=1||e.high>>>31!=1)&&this.high===e.high&&this.low===e.low},LongPrototype.eq=LongPrototype.equals,LongPrototype.notEquals=function(e){return!this.eq(e)},LongPrototype.neq=LongPrototype.notEquals,LongPrototype.ne=LongPrototype.notEquals,LongPrototype.lessThan=function(e){return 0>this.comp(e)},LongPrototype.lt=LongPrototype.lessThan,LongPrototype.lessThanOrEqual=function(e){return 0>=this.comp(e)},LongPrototype.lte=LongPrototype.lessThanOrEqual,LongPrototype.le=LongPrototype.lessThanOrEqual,LongPrototype.greaterThan=function(e){return this.comp(e)>0},LongPrototype.gt=LongPrototype.greaterThan,LongPrototype.greaterThanOrEqual=function(e){return this.comp(e)>=0},LongPrototype.gte=LongPrototype.greaterThanOrEqual,LongPrototype.ge=LongPrototype.greaterThanOrEqual,LongPrototype.compare=function(e){if(isLong(e)||(e=fromValue(e)),this.eq(e))return 0;var t=this.isNegative(),r=e.isNegative();return t&&!r?-1:!t&&r?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1},LongPrototype.comp=LongPrototype.compare,LongPrototype.negate=function(){return!this.unsigned&&this.eq(MIN_VALUE)?MIN_VALUE:this.not().add(ONE)},LongPrototype.neg=LongPrototype.negate,LongPrototype.add=function(e){isLong(e)||(e=fromValue(e));var t,r,n=this.high>>>16,i=65535&this.high,o=this.low>>>16,a=65535&this.low,s=e.high>>>16,l=65535&e.high,u=e.low>>>16,d=65535&e.low,c=0,p=0;return t=0+((r=0+(a+d))>>>16),r&=65535,t+=o+u,p+=t>>>16,t&=65535,p+=i+l,c+=p>>>16,p&=65535,c+=n+s,fromBits(t<<16|r,(c&=65535)<<16|p,this.unsigned)},LongPrototype.subtract=function(e){return isLong(e)||(e=fromValue(e)),this.add(e.neg())},LongPrototype.sub=LongPrototype.subtract,LongPrototype.multiply=function(e){if(this.isZero())return this;if(isLong(e)||(e=fromValue(e)),wasm)return fromBits(wasm.mul(this.low,this.high,e.low,e.high),wasm.get_high(),this.unsigned);if(e.isZero())return this.unsigned?UZERO:ZERO;if(this.eq(MIN_VALUE))return e.isOdd()?MIN_VALUE:ZERO;if(e.eq(MIN_VALUE))return this.isOdd()?MIN_VALUE:ZERO;if(this.isNegative())return e.isNegative()?this.neg().mul(e.neg()):this.neg().mul(e).neg();if(e.isNegative())return this.mul(e.neg()).neg();if(this.lt(TWO_PWR_24)&&e.lt(TWO_PWR_24))return fromNumber(this.toNumber()*e.toNumber(),this.unsigned);var t,r,n=this.high>>>16,i=65535&this.high,o=this.low>>>16,a=65535&this.low,s=e.high>>>16,l=65535&e.high,u=e.low>>>16,d=65535&e.low,c=0,p=0;return t=0+((r=0+a*d)>>>16),r&=65535,t+=o*d,p+=t>>>16,t&=65535,t+=a*u,p+=t>>>16,t&=65535,p+=i*d,c+=p>>>16,p&=65535,p+=o*u,c+=p>>>16,p&=65535,p+=a*l,c+=p>>>16,p&=65535,c+=n*d+i*u+o*l+a*s,fromBits(t<<16|r,(c&=65535)<<16|p,this.unsigned)},LongPrototype.mul=LongPrototype.multiply,LongPrototype.divide=function(e){if(isLong(e)||(e=fromValue(e)),e.isZero())throw Error("division by zero");if(wasm){var t,r,n;return this.unsigned||-2147483648!==this.high||-1!==e.low||-1!==e.high?fromBits((this.unsigned?wasm.div_u:wasm.div_s)(this.low,this.high,e.low,e.high),wasm.get_high(),this.unsigned):this}if(this.isZero())return this.unsigned?UZERO:ZERO;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return UZERO;if(e.gt(this.shru(1)))return UONE;n=UZERO}else{if(this.eq(MIN_VALUE))return e.eq(ONE)||e.eq(NEG_ONE)?MIN_VALUE:e.eq(MIN_VALUE)?ONE:(t=this.shr(1).div(e).shl(1)).eq(ZERO)?e.isNegative()?ONE:NEG_ONE:(r=this.sub(e.mul(t)),n=t.add(r.div(e)));if(e.eq(MIN_VALUE))return this.unsigned?UZERO:ZERO;if(this.isNegative())return e.isNegative()?this.neg().div(e.neg()):this.neg().div(e).neg();if(e.isNegative())return this.div(e.neg()).neg();n=ZERO}for(r=this;r.gte(e);){for(var i=Math.ceil(Math.log(t=Math.max(1,Math.floor(r.toNumber()/e.toNumber())))/Math.LN2),o=i<=48?1:pow_dbl(2,i-48),a=fromNumber(t),s=a.mul(e);s.isNegative()||s.gt(r);)t-=o,s=(a=fromNumber(t,this.unsigned)).mul(e);a.isZero()&&(a=ONE),n=n.add(a),r=r.sub(s)}return n},LongPrototype.div=LongPrototype.divide,LongPrototype.modulo=function(e){return(isLong(e)||(e=fromValue(e)),wasm)?fromBits((this.unsigned?wasm.rem_u:wasm.rem_s)(this.low,this.high,e.low,e.high),wasm.get_high(),this.unsigned):this.sub(this.div(e).mul(e))},LongPrototype.mod=LongPrototype.modulo,LongPrototype.rem=LongPrototype.modulo,LongPrototype.not=function(){return fromBits(~this.low,~this.high,this.unsigned)},LongPrototype.countLeadingZeros=function(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32},LongPrototype.clz=LongPrototype.countLeadingZeros,LongPrototype.countTrailingZeros=function(){return this.low?ctz32(this.low):ctz32(this.high)+32},LongPrototype.ctz=LongPrototype.countTrailingZeros,LongPrototype.and=function(e){return isLong(e)||(e=fromValue(e)),fromBits(this.low&e.low,this.high&e.high,this.unsigned)},LongPrototype.or=function(e){return isLong(e)||(e=fromValue(e)),fromBits(this.low|e.low,this.high|e.high,this.unsigned)},LongPrototype.xor=function(e){return isLong(e)||(e=fromValue(e)),fromBits(this.low^e.low,this.high^e.high,this.unsigned)},LongPrototype.shiftLeft=function(e){return(isLong(e)&&(e=e.toInt()),0==(e&=63))?this:e<32?fromBits(this.low<>>32-e,this.unsigned):fromBits(0,this.low<>>e|this.high<<32-e,this.high>>e,this.unsigned):fromBits(this.high>>e-32,this.high>=0?0:-1,this.unsigned)},LongPrototype.shr=LongPrototype.shiftRight,LongPrototype.shiftRightUnsigned=function(e){return(isLong(e)&&(e=e.toInt()),0==(e&=63))?this:e<32?fromBits(this.low>>>e|this.high<<32-e,this.high>>>e,this.unsigned):32===e?fromBits(this.high,0,this.unsigned):fromBits(this.high>>>e-32,0,this.unsigned)},LongPrototype.shru=LongPrototype.shiftRightUnsigned,LongPrototype.shr_u=LongPrototype.shiftRightUnsigned,LongPrototype.rotateLeft=function(e){var t;return(isLong(e)&&(e=e.toInt()),0==(e&=63))?this:32===e?fromBits(this.high,this.low,this.unsigned):e<32?(t=32-e,fromBits(this.low<>>t,this.high<>>t,this.unsigned)):(e-=32,t=32-e,fromBits(this.high<>>t,this.low<>>t,this.unsigned))},LongPrototype.rotl=LongPrototype.rotateLeft,LongPrototype.rotateRight=function(e){var t;return(isLong(e)&&(e=e.toInt()),0==(e&=63))?this:32===e?fromBits(this.high,this.low,this.unsigned):e<32?(t=32-e,fromBits(this.high<>>e,this.low<>>e,this.unsigned)):(e-=32,t=32-e,fromBits(this.low<>>e,this.high<>>e,this.unsigned))},LongPrototype.rotr=LongPrototype.rotateRight,LongPrototype.toSigned=function(){return this.unsigned?fromBits(this.low,this.high,!1):this},LongPrototype.toUnsigned=function(){return this.unsigned?this:fromBits(this.low,this.high,!0)},LongPrototype.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},LongPrototype.toBytesLE=function(){var e=this.high,t=this.low;return[255&t,t>>>8&255,t>>>16&255,t>>>24,255&e,e>>>8&255,e>>>16&255,e>>>24]},LongPrototype.toBytesBE=function(){var e=this.high,t=this.low;return[e>>>24,e>>>16&255,e>>>8&255,255&e,t>>>24,t>>>16&255,t>>>8&255,255&t]},Long.fromBytes=function(e,t,r){return r?Long.fromBytesLE(e,t):Long.fromBytesBE(e,t)},Long.fromBytesLE=function(e,t){return new Long(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,t)},Long.fromBytesBE=function(e,t){return new Long(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],t)};var long_default=Long,import_minimal3=__toESM(require_minimal2()),import_minimal=__toESM(require_minimal2());function createBaseCoin(){return{denom:"",amount:""}}var Coin={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:import_minimal.default.Writer.create();return""!==e.denom&&t.uint32(10).string(e.denom),""!==e.amount&&t.uint32(18).string(e.amount),t},decode(e,t){let r=e instanceof import_minimal.default.Reader?e:import_minimal.default.Reader.create(e),n=void 0===t?r.len:r.pos+t,i=createBaseCoin();for(;r.pos>>3){case 1:if(10!==e)break;i.denom=r.string();continue;case 2:if(18!==e)break;i.amount=r.string();continue}if((7&e)==4||0===e)break;r.skipType(7&e)}return i},fromJSON:e=>({denom:isSet(e.denom)?globalThis.String(e.denom):"",amount:isSet(e.amount)?globalThis.String(e.amount):""}),toJSON(e){let t={};return""!==e.denom&&(t.denom=e.denom),""!==e.amount&&(t.amount=e.amount),t},create:e=>Coin.fromPartial(null!=e?e:{}),fromPartial(e){var t,r;let n=createBaseCoin();return n.denom=null!==(t=e.denom)&&void 0!==t?t:"",n.amount=null!==(r=e.amount)&&void 0!==r?r:"",n}};function isSet(e){return null!=e}import_minimal.default.util.Long!==long_default&&(import_minimal.default.util.Long=long_default,import_minimal.default.configure());var import_minimal2=__toESM(require_minimal2());function createBaseMsgRegisterAccount(){return{sender:"",codeId:long_default.UZERO,msg:new Uint8Array(0),funds:[],salt:new Uint8Array(0)}}import_minimal2.default.util.Long!==long_default&&(import_minimal2.default.util.Long=long_default,import_minimal2.default.configure());var MsgRegisterAccount={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:import_minimal3.default.Writer.create();for(let r of(""!==e.sender&&t.uint32(10).string(e.sender),e.codeId.isZero()||t.uint32(16).uint64(e.codeId),0!==e.msg.length&&t.uint32(26).bytes(e.msg),e.funds))Coin.encode(r,t.uint32(34).fork()).ldelim();return 0!==e.salt.length&&t.uint32(42).bytes(e.salt),t},decode(e,t){let r=e instanceof import_minimal3.default.Reader?e:import_minimal3.default.Reader.create(e),n=void 0===t?r.len:r.pos+t,i=createBaseMsgRegisterAccount();for(;r.pos>>3){case 1:if(10!==e)break;i.sender=r.string();continue;case 2:if(16!==e)break;i.codeId=r.uint64();continue;case 3:if(26!==e)break;i.msg=r.bytes();continue;case 4:if(34!==e)break;i.funds.push(Coin.decode(r,r.uint32()));continue;case 5:if(42!==e)break;i.salt=r.bytes();continue}if((7&e)==4||0===e)break;r.skipType(7&e)}return i},fromJSON:e=>({sender:isSet2(e.sender)?globalThis.String(e.sender):"",codeId:isSet2(e.codeId)?long_default.fromValue(e.codeId):long_default.UZERO,msg:isSet2(e.msg)?bytesFromBase64(e.msg):new Uint8Array(0),funds:globalThis.Array.isArray(null==e?void 0:e.funds)?e.funds.map(e=>Coin.fromJSON(e)):[],salt:isSet2(e.salt)?bytesFromBase64(e.salt):new Uint8Array(0)}),toJSON(e){var t;let r={};return""!==e.sender&&(r.sender=e.sender),e.codeId.isZero()||(r.codeId=(e.codeId||long_default.UZERO).toString()),0!==e.msg.length&&(r.msg=base64FromBytes(e.msg)),(null===(t=e.funds)||void 0===t?void 0:t.length)&&(r.funds=e.funds.map(e=>Coin.toJSON(e))),0!==e.salt.length&&(r.salt=base64FromBytes(e.salt)),r},create:e=>MsgRegisterAccount.fromPartial(null!=e?e:{}),fromPartial(e){var t,r,n,i;let o=createBaseMsgRegisterAccount();return o.sender=null!==(r=e.sender)&&void 0!==r?r:"",o.codeId=void 0!==e.codeId&&null!==e.codeId?long_default.fromValue(e.codeId):long_default.UZERO,o.msg=null!==(n=e.msg)&&void 0!==n?n:new Uint8Array(0),o.funds=(null===(t=e.funds)||void 0===t?void 0:t.map(e=>Coin.fromPartial(e)))||[],o.salt=null!==(i=e.salt)&&void 0!==i?i:new Uint8Array(0),o}};function createBaseMsgRegisterAccountResponse(){return{address:"",data:new Uint8Array(0)}}var MsgRegisterAccountResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:import_minimal3.default.Writer.create();return""!==e.address&&t.uint32(10).string(e.address),0!==e.data.length&&t.uint32(18).bytes(e.data),t},decode(e,t){let r=e instanceof import_minimal3.default.Reader?e:import_minimal3.default.Reader.create(e),n=void 0===t?r.len:r.pos+t,i=createBaseMsgRegisterAccountResponse();for(;r.pos>>3){case 1:if(10!==e)break;i.address=r.string();continue;case 2:if(18!==e)break;i.data=r.bytes();continue}if((7&e)==4||0===e)break;r.skipType(7&e)}return i},fromJSON:e=>({address:isSet2(e.address)?globalThis.String(e.address):"",data:isSet2(e.data)?bytesFromBase64(e.data):new Uint8Array(0)}),toJSON(e){let t={};return""!==e.address&&(t.address=e.address),0!==e.data.length&&(t.data=base64FromBytes(e.data)),t},create:e=>MsgRegisterAccountResponse.fromPartial(null!=e?e:{}),fromPartial(e){var t,r;let n=createBaseMsgRegisterAccountResponse();return n.address=null!==(t=e.address)&&void 0!==t?t:"",n.data=null!==(r=e.data)&&void 0!==r?r:new Uint8Array(0),n}};function bytesFromBase64(e){if(globalThis.Buffer)return Uint8Array.from(globalThis.Buffer.from(e,"base64"));{let t=globalThis.atob(e),r=new Uint8Array(t.length);for(let e=0;e{t.push(globalThis.String.fromCharCode(e))}),globalThis.btoa(t.join(""))}}function isSet2(e){return null!=e}import_minimal3.default.util.Long!==long_default&&(import_minimal3.default.util.Long=long_default,import_minimal3.default.configure());var typeUrlMsgRegisterAccount="/abstractaccount.v1.MsgRegisterAccount",typeUrlMsgRegisterAccountResponse="/abstractaccount.v1.MsgRegisterAccountResponse",abstractAccountTypes=[[typeUrlMsgRegisterAccount,MsgRegisterAccount],[typeUrlMsgRegisterAccountResponse,MsgRegisterAccountResponse]],AbstractAccount$Type=class extends _protobuf_ts_runtime__WEBPACK_IMPORTED_MODULE_14__.C{create(e){let t=globalThis.Object.create(this.messagePrototype);return t.address="",t.accountNumber=0n,t.sequence=0n,void 0!==e&&(0,_protobuf_ts_runtime__WEBPACK_IMPORTED_MODULE_15__.l)(this,t,e),t}internalBinaryRead(e,t,r,n){let i=null!=n?n:this.create(),o=e.pos+t;for(;e.pos(apolloClientInstance||(apolloClientInstance=new _apollo_client__WEBPACK_IMPORTED_MODULE_18__.f({uri:e||"https://api.subquery.network/sq/burnt-labs/xion-indexer",cache:new _apollo_client__WEBPACK_IMPORTED_MODULE_19__.h,assumeImmutableResults:!0})),apolloClientInstance);function uint64FromProto(e){return _cosmjs_math__WEBPACK_IMPORTED_MODULE_8__.Uint64.fromString(e.toString())}function accountFromBaseAccount(e){let{address:t,pubKey:r,accountNumber:n,sequence:i}=e,o=null;return r&&(o=(0,_cosmjs_proto_signing__WEBPACK_IMPORTED_MODULE_4__.decodePubkey)(r)),{address:t,pubkey:o,accountNumber:uint64FromProto(n).toNumber(),sequence:uint64FromProto(i).toNumber()}}function customAccountFromAny(e){let{typeUrl:t,value:r}=e;if("/abstractaccount.v1.AbstractAccount"===t){let e=AbstractAccount.fromBinary(r);return(0,_cosmjs_utils__WEBPACK_IMPORTED_MODULE_9__.assert)(e),accountFromBaseAccount(e)}return(0,_cosmjs_stargate_build_accounts__WEBPACK_IMPORTED_MODULE_10__.accountFromAny)(e)}function makeAAuthInfo(e,t,r){return cosmjs_types_cosmos_tx_v1beta1_tx__WEBPACK_IMPORTED_MODULE_3__.AuthInfo.fromPartial({signerInfos:[cosmjs_types_cosmos_tx_v1beta1_tx__WEBPACK_IMPORTED_MODULE_3__.SignerInfo.fromPartial({publicKey:{typeUrl:"/abstractaccount.v1.NilPubKey",value:new Uint8Array([10,32,...t])},modeInfo:{single:{mode:cosmjs_types_cosmos_tx_signing_v1beta1_signing__WEBPACK_IMPORTED_MODULE_6__.SignMode.SIGN_MODE_DIRECT}},sequence:BigInt(e.sequence)})],fee:{amount:r.amount?(0,_cosmjs_amino__WEBPACK_IMPORTED_MODULE_7__.coins)(r.amount[0].amount,r.amount[0].denom):(0,_cosmjs_amino__WEBPACK_IMPORTED_MODULE_7__.coins)(1,"uxion"),gasLimit:BigInt(r.gas),granter:r.granter||"",payer:r.payer||""}})}async function getAAccounts(e,t,r){let n={address:"",accountAddress:"",algo:"secp256k1",pubkey:new Uint8Array,authenticatorId:0},i=[],o=getApolloClient(r);if(!o||!e||0===e.length)return[n];for(let r of e){let{data:e}=await o.query({query:AllSmartWalletQueryByIdAndTypeAndAuthenticator,variables:{id:t,type:AAAlgo[r.algo],authenticator:Buffer.from(r.pubkey).toString("base64")}});if(e){let t=e.smartAccounts;if(!t.nodes.length)continue;for(let e of t.nodes){let t=e.authenticators;if(t.nodes.length)for(let e of t.nodes)i.push({address:"xion"+e.authenticatorId.split("xion")[1],accountAddress:r.address,algo:e.type.toLowerCase(),pubkey:new Uint8Array,authenticatorId:Number(e.authenticatorId.split("xion")[2])})}}}return i}async function getAuthenticatorIdByAuthenticatorIndex(e,t,r){let n=getApolloClient(r),{data:i}=await n.query({query:SmartWalletIndexQueryByAccountId,variables:{id:e,index:t}});return i&&i.smartAccounts?(i.smartAccounts.nodes.length>1&&console.warn("Unexpected behavior. Indexer returned multiple smart accounts"),i.smartAccounts.nodes[0].authenticators.nodes.length>1&&console.warn("Unexpected behavior. Indexer returned multiple authenticators"),i.smartAccounts.nodes[0].authenticators.nodes[0].authenticatorIndex||0):0}function encodeHex(e){return[...e].map(e=>e.toString(16).padStart(2,"0")).join("")}var AADefaultRegistryTypes=[..._cosmjs_stargate__WEBPACK_IMPORTED_MODULE_1__.defaultRegistryTypes,..._cosmjs_cosmwasm_stargate__WEBPACK_IMPORTED_MODULE_11__.dv,...abstractAccountTypes];function createDefaultRegistry(){return new _cosmjs_proto_signing__WEBPACK_IMPORTED_MODULE_4__.Registry(AADefaultRegistryTypes)}var AAClient=class extends _cosmjs_cosmwasm_stargate__WEBPACK_IMPORTED_MODULE_11__.Fl{static async connectWithSigner(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return new AAClient(await _cosmjs_tendermint_rpc__WEBPACK_IMPORTED_MODULE_5__.Tendermint37Client.connect(e),t,{registry:createDefaultRegistry(),...r,accountParser:customAccountFromAny})}async registerAbstractAccount(e){let{sender:t}=e,r={typeUrl:typeUrlMsgRegisterAccount,value:e};return this.signAndBroadcast(t,[r],"auto")}async addAbstractAccountAuthenticator(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2?arguments[2]:void 0;if(!this.abstractSigner.abstractAccount)throw Error("Abstract account address not set in signer");let n=this.abstractSigner.abstractAccount,i={typeUrl:"/cosmwasm.wasm.v1.MsgExecuteContract",value:cosmjs_types_cosmwasm_wasm_v1_tx__WEBPACK_IMPORTED_MODULE_12__.MsgExecuteContract.fromPartial({sender:n,contract:n,msg:Buffer.from(JSON.stringify(e),"utf-8"),funds:[]})},o=await this.sign(n,[i],r,t);return this.broadcastTx(cosmjs_types_cosmos_tx_v1beta1_tx__WEBPACK_IMPORTED_MODULE_3__.TxRaw.encode(o).finish())}async getAccount(e){let t=await this.forceGetQueryClient().auth.account(e);return t?customAccountFromAny(t):null}async sign(e,t,r,n,i){let o;let a=await this.getAccount(e);if(a&&a.pubkey)return this.abstractSigner.abstractAccount=void 0,super.sign(e,t,r,n,i);this.abstractSigner.abstractAccount||(this.abstractSigner.abstractAccount=e);let s=(await this.abstractSigner.getAccounts()).find(e=>e.authenticatorId===this.abstractSigner.accountAuthenticatorIndex);if(!s)throw Error("Failed to retrieve account from signer");if(!a)throw Error("Failed to retrieve AA account from chain");if(i)o=i;else{let{accountNumber:e,sequence:t}=a;o={accountNumber:e,sequence:t,chainId:await this.getChainId()}}let l=bech32__WEBPACK_IMPORTED_MODULE_2__.gW.fromWords(bech32__WEBPACK_IMPORTED_MODULE_2__.gW.decode(s.address).words),u={typeUrl:"/cosmos.tx.v1beta1.TxBody",value:{messages:t,memo:n}},d=makeAAuthInfo(a,Uint8Array.from(l),r),c=this.registry.encode(u),p=cosmjs_types_cosmos_tx_v1beta1_tx__WEBPACK_IMPORTED_MODULE_3__.AuthInfo.encode(d).finish(),f=cosmjs_types_cosmos_tx_v1beta1_tx__WEBPACK_IMPORTED_MODULE_3__.SignDoc.fromPartial({bodyBytes:c,authInfoBytes:p,chainId:o.chainId,accountNumber:BigInt(a.accountNumber)}),h=await this.abstractSigner.signDirect(s.accountAddress,f).then(e=>Buffer.from(new Uint8Array([s.authenticatorId,...Buffer.from(e.signature.signature,"base64")])).toString("base64"));return cosmjs_types_cosmos_tx_v1beta1_tx__WEBPACK_IMPORTED_MODULE_3__.TxRaw.fromPartial({bodyBytes:c,authInfoBytes:p,signatures:[Buffer.from(h,"base64")]})}constructor(e,t,r){super(e,t,r),this.abstractSigner=t}},AASigner=class{signDirect(e,t){return Promise.resolve({signed:t,signature:{signature:"",pub_key:{type:"tendermint/PubKeySecp256k1",value:new Uint8Array}}})}constructor(e){this.abstractAccount=e}},AADefaultSigner=class extends AASigner{getAccounts(){throw Error("Cannot get accounts from default signer")}constructor(e){super(e)}},AADirectSigner=class extends AASigner{async signDirect(e,t){let r=(0,_cosmjs_proto_signing__WEBPACK_IMPORTED_MODULE_4__.makeSignBytes)(t),n=await this.signArbFn(t.chainId,e,r);return{signed:t,signature:{pub_key:{type:"tendermint/PubKeySecp256k1",value:""},signature:n.signature}}}async getAccounts(){let e=await this.signer.getAccounts();return 0===e.length?[]:void 0===this.abstractAccount?e.map(e=>({...e,authenticatorId:0,accountAddress:e.address})):await getAAccounts(e,this.abstractAccount,this.indexerUrl)}constructor(e,t,r,n,i){super(t),this.signer=e,this.accountAuthenticatorIndex=r,this.signArbFn=n,this.indexerUrl=i||"https://api.subquery.network/sq/burnt-labs/xion-indexer"}},AbstractAccountJWTSigner=class extends AASigner{async getAccounts(){return void 0===this.abstractAccount?[]:[{address:this.abstractAccount,algo:"secp256k1",pubkey:new Uint8Array,authenticatorId:await getAuthenticatorIdByAuthenticatorIndex(this.abstractAccount,this.accountAuthenticatorIndex,this.indexerUrl),accountAddress:this.abstractAccount,aaalgo:"jwt"}]}async signDirect(e,t){if(void 0===this.sessionToken)throw Error("stytch session token is undefined");let r=cosmjs_types_cosmos_tx_v1beta1_tx__WEBPACK_IMPORTED_MODULE_3__.SignDoc.encode(t).finish(),n=(0,_cosmjs_crypto__WEBPACK_IMPORTED_MODULE_13__.sha256)(r),i=Buffer.from(n).toString("base64"),o=await fetch("https://aa.xion-testnet-1.burnt.com/api/v1/sessions/authenticate",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({session_token:this.sessionToken,session_duration_minutes:43200,session_custom_claims:{transaction_hash:i}})});if(!o.ok)throw Error("Failed to authenticate with stytch");let a=await o.json();return{signed:t,signature:{pub_key:{type:"",value:new Uint8Array},signature:Buffer.from(a.data.session_jwt,"utf-8").toString("base64")}}}async signDirectArb(e){if(void 0===this.sessionToken)throw Error("stytch session token is undefined");let t=(0,_cosmjs_crypto__WEBPACK_IMPORTED_MODULE_13__.sha256)(Buffer.from(e,"utf-8")),r=Buffer.from(t).toString("base64"),n=await fetch("https://aa.xion-testnet-1.burnt.com/api/v1/sessions/authenticate",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({session_token:this.sessionToken,session_duration_minutes:43200,session_custom_claims:{transaction_hash:r}})});if(!n.ok)throw Error("Failed to authenticate with stytch");let i=await n.json();return{signature:Buffer.from(i.data.session_jwt,"utf-8").toString("base64")}}constructor(e,t,r,n){super(e),this.sessionToken=r,this.accountAuthenticatorIndex=t,this.indexerUrl=n||"https://api.subquery.network/sq/burnt-labs/xion-indexer"}},AAEthSigner=class extends AASigner{async signDirect(e,t){let r="0x"+encodeHex((0,_cosmjs_proto_signing__WEBPACK_IMPORTED_MODULE_4__.makeSignBytes)(t)),n=await this.personalSign(r),i=new Uint8Array(n.match(/[\da-f]{2}/gi).map(e=>parseInt(e,16)));return{signed:t,signature:{pub_key:{type:"tendermint/PubKeySecp256k1",value:""},signature:btoa(String.fromCharCode.apply(null,i))}}}async getAccounts(){return void 0===this.abstractAccount?[]:[{address:this.abstractAccount,algo:"secp256k1",pubkey:new Uint8Array,authenticatorId:await getAuthenticatorIdByAuthenticatorIndex(this.abstractAccount,this.accountAuthenticatorIndex,this.indexerUrl),accountAddress:this.abstractAccount,aaalgo:"EthWallet"}]}constructor(e,t,r,n){super(e),this.accountAuthenticatorIndex=t,this.personalSign=r,this.indexerUrl=n||"https://api.subquery.network/sq/burnt-labs/xion-indexer"}};/*! Bundled license information: + */function(){var o="input is invalid type",a="finalize already called",s=!0,l=window;l.JS_SHA3_NO_WINDOW&&(s=!1);var u=!s&&"object"==typeof self;!l.JS_SHA3_NO_NODE_JS&&"object"==typeof i&&i.versions&&i.versions.node?l=r.g:u&&(l=self);var d=!l.JS_SHA3_NO_COMMON_JS&&e.exports,c=r.amdO,p=!l.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,f="0123456789abcdef".split(""),h=[31,7936,2031616,520093696],g=[4,1024,262144,67108864],m=[1,256,65536,16777216],y=[6,1536,393216,100663296],v=[0,8,16,24],b=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],S=[224,256,384,512],w=[128,256],_=["hex","buffer","arrayBuffer","array","digest"],k={128:168,256:136};(l.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),p&&(l.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(e){return"object"==typeof e&&e.buffer&&e.buffer.constructor===ArrayBuffer});for(var O=function(e,t,r){return function(n){return new j(e,t,e).update(n)[r]()}},P=function(e,t,r){return function(n,i){return new j(e,t,i).update(n)[r]()}},A=function(e,t,r){return function(t,n,i,o){return N["cshake"+e].update(t,n,i,o)[r]()}},I=function(e,t,r){return function(t,n,i,o){return N["kmac"+e].update(t,n,i,o)[r]()}},R=function(e,t,r,n){for(var i=0;i<_.length;++i){var o=_[i];e[o]=t(r,n,o)}return e},E=function(e,t){var r=O(e,t,"hex");return r.create=function(){return new j(e,t,e)},r.update=function(e){return r.create().update(e)},R(r,O,e,t)},T=[{name:"keccak",padding:m,bits:S,createMethod:E},{name:"sha3",padding:y,bits:S,createMethod:E},{name:"shake",padding:h,bits:w,createMethod:function(e,t){var r=P(e,t,"hex");return r.create=function(r){return new j(e,t,r)},r.update=function(e,t){return r.create(t).update(e)},R(r,P,e,t)}},{name:"cshake",padding:g,bits:w,createMethod:function(e,t){var r=k[e],n=A(e,t,"hex");return n.create=function(n,i,o){return i||o?new j(e,t,n).bytepad([i,o],r):N["shake"+e].create(n)},n.update=function(e,t,r,i){return n.create(t,r,i).update(e)},R(n,A,e,t)}},{name:"kmac",padding:g,bits:w,createMethod:function(e,t){var r=k[e],n=I(e,t,"hex");return n.create=function(n,i,o){return new H(e,t,i).bytepad(["KMAC",o],r).bytepad([n],r)},n.update=function(e,t,r,i){return n.create(e,r,i).update(t)},R(n,I,e,t)}}],N={},x=[],B=0;B>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3;for(var n=0;n<50;++n)this.s[n]=0}function H(e,t,r){j.call(this,e,t,r)}j.prototype.update=function(e){if(this.finalized)throw Error(a);var t,r=typeof e;if("string"!==r){if("object"===r){if(null===e)throw Error(o);if(p&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!p||!ArrayBuffer.isView(e)))throw Error(o)}else throw Error(o);t=!0}for(var n,i,s=this.blocks,l=this.byteCount,u=e.length,d=this.blockCount,c=0,f=this.s;c>2]|=e[c]<>2]|=i<>2]|=(192|i>>6)<=57344?s[n>>2]|=(224|i>>12)<>2]|=(240|i>>18)<>2]|=(128|i>>12&63)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<=l){for(this.start=n-l,this.block=s[d],n=0;n>=8,r=255&e;r>0;)i.unshift(r),e>>=8,r=255&e,++n;return t?i.push(n):i.unshift(n),this.update(i),i.length},j.prototype.encodeString=function(e){var t,r=typeof e;if("string"!==r){if("object"===r){if(null===e)throw Error(o);if(p&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!p||!ArrayBuffer.isView(e)))throw Error(o)}else throw Error(o);t=!0}var n=0,i=e.length;if(t)n=i;else for(var a=0;a=57344?n+=3:(s=65536+((1023&s)<<10|1023&e.charCodeAt(++a)),n+=4)}return n+=this.encode(8*n),this.update(e),n},j.prototype.bytepad=function(e,t){for(var r=this.encode(t),n=0;n>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(t=1,e[0]=e[r];t>4&15]+f[15&e]+f[e>>12&15]+f[e>>8&15]+f[e>>20&15]+f[e>>16&15]+f[e>>28&15]+f[e>>24&15];a%t==0&&(q(r),o=0)}return i&&(s+=f[(e=r[o])>>4&15]+f[15&e],i>1&&(s+=f[e>>12&15]+f[e>>8&15]),i>2&&(s+=f[e>>20&15]+f[e>>16&15])),s},j.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,o=0,a=0,s=this.outputBits>>3;e=new ArrayBuffer(i?n+1<<2:s);for(var l=new Uint32Array(e);a>8&255,l[e+2]=t>>16&255,l[e+3]=t>>24&255;s%r==0&&q(n)}return o&&(e=s<<2,t=n[a],l[e]=255&t,o>1&&(l[e+1]=t>>8&255),o>2&&(l[e+2]=t>>16&255)),l},H.prototype=new j,H.prototype.finalize=function(){return this.encode(this.outputBits,!0),j.prototype.finalize.call(this)};var q=function(e){var t,r,n,i,o,a,s,l,u,d,c,p,f,h,g,m,y,v,S,w,_,k,O,P,A,I,R,E,T,N,x,B,C,M,D,U,J,j,H,q,L,F,V,z,W,Q,G,K,Y,Z,X,$,ee,et,er,en,ei,eo,ea,es,el,eu,ed;for(n=0;n<48;n+=2)i=e[0]^e[10]^e[20]^e[30]^e[40],o=e[1]^e[11]^e[21]^e[31]^e[41],a=e[2]^e[12]^e[22]^e[32]^e[42],s=e[3]^e[13]^e[23]^e[33]^e[43],l=e[4]^e[14]^e[24]^e[34]^e[44],u=e[5]^e[15]^e[25]^e[35]^e[45],d=e[6]^e[16]^e[26]^e[36]^e[46],c=e[7]^e[17]^e[27]^e[37]^e[47],p=e[8]^e[18]^e[28]^e[38]^e[48],f=e[9]^e[19]^e[29]^e[39]^e[49],t=p^(a<<1|s>>>31),r=f^(s<<1|a>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=i^(l<<1|u>>>31),r=o^(u<<1|l>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=a^(d<<1|c>>>31),r=s^(c<<1|d>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=l^(p<<1|f>>>31),r=u^(f<<1|p>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=d^(i<<1|o>>>31),r=c^(o<<1|i>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,h=e[0],g=e[1],Q=e[11]<<4|e[10]>>>28,G=e[10]<<4|e[11]>>>28,E=e[20]<<3|e[21]>>>29,T=e[21]<<3|e[20]>>>29,es=e[31]<<9|e[30]>>>23,el=e[30]<<9|e[31]>>>23,F=e[40]<<18|e[41]>>>14,V=e[41]<<18|e[40]>>>14,M=e[2]<<1|e[3]>>>31,D=e[3]<<1|e[2]>>>31,m=e[13]<<12|e[12]>>>20,y=e[12]<<12|e[13]>>>20,K=e[22]<<10|e[23]>>>22,Y=e[23]<<10|e[22]>>>22,N=e[33]<<13|e[32]>>>19,x=e[32]<<13|e[33]>>>19,eu=e[42]<<2|e[43]>>>30,ed=e[43]<<2|e[42]>>>30,et=e[5]<<30|e[4]>>>2,er=e[4]<<30|e[5]>>>2,U=e[14]<<6|e[15]>>>26,J=e[15]<<6|e[14]>>>26,v=e[25]<<11|e[24]>>>21,S=e[24]<<11|e[25]>>>21,Z=e[34]<<15|e[35]>>>17,X=e[35]<<15|e[34]>>>17,B=e[45]<<29|e[44]>>>3,C=e[44]<<29|e[45]>>>3,P=e[6]<<28|e[7]>>>4,A=e[7]<<28|e[6]>>>4,en=e[17]<<23|e[16]>>>9,ei=e[16]<<23|e[17]>>>9,j=e[26]<<25|e[27]>>>7,H=e[27]<<25|e[26]>>>7,w=e[36]<<21|e[37]>>>11,_=e[37]<<21|e[36]>>>11,$=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,z=e[8]<<27|e[9]>>>5,W=e[9]<<27|e[8]>>>5,I=e[18]<<20|e[19]>>>12,R=e[19]<<20|e[18]>>>12,eo=e[29]<<7|e[28]>>>25,ea=e[28]<<7|e[29]>>>25,q=e[38]<<8|e[39]>>>24,L=e[39]<<8|e[38]>>>24,k=e[48]<<14|e[49]>>>18,O=e[49]<<14|e[48]>>>18,e[0]=h^~m&v,e[1]=g^~y&S,e[10]=P^~I&E,e[11]=A^~R&T,e[20]=M^~U&j,e[21]=D^~J&H,e[30]=z^~Q&K,e[31]=W^~G&Y,e[40]=et^~en&eo,e[41]=er^~ei&ea,e[2]=m^~v&w,e[3]=y^~S&_,e[12]=I^~E&N,e[13]=R^~T&x,e[22]=U^~j&q,e[23]=J^~H&L,e[32]=Q^~K&Z,e[33]=G^~Y&X,e[42]=en^~eo&es,e[43]=ei^~ea&el,e[4]=v^~w&k,e[5]=S^~_&O,e[14]=E^~N&B,e[15]=T^~x&C,e[24]=j^~q&F,e[25]=H^~L&V,e[34]=K^~Z&$,e[35]=Y^~X&ee,e[44]=eo^~es&eu,e[45]=ea^~el&ed,e[6]=w^~k&h,e[7]=_^~O&g,e[16]=N^~B&P,e[17]=x^~C&A,e[26]=q^~F&M,e[27]=L^~V&D,e[36]=Z^~$&z,e[37]=X^~ee&W,e[46]=es^~eu&et,e[47]=el^~ed&er,e[8]=k^~h&m,e[9]=O^~g&y,e[18]=B^~P&I,e[19]=C^~A&R,e[28]=F^~M&U,e[29]=V^~D&J,e[38]=$^~z&Q,e[39]=ee^~W&G,e[48]=eu^~et&en,e[49]=ed^~er&ei,e[0]^=b[n],e[1]^=b[n+1]};if(d)e.exports=N;else{for(B=0;B=240?(d=4,l=!0):c>=224?(d=3,l=!0):c>=192?(d=2,l=!0):c<128&&(d=1,l=!0)}while(!l);for(var p=d-(s.length-u),f=0;f>8&-39)<<8|87+(t=e[o]>>>4)+(t-10>>8&-39)))+String.fromCharCode(n>>>8);return i}var l={ORIGINAL:1,ORIGINAL_NO_PADDING:3,URLSAFE:5,URLSAFE_NO_PADDING:7};function u(e){if(null==e)return l.URLSAFE_NO_PADDING;if(e!==l.ORIGINAL&&e!==l.ORIGINAL_NO_PADDING&&e!==l.URLSAFE&&e!=l.URLSAFE_NO_PADDING)throw Error("unsupported base64 variant");return e}function d(e,t){t=u(t);var n,i=[],o=0|Math.floor((e=w(i,e,"input")).length/3),s=e.length-3*o,l=4*o+(0!==s?0==(2&t)?4:2+(s>>>1):0),d=new h(l+1),c=g(e);return i.push(c),i.push(d.address),0===r._sodium_bin2base64(d.address,d.length,c,e.length,t)&&v(i,"conversion failed"),d.length=l,n=a(d.to_Uint8Array()),y(i),n}function c(e,t){var r=t||n;if(!p(r))throw Error(r+" output format is not available");if(e instanceof h){if("uint8array"===r)return e.to_Uint8Array();if("text"===r)return a(e.to_Uint8Array());if("hex"===r)return s(e.to_Uint8Array());if("base64"===r)return d(e.to_Uint8Array(),l.URLSAFE_NO_PADDING);throw Error('What is output format "'+r+'"?')}if("object"==typeof e){for(var i=Object.keys(e),o={},u=0;u>>24>>>8,l,d);var _=c(m,a);return y(s),_}function tf(e){var t=[];f(e);var n=new h(0|r._crypto_kdf_keybytes()),i=n.address;t.push(i),r._crypto_kdf_keygen(i);var o=c(n,e);return y(t),o}function th(e,t,n,i){var o=[];f(i),e=w(o,e,"clientPublicKey");var a,s=0|r._crypto_kx_publickeybytes();e.length!==s&&b(o,"invalid clientPublicKey length"),a=g(e),o.push(a),t=w(o,t,"clientSecretKey");var l,u=0|r._crypto_kx_secretkeybytes();t.length!==u&&b(o,"invalid clientSecretKey length"),l=g(t),o.push(l),n=w(o,n,"serverPublicKey");var d,p=0|r._crypto_kx_publickeybytes();n.length!==p&&b(o,"invalid serverPublicKey length"),d=g(n),o.push(d);var m=new h(0|r._crypto_kx_sessionkeybytes()),S=m.address;o.push(S);var _=new h(0|r._crypto_kx_sessionkeybytes()),k=_.address;if(o.push(k),0==(0|r._crypto_kx_client_session_keys(S,k,a,l,d))){var O=c({sharedRx:m,sharedTx:_},i);return y(o),O}v(o,"invalid usage")}function tg(e){var t=[];f(e);var n=new h(0|r._crypto_kx_publickeybytes()),i=n.address;t.push(i);var o=new h(0|r._crypto_kx_secretkeybytes()),a=o.address;if(t.push(a),0==(0|r._crypto_kx_keypair(i,a))){var s={publicKey:c(n,e),privateKey:c(o,e),keyType:"x25519"};return y(t),s}v(t,"internal error")}function tm(e,t){var n=[];f(t),e=w(n,e,"seed");var i,o=0|r._crypto_kx_seedbytes();e.length!==o&&b(n,"invalid seed length"),i=g(e),n.push(i);var a=new h(0|r._crypto_kx_publickeybytes()),s=a.address;n.push(s);var l=new h(0|r._crypto_kx_secretkeybytes()),u=l.address;if(n.push(u),0==(0|r._crypto_kx_seed_keypair(s,u,i))){var d={publicKey:c(a,t),privateKey:c(l,t),keyType:"x25519"};return y(n),d}v(n,"internal error")}function ty(e,t,n,i){var o=[];f(i),e=w(o,e,"serverPublicKey");var a,s=0|r._crypto_kx_publickeybytes();e.length!==s&&b(o,"invalid serverPublicKey length"),a=g(e),o.push(a),t=w(o,t,"serverSecretKey");var l,u=0|r._crypto_kx_secretkeybytes();t.length!==u&&b(o,"invalid serverSecretKey length"),l=g(t),o.push(l),n=w(o,n,"clientPublicKey");var d,p=0|r._crypto_kx_publickeybytes();n.length!==p&&b(o,"invalid clientPublicKey length"),d=g(n),o.push(d);var m=new h(0|r._crypto_kx_sessionkeybytes()),S=m.address;o.push(S);var _=new h(0|r._crypto_kx_sessionkeybytes()),k=_.address;if(o.push(k),0==(0|r._crypto_kx_server_session_keys(S,k,a,l,d))){var O=c({sharedRx:m,sharedTx:_},i);return y(o),O}v(o,"invalid usage")}function tv(e,t,n){var i=[];f(n);var o=g(e=w(i,e,"message")),a=e.length;i.push(o),t=w(i,t,"key");var s,l=0|r._crypto_onetimeauth_keybytes();t.length!==l&&b(i,"invalid key length"),s=g(t),i.push(s);var u=new h(0|r._crypto_onetimeauth_bytes()),d=u.address;if(i.push(d),0==(0|r._crypto_onetimeauth(d,o,a,0,s))){var p=c(u,n);return y(i),p}v(i,"invalid usage")}function tb(e,t){var n=[];f(t),S(n,e,"state_address");var i=new h(0|r._crypto_onetimeauth_bytes()),o=i.address;if(n.push(o),0==(0|r._crypto_onetimeauth_final(e,o))){var a=(r._free(e),c(i,t));return y(n),a}v(n,"invalid usage")}function tS(e,t){var n=[];f(t);var i=null;null!=e&&(i=g(e=w(n,e,"key")),e.length,n.push(i));var o=new h(144).address;if(0==(0|r._crypto_onetimeauth_init(o,i))){var a=o;return y(n),a}v(n,"invalid usage")}function tw(e){var t=[];f(e);var n=new h(0|r._crypto_onetimeauth_keybytes()),i=n.address;t.push(i),r._crypto_onetimeauth_keygen(i);var o=c(n,e);return y(t),o}function t_(e,t,n){var i=[];f(n),S(i,e,"state_address");var o=g(t=w(i,t,"message_chunk")),a=t.length;i.push(o),0!=(0|r._crypto_onetimeauth_update(e,o,a))&&v(i,"invalid usage"),y(i)}function tk(e,t,n){var i=[];e=w(i,e,"hash");var o,a=0|r._crypto_onetimeauth_bytes();e.length!==a&&b(i,"invalid hash length"),o=g(e),i.push(o);var s=g(t=w(i,t,"message")),l=t.length;i.push(s),n=w(i,n,"key");var u,d=0|r._crypto_onetimeauth_keybytes();n.length!==d&&b(i,"invalid key length"),u=g(n),i.push(u);var c=0==(0|r._crypto_onetimeauth_verify(o,s,l,0,u));return y(i),c}function tO(e,t,n,i,o,a,s){var l=[];f(s),S(l,e,"keyLength"),("number"!=typeof e||(0|e)!==e||e<0)&&b(l,"keyLength must be an unsigned integer");var u=g(t=w(l,t,"password")),d=t.length;l.push(u),n=w(l,n,"salt");var p,m=0|r._crypto_pwhash_saltbytes();n.length!==m&&b(l,"invalid salt length"),p=g(n),l.push(p),S(l,i,"opsLimit"),("number"!=typeof i||(0|i)!==i||i<0)&&b(l,"opsLimit must be an unsigned integer"),S(l,o,"memLimit"),("number"!=typeof o||(0|o)!==o||o<0)&&b(l,"memLimit must be an unsigned integer"),S(l,a,"algorithm"),("number"!=typeof a||(0|a)!==a||a<0)&&b(l,"algorithm must be an unsigned integer");var _=new h(0|e),k=_.address;if(l.push(k),0==(0|r._crypto_pwhash(k,e,0,u,d,0,p,i,0,o,a))){var O=c(_,s);return y(l),O}v(l,"invalid usage")}function tP(e,t,n,i,o,a){var s=[];f(a),S(s,e,"keyLength"),("number"!=typeof e||(0|e)!==e||e<0)&&b(s,"keyLength must be an unsigned integer");var l=g(t=w(s,t,"password")),u=t.length;s.push(l),n=w(s,n,"salt");var d,p=0|r._crypto_pwhash_scryptsalsa208sha256_saltbytes();n.length!==p&&b(s,"invalid salt length"),d=g(n),s.push(d),S(s,i,"opsLimit"),("number"!=typeof i||(0|i)!==i||i<0)&&b(s,"opsLimit must be an unsigned integer"),S(s,o,"memLimit"),("number"!=typeof o||(0|o)!==o||o<0)&&b(s,"memLimit must be an unsigned integer");var m=new h(0|e),_=m.address;if(s.push(_),0==(0|r._crypto_pwhash_scryptsalsa208sha256(_,e,0,l,u,0,d,i,0,o))){var k=c(m,a);return y(s),k}v(s,"invalid usage")}function tA(e,t,n,i,o,a,s){var l=[];f(s);var u=g(e=w(l,e,"password")),d=e.length;l.push(u);var p=g(t=w(l,t,"salt")),m=t.length;l.push(p),S(l,n,"opsLimit"),("number"!=typeof n||(0|n)!==n||n<0)&&b(l,"opsLimit must be an unsigned integer"),S(l,i,"r"),("number"!=typeof i||(0|i)!==i||i<0)&&b(l,"r must be an unsigned integer"),S(l,o,"p"),("number"!=typeof o||(0|o)!==o||o<0)&&b(l,"p must be an unsigned integer"),S(l,a,"keyLength"),("number"!=typeof a||(0|a)!==a||a<0)&&b(l,"keyLength must be an unsigned integer");var _=new h(0|a),k=_.address;if(l.push(k),0==(0|r._crypto_pwhash_scryptsalsa208sha256_ll(u,d,p,m,n,0,i,o,k,a))){var O=c(_,s);return y(l),O}v(l,"invalid usage")}function tI(e,t,n,i){var o=[];f(i);var a=g(e=w(o,e,"password")),s=e.length;o.push(a),S(o,t,"opsLimit"),("number"!=typeof t||(0|t)!==t||t<0)&&b(o,"opsLimit must be an unsigned integer"),S(o,n,"memLimit"),("number"!=typeof n||(0|n)!==n||n<0)&&b(o,"memLimit must be an unsigned integer");var l=new h(0|r._crypto_pwhash_scryptsalsa208sha256_strbytes()).address;if(o.push(l),0==(0|r._crypto_pwhash_scryptsalsa208sha256_str(l,a,s,0,t,0,n))){var u=r.UTF8ToString(l);return y(o),u}v(o,"invalid usage")}function tR(e,t,n){var i=[];f(n),"string"!=typeof e&&b(i,"hashed_password must be a string"),e=o(e+"\x00"),null!=s&&e.length-1!==s&&b(i,"invalid hashed_password length");var a=g(e),s=e.length-1;i.push(a);var l=g(t=w(i,t,"password")),u=t.length;i.push(l);var d=0==(0|r._crypto_pwhash_scryptsalsa208sha256_str_verify(a,l,u,0));return y(i),d}function tE(e,t,n,i){var o=[];f(i);var a=g(e=w(o,e,"password")),s=e.length;o.push(a),S(o,t,"opsLimit"),("number"!=typeof t||(0|t)!==t||t<0)&&b(o,"opsLimit must be an unsigned integer"),S(o,n,"memLimit"),("number"!=typeof n||(0|n)!==n||n<0)&&b(o,"memLimit must be an unsigned integer");var l=new h(0|r._crypto_pwhash_strbytes()).address;if(o.push(l),0==(0|r._crypto_pwhash_str(l,a,s,0,t,0,n))){var u=r.UTF8ToString(l);return y(o),u}v(o,"invalid usage")}function tT(e,t,n,i){var a=[];f(i),"string"!=typeof e&&b(a,"hashed_password must be a string"),e=o(e+"\x00"),null!=l&&e.length-1!==l&&b(a,"invalid hashed_password length");var s=g(e),l=e.length-1;a.push(s),S(a,t,"opsLimit"),("number"!=typeof t||(0|t)!==t||t<0)&&b(a,"opsLimit must be an unsigned integer"),S(a,n,"memLimit"),("number"!=typeof n||(0|n)!==n||n<0)&&b(a,"memLimit must be an unsigned integer");var u=0!=(0|r._crypto_pwhash_str_needs_rehash(s,t,0,n));return y(a),u}function tN(e,t,n){var i=[];f(n),"string"!=typeof e&&b(i,"hashed_password must be a string"),e=o(e+"\x00"),null!=s&&e.length-1!==s&&b(i,"invalid hashed_password length");var a=g(e),s=e.length-1;i.push(a);var l=g(t=w(i,t,"password")),u=t.length;i.push(l);var d=0==(0|r._crypto_pwhash_str_verify(a,l,u,0));return y(i),d}function tx(e,t,n){var i=[];f(n),e=w(i,e,"privateKey");var o,a=0|r._crypto_scalarmult_scalarbytes();e.length!==a&&b(i,"invalid privateKey length"),o=g(e),i.push(o),t=w(i,t,"publicKey");var s,l=0|r._crypto_scalarmult_bytes();t.length!==l&&b(i,"invalid publicKey length"),s=g(t),i.push(s);var u=new h(0|r._crypto_scalarmult_bytes()),d=u.address;if(i.push(d),0==(0|r._crypto_scalarmult(d,o,s))){var p=c(u,n);return y(i),p}v(i,"weak public key")}function tB(e,t){var n=[];f(t),e=w(n,e,"privateKey");var i,o=0|r._crypto_scalarmult_scalarbytes();e.length!==o&&b(n,"invalid privateKey length"),i=g(e),n.push(i);var a=new h(0|r._crypto_scalarmult_bytes()),s=a.address;if(n.push(s),0==(0|r._crypto_scalarmult_base(s,i))){var l=c(a,t);return y(n),l}v(n,"unknown error")}function tC(e,t,n){var i=[];f(n),e=w(i,e,"n");var o,a=0|r._crypto_scalarmult_ed25519_scalarbytes();e.length!==a&&b(i,"invalid n length"),o=g(e),i.push(o),t=w(i,t,"p");var s,l=0|r._crypto_scalarmult_ed25519_bytes();t.length!==l&&b(i,"invalid p length"),s=g(t),i.push(s);var u=new h(0|r._crypto_scalarmult_ed25519_bytes()),d=u.address;if(i.push(d),0==(0|r._crypto_scalarmult_ed25519(d,o,s))){var p=c(u,n);return y(i),p}v(i,"invalid point or scalar is 0")}function tM(e,t){var n=[];f(t),e=w(n,e,"scalar");var i,o=0|r._crypto_scalarmult_ed25519_scalarbytes();e.length!==o&&b(n,"invalid scalar length"),i=g(e),n.push(i);var a=new h(0|r._crypto_scalarmult_ed25519_bytes()),s=a.address;if(n.push(s),0==(0|r._crypto_scalarmult_ed25519_base(s,i))){var l=c(a,t);return y(n),l}v(n,"scalar is 0")}function tD(e,t){var n=[];f(t),e=w(n,e,"scalar");var i,o=0|r._crypto_scalarmult_ed25519_scalarbytes();e.length!==o&&b(n,"invalid scalar length"),i=g(e),n.push(i);var a=new h(0|r._crypto_scalarmult_ed25519_bytes()),s=a.address;if(n.push(s),0==(0|r._crypto_scalarmult_ed25519_base_noclamp(s,i))){var l=c(a,t);return y(n),l}v(n,"scalar is 0")}function tU(e,t,n){var i=[];f(n),e=w(i,e,"n");var o,a=0|r._crypto_scalarmult_ed25519_scalarbytes();e.length!==a&&b(i,"invalid n length"),o=g(e),i.push(o),t=w(i,t,"p");var s,l=0|r._crypto_scalarmult_ed25519_bytes();t.length!==l&&b(i,"invalid p length"),s=g(t),i.push(s);var u=new h(0|r._crypto_scalarmult_ed25519_bytes()),d=u.address;if(i.push(d),0==(0|r._crypto_scalarmult_ed25519_noclamp(d,o,s))){var p=c(u,n);return y(i),p}v(i,"invalid point or scalar is 0")}function tJ(e,t,n){var i=[];f(n),e=w(i,e,"scalar");var o,a=0|r._crypto_scalarmult_ristretto255_scalarbytes();e.length!==a&&b(i,"invalid scalar length"),o=g(e),i.push(o),t=w(i,t,"element");var s,l=0|r._crypto_scalarmult_ristretto255_bytes();t.length!==l&&b(i,"invalid element length"),s=g(t),i.push(s);var u=new h(0|r._crypto_scalarmult_ristretto255_bytes()),d=u.address;if(i.push(d),0==(0|r._crypto_scalarmult_ristretto255(d,o,s))){var p=c(u,n);return y(i),p}v(i,"result is identity element")}function tj(e,t){var n=[];f(t),e=w(n,e,"scalar");var i,o=0|r._crypto_core_ristretto255_scalarbytes();e.length!==o&&b(n,"invalid scalar length"),i=g(e),n.push(i);var a=new h(0|r._crypto_core_ristretto255_bytes()),s=a.address;if(n.push(s),0==(0|r._crypto_scalarmult_ristretto255_base(s,i))){var l=c(a,t);return y(n),l}v(n,"scalar is 0")}function tH(e,t,n,i){var o=[];f(i);var a=g(e=w(o,e,"message")),s=e.length;o.push(a),t=w(o,t,"nonce");var l,u=0|r._crypto_secretbox_noncebytes();t.length!==u&&b(o,"invalid nonce length"),l=g(t),o.push(l),n=w(o,n,"key");var d,p=0|r._crypto_secretbox_keybytes();n.length!==p&&b(o,"invalid key length"),d=g(n),o.push(d);var m=new h(0|s),S=m.address;o.push(S);var _=new h(0|r._crypto_secretbox_macbytes()),k=_.address;if(o.push(k),0==(0|r._crypto_secretbox_detached(S,k,a,s,0,l,d))){var O=c({mac:_,cipher:m},i);return y(o),O}v(o,"invalid usage")}function tq(e,t,n,i){var o=[];f(i);var a=g(e=w(o,e,"message")),s=e.length;o.push(a),t=w(o,t,"nonce");var l,u=0|r._crypto_secretbox_noncebytes();t.length!==u&&b(o,"invalid nonce length"),l=g(t),o.push(l),n=w(o,n,"key");var d,p=0|r._crypto_secretbox_keybytes();n.length!==p&&b(o,"invalid key length"),d=g(n),o.push(d);var m=new h(s+r._crypto_secretbox_macbytes()|0),S=m.address;if(o.push(S),0==(0|r._crypto_secretbox_easy(S,a,s,0,l,d))){var _=c(m,i);return y(o),_}v(o,"invalid usage")}function tL(e){var t=[];f(e);var n=new h(0|r._crypto_secretbox_keybytes()),i=n.address;t.push(i),r._crypto_secretbox_keygen(i);var o=c(n,e);return y(t),o}function tF(e,t,n,i,o){var a=[];f(o);var s=g(e=w(a,e,"ciphertext")),l=e.length;a.push(s),t=w(a,t,"mac");var u,d=0|r._crypto_secretbox_macbytes();t.length!==d&&b(a,"invalid mac length"),u=g(t),a.push(u),n=w(a,n,"nonce");var p,m=0|r._crypto_secretbox_noncebytes();n.length!==m&&b(a,"invalid nonce length"),p=g(n),a.push(p),i=w(a,i,"key");var S,_=0|r._crypto_secretbox_keybytes();i.length!==_&&b(a,"invalid key length"),S=g(i),a.push(S);var k=new h(0|l),O=k.address;if(a.push(O),0==(0|r._crypto_secretbox_open_detached(O,s,u,l,0,p,S))){var P=c(k,o);return y(a),P}v(a,"wrong secret key for the given ciphertext")}function tV(e,t,n,i){var o=[];f(i),e=w(o,e,"ciphertext");var a,s=r._crypto_secretbox_macbytes(),l=e.length;l>>0;return y([]),t}function rv(e,t){var n=[];f(t);for(var i=r._malloc(24),o=0;o<6;o++)r.setValue(i+4*o,r.Runtime.addFunction(e[["implementation_name","random","stir","uniform","buf","close"][o]]),"i32");0!=(0|r._randombytes_set_implementation(i))&&v(n,"unsupported implementation"),y(n)}function rb(e){f(e),r._randombytes_stir()}function rS(e,t){var n=[];f(t),S(n,e,"upper_bound"),("number"!=typeof e||(0|e)!==e||e<0)&&b(n,"upper_bound must be an unsigned integer");var i=r._randombytes_uniform(e)>>>0;return y(n),i}function rw(){var e=r._sodium_version_string(),t=r.UTF8ToString(e);return y([]),t}return h.prototype.to_Uint8Array=function(){var e=new Uint8Array(this.length);return e.set(r.HEAPU8.subarray(this.address,this.address+this.length)),e},e.add=function(e,t){if(!(e instanceof Uint8Array&&t instanceof Uint8Array))throw TypeError("Only Uint8Array instances can added");var r=e.length,n=0,i=0;if(t.length!=e.length)throw TypeError("Arguments must have the same length");for(i=0;i>=8,n+=e[i]+t[i],e[i]=255&n},e.base64_variants=l,e.compare=function(e,t){if(!(e instanceof Uint8Array&&t instanceof Uint8Array))throw TypeError("Only Uint8Array instances can be compared");if(e.length!==t.length)throw TypeError("Only instances of identical length can be compared");for(var r=0,n=1,i=e.length;i-- >0;)r|=t[i]-e[i]>>8&n,n&=(t[i]^e[i])-1>>8;return r+r+n-1},e.from_base64=function(e,t){t=u(t);var n,i=[],o=new h(3*(e=w(i,e,"input")).length/4),a=g(e),s=m(4),l=m(4);return i.push(a),i.push(o.address),i.push(o.result_bin_len_p),i.push(o.b64_end_p),0!==r._sodium_base642bin(o.address,o.length,a,e.length,0,s,l,t)&&v(i,"invalid input"),r.getValue(l,"i32")-a!==e.length&&v(i,"incomplete input"),o.length=r.getValue(s,"i32"),n=o.to_Uint8Array(),y(i),n},e.from_hex=function(e){var t,n=[],i=new h((e=w(n,e,"input")).length/2),o=g(e),a=m(4);return n.push(o),n.push(i.address),n.push(i.hex_end_p),0!==r._sodium_hex2bin(i.address,i.length,o,e.length,0,0,a)&&v(n,"invalid input"),r.getValue(a,"i32")-o!==e.length&&v(n,"incomplete input"),t=i.to_Uint8Array(),y(n),t},e.from_string=o,e.increment=function(e){if(!(e instanceof Uint8Array))throw TypeError("Only Uint8Array instances can be incremented");for(var t=256,r=0,n=e.length;r>=8,t+=e[r],e[r]=255&t},e.is_zero=function(e){if(!(e instanceof Uint8Array))throw TypeError("Only Uint8Array instances can be checked");for(var t=0,r=0,n=e.length;r 0");var n,i=[],o=m(4),a=1,s=0,l=0|e.length,u=new h(l+t);i.push(o),i.push(u.address);for(var d=u.address,c=u.address+l+t;d>>48|l>>>32|l>>>16|l))-1>>16);return 0!==r._sodium_pad(o,u.address,e.length,t,u.length)&&v(i,"internal error"),u.length=r.getValue(o,"i32"),n=u.to_Uint8Array(),y(i),n},e.unpad=function(e,t){if(!(e instanceof Uint8Array))throw TypeError("buffer must be a Uint8Array");if((t|=0)<=0)throw Error("block size must be > 0");var n=[],i=g(e),o=m(4);return n.push(i),n.push(o),0!==r._sodium_unpad(o,i,e.length,t)&&v(n,"unsupported/invalid padding"),e=(e=new Uint8Array(e)).subarray(0,r.getValue(o,"i32")),y(n),e},e.ready=i,e.symbols=function(){return Object.keys(e).sort()},e.to_base64=d,e.to_hex=s,e.to_string=a,e}var l="object"==typeof a.sodium&&"function"==typeof a.sodium.onload?a.sodium.onload:null;i=[t,r(90681)],void 0!==(o="function"==typeof(n=s)?n.apply(t,i):n)&&(e.exports=o),l&&a.sodium.ready.then(function(){l(a.sodium)})}(this)},40059:function(e){"use strict";e.exports=r;var t=null;try{t=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(e){}function r(e,t,r){this.low=0|e,this.high=0|t,this.unsigned=!!r}function n(e){return!0===(e&&e.__isLong__)}r.prototype.__isLong__,Object.defineProperty(r.prototype,"__isLong__",{value:!0}),r.isLong=n;var i={},o={};function a(e,t){var r,n,a;return t?(e>>>=0,(a=0<=e&&e<256)&&(n=o[e]))?n:(r=l(e,(0|e)<0?-1:0,!0),a&&(o[e]=r),r):(e|=0,(a=-128<=e&&e<128)&&(n=i[e]))?n:(r=l(e,e<0?-1:0,!1),a&&(i[e]=r),r)}function s(e,t){if(isNaN(e))return t?y:m;if(t){if(e<0)return y;if(e>=f)return _}else{if(e<=-h)return k;if(e+1>=h)return w}return e<0?s(-e,t).neg():l(e%p|0,e/p|0,t)}function l(e,t,n){return new r(e,t,n)}r.fromInt=a,r.fromNumber=s,r.fromBits=l;var u=Math.pow;function d(e,t,r){if(0===e.length)throw Error("empty string");if("NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return m;if("number"==typeof t?(r=t,t=!1):t=!!t,(r=r||10)<2||360)throw Error("interior hyphen");if(0===n)return d(e.substring(1),t,r).neg();for(var n,i=s(u(r,8)),o=m,a=0;a>>0:this.low},O.toNumber=function(){return this.unsigned?(this.high>>>0)*p+(this.low>>>0):this.high*p+(this.low>>>0)},O.toString=function(e){if((e=e||10)<2||36>>0).toString(e);if((o=l).isZero())return d+a;for(;d.length<6;)d="0"+d;a=""+d+a}},O.getHighBits=function(){return this.high},O.getHighBitsUnsigned=function(){return this.high>>>0},O.getLowBits=function(){return this.low},O.getLowBitsUnsigned=function(){return this.low>>>0},O.getNumBitsAbs=function(){if(this.isNegative())return this.eq(k)?64:this.neg().getNumBitsAbs();for(var e=0!=this.high?this.high:this.low,t=31;t>0&&(e&1<=0},O.isOdd=function(){return(1&this.low)==1},O.isEven=function(){return(1&this.low)==0},O.equals=function(e){return n(e)||(e=c(e)),(this.unsigned===e.unsigned||this.high>>>31!=1||e.high>>>31!=1)&&this.high===e.high&&this.low===e.low},O.eq=O.equals,O.notEquals=function(e){return!this.eq(e)},O.neq=O.notEquals,O.ne=O.notEquals,O.lessThan=function(e){return 0>this.comp(e)},O.lt=O.lessThan,O.lessThanOrEqual=function(e){return 0>=this.comp(e)},O.lte=O.lessThanOrEqual,O.le=O.lessThanOrEqual,O.greaterThan=function(e){return this.comp(e)>0},O.gt=O.greaterThan,O.greaterThanOrEqual=function(e){return this.comp(e)>=0},O.gte=O.greaterThanOrEqual,O.ge=O.greaterThanOrEqual,O.compare=function(e){if(n(e)||(e=c(e)),this.eq(e))return 0;var t=this.isNegative(),r=e.isNegative();return t&&!r?-1:!t&&r?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1},O.comp=O.compare,O.negate=function(){return!this.unsigned&&this.eq(k)?k:this.not().add(v)},O.neg=O.negate,O.add=function(e){n(e)||(e=c(e));var t,r,i=this.high>>>16,o=65535&this.high,a=this.low>>>16,s=65535&this.low,u=e.high>>>16,d=65535&e.high,p=e.low>>>16,f=65535&e.low,h=0,g=0;return t=0+((r=0+(s+f))>>>16),r&=65535,t+=a+p,g+=t>>>16,t&=65535,g+=o+d,h+=g>>>16,g&=65535,h+=i+u,l(t<<16|r,(h&=65535)<<16|g,this.unsigned)},O.subtract=function(e){return n(e)||(e=c(e)),this.add(e.neg())},O.sub=O.subtract,O.multiply=function(e){if(this.isZero())return m;if(n(e)||(e=c(e)),t)return l(t.mul(this.low,this.high,e.low,e.high),t.get_high(),this.unsigned);if(e.isZero())return m;if(this.eq(k))return e.isOdd()?k:m;if(e.eq(k))return this.isOdd()?k:m;if(this.isNegative())return e.isNegative()?this.neg().mul(e.neg()):this.neg().mul(e).neg();if(e.isNegative())return this.mul(e.neg()).neg();if(this.lt(g)&&e.lt(g))return s(this.toNumber()*e.toNumber(),this.unsigned);var r,i,o=this.high>>>16,a=65535&this.high,u=this.low>>>16,d=65535&this.low,p=e.high>>>16,f=65535&e.high,h=e.low>>>16,y=65535&e.low,v=0,b=0;return r=0+((i=0+d*y)>>>16),i&=65535,r+=u*y,b+=r>>>16,r&=65535,r+=d*h,b+=r>>>16,r&=65535,b+=a*y,v+=b>>>16,b&=65535,b+=u*h,v+=b>>>16,b&=65535,b+=d*f,v+=b>>>16,b&=65535,v+=o*y+a*h+u*f+d*p,l(r<<16|i,(v&=65535)<<16|b,this.unsigned)},O.mul=O.multiply,O.divide=function(e){if(n(e)||(e=c(e)),e.isZero())throw Error("division by zero");if(t){var r,i,o;return this.unsigned||-2147483648!==this.high||-1!==e.low||-1!==e.high?l((this.unsigned?t.div_u:t.div_s)(this.low,this.high,e.low,e.high),t.get_high(),this.unsigned):this}if(this.isZero())return this.unsigned?y:m;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return y;if(e.gt(this.shru(1)))return b;o=y}else{if(this.eq(k))return e.eq(v)||e.eq(S)?k:e.eq(k)?v:(r=this.shr(1).div(e).shl(1)).eq(m)?e.isNegative()?v:S:(i=this.sub(e.mul(r)),o=r.add(i.div(e)));if(e.eq(k))return this.unsigned?y:m;if(this.isNegative())return e.isNegative()?this.neg().div(e.neg()):this.neg().div(e).neg();if(e.isNegative())return this.div(e.neg()).neg();o=m}for(i=this;i.gte(e);){for(var a=Math.ceil(Math.log(r=Math.max(1,Math.floor(i.toNumber()/e.toNumber())))/Math.LN2),d=a<=48?1:u(2,a-48),p=s(r),f=p.mul(e);f.isNegative()||f.gt(i);)r-=d,f=(p=s(r,this.unsigned)).mul(e);p.isZero()&&(p=v),o=o.add(p),i=i.sub(f)}return o},O.div=O.divide,O.modulo=function(e){return(n(e)||(e=c(e)),t)?l((this.unsigned?t.rem_u:t.rem_s)(this.low,this.high,e.low,e.high),t.get_high(),this.unsigned):this.sub(this.div(e).mul(e))},O.mod=O.modulo,O.rem=O.modulo,O.not=function(){return l(~this.low,~this.high,this.unsigned)},O.and=function(e){return n(e)||(e=c(e)),l(this.low&e.low,this.high&e.high,this.unsigned)},O.or=function(e){return n(e)||(e=c(e)),l(this.low|e.low,this.high|e.high,this.unsigned)},O.xor=function(e){return n(e)||(e=c(e)),l(this.low^e.low,this.high^e.high,this.unsigned)},O.shiftLeft=function(e){return(n(e)&&(e=e.toInt()),0==(e&=63))?this:e<32?l(this.low<>>32-e,this.unsigned):l(0,this.low<>>e|this.high<<32-e,this.high>>e,this.unsigned):l(this.high>>e-32,this.high>=0?0:-1,this.unsigned)},O.shr=O.shiftRight,O.shiftRightUnsigned=function(e){if(n(e)&&(e=e.toInt()),0==(e&=63))return this;var t=this.high;return e<32?l(this.low>>>e|t<<32-e,t>>>e,this.unsigned):32===e?l(t,0,this.unsigned):l(t>>>e-32,0,this.unsigned)},O.shru=O.shiftRightUnsigned,O.shr_u=O.shiftRightUnsigned,O.toSigned=function(){return this.unsigned?l(this.low,this.high,!1):this},O.toUnsigned=function(){return this.unsigned?this:l(this.low,this.high,!0)},O.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},O.toBytesLE=function(){var e=this.high,t=this.low;return[255&t,t>>>8&255,t>>>16&255,t>>>24,255&e,e>>>8&255,e>>>16&255,e>>>24]},O.toBytesBE=function(){var e=this.high,t=this.low;return[e>>>24,e>>>16&255,e>>>8&255,255&e,t>>>24,t>>>16&255,t>>>8&255,255&t]},r.fromBytes=function(e,t,n){return n?r.fromBytesLE(e,t):r.fromBytesBE(e,t)},r.fromBytesLE=function(e,t){return new r(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,t)},r.fromBytesBE=function(e,t){return new r(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],t)}},67957:function(e,t,r){"use strict";var n=r(39541),i=r(73799),o=r(47226).Buffer,a=Array(16);function s(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function l(e,t){return e<>>32-t}function u(e,t,r,n,i,o,a){return l(e+(t&r|~t&n)+i+o|0,a)+t|0}function d(e,t,r,n,i,o,a){return l(e+(t&n|r&~n)+i+o|0,a)+t|0}function c(e,t,r,n,i,o,a){return l(e+(t^r^n)+i+o|0,a)+t|0}function p(e,t,r,n,i,o,a){return l(e+(r^(t|~n))+i+o|0,a)+t|0}n(s,i),s.prototype._update=function(){for(var e=a,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var r=this._a,n=this._b,i=this._c,o=this._d;r=u(r,n,i,o,e[0],3614090360,7),o=u(o,r,n,i,e[1],3905402710,12),i=u(i,o,r,n,e[2],606105819,17),n=u(n,i,o,r,e[3],3250441966,22),r=u(r,n,i,o,e[4],4118548399,7),o=u(o,r,n,i,e[5],1200080426,12),i=u(i,o,r,n,e[6],2821735955,17),n=u(n,i,o,r,e[7],4249261313,22),r=u(r,n,i,o,e[8],1770035416,7),o=u(o,r,n,i,e[9],2336552879,12),i=u(i,o,r,n,e[10],4294925233,17),n=u(n,i,o,r,e[11],2304563134,22),r=u(r,n,i,o,e[12],1804603682,7),o=u(o,r,n,i,e[13],4254626195,12),i=u(i,o,r,n,e[14],2792965006,17),n=u(n,i,o,r,e[15],1236535329,22),r=d(r,n,i,o,e[1],4129170786,5),o=d(o,r,n,i,e[6],3225465664,9),i=d(i,o,r,n,e[11],643717713,14),n=d(n,i,o,r,e[0],3921069994,20),r=d(r,n,i,o,e[5],3593408605,5),o=d(o,r,n,i,e[10],38016083,9),i=d(i,o,r,n,e[15],3634488961,14),n=d(n,i,o,r,e[4],3889429448,20),r=d(r,n,i,o,e[9],568446438,5),o=d(o,r,n,i,e[14],3275163606,9),i=d(i,o,r,n,e[3],4107603335,14),n=d(n,i,o,r,e[8],1163531501,20),r=d(r,n,i,o,e[13],2850285829,5),o=d(o,r,n,i,e[2],4243563512,9),i=d(i,o,r,n,e[7],1735328473,14),n=d(n,i,o,r,e[12],2368359562,20),r=c(r,n,i,o,e[5],4294588738,4),o=c(o,r,n,i,e[8],2272392833,11),i=c(i,o,r,n,e[11],1839030562,16),n=c(n,i,o,r,e[14],4259657740,23),r=c(r,n,i,o,e[1],2763975236,4),o=c(o,r,n,i,e[4],1272893353,11),i=c(i,o,r,n,e[7],4139469664,16),n=c(n,i,o,r,e[10],3200236656,23),r=c(r,n,i,o,e[13],681279174,4),o=c(o,r,n,i,e[0],3936430074,11),i=c(i,o,r,n,e[3],3572445317,16),n=c(n,i,o,r,e[6],76029189,23),r=c(r,n,i,o,e[9],3654602809,4),o=c(o,r,n,i,e[12],3873151461,11),i=c(i,o,r,n,e[15],530742520,16),n=c(n,i,o,r,e[2],3299628645,23),r=p(r,n,i,o,e[0],4096336452,6),o=p(o,r,n,i,e[7],1126891415,10),i=p(i,o,r,n,e[14],2878612391,15),n=p(n,i,o,r,e[5],4237533241,21),r=p(r,n,i,o,e[12],1700485571,6),o=p(o,r,n,i,e[3],2399980690,10),i=p(i,o,r,n,e[10],4293915773,15),n=p(n,i,o,r,e[1],2240044497,21),r=p(r,n,i,o,e[8],1873313359,6),o=p(o,r,n,i,e[15],4264355552,10),i=p(i,o,r,n,e[6],2734768916,15),n=p(n,i,o,r,e[13],1309151649,21),r=p(r,n,i,o,e[4],4149444226,6),o=p(o,r,n,i,e[11],3174756917,10),i=p(i,o,r,n,e[2],718787259,15),n=p(n,i,o,r,e[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+n|0,this._c=this._c+i|0,this._d=this._d+o|0},s.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=o.allocUnsafe(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e},e.exports=s},37074:function(e){"use strict";function t(e,t){if(!e)throw Error(t||"Assertion failed")}e.exports=t,t.equal=function(e,t,r){if(e!=t)throw Error(r||"Assertion failed: "+e+" != "+t)}},61556:function(e,t){"use strict";var r=t;function n(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"!=typeof e){for(var n=0;n>8,a=255&i;o?r.push(o,a):r.push(a)}return r}function i(e){return 1===e.length?"0"+e:e}function o(e){for(var t="",r=0;r1?t-1:0),n=1;n{})}}function b(e){let t=e.currentTarget.getAttribute("target");return t&&"_self"!==t||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.nativeEvent&&2===e.nativeEvent.which}function S(e,t,r,n,i,a,l,u,d){let{nodeName:c}=e.currentTarget;if("A"===c.toUpperCase()&&(b(e)||!d&&!(0,s.isLocalURL)(r)))return;e.preventDefault();let p=()=>{let e=null==l||l;"beforePopState"in t?t[i?"replace":"push"](r,n,{shallow:a,locale:u,scroll:e}):t[i?"replace":"push"](n||r,{scroll:e})};d?o.default.startTransition(p):p()}function w(e){return"string"==typeof e?e:(0,l.formatUrl)(e)}let _=o.default.forwardRef(function(e,t){let r,n;let{href:s,as:l,children:y,prefetch:b=null,passHref:_,replace:k,shallow:O,scroll:P,locale:A,onClick:I,onMouseEnter:R,onTouchStart:E,legacyBehavior:T=!1,...N}=e;r=y,T&&("string"==typeof r||"number"==typeof r)&&(r=(0,i.jsx)("a",{children:r}));let x=o.default.useContext(c.RouterContext),B=o.default.useContext(p.AppRouterContext),C=null!=x?x:B,M=!x,D=!1!==b,U=null===b?m.PrefetchKind.AUTO:m.PrefetchKind.FULL,{href:J,as:j}=o.default.useMemo(()=>{if(!x){let e=w(s);return{href:e,as:l?w(l):e}}let[e,t]=(0,a.resolveHref)(x,s,!0);return{href:e,as:l?(0,a.resolveHref)(x,l):t||e}},[x,s,l]),H=o.default.useRef(J),q=o.default.useRef(j);T&&(n=o.default.Children.only(r));let L=T?n&&"object"==typeof n&&n.ref:t,[F,V,z]=(0,f.useIntersection)({rootMargin:"200px"}),W=o.default.useCallback(e=>{(q.current!==j||H.current!==J)&&(z(),q.current=j,H.current=J),F(e),L&&("function"==typeof L?L(e):"object"==typeof L&&(L.current=e))},[j,L,J,z,F]);o.default.useEffect(()=>{C&&V&&D&&v(C,J,j,{locale:A},{kind:U},M)},[j,J,V,A,D,null==x?void 0:x.locale,C,M,U]);let Q={ref:W,onClick(e){T||"function"!=typeof I||I(e),T&&n.props&&"function"==typeof n.props.onClick&&n.props.onClick(e),C&&!e.defaultPrevented&&S(e,C,J,j,k,O,P,A,M)},onMouseEnter(e){T||"function"!=typeof R||R(e),T&&n.props&&"function"==typeof n.props.onMouseEnter&&n.props.onMouseEnter(e),C&&(D||!M)&&v(C,J,j,{locale:A,priority:!0,bypassPrefetchedCheck:!0},{kind:U},M)},onTouchStart(e){T||"function"!=typeof E||E(e),T&&n.props&&"function"==typeof n.props.onTouchStart&&n.props.onTouchStart(e),C&&(D||!M)&&v(C,J,j,{locale:A,priority:!0,bypassPrefetchedCheck:!0},{kind:U},M)}};if((0,u.isAbsoluteUrl)(j))Q.href=j;else if(!T||_||"a"===n.type&&!("href"in n.props)){let e=void 0!==A?A:null==x?void 0:x.locale,t=(null==x?void 0:x.isLocaleDomain)&&(0,h.getDomainLocale)(j,e,null==x?void 0:x.locales,null==x?void 0:x.domainLocales);Q.href=t||(0,g.addBasePath)((0,d.addLocale)(j,e,null==x?void 0:x.defaultLocale))}return T?o.default.cloneElement(n,Q):(0,i.jsx)("a",{...N,...Q,children:r})});("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},52185:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{requestIdleCallback:function(){return r},cancelIdleCallback:function(){return n}});let r="undefined"!=typeof self&&self.requestIdleCallback&&self.requestIdleCallback.bind(window)||function(e){let t=Date.now();return self.setTimeout(function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-t))}})},1)},n="undefined"!=typeof self&&self.cancelIdleCallback&&self.cancelIdleCallback.bind(window)||function(e){return clearTimeout(e)};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},14542:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"resolveHref",{enumerable:!0,get:function(){return c}});let n=r(95770),i=r(11030),o=r(24544),a=r(36874),s=r(82139),l=r(17434),u=r(22360),d=r(96735);function c(e,t,r){let c;let p="string"==typeof t?t:(0,i.formatWithValidation)(t),f=p.match(/^[a-zA-Z]{1,}:\/\//),h=f?p.slice(f[0].length):p;if((h.split("?",1)[0]||"").match(/(\/\/|\\)/)){console.error("Invalid href '"+p+"' passed to next/router in page: '"+e.pathname+"'. Repeated forward-slashes (//) or backslashes \\ are not valid in the href.");let t=(0,a.normalizeRepeatedSlashes)(h);p=(f?f[0]:"")+t}if(!(0,l.isLocalURL)(p))return r?[p]:p;try{c=new URL(p.startsWith("#")?e.asPath:e.pathname,"http://n")}catch(e){c=new URL("/","http://n")}try{let e=new URL(p,c);e.pathname=(0,s.normalizePathTrailingSlash)(e.pathname);let t="";if((0,u.isDynamicRoute)(e.pathname)&&e.searchParams&&r){let r=(0,n.searchParamsToUrlQuery)(e.searchParams),{result:a,params:s}=(0,d.interpolateAs)(e.pathname,e.pathname,r);a&&(t=(0,i.formatWithValidation)({pathname:a,hash:e.hash,query:(0,o.omit)(r,s)}))}let a=e.origin===c.origin?e.href.slice(e.origin.length):e.href;return r?[a,t||a]:a}catch(e){return r?[p]:p}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},45291:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useIntersection",{enumerable:!0,get:function(){return d}});let n=r(64090),i=r(52185),o="function"==typeof IntersectionObserver,a=new Map,s=[];function l(e){let t;let r={root:e.root||null,margin:e.rootMargin||""},n=s.find(e=>e.root===r.root&&e.margin===r.margin);if(n&&(t=a.get(n)))return t;let i=new Map;return t={id:r,observer:new IntersectionObserver(e=>{e.forEach(e=>{let t=i.get(e.target),r=e.isIntersecting||e.intersectionRatio>0;t&&r&&t(r)})},e),elements:i},s.push(r),a.set(r,t),t}function u(e,t,r){let{id:n,observer:i,elements:o}=l(r);return o.set(e,t),i.observe(e),function(){if(o.delete(e),i.unobserve(e),0===o.size){i.disconnect(),a.delete(n);let e=s.findIndex(e=>e.root===n.root&&e.margin===n.margin);e>-1&&s.splice(e,1)}}}function d(e){let{rootRef:t,rootMargin:r,disabled:a}=e,s=a||!o,[l,d]=(0,n.useState)(!1),c=(0,n.useRef)(null),p=(0,n.useCallback)(e=>{c.current=e},[]);return(0,n.useEffect)(()=>{if(o){if(s||l)return;let e=c.current;if(e&&e.tagName)return u(e,e=>e&&d(e),{root:null==t?void 0:t.current,rootMargin:r})}else if(!l){let e=(0,i.requestIdleCallback)(()=>d(!0));return()=>(0,i.cancelIdleCallback)(e)}},[s,r,t,l,c.current]),[p,l,(0,n.useCallback)(()=>{d(!1)},[])]}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},13127:function(e){"use strict";var t="/";!function(){var r={229:function(e){var t,r,n,i=e.exports={};function o(){throw Error("setTimeout has not been defined")}function a(){throw Error("clearTimeout has not been defined")}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}function l(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{return r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var u=[],d=!1,c=-1;function p(){d&&n&&(d=!1,n.length?u=n.concat(u):c=-1,u.length&&f())}function f(){if(!d){var e=s(p);d=!0;for(var t=u.length;t;){for(n=u,u=[];++c1)for(var r=1;rString(e)),r>2)?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}}function i(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function o(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function a(e,t,r){return"number"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}r("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError),r("ERR_INVALID_ARG_TYPE",function(e,t,r){let s,l;if("string"==typeof t&&i(t,"not ")?(s="must not be",t=t.replace(/^not /,"")):s="must be",o(e," argument"))l="The ".concat(e," ").concat(s," ").concat(n(t,"type"));else{let r=a(e,".")?"property":"argument";l='The "'.concat(e,'" ').concat(r," ").concat(s," ").concat(n(t,"type"))}return l+". Received type ".concat(typeof r)},TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"}),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"}),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.q=t},403:function(e,t,r){var n=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=d;var o=r(709),a=r(337);r(782)(d,o);for(var s=n(a.prototype),l=0;l0){if("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===p.prototype||(t=h(t)),n)s.endEmitted?P(e,new O):N(e,s,t,!0);else if(s.ended)P(e,new _);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(t=s.decoder.write(t),s.objectMode||0!==t.length?N(e,s,t,!1):j(e,s)):N(e,s,t,!1)}}else n||(s.reading=!1,j(e,s));return!s.ended&&(s.length=B?e=B:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function M(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=C(e)),e<=t.length)?e:t.ended?t.length:(t.needReadable=!0,0)}function D(e,t){if(a("onEofChunk"),!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?U(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,J(e)))}}function U(e){var t=e._readableState;a("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(a("emitReadable",t.flowing),t.emittedReadable=!0,i.nextTick(J,e))}function J(e){var t=e._readableState;a("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,W(e)}function j(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(H,e,t))}function H(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function F(e){a("readable nexttick read 0"),e.read(0)}function V(e,t){t.resumeScheduled||(t.resumeScheduled=!0,i.nextTick(z,e,t))}function z(e,t){a("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),W(e),t.flowing&&!t.reading&&e.read(0)}function W(e){var t=e._readableState;for(a("flow",t.flowing);t.flowing&&null!==e.read(););}function Q(e,t){var r;return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r)}function G(e){var t=e._readableState;a("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,i.nextTick(K,t,e))}function K(e,t){if(a("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function Y(e,t){for(var r=0,n=e.length;r=r.highWaterMark:r.length>0)||r.ended))return a("read: emitReadable",r.length,r.ended),0===r.length&&r.ended?G(this):U(this),null;if(0===(e=M(e,r))&&r.ended)return 0===r.length&&G(this),null;var i=r.needReadable;return a("need readable",i),(0===r.length||r.length-e0?Q(e,r):null)?(r.needReadable=r.length<=r.highWaterMark,e=0):(r.length-=e,r.awaitDrain=0),0===r.length&&(r.ended||(r.needReadable=!0),n!==e&&r.ended&&G(this)),null!==t&&this.emit("data",t),t},E.prototype._read=function(e){P(this,new k("_read()"))},E.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e)}n.pipesCount+=1,a("pipe count=%d opts=%j",n.pipesCount,t);var o=t&&!1===t.end||e===i.stdout||e===i.stderr?y:l;function s(e,t){a("onunpipe"),e===r&&t&&!1===t.hasUnpiped&&(t.hasUnpiped=!0,p())}function l(){a("onend"),e.end()}n.endEmitted?i.nextTick(o):r.once("end",o),e.on("unpipe",s);var u=q(r);e.on("drain",u);var c=!1;function p(){a("cleanup"),e.removeListener("close",g),e.removeListener("finish",m),e.removeListener("drain",u),e.removeListener("error",h),e.removeListener("unpipe",s),r.removeListener("end",l),r.removeListener("end",y),r.removeListener("data",f),c=!0,n.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&u()}function f(t){a("ondata");var i=e.write(t);a("dest.write",i),!1===i&&((1===n.pipesCount&&n.pipes===e||n.pipesCount>1&&-1!==Y(n.pipes,e))&&!c&&(a("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function h(t){a("onerror",t),y(),e.removeListener("error",h),0===d(e,"error")&&P(e,t)}function g(){e.removeListener("finish",m),y()}function m(){a("onfinish"),e.removeListener("close",g),y()}function y(){a("unpipe"),r.unpipe(e)}return r.on("data",f),I(e,"error",h),e.once("close",g),e.once("finish",m),e.emit("pipe",r),n.flowing||(a("pipe resume"),r.resume()),e},E.prototype.unpipe=function(e){var t=this._readableState,r={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,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o0,!1!==n.flowing&&this.resume()):"readable"!==e||n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,a("on readable",n.length,n.reading),n.length?U(this):n.reading||i.nextTick(F,this)),r},E.prototype.addListener=E.prototype.on,E.prototype.removeListener=function(e,t){var r=c.prototype.removeListener.call(this,e,t);return"readable"===e&&i.nextTick(L,this),r},E.prototype.removeAllListeners=function(e){var t=c.prototype.removeAllListeners.apply(this,arguments);return("readable"===e||void 0===e)&&i.nextTick(L,this),t},E.prototype.resume=function(){var e=this._readableState;return e.flowing||(a("resume"),e.flowing=!e.readableListening,V(this,e)),e.paused=!1,this},E.prototype.pause=function(){return a("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(a("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},E.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",function(){if(a("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)}),e.on("data",function(i){a("wrapped data"),r.decoder&&(i=r.decoder.write(i)),(!r.objectMode||null!=i)&&(r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause()))}),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o-1))throw new O(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(R.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(R.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),R.prototype._write=function(e,t,r){r(new v("_write()"))},R.prototype._writev=null,R.prototype.end=function(e,t,r){var n=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||V(this,n,r),this},Object.defineProperty(R.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(R.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),R.prototype.destroy=h.destroy,R.prototype._undestroy=h.undestroy,R.prototype._destroy=function(e,t){t(e)}},871:function(e,t,r){function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var o,a=r(698),s=Symbol("lastResolve"),l=Symbol("lastReject"),u=Symbol("error"),d=Symbol("ended"),c=Symbol("lastPromise"),p=Symbol("handlePromise"),f=Symbol("stream");function h(e,t){return{value:e,done:t}}function g(e){var t=e[s];if(null!==t){var r=e[f].read();null!==r&&(e[c]=null,e[s]=null,e[l]=null,t(h(r,!1)))}}function m(e){i.nextTick(g,e)}function y(e,t){return function(r,n){e.then(function(){if(t[d]){r(h(void 0,!0));return}t[p](r,n)},n)}}var v=Object.getPrototypeOf(function(){}),b=Object.setPrototypeOf((n(o={get stream(){return this[f]},next:function(){var e,t=this,r=this[u];if(null!==r)return Promise.reject(r);if(this[d])return Promise.resolve(h(void 0,!0));if(this[f].destroyed)return new Promise(function(e,r){i.nextTick(function(){t[u]?r(t[u]):e(h(void 0,!0))})});var n=this[c];if(n)e=new Promise(y(n,this));else{var o=this[f].read();if(null!==o)return Promise.resolve(h(o,!1));e=new Promise(this[p])}return this[c]=e,e}},Symbol.asyncIterator,function(){return this}),n(o,"return",function(){var e=this;return new Promise(function(t,r){e[f].destroy(null,function(e){if(e){r(e);return}t(h(void 0,!0))})})}),o),v),S=function(e){var t,r=Object.create(b,(n(t={},f,{value:e,writable:!0}),n(t,s,{value:null,writable:!0}),n(t,l,{value:null,writable:!0}),n(t,u,{value:null,writable:!0}),n(t,d,{value:e._readableState.endEmitted,writable:!0}),n(t,p,{value:function(e,t){var n=r[f].read();n?(r[c]=null,r[s]=null,r[l]=null,e(h(n,!1))):(r[s]=e,r[l]=t)},writable:!0}),t));return r[c]=null,a(e,function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[l];null!==t&&(r[c]=null,r[s]=null,r[l]=null,t(e)),r[u]=e;return}var n=r[s];null!==n&&(r[c]=null,r[s]=null,r[l]=null,n(h(void 0,!0))),r[d]=!0}),e.on("readable",m.bind(null,r)),r};e.exports=S},379:function(e,t,r){function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function i(e){for(var t=1;t0?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,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return u.alloc(0);for(var t=u.allocUnsafe(e>>>0),r=this.head,n=0;r;)p(r.data,t,n),n+=r.data.length,r=r.next;return t}},{key:"consume",value:function(e,t){var r;return ei.length?i.length:e;if(o===i.length?n+=i:n+=i.slice(0,e),0==(e-=o)){o===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=u.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var i=r.data,o=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,o),0==(e-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,t}},{key:c,value:function(e,t){return d(this,i({},t,{depth:0,customInspect:!1}))}}]),e}()},25:function(e){function t(e,t){var o=this,s=this._readableState&&this._readableState.destroyed,l=this._writableState&&this._writableState.destroyed;return s||l?t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,i.nextTick(a,this,e)):i.nextTick(a,this,e)):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?o._writableState?o._writableState.errorEmitted?i.nextTick(n,o):(o._writableState.errorEmitted=!0,i.nextTick(r,o,e)):i.nextTick(r,o,e):t?(i.nextTick(n,o),t(e)):i.nextTick(n,o)})),this}function r(e,t){a(e,t),n(e)}function n(e){(!e._writableState||e._writableState.emitClose)&&(!e._readableState||e._readableState.emitClose)&&e.emit("close")}function o(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function a(e,t){e.emit("error",t)}function s(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}e.exports={destroy:t,undestroy:o,errorOrDestroy:s}},698:function(e,t,r){var n=r(646).q.ERR_STREAM_PREMATURE_CLOSE;function i(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=Array(r),i=0;i0,function(t){e||(e=t),t&&o.forEach(c),a||(o.forEach(c),i(e))})});return r.reduce(p)}e.exports=h},776:function(e,t,r){var n=r(646).q.ERR_INVALID_OPT_VALUE;function i(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}function o(e,t,r,o){var a=i(t,o,r);if(null!=a){if(!(isFinite(a)&&Math.floor(a)===a)||a<0)throw new n(o?r:"highWaterMark",a);return Math.floor(a)}return e.objectMode?16:16384}e.exports={getHighWaterMark:o}},678:function(e,t,r){e.exports=r(781)},55:function(e,t,r){var n=r(300),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(o(n,t),t.Buffer=a),a.prototype=Object.create(i.prototype),o(i,a),a.from=function(e,t,r){if("number"==typeof e)throw TypeError("Argument must not be a number");return i(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},a.allocUnsafe=function(e){if("number"!=typeof e)throw TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw TypeError("Argument must be a number");return n.SlowBuffer(e)}},173:function(e,t,r){e.exports=i;var n=r(361).EventEmitter;function i(){n.call(this)}r(782)(i,n),i.Readable=r(709),i.Writable=r(337),i.Duplex=r(403),i.Transform=r(170),i.PassThrough=r(889),i.finished=r(698),i.pipeline=r(442),i.Stream=i,i.prototype.pipe=function(e,t){var r=this;function i(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function o(){r.readable&&r.resume&&r.resume()}r.on("data",i),e.on("drain",o),e._isStdio||t&&!1===t.end||(r.on("end",s),r.on("close",l));var a=!1;function s(){a||(a=!0,e.end())}function l(){a||(a=!0,"function"==typeof e.destroy&&e.destroy())}function u(e){if(d(),0===n.listenerCount(this,"error"))throw e}function d(){r.removeListener("data",i),e.removeListener("drain",o),r.removeListener("end",s),r.removeListener("close",l),r.removeListener("error",u),e.removeListener("error",u),r.removeListener("end",d),r.removeListener("close",d),e.removeListener("close",d)}return r.on("error",u),e.on("error",u),r.on("end",d),r.on("close",d),e.on("close",d),e.emit("pipe",r),e}},704:function(e,t,r){var n=r(55).Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;if(!e)return"utf8";for(;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}function a(e){var t=o(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw Error("Unknown encoding: "+e);return t||e}function s(e){var t;switch(this.encoding=a(e),this.encoding){case"utf16le":this.text=h,this.end=g,t=4;break;case"utf8":this.fillLast=c,t=4;break;case"base64":this.text=m,this.end=y,t=3;break;default:this.write=v,this.end=b;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function l(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,t,r){var n=t.length-1;if(n=0?(i>0&&(e.lastNeed=i-1),i):--n=0?(i>0&&(e.lastNeed=i-2),i):--n=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0}function d(e,t,r){if((192&t[0])!=128)return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if((192&t[1])!=128)return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&(192&t[2])!=128)return e.lastNeed=2,"�"}}function c(e){var t=this.lastTotal-this.lastNeed,r=d(this,e,t);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):void(e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length)}function p(e,t){var r=u(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)}function f(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t}function h(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function g(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function m(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function y(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function v(e){return e.toString(this.encoding)}function b(e){return e&&e.length?this.write(e):""}t.s=s,s.prototype.write=function(e){var t,r;if(0===e.length)return"";if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r-1?i(r):r}},139:function(e,t,r){var n=r(174),i=r(925),o=i("%Function.prototype.apply%"),a=i("%Function.prototype.call%"),s=i("%Reflect.apply%",!0)||n.call(a,o),l=i("%Object.getOwnPropertyDescriptor%",!0),u=i("%Object.defineProperty%",!0),d=i("%Math.max%");if(u)try{u({},"a",{value:1})}catch(e){u=null}e.exports=function(e){var t=s(n,a,arguments);return l&&u&&l(t,"length").configurable&&u(t,"length",{value:1+d(0,e.length-(arguments.length-1))}),t};var c=function(){return s(n,o,arguments)};u?u(e.exports,"apply",{value:c}):e.exports.apply=c},144:function(e){var t=Object.prototype.hasOwnProperty,r=Object.prototype.toString;e.exports=function(e,n,i){if("[object Function]"!==r.call(n))throw TypeError("iterator must be a function");var o=e.length;if(o===+o)for(var a=0;a1&&"boolean"!=typeof t)throw new a('"allowMissing" argument must be a boolean');if(null===O(/^%?[^%]*%?$/g,e))throw new i("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=I(e),n=r.length>0?r[0]:"",o=R("%"+n+"%",t),s=o.name,u=o.value,d=!1,c=o.alias;c&&(n=c[0],w(r,S([0,1],c)));for(var p=1,f=!0;p=r.length){var v=l(u,h);u=(f=!!v)&&"get"in v&&!("originalValue"in v.get)?v.get:u[h]}else f=b(u,h),u=u[h];f&&!d&&(g[s]=u)}}return u}},925:function(e,t,r){var n,i=SyntaxError,o=Function,a=TypeError,s=function(e){try{return o('"use strict"; return ('+e+").constructor;")()}catch(e){}},l=Object.getOwnPropertyDescriptor;if(l)try{l({},"")}catch(e){l=null}var u=function(){throw new a},d=l?function(){try{return arguments.callee,u}catch(e){try{return l(arguments,"callee").get}catch(e){return u}}}():u,c=r(115)(),p=r(504)(),f=Object.getPrototypeOf||(p?function(e){return e.__proto__}:null),h={},g="undefined"!=typeof Uint8Array&&f?f(Uint8Array):n,m={"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":c&&f?f([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":h,"%AsyncGenerator%":h,"%AsyncGeneratorFunction%":h,"%AsyncIteratorPrototype%":h,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":o,"%GeneratorFunction%":h,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":c&&f?f(f([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&c&&f?f((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&c&&f?f((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":c&&f?f(""[Symbol.iterator]()):n,"%Symbol%":c?Symbol:n,"%SyntaxError%":i,"%ThrowTypeError%":d,"%TypedArray%":g,"%TypeError%":a,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet};if(f)try{null.error}catch(e){var y=f(f(e));m["%Error.prototype%"]=y}var v=function e(t){var r;if("%AsyncFunction%"===t)r=s("async function () {}");else if("%GeneratorFunction%"===t)r=s("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=s("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var i=e("%AsyncGenerator%");i&&f&&(r=f(i.prototype))}return m[t]=r,r},b={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},S=r(174),w=r(101),_=S.call(Function.call,Array.prototype.concat),k=S.call(Function.apply,Array.prototype.splice),O=S.call(Function.call,String.prototype.replace),P=S.call(Function.call,String.prototype.slice),A=S.call(Function.call,RegExp.prototype.exec),I=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,R=/\\(\\)?/g,E=function(e){var t=P(e,0,1),r=P(e,-1);if("%"===t&&"%"!==r)throw new i("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new i("invalid intrinsic syntax, expected opening `%`");var n=[];return O(e,I,function(e,t,r,i){n[n.length]=r?O(i,R,"$1"):t||e}),n},T=function(e,t){var r,n=e;if(w(b,n)&&(n="%"+(r=b[n])[0]+"%"),w(m,n)){var o=m[n];if(o===h&&(o=v(n)),void 0===o&&!t)throw new a("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new i("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new a('"allowMissing" argument must be a boolean');if(null===A(/^%?[^%]*%?$/,e))throw new i("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=E(e),n=r.length>0?r[0]:"",o=T("%"+n+"%",t),s=o.name,u=o.value,d=!1,c=o.alias;c&&(n=c[0],k(r,_([0,1],c)));for(var p=1,f=!0;p=r.length){var v=l(u,h);u=(f=!!v)&&"get"in v&&!("originalValue"in v.get)?v.get:u[h]}else f=w(u,h),u=u[h];f&&!d&&(m[s]=u)}}return u}},504:function(e){var t={foo:{}},r=Object;e.exports=function(){return({__proto__:t}).foo===t.foo&&!(({__proto__:null})instanceof r)}},942:function(e,t,r){var n="undefined"!=typeof Symbol&&Symbol,i=r(773);e.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&i()}},773:function(e){e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t||"[object Symbol]"!==Object.prototype.toString.call(t)||"[object Symbol]"!==Object.prototype.toString.call(r))return!1;var n=42;for(t in e[t]=n,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length||"function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var i=Object.getOwnPropertySymbols(e);if(1!==i.length||i[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(o.value!==n||!0!==o.enumerable)return!1}return!0}},115:function(e,t,r){var n="undefined"!=typeof Symbol&&Symbol,i=r(832);e.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&i()}},832:function(e){e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t||"[object Symbol]"!==Object.prototype.toString.call(t)||"[object Symbol]"!==Object.prototype.toString.call(r))return!1;var n=42;for(t in e[t]=n,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length||"function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var i=Object.getOwnPropertySymbols(e);if(1!==i.length||i[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(o.value!==n||!0!==o.enumerable)return!1}return!0}},101:function(e,t,r){var n=r(174);e.exports=n.call(Function.call,Object.prototype.hasOwnProperty)},782:function(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 r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},157:function(e){var t="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,r=Object.prototype.toString,n=function(e){return(!t||!e||"object"!=typeof e||!(Symbol.toStringTag in e))&&"[object Arguments]"===r.call(e)},i=function(e){return!!n(e)||null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Array]"!==r.call(e)&&"[object Function]"===r.call(e.callee)},o=function(){return n(arguments)}();n.isLegacyArguments=i,e.exports=o?n:i},391:function(e){var t=Object.prototype.toString,r=Function.prototype.toString,n=/^\s*(?:function)?\*/,i="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,o=Object.getPrototypeOf,a=function(){if(!i)return!1;try{return Function("return function*() {}")()}catch(e){}}(),s=a?o(a):{};e.exports=function(e){return"function"==typeof e&&(!!n.test(r.call(e))||(i?o(e)===s:"[object GeneratorFunction]"===t.call(e)))}},994:function(e,t,n){var i=n(144),o=n(349),a=n(256),s=a("Object.prototype.toString"),l=n(942)()&&"symbol"==typeof Symbol.toStringTag,u=o(),d=a("Array.prototype.indexOf",!0)||function(e,t){for(var r=0;r-1)}},369:function(e){e.exports=function(e){return e instanceof i}},584:function(e,t,r){var n=r(157),i=r(391),o=r(490),a=r(994);function s(e){return e.call.bind(e)}var l="undefined"!=typeof BigInt,u="undefined"!=typeof Symbol,d=s(Object.prototype.toString),c=s(Number.prototype.valueOf),p=s(String.prototype.valueOf),f=s(Boolean.prototype.valueOf);if(l)var h=s(BigInt.prototype.valueOf);if(u)var g=s(Symbol.prototype.valueOf);function m(e,t){if("object"!=typeof e)return!1;try{return t(e),!0}catch(e){return!1}}function y(e){return"undefined"!=typeof Promise&&e instanceof Promise||null!==e&&"object"==typeof e&&"function"==typeof e.then&&"function"==typeof e.catch}function v(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):a(e)||q(e)}function b(e){return"Uint8Array"===o(e)}function S(e){return"Uint8ClampedArray"===o(e)}function w(e){return"Uint16Array"===o(e)}function _(e){return"Uint32Array"===o(e)}function k(e){return"Int8Array"===o(e)}function O(e){return"Int16Array"===o(e)}function P(e){return"Int32Array"===o(e)}function A(e){return"Float32Array"===o(e)}function I(e){return"Float64Array"===o(e)}function R(e){return"BigInt64Array"===o(e)}function E(e){return"BigUint64Array"===o(e)}function T(e){return"[object Map]"===d(e)}function N(e){return"undefined"!=typeof Map&&(T.working?T(e):e instanceof Map)}function x(e){return"[object Set]"===d(e)}function B(e){return"undefined"!=typeof Set&&(x.working?x(e):e instanceof Set)}function C(e){return"[object WeakMap]"===d(e)}function M(e){return"undefined"!=typeof WeakMap&&(C.working?C(e):e instanceof WeakMap)}function D(e){return"[object WeakSet]"===d(e)}function U(e){return D(e)}function J(e){return"[object ArrayBuffer]"===d(e)}function j(e){return"undefined"!=typeof ArrayBuffer&&(J.working?J(e):e instanceof ArrayBuffer)}function H(e){return"[object DataView]"===d(e)}function q(e){return"undefined"!=typeof DataView&&(H.working?H(e):e instanceof DataView)}t.isArgumentsObject=n,t.isGeneratorFunction=i,t.isTypedArray=a,t.isPromise=y,t.isArrayBufferView=v,t.isUint8Array=b,t.isUint8ClampedArray=S,t.isUint16Array=w,t.isUint32Array=_,t.isInt8Array=k,t.isInt16Array=O,t.isInt32Array=P,t.isFloat32Array=A,t.isFloat64Array=I,t.isBigInt64Array=R,t.isBigUint64Array=E,T.working="undefined"!=typeof Map&&T(new Map),t.isMap=N,x.working="undefined"!=typeof Set&&x(new Set),t.isSet=B,C.working="undefined"!=typeof WeakMap&&C(new WeakMap),t.isWeakMap=M,D.working="undefined"!=typeof WeakSet&&D(new WeakSet),t.isWeakSet=U,J.working="undefined"!=typeof ArrayBuffer&&J(new ArrayBuffer),t.isArrayBuffer=j,H.working="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView&&H(new DataView(new ArrayBuffer(1),0,1)),t.isDataView=q;var L="undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function F(e){return"[object SharedArrayBuffer]"===d(e)}function V(e){return void 0!==L&&(void 0===F.working&&(F.working=F(new L)),F.working?F(e):e instanceof L)}function z(e){return"[object AsyncFunction]"===d(e)}function W(e){return"[object Map Iterator]"===d(e)}function Q(e){return"[object Set Iterator]"===d(e)}function G(e){return"[object Generator]"===d(e)}function K(e){return"[object WebAssembly.Module]"===d(e)}function Y(e){return m(e,c)}function Z(e){return m(e,p)}function X(e){return m(e,f)}function $(e){return l&&m(e,h)}function ee(e){return u&&m(e,g)}function et(e){return Y(e)||Z(e)||X(e)||$(e)||ee(e)}function er(e){return"undefined"!=typeof Uint8Array&&(j(e)||V(e))}t.isSharedArrayBuffer=V,t.isAsyncFunction=z,t.isMapIterator=W,t.isSetIterator=Q,t.isGeneratorObject=G,t.isWebAssemblyCompiledModule=K,t.isNumberObject=Y,t.isStringObject=Z,t.isBooleanObject=X,t.isBigIntObject=$,t.isSymbolObject=ee,t.isBoxedPrimitive=et,t.isAnyArrayBuffer=er,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(e){Object.defineProperty(t,e,{enumerable:!1,value:function(){throw Error(e+" is not supported in userland")}})})},177:function(e,t,r){var n=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),r={},n=0;n=o)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}}),s=n[r];r=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),S(r)?n.showHidden=r:r&&t._extend(n,r),A(n.showHidden)&&(n.showHidden=!1),A(n.depth)&&(n.depth=2),A(n.colors)&&(n.colors=!1),A(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=d),f(n,e,n.depth)}function d(e,t){var r=u.styles[t];return r?"\x1b["+u.colors[r][0]+"m"+e+"\x1b["+u.colors[r][1]+"m":e}function c(e,t){return e}function p(e){var t={};return e.forEach(function(e,r){t[e]=!0}),t}function f(e,r,n){if(e.customInspect&&r&&N(r.inspect)&&r.inspect!==t.inspect&&!(r.constructor&&r.constructor.prototype===r)){var i,o=r.inspect(n,e);return O(o)||(o=f(e,o,n)),o}var a=h(e,r);if(a)return a;var s=Object.keys(r),l=p(s);if(e.showHidden&&(s=Object.getOwnPropertyNames(r)),T(r)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return g(r);if(0===s.length){if(N(r)){var u=r.name?": "+r.name:"";return e.stylize("[Function"+u+"]","special")}if(I(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(E(r))return e.stylize(Date.prototype.toString.call(r),"date");if(T(r))return g(r)}var d="",c=!1,S=["{","}"];return(b(r)&&(c=!0,S=["[","]"]),N(r)&&(d=" [Function"+(r.name?": "+r.name:"")+"]"),I(r)&&(d=" "+RegExp.prototype.toString.call(r)),E(r)&&(d=" "+Date.prototype.toUTCString.call(r)),T(r)&&(d=" "+g(r)),0!==s.length||c&&0!=r.length)?n<0?I(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),i=c?m(e,r,n,l,s):s.map(function(t){return y(e,r,n,l,t,c)}),e.seen.pop(),v(i,d,S)):S[0]+d+S[1]}function h(e,t){if(A(t))return e.stylize("undefined","undefined");if(O(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return k(t)?e.stylize(""+t,"number"):S(t)?e.stylize(""+t,"boolean"):w(t)?e.stylize("null","null"):void 0}function g(e){return"["+Error.prototype.toString.call(e)+"]"}function m(e,t,r,n,i){for(var o=[],a=0,s=t.length;ae.seen.indexOf(l.value)?(s=w(r)?f(e,l.value,null):f(e,l.value,r-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+s.split("\n").map(function(e){return" "+e}).join("\n")):s=e.stylize("[Circular]","special")),A(a)){if(o&&i.match(/^\d+$/))return s;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function v(e,t,r){var n=0;return e.reduce(function(e,t){return n++,t.indexOf("\n")>=0&&n++,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}function b(e){return Array.isArray(e)}function S(e){return"boolean"==typeof e}function w(e){return null===e}function _(e){return null==e}function k(e){return"number"==typeof e}function O(e){return"string"==typeof e}function P(e){return"symbol"==typeof e}function A(e){return void 0===e}function I(e){return R(e)&&"[object RegExp]"===B(e)}function R(e){return"object"==typeof e&&null!==e}function E(e){return R(e)&&"[object Date]"===B(e)}function T(e){return R(e)&&("[object Error]"===B(e)||e instanceof Error)}function N(e){return"function"==typeof e}function x(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e}function B(e){return Object.prototype.toString.call(e)}function C(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(!a[e=e.toUpperCase()]){if(s.test(e)){var r=o.pid;a[e]=function(){var n=t.format.apply(t,arguments);console.error("%s %d: %s",e,r,n)}}else a[e]=function(){}}return a[e]},t.inspect=u,u.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},u.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.types=r(584),t.isArray=b,t.isBoolean=S,t.isNull=w,t.isNullOrUndefined=_,t.isNumber=k,t.isString=O,t.isSymbol=P,t.isUndefined=A,t.isRegExp=I,t.types.isRegExp=I,t.isObject=R,t.isDate=E,t.types.isDate=E,t.isError=T,t.types.isNativeError=T,t.isFunction=N,t.isPrimitive=x,t.isBuffer=r(369);var M=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function D(){var e=new Date,t=[C(e.getHours()),C(e.getMinutes()),C(e.getSeconds())].join(":");return[e.getDate(),M[e.getMonth()],t].join(" ")}function U(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){console.log("%s - %s",D(),t.format.apply(t,arguments))},t.inherits=r(782),t._extend=function(e,t){if(!t||!R(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};var J="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function j(e,t){if(!e){var r=Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}function H(e){if("function"!=typeof e)throw TypeError('The "original" argument must be of type Function');function t(){for(var t=[],r=0;r{let t=l[e]||"",{repeat:r,optional:n}=s[e],i="["+(r?"...":"")+e+"]";return n&&(i=(t?"":"/")+"["+i+"]"),r&&!Array.isArray(t)&&(t=[t]),(n||e in l)&&(o=o.replace(i,r?t.map(e=>encodeURIComponent(e)).join("/"):encodeURIComponent(t))||"/")})||(o=""),{params:u,result:o}}},11305:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isDynamicRoute",{enumerable:!0,get:function(){return o}});let n=r(94749),i=/\/\[[^/]+?\](?=\/|$)/;function o(e){return(0,n.isInterceptionRouteAppPath)(e)&&(e=(0,n.extractInterceptionRouteInformation)(e).interceptedRoute),i.test(e)}},17434:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isLocalURL",{enumerable:!0,get:function(){return o}});let n=r(36874),i=r(87379);function o(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,i.hasBasePath)(r.pathname)}catch(e){return!1}}},24544:function(e,t){"use strict";function r(e,t){let r={};return Object.keys(e).forEach(n=>{t.includes(n)||(r[n]=e[n])}),r}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"omit",{enumerable:!0,get:function(){return r}})},95770:function(e,t){"use strict";function r(e){let t={};return e.forEach((e,r)=>{void 0===t[r]?t[r]=e:Array.isArray(t[r])?t[r].push(e):t[r]=[t[r],e]}),t}function n(e){return"string"!=typeof e&&("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function i(e){let t=new URLSearchParams;return Object.entries(e).forEach(e=>{let[r,i]=e;Array.isArray(i)?i.forEach(e=>t.append(r,n(e))):t.set(r,n(i))}),t}function o(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n{Array.from(t.keys()).forEach(t=>e.delete(t)),t.forEach((t,r)=>e.append(r,t))}),e}Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{searchParamsToUrlQuery:function(){return r},urlQueryToSearchParams:function(){return i},assign:function(){return o}})},2395:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getRouteMatcher",{enumerable:!0,get:function(){return i}});let n=r(36874);function i(e){let{re:t,groups:r}=e;return e=>{let i=t.exec(e);if(!i)return!1;let o=e=>{try{return decodeURIComponent(e)}catch(e){throw new n.DecodeError("failed to decode param")}},a={};return Object.keys(r).forEach(e=>{let t=r[e],n=i[t.pos];void 0!==n&&(a[e]=~n.indexOf("/")?n.split("/").map(e=>o(e)):t.repeat?[o(n)]:o(n))}),a}}},19935:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{getRouteRegex:function(){return d},getNamedRouteRegex:function(){return h},getNamedMiddlewareRegex:function(){return g}});let n=r(94749),i=r(22202),o=r(95868),a="nxtP",s="nxtI";function l(e){let t=e.startsWith("[")&&e.endsWith("]");t&&(e=e.slice(1,-1));let r=e.startsWith("...");return r&&(e=e.slice(3)),{key:e,repeat:r,optional:t}}function u(e){let t=(0,o.removeTrailingSlash)(e).slice(1).split("/"),r={},a=1;return{parameterizedRoute:t.map(e=>{let t=n.INTERCEPTION_ROUTE_MARKERS.find(t=>e.startsWith(t)),o=e.match(/\[((?:\[.*\])|.+)\]/);if(t&&o){let{key:e,optional:n,repeat:s}=l(o[1]);return r[e]={pos:a++,repeat:s,optional:n},"/"+(0,i.escapeStringRegexp)(t)+"([^/]+?)"}if(!o)return"/"+(0,i.escapeStringRegexp)(e);{let{key:e,repeat:t,optional:n}=l(o[1]);return r[e]={pos:a++,repeat:t,optional:n},t?n?"(?:/(.+?))?":"/(.+?)":"/([^/]+?)"}}).join(""),groups:r}}function d(e){let{parameterizedRoute:t,groups:r}=u(e);return{re:RegExp("^"+t+"(?:/)?$"),groups:r}}function c(){let e=0;return()=>{let t="",r=++e;for(;r>0;)t+=String.fromCharCode(97+(r-1)%26),r=Math.floor((r-1)/26);return t}}function p(e){let{interceptionMarker:t,getSafeRouteKey:r,segment:n,routeKeys:o,keyPrefix:a}=e,{key:s,optional:u,repeat:d}=l(n),c=s.replace(/\W/g,"");a&&(c=""+a+c);let p=!1;(0===c.length||c.length>30)&&(p=!0),isNaN(parseInt(c.slice(0,1)))||(p=!0),p&&(c=r()),a?o[c]=""+a+s:o[c]=s;let f=t?(0,i.escapeStringRegexp)(t):"";return d?u?"(?:/"+f+"(?<"+c+">.+?))?":"/"+f+"(?<"+c+">.+?)":"/"+f+"(?<"+c+">[^/]+?)"}function f(e,t){let r=(0,o.removeTrailingSlash)(e).slice(1).split("/"),l=c(),u={};return{namedParameterizedRoute:r.map(e=>{let r=n.INTERCEPTION_ROUTE_MARKERS.some(t=>e.startsWith(t)),o=e.match(/\[((?:\[.*\])|.+)\]/);if(r&&o){let[r]=e.split(o[0]);return p({getSafeRouteKey:l,interceptionMarker:r,segment:o[1],routeKeys:u,keyPrefix:t?s:void 0})}return o?p({getSafeRouteKey:l,segment:o[1],routeKeys:u,keyPrefix:t?a:void 0}):"/"+(0,i.escapeStringRegexp)(e)}).join(""),routeKeys:u}}function h(e,t){let r=f(e,t);return{...d(e),namedRegex:"^"+r.namedParameterizedRoute+"(?:/)?$",routeKeys:r.routeKeys}}function g(e,t){let{parameterizedRoute:r}=u(e),{catchAll:n=!0}=t;if("/"===r)return{namedRegex:"^/"+(n?".*":"")+"$"};let{namedParameterizedRoute:i}=f(e,!1);return{namedRegex:"^"+i+(n?"(?:(/.*)?)":"")+"$"}}},97409:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getSortedRoutes",{enumerable:!0,get:function(){return n}});class r{insert(e){this._insert(e.split("/").filter(Boolean),[],!1)}smoosh(){return this._smoosh()}_smoosh(e){void 0===e&&(e="/");let t=[...this.children.keys()].sort();null!==this.slugName&&t.splice(t.indexOf("[]"),1),null!==this.restSlugName&&t.splice(t.indexOf("[...]"),1),null!==this.optionalRestSlugName&&t.splice(t.indexOf("[[...]]"),1);let r=t.map(t=>this.children.get(t)._smoosh(""+e+t+"/")).reduce((e,t)=>[...e,...t],[]);if(null!==this.slugName&&r.push(...this.children.get("[]")._smoosh(e+"["+this.slugName+"]/")),!this.placeholder){let t="/"===e?"/":e.slice(0,-1);if(null!=this.optionalRestSlugName)throw Error('You cannot define a route with the same specificity as a optional catch-all route ("'+t+'" and "'+t+"[[..."+this.optionalRestSlugName+']]").');r.unshift(t)}return null!==this.restSlugName&&r.push(...this.children.get("[...]")._smoosh(e+"[..."+this.restSlugName+"]/")),null!==this.optionalRestSlugName&&r.push(...this.children.get("[[...]]")._smoosh(e+"[[..."+this.optionalRestSlugName+"]]/")),r}_insert(e,t,n){if(0===e.length){this.placeholder=!1;return}if(n)throw Error("Catch-all must be the last part of the URL.");let i=e[0];if(i.startsWith("[")&&i.endsWith("]")){let r=i.slice(1,-1),a=!1;if(r.startsWith("[")&&r.endsWith("]")&&(r=r.slice(1,-1),a=!0),r.startsWith("...")&&(r=r.substring(3),n=!0),r.startsWith("[")||r.endsWith("]"))throw Error("Segment names may not start or end with extra brackets ('"+r+"').");if(r.startsWith("."))throw Error("Segment names may not start with erroneous periods ('"+r+"').");function o(e,r){if(null!==e&&e!==r)throw Error("You cannot use different slug names for the same dynamic path ('"+e+"' !== '"+r+"').");t.forEach(e=>{if(e===r)throw Error('You cannot have the same slug name "'+r+'" repeat within a single dynamic path');if(e.replace(/\W/g,"")===i.replace(/\W/g,""))throw Error('You cannot have the slug names "'+e+'" and "'+r+'" differ only by non-word symbols within a single dynamic path')}),t.push(r)}if(n){if(a){if(null!=this.restSlugName)throw Error('You cannot use both an required and optional catch-all route at the same level ("[...'+this.restSlugName+']" and "'+e[0]+'" ).');o(this.optionalRestSlugName,r),this.optionalRestSlugName=r,i="[[...]]"}else{if(null!=this.optionalRestSlugName)throw Error('You cannot use both an optional and required catch-all route at the same level ("[[...'+this.optionalRestSlugName+']]" and "'+e[0]+'").');o(this.restSlugName,r),this.restSlugName=r,i="[...]"}}else{if(a)throw Error('Optional route parameters are not yet supported ("'+e[0]+'").');o(this.slugName,r),this.slugName=r,i="[]"}}this.children.has(i)||this.children.set(i,new r),this.children.get(i)._insert(e.slice(1),t,n)}constructor(){this.placeholder=!0,this.children=new Map,this.slugName=null,this.restSlugName=null,this.optionalRestSlugName=null}}function n(e){let t=new r;return e.forEach(e=>t.insert(e)),t.smoosh()}},36874:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{WEB_VITALS:function(){return r},execOnce:function(){return n},isAbsoluteUrl:function(){return o},getLocationOrigin:function(){return a},getURL:function(){return s},getDisplayName:function(){return l},isResSent:function(){return u},normalizeRepeatedSlashes:function(){return d},loadGetInitialProps:function(){return c},SP:function(){return p},ST:function(){return f},DecodeError:function(){return h},NormalizeError:function(){return g},PageNotFoundError:function(){return m},MissingStaticPage:function(){return y},MiddlewareNotFoundError:function(){return v},stringifyError:function(){return b}});let r=["CLS","FCP","FID","INP","LCP","TTFB"];function n(e){let t,r=!1;return function(){for(var n=arguments.length,i=Array(n),o=0;oi.test(e);function a(){let{protocol:e,hostname:t,port:r}=window.location;return e+"//"+t+(r?":"+r:"")}function s(){let{href:e}=window.location,t=a();return e.substring(t.length)}function l(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function u(e){return e.finished||e.headersSent}function d(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?"?"+t.slice(1).join("?"):"")}async function c(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await c(t.Component,t.ctx)}:{};let n=await e.getInitialProps(t);if(r&&u(r))return n;if(!n)throw Error('"'+l(e)+'.getInitialProps()" should resolve to an object. But found "'+n+'" instead.');return n}let p="undefined"!=typeof performance,f=p&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class h extends Error{}class g extends Error{}class m extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message="Cannot find module for page: "+e}}class y extends Error{constructor(e,t){super(),this.message="Failed to load static file for page: "+e+" "+t}}class v extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function b(e){return JSON.stringify({message:e.message,stack:e.stack})}},40174:function(e,t,r){"use strict";var n;if(!Object.keys){var i=Object.prototype.hasOwnProperty,o=Object.prototype.toString,a=r(42947),s=Object.prototype.propertyIsEnumerable,l=!s.call({toString:null},"toString"),u=s.call(function(){},"prototype"),d=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],c=function(e){var t=e.constructor;return t&&t.prototype===e},p={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},f=function(){for(var e in window)try{if(!p["$"+e]&&i.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{c(window[e])}catch(e){return!0}}catch(e){return!0}return!1}(),h=function(e){if(!f)return c(e);try{return c(e)}catch(e){return!1}};n=function(e){var t=null!==e&&"object"==typeof e,r="[object Function]"===o.call(e),n=a(e),s=t&&"[object String]"===o.call(e),c=[];if(!t&&!r&&!n)throw TypeError("Object.keys called on a non-object");var p=u&&r;if(s&&e.length>0&&!i.call(e,0))for(var f=0;f0)for(var g=0;g=0&&"[object Function]"===t.call(e.callee)),n}},71821:function(e,t,r){"use strict";let{Deflate:n,deflate:i,deflateRaw:o,gzip:a}=r(96232),{Inflate:s,inflate:l,inflateRaw:u,ungzip:d}=r(36449),c=r(70113);e.exports.Deflate=n,e.exports.deflate=i,e.exports.deflateRaw=o,e.exports.gzip=a,e.exports.Inflate=s,e.exports.inflate=l,e.exports.inflateRaw=u,e.exports.ungzip=d,e.exports.constants=c},96232:function(e,t,r){"use strict";let n=r(75102),i=r(71387),o=r(94256),a=r(82077),s=r(75027),l=Object.prototype.toString,{Z_NO_FLUSH:u,Z_SYNC_FLUSH:d,Z_FULL_FLUSH:c,Z_FINISH:p,Z_OK:f,Z_STREAM_END:h,Z_DEFAULT_COMPRESSION:g,Z_DEFAULT_STRATEGY:m,Z_DEFLATED:y}=r(70113);function v(e){this.options=i.assign({level:g,method:y,chunkSize:16384,windowBits:15,memLevel:8,strategy:m},e||{});let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new s,this.strm.avail_out=0;let r=n.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(r!==f)throw Error(a[r]);if(t.header&&n.deflateSetHeader(this.strm,t.header),t.dictionary){let e;if(e="string"==typeof t.dictionary?o.string2buf(t.dictionary):"[object ArrayBuffer]"===l.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,(r=n.deflateSetDictionary(this.strm,e))!==f)throw Error(a[r]);this._dict_set=!0}}function b(e,t){let r=new v(t);if(r.push(e,!0),r.err)throw r.msg||a[r.err];return r.result}function S(e,t){return(t=t||{}).raw=!0,b(e,t)}function w(e,t){return(t=t||{}).gzip=!0,b(e,t)}v.prototype.push=function(e,t){let r,i;let a=this.strm,s=this.options.chunkSize;if(this.ended)return!1;for(i=t===~~t?t:!0===t?p:u,"string"==typeof e?a.input=o.string2buf(e):"[object ArrayBuffer]"===l.call(e)?a.input=new Uint8Array(e):a.input=e,a.next_in=0,a.avail_in=a.input.length;;){if(0===a.avail_out&&(a.output=new Uint8Array(s),a.next_out=0,a.avail_out=s),(i===d||i===c)&&a.avail_out<=6){this.onData(a.output.subarray(0,a.next_out)),a.avail_out=0;continue}if((r=n.deflate(a,i))===h)return a.next_out>0&&this.onData(a.output.subarray(0,a.next_out)),r=n.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===f;if(0===a.avail_out){this.onData(a.output);continue}if(i>0&&a.next_out>0){this.onData(a.output.subarray(0,a.next_out)),a.avail_out=0;continue}if(0===a.avail_in)break}return!0},v.prototype.onData=function(e){this.chunks.push(e)},v.prototype.onEnd=function(e){e===f&&(this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},e.exports.Deflate=v,e.exports.deflate=b,e.exports.deflateRaw=S,e.exports.gzip=w,e.exports.constants=r(70113)},36449:function(e,t,r){"use strict";let n=r(62450),i=r(71387),o=r(94256),a=r(82077),s=r(75027),l=r(85315),u=Object.prototype.toString,{Z_NO_FLUSH:d,Z_FINISH:c,Z_OK:p,Z_STREAM_END:f,Z_NEED_DICT:h,Z_STREAM_ERROR:g,Z_DATA_ERROR:m,Z_MEM_ERROR:y}=r(70113);function v(e){this.options=i.assign({chunkSize:65536,windowBits:15,to:""},e||{});let t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),t.windowBits>=0&&t.windowBits<16&&!(e&&e.windowBits)&&(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(15&t.windowBits)==0&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new s,this.strm.avail_out=0;let r=n.inflateInit2(this.strm,t.windowBits);if(r!==p||(this.header=new l,n.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=o.string2buf(t.dictionary):"[object ArrayBuffer]"===u.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=n.inflateSetDictionary(this.strm,t.dictionary))!==p)))throw Error(a[r])}function b(e,t){let r=new v(t);if(r.push(e),r.err)throw r.msg||a[r.err];return r.result}function S(e,t){return(t=t||{}).raw=!0,b(e,t)}v.prototype.push=function(e,t){let r,i,a;let s=this.strm,l=this.options.chunkSize,v=this.options.dictionary;if(this.ended)return!1;for(i=t===~~t?t:!0===t?c:d,"[object ArrayBuffer]"===u.call(e)?s.input=new Uint8Array(e):s.input=e,s.next_in=0,s.avail_in=s.input.length;;){for(0===s.avail_out&&(s.output=new Uint8Array(l),s.next_out=0,s.avail_out=l),(r=n.inflate(s,i))===h&&v&&((r=n.inflateSetDictionary(s,v))===p?r=n.inflate(s,i):r===m&&(r=h));s.avail_in>0&&r===f&&s.state.wrap>0&&0!==e[s.next_in];)n.inflateReset(s),r=n.inflate(s,i);switch(r){case g:case m:case h:case y:return this.onEnd(r),this.ended=!0,!1}if(a=s.avail_out,s.next_out&&(0===s.avail_out||r===f)){if("string"===this.options.to){let e=o.utf8border(s.output,s.next_out),t=s.next_out-e,r=o.buf2string(s.output,e);s.next_out=t,s.avail_out=l-t,t&&s.output.set(s.output.subarray(e,e+t),0),this.onData(r)}else this.onData(s.output.length===s.next_out?s.output:s.output.subarray(0,s.next_out))}if(r!==p||0!==a){if(r===f)return r=n.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,!0;if(0===s.avail_in)break}}return!0},v.prototype.onData=function(e){this.chunks.push(e)},v.prototype.onEnd=function(e){e===p&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},e.exports.Inflate=v,e.exports.inflate=b,e.exports.inflateRaw=S,e.exports.ungzip=b,e.exports.constants=r(70113)},71387:function(e){"use strict";let t=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);e.exports.assign=function(e){let r=Array.prototype.slice.call(arguments,1);for(;r.length;){let n=r.shift();if(n){if("object"!=typeof n)throw TypeError(n+"must be non-object");for(let r in n)t(n,r)&&(e[r]=n[r])}}return e},e.exports.flattenChunks=e=>{let t=0;for(let r=0,n=e.length;r=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;r[254]=r[254]=1,e.exports.string2buf=e=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return new TextEncoder().encode(e);let t,r,n,i,o,a=e.length,s=0;for(i=0;i>>6:(r<65536?t[o++]=224|r>>>12:(t[o++]=240|r>>>18,t[o++]=128|r>>>12&63),t[o++]=128|r>>>6&63),t[o++]=128|63&r);return t};let n=(e,r)=>{if(r<65534&&e.subarray&&t)return String.fromCharCode.apply(null,e.length===r?e:e.subarray(0,r));let n="";for(let t=0;t{let i,o;let a=t||e.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return new TextDecoder().decode(e.subarray(0,t));let s=Array(2*a);for(o=0,i=0;i4){s[o++]=65533,i+=n-1;continue}for(t&=2===n?31:3===n?15:7;n>1&&i1){s[o++]=65533;continue}t<65536?s[o++]=t:(t-=65536,s[o++]=55296|t>>10&1023,s[o++]=56320|1023&t)}return n(s,o)},e.exports.utf8border=(e,t)=>{(t=t||e.length)>e.length&&(t=e.length);let n=t-1;for(;n>=0&&(192&e[n])==128;)n--;return n<0||0===n?t:n+r[e[n]]>t?n:t}},35463:function(e){"use strict";let t=(e,t,r,n)=>{let i=65535&e|0,o=e>>>16&65535|0,a=0;for(;0!==r;){a=r>2e3?2e3:r,r-=a;do o=o+(i=i+t[n++]|0)|0;while(--a);i%=65521,o%=65521}return i|o<<16|0};e.exports=t},70113:function(e){"use strict";e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},26657:function(e){"use strict";let t=()=>{let e,t=[];for(var r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t},r=new Uint32Array(t()),n=(e,t,n,i)=>{let o=r,a=i+n;e^=-1;for(let r=i;r>>8^o[(e^t[r])&255];return -1^e};e.exports=n},75102:function(e,t,r){"use strict";let{_tr_init:n,_tr_stored_block:i,_tr_flush_block:o,_tr_tally:a,_tr_align:s}=r(4542),l=r(35463),u=r(26657),d=r(82077),{Z_NO_FLUSH:c,Z_PARTIAL_FLUSH:p,Z_FULL_FLUSH:f,Z_FINISH:h,Z_BLOCK:g,Z_OK:m,Z_STREAM_END:y,Z_STREAM_ERROR:v,Z_DATA_ERROR:b,Z_BUF_ERROR:S,Z_DEFAULT_COMPRESSION:w,Z_FILTERED:_,Z_HUFFMAN_ONLY:k,Z_RLE:O,Z_FIXED:P,Z_DEFAULT_STRATEGY:A,Z_UNKNOWN:I,Z_DEFLATED:R}=r(70113),E=9,T=15,N=8,x=286,B=30,C=19,M=573,D=15,U=3,J=258,j=262,H=32,q=42,L=57,F=69,V=73,z=91,W=103,Q=113,G=666,K=1,Y=2,Z=3,X=4,$=3,ee=(e,t)=>(e.msg=d[t],t),et=e=>2*e-(e>4?9:0),er=e=>{let t=e.length;for(;--t>=0;)e[t]=0},en=e=>{let t,r,n;let i=e.w_size;n=t=e.hash_size;do r=e.head[--n],e.head[n]=r>=i?r-i:0;while(--t);n=t=i;do r=e.prev[--n],e.prev[n]=r>=i?r-i:0;while(--t)},ei=(e,t,r)=>(t<{let t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),0!==r&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+r),e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))},ea=(e,t)=>{o(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,eo(e.strm)},es=(e,t)=>{e.pending_buf[e.pending++]=t},el=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t},eu=(e,t,r,n)=>{let i=e.avail_in;return(i>n&&(i=n),0===i)?0:(e.avail_in-=i,t.set(e.input.subarray(e.next_in,e.next_in+i),r),1===e.state.wrap?e.adler=l(e.adler,t,i,r):2===e.state.wrap&&(e.adler=u(e.adler,t,i,r)),e.next_in+=i,e.total_in+=i,i)},ed=(e,t)=>{let r,n,i=e.max_chain_length,o=e.strstart,a=e.prev_length,s=e.nice_match,l=e.strstart>e.w_size-j?e.strstart-(e.w_size-j):0,u=e.window,d=e.w_mask,c=e.prev,p=e.strstart+J,f=u[o+a-1],h=u[o+a];e.prev_length>=e.good_match&&(i>>=2),s>e.lookahead&&(s=e.lookahead);do{if(u[(r=t)+a]!==h||u[r+a-1]!==f||u[r]!==u[o]||u[++r]!==u[o+1])continue;o+=2,r++;do;while(u[++o]===u[++r]&&u[++o]===u[++r]&&u[++o]===u[++r]&&u[++o]===u[++r]&&u[++o]===u[++r]&&u[++o]===u[++r]&&u[++o]===u[++r]&&u[++o]===u[++r]&&oa){if(e.match_start=t,a=n,n>=s)break;f=u[o+a-1],h=u[o+a]}}while((t=c[t&d])>l&&0!=--i);return a<=e.lookahead?a:e.lookahead},ec=e=>{let t,r,n;let i=e.w_size;do{if(r=e.window_size-e.lookahead-e.strstart,e.strstart>=i+(i-j)&&(e.window.set(e.window.subarray(i,i+i-r),0),e.match_start-=i,e.strstart-=i,e.block_start-=i,e.insert>e.strstart&&(e.insert=e.strstart),en(e),r+=i),0===e.strm.avail_in)break;if(t=eu(e.strm,e.window,e.strstart+e.lookahead,r),e.lookahead+=t,e.lookahead+e.insert>=U)for(n=e.strstart-e.insert,e.ins_h=e.window[n],e.ins_h=ei(e,e.ins_h,e.window[n+1]);e.insert&&(e.ins_h=ei(e,e.ins_h,e.window[n+U-1]),e.prev[n&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=n,n++,e.insert--,!(e.lookahead+e.insert{let r=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,n,o,a,s=0,l=e.strm.avail_in;do{if(n=65535,a=e.bi_valid+42>>3,e.strm.avail_out(o=e.strstart-e.block_start)+e.strm.avail_in&&(n=o+e.strm.avail_in),n>a&&(n=a),n>8,e.pending_buf[e.pending-2]=~n,e.pending_buf[e.pending-1]=~n>>8,eo(e.strm),o&&(o>n&&(o=n),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+o),e.strm.next_out),e.strm.next_out+=o,e.strm.avail_out-=o,e.strm.total_out+=o,e.block_start+=o,n-=o),n&&(eu(e.strm,e.strm.output,e.strm.next_out,n),e.strm.next_out+=n,e.strm.avail_out-=n,e.strm.total_out+=n)}while(0===s);return((l-=e.strm.avail_in)&&(l>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=l&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.insert>e.strstart&&(e.insert=e.strstart)),e.window.set(e.strm.input.subarray(e.strm.next_in-l,e.strm.next_in),e.strstart),e.strstart+=l,e.insert+=l>e.w_size-e.insert?e.w_size-e.insert:l),e.block_start=e.strstart),e.high_watera&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,a+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),a>e.strm.avail_in&&(a=e.strm.avail_in),a&&(eu(e.strm,e.window,e.strstart,a),e.strstart+=a,e.insert+=a>e.w_size-e.insert?e.w_size-e.insert:a),e.high_water>3,r=(a=e.pending_buf_size-a>65535?65535:e.pending_buf_size-a)>e.w_size?e.w_size:a,((o=e.strstart-e.block_start)>=r||(o||t===h)&&t!==c&&0===e.strm.avail_in&&o<=a)&&(n=o>a?a:o,s=t===h&&0===e.strm.avail_in&&n===o?1:0,i(e,e.block_start,n,s),e.block_start+=n,eo(e.strm)),s?Z:K)},ef=(e,t)=>{let r,n;for(;;){if(e.lookahead=U&&(e.ins_h=ei(e,e.ins_h,e.window[e.strstart+U-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==r&&e.strstart-r<=e.w_size-j&&(e.match_length=ed(e,r)),e.match_length>=U){if(n=a(e,e.strstart-e.match_start,e.match_length-U),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=U){e.match_length--;do e.strstart++,e.ins_h=ei(e,e.ins_h,e.window[e.strstart+U-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=ei(e,e.ins_h,e.window[e.strstart+1])}else n=a(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(ea(e,!1),0===e.strm.avail_out))return K}return(e.insert=e.strstart{let r,n,i;for(;;){if(e.lookahead=U&&(e.ins_h=ei(e,e.ins_h,e.window[e.strstart+U-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=U-1,0!==r&&e.prev_length4096)&&(e.match_length=U-1)),e.prev_length>=U&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-U,n=a(e,e.strstart-1-e.prev_match,e.prev_length-U),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=i&&(e.ins_h=ei(e,e.ins_h,e.window[e.strstart+U-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(0!=--e.prev_length);if(e.match_available=0,e.match_length=U-1,e.strstart++,n&&(ea(e,!1),0===e.strm.avail_out))return K}else if(e.match_available){if((n=a(e,0,e.window[e.strstart-1]))&&ea(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return K}else e.match_available=1,e.strstart++,e.lookahead--}return(e.match_available&&(n=a(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart{let r,n,i,o;let s=e.window;for(;;){if(e.lookahead<=J){if(ec(e),e.lookahead<=J&&t===c)return K;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=U&&e.strstart>0&&(n=s[i=e.strstart-1])===s[++i]&&n===s[++i]&&n===s[++i]){o=e.strstart+J;do;while(n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&ie.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=U?(r=a(e,1,e.match_length-U),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=a(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(ea(e,!1),0===e.strm.avail_out))return K}return(e.insert=0,t===h)?(ea(e,!0),0===e.strm.avail_out)?Z:X:e.sym_next&&(ea(e,!1),0===e.strm.avail_out)?K:Y},em=(e,t)=>{let r;for(;;){if(0===e.lookahead&&(ec(e),0===e.lookahead)){if(t===c)return K;break}if(e.match_length=0,r=a(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(ea(e,!1),0===e.strm.avail_out))return K}return(e.insert=0,t===h)?(ea(e,!0),0===e.strm.avail_out)?Z:X:e.sym_next&&(ea(e,!1),0===e.strm.avail_out)?K:Y};function ey(e,t,r,n,i){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=n,this.func=i}let ev=[new ey(0,0,0,0,ep),new ey(4,4,8,4,ef),new ey(4,5,16,8,ef),new ey(4,6,32,32,ef),new ey(4,4,16,16,eh),new ey(8,16,32,32,eh),new ey(8,16,128,128,eh),new ey(8,32,128,256,eh),new ey(32,128,258,1024,eh),new ey(32,258,258,4096,eh)],eb=e=>{e.window_size=2*e.w_size,er(e.head),e.max_lazy_match=ev[e.level].max_lazy,e.good_match=ev[e.level].good_length,e.nice_match=ev[e.level].nice_length,e.max_chain_length=ev[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=U-1,e.match_available=0,e.ins_h=0};function eS(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=R,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(2*M),this.dyn_dtree=new Uint16Array((2*B+1)*2),this.bl_tree=new Uint16Array((2*C+1)*2),er(this.dyn_ltree),er(this.dyn_dtree),er(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(D+1),this.heap=new Uint16Array(2*x+1),er(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*x+1),er(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}let ew=e=>{if(!e)return 1;let t=e.state;return t&&t.strm===e&&(t.status===q||t.status===L||t.status===F||t.status===V||t.status===z||t.status===W||t.status===Q||t.status===G)?0:1},e_=e=>{if(ew(e))return ee(e,v);e.total_in=e.total_out=0,e.data_type=I;let t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=2===t.wrap?L:t.wrap?q:Q,e.adler=2===t.wrap?0:1,t.last_flush=-2,n(t),m},ek=e=>{let t=e_(e);return t===m&&eb(e.state),t},eO=(e,t)=>ew(e)||2!==e.state.wrap?v:(e.state.gzhead=t,m),eP=(e,t,r,n,i,o)=>{if(!e)return v;let a=1;if(t===w&&(t=6),n<0?(a=0,n=-n):n>15&&(a=2,n-=16),i<1||i>E||r!==R||n<8||n>15||t<0||t>9||o<0||o>P||8===n&&1!==a)return ee(e,v);8===n&&(n=9);let s=new eS;return e.state=s,s.strm=e,s.status=q,s.wrap=a,s.gzhead=null,s.w_bits=n,s.w_size=1<eP(e,t,R,T,N,A),eI=(e,t)=>{if(ew(e)||t>g||t<0)return e?ee(e,v):v;let r=e.state;if(!e.output||0!==e.avail_in&&!e.input||r.status===G&&t!==h)return ee(e,0===e.avail_out?S:v);let n=r.last_flush;if(r.last_flush=t,0!==r.pending){if(eo(e),0===e.avail_out)return r.last_flush=-1,m}else if(0===e.avail_in&&et(t)<=et(n)&&t!==h)return ee(e,S);if(r.status===G&&0!==e.avail_in)return ee(e,S);if(r.status===q&&0===r.wrap&&(r.status=Q),r.status===q){let t=R+(r.w_bits-8<<4)<<8,n=-1;if(t|=(n=r.strategy>=k||r.level<2?0:r.level<6?1:6===r.level?2:3)<<6,0!==r.strstart&&(t|=H),el(r,t+=31-t%31),0!==r.strstart&&(el(r,e.adler>>>16),el(r,65535&e.adler)),e.adler=1,r.status=Q,eo(e),0!==r.pending)return r.last_flush=-1,m}if(r.status===L){if(e.adler=0,es(r,31),es(r,139),es(r,8),r.gzhead)es(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),es(r,255&r.gzhead.time),es(r,r.gzhead.time>>8&255),es(r,r.gzhead.time>>16&255),es(r,r.gzhead.time>>24&255),es(r,9===r.level?2:r.strategy>=k||r.level<2?4:0),es(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(es(r,255&r.gzhead.extra.length),es(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(e.adler=u(e.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=F;else if(es(r,0),es(r,0),es(r,0),es(r,0),es(r,0),es(r,9===r.level?2:r.strategy>=k||r.level<2?4:0),es(r,$),r.status=Q,eo(e),0!==r.pending)return r.last_flush=-1,m}if(r.status===F){if(r.gzhead.extra){let t=r.pending,n=(65535&r.gzhead.extra.length)-r.gzindex;for(;r.pending+n>r.pending_buf_size;){let i=r.pending_buf_size-r.pending;if(r.pending_buf.set(r.gzhead.extra.subarray(r.gzindex,r.gzindex+i),r.pending),r.pending=r.pending_buf_size,r.gzhead.hcrc&&r.pending>t&&(e.adler=u(e.adler,r.pending_buf,r.pending-t,t)),r.gzindex+=i,eo(e),0!==r.pending)return r.last_flush=-1,m;t=0,n-=i}let i=new Uint8Array(r.gzhead.extra);r.pending_buf.set(i.subarray(r.gzindex,r.gzindex+n),r.pending),r.pending+=n,r.gzhead.hcrc&&r.pending>t&&(e.adler=u(e.adler,r.pending_buf,r.pending-t,t)),r.gzindex=0}r.status=V}if(r.status===V){if(r.gzhead.name){let t,n=r.pending;do{if(r.pending===r.pending_buf_size){if(r.gzhead.hcrc&&r.pending>n&&(e.adler=u(e.adler,r.pending_buf,r.pending-n,n)),eo(e),0!==r.pending)return r.last_flush=-1,m;n=0}t=r.gzindexn&&(e.adler=u(e.adler,r.pending_buf,r.pending-n,n)),r.gzindex=0}r.status=z}if(r.status===z){if(r.gzhead.comment){let t,n=r.pending;do{if(r.pending===r.pending_buf_size){if(r.gzhead.hcrc&&r.pending>n&&(e.adler=u(e.adler,r.pending_buf,r.pending-n,n)),eo(e),0!==r.pending)return r.last_flush=-1,m;n=0}t=r.gzindexn&&(e.adler=u(e.adler,r.pending_buf,r.pending-n,n))}r.status=W}if(r.status===W){if(r.gzhead.hcrc){if(r.pending+2>r.pending_buf_size&&(eo(e),0!==r.pending))return r.last_flush=-1,m;es(r,255&e.adler),es(r,e.adler>>8&255),e.adler=0}if(r.status=Q,eo(e),0!==r.pending)return r.last_flush=-1,m}if(0!==e.avail_in||0!==r.lookahead||t!==c&&r.status!==G){let n=0===r.level?ep(r,t):r.strategy===k?em(r,t):r.strategy===O?eg(r,t):ev[r.level].func(r,t);if((n===Z||n===X)&&(r.status=G),n===K||n===Z)return 0===e.avail_out&&(r.last_flush=-1),m;if(n===Y&&(t===p?s(r):t!==g&&(i(r,0,0,!1),t===f&&(er(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),eo(e),0===e.avail_out))return r.last_flush=-1,m}return t!==h?m:r.wrap<=0?y:(2===r.wrap?(es(r,255&e.adler),es(r,e.adler>>8&255),es(r,e.adler>>16&255),es(r,e.adler>>24&255),es(r,255&e.total_in),es(r,e.total_in>>8&255),es(r,e.total_in>>16&255),es(r,e.total_in>>24&255)):(el(r,e.adler>>>16),el(r,65535&e.adler)),eo(e),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?m:y)},eR=e=>{if(ew(e))return v;let t=e.state.status;return e.state=null,t===Q?ee(e,b):m},eE=(e,t)=>{let r=t.length;if(ew(e))return v;let n=e.state,i=n.wrap;if(2===i||1===i&&n.status!==q||n.lookahead)return v;if(1===i&&(e.adler=l(e.adler,t,r,0)),n.wrap=0,r>=n.w_size){0===i&&(er(n.head),n.strstart=0,n.block_start=0,n.insert=0);let e=new Uint8Array(n.w_size);e.set(t.subarray(r-n.w_size,r),0),t=e,r=n.w_size}let o=e.avail_in,a=e.next_in,s=e.input;for(e.avail_in=r,e.next_in=0,e.input=t,ec(n);n.lookahead>=U;){let e=n.strstart,t=n.lookahead-(U-1);do n.ins_h=ei(n,n.ins_h,n.window[e+U-1]),n.prev[e&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=e,e++;while(--t);n.strstart=e,n.lookahead=U-1,ec(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=U-1,n.match_available=0,e.next_in=a,e.input=s,e.avail_in=o,n.wrap=i,m};e.exports.deflateInit=eA,e.exports.deflateInit2=eP,e.exports.deflateReset=ek,e.exports.deflateResetKeep=e_,e.exports.deflateSetHeader=eO,e.exports.deflate=eI,e.exports.deflateEnd=eR,e.exports.deflateSetDictionary=eE,e.exports.deflateInfo="pako deflate (from Nodeca project)"},85315:function(e){"use strict";function t(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}e.exports=t},33424:function(e){"use strict";let t=16209,r=16191;e.exports=function(e,n){let i,o,a,s,l,u,d,c,p,f,h,g,m,y,v,b,S,w,_,k,O,P,A,I;let R=e.state;i=e.next_in,A=e.input,o=i+(e.avail_in-5),a=e.next_out,I=e.output,s=a-(n-e.avail_out),l=a+(e.avail_out-257),u=R.dmax,d=R.wsize,c=R.whave,p=R.wnext,f=R.window,h=R.hold,g=R.bits,m=R.lencode,y=R.distcode,v=(1<>>=w=S>>>24,g-=w,0==(w=S>>>16&255))I[a++]=65535&S;else if(16&w)for(_=65535&S,(w&=15)&&(g>>=w,g-=w),g<15&&(h+=A[i++]<>>=w=S>>>24,g-=w,16&(w=S>>>16&255)){if(k=65535&S,g<(w&=15)&&(h+=A[i++]<u){e.msg="invalid distance too far back",R.mode=t;break t}if(h>>>=w,g-=w,k>(w=a-s)){if((w=k-w)>c&&R.sane){e.msg="invalid distance too far back",R.mode=t;break t}if(O=0,P=f,0===p){if(O+=d-w,w<_){_-=w;do I[a++]=f[O++];while(--w);O=a-k,P=I}}else if(p2;)I[a++]=P[O++],I[a++]=P[O++],I[a++]=P[O++],_-=3;_&&(I[a++]=P[O++],_>1&&(I[a++]=P[O++]))}else{O=a-k;do I[a++]=I[O++],I[a++]=I[O++],I[a++]=I[O++],_-=3;while(_>2);_&&(I[a++]=I[O++],_>1&&(I[a++]=I[O++]))}}else if((64&w)==0){S=y[(65535&S)+(h&(1<>3,g-=_<<3,h&=(1<(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24);function eo(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}let ea=e=>{if(!e)return 1;let t=e.state;return!t||t.strm!==e||t.modeee?1:0},es=e=>{if(ea(e))return v;let t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=k,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(et),t.distcode=t.distdyn=new Int32Array(er),t.sane=1,t.back=-1,g},el=e=>{if(ea(e))return v;let t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,es(e)},eu=(e,t)=>{let r;if(ea(e))return v;let n=e.state;return(t<0?(r=0,t=-t):(r=(t>>4)+5,t<48&&(t&=15)),t&&(t<8||t>15))?v:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,el(e))},ed=(e,t)=>{if(!e)return v;let r=new eo;e.state=r,r.strm=e,r.window=null,r.mode=k;let n=eu(e,t);return n!==g&&(e.state=null),n},ec=e=>ed(e,en),ep=!0,ef=e=>{if(ep){n=new Int32Array(512),i=new Int32Array(32);let t=0;for(;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(l(d,e.lens,0,288,n,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;l(c,e.lens,0,32,i,0,e.work,{bits:5}),ep=!1}e.lencode=n,e.lenbits=9,e.distcode=i,e.distbits=5},eh=(e,t,r,n)=>{let i;let o=e.state;return null===o.window&&(o.wsize=1<=o.wsize?(o.window.set(t.subarray(r-o.wsize,r),0),o.wnext=0,o.whave=o.wsize):((i=o.wsize-o.wnext)>n&&(i=n),o.window.set(t.subarray(r-n,r-n+i),o.wnext),(n-=i)?(o.window.set(t.subarray(r-n,r),0),o.wnext=n,o.whave=o.wsize):(o.wnext+=i,o.wnext===o.wsize&&(o.wnext=0),o.whave{let r,n,i,ee,et,er,en,eo,es,el,eu,ed,ec,ep,eg,em,ey,ev,eb,eS,ew,e_,ek,eO;let eP=0,eA=new Uint8Array(4),eI=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(ea(e)||!e.output||!e.input&&0!==e.avail_in)return v;(r=e.state).mode===C&&(r.mode=M),et=e.next_out,i=e.output,en=e.avail_out,ee=e.next_in,n=e.input,er=e.avail_in,eo=r.hold,es=r.bits,el=er,eu=en,e_=g;r:for(;;)switch(r.mode){case k:if(0===r.wrap){r.mode=M;break}for(;es<16;){if(0===er)break r;er--,eo+=n[ee++]<>>8&255,r.check=a(r.check,eA,2,0),eo=0,es=0,r.mode=O;break}if(r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&eo)<<8)+(eo>>8))%31){e.msg="incorrect header check",r.mode=X;break}if((15&eo)!==_){e.msg="unknown compression method",r.mode=X;break}if(eo>>>=4,es-=4,ew=(15&eo)+8,0===r.wbits&&(r.wbits=ew),ew>15||ew>r.wbits){e.msg="invalid window size",r.mode=X;break}r.dmax=1<>8&1),512&r.flags&&4&r.wrap&&(eA[0]=255&eo,eA[1]=eo>>>8&255,r.check=a(r.check,eA,2,0)),eo=0,es=0,r.mode=P;case P:for(;es<32;){if(0===er)break r;er--,eo+=n[ee++]<>>8&255,eA[2]=eo>>>16&255,eA[3]=eo>>>24&255,r.check=a(r.check,eA,4,0)),eo=0,es=0,r.mode=A;case A:for(;es<16;){if(0===er)break r;er--,eo+=n[ee++]<>8),512&r.flags&&4&r.wrap&&(eA[0]=255&eo,eA[1]=eo>>>8&255,r.check=a(r.check,eA,2,0)),eo=0,es=0,r.mode=I;case I:if(1024&r.flags){for(;es<16;){if(0===er)break r;er--,eo+=n[ee++]<>>8&255,r.check=a(r.check,eA,2,0)),eo=0,es=0}else r.head&&(r.head.extra=null);r.mode=R;case R:if(1024&r.flags&&((ed=r.length)>er&&(ed=er),ed&&(r.head&&(ew=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Uint8Array(r.head.extra_len)),r.head.extra.set(n.subarray(ee,ee+ed),ew)),512&r.flags&&4&r.wrap&&(r.check=a(r.check,n,ed,ee)),er-=ed,ee+=ed,r.length-=ed),r.length))break r;r.length=0,r.mode=E;case E:if(2048&r.flags){if(0===er)break r;ed=0;do ew=n[ee+ed++],r.head&&ew&&r.length<65536&&(r.head.name+=String.fromCharCode(ew));while(ew&&ed>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=C;break;case x:for(;es<32;){if(0===er)break r;er--,eo+=n[ee++]<>>=7&es,es-=7&es,r.mode=K;break}for(;es<3;){if(0===er)break r;er--,eo+=n[ee++]<>>=1)){case 0:r.mode=D;break;case 1:if(ef(r),r.mode=L,t===h){eo>>>=2,es-=2;break r}break;case 2:r.mode=j;break;case 3:e.msg="invalid block type",r.mode=X}eo>>>=2,es-=2;break;case D:for(eo>>>=7&es,es-=7&es;es<32;){if(0===er)break r;er--,eo+=n[ee++]<>>16^65535)){e.msg="invalid stored block lengths",r.mode=X;break}if(r.length=65535&eo,eo=0,es=0,r.mode=U,t===h)break r;case U:r.mode=J;case J:if(ed=r.length){if(ed>er&&(ed=er),ed>en&&(ed=en),0===ed)break r;i.set(n.subarray(ee,ee+ed),et),er-=ed,ee+=ed,en-=ed,et+=ed,r.length-=ed;break}r.mode=C;break;case j:for(;es<14;){if(0===er)break r;er--,eo+=n[ee++]<>>=5,es-=5,r.ndist=(31&eo)+1,eo>>>=5,es-=5,r.ncode=(15&eo)+4,eo>>>=4,es-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=X;break}r.have=0,r.mode=H;case H:for(;r.have>>=3,es-=3}for(;r.have<19;)r.lens[eI[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,ek={bits:r.lenbits},e_=l(u,r.lens,0,19,r.lencode,0,r.work,ek),r.lenbits=ek.bits,e_){e.msg="invalid code lengths set",r.mode=X;break}r.have=0,r.mode=q;case q:for(;r.have>>24,em=eP>>>16&255,ey=65535&eP,!(eg<=es);){if(0===er)break r;er--,eo+=n[ee++]<>>=eg,es-=eg,r.lens[r.have++]=ey;else{if(16===ey){for(eO=eg+2;es>>=eg,es-=eg,0===r.have){e.msg="invalid bit length repeat",r.mode=X;break}ew=r.lens[r.have-1],ed=3+(3&eo),eo>>>=2,es-=2}else if(17===ey){for(eO=eg+3;es>>=eg,es-=eg,ew=0,ed=3+(7&eo),eo>>>=3,es-=3}else{for(eO=eg+7;es>>=eg,es-=eg,ew=0,ed=11+(127&eo),eo>>>=7,es-=7}if(r.have+ed>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=X;break}for(;ed--;)r.lens[r.have++]=ew}}if(r.mode===X)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=X;break}if(r.lenbits=9,ek={bits:r.lenbits},e_=l(d,r.lens,0,r.nlen,r.lencode,0,r.work,ek),r.lenbits=ek.bits,e_){e.msg="invalid literal/lengths set",r.mode=X;break}if(r.distbits=6,r.distcode=r.distdyn,ek={bits:r.distbits},e_=l(c,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,ek),r.distbits=ek.bits,e_){e.msg="invalid distances set",r.mode=X;break}if(r.mode=L,t===h)break r;case L:r.mode=F;case F:if(er>=6&&en>=258){e.next_out=et,e.avail_out=en,e.next_in=ee,e.avail_in=er,r.hold=eo,r.bits=es,s(e,eu),et=e.next_out,i=e.output,en=e.avail_out,ee=e.next_in,n=e.input,er=e.avail_in,eo=r.hold,es=r.bits,r.mode===C&&(r.back=-1);break}for(r.back=0;eg=(eP=r.lencode[eo&(1<>>24,em=eP>>>16&255,ey=65535&eP,!(eg<=es);){if(0===er)break r;er--,eo+=n[ee++]<>ev)])>>>24,em=eP>>>16&255,ey=65535&eP,!(ev+eg<=es);){if(0===er)break r;er--,eo+=n[ee++]<>>=ev,es-=ev,r.back+=ev}if(eo>>>=eg,es-=eg,r.back+=eg,r.length=ey,0===em){r.mode=G;break}if(32&em){r.back=-1,r.mode=C;break}if(64&em){e.msg="invalid literal/length code",r.mode=X;break}r.extra=15&em,r.mode=V;case V:if(r.extra){for(eO=r.extra;es>>=r.extra,es-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=z;case z:for(;eg=(eP=r.distcode[eo&(1<>>24,em=eP>>>16&255,ey=65535&eP,!(eg<=es);){if(0===er)break r;er--,eo+=n[ee++]<>ev)])>>>24,em=eP>>>16&255,ey=65535&eP,!(ev+eg<=es);){if(0===er)break r;er--,eo+=n[ee++]<>>=ev,es-=ev,r.back+=ev}if(eo>>>=eg,es-=eg,r.back+=eg,64&em){e.msg="invalid distance code",r.mode=X;break}r.offset=ey,r.extra=15&em,r.mode=W;case W:if(r.extra){for(eO=r.extra;es>>=r.extra,es-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=X;break}r.mode=Q;case Q:if(0===en)break r;if(ed=eu-en,r.offset>ed){if((ed=r.offset-ed)>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=X;break}ed>r.wnext?(ed-=r.wnext,ec=r.wsize-ed):ec=r.wnext-ed,ed>r.length&&(ed=r.length),ep=r.window}else ep=i,ec=et-r.offset,ed=r.length;ed>en&&(ed=en),en-=ed,r.length-=ed;do i[et++]=ep[ec++];while(--ed);0===r.length&&(r.mode=F);break;case G:if(0===en)break r;i[et++]=r.length,en--,r.mode=F;break;case K:if(r.wrap){for(;es<32;){if(0===er)break r;er--,eo|=n[ee++]<{if(ea(e))return v;let t=e.state;return t.window&&(t.window=null),e.state=null,g},ey=(e,t)=>{if(ea(e))return v;let r=e.state;return(2&r.wrap)==0?v:(r.head=t,t.done=!1,g)},ev=(e,t)=>{let r,n;let i=t.length;return ea(e)||0!==(r=e.state).wrap&&r.mode!==B?v:r.mode===B&&(n=o(n=1,t,i,0))!==r.check?b:eh(e,t,i,i)?(r.mode=$,S):(r.havedict=1,g)};e.exports.inflateReset=el,e.exports.inflateReset2=eu,e.exports.inflateResetKeep=es,e.exports.inflateInit=ec,e.exports.inflateInit2=ed,e.exports.inflate=eg,e.exports.inflateEnd=em,e.exports.inflateGetHeader=ey,e.exports.inflateSetDictionary=ev,e.exports.inflateInfo="pako inflate (from Nodeca project)"},88170:function(e){"use strict";let t=15,r=852,n=592,i=0,o=1,a=2,s=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),l=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),u=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),d=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]),c=(e,c,p,f,h,g,m,y)=>{let v,b,S,w,_,k,O,P,A;let I=y.bits,R=0,E=0,T=0,N=0,x=0,B=0,C=0,M=0,D=0,U=0,J=null,j=new Uint16Array(t+1),H=new Uint16Array(t+1),q=null;for(R=0;R<=t;R++)j[R]=0;for(E=0;E=1&&0===j[N];N--);if(x>N&&(x=N),0===N)return h[g++]=20971520,h[g++]=20971520,y.bits=1,0;for(T=1;T0&&(e===i||1!==N))return -1;for(R=1,H[1]=0;Rr||e===a&&D>n)return 1;for(;;){O=R-C,m[E]+1=k?(P=q[m[E]-k],A=J[m[E]-k]):(P=96,A=0),v=1<>C)+(b-=v)]=O<<24|P<<16|A|0;while(0!==b);for(v=1<>=1;if(0!==v?(U&=v-1,U+=v):U=0,E++,0==--j[R]){if(R===N)break;R=c[p+m[E]]}if(R>x&&(U&w)!==S){for(0===C&&(C=x),_+=T,M=1<<(B=R-C);B+Cr||e===a&&D>n)return 1;h[S=U&w]=x<<24|B<<16|_-g|0}}return 0!==U&&(h[_+U]=R-C<<24|4194304),y.bits=x,0};e.exports=c},82077:function(e){"use strict";e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},4542:function(e){"use strict";let t,r,n;let i=4,o=0,a=1,s=2;function l(e){let t=e.length;for(;--t>=0;)e[t]=0}let u=0,d=1,c=2,p=3,f=258,h=29,g=256,m=286,y=30,v=19,b=573,S=15,w=16,_=7,k=256,O=16,P=17,A=18,I=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),R=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),E=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),T=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),N=512,x=Array((m+2)*2);l(x);let B=Array(2*y);l(B);let C=Array(N);l(C);let M=Array(f-p+1);l(M);let D=Array(h);l(D);let U=Array(y);function J(e,t,r,n,i){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=e&&e.length}function j(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}l(U);let H=e=>e<256?C[e]:C[256+(e>>>7)],q=(e,t)=>{e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255},L=(e,t,r)=>{e.bi_valid>w-r?(e.bi_buf|=t<>w-e.bi_valid,e.bi_valid+=r-w):(e.bi_buf|=t<{L(e,r[2*t],r[2*t+1])},V=(e,t)=>{let r=0;do r|=1&e,e>>>=1,r<<=1;while(--t>0);return r>>>1},z=e=>{16===e.bi_valid?(q(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)},W=(e,t)=>{let r,n,i,o,a,s;let l=t.dyn_tree,u=t.max_code,d=t.stat_desc.static_tree,c=t.stat_desc.has_stree,p=t.stat_desc.extra_bits,f=t.stat_desc.extra_base,h=t.stat_desc.max_length,g=0;for(o=0;o<=S;o++)e.bl_count[o]=0;for(l[2*e.heap[e.heap_max]+1]=0,r=e.heap_max+1;rh&&(o=h,g++),l[2*n+1]=o,!(n>u)&&(e.bl_count[o]++,a=0,n>=f&&(a=p[n-f]),s=l[2*n],e.opt_len+=s*(o+a),c&&(e.static_len+=s*(d[2*n+1]+a)));if(0!==g){do{for(o=h-1;0===e.bl_count[o];)o--;e.bl_count[o]--,e.bl_count[o+1]+=2,e.bl_count[h]--,g-=2}while(g>0);for(o=h;0!==o;o--)for(n=e.bl_count[o];0!==n;)!((i=e.heap[--r])>u)&&(l[2*i+1]!==o&&(e.opt_len+=(o-l[2*i+1])*l[2*i],l[2*i+1]=o),n--)}},Q=(e,t,r)=>{let n,i;let o=Array(S+1),a=0;for(n=1;n<=S;n++)a=a+r[n-1]<<1,o[n]=a;for(i=0;i<=t;i++){let t=e[2*i+1];0!==t&&(e[2*i]=V(o[t]++,t))}},G=()=>{let e,i,o,a,s;let l=Array(S+1);for(a=0,o=0;a>=7;a{let t;for(t=0;t{e.bi_valid>8?q(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},Z=(e,t,r,n)=>{let i=2*t,o=2*r;return e[i]{let n=e.heap[r],i=r<<1;for(;i<=e.heap_len&&(i{let n,i,o,a;let s=0;if(0!==e.sym_next)do n=(255&e.pending_buf[e.sym_buf+s++])+((255&e.pending_buf[e.sym_buf+s++])<<8),i=e.pending_buf[e.sym_buf+s++],0===n?F(e,i,t):(F(e,(o=M[i])+g+1,t),0!==(a=I[o])&&L(e,i-=D[o],a),F(e,o=H(--n),r),0!==(a=R[o])&&L(e,n-=U[o],a));while(s{let r,n,i;let o=t.dyn_tree,a=t.stat_desc.static_tree,s=t.stat_desc.has_stree,l=t.stat_desc.elems,u=-1;for(r=0,e.heap_len=0,e.heap_max=b;r>1;r>=1;r--)X(e,o,r);i=l;do r=e.heap[1],e.heap[1]=e.heap[e.heap_len--],X(e,o,1),n=e.heap[1],e.heap[--e.heap_max]=r,e.heap[--e.heap_max]=n,o[2*i]=o[2*r]+o[2*n],e.depth[i]=(e.depth[r]>=e.depth[n]?e.depth[r]:e.depth[n])+1,o[2*r+1]=o[2*n+1]=i,e.heap[1]=i++,X(e,o,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],W(e,t),Q(o,u,e.bl_count)},et=(e,t,r)=>{let n,i;let o=-1,a=t[1],s=0,l=7,u=4;for(0===a&&(l=138,u=3),t[(r+1)*2+1]=65535,n=0;n<=r;n++)i=a,a=t[(n+1)*2+1],++s{let n,i;let o=-1,a=t[1],s=0,l=7,u=4;for(0===a&&(l=138,u=3),n=0;n<=r;n++)if(i=a,a=t[(n+1)*2+1],!(++s{let t;for(et(e,e.dyn_ltree,e.l_desc.max_code),et(e,e.dyn_dtree,e.d_desc.max_code),ee(e,e.bl_desc),t=v-1;t>=3&&0===e.bl_tree[2*T[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t},ei=(e,t,r,n)=>{let i;for(L(e,t-257,5),L(e,r-1,5),L(e,n-4,4),i=0;i{let t,r=4093624447;for(t=0;t<=31;t++,r>>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return o;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return a;for(t=32;t{ea||(G(),ea=!0),e.l_desc=new j(e.dyn_ltree,t),e.d_desc=new j(e.dyn_dtree,r),e.bl_desc=new j(e.bl_tree,n),e.bi_buf=0,e.bi_valid=0,K(e)},el=(e,t,r,n)=>{L(e,(u<<1)+(n?1:0),3),Y(e),q(e,r),q(e,~r),r&&e.pending_buf.set(e.window.subarray(t,t+r),e.pending),e.pending+=r},eu=e=>{L(e,d<<1,3),F(e,k,x),z(e)},ed=(e,t,r,n)=>{let o,a;let l=0;e.level>0?(e.strm.data_type===s&&(e.strm.data_type=eo(e)),ee(e,e.l_desc),ee(e,e.d_desc),l=en(e),o=e.opt_len+3+7>>>3,(a=e.static_len+3+7>>>3)<=o&&(o=a)):o=a=r+5,r+4<=o&&-1!==t?el(e,t,r,n):e.strategy===i||a===o?(L(e,(d<<1)+(n?1:0),3),$(e,x,B)):(L(e,(c<<1)+(n?1:0),3),ei(e,e.l_desc.max_code+1,e.d_desc.max_code+1,l+1),$(e,e.dyn_ltree,e.dyn_dtree)),K(e),n&&Y(e)},ec=(e,t,r)=>(e.pending_buf[e.sym_buf+e.sym_next++]=t,e.pending_buf[e.sym_buf+e.sym_next++]=t>>8,e.pending_buf[e.sym_buf+e.sym_next++]=r,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[(M[r]+g+1)*2]++,e.dyn_dtree[2*H(t)]++),e.sym_next===e.sym_end);e.exports._tr_init=es,e.exports._tr_stored_block=el,e.exports._tr_flush_block=ed,e.exports._tr_tally=ec,e.exports._tr_align=eu},75027:function(e){"use strict";function t(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}e.exports=t},81667:function(e,t,r){"use strict";e.exports=r(39022)},39022:function(e,t,r){"use strict";var n=t;function i(){n.util._configure(),n.Writer._configure(n.BufferWriter),n.Reader._configure(n.BufferReader)}n.build="minimal",n.Writer=r(42743),n.BufferWriter=r(69953),n.Reader=r(64167),n.BufferReader=r(74669),n.util=r(49325),n.rpc=r(41350),n.roots=r(61958),n.configure=i,i()},64167:function(e,t,r){"use strict";e.exports=l;var n,i=r(49325),o=i.LongBits,a=i.utf8;function s(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function l(e){this.buf=e,this.pos=0,this.len=e.length}var u="undefined"!=typeof Uint8Array?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new l(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new l(e);throw Error("illegal buffer")},d=function(){return i.Buffer?function(e){return(l.create=function(e){return i.Buffer.isBuffer(e)?new n(e):u(e)})(e)}:u};function c(){var e=new o(0,0),t=0;if(this.len-this.pos>4){for(;t<4;++t)if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e;t=0}else{for(;t<3;++t){if(this.pos>=this.len)throw s(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e}return e.lo=(e.lo|(127&this.buf[this.pos++])<<7*t)>>>0,e}if(this.len-this.pos>4){for(;t<5;++t)if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}else for(;t<5;++t){if(this.pos>=this.len)throw s(this);if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}function p(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function f(){if(this.pos+8>this.len)throw s(this,8);return new o(p(this.buf,this.pos+=4),p(this.buf,this.pos+=4))}l.create=d(),l.prototype._slice=i.Array.prototype.subarray||i.Array.prototype.slice,l.prototype.uint32=function(){var e=4294967295;return function(){if(e=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128||(e=(e|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)||(e=(e|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)||(e=(e|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)||(e=(e|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128))return e;if((this.pos+=5)>this.len)throw this.pos=this.len,s(this,10);return e}}(),l.prototype.int32=function(){return 0|this.uint32()},l.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)|0},l.prototype.bool=function(){return 0!==this.uint32()},l.prototype.fixed32=function(){if(this.pos+4>this.len)throw s(this,4);return p(this.buf,this.pos+=4)},l.prototype.sfixed32=function(){if(this.pos+4>this.len)throw s(this,4);return 0|p(this.buf,this.pos+=4)},l.prototype.float=function(){if(this.pos+4>this.len)throw s(this,4);var e=i.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e},l.prototype.double=function(){if(this.pos+8>this.len)throw s(this,4);var e=i.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e},l.prototype.bytes=function(){var e=this.uint32(),t=this.pos,r=this.pos+e;if(r>this.len)throw s(this,e);return(this.pos+=e,Array.isArray(this.buf))?this.buf.slice(t,r):t===r?new this.buf.constructor(0):this._slice.call(this.buf,t,r)},l.prototype.string=function(){var e=this.bytes();return a.read(e,0,e.length)},l.prototype.skip=function(e){if("number"==typeof e){if(this.pos+e>this.len)throw s(this,e);this.pos+=e}else do if(this.pos>=this.len)throw s(this);while(128&this.buf[this.pos++]);return this},l.prototype.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!=(e=7&this.uint32());)this.skipType(e);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this},l._configure=function(e){n=e,l.create=d(),n._configure();var t=i.Long?"toLong":"toNumber";i.merge(l.prototype,{int64:function(){return c.call(this)[t](!1)},uint64:function(){return c.call(this)[t](!0)},sint64:function(){return c.call(this).zzDecode()[t](!1)},fixed64:function(){return f.call(this)[t](!0)},sfixed64:function(){return f.call(this)[t](!1)}})}},74669:function(e,t,r){"use strict";e.exports=o;var n=r(64167);(o.prototype=Object.create(n.prototype)).constructor=o;var i=r(49325);function o(e){n.call(this,e)}o._configure=function(){i.Buffer&&(o.prototype._slice=i.Buffer.prototype.slice)},o.prototype.string=function(){var e=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+e,this.len))},o._configure()},61958:function(e){"use strict";e.exports={}},41350:function(e,t,r){"use strict";t.Service=r(36239)},36239:function(e,t,r){"use strict";e.exports=i;var n=r(49325);function i(e,t,r){if("function"!=typeof e)throw TypeError("rpcImpl must be a function");n.EventEmitter.call(this),this.rpcImpl=e,this.requestDelimited=!!t,this.responseDelimited=!!r}(i.prototype=Object.create(n.EventEmitter.prototype)).constructor=i,i.prototype.rpcCall=function e(t,r,i,o,a){if(!o)throw TypeError("request must be specified");var s=this;if(!a)return n.asPromise(e,s,t,r,i,o);if(!s.rpcImpl){setTimeout(function(){a(Error("already ended"))},0);return}try{return s.rpcImpl(t,r[s.requestDelimited?"encodeDelimited":"encode"](o).finish(),function(e,r){if(e)return s.emit("error",e,t),a(e);if(null===r){s.end(!0);return}if(!(r instanceof i))try{r=i[s.responseDelimited?"decodeDelimited":"decode"](r)}catch(e){return s.emit("error",e,t),a(e)}return s.emit("data",r,t),a(null,r)})}catch(e){s.emit("error",e,t),setTimeout(function(){a(e)},0);return}},i.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},68950:function(e,t,r){"use strict";e.exports=i;var n=r(49325);function i(e,t){this.lo=e>>>0,this.hi=t>>>0}var o=i.zero=new i(0,0);o.toNumber=function(){return 0},o.zzEncode=o.zzDecode=function(){return this},o.length=function(){return 1};var a=i.zeroHash="\x00\x00\x00\x00\x00\x00\x00\x00";i.fromNumber=function(e){if(0===e)return o;var t=e<0;t&&(e=-e);var r=e>>>0,n=(e-r)/4294967296>>>0;return t&&(n=~n>>>0,r=~r>>>0,++r>4294967295&&(r=0,++n>4294967295&&(n=0))),new i(r,n)},i.from=function(e){if("number"==typeof e)return i.fromNumber(e);if(n.isString(e)){if(!n.Long)return i.fromNumber(parseInt(e,10));e=n.Long.fromString(e)}return e.low||e.high?new i(e.low>>>0,e.high>>>0):o},i.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var t=~this.lo+1>>>0,r=~this.hi>>>0;return t||(r=r+1>>>0),-(t+4294967296*r)}return this.lo+4294967296*this.hi},i.prototype.toLong=function(e){return n.Long?new n.Long(0|this.lo,0|this.hi,!!e):{low:0|this.lo,high:0|this.hi,unsigned:!!e}};var s=String.prototype.charCodeAt;i.fromHash=function(e){return e===a?o:new i((s.call(e,0)|s.call(e,1)<<8|s.call(e,2)<<16|s.call(e,3)<<24)>>>0,(s.call(e,4)|s.call(e,5)<<8|s.call(e,6)<<16|s.call(e,7)<<24)>>>0)},i.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},i.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},i.prototype.zzDecode=function(){var e=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},i.prototype.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,r=this.hi>>>24;return 0===r?0===t?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:r<128?9:10}},49325:function(e,t,r){"use strict";var n=t;function i(e,t,r){for(var n=Object.keys(t),i=0;i0)},n.Buffer=function(){try{var e=n.inquire("buffer").Buffer;return e.prototype.utf8Write?e:null}catch(e){return null}}(),n._Buffer_from=null,n._Buffer_allocUnsafe=null,n.newBuffer=function(e){return"number"==typeof e?n.Buffer?n._Buffer_allocUnsafe(e):new n.Array(e):n.Buffer?n._Buffer_from(e):"undefined"==typeof Uint8Array?e:new Uint8Array(e)},n.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,n.Long=n.global.dcodeIO&&n.global.dcodeIO.Long||n.global.Long||n.inquire("long"),n.key2Re=/^true|false|0|1$/,n.key32Re=/^-?(?:0|[1-9][0-9]*)$/,n.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,n.longToHash=function(e){return e?n.LongBits.from(e).toHash():n.LongBits.zeroHash},n.longFromHash=function(e,t){var r=n.LongBits.fromHash(e);return n.Long?n.Long.fromBits(r.lo,r.hi,t):r.toNumber(!!t)},n.merge=i,n.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},n.newError=o,n.ProtocolError=o("ProtocolError"),n.oneOfGetter=function(e){for(var t={},r=0;r-1;--r)if(1===t[e[r]]&&void 0!==this[e[r]]&&null!==this[e[r]])return e[r]}},n.oneOfSetter=function(e){return function(t){for(var r=0;r127;)t[r++]=127&e|128,e>>>=7;t[r]=e}function g(e,t){this.len=e,this.next=void 0,this.val=t}function m(e,t,r){for(;e.hi;)t[r++]=127&e.lo|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[r++]=127&e.lo|128,e.lo=e.lo>>>7;t[r++]=e.lo}function y(e,t,r){t[r]=255&e,t[r+1]=e>>>8&255,t[r+2]=e>>>16&255,t[r+3]=e>>>24}c.create=p(),c.alloc=function(e){return new i.Array(e)},i.Array!==Array&&(c.alloc=i.pool(c.alloc,i.Array.prototype.subarray)),c.prototype._push=function(e,t,r){return this.tail=this.tail.next=new l(e,t,r),this.len+=t,this},g.prototype=Object.create(l.prototype),g.prototype.fn=h,c.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new g((e>>>=0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this},c.prototype.int32=function(e){return e<0?this._push(m,10,o.fromNumber(e)):this.uint32(e)},c.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},c.prototype.uint64=function(e){var t=o.from(e);return this._push(m,t.length(),t)},c.prototype.int64=c.prototype.uint64,c.prototype.sint64=function(e){var t=o.from(e).zzEncode();return this._push(m,t.length(),t)},c.prototype.bool=function(e){return this._push(f,1,e?1:0)},c.prototype.fixed32=function(e){return this._push(y,4,e>>>0)},c.prototype.sfixed32=c.prototype.fixed32,c.prototype.fixed64=function(e){var t=o.from(e);return this._push(y,4,t.lo)._push(y,4,t.hi)},c.prototype.sfixed64=c.prototype.fixed64,c.prototype.float=function(e){return this._push(i.float.writeFloatLE,4,e)},c.prototype.double=function(e){return this._push(i.float.writeDoubleLE,8,e)};var v=i.Array.prototype.set?function(e,t,r){t.set(e,r)}:function(e,t,r){for(var n=0;n>>0;if(!t)return this._push(f,1,0);if(i.isString(e)){var r=c.alloc(t=a.length(e));a.decode(e,r,0),e=r}return this.uint32(t)._push(v,t,e)},c.prototype.string=function(e){var t=s.length(e);return t?this.uint32(t)._push(s.write,t,e):this._push(f,1,0)},c.prototype.fork=function(){return this.states=new d(this),this.head=this.tail=new l(u,0,0),this.len=0,this},c.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new l(u,0,0),this.len=0),this},c.prototype.ldelim=function(){var e=this.head,t=this.tail,r=this.len;return this.reset().uint32(r),r&&(this.tail.next=e.next,this.tail=t,this.len+=r),this},c.prototype.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),r=0;e;)e.fn(e.val,t,r),r+=e.len,e=e.next;return t},c._configure=function(e){n=e,c.create=p(),n._configure()}},69953:function(e,t,r){"use strict";e.exports=o;var n=r(42743);(o.prototype=Object.create(n.prototype)).constructor=o;var i=r(49325);function o(){n.call(this)}function a(e,t,r){e.length<40?i.utf8.write(e,t,r):t.utf8Write?t.utf8Write(e,r):t.write(e,r)}o._configure=function(){o.alloc=i._Buffer_allocUnsafe,o.writeBytesBuffer=i.Buffer&&i.Buffer.prototype instanceof Uint8Array&&"set"===i.Buffer.prototype.set.name?function(e,t,r){t.set(e,r)}:function(e,t,r){if(e.copy)e.copy(t,r,0,e.length);else for(var n=0;n>>0;return this.uint32(t),t&&this._push(o.writeBytesBuffer,t,e),this},o.prototype.string=function(e){var t=i.Buffer.byteLength(e);return this.uint32(t),t&&this._push(a,t,e),this},o._configure()},97834:function(e,t,r){"use strict";var n=r(23663).Buffer,i=r(39541),o=r(73799),a=Array(16),s=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],l=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],u=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],d=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],c=[0,1518500249,1859775393,2400959708,2840853838],p=[1352829926,1548603684,1836072691,2053994217,0];function f(){o.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function h(e,t){return e<>>32-t}function g(e,t,r,n,i,o,a,s){return h(e+(t^r^n)+o+a|0,s)+i|0}function m(e,t,r,n,i,o,a,s){return h(e+(t&r|~t&n)+o+a|0,s)+i|0}function y(e,t,r,n,i,o,a,s){return h(e+((t|~r)^n)+o+a|0,s)+i|0}function v(e,t,r,n,i,o,a,s){return h(e+(t&n|r&~n)+o+a|0,s)+i|0}function b(e,t,r,n,i,o,a,s){return h(e+(t^(r|~n))+o+a|0,s)+i|0}i(f,o),f.prototype._update=function(){for(var e,t,r=a,n=0;n<16;++n)r[n]=this._block.readInt32LE(4*n);for(var i=0|this._a,o=0|this._b,f=0|this._c,S=0|this._d,w=0|this._e,_=0|this._a,k=0|this._b,O=0|this._c,P=0|this._d,A=0|this._e,I=0;I<80;I+=1)I<16?(e=g(i,o,f,S,w,r[s[I]],c[0],u[I]),t=b(_,k,O,P,A,r[l[I]],p[0],d[I])):I<32?(e=m(i,o,f,S,w,r[s[I]],c[1],u[I]),t=v(_,k,O,P,A,r[l[I]],p[1],d[I])):I<48?(e=y(i,o,f,S,w,r[s[I]],c[2],u[I]),t=y(_,k,O,P,A,r[l[I]],p[2],d[I])):I<64?(e=v(i,o,f,S,w,r[s[I]],c[3],u[I]),t=m(_,k,O,P,A,r[l[I]],p[3],d[I])):(e=b(i,o,f,S,w,r[s[I]],c[4],u[I]),t=g(_,k,O,P,A,r[l[I]],p[4],d[I])),i=w,w=S,S=h(f,10),f=o,o=e,_=A,A=P,P=h(O,10),O=k,k=t;var R=this._b+f+P|0;this._b=this._c+S+A|0,this._c=this._d+w+_|0,this._d=this._e+i+k|0,this._e=this._a+o+O|0,this._a=R},f.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=n.alloc?n.alloc(20):new n(20);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e},e.exports=f},47226:function(e,t,r){"use strict";/*! safe-buffer. MIT License. Feross Aboukhadijeh */var n=r(23663),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(o(n,t),t.Buffer=a),a.prototype=Object.create(i.prototype),o(i,a),a.from=function(e,t,r){if("number"==typeof e)throw TypeError("Argument must not be a number");return i(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},a.allocUnsafe=function(e){if("number"!=typeof e)throw TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw TypeError("Argument must be a number");return n.SlowBuffer(e)}},17338:function(e,t,r){"use strict";var n=r(47226).Buffer;function i(e,t){this._block=n.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}i.prototype.update=function(e,t){"string"==typeof e&&(t=t||"utf8",e=n.from(e,t));for(var r=this._block,i=this._blockSize,o=e.length,a=this._len,s=0;s=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(4294967295&r)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var o=this._hash();return e?o.toString(e):o},i.prototype._update=function(){throw Error("_update must be implemented by subclass")},e.exports=i},90414:function(e,t,r){"use strict";var n=e.exports=function(e){var t=n[e=e.toLowerCase()];if(!t)throw Error(e+" is not supported (we accept pull requests)");return new t};n.sha=r(15071),n.sha1=r(32815),n.sha224=r(86872),n.sha256=r(448),n.sha384=r(47531),n.sha512=r(79181)},15071:function(e,t,r){"use strict";var n=r(39541),i=r(17338),o=r(47226).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=Array(80);function l(){this.init(),this._w=s,i.call(this,64,56)}function u(e){return e<<5|e>>>27}function d(e){return e<<30|e>>>2}function c(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(l,i),l.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},l.prototype._update=function(e){for(var t=this._w,r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,s=0|this._e,l=0;l<16;++l)t[l]=e.readInt32BE(4*l);for(;l<80;++l)t[l]=t[l-3]^t[l-8]^t[l-14]^t[l-16];for(var p=0;p<80;++p){var f=~~(p/20),h=u(r)+c(f,n,i,o)+s+t[p]+a[f]|0;s=o,o=i,i=d(n),n=r,r=h}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=o+this._d|0,this._e=s+this._e|0},l.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=l},32815:function(e,t,r){"use strict";var n=r(39541),i=r(17338),o=r(47226).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=Array(80);function l(){this.init(),this._w=s,i.call(this,64,56)}function u(e){return e<<1|e>>>31}function d(e){return e<<5|e>>>27}function c(e){return e<<30|e>>>2}function p(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(l,i),l.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},l.prototype._update=function(e){for(var t=this._w,r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,s=0|this._e,l=0;l<16;++l)t[l]=e.readInt32BE(4*l);for(;l<80;++l)t[l]=u(t[l-3]^t[l-8]^t[l-14]^t[l-16]);for(var f=0;f<80;++f){var h=~~(f/20),g=d(r)+p(h,n,i,o)+s+t[f]+a[h]|0;s=o,o=i,i=c(n),n=r,r=g}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=o+this._d|0,this._e=s+this._e|0},l.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=l},86872:function(e,t,r){"use strict";var n=r(39541),i=r(448),o=r(17338),a=r(47226).Buffer,s=Array(64);function l(){this.init(),this._w=s,o.call(this,64,56)}n(l,i),l.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},l.prototype._hash=function(){var e=a.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},e.exports=l},448:function(e,t,r){"use strict";var n=r(39541),i=r(17338),o=r(47226).Buffer,a=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],s=Array(64);function l(){this.init(),this._w=s,i.call(this,64,56)}function u(e,t,r){return r^e&(t^r)}function d(e,t,r){return e&t|r&(e|t)}function c(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function p(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function f(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}function h(e){return(e>>>17|e<<15)^(e>>>19|e<<13)^e>>>10}n(l,i),l.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},l.prototype._update=function(e){for(var t=this._w,r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,s=0|this._e,l=0|this._f,g=0|this._g,m=0|this._h,y=0;y<16;++y)t[y]=e.readInt32BE(4*y);for(;y<64;++y)t[y]=h(t[y-2])+t[y-7]+f(t[y-15])+t[y-16]|0;for(var v=0;v<64;++v){var b=m+p(s)+u(s,l,g)+a[v]+t[v]|0,S=c(r)+d(r,n,i)|0;m=g,g=l,l=s,s=o+b|0,o=i,i=n,n=r,r=b+S|0}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=o+this._d|0,this._e=s+this._e|0,this._f=l+this._f|0,this._g=g+this._g|0,this._h=m+this._h|0},l.prototype._hash=function(){var e=o.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},e.exports=l},47531:function(e,t,r){"use strict";var n=r(39541),i=r(79181),o=r(17338),a=r(47226).Buffer,s=Array(160);function l(){this.init(),this._w=s,o.call(this,128,112)}n(l,i),l.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},l.prototype._hash=function(){var e=a.allocUnsafe(48);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e},e.exports=l},79181:function(e,t,r){"use strict";var n=r(39541),i=r(17338),o=r(47226).Buffer,a=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],s=Array(160);function l(){this.init(),this._w=s,i.call(this,128,112)}function u(e,t,r){return r^e&(t^r)}function d(e,t,r){return e&t|r&(e|t)}function c(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function p(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function f(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function h(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function g(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function m(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function y(e,t){return e>>>0>>0?1:0}n(l,i),l.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},l.prototype._update=function(e){for(var t=this._w,r=0|this._ah,n=0|this._bh,i=0|this._ch,o=0|this._dh,s=0|this._eh,l=0|this._fh,v=0|this._gh,b=0|this._hh,S=0|this._al,w=0|this._bl,_=0|this._cl,k=0|this._dl,O=0|this._el,P=0|this._fl,A=0|this._gl,I=0|this._hl,R=0;R<32;R+=2)t[R]=e.readInt32BE(4*R),t[R+1]=e.readInt32BE(4*R+4);for(;R<160;R+=2){var E=t[R-30],T=t[R-30+1],N=f(E,T),x=h(T,E),B=g(E=t[R-4],T=t[R-4+1]),C=m(T,E),M=t[R-14],D=t[R-14+1],U=t[R-32],J=t[R-32+1],j=x+D|0,H=N+M+y(j,x)|0;H=(H=H+B+y(j=j+C|0,C)|0)+U+y(j=j+J|0,J)|0,t[R]=H,t[R+1]=j}for(var q=0;q<160;q+=2){H=t[q],j=t[q+1];var L=d(r,n,i),F=d(S,w,_),V=c(r,S),z=c(S,r),W=p(s,O),Q=p(O,s),G=a[q],K=a[q+1],Y=u(s,l,v),Z=u(O,P,A),X=I+Q|0,$=b+W+y(X,I)|0;$=($=($=$+Y+y(X=X+Z|0,Z)|0)+G+y(X=X+K|0,K)|0)+H+y(X=X+j|0,j)|0;var ee=z+F|0,et=V+L+y(ee,z)|0;b=v,I=A,v=l,A=P,l=s,P=O,s=o+$+y(O=k+X|0,k)|0,o=i,k=_,i=n,_=w,n=r,w=S,r=$+et+y(S=X+ee|0,X)|0}this._al=this._al+S|0,this._bl=this._bl+w|0,this._cl=this._cl+_|0,this._dl=this._dl+k|0,this._el=this._el+O|0,this._fl=this._fl+P|0,this._gl=this._gl+A|0,this._hl=this._hl+I|0,this._ah=this._ah+r+y(this._al,S)|0,this._bh=this._bh+n+y(this._bl,w)|0,this._ch=this._ch+i+y(this._cl,_)|0,this._dh=this._dh+o+y(this._dl,k)|0,this._eh=this._eh+s+y(this._el,O)|0,this._fh=this._fh+l+y(this._fl,P)|0,this._gh=this._gh+v+y(this._gl,A)|0,this._hh=this._hh+b+y(this._hl,I)|0},l.prototype._hash=function(){var e=o.allocUnsafe(64);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e},e.exports=l},55144:function(e,t,r){"use strict";var n=r(11950).Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;if(!e)return"utf8";for(;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}function a(e){var t=o(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw Error("Unknown encoding: "+e);return t||e}function s(e){var t;switch(this.encoding=a(e),this.encoding){case"utf16le":this.text=h,this.end=g,t=4;break;case"utf8":this.fillLast=c,t=4;break;case"base64":this.text=m,this.end=y,t=3;break;default:this.write=v,this.end=b;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function l(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,t,r){var n=t.length-1;if(n=0?(i>0&&(e.lastNeed=i-1),i):--n=0?(i>0&&(e.lastNeed=i-2),i):--n=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0}function d(e,t,r){if((192&t[0])!=128)return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if((192&t[1])!=128)return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&(192&t[2])!=128)return e.lastNeed=2,"�"}}function c(e){var t=this.lastTotal-this.lastNeed,r=d(this,e,t);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):void(e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length)}function p(e,t){var r=u(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)}function f(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t}function h(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function g(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function m(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function y(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function v(e){return e.toString(this.encoding)}function b(e){return e&&e.length?this.write(e):""}t.StringDecoder=s,s.prototype.write=function(e){var t,r;if(0===e.length)return"";if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return re.compare(l)}function w(e){if(!n.isBuffer(e)||e.length<33)return!1;let t=e[0],r=e.slice(1,33);if(0===r.compare(s)||r.compare(u)>=0)return!1;if((2===t||3===t)&&33===e.length){try{E(e)}catch(e){return!1}return!0}let i=e.slice(33);return!(0===i.compare(s)||i.compare(u)>=0)&&4===t&&65===e.length}function _(e){return 4!==e[0]}function k(e){return!!w(e)&&_(e)}function O(e){return!!b(e)&&e.compare(s)>0&&0>e.compare(l)}function P(e){let t=e.slice(0,32),r=e.slice(32,64);return n.isBuffer(e)&&64===e.length&&0>t.compare(l)&&0>r.compare(l)}function A(e,t){return void 0===e&&void 0!==t?_(t):void 0===e||e}function I(e){return new i(e)}function R(e){return e.toArrayLike(n,"be",32)}function E(e){return o.curve.decodePoint(e)}function T(e,t){return n.from(e._encode(t))}function N(e,t,r){if(!w(e)||!w(t))throw TypeError(h);let n=E(e),i=E(t),o=n.add(i);return o.isInfinity()?null:T(o,A(r,e))}function x(e,t,r){if(!w(e))throw TypeError(h);if(!S(t))throw TypeError(g);let n=A(r,e),i=E(e);if(0===t.compare(s))return T(i,n);let o=I(t),a=p.mul(o),l=i.add(a);return l.isInfinity()?null:T(l,n)}function B(e,t){if(!w(e))throw TypeError(h);let r=E(e);if(r.isInfinity())throw TypeError(h);return T(r,A(t,e))}function C(e,t){if(!O(e))throw TypeError(f);let r=I(e),n=p.mul(r);return n.isInfinity()?null:T(n,A(t))}function M(e,t,r){if(!w(e))throw TypeError(h);if(!S(t))throw TypeError(g);let n=A(r,e),i=E(e),o=I(t),a=i.mul(o);return a.isInfinity()?null:T(a,n)}function D(e,t){if(!O(e))throw TypeError(f);if(!S(t))throw TypeError(g);let r=I(e),n=I(t),i=R(r.add(n).umod(d));return O(i)?i:null}function U(e,t){if(!O(e))throw TypeError(f);if(!S(t))throw TypeError(g);let r=I(e),n=I(t),i=R(r.sub(n).umod(d));return O(i)?i:null}function J(e,t){return H(e,t)}function j(e,t,r){return H(e,t,r)}function H(e,t,r){let i,o;if(!b(e))throw TypeError(m);if(!O(t))throw TypeError(f);if(void 0!==r&&!b(r))throw TypeError(v);let s=I(t),l=I(e);a(e,t,function(e){let t=I(e),r=p.mul(t);return!r.isInfinity()&&0!==(i=r.x.umod(d)).isZero()&&0!==(o=t.invm(d).mul(l.add(s.mul(i))).umod(d)).isZero()},O,r),o.cmp(c)>0&&(o=d.sub(o));let u=n.allocUnsafe(64);return R(i).copy(u,0),R(o).copy(u,32),u}function q(e,t,r,n){if(!b(e))throw TypeError(m);if(!w(t))throw TypeError(h);if(!P(r))throw TypeError(y);let i=E(t),o=I(r.slice(0,32)),a=I(r.slice(32,64));if(n&&a.cmp(c)>0||0>=o.gtn(0)||0>=a.gtn(0))return!1;let s=I(e),l=a.invm(d),u=s.mul(l).umod(d),f=o.mul(l).umod(d),g=p.mulAdd(u,i,f);return!g.isInfinity()&&g.x.umod(d).eq(o)}e.exports={isPoint:w,isPointCompressed:k,isPrivate:O,pointAdd:N,pointAddScalar:x,pointCompress:B,pointFromScalar:C,pointMultiply:M,privateAdd:D,privateSub:U,sign:J,signWithEntropy:j,verify:q}},9606:function(e,t,r){!function(e,t){"use strict";function n(e,t){if(!e)throw Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function o(e,t,r){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&(("le"===t||"be"===t)&&(r=t,t=10),this._init(e||0,t||10,r||"be"))}"object"==typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{u=void 0!==window.Buffer?window.Buffer:r(33370).Buffer}catch(e){}function a(e,t){var r=e.charCodeAt(t);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function s(e,t,r){var n=a(e,r);return r-1>=t&&(n|=a(e,r-1)<<4),n}function l(e,t,r,n){for(var i=0,o=Math.min(e.length,r),a=t;a=49?i+=s-49+10:s>=17?i+=s-17+10:i+=s}return i}o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return 0>e.cmp(t)?e:t},o.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;a-=3)o=e[a]|e[a-1]<<8|e[a-2]<<16,this.words[i]|=o<>>26-s&67108863,(s+=24)>=26&&(s-=26,i++);else if("le"===r)for(a=0,i=0;a>>26-s&67108863,(s+=24)>=26&&(s-=26,i++);return this.strip()},o.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=Array(this.length);for(var n,i=0;i=t;i-=2)n=s(e,t,i)<=18?(o-=18,a+=1,this.words[a]|=n>>>26):o+=8;else for(i=(e.length-t)%2==0?t+1:t;i=18?(o-=18,a+=1,this.words[a]|=n>>>26):o+=8;this.strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,a=o%n,s=Math.min(o,o-a)+r,u=0,d=r;d1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var u,d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],c=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function f(e){for(var t=Array(e.bitLength()),r=0;r>>i}return t}function h(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],a=i*o,s=67108863&a,l=a/67108864|0;r.words[0]=s;for(var u=1;u>>26,c=67108863&l,p=Math.min(u,t.length-1),f=Math.max(0,u-e.length+1);f<=p;f++){var h=u-f|0;d+=(a=(i=0|e.words[h])*(o=0|t.words[f])+c)/67108864|0,c=67108863&a}r.words[u]=0|c,l=0|d}return 0!==l?r.words[u]=0|l:r.length--,r.strip()}o.prototype.toString=function(e,t){if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var r,i=0,o=0,a=0;a>>24-i&16777215)||a!==this.length-1?d[6-l.length]+l+r:l+r,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var u=c[e],f=p[e];r="";var h=this.clone();for(h.negative=0;!h.isZero();){var g=h.modn(f).toString(e);r=(h=h.idivn(f)).isZero()?g+r:d[u-g.length]+g+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(e,t){return n(void 0!==u),this.toArrayLike(u,e,t)},o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,r){var i,o,a=this.byteLength(),s=r||Math.max(1,a);n(a<=s,"byte array longer than desired length"),n(s>0,"Requested array length <= 0"),this.strip();var l="le"===t,u=new e(s),d=this.clone();if(l){for(o=0;!d.isZero();o++)i=d.andln(255),d.iushrn(8),u[o]=i;for(;o=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return(8191&t)==0&&(r+=13,t>>>=13),(127&t)==0&&(r+=7,t>>>=7),(15&t)==0&&(r+=4,t>>>=4),(3&t)==0&&(r+=2,t>>>=2),(1&t)==0&&r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return(this.length-1)*26+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){this.length>e.length?(t=this,r=e):(t=e,r=this);for(var t,r,n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),t?this.words[r]=this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var t,r,n,i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;oe.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t,r,n=this.iadd(e);return e.negative=1,n._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(t=this,r=e):(t=e,r=this);for(var o=0,a=0;a>26,this.words[a]=67108863&n;for(;0!==o&&a>26,this.words[a]=67108863&n;if(0===o&&a>>13,f=0|a[1],h=8191&f,g=f>>>13,m=0|a[2],y=8191&m,v=m>>>13,b=0|a[3],S=8191&b,w=b>>>13,_=0|a[4],k=8191&_,O=_>>>13,P=0|a[5],A=8191&P,I=P>>>13,R=0|a[6],E=8191&R,T=R>>>13,N=0|a[7],x=8191&N,B=N>>>13,C=0|a[8],M=8191&C,D=C>>>13,U=0|a[9],J=8191&U,j=U>>>13,H=0|s[0],q=8191&H,L=H>>>13,F=0|s[1],V=8191&F,z=F>>>13,W=0|s[2],Q=8191&W,G=W>>>13,K=0|s[3],Y=8191&K,Z=K>>>13,X=0|s[4],$=8191&X,ee=X>>>13,et=0|s[5],er=8191&et,en=et>>>13,ei=0|s[6],eo=8191&ei,ea=ei>>>13,es=0|s[7],el=8191&es,eu=es>>>13,ed=0|s[8],ec=8191&ed,ep=ed>>>13,ef=0|s[9],eh=8191&ef,eg=ef>>>13;r.negative=e.negative^t.negative,r.length=19;var em=(u+(n=Math.imul(c,q))|0)+((8191&(i=(i=Math.imul(c,L))+Math.imul(p,q)|0))<<13)|0;u=((o=Math.imul(p,L))+(i>>>13)|0)+(em>>>26)|0,em&=67108863,n=Math.imul(h,q),i=(i=Math.imul(h,L))+Math.imul(g,q)|0,o=Math.imul(g,L);var ey=(u+(n=n+Math.imul(c,V)|0)|0)+((8191&(i=(i=i+Math.imul(c,z)|0)+Math.imul(p,V)|0))<<13)|0;u=((o=o+Math.imul(p,z)|0)+(i>>>13)|0)+(ey>>>26)|0,ey&=67108863,n=Math.imul(y,q),i=(i=Math.imul(y,L))+Math.imul(v,q)|0,o=Math.imul(v,L),n=n+Math.imul(h,V)|0,i=(i=i+Math.imul(h,z)|0)+Math.imul(g,V)|0,o=o+Math.imul(g,z)|0;var ev=(u+(n=n+Math.imul(c,Q)|0)|0)+((8191&(i=(i=i+Math.imul(c,G)|0)+Math.imul(p,Q)|0))<<13)|0;u=((o=o+Math.imul(p,G)|0)+(i>>>13)|0)+(ev>>>26)|0,ev&=67108863,n=Math.imul(S,q),i=(i=Math.imul(S,L))+Math.imul(w,q)|0,o=Math.imul(w,L),n=n+Math.imul(y,V)|0,i=(i=i+Math.imul(y,z)|0)+Math.imul(v,V)|0,o=o+Math.imul(v,z)|0,n=n+Math.imul(h,Q)|0,i=(i=i+Math.imul(h,G)|0)+Math.imul(g,Q)|0,o=o+Math.imul(g,G)|0;var eb=(u+(n=n+Math.imul(c,Y)|0)|0)+((8191&(i=(i=i+Math.imul(c,Z)|0)+Math.imul(p,Y)|0))<<13)|0;u=((o=o+Math.imul(p,Z)|0)+(i>>>13)|0)+(eb>>>26)|0,eb&=67108863,n=Math.imul(k,q),i=(i=Math.imul(k,L))+Math.imul(O,q)|0,o=Math.imul(O,L),n=n+Math.imul(S,V)|0,i=(i=i+Math.imul(S,z)|0)+Math.imul(w,V)|0,o=o+Math.imul(w,z)|0,n=n+Math.imul(y,Q)|0,i=(i=i+Math.imul(y,G)|0)+Math.imul(v,Q)|0,o=o+Math.imul(v,G)|0,n=n+Math.imul(h,Y)|0,i=(i=i+Math.imul(h,Z)|0)+Math.imul(g,Y)|0,o=o+Math.imul(g,Z)|0;var eS=(u+(n=n+Math.imul(c,$)|0)|0)+((8191&(i=(i=i+Math.imul(c,ee)|0)+Math.imul(p,$)|0))<<13)|0;u=((o=o+Math.imul(p,ee)|0)+(i>>>13)|0)+(eS>>>26)|0,eS&=67108863,n=Math.imul(A,q),i=(i=Math.imul(A,L))+Math.imul(I,q)|0,o=Math.imul(I,L),n=n+Math.imul(k,V)|0,i=(i=i+Math.imul(k,z)|0)+Math.imul(O,V)|0,o=o+Math.imul(O,z)|0,n=n+Math.imul(S,Q)|0,i=(i=i+Math.imul(S,G)|0)+Math.imul(w,Q)|0,o=o+Math.imul(w,G)|0,n=n+Math.imul(y,Y)|0,i=(i=i+Math.imul(y,Z)|0)+Math.imul(v,Y)|0,o=o+Math.imul(v,Z)|0,n=n+Math.imul(h,$)|0,i=(i=i+Math.imul(h,ee)|0)+Math.imul(g,$)|0,o=o+Math.imul(g,ee)|0;var ew=(u+(n=n+Math.imul(c,er)|0)|0)+((8191&(i=(i=i+Math.imul(c,en)|0)+Math.imul(p,er)|0))<<13)|0;u=((o=o+Math.imul(p,en)|0)+(i>>>13)|0)+(ew>>>26)|0,ew&=67108863,n=Math.imul(E,q),i=(i=Math.imul(E,L))+Math.imul(T,q)|0,o=Math.imul(T,L),n=n+Math.imul(A,V)|0,i=(i=i+Math.imul(A,z)|0)+Math.imul(I,V)|0,o=o+Math.imul(I,z)|0,n=n+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,G)|0)+Math.imul(O,Q)|0,o=o+Math.imul(O,G)|0,n=n+Math.imul(S,Y)|0,i=(i=i+Math.imul(S,Z)|0)+Math.imul(w,Y)|0,o=o+Math.imul(w,Z)|0,n=n+Math.imul(y,$)|0,i=(i=i+Math.imul(y,ee)|0)+Math.imul(v,$)|0,o=o+Math.imul(v,ee)|0,n=n+Math.imul(h,er)|0,i=(i=i+Math.imul(h,en)|0)+Math.imul(g,er)|0,o=o+Math.imul(g,en)|0;var e_=(u+(n=n+Math.imul(c,eo)|0)|0)+((8191&(i=(i=i+Math.imul(c,ea)|0)+Math.imul(p,eo)|0))<<13)|0;u=((o=o+Math.imul(p,ea)|0)+(i>>>13)|0)+(e_>>>26)|0,e_&=67108863,n=Math.imul(x,q),i=(i=Math.imul(x,L))+Math.imul(B,q)|0,o=Math.imul(B,L),n=n+Math.imul(E,V)|0,i=(i=i+Math.imul(E,z)|0)+Math.imul(T,V)|0,o=o+Math.imul(T,z)|0,n=n+Math.imul(A,Q)|0,i=(i=i+Math.imul(A,G)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,G)|0,n=n+Math.imul(k,Y)|0,i=(i=i+Math.imul(k,Z)|0)+Math.imul(O,Y)|0,o=o+Math.imul(O,Z)|0,n=n+Math.imul(S,$)|0,i=(i=i+Math.imul(S,ee)|0)+Math.imul(w,$)|0,o=o+Math.imul(w,ee)|0,n=n+Math.imul(y,er)|0,i=(i=i+Math.imul(y,en)|0)+Math.imul(v,er)|0,o=o+Math.imul(v,en)|0,n=n+Math.imul(h,eo)|0,i=(i=i+Math.imul(h,ea)|0)+Math.imul(g,eo)|0,o=o+Math.imul(g,ea)|0;var ek=(u+(n=n+Math.imul(c,el)|0)|0)+((8191&(i=(i=i+Math.imul(c,eu)|0)+Math.imul(p,el)|0))<<13)|0;u=((o=o+Math.imul(p,eu)|0)+(i>>>13)|0)+(ek>>>26)|0,ek&=67108863,n=Math.imul(M,q),i=(i=Math.imul(M,L))+Math.imul(D,q)|0,o=Math.imul(D,L),n=n+Math.imul(x,V)|0,i=(i=i+Math.imul(x,z)|0)+Math.imul(B,V)|0,o=o+Math.imul(B,z)|0,n=n+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,G)|0)+Math.imul(T,Q)|0,o=o+Math.imul(T,G)|0,n=n+Math.imul(A,Y)|0,i=(i=i+Math.imul(A,Z)|0)+Math.imul(I,Y)|0,o=o+Math.imul(I,Z)|0,n=n+Math.imul(k,$)|0,i=(i=i+Math.imul(k,ee)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,ee)|0,n=n+Math.imul(S,er)|0,i=(i=i+Math.imul(S,en)|0)+Math.imul(w,er)|0,o=o+Math.imul(w,en)|0,n=n+Math.imul(y,eo)|0,i=(i=i+Math.imul(y,ea)|0)+Math.imul(v,eo)|0,o=o+Math.imul(v,ea)|0,n=n+Math.imul(h,el)|0,i=(i=i+Math.imul(h,eu)|0)+Math.imul(g,el)|0,o=o+Math.imul(g,eu)|0;var eO=(u+(n=n+Math.imul(c,ec)|0)|0)+((8191&(i=(i=i+Math.imul(c,ep)|0)+Math.imul(p,ec)|0))<<13)|0;u=((o=o+Math.imul(p,ep)|0)+(i>>>13)|0)+(eO>>>26)|0,eO&=67108863,n=Math.imul(J,q),i=(i=Math.imul(J,L))+Math.imul(j,q)|0,o=Math.imul(j,L),n=n+Math.imul(M,V)|0,i=(i=i+Math.imul(M,z)|0)+Math.imul(D,V)|0,o=o+Math.imul(D,z)|0,n=n+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,G)|0)+Math.imul(B,Q)|0,o=o+Math.imul(B,G)|0,n=n+Math.imul(E,Y)|0,i=(i=i+Math.imul(E,Z)|0)+Math.imul(T,Y)|0,o=o+Math.imul(T,Z)|0,n=n+Math.imul(A,$)|0,i=(i=i+Math.imul(A,ee)|0)+Math.imul(I,$)|0,o=o+Math.imul(I,ee)|0,n=n+Math.imul(k,er)|0,i=(i=i+Math.imul(k,en)|0)+Math.imul(O,er)|0,o=o+Math.imul(O,en)|0,n=n+Math.imul(S,eo)|0,i=(i=i+Math.imul(S,ea)|0)+Math.imul(w,eo)|0,o=o+Math.imul(w,ea)|0,n=n+Math.imul(y,el)|0,i=(i=i+Math.imul(y,eu)|0)+Math.imul(v,el)|0,o=o+Math.imul(v,eu)|0,n=n+Math.imul(h,ec)|0,i=(i=i+Math.imul(h,ep)|0)+Math.imul(g,ec)|0,o=o+Math.imul(g,ep)|0;var eP=(u+(n=n+Math.imul(c,eh)|0)|0)+((8191&(i=(i=i+Math.imul(c,eg)|0)+Math.imul(p,eh)|0))<<13)|0;u=((o=o+Math.imul(p,eg)|0)+(i>>>13)|0)+(eP>>>26)|0,eP&=67108863,n=Math.imul(J,V),i=(i=Math.imul(J,z))+Math.imul(j,V)|0,o=Math.imul(j,z),n=n+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,G)|0)+Math.imul(D,Q)|0,o=o+Math.imul(D,G)|0,n=n+Math.imul(x,Y)|0,i=(i=i+Math.imul(x,Z)|0)+Math.imul(B,Y)|0,o=o+Math.imul(B,Z)|0,n=n+Math.imul(E,$)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,ee)|0,n=n+Math.imul(A,er)|0,i=(i=i+Math.imul(A,en)|0)+Math.imul(I,er)|0,o=o+Math.imul(I,en)|0,n=n+Math.imul(k,eo)|0,i=(i=i+Math.imul(k,ea)|0)+Math.imul(O,eo)|0,o=o+Math.imul(O,ea)|0,n=n+Math.imul(S,el)|0,i=(i=i+Math.imul(S,eu)|0)+Math.imul(w,el)|0,o=o+Math.imul(w,eu)|0,n=n+Math.imul(y,ec)|0,i=(i=i+Math.imul(y,ep)|0)+Math.imul(v,ec)|0,o=o+Math.imul(v,ep)|0;var eA=(u+(n=n+Math.imul(h,eh)|0)|0)+((8191&(i=(i=i+Math.imul(h,eg)|0)+Math.imul(g,eh)|0))<<13)|0;u=((o=o+Math.imul(g,eg)|0)+(i>>>13)|0)+(eA>>>26)|0,eA&=67108863,n=Math.imul(J,Q),i=(i=Math.imul(J,G))+Math.imul(j,Q)|0,o=Math.imul(j,G),n=n+Math.imul(M,Y)|0,i=(i=i+Math.imul(M,Z)|0)+Math.imul(D,Y)|0,o=o+Math.imul(D,Z)|0,n=n+Math.imul(x,$)|0,i=(i=i+Math.imul(x,ee)|0)+Math.imul(B,$)|0,o=o+Math.imul(B,ee)|0,n=n+Math.imul(E,er)|0,i=(i=i+Math.imul(E,en)|0)+Math.imul(T,er)|0,o=o+Math.imul(T,en)|0,n=n+Math.imul(A,eo)|0,i=(i=i+Math.imul(A,ea)|0)+Math.imul(I,eo)|0,o=o+Math.imul(I,ea)|0,n=n+Math.imul(k,el)|0,i=(i=i+Math.imul(k,eu)|0)+Math.imul(O,el)|0,o=o+Math.imul(O,eu)|0,n=n+Math.imul(S,ec)|0,i=(i=i+Math.imul(S,ep)|0)+Math.imul(w,ec)|0,o=o+Math.imul(w,ep)|0;var eI=(u+(n=n+Math.imul(y,eh)|0)|0)+((8191&(i=(i=i+Math.imul(y,eg)|0)+Math.imul(v,eh)|0))<<13)|0;u=((o=o+Math.imul(v,eg)|0)+(i>>>13)|0)+(eI>>>26)|0,eI&=67108863,n=Math.imul(J,Y),i=(i=Math.imul(J,Z))+Math.imul(j,Y)|0,o=Math.imul(j,Z),n=n+Math.imul(M,$)|0,i=(i=i+Math.imul(M,ee)|0)+Math.imul(D,$)|0,o=o+Math.imul(D,ee)|0,n=n+Math.imul(x,er)|0,i=(i=i+Math.imul(x,en)|0)+Math.imul(B,er)|0,o=o+Math.imul(B,en)|0,n=n+Math.imul(E,eo)|0,i=(i=i+Math.imul(E,ea)|0)+Math.imul(T,eo)|0,o=o+Math.imul(T,ea)|0,n=n+Math.imul(A,el)|0,i=(i=i+Math.imul(A,eu)|0)+Math.imul(I,el)|0,o=o+Math.imul(I,eu)|0,n=n+Math.imul(k,ec)|0,i=(i=i+Math.imul(k,ep)|0)+Math.imul(O,ec)|0,o=o+Math.imul(O,ep)|0;var eR=(u+(n=n+Math.imul(S,eh)|0)|0)+((8191&(i=(i=i+Math.imul(S,eg)|0)+Math.imul(w,eh)|0))<<13)|0;u=((o=o+Math.imul(w,eg)|0)+(i>>>13)|0)+(eR>>>26)|0,eR&=67108863,n=Math.imul(J,$),i=(i=Math.imul(J,ee))+Math.imul(j,$)|0,o=Math.imul(j,ee),n=n+Math.imul(M,er)|0,i=(i=i+Math.imul(M,en)|0)+Math.imul(D,er)|0,o=o+Math.imul(D,en)|0,n=n+Math.imul(x,eo)|0,i=(i=i+Math.imul(x,ea)|0)+Math.imul(B,eo)|0,o=o+Math.imul(B,ea)|0,n=n+Math.imul(E,el)|0,i=(i=i+Math.imul(E,eu)|0)+Math.imul(T,el)|0,o=o+Math.imul(T,eu)|0,n=n+Math.imul(A,ec)|0,i=(i=i+Math.imul(A,ep)|0)+Math.imul(I,ec)|0,o=o+Math.imul(I,ep)|0;var eE=(u+(n=n+Math.imul(k,eh)|0)|0)+((8191&(i=(i=i+Math.imul(k,eg)|0)+Math.imul(O,eh)|0))<<13)|0;u=((o=o+Math.imul(O,eg)|0)+(i>>>13)|0)+(eE>>>26)|0,eE&=67108863,n=Math.imul(J,er),i=(i=Math.imul(J,en))+Math.imul(j,er)|0,o=Math.imul(j,en),n=n+Math.imul(M,eo)|0,i=(i=i+Math.imul(M,ea)|0)+Math.imul(D,eo)|0,o=o+Math.imul(D,ea)|0,n=n+Math.imul(x,el)|0,i=(i=i+Math.imul(x,eu)|0)+Math.imul(B,el)|0,o=o+Math.imul(B,eu)|0,n=n+Math.imul(E,ec)|0,i=(i=i+Math.imul(E,ep)|0)+Math.imul(T,ec)|0,o=o+Math.imul(T,ep)|0;var eT=(u+(n=n+Math.imul(A,eh)|0)|0)+((8191&(i=(i=i+Math.imul(A,eg)|0)+Math.imul(I,eh)|0))<<13)|0;u=((o=o+Math.imul(I,eg)|0)+(i>>>13)|0)+(eT>>>26)|0,eT&=67108863,n=Math.imul(J,eo),i=(i=Math.imul(J,ea))+Math.imul(j,eo)|0,o=Math.imul(j,ea),n=n+Math.imul(M,el)|0,i=(i=i+Math.imul(M,eu)|0)+Math.imul(D,el)|0,o=o+Math.imul(D,eu)|0,n=n+Math.imul(x,ec)|0,i=(i=i+Math.imul(x,ep)|0)+Math.imul(B,ec)|0,o=o+Math.imul(B,ep)|0;var eN=(u+(n=n+Math.imul(E,eh)|0)|0)+((8191&(i=(i=i+Math.imul(E,eg)|0)+Math.imul(T,eh)|0))<<13)|0;u=((o=o+Math.imul(T,eg)|0)+(i>>>13)|0)+(eN>>>26)|0,eN&=67108863,n=Math.imul(J,el),i=(i=Math.imul(J,eu))+Math.imul(j,el)|0,o=Math.imul(j,eu),n=n+Math.imul(M,ec)|0,i=(i=i+Math.imul(M,ep)|0)+Math.imul(D,ec)|0,o=o+Math.imul(D,ep)|0;var ex=(u+(n=n+Math.imul(x,eh)|0)|0)+((8191&(i=(i=i+Math.imul(x,eg)|0)+Math.imul(B,eh)|0))<<13)|0;u=((o=o+Math.imul(B,eg)|0)+(i>>>13)|0)+(ex>>>26)|0,ex&=67108863,n=Math.imul(J,ec),i=(i=Math.imul(J,ep))+Math.imul(j,ec)|0,o=Math.imul(j,ep);var eB=(u+(n=n+Math.imul(M,eh)|0)|0)+((8191&(i=(i=i+Math.imul(M,eg)|0)+Math.imul(D,eh)|0))<<13)|0;u=((o=o+Math.imul(D,eg)|0)+(i>>>13)|0)+(eB>>>26)|0,eB&=67108863;var eC=(u+(n=Math.imul(J,eh))|0)+((8191&(i=(i=Math.imul(J,eg))+Math.imul(j,eh)|0))<<13)|0;return u=((o=Math.imul(j,eg))+(i>>>13)|0)+(eC>>>26)|0,eC&=67108863,l[0]=em,l[1]=ey,l[2]=ev,l[3]=eb,l[4]=eS,l[5]=ew,l[6]=e_,l[7]=ek,l[8]=eO,l[9]=eP,l[10]=eA,l[11]=eI,l[12]=eR,l[13]=eE,l[14]=eT,l[15]=eN,l[16]=ex,l[17]=eB,l[18]=eC,0!==u&&(l[19]=u,r.length++),r};function m(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}function y(e,t,r){return new v().mulp(e,t,r)}function v(e,t){this.x=e,this.y=t}Math.imul||(g=h),o.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?g(this,e,t):r<63?h(this,e,t):r<1024?m(this,e,t):y(this,e,t)},v.prototype.makeRBT=function(e){for(var t=Array(e),r=o.prototype._countBits(e)-1,n=0;n>=1;return n},v.prototype.permute=function(e,t,r,n,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*t;a>=26,t+=(i/67108864|0)+(o>>>26),this.words[r]=67108863&o}return 0!==t&&(this.words[r]=t,this.length++),this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=f(e);if(0===t.length)return new o(1);for(var r=this,n=0;n=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(t=0;t>>26-r}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var i,o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,u=0;u=0&&(0!==d||u>=i);u--){var c=0|this.words[u];this.words[u]=d<<26-o|c>>>o,d=c&s}return l&&0!==d&&(l.words[l.length++]=d),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(l/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(e,t){var r,n=this.length-e.length,i=this.clone(),a=e,s=0|a.words[a.length-1];0!=(n=26-this._countBits(s))&&(a=a.ushln(n),i.iushln(n),s=0|a.words[a.length-1]);var l=i.length-a.length;if("mod"!==t){(r=new o(null)).length=l+1,r.words=Array(r.length);for(var u=0;u=0;c--){var p=(0|i.words[a.length+c])*67108864+(0|i.words[a.length+c-1]);for(p=Math.min(p/s|0,67108863),i._ishlnsubmul(a,p,c);0!==i.negative;)p--,i.negative=0,i._ishlnsubmul(a,1,c),i.isZero()||(i.negative^=1);r&&(r.words[c]=p)}return r&&r.strip(),i.strip(),"div"!==t&&0!==n&&i.iushrn(n),{div:r||null,mod:i}},o.prototype.divmod=function(e,t,r){var i,a,s;return(n(!e.isZero()),this.isZero())?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(e)),{div:i,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):(this.negative&e.negative)!=0?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||0>this.cmp(e)?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modn(e.words[0]))}:this._wordDiv(e,t)},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modn=function(e){n(e<=67108863);for(var t=67108864%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},o.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),a=new o(0),s=new o(0),l=new o(1),u=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++u;for(var d=r.clone(),c=t.clone();!t.isZero();){for(var p=0,f=1;(t.words[0]&f)==0&&p<26;++p,f<<=1);if(p>0)for(t.iushrn(p);p-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(d),a.isub(c)),i.iushrn(1),a.iushrn(1);for(var h=0,g=1;(r.words[0]&g)==0&&h<26;++h,g<<=1);if(h>0)for(r.iushrn(h);h-- >0;)(s.isOdd()||l.isOdd())&&(s.iadd(d),l.isub(c)),s.iushrn(1),l.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(s),a.isub(l)):(r.isub(t),s.isub(i),l.isub(a))}return{a:s,b:l,gcd:r.iushln(u)}},o.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t,r=this,i=e.clone();r=0!==r.negative?r.umod(e):r.clone();for(var a=new o(1),s=new o(0),l=i.clone();r.cmpn(1)>0&&i.cmpn(1)>0;){for(var u=0,d=1;(r.words[0]&d)==0&&u<26;++u,d<<=1);if(u>0)for(r.iushrn(u);u-- >0;)a.isOdd()&&a.iadd(l),a.iushrn(1);for(var c=0,p=1;(i.words[0]&p)==0&&c<26;++c,p<<=1);if(c>0)for(i.iushrn(c);c-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);r.cmp(i)>=0?(r.isub(i),a.isub(s)):(i.isub(r),s.isub(a))}return 0>(t=0===r.cmpn(1)?a:s).cmpn(0)&&t.iadd(e),t},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return(1&this.words[0])==0},o.prototype.isOdd=function(){return(1&this.words[0])==1},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return -1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:ie.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){ni&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return -1===this.cmpn(e)},o.prototype.lt=function(e){return -1===this.cmp(e)},o.prototype.lten=function(e){return 0>=this.cmpn(e)},o.prototype.lte=function(e){return 0>=this.cmp(e)},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new P(e)},o.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var b={k256:null,p224:null,p192:null,p25519:null};function S(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function w(){S.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function _(){S.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function k(){S.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function O(){S.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function P(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function A(e){P.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}S.prototype._tmp=function(){var e=new o(null);return e.words=Array(Math.ceil(this.n/13)),e},S.prototype.ireduce=function(e){var t,r=e;do this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength();while(t>this.n);var n=t0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},S.prototype.split=function(e,t){e.iushrn(this.n,0,t)},S.prototype.imulK=function(e){return e.imul(this.k)},i(w,S),w.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i>>22,o=a}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},w.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){var t;if(b[e])return b[e];if("k256"===e)t=new w;else if("p224"===e)t=new _;else if("p192"===e)t=new k;else if("p25519"===e)t=new O;else throw Error("Unknown prime "+e);return b[e]=t,t},P.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},P.prototype._verify2=function(e,t){n((e.negative|t.negative)==0,"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},P.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},P.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},P.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},P.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},P.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return 0>r.cmpn(0)&&r.iadd(this.m),r._forceRed(this)},P.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return 0>r.cmpn(0)&&r.iadd(this.m),r},P.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},P.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},P.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},P.prototype.isqr=function(e){return this.imul(e,e.clone())},P.prototype.sqr=function(e){return this.mul(e,e)},P.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),l=s.redNeg(),u=this.m.subn(1).iushrn(1),d=this.m.bitLength();for(d=new o(2*d*d).toRed(this);0!==this.pow(d,u).cmp(l);)d.redIAdd(l);for(var c=this.pow(d,i),p=this.pow(e,i.addn(1).iushrn(1)),f=this.pow(e,i),h=a;0!==f.cmp(s);){for(var g=f,m=0;0!==g.cmp(s);m++)g=g.redSqr();n(m=0;i--){for(var d=t.words[i],c=u-1;c>=0;c--){var p=d>>c&1;if(a!==n[0]&&(a=this.sqr(a)),0===p&&0===s){l=0;continue}s<<=1,s|=p,(++l===r||0===i&&0===c)&&(a=this.mul(a,n[s]),l=0,s=0)}u=26}return a},P.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},P.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new A(e)},i(A,P),A.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},A.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},A.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):0>i.cmpn(0)&&(o=i.iadd(this.m)),o._forceRed(this)},A.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):0>i.cmpn(0)&&(a=i.iadd(this.m)),a._forceRed(this)},A.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},29531:function(e,t,r){"use strict";var n=r(23663).Buffer;let i=r(42716),o=n.alloc(1,1),a=n.alloc(1,0);function s(e,t,r,s,l){let u=n.alloc(32,0),d=n.alloc(32,1);u=i("sha256",u).update(d).update(a).update(t).update(e).update(l||"").digest(),d=i("sha256",u).update(d).digest(),u=i("sha256",u).update(d).update(o).update(t).update(e).update(l||"").digest(),d=i("sha256",u).update(d).digest();let c=d=i("sha256",u).update(d).digest();for(;!s(c)||!r(c);)u=i("sha256",u).update(d).update(a).digest(),d=i("sha256",u).update(d).digest(),c=d=i("sha256",u).update(d).digest();return c}e.exports=s},45885:function(e,t,r){"use strict";var n=r(29196);function i(e){return e.name||e.toString().match(/function (.*?)\s*\(/)[1]}function o(e){return n.Nil(e)?"":i(e.constructor)}function a(e){return n.Function(e)?"":n.String(e)?JSON.stringify(e):e&&n.Object(e)?"":e}function s(e,t){Error.captureStackTrace&&Error.captureStackTrace(e,t)}function l(e){return n.Function(e)?e.toJSON?e.toJSON():i(e):n.Array(e)?"Array":e&&n.Object(e)?"Object":void 0!==e?e:""}function u(e,t,r){var n=a(t);return"Expected "+l(e)+", got"+(""!==r?" "+r:"")+(""!==n?" "+n:"")}function d(e,t,r){r=r||o(t),this.message=u(e,t,r),s(this,d),this.__type=e,this.__value=t,this.__valueTypeName=r}function c(e,t,r,n,i){var o='" of type ';return"key"===t&&(o='" with key type '),u('property "'+l(r)+o+l(e),n,i)}function p(e,t,r,n,i){e?(i=i||o(n),this.message=c(e,r,t,n,i)):this.message='Unexpected property "'+t+'"',s(this,d),this.__label=r,this.__property=t,this.__type=e,this.__value=n,this.__valueTypeName=i}function f(e,t){return new d(e,{},t)}function h(e,t,r){return e instanceof p?(t=t+"."+e.__property,e=new p(e.__type,t,e.__label,e.__value,e.__valueTypeName)):e instanceof d&&(e=new p(e.__type,t,r,e.__value,e.__valueTypeName)),s(e),e}d.prototype=Object.create(Error.prototype),d.prototype.constructor=d,p.prototype=Object.create(Error.prototype),p.prototype.constructor=d,e.exports={TfTypeError:d,TfPropertyTypeError:p,tfCustomError:f,tfSubError:h,tfJSON:l,getValueTypeName:o}},61111:function(e,t,r){"use strict";var n=r(23663).Buffer,i=r(29196),o=r(45885);function a(e){return n.isBuffer(e)}function s(e){return"string"==typeof e&&/^([0-9a-f]{2})+$/i.test(e)}function l(e,t){var r=e.toJSON();function n(n){if(!e(n))return!1;if(n.length===t)return!0;throw o.tfCustomError(r+"(Length: "+t+")",r+"(Length: "+n.length+")")}return n.toJSON=function(){return r},n}var u=l.bind(null,i.Array),d=l.bind(null,a),c=l.bind(null,s),p=l.bind(null,i.String),f=9007199254740991,h={ArrayN:u,Buffer:a,BufferN:d,Finite:function(e){return"number"==typeof e&&isFinite(e)},Hex:s,HexN:c,Int8:function(e){return e<<24>>24===e},Int16:function(e){return e<<16>>16===e},Int32:function(e){return(0|e)===e},Int53:function(e){return"number"==typeof e&&e>=-f&&e<=f&&Math.floor(e)===e},Range:function(e,t,r){function n(n,i){return r(n,i)&&n>e&&n>>0===e},UInt53:function(e){return"number"==typeof e&&e>=0&&e<=f&&Math.floor(e)===e}};for(var g in h)h[g].toJSON=(function(e){return e}).bind(null,g);e.exports=h},81403:function(e,t,r){"use strict";var n=r(45885),i=r(29196),o=n.tfJSON,a=n.TfTypeError,s=n.TfPropertyTypeError,l=n.tfSubError,u=n.getValueTypeName,d={arrayOf:function(e,t){function r(r,n){return!(!i.Array(r)||i.Nil(r))&&(void 0===t.minLength||!(r.lengtht.maxLength))&&(void 0===t.length||r.length===t.length)&&r.every(function(t,r){try{return p(e,t,n)}catch(e){throw l(e,r)}})}return e=c(e),t=t||{},r.toJSON=function(){var r="["+o(e)+"]";return void 0!==t.length?r+="{"+t.length+"}":(void 0!==t.minLength||void 0!==t.maxLength)&&(r+="{"+(void 0===t.minLength?0:t.minLength)+","+(void 0===t.maxLength?1/0:t.maxLength)+"}"),r},r},maybe:function e(t){function r(r,n){return i.Nil(r)||t(r,n,e)}return t=c(t),r.toJSON=function(){return"?"+o(t)},r},map:function(e,t){function r(r,n){if(!i.Object(r)||i.Nil(r))return!1;for(var o in r){try{t&&p(t,o,n)}catch(e){throw l(e,o,"key")}try{var a=r[o];p(e,a,n)}catch(e){throw l(e,o)}}return!0}return e=c(e),t&&(t=c(t)),t?r.toJSON=function(){return"{"+o(t)+": "+o(e)+"}"}:r.toJSON=function(){return"{"+o(e)+"}"},r},object:function(e){var t={};for(var r in e)t[r]=c(e[r]);function n(e,r){if(!i.Object(e)||i.Nil(e))return!1;try{for(n in t){var n,o=t[n],a=e[n];p(o,a,r)}}catch(e){throw l(e,n)}if(r){for(n in e)if(!t[n])throw new s(void 0,n)}return!0}return n.toJSON=function(){return o(t)},n},anyOf:function(){var e=[].slice.call(arguments).map(c);function t(t,r){return e.some(function(e){try{return p(e,t,r)}catch(e){return!1}})}return t.toJSON=function(){return e.map(o).join("|")},t},allOf:function(){var e=[].slice.call(arguments).map(c);function t(t,r){return e.every(function(e){try{return p(e,t,r)}catch(e){return!1}})}return t.toJSON=function(){return e.map(o).join(" & ")},t},quacksLike:function(e){function t(t){return e===u(t)}return t.toJSON=function(){return e},t},tuple:function(){var e=[].slice.call(arguments).map(c);function t(t,r){return!(i.Nil(t)||i.Nil(t.length))&&(!r||t.length===e.length)&&e.every(function(e,n){try{return p(e,t[n],r)}catch(e){throw l(e,n)}})}return t.toJSON=function(){return"("+e.map(o).join(", ")+")"},t},value:function(e){function t(t){return t===e}return t.toJSON=function(){return e},t}};function c(e){if(i.String(e))return"?"===e[0]?d.maybe(e.slice(1)):i[e]||d.quacksLike(e);if(e&&i.Object(e)){if(i.Array(e)){if(1!==e.length)throw TypeError("Expected compile() parameter of type Array of length 1");return d.arrayOf(e[0])}return d.object(e)}return i.Function(e)?e:d.value(e)}function p(e,t,r,n){if(i.Function(e)){if(e(t,r))return!0;throw new a(n||e,t)}return p(c(e),t,r)}for(var f in d.oneOf=d.anyOf,i)p[f]=i[f];for(f in d)p[f]=d[f];var h=r(61111);for(f in h)p[f]=h[f];p.compile=c,p.TfTypeError=a,p.TfPropertyTypeError=s,e.exports=p},29196:function(e){"use strict";var t={Array:function(e){return null!=e&&e.constructor===Array},Boolean:function(e){return"boolean"==typeof e},Function:function(e){return"function"==typeof e},Nil:function(e){return null==e},Number:function(e){return"number"==typeof e},Object:function(e){return"object"==typeof e},String:function(e){return"string"==typeof e},"":function(){return!0}};for(var r in t.Null=t.Nil,t)t[r].toJSON=(function(e){return e}).bind(null,r);e.exports=t},88445:function(e,t,r){"use strict";function n(e,t){if(i("noDeprecation"))return e;var r=!1;return function(){if(!r){if(i("throwDeprecation"))throw Error(t);i("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}}function i(e){try{if(!r.g.localStorage)return!1}catch(e){return!1}var t=r.g.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}e.exports=n},55234:function(e,t,r){"use strict";var n=r(23663).Buffer,i=r(78110);function o(e,t){if(void 0!==t&&e[0]!==t)throw Error("Invalid network version");if(33===e.length)return{version:e[0],privateKey:e.slice(1,33),compressed:!1};if(34!==e.length)throw Error("Invalid WIF length");if(1!==e[33])throw Error("Invalid compression flag");return{version:e[0],privateKey:e.slice(1,33),compressed:!0}}function a(e,t,r){var i=new n(r?34:33);return i.writeUInt8(e,0),t.copy(i,1),r&&(i[33]=1),i}function s(e,t){return o(i.decode(e),t)}function l(e,t,r){return"number"==typeof e?i.encode(a(e,t,r)):i.encode(a(e.version,e.privateKey,e.compressed))}e.exports={decode:s,decodeRaw:o,encode:l,encodeRaw:a}},17335:function(e,t){"use strict";function r(e){var t,r=e.Symbol;if("function"==typeof r){if(r.observable)t=r.observable;else{t=r.for("https://github.com/benlesh/symbol-observable");try{r.observable=t}catch(e){}}}else t="@@observable";return t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r},29971:function(e,t,r){"use strict";e.exports=r(17335)},64109:function(e,t,r){"use strict";var n,i,o,a=r(23663).Buffer;function s(e,t){return function(){return e.apply(t,arguments)}}let{toString:l}=Object.prototype,{getPrototypeOf:u}=Object,d=(n=Object.create(null),e=>{let t=l.call(e);return n[t]||(n[t]=t.slice(8,-1).toLowerCase())}),c=e=>(e=e.toLowerCase(),t=>d(t)===e),p=e=>t=>typeof t===e,{isArray:f}=Array,h=p("undefined");function g(e){return null!==e&&!h(e)&&null!==e.constructor&&!h(e.constructor)&&b(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}let m=c("ArrayBuffer");function y(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&m(e.buffer)}let v=p("string"),b=p("function"),S=p("number"),w=e=>null!==e&&"object"==typeof e,_=e=>!0===e||!1===e,k=e=>{if("object"!==d(e))return!1;let t=u(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},O=c("Date"),P=c("File"),A=c("Blob"),I=c("FileList"),R=e=>w(e)&&b(e.pipe),E=e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||b(e.append)&&("formdata"===(t=d(e))||"object"===t&&b(e.toString)&&"[object FormData]"===e.toString()))},T=c("URLSearchParams"),N=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function x(e,t){let r,n,{allOwnKeys:i=!1}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(null!=e){if("object"!=typeof e&&(e=[e]),f(e))for(r=0,n=e.length;r0;)if(t===(r=n[i]).toLowerCase())return r;return null}let C="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:window,M=e=>!h(e)&&e!==C;function D(){let{caseless:e}=M(this)&&this||{},t={},r=(r,n)=>{let i=e&&B(t,n)||n;k(t[i])&&k(r)?t[i]=D(t[i],r):k(r)?t[i]=D({},r):f(r)?t[i]=r.slice():t[i]=r};for(let e=0,t=arguments.length;e3&&void 0!==arguments[3]?arguments[3]:{};return x(t,(t,n)=>{r&&b(t)?e[n]=s(t,r):e[n]=t},{allOwnKeys:n}),e},J=e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),j=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},H=(e,t,r,n)=>{let i,o,a;let s={};if(t=t||{},null==e)return t;do{for(o=(i=Object.getOwnPropertyNames(e)).length;o-- >0;)a=i[o],(!n||n(a,e,t))&&!s[a]&&(t[a]=e[a],s[a]=!0);e=!1!==r&&u(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},q=(e,t,r)=>{e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;let n=e.indexOf(t,r);return -1!==n&&n===r},L=e=>{if(!e)return null;if(f(e))return e;let t=e.length;if(!S(t))return null;let r=Array(t);for(;t-- >0;)r[t]=e[t];return r},F=(i="undefined"!=typeof Uint8Array&&u(Uint8Array),e=>i&&e instanceof i),V=(e,t)=>{let r;let n=(e&&e[Symbol.iterator]).call(e);for(;(r=n.next())&&!r.done;){let n=r.value;t.call(e,n[0],n[1])}},z=(e,t)=>{let r;let n=[];for(;null!==(r=e.exec(t));)n.push(r);return n},W=c("HTMLFormElement"),Q=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,r){return t.toUpperCase()+r}),G=(e=>{let{hasOwnProperty:t}=e;return(e,r)=>t.call(e,r)})(Object.prototype),K=c("RegExp"),Y=(e,t)=>{let r=Object.getOwnPropertyDescriptors(e),n={};x(r,(r,i)=>{let o;!1!==(o=t(r,i,e))&&(n[i]=o||r)}),Object.defineProperties(e,n)},Z=e=>{Y(e,(t,r)=>{if(b(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;if(b(e[r])){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},X=(e,t)=>{let r={};return(e=>{e.forEach(e=>{r[e]=!0})})(f(e)?e:String(e).split(t)),r},$=()=>{},ee=(e,t)=>Number.isFinite(e=+e)?e:t,et="abcdefghijklmnopqrstuvwxyz",er="0123456789",en={DIGIT:er,ALPHA:et,ALPHA_DIGIT:et+et.toUpperCase()+er},ei=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:16,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:en.ALPHA_DIGIT,r="",{length:n}=t;for(;e--;)r+=t[Math.random()*n|0];return r};function eo(e){return!!(e&&b(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])}let ea=e=>{let t=Array(10),r=(e,n)=>{if(w(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[n]=e;let i=f(e)?[]:{};return x(e,(e,t)=>{let o=r(e,n+1);h(o)||(i[t]=o)}),t[n]=void 0,i}}return e};return r(e,0)},es=c("AsyncFunction"),el=e=>e&&(w(e)||b(e))&&b(e.then)&&b(e.catch);var eu={isArray:f,isArrayBuffer:m,isBuffer:g,isFormData:E,isArrayBufferView:y,isString:v,isNumber:S,isBoolean:_,isObject:w,isPlainObject:k,isUndefined:h,isDate:O,isFile:P,isBlob:A,isRegExp:K,isFunction:b,isStream:R,isURLSearchParams:T,isTypedArray:F,isFileList:I,forEach:x,merge:D,extend:U,trim:N,stripBOM:J,inherits:j,toFlatObject:H,kindOf:d,kindOfTest:c,endsWith:q,toArray:L,forEachEntry:V,matchAll:z,isHTMLForm:W,hasOwnProperty:G,hasOwnProp:G,reduceDescriptors:Y,freezeMethods:Z,toObjectSet:X,toCamelCase:Q,noop:$,toFiniteNumber:ee,findKey:B,global:C,isContextDefined:M,ALPHABET:en,generateString:ei,isSpecCompliantForm:eo,toJSONObject:ea,isAsyncFn:es,isThenable:el};function ed(e,t,r,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i)}eu.inherits(ed,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:eu.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});let ec=ed.prototype,ep={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{ep[e]={value:e}}),Object.defineProperties(ed,ep),Object.defineProperty(ec,"isAxiosError",{value:!0}),ed.from=(e,t,r,n,i,o)=>{let a=Object.create(ec);return eu.toFlatObject(e,a,function(e){return e!==Error.prototype},e=>"isAxiosError"!==e),ed.call(a,e.message,t,r,n,i),a.cause=e,a.name=e.name,o&&Object.assign(a,o),a};var ef=null;function eh(e){return eu.isPlainObject(e)||eu.isArray(e)}function eg(e){return eu.endsWith(e,"[]")?e.slice(0,-2):e}function em(e,t,r){return e?e.concat(t).map(function(e,t){return e=eg(e),!r&&t?"["+e+"]":e}).join(r?".":""):t}function ey(e){return eu.isArray(e)&&!e.some(eh)}let ev=eu.toFlatObject(eu,{},null,function(e){return/^is[A-Z]/.test(e)});function eb(e,t,r){if(!eu.isObject(e))throw TypeError("target must be an object");t=t||new FormData;let n=(r=eu.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!eu.isUndefined(t[e])})).metaTokens,i=r.visitor||d,o=r.dots,s=r.indexes,l=(r.Blob||"undefined"!=typeof Blob&&Blob)&&eu.isSpecCompliantForm(t);if(!eu.isFunction(i))throw TypeError("visitor must be a function");function u(e){if(null===e)return"";if(eu.isDate(e))return e.toISOString();if(!l&&eu.isBlob(e))throw new ed("Blob is not supported. Use a Buffer instead.");return eu.isArrayBuffer(e)||eu.isTypedArray(e)?l&&"function"==typeof Blob?new Blob([e]):a.from(e):e}function d(e,r,i){let a=e;if(e&&!i&&"object"==typeof e){if(eu.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(eu.isArray(e)&&ey(e)||(eu.isFileList(e)||eu.endsWith(r,"[]"))&&(a=eu.toArray(e)))return r=eg(r),a.forEach(function(e,n){eu.isUndefined(e)||null===e||t.append(!0===s?em([r],n,o):null===s?r:r+"[]",u(e))}),!1}return!!eh(e)||(t.append(em(i,r,o),u(e)),!1)}let c=[],p=Object.assign(ev,{defaultVisitor:d,convertValue:u,isVisitable:eh});function f(e,r){if(!eu.isUndefined(e)){if(-1!==c.indexOf(e))throw Error("Circular reference detected in "+r.join("."));c.push(e),eu.forEach(e,function(e,n){!0===(!(eu.isUndefined(e)||null===e)&&i.call(t,e,eu.isString(n)?n.trim():n,r,p))&&f(e,r?r.concat(n):[n])}),c.pop()}}if(!eu.isObject(e))throw TypeError("data must be an object");return f(e),t}function eS(e){let t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\x00"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function ew(e,t){this._pairs=[],e&&eb(e,this,t)}let e_=ew.prototype;function ek(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function eO(e,t,r){let n;if(!t)return e;let i=r&&r.encode||ek,o=r&&r.serialize;if(n=o?o(t,r):eu.isURLSearchParams(t)?t.toString():new ew(t,r).toString(i)){let t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+n}return e}e_.append=function(e,t){this._pairs.push([e,t])},e_.toString=function(e){let t=e?function(t){return e.call(this,t,eS)}:eS;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};class eP{use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){eu.forEach(this.handlers,function(t){null!==t&&e(t)})}constructor(){this.handlers=[]}}var eA=eP,eI={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},eR={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:ew,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};let eE="undefined"!=typeof document,eT=(o="undefined"!=typeof navigator&&navigator.product,eE&&0>["ReactNative","NativeScript","NS"].indexOf(o));var eN={...Object.freeze({__proto__:null,hasBrowserEnv:eE,hasStandardBrowserWebWorkerEnv:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,hasStandardBrowserEnv:eT}),...eR};function ex(e,t){return eb(e,new eN.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){return eN.isNode&&eu.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},t))}function eB(e){return eu.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}function eC(e){let t,r;let n={},i=Object.keys(e),o=i.length;for(t=0;t=e.length;return(o=!o&&eu.isArray(n)?n.length:o,s)?eu.hasOwnProp(n,o)?n[o]=[n[o],r]:n[o]=r:(n[o]&&eu.isObject(n[o])||(n[o]=[]),t(e,r,n[o],i)&&eu.isArray(n[o])&&(n[o]=eC(n[o]))),!a}if(eu.isFormData(e)&&eu.isFunction(e.entries)){let r={};return eu.forEachEntry(e,(e,n)=>{t(eB(e),n,r,0)}),r}return null}function eD(e,t,r){if(eu.isString(e))try{return(t||JSON.parse)(e),eu.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}let eU={transitional:eI,adapter:["xhr","http"],transformRequest:[function(e,t){let r;let n=t.getContentType()||"",i=n.indexOf("application/json")>-1,o=eu.isObject(e);if(o&&eu.isHTMLForm(e)&&(e=new FormData(e)),eu.isFormData(e))return i?JSON.stringify(eM(e)):e;if(eu.isArrayBuffer(e)||eu.isBuffer(e)||eu.isStream(e)||eu.isFile(e)||eu.isBlob(e))return e;if(eu.isArrayBufferView(e))return e.buffer;if(eu.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return ex(e,this.formSerializer).toString();if((r=eu.isFileList(e))||n.indexOf("multipart/form-data")>-1){let t=this.env&&this.env.FormData;return eb(r?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||i?(t.setContentType("application/json",!1),eD(e)):e}],transformResponse:[function(e){let t=this.transitional||eU.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(e&&eu.isString(e)&&(r&&!this.responseType||n)){let r=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(e){if(r){if("SyntaxError"===e.name)throw ed.from(e,ed.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:eN.classes.FormData,Blob:eN.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};eu.forEach(["delete","get","head","post","put","patch"],e=>{eU.headers[e]={}});var eJ=eU;let ej=eu.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);var eH=e=>{let t,r,n;let i={};return e&&e.split("\n").forEach(function(e){n=e.indexOf(":"),t=e.substring(0,n).trim().toLowerCase(),r=e.substring(n+1).trim(),!t||i[t]&&ej[t]||("set-cookie"===t?i[t]?i[t].push(r):i[t]=[r]:i[t]=i[t]?i[t]+", "+r:r)}),i};let eq=Symbol("internals");function eL(e){return e&&String(e).trim().toLowerCase()}function eF(e){return!1===e||null==e?e:eu.isArray(e)?e.map(eF):String(e)}function eV(e){let t;let r=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;for(;t=n.exec(e);)r[t[1]]=t[2];return r}let ez=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function eW(e,t,r,n,i){if(eu.isFunction(n))return n.call(this,t,r);if(i&&(t=r),eu.isString(t)){if(eu.isString(n))return -1!==t.indexOf(n);if(eu.isRegExp(n))return n.test(t)}}function eQ(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,r)=>t.toUpperCase()+r)}function eG(e,t){let r=eu.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(e,r,i){return this[n].call(this,t,e,r,i)},configurable:!0})})}class eK{set(e,t,r){let n=this;function i(e,t,r){let i=eL(t);if(!i)throw Error("header name must be a non-empty string");let o=eu.findKey(n,i);o&&void 0!==n[o]&&!0!==r&&(void 0!==r||!1===n[o])||(n[o||t]=eF(e))}let o=(e,t)=>eu.forEach(e,(e,r)=>i(e,r,t));return eu.isPlainObject(e)||e instanceof this.constructor?o(e,t):eu.isString(e)&&(e=e.trim())&&!ez(e)?o(eH(e),t):null!=e&&i(t,e,r),this}get(e,t){if(e=eL(e)){let r=eu.findKey(this,e);if(r){let e=this[r];if(!t)return e;if(!0===t)return eV(e);if(eu.isFunction(t))return t.call(this,e,r);if(eu.isRegExp(t))return t.exec(e);throw TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=eL(e)){let r=eu.findKey(this,e);return!!(r&&void 0!==this[r]&&(!t||eW(this,this[r],r,t)))}return!1}delete(e,t){let r=this,n=!1;function i(e){if(e=eL(e)){let i=eu.findKey(r,e);i&&(!t||eW(r,r[i],i,t))&&(delete r[i],n=!0)}}return eu.isArray(e)?e.forEach(i):i(e),n}clear(e){let t=Object.keys(this),r=t.length,n=!1;for(;r--;){let i=t[r];(!e||eW(this,this[i],i,e,!0))&&(delete this[i],n=!0)}return n}normalize(e){let t=this,r={};return eu.forEach(this,(n,i)=>{let o=eu.findKey(r,i);if(o){t[o]=eF(n),delete t[i];return}let a=e?eQ(i):String(i).trim();a!==i&&delete t[i],t[a]=eF(n),r[a]=!0}),this}concat(){for(var e=arguments.length,t=Array(e),r=0;r{null!=r&&!1!==r&&(t[n]=e&&eu.isArray(r)?r.join(", "):r)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(e=>{let[t,r]=e;return t+": "+r}).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;ni.set(e)),i}static accessor(e){let t=(this[eq]=this[eq]={accessors:{}}).accessors,r=this.prototype;function n(e){let n=eL(e);t[n]||(eG(r,e),t[n]=!0)}return eu.isArray(e)?e.forEach(n):n(e),this}constructor(e){e&&this.set(e)}}eK.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),eu.reduceDescriptors(eK.prototype,(e,t)=>{let{value:r}=e,n=t[0].toUpperCase()+t.slice(1);return{get:()=>r,set(e){this[n]=e}}}),eu.freezeMethods(eK);var eY=eK;function eZ(e,t){let r=this||eJ,n=t||r,i=eY.from(n.headers),o=n.data;return eu.forEach(e,function(e){o=e.call(r,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function eX(e){return!!(e&&e.__CANCEL__)}function e$(e,t,r){ed.call(this,null==e?"canceled":e,ed.ERR_CANCELED,t,r),this.name="CanceledError"}function e0(e,t,r){let n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new ed("Request failed with status code "+r.status,[ed.ERR_BAD_REQUEST,ed.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}eu.inherits(e$,ed,{__CANCEL__:!0});var e1=eN.hasStandardBrowserEnv?{write(e,t,r,n,i,o){let a=[e+"="+encodeURIComponent(t)];eu.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),eu.isString(n)&&a.push("path="+n),eu.isString(i)&&a.push("domain="+i),!0===o&&a.push("secure"),document.cookie=a.join("; ")},read(e){let t=document.cookie.match(RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function e2(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function e3(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function e6(e,t){return e&&!e2(t)?e3(e,t):t}var e4=eN.hasStandardBrowserEnv?function(){let e;let t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function n(e){let n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=n(window.location.href),function(t){let r=eu.isString(t)?n(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return function(){return!0}}();function e8(e){let t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function e5(e,t){let r;let n=Array(e=e||10),i=Array(e),o=0,a=0;return t=void 0!==t?t:1e3,function(s){let l=Date.now(),u=i[a];r||(r=l),n[o]=s,i[o]=l;let d=a,c=0;for(;d!==o;)c+=n[d++],d%=e;if((o=(o+1)%e)===a&&(a=(a+1)%e),l-r{let o=i.loaded,a=i.lengthComputable?i.total:void 0,s=o-r,l=n(s),u=o<=a;r=o;let d={loaded:o,total:a,progress:a?o/a:void 0,bytes:s,rate:l||void 0,estimated:l&&a&&u?(a-o)/l:void 0,event:i};d[t?"download":"upload"]=!0,e(d)}}let e9={http:ef,xhr:"undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,r){let n,i,o=e.data,a=eY.from(e.headers).normalize(),{responseType:s,withXSRFToken:l}=e;function u(){e.cancelToken&&e.cancelToken.unsubscribe(n),e.signal&&e.signal.removeEventListener("abort",n)}if(eu.isFormData(o)){if(eN.hasStandardBrowserEnv||eN.hasStandardBrowserWebWorkerEnv)a.setContentType(!1);else if(!1!==(i=a.getContentType())){let[e,...t]=i?i.split(";").map(e=>e.trim()).filter(Boolean):[];a.setContentType([e||"multipart/form-data",...t].join("; "))}}let d=new XMLHttpRequest;if(e.auth){let t=e.auth.username||"",r=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";a.set("Authorization","Basic "+btoa(t+":"+r))}let c=e6(e.baseURL,e.url);function p(){if(!d)return;let n=eY.from("getAllResponseHeaders"in d&&d.getAllResponseHeaders());e0(function(e){t(e),u()},function(e){r(e),u()},{data:s&&"text"!==s&&"json"!==s?d.response:d.responseText,status:d.status,statusText:d.statusText,headers:n,config:e,request:d}),d=null}if(d.open(e.method.toUpperCase(),eO(c,e.params,e.paramsSerializer),!0),d.timeout=e.timeout,"onloadend"in d?d.onloadend=p:d.onreadystatechange=function(){d&&4===d.readyState&&(0!==d.status||d.responseURL&&0===d.responseURL.indexOf("file:"))&&setTimeout(p)},d.onabort=function(){d&&(r(new ed("Request aborted",ed.ECONNABORTED,e,d)),d=null)},d.onerror=function(){r(new ed("Network Error",ed.ERR_NETWORK,e,d)),d=null},d.ontimeout=function(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",n=e.transitional||eI;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(new ed(t,n.clarifyTimeoutError?ed.ETIMEDOUT:ed.ECONNABORTED,e,d)),d=null},eN.hasStandardBrowserEnv&&(l&&eu.isFunction(l)&&(l=l(e)),l||!1!==l&&e4(c))){let t=e.xsrfHeaderName&&e.xsrfCookieName&&e1.read(e.xsrfCookieName);t&&a.set(e.xsrfHeaderName,t)}void 0===o&&a.setContentType(null),"setRequestHeader"in d&&eu.forEach(a.toJSON(),function(e,t){d.setRequestHeader(t,e)}),eu.isUndefined(e.withCredentials)||(d.withCredentials=!!e.withCredentials),s&&"json"!==s&&(d.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&d.addEventListener("progress",e7(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&d.upload&&d.upload.addEventListener("progress",e7(e.onUploadProgress)),(e.cancelToken||e.signal)&&(n=t=>{d&&(r(!t||t.type?new e$(null,e,d):t),d.abort(),d=null)},e.cancelToken&&e.cancelToken.subscribe(n),e.signal&&(e.signal.aborted?n():e.signal.addEventListener("abort",n)));let f=e8(c);if(f&&-1===eN.protocols.indexOf(f)){r(new ed("Unsupported protocol "+f+":",ed.ERR_BAD_REQUEST,e));return}d.send(o||null)})}};eu.forEach(e9,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});let te=e=>"- ".concat(e),tt=e=>eu.isFunction(e)||null===e||!1===e;var tr={getAdapter:e=>{let t,r;let{length:n}=e=eu.isArray(e)?e:[e],i={};for(let o=0;o{let[t,r]=e;return"adapter ".concat(t," ")+(!1===r?"is not supported by the environment":"is not available in the build")});throw new ed("There is no suitable adapter to dispatch the request "+(n?e.length>1?"since :\n"+e.map(te).join("\n"):" "+te(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return r},adapters:e9};function tn(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new e$(null,e)}function ti(e){return tn(e),e.headers=eY.from(e.headers),e.data=eZ.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),tr.getAdapter(e.adapter||eJ.adapter)(e).then(function(t){return tn(e),t.data=eZ.call(e,e.transformResponse,t),t.headers=eY.from(t.headers),t},function(t){return!eX(t)&&(tn(e),t&&t.response&&(t.response.data=eZ.call(e,e.transformResponse,t.response),t.response.headers=eY.from(t.response.headers))),Promise.reject(t)})}let to=e=>e instanceof eY?e.toJSON():e;function ta(e,t){t=t||{};let r={};function n(e,t,r){return eu.isPlainObject(e)&&eu.isPlainObject(t)?eu.merge.call({caseless:r},e,t):eu.isPlainObject(t)?eu.merge({},t):eu.isArray(t)?t.slice():t}function i(e,t,r){return eu.isUndefined(t)?eu.isUndefined(e)?void 0:n(void 0,e,r):n(e,t,r)}function o(e,t){if(!eu.isUndefined(t))return n(void 0,t)}function a(e,t){return eu.isUndefined(t)?eu.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function s(r,i,o){return o in t?n(r,i):o in e?n(void 0,r):void 0}let l={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(e,t)=>i(to(e),to(t),!0)};return eu.forEach(Object.keys(Object.assign({},e,t)),function(n){let o=l[n]||i,a=o(e[n],t[n],n);eu.isUndefined(a)&&o!==s||(r[n]=a)}),r}let ts="1.6.7",tl={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{tl[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});let tu={};tl.transitional=function(e,t,r){function n(e,t){return"[Axios v"+ts+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,i,o)=>{if(!1===e)throw new ed(n(i," has been removed"+(t?" in "+t:"")),ed.ERR_DEPRECATED);return t&&!tu[i]&&(tu[i]=!0,console.warn(n(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,i,o)}};var td={assertOptions:function(e,t,r){if("object"!=typeof e)throw new ed("options must be an object",ed.ERR_BAD_OPTION_VALUE);let n=Object.keys(e),i=n.length;for(;i-- >0;){let o=n[i],a=t[o];if(a){let t=e[o],r=void 0===t||a(t,o,e);if(!0!==r)throw new ed("option "+o+" must be "+r,ed.ERR_BAD_OPTION_VALUE);continue}if(!0!==r)throw new ed("Unknown option "+o,ed.ERR_BAD_OPTION)}},validators:tl};let tc=td.validators;class tp{async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t;Error.captureStackTrace?Error.captureStackTrace(t={}):t=Error();let r=t.stack?t.stack.replace(/^.+\n/,""):"";e.stack?r&&!String(e.stack).endsWith(r.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+r):e.stack=r}throw e}}_request(e,t){let r,n;"string"==typeof e?(t=t||{}).url=e:t=e||{};let{transitional:i,paramsSerializer:o,headers:a}=t=ta(this.defaults,t);void 0!==i&&td.assertOptions(i,{silentJSONParsing:tc.transitional(tc.boolean),forcedJSONParsing:tc.transitional(tc.boolean),clarifyTimeoutError:tc.transitional(tc.boolean)},!1),null!=o&&(eu.isFunction(o)?t.paramsSerializer={serialize:o}:td.assertOptions(o,{encode:tc.function,serialize:tc.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let s=a&&eu.merge(a.common,a[t.method]);a&&eu.forEach(["delete","get","head","post","put","patch","common"],e=>{delete a[e]}),t.headers=eY.concat(s,a);let l=[],u=!0;this.interceptors.request.forEach(function(e){("function"!=typeof e.runWhen||!1!==e.runWhen(t))&&(u=u&&e.synchronous,l.unshift(e.fulfilled,e.rejected))});let d=[];this.interceptors.response.forEach(function(e){d.push(e.fulfilled,e.rejected)});let c=0;if(!u){let e=[ti.bind(this),void 0];for(e.unshift.apply(e,l),e.push.apply(e,d),n=e.length,r=Promise.resolve(t);c{if(!r._listeners)return;let t=r._listeners.length;for(;t-- >0;)r._listeners[t](e);r._listeners=null}),this.promise.then=e=>{let t;let n=new Promise(e=>{r.subscribe(e),t=e}).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e(function(e,n,i){r.reason||(r.reason=new e$(e,n,i),t(r.reason))})}}var tg=th;function tm(e){return function(t){return e.apply(null,t)}}function ty(e){return eu.isObject(e)&&!0===e.isAxiosError}let tv={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(tv).forEach(e=>{let[t,r]=e;tv[r]=t});var tb=tv;function tS(e){let t=new tf(e),r=s(tf.prototype.request,t);return eu.extend(r,tf.prototype,t,{allOwnKeys:!0}),eu.extend(r,t,null,{allOwnKeys:!0}),r.create=function(t){return tS(ta(e,t))},r}let tw=tS(eJ);tw.Axios=tf,tw.CanceledError=e$,tw.CancelToken=tg,tw.isCancel=eX,tw.VERSION=ts,tw.toFormData=eb,tw.AxiosError=ed,tw.Cancel=tw.CanceledError,tw.all=function(e){return Promise.all(e)},tw.spread=tm,tw.isAxiosError=ty,tw.mergeConfig=ta,tw.AxiosHeaders=eY,tw.formToJSON=e=>eM(eu.isHTMLForm(e)?new FormData(e):e),tw.getAdapter=tr.getAdapter,tw.HttpStatusCode=tb,tw.default=tw,e.exports=tw},22963:function(e,t,r){"use strict";r.d(t,{h:function(){return eD}});var n=r(69703),i=r(71074),o=r(64571),a=r(49058),s=r(77362),l=r(56596),u=r(89933),d=r(22681),c=function(){function e(){this.assumeImmutableResults=!1,this.getFragmentDoc=(0,o.re)(s.Yk,{max:l.Q["cache.fragmentQueryDocuments"]||1e3,cache:u.k})}return e.prototype.batch=function(e){var t,r=this,n="string"==typeof e.optimistic?e.optimistic:!1===e.optimistic?null:void 0;return this.performTransaction(function(){return t=e.update(r)},n),t},e.prototype.recordOptimisticTransaction=function(e,t){this.performTransaction(e,t)},e.prototype.transformDocument=function(e){return e},e.prototype.transformForLink=function(e){return e},e.prototype.identify=function(e){},e.prototype.gc=function(){return[]},e.prototype.modify=function(e){return!1},e.prototype.readQuery=function(e,t){return void 0===t&&(t=!!e.optimistic),this.read((0,n.pi)((0,n.pi)({},e),{rootId:e.id||"ROOT_QUERY",optimistic:t}))},e.prototype.readFragment=function(e,t){return void 0===t&&(t=!!e.optimistic),this.read((0,n.pi)((0,n.pi)({},e),{query:this.getFragmentDoc(e.fragment,e.fragmentName),rootId:e.id,optimistic:t}))},e.prototype.writeQuery=function(e){var t=e.id,r=e.data,i=(0,n._T)(e,["id","data"]);return this.write(Object.assign(i,{dataId:t||"ROOT_QUERY",result:r}))},e.prototype.writeFragment=function(e){var t=e.id,r=e.data,i=e.fragment,o=e.fragmentName,a=(0,n._T)(e,["id","data","fragment","fragmentName"]);return this.write(Object.assign(a,{query:this.getFragmentDoc(i,o),dataId:t,result:r}))},e.prototype.updateQuery=function(e,t){return this.batch({update:function(r){var i=r.readQuery(e),o=t(i);return null==o?i:(r.writeQuery((0,n.pi)((0,n.pi)({},e),{data:o})),o)}})},e.prototype.updateFragment=function(e,t){return this.batch({update:function(r){var i=r.readFragment(e),o=t(i);return null==o?i:(r.writeFragment((0,n.pi)((0,n.pi)({},e),{data:o})),o)}})},e}();!1!==globalThis.__DEV__&&(c.prototype.getMemoryInternals=d.Kb);var p=function(e){function t(r,n,i,o){var a,s=e.call(this,r)||this;if(s.message=r,s.path=n,s.query=i,s.variables=o,Array.isArray(s.path)){s.missing=s.message;for(var l=s.path.length-1;l>=0;--l)s.missing=((a={})[s.path[l]]=s.missing,a)}else s.missing=s.path;return s.__proto__=t.prototype,s}return(0,n.ZT)(t,e),t}(Error),f=r(87205),h=r(88796),g=r(29446),m=r(92298),y=r(9774),v=r(11258),b=r(44022),S=r(6291),w=r(84661),_=r(23505),k=r(88403),O=r(25004);function P(e){var t=new Set([e]);return t.forEach(function(e){(0,O.s)(e)&&A(e)===e&&Object.getOwnPropertyNames(e).forEach(function(r){(0,O.s)(e[r])&&t.add(e[r])})}),e}function A(e){if(!1!==globalThis.__DEV__&&!Object.isFrozen(e))try{Object.freeze(e)}catch(e){if(e instanceof TypeError)return null;throw e}return e}function I(e){return!1!==globalThis.__DEV__&&P(e),e}var R=r(60430),E=r(26406),T=Object.prototype.hasOwnProperty;function N(e){return null==e}function x(e,t){var r=e.__typename,n=e.id,i=e._id;if("string"==typeof r&&(t&&(t.keyObject=N(n)?N(i)?void 0:{_id:i}:{id:n}),N(n)&&!N(i)&&(n=i),!N(n)))return"".concat(r,":").concat("number"==typeof n||"string"==typeof n?n:JSON.stringify(n))}var B={dataIdFromObject:x,addTypename:!0,resultCaching:!0,canonizeResults:!1};function C(e){return(0,S.o)(B,e)}function M(e){var t=e.canonizeResults;return void 0===t?B.canonizeResults:t}function D(e,t){return(0,y.Yk)(t)?e.get(t.__ref,"__typename"):t&&t.__typename}var U=/^[_a-z][_0-9a-z]*/i;function J(e){var t=e.match(U);return t?t[0]:e}function j(e,t,r){return!!(0,O.s)(t)&&((0,E.k)(t)?t.every(function(t){return j(e,t,r)}):e.selections.every(function(e){if((0,y.My)(e)&&(0,k.LZ)(e,r)){var n=(0,y.u2)(e);return T.call(t,n)&&(!e.selectionSet||j(e.selectionSet,t[n],r))}return!0}))}function H(e){return(0,O.s)(e)&&!(0,y.Yk)(e)&&!(0,E.k)(e)}function q(){return new _.w0}function L(e,t){var r=(0,s.F)((0,w.kU)(e));return{fragmentMap:r,lookupFragment:function(e){var n=r[e];return!n&&t&&(n=t.lookup(e)),n||null}}}var F=Object.create(null),V=function(){return F},z=Object.create(null),W=function(){function e(e,t){var r=this;this.policies=e,this.group=t,this.data=Object.create(null),this.rootIds=Object.create(null),this.refs=Object.create(null),this.getFieldValue=function(e,t){return I((0,y.Yk)(e)?r.get(e.__ref,t):e&&e[t])},this.canRead=function(e){return(0,y.Yk)(e)?r.has(e.__ref):"object"==typeof e},this.toReference=function(e,t){if("string"==typeof e)return(0,y.kQ)(e);if((0,y.Yk)(e))return e;var n=r.policies.identify(e)[0];if(n){var i=(0,y.kQ)(n);return t&&r.merge(n,e),i}}}return e.prototype.toObject=function(){return(0,n.pi)({},this.data)},e.prototype.has=function(e){return void 0!==this.lookup(e,!0)},e.prototype.get=function(e,t){if(this.group.depend(e,t),T.call(this.data,e)){var r=this.data[e];if(r&&T.call(r,t))return r[t]}return"__typename"===t&&T.call(this.policies.rootTypenamesById,e)?this.policies.rootTypenamesById[e]:this instanceof Y?this.parent.get(e,t):void 0},e.prototype.lookup=function(e,t){return(t&&this.group.depend(e,"__exists"),T.call(this.data,e))?this.data[e]:this instanceof Y?this.parent.lookup(e,t):this.policies.rootTypenamesById[e]?Object.create(null):void 0},e.prototype.merge=function(e,t){var r,n=this;(0,y.Yk)(e)&&(e=e.__ref),(0,y.Yk)(t)&&(t=t.__ref);var o="string"==typeof e?this.lookup(r=e):e,a="string"==typeof t?this.lookup(r=t):t;if(a){(0,i.kG)("string"==typeof r,1);var s=new _.w0(X).merge(o,a);if(this.data[r]=s,s!==o&&(delete this.refs[r],this.group.caching)){var l=Object.create(null);o||(l.__exists=1),Object.keys(a).forEach(function(e){if(!o||o[e]!==s[e]){l[e]=1;var t=J(e);t===e||n.policies.hasKeyArgs(s.__typename,t)||(l[t]=1),void 0!==s[e]||n instanceof Y||delete s[e]}}),l.__typename&&!(o&&o.__typename)&&this.policies.rootTypenamesById[r]===s.__typename&&delete l.__typename,Object.keys(l).forEach(function(e){return n.group.dirty(r,e)})}}},e.prototype.modify=function(e,t){var r=this,o=this.lookup(e);if(o){var a=Object.create(null),s=!1,l=!0,u={DELETE:F,INVALIDATE:z,isReference:y.Yk,toReference:this.toReference,canRead:this.canRead,readField:function(t,n){return r.policies.readField("string"==typeof t?{fieldName:t,from:n||(0,y.kQ)(e)}:t,{store:r})}};if(Object.keys(o).forEach(function(d){var c=J(d),p=o[d];if(void 0!==p){var f="function"==typeof t?t:t[d]||t[c];if(f){var h=f===V?F:f(I(p),(0,n.pi)((0,n.pi)({},u),{fieldName:c,storeFieldName:d,storage:r.getStorage(e,d)}));if(h===z)r.group.dirty(e,d);else if(h===F&&(h=void 0),h!==p&&(a[d]=h,s=!0,p=h,!1!==globalThis.__DEV__)){var g=function(e){if(void 0===r.lookup(e.__ref))return!1!==globalThis.__DEV__&&i.kG.warn(2,e),!0};if((0,y.Yk)(h))g(h);else if(Array.isArray(h))for(var m=!1,v=void 0,b=0,S=h;b0){var t=--this.rootIds[e];return t||delete this.rootIds[e],t}return 0},e.prototype.getRootIdSet=function(e){return void 0===e&&(e=new Set),Object.keys(this.rootIds).forEach(e.add,e),this instanceof Y?this.parent.getRootIdSet(e):Object.keys(this.policies.rootTypenamesById).forEach(e.add,e),e},e.prototype.gc=function(){var e=this,t=this.getRootIdSet(),r=this.toObject();t.forEach(function(n){T.call(r,n)&&(Object.keys(e.findChildRefIds(n)).forEach(t.add,t),delete r[n])});var n=Object.keys(r);if(n.length){for(var i=this;i instanceof Y;)i=i.parent;n.forEach(function(e){return i.delete(e)})}return n},e.prototype.findChildRefIds=function(e){if(!T.call(this.refs,e)){var t=this.refs[e]=Object.create(null),r=this.data[e];if(!r)return t;var n=new Set([r]);n.forEach(function(e){(0,y.Yk)(e)&&(t[e.__ref]=!0),(0,O.s)(e)&&Object.keys(e).forEach(function(t){var r=e[t];(0,O.s)(r)&&n.add(r)})})}return this.refs[e]},e.prototype.makeCacheKey=function(){return this.group.keyMaker.lookupArray(arguments)},e}(),Q=function(){function e(e,t){void 0===t&&(t=null),this.caching=e,this.parent=t,this.d=null,this.resetCaching()}return e.prototype.resetCaching=function(){this.d=this.caching?(0,o.dP)():null,this.keyMaker=new R.B(b.mr)},e.prototype.depend=function(e,t){if(this.d){this.d(G(e,t));var r=J(t);r!==t&&this.d(G(e,r)),this.parent&&this.parent.depend(e,t)}},e.prototype.dirty=function(e,t){this.d&&this.d.dirty(G(e,t),"__exists"===t?"forget":"setDirty")},e}();function G(e,t){return t+"#"+e}function K(e,t){$(e)&&e.group.depend(t,"__exists")}!function(e){var t=function(e){function t(t){var r=t.policies,n=t.resultCaching,i=void 0===n||n,o=t.seed,a=e.call(this,r,new Q(i))||this;return a.stump=new Z(a),a.storageTrie=new R.B(b.mr),o&&a.replace(o),a}return(0,n.ZT)(t,e),t.prototype.addLayer=function(e,t){return this.stump.addLayer(e,t)},t.prototype.removeLayer=function(){return this},t.prototype.getStorage=function(){return this.storageTrie.lookupArray(arguments)},t}(e);e.Root=t}(W||(W={}));var Y=function(e){function t(t,r,n,i){var o=e.call(this,r.policies,i)||this;return o.id=t,o.parent=r,o.replay=n,o.group=i,n(o),o}return(0,n.ZT)(t,e),t.prototype.addLayer=function(e,r){return new t(e,this,r,this.group)},t.prototype.removeLayer=function(e){var t=this,r=this.parent.removeLayer(e);return e===this.id?(this.group.caching&&Object.keys(this.data).forEach(function(e){var n=t.data[e],i=r.lookup(e);i?n?n!==i&&Object.keys(n).forEach(function(r){(0,a.D)(n[r],i[r])||t.group.dirty(e,r)}):(t.group.dirty(e,"__exists"),Object.keys(i).forEach(function(r){t.group.dirty(e,r)})):t.delete(e)}),r):r===this.parent?this:r.addLayer(this.id,this.replay)},t.prototype.toObject=function(){return(0,n.pi)((0,n.pi)({},this.parent.toObject()),this.data)},t.prototype.findChildRefIds=function(t){var r=this.parent.findChildRefIds(t);return T.call(this.data,t)?(0,n.pi)((0,n.pi)({},r),e.prototype.findChildRefIds.call(this,t)):r},t.prototype.getStorage=function(){for(var e=this.parent;e.parent;)e=e.parent;return e.getStorage.apply(e,arguments)},t}(W),Z=function(e){function t(t){return e.call(this,"EntityStore.Stump",t,function(){},new Q(t.group.caching,t.group))||this}return(0,n.ZT)(t,e),t.prototype.removeLayer=function(){return this},t.prototype.merge=function(e,t){return this.parent.merge(e,t)},t}(Y);function X(e,t,r){var n=e[r],i=t[r];return(0,a.D)(n,i)?n:i}function $(e){return!!(e instanceof W&&e.group.caching)}function ee(e){return(0,O.s)(e)?(0,E.k)(e)?e.slice(0):(0,n.pi)({__proto__:Object.getPrototypeOf(e)},e):e}var et=function(){function e(){this.known=new(b.sy?WeakSet:Set),this.pool=new R.B(b.mr),this.passes=new WeakMap,this.keysByJSON=new Map,this.empty=this.admit({})}return e.prototype.isKnown=function(e){return(0,O.s)(e)&&this.known.has(e)},e.prototype.pass=function(e){if((0,O.s)(e)){var t=ee(e);return this.passes.set(t,e),t}return e},e.prototype.admit=function(e){var t=this;if((0,O.s)(e)){var r=this.passes.get(e);if(r)return r;switch(Object.getPrototypeOf(e)){case Array.prototype:if(this.known.has(e))break;var n=e.map(this.admit,this),i=this.pool.lookupArray(n);return i.array||(this.known.add(i.array=n),!1!==globalThis.__DEV__&&Object.freeze(n)),i.array;case null:case Object.prototype:if(this.known.has(e))break;var o=Object.getPrototypeOf(e),a=[o],s=this.sortedKeys(e);a.push(s.json);var l=a.length;s.sorted.forEach(function(r){a.push(t.admit(e[r]))});var i=this.pool.lookupArray(a);if(!i.object){var u=i.object=Object.create(o);this.known.add(u),s.sorted.forEach(function(e,t){u[e]=a[l+t]}),!1!==globalThis.__DEV__&&Object.freeze(u)}return i.object}}return e},e.prototype.sortedKeys=function(e){var t=Object.keys(e),r=this.pool.lookupArray(t);if(!r.keys){t.sort();var n=JSON.stringify(t);(r.keys=this.keysByJSON.get(n))||this.keysByJSON.set(n,r.keys={sorted:t,json:n})}return r.keys},e}();function er(e){return[e.selectionSet,e.objectOrReference,e.context,e.context.canonizeResults]}var en=function(){function e(e){var t=this;this.knownResults=new(b.mr?WeakMap:Map),this.config=(0,S.o)(e,{addTypename:!1!==e.addTypename,canonizeResults:M(e)}),this.canon=e.canon||new et,this.executeSelectionSet=(0,o.re)(function(e){var r,i=e.context.canonizeResults,o=er(e);o[3]=!i;var a=(r=t.executeSelectionSet).peek.apply(r,o);return a?i?(0,n.pi)((0,n.pi)({},a),{result:t.canon.admit(a.result)}):a:(K(e.context.store,e.enclosingRef.__ref),t.execSelectionSetImpl(e))},{max:this.config.resultCacheMaxSize||l.Q["inMemoryCache.executeSelectionSet"]||5e4,keyArgs:er,makeCacheKey:function(e,t,r,n){if($(r.store))return r.store.makeCacheKey(e,(0,y.Yk)(t)?t.__ref:t,r.varString,n)}}),this.executeSubSelectedArray=(0,o.re)(function(e){return K(e.context.store,e.enclosingRef.__ref),t.execSubSelectedArrayImpl(e)},{max:this.config.resultCacheMaxSize||l.Q["inMemoryCache.executeSubSelectedArray"]||1e4,makeCacheKey:function(e){var t=e.field,r=e.array,n=e.context;if($(n.store))return n.store.makeCacheKey(t,r,n.varString)}})}return e.prototype.resetCanon=function(){this.canon=new et},e.prototype.diffQueryAgainstStore=function(e){var t,r=e.store,i=e.query,o=e.rootId,a=void 0===o?"ROOT_QUERY":o,s=e.variables,l=e.returnPartialData,u=void 0===l||l,d=e.canonizeResults,c=void 0===d?this.config.canonizeResults:d,f=this.config.cache.policies;s=(0,n.pi)((0,n.pi)({},(0,w.O4)((0,w.iW)(i))),s);var h=(0,y.kQ)(a),m=this.executeSelectionSet({selectionSet:(0,w.p$)(i).selectionSet,objectOrReference:h,enclosingRef:h,context:(0,n.pi)({store:r,query:i,policies:f,variables:s,varString:(0,g.B)(s),canonizeResults:c},L(i,this.config.fragments))});if(m.missing&&(t=[new p(ei(m.missing),m.missing,i,s)],!u))throw t[0];return{result:m.result,complete:!t,missing:t}},e.prototype.isFresh=function(e,t,r,n){if($(n.store)&&this.knownResults.get(e)===r){var i=this.executeSelectionSet.peek(r,t,n,this.canon.isKnown(e));if(i&&e===i.result)return!0}return!1},e.prototype.execSelectionSetImpl=function(e){var t,r=this,n=e.selectionSet,o=e.objectOrReference,a=e.enclosingRef,l=e.context;if((0,y.Yk)(o)&&!l.policies.rootTypenamesById[o.__ref]&&!l.store.has(o.__ref))return{result:this.canon.empty,missing:"Dangling reference to missing ".concat(o.__ref," object")};var u=l.variables,d=l.policies,c=l.store.getFieldValue(o,"__typename"),p=[],f=new _.w0;function g(e,r){var n;return e.missing&&(t=f.merge(t,((n={})[r]=e.missing,n))),e.result}this.config.addTypename&&"string"==typeof c&&!d.rootIdsByTypename[c]&&p.push({__typename:c});var m=new Set(n.selections);m.forEach(function(e){var n,b;if((0,k.LZ)(e,u)){if((0,y.My)(e)){var S=d.readField({fieldName:e.name.value,field:e,variables:l.variables,from:o},l),w=(0,y.u2)(e);void 0===S?h.Gw.added(e)||(t=f.merge(t,((n={})[w]="Can't find field '".concat(e.name.value,"' on ").concat((0,y.Yk)(o)?o.__ref+" object":"object "+JSON.stringify(o,null,2)),n))):(0,E.k)(S)?S=g(r.executeSubSelectedArray({field:e,array:S,enclosingRef:a,context:l}),w):e.selectionSet?null!=S&&(S=g(r.executeSelectionSet({selectionSet:e.selectionSet,objectOrReference:S,enclosingRef:(0,y.Yk)(S)?S:a,context:l}),w)):l.canonizeResults&&(S=r.canon.pass(S)),void 0!==S&&p.push(((b={})[w]=S,b))}else{var _=(0,s.hi)(e,l.lookupFragment);if(!_&&e.kind===v.h.FRAGMENT_SPREAD)throw(0,i._K)(9,e.name.value);_&&d.fragmentMatches(_,c)&&_.selectionSet.selections.forEach(m.add,m)}}});var b={result:(0,_.bw)(p),missing:t},S=l.canonizeResults?this.canon.admit(b):I(b);return S.result&&this.knownResults.set(S.result,n),S},e.prototype.execSubSelectedArrayImpl=function(e){var t,r=this,n=e.field,i=e.array,o=e.enclosingRef,a=e.context,s=new _.w0;function l(e,r){var n;return e.missing&&(t=s.merge(t,((n={})[r]=e.missing,n))),e.result}return n.selectionSet&&(i=i.filter(a.store.canRead)),i=i.map(function(e,t){return null===e?null:(0,E.k)(e)?l(r.executeSubSelectedArray({field:n,array:e,enclosingRef:o,context:a}),t):n.selectionSet?l(r.executeSelectionSet({selectionSet:n.selectionSet,objectOrReference:e,enclosingRef:(0,y.Yk)(e)?e:o,context:a}),t):(!1!==globalThis.__DEV__&&eo(a.store,n,e),e)}),{result:a.canonizeResults?this.canon.admit(i):i,missing:t}},e}();function ei(e){try{JSON.stringify(e,function(e,t){if("string"==typeof t)throw t;return t})}catch(e){return e}}function eo(e,t,r){if(!t.selectionSet){var n=new Set([r]);n.forEach(function(r){(0,O.s)(r)&&((0,i.kG)(!(0,y.Yk)(r),10,D(e,r),t.name.value),Object.values(r).forEach(n.add,n))})}}var ea=r(52618),es=r(43741),el=r(94315),eu=Object.create(null);function ed(e){var t=JSON.stringify(e);return eu[t]||(eu[t]=Object.create(null))}function ec(e){var t=ed(e);return t.keyFieldsFn||(t.keyFieldsFn=function(t,r){var n=function(e,t){return r.readField(t,e)},o=r.keyObject=ef(e,function(e){var o=em(r.storeObject,e,n);return void 0===o&&t!==r.storeObject&&T.call(t,e[0])&&(o=em(t,e,eg)),(0,i.kG)(void 0!==o,4,e.join("."),t),o});return"".concat(r.typename,":").concat(JSON.stringify(o))})}function ep(e){var t=ed(e);return t.keyArgsFn||(t.keyArgsFn=function(t,r){var n=r.field,i=r.variables,o=r.fieldName,a=JSON.stringify(ef(e,function(e){var r=e[0],o=r.charAt(0);if("@"===o){if(n&&(0,E.O)(n.directives)){var a=r.slice(1),s=n.directives.find(function(e){return e.name.value===a}),l=s&&(0,y.NC)(s,i);return l&&em(l,e.slice(1))}return}if("$"===o){var u=r.slice(1);if(i&&T.call(i,u)){var d=e.slice(0);return d[0]=u,em(i,d)}return}if(t)return em(t,e)}));return(t||"{}"!==a)&&(o+=":"+a),o})}function ef(e,t){var r=new _.w0;return eh(e).reduce(function(e,n){var i,o=t(n);if(void 0!==o){for(var a=n.length-1;a>=0;--a)(i={})[n[a]]=o,o=i;e=r.merge(e,o)}return e},Object.create(null))}function eh(e){var t=ed(e);if(!t.paths){var r=t.paths=[],n=[];e.forEach(function(t,i){(0,E.k)(t)?(eh(t).forEach(function(e){return r.push(n.concat(e))}),n.length=0):(n.push(t),(0,E.k)(e[i+1])||(r.push(n.slice(0)),n.length=0))})}return t.paths}function eg(e,t){return e[t]}function em(e,t,r){return r=r||eg,ey(t.reduce(function e(t,n){return(0,E.k)(t)?t.map(function(t){return e(t,n)}):t&&r(t,n)},e))}function ey(e){return(0,O.s)(e)?(0,E.k)(e)?e.map(ey):ef(Object.keys(e).sort(),function(t){return em(e,t)}):e}function ev(e){return void 0!==e.args?e.args:e.field?(0,y.NC)(e.field,e.variables):null}var eb=function(){},eS=function(e,t){return t.fieldName},ew=function(e,t,r){return(0,r.mergeObjects)(e,t)},e_=function(e,t){return t},ek=function(){function e(e){this.config=e,this.typePolicies=Object.create(null),this.toBeAdded=Object.create(null),this.supertypeMap=new Map,this.fuzzySubtypes=new Map,this.rootIdsByTypename=Object.create(null),this.rootTypenamesById=Object.create(null),this.usingPossibleTypes=!1,this.config=(0,n.pi)({dataIdFromObject:x},e),this.cache=this.config.cache,this.setRootTypename("Query"),this.setRootTypename("Mutation"),this.setRootTypename("Subscription"),e.possibleTypes&&this.addPossibleTypes(e.possibleTypes),e.typePolicies&&this.addTypePolicies(e.typePolicies)}return e.prototype.identify=function(e,t){var r,i,o=this,a=t&&(t.typename||(null===(r=t.storeObject)||void 0===r?void 0:r.__typename))||e.__typename;if(a===this.rootTypenamesById.ROOT_QUERY)return["ROOT_QUERY"];for(var s=t&&t.storeObject||e,l=(0,n.pi)((0,n.pi)({},t),{typename:a,storeObject:s,readField:t&&t.readField||function(){var e=eP(arguments,s);return o.readField(e,{store:o.cache.data,variables:e.variables})}}),u=a&&this.getTypePolicy(a),d=u&&u.keyFn||this.config.dataIdFromObject;d;){var c=d((0,n.pi)((0,n.pi)({},e),s),l);if((0,E.k)(c))d=ec(c);else{i=c;break}}return i=i?String(i):void 0,l.keyObject?[i,l.keyObject]:[i]},e.prototype.addTypePolicies=function(e){var t=this;Object.keys(e).forEach(function(r){var i=e[r],o=i.queryType,a=i.mutationType,s=i.subscriptionType,l=(0,n._T)(i,["queryType","mutationType","subscriptionType"]);o&&t.setRootTypename("Query",r),a&&t.setRootTypename("Mutation",r),s&&t.setRootTypename("Subscription",r),T.call(t.toBeAdded,r)?t.toBeAdded[r].push(l):t.toBeAdded[r]=[l]})},e.prototype.updateTypePolicy=function(e,t){var r=this,n=this.getTypePolicy(e),i=t.keyFields,o=t.fields;function a(e,t){e.merge="function"==typeof t?t:!0===t?ew:!1===t?e_:e.merge}a(n,t.merge),n.keyFn=!1===i?eb:(0,E.k)(i)?ec(i):"function"==typeof i?i:n.keyFn,o&&Object.keys(o).forEach(function(t){var n=r.getFieldPolicy(e,t,!0),i=o[t];if("function"==typeof i)n.read=i;else{var s=i.keyArgs,l=i.read,u=i.merge;n.keyFn=!1===s?eS:(0,E.k)(s)?ep(s):"function"==typeof s?s:n.keyFn,"function"==typeof l&&(n.read=l),a(n,u)}n.read&&n.merge&&(n.keyFn=n.keyFn||eS)})},e.prototype.setRootTypename=function(e,t){void 0===t&&(t=e);var r="ROOT_"+e.toUpperCase(),n=this.rootTypenamesById[r];t!==n&&((0,i.kG)(!n||n===e,5,e),n&&delete this.rootIdsByTypename[n],this.rootIdsByTypename[t]=r,this.rootTypenamesById[r]=t)},e.prototype.addPossibleTypes=function(e){var t=this;this.usingPossibleTypes=!0,Object.keys(e).forEach(function(r){t.getSupertypeSet(r,!0),e[r].forEach(function(e){t.getSupertypeSet(e,!0).add(r);var n=e.match(U);n&&n[0]===e||t.fuzzySubtypes.set(e,new RegExp(e))})})},e.prototype.getTypePolicy=function(e){var t=this;if(!T.call(this.typePolicies,e)){var r=this.typePolicies[e]=Object.create(null);r.fields=Object.create(null);var i=this.supertypeMap.get(e);!i&&this.fuzzySubtypes.size&&(i=this.getSupertypeSet(e,!0),this.fuzzySubtypes.forEach(function(r,n){if(r.test(e)){var o=t.supertypeMap.get(n);o&&o.forEach(function(e){return i.add(e)})}})),i&&i.size&&i.forEach(function(e){var i=t.getTypePolicy(e),o=i.fields;Object.assign(r,(0,n._T)(i,["fields"])),Object.assign(r.fields,o)})}var o=this.toBeAdded[e];return o&&o.length&&o.splice(0).forEach(function(r){t.updateTypePolicy(e,r)}),this.typePolicies[e]},e.prototype.getFieldPolicy=function(e,t,r){if(e){var n=this.getTypePolicy(e).fields;return n[t]||r&&(n[t]=Object.create(null))}},e.prototype.getSupertypeSet=function(e,t){var r=this.supertypeMap.get(e);return!r&&t&&this.supertypeMap.set(e,r=new Set),r},e.prototype.fragmentMatches=function(e,t,r,n){var o=this;if(!e.typeCondition)return!0;if(!t)return!1;var a=e.typeCondition.name.value;if(t===a)return!0;if(this.usingPossibleTypes&&this.supertypeMap.has(a))for(var s=this.getSupertypeSet(t,!0),l=[s],u=function(e){var t=o.getSupertypeSet(e,!1);t&&t.size&&0>l.indexOf(t)&&l.push(t)},d=!!(r&&this.fuzzySubtypes.size),c=!1,p=0;p1?s:t}:(o=(0,n.pi)({},a),T.call(o,"from")||(o.from=t)),!1!==globalThis.__DEV__&&void 0===o.from&&!1!==globalThis.__DEV__&&i.kG.warn(7,(0,es.v)(Array.from(e))),void 0===o.variables&&(o.variables=r),o}function eA(e){return function(t,r){if((0,E.k)(t)||(0,E.k)(r))throw(0,i._K)(8);if((0,O.s)(t)&&(0,O.s)(r)){var o=e.getFieldValue(t,"__typename"),a=e.getFieldValue(r,"__typename");if(o&&a&&o!==a)return r;if((0,y.Yk)(t)&&H(r))return e.merge(t.__ref,r),t;if(H(t)&&(0,y.Yk)(r))return e.merge(t,r.__ref),r;if(H(t)&&H(r))return(0,n.pi)((0,n.pi)({},t),r)}return r}}function eI(e,t,r){var i="".concat(t).concat(r),o=e.flavors.get(i);return o||e.flavors.set(i,o=e.clientOnly===t&&e.deferred===r?e:(0,n.pi)((0,n.pi)({},e),{clientOnly:t,deferred:r})),o}var eR=function(){function e(e,t,r){this.cache=e,this.reader=t,this.fragments=r}return e.prototype.writeToStore=function(e,t){var r=this,o=t.query,a=t.result,s=t.dataId,l=t.variables,u=t.overwrite,d=(0,w.$H)(o),c=q();l=(0,n.pi)((0,n.pi)({},(0,w.O4)(d)),l);var p=(0,n.pi)((0,n.pi)({store:e,written:Object.create(null),merge:function(e,t){return c.merge(e,t)},variables:l,varString:(0,g.B)(l)},L(o,this.fragments)),{overwrite:!!u,incomingById:new Map,clientOnly:!1,deferred:!1,flavors:new Map}),f=this.processSelectionSet({result:a||Object.create(null),dataId:s,selectionSet:d.selectionSet,mergeTree:{map:new Map},context:p});if(!(0,y.Yk)(f))throw(0,i._K)(11,a);return p.incomingById.forEach(function(t,n){var i=t.storeObject,o=t.mergeTree,a=t.fieldNodeSet,s=(0,y.kQ)(n);if(o&&o.map.size){var l=r.applyMerges(o,s,i,p);if((0,y.Yk)(l))return;i=l}if(!1!==globalThis.__DEV__&&!p.overwrite){var u=Object.create(null);a.forEach(function(e){e.selectionSet&&(u[e.name.value]=!0)});var d=function(e){return!0===u[J(e)]},c=function(e){var t=o&&o.map.get(e);return!!(t&&t.info&&t.info.merge)};Object.keys(i).forEach(function(e){d(e)&&!c(e)&&eM(s,i,e,p.store)})}e.merge(n,i)}),e.retain(f.__ref),f},e.prototype.processSelectionSet=function(e){var t=this,r=e.dataId,o=e.result,a=e.selectionSet,s=e.context,l=e.mergeTree,u=this.cache.policies,d=Object.create(null),c=r&&u.rootTypenamesById[r]||(0,y.qw)(o,a,s.fragmentMap)||r&&s.store.get(r,"__typename");"string"==typeof c&&(d.__typename=c);var p=function(){var e=eP(arguments,d,s.variables);if((0,y.Yk)(e.from)){var t=s.incomingById.get(e.from.__ref);if(t){var r=u.readField((0,n.pi)((0,n.pi)({},e),{from:t.storeObject}),s);if(void 0!==r)return r}}return u.readField(e,s)},f=new Set;this.flattenFields(a,o,s,c).forEach(function(e,r){var n,a=o[(0,y.u2)(r)];if(f.add(r),void 0!==a){var s=u.getStoreFieldName({typename:c,fieldName:r.name.value,field:r,variables:e.variables}),g=eT(l,s),m=t.processFieldValue(a,r,r.selectionSet?eI(e,!1,!1):e,g),v=void 0;r.selectionSet&&((0,y.Yk)(m)||H(m))&&(v=p("__typename",m));var b=u.getMergeFunction(c,r.name.value,v);b?g.info={field:r,typename:c,merge:b}:eB(l,s),d=e.merge(d,((n={})[s]=m,n))}else!1===globalThis.__DEV__||e.clientOnly||e.deferred||h.Gw.added(r)||u.getReadFunction(c,r.name.value)||!1===globalThis.__DEV__||i.kG.error(12,(0,y.u2)(r),o)});try{var g=u.identify(o,{typename:c,selectionSet:a,fragmentMap:s.fragmentMap,storeObject:d,readField:p}),m=g[0],v=g[1];r=r||m,v&&(d=s.merge(d,v))}catch(e){if(!r)throw e}if("string"==typeof r){var b=(0,y.kQ)(r),S=s.written[r]||(s.written[r]=[]);if(S.indexOf(a)>=0||(S.push(a),this.reader&&this.reader.isFresh(o,b,a,s)))return b;var w=s.incomingById.get(r);return w?(w.storeObject=s.merge(w.storeObject,d),w.mergeTree=eN(w.mergeTree,l),f.forEach(function(e){return w.fieldNodeSet.add(e)})):s.incomingById.set(r,{storeObject:d,mergeTree:ex(l)?void 0:l,fieldNodeSet:f}),b}return d},e.prototype.processFieldValue=function(e,t,r,n){var i=this;return t.selectionSet&&null!==e?(0,E.k)(e)?e.map(function(e,o){var a=i.processFieldValue(e,t,r,eT(n,o));return eB(n,o),a}):this.processSelectionSet({result:e,selectionSet:t.selectionSet,context:r,mergeTree:n}):!1!==globalThis.__DEV__?(0,ea.X)(e):e},e.prototype.flattenFields=function(e,t,r,n){void 0===n&&(n=(0,y.qw)(t,e,r.fragmentMap));var o=new Map,a=this.cache.policies,l=new R.B(!1);return function e(u,d){var c=l.lookup(u,d.clientOnly,d.deferred);c.visited||(c.visited=!0,u.selections.forEach(function(l){if((0,k.LZ)(l,r.variables)){var u=d.clientOnly,c=d.deferred;if(!(u&&c)&&(0,E.O)(l.directives)&&l.directives.forEach(function(e){var t=e.name.value;if("client"===t&&(u=!0),"defer"===t){var n=(0,y.NC)(e,r.variables);n&&!1===n.if||(c=!0)}}),(0,y.My)(l)){var p=o.get(l);p&&(u=u&&p.clientOnly,c=c&&p.deferred),o.set(l,eI(r,u,c))}else{var f=(0,s.hi)(l,r.lookupFragment);if(!f&&l.kind===v.h.FRAGMENT_SPREAD)throw(0,i._K)(13,l.name.value);f&&a.fragmentMatches(f,n,t,r.variables)&&e(f.selectionSet,eI(r,u,c))}}}))}(e,r),o},e.prototype.applyMerges=function(e,t,r,o,a){var s=this;if(e.map.size&&!(0,y.Yk)(r)){var l,u,d=!(0,E.k)(r)&&((0,y.Yk)(t)||H(t))?t:void 0,c=r;d&&!a&&(a=[(0,y.Yk)(d)?d.__ref:d]);var p=function(e,t){return(0,E.k)(e)?"number"==typeof t?e[t]:void 0:o.store.getFieldValue(e,String(t))};e.map.forEach(function(e,t){var r=p(d,t),n=p(c,t);if(void 0!==n){a&&a.push(t);var l=s.applyMerges(e,r,n,o,a);l!==n&&(u=u||new Map).set(t,l),a&&(0,i.kG)(a.pop()===t)}}),u&&(r=(0,E.k)(c)?c.slice(0):(0,n.pi)({},c),u.forEach(function(e,t){r[t]=e}))}return e.info?this.cache.policies.runMergeFunction(t,r,e.info,o,a&&(l=o.store).getStorage.apply(l,a)):r},e}(),eE=[];function eT(e,t){var r=e.map;return r.has(t)||r.set(t,eE.pop()||{map:new Map}),r.get(t)}function eN(e,t){if(e===t||!t||ex(t))return e;if(!e||ex(e))return t;var r=e.info&&t.info?(0,n.pi)((0,n.pi)({},e.info),t.info):e.info||t.info,i=e.map.size&&t.map.size,o={info:r,map:i?new Map:e.map.size?e.map:t.map};if(i){var a=new Set(t.map.keys());e.map.forEach(function(e,r){o.map.set(r,eN(e,t.map.get(r))),a.delete(r)}),a.forEach(function(r){o.map.set(r,eN(t.map.get(r),e.map.get(r)))})}return o}function ex(e){return!e||!(e.info||e.map.size)}function eB(e,t){var r=e.map,n=r.get(t);n&&ex(n)&&(eE.push(n),r.delete(t))}var eC=new Set;function eM(e,t,r,n){var o=function(e){var t=n.getFieldValue(e,r);return"object"==typeof t&&t},s=o(e);if(s){var l=o(t);if(!(!l||(0,y.Yk)(s)||(0,a.D)(s,l)||Object.keys(s).every(function(e){return void 0!==n.getFieldValue(l,e)}))){var u=n.getFieldValue(e,"__typename")||n.getFieldValue(t,"__typename"),d=J(r),c="".concat(u,".").concat(d);if(!eC.has(c)){eC.add(c);var p=[];(0,E.k)(s)||(0,E.k)(l)||[s,l].forEach(function(e){var t=n.getFieldValue(e,"__typename");"string"!=typeof t||p.includes(t)||p.push(t)}),!1!==globalThis.__DEV__&&i.kG.warn(14,d,u,p.length?"either ensure all objects of type "+p.join(" and ")+" have an ID or a custom merge function, or ":"",c,s,l)}}}}var eD=function(e){function t(t){void 0===t&&(t={});var r=e.call(this)||this;return r.watches=new Set,r.addTypenameTransform=new f.A(h.Gw),r.assumeImmutableResults=!0,r.makeVar=el.QS,r.txCount=0,r.config=C(t),r.addTypename=!!r.config.addTypename,r.policies=new ek({cache:r,dataIdFromObject:r.config.dataIdFromObject,possibleTypes:r.config.possibleTypes,typePolicies:r.config.typePolicies}),r.init(),r}return(0,n.ZT)(t,e),t.prototype.init=function(){var e=this.data=new W.Root({policies:this.policies,resultCaching:this.config.resultCaching});this.optimisticData=e.stump,this.resetResultCache()},t.prototype.resetResultCache=function(e){var t=this,r=this.storeReader,n=this.config.fragments;this.storeWriter=new eR(this,this.storeReader=new en({cache:this,addTypename:this.addTypename,resultCacheMaxSize:this.config.resultCacheMaxSize,canonizeResults:M(this.config),canon:e?void 0:r&&r.canon,fragments:n}),n),this.maybeBroadcastWatch=(0,o.re)(function(e,r){return t.broadcastWatch(e,r)},{max:this.config.resultCacheMaxSize||l.Q["inMemoryCache.maybeBroadcastWatch"]||5e3,makeCacheKey:function(e){var r=e.optimistic?t.optimisticData:t.data;if($(r)){var n=e.optimistic,i=e.id,o=e.variables;return r.makeCacheKey(e.query,e.callback,(0,g.B)({optimistic:n,id:i,variables:o}))}}}),new Set([this.data.group,this.optimisticData.group]).forEach(function(e){return e.resetCaching()})},t.prototype.restore=function(e){return this.init(),e&&this.data.replace(e),this},t.prototype.extract=function(e){return void 0===e&&(e=!1),(e?this.optimisticData:this.data).extract()},t.prototype.read=function(e){var t=e.returnPartialData,r=void 0!==t&&t;try{return this.storeReader.diffQueryAgainstStore((0,n.pi)((0,n.pi)({},e),{store:e.optimistic?this.optimisticData:this.data,config:this.config,returnPartialData:r})).result||null}catch(e){if(e instanceof p)return null;throw e}},t.prototype.write=function(e){try{return++this.txCount,this.storeWriter.writeToStore(this.data,e)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.modify=function(e){if(T.call(e,"id")&&!e.id)return!1;var t=e.optimistic?this.optimisticData:this.data;try{return++this.txCount,t.modify(e.id||"ROOT_QUERY",e.fields)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.diff=function(e){return this.storeReader.diffQueryAgainstStore((0,n.pi)((0,n.pi)({},e),{store:e.optimistic?this.optimisticData:this.data,rootId:e.id||"ROOT_QUERY",config:this.config}))},t.prototype.watch=function(e){var t=this;return this.watches.size||(0,el._v)(this),this.watches.add(e),e.immediate&&this.maybeBroadcastWatch(e),function(){t.watches.delete(e)&&!t.watches.size&&(0,el.li)(t),t.maybeBroadcastWatch.forget(e)}},t.prototype.gc=function(e){g.B.reset(),m.S.reset(),this.addTypenameTransform.resetCache(),null===(t=this.config.fragments)||void 0===t||t.resetCaches();var t,r=this.optimisticData.gc();return e&&!this.txCount&&(e.resetResultCache?this.resetResultCache(e.resetResultIdentities):e.resetResultIdentities&&this.storeReader.resetCanon()),r},t.prototype.retain=function(e,t){return(t?this.optimisticData:this.data).retain(e)},t.prototype.release=function(e,t){return(t?this.optimisticData:this.data).release(e)},t.prototype.identify=function(e){if((0,y.Yk)(e))return e.__ref;try{return this.policies.identify(e)[0]}catch(e){!1!==globalThis.__DEV__&&i.kG.warn(e)}},t.prototype.evict=function(e){if(!e.id){if(T.call(e,"id"))return!1;e=(0,n.pi)((0,n.pi)({},e),{id:"ROOT_QUERY"})}try{return++this.txCount,this.optimisticData.evict(e,this.data)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.reset=function(e){var t=this;return this.init(),g.B.reset(),e&&e.discardWatches?(this.watches.forEach(function(e){return t.maybeBroadcastWatch.forget(e)}),this.watches.clear(),(0,el.li)(this)):this.broadcastWatches(),Promise.resolve()},t.prototype.removeOptimistic=function(e){var t=this.optimisticData.removeLayer(e);t!==this.optimisticData&&(this.optimisticData=t,this.broadcastWatches())},t.prototype.batch=function(e){var t,r=this,i=e.update,o=e.optimistic,a=void 0===o||o,s=e.removeOptimistic,l=e.onWatchUpdated,u=function(e){var n=r,o=n.data,a=n.optimisticData;++r.txCount,e&&(r.data=r.optimisticData=e);try{return t=i(r)}finally{--r.txCount,r.data=o,r.optimisticData=a}},d=new Set;return l&&!this.txCount&&this.broadcastWatches((0,n.pi)((0,n.pi)({},e),{onWatchUpdated:function(e){return d.add(e),!1}})),"string"==typeof a?this.optimisticData=this.optimisticData.addLayer(a,u):!1===a?u(this.data):u(),"string"==typeof s&&(this.optimisticData=this.optimisticData.removeLayer(s)),l&&d.size?(this.broadcastWatches((0,n.pi)((0,n.pi)({},e),{onWatchUpdated:function(e,t){var r=l.call(this,e,t);return!1!==r&&d.delete(e),r}})),d.size&&d.forEach(function(e){return r.maybeBroadcastWatch.dirty(e)})):this.broadcastWatches(e),t},t.prototype.performTransaction=function(e,t){return this.batch({update:e,optimistic:t||null!==t})},t.prototype.transformDocument=function(e){return this.addTypenameToDocument(this.addFragmentsToDocument(e))},t.prototype.broadcastWatches=function(e){var t=this;this.txCount||this.watches.forEach(function(r){return t.maybeBroadcastWatch(r,e)})},t.prototype.addFragmentsToDocument=function(e){var t=this.config.fragments;return t?t.transform(e):e},t.prototype.addTypenameToDocument=function(e){return this.addTypename?this.addTypenameTransform.transformDocument(e):e},t.prototype.broadcastWatch=function(e,t){var r=e.lastDiff,n=this.diff(e);(!t||(e.optimistic&&"string"==typeof t.optimistic&&(n.fromOptimisticTransaction=!0),!t.onWatchUpdated||!1!==t.onWatchUpdated.call(this,e,n,r)))&&(r&&(0,a.D)(r.result,n.result)||e.callback(e.lastDiff=n,r))},t}(c);!1!==globalThis.__DEV__&&(eD.prototype.getMemoryInternals=d.q4)},94315:function(e,t,r){"use strict";r.d(t,{QS:function(){return u},_v:function(){return l},ab:function(){return i},li:function(){return s}});var n=r(64571),i=new n.g7,o=new WeakMap;function a(e){var t=o.get(e);return t||o.set(e,t={vars:new Set,dep:(0,n.dP)()}),t}function s(e){a(e).vars.forEach(function(t){return t.forgetCache(e)})}function l(e){a(e).vars.forEach(function(t){return t.attachCache(e)})}function u(e){var t=new Set,r=new Set,n=function(s){if(arguments.length>0){if(e!==s){e=s,t.forEach(function(e){a(e).dep.dirty(n),d(e)});var l=Array.from(r);r.clear(),l.forEach(function(t){return t(e)})}}else{var u=i.getValue();u&&(o(u),a(u).dep(n))}return e};n.onNextChange=function(e){return r.add(e),function(){r.delete(e)}};var o=n.attachCache=function(e){return t.add(e),a(e).vars.add(n),n};return n.forgetCache=function(e){return t.delete(e)},n}function d(e){e.broadcastWatches&&e.broadcastWatches()}},42680:function(e,t,r){"use strict";r.d(t,{f:function(){return tm}});var n,i=r(69703),o=r(71074);function a(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=s(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function s(e,t){if(e){if("string"==typeof e)return l(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return l(e,t)}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r1,i=!1,o=arguments[1],a=o;return new r(function(r){return t.subscribe({next:function(t){var o=!i;if(i=!0,!o||n)try{a=e(a,t)}catch(e){return r.error(e)}else a=t},error:function(e){r.error(e)},complete:function(){if(!i&&!n)return r.error(TypeError("Cannot reduce an empty sequence"));r.next(a),r.complete()}})})},t.concat=function(){for(var e=this,t=arguments.length,r=Array(t),n=0;n=0&&i.splice(e,1),a()}});i.push(o)},error:function(e){n.error(e)},complete:function(){a()}});function a(){o.closed&&0===i.length&&n.complete()}return function(){i.forEach(function(e){return e.unsubscribe()}),o.unsubscribe()}})},t[g]=function(){return this},e.from=function(t){var r="function"==typeof this?this:e;if(null==t)throw TypeError(t+" is not an object");var n=y(t,g);if(n){var i=n.call(t);if(Object(i)!==i)throw TypeError(i+" is not an object");return b(i)&&i.constructor===r?i:new r(function(e){return i.subscribe(e)})}if(p("iterator")&&(n=y(t,h)))return new r(function(e){w(function(){if(!e.closed){for(var r,i=a(n.call(t));!(r=i()).done;){var o=r.value;if(e.next(o),e.closed)return}e.complete()}})});if(Array.isArray(t))return new r(function(e){w(function(){if(!e.closed){for(var r=0;rt.indexOf(i))throw(0,o._K)(43,i)}return e}function C(e,t){return t?t(e):E.of()}function M(e){return"function"==typeof e?new U(e):e}function D(e){return e.request.length<=1}var U=function(){function e(e){e&&(this.request=e)}return e.empty=function(){return new e(function(){return E.of()})},e.from=function(t){return 0===t.length?e.empty():t.map(M).reduce(function(e,t){return e.concat(t)})},e.split=function(t,r,n){var i,o=M(r),a=M(n||new e(C));return Object.assign(i=new e(D(o)&&D(a)?function(e){return t(e)?o.request(e)||E.of():a.request(e)||E.of()}:function(e,r){return t(e)?o.request(e,r)||E.of():a.request(e,r)||E.of()}),{left:o,right:a})},e.execute=function(e,t){return e.request(T(t.context,x(B(t))))||E.of()},e.concat=function(t,r){var n,i=M(t);if(D(i))return!1!==globalThis.__DEV__&&o.kG.warn(35,i),i;var a=M(r);return Object.assign(n=new e(D(a)?function(e){return i.request(e,function(e){return a.request(e)||E.of()})||E.of()}:function(e,t){return i.request(e,function(e){return a.request(e,t)||E.of()})||E.of()}),{left:i,right:a})},e.prototype.split=function(t,r,n){return this.concat(e.split(t,r,n||new e(C)))},e.prototype.concat=function(t){return e.concat(this,t)},e.prototype.request=function(e,t){throw(0,o._K)(36)},e.prototype.onError=function(e,t){if(t&&t.error)return t.error(e),!1;throw e},e.prototype.setOnError=function(e){return this.onError=e,this},e}(),J=U.execute,j=r(87755),H=r(88403),q=function(e,t){var r;try{r=JSON.stringify(e)}catch(e){var n=(0,o._K)(39,t,e.message);throw n.parseError=e,n}return r},L=function(e,t){return e.getContext().uri||("function"==typeof t?t(e):t||"/graphql")},F=r(44022);function V(e){var t,r=e[Symbol.asyncIterator]();return(t={next:function(){return r.next()}})[Symbol.asyncIterator]=function(){return this},t}function z(e){var t=null,r=null,n=!1,i=[],o=[];function a(e){if(!r){if(o.length){var t=o.shift();if(Array.isArray(t)&&t[0])return t[0]({value:e,done:!1})}i.push(e)}}function s(e){r=e,o.slice().forEach(function(t){t[1](e)}),t&&t()}function l(){n=!0,o.slice().forEach(function(e){e[0]({value:void 0,done:!0})}),t&&t()}function u(){return new Promise(function(e,t){return r?t(r):i.length?e({value:i.shift(),done:!1}):n?e({value:void 0,done:!0}):void o.push([e,t])})}t=function(){t=null,e.removeListener("data",a),e.removeListener("error",s),e.removeListener("end",l),e.removeListener("finish",l),e.removeListener("close",l)},e.on("data",a),e.on("error",s),e.on("end",l),e.on("finish",l),e.on("close",l);var d={next:function(){return u()}};return F.DN&&(d[Symbol.asyncIterator]=function(){return this}),d}function W(e){var t=!1,r={next:function(){return t?Promise.resolve({value:void 0,done:!0}):(t=!0,new Promise(function(t,r){e.then(function(e){t({value:e,done:!1})}).catch(r)}))}};return F.DN&&(r[Symbol.asyncIterator]=function(){return this}),r}function Q(e){var t={next:function(){return e.read()}};return F.DN&&(t[Symbol.asyncIterator]=function(){return this}),t}function G(e){return!!e.body}function K(e){return!!e.getReader}function Y(e){return!!(F.DN&&e[Symbol.asyncIterator])}function Z(e){return!!e.stream}function X(e){return!!e.arrayBuffer}function $(e){return!!e.pipe}function ee(e){var t=e;if(G(e)&&(t=e.body),Y(t))return V(t);if(K(t))return Q(t.getReader());if(Z(t))return Q(t.stream().getReader());if(X(t))return W(t.arrayBuffer());if($(t))return z(t);throw Error("Unknown body type for responseIterator. Please pass a streamable response.")}var et=function(e,t,r){var n=Error(r);throw n.name="ServerError",n.response=e,n.statusCode=e.status,n.result=t,n},er=r(25004),en=Symbol();function ei(e){return!!e.extensions&&Array.isArray(e.extensions[en])}function eo(e){return e.hasOwnProperty("graphQLErrors")}var ea=function(e){var t=(0,i.ev)((0,i.ev)((0,i.ev)([],e.graphQLErrors,!0),e.clientErrors,!0),e.protocolErrors,!0);return e.networkError&&t.push(e.networkError),t.map(function(e){return(0,er.s)(e)&&e.message||"Error message not found."}).join("\n")},es=function(e){function t(r){var n=r.graphQLErrors,i=r.protocolErrors,o=r.clientErrors,a=r.networkError,s=r.errorMessage,l=r.extraInfo,u=e.call(this,s)||this;return u.name="ApolloError",u.graphQLErrors=n||[],u.protocolErrors=i||[],u.clientErrors=o||[],u.networkError=a||null,u.message=s||ea(u),u.extraInfo=l,u.__proto__=t.prototype,u}return(0,i.ZT)(t,e),t}(Error),el=r(26406),eu=r(23505);function ed(e){return"incremental"in e}function ec(e){return"hasNext"in e&&"data"in e}function ep(e){return ed(e)||ec(e)}function ef(e){return(0,er.s)(e)&&"payload"in e}function eh(e,t){var r=e,n=new eu.w0;return ed(t)&&(0,el.O)(t.incremental)&&t.incremental.forEach(function(e){for(var t=e.data,i=e.path,o=i.length-1;o>=0;--o){var a=i[o],s=isNaN(+a)?{}:[];s[a]=t,t=s}r=n.merge(r,t)}),r}var eg=Object.prototype.hasOwnProperty;function em(e,t){var r;return(0,i.mG)(this,void 0,void 0,function(){var n,o,a,s,l,u,d,c,p,f,h,g,m,y,v,b,S,w,_,k,O,P;return(0,i.Jh)(this,function(A){switch(A.label){case 0:if(void 0===TextDecoder)throw Error("TextDecoder must be defined in the environment: please import a polyfill.");n=new TextDecoder("utf-8"),o=null===(r=e.headers)||void 0===r?void 0:r.get("content-type"),a="boundary=",s=(null==o?void 0:o.includes(a))?null==o?void 0:o.substring((null==o?void 0:o.indexOf(a))+a.length).replace(/['"]/g,"").replace(/\;(.*)/gm,"").trim():"-",l="\r\n--".concat(s),u="",d=ee(e),c=!0,A.label=1;case 1:if(!c)return[3,3];return[4,d.next()];case 2:for(f=(p=A.sent()).value,h=p.done,g="string"==typeof f?f:n.decode(f),m=u.length-l.length+1,c=!h,u+=g,y=u.indexOf(l,m);y>-1;){if(v=void 0,v=(O=[u.slice(0,y),u.slice(y+l.length)])[0],u=O[1],b=v.indexOf("\r\n\r\n"),(S=ey(v.slice(0,b))["content-type"])&&-1===S.toLowerCase().indexOf("application/json"))throw Error("Unsupported patch content type: application/json is required.");if(w=v.slice(b)){if(Object.keys(_=ev(e,w)).length>1||"data"in _||"incremental"in _||"errors"in _||"payload"in _)ef(_)?(k={},"payload"in _&&(k=(0,i.pi)({},_.payload)),"errors"in _&&(k=(0,i.pi)((0,i.pi)({},k),{extensions:(0,i.pi)((0,i.pi)({},"extensions"in k?k.extensions:null),((P={})[en]=_.errors,P))})),t(k)):t(_);else if(1===Object.keys(_).length&&"hasNext"in _&&!_.hasNext)return[2]}y=u.indexOf(l)}return[3,1];case 3:return[2]}})})}function ey(e){var t={};return e.split("\n").forEach(function(e){var r=e.indexOf(":");if(r>-1){var n=e.slice(0,r).trim().toLowerCase(),i=e.slice(r+1).trim();t[n]=i}}),t}function ev(e,t){e.status>=300&&et(e,function(){try{return JSON.parse(t)}catch(e){return t}}(),"Response not successful: Received status code ".concat(e.status));try{return JSON.parse(t)}catch(n){var r=n;throw r.name="ServerParseError",r.response=e,r.statusCode=e.status,r.bodyText=t,r}}function eb(e,t){e.result&&e.result.errors&&e.result.data&&t.next(e.result),t.error(e)}function eS(e){return function(t){return t.text().then(function(e){return ev(t,e)}).then(function(r){return Array.isArray(r)||eg.call(r,"data")||eg.call(r,"errors")||et(t,r,"Server response was missing for query '".concat(Array.isArray(e)?e.map(function(e){return e.operationName}):e.operationName,"'.")),r})}}var ew=function(e){if(!e&&"undefined"==typeof fetch)throw(0,o._K)(37)},e_=r(92298),ek={http:{includeQuery:!0,includeExtensions:!1,preserveHeaderCase:!1},headers:{accept:"*/*","content-type":"application/json"},options:{method:"POST"}},eO=function(e,t){return t(e)};function eP(e,t){for(var r=[],n=2;n0},t.prototype.tearDownQuery=function(){this.isTornDown||(this.concast&&this.observer&&(this.concast.removeObserver(this.observer),delete this.concast,delete this.observer),this.stopPolling(),this.subscriptions.forEach(function(e){return e.unsubscribe()}),this.subscriptions.clear(),this.queryManager.stopQuery(this.queryId),this.observers.clear(),this.isTornDown=!0)},t.prototype.transformDocument=function(e){return this.queryManager.transform(e)},t}(E);function e6(e){var t=e.options,r=t.fetchPolicy,n=t.nextFetchPolicy;return"cache-and-network"===r||"network-only"===r?e.reobserve({fetchPolicy:"cache-first",nextFetchPolicy:function(e,t){return(this.nextFetchPolicy=n,"function"==typeof this.nextFetchPolicy)?this.nextFetchPolicy(e,t):r}}):e.reobserve()}function e4(e){!1!==globalThis.__DEV__&&o.kG.error(23,e.message,e.stack)}function e8(e){!1!==globalThis.__DEV__&&e&&!1!==globalThis.__DEV__&&o.kG.debug(24,e)}function e5(e){return"network-only"===e||"no-cache"===e||"standby"===e}eV(e3);var e7=r(11258);function e9(e){return e.kind===e7.h.FIELD||e.kind===e7.h.FRAGMENT_SPREAD||e.kind===e7.h.INLINE_FRAGMENT}var te=r(94315),tt=function(){function e(e){var t=e.cache,r=e.client,n=e.resolvers,i=e.fragmentMatcher;this.selectionsToResolveCache=new WeakMap,this.cache=t,r&&(this.client=r),n&&this.addResolvers(n),i&&this.setFragmentMatcher(i)}return e.prototype.addResolvers=function(e){var t=this;this.resolvers=this.resolvers||{},Array.isArray(e)?e.forEach(function(e){t.resolvers=(0,eu.Ee)(t.resolvers,e)}):this.resolvers=(0,eu.Ee)(this.resolvers,e)},e.prototype.setResolvers=function(e){this.resolvers={},this.addResolvers(e)},e.prototype.getResolvers=function(){return this.resolvers||{}},e.prototype.runResolvers=function(e){var t=e.document,r=e.remoteResult,n=e.context,o=e.variables,a=e.onlyRunForcedResolvers,s=void 0!==a&&a;return(0,i.mG)(this,void 0,void 0,function(){return(0,i.Jh)(this,function(e){return t?[2,this.resolveDocument(t,r.data,n,o,this.fragmentMatcher,s).then(function(e){return(0,i.pi)((0,i.pi)({},r),{data:e.result})})]:[2,r]})})},e.prototype.setFragmentMatcher=function(e){this.fragmentMatcher=e},e.prototype.getFragmentMatcher=function(){return this.fragmentMatcher},e.prototype.clientQuery=function(e){return(0,H.FS)(["client"],e)&&this.resolvers?e:null},e.prototype.serverQuery=function(e){return(0,eN.ob)(e)},e.prototype.prepareContext=function(e){var t=this.cache;return(0,i.pi)((0,i.pi)({},e),{cache:t,getCacheKey:function(e){return t.identify(e)}})},e.prototype.addExportedVariables=function(e,t,r){return void 0===t&&(t={}),void 0===r&&(r={}),(0,i.mG)(this,void 0,void 0,function(){return(0,i.Jh)(this,function(n){return e?[2,this.resolveDocument(e,this.buildRootValueFromCache(e,t)||{},this.prepareContext(r),t).then(function(e){return(0,i.pi)((0,i.pi)({},t),e.exportedVariables)})]:[2,(0,i.pi)({},t)]})})},e.prototype.shouldForceResolvers=function(e){var t=!1;return(0,eE.Vn)(e,{Directive:{enter:function(e){if("client"===e.name.value&&e.arguments&&(t=e.arguments.some(function(e){return"always"===e.name.value&&"BooleanValue"===e.value.kind&&!0===e.value.value})))return eE.$_}}}),t},e.prototype.buildRootValueFromCache=function(e,t){return this.cache.diff({query:(0,eN.aL)(e),variables:t,returnPartialData:!0,optimistic:!1}).result},e.prototype.resolveDocument=function(e,t,r,n,o,a){return void 0===r&&(r={}),void 0===n&&(n={}),void 0===o&&(o=function(){return!0}),void 0===a&&(a=!1),(0,i.mG)(this,void 0,void 0,function(){var s,l,u,d,c,p,f,h,g,m,y;return(0,i.Jh)(this,function(v){return s=(0,N.p$)(e),l=(0,N.kU)(e),u=(0,eY.F)(l),d=this.collectSelectionsToResolve(s,u),p=(c=s.operation)?c.charAt(0).toUpperCase()+c.slice(1):"Query",f=this,h=f.cache,g=f.client,m={fragmentMap:u,context:(0,i.pi)((0,i.pi)({},r),{cache:h,client:g}),variables:n,fragmentMatcher:o,defaultOperationType:p,exportedVariables:{},selectionsToResolve:d,onlyRunForcedResolvers:a},y=!1,[2,this.resolveSelectionSet(s.selectionSet,y,t,m).then(function(e){return{result:e,exportedVariables:m.exportedVariables}})]})})},e.prototype.resolveSelectionSet=function(e,t,r,n){return(0,i.mG)(this,void 0,void 0,function(){var a,s,l,u,d,c=this;return(0,i.Jh)(this,function(p){return a=n.fragmentMap,s=n.context,l=n.variables,u=[r],d=function(e){return(0,i.mG)(c,void 0,void 0,function(){var d,c;return(0,i.Jh)(this,function(i){return(t||n.selectionsToResolve.has(e))&&(0,H.LZ)(e,l)?(0,eq.My)(e)?[2,this.resolveField(e,t,r,n).then(function(t){var r;void 0!==t&&u.push(((r={})[(0,eq.u2)(e)]=t,r))})]:((0,eq.Ao)(e)?d=e:(d=a[e.name.value],(0,o.kG)(d,18,e.name.value)),d&&d.typeCondition&&(c=d.typeCondition.name.value,n.fragmentMatcher(r,c,s)))?[2,this.resolveSelectionSet(d.selectionSet,t,r,n).then(function(e){u.push(e)})]:[2]:[2]})})},[2,Promise.all(e.selections.map(d)).then(function(){return(0,eu.bw)(u)})]})})},e.prototype.resolveField=function(e,t,r,n){return(0,i.mG)(this,void 0,void 0,function(){var o,a,s,l,u,d,c,p,f,h=this;return(0,i.Jh)(this,function(i){return r?(o=n.variables,l=(a=e.name.value)!==(s=(0,eq.u2)(e)),d=Promise.resolve(u=r[s]||r[a]),(!n.onlyRunForcedResolvers||this.shouldForceResolvers(e))&&(c=r.__typename||n.defaultOperationType,(p=this.resolvers&&this.resolvers[c])&&(f=p[l?a:s])&&(d=Promise.resolve(te.ab.withValue(this.cache,f,[r,(0,eq.NC)(e,o),n.context,{field:e,fragmentMap:n.fragmentMap}])))),[2,d.then(function(r){if(void 0===r&&(r=u),e.directives&&e.directives.forEach(function(e){"export"===e.name.value&&e.arguments&&e.arguments.forEach(function(e){"as"===e.name.value&&"StringValue"===e.value.kind&&(n.exportedVariables[e.value.value]=r)})}),!e.selectionSet||null==r)return r;var i,o,a=null!==(o=null===(i=e.directives)||void 0===i?void 0:i.some(function(e){return"client"===e.name.value}))&&void 0!==o&&o;return Array.isArray(r)?h.resolveSubSelectedArray(e,t||a,r,n):e.selectionSet?h.resolveSelectionSet(e.selectionSet,t||a,r,n):void 0})]):[2,null]})})},e.prototype.resolveSubSelectedArray=function(e,t,r,n){var i=this;return Promise.all(r.map(function(r){return null===r?null:Array.isArray(r)?i.resolveSubSelectedArray(e,t,r,n):e.selectionSet?i.resolveSelectionSet(e.selectionSet,t,r,n):void 0}))},e.prototype.collectSelectionsToResolve=function(e,t){var r=function(e){return!Array.isArray(e)},n=this.selectionsToResolveCache;function i(e){if(!n.has(e)){var a=new Set;n.set(e,a),(0,eE.Vn)(e,{Directive:function(e,t,n,i,o){"client"===e.name.value&&o.forEach(function(e){r(e)&&e9(e)&&a.add(e)})},FragmentSpread:function(e,n,s,l,u){var d=t[e.name.value];(0,o.kG)(d,19,e.name.value);var c=i(d);c.size>0&&(u.forEach(function(e){r(e)&&e9(e)&&a.add(e)}),a.add(e),c.forEach(function(e){a.add(e)}))}})}return n.get(e)}return i(e)},e}(),tr=new(F.mr?WeakMap:Map);function tn(e,t){var r=e[t];"function"==typeof r&&(e[t]=function(){return tr.set(e,(tr.get(e)+1)%1e15),r.apply(this,arguments)})}function ti(e){e.notifyTimeout&&(clearTimeout(e.notifyTimeout),e.notifyTimeout=void 0)}var to=function(){function e(e,t){void 0===t&&(t=e.generateQueryId()),this.queryId=t,this.listeners=new Set,this.document=null,this.lastRequestId=1,this.stopped=!1,this.dirty=!1,this.observableQuery=null;var r=this.cache=e.cache;tr.has(r)||(tr.set(r,0),tn(r,"evict"),tn(r,"modify"),tn(r,"reset"))}return e.prototype.init=function(e){var t=e.networkStatus||n.loading;return this.variables&&this.networkStatus!==n.loading&&!(0,eM.D)(this.variables,e.variables)&&(t=n.setVariables),(0,eM.D)(e.variables,this.variables)||(this.lastDiff=void 0),Object.assign(this,{document:e.document,variables:e.variables,networkError:null,graphQLErrors:this.graphQLErrors||[],networkStatus:t}),e.observableQuery&&this.setObservableQuery(e.observableQuery),e.lastRequestId&&(this.lastRequestId=e.lastRequestId),this},e.prototype.reset=function(){ti(this),this.dirty=!1},e.prototype.resetDiff=function(){this.lastDiff=void 0},e.prototype.getDiff=function(){var e=this.getDiffOptions();if(this.lastDiff&&(0,eM.D)(e,this.lastDiff.options))return this.lastDiff.diff;this.updateWatch(this.variables);var t=this.observableQuery;if(t&&"no-cache"===t.options.fetchPolicy)return{complete:!1};var r=this.cache.diff(e);return this.updateLastDiff(r,e),r},e.prototype.updateLastDiff=function(e,t){this.lastDiff=e?{diff:e,options:t||this.getDiffOptions()}:void 0},e.prototype.getDiffOptions=function(e){var t;return void 0===e&&(e=this.variables),{query:this.document,variables:e,returnPartialData:!0,optimistic:!0,canonizeResults:null===(t=this.observableQuery)||void 0===t?void 0:t.options.canonizeResults}},e.prototype.setDiff=function(e){var t,r=this,n=this.lastDiff&&this.lastDiff.diff;(!e||e.complete||(null===(t=this.observableQuery)||void 0===t?void 0:t.options.returnPartialData)||n&&n.complete)&&(this.updateLastDiff(e),this.dirty||(0,eM.D)(n&&n.result,e&&e.result)||(this.dirty=!0,this.notifyTimeout||(this.notifyTimeout=setTimeout(function(){return r.notify()},0))))},e.prototype.setObservableQuery=function(e){var t=this;e!==this.observableQuery&&(this.oqListener&&this.listeners.delete(this.oqListener),this.observableQuery=e,e?(e.queryInfo=this,this.listeners.add(this.oqListener=function(){t.getDiff().fromOptimisticTransaction?e.observe():e6(e)})):delete this.oqListener)},e.prototype.notify=function(){var e=this;ti(this),this.shouldNotify()&&this.listeners.forEach(function(t){return t(e)}),this.dirty=!1},e.prototype.shouldNotify=function(){if(!this.dirty||!this.listeners.size)return!1;if(eQ(this.networkStatus)&&this.observableQuery){var e=this.observableQuery.options.fetchPolicy;if("cache-only"!==e&&"cache-and-network"!==e)return!1}return!0},e.prototype.stop=function(){if(!this.stopped){this.stopped=!0,this.reset(),this.cancel(),this.cancel=e.prototype.cancel;var t=this.observableQuery;t&&t.stopPolling()}},e.prototype.cancel=function(){},e.prototype.updateWatch=function(e){var t=this;void 0===e&&(e=this.variables);var r=this.observableQuery;if(!r||"no-cache"!==r.options.fetchPolicy){var n=(0,i.pi)((0,i.pi)({},this.getDiffOptions(e)),{watcher:this,callback:function(e){return t.setDiff(e)}});this.lastWatch&&(0,eM.D)(n,this.lastWatch)||(this.cancel(),this.cancel=this.cache.watch(this.lastWatch=n))}},e.prototype.resetLastWrite=function(){this.lastWrite=void 0},e.prototype.shouldWrite=function(e,t){var r=this.lastWrite;return!(r&&r.dmCount===tr.get(this.cache)&&(0,eM.D)(t,r.variables)&&(0,eM.D)(e.data,r.result.data))},e.prototype.markResult=function(e,t,r,n){var i=this,o=new eu.w0,a=(0,el.O)(e.errors)?e.errors.slice(0):[];if(this.reset(),"incremental"in e&&(0,el.O)(e.incremental)){var s=eh(this.getDiff().result,e);e.data=s}else if("hasNext"in e&&e.hasNext){var l=this.getDiff();e.data=o.merge(l.result,e.data)}this.graphQLErrors=a,"no-cache"===r.fetchPolicy?this.updateLastDiff({result:e.data,complete:!0},this.getDiffOptions(r.variables)):0!==n&&(ta(e,r.errorPolicy)?this.cache.performTransaction(function(o){if(i.shouldWrite(e,r.variables))o.writeQuery({query:t,data:e.data,variables:r.variables,overwrite:1===n}),i.lastWrite={result:e,variables:r.variables,dmCount:tr.get(i.cache)};else if(i.lastDiff&&i.lastDiff.diff.complete){e.data=i.lastDiff.diff.result;return}var a=i.getDiffOptions(r.variables),s=o.diff(a);!i.stopped&&(0,eM.D)(i.variables,r.variables)&&i.updateWatch(r.variables),i.updateLastDiff(s,a),s.complete&&(e.data=s.result)}):this.lastWrite=void 0)},e.prototype.markReady=function(){return this.networkError=null,this.networkStatus=n.ready},e.prototype.markError=function(e){return this.networkStatus=n.error,this.lastWrite=void 0,this.reset(),e.graphQLErrors&&(this.graphQLErrors=e.graphQLErrors),e.networkError&&(this.networkError=e.networkError),e},e}();function ta(e,t){void 0===t&&(t="none");var r="ignore"===t||"all"===t,n=!ej(e);return!n&&r&&e.data&&(n=!0),n}var ts=r(60430),tl=r(40997),tu=r(56596),td=Object.prototype.hasOwnProperty,tc=Object.create(null),tp=function(){function e(e){var t=e.cache,r=e.link,n=e.defaultOptions,i=e.documentTransform,o=e.queryDeduplication,a=void 0!==o&&o,s=e.onBroadcast,l=e.ssrMode,u=void 0!==l&&l,d=e.clientAwareness,c=void 0===d?{}:d,p=e.localState,f=e.assumeImmutableResults,h=void 0===f?!!t.assumeImmutableResults:f,g=e.defaultContext,m=this;this.clientAwareness={},this.queries=new Map,this.fetchCancelFns=new Map,this.transformCache=new tl.s(tu.Q["queryManager.getDocumentInfo"]||2e3),this.queryIdCounter=1,this.requestIdCounter=1,this.mutationIdCounter=1,this.inFlightLinkObservables=new ts.B(!1);var y=new eU.A(function(e){return m.cache.transformDocument(e)},{cache:!1});this.cache=t,this.link=r,this.defaultOptions=n||Object.create(null),this.queryDeduplication=a,this.clientAwareness=c,this.localState=p||new tt({cache:t}),this.ssrMode=u,this.assumeImmutableResults=h,this.documentTransform=i?y.concat(i).concat(y):y,this.defaultContext=g||Object.create(null),(this.onBroadcast=s)&&(this.mutationStore=Object.create(null))}return e.prototype.stop=function(){var e=this;this.queries.forEach(function(t,r){e.stopQueryNoBroadcast(r)}),this.cancelPendingFetches((0,o._K)(25))},e.prototype.cancelPendingFetches=function(e){this.fetchCancelFns.forEach(function(t){return t(e)}),this.fetchCancelFns.clear()},e.prototype.mutate=function(e){var t,r,n=e.mutation,a=e.variables,s=e.optimisticResponse,l=e.updateQueries,u=e.refetchQueries,d=void 0===u?[]:u,c=e.awaitRefetchQueries,p=void 0!==c&&c,f=e.update,h=e.onQueryUpdated,g=e.fetchPolicy,m=void 0===g?(null===(t=this.defaultOptions.mutate)||void 0===t?void 0:t.fetchPolicy)||"network-only":g,y=e.errorPolicy,v=void 0===y?(null===(r=this.defaultOptions.mutate)||void 0===r?void 0:r.errorPolicy)||"none":y,b=e.keepRootFields,S=e.context;return(0,i.mG)(this,void 0,void 0,function(){var e,t,r,u,c;return(0,i.Jh)(this,function(g){switch(g.label){case 0:if((0,o.kG)(n,26),(0,o.kG)("network-only"===m||"no-cache"===m,27),e=this.generateMutationId(),n=this.cache.transformForLink(this.transform(n)),t=this.getDocumentInfo(n).hasClientExports,a=this.getVariables(n,a),!t)return[3,2];return[4,this.localState.addExportedVariables(n,a,S)];case 1:a=g.sent(),g.label=2;case 2:return r=this.mutationStore&&(this.mutationStore[e]={mutation:n,variables:a,loading:!0,error:null}),u=s&&this.markMutationOptimistic(s,{mutationId:e,document:n,variables:a,fetchPolicy:m,errorPolicy:v,context:S,updateQueries:l,update:f,keepRootFields:b}),this.broadcastQueries(),c=this,[2,new Promise(function(t,o){return eJ(c.getObservableFromLink(n,(0,i.pi)((0,i.pi)({},S),{optimisticResponse:u?s:void 0}),a,!1),function(t){if(ej(t)&&"none"===v)throw new es({graphQLErrors:eH(t)});r&&(r.loading=!1,r.error=null);var o=(0,i.pi)({},t);return"function"==typeof d&&(d=d(o)),"ignore"===v&&ej(o)&&delete o.errors,c.markMutationResult({mutationId:e,result:o,document:n,variables:a,fetchPolicy:m,errorPolicy:v,context:S,update:f,updateQueries:l,awaitRefetchQueries:p,refetchQueries:d,removeOptimistic:u?e:void 0,onQueryUpdated:h,keepRootFields:b})}).subscribe({next:function(e){c.broadcastQueries(),"hasNext"in e&&!1!==e.hasNext||t(e)},error:function(t){r&&(r.loading=!1,r.error=t),u&&c.cache.removeOptimistic(e),c.broadcastQueries(),o(t instanceof es?t:new es({networkError:t}))}})})]}})})},e.prototype.markMutationResult=function(e,t){var r=this;void 0===t&&(t=this.cache);var n=e.result,o=[],a="no-cache"===e.fetchPolicy;if(!a&&ta(n,e.errorPolicy)){if(ed(n)||o.push({result:n.data,dataId:"ROOT_MUTATION",query:e.document,variables:e.variables}),ed(n)&&(0,el.O)(n.incremental)){var s=t.diff({id:"ROOT_MUTATION",query:this.getDocumentInfo(e.document).asQuery,variables:e.variables,optimistic:!1,returnPartialData:!0}),l=void 0;s.result&&(l=eh(s.result,n)),void 0!==l&&(n.data=l,o.push({result:l,dataId:"ROOT_MUTATION",query:e.document,variables:e.variables}))}var u=e.updateQueries;u&&this.queries.forEach(function(e,i){var a=e.observableQuery,s=a&&a.queryName;if(s&&td.call(u,s)){var l=u[s],d=r.queries.get(i),c=d.document,p=d.variables,f=t.diff({query:c,variables:p,returnPartialData:!0,optimistic:!1}),h=f.result;if(f.complete&&h){var g=l(h,{mutationResult:n,queryName:c&&(0,N.rY)(c)||void 0,queryVariables:p});g&&o.push({result:g,dataId:"ROOT_QUERY",query:c,variables:p})}}})}if(o.length>0||(e.refetchQueries||"").length>0||e.update||e.onQueryUpdated||e.removeOptimistic){var d=[];if(this.refetchQueries({updateCache:function(t){a||o.forEach(function(e){return t.write(e)});var s=e.update,l=!ep(n)||ed(n)&&!n.hasNext;if(s){if(!a){var u=t.diff({id:"ROOT_MUTATION",query:r.getDocumentInfo(e.document).asQuery,variables:e.variables,optimistic:!1,returnPartialData:!0});u.complete&&("incremental"in(n=(0,i.pi)((0,i.pi)({},n),{data:u.result}))&&delete n.incremental,"hasNext"in n&&delete n.hasNext)}l&&s(t,n,{context:e.context,variables:e.variables})}a||e.keepRootFields||!l||t.modify({id:"ROOT_MUTATION",fields:function(e,t){var r=t.fieldName,n=t.DELETE;return"__typename"===r?e:n}})},include:e.refetchQueries,optimistic:!1,removeOptimistic:e.removeOptimistic,onQueryUpdated:e.onQueryUpdated||null}).forEach(function(e){return d.push(e)}),e.awaitRefetchQueries||e.onQueryUpdated)return Promise.all(d).then(function(){return n})}return Promise.resolve(n)},e.prototype.markMutationOptimistic=function(e,t){var r=this,n="function"==typeof e?e(t.variables,{IGNORE:tc}):e;return n!==tc&&(this.cache.recordOptimisticTransaction(function(e){try{r.markMutationResult((0,i.pi)((0,i.pi)({},t),{result:{data:n}}),e)}catch(e){!1!==globalThis.__DEV__&&o.kG.error(e)}},t.mutationId),!0)},e.prototype.fetchQuery=function(e,t,r){return this.fetchConcastWithInfo(e,t,r).concast.promise},e.prototype.getQueryStore=function(){var e=Object.create(null);return this.queries.forEach(function(t,r){e[r]={variables:t.variables,networkStatus:t.networkStatus,networkError:t.networkError,graphQLErrors:t.graphQLErrors}}),e},e.prototype.resetErrors=function(e){var t=this.queries.get(e);t&&(t.networkError=void 0,t.graphQLErrors=[])},e.prototype.transform=function(e){return this.documentTransform.transformDocument(e)},e.prototype.getDocumentInfo=function(e){var t=this.transformCache;if(!t.has(e)){var r={hasClientExports:(0,H.mj)(e),hasForcedResolvers:this.localState.shouldForceResolvers(e),hasNonreactiveDirective:(0,H.FS)(["nonreactive"],e),clientQuery:this.localState.clientQuery(e),serverQuery:(0,eN.bi)([{name:"client",remove:!0},{name:"connection"},{name:"nonreactive"}],e),defaultVars:(0,N.O4)((0,N.$H)(e)),asQuery:(0,i.pi)((0,i.pi)({},e),{definitions:e.definitions.map(function(e){return"OperationDefinition"===e.kind&&"query"!==e.operation?(0,i.pi)((0,i.pi)({},e),{operation:"query"}):e})})};t.set(e,r)}return t.get(e)},e.prototype.getVariables=function(e,t){return(0,i.pi)((0,i.pi)({},this.getDocumentInfo(e).defaultVars),t)},e.prototype.watchQuery=function(e){var t=this.transform(e.query);void 0===(e=(0,i.pi)((0,i.pi)({},e),{variables:this.getVariables(t,e.variables)})).notifyOnNetworkStatusChange&&(e.notifyOnNetworkStatusChange=!1);var r=new to(this),n=new e3({queryManager:this,queryInfo:r,options:e});return n.lastQuery=t,this.queries.set(n.queryId,r),r.init({document:t,observableQuery:n,variables:n.variables}),n},e.prototype.query=function(e,t){var r=this;return void 0===t&&(t=this.generateQueryId()),(0,o.kG)(e.query,28),(0,o.kG)("Document"===e.query.kind,29),(0,o.kG)(!e.returnPartialData,30),(0,o.kG)(!e.pollInterval,31),this.fetchQuery(t,(0,i.pi)((0,i.pi)({},e),{query:this.transform(e.query)})).finally(function(){return r.stopQuery(t)})},e.prototype.generateQueryId=function(){return String(this.queryIdCounter++)},e.prototype.generateRequestId=function(){return this.requestIdCounter++},e.prototype.generateMutationId=function(){return String(this.mutationIdCounter++)},e.prototype.stopQueryInStore=function(e){this.stopQueryInStoreNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryInStoreNoBroadcast=function(e){var t=this.queries.get(e);t&&t.stop()},e.prototype.clearStore=function(e){return void 0===e&&(e={discardWatches:!0}),this.cancelPendingFetches((0,o._K)(32)),this.queries.forEach(function(e){e.observableQuery?e.networkStatus=n.loading:e.stop()}),this.mutationStore&&(this.mutationStore=Object.create(null)),this.cache.reset(e)},e.prototype.getObservableQueries=function(e){var t=this;void 0===e&&(e="active");var r=new Map,n=new Map,a=new Set;return Array.isArray(e)&&e.forEach(function(e){"string"==typeof e?n.set(e,!1):(0,eq.JW)(e)?n.set(t.transform(e),!1):(0,er.s)(e)&&e.query&&a.add(e)}),this.queries.forEach(function(t,i){var o=t.observableQuery,a=t.document;if(o){if("all"===e){r.set(i,o);return}var s=o.queryName;if("standby"===o.options.fetchPolicy||"active"===e&&!o.hasObservers())return;("active"===e||s&&n.has(s)||a&&n.has(a))&&(r.set(i,o),s&&n.set(s,!0),a&&n.set(a,!0))}}),a.size&&a.forEach(function(e){var n=(0,eL.X)("legacyOneTimeQuery"),a=t.getQuery(n).init({document:e.query,variables:e.variables}),s=new e3({queryManager:t,queryInfo:a,options:(0,i.pi)((0,i.pi)({},e),{fetchPolicy:"network-only"})});(0,o.kG)(s.queryId===n),a.setObservableQuery(s),r.set(n,s)}),!1!==globalThis.__DEV__&&n.size&&n.forEach(function(e,t){e||!1===globalThis.__DEV__||o.kG.warn("string"==typeof t?33:34,t)}),r},e.prototype.reFetchObservableQueries=function(e){var t=this;void 0===e&&(e=!1);var r=[];return this.getObservableQueries(e?"all":"active").forEach(function(n,i){var o=n.options.fetchPolicy;n.resetLastResults(),(e||"standby"!==o&&"cache-only"!==o)&&r.push(n.refetch()),t.getQuery(i).setDiff(null)}),this.broadcastQueries(),Promise.all(r)},e.prototype.setObservableQuery=function(e){this.getQuery(e.queryId).setObservableQuery(e)},e.prototype.startGraphQLSubscription=function(e){var t=this,r=e.query,n=e.fetchPolicy,i=e.errorPolicy,o=void 0===i?"none":i,a=e.variables,s=e.context,l=void 0===s?{}:s;r=this.transform(r),a=this.getVariables(r,a);var u=function(e){return t.getObservableFromLink(r,l,e).map(function(i){"no-cache"!==n&&(ta(i,o)&&t.cache.write({query:r,result:i.data,dataId:"ROOT_SUBSCRIPTION",variables:e}),t.broadcastQueries());var a=ej(i),s=ei(i);if(a||s){var l={};if(a&&(l.graphQLErrors=i.errors),s&&(l.protocolErrors=i.extensions[en]),"none"===o||s)throw new es(l)}return"ignore"===o&&delete i.errors,i})};if(this.getDocumentInfo(r).hasClientExports){var d=this.localState.addExportedVariables(r,a,l).then(u);return new E(function(e){var t=null;return d.then(function(r){return t=r.subscribe(e)},e.error),function(){return t&&t.unsubscribe()}})}return u(a)},e.prototype.stopQuery=function(e){this.stopQueryNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryNoBroadcast=function(e){this.stopQueryInStoreNoBroadcast(e),this.removeQuery(e)},e.prototype.removeQuery=function(e){this.fetchCancelFns.delete(e),this.queries.has(e)&&(this.getQuery(e).stop(),this.queries.delete(e))},e.prototype.broadcastQueries=function(){this.onBroadcast&&this.onBroadcast(),this.queries.forEach(function(e){return e.notify()})},e.prototype.getLocalState=function(){return this.localState},e.prototype.getObservableFromLink=function(e,t,r,n){var o,a,s=this;void 0===n&&(n=null!==(o=null==t?void 0:t.queryDeduplication)&&void 0!==o?o:this.queryDeduplication);var l=this.getDocumentInfo(e),u=l.serverQuery,d=l.clientQuery;if(u){var c=this,p=c.inFlightLinkObservables,f=c.link,h={query:u,variables:r,operationName:(0,N.rY)(u)||void 0,context:this.prepareContext((0,i.pi)((0,i.pi)({},t),{forceFetch:!n}))};if(t=h.context,n){var g=(0,e_.S)(u),m=(0,eD.B)(r),y=p.lookup(g,m);if(!(a=y.observable)){var v=new eW([J(f,h)]);a=y.observable=v,v.beforeNext(function(){p.remove(g,m)})}}else a=new eW([J(f,h)])}else a=new eW([E.of({data:{}})]),t=this.prepareContext(t);return d&&(a=eJ(a,function(e){return s.localState.runResolvers({document:d,remoteResult:e,context:t,variables:r})})),a},e.prototype.getResultsFromLink=function(e,t,r){var i=e.lastRequestId=this.generateRequestId(),o=this.cache.transformForLink(r.query);return eJ(this.getObservableFromLink(o,r.context,r.variables),function(a){var s=eH(a),l=s.length>0;if(i>=e.lastRequestId){if(l&&"none"===r.errorPolicy)throw e.markError(new es({graphQLErrors:s}));e.markResult(a,o,r,t),e.markReady()}var u={data:a.data,loading:!1,networkStatus:n.ready};return l&&"ignore"!==r.errorPolicy&&(u.errors=s,u.networkStatus=n.error),u},function(t){var r=eo(t)?t:new es({networkError:t});throw i>=e.lastRequestId&&e.markError(r),r})},e.prototype.fetchConcastWithInfo=function(e,t,r,i){var o,a,s=this;void 0===r&&(r=n.loading),void 0===i&&(i=t.query);var l=this.getVariables(i,t.variables),u=this.getQuery(e),d=this.defaultOptions.watchQuery,c=t.fetchPolicy,p=void 0===c?d&&d.fetchPolicy||"cache-first":c,f=t.errorPolicy,h=void 0===f?d&&d.errorPolicy||"none":f,g=t.returnPartialData,m=void 0!==g&&g,y=t.notifyOnNetworkStatusChange,v=void 0!==y&&y,b=t.context,S=Object.assign({},t,{query:i,variables:l,fetchPolicy:p,errorPolicy:h,returnPartialData:m,notifyOnNetworkStatusChange:v,context:void 0===b?{}:b}),w=function(e){S.variables=e;var n=s.fetchQueryByPolicy(u,S,r);return"standby"!==S.fetchPolicy&&n.sources.length>0&&u.observableQuery&&u.observableQuery.applyNextFetchPolicy("after-fetch",t),n},_=function(){return s.fetchCancelFns.delete(e)};if(this.fetchCancelFns.set(e,function(e){_(),setTimeout(function(){return o.cancel(e)})}),this.getDocumentInfo(S.query).hasClientExports)o=new eW(this.localState.addExportedVariables(S.query,S.variables,S.context).then(w).then(function(e){return e.sources})),a=!0;else{var k=w(S.variables);a=k.fromLink,o=new eW(k.sources)}return o.promise.then(_,_),{concast:o,fromLink:a}},e.prototype.refetchQueries=function(e){var t=this,r=e.updateCache,n=e.include,i=e.optimistic,o=void 0!==i&&i,a=e.removeOptimistic,s=void 0===a?o?(0,eL.X)("refetchQueries"):void 0:a,l=e.onQueryUpdated,u=new Map;n&&this.getObservableQueries(n).forEach(function(e,r){u.set(r,{oq:e,lastDiff:t.getQuery(r).getDiff()})});var d=new Map;return r&&this.cache.batch({update:r,optimistic:o&&s||!1,removeOptimistic:s,onWatchUpdated:function(e,t,r){var n=e.watcher instanceof to&&e.watcher.observableQuery;if(n){if(l){u.delete(n.queryId);var i=l(n,t,r);return!0===i&&(i=n.refetch()),!1!==i&&d.set(n,i),i}null!==l&&u.set(n.queryId,{oq:n,lastDiff:r,diff:t})}}}),u.size&&u.forEach(function(e,r){var n,i=e.oq,o=e.lastDiff,a=e.diff;if(l){if(!a){var s=i.queryInfo;s.reset(),a=s.getDiff()}n=l(i,a,o)}l&&!0!==n||(n=i.refetch()),!1!==n&&d.set(i,n),r.indexOf("legacyOneTimeQuery")>=0&&t.stopQueryNoBroadcast(r)}),s&&this.cache.removeOptimistic(s),d},e.prototype.fetchQueryByPolicy=function(e,t,r){var o=this,a=t.query,s=t.variables,l=t.fetchPolicy,u=t.refetchWritePolicy,d=t.errorPolicy,c=t.returnPartialData,p=t.context,f=t.notifyOnNetworkStatusChange,h=e.networkStatus;e.init({document:a,variables:s,networkStatus:r});var g=function(){return e.getDiff()},m=function(t,r){void 0===r&&(r=e.networkStatus||n.loading);var l=t.result;!1===globalThis.__DEV__||c||(0,eM.D)(l,{})||e8(t.missing);var u=function(e){return E.of((0,i.pi)({data:e,loading:eQ(r),networkStatus:r},t.complete?null:{partial:!0}))};return l&&o.getDocumentInfo(a).hasForcedResolvers?o.localState.runResolvers({document:a,remoteResult:{data:l},context:p,variables:s,onlyRunForcedResolvers:!0}).then(function(e){return u(e.data||void 0)}):"none"===d&&r===n.refetch&&Array.isArray(t.missing)?u(void 0):u(l)},y="no-cache"===l?0:r===n.refetch&&"merge"!==u?1:2,v=function(){return o.getResultsFromLink(e,y,{query:a,variables:s,context:p,fetchPolicy:l,errorPolicy:d})},b=f&&"number"==typeof h&&h!==r&&eQ(r);switch(l){default:case"cache-first":var S=g();if(S.complete)return{fromLink:!1,sources:[m(S,e.markReady())]};if(c||b)return{fromLink:!0,sources:[m(S),v()]};return{fromLink:!0,sources:[v()]};case"cache-and-network":var S=g();if(S.complete||c||b)return{fromLink:!0,sources:[m(S),v()]};return{fromLink:!0,sources:[v()]};case"cache-only":return{fromLink:!1,sources:[m(g(),e.markReady())]};case"network-only":if(b)return{fromLink:!0,sources:[m(g()),v()]};return{fromLink:!0,sources:[v()]};case"no-cache":if(b)return{fromLink:!0,sources:[m(e.getDiff()),v()]};return{fromLink:!0,sources:[v()]};case"standby":return{fromLink:!1,sources:[]}}},e.prototype.getQuery=function(e){return e&&!this.queries.has(e)&&this.queries.set(e,new to(this,e)),this.queries.get(e)},e.prototype.prepareContext=function(e){void 0===e&&(e={});var t=this.localState.prepareContext(e);return(0,i.pi)((0,i.pi)((0,i.pi)({},this.defaultContext),t),{clientAwareness:this.clientAwareness})},e}();function tf(e,t){return(0,eG.o)(e,t,t.variables&&{variables:(0,eG.o)((0,i.pi)((0,i.pi)({},e&&e.variables),t.variables))})}var th=r(22681),tg=!1,tm=function(){function e(e){var t=this;if(this.resetStoreCallbacks=[],this.clearStoreCallbacks=[],!e.cache)throw(0,o._K)(15);var r=e.uri,n=e.credentials,i=e.headers,a=e.cache,s=e.documentTransform,l=e.ssrMode,u=void 0!==l&&l,d=e.ssrForceFetchDelay,c=void 0===d?0:d,p=e.connectToDevTools,f=void 0===p?!window.__APOLLO_CLIENT__&&!1!==globalThis.__DEV__:p,h=e.queryDeduplication,g=void 0===h||h,m=e.defaultOptions,y=e.defaultContext,v=e.assumeImmutableResults,b=void 0===v?a.assumeImmutableResults:v,S=e.resolvers,w=e.typeDefs,_=e.fragmentMatcher,k=e.name,O=e.version,P=e.link;P||(P=r?new eC({uri:r,credentials:n,headers:i}):U.empty()),this.link=P,this.cache=a,this.disableNetworkFetches=u||c>0,this.queryDeduplication=g,this.defaultOptions=m||Object.create(null),this.typeDefs=w,c&&setTimeout(function(){return t.disableNetworkFetches=!1},c),this.watchQuery=this.watchQuery.bind(this),this.query=this.query.bind(this),this.mutate=this.mutate.bind(this),this.resetStore=this.resetStore.bind(this),this.reFetchObservableQueries=this.reFetchObservableQueries.bind(this),this.version=j.i,this.localState=new tt({cache:a,client:this,resolvers:S,fragmentMatcher:_}),this.queryManager=new tp({cache:this.cache,link:this.link,defaultOptions:this.defaultOptions,defaultContext:y,documentTransform:s,queryDeduplication:g,ssrMode:u,clientAwareness:{name:k,version:O},localState:this.localState,assumeImmutableResults:b,onBroadcast:f?function(){t.devToolsHookCb&&t.devToolsHookCb({action:{},state:{queries:t.queryManager.getQueryStore(),mutations:t.queryManager.mutationStore||{}},dataWithOptimisticResults:t.cache.extract(!0)})}:void 0}),f&&this.connectToDevTools()}return e.prototype.connectToDevTools=function(){var e=window,t=Symbol.for("apollo.devtools");(e[t]=e[t]||[]).push(this),e.__APOLLO_CLIENT__=this,tg||!1===globalThis.__DEV__||(tg=!0,setTimeout(function(){if(window.document&&window.top===window.self&&!window.__APOLLO_DEVTOOLS_GLOBAL_HOOK__){var e=window.navigator,t=e&&e.userAgent,r=void 0;"string"==typeof t&&(t.indexOf("Chrome/")>-1?r="https://chrome.google.com/webstore/detail/apollo-client-developer-t/jdkknkkbebbapilgoeccciglkfbmbnfm":t.indexOf("Firefox/")>-1&&(r="https://addons.mozilla.org/en-US/firefox/addon/apollo-developer-tools/")),r&&!1!==globalThis.__DEV__&&o.kG.log("Download the Apollo DevTools for a better development experience: %s",r)}},1e4))},Object.defineProperty(e.prototype,"documentTransform",{get:function(){return this.queryManager.documentTransform},enumerable:!1,configurable:!0}),e.prototype.stop=function(){this.queryManager.stop()},e.prototype.watchQuery=function(e){return this.defaultOptions.watchQuery&&(e=tf(this.defaultOptions.watchQuery,e)),this.disableNetworkFetches&&("network-only"===e.fetchPolicy||"cache-and-network"===e.fetchPolicy)&&(e=(0,i.pi)((0,i.pi)({},e),{fetchPolicy:"cache-first"})),this.queryManager.watchQuery(e)},e.prototype.query=function(e){return this.defaultOptions.query&&(e=tf(this.defaultOptions.query,e)),(0,o.kG)("cache-and-network"!==e.fetchPolicy,16),this.disableNetworkFetches&&"network-only"===e.fetchPolicy&&(e=(0,i.pi)((0,i.pi)({},e),{fetchPolicy:"cache-first"})),this.queryManager.query(e)},e.prototype.mutate=function(e){return this.defaultOptions.mutate&&(e=tf(this.defaultOptions.mutate,e)),this.queryManager.mutate(e)},e.prototype.subscribe=function(e){return this.queryManager.startGraphQLSubscription(e)},e.prototype.readQuery=function(e,t){return void 0===t&&(t=!1),this.cache.readQuery(e,t)},e.prototype.readFragment=function(e,t){return void 0===t&&(t=!1),this.cache.readFragment(e,t)},e.prototype.writeQuery=function(e){var t=this.cache.writeQuery(e);return!1!==e.broadcast&&this.queryManager.broadcastQueries(),t},e.prototype.writeFragment=function(e){var t=this.cache.writeFragment(e);return!1!==e.broadcast&&this.queryManager.broadcastQueries(),t},e.prototype.__actionHookForDevTools=function(e){this.devToolsHookCb=e},e.prototype.__requestRaw=function(e){return J(this.link,e)},e.prototype.resetStore=function(){var e=this;return Promise.resolve().then(function(){return e.queryManager.clearStore({discardWatches:!1})}).then(function(){return Promise.all(e.resetStoreCallbacks.map(function(e){return e()}))}).then(function(){return e.reFetchObservableQueries()})},e.prototype.clearStore=function(){var e=this;return Promise.resolve().then(function(){return e.queryManager.clearStore({discardWatches:!0})}).then(function(){return Promise.all(e.clearStoreCallbacks.map(function(e){return e()}))})},e.prototype.onResetStore=function(e){var t=this;return this.resetStoreCallbacks.push(e),function(){t.resetStoreCallbacks=t.resetStoreCallbacks.filter(function(t){return t!==e})}},e.prototype.onClearStore=function(e){var t=this;return this.clearStoreCallbacks.push(e),function(){t.clearStoreCallbacks=t.clearStoreCallbacks.filter(function(t){return t!==e})}},e.prototype.reFetchObservableQueries=function(e){return this.queryManager.reFetchObservableQueries(e)},e.prototype.refetchQueries=function(e){var t=this.queryManager.refetchQueries(e),r=[],n=[];t.forEach(function(e,t){r.push(t),n.push(e)});var i=Promise.all(n);return i.queries=r,i.results=n,i.catch(function(e){!1!==globalThis.__DEV__&&o.kG.debug(17,e)}),i},e.prototype.getObservableQueries=function(e){return void 0===e&&(e="active"),this.queryManager.getObservableQueries(e)},e.prototype.extract=function(e){return this.cache.extract(e)},e.prototype.restore=function(e){return this.cache.restore(e)},e.prototype.addResolvers=function(e){this.localState.addResolvers(e)},e.prototype.setResolvers=function(e){this.localState.setResolvers(e)},e.prototype.getResolvers=function(){return this.localState.getResolvers()},e.prototype.setLocalStateFragmentMatcher=function(e){this.localState.setFragmentMatcher(e)},e.prototype.setLink=function(e){this.link=this.queryManager.link=e},Object.defineProperty(e.prototype,"defaultContext",{get:function(){return this.queryManager.defaultContext},enumerable:!1,configurable:!0}),e}();!1!==globalThis.__DEV__&&(tm.prototype.getMemoryInternals=th.su)},40997:function(e,t,r){"use strict";r.d(t,{L:function(){return l},s:function(){return s}});var n=r(89933),i=r(78390),o=new WeakSet;function a(e){o.has(e)||(o.add(e),setTimeout(function(){e.clean(),o.delete(e)},100))}var s=function(e,t){var r=new n.k(e,t);return r.set=function(e,t){return a(this),n.k.prototype.set.call(this,e,t)},r},l=function(e,t){var r=new i.e(e,t);return r.set=function(e,t){return a(this),i.e.prototype.set.call(this,e,t)},r}},22681:function(e,t,r){"use strict";r.d(t,{Kb:function(){return u},q4:function(){return l},su:function(){return s},zP:function(){return a}});var n=r(69703),i=r(56596),o={};function a(e,t){o[e]=t}var s=!1!==globalThis.__DEV__?c:void 0,l=!1!==globalThis.__DEV__?f:void 0,u=!1!==globalThis.__DEV__?p:void 0;function d(){return Object.fromEntries(Object.entries({parser:1e3,canonicalStringify:1e3,print:2e3,"documentTransform.cache":2e3,"queryManager.getDocumentInfo":2e3,"PersistedQueryLink.persistedQueryHashes":2e3,"fragmentRegistry.transform":2e3,"fragmentRegistry.lookup":1e3,"fragmentRegistry.findFragmentSpreads":4e3,"cache.fragmentQueryDocuments":1e3,"removeTypenameFromVariables.getVariableDefinitions":2e3,"inMemoryCache.maybeBroadcastWatch":5e3,"inMemoryCache.executeSelectionSet":5e4,"inMemoryCache.executeSubSelectedArray":1e4}).map(function(e){var t=e[0],r=e[1];return[t,i.Q[t]||r]}))}function c(){var e,t,r,i,a;if(!(!1!==globalThis.__DEV__))throw Error("only supported in development mode");return{limits:d(),sizes:(0,n.pi)({print:null===(e=o.print)||void 0===e?void 0:e.call(o),parser:null===(t=o.parser)||void 0===t?void 0:t.call(o),canonicalStringify:null===(r=o.canonicalStringify)||void 0===r?void 0:r.call(o),links:b(this.link),queryManager:{getDocumentInfo:this.queryManager.transformCache.size,documentTransforms:y(this.queryManager.documentTransform)}},null===(a=(i=this.cache).getMemoryInternals)||void 0===a?void 0:a.call(i))}}function p(){return{cache:{fragmentQueryDocuments:g(this.getFragmentDoc)}}}function f(){var e=this.config.fragments;return(0,n.pi)((0,n.pi)({},p.apply(this)),{addTypenameDocumentTransform:y(this.addTypenameTransform),inMemoryCache:{executeSelectionSet:g(this.storeReader.executeSelectionSet),executeSubSelectedArray:g(this.storeReader.executeSubSelectedArray),maybeBroadcastWatch:g(this.maybeBroadcastWatch)},fragmentRegistry:{findFragmentSpreads:g(null==e?void 0:e.findFragmentSpreads),lookup:g(null==e?void 0:e.lookup),transform:g(null==e?void 0:e.transform)}})}function h(e){return!!e&&"dirtyKey"in e}function g(e){return h(e)?e.size:void 0}function m(e){return null!=e}function y(e){return v(e).map(function(e){return{cache:e}})}function v(e){return e?(0,n.ev)((0,n.ev)([g(null==e?void 0:e.performWork)],v(null==e?void 0:e.left),!0),v(null==e?void 0:e.right),!0).filter(m):[]}function b(e){var t;return e?(0,n.ev)((0,n.ev)([null===(t=null==e?void 0:e.getMemoryInternals)||void 0===t?void 0:t.call(e)],b(null==e?void 0:e.left),!0),b(null==e?void 0:e.right),!0).filter(m):[]}},56596:function(e,t,r){"use strict";r.d(t,{Q:function(){return a}});var n=r(69703),i=r(71074),o=Symbol.for("apollo.cacheSize"),a=(0,n.pi)({},i.CO[o])},26406:function(e,t,r){"use strict";r.d(t,{O:function(){return i},k:function(){return n}});var n=Array.isArray;function i(e){return Array.isArray(e)&&e.length>0}},44022:function(e,t,r){"use strict";r.d(t,{DN:function(){return s},aS:function(){return a},mr:function(){return i},sy:function(){return o}});var n=r(71074),i="function"==typeof WeakMap&&!(0,n.wY)(function(){return"ReactNative"==navigator.product&&!global.HermesInternal}),o="function"==typeof WeakSet,a="function"==typeof Symbol&&"function"==typeof Symbol.for,s=a&&Symbol.asyncIterator;(0,n.wY)(function(){return window.document.createElement}),(0,n.wY)(function(){return navigator.userAgent.indexOf("jsdom")>=0})},29446:function(e,t,r){"use strict";r.d(t,{B:function(){return s}});var n,i=r(40997),o=r(56596),a=r(22681),s=Object.assign(function(e){return JSON.stringify(e,l)},{reset:function(){n=new i.L(o.Q.canonicalStringify||1e3)}});function l(e,t){if(t&&"object"==typeof t){var r=Object.getPrototypeOf(t);if(r===Object.prototype||null===r){var i=Object.keys(t);if(i.every(u))return t;var o=JSON.stringify(i),a=n.get(o);if(!a){i.sort();var s=JSON.stringify(i);a=n.get(s)||i,n.set(o,a),n.set(s,a)}var l=Object.create(r);return a.forEach(function(e){l[e]=t[e]}),l}}return t}function u(e,t,r){return 0===t||r[t-1]<=e}!1!==globalThis.__DEV__&&(0,a.zP)("canonicalStringify",function(){return n.size}),s.reset()},52618:function(e,t,r){"use strict";r.d(t,{X:function(){return i}});var n=Object.prototype.toString;function i(e){return o(e)}function o(e,t){switch(n.call(e)){case"[object Array]":if((t=t||new Map).has(e))return t.get(e);var r=e.slice(0);return t.set(e,r),r.forEach(function(e,n){r[n]=o(e,t)}),r;case"[object Object]":if((t=t||new Map).has(e))return t.get(e);var i=Object.create(Object.getPrototypeOf(e));return t.set(e,i),Object.keys(e).forEach(function(r){i[r]=o(e[r],t)}),i;default:return e}}},6291:function(e,t,r){"use strict";function n(){for(var e=[],t=0;t1)for(var n=new u,i=1;i")}},71074:function(e,t,r){"use strict";r.d(t,{CO:function(){return h},kG:function(){return y},wY:function(){return f},_K:function(){return v}});var n=r(69703),i="Invariant Violation",o=Object.setPrototypeOf,a=void 0===o?function(e,t){return e.__proto__=t,e}:o,s=function(e){function t(r){void 0===r&&(r=i);var n=e.call(this,"number"==typeof r?i+": "+r+" (see https://github.com/apollographql/invariant-packages)":r)||this;return n.framesToPop=1,n.name=i,a(n,t.prototype),n}return(0,n.ZT)(t,e),t}(Error);function l(e,t){if(!e)throw new s(t)}var u=["debug","log","warn","error","silent"],d=u.indexOf("log");function c(e){return function(){if(u.indexOf(e)>=d)return(console[e]||console.log).apply(console,arguments)}}!function(e){e.debug=c("debug"),e.log=c("log"),e.warn=c("warn"),e.error=c("error")}(l||(l={}));var p=r(87755);function f(e){try{return e()}catch(e){}}var h=f(function(){return globalThis})||f(function(){return window})||f(function(){return self})||f(function(){return global})||f(function(){return f.constructor("return this")()}),g=r(43741);function m(e){return function(t){for(var r=[],n=1;ne.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>f(e.definitions,"\n\n")},OperationDefinition:{leave(e){let t=g("(",f(e.variableDefinitions,", "),")"),r=f([e.operation,f([e.name,t]),f(e.directives," ")]," ");return("query"===r?"":r+" ")+e.selectionSet}},VariableDefinition:{leave:e=>{let{variable:t,type:r,defaultValue:n,directives:i}=e;return t+": "+r+g(" = ",n)+g(" ",f(i," "))}},SelectionSet:{leave:e=>{let{selections:t}=e;return h(t)}},Field:{leave(e){let{alias:t,name:r,arguments:n,directives:i,selectionSet:o}=e,a=g("",t,": ")+r,s=a+g("(",f(n,", "),")");return s.length>c&&(s=a+g("(\n",m(f(n,"\n")),"\n)")),f([s,f(i," "),o]," ")}},Argument:{leave:e=>{let{name:t,value:r}=e;return t+": "+r}},FragmentSpread:{leave:e=>{let{name:t,directives:r}=e;return"..."+t+g(" ",f(r," "))}},InlineFragment:{leave:e=>{let{typeCondition:t,directives:r,selectionSet:n}=e;return f(["...",g("on ",t),f(r," "),n]," ")}},FragmentDefinition:{leave:e=>{let{name:t,typeCondition:r,variableDefinitions:n,directives:i,selectionSet:o}=e;return"fragment ".concat(t).concat(g("(",f(n,", "),")")," ")+"on ".concat(r," ").concat(g("",f(i," ")," "))+o}},IntValue:{leave:e=>{let{value:t}=e;return t}},FloatValue:{leave:e=>{let{value:t}=e;return t}},StringValue:{leave:e=>{let{value:t,block:r}=e;return r?(0,i.LZ)(t):o(t)}},BooleanValue:{leave:e=>{let{value:t}=e;return t?"true":"false"}},NullValue:{leave:()=>"null"},EnumValue:{leave:e=>{let{value:t}=e;return t}},ListValue:{leave:e=>{let{values:t}=e;return"["+f(t,", ")+"]"}},ObjectValue:{leave:e=>{let{fields:t}=e;return"{"+f(t,", ")+"}"}},ObjectField:{leave:e=>{let{name:t,value:r}=e;return t+": "+r}},Directive:{leave:e=>{let{name:t,arguments:r}=e;return"@"+t+g("(",f(r,", "),")")}},NamedType:{leave:e=>{let{name:t}=e;return t}},ListType:{leave:e=>{let{type:t}=e;return"["+t+"]"}},NonNullType:{leave:e=>{let{type:t}=e;return t+"!"}},SchemaDefinition:{leave:e=>{let{description:t,directives:r,operationTypes:n}=e;return g("",t,"\n")+f(["schema",f(r," "),h(n)]," ")}},OperationTypeDefinition:{leave:e=>{let{operation:t,type:r}=e;return t+": "+r}},ScalarTypeDefinition:{leave:e=>{let{description:t,name:r,directives:n}=e;return g("",t,"\n")+f(["scalar",r,f(n," ")]," ")}},ObjectTypeDefinition:{leave:e=>{let{description:t,name:r,interfaces:n,directives:i,fields:o}=e;return g("",t,"\n")+f(["type",r,g("implements ",f(n," & ")),f(i," "),h(o)]," ")}},FieldDefinition:{leave:e=>{let{description:t,name:r,arguments:n,type:i,directives:o}=e;return g("",t,"\n")+r+(y(n)?g("(\n",m(f(n,"\n")),"\n)"):g("(",f(n,", "),")"))+": "+i+g(" ",f(o," "))}},InputValueDefinition:{leave:e=>{let{description:t,name:r,type:n,defaultValue:i,directives:o}=e;return g("",t,"\n")+f([r+": "+n,g("= ",i),f(o," ")]," ")}},InterfaceTypeDefinition:{leave:e=>{let{description:t,name:r,interfaces:n,directives:i,fields:o}=e;return g("",t,"\n")+f(["interface",r,g("implements ",f(n," & ")),f(i," "),h(o)]," ")}},UnionTypeDefinition:{leave:e=>{let{description:t,name:r,directives:n,types:i}=e;return g("",t,"\n")+f(["union",r,f(n," "),g("= ",f(i," | "))]," ")}},EnumTypeDefinition:{leave:e=>{let{description:t,name:r,directives:n,values:i}=e;return g("",t,"\n")+f(["enum",r,f(n," "),h(i)]," ")}},EnumValueDefinition:{leave:e=>{let{description:t,name:r,directives:n}=e;return g("",t,"\n")+f([r,f(n," ")]," ")}},InputObjectTypeDefinition:{leave:e=>{let{description:t,name:r,directives:n,fields:i}=e;return g("",t,"\n")+f(["input",r,f(n," "),h(i)]," ")}},DirectiveDefinition:{leave:e=>{let{description:t,name:r,arguments:n,repeatable:i,locations:o}=e;return g("",t,"\n")+"directive @"+r+(y(n)?g("(\n",m(f(n,"\n")),"\n)"):g("(",f(n,", "),")"))+(i?" repeatable":"")+" on "+f(o," | ")}},SchemaExtension:{leave:e=>{let{directives:t,operationTypes:r}=e;return f(["extend schema",f(t," "),h(r)]," ")}},ScalarTypeExtension:{leave:e=>{let{name:t,directives:r}=e;return f(["extend scalar",t,f(r," ")]," ")}},ObjectTypeExtension:{leave:e=>{let{name:t,interfaces:r,directives:n,fields:i}=e;return f(["extend type",t,g("implements ",f(r," & ")),f(n," "),h(i)]," ")}},InterfaceTypeExtension:{leave:e=>{let{name:t,interfaces:r,directives:n,fields:i}=e;return f(["extend interface",t,g("implements ",f(r," & ")),f(n," "),h(i)]," ")}},UnionTypeExtension:{leave:e=>{let{name:t,directives:r,types:n}=e;return f(["extend union",t,f(r," "),g("= ",f(n," | "))]," ")}},EnumTypeExtension:{leave:e=>{let{name:t,directives:r,values:n}=e;return f(["extend enum",t,f(r," "),h(n)]," ")}},InputObjectTypeExtension:{leave:e=>{let{name:t,directives:r,fields:n}=e;return f(["extend input",t,f(r," "),h(n)]," ")}}};function f(e){var t;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return null!==(t=null==e?void 0:e.filter(e=>e).join(r))&&void 0!==t?t:""}function h(e){return g("{\n",m(f(e,"\n")),"\n}")}function g(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return null!=t&&""!==t?e+t+r:""}function m(e){return g(" ",e.replace(/\n/g,"\n "))}function y(e){var t;return null!==(t=null==e?void 0:e.some(e=>e.includes("\n")))&&void 0!==t&&t}var v=r(40997),b=r(56596),S=r(22681),w=Object.assign(function(e){var t=n.get(e);return t||(t=d(e),n.set(e,t)),t},{reset:function(){n=new v.s(b.Q.print||2e3)}});w.reset(),!1!==globalThis.__DEV__&&(0,S.zP)("print",function(){return n?n.size:0})},9774:function(e,t,r){"use strict";r.d(t,{Ao:function(){return R},JW:function(){return u},My:function(){return I},NC:function(){return O},PT:function(){return k},Yk:function(){return l},kQ:function(){return s},qw:function(){return A},u2:function(){return P},vb:function(){return b},vf:function(){return S}});var n=r(71074),i=r(25004),o=r(77362),a=r(29446);function s(e){return{__ref:String(e)}}function l(e){return!!(e&&"object"==typeof e&&"string"==typeof e.__ref)}function u(e){return(0,i.s)(e)&&"Document"===e.kind&&Array.isArray(e.definitions)}function d(e){return"StringValue"===e.kind}function c(e){return"BooleanValue"===e.kind}function p(e){return"IntValue"===e.kind}function f(e){return"FloatValue"===e.kind}function h(e){return"Variable"===e.kind}function g(e){return"ObjectValue"===e.kind}function m(e){return"ListValue"===e.kind}function y(e){return"EnumValue"===e.kind}function v(e){return"NullValue"===e.kind}function b(e,t,r,i){if(p(r)||f(r))e[t.value]=Number(r.value);else if(c(r)||d(r))e[t.value]=r.value;else if(g(r)){var o={};r.fields.map(function(e){return b(o,e.name,e.value,i)}),e[t.value]=o}else if(h(r)){var a=(i||{})[r.name.value];e[t.value]=a}else if(m(r))e[t.value]=r.values.map(function(e){var r={};return b(r,t,e,i),r[t.value]});else if(y(r))e[t.value]=r.value;else if(v(r))e[t.value]=null;else throw(0,n._K)(82,t.value,r.kind)}function S(e,t){var r=null;e.directives&&(r={},e.directives.forEach(function(e){r[e.name.value]={},e.arguments&&e.arguments.forEach(function(n){var i=n.name,o=n.value;return b(r[e.name.value],i,o,t)})}));var n=null;return e.arguments&&e.arguments.length&&(n={},e.arguments.forEach(function(e){var r=e.name,i=e.value;return b(n,r,i,t)})),k(e.name.value,n,r)}var w=["connection","include","skip","client","rest","export","nonreactive"],_=a.B,k=Object.assign(function(e,t,r){if(t&&r&&r.connection&&r.connection.key){if(!r.connection.filter||!(r.connection.filter.length>0))return r.connection.key;var n=r.connection.filter?r.connection.filter:[];n.sort();var i={};return n.forEach(function(e){i[e]=t[e]}),"".concat(r.connection.key,"(").concat(_(i),")")}var o=e;if(t){var a=_(t);o+="(".concat(a,")")}return r&&Object.keys(r).forEach(function(e){-1===w.indexOf(e)&&(r[e]&&Object.keys(r[e]).length?o+="@".concat(e,"(").concat(_(r[e]),")"):o+="@".concat(e))}),o},{setStringify:function(e){var t=_;return _=e,t}});function O(e,t){if(e.arguments&&e.arguments.length){var r={};return e.arguments.forEach(function(e){return b(r,e.name,e.value,t)}),r}return null}function P(e){return e.alias?e.alias.value:e.name.value}function A(e,t,r){for(var n,i=0,a=t.selections;i=0;--p)t.definitions[p].kind===o.h.OPERATION_DEFINITION&&++c;var m=h(e),y=function(e){return(0,d.O)(e)&&e.map(m).some(function(e){return e&&e.remove})},v=new Map,b=!1,S={enter:function(e){if(y(e.directives))return b=!0,null}},w=(0,a.Vn)(t,{Field:S,InlineFragment:S,VariableDefinition:{enter:function(){return!1}},Variable:{enter:function(e,t,r,n,i){var o=u(i);o&&o.variables.add(e.name.value)}},FragmentSpread:{enter:function(e,t,r,n,i){if(y(e.directives))return b=!0,null;var o=u(i);o&&o.fragmentSpreads.add(e.name.value)}},FragmentDefinition:{enter:function(e,t,r,n){v.set(JSON.stringify(n),e)},leave:function(e,t,r,n){return e===v.get(JSON.stringify(n))?e:c>0&&e.selectionSet.selections.every(function(e){return e.kind===o.h.FIELD&&"__typename"===e.name.value})?(l(e.name.value).removed=!0,b=!0,null):void 0}},Directive:{leave:function(e){if(m(e))return b=!0,null}}});if(!b)return t;var _=function(e){return e.transitiveVars||(e.transitiveVars=new Set(e.variables),e.removed||e.fragmentSpreads.forEach(function(t){_(l(t)).transitiveVars.forEach(function(t){e.transitiveVars.add(t)})})),e},k=new Set;w.definitions.forEach(function(e){e.kind===o.h.OPERATION_DEFINITION?_(r(e.name&&e.name.value)).fragmentSpreads.forEach(function(e){k.add(e)}):e.kind!==o.h.FRAGMENT_DEFINITION||0!==c||l(e.name.value).removed||k.add(e.name.value)}),k.forEach(function(e){_(l(e)).fragmentSpreads.forEach(function(e){k.add(e)})});var O=function(e){return!!(!k.has(e)||l(e).removed)},P={enter:function(e){if(O(e.name.value))return null}};return f((0,a.Vn)(w,{FragmentSpread:P,FragmentDefinition:P,OperationDefinition:{leave:function(e){if(e.variableDefinitions){var t=_(r(e.name&&e.name.value)).transitiveVars;if(t.size{let{validator:t}=e;return t(a)}))?void 0:r.classGroupId}var f=/^\[(.+)\]$/;function h(e){if(f.test(e)){let t=f.exec(e)[1],r=null==t?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}}function g(e){let{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return b(Object.entries(e.classGroups),r).forEach(e=>{let[r,i]=e;m(i,n,r,t)}),n}function m(e,t,r,n){e.forEach(e=>{if("string"==typeof e){(""===e?t:y(t,e)).classGroupId=r;return}if("function"==typeof e){if(v(e)){m(e(n),t,r,n);return}t.validators.push({validator:e,classGroupId:r});return}Object.entries(e).forEach(e=>{let[i,o]=e;m(o,y(t,i),r,n)})})}function y(e,t){let r=e;return t.split(d).forEach(e=>{r.nextPart.has(e)||r.nextPart.set(e,{nextPart:new Map,validators:[]}),r=r.nextPart.get(e)}),r}function v(e){return e.isThemeGetter}function b(e,t){return t?e.map(e=>{let[r,n]=e;return[r,n.map(e=>"string"==typeof e?t+e:"object"==typeof e?Object.fromEntries(Object.entries(e).map(e=>{let[r,n]=e;return[t+r,n]})):e)]}):e}function S(e){if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,r=new Map,n=new Map;function i(i,o){r.set(i,o),++t>e&&(t=0,n=r,r=new Map)}return{get(e){let t=r.get(e);return void 0!==t?t:void 0!==(t=n.get(e))?(i(e,t),t):void 0},set(e,t){r.has(e)?r.set(e,t):i(e,t)}}}var w="!";function _(e){let t=e.separator,r=1===t.length,n=t[0],i=t.length;return function(e){let o;let a=[],s=0,l=0;for(let u=0;ul?o-l:void 0}}}function k(e){if(e.length<=1)return e;let t=[],r=[];return e.forEach(e=>{"["===e[0]?(t.push(...r.sort(),e),r=[]):r.push(e)}),t.push(...r.sort()),t}function O(e){return(0,s.ih)({cache:S(e.cacheSize),splitModifiers:_(e)},c(e))}var P=/\s+/;function A(e,t){let{splitModifiers:r,getClassGroupId:n,getConflictingClassGroupIds:i}=t,o=new Set;return e.trim().split(P).map(e=>{let{modifiers:t,hasImportantModifier:i,baseClassName:o,maybePostfixModifierPosition:a}=r(e),s=n(a?o.substring(0,a):o),l=!!a;if(!s){if(!a||!(s=n(o)))return{isTailwindClass:!1,originalClassName:e};l=!1}let u=k(t).join(":");return{isTailwindClass:!0,modifierId:i?u+w:u,classGroupId:s,originalClassName:e,hasPostfixModifier:l}}).reverse().filter(e=>{if(!e.isTailwindClass)return!0;let{modifierId:t,classGroupId:r,hasPostfixModifier:n}=e,a=t+r;return!o.has(a)&&(o.add(a),i(r,n).forEach(e=>o.add(t+e)),!0)}).reverse().map(e=>e.originalClassName).join(" ")}function I(){let e,t,r=0,n="";for(;r1?i-1:0),a=1;at(e),e()))).cache.get,n=t.cache.set,s=u,u(i)}function u(e){let i=r(e);if(i)return i;let o=A(e,t);return n(e,o),o}return function(){return s(I.apply(null,arguments))}}function T(e){let t=t=>t[e]||[];return t.isThemeGetter=!0,t}var N=/^\[(?:([a-z-]+):)?(.+)\]$/i,x=/^\d+\/\d+$/,B=new Set(["px","full","screen"]),C=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,M=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,D=/^-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,U=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function J(e){return H(e)||B.has(e)||x.test(e)}function j(e){return $(e,"length",ee)}function H(e){return!!e&&!Number.isNaN(Number(e))}function q(e){return $(e,"number",H)}function L(e){return!!e&&Number.isInteger(Number(e))}function F(e){return e.endsWith("%")&&H(e.slice(0,-1))}function V(e){return N.test(e)}function z(e){return C.test(e)}var W=new Set(["length","size","percentage"]);function Q(e){return $(e,W,et)}function G(e){return $(e,"position",et)}var K=new Set(["image","url"]);function Y(e){return $(e,K,en)}function Z(e){return $(e,"",er)}function X(){return!0}function $(e,t,r){let n=N.exec(e);return!!n&&(n[1]?"string"==typeof t?n[1]===t:t.has(n[1]):r(n[2]))}function ee(e){return M.test(e)}function et(){return!1}function er(e){return D.test(e)}function en(e){return U.test(e)}var ei=E(function(){let e=T("colors"),t=T("spacing"),r=T("blur"),n=T("brightness"),i=T("borderColor"),o=T("borderRadius"),a=T("borderSpacing"),s=T("borderWidth"),l=T("contrast"),u=T("grayscale"),d=T("hueRotate"),c=T("invert"),p=T("gap"),f=T("gradientColorStops"),h=T("gradientColorStopPositions"),g=T("inset"),m=T("margin"),y=T("opacity"),v=T("padding"),b=T("saturate"),S=T("scale"),w=T("sepia"),_=T("skew"),k=T("space"),O=T("translate"),P=()=>["auto","contain","none"],A=()=>["auto","hidden","clip","visible","scroll"],I=()=>["auto",V,t],R=()=>[V,t],E=()=>["",J,j],N=()=>["auto",H,V],x=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],B=()=>["solid","dashed","dotted","double","none"],C=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter"],M=()=>["start","end","center","between","around","evenly","stretch"],D=()=>["","0",V],U=()=>["auto","avoid","all","avoid-page","page","left","right","column"],W=()=>[H,q],K=()=>[H,V];return{cacheSize:500,separator:":",theme:{colors:[X],spacing:[J,j],blur:["none","",z,V],brightness:W(),borderColor:[e],borderRadius:["none","","full",z,V],borderSpacing:R(),borderWidth:E(),contrast:W(),grayscale:D(),hueRotate:K(),invert:D(),gap:R(),gradientColorStops:[e],gradientColorStopPositions:[F,j],inset:I(),margin:I(),opacity:W(),padding:R(),saturate:W(),scale:W(),sepia:D(),skew:K(),space:R(),translate:R()},classGroups:{aspect:[{aspect:["auto","square","video",V]}],container:["container"],columns:[{columns:[z]}],"break-after":[{"break-after":U()}],"break-before":[{"break-before":U()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none"]}],clear:[{clear:["left","right","both","none"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...x(),V]}],overflow:[{overflow:A()}],"overflow-x":[{"overflow-x":A()}],"overflow-y":[{"overflow-y":A()}],overscroll:[{overscroll:P()}],"overscroll-x":[{"overscroll-x":P()}],"overscroll-y":[{"overscroll-y":P()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",L,V]}],basis:[{basis:I()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",V]}],grow:[{grow:D()}],shrink:[{shrink:D()}],order:[{order:["first","last","none",L,V]}],"grid-cols":[{"grid-cols":[X]}],"col-start-end":[{col:["auto",{span:["full",L,V]},V]}],"col-start":[{"col-start":N()}],"col-end":[{"col-end":N()}],"grid-rows":[{"grid-rows":[X]}],"row-start-end":[{row:["auto",{span:[L,V]},V]}],"row-start":[{"row-start":N()}],"row-end":[{"row-end":N()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",V]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",V]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal",...M()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...M(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...M(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],m:[{m:[m]}],mx:[{mx:[m]}],my:[{my:[m]}],ms:[{ms:[m]}],me:[{me:[m]}],mt:[{mt:[m]}],mr:[{mr:[m]}],mb:[{mb:[m]}],ml:[{ml:[m]}],"space-x":[{"space-x":[k]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[k]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit",V,t]}],"min-w":[{"min-w":["min","max","fit",V,J]}],"max-w":[{"max-w":["0","none","full","min","max","fit","prose",{screen:[z]},z,V]}],h:[{h:[V,t,"auto","min","max","fit"]}],"min-h":[{"min-h":["min","max","fit",J,V]}],"max-h":[{"max-h":[V,t,"min","max","fit"]}],"font-size":[{text:["base",z,j]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",q]}],"font-family":[{font:[X]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",V]}],"line-clamp":[{"line-clamp":["none",H,q]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",J,V]}],"list-image":[{"list-image":["none",V]}],"list-style-type":[{list:["none","disc","decimal",V]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...B(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",J,j]}],"underline-offset":[{"underline-offset":["auto",J,V]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],indent:[{indent:R()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",V]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",V]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...x(),G]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Q]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Y]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[h]}],"gradient-via-pos":[{via:[h]}],"gradient-to-pos":[{to:[h]}],"gradient-from":[{from:[f]}],"gradient-via":[{via:[f]}],"gradient-to":[{to:[f]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:[...B(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}],"divide-style":[{divide:B()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...B()]}],"outline-offset":[{"outline-offset":[J,V]}],"outline-w":[{outline:[J,j]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:E()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[J,j]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",z,Z]}],"shadow-color":[{shadow:[X]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":C()}],"bg-blend":[{"bg-blend":C()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",z,V]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[c]}],saturate:[{saturate:[b]}],sepia:[{sepia:[w]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[c]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[b]}],"backdrop-sepia":[{"backdrop-sepia":[w]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",V]}],duration:[{duration:K()}],ease:[{ease:["linear","in","out","in-out",V]}],delay:[{delay:K()}],animate:[{animate:["none","spin","ping","pulse","bounce",V]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[L,V]}],"translate-x":[{"translate-x":[O]}],"translate-y":[{"translate-y":[O]}],"skew-x":[{"skew-x":[_]}],"skew-y":[{"skew-y":[_]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",V]}],accent:[{accent:["auto",e]}],appearance:["appearance-none"],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",V]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":R()}],"scroll-mx":[{"scroll-mx":R()}],"scroll-my":[{"scroll-my":R()}],"scroll-ms":[{"scroll-ms":R()}],"scroll-me":[{"scroll-me":R()}],"scroll-mt":[{"scroll-mt":R()}],"scroll-mr":[{"scroll-mr":R()}],"scroll-mb":[{"scroll-mb":R()}],"scroll-ml":[{"scroll-ml":R()}],"scroll-p":[{"scroll-p":R()}],"scroll-px":[{"scroll-px":R()}],"scroll-py":[{"scroll-py":R()}],"scroll-ps":[{"scroll-ps":R()}],"scroll-pe":[{"scroll-pe":R()}],"scroll-pt":[{"scroll-pt":R()}],"scroll-pr":[{"scroll-pr":R()}],"scroll-pb":[{"scroll-pb":R()}],"scroll-pl":[{"scroll-pl":R()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",V]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[J,j,q]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}});function eo(){for(var e=arguments.length,t=Array(e),r=0;r{var r=e,{className:n,children:i}=r,o=(0,s.S0)(r,["className","children"]);return(0,ea.jsxs)("div",(0,s.EZ)((0,s.ih)({className:eo("ui-flex ui-p-4 ui-justify-center ui-items-center ui-fixed ui-inset-0 ui-h-screen ui-w-screen ui-z-[999]",n),ref:t},o),{children:[(0,ea.jsx)("div",{className:"ui-absolute ui-z-[999] ui-inset-0 ui-bg-modal-overlay ui-blur-md ui-bg-no-repeat ui-bg-cover ui-bg-center ui-bg-fixed ui-opacity-70"}),i]}))}).displayName="ModalAnchor";var el=()=>(0,ea.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"3rem",height:"3rem",viewBox:"0 0 100 100",preserveAspectRatio:"xMidYMid",children:(0,ea.jsx)("circle",{cx:"50",cy:"50",fill:"none",stroke:"currentColor",strokeWidth:"8",r:"35",strokeDasharray:"164.93361431346415 56.97787143782138",children:(0,ea.jsx)("animateTransform",{attributeName:"transform",type:"rotate",repeatCount:"indefinite",dur:"1.25s",values:"0 50 50;360 50 50",keyTimes:"0;1"})})}),eu=r(59115),ed=e=>{let{className:t}=e;return(0,ea.jsxs)("svg",{width:"160",height:"104",viewBox:"0 0 160 104",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:eo("ui-h-28 ui-w-40",t),children:[(0,ea.jsx)("rect",{width:"159.467",height:"104",rx:"12",fill:"white",fillOpacity:"0.2"}),(0,ea.jsx)("rect",{x:"0.5",y:"0.5",width:"158.467",height:"103",rx:"11.5",stroke:"white",strokeOpacity:"0.4"}),(0,ea.jsx)("circle",{cx:"12.1334",cy:"6.93203",r:"2.6",fill:"white",fillOpacity:"0.4"}),(0,ea.jsx)("circle",{cx:"22.5333",cy:"6.93203",r:"2.6",fill:"white",fillOpacity:"0.4"}),(0,ea.jsx)("circle",{cx:"32.9333",cy:"6.93203",r:"2.6",fill:"white",fillOpacity:"0.4"}),(0,ea.jsx)("line",{y1:"12.5",x2:"159.467",y2:"12.5",stroke:"white",strokeOpacity:"0.4"})]})},ec=r(14749);function ep(e,t){let{checkForDefaultPrevented:r=!0}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function(n){if(null==e||e(n),!1===r||!n.defaultPrevented)return null==t?void 0:t(n)}}function ef(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function eh(){for(var e=arguments.length,t=Array(e),r=0;rt.forEach(t=>ef(t,e))}function eg(){for(var e=arguments.length,t=Array(e),r=0;rn,Object.values(n));return(0,o.createElement)(r.Provider,{value:i},t)}function i(n){let i=(0,o.useContext)(r);if(i)return i;if(void 0!==t)return t;throw Error("`".concat(n,"` must be used within `").concat(e,"`"))}return n.displayName=e+"Provider",[n,i]}function ey(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=[];function n(t,n){let i=(0,o.createContext)(n),a=r.length;function s(t){let{scope:r,children:n,...s}=t,l=(null==r?void 0:r[e][a])||i,u=(0,o.useMemo)(()=>s,Object.values(s));return(0,o.createElement)(l.Provider,{value:u},n)}function l(r,s){let l=(null==s?void 0:s[e][a])||i,u=(0,o.useContext)(l);if(u)return u;if(void 0!==n)return n;throw Error("`".concat(r,"` must be used within `").concat(t,"`"))}return r=[...r,n],s.displayName=t+"Provider",[s,l]}let i=()=>{let t=r.map(e=>(0,o.createContext)(e));return function(r){let n=(null==r?void 0:r[e])||t;return(0,o.useMemo)(()=>({["__scope".concat(e)]:{...r,[e]:n}}),[r,n])}};return i.scopeName=e,[n,ev(i,...t)]}function ev(){for(var e=arguments.length,t=Array(e),r=0;r{let e=t.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(t){let r=e.reduce((e,r)=>{let{useScope:n,scopeName:i}=r,o=n(t)["__scope".concat(i)];return{...e,...o}},{});return(0,o.useMemo)(()=>({["__scope".concat(n.scopeName)]:r}),[r])}};return i.scopeName=n.scopeName,i}let eb=(null==globalThis?void 0:globalThis.document)?o.useLayoutEffect:()=>{},eS=a["useId".toString()]||(()=>void 0),ew=0;function e_(e){let[t,r]=o.useState(eS());return eb(()=>{e||r(e=>null!=e?e:String(ew++))},[e]),e||(t?"radix-".concat(t):"")}function ek(e){let t=(0,o.useRef)(e);return(0,o.useEffect)(()=>{t.current=e}),(0,o.useMemo)(()=>function(){for(var e,r=arguments.length,n=Array(r),i=0;i{}}=e,[i,a]=eP({defaultProp:r,onChange:n}),s=void 0!==t,l=s?t:i,u=ek(n);return[l,(0,o.useCallback)(e=>{if(s){let r=e,n="function"==typeof e?r(t):e;n!==t&&u(n)}else a(e)},[s,t,a,u])]}function eP(e){let{defaultProp:t,onChange:r}=e,n=(0,o.useState)(t),[i]=n,a=(0,o.useRef)(i),s=ek(r);return(0,o.useEffect)(()=>{a.current!==i&&(s(i),a.current=i)},[i,a,s]),n}var eA=r(89542);let eI=(0,o.forwardRef)((e,t)=>{let{children:r,...n}=e,i=o.Children.toArray(r),a=i.find(eT);if(a){let e=a.props.children,r=i.map(t=>t!==a?t:o.Children.count(e)>1?o.Children.only(null):(0,o.isValidElement)(e)?e.props.children:null);return(0,o.createElement)(eR,(0,ec.Z)({},n,{ref:t}),(0,o.isValidElement)(e)?(0,o.cloneElement)(e,void 0,r):null)}return(0,o.createElement)(eR,(0,ec.Z)({},n,{ref:t}),r)});eI.displayName="Slot";let eR=(0,o.forwardRef)((e,t)=>{let{children:r,...n}=e;return(0,o.isValidElement)(r)?(0,o.cloneElement)(r,{...eN(n,r.props),ref:t?eh(t,r.ref):r.ref}):o.Children.count(r)>1?o.Children.only(null):null});eR.displayName="SlotClone";let eE=e=>{let{children:t}=e;return(0,o.createElement)(o.Fragment,null,t)};function eT(e){return(0,o.isValidElement)(e)&&e.type===eE}function eN(e,t){let r={...t};for(let n in t){let i=e[n],o=t[n];/^on[A-Z]/.test(n)?i&&o?r[n]=function(){for(var e=arguments.length,t=Array(e),r=0;r{let r=(0,o.forwardRef)((e,r)=>{let{asChild:n,...i}=e,a=n?eI:t;return(0,o.useEffect)(()=>{window[Symbol.for("radix-ui")]=!0},[]),(0,o.createElement)(a,(0,ec.Z)({},i,{ref:r}))});return r.displayName="Primitive.".concat(t),{...e,[t]:r}},{});function eB(e,t){e&&(0,eA.flushSync)(()=>e.dispatchEvent(t))}function eC(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null==globalThis?void 0:globalThis.document,r=ek(e);(0,o.useEffect)(()=>{let e=e=>{"Escape"===e.key&&r(e)};return t.addEventListener("keydown",e),()=>t.removeEventListener("keydown",e)},[r,t])}let eM="dismissableLayer.update",eD="dismissableLayer.pointerDownOutside",eU="dismissableLayer.focusOutside",eJ=(0,o.createContext)({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ej=(0,o.forwardRef)((e,t)=>{var r;let{disableOutsidePointerEvents:i=!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:l,onInteractOutside:u,onDismiss:d,...c}=e,p=(0,o.useContext)(eJ),[f,h]=(0,o.useState)(null),g=null!==(r=null==f?void 0:f.ownerDocument)&&void 0!==r?r:null==globalThis?void 0:globalThis.document,[,m]=(0,o.useState)({}),y=eg(t,e=>h(e)),v=Array.from(p.layers),[b]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),S=v.indexOf(b),w=f?v.indexOf(f):-1,_=p.layersWithOutsidePointerEventsDisabled.size>0,k=w>=S,O=eH(e=>{let t=e.target,r=[...p.branches].some(e=>e.contains(t));!k||r||(null==s||s(e),null==u||u(e),e.defaultPrevented||null==d||d())},g),P=eq(e=>{let t=e.target;[...p.branches].some(e=>e.contains(t))||(null==l||l(e),null==u||u(e),e.defaultPrevented||null==d||d())},g);return eC(e=>{w!==p.layers.size-1||(null==a||a(e),!e.defaultPrevented&&d&&(e.preventDefault(),d()))},g),(0,o.useEffect)(()=>{if(f)return i&&(0===p.layersWithOutsidePointerEventsDisabled.size&&(n=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(f)),p.layers.add(f),eL(),()=>{i&&1===p.layersWithOutsidePointerEventsDisabled.size&&(g.body.style.pointerEvents=n)}},[f,g,i,p]),(0,o.useEffect)(()=>()=>{f&&(p.layers.delete(f),p.layersWithOutsidePointerEventsDisabled.delete(f),eL())},[f,p]),(0,o.useEffect)(()=>{let e=()=>m({});return document.addEventListener(eM,e),()=>document.removeEventListener(eM,e)},[]),(0,o.createElement)(ex.div,(0,ec.Z)({},c,{ref:y,style:{pointerEvents:_?k?"auto":"none":void 0,...e.style},onFocusCapture:ep(e.onFocusCapture,P.onFocusCapture),onBlurCapture:ep(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:ep(e.onPointerDownCapture,O.onPointerDownCapture)}))});function eH(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null==globalThis?void 0:globalThis.document,r=ek(e),n=(0,o.useRef)(!1),i=(0,o.useRef)(()=>{});return(0,o.useEffect)(()=>{let e=e=>{if(e.target&&!n.current){let n={originalEvent:e};function o(){eF(eD,r,n,{discrete:!0})}"touch"===e.pointerType?(t.removeEventListener("click",i.current),i.current=o,t.addEventListener("click",i.current,{once:!0})):o()}else t.removeEventListener("click",i.current);n.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",e),t.removeEventListener("click",i.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function eq(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null==globalThis?void 0:globalThis.document,r=ek(e),n=(0,o.useRef)(!1);return(0,o.useEffect)(()=>{let e=e=>{e.target&&!n.current&&eF(eU,r,{originalEvent:e},{discrete:!1})};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function eL(){let e=new CustomEvent(eM);document.dispatchEvent(e)}function eF(e,t,r,n){let{discrete:i}=n,o=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),i?eB(o,a):o.dispatchEvent(a)}let eV="focusScope.autoFocusOnMount",ez="focusScope.autoFocusOnUnmount",eW={bubbles:!1,cancelable:!0},eQ=(0,o.forwardRef)((e,t)=>{let{loop:r=!1,trapped:n=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...s}=e,[l,u]=(0,o.useState)(null),d=ek(i),c=ek(a),p=(0,o.useRef)(null),f=eg(t,e=>u(e)),h=(0,o.useRef)({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;(0,o.useEffect)(()=>{if(n){function e(e){if(h.paused||!l)return;let t=e.target;l.contains(t)?p.current=t:e0(p.current,{select:!0})}function t(e){if(h.paused||!l)return;let t=e.relatedTarget;null===t||l.contains(t)||e0(p.current,{select:!0})}function r(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&e0(l)}document.addEventListener("focusin",e),document.addEventListener("focusout",t);let n=new MutationObserver(r);return l&&n.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),n.disconnect()}}},[n,l,h.paused]),(0,o.useEffect)(()=>{if(l){e1.add(h);let e=document.activeElement;if(!l.contains(e)){let t=new CustomEvent(eV,eW);l.addEventListener(eV,d),l.dispatchEvent(t),t.defaultPrevented||(eG(e6(eY(l)),{select:!0}),document.activeElement===e&&e0(l))}return()=>{l.removeEventListener(eV,d),setTimeout(()=>{let t=new CustomEvent(ez,eW);l.addEventListener(ez,c),l.dispatchEvent(t),t.defaultPrevented||e0(null!=e?e:document.body,{select:!0}),l.removeEventListener(ez,c),e1.remove(h)},0)}}},[l,d,c,h]);let g=(0,o.useCallback)(e=>{if(!r&&!n||h.paused)return;let t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[n,o]=eK(t);n&&o?e.shiftKey||i!==o?e.shiftKey&&i===n&&(e.preventDefault(),r&&e0(o,{select:!0})):(e.preventDefault(),r&&e0(n,{select:!0})):i===t&&e.preventDefault()}},[r,n,h.paused]);return(0,o.createElement)(ex.div,(0,ec.Z)({tabIndex:-1},s,{ref:f,onKeyDown:g}))});function eG(e){let{select:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=document.activeElement;for(let n of e)if(e0(n,{select:t}),document.activeElement!==r)return}function eK(e){let t=eY(e);return[eZ(t,e),eZ(t.reverse(),e)]}function eY(e){let t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function eZ(e,t){for(let r of e)if(!eX(r,{upTo:t}))return r}function eX(e,t){let{upTo:r}=t;if("hidden"===getComputedStyle(e).visibility)return!0;for(;e&&(void 0===r||e!==r);){if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function e$(e){return e instanceof HTMLInputElement&&"select"in e}function e0(e){let{select:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e&&e.focus){let r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&e$(e)&&t&&e.select()}}let e1=e2();function e2(){let e=[];return{add(t){let r=e[0];t!==r&&(null==r||r.pause()),(e=e3(e,t)).unshift(t)},remove(t){var r;null===(r=(e=e3(e,t))[0])||void 0===r||r.resume()}}}function e3(e,t){let r=[...e],n=r.indexOf(t);return -1!==n&&r.splice(n,1),r}function e6(e){return e.filter(e=>"A"!==e.tagName)}let e4=(0,o.forwardRef)((e,t)=>{var r;let{container:n=null==globalThis?void 0:null===(r=globalThis.document)||void 0===r?void 0:r.body,...i}=e;return n?eA.createPortal((0,o.createElement)(ex.div,(0,ec.Z)({},i,{ref:t})),n):null});function e8(e,t){return(0,o.useReducer)((e,r)=>{let n=t[e][r];return null!=n?n:e},e)}let e5=e=>{let{present:t,children:r}=e,n=e7(t),i="function"==typeof r?r({present:n.isPresent}):o.Children.only(r),a=eg(n.ref,i.ref);return"function"==typeof r||n.isPresent?(0,o.cloneElement)(i,{ref:a}):null};function e7(e){let[t,r]=(0,o.useState)(),n=(0,o.useRef)({}),i=(0,o.useRef)(e),a=(0,o.useRef)("none"),[s,l]=e8(e?"mounted":"unmounted",{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return(0,o.useEffect)(()=>{let e=e9(n.current);a.current="mounted"===s?e:"none"},[s]),eb(()=>{let t=n.current,r=i.current;if(r!==e){let n=a.current,o=e9(t);if(e)l("MOUNT");else if("none"===o||(null==t?void 0:t.display)==="none")l("UNMOUNT");else{let e=n!==o;r&&e?l("ANIMATION_OUT"):l("UNMOUNT")}i.current=e}},[e,l]),eb(()=>{if(t){let e=e=>{let r=e9(n.current).includes(e.animationName);e.target===t&&r&&(0,eA.flushSync)(()=>l("ANIMATION_END"))},r=e=>{e.target===t&&(a.current=e9(n.current))};return t.addEventListener("animationstart",r),t.addEventListener("animationcancel",e),t.addEventListener("animationend",e),()=>{t.removeEventListener("animationstart",r),t.removeEventListener("animationcancel",e),t.removeEventListener("animationend",e)}}l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:(0,o.useCallback)(e=>{e&&(n.current=getComputedStyle(e)),r(e)},[])}}function e9(e){return(null==e?void 0:e.animationName)||"none"}e5.displayName="Presence";let te=0;function tt(){(0,o.useEffect)(()=>{var e,t;let r=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",null!==(e=r[0])&&void 0!==e?e:tr()),document.body.insertAdjacentElement("beforeend",null!==(t=r[1])&&void 0!==t?t:tr()),te++,()=>{1===te&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),te--}},[])}function tr(){let e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var tn=r(69703),ti="right-scroll-bar-position",to="width-before-scroll-bar",ta="with-scroll-bars-hidden",ts="--removed-body-scroll-bar-size";function tl(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}function tu(e,t){var r=(0,o.useState)(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(value){var n=r.value;n!==value&&(r.value=value,r.callback(value,n))}}}})[0];return r.callback=t,r.facade}var td=new WeakMap;function tc(e,t){var r=tu(t||null,function(t){return e.forEach(function(e){return tl(e,t)})});return o.useLayoutEffect(function(){var t=td.get(r);if(t){var n=new Set(t),i=new Set(e),o=r.current;n.forEach(function(e){i.has(e)||tl(e,null)}),i.forEach(function(e){n.has(e)||tl(e,o)})}td.set(r,e)},[e]),r}function tp(e){return e}function tf(e,t){void 0===t&&(t=tp);var r=[],n=!1;return{read:function(){if(n)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(e){var i=t(e,n);return r.push(i),function(){r=r.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(n=!0;r.length;){var t=r;r=[],t.forEach(e)}r={push:function(t){return e(t)},filter:function(){return r}}},assignMedium:function(e){n=!0;var t=[];if(r.length){var i=r;r=[],i.forEach(e),t=r}var o=function(){var r=t;t=[],r.forEach(e)},a=function(){return Promise.resolve().then(o)};a(),r={push:function(e){t.push(e),a()},filter:function(e){return t=t.filter(e),r}}}}}var th=function(e){void 0===e&&(e={});var t=tf(null);return t.options=(0,tn.pi)({async:!0,ssr:!1},e),t}(),tg=function(){},tm=o.forwardRef(function(e,t){var r=o.useRef(null),n=o.useState({onScrollCapture:tg,onWheelCapture:tg,onTouchMoveCapture:tg}),i=n[0],a=n[1],s=e.forwardProps,l=e.children,u=e.className,d=e.removeScrollBar,c=e.enabled,p=e.shards,f=e.sideCar,h=e.noIsolation,g=e.inert,m=e.allowPinchZoom,y=e.as,v=void 0===y?"div":y,b=(0,tn._T)(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),S=f,w=tc([r,t]),_=(0,tn.pi)((0,tn.pi)({},b),i);return o.createElement(o.Fragment,null,c&&o.createElement(S,{sideCar:th,removeScrollBar:d,shards:p,noIsolation:h,inert:g,setCallbacks:a,allowPinchZoom:!!m,lockRef:r}),s?o.cloneElement(o.Children.only(l),(0,tn.pi)((0,tn.pi)({},_),{ref:w})):o.createElement(v,(0,tn.pi)({},_,{className:u,ref:w}),l))});tm.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},tm.classNames={fullWidth:to,zeroRight:ti};var ty=function(e){var t=e.sideCar,r=(0,tn._T)(e,["sideCar"]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw Error("Sidecar medium not found");return o.createElement(n,(0,tn.pi)({},r))};function tv(e,t){return e.useMedium(t),ty}ty.isSideCarExport=!0;var tb=function(){return i||r.nc};function tS(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=tb();return t&&e.setAttribute("nonce",t),e}function tw(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function t_(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}var tk=function(){var e=0,t=null;return{add:function(r){0==e&&(t=tS())&&(tw(t,r),t_(t)),e++},remove:function(){--e||!t||(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},tO=function(){var e=tk();return function(t,r){o.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},tP=function(){var e=tO();return function(t){return e(t.styles,t.dynamic),null}},tA=function(e){return parseInt(e||"",10)||0},tI=function(e){var t=window.getComputedStyle(document.body),r=t["padding"===e?"paddingLeft":"marginLeft"],n=t["padding"===e?"paddingTop":"marginTop"],i=t["padding"===e?"paddingRight":"marginRight"];return[tA(r),tA(n),tA(i)]},tR=function(e){void 0===e&&(e="margin");var t=tI(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},tE=tP(),tT="data-scroll-locked",tN=function(e,t,r,n){var i=e.left,o=e.top,a=e.right,s=e.gap;return void 0===r&&(r="margin"),"\n .".concat(ta," {\n overflow: hidden ").concat(n,";\n padding-right: ").concat(s,"px ").concat(n,";\n }\n body[").concat(tT,"] {\n overflow: hidden ").concat(n,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(n,";"),"margin"===r&&"\n padding-left: ".concat(i,"px;\n padding-top: ").concat(o,"px;\n padding-right: ").concat(a,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(s,"px ").concat(n,";\n "),"padding"===r&&"padding-right: ".concat(s,"px ").concat(n,";")].filter(Boolean).join(""),"\n }\n \n .").concat(ti," {\n right: ").concat(s,"px ").concat(n,";\n }\n \n .").concat(to," {\n margin-right: ").concat(s,"px ").concat(n,";\n }\n \n .").concat(ti," .").concat(ti," {\n right: 0 ").concat(n,";\n }\n \n .").concat(to," .").concat(to," {\n margin-right: 0 ").concat(n,";\n }\n \n body[").concat(tT,"] {\n ").concat(ts,": ").concat(s,"px;\n }\n")},tx=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,i=void 0===n?"margin":n,a=o.useMemo(function(){return tR(i)},[i]);return o.useEffect(function(){return document.body.setAttribute(tT,""),function(){document.body.removeAttribute(tT)}},[]),o.createElement(tE,{styles:tN(a,!t,i,r?"":"!important")})},tB=!1;try{var tC=Object.defineProperty({},"passive",{get:function(){return tB=!0,!0}});window.addEventListener("test",tC,tC),window.removeEventListener("test",tC,tC)}catch(e){tB=!1}var tM=!!tB&&{passive:!1},tD=function(e){return"TEXTAREA"===e.tagName},tU=function(e,t){var r=window.getComputedStyle(e);return"hidden"!==r[t]&&!(r.overflowY===r.overflowX&&!tD(e)&&"visible"===r[t])},tJ=function(e){return tU(e,"overflowY")},tj=function(e){return tU(e,"overflowX")},tH=function(e,t){var r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),tF(e,r)){var n=tV(e,r);if(n[1]>n[2])return!0}r=r.parentNode}while(r&&r!==document.body);return!1},tq=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},tL=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},tF=function(e,t){return"v"===e?tJ(t):tj(t)},tV=function(e,t){return"v"===e?tq(t):tL(t)},tz=function(e,t){return"h"===e&&"rtl"===t?-1:1},tW=function(e,t,r,n,i){var o=tz(e,window.getComputedStyle(t).direction),a=o*n,s=r.target,l=t.contains(s),u=!1,d=a>0,c=0,p=0;do{var f=tV(e,s),h=f[0],g=f[1]-f[2]-o*h;(h||g)&&tF(e,s)&&(c+=g,p+=h),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return d&&(i&&0===c||!i&&a>c)?u=!0:!d&&(i&&0===p||!i&&-a>p)&&(u=!0),u},tQ=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},tG=function(e){return[e.deltaX,e.deltaY]},tK=function(e){return e&&"current"in e?e.current:e},tY=function(e,t){return e[0]===t[0]&&e[1]===t[1]},tZ=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},tX=0,t$=[],t0=tv(th,function(e){var t=o.useRef([]),r=o.useRef([0,0]),n=o.useRef(),i=o.useState(tX++)[0],a=o.useState(function(){return tP()})[0],s=o.useRef(e);o.useEffect(function(){s.current=e},[e]),o.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var t=(0,tn.ev)([e.lockRef.current],(e.shards||[]).map(tK),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),t.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var l=o.useCallback(function(e,t){if("touches"in e&&2===e.touches.length)return!s.current.allowPinchZoom;var i,o=tQ(e),a=r.current,l="deltaX"in e?e.deltaX:a[0]-o[0],u="deltaY"in e?e.deltaY:a[1]-o[1],d=e.target,c=Math.abs(l)>Math.abs(u)?"h":"v";if("touches"in e&&"h"===c&&"range"===d.type)return!1;var p=tH(c,d);if(!p)return!0;if(p?i=c:(i="v"===c?"h":"v",p=tH(c,d)),!p)return!1;if(!n.current&&"changedTouches"in e&&(l||u)&&(n.current=i),!i)return!0;var f=n.current||i;return tW(f,t,e,"h"===f?l:u,!0)},[]),u=o.useCallback(function(e){var r=e;if(t$.length&&t$[t$.length-1]===a){var n="deltaY"in r?tG(r):tQ(r),i=t.current.filter(function(e){return e.name===r.type&&e.target===r.target&&tY(e.delta,n)})[0];if(i&&i.should){r.cancelable&&r.preventDefault();return}if(!i){var o=(s.current.shards||[]).map(tK).filter(Boolean).filter(function(e){return e.contains(r.target)});(o.length>0?l(r,o[0]):!s.current.noIsolation)&&r.cancelable&&r.preventDefault()}}},[]),d=o.useCallback(function(e,r,n,i){var o={name:e,delta:r,target:n,should:i};t.current.push(o),setTimeout(function(){t.current=t.current.filter(function(e){return e!==o})},1)},[]),c=o.useCallback(function(e){r.current=tQ(e),n.current=void 0},[]),p=o.useCallback(function(t){d(t.type,tG(t),t.target,l(t,e.lockRef.current))},[]),f=o.useCallback(function(t){d(t.type,tQ(t),t.target,l(t,e.lockRef.current))},[]);o.useEffect(function(){return t$.push(a),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:f}),document.addEventListener("wheel",u,tM),document.addEventListener("touchmove",u,tM),document.addEventListener("touchstart",c,tM),function(){t$=t$.filter(function(e){return e!==a}),document.removeEventListener("wheel",u,tM),document.removeEventListener("touchmove",u,tM),document.removeEventListener("touchstart",c,tM)}},[]);var h=e.removeScrollBar,g=e.inert;return o.createElement(o.Fragment,null,g?o.createElement(a,{styles:tZ(i)}):null,h?o.createElement(tx,{gapMode:"margin"}):null)}),t1=o.forwardRef(function(e,t){return o.createElement(tm,(0,tn.pi)({},e,{ref:t,sideCar:t0}))});t1.classNames=tm.classNames;var t2=t1,t3=function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},t6=new WeakMap,t4=new WeakMap,t8={},t5=0,t7=function(e){return e&&(e.host||t7(e.parentNode))},t9=function(e,t){return t.map(function(t){if(e.contains(t))return t;var r=t7(t);return r&&e.contains(r)?r:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)}).filter(function(e){return!!e})},re=function(e,t,r,n){var i=t9(t,Array.isArray(e)?e:[e]);t8[r]||(t8[r]=new WeakMap);var o=t8[r],a=[],s=new Set,l=new Set(i),u=function(e){!e||s.has(e)||(s.add(e),u(e.parentNode))};i.forEach(u);var d=function(e){!e||l.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))d(e);else{var t=e.getAttribute(n),i=null!==t&&"false"!==t,l=(t6.get(e)||0)+1,u=(o.get(e)||0)+1;t6.set(e,l),o.set(e,u),a.push(e),1===l&&i&&t4.set(e,!0),1===u&&e.setAttribute(r,"true"),i||e.setAttribute(n,"true")}})};return d(t),s.clear(),t5++,function(){a.forEach(function(e){var t=t6.get(e)-1,i=o.get(e)-1;t6.set(e,t),o.set(e,i),t||(t4.has(e)||e.removeAttribute(n),t4.delete(e)),i||e.removeAttribute(r)}),--t5||(t6=new WeakMap,t6=new WeakMap,t4=new WeakMap,t8={})}},rt=function(e,t,r){void 0===r&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),i=t||t3(e);return i?(n.push.apply(n,Array.from(i.querySelectorAll("[aria-live]"))),re(n,i,r,"aria-hidden")):function(){return null}};let rr="Dialog",[rn,ri]=ey(rr),[ro,ra]=rn(rr),rs=e=>{let{__scopeDialog:t,children:r,open:n,defaultOpen:i,onOpenChange:a,modal:s=!0}=e,l=(0,o.useRef)(null),u=(0,o.useRef)(null),[d=!1,c]=eO({prop:n,defaultProp:i,onChange:a});return(0,o.createElement)(ro,{scope:t,triggerRef:l,contentRef:u,contentId:e_(),titleId:e_(),descriptionId:e_(),open:d,onOpenChange:c,onOpenToggle:(0,o.useCallback)(()=>c(e=>!e),[c]),modal:s},r)},rl="DialogPortal",[ru,rd]=rn(rl,{forceMount:void 0}),rc=e=>{let{__scopeDialog:t,forceMount:r,children:n,container:i}=e,a=ra(rl,t);return(0,o.createElement)(ru,{scope:t,forceMount:r},o.Children.map(n,e=>(0,o.createElement)(e5,{present:r||a.open},(0,o.createElement)(e4,{asChild:!0,container:i},e))))},rp="DialogOverlay",rf=(0,o.forwardRef)((e,t)=>{let r=rd(rp,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,a=ra(rp,e.__scopeDialog);return a.modal?(0,o.createElement)(e5,{present:n||a.open},(0,o.createElement)(rh,(0,ec.Z)({},i,{ref:t}))):null}),rh=(0,o.forwardRef)((e,t)=>{let{__scopeDialog:r,...n}=e,i=ra(rp,r);return(0,o.createElement)(t2,{as:eI,allowPinchZoom:!0,shards:[i.contentRef]},(0,o.createElement)(ex.div,(0,ec.Z)({"data-state":rO(i.open)},n,{ref:t,style:{pointerEvents:"auto",...n.style}})))}),rg="DialogContent",rm=(0,o.forwardRef)((e,t)=>{let r=rd(rg,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,a=ra(rg,e.__scopeDialog);return(0,o.createElement)(e5,{present:n||a.open},a.modal?(0,o.createElement)(ry,(0,ec.Z)({},i,{ref:t})):(0,o.createElement)(rv,(0,ec.Z)({},i,{ref:t})))}),ry=(0,o.forwardRef)((e,t)=>{let r=ra(rg,e.__scopeDialog),n=(0,o.useRef)(null),i=eg(t,r.contentRef,n);return(0,o.useEffect)(()=>{let e=n.current;if(e)return rt(e)},[]),(0,o.createElement)(rb,(0,ec.Z)({},e,{ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ep(e.onCloseAutoFocus,e=>{var t;e.preventDefault(),null===(t=r.triggerRef.current)||void 0===t||t.focus()}),onPointerDownOutside:ep(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey;(2===t.button||r)&&e.preventDefault()}),onFocusOutside:ep(e.onFocusOutside,e=>e.preventDefault())}))}),rv=(0,o.forwardRef)((e,t)=>{let r=ra(rg,e.__scopeDialog),n=(0,o.useRef)(!1),i=(0,o.useRef)(!1);return(0,o.createElement)(rb,(0,ec.Z)({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var o,a;null===(o=e.onCloseAutoFocus)||void 0===o||o.call(e,t),t.defaultPrevented||(n.current||null===(a=r.triggerRef.current)||void 0===a||a.focus(),t.preventDefault()),n.current=!1,i.current=!1},onInteractOutside:t=>{var o,a;null===(o=e.onInteractOutside)||void 0===o||o.call(e,t),t.defaultPrevented||(n.current=!0,"pointerdown"!==t.detail.originalEvent.type||(i.current=!0));let s=t.target;(null===(a=r.triggerRef.current)||void 0===a?void 0:a.contains(s))&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&i.current&&t.preventDefault()}}))}),rb=(0,o.forwardRef)((e,t)=>{let{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:i,onCloseAutoFocus:a,...s}=e,l=ra(rg,r),u=eg(t,(0,o.useRef)(null));return tt(),(0,o.createElement)(o.Fragment,null,(0,o.createElement)(eQ,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:i,onUnmountAutoFocus:a},(0,o.createElement)(ej,(0,ec.Z)({role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":rO(l.open)},s,{ref:u,onDismiss:()=>l.onOpenChange(!1)}))),!1)}),rS="DialogTitle",rw=(0,o.forwardRef)((e,t)=>{let{__scopeDialog:r,...n}=e,i=ra(rS,r);return(0,o.createElement)(ex.h2,(0,ec.Z)({id:i.titleId},n,{ref:t}))}),r_="DialogDescription",rk=(0,o.forwardRef)((e,t)=>{let{__scopeDialog:r,...n}=e,i=ra(r_,r);return(0,o.createElement)(ex.p,(0,ec.Z)({id:i.descriptionId},n,{ref:t}))});function rO(e){return e?"open":"closed"}let[rP,rA]=em("DialogTitleWarning",{contentName:rg,titleName:rS,docsSlug:"dialog"}),rI=rf,rR=rm,rE=rw,rT=rk;var rN=rs,rx=rc,rB=o.forwardRef((e,t)=>{var r=e,{className:n}=r,i=(0,s.S0)(r,["className"]);return(0,ea.jsx)(rI,(0,s.ih)({className:eo("ui-bg-black/80 ui-data-[state=open]:ui-animate-in ui-data-[state=closed]:ui-animate-out ui-data-[state=closed]:ui-fade-out-0 ui-data-[state=open]:ui-fade-in-0 ui-fixed ui-inset-0 ui-z-50 ui-backdrop-blur-lg",n),ref:t},i))});rB.displayName=rI.displayName;var rC=o.forwardRef((e,t)=>{var r=e,{className:n,children:i}=r,o=(0,s.S0)(r,["className","children"]);return(0,ea.jsxs)(rx,{children:[(0,ea.jsx)(rB,{}),(0,ea.jsx)("div",{className:"ui-absolute ui-h-screen ui-w-screen ui-inset-0 ui-bg-modal-overlay ui-backdrop-blur-3xl ui-opacity-40 ui-bg-no-repeat ui-bg-cover ui-bg-center ui-bg-fixed ui-z-[60]"}),(0,ea.jsx)(rR,(0,s.EZ)((0,s.ih)({className:eo("ui-bg-black/20 ui-backdrop-blur-2xl ui-data-[state=open]:ui-animate-in ui-data-[state=closed]:ui-animate-out ui-data-[state=closed]:ui-fade-out-0 ui-data-[state=open]:ui-fade-in-0 ui-data-[state=closed]:ui-zoom-out-95 ui-data-[state=open]:ui-zoom-in-95 ui-data-[state=closed]:ui-slide-out-to-left-1/2 ui-data-[state=closed]:ui-slide-out-to-top-[48%] ui-data-[state=open]:ui-slide-in-from-left-1/2 ui-data-[state=open]:ui-slide-in-from-top-[48%] ui-fixed ui-z-[70] ui-grid ui-w-full ui-max-w-lg ui-gap-4 ui-p-6 ui-duration-200 sm:ui-rounded-[48px] ui-left-[50%] ui-top-[50%] ui-translate-x-[-50%] ui-translate-y-[-50%]",n),ref:t},o),{children:i}))]})});rC.displayName=rR.displayName,o.forwardRef((e,t)=>{var r=e,{className:n}=r,i=(0,s.S0)(r,["className"]);return(0,ea.jsx)(rE,(0,s.ih)({className:eo("ui-text-lg ui-font-semibold ui-leading-none ui-tracking-tight",n),ref:t},i))}).displayName=rE.displayName,o.forwardRef((e,t)=>{var r=e,{className:n}=r,i=(0,s.S0)(r,["className"]);return(0,ea.jsx)(rT,(0,s.ih)({className:eo("ui-text-neutral-500 ui-text-sm",n),ref:t},i))}).displayName=rT.displayName;var rM={coinDenom:"XION",coinMinimalDenom:"uxion",coinDecimals:6,gasPriceStep:{low:.01,average:.025,high:.03}},rD={rpc:"undefined",rest:"undefined",chainId:"base",chainName:"Xion Testnet",bip44:{coinType:118},bech32Config:{bech32PrefixAccAddr:"xion",bech32PrefixValAddr:"xionvaloper",bech32PrefixValPub:"xionvaloperpub",bech32PrefixAccPub:"xionpub",bech32PrefixConsAddr:"xionvalcons",bech32PrefixConsPub:"xionvalconspub"},stakeCurrency:rM,currencies:[rM],feeCurrencies:[rM],features:["cosmwasm"]},rU={...rD,rpc:"https://testnet-rpc.xion-api.com:443",rest:"https://testnet-api.xion-api.com:443",chainId:"xion-testnet-1",chainName:"Xion Testnet"};({...rD});var rJ=r(18722),rj=r(83552),rH=r(67357),rq=r(36173),rL=r(49400),rF=r(69721),rV=r(64471),rz=r(48821),rW=r(58015),rQ=r(86509),rG=r(97481),rK=r(43890),rY=r(39272),rZ=class extends rQ.Fl{get granteeAddress(){return this._granteeAddress}async getGranteeAccountData(){return this._signer.getAccounts().then(e=>{for(let t of e)if(t.address===this._granteeAddress)return t})}static async connectWithSigner(e,t,r){let n=await rK.Tendermint37Client.connect(e);return rZ.createWithSigner(n,t,r)}static async createWithSigner(e,t,r){return new rZ(e,t,r)}async getAccount(e){let t=await this.forceGetQueryClient().auth.account(e);return t?(0,rY.sf)(t):null}async signAndBroadcast(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";return e===this.granterAddress&&(e=this.granteeAddress,t=[{typeUrl:"/cosmos.authz.v1beta1.MsgExec",value:rG.MsgExec.fromPartial({grantee:this.granteeAddress,msgs:t.map(e=>this.registry.encodeAsAny(e))})}]),super.signAndBroadcast(e,t,r,n)}async sign(e,t,r,n,i){return e===this.granterAddress&&(e=this.granteeAddress,t=[{typeUrl:"/cosmos.authz.v1beta1.MsgExec",value:rG.MsgExec.fromPartial({grantee:e,msgs:t.map(e=>this.registry.encodeAsAny(e))})}]),super.sign(e,t,r,n,i)}constructor(e,t,{granterAddress:r,granteeAddress:n,...i}){if(super(e,t,i),void 0===r)throw Error("granterAddress is required");if(this.granterAddress=r,void 0===n)throw Error("granteeAddress is required");this._granteeAddress=n,this._signer=t}},rX=r(23663).Buffer,r$=(0,o.createContext)({});function r0(e){let{children:t,contracts:r,dashboardUrl:n="https://dashboard.burnt.com",rpcUrl:i=rU.rpc,restUrl:a=rU.rest,stake:s=!1,bank:l}=e,[u,d]=(0,o.useState)(""),[c,p]=(0,o.useState)(!1),[f,h]=(0,o.useState)(!1),[g,m]=(0,o.useState)(!1),[y,v]=(0,o.useState)(void 0),[b,S]=(0,o.useState)("");(0,o.useEffect)(()=>{"true"===new URLSearchParams(window.location.search).get("granted")&&m(!0)},[]);let w=()=>{p(!1),localStorage.removeItem("xion-authz-temp-account"),localStorage.removeItem("xion-authz-granter-account"),v(void 0),S("")};return(0,ea.jsx)(r$.Provider,{value:{isConnected:c,setIsConnected:p,isConnecting:f,setIsConnecting:h,abstraxionError:u,setAbstraxionError:d,abstraxionAccount:y,setAbstraxionAccount:v,granterAddress:b,showModal:g,setShowModal:m,setGranterAddress:S,contracts:r,dashboardUrl:n,rpcUrl:i,restUrl:a,stake:s,bank:l,logout:w},children:t})}var r1=()=>(0,ea.jsxs)(es,{children:[(0,ea.jsxs)("div",{className:"ui-flex ui-flex-col ui-w-full ui-text-center",children:[(0,ea.jsx)("h1",{className:"ui-w-full ui-tracking-tighter ui-text-3xl ui-font-bold ui-text-white ui-uppercase ui-mb-3",children:"Connecting..."}),(0,ea.jsx)("h2",{className:"ui-w-full ui-tracking-tighter ui-text-sm ui-mb-4 ui-text-neutral-500",children:"Signing you in... Don’t close the window."})]}),(0,ea.jsx)("div",{className:"ui-flex ui-h-full ui-w-full ui-items-center ui-justify-center ui-text-white",children:(0,ea.jsx)(el,{})})]});function r2(){return(0,ea.jsxs)("div",{className:"ui-flex ui-h-full ui-w-full ui-flex-col ui-items-start ui-justify-center ui-gap-4 ui-p-8 ui-text-center",children:[(0,ea.jsx)("h1",{className:"ui-text-3xl ui-font-bold ui-uppercase ui-tracking-tighter ui-text-white",children:"Oops! Something went wrong..."}),(0,ea.jsx)("h2",{className:"ui-tracking-tight ui-text-neutral-500",children:"Please try refreshing the page. If the problem continues, check your internet connection or try again later."}),(0,ea.jsx)(eu.z,{structure:"naked",fullWidth:!0,onClick:()=>{window.location.reload()},children:"Refresh the page"})]})}function r3(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1e3;return new Promise(t=>{setTimeout(t,e)})}function r6(){let{setIsConnecting:e,setIsConnected:t,setAbstraxionAccount:r,setGranterAddress:n,granterAddress:i,contracts:a,dashboardUrl:s,restUrl:l,stake:u,bank:d}=(0,o.useContext)(r$),c=(0,o.useRef)(!1),[p,f]=(0,o.useState)("");function h(e){n(e),localStorage.setItem("xion-authz-granter-account",e)}function g(e,t){let r=window.location.href,n=new URLSearchParams;d&&n.set("bank",JSON.stringify(d)),u&&n.set("stake","true"),n.set("grantee",e),t&&n.set("contracts",JSON.stringify(t)),n.set("redirect_uri",r);let i=n.toString();window.location.href="".concat(s,"?").concat(i)}async function m(){let e=await rJ.DirectSecp256k1HdWallet.generate(12,{prefix:"xion"}),t=await e.serialize("abstraxion");return localStorage.setItem("xion-authz-temp-account",t),e}async function y(t){if(!t)throw Error("No keypair address");e(!0);let r=!0;for(;r;)try{await r3(3e3);let e=await fetch("".concat(l,"/cosmos/authz/v1beta1/grants/grantee/").concat(t),{cache:"no-store"}),r=await e.json();if(r.grants.length>0){let e=r.grants.map(e=>e.granter),t=[...new Set(e)];t.length>1&&console.error("More than one granter found. Taking first."),h(t[0]);let n=new URL(window.location.href);n.searchParams.delete("granted"),history.pushState({},"",n.href);break}}catch(e){throw e}}return(0,o.useEffect)(()=>{async function n(){try{let n;let o=localStorage.getItem("xion-authz-temp-account");n=o?await rJ.DirectSecp256k1HdWallet.deserialize(o,"abstraxion"):await m();let s=new URLSearchParams(window.location.search).get("granted"),l=(await n.getAccounts())[0].address;f(l),s||i?s&&!i?(await y(l),e(!1),t(!0),r(n)):t(!0):g(l,a)}catch(e){console.log("Something went wrong: ",e)}}c.current||n(),c.current=!0},[]),(0,ea.jsxs)(es,{className:"ui-items-center",children:[(0,ea.jsxs)("div",{className:"ui-flex ui-flex-col ui-w-full ui-text-center",children:[(0,ea.jsx)("h1",{className:"ui-w-full ui-tracking-tighter ui-text-3xl ui-font-bold ui-text-white ui-uppercase ui-mb-3",children:"Secure account creation"}),(0,ea.jsx)("h2",{className:"ui-w-full ui-tracking-tighter ui-text-sm ui-mb-4 ui-text-neutral-500",children:"Please switch to the newly opened tab and enter your credentials to securely complete your account creation"})]}),(0,ea.jsx)(ed,{}),(0,ea.jsx)(eu.z,{onClick:()=>{g(p,a)},structure:"naked",children:"Have a Problem? Try Again"})]})}function r4(e){let{onClose:t}=e,{abstraxionError:r,isConnecting:n,isConnected:i,showModal:a,setShowModal:s}=(0,o.useContext)(r$);return((0,o.useEffect)(()=>{let e=e=>{e.key};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[t]),a)?i?(s(!1),null):(0,ea.jsx)(rN,{onOpenChange:t,open:a,children:(0,ea.jsx)(rC,{children:r?(0,ea.jsx)(r2,{}):n?(0,ea.jsx)(r1,{}):(0,ea.jsx)(r6,{})})}):null}function r8(e){let{children:t,config:r}=e;return(0,ea.jsx)(r0,{contracts:r.contracts,dashboardUrl:r.dashboardUrl,rpcUrl:r.rpcUrl,restUrl:r.restUrl,stake:r.stake,bank:r.bank,children:t})}var r5="directsecp256k1hdwallet-v1";function r7(e){return!!(0,rH.isNonNullObject)(e)&&"string"==typeof e.hdPath&&"string"==typeof e.prefix}var r9={bip39Password:"",hdPaths:[(0,rj.makeCosmoshubPath)(0)],prefix:"cosmos"},ne=class{static async fromMnemonic(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=new rL.EnglishMnemonic(e),n=await rL.Bip39.mnemonicToSeed(r,t.bip39Password);return new ne(r,{...t,seed:n})}static async deserialize(e,t){let r=JSON.parse(e);if(!(0,rH.isNonNullObject)(r))throw Error("Root document is not an object.");if(r.type===r5)return this.deserializeTypeV1(e,t);throw Error("Unsupported serialization type")}static async deserializeWithEncryptionKey(e,t){let r=JSON.parse(e);if(!(0,rH.isNonNullObject)(r))throw Error("Root document is not an object.");let n=r;if(n.type===r5){let e=await (0,rz.decrypt)((0,rF.fromBase64)(n.data),t,n.encryption),{mnemonic:r,accounts:i}=JSON.parse((0,rF.fromUtf8)(e));if((0,rH.assert)("string"==typeof r),!Array.isArray(i))throw Error("Property 'accounts' is not an array");if(!i.every(e=>r7(e)))throw Error("Account is not in the correct format.");let o=i[0].prefix;if(!i.every(e=>{let{prefix:t}=e;return t===o}))throw Error("Accounts do not all have the same prefix");let a=i.map(e=>{let{hdPath:t}=e;return(0,rL.stringToPath)(t)});return this.fromMnemonic(r,{hdPaths:a,prefix:o})}throw Error("Unsupported serialization type")}static async deserializeTypeV1(e,t){let r=JSON.parse(e);if(!(0,rH.isNonNullObject)(r))throw Error("Root document is not an object.");let n=await (0,rz.executeKdf)(t,r.kdf);return this.deserializeWithEncryptionKey(e,n)}async getKeyPair(e){let{privkey:t}=rL.Slip10.derivePath(rL.Slip10Curve.Secp256k1,this.seed,e),{pubkey:r}=await rL.Secp256k1.makeKeypair(t);return{privkey:t,pubkey:rL.Secp256k1.compressPubkey(r)}}async getAccountsWithPrivkeys(){return Promise.all(this.accounts.map(async e=>{let{hdPath:t,prefix:r}=e,{privkey:n,pubkey:i}=await this.getKeyPair(t),o=(0,rF.toBech32)(r,(0,rj.rawSecp256k1PubkeyToRawAddress)(i));return{algo:"secp256k1",privkey:n,pubkey:i,address:o}}))}constructor(e,t){var r,n;this.signArb=async(e,t)=>{let r=(await this.getAccountsWithPrivkeys()).find(t=>{let{address:r}=t;return r===e});if(void 0===r)throw Error("Address ".concat(e," not found in wallet"));let{privkey:n}=r,i=(0,rV.makeADR36AminoSignDoc)(e,t),o=(0,rV.serializeSignDoc)(i),a=rq.Hash.sha256(o),s=new rq.PrivKeySecp256k1(n).signDigest32(a);return rX.from(new Uint8Array([...s.r,...s.s])).toString("base64")};let i=null!==(r=t.prefix)&&void 0!==r?r:r9.prefix,o=null!==(n=t.hdPaths)&&void 0!==n?n:r9.hdPaths;this.secret=e,this.seed=t.seed,this.accounts=o.map(e=>({hdPath:e,prefix:i}))}},nt=()=>{let{isConnected:e,granterAddress:t,abstraxionAccount:r,isConnecting:n,setGranterAddress:i,setAbstraxionAccount:a,setIsConnected:s,setIsConnecting:l}=(0,o.useContext)(r$);return(0,o.useEffect)(()=>{async function e(){l(!0);let e=localStorage.getItem("xion-authz-temp-account");if(e){a(await rJ.DirectSecp256k1HdWallet.deserialize(e,"abstraxion"));let t=localStorage.getItem("xion-authz-granter-account");t&&(i(t),s(!0))}else localStorage.removeItem("xion-authz-granter-account"),a(void 0),i("");l(!1)}n||r||t||e()},[e,r,t]),{data:{bech32Address:t},isConnected:e}},nr=()=>{let{isConnected:e,abstraxionAccount:t,granterAddress:r,rpcUrl:n,logout:i}=(0,o.useContext)(r$),[a,s]=(0,o.useState)(void 0),l=async()=>{let e;let t=localStorage.getItem("xion-authz-temp-account");return t&&(e=await ne.deserialize(t,"abstraxion")),e},[u,d]=(0,o.useState)(void 0);return(0,o.useEffect)(()=>{(async function(){try{if(!t)throw Error("No account found.");if(!r)throw Error("No granter found.");let e=await t.getAccounts().then(e=>{if(0===e.length)throw Error("No account found.");return e[0].address}),i=await rZ.connectWithSigner(n||rU.rpc,t,{gasPrice:rW.GasPrice.fromString("0uxion"),granterAddress:r,granteeAddress:e}),o=await l();o&&s(o),d(i)}catch(e){console.log("Something went wrong: ",e),d(void 0)}})()},[e,t,r]),{client:u,signArb:null==a?void 0:a.signArb,logout:i}},nn=()=>{let{showModal:e,setShowModal:t}=(0,o.useContext)(r$);return[e,t]}},39272:function(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,{sf:function(){return customAccountFromAny}});var AAAlgo2,apolloClientInstance,_swc_helpers_tagged_template_literal__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(56093),_cosmjs_stargate__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(58015),bech32__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(73746),cosmjs_types_cosmos_tx_v1beta1_tx__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(26136),_cosmjs_proto_signing__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(18722),_cosmjs_tendermint_rpc__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(43890),cosmjs_types_cosmos_tx_signing_v1beta1_signing__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(2264),_cosmjs_amino__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(83552),_cosmjs_math__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(35801),_protobuf_ts_runtime__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__(65619),_protobuf_ts_runtime__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__(73654),_protobuf_ts_runtime__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__(2807),_cosmjs_utils__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(67357),_cosmjs_stargate_build_accounts__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(5491),_apollo_client__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__(77729),_apollo_client__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__(42680),_apollo_client__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__(22963),_cosmjs_cosmwasm_stargate__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(86509),cosmjs_types_cosmwasm_wasm_v1_tx__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__(88242),_cosmjs_crypto__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__(49400),Buffer=__webpack_require__(23663).Buffer;function _templateObject(){let e=(0,_swc_helpers_tagged_template_literal__WEBPACK_IMPORTED_MODULE_0__._)(["\n fragment SmartAccountFragment on SmartAccountAuthenticator {\n id\n type\n authenticator\n authenticatorIndex\n version\n }\n"]);return _templateObject=function(){return e},e}function _templateObject1(){let e=(0,_swc_helpers_tagged_template_literal__WEBPACK_IMPORTED_MODULE_0__._)(["\n ","\n query ($authenticator: String!) {\n smartAccounts(\n filter: {\n authenticators: { some: { authenticator: { equalTo: $authenticator } } }\n }\n ) {\n nodes {\n authenticators {\n nodes {\n ...SmartAccountFragment\n }\n }\n }\n }\n }\n"]);return _templateObject1=function(){return e},e}function _templateObject2(){let e=(0,_swc_helpers_tagged_template_literal__WEBPACK_IMPORTED_MODULE_0__._)(["\n ","\n query ($id: String!) {\n smartAccount(id: $id) {\n id\n latestAuthenticatorId\n authenticators {\n nodes {\n ...SmartAccountFragment\n }\n }\n }\n }\n"]);return _templateObject2=function(){return e},e}function _templateObject3(){let e=(0,_swc_helpers_tagged_template_literal__WEBPACK_IMPORTED_MODULE_0__._)(["\n ","\n query ($id: String!) {\n smartAccounts(filter: { id: { equalTo: $id } }) {\n nodes {\n authenticators {\n nodes {\n ...SmartAccountFragment\n }\n }\n }\n }\n }\n"]);return _templateObject3=function(){return e},e}function _templateObject4(){let e=(0,_swc_helpers_tagged_template_literal__WEBPACK_IMPORTED_MODULE_0__._)(["\n ","\n query ($id: String!, $index: Int!) {\n smartAccounts(filter: { id: { equalTo: $id } }) {\n nodes {\n authenticators(filter: { authenticatorIndex: { equalTo: $index } }) {\n nodes {\n ...SmartAccountFragment\n }\n }\n }\n }\n }\n"]);return _templateObject4=function(){return e},e}function _templateObject5(){let e=(0,_swc_helpers_tagged_template_literal__WEBPACK_IMPORTED_MODULE_0__._)(["\n ","\n query ($id: String!, $authenticator: String!) {\n smartAccounts(\n filter: {\n id: { equalTo: $id }\n authenticators: { some: { authenticator: { equalTo: $authenticator } } }\n }\n ) {\n nodes {\n authenticators {\n nodes {\n ...SmartAccountFragment\n }\n }\n }\n }\n }\n"]);return _templateObject5=function(){return e},e}function _templateObject6(){let e=(0,_swc_helpers_tagged_template_literal__WEBPACK_IMPORTED_MODULE_0__._)(["\n ","\n query ($id: String!, $type: String!) {\n smartAccounts(\n filter: {\n id: { equalTo: $id }\n authenticators: { some: { type: { equalTo: $type } } }\n }\n ) {\n nodes {\n authenticators {\n nodes {\n ...SmartAccountFragment\n }\n }\n }\n }\n }\n"]);return _templateObject6=function(){return e},e}function _templateObject7(){let e=(0,_swc_helpers_tagged_template_literal__WEBPACK_IMPORTED_MODULE_0__._)(["\n ","\n query ($id: String!, $type: String!, $authenticator: String!) {\n smartAccounts(\n filter: {\n id: { equalTo: $id }\n authenticators: {\n some: {\n authenticator: { equalTo: $authenticator }\n type: { equalTo: $type }\n }\n }\n }\n ) {\n nodes {\n authenticators {\n nodes {\n ...SmartAccountFragment\n }\n }\n }\n }\n }\n"]);return _templateObject7=function(){return e},e}var __create=Object.create,__defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty,__commonJS=(e,t)=>function(){return t||(0,e[__getOwnPropNames(e)[0]])((t={exports:{}}).exports,t),t.exports},__copyProps=(e,t,r,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of __getOwnPropNames(t))__hasOwnProp.call(e,i)||i===r||__defProp(e,i,{get:()=>t[i],enumerable:!(n=__getOwnPropDesc(t,i))||n.enumerable});return e},__toESM=(e,t,r)=>(r=null!=e?__create(__getProtoOf(e)):{},__copyProps(!t&&e&&e.__esModule?r:__defProp(r,"default",{value:e,enumerable:!0}),e)),require_aspromise=__commonJS({"../../node_modules/.pnpm/@protobufjs+aspromise@1.1.2/node_modules/@protobufjs/aspromise/index.js"(e,t){t.exports=r;function r(e,t){for(var r=Array(arguments.length-1),n=0,i=2,o=!0;i1&&"="===e.charAt(t);)++r;return Math.ceil(3*e.length)/4-r};var n=Array(64),i=Array(123);for(t=0;t<64;)i[n[t]=t<26?t+65:t<52?t+71:t<62?t-4:t-59|43]=t++;r.encode=function(e,t,r){for(var i,o=null,a=[],s=0,l=0;t>2],i=(3&u)<<4,l=1;break;case 1:a[s++]=n[i|u>>4],i=(15&u)<<2,l=2;break;case 2:a[s++]=n[i|u>>6],a[s++]=n[63&u],l=0}s>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,a)),s=0)}return(l&&(a[s++]=n[i],a[s++]=61,1===l&&(a[s++]=61)),o)?(s&&o.push(String.fromCharCode.apply(String,a.slice(0,s))),o.join("")):String.fromCharCode.apply(String,a.slice(0,s))};var o="invalid encoding";r.decode=function(e,t,r){for(var n,a=r,s=0,l=0;l1)break;if(void 0===(u=i[u]))throw Error(o);switch(s){case 0:n=u,s=1;break;case 1:t[r++]=n<<2|(48&u)>>4,n=u,s=2;break;case 2:t[r++]=(15&n)<<4|(60&u)>>2,n=u,s=3;break;case 3:t[r++]=(3&n)<<6|u,s=0}}if(1===s)throw Error(o);return r-a},r.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}}}),require_eventemitter=__commonJS({"../../node_modules/.pnpm/@protobufjs+eventemitter@1.1.0/node_modules/@protobufjs/eventemitter/index.js"(e,t){function r(){this._listeners={}}t.exports=r,r.prototype.on=function(e,t,r){return(this._listeners[e]||(this._listeners[e]=[])).push({fn:t,ctx:r||this}),this},r.prototype.off=function(e,t){if(void 0===e)this._listeners={};else if(void 0===t)this._listeners[e]=[];else for(var r=this._listeners[e],n=0;n0?0:2147483648,r,n);else if(isNaN(t))e(2143289344,r,n);else if(t>34028234663852886e22)e((i<<31|2139095040)>>>0,r,n);else if(t<11754943508222875e-54)e((i<<31|Math.round(t/1401298464324817e-60))>>>0,r,n);else{var o=Math.floor(Math.log(t)/Math.LN2),a=8388607&Math.round(t*Math.pow(2,-o)*8388608);e((i<<31|o+127<<23|a)>>>0,r,n)}}function r(e,t,r){var n=e(t,r),i=(n>>31)*2+1,o=n>>>23&255,a=8388607&n;return 255===o?a?NaN:1/0*i:0===o?1401298464324817e-60*i*a:i*Math.pow(2,o-150)*(a+8388608)}e.writeFloatLE=t.bind(null,n),e.writeFloatBE=t.bind(null,i),e.readFloatLE=r.bind(null,o),e.readFloatBE=r.bind(null,a)}(),"undefined"!=typeof Float64Array?function(){var t=new Float64Array([-0]),r=new Uint8Array(t.buffer),n=128===r[7];function i(e,n,i){t[0]=e,n[i]=r[0],n[i+1]=r[1],n[i+2]=r[2],n[i+3]=r[3],n[i+4]=r[4],n[i+5]=r[5],n[i+6]=r[6],n[i+7]=r[7]}function o(e,n,i){t[0]=e,n[i]=r[7],n[i+1]=r[6],n[i+2]=r[5],n[i+3]=r[4],n[i+4]=r[3],n[i+5]=r[2],n[i+6]=r[1],n[i+7]=r[0]}function a(e,n){return r[0]=e[n],r[1]=e[n+1],r[2]=e[n+2],r[3]=e[n+3],r[4]=e[n+4],r[5]=e[n+5],r[6]=e[n+6],r[7]=e[n+7],t[0]}function s(e,n){return r[7]=e[n],r[6]=e[n+1],r[5]=e[n+2],r[4]=e[n+3],r[3]=e[n+4],r[2]=e[n+5],r[1]=e[n+6],r[0]=e[n+7],t[0]}e.writeDoubleLE=n?i:o,e.writeDoubleBE=n?o:i,e.readDoubleLE=n?a:s,e.readDoubleBE=n?s:a}():function(){function t(e,t,r,n,i,o){var a,s=n<0?1:0;if(s&&(n=-n),0===n)e(0,i,o+t),e(1/n>0?0:2147483648,i,o+r);else if(isNaN(n))e(0,i,o+t),e(2146959360,i,o+r);else if(n>17976931348623157e292)e(0,i,o+t),e((s<<31|2146435072)>>>0,i,o+r);else if(n<22250738585072014e-324)e((a=n/5e-324)>>>0,i,o+t),e((s<<31|a/4294967296)>>>0,i,o+r);else{var l=Math.floor(Math.log(n)/Math.LN2);1024===l&&(l=1023),e(4503599627370496*(a=n*Math.pow(2,-l))>>>0,i,o+t),e((s<<31|l+1023<<20|1048576*a&1048575)>>>0,i,o+r)}}function r(e,t,r,n,i){var o=e(n,i+t),a=e(n,i+r),s=(a>>31)*2+1,l=a>>>20&2047,u=4294967296*(1048575&a)+o;return 2047===l?u?NaN:1/0*s:0===l?5e-324*s*u:s*Math.pow(2,l-1075)*(u+4503599627370496)}e.writeDoubleLE=t.bind(null,n,0,4),e.writeDoubleBE=t.bind(null,i,4,0),e.readDoubleLE=r.bind(null,o,0,4),e.readDoubleBE=r.bind(null,a,4,0)}(),e}function n(e,t,r){t[r]=255&e,t[r+1]=e>>>8&255,t[r+2]=e>>>16&255,t[r+3]=e>>>24}function i(e,t,r){t[r]=e>>>24,t[r+1]=e>>>16&255,t[r+2]=e>>>8&255,t[r+3]=255&e}function o(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}function a(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}t.exports=r(r)}}),require_inquire=__commonJS({"../../node_modules/.pnpm/@protobufjs+inquire@1.1.0/node_modules/@protobufjs/inquire/index.js"(exports,module){module.exports=inquire;function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(e){}return null}}}),require_utf8=__commonJS({"../../node_modules/.pnpm/@protobufjs+utf8@1.1.0/node_modules/@protobufjs/utf8/index.js"(e){var t=e;t.length=function(e){for(var t=0,r=0,n=0;n191&&n<224?o[a++]=(31&n)<<6|63&e[t++]:n>239&&n<365?(n=((7&n)<<18|(63&e[t++])<<12|(63&e[t++])<<6|63&e[t++])-65536,o[a++]=55296+(n>>10),o[a++]=56320+(1023&n)):o[a++]=(15&n)<<12|(63&e[t++])<<6|63&e[t++],a>8191&&((i||(i=[])).push(String.fromCharCode.apply(String,o)),a=0);return i?(a&&i.push(String.fromCharCode.apply(String,o.slice(0,a))),i.join("")):String.fromCharCode.apply(String,o.slice(0,a))},t.write=function(e,t,r){for(var n,i,o=r,a=0;a>6|192:((64512&n)==55296&&(64512&(i=e.charCodeAt(a+1)))==56320?(n=65536+((1023&n)<<10)+(1023&i),++a,t[r++]=n>>18|240,t[r++]=n>>12&63|128):t[r++]=n>>12|224,t[r++]=n>>6&63|128),t[r++]=63&n|128);return r-o}}}),require_pool=__commonJS({"../../node_modules/.pnpm/@protobufjs+pool@1.1.0/node_modules/@protobufjs/pool/index.js"(e,t){t.exports=r;function r(e,t,r){var n=r||8192,i=n>>>1,o=null,a=n;return function(r){if(r<1||r>i)return e(r);a+r>n&&(o=e(n),a=0);var s=t.call(o,a,a+=r);return 7&a&&(a=(7|a)+1),s}}}}),require_longbits=__commonJS({"../../node_modules/.pnpm/protobufjs@7.2.5/node_modules/protobufjs/src/util/longbits.js"(e,t){t.exports=n;var r=require_minimal();function n(e,t){this.lo=e>>>0,this.hi=t>>>0}var i=n.zero=new n(0,0);i.toNumber=function(){return 0},i.zzEncode=i.zzDecode=function(){return this},i.length=function(){return 1};var o=n.zeroHash="\x00\x00\x00\x00\x00\x00\x00\x00";n.fromNumber=function(e){if(0===e)return i;var t=e<0;t&&(e=-e);var r=e>>>0,o=(e-r)/4294967296>>>0;return t&&(o=~o>>>0,r=~r>>>0,++r>4294967295&&(r=0,++o>4294967295&&(o=0))),new n(r,o)},n.from=function(e){if("number"==typeof e)return n.fromNumber(e);if(r.isString(e)){if(!r.Long)return n.fromNumber(parseInt(e,10));e=r.Long.fromString(e)}return e.low||e.high?new n(e.low>>>0,e.high>>>0):i},n.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var t=~this.lo+1>>>0,r=~this.hi>>>0;return t||(r=r+1>>>0),-(t+4294967296*r)}return this.lo+4294967296*this.hi},n.prototype.toLong=function(e){return r.Long?new r.Long(0|this.lo,0|this.hi,!!e):{low:0|this.lo,high:0|this.hi,unsigned:!!e}};var a=String.prototype.charCodeAt;n.fromHash=function(e){return e===o?i:new n((a.call(e,0)|a.call(e,1)<<8|a.call(e,2)<<16|a.call(e,3)<<24)>>>0,(a.call(e,4)|a.call(e,5)<<8|a.call(e,6)<<16|a.call(e,7)<<24)>>>0)},n.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},n.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},n.prototype.zzDecode=function(){var e=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},n.prototype.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,r=this.hi>>>24;return 0===r?0===t?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:r<128?9:10}}}),require_minimal=__commonJS({"../../node_modules/.pnpm/protobufjs@7.2.5/node_modules/protobufjs/src/util/minimal.js"(e){var t=e;function r(e,t,r){for(var n=Object.keys(t),i=0;i0)},t.Buffer=function(){try{var e=t.inquire("buffer").Buffer;return e.prototype.utf8Write?e:null}catch(e){return null}}(),t._Buffer_from=null,t._Buffer_allocUnsafe=null,t.newBuffer=function(e){return"number"==typeof e?t.Buffer?t._Buffer_allocUnsafe(e):new t.Array(e):t.Buffer?t._Buffer_from(e):"undefined"==typeof Uint8Array?e:new Uint8Array(e)},t.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,t.Long=t.global.dcodeIO&&t.global.dcodeIO.Long||t.global.Long||t.inquire("long"),t.key2Re=/^true|false|0|1$/,t.key32Re=/^-?(?:0|[1-9][0-9]*)$/,t.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,t.longToHash=function(e){return e?t.LongBits.from(e).toHash():t.LongBits.zeroHash},t.longFromHash=function(e,r){var n=t.LongBits.fromHash(e);return t.Long?t.Long.fromBits(n.lo,n.hi,r):n.toNumber(!!r)},t.merge=r,t.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},t.newError=n,t.ProtocolError=n("ProtocolError"),t.oneOfGetter=function(e){for(var t={},r=0;r-1;--r)if(1===t[e[r]]&&void 0!==this[e[r]]&&null!==this[e[r]])return e[r]}},t.oneOfSetter=function(e){return function(t){for(var r=0;r127;)t[r++]=127&e|128,e>>>=7;t[r]=e}function h(e,t){this.len=e,this.next=void 0,this.val=t}function g(e,t,r){for(;e.hi;)t[r++]=127&e.lo|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[r++]=127&e.lo|128,e.lo=e.lo>>>7;t[r++]=e.lo}function m(e,t,r){t[r]=255&e,t[r+1]=e>>>8&255,t[r+2]=e>>>16&255,t[r+3]=e>>>24}d.create=c(),d.alloc=function(e){return new n.Array(e)},n.Array!==Array&&(d.alloc=n.pool(d.alloc,n.Array.prototype.subarray)),d.prototype._push=function(e,t,r){return this.tail=this.tail.next=new s(e,t,r),this.len+=t,this},h.prototype=Object.create(s.prototype),h.prototype.fn=f,d.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new h((e>>>=0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this},d.prototype.int32=function(e){return e<0?this._push(g,10,i.fromNumber(e)):this.uint32(e)},d.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},d.prototype.uint64=function(e){var t=i.from(e);return this._push(g,t.length(),t)},d.prototype.int64=d.prototype.uint64,d.prototype.sint64=function(e){var t=i.from(e).zzEncode();return this._push(g,t.length(),t)},d.prototype.bool=function(e){return this._push(p,1,e?1:0)},d.prototype.fixed32=function(e){return this._push(m,4,e>>>0)},d.prototype.sfixed32=d.prototype.fixed32,d.prototype.fixed64=function(e){var t=i.from(e);return this._push(m,4,t.lo)._push(m,4,t.hi)},d.prototype.sfixed64=d.prototype.fixed64,d.prototype.float=function(e){return this._push(n.float.writeFloatLE,4,e)},d.prototype.double=function(e){return this._push(n.float.writeDoubleLE,8,e)};var y=n.Array.prototype.set?function(e,t,r){t.set(e,r)}:function(e,t,r){for(var n=0;n>>0;if(!t)return this._push(p,1,0);if(n.isString(e)){var r=d.alloc(t=o.length(e));o.decode(e,r,0),e=r}return this.uint32(t)._push(y,t,e)},d.prototype.string=function(e){var t=a.length(e);return t?this.uint32(t)._push(a.write,t,e):this._push(p,1,0)},d.prototype.fork=function(){return this.states=new u(this),this.head=this.tail=new s(l,0,0),this.len=0,this},d.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new s(l,0,0),this.len=0),this},d.prototype.ldelim=function(){var e=this.head,t=this.tail,r=this.len;return this.reset().uint32(r),r&&(this.tail.next=e.next,this.tail=t,this.len+=r),this},d.prototype.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),r=0;e;)e.fn(e.val,t,r),r+=e.len,e=e.next;return t},d._configure=function(e){r=e,d.create=c(),r._configure()}}}),require_writer_buffer=__commonJS({"../../node_modules/.pnpm/protobufjs@7.2.5/node_modules/protobufjs/src/writer_buffer.js"(e,t){t.exports=i;var r=require_writer();(i.prototype=Object.create(r.prototype)).constructor=i;var n=require_minimal();function i(){r.call(this)}function o(e,t,r){e.length<40?n.utf8.write(e,t,r):t.utf8Write?t.utf8Write(e,r):t.write(e,r)}i._configure=function(){i.alloc=n._Buffer_allocUnsafe,i.writeBytesBuffer=n.Buffer&&n.Buffer.prototype instanceof Uint8Array&&"set"===n.Buffer.prototype.set.name?function(e,t,r){t.set(e,r)}:function(e,t,r){if(e.copy)e.copy(t,r,0,e.length);else for(var n=0;n>>0;return this.uint32(t),t&&this._push(i.writeBytesBuffer,t,e),this},i.prototype.string=function(e){var t=n.Buffer.byteLength(e);return this.uint32(t),t&&this._push(o,t,e),this},i._configure()}}),require_reader=__commonJS({"../../node_modules/.pnpm/protobufjs@7.2.5/node_modules/protobufjs/src/reader.js"(e,t){t.exports=s;var r,n=require_minimal(),i=n.LongBits,o=n.utf8;function a(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function s(e){this.buf=e,this.pos=0,this.len=e.length}var l="undefined"!=typeof Uint8Array?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new s(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new s(e);throw Error("illegal buffer")},u=function(){return n.Buffer?function(e){return(s.create=function(e){return n.Buffer.isBuffer(e)?new r(e):l(e)})(e)}:l};function d(){var e=new i(0,0),t=0;if(this.len-this.pos>4){for(;t<4;++t)if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e;t=0}else{for(;t<3;++t){if(this.pos>=this.len)throw a(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e}return e.lo=(e.lo|(127&this.buf[this.pos++])<<7*t)>>>0,e}if(this.len-this.pos>4){for(;t<5;++t)if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}else for(;t<5;++t){if(this.pos>=this.len)throw a(this);if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}function c(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function p(){if(this.pos+8>this.len)throw a(this,8);return new i(c(this.buf,this.pos+=4),c(this.buf,this.pos+=4))}s.create=u(),s.prototype._slice=n.Array.prototype.subarray||n.Array.prototype.slice,s.prototype.uint32=function(){var e=4294967295;return function(){if(e=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128||(e=(e|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)||(e=(e|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)||(e=(e|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)||(e=(e|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128))return e;if((this.pos+=5)>this.len)throw this.pos=this.len,a(this,10);return e}}(),s.prototype.int32=function(){return 0|this.uint32()},s.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)|0},s.prototype.bool=function(){return 0!==this.uint32()},s.prototype.fixed32=function(){if(this.pos+4>this.len)throw a(this,4);return c(this.buf,this.pos+=4)},s.prototype.sfixed32=function(){if(this.pos+4>this.len)throw a(this,4);return 0|c(this.buf,this.pos+=4)},s.prototype.float=function(){if(this.pos+4>this.len)throw a(this,4);var e=n.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e},s.prototype.double=function(){if(this.pos+8>this.len)throw a(this,4);var e=n.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e},s.prototype.bytes=function(){var e=this.uint32(),t=this.pos,r=this.pos+e;if(r>this.len)throw a(this,e);if(this.pos+=e,Array.isArray(this.buf))return this.buf.slice(t,r);if(t===r){var i=n.Buffer;return i?i.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,t,r)},s.prototype.string=function(){var e=this.bytes();return o.read(e,0,e.length)},s.prototype.skip=function(e){if("number"==typeof e){if(this.pos+e>this.len)throw a(this,e);this.pos+=e}else do if(this.pos>=this.len)throw a(this);while(128&this.buf[this.pos++]);return this},s.prototype.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!=(e=7&this.uint32());)this.skipType(e);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this},s._configure=function(e){r=e,s.create=u(),r._configure();var t=n.Long?"toLong":"toNumber";n.merge(s.prototype,{int64:function(){return d.call(this)[t](!1)},uint64:function(){return d.call(this)[t](!0)},sint64:function(){return d.call(this).zzDecode()[t](!1)},fixed64:function(){return p.call(this)[t](!0)},sfixed64:function(){return p.call(this)[t](!1)}})}}}),require_reader_buffer=__commonJS({"../../node_modules/.pnpm/protobufjs@7.2.5/node_modules/protobufjs/src/reader_buffer.js"(e,t){t.exports=i;var r=require_reader();(i.prototype=Object.create(r.prototype)).constructor=i;var n=require_minimal();function i(e){r.call(this,e)}i._configure=function(){n.Buffer&&(i.prototype._slice=n.Buffer.prototype.slice)},i.prototype.string=function(){var e=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+e,this.len))},i._configure()}}),require_service=__commonJS({"../../node_modules/.pnpm/protobufjs@7.2.5/node_modules/protobufjs/src/rpc/service.js"(e,t){t.exports=n;var r=require_minimal();function n(e,t,n){if("function"!=typeof e)throw TypeError("rpcImpl must be a function");r.EventEmitter.call(this),this.rpcImpl=e,this.requestDelimited=!!t,this.responseDelimited=!!n}(n.prototype=Object.create(r.EventEmitter.prototype)).constructor=n,n.prototype.rpcCall=function e(t,n,i,o,a){if(!o)throw TypeError("request must be specified");var s=this;if(!a)return r.asPromise(e,s,t,n,i,o);if(!s.rpcImpl){setTimeout(function(){a(Error("already ended"))},0);return}try{return s.rpcImpl(t,n[s.requestDelimited?"encodeDelimited":"encode"](o).finish(),function(e,r){if(e)return s.emit("error",e,t),a(e);if(null===r){s.end(!0);return}if(!(r instanceof i))try{r=i[s.responseDelimited?"decodeDelimited":"decode"](r)}catch(e){return s.emit("error",e,t),a(e)}return s.emit("data",r,t),a(null,r)})}catch(e){s.emit("error",e,t),setTimeout(function(){a(e)},0);return}},n.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}}}),require_rpc=__commonJS({"../../node_modules/.pnpm/protobufjs@7.2.5/node_modules/protobufjs/src/rpc.js"(e){e.Service=require_service()}}),require_roots=__commonJS({"../../node_modules/.pnpm/protobufjs@7.2.5/node_modules/protobufjs/src/roots.js"(e,t){t.exports={}}}),require_index_minimal=__commonJS({"../../node_modules/.pnpm/protobufjs@7.2.5/node_modules/protobufjs/src/index-minimal.js"(e){var t=e;function r(){t.util._configure(),t.Writer._configure(t.BufferWriter),t.Reader._configure(t.BufferReader)}t.build="minimal",t.Writer=require_writer(),t.BufferWriter=require_writer_buffer(),t.Reader=require_reader(),t.BufferReader=require_reader_buffer(),t.util=require_minimal(),t.rpc=require_rpc(),t.roots=require_roots(),t.configure=r,r()}}),require_minimal2=__commonJS({"../../node_modules/.pnpm/protobufjs@7.2.5/node_modules/protobufjs/minimal.js"(e,t){t.exports=require_index_minimal()}}),wasm=null;try{wasm=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(e){}function Long(e,t,r){this.low=0|e,this.high=0|t,this.unsigned=!!r}function isLong(e){return!0===(e&&e.__isLong__)}function ctz32(e){var t=Math.clz32(e&-e);return e?31-t:t}Long.prototype.__isLong__,Object.defineProperty(Long.prototype,"__isLong__",{value:!0}),Long.isLong=isLong;var INT_CACHE={},UINT_CACHE={};function fromInt(e,t){var r,n,i;return t?(e>>>=0,(i=0<=e&&e<256)&&(n=UINT_CACHE[e]))?n:(r=fromBits(e,0,!0),i&&(UINT_CACHE[e]=r),r):(e|=0,(i=-128<=e&&e<128)&&(n=INT_CACHE[e]))?n:(r=fromBits(e,e<0?-1:0,!1),i&&(INT_CACHE[e]=r),r)}function fromNumber(e,t){if(isNaN(e))return t?UZERO:ZERO;if(t){if(e<0)return UZERO;if(e>=TWO_PWR_64_DBL)return MAX_UNSIGNED_VALUE}else{if(e<=-TWO_PWR_63_DBL)return MIN_VALUE;if(e+1>=TWO_PWR_63_DBL)return MAX_VALUE}return e<0?fromNumber(-e,t).neg():fromBits(e%TWO_PWR_32_DBL|0,e/TWO_PWR_32_DBL|0,t)}function fromBits(e,t,r){return new Long(e,t,r)}Long.fromInt=fromInt,Long.fromNumber=fromNumber,Long.fromBits=fromBits;var pow_dbl=Math.pow;function fromString(e,t,r){if(0===e.length)throw Error("empty string");if("number"==typeof t?(r=t,t=!1):t=!!t,"NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return t?UZERO:ZERO;if((r=r||10)<2||360)throw Error("interior hyphen");if(0===n)return fromString(e.substring(1),t,r).neg();for(var n,i=fromNumber(pow_dbl(r,8)),o=ZERO,a=0;a>>0:this.low},LongPrototype.toNumber=function(){return this.unsigned?(this.high>>>0)*TWO_PWR_32_DBL+(this.low>>>0):this.high*TWO_PWR_32_DBL+(this.low>>>0)},LongPrototype.toString=function(e){if((e=e||10)<2||36>>0).toString(e);if((o=s).isZero())return l+a;for(;l.length<6;)l="0"+l;a=""+l+a}},LongPrototype.getHighBits=function(){return this.high},LongPrototype.getHighBitsUnsigned=function(){return this.high>>>0},LongPrototype.getLowBits=function(){return this.low},LongPrototype.getLowBitsUnsigned=function(){return this.low>>>0},LongPrototype.getNumBitsAbs=function(){if(this.isNegative())return this.eq(MIN_VALUE)?64:this.neg().getNumBitsAbs();for(var e=0!=this.high?this.high:this.low,t=31;t>0&&(e&1<=0},LongPrototype.isOdd=function(){return(1&this.low)==1},LongPrototype.isEven=function(){return(1&this.low)==0},LongPrototype.equals=function(e){return isLong(e)||(e=fromValue(e)),(this.unsigned===e.unsigned||this.high>>>31!=1||e.high>>>31!=1)&&this.high===e.high&&this.low===e.low},LongPrototype.eq=LongPrototype.equals,LongPrototype.notEquals=function(e){return!this.eq(e)},LongPrototype.neq=LongPrototype.notEquals,LongPrototype.ne=LongPrototype.notEquals,LongPrototype.lessThan=function(e){return 0>this.comp(e)},LongPrototype.lt=LongPrototype.lessThan,LongPrototype.lessThanOrEqual=function(e){return 0>=this.comp(e)},LongPrototype.lte=LongPrototype.lessThanOrEqual,LongPrototype.le=LongPrototype.lessThanOrEqual,LongPrototype.greaterThan=function(e){return this.comp(e)>0},LongPrototype.gt=LongPrototype.greaterThan,LongPrototype.greaterThanOrEqual=function(e){return this.comp(e)>=0},LongPrototype.gte=LongPrototype.greaterThanOrEqual,LongPrototype.ge=LongPrototype.greaterThanOrEqual,LongPrototype.compare=function(e){if(isLong(e)||(e=fromValue(e)),this.eq(e))return 0;var t=this.isNegative(),r=e.isNegative();return t&&!r?-1:!t&&r?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1},LongPrototype.comp=LongPrototype.compare,LongPrototype.negate=function(){return!this.unsigned&&this.eq(MIN_VALUE)?MIN_VALUE:this.not().add(ONE)},LongPrototype.neg=LongPrototype.negate,LongPrototype.add=function(e){isLong(e)||(e=fromValue(e));var t,r,n=this.high>>>16,i=65535&this.high,o=this.low>>>16,a=65535&this.low,s=e.high>>>16,l=65535&e.high,u=e.low>>>16,d=65535&e.low,c=0,p=0;return t=0+((r=0+(a+d))>>>16),r&=65535,t+=o+u,p+=t>>>16,t&=65535,p+=i+l,c+=p>>>16,p&=65535,c+=n+s,fromBits(t<<16|r,(c&=65535)<<16|p,this.unsigned)},LongPrototype.subtract=function(e){return isLong(e)||(e=fromValue(e)),this.add(e.neg())},LongPrototype.sub=LongPrototype.subtract,LongPrototype.multiply=function(e){if(this.isZero())return this;if(isLong(e)||(e=fromValue(e)),wasm)return fromBits(wasm.mul(this.low,this.high,e.low,e.high),wasm.get_high(),this.unsigned);if(e.isZero())return this.unsigned?UZERO:ZERO;if(this.eq(MIN_VALUE))return e.isOdd()?MIN_VALUE:ZERO;if(e.eq(MIN_VALUE))return this.isOdd()?MIN_VALUE:ZERO;if(this.isNegative())return e.isNegative()?this.neg().mul(e.neg()):this.neg().mul(e).neg();if(e.isNegative())return this.mul(e.neg()).neg();if(this.lt(TWO_PWR_24)&&e.lt(TWO_PWR_24))return fromNumber(this.toNumber()*e.toNumber(),this.unsigned);var t,r,n=this.high>>>16,i=65535&this.high,o=this.low>>>16,a=65535&this.low,s=e.high>>>16,l=65535&e.high,u=e.low>>>16,d=65535&e.low,c=0,p=0;return t=0+((r=0+a*d)>>>16),r&=65535,t+=o*d,p+=t>>>16,t&=65535,t+=a*u,p+=t>>>16,t&=65535,p+=i*d,c+=p>>>16,p&=65535,p+=o*u,c+=p>>>16,p&=65535,p+=a*l,c+=p>>>16,p&=65535,c+=n*d+i*u+o*l+a*s,fromBits(t<<16|r,(c&=65535)<<16|p,this.unsigned)},LongPrototype.mul=LongPrototype.multiply,LongPrototype.divide=function(e){if(isLong(e)||(e=fromValue(e)),e.isZero())throw Error("division by zero");if(wasm){var t,r,n;return this.unsigned||-2147483648!==this.high||-1!==e.low||-1!==e.high?fromBits((this.unsigned?wasm.div_u:wasm.div_s)(this.low,this.high,e.low,e.high),wasm.get_high(),this.unsigned):this}if(this.isZero())return this.unsigned?UZERO:ZERO;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return UZERO;if(e.gt(this.shru(1)))return UONE;n=UZERO}else{if(this.eq(MIN_VALUE))return e.eq(ONE)||e.eq(NEG_ONE)?MIN_VALUE:e.eq(MIN_VALUE)?ONE:(t=this.shr(1).div(e).shl(1)).eq(ZERO)?e.isNegative()?ONE:NEG_ONE:(r=this.sub(e.mul(t)),n=t.add(r.div(e)));if(e.eq(MIN_VALUE))return this.unsigned?UZERO:ZERO;if(this.isNegative())return e.isNegative()?this.neg().div(e.neg()):this.neg().div(e).neg();if(e.isNegative())return this.div(e.neg()).neg();n=ZERO}for(r=this;r.gte(e);){for(var i=Math.ceil(Math.log(t=Math.max(1,Math.floor(r.toNumber()/e.toNumber())))/Math.LN2),o=i<=48?1:pow_dbl(2,i-48),a=fromNumber(t),s=a.mul(e);s.isNegative()||s.gt(r);)t-=o,s=(a=fromNumber(t,this.unsigned)).mul(e);a.isZero()&&(a=ONE),n=n.add(a),r=r.sub(s)}return n},LongPrototype.div=LongPrototype.divide,LongPrototype.modulo=function(e){return(isLong(e)||(e=fromValue(e)),wasm)?fromBits((this.unsigned?wasm.rem_u:wasm.rem_s)(this.low,this.high,e.low,e.high),wasm.get_high(),this.unsigned):this.sub(this.div(e).mul(e))},LongPrototype.mod=LongPrototype.modulo,LongPrototype.rem=LongPrototype.modulo,LongPrototype.not=function(){return fromBits(~this.low,~this.high,this.unsigned)},LongPrototype.countLeadingZeros=function(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32},LongPrototype.clz=LongPrototype.countLeadingZeros,LongPrototype.countTrailingZeros=function(){return this.low?ctz32(this.low):ctz32(this.high)+32},LongPrototype.ctz=LongPrototype.countTrailingZeros,LongPrototype.and=function(e){return isLong(e)||(e=fromValue(e)),fromBits(this.low&e.low,this.high&e.high,this.unsigned)},LongPrototype.or=function(e){return isLong(e)||(e=fromValue(e)),fromBits(this.low|e.low,this.high|e.high,this.unsigned)},LongPrototype.xor=function(e){return isLong(e)||(e=fromValue(e)),fromBits(this.low^e.low,this.high^e.high,this.unsigned)},LongPrototype.shiftLeft=function(e){return(isLong(e)&&(e=e.toInt()),0==(e&=63))?this:e<32?fromBits(this.low<>>32-e,this.unsigned):fromBits(0,this.low<>>e|this.high<<32-e,this.high>>e,this.unsigned):fromBits(this.high>>e-32,this.high>=0?0:-1,this.unsigned)},LongPrototype.shr=LongPrototype.shiftRight,LongPrototype.shiftRightUnsigned=function(e){return(isLong(e)&&(e=e.toInt()),0==(e&=63))?this:e<32?fromBits(this.low>>>e|this.high<<32-e,this.high>>>e,this.unsigned):32===e?fromBits(this.high,0,this.unsigned):fromBits(this.high>>>e-32,0,this.unsigned)},LongPrototype.shru=LongPrototype.shiftRightUnsigned,LongPrototype.shr_u=LongPrototype.shiftRightUnsigned,LongPrototype.rotateLeft=function(e){var t;return(isLong(e)&&(e=e.toInt()),0==(e&=63))?this:32===e?fromBits(this.high,this.low,this.unsigned):e<32?(t=32-e,fromBits(this.low<>>t,this.high<>>t,this.unsigned)):(e-=32,t=32-e,fromBits(this.high<>>t,this.low<>>t,this.unsigned))},LongPrototype.rotl=LongPrototype.rotateLeft,LongPrototype.rotateRight=function(e){var t;return(isLong(e)&&(e=e.toInt()),0==(e&=63))?this:32===e?fromBits(this.high,this.low,this.unsigned):e<32?(t=32-e,fromBits(this.high<>>e,this.low<>>e,this.unsigned)):(e-=32,t=32-e,fromBits(this.low<>>e,this.high<>>e,this.unsigned))},LongPrototype.rotr=LongPrototype.rotateRight,LongPrototype.toSigned=function(){return this.unsigned?fromBits(this.low,this.high,!1):this},LongPrototype.toUnsigned=function(){return this.unsigned?this:fromBits(this.low,this.high,!0)},LongPrototype.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},LongPrototype.toBytesLE=function(){var e=this.high,t=this.low;return[255&t,t>>>8&255,t>>>16&255,t>>>24,255&e,e>>>8&255,e>>>16&255,e>>>24]},LongPrototype.toBytesBE=function(){var e=this.high,t=this.low;return[e>>>24,e>>>16&255,e>>>8&255,255&e,t>>>24,t>>>16&255,t>>>8&255,255&t]},Long.fromBytes=function(e,t,r){return r?Long.fromBytesLE(e,t):Long.fromBytesBE(e,t)},Long.fromBytesLE=function(e,t){return new Long(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,t)},Long.fromBytesBE=function(e,t){return new Long(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],t)};var long_default=Long,import_minimal3=__toESM(require_minimal2()),import_minimal=__toESM(require_minimal2());function createBaseCoin(){return{denom:"",amount:""}}var Coin={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:import_minimal.default.Writer.create();return""!==e.denom&&t.uint32(10).string(e.denom),""!==e.amount&&t.uint32(18).string(e.amount),t},decode(e,t){let r=e instanceof import_minimal.default.Reader?e:import_minimal.default.Reader.create(e),n=void 0===t?r.len:r.pos+t,i=createBaseCoin();for(;r.pos>>3){case 1:if(10!==e)break;i.denom=r.string();continue;case 2:if(18!==e)break;i.amount=r.string();continue}if((7&e)==4||0===e)break;r.skipType(7&e)}return i},fromJSON:e=>({denom:isSet(e.denom)?globalThis.String(e.denom):"",amount:isSet(e.amount)?globalThis.String(e.amount):""}),toJSON(e){let t={};return""!==e.denom&&(t.denom=e.denom),""!==e.amount&&(t.amount=e.amount),t},create:e=>Coin.fromPartial(null!=e?e:{}),fromPartial(e){var t,r;let n=createBaseCoin();return n.denom=null!==(t=e.denom)&&void 0!==t?t:"",n.amount=null!==(r=e.amount)&&void 0!==r?r:"",n}};function isSet(e){return null!=e}import_minimal.default.util.Long!==long_default&&(import_minimal.default.util.Long=long_default,import_minimal.default.configure());var import_minimal2=__toESM(require_minimal2());function createBaseMsgRegisterAccount(){return{sender:"",codeId:long_default.UZERO,msg:new Uint8Array(0),funds:[],salt:new Uint8Array(0)}}import_minimal2.default.util.Long!==long_default&&(import_minimal2.default.util.Long=long_default,import_minimal2.default.configure());var MsgRegisterAccount={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:import_minimal3.default.Writer.create();for(let r of(""!==e.sender&&t.uint32(10).string(e.sender),e.codeId.isZero()||t.uint32(16).uint64(e.codeId),0!==e.msg.length&&t.uint32(26).bytes(e.msg),e.funds))Coin.encode(r,t.uint32(34).fork()).ldelim();return 0!==e.salt.length&&t.uint32(42).bytes(e.salt),t},decode(e,t){let r=e instanceof import_minimal3.default.Reader?e:import_minimal3.default.Reader.create(e),n=void 0===t?r.len:r.pos+t,i=createBaseMsgRegisterAccount();for(;r.pos>>3){case 1:if(10!==e)break;i.sender=r.string();continue;case 2:if(16!==e)break;i.codeId=r.uint64();continue;case 3:if(26!==e)break;i.msg=r.bytes();continue;case 4:if(34!==e)break;i.funds.push(Coin.decode(r,r.uint32()));continue;case 5:if(42!==e)break;i.salt=r.bytes();continue}if((7&e)==4||0===e)break;r.skipType(7&e)}return i},fromJSON:e=>({sender:isSet2(e.sender)?globalThis.String(e.sender):"",codeId:isSet2(e.codeId)?long_default.fromValue(e.codeId):long_default.UZERO,msg:isSet2(e.msg)?bytesFromBase64(e.msg):new Uint8Array(0),funds:globalThis.Array.isArray(null==e?void 0:e.funds)?e.funds.map(e=>Coin.fromJSON(e)):[],salt:isSet2(e.salt)?bytesFromBase64(e.salt):new Uint8Array(0)}),toJSON(e){var t;let r={};return""!==e.sender&&(r.sender=e.sender),e.codeId.isZero()||(r.codeId=(e.codeId||long_default.UZERO).toString()),0!==e.msg.length&&(r.msg=base64FromBytes(e.msg)),(null===(t=e.funds)||void 0===t?void 0:t.length)&&(r.funds=e.funds.map(e=>Coin.toJSON(e))),0!==e.salt.length&&(r.salt=base64FromBytes(e.salt)),r},create:e=>MsgRegisterAccount.fromPartial(null!=e?e:{}),fromPartial(e){var t,r,n,i;let o=createBaseMsgRegisterAccount();return o.sender=null!==(r=e.sender)&&void 0!==r?r:"",o.codeId=void 0!==e.codeId&&null!==e.codeId?long_default.fromValue(e.codeId):long_default.UZERO,o.msg=null!==(n=e.msg)&&void 0!==n?n:new Uint8Array(0),o.funds=(null===(t=e.funds)||void 0===t?void 0:t.map(e=>Coin.fromPartial(e)))||[],o.salt=null!==(i=e.salt)&&void 0!==i?i:new Uint8Array(0),o}};function createBaseMsgRegisterAccountResponse(){return{address:"",data:new Uint8Array(0)}}var MsgRegisterAccountResponse={encode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:import_minimal3.default.Writer.create();return""!==e.address&&t.uint32(10).string(e.address),0!==e.data.length&&t.uint32(18).bytes(e.data),t},decode(e,t){let r=e instanceof import_minimal3.default.Reader?e:import_minimal3.default.Reader.create(e),n=void 0===t?r.len:r.pos+t,i=createBaseMsgRegisterAccountResponse();for(;r.pos>>3){case 1:if(10!==e)break;i.address=r.string();continue;case 2:if(18!==e)break;i.data=r.bytes();continue}if((7&e)==4||0===e)break;r.skipType(7&e)}return i},fromJSON:e=>({address:isSet2(e.address)?globalThis.String(e.address):"",data:isSet2(e.data)?bytesFromBase64(e.data):new Uint8Array(0)}),toJSON(e){let t={};return""!==e.address&&(t.address=e.address),0!==e.data.length&&(t.data=base64FromBytes(e.data)),t},create:e=>MsgRegisterAccountResponse.fromPartial(null!=e?e:{}),fromPartial(e){var t,r;let n=createBaseMsgRegisterAccountResponse();return n.address=null!==(t=e.address)&&void 0!==t?t:"",n.data=null!==(r=e.data)&&void 0!==r?r:new Uint8Array(0),n}};function bytesFromBase64(e){if(globalThis.Buffer)return Uint8Array.from(globalThis.Buffer.from(e,"base64"));{let t=globalThis.atob(e),r=new Uint8Array(t.length);for(let e=0;e{t.push(globalThis.String.fromCharCode(e))}),globalThis.btoa(t.join(""))}}function isSet2(e){return null!=e}import_minimal3.default.util.Long!==long_default&&(import_minimal3.default.util.Long=long_default,import_minimal3.default.configure());var typeUrlMsgRegisterAccount="/abstractaccount.v1.MsgRegisterAccount",typeUrlMsgRegisterAccountResponse="/abstractaccount.v1.MsgRegisterAccountResponse",abstractAccountTypes=[[typeUrlMsgRegisterAccount,MsgRegisterAccount],[typeUrlMsgRegisterAccountResponse,MsgRegisterAccountResponse]],AbstractAccount$Type=class extends _protobuf_ts_runtime__WEBPACK_IMPORTED_MODULE_14__.C{create(e){let t=globalThis.Object.create(this.messagePrototype);return t.address="",t.accountNumber=0n,t.sequence=0n,void 0!==e&&(0,_protobuf_ts_runtime__WEBPACK_IMPORTED_MODULE_15__.l)(this,t,e),t}internalBinaryRead(e,t,r,n){let i=null!=n?n:this.create(),o=e.pos+t;for(;e.pos(apolloClientInstance||(apolloClientInstance=new _apollo_client__WEBPACK_IMPORTED_MODULE_18__.f({uri:e||"https://api.subquery.network/sq/burnt-labs/xion-indexer",cache:new _apollo_client__WEBPACK_IMPORTED_MODULE_19__.h,assumeImmutableResults:!0})),apolloClientInstance);function uint64FromProto(e){return _cosmjs_math__WEBPACK_IMPORTED_MODULE_8__.Uint64.fromString(e.toString())}function accountFromBaseAccount(e){let{address:t,pubKey:r,accountNumber:n,sequence:i}=e,o=null;return r&&(o=(0,_cosmjs_proto_signing__WEBPACK_IMPORTED_MODULE_4__.decodePubkey)(r)),{address:t,pubkey:o,accountNumber:uint64FromProto(n).toNumber(),sequence:uint64FromProto(i).toNumber()}}function customAccountFromAny(e){let{typeUrl:t,value:r}=e;if("/abstractaccount.v1.AbstractAccount"===t){let e=AbstractAccount.fromBinary(r);return(0,_cosmjs_utils__WEBPACK_IMPORTED_MODULE_9__.assert)(e),accountFromBaseAccount(e)}return(0,_cosmjs_stargate_build_accounts__WEBPACK_IMPORTED_MODULE_10__.accountFromAny)(e)}function makeAAuthInfo(e,t,r){return cosmjs_types_cosmos_tx_v1beta1_tx__WEBPACK_IMPORTED_MODULE_3__.AuthInfo.fromPartial({signerInfos:[cosmjs_types_cosmos_tx_v1beta1_tx__WEBPACK_IMPORTED_MODULE_3__.SignerInfo.fromPartial({publicKey:{typeUrl:"/abstractaccount.v1.NilPubKey",value:new Uint8Array([10,32,...t])},modeInfo:{single:{mode:cosmjs_types_cosmos_tx_signing_v1beta1_signing__WEBPACK_IMPORTED_MODULE_6__.SignMode.SIGN_MODE_DIRECT}},sequence:BigInt(e.sequence)})],fee:{amount:r.amount?(0,_cosmjs_amino__WEBPACK_IMPORTED_MODULE_7__.coins)(r.amount[0].amount,r.amount[0].denom):(0,_cosmjs_amino__WEBPACK_IMPORTED_MODULE_7__.coins)(1,"uxion"),gasLimit:BigInt(r.gas),granter:r.granter||"",payer:r.payer||""}})}async function getAAccounts(e,t,r){let n={address:"",accountAddress:"",algo:"secp256k1",pubkey:new Uint8Array,authenticatorId:0},i=[],o=getApolloClient(r);if(!o||!e||0===e.length)return[n];for(let r of e){let{data:e}=await o.query({query:AllSmartWalletQueryByIdAndTypeAndAuthenticator,variables:{id:t,type:AAAlgo[r.algo],authenticator:Buffer.from(r.pubkey).toString("base64")}});if(e){let t=e.smartAccounts;if(!t.nodes.length)continue;for(let e of t.nodes){let t=e.authenticators;if(t.nodes.length)for(let e of t.nodes)i.push({address:"xion"+e.authenticatorId.split("xion")[1],accountAddress:r.address,algo:e.type.toLowerCase(),pubkey:new Uint8Array,authenticatorId:Number(e.authenticatorId.split("xion")[2])})}}}return i}async function getAuthenticatorIdByAuthenticatorIndex(e,t,r){let n=getApolloClient(r),{data:i}=await n.query({query:SmartWalletIndexQueryByAccountId,variables:{id:e,index:t}});return i&&i.smartAccounts?(i.smartAccounts.nodes.length>1&&console.warn("Unexpected behavior. Indexer returned multiple smart accounts"),i.smartAccounts.nodes[0].authenticators.nodes.length>1&&console.warn("Unexpected behavior. Indexer returned multiple authenticators"),i.smartAccounts.nodes[0].authenticators.nodes[0].authenticatorIndex||0):0}function encodeHex(e){return[...e].map(e=>e.toString(16).padStart(2,"0")).join("")}var AADefaultRegistryTypes=[..._cosmjs_stargate__WEBPACK_IMPORTED_MODULE_1__.defaultRegistryTypes,..._cosmjs_cosmwasm_stargate__WEBPACK_IMPORTED_MODULE_11__.dv,...abstractAccountTypes];function createDefaultRegistry(){return new _cosmjs_proto_signing__WEBPACK_IMPORTED_MODULE_4__.Registry(AADefaultRegistryTypes)}var AAClient=class extends _cosmjs_cosmwasm_stargate__WEBPACK_IMPORTED_MODULE_11__.Fl{static async connectWithSigner(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return new AAClient(await _cosmjs_tendermint_rpc__WEBPACK_IMPORTED_MODULE_5__.Tendermint37Client.connect(e),t,{registry:createDefaultRegistry(),...r,accountParser:customAccountFromAny})}async registerAbstractAccount(e){let{sender:t}=e,r={typeUrl:typeUrlMsgRegisterAccount,value:e};return this.signAndBroadcast(t,[r],"auto")}async addAbstractAccountAuthenticator(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2?arguments[2]:void 0;if(!this.abstractSigner.abstractAccount)throw Error("Abstract account address not set in signer");let n=this.abstractSigner.abstractAccount,i={typeUrl:"/cosmwasm.wasm.v1.MsgExecuteContract",value:cosmjs_types_cosmwasm_wasm_v1_tx__WEBPACK_IMPORTED_MODULE_12__.MsgExecuteContract.fromPartial({sender:n,contract:n,msg:Buffer.from(JSON.stringify(e),"utf-8"),funds:[]})},o=await this.sign(n,[i],r,t);return this.broadcastTx(cosmjs_types_cosmos_tx_v1beta1_tx__WEBPACK_IMPORTED_MODULE_3__.TxRaw.encode(o).finish())}async getAccount(e){let t=await this.forceGetQueryClient().auth.account(e);return t?customAccountFromAny(t):null}async sign(e,t,r,n,i){let o;let a=await this.getAccount(e);if(a&&a.pubkey)return this.abstractSigner.abstractAccount=void 0,super.sign(e,t,r,n,i);this.abstractSigner.abstractAccount||(this.abstractSigner.abstractAccount=e);let s=(await this.abstractSigner.getAccounts()).find(e=>e.authenticatorId===this.abstractSigner.accountAuthenticatorIndex);if(!s)throw Error("Failed to retrieve account from signer");if(!a)throw Error("Failed to retrieve AA account from chain");if(i)o=i;else{let{accountNumber:e,sequence:t}=a;o={accountNumber:e,sequence:t,chainId:await this.getChainId()}}let l=bech32__WEBPACK_IMPORTED_MODULE_2__.gW.fromWords(bech32__WEBPACK_IMPORTED_MODULE_2__.gW.decode(s.address).words),u={typeUrl:"/cosmos.tx.v1beta1.TxBody",value:{messages:t,memo:n}},d=makeAAuthInfo(a,Uint8Array.from(l),r),c=this.registry.encode(u),p=cosmjs_types_cosmos_tx_v1beta1_tx__WEBPACK_IMPORTED_MODULE_3__.AuthInfo.encode(d).finish(),f=cosmjs_types_cosmos_tx_v1beta1_tx__WEBPACK_IMPORTED_MODULE_3__.SignDoc.fromPartial({bodyBytes:c,authInfoBytes:p,chainId:o.chainId,accountNumber:BigInt(a.accountNumber)}),h=await this.abstractSigner.signDirect(s.accountAddress,f).then(e=>Buffer.from(new Uint8Array([s.authenticatorId,...Buffer.from(e.signature.signature,"base64")])).toString("base64"));return cosmjs_types_cosmos_tx_v1beta1_tx__WEBPACK_IMPORTED_MODULE_3__.TxRaw.fromPartial({bodyBytes:c,authInfoBytes:p,signatures:[Buffer.from(h,"base64")]})}constructor(e,t,r){super(e,t,r),this.abstractSigner=t}},AASigner=class{signDirect(e,t){return Promise.resolve({signed:t,signature:{signature:"",pub_key:{type:"tendermint/PubKeySecp256k1",value:new Uint8Array}}})}constructor(e){this.abstractAccount=e}},AADefaultSigner=class extends AASigner{getAccounts(){throw Error("Cannot get accounts from default signer")}constructor(e){super(e)}},AADirectSigner=class extends AASigner{async signDirect(e,t){let r=(0,_cosmjs_proto_signing__WEBPACK_IMPORTED_MODULE_4__.makeSignBytes)(t),n=await this.signArbFn(t.chainId,e,r);return{signed:t,signature:{pub_key:{type:"tendermint/PubKeySecp256k1",value:""},signature:n.signature}}}async getAccounts(){let e=await this.signer.getAccounts();return 0===e.length?[]:void 0===this.abstractAccount?e.map(e=>({...e,authenticatorId:0,accountAddress:e.address})):await getAAccounts(e,this.abstractAccount,this.indexerUrl)}constructor(e,t,r,n,i){super(t),this.signer=e,this.accountAuthenticatorIndex=r,this.signArbFn=n,this.indexerUrl=i||"https://api.subquery.network/sq/burnt-labs/xion-indexer"}},AbstractAccountJWTSigner=class extends AASigner{async getAccounts(){return void 0===this.abstractAccount?[]:[{address:this.abstractAccount,algo:"secp256k1",pubkey:new Uint8Array,authenticatorId:await getAuthenticatorIdByAuthenticatorIndex(this.abstractAccount,this.accountAuthenticatorIndex,this.indexerUrl),accountAddress:this.abstractAccount,aaalgo:"jwt"}]}async signDirect(e,t){if(void 0===this.sessionToken)throw Error("stytch session token is undefined");let r=cosmjs_types_cosmos_tx_v1beta1_tx__WEBPACK_IMPORTED_MODULE_3__.SignDoc.encode(t).finish(),n=(0,_cosmjs_crypto__WEBPACK_IMPORTED_MODULE_13__.sha256)(r),i=Buffer.from(n).toString("base64"),o=await fetch("https://aa.xion-testnet-1.burnt.com/api/v1/sessions/authenticate",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({session_token:this.sessionToken,session_duration_minutes:43200,session_custom_claims:{transaction_hash:i}})});if(!o.ok)throw Error("Failed to authenticate with stytch");let a=await o.json();return{signed:t,signature:{pub_key:{type:"",value:new Uint8Array},signature:Buffer.from(a.data.session_jwt,"utf-8").toString("base64")}}}async signDirectArb(e){if(void 0===this.sessionToken)throw Error("stytch session token is undefined");let t=(0,_cosmjs_crypto__WEBPACK_IMPORTED_MODULE_13__.sha256)(Buffer.from(e,"utf-8")),r=Buffer.from(t).toString("base64"),n=await fetch("https://aa.xion-testnet-1.burnt.com/api/v1/sessions/authenticate",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({session_token:this.sessionToken,session_duration_minutes:43200,session_custom_claims:{transaction_hash:r}})});if(!n.ok)throw Error("Failed to authenticate with stytch");let i=await n.json();return{signature:Buffer.from(i.data.session_jwt,"utf-8").toString("base64")}}constructor(e,t,r,n){super(e),this.sessionToken=r,this.accountAuthenticatorIndex=t,this.indexerUrl=n||"https://api.subquery.network/sq/burnt-labs/xion-indexer"}},AAEthSigner=class extends AASigner{async signDirect(e,t){let r="0x"+encodeHex((0,_cosmjs_proto_signing__WEBPACK_IMPORTED_MODULE_4__.makeSignBytes)(t)),n=await this.personalSign(r),i=new Uint8Array(n.match(/[\da-f]{2}/gi).map(e=>parseInt(e,16)));return{signed:t,signature:{pub_key:{type:"tendermint/PubKeySecp256k1",value:""},signature:btoa(String.fromCharCode.apply(null,i))}}}async getAccounts(){return void 0===this.abstractAccount?[]:[{address:this.abstractAccount,algo:"secp256k1",pubkey:new Uint8Array,authenticatorId:await getAuthenticatorIdByAuthenticatorIndex(this.abstractAccount,this.accountAuthenticatorIndex,this.indexerUrl),accountAddress:this.abstractAccount,aaalgo:"EthWallet"}]}constructor(e,t,r,n){super(e),this.accountAuthenticatorIndex=t,this.personalSign=r,this.indexerUrl=n||"https://api.subquery.network/sq/burnt-labs/xion-indexer"}};/*! Bundled license information: long/index.js: (** @@ -45,4 +45,4 @@ long/index.js: * * SPDX-License-Identifier: Apache-2.0 *) -*/},59115:function(e,t,r){"use strict";r.d(t,{z:function(){return o}});var n=r(85523),i=r(3827),o=e=>{var t=e,{fullWidth:r=!1,structure:o="base",disabled:a=!1,children:s}=t,l=(0,n.S0)(t,["fullWidth","structure","disabled","children"]);let u=()=>{if(a)switch(o){case"outlined":return"ui-bg-transparent ui-border ui-border-neutral-600 ui-text-neutral-600 ui-pointer-events-none";case"naked":return"ui-border-none ui-bg-transparent ui-text-white/60 ui-underline ui-font-normal ui-pointer-events-none";case"destructive":return"ui-bg-red-500/60 ui-text-white hover:ui-bg-red-600 ui-pointer-events-none";default:return"ui-bg-white/60 ui-text-black ui-pointer-events-none"}switch(o){case"outlined":return"ui-border ui-bg-transparent ui-border-neutral-300 ui-border-opacity-50 ui-text-white hover:ui-bg-white/5";case"naked":return"ui-border-none ui-bg-transparent ui-text-white ui-underline ui-font-normal";case"destructive":return"ui-bg-red-500 ui-text-white hover:ui-bg-red-400";default:return"ui-bg-white ui-text-black hover:ui-bg-neutral-100"}};return(0,i.jsx)("button",(0,n.EZ)((0,n.ih)({className:"ui-flex ui-items-center ui-justify-center ui-rounded-md ui-font-akkuratLL ui-uppercase ui-px-5 ui-py-3.5 ui-text-sm ui-outline-none ui-hover:opacity-70 ".concat(r?"ui-w-full":""," ").concat(u())},l),{children:s}))}},85523:function(e,t,r){"use strict";r.d(t,{EZ:function(){return c},S0:function(){return p},ih:function(){return d}});var n=Object.defineProperty,i=Object.defineProperties,o=Object.getOwnPropertyDescriptors,a=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable,u=(e,t,r)=>t in e?n(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,d=(e,t)=>{for(var r in t||(t={}))s.call(t,r)&&u(e,r,t[r]);if(a)for(var r of a(t))l.call(t,r)&&u(e,r,t[r]);return e},c=(e,t)=>i(e,o(t)),p=(e,t)=>{var r={};for(var n in e)s.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&a)for(var n of a(e))0>t.indexOf(n)&&l.call(e,n)&&(r[n]=e[n]);return r}},56093:function(e,t,r){"use strict";function n(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}r.d(t,{_:function(){return n}})},78390:function(e,t,r){"use strict";function n(){}r.d(t,{e:function(){return i}});class i{has(e){return this.map.has(e)}get(e){let t=this.getNode(e);return t&&t.value}get size(){return this.map.size}getNode(e){let t=this.map.get(e);if(t&&t!==this.newest){let{older:e,newer:r}=t;r&&(r.older=e),e&&(e.newer=r),t.older=this.newest,t.older.newer=t,t.newer=null,this.newest=t,t===this.oldest&&(this.oldest=r)}return t}set(e,t){let r=this.getNode(e);return r?r.value=t:(r={key:e,value:t,newer:null,older:this.newest},this.newest&&(this.newest.newer=r),this.newest=r,this.oldest=this.oldest||r,this.map.set(e,r),r.value)}clean(){for(;this.oldest&&this.map.size>this.max;)this.delete(this.oldest.key)}delete(e){let t=this.map.get(e);return!!t&&(t===this.newest&&(this.newest=t.older),t===this.oldest&&(this.oldest=t.newer),t.newer&&(t.newer.older=t.older),t.older&&(t.older.newer=t.newer),this.map.delete(e),this.dispose(t.value,e),!0)}constructor(e=1/0,t=n){this.max=e,this.dispose=t,this.map=new Map,this.newest=null,this.oldest=null}}},89933:function(e,t,r){"use strict";function n(){}r.d(t,{k:function(){return u}});let i=n,o="undefined"!=typeof WeakRef?WeakRef:function(e){return{deref:()=>e}},a="undefined"!=typeof WeakMap?WeakMap:Map,s="undefined"!=typeof FinalizationRegistry?FinalizationRegistry:function(){return{register:n,unregister:n}},l=10024;class u{has(e){return this.map.has(e)}get(e){let t=this.getNode(e);return t&&t.value}getNode(e){let t=this.map.get(e);if(t&&t!==this.newest){let{older:e,newer:r}=t;r&&(r.older=e),e&&(e.newer=r),t.older=this.newest,t.older.newer=t,t.newer=null,this.newest=t,t===this.oldest&&(this.oldest=r)}return t}set(e,t){let r=this.getNode(e);return r?r.value=t:(r={key:e,value:t,newer:null,older:this.newest},this.newest&&(this.newest.newer=r),this.newest=r,this.oldest=this.oldest||r,this.scheduleFinalization(r),this.map.set(e,r),this.size++,r.value)}clean(){for(;this.oldest&&this.size>this.max;)this.deleteNode(this.oldest)}deleteNode(e){e===this.newest&&(this.newest=e.older),e===this.oldest&&(this.oldest=e.newer),e.newer&&(e.newer.older=e.older),e.older&&(e.older.newer=e.newer),this.size--;let t=e.key||e.keyRef&&e.keyRef.deref();this.dispose(e.value,t),e.keyRef?this.registry.unregister(e):this.unfinalizedNodes.delete(e),t&&this.map.delete(t)}delete(e){let t=this.map.get(e);return!!t&&(this.deleteNode(t),!0)}scheduleFinalization(e){this.unfinalizedNodes.add(e),this.finalizationScheduled||(this.finalizationScheduled=!0,queueMicrotask(this.finalize))}constructor(e=1/0,t=i){this.max=e,this.dispose=t,this.map=new a,this.newest=null,this.oldest=null,this.unfinalizedNodes=new Set,this.finalizationScheduled=!1,this.size=0,this.finalize=()=>{let e=this.unfinalizedNodes.values();for(let t=0;t0?queueMicrotask(this.finalize):this.finalizationScheduled=!1},this.registry=new s(this.deleteNode.bind(this))}}},49058:function(e,t,r){"use strict";r.d(t,{D:function(){return s}});let{toString:n,hasOwnProperty:i}=Object.prototype,o=Function.prototype.toString,a=new Map;function s(e,t){try{return l(e,t)}finally{a.clear()}}function l(e,t){if(e===t)return!0;let r=n.call(e);if(r!==n.call(t))return!1;switch(r){case"[object Array]":if(e.length!==t.length)break;case"[object Object]":{if(f(e,t))return!0;let r=u(e),n=u(t),o=r.length;if(o!==n.length)return!1;for(let e=0;e=0&&e.indexOf(t,r)===r}function f(e,t){let r=a.get(e);if(r){if(r.has(t))return!0}else a.set(e,r=new Set);return r.add(t),!1}},60430:function(e,t,r){"use strict";r.d(t,{B:function(){return s}});let n=()=>Object.create(null),{forEach:i,slice:o}=Array.prototype,{hasOwnProperty:a}=Object.prototype;class s{lookup(){return this.lookupArray(arguments)}lookupArray(e){let t=this;return i.call(e,e=>t=t.getChildTrie(e)),a.call(t,"data")?t.data:t.data=this.makeData(o.call(e))}peek(){return this.peekArray(arguments)}peekArray(e){let t=this;for(let r=0,n=e.length;t&&rT?m.c=m.e=null:e.e=10;p/=10,c++);c>T?m.c=m.e=null:(m.e=c,m.c=[e]);return}g=String(e)}else{if(!n.test(g=String(e)))return _(m,g,f);m.s=45==g.charCodeAt(0)?(g=g.slice(1),-1):1}(c=g.indexOf("."))>-1&&(g=g.replace(".","")),(p=g.search(/e/i))>0?(c<0&&(c=p),c+=+g.slice(p+1),g=g.substring(0,p)):c<0&&(c=g.length)}else{if(v(t,2,M.length,"Base"),10==t&&D)return q(m=new U(e),P+m.e+1,A);if(g=String(e),f="number"==typeof e){if(0*e!=0)return _(m,g,f,t);if(m.s=1/e<0?(g=g.slice(1),-1):1,U.DEBUG&&g.replace(/^0\.0*|\./,"").length>15)throw Error(s+e)}else m.s=45===g.charCodeAt(0)?(g=g.slice(1),-1):1;for(i=M.slice(0,t),c=p=0,h=g.length;pi.indexOf(a=g.charAt(p))){if("."==a){if(p>c){c=h;continue}}else if(!l&&(g==g.toUpperCase()&&(g=g.toLowerCase())||g==g.toLowerCase()&&(g=g.toUpperCase()))){l=!0,p=-1,c=0;continue}return _(m,String(e),f,t)}f=!1,(c=(g=r(g,t,10,m.s)).indexOf("."))>-1?g=g.replace(".",""):c=g.length}for(p=0;48===g.charCodeAt(p);p++);for(h=g.length;48===g.charCodeAt(--h););if(g=g.slice(p,++h)){if(h-=p,f&&U.DEBUG&&h>15&&(e>d||e!==o(e)))throw Error(s+m.s*e);if((c=c-p-1)>T)m.c=m.e=null;else if(c=R)?S(l,a):w(l,a,"0");else if(o=(e=q(new U(e),t,r)).e,s=(l=m(e.c)).length,1==n||2==n&&(t<=o||o<=I)){for(;ss){if(--t>0)for(l+=".";t--;l+="0");}else if((t+=o-s)>0)for(o+1==s&&(l+=".");t--;l+="0");return e.s<0&&i?"-"+l:l}function j(e,t){for(var r,n,i=1,o=new U(e[0]);i=10;i/=10,n++);return(r=n+r*u-1)>T?e.c=e.e=null:r=10;p/=10,a++);if((s=t-a)<0)s+=u,d=t,g=o((f=m[h=0])/y[a-d-1]%10);else if((h=i((s+1)/u))>=m.length){if(n){for(;m.length<=h;m.push(0));f=g=0,a=1,s%=u,d=s-u+1}else break n}else{for(a=1,f=p=m[h];p>=10;p/=10,a++);s%=u,g=(d=s-u+a)<0?0:o(f/y[a-d-1]%10)}if(n=n||t<0||null!=m[h+1]||(d<0?f:f%y[a-d-1]),n=r<4?(g||n)&&(0==r||r==(e.s<0?3:2)):g>5||5==g&&(4==r||n||6==r&&(s>0?d>0?f/y[a-d]:0:m[h-1])%10&1||r==(e.s<0?8:7)),t<1||!m[0])return m.length=0,n?(t-=e.e+1,m[0]=y[(u-t%u)%u],e.e=-t||0):m[0]=e.e=0,e;if(0==s?(m.length=h,p=1,h--):(m.length=h+1,p=y[u-s],m[h]=d>0?o(f/y[a-d]%y[d])*p:0),n)for(;;){if(0==h){for(s=1,d=m[0];d>=10;d/=10,s++);for(d=m[0]+=p,p=1;d>=10;d/=10,p++);s!=p&&(e.e++,m[0]==l&&(m[0]=1));break}if(m[h]+=p,m[h]!=l)break;m[h--]=0,p=1}for(s=m.length;0===m[--s];m.pop());}e.e>T?e.c=e.e=null:e.e=R?S(t,r):w(t,r,"0"),e.s<0?"-"+t:t)}return U.clone=h,U.ROUND_UP=0,U.ROUND_DOWN=1,U.ROUND_CEIL=2,U.ROUND_FLOOR=3,U.ROUND_HALF_UP=4,U.ROUND_HALF_DOWN=5,U.ROUND_HALF_EVEN=6,U.ROUND_HALF_CEIL=7,U.ROUND_HALF_FLOOR=8,U.EUCLID=9,U.config=U.set=function(e){var t,r;if(null!=e){if("object"==typeof e){if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(v(r=e[t],0,f,t),P=r),e.hasOwnProperty(t="ROUNDING_MODE")&&(v(r=e[t],0,8,t),A=r),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((r=e[t])&&r.pop?(v(r[0],-f,0,t),v(r[1],0,f,t),I=r[0],R=r[1]):(v(r,-f,f,t),I=-(R=r<0?-r:r))),e.hasOwnProperty(t="RANGE")){if((r=e[t])&&r.pop)v(r[0],-f,-1,t),v(r[1],1,f,t),E=r[0],T=r[1];else if(v(r,-f,f,t),r)E=-(T=r<0?-r:r);else throw Error(a+t+" cannot be zero: "+r)}if(e.hasOwnProperty(t="CRYPTO")){if(!!(r=e[t])===r){if(r){if("undefined"!=typeof crypto&&crypto&&(crypto.getRandomValues||crypto.randomBytes))N=r;else throw N=!r,Error(a+"crypto unavailable")}else N=r}else throw Error(a+t+" not true or false: "+r)}if(e.hasOwnProperty(t="MODULO_MODE")&&(v(r=e[t],0,9,t),x=r),e.hasOwnProperty(t="POW_PRECISION")&&(v(r=e[t],0,f,t),B=r),e.hasOwnProperty(t="FORMAT")){if("object"==typeof(r=e[t]))C=r;else throw Error(a+t+" not an object: "+r)}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(r=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(r))throw Error(a+t+" invalid: "+r);D="0123456789"==r.slice(0,10),M=r}}else throw Error(a+"Object expected: "+e)}return{DECIMAL_PLACES:P,ROUNDING_MODE:A,EXPONENTIAL_AT:[I,R],RANGE:[E,T],CRYPTO:N,MODULO_MODE:x,POW_PRECISION:B,FORMAT:C,ALPHABET:M}},U.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!U.DEBUG)return!0;var t,r,n=e.c,i=e.e,s=e.s;n:if("[object Array]"==({}).toString.call(n)){if((1===s||-1===s)&&i>=-f&&i<=f&&i===o(i)){if(0===n[0]){if(0===i&&1===n.length)return!0;break n}if((t=(i+1)%u)<1&&(t+=u),String(n[0]).length==t){for(t=0;t=l||r!==o(r))break n;if(0!==r)return!0}}}else if(null===n&&null===i&&(null===s||1===s||-1===s))return!0;throw Error(a+"Invalid BigNumber: "+e)},U.maximum=U.max=function(){return j(arguments,-1)},U.minimum=U.min=function(){return j(arguments,1)},U.random=function(){var e=9007199254740992,t=9007199254740992*Math.random()&2097151?function(){return o(Math.random()*e)}:function(){return(1073741824*Math.random()|0)*8388608+(8388608*Math.random()|0)};return function(e){var r,n,s,l,d,p=0,h=[],g=new U(O);if(null==e?e=P:v(e,0,f),l=i(e/u),N){if(crypto.getRandomValues){for(r=crypto.getRandomValues(new Uint32Array(l*=2));p>>11))>=9e15?(n=crypto.getRandomValues(new Uint32Array(2)),r[p]=n[0],r[p+1]=n[1]):(h.push(d%1e14),p+=2);p=l/2}else if(crypto.randomBytes){for(r=crypto.randomBytes(l*=7);p=9e15?crypto.randomBytes(7).copy(r,p):(h.push(d%1e14),p+=7);p=l/7}else throw N=!1,Error(a+"crypto unavailable")}if(!N)for(;p=10;d/=10,p++);pr-1&&(null==a[i+1]&&(a[i+1]=0),a[i+1]+=a[i]/r|0,a[i]%=r)}return a.reverse()}return function(n,i,o,a,s){var l,u,d,c,p,f,h,g,y=n.indexOf("."),v=P,b=A;for(y>=0&&(c=B,B=0,n=n.replace(".",""),f=(g=new U(i)).pow(n.length-y),B=c,g.c=r(w(m(f.c),f.e,"0"),10,o,e),g.e=g.c.length),d=c=(h=r(n,i,o,s?(l=M,e):(l=e,M))).length;0==h[--c];h.pop());if(!h[0])return l.charAt(0);if(y<0?--d:(f.c=h,f.e=d,f.s=a,h=(f=t(f,g,v,b,o)).c,p=f.r,d=f.e),y=h[u=d+v+1],c=o/2,p=p||u<0||null!=h[u+1],p=b<4?(null!=y||p)&&(0==b||b==(f.s<0?3:2)):y>c||y==c&&(4==b||p||6==b&&1&h[u-1]||b==(f.s<0?8:7)),u<1||!h[0])n=p?w(l.charAt(1),-v,l.charAt(0)):l.charAt(0);else{if(h.length=u,p)for(--o;++h[--u]>o;)h[u]=0,u||(++d,h=[1].concat(h));for(c=h.length;!h[--c];);for(y=0,n="";y<=c;n+=l.charAt(h[y++]));n=w(n,d,l.charAt(0))}return n}}(),t=function(){function e(e,t,r){var n,i,o,a,s=0,l=e.length,u=t%p,d=t/p|0;for(e=e.slice();l--;)n=d*(o=e[l]%p)+(a=e[l]/p|0)*u,s=((i=u*o+n%p*p+s)/r|0)+(n/p|0)+d*a,e[l]=i%r;return s&&(e=[s].concat(e)),e}function t(e,t,r,n){var i,o;if(r!=n)o=r>n?1:-1;else for(i=o=0;it[i]?1:-1;break}return o}function r(e,t,r,n){for(var i=0;r--;)e[r]-=i,i=e[r]1;e.splice(0,1));}return function(n,i,a,s,d){var c,p,f,h,m,y,v,b,S,w,_,k,O,P,A,I,R,E=n.s==i.s?1:-1,T=n.c,N=i.c;if(!T||!T[0]||!N||!N[0])return new U(n.s&&i.s&&(T?!N||T[0]!=N[0]:N)?T&&0==T[0]||!N?0*E:E/0:NaN);for(S=(b=new U(E)).c=[],E=a+(p=n.e-i.e)+1,d||(d=l,p=g(n.e/u)-g(i.e/u),E=E/u|0),f=0;N[f]==(T[f]||0);f++);if(N[f]>(T[f]||0)&&p--,E<0)S.push(1),h=!0;else{for(P=T.length,I=N.length,f=0,E+=2,(m=o(d/(N[0]+1)))>1&&(N=e(N,m,d),T=e(T,m,d),I=N.length,P=T.length),O=I,_=(w=T.slice(0,I)).length;_=d/2&&A++;do{if(m=0,(c=t(N,w,I,_))<0){if(k=w[0],I!=_&&(k=k*d+(w[1]||0)),(m=o(k/A))>1)for(m>=d&&(m=d-1),v=(y=e(N,m,d)).length,_=w.length;1==t(y,w,v,_);)m--,r(y,It(N,w,I,_);)m++,r(w,I<_?R:N,_,d),_=w.length}else 0===c&&(m++,w=[0]);S[f++]=m,w[0]?w[_++]=T[O]||0:(w=[T[O]],_=1)}while((O++=10;E/=10,f++);q(b,a+(b.e=f+p*u-1)+1,s,h)}else b.e=p,b.r=+h;return b}}(),_=function(){var e=/^(-?)0([xbo])(?=\w[\w.]*$)/i,t=/^([^.]+)\.$/,r=/^\.([^.]+)$/,n=/^-?(Infinity|NaN)$/,i=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(o,s,l,u){var d,c=l?s:s.replace(i,"");if(n.test(c))o.s=isNaN(c)?null:c<0?-1:1;else{if(!l&&(c=c.replace(e,function(e,t,r){return d="x"==(r=r.toLowerCase())?16:"b"==r?2:8,u&&u!=d?e:t}),u&&(d=u,c=c.replace(t,"$1").replace(r,"0.$1")),s!=c))return new U(c,d);if(U.DEBUG)throw Error(a+"Not a"+(u?" base "+u:"")+" number: "+s);o.s=null}o.c=o.e=null}}(),k.absoluteValue=k.abs=function(){var e=new U(this);return e.s<0&&(e.s=1),e},k.comparedTo=function(e,t){return y(this,new U(e,t))},k.decimalPlaces=k.dp=function(e,t){var r,n,i,o=this;if(null!=e)return v(e,0,f),null==t?t=A:v(t,0,8),q(new U(o),e+o.e+1,t);if(!(r=o.c))return null;if(n=((i=r.length-1)-g(this.e/u))*u,i=r[i])for(;i%10==0;i/=10,n--);return n<0&&(n=0),n},k.dividedBy=k.div=function(e,r){return t(this,new U(e,r),P,A)},k.dividedToIntegerBy=k.idiv=function(e,r){return t(this,new U(e,r),0,1)},k.exponentiatedBy=k.pow=function(e,t){var r,n,s,l,d,c,p,f,h,g=this;if((e=new U(e)).c&&!e.isInteger())throw Error(a+"Exponent not an integer: "+L(e));if(null!=t&&(t=new U(t)),c=e.e>14,!g.c||!g.c[0]||1==g.c[0]&&!g.e&&1==g.c.length||!e.c||!e.c[0])return h=new U(Math.pow(+L(g),c?e.s*(2-b(e)):+L(e))),t?h.mod(t):h;if(p=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new U(NaN);(n=!p&&g.isInteger()&&t.isInteger())&&(g=g.mod(t))}else{if(e.e>9&&(g.e>0||g.e<-1||(0==g.e?g.c[0]>1||c&&g.c[1]>=24e7:g.c[0]<8e13||c&&g.c[0]<=9999975e7)))return l=g.s<0&&b(e)?-0:0,g.e>-1&&(l=1/l),new U(p?1/l:l);B&&(l=i(B/u+2))}for(c?(r=new U(.5),p&&(e.s=1),f=b(e)):f=(s=Math.abs(+L(e)))%2,h=new U(O);;){if(f){if(!(h=h.times(g)).c)break;l?h.c.length>l&&(h.c.length=l):n&&(h=h.mod(t))}if(s){if(0===(s=o(s/2)))break;f=s%2}else if(q(e=e.times(r),e.e+1,1),e.e>14)f=b(e);else{if(0==(s=+L(e)))break;f=s%2}g=g.times(g),l?g.c&&g.c.length>l&&(g.c.length=l):n&&(g=g.mod(t))}return n?h:(p&&(h=O.div(h)),t?h.mod(t):l?q(h,B,A,d):h)},k.integerValue=function(e){var t=new U(this);return null==e?e=A:v(e,0,8),q(t,t.e+1,e)},k.isEqualTo=k.eq=function(e,t){return 0===y(this,new U(e,t))},k.isFinite=function(){return!!this.c},k.isGreaterThan=k.gt=function(e,t){return y(this,new U(e,t))>0},k.isGreaterThanOrEqualTo=k.gte=function(e,t){return 1===(t=y(this,new U(e,t)))||0===t},k.isInteger=function(){return!!this.c&&g(this.e/u)>this.c.length-2},k.isLessThan=k.lt=function(e,t){return 0>y(this,new U(e,t))},k.isLessThanOrEqualTo=k.lte=function(e,t){return -1===(t=y(this,new U(e,t)))||0===t},k.isNaN=function(){return!this.s},k.isNegative=function(){return this.s<0},k.isPositive=function(){return this.s>0},k.isZero=function(){return!!this.c&&0==this.c[0]},k.minus=function(e,t){var r,n,i,o,a=this,s=a.s;if(t=(e=new U(e,t)).s,!s||!t)return new U(NaN);if(s!=t)return e.s=-t,a.plus(e);var d=a.e/u,c=e.e/u,p=a.c,f=e.c;if(!d||!c){if(!p||!f)return p?(e.s=-t,e):new U(f?a:NaN);if(!p[0]||!f[0])return f[0]?(e.s=-t,e):new U(p[0]?a:3==A?-0:0)}if(d=g(d),c=g(c),p=p.slice(),s=d-c){for((o=s<0)?(s=-s,i=p):(c=d,i=f),i.reverse(),t=s;t--;i.push(0));i.reverse()}else for(n=(o=(s=p.length)<(t=f.length))?s:t,s=t=0;t0)for(;t--;p[r++]=0);for(t=l-1;n>s;){if(p[--n]=0;){for(r=0,m=k[i]%S,y=k[i]/S|0,o=i+(a=d);o>i;)s=y*(c=_[--a]%S)+(f=_[a]/S|0)*m,r=((c=m*c+s%S*S+v[o]+r)/b|0)+(s/S|0)+y*f,v[o--]=c%b;v[o]=r}return r?++n:v.splice(0,1),H(e,v,n)},k.negated=function(){var e=new U(this);return e.s=-e.s||null,e},k.plus=function(e,t){var r,n=this,i=n.s;if(t=(e=new U(e,t)).s,!i||!t)return new U(NaN);if(i!=t)return e.s=-t,n.minus(e);var o=n.e/u,a=e.e/u,s=n.c,d=e.c;if(!o||!a){if(!s||!d)return new U(i/0);if(!s[0]||!d[0])return d[0]?e:new U(s[0]?n:0*i)}if(o=g(o),a=g(a),s=s.slice(),i=o-a){for(i>0?(a=o,r=d):(i=-i,r=s),r.reverse();i--;r.push(0));r.reverse()}for((i=s.length)-(t=d.length)<0&&(r=d,d=s,s=r,t=i),i=0;t;)i=(s[--t]=s[t]+d[t]+i)/l|0,s[t]=l===s[t]?0:s[t]%l;return i&&(s=[i].concat(s),++a),H(e,s,a)},k.precision=k.sd=function(e,t){var r,n,i,o=this;if(null!=e&&!!e!==e)return v(e,1,f),null==t?t=A:v(t,0,8),q(new U(o),e,t);if(!(r=o.c))return null;if(n=(i=r.length-1)*u+1,i=r[i]){for(;i%10==0;i/=10,n--);for(i=r[0];i>=10;i/=10,n++);}return e&&o.e+1>n&&(n=o.e+1),n},k.shiftedBy=function(e){return v(e,-d,d),this.times("1e"+e)},k.squareRoot=k.sqrt=function(){var e,r,n,i,o,a=this,s=a.c,l=a.s,u=a.e,d=P+4,c=new U("0.5");if(1!==l||!s||!s[0])return new U(!l||l<0&&(!s||s[0])?NaN:s?a:1/0);if(0==(l=Math.sqrt(+L(a)))||l==1/0?(((r=m(s)).length+u)%2==0&&(r+="0"),l=Math.sqrt(+r),u=g((u+1)/2)-(u<0||u%2),n=new U(r=l==1/0?"5e"+u:(r=l.toExponential()).slice(0,r.indexOf("e")+1)+u)):n=new U(l+""),n.c[0]){for((l=(u=n.e)+d)<3&&(l=0);;)if(o=n,n=c.times(o.plus(t(a,o,d,1))),m(o.c).slice(0,l)===(r=m(n.c)).slice(0,l)){if(n.e0&&g>0){for(o=g%l||l,c=h.substr(0,o);o0&&(c+=d+h.slice(o)),f&&(c="-"+c)}n=p?c+(r.decimalSeparator||"")+((u=+r.fractionGroupSize)?p.replace(RegExp("\\d{"+u+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):p):c}return(r.prefix||"")+n+(r.suffix||"")},k.toFraction=function(e){var r,n,i,o,s,l,d,p,f,h,g,y,v=this,b=v.c;if(null!=e&&(!(d=new U(e)).isInteger()&&(d.c||1!==d.s)||d.lt(O)))throw Error(a+"Argument "+(d.isInteger()?"out of range: ":"not an integer: ")+L(d));if(!b)return new U(v);for(r=new U(O),f=n=new U(O),i=p=new U(O),y=m(b),s=r.e=y.length-v.e-1,r.c[0]=c[(l=s%u)<0?u+l:l],e=!e||d.comparedTo(r)>0?s>0?r:f:d,l=T,T=1/0,d=new U(y),p.c[0]=0;h=t(d,r,0,1),1!=(o=n.plus(h.times(i))).comparedTo(e);)n=i,i=o,f=p.plus(h.times(o=f)),p=o,r=d.minus(h.times(o=r)),d=o;return o=t(e.minus(n),i,0,1),p=p.plus(o.times(f)),n=n.plus(o.times(i)),p.s=f.s=v.s,s*=2,g=1>t(f,i,s,A).minus(v).abs().comparedTo(t(p,n,s,A).minus(v).abs())?[f,i]:[p,n],T=l,g},k.toNumber=function(){return+L(this)},k.toPrecision=function(e,t){return null!=e&&v(e,1,f),J(this,e,t,2)},k.toString=function(e){var t,n=this,i=n.s,o=n.e;return null===o?i?(t="Infinity",i<0&&(t="-"+t)):t="NaN":(null==e?t=o<=I||o>=R?S(m(n.c),o):w(m(n.c),o,"0"):10===e&&D?t=w(m((n=q(new U(n),P+o+1,A)).c),n.e,"0"):(v(e,2,M.length,"Base"),t=r(w(m(n.c),o,"0"),10,e,i,!0)),i<0&&n.c[0]&&(t="-"+t)),t},k.valueOf=k.toJSON=function(){return L(this)},k._isBigNumber=!0,k[Symbol.toStringTag]="BigNumber",k[Symbol.for("nodejs.util.inspect.custom")]=k.valueOf,null!=e&&U.set(e),U}function g(e){var t=0|e;return e>0||e===t?t:t-1}function m(e){for(var t,r,n=1,i=e.length,o=e[0]+"";nu^r?1:-1;for(a=0,s=(l=i.length)<(u=o.length)?l:u;ao[a]^r?1:-1;return l==u?0:l>u^r?1:-1}function v(e,t,r,n){if(er||e!==o(e))throw Error(a+(n||"Argument")+("number"==typeof e?er?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function b(e){var t=e.c.length-1;return g(e.e/u)==t&&e.c[t]%2!=0}function S(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function w(e,t,r){var n,i;if(t<0){for(i=r+".";++t;i+=r);e=i+e}else if(n=e.length,++t>n){for(i=r,t-=n;--t;i+=r);e+=i}else ti?"["+c(e)+"]":"{ "+r.map(e=>{let[r,n]=e;return r+": "+a(n,t)}).join(", ")+" }"}function d(e,t){if(0===e.length)return"[]";if(t.length>i)return"[Array]";let r=Math.min(n,e.length),o=e.length-r,s=[];for(let n=0;n1&&s.push("... ".concat(o," more items")),"["+s.join(", ")+"]"}function c(e){let t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){let t=e.constructor.name;if("string"==typeof t&&""!==t)return t}return t}},68246:function(e,t,r){"use strict";var n;r.d(t,{UG:function(){return l},WU:function(){return o},Ye:function(){return i},h8:function(){return a},ku:function(){return n}});class i{get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}constructor(e,t,r){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=r}}class o{get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}constructor(e,t,r,n,i,o){this.kind=e,this.start=t,this.end=r,this.line=n,this.column=i,this.value=o,this.prev=null,this.next=null}}let a={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},s=new Set(Object.keys(a));function l(e){let t=null==e?void 0:e.kind;return"string"==typeof t&&s.has(t)}!function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"}(n||(n={}))},58549:function(e,t,r){"use strict";r.d(t,{LZ:function(){return a},wv:function(){return i}});var n=r(1357);function i(e){var t,r;let n=Number.MAX_SAFE_INTEGER,i=null,a=-1;for(let t=0;t0===t?e:e.slice(n)).slice(null!==(t=i)&&void 0!==t?t:0,a+1)}function o(e){let t=0;for(;t1&&i.slice(1).every(e=>0===e.length||(0,n.FD)(e.charCodeAt(0))),s=r.endsWith('\\"""'),l=e.endsWith('"')&&!s,u=e.endsWith("\\"),d=l||u,c=!(null!=t&&t.minimize)&&(!o||e.length>70||d||a||s),p="",f=o&&(0,n.FD)(e.charCodeAt(0));return(c&&!f||a)&&(p+="\n"),p+=r,(c||d)&&(p+="\n"),'"""'+p+'"""'}},1357:function(e,t,r){"use strict";function n(e){return 9===e||32===e}function i(e){return e>=48&&e<=57}function o(e){return e>=97&&e<=122||e>=65&&e<=90}function a(e){return o(e)||95===e}function s(e){return o(e)||i(e)||95===e}r.d(t,{FD:function(){return n},HQ:function(){return s},LQ:function(){return a},X1:function(){return i}})},11258:function(e,t,r){"use strict";var n;r.d(t,{h:function(){return n}}),function(e){e.NAME="Name",e.DOCUMENT="Document",e.OPERATION_DEFINITION="OperationDefinition",e.VARIABLE_DEFINITION="VariableDefinition",e.SELECTION_SET="SelectionSet",e.FIELD="Field",e.ARGUMENT="Argument",e.FRAGMENT_SPREAD="FragmentSpread",e.INLINE_FRAGMENT="InlineFragment",e.FRAGMENT_DEFINITION="FragmentDefinition",e.VARIABLE="Variable",e.INT="IntValue",e.FLOAT="FloatValue",e.STRING="StringValue",e.BOOLEAN="BooleanValue",e.NULL="NullValue",e.ENUM="EnumValue",e.LIST="ListValue",e.OBJECT="ObjectValue",e.OBJECT_FIELD="ObjectField",e.DIRECTIVE="Directive",e.NAMED_TYPE="NamedType",e.LIST_TYPE="ListType",e.NON_NULL_TYPE="NonNullType",e.SCHEMA_DEFINITION="SchemaDefinition",e.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",e.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",e.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",e.FIELD_DEFINITION="FieldDefinition",e.INPUT_VALUE_DEFINITION="InputValueDefinition",e.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",e.UNION_TYPE_DEFINITION="UnionTypeDefinition",e.ENUM_TYPE_DEFINITION="EnumTypeDefinition",e.ENUM_VALUE_DEFINITION="EnumValueDefinition",e.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",e.DIRECTIVE_DEFINITION="DirectiveDefinition",e.SCHEMA_EXTENSION="SchemaExtension",e.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",e.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",e.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",e.UNION_TYPE_EXTENSION="UnionTypeExtension",e.ENUM_TYPE_EXTENSION="EnumTypeExtension",e.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"}(n||(n={}))},33954:function(e,t,r){"use strict";r.d(t,{$_:function(){return s},Vn:function(){return l}});var n=r(3332),i=r(78617),o=r(68246),a=r(11258);let s=Object.freeze({});function l(e,t){let r,l,d,c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o.h8,p=new Map;for(let e of Object.values(a.h))p.set(e,u(t,e));let f=Array.isArray(e),h=[e],g=-1,m=[],y=e,v=[],b=[];do{var S,w,_;let e;let a=++g===h.length,u=a&&0!==m.length;if(a){if(l=0===b.length?void 0:v[v.length-1],y=d,d=b.pop(),u){if(f){y=y.slice();let e=0;for(let[t,r]of m){let n=t-e;null===r?(y.splice(n,1),e++):y[n]=r}}else for(let[e,t]of(y=Object.defineProperties({},Object.getOwnPropertyDescriptors(y)),m))y[e]=t}g=r.index,h=r.keys,m=r.edits,f=r.inArray,r=r.prev}else if(d){if(null==(y=d[l=f?g:h[g]]))continue;v.push(l)}if(!Array.isArray(y)){(0,o.UG)(y)||(0,n.a)(!1,"Invalid AST Node: ".concat((0,i.X)(y),"."));let r=a?null===(S=p.get(y.kind))||void 0===S?void 0:S.leave:null===(w=p.get(y.kind))||void 0===w?void 0:w.enter;if((e=null==r?void 0:r.call(t,y,l,d,v,b))===s)break;if(!1===e){if(!a){v.pop();continue}}else if(void 0!==e&&(m.push([l,e]),!a)){if((0,o.UG)(e))y=e;else{v.pop();continue}}}void 0===e&&u&&m.push([l,y]),a?v.pop():(r={inArray:f,index:g,keys:h,edits:m,prev:r},h=(f=Array.isArray(y))?y:null!==(_=c[y.kind])&&void 0!==_?_:[],g=-1,m=[],d&&b.push(d),d=y)}while(void 0!==r);return 0!==m.length?m[m.length-1][1]:e}function u(e,t){let r=e[t];return"object"==typeof r?r:"function"==typeof r?{enter:r,leave:void 0}:{enter:e.enter,leave:e.leave}}},64571:function(e,t,r){"use strict";let n;r.d(t,{g7:function(){return v},dP:function(){return G},re:function(){return Y}});let i=()=>Object.create(null),{forEach:o,slice:a}=Array.prototype,{hasOwnProperty:s}=Object.prototype;class l{lookup(){for(var e=arguments.length,t=Array(e),r=0;rt=t.getChildTrie(e)),s.call(t,"data")?t.data:t.data=this.makeData(a.call(e))}peek(){for(var e=arguments.length,t=Array(e),r=0;r{class e{hasValue(){for(let e=c;e;e=e.parent)if(this.id in e.slots){let t=e.slots[this.id];if(t===p)break;return e!==c&&(c.slots[this.id]=t),!0}return c&&(c.slots[this.id]=p),!1}getValue(){if(this.hasValue())return c.slots[this.id]}withValue(e,t,r,n){let i={__proto__:null,[this.id]:e},o=c;c={parent:o,slots:i};try{return t.apply(n,r)}finally{c=o}}static bind(e){let t=c;return function(){let r=c;try{return c=t,e.apply(this,arguments)}finally{c=r}}}static noContext(e,t,r){if(!c)return e.apply(r,t);{let n=c;try{return c=null,e.apply(r,t)}finally{c=n}}}constructor(){this.id=["slot",f++,Date.now(),Math.random().toString(36).slice(2)].join(":")}}return e};function g(e){try{return e()}catch(e){}}let m="@wry/context:Slot",y=g(()=>globalThis)||g(()=>global)||Object.create(null),v=y[m]||Array[m]||function(e){try{Object.defineProperty(y,m,{value:e,enumerable:!1,writable:!1,configurable:!0})}finally{return e}}(h()),{bind:b,noContext:S}=v,w=new v,{hasOwnProperty:_}=Object.prototype,k=Array.from||function(e){let t=[];return e.forEach(e=>t.push(e)),t};function O(e){let{unsubscribe:t}=e;"function"==typeof t&&(e.unsubscribe=void 0,t())}let P=[],A=100;function I(e,t){if(!e)throw Error(t||"assertion failure")}function R(e,t){let r=e.length;return r>0&&r===t.length&&e[r-1]===t[r-1]}function E(e){switch(e.length){case 0:throw Error("unknown value");case 1:return e[0];case 2:throw e[1]}}function T(e){return e.slice(0)}class N{peek(){if(1===this.value.length&&!M(this))return x(this),this.value[0]}recompute(e){return I(!this.recomputing,"already recomputing"),x(this),M(this)?B(this,e):E(this.value)}setDirty(){this.dirty||(this.dirty=!0,U(this),O(this))}dispose(){this.setDirty(),F(this),j(this,(e,t)=>{e.setDirty(),V(e,this)})}forget(){this.dispose()}dependOn(e){e.add(this),this.deps||(this.deps=P.pop()||new Set),this.deps.add(e)}forgetDeps(){this.deps&&(k(this.deps).forEach(e=>e.delete(this)),this.deps.clear(),P.push(this.deps),this.deps=null)}constructor(e){this.fn=e,this.parents=new Set,this.childValues=new Map,this.dirtyChildren=null,this.dirty=!0,this.recomputing=!1,this.value=[],this.deps=null,++N.count}}function x(e){let t=w.getValue();if(t)return e.parents.add(t),t.childValues.has(e)||t.childValues.set(e,[]),M(e)?H(t,e):q(t,e),t}function B(e,t){return F(e),w.withValue(e,C,[e,t]),W(e,t)&&D(e),E(e.value)}function C(e,t){let r;e.recomputing=!0;let{normalizeResult:n}=e;n&&1===e.value.length&&(r=T(e.value)),e.value.length=0;try{if(e.value[0]=e.fn.apply(null,t),n&&r&&!R(r,e.value))try{e.value[0]=n(e.value[0],r[0])}catch(e){}}catch(t){e.value[1]=t}e.recomputing=!1}function M(e){return e.dirty||!!(e.dirtyChildren&&e.dirtyChildren.size)}function D(e){e.dirty=!1,M(e)||J(e)}function U(e){j(e,H)}function J(e){j(e,q)}function j(e,t){let r=e.parents.size;if(r){let n=k(e.parents);for(let i=0;i0&&e.childValues.forEach((t,r)=>{V(e,r)}),e.forgetDeps(),I(null===e.dirtyChildren)}function V(e,t){t.parents.delete(e),e.childValues.delete(t),L(e,t)}function W(e,t){if("function"==typeof e.subscribe)try{O(e),e.unsubscribe=e.subscribe.apply(null,t)}catch(t){return e.setDirty(),!1}return!0}N.count=0;let z={setDirty:!0,dispose:!0,forget:!0};function G(e){let t=new Map,r=e&&e.subscribe;function n(e){let n=w.getValue();if(n){let i=t.get(e);i||t.set(e,i=new Set),n.dependOn(i),"function"==typeof r&&(O(i),i.unsubscribe=r(e))}}return n.dirty=function(e,r){let n=t.get(e);if(n){let i=r&&_.call(z,r)?r:"setDirty";k(n).forEach(e=>e[i]()),t.delete(e),O(n)}},n}function Q(){for(var e=arguments.length,t=Array(e),r=0;r1&&void 0!==arguments[1]?arguments[1]:Object.create(null),s="function"==typeof a?new a(t,e=>e.dispose()):a,l=function(){let t=n.apply(null,r?r.apply(null,arguments):arguments);if(void 0===t)return e.apply(null,arguments);let a=s.get(t);a||(s.set(t,a=new N(e)),a.normalizeResult=i,a.subscribe=o,a.forget=()=>s.delete(t));let l=a.recompute(Array.prototype.slice.call(arguments));return s.set(t,a),K.add(s),w.hasValue()||(K.forEach(e=>e.clean()),K.clear()),l};function u(e){let t=e&&s.get(e);t&&t.setDirty()}function c(e){let t=e&&s.get(e);if(t)return t.peek()}function p(e){return!!e&&s.delete(e)}return Object.defineProperty(l,"size",{get:()=>s.size,configurable:!1,enumerable:!1}),Object.freeze(l.options={max:t,keyArgs:r,makeCacheKey:n,normalizeResult:i,subscribe:o,cache:s}),l.dirtyKey=u,l.dirty=function(){u(n.apply(null,arguments))},l.peekKey=c,l.peek=function(){return c(n.apply(null,arguments))},l.forgetKey=p,l.forget=function(){return p(n.apply(null,arguments))},l.makeCacheKey=n,l.getKey=r?function(){return n.apply(null,r.apply(null,arguments))}:n,Object.freeze(l)}},30298:function(e,t,r){"use strict";r.d(t,{Am:function(){return T},Ix:function(){return J}});var n=r(64090),i=r(75504);let o=e=>"number"==typeof e&&!isNaN(e),a=e=>"string"==typeof e,s=e=>"function"==typeof e,l=e=>a(e)||s(e)?e:null,u=e=>(0,n.isValidElement)(e)||a(e)||s(e)||o(e);function d(e,t,r){void 0===r&&(r=300);let{scrollHeight:n,style:i}=e;requestAnimationFrame(()=>{i.minHeight="initial",i.height=n+"px",i.transition="all ".concat(r,"ms"),requestAnimationFrame(()=>{i.height="0",i.padding="0",i.margin="0",setTimeout(t,r)})})}function c(e){let{enter:t,exit:r,appendPosition:i=!1,collapse:o=!0,collapseDuration:a=300}=e;return function(e){let{children:s,position:l,preventExitTransition:u,done:c,nodeRef:p,isIn:f,playToast:h}=e,g=i?"".concat(t,"--").concat(l):t,m=i?"".concat(r,"--").concat(l):r,y=(0,n.useRef)(0);return(0,n.useLayoutEffect)(()=>{let e=p.current,t=g.split(" "),r=n=>{n.target===p.current&&(h(),e.removeEventListener("animationend",r),e.removeEventListener("animationcancel",r),0===y.current&&"animationcancel"!==n.type&&e.classList.remove(...t))};e.classList.add(...t),e.addEventListener("animationend",r),e.addEventListener("animationcancel",r)},[]),(0,n.useEffect)(()=>{let e=p.current,t=()=>{e.removeEventListener("animationend",t),o?d(e,c,a):c()};f||(u?t():(y.current=1,e.className+=" ".concat(m),e.addEventListener("animationend",t)))},[f]),n.createElement(n.Fragment,null,s)}}function p(e,t){return null!=e?{content:e.content,containerId:e.props.containerId,id:e.props.toastId,theme:e.props.theme,type:e.props.type,data:e.props.data||{},isLoading:e.props.isLoading,icon:e.props.icon,status:t}:{}}let f=new Map,h=[],g=new Set,m=e=>g.forEach(t=>t(e)),y=()=>f.size>0;function v(e,t){var r;if(t)return!(null==(r=f.get(t))||!r.isToastActive(e));let n=!1;return f.forEach(t=>{t.isToastActive(e)&&(n=!0)}),n}function b(e,t){u(e)&&(y()||h.push({content:e,options:t}),f.forEach(r=>{r.buildToast(e,t)}))}function S(e,t){f.forEach(r=>{null!=t&&null!=t&&t.containerId?(null==t?void 0:t.containerId)===r.id&&r.toggle(e,null==t?void 0:t.id):r.toggle(e,null==t?void 0:t.id)})}function w(e){let{subscribe:t,getSnapshot:r,setProps:i}=(0,n.useRef)(function(e){let t=e.containerId||1;return{subscribe(r){let i=function(e,t,r){let i=1,d=0,c=[],f=[],h=[],g=t,m=new Map,y=new Set,v=()=>{h=Array.from(m.values()),y.forEach(e=>e())},b=e=>{f=null==e?[]:f.filter(t=>t!==e),v()},S=e=>{let{toastId:t,onOpen:i,updateId:o,children:a}=e.props,l=null==o;e.staleId&&m.delete(e.staleId),m.set(t,e),f=[...f,e.props.toastId].filter(t=>t!==e.staleId),v(),r(p(e,l?"added":"updated")),l&&s(i)&&i((0,n.isValidElement)(a)&&a.props)};return{id:e,props:g,observe:e=>(y.add(e),()=>y.delete(e)),toggle:(e,t)=>{m.forEach(r=>{null!=t&&t!==r.props.toastId||s(r.toggle)&&r.toggle(e)})},removeToast:b,toasts:m,clearQueue:()=>{d-=c.length,c=[]},buildToast:(t,f)=>{var h,y;if((t=>{let{containerId:r,toastId:n,updateId:i}=t,o=r?r!==e:1!==e,a=m.has(n)&&null==i;return o||a})(f))return;let{toastId:w,updateId:_,data:k,staleId:O,delay:P}=f,A=()=>{b(w)},I=null==_;I&&d++;let R={...g,style:g.toastStyle,key:i++,...Object.fromEntries(Object.entries(f).filter(e=>{let[t,r]=e;return null!=r})),toastId:w,updateId:_,data:k,closeToast:A,isIn:!1,className:l(f.className||g.toastClassName),bodyClassName:l(f.bodyClassName||g.bodyClassName),progressClassName:l(f.progressClassName||g.progressClassName),autoClose:!f.isLoading&&(h=f.autoClose,y=g.autoClose,!1===h||o(h)&&h>0?h:y),deleteToast(){let e=m.get(w),{onClose:t,children:i}=e.props;s(t)&&t((0,n.isValidElement)(i)&&i.props),r(p(e,"removed")),m.delete(w),--d<0&&(d=0),c.length>0?S(c.shift()):v()}};R.closeButton=g.closeButton,!1===f.closeButton||u(f.closeButton)?R.closeButton=f.closeButton:!0===f.closeButton&&(R.closeButton=!u(g.closeButton)||g.closeButton);let E=t;(0,n.isValidElement)(t)&&!a(t.type)?E=(0,n.cloneElement)(t,{closeToast:A,toastProps:R,data:k}):s(t)&&(E=t({closeToast:A,toastProps:R,data:k}));let T={content:E,props:R,staleId:O};g.limit&&g.limit>0&&d>g.limit&&I?c.push(T):o(P)?setTimeout(()=>{S(T)},P):S(T)},setProps(e){g=e},setToggle:(e,t)=>{m.get(e).toggle=t},isToastActive:e=>f.some(t=>t===e),getSnapshot:()=>g.newestOnTop?h.reverse():h}}(t,e,m);f.set(t,i);let d=i.observe(r);return h.forEach(e=>b(e.content,e.options)),h=[],()=>{d(),f.delete(t)}},setProps(e){var r;null==(r=f.get(t))||r.setProps(e)},getSnapshot(){var e;return null==(e=f.get(t))?void 0:e.getSnapshot()}}}(e)).current;i(e);let d=(0,n.useSyncExternalStore)(t,r,r);return{getToastToRender:function(e){if(!d)return[];let t=new Map;return d.forEach(e=>{let{position:r}=e.props;t.has(r)||t.set(r,[]),t.get(r).push(e)}),Array.from(t,t=>e(t[0],t[1]))},isToastActive:v,count:null==d?void 0:d.length}}function _(e){var t,r;let[i,o]=(0,n.useState)(!1),[a,s]=(0,n.useState)(!1),l=(0,n.useRef)(null),u=(0,n.useRef)({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:d,pauseOnHover:c,closeToast:p,onClick:h,closeOnClick:g}=e;function m(){o(!0)}function y(){o(!1)}function v(t){let r=l.current;u.canDrag&&r&&(u.didMove=!0,i&&y(),u.delta="x"===e.draggableDirection?t.clientX-u.start:t.clientY-u.start,u.start!==t.clientX&&(u.canCloseOnClick=!1),r.style.transform="translate3d(".concat("x"===e.draggableDirection?"".concat(u.delta,"px, var(--y)"):"0, calc(".concat(u.delta,"px + var(--y))"),",0)"),r.style.opacity=""+(1-Math.abs(u.delta/u.removalDistance)))}function b(){document.removeEventListener("pointermove",v),document.removeEventListener("pointerup",b);let t=l.current;if(u.canDrag&&u.didMove&&t){if(u.canDrag=!1,Math.abs(u.delta)>u.removalDistance)return s(!0),e.closeToast(),void e.collapseAll();t.style.transition="transform 0.2s, opacity 0.2s",t.style.removeProperty("transform"),t.style.removeProperty("opacity")}}null==(r=f.get((t={id:e.toastId,containerId:e.containerId,fn:o}).containerId||1))||r.setToggle(t.id,t.fn),(0,n.useEffect)(()=>{if(e.pauseOnFocusLoss)return document.hasFocus()||y(),window.addEventListener("focus",m),window.addEventListener("blur",y),()=>{window.removeEventListener("focus",m),window.removeEventListener("blur",y)}},[e.pauseOnFocusLoss]);let S={onPointerDown:function(t){if(!0===e.draggable||e.draggable===t.pointerType){u.didMove=!1,document.addEventListener("pointermove",v),document.addEventListener("pointerup",b);let r=l.current;u.canCloseOnClick=!0,u.canDrag=!0,r.style.transition="none","x"===e.draggableDirection?(u.start=t.clientX,u.removalDistance=r.offsetWidth*(e.draggablePercent/100)):(u.start=t.clientY,u.removalDistance=r.offsetHeight*(80===e.draggablePercent?1.5*e.draggablePercent:e.draggablePercent)/100)}},onPointerUp:function(t){let{top:r,bottom:n,left:i,right:o}=l.current.getBoundingClientRect();"touchend"!==t.nativeEvent.type&&e.pauseOnHover&&t.clientX>=i&&t.clientX<=o&&t.clientY>=r&&t.clientY<=n?y():m()}};return d&&c&&(S.onMouseEnter=y,e.stacked||(S.onMouseLeave=m)),g&&(S.onClick=e=>{h&&h(e),u.canCloseOnClick&&p()}),{playToast:m,pauseToast:y,isRunning:i,preventExitTransition:a,toastRef:l,eventHandlers:S}}function k(e){let{delay:t,isRunning:r,closeToast:o,type:a="default",hide:l,className:u,style:d,controlledProgress:c,progress:p,rtl:f,isIn:h,theme:g}=e,m=l||c&&0===p,y={...d,animationDuration:"".concat(t,"ms"),animationPlayState:r?"running":"paused"};c&&(y.transform="scaleX(".concat(p,")"));let v=(0,i.Z)("Toastify__progress-bar",c?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated","Toastify__progress-bar-theme--".concat(g),"Toastify__progress-bar--".concat(a),{"Toastify__progress-bar--rtl":f}),b=s(u)?u({rtl:f,type:a,defaultClassName:v}):(0,i.Z)(v,u),S={[c&&p>=1?"onTransitionEnd":"onAnimationEnd"]:c&&p<1?null:()=>{h&&o()}};return n.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":m},n.createElement("div",{className:"Toastify__progress-bar--bg Toastify__progress-bar-theme--".concat(g," Toastify__progress-bar--").concat(a)}),n.createElement("div",{role:"progressbar","aria-hidden":m?"true":"false","aria-label":"notification timer",className:b,style:y,...S}))}let O=1,P=()=>""+O++;function A(e){return e&&(a(e.toastId)||o(e.toastId))?e.toastId:P()}function I(e,t){return b(e,t),t.toastId}function R(e,t){return{...t,type:t&&t.type||e,toastId:A(t)}}function E(e){return(t,r)=>I(t,R(e,r))}function T(e,t){return I(e,R("default",t))}T.loading=(e,t)=>I(e,R("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),T.promise=function(e,t,r){let n,{pending:i,error:o,success:l}=t;i&&(n=a(i)?T.loading(i,r):T.loading(i.render,{...r,...i}));let u={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},d=(e,t,i)=>{if(null==t)return void T.dismiss(n);let o={type:e,...u,...r,data:i},s=a(t)?{render:t}:t;return n?T.update(n,{...o,...s}):T(s.render,{...o,...s}),i},c=s(e)?e():e;return c.then(e=>d("success",l,e)).catch(e=>d("error",o,e)),c},T.success=E("success"),T.info=E("info"),T.error=E("error"),T.warning=E("warning"),T.warn=T.warning,T.dark=(e,t)=>I(e,R("default",{theme:"dark",...t})),T.dismiss=function(e){!function(e){var t,r;y()?null==e||a(t=e)||o(t)?f.forEach(t=>{t.removeToast(e)}):e&&("containerId"in e||"id"in e)&&((null==(r=f.get(e.containerId))?void 0:r.removeToast(e.id))||f.forEach(t=>{t.removeToast(e.id)})):h=h.filter(t=>null!=e&&t.options.toastId!==e)}(e)},T.clearWaitingQueue=function(e){void 0===e&&(e={}),f.forEach(t=>{!t.props.limit||e.containerId&&t.id!==e.containerId||t.clearQueue()})},T.isActive=v,T.update=function(e,t){void 0===t&&(t={});let r=((e,t)=>{var r;let{containerId:n}=t;return null==(r=f.get(n||1))?void 0:r.toasts.get(e)})(e,t);if(r){let{props:n,content:i}=r,o={delay:100,...n,...t,toastId:t.toastId||e,updateId:P()};o.toastId!==e&&(o.staleId=e);let a=o.render||i;delete o.render,I(a,o)}},T.done=e=>{T.update(e,{progress:1})},T.onChange=function(e){return g.add(e),()=>{g.delete(e)}},T.play=e=>S(!0,e),T.pause=e=>S(!1,e);let N=n.useLayoutEffect,x=e=>{let{theme:t,type:r,isLoading:i,...o}=e;return n.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:"colored"===t?"currentColor":"var(--toastify-icon-color-".concat(r,")"),...o})},B={info:function(e){return n.createElement(x,{...e},n.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(e){return n.createElement(x,{...e},n.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(e){return n.createElement(x,{...e},n.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(e){return n.createElement(x,{...e},n.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return n.createElement("div",{className:"Toastify__spinner"})}},C=e=>{let{isRunning:t,preventExitTransition:r,toastRef:o,eventHandlers:a,playToast:l}=_(e),{closeButton:u,children:d,autoClose:c,onClick:p,type:f,hideProgressBar:h,closeToast:g,transition:m,position:y,className:v,style:b,bodyClassName:S,bodyStyle:w,progressClassName:O,progressStyle:P,updateId:A,role:I,progress:R,rtl:E,toastId:T,deleteToast:N,isIn:x,isLoading:C,closeOnClick:M,theme:D}=e,U=(0,i.Z)("Toastify__toast","Toastify__toast-theme--".concat(D),"Toastify__toast--".concat(f),{"Toastify__toast--rtl":E},{"Toastify__toast--close-on-click":M}),J=s(v)?v({rtl:E,position:y,type:f,defaultClassName:U}):(0,i.Z)(U,v),j=function(e){let{theme:t,type:r,isLoading:i,icon:o}=e,a=null,l={theme:t,type:r};return!1===o||(s(o)?a=o({...l,isLoading:i}):(0,n.isValidElement)(o)?a=(0,n.cloneElement)(o,l):i?a=B.spinner():r in B&&(a=B[r](l))),a}(e),H=!!R||!c,q={closeToast:g,type:f,theme:D},L=null;return!1===u||(L=s(u)?u(q):(0,n.isValidElement)(u)?(0,n.cloneElement)(u,q):function(e){let{closeToast:t,theme:r,ariaLabel:i="close"}=e;return n.createElement("button",{className:"Toastify__close-button Toastify__close-button--".concat(r),type:"button",onClick:e=>{e.stopPropagation(),t(e)},"aria-label":i},n.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},n.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}(q)),n.createElement(m,{isIn:x,done:N,position:y,preventExitTransition:r,nodeRef:o,playToast:l},n.createElement("div",{id:T,onClick:p,"data-in":x,className:J,...a,style:b,ref:o},n.createElement("div",{...x&&{role:I},className:s(S)?S({type:f}):(0,i.Z)("Toastify__toast-body",S),style:w},null!=j&&n.createElement("div",{className:(0,i.Z)("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!C})},j),n.createElement("div",null,d)),L,n.createElement(k,{...A&&!H?{key:"pb-".concat(A)}:{},rtl:E,theme:D,delay:c,isRunning:t,isIn:x,closeToast:g,hide:h,type:f,style:P,className:O,controlledProgress:H,progress:R||0})))},M=function(e,t){return void 0===t&&(t=!1),{enter:"Toastify--animate Toastify__".concat(e,"-enter"),exit:"Toastify--animate Toastify__".concat(e,"-exit"),appendPosition:t}},D=c(M("bounce",!0)),U=(c(M("slide",!0)),c(M("zoom")),c(M("flip")),{position:"top-right",transition:D,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"});function J(e){let t={...U,...e},r=e.stacked,[o,a]=(0,n.useState)(!0),u=(0,n.useRef)(null),{getToastToRender:d,isToastActive:c,count:p}=w(t),{className:f,style:h,rtl:g,containerId:m}=t;function y(e){let t=(0,i.Z)("Toastify__toast-container","Toastify__toast-container--".concat(e),{"Toastify__toast-container--rtl":g});return s(f)?f({position:e,rtl:g,defaultClassName:t}):(0,i.Z)(t,l(f))}function v(){r&&(a(!0),T.play())}return N(()=>{if(r){var e;let r=u.current.querySelectorAll('[data-in="true"]'),n=12,i=null==(e=t.position)?void 0:e.includes("top"),a=0,s=0;Array.from(r).reverse().forEach((e,t)=>{let r=e;r.classList.add("Toastify__toast--stacked"),t>0&&(r.dataset.collapsed="".concat(o)),r.dataset.pos||(r.dataset.pos=i?"top":"bot");let l=a*(o?.2:1)+(o?0:n*t);r.style.setProperty("--y","".concat(i?l:-1*l,"px")),r.style.setProperty("--g","".concat(n)),r.style.setProperty("--s",""+(1-(o?s:0))),a+=r.offsetHeight,s+=.025})}},[o,p,r]),n.createElement("div",{ref:u,className:"Toastify",id:m,onMouseEnter:()=>{r&&(a(!1),T.pause())},onMouseLeave:v},d((e,t)=>{let i=t.length?{...h}:{...h,pointerEvents:"none"};return n.createElement("div",{className:y(e),style:i,key:"container-".concat(e)},t.map(e=>{let{content:t,props:i}=e;return n.createElement(C,{...i,stacked:r,collapseAll:v,isIn:c(i.toastId,i.containerId),style:i.style,key:"toast-".concat(i.key)},t)}))}))}},69703:function(e,t,r){"use strict";r.d(t,{Jh:function(){return l},ZT:function(){return i},_T:function(){return a},ev:function(){return u},mG:function(){return s},pi:function(){return o}});var n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var o=function(){return(o=Object.assign||function(e){for(var t,r=1,n=arguments.length;rt.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(e);it.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function s(e,t,r,n){function i(e){return e instanceof r?e:new r(function(t){t(e)})}return new(r||(r=Promise))(function(r,o){function a(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){e.done?r(e.value):i(e.value).then(a,s)}l((n=n.apply(e,t||[])).next())})}function l(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return l([e,t])}}function l(s){if(r)throw TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]{var t=e,{fullWidth:r=!1,structure:o="base",disabled:a=!1,children:s}=t,l=(0,n.S0)(t,["fullWidth","structure","disabled","children"]);let u=()=>{if(a)switch(o){case"outlined":return"ui-bg-transparent ui-border ui-border-neutral-600 ui-text-neutral-600 ui-pointer-events-none";case"naked":return"ui-border-none ui-bg-transparent ui-text-white/60 ui-underline ui-font-normal ui-pointer-events-none";case"destructive":return"ui-bg-red-500/60 ui-text-white hover:ui-bg-red-600 ui-pointer-events-none";default:return"ui-bg-white/60 ui-text-black ui-pointer-events-none"}switch(o){case"outlined":return"ui-border ui-bg-transparent ui-border-neutral-300 ui-border-opacity-50 ui-text-white hover:ui-bg-white/5";case"naked":return"ui-border-none ui-bg-transparent ui-text-white ui-underline ui-font-normal";case"destructive":return"ui-bg-red-500 ui-text-white hover:ui-bg-red-400";default:return"ui-bg-white ui-text-black hover:ui-bg-neutral-100"}};return(0,i.jsx)("button",(0,n.EZ)((0,n.ih)({className:"ui-flex ui-items-center ui-justify-center ui-rounded-md ui-font-akkuratLL ui-uppercase ui-px-5 ui-py-3.5 ui-text-sm ui-outline-none ui-hover:opacity-70 ".concat(r?"ui-w-full":""," ").concat(u())},l),{children:s}))}},85523:function(e,t,r){"use strict";r.d(t,{EZ:function(){return c},S0:function(){return p},ih:function(){return d}});var n=Object.defineProperty,i=Object.defineProperties,o=Object.getOwnPropertyDescriptors,a=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable,u=(e,t,r)=>t in e?n(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,d=(e,t)=>{for(var r in t||(t={}))s.call(t,r)&&u(e,r,t[r]);if(a)for(var r of a(t))l.call(t,r)&&u(e,r,t[r]);return e},c=(e,t)=>i(e,o(t)),p=(e,t)=>{var r={};for(var n in e)s.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&a)for(var n of a(e))0>t.indexOf(n)&&l.call(e,n)&&(r[n]=e[n]);return r}},56093:function(e,t,r){"use strict";function n(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}r.d(t,{_:function(){return n}})},78390:function(e,t,r){"use strict";function n(){}r.d(t,{e:function(){return i}});class i{has(e){return this.map.has(e)}get(e){let t=this.getNode(e);return t&&t.value}get size(){return this.map.size}getNode(e){let t=this.map.get(e);if(t&&t!==this.newest){let{older:e,newer:r}=t;r&&(r.older=e),e&&(e.newer=r),t.older=this.newest,t.older.newer=t,t.newer=null,this.newest=t,t===this.oldest&&(this.oldest=r)}return t}set(e,t){let r=this.getNode(e);return r?r.value=t:(r={key:e,value:t,newer:null,older:this.newest},this.newest&&(this.newest.newer=r),this.newest=r,this.oldest=this.oldest||r,this.map.set(e,r),r.value)}clean(){for(;this.oldest&&this.map.size>this.max;)this.delete(this.oldest.key)}delete(e){let t=this.map.get(e);return!!t&&(t===this.newest&&(this.newest=t.older),t===this.oldest&&(this.oldest=t.newer),t.newer&&(t.newer.older=t.older),t.older&&(t.older.newer=t.newer),this.map.delete(e),this.dispose(t.value,e),!0)}constructor(e=1/0,t=n){this.max=e,this.dispose=t,this.map=new Map,this.newest=null,this.oldest=null}}},89933:function(e,t,r){"use strict";function n(){}r.d(t,{k:function(){return u}});let i=n,o="undefined"!=typeof WeakRef?WeakRef:function(e){return{deref:()=>e}},a="undefined"!=typeof WeakMap?WeakMap:Map,s="undefined"!=typeof FinalizationRegistry?FinalizationRegistry:function(){return{register:n,unregister:n}},l=10024;class u{has(e){return this.map.has(e)}get(e){let t=this.getNode(e);return t&&t.value}getNode(e){let t=this.map.get(e);if(t&&t!==this.newest){let{older:e,newer:r}=t;r&&(r.older=e),e&&(e.newer=r),t.older=this.newest,t.older.newer=t,t.newer=null,this.newest=t,t===this.oldest&&(this.oldest=r)}return t}set(e,t){let r=this.getNode(e);return r?r.value=t:(r={key:e,value:t,newer:null,older:this.newest},this.newest&&(this.newest.newer=r),this.newest=r,this.oldest=this.oldest||r,this.scheduleFinalization(r),this.map.set(e,r),this.size++,r.value)}clean(){for(;this.oldest&&this.size>this.max;)this.deleteNode(this.oldest)}deleteNode(e){e===this.newest&&(this.newest=e.older),e===this.oldest&&(this.oldest=e.newer),e.newer&&(e.newer.older=e.older),e.older&&(e.older.newer=e.newer),this.size--;let t=e.key||e.keyRef&&e.keyRef.deref();this.dispose(e.value,t),e.keyRef?this.registry.unregister(e):this.unfinalizedNodes.delete(e),t&&this.map.delete(t)}delete(e){let t=this.map.get(e);return!!t&&(this.deleteNode(t),!0)}scheduleFinalization(e){this.unfinalizedNodes.add(e),this.finalizationScheduled||(this.finalizationScheduled=!0,queueMicrotask(this.finalize))}constructor(e=1/0,t=i){this.max=e,this.dispose=t,this.map=new a,this.newest=null,this.oldest=null,this.unfinalizedNodes=new Set,this.finalizationScheduled=!1,this.size=0,this.finalize=()=>{let e=this.unfinalizedNodes.values();for(let t=0;t0?queueMicrotask(this.finalize):this.finalizationScheduled=!1},this.registry=new s(this.deleteNode.bind(this))}}},49058:function(e,t,r){"use strict";r.d(t,{D:function(){return s}});let{toString:n,hasOwnProperty:i}=Object.prototype,o=Function.prototype.toString,a=new Map;function s(e,t){try{return l(e,t)}finally{a.clear()}}function l(e,t){if(e===t)return!0;let r=n.call(e);if(r!==n.call(t))return!1;switch(r){case"[object Array]":if(e.length!==t.length)break;case"[object Object]":{if(f(e,t))return!0;let r=u(e),n=u(t),o=r.length;if(o!==n.length)return!1;for(let e=0;e=0&&e.indexOf(t,r)===r}function f(e,t){let r=a.get(e);if(r){if(r.has(t))return!0}else a.set(e,r=new Set);return r.add(t),!1}},60430:function(e,t,r){"use strict";r.d(t,{B:function(){return s}});let n=()=>Object.create(null),{forEach:i,slice:o}=Array.prototype,{hasOwnProperty:a}=Object.prototype;class s{lookup(){return this.lookupArray(arguments)}lookupArray(e){let t=this;return i.call(e,e=>t=t.getChildTrie(e)),a.call(t,"data")?t.data:t.data=this.makeData(o.call(e))}peek(){return this.peekArray(arguments)}peekArray(e){let t=this;for(let r=0,n=e.length;t&&rT?m.c=m.e=null:e.e=10;p/=10,c++);c>T?m.c=m.e=null:(m.e=c,m.c=[e]);return}g=String(e)}else{if(!n.test(g=String(e)))return _(m,g,f);m.s=45==g.charCodeAt(0)?(g=g.slice(1),-1):1}(c=g.indexOf("."))>-1&&(g=g.replace(".","")),(p=g.search(/e/i))>0?(c<0&&(c=p),c+=+g.slice(p+1),g=g.substring(0,p)):c<0&&(c=g.length)}else{if(v(t,2,M.length,"Base"),10==t&&D)return q(m=new U(e),P+m.e+1,A);if(g=String(e),f="number"==typeof e){if(0*e!=0)return _(m,g,f,t);if(m.s=1/e<0?(g=g.slice(1),-1):1,U.DEBUG&&g.replace(/^0\.0*|\./,"").length>15)throw Error(s+e)}else m.s=45===g.charCodeAt(0)?(g=g.slice(1),-1):1;for(i=M.slice(0,t),c=p=0,h=g.length;pi.indexOf(a=g.charAt(p))){if("."==a){if(p>c){c=h;continue}}else if(!l&&(g==g.toUpperCase()&&(g=g.toLowerCase())||g==g.toLowerCase()&&(g=g.toUpperCase()))){l=!0,p=-1,c=0;continue}return _(m,String(e),f,t)}f=!1,(c=(g=r(g,t,10,m.s)).indexOf("."))>-1?g=g.replace(".",""):c=g.length}for(p=0;48===g.charCodeAt(p);p++);for(h=g.length;48===g.charCodeAt(--h););if(g=g.slice(p,++h)){if(h-=p,f&&U.DEBUG&&h>15&&(e>d||e!==o(e)))throw Error(s+m.s*e);if((c=c-p-1)>T)m.c=m.e=null;else if(c=R)?S(l,a):w(l,a,"0");else if(o=(e=q(new U(e),t,r)).e,s=(l=m(e.c)).length,1==n||2==n&&(t<=o||o<=I)){for(;ss){if(--t>0)for(l+=".";t--;l+="0");}else if((t+=o-s)>0)for(o+1==s&&(l+=".");t--;l+="0");return e.s<0&&i?"-"+l:l}function j(e,t){for(var r,n,i=1,o=new U(e[0]);i=10;i/=10,n++);return(r=n+r*u-1)>T?e.c=e.e=null:r=10;p/=10,a++);if((s=t-a)<0)s+=u,d=t,g=o((f=m[h=0])/y[a-d-1]%10);else if((h=i((s+1)/u))>=m.length){if(n){for(;m.length<=h;m.push(0));f=g=0,a=1,s%=u,d=s-u+1}else break n}else{for(a=1,f=p=m[h];p>=10;p/=10,a++);s%=u,g=(d=s-u+a)<0?0:o(f/y[a-d-1]%10)}if(n=n||t<0||null!=m[h+1]||(d<0?f:f%y[a-d-1]),n=r<4?(g||n)&&(0==r||r==(e.s<0?3:2)):g>5||5==g&&(4==r||n||6==r&&(s>0?d>0?f/y[a-d]:0:m[h-1])%10&1||r==(e.s<0?8:7)),t<1||!m[0])return m.length=0,n?(t-=e.e+1,m[0]=y[(u-t%u)%u],e.e=-t||0):m[0]=e.e=0,e;if(0==s?(m.length=h,p=1,h--):(m.length=h+1,p=y[u-s],m[h]=d>0?o(f/y[a-d]%y[d])*p:0),n)for(;;){if(0==h){for(s=1,d=m[0];d>=10;d/=10,s++);for(d=m[0]+=p,p=1;d>=10;d/=10,p++);s!=p&&(e.e++,m[0]==l&&(m[0]=1));break}if(m[h]+=p,m[h]!=l)break;m[h--]=0,p=1}for(s=m.length;0===m[--s];m.pop());}e.e>T?e.c=e.e=null:e.e=R?S(t,r):w(t,r,"0"),e.s<0?"-"+t:t)}return U.clone=h,U.ROUND_UP=0,U.ROUND_DOWN=1,U.ROUND_CEIL=2,U.ROUND_FLOOR=3,U.ROUND_HALF_UP=4,U.ROUND_HALF_DOWN=5,U.ROUND_HALF_EVEN=6,U.ROUND_HALF_CEIL=7,U.ROUND_HALF_FLOOR=8,U.EUCLID=9,U.config=U.set=function(e){var t,r;if(null!=e){if("object"==typeof e){if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(v(r=e[t],0,f,t),P=r),e.hasOwnProperty(t="ROUNDING_MODE")&&(v(r=e[t],0,8,t),A=r),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((r=e[t])&&r.pop?(v(r[0],-f,0,t),v(r[1],0,f,t),I=r[0],R=r[1]):(v(r,-f,f,t),I=-(R=r<0?-r:r))),e.hasOwnProperty(t="RANGE")){if((r=e[t])&&r.pop)v(r[0],-f,-1,t),v(r[1],1,f,t),E=r[0],T=r[1];else if(v(r,-f,f,t),r)E=-(T=r<0?-r:r);else throw Error(a+t+" cannot be zero: "+r)}if(e.hasOwnProperty(t="CRYPTO")){if(!!(r=e[t])===r){if(r){if("undefined"!=typeof crypto&&crypto&&(crypto.getRandomValues||crypto.randomBytes))N=r;else throw N=!r,Error(a+"crypto unavailable")}else N=r}else throw Error(a+t+" not true or false: "+r)}if(e.hasOwnProperty(t="MODULO_MODE")&&(v(r=e[t],0,9,t),x=r),e.hasOwnProperty(t="POW_PRECISION")&&(v(r=e[t],0,f,t),B=r),e.hasOwnProperty(t="FORMAT")){if("object"==typeof(r=e[t]))C=r;else throw Error(a+t+" not an object: "+r)}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(r=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(r))throw Error(a+t+" invalid: "+r);D="0123456789"==r.slice(0,10),M=r}}else throw Error(a+"Object expected: "+e)}return{DECIMAL_PLACES:P,ROUNDING_MODE:A,EXPONENTIAL_AT:[I,R],RANGE:[E,T],CRYPTO:N,MODULO_MODE:x,POW_PRECISION:B,FORMAT:C,ALPHABET:M}},U.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!U.DEBUG)return!0;var t,r,n=e.c,i=e.e,s=e.s;n:if("[object Array]"==({}).toString.call(n)){if((1===s||-1===s)&&i>=-f&&i<=f&&i===o(i)){if(0===n[0]){if(0===i&&1===n.length)return!0;break n}if((t=(i+1)%u)<1&&(t+=u),String(n[0]).length==t){for(t=0;t=l||r!==o(r))break n;if(0!==r)return!0}}}else if(null===n&&null===i&&(null===s||1===s||-1===s))return!0;throw Error(a+"Invalid BigNumber: "+e)},U.maximum=U.max=function(){return j(arguments,-1)},U.minimum=U.min=function(){return j(arguments,1)},U.random=function(){var e=9007199254740992,t=9007199254740992*Math.random()&2097151?function(){return o(Math.random()*e)}:function(){return(1073741824*Math.random()|0)*8388608+(8388608*Math.random()|0)};return function(e){var r,n,s,l,d,p=0,h=[],g=new U(O);if(null==e?e=P:v(e,0,f),l=i(e/u),N){if(crypto.getRandomValues){for(r=crypto.getRandomValues(new Uint32Array(l*=2));p>>11))>=9e15?(n=crypto.getRandomValues(new Uint32Array(2)),r[p]=n[0],r[p+1]=n[1]):(h.push(d%1e14),p+=2);p=l/2}else if(crypto.randomBytes){for(r=crypto.randomBytes(l*=7);p=9e15?crypto.randomBytes(7).copy(r,p):(h.push(d%1e14),p+=7);p=l/7}else throw N=!1,Error(a+"crypto unavailable")}if(!N)for(;p=10;d/=10,p++);pr-1&&(null==a[i+1]&&(a[i+1]=0),a[i+1]+=a[i]/r|0,a[i]%=r)}return a.reverse()}return function(n,i,o,a,s){var l,u,d,c,p,f,h,g,y=n.indexOf("."),v=P,b=A;for(y>=0&&(c=B,B=0,n=n.replace(".",""),f=(g=new U(i)).pow(n.length-y),B=c,g.c=r(w(m(f.c),f.e,"0"),10,o,e),g.e=g.c.length),d=c=(h=r(n,i,o,s?(l=M,e):(l=e,M))).length;0==h[--c];h.pop());if(!h[0])return l.charAt(0);if(y<0?--d:(f.c=h,f.e=d,f.s=a,h=(f=t(f,g,v,b,o)).c,p=f.r,d=f.e),y=h[u=d+v+1],c=o/2,p=p||u<0||null!=h[u+1],p=b<4?(null!=y||p)&&(0==b||b==(f.s<0?3:2)):y>c||y==c&&(4==b||p||6==b&&1&h[u-1]||b==(f.s<0?8:7)),u<1||!h[0])n=p?w(l.charAt(1),-v,l.charAt(0)):l.charAt(0);else{if(h.length=u,p)for(--o;++h[--u]>o;)h[u]=0,u||(++d,h=[1].concat(h));for(c=h.length;!h[--c];);for(y=0,n="";y<=c;n+=l.charAt(h[y++]));n=w(n,d,l.charAt(0))}return n}}(),t=function(){function e(e,t,r){var n,i,o,a,s=0,l=e.length,u=t%p,d=t/p|0;for(e=e.slice();l--;)n=d*(o=e[l]%p)+(a=e[l]/p|0)*u,s=((i=u*o+n%p*p+s)/r|0)+(n/p|0)+d*a,e[l]=i%r;return s&&(e=[s].concat(e)),e}function t(e,t,r,n){var i,o;if(r!=n)o=r>n?1:-1;else for(i=o=0;it[i]?1:-1;break}return o}function r(e,t,r,n){for(var i=0;r--;)e[r]-=i,i=e[r]1;e.splice(0,1));}return function(n,i,a,s,d){var c,p,f,h,m,y,v,b,S,w,_,k,O,P,A,I,R,E=n.s==i.s?1:-1,T=n.c,N=i.c;if(!T||!T[0]||!N||!N[0])return new U(n.s&&i.s&&(T?!N||T[0]!=N[0]:N)?T&&0==T[0]||!N?0*E:E/0:NaN);for(S=(b=new U(E)).c=[],E=a+(p=n.e-i.e)+1,d||(d=l,p=g(n.e/u)-g(i.e/u),E=E/u|0),f=0;N[f]==(T[f]||0);f++);if(N[f]>(T[f]||0)&&p--,E<0)S.push(1),h=!0;else{for(P=T.length,I=N.length,f=0,E+=2,(m=o(d/(N[0]+1)))>1&&(N=e(N,m,d),T=e(T,m,d),I=N.length,P=T.length),O=I,_=(w=T.slice(0,I)).length;_=d/2&&A++;do{if(m=0,(c=t(N,w,I,_))<0){if(k=w[0],I!=_&&(k=k*d+(w[1]||0)),(m=o(k/A))>1)for(m>=d&&(m=d-1),v=(y=e(N,m,d)).length,_=w.length;1==t(y,w,v,_);)m--,r(y,It(N,w,I,_);)m++,r(w,I<_?R:N,_,d),_=w.length}else 0===c&&(m++,w=[0]);S[f++]=m,w[0]?w[_++]=T[O]||0:(w=[T[O]],_=1)}while((O++=10;E/=10,f++);q(b,a+(b.e=f+p*u-1)+1,s,h)}else b.e=p,b.r=+h;return b}}(),_=function(){var e=/^(-?)0([xbo])(?=\w[\w.]*$)/i,t=/^([^.]+)\.$/,r=/^\.([^.]+)$/,n=/^-?(Infinity|NaN)$/,i=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(o,s,l,u){var d,c=l?s:s.replace(i,"");if(n.test(c))o.s=isNaN(c)?null:c<0?-1:1;else{if(!l&&(c=c.replace(e,function(e,t,r){return d="x"==(r=r.toLowerCase())?16:"b"==r?2:8,u&&u!=d?e:t}),u&&(d=u,c=c.replace(t,"$1").replace(r,"0.$1")),s!=c))return new U(c,d);if(U.DEBUG)throw Error(a+"Not a"+(u?" base "+u:"")+" number: "+s);o.s=null}o.c=o.e=null}}(),k.absoluteValue=k.abs=function(){var e=new U(this);return e.s<0&&(e.s=1),e},k.comparedTo=function(e,t){return y(this,new U(e,t))},k.decimalPlaces=k.dp=function(e,t){var r,n,i,o=this;if(null!=e)return v(e,0,f),null==t?t=A:v(t,0,8),q(new U(o),e+o.e+1,t);if(!(r=o.c))return null;if(n=((i=r.length-1)-g(this.e/u))*u,i=r[i])for(;i%10==0;i/=10,n--);return n<0&&(n=0),n},k.dividedBy=k.div=function(e,r){return t(this,new U(e,r),P,A)},k.dividedToIntegerBy=k.idiv=function(e,r){return t(this,new U(e,r),0,1)},k.exponentiatedBy=k.pow=function(e,t){var r,n,s,l,d,c,p,f,h,g=this;if((e=new U(e)).c&&!e.isInteger())throw Error(a+"Exponent not an integer: "+L(e));if(null!=t&&(t=new U(t)),c=e.e>14,!g.c||!g.c[0]||1==g.c[0]&&!g.e&&1==g.c.length||!e.c||!e.c[0])return h=new U(Math.pow(+L(g),c?e.s*(2-b(e)):+L(e))),t?h.mod(t):h;if(p=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new U(NaN);(n=!p&&g.isInteger()&&t.isInteger())&&(g=g.mod(t))}else{if(e.e>9&&(g.e>0||g.e<-1||(0==g.e?g.c[0]>1||c&&g.c[1]>=24e7:g.c[0]<8e13||c&&g.c[0]<=9999975e7)))return l=g.s<0&&b(e)?-0:0,g.e>-1&&(l=1/l),new U(p?1/l:l);B&&(l=i(B/u+2))}for(c?(r=new U(.5),p&&(e.s=1),f=b(e)):f=(s=Math.abs(+L(e)))%2,h=new U(O);;){if(f){if(!(h=h.times(g)).c)break;l?h.c.length>l&&(h.c.length=l):n&&(h=h.mod(t))}if(s){if(0===(s=o(s/2)))break;f=s%2}else if(q(e=e.times(r),e.e+1,1),e.e>14)f=b(e);else{if(0==(s=+L(e)))break;f=s%2}g=g.times(g),l?g.c&&g.c.length>l&&(g.c.length=l):n&&(g=g.mod(t))}return n?h:(p&&(h=O.div(h)),t?h.mod(t):l?q(h,B,A,d):h)},k.integerValue=function(e){var t=new U(this);return null==e?e=A:v(e,0,8),q(t,t.e+1,e)},k.isEqualTo=k.eq=function(e,t){return 0===y(this,new U(e,t))},k.isFinite=function(){return!!this.c},k.isGreaterThan=k.gt=function(e,t){return y(this,new U(e,t))>0},k.isGreaterThanOrEqualTo=k.gte=function(e,t){return 1===(t=y(this,new U(e,t)))||0===t},k.isInteger=function(){return!!this.c&&g(this.e/u)>this.c.length-2},k.isLessThan=k.lt=function(e,t){return 0>y(this,new U(e,t))},k.isLessThanOrEqualTo=k.lte=function(e,t){return -1===(t=y(this,new U(e,t)))||0===t},k.isNaN=function(){return!this.s},k.isNegative=function(){return this.s<0},k.isPositive=function(){return this.s>0},k.isZero=function(){return!!this.c&&0==this.c[0]},k.minus=function(e,t){var r,n,i,o,a=this,s=a.s;if(t=(e=new U(e,t)).s,!s||!t)return new U(NaN);if(s!=t)return e.s=-t,a.plus(e);var d=a.e/u,c=e.e/u,p=a.c,f=e.c;if(!d||!c){if(!p||!f)return p?(e.s=-t,e):new U(f?a:NaN);if(!p[0]||!f[0])return f[0]?(e.s=-t,e):new U(p[0]?a:3==A?-0:0)}if(d=g(d),c=g(c),p=p.slice(),s=d-c){for((o=s<0)?(s=-s,i=p):(c=d,i=f),i.reverse(),t=s;t--;i.push(0));i.reverse()}else for(n=(o=(s=p.length)<(t=f.length))?s:t,s=t=0;t0)for(;t--;p[r++]=0);for(t=l-1;n>s;){if(p[--n]=0;){for(r=0,m=k[i]%S,y=k[i]/S|0,o=i+(a=d);o>i;)s=y*(c=_[--a]%S)+(f=_[a]/S|0)*m,r=((c=m*c+s%S*S+v[o]+r)/b|0)+(s/S|0)+y*f,v[o--]=c%b;v[o]=r}return r?++n:v.splice(0,1),H(e,v,n)},k.negated=function(){var e=new U(this);return e.s=-e.s||null,e},k.plus=function(e,t){var r,n=this,i=n.s;if(t=(e=new U(e,t)).s,!i||!t)return new U(NaN);if(i!=t)return e.s=-t,n.minus(e);var o=n.e/u,a=e.e/u,s=n.c,d=e.c;if(!o||!a){if(!s||!d)return new U(i/0);if(!s[0]||!d[0])return d[0]?e:new U(s[0]?n:0*i)}if(o=g(o),a=g(a),s=s.slice(),i=o-a){for(i>0?(a=o,r=d):(i=-i,r=s),r.reverse();i--;r.push(0));r.reverse()}for((i=s.length)-(t=d.length)<0&&(r=d,d=s,s=r,t=i),i=0;t;)i=(s[--t]=s[t]+d[t]+i)/l|0,s[t]=l===s[t]?0:s[t]%l;return i&&(s=[i].concat(s),++a),H(e,s,a)},k.precision=k.sd=function(e,t){var r,n,i,o=this;if(null!=e&&!!e!==e)return v(e,1,f),null==t?t=A:v(t,0,8),q(new U(o),e,t);if(!(r=o.c))return null;if(n=(i=r.length-1)*u+1,i=r[i]){for(;i%10==0;i/=10,n--);for(i=r[0];i>=10;i/=10,n++);}return e&&o.e+1>n&&(n=o.e+1),n},k.shiftedBy=function(e){return v(e,-d,d),this.times("1e"+e)},k.squareRoot=k.sqrt=function(){var e,r,n,i,o,a=this,s=a.c,l=a.s,u=a.e,d=P+4,c=new U("0.5");if(1!==l||!s||!s[0])return new U(!l||l<0&&(!s||s[0])?NaN:s?a:1/0);if(0==(l=Math.sqrt(+L(a)))||l==1/0?(((r=m(s)).length+u)%2==0&&(r+="0"),l=Math.sqrt(+r),u=g((u+1)/2)-(u<0||u%2),n=new U(r=l==1/0?"5e"+u:(r=l.toExponential()).slice(0,r.indexOf("e")+1)+u)):n=new U(l+""),n.c[0]){for((l=(u=n.e)+d)<3&&(l=0);;)if(o=n,n=c.times(o.plus(t(a,o,d,1))),m(o.c).slice(0,l)===(r=m(n.c)).slice(0,l)){if(n.e0&&g>0){for(o=g%l||l,c=h.substr(0,o);o0&&(c+=d+h.slice(o)),f&&(c="-"+c)}n=p?c+(r.decimalSeparator||"")+((u=+r.fractionGroupSize)?p.replace(RegExp("\\d{"+u+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):p):c}return(r.prefix||"")+n+(r.suffix||"")},k.toFraction=function(e){var r,n,i,o,s,l,d,p,f,h,g,y,v=this,b=v.c;if(null!=e&&(!(d=new U(e)).isInteger()&&(d.c||1!==d.s)||d.lt(O)))throw Error(a+"Argument "+(d.isInteger()?"out of range: ":"not an integer: ")+L(d));if(!b)return new U(v);for(r=new U(O),f=n=new U(O),i=p=new U(O),y=m(b),s=r.e=y.length-v.e-1,r.c[0]=c[(l=s%u)<0?u+l:l],e=!e||d.comparedTo(r)>0?s>0?r:f:d,l=T,T=1/0,d=new U(y),p.c[0]=0;h=t(d,r,0,1),1!=(o=n.plus(h.times(i))).comparedTo(e);)n=i,i=o,f=p.plus(h.times(o=f)),p=o,r=d.minus(h.times(o=r)),d=o;return o=t(e.minus(n),i,0,1),p=p.plus(o.times(f)),n=n.plus(o.times(i)),p.s=f.s=v.s,s*=2,g=1>t(f,i,s,A).minus(v).abs().comparedTo(t(p,n,s,A).minus(v).abs())?[f,i]:[p,n],T=l,g},k.toNumber=function(){return+L(this)},k.toPrecision=function(e,t){return null!=e&&v(e,1,f),J(this,e,t,2)},k.toString=function(e){var t,n=this,i=n.s,o=n.e;return null===o?i?(t="Infinity",i<0&&(t="-"+t)):t="NaN":(null==e?t=o<=I||o>=R?S(m(n.c),o):w(m(n.c),o,"0"):10===e&&D?t=w(m((n=q(new U(n),P+o+1,A)).c),n.e,"0"):(v(e,2,M.length,"Base"),t=r(w(m(n.c),o,"0"),10,e,i,!0)),i<0&&n.c[0]&&(t="-"+t)),t},k.valueOf=k.toJSON=function(){return L(this)},k._isBigNumber=!0,k[Symbol.toStringTag]="BigNumber",k[Symbol.for("nodejs.util.inspect.custom")]=k.valueOf,null!=e&&U.set(e),U}function g(e){var t=0|e;return e>0||e===t?t:t-1}function m(e){for(var t,r,n=1,i=e.length,o=e[0]+"";nu^r?1:-1;for(a=0,s=(l=i.length)<(u=o.length)?l:u;ao[a]^r?1:-1;return l==u?0:l>u^r?1:-1}function v(e,t,r,n){if(er||e!==o(e))throw Error(a+(n||"Argument")+("number"==typeof e?er?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function b(e){var t=e.c.length-1;return g(e.e/u)==t&&e.c[t]%2!=0}function S(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function w(e,t,r){var n,i;if(t<0){for(i=r+".";++t;i+=r);e=i+e}else if(n=e.length,++t>n){for(i=r,t-=n;--t;i+=r);e+=i}else ti?"["+c(e)+"]":"{ "+r.map(e=>{let[r,n]=e;return r+": "+a(n,t)}).join(", ")+" }"}function d(e,t){if(0===e.length)return"[]";if(t.length>i)return"[Array]";let r=Math.min(n,e.length),o=e.length-r,s=[];for(let n=0;n1&&s.push("... ".concat(o," more items")),"["+s.join(", ")+"]"}function c(e){let t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){let t=e.constructor.name;if("string"==typeof t&&""!==t)return t}return t}},68246:function(e,t,r){"use strict";var n;r.d(t,{UG:function(){return l},WU:function(){return o},Ye:function(){return i},h8:function(){return a},ku:function(){return n}});class i{get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}constructor(e,t,r){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=r}}class o{get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}constructor(e,t,r,n,i,o){this.kind=e,this.start=t,this.end=r,this.line=n,this.column=i,this.value=o,this.prev=null,this.next=null}}let a={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},s=new Set(Object.keys(a));function l(e){let t=null==e?void 0:e.kind;return"string"==typeof t&&s.has(t)}!function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"}(n||(n={}))},58549:function(e,t,r){"use strict";r.d(t,{LZ:function(){return a},wv:function(){return i}});var n=r(1357);function i(e){var t,r;let n=Number.MAX_SAFE_INTEGER,i=null,a=-1;for(let t=0;t0===t?e:e.slice(n)).slice(null!==(t=i)&&void 0!==t?t:0,a+1)}function o(e){let t=0;for(;t1&&i.slice(1).every(e=>0===e.length||(0,n.FD)(e.charCodeAt(0))),s=r.endsWith('\\"""'),l=e.endsWith('"')&&!s,u=e.endsWith("\\"),d=l||u,c=!(null!=t&&t.minimize)&&(!o||e.length>70||d||a||s),p="",f=o&&(0,n.FD)(e.charCodeAt(0));return(c&&!f||a)&&(p+="\n"),p+=r,(c||d)&&(p+="\n"),'"""'+p+'"""'}},1357:function(e,t,r){"use strict";function n(e){return 9===e||32===e}function i(e){return e>=48&&e<=57}function o(e){return e>=97&&e<=122||e>=65&&e<=90}function a(e){return o(e)||95===e}function s(e){return o(e)||i(e)||95===e}r.d(t,{FD:function(){return n},HQ:function(){return s},LQ:function(){return a},X1:function(){return i}})},11258:function(e,t,r){"use strict";var n;r.d(t,{h:function(){return n}}),function(e){e.NAME="Name",e.DOCUMENT="Document",e.OPERATION_DEFINITION="OperationDefinition",e.VARIABLE_DEFINITION="VariableDefinition",e.SELECTION_SET="SelectionSet",e.FIELD="Field",e.ARGUMENT="Argument",e.FRAGMENT_SPREAD="FragmentSpread",e.INLINE_FRAGMENT="InlineFragment",e.FRAGMENT_DEFINITION="FragmentDefinition",e.VARIABLE="Variable",e.INT="IntValue",e.FLOAT="FloatValue",e.STRING="StringValue",e.BOOLEAN="BooleanValue",e.NULL="NullValue",e.ENUM="EnumValue",e.LIST="ListValue",e.OBJECT="ObjectValue",e.OBJECT_FIELD="ObjectField",e.DIRECTIVE="Directive",e.NAMED_TYPE="NamedType",e.LIST_TYPE="ListType",e.NON_NULL_TYPE="NonNullType",e.SCHEMA_DEFINITION="SchemaDefinition",e.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",e.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",e.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",e.FIELD_DEFINITION="FieldDefinition",e.INPUT_VALUE_DEFINITION="InputValueDefinition",e.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",e.UNION_TYPE_DEFINITION="UnionTypeDefinition",e.ENUM_TYPE_DEFINITION="EnumTypeDefinition",e.ENUM_VALUE_DEFINITION="EnumValueDefinition",e.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",e.DIRECTIVE_DEFINITION="DirectiveDefinition",e.SCHEMA_EXTENSION="SchemaExtension",e.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",e.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",e.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",e.UNION_TYPE_EXTENSION="UnionTypeExtension",e.ENUM_TYPE_EXTENSION="EnumTypeExtension",e.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"}(n||(n={}))},33954:function(e,t,r){"use strict";r.d(t,{$_:function(){return s},Vn:function(){return l}});var n=r(3332),i=r(78617),o=r(68246),a=r(11258);let s=Object.freeze({});function l(e,t){let r,l,d,c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o.h8,p=new Map;for(let e of Object.values(a.h))p.set(e,u(t,e));let f=Array.isArray(e),h=[e],g=-1,m=[],y=e,v=[],b=[];do{var S,w,_;let e;let a=++g===h.length,u=a&&0!==m.length;if(a){if(l=0===b.length?void 0:v[v.length-1],y=d,d=b.pop(),u){if(f){y=y.slice();let e=0;for(let[t,r]of m){let n=t-e;null===r?(y.splice(n,1),e++):y[n]=r}}else for(let[e,t]of(y=Object.defineProperties({},Object.getOwnPropertyDescriptors(y)),m))y[e]=t}g=r.index,h=r.keys,m=r.edits,f=r.inArray,r=r.prev}else if(d){if(null==(y=d[l=f?g:h[g]]))continue;v.push(l)}if(!Array.isArray(y)){(0,o.UG)(y)||(0,n.a)(!1,"Invalid AST Node: ".concat((0,i.X)(y),"."));let r=a?null===(S=p.get(y.kind))||void 0===S?void 0:S.leave:null===(w=p.get(y.kind))||void 0===w?void 0:w.enter;if((e=null==r?void 0:r.call(t,y,l,d,v,b))===s)break;if(!1===e){if(!a){v.pop();continue}}else if(void 0!==e&&(m.push([l,e]),!a)){if((0,o.UG)(e))y=e;else{v.pop();continue}}}void 0===e&&u&&m.push([l,y]),a?v.pop():(r={inArray:f,index:g,keys:h,edits:m,prev:r},h=(f=Array.isArray(y))?y:null!==(_=c[y.kind])&&void 0!==_?_:[],g=-1,m=[],d&&b.push(d),d=y)}while(void 0!==r);return 0!==m.length?m[m.length-1][1]:e}function u(e,t){let r=e[t];return"object"==typeof r?r:"function"==typeof r?{enter:r,leave:void 0}:{enter:e.enter,leave:e.leave}}},64571:function(e,t,r){"use strict";let n;r.d(t,{g7:function(){return v},dP:function(){return Q},re:function(){return Y}});let i=()=>Object.create(null),{forEach:o,slice:a}=Array.prototype,{hasOwnProperty:s}=Object.prototype;class l{lookup(){for(var e=arguments.length,t=Array(e),r=0;rt=t.getChildTrie(e)),s.call(t,"data")?t.data:t.data=this.makeData(a.call(e))}peek(){for(var e=arguments.length,t=Array(e),r=0;r{class e{hasValue(){for(let e=c;e;e=e.parent)if(this.id in e.slots){let t=e.slots[this.id];if(t===p)break;return e!==c&&(c.slots[this.id]=t),!0}return c&&(c.slots[this.id]=p),!1}getValue(){if(this.hasValue())return c.slots[this.id]}withValue(e,t,r,n){let i={__proto__:null,[this.id]:e},o=c;c={parent:o,slots:i};try{return t.apply(n,r)}finally{c=o}}static bind(e){let t=c;return function(){let r=c;try{return c=t,e.apply(this,arguments)}finally{c=r}}}static noContext(e,t,r){if(!c)return e.apply(r,t);{let n=c;try{return c=null,e.apply(r,t)}finally{c=n}}}constructor(){this.id=["slot",f++,Date.now(),Math.random().toString(36).slice(2)].join(":")}}return e};function g(e){try{return e()}catch(e){}}let m="@wry/context:Slot",y=g(()=>globalThis)||g(()=>global)||Object.create(null),v=y[m]||Array[m]||function(e){try{Object.defineProperty(y,m,{value:e,enumerable:!1,writable:!1,configurable:!0})}finally{return e}}(h()),{bind:b,noContext:S}=v,w=new v,{hasOwnProperty:_}=Object.prototype,k=Array.from||function(e){let t=[];return e.forEach(e=>t.push(e)),t};function O(e){let{unsubscribe:t}=e;"function"==typeof t&&(e.unsubscribe=void 0,t())}let P=[],A=100;function I(e,t){if(!e)throw Error(t||"assertion failure")}function R(e,t){let r=e.length;return r>0&&r===t.length&&e[r-1]===t[r-1]}function E(e){switch(e.length){case 0:throw Error("unknown value");case 1:return e[0];case 2:throw e[1]}}function T(e){return e.slice(0)}class N{peek(){if(1===this.value.length&&!M(this))return x(this),this.value[0]}recompute(e){return I(!this.recomputing,"already recomputing"),x(this),M(this)?B(this,e):E(this.value)}setDirty(){this.dirty||(this.dirty=!0,U(this),O(this))}dispose(){this.setDirty(),F(this),j(this,(e,t)=>{e.setDirty(),V(e,this)})}forget(){this.dispose()}dependOn(e){e.add(this),this.deps||(this.deps=P.pop()||new Set),this.deps.add(e)}forgetDeps(){this.deps&&(k(this.deps).forEach(e=>e.delete(this)),this.deps.clear(),P.push(this.deps),this.deps=null)}constructor(e){this.fn=e,this.parents=new Set,this.childValues=new Map,this.dirtyChildren=null,this.dirty=!0,this.recomputing=!1,this.value=[],this.deps=null,++N.count}}function x(e){let t=w.getValue();if(t)return e.parents.add(t),t.childValues.has(e)||t.childValues.set(e,[]),M(e)?H(t,e):q(t,e),t}function B(e,t){return F(e),w.withValue(e,C,[e,t]),z(e,t)&&D(e),E(e.value)}function C(e,t){let r;e.recomputing=!0;let{normalizeResult:n}=e;n&&1===e.value.length&&(r=T(e.value)),e.value.length=0;try{if(e.value[0]=e.fn.apply(null,t),n&&r&&!R(r,e.value))try{e.value[0]=n(e.value[0],r[0])}catch(e){}}catch(t){e.value[1]=t}e.recomputing=!1}function M(e){return e.dirty||!!(e.dirtyChildren&&e.dirtyChildren.size)}function D(e){e.dirty=!1,M(e)||J(e)}function U(e){j(e,H)}function J(e){j(e,q)}function j(e,t){let r=e.parents.size;if(r){let n=k(e.parents);for(let i=0;i0&&e.childValues.forEach((t,r)=>{V(e,r)}),e.forgetDeps(),I(null===e.dirtyChildren)}function V(e,t){t.parents.delete(e),e.childValues.delete(t),L(e,t)}function z(e,t){if("function"==typeof e.subscribe)try{O(e),e.unsubscribe=e.subscribe.apply(null,t)}catch(t){return e.setDirty(),!1}return!0}N.count=0;let W={setDirty:!0,dispose:!0,forget:!0};function Q(e){let t=new Map,r=e&&e.subscribe;function n(e){let n=w.getValue();if(n){let i=t.get(e);i||t.set(e,i=new Set),n.dependOn(i),"function"==typeof r&&(O(i),i.unsubscribe=r(e))}}return n.dirty=function(e,r){let n=t.get(e);if(n){let i=r&&_.call(W,r)?r:"setDirty";k(n).forEach(e=>e[i]()),t.delete(e),O(n)}},n}function G(){for(var e=arguments.length,t=Array(e),r=0;r1&&void 0!==arguments[1]?arguments[1]:Object.create(null),s="function"==typeof a?new a(t,e=>e.dispose()):a,l=function(){let t=n.apply(null,r?r.apply(null,arguments):arguments);if(void 0===t)return e.apply(null,arguments);let a=s.get(t);a||(s.set(t,a=new N(e)),a.normalizeResult=i,a.subscribe=o,a.forget=()=>s.delete(t));let l=a.recompute(Array.prototype.slice.call(arguments));return s.set(t,a),K.add(s),w.hasValue()||(K.forEach(e=>e.clean()),K.clear()),l};function u(e){let t=e&&s.get(e);t&&t.setDirty()}function c(e){let t=e&&s.get(e);if(t)return t.peek()}function p(e){return!!e&&s.delete(e)}return Object.defineProperty(l,"size",{get:()=>s.size,configurable:!1,enumerable:!1}),Object.freeze(l.options={max:t,keyArgs:r,makeCacheKey:n,normalizeResult:i,subscribe:o,cache:s}),l.dirtyKey=u,l.dirty=function(){u(n.apply(null,arguments))},l.peekKey=c,l.peek=function(){return c(n.apply(null,arguments))},l.forgetKey=p,l.forget=function(){return p(n.apply(null,arguments))},l.makeCacheKey=n,l.getKey=r?function(){return n.apply(null,r.apply(null,arguments))}:n,Object.freeze(l)}},30298:function(e,t,r){"use strict";r.d(t,{Am:function(){return T},Ix:function(){return J}});var n=r(64090),i=r(75504);let o=e=>"number"==typeof e&&!isNaN(e),a=e=>"string"==typeof e,s=e=>"function"==typeof e,l=e=>a(e)||s(e)?e:null,u=e=>(0,n.isValidElement)(e)||a(e)||s(e)||o(e);function d(e,t,r){void 0===r&&(r=300);let{scrollHeight:n,style:i}=e;requestAnimationFrame(()=>{i.minHeight="initial",i.height=n+"px",i.transition="all ".concat(r,"ms"),requestAnimationFrame(()=>{i.height="0",i.padding="0",i.margin="0",setTimeout(t,r)})})}function c(e){let{enter:t,exit:r,appendPosition:i=!1,collapse:o=!0,collapseDuration:a=300}=e;return function(e){let{children:s,position:l,preventExitTransition:u,done:c,nodeRef:p,isIn:f,playToast:h}=e,g=i?"".concat(t,"--").concat(l):t,m=i?"".concat(r,"--").concat(l):r,y=(0,n.useRef)(0);return(0,n.useLayoutEffect)(()=>{let e=p.current,t=g.split(" "),r=n=>{n.target===p.current&&(h(),e.removeEventListener("animationend",r),e.removeEventListener("animationcancel",r),0===y.current&&"animationcancel"!==n.type&&e.classList.remove(...t))};e.classList.add(...t),e.addEventListener("animationend",r),e.addEventListener("animationcancel",r)},[]),(0,n.useEffect)(()=>{let e=p.current,t=()=>{e.removeEventListener("animationend",t),o?d(e,c,a):c()};f||(u?t():(y.current=1,e.className+=" ".concat(m),e.addEventListener("animationend",t)))},[f]),n.createElement(n.Fragment,null,s)}}function p(e,t){return null!=e?{content:e.content,containerId:e.props.containerId,id:e.props.toastId,theme:e.props.theme,type:e.props.type,data:e.props.data||{},isLoading:e.props.isLoading,icon:e.props.icon,status:t}:{}}let f=new Map,h=[],g=new Set,m=e=>g.forEach(t=>t(e)),y=()=>f.size>0;function v(e,t){var r;if(t)return!(null==(r=f.get(t))||!r.isToastActive(e));let n=!1;return f.forEach(t=>{t.isToastActive(e)&&(n=!0)}),n}function b(e,t){u(e)&&(y()||h.push({content:e,options:t}),f.forEach(r=>{r.buildToast(e,t)}))}function S(e,t){f.forEach(r=>{null!=t&&null!=t&&t.containerId?(null==t?void 0:t.containerId)===r.id&&r.toggle(e,null==t?void 0:t.id):r.toggle(e,null==t?void 0:t.id)})}function w(e){let{subscribe:t,getSnapshot:r,setProps:i}=(0,n.useRef)(function(e){let t=e.containerId||1;return{subscribe(r){let i=function(e,t,r){let i=1,d=0,c=[],f=[],h=[],g=t,m=new Map,y=new Set,v=()=>{h=Array.from(m.values()),y.forEach(e=>e())},b=e=>{f=null==e?[]:f.filter(t=>t!==e),v()},S=e=>{let{toastId:t,onOpen:i,updateId:o,children:a}=e.props,l=null==o;e.staleId&&m.delete(e.staleId),m.set(t,e),f=[...f,e.props.toastId].filter(t=>t!==e.staleId),v(),r(p(e,l?"added":"updated")),l&&s(i)&&i((0,n.isValidElement)(a)&&a.props)};return{id:e,props:g,observe:e=>(y.add(e),()=>y.delete(e)),toggle:(e,t)=>{m.forEach(r=>{null!=t&&t!==r.props.toastId||s(r.toggle)&&r.toggle(e)})},removeToast:b,toasts:m,clearQueue:()=>{d-=c.length,c=[]},buildToast:(t,f)=>{var h,y;if((t=>{let{containerId:r,toastId:n,updateId:i}=t,o=r?r!==e:1!==e,a=m.has(n)&&null==i;return o||a})(f))return;let{toastId:w,updateId:_,data:k,staleId:O,delay:P}=f,A=()=>{b(w)},I=null==_;I&&d++;let R={...g,style:g.toastStyle,key:i++,...Object.fromEntries(Object.entries(f).filter(e=>{let[t,r]=e;return null!=r})),toastId:w,updateId:_,data:k,closeToast:A,isIn:!1,className:l(f.className||g.toastClassName),bodyClassName:l(f.bodyClassName||g.bodyClassName),progressClassName:l(f.progressClassName||g.progressClassName),autoClose:!f.isLoading&&(h=f.autoClose,y=g.autoClose,!1===h||o(h)&&h>0?h:y),deleteToast(){let e=m.get(w),{onClose:t,children:i}=e.props;s(t)&&t((0,n.isValidElement)(i)&&i.props),r(p(e,"removed")),m.delete(w),--d<0&&(d=0),c.length>0?S(c.shift()):v()}};R.closeButton=g.closeButton,!1===f.closeButton||u(f.closeButton)?R.closeButton=f.closeButton:!0===f.closeButton&&(R.closeButton=!u(g.closeButton)||g.closeButton);let E=t;(0,n.isValidElement)(t)&&!a(t.type)?E=(0,n.cloneElement)(t,{closeToast:A,toastProps:R,data:k}):s(t)&&(E=t({closeToast:A,toastProps:R,data:k}));let T={content:E,props:R,staleId:O};g.limit&&g.limit>0&&d>g.limit&&I?c.push(T):o(P)?setTimeout(()=>{S(T)},P):S(T)},setProps(e){g=e},setToggle:(e,t)=>{m.get(e).toggle=t},isToastActive:e=>f.some(t=>t===e),getSnapshot:()=>g.newestOnTop?h.reverse():h}}(t,e,m);f.set(t,i);let d=i.observe(r);return h.forEach(e=>b(e.content,e.options)),h=[],()=>{d(),f.delete(t)}},setProps(e){var r;null==(r=f.get(t))||r.setProps(e)},getSnapshot(){var e;return null==(e=f.get(t))?void 0:e.getSnapshot()}}}(e)).current;i(e);let d=(0,n.useSyncExternalStore)(t,r,r);return{getToastToRender:function(e){if(!d)return[];let t=new Map;return d.forEach(e=>{let{position:r}=e.props;t.has(r)||t.set(r,[]),t.get(r).push(e)}),Array.from(t,t=>e(t[0],t[1]))},isToastActive:v,count:null==d?void 0:d.length}}function _(e){var t,r;let[i,o]=(0,n.useState)(!1),[a,s]=(0,n.useState)(!1),l=(0,n.useRef)(null),u=(0,n.useRef)({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:d,pauseOnHover:c,closeToast:p,onClick:h,closeOnClick:g}=e;function m(){o(!0)}function y(){o(!1)}function v(t){let r=l.current;u.canDrag&&r&&(u.didMove=!0,i&&y(),u.delta="x"===e.draggableDirection?t.clientX-u.start:t.clientY-u.start,u.start!==t.clientX&&(u.canCloseOnClick=!1),r.style.transform="translate3d(".concat("x"===e.draggableDirection?"".concat(u.delta,"px, var(--y)"):"0, calc(".concat(u.delta,"px + var(--y))"),",0)"),r.style.opacity=""+(1-Math.abs(u.delta/u.removalDistance)))}function b(){document.removeEventListener("pointermove",v),document.removeEventListener("pointerup",b);let t=l.current;if(u.canDrag&&u.didMove&&t){if(u.canDrag=!1,Math.abs(u.delta)>u.removalDistance)return s(!0),e.closeToast(),void e.collapseAll();t.style.transition="transform 0.2s, opacity 0.2s",t.style.removeProperty("transform"),t.style.removeProperty("opacity")}}null==(r=f.get((t={id:e.toastId,containerId:e.containerId,fn:o}).containerId||1))||r.setToggle(t.id,t.fn),(0,n.useEffect)(()=>{if(e.pauseOnFocusLoss)return document.hasFocus()||y(),window.addEventListener("focus",m),window.addEventListener("blur",y),()=>{window.removeEventListener("focus",m),window.removeEventListener("blur",y)}},[e.pauseOnFocusLoss]);let S={onPointerDown:function(t){if(!0===e.draggable||e.draggable===t.pointerType){u.didMove=!1,document.addEventListener("pointermove",v),document.addEventListener("pointerup",b);let r=l.current;u.canCloseOnClick=!0,u.canDrag=!0,r.style.transition="none","x"===e.draggableDirection?(u.start=t.clientX,u.removalDistance=r.offsetWidth*(e.draggablePercent/100)):(u.start=t.clientY,u.removalDistance=r.offsetHeight*(80===e.draggablePercent?1.5*e.draggablePercent:e.draggablePercent)/100)}},onPointerUp:function(t){let{top:r,bottom:n,left:i,right:o}=l.current.getBoundingClientRect();"touchend"!==t.nativeEvent.type&&e.pauseOnHover&&t.clientX>=i&&t.clientX<=o&&t.clientY>=r&&t.clientY<=n?y():m()}};return d&&c&&(S.onMouseEnter=y,e.stacked||(S.onMouseLeave=m)),g&&(S.onClick=e=>{h&&h(e),u.canCloseOnClick&&p()}),{playToast:m,pauseToast:y,isRunning:i,preventExitTransition:a,toastRef:l,eventHandlers:S}}function k(e){let{delay:t,isRunning:r,closeToast:o,type:a="default",hide:l,className:u,style:d,controlledProgress:c,progress:p,rtl:f,isIn:h,theme:g}=e,m=l||c&&0===p,y={...d,animationDuration:"".concat(t,"ms"),animationPlayState:r?"running":"paused"};c&&(y.transform="scaleX(".concat(p,")"));let v=(0,i.Z)("Toastify__progress-bar",c?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated","Toastify__progress-bar-theme--".concat(g),"Toastify__progress-bar--".concat(a),{"Toastify__progress-bar--rtl":f}),b=s(u)?u({rtl:f,type:a,defaultClassName:v}):(0,i.Z)(v,u),S={[c&&p>=1?"onTransitionEnd":"onAnimationEnd"]:c&&p<1?null:()=>{h&&o()}};return n.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":m},n.createElement("div",{className:"Toastify__progress-bar--bg Toastify__progress-bar-theme--".concat(g," Toastify__progress-bar--").concat(a)}),n.createElement("div",{role:"progressbar","aria-hidden":m?"true":"false","aria-label":"notification timer",className:b,style:y,...S}))}let O=1,P=()=>""+O++;function A(e){return e&&(a(e.toastId)||o(e.toastId))?e.toastId:P()}function I(e,t){return b(e,t),t.toastId}function R(e,t){return{...t,type:t&&t.type||e,toastId:A(t)}}function E(e){return(t,r)=>I(t,R(e,r))}function T(e,t){return I(e,R("default",t))}T.loading=(e,t)=>I(e,R("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),T.promise=function(e,t,r){let n,{pending:i,error:o,success:l}=t;i&&(n=a(i)?T.loading(i,r):T.loading(i.render,{...r,...i}));let u={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},d=(e,t,i)=>{if(null==t)return void T.dismiss(n);let o={type:e,...u,...r,data:i},s=a(t)?{render:t}:t;return n?T.update(n,{...o,...s}):T(s.render,{...o,...s}),i},c=s(e)?e():e;return c.then(e=>d("success",l,e)).catch(e=>d("error",o,e)),c},T.success=E("success"),T.info=E("info"),T.error=E("error"),T.warning=E("warning"),T.warn=T.warning,T.dark=(e,t)=>I(e,R("default",{theme:"dark",...t})),T.dismiss=function(e){!function(e){var t,r;y()?null==e||a(t=e)||o(t)?f.forEach(t=>{t.removeToast(e)}):e&&("containerId"in e||"id"in e)&&((null==(r=f.get(e.containerId))?void 0:r.removeToast(e.id))||f.forEach(t=>{t.removeToast(e.id)})):h=h.filter(t=>null!=e&&t.options.toastId!==e)}(e)},T.clearWaitingQueue=function(e){void 0===e&&(e={}),f.forEach(t=>{!t.props.limit||e.containerId&&t.id!==e.containerId||t.clearQueue()})},T.isActive=v,T.update=function(e,t){void 0===t&&(t={});let r=((e,t)=>{var r;let{containerId:n}=t;return null==(r=f.get(n||1))?void 0:r.toasts.get(e)})(e,t);if(r){let{props:n,content:i}=r,o={delay:100,...n,...t,toastId:t.toastId||e,updateId:P()};o.toastId!==e&&(o.staleId=e);let a=o.render||i;delete o.render,I(a,o)}},T.done=e=>{T.update(e,{progress:1})},T.onChange=function(e){return g.add(e),()=>{g.delete(e)}},T.play=e=>S(!0,e),T.pause=e=>S(!1,e);let N=n.useLayoutEffect,x=e=>{let{theme:t,type:r,isLoading:i,...o}=e;return n.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:"colored"===t?"currentColor":"var(--toastify-icon-color-".concat(r,")"),...o})},B={info:function(e){return n.createElement(x,{...e},n.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(e){return n.createElement(x,{...e},n.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(e){return n.createElement(x,{...e},n.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(e){return n.createElement(x,{...e},n.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return n.createElement("div",{className:"Toastify__spinner"})}},C=e=>{let{isRunning:t,preventExitTransition:r,toastRef:o,eventHandlers:a,playToast:l}=_(e),{closeButton:u,children:d,autoClose:c,onClick:p,type:f,hideProgressBar:h,closeToast:g,transition:m,position:y,className:v,style:b,bodyClassName:S,bodyStyle:w,progressClassName:O,progressStyle:P,updateId:A,role:I,progress:R,rtl:E,toastId:T,deleteToast:N,isIn:x,isLoading:C,closeOnClick:M,theme:D}=e,U=(0,i.Z)("Toastify__toast","Toastify__toast-theme--".concat(D),"Toastify__toast--".concat(f),{"Toastify__toast--rtl":E},{"Toastify__toast--close-on-click":M}),J=s(v)?v({rtl:E,position:y,type:f,defaultClassName:U}):(0,i.Z)(U,v),j=function(e){let{theme:t,type:r,isLoading:i,icon:o}=e,a=null,l={theme:t,type:r};return!1===o||(s(o)?a=o({...l,isLoading:i}):(0,n.isValidElement)(o)?a=(0,n.cloneElement)(o,l):i?a=B.spinner():r in B&&(a=B[r](l))),a}(e),H=!!R||!c,q={closeToast:g,type:f,theme:D},L=null;return!1===u||(L=s(u)?u(q):(0,n.isValidElement)(u)?(0,n.cloneElement)(u,q):function(e){let{closeToast:t,theme:r,ariaLabel:i="close"}=e;return n.createElement("button",{className:"Toastify__close-button Toastify__close-button--".concat(r),type:"button",onClick:e=>{e.stopPropagation(),t(e)},"aria-label":i},n.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},n.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}(q)),n.createElement(m,{isIn:x,done:N,position:y,preventExitTransition:r,nodeRef:o,playToast:l},n.createElement("div",{id:T,onClick:p,"data-in":x,className:J,...a,style:b,ref:o},n.createElement("div",{...x&&{role:I},className:s(S)?S({type:f}):(0,i.Z)("Toastify__toast-body",S),style:w},null!=j&&n.createElement("div",{className:(0,i.Z)("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!C})},j),n.createElement("div",null,d)),L,n.createElement(k,{...A&&!H?{key:"pb-".concat(A)}:{},rtl:E,theme:D,delay:c,isRunning:t,isIn:x,closeToast:g,hide:h,type:f,style:P,className:O,controlledProgress:H,progress:R||0})))},M=function(e,t){return void 0===t&&(t=!1),{enter:"Toastify--animate Toastify__".concat(e,"-enter"),exit:"Toastify--animate Toastify__".concat(e,"-exit"),appendPosition:t}},D=c(M("bounce",!0)),U=(c(M("slide",!0)),c(M("zoom")),c(M("flip")),{position:"top-right",transition:D,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"});function J(e){let t={...U,...e},r=e.stacked,[o,a]=(0,n.useState)(!0),u=(0,n.useRef)(null),{getToastToRender:d,isToastActive:c,count:p}=w(t),{className:f,style:h,rtl:g,containerId:m}=t;function y(e){let t=(0,i.Z)("Toastify__toast-container","Toastify__toast-container--".concat(e),{"Toastify__toast-container--rtl":g});return s(f)?f({position:e,rtl:g,defaultClassName:t}):(0,i.Z)(t,l(f))}function v(){r&&(a(!0),T.play())}return N(()=>{if(r){var e;let r=u.current.querySelectorAll('[data-in="true"]'),n=12,i=null==(e=t.position)?void 0:e.includes("top"),a=0,s=0;Array.from(r).reverse().forEach((e,t)=>{let r=e;r.classList.add("Toastify__toast--stacked"),t>0&&(r.dataset.collapsed="".concat(o)),r.dataset.pos||(r.dataset.pos=i?"top":"bot");let l=a*(o?.2:1)+(o?0:n*t);r.style.setProperty("--y","".concat(i?l:-1*l,"px")),r.style.setProperty("--g","".concat(n)),r.style.setProperty("--s",""+(1-(o?s:0))),a+=r.offsetHeight,s+=.025})}},[o,p,r]),n.createElement("div",{ref:u,className:"Toastify",id:m,onMouseEnter:()=>{r&&(a(!1),T.pause())},onMouseLeave:v},d((e,t)=>{let i=t.length?{...h}:{...h,pointerEvents:"none"};return n.createElement("div",{className:y(e),style:i,key:"container-".concat(e)},t.map(e=>{let{content:t,props:i}=e;return n.createElement(C,{...i,stacked:r,collapseAll:v,isIn:c(i.toastId,i.containerId),style:i.style,key:"toast-".concat(i.key)},t)}))}))}},69703:function(e,t,r){"use strict";r.d(t,{Jh:function(){return l},ZT:function(){return i},_T:function(){return a},ev:function(){return u},mG:function(){return s},pi:function(){return o}});var n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var o=function(){return(o=Object.assign||function(e){for(var t,r=1,n=arguments.length;rt.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(e);it.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function s(e,t,r,n){function i(e){return e instanceof r?e:new r(function(t){t(e)})}return new(r||(r=Promise))(function(r,o){function a(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){e.done?r(e.value):i(e.value).then(a,s)}l((n=n.apply(e,t||[])).next())})}function l(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return l([e,t])}}function l(s){if(r)throw TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]{let{children:t,onSort:s,sort:r,sorting:i}=e,a=(i||[]).concat(["none"]),c=r?a.indexOf(r):-1;return(0,n.jsx)("div",{className:"text-[14px] font-normal leading-[14px] tracking-wider",children:(0,n.jsxs)("span",{className:"relative",children:[t," ",!!s&&!!r&&(0,n.jsx)("button",{className:"absolute right-[-16px] top-[6px] cursor-pointer",dangerouslySetInnerHTML:{__html:l.Sf},onClick:()=>{if(!s)return;let e=(1+a.indexOf(r))%a.length,t=a[e];null==s||s(t)},style:{rotate:0===c?"180deg":1===c?"0deg":"90deg"}})]})})}},80148:function(e,t,s){s.d(t,{B:function(){return l}});var n=s(22840);let l=(e,t,s)=>typeof e!=typeof t?0:"string"==typeof e?s?e.localeCompare(t):t.localeCompare(e):"number"==typeof e?Number.isNaN(e)||Number.isNaN(t)?0:s?e-t:t-e:e instanceof n.Z&&t instanceof n.Z?s?e.minus(t).toNumber():t.minus(e).toNumber():0},26605:function(e,t,s){var n=s(3827),l=s(30298);t.Z=e=>{let{address:t}=e;if(!t)return null;let s=[t.slice(0,5),t.slice(t.length-5)].join("...");return(0,n.jsx)("button",{className:"cursor-pointer text-left text-[12px] font-normal leading-[20px] text-typo-200",onClick:()=>{navigator.clipboard.writeText(t),(0,l.Am)("Copied to clipboard",{type:"info"})},children:s})}},62948:function(e,t,s){s.d(t,{S6:function(){return g},sv:function(){return N}});var n=s(3827),l=s(64090),r=s(82012),i=s(143),a=s(80148),c=s(88197),d=s(80469),o=s(62986),u=s(39730),x=s(89056),m=s(66803),h=s(77658),p=s(19807),j=s(67497),f=s(26605),v=s(48074);let g=e=>{let t=(0,u.jv)(e,null),s=(0,u.U2)(e,null);return(0,m.UO)(t)||(0,m.UO)(s)},N=e=>{let{isShowingDetails:t,setIsShowingDetails:s}=e;return(0,n.jsxs)("button",{className:"text-primary-500 flex flex-row items-center gap-2",onClick:()=>{s(!t)},children:[t?"Hide details":"Show details",(0,n.jsx)("div",{dangerouslySetInnerHTML:{__html:h.cx},style:{transform:"rotate(".concat(t?"0deg":"180deg",")")}})]})},b={gap:"16px",gridTemplateColumns:"60px 1.5fr repeat(4, 1fr)"},y="grid w-full items-center justify-between gap-2 p-2 mb-[24px] last:mb-[0px] bg-black rounded-[8px]",w="w-full overflow-hidden rounded-[24px] bg-bg-600 pb-4 text-typo-100 px-[16px]",k=()=>(0,n.jsx)("span",{dangerouslySetInnerHTML:{__html:h.GI}}),S=(0,l.memo)(e=>{let{delegation:t,disabled:s,index:i,staking:a,validator:d}=e,{validatorAddress:u}=t;(0,l.useEffect)(()=>{u&&(0,c.Dr)(u,a)},[u,a]);let m=(0,x.P)(null==d?void 0:d.description.identity);return(0,n.jsxs)("div",{className:y,style:b,children:[(0,n.jsx)("div",{className:"flex items-center justify-start",children:(0,n.jsx)("img",{alt:"Validator logo",className:"block w-[50px] rounded-full",src:m,style:{height:50,width:50}})}),(0,n.jsx)("div",{className:"flex flex-1 flex-row justify-start gap-4",children:(0,n.jsxs)("div",{className:"flex flex-col justify-start gap-2 text-left",children:[(0,n.jsx)("div",{className:"text-[14px] font-bold leading-[20px]",children:(null==d?void 0:d.description.moniker)||""}),(0,n.jsx)(f.Z,{address:(null==d?void 0:d.operatorAddress)||""})]})}),(0,n.jsx)("div",{className:"text-right",children:(0,n.jsx)(v.Z,{text:(0,j.Em)(t.balance)})}),(0,n.jsx)("div",{className:"text-right",children:d?(0,j.i)(d.commission.commissionRates.rate,0):""}),(0,n.jsx)("div",{className:"text-right",children:(0,n.jsx)(v.Z,{text:(0,j.Em)(t.rewards)})}),(0,n.jsxs)("div",{className:"flex flex-row items-center justify-end gap-[8px]",children:[(0,n.jsx)(r.hp,{disabled:s,onClick:()=>{d&&a.dispatch((0,o.ZG)({content:{validator:d},type:"delegate"}))},children:"Delegate"}),(0,n.jsx)(r.Rk,{Trigger:k,id:"delegation-".concat(i),children:(0,n.jsxs)("div",{className:"flex flex-col gap-[12px] rounded-[8px] bg-bg-600 py-[4px]",children:[(0,n.jsx)(r.ZP,{disabled:s,onClick:()=>{d&&a.dispatch((0,o.ZG)({content:{delegations:[t]},type:"rewards"}))},children:"Claim rewards"}),(0,n.jsx)(r.ZP,{disabled:s,onClick:()=>{d&&a.dispatch((0,o.ZG)({content:{validator:d},type:"undelegate"}))},variant:"danger",children:"Undelegate"})]})})]})]})}),C=e=>{let{disabled:t,stakingRef:s,unbonding:i,validator:a}=e,{account:d,client:o,staking:u}=s,m=(0,x.P)(null==a?void 0:a.description.identity),h=i.validator;return(0,l.useEffect)(()=>{h&&(0,c.Dr)(h,u)},[h,u]),(0,n.jsxs)("div",{className:y,style:b,children:[(0,n.jsx)("div",{className:"flex items-center justify-start",children:(0,n.jsx)("img",{alt:"Validator logo",className:"block w-[50px] rounded-full",src:m,style:{height:50,width:50}})}),(0,n.jsx)("div",{className:"flex flex-1 flex-row justify-start gap-4",children:(0,n.jsxs)("div",{className:"flex flex-col justify-start gap-2 text-left",children:[(0,n.jsx)("div",{className:"text-[14px] font-bold leading-[20px]",children:(null==a?void 0:a.description.moniker)||""}),(0,n.jsx)(f.Z,{address:(null==a?void 0:a.operatorAddress)||""})]})}),(0,n.jsx)("div",{className:"text-right",children:(0,n.jsx)(v.Z,{text:(0,j.Em)(i.balance)})}),(0,n.jsx)("div",{className:"text-right",children:"Unbonding"}),(0,n.jsx)("div",{className:"text-right",children:(0,j.ts)(i.completionTime)}),(0,n.jsx)("div",{className:"text-right",children:(0,n.jsx)(r.hp,{disabled:t,onClick:()=>{if(!o)return;let e={delegator:d.bech32Address||"",validator:i.validator};(0,p.mu)(e,i,o)},variant:"danger",children:"Cancel Unstake"})})]})},Z=i.N,E=i.N,I="grid w-full items-center justify-between gap-2 p-4 uppercase";t.ZP=(0,l.memo)(()=>{let e=(0,d.n)(),{staking:t}=e,[s,r]=(0,l.useState)("none"),[i,c]=(0,l.useState)("none"),o=(0,u.mM)(t.state),{delegations:x,unbondings:m}=t.state,h=!!(null==x?void 0:x.items.length),p=!!(null==m?void 0:m.items.length);return h||p?(0,n.jsxs)("div",{className:"flex h-full flex-1 flex-col items-end gap-[16px]",children:[h&&(()=>{let e=x.items.slice().sort((e,t)=>{switch(s){case"staked-asc":case"staked-desc":return(0,a.B)(e.balance.amount,t.balance.amount,"staked-asc"===s);case"rewards-asc":case"rewards-desc":return(0,a.B)(e.rewards.amount,t.rewards.amount,"rewards-asc"===s);case"commission-asc":case"commission-desc":{let n=o[e.validatorAddress],l=o[t.validatorAddress];return(0,a.B)(Number(null==n?void 0:n.commission.commissionRates.rate),Number(null==l?void 0:l.commission.commissionRates.rate),"commission-asc"===s)}default:return 0}});return(0,n.jsxs)("div",{className:w,children:[(0,n.jsxs)("div",{className:I,style:b,children:[(0,n.jsx)("div",{}),(0,n.jsx)(Z,{children:"Delegations"}),(0,n.jsx)(Z,{onSort:r,sort:s,sorting:["staked-asc","staked-desc"],children:(0,n.jsx)("div",{className:"text-right",children:"Staked Amount"})}),(0,n.jsx)(Z,{onSort:r,sort:s,sorting:["commission-asc","commission-desc"],children:(0,n.jsx)("div",{className:"text-right",children:"Commission"})}),(0,n.jsx)(Z,{onSort:r,sort:s,sorting:["rewards-asc","rewards-desc"],children:(0,n.jsx)("div",{className:"text-right",children:"Rewards"})})]}),e.map((e,s)=>(0,n.jsx)(S,{delegation:e,index:s,staking:t,validator:o[e.validatorAddress]},s))]})})(),p&&(()=>{let t=m.items.slice().sort((e,t)=>{switch(i){case"amount-asc":case"amount-desc":return(0,a.B)(Number(e.balance.amount),Number(t.balance.amount),"amount-asc"===i);case"completion-asc":case"completion-desc":return(0,a.B)(e.completionTime,t.completionTime,"completion-asc"===i);default:return 0}});return(0,n.jsxs)("div",{className:w,children:[(0,n.jsxs)("div",{className:I,style:b,children:[(0,n.jsx)("div",{}),(0,n.jsx)(E,{children:"Unstakings"}),(0,n.jsx)(E,{onSort:c,sort:i,sorting:["staked-asc","staked-desc"],children:(0,n.jsx)("div",{className:"text-right",children:"Staked Amount"})}),(0,n.jsx)(E,{children:(0,n.jsx)("div",{className:"text-right",children:"Status"})}),(0,n.jsx)(E,{onSort:c,sort:i,sorting:["date-asc","date-desc"],children:(0,n.jsx)("div",{className:"text-right",children:"Completion Time"})})]}),t.map((t,s)=>(0,n.jsx)(C,{stakingRef:e,unbonding:t,validator:o[t.validator]},s))]})})()]}):null})},42498:function(e,t,s){s.d(t,{I:function(){return l},i:function(){return r}});var n=s(3827);let l=()=>(0,n.jsx)("div",{className:"h-[1px] w-full bg-bg-400"}),r=()=>(0,n.jsx)("div",{className:"h-full w-[1px] bg-bg-400"})},71860:function(e,t,s){s.d(t,{Z:function(){return C}});var n=s(3827),l=s(64090),r=s(30298),i=s(82012),a=s(98245),c=s.n(a),d=s(77658);c().setAppElement(document.body);var o=e=>{let{children:t,...s}=e;return(0,l.useEffect)(()=>{if(s.isOpen){let e=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}}},[s.isOpen]),(0,n.jsx)(c(),{...s,style:{content:{background:"rgba(0,0,0,0.8)",border:"none",borderRadius:"48px",bottom:"auto",boxShadow:"0px 0px 50px 0px #FFFFFF40",left:"50%",padding:"45px",right:"auto",top:"50%",transform:"translate(-50%, -50%)"},overlay:{backgroundColor:"rgba(0, 0, 0, 0.5)"}},children:(0,n.jsxs)("div",{className:"relative w-full",children:[(0,n.jsx)("button",{className:"absolute right-[-16px] top-[-16px] w-[36px] cursor-pointer",dangerouslySetInnerHTML:{__html:d.kC},onClick:s.onRequestClose}),t]})})},u=s(88197),x=s(80469),m=s(62986),h=s(19807);let p=async(e,t)=>{let{client:s,staking:n}=e,{modal:l}=n.state,{delegations:i}=(null==l?void 0:l.content)||{};if(!s||!(null==i?void 0:i.length))return;let a=e.account.bech32Address;i.reduce(async(e,t)=>{await e;let n={delegator:a,validator:t.validatorAddress};await (0,h.YY)(n,s)},Promise.resolve()).then(()=>(0,u.VZ)(a,n)).then(()=>{t("completed")}).catch(()=>{(0,r.Am)("There was an unexpected error claiming your rewards. Please try again later.",{type:"error"})})};var j=(0,l.memo)(()=>{let e=(0,x.n)(),[t,s]=(0,l.useState)("loading"),r=(0,l.useRef)(!1),{staking:a}=e,{modal:c}=a.state,d=(null==c?void 0:c.type)==="rewards";if((0,l.useEffect)(()=>{d&&!r.current&&(r.current=!0,p(e,s))},[d,e]),!d)return null;let u="loading"===t?(0,n.jsxs)("div",{className:"w-full text-center",children:[(0,n.jsx)("div",{className:"mb-[16px] uppercase",children:(0,n.jsx)(i.ls,{children:"CLAIMING"})}),(0,n.jsx)("div",{className:"mb-[16px] text-typo-100",children:"Wait until your rewards are withdrawn."}),(0,n.jsx)(i.zx,{isLoading:!0})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"text-center",children:[(0,n.jsx)("div",{className:"mb-[16px] uppercase",children:(0,n.jsx)(i.ls,{children:"Success!"})}),(0,n.jsx)("div",{className:"mb-[16px] text-typo-100",children:"You have claimed your staking rewards successfully."})]}),(0,n.jsx)(i.zx,{onClick:()=>{e.staking.dispatch((0,m.ZG)(null))},children:"CLOSE"})]});return(0,n.jsx)(o,{isOpen:d,onRequestClose:()=>{"loading"!==t&&e.staking.dispatch((0,m.ZG)(null))},children:(0,n.jsx)("div",{className:"min-w-[390px]",children:u})})}),f=s(22840),v=s(39730),g=s(66803),N=s(9016),b=s(67497);let y="input";var w=()=>{let e=(0,x.n)(),{client:t}=e,[s,a]=(0,l.useState)(y),[c,d]=(0,l.useState)(!1),[h,p]=(0,l.useState)(""),[j,w]=(0,l.useState)(""),[k,S]=(0,l.useState)({amount:void 0,memo:void 0}),{account:C,staking:Z}=e,{modal:E}=Z.state,I=(null==E?void 0:E.type)==="delegate";if((0,l.useEffect)(()=>()=>{a(y),S({}),p(""),w("")},[I]),!I)return null;let{validator:A}=null==E?void 0:E.content;if(!A)return null;let F=new f.Z(h),O=F.isNaN()?"":F.times(N.Ex),z=Object.values(k).some(e=>!!e),B=(0,v.ap)(Z.state);return(0,n.jsx)(o,{isOpen:I,onRequestClose:()=>{c||e.staking.dispatch((0,m.ZG)(null))},children:(0,n.jsx)("div",{className:"min-w-[390px]",children:(()=>{let l=()=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"mb-[32px] mt-[32px] flex w-full flex-col items-center justify-center gap-[12px]",children:[(0,n.jsx)(i.Bz,{children:"Staked Amount (XION)"}),(0,n.jsx)(i.XJ,{children:F.toString()}),O&&(0,n.jsxs)(i.Bz,{children:["$",(0,b.HS)(O)]})]}),!!j&&(0,n.jsx)("div",{className:"mb-[32px] text-center italic",children:(0,n.jsx)("div",{children:j})})]});if("completed"===s)return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"text-center",children:[(0,n.jsx)("div",{className:"mb-[16px]",children:(0,n.jsx)(i.ls,{children:"SUCCESS!"})}),(0,n.jsxs)("div",{className:"text-typo-100",children:["You have successfully staked on"," ",A.description.moniker,". Thank you for contributing in securing the XION network."]})]}),l(),(0,n.jsx)(i.zx,{disabled:c,onClick:()=>{e.staking.dispatch((0,m.ZG)(null))},children:"CLOSE"})]});if("review"===s)return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"text-center",children:[(0,n.jsx)("div",{className:"mb-[16px]",children:(0,n.jsx)(i.ls,{children:"REVIEW"})}),(0,n.jsxs)("div",{className:"text-typo-100",children:["Get ready to stake your XION token with"," ",A.description.moniker,". Press 'Confirm' to proceed."]})]}),l(),(0,n.jsx)(i.zx,{isLoading:c,onClick:()=>{if(!t)return;d(!0);let e={delegator:C.bech32Address,validator:A.operatorAddress};(0,u._5)(e,(0,g.Jp)(F),j,t,Z).then(e=>(a("completed"),e())).catch(()=>{(0,r.Am)("Staking error",{type:"error"})}).finally(()=>{d(!1)})},children:"CONFIRM"})]});let o=()=>{if(!O||!B||F.isNaN()||F.gt(B))return S({...k,amount:"Invalid amount"}),!0};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"text-center uppercase",children:(0,n.jsxs)(i.ls,{children:["Delegate To ",A.description.moniker]})}),B&&(()=>{let e=B.times(N.Ex);return(0,n.jsxs)("div",{className:"mt-[40px] flex w-full flex-col items-center justify-center gap-[12px] uppercase",children:[(0,n.jsx)(i.Bz,{children:"Available for delegation (XION)"}),(0,n.jsx)(i.XJ,{children:(0,b.HS)(B)}),(0,n.jsxs)(i.Bz,{children:["$",(0,b.HS)(e)]})]})})(),(0,n.jsxs)("div",{className:"mt-[40px] flex w-full flex-row justify-between",children:[(0,n.jsx)("div",{children:"Amount"}),!!O&&(0,n.jsxs)(i.Bz,{children:["= $",(0,b.HS)(O)]})]}),(0,n.jsxs)("form",{onSubmit:e=>{null==e||e.stopPropagation(),null==e||e.preventDefault(),!o()&&(!t||z||F.lt(0)||a("review"))},children:[(0,n.jsxs)("div",{className:"mt-[8px]",children:[(0,n.jsx)(i.Wz,{disabled:c,error:!!k.amount,onBlur:()=>{o()},onChange:e=>{k.amount&&S({...k,amount:void 0}),p(e.target.value)},value:h}),k.amount&&(0,n.jsx)("div",{children:(0,n.jsx)(i.Xq,{children:k.amount})})]}),(0,n.jsx)("div",{className:"mt-[40px] w-full",children:(0,n.jsx)(i.sr,{disabled:c,onChange:e=>{w(e.target.value)},placeholder:"Memo (Optional)",value:j})}),(0,n.jsx)("div",{className:"mt-[48px] w-full",children:(0,n.jsx)(i.zx,{disabled:c||z,type:"submit",children:"DELEGATE NOW"})})]})]})})()})})};let k="input";var S=()=>{let e=(0,x.n)(),{client:t}=e,[s,a]=(0,l.useState)(k),[c,d]=(0,l.useState)(!1),[h,p]=(0,l.useState)({amount:void 0,memo:void 0}),[j,y]=(0,l.useState)(""),[w,S]=(0,l.useState)(""),{account:C,staking:Z}=e,{modal:E}=Z.state,I=(null==E?void 0:E.type)==="undelegate";if((0,l.useEffect)(()=>()=>{a(k),y(""),p({}),S("")},[I]),!I)return null;let{validator:A}=null==E?void 0:E.content;if(!A)return null;let F=new f.Z(j),O=F.isNaN()?"":F.times(N.Ex),z=(0,v.U2)(Z.state,A.operatorAddress),B=()=>{if(!O||!z||F.lte(0)||F.gt(new f.Z(z.amount)))return p({...h,amount:"Invalid amount"}),!0},R=e=>{null==e||e.stopPropagation(),null==e||e.preventDefault(),!B()&&t&&F.gt(0)&&a("review")};return(0,n.jsx)(o,{isOpen:I,onRequestClose:()=>{c||e.staking.dispatch((0,m.ZG)(null))},children:(0,n.jsx)("div",{className:"min-w-[390px]",children:(()=>{let l=()=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"mb-[32px] mt-[32px] flex w-full flex-col items-center justify-center gap-[12px]",children:[(0,n.jsx)(i.Bz,{children:"Unstaking Amount (XION)"}),(0,n.jsx)(i.XJ,{children:(0,b.HS)(F)}),(0,n.jsx)(i.Bz,{children:(0,b.H_)((0,g.Jp)(F))})]}),!!w&&(0,n.jsx)("div",{className:"mb-[32px] text-center italic",children:(0,n.jsx)("div",{children:w})})]});return"completed"===s?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"text-center",children:[(0,n.jsx)("div",{className:"mb-[16px]",children:(0,n.jsx)(i.ls,{children:"SUCCESS!"})}),(0,n.jsxs)("div",{className:"text-typo-100",children:["You have successfully unstaked from"," ",A.description.moniker,". It takes ",N.Mx," ","days to complete the unstaking process"]})]}),l(),(0,n.jsx)(i.zx,{disabled:c,onClick:()=>{e.staking.dispatch((0,m.ZG)(null))},children:"CLOSE"})]}):"review"===s?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"text-center",children:[(0,n.jsx)("div",{className:"mb-[16px]",children:(0,n.jsx)(i.ls,{children:"REVIEW"})}),(0,n.jsxs)("div",{className:"text-typo-100",children:["Unstaking your XION Token means you'll stop earning rewards. Remember, it takes ",N.Mx," days to complete the unstaking process."]})]}),l(),(0,n.jsx)(i.zx,{isLoading:c,onClick:()=>{if(!t)return;d(!0);let e={delegator:C.bech32Address,validator:A.operatorAddress};(0,u.xu)(e,(0,g.Jp)(F),w,t,Z).then(e=>(a("completed"),e())).catch(()=>{(0,r.Am)("Staking error",{type:"error"})}).finally(()=>{d(!1)})},children:"CONFIRM"})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"text-center uppercase",children:(0,n.jsxs)(i.ls,{children:["Unstake From ",A.description.moniker]})}),z&&(()=>{let e=new f.Z(z.amount).times(N.Ex);return(0,n.jsxs)("div",{className:"mt-[40px] flex w-full flex-col items-center justify-center gap-[12px] uppercase",children:[(0,n.jsx)(i.Bz,{children:"Available amount (XION)"}),(0,n.jsx)(i.XJ,{children:(0,b.HS)(new f.Z(z.amount))}),(0,n.jsxs)(i.Bz,{children:["$",(0,b.HS)(e)]})]})})(),(0,n.jsxs)("div",{className:"mt-[40px] flex w-full flex-row justify-between",children:[(0,n.jsx)("div",{children:"Amount"}),!!O&&(0,n.jsxs)(i.Bz,{children:["=$",(0,b.HS)(O)]})]}),(0,n.jsxs)("form",{onSubmit:R,children:[(0,n.jsxs)("div",{className:"mt-[8px]",children:[(0,n.jsx)(i.Wz,{disabled:c,onBlur:()=>{B()},onChange:e=>{h.amount&&p({...h,amount:void 0}),y(e.target.value)},value:j}),h.amount&&(0,n.jsx)("div",{children:(0,n.jsx)(i.Xq,{children:h.amount})})]}),(0,n.jsx)("div",{className:"mt-[40px] w-full",children:(0,n.jsx)(i.sr,{disabled:c,onChange:e=>{S(e.target.value)},placeholder:"Memo (Optional)",value:w})}),(0,n.jsx)("div",{className:"mt-[48px] w-full",children:(0,n.jsx)(i.zx,{disabled:c,type:"submit",children:"Unstake Now"})})]})]})})()})})},C=()=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(w,{}),(0,n.jsx)(S,{}),(0,n.jsx)(j,{})]})},48074:function(e,t,s){var n=s(3827);t.Z=e=>{let{text:t}=e,[s,l]=t.split(" ");return(0,n.jsxs)("span",{children:[(0,n.jsx)("span",{children:s})," ",(0,n.jsx)("span",{className:"text-typo-200",children:l})]})}},89056:function(e,t,s){s.d(t,{P:function(){return a}});var n=s(64090),l=s(9016);let r={},i={getIdentityLogo:e=>{if(r[e])return r[e];let t=fetch("https://keybase.io/_/api/1.0/user/lookup.json?key_suffix=".concat(e)).then(e=>e.json()).then(e=>{var t,s,n,l;return(null==e?void 0:null===(l=e.them)||void 0===l?void 0:null===(n=l[0])||void 0===n?void 0:null===(s=n.pictures)||void 0===s?void 0:null===(t=s.primary)||void 0===t?void 0:t.url)||null}).catch(()=>null);return r[e]=t,t}},a=e=>{let[t,s]=(0,n.useState)(null);return(0,n.useEffect)(()=>{(async()=>{e&&s(await i.getIdentityLogo(e))})()},[e]),t||l.c1}},67497:function(e,t,s){s.d(t,{Em:function(){return i},HS:function(){return c},H_:function(){return o},PV:function(){return x},gg:function(){return a},i:function(){return d},ts:function(){return u}});var n=s(22840),l=s(66803),r=s(9016);let i=(e,t)=>{let s=(0,l.bI)(e),r=new n.Z(s.amount);if(r.eq(0))return"".concat(r.toFormat()," ").concat(s.denom);if(r.lt(1e-4))return"<".concat(1e-4," ").concat(s.denom);if(t){let e=Intl.NumberFormat("en",{notation:"compact"});return"".concat(e.format(r.toNumber())," ").concat(s.denom)}return"".concat(r.toFormat(4)," ").concat(s.denom)},a=e=>{if("number"!=typeof e||Number.isNaN(e))return null;let t=e<1e-4?"<0.1":(100*e).toFixed(1);return"".concat(t,"%")},c=e=>Intl.NumberFormat("en",{notation:"compact"}).format(e.toNumber()),d=(e,t)=>{let s=new n.Z(e).div(new n.Z(10).pow(18)).toNumber();return"".concat((100*s).toFixed(t),"%")},o=(e,t)=>{let s=(0,l.bI)(e||(0,l.IB)()),i=new n.Z(e?s.amount:0).times(r.Ex);return i.eq(0)?"$0":!t&&i.lt(.01)?"<$0.01":"$".concat(t?c(i):i.toFormat(2))},u=e=>{let t=1e3*e,s=Math.floor((t-Date.now())/864e5),n=new Date(t).toLocaleString("default",{month:"short"}),l=new Date(t).getDate(),r=new Date(t).getFullYear();return"in ".concat(s," day").concat(1===s?"":"s",", ").concat(n," ").concat(l," ").concat(r)},x=e=>e?"".concat(e.times(100).toFixed(2),"%"):"-"}}]); \ No newline at end of file diff --git a/_next/static/chunks/503-6166f7bdb0bab8f4.js b/_next/static/chunks/503-6166f7bdb0bab8f4.js deleted file mode 100644 index 4b34eea..0000000 --- a/_next/static/chunks/503-6166f7bdb0bab8f4.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[503],{143:function(e,t,s){s.d(t,{N:function(){return r}});var n=s(3827),l=s(77658);let r=e=>{let{children:t,onSort:s,sort:r,sorting:i}=e,a=(i||[]).concat(["none"]),c=r?a.indexOf(r):-1;return(0,n.jsx)("div",{className:"text-[14px] font-normal leading-[14px] tracking-wider",children:(0,n.jsxs)("span",{className:"relative",children:[t," ",!!s&&!!r&&(0,n.jsx)("button",{className:"absolute right-[-16px] top-[6px] cursor-pointer",dangerouslySetInnerHTML:{__html:l.Sf},onClick:()=>{if(!s)return;let e=(1+a.indexOf(r))%a.length,t=a[e];null==s||s(t)},style:{rotate:0===c?"180deg":1===c?"0deg":"90deg"}})]})})}},80148:function(e,t,s){s.d(t,{B:function(){return l}});var n=s(22840);let l=(e,t,s)=>typeof e!=typeof t?0:"string"==typeof e?s?e.localeCompare(t):t.localeCompare(e):"number"==typeof e?Number.isNaN(e)||Number.isNaN(t)?0:s?e-t:t-e:e instanceof n.Z&&t instanceof n.Z?s?e.minus(t).toNumber():t.minus(e).toNumber():0},26605:function(e,t,s){var n=s(3827),l=s(30298);t.Z=e=>{let{address:t}=e;if(!t)return null;let s=[t.slice(0,5),t.slice(t.length-5)].join("...");return(0,n.jsx)("button",{className:"cursor-pointer text-left text-[12px] font-normal leading-[20px] text-typo-200",onClick:()=>{navigator.clipboard.writeText(t),(0,l.Am)("Copied to clipboard",{type:"info"})},children:s})}},62948:function(e,t,s){s.d(t,{S6:function(){return g},sv:function(){return N}});var n=s(3827),l=s(64090),r=s(98909),i=s(143),a=s(80148),c=s(88197),d=s(80469),o=s(62986),u=s(39730),x=s(89056),m=s(66803),h=s(77658),p=s(19807),j=s(67497),f=s(26605),v=s(48074);let g=e=>{let t=(0,u.jv)(e,null),s=(0,u.U2)(e,null);return(0,m.UO)(t)||(0,m.UO)(s)},N=e=>{let{isShowingDetails:t,setIsShowingDetails:s}=e;return(0,n.jsxs)("button",{className:"text-primary-500 flex flex-row items-center gap-2",onClick:()=>{s(!t)},children:[t?"Hide details":"Show details",(0,n.jsx)("div",{dangerouslySetInnerHTML:{__html:h.cx},style:{transform:"rotate(".concat(t?"0deg":"180deg",")")}})]})},b={gap:"16px",gridTemplateColumns:"60px 1.5fr repeat(4, 1fr)"},y="grid w-full items-center justify-between gap-2 p-2 mb-[24px] last:mb-[0px] bg-black rounded-[8px]",w="w-full overflow-hidden rounded-[24px] bg-bg-600 pb-4 text-typo-100 px-[16px]",k=()=>(0,n.jsx)("span",{dangerouslySetInnerHTML:{__html:h.GI}}),S=(0,l.memo)(e=>{let{delegation:t,disabled:s,index:i,staking:a,validator:d}=e,{validatorAddress:u}=t;(0,l.useEffect)(()=>{u&&(0,c.Dr)(u,a)},[u,a]);let m=(0,x.P)(null==d?void 0:d.description.identity);return(0,n.jsxs)("div",{className:y,style:b,children:[(0,n.jsx)("div",{className:"flex items-center justify-start",children:(0,n.jsx)("img",{alt:"Validator logo",className:"block w-[50px] rounded-full",src:m,style:{height:50,width:50}})}),(0,n.jsx)("div",{className:"flex flex-1 flex-row justify-start gap-4",children:(0,n.jsxs)("div",{className:"flex flex-col justify-start gap-2 text-left",children:[(0,n.jsx)("div",{className:"text-[14px] font-bold leading-[20px]",children:(null==d?void 0:d.description.moniker)||""}),(0,n.jsx)(f.Z,{address:(null==d?void 0:d.operatorAddress)||""})]})}),(0,n.jsx)("div",{className:"text-right",children:(0,n.jsx)(v.Z,{text:(0,j.Em)(t.balance)})}),(0,n.jsx)("div",{className:"text-right",children:d?(0,j.i)(d.commission.commissionRates.rate,0):""}),(0,n.jsx)("div",{className:"text-right",children:(0,n.jsx)(v.Z,{text:(0,j.Em)(t.rewards)})}),(0,n.jsxs)("div",{className:"flex flex-row items-center justify-end gap-[8px]",children:[(0,n.jsx)(r.hp,{disabled:s,onClick:()=>{d&&a.dispatch((0,o.ZG)({content:{validator:d},type:"delegate"}))},children:"Delegate"}),(0,n.jsx)(r.Rk,{Trigger:k,id:"delegation-".concat(i),children:(0,n.jsxs)("div",{className:"flex flex-col gap-[12px] rounded-[8px] bg-bg-600 py-[4px]",children:[(0,n.jsx)(r.ZP,{disabled:s,onClick:()=>{d&&a.dispatch((0,o.ZG)({content:{delegations:[t]},type:"rewards"}))},children:"Claim rewards"}),(0,n.jsx)(r.ZP,{disabled:s,onClick:()=>{d&&a.dispatch((0,o.ZG)({content:{validator:d},type:"undelegate"}))},variant:"danger",children:"Undelegate"})]})})]})]})}),C=e=>{let{disabled:t,stakingRef:s,unbonding:i,validator:a}=e,{account:d,client:o,staking:u}=s,m=(0,x.P)(null==a?void 0:a.description.identity),h=i.validator;return(0,l.useEffect)(()=>{h&&(0,c.Dr)(h,u)},[h,u]),(0,n.jsxs)("div",{className:y,style:b,children:[(0,n.jsx)("div",{className:"flex items-center justify-start",children:(0,n.jsx)("img",{alt:"Validator logo",className:"block w-[50px] rounded-full",src:m,style:{height:50,width:50}})}),(0,n.jsx)("div",{className:"flex flex-1 flex-row justify-start gap-4",children:(0,n.jsxs)("div",{className:"flex flex-col justify-start gap-2 text-left",children:[(0,n.jsx)("div",{className:"text-[14px] font-bold leading-[20px]",children:(null==a?void 0:a.description.moniker)||""}),(0,n.jsx)(f.Z,{address:(null==a?void 0:a.operatorAddress)||""})]})}),(0,n.jsx)("div",{className:"text-right",children:(0,n.jsx)(v.Z,{text:(0,j.Em)(i.balance)})}),(0,n.jsx)("div",{className:"text-right",children:"Unbonding"}),(0,n.jsx)("div",{className:"text-right",children:(0,j.ts)(i.completionTime)}),(0,n.jsx)("div",{className:"text-right",children:(0,n.jsx)(r.hp,{disabled:t,onClick:()=>{if(!o)return;let e={delegator:d.bech32Address||"",validator:i.validator};(0,p.rf)(e,o)},variant:"danger",children:"Cancel Unstake"})})]})},Z=i.N,E=i.N,I="grid w-full items-center justify-between gap-2 p-4 uppercase";t.ZP=(0,l.memo)(()=>{let e=(0,d.n)(),{staking:t}=e,[s,r]=(0,l.useState)("none"),[i,c]=(0,l.useState)("none"),o=(0,u.mM)(t.state),{delegations:x,unbondings:m}=t.state,h=!!(null==x?void 0:x.items.length),p=!!(null==m?void 0:m.items.length);return h||p?(0,n.jsxs)("div",{className:"flex h-full flex-1 flex-col items-end gap-[16px]",children:[h&&(()=>{let e=x.items.slice().sort((e,t)=>{switch(s){case"staked-asc":case"staked-desc":return(0,a.B)(e.balance.amount,t.balance.amount,"staked-asc"===s);case"rewards-asc":case"rewards-desc":return(0,a.B)(e.rewards.amount,t.rewards.amount,"rewards-asc"===s);case"commission-asc":case"commission-desc":{let n=o[e.validatorAddress],l=o[t.validatorAddress];return(0,a.B)(Number(null==n?void 0:n.commission.commissionRates.rate),Number(null==l?void 0:l.commission.commissionRates.rate),"commission-asc"===s)}default:return 0}});return(0,n.jsxs)("div",{className:w,children:[(0,n.jsxs)("div",{className:I,style:b,children:[(0,n.jsx)("div",{}),(0,n.jsx)(Z,{children:"Delegations"}),(0,n.jsx)(Z,{onSort:r,sort:s,sorting:["staked-asc","staked-desc"],children:(0,n.jsx)("div",{className:"text-right",children:"Staked Amount"})}),(0,n.jsx)(Z,{onSort:r,sort:s,sorting:["commission-asc","commission-desc"],children:(0,n.jsx)("div",{className:"text-right",children:"Commission"})}),(0,n.jsx)(Z,{onSort:r,sort:s,sorting:["rewards-asc","rewards-desc"],children:(0,n.jsx)("div",{className:"text-right",children:"Rewards"})})]}),e.map((e,s)=>(0,n.jsx)(S,{delegation:e,index:s,staking:t,validator:o[e.validatorAddress]},s))]})})(),p&&(()=>{let t=m.items.slice().sort((e,t)=>{switch(i){case"amount-asc":case"amount-desc":return(0,a.B)(Number(e.balance.amount),Number(t.balance.amount),"amount-asc"===i);case"completion-asc":case"completion-desc":return(0,a.B)(e.completionTime,t.completionTime,"completion-asc"===i);default:return 0}});return(0,n.jsxs)("div",{className:w,children:[(0,n.jsxs)("div",{className:I,style:b,children:[(0,n.jsx)("div",{}),(0,n.jsx)(E,{children:"Unstakings"}),(0,n.jsx)(E,{onSort:c,sort:i,sorting:["staked-asc","staked-desc"],children:(0,n.jsx)("div",{className:"text-right",children:"Staked Amount"})}),(0,n.jsx)(E,{children:(0,n.jsx)("div",{className:"text-right",children:"Status"})}),(0,n.jsx)(E,{onSort:c,sort:i,sorting:["date-asc","date-desc"],children:(0,n.jsx)("div",{className:"text-right",children:"Completion Time"})})]}),t.map((t,s)=>(0,n.jsx)(C,{stakingRef:e,unbonding:t,validator:o[t.validator]},s))]})})()]}):null})},42498:function(e,t,s){s.d(t,{I:function(){return l},i:function(){return r}});var n=s(3827);let l=()=>(0,n.jsx)("div",{className:"h-[1px] w-full bg-bg-400"}),r=()=>(0,n.jsx)("div",{className:"h-full w-[1px] bg-bg-400"})},71860:function(e,t,s){s.d(t,{Z:function(){return C}});var n=s(3827),l=s(64090),r=s(30298),i=s(98909),a=s(98245),c=s.n(a),d=s(77658);c().setAppElement(document.body);var o=e=>{let{children:t,...s}=e;return(0,l.useEffect)(()=>{if(s.isOpen){let e=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}}},[s.isOpen]),(0,n.jsx)(c(),{...s,style:{content:{background:"rgba(0,0,0,0.8)",border:"none",borderRadius:"48px",bottom:"auto",boxShadow:"0px 0px 50px 0px #FFFFFF40",left:"50%",padding:"45px",right:"auto",top:"50%",transform:"translate(-50%, -50%)"},overlay:{backgroundColor:"rgba(0, 0, 0, 0.5)"}},children:(0,n.jsxs)("div",{className:"relative w-full",children:[(0,n.jsx)("button",{className:"absolute right-[-16px] top-[-16px] w-[36px] cursor-pointer",dangerouslySetInnerHTML:{__html:d.kC},onClick:s.onRequestClose}),t]})})},u=s(88197),x=s(80469),m=s(62986),h=s(19807);let p=async(e,t)=>{let{client:s,staking:n}=e,{modal:l}=n.state,{delegations:i}=(null==l?void 0:l.content)||{};if(!s||!(null==i?void 0:i.length))return;let a=e.account.bech32Address;i.reduce(async(e,t)=>{await e;let n={delegator:a,validator:t.validatorAddress};await (0,h.YY)(n,s)},Promise.resolve()).then(()=>(0,u.VZ)(a,n)).then(()=>{t("completed")}).catch(()=>{(0,r.Am)("There was an unexpected error claiming your rewards. Please try again later.",{type:"error"})})};var j=(0,l.memo)(()=>{let e=(0,x.n)(),[t,s]=(0,l.useState)("loading"),r=(0,l.useRef)(!1),{staking:a}=e,{modal:c}=a.state,d=(null==c?void 0:c.type)==="rewards";if((0,l.useEffect)(()=>{d&&!r.current&&(r.current=!0,p(e,s))},[d,e]),!d)return null;let u="loading"===t?(0,n.jsxs)("div",{className:"w-full text-center",children:[(0,n.jsx)("div",{className:"mb-[16px] uppercase",children:(0,n.jsx)(i.ls,{children:"CLAIMING"})}),(0,n.jsx)("div",{className:"mb-[16px] text-typo-100",children:"Wait until your rewards are withdrawn."}),(0,n.jsx)(i.zx,{isLoading:!0})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"text-center",children:[(0,n.jsx)("div",{className:"mb-[16px] uppercase",children:(0,n.jsx)(i.ls,{children:"Success!"})}),(0,n.jsx)("div",{className:"mb-[16px] text-typo-100",children:"You have claimed your staking rewards successfully."})]}),(0,n.jsx)(i.zx,{onClick:()=>{e.staking.dispatch((0,m.ZG)(null))},children:"CLOSE"})]});return(0,n.jsx)(o,{isOpen:d,onRequestClose:()=>{"loading"!==t&&e.staking.dispatch((0,m.ZG)(null))},children:(0,n.jsx)("div",{className:"min-w-[390px]",children:u})})}),f=s(22840),v=s(39730),g=s(66803),N=s(9016),b=s(67497);let y="input";var w=()=>{let e=(0,x.n)(),{client:t}=e,[s,a]=(0,l.useState)(y),[c,d]=(0,l.useState)(!1),[h,p]=(0,l.useState)(""),[j,w]=(0,l.useState)(""),[k,S]=(0,l.useState)({amount:void 0,memo:void 0}),{account:C,staking:Z}=e,{modal:E}=Z.state,I=(null==E?void 0:E.type)==="delegate";if((0,l.useEffect)(()=>()=>{a(y),S({}),p(""),w("")},[I]),!I)return null;let{validator:A}=null==E?void 0:E.content;if(!A)return null;let F=new f.Z(h),O=F.isNaN()?"":F.times(N.Ex),z=Object.values(k).some(e=>!!e),B=(0,v.ap)(Z.state);return(0,n.jsx)(o,{isOpen:I,onRequestClose:()=>{c||e.staking.dispatch((0,m.ZG)(null))},children:(0,n.jsx)("div",{className:"min-w-[390px]",children:(()=>{let l=()=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"mb-[32px] mt-[32px] flex w-full flex-col items-center justify-center gap-[12px]",children:[(0,n.jsx)(i.Bz,{children:"Staked Amount (XION)"}),(0,n.jsx)(i.XJ,{children:F.toString()}),O&&(0,n.jsxs)(i.Bz,{children:["$",(0,b.HS)(O)]})]}),!!j&&(0,n.jsx)("div",{className:"mb-[32px] text-center italic",children:(0,n.jsx)("div",{children:j})})]});if("completed"===s)return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"text-center",children:[(0,n.jsx)("div",{className:"mb-[16px]",children:(0,n.jsx)(i.ls,{children:"SUCCESS!"})}),(0,n.jsxs)("div",{className:"text-typo-100",children:["You have successfully staked on"," ",A.description.moniker,". Thank you for contributing in securing the XION network."]})]}),l(),(0,n.jsx)(i.zx,{disabled:c,onClick:()=>{e.staking.dispatch((0,m.ZG)(null))},children:"CLOSE"})]});if("review"===s)return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"text-center",children:[(0,n.jsx)("div",{className:"mb-[16px]",children:(0,n.jsx)(i.ls,{children:"REVIEW"})}),(0,n.jsxs)("div",{className:"text-typo-100",children:["Get ready to stake your XION token with"," ",A.description.moniker,". Press 'Confirm' to proceed."]})]}),l(),(0,n.jsx)(i.zx,{isLoading:c,onClick:()=>{if(!t)return;d(!0);let e={delegator:C.bech32Address,validator:A.operatorAddress};(0,u._5)(e,(0,g.Jp)(F),j,t,Z).then(e=>(a("completed"),e())).catch(()=>{(0,r.Am)("Staking error",{type:"error"})}).finally(()=>{d(!1)})},children:"CONFIRM"})]});let o=()=>{if(!O||!B||F.isNaN()||F.gt(B))return S({...k,amount:"Invalid amount"}),!0};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"text-center uppercase",children:(0,n.jsxs)(i.ls,{children:["Delegate To ",A.description.moniker]})}),B&&(()=>{let e=B.times(N.Ex);return(0,n.jsxs)("div",{className:"mt-[40px] flex w-full flex-col items-center justify-center gap-[12px] uppercase",children:[(0,n.jsx)(i.Bz,{children:"Available for delegation (XION)"}),(0,n.jsx)(i.XJ,{children:(0,b.HS)(B)}),(0,n.jsxs)(i.Bz,{children:["$",(0,b.HS)(e)]})]})})(),(0,n.jsxs)("div",{className:"mt-[40px] flex w-full flex-row justify-between",children:[(0,n.jsx)("div",{children:"Amount"}),!!O&&(0,n.jsxs)(i.Bz,{children:["= $",(0,b.HS)(O)]})]}),(0,n.jsxs)("form",{onSubmit:e=>{null==e||e.stopPropagation(),null==e||e.preventDefault(),!o()&&(!t||z||F.lt(0)||a("review"))},children:[(0,n.jsxs)("div",{className:"mt-[8px]",children:[(0,n.jsx)(i.Wz,{disabled:c,error:!!k.amount,onBlur:()=>{o()},onChange:e=>{k.amount&&S({...k,amount:void 0}),p(e.target.value)},value:h}),k.amount&&(0,n.jsx)("div",{children:(0,n.jsx)(i.Xq,{children:k.amount})})]}),(0,n.jsx)("div",{className:"mt-[40px] w-full",children:(0,n.jsx)(i.sr,{disabled:c,onChange:e=>{w(e.target.value)},placeholder:"Memo (Optional)",value:j})}),(0,n.jsx)("div",{className:"mt-[48px] w-full",children:(0,n.jsx)(i.zx,{disabled:c||z,type:"submit",children:"DELEGATE NOW"})})]})]})})()})})};let k="input";var S=()=>{let e=(0,x.n)(),{client:t}=e,[s,a]=(0,l.useState)(k),[c,d]=(0,l.useState)(!1),[h,p]=(0,l.useState)({amount:void 0,memo:void 0}),[j,y]=(0,l.useState)(""),[w,S]=(0,l.useState)(""),{account:C,staking:Z}=e,{modal:E}=Z.state,I=(null==E?void 0:E.type)==="undelegate";if((0,l.useEffect)(()=>()=>{a(k),y(""),p({}),S("")},[I]),!I)return null;let{validator:A}=null==E?void 0:E.content;if(!A)return null;let F=new f.Z(j),O=F.isNaN()?"":F.times(N.Ex),z=(0,v.U2)(Z.state,A.operatorAddress),B=()=>{if(!O||!z||F.lte(0)||F.gt(new f.Z(z.amount)))return p({...h,amount:"Invalid amount"}),!0},R=e=>{null==e||e.stopPropagation(),null==e||e.preventDefault(),!B()&&t&&F.gt(0)&&a("review")};return(0,n.jsx)(o,{isOpen:I,onRequestClose:()=>{c||e.staking.dispatch((0,m.ZG)(null))},children:(0,n.jsx)("div",{className:"min-w-[390px]",children:(()=>{let l=()=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"mb-[32px] mt-[32px] flex w-full flex-col items-center justify-center gap-[12px]",children:[(0,n.jsx)(i.Bz,{children:"Unstaking Amount (XION)"}),(0,n.jsx)(i.XJ,{children:(0,b.HS)(F)}),(0,n.jsx)(i.Bz,{children:(0,b.H_)((0,g.Jp)(F))})]}),!!w&&(0,n.jsx)("div",{className:"mb-[32px] text-center italic",children:(0,n.jsx)("div",{children:w})})]});return"completed"===s?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"text-center",children:[(0,n.jsx)("div",{className:"mb-[16px]",children:(0,n.jsx)(i.ls,{children:"SUCCESS!"})}),(0,n.jsxs)("div",{className:"text-typo-100",children:["You have successfully unstaked from"," ",A.description.moniker,". It takes ",N.Mx," ","days to complete the unstaking process"]})]}),l(),(0,n.jsx)(i.zx,{disabled:c,onClick:()=>{e.staking.dispatch((0,m.ZG)(null))},children:"CLOSE"})]}):"review"===s?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"text-center",children:[(0,n.jsx)("div",{className:"mb-[16px]",children:(0,n.jsx)(i.ls,{children:"REVIEW"})}),(0,n.jsxs)("div",{className:"text-typo-100",children:["Unstaking your XION Token means you'll stop earning rewards. Remember, it takes ",N.Mx," days to complete the unstaking process."]})]}),l(),(0,n.jsx)(i.zx,{isLoading:c,onClick:()=>{if(!t)return;d(!0);let e={delegator:C.bech32Address,validator:A.operatorAddress};(0,u.xu)(e,(0,g.Jp)(F),w,t,Z).then(e=>(a("completed"),e())).catch(()=>{(0,r.Am)("Staking error",{type:"error"})}).finally(()=>{d(!1)})},children:"CONFIRM"})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"text-center uppercase",children:(0,n.jsxs)(i.ls,{children:["Unstake From ",A.description.moniker]})}),z&&(()=>{let e=new f.Z(z.amount).times(N.Ex);return(0,n.jsxs)("div",{className:"mt-[40px] flex w-full flex-col items-center justify-center gap-[12px] uppercase",children:[(0,n.jsx)(i.Bz,{children:"Available amount (XION)"}),(0,n.jsx)(i.XJ,{children:(0,b.HS)(new f.Z(z.amount))}),(0,n.jsxs)(i.Bz,{children:["$",(0,b.HS)(e)]})]})})(),(0,n.jsxs)("div",{className:"mt-[40px] flex w-full flex-row justify-between",children:[(0,n.jsx)("div",{children:"Amount"}),!!O&&(0,n.jsxs)(i.Bz,{children:["=$",(0,b.HS)(O)]})]}),(0,n.jsxs)("form",{onSubmit:R,children:[(0,n.jsxs)("div",{className:"mt-[8px]",children:[(0,n.jsx)(i.Wz,{disabled:c,onBlur:()=>{B()},onChange:e=>{h.amount&&p({...h,amount:void 0}),y(e.target.value)},value:j}),h.amount&&(0,n.jsx)("div",{children:(0,n.jsx)(i.Xq,{children:h.amount})})]}),(0,n.jsx)("div",{className:"mt-[40px] w-full",children:(0,n.jsx)(i.sr,{disabled:c,onChange:e=>{S(e.target.value)},placeholder:"Memo (Optional)",value:w})}),(0,n.jsx)("div",{className:"mt-[48px] w-full",children:(0,n.jsx)(i.zx,{disabled:c,type:"submit",children:"Unstake Now"})})]})]})})()})})},C=()=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(w,{}),(0,n.jsx)(S,{}),(0,n.jsx)(j,{})]})},48074:function(e,t,s){var n=s(3827);t.Z=e=>{let{text:t}=e,[s,l]=t.split(" ");return(0,n.jsxs)("span",{children:[(0,n.jsx)("span",{children:s})," ",(0,n.jsx)("span",{className:"text-typo-200",children:l})]})}},89056:function(e,t,s){s.d(t,{P:function(){return a}});var n=s(64090),l=s(9016);let r={},i={getIdentityLogo:e=>{if(r[e])return r[e];let t=fetch("https://keybase.io/_/api/1.0/user/lookup.json?key_suffix=".concat(e)).then(e=>e.json()).then(e=>{var t,s,n,l;return(null==e?void 0:null===(l=e.them)||void 0===l?void 0:null===(n=l[0])||void 0===n?void 0:null===(s=n.pictures)||void 0===s?void 0:null===(t=s.primary)||void 0===t?void 0:t.url)||null}).catch(()=>null);return r[e]=t,t}},a=e=>{let[t,s]=(0,n.useState)(null);return(0,n.useEffect)(()=>{(async()=>{e&&s(await i.getIdentityLogo(e))})()},[e]),t||l.c1}},67497:function(e,t,s){s.d(t,{Em:function(){return i},HS:function(){return c},H_:function(){return o},PV:function(){return x},gg:function(){return a},i:function(){return d},ts:function(){return u}});var n=s(22840),l=s(66803),r=s(9016);let i=(e,t)=>{let s=(0,l.bI)(e),r=new n.Z(s.amount);if(r.eq(0))return"".concat(r.toFormat()," ").concat(s.denom);if(r.lt(1e-4))return"<".concat(1e-4," ").concat(s.denom);if(t){let e=Intl.NumberFormat("en",{notation:"compact"});return"".concat(e.format(r.toNumber())," ").concat(s.denom)}return"".concat(r.toFormat(4)," ").concat(s.denom)},a=e=>{if("number"!=typeof e||Number.isNaN(e))return null;let t=e<1e-4?"<0.1":(100*e).toFixed(1);return"".concat(t,"%")},c=e=>Intl.NumberFormat("en",{notation:"compact"}).format(e.toNumber()),d=(e,t)=>{let s=new n.Z(e).div(new n.Z(10).pow(18)).toNumber();return"".concat((100*s).toFixed(t),"%")},o=(e,t)=>{let s=(0,l.bI)(e||(0,l.IB)()),i=new n.Z(e?s.amount:0).times(r.Ex);return i.eq(0)?"$0":!t&&i.lt(.01)?"<$0.01":"$".concat(t?c(i):i.toFormat(2))},u=e=>{let t=1e3*e,s=Math.floor((t-Date.now())/864e5),n=new Date(t).toLocaleString("default",{month:"short"}),l=new Date(t).getDate(),r=new Date(t).getFullYear();return"in ".concat(s," day").concat(1===s?"":"s",", ").concat(n," ").concat(l," ").concat(r)},x=e=>e?"".concat(e.times(100).toFixed(2),"%"):"-"}}]); \ No newline at end of file diff --git a/_next/static/chunks/567-52b253322bfdeb49.js b/_next/static/chunks/567-52b253322bfdeb49.js new file mode 100644 index 0000000..8e276b7 --- /dev/null +++ b/_next/static/chunks/567-52b253322bfdeb49.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[567],{46601:function(){},89214:function(){},42480:function(){},85568:function(){},69386:function(){},31616:function(){},20131:function(){},16026:function(){},33370:function(){},82012:function(t,e,n){"use strict";n.d(e,{jr:function(){return v},zx:function(){return O},ZP:function(){return b},hp:function(){return x},M5:function(){return y},Rk:function(){return S},Xq:function(){return _},XJ:function(){return m},Bz:function(){return h},ls:function(){return f},Wz:function(){return N},OL:function(){return w},sr:function(){return A},Mj:function(){return C},Dx:function(){return p}});var r=n(3827),a=n(20996),i=n(32283),o=n(8792),l=n(64090),s=n(30298),u=n(77658),d=n(34417);let c=()=>{let t=(0,l.useRef)({}),e=(0,l.useContext)(d._);return t.current.state=e.state,t.current.dispatch=e.dispatch,{core:t.current}};var g=n(97573);let p=t=>{let{children:e,className:n=""}=t;return(0,r.jsx)("div",{className:["typo-title",n].join(" "),children:e})},f=t=>{let{children:e,className:n=""}=t;return(0,r.jsx)("div",{className:["typo-hero",n].join(" "),children:e})},m=t=>{let{children:e,className:n=""}=t;return(0,r.jsx)("div",{className:["heading2",n].join(" "),children:e})},h=t=>{let{children:e,className:n="",color:a="text-typo-150"}=t;return(0,r.jsx)("div",{className:["heading8",a,n].join(" "),children:e})},v=t=>{let{children:e,className:n=""}=t;return(0,r.jsx)("div",{className:["typo-body-medium",n].join(" "),children:e})},w=t=>{let{children:e,href:n}=t;return(0,r.jsx)(o.default,{className:"text-left font-normal leading-[24px] underline",href:n,children:e})},x=t=>{let{className:e,variant:n,...a}=t;return(0,r.jsx)("button",{...a,className:["cursor-pointer rounded-full bg-bg-550 px-[8px] py-[4px] text-white hover:bg-bg-600 disabled:cursor-not-allowed disabled:bg-bg-600 disabled:text-typo-150","danger"===n?"[&]:text-danger":"",e].join(" ")})},b=t=>{let{className:e,variant:n,...a}=t;return(0,r.jsx)("button",{...a,className:["cursor-pointer rounded-full bg-transparent px-[8px] py-[4px] text-white disabled:cursor-not-allowed disabled:bg-bg-600 disabled:text-typo-150","danger"===n?"[&]:text-danger":"",e].join(" ")})},y=t=>{let{textToCopy:e}=t;return(0,r.jsx)("button",{className:"cursor-pointer",dangerouslySetInnerHTML:{__html:u.BR},onClick:()=>{navigator.clipboard.writeText(e),(0,s.Am)("Copied to clipboard",{type:"info"})}})},N=t=>{let{error:e,...n}=t;return(0,r.jsxs)("span",{className:"relative block",children:[(0,r.jsx)("input",{...n,className:["h-[96px] w-full rounded-[16px] border-[1px] bg-black p-[16px] pr-[140px] text-[48px] focus:outline-none",e?"border-danger":"border-white"].join(" ")}),(0,r.jsx)("span",{className:"absolute bottom-0 right-[12px] top-0 flex h-full items-center text-[48px] text-typo-300",children:"XION"})]})},_=t=>{let{children:e}=t;return(0,r.jsx)("div",{className:"text-danger",children:e})},A=t=>(0,r.jsx)("input",{...t,className:"h-[50px] w-full bg-black py-[8px] focus:outline-none",style:{border:"none",borderBottom:"1px solid white"}}),O=t=>{let{className:e,isLoading:n,variant:a,...i}=t;return(0,r.jsx)("button",{...i,className:["w-full rounded-[8px] px-[12px] py-[16px] text-black disabled:cursor-not-allowed","danger"===a?"text-danger disabled:text-typo-150 bg-[#D745061A]":"success"===a?"bg-success text-black disabled:bg-green-400":"bg-white text-black disabled:bg-bg-400",e||""].join(" "),disabled:n||i.disabled,children:n?(0,r.jsx)("span",{className:"flex items-center justify-center",children:(0,r.jsx)("span",{className:"animate-spin",dangerouslySetInnerHTML:{__html:u._m}})}):i.children})},S=t=>{let{children:e,className:n,id:o,modalClass:s,offset:u,placement:d,Trigger:p}=t,[f,m]=(0,l.useState)(null),{core:h}=c(),v=h.state.popupOpenId===o;return(0,r.jsxs)("div",{className:[n].join(" "),children:[(0,r.jsx)("button",{onClick:t=>{t.stopPropagation(),h.dispatch((0,g.h)(o))},ref:m,children:(0,r.jsx)(p,{id:o})}),v&&(0,r.jsx)(a.d,{onClickAway:()=>{v&&h.dispatch((0,g.h)(null))},children:(0,r.jsx)(i.G,{anchor:f,className:[s].join(" "),offset:u,open:v,placement:d,withTransition:!0,children:e})})]})},C=t=>(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)("div",{className:"z-5 absolute bottom-[5px] left-0",children:(0,r.jsx)("div",{dangerouslySetInnerHTML:{__html:u.yC}})}),(0,r.jsx)("input",{...t,className:"border-b-[1px] border-b-transparent bg-transparent pl-[24px] text-white outline-none hover:border-b-white focus:border-b-white"})]})},97573:function(t,e,n){"use strict";n.d(e,{I:function(){return a},h:function(){return r}});let r=t=>({content:t,type:"SET_POPUP_OPEN_ID"}),a=(t,e)=>"SET_POPUP_OPEN_ID"===e.type?{...t,popupOpenId:e.content}:t},34417:function(t,e,n){"use strict";n.d(e,{W:function(){return a},_:function(){return i}});var r=n(64090);let a={popupOpenId:null},i=(0,r.createContext)({dispatch:()=>null,state:a})},88197:function(t,e,n){"use strict";n.d(e,{wX:function(){return b},VZ:function(){return y},Dr:function(){return O},qp:function(){return A},_5:function(){return N},xu:function(){return _}});var r=n(22840),a=n(71694),i=n(66803);let o=null,l=async t=>o||(o=(await (0,a.C_)()).staking.validators(t).then(t=>(o=null,t))),s={},u=async t=>{let e=s[t];if(e)return e;let n=(await (0,a.C_)()).staking.validator(t).then(e=>(s[t]=void 0,e.validator));return s[t]=n,n},d=null,c=async()=>d||(d=(await (0,a.C_)()).staking.pool().then(t=>(d=null,t.pool))),g=async t=>{let e=await (0,a.N$)();return await e.getBalance(t,"uxion")},p=async t=>{let e=await (0,a.C_)();return await e.staking.delegatorDelegations(t)},f=async t=>{let e=await (0,a.C_)();return await e.staking.delegatorUnbondingDelegations(t)},m=async(t,e)=>{let n=await (0,a.C_)(),o=await n.distribution.delegationRewards(t,e);return(await Promise.all(o.rewards.map(async t=>{if(0==t.denom.indexOf("ibc/")){var e;let r=await n.ibc.transfer.denomTrace(t.denom.substring(4));t.denom=(null===(e=r.denomTrace)||void 0===e?void 0:e.baseDenom)||t.denom}return t}))).filter(t=>{var e;return(null===(e=t.denom)||void 0===e?void 0:e.toUpperCase())==="UXION"}).map(t=>({amount:new r.Z(t.amount).div(new r.Z(10).pow(18)).toString(),denom:t.denom})).map(t=>(0,i.bI)(t))},h=async()=>{let t=await (0,a.C_)(),e=await t.mint.params().catch(()=>null);return(null==e?void 0:e.inflationMax)||.2};var v=n(19807),w=n(62986),x=n(39730);let b=async t=>{try{t.dispatch((0,w.Kv)(!0));let[e,n,r,a,i]=await Promise.all([l("BOND_STATUS_BONDED"),l("BOND_STATUS_UNBONDED"),l("BOND_STATUS_UNBONDING"),h(),c()]);[[e,"bonded"],[n,"unbonded"],[r,"unbonding"]].forEach(e=>{var n,r;let[a,i]=e;t.dispatch((0,w.T2)({items:a.validators,nextKey:(null===(n=a.pagination)||void 0===n?void 0:n.nextKey)||null,total:(null===(r=a.pagination)||void 0===r?void 0:r.total)||null},!0,i))}),t.dispatch((0,w.DD)(i)),t.dispatch((0,w.Km)(a.toString())),t.dispatch((0,w.Kv)(!1))}catch(t){console.error("error fetching staking data:",t)}},y=async(t,e)=>{try{var n,r,a,o;e.dispatch((0,w.Kv)(!0));let[l,s,u]=await Promise.all([g(t),p(t).then(async e=>({items:await Promise.all(e.delegationResponses.map(async e=>({balance:e.balance,rewards:await m(t,e.delegation.validatorAddress).then(t=>(0,i.HJ)(t)),validatorAddress:e.delegation.validatorAddress}))),pagination:e.pagination})),f(t).then(t=>({items:t.unbondingResponses.reduce((t,e)=>(t.push(...e.entries.map(t=>({balance:{amount:t.balance,denom:"uxion"},completionTime:Number(t.completionTime.seconds),completionTimeNanos:t.completionTime.nanos,creationHeight:t.creationHeight,id:t.unbondingId.toString(),validator:e.validatorAddress}))),t),[]),pagination:t.pagination})).catch(()=>({items:[],pagination:null})).then(t=>({items:t.items,pagination:t.pagination}))]);e.dispatch((0,w.d0)(l)),e.dispatch((0,w.Qx)({items:s.items,nextKey:(null===(n=s.pagination)||void 0===n?void 0:n.nextKey)||null,total:(null===(r=s.pagination)||void 0===r?void 0:r.total)||null},!0)),e.dispatch((0,w.Kg)({items:u.items,nextKey:(null===(a=u.pagination)||void 0===a?void 0:a.nextKey)||null,total:(null===(o=u.pagination)||void 0===o?void 0:o.total)||null},!0)),e.dispatch((0,w.Kv)(!1))}catch(t){console.error("error fetching staking data:",t)}},N=async(t,e,n,r,a)=>(await (0,v.H0)(t,r,e,n),async()=>{await y(t.delegator,a)}),_=async(t,e,n,r,a)=>(await (0,v.vZ)(t,r,e,n),async()=>{await y(t.delegator,a)}),A=async(t,e)=>{var n;if((null===(n=e.state.validatorDetails)||void 0===n?void 0:n.operatorAddress)===t)return e.state.validatorDetails;let r=(0,x.mM)(e.state)[t]||await u(t);return e.dispatch((0,w.gT)(r)),r},O=async(t,e)=>{let n=(0,x.mM)(e.state)[t];if(n)return n;let r=await u(t);return e.dispatch((0,w.N7)({[t]:r,...e.state.extraValidators})),r}},80469:function(t,e,n){"use strict";let r;n.d(e,{f:function(){return d},n:function(){return u}});var a=n(75615),i=n(64090),o=n(88197),l=n(62986),s=n(544);let u=()=>{let t=(0,i.useRef)({}),e=(0,i.useContext)(s.Y);t.current.state=e.state,t.current.dispatch=e.dispatch;let{data:n,isConnected:o}=(0,a.hT)(),l=null==n?void 0:n.bech32Address;return{account:n,address:l,client:o?r:void 0,isConnected:o,staking:t.current}},d=()=>{let{client:t}=(0,a.Hj)(),{address:e,isConnected:n,staking:s}=u();r=n?t:void 0,(0,i.useEffect)(()=>{(0,o.wX)(s)},[s]),(0,i.useEffect)(()=>{if(n&&e)return(0,o.VZ)(e,s),()=>{s.dispatch((0,l.kS)())}},[n,e,s])}},62986:function(t,e,n){"use strict";n.d(e,{DD:function(){return u},I6:function(){return v},Kg:function(){return l},Km:function(){return g},Kv:function(){return a},N7:function(){return p},Qx:function(){return o},T2:function(){return i},ZG:function(){return c},d0:function(){return r},gT:function(){return s},kS:function(){return d}});let r=t=>({content:t,type:"SET_TOKENS"}),a=t=>({content:t,type:"SET_IS_INFO_LOADING"}),i=(t,e,n)=>({content:t,reset:e,status:n,type:"ADD_VALIDATORS"}),o=(t,e)=>({content:t,reset:e,type:"ADD_DELEGATIONS"}),l=(t,e)=>({content:t,reset:e,type:"ADD_UNBONDINGS"}),s=t=>({content:t,type:"SET_VALIDATOR_DETAILS"}),u=t=>({content:t,type:"SET_POOL"}),d=()=>({content:null,type:"LOGOUT"}),c=t=>({content:t,type:"SET_MODAL"}),g=t=>({content:t,type:"SET_INFLATION"}),p=t=>({content:t,type:"SET_EXTRA_VALIDATORS"}),f=t=>{let e=new Set;return t.filter(t=>!e.has(t.operatorAddress)&&(e.add(t.operatorAddress),!0))},m=t=>{let e=new Set;return t.filter(t=>!e.has(t.validatorAddress)&&(e.add(t.validatorAddress),!0))},h=t=>{let e=new Set;return t.filter(t=>{let n=t.id;return!e.has(n)&&(e.add(n),!0)})},v=(t,e)=>{switch(e.type){case"SET_TOKENS":return{...t,tokens:e.content};case"ADD_VALIDATORS":{let n=!e.reset&&t.validators[e.status]||{items:[],nextKey:null,total:null};return n.total=e.content.total,n.nextKey=e.content.nextKey,n.items=f(n.items.concat(e.content.items)),{...t,validators:{...t.validators,[e.status]:n}}}case"ADD_DELEGATIONS":{let n=!e.reset&&t.delegations||{items:[],nextKey:null,total:null};return n.total=e.content.total,n.nextKey=e.content.nextKey,n.items=m(e.content.items.concat(n.items)),{...t,delegations:n}}case"ADD_UNBONDINGS":{let n=!e.reset&&t.unbondings||{items:[],nextKey:null,total:null};return n.total=e.content.total,n.nextKey=e.content.nextKey,n.items=h(e.content.items.concat(n.items)),{...t,unbondings:n}}case"SET_IS_INFO_LOADING":return{...t,isInfoLoading:e.content};case"SET_VALIDATOR_DETAILS":return{...t,validatorDetails:e.content};case"SET_POOL":return{...t,pool:e.content};case"SET_MODAL":return{...t,modal:e.content};case"LOGOUT":return{...t,delegations:null,unbondings:null};case"SET_EXTRA_VALIDATORS":return{...t,extraValidators:e.content};case"SET_INFLATION":return{...t,inflation:e.content};default:return t}}},39730:function(t,e,n){"use strict";n.d(e,{Cn:function(){return l},Sg:function(){return d},U2:function(){return i},ap:function(){return s},jc:function(){return g},jv:function(){return o},mM:function(){return c},zq:function(){return u}});var r=n(22840),a=n(66803);let i=(t,e)=>{let{delegations:n}=t;if(!(null==n?void 0:n.items.length))return null;let r=n.items.filter(t=>!e||t.validatorAddress===e).map(t=>t.balance);return(0,a.HJ)(r)},o=(t,e)=>{let{unbondings:n}=t;if(!(null==n?void 0:n.items.length))return null;let r=n.items.filter(t=>!e||t.validator===e).map(t=>t.balance);return(0,a.HJ)(r)},l=(t,e)=>{let{delegations:n}=e;if(!(null==n?void 0:n.items.length))return null;let r=n.items.filter(e=>!t||e.validatorAddress===t).map(t=>t.rewards);return(0,a.HJ)(r)},s=t=>{let{tokens:e}=t;return e?new r.Z((0,a.bI)(e).amount):null},u=(t,e)=>{var n;return!!(null===(n=e.delegations)||void 0===n?void 0:n.items.some(e=>e.validatorAddress===t))},d=(t,e)=>{let{pool:n}=e;return t&&"string"==typeof(null==n?void 0:n.bondedTokens)?new r.Z(t).div(new r.Z(n.bondedTokens)).toNumber():null},c=t=>Object.values(t.validators).map(t=>null==t?void 0:t.items).flat().reduce((t,e)=>e?{...t,[e.operatorAddress]:e}:t,t.extraValidators),g=t=>t.inflation?new r.Z(t.inflation):null},544:function(t,e,n){"use strict";n.d(e,{W:function(){return a},Y:function(){return i}});var r=n(64090);let a={delegations:null,extraValidators:{},inflation:null,isInfoLoading:!1,modal:null,pool:null,tokens:null,unbondings:null,validatorDetails:null,validators:{bonded:null,unbonded:null,unbonding:null}},i=(0,r.createContext)({dispatch:()=>null,state:a})},71694:function(t,e,n){"use strict";let r,a;n.d(e,{C_:function(){return u},N$:function(){return d},v4:function(){return c}});var i=n(18722),o=n(58015),l=n(43890),s=n(9016);let u=()=>(r||(r=(async()=>{let t=await l.Tendermint34Client.connect(s.Od);return o.QueryClient.withExtensions(t,o.setupStakingExtension,o.setupDistributionExtension,o.setupMintExtension,o.setupIbcExtension)})()),r),d=()=>(a||(a=(async()=>await o.StargateClient.connect(s.Od))()),a),c=async t=>{let e=localStorage.getItem("xion-authz-temp-account");if(!e)return;let n=await i.DirectSecp256k1HdWallet.deserialize(e,"abstraxion"),r=await n.getAccounts().then(t=>{var e;return null===(e=t[0])||void 0===e?void 0:e.address});return{client:await o.SigningStargateClient.connectWithSigner(s.Od,n,{registry:t}),granteeAddress:r}}},66803:function(t,e,n){"use strict";n.d(e,{HJ:function(){return d},IB:function(){return i},Jp:function(){return o},UO:function(){return l},bI:function(){return a},bP:function(){return u},kw:function(){return s}});var r=n(22840);let a=t=>{var e,n,a;return(null===(e=t.denom)||void 0===e?void 0:e.toUpperCase())==="UXION"?{amount:new r.Z(t.amount).div(new r.Z(10).pow(6)).toString(),denom:"XION"}:(null===(n=t.denom)||void 0===n?void 0:n.toUpperCase())==="XION"?{amount:t.amount,denom:"XION"}:{...t,denom:null===(a=t.denom)||void 0===a?void 0:a.toUpperCase()}},i=()=>({amount:"0",denom:"XION"}),o=t=>({amount:t.toString(),denom:"XION"}),l=t=>t&&new r.Z(t.amount).gt(0),s=t=>({amount:t.div(new r.Z(10).pow(6)).toString(),denom:"XION"}),u=t=>({amount:t.times(new r.Z(10).pow(6)).toString(),denom:"UXION"}),d=t=>t.reduce((t,e)=>({amount:new r.Z(t.amount).plus(a(e).amount).toString(),denom:t.denom}),i())},9016:function(t,e,n){"use strict";n.d(e,{Ex:function(){return l},Jg:function(){return r},Mx:function(){return u},Od:function(){return i},T$:function(){return a},_H:function(){return d},c1:function(){return s},sb:function(){return o}});let r=!0,a=void 0,i="https://rpc.xion-testnet.forbole.com",o="/xion-staking",l=10,s="".concat(o,"/default-avatar.svg"),u=r?3:21,d=1e-4},77658:function(t,e,n){"use strict";n.d(e,{BR:function(){return a},GI:function(){return s},Sf:function(){return r},_m:function(){return u},cx:function(){return l},gU:function(){return i},kC:function(){return o},yC:function(){return d}});let r='',a='',i='',o='',l='',s='',u='',d=''},19807:function(t,e,n){"use strict";n.d(e,{mu:function(){return b},YY:function(){return w},sj:function(){return x},H0:function(){return h},vZ:function(){return v}});var r=n(22840),a=n(53856),i=n(62884),o=n(66803),l=n(9016),s=n(97481),u=n(71694);let d=async(t,e)=>{let{client:n,granteeAddress:r}=await (0,u.v4)()||{};if(!n||!r)return null;let a=[{typeUrl:"/cosmos.authz.v1beta1.MsgExec",value:s.MsgExec.fromPartial({grantee:r,msgs:t.map(t=>n.registry.encodeAsAny(t))})}];return await n.simulate(r,a,e).then(t=>Math.ceil(2*t).toString()).catch(t=>(console.log("debug: core/base.ts: Estimate error",t),null))},c=async t=>{let{address:e,amount:n=[{amount:"1000",denom:"uxion"}],gasLimit:r="400000",memo:a="",msgs:i}=t;return{amount:n,gas:await d(i,a).catch(()=>null)||r,granter:e}},g=t=>({amount:t.amount,denom:["UXION","XION"].includes(t.denom.toUpperCase())?t.denom.toLowerCase():t.denom}),p=t=>{if("UXION"===t.denom.toUpperCase())return g(t);if("XION"===t.denom.toUpperCase())return g((0,o.bP)(new r.Z(t.amount)));throw Error("Invalid coin denom")},f=t=>e=>{if(console.log("debug: base.ts: result",e),!e.events.find(e=>e.type===t))throw console.error(e),Error("Out of gas");return e},m=t=>{throw console.error(t),t},h=async(t,e,n,r)=>{let a=p(n),o={typeUrl:"/cosmos.staking.v1beta1.MsgDelegate",value:i.MsgDelegate.fromPartial({amount:a,delegatorAddress:t.delegator,validatorAddress:t.validator})},l=await c({address:t.delegator,memo:r,msgs:[o]});return await e.signAndBroadcast(t.delegator,[o],l,r).then(f("delegate")).catch(m)},v=async(t,e,n,r)=>{let a=p(n),o={typeUrl:"/cosmos.staking.v1beta1.MsgUndelegate",value:i.MsgUndelegate.fromPartial({amount:a,delegatorAddress:t.delegator,validatorAddress:t.validator})},l=await c({address:t.delegator,memo:r,msgs:[o]});return await e.signAndBroadcast(t.delegator,[o],l,r).then(f("unbond")).catch(m)},w=async(t,e)=>{let n=[{typeUrl:"/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward",value:a.MsgWithdrawDelegatorReward.fromPartial({delegatorAddress:t.delegator,validatorAddress:t.validator})}],r=await c({address:t.delegator,msgs:n});return await e.signAndBroadcast(t.delegator,n,r).then(f("withdraw_rewards")).catch(m)},x=t=>{let e=(0,o.bI)(t);return new r.Z(e.amount).gte(l._H)},b=async(t,e,n)=>{n.registry.register(i.MsgCancelUnbondingDelegation.typeUrl,i.MsgCancelUnbondingDelegation);let r=[{typeUrl:"/cosmos.staking.v1beta1.MsgCancelUnbondingDelegation",value:i.MsgCancelUnbondingDelegation.fromPartial({amount:e.balance,creationHeight:e.creationHeight,delegatorAddress:t.delegator,validatorAddress:t.validator})}],a=await c({address:t.delegator,msgs:r});return await n.signAndBroadcast(t.delegator,r,a,"").then(f("cancel_unbonding_delegation")).catch(m)}}}]); \ No newline at end of file diff --git a/_next/static/chunks/816-f354d55c4d7354c5.js b/_next/static/chunks/816-f354d55c4d7354c5.js deleted file mode 100644 index a5b6ee4..0000000 --- a/_next/static/chunks/816-f354d55c4d7354c5.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[816],{46601:function(){},89214:function(){},42480:function(){},85568:function(){},69386:function(){},31616:function(){},20131:function(){},16026:function(){},33370:function(){},98909:function(t,e,n){"use strict";n.d(e,{Bz:function(){return m},Dx:function(){return g},M5:function(){return b},Mj:function(){return S},OL:function(){return v},Rk:function(){return O},Wz:function(){return y},XJ:function(){return f},Xq:function(){return N},ZP:function(){return x},hp:function(){return w},jr:function(){return h},ls:function(){return p},sr:function(){return _},zx:function(){return A}});var r=n(3827),a=n(20996),i=n(32283),o=n(8792),l=n(64090),s=n(30298),u=n(77658),d=n(6245),c=n(97573);let g=t=>{let{children:e,className:n=""}=t;return(0,r.jsx)("div",{className:["typo-title",n].join(" "),children:e})},p=t=>{let{children:e,className:n=""}=t;return(0,r.jsx)("div",{className:["typo-hero",n].join(" "),children:e})},f=t=>{let{children:e,className:n=""}=t;return(0,r.jsx)("div",{className:["heading2",n].join(" "),children:e})},m=t=>{let{children:e,className:n="",color:a="text-typo-150"}=t;return(0,r.jsx)("div",{className:["heading8",a,n].join(" "),children:e})},h=t=>{let{children:e,className:n=""}=t;return(0,r.jsx)("div",{className:["typo-body-medium",n].join(" "),children:e})},v=t=>{let{children:e,href:n}=t;return(0,r.jsx)(o.default,{className:"text-left font-normal leading-[24px] underline",href:n,children:e})},w=t=>{let{className:e,variant:n,...a}=t;return(0,r.jsx)("button",{...a,className:["cursor-pointer rounded-full bg-bg-550 px-[8px] py-[4px] text-white hover:bg-bg-600 disabled:cursor-not-allowed disabled:bg-bg-600 disabled:text-typo-150","danger"===n?"[&]:text-danger":"",e].join(" ")})},x=t=>{let{className:e,variant:n,...a}=t;return(0,r.jsx)("button",{...a,className:["cursor-pointer rounded-full bg-transparent px-[8px] py-[4px] text-white disabled:cursor-not-allowed disabled:bg-bg-600 disabled:text-typo-150","danger"===n?"[&]:text-danger":"",e].join(" ")})},b=t=>{let{textToCopy:e}=t;return(0,r.jsx)("button",{className:"cursor-pointer",dangerouslySetInnerHTML:{__html:u.BR},onClick:()=>{navigator.clipboard.writeText(e),(0,s.Am)("Copied to clipboard",{type:"info"})}})},y=t=>{let{error:e,...n}=t;return(0,r.jsxs)("span",{className:"relative block",children:[(0,r.jsx)("input",{...n,className:["h-[96px] w-full rounded-[16px] border-[1px] bg-black p-[16px] pr-[140px] text-[48px] focus:outline-none",e?"border-danger":"border-white"].join(" ")}),(0,r.jsx)("span",{className:"absolute bottom-0 right-[12px] top-0 flex h-full items-center text-[48px] text-typo-300",children:"XION"})]})},N=t=>{let{children:e}=t;return(0,r.jsx)("div",{className:"text-danger",children:e})},_=t=>(0,r.jsx)("input",{...t,className:"h-[50px] w-full bg-black py-[8px] focus:outline-none",style:{border:"none",borderBottom:"1px solid white"}}),A=t=>{let{className:e,isLoading:n,variant:a,...i}=t;return(0,r.jsx)("button",{...i,className:["w-full rounded-[8px] px-[12px] py-[16px] text-black disabled:cursor-not-allowed","danger"===a?"text-danger disabled:text-typo-150 bg-[#D745061A]":"success"===a?"bg-success text-black disabled:bg-green-400":"bg-white text-black disabled:bg-bg-400",e||""].join(" "),disabled:n||i.disabled,children:n?(0,r.jsx)("span",{className:"flex items-center justify-center",children:(0,r.jsx)("span",{className:"animate-spin",dangerouslySetInnerHTML:{__html:u._m}})}):i.children})},O=t=>{let{children:e,className:n,id:o,modalClass:s,offset:u,placement:g,Trigger:p}=t,[f,m]=(0,l.useState)(null),{core:h}=(0,d.l)(),v=h.state.popupOpenId===o;return(0,r.jsxs)("div",{className:[n].join(" "),children:[(0,r.jsx)("button",{onClick:t=>{t.stopPropagation(),h.dispatch((0,c.h)(o))},ref:m,children:(0,r.jsx)(p,{id:o})}),v&&(0,r.jsx)(a.d,{onClickAway:()=>{v&&h.dispatch((0,c.h)(null))},children:(0,r.jsx)(i.G,{anchor:f,className:[s].join(" "),offset:u,open:v,placement:g,withTransition:!0,children:e})})]})},S=t=>(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)("div",{className:"z-5 absolute bottom-[5px] left-0",children:(0,r.jsx)("div",{dangerouslySetInnerHTML:{__html:u.yC}})}),(0,r.jsx)("input",{...t,className:"border-b-[1px] border-b-transparent bg-transparent pl-[24px] text-white outline-none hover:border-b-white focus:border-b-white"})]})},6245:function(t,e,n){"use strict";n.d(e,{l:function(){return i}});var r=n(64090),a=n(34417);let i=()=>{let t=(0,r.useRef)({}),e=(0,r.useContext)(a._);return t.current.state=e.state,t.current.dispatch=e.dispatch,{core:t.current}}},97573:function(t,e,n){"use strict";n.d(e,{I:function(){return a},h:function(){return r}});let r=t=>({content:t,type:"SET_POPUP_OPEN_ID"}),a=(t,e)=>{switch(e.type){case"SET_POPUP_OPEN_ID":return{...t,popupOpenId:e.content};case"SET_IS_LOADING_BLOCKING":return{...t,isLoadingBlocking:e.content};default:return t}}},34417:function(t,e,n){"use strict";n.d(e,{W:function(){return a},_:function(){return i}});var r=n(64090);let a={isLoadingBlocking:!1,popupOpenId:null},i=(0,r.createContext)({dispatch:()=>null,state:a})},88197:function(t,e,n){"use strict";n.d(e,{wX:function(){return b},VZ:function(){return y},Dr:function(){return O},qp:function(){return A},_5:function(){return N},xu:function(){return _}});var r=n(22840),a=n(71694),i=n(66803);let o=null,l=async t=>o||(o=(await (0,a.C_)()).staking.validators(t).then(t=>(o=null,t))),s={},u=async t=>{let e=s[t];if(e)return e;let n=(await (0,a.C_)()).staking.validator(t).then(e=>(s[t]=void 0,e.validator));return s[t]=n,n},d=null,c=async()=>d||(d=(await (0,a.C_)()).staking.pool().then(t=>(d=null,t.pool))),g=async t=>{let e=await (0,a.N$)();return await e.getBalance(t,"uxion")},p=async t=>{let e=await (0,a.C_)();return await e.staking.delegatorDelegations(t)},f=async t=>{let e=await (0,a.C_)();return await e.staking.delegatorUnbondingDelegations(t)},m=async(t,e)=>{let n=await (0,a.C_)(),o=await n.distribution.delegationRewards(t,e);return(await Promise.all(o.rewards.map(async t=>{if(0==t.denom.indexOf("ibc/")){var e;let r=await n.ibc.transfer.denomTrace(t.denom.substring(4));t.denom=(null===(e=r.denomTrace)||void 0===e?void 0:e.baseDenom)||t.denom}return t}))).filter(t=>{var e;return(null===(e=t.denom)||void 0===e?void 0:e.toUpperCase())==="UXION"}).map(t=>({amount:new r.Z(t.amount).div(new r.Z(10).pow(18)).toString(),denom:t.denom})).map(t=>(0,i.bI)(t))},h=async()=>{let t=await (0,a.C_)(),e=await t.mint.params().catch(()=>null);return(null==e?void 0:e.inflationMax)||.2};var v=n(19807),w=n(62986),x=n(39730);let b=async t=>{try{t.dispatch((0,w.Kv)(!0));let[e,n,r,a,i]=await Promise.all([l("BOND_STATUS_BONDED"),l("BOND_STATUS_UNBONDED"),l("BOND_STATUS_UNBONDING"),h(),c()]);[[e,"bonded"],[n,"unbonded"],[r,"unbonding"]].forEach(e=>{var n,r;let[a,i]=e;t.dispatch((0,w.T2)({items:a.validators,nextKey:(null===(n=a.pagination)||void 0===n?void 0:n.nextKey)||null,total:(null===(r=a.pagination)||void 0===r?void 0:r.total)||null},!0,i))}),t.dispatch((0,w.DD)(i)),t.dispatch((0,w.Km)(a.toString())),t.dispatch((0,w.Kv)(!1))}catch(t){console.error("error fetching staking data:",t)}},y=async(t,e)=>{try{var n,r,a,o;e.dispatch((0,w.Kv)(!0));let[l,s,u]=await Promise.all([g(t),p(t).then(async e=>({items:await Promise.all(e.delegationResponses.map(async e=>({balance:e.balance,rewards:await m(t,e.delegation.validatorAddress).then(t=>(0,i.HJ)(t)),validatorAddress:e.delegation.validatorAddress}))),pagination:e.pagination})),f(t).then(t=>({items:t.unbondingResponses.reduce((t,e)=>(t.push(...e.entries.map(t=>({balance:{amount:t.balance,denom:"uxion"},completionTime:Number(t.completionTime.seconds),completionTimeNanos:t.completionTime.nanos,id:t.unbondingId.toString(),validator:e.validatorAddress}))),t),[]),pagination:t.pagination})).catch(()=>({items:[],pagination:null})).then(t=>({items:t.items,pagination:t.pagination}))]);e.dispatch((0,w.d0)(l)),e.dispatch((0,w.Qx)({items:s.items,nextKey:(null===(n=s.pagination)||void 0===n?void 0:n.nextKey)||null,total:(null===(r=s.pagination)||void 0===r?void 0:r.total)||null},!0)),e.dispatch((0,w.Kg)({items:u.items,nextKey:(null===(a=u.pagination)||void 0===a?void 0:a.nextKey)||null,total:(null===(o=u.pagination)||void 0===o?void 0:o.total)||null},!0)),e.dispatch((0,w.Kv)(!1))}catch(t){console.error("error fetching staking data:",t)}},N=async(t,e,n,r,a)=>(await (0,v.H0)(t,r,e,n),async()=>{await y(t.delegator,a)}),_=async(t,e,n,r,a)=>(await (0,v.vZ)(t,r,e,n),async()=>{await y(t.delegator,a)}),A=async(t,e)=>{var n;if((null===(n=e.state.validatorDetails)||void 0===n?void 0:n.operatorAddress)===t)return e.state.validatorDetails;let r=(0,x.mM)(e.state)[t]||await u(t);return e.dispatch((0,w.gT)(r)),r},O=async(t,e)=>{let n=(0,x.mM)(e.state)[t];if(n)return n;let r=await u(t);return e.dispatch((0,w.N7)({[t]:r,...e.state.extraValidators})),r}},80469:function(t,e,n){"use strict";let r;n.d(e,{f:function(){return d},n:function(){return u}});var a=n(75615),i=n(64090),o=n(88197),l=n(62986),s=n(544);let u=()=>{let t=(0,i.useRef)({}),e=(0,i.useContext)(s.Y);t.current.state=e.state,t.current.dispatch=e.dispatch;let{data:n,isConnected:o}=(0,a.hT)(),l=null==n?void 0:n.bech32Address;return{account:n,address:l,client:o?r:void 0,isConnected:o,staking:t.current}},d=()=>{let{client:t}=(0,a.Hj)(),{address:e,isConnected:n,staking:s}=u();r=n?t:void 0,(0,i.useEffect)(()=>{(0,o.wX)(s)},[s]),(0,i.useEffect)(()=>{if(n&&e)return(0,o.VZ)(e,s),()=>{s.dispatch((0,l.kS)())}},[n,e,s])}},62986:function(t,e,n){"use strict";n.d(e,{DD:function(){return u},I6:function(){return v},Kg:function(){return l},Km:function(){return g},Kv:function(){return a},N7:function(){return p},Qx:function(){return o},T2:function(){return i},ZG:function(){return c},d0:function(){return r},gT:function(){return s},kS:function(){return d}});let r=t=>({content:t,type:"SET_TOKENS"}),a=t=>({content:t,type:"SET_IS_INFO_LOADING"}),i=(t,e,n)=>({content:t,reset:e,status:n,type:"ADD_VALIDATORS"}),o=(t,e)=>({content:t,reset:e,type:"ADD_DELEGATIONS"}),l=(t,e)=>({content:t,reset:e,type:"ADD_UNBONDINGS"}),s=t=>({content:t,type:"SET_VALIDATOR_DETAILS"}),u=t=>({content:t,type:"SET_POOL"}),d=()=>({content:null,type:"LOGOUT"}),c=t=>({content:t,type:"SET_MODAL"}),g=t=>({content:t,type:"SET_INFLATION"}),p=t=>({content:t,type:"SET_EXTRA_VALIDATORS"}),f=t=>{let e=new Set;return t.filter(t=>!e.has(t.operatorAddress)&&(e.add(t.operatorAddress),!0))},m=t=>{let e=new Set;return t.filter(t=>!e.has(t.validatorAddress)&&(e.add(t.validatorAddress),!0))},h=t=>{let e=new Set;return t.filter(t=>{let n=t.id;return!e.has(n)&&(e.add(n),!0)})},v=(t,e)=>{switch(e.type){case"SET_TOKENS":return{...t,tokens:e.content};case"ADD_VALIDATORS":{let n=!e.reset&&t.validators[e.status]||{items:[],nextKey:null,total:null};return n.total=e.content.total,n.nextKey=e.content.nextKey,n.items=f(n.items.concat(e.content.items)),{...t,validators:{...t.validators,[e.status]:n}}}case"ADD_DELEGATIONS":{let n=!e.reset&&t.delegations||{items:[],nextKey:null,total:null};return n.total=e.content.total,n.nextKey=e.content.nextKey,n.items=m(e.content.items.concat(n.items)),{...t,delegations:n}}case"ADD_UNBONDINGS":{let n=!e.reset&&t.unbondings||{items:[],nextKey:null,total:null};return n.total=e.content.total,n.nextKey=e.content.nextKey,n.items=h(e.content.items.concat(n.items)),{...t,unbondings:n}}case"SET_IS_INFO_LOADING":return{...t,isInfoLoading:e.content};case"SET_VALIDATOR_DETAILS":return{...t,validatorDetails:e.content};case"SET_POOL":return{...t,pool:e.content};case"SET_MODAL":return{...t,modal:e.content};case"LOGOUT":return{...t,delegations:null,unbondings:null};case"SET_EXTRA_VALIDATORS":return{...t,extraValidators:e.content};case"SET_INFLATION":return{...t,inflation:e.content};default:return t}}},39730:function(t,e,n){"use strict";n.d(e,{Cn:function(){return l},Sg:function(){return d},U2:function(){return i},ap:function(){return s},jc:function(){return g},jv:function(){return o},mM:function(){return c},zq:function(){return u}});var r=n(22840),a=n(66803);let i=(t,e)=>{let{delegations:n}=t;if(!(null==n?void 0:n.items.length))return null;let r=n.items.filter(t=>!e||t.validatorAddress===e).map(t=>t.balance);return(0,a.HJ)(r)},o=(t,e)=>{let{unbondings:n}=t;if(!(null==n?void 0:n.items.length))return null;let r=n.items.filter(t=>!e||t.validator===e).map(t=>t.balance);return(0,a.HJ)(r)},l=(t,e)=>{let{delegations:n}=e;if(!(null==n?void 0:n.items.length))return null;let r=n.items.filter(e=>!t||e.validatorAddress===t).map(t=>t.rewards);return(0,a.HJ)(r)},s=t=>{let{tokens:e}=t;return e?new r.Z((0,a.bI)(e).amount):null},u=(t,e)=>{var n;return!!(null===(n=e.delegations)||void 0===n?void 0:n.items.some(e=>e.validatorAddress===t))},d=(t,e)=>{let{pool:n}=e;return t&&"string"==typeof(null==n?void 0:n.bondedTokens)?new r.Z(t).div(new r.Z(n.bondedTokens)).toNumber():null},c=t=>Object.values(t.validators).map(t=>null==t?void 0:t.items).flat().reduce((t,e)=>e?{...t,[e.operatorAddress]:e}:t,t.extraValidators),g=t=>t.inflation?new r.Z(t.inflation):null},544:function(t,e,n){"use strict";n.d(e,{W:function(){return a},Y:function(){return i}});var r=n(64090);let a={delegations:null,extraValidators:{},inflation:null,isInfoLoading:!1,modal:null,pool:null,tokens:null,unbondings:null,validatorDetails:null,validators:{bonded:null,unbonded:null,unbonding:null}},i=(0,r.createContext)({dispatch:()=>null,state:a})},71694:function(t,e,n){"use strict";let r,a;n.d(e,{C_:function(){return u},N$:function(){return d},v4:function(){return c}});var i=n(18722),o=n(58015),l=n(43890),s=n(9016);let u=()=>(r||(r=(async()=>{let t=await l.Tendermint34Client.connect(s.Od);return o.QueryClient.withExtensions(t,o.setupStakingExtension,o.setupDistributionExtension,o.setupMintExtension,o.setupIbcExtension)})()),r),d=()=>(a||(a=(async()=>await o.StargateClient.connect(s.Od))()),a),c=async()=>{let t=localStorage.getItem("xion-authz-temp-account");if(!t)return;let e=await i.DirectSecp256k1HdWallet.deserialize(t,"abstraxion"),n=await e.getAccounts().then(t=>{var e;return null===(e=t[0])||void 0===e?void 0:e.address});return{client:await o.SigningStargateClient.connectWithSigner(s.Od,e),granteeAddress:n}}},66803:function(t,e,n){"use strict";n.d(e,{HJ:function(){return d},IB:function(){return i},Jp:function(){return o},UO:function(){return l},bI:function(){return a},bP:function(){return u},kw:function(){return s}});var r=n(22840);let a=t=>{var e,n,a;return(null===(e=t.denom)||void 0===e?void 0:e.toUpperCase())==="UXION"?{amount:new r.Z(t.amount).div(new r.Z(10).pow(6)).toString(),denom:"XION"}:(null===(n=t.denom)||void 0===n?void 0:n.toUpperCase())==="XION"?{amount:t.amount,denom:"XION"}:{...t,denom:null===(a=t.denom)||void 0===a?void 0:a.toUpperCase()}},i=()=>({amount:"0",denom:"XION"}),o=t=>({amount:t.toString(),denom:"XION"}),l=t=>t&&new r.Z(t.amount).gt(0),s=t=>({amount:t.div(new r.Z(10).pow(6)).toString(),denom:"XION"}),u=t=>({amount:t.times(new r.Z(10).pow(6)).toString(),denom:"UXION"}),d=t=>t.reduce((t,e)=>({amount:new r.Z(t.amount).plus(a(e).amount).toString(),denom:t.denom}),i())},9016:function(t,e,n){"use strict";n.d(e,{Ex:function(){return l},Jg:function(){return r},Mx:function(){return u},Od:function(){return i},T$:function(){return a},_H:function(){return d},c1:function(){return s},sb:function(){return o}});let r=!0,a=void 0,i="https://rpc.xion-testnet.forbole.com",o="/xion-staking",l=10,s="".concat(o,"/default-avatar.svg"),u=r?3:21,d=1e-4},77658:function(t,e,n){"use strict";n.d(e,{BR:function(){return a},GI:function(){return s},Sf:function(){return r},_m:function(){return u},cx:function(){return l},gU:function(){return i},kC:function(){return o},yC:function(){return d}});let r='',a='',i='',o='',l='',s='',u='',d=''},19807:function(t,e,n){"use strict";n.d(e,{rf:function(){return b},YY:function(){return w},sj:function(){return x},H0:function(){return h},vZ:function(){return v}});var r=n(22840),a=n(53856),i=n(62884),o=n(66803),l=n(9016),s=n(97481),u=n(71694);let d=async(t,e)=>{let{client:n,granteeAddress:r}=await (0,u.v4)()||{};if(!n||!r)return null;let a=[{typeUrl:"/cosmos.authz.v1beta1.MsgExec",value:s.MsgExec.fromPartial({grantee:r,msgs:t.map(t=>n.registry.encodeAsAny(t))})}];return await n.simulate(r,a,e).then(t=>Math.ceil(2*t).toString()).catch(t=>(console.log("debug: core/base.ts: Estimate error",t),null))},c=async t=>{let{address:e,amount:n=[{amount:"1000",denom:"uxion"}],gasLimit:r="400000",memo:a="",msgs:i}=t;return{amount:n,gas:await d(i,a).catch(()=>null)||r,granter:e}},g=t=>({amount:t.amount,denom:["UXION","XION"].includes(t.denom.toUpperCase())?t.denom.toLowerCase():t.denom}),p=t=>{if("UXION"===t.denom.toUpperCase())return g(t);if("XION"===t.denom.toUpperCase())return g((0,o.bP)(new r.Z(t.amount)));throw Error("Invalid coin denom")},f=t=>e=>{if(console.log("debug: base.ts: result",e),!e.events.find(e=>e.type===t))throw console.error(e),Error("Out of gas");return e},m=t=>{throw console.error(t),t},h=async(t,e,n,r)=>{let a=p(n),o={typeUrl:"/cosmos.staking.v1beta1.MsgDelegate",value:i.MsgDelegate.fromPartial({amount:a,delegatorAddress:t.delegator,validatorAddress:t.validator})},l=await c({address:t.delegator,memo:r,msgs:[o]});return await e.signAndBroadcast(t.delegator,[o],l,r).then(f("delegate")).catch(m)},v=async(t,e,n,r)=>{let a=p(n),o={typeUrl:"/cosmos.staking.v1beta1.MsgUndelegate",value:i.MsgUndelegate.fromPartial({amount:a,delegatorAddress:t.delegator,validatorAddress:t.validator})},l=await c({address:t.delegator,memo:r,msgs:[o]});return await e.signAndBroadcast(t.delegator,[o],l,r).then(f("unbond")).catch(m)},w=async(t,e)=>{let n=[{typeUrl:"/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward",value:a.MsgWithdrawDelegatorReward.fromPartial({delegatorAddress:t.delegator,validatorAddress:t.validator})}],r=await c({address:t.delegator,msgs:n});return await e.signAndBroadcast(t.delegator,n,r).then(f("withdraw_rewards")).catch(m)},x=t=>{let e=(0,o.bI)(t);return new r.Z(e.amount).gte(l._H)},b=async(t,e)=>{let n={typeUrl:"/cosmos.staking.v1beta1.MsgCancelUnbondingDelegation",value:i.MsgCancelUnbondingDelegation.fromPartial({delegatorAddress:t.delegator,validatorAddress:t.validator})},r=await c({address:t.delegator,msgs:[n]});return await e.signAndBroadcast(t.delegator,[n],r,"").then(t=>(console.log("debug: tx.ts: cancelUnstake: result",t),t)).catch(m)}}}]); \ No newline at end of file diff --git a/_next/static/chunks/app/layout-f8bb99b6df23ac99.js b/_next/static/chunks/app/layout-3869892885b7981f.js similarity index 95% rename from _next/static/chunks/app/layout-f8bb99b6df23ac99.js rename to _next/static/chunks/app/layout-3869892885b7981f.js index 6db3d78..1e1e6aa 100644 --- a/_next/static/chunks/app/layout-f8bb99b6df23ac99.js +++ b/_next/static/chunks/app/layout-3869892885b7981f.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[185],{18127:function(e,n,s){Promise.resolve().then(s.bind(s,56225))},56225:function(e,n,s){"use strict";s.r(n),s.d(n,{default:function(){return _}});var r=s(3827),c=s(75615);s(22754),s(25805);var l=s(30298);s(88062);var t=s(8792),i=s(9016),a=s(59115),o=s(77658),x=s(98909);let d=()=>(0,r.jsxs)("span",{className:"flex flex-row items-center gap-[8px] rounded-[8px] bg-bg-600 px-[16px] py-[18px]",children:[(0,r.jsx)("span",{dangerouslySetInnerHTML:{__html:o.gU}}),(0,r.jsx)("span",{className:"font-bold",children:"Account"})," ",(0,r.jsx)("span",{className:"rounded-[4px] bg-successBg p-[4px] text-[12px] uppercase text-success",children:i.Jg?"Testnet":"Mainnet"})]});var u=()=>{let[,e]=(0,c.dd)(),{isConnected:n}=(0,c.hT)(),{logout:s}=(0,c.Hj)();return(0,r.jsx)("div",{className:"cursor-pointer",children:n?(0,r.jsx)(x.Rk,{Trigger:d,id:"nav-account",children:(0,r.jsx)("div",{className:"flex items-center justify-center rounded-[16px] bg-bg-600 px-[24px] py-[12px]",children:(0,r.jsx)(x.hp,{className:"bg-transparent",onClick:()=>{null==s||s()},variant:"danger",children:"Log out"})})}):(0,r.jsx)(a.z,{onClick:()=>{e(!0)},children:"Log in"})})};function h(e){let{children:n}=e,[,s]=(0,c.dd)();return(0,r.jsxs)("main",{className:"flex min-h-screen flex-col items-center",children:[(0,r.jsx)("nav",{className:"flex w-full flex-row",style:{borderBottom:"1px solid #333"},children:(0,r.jsxs)("div",{className:"page-container m-auto flex h-[80px] flex-row items-center justify-between px-[16px]",children:[(0,r.jsx)("div",{children:(0,r.jsx)(t.default,{className:"cursor-pointer",href:"/",children:(0,r.jsx)("img",{alt:"Xion Logo",src:"".concat(i.sb,"/xion-logo.svg")})})}),(0,r.jsx)(u,{})]})}),n,(0,r.jsx)(c.my,{onClose:()=>{s(!1)}})]})}var p=s(64090),f=s(97573),j=s(34417);let g=e=>{let{children:n}=e,[s,c]=(0,p.useReducer)(f.I,j.W);return(0,r.jsx)(j._.Provider,{value:{dispatch:c,state:s},children:n})};var m=s(80469),v=s(62986),b=s(544);let N=e=>{let{children:n}=e;return(0,m.f)(),(0,r.jsx)(r.Fragment,{children:n})},k=e=>{let{children:n}=e,[s,c]=(0,p.useReducer)(v.I6,b.W);return(0,p.useEffect)(()=>{window.stakingContext={state:s}},[s]),(0,r.jsx)(b.Y.Provider,{value:{dispatch:c,state:s},children:(0,r.jsx)(N,{children:n})})};s(63385);let w={contracts:[],dashboardUrl:i.T$,rpcUrl:i.Od,stake:!0};function _(e){let{children:n}=e;return(0,r.jsx)("html",{lang:"en",children:(0,r.jsxs)("body",{children:[(0,r.jsx)(c.B7,{config:w,children:(0,r.jsx)(g,{children:(0,r.jsx)(k,{children:(0,r.jsx)(h,{children:n})})})}),(0,r.jsx)(l.Ix,{closeOnClick:!0})]})})}},22754:function(){},25805:function(){},88062:function(){},63385:function(){}},function(e){e.O(0,[350,218,147,228,933,852,4,816,971,69,744],function(){return e(e.s=18127)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[185],{18127:function(e,n,s){Promise.resolve().then(s.bind(s,56225))},56225:function(e,n,s){"use strict";s.r(n),s.d(n,{default:function(){return _}});var r=s(3827),c=s(75615);s(22754),s(25805);var l=s(30298);s(88062);var t=s(8792),i=s(9016),a=s(59115),o=s(77658),x=s(82012);let d=()=>(0,r.jsxs)("span",{className:"flex flex-row items-center gap-[8px] rounded-[8px] bg-bg-600 px-[16px] py-[18px]",children:[(0,r.jsx)("span",{dangerouslySetInnerHTML:{__html:o.gU}}),(0,r.jsx)("span",{className:"font-bold",children:"Account"})," ",(0,r.jsx)("span",{className:"rounded-[4px] bg-successBg p-[4px] text-[12px] uppercase text-success",children:i.Jg?"Testnet":"Mainnet"})]});var u=()=>{let[,e]=(0,c.dd)(),{isConnected:n}=(0,c.hT)(),{logout:s}=(0,c.Hj)();return(0,r.jsx)("div",{className:"cursor-pointer",children:n?(0,r.jsx)(x.Rk,{Trigger:d,id:"nav-account",children:(0,r.jsx)("div",{className:"flex items-center justify-center rounded-[16px] bg-bg-600 px-[24px] py-[12px]",children:(0,r.jsx)(x.hp,{className:"bg-transparent",onClick:()=>{null==s||s()},variant:"danger",children:"Log out"})})}):(0,r.jsx)(a.z,{onClick:()=>{e(!0)},children:"Log in"})})};function h(e){let{children:n}=e,[,s]=(0,c.dd)();return(0,r.jsxs)("main",{className:"flex min-h-screen flex-col items-center",children:[(0,r.jsx)("nav",{className:"flex w-full flex-row",style:{borderBottom:"1px solid #333"},children:(0,r.jsxs)("div",{className:"page-container m-auto flex h-[80px] flex-row items-center justify-between px-[16px]",children:[(0,r.jsx)("div",{children:(0,r.jsx)(t.default,{className:"cursor-pointer",href:"/",children:(0,r.jsx)("img",{alt:"Xion Logo",src:"".concat(i.sb,"/xion-logo.svg")})})}),(0,r.jsx)(u,{})]})}),n,(0,r.jsx)(c.my,{onClose:()=>{s(!1)}})]})}var p=s(64090),f=s(97573),j=s(34417);let g=e=>{let{children:n}=e,[s,c]=(0,p.useReducer)(f.I,j.W);return(0,r.jsx)(j._.Provider,{value:{dispatch:c,state:s},children:n})};var m=s(80469),v=s(62986),b=s(544);let N=e=>{let{children:n}=e;return(0,m.f)(),(0,r.jsx)(r.Fragment,{children:n})},k=e=>{let{children:n}=e,[s,c]=(0,p.useReducer)(v.I6,b.W);return(0,p.useEffect)(()=>{window.stakingContext={state:s}},[s]),(0,r.jsx)(b.Y.Provider,{value:{dispatch:c,state:s},children:(0,r.jsx)(N,{children:n})})};s(63385);let w={contracts:[],dashboardUrl:i.T$,rpcUrl:i.Od,stake:!0};function _(e){let{children:n}=e;return(0,r.jsx)("html",{lang:"en",children:(0,r.jsxs)("body",{children:[(0,r.jsx)(c.B7,{config:w,children:(0,r.jsx)(g,{children:(0,r.jsx)(k,{children:(0,r.jsx)(h,{children:n})})})}),(0,r.jsx)(l.Ix,{closeOnClick:!0})]})})}},22754:function(){},25805:function(){},88062:function(){},63385:function(){}},function(e){e.O(0,[350,218,147,228,933,852,4,567,971,69,744],function(){return e(e.s=18127)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/app/page-5762d3667c36ba9b.js b/_next/static/chunks/app/page-1bfffe88fc8fe4b3.js similarity index 98% rename from _next/static/chunks/app/page-5762d3667c36ba9b.js rename to _next/static/chunks/app/page-1bfffe88fc8fe4b3.js index 16a6ad5..7c6fe76 100644 --- a/_next/static/chunks/app/page-5762d3667c36ba9b.js +++ b/_next/static/chunks/app/page-1bfffe88fc8fe4b3.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[931],{67617:function(e,s,t){Promise.resolve().then(t.bind(t,64350))},64350:function(e,s,t){"use strict";t.r(s),t.d(s,{default:function(){return I}});var i=t(3827),n=t(64090),r=t(98909),a=t(80469),l=t(62948),c=t(71860),d=t(75615),o=t(62986),x=t(39730),m=t(66803),u=t(9016),j=t(19807),h=t(67497),p=t(42498);let g="absolute bottom-[24px] right-[10px] top-[24px]",v="relative flex h-full flex-col items-start gap-3 p-[24px]";var f=(0,n.memo)(()=>{let{isConnected:e}=(0,d.hT)(),{staking:s}=(0,a.n)(),[,t]=(0,d.dd)();if(!e)return(0,i.jsxs)("div",{className:"flex min-h-[212px] flex-col items-center justify-center gap-[32px] uppercase",style:{backgroundImage:"url(".concat(u.sb,"/overview-bg.png)"),borderRadius:24},children:[(0,i.jsx)(r.ls,{children:"Please Log In To View"}),(0,i.jsx)("div",{children:(0,i.jsx)(r.zx,{className:"min-w-[150px]",onClick:()=>{t(!0)},children:"Log In"})})]});let n=(0,x.U2)(s.state,null)||(0,m.IB)(),l=(0,x.Cn)(null,s.state)||(0,m.IB)(),c=(0,x.jc)(s.state),f=s.state.tokens||(0,m.IB)();return(0,i.jsxs)("div",{className:"grid min-h-[144px] flex-col items-center justify-center gap-[32px]",style:{backgroundImage:"url(".concat(u.sb,"/overview-bg.png)"),borderRadius:24,gridTemplateColumns:"1fr 1fr 1fr 1fr"},children:[(0,i.jsxs)("div",{className:v,children:[(0,i.jsx)(r.Bz,{children:"Claimable Rewards"}),(0,i.jsxs)("div",{className:"flex flex-row items-center gap-4",children:[(0,i.jsx)(r.XJ,{children:(0,h.H_)(l)}),(0,j.sj)(l)&&(0,i.jsx)(r.hp,{onClick:()=>{var e;s.dispatch((0,o.ZG)({content:{delegations:(null===(e=s.state.delegations)||void 0===e?void 0:e.items)||[]},type:"rewards"}))},children:"Claim"})]}),(0,i.jsx)(r.jr,{children:(0,h.Em)(l)}),(0,i.jsx)("div",{className:g,children:(0,i.jsx)(p.i,{})})]}),(0,i.jsxs)("div",{className:v,children:[(0,i.jsx)(r.Bz,{children:"APR"}),(0,i.jsx)(r.XJ,{children:(0,h.PV)(c)}),(0,i.jsx)("div",{className:g,children:(0,i.jsx)(p.i,{})})]}),(0,i.jsxs)("div",{className:v,children:[(0,i.jsx)(r.Bz,{children:"Delegated Amount"}),(0,i.jsx)(r.XJ,{children:(0,h.H_)(n)}),(0,i.jsx)(r.jr,{children:(0,h.Em)(n)}),(0,i.jsx)("div",{className:g,children:(0,i.jsx)(p.i,{})})]}),(0,i.jsxs)("div",{className:v,children:[(0,i.jsx)(r.Bz,{children:"Available For Delegation"}),(0,i.jsx)(r.XJ,{children:(0,h.H_)(f)}),(0,i.jsx)(r.jr,{children:(0,h.Em)(f)})]})]})}),N=t(22840),w=t(20534),b=t(143),k=t(80148),S=t(89056),y=t(26605),B=t(48074);let C={gap:"16px",gridTemplateColumns:"60px 1.5fr repeat(3, 1fr) 80px 80px"},D=e=>{let{disabled:s,onStake:t,staking:n,validator:a}=e,{identity:l}=a.description,c=(0,S.P)(l),d=(0,x.Sg)(null==a?void 0:a.tokens,n.state),o=(0,h.gg)(d);return(0,i.jsxs)("div",{className:"flex w-full flex-col items-center justify-between gap-2",children:[(0,i.jsxs)("div",{className:"grid w-full items-center justify-between gap-2 p-4",style:C,children:[(0,i.jsx)("div",{className:"flex items-center justify-start",children:(0,i.jsx)("img",{alt:"Validator logo",className:"block w-[50px] rounded-full",src:c,style:{height:50,width:50}})}),(0,i.jsxs)("div",{className:"flex flex-1 flex-row justify-start gap-4",children:[(0,i.jsxs)("div",{className:"flex flex-col justify-start gap-2 text-left",children:[(0,i.jsx)("div",{className:"text-[14px] font-bold leading-[20px]",children:a.description.moniker}),(0,i.jsx)(y.Z,{address:a.operatorAddress})]}),(0,i.jsx)("div",{className:"flex min-w-max flex-col items-center justify-center",children:(0,x.zq)(a.operatorAddress,n.state)&&(0,i.jsx)("div",{className:"rounded-[2px] bg-successBg p-[2px] text-[11px] font-medium leading-[16px] tracking-normal text-success",children:"You staked"})})]}),(0,i.jsx)("div",{className:"text-right",children:(0,i.jsx)(B.Z,{text:(0,h.Em)((0,m.kw)(new N.Z(a.tokens)),!0)})}),(0,i.jsx)("div",{className:"text-right",children:(0,h.i)(a.commission.commissionRates.rate,2)}),d&&(0,i.jsx)("div",{className:"text-right",children:o}),(0,i.jsx)("div",{className:"text-right",children:(0,i.jsx)(r.OL,{href:"/validator?address=".concat(a.operatorAddress),children:"Details"})}),t&&(0,i.jsx)("div",{children:(0,i.jsx)(r.hp,{disabled:s,onClick:t,children:"Delegate"})})]}),(0,i.jsx)("div",{className:"box-content h-[1px] bg-bg-500",style:{width:"calc(100% - 48px)"}})]})},_=b.N;var A=(0,n.memo)(()=>{var e,s,t;let{isConnected:l,staking:c}=(0,a.n)(),[d,m]=(0,n.useState)("none"),[u,j]=(0,n.useState)("active"),[h,p]=(0,n.useState)(""),{validators:g}=c.state,v=("active"===u?(null===(e=g.bonded)||void 0===e?void 0:e.items)||[]:((null===(s=g.unbonded)||void 0===s?void 0:s.items)||[]).concat((null===(t=g.unbonding)||void 0===t?void 0:t.items)||[])).filter("active"===u?e=>e.status===w.BondStatus.BOND_STATUS_BONDED:e=>e.status===(w.BondStatus.BOND_STATUS_UNBONDED||w.BondStatus.BOND_STATUS_UNBONDING)).slice().sort((e,s)=>{if("none"===d)return 0;if(["voting-power-asc","voting-power-desc"].includes(d)){let t=(0,x.Sg)(e.tokens,c.state),i=(0,x.Sg)(s.tokens,c.state);return(0,k.B)(t,i,"voting-power-asc"===d)}if(["commission-asc","commission-desc"].includes(d)){let t=parseFloat(e.commission.commissionRates.rate),i=parseFloat(s.commission.commissionRates.rate);return(0,k.B)(t,i,"commission-asc"===d)}if(["name-asc","name-desc"].includes(d)){let t=e.description.moniker.toLowerCase(),i=s.description.moniker.toLowerCase();return(0,k.B)(t,i,"name-asc"===d)}if(["staked-asc","staked-desc"].includes(d)){let t=new N.Z(e.tokens),i=new N.Z(s.tokens);return(0,k.B)(t,i,"staked-asc"===d)}return 0}).filter(e=>{if(!h)return!0;let s=e.description.moniker.toLowerCase(),t=e.operatorAddress.toLowerCase();return s.includes(h.toLowerCase())||t.includes(h.toLowerCase())});return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{className:"grid grid-cols-3",children:[(0,i.jsxs)("div",{className:"flex w-full flex-row justify-start gap-[16px]",children:[(0,i.jsx)(r.Dx,{children:"Validators"}),(0,i.jsx)(r.Mj,{onChange:e=>p(e.target.value),value:h})]}),(0,i.jsxs)("div",{className:"flex flex-row items-center justify-center gap-[40px]",children:[(0,i.jsx)("button",{onClick:()=>{j("active")},children:"Active"}),(0,i.jsx)("button",{onClick:()=>{j("inactive")},children:"Inactive"})]})]}),(0,i.jsxs)("div",{className:"min-h-[100px] overflow-hidden rounded-[24px] bg-bg-600 pb-4 text-typo-100",children:[(0,i.jsxs)("div",{className:"grid w-full items-center justify-between gap-2 bg-bg-500 p-4 uppercase",style:C,children:[(0,i.jsx)("div",{}),(0,i.jsx)(_,{onSort:m,sort:d,sorting:["name-asc","name-desc"],children:"Validator"}),(0,i.jsx)(_,{onSort:m,sort:d,sorting:["staked-asc","staked-desc"],children:(0,i.jsx)("div",{className:"text-right",children:"Staked Amount"})}),(0,i.jsx)(_,{onSort:m,sort:d,sorting:["commission-asc","commission-desc"],children:(0,i.jsx)("div",{className:"text-right",children:"Commission"})}),(0,i.jsx)(_,{onSort:m,sort:d,sorting:["voting-power-asc","voting-power-desc"],children:(0,i.jsx)("div",{className:"text-right",children:"Voting Power"})})]}),v.map(e=>(0,i.jsx)(D,{disabled:!l,onStake:"active"===u?()=>{c.dispatch((0,o.ZG)({content:{validator:e},type:"delegate"}))}:null,staking:c,validator:e},e.operatorAddress))]})]})}),I=(0,n.memo)(function(){let{staking:e}=(0,a.n)(),[s,t]=(0,n.useState)(!1),d=(0,l.S6)(e.state);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{className:"page-container flex flex-col gap-6 px-[24px] pb-[24px]",children:[(0,i.jsxs)("div",{className:"mt-[40px] flex flex-row justify-between text-left",children:[(0,i.jsx)(r.Dx,{children:"Your Staking Overview"}),d&&(0,i.jsx)(l.sv,{isShowingDetails:s,setIsShowingDetails:t})]}),(0,i.jsx)(f,{}),s&&d&&(0,i.jsx)(l.ZP,{}),(0,i.jsx)(A,{})]}),(0,i.jsx)(c.Z,{})]})})}},function(e){e.O(0,[350,218,147,228,933,4,245,816,503,971,69,744],function(){return e(e.s=67617)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[931],{67617:function(e,s,t){Promise.resolve().then(t.bind(t,64350))},64350:function(e,s,t){"use strict";t.r(s),t.d(s,{default:function(){return I}});var i=t(3827),n=t(64090),r=t(82012),a=t(80469),l=t(62948),c=t(71860),d=t(75615),o=t(62986),x=t(39730),m=t(66803),u=t(9016),j=t(19807),h=t(67497),p=t(42498);let g="absolute bottom-[24px] right-[10px] top-[24px]",v="relative flex h-full flex-col items-start gap-3 p-[24px]";var f=(0,n.memo)(()=>{let{isConnected:e}=(0,d.hT)(),{staking:s}=(0,a.n)(),[,t]=(0,d.dd)();if(!e)return(0,i.jsxs)("div",{className:"flex min-h-[212px] flex-col items-center justify-center gap-[32px] uppercase",style:{backgroundImage:"url(".concat(u.sb,"/overview-bg.png)"),borderRadius:24},children:[(0,i.jsx)(r.ls,{children:"Please Log In To View"}),(0,i.jsx)("div",{children:(0,i.jsx)(r.zx,{className:"min-w-[150px]",onClick:()=>{t(!0)},children:"Log In"})})]});let n=(0,x.U2)(s.state,null)||(0,m.IB)(),l=(0,x.Cn)(null,s.state)||(0,m.IB)(),c=(0,x.jc)(s.state),f=s.state.tokens||(0,m.IB)();return(0,i.jsxs)("div",{className:"grid min-h-[144px] flex-col items-center justify-center gap-[32px]",style:{backgroundImage:"url(".concat(u.sb,"/overview-bg.png)"),borderRadius:24,gridTemplateColumns:"1fr 1fr 1fr 1fr"},children:[(0,i.jsxs)("div",{className:v,children:[(0,i.jsx)(r.Bz,{children:"Claimable Rewards"}),(0,i.jsxs)("div",{className:"flex flex-row items-center gap-4",children:[(0,i.jsx)(r.XJ,{children:(0,h.H_)(l)}),(0,j.sj)(l)&&(0,i.jsx)(r.hp,{onClick:()=>{var e;s.dispatch((0,o.ZG)({content:{delegations:(null===(e=s.state.delegations)||void 0===e?void 0:e.items)||[]},type:"rewards"}))},children:"Claim"})]}),(0,i.jsx)(r.jr,{children:(0,h.Em)(l)}),(0,i.jsx)("div",{className:g,children:(0,i.jsx)(p.i,{})})]}),(0,i.jsxs)("div",{className:v,children:[(0,i.jsx)(r.Bz,{children:"APR"}),(0,i.jsx)(r.XJ,{children:(0,h.PV)(c)}),(0,i.jsx)("div",{className:g,children:(0,i.jsx)(p.i,{})})]}),(0,i.jsxs)("div",{className:v,children:[(0,i.jsx)(r.Bz,{children:"Delegated Amount"}),(0,i.jsx)(r.XJ,{children:(0,h.H_)(n)}),(0,i.jsx)(r.jr,{children:(0,h.Em)(n)}),(0,i.jsx)("div",{className:g,children:(0,i.jsx)(p.i,{})})]}),(0,i.jsxs)("div",{className:v,children:[(0,i.jsx)(r.Bz,{children:"Available For Delegation"}),(0,i.jsx)(r.XJ,{children:(0,h.H_)(f)}),(0,i.jsx)(r.jr,{children:(0,h.Em)(f)})]})]})}),N=t(22840),w=t(20534),b=t(143),k=t(80148),S=t(89056),y=t(26605),B=t(48074);let C={gap:"16px",gridTemplateColumns:"60px 1.5fr repeat(3, 1fr) 80px 80px"},D=e=>{let{disabled:s,onStake:t,staking:n,validator:a}=e,{identity:l}=a.description,c=(0,S.P)(l),d=(0,x.Sg)(null==a?void 0:a.tokens,n.state),o=(0,h.gg)(d);return(0,i.jsxs)("div",{className:"flex w-full flex-col items-center justify-between gap-2",children:[(0,i.jsxs)("div",{className:"grid w-full items-center justify-between gap-2 p-4",style:C,children:[(0,i.jsx)("div",{className:"flex items-center justify-start",children:(0,i.jsx)("img",{alt:"Validator logo",className:"block w-[50px] rounded-full",src:c,style:{height:50,width:50}})}),(0,i.jsxs)("div",{className:"flex flex-1 flex-row justify-start gap-4",children:[(0,i.jsxs)("div",{className:"flex flex-col justify-start gap-2 text-left",children:[(0,i.jsx)("div",{className:"text-[14px] font-bold leading-[20px]",children:a.description.moniker}),(0,i.jsx)(y.Z,{address:a.operatorAddress})]}),(0,i.jsx)("div",{className:"flex min-w-max flex-col items-center justify-center",children:(0,x.zq)(a.operatorAddress,n.state)&&(0,i.jsx)("div",{className:"rounded-[2px] bg-successBg p-[2px] text-[11px] font-medium leading-[16px] tracking-normal text-success",children:"You staked"})})]}),(0,i.jsx)("div",{className:"text-right",children:(0,i.jsx)(B.Z,{text:(0,h.Em)((0,m.kw)(new N.Z(a.tokens)),!0)})}),(0,i.jsx)("div",{className:"text-right",children:(0,h.i)(a.commission.commissionRates.rate,2)}),d&&(0,i.jsx)("div",{className:"text-right",children:o}),(0,i.jsx)("div",{className:"text-right",children:(0,i.jsx)(r.OL,{href:"/validator?address=".concat(a.operatorAddress),children:"Details"})}),t&&(0,i.jsx)("div",{children:(0,i.jsx)(r.hp,{disabled:s,onClick:t,children:"Delegate"})})]}),(0,i.jsx)("div",{className:"box-content h-[1px] bg-bg-500",style:{width:"calc(100% - 48px)"}})]})},_=b.N;var A=(0,n.memo)(()=>{var e,s,t;let{isConnected:l,staking:c}=(0,a.n)(),[d,m]=(0,n.useState)("none"),[u,j]=(0,n.useState)("active"),[h,p]=(0,n.useState)(""),{validators:g}=c.state,v=("active"===u?(null===(e=g.bonded)||void 0===e?void 0:e.items)||[]:((null===(s=g.unbonded)||void 0===s?void 0:s.items)||[]).concat((null===(t=g.unbonding)||void 0===t?void 0:t.items)||[])).filter("active"===u?e=>e.status===w.BondStatus.BOND_STATUS_BONDED:e=>e.status===(w.BondStatus.BOND_STATUS_UNBONDED||w.BondStatus.BOND_STATUS_UNBONDING)).slice().sort((e,s)=>{if("none"===d)return 0;if(["voting-power-asc","voting-power-desc"].includes(d)){let t=(0,x.Sg)(e.tokens,c.state),i=(0,x.Sg)(s.tokens,c.state);return(0,k.B)(t,i,"voting-power-asc"===d)}if(["commission-asc","commission-desc"].includes(d)){let t=parseFloat(e.commission.commissionRates.rate),i=parseFloat(s.commission.commissionRates.rate);return(0,k.B)(t,i,"commission-asc"===d)}if(["name-asc","name-desc"].includes(d)){let t=e.description.moniker.toLowerCase(),i=s.description.moniker.toLowerCase();return(0,k.B)(t,i,"name-asc"===d)}if(["staked-asc","staked-desc"].includes(d)){let t=new N.Z(e.tokens),i=new N.Z(s.tokens);return(0,k.B)(t,i,"staked-asc"===d)}return 0}).filter(e=>{if(!h)return!0;let s=e.description.moniker.toLowerCase(),t=e.operatorAddress.toLowerCase();return s.includes(h.toLowerCase())||t.includes(h.toLowerCase())});return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{className:"grid grid-cols-3",children:[(0,i.jsxs)("div",{className:"flex w-full flex-row justify-start gap-[16px]",children:[(0,i.jsx)(r.Dx,{children:"Validators"}),(0,i.jsx)(r.Mj,{onChange:e=>p(e.target.value),value:h})]}),(0,i.jsxs)("div",{className:"flex flex-row items-center justify-center gap-[40px]",children:[(0,i.jsx)("button",{onClick:()=>{j("active")},children:"Active"}),(0,i.jsx)("button",{onClick:()=>{j("inactive")},children:"Inactive"})]})]}),(0,i.jsxs)("div",{className:"min-h-[100px] overflow-hidden rounded-[24px] bg-bg-600 pb-4 text-typo-100",children:[(0,i.jsxs)("div",{className:"grid w-full items-center justify-between gap-2 bg-bg-500 p-4 uppercase",style:C,children:[(0,i.jsx)("div",{}),(0,i.jsx)(_,{onSort:m,sort:d,sorting:["name-asc","name-desc"],children:"Validator"}),(0,i.jsx)(_,{onSort:m,sort:d,sorting:["staked-asc","staked-desc"],children:(0,i.jsx)("div",{className:"text-right",children:"Staked Amount"})}),(0,i.jsx)(_,{onSort:m,sort:d,sorting:["commission-asc","commission-desc"],children:(0,i.jsx)("div",{className:"text-right",children:"Commission"})}),(0,i.jsx)(_,{onSort:m,sort:d,sorting:["voting-power-asc","voting-power-desc"],children:(0,i.jsx)("div",{className:"text-right",children:"Voting Power"})})]}),v.map(e=>(0,i.jsx)(D,{disabled:!l,onStake:"active"===u?()=>{c.dispatch((0,o.ZG)({content:{validator:e},type:"delegate"}))}:null,staking:c,validator:e},e.operatorAddress))]})]})}),I=(0,n.memo)(function(){let{staking:e}=(0,a.n)(),[s,t]=(0,n.useState)(!1),d=(0,l.S6)(e.state);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{className:"page-container flex flex-col gap-6 px-[24px] pb-[24px]",children:[(0,i.jsxs)("div",{className:"mt-[40px] flex flex-row justify-between text-left",children:[(0,i.jsx)(r.Dx,{children:"Your Staking Overview"}),d&&(0,i.jsx)(l.sv,{isShowingDetails:s,setIsShowingDetails:t})]}),(0,i.jsx)(f,{}),s&&d&&(0,i.jsx)(l.ZP,{}),(0,i.jsx)(A,{})]}),(0,i.jsx)(c.Z,{})]})})}},function(e){e.O(0,[350,218,147,228,933,4,245,567,503,971,69,744],function(){return e(e.s=67617)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/app/validator/page-8e618c838be80245.js b/_next/static/chunks/app/validator/page-8e618c838be80245.js deleted file mode 100644 index 0663c65..0000000 --- a/_next/static/chunks/app/validator/page-8e618c838be80245.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[276],{90858:function(e,s,i){Promise.resolve().then(i.bind(i,66355))},66355:function(e,s,i){"use strict";i.r(s),i.d(s,{default:function(){return B}});var l=i(3827),t=i(59115),a=i(22840),n=i(20534),d=i(8792),c=i(15313),r=i(64090),x=i(98909),o=i(6245),h=i(88197),m=i(80469),p=i(62986),j=i(39730),v=i(89056),u=i(66803),g=i(9016),N=i(67497),b=i(42498),f=i(71860),w=i(75615),k=i(62948);function z(){let e=(0,c.useSearchParams)().get("address"),s=(0,m.n)(),{core:i}=(0,o.l)(),[,t]=(0,w.dd)(),[n,d]=(0,r.useState)(!1),{isConnected:v,staking:g}=s,{isLoadingBlocking:f}=i.state,[z,B]=(0,r.useState)(null);if((0,r.useEffect)(()=>{(async()=>{e&&B(await (0,h.qp)(e,g))})()},[e,g]),!z)return(0,l.jsx)("div",{children:"Loading ..."});let S=(0,j.ap)(g.state),y=(0,j.U2)(g.state,null),C=(0,j.jv)(g.state,null),_=(0,j.Cn)(z.operatorAddress,g.state),X=(0,k.S6)(g.state),D=v?(0,l.jsxs)("div",{className:"grid grid-cols-4 rounded-[24px] bg-bg-600 p-[24px]",children:[(0,l.jsxs)("div",{className:"relative",children:[(0,l.jsx)(x.Bz,{children:"Claimable Rewards"}),(0,l.jsxs)("div",{className:"mb-[8px] mt-[12px] flex flex-row items-center gap-[8px]",children:[(0,l.jsx)(x.XJ,{children:(0,N.H_)(_)}),_&&(null==_?void 0:_.amount)!=="0"&&(0,l.jsx)(x.hp,{disabled:f,onClick:()=>{var e;g.dispatch((0,p.ZG)({content:{delegations:(null===(e=g.state.delegations)||void 0===e?void 0:e.items)||[]},type:"rewards"}))},children:"Claim"})]}),(0,l.jsx)("div",{className:"absolute bottom-0 right-[20px] top-0",children:(0,l.jsx)(b.i,{})})]}),(0,l.jsxs)("div",{className:"relative",children:[(0,l.jsx)(x.Bz,{children:"My Delegation (XION)"}),(0,l.jsx)("div",{className:"mb-[8px] mt-[12px]",children:y&&(0,l.jsx)(x.XJ,{children:(0,N.HS)(new a.Z(y.amount))})}),(0,l.jsx)(x.Bz,{children:(0,N.H_)(y)}),(0,l.jsx)("div",{className:"absolute bottom-0 right-[20px] top-0",children:(0,l.jsx)(b.i,{})})]}),(0,l.jsx)("div",{className:"flex flex-row gap-[16px]",children:(0,l.jsxs)("div",{className:"relative w-full",children:[(0,l.jsx)(x.Bz,{children:"Available For Delegation (XION)"}),(0,l.jsx)("div",{className:"mb-[8px] mt-[12px]",children:(0,l.jsx)(x.XJ,{children:S?(0,N.HS)(S):"-"})}),(0,l.jsx)(x.Bz,{children:S?(0,N.H_)((0,u.Jp)(S)):"-"}),(0,l.jsx)("div",{className:"absolute bottom-0 right-[20px] top-0",children:(0,l.jsx)(b.i,{})})]})}),(0,l.jsx)("div",{className:"flex flex-row gap-[16px]",children:(0,l.jsxs)("div",{children:[(0,l.jsx)(x.Bz,{children:"Unstakings (XION)"}),(0,l.jsx)("div",{className:"mb-[8px] mt-[12px]",children:(0,l.jsx)(x.XJ,{children:C?(0,N.HS)(new a.Z(C.amount)):"-"})}),(0,l.jsx)(x.Bz,{children:C?(0,N.H_)(C):"-"})]})})]}):(0,l.jsxs)("div",{className:"flex h-[220px] flex-col items-center justify-center gap-[32px] rounded-[24px] bg-bg-600 uppercase",children:[(0,l.jsx)(x.ls,{children:"Please log in to view"}),(0,l.jsx)("div",{children:(0,l.jsx)(x.zx,{className:"[&]:min-w-[150px]",disabled:f,onClick:()=>{t(!0)},children:"Log in"})})]});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"mb-[24px] mt-[32px] flex flex-row items-center justify-between",children:[(0,l.jsx)(x.Dx,{children:"My Delegations"}),X&&(0,l.jsx)(k.sv,{isShowingDetails:n,setIsShowingDetails:d})]}),D,X&&n&&(0,l.jsx)(k.ZP,{})]})}function B(){let e=(0,c.useSearchParams)().get("address"),s=(0,m.n)(),{core:i}=(0,o.l)(),{isLoadingBlocking:w}=i.state,[k,B]=(0,r.useState)(null),S=(0,v.P)(null==k?void 0:k.description.identity);if((0,r.useEffect)(()=>{(async()=>{e&&B(await (0,h.qp)(e,s.staking))})()},[e,s]),!k)return(0,l.jsx)("div",{children:"Loading ..."});let y=(0,j.Sg)(k.tokens,s.staking.state),C=(0,N.gg)(y),_=new a.Z(k.tokens).div(new a.Z(10).pow(6)),X=(0,j.U2)(s.staking.state,k.operatorAddress),D=(0,j.zq)(k.operatorAddress,s.staking.state);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"page-container flex w-full flex-col gap-[16px] px-[16px] pb-[32px]",children:[(0,l.jsxs)("div",{className:"mb-[32px] mt-[40px]",children:[(0,l.jsx)(x.OL,{href:"/",children:"STAKING"})," ","> ",(0,l.jsx)("span",{children:k.description.moniker})]}),(0,l.jsxs)("div",{className:"flex flex-col gap-[24px] p-[24px]",style:{backgroundImage:"url(".concat(g.sb,"/overview-bg.png)"),backgroundSize:"cover",borderRadius:16},children:[(0,l.jsxs)("div",{className:"flex flex-row items-center gap-[16px]",children:[(0,l.jsx)("img",{alt:"Validator logo",className:"block w-[80px] rounded-full",src:S||g.c1}),(0,l.jsxs)("div",{className:"flex flex-1 items-center gap-[16px]",children:[(0,l.jsx)("div",{className:"typo-validator-name",children:k.description.moniker||""}),D&&(0,l.jsx)("div",{className:"rounded-[4px] bg-successBg px-[8px] py-[4px] text-[11px] text-success",children:"You staked"})]}),k.status===n.BondStatus.BOND_STATUS_BONDED&&(0,l.jsx)("div",{children:(0,l.jsx)(t.z,{disabled:!s.isConnected||w,onClick:()=>{s.staking.dispatch((0,p.ZG)({content:{validator:k},type:"delegate"}))},children:"DELEGATE NOW"})})]}),(0,l.jsx)(b.I,{}),(0,l.jsxs)("div",{className:"grid grid-cols-4",children:[(0,l.jsxs)("div",{className:"relative",children:[(0,l.jsx)(x.Bz,{children:"Total Stake (XION)"}),(0,l.jsx)("div",{className:"mb-[8px] mt-[12px]",children:(0,l.jsx)(x.XJ,{children:(0,N.HS)(_)})}),(0,l.jsx)(x.Bz,{children:(0,N.H_)((0,u.Jp)(_))}),(0,l.jsx)("div",{className:"absolute bottom-0 right-[20px] top-0",children:(0,l.jsx)(b.i,{})})]}),(0,l.jsxs)("div",{className:"relative",children:[(0,l.jsx)(x.Bz,{children:"Commission Rate"}),(0,l.jsx)("div",{className:"mb-[8px] mt-[12px]",children:(0,l.jsx)(x.XJ,{children:(0,N.i)(k.commission.commissionRates.rate,2)})}),(0,l.jsx)("div",{className:"absolute bottom-0 right-[20px] top-0",children:(0,l.jsx)(b.i,{})})]}),(0,l.jsxs)("div",{className:"relative",children:[(0,l.jsx)(x.Bz,{children:"Voting Power"}),(0,l.jsx)("div",{className:"mb-[8px] mt-[12px]",children:(0,l.jsx)(x.XJ,{children:C})}),(0,l.jsx)("div",{className:"absolute bottom-0 right-[20px] top-0",children:(0,l.jsx)(b.i,{})})]}),(0,l.jsxs)("div",{className:"relative",children:[(0,l.jsx)(x.Bz,{children:"My Delegation (XION)"}),(0,l.jsx)("div",{className:"mb-[8px] mt-[12px]",children:(0,l.jsx)(x.XJ,{children:X?(0,N.HS)(new a.Z((0,u.bI)(X).amount)):"-"})}),(0,l.jsx)(x.Bz,{children:(0,N.H_)(X)})]})]}),(0,l.jsx)(b.I,{}),(0,l.jsxs)("div",{className:"grid grid-cols-4",children:[(0,l.jsxs)("div",{className:"col-span-2",children:[(0,l.jsx)(x.Bz,{color:"text-white",children:"XION Address"}),(0,l.jsxs)("div",{className:"inline-flex flex-row gap-2 break-all",children:[k.operatorAddress," ",(0,l.jsx)(x.M5,{textToCopy:k.operatorAddress})]})]}),k.description.website&&(0,l.jsxs)("div",{children:[(0,l.jsx)(x.Bz,{color:"text-white",children:"Website"}),(0,l.jsx)(d.default,{href:k.description.website,target:"_blank",children:k.description.website})]}),k.description.securityContact&&(0,l.jsxs)("div",{children:[(0,l.jsx)(x.Bz,{color:"text-white",children:"Security Contact"}),(0,l.jsx)(d.default,{href:"mailto:".concat(k.description.securityContact),children:k.description.securityContact})]})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(x.Bz,{color:"text-white",children:"Details"}),(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{children:k.description.details}),(0,l.jsxs)("div",{children:["Max Commission Rate:"," ",(0,N.i)(k.commission.commissionRates.maxRate,0)]}),(0,l.jsxs)("div",{children:["Max commission Change Rate:"," ",(0,N.i)(k.commission.commissionRates.maxChangeRate,0)]})]})]})]}),(0,l.jsx)(z,{})]}),(0,l.jsx)(f.Z,{})]})}}},function(e){e.O(0,[350,218,147,228,933,4,245,816,503,971,69,744],function(){return e(e.s=90858)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/app/validator/page-ee9dd284c1466810.js b/_next/static/chunks/app/validator/page-ee9dd284c1466810.js new file mode 100644 index 0000000..1ff1f54 --- /dev/null +++ b/_next/static/chunks/app/validator/page-ee9dd284c1466810.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[276],{90858:function(e,s,i){Promise.resolve().then(i.bind(i,66355))},66355:function(e,s,i){"use strict";i.r(s),i.d(s,{default:function(){return z}});var l=i(3827),t=i(59115),a=i(22840),n=i(20534),d=i(8792),c=i(15313),r=i(64090),x=i(82012),o=i(88197),h=i(80469),m=i(62986),p=i(39730),j=i(89056),v=i(66803),u=i(9016),g=i(67497),N=i(42498),b=i(71860),f=i(75615),w=i(62948);function k(){let e=(0,c.useSearchParams)().get("address"),s=(0,h.n)(),[,i]=(0,f.dd)(),[t,n]=(0,r.useState)(!1),{isConnected:d,staking:j}=s,[u,b]=(0,r.useState)(null);if((0,r.useEffect)(()=>{(async()=>{e&&b(await (0,o.qp)(e,j))})()},[e,j]),!u)return(0,l.jsx)("div",{children:"Loading ..."});let k=(0,p.ap)(j.state),z=(0,p.U2)(j.state,null),B=(0,p.jv)(j.state,null),S=(0,p.Cn)(u.operatorAddress,j.state),y=(0,w.S6)(j.state),C=d?(0,l.jsxs)("div",{className:"grid grid-cols-4 rounded-[24px] bg-bg-600 p-[24px]",children:[(0,l.jsxs)("div",{className:"relative",children:[(0,l.jsx)(x.Bz,{children:"Claimable Rewards"}),(0,l.jsxs)("div",{className:"mb-[8px] mt-[12px] flex flex-row items-center gap-[8px]",children:[(0,l.jsx)(x.XJ,{children:(0,g.H_)(S)}),S&&(null==S?void 0:S.amount)!=="0"&&(0,l.jsx)(x.hp,{onClick:()=>{var e;j.dispatch((0,m.ZG)({content:{delegations:(null===(e=j.state.delegations)||void 0===e?void 0:e.items)||[]},type:"rewards"}))},children:"Claim"})]}),(0,l.jsx)("div",{className:"absolute bottom-0 right-[20px] top-0",children:(0,l.jsx)(N.i,{})})]}),(0,l.jsxs)("div",{className:"relative",children:[(0,l.jsx)(x.Bz,{children:"My Delegation (XION)"}),(0,l.jsx)("div",{className:"mb-[8px] mt-[12px]",children:z&&(0,l.jsx)(x.XJ,{children:(0,g.HS)(new a.Z(z.amount))})}),(0,l.jsx)(x.Bz,{children:(0,g.H_)(z)}),(0,l.jsx)("div",{className:"absolute bottom-0 right-[20px] top-0",children:(0,l.jsx)(N.i,{})})]}),(0,l.jsx)("div",{className:"flex flex-row gap-[16px]",children:(0,l.jsxs)("div",{className:"relative w-full",children:[(0,l.jsx)(x.Bz,{children:"Available For Delegation (XION)"}),(0,l.jsx)("div",{className:"mb-[8px] mt-[12px]",children:(0,l.jsx)(x.XJ,{children:k?(0,g.HS)(k):"-"})}),(0,l.jsx)(x.Bz,{children:k?(0,g.H_)((0,v.Jp)(k)):"-"}),(0,l.jsx)("div",{className:"absolute bottom-0 right-[20px] top-0",children:(0,l.jsx)(N.i,{})})]})}),(0,l.jsx)("div",{className:"flex flex-row gap-[16px]",children:(0,l.jsxs)("div",{children:[(0,l.jsx)(x.Bz,{children:"Unstakings (XION)"}),(0,l.jsx)("div",{className:"mb-[8px] mt-[12px]",children:(0,l.jsx)(x.XJ,{children:B?(0,g.HS)(new a.Z(B.amount)):"-"})}),(0,l.jsx)(x.Bz,{children:B?(0,g.H_)(B):"-"})]})})]}):(0,l.jsxs)("div",{className:"flex h-[220px] flex-col items-center justify-center gap-[32px] rounded-[24px] bg-bg-600 uppercase",children:[(0,l.jsx)(x.ls,{children:"Please log in to view"}),(0,l.jsx)("div",{children:(0,l.jsx)(x.zx,{className:"[&]:min-w-[150px]",onClick:()=>{i(!0)},children:"Log in"})})]});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"mb-[24px] mt-[32px] flex flex-row items-center justify-between",children:[(0,l.jsx)(x.Dx,{children:"My Delegations"}),y&&(0,l.jsx)(w.sv,{isShowingDetails:t,setIsShowingDetails:n})]}),C,y&&t&&(0,l.jsx)(w.ZP,{})]})}function z(){let e=(0,c.useSearchParams)().get("address"),s=(0,h.n)(),[i,f]=(0,r.useState)(null),w=(0,j.P)(null==i?void 0:i.description.identity);if((0,r.useEffect)(()=>{(async()=>{e&&f(await (0,o.qp)(e,s.staking))})()},[e,s]),!i)return(0,l.jsx)("div",{children:"Loading ..."});let z=(0,p.Sg)(i.tokens,s.staking.state),B=(0,g.gg)(z),S=new a.Z(i.tokens).div(new a.Z(10).pow(6)),y=(0,p.U2)(s.staking.state,i.operatorAddress),C=(0,p.zq)(i.operatorAddress,s.staking.state);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"page-container flex w-full flex-col gap-[16px] px-[16px] pb-[32px]",children:[(0,l.jsxs)("div",{className:"mb-[32px] mt-[40px]",children:[(0,l.jsx)(x.OL,{href:"/",children:"STAKING"})," ","> ",(0,l.jsx)("span",{children:i.description.moniker})]}),(0,l.jsxs)("div",{className:"flex flex-col gap-[24px] p-[24px]",style:{backgroundImage:"url(".concat(u.sb,"/overview-bg.png)"),backgroundSize:"cover",borderRadius:16},children:[(0,l.jsxs)("div",{className:"flex flex-row items-center gap-[16px]",children:[(0,l.jsx)("img",{alt:"Validator logo",className:"block w-[80px] rounded-full",src:w||u.c1}),(0,l.jsxs)("div",{className:"flex flex-1 items-center gap-[16px]",children:[(0,l.jsx)("div",{className:"typo-validator-name",children:i.description.moniker||""}),C&&(0,l.jsx)("div",{className:"rounded-[4px] bg-successBg px-[8px] py-[4px] text-[11px] text-success",children:"You staked"})]}),i.status===n.BondStatus.BOND_STATUS_BONDED&&(0,l.jsx)("div",{children:(0,l.jsx)(t.z,{disabled:!s.isConnected,onClick:()=>{s.staking.dispatch((0,m.ZG)({content:{validator:i},type:"delegate"}))},children:"DELEGATE NOW"})})]}),(0,l.jsx)(N.I,{}),(0,l.jsxs)("div",{className:"grid grid-cols-4",children:[(0,l.jsxs)("div",{className:"relative",children:[(0,l.jsx)(x.Bz,{children:"Total Stake (XION)"}),(0,l.jsx)("div",{className:"mb-[8px] mt-[12px]",children:(0,l.jsx)(x.XJ,{children:(0,g.HS)(S)})}),(0,l.jsx)(x.Bz,{children:(0,g.H_)((0,v.Jp)(S))}),(0,l.jsx)("div",{className:"absolute bottom-0 right-[20px] top-0",children:(0,l.jsx)(N.i,{})})]}),(0,l.jsxs)("div",{className:"relative",children:[(0,l.jsx)(x.Bz,{children:"Commission Rate"}),(0,l.jsx)("div",{className:"mb-[8px] mt-[12px]",children:(0,l.jsx)(x.XJ,{children:(0,g.i)(i.commission.commissionRates.rate,2)})}),(0,l.jsx)("div",{className:"absolute bottom-0 right-[20px] top-0",children:(0,l.jsx)(N.i,{})})]}),(0,l.jsxs)("div",{className:"relative",children:[(0,l.jsx)(x.Bz,{children:"Voting Power"}),(0,l.jsx)("div",{className:"mb-[8px] mt-[12px]",children:(0,l.jsx)(x.XJ,{children:B})}),(0,l.jsx)("div",{className:"absolute bottom-0 right-[20px] top-0",children:(0,l.jsx)(N.i,{})})]}),(0,l.jsxs)("div",{className:"relative",children:[(0,l.jsx)(x.Bz,{children:"My Delegation (XION)"}),(0,l.jsx)("div",{className:"mb-[8px] mt-[12px]",children:(0,l.jsx)(x.XJ,{children:y?(0,g.HS)(new a.Z((0,v.bI)(y).amount)):"-"})}),(0,l.jsx)(x.Bz,{children:(0,g.H_)(y)})]})]}),(0,l.jsx)(N.I,{}),(0,l.jsxs)("div",{className:"grid grid-cols-4",children:[(0,l.jsxs)("div",{className:"col-span-2",children:[(0,l.jsx)(x.Bz,{color:"text-white",children:"XION Address"}),(0,l.jsxs)("div",{className:"inline-flex flex-row gap-2 break-all",children:[i.operatorAddress," ",(0,l.jsx)(x.M5,{textToCopy:i.operatorAddress})]})]}),i.description.website&&(0,l.jsxs)("div",{children:[(0,l.jsx)(x.Bz,{color:"text-white",children:"Website"}),(0,l.jsx)(d.default,{href:i.description.website,target:"_blank",children:i.description.website})]}),i.description.securityContact&&(0,l.jsxs)("div",{children:[(0,l.jsx)(x.Bz,{color:"text-white",children:"Security Contact"}),(0,l.jsx)(d.default,{href:"mailto:".concat(i.description.securityContact),children:i.description.securityContact})]})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(x.Bz,{color:"text-white",children:"Details"}),(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{children:i.description.details}),(0,l.jsxs)("div",{children:["Max Commission Rate:"," ",(0,g.i)(i.commission.commissionRates.maxRate,0)]}),(0,l.jsxs)("div",{children:["Max commission Change Rate:"," ",(0,g.i)(i.commission.commissionRates.maxChangeRate,0)]})]})]})]}),(0,l.jsx)(k,{})]}),(0,l.jsx)(b.Z,{})]})}}},function(e){e.O(0,[350,218,147,228,933,4,245,567,503,971,69,744],function(){return e(e.s=90858)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/index.html b/index.html index 7c9c464..4f37a10 100644 --- a/index.html +++ b/index.html @@ -1 +1 @@ -XION Staking
Your Staking Overview
Please Log In To View
Validators
Validator
Staked Amount
Commission
Voting Power
\ No newline at end of file +XION Staking
Your Staking Overview
Please Log In To View
Validators
Validator
Staked Amount
Commission
Voting Power
\ No newline at end of file diff --git a/index.txt b/index.txt index f4e05f1..e9bd78e 100644 --- a/index.txt +++ b/index.txt @@ -1,7 +1,7 @@ -2:I[64350,["350","static/chunks/68b159eb-f350a487f88c1bfb.js","218","static/chunks/aaea2bcf-4abc2b343ea41dae.js","147","static/chunks/6468630d-7fefcf7a3223f2f0.js","228","static/chunks/77693919-7b92b10f5ae0e31c.js","933","static/chunks/5ebe7343-e8d67ddb6cca8663.js","4","static/chunks/4-f9ab361db4f4f038.js","245","static/chunks/245-8266bc6575a22c44.js","816","static/chunks/816-f354d55c4d7354c5.js","503","static/chunks/503-6166f7bdb0bab8f4.js","931","static/chunks/app/page-5762d3667c36ba9b.js"],""] -3:I[56225,["350","static/chunks/68b159eb-f350a487f88c1bfb.js","218","static/chunks/aaea2bcf-4abc2b343ea41dae.js","147","static/chunks/6468630d-7fefcf7a3223f2f0.js","228","static/chunks/77693919-7b92b10f5ae0e31c.js","933","static/chunks/5ebe7343-e8d67ddb6cca8663.js","4","static/chunks/4-f9ab361db4f4f038.js","816","static/chunks/816-f354d55c4d7354c5.js","185","static/chunks/app/layout-f8bb99b6df23ac99.js"],""] +2:I[64350,["350","static/chunks/68b159eb-f350a487f88c1bfb.js","218","static/chunks/aaea2bcf-4abc2b343ea41dae.js","147","static/chunks/6468630d-7fefcf7a3223f2f0.js","228","static/chunks/77693919-7b92b10f5ae0e31c.js","933","static/chunks/5ebe7343-e8d67ddb6cca8663.js","4","static/chunks/4-9f7a960e3a7653fa.js","245","static/chunks/245-8266bc6575a22c44.js","567","static/chunks/567-52b253322bfdeb49.js","503","static/chunks/503-376cbc65515ee87c.js","931","static/chunks/app/page-1bfffe88fc8fe4b3.js"],""] +3:I[56225,["350","static/chunks/68b159eb-f350a487f88c1bfb.js","218","static/chunks/aaea2bcf-4abc2b343ea41dae.js","147","static/chunks/6468630d-7fefcf7a3223f2f0.js","228","static/chunks/77693919-7b92b10f5ae0e31c.js","933","static/chunks/5ebe7343-e8d67ddb6cca8663.js","4","static/chunks/4-9f7a960e3a7653fa.js","567","static/chunks/567-52b253322bfdeb49.js","185","static/chunks/app/layout-3869892885b7981f.js"],""] 4:I[5613,[],""] 5:I[31778,[],""] -0:["WyQ_gkUilFLI8ibobnbav",[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],["",{"children":["__PAGE__",{},["$L1",["$","$L2",null,{}],null]]},[null,["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children"],"loading":"$undefined","loadingStyles":"$undefined","loadingScripts":"$undefined","hasLoading":false,"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],"params":{}}],null]],[[["$","link","0",{"rel":"stylesheet","href":"/xion-staking/_next/static/css/8e69049fa282e630.css","precedence":"next","crossOrigin":""}],["$","link","1",{"rel":"stylesheet","href":"/xion-staking/_next/static/css/9e20252c6882c039.css","precedence":"next","crossOrigin":""}]],"$L6"]]]] +0:["O31cwiSF3TCFP9vhWphOF",[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],["",{"children":["__PAGE__",{},["$L1",["$","$L2",null,{}],null]]},[null,["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children"],"loading":"$undefined","loadingStyles":"$undefined","loadingScripts":"$undefined","hasLoading":false,"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],"params":{}}],null]],[[["$","link","0",{"rel":"stylesheet","href":"/xion-staking/_next/static/css/8e69049fa282e630.css","precedence":"next","crossOrigin":""}],["$","link","1",{"rel":"stylesheet","href":"/xion-staking/_next/static/css/9e20252c6882c039.css","precedence":"next","crossOrigin":""}]],"$L6"]]]] 6:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"XION Staking"}],["$","link","3",{"rel":"icon","href":"/xion-staking/favicon.ico","type":"image/x-icon","sizes":"16x16"}]] 1:null diff --git a/validator.html b/validator.html index e35208e..e9f3d94 100644 --- a/validator.html +++ b/validator.html @@ -1 +1 @@ -XION Validator Details
\ No newline at end of file +XION Validator Details
\ No newline at end of file diff --git a/validator.txt b/validator.txt index 4b49d1a..2c72cf9 100644 --- a/validator.txt +++ b/validator.txt @@ -1,8 +1,8 @@ 2:"$Sreact.suspense" -3:I[66355,["350","static/chunks/68b159eb-f350a487f88c1bfb.js","218","static/chunks/aaea2bcf-4abc2b343ea41dae.js","147","static/chunks/6468630d-7fefcf7a3223f2f0.js","228","static/chunks/77693919-7b92b10f5ae0e31c.js","933","static/chunks/5ebe7343-e8d67ddb6cca8663.js","4","static/chunks/4-f9ab361db4f4f038.js","245","static/chunks/245-8266bc6575a22c44.js","816","static/chunks/816-f354d55c4d7354c5.js","503","static/chunks/503-6166f7bdb0bab8f4.js","276","static/chunks/app/validator/page-8e618c838be80245.js"],""] +3:I[66355,["350","static/chunks/68b159eb-f350a487f88c1bfb.js","218","static/chunks/aaea2bcf-4abc2b343ea41dae.js","147","static/chunks/6468630d-7fefcf7a3223f2f0.js","228","static/chunks/77693919-7b92b10f5ae0e31c.js","933","static/chunks/5ebe7343-e8d67ddb6cca8663.js","4","static/chunks/4-9f7a960e3a7653fa.js","245","static/chunks/245-8266bc6575a22c44.js","567","static/chunks/567-52b253322bfdeb49.js","503","static/chunks/503-376cbc65515ee87c.js","276","static/chunks/app/validator/page-ee9dd284c1466810.js"],""] 4:I[5613,[],""] 5:I[31778,[],""] -6:I[56225,["350","static/chunks/68b159eb-f350a487f88c1bfb.js","218","static/chunks/aaea2bcf-4abc2b343ea41dae.js","147","static/chunks/6468630d-7fefcf7a3223f2f0.js","228","static/chunks/77693919-7b92b10f5ae0e31c.js","933","static/chunks/5ebe7343-e8d67ddb6cca8663.js","4","static/chunks/4-f9ab361db4f4f038.js","816","static/chunks/816-f354d55c4d7354c5.js","185","static/chunks/app/layout-f8bb99b6df23ac99.js"],""] -0:["WyQ_gkUilFLI8ibobnbav",[[["",{"children":["validator",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",{"children":["validator",{"children":["__PAGE__",{},["$L1",["$","$2",null,{"children":["$","$L3",null,{}]}],null]]},["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","validator","children"],"loading":"$undefined","loadingStyles":"$undefined","loadingScripts":"$undefined","hasLoading":false,"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}]]},[null,["$","$L6",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children"],"loading":"$undefined","loadingStyles":"$undefined","loadingScripts":"$undefined","hasLoading":false,"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],"params":{}}],null]],[[["$","link","0",{"rel":"stylesheet","href":"/xion-staking/_next/static/css/8e69049fa282e630.css","precedence":"next","crossOrigin":""}],["$","link","1",{"rel":"stylesheet","href":"/xion-staking/_next/static/css/9e20252c6882c039.css","precedence":"next","crossOrigin":""}]],"$L7"]]]] +6:I[56225,["350","static/chunks/68b159eb-f350a487f88c1bfb.js","218","static/chunks/aaea2bcf-4abc2b343ea41dae.js","147","static/chunks/6468630d-7fefcf7a3223f2f0.js","228","static/chunks/77693919-7b92b10f5ae0e31c.js","933","static/chunks/5ebe7343-e8d67ddb6cca8663.js","4","static/chunks/4-9f7a960e3a7653fa.js","567","static/chunks/567-52b253322bfdeb49.js","185","static/chunks/app/layout-3869892885b7981f.js"],""] +0:["O31cwiSF3TCFP9vhWphOF",[[["",{"children":["validator",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",{"children":["validator",{"children":["__PAGE__",{},["$L1",["$","$2",null,{"children":["$","$L3",null,{}]}],null]]},["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","validator","children"],"loading":"$undefined","loadingStyles":"$undefined","loadingScripts":"$undefined","hasLoading":false,"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}]]},[null,["$","$L6",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children"],"loading":"$undefined","loadingStyles":"$undefined","loadingScripts":"$undefined","hasLoading":false,"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],"params":{}}],null]],[[["$","link","0",{"rel":"stylesheet","href":"/xion-staking/_next/static/css/8e69049fa282e630.css","precedence":"next","crossOrigin":""}],["$","link","1",{"rel":"stylesheet","href":"/xion-staking/_next/static/css/9e20252c6882c039.css","precedence":"next","crossOrigin":""}]],"$L7"]]]] 7:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"XION Validator Details"}],["$","link","3",{"rel":"icon","href":"/xion-staking/favicon.ico","type":"image/x-icon","sizes":"16x16"}]] 1:null