@wormhole-foundation/wormhole-connect 0.3.9-beta.0-development → 0.3.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/dist/assets/{ccip-VZmm9Ynz.js → ccip-BM2KTJKS.js} +1 -1
  2. package/dist/assets/{cosmos-J21Kldym.js → cosmos-BX1BekzP.js} +1 -1
  3. package/dist/assets/{evm-CceEkY8D.js → evm-BXEmCPMX.js} +4 -4
  4. package/dist/assets/index-BvyW3wwj.js +3 -0
  5. package/dist/assets/index-CaMXNKLm.js +2 -0
  6. package/dist/assets/{index-IWZOuhzu.js → index-D0lqVeXm.js} +1 -1
  7. package/dist/assets/{index.es-BpbdjECw.js → index.es-DYz79wKC.js} +2 -2
  8. package/dist/assets/{solana-BHV_-eCx.js → solana-CAUt8JQI.js} +2 -2
  9. package/dist/assets/{solanaEmbed.esm-B9sWifH1.js → solanaEmbed.esm-H1FtxXdm.js} +1 -1
  10. package/dist/main.js +85 -85
  11. package/dist/src/routes/utils.d.ts.map +1 -1
  12. package/lib/{aptos-Di9E2_wp.js → aptos-BD9dLPo0.js} +1 -1
  13. package/lib/{aptos-CBux549u.mjs → aptos-BFfGA69R.mjs} +1 -1
  14. package/lib/{ccip-pyZLTcW7.js → ccip-BRt-YHc-.js} +1 -1
  15. package/lib/{ccip-BDLKT_93.mjs → ccip-DUFlgF1_.mjs} +1 -1
  16. package/lib/{cosmos-CdVnlqzd.js → cosmos-CQgiFVOc.js} +1 -1
  17. package/lib/{cosmos-C39_QwJ5.mjs → cosmos-adL_JGZ6.mjs} +2 -2
  18. package/lib/{evm-aN59q_R_.js → evm-Bl7undtj.js} +4 -4
  19. package/lib/{evm-B-YLcddr.mjs → evm-zMaXwqxg.mjs} +6 -6
  20. package/lib/{index-V_SPxmrQ.mjs → index-6_27Y5fq.mjs} +2 -2
  21. package/lib/{index-CiT2h5gE.js → index-Bgq8r33i.js} +1 -1
  22. package/lib/{index-BSkg4LjK.js → index-C8F998ax.js} +1 -1
  23. package/lib/index-Ci2FvrOh.js +1 -0
  24. package/lib/{index-C6Wvczhr.js → index-DTOQHhz5.js} +2 -2
  25. package/lib/{index-DL8L1ROt.mjs → index-DV6sNreL.mjs} +23 -22
  26. package/lib/{index-BkGesTg8.mjs → index-Da6eXxi9.mjs} +3 -3
  27. package/lib/{index-8_RCXn3f.js → index-U9aI6SMh.js} +1 -1
  28. package/lib/{index-b-1s4RBl.mjs → index-YvQiXdUE.mjs} +1 -1
  29. package/lib/{index-Dav5vlPz.mjs → index-jL8n_lZd.mjs} +2 -2
  30. package/lib/{index.es-BiFBfhQG.mjs → index.es--nOdm892.mjs} +1 -1
  31. package/lib/{index.es-C3-YBNbP.mjs → index.es-Bx6K8dMp.mjs} +4 -4
  32. package/lib/{index.es-ChPrRrlN.js → index.es-CM2UFhO6.js} +1 -1
  33. package/lib/{index.es-BQUa7Vv7.js → index.es-CnPkjyNd.js} +1 -1
  34. package/lib/{index.es-Bb_BiFnk.js → index.es-DLsJAPWM.js} +2 -2
  35. package/lib/{index.es-VnkPP7nS.mjs → index.es-DTpG_imm.mjs} +2 -2
  36. package/lib/index.js +1 -1
  37. package/lib/index.mjs +1 -1
  38. package/lib/{sei-BoQhh6Mb.js → sei-BvR89XbN.js} +1 -1
  39. package/lib/{sei-Hg6zXjFL.mjs → sei-C5tfWv0i.mjs} +1 -1
  40. package/lib/{solana-Depj19nP.js → solana-CRhTLHaG.js} +1 -1
  41. package/lib/{solana-DLUxtso2.mjs → solana-vzDc-ufj.mjs} +3 -3
  42. package/lib/{solanaEmbed.esm-13cDHD8t.js → solanaEmbed.esm-B7yFNTk4.js} +1 -1
  43. package/lib/{solanaEmbed.esm-C7fwNyMo.mjs → solanaEmbed.esm-DHYvoxHh.mjs} +2 -2
  44. package/lib/src/routes/utils.d.ts.map +1 -1
  45. package/lib/{sui-4jYajsRL.js → sui-DdAX-NLr.js} +1 -1
  46. package/lib/{sui-BMRM04YZ.mjs → sui-FUMrQjvP.mjs} +1 -1
  47. package/package.json +1 -1
  48. package/dist/assets/index-BGRtIcKb.js +0 -2
  49. package/dist/assets/index-By11uCvO.js +0 -3
  50. package/lib/index-DymMdCti.js +0 -1
@@ -1 +1 @@
1
- import{B as l,g as w,s as y,i as p,I as h,d as g,c as k,a as O,e as L,H as m,b as E}from"./evm-CceEkY8D.js";import"../main.js";import"./index.es-uF2MhMD8.js";class x extends l{constructor({callbackSelector:e,cause:a,data:n,extraData:c,sender:d,urls:r}){var i;super(a.shortMessage||"An error occurred while fetching for an offchain result.",{cause:a,metaMessages:[...a.metaMessages||[],(i=a.metaMessages)!=null&&i.length?"":[],"Offchain Gateway Call:",r&&[" Gateway URL(s):",...r.map(u=>` ${w(u)}`)],` Sender: ${d}`,` Data: ${n}`,` Callback selector: ${e}`,` Extra data: ${c}`].flat()}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupError"})}}class M extends l{constructor({result:e,url:a}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${w(a)}`,`Response: ${y(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupResponseMalformedError"})}}class R extends l{constructor({sender:e,to:a}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${a}`,`OffchainLookup sender address: ${e}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupSenderMismatchError"})}}function $(o,e){if(!p(o))throw new h({address:o});if(!p(e))throw new h({address:e});return o.toLowerCase()===e.toLowerCase()}const j="0x556f1830",S={name:"OffchainLookup",type:"error",inputs:[{name:"sender",type:"address"},{name:"urls",type:"string[]"},{name:"callData",type:"bytes"},{name:"callbackFunction",type:"bytes4"},{name:"extraData",type:"bytes"}]};async function D(o,{blockNumber:e,blockTag:a,data:n,to:c}){const{args:d}=g({data:n,abi:[S]}),[r,i,u,t,s]=d;try{if(!$(c,r))throw new R({sender:r,to:c});const f=await A({data:u,sender:r,urls:i}),{data:b}=await k(o,{blockNumber:e,blockTag:a,data:O([t,L([{type:"bytes"},{type:"bytes"}],[f,s])]),to:c});return b}catch(f){throw new x({callbackSelector:t,cause:f,data:n,extraData:s,sender:r,urls:i})}}async function A({data:o,sender:e,urls:a}){var c;let n=new Error("An unknown error occurred.");for(let d=0;d<a.length;d++){const r=a[d],i=r.includes("{data}")?"GET":"POST",u=i==="POST"?{data:o,sender:e}:void 0;try{const t=await fetch(r.replace("{sender}",e).replace("{data}",o),{body:JSON.stringify(u),method:i});let s;if((c=t.headers.get("Content-Type"))!=null&&c.startsWith("application/json")?s=(await t.json()).data:s=await t.text(),!t.ok){n=new m({body:u,details:s!=null&&s.error?y(s.error):t.statusText,headers:t.headers,status:t.status,url:r});continue}if(!E(s)){n=new M({result:s,url:r});continue}return s}catch(t){n=new m({body:u,details:t.message,url:r})}}throw n}export{A as ccipFetch,D as offchainLookup,S as offchainLookupAbiItem,j as offchainLookupSignature};
1
+ import{B as l,g as w,s as y,i as p,I as h,d as g,c as k,a as O,e as L,H as m,b as E}from"./evm-BXEmCPMX.js";import"../main.js";import"./index.es-uF2MhMD8.js";class x extends l{constructor({callbackSelector:e,cause:a,data:n,extraData:c,sender:d,urls:r}){var i;super(a.shortMessage||"An error occurred while fetching for an offchain result.",{cause:a,metaMessages:[...a.metaMessages||[],(i=a.metaMessages)!=null&&i.length?"":[],"Offchain Gateway Call:",r&&[" Gateway URL(s):",...r.map(u=>` ${w(u)}`)],` Sender: ${d}`,` Data: ${n}`,` Callback selector: ${e}`,` Extra data: ${c}`].flat()}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupError"})}}class M extends l{constructor({result:e,url:a}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${w(a)}`,`Response: ${y(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupResponseMalformedError"})}}class R extends l{constructor({sender:e,to:a}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${a}`,`OffchainLookup sender address: ${e}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupSenderMismatchError"})}}function $(o,e){if(!p(o))throw new h({address:o});if(!p(e))throw new h({address:e});return o.toLowerCase()===e.toLowerCase()}const j="0x556f1830",S={name:"OffchainLookup",type:"error",inputs:[{name:"sender",type:"address"},{name:"urls",type:"string[]"},{name:"callData",type:"bytes"},{name:"callbackFunction",type:"bytes4"},{name:"extraData",type:"bytes"}]};async function D(o,{blockNumber:e,blockTag:a,data:n,to:c}){const{args:d}=g({data:n,abi:[S]}),[r,i,u,t,s]=d;try{if(!$(c,r))throw new R({sender:r,to:c});const f=await A({data:u,sender:r,urls:i}),{data:b}=await k(o,{blockNumber:e,blockTag:a,data:O([t,L([{type:"bytes"},{type:"bytes"}],[f,s])]),to:c});return b}catch(f){throw new x({callbackSelector:t,cause:f,data:n,extraData:s,sender:r,urls:i})}}async function A({data:o,sender:e,urls:a}){var c;let n=new Error("An unknown error occurred.");for(let d=0;d<a.length;d++){const r=a[d],i=r.includes("{data}")?"GET":"POST",u=i==="POST"?{data:o,sender:e}:void 0;try{const t=await fetch(r.replace("{sender}",e).replace("{data}",o),{body:JSON.stringify(u),method:i});let s;if((c=t.headers.get("Content-Type"))!=null&&c.startsWith("application/json")?s=(await t.json()).data:s=await t.text(),!t.ok){n=new m({body:u,details:s!=null&&s.error?y(s.error):t.statusText,headers:t.headers,status:t.status,url:r});continue}if(!E(s)){n=new M({result:s,url:r});continue}return s}catch(t){n=new m({body:u,details:t.message,url:r})}}throw n}export{A as ccipFetch,D as offchainLookup,S as offchainLookupAbiItem,j as offchainLookupSignature};
@@ -1,4 +1,4 @@
1
- var HD=Object.defineProperty;var GD=(u,e,t)=>e in u?HD(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t;var Fe=(u,e,t)=>(GD(u,typeof e!="symbol"?e+"":e,t),t);import{p as nu,q as su,L as $u,r as N8,g as k8,s as qe,d as R,t as C0,u as pa,v as Ea,w as T8,x as D2,y as I2,z as U8,A as kn,D as S2,E as zD,S as KD,F as JD,G as Qt,H as Xt,I as g0,J as x2,K as VD,M as P8,O as $D,P as O8,Q as WD,R as YD,T as ZD,U as qD,W as QD,V as XD,c as Q0,f as p1,B as uf,X as ef,Y as E1,Z as tf,$ as x9,o as m1,a0 as rf}from"../main.js";import{s as nf,h as af,u as of}from"./index-By11uCvO.js";var Fn=function(){return Fn=Object.assign||function(e){for(var t,r=1,i=arguments.length;r<i;r++){t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},Fn.apply(this,arguments)};function _9(){return{typeUrl:"",value:new Uint8Array(0)}}const Vu={encode(u,e=nu.Writer.create()){return u.typeUrl!==""&&e.uint32(10).string(u.typeUrl),u.value.length!==0&&e.uint32(18).bytes(u.value),e},decode(u,e){const t=u instanceof nu.Reader?u:nu.Reader.create(u);let r=e===void 0?t.len:t.pos+e;const i=_9();for(;t.pos<r;){const n=t.uint32();switch(n>>>3){case 1:if(n!==10)break;i.typeUrl=t.string();continue;case 2:if(n!==18)break;i.value=t.bytes();continue}if((n&7)===4||n===0)break;t.skipType(n&7)}return i},fromJSON(u){return{typeUrl:M9(u.typeUrl)?globalThis.String(u.typeUrl):"",value:M9(u.value)?sf(u.value):new Uint8Array(0)}},toJSON(u){const e={};return u.typeUrl!==""&&(e.typeUrl=u.typeUrl),u.value.length!==0&&(e.value=Df(u.value)),e},create(u){return Vu.fromPartial(u??{})},fromPartial(u){var e,t;const r=_9();return r.typeUrl=(e=u.typeUrl)!==null&&e!==void 0?e:"",r.value=(t=u.value)!==null&&t!==void 0?t:new Uint8Array(0),r}};function sf(u){if(globalThis.Buffer)return Uint8Array.from(globalThis.Buffer.from(u,"base64"));{const e=globalThis.atob(u),t=new Uint8Array(e.length);for(let r=0;r<e.length;++r)t[r]=e.charCodeAt(r);return t}}function Df(u){if(globalThis.Buffer)return globalThis.Buffer.from(u).toString("base64");{const e=[];return u.forEach(t=>{e.push(globalThis.String.fromCharCode(t))}),globalThis.btoa(e.join(""))}}function M9(u){return u!=null}var R8={exports:{}};(function(u,e){(function(t,r){u.exports=r()})(su,function(){return t={418:function(i,n){(function(D,f){for(var h in f)D[h]=f[h]})(n,function(D){var f={};function h(g){if(f[g])return f[g].exports;var I=f[g]={i:g,l:!1,exports:{}};return D[g].call(I.exports,I,I.exports,h),I.l=!0,I.exports}return h.m=D,h.c=f,h.i=function(g){return g},h.d=function(g,I,C){h.o(g,I)||Object.defineProperty(g,I,{configurable:!1,enumerable:!0,get:C})},h.n=function(g){var I=g&&g.__esModule?function(){return g.default}:function(){return g};return h.d(I,"a",I),I},h.o=function(g,I){return Object.prototype.hasOwnProperty.call(g,I)},h.p="",h(h.s=1)}([function(D,f,h){Object.defineProperty(f,"__esModule",{value:!0});var g=h(3),I=function(){function C(B,m){B===void 0&&(B={}),m===void 0&&(m={splitValues:!1});var p,w=this;this.headersMap={},B&&(typeof Headers<"u"&&B instanceof Headers?g.getHeaderKeys(B).forEach(function(v){g.getHeaderValues(B,v).forEach(function(k){m.splitValues?w.append(v,g.splitHeaderValue(k)):w.append(v,k)})}):typeof(p=B)=="object"&&typeof p.headersMap=="object"&&typeof p.forEach=="function"?B.forEach(function(v,k){w.append(v,k)}):typeof Map<"u"&&B instanceof Map?B.forEach(function(v,k){w.append(k,v)}):typeof B=="string"?this.appendFromString(B):typeof B=="object"&&Object.getOwnPropertyNames(B).forEach(function(v){var k=B[v];Array.isArray(k)?k.forEach(function(_){w.append(v,_)}):w.append(v,k)}))}return C.prototype.appendFromString=function(B){for(var m=B.split(`\r
1
+ var HD=Object.defineProperty;var GD=(u,e,t)=>e in u?HD(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t;var Fe=(u,e,t)=>(GD(u,typeof e!="symbol"?e+"":e,t),t);import{p as nu,q as su,L as $u,r as N8,g as k8,s as qe,d as R,t as C0,u as pa,v as Ea,w as T8,x as D2,y as I2,z as U8,A as kn,D as S2,E as zD,S as KD,F as JD,G as Qt,H as Xt,I as g0,J as x2,K as VD,M as P8,O as $D,P as O8,Q as WD,R as YD,T as ZD,U as qD,W as QD,V as XD,c as Q0,f as p1,B as uf,X as ef,Y as E1,Z as tf,$ as x9,o as m1,a0 as rf}from"../main.js";import{s as nf,h as af,u as of}from"./index-BvyW3wwj.js";var Fn=function(){return Fn=Object.assign||function(e){for(var t,r=1,i=arguments.length;r<i;r++){t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},Fn.apply(this,arguments)};function _9(){return{typeUrl:"",value:new Uint8Array(0)}}const Vu={encode(u,e=nu.Writer.create()){return u.typeUrl!==""&&e.uint32(10).string(u.typeUrl),u.value.length!==0&&e.uint32(18).bytes(u.value),e},decode(u,e){const t=u instanceof nu.Reader?u:nu.Reader.create(u);let r=e===void 0?t.len:t.pos+e;const i=_9();for(;t.pos<r;){const n=t.uint32();switch(n>>>3){case 1:if(n!==10)break;i.typeUrl=t.string();continue;case 2:if(n!==18)break;i.value=t.bytes();continue}if((n&7)===4||n===0)break;t.skipType(n&7)}return i},fromJSON(u){return{typeUrl:M9(u.typeUrl)?globalThis.String(u.typeUrl):"",value:M9(u.value)?sf(u.value):new Uint8Array(0)}},toJSON(u){const e={};return u.typeUrl!==""&&(e.typeUrl=u.typeUrl),u.value.length!==0&&(e.value=Df(u.value)),e},create(u){return Vu.fromPartial(u??{})},fromPartial(u){var e,t;const r=_9();return r.typeUrl=(e=u.typeUrl)!==null&&e!==void 0?e:"",r.value=(t=u.value)!==null&&t!==void 0?t:new Uint8Array(0),r}};function sf(u){if(globalThis.Buffer)return Uint8Array.from(globalThis.Buffer.from(u,"base64"));{const e=globalThis.atob(u),t=new Uint8Array(e.length);for(let r=0;r<e.length;++r)t[r]=e.charCodeAt(r);return t}}function Df(u){if(globalThis.Buffer)return globalThis.Buffer.from(u).toString("base64");{const e=[];return u.forEach(t=>{e.push(globalThis.String.fromCharCode(t))}),globalThis.btoa(e.join(""))}}function M9(u){return u!=null}var R8={exports:{}};(function(u,e){(function(t,r){u.exports=r()})(su,function(){return t={418:function(i,n){(function(D,f){for(var h in f)D[h]=f[h]})(n,function(D){var f={};function h(g){if(f[g])return f[g].exports;var I=f[g]={i:g,l:!1,exports:{}};return D[g].call(I.exports,I,I.exports,h),I.l=!0,I.exports}return h.m=D,h.c=f,h.i=function(g){return g},h.d=function(g,I,C){h.o(g,I)||Object.defineProperty(g,I,{configurable:!1,enumerable:!0,get:C})},h.n=function(g){var I=g&&g.__esModule?function(){return g.default}:function(){return g};return h.d(I,"a",I),I},h.o=function(g,I){return Object.prototype.hasOwnProperty.call(g,I)},h.p="",h(h.s=1)}([function(D,f,h){Object.defineProperty(f,"__esModule",{value:!0});var g=h(3),I=function(){function C(B,m){B===void 0&&(B={}),m===void 0&&(m={splitValues:!1});var p,w=this;this.headersMap={},B&&(typeof Headers<"u"&&B instanceof Headers?g.getHeaderKeys(B).forEach(function(v){g.getHeaderValues(B,v).forEach(function(k){m.splitValues?w.append(v,g.splitHeaderValue(k)):w.append(v,k)})}):typeof(p=B)=="object"&&typeof p.headersMap=="object"&&typeof p.forEach=="function"?B.forEach(function(v,k){w.append(v,k)}):typeof Map<"u"&&B instanceof Map?B.forEach(function(v,k){w.append(k,v)}):typeof B=="string"?this.appendFromString(B):typeof B=="object"&&Object.getOwnPropertyNames(B).forEach(function(v){var k=B[v];Array.isArray(k)?k.forEach(function(_){w.append(v,_)}):w.append(v,k)}))}return C.prototype.appendFromString=function(B){for(var m=B.split(`\r
2
2
  `),p=0;p<m.length;p++){var w=m[p],v=w.indexOf(":");if(v>0){var k=w.substring(0,v).trim(),_=w.substring(v+1).trim();this.append(k,_)}}},C.prototype.delete=function(B,m){var p=g.normalizeName(B);if(m===void 0)delete this.headersMap[p];else{var w=this.headersMap[p];if(w){var v=w.indexOf(m);v>=0&&w.splice(v,1),w.length===0&&delete this.headersMap[p]}}},C.prototype.append=function(B,m){var p=this,w=g.normalizeName(B);Array.isArray(this.headersMap[w])||(this.headersMap[w]=[]),Array.isArray(m)?m.forEach(function(v){p.headersMap[w].push(g.normalizeValue(v))}):this.headersMap[w].push(g.normalizeValue(m))},C.prototype.set=function(B,m){var p=g.normalizeName(B);if(Array.isArray(m)){var w=[];m.forEach(function(v){w.push(g.normalizeValue(v))}),this.headersMap[p]=w}else this.headersMap[p]=[g.normalizeValue(m)]},C.prototype.has=function(B,m){var p=this.headersMap[g.normalizeName(B)];if(!Array.isArray(p))return!1;if(m!==void 0){var w=g.normalizeValue(m);return p.indexOf(w)>=0}return!0},C.prototype.get=function(B){var m=this.headersMap[g.normalizeName(B)];return m!==void 0?m.concat():[]},C.prototype.forEach=function(B){var m=this;Object.getOwnPropertyNames(this.headersMap).forEach(function(p){B(p,m.headersMap[p])},this)},C.prototype.toHeaders=function(){if(typeof Headers<"u"){var B=new Headers;return this.forEach(function(m,p){p.forEach(function(w){B.append(m,w)})}),B}throw new Error("Headers class is not defined")},C}();f.BrowserHeaders=I},function(D,f,h){Object.defineProperty(f,"__esModule",{value:!0});var g=h(0);f.BrowserHeaders=g.BrowserHeaders},function(D,f,h){Object.defineProperty(f,"__esModule",{value:!0}),f.iterateHeaders=function(g,I){for(var C=g[Symbol.iterator](),B=C.next();!B.done;)I(B.value[0]),B=C.next()},f.iterateHeadersKeys=function(g,I){for(var C=g.keys(),B=C.next();!B.done;)I(B.value),B=C.next()}},function(D,f,h){Object.defineProperty(f,"__esModule",{value:!0});var g=h(2);f.normalizeName=function(I){if(typeof I!="string"&&(I=String(I)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(I))throw new TypeError("Invalid character in header field name");return I.toLowerCase()},f.normalizeValue=function(I){return typeof I!="string"&&(I=String(I)),I},f.getHeaderValues=function(I,C){var B=I;if(B instanceof Headers&&B.getAll)return B.getAll(C);var m=B.get(C);return m&&typeof m=="string"?[m]:m},f.getHeaderKeys=function(I){var C=I,B={},m=[];return C.keys?g.iterateHeadersKeys(C,function(p){B[p]||(B[p]=!0,m.push(p))}):C.forEach?C.forEach(function(p,w){B[w]||(B[w]=!0,m.push(w))}):g.iterateHeaders(C,function(p){var w=p[0];B[w]||(B[w]=!0,m.push(w))}),m},f.splitHeaderValue=function(I){var C=[];return I.split(", ").forEach(function(B){B.split(",").forEach(function(m){C.push(m)})}),C}}]))},617:function(i,n,D){Object.defineProperty(n,"__esModule",{value:!0}),n.ChunkParser=n.ChunkType=n.encodeASCII=n.decodeASCII=void 0;var f,h=D(65);function g(v){return(k=v)===9||k===10||k===13||v>=32&&v<=126;var k}function I(v){for(var k=0;k!==v.length;++k)if(!g(v[k]))throw new Error("Metadata is not valid (printable) ASCII");return String.fromCharCode.apply(String,Array.prototype.slice.call(v))}function C(v){return(128&v.getUint8(0))==128}function B(v){return v.getUint32(1,!1)}function m(v,k,_){return v.byteLength-k>=_}function p(v,k,_){if(v.slice)return v.slice(k,_);var T=v.length;_!==void 0&&(T=_);for(var l=new Uint8Array(T-k),b=0,N=k;N<T;N++)l[b++]=v[N];return l}n.decodeASCII=I,n.encodeASCII=function(v){for(var k=new Uint8Array(v.length),_=0;_!==v.length;++_){var T=v.charCodeAt(_);if(!g(T))throw new Error("Metadata contains invalid ASCII");k[_]=T}return k},function(v){v[v.MESSAGE=1]="MESSAGE",v[v.TRAILERS=2]="TRAILERS"}(f=n.ChunkType||(n.ChunkType={}));var w=function(){function v(){this.buffer=null,this.position=0}return v.prototype.parse=function(k,_){if(k.length===0&&_)return[];var T,l=[];if(this.buffer==null)this.buffer=k,this.position=0;else if(this.position===this.buffer.byteLength)this.buffer=k,this.position=0;else{var b=this.buffer.byteLength-this.position,N=new Uint8Array(b+k.byteLength),V=p(this.buffer,this.position);N.set(V,0);var j=new Uint8Array(k);N.set(j,b),this.buffer=N,this.position=0}for(;;){if(!m(this.buffer,this.position,5))return l;var H=p(this.buffer,this.position,this.position+5),Du=new DataView(H.buffer,H.byteOffset,H.byteLength),y=B(Du);if(!m(this.buffer,this.position,5+y))return l;var a=p(this.buffer,this.position+5,this.position+5+y);if(this.position+=5+y,C(Du))return l.push({chunkType:f.TRAILERS,trailers:(T=a,new h.Metadata(I(T)))}),l;l.push({chunkType:f.MESSAGE,data:a})}},v}();n.ChunkParser=w},8:function(i,n){var D;Object.defineProperty(n,"__esModule",{value:!0}),n.httpStatusToCode=n.Code=void 0,function(f){f[f.OK=0]="OK",f[f.Canceled=1]="Canceled",f[f.Unknown=2]="Unknown",f[f.InvalidArgument=3]="InvalidArgument",f[f.DeadlineExceeded=4]="DeadlineExceeded",f[f.NotFound=5]="NotFound",f[f.AlreadyExists=6]="AlreadyExists",f[f.PermissionDenied=7]="PermissionDenied",f[f.ResourceExhausted=8]="ResourceExhausted",f[f.FailedPrecondition=9]="FailedPrecondition",f[f.Aborted=10]="Aborted",f[f.OutOfRange=11]="OutOfRange",f[f.Unimplemented=12]="Unimplemented",f[f.Internal=13]="Internal",f[f.Unavailable=14]="Unavailable",f[f.DataLoss=15]="DataLoss",f[f.Unauthenticated=16]="Unauthenticated"}(D=n.Code||(n.Code={})),n.httpStatusToCode=function(f){switch(f){case 0:return D.Internal;case 200:return D.OK;case 400:return D.InvalidArgument;case 401:return D.Unauthenticated;case 403:return D.PermissionDenied;case 404:return D.NotFound;case 409:return D.Aborted;case 412:return D.FailedPrecondition;case 429:return D.ResourceExhausted;case 499:return D.Canceled;case 500:return D.Unknown;case 501:return D.Unimplemented;case 503:return D.Unavailable;case 504:return D.DeadlineExceeded;default:return D.Unknown}}},934:function(i,n,D){Object.defineProperty(n,"__esModule",{value:!0}),n.client=void 0;var f=D(65),h=D(617),g=D(8),I=D(346),C=D(57),B=D(882);n.client=function(w,v){return new m(w,v)};var m=function(){function w(v,k){this.started=!1,this.sentFirstMessage=!1,this.completed=!1,this.closed=!1,this.finishedSending=!1,this.onHeadersCallbacks=[],this.onMessageCallbacks=[],this.onEndCallbacks=[],this.parser=new h.ChunkParser,this.methodDefinition=v,this.props=k,this.createTransport()}return w.prototype.createTransport=function(){var v=this.props.host+"/"+this.methodDefinition.service.serviceName+"/"+this.methodDefinition.methodName,k={methodDefinition:this.methodDefinition,debug:this.props.debug||!1,url:v,onHeaders:this.onTransportHeaders.bind(this),onChunk:this.onTransportChunk.bind(this),onEnd:this.onTransportEnd.bind(this)};this.props.transport?this.transport=this.props.transport(k):this.transport=C.makeDefaultTransport(k)},w.prototype.onTransportHeaders=function(v,k){if(this.props.debug&&I.debug("onHeaders",v,k),this.closed)this.props.debug&&I.debug("grpc.onHeaders received after request was closed - ignoring");else if(k!==0){this.responseHeaders=v,this.props.debug&&I.debug("onHeaders.responseHeaders",JSON.stringify(this.responseHeaders,null,2));var _=p(v);this.props.debug&&I.debug("onHeaders.gRPCStatus",_);var T=_&&_>=0?_:g.httpStatusToCode(k);this.props.debug&&I.debug("onHeaders.code",T);var l=v.get("grpc-message")||[];if(this.props.debug&&I.debug("onHeaders.gRPCMessage",l),this.rawOnHeaders(v),T!==g.Code.OK){var b=this.decodeGRPCStatus(l[0]);this.rawOnError(T,b,v)}}},w.prototype.onTransportChunk=function(v){var k=this;if(this.closed)this.props.debug&&I.debug("grpc.onChunk received after request was closed - ignoring");else{var _=[];try{_=this.parser.parse(v)}catch(T){return this.props.debug&&I.debug("onChunk.parsing error",T,T.message),void this.rawOnError(g.Code.Internal,"parsing error: "+T.message)}_.forEach(function(T){if(T.chunkType===h.ChunkType.MESSAGE){var l=k.methodDefinition.responseType.deserializeBinary(T.data);k.rawOnMessage(l)}else T.chunkType===h.ChunkType.TRAILERS&&(k.responseHeaders?(k.responseTrailers=new f.Metadata(T.trailers),k.props.debug&&I.debug("onChunk.trailers",k.responseTrailers)):(k.responseHeaders=new f.Metadata(T.trailers),k.rawOnHeaders(k.responseHeaders)))})}},w.prototype.onTransportEnd=function(){if(this.props.debug&&I.debug("grpc.onEnd"),this.closed)this.props.debug&&I.debug("grpc.onEnd received after request was closed - ignoring");else if(this.responseTrailers!==void 0){var v=p(this.responseTrailers);if(v!==null){var k=this.responseTrailers.get("grpc-message"),_=this.decodeGRPCStatus(k[0]);this.rawOnEnd(v,_,this.responseTrailers)}else this.rawOnError(g.Code.Internal,"Response closed without grpc-status (Trailers provided)")}else{if(this.responseHeaders===void 0)return void this.rawOnError(g.Code.Unknown,"Response closed without headers");var T=p(this.responseHeaders),l=this.responseHeaders.get("grpc-message");if(this.props.debug&&I.debug("grpc.headers only response ",T,l),T===null)return void this.rawOnEnd(g.Code.Unknown,"Response closed without grpc-status (Headers only)",this.responseHeaders);var b=this.decodeGRPCStatus(l[0]);this.rawOnEnd(T,b,this.responseHeaders)}},w.prototype.decodeGRPCStatus=function(v){if(!v)return"";try{return decodeURIComponent(v)}catch{return v}},w.prototype.rawOnEnd=function(v,k,_){var T=this;this.props.debug&&I.debug("rawOnEnd",v,k,_),this.completed||(this.completed=!0,this.onEndCallbacks.forEach(function(l){if(!T.closed)try{l(v,k,_)}catch(b){setTimeout(function(){throw b},0)}}))},w.prototype.rawOnHeaders=function(v){this.props.debug&&I.debug("rawOnHeaders",v),this.completed||this.onHeadersCallbacks.forEach(function(k){try{k(v)}catch(_){setTimeout(function(){throw _},0)}})},w.prototype.rawOnError=function(v,k,_){var T=this;_===void 0&&(_=new f.Metadata),this.props.debug&&I.debug("rawOnError",v,k),this.completed||(this.completed=!0,this.onEndCallbacks.forEach(function(l){if(!T.closed)try{l(v,k,_)}catch(b){setTimeout(function(){throw b},0)}}))},w.prototype.rawOnMessage=function(v){var k=this;this.props.debug&&I.debug("rawOnMessage",v.toObject()),this.completed||this.closed||this.onMessageCallbacks.forEach(function(_){if(!k.closed)try{_(v)}catch(T){setTimeout(function(){throw T},0)}})},w.prototype.onHeaders=function(v){this.onHeadersCallbacks.push(v)},w.prototype.onMessage=function(v){this.onMessageCallbacks.push(v)},w.prototype.onEnd=function(v){this.onEndCallbacks.push(v)},w.prototype.start=function(v){if(this.started)throw new Error("Client already started - cannot .start()");this.started=!0;var k=new f.Metadata(v||{});k.set("content-type","application/grpc-web+proto"),k.set("x-grpc-web","1"),this.transport.start(k)},w.prototype.send=function(v){if(!this.started)throw new Error("Client not started - .start() must be called before .send()");if(this.closed)throw new Error("Client already closed - cannot .send()");if(this.finishedSending)throw new Error("Client already finished sending - cannot .send()");if(!this.methodDefinition.requestStream&&this.sentFirstMessage)throw new Error("Message already sent for non-client-streaming method - cannot .send()");this.sentFirstMessage=!0;var k=B.frameRequest(v);this.transport.sendMessage(k)},w.prototype.finishSend=function(){if(!this.started)throw new Error("Client not started - .finishSend() must be called before .close()");if(this.closed)throw new Error("Client already closed - cannot .send()");if(this.finishedSending)throw new Error("Client already finished sending - cannot .finishSend()");this.finishedSending=!0,this.transport.finishSend()},w.prototype.close=function(){if(!this.started)throw new Error("Client not started - .start() must be called before .close()");if(this.closed)throw new Error("Client already closed - cannot .close()");this.closed=!0,this.props.debug&&I.debug("request.abort aborting request"),this.transport.cancel()},w}();function p(w){var v=w.get("grpc-status")||[];if(v.length>0)try{var k=v[0];return parseInt(k,10)}catch{return null}return null}},346:function(i,n){Object.defineProperty(n,"__esModule",{value:!0}),n.debug=void 0,n.debug=function(){for(var D=[],f=0;f<arguments.length;f++)D[f]=arguments[f];console.debug?console.debug.apply(null,D):console.log.apply(null,D)}},607:function(i,n,D){Object.defineProperty(n,"__esModule",{value:!0}),n.grpc=void 0;var f,h=D(418),g=D(57),I=D(229),C=D(540),B=D(210),m=D(859),p=D(8),w=D(938),v=D(35),k=D(934);(f=n.grpc||(n.grpc={})).setDefaultTransport=g.setDefaultTransportFactory,f.CrossBrowserHttpTransport=m.CrossBrowserHttpTransport,f.FetchReadableStreamTransport=I.FetchReadableStreamTransport,f.XhrTransport=B.XhrTransport,f.WebsocketTransport=C.WebsocketTransport,f.Code=p.Code,f.Metadata=h.BrowserHeaders,f.client=function(_,T){return k.client(_,T)},f.invoke=w.invoke,f.unary=v.unary},938:function(i,n,D){Object.defineProperty(n,"__esModule",{value:!0}),n.invoke=void 0;var f=D(934);n.invoke=function(h,g){if(h.requestStream)throw new Error(".invoke cannot be used with client-streaming methods. Use .client instead.");var I=f.client(h,{host:g.host,transport:g.transport,debug:g.debug});return g.onHeaders&&I.onHeaders(g.onHeaders),g.onMessage&&I.onMessage(g.onMessage),g.onEnd&&I.onEnd(g.onEnd),I.start(g.metadata),I.send(g.request),I.finishSend(),{close:function(){I.close()}}}},65:function(i,n,D){Object.defineProperty(n,"__esModule",{value:!0}),n.Metadata=void 0;var f=D(418);Object.defineProperty(n,"Metadata",{enumerable:!0,get:function(){return f.BrowserHeaders}})},57:function(i,n,D){Object.defineProperty(n,"__esModule",{value:!0}),n.makeDefaultTransport=n.setDefaultTransportFactory=void 0;var f=D(859),h=function(g){return f.CrossBrowserHttpTransport({withCredentials:!1})(g)};n.setDefaultTransportFactory=function(g){h=g},n.makeDefaultTransport=function(g){return h(g)}},229:function(i,n,D){var f=this&&this.__assign||function(){return(f=Object.assign||function(C){for(var B,m=1,p=arguments.length;m<p;m++)for(var w in B=arguments[m])Object.prototype.hasOwnProperty.call(B,w)&&(C[w]=B[w]);return C}).apply(this,arguments)};Object.defineProperty(n,"__esModule",{value:!0}),n.detectFetchSupport=n.FetchReadableStreamTransport=void 0;var h=D(65),g=D(346);n.FetchReadableStreamTransport=function(C){return function(B){return function(m,p){return m.debug&&g.debug("fetchRequest",m),new I(m,p)}(B,C)}};var I=function(){function C(B,m){this.cancelled=!1,this.controller=self.AbortController&&new AbortController,this.options=B,this.init=m}return C.prototype.pump=function(B,m){var p=this;if(this.reader=B,this.cancelled)return this.options.debug&&g.debug("Fetch.pump.cancel at first pump"),void this.reader.cancel().catch(function(w){p.options.debug&&g.debug("Fetch.pump.reader.cancel exception",w)});this.reader.read().then(function(w){if(w.done)return p.options.onEnd(),m;p.options.onChunk(w.value),p.pump(p.reader,m)}).catch(function(w){p.cancelled?p.options.debug&&g.debug("Fetch.catch - request cancelled"):(p.cancelled=!0,p.options.debug&&g.debug("Fetch.catch",w.message),p.options.onEnd(w))})},C.prototype.send=function(B){var m=this;fetch(this.options.url,f(f({},this.init),{headers:this.metadata.toHeaders(),method:"POST",body:B,signal:this.controller&&this.controller.signal})).then(function(p){if(m.options.debug&&g.debug("Fetch.response",p),m.options.onHeaders(new h.Metadata(p.headers),p.status),!p.body)return p;m.pump(p.body.getReader(),p)}).catch(function(p){m.cancelled?m.options.debug&&g.debug("Fetch.catch - request cancelled"):(m.cancelled=!0,m.options.debug&&g.debug("Fetch.catch",p.message),m.options.onEnd(p))})},C.prototype.sendMessage=function(B){this.send(B)},C.prototype.finishSend=function(){},C.prototype.start=function(B){this.metadata=B},C.prototype.cancel=function(){var B=this;this.cancelled?this.options.debug&&g.debug("Fetch.cancel already cancelled"):(this.cancelled=!0,this.controller?(this.options.debug&&g.debug("Fetch.cancel.controller.abort"),this.controller.abort()):this.options.debug&&g.debug("Fetch.cancel.missing abort controller"),this.reader?(this.options.debug&&g.debug("Fetch.cancel.reader.cancel"),this.reader.cancel().catch(function(m){B.options.debug&&g.debug("Fetch.cancel.reader.cancel exception",m)})):this.options.debug&&g.debug("Fetch.cancel before reader"))},C}();n.detectFetchSupport=function(){return typeof Response<"u"&&Response.prototype.hasOwnProperty("body")&&typeof Headers=="function"}},859:function(i,n,D){Object.defineProperty(n,"__esModule",{value:!0}),n.CrossBrowserHttpTransport=void 0;var f=D(229),h=D(210);n.CrossBrowserHttpTransport=function(g){if(f.detectFetchSupport()){var I={credentials:g.withCredentials?"include":"same-origin"};return f.FetchReadableStreamTransport(I)}return h.XhrTransport({withCredentials:g.withCredentials})}},210:function(i,n,D){var f,h=this&&this.__extends||(f=function(v,k){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,T){_.__proto__=T}||function(_,T){for(var l in T)Object.prototype.hasOwnProperty.call(T,l)&&(_[l]=T[l])})(v,k)},function(v,k){function _(){this.constructor=v}f(v,k),v.prototype=k===null?Object.create(k):(_.prototype=k.prototype,new _)});Object.defineProperty(n,"__esModule",{value:!0}),n.stringToArrayBuffer=n.MozChunkedArrayBufferXHR=n.XHR=n.XhrTransport=void 0;var g=D(65),I=D(346),C=D(849);n.XhrTransport=function(v){return function(k){if(C.detectMozXHRSupport())return new m(k,v);if(C.detectXHROverrideMimeTypeSupport())return new B(k,v);throw new Error("This environment's XHR implementation cannot support binary transfer.")}};var B=function(){function v(k,_){this.options=k,this.init=_}return v.prototype.onProgressEvent=function(){this.options.debug&&I.debug("XHR.onProgressEvent.length: ",this.xhr.response.length);var k=this.xhr.response.substr(this.index);this.index=this.xhr.response.length;var _=w(k);this.options.onChunk(_)},v.prototype.onLoadEvent=function(){this.options.debug&&I.debug("XHR.onLoadEvent"),this.options.onEnd()},v.prototype.onStateChange=function(){this.options.debug&&I.debug("XHR.onStateChange",this.xhr.readyState),this.xhr.readyState===XMLHttpRequest.HEADERS_RECEIVED&&this.options.onHeaders(new g.Metadata(this.xhr.getAllResponseHeaders()),this.xhr.status)},v.prototype.sendMessage=function(k){this.xhr.send(k)},v.prototype.responseCallback=function(k){this.options.onHeaders(new g.Metadata(function(_){var T={};for(var l in _){var b=_[l];_.hasOwnProperty(l)&&b!==void 0&&(T[l]=b)}return T}(k.headers)),k.statusCode)},v.prototype.finishSend=function(){},v.prototype.start=function(k){var _=this;this.metadata=k;var T=new XMLHttpRequest;this.xhr=T,T.open("POST",this.options.url),this.configureXhr(),this.metadata.forEach(function(l,b){T.setRequestHeader(l,b.join(", "))}),T.withCredentials=!!this.init.withCredentials,T.addEventListener("readystatechange",this.onStateChange.bind(this)),T.addEventListener("progress",this.onProgressEvent.bind(this)),T.addEventListener("loadend",this.onLoadEvent.bind(this)),T.addEventListener("error",function(l){_.options.debug&&I.debug("XHR.error",l),_.options.onEnd(l.error)})},v.prototype.configureXhr=function(){this.xhr.responseType="text",this.xhr.overrideMimeType("text/plain; charset=x-user-defined")},v.prototype.cancel=function(){this.options.debug&&I.debug("XHR.abort"),this.xhr.abort()},v}();n.XHR=B;var m=function(v){function k(){return v!==null&&v.apply(this,arguments)||this}return h(k,v),k.prototype.configureXhr=function(){this.options.debug&&I.debug("MozXHR.configureXhr: setting responseType to 'moz-chunked-arraybuffer'"),this.xhr.responseType="moz-chunked-arraybuffer"},k.prototype.onProgressEvent=function(){var _=this.xhr.response;this.options.debug&&I.debug("MozXHR.onProgressEvent: ",new Uint8Array(_)),this.options.onChunk(new Uint8Array(_))},k}(B);function p(v,k){var _=v.charCodeAt(k);if(_>=55296&&_<=56319){var T=v.charCodeAt(k+1);T>=56320&&T<=57343&&(_=65536+(_-55296<<10)+(T-56320))}return _}function w(v){for(var k=new Uint8Array(v.length),_=0,T=0;T<v.length;T++){var l=String.prototype.codePointAt?v.codePointAt(T):p(v,T);k[_++]=255&l}return k}n.MozChunkedArrayBufferXHR=m,n.stringToArrayBuffer=w},849:function(i,n){var D;function f(){if(D!==void 0)return D;if(XMLHttpRequest){D=new XMLHttpRequest;try{D.open("GET","https://localhost")}catch{}}return D}function h(g){var I=f();if(!I)return!1;try{return I.responseType=g,I.responseType===g}catch{}return!1}Object.defineProperty(n,"__esModule",{value:!0}),n.detectXHROverrideMimeTypeSupport=n.detectMozXHRSupport=n.xhrSupportsResponseType=void 0,n.xhrSupportsResponseType=h,n.detectMozXHRSupport=function(){return typeof XMLHttpRequest<"u"&&h("moz-chunked-arraybuffer")},n.detectXHROverrideMimeTypeSupport=function(){return typeof XMLHttpRequest<"u"&&XMLHttpRequest.prototype.hasOwnProperty("overrideMimeType")}},540:function(i,n,D){Object.defineProperty(n,"__esModule",{value:!0}),n.WebsocketTransport=void 0;var f,h=D(346),g=D(617);(function(C){C[C.FINISH_SEND=1]="FINISH_SEND"})(f||(f={}));var I=new Uint8Array([1]);n.WebsocketTransport=function(){return function(C){return function(B){B.debug&&h.debug("websocketRequest",B);var m,p=function(k){if(k.substr(0,8)==="https://")return"wss://"+k.substr(8);if(k.substr(0,7)==="http://")return"ws://"+k.substr(7);throw new Error("Websocket transport constructed with non-https:// or http:// host.")}(B.url),w=[];function v(k){if(k===f.FINISH_SEND)m.send(I);else{var _=k,T=new Int8Array(_.byteLength+1);T.set(new Uint8Array([0])),T.set(_,1),m.send(T)}}return{sendMessage:function(k){m&&m.readyState!==m.CONNECTING?v(k):w.push(k)},finishSend:function(){m&&m.readyState!==m.CONNECTING?v(f.FINISH_SEND):w.push(f.FINISH_SEND)},start:function(k){(m=new WebSocket(p,["grpc-websockets"])).binaryType="arraybuffer",m.onopen=function(){var _;B.debug&&h.debug("websocketRequest.onopen"),m.send((_="",k.forEach(function(T,l){_+=T+": "+l.join(", ")+`\r
3
3
  `}),g.encodeASCII(_))),w.forEach(function(T){v(T)})},m.onclose=function(_){B.debug&&h.debug("websocketRequest.onclose",_),B.onEnd()},m.onerror=function(_){B.debug&&h.debug("websocketRequest.onerror",_)},m.onmessage=function(_){B.onChunk(new Uint8Array(_.data))}},cancel:function(){B.debug&&h.debug("websocket.abort"),m.close()}}}(C)}}},35:function(i,n,D){Object.defineProperty(n,"__esModule",{value:!0}),n.unary=void 0;var f=D(65),h=D(934);n.unary=function(g,I){if(g.responseStream)throw new Error(".unary cannot be used with server-streaming methods. Use .invoke or .client instead.");if(g.requestStream)throw new Error(".unary cannot be used with client-streaming methods. Use .client instead.");var C=null,B=null,m=h.client(g,{host:I.host,transport:I.transport,debug:I.debug});return m.onHeaders(function(p){C=p}),m.onMessage(function(p){B=p}),m.onEnd(function(p,w,v){I.onEnd({status:p,statusMessage:w,headers:C||new f.Metadata,message:B,trailers:v})}),m.start(I.metadata),m.send(I.request),m.finishSend(),{close:function(){m.close()}}}},882:function(i,n){Object.defineProperty(n,"__esModule",{value:!0}),n.frameRequest=void 0,n.frameRequest=function(D){var f=D.serializeBinary(),h=new ArrayBuffer(f.byteLength+5);return new DataView(h,1,4).setUint32(0,f.length,!1),new Uint8Array(h,5).set(f),new Uint8Array(h)}}},r={},function i(n){if(r[n])return r[n].exports;var D=r[n]={exports:{}};return t[n].call(D.exports,D,D.exports,i),D.exports}(607);var t,r})})(R8);var ma=R8.exports;nu.util.Long!==$u&&(nu.util.Long=$u,nu.configure());function N9(){return{denom:"",amount:""}}const Gu={encode(u,e=nu.Writer.create()){return u.denom!==""&&e.uint32(10).string(u.denom),u.amount!==""&&e.uint32(18).string(u.amount),e},decode(u,e){const t=u instanceof nu.Reader?u:nu.Reader.create(u);let r=e===void 0?t.len:t.pos+e;const i=N9();for(;t.pos<r;){const n=t.uint32();switch(n>>>3){case 1:if(n!==10)break;i.denom=t.string();continue;case 2:if(n!==18)break;i.amount=t.string();continue}if((n&7)===4||n===0)break;t.skipType(n&7)}return i},fromJSON(u){return{denom:k9(u.denom)?globalThis.String(u.denom):"",amount:k9(u.amount)?globalThis.String(u.amount):""}},toJSON(u){const e={};return u.denom!==""&&(e.denom=u.denom),u.amount!==""&&(e.amount=u.amount),e},create(u){return Gu.fromPartial(u??{})},fromPartial(u){var e,t;const r=N9();return r.denom=(e=u.denom)!==null&&e!==void 0?e:"",r.amount=(t=u.amount)!==null&&t!==void 0?t:"",r}};function k9(u){return u!=null}function T9(){return{fromAddress:"",toAddress:"",amount:[]}}const X0={encode(u,e=nu.Writer.create()){u.fromAddress!==""&&e.uint32(10).string(u.fromAddress),u.toAddress!==""&&e.uint32(18).string(u.toAddress);for(const t of u.amount)Gu.encode(t,e.uint32(26).fork()).ldelim();return e},decode(u,e){const t=u instanceof nu.Reader?u:nu.Reader.create(u);let r=e===void 0?t.len:t.pos+e;const i=T9();for(;t.pos<r;){const n=t.uint32();switch(n>>>3){case 1:if(n!==10)break;i.fromAddress=t.string();continue;case 2:if(n!==18)break;i.toAddress=t.string();continue;case 3:if(n!==26)break;i.amount.push(Gu.decode(t,t.uint32()));continue}if((n&7)===4||n===0)break;t.skipType(n&7)}return i},fromJSON(u){return{fromAddress:U9(u.fromAddress)?globalThis.String(u.fromAddress):"",toAddress:U9(u.toAddress)?globalThis.String(u.toAddress):"",amount:globalThis.Array.isArray(u==null?void 0:u.amount)?u.amount.map(e=>Gu.fromJSON(e)):[]}},toJSON(u){var e;const t={};return u.fromAddress!==""&&(t.fromAddress=u.fromAddress),u.toAddress!==""&&(t.toAddress=u.toAddress),!((e=u.amount)===null||e===void 0)&&e.length&&(t.amount=u.amount.map(r=>Gu.toJSON(r))),t},create(u){return X0.fromPartial(u??{})},fromPartial(u){var e,t,r;const i=T9();return i.fromAddress=(e=u.fromAddress)!==null&&e!==void 0?e:"",i.toAddress=(t=u.toAddress)!==null&&t!==void 0?t:"",i.amount=((r=u.amount)===null||r===void 0?void 0:r.map(n=>Gu.fromPartial(n)))||[],i}};function U9(u){return u!=null}function P9(){return{extraBitsStored:0,elems:new Uint8Array(0)}}const Wr={encode(u,e=nu.Writer.create()){return u.extraBitsStored!==0&&e.uint32(8).uint32(u.extraBitsStored),u.elems.length!==0&&e.uint32(18).bytes(u.elems),e},decode(u,e){const t=u instanceof nu.Reader?u:nu.Reader.create(u);let r=e===void 0?t.len:t.pos+e;const i=P9();for(;t.pos<r;){const n=t.uint32();switch(n>>>3){case 1:if(n!==8)break;i.extraBitsStored=t.uint32();continue;case 2:if(n!==18)break;i.elems=t.bytes();continue}if((n&7)===4||n===0)break;t.skipType(n&7)}return i},fromJSON(u){return{extraBitsStored:O9(u.extraBitsStored)?globalThis.Number(u.extraBitsStored):0,elems:O9(u.elems)?ff(u.elems):new Uint8Array(0)}},toJSON(u){const e={};return u.extraBitsStored!==0&&(e.extraBitsStored=Math.round(u.extraBitsStored)),u.elems.length!==0&&(e.elems=cf(u.elems)),e},create(u){return Wr.fromPartial(u??{})},fromPartial(u){var e,t;const r=P9();return r.extraBitsStored=(e=u.extraBitsStored)!==null&&e!==void 0?e:0,r.elems=(t=u.elems)!==null&&t!==void 0?t:new Uint8Array(0),r}};function ff(u){if(globalThis.Buffer)return Uint8Array.from(globalThis.Buffer.from(u,"base64"));{const e=globalThis.atob(u),t=new Uint8Array(e.length);for(let r=0;r<e.length;++r)t[r]=e.charCodeAt(r);return t}}function cf(u){if(globalThis.Buffer)return globalThis.Buffer.from(u).toString("base64");{const e=[];return u.forEach(t=>{e.push(globalThis.String.fromCharCode(t))}),globalThis.btoa(e.join(""))}}function O9(u){return u!=null}function R9(){return{key:new Uint8Array(0)}}const Ar={encode(u,e=nu.Writer.create()){return u.key.length!==0&&e.uint32(10).bytes(u.key),e},decode(u,e){const t=u instanceof nu.Reader?u:nu.Reader.create(u);let r=e===void 0?t.len:t.pos+e;const i=R9();for(;t.pos<r;){const n=t.uint32();switch(n>>>3){case 1:if(n!==10)break;i.key=t.bytes();continue}if((n&7)===4||n===0)break;t.skipType(n&7)}return i},fromJSON(u){return{key:hf(u.key)?lf(u.key):new Uint8Array(0)}},toJSON(u){const e={};return u.key.length!==0&&(e.key=df(u.key)),e},create(u){return Ar.fromPartial(u??{})},fromPartial(u){var e;const t=R9();return t.key=(e=u.key)!==null&&e!==void 0?e:new Uint8Array(0),t}};function lf(u){if(globalThis.Buffer)return Uint8Array.from(globalThis.Buffer.from(u,"base64"));{const e=globalThis.atob(u),t=new Uint8Array(e.length);for(let r=0;r<e.length;++r)t[r]=e.charCodeAt(r);return t}}function df(u){if(globalThis.Buffer)return globalThis.Buffer.from(u).toString("base64");{const e=[];return u.forEach(t=>{e.push(globalThis.String.fromCharCode(t))}),globalThis.btoa(e.join(""))}}function hf(u){return u!=null}nu.util.Long!==$u&&(nu.util.Long=$u,nu.configure());var Wu;(function(u){u[u.SIGN_MODE_UNSPECIFIED=0]="SIGN_MODE_UNSPECIFIED",u[u.SIGN_MODE_DIRECT=1]="SIGN_MODE_DIRECT",u[u.SIGN_MODE_TEXTUAL=2]="SIGN_MODE_TEXTUAL",u[u.SIGN_MODE_DIRECT_AUX=3]="SIGN_MODE_DIRECT_AUX",u[u.SIGN_MODE_LEGACY_AMINO_JSON=127]="SIGN_MODE_LEGACY_AMINO_JSON",u[u.SIGN_MODE_EIP712_V2=128]="SIGN_MODE_EIP712_V2",u[u.SIGN_MODE_EIP_191=191]="SIGN_MODE_EIP_191",u[u.UNRECOGNIZED=-1]="UNRECOGNIZED"})(Wu||(Wu={}));function Ff(u){switch(u){case 0:case"SIGN_MODE_UNSPECIFIED":return Wu.SIGN_MODE_UNSPECIFIED;case 1:case"SIGN_MODE_DIRECT":return Wu.SIGN_MODE_DIRECT;case 2:case"SIGN_MODE_TEXTUAL":return Wu.SIGN_MODE_TEXTUAL;case 3:case"SIGN_MODE_DIRECT_AUX":return Wu.SIGN_MODE_DIRECT_AUX;case 127:case"SIGN_MODE_LEGACY_AMINO_JSON":return Wu.SIGN_MODE_LEGACY_AMINO_JSON;case 128:case"SIGN_MODE_EIP712_V2":return Wu.SIGN_MODE_EIP712_V2;case 191:case"SIGN_MODE_EIP_191":return Wu.SIGN_MODE_EIP_191;case-1:case"UNRECOGNIZED":default:return Wu.UNRECOGNIZED}}function Af(u){switch(u){case Wu.SIGN_MODE_UNSPECIFIED:return"SIGN_MODE_UNSPECIFIED";case Wu.SIGN_MODE_DIRECT:return"SIGN_MODE_DIRECT";case Wu.SIGN_MODE_TEXTUAL:return"SIGN_MODE_TEXTUAL";case Wu.SIGN_MODE_DIRECT_AUX:return"SIGN_MODE_DIRECT_AUX";case Wu.SIGN_MODE_LEGACY_AMINO_JSON:return"SIGN_MODE_LEGACY_AMINO_JSON";case Wu.SIGN_MODE_EIP712_V2:return"SIGN_MODE_EIP712_V2";case Wu.SIGN_MODE_EIP_191:return"SIGN_MODE_EIP_191";case Wu.UNRECOGNIZED:default:return"UNRECOGNIZED"}}nu.util.Long!==$u&&(nu.util.Long=$u,nu.configure());function L9(){return{bodyBytes:new Uint8Array(0),authInfoBytes:new Uint8Array(0),signatures:[]}}const f2={encode(u,e=nu.Writer.create()){u.bodyBytes.length!==0&&e.uint32(10).bytes(u.bodyBytes),u.authInfoBytes.length!==0&&e.uint32(18).bytes(u.authInfoBytes);for(const t of u.signatures)e.uint32(26).bytes(t);return e},decode(u,e){const t=u instanceof nu.Reader?u:nu.Reader.create(u);let r=e===void 0?t.len:t.pos+e;const i=L9();for(;t.pos<r;){const n=t.uint32();switch(n>>>3){case 1:if(n!==10)break;i.bodyBytes=t.bytes();continue;case 2:if(n!==18)break;i.authInfoBytes=t.bytes();continue;case 3:if(n!==26)break;i.signatures.push(t.bytes());continue}if((n&7)===4||n===0)break;t.skipType(n&7)}return i},fromJSON(u){return{bodyBytes:Zu(u.bodyBytes)?i0(u.bodyBytes):new Uint8Array(0),authInfoBytes:Zu(u.authInfoBytes)?i0(u.authInfoBytes):new Uint8Array(0),signatures:globalThis.Array.isArray(u==null?void 0:u.signatures)?u.signatures.map(e=>i0(e)):[]}},toJSON(u){var e;const t={};return u.bodyBytes.length!==0&&(t.bodyBytes=a0(u.bodyBytes)),u.authInfoBytes.length!==0&&(t.authInfoBytes=a0(u.authInfoBytes)),!((e=u.signatures)===null||e===void 0)&&e.length&&(t.signatures=u.signatures.map(r=>a0(r))),t},create(u){return f2.fromPartial(u??{})},fromPartial(u){var e,t,r;const i=L9();return i.bodyBytes=(e=u.bodyBytes)!==null&&e!==void 0?e:new Uint8Array(0),i.authInfoBytes=(t=u.authInfoBytes)!==null&&t!==void 0?t:new Uint8Array(0),i.signatures=((r=u.signatures)===null||r===void 0?void 0:r.map(n=>n))||[],i}};function j9(){return{bodyBytes:new Uint8Array(0),authInfoBytes:new Uint8Array(0),chainId:"",accountNumber:"0"}}const ya={encode(u,e=nu.Writer.create()){return u.bodyBytes.length!==0&&e.uint32(10).bytes(u.bodyBytes),u.authInfoBytes.length!==0&&e.uint32(18).bytes(u.authInfoBytes),u.chainId!==""&&e.uint32(26).string(u.chainId),u.accountNumber!=="0"&&e.uint32(32).uint64(u.accountNumber),e},decode(u,e){const t=u instanceof nu.Reader?u:nu.Reader.create(u);let r=e===void 0?t.len:t.pos+e;const i=j9();for(;t.pos<r;){const n=t.uint32();switch(n>>>3){case 1:if(n!==10)break;i.bodyBytes=t.bytes();continue;case 2:if(n!==18)break;i.authInfoBytes=t.bytes();continue;case 3:if(n!==26)break;i.chainId=t.string();continue;case 4:if(n!==32)break;i.accountNumber=_2(t.uint64());continue}if((n&7)===4||n===0)break;t.skipType(n&7)}return i},fromJSON(u){return{bodyBytes:Zu(u.bodyBytes)?i0(u.bodyBytes):new Uint8Array(0),authInfoBytes:Zu(u.authInfoBytes)?i0(u.authInfoBytes):new Uint8Array(0),chainId:Zu(u.chainId)?globalThis.String(u.chainId):"",accountNumber:Zu(u.accountNumber)?globalThis.String(u.accountNumber):"0"}},toJSON(u){const e={};return u.bodyBytes.length!==0&&(e.bodyBytes=a0(u.bodyBytes)),u.authInfoBytes.length!==0&&(e.authInfoBytes=a0(u.authInfoBytes)),u.chainId!==""&&(e.chainId=u.chainId),u.accountNumber!=="0"&&(e.accountNumber=u.accountNumber),e},create(u){return ya.fromPartial(u??{})},fromPartial(u){var e,t,r,i;const n=j9();return n.bodyBytes=(e=u.bodyBytes)!==null&&e!==void 0?e:new Uint8Array(0),n.authInfoBytes=(t=u.authInfoBytes)!==null&&t!==void 0?t:new Uint8Array(0),n.chainId=(r=u.chainId)!==null&&r!==void 0?r:"",n.accountNumber=(i=u.accountNumber)!==null&&i!==void 0?i:"0",n}};function H9(){return{messages:[],memo:"",timeoutHeight:"0",extensionOptions:[],nonCriticalExtensionOptions:[]}}const Ca={encode(u,e=nu.Writer.create()){for(const t of u.messages)Vu.encode(t,e.uint32(10).fork()).ldelim();u.memo!==""&&e.uint32(18).string(u.memo),u.timeoutHeight!=="0"&&e.uint32(24).uint64(u.timeoutHeight);for(const t of u.extensionOptions)Vu.encode(t,e.uint32(8186).fork()).ldelim();for(const t of u.nonCriticalExtensionOptions)Vu.encode(t,e.uint32(16378).fork()).ldelim();return e},decode(u,e){const t=u instanceof nu.Reader?u:nu.Reader.create(u);let r=e===void 0?t.len:t.pos+e;const i=H9();for(;t.pos<r;){const n=t.uint32();switch(n>>>3){case 1:if(n!==10)break;i.messages.push(Vu.decode(t,t.uint32()));continue;case 2:if(n!==18)break;i.memo=t.string();continue;case 3:if(n!==24)break;i.timeoutHeight=_2(t.uint64());continue;case 1023:if(n!==8186)break;i.extensionOptions.push(Vu.decode(t,t.uint32()));continue;case 2047:if(n!==16378)break;i.nonCriticalExtensionOptions.push(Vu.decode(t,t.uint32()));continue}if((n&7)===4||n===0)break;t.skipType(n&7)}return i},fromJSON(u){return{messages:globalThis.Array.isArray(u==null?void 0:u.messages)?u.messages.map(e=>Vu.fromJSON(e)):[],memo:Zu(u.memo)?globalThis.String(u.memo):"",timeoutHeight:Zu(u.timeoutHeight)?globalThis.String(u.timeoutHeight):"0",extensionOptions:globalThis.Array.isArray(u==null?void 0:u.extensionOptions)?u.extensionOptions.map(e=>Vu.fromJSON(e)):[],nonCriticalExtensionOptions:globalThis.Array.isArray(u==null?void 0:u.nonCriticalExtensionOptions)?u.nonCriticalExtensionOptions.map(e=>Vu.fromJSON(e)):[]}},toJSON(u){var e,t,r;const i={};return!((e=u.messages)===null||e===void 0)&&e.length&&(i.messages=u.messages.map(n=>Vu.toJSON(n))),u.memo!==""&&(i.memo=u.memo),u.timeoutHeight!=="0"&&(i.timeoutHeight=u.timeoutHeight),!((t=u.extensionOptions)===null||t===void 0)&&t.length&&(i.extensionOptions=u.extensionOptions.map(n=>Vu.toJSON(n))),!((r=u.nonCriticalExtensionOptions)===null||r===void 0)&&r.length&&(i.nonCriticalExtensionOptions=u.nonCriticalExtensionOptions.map(n=>Vu.toJSON(n))),i},create(u){return Ca.fromPartial(u??{})},fromPartial(u){var e,t,r,i,n;const D=H9();return D.messages=((e=u.messages)===null||e===void 0?void 0:e.map(f=>Vu.fromPartial(f)))||[],D.memo=(t=u.memo)!==null&&t!==void 0?t:"",D.timeoutHeight=(r=u.timeoutHeight)!==null&&r!==void 0?r:"0",D.extensionOptions=((i=u.extensionOptions)===null||i===void 0?void 0:i.map(f=>Vu.fromPartial(f)))||[],D.nonCriticalExtensionOptions=((n=u.nonCriticalExtensionOptions)===null||n===void 0?void 0:n.map(f=>Vu.fromPartial(f)))||[],D}};function G9(){return{signerInfos:[],fee:void 0,tip:void 0}}const ga={encode(u,e=nu.Writer.create()){for(const t of u.signerInfos)pr.encode(t,e.uint32(10).fork()).ldelim();return u.fee!==void 0&&mr.encode(u.fee,e.uint32(18).fork()).ldelim(),u.tip!==void 0&&Zr.encode(u.tip,e.uint32(26).fork()).ldelim(),e},decode(u,e){const t=u instanceof nu.Reader?u:nu.Reader.create(u);let r=e===void 0?t.len:t.pos+e;const i=G9();for(;t.pos<r;){const n=t.uint32();switch(n>>>3){case 1:if(n!==10)break;i.signerInfos.push(pr.decode(t,t.uint32()));continue;case 2:if(n!==18)break;i.fee=mr.decode(t,t.uint32());continue;case 3:if(n!==26)break;i.tip=Zr.decode(t,t.uint32());continue}if((n&7)===4||n===0)break;t.skipType(n&7)}return i},fromJSON(u){return{signerInfos:globalThis.Array.isArray(u==null?void 0:u.signerInfos)?u.signerInfos.map(e=>pr.fromJSON(e)):[],fee:Zu(u.fee)?mr.fromJSON(u.fee):void 0,tip:Zu(u.tip)?Zr.fromJSON(u.tip):void 0}},toJSON(u){var e;const t={};return!((e=u.signerInfos)===null||e===void 0)&&e.length&&(t.signerInfos=u.signerInfos.map(r=>pr.toJSON(r))),u.fee!==void 0&&(t.fee=mr.toJSON(u.fee)),u.tip!==void 0&&(t.tip=Zr.toJSON(u.tip)),t},create(u){return ga.fromPartial(u??{})},fromPartial(u){var e;const t=G9();return t.signerInfos=((e=u.signerInfos)===null||e===void 0?void 0:e.map(r=>pr.fromPartial(r)))||[],t.fee=u.fee!==void 0&&u.fee!==null?mr.fromPartial(u.fee):void 0,t.tip=u.tip!==void 0&&u.tip!==null?Zr.fromPartial(u.tip):void 0,t}};function z9(){return{publicKey:void 0,modeInfo:void 0,sequence:"0"}}const pr={encode(u,e=nu.Writer.create()){return u.publicKey!==void 0&&Vu.encode(u.publicKey,e.uint32(10).fork()).ldelim(),u.modeInfo!==void 0&&je.encode(u.modeInfo,e.uint32(18).fork()).ldelim(),u.sequence!=="0"&&e.uint32(24).uint64(u.sequence),e},decode(u,e){const t=u instanceof nu.Reader?u:nu.Reader.create(u);let r=e===void 0?t.len:t.pos+e;const i=z9();for(;t.pos<r;){const n=t.uint32();switch(n>>>3){case 1:if(n!==10)break;i.publicKey=Vu.decode(t,t.uint32());continue;case 2:if(n!==18)break;i.modeInfo=je.decode(t,t.uint32());continue;case 3:if(n!==24)break;i.sequence=_2(t.uint64());continue}if((n&7)===4||n===0)break;t.skipType(n&7)}return i},fromJSON(u){return{publicKey:Zu(u.publicKey)?Vu.fromJSON(u.publicKey):void 0,modeInfo:Zu(u.modeInfo)?je.fromJSON(u.modeInfo):void 0,sequence:Zu(u.sequence)?globalThis.String(u.sequence):"0"}},toJSON(u){const e={};return u.publicKey!==void 0&&(e.publicKey=Vu.toJSON(u.publicKey)),u.modeInfo!==void 0&&(e.modeInfo=je.toJSON(u.modeInfo)),u.sequence!=="0"&&(e.sequence=u.sequence),e},create(u){return pr.fromPartial(u??{})},fromPartial(u){var e;const t=z9();return t.publicKey=u.publicKey!==void 0&&u.publicKey!==null?Vu.fromPartial(u.publicKey):void 0,t.modeInfo=u.modeInfo!==void 0&&u.modeInfo!==null?je.fromPartial(u.modeInfo):void 0,t.sequence=(e=u.sequence)!==null&&e!==void 0?e:"0",t}};function K9(){return{single:void 0,multi:void 0}}const je={encode(u,e=nu.Writer.create()){return u.single!==void 0&&Er.encode(u.single,e.uint32(10).fork()).ldelim(),u.multi!==void 0&&Yr.encode(u.multi,e.uint32(18).fork()).ldelim(),e},decode(u,e){const t=u instanceof nu.Reader?u:nu.Reader.create(u);let r=e===void 0?t.len:t.pos+e;const i=K9();for(;t.pos<r;){const n=t.uint32();switch(n>>>3){case 1:if(n!==10)break;i.single=Er.decode(t,t.uint32());continue;case 2:if(n!==18)break;i.multi=Yr.decode(t,t.uint32());continue}if((n&7)===4||n===0)break;t.skipType(n&7)}return i},fromJSON(u){return{single:Zu(u.single)?Er.fromJSON(u.single):void 0,multi:Zu(u.multi)?Yr.fromJSON(u.multi):void 0}},toJSON(u){const e={};return u.single!==void 0&&(e.single=Er.toJSON(u.single)),u.multi!==void 0&&(e.multi=Yr.toJSON(u.multi)),e},create(u){return je.fromPartial(u??{})},fromPartial(u){const e=K9();return e.single=u.single!==void 0&&u.single!==null?Er.fromPartial(u.single):void 0,e.multi=u.multi!==void 0&&u.multi!==null?Yr.fromPartial(u.multi):void 0,e}};function J9(){return{mode:0}}const Er={encode(u,e=nu.Writer.create()){return u.mode!==0&&e.uint32(8).int32(u.mode),e},decode(u,e){const t=u instanceof nu.Reader?u:nu.Reader.create(u);let r=e===void 0?t.len:t.pos+e;const i=J9();for(;t.pos<r;){const n=t.uint32();switch(n>>>3){case 1:if(n!==8)break;i.mode=t.int32();continue}if((n&7)===4||n===0)break;t.skipType(n&7)}return i},fromJSON(u){return{mode:Zu(u.mode)?Ff(u.mode):0}},toJSON(u){const e={};return u.mode!==0&&(e.mode=Af(u.mode)),e},create(u){return Er.fromPartial(u??{})},fromPartial(u){var e;const t=J9();return t.mode=(e=u.mode)!==null&&e!==void 0?e:0,t}};function V9(){return{bitarray:void 0,modeInfos:[]}}const Yr={encode(u,e=nu.Writer.create()){u.bitarray!==void 0&&Wr.encode(u.bitarray,e.uint32(10).fork()).ldelim();for(const t of u.modeInfos)je.encode(t,e.uint32(18).fork()).ldelim();return e},decode(u,e){const t=u instanceof nu.Reader?u:nu.Reader.create(u);let r=e===void 0?t.len:t.pos+e;const i=V9();for(;t.pos<r;){const n=t.uint32();switch(n>>>3){case 1:if(n!==10)break;i.bitarray=Wr.decode(t,t.uint32());continue;case 2:if(n!==18)break;i.modeInfos.push(je.decode(t,t.uint32()));continue}if((n&7)===4||n===0)break;t.skipType(n&7)}return i},fromJSON(u){return{bitarray:Zu(u.bitarray)?Wr.fromJSON(u.bitarray):void 0,modeInfos:globalThis.Array.isArray(u==null?void 0:u.modeInfos)?u.modeInfos.map(e=>je.fromJSON(e)):[]}},toJSON(u){var e;const t={};return u.bitarray!==void 0&&(t.bitarray=Wr.toJSON(u.bitarray)),!((e=u.modeInfos)===null||e===void 0)&&e.length&&(t.modeInfos=u.modeInfos.map(r=>je.toJSON(r))),t},create(u){return Yr.fromPartial(u??{})},fromPartial(u){var e;const t=V9();return t.bitarray=u.bitarray!==void 0&&u.bitarray!==null?Wr.fromPartial(u.bitarray):void 0,t.modeInfos=((e=u.modeInfos)===null||e===void 0?void 0:e.map(r=>je.fromPartial(r)))||[],t}};function $9(){return{amount:[],gasLimit:"0",payer:"",granter:""}}const mr={encode(u,e=nu.Writer.create()){for(const t of u.amount)Gu.encode(t,e.uint32(10).fork()).ldelim();return u.gasLimit!=="0"&&e.uint32(16).uint64(u.gasLimit),u.payer!==""&&e.uint32(26).string(u.payer),u.granter!==""&&e.uint32(34).string(u.granter),e},decode(u,e){const t=u instanceof nu.Reader?u:nu.Reader.create(u);let r=e===void 0?t.len:t.pos+e;const i=$9();for(;t.pos<r;){const n=t.uint32();switch(n>>>3){case 1:if(n!==10)break;i.amount.push(Gu.decode(t,t.uint32()));continue;case 2:if(n!==16)break;i.gasLimit=_2(t.uint64());continue;case 3:if(n!==26)break;i.payer=t.string();continue;case 4:if(n!==34)break;i.granter=t.string();continue}if((n&7)===4||n===0)break;t.skipType(n&7)}return i},fromJSON(u){return{amount:globalThis.Array.isArray(u==null?void 0:u.amount)?u.amount.map(e=>Gu.fromJSON(e)):[],gasLimit:Zu(u.gasLimit)?globalThis.String(u.gasLimit):"0",payer:Zu(u.payer)?globalThis.String(u.payer):"",granter:Zu(u.granter)?globalThis.String(u.granter):""}},toJSON(u){var e;const t={};return!((e=u.amount)===null||e===void 0)&&e.length&&(t.amount=u.amount.map(r=>Gu.toJSON(r))),u.gasLimit!=="0"&&(t.gasLimit=u.gasLimit),u.payer!==""&&(t.payer=u.payer),u.granter!==""&&(t.granter=u.granter),t},create(u){return mr.fromPartial(u??{})},fromPartial(u){var e,t,r,i;const n=$9();return n.amount=((e=u.amount)===null||e===void 0?void 0:e.map(D=>Gu.fromPartial(D)))||[],n.gasLimit=(t=u.gasLimit)!==null&&t!==void 0?t:"0",n.payer=(r=u.payer)!==null&&r!==void 0?r:"",n.granter=(i=u.granter)!==null&&i!==void 0?i:"",n}};function W9(){return{amount:[],tipper:""}}const Zr={encode(u,e=nu.Writer.create()){for(const t of u.amount)Gu.encode(t,e.uint32(10).fork()).ldelim();return u.tipper!==""&&e.uint32(18).string(u.tipper),e},decode(u,e){const t=u instanceof nu.Reader?u:nu.Reader.create(u);let r=e===void 0?t.len:t.pos+e;const i=W9();for(;t.pos<r;){const n=t.uint32();switch(n>>>3){case 1:if(n!==10)break;i.amount.push(Gu.decode(t,t.uint32()));continue;case 2:if(n!==18)break;i.tipper=t.string();continue}if((n&7)===4||n===0)break;t.skipType(n&7)}return i},fromJSON(u){return{amount:globalThis.Array.isArray(u==null?void 0:u.amount)?u.amount.map(e=>Gu.fromJSON(e)):[],tipper:Zu(u.tipper)?globalThis.String(u.tipper):""}},toJSON(u){var e;const t={};return!((e=u.amount)===null||e===void 0)&&e.length&&(t.amount=u.amount.map(r=>Gu.toJSON(r))),u.tipper!==""&&(t.tipper=u.tipper),t},create(u){return Zr.fromPartial(u??{})},fromPartial(u){var e,t;const r=W9();return r.amount=((e=u.amount)===null||e===void 0?void 0:e.map(i=>Gu.fromPartial(i)))||[],r.tipper=(t=u.tipper)!==null&&t!==void 0?t:"",r}};function i0(u){if(globalThis.Buffer)return Uint8Array.from(globalThis.Buffer.from(u,"base64"));{const e=globalThis.atob(u),t=new Uint8Array(e.length);for(let r=0;r<e.length;++r)t[r]=e.charCodeAt(r);return t}}function a0(u){if(globalThis.Buffer)return globalThis.Buffer.from(u).toString("base64");{const e=[];return u.forEach(t=>{e.push(globalThis.String.fromCharCode(t))}),globalThis.btoa(e.join(""))}}function _2(u){return u.toString()}nu.util.Long!==$u&&(nu.util.Long=$u,nu.configure());function Zu(u){return u!=null}var Y9;(function(u){u[u.ACCESS_TYPE_UNSPECIFIED=0]="ACCESS_TYPE_UNSPECIFIED",u[u.ACCESS_TYPE_NOBODY=1]="ACCESS_TYPE_NOBODY",u[u.ACCESS_TYPE_EVERYBODY=3]="ACCESS_TYPE_EVERYBODY",u[u.ACCESS_TYPE_ANY_OF_ADDRESSES=4]="ACCESS_TYPE_ANY_OF_ADDRESSES",u[u.UNRECOGNIZED=-1]="UNRECOGNIZED"})(Y9||(Y9={}));var Z9;(function(u){u[u.CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED=0]="CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED",u[u.CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT=1]="CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT",u[u.CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE=2]="CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE",u[u.CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS=3]="CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS",u[u.UNRECOGNIZED=-1]="UNRECOGNIZED"})(Z9||(Z9={}));nu.util.Long!==$u&&(nu.util.Long=$u,nu.configure());function q9(){return{sender:"",contract:"",msg:new Uint8Array(0),funds:[]}}const u2={encode(u,e=nu.Writer.create()){u.sender!==""&&e.uint32(10).string(u.sender),u.contract!==""&&e.uint32(18).string(u.contract),u.msg.length!==0&&e.uint32(26).bytes(u.msg);for(const t of u.funds)Gu.encode(t,e.uint32(42).fork()).ldelim();return e},decode(u,e){const t=u instanceof nu.Reader?u:nu.Reader.create(u);let r=e===void 0?t.len:t.pos+e;const i=q9();for(;t.pos<r;){const n=t.uint32();switch(n>>>3){case 1:if(n!==10)break;i.sender=t.string();continue;case 2:if(n!==18)break;i.contract=t.string();continue;case 3:if(n!==26)break;i.msg=t.bytes();continue;case 5:if(n!==42)break;i.funds.push(Gu.decode(t,t.uint32()));continue}if((n&7)===4||n===0)break;t.skipType(n&7)}return i},fromJSON(u){return{sender:y1(u.sender)?globalThis.String(u.sender):"",contract:y1(u.contract)?globalThis.String(u.contract):"",msg:y1(u.msg)?pf(u.msg):new Uint8Array(0),funds:globalThis.Array.isArray(u==null?void 0:u.funds)?u.funds.map(e=>Gu.fromJSON(e)):[]}},toJSON(u){var e;const t={};return u.sender!==""&&(t.sender=u.sender),u.contract!==""&&(t.contract=u.contract),u.msg.length!==0&&(t.msg=Ef(u.msg)),!((e=u.funds)===null||e===void 0)&&e.length&&(t.funds=u.funds.map(r=>Gu.toJSON(r))),t},create(u){return u2.fromPartial(u??{})},fromPartial(u){var e,t,r,i;const n=q9();return n.sender=(e=u.sender)!==null&&e!==void 0?e:"",n.contract=(t=u.contract)!==null&&t!==void 0?t:"",n.msg=(r=u.msg)!==null&&r!==void 0?r:new Uint8Array(0),n.funds=((i=u.funds)===null||i===void 0?void 0:i.map(D=>Gu.fromPartial(D)))||[],n}};function pf(u){if(globalThis.Buffer)return Uint8Array.from(globalThis.Buffer.from(u,"base64"));{const e=globalThis.atob(u),t=new Uint8Array(e.length);for(let r=0;r<e.length;++r)t[r]=e.charCodeAt(r);return t}}function Ef(u){if(globalThis.Buffer)return globalThis.Buffer.from(u).toString("base64");{const e=[];return u.forEach(t=>{e.push(globalThis.String.fromCharCode(t))}),globalThis.btoa(e.join(""))}}nu.util.Long!==$u&&(nu.util.Long=$u,nu.configure());function y1(u){return u!=null}function Q9(){return{revisionNumber:"0",revisionHeight:"0"}}const yr={encode(u,e=nu.Writer.create()){return u.revisionNumber!=="0"&&e.uint32(8).uint64(u.revisionNumber),u.revisionHeight!=="0"&&e.uint32(16).uint64(u.revisionHeight),e},decode(u,e){const t=u instanceof nu.Reader?u:nu.Reader.create(u);let r=e===void 0?t.len:t.pos+e;const i=Q9();for(;t.pos<r;){const n=t.uint32();switch(n>>>3){case 1:if(n!==8)break;i.revisionNumber=X9(t.uint64());continue;case 2:if(n!==16)break;i.revisionHeight=X9(t.uint64());continue}if((n&7)===4||n===0)break;t.skipType(n&7)}return i},fromJSON(u){return{revisionNumber:uo(u.revisionNumber)?globalThis.String(u.revisionNumber):"0",revisionHeight:uo(u.revisionHeight)?globalThis.String(u.revisionHeight):"0"}},toJSON(u){const e={};return u.revisionNumber!=="0"&&(e.revisionNumber=u.revisionNumber),u.revisionHeight!=="0"&&(e.revisionHeight=u.revisionHeight),e},create(u){return yr.fromPartial(u??{})},fromPartial(u){var e,t;const r=Q9();return r.revisionNumber=(e=u.revisionNumber)!==null&&e!==void 0?e:"0",r.revisionHeight=(t=u.revisionHeight)!==null&&t!==void 0?t:"0",r}};function X9(u){return u.toString()}nu.util.Long!==$u&&(nu.util.Long=$u,nu.configure());function uo(u){return u!=null}function eo(){return{sourcePort:"",sourceChannel:"",token:void 0,sender:"",receiver:"",timeoutHeight:void 0,timeoutTimestamp:"0",memo:""}}const e2={encode(u,e=nu.Writer.create()){return u.sourcePort!==""&&e.uint32(10).string(u.sourcePort),u.sourceChannel!==""&&e.uint32(18).string(u.sourceChannel),u.token!==void 0&&Gu.encode(u.token,e.uint32(26).fork()).ldelim(),u.sender!==""&&e.uint32(34).string(u.sender),u.receiver!==""&&e.uint32(42).string(u.receiver),u.timeoutHeight!==void 0&&yr.encode(u.timeoutHeight,e.uint32(50).fork()).ldelim(),u.timeoutTimestamp!=="0"&&e.uint32(56).uint64(u.timeoutTimestamp),u.memo!==""&&e.uint32(66).string(u.memo),e},decode(u,e){const t=u instanceof nu.Reader?u:nu.Reader.create(u);let r=e===void 0?t.len:t.pos+e;const i=eo();for(;t.pos<r;){const n=t.uint32();switch(n>>>3){case 1:if(n!==10)break;i.sourcePort=t.string();continue;case 2:if(n!==18)break;i.sourceChannel=t.string();continue;case 3:if(n!==26)break;i.token=Gu.decode(t,t.uint32());continue;case 4:if(n!==34)break;i.sender=t.string();continue;case 5:if(n!==42)break;i.receiver=t.string();continue;case 6:if(n!==50)break;i.timeoutHeight=yr.decode(t,t.uint32());continue;case 7:if(n!==56)break;i.timeoutTimestamp=mf(t.uint64());continue;case 8:if(n!==66)break;i.memo=t.string();continue}if((n&7)===4||n===0)break;t.skipType(n&7)}return i},fromJSON(u){return{sourcePort:Tt(u.sourcePort)?globalThis.String(u.sourcePort):"",sourceChannel:Tt(u.sourceChannel)?globalThis.String(u.sourceChannel):"",token:Tt(u.token)?Gu.fromJSON(u.token):void 0,sender:Tt(u.sender)?globalThis.String(u.sender):"",receiver:Tt(u.receiver)?globalThis.String(u.receiver):"",timeoutHeight:Tt(u.timeoutHeight)?yr.fromJSON(u.timeoutHeight):void 0,timeoutTimestamp:Tt(u.timeoutTimestamp)?globalThis.String(u.timeoutTimestamp):"0",memo:Tt(u.memo)?globalThis.String(u.memo):""}},toJSON(u){const e={};return u.sourcePort!==""&&(e.sourcePort=u.sourcePort),u.sourceChannel!==""&&(e.sourceChannel=u.sourceChannel),u.token!==void 0&&(e.token=Gu.toJSON(u.token)),u.sender!==""&&(e.sender=u.sender),u.receiver!==""&&(e.receiver=u.receiver),u.timeoutHeight!==void 0&&(e.timeoutHeight=yr.toJSON(u.timeoutHeight)),u.timeoutTimestamp!=="0"&&(e.timeoutTimestamp=u.timeoutTimestamp),u.memo!==""&&(e.memo=u.memo),e},create(u){return e2.fromPartial(u??{})},fromPartial(u){var e,t,r,i,n,D;const f=eo();return f.sourcePort=(e=u.sourcePort)!==null&&e!==void 0?e:"",f.sourceChannel=(t=u.sourceChannel)!==null&&t!==void 0?t:"",f.token=u.token!==void 0&&u.token!==null?Gu.fromPartial(u.token):void 0,f.sender=(r=u.sender)!==null&&r!==void 0?r:"",f.receiver=(i=u.receiver)!==null&&i!==void 0?i:"",f.timeoutHeight=u.timeoutHeight!==void 0&&u.timeoutHeight!==null?yr.fromPartial(u.timeoutHeight):void 0,f.timeoutTimestamp=(n=u.timeoutTimestamp)!==null&&n!==void 0?n:"0",f.memo=(D=u.memo)!==null&&D!==void 0?D:"",f}};function mf(u){return u.toString()}nu.util.Long!==$u&&(nu.util.Long=$u,nu.configure());function Tt(u){return u!=null}var to;(function(u){u.Erc20Contract="erc20-contract",u.Peggy="peggy-contract",u.PeggyOld="peggy-old-contract"})(to||(to={}));var Bi;(function(u){u.Auction="chain-auction",u.Auth="chain-auth",u.Authz="chain-authz",u.Bank="chain-bank",u.Distribution="chain-distribution",u.Exchange="chain-exchange",u.Gov="chain-gov",u.Ibc="chain-ibc",u.InsuranceFund="chain-insurance",u.Mint="chain-mint",u.Oracle="chain-oracle",u.Peggy="chain-peggy",u.Staking="chain-staking",u.Wasm="chain-wasm",u.WasmX="chain-wasmx",u.Tendermint="chain-tendermint"})(Bi||(Bi={}));var wi;(function(u){u.Account="indexer-account",u.Auction="indexer-auction",u.Derivatives="indexer-derivatives",u.Explorer="indexer-explorer",u.InsuranceFund="indexer-insurance-fund",u.Meta="indexer-meta",u.Mito="indexer-mito",u.Dmm="dmm",u.Oracle="indexer-oracle",u.Portfolio="indexer-portfolio",u.Spot="indexer-spot",u.Transaction="indexer-transaction",u.Trading="indexer-trading",u.ChronosDerivative="indexer-chronos-derivative",u.ChronosSpot="indexer-chronos-spot",u.ChronosMarkets="indexer-chronos-markets",u.Campaign="indexer-campaign"})(wi||(wi={}));var ro;(function(u){u.SignTransaction="sign-transaction",u.SignEthereumTransaction="sign-ethereum-transaction",u.SendTransaction="send-transaction",u.SendEthereumTransaction="send-ethereum-transaction",u.SignArbitrary="sign-arbitrary",u.GetAccounts="get-accounts",u.GetNetworkId="get-network-id",u.GetChainId="get-chain-id",u.GetEthereumTransactionReceipt="get-ethereum-transaction-receipt"})(ro||(ro={}));var no;(function(u){u.Auction="auction",u.CosmosSdk="sdk",u.Staking="staking",u.Bank="bank",u.Distribution="distribution",u.Gov="gov",u.Exchange="exchange",u.Insurance="insurance",u.Ocr="ocr",u.Oracle="oracle",u.Peggy="peggy",u.TokenFactory="tokenfactory",u.Wasmx="wasmx",u.Wasm="wasm",u.AuthZ="authz"})(no||(no={}));var io;(function(u){u[u.ErrTxDecode=2]="ErrTxDecode",u[u.ErrInvalidSequence=3]="ErrInvalidSequence",u[u.ErrUnauthorized=4]="ErrUnauthorized",u[u.ErrInsufficientFunds=5]="ErrInsufficientFunds",u[u.ErrUnknownRequest=6]="ErrUnknownRequest",u[u.ErrInvalidAddress=7]="ErrInvalidAddress",u[u.ErrInvalidPubKey=8]="ErrInvalidPubKey",u[u.ErrUnknownAddress=9]="ErrUnknownAddress",u[u.ErrInvalidCoins=10]="ErrInvalidCoins",u[u.ErrOutOfGas=11]="ErrOutOfGas",u[u.ErrMemoTooLarge=12]="ErrMemoTooLarge",u[u.ErrInsufficientFee=13]="ErrInsufficientFee",u[u.ErrTooManySignatures=14]="ErrTooManySignatures",u[u.ErrNoSignatures=15]="ErrNoSignatures",u[u.ErrJSONMarshal=16]="ErrJSONMarshal",u[u.ErrJSONUnmarshal=17]="ErrJSONUnmarshal",u[u.ErrInvalidRequest=18]="ErrInvalidRequest",u[u.ErrTxInMempoolCache=19]="ErrTxInMempoolCache",u[u.ErrMempoolIsFull=20]="ErrMempoolIsFull",u[u.ErrTxTooLarge=21]="ErrTxTooLarge",u[u.ErrKeyNotFound=22]="ErrKeyNotFound",u[u.ErrWrongPassword=23]="ErrWrongPassword",u[u.ErrorInvalidSigner=24]="ErrorInvalidSigner",u[u.ErrorInvalidGasAdjustment=25]="ErrorInvalidGasAdjustment",u[u.ErrInvalidHeight=26]="ErrInvalidHeight",u[u.ErrInvalidVersion=27]="ErrInvalidVersion",u[u.ErrInvalidChainID=28]="ErrInvalidChainID",u[u.ErrInvalidType=29]="ErrInvalidType",u[u.ErrTxTimeoutHeight=30]="ErrTxTimeoutHeight",u[u.ErrUnknownExtensionOptions=31]="ErrUnknownExtensionOptions",u[u.ErrWrongSequence=32]="ErrWrongSequence",u[u.ErrPackAny=33]="ErrPackAny",u[u.ErrUnpackAny=34]="ErrUnpackAny",u[u.ErrLogic=35]="ErrLogic",u[u.ErrConflict=36]="ErrConflict",u[u.ErrNotSupported=37]="ErrNotSupported",u[u.ErrNotFound=38]="ErrNotFound",u[u.ErrIO=39]="ErrIO",u[u.ErrAppConfig=40]="ErrAppConfig",u[u.ErrInvalidGasLimit=41]="ErrInvalidGasLimit"})(io||(io={}));var ao;(function(u){u[u.ErrOrderInvalid=1]="ErrOrderInvalid",u[u.ErrSpotMarketNotFound=2]="ErrSpotMarketNotFound",u[u.ErrSpotMarketExists=3]="ErrSpotMarketExists",u[u.ErrBadField=4]="ErrBadField",u[u.ErrMarketInvalid=5]="ErrMarketInvalid",u[u.ErrInsufficientDeposit=6]="ErrInsufficientDeposit",u[u.ErrUnrecognizedOrderType=7]="ErrUnrecognizedOrderType",u[u.ErrInsufficientPositionQuantity=8]="ErrInsufficientPositionQuantity",u[u.ErrOrderHashInvalid=9]="ErrOrderHashInvalid",u[u.ErrBadSubaccountID=10]="ErrBadSubaccountID",u[u.ErrInvalidTicker=11]="ErrInvalidTicker",u[u.ErrInvalidBaseDenom=12]="ErrInvalidBaseDenom",u[u.ErrInvalidQuoteDenom=13]="ErrInvalidQuoteDenom",u[u.ErrInvalidOracle=14]="ErrInvalidOracle",u[u.ErrInvalidExpiry=15]="ErrInvalidExpiry",u[u.ErrInvalidPrice=16]="ErrInvalidPrice",u[u.ErrInvalidQuantity=17]="ErrInvalidQuantity",u[u.ErrUnsupportedOracleType=18]="ErrUnsupportedOracleType",u[u.ErrOrderDoesntExist=19]="ErrOrderDoesntExist",u[u.ErrOrderbookFillInvalid=20]="ErrOrderbookFillInvalid",u[u.ErrPerpetualMarketExists=21]="ErrPerpetualMarketExists",u[u.ErrExpiryFuturesMarketExists=22]="ErrExpiryFuturesMarketExists",u[u.ErrExpiryFuturesMarketExpired=23]="ErrExpiryFuturesMarketExpired",u[u.ErrNoLiquidity=24]="ErrNoLiquidity",u[u.ErrSlippageExceedsWorstPrice=25]="ErrSlippageExceedsWorstPrice",u[u.ErrInsufficientOrderMargin=26]="ErrInsufficientOrderMargin",u[u.ErrDerivativeMarketNotFound=27]="ErrDerivativeMarketNotFound",u[u.ErrPositionNotFound=28]="ErrPositionNotFound",u[u.ErrInvalidReduceOnlyPositionDirection=29]="ErrInvalidReduceOnlyPositionDirection",u[u.ErrPriceSurpassesBankruptcyPrice=30]="ErrPriceSurpassesBankruptcyPrice",u[u.ErrPositionNotLiquidable=31]="ErrPositionNotLiquidable",u[u.ErrInvalidTriggerPrice=32]="ErrInvalidTriggerPrice",u[u.ErrInvalidOracleType=33]="ErrInvalidOracleType",u[u.ErrInvalidPriceTickSize=34]="ErrInvalidPriceTickSize",u[u.ErrInvalidQuantityTickSize=35]="ErrInvalidQuantityTickSize",u[u.ErrInvalidMargin=36]="ErrInvalidMargin",u[u.ErrExceedsOrderSideCount=37]="ErrExceedsOrderSideCount",u[u.ErrMarketOrderAlreadyExists=38]="ErrMarketOrderAlreadyExists",u[u.ErrConditionalMarketOrderAlreadyExists=39]="ErrConditionalMarketOrderAlreadyExists",u[u.ErrMarketLaunchProposalAlreadyExists=40]="ErrMarketLaunchProposalAlreadyExists",u[u.ErrInvalidMarketStatus=41]="ErrInvalidMarketStatus",u[u.ErrSameDenoms=42]="ErrSameDenoms",u[u.ErrSameOracles=43]="ErrSameOracles",u[u.ErrFeeRatesRelation=44]="ErrFeeRatesRelation",u[u.ErrMarginsRelation=45]="ErrMarginsRelation",u[u.ErrExceedsMaxOracleScaleFactor=46]="ErrExceedsMaxOracleScaleFactor",u[u.ErrSpotExchangeNotEnabled=47]="ErrSpotExchangeNotEnabled",u[u.ErrDerivativesExchangeNotEnabled=48]="ErrDerivativesExchangeNotEnabled",u[u.ErrOraclePriceDeltaExceedsThreshold=49]="ErrOraclePriceDeltaExceedsThreshold",u[u.ErrInvalidHourlyInterestRate=50]="ErrInvalidHourlyInterestRate",u[u.ErrInvalidHourlyFundingRateCap=51]="ErrInvalidHourlyFundingRateCap",u[u.ErrInvalidMarketFundingParamUpdate=52]="ErrInvalidMarketFundingParamUpdate",u[u.ErrInvalidTradingRewardCampaign=53]="ErrInvalidTradingRewardCampaign",u[u.ErrInvalidFeeDiscountSchedule=54]="ErrInvalidFeeDiscountSchedule",u[u.ErrInvalidLiquidationOrder=55]="ErrInvalidLiquidationOrder",u[u.ErrTradingRewardCampaignDistributionError=56]="ErrTradingRewardCampaignDistributionError",u[u.ErrInvalidTradingRewardsPendingPointsUpdate=57]="ErrInvalidTradingRewardsPendingPointsUpdate",u[u.ErrInvalidBatchMsgUpdate=58]="ErrInvalidBatchMsgUpdate",u[u.ErrExceedsTopOfBookPrice=59]="ErrExceedsTopOfBookPrice",u[u.ErrInvalidOrderTypeForMessage=60]="ErrInvalidOrderTypeForMessage",u[u.ErrInvalidDMMSender=61]="ErrInvalidDMMSender",u[u.ErrAlreadyOptedOutOfRewards=62]="ErrAlreadyOptedOutOfRewards",u[u.ErrInvalidMarginRatio=63]="ErrInvalidMarginRatio",u[u.ErrBelowMinimalContribution=64]="ErrBelowMinimalContribution",u[u.ErrLowPositionMargin=65]="ErrLowPositionMargin",u[u.ErrInvalidTotalSupply=66]="ErrInvalidTotalSupply",u[u.ErrInvalidLpTokenBurnAmount=67]="ErrInvalidLpTokenBurnAmount",u[u.ErrUnsupportedAction=68]="ErrUnsupportedAction",u[u.ErrNegativePositionQuantity=69]="ErrNegativePositionQuantity",u[u.ErrBinaryOptionsMarketExists=70]="ErrBinaryOptionsMarketExists",u[u.ErrBinaryOptionsMarketNotFound=71]="ErrBinaryOptionsMarketNotFound",u[u.ErrInvalidSettlement=72]="ErrInvalidSettlement",u[u.ErrAccountDoesntExist=73]="ErrAccountDoesntExist",u[u.ErrSenderIsNotAnAdmin=74]="ErrSenderIsNotAnAdmin",u[u.ErrMarketAlreadyScheduledToSettle=75]="ErrMarketAlreadyScheduledToSettle",u[u.ErrGenericMarketNotFound=76]="ErrGenericMarketNotFound",u[u.ErrInvalidDenomDecimal=77]="ErrInvalidDenomDecimal",u[u.ErrInvalidState=78]="ErrInvalidState",u[u.ErrTransientOrdersUpToCancelNotSupported=79]="ErrTransientOrdersUpToCancelNotSupported",u[u.ErrInvalidTrade=80]="ErrInvalidTrade",u[u.ErrNoMarginLocked=81]="ErrNoMarginLocked",u[u.ErrInvalidAccessLevel=82]="ErrInvalidAccessLevel",u[u.ErrInvalidAddress=83]="ErrInvalidAddress",u[u.ErrInvalidArgument=84]="ErrInvalidArgument",u[u.ErrInvalidFundsDirection=85]="ErrInvalidFundsDirection",u[u.ErrNoFundsProvided=86]="ErrNoFundsProvided",u[u.ErrInvalidSignature=87]="ErrInvalidSignature",u[u.ErrNoFundsToUnlock=88]="ErrNoFundsToUnlock",u[u.ErrNoMsgsProvided=89]="ErrNoMsgsProvided",u[u.ErrNoMsgProvided=90]="ErrNoMsgProvided",u[u.ErrInvalidAmount=91]="ErrInvalidAmount",u[u.ErrFeatureDisabled=92]="ErrFeatureDisabled",u[u.ErrTooMuchOrderMargin=93]="ErrTooMuchOrderMargin",u[u.ErrBadSubaccountNonce=94]="ErrBadSubaccountNonce",u[u.ErrInsufficientFunds=95]="ErrInsufficientFunds",u[u.ErrPostOnlyMode=96]="ErrPostOnlyMode",u[u.ErrClientOrderIdAlreadyExists=97]="ErrClientOrderIdAlreadyExists",u[u.ErrInvalidCid=98]="ErrInvalidCid"})(ao||(ao={}));var oo;(function(u){u[u.ErrBidInvalid=1]="ErrBidInvalid",u[u.ErrBidRound=2]="ErrBidRound"})(oo||(oo={}));var so;(function(u){u[u.ErrNoAuthorizationFound=2]="ErrNoAuthorizationFound",u[u.ErrInvalidExpirationTime=3]="ErrInvalidExpirationTime",u[u.ErrUnknownAuthorizationType=4]="ErrUnknownAuthorizationType",u[u.ErrNoGrantKeyFound=5]="ErrNoGrantKeyFound",u[u.ErrAuthorizationExpired=6]="ErrAuthorizationExpired",u[u.ErrGranteeIsGranter=7]="ErrGranteeIsGranter",u[u.ErrAuthorizationNumOfSigners=9]="ErrAuthorizationNumOfSigners",u[u.ErrNegativeMaxTokens=12]="ErrNegativeMaxTokens"})(so||(so={}));var Do;(function(u){u[u.ErrInsuranceFundAlreadyExists=1]="ErrInsuranceFundAlreadyExists",u[u.ErrInsuranceFundNotFound=2]="ErrInsuranceFundNotFound",u[u.ErrRedemptionAlreadyExists=3]="ErrRedemptionAlreadyExists",u[u.ErrInvalidDepositAmount=4]="ErrInvalidDepositAmount",u[u.ErrInvalidDepositDenom=5]="ErrInvalidDepositDenom",u[u.ErrPayoutTooLarge=6]="ErrPayoutTooLarge",u[u.ErrInvalidTicker=7]="ErrInvalidTicker",u[u.ErrInvalidQuoteDenom=8]="ErrInvalidQuoteDenom",u[u.ErrInvalidOracle=9]="ErrInvalidOracle",u[u.ErrInvalidExpirationTime=10]="ErrInvalidExpirationTime",u[u.ErrInvalidMarketID=11]="ErrInvalidMarketID",u[u.ErrInvalidShareDenom=12]="ErrInvalidShareDenom"})(Do||(Do={}));var fo;(function(u){u[u.ErrStaleReport=1]="ErrStaleReport",u[u.ErrIncompleteProposal=2]="ErrIncompleteProposal",u[u.ErrRepeatedAddress=3]="ErrRepeatedAddress",u[u.ErrTooManySigners=4]="ErrTooManySigners",u[u.ErrIncorrectConfig=5]="ErrIncorrectConfig",u[u.ErrConfigDigestNotMatch=6]="ErrConfigDigestNotMatch",u[u.ErrWrongNumberOfSignatures=7]="ErrWrongNumberOfSignatures",u[u.ErrIncorrectSignature=8]="ErrIncorrectSignature",u[u.ErrNoTransmitter=9]="ErrNoTransmitter",u[u.ErrIncorrectTransmissionData=10]="ErrIncorrectTransmissionData",u[u.ErrNoTransmissionsFound=11]="ErrNoTransmissionsFound",u[u.ErrMedianValueOutOfBounds=12]="ErrMedianValueOutOfBounds",u[u.ErrIncorrectRewardPoolDenom=13]="ErrIncorrectRewardPoolDenom",u[u.ErrNoRewardPool=14]="ErrNoRewardPool",u[u.ErrInvalidPayees=15]="ErrInvalidPayees",u[u.ErrModuleAdminRestricted=16]="ErrModuleAdminRestricted",u[u.ErrFeedAlreadyExists=17]="ErrFeedAlreadyExists",u[u.ErrFeedDoesntExists=19]="ErrFeedDoesntExists",u[u.ErrAdminRestricted=20]="ErrAdminRestricted",u[u.ErrInsufficientRewardPool=21]="ErrInsufficientRewardPool",u[u.ErrPayeeAlreadySet=22]="ErrPayeeAlreadySet",u[u.ErrPayeeRestricted=23]="ErrPayeeRestricted",u[u.ErrFeedConfigNotFound=24]="ErrFeedConfigNotFound"})(fo||(fo={}));var co;(function(u){u[u.ErrEmptyRelayerAddr=1]="ErrEmptyRelayerAddr",u[u.ErrBadRatesCount=2]="ErrBadRatesCount",u[u.ErrBadResolveTimesCount=3]="ErrBadResolveTimesCount",u[u.ErrBadRequestIDsCount=4]="ErrBadRequestIDsCount",u[u.ErrRelayerNotAuthorized=5]="ErrRelayerNotAuthorized",u[u.ErrBadPriceFeedBaseCount=6]="ErrBadPriceFeedBaseCount",u[u.ErrBadPriceFeedQuoteCount=7]="ErrBadPriceFeedQuoteCount",u[u.ErrUnsupportedOracleType=8]="ErrUnsupportedOracleType",u[u.ErrBadMessagesCount=9]="ErrBadMessagesCount",u[u.ErrBadCoinbaseMessage=10]="ErrBadCoinbaseMessage",u[u.ErrInvalidEthereumSignature=11]="ErrInvalidEthereumSignature",u[u.ErrBadCoinbaseMessageTimestamp=12]="ErrBadCoinbaseMessageTimestamp",u[u.ErrCoinbasePriceNotFound=13]="ErrCoinbasePriceNotFound",u[u.ErrBadPrice=14]="ErrBadPrice",u[u.ErrPriceTooLarge=15]="ErrPriceTooLarge",u[u.ErrInvalidBandIBCRequest=16]="ErrInvalidBandIBCRequest",u[u.ErrSample=17]="ErrSample",u[u.ErrInvalidPacketTimeout=18]="ErrInvalidPacketTimeout",u[u.ErrBadSymbolsCount=19]="ErrBadSymbolsCount",u[u.ErrBadIBCPortBind=20]="ErrBadIBCPortBind",u[u.ErrInvalidPortID=21]="ErrInvalidPortID",u[u.ErrInvalidChannelID=22]="ErrInvalidChannelID",u[u.ErrBadRequestInterval=23]="ErrBadRequestInterval",u[u.ErrInvalidBandIBCUpdateRequest=24]="ErrInvalidBandIBCUpdateRequest",u[u.ErrBandIBCRequestNotFound=25]="ErrBandIBCRequestNotFound",u[u.ErrEmptyBaseInfo=26]="ErrEmptyBaseInfo",u[u.ErrEmptyProvider=27]="ErrEmptyProvider",u[u.ErrInvalidProvider=28]="ErrInvalidProvider",u[u.ErrInvalidSymbol=29]="ErrInvalidSymbol",u[u.ErrRelayerAlreadyExists=30]="ErrRelayerAlreadyExists",u[u.ErrProviderPriceNotFound=31]="ErrProviderPriceNotFound",u[u.ErrInvalidOracleRequest=32]="ErrInvalidOracleRequest",u[u.ErrOraclePriceNotFound=33]="ErrOraclePriceNotFound"})(co||(co={}));var lo;(function(u){u[u.ErrInternal=1]="ErrInternal",u[u.ErrDuplicate=2]="ErrDuplicate",u[u.ErrInvalid=3]="ErrInvalid",u[u.ErrTimeout=4]="ErrTimeout",u[u.ErrUnknown=5]="ErrUnknown",u[u.ErrEmpty=6]="ErrEmpty",u[u.ErrOutdated=7]="ErrOutdated",u[u.ErrUnsupported=8]="ErrUnsupported",u[u.ErrNonContiguousEventNonce=9]="ErrNonContiguousEventNonce",u[u.ErrNoUnbatchedTxsFound=10]="ErrNoUnbatchedTxsFound",u[u.ErrResetDelegateKeys=11]="ErrResetDelegateKeys",u[u.ErrSupplyOverflow=12]="ErrSupplyOverflow",u[u.ErrInvalidEthSender=13]="ErrInvalidEthSender",u[u.ErrInvalidEthDestination=14]="ErrInvalidEthDestination"})(lo||(lo={}));var ho;(function(u){u[u.ErrDenomExists=2]="ErrDenomExists",u[u.ErrUnauthorized=3]="ErrUnauthorized",u[u.ErrInvalidDenom=4]="ErrInvalidDenom",u[u.ErrInvalidCreator=5]="ErrInvalidCreator",u[u.ErrInvalidAuthorityMetadata=6]="ErrInvalidAuthorityMetadata",u[u.ErrInvalidGenesis=7]="ErrInvalidGenesis",u[u.ErrSubdenomTooLong=8]="ErrSubdenomTooLong",u[u.ErrSubdenomTooShort=9]="ErrSubdenomTooShort",u[u.ErrSubdenomNestedTooShort=10]="ErrSubdenomNestedTooShort",u[u.ErrCreatorTooLong=11]="ErrCreatorTooLong",u[u.ErrDenomDoesNotExist=12]="ErrDenomDoesNotExist",u[u.ErrAmountNotPositive=13]="ErrAmountNotPositive"})(ho||(ho={}));var Fo;(function(u){u[u.ErrInvalidGasLimit=1]="ErrInvalidGasLimit",u[u.ErrInvalidGasPrice=2]="ErrInvalidGasPrice",u[u.ErrInvalidContractAddress=3]="ErrInvalidContractAddress",u[u.ErrAlreadyRegistered=4]="ErrAlreadyRegistered",u[u.ErrDuplicateContract=5]="ErrDuplicateContract",u[u.ErrNoContractAddresses=6]="ErrNoContractAddresses",u[u.ErrInvalidCodeId=7]="ErrInvalidCodeId"})(Fo||(Fo={}));var Ao;(function(u){u[u.ErrEmptyValidatorAddr=2]="ErrEmptyValidatorAddr",u[u.ErrNoValidatorFound=3]="ErrNoValidatorFound",u[u.ErrValidatorOwnerExists=4]="ErrValidatorOwnerExists",u[u.ErrValidatorPubKeyExists=5]="ErrValidatorPubKeyExists",u[u.ErrValidatorPubKeyTypeNotSupported=6]="ErrValidatorPubKeyTypeNotSupported",u[u.ErrValidatorJailed=7]="ErrValidatorJailed",u[u.ErrBadRemoveValidator=8]="ErrBadRemoveValidator",u[u.ErrCommissionNegative=9]="ErrCommissionNegative",u[u.ErrCommissionHuge=10]="ErrCommissionHuge",u[u.ErrCommissionGTMaxRate=11]="ErrCommissionGTMaxRate",u[u.ErrCommissionUpdateTime=12]="ErrCommissionUpdateTime",u[u.ErrCommissionChangeRateNegative=13]="ErrCommissionChangeRateNegative",u[u.ErrCommissionChangeRateGTMaxRate=14]="ErrCommissionChangeRateGTMaxRate",u[u.ErrCommissionGTMaxChangeRate=15]="ErrCommissionGTMaxChangeRate",u[u.ErrSelfDelegationBelowMinimum=16]="ErrSelfDelegationBelowMinimum",u[u.ErrMinSelfDelegationDecreased=17]="ErrMinSelfDelegationDecreased",u[u.ErrEmptyDelegatorAddr=18]="ErrEmptyDelegatorAddr",u[u.ErrNoDelegation=19]="ErrNoDelegation",u[u.ErrBadDelegatorAddr=20]="ErrBadDelegatorAddr",u[u.ErrNoDelegatorForAddress=21]="ErrNoDelegatorForAddress",u[u.ErrInsufficientShares=22]="ErrInsufficientShares",u[u.ErrDelegationValidatorEmpty=23]="ErrDelegationValidatorEmpty",u[u.ErrNotEnoughDelegationShares=24]="ErrNotEnoughDelegationShares",u[u.ErrNotMature=25]="ErrNotMature",u[u.ErrNoUnbondingDelegation=26]="ErrNoUnbondingDelegation",u[u.ErrMaxUnbondingDelegationEntries=27]="ErrMaxUnbondingDelegationEntries",u[u.ErrNoRedelegation=28]="ErrNoRedelegation",u[u.ErrSelfRedelegation=29]="ErrSelfRedelegation",u[u.ErrTinyRedelegationAmount=30]="ErrTinyRedelegationAmount",u[u.ErrBadRedelegationDst=31]="ErrBadRedelegationDst",u[u.ErrTransitiveRedelegation=32]="ErrTransitiveRedelegation",u[u.ErrMaxRedelegationEntries=33]="ErrMaxRedelegationEntries",u[u.ErrDelegatorShareExRateInvalid=34]="ErrDelegatorShareExRateInvalid",u[u.ErrBothShareMsgsGiven=35]="ErrBothShareMsgsGiven",u[u.ErrNeitherShareMsgsGiven=36]="ErrNeitherShareMsgsGiven",u[u.ErrInvalidHistoricalInfo=37]="ErrInvalidHistoricalInfo",u[u.ErrNoHistoricalInfo=38]="ErrNoHistoricalInfo",u[u.ErrEmptyValidatorPubKey=39]="ErrEmptyValidatorPubKey",u[u.ErrCommissionLTMinRate=40]="ErrCommissionLTMinRate",u[u.ErrUnbondingNotFound=41]="ErrUnbondingNotFound",u[u.ErrUnbondingOnHoldRefCountNegative=42]="ErrUnbondingOnHoldRefCountNegative"})(Ao||(Ao={}));var po;(function(u){u[u.ErrUnknownProposal=2]="ErrUnknownProposal",u[u.ErrInactiveProposal=3]="ErrInactiveProposal",u[u.ErrAlreadyActiveProposal=4]="ErrAlreadyActiveProposal",u[u.ErrInvalidProposalContent=5]="ErrInvalidProposalContent",u[u.ErrInvalidProposalType=6]="ErrInvalidProposalType",u[u.ErrInvalidVote=7]="ErrInvalidVote",u[u.ErrInvalidGenesis=8]="ErrInvalidGenesis",u[u.ErrNoProposalHandlerExists=9]="ErrNoProposalHandlerExists",u[u.ErrUnroutableProposalMsg=10]="ErrUnroutableProposalMsg",u[u.ErrNoProposalMsgs=11]="ErrNoProposalMsgs",u[u.ErrInvalidProposalMsg=12]="ErrInvalidProposalMsg",u[u.ErrInvalidSigner=13]="ErrInvalidSigner",u[u.ErrInvalidSignalMsg=14]="ErrInvalidSignalMsg",u[u.ErrMetadataTooLong=15]="ErrMetadataTooLong",u[u.ErrMinDepositTooSmall=16]="ErrMinDepositTooSmall",u[u.ErrProposalNotFound=17]="ErrProposalNotFound",u[u.ErrInvalidProposer=18]="ErrInvalidProposer",u[u.ErrNoDeposits=19]="ErrNoDeposits",u[u.ErrVotingPeriodEnded=20]="ErrVotingPeriodEnded",u[u.ErrInvalidProposal=21]="ErrInvalidProposal"})(po||(po={}));var Eo;(function(u){u[u.ErrEmptyDelegatorAddr=2]="ErrEmptyDelegatorAddr",u[u.ErrEmptyWithdrawAddr=3]="ErrEmptyWithdrawAddr",u[u.ErrEmptyValidatorAddr=4]="ErrEmptyValidatorAddr",u[u.ErrEmptyDelegationDistInfo=5]="ErrEmptyDelegationDistInfo",u[u.ErrNoValidatorDistInfo=6]="ErrNoValidatorDistInfo",u[u.ErrNoValidatorCommission=7]="ErrNoValidatorCommission",u[u.ErrSetWithdrawAddrDisabled=8]="ErrSetWithdrawAddrDisabled",u[u.ErrBadDistribution=9]="ErrBadDistribution",u[u.ErrInvalidProposalAmount=10]="ErrInvalidProposalAmount",u[u.ErrEmptyProposalRecipient=11]="ErrEmptyProposalRecipient",u[u.ErrNoValidatorExists=12]="ErrNoValidatorExists",u[u.ErrNoDelegationExists=13]="ErrNoDelegationExists"})(Eo||(Eo={}));var mo;(function(u){u[u.ErrNoInputs=2]="ErrNoInputs",u[u.ErrNoOutputs=3]="ErrNoOutputs",u[u.ErrInputOutputMismatch=4]="ErrInputOutputMismatch",u[u.ErrSendDisabled=5]="ErrSendDisabled",u[u.ErrDenomMetadataNotFound=6]="ErrDenomMetadataNotFound",u[u.ErrInvalidKey=7]="ErrInvalidKey",u[u.ErrDuplicateEntry=8]="ErrDuplicateEntry",u[u.ErrMultipleSenders=9]="ErrMultipleSenders"})(mo||(mo={}));var yo;(function(u){u[u.ErrCreateFailed=2]="ErrCreateFailed",u[u.ErrAccountExists=3]="ErrAccountExists",u[u.ErrInstantiateFailed=4]="ErrInstantiateFailed",u[u.ErrExecuteFailed=5]="ErrExecuteFailed",u[u.ErrGasLimit=6]="ErrGasLimit",u[u.ErrInvalidGenesis=7]="ErrInvalidGenesis",u[u.ErrNotFound=8]="ErrNotFound",u[u.ErrQueryFailed=9]="ErrQueryFailed",u[u.ErrInvalidMsg=10]="ErrInvalidMsg",u[u.ErrMigrationFailed=11]="ErrMigrationFailed",u[u.ErrEmpty=12]="ErrEmpty",u[u.ErrLimit=13]="ErrLimit",u[u.ErrInvalid=14]="ErrInvalid",u[u.ErrDuplicate=15]="ErrDuplicate",u[u.ErrMaxIBCChannels=16]="ErrMaxIBCChannels",u[u.ErrUnsupportedForContract=17]="ErrUnsupportedForContract",u[u.ErrPinContractFailed=18]="ErrPinContractFailed",u[u.ErrUnpinContractFailed=19]="ErrUnpinContractFailed",u[u.ErrUnknownMsg=20]="ErrUnknownMsg",u[u.ErrInvalidEvent=21]="ErrInvalidEvent"})(yo||(yo={}));const C1=-1;ma.grpc.Code.Unavailable;var Co;(function(u){u.Get="GET",u.Post="POST",u.Options="OPTIONS"})(Co||(Co={}));var o0;(function(u){u.Unspecified="unspecified",u.ChainError="chain-error",u.ExecutionError="execution-error",u.NotFoundError="not-found-error",u.ValidationError="validation-error",u.WalletError="wallet-error",u.WalletNotInstalledError="wallet-not-installed-error",u.GrpcUnaryRequest="grpc-unary-request",u.HttpRequest="http-request",u.Web3="web3"})(o0||(o0={}));const g1=u=>`${u}`.toLowerCase().replace(new RegExp(/[-_]+/,"g")," ").replace(new RegExp(/[^\w\s]/,"g"),"").replace(new RegExp(/\s+(.)(\w*)/,"g"),(e,t,r)=>`${t.toUpperCase()+r}`).replace(new RegExp(/\w/),e=>e.toUpperCase());class L8 extends Error{constructor(t,r){super(t.message);Fe(this,"type",o0.Unspecified);Fe(this,"code",C1);Fe(this,"name");Fe(this,"errorClass");Fe(this,"context");Fe(this,"contextModule");Fe(this,"contextCode");Fe(this,"message","");Fe(this,"stack","");Fe(this,"originalMessage","");this.parseError(t),this.parseContext(r),this.parse()}parse(){}parseError(t){this.setName(this.errorClass||this.constructor.name),this.setStack(t.stack||""),this.setMessage(t.message),this.originalMessage=t.message}parseContext(t){const{contextModule:r,type:i,code:n,context:D}=t||{contextModule:"",context:"",code:C1,type:o0.Unspecified};this.context=D,this.contextModule=r,this.type=i||o0.Unspecified,this.code=n||C1}setType(t){this.type=t}setCode(t){this.code=t}setContext(t){this.context=t}setOriginalMessage(t){this.originalMessage=t}setStack(t){try{this.stack=t}catch{}}setName(t){super.name=t,this.name=t,this.errorClass=t}setMessage(t){super.message=t,this.message=t}setContextModule(t){this.contextModule=t}setContextCode(t){this.contextCode=t}toOriginalError(){const t=new Error(this.originalMessage);return t.stack=this.stack,t.name=this.name||"",t}toError(){const t=new Error(this.message);return t.stack=this.stack,t.name=this.name||"",t}toCompactError(){const t=this.name||g1(this.type),r=new Error(`${this.message} | ${JSON.stringify({originalMessage:this.originalMessage,message:this.message,errorClass:t,code:this.code,type:this.type,context:this.context,contextModule:this.contextModule,contextCode:this.contextCode,stack:(this.stack||"").split(`
4
4
  `).map(i=>i.trim())})}`);return r.stack=this.stack,r.name=this.name||g1(this.type),r}toJson(){return JSON.stringify({error:this.message,stack:this.stack})}toObject(){const t=this.name||g1(this.type);return{message:this.message,originalMessage:this.originalMessage,errorClass:t,code:this.code,type:this.type,context:this.context,contextModule:this.contextModule,contextCode:this.contextCode,stack:(this.stack||"").split(`