diff --git a/404.html b/404.html index 253c4c7..d5a97c6 100644 --- a/404.html +++ b/404.html @@ -1,9 +1,9 @@ - ISCN Browser - powered by LikeCoin + ISCN Browser - powered by LikeCoin -
Loading...
- +
Loading...
+ diff --git a/_nuxt/0ea9315.js b/_nuxt/0ea9315.js new file mode 100644 index 0000000..a82cc74 --- /dev/null +++ b/_nuxt/0ea9315.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[10,2],{2133:function(t,e,n){var content=n(2135);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,n(276).default)("53908980",content,!0,{sourceMap:!1})},2134:function(t,e,n){"use strict";n(2133)},2135:function(t,e,n){var r=n(275)((function(i){return i[1]}));r.push([t.i,"div.main[data-v-94a04484]{align-items:center}table[data-v-94a04484]{table-layout:fixed;width:100%;word-wrap:break-word}table[data-v-94a04484],td[data-v-94a04484],th[data-v-94a04484]{border:1px solid #000;border-collapse:collapse}td a[data-v-94a04484]{margin-left:5px}ul.pagination[data-v-94a04484]{display:inline-block;margin:0;padding:0}ul.pagination li[data-v-94a04484]{display:inline}ul.pagination li a[data-v-94a04484]{color:#000;float:left;padding:8px 16px;-webkit-text-decoration:none;text-decoration:none}ul.pagination li.active a[data-v-94a04484]{background-color:#28646e;color:#fff}",""]),r.locals={},t.exports=r},2136:function(t,e,n){"use strict";n.r(e);var r=n(42),o=(n(62),n(75),n(87),n(83),n(18),n(37)),c=n(2),l=(n(94),n(76),n(109),n(122),n(114),n(68),n(57),n(113),n(66),n(144),n(400),n(86),n(69),n(398),n(399),n(277),n(168)),d=n(185),v=n(691);function f(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function _(t){for(var e=1;e>>=0)&&e<256)&&(r=l[e])?r:(n=h(e,(0|e)<0?-1:0,!0),o&&(l[e]=n),n):(o=-128<=(e|=0)&&e<128)&&(r=c[e])?r:(n=h(e,e<0?-1:0,!1),o&&(c[e]=n),n)}function f(e,t){if(isNaN(e))return t?S:C;if(t){if(e<0)return S;if(e>=I)return R}else{if(e<=-w)return P;if(e+1>=w)return O}return e<0?f(-e,t).neg():h(e%y|0,e/y|0,t)}function h(e,t,n){return new r(e,t,n)}r.fromInt=d,r.fromNumber=f,r.fromBits=h;var A=Math.pow;function m(e,t,n){if(0===e.length)throw Error("empty string");if("NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return C;if("number"==typeof t?(n=t,t=!1):t=!!t,(n=n||10)<2||360)throw Error("interior hyphen");if(0===p)return m(e.substring(1),t,n).neg();for(var r=f(A(n,8)),o=C,i=0;i>>0:this.low},x.toNumber=function(){return this.unsigned?(this.high>>>0)*y+(this.low>>>0):this.high*y+(this.low>>>0)},x.toString=function(e){if((e=e||10)<2||36>>0).toString(e);if((o=l).isZero())return d+c;for(;d.length<6;)d="0"+d;c=""+d+c}},x.getHighBits=function(){return this.high},x.getHighBitsUnsigned=function(){return this.high>>>0},x.getLowBits=function(){return this.low},x.getLowBitsUnsigned=function(){return this.low>>>0},x.getNumBitsAbs=function(){if(this.isNegative())return this.eq(P)?64:this.neg().getNumBitsAbs();for(var e=0!=this.high?this.high:this.low,t=31;t>0&&0==(e&1<=0},x.isOdd=function(){return 1==(1&this.low)},x.isEven=function(){return 0==(1&this.low)},x.equals=function(e){return o(e)||(e=v(e)),(this.unsigned===e.unsigned||this.high>>>31!=1||e.high>>>31!=1)&&(this.high===e.high&&this.low===e.low)},x.eq=x.equals,x.notEquals=function(e){return!this.eq(e)},x.neq=x.notEquals,x.ne=x.notEquals,x.lessThan=function(e){return this.comp(e)<0},x.lt=x.lessThan,x.lessThanOrEqual=function(e){return this.comp(e)<=0},x.lte=x.lessThanOrEqual,x.le=x.lessThanOrEqual,x.greaterThan=function(e){return this.comp(e)>0},x.gt=x.greaterThan,x.greaterThanOrEqual=function(e){return this.comp(e)>=0},x.gte=x.greaterThanOrEqual,x.ge=x.greaterThanOrEqual,x.compare=function(e){if(o(e)||(e=v(e)),this.eq(e))return 0;var t=this.isNegative(),n=e.isNegative();return t&&!n?-1:!t&&n?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},x.comp=x.compare,x.negate=function(){return!this.unsigned&&this.eq(P)?P:this.not().add(E)},x.neg=x.negate,x.add=function(e){o(e)||(e=v(e));var t=this.high>>>16,n=65535&this.high,r=this.low>>>16,c=65535&this.low,l=e.high>>>16,d=65535&e.high,f=e.low>>>16,A=0,m=0,y=0,I=0;return y+=(I+=c+(65535&e.low))>>>16,m+=(y+=r+f)>>>16,A+=(m+=n+d)>>>16,A+=t+l,h((y&=65535)<<16|(I&=65535),(A&=65535)<<16|(m&=65535),this.unsigned)},x.subtract=function(e){return o(e)||(e=v(e)),this.add(e.neg())},x.sub=x.subtract,x.multiply=function(e){if(this.isZero())return C;if(o(e)||(e=v(e)),n)return h(n.mul(this.low,this.high,e.low,e.high),n.get_high(),this.unsigned);if(e.isZero())return C;if(this.eq(P))return e.isOdd()?P:C;if(e.eq(P))return this.isOdd()?P:C;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(_)&&e.lt(_))return f(this.toNumber()*e.toNumber(),this.unsigned);var t=this.high>>>16,r=65535&this.high,c=this.low>>>16,l=65535&this.low,d=e.high>>>16,A=65535&e.high,m=e.low>>>16,y=65535&e.low,I=0,w=0,S=0,E=0;return S+=(E+=l*y)>>>16,w+=(S+=c*y)>>>16,S&=65535,w+=(S+=l*m)>>>16,I+=(w+=r*y)>>>16,w&=65535,I+=(w+=c*m)>>>16,w&=65535,I+=(w+=l*A)>>>16,I+=t*y+r*m+c*A+l*d,h((S&=65535)<<16|(E&=65535),(I&=65535)<<16|(w&=65535),this.unsigned)},x.mul=x.multiply,x.divide=function(e){if(o(e)||(e=v(e)),e.isZero())throw Error("division by zero");var t,r,c;if(n)return this.unsigned||-2147483648!==this.high||-1!==e.low||-1!==e.high?h((this.unsigned?n.div_u:n.div_s)(this.low,this.high,e.low,e.high),n.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?S:C;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return S;if(e.gt(this.shru(1)))return B;c=S}else{if(this.eq(P))return e.eq(E)||e.eq(k)?P:e.eq(P)?E:(t=this.shr(1).div(e).shl(1)).eq(C)?e.isNegative()?E:k:(r=this.sub(e.mul(t)),c=t.add(r.div(e)));if(e.eq(P))return this.unsigned?S:C;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();c=C}for(r=this;r.gte(e);){t=Math.max(1,Math.floor(r.toNumber()/e.toNumber()));for(var l=Math.ceil(Math.log(t)/Math.LN2),d=l<=48?1:A(2,l-48),m=f(t),y=m.mul(e);y.isNegative()||y.gt(r);)y=(m=f(t-=d,this.unsigned)).mul(e);m.isZero()&&(m=E),c=c.add(m),r=r.sub(y)}return c},x.div=x.divide,x.modulo=function(e){return o(e)||(e=v(e)),n?h((this.unsigned?n.rem_u:n.rem_s)(this.low,this.high,e.low,e.high),n.get_high(),this.unsigned):this.sub(this.div(e).mul(e))},x.mod=x.modulo,x.rem=x.modulo,x.not=function(){return h(~this.low,~this.high,this.unsigned)},x.and=function(e){return o(e)||(e=v(e)),h(this.low&e.low,this.high&e.high,this.unsigned)},x.or=function(e){return o(e)||(e=v(e)),h(this.low|e.low,this.high|e.high,this.unsigned)},x.xor=function(e){return o(e)||(e=v(e)),h(this.low^e.low,this.high^e.high,this.unsigned)},x.shiftLeft=function(e){return o(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?h(this.low<>>32-e,this.unsigned):h(0,this.low<>>e|this.high<<32-e,this.high>>e,this.unsigned):h(this.high>>e-32,this.high>=0?0:-1,this.unsigned)},x.shr=x.shiftRight,x.shiftRightUnsigned=function(e){if(o(e)&&(e=e.toInt()),0===(e&=63))return this;var t=this.high;return e<32?h(this.low>>>e|t<<32-e,t>>>e,this.unsigned):h(32===e?t:t>>>e-32,0,this.unsigned)},x.shru=x.shiftRightUnsigned,x.shr_u=x.shiftRightUnsigned,x.toSigned=function(){return this.unsigned?h(this.low,this.high,!1):this},x.toUnsigned=function(){return this.unsigned?this:h(this.low,this.high,!0)},x.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},x.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]},x.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)}},function(e,t,n){"use strict";e.exports=n(596)},,function(e,t,n){"use strict";(function(e){n.d(t,"f",(function(){return A})),n.d(t,"g",(function(){return m})),n.d(t,"i",(function(){return v})),n.d(t,"h",(function(){return y})),n.d(t,"b",(function(){return I})),n.d(t,"c",(function(){return w})),n.d(t,"e",(function(){return _})),n.d(t,"d",(function(){return C})),n.d(t,"o",(function(){return S})),n.d(t,"n",(function(){return E})),n.d(t,"p",(function(){return B})),n.d(t,"A",(function(){return k})),n.d(t,"z",(function(){return O})),n.d(t,"B",(function(){return R})),n.d(t,"v",(function(){return P})),n.d(t,"u",(function(){return x})),n.d(t,"s",(function(){return N})),n.d(t,"r",(function(){return D})),n.d(t,"t",(function(){return T})),n.d(t,"q",(function(){return j})),n.d(t,"m",(function(){return U})),n.d(t,"l",(function(){return J})),n.d(t,"k",(function(){return H})),n.d(t,"j",(function(){return F})),n.d(t,"x",(function(){return V})),n.d(t,"a",(function(){return W})),n.d(t,"y",(function(){return Y})),n.d(t,"w",(function(){return K}));var r=n(262),o=n.n(r),c=n(471),l=n.n(c);const d="hex",f="utf8",h="0";function A(e){return new Uint8Array(e)}function m(e,t=!1){const n=e.toString(d);return t?W(n):n}function v(e){return e.toString(f)}function y(e){return e.readUIntBE(0,e.length)}function I(e){return l()(e)}function w(e,t=!1){return m(I(e),t)}function _(e){return v(I(e))}function C(e){return y(I(e))}function S(t){return e.from(V(t),d)}function E(e){return A(S(e))}function B(e){return v(S(e))}function k(t){return e.from(t,f)}function O(e){return A(k(e))}function R(e,t=!1){return m(k(e),t)}function P(e){return I(Q(M(e)))}function x(e){return Q(M(e))}function M(e){return G((e>>>0).toString(2))}function Q(e){return new Uint8Array(L(e).map((e=>parseInt(e,2))))}function N(e,t){return!("string"!=typeof e||!e.match(/^0x[0-9A-Fa-f]*$/))&&(!t||e.length===2+2*t)}function D(t){return e.isBuffer(t)}function T(e){return o.a.strict(e)&&!D(e)}function j(e){return!T(e)&&!D(e)&&void 0!==e.byteLength}function U(e){return D(e)?"buffer":T(e)?"typed-array":j(e)?"array-buffer":Array.isArray(e)?"array":typeof e}function J(e){return function(e){return!("string"!=typeof e||!new RegExp(/^[01]+$/).test(e))&&e.length%8==0}(e)?"binary":N(e)?d:f}function H(...t){return e.concat(t)}function F(...e){let t=[];return e.forEach((e=>t=t.concat(Array.from(e)))),new Uint8Array([...t])}function L(e,t=8){const n=G(e).match(new RegExp(`.{${t}}`,"gi"));return Array.from(n||[])}function G(e,t=8,n="0"){return function(e,t,n="0"){return Z(e,t,!0,n)}(e,function(e,t=8){const n=e%t;return n?(e-n)/t*t+t:e}(e.length,t),n)}function V(e){return e.replace(/^0x/,"")}function W(e){return e.startsWith("0x")?e:`0x${e}`}function Y(e){return(e=G(e=V(e),2))&&(e=W(e)),e}function K(e){const t=e.startsWith("0x");return e=(e=V(e)).startsWith(h)?e.substring(1):e,t?W(e):e}function Z(e,t,n,r="0"){const o=t-e.length;let c=e;if(o>0){const t=r.repeat(o);c=n?t+e:e+t}return c}}).call(this,n(14).Buffer)},,function(e,t,n){"use strict";n.d(t,"k",(function(){return y})),n.d(t,"m",(function(){return I})),n.d(t,"l",(function(){return w})),n.d(t,"e",(function(){return _})),n.d(t,"b",(function(){return C})),n.d(t,"s",(function(){return S})),n.d(t,"g",(function(){return E})),n.d(t,"h",(function(){return B})),n.d(t,"d",(function(){return k})),n.d(t,"r",(function(){return O})),n.d(t,"j",(function(){return R})),n.d(t,"t",(function(){return x})),n.d(t,"o",(function(){return Q})),n.d(t,"q",(function(){return N})),n.d(t,"f",(function(){return D})),n.d(t,"c",(function(){return T})),n.d(t,"i",(function(){return j})),n.d(t,"p",(function(){return U})),n.d(t,"a",(function(){return W})),n.d(t,"v",(function(){return Y})),n.d(t,"n",(function(){return K})),n.d(t,"u",(function(){return Z}));n(86),n(44),n(80),n(87),n(69),n(51),n(70);var r=n(60),o=n(21),c=n(32),l=n(35),d=(n(79),n(25),n(55),n(485),n(68),n(98),n(99),n(56),n(61),n(62),n(72),n(45),n(102),n(212),n(308),n(530),n(172),n(272),n(533),n(125),n(147),n(5)),f=n(66);function h(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function A(e){for(var i=1;i=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,c=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return c=e.done,e},e:function(e){l=!0,o=e},f:function(){try{c||null==n.return||n.return()}finally{if(l)throw o}}}}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i1&&void 0!==arguments[1]?arguments[1]:[],r=e.$children||[],o=m(r);try{for(o.s();!(t=o.n()).done;){var c=t.value;c.$fetch?n.push(c):c.$children&&_(c,n)}}catch(e){o.e(e)}finally{o.f()}return n}function C(e,t){if(t||!e.options.__hasNuxtData){var n=e.options._originDataFn||e.options.data||function(){return{}};e.options._originDataFn=n,e.options.data=function(){var data=n.call(this,this);return this.$ssrContext&&(t=this.$ssrContext.asyncData[e.cid]),A(A({},data),t)},e.options.__hasNuxtData=!0,e._Ctor&&e._Ctor.options&&(e._Ctor.options.data=e.options.data)}}function S(e){return e.options&&e._Ctor===e||(e.options?(e._Ctor=e,e.extendOptions=e.options):(e=d.a.extend(e))._Ctor=e,!e.options.name&&e.options.__file&&(e.options.name=e.options.__file)),e}function E(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"components";return Array.prototype.concat.apply([],e.matched.map((function(e,r){return Object.keys(e[n]).map((function(o){return t&&t.push(r),e[n][o]}))})))}function B(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return E(e,t,"instances")}function k(e,t){return Array.prototype.concat.apply([],e.matched.map((function(e,n){return Object.keys(e.components).reduce((function(r,o){return e.components[o]?r.push(t(e.components[o],e.instances[o],e,o,n)):delete e.components[o],r}),[])})))}function O(e,t){return Promise.all(k(e,function(){var e=Object(o.a)(regeneratorRuntime.mark((function e(n,r,o,c){var l,d;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("function"!=typeof n||n.options){e.next=11;break}return e.prev=1,e.next=4,n();case 4:n=e.sent,e.next=11;break;case 7:throw e.prev=7,e.t0=e.catch(1),e.t0&&"ChunkLoadError"===e.t0.name&&"undefined"!=typeof window&&window.sessionStorage&&(l=Date.now(),(!(d=parseInt(window.sessionStorage.getItem("nuxt-reload")))||d+6e4A.c(new Uint8Array(b)))).join("")).buffer}function _(e){return A.f(e).buffer}function C(e){return A.i(e)}function S(e,t){return A.g(e,!t)}function E(e){return A.h(e)}function B(...e){return A.k(...e)}function k(e){return A.z(e).buffer}function O(e){return A.A(e)}function R(e,t){return A.B(e,!t)}function P(e){return new h.a(e,10).toNumber()}function x(e){return A.o(e)}function M(e){return A.n(e).buffer}function Q(e){return A.p(e)}function N(e){return new h.a(A.x(e),"hex").toNumber()}function D(e){return A.v(e)}function T(e){return A.u(e).buffer}function j(e){return new h.a(e).toString()}function U(e,t){const n=A.x(A.y(new h.a(e).toString(16)));return t?n:A.a(n)}var J=n(472);function H(e){return A.y(e)}function F(e){return A.a(e)}function L(e){return A.x(e)}function G(e){return A.w(A.a(e))}const V=n(473).payloadId;function W(){return((a,b)=>{for(b=a="";a++<36;b+=51*a&52?(15^a?8^Math.random()*(20^a?16:4):4).toString(16):"-");return b})()}function Y(){console.warn("DEPRECATION WARNING: This WalletConnect client library will be deprecated in favor of @walletconnect/client. Please check docs.walletconnect.org to learn more about this migration!")}function K(e,t){let n;const r=d[e];return r&&(n=`https://${r}.infura.io/v3/${t}`),n}function Z(e,t){let n;const r=K(e,t.infuraId);return t.custom&&t.custom[e]?n=t.custom[e]:r&&(n=r),n}function z(e){return""===e||"string"==typeof e&&""===e.trim()}function X(e){return!(e&&e.length)}function $(e){return A.r(e)}function ee(e){return A.t(e)}function te(e){return A.q(e)}function ne(e){return A.m(e)}function re(e){return A.l(e)}function oe(e,t){return A.s(e,t)}function ie(object){return"object"==typeof object.params}function ae(object){return void 0!==object.method}function se(object){return void 0!==object.result}function ce(object){return void 0!==object.error}function ue(object){return void 0!==object.event}function le(e){return o.includes(e)||e.startsWith("wc_")}function de(e){return!!e.method.startsWith("wc_")||!c.includes(e.method)}function fe(address){address=Object(A.x)(address.toLowerCase());const e=Object(A.x)(Object(J.keccak_256)(O(address)));let t="";for(let i=0;i7?t+=address[i].toUpperCase():t+=address[i];return Object(A.a)(t)}const he=address=>!!address&&("0x"===address.toLowerCase().substring(0,2)&&(!!/^(0x)?[0-9a-f]{40}$/i.test(address)&&(!(!/^(0x)?[0-9a-f]{40}$/.test(address)&&!/^(0x)?[0-9A-F]{40}$/.test(address))||address===fe(address))));function pe(e){return X(e)||oe(e[0])||(e[0]=R(e[0])),e}function ge(e){if(void 0!==e.type&&"0"!==e.type)return e;if(void 0===e.from||!he(e.from))throw new Error("Transaction object must include a valid 'from' value.");function t(e){let t=e;return("number"==typeof e||"string"==typeof e&&!z(e))&&(oe(e)?"string"==typeof e&&(t=H(e)):t=U(e)),"string"==typeof t&&(t=G(t)),t}const n={from:H(e.from),to:void 0===e.to?void 0:H(e.to),gasPrice:void 0===e.gasPrice?"":t(e.gasPrice),gas:void 0===e.gas?void 0===e.gasLimit?"":t(e.gasLimit):t(e.gas),value:void 0===e.value?"":t(e.value),nonce:void 0===e.nonce?"":t(e.nonce),data:void 0===e.data?"":H(e.data)||"0x"},r=["gasPrice","gas","value","nonce"];return Object.keys(n).forEach((e=>{(void 0===n[e]||"string"==typeof n[e]&&!n[e].trim().length)&&r.includes(e)&&delete n[e]})),n}function Ae(e,t){return async(...n)=>new Promise(((r,o)=>{e.apply(t,[...n,(e,data)=>{null==e&&o(e),r(data)}])}))}function me(e){const t=e.message||"Failed or Rejected Request";let code=-32e3;if(e&&!e.code)switch(t){case"Parse error":code=-32700;break;case"Invalid request":code=-32600;break;case"Method not found":code=-32601;break;case"Invalid params":code=-32602;break;case"Internal error":code=-32603;break;default:code=-32e3}const n={code:code,message:t};return e.data&&(n.data=e.data),n}var ve=n(266);function ye(e){const t=-1!==e.indexOf("?")?e.indexOf("?"):void 0;return void 0!==t?e.substr(t):""}function be(e,t){let n=Ie(e);return n=Object.assign(Object.assign({},n),t),e=we(n)}function Ie(e){return ve.parse(e)}function we(e){return ve.stringify(e)}function _e(object){return void 0!==object.bridge}function Ce(e){const t=e.indexOf(":"),n=-1!==e.indexOf("?")?e.indexOf("?"):void 0,r=e.substring(0,t);const o=function(path){const e=path.split("@");return{handshakeTopic:e[0],version:parseInt(e[1],10)}}(e.substring(t+1,n));const c=function(e){const t=Ie(e);return{key:t.key||"",bridge:t.bridge||""}}(void 0!==n?e.substr(n):"");return Object.assign(Object.assign({protocol:r},o),c)}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},function(e,t,n){var r=n(14),o=r.Buffer;function c(e,t){for(var n in e)t[n]=e[n]}function l(e,t,n){return o(e,t,n)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=r:(c(r,t),t.Buffer=l),l.prototype=Object.create(o.prototype),c(o,l),l.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return o(e,t,n)},l.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=o(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},l.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o(e)},l.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},,,,,function(e,t,n){"use strict";(function(e){var r=n(315),o=n(557),c=n(316);function l(){return f.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function d(e,t){if(l()=l())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+l().toString(16)+" bytes");return 0|e}function I(e,t){if(f.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return K(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return Z(e).length;default:if(r)return K(e).length;t=(""+t).toLowerCase(),r=!0}}function w(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return T(this,t,n);case"utf8":case"utf-8":return M(this,t,n);case"ascii":return N(this,t,n);case"latin1":case"binary":return D(this,t,n);case"base64":return x(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function _(b,e,t){var i=b[e];b[e]=b[t],b[t]=i}function C(e,t,n,r,o){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof t&&(t=f.from(t,r)),f.isBuffer(t))return 0===t.length?-1:S(e,t,n,r,o);if("number"==typeof t)return t&=255,f.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):S(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function S(e,t,n,r,o){var i,c=1,l=e.length,d=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;c=2,l/=2,d/=2,n/=2}function f(e,i){return 1===c?e[i]:e.readUInt16BE(i*c)}if(o){var h=-1;for(i=n;il&&(n=l-d),i=n;i>=0;i--){for(var A=!0,m=0;mo&&(r=o):r=o;var c=t.length;if(c%2!=0)throw new TypeError("Invalid hex string");r>c/2&&(r=c/2);for(var i=0;i>8,o=n%256,c.push(o),c.push(r);return c}(t,e.length-n),e,n,r)}function x(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function M(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i239?4:f>223?3:f>191?2:1;if(i+A<=n)switch(A){case 1:f<128&&(h=f);break;case 2:128==(192&(o=e[i+1]))&&(d=(31&f)<<6|63&o)>127&&(h=d);break;case 3:o=e[i+1],c=e[i+2],128==(192&o)&&128==(192&c)&&(d=(15&f)<<12|(63&o)<<6|63&c)>2047&&(d<55296||d>57343)&&(h=d);break;case 4:o=e[i+1],c=e[i+2],l=e[i+3],128==(192&o)&&128==(192&c)&&128==(192&l)&&(d=(15&f)<<18|(63&o)<<12|(63&c)<<6|63&l)>65535&&d<1114112&&(h=d)}null===h?(h=65533,A=1):h>65535&&(h-=65536,r.push(h>>>10&1023|55296),h=56320|1023&h),r.push(h),i+=A}return function(e){var t=e.length;if(t<=Q)return String.fromCharCode.apply(String,e);var n="",i=0;for(;i0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},f.prototype.compare=function(e,t,n,r,o){if(!f.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return-1;if(t>=n)return 1;if(this===e)return 0;for(var c=(o>>>=0)-(r>>>=0),l=(n>>>=0)-(t>>>=0),d=Math.min(c,l),h=this.slice(r,o),A=e.slice(t,n),i=0;io)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var c=!1;;)switch(r){case"hex":return E(this,e,t,n);case"utf8":case"utf-8":return B(this,e,t,n);case"ascii":return k(this,e,t,n);case"latin1":case"binary":return O(this,e,t,n);case"base64":return R(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,e,t,n);default:if(c)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),c=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Q=4096;function N(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;ir)&&(n=r);for(var o="",i=t;in)throw new RangeError("Trying to access beyond buffer length")}function J(e,t,n,r,o,c){if(!f.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw new RangeError("Index out of range")}function H(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i>>8*(r?i:1-i)}function F(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i>>8*(r?i:3-i)&255}function L(e,t,n,r,o,c){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function G(e,t,n,r,c){return c||L(e,0,n,4),o.write(e,t,n,r,23,4),n+4}function V(e,t,n,r,c){return c||L(e,0,n,8),o.write(e,t,n,r,52,8),n+8}f.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t0&&(o*=256);)r+=this[e+--t]*o;return r},f.prototype.readUInt8=function(e,t){return t||U(e,1,this.length),this[e]},f.prototype.readUInt16LE=function(e,t){return t||U(e,2,this.length),this[e]|this[e+1]<<8},f.prototype.readUInt16BE=function(e,t){return t||U(e,2,this.length),this[e]<<8|this[e+1]},f.prototype.readUInt32LE=function(e,t){return t||U(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},f.prototype.readUInt32BE=function(e,t){return t||U(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},f.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||U(e,t,this.length);for(var r=this[e],o=1,i=0;++i=(o*=128)&&(r-=Math.pow(2,8*t)),r},f.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||U(e,t,this.length);for(var i=t,r=1,o=this[e+--i];i>0&&(r*=256);)o+=this[e+--i]*r;return o>=(r*=128)&&(o-=Math.pow(2,8*t)),o},f.prototype.readInt8=function(e,t){return t||U(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},f.prototype.readInt16LE=function(e,t){t||U(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},f.prototype.readInt16BE=function(e,t){t||U(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},f.prototype.readInt32LE=function(e,t){return t||U(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},f.prototype.readInt32BE=function(e,t){return t||U(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},f.prototype.readFloatLE=function(e,t){return t||U(e,4,this.length),o.read(this,e,!0,23,4)},f.prototype.readFloatBE=function(e,t){return t||U(e,4,this.length),o.read(this,e,!1,23,4)},f.prototype.readDoubleLE=function(e,t){return t||U(e,8,this.length),o.read(this,e,!0,52,8)},f.prototype.readDoubleBE=function(e,t){return t||U(e,8,this.length),o.read(this,e,!1,52,8)},f.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||J(this,e,t,n,Math.pow(2,8*n)-1,0);var o=1,i=0;for(this[t]=255&e;++i=0&&(o*=256);)this[t+i]=e/o&255;return t+n},f.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||J(this,e,t,1,255,0),f.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},f.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||J(this,e,t,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):H(this,e,t,!0),t+2},f.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||J(this,e,t,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):H(this,e,t,!1),t+2},f.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||J(this,e,t,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):F(this,e,t,!0),t+4},f.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||J(this,e,t,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):F(this,e,t,!1),t+4},f.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);J(this,e,t,n,o-1,-o)}var i=0,c=1,sub=0;for(this[t]=255&e;++i>0)-sub&255;return t+n},f.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);J(this,e,t,n,o-1,-o)}var i=n-1,c=1,sub=0;for(this[t+i]=255&e;--i>=0&&(c*=256);)e<0&&0===sub&&0!==this[t+i+1]&&(sub=1),this[t+i]=(e/c>>0)-sub&255;return t+n},f.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||J(this,e,t,1,127,-128),f.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},f.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||J(this,e,t,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):H(this,e,t,!0),t+2},f.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||J(this,e,t,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):H(this,e,t,!1),t+2},f.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||J(this,e,t,4,2147483647,-2147483648),f.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):F(this,e,t,!0),t+4},f.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||J(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),f.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):F(this,e,t,!1),t+4},f.prototype.writeFloatLE=function(e,t,n){return G(this,e,t,!0,n)},f.prototype.writeFloatBE=function(e,t,n){return G(this,e,t,!1,n)},f.prototype.writeDoubleLE=function(e,t,n){return V(this,e,t,!0,n)},f.prototype.writeDoubleBE=function(e,t,n){return V(this,e,t,!1,n)},f.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--i)e[i+t]=this[i+n];else if(o<1e3||!f.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;i55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&c.push(239,191,189);continue}if(i+1===r){(t-=3)>-1&&c.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&c.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&c.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;c.push(n)}else if(n<2048){if((t-=2)<0)break;c.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;c.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;c.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return c}function Z(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(W,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function z(e,t,n,r){for(var i=0;i=t.length||i>=e.length);++i)t[i+n]=e[i];return i}}).call(this,n(3))},,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toUtf8=t.fromUtf8=t.toRfc3339=t.fromRfc3339=t.toHex=t.fromHex=t.toBech32=t.normalizeBech32=t.fromBech32=t.Bech32=t.toBase64=t.fromBase64=t.toAscii=t.fromAscii=void 0;var r=n(614);Object.defineProperty(t,"fromAscii",{enumerable:!0,get:function(){return r.fromAscii}}),Object.defineProperty(t,"toAscii",{enumerable:!0,get:function(){return r.toAscii}});var o=n(615);Object.defineProperty(t,"fromBase64",{enumerable:!0,get:function(){return o.fromBase64}}),Object.defineProperty(t,"toBase64",{enumerable:!0,get:function(){return o.toBase64}});var c=n(616);Object.defineProperty(t,"Bech32",{enumerable:!0,get:function(){return c.Bech32}}),Object.defineProperty(t,"fromBech32",{enumerable:!0,get:function(){return c.fromBech32}}),Object.defineProperty(t,"normalizeBech32",{enumerable:!0,get:function(){return c.normalizeBech32}}),Object.defineProperty(t,"toBech32",{enumerable:!0,get:function(){return c.toBech32}});var l=n(618);Object.defineProperty(t,"fromHex",{enumerable:!0,get:function(){return l.fromHex}}),Object.defineProperty(t,"toHex",{enumerable:!0,get:function(){return l.toHex}});var d=n(619);Object.defineProperty(t,"fromRfc3339",{enumerable:!0,get:function(){return d.fromRfc3339}}),Object.defineProperty(t,"toRfc3339",{enumerable:!0,get:function(){return d.toRfc3339}});var f=n(620);Object.defineProperty(t,"fromUtf8",{enumerable:!0,get:function(){return f.fromUtf8}}),Object.defineProperty(t,"toUtf8",{enumerable:!0,get:function(){return f.toUtf8}})},function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"g",(function(){return c})),n.d(t,"a",(function(){return l})),n.d(t,"f",(function(){return d})),n.d(t,"e",(function(){return f})),n.d(t,"i",(function(){return h})),n.d(t,"j",(function(){return A})),n.d(t,"h",(function(){return r})),n.d(t,"d",(function(){return m})),n.d(t,"c",(function(){return v})),n.d(t,"k",(function(){return y})),n.d(t,"l",(function(){return I}));const r=512,o=256,c=256,l="AES-CBC",d=`SHA-${o}`,f="HMAC",h="SHA-256",A="SHA-512",m="encrypt",v="decrypt",y="sign",I="verify"},,,,function(e,t,n){"use strict";(function(e){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Any=t.protobufPackage=void 0;const o=r(n(1)),c=r(n(2));t.protobufPackage="google.protobuf";const l={typeUrl:""};t.Any={encode:(e,t=c.default.Writer.create())=>(""!==e.typeUrl&&t.uint32(10).string(e.typeUrl),0!==e.value.length&&t.uint32(18).bytes(e.value),t),decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},l);for(r.value=new Uint8Array;t.pos>>3){case 1:r.typeUrl=t.string();break;case 2:r.value=t.bytes();break;default:t.skipType(7&e)}}return r},fromJSON(object){const e=Object.assign({},l);return e.typeUrl=void 0!==object.typeUrl&&null!==object.typeUrl?String(object.typeUrl):"",e.value=void 0!==object.value&&null!==object.value?function(e){const t=f(e),n=new Uint8Array(t.length);for(let i=0;i{if(void 0!==d)return d;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==e)return e;throw"Unable to locate global object"})();const f=d.atob||(e=>d.Buffer.from(e,"base64").toString("binary"));const h=d.btoa||(e=>d.Buffer.from(e,"binary").toString("base64"));c.default.util.Long!==o.default&&(c.default.util.Long=o.default,c.default.configure())}).call(this,n(3))},,,,,function(e,t,n){(function(e){!function(e,t){"use strict";function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function o(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function c(e,base,t){if(c.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==base&&"be"!==base||(t=base,base=10),this._init(e||0,base||10,t||"be"))}var l;"object"==typeof e?e.exports=c:t.BN=c,c.BN=c,c.wordSize=26;try{l="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:n(669).Buffer}catch(e){}function d(e,t){var n=e.charCodeAt(t);return n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:n-48&15}function f(e,t,n){var r=d(e,n);return n-1>=t&&(r|=d(e,n-1)<<4),r}function h(e,t,n,r){for(var o=0,c=Math.min(e.length,n),i=t;i=49?l-49+10:l>=17?l-17+10:l}return o}c.isBN=function(e){return e instanceof c||null!==e&&"object"==typeof e&&e.constructor.wordSize===c.wordSize&&Array.isArray(e.words)},c.max=function(e,t){return e.cmp(t)>0?e:t},c.min=function(e,t){return e.cmp(t)<0?e:t},c.prototype._init=function(e,base,t){if("number"==typeof e)return this._initNumber(e,base,t);if("object"==typeof e)return this._initArray(e,base,t);"hex"===base&&(base=16),r(base===(0|base)&&base>=2&&base<=36);var n=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n=0;i-=3)o=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[n]|=o<>>26-c&67108863,(c+=24)>=26&&(c-=26,n++);else if("le"===t)for(i=0,n=0;i>>26-c&67108863,(c+=24)>=26&&(c-=26,n++);return this.strip()},c.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var i=0;i=t;i-=2)r=f(e,t,i)<=18?(o-=18,c+=1,this.words[c]|=r>>>26):o+=8;else for(i=(e.length-t)%2==0?t+1:t;i=18?(o-=18,c+=1,this.words[c]|=r>>>26):o+=8;this.strip()},c.prototype._parseBase=function(e,base,t){this.words=[0],this.length=1;for(var n=0,r=1;r<=67108863;r*=base)n++;n--,r=r/base|0;for(var o=e.length-t,c=o%n,l=Math.min(o,o-c)+t,d=0,i=t;i1&&0===this.words[this.length-1];)this.length--;return this._normSign()},c.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},c.prototype.inspect=function(){return(this.red?""};var A=["","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"],m=[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],v=[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 y(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var a=0|e.words[0],b=0|t.words[0],o=a*b,c=67108863&o,l=o/67108864|0;n.words[0]=c;for(var d=1;d>>26,h=67108863&l,A=Math.min(d,t.length-1),m=Math.max(0,d-e.length+1);m<=A;m++){var i=d-m|0;f+=(o=(a=0|e.words[i])*(b=0|t.words[m])+h)/67108864|0,h=67108863&o}n.words[d]=0|h,l=0|f}return 0!==l?n.words[d]=0|l:n.length--,n.strip()}c.prototype.toString=function(base,e){var t;if(e=0|e||1,16===(base=base||10)||"hex"===base){t="";for(var n=0,o=0,i=0;i>>24-n&16777215)||i!==this.length-1?A[6-l.length]+l+t:l+t,(n+=2)>=26&&(n-=26,i--)}for(0!==o&&(t=o.toString(16)+t);t.length%e!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t}if(base===(0|base)&&base>=2&&base<=36){var d=m[base],f=v[base];t="";var h=this.clone();for(h.negative=0;!h.isZero();){var y=h.modn(f).toString(base);t=(h=h.idivn(f)).isZero()?y+t:A[d-y.length]+y+t}for(this.isZero()&&(t="0"+t);t.length%e!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t}r(!1,"Base should be between 2 and 36")},c.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&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},c.prototype.toJSON=function(){return this.toString(16)},c.prototype.toBuffer=function(e,t){return r(void 0!==l),this.toArrayLike(l,e,t)},c.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},c.prototype.toArrayLike=function(e,t,n){var o=this.byteLength(),c=n||Math.max(1,o);r(o<=c,"byte array longer than desired length"),r(c>0,"Requested array length <= 0"),this.strip();var b,i,l="le"===t,d=new e(c),q=this.clone();if(l){for(i=0;!q.isZero();i++)b=q.andln(255),q.iushrn(8),d[i]=b;for(;i=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},c.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 0==(8191&t)&&(n+=13,t>>>=13),0==(127&t)&&(n+=7,t>>>=7),0==(15&t)&&(n+=4,t>>>=4),0==(3&t)&&(n+=2,t>>>=2),0==(1&t)&&n++,n},c.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},c.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,i=0;ie.length?this.clone().ior(e):e.clone().ior(this)},c.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},c.prototype.iuand=function(e){var b;b=this.length>e.length?e:this;for(var i=0;ie.length?this.clone().iand(e):e.clone().iand(this)},c.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},c.prototype.iuxor=function(e){var a,b;this.length>e.length?(a=this,b=e):(a=e,b=this);for(var i=0;ie.length?this.clone().ixor(e):e.clone().ixor(this)},c.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},c.prototype.inotn=function(e){r("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-n),this.strip()},c.prototype.notn=function(e){return this.clone().inotn(e)},c.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);var n=e/26|0,o=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<e.length?(a=this,b=e):(a=e,b=this);for(var n=0,i=0;i>>26;for(;0!==n&&i>>26;if(this.length=a.length,0!==n)this.words[this.length]=n,this.length++;else if(a!==this)for(;ie.length?this.clone().iadd(e):e.clone().iadd(this)},c.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var a,b,n=this.cmp(e);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(a=this,b=e):(a=e,b=this);for(var r=0,i=0;i>26,this.words[i]=67108863&t;for(;0!==r&&i>26,this.words[i]=67108863&t;if(0===r&&i>>13,m=0|a[1],v=8191&m,y=m>>>13,I=0|a[2],w=8191&I,_=I>>>13,C=0|a[3],S=8191&C,E=C>>>13,B=0|a[4],k=8191&B,O=B>>>13,R=0|a[5],P=8191&R,x=R>>>13,M=0|a[6],Q=8191&M,N=M>>>13,D=0|a[7],T=8191&D,j=D>>>13,U=0|a[8],J=8191&U,H=U>>>13,F=0|a[9],L=8191&F,G=F>>>13,V=0|b[0],W=8191&V,Y=V>>>13,K=0|b[1],Z=8191&K,z=K>>>13,X=0|b[2],$=8191&X,ee=X>>>13,te=0|b[3],ne=8191&te,re=te>>>13,oe=0|b[4],ie=8191&oe,ae=oe>>>13,se=0|b[5],ce=8191&se,ue=se>>>13,le=0|b[6],de=8191&le,fe=le>>>13,he=0|b[7],pe=8191&he,ge=he>>>13,Ae=0|b[8],me=8191&Ae,ve=Ae>>>13,ye=0|b[9],be=8191&ye,Ie=ye>>>13;n.negative=e.negative^t.negative,n.length=19;var we=(d+(r=Math.imul(h,W))|0)+((8191&(o=(o=Math.imul(h,Y))+Math.imul(A,W)|0))<<13)|0;d=((c=Math.imul(A,Y))+(o>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(v,W),o=(o=Math.imul(v,Y))+Math.imul(y,W)|0,c=Math.imul(y,Y);var _e=(d+(r=r+Math.imul(h,Z)|0)|0)+((8191&(o=(o=o+Math.imul(h,z)|0)+Math.imul(A,Z)|0))<<13)|0;d=((c=c+Math.imul(A,z)|0)+(o>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(w,W),o=(o=Math.imul(w,Y))+Math.imul(_,W)|0,c=Math.imul(_,Y),r=r+Math.imul(v,Z)|0,o=(o=o+Math.imul(v,z)|0)+Math.imul(y,Z)|0,c=c+Math.imul(y,z)|0;var Ce=(d+(r=r+Math.imul(h,$)|0)|0)+((8191&(o=(o=o+Math.imul(h,ee)|0)+Math.imul(A,$)|0))<<13)|0;d=((c=c+Math.imul(A,ee)|0)+(o>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(S,W),o=(o=Math.imul(S,Y))+Math.imul(E,W)|0,c=Math.imul(E,Y),r=r+Math.imul(w,Z)|0,o=(o=o+Math.imul(w,z)|0)+Math.imul(_,Z)|0,c=c+Math.imul(_,z)|0,r=r+Math.imul(v,$)|0,o=(o=o+Math.imul(v,ee)|0)+Math.imul(y,$)|0,c=c+Math.imul(y,ee)|0;var Se=(d+(r=r+Math.imul(h,ne)|0)|0)+((8191&(o=(o=o+Math.imul(h,re)|0)+Math.imul(A,ne)|0))<<13)|0;d=((c=c+Math.imul(A,re)|0)+(o>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(k,W),o=(o=Math.imul(k,Y))+Math.imul(O,W)|0,c=Math.imul(O,Y),r=r+Math.imul(S,Z)|0,o=(o=o+Math.imul(S,z)|0)+Math.imul(E,Z)|0,c=c+Math.imul(E,z)|0,r=r+Math.imul(w,$)|0,o=(o=o+Math.imul(w,ee)|0)+Math.imul(_,$)|0,c=c+Math.imul(_,ee)|0,r=r+Math.imul(v,ne)|0,o=(o=o+Math.imul(v,re)|0)+Math.imul(y,ne)|0,c=c+Math.imul(y,re)|0;var Ee=(d+(r=r+Math.imul(h,ie)|0)|0)+((8191&(o=(o=o+Math.imul(h,ae)|0)+Math.imul(A,ie)|0))<<13)|0;d=((c=c+Math.imul(A,ae)|0)+(o>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(P,W),o=(o=Math.imul(P,Y))+Math.imul(x,W)|0,c=Math.imul(x,Y),r=r+Math.imul(k,Z)|0,o=(o=o+Math.imul(k,z)|0)+Math.imul(O,Z)|0,c=c+Math.imul(O,z)|0,r=r+Math.imul(S,$)|0,o=(o=o+Math.imul(S,ee)|0)+Math.imul(E,$)|0,c=c+Math.imul(E,ee)|0,r=r+Math.imul(w,ne)|0,o=(o=o+Math.imul(w,re)|0)+Math.imul(_,ne)|0,c=c+Math.imul(_,re)|0,r=r+Math.imul(v,ie)|0,o=(o=o+Math.imul(v,ae)|0)+Math.imul(y,ie)|0,c=c+Math.imul(y,ae)|0;var Be=(d+(r=r+Math.imul(h,ce)|0)|0)+((8191&(o=(o=o+Math.imul(h,ue)|0)+Math.imul(A,ce)|0))<<13)|0;d=((c=c+Math.imul(A,ue)|0)+(o>>>13)|0)+(Be>>>26)|0,Be&=67108863,r=Math.imul(Q,W),o=(o=Math.imul(Q,Y))+Math.imul(N,W)|0,c=Math.imul(N,Y),r=r+Math.imul(P,Z)|0,o=(o=o+Math.imul(P,z)|0)+Math.imul(x,Z)|0,c=c+Math.imul(x,z)|0,r=r+Math.imul(k,$)|0,o=(o=o+Math.imul(k,ee)|0)+Math.imul(O,$)|0,c=c+Math.imul(O,ee)|0,r=r+Math.imul(S,ne)|0,o=(o=o+Math.imul(S,re)|0)+Math.imul(E,ne)|0,c=c+Math.imul(E,re)|0,r=r+Math.imul(w,ie)|0,o=(o=o+Math.imul(w,ae)|0)+Math.imul(_,ie)|0,c=c+Math.imul(_,ae)|0,r=r+Math.imul(v,ce)|0,o=(o=o+Math.imul(v,ue)|0)+Math.imul(y,ce)|0,c=c+Math.imul(y,ue)|0;var ke=(d+(r=r+Math.imul(h,de)|0)|0)+((8191&(o=(o=o+Math.imul(h,fe)|0)+Math.imul(A,de)|0))<<13)|0;d=((c=c+Math.imul(A,fe)|0)+(o>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(T,W),o=(o=Math.imul(T,Y))+Math.imul(j,W)|0,c=Math.imul(j,Y),r=r+Math.imul(Q,Z)|0,o=(o=o+Math.imul(Q,z)|0)+Math.imul(N,Z)|0,c=c+Math.imul(N,z)|0,r=r+Math.imul(P,$)|0,o=(o=o+Math.imul(P,ee)|0)+Math.imul(x,$)|0,c=c+Math.imul(x,ee)|0,r=r+Math.imul(k,ne)|0,o=(o=o+Math.imul(k,re)|0)+Math.imul(O,ne)|0,c=c+Math.imul(O,re)|0,r=r+Math.imul(S,ie)|0,o=(o=o+Math.imul(S,ae)|0)+Math.imul(E,ie)|0,c=c+Math.imul(E,ae)|0,r=r+Math.imul(w,ce)|0,o=(o=o+Math.imul(w,ue)|0)+Math.imul(_,ce)|0,c=c+Math.imul(_,ue)|0,r=r+Math.imul(v,de)|0,o=(o=o+Math.imul(v,fe)|0)+Math.imul(y,de)|0,c=c+Math.imul(y,fe)|0;var Oe=(d+(r=r+Math.imul(h,pe)|0)|0)+((8191&(o=(o=o+Math.imul(h,ge)|0)+Math.imul(A,pe)|0))<<13)|0;d=((c=c+Math.imul(A,ge)|0)+(o>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,r=Math.imul(J,W),o=(o=Math.imul(J,Y))+Math.imul(H,W)|0,c=Math.imul(H,Y),r=r+Math.imul(T,Z)|0,o=(o=o+Math.imul(T,z)|0)+Math.imul(j,Z)|0,c=c+Math.imul(j,z)|0,r=r+Math.imul(Q,$)|0,o=(o=o+Math.imul(Q,ee)|0)+Math.imul(N,$)|0,c=c+Math.imul(N,ee)|0,r=r+Math.imul(P,ne)|0,o=(o=o+Math.imul(P,re)|0)+Math.imul(x,ne)|0,c=c+Math.imul(x,re)|0,r=r+Math.imul(k,ie)|0,o=(o=o+Math.imul(k,ae)|0)+Math.imul(O,ie)|0,c=c+Math.imul(O,ae)|0,r=r+Math.imul(S,ce)|0,o=(o=o+Math.imul(S,ue)|0)+Math.imul(E,ce)|0,c=c+Math.imul(E,ue)|0,r=r+Math.imul(w,de)|0,o=(o=o+Math.imul(w,fe)|0)+Math.imul(_,de)|0,c=c+Math.imul(_,fe)|0,r=r+Math.imul(v,pe)|0,o=(o=o+Math.imul(v,ge)|0)+Math.imul(y,pe)|0,c=c+Math.imul(y,ge)|0;var Re=(d+(r=r+Math.imul(h,me)|0)|0)+((8191&(o=(o=o+Math.imul(h,ve)|0)+Math.imul(A,me)|0))<<13)|0;d=((c=c+Math.imul(A,ve)|0)+(o>>>13)|0)+(Re>>>26)|0,Re&=67108863,r=Math.imul(L,W),o=(o=Math.imul(L,Y))+Math.imul(G,W)|0,c=Math.imul(G,Y),r=r+Math.imul(J,Z)|0,o=(o=o+Math.imul(J,z)|0)+Math.imul(H,Z)|0,c=c+Math.imul(H,z)|0,r=r+Math.imul(T,$)|0,o=(o=o+Math.imul(T,ee)|0)+Math.imul(j,$)|0,c=c+Math.imul(j,ee)|0,r=r+Math.imul(Q,ne)|0,o=(o=o+Math.imul(Q,re)|0)+Math.imul(N,ne)|0,c=c+Math.imul(N,re)|0,r=r+Math.imul(P,ie)|0,o=(o=o+Math.imul(P,ae)|0)+Math.imul(x,ie)|0,c=c+Math.imul(x,ae)|0,r=r+Math.imul(k,ce)|0,o=(o=o+Math.imul(k,ue)|0)+Math.imul(O,ce)|0,c=c+Math.imul(O,ue)|0,r=r+Math.imul(S,de)|0,o=(o=o+Math.imul(S,fe)|0)+Math.imul(E,de)|0,c=c+Math.imul(E,fe)|0,r=r+Math.imul(w,pe)|0,o=(o=o+Math.imul(w,ge)|0)+Math.imul(_,pe)|0,c=c+Math.imul(_,ge)|0,r=r+Math.imul(v,me)|0,o=(o=o+Math.imul(v,ve)|0)+Math.imul(y,me)|0,c=c+Math.imul(y,ve)|0;var Pe=(d+(r=r+Math.imul(h,be)|0)|0)+((8191&(o=(o=o+Math.imul(h,Ie)|0)+Math.imul(A,be)|0))<<13)|0;d=((c=c+Math.imul(A,Ie)|0)+(o>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,r=Math.imul(L,Z),o=(o=Math.imul(L,z))+Math.imul(G,Z)|0,c=Math.imul(G,z),r=r+Math.imul(J,$)|0,o=(o=o+Math.imul(J,ee)|0)+Math.imul(H,$)|0,c=c+Math.imul(H,ee)|0,r=r+Math.imul(T,ne)|0,o=(o=o+Math.imul(T,re)|0)+Math.imul(j,ne)|0,c=c+Math.imul(j,re)|0,r=r+Math.imul(Q,ie)|0,o=(o=o+Math.imul(Q,ae)|0)+Math.imul(N,ie)|0,c=c+Math.imul(N,ae)|0,r=r+Math.imul(P,ce)|0,o=(o=o+Math.imul(P,ue)|0)+Math.imul(x,ce)|0,c=c+Math.imul(x,ue)|0,r=r+Math.imul(k,de)|0,o=(o=o+Math.imul(k,fe)|0)+Math.imul(O,de)|0,c=c+Math.imul(O,fe)|0,r=r+Math.imul(S,pe)|0,o=(o=o+Math.imul(S,ge)|0)+Math.imul(E,pe)|0,c=c+Math.imul(E,ge)|0,r=r+Math.imul(w,me)|0,o=(o=o+Math.imul(w,ve)|0)+Math.imul(_,me)|0,c=c+Math.imul(_,ve)|0;var xe=(d+(r=r+Math.imul(v,be)|0)|0)+((8191&(o=(o=o+Math.imul(v,Ie)|0)+Math.imul(y,be)|0))<<13)|0;d=((c=c+Math.imul(y,Ie)|0)+(o>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(L,$),o=(o=Math.imul(L,ee))+Math.imul(G,$)|0,c=Math.imul(G,ee),r=r+Math.imul(J,ne)|0,o=(o=o+Math.imul(J,re)|0)+Math.imul(H,ne)|0,c=c+Math.imul(H,re)|0,r=r+Math.imul(T,ie)|0,o=(o=o+Math.imul(T,ae)|0)+Math.imul(j,ie)|0,c=c+Math.imul(j,ae)|0,r=r+Math.imul(Q,ce)|0,o=(o=o+Math.imul(Q,ue)|0)+Math.imul(N,ce)|0,c=c+Math.imul(N,ue)|0,r=r+Math.imul(P,de)|0,o=(o=o+Math.imul(P,fe)|0)+Math.imul(x,de)|0,c=c+Math.imul(x,fe)|0,r=r+Math.imul(k,pe)|0,o=(o=o+Math.imul(k,ge)|0)+Math.imul(O,pe)|0,c=c+Math.imul(O,ge)|0,r=r+Math.imul(S,me)|0,o=(o=o+Math.imul(S,ve)|0)+Math.imul(E,me)|0,c=c+Math.imul(E,ve)|0;var Me=(d+(r=r+Math.imul(w,be)|0)|0)+((8191&(o=(o=o+Math.imul(w,Ie)|0)+Math.imul(_,be)|0))<<13)|0;d=((c=c+Math.imul(_,Ie)|0)+(o>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(L,ne),o=(o=Math.imul(L,re))+Math.imul(G,ne)|0,c=Math.imul(G,re),r=r+Math.imul(J,ie)|0,o=(o=o+Math.imul(J,ae)|0)+Math.imul(H,ie)|0,c=c+Math.imul(H,ae)|0,r=r+Math.imul(T,ce)|0,o=(o=o+Math.imul(T,ue)|0)+Math.imul(j,ce)|0,c=c+Math.imul(j,ue)|0,r=r+Math.imul(Q,de)|0,o=(o=o+Math.imul(Q,fe)|0)+Math.imul(N,de)|0,c=c+Math.imul(N,fe)|0,r=r+Math.imul(P,pe)|0,o=(o=o+Math.imul(P,ge)|0)+Math.imul(x,pe)|0,c=c+Math.imul(x,ge)|0,r=r+Math.imul(k,me)|0,o=(o=o+Math.imul(k,ve)|0)+Math.imul(O,me)|0,c=c+Math.imul(O,ve)|0;var Qe=(d+(r=r+Math.imul(S,be)|0)|0)+((8191&(o=(o=o+Math.imul(S,Ie)|0)+Math.imul(E,be)|0))<<13)|0;d=((c=c+Math.imul(E,Ie)|0)+(o>>>13)|0)+(Qe>>>26)|0,Qe&=67108863,r=Math.imul(L,ie),o=(o=Math.imul(L,ae))+Math.imul(G,ie)|0,c=Math.imul(G,ae),r=r+Math.imul(J,ce)|0,o=(o=o+Math.imul(J,ue)|0)+Math.imul(H,ce)|0,c=c+Math.imul(H,ue)|0,r=r+Math.imul(T,de)|0,o=(o=o+Math.imul(T,fe)|0)+Math.imul(j,de)|0,c=c+Math.imul(j,fe)|0,r=r+Math.imul(Q,pe)|0,o=(o=o+Math.imul(Q,ge)|0)+Math.imul(N,pe)|0,c=c+Math.imul(N,ge)|0,r=r+Math.imul(P,me)|0,o=(o=o+Math.imul(P,ve)|0)+Math.imul(x,me)|0,c=c+Math.imul(x,ve)|0;var Ne=(d+(r=r+Math.imul(k,be)|0)|0)+((8191&(o=(o=o+Math.imul(k,Ie)|0)+Math.imul(O,be)|0))<<13)|0;d=((c=c+Math.imul(O,Ie)|0)+(o>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,r=Math.imul(L,ce),o=(o=Math.imul(L,ue))+Math.imul(G,ce)|0,c=Math.imul(G,ue),r=r+Math.imul(J,de)|0,o=(o=o+Math.imul(J,fe)|0)+Math.imul(H,de)|0,c=c+Math.imul(H,fe)|0,r=r+Math.imul(T,pe)|0,o=(o=o+Math.imul(T,ge)|0)+Math.imul(j,pe)|0,c=c+Math.imul(j,ge)|0,r=r+Math.imul(Q,me)|0,o=(o=o+Math.imul(Q,ve)|0)+Math.imul(N,me)|0,c=c+Math.imul(N,ve)|0;var De=(d+(r=r+Math.imul(P,be)|0)|0)+((8191&(o=(o=o+Math.imul(P,Ie)|0)+Math.imul(x,be)|0))<<13)|0;d=((c=c+Math.imul(x,Ie)|0)+(o>>>13)|0)+(De>>>26)|0,De&=67108863,r=Math.imul(L,de),o=(o=Math.imul(L,fe))+Math.imul(G,de)|0,c=Math.imul(G,fe),r=r+Math.imul(J,pe)|0,o=(o=o+Math.imul(J,ge)|0)+Math.imul(H,pe)|0,c=c+Math.imul(H,ge)|0,r=r+Math.imul(T,me)|0,o=(o=o+Math.imul(T,ve)|0)+Math.imul(j,me)|0,c=c+Math.imul(j,ve)|0;var Te=(d+(r=r+Math.imul(Q,be)|0)|0)+((8191&(o=(o=o+Math.imul(Q,Ie)|0)+Math.imul(N,be)|0))<<13)|0;d=((c=c+Math.imul(N,Ie)|0)+(o>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(L,pe),o=(o=Math.imul(L,ge))+Math.imul(G,pe)|0,c=Math.imul(G,ge),r=r+Math.imul(J,me)|0,o=(o=o+Math.imul(J,ve)|0)+Math.imul(H,me)|0,c=c+Math.imul(H,ve)|0;var je=(d+(r=r+Math.imul(T,be)|0)|0)+((8191&(o=(o=o+Math.imul(T,Ie)|0)+Math.imul(j,be)|0))<<13)|0;d=((c=c+Math.imul(j,Ie)|0)+(o>>>13)|0)+(je>>>26)|0,je&=67108863,r=Math.imul(L,me),o=(o=Math.imul(L,ve))+Math.imul(G,me)|0,c=Math.imul(G,ve);var Ue=(d+(r=r+Math.imul(J,be)|0)|0)+((8191&(o=(o=o+Math.imul(J,Ie)|0)+Math.imul(H,be)|0))<<13)|0;d=((c=c+Math.imul(H,Ie)|0)+(o>>>13)|0)+(Ue>>>26)|0,Ue&=67108863;var Je=(d+(r=Math.imul(L,be))|0)+((8191&(o=(o=Math.imul(L,Ie))+Math.imul(G,be)|0))<<13)|0;return d=((c=Math.imul(G,Ie))+(o>>>13)|0)+(Je>>>26)|0,Je&=67108863,l[0]=we,l[1]=_e,l[2]=Ce,l[3]=Se,l[4]=Ee,l[5]=Be,l[6]=ke,l[7]=Oe,l[8]=Re,l[9]=Pe,l[10]=xe,l[11]=Me,l[12]=Qe,l[13]=Ne,l[14]=De,l[15]=Te,l[16]=je,l[17]=Ue,l[18]=Je,0!==d&&(l[19]=d,n.length++),n};function w(e,t,n){return(new _).mulp(e,t,n)}function _(e,t){this.x=e,this.y=t}Math.imul||(I=y),c.prototype.mulTo=function(e,t){var n,r=this.length+e.length;return n=10===this.length&&10===e.length?I(this,e,t):r<63?y(this,e,t):r<1024?function(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,o=0,c=0;c>>26)|0)>>>26,l&=67108863}n.words[c]=d,r=l,l=o}return 0!==r?n.words[c]=r:n.length--,n.strip()}(this,e,t):w(this,e,t),n},_.prototype.makeRBT=function(e){for(var t=new Array(e),n=c.prototype._countBits(e)-1,i=0;i>=1;return r},_.prototype.permute=function(e,t,n,r,o,c){for(var i=0;i>>=1)i++;return 1<>>=13,n[2*i+1]=8191&c,c>>>=13;for(i=2*t;i>=26,t+=n/67108864|0,t+=o>>>26,this.words[i]=67108863&o}return 0!==t&&(this.words[i]=t,this.length++),this},c.prototype.muln=function(e){return this.clone().imuln(e)},c.prototype.sqr=function(){return this.mul(this)},c.prototype.isqr=function(){return this.imul(this.clone())},c.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n>>o}return t}(e);if(0===t.length)return new c(1);for(var n=this,i=0;i=0);var i,t=e%26,s=(e-t)/26,n=67108863>>>26-t<<26-t;if(0!==t){var o=0;for(i=0;i>>26-t}o&&(this.words[i]=o,this.length++)}if(0!==s){for(i=this.length-1;i>=0;i--)this.words[i+s]=this.words[i];for(i=0;i=0),o=t?(t-t%26)/26:0;var c=e%26,s=Math.min((e-c)/26,this.length),mask=67108863^67108863>>>c<s)for(this.length-=s,i=0;i=0&&(0!==d||i>=o);i--){var f=0|this.words[i];this.words[i]=d<<26-c|f>>>c,d=f&mask}return l&&0!==d&&(l.words[l.length++]=d),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},c.prototype.ishrn=function(e,t,n){return r(0===this.negative),this.iushrn(e,t,n)},c.prototype.shln=function(e){return this.clone().ishln(e)},c.prototype.ushln=function(e){return this.clone().iushln(e)},c.prototype.shrn=function(e){return this.clone().ishrn(e)},c.prototype.ushrn=function(e){return this.clone().iushrn(e)},c.prototype.testn=function(e){r("number"==typeof e&&e>=0);var t=e%26,s=(e-t)/26,q=1<=0);var t=e%26,s=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=s)return this;if(0!==t&&s++,this.length=Math.min(s,this.length),0!==t){var mask=67108863^67108863>>>t<=67108864;i++)this.words[i]-=67108864,i===this.length-1?this.words[i+1]=1:this.words[i+1]++;return this.length=Math.max(this.length,i+1),this},c.prototype.isubn=function(e){if(r("number"==typeof e),r(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 i=0;i>26)-(d/67108864|0),this.words[i+n]=67108863&o}for(;i>26,this.words[i+n]=67108863&o;if(0===l)return this.strip();for(r(-1===l),l=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},c.prototype._wordDiv=function(e,t){var n=(this.length,e.length),a=this.clone(),b=e,r=0|b.words[b.length-1];0!==(n=26-this._countBits(r))&&(b=b.ushln(n),a.iushln(n),r=0|b.words[b.length-1]);var q,o=a.length-b.length;if("mod"!==t){(q=new c(null)).length=o+1,q.words=new Array(q.length);for(var i=0;i=0;d--){var f=67108864*(0|a.words[b.length+d])+(0|a.words[b.length+d-1]);for(f=Math.min(f/r|0,67108863),a._ishlnsubmul(b,f,d);0!==a.negative;)f--,a.negative=0,a._ishlnsubmul(b,1,d),a.isZero()||(a.negative^=1);q&&(q.words[d]=f)}return q&&q.strip(),a.strip(),"div"!==t&&0!==n&&a.iushrn(n),{div:q||null,mod:a}},c.prototype.divmod=function(e,t,n){return r(!e.isZero()),this.isZero()?{div:new c(0),mod:new c(0)}:0!==this.negative&&0===e.negative?(l=this.neg().divmod(e,t),"mod"!==t&&(div=l.div.neg()),"div"!==t&&(o=l.mod.neg(),n&&0!==o.negative&&o.iadd(e)),{div:div,mod:o}):0===this.negative&&0!==e.negative?(l=this.divmod(e.neg(),t),"mod"!==t&&(div=l.div.neg()),{div:div,mod:l.mod}):0!=(this.negative&e.negative)?(l=this.neg().divmod(e.neg(),t),"div"!==t&&(o=l.mod.neg(),n&&0!==o.negative&&o.isub(e)),{div:l.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new c(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new c(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new c(this.modn(e.words[0]))}:this._wordDiv(e,t);var div,o,l},c.prototype.div=function(e){return this.divmod(e,"div",!1).div},c.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},c.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},c.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),o=e.andln(1),c=n.cmp(r);return c<0||1===o&&0===c?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},c.prototype.modn=function(e){r(e<=67108863);for(var p=(1<<26)%e,t=0,i=this.length-1;i>=0;i--)t=(p*t+(0|this.words[i]))%e;return t},c.prototype.idivn=function(e){r(e<=67108863);for(var t=0,i=this.length-1;i>=0;i--){var n=(0|this.words[i])+67108864*t;this.words[i]=n/e|0,t=n%e}return this.strip()},c.prototype.divn=function(e){return this.clone().idivn(e)},c.prototype.egcd=function(p){r(0===p.negative),r(!p.isZero());var e=this,t=p.clone();e=0!==e.negative?e.umod(p):e.clone();for(var n=new c(1),o=new c(0),l=new c(0),d=new c(1),g=0;e.isEven()&&t.isEven();)e.iushrn(1),t.iushrn(1),++g;for(var f=t.clone(),h=e.clone();!e.isZero();){for(var i=0,A=1;0==(e.words[0]&A)&&i<26;++i,A<<=1);if(i>0)for(e.iushrn(i);i-- >0;)(n.isOdd()||o.isOdd())&&(n.iadd(f),o.isub(h)),n.iushrn(1),o.iushrn(1);for(var m=0,v=1;0==(t.words[0]&v)&&m<26;++m,v<<=1);if(m>0)for(t.iushrn(m);m-- >0;)(l.isOdd()||d.isOdd())&&(l.iadd(f),d.isub(h)),l.iushrn(1),d.iushrn(1);e.cmp(t)>=0?(e.isub(t),n.isub(l),o.isub(d)):(t.isub(e),l.isub(n),d.isub(o))}return{a:l,b:d,gcd:t.iushln(g)}},c.prototype._invmp=function(p){r(0===p.negative),r(!p.isZero());var a=this,b=p.clone();a=0!==a.negative?a.umod(p):a.clone();for(var e,t=new c(1),n=new c(0),o=b.clone();a.cmpn(1)>0&&b.cmpn(1)>0;){for(var i=0,l=1;0==(a.words[0]&l)&&i<26;++i,l<<=1);if(i>0)for(a.iushrn(i);i-- >0;)t.isOdd()&&t.iadd(o),t.iushrn(1);for(var d=0,f=1;0==(b.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(b.iushrn(d);d-- >0;)n.isOdd()&&n.iadd(o),n.iushrn(1);a.cmp(b)>=0?(a.isub(b),t.isub(n)):(b.isub(a),n.isub(t))}return(e=0===a.cmpn(1)?t:n).cmpn(0)<0&&e.iadd(p),e},c.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var a=this.clone(),b=e.clone();a.negative=0,b.negative=0;for(var t=0;a.isEven()&&b.isEven();t++)a.iushrn(1),b.iushrn(1);for(;;){for(;a.isEven();)a.iushrn(1);for(;b.isEven();)b.iushrn(1);var n=a.cmp(b);if(n<0){var r=a;a=b,b=r}else if(0===n||0===b.cmpn(1))break;a.isub(b)}return b.iushln(t)},c.prototype.invm=function(e){return this.egcd(e).a.umod(e)},c.prototype.isEven=function(){return 0==(1&this.words[0])},c.prototype.isOdd=function(){return 1==(1&this.words[0])},c.prototype.andln=function(e){return this.words[0]&e},c.prototype.bincn=function(e){r("number"==typeof e);var t=e%26,s=(e-t)/26,q=1<>>26,o&=67108863,this.words[i]=o}return 0!==n&&(this.words[i]=n,this.length++),this},c.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},c.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)t=1;else{n&&(e=-e),r(e<=67108863,"Number is too big");var o=0|this.words[0];t=o===e?0:oe.length)return 1;if(this.length=0;i--){var a=0|this.words[i],b=0|e.words[i];if(a!==b){ab&&(t=1);break}}return t},c.prototype.gtn=function(e){return 1===this.cmpn(e)},c.prototype.gt=function(e){return 1===this.cmp(e)},c.prototype.gten=function(e){return this.cmpn(e)>=0},c.prototype.gte=function(e){return this.cmp(e)>=0},c.prototype.ltn=function(e){return-1===this.cmpn(e)},c.prototype.lt=function(e){return-1===this.cmp(e)},c.prototype.lten=function(e){return this.cmpn(e)<=0},c.prototype.lte=function(e){return this.cmp(e)<=0},c.prototype.eqn=function(e){return 0===this.cmpn(e)},c.prototype.eq=function(e){return 0===this.cmp(e)},c.red=function(e){return new R(e)},c.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},c.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},c.prototype._forceRed=function(e){return this.red=e,this},c.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},c.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},c.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},c.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},c.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},c.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},c.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},c.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},c.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},c.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},c.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},c.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},c.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},c.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var C={k256:null,p224:null,p192:null,p25519:null};function S(e,p){this.name=e,this.p=new c(p,16),this.n=this.p.bitLength(),this.k=new c(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function E(){S.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function B(){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 R(e){if("string"==typeof e){var t=c._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function P(e){R.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new c(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 c(null);return e.words=new Array(Math.ceil(this.n/13)),e},S.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},S.prototype.split=function(input,e){input.iushrn(this.n,0,e)},S.prototype.imulK=function(e){return e.imul(this.k)},o(E,S),E.prototype.split=function(input,output){for(var mask=4194303,e=Math.min(input.length,9),i=0;i>>22,t=n}t>>>=22,input.words[i-10]=t,0===t&&input.length>10?input.length-=10:input.length-=9},E.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,i=0;i>>=26,e.words[i]=r,t=n}return 0!==t&&(e.words[e.length++]=t),e},c._prime=function(e){if(C[e])return C[e];var t;if("k256"===e)t=new E;else if("p224"===e)t=new B;else if("p192"===e)t=new k;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new O}return C[e]=t,t},R.prototype._verify1=function(a){r(0===a.negative,"red works only with positives"),r(a.red,"red works only with red numbers")},R.prototype._verify2=function(a,b){r(0==(a.negative|b.negative),"red works only with positives"),r(a.red&&a.red===b.red,"red works only with red numbers")},R.prototype.imod=function(a){return this.prime?this.prime.ireduce(a)._forceRed(this):a.umod(this.m)._forceRed(this)},R.prototype.neg=function(a){return a.isZero()?a.clone():this.m.sub(a)._forceRed(this)},R.prototype.add=function(a,b){this._verify2(a,b);var e=a.add(b);return e.cmp(this.m)>=0&&e.isub(this.m),e._forceRed(this)},R.prototype.iadd=function(a,b){this._verify2(a,b);var e=a.iadd(b);return e.cmp(this.m)>=0&&e.isub(this.m),e},R.prototype.sub=function(a,b){this._verify2(a,b);var e=a.sub(b);return e.cmpn(0)<0&&e.iadd(this.m),e._forceRed(this)},R.prototype.isub=function(a,b){this._verify2(a,b);var e=a.isub(b);return e.cmpn(0)<0&&e.iadd(this.m),e},R.prototype.shl=function(a,e){return this._verify1(a),this.imod(a.ushln(e))},R.prototype.imul=function(a,b){return this._verify2(a,b),this.imod(a.imul(b))},R.prototype.mul=function(a,b){return this._verify2(a,b),this.imod(a.mul(b))},R.prototype.isqr=function(a){return this.imul(a,a.clone())},R.prototype.sqr=function(a){return this.mul(a,a)},R.prototype.sqrt=function(a){if(a.isZero())return a.clone();var e=this.m.andln(3);if(r(e%2==1),3===e){var t=this.m.add(new c(1)).iushrn(2);return this.pow(a,t)}for(var q=this.m.subn(1),s=0;!q.isZero()&&0===q.andln(1);)s++,q.iushrn(1);r(!q.isZero());var n=new c(1).toRed(this),o=n.redNeg(),l=this.m.subn(1).iushrn(1),d=this.m.bitLength();for(d=new c(2*d*d).toRed(this);0!==this.pow(d,l).cmp(o);)d.redIAdd(o);for(var f=this.pow(d,q),h=this.pow(a,q.addn(1).iushrn(1)),A=this.pow(a,q),m=s;0!==A.cmp(n);){for(var v=A,i=0;0!==v.cmp(n);i++)v=v.redSqr();r(i=0;i--){for(var d=e.words[i],f=l-1;f>=0;f--){var h=d>>f&1;n!==t[0]&&(n=this.sqr(n)),0!==h||0!==r?(r<<=1,r|=h,(4===++o||0===i&&0===f)&&(n=this.mul(n,t[r]),o=0,r=0)):o=0}l=26}return n},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},c.mont=function(e){return new P(e)},o(P,R),P.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},P.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},P.prototype.imul=function(a,b){if(a.isZero()||b.isZero())return a.words[0]=0,a.length=1,a;var e=a.imul(b),t=e.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),u=e.isub(t).iushrn(this.shift),n=u;return u.cmp(this.m)>=0?n=u.isub(this.m):u.cmpn(0)<0&&(n=u.iadd(this.m)),n._forceRed(this)},P.prototype.mul=function(a,b){if(a.isZero()||b.isZero())return new c(0)._forceRed(this);var e=a.mul(b),t=e.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),u=e.isub(t).iushrn(this.shift),n=u;return u.cmp(this.m)>=0?n=u.isub(this.m):u.cmpn(0)<0&&(n=u.iadd(this.m)),n._forceRed(this)},P.prototype.invm=function(a){return this.imod(a._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)}).call(this,n(113)(e))},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.DecProto=t.IntProto=t.DecCoin=t.Coin=t.protobufPackage=void 0;const o=r(n(1)),c=r(n(2));t.protobufPackage="cosmos.base.v1beta1";const l={denom:"",amount:""};t.Coin={encode:(e,t=c.default.Writer.create())=>(""!==e.denom&&t.uint32(10).string(e.denom),""!==e.amount&&t.uint32(18).string(e.amount),t),decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},l);for(;t.pos>>3){case 1:r.denom=t.string();break;case 2:r.amount=t.string();break;default:t.skipType(7&e)}}return r},fromJSON(object){const e=Object.assign({},l);return e.denom=void 0!==object.denom&&null!==object.denom?String(object.denom):"",e.amount=void 0!==object.amount&&null!==object.amount?String(object.amount):"",e},toJSON(e){const t={};return void 0!==e.denom&&(t.denom=e.denom),void 0!==e.amount&&(t.amount=e.amount),t},fromPartial(object){var e,t;const n=Object.assign({},l);return n.denom=null!==(e=object.denom)&&void 0!==e?e:"",n.amount=null!==(t=object.amount)&&void 0!==t?t:"",n}};const d={denom:"",amount:""};t.DecCoin={encode:(e,t=c.default.Writer.create())=>(""!==e.denom&&t.uint32(10).string(e.denom),""!==e.amount&&t.uint32(18).string(e.amount),t),decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},d);for(;t.pos>>3){case 1:r.denom=t.string();break;case 2:r.amount=t.string();break;default:t.skipType(7&e)}}return r},fromJSON(object){const e=Object.assign({},d);return e.denom=void 0!==object.denom&&null!==object.denom?String(object.denom):"",e.amount=void 0!==object.amount&&null!==object.amount?String(object.amount):"",e},toJSON(e){const t={};return void 0!==e.denom&&(t.denom=e.denom),void 0!==e.amount&&(t.amount=e.amount),t},fromPartial(object){var e,t;const n=Object.assign({},d);return n.denom=null!==(e=object.denom)&&void 0!==e?e:"",n.amount=null!==(t=object.amount)&&void 0!==t?t:"",n}};const f={int:""};t.IntProto={encode:(e,t=c.default.Writer.create())=>(""!==e.int&&t.uint32(10).string(e.int),t),decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},f);for(;t.pos>>3==1)r.int=t.string();else t.skipType(7&e)}return r},fromJSON(object){const e=Object.assign({},f);return e.int=void 0!==object.int&&null!==object.int?String(object.int):"",e},toJSON(e){const t={};return void 0!==e.int&&(t.int=e.int),t},fromPartial(object){var e;const t=Object.assign({},f);return t.int=null!==(e=object.int)&&void 0!==e?e:"",t}};const h={dec:""};t.DecProto={encode:(e,t=c.default.Writer.create())=>(""!==e.dec&&t.uint32(10).string(e.dec),t),decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},h);for(;t.pos>>3==1)r.dec=t.string();else t.skipType(7&e)}return r},fromJSON(object){const e=Object.assign({},h);return e.dec=void 0!==object.dec&&null!==object.dec?String(object.dec):"",e},toJSON(e){const t={};return void 0!==e.dec&&(t.dec=e.dec),t},fromPartial(object){var e;const t=Object.assign({},h);return t.dec=null!==(e=object.dec)&&void 0!==e?e:"",t}},c.default.util.Long!==o.default&&(c.default.util.Long=o.default,c.default.configure())},function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"d",(function(){return o})),n.d(t,"c",(function(){return c})),n.d(t,"e",(function(){return l})),n.d(t,"f",(function(){return d})),n.d(t,"a",(function(){return f}));const r="INTERNAL_ERROR",o="SERVER_ERROR",c=[-32700,-32600,-32601,-32602,-32603],l=[-32e3,-32099],d={PARSE_ERROR:{code:-32700,message:"Parse error"},INVALID_REQUEST:{code:-32600,message:"Invalid Request"},METHOD_NOT_FOUND:{code:-32601,message:"Method not found"},INVALID_PARAMS:{code:-32602,message:"Invalid params"},[r]:{code:-32603,message:"Internal error"},[o]:{code:-32e3,message:"Server error"}},f=o},,function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var p in e)"default"===p||t.hasOwnProperty(p)||r(t,e,p)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(565),t),o(n(566),t)},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isUint8Array=t.isNonNullObject=t.sleep=t.assertDefinedAndNotNull=t.assertDefined=t.assert=t.arrayContentStartsWith=t.arrayContentEquals=void 0;var r=n(622);Object.defineProperty(t,"arrayContentEquals",{enumerable:!0,get:function(){return r.arrayContentEquals}}),Object.defineProperty(t,"arrayContentStartsWith",{enumerable:!0,get:function(){return r.arrayContentStartsWith}});var o=n(623);Object.defineProperty(t,"assert",{enumerable:!0,get:function(){return o.assert}}),Object.defineProperty(t,"assertDefined",{enumerable:!0,get:function(){return o.assertDefined}}),Object.defineProperty(t,"assertDefinedAndNotNull",{enumerable:!0,get:function(){return o.assertDefinedAndNotNull}});var c=n(624);Object.defineProperty(t,"sleep",{enumerable:!0,get:function(){return c.sleep}});var l=n(625);Object.defineProperty(t,"isNonNullObject",{enumerable:!0,get:function(){return l.isNonNullObject}}),Object.defineProperty(t,"isUint8Array",{enumerable:!0,get:function(){return l.isUint8Array}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Uint64=t.Uint53=t.Uint32=t.Int53=t.Decimal=void 0;var r=n(729);Object.defineProperty(t,"Decimal",{enumerable:!0,get:function(){return r.Decimal}});var o=n(731);Object.defineProperty(t,"Int53",{enumerable:!0,get:function(){return o.Int53}}),Object.defineProperty(t,"Uint32",{enumerable:!0,get:function(){return o.Uint32}}),Object.defineProperty(t,"Uint53",{enumerable:!0,get:function(){return o.Uint53}}),Object.defineProperty(t,"Uint64",{enumerable:!0,get:function(){return o.Uint64}})},,,,,function(e,t,n){"use strict";function r(e){let t;return"undefined"!=typeof window&&void 0!==window[e]&&(t=window[e]),t}function o(e){const t=r(e);if(!t)throw new Error(`${e} is not defined in Window`);return t}Object.defineProperty(t,"__esModule",{value:!0}),t.getLocalStorage=t.getLocalStorageOrThrow=t.getCrypto=t.getCryptoOrThrow=t.getLocation=t.getLocationOrThrow=t.getNavigator=t.getNavigatorOrThrow=t.getDocument=t.getDocumentOrThrow=t.getFromWindowOrThrow=t.getFromWindow=void 0,t.getFromWindow=r,t.getFromWindowOrThrow=o,t.getDocumentOrThrow=function(){return o("document")},t.getDocument=function(){return r("document")},t.getNavigatorOrThrow=function(){return o("navigator")},t.getNavigator=function(){return r("navigator")},t.getLocationOrThrow=function(){return o("location")},t.getLocation=function(){return r("location")},t.getCryptoOrThrow=function(){return o("crypto")},t.getCrypto=function(){return r("crypto")},t.getLocalStorageOrThrow=function(){return o("localStorage")},t.getLocalStorage=function(){return r("localStorage")}},,,function(e,t,n){"use strict";(function(e){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.PageResponse=t.PageRequest=t.protobufPackage=void 0;const o=r(n(1)),c=r(n(2));t.protobufPackage="cosmos.base.query.v1beta1";const l={offset:o.default.UZERO,limit:o.default.UZERO,countTotal:!1,reverse:!1};t.PageRequest={encode:(e,t=c.default.Writer.create())=>(0!==e.key.length&&t.uint32(10).bytes(e.key),e.offset.isZero()||t.uint32(16).uint64(e.offset),e.limit.isZero()||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(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},l);for(r.key=new Uint8Array;t.pos>>3){case 1:r.key=t.bytes();break;case 2:r.offset=t.uint64();break;case 3:r.limit=t.uint64();break;case 4:r.countTotal=t.bool();break;case 5:r.reverse=t.bool();break;default:t.skipType(7&e)}}return r},fromJSON(object){const e=Object.assign({},l);return e.key=void 0!==object.key&&null!==object.key?A(object.key):new Uint8Array,e.offset=void 0!==object.offset&&null!==object.offset?o.default.fromString(object.offset):o.default.UZERO,e.limit=void 0!==object.limit&&null!==object.limit?o.default.fromString(object.limit):o.default.UZERO,e.countTotal=void 0!==object.countTotal&&null!==object.countTotal&&Boolean(object.countTotal),e.reverse=void 0!==object.reverse&&null!==object.reverse&&Boolean(object.reverse),e},toJSON(e){const t={};return void 0!==e.key&&(t.key=v(void 0!==e.key?e.key:new Uint8Array)),void 0!==e.offset&&(t.offset=(e.offset||o.default.UZERO).toString()),void 0!==e.limit&&(t.limit=(e.limit||o.default.UZERO).toString()),void 0!==e.countTotal&&(t.countTotal=e.countTotal),void 0!==e.reverse&&(t.reverse=e.reverse),t},fromPartial(object){var e,t,n;const r=Object.assign({},l);return r.key=null!==(e=object.key)&&void 0!==e?e:new Uint8Array,r.offset=void 0!==object.offset&&null!==object.offset?o.default.fromValue(object.offset):o.default.UZERO,r.limit=void 0!==object.limit&&null!==object.limit?o.default.fromValue(object.limit):o.default.UZERO,r.countTotal=null!==(t=object.countTotal)&&void 0!==t&&t,r.reverse=null!==(n=object.reverse)&&void 0!==n&&n,r}};const d={total:o.default.UZERO};t.PageResponse={encode:(e,t=c.default.Writer.create())=>(0!==e.nextKey.length&&t.uint32(10).bytes(e.nextKey),e.total.isZero()||t.uint32(16).uint64(e.total),t),decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},d);for(r.nextKey=new Uint8Array;t.pos>>3){case 1:r.nextKey=t.bytes();break;case 2:r.total=t.uint64();break;default:t.skipType(7&e)}}return r},fromJSON(object){const e=Object.assign({},d);return e.nextKey=void 0!==object.nextKey&&null!==object.nextKey?A(object.nextKey):new Uint8Array,e.total=void 0!==object.total&&null!==object.total?o.default.fromString(object.total):o.default.UZERO,e},toJSON(e){const t={};return void 0!==e.nextKey&&(t.nextKey=v(void 0!==e.nextKey?e.nextKey:new Uint8Array)),void 0!==e.total&&(t.total=(e.total||o.default.UZERO).toString()),t},fromPartial(object){var e;const t=Object.assign({},d);return t.nextKey=null!==(e=object.nextKey)&&void 0!==e?e:new Uint8Array,t.total=void 0!==object.total&&null!==object.total?o.default.fromValue(object.total):o.default.UZERO,t}};var f=(()=>{if(void 0!==f)return f;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==e)return e;throw"Unable to locate global object"})();const h=f.atob||(e=>f.Buffer.from(e,"base64").toString("binary"));function A(e){const t=h(e),n=new Uint8Array(t.length);for(let i=0;if.Buffer.from(e,"binary").toString("base64"));function v(e){const t=[];for(const n of e)t.push(String.fromCharCode(n));return m(t.join(""))}c.default.util.Long!==o.default&&(c.default.util.Long=o.default,c.default.configure())}).call(this,n(3))},,,,,,function(e,t){function n(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=n,n.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)}},function(e,t,n){"use strict";var r=t,o=n(27),c=n(48),l=n(381);r.assert=c,r.toArray=l.toArray,r.zero2=l.zero2,r.toHex=l.toHex,r.encode=l.encode,r.getNAF=function(e,t,n){var r=new Array(Math.max(e.bitLength(),n)+1);r.fill(0);for(var o=1<(o>>1)-1?(o>>1)-d:d,c.isubn(l)):l=0,r[i]=l,c.iushrn(1)}return r},r.getJSF=function(e,t){var n=[[],[]];e=e.clone(),t=t.clone();for(var r,o=0,c=0;e.cmpn(-o)>0||t.cmpn(-c)>0;){var l,d,f=e.andln(3)+o&3,h=t.andln(3)+c&3;3===f&&(f=-1),3===h&&(h=-1),l=0==(1&f)?0:3!==(r=e.andln(7)+o&7)&&5!==r||2!==h?f:-f,n[0].push(l),d=0==(1&h)?0:3!==(r=t.andln(7)+c&7)&&5!==r||2!==f?h:-h,n[1].push(d),2*o===l+1&&(o=1-o),2*c===d+1&&(c=1-c),e.iushrn(1),t.iushrn(1)}return n},r.cachedProperty=function(e,t,n){var r="_"+t;e.prototype[t]=function(){return void 0!==this[r]?this[r]:this[r]=n.call(this)}},r.parseBytes=function(e){return"string"==typeof e?r.toArray(e,"hex"):e},r.intFromLE=function(e){return new o(e,"hex","le")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.longify=t.decodeCosmosSdkDecFromProto=t.createProtobufRpcClient=t.createPagination=t.QueryClient=void 0;var r=n(801);Object.defineProperty(t,"QueryClient",{enumerable:!0,get:function(){return r.QueryClient}});var o=n(806);Object.defineProperty(t,"createPagination",{enumerable:!0,get:function(){return o.createPagination}}),Object.defineProperty(t,"createProtobufRpcClient",{enumerable:!0,get:function(){return o.createProtobufRpcClient}}),Object.defineProperty(t,"decodeCosmosSdkDecFromProto",{enumerable:!0,get:function(){return o.decodeCosmosSdkDecFromProto}}),Object.defineProperty(t,"longify",{enumerable:!0,get:function(){return o.longify}})},,,function(e,t,n){"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 r=n(613);Object.defineProperty(t,"Bip39",{enumerable:!0,get:function(){return r.Bip39}}),Object.defineProperty(t,"EnglishMnemonic",{enumerable:!0,get:function(){return r.EnglishMnemonic}});var o=n(397);Object.defineProperty(t,"Hmac",{enumerable:!0,get:function(){return o.Hmac}});var c=n(719);Object.defineProperty(t,"Keccak256",{enumerable:!0,get:function(){return c.Keccak256}}),Object.defineProperty(t,"keccak256",{enumerable:!0,get:function(){return c.keccak256}});var l=n(721);Object.defineProperty(t,"Argon2id",{enumerable:!0,get:function(){return l.Argon2id}}),Object.defineProperty(t,"Ed25519",{enumerable:!0,get:function(){return l.Ed25519}}),Object.defineProperty(t,"Ed25519Keypair",{enumerable:!0,get:function(){return l.Ed25519Keypair}}),Object.defineProperty(t,"isArgon2idOptions",{enumerable:!0,get:function(){return l.isArgon2idOptions}}),Object.defineProperty(t,"xchacha20NonceLength",{enumerable:!0,get:function(){return l.xchacha20NonceLength}}),Object.defineProperty(t,"Xchacha20poly1305Ietf",{enumerable:!0,get:function(){return l.Xchacha20poly1305Ietf}});var d=n(724);Object.defineProperty(t,"Random",{enumerable:!0,get:function(){return d.Random}});var f=n(725);Object.defineProperty(t,"Ripemd160",{enumerable:!0,get:function(){return f.Ripemd160}}),Object.defineProperty(t,"ripemd160",{enumerable:!0,get:function(){return f.ripemd160}});var h=n(726);Object.defineProperty(t,"Secp256k1",{enumerable:!0,get:function(){return h.Secp256k1}});var A=n(401);Object.defineProperty(t,"ExtendedSecp256k1Signature",{enumerable:!0,get:function(){return A.ExtendedSecp256k1Signature}}),Object.defineProperty(t,"Secp256k1Signature",{enumerable:!0,get:function(){return A.Secp256k1Signature}});var m=n(238);Object.defineProperty(t,"Sha256",{enumerable:!0,get:function(){return m.Sha256}}),Object.defineProperty(t,"sha256",{enumerable:!0,get:function(){return m.sha256}}),Object.defineProperty(t,"Sha512",{enumerable:!0,get:function(){return m.Sha512}}),Object.defineProperty(t,"sha512",{enumerable:!0,get:function(){return m.sha512}});var v=n(728);Object.defineProperty(t,"pathToString",{enumerable:!0,get:function(){return v.pathToString}}),Object.defineProperty(t,"Slip10",{enumerable:!0,get:function(){return v.Slip10}}),Object.defineProperty(t,"Slip10Curve",{enumerable:!0,get:function(){return v.Slip10Curve}}),Object.defineProperty(t,"slip10CurveFromString",{enumerable:!0,get:function(){return v.slip10CurveFromString}}),Object.defineProperty(t,"Slip10RawIndex",{enumerable:!0,get:function(){return v.Slip10RawIndex}}),Object.defineProperty(t,"stringToPath",{enumerable:!0,get:function(){return v.stringToPath}})},function(e,t,n){"use strict";n.d(t,"b",(function(){return l})),n.d(t,"a",(function(){return d})),n.d(t,"c",(function(){return f})),n.d(t,"d",(function(){return h})),n.d(t,"e",(function(){return A})),n.d(t,"f",(function(){return m}));var r=n(31),o=n(18);async function c(e,t=o.a){return r.getSubtleCrypto().importKey("raw",e,function(e){return e===o.a?{length:o.b,name:o.a}:{hash:{name:o.f},name:o.e}}(t),!0,function(e){return e===o.a?[o.d,o.c]:[o.k,o.l]}(t))}async function l(e,t,data){const n=r.getSubtleCrypto(),l=await c(t,o.a),d=await n.encrypt({iv:e,name:o.a},l,data);return new Uint8Array(d)}async function d(e,t,data){const n=r.getSubtleCrypto(),l=await c(t,o.a),d=await n.decrypt({iv:e,name:o.a},l,data);return new Uint8Array(d)}async function f(e,data){const t=r.getSubtleCrypto(),n=await c(e,o.e),l=await t.sign({length:o.g,name:o.e},n,data);return new Uint8Array(l)}async function h(e,data){const t=r.getSubtleCrypto(),n=await c(e,o.e),l=await t.sign({length:o.h,name:o.e},n,data);return new Uint8Array(l)}async function A(data){const e=r.getSubtleCrypto(),t=await e.digest({name:o.i},data);return new Uint8Array(t)}async function m(data){const e=r.getSubtleCrypto(),t=await e.digest({name:o.j},data);return new Uint8Array(t)}},,,,,function(e,t,n){"use strict";var r=n(48),o=n(8);function c(e,i){return 55296==(64512&e.charCodeAt(i))&&(!(i<0||i+1>=e.length)&&56320==(64512&e.charCodeAt(i+1)))}function l(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function d(e){return 1===e.length?"0"+e:e}function f(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=o,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),i=0;i>6|192,n[p++]=63&r|128):c(e,i)?(r=65536+((1023&r)<<10)+(1023&e.charCodeAt(++i)),n[p++]=r>>18|240,n[p++]=r>>12&63|128,n[p++]=r>>6&63|128,n[p++]=63&r|128):(n[p++]=r>>12|224,n[p++]=r>>6&63|128,n[p++]=63&r|128)}else for(i=0;i>>0}return l},t.split32=function(e,t){for(var n=new Array(4*e.length),i=0,r=0;i>>24,n[r+1]=o>>>16&255,n[r+2]=o>>>8&255,n[r+3]=255&o):(n[r+3]=o>>>24,n[r+2]=o>>>16&255,n[r+1]=o>>>8&255,n[r]=255&o)}return n},t.rotr32=function(e,b){return e>>>b|e<<32-b},t.rotl32=function(e,b){return e<>>32-b},t.sum32=function(a,b){return a+b>>>0},t.sum32_3=function(a,b,e){return a+b+e>>>0},t.sum32_4=function(a,b,e,t){return a+b+e+t>>>0},t.sum32_5=function(a,b,e,t,n){return a+b+e+t+n>>>0},t.sum64=function(e,t,n,r){var o=e[t],c=r+e[t+1]>>>0,l=(c>>0,e[t+1]=c},t.sum64_hi=function(e,t,n,r){return(t+r>>>0>>0},t.sum64_lo=function(e,t,n,r){return t+r>>>0},t.sum64_4_hi=function(e,t,n,r,o,c,l,dl){var d=0,f=t;return d+=(f=f+r>>>0)>>0)>>0)>>0},t.sum64_4_lo=function(e,t,n,r,o,c,l,dl){return t+r+c+dl>>>0},t.sum64_5_hi=function(e,t,n,r,o,c,l,dl,d,f){var h=0,A=t;return h+=(A=A+r>>>0)>>0)>>0)>>0)>>0},t.sum64_5_lo=function(e,t,n,r,o,c,l,dl,d,f){return t+r+c+dl+f>>>0},t.rotr64_hi=function(e,t,n){return(t<<32-n|e>>>n)>>>0},t.rotr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0},t.shr64_hi=function(e,t,n){return e>>>n},t.shr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0}},,,,,function(e,t,n){"use strict";(function(e){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Fee=t.ModeInfo_Multi=t.ModeInfo_Single=t.ModeInfo=t.SignerInfo=t.AuthInfo=t.TxBody=t.SignDoc=t.TxRaw=t.Tx=t.protobufPackage=void 0;const o=r(n(1)),c=r(n(2)),l=n(22),d=n(141),f=n(245),h=n(28);t.protobufPackage="cosmos.tx.v1beta1";const A={};t.Tx={encode(e,n=c.default.Writer.create()){void 0!==e.body&&t.TxBody.encode(e.body,n.uint32(10).fork()).ldelim(),void 0!==e.authInfo&&t.AuthInfo.encode(e.authInfo,n.uint32(18).fork()).ldelim();for(const t of e.signatures)n.uint32(26).bytes(t);return n},decode(input,e){const n=input instanceof c.default.Reader?input:new c.default.Reader(input);let r=void 0===e?n.len:n.pos+e;const o=Object.assign({},A);for(o.signatures=[];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(object){var e;const n=Object.assign({},A);return n.body=void 0!==object.body&&null!==object.body?t.TxBody.fromJSON(object.body):void 0,n.authInfo=void 0!==object.authInfo&&null!==object.authInfo?t.AuthInfo.fromJSON(object.authInfo):void 0,n.signatures=(null!==(e=object.signatures)&&void 0!==e?e:[]).map((e=>O(e))),n},toJSON(e){const n={};return void 0!==e.body&&(n.body=e.body?t.TxBody.toJSON(e.body):void 0),void 0!==e.authInfo&&(n.authInfo=e.authInfo?t.AuthInfo.toJSON(e.authInfo):void 0),e.signatures?n.signatures=e.signatures.map((e=>P(void 0!==e?e:new Uint8Array))):n.signatures=[],n},fromPartial(object){var e;const n=Object.assign({},A);return n.body=void 0!==object.body&&null!==object.body?t.TxBody.fromPartial(object.body):void 0,n.authInfo=void 0!==object.authInfo&&null!==object.authInfo?t.AuthInfo.fromPartial(object.authInfo):void 0,n.signatures=(null===(e=object.signatures)||void 0===e?void 0:e.map((e=>e)))||[],n}};const m={};t.TxRaw={encode(e,t=c.default.Writer.create()){0!==e.bodyBytes.length&&t.uint32(10).bytes(e.bodyBytes),0!==e.authInfoBytes.length&&t.uint32(18).bytes(e.authInfoBytes);for(const n of e.signatures)t.uint32(26).bytes(n);return t},decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},m);for(r.signatures=[],r.bodyBytes=new Uint8Array,r.authInfoBytes=new Uint8Array;t.pos>>3){case 1:r.bodyBytes=t.bytes();break;case 2:r.authInfoBytes=t.bytes();break;case 3:r.signatures.push(t.bytes());break;default:t.skipType(7&e)}}return r},fromJSON(object){var e;const t=Object.assign({},m);return t.bodyBytes=void 0!==object.bodyBytes&&null!==object.bodyBytes?O(object.bodyBytes):new Uint8Array,t.authInfoBytes=void 0!==object.authInfoBytes&&null!==object.authInfoBytes?O(object.authInfoBytes):new Uint8Array,t.signatures=(null!==(e=object.signatures)&&void 0!==e?e:[]).map((e=>O(e))),t},toJSON(e){const t={};return void 0!==e.bodyBytes&&(t.bodyBytes=P(void 0!==e.bodyBytes?e.bodyBytes:new Uint8Array)),void 0!==e.authInfoBytes&&(t.authInfoBytes=P(void 0!==e.authInfoBytes?e.authInfoBytes:new Uint8Array)),e.signatures?t.signatures=e.signatures.map((e=>P(void 0!==e?e:new Uint8Array))):t.signatures=[],t},fromPartial(object){var e,t,n;const r=Object.assign({},m);return r.bodyBytes=null!==(e=object.bodyBytes)&&void 0!==e?e:new Uint8Array,r.authInfoBytes=null!==(t=object.authInfoBytes)&&void 0!==t?t:new Uint8Array,r.signatures=(null===(n=object.signatures)||void 0===n?void 0:n.map((e=>e)))||[],r}};const v={chainId:"",accountNumber:o.default.UZERO};t.SignDoc={encode:(e,t=c.default.Writer.create())=>(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.isZero()||t.uint32(32).uint64(e.accountNumber),t),decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},v);for(r.bodyBytes=new Uint8Array,r.authInfoBytes=new Uint8Array;t.pos>>3){case 1:r.bodyBytes=t.bytes();break;case 2:r.authInfoBytes=t.bytes();break;case 3:r.chainId=t.string();break;case 4:r.accountNumber=t.uint64();break;default:t.skipType(7&e)}}return r},fromJSON(object){const e=Object.assign({},v);return e.bodyBytes=void 0!==object.bodyBytes&&null!==object.bodyBytes?O(object.bodyBytes):new Uint8Array,e.authInfoBytes=void 0!==object.authInfoBytes&&null!==object.authInfoBytes?O(object.authInfoBytes):new Uint8Array,e.chainId=void 0!==object.chainId&&null!==object.chainId?String(object.chainId):"",e.accountNumber=void 0!==object.accountNumber&&null!==object.accountNumber?o.default.fromString(object.accountNumber):o.default.UZERO,e},toJSON(e){const t={};return void 0!==e.bodyBytes&&(t.bodyBytes=P(void 0!==e.bodyBytes?e.bodyBytes:new Uint8Array)),void 0!==e.authInfoBytes&&(t.authInfoBytes=P(void 0!==e.authInfoBytes?e.authInfoBytes:new Uint8Array)),void 0!==e.chainId&&(t.chainId=e.chainId),void 0!==e.accountNumber&&(t.accountNumber=(e.accountNumber||o.default.UZERO).toString()),t},fromPartial(object){var e,t,n;const r=Object.assign({},v);return r.bodyBytes=null!==(e=object.bodyBytes)&&void 0!==e?e:new Uint8Array,r.authInfoBytes=null!==(t=object.authInfoBytes)&&void 0!==t?t:new Uint8Array,r.chainId=null!==(n=object.chainId)&&void 0!==n?n:"",r.accountNumber=void 0!==object.accountNumber&&null!==object.accountNumber?o.default.fromValue(object.accountNumber):o.default.UZERO,r}};const y={memo:"",timeoutHeight:o.default.UZERO};t.TxBody={encode(e,t=c.default.Writer.create()){for(const n of e.messages)l.Any.encode(n,t.uint32(10).fork()).ldelim();""!==e.memo&&t.uint32(18).string(e.memo),e.timeoutHeight.isZero()||t.uint32(24).uint64(e.timeoutHeight);for(const n of e.extensionOptions)l.Any.encode(n,t.uint32(8186).fork()).ldelim();for(const n of e.nonCriticalExtensionOptions)l.Any.encode(n,t.uint32(16378).fork()).ldelim();return t},decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},y);for(r.messages=[],r.extensionOptions=[],r.nonCriticalExtensionOptions=[];t.pos>>3){case 1:r.messages.push(l.Any.decode(t,t.uint32()));break;case 2:r.memo=t.string();break;case 3:r.timeoutHeight=t.uint64();break;case 1023:r.extensionOptions.push(l.Any.decode(t,t.uint32()));break;case 2047:r.nonCriticalExtensionOptions.push(l.Any.decode(t,t.uint32()));break;default:t.skipType(7&e)}}return r},fromJSON(object){var e,t,n;const r=Object.assign({},y);return r.messages=(null!==(e=object.messages)&&void 0!==e?e:[]).map((e=>l.Any.fromJSON(e))),r.memo=void 0!==object.memo&&null!==object.memo?String(object.memo):"",r.timeoutHeight=void 0!==object.timeoutHeight&&null!==object.timeoutHeight?o.default.fromString(object.timeoutHeight):o.default.UZERO,r.extensionOptions=(null!==(t=object.extensionOptions)&&void 0!==t?t:[]).map((e=>l.Any.fromJSON(e))),r.nonCriticalExtensionOptions=(null!==(n=object.nonCriticalExtensionOptions)&&void 0!==n?n:[]).map((e=>l.Any.fromJSON(e))),r},toJSON(e){const t={};return e.messages?t.messages=e.messages.map((e=>e?l.Any.toJSON(e):void 0)):t.messages=[],void 0!==e.memo&&(t.memo=e.memo),void 0!==e.timeoutHeight&&(t.timeoutHeight=(e.timeoutHeight||o.default.UZERO).toString()),e.extensionOptions?t.extensionOptions=e.extensionOptions.map((e=>e?l.Any.toJSON(e):void 0)):t.extensionOptions=[],e.nonCriticalExtensionOptions?t.nonCriticalExtensionOptions=e.nonCriticalExtensionOptions.map((e=>e?l.Any.toJSON(e):void 0)):t.nonCriticalExtensionOptions=[],t},fromPartial(object){var e,t,n,r;const c=Object.assign({},y);return c.messages=(null===(e=object.messages)||void 0===e?void 0:e.map((e=>l.Any.fromPartial(e))))||[],c.memo=null!==(t=object.memo)&&void 0!==t?t:"",c.timeoutHeight=void 0!==object.timeoutHeight&&null!==object.timeoutHeight?o.default.fromValue(object.timeoutHeight):o.default.UZERO,c.extensionOptions=(null===(n=object.extensionOptions)||void 0===n?void 0:n.map((e=>l.Any.fromPartial(e))))||[],c.nonCriticalExtensionOptions=(null===(r=object.nonCriticalExtensionOptions)||void 0===r?void 0:r.map((e=>l.Any.fromPartial(e))))||[],c}};const I={};t.AuthInfo={encode(e,n=c.default.Writer.create()){for(const r of e.signerInfos)t.SignerInfo.encode(r,n.uint32(10).fork()).ldelim();return void 0!==e.fee&&t.Fee.encode(e.fee,n.uint32(18).fork()).ldelim(),n},decode(input,e){const n=input instanceof c.default.Reader?input:new c.default.Reader(input);let r=void 0===e?n.len:n.pos+e;const o=Object.assign({},I);for(o.signerInfos=[];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;default:n.skipType(7&e)}}return o},fromJSON(object){var e;const n=Object.assign({},I);return n.signerInfos=(null!==(e=object.signerInfos)&&void 0!==e?e:[]).map((e=>t.SignerInfo.fromJSON(e))),n.fee=void 0!==object.fee&&null!==object.fee?t.Fee.fromJSON(object.fee):void 0,n},toJSON(e){const n={};return e.signerInfos?n.signerInfos=e.signerInfos.map((e=>e?t.SignerInfo.toJSON(e):void 0)):n.signerInfos=[],void 0!==e.fee&&(n.fee=e.fee?t.Fee.toJSON(e.fee):void 0),n},fromPartial(object){var e;const n=Object.assign({},I);return n.signerInfos=(null===(e=object.signerInfos)||void 0===e?void 0:e.map((e=>t.SignerInfo.fromPartial(e))))||[],n.fee=void 0!==object.fee&&null!==object.fee?t.Fee.fromPartial(object.fee):void 0,n}};const w={sequence:o.default.UZERO};t.SignerInfo={encode:(e,n=c.default.Writer.create())=>(void 0!==e.publicKey&&l.Any.encode(e.publicKey,n.uint32(10).fork()).ldelim(),void 0!==e.modeInfo&&t.ModeInfo.encode(e.modeInfo,n.uint32(18).fork()).ldelim(),e.sequence.isZero()||n.uint32(24).uint64(e.sequence),n),decode(input,e){const n=input instanceof c.default.Reader?input:new c.default.Reader(input);let r=void 0===e?n.len:n.pos+e;const o=Object.assign({},w);for(;n.pos>>3){case 1:o.publicKey=l.Any.decode(n,n.uint32());break;case 2:o.modeInfo=t.ModeInfo.decode(n,n.uint32());break;case 3:o.sequence=n.uint64();break;default:n.skipType(7&e)}}return o},fromJSON(object){const e=Object.assign({},w);return e.publicKey=void 0!==object.publicKey&&null!==object.publicKey?l.Any.fromJSON(object.publicKey):void 0,e.modeInfo=void 0!==object.modeInfo&&null!==object.modeInfo?t.ModeInfo.fromJSON(object.modeInfo):void 0,e.sequence=void 0!==object.sequence&&null!==object.sequence?o.default.fromString(object.sequence):o.default.UZERO,e},toJSON(e){const n={};return void 0!==e.publicKey&&(n.publicKey=e.publicKey?l.Any.toJSON(e.publicKey):void 0),void 0!==e.modeInfo&&(n.modeInfo=e.modeInfo?t.ModeInfo.toJSON(e.modeInfo):void 0),void 0!==e.sequence&&(n.sequence=(e.sequence||o.default.UZERO).toString()),n},fromPartial(object){const e=Object.assign({},w);return e.publicKey=void 0!==object.publicKey&&null!==object.publicKey?l.Any.fromPartial(object.publicKey):void 0,e.modeInfo=void 0!==object.modeInfo&&null!==object.modeInfo?t.ModeInfo.fromPartial(object.modeInfo):void 0,e.sequence=void 0!==object.sequence&&null!==object.sequence?o.default.fromValue(object.sequence):o.default.UZERO,e}};const _={};t.ModeInfo={encode:(e,n=c.default.Writer.create())=>(void 0!==e.single&&t.ModeInfo_Single.encode(e.single,n.uint32(10).fork()).ldelim(),void 0!==e.multi&&t.ModeInfo_Multi.encode(e.multi,n.uint32(18).fork()).ldelim(),n),decode(input,e){const n=input instanceof c.default.Reader?input:new c.default.Reader(input);let r=void 0===e?n.len:n.pos+e;const o=Object.assign({},_);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(object){const e=Object.assign({},_);return e.single=void 0!==object.single&&null!==object.single?t.ModeInfo_Single.fromJSON(object.single):void 0,e.multi=void 0!==object.multi&&null!==object.multi?t.ModeInfo_Multi.fromJSON(object.multi):void 0,e},toJSON(e){const n={};return void 0!==e.single&&(n.single=e.single?t.ModeInfo_Single.toJSON(e.single):void 0),void 0!==e.multi&&(n.multi=e.multi?t.ModeInfo_Multi.toJSON(e.multi):void 0),n},fromPartial(object){const e=Object.assign({},_);return e.single=void 0!==object.single&&null!==object.single?t.ModeInfo_Single.fromPartial(object.single):void 0,e.multi=void 0!==object.multi&&null!==object.multi?t.ModeInfo_Multi.fromPartial(object.multi):void 0,e}};const C={mode:0};t.ModeInfo_Single={encode:(e,t=c.default.Writer.create())=>(0!==e.mode&&t.uint32(8).int32(e.mode),t),decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},C);for(;t.pos>>3==1)r.mode=t.int32();else t.skipType(7&e)}return r},fromJSON(object){const e=Object.assign({},C);return e.mode=void 0!==object.mode&&null!==object.mode?d.signModeFromJSON(object.mode):0,e},toJSON(e){const t={};return void 0!==e.mode&&(t.mode=d.signModeToJSON(e.mode)),t},fromPartial(object){var e;const t=Object.assign({},C);return t.mode=null!==(e=object.mode)&&void 0!==e?e:0,t}};const S={};t.ModeInfo_Multi={encode(e,n=c.default.Writer.create()){void 0!==e.bitarray&&f.CompactBitArray.encode(e.bitarray,n.uint32(10).fork()).ldelim();for(const r of e.modeInfos)t.ModeInfo.encode(r,n.uint32(18).fork()).ldelim();return n},decode(input,e){const n=input instanceof c.default.Reader?input:new c.default.Reader(input);let r=void 0===e?n.len:n.pos+e;const o=Object.assign({},S);for(o.modeInfos=[];n.pos>>3){case 1:o.bitarray=f.CompactBitArray.decode(n,n.uint32());break;case 2:o.modeInfos.push(t.ModeInfo.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return o},fromJSON(object){var e;const n=Object.assign({},S);return n.bitarray=void 0!==object.bitarray&&null!==object.bitarray?f.CompactBitArray.fromJSON(object.bitarray):void 0,n.modeInfos=(null!==(e=object.modeInfos)&&void 0!==e?e:[]).map((e=>t.ModeInfo.fromJSON(e))),n},toJSON(e){const n={};return void 0!==e.bitarray&&(n.bitarray=e.bitarray?f.CompactBitArray.toJSON(e.bitarray):void 0),e.modeInfos?n.modeInfos=e.modeInfos.map((e=>e?t.ModeInfo.toJSON(e):void 0)):n.modeInfos=[],n},fromPartial(object){var e;const n=Object.assign({},S);return n.bitarray=void 0!==object.bitarray&&null!==object.bitarray?f.CompactBitArray.fromPartial(object.bitarray):void 0,n.modeInfos=(null===(e=object.modeInfos)||void 0===e?void 0:e.map((e=>t.ModeInfo.fromPartial(e))))||[],n}};const E={gasLimit:o.default.UZERO,payer:"",granter:""};t.Fee={encode(e,t=c.default.Writer.create()){for(const n of e.amount)h.Coin.encode(n,t.uint32(10).fork()).ldelim();return e.gasLimit.isZero()||t.uint32(16).uint64(e.gasLimit),""!==e.payer&&t.uint32(26).string(e.payer),""!==e.granter&&t.uint32(34).string(e.granter),t},decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},E);for(r.amount=[];t.pos>>3){case 1:r.amount.push(h.Coin.decode(t,t.uint32()));break;case 2:r.gasLimit=t.uint64();break;case 3:r.payer=t.string();break;case 4:r.granter=t.string();break;default:t.skipType(7&e)}}return r},fromJSON(object){var e;const t=Object.assign({},E);return t.amount=(null!==(e=object.amount)&&void 0!==e?e:[]).map((e=>h.Coin.fromJSON(e))),t.gasLimit=void 0!==object.gasLimit&&null!==object.gasLimit?o.default.fromString(object.gasLimit):o.default.UZERO,t.payer=void 0!==object.payer&&null!==object.payer?String(object.payer):"",t.granter=void 0!==object.granter&&null!==object.granter?String(object.granter):"",t},toJSON(e){const t={};return e.amount?t.amount=e.amount.map((e=>e?h.Coin.toJSON(e):void 0)):t.amount=[],void 0!==e.gasLimit&&(t.gasLimit=(e.gasLimit||o.default.UZERO).toString()),void 0!==e.payer&&(t.payer=e.payer),void 0!==e.granter&&(t.granter=e.granter),t},fromPartial(object){var e,t,n;const r=Object.assign({},E);return r.amount=(null===(e=object.amount)||void 0===e?void 0:e.map((e=>h.Coin.fromPartial(e))))||[],r.gasLimit=void 0!==object.gasLimit&&null!==object.gasLimit?o.default.fromValue(object.gasLimit):o.default.UZERO,r.payer=null!==(t=object.payer)&&void 0!==t?t:"",r.granter=null!==(n=object.granter)&&void 0!==n?n:"",r}};var B=(()=>{if(void 0!==B)return B;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==e)return e;throw"Unable to locate global object"})();const k=B.atob||(e=>B.Buffer.from(e,"base64").toString("binary"));function O(e){const t=k(e),n=new Uint8Array(t.length);for(let i=0;iB.Buffer.from(e,"binary").toString("base64"));function P(e){const t=[];for(const n of e)t.push(String.fromCharCode(n));return R(t.join(""))}c.default.util.Long!==o.default&&(c.default.util.Long=o.default,c.default.configure())}).call(this,n(3))},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Timestamp=t.protobufPackage=void 0;const o=r(n(1)),c=r(n(2));t.protobufPackage="google.protobuf";const l={seconds:o.default.ZERO,nanos:0};t.Timestamp={encode:(e,t=c.default.Writer.create())=>(e.seconds.isZero()||t.uint32(8).int64(e.seconds),0!==e.nanos&&t.uint32(16).int32(e.nanos),t),decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},l);for(;t.pos>>3){case 1:r.seconds=t.int64();break;case 2:r.nanos=t.int32();break;default:t.skipType(7&e)}}return r},fromJSON(object){const e=Object.assign({},l);return e.seconds=void 0!==object.seconds&&null!==object.seconds?o.default.fromString(object.seconds):o.default.ZERO,e.nanos=void 0!==object.nanos&&null!==object.nanos?Number(object.nanos):0,e},toJSON(e){const t={};return void 0!==e.seconds&&(t.seconds=(e.seconds||o.default.ZERO).toString()),void 0!==e.nanos&&(t.nanos=e.nanos),t},fromPartial(object){var e;const t=Object.assign({},l);return t.seconds=void 0!==object.seconds&&null!==object.seconds?o.default.fromValue(object.seconds):o.default.ZERO,t.nanos=null!==(e=object.nanos)&&void 0!==e?e:0,t}},c.default.util.Long!==o.default&&(c.default.util.Long=o.default,c.default.configure())},,function(e,t,n){"use strict";n.d(t,"b",(function(){return Oe})),n.d(t,"a",(function(){return M}));var r={};n.r(r),n.d(r,"ISCNList",(function(){return $})),n.d(r,"MainHeader",(function(){return ee})),n.d(r,"TagList",(function(){return te})),n.d(r,"UserLink",(function(){return ne})),n.d(r,"Wallet",(function(){return re}));n(56),n(44),n(55),n(69),n(51),n(70);var o=n(21),c=n(32),l=(n(79),n(68),n(25),n(99),n(45),n(102),n(5)),d=n(57),f=n(467),h=n(264),A=n.n(h),m=n(122),v=n.n(m),y=(n(61),n(62),n(265)),I=n(66),w=n(6);"scrollRestoration"in window.history&&(Object(w.u)("manual"),window.addEventListener("beforeunload",(function(){Object(w.u)("auto")})),window.addEventListener("load",(function(){Object(w.u)("manual")})));function _(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function C(e){for(var i=1;i1&&void 0!==arguments[1]?arguments[1]:S,n=arguments.length>2?arguments[2]:void 0;return r.call(this,e,t,n)};var o=n.resolve.bind(n);return n.resolve=function(e,t,n){return"string"==typeof e&&(e=Object(I.c)(e)),o(e,t,n)},n}var k={name:"NuxtChild",functional:!0,props:{nuxtChildKey:{type:String,default:""},keepAlive:Boolean,keepAliveProps:{type:Object,default:void 0}},render:function(e,t){var n=t.parent,data=t.data,r=t.props,o=n.$createElement;data.nuxtChild=!0;for(var c=n,l=n.$nuxt.nuxt.transitions,d=n.$nuxt.nuxt.defaultTransition,f=0;n;)n.$vnode&&n.$vnode.data.nuxtChild&&f++,n=n.$parent;data.nuxtChildDepth=f;var h=l[f]||d,A={};O.forEach((function(e){void 0!==h[e]&&(A[e]=h[e])}));var m={};R.forEach((function(e){"function"==typeof h[e]&&(m[e]=h[e].bind(c))}));var v=m.beforeEnter;if(m.beforeEnter=function(e){if(window.$nuxt.$nextTick((function(){window.$nuxt.$emit("triggerScroll")})),v)return v.call(c,e)},!1===h.css){var y=m.leave;(!y||y.length<2)&&(m.leave=function(e,t){y&&y.call(c,e),c.$nextTick(t)})}var I=o("routerView",data);return r.keepAlive&&(I=o("keep-alive",{props:r.keepAliveProps},[I])),o("transition",{props:A,on:m},[I])}},O=["name","mode","appear","css","type","duration","enterClass","leaveClass","appearClass","enterActiveClass","enterActiveClass","leaveActiveClass","appearActiveClass","enterToClass","leaveToClass","appearToClass"],R=["beforeEnter","enter","afterEnter","enterCancelled","beforeLeave","leave","afterLeave","leaveCancelled","beforeAppear","appear","afterAppear","appearCancelled"],P={name:"NuxtError",props:{error:{type:Object,default:null}},computed:{statusCode:function(){return this.error&&this.error.statusCode||500},message:function(){return this.error.message||"Error"}},head:function(){return{title:this.message,meta:[{name:"viewport",content:"width=device-width,initial-scale=1.0,minimum-scale=1.0"}]}}},x=(n(542),n(43)),M=Object(x.a)(P,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"__nuxt-error-page"},[t("div",{staticClass:"error"},[t("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",width:"90",height:"90",fill:"#DBE1EC",viewBox:"0 0 48 48"}},[t("path",{attrs:{d:"M22 30h4v4h-4zm0-16h4v12h-4zm1.99-10C12.94 4 4 12.95 4 24s8.94 20 19.99 20S44 35.05 44 24 35.04 4 23.99 4zM24 40c-8.84 0-16-7.16-16-16S15.16 8 24 8s16 7.16 16 16-7.16 16-16 16z"}})]),e._v(" "),t("div",{staticClass:"title"},[e._v(e._s(e.message))]),e._v(" "),404===e.statusCode?t("p",{staticClass:"description"},[void 0===e.$route?t("a",{staticClass:"error-link",attrs:{href:"/"}}):t("NuxtLink",{staticClass:"error-link",attrs:{to:"/"}},[e._v("Back to the home page")])],1):e._e(),e._v(" "),e._m(0)])])}),[function(){var e=this._self._c;return e("div",{staticClass:"logo"},[e("a",{attrs:{href:"https://nuxtjs.org",target:"_blank",rel:"noopener"}},[this._v("Nuxt")])])}],!1,null,null,null).exports,Q=n(35),N=(n(172),{name:"Nuxt",components:{NuxtChild:k,NuxtError:M},props:{nuxtChildKey:{type:String,default:void 0},keepAlive:Boolean,keepAliveProps:{type:Object,default:void 0},name:{type:String,default:"default"}},errorCaptured:function(e){this.displayingNuxtError&&(this.errorFromNuxtError=e,this.$forceUpdate())},computed:{routerViewKey:function(){if(void 0!==this.nuxtChildKey||this.$route.matched.length>1)return this.nuxtChildKey||Object(w.c)(this.$route.matched[0].path)(this.$route.params);var e=Object(Q.a)(this.$route.matched,1)[0];if(!e)return this.$route.path;var t=e.components.default;if(t&&t.options){var n=t.options;if(n.key)return"function"==typeof n.key?n.key(this.$route):n.key}return/\/$/.test(e.path)?this.$route.path:this.$route.path.replace(/\/$/,"")}},beforeCreate:function(){l.a.util.defineReactive(this,"nuxt",this.$root.$options.nuxt)},render:function(e){var t=this;return this.nuxt.err?this.errorFromNuxtError?(this.$nextTick((function(){return t.errorFromNuxtError=!1})),e("div",{},[e("h2","An error occurred while showing the error page"),e("p","Unfortunately an error occurred and while showing the error page another error occurred"),e("p","Error details: ".concat(this.errorFromNuxtError.toString())),e("nuxt-link",{props:{to:"/"}},"Go back to home")])):(this.displayingNuxtError=!0,this.$nextTick((function(){return t.displayingNuxtError=!1})),e(M,{props:{error:this.nuxt.err}})):e("NuxtChild",{key:this.routerViewKey,props:this.$props})}}),D=(n(72),n(86),n(80),n(87),n(169),{name:"NuxtLoading",data:function(){return{percent:0,show:!1,canSucceed:!0,reversed:!1,skipTimerCount:0,rtl:!1,throttle:200,duration:5e3,continuous:!1}},computed:{left:function(){return!(!this.continuous&&!this.rtl)&&(this.rtl?this.reversed?"0px":"auto":this.reversed?"auto":"0px")}},beforeDestroy:function(){this.clear()},methods:{clear:function(){clearInterval(this._timer),clearTimeout(this._throttle),this._timer=null},start:function(){var e=this;return this.clear(),this.percent=0,this.reversed=!1,this.skipTimerCount=0,this.canSucceed=!0,this.throttle?this._throttle=setTimeout((function(){return e.startTimer()}),this.throttle):this.startTimer(),this},set:function(e){return this.show=!0,this.canSucceed=!0,this.percent=Math.min(100,Math.max(0,Math.floor(e))),this},get:function(){return this.percent},increase:function(e){return this.percent=Math.min(100,Math.floor(this.percent+e)),this},decrease:function(e){return this.percent=Math.max(0,Math.floor(this.percent-e)),this},pause:function(){return clearInterval(this._timer),this},resume:function(){return this.startTimer(),this},finish:function(){return this.percent=this.reversed?0:100,this.hide(),this},hide:function(){var e=this;return this.clear(),setTimeout((function(){e.show=!1,e.$nextTick((function(){e.percent=0,e.reversed=!1}))}),500),this},fail:function(e){return this.canSucceed=!1,this},startTimer:function(){var e=this;this.show||(this.show=!0),void 0===this._cut&&(this._cut=1e4/Math.floor(this.duration)),this._timer=setInterval((function(){e.skipTimerCount>0?e.skipTimerCount--:(e.reversed?e.decrease(e._cut):e.increase(e._cut),e.continuous&&(e.percent>=100||e.percent<=0)&&(e.skipTimerCount=1,e.reversed=!e.reversed))}),100)}},render:function(e){var t=e(!1);return this.show&&(t=e("div",{staticClass:"nuxt-progress",class:{"nuxt-progress-notransition":this.skipTimerCount>0,"nuxt-progress-failed":!this.canSucceed},style:{width:this.percent+"%",left:this.left}})),t}}),T=(n(544),Object(x.a)(D,undefined,undefined,!1,null,null,null).exports),j=(n(546),n(548),n(478));function U(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return J(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return J(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,c=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return c=e.done,e},e:function(e){l=!0,o=e},f:function(){try{c||null==n.return||n.return()}finally{if(l)throw o}}}}function J(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i0},isPreview:function(){return Boolean(this.$options.previewData)}},methods:{refreshOnlineStatus:function(){void 0===window.navigator.onLine?this.isOnline=!0:this.isOnline=window.navigator.onLine},refresh:function(){var e=this;return Object(o.a)(regeneratorRuntime.mark((function t(){var n,r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((n=Object(w.h)(e.$route)).length){t.next=3;break}return t.abrupt("return");case 3:return e.$loading.start(),r=n.map((function(t){var p=[];if(t.$options.fetch&&t.$options.fetch.length&&p.push(Object(w.q)(t.$options.fetch,e.context)),t.$fetch)p.push(t.$fetch());else{var n,r=U(Object(w.e)(t.$vnode.componentInstance));try{for(r.s();!(n=r.n()).done;){var component=n.value;p.push(component.$fetch())}}catch(e){r.e(e)}finally{r.f()}}return t.$options.asyncData&&p.push(Object(w.q)(t.$options.asyncData,e.context).then((function(e){for(var n in e)l.a.set(t.$data,n,e[n])}))),Promise.all(p)})),t.prev=5,t.next=8,Promise.all(r);case 8:t.next=15;break;case 10:t.prev=10,t.t0=t.catch(5),e.$loading.fail(t.t0),Object(w.k)(t.t0),e.error(t.t0);case 15:e.$loading.finish();case 16:case"end":return t.stop()}}),t,null,[[5,10]])})))()},errorChanged:function(){if(this.nuxt.err){this.$loading&&(this.$loading.fail&&this.$loading.fail(this.nuxt.err),this.$loading.finish&&this.$loading.finish());var e=(M.options||M).layout;"function"==typeof e&&(e=e(this.context)),this.setLayout(e)}},setLayout:function(e){return e&&H["_"+e]||(e="default"),this.layoutName=e,this.layout=H["_"+e],this.layout},loadLayout:function(e){return e&&H["_"+e]||(e="default"),Promise.resolve(H["_"+e])}},components:{NuxtLoading:T}};n(192),n(125);function L(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return G(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return G(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,c=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return c=e.done,e},e:function(e){l=!0,o=e},f:function(){try{c||null==n.return||n.return()}finally{if(l)throw o}}}}function G(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i2&&void 0!==arguments[2]?arguments[2]:{},r=n.isProperty,o=void 0!==r&&r;if(!t.length||o&&1===t.length)return e;var c=t.shift();return e.modules[c]=e.modules[c]||{},e.modules[c].namespaced=!0,e.modules[c].modules=e.modules[c].modules||{},z(e.modules[c],t,{isProperty:o})}function X(e,t,n){t&&("state"===n?e.state=t||e.state:e[n]=Object.assign({},e[n],t))}n(147);var $=function(){return Promise.all([n.e(0),n.e(3)]).then(n.bind(null,889)).then((function(e){return oe(e.default||e)}))},ee=function(){return Promise.resolve().then(n.bind(null,884)).then((function(e){return oe(e.default||e)}))},te=function(){return n.e(4).then(n.bind(null,898)).then((function(e){return oe(e.default||e)}))},ne=function(){return Promise.resolve().then(n.bind(null,480)).then((function(e){return oe(e.default||e)}))},re=function(){return Promise.resolve().then(n.bind(null,479)).then((function(e){return oe(e.default||e)}))};function oe(e){if(!e||!e.functional)return e;var t=Array.isArray(e.props)?e.props:Object.keys(e.props||{});return{render:function(n){var r={},o={};for(var c in this.$attrs)t.includes(c)?o[c]=this.$attrs[c]:r[c]=this.$attrs[c];return n(e,{on:this.$listeners,attrs:r,props:o,scopedSlots:this.$scopedSlots},this.$slots.default)}}}for(var ie in r)l.a.component(ie,r[ie]),l.a.component("Lazy"+ie,r[ie]);var ae=n(121),se=n.n(ae),ce=n(60);n(98);function ue(e){return null!==e&&"object"===Object(ce.a)(e)}function le(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".",r=arguments.length>3?arguments[3]:void 0;if(!ue(t))return le(e,{},n,r);var o=Object.assign({},t);for(var c in e)if("__proto__"!==c&&"constructor"!==c){var l=e[c];null!==l&&(r&&r(o,c,l,n)||(Array.isArray(l)&&Array.isArray(o[c])?o[c]=o[c].concat(l):ue(l)&&ue(o[c])?o[c]=le(l,o[c],(n?"".concat(n,"."):"")+c.toString(),r):o[c]=l))}return o}function de(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,c=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return c=e.done,e},e:function(e){l=!0,o=e},f:function(){try{c||null==n.return||n.return()}finally{if(l)throw o}}}}function me(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i2&&void 0!==arguments[2]?arguments[2]:"common",o=Ae(Array.isArray(r)?r:[r]);try{for(o.s();!(n=o.n()).done;){var c=n.value;t?this.defaults.headers[c][e]=t:delete this.defaults.headers[c][e]}}catch(e){o.e(e)}finally{o.f()}},setToken:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"common",r=e?(t?t+" ":"")+e:null;this.setHeader("Authorization",r,n)},onRequest:function(e){this.interceptors.request.use((function(t){return e(t)||t}))},onResponse:function(e){this.interceptors.response.use((function(t){return e(t)||t}))},onRequestError:function(e){this.interceptors.request.use(void 0,(function(t){return e(t)||Promise.reject(t)}))},onResponseError:function(e){this.interceptors.response.use(void 0,(function(t){return e(t)||Promise.reject(t)}))},onError:function(e){this.onRequestError(e),this.onResponseError(e)},create:function(e){return we(he(e,this.defaults))}},ye=function(){var e=Ie[be];ve["$"+e]=function(){return this[e].apply(this,arguments).then((function(e){return e&&e.data}))}},be=0,Ie=["request","delete","get","head","options","post","put","patch"];be has been deprecated and will be removed in Nuxt 3, please use instead")),v.a.render(e,t)}})),l.a.component(k.name,k),l.a.component("NChild",k),l.a.component(N.name,N),Object.defineProperty(l.a.prototype,"$nuxt",{get:function(){var e=this.$root.$options.$nuxt;return e||"undefined"==typeof window?e:window.$nuxt},configurable:!0}),l.a.use(f.a,{keyName:"head",attribute:"data-n-head",ssrAttribute:"data-n-head-ssr",tagIDKeyName:"hid"});var ke={name:"page",mode:"out-in",appear:!0,appearClass:"appear",appearActiveClass:"appear-active",appearToClass:"appear-to"};d.a.Store.prototype.registerModule;function Oe(e){return Re.apply(this,arguments)}function Re(){return Re=Object(o.a)(regeneratorRuntime.mark((function e(t){var n,r,c,d,f,h,path,A,m=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return A=function(e,t){if(!e)throw new Error("inject(key, value) has no key provided");if(void 0===t)throw new Error("inject('".concat(e,"', value) has no value provided"));d[e="$"+e]=t,d.context[e]||(d.context[e]=t),c[e]=d[e];var n="__nuxt_"+e+"_installed__";l.a[n]||(l.a[n]=!0,l.a.use((function(){Object.prototype.hasOwnProperty.call(l.a.prototype,e)||Object.defineProperty(l.a.prototype,e,{get:function(){return this.$root.$options[e]}})})))},n=m.length>1&&void 0!==m[1]?m[1]:{},e.next=4,B(0,n);case 4:return r=e.sent,(c=Y(t)).$router=r,d=Be({head:{title:"ISCN Browser - powered by LikeCoin",descrption:"Search, browse and edit ISCN records stored on LikeCoin chain",meta:[{charset:"utf-8"},{name:"viewport",content:"width=device-width, initial-scale=1"},{hid:"description",name:"description",content:"Search, browse and edit ISCN records stored on LikeCoin chain"},{hid:"og:title",property:"og:title",content:"ISCN Browser - powered by LikeCoin"},{hid:"og:description",property:"og:description",content:"Search, browse and edit ISCN records stored on LikeCoin chain"},{hid:"og:image",property:"og:image",content:"https://iscn.io/images/logo-white.png"},{hid:"theme-color",name:"theme-color",content:"#28646e"},{name:"format-detection",content:"telephone=no"}],link:[],style:[],script:[]},store:c,router:r,nuxt:{defaultTransition:ke,transitions:[ke],setTransitions:function(e){return Array.isArray(e)||(e=[e]),e=e.map((function(e){return e=e?"string"==typeof e?Object.assign({},ke,{name:e}):Object.assign({},ke,e):ke})),this.$options.nuxt.transitions=e,e},err:null,dateErr:null,error:function(e){e=e||null,d.context._errored=Boolean(e),e=e?Object(w.p)(e):null;var n=d.nuxt;return this&&(n=this.nuxt||this.$options.nuxt),n.dateErr=Date.now(),n.err=e,t&&(t.nuxt.error=e),e}}},F),c.app=d,f=t?t.next:function(e){return d.router.push(e)},t?h=r.resolve(t.url).route:(path=Object(w.f)(r.options.base,r.options.mode),h=r.resolve(path).route),e.next=13,Object(w.t)(d,{store:c,route:h,next:f,error:d.nuxt.error.bind(d),payload:t?t.payload:void 0,req:t?t.req:void 0,res:t?t.res:void 0,beforeRenderFns:t?t.beforeRenderFns:void 0,ssrContext:t});case 13:A("config",n),window.__NUXT__&&window.__NUXT__.state&&c.replaceState(window.__NUXT__.state),d.context.enablePreview=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};d.previewData=Object.assign({},e),A("preview",e)},e.next=19;break;case 19:return e.next=22,Ce(d.context,A);case 22:if("function"!=typeof Se.a){e.next=25;break}return e.next=25,Object(Se.a)(d.context,A);case 25:return d.context.enablePreview=function(){console.warn("You cannot call enablePreview() outside a plugin.")},e.next=28,new Promise((function(e,t){if(!r.resolve(d.context.route.fullPath).route.matched.length)return e();r.replace(d.context.route.fullPath,e,(function(n){if(!n._isRouter)return t(n);if(2!==n.type)return e();var c=r.afterEach(function(){var t=Object(o.a)(regeneratorRuntime.mark((function t(n,r){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,Object(w.j)(n);case 3:d.context.route=t.sent,d.context.params=n.params||{},d.context.query=n.query||{},c(),e();case 8:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}())}))}));case 28:return e.abrupt("return",{store:c,app:d,router:r});case 29:case"end":return e.stop()}}),e)}))),Re.apply(this,arguments)}},,,,,,,,function(e,t,n){var r=n(9).Buffer,o=n(641).Transform,c=n(93).StringDecoder;function l(e){o.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}n(8)(l,o),l.prototype.update=function(data,e,t){"string"==typeof data&&(data=r.from(data,e));var n=this._update(data);return this.hashMode?this:(t&&(n=this._toString(n,t)),n)},l.prototype.setAutoPadding=function(){},l.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},l.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},l.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},l.prototype._transform=function(data,e,t){var n;try{this.hashMode?this._update(data):this.push(this._update(data))}catch(e){n=e}finally{t(n)}},l.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(e){t=e}e(t)},l.prototype._finalOrDigest=function(e){var t=this.__final()||r.alloc(0);return e&&(t=this._toString(t,e,!0)),t},l.prototype._toString=function(e,t,n){if(this._decoder||(this._decoder=new c(t),this._encoding=t),this._encoding!==t)throw new Error("can't switch encodings");var r=this._decoder.write(e);return n&&(r+=this._decoder.end()),r},e.exports=l},function(e,t,n){"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.makeCosmoshubPath=t.DirectSecp256k1Wallet=t.extractKdfConfiguration=t.DirectSecp256k1HdWallet=t.decodeTxRaw=t.parseCoins=void 0;var r=n(782);Object.defineProperty(t,"parseCoins",{enumerable:!0,get:function(){return r.parseCoins}});var o=n(783);Object.defineProperty(t,"decodeTxRaw",{enumerable:!0,get:function(){return o.decodeTxRaw}});var c=n(784);Object.defineProperty(t,"DirectSecp256k1HdWallet",{enumerable:!0,get:function(){return c.DirectSecp256k1HdWallet}}),Object.defineProperty(t,"extractKdfConfiguration",{enumerable:!0,get:function(){return c.extractKdfConfiguration}});var l=n(790);Object.defineProperty(t,"DirectSecp256k1Wallet",{enumerable:!0,get:function(){return l.DirectSecp256k1Wallet}});var d=n(791);Object.defineProperty(t,"makeCosmoshubPath",{enumerable:!0,get:function(){return d.makeCosmoshubPath}});var f=n(792);Object.defineProperty(t,"decodePubkey",{enumerable:!0,get:function(){return f.decodePubkey}}),Object.defineProperty(t,"encodePubkey",{enumerable:!0,get:function(){return f.encodePubkey}});var h=n(795);Object.defineProperty(t,"isPbjsGeneratedType",{enumerable:!0,get:function(){return h.isPbjsGeneratedType}}),Object.defineProperty(t,"isTsProtoGeneratedType",{enumerable:!0,get:function(){return h.isTsProtoGeneratedType}}),Object.defineProperty(t,"isTxBodyEncodeObject",{enumerable:!0,get:function(){return h.isTxBodyEncodeObject}}),Object.defineProperty(t,"Registry",{enumerable:!0,get:function(){return h.Registry}});var A=n(796);Object.defineProperty(t,"isOfflineDirectSigner",{enumerable:!0,get:function(){return A.isOfflineDirectSigner}});var m=n(249);Object.defineProperty(t,"makeAuthInfoBytes",{enumerable:!0,get:function(){return m.makeAuthInfoBytes}}),Object.defineProperty(t,"makeSignBytes",{enumerable:!0,get:function(){return m.makeSignBytes}}),Object.defineProperty(t,"makeSignDoc",{enumerable:!0,get:function(){return m.makeSignDoc}});var v=n(429);Object.defineProperty(t,"executeKdf",{enumerable:!0,get:function(){return v.executeKdf}});var y=n(77);Object.defineProperty(t,"coin",{enumerable:!0,get:function(){return y.coin}}),Object.defineProperty(t,"coins",{enumerable:!0,get:function(){return y.coins}})},function(e,t,n){"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.createMultisigThresholdPubkey=t.encodeSecp256k1Pubkey=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 r=n(183);Object.defineProperty(t,"pubkeyToAddress",{enumerable:!0,get:function(){return r.pubkeyToAddress}}),Object.defineProperty(t,"pubkeyToRawAddress",{enumerable:!0,get:function(){return r.pubkeyToRawAddress}}),Object.defineProperty(t,"rawEd25519PubkeyToRawAddress",{enumerable:!0,get:function(){return r.rawEd25519PubkeyToRawAddress}}),Object.defineProperty(t,"rawSecp256k1PubkeyToRawAddress",{enumerable:!0,get:function(){return r.rawSecp256k1PubkeyToRawAddress}});var o=n(785);Object.defineProperty(t,"addCoins",{enumerable:!0,get:function(){return o.addCoins}}),Object.defineProperty(t,"coin",{enumerable:!0,get:function(){return o.coin}}),Object.defineProperty(t,"coins",{enumerable:!0,get:function(){return o.coins}}),Object.defineProperty(t,"parseCoins",{enumerable:!0,get:function(){return o.parseCoins}});var c=n(246);Object.defineProperty(t,"decodeAminoPubkey",{enumerable:!0,get:function(){return c.decodeAminoPubkey}}),Object.defineProperty(t,"decodeBech32Pubkey",{enumerable:!0,get:function(){return c.decodeBech32Pubkey}}),Object.defineProperty(t,"encodeAminoPubkey",{enumerable:!0,get:function(){return c.encodeAminoPubkey}}),Object.defineProperty(t,"encodeBech32Pubkey",{enumerable:!0,get:function(){return c.encodeBech32Pubkey}}),Object.defineProperty(t,"encodeSecp256k1Pubkey",{enumerable:!0,get:function(){return c.encodeSecp256k1Pubkey}});var l=n(786);Object.defineProperty(t,"createMultisigThresholdPubkey",{enumerable:!0,get:function(){return l.createMultisigThresholdPubkey}});var d=n(427);Object.defineProperty(t,"makeCosmoshubPath",{enumerable:!0,get:function(){return d.makeCosmoshubPath}});var f=n(184);Object.defineProperty(t,"isEd25519Pubkey",{enumerable:!0,get:function(){return f.isEd25519Pubkey}}),Object.defineProperty(t,"isMultisigThresholdPubkey",{enumerable:!0,get:function(){return f.isMultisigThresholdPubkey}}),Object.defineProperty(t,"isSecp256k1Pubkey",{enumerable:!0,get:function(){return f.isSecp256k1Pubkey}}),Object.defineProperty(t,"isSinglePubkey",{enumerable:!0,get:function(){return f.isSinglePubkey}}),Object.defineProperty(t,"pubkeyType",{enumerable:!0,get:function(){return f.pubkeyType}});var h=n(787);Object.defineProperty(t,"extractKdfConfiguration",{enumerable:!0,get:function(){return h.extractKdfConfiguration}}),Object.defineProperty(t,"Secp256k1HdWallet",{enumerable:!0,get:function(){return h.Secp256k1HdWallet}});var A=n(788);Object.defineProperty(t,"Secp256k1Wallet",{enumerable:!0,get:function(){return A.Secp256k1Wallet}});var m=n(247);Object.defineProperty(t,"decodeSignature",{enumerable:!0,get:function(){return m.decodeSignature}}),Object.defineProperty(t,"encodeSecp256k1Signature",{enumerable:!0,get:function(){return m.encodeSecp256k1Signature}});var v=n(248);Object.defineProperty(t,"makeSignDoc",{enumerable:!0,get:function(){return v.makeSignDoc}}),Object.defineProperty(t,"serializeSignDoc",{enumerable:!0,get:function(){return v.serializeSignDoc}});var y=n(789);Object.defineProperty(t,"isStdTx",{enumerable:!0,get:function(){return y.isStdTx}}),Object.defineProperty(t,"makeStdTx",{enumerable:!0,get:function(){return y.makeStdTx}});var I=n(428);Object.defineProperty(t,"executeKdf",{enumerable:!0,get:function(){return I.executeKdf}})},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Params=t.Height=t.ClientUpdateProposal=t.ClientConsensusStates=t.ConsensusStateWithHeight=t.IdentifiedClientState=t.protobufPackage=void 0;const o=r(n(1)),c=r(n(2)),l=n(22);t.protobufPackage="ibc.core.client.v1";const d={clientId:""};t.IdentifiedClientState={encode:(e,t=c.default.Writer.create())=>(""!==e.clientId&&t.uint32(10).string(e.clientId),void 0!==e.clientState&&l.Any.encode(e.clientState,t.uint32(18).fork()).ldelim(),t),decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},d);for(;t.pos>>3){case 1:r.clientId=t.string();break;case 2:r.clientState=l.Any.decode(t,t.uint32());break;default:t.skipType(7&e)}}return r},fromJSON(object){const e=Object.assign({},d);return e.clientId=void 0!==object.clientId&&null!==object.clientId?String(object.clientId):"",e.clientState=void 0!==object.clientState&&null!==object.clientState?l.Any.fromJSON(object.clientState):void 0,e},toJSON(e){const t={};return void 0!==e.clientId&&(t.clientId=e.clientId),void 0!==e.clientState&&(t.clientState=e.clientState?l.Any.toJSON(e.clientState):void 0),t},fromPartial(object){var e;const t=Object.assign({},d);return t.clientId=null!==(e=object.clientId)&&void 0!==e?e:"",t.clientState=void 0!==object.clientState&&null!==object.clientState?l.Any.fromPartial(object.clientState):void 0,t}};const f={};t.ConsensusStateWithHeight={encode:(e,n=c.default.Writer.create())=>(void 0!==e.height&&t.Height.encode(e.height,n.uint32(10).fork()).ldelim(),void 0!==e.consensusState&&l.Any.encode(e.consensusState,n.uint32(18).fork()).ldelim(),n),decode(input,e){const n=input instanceof c.default.Reader?input:new c.default.Reader(input);let r=void 0===e?n.len:n.pos+e;const o=Object.assign({},f);for(;n.pos>>3){case 1:o.height=t.Height.decode(n,n.uint32());break;case 2:o.consensusState=l.Any.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(object){const e=Object.assign({},f);return e.height=void 0!==object.height&&null!==object.height?t.Height.fromJSON(object.height):void 0,e.consensusState=void 0!==object.consensusState&&null!==object.consensusState?l.Any.fromJSON(object.consensusState):void 0,e},toJSON(e){const n={};return void 0!==e.height&&(n.height=e.height?t.Height.toJSON(e.height):void 0),void 0!==e.consensusState&&(n.consensusState=e.consensusState?l.Any.toJSON(e.consensusState):void 0),n},fromPartial(object){const e=Object.assign({},f);return e.height=void 0!==object.height&&null!==object.height?t.Height.fromPartial(object.height):void 0,e.consensusState=void 0!==object.consensusState&&null!==object.consensusState?l.Any.fromPartial(object.consensusState):void 0,e}};const h={clientId:""};t.ClientConsensusStates={encode(e,n=c.default.Writer.create()){""!==e.clientId&&n.uint32(10).string(e.clientId);for(const r of e.consensusStates)t.ConsensusStateWithHeight.encode(r,n.uint32(18).fork()).ldelim();return n},decode(input,e){const n=input instanceof c.default.Reader?input:new c.default.Reader(input);let r=void 0===e?n.len:n.pos+e;const o=Object.assign({},h);for(o.consensusStates=[];n.pos>>3){case 1:o.clientId=n.string();break;case 2:o.consensusStates.push(t.ConsensusStateWithHeight.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return o},fromJSON(object){var e;const n=Object.assign({},h);return n.clientId=void 0!==object.clientId&&null!==object.clientId?String(object.clientId):"",n.consensusStates=(null!==(e=object.consensusStates)&&void 0!==e?e:[]).map((e=>t.ConsensusStateWithHeight.fromJSON(e))),n},toJSON(e){const n={};return void 0!==e.clientId&&(n.clientId=e.clientId),e.consensusStates?n.consensusStates=e.consensusStates.map((e=>e?t.ConsensusStateWithHeight.toJSON(e):void 0)):n.consensusStates=[],n},fromPartial(object){var e,n;const r=Object.assign({},h);return r.clientId=null!==(e=object.clientId)&&void 0!==e?e:"",r.consensusStates=(null===(n=object.consensusStates)||void 0===n?void 0:n.map((e=>t.ConsensusStateWithHeight.fromPartial(e))))||[],r}};const A={title:"",description:"",clientId:""};t.ClientUpdateProposal={encode:(e,t=c.default.Writer.create())=>(""!==e.title&&t.uint32(10).string(e.title),""!==e.description&&t.uint32(18).string(e.description),""!==e.clientId&&t.uint32(26).string(e.clientId),void 0!==e.header&&l.Any.encode(e.header,t.uint32(34).fork()).ldelim(),t),decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},A);for(;t.pos>>3){case 1:r.title=t.string();break;case 2:r.description=t.string();break;case 3:r.clientId=t.string();break;case 4:r.header=l.Any.decode(t,t.uint32());break;default:t.skipType(7&e)}}return r},fromJSON(object){const e=Object.assign({},A);return e.title=void 0!==object.title&&null!==object.title?String(object.title):"",e.description=void 0!==object.description&&null!==object.description?String(object.description):"",e.clientId=void 0!==object.clientId&&null!==object.clientId?String(object.clientId):"",e.header=void 0!==object.header&&null!==object.header?l.Any.fromJSON(object.header):void 0,e},toJSON(e){const t={};return void 0!==e.title&&(t.title=e.title),void 0!==e.description&&(t.description=e.description),void 0!==e.clientId&&(t.clientId=e.clientId),void 0!==e.header&&(t.header=e.header?l.Any.toJSON(e.header):void 0),t},fromPartial(object){var e,t,n;const r=Object.assign({},A);return r.title=null!==(e=object.title)&&void 0!==e?e:"",r.description=null!==(t=object.description)&&void 0!==t?t:"",r.clientId=null!==(n=object.clientId)&&void 0!==n?n:"",r.header=void 0!==object.header&&null!==object.header?l.Any.fromPartial(object.header):void 0,r}};const m={revisionNumber:o.default.UZERO,revisionHeight:o.default.UZERO};t.Height={encode:(e,t=c.default.Writer.create())=>(e.revisionNumber.isZero()||t.uint32(8).uint64(e.revisionNumber),e.revisionHeight.isZero()||t.uint32(16).uint64(e.revisionHeight),t),decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},m);for(;t.pos>>3){case 1:r.revisionNumber=t.uint64();break;case 2:r.revisionHeight=t.uint64();break;default:t.skipType(7&e)}}return r},fromJSON(object){const e=Object.assign({},m);return e.revisionNumber=void 0!==object.revisionNumber&&null!==object.revisionNumber?o.default.fromString(object.revisionNumber):o.default.UZERO,e.revisionHeight=void 0!==object.revisionHeight&&null!==object.revisionHeight?o.default.fromString(object.revisionHeight):o.default.UZERO,e},toJSON(e){const t={};return void 0!==e.revisionNumber&&(t.revisionNumber=(e.revisionNumber||o.default.UZERO).toString()),void 0!==e.revisionHeight&&(t.revisionHeight=(e.revisionHeight||o.default.UZERO).toString()),t},fromPartial(object){const e=Object.assign({},m);return e.revisionNumber=void 0!==object.revisionNumber&&null!==object.revisionNumber?o.default.fromValue(object.revisionNumber):o.default.UZERO,e.revisionHeight=void 0!==object.revisionHeight&&null!==object.revisionHeight?o.default.fromValue(object.revisionHeight):o.default.UZERO,e}};const v={allowedClients:""};t.Params={encode(e,t=c.default.Writer.create()){for(const n of e.allowedClients)t.uint32(10).string(n);return t},decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},v);for(r.allowedClients=[];t.pos>>3==1)r.allowedClients.push(t.string());else t.skipType(7&e)}return r},fromJSON(object){var e;const t=Object.assign({},v);return t.allowedClients=(null!==(e=object.allowedClients)&&void 0!==e?e:[]).map((e=>String(e))),t},toJSON(e){const t={};return e.allowedClients?t.allowedClients=e.allowedClients.map((e=>e)):t.allowedClients=[],t},fromPartial(object){var e;const t=Object.assign({},v);return t.allowedClients=(null===(e=object.allowedClients)||void 0===e?void 0:e.map((e=>e)))||[],t}},c.default.util.Long!==o.default&&(c.default.util.Long=o.default,c.default.configure())},,,,,,,,,,function(e,t){var n,r=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];t.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return 4*e+17},t.getSymbolTotalCodewords=function(e){return r[e]},t.getBCHDigit=function(data){for(var e=0;0!==data;)e++,data>>>=1;return e},t.setToSJISFunction=function(e){if("function"!=typeof e)throw new Error('"toSJISFunc" is not a valid function.');n=e},t.isKanjiModeEnabled=function(){return void 0!==n},t.toSJIS=function(e){return n(e)}},function(e,t,n){var r=n(336),o=n(337);t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(e,t){if(!e.ccBits)throw new Error("Invalid mode: "+e);if(!r.isValid(t))throw new Error("Invalid version: "+t);return t>=1&&t<10?e.ccBits[0]:t<27?e.ccBits[1]:e.ccBits[2]},t.getBestModeForData=function(e){return o.testNumeric(e)?t.NUMERIC:o.testAlphanumeric(e)?t.ALPHANUMERIC:o.testKanji(e)?t.KANJI:t.BYTE},t.toString=function(e){if(e&&e.id)return e.id;throw new Error("Invalid mode")},t.isValid=function(e){return e&&e.bit&&e.ccBits},t.from=function(e,n){if(t.isValid(e))return e;try{return function(e){if("string"!=typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+e)}}(e)}catch(e){return n}}},function(e,t,n){"use strict";(function(e){var r=t;function o(e,t,n){for(var r=Object.keys(t),i=0;i0)},r.Buffer=function(){try{var e=r.inquire("buffer").Buffer;return e.prototype.utf8Write?e:null}catch(e){return null}}(),r._Buffer_from=null,r._Buffer_allocUnsafe=null,r.newBuffer=function(e){return"number"==typeof e?r.Buffer?r._Buffer_allocUnsafe(e):new r.Array(e):r.Buffer?r._Buffer_from(e):"undefined"==typeof Uint8Array?e:new Uint8Array(e)},r.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,r.Long=r.global.dcodeIO&&r.global.dcodeIO.Long||r.global.Long||r.inquire("long"),r.key2Re=/^true|false|0|1$/,r.key32Re=/^-?(?:0|[1-9][0-9]*)$/,r.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,r.longToHash=function(e){return e?r.LongBits.from(e).toHash():r.LongBits.zeroHash},r.longFromHash=function(e,t){var n=r.LongBits.fromHash(e);return r.Long?r.Long.fromBits(n.lo,n.hi,t):n.toNumber(Boolean(t))},r.merge=o,r.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},r.newError=c,r.ProtocolError=c("ProtocolError"),r.oneOfGetter=function(e){for(var t={},i=0;i-1;--i)if(1===t[e[i]]&&void 0!==this[e[i]]&&null!==this[e[i]])return e[i]}},r.oneOfSetter=function(e){return function(t){for(var i=0;inew Uint8Array(e.buffer,e.byteOffset,e.byteLength);t.u32=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4));t.createView=e=>new DataView(e.buffer,e.byteOffset,e.byteLength);if(t.rotr=(e,t)=>e<<32-t|e>>>t,t.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],!t.isLE)throw new Error("Non little-endian hardware is not supported");const o=Array.from({length:256},((e,i)=>i.toString(16).padStart(2,"0")));t.bytesToHex=function(e){if(!(e instanceof Uint8Array))throw new Error("Uint8Array expected");let t="";for(let i=0;i{},t.asyncLoop=async function(e,n,r){let o=Date.now();for(let i=0;i=0&&ea instanceof Uint8Array)))throw new Error("Uint8Array list expected");if(1===e.length)return e[0];const t=e.reduce(((a,e)=>a+e.length),0),n=new Uint8Array(t);for(let i=0,t=0;ie().update(l(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t},t.wrapConstructorWithOpts=function(e){const t=(t,n)=>e(n).update(l(t)).digest(),n=e({});return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=t=>e(t),t},t.randomBytes=function(e=32){if(r.crypto.web)return r.crypto.web.getRandomValues(new Uint8Array(e));if(r.crypto.node)return new Uint8Array(r.crypto.node.randomBytes(e).buffer);throw new Error("The environment doesn't have randomBytes function")}},function(e,t,n){"use strict";var r,o="object"==typeof Reflect?Reflect:null,c=o&&"function"==typeof o.apply?o.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};r=o&&"function"==typeof o.ownKeys?o.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var l=Number.isNaN||function(e){return e!=e};function d(){d.init.call(this)}e.exports=d,e.exports.once=function(e,t){return new Promise((function(n,r){function o(n){e.removeListener(t,c),r(n)}function c(){"function"==typeof e.removeListener&&e.removeListener("error",o),n([].slice.call(arguments))}C(e,t,c,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&C(e,"error",t,n)}(e,o,{once:!0})}))},d.EventEmitter=d,d.prototype._events=void 0,d.prototype._eventsCount=0,d.prototype._maxListeners=void 0;var f=10;function h(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function A(e){return void 0===e._maxListeners?d.defaultMaxListeners:e._maxListeners}function m(e,t,n,r){var o,c,l,d;if(h(n),void 0===(c=e._events)?(c=e._events=Object.create(null),e._eventsCount=0):(void 0!==c.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),c=e._events),l=c[t]),void 0===l)l=c[t]=n,++e._eventsCount;else if("function"==typeof l?l=c[t]=r?[n,l]:[l,n]:r?l.unshift(n):l.push(n),(o=A(e))>0&&l.length>o&&!l.warned){l.warned=!0;var f=new Error("Possible EventEmitter memory leak detected. "+l.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");f.name="MaxListenersExceededWarning",f.emitter=e,f.type=t,f.count=l.length,d=f,console&&console.warn&&console.warn(d)}return e}function v(){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 y(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},o=v.bind(r);return o.listener=n,r.wrapFn=o,o}function I(e,t,n){var r=e._events;if(void 0===r)return[];var o=r[t];return void 0===o?[]:"function"==typeof o?n?[o.listener||o]:[o]:n?function(e){for(var t=new Array(e.length),i=0;i0&&(o=t[0]),o instanceof Error)throw o;var l=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw l.context=o,l}var d=r[e];if(void 0===d)return!1;if("function"==typeof d)c(d,this,t);else{var f=d.length,h=_(d,f);for(i=0;i=0;i--)if(n[i]===t||n[i].listener===t){c=n[i].listener,o=i;break}if(o<0)return this;0===o?n.shift():function(e,t){for(;t+1=0;i--)this.removeListener(e,t[i]);return this},d.prototype.listeners=function(e){return I(this,e,!0)},d.prototype.rawListeners=function(e){return I(this,e,!1)},d.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):w.call(e,t)},d.prototype.listenerCount=w,d.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(e,t,n){"use strict";var r=n(9).Buffer,o=r.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function c(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(r.isEncoding===o||!o(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=f,this.end=h,t=4;break;case"utf8":this.fillLast=d,t=4;break;case"base64":this.text=A,this.end=m,t=3;break;default:return this.write=v,void(this.end=y)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.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 d(e){var p=this.lastTotal-this.lastNeed,t=function(e,t,p){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==t?t:this.lastNeed<=e.length?(e.copy(this.lastChar,p,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,p,0,e.length),void(this.lastNeed-=e.length))}function f(e,i){if((e.length-i)%2==0){var t=e.toString("utf16le",i);if(t){var n=t.charCodeAt(t.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],t.slice(0,-1)}return t}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",i,e.length-1)}function h(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function A(e,i){var t=(e.length-i)%3;return 0===t?e.toString("base64",i):(this.lastNeed=3-t,this.lastTotal=3,1===t?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",i,e.length-t))}function m(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 y(e){return e&&e.length?this.write(e):""}t.StringDecoder=c,c.prototype.write=function(e){if(0===e.length)return"";var t,i;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";i=this.lastNeed,this.lastNeed=0}else i=0;return i=0)return r>0&&(e.lastNeed=r-1),r;if(--n=0)return r>0&&(e.lastNeed=r-2),r;if(--n=0)return r>0&&(2===r?r=0:e.lastNeed=r-3),r;return 0}(this,e,i);if(!this.lastNeed)return e.toString("utf8",i);this.lastTotal=t;var n=e.length-(t-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",i,n)},c.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},function(e,t,n){"use strict";var r=n(176),o=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=m;var c=Object.create(n(136));c.inherits=n(8);var l=n(354),d=n(225);c.inherits(m,l);for(var f=o(d.prototype),h=0;h=this.max&&u._n(e)},e.prototype._e=function(e){var u=this.out;u!==f&&u._e(e)},e.prototype._c=function(){var u=this.out;u!==f&&u._c()},e}(),x=function(){function e(e,t){this.out=e,this.op=t}return e.prototype._n=function(){this.op.end()},e.prototype._e=function(e){this.out._e(e)},e.prototype._c=function(){this.op.end()},e}(),M=function(){function e(e,ins){this.type="endWhen",this.ins=ins,this.out=f,this.o=e,this.oil=v}return e.prototype._start=function(e){this.out=e,this.o._add(this.oil=new x(e,this)),this.ins._add(this)},e.prototype._stop=function(){this.ins._remove(this),this.o._remove(this.oil),this.out=f,this.oil=v},e.prototype.end=function(){var u=this.out;u!==f&&u._c()},e.prototype._n=function(e){var u=this.out;u!==f&&u._n(e)},e.prototype._e=function(e){var u=this.out;u!==f&&u._e(e)},e.prototype._c=function(){this.end()},e}(),Q=function(){function e(e,ins){this.type="filter",this.ins=ins,this.out=f,this.f=e}return e.prototype._start=function(e){this.out=e,this.ins._add(this)},e.prototype._stop=function(){this.ins._remove(this),this.out=f},e.prototype._n=function(e){var u=this.out;if(u!==f){var t=m(this,e,u);t!==f&&t&&u._n(e)}},e.prototype._e=function(e){var u=this.out;u!==f&&u._e(e)},e.prototype._c=function(){var u=this.out;u!==f&&u._c()},e}(),N=function(){function e(e,t){this.out=e,this.op=t}return e.prototype._n=function(e){this.out._n(e)},e.prototype._e=function(e){this.out._e(e)},e.prototype._c=function(){this.op.inner=f,this.op.less()},e}(),D=function(){function e(ins){this.type="flatten",this.ins=ins,this.out=f,this.open=!0,this.inner=f,this.il=v}return e.prototype._start=function(e){this.out=e,this.open=!0,this.inner=f,this.il=v,this.ins._add(this)},e.prototype._stop=function(){this.ins._remove(this),this.inner!==f&&this.inner._remove(this.il),this.out=f,this.open=!0,this.inner=f,this.il=v},e.prototype.less=function(){var u=this.out;u!==f&&(this.open||this.inner!==f||u._c())},e.prototype._n=function(s){var u=this.out;if(u!==f){var e=this.inner,t=this.il;e!==f&&t!==v&&e._remove(t),(this.inner=s)._add(this.il=new N(u,this))}},e.prototype._e=function(e){var u=this.out;u!==f&&u._e(e)},e.prototype._c=function(){this.open=!1,this.less()},e}(),T=function(){function e(e,t,ins){var n=this;this.type="fold",this.ins=ins,this.out=f,this.f=function(t){return e(n.acc,t)},this.acc=this.seed=t}return e.prototype._start=function(e){this.out=e,this.acc=this.seed,e._n(this.acc),this.ins._add(this)},e.prototype._stop=function(){this.ins._remove(this),this.out=f,this.acc=this.seed},e.prototype._n=function(e){var u=this.out;if(u!==f){var t=m(this,e,u);t!==f&&u._n(this.acc=t)}},e.prototype._e=function(e){var u=this.out;u!==f&&u._e(e)},e.prototype._c=function(){var u=this.out;u!==f&&u._c()},e}(),j=function(){function e(ins){this.type="last",this.ins=ins,this.out=f,this.has=!1,this.val=f}return e.prototype._start=function(e){this.out=e,this.has=!1,this.ins._add(this)},e.prototype._stop=function(){this.ins._remove(this),this.out=f,this.val=f},e.prototype._n=function(e){this.has=!0,this.val=e},e.prototype._e=function(e){var u=this.out;u!==f&&u._e(e)},e.prototype._c=function(){var u=this.out;u!==f&&(this.has?(u._n(this.val),u._c()):u._e(new Error("last() failed because input stream completed")))},e}(),U=function(){function e(e,ins){this.type="map",this.ins=ins,this.out=f,this.f=e}return e.prototype._start=function(e){this.out=e,this.ins._add(this)},e.prototype._stop=function(){this.ins._remove(this),this.out=f},e.prototype._n=function(e){var u=this.out;if(u!==f){var t=m(this,e,u);t!==f&&u._n(t)}},e.prototype._e=function(e){var u=this.out;u!==f&&u._e(e)},e.prototype._c=function(){var u=this.out;u!==f&&u._c()},e}(),J=function(){function e(ins){this.type="remember",this.ins=ins,this.out=f}return e.prototype._start=function(e){this.out=e,this.ins._add(e)},e.prototype._stop=function(){this.ins._remove(this.out),this.out=f},e}(),H=function(){function e(e,ins){this.type="replaceError",this.ins=ins,this.out=f,this.f=e}return e.prototype._start=function(e){this.out=e,this.ins._add(this)},e.prototype._stop=function(){this.ins._remove(this),this.out=f},e.prototype._n=function(e){var u=this.out;u!==f&&u._n(e)},e.prototype._e=function(e){var u=this.out;if(u!==f)try{this.ins._remove(this),(this.ins=this.f(e))._add(this)}catch(e){u._e(e)}},e.prototype._c=function(){var u=this.out;u!==f&&u._c()},e}(),F=function(){function e(ins,e){this.type="startWith",this.ins=ins,this.out=f,this.val=e}return e.prototype._start=function(e){this.out=e,this.out._n(this.val),this.ins._add(e)},e.prototype._stop=function(){this.ins._remove(this.out),this.out=f},e}(),L=function(){function e(e,ins){this.type="take",this.ins=ins,this.out=f,this.max=e,this.taken=0}return e.prototype._start=function(e){this.out=e,this.taken=0,this.max<=0?e._c():this.ins._add(this)},e.prototype._stop=function(){this.ins._remove(this),this.out=f},e.prototype._n=function(e){var u=this.out;if(u!==f){var t=++this.taken;t1))if(this._stopID!==f)clearTimeout(this._stopID),this._stopID=f;else{var p=this._prod;p!==f&&p._start(this)}},e.prototype._remove=function(e){var t=this,n=this._target;if(n)return n._remove(e);var a=this._ils,i=a.indexOf(e);i>-1&&(a.splice(i,1),this._prod!==f&&a.length<=0?(this._err=f,this._stopID=setTimeout((function(){return t._stopNow()}))):1===a.length&&this._pruneCycles())},e.prototype._pruneCycles=function(){this._hasNoSinks(this,[])&&this._remove(this._ils[0])},e.prototype._hasNoSinks=function(e,t){if(-1!==t.indexOf(e))return!0;if(e.out===this)return!0;if(e.out&&e.out!==f)return this._hasNoSinks(e.out,t.concat(e));if(e._ils){for(var i=0,n=e._ils.length;i1)this._has&&e._n(this._v);else if(this._stopID!==f)this._has&&e._n(this._v),clearTimeout(this._stopID),this._stopID=f;else if(this._has)e._n(this._v);else{var p=this._prod;p!==f&&p._start(this)}},t.prototype._stopNow=function(){this._has=!1,e.prototype._stopNow.call(this)},t.prototype._x=function(){this._has=!1,e.prototype._x.call(this)},t.prototype.map=function(e){return this._map(e)},t.prototype.mapTo=function(t){return e.prototype.mapTo.call(this,t)},t.prototype.take=function(t){return e.prototype.take.call(this,t)},t.prototype.endWhen=function(t){return e.prototype.endWhen.call(this,t)},t.prototype.replaceError=function(t){return e.prototype.replaceError.call(this,t)},t.prototype.remember=function(){return this},t.prototype.debug=function(t){return e.prototype.debug.call(this,t)},t}(G);t.MemoryStream=V;var W=G;t.default=W},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),c=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.QueryClient=t.decodeCosmosSdkDecFromProto=t.createProtobufRpcClient=t.createPagination=t.makeMultisignedTx=t.createStakingAminoConverters=t.createIbcAminoConverters=t.createGovAminoConverters=t.createFreegrantAminoConverters=t.createDistributionAminoConverters=t.createBankAminoConverters=t.createAuthzAminoConverters=t.setupTxExtension=t.setupStakingExtension=t.setupMintExtension=t.setupIbcExtension=t.setupGovExtension=t.setupDistributionExtension=t.setupBankExtension=t.setupAuthExtension=t.isMsgWithdrawDelegatorRewardEncodeObject=t.isMsgVoteEncodeObject=t.isMsgUndelegateEncodeObject=t.isMsgTransferEncodeObject=t.isMsgSubmitProposalEncodeObject=t.isMsgSendEncodeObject=t.isMsgDepositEncodeObject=t.isMsgDelegateEncodeObject=t.isAminoMsgWithdrawValidatorCommission=t.isAminoMsgWithdrawDelegatorReward=t.isAminoMsgVote=t.isAminoMsgVerifyInvariant=t.isAminoMsgUnjail=t.isAminoMsgUndelegate=t.isAminoMsgSubmitProposal=t.isAminoMsgSubmitEvidence=t.isAminoMsgSetWithdrawAddress=t.isAminoMsgSend=t.isAminoMsgMultiSend=t.isAminoMsgFundCommunityPool=t.isAminoMsgEditValidator=t.isAminoMsgDeposit=t.isAminoMsgDelegate=t.isAminoMsgCreateValidator=t.isAminoMsgBeginRedelegate=t.logs=t.GasPrice=t.calculateFee=t.AminoTypes=t.accountFromAny=void 0,t.parseCoins=t.makeCosmoshubPath=t.coins=t.coin=t.TimeoutError=t.StargateClient=t.isDeliverTxSuccess=t.isDeliverTxFailure=t.assertIsDeliverTxSuccess=t.assertIsDeliverTxFailure=t.SigningStargateClient=t.defaultRegistryTypes=t.isSearchByTagsQuery=t.isSearchBySentFromOrToQuery=t.isSearchByHeightQuery=void 0;var l=n(426);Object.defineProperty(t,"accountFromAny",{enumerable:!0,get:function(){return l.accountFromAny}});var d=n(431);Object.defineProperty(t,"AminoTypes",{enumerable:!0,get:function(){return d.AminoTypes}});var f=n(432);Object.defineProperty(t,"calculateFee",{enumerable:!0,get:function(){return f.calculateFee}}),Object.defineProperty(t,"GasPrice",{enumerable:!0,get:function(){return f.GasPrice}}),t.logs=c(n(798));var h=n(142);Object.defineProperty(t,"isAminoMsgBeginRedelegate",{enumerable:!0,get:function(){return h.isAminoMsgBeginRedelegate}}),Object.defineProperty(t,"isAminoMsgCreateValidator",{enumerable:!0,get:function(){return h.isAminoMsgCreateValidator}}),Object.defineProperty(t,"isAminoMsgDelegate",{enumerable:!0,get:function(){return h.isAminoMsgDelegate}}),Object.defineProperty(t,"isAminoMsgDeposit",{enumerable:!0,get:function(){return h.isAminoMsgDeposit}}),Object.defineProperty(t,"isAminoMsgEditValidator",{enumerable:!0,get:function(){return h.isAminoMsgEditValidator}}),Object.defineProperty(t,"isAminoMsgFundCommunityPool",{enumerable:!0,get:function(){return h.isAminoMsgFundCommunityPool}}),Object.defineProperty(t,"isAminoMsgMultiSend",{enumerable:!0,get:function(){return h.isAminoMsgMultiSend}}),Object.defineProperty(t,"isAminoMsgSend",{enumerable:!0,get:function(){return h.isAminoMsgSend}}),Object.defineProperty(t,"isAminoMsgSetWithdrawAddress",{enumerable:!0,get:function(){return h.isAminoMsgSetWithdrawAddress}}),Object.defineProperty(t,"isAminoMsgSubmitEvidence",{enumerable:!0,get:function(){return h.isAminoMsgSubmitEvidence}}),Object.defineProperty(t,"isAminoMsgSubmitProposal",{enumerable:!0,get:function(){return h.isAminoMsgSubmitProposal}}),Object.defineProperty(t,"isAminoMsgUndelegate",{enumerable:!0,get:function(){return h.isAminoMsgUndelegate}}),Object.defineProperty(t,"isAminoMsgUnjail",{enumerable:!0,get:function(){return h.isAminoMsgUnjail}}),Object.defineProperty(t,"isAminoMsgVerifyInvariant",{enumerable:!0,get:function(){return h.isAminoMsgVerifyInvariant}}),Object.defineProperty(t,"isAminoMsgVote",{enumerable:!0,get:function(){return h.isAminoMsgVote}}),Object.defineProperty(t,"isAminoMsgWithdrawDelegatorReward",{enumerable:!0,get:function(){return h.isAminoMsgWithdrawDelegatorReward}}),Object.defineProperty(t,"isAminoMsgWithdrawValidatorCommission",{enumerable:!0,get:function(){return h.isAminoMsgWithdrawValidatorCommission}}),Object.defineProperty(t,"isMsgDelegateEncodeObject",{enumerable:!0,get:function(){return h.isMsgDelegateEncodeObject}}),Object.defineProperty(t,"isMsgDepositEncodeObject",{enumerable:!0,get:function(){return h.isMsgDepositEncodeObject}}),Object.defineProperty(t,"isMsgSendEncodeObject",{enumerable:!0,get:function(){return h.isMsgSendEncodeObject}}),Object.defineProperty(t,"isMsgSubmitProposalEncodeObject",{enumerable:!0,get:function(){return h.isMsgSubmitProposalEncodeObject}}),Object.defineProperty(t,"isMsgTransferEncodeObject",{enumerable:!0,get:function(){return h.isMsgTransferEncodeObject}}),Object.defineProperty(t,"isMsgUndelegateEncodeObject",{enumerable:!0,get:function(){return h.isMsgUndelegateEncodeObject}}),Object.defineProperty(t,"isMsgVoteEncodeObject",{enumerable:!0,get:function(){return h.isMsgVoteEncodeObject}}),Object.defineProperty(t,"isMsgWithdrawDelegatorRewardEncodeObject",{enumerable:!0,get:function(){return h.isMsgWithdrawDelegatorRewardEncodeObject}}),Object.defineProperty(t,"setupAuthExtension",{enumerable:!0,get:function(){return h.setupAuthExtension}}),Object.defineProperty(t,"setupBankExtension",{enumerable:!0,get:function(){return h.setupBankExtension}}),Object.defineProperty(t,"setupDistributionExtension",{enumerable:!0,get:function(){return h.setupDistributionExtension}}),Object.defineProperty(t,"setupGovExtension",{enumerable:!0,get:function(){return h.setupGovExtension}}),Object.defineProperty(t,"setupIbcExtension",{enumerable:!0,get:function(){return h.setupIbcExtension}}),Object.defineProperty(t,"setupMintExtension",{enumerable:!0,get:function(){return h.setupMintExtension}}),Object.defineProperty(t,"setupStakingExtension",{enumerable:!0,get:function(){return h.setupStakingExtension}}),Object.defineProperty(t,"setupTxExtension",{enumerable:!0,get:function(){return h.setupTxExtension}});var A=n(142);Object.defineProperty(t,"createAuthzAminoConverters",{enumerable:!0,get:function(){return A.createAuthzAminoConverters}}),Object.defineProperty(t,"createBankAminoConverters",{enumerable:!0,get:function(){return A.createBankAminoConverters}}),Object.defineProperty(t,"createDistributionAminoConverters",{enumerable:!0,get:function(){return A.createDistributionAminoConverters}}),Object.defineProperty(t,"createFreegrantAminoConverters",{enumerable:!0,get:function(){return A.createFreegrantAminoConverters}}),Object.defineProperty(t,"createGovAminoConverters",{enumerable:!0,get:function(){return A.createGovAminoConverters}}),Object.defineProperty(t,"createIbcAminoConverters",{enumerable:!0,get:function(){return A.createIbcAminoConverters}}),Object.defineProperty(t,"createStakingAminoConverters",{enumerable:!0,get:function(){return A.createStakingAminoConverters}});var m=n(860);Object.defineProperty(t,"makeMultisignedTx",{enumerable:!0,get:function(){return m.makeMultisignedTx}});var v=n(50);Object.defineProperty(t,"createPagination",{enumerable:!0,get:function(){return v.createPagination}}),Object.defineProperty(t,"createProtobufRpcClient",{enumerable:!0,get:function(){return v.createProtobufRpcClient}}),Object.defineProperty(t,"decodeCosmosSdkDecFromProto",{enumerable:!0,get:function(){return v.decodeCosmosSdkDecFromProto}}),Object.defineProperty(t,"QueryClient",{enumerable:!0,get:function(){return v.QueryClient}});var y=n(446);Object.defineProperty(t,"isSearchByHeightQuery",{enumerable:!0,get:function(){return y.isSearchByHeightQuery}}),Object.defineProperty(t,"isSearchBySentFromOrToQuery",{enumerable:!0,get:function(){return y.isSearchBySentFromOrToQuery}}),Object.defineProperty(t,"isSearchByTagsQuery",{enumerable:!0,get:function(){return y.isSearchByTagsQuery}});var I=n(861);Object.defineProperty(t,"defaultRegistryTypes",{enumerable:!0,get:function(){return I.defaultRegistryTypes}}),Object.defineProperty(t,"SigningStargateClient",{enumerable:!0,get:function(){return I.SigningStargateClient}});var w=n(447);Object.defineProperty(t,"assertIsDeliverTxFailure",{enumerable:!0,get:function(){return w.assertIsDeliverTxFailure}}),Object.defineProperty(t,"assertIsDeliverTxSuccess",{enumerable:!0,get:function(){return w.assertIsDeliverTxSuccess}}),Object.defineProperty(t,"isDeliverTxFailure",{enumerable:!0,get:function(){return w.isDeliverTxFailure}}),Object.defineProperty(t,"isDeliverTxSuccess",{enumerable:!0,get:function(){return w.isDeliverTxSuccess}}),Object.defineProperty(t,"StargateClient",{enumerable:!0,get:function(){return w.StargateClient}}),Object.defineProperty(t,"TimeoutError",{enumerable:!0,get:function(){return w.TimeoutError}});var _=n(76);Object.defineProperty(t,"coin",{enumerable:!0,get:function(){return _.coin}}),Object.defineProperty(t,"coins",{enumerable:!0,get:function(){return _.coins}}),Object.defineProperty(t,"makeCosmoshubPath",{enumerable:!0,get:function(){return _.makeCosmoshubPath}}),Object.defineProperty(t,"parseCoins",{enumerable:!0,get:function(){return _.parseCoins}})},function(e,t,n){"use strict";n.d(t,"c",(function(){return o})),n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return l}));var r=n(29);function o(code){return r.c.includes(code)}function c(e){return Object.keys(r.f).includes(e)?r.f[e]:r.f[r.a]}function l(code){const e=Object.values(r.f).find((e=>e.code===code));return e||r.f[r.a]}},,,function(e,t,n){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var content=function(e,t){var content=e[1]||"",n=e[3];if(!n)return content;if(t&&"function"==typeof btoa){var r=(c=n,l=btoa(unescape(encodeURIComponent(JSON.stringify(c)))),data="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(l),"/*# ".concat(data," */")),o=n.sources.map((function(source){return"/*# sourceURL=".concat(n.sourceRoot||"").concat(source," */")}));return[content].concat(o).concat([r]).join("\n")}var c,l,data;return[content].join("\n")}(t,e);return t[2]?"@media ".concat(t[2]," {").concat(content,"}"):content})).join("")},t.i=function(e,n,r){"string"==typeof e&&(e=[[null,e,""]]);var o={};if(r)for(var i=0;it.parts.length&&(n.parts.length=t.parts.length)}else{var o=[];for(r=0;r=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|e}function d(e,t){var n;return c.TYPED_ARRAY_SUPPORT?(n=new Uint8Array(t)).__proto__=c.prototype:(null===(n=e)&&(n=new c(t)),n.length=t),n}function f(e,t){var n=d(e,t<0?0:0|l(t));if(!c.TYPED_ARRAY_SUPPORT)for(var i=0;i55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&c.push(239,191,189);continue}if(i+1===r){(t-=3)>-1&&c.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&c.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&c.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;c.push(n)}else if(n<2048){if((t-=2)<0)break;c.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;c.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;c.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return c}function m(e){return c.isBuffer(e)?e.length:"undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer)?e.byteLength:("string"!=typeof e&&(e=""+e),0===e.length?0:A(e).length)}c.TYPED_ARRAY_SUPPORT&&(c.prototype.__proto__=Uint8Array.prototype,c.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&c[Symbol.species]===c&&Object.defineProperty(c,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1})),c.prototype.write=function(e,t,n){void 0===t||void 0===n&&"string"==typeof t?(n=this.length,t=0):isFinite(t)&&(t|=0,isFinite(n)?n|=0:n=void 0);var r=this.length-t;if((void 0===n||n>r)&&(n=r),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");return function(e,t,n,r){return function(e,t,n,r){for(var i=0;i=t.length||i>=e.length);++i)t[i+n]=e[i];return i}(A(t,e.length-n),e,n,r)}(this,e,t,n)},c.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--i)e[i+t]=this[i+n];else if(o<1e3||!c.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;ic)throw new RangeError("requested too many random bytes");var n=l.allocUnsafe(e);if(e>0)if(e>o)for(var f=0;f2?"one of ".concat(t," ").concat(e.slice(0,n-1).join(", "),", or ")+e[n-1]:2===n?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}o("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),o("ERR_INVALID_ARG_TYPE",(function(e,t,n){var r,o,l,d;if("string"==typeof t&&(o="not ",t.substr(!l||l<0?0:+l,o.length)===o)?(r="must not be",t=t.replace(/^not /,"")):r="must be",function(e,t,n){return(void 0===n||n>e.length)&&(n=e.length),e.substring(n-t.length,n)===t}(e," argument"))d="The ".concat(e," ").concat(r," ").concat(c(t,"type"));else{var f=function(e,t,n){return"number"!=typeof n&&(n=0),!(n+t.length>e.length)&&-1!==e.indexOf(t,n)}(e,".")?"property":"argument";d='The "'.concat(e,'" ').concat(f," ").concat(r," ").concat(c(t,"type"))}return d+=". Received type ".concat(typeof n)}),TypeError),o("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),o("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),o("ERR_STREAM_PREMATURE_CLOSE","Premature close"),o("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),o("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),o("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),o("ERR_STREAM_WRITE_AFTER_END","write after end"),o("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),o("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),o("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.codes=r},function(e,t,n){"use strict";(function(t){var r=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=h;var o=n(346),c=n(350);n(8)(h,o);for(var l=r(c.prototype),d=0;d=this._finalSize&&(this._update(this._block),this._block.fill(0));var n=8*this._len;if(n<=4294967295)this._block.writeUInt32BE(n,this._blockSize-4);else{var r=(4294967295&n)>>>0,o=(n-r)/4294967296;this._block.writeUInt32BE(o,this._blockSize-8),this._block.writeUInt32BE(r,this._blockSize-4)}this._update(this._block);var c=this._hash();return e?c.toString(e):c},o.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=o},function(e,t,n){"use strict";var r={};function o(code,e,t){t||(t=Error);var n=function(t){var n,r;function o(n,r,o){return t.call(this,function(t,n,r){return"string"==typeof e?e:e(t,n,r)}(n,r,o))||this}return r=t,(n=o).prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r,o}(t);n.prototype.name=t.name,n.prototype.code=code,r[code]=n}function c(e,t){if(Array.isArray(e)){var n=e.length;return e=e.map((function(i){return String(i)})),n>2?"one of ".concat(t," ").concat(e.slice(0,n-1).join(", "),", or ")+e[n-1]:2===n?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}o("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),o("ERR_INVALID_ARG_TYPE",(function(e,t,n){var r,o,l,d;if("string"==typeof t&&(o="not ",t.substr(!l||l<0?0:+l,o.length)===o)?(r="must not be",t=t.replace(/^not /,"")):r="must be",function(e,t,n){return(void 0===n||n>e.length)&&(n=e.length),e.substring(n-t.length,n)===t}(e," argument"))d="The ".concat(e," ").concat(r," ").concat(c(t,"type"));else{var f=function(e,t,n){return"number"!=typeof n&&(n=0),!(n+t.length>e.length)&&-1!==e.indexOf(t,n)}(e,".")?"property":"argument";d='The "'.concat(e,'" ').concat(f," ").concat(r," ").concat(c(t,"type"))}return d+=". Received type ".concat(typeof n)}),TypeError),o("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),o("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),o("ERR_STREAM_PREMATURE_CLOSE","Premature close"),o("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),o("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),o("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),o("ERR_STREAM_WRITE_AFTER_END","write after end"),o("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),o("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),o("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.codes=r},function(e,t,n){"use strict";(function(t){var r=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=h;var o=n(375),c=n(379);n(8)(h,o);for(var l=r(c.prototype),d=0;d0?l.map((function(){return e(!1)})):e(!1))}};e.exports=r},function(e,t,n){"use strict";e.exports=n(556)},function(e,t,n){"use strict";var r=n(327);n.d(t,"randomBytes",(function(){return r.a}));var o=n(328);n.d(t,"aesCbcDecrypt",(function(){return o.a})),n.d(t,"aesCbcEncrypt",(function(){return o.b}));var c=n(329);n.d(t,"hmacSha256Sign",(function(){return c.a}));n(334),n(145),n(18)},,,,,,,,,,,function(e,t,n){"use strict";var r=n(8),o=n(218),c=n(221),l=n(222),d=n(75);function f(e){d.call(this,"digest"),this._hash=e}r(f,d),f.prototype._update=function(data){this._hash.update(data)},f.prototype._final=function(){return this._hash.digest()},e.exports=function(e){return"md5"===(e=e.toLowerCase())?new o:"rmd160"===e||"ripemd160"===e?new c:new f(l(e))}},function(e,t,n){function r(e){return Object.prototype.toString.call(e)}t.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===r(e)},t.isBoolean=function(e){return"boolean"==typeof e},t.isNull=function(e){return null===e},t.isNullOrUndefined=function(e){return null==e},t.isNumber=function(e){return"number"==typeof e},t.isString=function(e){return"string"==typeof e},t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=function(e){return void 0===e},t.isRegExp=function(e){return"[object RegExp]"===r(e)},t.isObject=function(e){return"object"==typeof e&&null!==e},t.isDate=function(e){return"[object Date]"===r(e)},t.isError=function(e){return"[object Error]"===r(e)||e instanceof Error},t.isFunction=function(e){return"function"==typeof e},t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=n(14).Buffer.isBuffer},function(e,t,n){(function(t){e.exports=function(a,b){for(var e=Math.min(a.length,b.length),n=new t(e),i=0;i=this._delta8){var n=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-n,e.length),0===this.pending.length&&(this.pending=null),e=r.join32(e,0,e.length-n,this.endian);for(var i=0;i>>24&255,r[i++]=e>>>16&255,r[i++]=e>>>8&255,r[i++]=255&e}else for(r[i++]=255&e,r[i++]=e>>>8&255,r[i++]=e>>>16&255,r[i++]=e>>>24&255,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,o=8;o>>3==1)o.signatures.push(t.SignatureDescriptor.decode(n,n.uint32()));else n.skipType(7&e)}return o},fromJSON(object){var e;const n=Object.assign({},m);return n.signatures=(null!==(e=object.signatures)&&void 0!==e?e:[]).map((e=>t.SignatureDescriptor.fromJSON(e))),n},toJSON(e){const n={};return e.signatures?n.signatures=e.signatures.map((e=>e?t.SignatureDescriptor.toJSON(e):void 0)):n.signatures=[],n},fromPartial(object){var e;const n=Object.assign({},m);return n.signatures=(null===(e=object.signatures)||void 0===e?void 0:e.map((e=>t.SignatureDescriptor.fromPartial(e))))||[],n}};const v={sequence:o.default.UZERO};t.SignatureDescriptor={encode:(e,n=c.default.Writer.create())=>(void 0!==e.publicKey&&l.Any.encode(e.publicKey,n.uint32(10).fork()).ldelim(),void 0!==e.data&&t.SignatureDescriptor_Data.encode(e.data,n.uint32(18).fork()).ldelim(),e.sequence.isZero()||n.uint32(24).uint64(e.sequence),n),decode(input,e){const n=input instanceof c.default.Reader?input:new c.default.Reader(input);let r=void 0===e?n.len:n.pos+e;const o=Object.assign({},v);for(;n.pos>>3){case 1:o.publicKey=l.Any.decode(n,n.uint32());break;case 2:o.data=t.SignatureDescriptor_Data.decode(n,n.uint32());break;case 3:o.sequence=n.uint64();break;default:n.skipType(7&e)}}return o},fromJSON(object){const e=Object.assign({},v);return e.publicKey=void 0!==object.publicKey&&null!==object.publicKey?l.Any.fromJSON(object.publicKey):void 0,e.data=void 0!==object.data&&null!==object.data?t.SignatureDescriptor_Data.fromJSON(object.data):void 0,e.sequence=void 0!==object.sequence&&null!==object.sequence?o.default.fromString(object.sequence):o.default.UZERO,e},toJSON(e){const n={};return void 0!==e.publicKey&&(n.publicKey=e.publicKey?l.Any.toJSON(e.publicKey):void 0),void 0!==e.data&&(n.data=e.data?t.SignatureDescriptor_Data.toJSON(e.data):void 0),void 0!==e.sequence&&(n.sequence=(e.sequence||o.default.UZERO).toString()),n},fromPartial(object){const e=Object.assign({},v);return e.publicKey=void 0!==object.publicKey&&null!==object.publicKey?l.Any.fromPartial(object.publicKey):void 0,e.data=void 0!==object.data&&null!==object.data?t.SignatureDescriptor_Data.fromPartial(object.data):void 0,e.sequence=void 0!==object.sequence&&null!==object.sequence?o.default.fromValue(object.sequence):o.default.UZERO,e}};const y={};t.SignatureDescriptor_Data={encode:(e,n=c.default.Writer.create())=>(void 0!==e.single&&t.SignatureDescriptor_Data_Single.encode(e.single,n.uint32(10).fork()).ldelim(),void 0!==e.multi&&t.SignatureDescriptor_Data_Multi.encode(e.multi,n.uint32(18).fork()).ldelim(),n),decode(input,e){const n=input instanceof c.default.Reader?input:new c.default.Reader(input);let r=void 0===e?n.len:n.pos+e;const o=Object.assign({},y);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(object){const e=Object.assign({},y);return e.single=void 0!==object.single&&null!==object.single?t.SignatureDescriptor_Data_Single.fromJSON(object.single):void 0,e.multi=void 0!==object.multi&&null!==object.multi?t.SignatureDescriptor_Data_Multi.fromJSON(object.multi):void 0,e},toJSON(e){const n={};return void 0!==e.single&&(n.single=e.single?t.SignatureDescriptor_Data_Single.toJSON(e.single):void 0),void 0!==e.multi&&(n.multi=e.multi?t.SignatureDescriptor_Data_Multi.toJSON(e.multi):void 0),n},fromPartial(object){const e=Object.assign({},y);return e.single=void 0!==object.single&&null!==object.single?t.SignatureDescriptor_Data_Single.fromPartial(object.single):void 0,e.multi=void 0!==object.multi&&null!==object.multi?t.SignatureDescriptor_Data_Multi.fromPartial(object.multi):void 0,e}};const I={mode:0};t.SignatureDescriptor_Data_Single={encode:(e,t=c.default.Writer.create())=>(0!==e.mode&&t.uint32(8).int32(e.mode),0!==e.signature.length&&t.uint32(18).bytes(e.signature),t),decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},I);for(r.signature=new Uint8Array;t.pos>>3){case 1:r.mode=t.int32();break;case 2:r.signature=t.bytes();break;default:t.skipType(7&e)}}return r},fromJSON(object){const e=Object.assign({},I);return e.mode=void 0!==object.mode&&null!==object.mode?h(object.mode):0,e.signature=void 0!==object.signature&&null!==object.signature?function(e){const t=C(e),n=new Uint8Array(t.length);for(let i=0;i>>3){case 1:o.bitarray=d.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(object){var e;const n=Object.assign({},w);return n.bitarray=void 0!==object.bitarray&&null!==object.bitarray?d.CompactBitArray.fromJSON(object.bitarray):void 0,n.signatures=(null!==(e=object.signatures)&&void 0!==e?e:[]).map((e=>t.SignatureDescriptor_Data.fromJSON(e))),n},toJSON(e){const n={};return void 0!==e.bitarray&&(n.bitarray=e.bitarray?d.CompactBitArray.toJSON(e.bitarray):void 0),e.signatures?n.signatures=e.signatures.map((e=>e?t.SignatureDescriptor_Data.toJSON(e):void 0)):n.signatures=[],n},fromPartial(object){var e;const n=Object.assign({},w);return n.bitarray=void 0!==object.bitarray&&null!==object.bitarray?d.CompactBitArray.fromPartial(object.bitarray):void 0,n.signatures=(null===(e=object.signatures)||void 0===e?void 0:e.map((e=>t.SignatureDescriptor_Data.fromPartial(e))))||[],n}};var _=(()=>{if(void 0!==_)return _;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==e)return e;throw"Unable to locate global object"})();const C=_.atob||(e=>_.Buffer.from(e,"base64").toString("binary"));const S=_.btoa||(e=>_.Buffer.from(e,"binary").toString("base64"));c.default.util.Long!==o.default&&(c.default.util.Long=o.default,c.default.configure())}).call(this,n(3))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.stakingTypes=t.isMsgUndelegateEncodeObject=t.isMsgDelegateEncodeObject=t.isAminoMsgUndelegate=t.isAminoMsgEditValidator=t.isAminoMsgDelegate=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.setupGovExtension=t.isMsgVoteEncodeObject=t.isMsgSubmitProposalEncodeObject=t.isMsgDepositEncodeObject=t.govTypes=t.isAminoMsgVote=t.isAminoMsgSubmitProposal=t.isAminoMsgDeposit=t.createGovAminoConverters=t.feegrantTypes=t.createFreegrantAminoConverters=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.authzTypes=t.createAuthzAminoConverters=t.setupAuthExtension=void 0,t.vestingTypes=t.createVestingAminoConverters=t.setupTxExtension=t.setupStakingExtension=void 0;var r=n(799);Object.defineProperty(t,"setupAuthExtension",{enumerable:!0,get:function(){return r.setupAuthExtension}});var o=n(807);Object.defineProperty(t,"createAuthzAminoConverters",{enumerable:!0,get:function(){return o.createAuthzAminoConverters}});var c=n(808);Object.defineProperty(t,"authzTypes",{enumerable:!0,get:function(){return c.authzTypes}});var l=n(809);Object.defineProperty(t,"createBankAminoConverters",{enumerable:!0,get:function(){return l.createBankAminoConverters}}),Object.defineProperty(t,"isAminoMsgMultiSend",{enumerable:!0,get:function(){return l.isAminoMsgMultiSend}}),Object.defineProperty(t,"isAminoMsgSend",{enumerable:!0,get:function(){return l.isAminoMsgSend}});var d=n(810);Object.defineProperty(t,"bankTypes",{enumerable:!0,get:function(){return d.bankTypes}}),Object.defineProperty(t,"isMsgSendEncodeObject",{enumerable:!0,get:function(){return d.isMsgSendEncodeObject}});var f=n(811);Object.defineProperty(t,"setupBankExtension",{enumerable:!0,get:function(){return f.setupBankExtension}});var h=n(813);Object.defineProperty(t,"createCrysisAminoConverters",{enumerable:!0,get:function(){return h.createCrysisAminoConverters}}),Object.defineProperty(t,"isAminoMsgVerifyInvariant",{enumerable:!0,get:function(){return h.isAminoMsgVerifyInvariant}});var A=n(814);Object.defineProperty(t,"createDistributionAminoConverters",{enumerable:!0,get:function(){return A.createDistributionAminoConverters}}),Object.defineProperty(t,"isAminoMsgFundCommunityPool",{enumerable:!0,get:function(){return A.isAminoMsgFundCommunityPool}}),Object.defineProperty(t,"isAminoMsgSetWithdrawAddress",{enumerable:!0,get:function(){return A.isAminoMsgSetWithdrawAddress}}),Object.defineProperty(t,"isAminoMsgWithdrawDelegatorReward",{enumerable:!0,get:function(){return A.isAminoMsgWithdrawDelegatorReward}}),Object.defineProperty(t,"isAminoMsgWithdrawValidatorCommission",{enumerable:!0,get:function(){return A.isAminoMsgWithdrawValidatorCommission}});var m=n(815);Object.defineProperty(t,"distributionTypes",{enumerable:!0,get:function(){return m.distributionTypes}}),Object.defineProperty(t,"isMsgWithdrawDelegatorRewardEncodeObject",{enumerable:!0,get:function(){return m.isMsgWithdrawDelegatorRewardEncodeObject}});var v=n(816);Object.defineProperty(t,"setupDistributionExtension",{enumerable:!0,get:function(){return v.setupDistributionExtension}});var y=n(819);Object.defineProperty(t,"createEvidenceAminoConverters",{enumerable:!0,get:function(){return y.createEvidenceAminoConverters}}),Object.defineProperty(t,"isAminoMsgSubmitEvidence",{enumerable:!0,get:function(){return y.isAminoMsgSubmitEvidence}});var I=n(820);Object.defineProperty(t,"createFreegrantAminoConverters",{enumerable:!0,get:function(){return I.createFreegrantAminoConverters}});var w=n(821);Object.defineProperty(t,"feegrantTypes",{enumerable:!0,get:function(){return w.feegrantTypes}});var _=n(823);Object.defineProperty(t,"createGovAminoConverters",{enumerable:!0,get:function(){return _.createGovAminoConverters}}),Object.defineProperty(t,"isAminoMsgDeposit",{enumerable:!0,get:function(){return _.isAminoMsgDeposit}}),Object.defineProperty(t,"isAminoMsgSubmitProposal",{enumerable:!0,get:function(){return _.isAminoMsgSubmitProposal}}),Object.defineProperty(t,"isAminoMsgVote",{enumerable:!0,get:function(){return _.isAminoMsgVote}});var C=n(824);Object.defineProperty(t,"govTypes",{enumerable:!0,get:function(){return C.govTypes}}),Object.defineProperty(t,"isMsgDepositEncodeObject",{enumerable:!0,get:function(){return C.isMsgDepositEncodeObject}}),Object.defineProperty(t,"isMsgSubmitProposalEncodeObject",{enumerable:!0,get:function(){return C.isMsgSubmitProposalEncodeObject}}),Object.defineProperty(t,"isMsgVoteEncodeObject",{enumerable:!0,get:function(){return C.isMsgVoteEncodeObject}});var S=n(826);Object.defineProperty(t,"setupGovExtension",{enumerable:!0,get:function(){return S.setupGovExtension}});var E=n(828);Object.defineProperty(t,"createIbcAminoConverters",{enumerable:!0,get:function(){return E.createIbcAminoConverters}}),Object.defineProperty(t,"isAminoMsgTransfer",{enumerable:!0,get:function(){return E.isAminoMsgTransfer}});var B=n(829);Object.defineProperty(t,"ibcTypes",{enumerable:!0,get:function(){return B.ibcTypes}}),Object.defineProperty(t,"isMsgTransferEncodeObject",{enumerable:!0,get:function(){return B.isMsgTransferEncodeObject}});var k=n(833);Object.defineProperty(t,"setupIbcExtension",{enumerable:!0,get:function(){return k.setupIbcExtension}});var O=n(841);Object.defineProperty(t,"setupMintExtension",{enumerable:!0,get:function(){return O.setupMintExtension}});var R=n(844);Object.defineProperty(t,"createSlashingAminoConverters",{enumerable:!0,get:function(){return R.createSlashingAminoConverters}}),Object.defineProperty(t,"isAminoMsgUnjail",{enumerable:!0,get:function(){return R.isAminoMsgUnjail}});var P=n(845);Object.defineProperty(t,"setupSlashingExtension",{enumerable:!0,get:function(){return P.setupSlashingExtension}});var x=n(848);Object.defineProperty(t,"createStakingAminoConverters",{enumerable:!0,get:function(){return x.createStakingAminoConverters}}),Object.defineProperty(t,"isAminoMsgBeginRedelegate",{enumerable:!0,get:function(){return x.isAminoMsgBeginRedelegate}}),Object.defineProperty(t,"isAminoMsgCreateValidator",{enumerable:!0,get:function(){return x.isAminoMsgCreateValidator}}),Object.defineProperty(t,"isAminoMsgDelegate",{enumerable:!0,get:function(){return x.isAminoMsgDelegate}}),Object.defineProperty(t,"isAminoMsgEditValidator",{enumerable:!0,get:function(){return x.isAminoMsgEditValidator}}),Object.defineProperty(t,"isAminoMsgUndelegate",{enumerable:!0,get:function(){return x.isAminoMsgUndelegate}});var M=n(849);Object.defineProperty(t,"isMsgDelegateEncodeObject",{enumerable:!0,get:function(){return M.isMsgDelegateEncodeObject}}),Object.defineProperty(t,"isMsgUndelegateEncodeObject",{enumerable:!0,get:function(){return M.isMsgUndelegateEncodeObject}}),Object.defineProperty(t,"stakingTypes",{enumerable:!0,get:function(){return M.stakingTypes}});var Q=n(850);Object.defineProperty(t,"setupStakingExtension",{enumerable:!0,get:function(){return Q.setupStakingExtension}});var N=n(852);Object.defineProperty(t,"setupTxExtension",{enumerable:!0,get:function(){return N.setupTxExtension}});var D=n(857);Object.defineProperty(t,"createVestingAminoConverters",{enumerable:!0,get:function(){return D.createVestingAminoConverters}});var T=n(858);Object.defineProperty(t,"vestingTypes",{enumerable:!0,get:function(){return T.vestingTypes}})},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Duration=t.protobufPackage=void 0;const o=r(n(1)),c=r(n(2));t.protobufPackage="google.protobuf";const l={seconds:o.default.ZERO,nanos:0};t.Duration={encode:(e,t=c.default.Writer.create())=>(e.seconds.isZero()||t.uint32(8).int64(e.seconds),0!==e.nanos&&t.uint32(16).int32(e.nanos),t),decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},l);for(;t.pos>>3){case 1:r.seconds=t.int64();break;case 2:r.nanos=t.int32();break;default:t.skipType(7&e)}}return r},fromJSON(object){const e=Object.assign({},l);return e.seconds=void 0!==object.seconds&&null!==object.seconds?o.default.fromString(object.seconds):o.default.ZERO,e.nanos=void 0!==object.nanos&&null!==object.nanos?Number(object.nanos):0,e},toJSON(e){const t={};return void 0!==e.seconds&&(t.seconds=(e.seconds||o.default.ZERO).toString()),void 0!==e.nanos&&(t.nanos=e.nanos),t},fromPartial(object){var e;const t=Object.assign({},l);return t.seconds=void 0!==object.seconds&&null!==object.seconds?o.default.fromValue(object.seconds):o.default.ZERO,t.nanos=null!==(e=object.nanos)&&void 0!==e?e:0,t}},c.default.util.Long!==o.default&&(c.default.util.Long=o.default,c.default.configure())},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));class r{}},function(e,t,n){"use strict";var r=n(330);n.o(r,"isConstantTime")&&n.d(t,"isConstantTime",(function(){return r.isConstantTime}));n(331);var o=n(332);n.o(o,"isConstantTime")&&n.d(t,"isConstantTime",(function(){return o.isConstantTime}));var c=n(333);n.d(t,"isConstantTime",(function(){return c.a}))},function(e,t,n){(function(e){!function(e,t){"use strict";function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function o(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function c(e,base,t){if(c.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==base&&"be"!==base||(t=base,base=10),this._init(e||0,base||10,t||"be"))}var l;"object"==typeof e?e.exports=c:t.BN=c,c.BN=c,c.wordSize=26;try{l=n(563).Buffer}catch(e){}function d(e,t,n){for(var r=0,o=Math.min(e.length,n),i=t;i=49&&c<=54?c-49+10:c>=17&&c<=22?c-17+10:15&c}return r}function f(e,t,n,r){for(var o=0,c=Math.min(e.length,n),i=t;i=49?l-49+10:l>=17?l-17+10:l}return o}c.isBN=function(e){return e instanceof c||null!==e&&"object"==typeof e&&e.constructor.wordSize===c.wordSize&&Array.isArray(e.words)},c.max=function(e,t){return e.cmp(t)>0?e:t},c.min=function(e,t){return e.cmp(t)<0?e:t},c.prototype._init=function(e,base,t){if("number"==typeof e)return this._initNumber(e,base,t);if("object"==typeof e)return this._initArray(e,base,t);"hex"===base&&(base=16),r(base===(0|base)&&base>=2&&base<=36);var n=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&n++,16===base?this._parseHex(e,n):this._parseBase(e,base,n),"-"===e[0]&&(this.negative=1),this.strip(),"le"===t&&this._initArray(this.toArray(),base,t)},c.prototype._initNumber=function(e,base,t){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(r(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===t&&this._initArray(this.toArray(),base,t)},c.prototype._initArray=function(e,base,t){if(r("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i=0;i-=3)o=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[n]|=o<>>26-c&67108863,(c+=24)>=26&&(c-=26,n++);else if("le"===t)for(i=0,n=0;i>>26-c&67108863,(c+=24)>=26&&(c-=26,n++);return this.strip()},c.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var i=0;i=t;i-=6)r=d(e,i,i+6),this.words[n]|=r<>>26-o&4194303,(o+=24)>=26&&(o-=26,n++);i+6!==t&&(r=d(e,t,i+6),this.words[n]|=r<>>26-o&4194303),this.strip()},c.prototype._parseBase=function(e,base,t){this.words=[0],this.length=1;for(var n=0,r=1;r<=67108863;r*=base)n++;n--,r=r/base|0;for(var o=e.length-t,c=o%n,l=Math.min(o,o-c)+t,d=0,i=t;i1&&0===this.words[this.length-1];)this.length--;return this._normSign()},c.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},c.prototype.inspect=function(){return(this.red?""};var h=["","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"],A=[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],m=[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 v(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var a=0|e.words[0],b=0|t.words[0],o=a*b,c=67108863&o,l=o/67108864|0;n.words[0]=c;for(var d=1;d>>26,h=67108863&l,A=Math.min(d,t.length-1),m=Math.max(0,d-e.length+1);m<=A;m++){var i=d-m|0;f+=(o=(a=0|e.words[i])*(b=0|t.words[m])+h)/67108864|0,h=67108863&o}n.words[d]=0|h,l=0|f}return 0!==l?n.words[d]=0|l:n.length--,n.strip()}c.prototype.toString=function(base,e){var t;if(e=0|e||1,16===(base=base||10)||"hex"===base){t="";for(var n=0,o=0,i=0;i>>24-n&16777215)||i!==this.length-1?h[6-l.length]+l+t:l+t,(n+=2)>=26&&(n-=26,i--)}for(0!==o&&(t=o.toString(16)+t);t.length%e!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t}if(base===(0|base)&&base>=2&&base<=36){var d=A[base],f=m[base];t="";var v=this.clone();for(v.negative=0;!v.isZero();){var y=v.modn(f).toString(base);t=(v=v.idivn(f)).isZero()?y+t:h[d-y.length]+y+t}for(this.isZero()&&(t="0"+t);t.length%e!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t}r(!1,"Base should be between 2 and 36")},c.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&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},c.prototype.toJSON=function(){return this.toString(16)},c.prototype.toBuffer=function(e,t){return r(void 0!==l),this.toArrayLike(l,e,t)},c.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},c.prototype.toArrayLike=function(e,t,n){var o=this.byteLength(),c=n||Math.max(1,o);r(o<=c,"byte array longer than desired length"),r(c>0,"Requested array length <= 0"),this.strip();var b,i,l="le"===t,d=new e(c),q=this.clone();if(l){for(i=0;!q.isZero();i++)b=q.andln(255),q.iushrn(8),d[i]=b;for(;i=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},c.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 0==(8191&t)&&(n+=13,t>>>=13),0==(127&t)&&(n+=7,t>>>=7),0==(15&t)&&(n+=4,t>>>=4),0==(3&t)&&(n+=2,t>>>=2),0==(1&t)&&n++,n},c.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},c.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,i=0;ie.length?this.clone().ior(e):e.clone().ior(this)},c.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},c.prototype.iuand=function(e){var b;b=this.length>e.length?e:this;for(var i=0;ie.length?this.clone().iand(e):e.clone().iand(this)},c.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},c.prototype.iuxor=function(e){var a,b;this.length>e.length?(a=this,b=e):(a=e,b=this);for(var i=0;ie.length?this.clone().ixor(e):e.clone().ixor(this)},c.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},c.prototype.inotn=function(e){r("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-n),this.strip()},c.prototype.notn=function(e){return this.clone().inotn(e)},c.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);var n=e/26|0,o=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<e.length?(a=this,b=e):(a=e,b=this);for(var n=0,i=0;i>>26;for(;0!==n&&i>>26;if(this.length=a.length,0!==n)this.words[this.length]=n,this.length++;else if(a!==this)for(;ie.length?this.clone().iadd(e):e.clone().iadd(this)},c.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var a,b,n=this.cmp(e);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(a=this,b=e):(a=e,b=this);for(var r=0,i=0;i>26,this.words[i]=67108863&t;for(;0!==r&&i>26,this.words[i]=67108863&t;if(0===r&&i>>13,m=0|a[1],v=8191&m,y=m>>>13,I=0|a[2],w=8191&I,_=I>>>13,C=0|a[3],S=8191&C,E=C>>>13,B=0|a[4],k=8191&B,O=B>>>13,R=0|a[5],P=8191&R,x=R>>>13,M=0|a[6],Q=8191&M,N=M>>>13,D=0|a[7],T=8191&D,j=D>>>13,U=0|a[8],J=8191&U,H=U>>>13,F=0|a[9],L=8191&F,G=F>>>13,V=0|b[0],W=8191&V,Y=V>>>13,K=0|b[1],Z=8191&K,z=K>>>13,X=0|b[2],$=8191&X,ee=X>>>13,te=0|b[3],ne=8191&te,re=te>>>13,oe=0|b[4],ie=8191&oe,ae=oe>>>13,se=0|b[5],ce=8191&se,ue=se>>>13,le=0|b[6],de=8191&le,fe=le>>>13,he=0|b[7],pe=8191&he,ge=he>>>13,Ae=0|b[8],me=8191&Ae,ve=Ae>>>13,ye=0|b[9],be=8191&ye,Ie=ye>>>13;n.negative=e.negative^t.negative,n.length=19;var we=(d+(r=Math.imul(h,W))|0)+((8191&(o=(o=Math.imul(h,Y))+Math.imul(A,W)|0))<<13)|0;d=((c=Math.imul(A,Y))+(o>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(v,W),o=(o=Math.imul(v,Y))+Math.imul(y,W)|0,c=Math.imul(y,Y);var _e=(d+(r=r+Math.imul(h,Z)|0)|0)+((8191&(o=(o=o+Math.imul(h,z)|0)+Math.imul(A,Z)|0))<<13)|0;d=((c=c+Math.imul(A,z)|0)+(o>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(w,W),o=(o=Math.imul(w,Y))+Math.imul(_,W)|0,c=Math.imul(_,Y),r=r+Math.imul(v,Z)|0,o=(o=o+Math.imul(v,z)|0)+Math.imul(y,Z)|0,c=c+Math.imul(y,z)|0;var Ce=(d+(r=r+Math.imul(h,$)|0)|0)+((8191&(o=(o=o+Math.imul(h,ee)|0)+Math.imul(A,$)|0))<<13)|0;d=((c=c+Math.imul(A,ee)|0)+(o>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(S,W),o=(o=Math.imul(S,Y))+Math.imul(E,W)|0,c=Math.imul(E,Y),r=r+Math.imul(w,Z)|0,o=(o=o+Math.imul(w,z)|0)+Math.imul(_,Z)|0,c=c+Math.imul(_,z)|0,r=r+Math.imul(v,$)|0,o=(o=o+Math.imul(v,ee)|0)+Math.imul(y,$)|0,c=c+Math.imul(y,ee)|0;var Se=(d+(r=r+Math.imul(h,ne)|0)|0)+((8191&(o=(o=o+Math.imul(h,re)|0)+Math.imul(A,ne)|0))<<13)|0;d=((c=c+Math.imul(A,re)|0)+(o>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(k,W),o=(o=Math.imul(k,Y))+Math.imul(O,W)|0,c=Math.imul(O,Y),r=r+Math.imul(S,Z)|0,o=(o=o+Math.imul(S,z)|0)+Math.imul(E,Z)|0,c=c+Math.imul(E,z)|0,r=r+Math.imul(w,$)|0,o=(o=o+Math.imul(w,ee)|0)+Math.imul(_,$)|0,c=c+Math.imul(_,ee)|0,r=r+Math.imul(v,ne)|0,o=(o=o+Math.imul(v,re)|0)+Math.imul(y,ne)|0,c=c+Math.imul(y,re)|0;var Ee=(d+(r=r+Math.imul(h,ie)|0)|0)+((8191&(o=(o=o+Math.imul(h,ae)|0)+Math.imul(A,ie)|0))<<13)|0;d=((c=c+Math.imul(A,ae)|0)+(o>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(P,W),o=(o=Math.imul(P,Y))+Math.imul(x,W)|0,c=Math.imul(x,Y),r=r+Math.imul(k,Z)|0,o=(o=o+Math.imul(k,z)|0)+Math.imul(O,Z)|0,c=c+Math.imul(O,z)|0,r=r+Math.imul(S,$)|0,o=(o=o+Math.imul(S,ee)|0)+Math.imul(E,$)|0,c=c+Math.imul(E,ee)|0,r=r+Math.imul(w,ne)|0,o=(o=o+Math.imul(w,re)|0)+Math.imul(_,ne)|0,c=c+Math.imul(_,re)|0,r=r+Math.imul(v,ie)|0,o=(o=o+Math.imul(v,ae)|0)+Math.imul(y,ie)|0,c=c+Math.imul(y,ae)|0;var Be=(d+(r=r+Math.imul(h,ce)|0)|0)+((8191&(o=(o=o+Math.imul(h,ue)|0)+Math.imul(A,ce)|0))<<13)|0;d=((c=c+Math.imul(A,ue)|0)+(o>>>13)|0)+(Be>>>26)|0,Be&=67108863,r=Math.imul(Q,W),o=(o=Math.imul(Q,Y))+Math.imul(N,W)|0,c=Math.imul(N,Y),r=r+Math.imul(P,Z)|0,o=(o=o+Math.imul(P,z)|0)+Math.imul(x,Z)|0,c=c+Math.imul(x,z)|0,r=r+Math.imul(k,$)|0,o=(o=o+Math.imul(k,ee)|0)+Math.imul(O,$)|0,c=c+Math.imul(O,ee)|0,r=r+Math.imul(S,ne)|0,o=(o=o+Math.imul(S,re)|0)+Math.imul(E,ne)|0,c=c+Math.imul(E,re)|0,r=r+Math.imul(w,ie)|0,o=(o=o+Math.imul(w,ae)|0)+Math.imul(_,ie)|0,c=c+Math.imul(_,ae)|0,r=r+Math.imul(v,ce)|0,o=(o=o+Math.imul(v,ue)|0)+Math.imul(y,ce)|0,c=c+Math.imul(y,ue)|0;var ke=(d+(r=r+Math.imul(h,de)|0)|0)+((8191&(o=(o=o+Math.imul(h,fe)|0)+Math.imul(A,de)|0))<<13)|0;d=((c=c+Math.imul(A,fe)|0)+(o>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(T,W),o=(o=Math.imul(T,Y))+Math.imul(j,W)|0,c=Math.imul(j,Y),r=r+Math.imul(Q,Z)|0,o=(o=o+Math.imul(Q,z)|0)+Math.imul(N,Z)|0,c=c+Math.imul(N,z)|0,r=r+Math.imul(P,$)|0,o=(o=o+Math.imul(P,ee)|0)+Math.imul(x,$)|0,c=c+Math.imul(x,ee)|0,r=r+Math.imul(k,ne)|0,o=(o=o+Math.imul(k,re)|0)+Math.imul(O,ne)|0,c=c+Math.imul(O,re)|0,r=r+Math.imul(S,ie)|0,o=(o=o+Math.imul(S,ae)|0)+Math.imul(E,ie)|0,c=c+Math.imul(E,ae)|0,r=r+Math.imul(w,ce)|0,o=(o=o+Math.imul(w,ue)|0)+Math.imul(_,ce)|0,c=c+Math.imul(_,ue)|0,r=r+Math.imul(v,de)|0,o=(o=o+Math.imul(v,fe)|0)+Math.imul(y,de)|0,c=c+Math.imul(y,fe)|0;var Oe=(d+(r=r+Math.imul(h,pe)|0)|0)+((8191&(o=(o=o+Math.imul(h,ge)|0)+Math.imul(A,pe)|0))<<13)|0;d=((c=c+Math.imul(A,ge)|0)+(o>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,r=Math.imul(J,W),o=(o=Math.imul(J,Y))+Math.imul(H,W)|0,c=Math.imul(H,Y),r=r+Math.imul(T,Z)|0,o=(o=o+Math.imul(T,z)|0)+Math.imul(j,Z)|0,c=c+Math.imul(j,z)|0,r=r+Math.imul(Q,$)|0,o=(o=o+Math.imul(Q,ee)|0)+Math.imul(N,$)|0,c=c+Math.imul(N,ee)|0,r=r+Math.imul(P,ne)|0,o=(o=o+Math.imul(P,re)|0)+Math.imul(x,ne)|0,c=c+Math.imul(x,re)|0,r=r+Math.imul(k,ie)|0,o=(o=o+Math.imul(k,ae)|0)+Math.imul(O,ie)|0,c=c+Math.imul(O,ae)|0,r=r+Math.imul(S,ce)|0,o=(o=o+Math.imul(S,ue)|0)+Math.imul(E,ce)|0,c=c+Math.imul(E,ue)|0,r=r+Math.imul(w,de)|0,o=(o=o+Math.imul(w,fe)|0)+Math.imul(_,de)|0,c=c+Math.imul(_,fe)|0,r=r+Math.imul(v,pe)|0,o=(o=o+Math.imul(v,ge)|0)+Math.imul(y,pe)|0,c=c+Math.imul(y,ge)|0;var Re=(d+(r=r+Math.imul(h,me)|0)|0)+((8191&(o=(o=o+Math.imul(h,ve)|0)+Math.imul(A,me)|0))<<13)|0;d=((c=c+Math.imul(A,ve)|0)+(o>>>13)|0)+(Re>>>26)|0,Re&=67108863,r=Math.imul(L,W),o=(o=Math.imul(L,Y))+Math.imul(G,W)|0,c=Math.imul(G,Y),r=r+Math.imul(J,Z)|0,o=(o=o+Math.imul(J,z)|0)+Math.imul(H,Z)|0,c=c+Math.imul(H,z)|0,r=r+Math.imul(T,$)|0,o=(o=o+Math.imul(T,ee)|0)+Math.imul(j,$)|0,c=c+Math.imul(j,ee)|0,r=r+Math.imul(Q,ne)|0,o=(o=o+Math.imul(Q,re)|0)+Math.imul(N,ne)|0,c=c+Math.imul(N,re)|0,r=r+Math.imul(P,ie)|0,o=(o=o+Math.imul(P,ae)|0)+Math.imul(x,ie)|0,c=c+Math.imul(x,ae)|0,r=r+Math.imul(k,ce)|0,o=(o=o+Math.imul(k,ue)|0)+Math.imul(O,ce)|0,c=c+Math.imul(O,ue)|0,r=r+Math.imul(S,de)|0,o=(o=o+Math.imul(S,fe)|0)+Math.imul(E,de)|0,c=c+Math.imul(E,fe)|0,r=r+Math.imul(w,pe)|0,o=(o=o+Math.imul(w,ge)|0)+Math.imul(_,pe)|0,c=c+Math.imul(_,ge)|0,r=r+Math.imul(v,me)|0,o=(o=o+Math.imul(v,ve)|0)+Math.imul(y,me)|0,c=c+Math.imul(y,ve)|0;var Pe=(d+(r=r+Math.imul(h,be)|0)|0)+((8191&(o=(o=o+Math.imul(h,Ie)|0)+Math.imul(A,be)|0))<<13)|0;d=((c=c+Math.imul(A,Ie)|0)+(o>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,r=Math.imul(L,Z),o=(o=Math.imul(L,z))+Math.imul(G,Z)|0,c=Math.imul(G,z),r=r+Math.imul(J,$)|0,o=(o=o+Math.imul(J,ee)|0)+Math.imul(H,$)|0,c=c+Math.imul(H,ee)|0,r=r+Math.imul(T,ne)|0,o=(o=o+Math.imul(T,re)|0)+Math.imul(j,ne)|0,c=c+Math.imul(j,re)|0,r=r+Math.imul(Q,ie)|0,o=(o=o+Math.imul(Q,ae)|0)+Math.imul(N,ie)|0,c=c+Math.imul(N,ae)|0,r=r+Math.imul(P,ce)|0,o=(o=o+Math.imul(P,ue)|0)+Math.imul(x,ce)|0,c=c+Math.imul(x,ue)|0,r=r+Math.imul(k,de)|0,o=(o=o+Math.imul(k,fe)|0)+Math.imul(O,de)|0,c=c+Math.imul(O,fe)|0,r=r+Math.imul(S,pe)|0,o=(o=o+Math.imul(S,ge)|0)+Math.imul(E,pe)|0,c=c+Math.imul(E,ge)|0,r=r+Math.imul(w,me)|0,o=(o=o+Math.imul(w,ve)|0)+Math.imul(_,me)|0,c=c+Math.imul(_,ve)|0;var xe=(d+(r=r+Math.imul(v,be)|0)|0)+((8191&(o=(o=o+Math.imul(v,Ie)|0)+Math.imul(y,be)|0))<<13)|0;d=((c=c+Math.imul(y,Ie)|0)+(o>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(L,$),o=(o=Math.imul(L,ee))+Math.imul(G,$)|0,c=Math.imul(G,ee),r=r+Math.imul(J,ne)|0,o=(o=o+Math.imul(J,re)|0)+Math.imul(H,ne)|0,c=c+Math.imul(H,re)|0,r=r+Math.imul(T,ie)|0,o=(o=o+Math.imul(T,ae)|0)+Math.imul(j,ie)|0,c=c+Math.imul(j,ae)|0,r=r+Math.imul(Q,ce)|0,o=(o=o+Math.imul(Q,ue)|0)+Math.imul(N,ce)|0,c=c+Math.imul(N,ue)|0,r=r+Math.imul(P,de)|0,o=(o=o+Math.imul(P,fe)|0)+Math.imul(x,de)|0,c=c+Math.imul(x,fe)|0,r=r+Math.imul(k,pe)|0,o=(o=o+Math.imul(k,ge)|0)+Math.imul(O,pe)|0,c=c+Math.imul(O,ge)|0,r=r+Math.imul(S,me)|0,o=(o=o+Math.imul(S,ve)|0)+Math.imul(E,me)|0,c=c+Math.imul(E,ve)|0;var Me=(d+(r=r+Math.imul(w,be)|0)|0)+((8191&(o=(o=o+Math.imul(w,Ie)|0)+Math.imul(_,be)|0))<<13)|0;d=((c=c+Math.imul(_,Ie)|0)+(o>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(L,ne),o=(o=Math.imul(L,re))+Math.imul(G,ne)|0,c=Math.imul(G,re),r=r+Math.imul(J,ie)|0,o=(o=o+Math.imul(J,ae)|0)+Math.imul(H,ie)|0,c=c+Math.imul(H,ae)|0,r=r+Math.imul(T,ce)|0,o=(o=o+Math.imul(T,ue)|0)+Math.imul(j,ce)|0,c=c+Math.imul(j,ue)|0,r=r+Math.imul(Q,de)|0,o=(o=o+Math.imul(Q,fe)|0)+Math.imul(N,de)|0,c=c+Math.imul(N,fe)|0,r=r+Math.imul(P,pe)|0,o=(o=o+Math.imul(P,ge)|0)+Math.imul(x,pe)|0,c=c+Math.imul(x,ge)|0,r=r+Math.imul(k,me)|0,o=(o=o+Math.imul(k,ve)|0)+Math.imul(O,me)|0,c=c+Math.imul(O,ve)|0;var Qe=(d+(r=r+Math.imul(S,be)|0)|0)+((8191&(o=(o=o+Math.imul(S,Ie)|0)+Math.imul(E,be)|0))<<13)|0;d=((c=c+Math.imul(E,Ie)|0)+(o>>>13)|0)+(Qe>>>26)|0,Qe&=67108863,r=Math.imul(L,ie),o=(o=Math.imul(L,ae))+Math.imul(G,ie)|0,c=Math.imul(G,ae),r=r+Math.imul(J,ce)|0,o=(o=o+Math.imul(J,ue)|0)+Math.imul(H,ce)|0,c=c+Math.imul(H,ue)|0,r=r+Math.imul(T,de)|0,o=(o=o+Math.imul(T,fe)|0)+Math.imul(j,de)|0,c=c+Math.imul(j,fe)|0,r=r+Math.imul(Q,pe)|0,o=(o=o+Math.imul(Q,ge)|0)+Math.imul(N,pe)|0,c=c+Math.imul(N,ge)|0,r=r+Math.imul(P,me)|0,o=(o=o+Math.imul(P,ve)|0)+Math.imul(x,me)|0,c=c+Math.imul(x,ve)|0;var Ne=(d+(r=r+Math.imul(k,be)|0)|0)+((8191&(o=(o=o+Math.imul(k,Ie)|0)+Math.imul(O,be)|0))<<13)|0;d=((c=c+Math.imul(O,Ie)|0)+(o>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,r=Math.imul(L,ce),o=(o=Math.imul(L,ue))+Math.imul(G,ce)|0,c=Math.imul(G,ue),r=r+Math.imul(J,de)|0,o=(o=o+Math.imul(J,fe)|0)+Math.imul(H,de)|0,c=c+Math.imul(H,fe)|0,r=r+Math.imul(T,pe)|0,o=(o=o+Math.imul(T,ge)|0)+Math.imul(j,pe)|0,c=c+Math.imul(j,ge)|0,r=r+Math.imul(Q,me)|0,o=(o=o+Math.imul(Q,ve)|0)+Math.imul(N,me)|0,c=c+Math.imul(N,ve)|0;var De=(d+(r=r+Math.imul(P,be)|0)|0)+((8191&(o=(o=o+Math.imul(P,Ie)|0)+Math.imul(x,be)|0))<<13)|0;d=((c=c+Math.imul(x,Ie)|0)+(o>>>13)|0)+(De>>>26)|0,De&=67108863,r=Math.imul(L,de),o=(o=Math.imul(L,fe))+Math.imul(G,de)|0,c=Math.imul(G,fe),r=r+Math.imul(J,pe)|0,o=(o=o+Math.imul(J,ge)|0)+Math.imul(H,pe)|0,c=c+Math.imul(H,ge)|0,r=r+Math.imul(T,me)|0,o=(o=o+Math.imul(T,ve)|0)+Math.imul(j,me)|0,c=c+Math.imul(j,ve)|0;var Te=(d+(r=r+Math.imul(Q,be)|0)|0)+((8191&(o=(o=o+Math.imul(Q,Ie)|0)+Math.imul(N,be)|0))<<13)|0;d=((c=c+Math.imul(N,Ie)|0)+(o>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(L,pe),o=(o=Math.imul(L,ge))+Math.imul(G,pe)|0,c=Math.imul(G,ge),r=r+Math.imul(J,me)|0,o=(o=o+Math.imul(J,ve)|0)+Math.imul(H,me)|0,c=c+Math.imul(H,ve)|0;var je=(d+(r=r+Math.imul(T,be)|0)|0)+((8191&(o=(o=o+Math.imul(T,Ie)|0)+Math.imul(j,be)|0))<<13)|0;d=((c=c+Math.imul(j,Ie)|0)+(o>>>13)|0)+(je>>>26)|0,je&=67108863,r=Math.imul(L,me),o=(o=Math.imul(L,ve))+Math.imul(G,me)|0,c=Math.imul(G,ve);var Ue=(d+(r=r+Math.imul(J,be)|0)|0)+((8191&(o=(o=o+Math.imul(J,Ie)|0)+Math.imul(H,be)|0))<<13)|0;d=((c=c+Math.imul(H,Ie)|0)+(o>>>13)|0)+(Ue>>>26)|0,Ue&=67108863;var Je=(d+(r=Math.imul(L,be))|0)+((8191&(o=(o=Math.imul(L,Ie))+Math.imul(G,be)|0))<<13)|0;return d=((c=Math.imul(G,Ie))+(o>>>13)|0)+(Je>>>26)|0,Je&=67108863,l[0]=we,l[1]=_e,l[2]=Ce,l[3]=Se,l[4]=Ee,l[5]=Be,l[6]=ke,l[7]=Oe,l[8]=Re,l[9]=Pe,l[10]=xe,l[11]=Me,l[12]=Qe,l[13]=Ne,l[14]=De,l[15]=Te,l[16]=je,l[17]=Ue,l[18]=Je,0!==d&&(l[19]=d,n.length++),n};function I(e,t,n){return(new w).mulp(e,t,n)}function w(e,t){this.x=e,this.y=t}Math.imul||(y=v),c.prototype.mulTo=function(e,t){var n,r=this.length+e.length;return n=10===this.length&&10===e.length?y(this,e,t):r<63?v(this,e,t):r<1024?function(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,o=0,c=0;c>>26)|0)>>>26,l&=67108863}n.words[c]=d,r=l,l=o}return 0!==r?n.words[c]=r:n.length--,n.strip()}(this,e,t):I(this,e,t),n},w.prototype.makeRBT=function(e){for(var t=new Array(e),n=c.prototype._countBits(e)-1,i=0;i>=1;return r},w.prototype.permute=function(e,t,n,r,o,c){for(var i=0;i>>=1)i++;return 1<>>=13,n[2*i+1]=8191&c,c>>>=13;for(i=2*t;i>=26,t+=n/67108864|0,t+=o>>>26,this.words[i]=67108863&o}return 0!==t&&(this.words[i]=t,this.length++),this},c.prototype.muln=function(e){return this.clone().imuln(e)},c.prototype.sqr=function(){return this.mul(this)},c.prototype.isqr=function(){return this.imul(this.clone())},c.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n>>o}return t}(e);if(0===t.length)return new c(1);for(var n=this,i=0;i=0);var i,t=e%26,s=(e-t)/26,n=67108863>>>26-t<<26-t;if(0!==t){var o=0;for(i=0;i>>26-t}o&&(this.words[i]=o,this.length++)}if(0!==s){for(i=this.length-1;i>=0;i--)this.words[i+s]=this.words[i];for(i=0;i=0),o=t?(t-t%26)/26:0;var c=e%26,s=Math.min((e-c)/26,this.length),mask=67108863^67108863>>>c<s)for(this.length-=s,i=0;i=0&&(0!==d||i>=o);i--){var f=0|this.words[i];this.words[i]=d<<26-c|f>>>c,d=f&mask}return l&&0!==d&&(l.words[l.length++]=d),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},c.prototype.ishrn=function(e,t,n){return r(0===this.negative),this.iushrn(e,t,n)},c.prototype.shln=function(e){return this.clone().ishln(e)},c.prototype.ushln=function(e){return this.clone().iushln(e)},c.prototype.shrn=function(e){return this.clone().ishrn(e)},c.prototype.ushrn=function(e){return this.clone().iushrn(e)},c.prototype.testn=function(e){r("number"==typeof e&&e>=0);var t=e%26,s=(e-t)/26,q=1<=0);var t=e%26,s=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=s)return this;if(0!==t&&s++,this.length=Math.min(s,this.length),0!==t){var mask=67108863^67108863>>>t<=67108864;i++)this.words[i]-=67108864,i===this.length-1?this.words[i+1]=1:this.words[i+1]++;return this.length=Math.max(this.length,i+1),this},c.prototype.isubn=function(e){if(r("number"==typeof e),r(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 i=0;i>26)-(d/67108864|0),this.words[i+n]=67108863&o}for(;i>26,this.words[i+n]=67108863&o;if(0===l)return this.strip();for(r(-1===l),l=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},c.prototype._wordDiv=function(e,t){var n=(this.length,e.length),a=this.clone(),b=e,r=0|b.words[b.length-1];0!==(n=26-this._countBits(r))&&(b=b.ushln(n),a.iushln(n),r=0|b.words[b.length-1]);var q,o=a.length-b.length;if("mod"!==t){(q=new c(null)).length=o+1,q.words=new Array(q.length);for(var i=0;i=0;d--){var f=67108864*(0|a.words[b.length+d])+(0|a.words[b.length+d-1]);for(f=Math.min(f/r|0,67108863),a._ishlnsubmul(b,f,d);0!==a.negative;)f--,a.negative=0,a._ishlnsubmul(b,1,d),a.isZero()||(a.negative^=1);q&&(q.words[d]=f)}return q&&q.strip(),a.strip(),"div"!==t&&0!==n&&a.iushrn(n),{div:q||null,mod:a}},c.prototype.divmod=function(e,t,n){return r(!e.isZero()),this.isZero()?{div:new c(0),mod:new c(0)}:0!==this.negative&&0===e.negative?(l=this.neg().divmod(e,t),"mod"!==t&&(div=l.div.neg()),"div"!==t&&(o=l.mod.neg(),n&&0!==o.negative&&o.iadd(e)),{div:div,mod:o}):0===this.negative&&0!==e.negative?(l=this.divmod(e.neg(),t),"mod"!==t&&(div=l.div.neg()),{div:div,mod:l.mod}):0!=(this.negative&e.negative)?(l=this.neg().divmod(e.neg(),t),"div"!==t&&(o=l.mod.neg(),n&&0!==o.negative&&o.isub(e)),{div:l.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new c(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new c(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new c(this.modn(e.words[0]))}:this._wordDiv(e,t);var div,o,l},c.prototype.div=function(e){return this.divmod(e,"div",!1).div},c.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},c.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},c.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),o=e.andln(1),c=n.cmp(r);return c<0||1===o&&0===c?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},c.prototype.modn=function(e){r(e<=67108863);for(var p=(1<<26)%e,t=0,i=this.length-1;i>=0;i--)t=(p*t+(0|this.words[i]))%e;return t},c.prototype.idivn=function(e){r(e<=67108863);for(var t=0,i=this.length-1;i>=0;i--){var n=(0|this.words[i])+67108864*t;this.words[i]=n/e|0,t=n%e}return this.strip()},c.prototype.divn=function(e){return this.clone().idivn(e)},c.prototype.egcd=function(p){r(0===p.negative),r(!p.isZero());var e=this,t=p.clone();e=0!==e.negative?e.umod(p):e.clone();for(var n=new c(1),o=new c(0),l=new c(0),d=new c(1),g=0;e.isEven()&&t.isEven();)e.iushrn(1),t.iushrn(1),++g;for(var f=t.clone(),h=e.clone();!e.isZero();){for(var i=0,A=1;0==(e.words[0]&A)&&i<26;++i,A<<=1);if(i>0)for(e.iushrn(i);i-- >0;)(n.isOdd()||o.isOdd())&&(n.iadd(f),o.isub(h)),n.iushrn(1),o.iushrn(1);for(var m=0,v=1;0==(t.words[0]&v)&&m<26;++m,v<<=1);if(m>0)for(t.iushrn(m);m-- >0;)(l.isOdd()||d.isOdd())&&(l.iadd(f),d.isub(h)),l.iushrn(1),d.iushrn(1);e.cmp(t)>=0?(e.isub(t),n.isub(l),o.isub(d)):(t.isub(e),l.isub(n),d.isub(o))}return{a:l,b:d,gcd:t.iushln(g)}},c.prototype._invmp=function(p){r(0===p.negative),r(!p.isZero());var a=this,b=p.clone();a=0!==a.negative?a.umod(p):a.clone();for(var e,t=new c(1),n=new c(0),o=b.clone();a.cmpn(1)>0&&b.cmpn(1)>0;){for(var i=0,l=1;0==(a.words[0]&l)&&i<26;++i,l<<=1);if(i>0)for(a.iushrn(i);i-- >0;)t.isOdd()&&t.iadd(o),t.iushrn(1);for(var d=0,f=1;0==(b.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(b.iushrn(d);d-- >0;)n.isOdd()&&n.iadd(o),n.iushrn(1);a.cmp(b)>=0?(a.isub(b),t.isub(n)):(b.isub(a),n.isub(t))}return(e=0===a.cmpn(1)?t:n).cmpn(0)<0&&e.iadd(p),e},c.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var a=this.clone(),b=e.clone();a.negative=0,b.negative=0;for(var t=0;a.isEven()&&b.isEven();t++)a.iushrn(1),b.iushrn(1);for(;;){for(;a.isEven();)a.iushrn(1);for(;b.isEven();)b.iushrn(1);var n=a.cmp(b);if(n<0){var r=a;a=b,b=r}else if(0===n||0===b.cmpn(1))break;a.isub(b)}return b.iushln(t)},c.prototype.invm=function(e){return this.egcd(e).a.umod(e)},c.prototype.isEven=function(){return 0==(1&this.words[0])},c.prototype.isOdd=function(){return 1==(1&this.words[0])},c.prototype.andln=function(e){return this.words[0]&e},c.prototype.bincn=function(e){r("number"==typeof e);var t=e%26,s=(e-t)/26,q=1<>>26,o&=67108863,this.words[i]=o}return 0!==n&&(this.words[i]=n,this.length++),this},c.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},c.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)t=1;else{n&&(e=-e),r(e<=67108863,"Number is too big");var o=0|this.words[0];t=o===e?0:oe.length)return 1;if(this.length=0;i--){var a=0|this.words[i],b=0|e.words[i];if(a!==b){ab&&(t=1);break}}return t},c.prototype.gtn=function(e){return 1===this.cmpn(e)},c.prototype.gt=function(e){return 1===this.cmp(e)},c.prototype.gten=function(e){return this.cmpn(e)>=0},c.prototype.gte=function(e){return this.cmp(e)>=0},c.prototype.ltn=function(e){return-1===this.cmpn(e)},c.prototype.lt=function(e){return-1===this.cmp(e)},c.prototype.lten=function(e){return this.cmpn(e)<=0},c.prototype.lte=function(e){return this.cmp(e)<=0},c.prototype.eqn=function(e){return 0===this.cmpn(e)},c.prototype.eq=function(e){return 0===this.cmp(e)},c.red=function(e){return new O(e)},c.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},c.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},c.prototype._forceRed=function(e){return this.red=e,this},c.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},c.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},c.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},c.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},c.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},c.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},c.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},c.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},c.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},c.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},c.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},c.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},c.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},c.prototype.redPow=function(e){return r(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 C(e,p){this.name=e,this.p=new c(p,16),this.n=this.p.bitLength(),this.k=new c(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function S(){C.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function E(){C.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function B(){C.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function k(){C.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function O(e){if("string"==typeof e){var t=c._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function R(e){O.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new c(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)}C.prototype._tmp=function(){var e=new c(null);return e.words=new Array(Math.ceil(this.n/13)),e},C.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t0?n.isub(this.p):n.strip(),n},C.prototype.split=function(input,e){input.iushrn(this.n,0,e)},C.prototype.imulK=function(e){return e.imul(this.k)},o(S,C),S.prototype.split=function(input,output){for(var mask=4194303,e=Math.min(input.length,9),i=0;i>>22,t=n}t>>>=22,input.words[i-10]=t,0===t&&input.length>10?input.length-=10:input.length-=9},S.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,i=0;i>>=26,e.words[i]=r,t=n}return 0!==t&&(e.words[e.length++]=t),e},c._prime=function(e){if(_[e])return _[e];var t;if("k256"===e)t=new S;else if("p224"===e)t=new E;else if("p192"===e)t=new B;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new k}return _[e]=t,t},O.prototype._verify1=function(a){r(0===a.negative,"red works only with positives"),r(a.red,"red works only with red numbers")},O.prototype._verify2=function(a,b){r(0==(a.negative|b.negative),"red works only with positives"),r(a.red&&a.red===b.red,"red works only with red numbers")},O.prototype.imod=function(a){return this.prime?this.prime.ireduce(a)._forceRed(this):a.umod(this.m)._forceRed(this)},O.prototype.neg=function(a){return a.isZero()?a.clone():this.m.sub(a)._forceRed(this)},O.prototype.add=function(a,b){this._verify2(a,b);var e=a.add(b);return e.cmp(this.m)>=0&&e.isub(this.m),e._forceRed(this)},O.prototype.iadd=function(a,b){this._verify2(a,b);var e=a.iadd(b);return e.cmp(this.m)>=0&&e.isub(this.m),e},O.prototype.sub=function(a,b){this._verify2(a,b);var e=a.sub(b);return e.cmpn(0)<0&&e.iadd(this.m),e._forceRed(this)},O.prototype.isub=function(a,b){this._verify2(a,b);var e=a.isub(b);return e.cmpn(0)<0&&e.iadd(this.m),e},O.prototype.shl=function(a,e){return this._verify1(a),this.imod(a.ushln(e))},O.prototype.imul=function(a,b){return this._verify2(a,b),this.imod(a.imul(b))},O.prototype.mul=function(a,b){return this._verify2(a,b),this.imod(a.mul(b))},O.prototype.isqr=function(a){return this.imul(a,a.clone())},O.prototype.sqr=function(a){return this.mul(a,a)},O.prototype.sqrt=function(a){if(a.isZero())return a.clone();var e=this.m.andln(3);if(r(e%2==1),3===e){var t=this.m.add(new c(1)).iushrn(2);return this.pow(a,t)}for(var q=this.m.subn(1),s=0;!q.isZero()&&0===q.andln(1);)s++,q.iushrn(1);r(!q.isZero());var n=new c(1).toRed(this),o=n.redNeg(),l=this.m.subn(1).iushrn(1),d=this.m.bitLength();for(d=new c(2*d*d).toRed(this);0!==this.pow(d,l).cmp(o);)d.redIAdd(o);for(var f=this.pow(d,q),h=this.pow(a,q.addn(1).iushrn(1)),A=this.pow(a,q),m=s;0!==A.cmp(n);){for(var v=A,i=0;0!==v.cmp(n);i++)v=v.redSqr();r(i=0;i--){for(var d=e.words[i],f=l-1;f>=0;f--){var h=d>>f&1;n!==t[0]&&(n=this.sqr(n)),0!==h||0!==r?(r<<=1,r|=h,(4===++o||0===i&&0===f)&&(n=this.mul(n,t[r]),o=0,r=0)):o=0}l=26}return n},O.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},O.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},c.mont=function(e){return new R(e)},o(R,O),R.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},R.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},R.prototype.imul=function(a,b){if(a.isZero()||b.isZero())return a.words[0]=0,a.length=1,a;var e=a.imul(b),t=e.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),u=e.isub(t).iushrn(this.shift),n=u;return u.cmp(this.m)>=0?n=u.isub(this.m):u.cmpn(0)<0&&(n=u.iadd(this.m)),n._forceRed(this)},R.prototype.mul=function(a,b){if(a.isZero()||b.isZero())return new c(0)._forceRed(this);var e=a.mul(b),t=e.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),u=e.isub(t).iushrn(this.shift),n=u;return u.cmp(this.m)>=0?n=u.isub(this.m):u.cmpn(0)<0&&(n=u.iadd(this.m)),n._forceRed(this)},R.prototype.invm=function(a){return this.imod(a._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)}).call(this,n(113)(e))},,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){var r;!function(o){"use strict";var c,l=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,d=Math.ceil,f=Math.floor,h="[BigNumber Error] ",A=h+"Number primitive has more than 15 significant digits: ",m=1e14,v=14,y=9007199254740991,I=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],w=1e7,_=1e9;function C(e){var i=0|e;return e>0||e===i?i:i-1}function S(a){for(var s,e,i=1,t=a.length,n=a[0]+"";il^a?1:-1;for(o=(c=n.length)<(l=r.length)?c:l,i=0;ir[i]^a?1:-1;return c==l?0:c>l^a?1:-1}function B(e,t,n,r){if(en||e!==f(e))throw Error(h+(r||"Argument")+("number"==typeof e?en?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function k(e){var t=e.c.length-1;return C(e.e/v)==t&&e.c[t]%2!=0}function O(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function R(e,t,n){var r,o;if(t<0){for(o=n+".";++t;o+=n);e=o+e}else if(++t>(r=e.length)){for(o=n,t-=r;--t;o+=n);e+=o}else tL?w.c=w.e=null:e.e=10;i/=10,d++);return void(d>L?w.c=w.e=null:(w.e=d,w.c=[e]))}I=String(e)}else{if(!l.test(I=String(e)))return r(w,I,h);w.s=45==I.charCodeAt(0)?(I=I.slice(1),-1):1}(d=I.indexOf("."))>-1&&(I=I.replace(".","")),(i=I.search(/e/i))>0?(d<0&&(d=i),d+=+I.slice(i+1),I=I.substring(0,i)):d<0&&(d=I.length)}else{if(B(b,2,K.length,"Base"),10==b&&Z)return te(w=new z(e),j+w.e+1,U);if(I=String(e),h="number"==typeof e){if(0*e!=0)return r(w,I,h,b);if(w.s=1/e<0?(I=I.slice(1),-1):1,z.DEBUG&&I.replace(/^0\.0*|\./,"").length>15)throw Error(A+e)}else w.s=45===I.charCodeAt(0)?(I=I.slice(1),-1):1;for(t=K.slice(0,b),d=i=0,m=I.length;id){d=m;continue}}else if(!c&&(I==I.toUpperCase()&&(I=I.toLowerCase())||I==I.toLowerCase()&&(I=I.toUpperCase()))){c=!0,i=-1,d=0;continue}return r(w,String(e),h,b)}h=!1,(d=(I=n(I,b,10,w.s)).indexOf("."))>-1?I=I.replace(".",""):d=I.length}for(i=0;48===I.charCodeAt(i);i++);for(m=I.length;48===I.charCodeAt(--m););if(I=I.slice(i,++m)){if(m-=i,h&&z.DEBUG&&m>15&&(e>y||e!==f(e)))throw Error(A+w.s*e);if((d=d-i-1)>L)w.c=w.e=null;else if(d=H)?O(d,c):R(d,c,"0");else if(o=(e=te(new z(e),i,t)).e,l=(d=S(e.c)).length,1==n||2==n&&(i<=o||o<=J)){for(;ll){if(--i>0)for(d+=".";i--;d+="0");}else if((i+=o-l)>0)for(o+1==l&&(d+=".");i--;d+="0");return e.s<0&&r?"-"+d:d}function $(e,t){for(var n,i=1,r=new z(e[0]);i=10;r/=10,i++);return(n=i+n*v-1)>L?e.c=e.e=null:n=10;l/=10,o++);if((i=t-o)<0)i+=v,c=t,y=(h=w[A=0])/_[o-c-1]%10|0;else if((A=d((i+1)/v))>=w.length){if(!r)break e;for(;w.length<=A;w.push(0));h=y=0,o=1,c=(i%=v)-v+1}else{for(h=l=w[A],o=1;l>=10;l/=10,o++);y=(c=(i%=v)-v+o)<0?0:h/_[o-c-1]%10|0}if(r=r||t<0||null!=w[A+1]||(c<0?h:h%_[o-c-1]),r=n<4?(y||r)&&(0==n||n==(e.s<0?3:2)):y>5||5==y&&(4==n||r||6==n&&(i>0?c>0?h/_[o-c]:0:w[A-1])%10&1||n==(e.s<0?8:7)),t<1||!w[0])return w.length=0,r?(t-=e.e+1,w[0]=_[(v-t%v)%v],e.e=-t||0):w[0]=e.e=0,e;if(0==i?(w.length=A,l=1,A--):(w.length=A+1,l=_[v-i],w[A]=c>0?f(h/_[o-c]%_[c])*l:0),r)for(;;){if(0==A){for(i=1,c=w[0];c>=10;c/=10,i++);for(c=w[0]+=l,l=1;c>=10;c/=10,l++);i!=l&&(e.e++,w[0]==m&&(w[0]=1));break}if(w[A]+=l,w[A]!=m)break;w[A--]=0,l=1}for(i=w.length;0===w[--i];w.pop());}e.e>L?e.c=e.e=null:e.e=H?O(t,n):R(t,n,"0"),e.s<0?"-"+t:t)}return z.clone=e,z.ROUND_UP=0,z.ROUND_DOWN=1,z.ROUND_CEIL=2,z.ROUND_FLOOR=3,z.ROUND_HALF_UP=4,z.ROUND_HALF_DOWN=5,z.ROUND_HALF_EVEN=6,z.ROUND_HALF_CEIL=7,z.ROUND_HALF_FLOOR=8,z.EUCLID=9,z.config=z.set=function(e){var p,t;if(null!=e){if("object"!=typeof e)throw Error(h+"Object expected: "+e);if(e.hasOwnProperty(p="DECIMAL_PLACES")&&(B(t=e[p],0,_,p),j=t),e.hasOwnProperty(p="ROUNDING_MODE")&&(B(t=e[p],0,8,p),U=t),e.hasOwnProperty(p="EXPONENTIAL_AT")&&((t=e[p])&&t.pop?(B(t[0],-_,0,p),B(t[1],0,_,p),J=t[0],H=t[1]):(B(t,-_,_,p),J=-(H=t<0?-t:t))),e.hasOwnProperty(p="RANGE"))if((t=e[p])&&t.pop)B(t[0],-_,-1,p),B(t[1],1,_,p),F=t[0],L=t[1];else{if(B(t,-_,_,p),!t)throw Error(h+p+" cannot be zero: "+t);F=-(L=t<0?-t:t)}if(e.hasOwnProperty(p="CRYPTO")){if((t=e[p])!==!!t)throw Error(h+p+" not true or false: "+t);if(t){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw G=!t,Error(h+"crypto unavailable");G=t}else G=t}if(e.hasOwnProperty(p="MODULO_MODE")&&(B(t=e[p],0,9,p),V=t),e.hasOwnProperty(p="POW_PRECISION")&&(B(t=e[p],0,_,p),W=t),e.hasOwnProperty(p="FORMAT")){if("object"!=typeof(t=e[p]))throw Error(h+p+" not an object: "+t);Y=t}if(e.hasOwnProperty(p="ALPHABET")){if("string"!=typeof(t=e[p])||/^.?$|[+\-.\s]|(.).*\1/.test(t))throw Error(h+p+" invalid: "+t);Z="0123456789"==t.slice(0,10),K=t}}return{DECIMAL_PLACES:j,ROUNDING_MODE:U,EXPONENTIAL_AT:[J,H],RANGE:[F,L],CRYPTO:G,MODULO_MODE:V,POW_PRECISION:W,FORMAT:Y,ALPHABET:K}},z.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!z.DEBUG)return!0;var i,t,n=e.c,r=e.e,s=e.s;e:if("[object Array]"=={}.toString.call(n)){if((1===s||-1===s)&&r>=-_&&r<=_&&r===f(r)){if(0===n[0]){if(0===r&&1===n.length)return!0;break e}if((i=(r+1)%v)<1&&(i+=v),String(n[0]).length==i){for(i=0;i=m||t!==f(t))break e;if(0!==t)return!0}}}else if(null===n&&null===r&&(null===s||1===s||-1===s))return!0;throw Error(h+"Invalid BigNumber: "+e)},z.maximum=z.max=function(){return $(arguments,D.lt)},z.minimum=z.min=function(){return $(arguments,D.gt)},z.random=(o=9007199254740992,c=Math.random()*o&2097151?function(){return f(Math.random()*o)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var a,b,t,n,r,i=0,o=[],l=new z(T);if(null==e?e=j:B(e,0,_),n=d(e/v),G)if(crypto.getRandomValues){for(a=crypto.getRandomValues(new Uint32Array(n*=2));i>>11))>=9e15?(b=crypto.getRandomValues(new Uint32Array(2)),a[i]=b[0],a[i+1]=b[1]):(o.push(r%1e14),i+=2);i=n/2}else{if(!crypto.randomBytes)throw G=!1,Error(h+"crypto unavailable");for(a=crypto.randomBytes(n*=7);i=9e15?crypto.randomBytes(7).copy(a,i):(o.push(r%1e14),i+=7);i=n/7}if(!G)for(;i=10;r/=10,i++);in-1&&(null==l[o+1]&&(l[o+1]=0),l[o+1]+=l[o]/n|0,l[o]%=n)}return l.reverse()}return function(n,r,o,c,l){var d,f,h,A,m,v,y,I,i=n.indexOf("."),w=j,_=U;for(i>=0&&(A=W,W=0,n=n.replace(".",""),v=(I=new z(r)).pow(n.length-i),W=A,I.c=t(R(S(v.c),v.e,"0"),10,o,e),I.e=I.c.length),h=A=(y=t(n,r,o,l?(d=K,e):(d=e,K))).length;0==y[--A];y.pop());if(!y[0])return d.charAt(0);if(i<0?--h:(v.c=y,v.e=h,v.s=c,y=(v=div(v,I,w,_,o)).c,m=v.r,h=v.e),i=y[f=h+w+1],A=o/2,m=m||f<0||null!=y[f+1],m=_<4?(null!=i||m)&&(0==_||_==(v.s<0?3:2)):i>A||i==A&&(4==_||m||6==_&&1&y[f-1]||_==(v.s<0?8:7)),f<1||!y[0])n=m?R(d.charAt(1),-w,d.charAt(0)):d.charAt(0);else{if(y.length=f,m)for(--o;++y[--f]>o;)y[f]=0,f||(++h,y=[1].concat(y));for(A=y.length;!y[--A];);for(i=0,n="";i<=A;n+=d.charAt(y[i++]));n=R(n,h,d.charAt(0))}return n}}(),div=function(){function e(e,t,base){var n,r,o,c,l=0,i=e.length,d=t%w,f=t/w|0;for(e=e.slice();i--;)l=((r=d*(o=e[i]%w)+(n=f*o+(c=e[i]/w|0)*d)%w*w+l)/base|0)+(n/w|0)+f*c,e[i]=r%base;return l&&(e=[l].concat(e)),e}function t(a,b,e,t){var i,n;if(e!=t)n=e>t?1:-1;else for(i=n=0;ib[i]?1:-1;break}return n}function n(a,b,e,base){for(var i=0;e--;)a[e]-=i,i=a[e]1;a.splice(0,1));}return function(r,o,c,l,base){var d,h,i,A,y,I,w,q,_,S,E,B,k,O,R,P,x,s=r.s==o.s?1:-1,M=r.c,Q=o.c;if(!(M&&M[0]&&Q&&Q[0]))return new z(r.s&&o.s&&(M?!Q||M[0]!=Q[0]:Q)?M&&0==M[0]||!Q?0*s:s/0:NaN);for(_=(q=new z(s)).c=[],s=c+(h=r.e-o.e)+1,base||(base=m,h=C(r.e/v)-C(o.e/v),s=s/v|0),i=0;Q[i]==(M[i]||0);i++);if(Q[i]>(M[i]||0)&&h--,s<0)_.push(1),A=!0;else{for(O=M.length,P=Q.length,i=0,s+=2,(y=f(base/(Q[0]+1)))>1&&(Q=e(Q,y,base),M=e(M,y,base),P=Q.length,O=M.length),k=P,E=(S=M.slice(0,P)).length;E=base/2&&R++;do{if(y=0,(d=t(Q,S,P,E))<0){if(B=S[0],P!=E&&(B=B*base+(S[1]||0)),(y=f(B/R))>1)for(y>=base&&(y=base-1),w=(I=e(Q,y,base)).length,E=S.length;1==t(I,S,w,E);)y--,n(I,P=10;s/=10,i++);te(q,c+(q.e=i+h*v-1)+1,l,A)}else q.e=h,q.r=+A;return q}}(),P=/^(-?)0([xbo])(?=\w[\w.]*$)/i,x=/^([^.]+)\.$/,M=/^\.([^.]+)$/,Q=/^-?(Infinity|NaN)$/,N=/^\s*\+(?=[\w.])|^\s+|\s+$/g,r=function(e,t,n,b){var base,s=n?t:t.replace(N,"");if(Q.test(s))e.s=isNaN(s)?null:s<0?-1:1;else{if(!n&&(s=s.replace(P,(function(e,t,n){return base="x"==(n=n.toLowerCase())?16:"b"==n?2:8,b&&b!=base?e:t})),b&&(base=b,s=s.replace(x,"$1").replace(M,"0.$1")),t!=s))return new z(s,base);if(z.DEBUG)throw Error(h+"Not a"+(b?" base "+b:"")+" number: "+t);e.s=null}e.c=e.e=null},D.absoluteValue=D.abs=function(){var e=new z(this);return e.s<0&&(e.s=1),e},D.comparedTo=function(e,b){return E(this,new z(e,b))},D.decimalPlaces=D.dp=function(e,t){var n,r,o,c=this;if(null!=e)return B(e,0,_),null==t?t=U:B(t,0,8),te(new z(c),e+c.e+1,t);if(!(n=c.c))return null;if(r=((o=n.length-1)-C(this.e/v))*v,o=n[o])for(;o%10==0;o/=10,r--);return r<0&&(r=0),r},D.dividedBy=D.div=function(e,b){return div(this,new z(e,b),j,U)},D.dividedToIntegerBy=D.idiv=function(e,b){return div(this,new z(e,b),0,1)},D.exponentiatedBy=D.pow=function(e,t){var n,r,i,o,c,l,A,m,y=this;if((e=new z(e)).c&&!e.isInteger())throw Error(h+"Exponent not an integer: "+ne(e));if(null!=t&&(t=new z(t)),c=e.e>14,!y.c||!y.c[0]||1==y.c[0]&&!y.e&&1==y.c.length||!e.c||!e.c[0])return m=new z(Math.pow(+ne(y),c?2-k(e):+ne(e))),t?m.mod(t):m;if(l=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new z(NaN);(r=!l&&y.isInteger()&&t.isInteger())&&(y=y.mod(t))}else{if(e.e>9&&(y.e>0||y.e<-1||(0==y.e?y.c[0]>1||c&&y.c[1]>=24e7:y.c[0]<8e13||c&&y.c[0]<=9999975e7)))return o=y.s<0&&k(e)?-0:0,y.e>-1&&(o=1/o),new z(l?1/o:o);W&&(o=d(W/v+2))}for(c?(n=new z(.5),l&&(e.s=1),A=k(e)):A=(i=Math.abs(+ne(e)))%2,m=new z(T);;){if(A){if(!(m=m.times(y)).c)break;o?m.c.length>o&&(m.c.length=o):r&&(m=m.mod(t))}if(i){if(0===(i=f(i/2)))break;A=i%2}else if(te(e=e.times(n),e.e+1,1),e.e>14)A=k(e);else{if(0===(i=+ne(e)))break;A=i%2}y=y.times(y),o?y.c&&y.c.length>o&&(y.c.length=o):r&&(y=y.mod(t))}return r?m:(l&&(m=T.div(m)),t?m.mod(t):o?te(m,W,U,undefined):m)},D.integerValue=function(e){var t=new z(this);return null==e?e=U:B(e,0,8),te(t,t.e+1,e)},D.isEqualTo=D.eq=function(e,b){return 0===E(this,new z(e,b))},D.isFinite=function(){return!!this.c},D.isGreaterThan=D.gt=function(e,b){return E(this,new z(e,b))>0},D.isGreaterThanOrEqualTo=D.gte=function(e,b){return 1===(b=E(this,new z(e,b)))||0===b},D.isInteger=function(){return!!this.c&&C(this.e/v)>this.c.length-2},D.isLessThan=D.lt=function(e,b){return E(this,new z(e,b))<0},D.isLessThanOrEqualTo=D.lte=function(e,b){return-1===(b=E(this,new z(e,b)))||0===b},D.isNaN=function(){return!this.s},D.isNegative=function(){return this.s<0},D.isPositive=function(){return this.s>0},D.isZero=function(){return!!this.c&&0==this.c[0]},D.minus=function(e,b){var i,t,n,r,o=this,a=o.s;if(b=(e=new z(e,b)).s,!a||!b)return new z(NaN);if(a!=b)return e.s=-b,o.plus(e);var c=o.e/v,l=e.e/v,d=o.c,f=e.c;if(!c||!l){if(!d||!f)return d?(e.s=-b,e):new z(f?o:NaN);if(!d[0]||!f[0])return f[0]?(e.s=-b,e):new z(d[0]?o:3==U?-0:0)}if(c=C(c),l=C(l),d=d.slice(),a=c-l){for((r=a<0)?(a=-a,n=d):(l=c,n=f),n.reverse(),b=a;b--;n.push(0));n.reverse()}else for(t=(r=(a=d.length)<(b=f.length))?a:b,a=b=0;b0)for(;b--;d[i++]=0);for(b=m-1;t>a;){if(d[--t]=0;){for(t=0,A=B[i]%_,y=B[i]/_|0,r=i+(o=l);r>i;)t=((d=A*(d=E[--o]%_)+(c=y*d+(f=E[o]/_|0)*A)%_*_+I[r]+t)/base|0)+(c/_|0)+y*f,I[r--]=d%base;I[r]=t}return t?++n:I.splice(0,1),ee(e,I,n)},D.negated=function(){var e=new z(this);return e.s=-e.s||null,e},D.plus=function(e,b){var t,n=this,a=n.s;if(b=(e=new z(e,b)).s,!a||!b)return new z(NaN);if(a!=b)return e.s=-b,n.minus(e);var r=n.e/v,o=e.e/v,c=n.c,l=e.c;if(!r||!o){if(!c||!l)return new z(a/0);if(!c[0]||!l[0])return l[0]?e:new z(c[0]?n:0*a)}if(r=C(r),o=C(o),c=c.slice(),a=r-o){for(a>0?(o=r,t=l):(a=-a,t=c),t.reverse();a--;t.push(0));t.reverse()}for((a=c.length)-(b=l.length)<0&&(t=l,l=c,c=t,b=a),a=0;b;)a=(c[--b]=c[b]+l[b]+a)/m|0,c[b]=m===c[b]?0:c[b]%m;return a&&(c=[a].concat(c),++o),ee(e,c,o)},D.precision=D.sd=function(e,t){var n,r,o,c=this;if(null!=e&&e!==!!e)return B(e,1,_),null==t?t=U:B(t,0,8),te(new z(c),e,t);if(!(n=c.c))return null;if(r=(o=n.length-1)*v+1,o=n[o]){for(;o%10==0;o/=10,r--);for(o=n[0];o>=10;o/=10,r++);}return e&&c.e+1>r&&(r=c.e+1),r},D.shiftedBy=function(e){return B(e,-9007199254740991,y),this.times("1e"+e)},D.squareRoot=D.sqrt=function(){var e,t,n,r,o,c=this,l=c.c,s=c.s,d=c.e,f=j+4,h=new z("0.5");if(1!==s||!l||!l[0])return new z(!s||s<0&&(!l||l[0])?NaN:l?c:1/0);if(0==(s=Math.sqrt(+ne(c)))||s==1/0?(((t=S(l)).length+d)%2==0&&(t+="0"),s=Math.sqrt(+t),d=C((d+1)/2)-(d<0||d%2),n=new z(t=s==1/0?"5e"+d:(t=s.toExponential()).slice(0,t.indexOf("e")+1)+d)):n=new z(s+""),n.c[0])for((s=(d=n.e)+f)<3&&(s=0);;)if(o=n,n=h.times(o.plus(div(c,o,f,1))),S(o.c).slice(0,s)===(t=S(n.c)).slice(0,s)){if(n.e0&&I>0){for(i=I%l||l,A=y.substr(0,i);i0&&(A+=f+y.slice(i)),v&&(A="-"+A)}r=m?A+(n.decimalSeparator||"")+((d=+n.fractionGroupSize)?m.replace(new RegExp("\\d{"+d+"}\\B","g"),"$&"+(n.fractionGroupSeparator||"")):m):A}return(n.prefix||"")+r+(n.suffix||"")},D.toFraction=function(e){var t,n,r,o,c,l,d,f,A,q,m,s,y=this,w=y.c;if(null!=e&&(!(d=new z(e)).isInteger()&&(d.c||1!==d.s)||d.lt(T)))throw Error(h+"Argument "+(d.isInteger()?"out of range: ":"not an integer: ")+ne(d));if(!w)return new z(y);for(t=new z(T),A=n=new z(T),r=f=new z(T),s=S(w),c=t.e=s.length-y.e-1,t.c[0]=I[(l=c%v)<0?v+l:l],e=!e||d.comparedTo(t)>0?c>0?t:A:d,l=L,L=1/0,d=new z(s),f.c[0]=0;q=div(d,t,0,1),1!=(o=n.plus(q.times(r))).comparedTo(e);)n=r,r=o,A=f.plus(q.times(o=A)),f=o,t=d.minus(q.times(o=t)),d=o;return o=div(e.minus(n),r,0,1),f=f.plus(o.times(A)),n=n.plus(o.times(r)),f.s=A.s=y.s,m=div(A,r,c*=2,U).minus(y).abs().comparedTo(div(f,n,c,U).minus(y).abs())<1?[A,r]:[f,n],L=l,m},D.toNumber=function(){return+ne(this)},D.toPrecision=function(e,t){return null!=e&&B(e,1,_),X(this,e,t,2)},D.toString=function(b){var e,t=this,s=t.s,r=t.e;return null===r?s?(e="Infinity",s<0&&(e="-"+e)):e="NaN":(null==b?e=r<=J||r>=H?O(S(t.c),r):R(S(t.c),r,"0"):10===b&&Z?e=R(S((t=te(new z(t),j+r+1,U)).c),t.e,"0"):(B(b,2,K.length,"Base"),e=n(R(S(t.c),r,"0"),10,b,s,!0)),s<0&&t.c[0]&&(e="-"+e)),e},D.valueOf=D.toJSON=function(){return ne(this)},D._isBigNumber=!0,null!=t&&z.set(t),z}(),c.default=c.BigNumber=c,void 0===(r=function(){return c}.call(t,n,t,e))||(e.exports=r)}()},function(e,t,n){"use strict";function r(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function o(b){if("boolean"!=typeof b)throw new Error(`Expected boolean, not ${b}`)}function c(b,...e){if(!(b instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(e.length>0&&!e.includes(b.length))throw new TypeError(`Expected Uint8Array of length ${e}, not of length=${b.length}`)}function l(e){if("function"!=typeof e||"function"!=typeof e.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");r(e.outputLen),r(e.blockLen)}function d(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function output(e,t){c(e);const n=t.outputLen;if(e.length>>24]^A[I>>>16&255]^m[w>>>8&255]^v[255&_]^t[C++],l=h[I>>>24]^A[w>>>16&255]^m[_>>>8&255]^v[255&y]^t[C++],d=h[w>>>24]^A[_>>>16&255]^m[y>>>8&255]^v[255&I]^t[C++],f=h[_>>>24]^A[y>>>16&255]^m[I>>>8&255]^v[255&w]^t[C++],y=c,I=l,w=d,_=f;return c=(r[y>>>24]<<24|r[I>>>16&255]<<16|r[w>>>8&255]<<8|r[255&_])^t[C++],l=(r[I>>>24]<<24|r[w>>>16&255]<<16|r[_>>>8&255]<<8|r[255&y])^t[C++],d=(r[w>>>24]<<24|r[_>>>16&255]<<16|r[y>>>8&255]<<8|r[255&I])^t[C++],f=(r[_>>>24]<<24|r[y>>>16&255]<<16|r[I>>>8&255]<<8|r[255&w])^t[C++],[c>>>=0,l>>>=0,d>>>=0,f>>>=0]}var d=[0,1,2,4,8,16,32,64,128,27,54],f=function(){for(var e=new Array(256),t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;for(var n=[],r=[],o=[[],[],[],[]],c=[[],[],[],[]],l=0,d=0,i=0;i<256;++i){var f=d^d<<1^d<<2^d<<3^d<<4;f=f>>>8^255&f^99,n[l]=f,r[f]=l;var h=e[l],A=e[h],m=e[A],v=257*e[f]^16843008*f;o[0][l]=v<<24|v>>>8,o[1][l]=v<<16|v>>>16,o[2][l]=v<<8|v>>>24,o[3][l]=v,v=16843009*m^65537*A^257*h^16843008*l,c[0][f]=v<<24|v>>>8,c[1][f]=v<<16|v>>>16,c[2][f]=v<<8|v>>>24,c[3][f]=v,0===l?l=d=1:(l=h^e[e[e[m^h]]],d^=e[e[d]])}return{SBOX:n,INV_SBOX:r,SUB_MIX:o,INV_SUB_MIX:c}}();function h(e){this._key=o(e),this._reset()}h.blockSize=16,h.keySize=32,h.prototype.blockSize=h.blockSize,h.prototype.keySize=h.keySize,h.prototype._reset=function(){for(var e=this._key,t=e.length,n=t+6,r=4*(n+1),o=[],c=0;c>>24,l=f.SBOX[l>>>24]<<24|f.SBOX[l>>>16&255]<<16|f.SBOX[l>>>8&255]<<8|f.SBOX[255&l],l^=d[c/t|0]<<24):t>6&&c%t==4&&(l=f.SBOX[l>>>24]<<24|f.SBOX[l>>>16&255]<<16|f.SBOX[l>>>8&255]<<8|f.SBOX[255&l]),o[c]=o[c-t]^l}for(var h=[],A=0;A>>24]]^f.INV_SUB_MIX[1][f.SBOX[v>>>16&255]]^f.INV_SUB_MIX[2][f.SBOX[v>>>8&255]]^f.INV_SUB_MIX[3][f.SBOX[255&v]]}this._nRounds=n,this._keySchedule=o,this._invKeySchedule=h},h.prototype.encryptBlockRaw=function(e){return l(e=o(e),this._keySchedule,f.SUB_MIX,f.SBOX,this._nRounds)},h.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),n=r.allocUnsafe(16);return n.writeUInt32BE(t[0],0),n.writeUInt32BE(t[1],4),n.writeUInt32BE(t[2],8),n.writeUInt32BE(t[3],12),n},h.prototype.decryptBlock=function(e){var t=(e=o(e))[1];e[1]=e[3],e[3]=t;var n=l(e,this._invKeySchedule,f.INV_SUB_MIX,f.INV_SBOX,this._nRounds),c=r.allocUnsafe(16);return c.writeUInt32BE(n[0],0),c.writeUInt32BE(n[3],4),c.writeUInt32BE(n[2],8),c.writeUInt32BE(n[1],12),c},h.prototype.scrub=function(){c(this._keySchedule),c(this._invKeySchedule),c(this._key)},e.exports.AES=h},function(e,t,n){var r=n(9).Buffer,o=n(218);e.exports=function(e,t,n,c){if(r.isBuffer(e)||(e=r.from(e,"binary")),t&&(r.isBuffer(t)||(t=r.from(t,"binary")),8!==t.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var l=n/8,d=r.alloc(l),f=r.alloc(c||0),h=r.alloc(0);l>0||c>0;){var A=new o;A.update(h),A.update(e),t&&A.update(t),h=A.digest();var m=0;if(l>0){var v=d.length-l;m=Math.min(l,h.length),h.copy(d,v,0,m),l-=m}if(m0){var y=f.length-c,I=Math.min(c,h.length-m);h.copy(f,y,m,m+I),c-=I}}return h.fill(0),{key:d,iv:f}}},function(e,t,n){"use strict";var r=n(27),o=n(49),c=o.getNAF,l=o.getJSF,d=o.assert;function f(e,t){this.type=e,this.p=new r(t.p,16),this.red=t.prime?r.red(t.prime):r.mont(this.p),this.zero=new r(0).toRed(this.red),this.one=new r(1).toRed(this.red),this.two=new r(2).toRed(this.red),this.n=t.n&&new r(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var n=this.n&&this.p.div(this.n);!n||n.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function h(e,t){this.curve=e,this.type=t,this.precomputed=null}e.exports=f,f.prototype.point=function(){throw new Error("Not implemented")},f.prototype.validate=function(){throw new Error("Not implemented")},f.prototype._fixedNafMul=function(p,e){d(p.precomputed);var t=p._getDoubles(),n=c(e,1,this._bitLength),r=(1<=o;h--)l=(l<<1)+n[h];f.push(l)}for(var a=this.jpoint(null,null,null),b=this.jpoint(null,null,null),i=r;i>0;i--){for(o=0;o=0;i--){for(var f=0;i>=0&&0===o[i];i--)f++;if(i>=0&&f++,l=l.dblp(f),i<0)break;var h=o[i];d(0!==h),l="affine"===p.type?h>0?l.mixedAdd(r[h-1>>1]):l.mixedAdd(r[-h-1>>1].neg()):h>0?l.add(r[h-1>>1]):l.add(r[-h-1>>1].neg())}return"affine"===p.type?l.toP():l},f.prototype._wnafMulAdd=function(e,t,n,r,o){var i,d,p,f=this._wnafT1,h=this._wnafT2,A=this._wnafT3,m=0;for(i=0;i=1;i-=2){var a=i-1,b=i;if(1===f[a]&&1===f[b]){var y=[t[a],null,null,t[b]];0===t[a].y.cmp(t[b].y)?(y[1]=t[a].add(t[b]),y[2]=t[a].toJ().mixedAdd(t[b].neg())):0===t[a].y.cmp(t[b].y.redNeg())?(y[1]=t[a].toJ().mixedAdd(t[b]),y[2]=t[a].add(t[b].neg())):(y[1]=t[a].toJ().mixedAdd(t[b]),y[2]=t[a].toJ().mixedAdd(t[b].neg()));var I=[-3,-1,-5,-7,0,7,5,1,3],w=l(n[a],n[b]);for(m=Math.max(w[0].length,m),A[a]=new Array(m),A[b]=new Array(m),d=0;d=0;i--){for(var B=0;i>=0;){var k=!0;for(d=0;d=0&&B++,S=S.dblp(B),i<0)break;for(d=0;d0?p=h[d][O-1>>1]:O<0&&(p=h[d][-O-1>>1].neg()),S="affine"===p.type?S.mixedAdd(p):S.add(p))}}for(i=0;i=Math.ceil((e.bitLength()+1)/t.step)},h.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],r=this,i=0;i=0;i--){var r=e[i];"."===r?e.splice(i,1):".."===r?(e.splice(i,1),n++):n&&(e.splice(i,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}function filter(e,t){if(e.filter)return e.filter(t);for(var n=[],i=0;i=-1&&!r;i--){var path=i>=0?arguments[i]:e.cwd();if("string"!=typeof path)throw new TypeError("Arguments to path.resolve must be strings");path&&(t=path+"/"+t,r="/"===path.charAt(0))}return(r?"/":"")+(t=n(filter(t.split("/"),(function(p){return!!p})),!r).join("/"))||"."},t.normalize=function(path){var e=t.isAbsolute(path),o="/"===r(path,-1);return(path=n(filter(path.split("/"),(function(p){return!!p})),!e).join("/"))||e||(path="."),path&&o&&(path+="/"),(e?"/":"")+path},t.isAbsolute=function(path){return"/"===path.charAt(0)},t.join=function(){var e=Array.prototype.slice.call(arguments,0);return t.normalize(filter(e,(function(p,e){if("string"!=typeof p)throw new TypeError("Arguments to path.join must be strings");return p})).join("/"))},t.relative=function(e,n){function r(e){for(var t=0;t=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}e=t.resolve(e).substr(1),n=t.resolve(n).substr(1);for(var o=r(e.split("/")),c=r(n.split("/")),l=Math.min(o.length,c.length),d=l,i=0;i=1;--i)if(47===(code=path.charCodeAt(i))){if(!n){t=i;break}}else n=!1;return-1===t?e?"/":".":e&&1===t?"/":path.slice(0,t)},t.basename=function(path,e){var t=function(path){"string"!=typeof path&&(path+="");var i,e=0,t=-1,n=!0;for(i=path.length-1;i>=0;--i)if(47===path.charCodeAt(i)){if(!n){e=i+1;break}}else-1===t&&(n=!1,t=i+1);return-1===t?"":path.slice(e,t)}(path);return e&&t.substr(-1*e.length)===e&&(t=t.substr(0,t.length-e.length)),t},t.extname=function(path){"string"!=typeof path&&(path+="");for(var e=-1,t=0,n=-1,r=!0,o=0,i=path.length-1;i>=0;--i){var code=path.charCodeAt(i);if(47!==code)-1===n&&(r=!1,n=i+1),46===code?-1===e?e=i:1!==o&&(o=1):-1!==e&&(o=-1);else if(!r){t=i+1;break}}return-1===e||-1===n||0===o||1===o&&e===n-1&&e===t+1?"":path.slice(e,n)};var r="b"==="ab".substr(-1)?function(e,t,n){return e.substr(t,n)}:function(e,t,n){return t<0&&(t=e.length+t),e.substr(t,n)}}).call(this,n(19))},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var p in e)"default"===p||Object.prototype.hasOwnProperty.call(t,p)||r(t,e,p)};Object.defineProperty(t,"__esModule",{value:!0}),t.ValueAndUpdates=t.toListPromise=t.fromListPromise=t.firstEvent=t.dropDuplicates=t.DefaultValueProducer=t.concat=void 0;var c=n(735);Object.defineProperty(t,"concat",{enumerable:!0,get:function(){return c.concat}});var l=n(748);Object.defineProperty(t,"DefaultValueProducer",{enumerable:!0,get:function(){return l.DefaultValueProducer}});var d=n(749);Object.defineProperty(t,"dropDuplicates",{enumerable:!0,get:function(){return d.dropDuplicates}});var f=n(750);Object.defineProperty(t,"firstEvent",{enumerable:!0,get:function(){return f.firstEvent}}),Object.defineProperty(t,"fromListPromise",{enumerable:!0,get:function(){return f.fromListPromise}}),Object.defineProperty(t,"toListPromise",{enumerable:!0,get:function(){return f.toListPromise}}),o(n(751),t);var h=n(752);Object.defineProperty(t,"ValueAndUpdates",{enumerable:!0,get:function(){return h.ValueAndUpdates}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pubkeyToAddress=t.pubkeyToRawAddress=t.rawSecp256k1PubkeyToRawAddress=t.rawEd25519PubkeyToRawAddress=void 0;const r=n(53),o=n(17),c=n(246),l=n(184);function d(e){if(32!==e.length)throw new Error(`Invalid Ed25519 pubkey length: ${e.length}`);return(0,r.sha256)(e).slice(0,20)}function f(e){if(33!==e.length)throw new Error(`Invalid Secp256k1 pubkey length (compressed): ${e.length}`);return(0,r.ripemd160)((0,r.sha256)(e))}function h(e){if((0,l.isSecp256k1Pubkey)(e)){return f((0,o.fromBase64)(e.value))}if((0,l.isEd25519Pubkey)(e)){return d((0,o.fromBase64)(e.value))}if((0,l.isMultisigThresholdPubkey)(e)){const t=(0,c.encodeAminoPubkey)(e);return(0,r.sha256)(t).slice(0,20)}throw new Error("Unsupported public key type")}t.rawEd25519PubkeyToRawAddress=d,t.rawSecp256k1PubkeyToRawAddress=f,t.pubkeyToRawAddress=h,t.pubkeyToAddress=function(e,t){return(0,o.toBech32)(t,h(e))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isMultisigThresholdPubkey=t.isSinglePubkey=t.pubkeyType=t.isSecp256k1Pubkey=t.isEd25519Pubkey=void 0,t.isEd25519Pubkey=function(e){return"tendermint/PubKeyEd25519"===e.type},t.isSecp256k1Pubkey=function(e){return"tendermint/PubKeySecp256k1"===e.type},t.pubkeyType={secp256k1:"tendermint/PubKeySecp256k1",ed25519:"tendermint/PubKeyEd25519",sr25519:"tendermint/PubKeySr25519",multisigThreshold:"tendermint/PubKeyMultisigThreshold"},t.isSinglePubkey=function(e){return[t.pubkeyType.ed25519,t.pubkeyType.secp256k1,t.pubkeyType.sr25519].includes(e.type)},t.isMultisigThresholdPubkey=function(e){return"tendermint/PubKeyMultisigThreshold"===e.type}},function(e,t,n){"use strict";var r,o,c,l=n(2),d=l.Reader,f=l.Writer,h=l.util,A=l.roots.default||(l.roots.default={});A.ics23=((c={}).HashOp=(r={},(o=Object.create(r))[r[0]="NO_HASH"]=0,o[r[1]="SHA256"]=1,o[r[2]="SHA512"]=2,o[r[3]="KECCAK"]=3,o[r[4]="RIPEMD160"]=4,o[r[5]="BITCOIN"]=5,o[r[6]="SHA512_256"]=6,o),c.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}(),c.ExistenceProof=function(){function e(e){if(this.path=[],e)for(var t=Object.keys(e),i=0;i>>3){case 1:r.key=e.bytes();break;case 2:r.value=e.bytes();break;case 3:r.leaf=A.ics23.LeafOp.decode(e,e.uint32());break;case 4:r.path&&r.path.length||(r.path=[]),r.path.push(A.ics23.InnerOp.decode(e,e.uint32()));break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof d||(e=new d(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||h.isString(e.key)))return"key: buffer expected";if(null!=e.value&&e.hasOwnProperty("value")&&!(e.value&&"number"==typeof e.value.length||h.isString(e.value)))return"value: buffer expected";if(null!=e.leaf&&e.hasOwnProperty("leaf")&&(t=A.ics23.LeafOp.verify(e.leaf)))return"leaf."+t;if(null!=e.path&&e.hasOwnProperty("path")){if(!Array.isArray(e.path))return"path: array expected";for(var i=0;i>>3){case 1:r.key=e.bytes();break;case 2:r.left=A.ics23.ExistenceProof.decode(e,e.uint32());break;case 3:r.right=A.ics23.ExistenceProof.decode(e,e.uint32());break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.key&&e.hasOwnProperty("key")&&!(e.key&&"number"==typeof e.key.length||h.isString(e.key))?"key: buffer expected":null!=e.left&&e.hasOwnProperty("left")&&(t=A.ics23.ExistenceProof.verify(e.left))?"left."+t:null!=e.right&&e.hasOwnProperty("right")&&(t=A.ics23.ExistenceProof.verify(e.right))?"right."+t:null;var t},e.fromObject=function(object){if(object instanceof A.ics23.NonExistenceProof)return object;var e=new A.ics23.NonExistenceProof;if(null!=object.key&&("string"==typeof object.key?h.base64.decode(object.key,e.key=h.newBuffer(h.base64.length(object.key)),0):object.key.length&&(e.key=object.key)),null!=object.left){if("object"!=typeof object.left)throw TypeError(".ics23.NonExistenceProof.left: object expected");e.left=A.ics23.ExistenceProof.fromObject(object.left)}if(null!=object.right){if("object"!=typeof object.right)throw TypeError(".ics23.NonExistenceProof.right: object expected");e.right=A.ics23.ExistenceProof.fromObject(object.right)}return e},e.toObject=function(e,t){t||(t={});var object={};return t.defaults&&(t.bytes===String?object.key="":(object.key=[],t.bytes!==Array&&(object.key=h.newBuffer(object.key))),object.left=null,object.right=null),null!=e.key&&e.hasOwnProperty("key")&&(object.key=t.bytes===String?h.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")&&(object.left=A.ics23.ExistenceProof.toObject(e.left,t)),null!=e.right&&e.hasOwnProperty("right")&&(object.right=A.ics23.ExistenceProof.toObject(e.right,t)),object},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),c.CommitmentProof=function(){function e(e){if(e)for(var t=Object.keys(e),i=0;i>>3){case 1:r.exist=A.ics23.ExistenceProof.decode(e,e.uint32());break;case 2:r.nonexist=A.ics23.NonExistenceProof.decode(e,e.uint32());break;case 3:r.batch=A.ics23.BatchProof.decode(e,e.uint32());break;case 4:r.compressed=A.ics23.CompressedBatchProof.decode(e,e.uint32());break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";var t={};if(null!=e.exist&&e.hasOwnProperty("exist")&&(t.proof=1,n=A.ics23.ExistenceProof.verify(e.exist)))return"exist."+n;if(null!=e.nonexist&&e.hasOwnProperty("nonexist")){if(1===t.proof)return"proof: multiple values";if(t.proof=1,n=A.ics23.NonExistenceProof.verify(e.nonexist))return"nonexist."+n}if(null!=e.batch&&e.hasOwnProperty("batch")){if(1===t.proof)return"proof: multiple values";if(t.proof=1,n=A.ics23.BatchProof.verify(e.batch))return"batch."+n}if(null!=e.compressed&&e.hasOwnProperty("compressed")){if(1===t.proof)return"proof: multiple values";var n;if(t.proof=1,n=A.ics23.CompressedBatchProof.verify(e.compressed))return"compressed."+n}return null},e.fromObject=function(object){if(object instanceof A.ics23.CommitmentProof)return object;var e=new A.ics23.CommitmentProof;if(null!=object.exist){if("object"!=typeof object.exist)throw TypeError(".ics23.CommitmentProof.exist: object expected");e.exist=A.ics23.ExistenceProof.fromObject(object.exist)}if(null!=object.nonexist){if("object"!=typeof object.nonexist)throw TypeError(".ics23.CommitmentProof.nonexist: object expected");e.nonexist=A.ics23.NonExistenceProof.fromObject(object.nonexist)}if(null!=object.batch){if("object"!=typeof object.batch)throw TypeError(".ics23.CommitmentProof.batch: object expected");e.batch=A.ics23.BatchProof.fromObject(object.batch)}if(null!=object.compressed){if("object"!=typeof object.compressed)throw TypeError(".ics23.CommitmentProof.compressed: object expected");e.compressed=A.ics23.CompressedBatchProof.fromObject(object.compressed)}return e},e.toObject=function(e,t){t||(t={});var object={};return null!=e.exist&&e.hasOwnProperty("exist")&&(object.exist=A.ics23.ExistenceProof.toObject(e.exist,t),t.oneofs&&(object.proof="exist")),null!=e.nonexist&&e.hasOwnProperty("nonexist")&&(object.nonexist=A.ics23.NonExistenceProof.toObject(e.nonexist,t),t.oneofs&&(object.proof="nonexist")),null!=e.batch&&e.hasOwnProperty("batch")&&(object.batch=A.ics23.BatchProof.toObject(e.batch,t),t.oneofs&&(object.proof="batch")),null!=e.compressed&&e.hasOwnProperty("compressed")&&(object.compressed=A.ics23.CompressedBatchProof.toObject(e.compressed,t),t.oneofs&&(object.proof="compressed")),object},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),c.LeafOp=function(){function e(e){if(e)for(var t=Object.keys(e),i=0;i>>3){case 1:r.hash=e.int32();break;case 2:r.prehashKey=e.int32();break;case 3:r.prehashValue=e.int32();break;case 4:r.length=e.int32();break;case 5:r.prefix=e.bytes();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof d||(e=new d(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||h.isString(e.prefix))?"prefix: buffer expected":null},e.fromObject=function(object){if(object instanceof A.ics23.LeafOp)return object;var e=new A.ics23.LeafOp;switch(object.hash){case"NO_HASH":case 0:e.hash=0;break;case"SHA256":case 1:e.hash=1;break;case"SHA512":case 2:e.hash=2;break;case"KECCAK":case 3:e.hash=3;break;case"RIPEMD160":case 4:e.hash=4;break;case"BITCOIN":case 5:e.hash=5;break;case"SHA512_256":case 6:e.hash=6}switch(object.prehashKey){case"NO_HASH":case 0:e.prehashKey=0;break;case"SHA256":case 1:e.prehashKey=1;break;case"SHA512":case 2:e.prehashKey=2;break;case"KECCAK":case 3:e.prehashKey=3;break;case"RIPEMD160":case 4:e.prehashKey=4;break;case"BITCOIN":case 5:e.prehashKey=5;break;case"SHA512_256":case 6:e.prehashKey=6}switch(object.prehashValue){case"NO_HASH":case 0:e.prehashValue=0;break;case"SHA256":case 1:e.prehashValue=1;break;case"SHA512":case 2:e.prehashValue=2;break;case"KECCAK":case 3:e.prehashValue=3;break;case"RIPEMD160":case 4:e.prehashValue=4;break;case"BITCOIN":case 5:e.prehashValue=5;break;case"SHA512_256":case 6:e.prehashValue=6}switch(object.length){case"NO_PREFIX":case 0:e.length=0;break;case"VAR_PROTO":case 1:e.length=1;break;case"VAR_RLP":case 2:e.length=2;break;case"FIXED32_BIG":case 3:e.length=3;break;case"FIXED32_LITTLE":case 4:e.length=4;break;case"FIXED64_BIG":case 5:e.length=5;break;case"FIXED64_LITTLE":case 6:e.length=6;break;case"REQUIRE_32_BYTES":case 7:e.length=7;break;case"REQUIRE_64_BYTES":case 8:e.length=8}return null!=object.prefix&&("string"==typeof object.prefix?h.base64.decode(object.prefix,e.prefix=h.newBuffer(h.base64.length(object.prefix)),0):object.prefix.length&&(e.prefix=object.prefix)),e},e.toObject=function(e,t){t||(t={});var object={};return t.defaults&&(object.hash=t.enums===String?"NO_HASH":0,object.prehashKey=t.enums===String?"NO_HASH":0,object.prehashValue=t.enums===String?"NO_HASH":0,object.length=t.enums===String?"NO_PREFIX":0,t.bytes===String?object.prefix="":(object.prefix=[],t.bytes!==Array&&(object.prefix=h.newBuffer(object.prefix)))),null!=e.hash&&e.hasOwnProperty("hash")&&(object.hash=t.enums===String?A.ics23.HashOp[e.hash]:e.hash),null!=e.prehashKey&&e.hasOwnProperty("prehashKey")&&(object.prehashKey=t.enums===String?A.ics23.HashOp[e.prehashKey]:e.prehashKey),null!=e.prehashValue&&e.hasOwnProperty("prehashValue")&&(object.prehashValue=t.enums===String?A.ics23.HashOp[e.prehashValue]:e.prehashValue),null!=e.length&&e.hasOwnProperty("length")&&(object.length=t.enums===String?A.ics23.LengthOp[e.length]:e.length),null!=e.prefix&&e.hasOwnProperty("prefix")&&(object.prefix=t.bytes===String?h.base64.encode(e.prefix,0,e.prefix.length):t.bytes===Array?Array.prototype.slice.call(e.prefix):e.prefix),object},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),c.InnerOp=function(){function e(e){if(e)for(var t=Object.keys(e),i=0;i>>3){case 1:r.hash=e.int32();break;case 2:r.prefix=e.bytes();break;case 3:r.suffix=e.bytes();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof d||(e=new d(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||h.isString(e.prefix))?"prefix: buffer expected":null!=e.suffix&&e.hasOwnProperty("suffix")&&!(e.suffix&&"number"==typeof e.suffix.length||h.isString(e.suffix))?"suffix: buffer expected":null},e.fromObject=function(object){if(object instanceof A.ics23.InnerOp)return object;var e=new A.ics23.InnerOp;switch(object.hash){case"NO_HASH":case 0:e.hash=0;break;case"SHA256":case 1:e.hash=1;break;case"SHA512":case 2:e.hash=2;break;case"KECCAK":case 3:e.hash=3;break;case"RIPEMD160":case 4:e.hash=4;break;case"BITCOIN":case 5:e.hash=5;break;case"SHA512_256":case 6:e.hash=6}return null!=object.prefix&&("string"==typeof object.prefix?h.base64.decode(object.prefix,e.prefix=h.newBuffer(h.base64.length(object.prefix)),0):object.prefix.length&&(e.prefix=object.prefix)),null!=object.suffix&&("string"==typeof object.suffix?h.base64.decode(object.suffix,e.suffix=h.newBuffer(h.base64.length(object.suffix)),0):object.suffix.length&&(e.suffix=object.suffix)),e},e.toObject=function(e,t){t||(t={});var object={};return t.defaults&&(object.hash=t.enums===String?"NO_HASH":0,t.bytes===String?object.prefix="":(object.prefix=[],t.bytes!==Array&&(object.prefix=h.newBuffer(object.prefix))),t.bytes===String?object.suffix="":(object.suffix=[],t.bytes!==Array&&(object.suffix=h.newBuffer(object.suffix)))),null!=e.hash&&e.hasOwnProperty("hash")&&(object.hash=t.enums===String?A.ics23.HashOp[e.hash]:e.hash),null!=e.prefix&&e.hasOwnProperty("prefix")&&(object.prefix=t.bytes===String?h.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")&&(object.suffix=t.bytes===String?h.base64.encode(e.suffix,0,e.suffix.length):t.bytes===Array?Array.prototype.slice.call(e.suffix):e.suffix),object},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),c.ProofSpec=function(){function e(e){if(e)for(var t=Object.keys(e),i=0;i>>3){case 1:r.leafSpec=A.ics23.LeafOp.decode(e,e.uint32());break;case 2:r.innerSpec=A.ics23.InnerSpec.decode(e,e.uint32());break;case 3:r.maxDepth=e.int32();break;case 4:r.minDepth=e.int32();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.leafSpec&&e.hasOwnProperty("leafSpec")&&(t=A.ics23.LeafOp.verify(e.leafSpec))?"leafSpec."+t:null!=e.innerSpec&&e.hasOwnProperty("innerSpec")&&(t=A.ics23.InnerSpec.verify(e.innerSpec))?"innerSpec."+t:null!=e.maxDepth&&e.hasOwnProperty("maxDepth")&&!h.isInteger(e.maxDepth)?"maxDepth: integer expected":null!=e.minDepth&&e.hasOwnProperty("minDepth")&&!h.isInteger(e.minDepth)?"minDepth: integer expected":null;var t},e.fromObject=function(object){if(object instanceof A.ics23.ProofSpec)return object;var e=new A.ics23.ProofSpec;if(null!=object.leafSpec){if("object"!=typeof object.leafSpec)throw TypeError(".ics23.ProofSpec.leafSpec: object expected");e.leafSpec=A.ics23.LeafOp.fromObject(object.leafSpec)}if(null!=object.innerSpec){if("object"!=typeof object.innerSpec)throw TypeError(".ics23.ProofSpec.innerSpec: object expected");e.innerSpec=A.ics23.InnerSpec.fromObject(object.innerSpec)}return null!=object.maxDepth&&(e.maxDepth=0|object.maxDepth),null!=object.minDepth&&(e.minDepth=0|object.minDepth),e},e.toObject=function(e,t){t||(t={});var object={};return t.defaults&&(object.leafSpec=null,object.innerSpec=null,object.maxDepth=0,object.minDepth=0),null!=e.leafSpec&&e.hasOwnProperty("leafSpec")&&(object.leafSpec=A.ics23.LeafOp.toObject(e.leafSpec,t)),null!=e.innerSpec&&e.hasOwnProperty("innerSpec")&&(object.innerSpec=A.ics23.InnerSpec.toObject(e.innerSpec,t)),null!=e.maxDepth&&e.hasOwnProperty("maxDepth")&&(object.maxDepth=e.maxDepth),null!=e.minDepth&&e.hasOwnProperty("minDepth")&&(object.minDepth=e.minDepth),object},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),c.InnerSpec=function(){function e(e){if(this.childOrder=[],e)for(var t=Object.keys(e),i=0;i>>3){case 1:if(r.childOrder&&r.childOrder.length||(r.childOrder=[]),2==(7&o))for(var c=e.uint32()+e.pos;e.pos>>3==1?(r.entries&&r.entries.length||(r.entries=[]),r.entries.push(A.ics23.BatchEntry.decode(e,e.uint32()))):e.skipType(7&o)}return r},e.decodeDelimited=function(e){return e instanceof d||(e=new d(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 i=0;i>>3){case 1:r.exist=A.ics23.ExistenceProof.decode(e,e.uint32());break;case 2:r.nonexist=A.ics23.NonExistenceProof.decode(e,e.uint32());break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";var t={};if(null!=e.exist&&e.hasOwnProperty("exist")&&(t.proof=1,n=A.ics23.ExistenceProof.verify(e.exist)))return"exist."+n;if(null!=e.nonexist&&e.hasOwnProperty("nonexist")){if(1===t.proof)return"proof: multiple values";var n;if(t.proof=1,n=A.ics23.NonExistenceProof.verify(e.nonexist))return"nonexist."+n}return null},e.fromObject=function(object){if(object instanceof A.ics23.BatchEntry)return object;var e=new A.ics23.BatchEntry;if(null!=object.exist){if("object"!=typeof object.exist)throw TypeError(".ics23.BatchEntry.exist: object expected");e.exist=A.ics23.ExistenceProof.fromObject(object.exist)}if(null!=object.nonexist){if("object"!=typeof object.nonexist)throw TypeError(".ics23.BatchEntry.nonexist: object expected");e.nonexist=A.ics23.NonExistenceProof.fromObject(object.nonexist)}return e},e.toObject=function(e,t){t||(t={});var object={};return null!=e.exist&&e.hasOwnProperty("exist")&&(object.exist=A.ics23.ExistenceProof.toObject(e.exist,t),t.oneofs&&(object.proof="exist")),null!=e.nonexist&&e.hasOwnProperty("nonexist")&&(object.nonexist=A.ics23.NonExistenceProof.toObject(e.nonexist,t),t.oneofs&&(object.proof="nonexist")),object},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),c.CompressedBatchProof=function(){function e(e){if(this.entries=[],this.lookupInners=[],e)for(var t=Object.keys(e),i=0;i>>3){case 1:r.entries&&r.entries.length||(r.entries=[]),r.entries.push(A.ics23.CompressedBatchEntry.decode(e,e.uint32()));break;case 2:r.lookupInners&&r.lookupInners.length||(r.lookupInners=[]),r.lookupInners.push(A.ics23.InnerOp.decode(e,e.uint32()));break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof d||(e=new d(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 i=0;i>>3){case 1:r.exist=A.ics23.CompressedExistenceProof.decode(e,e.uint32());break;case 2:r.nonexist=A.ics23.CompressedNonExistenceProof.decode(e,e.uint32());break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";var t={};if(null!=e.exist&&e.hasOwnProperty("exist")&&(t.proof=1,n=A.ics23.CompressedExistenceProof.verify(e.exist)))return"exist."+n;if(null!=e.nonexist&&e.hasOwnProperty("nonexist")){if(1===t.proof)return"proof: multiple values";var n;if(t.proof=1,n=A.ics23.CompressedNonExistenceProof.verify(e.nonexist))return"nonexist."+n}return null},e.fromObject=function(object){if(object instanceof A.ics23.CompressedBatchEntry)return object;var e=new A.ics23.CompressedBatchEntry;if(null!=object.exist){if("object"!=typeof object.exist)throw TypeError(".ics23.CompressedBatchEntry.exist: object expected");e.exist=A.ics23.CompressedExistenceProof.fromObject(object.exist)}if(null!=object.nonexist){if("object"!=typeof object.nonexist)throw TypeError(".ics23.CompressedBatchEntry.nonexist: object expected");e.nonexist=A.ics23.CompressedNonExistenceProof.fromObject(object.nonexist)}return e},e.toObject=function(e,t){t||(t={});var object={};return null!=e.exist&&e.hasOwnProperty("exist")&&(object.exist=A.ics23.CompressedExistenceProof.toObject(e.exist,t),t.oneofs&&(object.proof="exist")),null!=e.nonexist&&e.hasOwnProperty("nonexist")&&(object.nonexist=A.ics23.CompressedNonExistenceProof.toObject(e.nonexist,t),t.oneofs&&(object.proof="nonexist")),object},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),c.CompressedExistenceProof=function(){function e(e){if(this.path=[],e)for(var t=Object.keys(e),i=0;i>>3){case 1:r.key=e.bytes();break;case 2:r.value=e.bytes();break;case 3:r.leaf=A.ics23.LeafOp.decode(e,e.uint32());break;case 4:if(r.path&&r.path.length||(r.path=[]),2==(7&o))for(var c=e.uint32()+e.pos;e.pos>>3){case 1:r.key=e.bytes();break;case 2:r.left=A.ics23.CompressedExistenceProof.decode(e,e.uint32());break;case 3:r.right=A.ics23.CompressedExistenceProof.decode(e,e.uint32());break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.key&&e.hasOwnProperty("key")&&!(e.key&&"number"==typeof e.key.length||h.isString(e.key))?"key: buffer expected":null!=e.left&&e.hasOwnProperty("left")&&(t=A.ics23.CompressedExistenceProof.verify(e.left))?"left."+t:null!=e.right&&e.hasOwnProperty("right")&&(t=A.ics23.CompressedExistenceProof.verify(e.right))?"right."+t:null;var t},e.fromObject=function(object){if(object instanceof A.ics23.CompressedNonExistenceProof)return object;var e=new A.ics23.CompressedNonExistenceProof;if(null!=object.key&&("string"==typeof object.key?h.base64.decode(object.key,e.key=h.newBuffer(h.base64.length(object.key)),0):object.key.length&&(e.key=object.key)),null!=object.left){if("object"!=typeof object.left)throw TypeError(".ics23.CompressedNonExistenceProof.left: object expected");e.left=A.ics23.CompressedExistenceProof.fromObject(object.left)}if(null!=object.right){if("object"!=typeof object.right)throw TypeError(".ics23.CompressedNonExistenceProof.right: object expected");e.right=A.ics23.CompressedExistenceProof.fromObject(object.right)}return e},e.toObject=function(e,t){t||(t={});var object={};return t.defaults&&(t.bytes===String?object.key="":(object.key=[],t.bytes!==Array&&(object.key=h.newBuffer(object.key))),object.left=null,object.right=null),null!=e.key&&e.hasOwnProperty("key")&&(object.key=t.bytes===String?h.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")&&(object.left=A.ics23.CompressedExistenceProof.toObject(e.left,t)),null!=e.right&&e.hasOwnProperty("right")&&(object.right=A.ics23.CompressedExistenceProof.toObject(e.right,t)),object},e.prototype.toJSON=function(){return this.constructor.toObject(this,l.util.toJSONOptions)},e}(),c),e.exports=A},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Timestamp=t.protobufPackage=void 0;const o=r(n(1)),c=r(n(2));t.protobufPackage="google.protobuf";const l={seconds:o.default.ZERO,nanos:0};t.Timestamp={encode:(e,t=c.default.Writer.create())=>(e.seconds.isZero()||t.uint32(8).int64(e.seconds),0!==e.nanos&&t.uint32(16).int32(e.nanos),t),decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},l);for(;t.pos>>3){case 1:r.seconds=t.int64();break;case 2:r.nanos=t.int32();break;default:t.skipType(7&e)}}return r},fromJSON(object){const e=Object.assign({},l);return void 0!==object.seconds&&null!==object.seconds?e.seconds=o.default.fromString(object.seconds):e.seconds=o.default.ZERO,void 0!==object.nanos&&null!==object.nanos?e.nanos=Number(object.nanos):e.nanos=0,e},toJSON(e){const t={};return void 0!==e.seconds&&(t.seconds=(e.seconds||o.default.ZERO).toString()),void 0!==e.nanos&&(t.nanos=e.nanos),t},fromPartial(object){const e=Object.assign({},l);return void 0!==object.seconds&&null!==object.seconds?e.seconds=object.seconds:e.seconds=o.default.ZERO,void 0!==object.nanos&&null!==object.nanos?e.nanos=object.nanos:e.nanos=0,e}},c.default.util.Long!==o.default&&(c.default.util.Long=o.default,c.default.configure())},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.STUB_WALLET=t.ISCN_PREFIX=t.ISCN_REGISTRY_NAME=t.DEFAULT_RPC_ENDPOINT=t.REVOKE_SEND_AUTH_GAS=t.EXEC_SEND_AUTH_GAS=t.GRANT_SEND_AUTH_GAS=t.LIKENFT_BURN_NFT_GAS=t.LIKENFT_MINT_NFT_GAS=t.LIKENFT_UPDATE_CLASS_GAS=t.LIKENFT_CREATE_CLASS_GAS=t.SEND_NFT_GAS=t.ISCN_CHANGE_OWNER_GAS=t.DEFAULT_MESSAGE_GAS=t.GAS_ESTIMATOR_INTERCEPT=t.GAS_ESTIMATOR_SLOPE=t.GAS_ESTIMATOR_BUFFER_RATIO=t.DEFAULT_GAS_PRICE_NUMBER=t.DEFAULT_GAS_PRICE=t.COSMOS_DENOM=void 0,t.COSMOS_DENOM="nanolike",t.DEFAULT_GAS_PRICE=[{amount:10,denom:t.COSMOS_DENOM}],t.DEFAULT_GAS_PRICE_NUMBER=t.DEFAULT_GAS_PRICE[0].amount,t.GAS_ESTIMATOR_BUFFER_RATIO=1.25,t.GAS_ESTIMATOR_SLOPE=10.3,t.GAS_ESTIMATOR_INTERCEPT=110533,t.DEFAULT_MESSAGE_GAS=2e5,t.ISCN_CHANGE_OWNER_GAS=2e5,t.SEND_NFT_GAS=2e5,t.LIKENFT_CREATE_CLASS_GAS=2e5,t.LIKENFT_UPDATE_CLASS_GAS=2e5,t.LIKENFT_MINT_NFT_GAS=2e5,t.LIKENFT_BURN_NFT_GAS=2e5,t.GRANT_SEND_AUTH_GAS=2e5,t.EXEC_SEND_AUTH_GAS=2e5,t.REVOKE_SEND_AUTH_GAS=2e5,t.DEFAULT_RPC_ENDPOINT="https://mainnet-node.like.co/rpc/",t.ISCN_REGISTRY_NAME="likecoin-chain",t.ISCN_PREFIX=`iscn://${t.ISCN_REGISTRY_NAME}`,t.STUB_WALLET="cosmos1rclg677y2jqt8x4ylj0kjlqjjmnn6w6304rrtc"},,,,function(e,t,n){"use strict";n(169),n(25),n(51),n(125),n(147),n(99),n(55),n(72),n(68),n(86),n(61),n(45),n(44),n(80),n(87),n(62);var r=n(5);function o(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,l=!0,d=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return l=e.done,e},e:function(e){d=!0,o=e},f:function(){try{l||null==n.return||n.return()}finally{if(d)throw o}}}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i0},canPrefetch:function(){var e=navigator.connection;return!(this.$nuxt.isOffline||e&&((e.effectiveType||"").includes("2g")||e.saveData))},getPrefetchComponents:function(){return this.$router.resolve(this.to,this.$route,this.append).resolved.matched.map((function(e){return e.components.default})).filter((function(e){return"function"==typeof e&&!e.options&&!e.__prefetched}))},prefetchLink:function(){if(this.canPrefetch()){f.unobserve(this.$el);var e,t=o(this.getPrefetchComponents());try{for(t.s();!(e=t.n()).done;){var n=e.value,r=n();r instanceof Promise&&r.catch((function(){})),n.__prefetched=!0}}catch(e){t.e(e)}finally{t.f()}}}}}},,,,,,,,,,,,,,,,,,,,,,function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t){t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2},t.isValid=function(e){return e&&void 0!==e.bit&&e.bit>=0&&e.bit<4},t.from=function(e,n){if(t.isValid(e))return e;try{return function(e){if("string"!=typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+e)}}(e)}catch(e){return n}}},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),c=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.BlockIdFlag=t.Tendermint34Client=t.tendermint34=t.VoteType=t.SubscriptionEventType=t.Method=t.broadcastTxSyncSuccess=t.broadcastTxCommitSuccess=t.WebsocketClient=t.HttpClient=t.toSeconds=t.toRfc3339WithNanoseconds=t.fromSeconds=t.fromRfc3339WithNanoseconds=t.DateTime=t.rawSecp256k1PubkeyToRawAddress=t.rawEd25519PubkeyToRawAddress=t.pubkeyToRawAddress=t.pubkeyToAddress=void 0;var l=n(612);Object.defineProperty(t,"pubkeyToAddress",{enumerable:!0,get:function(){return l.pubkeyToAddress}}),Object.defineProperty(t,"pubkeyToRawAddress",{enumerable:!0,get:function(){return l.pubkeyToRawAddress}}),Object.defineProperty(t,"rawEd25519PubkeyToRawAddress",{enumerable:!0,get:function(){return l.rawEd25519PubkeyToRawAddress}}),Object.defineProperty(t,"rawSecp256k1PubkeyToRawAddress",{enumerable:!0,get:function(){return l.rawSecp256k1PubkeyToRawAddress}});var d=n(403);Object.defineProperty(t,"DateTime",{enumerable:!0,get:function(){return d.DateTime}}),Object.defineProperty(t,"fromRfc3339WithNanoseconds",{enumerable:!0,get:function(){return d.fromRfc3339WithNanoseconds}}),Object.defineProperty(t,"fromSeconds",{enumerable:!0,get:function(){return d.fromSeconds}}),Object.defineProperty(t,"toRfc3339WithNanoseconds",{enumerable:!0,get:function(){return d.toRfc3339WithNanoseconds}}),Object.defineProperty(t,"toSeconds",{enumerable:!0,get:function(){return d.toSeconds}});var f=n(404);Object.defineProperty(t,"HttpClient",{enumerable:!0,get:function(){return f.HttpClient}}),Object.defineProperty(t,"WebsocketClient",{enumerable:!0,get:function(){return f.WebsocketClient}});var h=n(242);Object.defineProperty(t,"broadcastTxCommitSuccess",{enumerable:!0,get:function(){return h.broadcastTxCommitSuccess}}),Object.defineProperty(t,"broadcastTxSyncSuccess",{enumerable:!0,get:function(){return h.broadcastTxSyncSuccess}}),Object.defineProperty(t,"Method",{enumerable:!0,get:function(){return h.Method}}),Object.defineProperty(t,"SubscriptionEventType",{enumerable:!0,get:function(){return h.SubscriptionEventType}}),Object.defineProperty(t,"VoteType",{enumerable:!0,get:function(){return h.VoteType}}),t.tendermint34=c(n(242));var A=n(242);Object.defineProperty(t,"Tendermint34Client",{enumerable:!0,get:function(){return A.Tendermint34Client}});var m=n(425);Object.defineProperty(t,"BlockIdFlag",{enumerable:!0,get:function(){return m.BlockIdFlag}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sha384=t.sha512_256=t.sha512=t.SHA512=void 0;const r=n(217),o=n(344),c=n(91),[l,d]=o.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)))),f=new Uint32Array(80),h=new Uint32Array(80);class A extends r.SHA2{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}get(){const{Ah:e,Al:t,Bh:n,Bl:r,Ch:o,Cl:c,Dh:l,Dl:d,Eh:f,El:h,Fh:A,Fl:m,Gh:v,Gl:y,Hh:I,Hl:w}=this;return[e,t,n,r,o,c,l,d,f,h,A,m,v,y,I,w]}set(e,t,n,r,o,c,l,d,f,h,A,m,v,y,I,w){this.Ah=0|e,this.Al=0|t,this.Bh=0|n,this.Bl=0|r,this.Ch=0|o,this.Cl=0|c,this.Dh=0|l,this.Dl=0|d,this.Eh=0|f,this.El=0|h,this.Fh=0|A,this.Fl=0|m,this.Gh=0|v,this.Gl=0|y,this.Hh=0|I,this.Hl=0|w}process(view,e){for(let i=0;i<16;i++,e+=4)f[i]=view.getUint32(e),h[i]=view.getUint32(e+=4);for(let i=16;i<80;i++){const e=0|f[i-15],t=0|h[i-15],n=o.default.rotrSH(e,t,1)^o.default.rotrSH(e,t,8)^o.default.shrSH(e,t,7),r=o.default.rotrSL(e,t,1)^o.default.rotrSL(e,t,8)^o.default.shrSL(e,t,7),c=0|f[i-2],l=0|h[i-2],d=o.default.rotrSH(c,l,19)^o.default.rotrBH(c,l,61)^o.default.shrSH(c,l,6),A=o.default.rotrSL(c,l,19)^o.default.rotrBL(c,l,61)^o.default.shrSL(c,l,6),m=o.default.add4L(r,A,h[i-7],h[i-16]),v=o.default.add4H(m,n,d,f[i-7],f[i-16]);f[i]=0|v,h[i]=0|m}let{Ah:t,Al:n,Bh:r,Bl:c,Ch:A,Cl:m,Dh:v,Dl:y,Eh:I,El:w,Fh:_,Fl:C,Gh:S,Gl:E,Hh:B,Hl:k}=this;for(let i=0;i<80;i++){const e=o.default.rotrSH(I,w,14)^o.default.rotrSH(I,w,18)^o.default.rotrBH(I,w,41),O=o.default.rotrSL(I,w,14)^o.default.rotrSL(I,w,18)^o.default.rotrBL(I,w,41),R=I&_^~I&S,P=w&C^~w&E,x=o.default.add5L(k,O,P,d[i],h[i]),M=o.default.add5H(x,B,e,R,l[i],f[i]),Q=0|x,N=o.default.rotrSH(t,n,28)^o.default.rotrBH(t,n,34)^o.default.rotrBH(t,n,39),D=o.default.rotrSL(t,n,28)^o.default.rotrBL(t,n,34)^o.default.rotrBL(t,n,39),T=t&r^t&A^r&A,j=n&c^n&m^c&m;B=0|S,k=0|E,S=0|_,E=0|C,_=0|I,C=0|w,({h:I,l:w}=o.default.add(0|v,0|y,0|M,0|Q)),v=0|A,y=0|m,A=0|r,m=0|c,r=0|t,c=0|n;const U=o.default.add3L(Q,D,j);t=o.default.add3H(U,M,N,T),n=0|U}({h:t,l:n}=o.default.add(0|this.Ah,0|this.Al,0|t,0|n)),({h:r,l:c}=o.default.add(0|this.Bh,0|this.Bl,0|r,0|c)),({h:A,l:m}=o.default.add(0|this.Ch,0|this.Cl,0|A,0|m)),({h:v,l:y}=o.default.add(0|this.Dh,0|this.Dl,0|v,0|y)),({h:I,l:w}=o.default.add(0|this.Eh,0|this.El,0|I,0|w)),({h:_,l:C}=o.default.add(0|this.Fh,0|this.Fl,0|_,0|C)),({h:S,l:E}=o.default.add(0|this.Gh,0|this.Gl,0|S,0|E)),({h:B,l:k}=o.default.add(0|this.Hh,0|this.Hl,0|B,0|k)),this.set(t,n,r,c,A,m,v,y,I,w,_,C,S,E,B,k)}roundClean(){f.fill(0),h.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)}}t.SHA512=A;class m extends A{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 v extends A{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,c.wrapConstructor)((()=>new A)),t.sha512_256=(0,c.wrapConstructor)((()=>new m)),t.sha384=(0,c.wrapConstructor)((()=>new v))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SHA2=void 0;const r=n(174),o=n(91);class c extends o.Hash{constructor(e,t,n,r){super(),this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=r,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=(0,o.createView)(this.buffer)}update(data){r.default.exists(this);const{view:view,buffer:e,blockLen:t}=this,n=(data=(0,o.toBytes)(data)).length;for(let r=0;rn-l&&(this.process(view,0),l=0);for(let i=l;i>r&o),l=Number(t&o),d=n?4:0,f=n?0:4;view.setUint32(e+d,c,n),view.setUint32(e+f,l,n)}(view,n-8,BigInt(8*this.length),c),this.process(view,0);const d=(0,o.createView)(e);this.get().forEach(((e,i)=>d.setUint32(4*i,e,c)))}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const n=e.slice(0,t);return this.destroy(),n}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:t,buffer:n,length:r,finished:o,destroyed:c,pos:l}=this;return e.length=r,e.pos=l,e.finished=o,e.destroyed=c,r%t&&e.buffer.set(n),e}}t.SHA2=c},function(e,t,n){"use strict";var r=n(8),o=n(345),c=n(9).Buffer,l=new Array(16);function d(){o.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function f(e,t){return e<>>32-t}function h(a,b,e,t,n,r,s){return f(a+(b&e|~b&t)+n+r|0,s)+b|0}function A(a,b,e,t,n,r,s){return f(a+(b&t|e&~t)+n+r|0,s)+b|0}function m(a,b,e,t,n,r,s){return f(a+(b^e^t)+n+r|0,s)+b|0}function v(a,b,e,t,n,r,s){return f(a+(e^(b|~t))+n+r|0,s)+b|0}r(d,o),d.prototype._update=function(){for(var e=l,i=0;i<16;++i)e[i]=this._block.readInt32LE(4*i);var a=this._a,b=this._b,t=this._c,n=this._d;a=h(a,b,t,n,e[0],3614090360,7),n=h(n,a,b,t,e[1],3905402710,12),t=h(t,n,a,b,e[2],606105819,17),b=h(b,t,n,a,e[3],3250441966,22),a=h(a,b,t,n,e[4],4118548399,7),n=h(n,a,b,t,e[5],1200080426,12),t=h(t,n,a,b,e[6],2821735955,17),b=h(b,t,n,a,e[7],4249261313,22),a=h(a,b,t,n,e[8],1770035416,7),n=h(n,a,b,t,e[9],2336552879,12),t=h(t,n,a,b,e[10],4294925233,17),b=h(b,t,n,a,e[11],2304563134,22),a=h(a,b,t,n,e[12],1804603682,7),n=h(n,a,b,t,e[13],4254626195,12),t=h(t,n,a,b,e[14],2792965006,17),a=A(a,b=h(b,t,n,a,e[15],1236535329,22),t,n,e[1],4129170786,5),n=A(n,a,b,t,e[6],3225465664,9),t=A(t,n,a,b,e[11],643717713,14),b=A(b,t,n,a,e[0],3921069994,20),a=A(a,b,t,n,e[5],3593408605,5),n=A(n,a,b,t,e[10],38016083,9),t=A(t,n,a,b,e[15],3634488961,14),b=A(b,t,n,a,e[4],3889429448,20),a=A(a,b,t,n,e[9],568446438,5),n=A(n,a,b,t,e[14],3275163606,9),t=A(t,n,a,b,e[3],4107603335,14),b=A(b,t,n,a,e[8],1163531501,20),a=A(a,b,t,n,e[13],2850285829,5),n=A(n,a,b,t,e[2],4243563512,9),t=A(t,n,a,b,e[7],1735328473,14),a=m(a,b=A(b,t,n,a,e[12],2368359562,20),t,n,e[5],4294588738,4),n=m(n,a,b,t,e[8],2272392833,11),t=m(t,n,a,b,e[11],1839030562,16),b=m(b,t,n,a,e[14],4259657740,23),a=m(a,b,t,n,e[1],2763975236,4),n=m(n,a,b,t,e[4],1272893353,11),t=m(t,n,a,b,e[7],4139469664,16),b=m(b,t,n,a,e[10],3200236656,23),a=m(a,b,t,n,e[13],681279174,4),n=m(n,a,b,t,e[0],3936430074,11),t=m(t,n,a,b,e[3],3572445317,16),b=m(b,t,n,a,e[6],76029189,23),a=m(a,b,t,n,e[9],3654602809,4),n=m(n,a,b,t,e[12],3873151461,11),t=m(t,n,a,b,e[15],530742520,16),a=v(a,b=m(b,t,n,a,e[2],3299628645,23),t,n,e[0],4096336452,6),n=v(n,a,b,t,e[7],1126891415,10),t=v(t,n,a,b,e[14],2878612391,15),b=v(b,t,n,a,e[5],4237533241,21),a=v(a,b,t,n,e[12],1700485571,6),n=v(n,a,b,t,e[3],2399980690,10),t=v(t,n,a,b,e[10],4293915773,15),b=v(b,t,n,a,e[1],2240044497,21),a=v(a,b,t,n,e[8],1873313359,6),n=v(n,a,b,t,e[15],4264355552,10),t=v(t,n,a,b,e[6],2734768916,15),b=v(b,t,n,a,e[13],1309151649,21),a=v(a,b,t,n,e[4],4149444226,6),n=v(n,a,b,t,e[11],3174756917,10),t=v(t,n,a,b,e[2],718787259,15),b=v(b,t,n,a,e[9],3951481745,21),this._a=this._a+a|0,this._b=this._b+b|0,this._c=this._c+t|0,this._d=this._d+n|0},d.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=c.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=d},function(e,t,n){(function(t){function n(e){try{if(!t.localStorage)return!1}catch(e){return!1}var n=t.localStorage[e];return null!=n&&"true"===String(n).toLowerCase()}e.exports=function(e,t){if(n("noDeprecation"))return e;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(t);n("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}}}).call(this,n(3))},function(e,t,n){"use strict";var r=n(116).codes.ERR_STREAM_PREMATURE_CLOSE;function o(){}e.exports=function e(t,n,c){if("function"==typeof n)return e(t,null,n);n||(n={}),c=function(e){var t=!1;return function(){if(!t){t=!0;for(var n=arguments.length,r=new Array(n),o=0;o>>32-t}function I(a,b,e,t,n,r,o,s){return y(a+(b^e^t)+r+o|0,s)+n|0}function w(a,b,e,t,n,r,o,s){return y(a+(b&e|~b&t)+r+o|0,s)+n|0}function _(a,b,e,t,n,r,o,s){return y(a+((b|~e)^t)+r+o|0,s)+n|0}function C(a,b,e,t,n,r,o,s){return y(a+(b&t|e&~t)+r+o|0,s)+n|0}function S(a,b,e,t,n,r,o,s){return y(a+(b^(e|~t))+r+o|0,s)+n|0}o(v,c),v.prototype._update=function(){for(var e=l,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);for(var n=0|this._a,r=0|this._b,o=0|this._c,dl=0|this._d,c=0|this._e,v=0|this._a,br=0|this._b,E=0|this._c,B=0|this._d,k=0|this._e,i=0;i<80;i+=1){var O,tr;i<16?(O=I(n,r,o,dl,c,e[d[i]],m[0],h[i]),tr=S(v,br,E,B,k,e[f[i]],hr[0],A[i])):i<32?(O=w(n,r,o,dl,c,e[d[i]],m[1],h[i]),tr=C(v,br,E,B,k,e[f[i]],hr[1],A[i])):i<48?(O=_(n,r,o,dl,c,e[d[i]],m[2],h[i]),tr=_(v,br,E,B,k,e[f[i]],hr[2],A[i])):i<64?(O=C(n,r,o,dl,c,e[d[i]],m[3],h[i]),tr=w(v,br,E,B,k,e[f[i]],hr[3],A[i])):(O=S(n,r,o,dl,c,e[d[i]],m[4],h[i]),tr=I(v,br,E,B,k,e[f[i]],hr[4],A[i])),n=c,c=dl,dl=y(o,10),o=r,r=O,v=k,k=B,B=y(E,10),E=br,br=tr}var R=this._b+o+B|0;this._b=this._c+dl+k|0,this._c=this._d+c+v|0,this._d=this._e+n+br|0,this._e=this._a+r+E|0,this._a=R},v.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=r.alloc?r.alloc(20):new r(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=v},function(e,t,n){(t=e.exports=function(e){e=e.toLowerCase();var n=t[e];if(!n)throw new Error(e+" is not supported (we accept pull requests)");return new n}).sha=n(637),t.sha1=n(638),t.sha224=n(639),t.sha256=n(352),t.sha384=n(640),t.sha512=n(353)},function(e,t,n){(t=e.exports=n(354)).Stream=t,t.Readable=t,t.Writable=n(225),t.Duplex=n(94),t.Transform=n(357),t.PassThrough=n(645)},function(e,t,n){var r=n(14),o=r.Buffer;function c(e,t){for(var n in e)t[n]=e[n]}function l(e,t,n){return o(e,t,n)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=r:(c(r,t),t.Buffer=l),c(o,l),l.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return o(e,t,n)},l.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=o(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},l.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o(e)},l.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},function(e,t,n){"use strict";(function(t){var r=n(176);function o(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,n){var r=e.entry;e.entry=null;for(;r;){var o=r.callback;t.pendingcb--,o(n),r=r.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}(t,e)}}e.exports=_;var c,l=r.nextTick;_.WritableState=w;var d=Object.create(n(136));d.inherits=n(8);var f={deprecate:n(219)},h=n(355),A=n(224).Buffer,m=t.Uint8Array||function(){};var v,y=n(356);function I(){}function w(e,t){c=c||n(94),e=e||{};var d=t instanceof c;this.objectMode=!!e.objectMode,d&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var f=e.highWaterMark,h=e.writableHighWaterMark,A=this.objectMode?16:16384;this.highWaterMark=f||0===f?f:d&&(h||0===h)?h:A,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var m=!1===e.decodeStrings;this.decodeStrings=!m,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,o=n.sync,c=n.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,o,c){--t.pendingcb,n?(r.nextTick(c,o),r.nextTick(O,e,t),e._writableState.errorEmitted=!0,e.emit("error",o)):(c(o),e._writableState.errorEmitted=!0,e.emit("error",o),O(e,t))}(e,n,o,t,c);else{var d=B(n);d||n.corked||n.bufferProcessing||!n.bufferedRequest||E(e,n),o?l(S,e,n,d,c):S(e,n,d,c)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this)}function _(e){if(c=c||n(94),!(v.call(_,this)||this instanceof c))return new _(e);this._writableState=new w(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),h.call(this)}function C(e,t,n,r,o,c,l){t.writelen=r,t.writecb=l,t.writing=!0,t.sync=!0,n?e._writev(o,t.onwrite):e._write(o,c,t.onwrite),t.sync=!1}function S(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),O(e,t)}function E(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,c=new Array(r),l=t.corkedRequestsFree;l.entry=n;for(var d=0,f=!0;n;)c[d]=n,n.isBuf||(f=!1),n=n.next,d+=1;c.allBuffers=f,C(e,t,!0,t.length,c,"",l.finish),t.pendingcb++,t.lastBufferedRequest=null,l.next?(t.corkedRequestsFree=l.next,l.next=null):t.corkedRequestsFree=new o(t),t.bufferedRequestCount=0}else{for(;n;){var h=n.chunk,A=n.encoding,m=n.callback;if(C(e,t,!1,t.objectMode?1:h.length,h,A,m),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function B(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function k(e,t){e._final((function(n){t.pendingcb--,n&&e.emit("error",n),t.prefinished=!0,e.emit("prefinish"),O(e,t)}))}function O(e,t){var n=B(t);return n&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,r.nextTick(k,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),n}d.inherits(_,h),w.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(w.prototype,"buffer",{get:f.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(v=Function.prototype[Symbol.hasInstance],Object.defineProperty(_,Symbol.hasInstance,{value:function(object){return!!v.call(this,object)||this===_&&(object&&object._writableState instanceof w)}})):v=function(object){return object instanceof this},_.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},_.prototype.write=function(e,t,n){var o,c=this._writableState,l=!1,d=!c.objectMode&&(o=e,A.isBuffer(o)||o instanceof m);return d&&!A.isBuffer(e)&&(e=function(e){return A.from(e)}(e)),"function"==typeof t&&(n=t,t=null),d?t="buffer":t||(t=c.defaultEncoding),"function"!=typeof n&&(n=I),c.ended?function(e,t){var n=new Error("write after end");e.emit("error",n),r.nextTick(t,n)}(this,n):(d||function(e,t,n,o){var c=!0,l=!1;return null===n?l=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||t.objectMode||(l=new TypeError("Invalid non-string/buffer chunk")),l&&(e.emit("error",l),r.nextTick(o,l),c=!1),c}(this,c,e,n))&&(c.pendingcb++,l=function(e,t,n,r,o,c){if(!n){var l=function(e,t,n){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=A.from(t,n));return t}(t,r,o);r!==l&&(n=!0,o="buffer",r=l)}var d=t.objectMode?1:r.length;t.length+=d;var f=t.length-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(_.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),_.prototype._write=function(e,t,n){n(new Error("_write() is not implemented"))},_.prototype._writev=null,_.prototype.end=function(e,t,n){var o=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),o.corked&&(o.corked=1,this.uncork()),o.ending||o.finished||function(e,t,n){t.ending=!0,O(e,t),n&&(t.finished?r.nextTick(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,o,n)},Object.defineProperty(_.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),_.prototype.destroy=y.destroy,_.prototype._undestroy=y.undestroy,_.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,n(3))},function(e,t,n){"use strict";var r=n(48);function o(e){this.options=e,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0}e.exports=o,o.prototype._init=function(){},o.prototype.update=function(data){return 0===data.length?[]:"decrypt"===this.type?this._updateDecrypt(data):this._updateEncrypt(data)},o.prototype._buffer=function(data,e){for(var t=Math.min(this.buffer.length-this.bufferOff,data.length-e),i=0;i0;n--)e+=this._buffer(data,e),t+=this._flushBuffer(r,t);return e+=this._buffer(data,e),r},o.prototype.final=function(e){var t,n;return e&&(t=this.update(e)),n="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),t?t.concat(n):n},o.prototype._pad=function(e,t){if(0===t)return!1;for(;t=0||!t.umod(e.prime1)||!t.umod(e.prime2));return t}function l(e,n){var o=function(e){var t=c(e);return{blinder:t.toRed(r.mont(e.modulus)).redPow(new r(e.publicExponent)).fromRed(),unblinder:t.invm(e.modulus)}}(n),l=n.modulus.byteLength(),d=new r(e).mul(o.blinder).umod(n.modulus),f=d.toRed(r.mont(n.prime1)),h=d.toRed(r.mont(n.prime2)),A=n.coefficient,p=n.prime1,q=n.prime2,m=f.redPow(n.exponent1).fromRed(),v=h.redPow(n.exponent2).fromRed(),y=m.isub(v).imul(A).umod(p).imul(q);return v.iadd(y).imul(o.unblinder).umod(n.modulus).toArrayLike(t,"be",l)}l.getr=c,e.exports=l}).call(this,n(14).Buffer)},function(e,t,n){"use strict";var pre,r=t,o=n(233),c=n(382),l=n(49).assert;function d(e){"short"===e.type?this.curve=new c.short(e):"edwards"===e.type?this.curve=new c.edwards(e):this.curve=new c.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,l(this.g.validate(),"Invalid curve"),l(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function f(e,t){Object.defineProperty(r,e,{configurable:!0,enumerable:!0,get:function(){var n=new d(t);return Object.defineProperty(r,e,{configurable:!0,enumerable:!0,value:n}),n}})}r.PresetCurve=d,f("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"]}),f("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"]}),f("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"]}),f("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"]}),f("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"]}),f("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"]}),f("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{pre=n(695)}catch(e){pre=void 0}f("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",pre]})},function(e,t,n){var r=t;r.utils=n(59),r.common=n(139),r.sha=n(689),r.ripemd=n(693),r.hmac=n(694),r.sha1=r.sha.sha1,r.sha256=r.sha.sha256,r.sha224=r.sha.sha224,r.sha384=r.sha.sha384,r.sha512=r.sha.sha512,r.ripemd160=r.ripemd.ripemd160},function(e,t,n){"use strict";(function(t){var r,o=n(14),c=o.Buffer,l={};for(r in o)o.hasOwnProperty(r)&&"SlowBuffer"!==r&&"Buffer"!==r&&(l[r]=o[r]);var d=l.Buffer={};for(r in c)c.hasOwnProperty(r)&&"allocUnsafe"!==r&&"allocUnsafeSlow"!==r&&(d[r]=c[r]);if(l.Buffer.prototype=c.prototype,d.from&&d.from!==Uint8Array.from||(d.from=function(e,t,n){if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type '+typeof e);if(e&&void 0===e.length)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);return c(e,t,n)}),d.alloc||(d.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError('The "size" argument must be of type number. Received type '+typeof e);if(e<0||e>=2*(1<<30))throw new RangeError('The value "'+e+'" is invalid for option "size"');var r=c(e);return t&&0!==t.length?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r}),!l.kStringMaxLength)try{l.kStringMaxLength=t.binding("buffer").kStringMaxLength}catch(e){}l.constants||(l.constants={MAX_LENGTH:l.kMaxLength},l.kStringMaxLength&&(l.constants.MAX_STRING_LENGTH=l.kStringMaxLength)),e.exports=l}).call(this,n(19))},function(e,t,n){"use strict";const r=n(236).Reporter,o=n(140).EncoderBuffer,c=n(140).DecoderBuffer,l=n(48),d=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],f=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(d);function h(e,t,n){const r={};this._baseState=r,r.name=n,r.enc=e,r.parent=t||null,r.children=null,r.tag=null,r.args=null,r.reverseArgs=null,r.choice=null,r.optional=!1,r.any=!1,r.obj=!1,r.use=null,r.useDecoder=null,r.key=null,r.default=null,r.explicit=null,r.implicit=null,r.contains=null,r.parent||(r.children=[],this._wrap())}e.exports=h;const A=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];h.prototype.clone=function(){const e=this._baseState,t={};A.forEach((function(n){t[n]=e[n]}));const n=new this.constructor(t.parent);return n._baseState=t,n},h.prototype._wrap=function(){const e=this._baseState;f.forEach((function(t){this[t]=function(){const n=new this.constructor(this);return e.children.push(n),n[t].apply(n,arguments)}}),this)},h.prototype._init=function(body){const e=this._baseState;l(null===e.parent),body.call(this),e.children=e.children.filter((function(e){return e._baseState.parent===this}),this),l.equal(e.children.length,1,"Root node can have only one child")},h.prototype._useArgs=function(e){const t=this._baseState,n=e.filter((function(e){return e instanceof this.constructor}),this);e=e.filter((function(e){return!(e instanceof this.constructor)}),this),0!==n.length&&(l(null===t.children),t.children=n,n.forEach((function(e){e._baseState.parent=this}),this)),0!==e.length&&(l(null===t.args),t.args=e,t.reverseArgs=e.map((function(e){if("object"!=typeof e||e.constructor!==Object)return e;const t={};return Object.keys(e).forEach((function(n){n==(0|n)&&(n|=0);const r=e[n];t[r]=n})),t})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(e){h.prototype[e]=function(){const t=this._baseState;throw new Error(e+" not implemented for encoding: "+t.enc)}})),d.forEach((function(e){h.prototype[e]=function(){const t=this._baseState,n=Array.prototype.slice.call(arguments);return l(null===t.tag),t.tag=e,this._useArgs(n),this}})),h.prototype.use=function(e){l(e);const t=this._baseState;return l(null===t.use),t.use=e,this},h.prototype.optional=function(){return this._baseState.optional=!0,this},h.prototype.def=function(e){const t=this._baseState;return l(null===t.default),t.default=e,t.optional=!0,this},h.prototype.explicit=function(e){const t=this._baseState;return l(null===t.explicit&&null===t.implicit),t.explicit=e,this},h.prototype.implicit=function(e){const t=this._baseState;return l(null===t.explicit&&null===t.implicit),t.implicit=e,this},h.prototype.obj=function(){const e=this._baseState,t=Array.prototype.slice.call(arguments);return e.obj=!0,0!==t.length&&this._useArgs(t),this},h.prototype.key=function(e){const t=this._baseState;return l(null===t.key),t.key=e,this},h.prototype.any=function(){return this._baseState.any=!0,this},h.prototype.choice=function(e){const t=this._baseState;return l(null===t.choice),t.choice=e,this._useArgs(Object.keys(e).map((function(t){return e[t]}))),this},h.prototype.contains=function(e){const t=this._baseState;return l(null===t.use),t.contains=e,this},h.prototype._decode=function(input,e){const t=this._baseState;if(null===t.parent)return input.wrapResult(t.children[0]._decode(input,e));let n,r=t.default,o=!0,l=null;if(null!==t.key&&(l=input.enterKey(t.key)),t.optional){let n=null;if(null!==t.explicit?n=t.explicit:null!==t.implicit?n=t.implicit:null!==t.tag&&(n=t.tag),null!==n||t.any){if(o=this._peekTag(input,n,t.any),input.isError(o))return o}else{const n=input.save();try{null===t.choice?this._decodeGeneric(t.tag,input,e):this._decodeChoice(input,e),o=!0}catch(e){o=!1}input.restore(n)}}if(t.obj&&o&&(n=input.enterObject()),o){if(null!==t.explicit){const e=this._decodeTag(input,t.explicit);if(input.isError(e))return e;input=e}const n=input.offset;if(null===t.use&&null===t.choice){let e;t.any&&(e=input.save());const body=this._decodeTag(input,null!==t.implicit?t.implicit:t.tag,t.any);if(input.isError(body))return body;t.any?r=input.raw(e):input=body}if(e&&e.track&&null!==t.tag&&e.track(input.path(),n,input.length,"tagged"),e&&e.track&&null!==t.tag&&e.track(input.path(),input.offset,input.length,"content"),t.any||(r=null===t.choice?this._decodeGeneric(t.tag,input,e):this._decodeChoice(input,e)),input.isError(r))return r;if(t.any||null!==t.choice||null===t.children||t.children.forEach((function(t){t._decode(input,e)})),t.contains&&("octstr"===t.tag||"bitstr"===t.tag)){const data=new c(r);r=this._getUse(t.contains,input._reporterState.obj)._decode(data,e)}}return t.obj&&o&&(r=input.leaveObject(n)),null===t.key||null===r&&!0!==o?null!==l&&input.exitKey(l):input.leaveKey(l,t.key,r),r},h.prototype._decodeGeneric=function(e,input,t){const n=this._baseState;return"seq"===e||"set"===e?null:"seqof"===e||"setof"===e?this._decodeList(input,e,n.args[0],t):/str$/.test(e)?this._decodeStr(input,e,t):"objid"===e&&n.args?this._decodeObjid(input,n.args[0],n.args[1],t):"objid"===e?this._decodeObjid(input,null,null,t):"gentime"===e||"utctime"===e?this._decodeTime(input,e,t):"null_"===e?this._decodeNull(input,t):"bool"===e?this._decodeBool(input,t):"objDesc"===e?this._decodeStr(input,e,t):"int"===e||"enum"===e?this._decodeInt(input,n.args&&n.args[0],t):null!==n.use?this._getUse(n.use,input._reporterState.obj)._decode(input,t):input.error("unknown tag: "+e)},h.prototype._getUse=function(e,t){const n=this._baseState;return n.useDecoder=this._use(e,t),l(null===n.useDecoder._baseState.parent),n.useDecoder=n.useDecoder._baseState.children[0],n.implicit!==n.useDecoder._baseState.implicit&&(n.useDecoder=n.useDecoder.clone(),n.useDecoder._baseState.implicit=n.implicit),n.useDecoder},h.prototype._decodeChoice=function(input,e){const t=this._baseState;let n=null,r=!1;return Object.keys(t.choice).some((function(o){const c=input.save(),l=t.choice[o];try{const t=l._decode(input,e);if(input.isError(t))return!1;n={type:o,value:t},r=!0}catch(e){return input.restore(c),!1}return!0}),this),r?n:input.error("Choice not matched")},h.prototype._createEncoderBuffer=function(data){return new o(data,this.reporter)},h.prototype._encode=function(data,e,t){const n=this._baseState;if(null!==n.default&&n.default===data)return;const r=this._encodeValue(data,e,t);return void 0===r||this._skipDefault(r,e,t)?void 0:r},h.prototype._encodeValue=function(data,e,t){const n=this._baseState;if(null===n.parent)return n.children[0]._encode(data,e||new r);let o=null;if(this.reporter=e,n.optional&&void 0===data){if(null===n.default)return;data=n.default}let content=null,c=!1;if(n.any)o=this._createEncoderBuffer(data);else if(n.choice)o=this._encodeChoice(data,e);else if(n.contains)content=this._getUse(n.contains,t)._encode(data,e),c=!0;else if(n.children)content=n.children.map((function(t){if("null_"===t._baseState.tag)return t._encode(null,e,data);if(null===t._baseState.key)return e.error("Child should have a key");const n=e.enterKey(t._baseState.key);if("object"!=typeof data)return e.error("Child expected, but input is not object");const r=t._encode(data[t._baseState.key],e,data);return e.leaveKey(n),r}),this).filter((function(e){return e})),content=this._createEncoderBuffer(content);else if("seqof"===n.tag||"setof"===n.tag){if(!n.args||1!==n.args.length)return e.error("Too many args for : "+n.tag);if(!Array.isArray(data))return e.error("seqof/setof, but data is not Array");const t=this.clone();t._baseState.implicit=null,content=this._createEncoderBuffer(data.map((function(t){const n=this._baseState;return this._getUse(n.args[0],data)._encode(t,e)}),t))}else null!==n.use?o=this._getUse(n.use,t)._encode(data,e):(content=this._encodePrimitive(n.tag,data),c=!0);if(!n.any&&null===n.choice){const t=null!==n.implicit?n.implicit:n.tag,r=null===n.implicit?"universal":"context";null===t?null===n.use&&e.error("Tag could be omitted only for .use()"):null===n.use&&(o=this._encodeComposite(t,c,r,content))}return null!==n.explicit&&(o=this._encodeComposite(n.explicit,!1,"context",o)),o},h.prototype._encodeChoice=function(data,e){const t=this._baseState,n=t.choice[data.type];return n||l(!1,data.type+" not found in "+JSON.stringify(Object.keys(t.choice))),n._encode(data.value,e)},h.prototype._encodePrimitive=function(e,data){const t=this._baseState;if(/str$/.test(e))return this._encodeStr(data,e);if("objid"===e&&t.args)return this._encodeObjid(data,t.reverseArgs[0],t.args[1]);if("objid"===e)return this._encodeObjid(data,null,null);if("gentime"===e||"utctime"===e)return this._encodeTime(data,e);if("null_"===e)return this._encodeNull();if("int"===e||"enum"===e)return this._encodeInt(data,t.args&&t.reverseArgs[0]);if("bool"===e)return this._encodeBool(data);if("objDesc"===e)return this._encodeStr(data,e);throw new Error("Unsupported tag: "+e)},h.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)},h.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(e)}},function(e,t,n){"use strict";const r=n(8);function o(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}function c(path,e){this.path=path,this.rethrow(e)}t.Reporter=o,o.prototype.isError=function(e){return e instanceof c},o.prototype.save=function(){const e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}},o.prototype.restore=function(data){const e=this._reporterState;e.obj=data.obj,e.path=e.path.slice(0,data.pathLen)},o.prototype.enterKey=function(e){return this._reporterState.path.push(e)},o.prototype.exitKey=function(e){const t=this._reporterState;t.path=t.path.slice(0,e-1)},o.prototype.leaveKey=function(e,t,n){const r=this._reporterState;this.exitKey(e),null!==r.obj&&(r.obj[t]=n)},o.prototype.path=function(){return this._reporterState.path.join("/")},o.prototype.enterObject=function(){const e=this._reporterState,t=e.obj;return e.obj={},t},o.prototype.leaveObject=function(e){const t=this._reporterState,n=t.obj;return t.obj=e,n},o.prototype.error=function(e){let t;const n=this._reporterState,r=e instanceof c;if(t=r?e:new c(n.path.map((function(e){return"["+JSON.stringify(e)+"]"})).join(""),e.message||e,e.stack),!n.options.partial)throw t;return r||n.errors.push(t),t},o.prototype.wrapResult=function(e){const t=this._reporterState;return t.options.partial?{result:this.isError(e)?null:e,errors:t.errors}:e},r(c,Error),c.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,c),!this.stack)try{throw new Error(this.message)}catch(e){this.stack=e.stack}return this}},function(e,t,n){"use strict";function r(map){const e={};return Object.keys(map).forEach((function(t){(0|t)==t&&(t|=0);const n=map[t];e[n]=t})),e}t.tagClass={0:"universal",1:"application",2:"context",3:"private"},t.tagClassByName=r(t.tagClass),t.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},t.tagByName=r(t.tag)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sha512=t.Sha512=t.sha256=t.Sha256=void 0;const r=n(396),o=n(216),c=n(239);class l{constructor(e){this.blockSize=64,this.impl=r.sha256.create(),e&&this.update(e)}update(data){return this.impl.update((0,c.toRealUint8Array)(data)),this}digest(){return this.impl.digest()}}t.Sha256=l,t.sha256=function(data){return new l(data).digest()};class d{constructor(e){this.blockSize=128,this.impl=o.sha512.create(),e&&this.update(e)}update(data){return this.impl.update((0,c.toRealUint8Array)(data)),this}digest(){return this.impl.digest()}}t.Sha512=d,t.sha512=function(data){return new d(data).digest()}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toRealUint8Array=void 0,t.toRealUint8Array=function(data){return data instanceof Uint8Array?data:Uint8Array.from(data)}},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hasProtocol=t.instanceOfRpcStreamingClient=void 0,t.instanceOfRpcStreamingClient=function(e){return"function"==typeof e.listen},t.hasProtocol=function(e){return-1!==e.search("://")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Tendermint34Client=t.VoteType=t.broadcastTxSyncSuccess=t.broadcastTxCommitSuccess=t.SubscriptionEventType=t.Method=void 0;var r=n(243);Object.defineProperty(t,"Method",{enumerable:!0,get:function(){return r.Method}}),Object.defineProperty(t,"SubscriptionEventType",{enumerable:!0,get:function(){return r.SubscriptionEventType}});var o=n(777);Object.defineProperty(t,"broadcastTxCommitSuccess",{enumerable:!0,get:function(){return o.broadcastTxCommitSuccess}}),Object.defineProperty(t,"broadcastTxSyncSuccess",{enumerable:!0,get:function(){return o.broadcastTxSyncSuccess}}),Object.defineProperty(t,"VoteType",{enumerable:!0,get:function(){return o.VoteType}});var c=n(778);Object.defineProperty(t,"Tendermint34Client",{enumerable:!0,get:function(){return c.Tendermint34Client}})},function(e,t,n){"use strict";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"}(t.Method||(t.Method={})),function(e){e.NewBlock="NewBlock",e.NewBlockHeader="NewBlockHeader",e.Tx="Tx"}(t.SubscriptionEventType||(t.SubscriptionEventType={})),t.buildQuery=function(e){return[...(e.tags?e.tags:[]).map((e=>`${e.key}='${e.value}'`)),...e.raw?[e.raw]:[]].join(" AND ")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeBlockId=t.encodeVersion=t.encodeBytes=t.encodeTime=t.encodeInt=t.encodeString=t.Integer=t.dictionaryToStringMap=t.may=t.optional=t.assertNotEmpty=t.assertObject=t.assertArray=t.assertNumber=t.assertString=t.assertBoolean=t.assertSet=void 0;const r=n(17),o=n(34);function c(e){if(void 0===e)throw new Error("Value must not be undefined");if(null===e)throw new Error("Value must not be null");return e}t.assertSet=c,t.assertBoolean=function(e){if(c(e),"boolean"!=typeof e)throw new Error("Value must be a boolean");return e},t.assertString=function(e){if(c(e),"string"!=typeof e)throw new Error("Value must be a string");return e},t.assertNumber=function(e){if(c(e),"number"!=typeof e)throw new Error("Value must be a number");return e},t.assertArray=function(e){if(c(e),!Array.isArray(e))throw new Error("Value must be a an array");return e},t.assertObject=function(e){if(c(e),"object"!=typeof e)throw new Error("Value must be an object");if("[object Object]"!==Object.prototype.toString.call(e))throw new Error("Value must be a simple object");return e},t.assertNotEmpty=function(e){if(c(e),"number"==typeof e&&0===e)throw new Error("must provide a non-zero value");if(0===e.length)throw new Error("must provide a non-empty value");return e},t.optional=function(e,t){return null==e?t:e},t.may=function(e,t){return null==t?void 0:e(t)},t.dictionaryToStringMap=function(e){const t=new Map;for(const n of Object.keys(e)){const r=e[n];if("string"!=typeof r)throw new Error("Found dictionary value of type other than string");t.set(n,r)}return t};function l(e){return e>=128?Uint8Array.from([255&e|128,...l(e>>7)]):Uint8Array.from([255&e])}t.Integer=class{static parse(input){return("number"==typeof input?new o.Int53(input):o.Int53.fromString(input)).toNumber()}static encode(e){return new o.Int53(e).toString()}},t.encodeString=function(s){const e=(0,r.toUtf8)(s);return Uint8Array.from([e.length,...e])},t.encodeInt=l,t.encodeTime=function(time){const e=time.getTime(),t=Math.floor(e/1e3),n=t?[8,...l(t)]:new Uint8Array,r=(time.nanoseconds||0)+e%1e3*1e6,o=r?[16,...l(r)]:new Uint8Array;return Uint8Array.from([...n,...o])},t.encodeBytes=function(e){if(e.length>=128)throw new Error("Not implemented for byte arrays of length 128 or more");return e.length?Uint8Array.from([e.length,...e]):new Uint8Array},t.encodeVersion=function(e){const t=e.block?Uint8Array.from([8,...l(e.block)]):new Uint8Array,n=e.app?Uint8Array.from([16,...l(e.app)]):new Uint8Array;return Uint8Array.from([...t,...n])},t.encodeBlockId=function(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])}},function(e,t,n){"use strict";(function(e){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.CompactBitArray=t.MultiSignature=t.protobufPackage=void 0;const o=r(n(1)),c=r(n(2));t.protobufPackage="cosmos.crypto.multisig.v1beta1";const l={};t.MultiSignature={encode(e,t=c.default.Writer.create()){for(const n of e.signatures)t.uint32(10).bytes(n);return t},decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},l);for(r.signatures=[];t.pos>>3==1)r.signatures.push(t.bytes());else t.skipType(7&e)}return r},fromJSON(object){var e;const t=Object.assign({},l);return t.signatures=(null!==(e=object.signatures)&&void 0!==e?e:[]).map((e=>A(e))),t},toJSON(e){const t={};return e.signatures?t.signatures=e.signatures.map((e=>v(void 0!==e?e:new Uint8Array))):t.signatures=[],t},fromPartial(object){var e;const t=Object.assign({},l);return t.signatures=(null===(e=object.signatures)||void 0===e?void 0:e.map((e=>e)))||[],t}};const d={extraBitsStored:0};t.CompactBitArray={encode:(e,t=c.default.Writer.create())=>(0!==e.extraBitsStored&&t.uint32(8).uint32(e.extraBitsStored),0!==e.elems.length&&t.uint32(18).bytes(e.elems),t),decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},d);for(r.elems=new Uint8Array;t.pos>>3){case 1:r.extraBitsStored=t.uint32();break;case 2:r.elems=t.bytes();break;default:t.skipType(7&e)}}return r},fromJSON(object){const e=Object.assign({},d);return e.extraBitsStored=void 0!==object.extraBitsStored&&null!==object.extraBitsStored?Number(object.extraBitsStored):0,e.elems=void 0!==object.elems&&null!==object.elems?A(object.elems):new Uint8Array,e},toJSON(e){const t={};return void 0!==e.extraBitsStored&&(t.extraBitsStored=e.extraBitsStored),void 0!==e.elems&&(t.elems=v(void 0!==e.elems?e.elems:new Uint8Array)),t},fromPartial(object){var e,t;const n=Object.assign({},d);return n.extraBitsStored=null!==(e=object.extraBitsStored)&&void 0!==e?e:0,n.elems=null!==(t=object.elems)&&void 0!==t?t:new Uint8Array,n}};var f=(()=>{if(void 0!==f)return f;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==e)return e;throw"Unable to locate global object"})();const h=f.atob||(e=>f.Buffer.from(e,"base64").toString("binary"));function A(e){const t=h(e),n=new Uint8Array(t.length);for(let i=0;if.Buffer.from(e,"binary").toString("base64"));function v(e){const t=[];for(const n of e)t.push(String.fromCharCode(n));return m(t.join(""))}c.default.util.Long!==o.default&&(c.default.util.Long=o.default,c.default.configure())}).call(this,n(3))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeBech32Pubkey=t.encodeAminoPubkey=t.decodeBech32Pubkey=t.decodeAminoPubkey=t.encodeSecp256k1Pubkey=void 0;const r=n(17),o=n(34),c=n(33),l=n(184);t.encodeSecp256k1Pubkey=function(e){if(33!==e.length||2!==e[0]&&3!==e[0])throw new Error("Public key must be compressed secp256k1, i.e. 33 bytes starting with 0x02 or 0x03");return{type:l.pubkeyType.secp256k1,value:(0,r.toBase64)(e)}};const d=(0,r.fromHex)("eb5ae98721"),f=(0,r.fromHex)("1624de6420"),h=(0,r.fromHex)("0dfb100520"),A=(0,r.fromHex)("22c1f7e2");function m(data){if((0,c.arrayContentStartsWith)(data,d)){const e=data.slice(d.length);if(33!==e.length)throw new Error("Invalid rest data length. Expected 33 bytes (compressed secp256k1 pubkey).");return{type:l.pubkeyType.secp256k1,value:(0,r.toBase64)(e)}}if((0,c.arrayContentStartsWith)(data,f)){const e=data.slice(f.length);if(32!==e.length)throw new Error("Invalid rest data length. Expected 32 bytes (Ed25519 pubkey).");return{type:l.pubkeyType.ed25519,value:(0,r.toBase64)(e)}}if((0,c.arrayContentStartsWith)(data,h)){const e=data.slice(h.length);if(32!==e.length)throw new Error("Invalid rest data length. Expected 32 bytes (Sr25519 pubkey).");return{type:l.pubkeyType.sr25519,value:(0,r.toBase64)(e)}}if((0,c.arrayContentStartsWith)(data,A))return function(data){const e=Array.from(data),t=e.splice(0,A.length);if(!(0,c.arrayContentStartsWith)(t,A))throw new Error("Invalid multisig prefix.");if(8!=e.shift())throw new Error("Invalid multisig data. Expecting 0x08 prefix before threshold.");const[n,r]=v(e);e.splice(0,r);const o=[];for(;e.length>0;){if(18!=e.shift())throw new Error("Invalid multisig data. Expecting 0x12 prefix before participant pubkey length.");const[t,n]=v(e);if(e.splice(0,n),e.length127)throw new 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 y(e){const t=o.Uint53.fromString(e.toString()).toNumber();if(t>127)throw new 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 I(e){if((0,l.isMultisigThresholdPubkey)(e)){const t=Array.from(A);t.push(8),t.push(...y(e.value.threshold));for(const n of e.value.pubkeys.map((p=>I(p))))t.push(18),t.push(...y(n.length)),t.push(...n);return new Uint8Array(t)}if((0,l.isEd25519Pubkey)(e))return new Uint8Array([...f,...(0,r.fromBase64)(e.value)]);if((0,l.isSecp256k1Pubkey)(e))return new Uint8Array([...d,...(0,r.fromBase64)(e.value)]);throw new Error("Unsupported pubkey type")}t.decodeAminoPubkey=m,t.decodeBech32Pubkey=function(e){const{data:data}=(0,r.fromBech32)(e);return m(data)},t.encodeAminoPubkey=I,t.encodeBech32Pubkey=function(e,t){return(0,r.toBech32)(t,I(e))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeSignature=t.encodeSecp256k1Signature=void 0;const r=n(17),o=n(246),c=n(184);t.encodeSecp256k1Signature=function(e,t){if(64!==t.length)throw new 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,o.encodeSecp256k1Pubkey)(e),signature:(0,r.toBase64)(t)}},t.decodeSignature=function(e){if(e.pub_key.type===c.pubkeyType.secp256k1)return{pubkey:(0,r.fromBase64)(e.pub_key.value),signature:(0,r.fromBase64)(e.signature)};throw new Error("Unsupported pubkey type")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeSignDoc=t.makeSignDoc=t.sortedJsonStringify=void 0;const r=n(17),o=n(34);function c(e){if("object"!=typeof e||null===e)return e;if(Array.isArray(e))return e.map(c);const t=Object.keys(e).sort(),n={};return t.forEach((t=>{n[t]=c(e[t])})),n}function l(e){return JSON.stringify(c(e))}t.sortedJsonStringify=l,t.makeSignDoc=function(e,t,n,r,c,l){return{chain_id:n,account_number:o.Uint53.fromString(c.toString()).toString(),sequence:o.Uint53.fromString(l.toString()).toString(),fee:t,msgs:e,memo:r||""}},t.serializeSignDoc=function(e){return(0,r.toUtf8)(l(e))}},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.makeSignBytes=t.makeSignDoc=t.makeAuthInfoBytes=void 0;const o=n(141),c=n(64),l=r(n(1));function d(e,t){return e.map((({pubkey:e,sequence:n})=>({publicKey:e,modeInfo:{single:{mode:t}},sequence:l.default.fromNumber(n)})))}t.makeAuthInfoBytes=function(e,t,n,r=o.SignMode.SIGN_MODE_DIRECT){const f={signerInfos:d(e,r),fee:{amount:[...t],gasLimit:l.default.fromNumber(n)}};return c.AuthInfo.encode(c.AuthInfo.fromPartial(f)).finish()},t.makeSignDoc=function(e,t,n,r){return{bodyBytes:e,authInfoBytes:t,chainId:n,accountNumber:l.default.fromNumber(r)}},t.makeSignBytes=function({accountNumber:e,authInfoBytes:t,bodyBytes:n,chainId:r}){const o=c.SignDoc.fromPartial({accountNumber:e,authInfoBytes:t,bodyBytes:n,chainId:r});return c.SignDoc.encode(o).finish()}},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MsgClientImpl=t.MsgMultiSendResponse=t.MsgMultiSend=t.MsgSendResponse=t.MsgSend=t.protobufPackage=void 0;const o=r(n(1)),c=r(n(2)),l=n(28),d=n(430);t.protobufPackage="cosmos.bank.v1beta1";const f={fromAddress:"",toAddress:""};t.MsgSend={encode(e,t=c.default.Writer.create()){""!==e.fromAddress&&t.uint32(10).string(e.fromAddress),""!==e.toAddress&&t.uint32(18).string(e.toAddress);for(const n of e.amount)l.Coin.encode(n,t.uint32(26).fork()).ldelim();return t},decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},f);for(r.amount=[];t.pos>>3){case 1:r.fromAddress=t.string();break;case 2:r.toAddress=t.string();break;case 3:r.amount.push(l.Coin.decode(t,t.uint32()));break;default:t.skipType(7&e)}}return r},fromJSON(object){var e;const t=Object.assign({},f);return t.fromAddress=void 0!==object.fromAddress&&null!==object.fromAddress?String(object.fromAddress):"",t.toAddress=void 0!==object.toAddress&&null!==object.toAddress?String(object.toAddress):"",t.amount=(null!==(e=object.amount)&&void 0!==e?e:[]).map((e=>l.Coin.fromJSON(e))),t},toJSON(e){const 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?l.Coin.toJSON(e):void 0)):t.amount=[],t},fromPartial(object){var e,t,n;const r=Object.assign({},f);return r.fromAddress=null!==(e=object.fromAddress)&&void 0!==e?e:"",r.toAddress=null!==(t=object.toAddress)&&void 0!==t?t:"",r.amount=(null===(n=object.amount)||void 0===n?void 0:n.map((e=>l.Coin.fromPartial(e))))||[],r}};const h={};t.MsgSendResponse={encode:(e,t=c.default.Writer.create())=>t,decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},h);for(;t.posObject.assign({},h),toJSON:e=>({}),fromPartial:e=>Object.assign({},h)};const A={};t.MsgMultiSend={encode(e,t=c.default.Writer.create()){for(const n of e.inputs)d.Input.encode(n,t.uint32(10).fork()).ldelim();for(const n of e.outputs)d.Output.encode(n,t.uint32(18).fork()).ldelim();return t},decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},A);for(r.inputs=[],r.outputs=[];t.pos>>3){case 1:r.inputs.push(d.Input.decode(t,t.uint32()));break;case 2:r.outputs.push(d.Output.decode(t,t.uint32()));break;default:t.skipType(7&e)}}return r},fromJSON(object){var e,t;const n=Object.assign({},A);return n.inputs=(null!==(e=object.inputs)&&void 0!==e?e:[]).map((e=>d.Input.fromJSON(e))),n.outputs=(null!==(t=object.outputs)&&void 0!==t?t:[]).map((e=>d.Output.fromJSON(e))),n},toJSON(e){const t={};return e.inputs?t.inputs=e.inputs.map((e=>e?d.Input.toJSON(e):void 0)):t.inputs=[],e.outputs?t.outputs=e.outputs.map((e=>e?d.Output.toJSON(e):void 0)):t.outputs=[],t},fromPartial(object){var e,t;const n=Object.assign({},A);return n.inputs=(null===(e=object.inputs)||void 0===e?void 0:e.map((e=>d.Input.fromPartial(e))))||[],n.outputs=(null===(t=object.outputs)||void 0===t?void 0:t.map((e=>d.Output.fromPartial(e))))||[],n}};const m={};t.MsgMultiSendResponse={encode:(e,t=c.default.Writer.create())=>t,decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},m);for(;t.posObject.assign({},m),toJSON:e=>({}),fromPartial:e=>Object.assign({},m)};t.MsgClientImpl=class{constructor(e){this.rpc=e,this.Send=this.Send.bind(this),this.MultiSend=this.MultiSend.bind(this)}Send(e){const data=t.MsgSend.encode(e).finish();return this.rpc.request("cosmos.bank.v1beta1.Msg","Send",data).then((data=>t.MsgSendResponse.decode(new c.default.Reader(data))))}MultiSend(e){const data=t.MsgMultiSend.encode(e).finish();return this.rpc.request("cosmos.bank.v1beta1.Msg","MultiSend",data).then((data=>t.MsgMultiSendResponse.decode(new c.default.Reader(data))))}},c.default.util.Long!==o.default&&(c.default.util.Long=o.default,c.default.configure())},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Params=t.ModuleAccount=t.BaseAccount=t.protobufPackage=void 0;const o=r(n(1)),c=r(n(2)),l=n(22);t.protobufPackage="cosmos.auth.v1beta1";const d={address:"",accountNumber:o.default.UZERO,sequence:o.default.UZERO};t.BaseAccount={encode:(e,t=c.default.Writer.create())=>(""!==e.address&&t.uint32(10).string(e.address),void 0!==e.pubKey&&l.Any.encode(e.pubKey,t.uint32(18).fork()).ldelim(),e.accountNumber.isZero()||t.uint32(24).uint64(e.accountNumber),e.sequence.isZero()||t.uint32(32).uint64(e.sequence),t),decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},d);for(;t.pos>>3){case 1:r.address=t.string();break;case 2:r.pubKey=l.Any.decode(t,t.uint32());break;case 3:r.accountNumber=t.uint64();break;case 4:r.sequence=t.uint64();break;default:t.skipType(7&e)}}return r},fromJSON(object){const e=Object.assign({},d);return e.address=void 0!==object.address&&null!==object.address?String(object.address):"",e.pubKey=void 0!==object.pubKey&&null!==object.pubKey?l.Any.fromJSON(object.pubKey):void 0,e.accountNumber=void 0!==object.accountNumber&&null!==object.accountNumber?o.default.fromString(object.accountNumber):o.default.UZERO,e.sequence=void 0!==object.sequence&&null!==object.sequence?o.default.fromString(object.sequence):o.default.UZERO,e},toJSON(e){const t={};return void 0!==e.address&&(t.address=e.address),void 0!==e.pubKey&&(t.pubKey=e.pubKey?l.Any.toJSON(e.pubKey):void 0),void 0!==e.accountNumber&&(t.accountNumber=(e.accountNumber||o.default.UZERO).toString()),void 0!==e.sequence&&(t.sequence=(e.sequence||o.default.UZERO).toString()),t},fromPartial(object){var e;const t=Object.assign({},d);return t.address=null!==(e=object.address)&&void 0!==e?e:"",t.pubKey=void 0!==object.pubKey&&null!==object.pubKey?l.Any.fromPartial(object.pubKey):void 0,t.accountNumber=void 0!==object.accountNumber&&null!==object.accountNumber?o.default.fromValue(object.accountNumber):o.default.UZERO,t.sequence=void 0!==object.sequence&&null!==object.sequence?o.default.fromValue(object.sequence):o.default.UZERO,t}};const f={name:"",permissions:""};t.ModuleAccount={encode(e,n=c.default.Writer.create()){void 0!==e.baseAccount&&t.BaseAccount.encode(e.baseAccount,n.uint32(10).fork()).ldelim(),""!==e.name&&n.uint32(18).string(e.name);for(const t of e.permissions)n.uint32(26).string(t);return n},decode(input,e){const n=input instanceof c.default.Reader?input:new c.default.Reader(input);let r=void 0===e?n.len:n.pos+e;const o=Object.assign({},f);for(o.permissions=[];n.pos>>3){case 1:o.baseAccount=t.BaseAccount.decode(n,n.uint32());break;case 2:o.name=n.string();break;case 3:o.permissions.push(n.string());break;default:n.skipType(7&e)}}return o},fromJSON(object){var e;const n=Object.assign({},f);return n.baseAccount=void 0!==object.baseAccount&&null!==object.baseAccount?t.BaseAccount.fromJSON(object.baseAccount):void 0,n.name=void 0!==object.name&&null!==object.name?String(object.name):"",n.permissions=(null!==(e=object.permissions)&&void 0!==e?e:[]).map((e=>String(e))),n},toJSON(e){const n={};return void 0!==e.baseAccount&&(n.baseAccount=e.baseAccount?t.BaseAccount.toJSON(e.baseAccount):void 0),void 0!==e.name&&(n.name=e.name),e.permissions?n.permissions=e.permissions.map((e=>e)):n.permissions=[],n},fromPartial(object){var e,n;const r=Object.assign({},f);return r.baseAccount=void 0!==object.baseAccount&&null!==object.baseAccount?t.BaseAccount.fromPartial(object.baseAccount):void 0,r.name=null!==(e=object.name)&&void 0!==e?e:"",r.permissions=(null===(n=object.permissions)||void 0===n?void 0:n.map((e=>e)))||[],r}};const h={maxMemoCharacters:o.default.UZERO,txSigLimit:o.default.UZERO,txSizeCostPerByte:o.default.UZERO,sigVerifyCostEd25519:o.default.UZERO,sigVerifyCostSecp256k1:o.default.UZERO};t.Params={encode:(e,t=c.default.Writer.create())=>(e.maxMemoCharacters.isZero()||t.uint32(8).uint64(e.maxMemoCharacters),e.txSigLimit.isZero()||t.uint32(16).uint64(e.txSigLimit),e.txSizeCostPerByte.isZero()||t.uint32(24).uint64(e.txSizeCostPerByte),e.sigVerifyCostEd25519.isZero()||t.uint32(32).uint64(e.sigVerifyCostEd25519),e.sigVerifyCostSecp256k1.isZero()||t.uint32(40).uint64(e.sigVerifyCostSecp256k1),t),decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},h);for(;t.pos>>3){case 1:r.maxMemoCharacters=t.uint64();break;case 2:r.txSigLimit=t.uint64();break;case 3:r.txSizeCostPerByte=t.uint64();break;case 4:r.sigVerifyCostEd25519=t.uint64();break;case 5:r.sigVerifyCostSecp256k1=t.uint64();break;default:t.skipType(7&e)}}return r},fromJSON(object){const e=Object.assign({},h);return e.maxMemoCharacters=void 0!==object.maxMemoCharacters&&null!==object.maxMemoCharacters?o.default.fromString(object.maxMemoCharacters):o.default.UZERO,e.txSigLimit=void 0!==object.txSigLimit&&null!==object.txSigLimit?o.default.fromString(object.txSigLimit):o.default.UZERO,e.txSizeCostPerByte=void 0!==object.txSizeCostPerByte&&null!==object.txSizeCostPerByte?o.default.fromString(object.txSizeCostPerByte):o.default.UZERO,e.sigVerifyCostEd25519=void 0!==object.sigVerifyCostEd25519&&null!==object.sigVerifyCostEd25519?o.default.fromString(object.sigVerifyCostEd25519):o.default.UZERO,e.sigVerifyCostSecp256k1=void 0!==object.sigVerifyCostSecp256k1&&null!==object.sigVerifyCostSecp256k1?o.default.fromString(object.sigVerifyCostSecp256k1):o.default.UZERO,e},toJSON(e){const t={};return void 0!==e.maxMemoCharacters&&(t.maxMemoCharacters=(e.maxMemoCharacters||o.default.UZERO).toString()),void 0!==e.txSigLimit&&(t.txSigLimit=(e.txSigLimit||o.default.UZERO).toString()),void 0!==e.txSizeCostPerByte&&(t.txSizeCostPerByte=(e.txSizeCostPerByte||o.default.UZERO).toString()),void 0!==e.sigVerifyCostEd25519&&(t.sigVerifyCostEd25519=(e.sigVerifyCostEd25519||o.default.UZERO).toString()),void 0!==e.sigVerifyCostSecp256k1&&(t.sigVerifyCostSecp256k1=(e.sigVerifyCostSecp256k1||o.default.UZERO).toString()),t},fromPartial(object){const e=Object.assign({},h);return e.maxMemoCharacters=void 0!==object.maxMemoCharacters&&null!==object.maxMemoCharacters?o.default.fromValue(object.maxMemoCharacters):o.default.UZERO,e.txSigLimit=void 0!==object.txSigLimit&&null!==object.txSigLimit?o.default.fromValue(object.txSigLimit):o.default.UZERO,e.txSizeCostPerByte=void 0!==object.txSizeCostPerByte&&null!==object.txSizeCostPerByte?o.default.fromValue(object.txSizeCostPerByte):o.default.UZERO,e.sigVerifyCostEd25519=void 0!==object.sigVerifyCostEd25519&&null!==object.sigVerifyCostEd25519?o.default.fromValue(object.sigVerifyCostEd25519):o.default.UZERO,e.sigVerifyCostSecp256k1=void 0!==object.sigVerifyCostSecp256k1&&null!==object.sigVerifyCostSecp256k1?o.default.fromValue(object.sigVerifyCostSecp256k1):o.default.UZERO,e}},c.default.util.Long!==o.default&&(c.default.util.Long=o.default,c.default.configure())},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Grant=t.GenericAuthorization=t.protobufPackage=void 0;const o=r(n(1)),c=r(n(2)),l=n(22),d=n(65);t.protobufPackage="cosmos.authz.v1beta1";const f={msg:""};t.GenericAuthorization={encode:(e,t=c.default.Writer.create())=>(""!==e.msg&&t.uint32(10).string(e.msg),t),decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},f);for(;t.pos>>3==1)r.msg=t.string();else t.skipType(7&e)}return r},fromJSON(object){const e=Object.assign({},f);return e.msg=void 0!==object.msg&&null!==object.msg?String(object.msg):"",e},toJSON(e){const t={};return void 0!==e.msg&&(t.msg=e.msg),t},fromPartial(object){var e;const t=Object.assign({},f);return t.msg=null!==(e=object.msg)&&void 0!==e?e:"",t}};const h={};function A(e){var t;return{seconds:(t=e.getTime()/1e3,o.default.fromNumber(t)),nanos:e.getTime()%1e3*1e6}}t.Grant={encode:(e,t=c.default.Writer.create())=>(void 0!==e.authorization&&l.Any.encode(e.authorization,t.uint32(10).fork()).ldelim(),void 0!==e.expiration&&d.Timestamp.encode(e.expiration,t.uint32(18).fork()).ldelim(),t),decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},h);for(;t.pos>>3){case 1:r.authorization=l.Any.decode(t,t.uint32());break;case 2:r.expiration=d.Timestamp.decode(t,t.uint32());break;default:t.skipType(7&e)}}return r},fromJSON(object){const e=Object.assign({},h);var t;return e.authorization=void 0!==object.authorization&&null!==object.authorization?l.Any.fromJSON(object.authorization):void 0,e.expiration=void 0!==object.expiration&&null!==object.expiration?(t=object.expiration)instanceof Date?A(t):"string"==typeof t?A(new Date(t)):d.Timestamp.fromJSON(t):void 0,e},toJSON(e){const t={};return void 0!==e.authorization&&(t.authorization=e.authorization?l.Any.toJSON(e.authorization):void 0),void 0!==e.expiration&&(t.expiration=function(e){let t=1e3*e.seconds.toNumber();return t+=e.nanos/1e6,new Date(t)}(e.expiration).toISOString()),t},fromPartial(object){const e=Object.assign({},h);return e.authorization=void 0!==object.authorization&&null!==object.authorization?l.Any.fromPartial(object.authorization):void 0,e.expiration=void 0!==object.expiration&&null!==object.expiration?d.Timestamp.fromPartial(object.expiration):void 0,e}},c.default.util.Long!==o.default&&(c.default.util.Long=o.default,c.default.configure())},function(e,t,n){"use strict";(function(e){var r=this&&this.__importDefault||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;const o=r(n(1)),c=r(n(2)),l=n(22),d=n(65),f=n(143),h=n(28);var A,m;function v(object){switch(object){case 0:case"VOTE_OPTION_UNSPECIFIED":return A.VOTE_OPTION_UNSPECIFIED;case 1:case"VOTE_OPTION_YES":return A.VOTE_OPTION_YES;case 2:case"VOTE_OPTION_ABSTAIN":return A.VOTE_OPTION_ABSTAIN;case 3:case"VOTE_OPTION_NO":return A.VOTE_OPTION_NO;case 4:case"VOTE_OPTION_NO_WITH_VETO":return A.VOTE_OPTION_NO_WITH_VETO;default:return A.UNRECOGNIZED}}function y(object){switch(object){case A.VOTE_OPTION_UNSPECIFIED:return"VOTE_OPTION_UNSPECIFIED";case A.VOTE_OPTION_YES:return"VOTE_OPTION_YES";case A.VOTE_OPTION_ABSTAIN:return"VOTE_OPTION_ABSTAIN";case A.VOTE_OPTION_NO:return"VOTE_OPTION_NO";case A.VOTE_OPTION_NO_WITH_VETO:return"VOTE_OPTION_NO_WITH_VETO";default:return"UNKNOWN"}}function I(object){switch(object){case 0:case"PROPOSAL_STATUS_UNSPECIFIED":return m.PROPOSAL_STATUS_UNSPECIFIED;case 1:case"PROPOSAL_STATUS_DEPOSIT_PERIOD":return m.PROPOSAL_STATUS_DEPOSIT_PERIOD;case 2:case"PROPOSAL_STATUS_VOTING_PERIOD":return m.PROPOSAL_STATUS_VOTING_PERIOD;case 3:case"PROPOSAL_STATUS_PASSED":return m.PROPOSAL_STATUS_PASSED;case 4:case"PROPOSAL_STATUS_REJECTED":return m.PROPOSAL_STATUS_REJECTED;case 5:case"PROPOSAL_STATUS_FAILED":return m.PROPOSAL_STATUS_FAILED;default:return m.UNRECOGNIZED}}function w(object){switch(object){case m.PROPOSAL_STATUS_UNSPECIFIED:return"PROPOSAL_STATUS_UNSPECIFIED";case m.PROPOSAL_STATUS_DEPOSIT_PERIOD:return"PROPOSAL_STATUS_DEPOSIT_PERIOD";case m.PROPOSAL_STATUS_VOTING_PERIOD:return"PROPOSAL_STATUS_VOTING_PERIOD";case m.PROPOSAL_STATUS_PASSED:return"PROPOSAL_STATUS_PASSED";case m.PROPOSAL_STATUS_REJECTED:return"PROPOSAL_STATUS_REJECTED";case m.PROPOSAL_STATUS_FAILED:return"PROPOSAL_STATUS_FAILED";default:return"UNKNOWN"}}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"}(A=t.VoteOption||(t.VoteOption={})),t.voteOptionFromJSON=v,t.voteOptionToJSON=y,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"}(m=t.ProposalStatus||(t.ProposalStatus={})),t.proposalStatusFromJSON=I,t.proposalStatusToJSON=w;const _={option:0,weight:""};t.WeightedVoteOption={encode:(e,t=c.default.Writer.create())=>(0!==e.option&&t.uint32(8).int32(e.option),""!==e.weight&&t.uint32(18).string(e.weight),t),decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},_);for(;t.pos>>3){case 1:r.option=t.int32();break;case 2:r.weight=t.string();break;default:t.skipType(7&e)}}return r},fromJSON(object){const e=Object.assign({},_);return e.option=void 0!==object.option&&null!==object.option?v(object.option):0,e.weight=void 0!==object.weight&&null!==object.weight?String(object.weight):"",e},toJSON(e){const t={};return void 0!==e.option&&(t.option=y(e.option)),void 0!==e.weight&&(t.weight=e.weight),t},fromPartial(object){var e,t;const n=Object.assign({},_);return n.option=null!==(e=object.option)&&void 0!==e?e:0,n.weight=null!==(t=object.weight)&&void 0!==t?t:"",n}};const C={title:"",description:""};t.TextProposal={encode:(e,t=c.default.Writer.create())=>(""!==e.title&&t.uint32(10).string(e.title),""!==e.description&&t.uint32(18).string(e.description),t),decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},C);for(;t.pos>>3){case 1:r.title=t.string();break;case 2:r.description=t.string();break;default:t.skipType(7&e)}}return r},fromJSON(object){const e=Object.assign({},C);return e.title=void 0!==object.title&&null!==object.title?String(object.title):"",e.description=void 0!==object.description&&null!==object.description?String(object.description):"",e},toJSON(e){const t={};return void 0!==e.title&&(t.title=e.title),void 0!==e.description&&(t.description=e.description),t},fromPartial(object){var e,t;const n=Object.assign({},C);return n.title=null!==(e=object.title)&&void 0!==e?e:"",n.description=null!==(t=object.description)&&void 0!==t?t:"",n}};const S={proposalId:o.default.UZERO,depositor:""};t.Deposit={encode(e,t=c.default.Writer.create()){e.proposalId.isZero()||t.uint32(8).uint64(e.proposalId),""!==e.depositor&&t.uint32(18).string(e.depositor);for(const n of e.amount)h.Coin.encode(n,t.uint32(26).fork()).ldelim();return t},decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},S);for(r.amount=[];t.pos>>3){case 1:r.proposalId=t.uint64();break;case 2:r.depositor=t.string();break;case 3:r.amount.push(h.Coin.decode(t,t.uint32()));break;default:t.skipType(7&e)}}return r},fromJSON(object){var e;const t=Object.assign({},S);return t.proposalId=void 0!==object.proposalId&&null!==object.proposalId?o.default.fromString(object.proposalId):o.default.UZERO,t.depositor=void 0!==object.depositor&&null!==object.depositor?String(object.depositor):"",t.amount=(null!==(e=object.amount)&&void 0!==e?e:[]).map((e=>h.Coin.fromJSON(e))),t},toJSON(e){const t={};return void 0!==e.proposalId&&(t.proposalId=(e.proposalId||o.default.UZERO).toString()),void 0!==e.depositor&&(t.depositor=e.depositor),e.amount?t.amount=e.amount.map((e=>e?h.Coin.toJSON(e):void 0)):t.amount=[],t},fromPartial(object){var e,t;const n=Object.assign({},S);return n.proposalId=void 0!==object.proposalId&&null!==object.proposalId?o.default.fromValue(object.proposalId):o.default.UZERO,n.depositor=null!==(e=object.depositor)&&void 0!==e?e:"",n.amount=(null===(t=object.amount)||void 0===t?void 0:t.map((e=>h.Coin.fromPartial(e))))||[],n}};const E={proposalId:o.default.UZERO,status:0};t.Proposal={encode(e,n=c.default.Writer.create()){e.proposalId.isZero()||n.uint32(8).uint64(e.proposalId),void 0!==e.content&&l.Any.encode(e.content,n.uint32(18).fork()).ldelim(),0!==e.status&&n.uint32(24).int32(e.status),void 0!==e.finalTallyResult&&t.TallyResult.encode(e.finalTallyResult,n.uint32(34).fork()).ldelim(),void 0!==e.submitTime&&d.Timestamp.encode(e.submitTime,n.uint32(42).fork()).ldelim(),void 0!==e.depositEndTime&&d.Timestamp.encode(e.depositEndTime,n.uint32(50).fork()).ldelim();for(const t of e.totalDeposit)h.Coin.encode(t,n.uint32(58).fork()).ldelim();return void 0!==e.votingStartTime&&d.Timestamp.encode(e.votingStartTime,n.uint32(66).fork()).ldelim(),void 0!==e.votingEndTime&&d.Timestamp.encode(e.votingEndTime,n.uint32(74).fork()).ldelim(),n},decode(input,e){const n=input instanceof c.default.Reader?input:new c.default.Reader(input);let r=void 0===e?n.len:n.pos+e;const o=Object.assign({},E);for(o.totalDeposit=[];n.pos>>3){case 1:o.proposalId=n.uint64();break;case 2:o.content=l.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=d.Timestamp.decode(n,n.uint32());break;case 6:o.depositEndTime=d.Timestamp.decode(n,n.uint32());break;case 7:o.totalDeposit.push(h.Coin.decode(n,n.uint32()));break;case 8:o.votingStartTime=d.Timestamp.decode(n,n.uint32());break;case 9:o.votingEndTime=d.Timestamp.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(object){var e;const n=Object.assign({},E);return n.proposalId=void 0!==object.proposalId&&null!==object.proposalId?o.default.fromString(object.proposalId):o.default.UZERO,n.content=void 0!==object.content&&null!==object.content?l.Any.fromJSON(object.content):void 0,n.status=void 0!==object.status&&null!==object.status?I(object.status):0,n.finalTallyResult=void 0!==object.finalTallyResult&&null!==object.finalTallyResult?t.TallyResult.fromJSON(object.finalTallyResult):void 0,n.submitTime=void 0!==object.submitTime&&null!==object.submitTime?U(object.submitTime):void 0,n.depositEndTime=void 0!==object.depositEndTime&&null!==object.depositEndTime?U(object.depositEndTime):void 0,n.totalDeposit=(null!==(e=object.totalDeposit)&&void 0!==e?e:[]).map((e=>h.Coin.fromJSON(e))),n.votingStartTime=void 0!==object.votingStartTime&&null!==object.votingStartTime?U(object.votingStartTime):void 0,n.votingEndTime=void 0!==object.votingEndTime&&null!==object.votingEndTime?U(object.votingEndTime):void 0,n},toJSON(e){const n={};return void 0!==e.proposalId&&(n.proposalId=(e.proposalId||o.default.UZERO).toString()),void 0!==e.content&&(n.content=e.content?l.Any.toJSON(e.content):void 0),void 0!==e.status&&(n.status=w(e.status)),void 0!==e.finalTallyResult&&(n.finalTallyResult=e.finalTallyResult?t.TallyResult.toJSON(e.finalTallyResult):void 0),void 0!==e.submitTime&&(n.submitTime=j(e.submitTime).toISOString()),void 0!==e.depositEndTime&&(n.depositEndTime=j(e.depositEndTime).toISOString()),e.totalDeposit?n.totalDeposit=e.totalDeposit.map((e=>e?h.Coin.toJSON(e):void 0)):n.totalDeposit=[],void 0!==e.votingStartTime&&(n.votingStartTime=j(e.votingStartTime).toISOString()),void 0!==e.votingEndTime&&(n.votingEndTime=j(e.votingEndTime).toISOString()),n},fromPartial(object){var e,n;const r=Object.assign({},E);return r.proposalId=void 0!==object.proposalId&&null!==object.proposalId?o.default.fromValue(object.proposalId):o.default.UZERO,r.content=void 0!==object.content&&null!==object.content?l.Any.fromPartial(object.content):void 0,r.status=null!==(e=object.status)&&void 0!==e?e:0,r.finalTallyResult=void 0!==object.finalTallyResult&&null!==object.finalTallyResult?t.TallyResult.fromPartial(object.finalTallyResult):void 0,r.submitTime=void 0!==object.submitTime&&null!==object.submitTime?d.Timestamp.fromPartial(object.submitTime):void 0,r.depositEndTime=void 0!==object.depositEndTime&&null!==object.depositEndTime?d.Timestamp.fromPartial(object.depositEndTime):void 0,r.totalDeposit=(null===(n=object.totalDeposit)||void 0===n?void 0:n.map((e=>h.Coin.fromPartial(e))))||[],r.votingStartTime=void 0!==object.votingStartTime&&null!==object.votingStartTime?d.Timestamp.fromPartial(object.votingStartTime):void 0,r.votingEndTime=void 0!==object.votingEndTime&&null!==object.votingEndTime?d.Timestamp.fromPartial(object.votingEndTime):void 0,r}};const B={yes:"",abstain:"",no:"",noWithVeto:""};t.TallyResult={encode:(e,t=c.default.Writer.create())=>(""!==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(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},B);for(;t.pos>>3){case 1:r.yes=t.string();break;case 2:r.abstain=t.string();break;case 3:r.no=t.string();break;case 4:r.noWithVeto=t.string();break;default:t.skipType(7&e)}}return r},fromJSON(object){const e=Object.assign({},B);return e.yes=void 0!==object.yes&&null!==object.yes?String(object.yes):"",e.abstain=void 0!==object.abstain&&null!==object.abstain?String(object.abstain):"",e.no=void 0!==object.no&&null!==object.no?String(object.no):"",e.noWithVeto=void 0!==object.noWithVeto&&null!==object.noWithVeto?String(object.noWithVeto):"",e},toJSON(e){const 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(object){var e,t,n,r;const o=Object.assign({},B);return o.yes=null!==(e=object.yes)&&void 0!==e?e:"",o.abstain=null!==(t=object.abstain)&&void 0!==t?t:"",o.no=null!==(n=object.no)&&void 0!==n?n:"",o.noWithVeto=null!==(r=object.noWithVeto)&&void 0!==r?r:"",o}};const k={proposalId:o.default.UZERO,voter:"",option:0};t.Vote={encode(e,n=c.default.Writer.create()){e.proposalId.isZero()||n.uint32(8).uint64(e.proposalId),""!==e.voter&&n.uint32(18).string(e.voter),0!==e.option&&n.uint32(24).int32(e.option);for(const r of e.options)t.WeightedVoteOption.encode(r,n.uint32(34).fork()).ldelim();return n},decode(input,e){const n=input instanceof c.default.Reader?input:new c.default.Reader(input);let r=void 0===e?n.len:n.pos+e;const o=Object.assign({},k);for(o.options=[];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(object){var e;const n=Object.assign({},k);return n.proposalId=void 0!==object.proposalId&&null!==object.proposalId?o.default.fromString(object.proposalId):o.default.UZERO,n.voter=void 0!==object.voter&&null!==object.voter?String(object.voter):"",n.option=void 0!==object.option&&null!==object.option?v(object.option):0,n.options=(null!==(e=object.options)&&void 0!==e?e:[]).map((e=>t.WeightedVoteOption.fromJSON(e))),n},toJSON(e){const n={};return void 0!==e.proposalId&&(n.proposalId=(e.proposalId||o.default.UZERO).toString()),void 0!==e.voter&&(n.voter=e.voter),void 0!==e.option&&(n.option=y(e.option)),e.options?n.options=e.options.map((e=>e?t.WeightedVoteOption.toJSON(e):void 0)):n.options=[],n},fromPartial(object){var e,n,r;const c=Object.assign({},k);return c.proposalId=void 0!==object.proposalId&&null!==object.proposalId?o.default.fromValue(object.proposalId):o.default.UZERO,c.voter=null!==(e=object.voter)&&void 0!==e?e:"",c.option=null!==(n=object.option)&&void 0!==n?n:0,c.options=(null===(r=object.options)||void 0===r?void 0:r.map((e=>t.WeightedVoteOption.fromPartial(e))))||[],c}};const O={};t.DepositParams={encode(e,t=c.default.Writer.create()){for(const n of e.minDeposit)h.Coin.encode(n,t.uint32(10).fork()).ldelim();return void 0!==e.maxDepositPeriod&&f.Duration.encode(e.maxDepositPeriod,t.uint32(18).fork()).ldelim(),t},decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},O);for(r.minDeposit=[];t.pos>>3){case 1:r.minDeposit.push(h.Coin.decode(t,t.uint32()));break;case 2:r.maxDepositPeriod=f.Duration.decode(t,t.uint32());break;default:t.skipType(7&e)}}return r},fromJSON(object){var e;const t=Object.assign({},O);return t.minDeposit=(null!==(e=object.minDeposit)&&void 0!==e?e:[]).map((e=>h.Coin.fromJSON(e))),t.maxDepositPeriod=void 0!==object.maxDepositPeriod&&null!==object.maxDepositPeriod?f.Duration.fromJSON(object.maxDepositPeriod):void 0,t},toJSON(e){const t={};return e.minDeposit?t.minDeposit=e.minDeposit.map((e=>e?h.Coin.toJSON(e):void 0)):t.minDeposit=[],void 0!==e.maxDepositPeriod&&(t.maxDepositPeriod=e.maxDepositPeriod?f.Duration.toJSON(e.maxDepositPeriod):void 0),t},fromPartial(object){var e;const t=Object.assign({},O);return t.minDeposit=(null===(e=object.minDeposit)||void 0===e?void 0:e.map((e=>h.Coin.fromPartial(e))))||[],t.maxDepositPeriod=void 0!==object.maxDepositPeriod&&null!==object.maxDepositPeriod?f.Duration.fromPartial(object.maxDepositPeriod):void 0,t}};const R={};t.VotingParams={encode:(e,t=c.default.Writer.create())=>(void 0!==e.votingPeriod&&f.Duration.encode(e.votingPeriod,t.uint32(10).fork()).ldelim(),t),decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},R);for(;t.pos>>3==1)r.votingPeriod=f.Duration.decode(t,t.uint32());else t.skipType(7&e)}return r},fromJSON(object){const e=Object.assign({},R);return e.votingPeriod=void 0!==object.votingPeriod&&null!==object.votingPeriod?f.Duration.fromJSON(object.votingPeriod):void 0,e},toJSON(e){const t={};return void 0!==e.votingPeriod&&(t.votingPeriod=e.votingPeriod?f.Duration.toJSON(e.votingPeriod):void 0),t},fromPartial(object){const e=Object.assign({},R);return e.votingPeriod=void 0!==object.votingPeriod&&null!==object.votingPeriod?f.Duration.fromPartial(object.votingPeriod):void 0,e}};const P={};t.TallyParams={encode:(e,t=c.default.Writer.create())=>(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(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},P);for(r.quorum=new Uint8Array,r.threshold=new Uint8Array,r.vetoThreshold=new Uint8Array;t.pos>>3){case 1:r.quorum=t.bytes();break;case 2:r.threshold=t.bytes();break;case 3:r.vetoThreshold=t.bytes();break;default:t.skipType(7&e)}}return r},fromJSON(object){const e=Object.assign({},P);return e.quorum=void 0!==object.quorum&&null!==object.quorum?Q(object.quorum):new Uint8Array,e.threshold=void 0!==object.threshold&&null!==object.threshold?Q(object.threshold):new Uint8Array,e.vetoThreshold=void 0!==object.vetoThreshold&&null!==object.vetoThreshold?Q(object.vetoThreshold):new Uint8Array,e},toJSON(e){const t={};return void 0!==e.quorum&&(t.quorum=D(void 0!==e.quorum?e.quorum:new Uint8Array)),void 0!==e.threshold&&(t.threshold=D(void 0!==e.threshold?e.threshold:new Uint8Array)),void 0!==e.vetoThreshold&&(t.vetoThreshold=D(void 0!==e.vetoThreshold?e.vetoThreshold:new Uint8Array)),t},fromPartial(object){var e,t,n;const r=Object.assign({},P);return r.quorum=null!==(e=object.quorum)&&void 0!==e?e:new Uint8Array,r.threshold=null!==(t=object.threshold)&&void 0!==t?t:new Uint8Array,r.vetoThreshold=null!==(n=object.vetoThreshold)&&void 0!==n?n:new Uint8Array,r}};var x=(()=>{if(void 0!==x)return x;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==e)return e;throw"Unable to locate global object"})();const M=x.atob||(e=>x.Buffer.from(e,"base64").toString("binary"));function Q(e){const t=M(e),n=new Uint8Array(t.length);for(let i=0;ix.Buffer.from(e,"binary").toString("base64"));function D(e){const t=[];for(const n of e)t.push(String.fromCharCode(n));return N(t.join(""))}function T(e){var t;return{seconds:(t=e.getTime()/1e3,o.default.fromNumber(t)),nanos:e.getTime()%1e3*1e6}}function j(e){let t=1e3*e.seconds.toNumber();return t+=e.nanos/1e6,new Date(t)}function U(e){return e instanceof Date?T(e):"string"==typeof e?T(new Date(e)):d.Timestamp.fromJSON(e)}c.default.util.Long!==o.default&&(c.default.util.Long=o.default,c.default.configure())}).call(this,n(3))},function(e,t,n){"use strict";(function(e){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Acknowledgement=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;const o=r(n(1)),c=r(n(2)),l=n(78);var d,f;function h(object){switch(object){case 0:case"STATE_UNINITIALIZED_UNSPECIFIED":return d.STATE_UNINITIALIZED_UNSPECIFIED;case 1:case"STATE_INIT":return d.STATE_INIT;case 2:case"STATE_TRYOPEN":return d.STATE_TRYOPEN;case 3:case"STATE_OPEN":return d.STATE_OPEN;case 4:case"STATE_CLOSED":return d.STATE_CLOSED;default:return d.UNRECOGNIZED}}function A(object){switch(object){case d.STATE_UNINITIALIZED_UNSPECIFIED:return"STATE_UNINITIALIZED_UNSPECIFIED";case d.STATE_INIT:return"STATE_INIT";case d.STATE_TRYOPEN:return"STATE_TRYOPEN";case d.STATE_OPEN:return"STATE_OPEN";case d.STATE_CLOSED:return"STATE_CLOSED";default:return"UNKNOWN"}}function m(object){switch(object){case 0:case"ORDER_NONE_UNSPECIFIED":return f.ORDER_NONE_UNSPECIFIED;case 1:case"ORDER_UNORDERED":return f.ORDER_UNORDERED;case 2:case"ORDER_ORDERED":return f.ORDER_ORDERED;default:return f.UNRECOGNIZED}}function v(object){switch(object){case f.ORDER_NONE_UNSPECIFIED:return"ORDER_NONE_UNSPECIFIED";case f.ORDER_UNORDERED:return"ORDER_UNORDERED";case f.ORDER_ORDERED:return"ORDER_ORDERED";default:return"UNKNOWN"}}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"}(d=t.State||(t.State={})),t.stateFromJSON=h,t.stateToJSON=A,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"}(f=t.Order||(t.Order={})),t.orderFromJSON=m,t.orderToJSON=v;const y={state:0,ordering:0,connectionHops:"",version:""};t.Channel={encode(e,n=c.default.Writer.create()){0!==e.state&&n.uint32(8).int32(e.state),0!==e.ordering&&n.uint32(16).int32(e.ordering),void 0!==e.counterparty&&t.Counterparty.encode(e.counterparty,n.uint32(26).fork()).ldelim();for(const t of e.connectionHops)n.uint32(34).string(t);return""!==e.version&&n.uint32(42).string(e.version),n},decode(input,e){const n=input instanceof c.default.Reader?input:new c.default.Reader(input);let r=void 0===e?n.len:n.pos+e;const o=Object.assign({},y);for(o.connectionHops=[];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(object){var e;const n=Object.assign({},y);return n.state=void 0!==object.state&&null!==object.state?h(object.state):0,n.ordering=void 0!==object.ordering&&null!==object.ordering?m(object.ordering):0,n.counterparty=void 0!==object.counterparty&&null!==object.counterparty?t.Counterparty.fromJSON(object.counterparty):void 0,n.connectionHops=(null!==(e=object.connectionHops)&&void 0!==e?e:[]).map((e=>String(e))),n.version=void 0!==object.version&&null!==object.version?String(object.version):"",n},toJSON(e){const n={};return void 0!==e.state&&(n.state=A(e.state)),void 0!==e.ordering&&(n.ordering=v(e.ordering)),void 0!==e.counterparty&&(n.counterparty=e.counterparty?t.Counterparty.toJSON(e.counterparty):void 0),e.connectionHops?n.connectionHops=e.connectionHops.map((e=>e)):n.connectionHops=[],void 0!==e.version&&(n.version=e.version),n},fromPartial(object){var e,n,r,o;const c=Object.assign({},y);return c.state=null!==(e=object.state)&&void 0!==e?e:0,c.ordering=null!==(n=object.ordering)&&void 0!==n?n:0,c.counterparty=void 0!==object.counterparty&&null!==object.counterparty?t.Counterparty.fromPartial(object.counterparty):void 0,c.connectionHops=(null===(r=object.connectionHops)||void 0===r?void 0:r.map((e=>e)))||[],c.version=null!==(o=object.version)&&void 0!==o?o:"",c}};const I={state:0,ordering:0,connectionHops:"",version:"",portId:"",channelId:""};t.IdentifiedChannel={encode(e,n=c.default.Writer.create()){0!==e.state&&n.uint32(8).int32(e.state),0!==e.ordering&&n.uint32(16).int32(e.ordering),void 0!==e.counterparty&&t.Counterparty.encode(e.counterparty,n.uint32(26).fork()).ldelim();for(const t of e.connectionHops)n.uint32(34).string(t);return""!==e.version&&n.uint32(42).string(e.version),""!==e.portId&&n.uint32(50).string(e.portId),""!==e.channelId&&n.uint32(58).string(e.channelId),n},decode(input,e){const n=input instanceof c.default.Reader?input:new c.default.Reader(input);let r=void 0===e?n.len:n.pos+e;const o=Object.assign({},I);for(o.connectionHops=[];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(object){var e;const n=Object.assign({},I);return n.state=void 0!==object.state&&null!==object.state?h(object.state):0,n.ordering=void 0!==object.ordering&&null!==object.ordering?m(object.ordering):0,n.counterparty=void 0!==object.counterparty&&null!==object.counterparty?t.Counterparty.fromJSON(object.counterparty):void 0,n.connectionHops=(null!==(e=object.connectionHops)&&void 0!==e?e:[]).map((e=>String(e))),n.version=void 0!==object.version&&null!==object.version?String(object.version):"",n.portId=void 0!==object.portId&&null!==object.portId?String(object.portId):"",n.channelId=void 0!==object.channelId&&null!==object.channelId?String(object.channelId):"",n},toJSON(e){const n={};return void 0!==e.state&&(n.state=A(e.state)),void 0!==e.ordering&&(n.ordering=v(e.ordering)),void 0!==e.counterparty&&(n.counterparty=e.counterparty?t.Counterparty.toJSON(e.counterparty):void 0),e.connectionHops?n.connectionHops=e.connectionHops.map((e=>e)):n.connectionHops=[],void 0!==e.version&&(n.version=e.version),void 0!==e.portId&&(n.portId=e.portId),void 0!==e.channelId&&(n.channelId=e.channelId),n},fromPartial(object){var e,n,r,o,c,l;const d=Object.assign({},I);return d.state=null!==(e=object.state)&&void 0!==e?e:0,d.ordering=null!==(n=object.ordering)&&void 0!==n?n:0,d.counterparty=void 0!==object.counterparty&&null!==object.counterparty?t.Counterparty.fromPartial(object.counterparty):void 0,d.connectionHops=(null===(r=object.connectionHops)||void 0===r?void 0:r.map((e=>e)))||[],d.version=null!==(o=object.version)&&void 0!==o?o:"",d.portId=null!==(c=object.portId)&&void 0!==c?c:"",d.channelId=null!==(l=object.channelId)&&void 0!==l?l:"",d}};const w={portId:"",channelId:""};t.Counterparty={encode:(e,t=c.default.Writer.create())=>(""!==e.portId&&t.uint32(10).string(e.portId),""!==e.channelId&&t.uint32(18).string(e.channelId),t),decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},w);for(;t.pos>>3){case 1:r.portId=t.string();break;case 2:r.channelId=t.string();break;default:t.skipType(7&e)}}return r},fromJSON(object){const e=Object.assign({},w);return e.portId=void 0!==object.portId&&null!==object.portId?String(object.portId):"",e.channelId=void 0!==object.channelId&&null!==object.channelId?String(object.channelId):"",e},toJSON(e){const t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.channelId&&(t.channelId=e.channelId),t},fromPartial(object){var e,t;const n=Object.assign({},w);return n.portId=null!==(e=object.portId)&&void 0!==e?e:"",n.channelId=null!==(t=object.channelId)&&void 0!==t?t:"",n}};const _={sequence:o.default.UZERO,sourcePort:"",sourceChannel:"",destinationPort:"",destinationChannel:"",timeoutTimestamp:o.default.UZERO};t.Packet={encode:(e,t=c.default.Writer.create())=>(e.sequence.isZero()||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(),e.timeoutTimestamp.isZero()||t.uint32(64).uint64(e.timeoutTimestamp),t),decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},_);for(r.data=new Uint8Array;t.pos>>3){case 1:r.sequence=t.uint64();break;case 2:r.sourcePort=t.string();break;case 3:r.sourceChannel=t.string();break;case 4:r.destinationPort=t.string();break;case 5:r.destinationChannel=t.string();break;case 6:r.data=t.bytes();break;case 7:r.timeoutHeight=l.Height.decode(t,t.uint32());break;case 8:r.timeoutTimestamp=t.uint64();break;default:t.skipType(7&e)}}return r},fromJSON(object){const e=Object.assign({},_);return e.sequence=void 0!==object.sequence&&null!==object.sequence?o.default.fromString(object.sequence):o.default.UZERO,e.sourcePort=void 0!==object.sourcePort&&null!==object.sourcePort?String(object.sourcePort):"",e.sourceChannel=void 0!==object.sourceChannel&&null!==object.sourceChannel?String(object.sourceChannel):"",e.destinationPort=void 0!==object.destinationPort&&null!==object.destinationPort?String(object.destinationPort):"",e.destinationChannel=void 0!==object.destinationChannel&&null!==object.destinationChannel?String(object.destinationChannel):"",e.data=void 0!==object.data&&null!==object.data?k(object.data):new Uint8Array,e.timeoutHeight=void 0!==object.timeoutHeight&&null!==object.timeoutHeight?l.Height.fromJSON(object.timeoutHeight):void 0,e.timeoutTimestamp=void 0!==object.timeoutTimestamp&&null!==object.timeoutTimestamp?o.default.fromString(object.timeoutTimestamp):o.default.UZERO,e},toJSON(e){const t={};return void 0!==e.sequence&&(t.sequence=(e.sequence||o.default.UZERO).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=R(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||o.default.UZERO).toString()),t},fromPartial(object){var e,t,n,r,c;const d=Object.assign({},_);return d.sequence=void 0!==object.sequence&&null!==object.sequence?o.default.fromValue(object.sequence):o.default.UZERO,d.sourcePort=null!==(e=object.sourcePort)&&void 0!==e?e:"",d.sourceChannel=null!==(t=object.sourceChannel)&&void 0!==t?t:"",d.destinationPort=null!==(n=object.destinationPort)&&void 0!==n?n:"",d.destinationChannel=null!==(r=object.destinationChannel)&&void 0!==r?r:"",d.data=null!==(c=object.data)&&void 0!==c?c:new Uint8Array,d.timeoutHeight=void 0!==object.timeoutHeight&&null!==object.timeoutHeight?l.Height.fromPartial(object.timeoutHeight):void 0,d.timeoutTimestamp=void 0!==object.timeoutTimestamp&&null!==object.timeoutTimestamp?o.default.fromValue(object.timeoutTimestamp):o.default.UZERO,d}};const C={portId:"",channelId:"",sequence:o.default.UZERO};t.PacketState={encode:(e,t=c.default.Writer.create())=>(""!==e.portId&&t.uint32(10).string(e.portId),""!==e.channelId&&t.uint32(18).string(e.channelId),e.sequence.isZero()||t.uint32(24).uint64(e.sequence),0!==e.data.length&&t.uint32(34).bytes(e.data),t),decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},C);for(r.data=new Uint8Array;t.pos>>3){case 1:r.portId=t.string();break;case 2:r.channelId=t.string();break;case 3:r.sequence=t.uint64();break;case 4:r.data=t.bytes();break;default:t.skipType(7&e)}}return r},fromJSON(object){const e=Object.assign({},C);return e.portId=void 0!==object.portId&&null!==object.portId?String(object.portId):"",e.channelId=void 0!==object.channelId&&null!==object.channelId?String(object.channelId):"",e.sequence=void 0!==object.sequence&&null!==object.sequence?o.default.fromString(object.sequence):o.default.UZERO,e.data=void 0!==object.data&&null!==object.data?k(object.data):new Uint8Array,e},toJSON(e){const 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||o.default.UZERO).toString()),void 0!==e.data&&(t.data=R(void 0!==e.data?e.data:new Uint8Array)),t},fromPartial(object){var e,t,n;const r=Object.assign({},C);return r.portId=null!==(e=object.portId)&&void 0!==e?e:"",r.channelId=null!==(t=object.channelId)&&void 0!==t?t:"",r.sequence=void 0!==object.sequence&&null!==object.sequence?o.default.fromValue(object.sequence):o.default.UZERO,r.data=null!==(n=object.data)&&void 0!==n?n:new Uint8Array,r}};const S={};t.Acknowledgement={encode:(e,t=c.default.Writer.create())=>(void 0!==e.result&&t.uint32(170).bytes(e.result),void 0!==e.error&&t.uint32(178).string(e.error),t),decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},S);for(;t.pos>>3){case 21:r.result=t.bytes();break;case 22:r.error=t.string();break;default:t.skipType(7&e)}}return r},fromJSON(object){const e=Object.assign({},S);return e.result=void 0!==object.result&&null!==object.result?k(object.result):void 0,e.error=void 0!==object.error&&null!==object.error?String(object.error):void 0,e},toJSON(e){const t={};return void 0!==e.result&&(t.result=void 0!==e.result?R(e.result):void 0),void 0!==e.error&&(t.error=e.error),t},fromPartial(object){var e,t;const n=Object.assign({},S);return n.result=null!==(e=object.result)&&void 0!==e?e:void 0,n.error=null!==(t=object.error)&&void 0!==t?t:void 0,n}};var E=(()=>{if(void 0!==E)return E;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==e)return e;throw"Unable to locate global object"})();const B=E.atob||(e=>E.Buffer.from(e,"base64").toString("binary"));function k(e){const t=B(e),n=new Uint8Array(t.length);for(let i=0;iE.Buffer.from(e,"binary").toString("base64"));function R(e){const t=[];for(const n of e)t.push(String.fromCharCode(n));return O(t.join(""))}c.default.util.Long!==o.default&&(c.default.util.Long=o.default,c.default.configure())}).call(this,n(3))},function(e,t,n){"use strict";(function(e){var r=this&&this.__importDefault||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;const o=r(n(1)),c=r(n(2)),l=n(441),d=n(840),f=n(65),h=n(442);var A,m;function v(object){switch(object){case 0:case"BLOCK_ID_FLAG_UNKNOWN":return A.BLOCK_ID_FLAG_UNKNOWN;case 1:case"BLOCK_ID_FLAG_ABSENT":return A.BLOCK_ID_FLAG_ABSENT;case 2:case"BLOCK_ID_FLAG_COMMIT":return A.BLOCK_ID_FLAG_COMMIT;case 3:case"BLOCK_ID_FLAG_NIL":return A.BLOCK_ID_FLAG_NIL;default:return A.UNRECOGNIZED}}function y(object){switch(object){case A.BLOCK_ID_FLAG_UNKNOWN:return"BLOCK_ID_FLAG_UNKNOWN";case A.BLOCK_ID_FLAG_ABSENT:return"BLOCK_ID_FLAG_ABSENT";case A.BLOCK_ID_FLAG_COMMIT:return"BLOCK_ID_FLAG_COMMIT";case A.BLOCK_ID_FLAG_NIL:return"BLOCK_ID_FLAG_NIL";default:return"UNKNOWN"}}function I(object){switch(object){case 0:case"SIGNED_MSG_TYPE_UNKNOWN":return m.SIGNED_MSG_TYPE_UNKNOWN;case 1:case"SIGNED_MSG_TYPE_PREVOTE":return m.SIGNED_MSG_TYPE_PREVOTE;case 2:case"SIGNED_MSG_TYPE_PRECOMMIT":return m.SIGNED_MSG_TYPE_PRECOMMIT;case 32:case"SIGNED_MSG_TYPE_PROPOSAL":return m.SIGNED_MSG_TYPE_PROPOSAL;default:return m.UNRECOGNIZED}}function w(object){switch(object){case m.SIGNED_MSG_TYPE_UNKNOWN:return"SIGNED_MSG_TYPE_UNKNOWN";case m.SIGNED_MSG_TYPE_PREVOTE:return"SIGNED_MSG_TYPE_PREVOTE";case m.SIGNED_MSG_TYPE_PRECOMMIT:return"SIGNED_MSG_TYPE_PRECOMMIT";case m.SIGNED_MSG_TYPE_PROPOSAL:return"SIGNED_MSG_TYPE_PROPOSAL";default:return"UNKNOWN"}}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"}(A=t.BlockIDFlag||(t.BlockIDFlag={})),t.blockIDFlagFromJSON=v,t.blockIDFlagToJSON=y,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"}(m=t.SignedMsgType||(t.SignedMsgType={})),t.signedMsgTypeFromJSON=I,t.signedMsgTypeToJSON=w;const _={total:0};t.PartSetHeader={encode:(e,t=c.default.Writer.create())=>(0!==e.total&&t.uint32(8).uint32(e.total),0!==e.hash.length&&t.uint32(18).bytes(e.hash),t),decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},_);for(r.hash=new Uint8Array;t.pos>>3){case 1:r.total=t.uint32();break;case 2:r.hash=t.bytes();break;default:t.skipType(7&e)}}return r},fromJSON(object){const e=Object.assign({},_);return e.total=void 0!==object.total&&null!==object.total?Number(object.total):0,e.hash=void 0!==object.hash&&null!==object.hash?j(object.hash):new Uint8Array,e},toJSON(e){const t={};return void 0!==e.total&&(t.total=e.total),void 0!==e.hash&&(t.hash=J(void 0!==e.hash?e.hash:new Uint8Array)),t},fromPartial(object){var e,t;const n=Object.assign({},_);return n.total=null!==(e=object.total)&&void 0!==e?e:0,n.hash=null!==(t=object.hash)&&void 0!==t?t:new Uint8Array,n}};const C={index:0};t.Part={encode:(e,t=c.default.Writer.create())=>(0!==e.index&&t.uint32(8).uint32(e.index),0!==e.bytes.length&&t.uint32(18).bytes(e.bytes),void 0!==e.proof&&l.Proof.encode(e.proof,t.uint32(26).fork()).ldelim(),t),decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},C);for(r.bytes=new Uint8Array;t.pos>>3){case 1:r.index=t.uint32();break;case 2:r.bytes=t.bytes();break;case 3:r.proof=l.Proof.decode(t,t.uint32());break;default:t.skipType(7&e)}}return r},fromJSON(object){const e=Object.assign({},C);return e.index=void 0!==object.index&&null!==object.index?Number(object.index):0,e.bytes=void 0!==object.bytes&&null!==object.bytes?j(object.bytes):new Uint8Array,e.proof=void 0!==object.proof&&null!==object.proof?l.Proof.fromJSON(object.proof):void 0,e},toJSON(e){const t={};return void 0!==e.index&&(t.index=e.index),void 0!==e.bytes&&(t.bytes=J(void 0!==e.bytes?e.bytes:new Uint8Array)),void 0!==e.proof&&(t.proof=e.proof?l.Proof.toJSON(e.proof):void 0),t},fromPartial(object){var e,t;const n=Object.assign({},C);return n.index=null!==(e=object.index)&&void 0!==e?e:0,n.bytes=null!==(t=object.bytes)&&void 0!==t?t:new Uint8Array,n.proof=void 0!==object.proof&&null!==object.proof?l.Proof.fromPartial(object.proof):void 0,n}};const S={};t.BlockID={encode:(e,n=c.default.Writer.create())=>(0!==e.hash.length&&n.uint32(10).bytes(e.hash),void 0!==e.partSetHeader&&t.PartSetHeader.encode(e.partSetHeader,n.uint32(18).fork()).ldelim(),n),decode(input,e){const n=input instanceof c.default.Reader?input:new c.default.Reader(input);let r=void 0===e?n.len:n.pos+e;const o=Object.assign({},S);for(o.hash=new Uint8Array;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(object){const e=Object.assign({},S);return e.hash=void 0!==object.hash&&null!==object.hash?j(object.hash):new Uint8Array,e.partSetHeader=void 0!==object.partSetHeader&&null!==object.partSetHeader?t.PartSetHeader.fromJSON(object.partSetHeader):void 0,e},toJSON(e){const n={};return void 0!==e.hash&&(n.hash=J(void 0!==e.hash?e.hash:new Uint8Array)),void 0!==e.partSetHeader&&(n.partSetHeader=e.partSetHeader?t.PartSetHeader.toJSON(e.partSetHeader):void 0),n},fromPartial(object){var e;const n=Object.assign({},S);return n.hash=null!==(e=object.hash)&&void 0!==e?e:new Uint8Array,n.partSetHeader=void 0!==object.partSetHeader&&null!==object.partSetHeader?t.PartSetHeader.fromPartial(object.partSetHeader):void 0,n}};const E={chainId:"",height:o.default.ZERO};t.Header={encode:(e,n=c.default.Writer.create())=>(void 0!==e.version&&d.Consensus.encode(e.version,n.uint32(10).fork()).ldelim(),""!==e.chainId&&n.uint32(18).string(e.chainId),e.height.isZero()||n.uint32(24).int64(e.height),void 0!==e.time&&f.Timestamp.encode(e.time,n.uint32(34).fork()).ldelim(),void 0!==e.lastBlockId&&t.BlockID.encode(e.lastBlockId,n.uint32(42).fork()).ldelim(),0!==e.lastCommitHash.length&&n.uint32(50).bytes(e.lastCommitHash),0!==e.dataHash.length&&n.uint32(58).bytes(e.dataHash),0!==e.validatorsHash.length&&n.uint32(66).bytes(e.validatorsHash),0!==e.nextValidatorsHash.length&&n.uint32(74).bytes(e.nextValidatorsHash),0!==e.consensusHash.length&&n.uint32(82).bytes(e.consensusHash),0!==e.appHash.length&&n.uint32(90).bytes(e.appHash),0!==e.lastResultsHash.length&&n.uint32(98).bytes(e.lastResultsHash),0!==e.evidenceHash.length&&n.uint32(106).bytes(e.evidenceHash),0!==e.proposerAddress.length&&n.uint32(114).bytes(e.proposerAddress),n),decode(input,e){const n=input instanceof c.default.Reader?input:new c.default.Reader(input);let r=void 0===e?n.len:n.pos+e;const o=Object.assign({},E);for(o.lastCommitHash=new Uint8Array,o.dataHash=new Uint8Array,o.validatorsHash=new Uint8Array,o.nextValidatorsHash=new Uint8Array,o.consensusHash=new Uint8Array,o.appHash=new Uint8Array,o.lastResultsHash=new Uint8Array,o.evidenceHash=new Uint8Array,o.proposerAddress=new Uint8Array;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=n.int64();break;case 4:o.time=f.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(object){const e=Object.assign({},E);return e.version=void 0!==object.version&&null!==object.version?d.Consensus.fromJSON(object.version):void 0,e.chainId=void 0!==object.chainId&&null!==object.chainId?String(object.chainId):"",e.height=void 0!==object.height&&null!==object.height?o.default.fromString(object.height):o.default.ZERO,e.time=void 0!==object.time&&null!==object.time?L(object.time):void 0,e.lastBlockId=void 0!==object.lastBlockId&&null!==object.lastBlockId?t.BlockID.fromJSON(object.lastBlockId):void 0,e.lastCommitHash=void 0!==object.lastCommitHash&&null!==object.lastCommitHash?j(object.lastCommitHash):new Uint8Array,e.dataHash=void 0!==object.dataHash&&null!==object.dataHash?j(object.dataHash):new Uint8Array,e.validatorsHash=void 0!==object.validatorsHash&&null!==object.validatorsHash?j(object.validatorsHash):new Uint8Array,e.nextValidatorsHash=void 0!==object.nextValidatorsHash&&null!==object.nextValidatorsHash?j(object.nextValidatorsHash):new Uint8Array,e.consensusHash=void 0!==object.consensusHash&&null!==object.consensusHash?j(object.consensusHash):new Uint8Array,e.appHash=void 0!==object.appHash&&null!==object.appHash?j(object.appHash):new Uint8Array,e.lastResultsHash=void 0!==object.lastResultsHash&&null!==object.lastResultsHash?j(object.lastResultsHash):new Uint8Array,e.evidenceHash=void 0!==object.evidenceHash&&null!==object.evidenceHash?j(object.evidenceHash):new Uint8Array,e.proposerAddress=void 0!==object.proposerAddress&&null!==object.proposerAddress?j(object.proposerAddress):new Uint8Array,e},toJSON(e){const n={};return void 0!==e.version&&(n.version=e.version?d.Consensus.toJSON(e.version):void 0),void 0!==e.chainId&&(n.chainId=e.chainId),void 0!==e.height&&(n.height=(e.height||o.default.ZERO).toString()),void 0!==e.time&&(n.time=F(e.time).toISOString()),void 0!==e.lastBlockId&&(n.lastBlockId=e.lastBlockId?t.BlockID.toJSON(e.lastBlockId):void 0),void 0!==e.lastCommitHash&&(n.lastCommitHash=J(void 0!==e.lastCommitHash?e.lastCommitHash:new Uint8Array)),void 0!==e.dataHash&&(n.dataHash=J(void 0!==e.dataHash?e.dataHash:new Uint8Array)),void 0!==e.validatorsHash&&(n.validatorsHash=J(void 0!==e.validatorsHash?e.validatorsHash:new Uint8Array)),void 0!==e.nextValidatorsHash&&(n.nextValidatorsHash=J(void 0!==e.nextValidatorsHash?e.nextValidatorsHash:new Uint8Array)),void 0!==e.consensusHash&&(n.consensusHash=J(void 0!==e.consensusHash?e.consensusHash:new Uint8Array)),void 0!==e.appHash&&(n.appHash=J(void 0!==e.appHash?e.appHash:new Uint8Array)),void 0!==e.lastResultsHash&&(n.lastResultsHash=J(void 0!==e.lastResultsHash?e.lastResultsHash:new Uint8Array)),void 0!==e.evidenceHash&&(n.evidenceHash=J(void 0!==e.evidenceHash?e.evidenceHash:new Uint8Array)),void 0!==e.proposerAddress&&(n.proposerAddress=J(void 0!==e.proposerAddress?e.proposerAddress:new Uint8Array)),n},fromPartial(object){var e,n,r,c,l,h,A,m,v,y;const I=Object.assign({},E);return I.version=void 0!==object.version&&null!==object.version?d.Consensus.fromPartial(object.version):void 0,I.chainId=null!==(e=object.chainId)&&void 0!==e?e:"",I.height=void 0!==object.height&&null!==object.height?o.default.fromValue(object.height):o.default.ZERO,I.time=void 0!==object.time&&null!==object.time?f.Timestamp.fromPartial(object.time):void 0,I.lastBlockId=void 0!==object.lastBlockId&&null!==object.lastBlockId?t.BlockID.fromPartial(object.lastBlockId):void 0,I.lastCommitHash=null!==(n=object.lastCommitHash)&&void 0!==n?n:new Uint8Array,I.dataHash=null!==(r=object.dataHash)&&void 0!==r?r:new Uint8Array,I.validatorsHash=null!==(c=object.validatorsHash)&&void 0!==c?c:new Uint8Array,I.nextValidatorsHash=null!==(l=object.nextValidatorsHash)&&void 0!==l?l:new Uint8Array,I.consensusHash=null!==(h=object.consensusHash)&&void 0!==h?h:new Uint8Array,I.appHash=null!==(A=object.appHash)&&void 0!==A?A:new Uint8Array,I.lastResultsHash=null!==(m=object.lastResultsHash)&&void 0!==m?m:new Uint8Array,I.evidenceHash=null!==(v=object.evidenceHash)&&void 0!==v?v:new Uint8Array,I.proposerAddress=null!==(y=object.proposerAddress)&&void 0!==y?y:new Uint8Array,I}};const B={};t.Data={encode(e,t=c.default.Writer.create()){for(const n of e.txs)t.uint32(10).bytes(n);return t},decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},B);for(r.txs=[];t.pos>>3==1)r.txs.push(t.bytes());else t.skipType(7&e)}return r},fromJSON(object){var e;const t=Object.assign({},B);return t.txs=(null!==(e=object.txs)&&void 0!==e?e:[]).map((e=>j(e))),t},toJSON(e){const t={};return e.txs?t.txs=e.txs.map((e=>J(void 0!==e?e:new Uint8Array))):t.txs=[],t},fromPartial(object){var e;const t=Object.assign({},B);return t.txs=(null===(e=object.txs)||void 0===e?void 0:e.map((e=>e)))||[],t}};const k={type:0,height:o.default.ZERO,round:0,validatorIndex:0};t.Vote={encode:(e,n=c.default.Writer.create())=>(0!==e.type&&n.uint32(8).int32(e.type),e.height.isZero()||n.uint32(16).int64(e.height),0!==e.round&&n.uint32(24).int32(e.round),void 0!==e.blockId&&t.BlockID.encode(e.blockId,n.uint32(34).fork()).ldelim(),void 0!==e.timestamp&&f.Timestamp.encode(e.timestamp,n.uint32(42).fork()).ldelim(),0!==e.validatorAddress.length&&n.uint32(50).bytes(e.validatorAddress),0!==e.validatorIndex&&n.uint32(56).int32(e.validatorIndex),0!==e.signature.length&&n.uint32(66).bytes(e.signature),n),decode(input,e){const n=input instanceof c.default.Reader?input:new c.default.Reader(input);let r=void 0===e?n.len:n.pos+e;const o=Object.assign({},k);for(o.validatorAddress=new Uint8Array,o.signature=new Uint8Array;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=f.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(object){const e=Object.assign({},k);return e.type=void 0!==object.type&&null!==object.type?I(object.type):0,e.height=void 0!==object.height&&null!==object.height?o.default.fromString(object.height):o.default.ZERO,e.round=void 0!==object.round&&null!==object.round?Number(object.round):0,e.blockId=void 0!==object.blockId&&null!==object.blockId?t.BlockID.fromJSON(object.blockId):void 0,e.timestamp=void 0!==object.timestamp&&null!==object.timestamp?L(object.timestamp):void 0,e.validatorAddress=void 0!==object.validatorAddress&&null!==object.validatorAddress?j(object.validatorAddress):new Uint8Array,e.validatorIndex=void 0!==object.validatorIndex&&null!==object.validatorIndex?Number(object.validatorIndex):0,e.signature=void 0!==object.signature&&null!==object.signature?j(object.signature):new Uint8Array,e},toJSON(e){const n={};return void 0!==e.type&&(n.type=w(e.type)),void 0!==e.height&&(n.height=(e.height||o.default.ZERO).toString()),void 0!==e.round&&(n.round=e.round),void 0!==e.blockId&&(n.blockId=e.blockId?t.BlockID.toJSON(e.blockId):void 0),void 0!==e.timestamp&&(n.timestamp=F(e.timestamp).toISOString()),void 0!==e.validatorAddress&&(n.validatorAddress=J(void 0!==e.validatorAddress?e.validatorAddress:new Uint8Array)),void 0!==e.validatorIndex&&(n.validatorIndex=e.validatorIndex),void 0!==e.signature&&(n.signature=J(void 0!==e.signature?e.signature:new Uint8Array)),n},fromPartial(object){var e,n,r,c,l;const d=Object.assign({},k);return d.type=null!==(e=object.type)&&void 0!==e?e:0,d.height=void 0!==object.height&&null!==object.height?o.default.fromValue(object.height):o.default.ZERO,d.round=null!==(n=object.round)&&void 0!==n?n:0,d.blockId=void 0!==object.blockId&&null!==object.blockId?t.BlockID.fromPartial(object.blockId):void 0,d.timestamp=void 0!==object.timestamp&&null!==object.timestamp?f.Timestamp.fromPartial(object.timestamp):void 0,d.validatorAddress=null!==(r=object.validatorAddress)&&void 0!==r?r:new Uint8Array,d.validatorIndex=null!==(c=object.validatorIndex)&&void 0!==c?c:0,d.signature=null!==(l=object.signature)&&void 0!==l?l:new Uint8Array,d}};const O={height:o.default.ZERO,round:0};t.Commit={encode(e,n=c.default.Writer.create()){e.height.isZero()||n.uint32(8).int64(e.height),0!==e.round&&n.uint32(16).int32(e.round),void 0!==e.blockId&&t.BlockID.encode(e.blockId,n.uint32(26).fork()).ldelim();for(const r of e.signatures)t.CommitSig.encode(r,n.uint32(34).fork()).ldelim();return n},decode(input,e){const n=input instanceof c.default.Reader?input:new c.default.Reader(input);let r=void 0===e?n.len:n.pos+e;const o=Object.assign({},O);for(o.signatures=[];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(object){var e;const n=Object.assign({},O);return n.height=void 0!==object.height&&null!==object.height?o.default.fromString(object.height):o.default.ZERO,n.round=void 0!==object.round&&null!==object.round?Number(object.round):0,n.blockId=void 0!==object.blockId&&null!==object.blockId?t.BlockID.fromJSON(object.blockId):void 0,n.signatures=(null!==(e=object.signatures)&&void 0!==e?e:[]).map((e=>t.CommitSig.fromJSON(e))),n},toJSON(e){const n={};return void 0!==e.height&&(n.height=(e.height||o.default.ZERO).toString()),void 0!==e.round&&(n.round=e.round),void 0!==e.blockId&&(n.blockId=e.blockId?t.BlockID.toJSON(e.blockId):void 0),e.signatures?n.signatures=e.signatures.map((e=>e?t.CommitSig.toJSON(e):void 0)):n.signatures=[],n},fromPartial(object){var e,n;const r=Object.assign({},O);return r.height=void 0!==object.height&&null!==object.height?o.default.fromValue(object.height):o.default.ZERO,r.round=null!==(e=object.round)&&void 0!==e?e:0,r.blockId=void 0!==object.blockId&&null!==object.blockId?t.BlockID.fromPartial(object.blockId):void 0,r.signatures=(null===(n=object.signatures)||void 0===n?void 0:n.map((e=>t.CommitSig.fromPartial(e))))||[],r}};const R={blockIdFlag:0};t.CommitSig={encode:(e,t=c.default.Writer.create())=>(0!==e.blockIdFlag&&t.uint32(8).int32(e.blockIdFlag),0!==e.validatorAddress.length&&t.uint32(18).bytes(e.validatorAddress),void 0!==e.timestamp&&f.Timestamp.encode(e.timestamp,t.uint32(26).fork()).ldelim(),0!==e.signature.length&&t.uint32(34).bytes(e.signature),t),decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},R);for(r.validatorAddress=new Uint8Array,r.signature=new Uint8Array;t.pos>>3){case 1:r.blockIdFlag=t.int32();break;case 2:r.validatorAddress=t.bytes();break;case 3:r.timestamp=f.Timestamp.decode(t,t.uint32());break;case 4:r.signature=t.bytes();break;default:t.skipType(7&e)}}return r},fromJSON(object){const e=Object.assign({},R);return e.blockIdFlag=void 0!==object.blockIdFlag&&null!==object.blockIdFlag?v(object.blockIdFlag):0,e.validatorAddress=void 0!==object.validatorAddress&&null!==object.validatorAddress?j(object.validatorAddress):new Uint8Array,e.timestamp=void 0!==object.timestamp&&null!==object.timestamp?L(object.timestamp):void 0,e.signature=void 0!==object.signature&&null!==object.signature?j(object.signature):new Uint8Array,e},toJSON(e){const t={};return void 0!==e.blockIdFlag&&(t.blockIdFlag=y(e.blockIdFlag)),void 0!==e.validatorAddress&&(t.validatorAddress=J(void 0!==e.validatorAddress?e.validatorAddress:new Uint8Array)),void 0!==e.timestamp&&(t.timestamp=F(e.timestamp).toISOString()),void 0!==e.signature&&(t.signature=J(void 0!==e.signature?e.signature:new Uint8Array)),t},fromPartial(object){var e,t,n;const r=Object.assign({},R);return r.blockIdFlag=null!==(e=object.blockIdFlag)&&void 0!==e?e:0,r.validatorAddress=null!==(t=object.validatorAddress)&&void 0!==t?t:new Uint8Array,r.timestamp=void 0!==object.timestamp&&null!==object.timestamp?f.Timestamp.fromPartial(object.timestamp):void 0,r.signature=null!==(n=object.signature)&&void 0!==n?n:new Uint8Array,r}};const P={type:0,height:o.default.ZERO,round:0,polRound:0};t.Proposal={encode:(e,n=c.default.Writer.create())=>(0!==e.type&&n.uint32(8).int32(e.type),e.height.isZero()||n.uint32(16).int64(e.height),0!==e.round&&n.uint32(24).int32(e.round),0!==e.polRound&&n.uint32(32).int32(e.polRound),void 0!==e.blockId&&t.BlockID.encode(e.blockId,n.uint32(42).fork()).ldelim(),void 0!==e.timestamp&&f.Timestamp.encode(e.timestamp,n.uint32(50).fork()).ldelim(),0!==e.signature.length&&n.uint32(58).bytes(e.signature),n),decode(input,e){const n=input instanceof c.default.Reader?input:new c.default.Reader(input);let r=void 0===e?n.len:n.pos+e;const o=Object.assign({},P);for(o.signature=new Uint8Array;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=f.Timestamp.decode(n,n.uint32());break;case 7:o.signature=n.bytes();break;default:n.skipType(7&e)}}return o},fromJSON(object){const e=Object.assign({},P);return e.type=void 0!==object.type&&null!==object.type?I(object.type):0,e.height=void 0!==object.height&&null!==object.height?o.default.fromString(object.height):o.default.ZERO,e.round=void 0!==object.round&&null!==object.round?Number(object.round):0,e.polRound=void 0!==object.polRound&&null!==object.polRound?Number(object.polRound):0,e.blockId=void 0!==object.blockId&&null!==object.blockId?t.BlockID.fromJSON(object.blockId):void 0,e.timestamp=void 0!==object.timestamp&&null!==object.timestamp?L(object.timestamp):void 0,e.signature=void 0!==object.signature&&null!==object.signature?j(object.signature):new Uint8Array,e},toJSON(e){const n={};return void 0!==e.type&&(n.type=w(e.type)),void 0!==e.height&&(n.height=(e.height||o.default.ZERO).toString()),void 0!==e.round&&(n.round=e.round),void 0!==e.polRound&&(n.polRound=e.polRound),void 0!==e.blockId&&(n.blockId=e.blockId?t.BlockID.toJSON(e.blockId):void 0),void 0!==e.timestamp&&(n.timestamp=F(e.timestamp).toISOString()),void 0!==e.signature&&(n.signature=J(void 0!==e.signature?e.signature:new Uint8Array)),n},fromPartial(object){var e,n,r,c;const l=Object.assign({},P);return l.type=null!==(e=object.type)&&void 0!==e?e:0,l.height=void 0!==object.height&&null!==object.height?o.default.fromValue(object.height):o.default.ZERO,l.round=null!==(n=object.round)&&void 0!==n?n:0,l.polRound=null!==(r=object.polRound)&&void 0!==r?r:0,l.blockId=void 0!==object.blockId&&null!==object.blockId?t.BlockID.fromPartial(object.blockId):void 0,l.timestamp=void 0!==object.timestamp&&null!==object.timestamp?f.Timestamp.fromPartial(object.timestamp):void 0,l.signature=null!==(c=object.signature)&&void 0!==c?c:new Uint8Array,l}};const x={};t.SignedHeader={encode:(e,n=c.default.Writer.create())=>(void 0!==e.header&&t.Header.encode(e.header,n.uint32(10).fork()).ldelim(),void 0!==e.commit&&t.Commit.encode(e.commit,n.uint32(18).fork()).ldelim(),n),decode(input,e){const n=input instanceof c.default.Reader?input:new c.default.Reader(input);let r=void 0===e?n.len:n.pos+e;const o=Object.assign({},x);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(object){const e=Object.assign({},x);return e.header=void 0!==object.header&&null!==object.header?t.Header.fromJSON(object.header):void 0,e.commit=void 0!==object.commit&&null!==object.commit?t.Commit.fromJSON(object.commit):void 0,e},toJSON(e){const n={};return void 0!==e.header&&(n.header=e.header?t.Header.toJSON(e.header):void 0),void 0!==e.commit&&(n.commit=e.commit?t.Commit.toJSON(e.commit):void 0),n},fromPartial(object){const e=Object.assign({},x);return e.header=void 0!==object.header&&null!==object.header?t.Header.fromPartial(object.header):void 0,e.commit=void 0!==object.commit&&null!==object.commit?t.Commit.fromPartial(object.commit):void 0,e}};const M={};t.LightBlock={encode:(e,n=c.default.Writer.create())=>(void 0!==e.signedHeader&&t.SignedHeader.encode(e.signedHeader,n.uint32(10).fork()).ldelim(),void 0!==e.validatorSet&&h.ValidatorSet.encode(e.validatorSet,n.uint32(18).fork()).ldelim(),n),decode(input,e){const n=input instanceof c.default.Reader?input:new c.default.Reader(input);let r=void 0===e?n.len:n.pos+e;const o=Object.assign({},M);for(;n.pos>>3){case 1:o.signedHeader=t.SignedHeader.decode(n,n.uint32());break;case 2:o.validatorSet=h.ValidatorSet.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(object){const e=Object.assign({},M);return e.signedHeader=void 0!==object.signedHeader&&null!==object.signedHeader?t.SignedHeader.fromJSON(object.signedHeader):void 0,e.validatorSet=void 0!==object.validatorSet&&null!==object.validatorSet?h.ValidatorSet.fromJSON(object.validatorSet):void 0,e},toJSON(e){const n={};return void 0!==e.signedHeader&&(n.signedHeader=e.signedHeader?t.SignedHeader.toJSON(e.signedHeader):void 0),void 0!==e.validatorSet&&(n.validatorSet=e.validatorSet?h.ValidatorSet.toJSON(e.validatorSet):void 0),n},fromPartial(object){const e=Object.assign({},M);return e.signedHeader=void 0!==object.signedHeader&&null!==object.signedHeader?t.SignedHeader.fromPartial(object.signedHeader):void 0,e.validatorSet=void 0!==object.validatorSet&&null!==object.validatorSet?h.ValidatorSet.fromPartial(object.validatorSet):void 0,e}};const Q={blockSize:o.default.ZERO,numTxs:o.default.ZERO};t.BlockMeta={encode:(e,n=c.default.Writer.create())=>(void 0!==e.blockId&&t.BlockID.encode(e.blockId,n.uint32(10).fork()).ldelim(),e.blockSize.isZero()||n.uint32(16).int64(e.blockSize),void 0!==e.header&&t.Header.encode(e.header,n.uint32(26).fork()).ldelim(),e.numTxs.isZero()||n.uint32(32).int64(e.numTxs),n),decode(input,e){const n=input instanceof c.default.Reader?input:new c.default.Reader(input);let r=void 0===e?n.len:n.pos+e;const o=Object.assign({},Q);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(object){const e=Object.assign({},Q);return e.blockId=void 0!==object.blockId&&null!==object.blockId?t.BlockID.fromJSON(object.blockId):void 0,e.blockSize=void 0!==object.blockSize&&null!==object.blockSize?o.default.fromString(object.blockSize):o.default.ZERO,e.header=void 0!==object.header&&null!==object.header?t.Header.fromJSON(object.header):void 0,e.numTxs=void 0!==object.numTxs&&null!==object.numTxs?o.default.fromString(object.numTxs):o.default.ZERO,e},toJSON(e){const n={};return void 0!==e.blockId&&(n.blockId=e.blockId?t.BlockID.toJSON(e.blockId):void 0),void 0!==e.blockSize&&(n.blockSize=(e.blockSize||o.default.ZERO).toString()),void 0!==e.header&&(n.header=e.header?t.Header.toJSON(e.header):void 0),void 0!==e.numTxs&&(n.numTxs=(e.numTxs||o.default.ZERO).toString()),n},fromPartial(object){const e=Object.assign({},Q);return e.blockId=void 0!==object.blockId&&null!==object.blockId?t.BlockID.fromPartial(object.blockId):void 0,e.blockSize=void 0!==object.blockSize&&null!==object.blockSize?o.default.fromValue(object.blockSize):o.default.ZERO,e.header=void 0!==object.header&&null!==object.header?t.Header.fromPartial(object.header):void 0,e.numTxs=void 0!==object.numTxs&&null!==object.numTxs?o.default.fromValue(object.numTxs):o.default.ZERO,e}};const N={};t.TxProof={encode:(e,t=c.default.Writer.create())=>(0!==e.rootHash.length&&t.uint32(10).bytes(e.rootHash),0!==e.data.length&&t.uint32(18).bytes(e.data),void 0!==e.proof&&l.Proof.encode(e.proof,t.uint32(26).fork()).ldelim(),t),decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},N);for(r.rootHash=new Uint8Array,r.data=new Uint8Array;t.pos>>3){case 1:r.rootHash=t.bytes();break;case 2:r.data=t.bytes();break;case 3:r.proof=l.Proof.decode(t,t.uint32());break;default:t.skipType(7&e)}}return r},fromJSON(object){const e=Object.assign({},N);return e.rootHash=void 0!==object.rootHash&&null!==object.rootHash?j(object.rootHash):new Uint8Array,e.data=void 0!==object.data&&null!==object.data?j(object.data):new Uint8Array,e.proof=void 0!==object.proof&&null!==object.proof?l.Proof.fromJSON(object.proof):void 0,e},toJSON(e){const t={};return void 0!==e.rootHash&&(t.rootHash=J(void 0!==e.rootHash?e.rootHash:new Uint8Array)),void 0!==e.data&&(t.data=J(void 0!==e.data?e.data:new Uint8Array)),void 0!==e.proof&&(t.proof=e.proof?l.Proof.toJSON(e.proof):void 0),t},fromPartial(object){var e,t;const n=Object.assign({},N);return n.rootHash=null!==(e=object.rootHash)&&void 0!==e?e:new Uint8Array,n.data=null!==(t=object.data)&&void 0!==t?t:new Uint8Array,n.proof=void 0!==object.proof&&null!==object.proof?l.Proof.fromPartial(object.proof):void 0,n}};var D=(()=>{if(void 0!==D)return D;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==e)return e;throw"Unable to locate global object"})();const T=D.atob||(e=>D.Buffer.from(e,"base64").toString("binary"));function j(e){const t=T(e),n=new Uint8Array(t.length);for(let i=0;iD.Buffer.from(e,"binary").toString("base64"));function J(e){const t=[];for(const n of e)t.push(String.fromCharCode(n));return U(t.join(""))}function H(e){var t;return{seconds:(t=e.getTime()/1e3,o.default.fromNumber(t)),nanos:e.getTime()%1e3*1e6}}function F(e){let t=1e3*e.seconds.toNumber();return t+=e.nanos/1e6,new Date(t)}function L(e){return e instanceof Date?H(e):"string"==typeof e?H(new Date(e)):f.Timestamp.fromJSON(e)}c.default.util.Long!==o.default&&(c.default.util.Long=o.default,c.default.configure())}).call(this,n(3))},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.NFT=t.Class=t.protobufPackage=void 0;const o=r(n(1)),c=r(n(2)),l=n(866);t.protobufPackage="cosmos.nft.v1beta1";const d={id:"",name:"",symbol:"",description:"",uri:"",uriHash:""};t.Class={encode:(e,t=c.default.Writer.create())=>(""!==e.id&&t.uint32(10).string(e.id),""!==e.name&&t.uint32(18).string(e.name),""!==e.symbol&&t.uint32(26).string(e.symbol),""!==e.description&&t.uint32(34).string(e.description),""!==e.uri&&t.uint32(42).string(e.uri),""!==e.uriHash&&t.uint32(50).string(e.uriHash),void 0!==e.data&&l.Any.encode(e.data,t.uint32(58).fork()).ldelim(),t),decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},d);for(;t.pos>>3){case 1:r.id=t.string();break;case 2:r.name=t.string();break;case 3:r.symbol=t.string();break;case 4:r.description=t.string();break;case 5:r.uri=t.string();break;case 6:r.uriHash=t.string();break;case 7:r.data=l.Any.decode(t,t.uint32());break;default:t.skipType(7&e)}}return r},fromJSON(object){const e=Object.assign({},d);return void 0!==object.id&&null!==object.id?e.id=String(object.id):e.id="",void 0!==object.name&&null!==object.name?e.name=String(object.name):e.name="",void 0!==object.symbol&&null!==object.symbol?e.symbol=String(object.symbol):e.symbol="",void 0!==object.description&&null!==object.description?e.description=String(object.description):e.description="",void 0!==object.uri&&null!==object.uri?e.uri=String(object.uri):e.uri="",void 0!==object.uriHash&&null!==object.uriHash?e.uriHash=String(object.uriHash):e.uriHash="",void 0!==object.data&&null!==object.data?e.data=l.Any.fromJSON(object.data):e.data=void 0,e},toJSON(e){const t={};return void 0!==e.id&&(t.id=e.id),void 0!==e.name&&(t.name=e.name),void 0!==e.symbol&&(t.symbol=e.symbol),void 0!==e.description&&(t.description=e.description),void 0!==e.uri&&(t.uri=e.uri),void 0!==e.uriHash&&(t.uriHash=e.uriHash),void 0!==e.data&&(t.data=e.data?l.Any.toJSON(e.data):void 0),t},fromPartial(object){const e=Object.assign({},d);return void 0!==object.id&&null!==object.id?e.id=object.id:e.id="",void 0!==object.name&&null!==object.name?e.name=object.name:e.name="",void 0!==object.symbol&&null!==object.symbol?e.symbol=object.symbol:e.symbol="",void 0!==object.description&&null!==object.description?e.description=object.description:e.description="",void 0!==object.uri&&null!==object.uri?e.uri=object.uri:e.uri="",void 0!==object.uriHash&&null!==object.uriHash?e.uriHash=object.uriHash:e.uriHash="",void 0!==object.data&&null!==object.data?e.data=l.Any.fromPartial(object.data):e.data=void 0,e}};const f={classId:"",id:"",uri:"",uriHash:""};t.NFT={encode:(e,t=c.default.Writer.create())=>(""!==e.classId&&t.uint32(10).string(e.classId),""!==e.id&&t.uint32(18).string(e.id),""!==e.uri&&t.uint32(26).string(e.uri),""!==e.uriHash&&t.uint32(34).string(e.uriHash),void 0!==e.data&&l.Any.encode(e.data,t.uint32(82).fork()).ldelim(),t),decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},f);for(;t.pos>>3){case 1:r.classId=t.string();break;case 2:r.id=t.string();break;case 3:r.uri=t.string();break;case 4:r.uriHash=t.string();break;case 10:r.data=l.Any.decode(t,t.uint32());break;default:t.skipType(7&e)}}return r},fromJSON(object){const e=Object.assign({},f);return void 0!==object.classId&&null!==object.classId?e.classId=String(object.classId):e.classId="",void 0!==object.id&&null!==object.id?e.id=String(object.id):e.id="",void 0!==object.uri&&null!==object.uri?e.uri=String(object.uri):e.uri="",void 0!==object.uriHash&&null!==object.uriHash?e.uriHash=String(object.uriHash):e.uriHash="",void 0!==object.data&&null!==object.data?e.data=l.Any.fromJSON(object.data):e.data=void 0,e},toJSON(e){const t={};return void 0!==e.classId&&(t.classId=e.classId),void 0!==e.id&&(t.id=e.id),void 0!==e.uri&&(t.uri=e.uri),void 0!==e.uriHash&&(t.uriHash=e.uriHash),void 0!==e.data&&(t.data=e.data?l.Any.toJSON(e.data):void 0),t},fromPartial(object){const e=Object.assign({},f);return void 0!==object.classId&&null!==object.classId?e.classId=object.classId:e.classId="",void 0!==object.id&&null!==object.id?e.id=object.id:e.id="",void 0!==object.uri&&null!==object.uri?e.uri=object.uri:e.uri="",void 0!==object.uriHash&&null!==object.uriHash?e.uriHash=object.uriHash:e.uriHash="",void 0!==object.data&&null!==object.data?e.data=l.Any.fromPartial(object.data):e.data=void 0,e}},c.default.util.Long!==o.default&&(c.default.util.Long=o.default,c.default.configure())},function(e,t,n){"use strict";(function(e){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.BlindBoxState=t.BlindBoxConfig=t.ClassConfig=t.MintPeriod=t.ClassParent=t.ClassData=t.classParentTypeToJSON=t.classParentTypeFromJSON=t.ClassParentType=t.protobufPackage=void 0;const o=r(n(1)),c=r(n(2)),l=n(186);var d;function f(object){switch(object){case 0:case"UNKNOWN":return d.UNKNOWN;case 1:case"ISCN":return d.ISCN;case 2:case"ACCOUNT":return d.ACCOUNT;default:return d.UNRECOGNIZED}}function h(object){switch(object){case d.UNKNOWN:return"UNKNOWN";case d.ISCN:return"ISCN";case d.ACCOUNT:return"ACCOUNT";default:return"UNKNOWN"}}t.protobufPackage="likechain.likenft.v1",function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.ISCN=1]="ISCN",e[e.ACCOUNT=2]="ACCOUNT",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(d=t.ClassParentType||(t.ClassParentType={})),t.classParentTypeFromJSON=f,t.classParentTypeToJSON=h;const A={};t.ClassData={encode:(e,n=c.default.Writer.create())=>(0!==e.metadata.length&&n.uint32(10).bytes(e.metadata),void 0!==e.parent&&t.ClassParent.encode(e.parent,n.uint32(18).fork()).ldelim(),void 0!==e.config&&t.ClassConfig.encode(e.config,n.uint32(26).fork()).ldelim(),void 0!==e.blindBoxState&&t.BlindBoxState.encode(e.blindBoxState,n.uint32(34).fork()).ldelim(),n),decode(input,e){const n=input instanceof c.default.Reader?input:new c.default.Reader(input);let r=void 0===e?n.len:n.pos+e;const o=Object.assign({},A);for(o.metadata=new Uint8Array;n.pos>>3){case 1:o.metadata=n.bytes();break;case 2:o.parent=t.ClassParent.decode(n,n.uint32());break;case 3:o.config=t.ClassConfig.decode(n,n.uint32());break;case 4:o.blindBoxState=t.BlindBoxState.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(object){const e=Object.assign({},A);return e.metadata=new Uint8Array,void 0!==object.metadata&&null!==object.metadata&&(e.metadata=function(e){const t=C(e),n=new Uint8Array(t.length);for(let i=0;i(0!==e.type&&t.uint32(8).int32(e.type),""!==e.iscnIdPrefix&&t.uint32(18).string(e.iscnIdPrefix),e.iscnVersionAtMint.isZero()||t.uint32(24).uint64(e.iscnVersionAtMint),""!==e.account&&t.uint32(34).string(e.account),t),decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},m);for(;t.pos>>3){case 1:r.type=t.int32();break;case 2:r.iscnIdPrefix=t.string();break;case 3:r.iscnVersionAtMint=t.uint64();break;case 4:r.account=t.string();break;default:t.skipType(7&e)}}return r},fromJSON(object){const e=Object.assign({},m);return void 0!==object.type&&null!==object.type?e.type=f(object.type):e.type=0,void 0!==object.iscnIdPrefix&&null!==object.iscnIdPrefix?e.iscnIdPrefix=String(object.iscnIdPrefix):e.iscnIdPrefix="",void 0!==object.iscnVersionAtMint&&null!==object.iscnVersionAtMint?e.iscnVersionAtMint=o.default.fromString(object.iscnVersionAtMint):e.iscnVersionAtMint=o.default.UZERO,void 0!==object.account&&null!==object.account?e.account=String(object.account):e.account="",e},toJSON(e){const t={};return void 0!==e.type&&(t.type=h(e.type)),void 0!==e.iscnIdPrefix&&(t.iscnIdPrefix=e.iscnIdPrefix),void 0!==e.iscnVersionAtMint&&(t.iscnVersionAtMint=(e.iscnVersionAtMint||o.default.UZERO).toString()),void 0!==e.account&&(t.account=e.account),t},fromPartial(object){const e=Object.assign({},m);return void 0!==object.type&&null!==object.type?e.type=object.type:e.type=0,void 0!==object.iscnIdPrefix&&null!==object.iscnIdPrefix?e.iscnIdPrefix=object.iscnIdPrefix:e.iscnIdPrefix="",void 0!==object.iscnVersionAtMint&&null!==object.iscnVersionAtMint?e.iscnVersionAtMint=object.iscnVersionAtMint:e.iscnVersionAtMint=o.default.UZERO,void 0!==object.account&&null!==object.account?e.account=object.account:e.account="",e}};const v={allowedAddresses:"",mintPrice:o.default.UZERO};t.MintPeriod={encode(e,t=c.default.Writer.create()){void 0!==e.startTime&&l.Timestamp.encode(E(e.startTime),t.uint32(10).fork()).ldelim();for(const n of e.allowedAddresses)t.uint32(18).string(n);return e.mintPrice.isZero()||t.uint32(24).uint64(e.mintPrice),t},decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},v);for(r.allowedAddresses=[];t.pos>>3){case 1:r.startTime=B(l.Timestamp.decode(t,t.uint32()));break;case 2:r.allowedAddresses.push(t.string());break;case 3:r.mintPrice=t.uint64();break;default:t.skipType(7&e)}}return r},fromJSON(object){const e=Object.assign({},v);if(e.allowedAddresses=[],void 0!==object.startTime&&null!==object.startTime?e.startTime=k(object.startTime):e.startTime=void 0,void 0!==object.allowedAddresses&&null!==object.allowedAddresses)for(const t of object.allowedAddresses)e.allowedAddresses.push(String(t));return void 0!==object.mintPrice&&null!==object.mintPrice?e.mintPrice=o.default.fromString(object.mintPrice):e.mintPrice=o.default.UZERO,e},toJSON(e){const t={};return void 0!==e.startTime&&(t.startTime=e.startTime.toISOString()),e.allowedAddresses?t.allowedAddresses=e.allowedAddresses.map((e=>e)):t.allowedAddresses=[],void 0!==e.mintPrice&&(t.mintPrice=(e.mintPrice||o.default.UZERO).toString()),t},fromPartial(object){const e=Object.assign({},v);if(e.allowedAddresses=[],void 0!==object.startTime&&null!==object.startTime?e.startTime=object.startTime:e.startTime=void 0,void 0!==object.allowedAddresses&&null!==object.allowedAddresses)for(const t of object.allowedAddresses)e.allowedAddresses.push(t);return void 0!==object.mintPrice&&null!==object.mintPrice?e.mintPrice=object.mintPrice:e.mintPrice=o.default.UZERO,e}};const y={burnable:!1,maxSupply:o.default.UZERO};t.ClassConfig={encode:(e,n=c.default.Writer.create())=>(!0===e.burnable&&n.uint32(8).bool(e.burnable),e.maxSupply.isZero()||n.uint32(16).uint64(e.maxSupply),void 0!==e.blindBoxConfig&&t.BlindBoxConfig.encode(e.blindBoxConfig,n.uint32(26).fork()).ldelim(),n),decode(input,e){const n=input instanceof c.default.Reader?input:new c.default.Reader(input);let r=void 0===e?n.len:n.pos+e;const o=Object.assign({},y);for(;n.pos>>3){case 1:o.burnable=n.bool();break;case 2:o.maxSupply=n.uint64();break;case 3:o.blindBoxConfig=t.BlindBoxConfig.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(object){const e=Object.assign({},y);return void 0!==object.burnable&&null!==object.burnable?e.burnable=Boolean(object.burnable):e.burnable=!1,void 0!==object.maxSupply&&null!==object.maxSupply?e.maxSupply=o.default.fromString(object.maxSupply):e.maxSupply=o.default.UZERO,void 0!==object.blindBoxConfig&&null!==object.blindBoxConfig?e.blindBoxConfig=t.BlindBoxConfig.fromJSON(object.blindBoxConfig):e.blindBoxConfig=void 0,e},toJSON(e){const n={};return void 0!==e.burnable&&(n.burnable=e.burnable),void 0!==e.maxSupply&&(n.maxSupply=(e.maxSupply||o.default.UZERO).toString()),void 0!==e.blindBoxConfig&&(n.blindBoxConfig=e.blindBoxConfig?t.BlindBoxConfig.toJSON(e.blindBoxConfig):void 0),n},fromPartial(object){const e=Object.assign({},y);return void 0!==object.burnable&&null!==object.burnable?e.burnable=object.burnable:e.burnable=!1,void 0!==object.maxSupply&&null!==object.maxSupply?e.maxSupply=object.maxSupply:e.maxSupply=o.default.UZERO,void 0!==object.blindBoxConfig&&null!==object.blindBoxConfig?e.blindBoxConfig=t.BlindBoxConfig.fromPartial(object.blindBoxConfig):e.blindBoxConfig=void 0,e}};const I={};t.BlindBoxConfig={encode(e,n=c.default.Writer.create()){for(const r of e.mintPeriods)t.MintPeriod.encode(r,n.uint32(10).fork()).ldelim();return void 0!==e.revealTime&&l.Timestamp.encode(E(e.revealTime),n.uint32(18).fork()).ldelim(),n},decode(input,e){const n=input instanceof c.default.Reader?input:new c.default.Reader(input);let r=void 0===e?n.len:n.pos+e;const o=Object.assign({},I);for(o.mintPeriods=[];n.pos>>3){case 1:o.mintPeriods.push(t.MintPeriod.decode(n,n.uint32()));break;case 2:o.revealTime=B(l.Timestamp.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return o},fromJSON(object){const e=Object.assign({},I);if(e.mintPeriods=[],void 0!==object.mintPeriods&&null!==object.mintPeriods)for(const n of object.mintPeriods)e.mintPeriods.push(t.MintPeriod.fromJSON(n));return void 0!==object.revealTime&&null!==object.revealTime?e.revealTime=k(object.revealTime):e.revealTime=void 0,e},toJSON(e){const n={};return e.mintPeriods?n.mintPeriods=e.mintPeriods.map((e=>e?t.MintPeriod.toJSON(e):void 0)):n.mintPeriods=[],void 0!==e.revealTime&&(n.revealTime=e.revealTime.toISOString()),n},fromPartial(object){const e=Object.assign({},I);if(e.mintPeriods=[],void 0!==object.mintPeriods&&null!==object.mintPeriods)for(const n of object.mintPeriods)e.mintPeriods.push(t.MintPeriod.fromPartial(n));return void 0!==object.revealTime&&null!==object.revealTime?e.revealTime=object.revealTime:e.revealTime=void 0,e}};const w={contentCount:o.default.UZERO,toBeRevealed:!1};t.BlindBoxState={encode:(e,t=c.default.Writer.create())=>(e.contentCount.isZero()||t.uint32(8).uint64(e.contentCount),!0===e.toBeRevealed&&t.uint32(16).bool(e.toBeRevealed),t),decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},w);for(;t.pos>>3){case 1:r.contentCount=t.uint64();break;case 2:r.toBeRevealed=t.bool();break;default:t.skipType(7&e)}}return r},fromJSON(object){const e=Object.assign({},w);return void 0!==object.contentCount&&null!==object.contentCount?e.contentCount=o.default.fromString(object.contentCount):e.contentCount=o.default.UZERO,void 0!==object.toBeRevealed&&null!==object.toBeRevealed?e.toBeRevealed=Boolean(object.toBeRevealed):e.toBeRevealed=!1,e},toJSON(e){const t={};return void 0!==e.contentCount&&(t.contentCount=(e.contentCount||o.default.UZERO).toString()),void 0!==e.toBeRevealed&&(t.toBeRevealed=e.toBeRevealed),t},fromPartial(object){const e=Object.assign({},w);return void 0!==object.contentCount&&null!==object.contentCount?e.contentCount=object.contentCount:e.contentCount=o.default.UZERO,void 0!==object.toBeRevealed&&null!==object.toBeRevealed?e.toBeRevealed=object.toBeRevealed:e.toBeRevealed=!1,e}};var _=(()=>{if(void 0!==_)return _;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==e)return e;throw"Unable to locate global object"})();const C=_.atob||(e=>_.Buffer.from(e,"base64").toString("binary"));const S=_.btoa||(e=>_.Buffer.from(e,"binary").toString("base64"));function E(e){var t;return{seconds:(t=e.getTime()/1e3,o.default.fromNumber(t)),nanos:e.getTime()%1e3*1e6}}function B(e){let t=1e3*e.seconds.toNumber();return t+=e.nanos/1e6,new Date(t)}function k(e){return e instanceof Date?e:"string"==typeof e?new Date(e):B(l.Timestamp.fromJSON(e))}c.default.util.Long!==o.default&&(c.default.util.Long=o.default,c.default.configure())}).call(this,n(3))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.messageRegistry=t.messageRegistryMap=t.registryTypes=t.LikeNFTRegistryTypes=t.ISCNRegistryTypes=void 0;const r=n(76),o=n(460),c=n(873),l=n(875),d=n(96);t.ISCNRegistryTypes=[["/likechain.iscn.MsgCreateIscnRecord",o.MsgCreateIscnRecord],["/likechain.iscn.MsgUpdateIscnRecord",o.MsgUpdateIscnRecord],["/likechain.iscn.MsgChangeIscnRecordOwnership",o.MsgChangeIscnRecordOwnership]],t.LikeNFTRegistryTypes=[["/cosmos.nft.v1beta1.MsgSend",l.MsgSend],["/likechain.likenft.v1.MsgNewClass",c.MsgNewClass],["/likechain.likenft.v1.MsgUpdateClass",c.MsgUpdateClass],["/likechain.likenft.v1.MsgMintNFT",c.MsgMintNFT],["/likechain.likenft.v1.MsgBurnNFT",c.MsgBurnNFT],["/likechain.likenft.v1.MsgCreateBlindBoxContent",c.MsgCreateBlindBoxContent],["/likechain.likenft.v1.MsgUpdateBlindBoxContent",c.MsgUpdateBlindBoxContent],["/likechain.likenft.v1.MsgDeleteBlindBoxContent",c.MsgDeleteBlindBoxContent]],t.registryTypes=[...d.defaultRegistryTypes,...t.ISCNRegistryTypes,...t.LikeNFTRegistryTypes],t.messageRegistryMap=t.registryTypes.reduce(((e,t)=>{const[n,r]=t;return e[n]=r,e}),{}),t.messageRegistry=new r.Registry(t.registryTypes)},function(e,t,n){"use strict";(function(e){var n=this&&this.__rest||function(s,e){var t={};for(var p in s)Object.prototype.hasOwnProperty.call(s,p)&&e.indexOf(p)<0&&(t[p]=s[p]);if(null!=s&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(p=Object.getOwnPropertySymbols(s);ie.from(JSON.stringify(s),"utf8"))),I=Object.assign({"@context":"http://schema.org/","@type":A,name:o,description:c,version:r,url:d,keywords:l.join(","),usageInfo:m},data);return{recordNotes:v,contentFingerprints:f,stakeholders:y,contentMetadata:e.from(JSON.stringify(I),"utf8")}}Object.defineProperty(t,"__esModule",{value:!0}),t.formatMsgChangeIscnRecordOwnership=t.formatMsgUpdateIscnRecord=t.formatMsgCreateIscnRecord=t.formatISCNPayload=void 0,t.formatISCNPayload=r,t.formatMsgCreateIscnRecord=function(e,t){return{typeUrl:"/likechain.iscn.MsgCreateIscnRecord",value:{from:e,record:r(t)}}},t.formatMsgUpdateIscnRecord=function(e,t,n){return{typeUrl:"/likechain.iscn.MsgUpdateIscnRecord",value:{from:e,iscnId:t,record:r(n)}}},t.formatMsgChangeIscnRecordOwnership=function(e,t,n){return{typeUrl:"/likechain.iscn.MsgChangeIscnRecordOwnership",value:{from:e,iscnId:t,newOwner:n}}}}).call(this,n(14).Buffer)},function(e,t,n){"use strict";n.r(t),n.d(t,"detectEnv",(function(){return l})),n.d(t,"detectOS",(function(){return d})),n.d(t,"isAndroid",(function(){return f})),n.d(t,"isIOS",(function(){return h})),n.d(t,"isMobile",(function(){return A})),n.d(t,"isNode",(function(){return m})),n.d(t,"isBrowser",(function(){return v})),n.d(t,"getFromWindow",(function(){return y})),n.d(t,"getFromWindowOrThrow",(function(){return I})),n.d(t,"getDocumentOrThrow",(function(){return w})),n.d(t,"getDocument",(function(){return _})),n.d(t,"getNavigatorOrThrow",(function(){return C})),n.d(t,"getNavigator",(function(){return S})),n.d(t,"getLocationOrThrow",(function(){return E})),n.d(t,"getLocation",(function(){return B})),n.d(t,"getCryptoOrThrow",(function(){return k})),n.d(t,"getCrypto",(function(){return O})),n.d(t,"getLocalStorageOrThrow",(function(){return R})),n.d(t,"getLocalStorage",(function(){return P})),n.d(t,"getClientMeta",(function(){return x})),n.d(t,"safeJsonParse",(function(){return M})),n.d(t,"safeJsonStringify",(function(){return Q})),n.d(t,"setLocal",(function(){return N})),n.d(t,"getLocal",(function(){return D})),n.d(t,"removeLocal",(function(){return T})),n.d(t,"mobileLinkChoiceKey",(function(){return j})),n.d(t,"formatIOSMobile",(function(){return U})),n.d(t,"saveMobileLinkInfo",(function(){return J})),n.d(t,"getMobileRegistryEntry",(function(){return H})),n.d(t,"getMobileLinkRegistry",(function(){return F})),n.d(t,"getWalletRegistryUrl",(function(){return G})),n.d(t,"getDappRegistryUrl",(function(){return V})),n.d(t,"formatMobileRegistryEntry",(function(){return W})),n.d(t,"formatMobileRegistry",(function(){return Y}));var r=n(469),o=n(39),c=n(470);function l(e){return Object(c.a)(e)}function d(){const e=l();return e&&e.os?e.os:void 0}function f(){const e=d();return!!e&&e.toLowerCase().includes("android")}function h(){const e=d();return!!e&&(e.toLowerCase().includes("ios")||e.toLowerCase().includes("mac")&&navigator.maxTouchPoints>1)}function A(){return!!d()&&(f()||h())}function m(){const e=l();return!(!e||!e.name)&&"node"===e.name.toLowerCase()}function v(){return!m()&&!!S()}const y=o.getFromWindow,I=o.getFromWindowOrThrow,w=o.getDocumentOrThrow,_=o.getDocument,C=o.getNavigatorOrThrow,S=o.getNavigator,E=o.getLocationOrThrow,B=o.getLocation,k=o.getCryptoOrThrow,O=o.getCrypto,R=o.getLocalStorageOrThrow,P=o.getLocalStorage;function x(){return r.getWindowMetadata()}const M=function(e){if("string"!=typeof e)throw new Error("Cannot safe json parse value of type "+typeof e);try{return JSON.parse(e)}catch(t){return e}},Q=function(e){return"string"==typeof e?e:JSON.stringify(e)};function N(e,data){const t=Q(data),n=P();n&&n.setItem(e,t)}function D(e){let data=null,t=null;const n=P();return n&&(t=n.getItem(e)),data=t?M(t):t,data}function T(e){const t=P();t&&t.removeItem(e)}const j="WALLETCONNECT_DEEPLINK_CHOICE";function U(e,t){const n=encodeURIComponent(e);return t.universalLink?`${t.universalLink}/wc?uri=${n}`:t.deepLink?`${t.deepLink}${t.deepLink.endsWith(":")?"//":"/"}wc?uri=${n}`:""}function J(data){const e=data.href.split("?")[0];N(j,Object.assign(Object.assign({},data),{href:e}))}function H(e,t){return e.filter((e=>e.name.toLowerCase().includes(t.toLowerCase())))[0]}function F(e,t){let n=e;return t&&(n=t.map((t=>H(e,t))).filter(Boolean)),n}const L="https://registry.walletconnect.com";function G(){return L+"/api/v2/wallets"}function V(){return L+"/api/v2/dapps"}function W(e,t="mobile"){var n;return{name:e.name||"",shortName:e.metadata.shortName||"",color:e.metadata.colors.primary||"",logo:null!==(n=e.image_url.sm)&&void 0!==n?n:"",universalLink:e[t].universal||"",deepLink:e[t].native||""}}function Y(e,t="mobile"){return Object.values(e).filter((e=>!!e[t].universal||!!e[t].native)).map((e=>W(e,t)))}},function(e,t,n){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(560)},function(e,t){e.exports=o,o.strict=c,o.loose=l;var n=Object.prototype.toString,r={"[object Int8Array]":!0,"[object Int16Array]":!0,"[object Int32Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Uint16Array]":!0,"[object Uint32Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0};function o(e){return c(e)||l(e)}function c(e){return e instanceof Int8Array||e instanceof Int16Array||e instanceof Int32Array||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Uint16Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array}function l(e){return r[n.call(e)]}},function(e,t,n){"use strict";t.a={}},function(e,t,n){"use strict";var r={name:"ClientOnly",functional:!0,props:{placeholder:String,placeholderTag:{type:String,default:"div"}},render:function(e,t){var n=t.parent,r=t.slots,o=t.props,c=r(),l=c.default;void 0===l&&(l=[]);var d=c.placeholder;return n._isMounted?l:(n.$once("hook:mounted",(function(){n.$forceUpdate()})),o.placeholderTag&&(o.placeholder||d)?e(o.placeholderTag,{class:["client-only-placeholder"]},o.placeholder||d):l.length>0?l.map((function(){return e(!1)})):e(!1))}};e.exports=r},,function(e,t,n){"use strict";const r=n(567),o=n(568),c=n(569);function l(e){if("string"!=typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function d(e,t){return t.encode?t.strict?r(e):encodeURIComponent(e):e}function f(e,t){return t.decode?o(e):e}function h(input){return Array.isArray(input)?input.sort():"object"==typeof input?h(Object.keys(input)).sort(((a,b)=>Number(a)-Number(b))).map((e=>input[e])):input}function A(input){const e=input.indexOf("#");return-1!==e&&(input=input.slice(0,e)),input}function m(input){const e=(input=A(input)).indexOf("?");return-1===e?"":input.slice(e+1)}function v(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"==typeof e&&""!==e.trim()?e=Number(e):!t.parseBooleans||null===e||"true"!==e.toLowerCase()&&"false"!==e.toLowerCase()||(e="true"===e.toLowerCase()),e}function y(input,e){l((e=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},e)).arrayFormatSeparator);const t=function(e){let t;switch(e.arrayFormat){case"index":return(e,n,r)=>{t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===r[e]&&(r[e]={}),r[e][t[1]]=n):r[e]=n};case"bracket":return(e,n,r)=>{t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==r[e]?r[e]=[].concat(r[e],n):r[e]=[n]:r[e]=n};case"comma":case"separator":return(t,n,r)=>{const o="string"==typeof n&&n.split("").indexOf(e.arrayFormatSeparator)>-1?n.split(e.arrayFormatSeparator).map((t=>f(t,e))):null===n?n:f(n,e);r[t]=o};default:return(e,t,n)=>{void 0!==n[e]?n[e]=[].concat(n[e],t):n[e]=t}}}(e),n=Object.create(null);if("string"!=typeof input)return n;if(!(input=input.trim().replace(/^[?#&]/,"")))return n;for(const param of input.split("&")){let[r,o]=c(e.decode?param.replace(/\+/g," "):param,"=");o=void 0===o?null:["comma","separator"].includes(e.arrayFormat)?o:f(o,e),t(f(r,e),o,n)}for(const t of Object.keys(n)){const r=n[t];if("object"==typeof r&&null!==r)for(const t of Object.keys(r))r[t]=v(r[t],e);else n[t]=v(r,e)}return!1===e.sort?n:(!0===e.sort?Object.keys(n).sort():Object.keys(n).sort(e.sort)).reduce(((e,t)=>{const r=n[t];return Boolean(r)&&"object"==typeof r&&!Array.isArray(r)?e[t]=h(r):e[t]=r,e}),Object.create(null))}t.extract=m,t.parse=y,t.stringify=(object,e)=>{if(!object)return"";l((e=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},e)).arrayFormatSeparator);const t=t=>e.skipNull&&null==object[t]||e.skipEmptyString&&""===object[t],n=function(e){switch(e.arrayFormat){case"index":return t=>(n,r)=>{const o=n.length;return void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[d(t,e),"[",o,"]"].join("")]:[...n,[d(t,e),"[",d(o,e),"]=",d(r,e)].join("")]};case"bracket":return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[d(t,e),"[]"].join("")]:[...n,[d(t,e),"[]=",d(r,e)].join("")];case"comma":case"separator":return t=>(n,r)=>null==r||0===r.length?n:0===n.length?[[d(t,e),"=",d(r,e)].join("")]:[[n,d(r,e)].join(e.arrayFormatSeparator)];default:return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,d(t,e)]:[...n,[d(t,e),"=",d(r,e)].join("")]}}(e),r={};for(const e of Object.keys(object))t(e)||(r[e]=object[e]);const o=Object.keys(r);return!1!==e.sort&&o.sort(e.sort),o.map((t=>{const r=object[t];return void 0===r?"":null===r?d(t,e):Array.isArray(r)?r.reduce(n(t),[]).join("&"):d(t,e)+"="+d(r,e)})).filter((e=>e.length>0)).join("&")},t.parseUrl=(input,e)=>{e=Object.assign({decode:!0},e);const[t,n]=c(input,"#");return Object.assign({url:t.split("?")[0]||"",query:y(m(input),e)},e&&e.parseFragmentIdentifier&&n?{fragmentIdentifier:f(n,e)}:{})},t.stringifyUrl=(input,e)=>{e=Object.assign({encode:!0,strict:!0},e);const n=A(input.url).split("?")[0]||"",r=t.extract(input.url),o=t.parse(r,{sort:!1}),c=Object.assign(o,input.query);let l=t.stringify(c,e);l&&(l=`?${l}`);let f=function(e){let t="";const n=e.indexOf("#");return-1!==n&&(t=e.slice(n)),t}(input.url);return input.fragmentIdentifier&&(f=`#${d(input.fragmentIdentifier,e)}`),`${n}${l}${f}`}},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),c=this&&this.__exportStar||function(e,t){for(var p in e)"default"===p||Object.prototype.hasOwnProperty.call(t,p)||r(t,e,p)},l=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.messages=t.queryExtensions=void 0,c(n(343),t),c(n(876),t),t.queryExtensions=l(n(879)),t.messages=l(n(880)),c(n(881),t)},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){var content=n(543);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[e.i,content,""]]),content.locals&&(e.exports=content.locals);(0,n(101).default)("1a25bb1a",content,!0,{sourceMap:!1})},function(e,t,n){var content=n(545);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[e.i,content,""]]),content.locals&&(e.exports=content.locals);(0,n(101).default)("1a73ea6b",content,!0,{sourceMap:!1})},,,function(e,t,n){"use strict";t.byteLength=function(e){var t=d(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,i,n=d(e),r=n[0],l=n[1],f=new c(function(e,t,n){return 3*(t+n)/4-n}(0,r,l)),h=0,A=l>0?r-4:r;for(i=0;i>16&255,f[h++]=t>>8&255,f[h++]=255&t;2===l&&(t=o[e.charCodeAt(i)]<<2|o[e.charCodeAt(i+1)]>>4,f[h++]=255&t);1===l&&(t=o[e.charCodeAt(i)]<<10|o[e.charCodeAt(i+1)]<<4|o[e.charCodeAt(i+2)]>>2,f[h++]=t>>8&255,f[h++]=255&t);return f},t.fromByteArray=function(e){for(var t,n=e.length,o=n%3,c=[],l=16383,i=0,d=n-o;id?d:i+l));1===o?(t=e[n-1],c.push(r[t>>2]+r[t<<4&63]+"==")):2===o&&(t=(e[n-2]<<8)+e[n-1],c.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return c.join("")};for(var r=[],o=[],c="undefined"!=typeof Uint8Array?Uint8Array:Array,code="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,l=code.length;i0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function f(e,t,n){for(var o,c,output=[],i=t;i>18&63]+r[c>>12&63]+r[c>>6&63]+r[63&c]);return output.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){"use strict";var r=n(31);n.o(r,"payloadId")&&n.d(t,"payloadId",(function(){return r.payloadId}));r.isNode},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));n(97),n(29);function r(){return Date.now()*Math.pow(10,3)+Math.floor(Math.random()*Math.pow(10,3))}},function(e,t,n){"use strict"},function(e,t,n){"use strict";n(321)},function(e,t,n){"use strict";n(322),n(144),n(323),n(324)},function(e,t){},function(e,t,n){"use strict";var r=n(144);r.a;r.a},function(e,t){},function(e,t,n){"use strict"},function(e,t,n){"use strict"},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(31);function o(e){return r.getBrowerCrypto().getRandomValues(new Uint8Array(e))}},function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return c}));var r=n(54);function o(e,t,data){return Object(r.b)(e,t,data)}function c(e,t,data){return Object(r.a)(e,t,data)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(54);n(145);async function o(e,t){return await Object(r.c)(e,t)}},function(e,t,n){"use strict";var r=n(31);n.o(r,"isConstantTime")&&n.d(t,"isConstantTime",(function(){return r.isConstantTime}))},function(e,t,n){"use strict"},function(e,t){},function(e,t,n){"use strict";function r(e,t){if(e.length!==t.length)return!1;let n=0;for(let i=0;i=1&&e<=40}},function(e,t){var n="[0-9]+",r="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+",o="(?:(?![A-Z0-9 $%*+\\-./:]|"+(r=r.replace(/u/g,"\\u"))+")(?:.|[\r\n]))+";t.KANJI=new RegExp(r,"g"),t.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),t.BYTE=new RegExp(o,"g"),t.NUMERIC=new RegExp(n,"g"),t.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");var c=new RegExp("^"+r+"$"),l=new RegExp("^[0-9]+$"),d=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");t.testKanji=function(e){return c.test(e)},t.testNumeric=function(e){return l.test(e)},t.testAlphanumeric=function(e){return d.test(e)}},function(e,t){function n(e){if("number"==typeof e&&(e=e.toString()),"string"!=typeof e)throw new Error("Color should be defined as hex string");var t=e.slice().replace("#","").split("");if(t.length<3||5===t.length||t.length>8)throw new Error("Invalid hex color: "+e);3!==t.length&&4!==t.length||(t=Array.prototype.concat.apply([],t.map((function(e){return[e,e]})))),6===t.length&&t.push("F","F");var n=parseInt(t.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:255&n,hex:"#"+t.slice(0,6).join("")}}t.getOptions=function(e){e||(e={}),e.color||(e.color={});var t=void 0===e.margin||null===e.margin||e.margin<0?4:e.margin,r=e.width&&e.width>=21?e.width:void 0,o=e.scale||4;return{width:r,scale:r?4:o,margin:t,color:{dark:n(e.color.dark||"#000000ff"),light:n(e.color.light||"#ffffffff")},type:e.type,rendererOpts:e.rendererOpts||{}}},t.getScale=function(e,t){return t.width&&t.width>=e+2*t.margin?t.width/(e+2*t.margin):t.scale},t.getImageWidth=function(e,n){var r=t.getScale(e,n);return Math.floor((e+2*n.margin)*r)},t.qrToImageData=function(e,n,r){for(var o=n.modules.size,data=n.modules.data,c=t.getScale(o,r),l=Math.floor((o+2*r.margin)*c),d=r.margin*c,f=[r.color.light,r.color.dark],i=0;i=d&&h>=d&&i>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[n++]=127&e.lo|128,e.lo=e.lo>>>7;t[n++]=e.lo}function _(e,t,n){t[n]=255&e,t[n+1]=e>>>8&255,t[n+2]=e>>>16&255,t[n+3]=e>>>24}m.create=v(),m.alloc=function(e){return new o.Array(e)},o.Array!==Array&&(m.alloc=o.pool(m.alloc,o.Array.prototype.subarray)),m.prototype._push=function(e,t,n){return this.tail=this.tail.next=new f(e,t,n),this.len+=t,this},I.prototype=Object.create(f.prototype),I.prototype.fn=function(e,t,n){for(;e>127;)t[n++]=127&e|128,e>>>=7;t[n]=e},m.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new I((e>>>=0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this},m.prototype.int32=function(e){return e<0?this._push(w,10,c.fromNumber(e)):this.uint32(e)},m.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},m.prototype.uint64=function(e){var t=c.from(e);return this._push(w,t.length(),t)},m.prototype.int64=m.prototype.uint64,m.prototype.sint64=function(e){var t=c.from(e).zzEncode();return this._push(w,t.length(),t)},m.prototype.bool=function(e){return this._push(y,1,e?1:0)},m.prototype.fixed32=function(e){return this._push(_,4,e>>>0)},m.prototype.sfixed32=m.prototype.fixed32,m.prototype.fixed64=function(e){var t=c.from(e);return this._push(_,4,t.lo)._push(_,4,t.hi)},m.prototype.sfixed64=m.prototype.fixed64,m.prototype.float=function(e){return this._push(o.float.writeFloatLE,4,e)},m.prototype.double=function(e){return this._push(o.float.writeDoubleLE,8,e)};var C=o.Array.prototype.set?function(e,t,n){t.set(e,n)}:function(e,t,n){for(var i=0;i>>0;if(!t)return this._push(y,1,0);if(o.isString(e)){var n=m.alloc(t=l.length(e));l.decode(e,n,0),e=n}return this.uint32(t)._push(C,t,e)},m.prototype.string=function(e){var t=d.length(e);return t?this.uint32(t)._push(d.write,t,e):this._push(y,1,0)},m.prototype.fork=function(){return this.states=new A(this),this.head=this.tail=new f(h,0,0),this.len=0,this},m.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 f(h,0,0),this.len=0),this},m.prototype.ldelim=function(){var head=this.head,e=this.tail,t=this.len;return this.reset().uint32(t),t&&(this.tail.next=head.next,this.tail=e,this.len+=t),this},m.prototype.finish=function(){for(var head=this.head.next,e=this.constructor.alloc(this.len),t=0;head;)head.fn(head.val,e,t),t+=head.len,head=head.next;return e},m._configure=function(e){r=e,m.create=v(),r._configure()}},function(e,t,n){"use strict";e.exports=f;var r,o=n(90),c=o.LongBits,l=o.utf8;function d(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function f(e){this.buf=e,this.pos=0,this.len=e.length}var h,A="undefined"!=typeof Uint8Array?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new f(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new f(e);throw Error("illegal buffer")},m=function(){return o.Buffer?function(e){return(f.create=function(e){return o.Buffer.isBuffer(e)?new r(e):A(e)})(e)}:A};function v(){var e=new c(0,0),i=0;if(!(this.len-this.pos>4)){for(;i<3;++i){if(this.pos>=this.len)throw d(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*i)>>>0,this.buf[this.pos++]<128)return e}return e.lo=(e.lo|(127&this.buf[this.pos++])<<7*i)>>>0,e}for(;i<4;++i)if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*i)>>>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;if(i=0,this.len-this.pos>4){for(;i<5;++i)if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*i+3)>>>0,this.buf[this.pos++]<128)return e}else for(;i<5;++i){if(this.pos>=this.len)throw d(this);if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*i+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}function y(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function I(){if(this.pos+8>this.len)throw d(this,8);return new c(y(this.buf,this.pos+=4),y(this.buf,this.pos+=4))}f.create=m(),f.prototype._slice=o.Array.prototype.subarray||o.Array.prototype.slice,f.prototype.uint32=(h=4294967295,function(){if(h=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return h;if(h=(h|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return h;if(h=(h|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return h;if(h=(h|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return h;if(h=(h|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return h;if((this.pos+=5)>this.len)throw this.pos=this.len,d(this,10);return h}),f.prototype.int32=function(){return 0|this.uint32()},f.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)|0},f.prototype.bool=function(){return 0!==this.uint32()},f.prototype.fixed32=function(){if(this.pos+4>this.len)throw d(this,4);return y(this.buf,this.pos+=4)},f.prototype.sfixed32=function(){if(this.pos+4>this.len)throw d(this,4);return 0|y(this.buf,this.pos+=4)},f.prototype.float=function(){if(this.pos+4>this.len)throw d(this,4);var e=o.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e},f.prototype.double=function(){if(this.pos+8>this.len)throw d(this,4);var e=o.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e},f.prototype.bytes=function(){var e=this.uint32(),t=this.pos,n=this.pos+e;if(n>this.len)throw d(this,e);return this.pos+=e,Array.isArray(this.buf)?this.buf.slice(t,n):t===n?new this.buf.constructor(0):this._slice.call(this.buf,t,n)},f.prototype.string=function(){var e=this.bytes();return l.read(e,0,e.length)},f.prototype.skip=function(e){if("number"==typeof e){if(this.pos+e>this.len)throw d(this,e);this.pos+=e}else do{if(this.pos>=this.len)throw d(this)}while(128&this.buf[this.pos++]);return this},f.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},f._configure=function(e){r=e,f.create=m(),r._configure();var t=o.Long?"toLong":"toNumber";o.merge(f.prototype,{int64:function(){return v.call(this)[t](!1)},uint64:function(){return v.call(this)[t](!0)},sint64:function(){return v.call(this).zzDecode()[t](!1)},fixed64:function(){return I.call(this)[t](!0)},sfixed64:function(){return I.call(this)[t](!1)}})}},function(e,t,n){"use strict";(function(e){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),c=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t},l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Any=t.protobufPackage=void 0;const d=l(n(1)),f=c(n(2));function h(){return{typeUrl:"",value:new Uint8Array}}t.protobufPackage="google.protobuf",t.Any={encode:(e,t=f.Writer.create())=>(""!==e.typeUrl&&t.uint32(10).string(e.typeUrl),0!==e.value.length&&t.uint32(18).bytes(e.value),t),decode(input,e){const t=input instanceof f.Reader?input:new f.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=h();for(;t.pos>>3){case 1:r.typeUrl=t.string();break;case 2:r.value=t.bytes();break;default:t.skipType(7&e)}}return r},fromJSON:object=>({typeUrl:I(object.typeUrl)?String(object.typeUrl):"",value:I(object.value)?v(object.value):new Uint8Array}),toJSON(e){const t={};return void 0!==e.typeUrl&&(t.typeUrl=e.typeUrl),void 0!==e.value&&(t.value=function(e){const t=[];return e.forEach((e=>{t.push(String.fromCharCode(e))})),y(t.join(""))}(void 0!==e.value?e.value:new Uint8Array)),t},fromPartial(object){var e,t;const n=h();return n.typeUrl=null!==(e=object.typeUrl)&&void 0!==e?e:"",n.value=null!==(t=object.value)&&void 0!==t?t:new Uint8Array,n}};var A=(()=>{if(void 0!==A)return A;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==e)return e;throw"Unable to locate global object"})();const m=A.atob||(e=>A.Buffer.from(e,"base64").toString("binary"));function v(e){const t=m(e),n=new Uint8Array(t.length);for(let i=0;iA.Buffer.from(e,"binary").toString("base64"));function I(e){return null!=e}f.util.Long!==d.default&&(f.util.Long=d.default,f.configure())}).call(this,n(3))},function(e,t,n){"use strict";(function(e){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),c=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t},l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.CompactBitArray=t.MultiSignature=t.protobufPackage=void 0;const d=l(n(1)),f=c(n(2));function h(){return{extraBitsStored:0,elems:new Uint8Array}}t.protobufPackage="cosmos.crypto.multisig.v1beta1",t.MultiSignature={encode(e,t=f.Writer.create()){for(const n of e.signatures)t.uint32(10).bytes(n);return t},decode(input,e){const t=input instanceof f.Reader?input:new f.Reader(input);let n=void 0===e?t.len:t.pos+e;const r={signatures:[]};for(;t.pos>>3==1)r.signatures.push(t.bytes());else t.skipType(7&e)}return r},fromJSON:object=>({signatures:Array.isArray(null==object?void 0:object.signatures)?object.signatures.map((e=>v(e))):[]}),toJSON(e){const t={};return e.signatures?t.signatures=e.signatures.map((e=>I(void 0!==e?e:new Uint8Array))):t.signatures=[],t},fromPartial(object){var e;const t={signatures:[]};return t.signatures=(null===(e=object.signatures)||void 0===e?void 0:e.map((e=>e)))||[],t}},t.CompactBitArray={encode:(e,t=f.Writer.create())=>(0!==e.extraBitsStored&&t.uint32(8).uint32(e.extraBitsStored),0!==e.elems.length&&t.uint32(18).bytes(e.elems),t),decode(input,e){const t=input instanceof f.Reader?input:new f.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=h();for(;t.pos>>3){case 1:r.extraBitsStored=t.uint32();break;case 2:r.elems=t.bytes();break;default:t.skipType(7&e)}}return r},fromJSON:object=>({extraBitsStored:w(object.extraBitsStored)?Number(object.extraBitsStored):0,elems:w(object.elems)?v(object.elems):new Uint8Array}),toJSON(e){const t={};return void 0!==e.extraBitsStored&&(t.extraBitsStored=Math.round(e.extraBitsStored)),void 0!==e.elems&&(t.elems=I(void 0!==e.elems?e.elems:new Uint8Array)),t},fromPartial(object){var e,t;const n=h();return n.extraBitsStored=null!==(e=object.extraBitsStored)&&void 0!==e?e:0,n.elems=null!==(t=object.elems)&&void 0!==t?t:new Uint8Array,n}};var A=(()=>{if(void 0!==A)return A;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==e)return e;throw"Unable to locate global object"})();const m=A.atob||(e=>A.Buffer.from(e,"base64").toString("binary"));function v(e){const t=m(e),n=new Uint8Array(t.length);for(let i=0;iA.Buffer.from(e,"binary").toString("base64"));function I(e){const t=[];return e.forEach((e=>{t.push(String.fromCharCode(e))})),y(t.join(""))}function w(e){return null!=e}f.util.Long!==d.default&&(f.util.Long=d.default,f.configure())}).call(this,n(3))},function(e,t,n){"use strict";var r=this&&this.__rest||function(s,e){var t={};for(var p in s)Object.prototype.hasOwnProperty.call(s,p)&&e.indexOf(p)<0&&(t[p]=s[p]);if(null!=s&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(p=Object.getOwnPropertySymbols(s);i{if(!n||!n.typeUrl.includes("/likechain.iscn"))return;const o=e.logs[r].events.find((e=>"iscn_record"===e.type));if(!o)return;const{attributes:c}=o,l=c.find((a=>"ipld"===a.key)),d=l&&l.value,f=c.find((a=>"iscn_id"===a.key)),h=f&&f.value;d&&h&&t.push(h)})),t}return[]}async queryRecordsById(e,t,n){const r=await this.getQueryClient(),o=await r.iscn.recordsById(e,t,n);if(o&&o.records){const e=(0,v.parseISCNTxRecordFromQuery)(o.records);return Object.assign(Object.assign({},o),{records:e})}return null}async queryRecordsByFingerprint(e,t){const n=await this.getQueryClient(),r=await n.iscn.recordsByFingerprint(e,t);if(r&&r.records){const e=(0,v.parseISCNTxRecordFromQuery)(r.records);return Object.assign(Object.assign({},r),{records:e})}return null}async queryRecordsByOwner(e,t){const n=await this.getQueryClient(),r=await n.iscn.recordsByOwner(e,t);if(r&&r.records){const e=(0,v.parseISCNTxRecordFromQuery)(r.records);return Object.assign(Object.assign({},r),{records:e})}return null}async queryFeePerByte(){if(this.feePerByte)return this.feePerByte;const e=await this.getQueryClient(),t=await e.iscn.params();if(t&&t.params&&t.params.feePerByte){const{denom:e,amount:n}=t.params.feePerByte;return this.feePerByte={denom:e,amount:new c.default(n).shiftedBy(-18).toFixed()},this.feePerByte}return null}async queryNFTClass(e){const t=await this.getQueryClient(),{class:n}=await t.nft.class(e);return n?{class:(0,v.parseNFTClassDataFields)(n)}:null}async queryNFTClasses(e){const t=await this.getQueryClient(),n=await t.nft.classes(e),{classes:o}=n,c=r(n,["classes"]);return Object.assign({classes:o.map((e=>(0,v.parseNFTClassDataFields)(e)))},c)}async queryNFT(e,t){const n=await this.getQueryClient(),{nft:r}=await n.nft.NFT(e,t);return r?{nft:(0,v.parseNFTDataFields)(r)}:null}async queryNFTByClassAndOwner(e,t,n){const o=await this.getQueryClient(),c=await o.nft.NFTs(e,t,n),{nfts:l}=c,d=r(c,["nfts"]);return Object.assign({nfts:l.map((e=>(0,v.parseNFTDataFields)(e)))},d)}async queryNFTClassIdByTx(e){const t=await this.getStargateClient(),n=await t.getTx(e);if(n){const e=(0,v.parseTxInfoFromIndexedTx)(n);if(!e.logs.length)return"";const t=e.logs[0].events.find((e=>"likechain.likenft.v1.EventNewClass"===e.type));if(!t)return"";const r=t.attributes.find((a=>"class_id"===a.key));return((null==r?void 0:r.value)||"").replace(/^"(.*)"$/,"$1")}return""}}t.ISCNQueryClient=I,t.default=I},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.add=t.toBig=t.split=t.fromBig=void 0;const r=BigInt(2**32-1),o=BigInt(32);function c(e,t=!1){return t?{h:Number(e&r),l:Number(e>>o&r)}:{h:0|Number(e>>o&r),l:0|Number(e&r)}}function l(e,t=!1){let n=new Uint32Array(e.length),r=new Uint32Array(e.length);for(let i=0;iBigInt(e>>>0)<>>0);function d(e,t,n,r){const o=(t>>>0)+(r>>>0);return{h:e+n+(o/2**32|0)|0,l:0|o}}t.add=d;const f={fromBig:c,split:l,toBig:t.toBig,shrSH:(e,t,s)=>e>>>s,shrSL:(e,t,s)=>e<<32-s|t>>>s,rotrSH:(e,t,s)=>e>>>s|t<<32-s,rotrSL:(e,t,s)=>e<<32-s|t>>>s,rotrBH:(e,t,s)=>e<<64-s|t>>>s-32,rotrBL:(e,t,s)=>e>>>s-32|t<<64-s,rotr32H:(e,t)=>t,rotr32L:(e,t)=>e,rotlSH:(e,t,s)=>e<>>32-s,rotlSL:(e,t,s)=>t<>>32-s,rotlBH:(e,t,s)=>t<>>64-s,rotlBL:(e,t,s)=>e<>>64-s,add:d,add3L:(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0),add3H:(e,t,n,r)=>t+n+r+(e/2**32|0)|0,add4L:(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0),add4H:(e,t,n,r,o)=>t+n+r+o+(e/2**32|0)|0,add5H:(e,t,n,r,o,c)=>t+n+r+o+c+(e/2**32|0)|0,add5L:(e,t,n,r,o)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(o>>>0)};t.default=f},function(e,t,n){"use strict";var r=n(9).Buffer,o=n(629).Transform;function c(e){o.call(this),this._block=r.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}n(8)(c,o),c.prototype._transform=function(e,t,n){var r=null;try{this.update(e,t)}catch(e){r=e}n(r)},c.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(e){t=e}e(t)},c.prototype.update=function(data,e){if(function(e,t){if(!r.isBuffer(e)&&"string"!=typeof e)throw new TypeError(t+" must be a string or a buffer")}(data,"Data"),this._finalized)throw new Error("Digest already called");r.isBuffer(data)||(data=r.from(data,e));for(var t=this._block,n=0;this._blockOffset+data.length-n>=this._blockSize;){for(var i=this._blockOffset;i0;++o)this._length[o]+=c,(c=this._length[o]/4294967296|0)>0&&(this._length[o]-=4294967296*c);return this},c.prototype._update=function(){throw new Error("_update is not implemented")},c.prototype.digest=function(e){if(this._finalized)throw new 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 i=0;i<4;++i)this._length[i]=0;return t},c.prototype._digest=function(){throw new Error("_digest is not implemented")},e.exports=c},function(e,t,n){"use strict";(function(t,r){var o;e.exports=x,x.ReadableState=P;n(92).EventEmitter;var c=function(e,t){return e.listeners(t).length},l=n(347),d=n(14).Buffer,f=t.Uint8Array||function(){};var h,A=n(630);h=A&&A.debuglog?A.debuglog("stream"):function(){};var m,v,y,I=n(631),w=n(348),_=n(349).getHighWaterMark,C=n(116).codes,S=C.ERR_INVALID_ARG_TYPE,E=C.ERR_STREAM_PUSH_AFTER_EOF,B=C.ERR_METHOD_NOT_IMPLEMENTED,k=C.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;n(8)(x,l);var O=w.errorOrDestroy,R=["error","close","destroy","pause","resume"];function P(e,t,r){o=o||n(117),e=e||{},"boolean"!=typeof r&&(r=t instanceof o),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=_(this,e,"readableHighWaterMark",r),this.buffer=new I,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(m||(m=n(93).StringDecoder),this.decoder=new m(e.encoding),this.encoding=e.encoding)}function x(e){if(o=o||n(117),!(this instanceof x))return new x(e);var t=this instanceof o;this._readableState=new P(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),l.call(this)}function M(e,t,n,r,o){h("readableAddChunk",t);var c,l=e._readableState;if(null===t)l.reading=!1,function(e,t){if(h("onEofChunk"),t.ended)return;if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,t.sync?T(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,j(e)))}(e,l);else if(o||(c=function(e,t){var n;r=t,d.isBuffer(r)||r instanceof f||"string"==typeof t||void 0===t||e.objectMode||(n=new S("chunk",["string","Buffer","Uint8Array"],t));var r;return n}(l,t)),c)O(e,c);else if(l.objectMode||t&&t.length>0)if("string"==typeof t||l.objectMode||Object.getPrototypeOf(t)===d.prototype||(t=function(e){return d.from(e)}(t)),r)l.endEmitted?O(e,new k):Q(e,l,t,!0);else if(l.ended)O(e,new E);else{if(l.destroyed)return!1;l.reading=!1,l.decoder&&!n?(t=l.decoder.write(t),l.objectMode||0!==t.length?Q(e,l,t,!1):U(e,l)):Q(e,l,t,!1)}else r||(l.reading=!1,U(e,l));return!l.ended&&(l.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=N?e=N:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function T(e){var t=e._readableState;h("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(h("emitReadable",t.flowing),t.emittedReadable=!0,r.nextTick(j,e))}function j(e){var t=e._readableState;h("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,G(e)}function U(e,t){t.readingMore||(t.readingMore=!0,r.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 F(e){h("readable nexttick read 0"),e.read(0)}function L(e,t){h("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),G(e),t.flowing&&!t.reading&&e.read(0)}function G(e){var t=e._readableState;for(h("flow",t.flowing);t.flowing&&null!==e.read(););}function V(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):n=t.buffer.consume(e,t.decoder),n);var n}function W(e){var t=e._readableState;h("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,r.nextTick(Y,t,e))}function Y(e,t){if(h("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var n=t._writableState;(!n||n.autoDestroy&&n.finished)&&t.destroy()}}function K(e,t){for(var i=0,n=e.length;i=t.highWaterMark:t.length>0)||t.ended))return h("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?W(this):T(this),null;if(0===(e=D(e,t))&&t.ended)return 0===t.length&&W(this),null;var r,o=t.needReadable;return h("need readable",o),(0===t.length||t.length-e0?V(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&W(this)),null!==r&&this.emit("data",r),r},x.prototype._read=function(e){O(this,new B("_read()"))},x.prototype.pipe=function(e,t){var n=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e)}o.pipesCount+=1,h("pipe count=%d opts=%j",o.pipesCount,t);var l=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr?f:_;function d(t,r){h("onunpipe"),t===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,h("cleanup"),e.removeListener("close",I),e.removeListener("finish",w),e.removeListener("drain",A),e.removeListener("error",y),e.removeListener("unpipe",d),n.removeListener("end",f),n.removeListener("end",_),n.removeListener("data",v),m=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||A())}function f(){h("onend"),e.end()}o.endEmitted?r.nextTick(l):n.once("end",l),e.on("unpipe",d);var A=function(e){return function(){var t=e._readableState;h("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&c(e,"data")&&(t.flowing=!0,G(e))}}(n);e.on("drain",A);var m=!1;function v(t){h("ondata");var r=e.write(t);h("dest.write",r),!1===r&&((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==K(o.pipes,e))&&!m&&(h("false write response, pause",o.awaitDrain),o.awaitDrain++),n.pause())}function y(t){h("onerror",t),_(),e.removeListener("error",y),0===c(e,"error")&&O(e,t)}function I(){e.removeListener("finish",w),_()}function w(){h("onfinish"),e.removeListener("close",I),_()}function _(){h("unpipe"),n.unpipe(e)}return n.on("data",v),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",y),e.once("close",I),e.once("finish",w),e.emit("pipe",n),o.flowing||(h("pipe resume"),n.resume()),e},x.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var r=t.pipes,o=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i0,!1!==o.flowing&&this.resume()):"readable"===e&&(o.endEmitted||o.readableListening||(o.readableListening=o.needReadable=!0,o.flowing=!1,o.emittedReadable=!1,h("on readable",o.length,o.reading),o.length?T(this):o.reading||r.nextTick(F,this))),n},x.prototype.addListener=x.prototype.on,x.prototype.removeListener=function(e,t){var n=l.prototype.removeListener.call(this,e,t);return"readable"===e&&r.nextTick(H,this),n},x.prototype.removeAllListeners=function(e){var t=l.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||r.nextTick(H,this),t},x.prototype.resume=function(){var e=this._readableState;return e.flowing||(h("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,r.nextTick(L,e,t))}(this,e)),e.paused=!1,this},x.prototype.pause=function(){return h("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(h("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},x.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var i in e.on("end",(function(){if(h("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(o){(h("wrapped data"),n.decoder&&(o=n.decoder.write(o)),n.objectMode&&null==o)||(n.objectMode||o&&o.length)&&(t.push(o)||(r=!0,e.pause()))})),e)void 0===this[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 k(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(x.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(x.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),x.prototype._write=function(e,t,n){n(new w("_write()"))},x.prototype._writev=null,x.prototype.end=function(e,t,n){var o=this._writableState;return"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),o.corked&&(o.corked=1,this.uncork()),o.ending||function(e,t,n){t.ending=!0,j(e,t),n&&(t.finished?r.nextTick(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,o,n),this},Object.defineProperty(x.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(x.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),x.prototype.destroy=m.destroy,x.prototype._undestroy=m.undestroy,x.prototype._destroy=function(e,t){t(e)}}).call(this,n(3),n(19))},function(e,t,n){"use strict";e.exports=A;var r=n(116).codes,o=r.ERR_METHOD_NOT_IMPLEMENTED,c=r.ERR_MULTIPLE_CALLBACK,l=r.ERR_TRANSFORM_ALREADY_TRANSFORMING,d=r.ERR_TRANSFORM_WITH_LENGTH_0,f=n(117);function h(e,data){var t=this._transformState;t.transforming=!1;var n=t.writecb;if(null===n)return this.emit("error",new c);t.writechunk=null,t.writecb=null,null!=data&&this.push(data),n(e);var r=this._readableState;r.reading=!1,(r.needReadable||r.length>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function v(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function y(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}r(f,o),f.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},f.prototype._update=function(e){for(var t,n=this._w,a=0|this._a,b=0|this._b,r=0|this._c,o=0|this._d,c=0|this._e,d=0|this._f,g=0|this._g,f=0|this._h,i=0;i<16;++i)n[i]=e.readInt32BE(4*i);for(;i<64;++i)n[i]=0|(((t=n[i-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+n[i-7]+y(n[i-15])+n[i-16];for(var I=0;I<64;++I){var w=f+v(c)+h(c,d,g)+l[I]+n[I]|0,_=m(a)+A(a,b,r)|0;f=g,g=d,d=c,c=o+w|0,o=r,r=b,b=a,a=w+_|0}this._a=a+this._a|0,this._b=b+this._b|0,this._c=r+this._c|0,this._d=o+this._d|0,this._e=c+this._e|0,this._f=d+this._f|0,this._g=g+this._g|0,this._h=f+this._h|0},f.prototype._hash=function(){var e=c.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=f},function(e,t,n){var r=n(8),o=n(118),c=n(9).Buffer,l=[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],d=new Array(160);function f(){this.init(),this._w=d,o.call(this,128,112)}function h(e,t,n){return n^e&(t^n)}function A(e,t,n){return e&t|n&(e|t)}function m(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function v(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function y(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function I(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function w(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function _(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function C(a,b){return a>>>0>>0?1:0}r(f,o),f.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},f.prototype._update=function(e){for(var t=this._w,n=0|this._ah,r=0|this._bh,o=0|this._ch,c=0|this._dh,d=0|this._eh,f=0|this._fh,S=0|this._gh,E=0|this._hh,B=0|this._al,k=0|this._bl,O=0|this._cl,dl=0|this._dl,R=0|this._el,P=0|this._fl,x=0|this._gl,M=0|this._hl,i=0;i<32;i+=2)t[i]=e.readInt32BE(4*i),t[i+1]=e.readInt32BE(4*i+4);for(;i<160;i+=2){var Q=t[i-30],N=t[i-30+1],D=y(Q,N),T=I(N,Q),j=w(Q=t[i-4],N=t[i-4+1]),U=_(N,Q),J=t[i-14],H=t[i-14+1],F=t[i-32],L=t[i-32+1],G=T+H|0,V=D+J+C(G,T)|0;V=(V=V+j+C(G=G+U|0,U)|0)+F+C(G=G+L|0,L)|0,t[i]=V,t[i+1]=G}for(var W=0;W<160;W+=2){V=t[W],G=t[W+1];var Y=A(n,r,o),K=A(B,k,O),Z=m(n,B),z=m(B,n),X=v(d,R),$=v(R,d),ee=l[W],te=l[W+1],ne=h(d,f,S),re=h(R,P,x),oe=M+$|0,ie=E+X+C(oe,M)|0;ie=(ie=(ie=ie+ne+C(oe=oe+re|0,re)|0)+ee+C(oe=oe+te|0,te)|0)+V+C(oe=oe+G|0,G)|0;var ae=z+K|0,se=Z+Y+C(ae,z)|0;E=S,M=x,S=f,x=P,f=d,P=R,d=c+ie+C(R=dl+oe|0,dl)|0,c=o,dl=O,o=r,O=k,r=n,k=B,n=ie+se+C(B=oe+ae|0,oe)|0}this._al=this._al+B|0,this._bl=this._bl+k|0,this._cl=this._cl+O|0,this._dl=this._dl+dl|0,this._el=this._el+R|0,this._fl=this._fl+P|0,this._gl=this._gl+x|0,this._hl=this._hl+M|0,this._ah=this._ah+n+C(this._al,B)|0,this._bh=this._bh+r+C(this._bl,k)|0,this._ch=this._ch+o+C(this._cl,O)|0,this._dh=this._dh+c+C(this._dl,dl)|0,this._eh=this._eh+d+C(this._el,R)|0,this._fh=this._fh+f+C(this._fl,P)|0,this._gh=this._gh+S+C(this._gl,x)|0,this._hh=this._hh+E+C(this._hl,M)|0},f.prototype._hash=function(){var e=c.allocUnsafe(64);function t(t,n,r){e.writeInt32BE(t,r),e.writeInt32BE(n,r+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=f},function(e,t,n){"use strict";(function(t,r){var o=n(176);e.exports=E;var c,l=n(316);E.ReadableState=S;n(92).EventEmitter;var d=function(e,t){return e.listeners(t).length},f=n(355),h=n(224).Buffer,A=t.Uint8Array||function(){};var m=Object.create(n(136));m.inherits=n(8);var v=n(642),y=void 0;y=v&&v.debuglog?v.debuglog("stream"):function(){};var I,w=n(643),_=n(356);m.inherits(E,f);var C=["error","close","destroy","pause","resume"];function S(e,t){e=e||{};var r=t instanceof(c=c||n(94));this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var o=e.highWaterMark,l=e.readableHighWaterMark,d=this.objectMode?16:16384;this.highWaterMark=o||0===o?o:r&&(l||0===l)?l:d,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new w,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(I||(I=n(93).StringDecoder),this.decoder=new I(e.encoding),this.encoding=e.encoding)}function E(e){if(c=c||n(94),!(this instanceof E))return new E(e);this._readableState=new S(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),f.call(this)}function B(e,t,n,r,o){var c,l=e._readableState;null===t?(l.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,P(e)}(e,l)):(o||(c=function(e,t){var n;r=t,h.isBuffer(r)||r instanceof A||"string"==typeof t||void 0===t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk"));var r;return n}(l,t)),c?e.emit("error",c):l.objectMode||t&&t.length>0?("string"==typeof t||l.objectMode||Object.getPrototypeOf(t)===h.prototype||(t=function(e){return h.from(e)}(t)),r?l.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):k(e,l,t,!0):l.ended?e.emit("error",new Error("stream.push() after EOF")):(l.reading=!1,l.decoder&&!n?(t=l.decoder.write(t),l.objectMode||0!==t.length?k(e,l,t,!1):M(e,l)):k(e,l,t,!1))):r||(l.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=O?e=O:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function P(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(y("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?o.nextTick(x,e):x(e))}function x(e){y("emit readable"),e.emit("readable"),T(e)}function M(e,t){t.readingMore||(t.readingMore=!0,o.nextTick(Q,e,t))}function Q(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=function(e,t,n){var r;eo.length?o.length:e;if(c===o.length?r+=o:r+=o.slice(0,e),0===(e-=c)){c===o.length?(++n,p.next?t.head=p.next:t.head=t.tail=null):(t.head=p,p.data=o.slice(c));break}++n}return t.length-=n,r}(e,t):function(e,t){var n=h.allocUnsafe(e),p=t.head,r=1;p.data.copy(n),e-=p.data.length;for(;p=p.next;){var o=p.data,c=e>o.length?o.length:e;if(o.copy(n,n.length-e,0,c),0===(e-=c)){c===o.length?(++r,p.next?t.head=p.next:t.head=t.tail=null):(t.head=p,p.data=o.slice(c));break}++r}return t.length-=r,n}(e,t);return r}(e,t.buffer,t.decoder),n);var n}function U(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,o.nextTick(J,t,e))}function J(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function H(e,t){for(var i=0,n=e.length;i=t.highWaterMark||t.ended))return y("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?U(this):P(this),null;if(0===(e=R(e,t))&&t.ended)return 0===t.length&&U(this),null;var r,o=t.needReadable;return y("need readable",o),(0===t.length||t.length-e0?j(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&U(this)),null!==r&&this.emit("data",r),r},E.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},E.prototype.pipe=function(e,t){var n=this,c=this._readableState;switch(c.pipesCount){case 0:c.pipes=e;break;case 1:c.pipes=[c.pipes,e];break;default:c.pipes.push(e)}c.pipesCount+=1,y("pipe count=%d opts=%j",c.pipesCount,t);var f=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr?A:E;function h(t,r){y("onunpipe"),t===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,y("cleanup"),e.removeListener("close",C),e.removeListener("finish",S),e.removeListener("drain",m),e.removeListener("error",_),e.removeListener("unpipe",h),n.removeListener("end",A),n.removeListener("end",E),n.removeListener("data",w),v=!0,!c.awaitDrain||e._writableState&&!e._writableState.needDrain||m())}function A(){y("onend"),e.end()}c.endEmitted?o.nextTick(f):n.once("end",f),e.on("unpipe",h);var m=function(e){return function(){var t=e._readableState;y("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&d(e,"data")&&(t.flowing=!0,T(e))}}(n);e.on("drain",m);var v=!1;var I=!1;function w(t){y("ondata"),I=!1,!1!==e.write(t)||I||((1===c.pipesCount&&c.pipes===e||c.pipesCount>1&&-1!==H(c.pipes,e))&&!v&&(y("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,I=!0),n.pause())}function _(t){y("onerror",t),E(),e.removeListener("error",_),0===d(e,"error")&&e.emit("error",t)}function C(){e.removeListener("finish",S),E()}function S(){y("onfinish"),e.removeListener("close",C),E()}function E(){y("unpipe"),n.unpipe(e)}return n.on("data",w),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?l(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",_),e.once("close",C),e.once("finish",S),e.emit("pipe",n),c.flowing||(y("pipe resume"),n.resume()),e},E.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var r=t.pipes,o=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;in)?t=("rmd160"===e?new f:h(e)).update(t).digest():t.lengthn||t!=t)throw new TypeError("Bad key length")}},function(e,t,n){(function(t,n){var r;if(t.process&&t.process.browser)r="utf-8";else if(t.process&&t.process.version){r=parseInt(n.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary"}else r="utf-8";e.exports=r}).call(this,n(3),n(19))},function(e,t,n){var r=n(359),o=n(221),c=n(222),l=n(9).Buffer,d=n(362),f=n(363),h=n(365),A=l.alloc(128),m={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function v(e,t,n){var d=function(e){function t(data){return c(e).update(data).digest()}function n(data){return(new o).update(data).digest()}return"rmd160"===e||"ripemd160"===e?n:"md5"===e?r:t}(e),f="sha512"===e||"sha384"===e?128:64;t.length>f?t=d(t):t.length>>0},t.writeUInt32BE=function(e,t,n){e[0+n]=t>>>24,e[1+n]=t>>>16&255,e[2+n]=t>>>8&255,e[3+n]=255&t},t.ip=function(e,t,n,r){for(var o=0,c=0,i=6;i>=0;i-=2){for(var l=0;l<=24;l+=8)o<<=1,o|=t>>>l+i&1;for(l=0;l<=24;l+=8)o<<=1,o|=e>>>l+i&1}for(i=6;i>=0;i-=2){for(l=1;l<=25;l+=8)c<<=1,c|=t>>>l+i&1;for(l=1;l<=25;l+=8)c<<=1,c|=e>>>l+i&1}n[r+0]=o>>>0,n[r+1]=c>>>0},t.rip=function(e,t,n,r){for(var o=0,c=0,i=0;i<4;i++)for(var l=24;l>=0;l-=8)o<<=1,o|=t>>>l+i&1,o<<=1,o|=e>>>l+i&1;for(i=4;i<8;i++)for(l=24;l>=0;l-=8)c<<=1,c|=t>>>l+i&1,c<<=1,c|=e>>>l+i&1;n[r+0]=o>>>0,n[r+1]=c>>>0},t.pc1=function(e,t,n,r){for(var o=0,c=0,i=7;i>=5;i--){for(var l=0;l<=24;l+=8)o<<=1,o|=t>>l+i&1;for(l=0;l<=24;l+=8)o<<=1,o|=e>>l+i&1}for(l=0;l<=24;l+=8)o<<=1,o|=t>>l+i&1;for(i=1;i<=3;i++){for(l=0;l<=24;l+=8)c<<=1,c|=t>>l+i&1;for(l=0;l<=24;l+=8)c<<=1,c|=e>>l+i&1}for(l=0;l<=24;l+=8)c<<=1,c|=e>>l+i&1;n[r+0]=o>>>0,n[r+1]=c>>>0},t.r28shl=function(e,t){return e<>>28-t};var r=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];t.pc2=function(e,t,n,o){for(var c=0,l=0,d=r.length>>>1,i=0;i>>r[i]&1;for(i=d;i>>r[i]&1;n[o+0]=c>>>0,n[o+1]=l>>>0},t.expand=function(e,t,n){var r=0,o=0;r=(1&e)<<5|e>>>27;for(var i=23;i>=15;i-=4)r<<=6,r|=e>>>i&63;for(i=11;i>=3;i-=4)o|=e>>>i&63,o<<=6;o|=(31&e)<<1|e>>>31,t[n+0]=r>>>0,t[n+1]=o>>>0};var o=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];t.substitute=function(e,t){for(var n=0,i=0;i<4;i++){n<<=4,n|=o[64*i+(e>>>18-6*i&63)]}for(i=0;i<4;i++){n<<=4,n|=o[256+64*i+(t>>>18-6*i&63)]}return n>>>0};var c=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];t.permute=function(e){for(var t=0,i=0;i>>c[i]&1;return t>>>0},t.padSplit=function(e,t,n){for(var r=e.toString(2);r.length>>1];n=c.r28shl(n,l),o=c.r28shl(o,l),c.pc2(n,o,e.keys,i)}},f.prototype._update=function(e,t,n,r){var o=this._desState,l=c.readUInt32BE(e,t),d=c.readUInt32BE(e,t+4);c.ip(l,d,o.tmp,0),l=o.tmp[0],d=o.tmp[1],"encrypt"===this.type?this._encrypt(o,l,d,o.tmp,0):this._decrypt(o,l,d,o.tmp,0),l=o.tmp[0],d=o.tmp[1],c.writeUInt32BE(n,l,r),c.writeUInt32BE(n,d,r+4)},f.prototype._pad=function(e,t){for(var n=e.length-t,i=t;i>>0,l=A}c.rip(d,l,r,o)},f.prototype._decrypt=function(e,t,n,r,o){for(var l=n,d=t,i=e.keys.length-2;i>=0;i-=2){var f=e.keys[i],h=e.keys[i+1];c.expand(l,e.tmp,0),f^=e.tmp[0],h^=e.tmp[1];var s=c.substitute(f,h),A=l;l=(d^c.permute(s))>>>0,d=A}c.rip(l,d,r,o)}},function(e,t,n){var r=n(137),o=n(9).Buffer,c=n(369);function l(e){var t=e._cipher.encryptBlockRaw(e._prev);return c(e._prev),t}t.encrypt=function(e,t){var n=Math.ceil(t.length/16),c=e._cache.length;e._cache=o.concat([e._cache,o.allocUnsafe(16*n)]);for(var i=0;ie;)n.ishrn(1);if(n.isEven()&&n.iadd(d),n.testn(1)||n.iadd(f),t.cmp(f)){if(!t.cmp(h))for(;n.mod(A).cmp(m);)n.iadd(y)}else for(;n.mod(c).cmp(v);)n.iadd(y);if(_(I=n.shrn(1))&&_(n)&&C(I)&&C(n)&&l.test(I)&&l.test(n))return n}}},function(e,t,n){var r=n(27),o=n(229);function c(e){this.rand=e||new o.Rand}e.exports=c,c.create=function(e){return new c(e)},c.prototype._randbelow=function(e){var t=e.bitLength(),n=Math.ceil(t/8);do{var a=new r(this.rand.generate(n))}while(a.cmp(e)>=0);return a},c.prototype._randrange=function(e,t){var n=t.sub(e);return e.add(this._randbelow(n))},c.prototype.test=function(e,t,n){var o=e.bitLength(),c=r.mont(e),l=new r(1).toRed(c);t||(t=Math.max(1,o/48|0));for(var d=e.subn(1),s=0;!d.testn(s);s++);for(var f=e.shrn(s),h=d.toRed(c);t>0;t--){var a=this._randrange(new r(2),d);n&&n(a);var A=a.toRed(c).redPow(f);if(0!==A.cmp(l)&&0!==A.cmp(h)){for(var i=1;i0;t--){var a=this._randrange(new r(2),l),g=e.gcd(a);if(0!==g.cmpn(1))return g;var h=a.toRed(o).redPow(d);if(0!==h.cmp(c)&&0!==h.cmp(f)){for(var i=1;i0)if("string"==typeof t||l.objectMode||Object.getPrototypeOf(t)===d.prototype||(t=function(e){return d.from(e)}(t)),r)l.endEmitted?O(e,new k):Q(e,l,t,!0);else if(l.ended)O(e,new E);else{if(l.destroyed)return!1;l.reading=!1,l.decoder&&!n?(t=l.decoder.write(t),l.objectMode||0!==t.length?Q(e,l,t,!1):U(e,l)):Q(e,l,t,!1)}else r||(l.reading=!1,U(e,l));return!l.ended&&(l.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=N?e=N:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function T(e){var t=e._readableState;h("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(h("emitReadable",t.flowing),t.emittedReadable=!0,r.nextTick(j,e))}function j(e){var t=e._readableState;h("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,G(e)}function U(e,t){t.readingMore||(t.readingMore=!0,r.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 F(e){h("readable nexttick read 0"),e.read(0)}function L(e,t){h("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),G(e),t.flowing&&!t.reading&&e.read(0)}function G(e){var t=e._readableState;for(h("flow",t.flowing);t.flowing&&null!==e.read(););}function V(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):n=t.buffer.consume(e,t.decoder),n);var n}function W(e){var t=e._readableState;h("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,r.nextTick(Y,t,e))}function Y(e,t){if(h("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var n=t._writableState;(!n||n.autoDestroy&&n.finished)&&t.destroy()}}function K(e,t){for(var i=0,n=e.length;i=t.highWaterMark:t.length>0)||t.ended))return h("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?W(this):T(this),null;if(0===(e=D(e,t))&&t.ended)return 0===t.length&&W(this),null;var r,o=t.needReadable;return h("need readable",o),(0===t.length||t.length-e0?V(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&W(this)),null!==r&&this.emit("data",r),r},x.prototype._read=function(e){O(this,new B("_read()"))},x.prototype.pipe=function(e,t){var n=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e)}o.pipesCount+=1,h("pipe count=%d opts=%j",o.pipesCount,t);var l=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr?f:_;function d(t,r){h("onunpipe"),t===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,h("cleanup"),e.removeListener("close",I),e.removeListener("finish",w),e.removeListener("drain",A),e.removeListener("error",y),e.removeListener("unpipe",d),n.removeListener("end",f),n.removeListener("end",_),n.removeListener("data",v),m=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||A())}function f(){h("onend"),e.end()}o.endEmitted?r.nextTick(l):n.once("end",l),e.on("unpipe",d);var A=function(e){return function(){var t=e._readableState;h("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&c(e,"data")&&(t.flowing=!0,G(e))}}(n);e.on("drain",A);var m=!1;function v(t){h("ondata");var r=e.write(t);h("dest.write",r),!1===r&&((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==K(o.pipes,e))&&!m&&(h("false write response, pause",o.awaitDrain),o.awaitDrain++),n.pause())}function y(t){h("onerror",t),_(),e.removeListener("error",y),0===c(e,"error")&&O(e,t)}function I(){e.removeListener("finish",w),_()}function w(){h("onfinish"),e.removeListener("close",I),_()}function _(){h("unpipe"),n.unpipe(e)}return n.on("data",v),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",y),e.once("close",I),e.once("finish",w),e.emit("pipe",n),o.flowing||(h("pipe resume"),n.resume()),e},x.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var r=t.pipes,o=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i0,!1!==o.flowing&&this.resume()):"readable"===e&&(o.endEmitted||o.readableListening||(o.readableListening=o.needReadable=!0,o.flowing=!1,o.emittedReadable=!1,h("on readable",o.length,o.reading),o.length?T(this):o.reading||r.nextTick(F,this))),n},x.prototype.addListener=x.prototype.on,x.prototype.removeListener=function(e,t){var n=l.prototype.removeListener.call(this,e,t);return"readable"===e&&r.nextTick(H,this),n},x.prototype.removeAllListeners=function(e){var t=l.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||r.nextTick(H,this),t},x.prototype.resume=function(){var e=this._readableState;return e.flowing||(h("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,r.nextTick(L,e,t))}(this,e)),e.paused=!1,this},x.prototype.pause=function(){return h("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(h("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},x.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var i in e.on("end",(function(){if(h("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(o){(h("wrapped data"),n.decoder&&(o=n.decoder.write(o)),n.objectMode&&null==o)||(n.objectMode||o&&o.length)&&(t.push(o)||(r=!0,e.pause()))})),e)void 0===this[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 k(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(x.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(x.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),x.prototype._write=function(e,t,n){n(new w("_write()"))},x.prototype._writev=null,x.prototype.end=function(e,t,n){var o=this._writableState;return"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),o.corked&&(o.corked=1,this.uncork()),o.ending||function(e,t,n){t.ending=!0,j(e,t),n&&(t.finished?r.nextTick(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,o,n),this},Object.defineProperty(x.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(x.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),x.prototype.destroy=m.destroy,x.prototype._undestroy=m.undestroy,x.prototype._destroy=function(e,t){t(e)}}).call(this,n(3),n(19))},function(e,t,n){"use strict";e.exports=A;var r=n(119).codes,o=r.ERR_METHOD_NOT_IMPLEMENTED,c=r.ERR_MULTIPLE_CALLBACK,l=r.ERR_TRANSFORM_ALREADY_TRANSFORMING,d=r.ERR_TRANSFORM_WITH_LENGTH_0,f=n(120);function h(e,data){var t=this._transformState;t.transforming=!1;var n=t.writecb;if(null===n)return this.emit("error",new c);t.writechunk=null,t.writecb=null,null!=data&&this.push(data),n(e);var r=this._readableState;r.reading=!1,(r.needReadable||r.length>8,c=255&r;o?n.push(o,c):n.push(c)}return n},r.zero2=o,r.toHex=c,r.encode=function(e,t){return"hex"===t?c(e):e}},function(e,t,n){"use strict";var r=t;r.base=n(179),r.short=n(686),r.mont=n(687),r.edwards=n(688)},function(e,t,n){"use strict";var r=n(59).rotr32;function o(e,t,n){return e&t^~e&n}function c(e,t,n){return e&t^e&n^t&n}function l(e,t,n){return e^t^n}t.ft_1=function(s,e,t,n){return 0===s?o(e,t,n):1===s||3===s?l(e,t,n):2===s?c(e,t,n):void 0},t.ch32=o,t.maj32=c,t.p32=l,t.s0_256=function(e){return r(e,2)^r(e,13)^r(e,22)},t.s1_256=function(e){return r(e,6)^r(e,11)^r(e,25)},t.g0_256=function(e){return r(e,7)^r(e,18)^e>>>3},t.g1_256=function(e){return r(e,17)^r(e,19)^e>>>10}},function(e,t,n){"use strict";var r=n(59),o=n(139),c=n(383),l=n(48),d=r.sum32,f=r.sum32_4,h=r.sum32_5,A=c.ch32,m=c.maj32,v=c.s0_256,y=c.s1_256,I=c.g0_256,w=c.g1_256,_=o.BlockHash,C=[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];function S(){if(!(this instanceof S))return new S;_.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=C,this.W=new Array(64)}r.inherits(S,_),e.exports=S,S.blockSize=512,S.outSize=256,S.hmacStrength=192,S.padLength=64,S.prototype._update=function(e,t){for(var n=this.W,i=0;i<16;i++)n[i]=e[t+i];for(;i=48&&n<=57?n-48:n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:void r(!1,"Invalid character in "+e)}function f(e,t,n){var r=d(e,n);return n-1>=t&&(r|=d(e,n-1)<<4),r}function h(e,t,n,o){for(var c=0,b=0,l=Math.min(e.length,n),i=t;i=49?d-49+10:d>=17?d-17+10:d,r(d>=0&&b0?e:t},c.min=function(e,t){return e.cmp(t)<0?e:t},c.prototype._init=function(e,base,t){if("number"==typeof e)return this._initNumber(e,base,t);if("object"==typeof e)return this._initArray(e,base,t);"hex"===base&&(base=16),r(base===(0|base)&&base>=2&&base<=36);var n=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n=0;i-=3)o=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[n]|=o<>>26-c&67108863,(c+=24)>=26&&(c-=26,n++);else if("le"===t)for(i=0,n=0;i>>26-c&67108863,(c+=24)>=26&&(c-=26,n++);return this._strip()},c.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var i=0;i=t;i-=2)r=f(e,t,i)<=18?(o-=18,c+=1,this.words[c]|=r>>>26):o+=8;else for(i=(e.length-t)%2==0?t+1:t;i=18?(o-=18,c+=1,this.words[c]|=r>>>26):o+=8;this._strip()},c.prototype._parseBase=function(e,base,t){this.words=[0],this.length=1;for(var n=0,r=1;r<=67108863;r*=base)n++;n--,r=r/base|0;for(var o=e.length-t,c=o%n,l=Math.min(o,o-c)+t,d=0,i=t;i1&&0===this.words[this.length-1];)this.length--;return this._normSign()},c.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{c.prototype[Symbol.for("nodejs.util.inspect.custom")]=m}catch(e){c.prototype.inspect=m}else c.prototype.inspect=m;function m(){return(this.red?""}var v=["","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"],y=[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],I=[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];c.prototype.toString=function(base,e){var t;if(e=0|e||1,16===(base=base||10)||"hex"===base){t="";for(var n=0,o=0,i=0;i>>24-n&16777215,(n+=2)>=26&&(n-=26,i--),t=0!==o||i!==this.length-1?v[6-l.length]+l+t:l+t}for(0!==o&&(t=o.toString(16)+t);t.length%e!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t}if(base===(0|base)&&base>=2&&base<=36){var d=y[base],f=I[base];t="";var h=this.clone();for(h.negative=0;!h.isZero();){var A=h.modrn(f).toString(base);t=(h=h.idivn(f)).isZero()?A+t:v[d-A.length]+A+t}for(this.isZero()&&(t="0"+t);t.length%e!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t}r(!1,"Base should be between 2 and 36")},c.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&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},c.prototype.toJSON=function(){return this.toString(16,2)},l&&(c.prototype.toBuffer=function(e,t){return this.toArrayLike(l,e,t)}),c.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};function w(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var a=0|e.words[0],b=0|t.words[0],o=a*b,c=67108863&o,l=o/67108864|0;n.words[0]=c;for(var d=1;d>>26,h=67108863&l,A=Math.min(d,t.length-1),m=Math.max(0,d-e.length+1);m<=A;m++){var i=d-m|0;f+=(o=(a=0|e.words[i])*(b=0|t.words[m])+h)/67108864|0,h=67108863&o}n.words[d]=0|h,l=0|f}return 0!==l?n.words[d]=0|l:n.length--,n._strip()}c.prototype.toArrayLike=function(e,t,n){this._strip();var o=this.byteLength(),c=n||Math.max(1,o);r(o<=c,"byte array longer than desired length"),r(c>0,"Requested array length <= 0");var l=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,c);return this["_toArrayLike"+("le"===t?"LE":"BE")](l,o),l},c.prototype._toArrayLikeLE=function(e,t){for(var n=0,r=0,i=0,o=0;i>8&255),n>16&255),6===o?(n>24&255),r=0,o=0):(r=c>>>24,o+=2)}if(n=0&&(e[n--]=c>>8&255),n>=0&&(e[n--]=c>>16&255),6===o?(n>=0&&(e[n--]=c>>24&255),r=0,o=0):(r=c>>>24,o+=2)}if(n>=0)for(e[n--]=r;n>=0;)e[n--]=0},Math.clz32?c.prototype._countBits=function(e){return 32-Math.clz32(e)}:c.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},c.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 0==(8191&t)&&(n+=13,t>>>=13),0==(127&t)&&(n+=7,t>>>=7),0==(15&t)&&(n+=4,t>>>=4),0==(3&t)&&(n+=2,t>>>=2),0==(1&t)&&n++,n},c.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},c.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,i=0;ie.length?this.clone().ior(e):e.clone().ior(this)},c.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},c.prototype.iuand=function(e){var b;b=this.length>e.length?e:this;for(var i=0;ie.length?this.clone().iand(e):e.clone().iand(this)},c.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},c.prototype.iuxor=function(e){var a,b;this.length>e.length?(a=this,b=e):(a=e,b=this);for(var i=0;ie.length?this.clone().ixor(e):e.clone().ixor(this)},c.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},c.prototype.inotn=function(e){r("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-n),this._strip()},c.prototype.notn=function(e){return this.clone().inotn(e)},c.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);var n=e/26|0,o=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<e.length?(a=this,b=e):(a=e,b=this);for(var n=0,i=0;i>>26;for(;0!==n&&i>>26;if(this.length=a.length,0!==n)this.words[this.length]=n,this.length++;else if(a!==this)for(;ie.length?this.clone().iadd(e):e.clone().iadd(this)},c.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var a,b,n=this.cmp(e);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(a=this,b=e):(a=e,b=this);for(var r=0,i=0;i>26,this.words[i]=67108863&t;for(;0!==r&&i>26,this.words[i]=67108863&t;if(0===r&&i>>13,m=0|a[1],v=8191&m,y=m>>>13,I=0|a[2],w=8191&I,_=I>>>13,C=0|a[3],S=8191&C,E=C>>>13,B=0|a[4],k=8191&B,O=B>>>13,R=0|a[5],P=8191&R,x=R>>>13,M=0|a[6],Q=8191&M,N=M>>>13,D=0|a[7],T=8191&D,j=D>>>13,U=0|a[8],J=8191&U,H=U>>>13,F=0|a[9],L=8191&F,G=F>>>13,V=0|b[0],W=8191&V,Y=V>>>13,K=0|b[1],Z=8191&K,z=K>>>13,X=0|b[2],$=8191&X,ee=X>>>13,te=0|b[3],ne=8191&te,re=te>>>13,oe=0|b[4],ie=8191&oe,ae=oe>>>13,se=0|b[5],ce=8191&se,ue=se>>>13,le=0|b[6],de=8191&le,fe=le>>>13,he=0|b[7],pe=8191&he,ge=he>>>13,Ae=0|b[8],me=8191&Ae,ve=Ae>>>13,ye=0|b[9],be=8191&ye,Ie=ye>>>13;n.negative=e.negative^t.negative,n.length=19;var we=(d+(r=Math.imul(h,W))|0)+((8191&(o=(o=Math.imul(h,Y))+Math.imul(A,W)|0))<<13)|0;d=((c=Math.imul(A,Y))+(o>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(v,W),o=(o=Math.imul(v,Y))+Math.imul(y,W)|0,c=Math.imul(y,Y);var _e=(d+(r=r+Math.imul(h,Z)|0)|0)+((8191&(o=(o=o+Math.imul(h,z)|0)+Math.imul(A,Z)|0))<<13)|0;d=((c=c+Math.imul(A,z)|0)+(o>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(w,W),o=(o=Math.imul(w,Y))+Math.imul(_,W)|0,c=Math.imul(_,Y),r=r+Math.imul(v,Z)|0,o=(o=o+Math.imul(v,z)|0)+Math.imul(y,Z)|0,c=c+Math.imul(y,z)|0;var Ce=(d+(r=r+Math.imul(h,$)|0)|0)+((8191&(o=(o=o+Math.imul(h,ee)|0)+Math.imul(A,$)|0))<<13)|0;d=((c=c+Math.imul(A,ee)|0)+(o>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(S,W),o=(o=Math.imul(S,Y))+Math.imul(E,W)|0,c=Math.imul(E,Y),r=r+Math.imul(w,Z)|0,o=(o=o+Math.imul(w,z)|0)+Math.imul(_,Z)|0,c=c+Math.imul(_,z)|0,r=r+Math.imul(v,$)|0,o=(o=o+Math.imul(v,ee)|0)+Math.imul(y,$)|0,c=c+Math.imul(y,ee)|0;var Se=(d+(r=r+Math.imul(h,ne)|0)|0)+((8191&(o=(o=o+Math.imul(h,re)|0)+Math.imul(A,ne)|0))<<13)|0;d=((c=c+Math.imul(A,re)|0)+(o>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(k,W),o=(o=Math.imul(k,Y))+Math.imul(O,W)|0,c=Math.imul(O,Y),r=r+Math.imul(S,Z)|0,o=(o=o+Math.imul(S,z)|0)+Math.imul(E,Z)|0,c=c+Math.imul(E,z)|0,r=r+Math.imul(w,$)|0,o=(o=o+Math.imul(w,ee)|0)+Math.imul(_,$)|0,c=c+Math.imul(_,ee)|0,r=r+Math.imul(v,ne)|0,o=(o=o+Math.imul(v,re)|0)+Math.imul(y,ne)|0,c=c+Math.imul(y,re)|0;var Ee=(d+(r=r+Math.imul(h,ie)|0)|0)+((8191&(o=(o=o+Math.imul(h,ae)|0)+Math.imul(A,ie)|0))<<13)|0;d=((c=c+Math.imul(A,ae)|0)+(o>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(P,W),o=(o=Math.imul(P,Y))+Math.imul(x,W)|0,c=Math.imul(x,Y),r=r+Math.imul(k,Z)|0,o=(o=o+Math.imul(k,z)|0)+Math.imul(O,Z)|0,c=c+Math.imul(O,z)|0,r=r+Math.imul(S,$)|0,o=(o=o+Math.imul(S,ee)|0)+Math.imul(E,$)|0,c=c+Math.imul(E,ee)|0,r=r+Math.imul(w,ne)|0,o=(o=o+Math.imul(w,re)|0)+Math.imul(_,ne)|0,c=c+Math.imul(_,re)|0,r=r+Math.imul(v,ie)|0,o=(o=o+Math.imul(v,ae)|0)+Math.imul(y,ie)|0,c=c+Math.imul(y,ae)|0;var Be=(d+(r=r+Math.imul(h,ce)|0)|0)+((8191&(o=(o=o+Math.imul(h,ue)|0)+Math.imul(A,ce)|0))<<13)|0;d=((c=c+Math.imul(A,ue)|0)+(o>>>13)|0)+(Be>>>26)|0,Be&=67108863,r=Math.imul(Q,W),o=(o=Math.imul(Q,Y))+Math.imul(N,W)|0,c=Math.imul(N,Y),r=r+Math.imul(P,Z)|0,o=(o=o+Math.imul(P,z)|0)+Math.imul(x,Z)|0,c=c+Math.imul(x,z)|0,r=r+Math.imul(k,$)|0,o=(o=o+Math.imul(k,ee)|0)+Math.imul(O,$)|0,c=c+Math.imul(O,ee)|0,r=r+Math.imul(S,ne)|0,o=(o=o+Math.imul(S,re)|0)+Math.imul(E,ne)|0,c=c+Math.imul(E,re)|0,r=r+Math.imul(w,ie)|0,o=(o=o+Math.imul(w,ae)|0)+Math.imul(_,ie)|0,c=c+Math.imul(_,ae)|0,r=r+Math.imul(v,ce)|0,o=(o=o+Math.imul(v,ue)|0)+Math.imul(y,ce)|0,c=c+Math.imul(y,ue)|0;var ke=(d+(r=r+Math.imul(h,de)|0)|0)+((8191&(o=(o=o+Math.imul(h,fe)|0)+Math.imul(A,de)|0))<<13)|0;d=((c=c+Math.imul(A,fe)|0)+(o>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(T,W),o=(o=Math.imul(T,Y))+Math.imul(j,W)|0,c=Math.imul(j,Y),r=r+Math.imul(Q,Z)|0,o=(o=o+Math.imul(Q,z)|0)+Math.imul(N,Z)|0,c=c+Math.imul(N,z)|0,r=r+Math.imul(P,$)|0,o=(o=o+Math.imul(P,ee)|0)+Math.imul(x,$)|0,c=c+Math.imul(x,ee)|0,r=r+Math.imul(k,ne)|0,o=(o=o+Math.imul(k,re)|0)+Math.imul(O,ne)|0,c=c+Math.imul(O,re)|0,r=r+Math.imul(S,ie)|0,o=(o=o+Math.imul(S,ae)|0)+Math.imul(E,ie)|0,c=c+Math.imul(E,ae)|0,r=r+Math.imul(w,ce)|0,o=(o=o+Math.imul(w,ue)|0)+Math.imul(_,ce)|0,c=c+Math.imul(_,ue)|0,r=r+Math.imul(v,de)|0,o=(o=o+Math.imul(v,fe)|0)+Math.imul(y,de)|0,c=c+Math.imul(y,fe)|0;var Oe=(d+(r=r+Math.imul(h,pe)|0)|0)+((8191&(o=(o=o+Math.imul(h,ge)|0)+Math.imul(A,pe)|0))<<13)|0;d=((c=c+Math.imul(A,ge)|0)+(o>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,r=Math.imul(J,W),o=(o=Math.imul(J,Y))+Math.imul(H,W)|0,c=Math.imul(H,Y),r=r+Math.imul(T,Z)|0,o=(o=o+Math.imul(T,z)|0)+Math.imul(j,Z)|0,c=c+Math.imul(j,z)|0,r=r+Math.imul(Q,$)|0,o=(o=o+Math.imul(Q,ee)|0)+Math.imul(N,$)|0,c=c+Math.imul(N,ee)|0,r=r+Math.imul(P,ne)|0,o=(o=o+Math.imul(P,re)|0)+Math.imul(x,ne)|0,c=c+Math.imul(x,re)|0,r=r+Math.imul(k,ie)|0,o=(o=o+Math.imul(k,ae)|0)+Math.imul(O,ie)|0,c=c+Math.imul(O,ae)|0,r=r+Math.imul(S,ce)|0,o=(o=o+Math.imul(S,ue)|0)+Math.imul(E,ce)|0,c=c+Math.imul(E,ue)|0,r=r+Math.imul(w,de)|0,o=(o=o+Math.imul(w,fe)|0)+Math.imul(_,de)|0,c=c+Math.imul(_,fe)|0,r=r+Math.imul(v,pe)|0,o=(o=o+Math.imul(v,ge)|0)+Math.imul(y,pe)|0,c=c+Math.imul(y,ge)|0;var Re=(d+(r=r+Math.imul(h,me)|0)|0)+((8191&(o=(o=o+Math.imul(h,ve)|0)+Math.imul(A,me)|0))<<13)|0;d=((c=c+Math.imul(A,ve)|0)+(o>>>13)|0)+(Re>>>26)|0,Re&=67108863,r=Math.imul(L,W),o=(o=Math.imul(L,Y))+Math.imul(G,W)|0,c=Math.imul(G,Y),r=r+Math.imul(J,Z)|0,o=(o=o+Math.imul(J,z)|0)+Math.imul(H,Z)|0,c=c+Math.imul(H,z)|0,r=r+Math.imul(T,$)|0,o=(o=o+Math.imul(T,ee)|0)+Math.imul(j,$)|0,c=c+Math.imul(j,ee)|0,r=r+Math.imul(Q,ne)|0,o=(o=o+Math.imul(Q,re)|0)+Math.imul(N,ne)|0,c=c+Math.imul(N,re)|0,r=r+Math.imul(P,ie)|0,o=(o=o+Math.imul(P,ae)|0)+Math.imul(x,ie)|0,c=c+Math.imul(x,ae)|0,r=r+Math.imul(k,ce)|0,o=(o=o+Math.imul(k,ue)|0)+Math.imul(O,ce)|0,c=c+Math.imul(O,ue)|0,r=r+Math.imul(S,de)|0,o=(o=o+Math.imul(S,fe)|0)+Math.imul(E,de)|0,c=c+Math.imul(E,fe)|0,r=r+Math.imul(w,pe)|0,o=(o=o+Math.imul(w,ge)|0)+Math.imul(_,pe)|0,c=c+Math.imul(_,ge)|0,r=r+Math.imul(v,me)|0,o=(o=o+Math.imul(v,ve)|0)+Math.imul(y,me)|0,c=c+Math.imul(y,ve)|0;var Pe=(d+(r=r+Math.imul(h,be)|0)|0)+((8191&(o=(o=o+Math.imul(h,Ie)|0)+Math.imul(A,be)|0))<<13)|0;d=((c=c+Math.imul(A,Ie)|0)+(o>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,r=Math.imul(L,Z),o=(o=Math.imul(L,z))+Math.imul(G,Z)|0,c=Math.imul(G,z),r=r+Math.imul(J,$)|0,o=(o=o+Math.imul(J,ee)|0)+Math.imul(H,$)|0,c=c+Math.imul(H,ee)|0,r=r+Math.imul(T,ne)|0,o=(o=o+Math.imul(T,re)|0)+Math.imul(j,ne)|0,c=c+Math.imul(j,re)|0,r=r+Math.imul(Q,ie)|0,o=(o=o+Math.imul(Q,ae)|0)+Math.imul(N,ie)|0,c=c+Math.imul(N,ae)|0,r=r+Math.imul(P,ce)|0,o=(o=o+Math.imul(P,ue)|0)+Math.imul(x,ce)|0,c=c+Math.imul(x,ue)|0,r=r+Math.imul(k,de)|0,o=(o=o+Math.imul(k,fe)|0)+Math.imul(O,de)|0,c=c+Math.imul(O,fe)|0,r=r+Math.imul(S,pe)|0,o=(o=o+Math.imul(S,ge)|0)+Math.imul(E,pe)|0,c=c+Math.imul(E,ge)|0,r=r+Math.imul(w,me)|0,o=(o=o+Math.imul(w,ve)|0)+Math.imul(_,me)|0,c=c+Math.imul(_,ve)|0;var xe=(d+(r=r+Math.imul(v,be)|0)|0)+((8191&(o=(o=o+Math.imul(v,Ie)|0)+Math.imul(y,be)|0))<<13)|0;d=((c=c+Math.imul(y,Ie)|0)+(o>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(L,$),o=(o=Math.imul(L,ee))+Math.imul(G,$)|0,c=Math.imul(G,ee),r=r+Math.imul(J,ne)|0,o=(o=o+Math.imul(J,re)|0)+Math.imul(H,ne)|0,c=c+Math.imul(H,re)|0,r=r+Math.imul(T,ie)|0,o=(o=o+Math.imul(T,ae)|0)+Math.imul(j,ie)|0,c=c+Math.imul(j,ae)|0,r=r+Math.imul(Q,ce)|0,o=(o=o+Math.imul(Q,ue)|0)+Math.imul(N,ce)|0,c=c+Math.imul(N,ue)|0,r=r+Math.imul(P,de)|0,o=(o=o+Math.imul(P,fe)|0)+Math.imul(x,de)|0,c=c+Math.imul(x,fe)|0,r=r+Math.imul(k,pe)|0,o=(o=o+Math.imul(k,ge)|0)+Math.imul(O,pe)|0,c=c+Math.imul(O,ge)|0,r=r+Math.imul(S,me)|0,o=(o=o+Math.imul(S,ve)|0)+Math.imul(E,me)|0,c=c+Math.imul(E,ve)|0;var Me=(d+(r=r+Math.imul(w,be)|0)|0)+((8191&(o=(o=o+Math.imul(w,Ie)|0)+Math.imul(_,be)|0))<<13)|0;d=((c=c+Math.imul(_,Ie)|0)+(o>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(L,ne),o=(o=Math.imul(L,re))+Math.imul(G,ne)|0,c=Math.imul(G,re),r=r+Math.imul(J,ie)|0,o=(o=o+Math.imul(J,ae)|0)+Math.imul(H,ie)|0,c=c+Math.imul(H,ae)|0,r=r+Math.imul(T,ce)|0,o=(o=o+Math.imul(T,ue)|0)+Math.imul(j,ce)|0,c=c+Math.imul(j,ue)|0,r=r+Math.imul(Q,de)|0,o=(o=o+Math.imul(Q,fe)|0)+Math.imul(N,de)|0,c=c+Math.imul(N,fe)|0,r=r+Math.imul(P,pe)|0,o=(o=o+Math.imul(P,ge)|0)+Math.imul(x,pe)|0,c=c+Math.imul(x,ge)|0,r=r+Math.imul(k,me)|0,o=(o=o+Math.imul(k,ve)|0)+Math.imul(O,me)|0,c=c+Math.imul(O,ve)|0;var Qe=(d+(r=r+Math.imul(S,be)|0)|0)+((8191&(o=(o=o+Math.imul(S,Ie)|0)+Math.imul(E,be)|0))<<13)|0;d=((c=c+Math.imul(E,Ie)|0)+(o>>>13)|0)+(Qe>>>26)|0,Qe&=67108863,r=Math.imul(L,ie),o=(o=Math.imul(L,ae))+Math.imul(G,ie)|0,c=Math.imul(G,ae),r=r+Math.imul(J,ce)|0,o=(o=o+Math.imul(J,ue)|0)+Math.imul(H,ce)|0,c=c+Math.imul(H,ue)|0,r=r+Math.imul(T,de)|0,o=(o=o+Math.imul(T,fe)|0)+Math.imul(j,de)|0,c=c+Math.imul(j,fe)|0,r=r+Math.imul(Q,pe)|0,o=(o=o+Math.imul(Q,ge)|0)+Math.imul(N,pe)|0,c=c+Math.imul(N,ge)|0,r=r+Math.imul(P,me)|0,o=(o=o+Math.imul(P,ve)|0)+Math.imul(x,me)|0,c=c+Math.imul(x,ve)|0;var Ne=(d+(r=r+Math.imul(k,be)|0)|0)+((8191&(o=(o=o+Math.imul(k,Ie)|0)+Math.imul(O,be)|0))<<13)|0;d=((c=c+Math.imul(O,Ie)|0)+(o>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,r=Math.imul(L,ce),o=(o=Math.imul(L,ue))+Math.imul(G,ce)|0,c=Math.imul(G,ue),r=r+Math.imul(J,de)|0,o=(o=o+Math.imul(J,fe)|0)+Math.imul(H,de)|0,c=c+Math.imul(H,fe)|0,r=r+Math.imul(T,pe)|0,o=(o=o+Math.imul(T,ge)|0)+Math.imul(j,pe)|0,c=c+Math.imul(j,ge)|0,r=r+Math.imul(Q,me)|0,o=(o=o+Math.imul(Q,ve)|0)+Math.imul(N,me)|0,c=c+Math.imul(N,ve)|0;var De=(d+(r=r+Math.imul(P,be)|0)|0)+((8191&(o=(o=o+Math.imul(P,Ie)|0)+Math.imul(x,be)|0))<<13)|0;d=((c=c+Math.imul(x,Ie)|0)+(o>>>13)|0)+(De>>>26)|0,De&=67108863,r=Math.imul(L,de),o=(o=Math.imul(L,fe))+Math.imul(G,de)|0,c=Math.imul(G,fe),r=r+Math.imul(J,pe)|0,o=(o=o+Math.imul(J,ge)|0)+Math.imul(H,pe)|0,c=c+Math.imul(H,ge)|0,r=r+Math.imul(T,me)|0,o=(o=o+Math.imul(T,ve)|0)+Math.imul(j,me)|0,c=c+Math.imul(j,ve)|0;var Te=(d+(r=r+Math.imul(Q,be)|0)|0)+((8191&(o=(o=o+Math.imul(Q,Ie)|0)+Math.imul(N,be)|0))<<13)|0;d=((c=c+Math.imul(N,Ie)|0)+(o>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(L,pe),o=(o=Math.imul(L,ge))+Math.imul(G,pe)|0,c=Math.imul(G,ge),r=r+Math.imul(J,me)|0,o=(o=o+Math.imul(J,ve)|0)+Math.imul(H,me)|0,c=c+Math.imul(H,ve)|0;var je=(d+(r=r+Math.imul(T,be)|0)|0)+((8191&(o=(o=o+Math.imul(T,Ie)|0)+Math.imul(j,be)|0))<<13)|0;d=((c=c+Math.imul(j,Ie)|0)+(o>>>13)|0)+(je>>>26)|0,je&=67108863,r=Math.imul(L,me),o=(o=Math.imul(L,ve))+Math.imul(G,me)|0,c=Math.imul(G,ve);var Ue=(d+(r=r+Math.imul(J,be)|0)|0)+((8191&(o=(o=o+Math.imul(J,Ie)|0)+Math.imul(H,be)|0))<<13)|0;d=((c=c+Math.imul(H,Ie)|0)+(o>>>13)|0)+(Ue>>>26)|0,Ue&=67108863;var Je=(d+(r=Math.imul(L,be))|0)+((8191&(o=(o=Math.imul(L,Ie))+Math.imul(G,be)|0))<<13)|0;return d=((c=Math.imul(G,Ie))+(o>>>13)|0)+(Je>>>26)|0,Je&=67108863,l[0]=we,l[1]=_e,l[2]=Ce,l[3]=Se,l[4]=Ee,l[5]=Be,l[6]=ke,l[7]=Oe,l[8]=Re,l[9]=Pe,l[10]=xe,l[11]=Me,l[12]=Qe,l[13]=Ne,l[14]=De,l[15]=Te,l[16]=je,l[17]=Ue,l[18]=Je,0!==d&&(l[19]=d,n.length++),n};function C(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,o=0,c=0;c>>26)|0)>>>26,l&=67108863}n.words[c]=d,r=l,l=o}return 0!==r?n.words[c]=r:n.length--,n._strip()}function S(e,t,n){return C(e,t,n)}function E(e,t){this.x=e,this.y=t}Math.imul||(_=w),c.prototype.mulTo=function(e,t){var n=this.length+e.length;return 10===this.length&&10===e.length?_(this,e,t):n<63?w(this,e,t):n<1024?C(this,e,t):S(this,e,t)},E.prototype.makeRBT=function(e){for(var t=new Array(e),n=c.prototype._countBits(e)-1,i=0;i>=1;return r},E.prototype.permute=function(e,t,n,r,o,c){for(var i=0;i>>=1)i++;return 1<>>=13,n[2*i+1]=8191&c,c>>>=13;for(i=2*t;i>=26,n+=o/67108864|0,n+=c>>>26,this.words[i]=67108863&c}return 0!==n&&(this.words[i]=n,this.length++),t?this.ineg():this},c.prototype.muln=function(e){return this.clone().imuln(e)},c.prototype.sqr=function(){return this.mul(this)},c.prototype.isqr=function(){return this.imul(this.clone())},c.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n>>o&1}return t}(e);if(0===t.length)return new c(1);for(var n=this,i=0;i=0);var i,t=e%26,s=(e-t)/26,n=67108863>>>26-t<<26-t;if(0!==t){var o=0;for(i=0;i>>26-t}o&&(this.words[i]=o,this.length++)}if(0!==s){for(i=this.length-1;i>=0;i--)this.words[i+s]=this.words[i];for(i=0;i=0),o=t?(t-t%26)/26:0;var c=e%26,s=Math.min((e-c)/26,this.length),mask=67108863^67108863>>>c<s)for(this.length-=s,i=0;i=0&&(0!==d||i>=o);i--){var f=0|this.words[i];this.words[i]=d<<26-c|f>>>c,d=f&mask}return l&&0!==d&&(l.words[l.length++]=d),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},c.prototype.ishrn=function(e,t,n){return r(0===this.negative),this.iushrn(e,t,n)},c.prototype.shln=function(e){return this.clone().ishln(e)},c.prototype.ushln=function(e){return this.clone().iushln(e)},c.prototype.shrn=function(e){return this.clone().ishrn(e)},c.prototype.ushrn=function(e){return this.clone().iushrn(e)},c.prototype.testn=function(e){r("number"==typeof e&&e>=0);var t=e%26,s=(e-t)/26,q=1<=0);var t=e%26,s=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=s)return this;if(0!==t&&s++,this.length=Math.min(s,this.length),0!==t){var mask=67108863^67108863>>>t<=67108864;i++)this.words[i]-=67108864,i===this.length-1?this.words[i+1]=1:this.words[i+1]++;return this.length=Math.max(this.length,i+1),this},c.prototype.isubn=function(e){if(r("number"==typeof e),r(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 i=0;i>26)-(d/67108864|0),this.words[i+n]=67108863&o}for(;i>26,this.words[i+n]=67108863&o;if(0===l)return this._strip();for(r(-1===l),l=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},c.prototype._wordDiv=function(e,t){var n=(this.length,e.length),a=this.clone(),b=e,r=0|b.words[b.length-1];0!==(n=26-this._countBits(r))&&(b=b.ushln(n),a.iushln(n),r=0|b.words[b.length-1]);var q,o=a.length-b.length;if("mod"!==t){(q=new c(null)).length=o+1,q.words=new Array(q.length);for(var i=0;i=0;d--){var f=67108864*(0|a.words[b.length+d])+(0|a.words[b.length+d-1]);for(f=Math.min(f/r|0,67108863),a._ishlnsubmul(b,f,d);0!==a.negative;)f--,a.negative=0,a._ishlnsubmul(b,1,d),a.isZero()||(a.negative^=1);q&&(q.words[d]=f)}return q&&q._strip(),a._strip(),"div"!==t&&0!==n&&a.iushrn(n),{div:q||null,mod:a}},c.prototype.divmod=function(e,t,n){return r(!e.isZero()),this.isZero()?{div:new c(0),mod:new c(0)}:0!==this.negative&&0===e.negative?(l=this.neg().divmod(e,t),"mod"!==t&&(div=l.div.neg()),"div"!==t&&(o=l.mod.neg(),n&&0!==o.negative&&o.iadd(e)),{div:div,mod:o}):0===this.negative&&0!==e.negative?(l=this.divmod(e.neg(),t),"mod"!==t&&(div=l.div.neg()),{div:div,mod:l.mod}):0!=(this.negative&e.negative)?(l=this.neg().divmod(e.neg(),t),"div"!==t&&(o=l.mod.neg(),n&&0!==o.negative&&o.isub(e)),{div:l.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new c(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new c(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new c(this.modrn(e.words[0]))}:this._wordDiv(e,t);var div,o,l},c.prototype.div=function(e){return this.divmod(e,"div",!1).div},c.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},c.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},c.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),o=e.andln(1),c=n.cmp(r);return c<0||1===o&&0===c?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},c.prototype.modrn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var p=(1<<26)%e,n=0,i=this.length-1;i>=0;i--)n=(p*n+(0|this.words[i]))%e;return t?-n:n},c.prototype.modn=function(e){return this.modrn(e)},c.prototype.idivn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var n=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*n;this.words[i]=o/e|0,n=o%e}return this._strip(),t?this.ineg():this},c.prototype.divn=function(e){return this.clone().idivn(e)},c.prototype.egcd=function(p){r(0===p.negative),r(!p.isZero());var e=this,t=p.clone();e=0!==e.negative?e.umod(p):e.clone();for(var n=new c(1),o=new c(0),l=new c(0),d=new c(1),g=0;e.isEven()&&t.isEven();)e.iushrn(1),t.iushrn(1),++g;for(var f=t.clone(),h=e.clone();!e.isZero();){for(var i=0,A=1;0==(e.words[0]&A)&&i<26;++i,A<<=1);if(i>0)for(e.iushrn(i);i-- >0;)(n.isOdd()||o.isOdd())&&(n.iadd(f),o.isub(h)),n.iushrn(1),o.iushrn(1);for(var m=0,v=1;0==(t.words[0]&v)&&m<26;++m,v<<=1);if(m>0)for(t.iushrn(m);m-- >0;)(l.isOdd()||d.isOdd())&&(l.iadd(f),d.isub(h)),l.iushrn(1),d.iushrn(1);e.cmp(t)>=0?(e.isub(t),n.isub(l),o.isub(d)):(t.isub(e),l.isub(n),d.isub(o))}return{a:l,b:d,gcd:t.iushln(g)}},c.prototype._invmp=function(p){r(0===p.negative),r(!p.isZero());var a=this,b=p.clone();a=0!==a.negative?a.umod(p):a.clone();for(var e,t=new c(1),n=new c(0),o=b.clone();a.cmpn(1)>0&&b.cmpn(1)>0;){for(var i=0,l=1;0==(a.words[0]&l)&&i<26;++i,l<<=1);if(i>0)for(a.iushrn(i);i-- >0;)t.isOdd()&&t.iadd(o),t.iushrn(1);for(var d=0,f=1;0==(b.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(b.iushrn(d);d-- >0;)n.isOdd()&&n.iadd(o),n.iushrn(1);a.cmp(b)>=0?(a.isub(b),t.isub(n)):(b.isub(a),n.isub(t))}return(e=0===a.cmpn(1)?t:n).cmpn(0)<0&&e.iadd(p),e},c.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var a=this.clone(),b=e.clone();a.negative=0,b.negative=0;for(var t=0;a.isEven()&&b.isEven();t++)a.iushrn(1),b.iushrn(1);for(;;){for(;a.isEven();)a.iushrn(1);for(;b.isEven();)b.iushrn(1);var n=a.cmp(b);if(n<0){var r=a;a=b,b=r}else if(0===n||0===b.cmpn(1))break;a.isub(b)}return b.iushln(t)},c.prototype.invm=function(e){return this.egcd(e).a.umod(e)},c.prototype.isEven=function(){return 0==(1&this.words[0])},c.prototype.isOdd=function(){return 1==(1&this.words[0])},c.prototype.andln=function(e){return this.words[0]&e},c.prototype.bincn=function(e){r("number"==typeof e);var t=e%26,s=(e-t)/26,q=1<>>26,o&=67108863,this.words[i]=o}return 0!==n&&(this.words[i]=n,this.length++),this},c.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},c.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this._strip(),this.length>1)t=1;else{n&&(e=-e),r(e<=67108863,"Number is too big");var o=0|this.words[0];t=o===e?0:oe.length)return 1;if(this.length=0;i--){var a=0|this.words[i],b=0|e.words[i];if(a!==b){ab&&(t=1);break}}return t},c.prototype.gtn=function(e){return 1===this.cmpn(e)},c.prototype.gt=function(e){return 1===this.cmp(e)},c.prototype.gten=function(e){return this.cmpn(e)>=0},c.prototype.gte=function(e){return this.cmp(e)>=0},c.prototype.ltn=function(e){return-1===this.cmpn(e)},c.prototype.lt=function(e){return-1===this.cmp(e)},c.prototype.lten=function(e){return this.cmpn(e)<=0},c.prototype.lte=function(e){return this.cmp(e)<=0},c.prototype.eqn=function(e){return 0===this.cmpn(e)},c.prototype.eq=function(e){return 0===this.cmp(e)},c.red=function(e){return new M(e)},c.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},c.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},c.prototype._forceRed=function(e){return this.red=e,this},c.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},c.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},c.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},c.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},c.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},c.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},c.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},c.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},c.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},c.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},c.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},c.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},c.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},c.prototype.redPow=function(e){return r(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 k(e,p){this.name=e,this.p=new c(p,16),this.n=this.p.bitLength(),this.k=new c(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 R(){k.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function P(){k.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function x(){k.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(e){if("string"==typeof e){var t=c._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function Q(e){M.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new c(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 c(null);return e.words=new Array(Math.ceil(this.n/13)),e},k.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},k.prototype.split=function(input,e){input.iushrn(this.n,0,e)},k.prototype.imulK=function(e){return e.imul(this.k)},o(O,k),O.prototype.split=function(input,output){for(var mask=4194303,e=Math.min(input.length,9),i=0;i>>22,t=n}t>>>=22,input.words[i-10]=t,0===t&&input.length>10?input.length-=10:input.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,i=0;i>>=26,e.words[i]=r,t=n}return 0!==t&&(e.words[e.length++]=t),e},c._prime=function(e){if(B[e])return B[e];var t;if("k256"===e)t=new O;else if("p224"===e)t=new R;else if("p192"===e)t=new P;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new x}return B[e]=t,t},M.prototype._verify1=function(a){r(0===a.negative,"red works only with positives"),r(a.red,"red works only with red numbers")},M.prototype._verify2=function(a,b){r(0==(a.negative|b.negative),"red works only with positives"),r(a.red&&a.red===b.red,"red works only with red numbers")},M.prototype.imod=function(a){return this.prime?this.prime.ireduce(a)._forceRed(this):(A(a,a.umod(this.m)._forceRed(this)),a)},M.prototype.neg=function(a){return a.isZero()?a.clone():this.m.sub(a)._forceRed(this)},M.prototype.add=function(a,b){this._verify2(a,b);var e=a.add(b);return e.cmp(this.m)>=0&&e.isub(this.m),e._forceRed(this)},M.prototype.iadd=function(a,b){this._verify2(a,b);var e=a.iadd(b);return e.cmp(this.m)>=0&&e.isub(this.m),e},M.prototype.sub=function(a,b){this._verify2(a,b);var e=a.sub(b);return e.cmpn(0)<0&&e.iadd(this.m),e._forceRed(this)},M.prototype.isub=function(a,b){this._verify2(a,b);var e=a.isub(b);return e.cmpn(0)<0&&e.iadd(this.m),e},M.prototype.shl=function(a,e){return this._verify1(a),this.imod(a.ushln(e))},M.prototype.imul=function(a,b){return this._verify2(a,b),this.imod(a.imul(b))},M.prototype.mul=function(a,b){return this._verify2(a,b),this.imod(a.mul(b))},M.prototype.isqr=function(a){return this.imul(a,a.clone())},M.prototype.sqr=function(a){return this.mul(a,a)},M.prototype.sqrt=function(a){if(a.isZero())return a.clone();var e=this.m.andln(3);if(r(e%2==1),3===e){var t=this.m.add(new c(1)).iushrn(2);return this.pow(a,t)}for(var q=this.m.subn(1),s=0;!q.isZero()&&0===q.andln(1);)s++,q.iushrn(1);r(!q.isZero());var n=new c(1).toRed(this),o=n.redNeg(),l=this.m.subn(1).iushrn(1),d=this.m.bitLength();for(d=new c(2*d*d).toRed(this);0!==this.pow(d,l).cmp(o);)d.redIAdd(o);for(var f=this.pow(d,q),h=this.pow(a,q.addn(1).iushrn(1)),A=this.pow(a,q),m=s;0!==A.cmp(n);){for(var v=A,i=0;0!==v.cmp(n);i++)v=v.redSqr();r(i=0;i--){for(var d=e.words[i],f=l-1;f>=0;f--){var h=d>>f&1;n!==t[0]&&(n=this.sqr(n)),0!==h||0!==r?(r<<=1,r|=h,(4===++o||0===i&&0===f)&&(n=this.mul(n,t[r]),o=0,r=0)):o=0}l=26}return n},M.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},M.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},c.mont=function(e){return new Q(e)},o(Q,M),Q.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},Q.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},Q.prototype.imul=function(a,b){if(a.isZero()||b.isZero())return a.words[0]=0,a.length=1,a;var e=a.imul(b),t=e.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),u=e.isub(t).iushrn(this.shift),n=u;return u.cmp(this.m)>=0?n=u.isub(this.m):u.cmpn(0)<0&&(n=u.iadd(this.m)),n._forceRed(this)},Q.prototype.mul=function(a,b){if(a.isZero()||b.isZero())return new c(0)._forceRed(this);var e=a.mul(b),t=e.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),u=e.isub(t).iushrn(this.shift),n=u;return u.cmp(this.m)>=0?n=u.isub(this.m):u.cmpn(0)<0&&(n=u.iadd(this.m)),n._forceRed(this)},Q.prototype.invm=function(a){return this.imod(a._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)}).call(this,n(113)(e))},function(e,t,n){"use strict";const r=t;r.bignum=n(27),r.define=n(705).define,r.base=n(708),r.constants=n(709),r.decoders=n(390),r.encoders=n(388)},function(e,t,n){"use strict";const r=t;r.der=n(389),r.pem=n(706)},function(e,t,n){"use strict";const r=n(8),o=n(234).Buffer,c=n(235),l=n(237);function d(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new f,this.tree._init(e.body)}function f(e){c.call(this,"der",e)}function h(e){return e<10?"0"+e:e}e.exports=d,d.prototype.encode=function(data,e){return this.tree._encode(data,e).join()},r(f,c),f.prototype._encodeComposite=function(e,t,n,content){const r=function(e,t,n,r){let o;"seqof"===e?e="seq":"setof"===e&&(e="set");if(l.tagByName.hasOwnProperty(e))o=l.tagByName[e];else{if("number"!=typeof e||(0|e)!==e)return r.error("Unknown tag: "+e);o=e}if(o>=31)return r.error("Multi-octet tag encoding unsupported");t||(o|=32);return o|=l.tagClassByName[n||"universal"]<<6,o}(e,t,n,this.reporter);if(content.length<128){const header=o.alloc(2);return header[0]=r,header[1]=content.length,this._createEncoderBuffer([header,content])}let c=1;for(let i=content.length;i>=256;i>>=8)c++;const header=o.alloc(2+c);header[0]=r,header[1]=128|c;for(let i=1+c,e=content.length;e>0;i--,e>>=8)header[i]=255&e;return this._createEncoderBuffer([header,content])},f.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){const t=o.alloc(2*e.length);for(let i=0;i=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}let r=0;for(let i=0;i=128;t>>=7)r++}const c=o.alloc(r);let l=c.length-1;for(let i=e.length-1;i>=0;i--){let t=e[i];for(c[l--]=127&t;(t>>=7)>0;)c[l--]=128|127&t}return this._createEncoderBuffer(c)},f.prototype._encodeTime=function(time,e){let t;const n=new Date(time);return"gentime"===e?t=[h(n.getUTCFullYear()),h(n.getUTCMonth()+1),h(n.getUTCDate()),h(n.getUTCHours()),h(n.getUTCMinutes()),h(n.getUTCSeconds()),"Z"].join(""):"utctime"===e?t=[h(n.getUTCFullYear()%100),h(n.getUTCMonth()+1),h(n.getUTCDate()),h(n.getUTCHours()),h(n.getUTCMinutes()),h(n.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+e+" time is not supported yet"),this._encodeStr(t,"octstr")},f.prototype._encodeNull=function(){return this._createEncoderBuffer("")},f.prototype._encodeInt=function(e,t){if("string"==typeof e){if(!t)return this.reporter.error("String int or enum given, but no values map");if(!t.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=t[e]}if("number"!=typeof e&&!o.isBuffer(e)){const t=e.toArray();!e.sign&&128&t[0]&&t.unshift(0),e=o.from(t)}if(o.isBuffer(e)){let t=e.length;0===e.length&&t++;const n=o.alloc(t);return e.copy(n),0===e.length&&(n[0]=0),this._createEncoderBuffer(n)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);let n=1;for(let i=e;i>=256;i>>=8)n++;const r=new Array(n);for(let i=r.length-1;i>=0;i--)r[i]=255&e,e>>=8;return 128&r[0]&&r.unshift(0),this._createEncoderBuffer(o.from(r))},f.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},f.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getEncoder("der").tree},f.prototype._skipDefault=function(e,t,n){const r=this._baseState;let i;if(null===r.default)return!1;const data=e.join();if(void 0===r.defaultBuffer&&(r.defaultBuffer=this._encodeValue(r.default,t,n).join()),data.length!==r.defaultBuffer.length)return!1;for(i=0;i>6],o=0==(32&n);if(31==(31&n)){let r=n;for(n=0;128==(128&r);){if(r=e.readUInt8(t),e.isError(r))return r;n<<=7,n|=127&r}}else n&=31;return{cls:r,primitive:o,tag:n,tagStr:d.tag[n]}}function m(e,t,n){let r=e.readUInt8(n);if(e.isError(r))return r;if(!t&&128===r)return null;if(0==(128&r))return r;const o=127&r;if(o>4)return e.error("length octect is too long");r=0;for(let i=0;ia&b^a&e^b&e,l=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]),d=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),f=new Uint32Array(64);class h extends r.SHA2{constructor(){super(64,32,8,!1),this.A=0|d[0],this.B=0|d[1],this.C=0|d[2],this.D=0|d[3],this.E=0|d[4],this.F=0|d[5],this.G=0|d[6],this.H=0|d[7]}get(){const{A:e,B:t,C:n,D:r,E:o,F:c,G:l,H:d}=this;return[e,t,n,r,o,c,l,d]}set(e,t,n,r,o,c,l,d){this.A=0|e,this.B=0|t,this.C=0|n,this.D=0|r,this.E=0|o,this.F=0|c,this.G=0|l,this.H=0|d}process(view,e){for(let i=0;i<16;i++,e+=4)f[i]=view.getUint32(e,!1);for(let i=16;i<64;i++){const e=f[i-15],t=f[i-2],n=(0,o.rotr)(e,7)^(0,o.rotr)(e,18)^e>>>3,r=(0,o.rotr)(t,17)^(0,o.rotr)(t,19)^t>>>10;f[i]=r+f[i-7]+n+f[i-16]|0}let{A:t,B:n,C:r,D:d,E:h,F:A,G:m,H:v}=this;for(let i=0;i<64;i++){const e=v+((0,o.rotr)(h,6)^(0,o.rotr)(h,11)^(0,o.rotr)(h,25))+((a=h)&A^~a&m)+l[i]+f[i]|0,y=((0,o.rotr)(t,2)^(0,o.rotr)(t,13)^(0,o.rotr)(t,22))+c(t,n,r)|0;v=m,m=A,A=h,h=d+e|0,d=r,r=n,n=t,t=e+y|0}var a;t=t+this.A|0,n=n+this.B|0,r=r+this.C|0,d=d+this.D|0,h=h+this.E|0,A=A+this.F|0,m=m+this.G|0,v=v+this.H|0,this.set(t,n,r,d,h,A,m,v)}roundClean(){f.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}t.sha256=(0,o.wrapConstructor)((()=>new h))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Hmac=void 0;t.Hmac=class{constructor(e,t){const n=(new e).blockSize;this.hash=data=>(new e).update(data).digest();let r=t;if(r.length>n&&(r=this.hash(r)),r.length92^e)),this.iKeyPad=r.map((e=>54^e)),this.messageHasher=new e,this.blockSize=n,this.update(this.iKeyPad)}update(data){return this.messageHasher.update(data),this}digest(){const e=this.messageHasher.digest();return this.hash(new Uint8Array([...this.oKeyPad,...e]))}}},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ripemd160=t.RIPEMD160=void 0;const r=n(217),o=n(91),c=new Uint8Array([7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8]),l=Uint8Array.from({length:16},((e,i)=>i)),d=l.map((i=>(9*i+5)%16));let f=[l],h=[d];for(let i=0;i<4;i++)for(let e of[f,h])e.push(e[i].map((e=>c[e])));const A=[[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((i=>new Uint8Array(i))),m=f.map(((e,i)=>e.map((e=>A[i][e])))),v=h.map(((e,i)=>e.map((e=>A[i][e])))),y=new Uint32Array([0,1518500249,1859775393,2400959708,2840853838]),I=new Uint32Array([1352829926,1548603684,1836072691,2053994217,0]),w=(e,t)=>e<>>32-t;function _(e,t,n,r){return 0===e?t^n^r:1===e?t&n|~t&r:2===e?(t|~n)^r:3===e?t&r|n&~r:t^(n|~r)}const C=new Uint32Array(16);class S extends r.SHA2{constructor(){super(64,20,8,!0),this.h0=1732584193,this.h1=-271733879,this.h2=-1732584194,this.h3=271733878,this.h4=-1009589776}get(){const{h0:e,h1:h1,h2:h2,h3:h3,h4:h4}=this;return[e,h1,h2,h3,h4]}set(e,h1,h2,h3,h4){this.h0=0|e,this.h1=0|h1,this.h2=0|h2,this.h3=0|h3,this.h4=0|h4}process(view,e){for(let i=0;i<16;i++,e+=4)C[i]=view.getUint32(e,!0);let t=0|this.h0,n=t,r=0|this.h1,br=r,o=0|this.h2,c=o,dl=0|this.h3,l=dl,d=0|this.h4,A=d;for(let e=0;e<5;e++){const S=4-e,E=y[e],B=I[e],k=f[e],O=h[e],R=m[e],P=v[e];for(let i=0;i<16;i++){const n=w(t+_(e,r,o,dl)+C[k[i]]+E,R[i])+d|0;t=d,d=dl,dl=0|w(o,10),o=r,r=n}for(let i=0;i<16;i++){const tr=w(n+_(S,br,c,l)+C[O[i]]+B,P[i])+A|0;n=A,A=l,l=0|w(c,10),c=br,br=tr}}this.set(this.h1+o+l|0,this.h2+dl+A|0,this.h3+d+n|0,this.h4+t+br|0,this.h0+r+c|0)}roundClean(){C.fill(0)}destroy(){this.destroyed=!0,this.buffer.fill(0),this.set(0,0,0,0,0)}}t.RIPEMD160=S,t.ripemd160=(0,o.wrapConstructor)((()=>new S))},function(e,t,n){(function(e){!function(e,t){"use strict";function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function o(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function c(e,base,t){if(c.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==base&&"be"!==base||(t=base,base=10),this._init(e||0,base||10,t||"be"))}var l;"object"==typeof e?e.exports=c:t.BN=c,c.BN=c,c.wordSize=26;try{l="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:n(727).Buffer}catch(e){}function d(e,t){var n=e.charCodeAt(t);return n>=48&&n<=57?n-48:n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:void r(!1,"Invalid character in "+e)}function f(e,t,n){var r=d(e,n);return n-1>=t&&(r|=d(e,n-1)<<4),r}function h(e,t,n,o){for(var c=0,b=0,l=Math.min(e.length,n),i=t;i=49?d-49+10:d>=17?d-17+10:d,r(d>=0&&b0?e:t},c.min=function(e,t){return e.cmp(t)<0?e:t},c.prototype._init=function(e,base,t){if("number"==typeof e)return this._initNumber(e,base,t);if("object"==typeof e)return this._initArray(e,base,t);"hex"===base&&(base=16),r(base===(0|base)&&base>=2&&base<=36);var n=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n=0;i-=3)o=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[n]|=o<>>26-c&67108863,(c+=24)>=26&&(c-=26,n++);else if("le"===t)for(i=0,n=0;i>>26-c&67108863,(c+=24)>=26&&(c-=26,n++);return this._strip()},c.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var i=0;i=t;i-=2)r=f(e,t,i)<=18?(o-=18,c+=1,this.words[c]|=r>>>26):o+=8;else for(i=(e.length-t)%2==0?t+1:t;i=18?(o-=18,c+=1,this.words[c]|=r>>>26):o+=8;this._strip()},c.prototype._parseBase=function(e,base,t){this.words=[0],this.length=1;for(var n=0,r=1;r<=67108863;r*=base)n++;n--,r=r/base|0;for(var o=e.length-t,c=o%n,l=Math.min(o,o-c)+t,d=0,i=t;i1&&0===this.words[this.length-1];)this.length--;return this._normSign()},c.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{c.prototype[Symbol.for("nodejs.util.inspect.custom")]=m}catch(e){c.prototype.inspect=m}else c.prototype.inspect=m;function m(){return(this.red?""}var v=["","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"],y=[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],I=[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];c.prototype.toString=function(base,e){var t;if(e=0|e||1,16===(base=base||10)||"hex"===base){t="";for(var n=0,o=0,i=0;i>>24-n&16777215,(n+=2)>=26&&(n-=26,i--),t=0!==o||i!==this.length-1?v[6-l.length]+l+t:l+t}for(0!==o&&(t=o.toString(16)+t);t.length%e!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t}if(base===(0|base)&&base>=2&&base<=36){var d=y[base],f=I[base];t="";var h=this.clone();for(h.negative=0;!h.isZero();){var A=h.modrn(f).toString(base);t=(h=h.idivn(f)).isZero()?A+t:v[d-A.length]+A+t}for(this.isZero()&&(t="0"+t);t.length%e!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t}r(!1,"Base should be between 2 and 36")},c.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&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},c.prototype.toJSON=function(){return this.toString(16,2)},l&&(c.prototype.toBuffer=function(e,t){return this.toArrayLike(l,e,t)}),c.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};function w(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var a=0|e.words[0],b=0|t.words[0],o=a*b,c=67108863&o,l=o/67108864|0;n.words[0]=c;for(var d=1;d>>26,h=67108863&l,A=Math.min(d,t.length-1),m=Math.max(0,d-e.length+1);m<=A;m++){var i=d-m|0;f+=(o=(a=0|e.words[i])*(b=0|t.words[m])+h)/67108864|0,h=67108863&o}n.words[d]=0|h,l=0|f}return 0!==l?n.words[d]=0|l:n.length--,n._strip()}c.prototype.toArrayLike=function(e,t,n){this._strip();var o=this.byteLength(),c=n||Math.max(1,o);r(o<=c,"byte array longer than desired length"),r(c>0,"Requested array length <= 0");var l=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,c);return this["_toArrayLike"+("le"===t?"LE":"BE")](l,o),l},c.prototype._toArrayLikeLE=function(e,t){for(var n=0,r=0,i=0,o=0;i>8&255),n>16&255),6===o?(n>24&255),r=0,o=0):(r=c>>>24,o+=2)}if(n=0&&(e[n--]=c>>8&255),n>=0&&(e[n--]=c>>16&255),6===o?(n>=0&&(e[n--]=c>>24&255),r=0,o=0):(r=c>>>24,o+=2)}if(n>=0)for(e[n--]=r;n>=0;)e[n--]=0},Math.clz32?c.prototype._countBits=function(e){return 32-Math.clz32(e)}:c.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},c.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 0==(8191&t)&&(n+=13,t>>>=13),0==(127&t)&&(n+=7,t>>>=7),0==(15&t)&&(n+=4,t>>>=4),0==(3&t)&&(n+=2,t>>>=2),0==(1&t)&&n++,n},c.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},c.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,i=0;ie.length?this.clone().ior(e):e.clone().ior(this)},c.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},c.prototype.iuand=function(e){var b;b=this.length>e.length?e:this;for(var i=0;ie.length?this.clone().iand(e):e.clone().iand(this)},c.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},c.prototype.iuxor=function(e){var a,b;this.length>e.length?(a=this,b=e):(a=e,b=this);for(var i=0;ie.length?this.clone().ixor(e):e.clone().ixor(this)},c.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},c.prototype.inotn=function(e){r("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-n),this._strip()},c.prototype.notn=function(e){return this.clone().inotn(e)},c.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);var n=e/26|0,o=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<e.length?(a=this,b=e):(a=e,b=this);for(var n=0,i=0;i>>26;for(;0!==n&&i>>26;if(this.length=a.length,0!==n)this.words[this.length]=n,this.length++;else if(a!==this)for(;ie.length?this.clone().iadd(e):e.clone().iadd(this)},c.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var a,b,n=this.cmp(e);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(a=this,b=e):(a=e,b=this);for(var r=0,i=0;i>26,this.words[i]=67108863&t;for(;0!==r&&i>26,this.words[i]=67108863&t;if(0===r&&i>>13,m=0|a[1],v=8191&m,y=m>>>13,I=0|a[2],w=8191&I,_=I>>>13,C=0|a[3],S=8191&C,E=C>>>13,B=0|a[4],k=8191&B,O=B>>>13,R=0|a[5],P=8191&R,x=R>>>13,M=0|a[6],Q=8191&M,N=M>>>13,D=0|a[7],T=8191&D,j=D>>>13,U=0|a[8],J=8191&U,H=U>>>13,F=0|a[9],L=8191&F,G=F>>>13,V=0|b[0],W=8191&V,Y=V>>>13,K=0|b[1],Z=8191&K,z=K>>>13,X=0|b[2],$=8191&X,ee=X>>>13,te=0|b[3],ne=8191&te,re=te>>>13,oe=0|b[4],ie=8191&oe,ae=oe>>>13,se=0|b[5],ce=8191&se,ue=se>>>13,le=0|b[6],de=8191&le,fe=le>>>13,he=0|b[7],pe=8191&he,ge=he>>>13,Ae=0|b[8],me=8191&Ae,ve=Ae>>>13,ye=0|b[9],be=8191&ye,Ie=ye>>>13;n.negative=e.negative^t.negative,n.length=19;var we=(d+(r=Math.imul(h,W))|0)+((8191&(o=(o=Math.imul(h,Y))+Math.imul(A,W)|0))<<13)|0;d=((c=Math.imul(A,Y))+(o>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(v,W),o=(o=Math.imul(v,Y))+Math.imul(y,W)|0,c=Math.imul(y,Y);var _e=(d+(r=r+Math.imul(h,Z)|0)|0)+((8191&(o=(o=o+Math.imul(h,z)|0)+Math.imul(A,Z)|0))<<13)|0;d=((c=c+Math.imul(A,z)|0)+(o>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(w,W),o=(o=Math.imul(w,Y))+Math.imul(_,W)|0,c=Math.imul(_,Y),r=r+Math.imul(v,Z)|0,o=(o=o+Math.imul(v,z)|0)+Math.imul(y,Z)|0,c=c+Math.imul(y,z)|0;var Ce=(d+(r=r+Math.imul(h,$)|0)|0)+((8191&(o=(o=o+Math.imul(h,ee)|0)+Math.imul(A,$)|0))<<13)|0;d=((c=c+Math.imul(A,ee)|0)+(o>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(S,W),o=(o=Math.imul(S,Y))+Math.imul(E,W)|0,c=Math.imul(E,Y),r=r+Math.imul(w,Z)|0,o=(o=o+Math.imul(w,z)|0)+Math.imul(_,Z)|0,c=c+Math.imul(_,z)|0,r=r+Math.imul(v,$)|0,o=(o=o+Math.imul(v,ee)|0)+Math.imul(y,$)|0,c=c+Math.imul(y,ee)|0;var Se=(d+(r=r+Math.imul(h,ne)|0)|0)+((8191&(o=(o=o+Math.imul(h,re)|0)+Math.imul(A,ne)|0))<<13)|0;d=((c=c+Math.imul(A,re)|0)+(o>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(k,W),o=(o=Math.imul(k,Y))+Math.imul(O,W)|0,c=Math.imul(O,Y),r=r+Math.imul(S,Z)|0,o=(o=o+Math.imul(S,z)|0)+Math.imul(E,Z)|0,c=c+Math.imul(E,z)|0,r=r+Math.imul(w,$)|0,o=(o=o+Math.imul(w,ee)|0)+Math.imul(_,$)|0,c=c+Math.imul(_,ee)|0,r=r+Math.imul(v,ne)|0,o=(o=o+Math.imul(v,re)|0)+Math.imul(y,ne)|0,c=c+Math.imul(y,re)|0;var Ee=(d+(r=r+Math.imul(h,ie)|0)|0)+((8191&(o=(o=o+Math.imul(h,ae)|0)+Math.imul(A,ie)|0))<<13)|0;d=((c=c+Math.imul(A,ae)|0)+(o>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(P,W),o=(o=Math.imul(P,Y))+Math.imul(x,W)|0,c=Math.imul(x,Y),r=r+Math.imul(k,Z)|0,o=(o=o+Math.imul(k,z)|0)+Math.imul(O,Z)|0,c=c+Math.imul(O,z)|0,r=r+Math.imul(S,$)|0,o=(o=o+Math.imul(S,ee)|0)+Math.imul(E,$)|0,c=c+Math.imul(E,ee)|0,r=r+Math.imul(w,ne)|0,o=(o=o+Math.imul(w,re)|0)+Math.imul(_,ne)|0,c=c+Math.imul(_,re)|0,r=r+Math.imul(v,ie)|0,o=(o=o+Math.imul(v,ae)|0)+Math.imul(y,ie)|0,c=c+Math.imul(y,ae)|0;var Be=(d+(r=r+Math.imul(h,ce)|0)|0)+((8191&(o=(o=o+Math.imul(h,ue)|0)+Math.imul(A,ce)|0))<<13)|0;d=((c=c+Math.imul(A,ue)|0)+(o>>>13)|0)+(Be>>>26)|0,Be&=67108863,r=Math.imul(Q,W),o=(o=Math.imul(Q,Y))+Math.imul(N,W)|0,c=Math.imul(N,Y),r=r+Math.imul(P,Z)|0,o=(o=o+Math.imul(P,z)|0)+Math.imul(x,Z)|0,c=c+Math.imul(x,z)|0,r=r+Math.imul(k,$)|0,o=(o=o+Math.imul(k,ee)|0)+Math.imul(O,$)|0,c=c+Math.imul(O,ee)|0,r=r+Math.imul(S,ne)|0,o=(o=o+Math.imul(S,re)|0)+Math.imul(E,ne)|0,c=c+Math.imul(E,re)|0,r=r+Math.imul(w,ie)|0,o=(o=o+Math.imul(w,ae)|0)+Math.imul(_,ie)|0,c=c+Math.imul(_,ae)|0,r=r+Math.imul(v,ce)|0,o=(o=o+Math.imul(v,ue)|0)+Math.imul(y,ce)|0,c=c+Math.imul(y,ue)|0;var ke=(d+(r=r+Math.imul(h,de)|0)|0)+((8191&(o=(o=o+Math.imul(h,fe)|0)+Math.imul(A,de)|0))<<13)|0;d=((c=c+Math.imul(A,fe)|0)+(o>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(T,W),o=(o=Math.imul(T,Y))+Math.imul(j,W)|0,c=Math.imul(j,Y),r=r+Math.imul(Q,Z)|0,o=(o=o+Math.imul(Q,z)|0)+Math.imul(N,Z)|0,c=c+Math.imul(N,z)|0,r=r+Math.imul(P,$)|0,o=(o=o+Math.imul(P,ee)|0)+Math.imul(x,$)|0,c=c+Math.imul(x,ee)|0,r=r+Math.imul(k,ne)|0,o=(o=o+Math.imul(k,re)|0)+Math.imul(O,ne)|0,c=c+Math.imul(O,re)|0,r=r+Math.imul(S,ie)|0,o=(o=o+Math.imul(S,ae)|0)+Math.imul(E,ie)|0,c=c+Math.imul(E,ae)|0,r=r+Math.imul(w,ce)|0,o=(o=o+Math.imul(w,ue)|0)+Math.imul(_,ce)|0,c=c+Math.imul(_,ue)|0,r=r+Math.imul(v,de)|0,o=(o=o+Math.imul(v,fe)|0)+Math.imul(y,de)|0,c=c+Math.imul(y,fe)|0;var Oe=(d+(r=r+Math.imul(h,pe)|0)|0)+((8191&(o=(o=o+Math.imul(h,ge)|0)+Math.imul(A,pe)|0))<<13)|0;d=((c=c+Math.imul(A,ge)|0)+(o>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,r=Math.imul(J,W),o=(o=Math.imul(J,Y))+Math.imul(H,W)|0,c=Math.imul(H,Y),r=r+Math.imul(T,Z)|0,o=(o=o+Math.imul(T,z)|0)+Math.imul(j,Z)|0,c=c+Math.imul(j,z)|0,r=r+Math.imul(Q,$)|0,o=(o=o+Math.imul(Q,ee)|0)+Math.imul(N,$)|0,c=c+Math.imul(N,ee)|0,r=r+Math.imul(P,ne)|0,o=(o=o+Math.imul(P,re)|0)+Math.imul(x,ne)|0,c=c+Math.imul(x,re)|0,r=r+Math.imul(k,ie)|0,o=(o=o+Math.imul(k,ae)|0)+Math.imul(O,ie)|0,c=c+Math.imul(O,ae)|0,r=r+Math.imul(S,ce)|0,o=(o=o+Math.imul(S,ue)|0)+Math.imul(E,ce)|0,c=c+Math.imul(E,ue)|0,r=r+Math.imul(w,de)|0,o=(o=o+Math.imul(w,fe)|0)+Math.imul(_,de)|0,c=c+Math.imul(_,fe)|0,r=r+Math.imul(v,pe)|0,o=(o=o+Math.imul(v,ge)|0)+Math.imul(y,pe)|0,c=c+Math.imul(y,ge)|0;var Re=(d+(r=r+Math.imul(h,me)|0)|0)+((8191&(o=(o=o+Math.imul(h,ve)|0)+Math.imul(A,me)|0))<<13)|0;d=((c=c+Math.imul(A,ve)|0)+(o>>>13)|0)+(Re>>>26)|0,Re&=67108863,r=Math.imul(L,W),o=(o=Math.imul(L,Y))+Math.imul(G,W)|0,c=Math.imul(G,Y),r=r+Math.imul(J,Z)|0,o=(o=o+Math.imul(J,z)|0)+Math.imul(H,Z)|0,c=c+Math.imul(H,z)|0,r=r+Math.imul(T,$)|0,o=(o=o+Math.imul(T,ee)|0)+Math.imul(j,$)|0,c=c+Math.imul(j,ee)|0,r=r+Math.imul(Q,ne)|0,o=(o=o+Math.imul(Q,re)|0)+Math.imul(N,ne)|0,c=c+Math.imul(N,re)|0,r=r+Math.imul(P,ie)|0,o=(o=o+Math.imul(P,ae)|0)+Math.imul(x,ie)|0,c=c+Math.imul(x,ae)|0,r=r+Math.imul(k,ce)|0,o=(o=o+Math.imul(k,ue)|0)+Math.imul(O,ce)|0,c=c+Math.imul(O,ue)|0,r=r+Math.imul(S,de)|0,o=(o=o+Math.imul(S,fe)|0)+Math.imul(E,de)|0,c=c+Math.imul(E,fe)|0,r=r+Math.imul(w,pe)|0,o=(o=o+Math.imul(w,ge)|0)+Math.imul(_,pe)|0,c=c+Math.imul(_,ge)|0,r=r+Math.imul(v,me)|0,o=(o=o+Math.imul(v,ve)|0)+Math.imul(y,me)|0,c=c+Math.imul(y,ve)|0;var Pe=(d+(r=r+Math.imul(h,be)|0)|0)+((8191&(o=(o=o+Math.imul(h,Ie)|0)+Math.imul(A,be)|0))<<13)|0;d=((c=c+Math.imul(A,Ie)|0)+(o>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,r=Math.imul(L,Z),o=(o=Math.imul(L,z))+Math.imul(G,Z)|0,c=Math.imul(G,z),r=r+Math.imul(J,$)|0,o=(o=o+Math.imul(J,ee)|0)+Math.imul(H,$)|0,c=c+Math.imul(H,ee)|0,r=r+Math.imul(T,ne)|0,o=(o=o+Math.imul(T,re)|0)+Math.imul(j,ne)|0,c=c+Math.imul(j,re)|0,r=r+Math.imul(Q,ie)|0,o=(o=o+Math.imul(Q,ae)|0)+Math.imul(N,ie)|0,c=c+Math.imul(N,ae)|0,r=r+Math.imul(P,ce)|0,o=(o=o+Math.imul(P,ue)|0)+Math.imul(x,ce)|0,c=c+Math.imul(x,ue)|0,r=r+Math.imul(k,de)|0,o=(o=o+Math.imul(k,fe)|0)+Math.imul(O,de)|0,c=c+Math.imul(O,fe)|0,r=r+Math.imul(S,pe)|0,o=(o=o+Math.imul(S,ge)|0)+Math.imul(E,pe)|0,c=c+Math.imul(E,ge)|0,r=r+Math.imul(w,me)|0,o=(o=o+Math.imul(w,ve)|0)+Math.imul(_,me)|0,c=c+Math.imul(_,ve)|0;var xe=(d+(r=r+Math.imul(v,be)|0)|0)+((8191&(o=(o=o+Math.imul(v,Ie)|0)+Math.imul(y,be)|0))<<13)|0;d=((c=c+Math.imul(y,Ie)|0)+(o>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(L,$),o=(o=Math.imul(L,ee))+Math.imul(G,$)|0,c=Math.imul(G,ee),r=r+Math.imul(J,ne)|0,o=(o=o+Math.imul(J,re)|0)+Math.imul(H,ne)|0,c=c+Math.imul(H,re)|0,r=r+Math.imul(T,ie)|0,o=(o=o+Math.imul(T,ae)|0)+Math.imul(j,ie)|0,c=c+Math.imul(j,ae)|0,r=r+Math.imul(Q,ce)|0,o=(o=o+Math.imul(Q,ue)|0)+Math.imul(N,ce)|0,c=c+Math.imul(N,ue)|0,r=r+Math.imul(P,de)|0,o=(o=o+Math.imul(P,fe)|0)+Math.imul(x,de)|0,c=c+Math.imul(x,fe)|0,r=r+Math.imul(k,pe)|0,o=(o=o+Math.imul(k,ge)|0)+Math.imul(O,pe)|0,c=c+Math.imul(O,ge)|0,r=r+Math.imul(S,me)|0,o=(o=o+Math.imul(S,ve)|0)+Math.imul(E,me)|0,c=c+Math.imul(E,ve)|0;var Me=(d+(r=r+Math.imul(w,be)|0)|0)+((8191&(o=(o=o+Math.imul(w,Ie)|0)+Math.imul(_,be)|0))<<13)|0;d=((c=c+Math.imul(_,Ie)|0)+(o>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(L,ne),o=(o=Math.imul(L,re))+Math.imul(G,ne)|0,c=Math.imul(G,re),r=r+Math.imul(J,ie)|0,o=(o=o+Math.imul(J,ae)|0)+Math.imul(H,ie)|0,c=c+Math.imul(H,ae)|0,r=r+Math.imul(T,ce)|0,o=(o=o+Math.imul(T,ue)|0)+Math.imul(j,ce)|0,c=c+Math.imul(j,ue)|0,r=r+Math.imul(Q,de)|0,o=(o=o+Math.imul(Q,fe)|0)+Math.imul(N,de)|0,c=c+Math.imul(N,fe)|0,r=r+Math.imul(P,pe)|0,o=(o=o+Math.imul(P,ge)|0)+Math.imul(x,pe)|0,c=c+Math.imul(x,ge)|0,r=r+Math.imul(k,me)|0,o=(o=o+Math.imul(k,ve)|0)+Math.imul(O,me)|0,c=c+Math.imul(O,ve)|0;var Qe=(d+(r=r+Math.imul(S,be)|0)|0)+((8191&(o=(o=o+Math.imul(S,Ie)|0)+Math.imul(E,be)|0))<<13)|0;d=((c=c+Math.imul(E,Ie)|0)+(o>>>13)|0)+(Qe>>>26)|0,Qe&=67108863,r=Math.imul(L,ie),o=(o=Math.imul(L,ae))+Math.imul(G,ie)|0,c=Math.imul(G,ae),r=r+Math.imul(J,ce)|0,o=(o=o+Math.imul(J,ue)|0)+Math.imul(H,ce)|0,c=c+Math.imul(H,ue)|0,r=r+Math.imul(T,de)|0,o=(o=o+Math.imul(T,fe)|0)+Math.imul(j,de)|0,c=c+Math.imul(j,fe)|0,r=r+Math.imul(Q,pe)|0,o=(o=o+Math.imul(Q,ge)|0)+Math.imul(N,pe)|0,c=c+Math.imul(N,ge)|0,r=r+Math.imul(P,me)|0,o=(o=o+Math.imul(P,ve)|0)+Math.imul(x,me)|0,c=c+Math.imul(x,ve)|0;var Ne=(d+(r=r+Math.imul(k,be)|0)|0)+((8191&(o=(o=o+Math.imul(k,Ie)|0)+Math.imul(O,be)|0))<<13)|0;d=((c=c+Math.imul(O,Ie)|0)+(o>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,r=Math.imul(L,ce),o=(o=Math.imul(L,ue))+Math.imul(G,ce)|0,c=Math.imul(G,ue),r=r+Math.imul(J,de)|0,o=(o=o+Math.imul(J,fe)|0)+Math.imul(H,de)|0,c=c+Math.imul(H,fe)|0,r=r+Math.imul(T,pe)|0,o=(o=o+Math.imul(T,ge)|0)+Math.imul(j,pe)|0,c=c+Math.imul(j,ge)|0,r=r+Math.imul(Q,me)|0,o=(o=o+Math.imul(Q,ve)|0)+Math.imul(N,me)|0,c=c+Math.imul(N,ve)|0;var De=(d+(r=r+Math.imul(P,be)|0)|0)+((8191&(o=(o=o+Math.imul(P,Ie)|0)+Math.imul(x,be)|0))<<13)|0;d=((c=c+Math.imul(x,Ie)|0)+(o>>>13)|0)+(De>>>26)|0,De&=67108863,r=Math.imul(L,de),o=(o=Math.imul(L,fe))+Math.imul(G,de)|0,c=Math.imul(G,fe),r=r+Math.imul(J,pe)|0,o=(o=o+Math.imul(J,ge)|0)+Math.imul(H,pe)|0,c=c+Math.imul(H,ge)|0,r=r+Math.imul(T,me)|0,o=(o=o+Math.imul(T,ve)|0)+Math.imul(j,me)|0,c=c+Math.imul(j,ve)|0;var Te=(d+(r=r+Math.imul(Q,be)|0)|0)+((8191&(o=(o=o+Math.imul(Q,Ie)|0)+Math.imul(N,be)|0))<<13)|0;d=((c=c+Math.imul(N,Ie)|0)+(o>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(L,pe),o=(o=Math.imul(L,ge))+Math.imul(G,pe)|0,c=Math.imul(G,ge),r=r+Math.imul(J,me)|0,o=(o=o+Math.imul(J,ve)|0)+Math.imul(H,me)|0,c=c+Math.imul(H,ve)|0;var je=(d+(r=r+Math.imul(T,be)|0)|0)+((8191&(o=(o=o+Math.imul(T,Ie)|0)+Math.imul(j,be)|0))<<13)|0;d=((c=c+Math.imul(j,Ie)|0)+(o>>>13)|0)+(je>>>26)|0,je&=67108863,r=Math.imul(L,me),o=(o=Math.imul(L,ve))+Math.imul(G,me)|0,c=Math.imul(G,ve);var Ue=(d+(r=r+Math.imul(J,be)|0)|0)+((8191&(o=(o=o+Math.imul(J,Ie)|0)+Math.imul(H,be)|0))<<13)|0;d=((c=c+Math.imul(H,Ie)|0)+(o>>>13)|0)+(Ue>>>26)|0,Ue&=67108863;var Je=(d+(r=Math.imul(L,be))|0)+((8191&(o=(o=Math.imul(L,Ie))+Math.imul(G,be)|0))<<13)|0;return d=((c=Math.imul(G,Ie))+(o>>>13)|0)+(Je>>>26)|0,Je&=67108863,l[0]=we,l[1]=_e,l[2]=Ce,l[3]=Se,l[4]=Ee,l[5]=Be,l[6]=ke,l[7]=Oe,l[8]=Re,l[9]=Pe,l[10]=xe,l[11]=Me,l[12]=Qe,l[13]=Ne,l[14]=De,l[15]=Te,l[16]=je,l[17]=Ue,l[18]=Je,0!==d&&(l[19]=d,n.length++),n};function C(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,o=0,c=0;c>>26)|0)>>>26,l&=67108863}n.words[c]=d,r=l,l=o}return 0!==r?n.words[c]=r:n.length--,n._strip()}function S(e,t,n){return C(e,t,n)}function E(e,t){this.x=e,this.y=t}Math.imul||(_=w),c.prototype.mulTo=function(e,t){var n=this.length+e.length;return 10===this.length&&10===e.length?_(this,e,t):n<63?w(this,e,t):n<1024?C(this,e,t):S(this,e,t)},E.prototype.makeRBT=function(e){for(var t=new Array(e),n=c.prototype._countBits(e)-1,i=0;i>=1;return r},E.prototype.permute=function(e,t,n,r,o,c){for(var i=0;i>>=1)i++;return 1<>>=13,n[2*i+1]=8191&c,c>>>=13;for(i=2*t;i>=26,n+=o/67108864|0,n+=c>>>26,this.words[i]=67108863&c}return 0!==n&&(this.words[i]=n,this.length++),t?this.ineg():this},c.prototype.muln=function(e){return this.clone().imuln(e)},c.prototype.sqr=function(){return this.mul(this)},c.prototype.isqr=function(){return this.imul(this.clone())},c.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n>>o&1}return t}(e);if(0===t.length)return new c(1);for(var n=this,i=0;i=0);var i,t=e%26,s=(e-t)/26,n=67108863>>>26-t<<26-t;if(0!==t){var o=0;for(i=0;i>>26-t}o&&(this.words[i]=o,this.length++)}if(0!==s){for(i=this.length-1;i>=0;i--)this.words[i+s]=this.words[i];for(i=0;i=0),o=t?(t-t%26)/26:0;var c=e%26,s=Math.min((e-c)/26,this.length),mask=67108863^67108863>>>c<s)for(this.length-=s,i=0;i=0&&(0!==d||i>=o);i--){var f=0|this.words[i];this.words[i]=d<<26-c|f>>>c,d=f&mask}return l&&0!==d&&(l.words[l.length++]=d),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},c.prototype.ishrn=function(e,t,n){return r(0===this.negative),this.iushrn(e,t,n)},c.prototype.shln=function(e){return this.clone().ishln(e)},c.prototype.ushln=function(e){return this.clone().iushln(e)},c.prototype.shrn=function(e){return this.clone().ishrn(e)},c.prototype.ushrn=function(e){return this.clone().iushrn(e)},c.prototype.testn=function(e){r("number"==typeof e&&e>=0);var t=e%26,s=(e-t)/26,q=1<=0);var t=e%26,s=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=s)return this;if(0!==t&&s++,this.length=Math.min(s,this.length),0!==t){var mask=67108863^67108863>>>t<=67108864;i++)this.words[i]-=67108864,i===this.length-1?this.words[i+1]=1:this.words[i+1]++;return this.length=Math.max(this.length,i+1),this},c.prototype.isubn=function(e){if(r("number"==typeof e),r(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 i=0;i>26)-(d/67108864|0),this.words[i+n]=67108863&o}for(;i>26,this.words[i+n]=67108863&o;if(0===l)return this._strip();for(r(-1===l),l=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},c.prototype._wordDiv=function(e,t){var n=(this.length,e.length),a=this.clone(),b=e,r=0|b.words[b.length-1];0!==(n=26-this._countBits(r))&&(b=b.ushln(n),a.iushln(n),r=0|b.words[b.length-1]);var q,o=a.length-b.length;if("mod"!==t){(q=new c(null)).length=o+1,q.words=new Array(q.length);for(var i=0;i=0;d--){var f=67108864*(0|a.words[b.length+d])+(0|a.words[b.length+d-1]);for(f=Math.min(f/r|0,67108863),a._ishlnsubmul(b,f,d);0!==a.negative;)f--,a.negative=0,a._ishlnsubmul(b,1,d),a.isZero()||(a.negative^=1);q&&(q.words[d]=f)}return q&&q._strip(),a._strip(),"div"!==t&&0!==n&&a.iushrn(n),{div:q||null,mod:a}},c.prototype.divmod=function(e,t,n){return r(!e.isZero()),this.isZero()?{div:new c(0),mod:new c(0)}:0!==this.negative&&0===e.negative?(l=this.neg().divmod(e,t),"mod"!==t&&(div=l.div.neg()),"div"!==t&&(o=l.mod.neg(),n&&0!==o.negative&&o.iadd(e)),{div:div,mod:o}):0===this.negative&&0!==e.negative?(l=this.divmod(e.neg(),t),"mod"!==t&&(div=l.div.neg()),{div:div,mod:l.mod}):0!=(this.negative&e.negative)?(l=this.neg().divmod(e.neg(),t),"div"!==t&&(o=l.mod.neg(),n&&0!==o.negative&&o.isub(e)),{div:l.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new c(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new c(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new c(this.modrn(e.words[0]))}:this._wordDiv(e,t);var div,o,l},c.prototype.div=function(e){return this.divmod(e,"div",!1).div},c.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},c.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},c.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),o=e.andln(1),c=n.cmp(r);return c<0||1===o&&0===c?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},c.prototype.modrn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var p=(1<<26)%e,n=0,i=this.length-1;i>=0;i--)n=(p*n+(0|this.words[i]))%e;return t?-n:n},c.prototype.modn=function(e){return this.modrn(e)},c.prototype.idivn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var n=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*n;this.words[i]=o/e|0,n=o%e}return this._strip(),t?this.ineg():this},c.prototype.divn=function(e){return this.clone().idivn(e)},c.prototype.egcd=function(p){r(0===p.negative),r(!p.isZero());var e=this,t=p.clone();e=0!==e.negative?e.umod(p):e.clone();for(var n=new c(1),o=new c(0),l=new c(0),d=new c(1),g=0;e.isEven()&&t.isEven();)e.iushrn(1),t.iushrn(1),++g;for(var f=t.clone(),h=e.clone();!e.isZero();){for(var i=0,A=1;0==(e.words[0]&A)&&i<26;++i,A<<=1);if(i>0)for(e.iushrn(i);i-- >0;)(n.isOdd()||o.isOdd())&&(n.iadd(f),o.isub(h)),n.iushrn(1),o.iushrn(1);for(var m=0,v=1;0==(t.words[0]&v)&&m<26;++m,v<<=1);if(m>0)for(t.iushrn(m);m-- >0;)(l.isOdd()||d.isOdd())&&(l.iadd(f),d.isub(h)),l.iushrn(1),d.iushrn(1);e.cmp(t)>=0?(e.isub(t),n.isub(l),o.isub(d)):(t.isub(e),l.isub(n),d.isub(o))}return{a:l,b:d,gcd:t.iushln(g)}},c.prototype._invmp=function(p){r(0===p.negative),r(!p.isZero());var a=this,b=p.clone();a=0!==a.negative?a.umod(p):a.clone();for(var e,t=new c(1),n=new c(0),o=b.clone();a.cmpn(1)>0&&b.cmpn(1)>0;){for(var i=0,l=1;0==(a.words[0]&l)&&i<26;++i,l<<=1);if(i>0)for(a.iushrn(i);i-- >0;)t.isOdd()&&t.iadd(o),t.iushrn(1);for(var d=0,f=1;0==(b.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(b.iushrn(d);d-- >0;)n.isOdd()&&n.iadd(o),n.iushrn(1);a.cmp(b)>=0?(a.isub(b),t.isub(n)):(b.isub(a),n.isub(t))}return(e=0===a.cmpn(1)?t:n).cmpn(0)<0&&e.iadd(p),e},c.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var a=this.clone(),b=e.clone();a.negative=0,b.negative=0;for(var t=0;a.isEven()&&b.isEven();t++)a.iushrn(1),b.iushrn(1);for(;;){for(;a.isEven();)a.iushrn(1);for(;b.isEven();)b.iushrn(1);var n=a.cmp(b);if(n<0){var r=a;a=b,b=r}else if(0===n||0===b.cmpn(1))break;a.isub(b)}return b.iushln(t)},c.prototype.invm=function(e){return this.egcd(e).a.umod(e)},c.prototype.isEven=function(){return 0==(1&this.words[0])},c.prototype.isOdd=function(){return 1==(1&this.words[0])},c.prototype.andln=function(e){return this.words[0]&e},c.prototype.bincn=function(e){r("number"==typeof e);var t=e%26,s=(e-t)/26,q=1<>>26,o&=67108863,this.words[i]=o}return 0!==n&&(this.words[i]=n,this.length++),this},c.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},c.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this._strip(),this.length>1)t=1;else{n&&(e=-e),r(e<=67108863,"Number is too big");var o=0|this.words[0];t=o===e?0:oe.length)return 1;if(this.length=0;i--){var a=0|this.words[i],b=0|e.words[i];if(a!==b){ab&&(t=1);break}}return t},c.prototype.gtn=function(e){return 1===this.cmpn(e)},c.prototype.gt=function(e){return 1===this.cmp(e)},c.prototype.gten=function(e){return this.cmpn(e)>=0},c.prototype.gte=function(e){return this.cmp(e)>=0},c.prototype.ltn=function(e){return-1===this.cmpn(e)},c.prototype.lt=function(e){return-1===this.cmp(e)},c.prototype.lten=function(e){return this.cmpn(e)<=0},c.prototype.lte=function(e){return this.cmp(e)<=0},c.prototype.eqn=function(e){return 0===this.cmpn(e)},c.prototype.eq=function(e){return 0===this.cmp(e)},c.red=function(e){return new M(e)},c.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},c.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},c.prototype._forceRed=function(e){return this.red=e,this},c.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},c.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},c.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},c.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},c.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},c.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},c.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},c.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},c.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},c.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},c.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},c.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},c.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},c.prototype.redPow=function(e){return r(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 k(e,p){this.name=e,this.p=new c(p,16),this.n=this.p.bitLength(),this.k=new c(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 R(){k.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function P(){k.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function x(){k.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(e){if("string"==typeof e){var t=c._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function Q(e){M.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new c(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 c(null);return e.words=new Array(Math.ceil(this.n/13)),e},k.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},k.prototype.split=function(input,e){input.iushrn(this.n,0,e)},k.prototype.imulK=function(e){return e.imul(this.k)},o(O,k),O.prototype.split=function(input,output){for(var mask=4194303,e=Math.min(input.length,9),i=0;i>>22,t=n}t>>>=22,input.words[i-10]=t,0===t&&input.length>10?input.length-=10:input.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,i=0;i>>=26,e.words[i]=r,t=n}return 0!==t&&(e.words[e.length++]=t),e},c._prime=function(e){if(B[e])return B[e];var t;if("k256"===e)t=new O;else if("p224"===e)t=new R;else if("p192"===e)t=new P;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new x}return B[e]=t,t},M.prototype._verify1=function(a){r(0===a.negative,"red works only with positives"),r(a.red,"red works only with red numbers")},M.prototype._verify2=function(a,b){r(0==(a.negative|b.negative),"red works only with positives"),r(a.red&&a.red===b.red,"red works only with red numbers")},M.prototype.imod=function(a){return this.prime?this.prime.ireduce(a)._forceRed(this):(A(a,a.umod(this.m)._forceRed(this)),a)},M.prototype.neg=function(a){return a.isZero()?a.clone():this.m.sub(a)._forceRed(this)},M.prototype.add=function(a,b){this._verify2(a,b);var e=a.add(b);return e.cmp(this.m)>=0&&e.isub(this.m),e._forceRed(this)},M.prototype.iadd=function(a,b){this._verify2(a,b);var e=a.iadd(b);return e.cmp(this.m)>=0&&e.isub(this.m),e},M.prototype.sub=function(a,b){this._verify2(a,b);var e=a.sub(b);return e.cmpn(0)<0&&e.iadd(this.m),e._forceRed(this)},M.prototype.isub=function(a,b){this._verify2(a,b);var e=a.isub(b);return e.cmpn(0)<0&&e.iadd(this.m),e},M.prototype.shl=function(a,e){return this._verify1(a),this.imod(a.ushln(e))},M.prototype.imul=function(a,b){return this._verify2(a,b),this.imod(a.imul(b))},M.prototype.mul=function(a,b){return this._verify2(a,b),this.imod(a.mul(b))},M.prototype.isqr=function(a){return this.imul(a,a.clone())},M.prototype.sqr=function(a){return this.mul(a,a)},M.prototype.sqrt=function(a){if(a.isZero())return a.clone();var e=this.m.andln(3);if(r(e%2==1),3===e){var t=this.m.add(new c(1)).iushrn(2);return this.pow(a,t)}for(var q=this.m.subn(1),s=0;!q.isZero()&&0===q.andln(1);)s++,q.iushrn(1);r(!q.isZero());var n=new c(1).toRed(this),o=n.redNeg(),l=this.m.subn(1).iushrn(1),d=this.m.bitLength();for(d=new c(2*d*d).toRed(this);0!==this.pow(d,l).cmp(o);)d.redIAdd(o);for(var f=this.pow(d,q),h=this.pow(a,q.addn(1).iushrn(1)),A=this.pow(a,q),m=s;0!==A.cmp(n);){for(var v=A,i=0;0!==v.cmp(n);i++)v=v.redSqr();r(i=0;i--){for(var d=e.words[i],f=l-1;f>=0;f--){var h=d>>f&1;n!==t[0]&&(n=this.sqr(n)),0!==h||0!==r?(r<<=1,r|=h,(4===++o||0===i&&0===f)&&(n=this.mul(n,t[r]),o=0,r=0)):o=0}l=26}return n},M.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},M.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},c.mont=function(e){return new Q(e)},o(Q,M),Q.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},Q.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},Q.prototype.imul=function(a,b){if(a.isZero()||b.isZero())return a.words[0]=0,a.length=1,a;var e=a.imul(b),t=e.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),u=e.isub(t).iushrn(this.shift),n=u;return u.cmp(this.m)>=0?n=u.isub(this.m):u.cmpn(0)<0&&(n=u.iadd(this.m)),n._forceRed(this)},Q.prototype.mul=function(a,b){if(a.isZero()||b.isZero())return new c(0)._forceRed(this);var e=a.mul(b),t=e.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),u=e.isub(t).iushrn(this.shift),n=u;return u.cmp(this.m)>=0?n=u.isub(this.m):u.cmpn(0)<0&&(n=u.iadd(this.m)),n._forceRed(this)},Q.prototype.invm=function(a){return this.imod(a._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)}).call(this,n(113)(e))},function(e,t,n){"use strict";function r(e){let t=0;for(const n of e){if(0!==n)break;t++}return e.slice(t)}Object.defineProperty(t,"__esModule",{value:!0}),t.ExtendedSecp256k1Signature=t.Secp256k1Signature=void 0;class o{constructor(e,s){if(e.length>32||0===e.length||0===e[0])throw new Error("Unsigned integer r must be encoded as unpadded big endian.");if(s.length>32||0===s.length||0===s[0])throw new Error("Unsigned integer s must be encoded as unpadded big endian.");this.data={r:e,s:s}}static fromFixedLength(data){if(64!==data.length)throw new Error(`Got invalid data length: ${data.length}. Expected 2x 32 bytes for the pair (r, s)`);return new o(r(data.slice(0,32)),r(data.slice(32,64)))}static fromDer(data){let e=0;if(48!==data[e++])throw new Error("Prefix 0x30 expected");const t=data[e++];if(data.length-e!==t)throw new Error("Data length mismatch detected");if(2!==data[e++])throw new Error("INTEGER tag expected");const n=data[e++];if(n>=128)throw new Error("Decoding length values above 127 not supported");const c=data.slice(e,e+n);e+=n;if(2!==data[e++])throw new Error("INTEGER tag expected");const l=data[e++];if(l>=128)throw new Error("Decoding length values above 127 not supported");const d=data.slice(e,e+l);return e+=l,new o(r(c),r(d))}r(e){if(void 0===e)return this.data.r;{const t=e-this.data.r.length;if(t<0)throw new Error("Length too small to hold parameter r");const n=new Uint8Array(t);return new Uint8Array([...n,...this.data.r])}}s(e){if(void 0===e)return this.data.s;{const t=e-this.data.s.length;if(t<0)throw new Error("Length too small to hold parameter s");const n=new Uint8Array(t);return new Uint8Array([...n,...this.data.s])}}toFixedLength(){return new Uint8Array([...this.r(32),...this.s(32)])}toDer(){const 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,n=e.length,r=t.length,data=new Uint8Array([2,n,...e,2,r,...t]);return new Uint8Array([48,data.length,...data])}}t.Secp256k1Signature=o;class c extends o{constructor(e,s,t){if(super(e,s),!Number.isInteger(t))throw new Error("The recovery parameter must be an integer.");if(t<0||t>4)throw new Error("The recovery parameter must be one of 0, 1, 2, 3.");this.recovery=t}static fromFixedLength(data){if(65!==data.length)throw new Error(`Got invalid data length ${data.length}. Expected 32 + 32 + 1`);return new c(r(data.slice(0,32)),r(data.slice(32,64)),data[64])}toFixedLength(){return new Uint8Array([...this.r(32),...this.s(32),this.recovery])}}t.ExtendedSecp256k1Signature=c},function(e,t,n){(function(e){!function(e,t){"use strict";function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function o(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function c(e,base,t){if(c.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==base&&"be"!==base||(t=base,base=10),this._init(e||0,base||10,t||"be"))}var l;"object"==typeof e?e.exports=c:t.BN=c,c.BN=c,c.wordSize=26;try{l="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:n(730).Buffer}catch(e){}function d(e,t){var n=e.charCodeAt(t);return n>=48&&n<=57?n-48:n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:void r(!1,"Invalid character in "+e)}function f(e,t,n){var r=d(e,n);return n-1>=t&&(r|=d(e,n-1)<<4),r}function h(e,t,n,o){for(var c=0,b=0,l=Math.min(e.length,n),i=t;i=49?d-49+10:d>=17?d-17+10:d,r(d>=0&&b0?e:t},c.min=function(e,t){return e.cmp(t)<0?e:t},c.prototype._init=function(e,base,t){if("number"==typeof e)return this._initNumber(e,base,t);if("object"==typeof e)return this._initArray(e,base,t);"hex"===base&&(base=16),r(base===(0|base)&&base>=2&&base<=36);var n=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n=0;i-=3)o=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[n]|=o<>>26-c&67108863,(c+=24)>=26&&(c-=26,n++);else if("le"===t)for(i=0,n=0;i>>26-c&67108863,(c+=24)>=26&&(c-=26,n++);return this._strip()},c.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var i=0;i=t;i-=2)r=f(e,t,i)<=18?(o-=18,c+=1,this.words[c]|=r>>>26):o+=8;else for(i=(e.length-t)%2==0?t+1:t;i=18?(o-=18,c+=1,this.words[c]|=r>>>26):o+=8;this._strip()},c.prototype._parseBase=function(e,base,t){this.words=[0],this.length=1;for(var n=0,r=1;r<=67108863;r*=base)n++;n--,r=r/base|0;for(var o=e.length-t,c=o%n,l=Math.min(o,o-c)+t,d=0,i=t;i1&&0===this.words[this.length-1];)this.length--;return this._normSign()},c.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{c.prototype[Symbol.for("nodejs.util.inspect.custom")]=m}catch(e){c.prototype.inspect=m}else c.prototype.inspect=m;function m(){return(this.red?""}var v=["","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"],y=[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],I=[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];c.prototype.toString=function(base,e){var t;if(e=0|e||1,16===(base=base||10)||"hex"===base){t="";for(var n=0,o=0,i=0;i>>24-n&16777215,(n+=2)>=26&&(n-=26,i--),t=0!==o||i!==this.length-1?v[6-l.length]+l+t:l+t}for(0!==o&&(t=o.toString(16)+t);t.length%e!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t}if(base===(0|base)&&base>=2&&base<=36){var d=y[base],f=I[base];t="";var h=this.clone();for(h.negative=0;!h.isZero();){var A=h.modrn(f).toString(base);t=(h=h.idivn(f)).isZero()?A+t:v[d-A.length]+A+t}for(this.isZero()&&(t="0"+t);t.length%e!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t}r(!1,"Base should be between 2 and 36")},c.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&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},c.prototype.toJSON=function(){return this.toString(16,2)},l&&(c.prototype.toBuffer=function(e,t){return this.toArrayLike(l,e,t)}),c.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};function w(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var a=0|e.words[0],b=0|t.words[0],o=a*b,c=67108863&o,l=o/67108864|0;n.words[0]=c;for(var d=1;d>>26,h=67108863&l,A=Math.min(d,t.length-1),m=Math.max(0,d-e.length+1);m<=A;m++){var i=d-m|0;f+=(o=(a=0|e.words[i])*(b=0|t.words[m])+h)/67108864|0,h=67108863&o}n.words[d]=0|h,l=0|f}return 0!==l?n.words[d]=0|l:n.length--,n._strip()}c.prototype.toArrayLike=function(e,t,n){this._strip();var o=this.byteLength(),c=n||Math.max(1,o);r(o<=c,"byte array longer than desired length"),r(c>0,"Requested array length <= 0");var l=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,c);return this["_toArrayLike"+("le"===t?"LE":"BE")](l,o),l},c.prototype._toArrayLikeLE=function(e,t){for(var n=0,r=0,i=0,o=0;i>8&255),n>16&255),6===o?(n>24&255),r=0,o=0):(r=c>>>24,o+=2)}if(n=0&&(e[n--]=c>>8&255),n>=0&&(e[n--]=c>>16&255),6===o?(n>=0&&(e[n--]=c>>24&255),r=0,o=0):(r=c>>>24,o+=2)}if(n>=0)for(e[n--]=r;n>=0;)e[n--]=0},Math.clz32?c.prototype._countBits=function(e){return 32-Math.clz32(e)}:c.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},c.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 0==(8191&t)&&(n+=13,t>>>=13),0==(127&t)&&(n+=7,t>>>=7),0==(15&t)&&(n+=4,t>>>=4),0==(3&t)&&(n+=2,t>>>=2),0==(1&t)&&n++,n},c.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},c.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,i=0;ie.length?this.clone().ior(e):e.clone().ior(this)},c.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},c.prototype.iuand=function(e){var b;b=this.length>e.length?e:this;for(var i=0;ie.length?this.clone().iand(e):e.clone().iand(this)},c.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},c.prototype.iuxor=function(e){var a,b;this.length>e.length?(a=this,b=e):(a=e,b=this);for(var i=0;ie.length?this.clone().ixor(e):e.clone().ixor(this)},c.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},c.prototype.inotn=function(e){r("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-n),this._strip()},c.prototype.notn=function(e){return this.clone().inotn(e)},c.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);var n=e/26|0,o=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<e.length?(a=this,b=e):(a=e,b=this);for(var n=0,i=0;i>>26;for(;0!==n&&i>>26;if(this.length=a.length,0!==n)this.words[this.length]=n,this.length++;else if(a!==this)for(;ie.length?this.clone().iadd(e):e.clone().iadd(this)},c.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var a,b,n=this.cmp(e);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(a=this,b=e):(a=e,b=this);for(var r=0,i=0;i>26,this.words[i]=67108863&t;for(;0!==r&&i>26,this.words[i]=67108863&t;if(0===r&&i>>13,m=0|a[1],v=8191&m,y=m>>>13,I=0|a[2],w=8191&I,_=I>>>13,C=0|a[3],S=8191&C,E=C>>>13,B=0|a[4],k=8191&B,O=B>>>13,R=0|a[5],P=8191&R,x=R>>>13,M=0|a[6],Q=8191&M,N=M>>>13,D=0|a[7],T=8191&D,j=D>>>13,U=0|a[8],J=8191&U,H=U>>>13,F=0|a[9],L=8191&F,G=F>>>13,V=0|b[0],W=8191&V,Y=V>>>13,K=0|b[1],Z=8191&K,z=K>>>13,X=0|b[2],$=8191&X,ee=X>>>13,te=0|b[3],ne=8191&te,re=te>>>13,oe=0|b[4],ie=8191&oe,ae=oe>>>13,se=0|b[5],ce=8191&se,ue=se>>>13,le=0|b[6],de=8191&le,fe=le>>>13,he=0|b[7],pe=8191&he,ge=he>>>13,Ae=0|b[8],me=8191&Ae,ve=Ae>>>13,ye=0|b[9],be=8191&ye,Ie=ye>>>13;n.negative=e.negative^t.negative,n.length=19;var we=(d+(r=Math.imul(h,W))|0)+((8191&(o=(o=Math.imul(h,Y))+Math.imul(A,W)|0))<<13)|0;d=((c=Math.imul(A,Y))+(o>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(v,W),o=(o=Math.imul(v,Y))+Math.imul(y,W)|0,c=Math.imul(y,Y);var _e=(d+(r=r+Math.imul(h,Z)|0)|0)+((8191&(o=(o=o+Math.imul(h,z)|0)+Math.imul(A,Z)|0))<<13)|0;d=((c=c+Math.imul(A,z)|0)+(o>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(w,W),o=(o=Math.imul(w,Y))+Math.imul(_,W)|0,c=Math.imul(_,Y),r=r+Math.imul(v,Z)|0,o=(o=o+Math.imul(v,z)|0)+Math.imul(y,Z)|0,c=c+Math.imul(y,z)|0;var Ce=(d+(r=r+Math.imul(h,$)|0)|0)+((8191&(o=(o=o+Math.imul(h,ee)|0)+Math.imul(A,$)|0))<<13)|0;d=((c=c+Math.imul(A,ee)|0)+(o>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(S,W),o=(o=Math.imul(S,Y))+Math.imul(E,W)|0,c=Math.imul(E,Y),r=r+Math.imul(w,Z)|0,o=(o=o+Math.imul(w,z)|0)+Math.imul(_,Z)|0,c=c+Math.imul(_,z)|0,r=r+Math.imul(v,$)|0,o=(o=o+Math.imul(v,ee)|0)+Math.imul(y,$)|0,c=c+Math.imul(y,ee)|0;var Se=(d+(r=r+Math.imul(h,ne)|0)|0)+((8191&(o=(o=o+Math.imul(h,re)|0)+Math.imul(A,ne)|0))<<13)|0;d=((c=c+Math.imul(A,re)|0)+(o>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(k,W),o=(o=Math.imul(k,Y))+Math.imul(O,W)|0,c=Math.imul(O,Y),r=r+Math.imul(S,Z)|0,o=(o=o+Math.imul(S,z)|0)+Math.imul(E,Z)|0,c=c+Math.imul(E,z)|0,r=r+Math.imul(w,$)|0,o=(o=o+Math.imul(w,ee)|0)+Math.imul(_,$)|0,c=c+Math.imul(_,ee)|0,r=r+Math.imul(v,ne)|0,o=(o=o+Math.imul(v,re)|0)+Math.imul(y,ne)|0,c=c+Math.imul(y,re)|0;var Ee=(d+(r=r+Math.imul(h,ie)|0)|0)+((8191&(o=(o=o+Math.imul(h,ae)|0)+Math.imul(A,ie)|0))<<13)|0;d=((c=c+Math.imul(A,ae)|0)+(o>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(P,W),o=(o=Math.imul(P,Y))+Math.imul(x,W)|0,c=Math.imul(x,Y),r=r+Math.imul(k,Z)|0,o=(o=o+Math.imul(k,z)|0)+Math.imul(O,Z)|0,c=c+Math.imul(O,z)|0,r=r+Math.imul(S,$)|0,o=(o=o+Math.imul(S,ee)|0)+Math.imul(E,$)|0,c=c+Math.imul(E,ee)|0,r=r+Math.imul(w,ne)|0,o=(o=o+Math.imul(w,re)|0)+Math.imul(_,ne)|0,c=c+Math.imul(_,re)|0,r=r+Math.imul(v,ie)|0,o=(o=o+Math.imul(v,ae)|0)+Math.imul(y,ie)|0,c=c+Math.imul(y,ae)|0;var Be=(d+(r=r+Math.imul(h,ce)|0)|0)+((8191&(o=(o=o+Math.imul(h,ue)|0)+Math.imul(A,ce)|0))<<13)|0;d=((c=c+Math.imul(A,ue)|0)+(o>>>13)|0)+(Be>>>26)|0,Be&=67108863,r=Math.imul(Q,W),o=(o=Math.imul(Q,Y))+Math.imul(N,W)|0,c=Math.imul(N,Y),r=r+Math.imul(P,Z)|0,o=(o=o+Math.imul(P,z)|0)+Math.imul(x,Z)|0,c=c+Math.imul(x,z)|0,r=r+Math.imul(k,$)|0,o=(o=o+Math.imul(k,ee)|0)+Math.imul(O,$)|0,c=c+Math.imul(O,ee)|0,r=r+Math.imul(S,ne)|0,o=(o=o+Math.imul(S,re)|0)+Math.imul(E,ne)|0,c=c+Math.imul(E,re)|0,r=r+Math.imul(w,ie)|0,o=(o=o+Math.imul(w,ae)|0)+Math.imul(_,ie)|0,c=c+Math.imul(_,ae)|0,r=r+Math.imul(v,ce)|0,o=(o=o+Math.imul(v,ue)|0)+Math.imul(y,ce)|0,c=c+Math.imul(y,ue)|0;var ke=(d+(r=r+Math.imul(h,de)|0)|0)+((8191&(o=(o=o+Math.imul(h,fe)|0)+Math.imul(A,de)|0))<<13)|0;d=((c=c+Math.imul(A,fe)|0)+(o>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(T,W),o=(o=Math.imul(T,Y))+Math.imul(j,W)|0,c=Math.imul(j,Y),r=r+Math.imul(Q,Z)|0,o=(o=o+Math.imul(Q,z)|0)+Math.imul(N,Z)|0,c=c+Math.imul(N,z)|0,r=r+Math.imul(P,$)|0,o=(o=o+Math.imul(P,ee)|0)+Math.imul(x,$)|0,c=c+Math.imul(x,ee)|0,r=r+Math.imul(k,ne)|0,o=(o=o+Math.imul(k,re)|0)+Math.imul(O,ne)|0,c=c+Math.imul(O,re)|0,r=r+Math.imul(S,ie)|0,o=(o=o+Math.imul(S,ae)|0)+Math.imul(E,ie)|0,c=c+Math.imul(E,ae)|0,r=r+Math.imul(w,ce)|0,o=(o=o+Math.imul(w,ue)|0)+Math.imul(_,ce)|0,c=c+Math.imul(_,ue)|0,r=r+Math.imul(v,de)|0,o=(o=o+Math.imul(v,fe)|0)+Math.imul(y,de)|0,c=c+Math.imul(y,fe)|0;var Oe=(d+(r=r+Math.imul(h,pe)|0)|0)+((8191&(o=(o=o+Math.imul(h,ge)|0)+Math.imul(A,pe)|0))<<13)|0;d=((c=c+Math.imul(A,ge)|0)+(o>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,r=Math.imul(J,W),o=(o=Math.imul(J,Y))+Math.imul(H,W)|0,c=Math.imul(H,Y),r=r+Math.imul(T,Z)|0,o=(o=o+Math.imul(T,z)|0)+Math.imul(j,Z)|0,c=c+Math.imul(j,z)|0,r=r+Math.imul(Q,$)|0,o=(o=o+Math.imul(Q,ee)|0)+Math.imul(N,$)|0,c=c+Math.imul(N,ee)|0,r=r+Math.imul(P,ne)|0,o=(o=o+Math.imul(P,re)|0)+Math.imul(x,ne)|0,c=c+Math.imul(x,re)|0,r=r+Math.imul(k,ie)|0,o=(o=o+Math.imul(k,ae)|0)+Math.imul(O,ie)|0,c=c+Math.imul(O,ae)|0,r=r+Math.imul(S,ce)|0,o=(o=o+Math.imul(S,ue)|0)+Math.imul(E,ce)|0,c=c+Math.imul(E,ue)|0,r=r+Math.imul(w,de)|0,o=(o=o+Math.imul(w,fe)|0)+Math.imul(_,de)|0,c=c+Math.imul(_,fe)|0,r=r+Math.imul(v,pe)|0,o=(o=o+Math.imul(v,ge)|0)+Math.imul(y,pe)|0,c=c+Math.imul(y,ge)|0;var Re=(d+(r=r+Math.imul(h,me)|0)|0)+((8191&(o=(o=o+Math.imul(h,ve)|0)+Math.imul(A,me)|0))<<13)|0;d=((c=c+Math.imul(A,ve)|0)+(o>>>13)|0)+(Re>>>26)|0,Re&=67108863,r=Math.imul(L,W),o=(o=Math.imul(L,Y))+Math.imul(G,W)|0,c=Math.imul(G,Y),r=r+Math.imul(J,Z)|0,o=(o=o+Math.imul(J,z)|0)+Math.imul(H,Z)|0,c=c+Math.imul(H,z)|0,r=r+Math.imul(T,$)|0,o=(o=o+Math.imul(T,ee)|0)+Math.imul(j,$)|0,c=c+Math.imul(j,ee)|0,r=r+Math.imul(Q,ne)|0,o=(o=o+Math.imul(Q,re)|0)+Math.imul(N,ne)|0,c=c+Math.imul(N,re)|0,r=r+Math.imul(P,ie)|0,o=(o=o+Math.imul(P,ae)|0)+Math.imul(x,ie)|0,c=c+Math.imul(x,ae)|0,r=r+Math.imul(k,ce)|0,o=(o=o+Math.imul(k,ue)|0)+Math.imul(O,ce)|0,c=c+Math.imul(O,ue)|0,r=r+Math.imul(S,de)|0,o=(o=o+Math.imul(S,fe)|0)+Math.imul(E,de)|0,c=c+Math.imul(E,fe)|0,r=r+Math.imul(w,pe)|0,o=(o=o+Math.imul(w,ge)|0)+Math.imul(_,pe)|0,c=c+Math.imul(_,ge)|0,r=r+Math.imul(v,me)|0,o=(o=o+Math.imul(v,ve)|0)+Math.imul(y,me)|0,c=c+Math.imul(y,ve)|0;var Pe=(d+(r=r+Math.imul(h,be)|0)|0)+((8191&(o=(o=o+Math.imul(h,Ie)|0)+Math.imul(A,be)|0))<<13)|0;d=((c=c+Math.imul(A,Ie)|0)+(o>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,r=Math.imul(L,Z),o=(o=Math.imul(L,z))+Math.imul(G,Z)|0,c=Math.imul(G,z),r=r+Math.imul(J,$)|0,o=(o=o+Math.imul(J,ee)|0)+Math.imul(H,$)|0,c=c+Math.imul(H,ee)|0,r=r+Math.imul(T,ne)|0,o=(o=o+Math.imul(T,re)|0)+Math.imul(j,ne)|0,c=c+Math.imul(j,re)|0,r=r+Math.imul(Q,ie)|0,o=(o=o+Math.imul(Q,ae)|0)+Math.imul(N,ie)|0,c=c+Math.imul(N,ae)|0,r=r+Math.imul(P,ce)|0,o=(o=o+Math.imul(P,ue)|0)+Math.imul(x,ce)|0,c=c+Math.imul(x,ue)|0,r=r+Math.imul(k,de)|0,o=(o=o+Math.imul(k,fe)|0)+Math.imul(O,de)|0,c=c+Math.imul(O,fe)|0,r=r+Math.imul(S,pe)|0,o=(o=o+Math.imul(S,ge)|0)+Math.imul(E,pe)|0,c=c+Math.imul(E,ge)|0,r=r+Math.imul(w,me)|0,o=(o=o+Math.imul(w,ve)|0)+Math.imul(_,me)|0,c=c+Math.imul(_,ve)|0;var xe=(d+(r=r+Math.imul(v,be)|0)|0)+((8191&(o=(o=o+Math.imul(v,Ie)|0)+Math.imul(y,be)|0))<<13)|0;d=((c=c+Math.imul(y,Ie)|0)+(o>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(L,$),o=(o=Math.imul(L,ee))+Math.imul(G,$)|0,c=Math.imul(G,ee),r=r+Math.imul(J,ne)|0,o=(o=o+Math.imul(J,re)|0)+Math.imul(H,ne)|0,c=c+Math.imul(H,re)|0,r=r+Math.imul(T,ie)|0,o=(o=o+Math.imul(T,ae)|0)+Math.imul(j,ie)|0,c=c+Math.imul(j,ae)|0,r=r+Math.imul(Q,ce)|0,o=(o=o+Math.imul(Q,ue)|0)+Math.imul(N,ce)|0,c=c+Math.imul(N,ue)|0,r=r+Math.imul(P,de)|0,o=(o=o+Math.imul(P,fe)|0)+Math.imul(x,de)|0,c=c+Math.imul(x,fe)|0,r=r+Math.imul(k,pe)|0,o=(o=o+Math.imul(k,ge)|0)+Math.imul(O,pe)|0,c=c+Math.imul(O,ge)|0,r=r+Math.imul(S,me)|0,o=(o=o+Math.imul(S,ve)|0)+Math.imul(E,me)|0,c=c+Math.imul(E,ve)|0;var Me=(d+(r=r+Math.imul(w,be)|0)|0)+((8191&(o=(o=o+Math.imul(w,Ie)|0)+Math.imul(_,be)|0))<<13)|0;d=((c=c+Math.imul(_,Ie)|0)+(o>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(L,ne),o=(o=Math.imul(L,re))+Math.imul(G,ne)|0,c=Math.imul(G,re),r=r+Math.imul(J,ie)|0,o=(o=o+Math.imul(J,ae)|0)+Math.imul(H,ie)|0,c=c+Math.imul(H,ae)|0,r=r+Math.imul(T,ce)|0,o=(o=o+Math.imul(T,ue)|0)+Math.imul(j,ce)|0,c=c+Math.imul(j,ue)|0,r=r+Math.imul(Q,de)|0,o=(o=o+Math.imul(Q,fe)|0)+Math.imul(N,de)|0,c=c+Math.imul(N,fe)|0,r=r+Math.imul(P,pe)|0,o=(o=o+Math.imul(P,ge)|0)+Math.imul(x,pe)|0,c=c+Math.imul(x,ge)|0,r=r+Math.imul(k,me)|0,o=(o=o+Math.imul(k,ve)|0)+Math.imul(O,me)|0,c=c+Math.imul(O,ve)|0;var Qe=(d+(r=r+Math.imul(S,be)|0)|0)+((8191&(o=(o=o+Math.imul(S,Ie)|0)+Math.imul(E,be)|0))<<13)|0;d=((c=c+Math.imul(E,Ie)|0)+(o>>>13)|0)+(Qe>>>26)|0,Qe&=67108863,r=Math.imul(L,ie),o=(o=Math.imul(L,ae))+Math.imul(G,ie)|0,c=Math.imul(G,ae),r=r+Math.imul(J,ce)|0,o=(o=o+Math.imul(J,ue)|0)+Math.imul(H,ce)|0,c=c+Math.imul(H,ue)|0,r=r+Math.imul(T,de)|0,o=(o=o+Math.imul(T,fe)|0)+Math.imul(j,de)|0,c=c+Math.imul(j,fe)|0,r=r+Math.imul(Q,pe)|0,o=(o=o+Math.imul(Q,ge)|0)+Math.imul(N,pe)|0,c=c+Math.imul(N,ge)|0,r=r+Math.imul(P,me)|0,o=(o=o+Math.imul(P,ve)|0)+Math.imul(x,me)|0,c=c+Math.imul(x,ve)|0;var Ne=(d+(r=r+Math.imul(k,be)|0)|0)+((8191&(o=(o=o+Math.imul(k,Ie)|0)+Math.imul(O,be)|0))<<13)|0;d=((c=c+Math.imul(O,Ie)|0)+(o>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,r=Math.imul(L,ce),o=(o=Math.imul(L,ue))+Math.imul(G,ce)|0,c=Math.imul(G,ue),r=r+Math.imul(J,de)|0,o=(o=o+Math.imul(J,fe)|0)+Math.imul(H,de)|0,c=c+Math.imul(H,fe)|0,r=r+Math.imul(T,pe)|0,o=(o=o+Math.imul(T,ge)|0)+Math.imul(j,pe)|0,c=c+Math.imul(j,ge)|0,r=r+Math.imul(Q,me)|0,o=(o=o+Math.imul(Q,ve)|0)+Math.imul(N,me)|0,c=c+Math.imul(N,ve)|0;var De=(d+(r=r+Math.imul(P,be)|0)|0)+((8191&(o=(o=o+Math.imul(P,Ie)|0)+Math.imul(x,be)|0))<<13)|0;d=((c=c+Math.imul(x,Ie)|0)+(o>>>13)|0)+(De>>>26)|0,De&=67108863,r=Math.imul(L,de),o=(o=Math.imul(L,fe))+Math.imul(G,de)|0,c=Math.imul(G,fe),r=r+Math.imul(J,pe)|0,o=(o=o+Math.imul(J,ge)|0)+Math.imul(H,pe)|0,c=c+Math.imul(H,ge)|0,r=r+Math.imul(T,me)|0,o=(o=o+Math.imul(T,ve)|0)+Math.imul(j,me)|0,c=c+Math.imul(j,ve)|0;var Te=(d+(r=r+Math.imul(Q,be)|0)|0)+((8191&(o=(o=o+Math.imul(Q,Ie)|0)+Math.imul(N,be)|0))<<13)|0;d=((c=c+Math.imul(N,Ie)|0)+(o>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(L,pe),o=(o=Math.imul(L,ge))+Math.imul(G,pe)|0,c=Math.imul(G,ge),r=r+Math.imul(J,me)|0,o=(o=o+Math.imul(J,ve)|0)+Math.imul(H,me)|0,c=c+Math.imul(H,ve)|0;var je=(d+(r=r+Math.imul(T,be)|0)|0)+((8191&(o=(o=o+Math.imul(T,Ie)|0)+Math.imul(j,be)|0))<<13)|0;d=((c=c+Math.imul(j,Ie)|0)+(o>>>13)|0)+(je>>>26)|0,je&=67108863,r=Math.imul(L,me),o=(o=Math.imul(L,ve))+Math.imul(G,me)|0,c=Math.imul(G,ve);var Ue=(d+(r=r+Math.imul(J,be)|0)|0)+((8191&(o=(o=o+Math.imul(J,Ie)|0)+Math.imul(H,be)|0))<<13)|0;d=((c=c+Math.imul(H,Ie)|0)+(o>>>13)|0)+(Ue>>>26)|0,Ue&=67108863;var Je=(d+(r=Math.imul(L,be))|0)+((8191&(o=(o=Math.imul(L,Ie))+Math.imul(G,be)|0))<<13)|0;return d=((c=Math.imul(G,Ie))+(o>>>13)|0)+(Je>>>26)|0,Je&=67108863,l[0]=we,l[1]=_e,l[2]=Ce,l[3]=Se,l[4]=Ee,l[5]=Be,l[6]=ke,l[7]=Oe,l[8]=Re,l[9]=Pe,l[10]=xe,l[11]=Me,l[12]=Qe,l[13]=Ne,l[14]=De,l[15]=Te,l[16]=je,l[17]=Ue,l[18]=Je,0!==d&&(l[19]=d,n.length++),n};function C(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,o=0,c=0;c>>26)|0)>>>26,l&=67108863}n.words[c]=d,r=l,l=o}return 0!==r?n.words[c]=r:n.length--,n._strip()}function S(e,t,n){return C(e,t,n)}function E(e,t){this.x=e,this.y=t}Math.imul||(_=w),c.prototype.mulTo=function(e,t){var n=this.length+e.length;return 10===this.length&&10===e.length?_(this,e,t):n<63?w(this,e,t):n<1024?C(this,e,t):S(this,e,t)},E.prototype.makeRBT=function(e){for(var t=new Array(e),n=c.prototype._countBits(e)-1,i=0;i>=1;return r},E.prototype.permute=function(e,t,n,r,o,c){for(var i=0;i>>=1)i++;return 1<>>=13,n[2*i+1]=8191&c,c>>>=13;for(i=2*t;i>=26,n+=o/67108864|0,n+=c>>>26,this.words[i]=67108863&c}return 0!==n&&(this.words[i]=n,this.length++),t?this.ineg():this},c.prototype.muln=function(e){return this.clone().imuln(e)},c.prototype.sqr=function(){return this.mul(this)},c.prototype.isqr=function(){return this.imul(this.clone())},c.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n>>o&1}return t}(e);if(0===t.length)return new c(1);for(var n=this,i=0;i=0);var i,t=e%26,s=(e-t)/26,n=67108863>>>26-t<<26-t;if(0!==t){var o=0;for(i=0;i>>26-t}o&&(this.words[i]=o,this.length++)}if(0!==s){for(i=this.length-1;i>=0;i--)this.words[i+s]=this.words[i];for(i=0;i=0),o=t?(t-t%26)/26:0;var c=e%26,s=Math.min((e-c)/26,this.length),mask=67108863^67108863>>>c<s)for(this.length-=s,i=0;i=0&&(0!==d||i>=o);i--){var f=0|this.words[i];this.words[i]=d<<26-c|f>>>c,d=f&mask}return l&&0!==d&&(l.words[l.length++]=d),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},c.prototype.ishrn=function(e,t,n){return r(0===this.negative),this.iushrn(e,t,n)},c.prototype.shln=function(e){return this.clone().ishln(e)},c.prototype.ushln=function(e){return this.clone().iushln(e)},c.prototype.shrn=function(e){return this.clone().ishrn(e)},c.prototype.ushrn=function(e){return this.clone().iushrn(e)},c.prototype.testn=function(e){r("number"==typeof e&&e>=0);var t=e%26,s=(e-t)/26,q=1<=0);var t=e%26,s=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=s)return this;if(0!==t&&s++,this.length=Math.min(s,this.length),0!==t){var mask=67108863^67108863>>>t<=67108864;i++)this.words[i]-=67108864,i===this.length-1?this.words[i+1]=1:this.words[i+1]++;return this.length=Math.max(this.length,i+1),this},c.prototype.isubn=function(e){if(r("number"==typeof e),r(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 i=0;i>26)-(d/67108864|0),this.words[i+n]=67108863&o}for(;i>26,this.words[i+n]=67108863&o;if(0===l)return this._strip();for(r(-1===l),l=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},c.prototype._wordDiv=function(e,t){var n=(this.length,e.length),a=this.clone(),b=e,r=0|b.words[b.length-1];0!==(n=26-this._countBits(r))&&(b=b.ushln(n),a.iushln(n),r=0|b.words[b.length-1]);var q,o=a.length-b.length;if("mod"!==t){(q=new c(null)).length=o+1,q.words=new Array(q.length);for(var i=0;i=0;d--){var f=67108864*(0|a.words[b.length+d])+(0|a.words[b.length+d-1]);for(f=Math.min(f/r|0,67108863),a._ishlnsubmul(b,f,d);0!==a.negative;)f--,a.negative=0,a._ishlnsubmul(b,1,d),a.isZero()||(a.negative^=1);q&&(q.words[d]=f)}return q&&q._strip(),a._strip(),"div"!==t&&0!==n&&a.iushrn(n),{div:q||null,mod:a}},c.prototype.divmod=function(e,t,n){return r(!e.isZero()),this.isZero()?{div:new c(0),mod:new c(0)}:0!==this.negative&&0===e.negative?(l=this.neg().divmod(e,t),"mod"!==t&&(div=l.div.neg()),"div"!==t&&(o=l.mod.neg(),n&&0!==o.negative&&o.iadd(e)),{div:div,mod:o}):0===this.negative&&0!==e.negative?(l=this.divmod(e.neg(),t),"mod"!==t&&(div=l.div.neg()),{div:div,mod:l.mod}):0!=(this.negative&e.negative)?(l=this.neg().divmod(e.neg(),t),"div"!==t&&(o=l.mod.neg(),n&&0!==o.negative&&o.isub(e)),{div:l.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new c(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new c(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new c(this.modrn(e.words[0]))}:this._wordDiv(e,t);var div,o,l},c.prototype.div=function(e){return this.divmod(e,"div",!1).div},c.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},c.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},c.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),o=e.andln(1),c=n.cmp(r);return c<0||1===o&&0===c?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},c.prototype.modrn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var p=(1<<26)%e,n=0,i=this.length-1;i>=0;i--)n=(p*n+(0|this.words[i]))%e;return t?-n:n},c.prototype.modn=function(e){return this.modrn(e)},c.prototype.idivn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var n=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*n;this.words[i]=o/e|0,n=o%e}return this._strip(),t?this.ineg():this},c.prototype.divn=function(e){return this.clone().idivn(e)},c.prototype.egcd=function(p){r(0===p.negative),r(!p.isZero());var e=this,t=p.clone();e=0!==e.negative?e.umod(p):e.clone();for(var n=new c(1),o=new c(0),l=new c(0),d=new c(1),g=0;e.isEven()&&t.isEven();)e.iushrn(1),t.iushrn(1),++g;for(var f=t.clone(),h=e.clone();!e.isZero();){for(var i=0,A=1;0==(e.words[0]&A)&&i<26;++i,A<<=1);if(i>0)for(e.iushrn(i);i-- >0;)(n.isOdd()||o.isOdd())&&(n.iadd(f),o.isub(h)),n.iushrn(1),o.iushrn(1);for(var m=0,v=1;0==(t.words[0]&v)&&m<26;++m,v<<=1);if(m>0)for(t.iushrn(m);m-- >0;)(l.isOdd()||d.isOdd())&&(l.iadd(f),d.isub(h)),l.iushrn(1),d.iushrn(1);e.cmp(t)>=0?(e.isub(t),n.isub(l),o.isub(d)):(t.isub(e),l.isub(n),d.isub(o))}return{a:l,b:d,gcd:t.iushln(g)}},c.prototype._invmp=function(p){r(0===p.negative),r(!p.isZero());var a=this,b=p.clone();a=0!==a.negative?a.umod(p):a.clone();for(var e,t=new c(1),n=new c(0),o=b.clone();a.cmpn(1)>0&&b.cmpn(1)>0;){for(var i=0,l=1;0==(a.words[0]&l)&&i<26;++i,l<<=1);if(i>0)for(a.iushrn(i);i-- >0;)t.isOdd()&&t.iadd(o),t.iushrn(1);for(var d=0,f=1;0==(b.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(b.iushrn(d);d-- >0;)n.isOdd()&&n.iadd(o),n.iushrn(1);a.cmp(b)>=0?(a.isub(b),t.isub(n)):(b.isub(a),n.isub(t))}return(e=0===a.cmpn(1)?t:n).cmpn(0)<0&&e.iadd(p),e},c.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var a=this.clone(),b=e.clone();a.negative=0,b.negative=0;for(var t=0;a.isEven()&&b.isEven();t++)a.iushrn(1),b.iushrn(1);for(;;){for(;a.isEven();)a.iushrn(1);for(;b.isEven();)b.iushrn(1);var n=a.cmp(b);if(n<0){var r=a;a=b,b=r}else if(0===n||0===b.cmpn(1))break;a.isub(b)}return b.iushln(t)},c.prototype.invm=function(e){return this.egcd(e).a.umod(e)},c.prototype.isEven=function(){return 0==(1&this.words[0])},c.prototype.isOdd=function(){return 1==(1&this.words[0])},c.prototype.andln=function(e){return this.words[0]&e},c.prototype.bincn=function(e){r("number"==typeof e);var t=e%26,s=(e-t)/26,q=1<>>26,o&=67108863,this.words[i]=o}return 0!==n&&(this.words[i]=n,this.length++),this},c.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},c.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this._strip(),this.length>1)t=1;else{n&&(e=-e),r(e<=67108863,"Number is too big");var o=0|this.words[0];t=o===e?0:oe.length)return 1;if(this.length=0;i--){var a=0|this.words[i],b=0|e.words[i];if(a!==b){ab&&(t=1);break}}return t},c.prototype.gtn=function(e){return 1===this.cmpn(e)},c.prototype.gt=function(e){return 1===this.cmp(e)},c.prototype.gten=function(e){return this.cmpn(e)>=0},c.prototype.gte=function(e){return this.cmp(e)>=0},c.prototype.ltn=function(e){return-1===this.cmpn(e)},c.prototype.lt=function(e){return-1===this.cmp(e)},c.prototype.lten=function(e){return this.cmpn(e)<=0},c.prototype.lte=function(e){return this.cmp(e)<=0},c.prototype.eqn=function(e){return 0===this.cmpn(e)},c.prototype.eq=function(e){return 0===this.cmp(e)},c.red=function(e){return new M(e)},c.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},c.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},c.prototype._forceRed=function(e){return this.red=e,this},c.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},c.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},c.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},c.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},c.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},c.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},c.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},c.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},c.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},c.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},c.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},c.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},c.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},c.prototype.redPow=function(e){return r(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 k(e,p){this.name=e,this.p=new c(p,16),this.n=this.p.bitLength(),this.k=new c(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 R(){k.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function P(){k.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function x(){k.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(e){if("string"==typeof e){var t=c._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function Q(e){M.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new c(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 c(null);return e.words=new Array(Math.ceil(this.n/13)),e},k.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},k.prototype.split=function(input,e){input.iushrn(this.n,0,e)},k.prototype.imulK=function(e){return e.imul(this.k)},o(O,k),O.prototype.split=function(input,output){for(var mask=4194303,e=Math.min(input.length,9),i=0;i>>22,t=n}t>>>=22,input.words[i-10]=t,0===t&&input.length>10?input.length-=10:input.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,i=0;i>>=26,e.words[i]=r,t=n}return 0!==t&&(e.words[e.length++]=t),e},c._prime=function(e){if(B[e])return B[e];var t;if("k256"===e)t=new O;else if("p224"===e)t=new R;else if("p192"===e)t=new P;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new x}return B[e]=t,t},M.prototype._verify1=function(a){r(0===a.negative,"red works only with positives"),r(a.red,"red works only with red numbers")},M.prototype._verify2=function(a,b){r(0==(a.negative|b.negative),"red works only with positives"),r(a.red&&a.red===b.red,"red works only with red numbers")},M.prototype.imod=function(a){return this.prime?this.prime.ireduce(a)._forceRed(this):(A(a,a.umod(this.m)._forceRed(this)),a)},M.prototype.neg=function(a){return a.isZero()?a.clone():this.m.sub(a)._forceRed(this)},M.prototype.add=function(a,b){this._verify2(a,b);var e=a.add(b);return e.cmp(this.m)>=0&&e.isub(this.m),e._forceRed(this)},M.prototype.iadd=function(a,b){this._verify2(a,b);var e=a.iadd(b);return e.cmp(this.m)>=0&&e.isub(this.m),e},M.prototype.sub=function(a,b){this._verify2(a,b);var e=a.sub(b);return e.cmpn(0)<0&&e.iadd(this.m),e._forceRed(this)},M.prototype.isub=function(a,b){this._verify2(a,b);var e=a.isub(b);return e.cmpn(0)<0&&e.iadd(this.m),e},M.prototype.shl=function(a,e){return this._verify1(a),this.imod(a.ushln(e))},M.prototype.imul=function(a,b){return this._verify2(a,b),this.imod(a.imul(b))},M.prototype.mul=function(a,b){return this._verify2(a,b),this.imod(a.mul(b))},M.prototype.isqr=function(a){return this.imul(a,a.clone())},M.prototype.sqr=function(a){return this.mul(a,a)},M.prototype.sqrt=function(a){if(a.isZero())return a.clone();var e=this.m.andln(3);if(r(e%2==1),3===e){var t=this.m.add(new c(1)).iushrn(2);return this.pow(a,t)}for(var q=this.m.subn(1),s=0;!q.isZero()&&0===q.andln(1);)s++,q.iushrn(1);r(!q.isZero());var n=new c(1).toRed(this),o=n.redNeg(),l=this.m.subn(1).iushrn(1),d=this.m.bitLength();for(d=new c(2*d*d).toRed(this);0!==this.pow(d,l).cmp(o);)d.redIAdd(o);for(var f=this.pow(d,q),h=this.pow(a,q.addn(1).iushrn(1)),A=this.pow(a,q),m=s;0!==A.cmp(n);){for(var v=A,i=0;0!==v.cmp(n);i++)v=v.redSqr();r(i=0;i--){for(var d=e.words[i],f=l-1;f>=0;f--){var h=d>>f&1;n!==t[0]&&(n=this.sqr(n)),0!==h||0!==r?(r<<=1,r|=h,(4===++o||0===i&&0===f)&&(n=this.mul(n,t[r]),o=0,r=0)):o=0}l=26}return n},M.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},M.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},c.mont=function(e){return new Q(e)},o(Q,M),Q.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},Q.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},Q.prototype.imul=function(a,b){if(a.isZero()||b.isZero())return a.words[0]=0,a.length=1,a;var e=a.imul(b),t=e.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),u=e.isub(t).iushrn(this.shift),n=u;return u.cmp(this.m)>=0?n=u.isub(this.m):u.cmpn(0)<0&&(n=u.iadd(this.m)),n._forceRed(this)},Q.prototype.mul=function(a,b){if(a.isZero()||b.isZero())return new c(0)._forceRed(this);var e=a.mul(b),t=e.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),u=e.isub(t).iushrn(this.shift),n=u;return u.cmp(this.m)>=0?n=u.isub(this.m):u.cmpn(0)<0&&(n=u.iadd(this.m)),n._forceRed(this)},Q.prototype.invm=function(a){return this.imod(a._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)}).call(this,n(113)(e))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DateTime=t.toSeconds=t.fromSeconds=t.toRfc3339WithNanoseconds=t.fromRfc3339WithNanoseconds=void 0;const r=n(17),o=n(34);function c(e){const t=(0,r.fromRfc3339)(e),n=e.match(/\.(\d+)Z$/),o=n?n[1].slice(3):"";return t.nanoseconds=parseInt(o.padEnd(6,"0"),10),t}function l(e){var t,n;const r=e.toISOString(),o=null!==(n=null===(t=e.nanoseconds)||void 0===t?void 0:t.toString())&&void 0!==n?n:"";return`${r.slice(0,-1)}${o.padStart(6,"0")}Z`}t.fromRfc3339WithNanoseconds=c,t.toRfc3339WithNanoseconds=l,t.fromSeconds=function(e,t=0){const n=new o.Uint32(t).toNumber();if(n>999999999)throw new Error("Nano seconds must not exceed 999999999");const r=new Date(1e3*e+Math.floor(n/1e6));return r.nanoseconds=n%1e6,r},t.toSeconds=function(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.DateTime=class{static decode(e){return c(e)}static encode(e){return l(e)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebsocketClient=t.instanceOfRpcStreamingClient=t.HttpClient=void 0;var r=n(732);Object.defineProperty(t,"HttpClient",{enumerable:!0,get:function(){return r.HttpClient}});var o=n(241);Object.defineProperty(t,"instanceOfRpcStreamingClient",{enumerable:!0,get:function(){return o.instanceOfRpcStreamingClient}});var c=n(773);Object.defineProperty(t,"WebsocketClient",{enumerable:!0,get:function(){return c.WebsocketClient}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.jsonRpcCode=t.isJsonRpcSuccessResponse=t.isJsonRpcErrorResponse=t.parseJsonRpcSuccessResponse=t.parseJsonRpcResponse=t.parseJsonRpcRequest=t.parseJsonRpcId=t.parseJsonRpcErrorResponse=t.JsonRpcClient=t.makeJsonRpcId=void 0;var r=n(733);Object.defineProperty(t,"makeJsonRpcId",{enumerable:!0,get:function(){return r.makeJsonRpcId}});var o=n(734);Object.defineProperty(t,"JsonRpcClient",{enumerable:!0,get:function(){return o.JsonRpcClient}});var c=n(753);Object.defineProperty(t,"parseJsonRpcErrorResponse",{enumerable:!0,get:function(){return c.parseJsonRpcErrorResponse}}),Object.defineProperty(t,"parseJsonRpcId",{enumerable:!0,get:function(){return c.parseJsonRpcId}}),Object.defineProperty(t,"parseJsonRpcRequest",{enumerable:!0,get:function(){return c.parseJsonRpcRequest}}),Object.defineProperty(t,"parseJsonRpcResponse",{enumerable:!0,get:function(){return c.parseJsonRpcResponse}}),Object.defineProperty(t,"parseJsonRpcSuccessResponse",{enumerable:!0,get:function(){return c.parseJsonRpcSuccessResponse}});var l=n(411);Object.defineProperty(t,"isJsonRpcErrorResponse",{enumerable:!0,get:function(){return l.isJsonRpcErrorResponse}}),Object.defineProperty(t,"isJsonRpcSuccessResponse",{enumerable:!0,get:function(){return l.isJsonRpcSuccessResponse}}),Object.defineProperty(t,"jsonRpcCode",{enumerable:!0,get:function(){return l.jsonRpcCode}})},function(e,t,n){"use strict";var r=n(739),o="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),c=Object.prototype.toString,l=Array.prototype.concat,d=Object.defineProperty,f=n(741)(),h=d&&f,A=function(object,e,t,n){var r;(!(e in object)||"function"==typeof(r=n)&&"[object Function]"===c.call(r)&&n())&&(h?d(object,e,{configurable:!0,enumerable:!1,value:t,writable:!0}):object[e]=t)},m=function(object,map){var e=arguments.length>2?arguments[2]:{},t=r(map);o&&(t=l.call(t,Object.getOwnPropertySymbols(map)));for(var i=0;i=0&&"[object Function]"===r.call(e.callee)),n}},function(e,t,n){"use strict";var r=n(745);e.exports=Function.prototype.bind||r},function(e,t,n){"use strict";"undefined"!=typeof self?e.exports=self:"undefined"!=typeof window?e.exports=window:e.exports=Function("return this")()},function(e,t,n){"use strict";(function(t){var r=n(409);e.exports=function(){return"object"==typeof t&&t&&t.Math===Math&&t.Array===Array?t:r}}).call(this,n(3))},function(e,t,n){"use strict";function r(e){return"object"==typeof e.error}Object.defineProperty(t,"__esModule",{value:!0}),t.jsonRpcCode=t.isJsonRpcSuccessResponse=t.isJsonRpcErrorResponse=void 0,t.isJsonRpcErrorResponse=r,t.isJsonRpcSuccessResponse=function(e){return!r(e)},t.jsonRpcCode={parseError:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internalError:-32603,serverError:{default:-32e3}}},,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QueueingStreamingSocket=t.ConnectionStatus=void 0;const r=n(182),o=n(95),c=n(421);var l;!function(e){e[e.Unconnected=0]="Unconnected",e[e.Connecting=1]="Connecting",e[e.Connected=2]="Connected",e[e.Disconnected=3]="Disconnected"}(l=t.ConnectionStatus||(t.ConnectionStatus={}));t.QueueingStreamingSocket=class{constructor(e,t=1e4,n){this.queue=[],this.isProcessingQueue=!1,this.url=e,this.timeout=t,this.reconnectedHandler=n;const d={start:e=>this.eventProducerListener=e,stop:()=>this.eventProducerListener=void 0};this.events=o.Stream.create(d),this.connectionStatusProducer=new r.DefaultValueProducer(l.Unconnected),this.connectionStatus=new r.ValueAndUpdates(this.connectionStatusProducer),this.socket=new c.StreamingSocket(this.url,this.timeout),this.socket.events.subscribe({next:e=>{if(!this.eventProducerListener)throw new Error("No event producer listener set");this.eventProducerListener.next(e)},error:()=>this.connectionStatusProducer.update(l.Disconnected)})}connect(){this.connectionStatusProducer.update(l.Connecting),this.socket.connected.then((async()=>(this.connectionStatusProducer.update(l.Connected),this.processQueue())),(()=>this.connectionStatusProducer.update(l.Disconnected))),this.socket.connect()}disconnect(){this.connectionStatusProducer.update(l.Disconnected),this.socket.disconnect()}reconnect(){this.socket=new c.StreamingSocket(this.url,this.timeout),this.socket.events.subscribe({next:e=>{if(!this.eventProducerListener)throw new Error("No event producer listener set");this.eventProducerListener.next(e)},error:()=>this.connectionStatusProducer.update(l.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(){if(this.isProcessingQueue||this.connectionStatus.value!==l.Connected)return;let e;for(this.isProcessingQueue=!0;e=this.queue.shift();)try{await this.socket.send(e),this.isProcessingQueue=!1}catch(t){return this.queue.unshift(e),void(this.isProcessingQueue=!1)}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StreamingSocket=void 0;const r=n(95),o=n(422);t.StreamingSocket=class{constructor(e,t=1e4){this.socket=new o.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;const n={start:e=>this.eventProducerListener=e,stop:()=>this.eventProducerListener=void 0};this.events=r.Stream.create(n)}connect(){this.socket.connect()}disconnect(){this.socket.disconnect()}async send(data){return this.socket.send(data)}}},function(e,t,n){"use strict";(function(e){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.SocketWrapper=void 0;const o=r(n(775));t.SocketWrapper=class{constructor(e,t,n,r,o,c=1e4){this.closed=!1,this.connected=new Promise(((e,t)=>{this.connectedResolver=e,this.connectedRejecter=t})),this.url=e,this.messageHandler=t,this.errorHandler=n,this.openHandler=r,this.closeHandler=o,this.timeout=c}connect(){const 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)};const t=Date.now();this.timeoutId=setTimeout((()=>{e.onmessage=()=>0,e.onerror=()=>0,e.onopen=()=>0,e.onclose=()=>0,e.close(),this.socket=void 0;const n=Math.floor(Date.now()-t);this.connectedRejecter(`Connection attempt timed out after ${n} ms`)}),this.timeout),this.socket=e}disconnect(){if(!this.socket)throw new 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 new Error(`Unknown readyState: ${this.socket.readyState}`)}}async send(data){return new Promise(((t,n)=>{if(!this.socket)throw new Error("Socket undefined. This must be called after connecting.");if(this.closed)throw new Error("Socket was closed, so no data can be sent anymore.");if(this.socket.readyState!==o.default.OPEN)throw new Error("Websocket is not open");void 0!==e&&void 0!==e.versions&&void 0!==e.versions.node?this.socket.send(data,(e=>e?n(e):t())):(this.socket.send(data),t())}))}clearTimeout(){if(!this.timeoutId)throw new Error("Timeout ID not set. This should not happen and usually means connect() was not called.");clearTimeout(this.timeoutId)}}}).call(this,n(19))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createJsonRpcRequest=void 0;const r="123456789";function o(){return parseInt(Array.from({length:12}).map((()=>r[Math.floor(Math.random()*r.length)])).join(""),10)}t.createJsonRpcRequest=function(e,t){const n=t?{...t}:{};return{jsonrpc:"2.0",id:o(),method:e,params:n}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hashBlock=t.hashTx=void 0;const r=n(53),o=n(244);function c(e){switch(e.length){case 0:throw new Error("Cannot hash empty tree");case 1:return function(e){const t=new r.Sha256(Uint8Array.from([0]));return t.update(e),t.digest()}(e[0]);default:{const t=function(e){if(e<1)throw new Error("Cannot split an empty tree");const t=2**Math.floor(Math.log2(e));return t>>3){case 1:o.sendEnabled.push(t.SendEnabled.decode(n,n.uint32()));break;case 2:o.defaultSendEnabled=n.bool();break;default:n.skipType(7&e)}}return o},fromJSON(object){var e;const n=Object.assign({},d);return n.sendEnabled=(null!==(e=object.sendEnabled)&&void 0!==e?e:[]).map((e=>t.SendEnabled.fromJSON(e))),n.defaultSendEnabled=void 0!==object.defaultSendEnabled&&null!==object.defaultSendEnabled&&Boolean(object.defaultSendEnabled),n},toJSON(e){const n={};return e.sendEnabled?n.sendEnabled=e.sendEnabled.map((e=>e?t.SendEnabled.toJSON(e):void 0)):n.sendEnabled=[],void 0!==e.defaultSendEnabled&&(n.defaultSendEnabled=e.defaultSendEnabled),n},fromPartial(object){var e,n;const r=Object.assign({},d);return r.sendEnabled=(null===(e=object.sendEnabled)||void 0===e?void 0:e.map((e=>t.SendEnabled.fromPartial(e))))||[],r.defaultSendEnabled=null!==(n=object.defaultSendEnabled)&&void 0!==n&&n,r}};const f={denom:"",enabled:!1};t.SendEnabled={encode:(e,t=c.default.Writer.create())=>(""!==e.denom&&t.uint32(10).string(e.denom),!0===e.enabled&&t.uint32(16).bool(e.enabled),t),decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},f);for(;t.pos>>3){case 1:r.denom=t.string();break;case 2:r.enabled=t.bool();break;default:t.skipType(7&e)}}return r},fromJSON(object){const e=Object.assign({},f);return e.denom=void 0!==object.denom&&null!==object.denom?String(object.denom):"",e.enabled=void 0!==object.enabled&&null!==object.enabled&&Boolean(object.enabled),e},toJSON(e){const t={};return void 0!==e.denom&&(t.denom=e.denom),void 0!==e.enabled&&(t.enabled=e.enabled),t},fromPartial(object){var e,t;const n=Object.assign({},f);return n.denom=null!==(e=object.denom)&&void 0!==e?e:"",n.enabled=null!==(t=object.enabled)&&void 0!==t&&t,n}};const h={address:""};t.Input={encode(e,t=c.default.Writer.create()){""!==e.address&&t.uint32(10).string(e.address);for(const n of e.coins)l.Coin.encode(n,t.uint32(18).fork()).ldelim();return t},decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},h);for(r.coins=[];t.pos>>3){case 1:r.address=t.string();break;case 2:r.coins.push(l.Coin.decode(t,t.uint32()));break;default:t.skipType(7&e)}}return r},fromJSON(object){var e;const t=Object.assign({},h);return t.address=void 0!==object.address&&null!==object.address?String(object.address):"",t.coins=(null!==(e=object.coins)&&void 0!==e?e:[]).map((e=>l.Coin.fromJSON(e))),t},toJSON(e){const t={};return void 0!==e.address&&(t.address=e.address),e.coins?t.coins=e.coins.map((e=>e?l.Coin.toJSON(e):void 0)):t.coins=[],t},fromPartial(object){var e,t;const n=Object.assign({},h);return n.address=null!==(e=object.address)&&void 0!==e?e:"",n.coins=(null===(t=object.coins)||void 0===t?void 0:t.map((e=>l.Coin.fromPartial(e))))||[],n}};const A={address:""};t.Output={encode(e,t=c.default.Writer.create()){""!==e.address&&t.uint32(10).string(e.address);for(const n of e.coins)l.Coin.encode(n,t.uint32(18).fork()).ldelim();return t},decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},A);for(r.coins=[];t.pos>>3){case 1:r.address=t.string();break;case 2:r.coins.push(l.Coin.decode(t,t.uint32()));break;default:t.skipType(7&e)}}return r},fromJSON(object){var e;const t=Object.assign({},A);return t.address=void 0!==object.address&&null!==object.address?String(object.address):"",t.coins=(null!==(e=object.coins)&&void 0!==e?e:[]).map((e=>l.Coin.fromJSON(e))),t},toJSON(e){const t={};return void 0!==e.address&&(t.address=e.address),e.coins?t.coins=e.coins.map((e=>e?l.Coin.toJSON(e):void 0)):t.coins=[],t},fromPartial(object){var e,t;const n=Object.assign({},A);return n.address=null!==(e=object.address)&&void 0!==e?e:"",n.coins=(null===(t=object.coins)||void 0===t?void 0:t.map((e=>l.Coin.fromPartial(e))))||[],n}};const m={};t.Supply={encode(e,t=c.default.Writer.create()){for(const n of e.total)l.Coin.encode(n,t.uint32(10).fork()).ldelim();return t},decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},m);for(r.total=[];t.pos>>3==1)r.total.push(l.Coin.decode(t,t.uint32()));else t.skipType(7&e)}return r},fromJSON(object){var e;const t=Object.assign({},m);return t.total=(null!==(e=object.total)&&void 0!==e?e:[]).map((e=>l.Coin.fromJSON(e))),t},toJSON(e){const t={};return e.total?t.total=e.total.map((e=>e?l.Coin.toJSON(e):void 0)):t.total=[],t},fromPartial(object){var e;const t=Object.assign({},m);return t.total=(null===(e=object.total)||void 0===e?void 0:e.map((e=>l.Coin.fromPartial(e))))||[],t}};const v={denom:"",exponent:0,aliases:""};t.DenomUnit={encode(e,t=c.default.Writer.create()){""!==e.denom&&t.uint32(10).string(e.denom),0!==e.exponent&&t.uint32(16).uint32(e.exponent);for(const n of e.aliases)t.uint32(26).string(n);return t},decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},v);for(r.aliases=[];t.pos>>3){case 1:r.denom=t.string();break;case 2:r.exponent=t.uint32();break;case 3:r.aliases.push(t.string());break;default:t.skipType(7&e)}}return r},fromJSON(object){var e;const t=Object.assign({},v);return t.denom=void 0!==object.denom&&null!==object.denom?String(object.denom):"",t.exponent=void 0!==object.exponent&&null!==object.exponent?Number(object.exponent):0,t.aliases=(null!==(e=object.aliases)&&void 0!==e?e:[]).map((e=>String(e))),t},toJSON(e){const t={};return void 0!==e.denom&&(t.denom=e.denom),void 0!==e.exponent&&(t.exponent=e.exponent),e.aliases?t.aliases=e.aliases.map((e=>e)):t.aliases=[],t},fromPartial(object){var e,t,n;const r=Object.assign({},v);return r.denom=null!==(e=object.denom)&&void 0!==e?e:"",r.exponent=null!==(t=object.exponent)&&void 0!==t?t:0,r.aliases=(null===(n=object.aliases)||void 0===n?void 0:n.map((e=>e)))||[],r}};const y={description:"",base:"",display:"",name:"",symbol:""};t.Metadata={encode(e,n=c.default.Writer.create()){""!==e.description&&n.uint32(10).string(e.description);for(const r of e.denomUnits)t.DenomUnit.encode(r,n.uint32(18).fork()).ldelim();return""!==e.base&&n.uint32(26).string(e.base),""!==e.display&&n.uint32(34).string(e.display),""!==e.name&&n.uint32(42).string(e.name),""!==e.symbol&&n.uint32(50).string(e.symbol),n},decode(input,e){const n=input instanceof c.default.Reader?input:new c.default.Reader(input);let r=void 0===e?n.len:n.pos+e;const o=Object.assign({},y);for(o.denomUnits=[];n.pos>>3){case 1:o.description=n.string();break;case 2:o.denomUnits.push(t.DenomUnit.decode(n,n.uint32()));break;case 3:o.base=n.string();break;case 4:o.display=n.string();break;case 5:o.name=n.string();break;case 6:o.symbol=n.string();break;default:n.skipType(7&e)}}return o},fromJSON(object){var e;const n=Object.assign({},y);return n.description=void 0!==object.description&&null!==object.description?String(object.description):"",n.denomUnits=(null!==(e=object.denomUnits)&&void 0!==e?e:[]).map((e=>t.DenomUnit.fromJSON(e))),n.base=void 0!==object.base&&null!==object.base?String(object.base):"",n.display=void 0!==object.display&&null!==object.display?String(object.display):"",n.name=void 0!==object.name&&null!==object.name?String(object.name):"",n.symbol=void 0!==object.symbol&&null!==object.symbol?String(object.symbol):"",n},toJSON(e){const n={};return void 0!==e.description&&(n.description=e.description),e.denomUnits?n.denomUnits=e.denomUnits.map((e=>e?t.DenomUnit.toJSON(e):void 0)):n.denomUnits=[],void 0!==e.base&&(n.base=e.base),void 0!==e.display&&(n.display=e.display),void 0!==e.name&&(n.name=e.name),void 0!==e.symbol&&(n.symbol=e.symbol),n},fromPartial(object){var e,n,r,o,c,l;const d=Object.assign({},y);return d.description=null!==(e=object.description)&&void 0!==e?e:"",d.denomUnits=(null===(n=object.denomUnits)||void 0===n?void 0:n.map((e=>t.DenomUnit.fromPartial(e))))||[],d.base=null!==(r=object.base)&&void 0!==r?r:"",d.display=null!==(o=object.display)&&void 0!==o?o:"",d.name=null!==(c=object.name)&&void 0!==c?c:"",d.symbol=null!==(l=object.symbol)&&void 0!==l?l:"",d}},c.default.util.Long!==o.default&&(c.default.util.Long=o.default,c.default.configure())},function(e,t,n){"use strict";function r(e){return"string"!=typeof e[1]}Object.defineProperty(t,"__esModule",{value:!0}),t.AminoTypes=void 0;t.AminoTypes=class{constructor(e){this.register=e}toAmino({typeUrl:e,value:t}){const n=this.register[e];if("not_supported_by_chain"===n)throw new Error(`The message type '${e}' cannot be signed using the Amino JSON sign mode because this is not supported by chain.`);if(!n)throw new Error(`Type URL '${e}' 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(t)}}fromAmino({type:e,value:t}){const n=Object.entries(this.register).filter(r).filter((([t,{aminoType:n}])=>n===e));switch(n.length){case 0:throw new Error(`Amino type identifier '${e}' 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:{const[e,r]=n[0];return{typeUrl:e,value:r.fromAmino(t)}}default:throw new Error(`Multiple types are registered with Amino type identifier '${e}': '`+n.map((([e,t])=>e)).sort().join("', '")+"'. Thus fromAmino cannot be performed.")}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.calculateFee=t.GasPrice=void 0;const r=n(34),o=n(76);class c{constructor(e,t){this.amount=e,this.denom=t}static fromString(e){const t=e.match(/^([0-9.]+)([a-z][a-z0-9]*)$/i);if(!t)throw new Error("Invalid gas price string");const[n,o,l]=t;!function(e){if(e.length<3||e.length>128)throw new Error("Denom must be between 3 and 128 characters")}(l);const d=r.Decimal.fromUserInput(o,18);return new c(d,l)}toString(){return this.amount.toString()+this.denom}}t.GasPrice=c,t.calculateFee=function(e,t){const n="string"==typeof t?c.fromString(t):t,{denom:l,amount:d}=n,f=d.multiply(new r.Uint53(e)).ceil().toString();return{amount:(0,o.coins)(f,l),gas:e.toString()}}},function(e,t,n){"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;const r=n(185),o=n(805),c=n(434);function l(e,t,n,r,o){f(e,t);const l=d(e);(0,c.ensureBytesEqual)(l,n),(0,c.ensureBytesEqual)(r,e.key),(0,c.ensureBytesEqual)(o,e.value)}function d(e){if(!e.key||!e.value)throw new Error("Existence proof needs key and value set");if(!e.leaf)throw new Error("Existence proof must start with a leaf operation");const path=e.path||[];let t=(0,o.applyLeaf)(e.leaf,e.key,e.value);for(const e of path)t=(0,o.applyInner)(e,t);return t}function f(e,t){if(!e.leaf)throw new Error("Existence proof must start with a leaf operation");if(!t.leafSpec)throw new Error("Spec must include leafSpec");if(!t.innerSpec)throw new Error("Spec must include innerSpec");(0,c.ensureLeaf)(e.leaf,t.leafSpec);const path=e.path||[];if(t.minDepth&&path.lengtht.maxDepth)throw new Error(`Too many inner nodes ${path.length}`);for(const e of path)(0,c.ensureInner)(e,t.leafSpec.prefix,t.innerSpec)}function h(e,path){const{minPrefix:t,maxPrefix:n,suffix:r}=I(e,0);for(const e of path)if(!y(e,t,n,r))throw new Error("Step not leftmost")}function A(e,path){const t=e.childOrder.length-1,{minPrefix:n,maxPrefix:r,suffix:o}=I(e,t);for(const e of path)if(!y(e,n,r,o))throw new Error("Step not leftmost")}function m(e,t,n){const r=[...t],o=[...n];let l=r.pop(),d=o.pop();for(;(0,c.bytesEqual)(l.prefix,d.prefix)&&(0,c.bytesEqual)(l.suffix,d.suffix);)l=r.pop(),d=o.pop();if(!function(e,t,n){const r=v(e,t);return v(e,n)===r+1}(e,l,d))throw new Error("Not left neightbor at first divergent step");A(e,r),h(e,o)}function v(e,t){for(let n=0;nn)&&(e.suffix||[]).length===r)}function I(e,t){const n=function(e,t){if(t<0||t>=e.length)throw new Error(`Invalid branch: ${t}`);return e.findIndex((e=>e===t))}(e.childOrder,t),r=n*e.childSize;return{minPrefix:r+e.minPrefixLength,maxPrefix:r+e.maxPrefixLength,suffix:(e.childOrder.length-1-n)*e.childSize}}t.iavlSpec={leafSpec:{prefix:Uint8Array.from([0]),hash:r.ics23.HashOp.SHA256,prehashValue:r.ics23.HashOp.SHA256,prehashKey:r.ics23.HashOp.NO_HASH,length:r.ics23.LengthOp.VAR_PROTO},innerSpec:{childOrder:[0,1],minPrefixLength:4,maxPrefixLength:12,childSize:33,hash:r.ics23.HashOp.SHA256}},t.tendermintSpec={leafSpec:{prefix:Uint8Array.from([0]),hash:r.ics23.HashOp.SHA256,prehashValue:r.ics23.HashOp.SHA256,prehashKey:r.ics23.HashOp.NO_HASH,length:r.ics23.LengthOp.VAR_PROTO},innerSpec:{childOrder:[0,1],minPrefixLength:1,maxPrefixLength:1,childSize:32,hash:r.ics23.HashOp.SHA256}},t.smtSpec={leafSpec:{hash:r.ics23.HashOp.SHA256,prehashKey:r.ics23.HashOp.NO_HASH,prehashValue:r.ics23.HashOp.SHA256,length:r.ics23.LengthOp.NO_PREFIX,prefix:Uint8Array.from([0])},innerSpec:{childOrder:[0,1],childSize:32,minPrefixLength:1,maxPrefixLength:1,emptyChild:new Uint8Array(32),hash:r.ics23.HashOp.SHA256},maxDepth:256},t.verifyExistence=l,t.verifyNonExistence=function(e,t,n,r){let o,d;if(e.left&&(l(e.left,t,n,e.left.key,e.left.value),o=e.left.key),e.right&&(l(e.right,t,n,e.right.key,e.right.value),d=e.right.key),!o&&!d)throw new Error("neither left nor right proof defined");if(o&&(0,c.ensureBytesBefore)(o,r),d&&(0,c.ensureBytesBefore)(r,d),!t.innerSpec)throw new Error("no inner spec");o?d?m(t.innerSpec,e.left.path,e.right.path):A(t.innerSpec,e.left.path):h(t.innerSpec,e.right.path)},t.calculateExistenceRoot=d,t.ensureSpec=f,t.ensureLeftNeighbor=m},function(e,t,n){"use strict";function r(a,b){if(a.length!==b.length)throw new Error(`Different lengths ${a.length} vs ${b.length}`);for(let i=0;it[i])return!1}return e.length(n.maxPrefixLength||0)+r)throw new Error(`Prefix too long: ${e.prefix.length} bytes`)},t.ensureBytesEqual=r,t.bytesEqual=function(a,b){if(a.length!==b.length)return!1;for(let i=0;i(""!==e.granter&&t.uint32(10).string(e.granter),""!==e.grantee&&t.uint32(18).string(e.grantee),void 0!==e.grant&&l.Grant.encode(e.grant,t.uint32(26).fork()).ldelim(),t),decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},f);for(;t.pos>>3){case 1:r.granter=t.string();break;case 2:r.grantee=t.string();break;case 3:r.grant=l.Grant.decode(t,t.uint32());break;default:t.skipType(7&e)}}return r},fromJSON(object){const e=Object.assign({},f);return e.granter=void 0!==object.granter&&null!==object.granter?String(object.granter):"",e.grantee=void 0!==object.grantee&&null!==object.grantee?String(object.grantee):"",e.grant=void 0!==object.grant&&null!==object.grant?l.Grant.fromJSON(object.grant):void 0,e},toJSON(e){const 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?l.Grant.toJSON(e.grant):void 0),t},fromPartial(object){var e,t;const n=Object.assign({},f);return n.granter=null!==(e=object.granter)&&void 0!==e?e:"",n.grantee=null!==(t=object.grantee)&&void 0!==t?t:"",n.grant=void 0!==object.grant&&null!==object.grant?l.Grant.fromPartial(object.grant):void 0,n}};const h={};t.MsgExecResponse={encode(e,t=c.default.Writer.create()){for(const n of e.results)t.uint32(10).bytes(n);return t},decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},h);for(r.results=[];t.pos>>3==1)r.results.push(t.bytes());else t.skipType(7&e)}return r},fromJSON(object){var e;const t=Object.assign({},h);return t.results=(null!==(e=object.results)&&void 0!==e?e:[]).map((e=>function(e){const t=w(e),n=new Uint8Array(t.length);for(let i=0;ifunction(e){const t=[];for(const n of e)t.push(String.fromCharCode(n));return _(t.join(""))}(void 0!==e?e:new Uint8Array))):t.results=[],t},fromPartial(object){var e;const t=Object.assign({},h);return t.results=(null===(e=object.results)||void 0===e?void 0:e.map((e=>e)))||[],t}};const A={grantee:""};t.MsgExec={encode(e,t=c.default.Writer.create()){""!==e.grantee&&t.uint32(10).string(e.grantee);for(const n of e.msgs)d.Any.encode(n,t.uint32(18).fork()).ldelim();return t},decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},A);for(r.msgs=[];t.pos>>3){case 1:r.grantee=t.string();break;case 2:r.msgs.push(d.Any.decode(t,t.uint32()));break;default:t.skipType(7&e)}}return r},fromJSON(object){var e;const t=Object.assign({},A);return t.grantee=void 0!==object.grantee&&null!==object.grantee?String(object.grantee):"",t.msgs=(null!==(e=object.msgs)&&void 0!==e?e:[]).map((e=>d.Any.fromJSON(e))),t},toJSON(e){const t={};return void 0!==e.grantee&&(t.grantee=e.grantee),e.msgs?t.msgs=e.msgs.map((e=>e?d.Any.toJSON(e):void 0)):t.msgs=[],t},fromPartial(object){var e,t;const n=Object.assign({},A);return n.grantee=null!==(e=object.grantee)&&void 0!==e?e:"",n.msgs=(null===(t=object.msgs)||void 0===t?void 0:t.map((e=>d.Any.fromPartial(e))))||[],n}};const m={};t.MsgGrantResponse={encode:(e,t=c.default.Writer.create())=>t,decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},m);for(;t.posObject.assign({},m),toJSON:e=>({}),fromPartial:e=>Object.assign({},m)};const v={granter:"",grantee:"",msgTypeUrl:""};t.MsgRevoke={encode:(e,t=c.default.Writer.create())=>(""!==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(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},v);for(;t.pos>>3){case 1:r.granter=t.string();break;case 2:r.grantee=t.string();break;case 3:r.msgTypeUrl=t.string();break;default:t.skipType(7&e)}}return r},fromJSON(object){const e=Object.assign({},v);return e.granter=void 0!==object.granter&&null!==object.granter?String(object.granter):"",e.grantee=void 0!==object.grantee&&null!==object.grantee?String(object.grantee):"",e.msgTypeUrl=void 0!==object.msgTypeUrl&&null!==object.msgTypeUrl?String(object.msgTypeUrl):"",e},toJSON(e){const 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(object){var e,t,n;const r=Object.assign({},v);return r.granter=null!==(e=object.granter)&&void 0!==e?e:"",r.grantee=null!==(t=object.grantee)&&void 0!==t?t:"",r.msgTypeUrl=null!==(n=object.msgTypeUrl)&&void 0!==n?n:"",r}};const y={};t.MsgRevokeResponse={encode:(e,t=c.default.Writer.create())=>t,decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},y);for(;t.posObject.assign({},y),toJSON:e=>({}),fromPartial:e=>Object.assign({},y)};t.MsgClientImpl=class{constructor(e){this.rpc=e,this.Grant=this.Grant.bind(this),this.Exec=this.Exec.bind(this),this.Revoke=this.Revoke.bind(this)}Grant(e){const data=t.MsgGrant.encode(e).finish();return this.rpc.request("cosmos.authz.v1beta1.Msg","Grant",data).then((data=>t.MsgGrantResponse.decode(new c.default.Reader(data))))}Exec(e){const data=t.MsgExec.encode(e).finish();return this.rpc.request("cosmos.authz.v1beta1.Msg","Exec",data).then((data=>t.MsgExecResponse.decode(new c.default.Reader(data))))}Revoke(e){const data=t.MsgRevoke.encode(e).finish();return this.rpc.request("cosmos.authz.v1beta1.Msg","Revoke",data).then((data=>t.MsgRevokeResponse.decode(new c.default.Reader(data))))}};var I=(()=>{if(void 0!==I)return I;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==e)return e;throw"Unable to locate global object"})();const w=I.atob||(e=>I.Buffer.from(e,"base64").toString("binary"));const _=I.btoa||(e=>I.Buffer.from(e,"binary").toString("base64"));c.default.util.Long!==o.default&&(c.default.util.Long=o.default,c.default.configure())}).call(this,n(3))},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MsgClientImpl=t.MsgFundCommunityPoolResponse=t.MsgFundCommunityPool=t.MsgWithdrawValidatorCommissionResponse=t.MsgWithdrawValidatorCommission=t.MsgWithdrawDelegatorRewardResponse=t.MsgWithdrawDelegatorReward=t.MsgSetWithdrawAddressResponse=t.MsgSetWithdrawAddress=t.protobufPackage=void 0;const o=r(n(1)),c=r(n(2)),l=n(28);t.protobufPackage="cosmos.distribution.v1beta1";const d={delegatorAddress:"",withdrawAddress:""};t.MsgSetWithdrawAddress={encode:(e,t=c.default.Writer.create())=>(""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),""!==e.withdrawAddress&&t.uint32(18).string(e.withdrawAddress),t),decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},d);for(;t.pos>>3){case 1:r.delegatorAddress=t.string();break;case 2:r.withdrawAddress=t.string();break;default:t.skipType(7&e)}}return r},fromJSON(object){const e=Object.assign({},d);return e.delegatorAddress=void 0!==object.delegatorAddress&&null!==object.delegatorAddress?String(object.delegatorAddress):"",e.withdrawAddress=void 0!==object.withdrawAddress&&null!==object.withdrawAddress?String(object.withdrawAddress):"",e},toJSON(e){const t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.withdrawAddress&&(t.withdrawAddress=e.withdrawAddress),t},fromPartial(object){var e,t;const n=Object.assign({},d);return n.delegatorAddress=null!==(e=object.delegatorAddress)&&void 0!==e?e:"",n.withdrawAddress=null!==(t=object.withdrawAddress)&&void 0!==t?t:"",n}};const f={};t.MsgSetWithdrawAddressResponse={encode:(e,t=c.default.Writer.create())=>t,decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},f);for(;t.posObject.assign({},f),toJSON:e=>({}),fromPartial:e=>Object.assign({},f)};const h={delegatorAddress:"",validatorAddress:""};t.MsgWithdrawDelegatorReward={encode:(e,t=c.default.Writer.create())=>(""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),""!==e.validatorAddress&&t.uint32(18).string(e.validatorAddress),t),decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},h);for(;t.pos>>3){case 1:r.delegatorAddress=t.string();break;case 2:r.validatorAddress=t.string();break;default:t.skipType(7&e)}}return r},fromJSON(object){const e=Object.assign({},h);return e.delegatorAddress=void 0!==object.delegatorAddress&&null!==object.delegatorAddress?String(object.delegatorAddress):"",e.validatorAddress=void 0!==object.validatorAddress&&null!==object.validatorAddress?String(object.validatorAddress):"",e},toJSON(e){const t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),t},fromPartial(object){var e,t;const n=Object.assign({},h);return n.delegatorAddress=null!==(e=object.delegatorAddress)&&void 0!==e?e:"",n.validatorAddress=null!==(t=object.validatorAddress)&&void 0!==t?t:"",n}};const A={};t.MsgWithdrawDelegatorRewardResponse={encode:(e,t=c.default.Writer.create())=>t,decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},A);for(;t.posObject.assign({},A),toJSON:e=>({}),fromPartial:e=>Object.assign({},A)};const m={validatorAddress:""};t.MsgWithdrawValidatorCommission={encode:(e,t=c.default.Writer.create())=>(""!==e.validatorAddress&&t.uint32(10).string(e.validatorAddress),t),decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},m);for(;t.pos>>3==1)r.validatorAddress=t.string();else t.skipType(7&e)}return r},fromJSON(object){const e=Object.assign({},m);return e.validatorAddress=void 0!==object.validatorAddress&&null!==object.validatorAddress?String(object.validatorAddress):"",e},toJSON(e){const t={};return void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),t},fromPartial(object){var e;const t=Object.assign({},m);return t.validatorAddress=null!==(e=object.validatorAddress)&&void 0!==e?e:"",t}};const v={};t.MsgWithdrawValidatorCommissionResponse={encode:(e,t=c.default.Writer.create())=>t,decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},v);for(;t.posObject.assign({},v),toJSON:e=>({}),fromPartial:e=>Object.assign({},v)};const y={depositor:""};t.MsgFundCommunityPool={encode(e,t=c.default.Writer.create()){for(const n of e.amount)l.Coin.encode(n,t.uint32(10).fork()).ldelim();return""!==e.depositor&&t.uint32(18).string(e.depositor),t},decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},y);for(r.amount=[];t.pos>>3){case 1:r.amount.push(l.Coin.decode(t,t.uint32()));break;case 2:r.depositor=t.string();break;default:t.skipType(7&e)}}return r},fromJSON(object){var e;const t=Object.assign({},y);return t.amount=(null!==(e=object.amount)&&void 0!==e?e:[]).map((e=>l.Coin.fromJSON(e))),t.depositor=void 0!==object.depositor&&null!==object.depositor?String(object.depositor):"",t},toJSON(e){const t={};return e.amount?t.amount=e.amount.map((e=>e?l.Coin.toJSON(e):void 0)):t.amount=[],void 0!==e.depositor&&(t.depositor=e.depositor),t},fromPartial(object){var e,t;const n=Object.assign({},y);return n.amount=(null===(e=object.amount)||void 0===e?void 0:e.map((e=>l.Coin.fromPartial(e))))||[],n.depositor=null!==(t=object.depositor)&&void 0!==t?t:"",n}};const I={};t.MsgFundCommunityPoolResponse={encode:(e,t=c.default.Writer.create())=>t,decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},I);for(;t.posObject.assign({},I),toJSON:e=>({}),fromPartial:e=>Object.assign({},I)};t.MsgClientImpl=class{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)}SetWithdrawAddress(e){const data=t.MsgSetWithdrawAddress.encode(e).finish();return this.rpc.request("cosmos.distribution.v1beta1.Msg","SetWithdrawAddress",data).then((data=>t.MsgSetWithdrawAddressResponse.decode(new c.default.Reader(data))))}WithdrawDelegatorReward(e){const data=t.MsgWithdrawDelegatorReward.encode(e).finish();return this.rpc.request("cosmos.distribution.v1beta1.Msg","WithdrawDelegatorReward",data).then((data=>t.MsgWithdrawDelegatorRewardResponse.decode(new c.default.Reader(data))))}WithdrawValidatorCommission(e){const data=t.MsgWithdrawValidatorCommission.encode(e).finish();return this.rpc.request("cosmos.distribution.v1beta1.Msg","WithdrawValidatorCommission",data).then((data=>t.MsgWithdrawValidatorCommissionResponse.decode(new c.default.Reader(data))))}FundCommunityPool(e){const data=t.MsgFundCommunityPool.encode(e).finish();return this.rpc.request("cosmos.distribution.v1beta1.Msg","FundCommunityPool",data).then((data=>t.MsgFundCommunityPoolResponse.decode(new c.default.Reader(data))))}},c.default.util.Long!==o.default&&(c.default.util.Long=o.default,c.default.configure())},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MsgClientImpl=t.MsgTransferResponse=t.MsgTransfer=t.protobufPackage=void 0;const o=r(n(1)),c=r(n(2)),l=n(28),d=n(78);t.protobufPackage="ibc.applications.transfer.v1";const f={sourcePort:"",sourceChannel:"",sender:"",receiver:"",timeoutTimestamp:o.default.UZERO};t.MsgTransfer={encode:(e,t=c.default.Writer.create())=>(""!==e.sourcePort&&t.uint32(10).string(e.sourcePort),""!==e.sourceChannel&&t.uint32(18).string(e.sourceChannel),void 0!==e.token&&l.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&&d.Height.encode(e.timeoutHeight,t.uint32(50).fork()).ldelim(),e.timeoutTimestamp.isZero()||t.uint32(56).uint64(e.timeoutTimestamp),t),decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},f);for(;t.pos>>3){case 1:r.sourcePort=t.string();break;case 2:r.sourceChannel=t.string();break;case 3:r.token=l.Coin.decode(t,t.uint32());break;case 4:r.sender=t.string();break;case 5:r.receiver=t.string();break;case 6:r.timeoutHeight=d.Height.decode(t,t.uint32());break;case 7:r.timeoutTimestamp=t.uint64();break;default:t.skipType(7&e)}}return r},fromJSON(object){const e=Object.assign({},f);return e.sourcePort=void 0!==object.sourcePort&&null!==object.sourcePort?String(object.sourcePort):"",e.sourceChannel=void 0!==object.sourceChannel&&null!==object.sourceChannel?String(object.sourceChannel):"",e.token=void 0!==object.token&&null!==object.token?l.Coin.fromJSON(object.token):void 0,e.sender=void 0!==object.sender&&null!==object.sender?String(object.sender):"",e.receiver=void 0!==object.receiver&&null!==object.receiver?String(object.receiver):"",e.timeoutHeight=void 0!==object.timeoutHeight&&null!==object.timeoutHeight?d.Height.fromJSON(object.timeoutHeight):void 0,e.timeoutTimestamp=void 0!==object.timeoutTimestamp&&null!==object.timeoutTimestamp?o.default.fromString(object.timeoutTimestamp):o.default.UZERO,e},toJSON(e){const 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?l.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?d.Height.toJSON(e.timeoutHeight):void 0),void 0!==e.timeoutTimestamp&&(t.timeoutTimestamp=(e.timeoutTimestamp||o.default.UZERO).toString()),t},fromPartial(object){var e,t,n,r;const c=Object.assign({},f);return c.sourcePort=null!==(e=object.sourcePort)&&void 0!==e?e:"",c.sourceChannel=null!==(t=object.sourceChannel)&&void 0!==t?t:"",c.token=void 0!==object.token&&null!==object.token?l.Coin.fromPartial(object.token):void 0,c.sender=null!==(n=object.sender)&&void 0!==n?n:"",c.receiver=null!==(r=object.receiver)&&void 0!==r?r:"",c.timeoutHeight=void 0!==object.timeoutHeight&&null!==object.timeoutHeight?d.Height.fromPartial(object.timeoutHeight):void 0,c.timeoutTimestamp=void 0!==object.timeoutTimestamp&&null!==object.timeoutTimestamp?o.default.fromValue(object.timeoutTimestamp):o.default.UZERO,c}};const h={};t.MsgTransferResponse={encode:(e,t=c.default.Writer.create())=>t,decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},h);for(;t.posObject.assign({},h),toJSON:e=>({}),fromPartial:e=>Object.assign({},h)};t.MsgClientImpl=class{constructor(e){this.rpc=e,this.Transfer=this.Transfer.bind(this)}Transfer(e){const data=t.MsgTransfer.encode(e).finish();return this.rpc.request("ibc.applications.transfer.v1.Msg","Transfer",data).then((data=>t.MsgTransferResponse.decode(new c.default.Reader(data))))}},c.default.util.Long!==o.default&&(c.default.util.Long=o.default,c.default.configure())},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Version=t.ConnectionPaths=t.ClientPaths=t.Counterparty=t.IdentifiedConnection=t.ConnectionEnd=t.stateToJSON=t.stateFromJSON=t.State=t.protobufPackage=void 0;const o=r(n(1)),c=r(n(2)),l=n(439);var d;function f(object){switch(object){case 0:case"STATE_UNINITIALIZED_UNSPECIFIED":return d.STATE_UNINITIALIZED_UNSPECIFIED;case 1:case"STATE_INIT":return d.STATE_INIT;case 2:case"STATE_TRYOPEN":return d.STATE_TRYOPEN;case 3:case"STATE_OPEN":return d.STATE_OPEN;default:return d.UNRECOGNIZED}}function h(object){switch(object){case d.STATE_UNINITIALIZED_UNSPECIFIED:return"STATE_UNINITIALIZED_UNSPECIFIED";case d.STATE_INIT:return"STATE_INIT";case d.STATE_TRYOPEN:return"STATE_TRYOPEN";case d.STATE_OPEN:return"STATE_OPEN";default:return"UNKNOWN"}}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"}(d=t.State||(t.State={})),t.stateFromJSON=f,t.stateToJSON=h;const A={clientId:"",state:0,delayPeriod:o.default.UZERO};t.ConnectionEnd={encode(e,n=c.default.Writer.create()){""!==e.clientId&&n.uint32(10).string(e.clientId);for(const r of e.versions)t.Version.encode(r,n.uint32(18).fork()).ldelim();return 0!==e.state&&n.uint32(24).int32(e.state),void 0!==e.counterparty&&t.Counterparty.encode(e.counterparty,n.uint32(34).fork()).ldelim(),e.delayPeriod.isZero()||n.uint32(40).uint64(e.delayPeriod),n},decode(input,e){const n=input instanceof c.default.Reader?input:new c.default.Reader(input);let r=void 0===e?n.len:n.pos+e;const o=Object.assign({},A);for(o.versions=[];n.pos>>3){case 1:o.clientId=n.string();break;case 2:o.versions.push(t.Version.decode(n,n.uint32()));break;case 3:o.state=n.int32();break;case 4:o.counterparty=t.Counterparty.decode(n,n.uint32());break;case 5:o.delayPeriod=n.uint64();break;default:n.skipType(7&e)}}return o},fromJSON(object){var e;const n=Object.assign({},A);return n.clientId=void 0!==object.clientId&&null!==object.clientId?String(object.clientId):"",n.versions=(null!==(e=object.versions)&&void 0!==e?e:[]).map((e=>t.Version.fromJSON(e))),n.state=void 0!==object.state&&null!==object.state?f(object.state):0,n.counterparty=void 0!==object.counterparty&&null!==object.counterparty?t.Counterparty.fromJSON(object.counterparty):void 0,n.delayPeriod=void 0!==object.delayPeriod&&null!==object.delayPeriod?o.default.fromString(object.delayPeriod):o.default.UZERO,n},toJSON(e){const n={};return void 0!==e.clientId&&(n.clientId=e.clientId),e.versions?n.versions=e.versions.map((e=>e?t.Version.toJSON(e):void 0)):n.versions=[],void 0!==e.state&&(n.state=h(e.state)),void 0!==e.counterparty&&(n.counterparty=e.counterparty?t.Counterparty.toJSON(e.counterparty):void 0),void 0!==e.delayPeriod&&(n.delayPeriod=(e.delayPeriod||o.default.UZERO).toString()),n},fromPartial(object){var e,n,r;const c=Object.assign({},A);return c.clientId=null!==(e=object.clientId)&&void 0!==e?e:"",c.versions=(null===(n=object.versions)||void 0===n?void 0:n.map((e=>t.Version.fromPartial(e))))||[],c.state=null!==(r=object.state)&&void 0!==r?r:0,c.counterparty=void 0!==object.counterparty&&null!==object.counterparty?t.Counterparty.fromPartial(object.counterparty):void 0,c.delayPeriod=void 0!==object.delayPeriod&&null!==object.delayPeriod?o.default.fromValue(object.delayPeriod):o.default.UZERO,c}};const m={id:"",clientId:"",state:0,delayPeriod:o.default.UZERO};t.IdentifiedConnection={encode(e,n=c.default.Writer.create()){""!==e.id&&n.uint32(10).string(e.id),""!==e.clientId&&n.uint32(18).string(e.clientId);for(const r of e.versions)t.Version.encode(r,n.uint32(26).fork()).ldelim();return 0!==e.state&&n.uint32(32).int32(e.state),void 0!==e.counterparty&&t.Counterparty.encode(e.counterparty,n.uint32(42).fork()).ldelim(),e.delayPeriod.isZero()||n.uint32(48).uint64(e.delayPeriod),n},decode(input,e){const n=input instanceof c.default.Reader?input:new c.default.Reader(input);let r=void 0===e?n.len:n.pos+e;const o=Object.assign({},m);for(o.versions=[];n.pos>>3){case 1:o.id=n.string();break;case 2:o.clientId=n.string();break;case 3:o.versions.push(t.Version.decode(n,n.uint32()));break;case 4:o.state=n.int32();break;case 5:o.counterparty=t.Counterparty.decode(n,n.uint32());break;case 6:o.delayPeriod=n.uint64();break;default:n.skipType(7&e)}}return o},fromJSON(object){var e;const n=Object.assign({},m);return n.id=void 0!==object.id&&null!==object.id?String(object.id):"",n.clientId=void 0!==object.clientId&&null!==object.clientId?String(object.clientId):"",n.versions=(null!==(e=object.versions)&&void 0!==e?e:[]).map((e=>t.Version.fromJSON(e))),n.state=void 0!==object.state&&null!==object.state?f(object.state):0,n.counterparty=void 0!==object.counterparty&&null!==object.counterparty?t.Counterparty.fromJSON(object.counterparty):void 0,n.delayPeriod=void 0!==object.delayPeriod&&null!==object.delayPeriod?o.default.fromString(object.delayPeriod):o.default.UZERO,n},toJSON(e){const n={};return void 0!==e.id&&(n.id=e.id),void 0!==e.clientId&&(n.clientId=e.clientId),e.versions?n.versions=e.versions.map((e=>e?t.Version.toJSON(e):void 0)):n.versions=[],void 0!==e.state&&(n.state=h(e.state)),void 0!==e.counterparty&&(n.counterparty=e.counterparty?t.Counterparty.toJSON(e.counterparty):void 0),void 0!==e.delayPeriod&&(n.delayPeriod=(e.delayPeriod||o.default.UZERO).toString()),n},fromPartial(object){var e,n,r,c;const l=Object.assign({},m);return l.id=null!==(e=object.id)&&void 0!==e?e:"",l.clientId=null!==(n=object.clientId)&&void 0!==n?n:"",l.versions=(null===(r=object.versions)||void 0===r?void 0:r.map((e=>t.Version.fromPartial(e))))||[],l.state=null!==(c=object.state)&&void 0!==c?c:0,l.counterparty=void 0!==object.counterparty&&null!==object.counterparty?t.Counterparty.fromPartial(object.counterparty):void 0,l.delayPeriod=void 0!==object.delayPeriod&&null!==object.delayPeriod?o.default.fromValue(object.delayPeriod):o.default.UZERO,l}};const v={clientId:"",connectionId:""};t.Counterparty={encode:(e,t=c.default.Writer.create())=>(""!==e.clientId&&t.uint32(10).string(e.clientId),""!==e.connectionId&&t.uint32(18).string(e.connectionId),void 0!==e.prefix&&l.MerklePrefix.encode(e.prefix,t.uint32(26).fork()).ldelim(),t),decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},v);for(;t.pos>>3){case 1:r.clientId=t.string();break;case 2:r.connectionId=t.string();break;case 3:r.prefix=l.MerklePrefix.decode(t,t.uint32());break;default:t.skipType(7&e)}}return r},fromJSON(object){const e=Object.assign({},v);return e.clientId=void 0!==object.clientId&&null!==object.clientId?String(object.clientId):"",e.connectionId=void 0!==object.connectionId&&null!==object.connectionId?String(object.connectionId):"",e.prefix=void 0!==object.prefix&&null!==object.prefix?l.MerklePrefix.fromJSON(object.prefix):void 0,e},toJSON(e){const 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?l.MerklePrefix.toJSON(e.prefix):void 0),t},fromPartial(object){var e,t;const n=Object.assign({},v);return n.clientId=null!==(e=object.clientId)&&void 0!==e?e:"",n.connectionId=null!==(t=object.connectionId)&&void 0!==t?t:"",n.prefix=void 0!==object.prefix&&null!==object.prefix?l.MerklePrefix.fromPartial(object.prefix):void 0,n}};const y={paths:""};t.ClientPaths={encode(e,t=c.default.Writer.create()){for(const n of e.paths)t.uint32(10).string(n);return t},decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},y);for(r.paths=[];t.pos>>3==1)r.paths.push(t.string());else t.skipType(7&e)}return r},fromJSON(object){var e;const t=Object.assign({},y);return t.paths=(null!==(e=object.paths)&&void 0!==e?e:[]).map((e=>String(e))),t},toJSON(e){const t={};return e.paths?t.paths=e.paths.map((e=>e)):t.paths=[],t},fromPartial(object){var e;const t=Object.assign({},y);return t.paths=(null===(e=object.paths)||void 0===e?void 0:e.map((e=>e)))||[],t}};const I={clientId:"",paths:""};t.ConnectionPaths={encode(e,t=c.default.Writer.create()){""!==e.clientId&&t.uint32(10).string(e.clientId);for(const n of e.paths)t.uint32(18).string(n);return t},decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},I);for(r.paths=[];t.pos>>3){case 1:r.clientId=t.string();break;case 2:r.paths.push(t.string());break;default:t.skipType(7&e)}}return r},fromJSON(object){var e;const t=Object.assign({},I);return t.clientId=void 0!==object.clientId&&null!==object.clientId?String(object.clientId):"",t.paths=(null!==(e=object.paths)&&void 0!==e?e:[]).map((e=>String(e))),t},toJSON(e){const t={};return void 0!==e.clientId&&(t.clientId=e.clientId),e.paths?t.paths=e.paths.map((e=>e)):t.paths=[],t},fromPartial(object){var e,t;const n=Object.assign({},I);return n.clientId=null!==(e=object.clientId)&&void 0!==e?e:"",n.paths=(null===(t=object.paths)||void 0===t?void 0:t.map((e=>e)))||[],n}};const w={identifier:"",features:""};t.Version={encode(e,t=c.default.Writer.create()){""!==e.identifier&&t.uint32(10).string(e.identifier);for(const n of e.features)t.uint32(18).string(n);return t},decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},w);for(r.features=[];t.pos>>3){case 1:r.identifier=t.string();break;case 2:r.features.push(t.string());break;default:t.skipType(7&e)}}return r},fromJSON(object){var e;const t=Object.assign({},w);return t.identifier=void 0!==object.identifier&&null!==object.identifier?String(object.identifier):"",t.features=(null!==(e=object.features)&&void 0!==e?e:[]).map((e=>String(e))),t},toJSON(e){const t={};return void 0!==e.identifier&&(t.identifier=e.identifier),e.features?t.features=e.features.map((e=>e)):t.features=[],t},fromPartial(object){var e,t;const n=Object.assign({},w);return n.identifier=null!==(e=object.identifier)&&void 0!==e?e:"",n.features=(null===(t=object.features)||void 0===t?void 0:t.map((e=>e)))||[],n}},c.default.util.Long!==o.default&&(c.default.util.Long=o.default,c.default.configure())},function(e,t,n){"use strict";(function(e){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MerkleProof=t.MerklePath=t.MerklePrefix=t.MerkleRoot=t.protobufPackage=void 0;const o=r(n(1)),c=r(n(2)),l=n(440);t.protobufPackage="ibc.core.commitment.v1";const d={};t.MerkleRoot={encode:(e,t=c.default.Writer.create())=>(0!==e.hash.length&&t.uint32(10).bytes(e.hash),t),decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},d);for(r.hash=new Uint8Array;t.pos>>3==1)r.hash=t.bytes();else t.skipType(7&e)}return r},fromJSON(object){const e=Object.assign({},d);return e.hash=void 0!==object.hash&&null!==object.hash?y(object.hash):new Uint8Array,e},toJSON(e){const t={};return void 0!==e.hash&&(t.hash=w(void 0!==e.hash?e.hash:new Uint8Array)),t},fromPartial(object){var e;const t=Object.assign({},d);return t.hash=null!==(e=object.hash)&&void 0!==e?e:new Uint8Array,t}};const f={};t.MerklePrefix={encode:(e,t=c.default.Writer.create())=>(0!==e.keyPrefix.length&&t.uint32(10).bytes(e.keyPrefix),t),decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},f);for(r.keyPrefix=new Uint8Array;t.pos>>3==1)r.keyPrefix=t.bytes();else t.skipType(7&e)}return r},fromJSON(object){const e=Object.assign({},f);return e.keyPrefix=void 0!==object.keyPrefix&&null!==object.keyPrefix?y(object.keyPrefix):new Uint8Array,e},toJSON(e){const t={};return void 0!==e.keyPrefix&&(t.keyPrefix=w(void 0!==e.keyPrefix?e.keyPrefix:new Uint8Array)),t},fromPartial(object){var e;const t=Object.assign({},f);return t.keyPrefix=null!==(e=object.keyPrefix)&&void 0!==e?e:new Uint8Array,t}};const h={keyPath:""};t.MerklePath={encode(e,t=c.default.Writer.create()){for(const n of e.keyPath)t.uint32(10).string(n);return t},decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},h);for(r.keyPath=[];t.pos>>3==1)r.keyPath.push(t.string());else t.skipType(7&e)}return r},fromJSON(object){var e;const t=Object.assign({},h);return t.keyPath=(null!==(e=object.keyPath)&&void 0!==e?e:[]).map((e=>String(e))),t},toJSON(e){const t={};return e.keyPath?t.keyPath=e.keyPath.map((e=>e)):t.keyPath=[],t},fromPartial(object){var e;const t=Object.assign({},h);return t.keyPath=(null===(e=object.keyPath)||void 0===e?void 0:e.map((e=>e)))||[],t}};const A={};t.MerkleProof={encode(e,t=c.default.Writer.create()){for(const n of e.proofs)l.CommitmentProof.encode(n,t.uint32(10).fork()).ldelim();return t},decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},A);for(r.proofs=[];t.pos>>3==1)r.proofs.push(l.CommitmentProof.decode(t,t.uint32()));else t.skipType(7&e)}return r},fromJSON(object){var e;const t=Object.assign({},A);return t.proofs=(null!==(e=object.proofs)&&void 0!==e?e:[]).map((e=>l.CommitmentProof.fromJSON(e))),t},toJSON(e){const t={};return e.proofs?t.proofs=e.proofs.map((e=>e?l.CommitmentProof.toJSON(e):void 0)):t.proofs=[],t},fromPartial(object){var e;const t=Object.assign({},A);return t.proofs=(null===(e=object.proofs)||void 0===e?void 0:e.map((e=>l.CommitmentProof.fromPartial(e))))||[],t}};var m=(()=>{if(void 0!==m)return m;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==e)return e;throw"Unable to locate global object"})();const v=m.atob||(e=>m.Buffer.from(e,"base64").toString("binary"));function y(e){const t=v(e),n=new Uint8Array(t.length);for(let i=0;im.Buffer.from(e,"binary").toString("base64"));function w(e){const t=[];for(const n of e)t.push(String.fromCharCode(n));return I(t.join(""))}c.default.util.Long!==o.default&&(c.default.util.Long=o.default,c.default.configure())}).call(this,n(3))},function(e,t,n){"use strict";(function(e){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};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;const o=r(n(1)),c=r(n(2));var l,d;function f(object){switch(object){case 0:case"NO_HASH":return l.NO_HASH;case 1:case"SHA256":return l.SHA256;case 2:case"SHA512":return l.SHA512;case 3:case"KECCAK":return l.KECCAK;case 4:case"RIPEMD160":return l.RIPEMD160;case 5:case"BITCOIN":return l.BITCOIN;default:return l.UNRECOGNIZED}}function h(object){switch(object){case l.NO_HASH:return"NO_HASH";case l.SHA256:return"SHA256";case l.SHA512:return"SHA512";case l.KECCAK:return"KECCAK";case l.RIPEMD160:return"RIPEMD160";case l.BITCOIN:return"BITCOIN";default:return"UNKNOWN"}}function A(object){switch(object){case 0:case"NO_PREFIX":return d.NO_PREFIX;case 1:case"VAR_PROTO":return d.VAR_PROTO;case 2:case"VAR_RLP":return d.VAR_RLP;case 3:case"FIXED32_BIG":return d.FIXED32_BIG;case 4:case"FIXED32_LITTLE":return d.FIXED32_LITTLE;case 5:case"FIXED64_BIG":return d.FIXED64_BIG;case 6:case"FIXED64_LITTLE":return d.FIXED64_LITTLE;case 7:case"REQUIRE_32_BYTES":return d.REQUIRE_32_BYTES;case 8:case"REQUIRE_64_BYTES":return d.REQUIRE_64_BYTES;default:return d.UNRECOGNIZED}}function m(object){switch(object){case d.NO_PREFIX:return"NO_PREFIX";case d.VAR_PROTO:return"VAR_PROTO";case d.VAR_RLP:return"VAR_RLP";case d.FIXED32_BIG:return"FIXED32_BIG";case d.FIXED32_LITTLE:return"FIXED32_LITTLE";case d.FIXED64_BIG:return"FIXED64_BIG";case d.FIXED64_LITTLE:return"FIXED64_LITTLE";case d.REQUIRE_32_BYTES:return"REQUIRE_32_BYTES";case d.REQUIRE_64_BYTES:return"REQUIRE_64_BYTES";default:return"UNKNOWN"}}t.protobufPackage="ics23",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.UNRECOGNIZED=-1]="UNRECOGNIZED"}(l=t.HashOp||(t.HashOp={})),t.hashOpFromJSON=f,t.hashOpToJSON=h,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"}(d=t.LengthOp||(t.LengthOp={})),t.lengthOpFromJSON=A,t.lengthOpToJSON=m;const v={};t.ExistenceProof={encode(e,n=c.default.Writer.create()){0!==e.key.length&&n.uint32(10).bytes(e.key),0!==e.value.length&&n.uint32(18).bytes(e.value),void 0!==e.leaf&&t.LeafOp.encode(e.leaf,n.uint32(26).fork()).ldelim();for(const r of e.path)t.InnerOp.encode(r,n.uint32(34).fork()).ldelim();return n},decode(input,e){const n=input instanceof c.default.Reader?input:new c.default.Reader(input);let r=void 0===e?n.len:n.pos+e;const o=Object.assign({},v);for(o.path=[],o.key=new Uint8Array,o.value=new Uint8Array;n.pos>>3){case 1:o.key=n.bytes();break;case 2:o.value=n.bytes();break;case 3:o.leaf=t.LeafOp.decode(n,n.uint32());break;case 4:o.path.push(t.InnerOp.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return o},fromJSON(object){var e;const n=Object.assign({},v);return n.key=void 0!==object.key&&null!==object.key?Q(object.key):new Uint8Array,n.value=void 0!==object.value&&null!==object.value?Q(object.value):new Uint8Array,n.leaf=void 0!==object.leaf&&null!==object.leaf?t.LeafOp.fromJSON(object.leaf):void 0,n.path=(null!==(e=object.path)&&void 0!==e?e:[]).map((e=>t.InnerOp.fromJSON(e))),n},toJSON(e){const n={};return void 0!==e.key&&(n.key=D(void 0!==e.key?e.key:new Uint8Array)),void 0!==e.value&&(n.value=D(void 0!==e.value?e.value:new Uint8Array)),void 0!==e.leaf&&(n.leaf=e.leaf?t.LeafOp.toJSON(e.leaf):void 0),e.path?n.path=e.path.map((e=>e?t.InnerOp.toJSON(e):void 0)):n.path=[],n},fromPartial(object){var e,n,r;const o=Object.assign({},v);return o.key=null!==(e=object.key)&&void 0!==e?e:new Uint8Array,o.value=null!==(n=object.value)&&void 0!==n?n:new Uint8Array,o.leaf=void 0!==object.leaf&&null!==object.leaf?t.LeafOp.fromPartial(object.leaf):void 0,o.path=(null===(r=object.path)||void 0===r?void 0:r.map((e=>t.InnerOp.fromPartial(e))))||[],o}};const y={};t.NonExistenceProof={encode:(e,n=c.default.Writer.create())=>(0!==e.key.length&&n.uint32(10).bytes(e.key),void 0!==e.left&&t.ExistenceProof.encode(e.left,n.uint32(18).fork()).ldelim(),void 0!==e.right&&t.ExistenceProof.encode(e.right,n.uint32(26).fork()).ldelim(),n),decode(input,e){const n=input instanceof c.default.Reader?input:new c.default.Reader(input);let r=void 0===e?n.len:n.pos+e;const o=Object.assign({},y);for(o.key=new Uint8Array;n.pos>>3){case 1:o.key=n.bytes();break;case 2:o.left=t.ExistenceProof.decode(n,n.uint32());break;case 3:o.right=t.ExistenceProof.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(object){const e=Object.assign({},y);return e.key=void 0!==object.key&&null!==object.key?Q(object.key):new Uint8Array,e.left=void 0!==object.left&&null!==object.left?t.ExistenceProof.fromJSON(object.left):void 0,e.right=void 0!==object.right&&null!==object.right?t.ExistenceProof.fromJSON(object.right):void 0,e},toJSON(e){const n={};return void 0!==e.key&&(n.key=D(void 0!==e.key?e.key:new Uint8Array)),void 0!==e.left&&(n.left=e.left?t.ExistenceProof.toJSON(e.left):void 0),void 0!==e.right&&(n.right=e.right?t.ExistenceProof.toJSON(e.right):void 0),n},fromPartial(object){var e;const n=Object.assign({},y);return n.key=null!==(e=object.key)&&void 0!==e?e:new Uint8Array,n.left=void 0!==object.left&&null!==object.left?t.ExistenceProof.fromPartial(object.left):void 0,n.right=void 0!==object.right&&null!==object.right?t.ExistenceProof.fromPartial(object.right):void 0,n}};const I={};t.CommitmentProof={encode:(e,n=c.default.Writer.create())=>(void 0!==e.exist&&t.ExistenceProof.encode(e.exist,n.uint32(10).fork()).ldelim(),void 0!==e.nonexist&&t.NonExistenceProof.encode(e.nonexist,n.uint32(18).fork()).ldelim(),void 0!==e.batch&&t.BatchProof.encode(e.batch,n.uint32(26).fork()).ldelim(),void 0!==e.compressed&&t.CompressedBatchProof.encode(e.compressed,n.uint32(34).fork()).ldelim(),n),decode(input,e){const n=input instanceof c.default.Reader?input:new c.default.Reader(input);let r=void 0===e?n.len:n.pos+e;const o=Object.assign({},I);for(;n.pos>>3){case 1:o.exist=t.ExistenceProof.decode(n,n.uint32());break;case 2:o.nonexist=t.NonExistenceProof.decode(n,n.uint32());break;case 3:o.batch=t.BatchProof.decode(n,n.uint32());break;case 4:o.compressed=t.CompressedBatchProof.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(object){const e=Object.assign({},I);return e.exist=void 0!==object.exist&&null!==object.exist?t.ExistenceProof.fromJSON(object.exist):void 0,e.nonexist=void 0!==object.nonexist&&null!==object.nonexist?t.NonExistenceProof.fromJSON(object.nonexist):void 0,e.batch=void 0!==object.batch&&null!==object.batch?t.BatchProof.fromJSON(object.batch):void 0,e.compressed=void 0!==object.compressed&&null!==object.compressed?t.CompressedBatchProof.fromJSON(object.compressed):void 0,e},toJSON(e){const n={};return void 0!==e.exist&&(n.exist=e.exist?t.ExistenceProof.toJSON(e.exist):void 0),void 0!==e.nonexist&&(n.nonexist=e.nonexist?t.NonExistenceProof.toJSON(e.nonexist):void 0),void 0!==e.batch&&(n.batch=e.batch?t.BatchProof.toJSON(e.batch):void 0),void 0!==e.compressed&&(n.compressed=e.compressed?t.CompressedBatchProof.toJSON(e.compressed):void 0),n},fromPartial(object){const e=Object.assign({},I);return e.exist=void 0!==object.exist&&null!==object.exist?t.ExistenceProof.fromPartial(object.exist):void 0,e.nonexist=void 0!==object.nonexist&&null!==object.nonexist?t.NonExistenceProof.fromPartial(object.nonexist):void 0,e.batch=void 0!==object.batch&&null!==object.batch?t.BatchProof.fromPartial(object.batch):void 0,e.compressed=void 0!==object.compressed&&null!==object.compressed?t.CompressedBatchProof.fromPartial(object.compressed):void 0,e}};const w={hash:0,prehashKey:0,prehashValue:0,length:0};t.LeafOp={encode:(e,t=c.default.Writer.create())=>(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(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},w);for(r.prefix=new Uint8Array;t.pos>>3){case 1:r.hash=t.int32();break;case 2:r.prehashKey=t.int32();break;case 3:r.prehashValue=t.int32();break;case 4:r.length=t.int32();break;case 5:r.prefix=t.bytes();break;default:t.skipType(7&e)}}return r},fromJSON(object){const e=Object.assign({},w);return e.hash=void 0!==object.hash&&null!==object.hash?f(object.hash):0,e.prehashKey=void 0!==object.prehashKey&&null!==object.prehashKey?f(object.prehashKey):0,e.prehashValue=void 0!==object.prehashValue&&null!==object.prehashValue?f(object.prehashValue):0,e.length=void 0!==object.length&&null!==object.length?A(object.length):0,e.prefix=void 0!==object.prefix&&null!==object.prefix?Q(object.prefix):new Uint8Array,e},toJSON(e){const t={};return void 0!==e.hash&&(t.hash=h(e.hash)),void 0!==e.prehashKey&&(t.prehashKey=h(e.prehashKey)),void 0!==e.prehashValue&&(t.prehashValue=h(e.prehashValue)),void 0!==e.length&&(t.length=m(e.length)),void 0!==e.prefix&&(t.prefix=D(void 0!==e.prefix?e.prefix:new Uint8Array)),t},fromPartial(object){var e,t,n,r,o;const c=Object.assign({},w);return c.hash=null!==(e=object.hash)&&void 0!==e?e:0,c.prehashKey=null!==(t=object.prehashKey)&&void 0!==t?t:0,c.prehashValue=null!==(n=object.prehashValue)&&void 0!==n?n:0,c.length=null!==(r=object.length)&&void 0!==r?r:0,c.prefix=null!==(o=object.prefix)&&void 0!==o?o:new Uint8Array,c}};const _={hash:0};t.InnerOp={encode:(e,t=c.default.Writer.create())=>(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(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},_);for(r.prefix=new Uint8Array,r.suffix=new Uint8Array;t.pos>>3){case 1:r.hash=t.int32();break;case 2:r.prefix=t.bytes();break;case 3:r.suffix=t.bytes();break;default:t.skipType(7&e)}}return r},fromJSON(object){const e=Object.assign({},_);return e.hash=void 0!==object.hash&&null!==object.hash?f(object.hash):0,e.prefix=void 0!==object.prefix&&null!==object.prefix?Q(object.prefix):new Uint8Array,e.suffix=void 0!==object.suffix&&null!==object.suffix?Q(object.suffix):new Uint8Array,e},toJSON(e){const t={};return void 0!==e.hash&&(t.hash=h(e.hash)),void 0!==e.prefix&&(t.prefix=D(void 0!==e.prefix?e.prefix:new Uint8Array)),void 0!==e.suffix&&(t.suffix=D(void 0!==e.suffix?e.suffix:new Uint8Array)),t},fromPartial(object){var e,t,n;const r=Object.assign({},_);return r.hash=null!==(e=object.hash)&&void 0!==e?e:0,r.prefix=null!==(t=object.prefix)&&void 0!==t?t:new Uint8Array,r.suffix=null!==(n=object.suffix)&&void 0!==n?n:new Uint8Array,r}};const C={maxDepth:0,minDepth:0};t.ProofSpec={encode:(e,n=c.default.Writer.create())=>(void 0!==e.leafSpec&&t.LeafOp.encode(e.leafSpec,n.uint32(10).fork()).ldelim(),void 0!==e.innerSpec&&t.InnerSpec.encode(e.innerSpec,n.uint32(18).fork()).ldelim(),0!==e.maxDepth&&n.uint32(24).int32(e.maxDepth),0!==e.minDepth&&n.uint32(32).int32(e.minDepth),n),decode(input,e){const n=input instanceof c.default.Reader?input:new c.default.Reader(input);let r=void 0===e?n.len:n.pos+e;const o=Object.assign({},C);for(;n.pos>>3){case 1:o.leafSpec=t.LeafOp.decode(n,n.uint32());break;case 2:o.innerSpec=t.InnerSpec.decode(n,n.uint32());break;case 3:o.maxDepth=n.int32();break;case 4:o.minDepth=n.int32();break;default:n.skipType(7&e)}}return o},fromJSON(object){const e=Object.assign({},C);return e.leafSpec=void 0!==object.leafSpec&&null!==object.leafSpec?t.LeafOp.fromJSON(object.leafSpec):void 0,e.innerSpec=void 0!==object.innerSpec&&null!==object.innerSpec?t.InnerSpec.fromJSON(object.innerSpec):void 0,e.maxDepth=void 0!==object.maxDepth&&null!==object.maxDepth?Number(object.maxDepth):0,e.minDepth=void 0!==object.minDepth&&null!==object.minDepth?Number(object.minDepth):0,e},toJSON(e){const n={};return void 0!==e.leafSpec&&(n.leafSpec=e.leafSpec?t.LeafOp.toJSON(e.leafSpec):void 0),void 0!==e.innerSpec&&(n.innerSpec=e.innerSpec?t.InnerSpec.toJSON(e.innerSpec):void 0),void 0!==e.maxDepth&&(n.maxDepth=e.maxDepth),void 0!==e.minDepth&&(n.minDepth=e.minDepth),n},fromPartial(object){var e,n;const r=Object.assign({},C);return r.leafSpec=void 0!==object.leafSpec&&null!==object.leafSpec?t.LeafOp.fromPartial(object.leafSpec):void 0,r.innerSpec=void 0!==object.innerSpec&&null!==object.innerSpec?t.InnerSpec.fromPartial(object.innerSpec):void 0,r.maxDepth=null!==(e=object.maxDepth)&&void 0!==e?e:0,r.minDepth=null!==(n=object.minDepth)&&void 0!==n?n:0,r}};const S={childOrder:0,childSize:0,minPrefixLength:0,maxPrefixLength:0,hash:0};t.InnerSpec={encode(e,t=c.default.Writer.create()){t.uint32(10).fork();for(const n of e.childOrder)t.int32(n);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(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},S);for(r.childOrder=[],r.emptyChild=new Uint8Array;t.pos>>3){case 1:if(2==(7&e)){const e=t.uint32()+t.pos;for(;t.posNumber(e))),t.childSize=void 0!==object.childSize&&null!==object.childSize?Number(object.childSize):0,t.minPrefixLength=void 0!==object.minPrefixLength&&null!==object.minPrefixLength?Number(object.minPrefixLength):0,t.maxPrefixLength=void 0!==object.maxPrefixLength&&null!==object.maxPrefixLength?Number(object.maxPrefixLength):0,t.emptyChild=void 0!==object.emptyChild&&null!==object.emptyChild?Q(object.emptyChild):new Uint8Array,t.hash=void 0!==object.hash&&null!==object.hash?f(object.hash):0,t},toJSON(e){const t={};return e.childOrder?t.childOrder=e.childOrder.map((e=>e)):t.childOrder=[],void 0!==e.childSize&&(t.childSize=e.childSize),void 0!==e.minPrefixLength&&(t.minPrefixLength=e.minPrefixLength),void 0!==e.maxPrefixLength&&(t.maxPrefixLength=e.maxPrefixLength),void 0!==e.emptyChild&&(t.emptyChild=D(void 0!==e.emptyChild?e.emptyChild:new Uint8Array)),void 0!==e.hash&&(t.hash=h(e.hash)),t},fromPartial(object){var e,t,n,r,o,c;const l=Object.assign({},S);return l.childOrder=(null===(e=object.childOrder)||void 0===e?void 0:e.map((e=>e)))||[],l.childSize=null!==(t=object.childSize)&&void 0!==t?t:0,l.minPrefixLength=null!==(n=object.minPrefixLength)&&void 0!==n?n:0,l.maxPrefixLength=null!==(r=object.maxPrefixLength)&&void 0!==r?r:0,l.emptyChild=null!==(o=object.emptyChild)&&void 0!==o?o:new Uint8Array,l.hash=null!==(c=object.hash)&&void 0!==c?c:0,l}};const E={};t.BatchProof={encode(e,n=c.default.Writer.create()){for(const r of e.entries)t.BatchEntry.encode(r,n.uint32(10).fork()).ldelim();return n},decode(input,e){const n=input instanceof c.default.Reader?input:new c.default.Reader(input);let r=void 0===e?n.len:n.pos+e;const o=Object.assign({},E);for(o.entries=[];n.pos>>3==1)o.entries.push(t.BatchEntry.decode(n,n.uint32()));else n.skipType(7&e)}return o},fromJSON(object){var e;const n=Object.assign({},E);return n.entries=(null!==(e=object.entries)&&void 0!==e?e:[]).map((e=>t.BatchEntry.fromJSON(e))),n},toJSON(e){const n={};return e.entries?n.entries=e.entries.map((e=>e?t.BatchEntry.toJSON(e):void 0)):n.entries=[],n},fromPartial(object){var e;const n=Object.assign({},E);return n.entries=(null===(e=object.entries)||void 0===e?void 0:e.map((e=>t.BatchEntry.fromPartial(e))))||[],n}};const B={};t.BatchEntry={encode:(e,n=c.default.Writer.create())=>(void 0!==e.exist&&t.ExistenceProof.encode(e.exist,n.uint32(10).fork()).ldelim(),void 0!==e.nonexist&&t.NonExistenceProof.encode(e.nonexist,n.uint32(18).fork()).ldelim(),n),decode(input,e){const n=input instanceof c.default.Reader?input:new c.default.Reader(input);let r=void 0===e?n.len:n.pos+e;const o=Object.assign({},B);for(;n.pos>>3){case 1:o.exist=t.ExistenceProof.decode(n,n.uint32());break;case 2:o.nonexist=t.NonExistenceProof.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(object){const e=Object.assign({},B);return e.exist=void 0!==object.exist&&null!==object.exist?t.ExistenceProof.fromJSON(object.exist):void 0,e.nonexist=void 0!==object.nonexist&&null!==object.nonexist?t.NonExistenceProof.fromJSON(object.nonexist):void 0,e},toJSON(e){const n={};return void 0!==e.exist&&(n.exist=e.exist?t.ExistenceProof.toJSON(e.exist):void 0),void 0!==e.nonexist&&(n.nonexist=e.nonexist?t.NonExistenceProof.toJSON(e.nonexist):void 0),n},fromPartial(object){const e=Object.assign({},B);return e.exist=void 0!==object.exist&&null!==object.exist?t.ExistenceProof.fromPartial(object.exist):void 0,e.nonexist=void 0!==object.nonexist&&null!==object.nonexist?t.NonExistenceProof.fromPartial(object.nonexist):void 0,e}};const k={};t.CompressedBatchProof={encode(e,n=c.default.Writer.create()){for(const r of e.entries)t.CompressedBatchEntry.encode(r,n.uint32(10).fork()).ldelim();for(const r of e.lookupInners)t.InnerOp.encode(r,n.uint32(18).fork()).ldelim();return n},decode(input,e){const n=input instanceof c.default.Reader?input:new c.default.Reader(input);let r=void 0===e?n.len:n.pos+e;const o=Object.assign({},k);for(o.entries=[],o.lookupInners=[];n.pos>>3){case 1:o.entries.push(t.CompressedBatchEntry.decode(n,n.uint32()));break;case 2:o.lookupInners.push(t.InnerOp.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return o},fromJSON(object){var e,n;const r=Object.assign({},k);return r.entries=(null!==(e=object.entries)&&void 0!==e?e:[]).map((e=>t.CompressedBatchEntry.fromJSON(e))),r.lookupInners=(null!==(n=object.lookupInners)&&void 0!==n?n:[]).map((e=>t.InnerOp.fromJSON(e))),r},toJSON(e){const n={};return e.entries?n.entries=e.entries.map((e=>e?t.CompressedBatchEntry.toJSON(e):void 0)):n.entries=[],e.lookupInners?n.lookupInners=e.lookupInners.map((e=>e?t.InnerOp.toJSON(e):void 0)):n.lookupInners=[],n},fromPartial(object){var e,n;const r=Object.assign({},k);return r.entries=(null===(e=object.entries)||void 0===e?void 0:e.map((e=>t.CompressedBatchEntry.fromPartial(e))))||[],r.lookupInners=(null===(n=object.lookupInners)||void 0===n?void 0:n.map((e=>t.InnerOp.fromPartial(e))))||[],r}};const O={};t.CompressedBatchEntry={encode:(e,n=c.default.Writer.create())=>(void 0!==e.exist&&t.CompressedExistenceProof.encode(e.exist,n.uint32(10).fork()).ldelim(),void 0!==e.nonexist&&t.CompressedNonExistenceProof.encode(e.nonexist,n.uint32(18).fork()).ldelim(),n),decode(input,e){const n=input instanceof c.default.Reader?input:new c.default.Reader(input);let r=void 0===e?n.len:n.pos+e;const o=Object.assign({},O);for(;n.pos>>3){case 1:o.exist=t.CompressedExistenceProof.decode(n,n.uint32());break;case 2:o.nonexist=t.CompressedNonExistenceProof.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(object){const e=Object.assign({},O);return e.exist=void 0!==object.exist&&null!==object.exist?t.CompressedExistenceProof.fromJSON(object.exist):void 0,e.nonexist=void 0!==object.nonexist&&null!==object.nonexist?t.CompressedNonExistenceProof.fromJSON(object.nonexist):void 0,e},toJSON(e){const n={};return void 0!==e.exist&&(n.exist=e.exist?t.CompressedExistenceProof.toJSON(e.exist):void 0),void 0!==e.nonexist&&(n.nonexist=e.nonexist?t.CompressedNonExistenceProof.toJSON(e.nonexist):void 0),n},fromPartial(object){const e=Object.assign({},O);return e.exist=void 0!==object.exist&&null!==object.exist?t.CompressedExistenceProof.fromPartial(object.exist):void 0,e.nonexist=void 0!==object.nonexist&&null!==object.nonexist?t.CompressedNonExistenceProof.fromPartial(object.nonexist):void 0,e}};const R={path:0};t.CompressedExistenceProof={encode(e,n=c.default.Writer.create()){0!==e.key.length&&n.uint32(10).bytes(e.key),0!==e.value.length&&n.uint32(18).bytes(e.value),void 0!==e.leaf&&t.LeafOp.encode(e.leaf,n.uint32(26).fork()).ldelim(),n.uint32(34).fork();for(const t of e.path)n.int32(t);return n.ldelim(),n},decode(input,e){const n=input instanceof c.default.Reader?input:new c.default.Reader(input);let r=void 0===e?n.len:n.pos+e;const o=Object.assign({},R);for(o.path=[],o.key=new Uint8Array,o.value=new Uint8Array;n.pos>>3){case 1:o.key=n.bytes();break;case 2:o.value=n.bytes();break;case 3:o.leaf=t.LeafOp.decode(n,n.uint32());break;case 4:if(2==(7&e)){const e=n.uint32()+n.pos;for(;n.posNumber(e))),n},toJSON(e){const n={};return void 0!==e.key&&(n.key=D(void 0!==e.key?e.key:new Uint8Array)),void 0!==e.value&&(n.value=D(void 0!==e.value?e.value:new Uint8Array)),void 0!==e.leaf&&(n.leaf=e.leaf?t.LeafOp.toJSON(e.leaf):void 0),e.path?n.path=e.path.map((e=>e)):n.path=[],n},fromPartial(object){var e,n,r;const o=Object.assign({},R);return o.key=null!==(e=object.key)&&void 0!==e?e:new Uint8Array,o.value=null!==(n=object.value)&&void 0!==n?n:new Uint8Array,o.leaf=void 0!==object.leaf&&null!==object.leaf?t.LeafOp.fromPartial(object.leaf):void 0,o.path=(null===(r=object.path)||void 0===r?void 0:r.map((e=>e)))||[],o}};const P={};t.CompressedNonExistenceProof={encode:(e,n=c.default.Writer.create())=>(0!==e.key.length&&n.uint32(10).bytes(e.key),void 0!==e.left&&t.CompressedExistenceProof.encode(e.left,n.uint32(18).fork()).ldelim(),void 0!==e.right&&t.CompressedExistenceProof.encode(e.right,n.uint32(26).fork()).ldelim(),n),decode(input,e){const n=input instanceof c.default.Reader?input:new c.default.Reader(input);let r=void 0===e?n.len:n.pos+e;const o=Object.assign({},P);for(o.key=new Uint8Array;n.pos>>3){case 1:o.key=n.bytes();break;case 2:o.left=t.CompressedExistenceProof.decode(n,n.uint32());break;case 3:o.right=t.CompressedExistenceProof.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(object){const e=Object.assign({},P);return e.key=void 0!==object.key&&null!==object.key?Q(object.key):new Uint8Array,e.left=void 0!==object.left&&null!==object.left?t.CompressedExistenceProof.fromJSON(object.left):void 0,e.right=void 0!==object.right&&null!==object.right?t.CompressedExistenceProof.fromJSON(object.right):void 0,e},toJSON(e){const n={};return void 0!==e.key&&(n.key=D(void 0!==e.key?e.key:new Uint8Array)),void 0!==e.left&&(n.left=e.left?t.CompressedExistenceProof.toJSON(e.left):void 0),void 0!==e.right&&(n.right=e.right?t.CompressedExistenceProof.toJSON(e.right):void 0),n},fromPartial(object){var e;const n=Object.assign({},P);return n.key=null!==(e=object.key)&&void 0!==e?e:new Uint8Array,n.left=void 0!==object.left&&null!==object.left?t.CompressedExistenceProof.fromPartial(object.left):void 0,n.right=void 0!==object.right&&null!==object.right?t.CompressedExistenceProof.fromPartial(object.right):void 0,n}};var x=(()=>{if(void 0!==x)return x;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==e)return e;throw"Unable to locate global object"})();const M=x.atob||(e=>x.Buffer.from(e,"base64").toString("binary"));function Q(e){const t=M(e),n=new Uint8Array(t.length);for(let i=0;ix.Buffer.from(e,"binary").toString("base64"));function D(e){const t=[];for(const n of e)t.push(String.fromCharCode(n));return N(t.join(""))}c.default.util.Long!==o.default&&(c.default.util.Long=o.default,c.default.configure())}).call(this,n(3))},function(e,t,n){"use strict";(function(e){var r=this&&this.__importDefault||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;const o=r(n(1)),c=r(n(2));t.protobufPackage="tendermint.crypto";const l={total:o.default.ZERO,index:o.default.ZERO};t.Proof={encode(e,t=c.default.Writer.create()){e.total.isZero()||t.uint32(8).int64(e.total),e.index.isZero()||t.uint32(16).int64(e.index),0!==e.leafHash.length&&t.uint32(26).bytes(e.leafHash);for(const n of e.aunts)t.uint32(34).bytes(n);return t},decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},l);for(r.aunts=[],r.leafHash=new Uint8Array;t.pos>>3){case 1:r.total=t.int64();break;case 2:r.index=t.int64();break;case 3:r.leafHash=t.bytes();break;case 4:r.aunts.push(t.bytes());break;default:t.skipType(7&e)}}return r},fromJSON(object){var e;const t=Object.assign({},l);return t.total=void 0!==object.total&&null!==object.total?o.default.fromString(object.total):o.default.ZERO,t.index=void 0!==object.index&&null!==object.index?o.default.fromString(object.index):o.default.ZERO,t.leafHash=void 0!==object.leafHash&&null!==object.leafHash?y(object.leafHash):new Uint8Array,t.aunts=(null!==(e=object.aunts)&&void 0!==e?e:[]).map((e=>y(e))),t},toJSON(e){const t={};return void 0!==e.total&&(t.total=(e.total||o.default.ZERO).toString()),void 0!==e.index&&(t.index=(e.index||o.default.ZERO).toString()),void 0!==e.leafHash&&(t.leafHash=w(void 0!==e.leafHash?e.leafHash:new Uint8Array)),e.aunts?t.aunts=e.aunts.map((e=>w(void 0!==e?e:new Uint8Array))):t.aunts=[],t},fromPartial(object){var e,t;const n=Object.assign({},l);return n.total=void 0!==object.total&&null!==object.total?o.default.fromValue(object.total):o.default.ZERO,n.index=void 0!==object.index&&null!==object.index?o.default.fromValue(object.index):o.default.ZERO,n.leafHash=null!==(e=object.leafHash)&&void 0!==e?e:new Uint8Array,n.aunts=(null===(t=object.aunts)||void 0===t?void 0:t.map((e=>e)))||[],n}};const d={};t.ValueOp={encode:(e,n=c.default.Writer.create())=>(0!==e.key.length&&n.uint32(10).bytes(e.key),void 0!==e.proof&&t.Proof.encode(e.proof,n.uint32(18).fork()).ldelim(),n),decode(input,e){const n=input instanceof c.default.Reader?input:new c.default.Reader(input);let r=void 0===e?n.len:n.pos+e;const o=Object.assign({},d);for(o.key=new Uint8Array;n.pos>>3){case 1:o.key=n.bytes();break;case 2:o.proof=t.Proof.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(object){const e=Object.assign({},d);return e.key=void 0!==object.key&&null!==object.key?y(object.key):new Uint8Array,e.proof=void 0!==object.proof&&null!==object.proof?t.Proof.fromJSON(object.proof):void 0,e},toJSON(e){const n={};return void 0!==e.key&&(n.key=w(void 0!==e.key?e.key:new Uint8Array)),void 0!==e.proof&&(n.proof=e.proof?t.Proof.toJSON(e.proof):void 0),n},fromPartial(object){var e;const n=Object.assign({},d);return n.key=null!==(e=object.key)&&void 0!==e?e:new Uint8Array,n.proof=void 0!==object.proof&&null!==object.proof?t.Proof.fromPartial(object.proof):void 0,n}};const f={key:"",input:"",output:""};t.DominoOp={encode:(e,t=c.default.Writer.create())=>(""!==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(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},f);for(;t.pos>>3){case 1:r.key=t.string();break;case 2:r.input=t.string();break;case 3:r.output=t.string();break;default:t.skipType(7&e)}}return r},fromJSON(object){const e=Object.assign({},f);return e.key=void 0!==object.key&&null!==object.key?String(object.key):"",e.input=void 0!==object.input&&null!==object.input?String(object.input):"",e.output=void 0!==object.output&&null!==object.output?String(object.output):"",e},toJSON(e){const 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(object){var e,t,n;const r=Object.assign({},f);return r.key=null!==(e=object.key)&&void 0!==e?e:"",r.input=null!==(t=object.input)&&void 0!==t?t:"",r.output=null!==(n=object.output)&&void 0!==n?n:"",r}};const h={type:""};t.ProofOp={encode:(e,t=c.default.Writer.create())=>(""!==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(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},h);for(r.key=new Uint8Array,r.data=new Uint8Array;t.pos>>3){case 1:r.type=t.string();break;case 2:r.key=t.bytes();break;case 3:r.data=t.bytes();break;default:t.skipType(7&e)}}return r},fromJSON(object){const e=Object.assign({},h);return e.type=void 0!==object.type&&null!==object.type?String(object.type):"",e.key=void 0!==object.key&&null!==object.key?y(object.key):new Uint8Array,e.data=void 0!==object.data&&null!==object.data?y(object.data):new Uint8Array,e},toJSON(e){const t={};return void 0!==e.type&&(t.type=e.type),void 0!==e.key&&(t.key=w(void 0!==e.key?e.key:new Uint8Array)),void 0!==e.data&&(t.data=w(void 0!==e.data?e.data:new Uint8Array)),t},fromPartial(object){var e,t,n;const r=Object.assign({},h);return r.type=null!==(e=object.type)&&void 0!==e?e:"",r.key=null!==(t=object.key)&&void 0!==t?t:new Uint8Array,r.data=null!==(n=object.data)&&void 0!==n?n:new Uint8Array,r}};const A={};t.ProofOps={encode(e,n=c.default.Writer.create()){for(const r of e.ops)t.ProofOp.encode(r,n.uint32(10).fork()).ldelim();return n},decode(input,e){const n=input instanceof c.default.Reader?input:new c.default.Reader(input);let r=void 0===e?n.len:n.pos+e;const o=Object.assign({},A);for(o.ops=[];n.pos>>3==1)o.ops.push(t.ProofOp.decode(n,n.uint32()));else n.skipType(7&e)}return o},fromJSON(object){var e;const n=Object.assign({},A);return n.ops=(null!==(e=object.ops)&&void 0!==e?e:[]).map((e=>t.ProofOp.fromJSON(e))),n},toJSON(e){const n={};return e.ops?n.ops=e.ops.map((e=>e?t.ProofOp.toJSON(e):void 0)):n.ops=[],n},fromPartial(object){var e;const n=Object.assign({},A);return n.ops=(null===(e=object.ops)||void 0===e?void 0:e.map((e=>t.ProofOp.fromPartial(e))))||[],n}};var m=(()=>{if(void 0!==m)return m;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==e)return e;throw"Unable to locate global object"})();const v=m.atob||(e=>m.Buffer.from(e,"base64").toString("binary"));function y(e){const t=v(e),n=new Uint8Array(t.length);for(let i=0;im.Buffer.from(e,"binary").toString("base64"));function w(e){const t=[];for(const n of e)t.push(String.fromCharCode(n));return I(t.join(""))}c.default.util.Long!==o.default&&(c.default.util.Long=o.default,c.default.configure())}).call(this,n(3))},function(e,t,n){"use strict";(function(e){var r=this&&this.__importDefault||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;const o=r(n(1)),c=r(n(2)),l=n(443);t.protobufPackage="tendermint.types";const d={totalVotingPower:o.default.ZERO};t.ValidatorSet={encode(e,n=c.default.Writer.create()){for(const r of e.validators)t.Validator.encode(r,n.uint32(10).fork()).ldelim();return void 0!==e.proposer&&t.Validator.encode(e.proposer,n.uint32(18).fork()).ldelim(),e.totalVotingPower.isZero()||n.uint32(24).int64(e.totalVotingPower),n},decode(input,e){const n=input instanceof c.default.Reader?input:new c.default.Reader(input);let r=void 0===e?n.len:n.pos+e;const o=Object.assign({},d);for(o.validators=[];n.pos>>3){case 1:o.validators.push(t.Validator.decode(n,n.uint32()));break;case 2:o.proposer=t.Validator.decode(n,n.uint32());break;case 3:o.totalVotingPower=n.int64();break;default:n.skipType(7&e)}}return o},fromJSON(object){var e;const n=Object.assign({},d);return n.validators=(null!==(e=object.validators)&&void 0!==e?e:[]).map((e=>t.Validator.fromJSON(e))),n.proposer=void 0!==object.proposer&&null!==object.proposer?t.Validator.fromJSON(object.proposer):void 0,n.totalVotingPower=void 0!==object.totalVotingPower&&null!==object.totalVotingPower?o.default.fromString(object.totalVotingPower):o.default.ZERO,n},toJSON(e){const n={};return e.validators?n.validators=e.validators.map((e=>e?t.Validator.toJSON(e):void 0)):n.validators=[],void 0!==e.proposer&&(n.proposer=e.proposer?t.Validator.toJSON(e.proposer):void 0),void 0!==e.totalVotingPower&&(n.totalVotingPower=(e.totalVotingPower||o.default.ZERO).toString()),n},fromPartial(object){var e;const n=Object.assign({},d);return n.validators=(null===(e=object.validators)||void 0===e?void 0:e.map((e=>t.Validator.fromPartial(e))))||[],n.proposer=void 0!==object.proposer&&null!==object.proposer?t.Validator.fromPartial(object.proposer):void 0,n.totalVotingPower=void 0!==object.totalVotingPower&&null!==object.totalVotingPower?o.default.fromValue(object.totalVotingPower):o.default.ZERO,n}};const f={votingPower:o.default.ZERO,proposerPriority:o.default.ZERO};t.Validator={encode:(e,t=c.default.Writer.create())=>(0!==e.address.length&&t.uint32(10).bytes(e.address),void 0!==e.pubKey&&l.PublicKey.encode(e.pubKey,t.uint32(18).fork()).ldelim(),e.votingPower.isZero()||t.uint32(24).int64(e.votingPower),e.proposerPriority.isZero()||t.uint32(32).int64(e.proposerPriority),t),decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},f);for(r.address=new Uint8Array;t.pos>>3){case 1:r.address=t.bytes();break;case 2:r.pubKey=l.PublicKey.decode(t,t.uint32());break;case 3:r.votingPower=t.int64();break;case 4:r.proposerPriority=t.int64();break;default:t.skipType(7&e)}}return r},fromJSON(object){const e=Object.assign({},f);return e.address=void 0!==object.address&&null!==object.address?function(e){const t=m(e),n=new Uint8Array(t.length);for(let i=0;i(void 0!==e.pubKey&&l.PublicKey.encode(e.pubKey,t.uint32(10).fork()).ldelim(),e.votingPower.isZero()||t.uint32(16).int64(e.votingPower),t),decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},h);for(;t.pos>>3){case 1:r.pubKey=l.PublicKey.decode(t,t.uint32());break;case 2:r.votingPower=t.int64();break;default:t.skipType(7&e)}}return r},fromJSON(object){const e=Object.assign({},h);return e.pubKey=void 0!==object.pubKey&&null!==object.pubKey?l.PublicKey.fromJSON(object.pubKey):void 0,e.votingPower=void 0!==object.votingPower&&null!==object.votingPower?o.default.fromString(object.votingPower):o.default.ZERO,e},toJSON(e){const t={};return void 0!==e.pubKey&&(t.pubKey=e.pubKey?l.PublicKey.toJSON(e.pubKey):void 0),void 0!==e.votingPower&&(t.votingPower=(e.votingPower||o.default.ZERO).toString()),t},fromPartial(object){const e=Object.assign({},h);return e.pubKey=void 0!==object.pubKey&&null!==object.pubKey?l.PublicKey.fromPartial(object.pubKey):void 0,e.votingPower=void 0!==object.votingPower&&null!==object.votingPower?o.default.fromValue(object.votingPower):o.default.ZERO,e}};var A=(()=>{if(void 0!==A)return A;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==e)return e;throw"Unable to locate global object"})();const m=A.atob||(e=>A.Buffer.from(e,"base64").toString("binary"));const v=A.btoa||(e=>A.Buffer.from(e,"binary").toString("base64"));c.default.util.Long!==o.default&&(c.default.util.Long=o.default,c.default.configure())}).call(this,n(3))},function(e,t,n){"use strict";(function(e){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.PublicKey=t.protobufPackage=void 0;const o=r(n(1)),c=r(n(2));t.protobufPackage="tendermint.crypto";const l={};t.PublicKey={encode:(e,t=c.default.Writer.create())=>(void 0!==e.ed25519&&t.uint32(10).bytes(e.ed25519),void 0!==e.secp256k1&&t.uint32(18).bytes(e.secp256k1),t),decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},l);for(;t.pos>>3){case 1:r.ed25519=t.bytes();break;case 2:r.secp256k1=t.bytes();break;default:t.skipType(7&e)}}return r},fromJSON(object){const e=Object.assign({},l);return e.ed25519=void 0!==object.ed25519&&null!==object.ed25519?h(object.ed25519):void 0,e.secp256k1=void 0!==object.secp256k1&&null!==object.secp256k1?h(object.secp256k1):void 0,e},toJSON(e){const t={};return void 0!==e.ed25519&&(t.ed25519=void 0!==e.ed25519?m(e.ed25519):void 0),void 0!==e.secp256k1&&(t.secp256k1=void 0!==e.secp256k1?m(e.secp256k1):void 0),t},fromPartial(object){var e,t;const n=Object.assign({},l);return n.ed25519=null!==(e=object.ed25519)&&void 0!==e?e:void 0,n.secp256k1=null!==(t=object.secp256k1)&&void 0!==t?t:void 0,n}};var d=(()=>{if(void 0!==d)return d;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==e)return e;throw"Unable to locate global object"})();const f=d.atob||(e=>d.Buffer.from(e,"base64").toString("binary"));function h(e){const t=f(e),n=new Uint8Array(t.length);for(let i=0;id.Buffer.from(e,"binary").toString("base64"));function m(e){const t=[];for(const n of e)t.push(String.fromCharCode(n));return A(t.join(""))}c.default.util.Long!==o.default&&(c.default.util.Long=o.default,c.default.configure())}).call(this,n(3))},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MsgClientImpl=t.MsgUndelegateResponse=t.MsgUndelegate=t.MsgBeginRedelegateResponse=t.MsgBeginRedelegate=t.MsgDelegateResponse=t.MsgDelegate=t.MsgEditValidatorResponse=t.MsgEditValidator=t.MsgCreateValidatorResponse=t.MsgCreateValidator=t.protobufPackage=void 0;const o=r(n(1)),c=r(n(2)),l=n(445),d=n(22),f=n(28),h=n(65);t.protobufPackage="cosmos.staking.v1beta1";const A={minSelfDelegation:"",delegatorAddress:"",validatorAddress:""};t.MsgCreateValidator={encode:(e,t=c.default.Writer.create())=>(void 0!==e.description&&l.Description.encode(e.description,t.uint32(10).fork()).ldelim(),void 0!==e.commission&&l.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&&d.Any.encode(e.pubkey,t.uint32(50).fork()).ldelim(),void 0!==e.value&&f.Coin.encode(e.value,t.uint32(58).fork()).ldelim(),t),decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},A);for(;t.pos>>3){case 1:r.description=l.Description.decode(t,t.uint32());break;case 2:r.commission=l.CommissionRates.decode(t,t.uint32());break;case 3:r.minSelfDelegation=t.string();break;case 4:r.delegatorAddress=t.string();break;case 5:r.validatorAddress=t.string();break;case 6:r.pubkey=d.Any.decode(t,t.uint32());break;case 7:r.value=f.Coin.decode(t,t.uint32());break;default:t.skipType(7&e)}}return r},fromJSON(object){const e=Object.assign({},A);return e.description=void 0!==object.description&&null!==object.description?l.Description.fromJSON(object.description):void 0,e.commission=void 0!==object.commission&&null!==object.commission?l.CommissionRates.fromJSON(object.commission):void 0,e.minSelfDelegation=void 0!==object.minSelfDelegation&&null!==object.minSelfDelegation?String(object.minSelfDelegation):"",e.delegatorAddress=void 0!==object.delegatorAddress&&null!==object.delegatorAddress?String(object.delegatorAddress):"",e.validatorAddress=void 0!==object.validatorAddress&&null!==object.validatorAddress?String(object.validatorAddress):"",e.pubkey=void 0!==object.pubkey&&null!==object.pubkey?d.Any.fromJSON(object.pubkey):void 0,e.value=void 0!==object.value&&null!==object.value?f.Coin.fromJSON(object.value):void 0,e},toJSON(e){const t={};return void 0!==e.description&&(t.description=e.description?l.Description.toJSON(e.description):void 0),void 0!==e.commission&&(t.commission=e.commission?l.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?d.Any.toJSON(e.pubkey):void 0),void 0!==e.value&&(t.value=e.value?f.Coin.toJSON(e.value):void 0),t},fromPartial(object){var e,t,n;const r=Object.assign({},A);return r.description=void 0!==object.description&&null!==object.description?l.Description.fromPartial(object.description):void 0,r.commission=void 0!==object.commission&&null!==object.commission?l.CommissionRates.fromPartial(object.commission):void 0,r.minSelfDelegation=null!==(e=object.minSelfDelegation)&&void 0!==e?e:"",r.delegatorAddress=null!==(t=object.delegatorAddress)&&void 0!==t?t:"",r.validatorAddress=null!==(n=object.validatorAddress)&&void 0!==n?n:"",r.pubkey=void 0!==object.pubkey&&null!==object.pubkey?d.Any.fromPartial(object.pubkey):void 0,r.value=void 0!==object.value&&null!==object.value?f.Coin.fromPartial(object.value):void 0,r}};const m={};t.MsgCreateValidatorResponse={encode:(e,t=c.default.Writer.create())=>t,decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},m);for(;t.posObject.assign({},m),toJSON:e=>({}),fromPartial:e=>Object.assign({},m)};const v={validatorAddress:"",commissionRate:"",minSelfDelegation:""};t.MsgEditValidator={encode:(e,t=c.default.Writer.create())=>(void 0!==e.description&&l.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(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},v);for(;t.pos>>3){case 1:r.description=l.Description.decode(t,t.uint32());break;case 2:r.validatorAddress=t.string();break;case 3:r.commissionRate=t.string();break;case 4:r.minSelfDelegation=t.string();break;default:t.skipType(7&e)}}return r},fromJSON(object){const e=Object.assign({},v);return e.description=void 0!==object.description&&null!==object.description?l.Description.fromJSON(object.description):void 0,e.validatorAddress=void 0!==object.validatorAddress&&null!==object.validatorAddress?String(object.validatorAddress):"",e.commissionRate=void 0!==object.commissionRate&&null!==object.commissionRate?String(object.commissionRate):"",e.minSelfDelegation=void 0!==object.minSelfDelegation&&null!==object.minSelfDelegation?String(object.minSelfDelegation):"",e},toJSON(e){const t={};return void 0!==e.description&&(t.description=e.description?l.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(object){var e,t,n;const r=Object.assign({},v);return r.description=void 0!==object.description&&null!==object.description?l.Description.fromPartial(object.description):void 0,r.validatorAddress=null!==(e=object.validatorAddress)&&void 0!==e?e:"",r.commissionRate=null!==(t=object.commissionRate)&&void 0!==t?t:"",r.minSelfDelegation=null!==(n=object.minSelfDelegation)&&void 0!==n?n:"",r}};const y={};t.MsgEditValidatorResponse={encode:(e,t=c.default.Writer.create())=>t,decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},y);for(;t.posObject.assign({},y),toJSON:e=>({}),fromPartial:e=>Object.assign({},y)};const I={delegatorAddress:"",validatorAddress:""};t.MsgDelegate={encode:(e,t=c.default.Writer.create())=>(""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),""!==e.validatorAddress&&t.uint32(18).string(e.validatorAddress),void 0!==e.amount&&f.Coin.encode(e.amount,t.uint32(26).fork()).ldelim(),t),decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},I);for(;t.pos>>3){case 1:r.delegatorAddress=t.string();break;case 2:r.validatorAddress=t.string();break;case 3:r.amount=f.Coin.decode(t,t.uint32());break;default:t.skipType(7&e)}}return r},fromJSON(object){const e=Object.assign({},I);return e.delegatorAddress=void 0!==object.delegatorAddress&&null!==object.delegatorAddress?String(object.delegatorAddress):"",e.validatorAddress=void 0!==object.validatorAddress&&null!==object.validatorAddress?String(object.validatorAddress):"",e.amount=void 0!==object.amount&&null!==object.amount?f.Coin.fromJSON(object.amount):void 0,e},toJSON(e){const 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?f.Coin.toJSON(e.amount):void 0),t},fromPartial(object){var e,t;const n=Object.assign({},I);return n.delegatorAddress=null!==(e=object.delegatorAddress)&&void 0!==e?e:"",n.validatorAddress=null!==(t=object.validatorAddress)&&void 0!==t?t:"",n.amount=void 0!==object.amount&&null!==object.amount?f.Coin.fromPartial(object.amount):void 0,n}};const w={};t.MsgDelegateResponse={encode:(e,t=c.default.Writer.create())=>t,decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},w);for(;t.posObject.assign({},w),toJSON:e=>({}),fromPartial:e=>Object.assign({},w)};const _={delegatorAddress:"",validatorSrcAddress:"",validatorDstAddress:""};t.MsgBeginRedelegate={encode:(e,t=c.default.Writer.create())=>(""!==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&&f.Coin.encode(e.amount,t.uint32(34).fork()).ldelim(),t),decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},_);for(;t.pos>>3){case 1:r.delegatorAddress=t.string();break;case 2:r.validatorSrcAddress=t.string();break;case 3:r.validatorDstAddress=t.string();break;case 4:r.amount=f.Coin.decode(t,t.uint32());break;default:t.skipType(7&e)}}return r},fromJSON(object){const e=Object.assign({},_);return e.delegatorAddress=void 0!==object.delegatorAddress&&null!==object.delegatorAddress?String(object.delegatorAddress):"",e.validatorSrcAddress=void 0!==object.validatorSrcAddress&&null!==object.validatorSrcAddress?String(object.validatorSrcAddress):"",e.validatorDstAddress=void 0!==object.validatorDstAddress&&null!==object.validatorDstAddress?String(object.validatorDstAddress):"",e.amount=void 0!==object.amount&&null!==object.amount?f.Coin.fromJSON(object.amount):void 0,e},toJSON(e){const 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?f.Coin.toJSON(e.amount):void 0),t},fromPartial(object){var e,t,n;const r=Object.assign({},_);return r.delegatorAddress=null!==(e=object.delegatorAddress)&&void 0!==e?e:"",r.validatorSrcAddress=null!==(t=object.validatorSrcAddress)&&void 0!==t?t:"",r.validatorDstAddress=null!==(n=object.validatorDstAddress)&&void 0!==n?n:"",r.amount=void 0!==object.amount&&null!==object.amount?f.Coin.fromPartial(object.amount):void 0,r}};const C={};t.MsgBeginRedelegateResponse={encode:(e,t=c.default.Writer.create())=>(void 0!==e.completionTime&&h.Timestamp.encode(e.completionTime,t.uint32(10).fork()).ldelim(),t),decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},C);for(;t.pos>>3==1)r.completionTime=h.Timestamp.decode(t,t.uint32());else t.skipType(7&e)}return r},fromJSON(object){const e=Object.assign({},C);return e.completionTime=void 0!==object.completionTime&&null!==object.completionTime?O(object.completionTime):void 0,e},toJSON(e){const t={};return void 0!==e.completionTime&&(t.completionTime=k(e.completionTime).toISOString()),t},fromPartial(object){const e=Object.assign({},C);return e.completionTime=void 0!==object.completionTime&&null!==object.completionTime?h.Timestamp.fromPartial(object.completionTime):void 0,e}};const S={delegatorAddress:"",validatorAddress:""};t.MsgUndelegate={encode:(e,t=c.default.Writer.create())=>(""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),""!==e.validatorAddress&&t.uint32(18).string(e.validatorAddress),void 0!==e.amount&&f.Coin.encode(e.amount,t.uint32(26).fork()).ldelim(),t),decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},S);for(;t.pos>>3){case 1:r.delegatorAddress=t.string();break;case 2:r.validatorAddress=t.string();break;case 3:r.amount=f.Coin.decode(t,t.uint32());break;default:t.skipType(7&e)}}return r},fromJSON(object){const e=Object.assign({},S);return e.delegatorAddress=void 0!==object.delegatorAddress&&null!==object.delegatorAddress?String(object.delegatorAddress):"",e.validatorAddress=void 0!==object.validatorAddress&&null!==object.validatorAddress?String(object.validatorAddress):"",e.amount=void 0!==object.amount&&null!==object.amount?f.Coin.fromJSON(object.amount):void 0,e},toJSON(e){const 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?f.Coin.toJSON(e.amount):void 0),t},fromPartial(object){var e,t;const n=Object.assign({},S);return n.delegatorAddress=null!==(e=object.delegatorAddress)&&void 0!==e?e:"",n.validatorAddress=null!==(t=object.validatorAddress)&&void 0!==t?t:"",n.amount=void 0!==object.amount&&null!==object.amount?f.Coin.fromPartial(object.amount):void 0,n}};const E={};t.MsgUndelegateResponse={encode:(e,t=c.default.Writer.create())=>(void 0!==e.completionTime&&h.Timestamp.encode(e.completionTime,t.uint32(10).fork()).ldelim(),t),decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},E);for(;t.pos>>3==1)r.completionTime=h.Timestamp.decode(t,t.uint32());else t.skipType(7&e)}return r},fromJSON(object){const e=Object.assign({},E);return e.completionTime=void 0!==object.completionTime&&null!==object.completionTime?O(object.completionTime):void 0,e},toJSON(e){const t={};return void 0!==e.completionTime&&(t.completionTime=k(e.completionTime).toISOString()),t},fromPartial(object){const e=Object.assign({},E);return e.completionTime=void 0!==object.completionTime&&null!==object.completionTime?h.Timestamp.fromPartial(object.completionTime):void 0,e}};function B(e){var t;return{seconds:(t=e.getTime()/1e3,o.default.fromNumber(t)),nanos:e.getTime()%1e3*1e6}}function k(e){let t=1e3*e.seconds.toNumber();return t+=e.nanos/1e6,new Date(t)}function O(e){return e instanceof Date?B(e):"string"==typeof e?B(new Date(e)):h.Timestamp.fromJSON(e)}t.MsgClientImpl=class{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)}CreateValidator(e){const data=t.MsgCreateValidator.encode(e).finish();return this.rpc.request("cosmos.staking.v1beta1.Msg","CreateValidator",data).then((data=>t.MsgCreateValidatorResponse.decode(new c.default.Reader(data))))}EditValidator(e){const data=t.MsgEditValidator.encode(e).finish();return this.rpc.request("cosmos.staking.v1beta1.Msg","EditValidator",data).then((data=>t.MsgEditValidatorResponse.decode(new c.default.Reader(data))))}Delegate(e){const data=t.MsgDelegate.encode(e).finish();return this.rpc.request("cosmos.staking.v1beta1.Msg","Delegate",data).then((data=>t.MsgDelegateResponse.decode(new c.default.Reader(data))))}BeginRedelegate(e){const data=t.MsgBeginRedelegate.encode(e).finish();return this.rpc.request("cosmos.staking.v1beta1.Msg","BeginRedelegate",data).then((data=>t.MsgBeginRedelegateResponse.decode(new c.default.Reader(data))))}Undelegate(e){const data=t.MsgUndelegate.encode(e).finish();return this.rpc.request("cosmos.staking.v1beta1.Msg","Undelegate",data).then((data=>t.MsgUndelegateResponse.decode(new c.default.Reader(data))))}},c.default.util.Long!==o.default&&(c.default.util.Long=o.default,c.default.configure())},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.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;const o=r(n(1)),c=r(n(2)),l=n(255),d=n(65),f=n(22),h=n(143),A=n(28);var m;function v(object){switch(object){case 0:case"BOND_STATUS_UNSPECIFIED":return m.BOND_STATUS_UNSPECIFIED;case 1:case"BOND_STATUS_UNBONDED":return m.BOND_STATUS_UNBONDED;case 2:case"BOND_STATUS_UNBONDING":return m.BOND_STATUS_UNBONDING;case 3:case"BOND_STATUS_BONDED":return m.BOND_STATUS_BONDED;default:return m.UNRECOGNIZED}}function y(object){switch(object){case m.BOND_STATUS_UNSPECIFIED:return"BOND_STATUS_UNSPECIFIED";case m.BOND_STATUS_UNBONDED:return"BOND_STATUS_UNBONDED";case m.BOND_STATUS_UNBONDING:return"BOND_STATUS_UNBONDING";case m.BOND_STATUS_BONDED:return"BOND_STATUS_BONDED";default:return"UNKNOWN"}}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"}(m=t.BondStatus||(t.BondStatus={})),t.bondStatusFromJSON=v,t.bondStatusToJSON=y;const I={};t.HistoricalInfo={encode(e,n=c.default.Writer.create()){void 0!==e.header&&l.Header.encode(e.header,n.uint32(10).fork()).ldelim();for(const r of e.valset)t.Validator.encode(r,n.uint32(18).fork()).ldelim();return n},decode(input,e){const n=input instanceof c.default.Reader?input:new c.default.Reader(input);let r=void 0===e?n.len:n.pos+e;const o=Object.assign({},I);for(o.valset=[];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(object){var e;const n=Object.assign({},I);return n.header=void 0!==object.header&&null!==object.header?l.Header.fromJSON(object.header):void 0,n.valset=(null!==(e=object.valset)&&void 0!==e?e:[]).map((e=>t.Validator.fromJSON(e))),n},toJSON(e){const n={};return void 0!==e.header&&(n.header=e.header?l.Header.toJSON(e.header):void 0),e.valset?n.valset=e.valset.map((e=>e?t.Validator.toJSON(e):void 0)):n.valset=[],n},fromPartial(object){var e;const n=Object.assign({},I);return n.header=void 0!==object.header&&null!==object.header?l.Header.fromPartial(object.header):void 0,n.valset=(null===(e=object.valset)||void 0===e?void 0:e.map((e=>t.Validator.fromPartial(e))))||[],n}};const w={rate:"",maxRate:"",maxChangeRate:""};t.CommissionRates={encode:(e,t=c.default.Writer.create())=>(""!==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(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},w);for(;t.pos>>3){case 1:r.rate=t.string();break;case 2:r.maxRate=t.string();break;case 3:r.maxChangeRate=t.string();break;default:t.skipType(7&e)}}return r},fromJSON(object){const e=Object.assign({},w);return e.rate=void 0!==object.rate&&null!==object.rate?String(object.rate):"",e.maxRate=void 0!==object.maxRate&&null!==object.maxRate?String(object.maxRate):"",e.maxChangeRate=void 0!==object.maxChangeRate&&null!==object.maxChangeRate?String(object.maxChangeRate):"",e},toJSON(e){const 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(object){var e,t,n;const r=Object.assign({},w);return r.rate=null!==(e=object.rate)&&void 0!==e?e:"",r.maxRate=null!==(t=object.maxRate)&&void 0!==t?t:"",r.maxChangeRate=null!==(n=object.maxChangeRate)&&void 0!==n?n:"",r}};const _={};t.Commission={encode:(e,n=c.default.Writer.create())=>(void 0!==e.commissionRates&&t.CommissionRates.encode(e.commissionRates,n.uint32(10).fork()).ldelim(),void 0!==e.updateTime&&d.Timestamp.encode(e.updateTime,n.uint32(18).fork()).ldelim(),n),decode(input,e){const n=input instanceof c.default.Reader?input:new c.default.Reader(input);let r=void 0===e?n.len:n.pos+e;const o=Object.assign({},_);for(;n.pos>>3){case 1:o.commissionRates=t.CommissionRates.decode(n,n.uint32());break;case 2:o.updateTime=d.Timestamp.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(object){const e=Object.assign({},_);return e.commissionRates=void 0!==object.commissionRates&&null!==object.commissionRates?t.CommissionRates.fromJSON(object.commissionRates):void 0,e.updateTime=void 0!==object.updateTime&&null!==object.updateTime?L(object.updateTime):void 0,e},toJSON(e){const n={};return void 0!==e.commissionRates&&(n.commissionRates=e.commissionRates?t.CommissionRates.toJSON(e.commissionRates):void 0),void 0!==e.updateTime&&(n.updateTime=F(e.updateTime).toISOString()),n},fromPartial(object){const e=Object.assign({},_);return e.commissionRates=void 0!==object.commissionRates&&null!==object.commissionRates?t.CommissionRates.fromPartial(object.commissionRates):void 0,e.updateTime=void 0!==object.updateTime&&null!==object.updateTime?d.Timestamp.fromPartial(object.updateTime):void 0,e}};const C={moniker:"",identity:"",website:"",securityContact:"",details:""};t.Description={encode:(e,t=c.default.Writer.create())=>(""!==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(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},C);for(;t.pos>>3){case 1:r.moniker=t.string();break;case 2:r.identity=t.string();break;case 3:r.website=t.string();break;case 4:r.securityContact=t.string();break;case 5:r.details=t.string();break;default:t.skipType(7&e)}}return r},fromJSON(object){const e=Object.assign({},C);return e.moniker=void 0!==object.moniker&&null!==object.moniker?String(object.moniker):"",e.identity=void 0!==object.identity&&null!==object.identity?String(object.identity):"",e.website=void 0!==object.website&&null!==object.website?String(object.website):"",e.securityContact=void 0!==object.securityContact&&null!==object.securityContact?String(object.securityContact):"",e.details=void 0!==object.details&&null!==object.details?String(object.details):"",e},toJSON(e){const 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(object){var e,t,n,r,o;const c=Object.assign({},C);return c.moniker=null!==(e=object.moniker)&&void 0!==e?e:"",c.identity=null!==(t=object.identity)&&void 0!==t?t:"",c.website=null!==(n=object.website)&&void 0!==n?n:"",c.securityContact=null!==(r=object.securityContact)&&void 0!==r?r:"",c.details=null!==(o=object.details)&&void 0!==o?o:"",c}};const S={operatorAddress:"",jailed:!1,status:0,tokens:"",delegatorShares:"",unbondingHeight:o.default.ZERO,minSelfDelegation:""};t.Validator={encode:(e,n=c.default.Writer.create())=>(""!==e.operatorAddress&&n.uint32(10).string(e.operatorAddress),void 0!==e.consensusPubkey&&f.Any.encode(e.consensusPubkey,n.uint32(18).fork()).ldelim(),!0===e.jailed&&n.uint32(24).bool(e.jailed),0!==e.status&&n.uint32(32).int32(e.status),""!==e.tokens&&n.uint32(42).string(e.tokens),""!==e.delegatorShares&&n.uint32(50).string(e.delegatorShares),void 0!==e.description&&t.Description.encode(e.description,n.uint32(58).fork()).ldelim(),e.unbondingHeight.isZero()||n.uint32(64).int64(e.unbondingHeight),void 0!==e.unbondingTime&&d.Timestamp.encode(e.unbondingTime,n.uint32(74).fork()).ldelim(),void 0!==e.commission&&t.Commission.encode(e.commission,n.uint32(82).fork()).ldelim(),""!==e.minSelfDelegation&&n.uint32(90).string(e.minSelfDelegation),n),decode(input,e){const n=input instanceof c.default.Reader?input:new c.default.Reader(input);let r=void 0===e?n.len:n.pos+e;const o=Object.assign({},S);for(;n.pos>>3){case 1:o.operatorAddress=n.string();break;case 2:o.consensusPubkey=f.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=d.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(object){const e=Object.assign({},S);return e.operatorAddress=void 0!==object.operatorAddress&&null!==object.operatorAddress?String(object.operatorAddress):"",e.consensusPubkey=void 0!==object.consensusPubkey&&null!==object.consensusPubkey?f.Any.fromJSON(object.consensusPubkey):void 0,e.jailed=void 0!==object.jailed&&null!==object.jailed&&Boolean(object.jailed),e.status=void 0!==object.status&&null!==object.status?v(object.status):0,e.tokens=void 0!==object.tokens&&null!==object.tokens?String(object.tokens):"",e.delegatorShares=void 0!==object.delegatorShares&&null!==object.delegatorShares?String(object.delegatorShares):"",e.description=void 0!==object.description&&null!==object.description?t.Description.fromJSON(object.description):void 0,e.unbondingHeight=void 0!==object.unbondingHeight&&null!==object.unbondingHeight?o.default.fromString(object.unbondingHeight):o.default.ZERO,e.unbondingTime=void 0!==object.unbondingTime&&null!==object.unbondingTime?L(object.unbondingTime):void 0,e.commission=void 0!==object.commission&&null!==object.commission?t.Commission.fromJSON(object.commission):void 0,e.minSelfDelegation=void 0!==object.minSelfDelegation&&null!==object.minSelfDelegation?String(object.minSelfDelegation):"",e},toJSON(e){const n={};return void 0!==e.operatorAddress&&(n.operatorAddress=e.operatorAddress),void 0!==e.consensusPubkey&&(n.consensusPubkey=e.consensusPubkey?f.Any.toJSON(e.consensusPubkey):void 0),void 0!==e.jailed&&(n.jailed=e.jailed),void 0!==e.status&&(n.status=y(e.status)),void 0!==e.tokens&&(n.tokens=e.tokens),void 0!==e.delegatorShares&&(n.delegatorShares=e.delegatorShares),void 0!==e.description&&(n.description=e.description?t.Description.toJSON(e.description):void 0),void 0!==e.unbondingHeight&&(n.unbondingHeight=(e.unbondingHeight||o.default.ZERO).toString()),void 0!==e.unbondingTime&&(n.unbondingTime=F(e.unbondingTime).toISOString()),void 0!==e.commission&&(n.commission=e.commission?t.Commission.toJSON(e.commission):void 0),void 0!==e.minSelfDelegation&&(n.minSelfDelegation=e.minSelfDelegation),n},fromPartial(object){var e,n,r,c,l,h;const A=Object.assign({},S);return A.operatorAddress=null!==(e=object.operatorAddress)&&void 0!==e?e:"",A.consensusPubkey=void 0!==object.consensusPubkey&&null!==object.consensusPubkey?f.Any.fromPartial(object.consensusPubkey):void 0,A.jailed=null!==(n=object.jailed)&&void 0!==n&&n,A.status=null!==(r=object.status)&&void 0!==r?r:0,A.tokens=null!==(c=object.tokens)&&void 0!==c?c:"",A.delegatorShares=null!==(l=object.delegatorShares)&&void 0!==l?l:"",A.description=void 0!==object.description&&null!==object.description?t.Description.fromPartial(object.description):void 0,A.unbondingHeight=void 0!==object.unbondingHeight&&null!==object.unbondingHeight?o.default.fromValue(object.unbondingHeight):o.default.ZERO,A.unbondingTime=void 0!==object.unbondingTime&&null!==object.unbondingTime?d.Timestamp.fromPartial(object.unbondingTime):void 0,A.commission=void 0!==object.commission&&null!==object.commission?t.Commission.fromPartial(object.commission):void 0,A.minSelfDelegation=null!==(h=object.minSelfDelegation)&&void 0!==h?h:"",A}};const E={addresses:""};t.ValAddresses={encode(e,t=c.default.Writer.create()){for(const n of e.addresses)t.uint32(10).string(n);return t},decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},E);for(r.addresses=[];t.pos>>3==1)r.addresses.push(t.string());else t.skipType(7&e)}return r},fromJSON(object){var e;const t=Object.assign({},E);return t.addresses=(null!==(e=object.addresses)&&void 0!==e?e:[]).map((e=>String(e))),t},toJSON(e){const t={};return e.addresses?t.addresses=e.addresses.map((e=>e)):t.addresses=[],t},fromPartial(object){var e;const t=Object.assign({},E);return t.addresses=(null===(e=object.addresses)||void 0===e?void 0:e.map((e=>e)))||[],t}};const B={delegatorAddress:"",validatorAddress:""};t.DVPair={encode:(e,t=c.default.Writer.create())=>(""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),""!==e.validatorAddress&&t.uint32(18).string(e.validatorAddress),t),decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},B);for(;t.pos>>3){case 1:r.delegatorAddress=t.string();break;case 2:r.validatorAddress=t.string();break;default:t.skipType(7&e)}}return r},fromJSON(object){const e=Object.assign({},B);return e.delegatorAddress=void 0!==object.delegatorAddress&&null!==object.delegatorAddress?String(object.delegatorAddress):"",e.validatorAddress=void 0!==object.validatorAddress&&null!==object.validatorAddress?String(object.validatorAddress):"",e},toJSON(e){const t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),t},fromPartial(object){var e,t;const n=Object.assign({},B);return n.delegatorAddress=null!==(e=object.delegatorAddress)&&void 0!==e?e:"",n.validatorAddress=null!==(t=object.validatorAddress)&&void 0!==t?t:"",n}};const k={};t.DVPairs={encode(e,n=c.default.Writer.create()){for(const r of e.pairs)t.DVPair.encode(r,n.uint32(10).fork()).ldelim();return n},decode(input,e){const n=input instanceof c.default.Reader?input:new c.default.Reader(input);let r=void 0===e?n.len:n.pos+e;const o=Object.assign({},k);for(o.pairs=[];n.pos>>3==1)o.pairs.push(t.DVPair.decode(n,n.uint32()));else n.skipType(7&e)}return o},fromJSON(object){var e;const n=Object.assign({},k);return n.pairs=(null!==(e=object.pairs)&&void 0!==e?e:[]).map((e=>t.DVPair.fromJSON(e))),n},toJSON(e){const n={};return e.pairs?n.pairs=e.pairs.map((e=>e?t.DVPair.toJSON(e):void 0)):n.pairs=[],n},fromPartial(object){var e;const n=Object.assign({},k);return n.pairs=(null===(e=object.pairs)||void 0===e?void 0:e.map((e=>t.DVPair.fromPartial(e))))||[],n}};const O={delegatorAddress:"",validatorSrcAddress:"",validatorDstAddress:""};t.DVVTriplet={encode:(e,t=c.default.Writer.create())=>(""!==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(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},O);for(;t.pos>>3){case 1:r.delegatorAddress=t.string();break;case 2:r.validatorSrcAddress=t.string();break;case 3:r.validatorDstAddress=t.string();break;default:t.skipType(7&e)}}return r},fromJSON(object){const e=Object.assign({},O);return e.delegatorAddress=void 0!==object.delegatorAddress&&null!==object.delegatorAddress?String(object.delegatorAddress):"",e.validatorSrcAddress=void 0!==object.validatorSrcAddress&&null!==object.validatorSrcAddress?String(object.validatorSrcAddress):"",e.validatorDstAddress=void 0!==object.validatorDstAddress&&null!==object.validatorDstAddress?String(object.validatorDstAddress):"",e},toJSON(e){const 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(object){var e,t,n;const r=Object.assign({},O);return r.delegatorAddress=null!==(e=object.delegatorAddress)&&void 0!==e?e:"",r.validatorSrcAddress=null!==(t=object.validatorSrcAddress)&&void 0!==t?t:"",r.validatorDstAddress=null!==(n=object.validatorDstAddress)&&void 0!==n?n:"",r}};const R={};t.DVVTriplets={encode(e,n=c.default.Writer.create()){for(const r of e.triplets)t.DVVTriplet.encode(r,n.uint32(10).fork()).ldelim();return n},decode(input,e){const n=input instanceof c.default.Reader?input:new c.default.Reader(input);let r=void 0===e?n.len:n.pos+e;const o=Object.assign({},R);for(o.triplets=[];n.pos>>3==1)o.triplets.push(t.DVVTriplet.decode(n,n.uint32()));else n.skipType(7&e)}return o},fromJSON(object){var e;const n=Object.assign({},R);return n.triplets=(null!==(e=object.triplets)&&void 0!==e?e:[]).map((e=>t.DVVTriplet.fromJSON(e))),n},toJSON(e){const n={};return e.triplets?n.triplets=e.triplets.map((e=>e?t.DVVTriplet.toJSON(e):void 0)):n.triplets=[],n},fromPartial(object){var e;const n=Object.assign({},R);return n.triplets=(null===(e=object.triplets)||void 0===e?void 0:e.map((e=>t.DVVTriplet.fromPartial(e))))||[],n}};const P={delegatorAddress:"",validatorAddress:"",shares:""};t.Delegation={encode:(e,t=c.default.Writer.create())=>(""!==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(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},P);for(;t.pos>>3){case 1:r.delegatorAddress=t.string();break;case 2:r.validatorAddress=t.string();break;case 3:r.shares=t.string();break;default:t.skipType(7&e)}}return r},fromJSON(object){const e=Object.assign({},P);return e.delegatorAddress=void 0!==object.delegatorAddress&&null!==object.delegatorAddress?String(object.delegatorAddress):"",e.validatorAddress=void 0!==object.validatorAddress&&null!==object.validatorAddress?String(object.validatorAddress):"",e.shares=void 0!==object.shares&&null!==object.shares?String(object.shares):"",e},toJSON(e){const 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(object){var e,t,n;const r=Object.assign({},P);return r.delegatorAddress=null!==(e=object.delegatorAddress)&&void 0!==e?e:"",r.validatorAddress=null!==(t=object.validatorAddress)&&void 0!==t?t:"",r.shares=null!==(n=object.shares)&&void 0!==n?n:"",r}};const x={delegatorAddress:"",validatorAddress:""};t.UnbondingDelegation={encode(e,n=c.default.Writer.create()){""!==e.delegatorAddress&&n.uint32(10).string(e.delegatorAddress),""!==e.validatorAddress&&n.uint32(18).string(e.validatorAddress);for(const r of e.entries)t.UnbondingDelegationEntry.encode(r,n.uint32(26).fork()).ldelim();return n},decode(input,e){const n=input instanceof c.default.Reader?input:new c.default.Reader(input);let r=void 0===e?n.len:n.pos+e;const o=Object.assign({},x);for(o.entries=[];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(object){var e;const n=Object.assign({},x);return n.delegatorAddress=void 0!==object.delegatorAddress&&null!==object.delegatorAddress?String(object.delegatorAddress):"",n.validatorAddress=void 0!==object.validatorAddress&&null!==object.validatorAddress?String(object.validatorAddress):"",n.entries=(null!==(e=object.entries)&&void 0!==e?e:[]).map((e=>t.UnbondingDelegationEntry.fromJSON(e))),n},toJSON(e){const n={};return void 0!==e.delegatorAddress&&(n.delegatorAddress=e.delegatorAddress),void 0!==e.validatorAddress&&(n.validatorAddress=e.validatorAddress),e.entries?n.entries=e.entries.map((e=>e?t.UnbondingDelegationEntry.toJSON(e):void 0)):n.entries=[],n},fromPartial(object){var e,n,r;const o=Object.assign({},x);return o.delegatorAddress=null!==(e=object.delegatorAddress)&&void 0!==e?e:"",o.validatorAddress=null!==(n=object.validatorAddress)&&void 0!==n?n:"",o.entries=(null===(r=object.entries)||void 0===r?void 0:r.map((e=>t.UnbondingDelegationEntry.fromPartial(e))))||[],o}};const M={creationHeight:o.default.ZERO,initialBalance:"",balance:""};t.UnbondingDelegationEntry={encode:(e,t=c.default.Writer.create())=>(e.creationHeight.isZero()||t.uint32(8).int64(e.creationHeight),void 0!==e.completionTime&&d.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),t),decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},M);for(;t.pos>>3){case 1:r.creationHeight=t.int64();break;case 2:r.completionTime=d.Timestamp.decode(t,t.uint32());break;case 3:r.initialBalance=t.string();break;case 4:r.balance=t.string();break;default:t.skipType(7&e)}}return r},fromJSON(object){const e=Object.assign({},M);return e.creationHeight=void 0!==object.creationHeight&&null!==object.creationHeight?o.default.fromString(object.creationHeight):o.default.ZERO,e.completionTime=void 0!==object.completionTime&&null!==object.completionTime?L(object.completionTime):void 0,e.initialBalance=void 0!==object.initialBalance&&null!==object.initialBalance?String(object.initialBalance):"",e.balance=void 0!==object.balance&&null!==object.balance?String(object.balance):"",e},toJSON(e){const t={};return void 0!==e.creationHeight&&(t.creationHeight=(e.creationHeight||o.default.ZERO).toString()),void 0!==e.completionTime&&(t.completionTime=F(e.completionTime).toISOString()),void 0!==e.initialBalance&&(t.initialBalance=e.initialBalance),void 0!==e.balance&&(t.balance=e.balance),t},fromPartial(object){var e,t;const n=Object.assign({},M);return n.creationHeight=void 0!==object.creationHeight&&null!==object.creationHeight?o.default.fromValue(object.creationHeight):o.default.ZERO,n.completionTime=void 0!==object.completionTime&&null!==object.completionTime?d.Timestamp.fromPartial(object.completionTime):void 0,n.initialBalance=null!==(e=object.initialBalance)&&void 0!==e?e:"",n.balance=null!==(t=object.balance)&&void 0!==t?t:"",n}};const Q={creationHeight:o.default.ZERO,initialBalance:"",sharesDst:""};t.RedelegationEntry={encode:(e,t=c.default.Writer.create())=>(e.creationHeight.isZero()||t.uint32(8).int64(e.creationHeight),void 0!==e.completionTime&&d.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),t),decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},Q);for(;t.pos>>3){case 1:r.creationHeight=t.int64();break;case 2:r.completionTime=d.Timestamp.decode(t,t.uint32());break;case 3:r.initialBalance=t.string();break;case 4:r.sharesDst=t.string();break;default:t.skipType(7&e)}}return r},fromJSON(object){const e=Object.assign({},Q);return e.creationHeight=void 0!==object.creationHeight&&null!==object.creationHeight?o.default.fromString(object.creationHeight):o.default.ZERO,e.completionTime=void 0!==object.completionTime&&null!==object.completionTime?L(object.completionTime):void 0,e.initialBalance=void 0!==object.initialBalance&&null!==object.initialBalance?String(object.initialBalance):"",e.sharesDst=void 0!==object.sharesDst&&null!==object.sharesDst?String(object.sharesDst):"",e},toJSON(e){const t={};return void 0!==e.creationHeight&&(t.creationHeight=(e.creationHeight||o.default.ZERO).toString()),void 0!==e.completionTime&&(t.completionTime=F(e.completionTime).toISOString()),void 0!==e.initialBalance&&(t.initialBalance=e.initialBalance),void 0!==e.sharesDst&&(t.sharesDst=e.sharesDst),t},fromPartial(object){var e,t;const n=Object.assign({},Q);return n.creationHeight=void 0!==object.creationHeight&&null!==object.creationHeight?o.default.fromValue(object.creationHeight):o.default.ZERO,n.completionTime=void 0!==object.completionTime&&null!==object.completionTime?d.Timestamp.fromPartial(object.completionTime):void 0,n.initialBalance=null!==(e=object.initialBalance)&&void 0!==e?e:"",n.sharesDst=null!==(t=object.sharesDst)&&void 0!==t?t:"",n}};const N={delegatorAddress:"",validatorSrcAddress:"",validatorDstAddress:""};t.Redelegation={encode(e,n=c.default.Writer.create()){""!==e.delegatorAddress&&n.uint32(10).string(e.delegatorAddress),""!==e.validatorSrcAddress&&n.uint32(18).string(e.validatorSrcAddress),""!==e.validatorDstAddress&&n.uint32(26).string(e.validatorDstAddress);for(const r of e.entries)t.RedelegationEntry.encode(r,n.uint32(34).fork()).ldelim();return n},decode(input,e){const n=input instanceof c.default.Reader?input:new c.default.Reader(input);let r=void 0===e?n.len:n.pos+e;const o=Object.assign({},N);for(o.entries=[];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(object){var e;const n=Object.assign({},N);return n.delegatorAddress=void 0!==object.delegatorAddress&&null!==object.delegatorAddress?String(object.delegatorAddress):"",n.validatorSrcAddress=void 0!==object.validatorSrcAddress&&null!==object.validatorSrcAddress?String(object.validatorSrcAddress):"",n.validatorDstAddress=void 0!==object.validatorDstAddress&&null!==object.validatorDstAddress?String(object.validatorDstAddress):"",n.entries=(null!==(e=object.entries)&&void 0!==e?e:[]).map((e=>t.RedelegationEntry.fromJSON(e))),n},toJSON(e){const n={};return void 0!==e.delegatorAddress&&(n.delegatorAddress=e.delegatorAddress),void 0!==e.validatorSrcAddress&&(n.validatorSrcAddress=e.validatorSrcAddress),void 0!==e.validatorDstAddress&&(n.validatorDstAddress=e.validatorDstAddress),e.entries?n.entries=e.entries.map((e=>e?t.RedelegationEntry.toJSON(e):void 0)):n.entries=[],n},fromPartial(object){var e,n,r,o;const c=Object.assign({},N);return c.delegatorAddress=null!==(e=object.delegatorAddress)&&void 0!==e?e:"",c.validatorSrcAddress=null!==(n=object.validatorSrcAddress)&&void 0!==n?n:"",c.validatorDstAddress=null!==(r=object.validatorDstAddress)&&void 0!==r?r:"",c.entries=(null===(o=object.entries)||void 0===o?void 0:o.map((e=>t.RedelegationEntry.fromPartial(e))))||[],c}};const D={maxValidators:0,maxEntries:0,historicalEntries:0,bondDenom:""};t.Params={encode:(e,t=c.default.Writer.create())=>(void 0!==e.unbondingTime&&h.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(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},D);for(;t.pos>>3){case 1:r.unbondingTime=h.Duration.decode(t,t.uint32());break;case 2:r.maxValidators=t.uint32();break;case 3:r.maxEntries=t.uint32();break;case 4:r.historicalEntries=t.uint32();break;case 5:r.bondDenom=t.string();break;default:t.skipType(7&e)}}return r},fromJSON(object){const e=Object.assign({},D);return e.unbondingTime=void 0!==object.unbondingTime&&null!==object.unbondingTime?h.Duration.fromJSON(object.unbondingTime):void 0,e.maxValidators=void 0!==object.maxValidators&&null!==object.maxValidators?Number(object.maxValidators):0,e.maxEntries=void 0!==object.maxEntries&&null!==object.maxEntries?Number(object.maxEntries):0,e.historicalEntries=void 0!==object.historicalEntries&&null!==object.historicalEntries?Number(object.historicalEntries):0,e.bondDenom=void 0!==object.bondDenom&&null!==object.bondDenom?String(object.bondDenom):"",e},toJSON(e){const t={};return void 0!==e.unbondingTime&&(t.unbondingTime=e.unbondingTime?h.Duration.toJSON(e.unbondingTime):void 0),void 0!==e.maxValidators&&(t.maxValidators=e.maxValidators),void 0!==e.maxEntries&&(t.maxEntries=e.maxEntries),void 0!==e.historicalEntries&&(t.historicalEntries=e.historicalEntries),void 0!==e.bondDenom&&(t.bondDenom=e.bondDenom),t},fromPartial(object){var e,t,n,r;const o=Object.assign({},D);return o.unbondingTime=void 0!==object.unbondingTime&&null!==object.unbondingTime?h.Duration.fromPartial(object.unbondingTime):void 0,o.maxValidators=null!==(e=object.maxValidators)&&void 0!==e?e:0,o.maxEntries=null!==(t=object.maxEntries)&&void 0!==t?t:0,o.historicalEntries=null!==(n=object.historicalEntries)&&void 0!==n?n:0,o.bondDenom=null!==(r=object.bondDenom)&&void 0!==r?r:"",o}};const T={};t.DelegationResponse={encode:(e,n=c.default.Writer.create())=>(void 0!==e.delegation&&t.Delegation.encode(e.delegation,n.uint32(10).fork()).ldelim(),void 0!==e.balance&&A.Coin.encode(e.balance,n.uint32(18).fork()).ldelim(),n),decode(input,e){const n=input instanceof c.default.Reader?input:new c.default.Reader(input);let r=void 0===e?n.len:n.pos+e;const o=Object.assign({},T);for(;n.pos>>3){case 1:o.delegation=t.Delegation.decode(n,n.uint32());break;case 2:o.balance=A.Coin.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(object){const e=Object.assign({},T);return e.delegation=void 0!==object.delegation&&null!==object.delegation?t.Delegation.fromJSON(object.delegation):void 0,e.balance=void 0!==object.balance&&null!==object.balance?A.Coin.fromJSON(object.balance):void 0,e},toJSON(e){const n={};return void 0!==e.delegation&&(n.delegation=e.delegation?t.Delegation.toJSON(e.delegation):void 0),void 0!==e.balance&&(n.balance=e.balance?A.Coin.toJSON(e.balance):void 0),n},fromPartial(object){const e=Object.assign({},T);return e.delegation=void 0!==object.delegation&&null!==object.delegation?t.Delegation.fromPartial(object.delegation):void 0,e.balance=void 0!==object.balance&&null!==object.balance?A.Coin.fromPartial(object.balance):void 0,e}};const j={balance:""};t.RedelegationEntryResponse={encode:(e,n=c.default.Writer.create())=>(void 0!==e.redelegationEntry&&t.RedelegationEntry.encode(e.redelegationEntry,n.uint32(10).fork()).ldelim(),""!==e.balance&&n.uint32(34).string(e.balance),n),decode(input,e){const n=input instanceof c.default.Reader?input:new c.default.Reader(input);let r=void 0===e?n.len:n.pos+e;const o=Object.assign({},j);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(object){const e=Object.assign({},j);return e.redelegationEntry=void 0!==object.redelegationEntry&&null!==object.redelegationEntry?t.RedelegationEntry.fromJSON(object.redelegationEntry):void 0,e.balance=void 0!==object.balance&&null!==object.balance?String(object.balance):"",e},toJSON(e){const n={};return void 0!==e.redelegationEntry&&(n.redelegationEntry=e.redelegationEntry?t.RedelegationEntry.toJSON(e.redelegationEntry):void 0),void 0!==e.balance&&(n.balance=e.balance),n},fromPartial(object){var e;const n=Object.assign({},j);return n.redelegationEntry=void 0!==object.redelegationEntry&&null!==object.redelegationEntry?t.RedelegationEntry.fromPartial(object.redelegationEntry):void 0,n.balance=null!==(e=object.balance)&&void 0!==e?e:"",n}};const U={};t.RedelegationResponse={encode(e,n=c.default.Writer.create()){void 0!==e.redelegation&&t.Redelegation.encode(e.redelegation,n.uint32(10).fork()).ldelim();for(const r of e.entries)t.RedelegationEntryResponse.encode(r,n.uint32(18).fork()).ldelim();return n},decode(input,e){const n=input instanceof c.default.Reader?input:new c.default.Reader(input);let r=void 0===e?n.len:n.pos+e;const o=Object.assign({},U);for(o.entries=[];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(object){var e;const n=Object.assign({},U);return n.redelegation=void 0!==object.redelegation&&null!==object.redelegation?t.Redelegation.fromJSON(object.redelegation):void 0,n.entries=(null!==(e=object.entries)&&void 0!==e?e:[]).map((e=>t.RedelegationEntryResponse.fromJSON(e))),n},toJSON(e){const n={};return void 0!==e.redelegation&&(n.redelegation=e.redelegation?t.Redelegation.toJSON(e.redelegation):void 0),e.entries?n.entries=e.entries.map((e=>e?t.RedelegationEntryResponse.toJSON(e):void 0)):n.entries=[],n},fromPartial(object){var e;const n=Object.assign({},U);return n.redelegation=void 0!==object.redelegation&&null!==object.redelegation?t.Redelegation.fromPartial(object.redelegation):void 0,n.entries=(null===(e=object.entries)||void 0===e?void 0:e.map((e=>t.RedelegationEntryResponse.fromPartial(e))))||[],n}};const J={notBondedTokens:"",bondedTokens:""};function H(e){var t;return{seconds:(t=e.getTime()/1e3,o.default.fromNumber(t)),nanos:e.getTime()%1e3*1e6}}function F(e){let t=1e3*e.seconds.toNumber();return t+=e.nanos/1e6,new Date(t)}function L(e){return e instanceof Date?H(e):"string"==typeof e?H(new Date(e)):d.Timestamp.fromJSON(e)}t.Pool={encode:(e,t=c.default.Writer.create())=>(""!==e.notBondedTokens&&t.uint32(10).string(e.notBondedTokens),""!==e.bondedTokens&&t.uint32(18).string(e.bondedTokens),t),decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},J);for(;t.pos>>3){case 1:r.notBondedTokens=t.string();break;case 2:r.bondedTokens=t.string();break;default:t.skipType(7&e)}}return r},fromJSON(object){const e=Object.assign({},J);return e.notBondedTokens=void 0!==object.notBondedTokens&&null!==object.notBondedTokens?String(object.notBondedTokens):"",e.bondedTokens=void 0!==object.bondedTokens&&null!==object.bondedTokens?String(object.bondedTokens):"",e},toJSON(e){const t={};return void 0!==e.notBondedTokens&&(t.notBondedTokens=e.notBondedTokens),void 0!==e.bondedTokens&&(t.bondedTokens=e.bondedTokens),t},fromPartial(object){var e,t;const n=Object.assign({},J);return n.notBondedTokens=null!==(e=object.notBondedTokens)&&void 0!==e?e:"",n.bondedTokens=null!==(t=object.bondedTokens)&&void 0!==t?t:"",n}},c.default.util.Long!==o.default&&(c.default.util.Long=o.default,c.default.configure())},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isSearchByTagsQuery=t.isSearchBySentFromOrToQuery=t.isSearchByHeightQuery=void 0,t.isSearchByHeightQuery=function(e){return void 0!==e.height},t.isSearchBySentFromOrToQuery=function(e){return void 0!==e.sentFromOrTo},t.isSearchByTagsQuery=function(e){return void 0!==e.tags}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StargateClient=t.assertIsDeliverTxFailure=t.assertIsDeliverTxSuccess=t.isDeliverTxSuccess=t.isDeliverTxFailure=t.TimeoutError=void 0;const r=n(77),o=n(17),c=n(34),l=n(215),d=n(33),f=n(426),h=n(142),A=n(50),m=n(446);class v extends Error{constructor(e,t){super(e),this.txId=t}}function y(e){return!!e.code}function I(e){return!y(e)}t.TimeoutError=v,t.isDeliverTxFailure=y,t.isDeliverTxSuccess=I,t.assertIsDeliverTxSuccess=function(e){if(y(e))throw new Error(`Error when broadcasting tx ${e.transactionHash} at height ${e.height}. Code: ${e.code}; Raw log: ${e.rawLog}`)},t.assertIsDeliverTxFailure=function(e){if(I(e))throw new Error(`Transaction ${e.transactionHash} did not fail at height ${e.height}. Code: ${e.code}; Raw log: ${e.rawLog}`)};class w{constructor(e,t){e&&(this.tmClient=e,this.queryClient=A.QueryClient.withExtensions(e,h.setupAuthExtension,h.setupBankExtension,h.setupStakingExtension,h.setupTxExtension));const{accountParser:n=f.accountFromAny}=t;this.accountParser=n}static async connect(e,t={}){const n=await l.Tendermint34Client.connect(e);return new w(n,t)}getTmClient(){return this.tmClient}forceGetTmClient(){if(!this.tmClient)throw new Error("Tendermint client not available. You cannot use online functionality in offline mode.");return this.tmClient}getQueryClient(){return this.queryClient}forceGetQueryClient(){if(!this.queryClient)throw new Error("Query client not available. You cannot use online functionality in offline mode.");return this.queryClient}async getChainId(){if(!this.chainId){const e=(await this.forceGetTmClient().status()).nodeInfo.network;if(!e)throw new Error("Chain ID must not be empty");this.chainId=e}return this.chainId}async getHeight(){return(await this.forceGetTmClient().status()).syncInfo.latestBlockHeight}async getAccount(e){try{const 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(address){const e=await this.getAccount(address);if(!e)throw new Error("Account does not exist on chain. Send some tokens there before trying to query sequence.");return{accountNumber:e.accountNumber,sequence:e.sequence}}async getBlock(e){const t=await this.forceGetTmClient().block(e);return{id:(0,o.toHex)(t.blockId.hash).toUpperCase(),header:{version:{block:new c.Uint53(t.block.header.version.block).toString(),app:new c.Uint53(t.block.header.version.app).toString()},height:t.block.header.height,chainId:t.block.header.chainId,time:(0,l.toRfc3339WithNanoseconds)(t.block.header.time)},txs:t.block.txs}}async getBalance(address,e){return this.forceGetQueryClient().bank.balance(address,e)}async getAllBalances(address){return this.forceGetQueryClient().bank.allBalances(address)}async getBalanceStaked(address){const e=[];let t;do{const{delegationResponses:n,pagination:r}=await this.forceGetQueryClient().staking.delegatorDelegations(address,t),o=n||[];e.push(...o),t=null==r?void 0:r.nextKey}while(void 0!==t&&0!==t.length);return e.reduce(((e,t)=>((0,d.assert)(t.balance),null!==e?(0,r.addCoins)(e,t.balance):t.balance)),null)}async getDelegation(e,t){var n;let r;try{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"))throw e}return r||null}async getTx(e){var t;return null!==(t=(await this.txsQuery(`tx.hash='${e}'`))[0])&&void 0!==t?t:null}async searchTx(e,filter={}){const t=filter.minHeight||0,n=filter.maxHeight||Number.MAX_SAFE_INTEGER;if(n=${t} AND tx.height<=${n}`}let o;if((0,m.isSearchByHeightQuery)(e))o=e.height>=t&&e.height<=n?await this.txsQuery(`tx.height=${e.height}`):[];else if((0,m.isSearchBySentFromOrToQuery)(e)){const t=r(`message.module='bank' AND transfer.sender='${e.sentFromOrTo}'`),n=r(`message.module='bank' AND transfer.recipient='${e.sentFromOrTo}'`),[c,l]=await Promise.all([t,n].map((e=>this.txsQuery(e)))),d=c.map((e=>e.hash));o=[...c,...l.filter((e=>!d.includes(e.hash)))]}else{if(!(0,m.isSearchByTagsQuery)(e))throw new Error("Unknown query type");{const t=r(e.tags.map((e=>`${e.key}='${e.value}'`)).join(" AND "));o=await this.txsQuery(t)}}return o.filter((e=>e.height>=t&&e.height<=n))}disconnect(){this.tmClient&&this.tmClient.disconnect()}async broadcastTx(e,t=6e4,n=3e3){let r=!1;const c=setTimeout((()=>{r=!0}),t),l=async e=>{if(r)throw new v(`Transaction with ID ${e} was submitted but was not yet found on the chain. You might want to check later. There was a wait of ${t/1e3} seconds.`,e);await(0,d.sleep)(n);const o=await this.getTx(e);return o?{code:o.code,height:o.height,rawLog:o.rawLog,transactionHash:e,gasUsed:o.gasUsed,gasWanted:o.gasWanted}:l(e)},f=await this.forceGetTmClient().broadcastTxSync({tx:e});if(f.code)return Promise.reject(new Error(`Broadcasting transaction failed with code ${f.code} (codespace: ${f.codeSpace}). Log: ${f.log}`));const h=(0,o.toHex)(f.hash).toUpperCase();return new Promise(((e,t)=>l(h).then((t=>{clearTimeout(c),e(t)}),(e=>{clearTimeout(c),t(e)}))))}async txsQuery(e){return(await this.forceGetTmClient().txSearchAll({query:e})).txs.map((e=>({height:e.height,hash:(0,o.toHex)(e.hash).toUpperCase(),code:e.result.code,rawLog:e.result.log||"",tx:e.tx,gasUsed:e.result.gasUsed,gasWanted:e.result.gasWanted})))}}t.StargateClient=w},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.setupISCNExtension=void 0;const o=r(n(1)),c=n(96),l=n(449);t.setupISCNExtension=function(base){const e=(0,c.createProtobufRpcClient)(base),t=new l.QueryClientImpl(e);return{iscn:{recordsById:(e,n=0,r=0)=>t.RecordsById({iscnId:e,fromVersion:o.default.fromNumber(n,!0),toVersion:o.default.fromNumber(r,!0)}),recordsByFingerprint:(e,n=0)=>t.RecordsByFingerprint({fingerprint:e,fromSequence:o.default.fromNumber(n,!0)}),recordsByOwner:(e,n=0)=>t.RecordsByOwner({owner:e,fromSequence:o.default.fromNumber(n,!0)}),params:()=>t.Params({}),getCid:e=>t.GetCid({cid:e}),hasCid:e=>t.HasCid({cid:e}),getCidSize:e=>t.GetCidSize({cid:e})}}}},function(e,t,n){"use strict";(function(e){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.QueryClientImpl=t.QueryHasCidResponse=t.QueryHasCidRequest=t.QueryGetCidSizeResponse=t.QueryGetCidSizeRequest=t.QueryGetCidResponse=t.QueryGetCidRequest=t.QueryParamsResponse=t.QueryParamsRequest=t.QueryRecordsByOwnerResponse=t.QueryRecordsByOwnerRequest=t.QueryRecordsByFingerprintResponse=t.QueryRecordsByFingerprintRequest=t.QueryRecordsByIdResponse=t.QueryRecordsByIdRequest=t.QueryResponseRecord=t.protobufPackage=void 0;const o=r(n(1)),c=r(n(2)),l=n(864);t.protobufPackage="likechain.iscn";const d={ipld:""};t.QueryResponseRecord={encode:(e,t=c.default.Writer.create())=>(""!==e.ipld&&t.uint32(10).string(e.ipld),0!==e.data.length&&t.uint32(18).bytes(e.data),t),decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},d);for(r.data=new Uint8Array;t.pos>>3){case 1:r.ipld=t.string();break;case 2:r.data=t.bytes();break;default:t.skipType(7&e)}}return r},fromJSON(object){const e=Object.assign({},d);return e.data=new Uint8Array,void 0!==object.ipld&&null!==object.ipld?e.ipld=String(object.ipld):e.ipld="",void 0!==object.data&&null!==object.data&&(e.data=P(object.data)),e},toJSON(e){const t={};return void 0!==e.ipld&&(t.ipld=e.ipld),void 0!==e.data&&(t.data=M(void 0!==e.data?e.data:new Uint8Array)),t},fromPartial(object){const e=Object.assign({},d);return void 0!==object.ipld&&null!==object.ipld?e.ipld=object.ipld:e.ipld="",void 0!==object.data&&null!==object.data?e.data=object.data:e.data=new Uint8Array,e}};const f={iscnId:"",fromVersion:o.default.UZERO,toVersion:o.default.UZERO};t.QueryRecordsByIdRequest={encode:(e,t=c.default.Writer.create())=>(""!==e.iscnId&&t.uint32(10).string(e.iscnId),e.fromVersion.isZero()||t.uint32(16).uint64(e.fromVersion),e.toVersion.isZero()||t.uint32(24).uint64(e.toVersion),t),decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},f);for(;t.pos>>3){case 1:r.iscnId=t.string();break;case 2:r.fromVersion=t.uint64();break;case 3:r.toVersion=t.uint64();break;default:t.skipType(7&e)}}return r},fromJSON(object){const e=Object.assign({},f);return void 0!==object.iscnId&&null!==object.iscnId?e.iscnId=String(object.iscnId):e.iscnId="",void 0!==object.fromVersion&&null!==object.fromVersion?e.fromVersion=o.default.fromString(object.fromVersion):e.fromVersion=o.default.UZERO,void 0!==object.toVersion&&null!==object.toVersion?e.toVersion=o.default.fromString(object.toVersion):e.toVersion=o.default.UZERO,e},toJSON(e){const t={};return void 0!==e.iscnId&&(t.iscnId=e.iscnId),void 0!==e.fromVersion&&(t.fromVersion=(e.fromVersion||o.default.UZERO).toString()),void 0!==e.toVersion&&(t.toVersion=(e.toVersion||o.default.UZERO).toString()),t},fromPartial(object){const e=Object.assign({},f);return void 0!==object.iscnId&&null!==object.iscnId?e.iscnId=object.iscnId:e.iscnId="",void 0!==object.fromVersion&&null!==object.fromVersion?e.fromVersion=object.fromVersion:e.fromVersion=o.default.UZERO,void 0!==object.toVersion&&null!==object.toVersion?e.toVersion=object.toVersion:e.toVersion=o.default.UZERO,e}};const h={owner:"",latestVersion:o.default.UZERO};t.QueryRecordsByIdResponse={encode(e,n=c.default.Writer.create()){""!==e.owner&&n.uint32(10).string(e.owner),e.latestVersion.isZero()||n.uint32(16).uint64(e.latestVersion);for(const r of e.records)t.QueryResponseRecord.encode(r,n.uint32(26).fork()).ldelim();return n},decode(input,e){const n=input instanceof c.default.Reader?input:new c.default.Reader(input);let r=void 0===e?n.len:n.pos+e;const o=Object.assign({},h);for(o.records=[];n.pos>>3){case 1:o.owner=n.string();break;case 2:o.latestVersion=n.uint64();break;case 3:o.records.push(t.QueryResponseRecord.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return o},fromJSON(object){const e=Object.assign({},h);if(e.records=[],void 0!==object.owner&&null!==object.owner?e.owner=String(object.owner):e.owner="",void 0!==object.latestVersion&&null!==object.latestVersion?e.latestVersion=o.default.fromString(object.latestVersion):e.latestVersion=o.default.UZERO,void 0!==object.records&&null!==object.records)for(const n of object.records)e.records.push(t.QueryResponseRecord.fromJSON(n));return e},toJSON(e){const n={};return void 0!==e.owner&&(n.owner=e.owner),void 0!==e.latestVersion&&(n.latestVersion=(e.latestVersion||o.default.UZERO).toString()),e.records?n.records=e.records.map((e=>e?t.QueryResponseRecord.toJSON(e):void 0)):n.records=[],n},fromPartial(object){const e=Object.assign({},h);if(e.records=[],void 0!==object.owner&&null!==object.owner?e.owner=object.owner:e.owner="",void 0!==object.latestVersion&&null!==object.latestVersion?e.latestVersion=object.latestVersion:e.latestVersion=o.default.UZERO,void 0!==object.records&&null!==object.records)for(const n of object.records)e.records.push(t.QueryResponseRecord.fromPartial(n));return e}};const A={fingerprint:"",fromSequence:o.default.UZERO};t.QueryRecordsByFingerprintRequest={encode:(e,t=c.default.Writer.create())=>(""!==e.fingerprint&&t.uint32(10).string(e.fingerprint),e.fromSequence.isZero()||t.uint32(16).uint64(e.fromSequence),t),decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},A);for(;t.pos>>3){case 1:r.fingerprint=t.string();break;case 2:r.fromSequence=t.uint64();break;default:t.skipType(7&e)}}return r},fromJSON(object){const e=Object.assign({},A);return void 0!==object.fingerprint&&null!==object.fingerprint?e.fingerprint=String(object.fingerprint):e.fingerprint="",void 0!==object.fromSequence&&null!==object.fromSequence?e.fromSequence=o.default.fromString(object.fromSequence):e.fromSequence=o.default.UZERO,e},toJSON(e){const t={};return void 0!==e.fingerprint&&(t.fingerprint=e.fingerprint),void 0!==e.fromSequence&&(t.fromSequence=(e.fromSequence||o.default.UZERO).toString()),t},fromPartial(object){const e=Object.assign({},A);return void 0!==object.fingerprint&&null!==object.fingerprint?e.fingerprint=object.fingerprint:e.fingerprint="",void 0!==object.fromSequence&&null!==object.fromSequence?e.fromSequence=object.fromSequence:e.fromSequence=o.default.UZERO,e}};const m={nextSequence:o.default.UZERO};t.QueryRecordsByFingerprintResponse={encode(e,n=c.default.Writer.create()){for(const r of e.records)t.QueryResponseRecord.encode(r,n.uint32(10).fork()).ldelim();return e.nextSequence.isZero()||n.uint32(16).uint64(e.nextSequence),n},decode(input,e){const n=input instanceof c.default.Reader?input:new c.default.Reader(input);let r=void 0===e?n.len:n.pos+e;const o=Object.assign({},m);for(o.records=[];n.pos>>3){case 1:o.records.push(t.QueryResponseRecord.decode(n,n.uint32()));break;case 2:o.nextSequence=n.uint64();break;default:n.skipType(7&e)}}return o},fromJSON(object){const e=Object.assign({},m);if(e.records=[],void 0!==object.records&&null!==object.records)for(const n of object.records)e.records.push(t.QueryResponseRecord.fromJSON(n));return void 0!==object.nextSequence&&null!==object.nextSequence?e.nextSequence=o.default.fromString(object.nextSequence):e.nextSequence=o.default.UZERO,e},toJSON(e){const n={};return e.records?n.records=e.records.map((e=>e?t.QueryResponseRecord.toJSON(e):void 0)):n.records=[],void 0!==e.nextSequence&&(n.nextSequence=(e.nextSequence||o.default.UZERO).toString()),n},fromPartial(object){const e=Object.assign({},m);if(e.records=[],void 0!==object.records&&null!==object.records)for(const n of object.records)e.records.push(t.QueryResponseRecord.fromPartial(n));return void 0!==object.nextSequence&&null!==object.nextSequence?e.nextSequence=object.nextSequence:e.nextSequence=o.default.UZERO,e}};const v={owner:"",fromSequence:o.default.UZERO};t.QueryRecordsByOwnerRequest={encode:(e,t=c.default.Writer.create())=>(""!==e.owner&&t.uint32(10).string(e.owner),e.fromSequence.isZero()||t.uint32(16).uint64(e.fromSequence),t),decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},v);for(;t.pos>>3){case 1:r.owner=t.string();break;case 2:r.fromSequence=t.uint64();break;default:t.skipType(7&e)}}return r},fromJSON(object){const e=Object.assign({},v);return void 0!==object.owner&&null!==object.owner?e.owner=String(object.owner):e.owner="",void 0!==object.fromSequence&&null!==object.fromSequence?e.fromSequence=o.default.fromString(object.fromSequence):e.fromSequence=o.default.UZERO,e},toJSON(e){const t={};return void 0!==e.owner&&(t.owner=e.owner),void 0!==e.fromSequence&&(t.fromSequence=(e.fromSequence||o.default.UZERO).toString()),t},fromPartial(object){const e=Object.assign({},v);return void 0!==object.owner&&null!==object.owner?e.owner=object.owner:e.owner="",void 0!==object.fromSequence&&null!==object.fromSequence?e.fromSequence=object.fromSequence:e.fromSequence=o.default.UZERO,e}};const y={nextSequence:o.default.UZERO};t.QueryRecordsByOwnerResponse={encode(e,n=c.default.Writer.create()){for(const r of e.records)t.QueryResponseRecord.encode(r,n.uint32(10).fork()).ldelim();return e.nextSequence.isZero()||n.uint32(16).uint64(e.nextSequence),n},decode(input,e){const n=input instanceof c.default.Reader?input:new c.default.Reader(input);let r=void 0===e?n.len:n.pos+e;const o=Object.assign({},y);for(o.records=[];n.pos>>3){case 1:o.records.push(t.QueryResponseRecord.decode(n,n.uint32()));break;case 2:o.nextSequence=n.uint64();break;default:n.skipType(7&e)}}return o},fromJSON(object){const e=Object.assign({},y);if(e.records=[],void 0!==object.records&&null!==object.records)for(const n of object.records)e.records.push(t.QueryResponseRecord.fromJSON(n));return void 0!==object.nextSequence&&null!==object.nextSequence?e.nextSequence=o.default.fromString(object.nextSequence):e.nextSequence=o.default.UZERO,e},toJSON(e){const n={};return e.records?n.records=e.records.map((e=>e?t.QueryResponseRecord.toJSON(e):void 0)):n.records=[],void 0!==e.nextSequence&&(n.nextSequence=(e.nextSequence||o.default.UZERO).toString()),n},fromPartial(object){const e=Object.assign({},y);if(e.records=[],void 0!==object.records&&null!==object.records)for(const n of object.records)e.records.push(t.QueryResponseRecord.fromPartial(n));return void 0!==object.nextSequence&&null!==object.nextSequence?e.nextSequence=object.nextSequence:e.nextSequence=o.default.UZERO,e}};const I={};t.QueryParamsRequest={encode:(e,t=c.default.Writer.create())=>t,decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},I);for(;t.posObject.assign({},I),toJSON:e=>({}),fromPartial:e=>Object.assign({},I)};const w={};t.QueryParamsResponse={encode:(e,t=c.default.Writer.create())=>(void 0!==e.params&&l.Params.encode(e.params,t.uint32(10).fork()).ldelim(),t),decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},w);for(;t.pos>>3==1)r.params=l.Params.decode(t,t.uint32());else t.skipType(7&e)}return r},fromJSON(object){const e=Object.assign({},w);return void 0!==object.params&&null!==object.params?e.params=l.Params.fromJSON(object.params):e.params=void 0,e},toJSON(e){const t={};return void 0!==e.params&&(t.params=e.params?l.Params.toJSON(e.params):void 0),t},fromPartial(object){const e=Object.assign({},w);return void 0!==object.params&&null!==object.params?e.params=l.Params.fromPartial(object.params):e.params=void 0,e}};const _={cid:""};t.QueryGetCidRequest={encode:(e,t=c.default.Writer.create())=>(""!==e.cid&&t.uint32(10).string(e.cid),t),decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},_);for(;t.pos>>3==1)r.cid=t.string();else t.skipType(7&e)}return r},fromJSON(object){const e=Object.assign({},_);return void 0!==object.cid&&null!==object.cid?e.cid=String(object.cid):e.cid="",e},toJSON(e){const t={};return void 0!==e.cid&&(t.cid=e.cid),t},fromPartial(object){const e=Object.assign({},_);return void 0!==object.cid&&null!==object.cid?e.cid=object.cid:e.cid="",e}};const C={};t.QueryGetCidResponse={encode:(e,t=c.default.Writer.create())=>(0!==e.data.length&&t.uint32(10).bytes(e.data),t),decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},C);for(r.data=new Uint8Array;t.pos>>3==1)r.data=t.bytes();else t.skipType(7&e)}return r},fromJSON(object){const e=Object.assign({},C);return e.data=new Uint8Array,void 0!==object.data&&null!==object.data&&(e.data=P(object.data)),e},toJSON(e){const t={};return void 0!==e.data&&(t.data=M(void 0!==e.data?e.data:new Uint8Array)),t},fromPartial(object){const e=Object.assign({},C);return void 0!==object.data&&null!==object.data?e.data=object.data:e.data=new Uint8Array,e}};const S={cid:""};t.QueryGetCidSizeRequest={encode:(e,t=c.default.Writer.create())=>(""!==e.cid&&t.uint32(10).string(e.cid),t),decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},S);for(;t.pos>>3==1)r.cid=t.string();else t.skipType(7&e)}return r},fromJSON(object){const e=Object.assign({},S);return void 0!==object.cid&&null!==object.cid?e.cid=String(object.cid):e.cid="",e},toJSON(e){const t={};return void 0!==e.cid&&(t.cid=e.cid),t},fromPartial(object){const e=Object.assign({},S);return void 0!==object.cid&&null!==object.cid?e.cid=object.cid:e.cid="",e}};const E={size:o.default.UZERO};t.QueryGetCidSizeResponse={encode:(e,t=c.default.Writer.create())=>(e.size.isZero()||t.uint32(8).uint64(e.size),t),decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},E);for(;t.pos>>3==1)r.size=t.uint64();else t.skipType(7&e)}return r},fromJSON(object){const e=Object.assign({},E);return void 0!==object.size&&null!==object.size?e.size=o.default.fromString(object.size):e.size=o.default.UZERO,e},toJSON(e){const t={};return void 0!==e.size&&(t.size=(e.size||o.default.UZERO).toString()),t},fromPartial(object){const e=Object.assign({},E);return void 0!==object.size&&null!==object.size?e.size=object.size:e.size=o.default.UZERO,e}};const B={cid:""};t.QueryHasCidRequest={encode:(e,t=c.default.Writer.create())=>(""!==e.cid&&t.uint32(10).string(e.cid),t),decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},B);for(;t.pos>>3==1)r.cid=t.string();else t.skipType(7&e)}return r},fromJSON(object){const e=Object.assign({},B);return void 0!==object.cid&&null!==object.cid?e.cid=String(object.cid):e.cid="",e},toJSON(e){const t={};return void 0!==e.cid&&(t.cid=e.cid),t},fromPartial(object){const e=Object.assign({},B);return void 0!==object.cid&&null!==object.cid?e.cid=object.cid:e.cid="",e}};const k={exist:!1};t.QueryHasCidResponse={encode:(e,t=c.default.Writer.create())=>(!0===e.exist&&t.uint32(8).bool(e.exist),t),decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},k);for(;t.pos>>3==1)r.exist=t.bool();else t.skipType(7&e)}return r},fromJSON(object){const e=Object.assign({},k);return void 0!==object.exist&&null!==object.exist?e.exist=Boolean(object.exist):e.exist=!1,e},toJSON(e){const t={};return void 0!==e.exist&&(t.exist=e.exist),t},fromPartial(object){const e=Object.assign({},k);return void 0!==object.exist&&null!==object.exist?e.exist=object.exist:e.exist=!1,e}};t.QueryClientImpl=class{constructor(e){this.rpc=e,this.RecordsById=this.RecordsById.bind(this),this.RecordsByFingerprint=this.RecordsByFingerprint.bind(this),this.RecordsByOwner=this.RecordsByOwner.bind(this),this.Params=this.Params.bind(this),this.GetCid=this.GetCid.bind(this),this.HasCid=this.HasCid.bind(this),this.GetCidSize=this.GetCidSize.bind(this)}RecordsById(e){const data=t.QueryRecordsByIdRequest.encode(e).finish();return this.rpc.request("likechain.iscn.Query","RecordsById",data).then((data=>t.QueryRecordsByIdResponse.decode(new c.default.Reader(data))))}RecordsByFingerprint(e){const data=t.QueryRecordsByFingerprintRequest.encode(e).finish();return this.rpc.request("likechain.iscn.Query","RecordsByFingerprint",data).then((data=>t.QueryRecordsByFingerprintResponse.decode(new c.default.Reader(data))))}RecordsByOwner(e){const data=t.QueryRecordsByOwnerRequest.encode(e).finish();return this.rpc.request("likechain.iscn.Query","RecordsByOwner",data).then((data=>t.QueryRecordsByOwnerResponse.decode(new c.default.Reader(data))))}Params(e){const data=t.QueryParamsRequest.encode(e).finish();return this.rpc.request("likechain.iscn.Query","Params",data).then((data=>t.QueryParamsResponse.decode(new c.default.Reader(data))))}GetCid(e){const data=t.QueryGetCidRequest.encode(e).finish();return this.rpc.request("likechain.iscn.Query","GetCid",data).then((data=>t.QueryGetCidResponse.decode(new c.default.Reader(data))))}HasCid(e){const data=t.QueryHasCidRequest.encode(e).finish();return this.rpc.request("likechain.iscn.Query","HasCid",data).then((data=>t.QueryHasCidResponse.decode(new c.default.Reader(data))))}GetCidSize(e){const data=t.QueryGetCidSizeRequest.encode(e).finish();return this.rpc.request("likechain.iscn.Query","GetCidSize",data).then((data=>t.QueryGetCidSizeResponse.decode(new c.default.Reader(data))))}};var O=(()=>{if(void 0!==O)return O;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==e)return e;throw"Unable to locate global object"})();const R=O.atob||(e=>O.Buffer.from(e,"base64").toString("binary"));function P(e){const t=R(e),n=new Uint8Array(t.length);for(let i=0;iO.Buffer.from(e,"binary").toString("base64"));function M(e){const t=[];for(const n of e)t.push(String.fromCharCode(n));return x(t.join(""))}c.default.util.Long!==o.default&&(c.default.util.Long=o.default,c.default.configure())}).call(this,n(3))},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.DecProto=t.IntProto=t.DecCoin=t.Coin=t.protobufPackage=void 0;const o=r(n(1)),c=r(n(2));t.protobufPackage="cosmos.base.v1beta1";const l={denom:"",amount:""};t.Coin={encode:(e,t=c.default.Writer.create())=>(""!==e.denom&&t.uint32(10).string(e.denom),""!==e.amount&&t.uint32(18).string(e.amount),t),decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},l);for(;t.pos>>3){case 1:r.denom=t.string();break;case 2:r.amount=t.string();break;default:t.skipType(7&e)}}return r},fromJSON(object){const e=Object.assign({},l);return void 0!==object.denom&&null!==object.denom?e.denom=String(object.denom):e.denom="",void 0!==object.amount&&null!==object.amount?e.amount=String(object.amount):e.amount="",e},toJSON(e){const t={};return void 0!==e.denom&&(t.denom=e.denom),void 0!==e.amount&&(t.amount=e.amount),t},fromPartial(object){const e=Object.assign({},l);return void 0!==object.denom&&null!==object.denom?e.denom=object.denom:e.denom="",void 0!==object.amount&&null!==object.amount?e.amount=object.amount:e.amount="",e}};const d={denom:"",amount:""};t.DecCoin={encode:(e,t=c.default.Writer.create())=>(""!==e.denom&&t.uint32(10).string(e.denom),""!==e.amount&&t.uint32(18).string(e.amount),t),decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},d);for(;t.pos>>3){case 1:r.denom=t.string();break;case 2:r.amount=t.string();break;default:t.skipType(7&e)}}return r},fromJSON(object){const e=Object.assign({},d);return void 0!==object.denom&&null!==object.denom?e.denom=String(object.denom):e.denom="",void 0!==object.amount&&null!==object.amount?e.amount=String(object.amount):e.amount="",e},toJSON(e){const t={};return void 0!==e.denom&&(t.denom=e.denom),void 0!==e.amount&&(t.amount=e.amount),t},fromPartial(object){const e=Object.assign({},d);return void 0!==object.denom&&null!==object.denom?e.denom=object.denom:e.denom="",void 0!==object.amount&&null!==object.amount?e.amount=object.amount:e.amount="",e}};const f={int:""};t.IntProto={encode:(e,t=c.default.Writer.create())=>(""!==e.int&&t.uint32(10).string(e.int),t),decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},f);for(;t.pos>>3==1)r.int=t.string();else t.skipType(7&e)}return r},fromJSON(object){const e=Object.assign({},f);return void 0!==object.int&&null!==object.int?e.int=String(object.int):e.int="",e},toJSON(e){const t={};return void 0!==e.int&&(t.int=e.int),t},fromPartial(object){const e=Object.assign({},f);return void 0!==object.int&&null!==object.int?e.int=object.int:e.int="",e}};const h={dec:""};t.DecProto={encode:(e,t=c.default.Writer.create())=>(""!==e.dec&&t.uint32(10).string(e.dec),t),decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},h);for(;t.pos>>3==1)r.dec=t.string();else t.skipType(7&e)}return r},fromJSON(object){const e=Object.assign({},h);return void 0!==object.dec&&null!==object.dec?e.dec=String(object.dec):e.dec="",e},toJSON(e){const t={};return void 0!==e.dec&&(t.dec=e.dec),t},fromPartial(object){const e=Object.assign({},h);return void 0!==object.dec&&null!==object.dec?e.dec=object.dec:e.dec="",e}},c.default.util.Long!==o.default&&(c.default.util.Long=o.default,c.default.configure())},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setupNFTExtension=void 0;const r=n(96),o=n(865);t.setupNFTExtension=function(base){const e=(0,r.createProtobufRpcClient)(base),t=new o.QueryClientImpl(e);return{nft:{balance:(e,n)=>t.Balance({classId:e,owner:n}),class:e=>t.Class({classId:e}),classes:e=>t.Classes({pagination:e}),NFT:(e,n)=>t.NFT({classId:e,id:n}),NFTs:(e,n,r)=>t.NFTs({classId:e,owner:n,pagination:r}),owner:(e,n)=>t.Owner({classId:e,id:n}),supply:e=>t.Supply({classId:e})}}}},function(e,t,n){"use strict";(function(e){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.PageResponse=t.PageRequest=t.protobufPackage=void 0;const o=r(n(1)),c=r(n(2));t.protobufPackage="cosmos.base.query.v1beta1";const l={offset:o.default.UZERO,limit:o.default.UZERO,countTotal:!1,reverse:!1};t.PageRequest={encode:(e,t=c.default.Writer.create())=>(0!==e.key.length&&t.uint32(10).bytes(e.key),e.offset.isZero()||t.uint32(16).uint64(e.offset),e.limit.isZero()||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(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},l);for(r.key=new Uint8Array;t.pos>>3){case 1:r.key=t.bytes();break;case 2:r.offset=t.uint64();break;case 3:r.limit=t.uint64();break;case 4:r.countTotal=t.bool();break;case 5:r.reverse=t.bool();break;default:t.skipType(7&e)}}return r},fromJSON(object){const e=Object.assign({},l);return e.key=new Uint8Array,void 0!==object.key&&null!==object.key&&(e.key=A(object.key)),void 0!==object.offset&&null!==object.offset?e.offset=o.default.fromString(object.offset):e.offset=o.default.UZERO,void 0!==object.limit&&null!==object.limit?e.limit=o.default.fromString(object.limit):e.limit=o.default.UZERO,void 0!==object.countTotal&&null!==object.countTotal?e.countTotal=Boolean(object.countTotal):e.countTotal=!1,void 0!==object.reverse&&null!==object.reverse?e.reverse=Boolean(object.reverse):e.reverse=!1,e},toJSON(e){const t={};return void 0!==e.key&&(t.key=v(void 0!==e.key?e.key:new Uint8Array)),void 0!==e.offset&&(t.offset=(e.offset||o.default.UZERO).toString()),void 0!==e.limit&&(t.limit=(e.limit||o.default.UZERO).toString()),void 0!==e.countTotal&&(t.countTotal=e.countTotal),void 0!==e.reverse&&(t.reverse=e.reverse),t},fromPartial(object){const e=Object.assign({},l);return void 0!==object.key&&null!==object.key?e.key=object.key:e.key=new Uint8Array,void 0!==object.offset&&null!==object.offset?e.offset=object.offset:e.offset=o.default.UZERO,void 0!==object.limit&&null!==object.limit?e.limit=object.limit:e.limit=o.default.UZERO,void 0!==object.countTotal&&null!==object.countTotal?e.countTotal=object.countTotal:e.countTotal=!1,void 0!==object.reverse&&null!==object.reverse?e.reverse=object.reverse:e.reverse=!1,e}};const d={total:o.default.UZERO};t.PageResponse={encode:(e,t=c.default.Writer.create())=>(0!==e.nextKey.length&&t.uint32(10).bytes(e.nextKey),e.total.isZero()||t.uint32(16).uint64(e.total),t),decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},d);for(r.nextKey=new Uint8Array;t.pos>>3){case 1:r.nextKey=t.bytes();break;case 2:r.total=t.uint64();break;default:t.skipType(7&e)}}return r},fromJSON(object){const e=Object.assign({},d);return e.nextKey=new Uint8Array,void 0!==object.nextKey&&null!==object.nextKey&&(e.nextKey=A(object.nextKey)),void 0!==object.total&&null!==object.total?e.total=o.default.fromString(object.total):e.total=o.default.UZERO,e},toJSON(e){const t={};return void 0!==e.nextKey&&(t.nextKey=v(void 0!==e.nextKey?e.nextKey:new Uint8Array)),void 0!==e.total&&(t.total=(e.total||o.default.UZERO).toString()),t},fromPartial(object){const e=Object.assign({},d);return void 0!==object.nextKey&&null!==object.nextKey?e.nextKey=object.nextKey:e.nextKey=new Uint8Array,void 0!==object.total&&null!==object.total?e.total=object.total:e.total=o.default.UZERO,e}};var f=(()=>{if(void 0!==f)return f;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==e)return e;throw"Unable to locate global object"})();const h=f.atob||(e=>f.Buffer.from(e,"base64").toString("binary"));function A(e){const t=h(e),n=new Uint8Array(t.length);for(let i=0;if.Buffer.from(e,"binary").toString("base64"));function v(e){const t=[];for(const n of e)t.push(String.fromCharCode(n));return m(t.join(""))}c.default.util.Long!==o.default&&(c.default.util.Long=o.default,c.default.configure())}).call(this,n(3))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setupLikeNFTExtension=void 0;const r=n(96),o=n(867);t.setupLikeNFTExtension=function(base){const e=(0,r.createProtobufRpcClient)(base),t=new o.QueryClientImpl(e);return{likenft:{classesByISCN:(e,n)=>t.ClassesByISCN({iscnIdPrefix:e,pagination:n}),classesByISCNIndex:e=>t.ClassesByISCNIndex({pagination:e}),ISCNByClass:e=>t.ISCNByClass({classId:e}),classesByAccount:(e,n)=>t.ClassesByAccount({account:e,pagination:n}),classesByAccountIndex:e=>t.ClassesByAccountIndex({pagination:e}),accountByClass:e=>t.AccountByClass({classId:e}),BlindBoxContent:(e,n)=>t.BlindBoxContent({classId:e,id:n}),BlindBoxContentIndex:e=>t.BlindBoxContentIndex({pagination:e}),BlindBoxContents:(e,n)=>t.BlindBoxContents({classId:e,pagination:n}),params:()=>t.Params({})}}}},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.BlindBoxContent=t.protobufPackage=void 0;const o=r(n(1)),c=r(n(2)),l=n(455);t.protobufPackage="likechain.likenft.v1";const d={classId:"",id:""};t.BlindBoxContent={encode:(e,t=c.default.Writer.create())=>(""!==e.classId&&t.uint32(10).string(e.classId),""!==e.id&&t.uint32(18).string(e.id),void 0!==e.input&&l.NFTInput.encode(e.input,t.uint32(26).fork()).ldelim(),t),decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},d);for(;t.pos>>3){case 1:r.classId=t.string();break;case 2:r.id=t.string();break;case 3:r.input=l.NFTInput.decode(t,t.uint32());break;default:t.skipType(7&e)}}return r},fromJSON(object){const e=Object.assign({},d);return void 0!==object.classId&&null!==object.classId?e.classId=String(object.classId):e.classId="",void 0!==object.id&&null!==object.id?e.id=String(object.id):e.id="",void 0!==object.input&&null!==object.input?e.input=l.NFTInput.fromJSON(object.input):e.input=void 0,e},toJSON(e){const t={};return void 0!==e.classId&&(t.classId=e.classId),void 0!==e.id&&(t.id=e.id),void 0!==e.input&&(t.input=e.input?l.NFTInput.toJSON(e.input):void 0),t},fromPartial(object){const e=Object.assign({},d);return void 0!==object.classId&&null!==object.classId?e.classId=object.classId:e.classId="",void 0!==object.id&&null!==object.id?e.id=object.id:e.id="",void 0!==object.input&&null!==object.input?e.input=l.NFTInput.fromPartial(object.input):e.input=void 0,e}},c.default.util.Long!==o.default&&(c.default.util.Long=o.default,c.default.configure())},function(e,t,n){"use strict";(function(e){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.NFTInput=t.protobufPackage=void 0;const o=r(n(1)),c=r(n(2));t.protobufPackage="likechain.likenft.v1";const l={uri:"",uriHash:""};t.NFTInput={encode:(e,t=c.default.Writer.create())=>(""!==e.uri&&t.uint32(10).string(e.uri),""!==e.uriHash&&t.uint32(18).string(e.uriHash),0!==e.metadata.length&&t.uint32(26).bytes(e.metadata),t),decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},l);for(r.metadata=new Uint8Array;t.pos>>3){case 1:r.uri=t.string();break;case 2:r.uriHash=t.string();break;case 3:r.metadata=t.bytes();break;default:t.skipType(7&e)}}return r},fromJSON(object){const e=Object.assign({},l);return e.metadata=new Uint8Array,void 0!==object.uri&&null!==object.uri?e.uri=String(object.uri):e.uri="",void 0!==object.uriHash&&null!==object.uriHash?e.uriHash=String(object.uriHash):e.uriHash="",void 0!==object.metadata&&null!==object.metadata&&(e.metadata=function(e){const t=f(e),n=new Uint8Array(t.length);for(let i=0;i{if(void 0!==d)return d;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==e)return e;throw"Unable to locate global object"})();const f=d.atob||(e=>d.Buffer.from(e,"base64").toString("binary"));const h=d.btoa||(e=>d.Buffer.from(e,"binary").toString("base64"));c.default.util.Long!==o.default&&(c.default.util.Long=o.default,c.default.configure())}).call(this,n(3))},function(e,t,n){"use strict";(function(e){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.OfferStoreRecord=t.Offer=t.protobufPackage=void 0;const o=r(n(1)),c=r(n(2)),l=n(186);t.protobufPackage="likechain.likenft.v1";const d={classId:"",nftId:"",buyer:"",price:o.default.UZERO};t.Offer={encode:(e,t=c.default.Writer.create())=>(""!==e.classId&&t.uint32(10).string(e.classId),""!==e.nftId&&t.uint32(18).string(e.nftId),""!==e.buyer&&t.uint32(26).string(e.buyer),e.price.isZero()||t.uint32(32).uint64(e.price),void 0!==e.expiration&&l.Timestamp.encode(v(e.expiration),t.uint32(42).fork()).ldelim(),t),decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},d);for(;t.pos>>3){case 1:r.classId=t.string();break;case 2:r.nftId=t.string();break;case 3:r.buyer=t.string();break;case 4:r.price=t.uint64();break;case 5:r.expiration=y(l.Timestamp.decode(t,t.uint32()));break;default:t.skipType(7&e)}}return r},fromJSON(object){const e=Object.assign({},d);return void 0!==object.classId&&null!==object.classId?e.classId=String(object.classId):e.classId="",void 0!==object.nftId&&null!==object.nftId?e.nftId=String(object.nftId):e.nftId="",void 0!==object.buyer&&null!==object.buyer?e.buyer=String(object.buyer):e.buyer="",void 0!==object.price&&null!==object.price?e.price=o.default.fromString(object.price):e.price=o.default.UZERO,void 0!==object.expiration&&null!==object.expiration?e.expiration=I(object.expiration):e.expiration=void 0,e},toJSON(e){const t={};return void 0!==e.classId&&(t.classId=e.classId),void 0!==e.nftId&&(t.nftId=e.nftId),void 0!==e.buyer&&(t.buyer=e.buyer),void 0!==e.price&&(t.price=(e.price||o.default.UZERO).toString()),void 0!==e.expiration&&(t.expiration=e.expiration.toISOString()),t},fromPartial(object){const e=Object.assign({},d);return void 0!==object.classId&&null!==object.classId?e.classId=object.classId:e.classId="",void 0!==object.nftId&&null!==object.nftId?e.nftId=object.nftId:e.nftId="",void 0!==object.buyer&&null!==object.buyer?e.buyer=object.buyer:e.buyer="",void 0!==object.price&&null!==object.price?e.price=object.price:e.price=o.default.UZERO,void 0!==object.expiration&&null!==object.expiration?e.expiration=object.expiration:e.expiration=void 0,e}};const f={classId:"",nftId:"",price:o.default.UZERO};t.OfferStoreRecord={encode:(e,t=c.default.Writer.create())=>(""!==e.classId&&t.uint32(10).string(e.classId),""!==e.nftId&&t.uint32(18).string(e.nftId),0!==e.buyer.length&&t.uint32(26).bytes(e.buyer),e.price.isZero()||t.uint32(32).uint64(e.price),void 0!==e.expiration&&l.Timestamp.encode(v(e.expiration),t.uint32(42).fork()).ldelim(),t),decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},f);for(r.buyer=new Uint8Array;t.pos>>3){case 1:r.classId=t.string();break;case 2:r.nftId=t.string();break;case 3:r.buyer=t.bytes();break;case 4:r.price=t.uint64();break;case 5:r.expiration=y(l.Timestamp.decode(t,t.uint32()));break;default:t.skipType(7&e)}}return r},fromJSON(object){const e=Object.assign({},f);return e.buyer=new Uint8Array,void 0!==object.classId&&null!==object.classId?e.classId=String(object.classId):e.classId="",void 0!==object.nftId&&null!==object.nftId?e.nftId=String(object.nftId):e.nftId="",void 0!==object.buyer&&null!==object.buyer&&(e.buyer=function(e){const t=A(e),n=new Uint8Array(t.length);for(let i=0;i{if(void 0!==h)return h;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==e)return e;throw"Unable to locate global object"})();const A=h.atob||(e=>h.Buffer.from(e,"base64").toString("binary"));const m=h.btoa||(e=>h.Buffer.from(e,"binary").toString("base64"));function v(e){var t;return{seconds:(t=e.getTime()/1e3,o.default.fromNumber(t)),nanos:e.getTime()%1e3*1e6}}function y(e){let t=1e3*e.seconds.toNumber();return t+=e.nanos/1e6,new Date(t)}function I(e){return e instanceof Date?e:"string"==typeof e?new Date(e):y(l.Timestamp.fromJSON(e))}c.default.util.Long!==o.default&&(c.default.util.Long=o.default,c.default.configure())}).call(this,n(3))},function(e,t,n){"use strict";(function(e){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ListingStoreRecord=t.Listing=t.protobufPackage=void 0;const o=r(n(1)),c=r(n(2)),l=n(186);t.protobufPackage="likechain.likenft.v1";const d={classId:"",nftId:"",seller:"",price:o.default.UZERO};t.Listing={encode:(e,t=c.default.Writer.create())=>(""!==e.classId&&t.uint32(10).string(e.classId),""!==e.nftId&&t.uint32(18).string(e.nftId),""!==e.seller&&t.uint32(26).string(e.seller),e.price.isZero()||t.uint32(32).uint64(e.price),void 0!==e.expiration&&l.Timestamp.encode(v(e.expiration),t.uint32(42).fork()).ldelim(),t),decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},d);for(;t.pos>>3){case 1:r.classId=t.string();break;case 2:r.nftId=t.string();break;case 3:r.seller=t.string();break;case 4:r.price=t.uint64();break;case 5:r.expiration=y(l.Timestamp.decode(t,t.uint32()));break;default:t.skipType(7&e)}}return r},fromJSON(object){const e=Object.assign({},d);return void 0!==object.classId&&null!==object.classId?e.classId=String(object.classId):e.classId="",void 0!==object.nftId&&null!==object.nftId?e.nftId=String(object.nftId):e.nftId="",void 0!==object.seller&&null!==object.seller?e.seller=String(object.seller):e.seller="",void 0!==object.price&&null!==object.price?e.price=o.default.fromString(object.price):e.price=o.default.UZERO,void 0!==object.expiration&&null!==object.expiration?e.expiration=I(object.expiration):e.expiration=void 0,e},toJSON(e){const t={};return void 0!==e.classId&&(t.classId=e.classId),void 0!==e.nftId&&(t.nftId=e.nftId),void 0!==e.seller&&(t.seller=e.seller),void 0!==e.price&&(t.price=(e.price||o.default.UZERO).toString()),void 0!==e.expiration&&(t.expiration=e.expiration.toISOString()),t},fromPartial(object){const e=Object.assign({},d);return void 0!==object.classId&&null!==object.classId?e.classId=object.classId:e.classId="",void 0!==object.nftId&&null!==object.nftId?e.nftId=object.nftId:e.nftId="",void 0!==object.seller&&null!==object.seller?e.seller=object.seller:e.seller="",void 0!==object.price&&null!==object.price?e.price=object.price:e.price=o.default.UZERO,void 0!==object.expiration&&null!==object.expiration?e.expiration=object.expiration:e.expiration=void 0,e}};const f={classId:"",nftId:"",price:o.default.UZERO};t.ListingStoreRecord={encode:(e,t=c.default.Writer.create())=>(""!==e.classId&&t.uint32(10).string(e.classId),""!==e.nftId&&t.uint32(18).string(e.nftId),0!==e.seller.length&&t.uint32(26).bytes(e.seller),e.price.isZero()||t.uint32(32).uint64(e.price),void 0!==e.expiration&&l.Timestamp.encode(v(e.expiration),t.uint32(42).fork()).ldelim(),t),decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},f);for(r.seller=new Uint8Array;t.pos>>3){case 1:r.classId=t.string();break;case 2:r.nftId=t.string();break;case 3:r.seller=t.bytes();break;case 4:r.price=t.uint64();break;case 5:r.expiration=y(l.Timestamp.decode(t,t.uint32()));break;default:t.skipType(7&e)}}return r},fromJSON(object){const e=Object.assign({},f);return e.seller=new Uint8Array,void 0!==object.classId&&null!==object.classId?e.classId=String(object.classId):e.classId="",void 0!==object.nftId&&null!==object.nftId?e.nftId=String(object.nftId):e.nftId="",void 0!==object.seller&&null!==object.seller&&(e.seller=function(e){const t=A(e),n=new Uint8Array(t.length);for(let i=0;i{if(void 0!==h)return h;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==e)return e;throw"Unable to locate global object"})();const A=h.atob||(e=>h.Buffer.from(e,"base64").toString("binary"));const m=h.btoa||(e=>h.Buffer.from(e,"binary").toString("base64"));function v(e){var t;return{seconds:(t=e.getTime()/1e3,o.default.fromNumber(t)),nanos:e.getTime()%1e3*1e6}}function y(e){let t=1e3*e.seconds.toNumber();return t+=e.nanos/1e6,new Date(t)}function I(e){return e instanceof Date?e:"string"==typeof e?new Date(e):y(l.Timestamp.fromJSON(e))}c.default.util.Long!==o.default&&(c.default.util.Long=o.default,c.default.configure())}).call(this,n(3))},function(e,t,n){"use strict";(function(e){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.RoyaltyStakeholderInput=t.RoyaltyConfigInput=t.RoyaltyStakeholder=t.RoyaltyConfig=t.RoyaltyConfigByClass=t.protobufPackage=void 0;const o=r(n(1)),c=r(n(2));t.protobufPackage="likechain.likenft.v1";const l={classId:""};t.RoyaltyConfigByClass={encode:(e,n=c.default.Writer.create())=>(""!==e.classId&&n.uint32(10).string(e.classId),void 0!==e.royaltyConfig&&t.RoyaltyConfig.encode(e.royaltyConfig,n.uint32(18).fork()).ldelim(),n),decode(input,e){const n=input instanceof c.default.Reader?input:new c.default.Reader(input);let r=void 0===e?n.len:n.pos+e;const o=Object.assign({},l);for(;n.pos>>3){case 1:o.classId=n.string();break;case 2:o.royaltyConfig=t.RoyaltyConfig.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(object){const e=Object.assign({},l);return void 0!==object.classId&&null!==object.classId?e.classId=String(object.classId):e.classId="",void 0!==object.royaltyConfig&&null!==object.royaltyConfig?e.royaltyConfig=t.RoyaltyConfig.fromJSON(object.royaltyConfig):e.royaltyConfig=void 0,e},toJSON(e){const n={};return void 0!==e.classId&&(n.classId=e.classId),void 0!==e.royaltyConfig&&(n.royaltyConfig=e.royaltyConfig?t.RoyaltyConfig.toJSON(e.royaltyConfig):void 0),n},fromPartial(object){const e=Object.assign({},l);return void 0!==object.classId&&null!==object.classId?e.classId=object.classId:e.classId="",void 0!==object.royaltyConfig&&null!==object.royaltyConfig?e.royaltyConfig=t.RoyaltyConfig.fromPartial(object.royaltyConfig):e.royaltyConfig=void 0,e}};const d={rateBasisPoints:o.default.UZERO};t.RoyaltyConfig={encode(e,n=c.default.Writer.create()){e.rateBasisPoints.isZero()||n.uint32(8).uint64(e.rateBasisPoints);for(const r of e.stakeholders)t.RoyaltyStakeholder.encode(r,n.uint32(18).fork()).ldelim();return n},decode(input,e){const n=input instanceof c.default.Reader?input:new c.default.Reader(input);let r=void 0===e?n.len:n.pos+e;const o=Object.assign({},d);for(o.stakeholders=[];n.pos>>3){case 1:o.rateBasisPoints=n.uint64();break;case 2:o.stakeholders.push(t.RoyaltyStakeholder.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return o},fromJSON(object){const e=Object.assign({},d);if(e.stakeholders=[],void 0!==object.rateBasisPoints&&null!==object.rateBasisPoints?e.rateBasisPoints=o.default.fromString(object.rateBasisPoints):e.rateBasisPoints=o.default.UZERO,void 0!==object.stakeholders&&null!==object.stakeholders)for(const n of object.stakeholders)e.stakeholders.push(t.RoyaltyStakeholder.fromJSON(n));return e},toJSON(e){const n={};return void 0!==e.rateBasisPoints&&(n.rateBasisPoints=(e.rateBasisPoints||o.default.UZERO).toString()),e.stakeholders?n.stakeholders=e.stakeholders.map((e=>e?t.RoyaltyStakeholder.toJSON(e):void 0)):n.stakeholders=[],n},fromPartial(object){const e=Object.assign({},d);if(e.stakeholders=[],void 0!==object.rateBasisPoints&&null!==object.rateBasisPoints?e.rateBasisPoints=object.rateBasisPoints:e.rateBasisPoints=o.default.UZERO,void 0!==object.stakeholders&&null!==object.stakeholders)for(const n of object.stakeholders)e.stakeholders.push(t.RoyaltyStakeholder.fromPartial(n));return e}};const f={weight:o.default.UZERO};t.RoyaltyStakeholder={encode:(e,t=c.default.Writer.create())=>(0!==e.account.length&&t.uint32(10).bytes(e.account),e.weight.isZero()||t.uint32(16).uint64(e.weight),t),decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},f);for(r.account=new Uint8Array;t.pos>>3){case 1:r.account=t.bytes();break;case 2:r.weight=t.uint64();break;default:t.skipType(7&e)}}return r},fromJSON(object){const e=Object.assign({},f);return e.account=new Uint8Array,void 0!==object.account&&null!==object.account&&(e.account=function(e){const t=v(e),n=new Uint8Array(t.length);for(let i=0;i>>3){case 1:o.rateBasisPoints=n.uint64();break;case 2:o.stakeholders.push(t.RoyaltyStakeholderInput.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return o},fromJSON(object){const e=Object.assign({},h);if(e.stakeholders=[],void 0!==object.rateBasisPoints&&null!==object.rateBasisPoints?e.rateBasisPoints=o.default.fromString(object.rateBasisPoints):e.rateBasisPoints=o.default.UZERO,void 0!==object.stakeholders&&null!==object.stakeholders)for(const n of object.stakeholders)e.stakeholders.push(t.RoyaltyStakeholderInput.fromJSON(n));return e},toJSON(e){const n={};return void 0!==e.rateBasisPoints&&(n.rateBasisPoints=(e.rateBasisPoints||o.default.UZERO).toString()),e.stakeholders?n.stakeholders=e.stakeholders.map((e=>e?t.RoyaltyStakeholderInput.toJSON(e):void 0)):n.stakeholders=[],n},fromPartial(object){const e=Object.assign({},h);if(e.stakeholders=[],void 0!==object.rateBasisPoints&&null!==object.rateBasisPoints?e.rateBasisPoints=object.rateBasisPoints:e.rateBasisPoints=o.default.UZERO,void 0!==object.stakeholders&&null!==object.stakeholders)for(const n of object.stakeholders)e.stakeholders.push(t.RoyaltyStakeholderInput.fromPartial(n));return e}};const A={account:"",weight:o.default.UZERO};t.RoyaltyStakeholderInput={encode:(e,t=c.default.Writer.create())=>(""!==e.account&&t.uint32(10).string(e.account),e.weight.isZero()||t.uint32(16).uint64(e.weight),t),decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},A);for(;t.pos>>3){case 1:r.account=t.string();break;case 2:r.weight=t.uint64();break;default:t.skipType(7&e)}}return r},fromJSON(object){const e=Object.assign({},A);return void 0!==object.account&&null!==object.account?e.account=String(object.account):e.account="",void 0!==object.weight&&null!==object.weight?e.weight=o.default.fromString(object.weight):e.weight=o.default.UZERO,e},toJSON(e){const t={};return void 0!==e.account&&(t.account=e.account),void 0!==e.weight&&(t.weight=(e.weight||o.default.UZERO).toString()),t},fromPartial(object){const e=Object.assign({},A);return void 0!==object.account&&null!==object.account?e.account=object.account:e.account="",void 0!==object.weight&&null!==object.weight?e.weight=object.weight:e.weight=o.default.UZERO,e}};var m=(()=>{if(void 0!==m)return m;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==e)return e;throw"Unable to locate global object"})();const v=m.atob||(e=>m.Buffer.from(e,"base64").toString("binary"));const y=m.btoa||(e=>m.Buffer.from(e,"binary").toString("base64"));c.default.util.Long!==o.default&&(c.default.util.Long=o.default,c.default.configure())}).call(this,n(3))},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.parseISCNTxRecordFromQuery=t.parseTxInfoFromIndexedTx=t.parseAuthzGrant=t.parseNFTDataFields=t.parseNFTClassDataFields=t.parseISCNRecordFields=void 0;const r=n(76),o=n(460),c=n(871),l=n(257),d=n(435),f=n(252),h=n(461),A=n(872),m=n(258);function v(t){const{stakeholders:n,contentMetadata:r}=t;return Object.assign(Object.assign({},t),{stakeholders:n.map((s=>{if(s){const t=e.from(s).toString("utf-8");if(t)return JSON.parse(t)}return s})),contentMetadata:JSON.parse(e.from(r).toString("utf-8"))})}function y(e){const{authorization:t}=e;if(!t)return e;let n;switch(t.typeUrl){case"/cosmos.bank.v1beta1.SendAuthorization":n=h.SendAuthorization.decode(t.value);break;case"/cosmos.staking.v1beta1.StakeAuthorization":n=A.StakeAuthorization.decode(t.value);break;case"/cosmos.authz.v1beta1.GenericAuthorization":n=f.GenericAuthorization.decode(t.value)}return Object.assign(Object.assign({},e),{authorization:{typeUrl:t.typeUrl,value:n}})}t.parseISCNRecordFields=v,t.parseNFTClassDataFields=function(t){let data;if(t.data&&"/likechain.likenft.v1.ClassData"===t.data.typeUrl){if(data=l.ClassData.decode(t.data.value),data.metadata){const t=e.from(data.metadata).toString("utf-8");t&&(data.metadata=JSON.parse(t))}return data?Object.assign(Object.assign({},t),{data:data}):t}return t},t.parseNFTDataFields=function(t){let data;if(t.data&&"/likechain.likenft.v1.NFTData"===t.data.typeUrl){if(data=c.NFTData.decode(t.data.value),data.metadata){const t=e.from(data.metadata).toString("utf-8");t&&(data.metadata=JSON.parse(t))}return data?Object.assign(Object.assign({},t),{data:data}):t}return t},t.parseAuthzGrant=y,t.parseTxInfoFromIndexedTx=function(e){const{tx:t,rawLog:n}=e,c=(0,r.decodeTxRaw)(t),l=c.body.messages.map((e=>{let t;switch(e.typeUrl){case"/likechain.iscn.MsgCreateIscnRecord":t=o.MsgCreateIscnRecord.decode(e.value),t.record&&(t.record=v(t.record));break;case"/likechain.iscn.MsgUpdateIscnRecord":t=o.MsgUpdateIscnRecord.decode(e.value),t.record&&(t.record=v(t.record));break;case"/likechain.iscn.MsgChangeIscnRecordOwnership":t=o.MsgChangeIscnRecordOwnership.decode(e.value);break;case"/cosmos.authz.v1beta1.MsgGrant":if(t=d.MsgGrant.decode(e.value),t.grant){const e=y(t.grant);t=Object.assign(Object.assign({},t),{grant:e})}break;default:m.messageRegistryMap[e.typeUrl]&&(t=m.messageRegistryMap[e.typeUrl].decode(e.value))}return t?Object.assign(Object.assign({},e),{value:t}):e}));return Object.assign(Object.assign({},e),{logs:JSON.parse(n),tx:Object.assign(Object.assign({},c),{body:Object.assign(Object.assign({},c.body),{messages:l.filter((e=>!!e))})})})},t.parseISCNTxRecordFromQuery=function(t){return t.map((t=>{const{data:data,ipld:n}=t;return{ipld:n,data:JSON.parse(e.from(data).toString("utf-8"))}}))}}).call(this,n(14).Buffer)},function(e,t,n){"use strict";(function(e){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MsgClientImpl=t.MsgChangeIscnRecordOwnershipResponse=t.MsgChangeIscnRecordOwnership=t.MsgUpdateIscnRecordResponse=t.MsgUpdateIscnRecord=t.MsgCreateIscnRecordResponse=t.MsgCreateIscnRecord=t.IscnRecord=t.protobufPackage=void 0;const o=r(n(1)),c=r(n(2));t.protobufPackage="likechain.iscn";const l={recordNotes:"",contentFingerprints:""};t.IscnRecord={encode(e,t=c.default.Writer.create()){""!==e.recordNotes&&t.uint32(10).string(e.recordNotes);for(const n of e.contentFingerprints)t.uint32(18).string(n);for(const n of e.stakeholders)t.uint32(26).bytes(n);return 0!==e.contentMetadata.length&&t.uint32(34).bytes(e.contentMetadata),t},decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},l);for(r.contentFingerprints=[],r.stakeholders=[],r.contentMetadata=new Uint8Array;t.pos>>3){case 1:r.recordNotes=t.string();break;case 2:r.contentFingerprints.push(t.string());break;case 3:r.stakeholders.push(t.bytes());break;case 4:r.contentMetadata=t.bytes();break;default:t.skipType(7&e)}}return r},fromJSON(object){const e=Object.assign({},l);if(e.contentFingerprints=[],e.stakeholders=[],e.contentMetadata=new Uint8Array,void 0!==object.recordNotes&&null!==object.recordNotes?e.recordNotes=String(object.recordNotes):e.recordNotes="",void 0!==object.contentFingerprints&&null!==object.contentFingerprints)for(const t of object.contentFingerprints)e.contentFingerprints.push(String(t));if(void 0!==object.stakeholders&&null!==object.stakeholders)for(const t of object.stakeholders)e.stakeholders.push(w(t));return void 0!==object.contentMetadata&&null!==object.contentMetadata&&(e.contentMetadata=w(object.contentMetadata)),e},toJSON(e){const t={};return void 0!==e.recordNotes&&(t.recordNotes=e.recordNotes),e.contentFingerprints?t.contentFingerprints=e.contentFingerprints.map((e=>e)):t.contentFingerprints=[],e.stakeholders?t.stakeholders=e.stakeholders.map((e=>C(void 0!==e?e:new Uint8Array))):t.stakeholders=[],void 0!==e.contentMetadata&&(t.contentMetadata=C(void 0!==e.contentMetadata?e.contentMetadata:new Uint8Array)),t},fromPartial(object){const e=Object.assign({},l);if(e.contentFingerprints=[],e.stakeholders=[],void 0!==object.recordNotes&&null!==object.recordNotes?e.recordNotes=object.recordNotes:e.recordNotes="",void 0!==object.contentFingerprints&&null!==object.contentFingerprints)for(const t of object.contentFingerprints)e.contentFingerprints.push(t);if(void 0!==object.stakeholders&&null!==object.stakeholders)for(const t of object.stakeholders)e.stakeholders.push(t);return void 0!==object.contentMetadata&&null!==object.contentMetadata?e.contentMetadata=object.contentMetadata:e.contentMetadata=new Uint8Array,e}};const d={from:""};t.MsgCreateIscnRecord={encode:(e,n=c.default.Writer.create())=>(""!==e.from&&n.uint32(10).string(e.from),void 0!==e.record&&t.IscnRecord.encode(e.record,n.uint32(18).fork()).ldelim(),n),decode(input,e){const n=input instanceof c.default.Reader?input:new c.default.Reader(input);let r=void 0===e?n.len:n.pos+e;const o=Object.assign({},d);for(;n.pos>>3){case 1:o.from=n.string();break;case 2:o.record=t.IscnRecord.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(object){const e=Object.assign({},d);return void 0!==object.from&&null!==object.from?e.from=String(object.from):e.from="",void 0!==object.record&&null!==object.record?e.record=t.IscnRecord.fromJSON(object.record):e.record=void 0,e},toJSON(e){const n={};return void 0!==e.from&&(n.from=e.from),void 0!==e.record&&(n.record=e.record?t.IscnRecord.toJSON(e.record):void 0),n},fromPartial(object){const e=Object.assign({},d);return void 0!==object.from&&null!==object.from?e.from=object.from:e.from="",void 0!==object.record&&null!==object.record?e.record=t.IscnRecord.fromPartial(object.record):e.record=void 0,e}};const f={iscnId:"",recordIpld:""};t.MsgCreateIscnRecordResponse={encode:(e,t=c.default.Writer.create())=>(""!==e.iscnId&&t.uint32(10).string(e.iscnId),""!==e.recordIpld&&t.uint32(18).string(e.recordIpld),t),decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},f);for(;t.pos>>3){case 1:r.iscnId=t.string();break;case 2:r.recordIpld=t.string();break;default:t.skipType(7&e)}}return r},fromJSON(object){const e=Object.assign({},f);return void 0!==object.iscnId&&null!==object.iscnId?e.iscnId=String(object.iscnId):e.iscnId="",void 0!==object.recordIpld&&null!==object.recordIpld?e.recordIpld=String(object.recordIpld):e.recordIpld="",e},toJSON(e){const t={};return void 0!==e.iscnId&&(t.iscnId=e.iscnId),void 0!==e.recordIpld&&(t.recordIpld=e.recordIpld),t},fromPartial(object){const e=Object.assign({},f);return void 0!==object.iscnId&&null!==object.iscnId?e.iscnId=object.iscnId:e.iscnId="",void 0!==object.recordIpld&&null!==object.recordIpld?e.recordIpld=object.recordIpld:e.recordIpld="",e}};const h={from:"",iscnId:""};t.MsgUpdateIscnRecord={encode:(e,n=c.default.Writer.create())=>(""!==e.from&&n.uint32(10).string(e.from),""!==e.iscnId&&n.uint32(18).string(e.iscnId),void 0!==e.record&&t.IscnRecord.encode(e.record,n.uint32(26).fork()).ldelim(),n),decode(input,e){const n=input instanceof c.default.Reader?input:new c.default.Reader(input);let r=void 0===e?n.len:n.pos+e;const o=Object.assign({},h);for(;n.pos>>3){case 1:o.from=n.string();break;case 2:o.iscnId=n.string();break;case 3:o.record=t.IscnRecord.decode(n,n.uint32());break;default:n.skipType(7&e)}}return o},fromJSON(object){const e=Object.assign({},h);return void 0!==object.from&&null!==object.from?e.from=String(object.from):e.from="",void 0!==object.iscnId&&null!==object.iscnId?e.iscnId=String(object.iscnId):e.iscnId="",void 0!==object.record&&null!==object.record?e.record=t.IscnRecord.fromJSON(object.record):e.record=void 0,e},toJSON(e){const n={};return void 0!==e.from&&(n.from=e.from),void 0!==e.iscnId&&(n.iscnId=e.iscnId),void 0!==e.record&&(n.record=e.record?t.IscnRecord.toJSON(e.record):void 0),n},fromPartial(object){const e=Object.assign({},h);return void 0!==object.from&&null!==object.from?e.from=object.from:e.from="",void 0!==object.iscnId&&null!==object.iscnId?e.iscnId=object.iscnId:e.iscnId="",void 0!==object.record&&null!==object.record?e.record=t.IscnRecord.fromPartial(object.record):e.record=void 0,e}};const A={iscnId:"",recordIpld:""};t.MsgUpdateIscnRecordResponse={encode:(e,t=c.default.Writer.create())=>(""!==e.iscnId&&t.uint32(10).string(e.iscnId),""!==e.recordIpld&&t.uint32(18).string(e.recordIpld),t),decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},A);for(;t.pos>>3){case 1:r.iscnId=t.string();break;case 2:r.recordIpld=t.string();break;default:t.skipType(7&e)}}return r},fromJSON(object){const e=Object.assign({},A);return void 0!==object.iscnId&&null!==object.iscnId?e.iscnId=String(object.iscnId):e.iscnId="",void 0!==object.recordIpld&&null!==object.recordIpld?e.recordIpld=String(object.recordIpld):e.recordIpld="",e},toJSON(e){const t={};return void 0!==e.iscnId&&(t.iscnId=e.iscnId),void 0!==e.recordIpld&&(t.recordIpld=e.recordIpld),t},fromPartial(object){const e=Object.assign({},A);return void 0!==object.iscnId&&null!==object.iscnId?e.iscnId=object.iscnId:e.iscnId="",void 0!==object.recordIpld&&null!==object.recordIpld?e.recordIpld=object.recordIpld:e.recordIpld="",e}};const m={from:"",iscnId:"",newOwner:""};t.MsgChangeIscnRecordOwnership={encode:(e,t=c.default.Writer.create())=>(""!==e.from&&t.uint32(10).string(e.from),""!==e.iscnId&&t.uint32(18).string(e.iscnId),""!==e.newOwner&&t.uint32(26).string(e.newOwner),t),decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},m);for(;t.pos>>3){case 1:r.from=t.string();break;case 2:r.iscnId=t.string();break;case 3:r.newOwner=t.string();break;default:t.skipType(7&e)}}return r},fromJSON(object){const e=Object.assign({},m);return void 0!==object.from&&null!==object.from?e.from=String(object.from):e.from="",void 0!==object.iscnId&&null!==object.iscnId?e.iscnId=String(object.iscnId):e.iscnId="",void 0!==object.newOwner&&null!==object.newOwner?e.newOwner=String(object.newOwner):e.newOwner="",e},toJSON(e){const t={};return void 0!==e.from&&(t.from=e.from),void 0!==e.iscnId&&(t.iscnId=e.iscnId),void 0!==e.newOwner&&(t.newOwner=e.newOwner),t},fromPartial(object){const e=Object.assign({},m);return void 0!==object.from&&null!==object.from?e.from=object.from:e.from="",void 0!==object.iscnId&&null!==object.iscnId?e.iscnId=object.iscnId:e.iscnId="",void 0!==object.newOwner&&null!==object.newOwner?e.newOwner=object.newOwner:e.newOwner="",e}};const v={};t.MsgChangeIscnRecordOwnershipResponse={encode:(e,t=c.default.Writer.create())=>t,decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},v);for(;t.posObject.assign({},v),toJSON:e=>({}),fromPartial:e=>Object.assign({},v)};t.MsgClientImpl=class{constructor(e){this.rpc=e,this.CreateIscnRecord=this.CreateIscnRecord.bind(this),this.UpdateIscnRecord=this.UpdateIscnRecord.bind(this),this.ChangeIscnRecordOwnership=this.ChangeIscnRecordOwnership.bind(this)}CreateIscnRecord(e){const data=t.MsgCreateIscnRecord.encode(e).finish();return this.rpc.request("likechain.iscn.Msg","CreateIscnRecord",data).then((data=>t.MsgCreateIscnRecordResponse.decode(new c.default.Reader(data))))}UpdateIscnRecord(e){const data=t.MsgUpdateIscnRecord.encode(e).finish();return this.rpc.request("likechain.iscn.Msg","UpdateIscnRecord",data).then((data=>t.MsgUpdateIscnRecordResponse.decode(new c.default.Reader(data))))}ChangeIscnRecordOwnership(e){const data=t.MsgChangeIscnRecordOwnership.encode(e).finish();return this.rpc.request("likechain.iscn.Msg","ChangeIscnRecordOwnership",data).then((data=>t.MsgChangeIscnRecordOwnershipResponse.decode(new c.default.Reader(data))))}};var y=(()=>{if(void 0!==y)return y;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==e)return e;throw"Unable to locate global object"})();const I=y.atob||(e=>y.Buffer.from(e,"base64").toString("binary"));function w(e){const t=I(e),n=new Uint8Array(t.length);for(let i=0;iy.Buffer.from(e,"binary").toString("base64"));function C(e){const t=[];for(const n of e)t.push(String.fromCharCode(n));return _(t.join(""))}c.default.util.Long!==o.default&&(c.default.util.Long=o.default,c.default.configure())}).call(this,n(3))},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.SendAuthorization=t.protobufPackage=void 0;const o=r(n(1)),c=r(n(2)),l=n(28);t.protobufPackage="cosmos.bank.v1beta1";const d={};t.SendAuthorization={encode(e,t=c.default.Writer.create()){for(const n of e.spendLimit)l.Coin.encode(n,t.uint32(10).fork()).ldelim();return t},decode(input,e){const t=input instanceof c.default.Reader?input:new c.default.Reader(input);let n=void 0===e?t.len:t.pos+e;const r=Object.assign({},d);for(r.spendLimit=[];t.pos>>3==1)r.spendLimit.push(l.Coin.decode(t,t.uint32()));else t.skipType(7&e)}return r},fromJSON(object){var e;const t=Object.assign({},d);return t.spendLimit=(null!==(e=object.spendLimit)&&void 0!==e?e:[]).map((e=>l.Coin.fromJSON(e))),t},toJSON(e){const t={};return e.spendLimit?t.spendLimit=e.spendLimit.map((e=>e?l.Coin.toJSON(e):void 0)):t.spendLimit=[],t},fromPartial(object){var e;const t=Object.assign({},d);return t.spendLimit=(null===(e=object.spendLimit)||void 0===e?void 0:e.map((e=>l.Coin.fromPartial(e))))||[],t}},c.default.util.Long!==o.default&&(c.default.util.Long=o.default,c.default.configure())},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.formatMsgBurnNFT=t.formatMsgSend=t.formatMsgMintNFT=t.formatMsgUpdateClass=t.formatMsgNewClass=void 0,t.formatMsgNewClass=function(t,n,r,o){return{typeUrl:"/likechain.likenft.v1.MsgNewClass",value:{creator:t,parent:{type:1,iscnIdPrefix:n},input:{name:r.name,symbol:r.symbol,description:r.description,uri:r.uri,uriHash:r.uriHash,metadata:e.from(JSON.stringify(Object.assign({},r.metadata||{})),"utf8"),config:o||{burnable:!1}}}}},t.formatMsgUpdateClass=function(e,t,n,r){return{typeUrl:"/likechain.likenft.v1.MsgUpdateClass",value:{creator:e,classId:t,input:Object.assign(Object.assign({},n),{config:r||{burnable:!1}})}}},t.formatMsgMintNFT=function(t,n,r){return{typeUrl:"/likechain.likenft.v1.MsgMintNFT",value:{creator:t,classId:n,id:r.id,input:{uri:r.uri,uriHash:r.uriHash,metadata:e.from(JSON.stringify(Object.assign({},r.metadata||{})),"utf8")}}}},t.formatMsgSend=function(e,t,n,r){return{typeUrl:"/cosmos.nft.v1beta1.MsgSend",value:{sender:e,receiver:t,classId:n,id:r}}},t.formatMsgBurnNFT=function(e,t,n){return{typeUrl:"/likechain.likenft.v1.MsgBurnNFT",value:{creator:e,classId:t,nftId:n}}}}).call(this,n(14).Buffer)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatMsgRevokeSendAuthorization=t.formatMsgExecSendAuthorization=t.formatMsgGrantSendAuthorization=t.formatMsgGrant=void 0;const r=n(461),o=n(250),c=n(65);function l(e,t,n,r,o){return{typeUrl:"/cosmos.authz.v1beta1.MsgGrant",value:{granter:e,grantee:t,grant:{authorization:{typeUrl:n,value:r},expiration:c.Timestamp.fromPartial({seconds:Math.floor(o/1e3),nanos:0})}}}}t.formatMsgGrant=l,t.formatMsgGrantSendAuthorization=function(e,t,n,o){return l(e,t,"/cosmos.bank.v1beta1.SendAuthorization",r.SendAuthorization.encode(r.SendAuthorization.fromPartial({spendLimit:n})).finish(),o)},t.formatMsgExecSendAuthorization=function(e,t,n,r){return{typeUrl:"/cosmos.authz.v1beta1.MsgExec",value:{grantee:e,msgs:[{typeUrl:"/cosmos.bank.v1beta1.MsgSend",value:o.MsgSend.encode(o.MsgSend.fromPartial({fromAddress:t,toAddress:n,amount:r})).finish()}]}}},t.formatMsgRevokeSendAuthorization=function(e,t){return{typeUrl:"/cosmos.authz.v1beta1.MsgRevoke",value:{granter:e,grantee:t,msgTypeUrl:"/cosmos.bank.v1beta1.MsgSend"}}}},function(e,t,n){"use strict";e.exports=function(data,e){e||(e={}),"function"==typeof e&&(e={cmp:e});var t,n="boolean"==typeof e.cycles&&e.cycles,r=e.cmp&&(t=e.cmp,function(e){return function(a,b){var n={key:a,value:e[a]},r={key:b,value:e[b]};return t(n,r)}}),o=[];return function e(t){if(t&&t.toJSON&&"function"==typeof t.toJSON&&(t=t.toJSON()),void 0!==t){if("number"==typeof t)return isFinite(t)?""+t:"null";if("object"!=typeof t)return JSON.stringify(t);var i,c;if(Array.isArray(t)){for(c="[",i=0;ie.from((0,c.default)(t),"utf-8").length));return f(t[n.reduce(((e,t,r)=>t>n[e]?r:e),-1)],Object.assign(Object.assign({},option),{gasMultiplier:t.length}))}}).call(this,n(14).Buffer)},function(e,t,n){"use strict";t.a=function(e,t){return t=t||{},new Promise((function(n,r){var s=new XMLHttpRequest,o=[],u=[],i={},a=function(){return{ok:2==(s.status/100|0),statusText:s.statusText,status:s.status,url:s.responseURL,text:function(){return Promise.resolve(s.responseText)},json:function(){return Promise.resolve(s.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([s.response]))},clone:a,headers:{keys:function(){return o},entries:function(){return u},get:function(e){return i[e.toLowerCase()]},has:function(e){return e.toLowerCase()in i}}}};for(var c in s.open(t.method||"get",e,!0),s.onload=function(){s.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,(function(e,t,n){o.push(t=t.toLowerCase()),u.push([t,n]),i[t]=i[t]?i[t]+","+n:n})),n(a())},s.onerror=r,s.withCredentials="include"==t.credentials,t.headers)s.setRequestHeader(c,t.headers[c]);s.send(t.body||null)}))}},,function(e,t,n){"use strict";var r=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===o}(e)}(e)};var o="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function c(e,t){return!1!==t.clone&&t.isMergeableObject(e)?A((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function l(e,source,t){return e.concat(source).map((function(element){return c(element,t)}))}function d(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(symbol){return e.propertyIsEnumerable(symbol)})):[]}(e))}function f(object,e){try{return e in object}catch(e){return!1}}function h(e,source,t){var n={};return t.isMergeableObject(e)&&d(e).forEach((function(r){n[r]=c(e[r],t)})),d(source).forEach((function(r){(function(e,t){return f(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,r)||(f(e,r)&&t.isMergeableObject(source[r])?n[r]=function(e,t){if(!t.customMerge)return A;var n=t.customMerge(e);return"function"==typeof n?n:A}(r,t)(e[r],source[r],t):n[r]=c(source[r],t))})),n}function A(e,source,t){(t=t||{}).arrayMerge=t.arrayMerge||l,t.isMergeableObject=t.isMergeableObject||r,t.cloneUnlessOtherwiseSpecified=c;var n=Array.isArray(source);return n===Array.isArray(e)?n?t.arrayMerge(e,source,t):h(e,source,t):c(source,t)}A.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,n){return A(e,n,t)}),{})};var m=A;e.exports=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getWindowMetadata=void 0;const r=n(39);t.getWindowMetadata=function(){let e,t;try{e=r.getDocumentOrThrow(),t=r.getLocationOrThrow()}catch(e){return null}function n(...t){const n=e.getElementsByTagName("meta");for(let i=0;ie.getAttribute(t))).filter((e=>!!e&&t.includes(e)));if(r.length&&r){const content=e.getAttribute("content");if(content)return content}}return""}const o=function(){let t=n("name","og:site_name","og:title","twitter:title");return t||(t=e.title),t}();return{description:n("description","og:description","twitter:description","keywords"),url:t.origin,icons:function(){const n=e.getElementsByTagName("link"),r=[];for(let i=0;i-1){const e=link.getAttribute("href");if(e)if(-1===e.toLowerCase().indexOf("https:")&&-1===e.toLowerCase().indexOf("http:")&&0!==e.indexOf("//")){let n=t.protocol+"//"+t.host;if(0===e.indexOf("/"))n+=e;else{const path=t.pathname.split("/");path.pop();n+=path.join("/")+"/"+e}r.push(n)}else if(0===e.indexOf("//")){const n=t.protocol+e;r.push(n)}else r.push(e)}}return r}(),name:o}}},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return v}));var r=function(){for(var s=0,i=0,e=arguments.length;i>5,this.byteCount=this.blockCount<<2,this.outputBlocks=n>>5,this.extraBytes=(31&n)>>3;for(var i=0;i<50;++i)this.s[i]=0}function L(e,t,n){F.call(this,e,t,n)}F.prototype.update=function(e){if(this.finalized)throw new Error("finalize already called");var t,n=typeof e;if("string"!==n){if("object"!==n)throw new Error(l);if(null===e)throw new Error(l);if(v&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||v&&ArrayBuffer.isView(e)))throw new Error(l);t=!0}for(var i,code,r=this.blocks,o=this.byteCount,c=e.length,d=this.blockCount,f=0,s=this.s;f>2]|=e[f]<>2]|=code<>2]|=(192|code>>6)<>2]|=(128|63&code)<=57344?(r[i>>2]|=(224|code>>12)<>2]|=(128|code>>6&63)<>2]|=(128|63&code)<>2]|=(240|code>>18)<>2]|=(128|code>>12&63)<>2]|=(128|code>>6&63)<>2]|=(128|63&code)<=o){for(this.start=i-o,this.block=r[d],i=0;i>=8);n>0;)o.unshift(n),n=255&(e>>=8),++r;return t?o.push(r):o.unshift(r),this.update(o),o.length},F.prototype.encodeString=function(e){var t,n=typeof e;if("string"!==n){if("object"!==n)throw new Error(l);if(null===e)throw new Error(l);if(v&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||v&&ArrayBuffer.isView(e)))throw new Error(l);t=!0}var r=0,o=e.length;if(t)r=o;else for(var i=0;i=57344?r+=3:(code=65536+((1023&code)<<10|1023&e.charCodeAt(++i)),r+=4)}return r+=this.encode(8*r),this.update(e),r},F.prototype.bytepad=function(e,t){for(var n=this.encode(t),i=0;i>2]|=this.padding[3&i],this.lastByteIndex===this.byteCount)for(e[0]=e[t],i=1;i>4&15]+y[15&e]+y[e>>12&15]+y[e>>8&15]+y[e>>20&15]+y[e>>16&15]+y[e>>28&15]+y[e>>24&15];o%t==0&&(G(s),i=0)}return r&&(e=s[i],c+=y[e>>4&15]+y[15&e],r>1&&(c+=y[e>>12&15]+y[e>>8&15]),r>2&&(c+=y[e>>20&15]+y[e>>16&15])),c},F.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,s=this.s,n=this.outputBlocks,r=this.extraBytes,i=0,o=0,c=this.outputBits>>3;e=r?new ArrayBuffer(n+1<<2):new ArrayBuffer(c);for(var l=new Uint32Array(e);o>8&255,l[e+2]=t>>16&255,l[e+3]=t>>24&255;c%n==0&&G(s)}return o&&(e=c<<2,t=s[i],l[e]=255&t,o>1&&(l[e+1]=t>>8&255),o>2&&(l[e+2]=t>>16&255)),l},L.prototype=new F,L.prototype.finalize=function(){return this.encode(this.outputBits,!0),F.prototype.finalize.call(this)};var G=function(s){var e,t,n,r,o,c,l,d,f,h,A,m,v,y,I,w,C,S,E,B,k,O,R,P,x,M,Q,N,D,T,j,U,J,H,F,L,G,V,W,Y,K,Z,z,X,$,ee,te,ne,re,oe,ie,ae,se,ce,ue,le,de,fe,he,pe,ge,Ae,me;for(n=0;n<48;n+=2)r=s[0]^s[10]^s[20]^s[30]^s[40],o=s[1]^s[11]^s[21]^s[31]^s[41],c=s[2]^s[12]^s[22]^s[32]^s[42],l=s[3]^s[13]^s[23]^s[33]^s[43],d=s[4]^s[14]^s[24]^s[34]^s[44],f=s[5]^s[15]^s[25]^s[35]^s[45],h=s[6]^s[16]^s[26]^s[36]^s[46],A=s[7]^s[17]^s[27]^s[37]^s[47],e=(m=s[8]^s[18]^s[28]^s[38]^s[48])^(c<<1|l>>>31),t=(v=s[9]^s[19]^s[29]^s[39]^s[49])^(l<<1|c>>>31),s[0]^=e,s[1]^=t,s[10]^=e,s[11]^=t,s[20]^=e,s[21]^=t,s[30]^=e,s[31]^=t,s[40]^=e,s[41]^=t,e=r^(d<<1|f>>>31),t=o^(f<<1|d>>>31),s[2]^=e,s[3]^=t,s[12]^=e,s[13]^=t,s[22]^=e,s[23]^=t,s[32]^=e,s[33]^=t,s[42]^=e,s[43]^=t,e=c^(h<<1|A>>>31),t=l^(A<<1|h>>>31),s[4]^=e,s[5]^=t,s[14]^=e,s[15]^=t,s[24]^=e,s[25]^=t,s[34]^=e,s[35]^=t,s[44]^=e,s[45]^=t,e=d^(m<<1|v>>>31),t=f^(v<<1|m>>>31),s[6]^=e,s[7]^=t,s[16]^=e,s[17]^=t,s[26]^=e,s[27]^=t,s[36]^=e,s[37]^=t,s[46]^=e,s[47]^=t,e=h^(r<<1|o>>>31),t=A^(o<<1|r>>>31),s[8]^=e,s[9]^=t,s[18]^=e,s[19]^=t,s[28]^=e,s[29]^=t,s[38]^=e,s[39]^=t,s[48]^=e,s[49]^=t,y=s[0],I=s[1],ee=s[11]<<4|s[10]>>>28,te=s[10]<<4|s[11]>>>28,N=s[20]<<3|s[21]>>>29,D=s[21]<<3|s[20]>>>29,pe=s[31]<<9|s[30]>>>23,ge=s[30]<<9|s[31]>>>23,Z=s[40]<<18|s[41]>>>14,z=s[41]<<18|s[40]>>>14,H=s[2]<<1|s[3]>>>31,F=s[3]<<1|s[2]>>>31,w=s[13]<<12|s[12]>>>20,C=s[12]<<12|s[13]>>>20,ne=s[22]<<10|s[23]>>>22,re=s[23]<<10|s[22]>>>22,T=s[33]<<13|s[32]>>>19,j=s[32]<<13|s[33]>>>19,Ae=s[42]<<2|s[43]>>>30,me=s[43]<<2|s[42]>>>30,ce=s[5]<<30|s[4]>>>2,ue=s[4]<<30|s[5]>>>2,L=s[14]<<6|s[15]>>>26,G=s[15]<<6|s[14]>>>26,S=s[25]<<11|s[24]>>>21,E=s[24]<<11|s[25]>>>21,oe=s[34]<<15|s[35]>>>17,ie=s[35]<<15|s[34]>>>17,U=s[45]<<29|s[44]>>>3,J=s[44]<<29|s[45]>>>3,P=s[6]<<28|s[7]>>>4,x=s[7]<<28|s[6]>>>4,le=s[17]<<23|s[16]>>>9,de=s[16]<<23|s[17]>>>9,V=s[26]<<25|s[27]>>>7,W=s[27]<<25|s[26]>>>7,B=s[36]<<21|s[37]>>>11,k=s[37]<<21|s[36]>>>11,ae=s[47]<<24|s[46]>>>8,se=s[46]<<24|s[47]>>>8,X=s[8]<<27|s[9]>>>5,$=s[9]<<27|s[8]>>>5,M=s[18]<<20|s[19]>>>12,Q=s[19]<<20|s[18]>>>12,fe=s[29]<<7|s[28]>>>25,he=s[28]<<7|s[29]>>>25,Y=s[38]<<8|s[39]>>>24,K=s[39]<<8|s[38]>>>24,O=s[48]<<14|s[49]>>>18,R=s[49]<<14|s[48]>>>18,s[0]=y^~w&S,s[1]=I^~C&E,s[10]=P^~M&N,s[11]=x^~Q&D,s[20]=H^~L&V,s[21]=F^~G&W,s[30]=X^~ee&ne,s[31]=$^~te&re,s[40]=ce^~le&fe,s[41]=ue^~de&he,s[2]=w^~S&B,s[3]=C^~E&k,s[12]=M^~N&T,s[13]=Q^~D&j,s[22]=L^~V&Y,s[23]=G^~W&K,s[32]=ee^~ne&oe,s[33]=te^~re&ie,s[42]=le^~fe&pe,s[43]=de^~he&ge,s[4]=S^~B&O,s[5]=E^~k&R,s[14]=N^~T&U,s[15]=D^~j&J,s[24]=V^~Y&Z,s[25]=W^~K&z,s[34]=ne^~oe&ae,s[35]=re^~ie&se,s[44]=fe^~pe&Ae,s[45]=he^~ge&me,s[6]=B^~O&y,s[7]=k^~R&I,s[16]=T^~U&P,s[17]=j^~J&x,s[26]=Y^~Z&H,s[27]=K^~z&F,s[36]=oe^~ae&X,s[37]=ie^~se&$,s[46]=pe^~Ae&ce,s[47]=ge^~me&ue,s[8]=O^~y&w,s[9]=R^~I&C,s[18]=U^~P&M,s[19]=J^~x&Q,s[28]=Z^~H&L,s[29]=z^~F&G,s[38]=ae^~X&ee,s[39]=se^~$&te,s[48]=Ae^~ce&le,s[49]=me^~ue&de,s[0]^=_[n],s[1]^=_[n+1]};if(A)e.exports=N;else{for(i=0;ithis._socketCreate()))}set readyState(e){}get readyState(){return this._socket?this._socket.readyState:-1}set connecting(e){}get connecting(){return 0===this.readyState}set connected(e){}get connected(){return 1===this.readyState}set closing(e){}get closing(){return 2===this.readyState}set closed(e){}get closed(){return 3===this.readyState}open(){this._socketCreate()}close(){this._socketClose()}send(e,t,n){if(!t||"string"!=typeof t)throw new Error("Missing or invalid topic field");this._socketSend({topic:t,type:"pub",payload:e,silent:!!n})}subscribe(e){this._socketSend({topic:e,type:"sub",payload:"",silent:!0})}on(e,t){this._events.push({event:e,callback:t})}_socketCreate(){if(this._nextSocket)return;const e=function(e,t,n){var o,c;const l=(e.startsWith("https")?e.replace("https","wss"):e.startsWith("http")?e.replace("http","ws"):e).split("?"),d=Object(r.isBrowser)()?{protocol:t,version:n,env:"browser",host:(null===(o=Object(r.getLocation)())||void 0===o?void 0:o.host)||""}:{protocol:t,version:n,env:(null===(c=Object(r.detectEnv)())||void 0===c?void 0:c.name)||""},f=Object(r.appendToQueryString)(Object(r.getQueryString)(l[1]||""),d);return l[0]+"?"+f}(this._url,this._protocol,this._version);if(this._nextSocket=new c(e),!this._nextSocket)throw new Error("Failed to create socket");this._nextSocket.onmessage=e=>this._socketReceive(e),this._nextSocket.onopen=()=>this._socketOpen(),this._nextSocket.onerror=e=>this._socketError(e),this._nextSocket.onclose=()=>{setTimeout((()=>{this._nextSocket=null,this._socketCreate()}),1e3)}}_socketOpen(){this._socketClose(),this._socket=this._nextSocket,this._nextSocket=null,this._queueSubscriptions(),this._pushQueue()}_socketClose(){this._socket&&(this._socket.onclose=()=>{},this._socket.close())}_socketSend(e){const t=JSON.stringify(e);this._socket&&1===this._socket.readyState?this._socket.send(t):(this._setToQueue(e),this._socketCreate())}async _socketReceive(e){let t;try{t=JSON.parse(e.data)}catch(e){return}if(this._socketSend({topic:t.topic,type:"ack",payload:"",silent:!0}),this._socket&&1===this._socket.readyState){const e=this._events.filter((e=>"message"===e.event));e&&e.length&&e.forEach((e=>e.callback(t)))}}_socketError(e){const t=this._events.filter((e=>"error"===e.event));t&&t.length&&t.forEach((t=>t.callback(e)))}_queueSubscriptions(){this._subscriptions.forEach((e=>this._queue.push({topic:e,type:"sub",payload:"",silent:!0}))),this._subscriptions=this.opts.subscriptions||[]}_setToQueue(e){this._queue.push(e)}_pushQueue(){this._queue.forEach((e=>this._socketSend(e))),this._queue=[]}}}).call(this,n(3))},function(e,t,n){"use strict";t.a=class{constructor(){this._eventEmitters=[],"undefined"!=typeof window&&void 0!==window.addEventListener&&(window.addEventListener("online",(()=>this.trigger("online"))),window.addEventListener("offline",(()=>this.trigger("offline"))))}on(e,t){this._eventEmitters.push({event:e,callback:t})}trigger(e){let t=[];e&&(t=this._eventEmitters.filter((t=>t.event===e))),t.forEach((e=>{e.callback()}))}}},function(e,t,n){"use strict";var r=n(5);function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function d(e){for(var i=1;i1?n-1:0),o=1;o0&&void 0!==arguments[0]?arguments[0]:{};return v('Missing "appName" property inside the plugin options.',null==e.app_name),v('Missing "name" property in the route.',null==e.screen_name),e};function I(){var path=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",base=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",e=path.split("/"),t=base.split("/");return""===e[0]&&"/"===base[base.length-1]&&e.shift(),t.join("/")+e.join("/")}var w,_={},C=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={bootstrap:!0,onReady:null,onError:null,onBeforeTrack:null,onAfterTrack:null,pageTrackerTemplate:null,customResourceURL:"https://www.googletagmanager.com/gtag/js",customPreconnectOrigin:"https://www.googletagmanager.com",deferScriptLoad:!1,pageTrackerExcludedRoutes:[],pageTrackerEnabled:!0,enabled:!0,disableScriptLoad:!1,pageTrackerScreenviewEnabled:!1,appName:null,pageTrackerUseFullPath:!1,pageTrackerPrependBase:!0,pageTrackerSkipSamePath:!0,globalDataLayerName:"dataLayer",globalObjectName:"gtag",defaultGroupName:"default",includes:null,config:{id:null,params:{send_page_view:!1}}};_=A(t,e)},S=function(){return _},E=function(){var e,t=S(),n=t.globalObjectName;m()&&void 0!==window[n]&&(e=window)[n].apply(e,arguments)},B=function(){for(var e=arguments.length,t=new Array(e),n=0;n0&&void 0!==arguments[0])||arguments[0],t=S(),n=t.config,r=t.includes;k(n.id,e),Array.isArray(r)&&r.forEach((function(t){return k(t.id,e)}))},R=function(){O(!0)},P=function(e){w=e},x=function(){return w},M=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=S(),r=n.includes,o=n.defaultGroupName;null==t.send_to&&Array.isArray(r)&&r.length&&(t.send_to=r.map((function(e){return e.id})).concat(o)),E("event",e,t)},Q=function(param){if(m()){var template;if("string"==typeof param)template={page_path:param};else if(param.path||param.fullPath){var e=S(),t=e.pageTrackerUseFullPath,n=e.pageTrackerPrependBase,r=x(),base=r&&r.options.base,path=t?param.fullPath:param.path;template=d(d({},param.name&&{page_title:param.name}),{},{page_path:n?I(path,base):path})}else template=param;null==template.page_location&&(template.page_location=window.location.href),null==template.send_page_view&&(template.send_page_view=!0),M("page_view",template)}},N=function(param){var template,e=S().appName;param&&((template="string"==typeof param?{screen_name:param}:param).app_name=template.app_name||e,M("screen_view",template))},D=Object.freeze({__proto__:null,query:E,config:B,optOut:R,optIn:function(){O(!1)},pageview:Q,screenview:N,exception:function(){for(var e=arguments.length,t=new Array(e),n=0;n0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=S(),r=n.appName,o=n.pageTrackerTemplate,c=n.pageTrackerScreenviewEnabled,l=n.pageTrackerSkipSamePath;if(!l||e.path!==t.path){var template=e;f(o)?template=o(e,t):c&&(template=y({app_name:r,screen_name:e.name})),c?N(template):Q(template)}},J=function(e){var t=S().pageTrackerExcludedRoutes;return t.includes(e.path)||t.includes(e.name)},H=function(){var e=S(),t=e.onReady,n=e.onError,o=e.globalObjectName,c=e.globalDataLayerName,l=e.config,d=e.customResourceURL,h=e.customPreconnectOrigin,A=e.deferScriptLoad,v=e.pageTrackerEnabled,y=e.disableScriptLoad,I=Boolean(v&&x());if(function(){if(m()){var e=S(),t=e.enabled,n=e.globalObjectName,r=e.globalDataLayerName;null==window[n]&&(window[r]=window[r]||[],window[n]=function(){window[r].push(arguments)}),window[n]("js",new Date),t||R(),window[n]}}(),I?function(){var e=S(),t=e.onBeforeTrack,n=e.onAfterTrack,o=x();o.onReady((function(){r.a.nextTick().then((function(){var e=o.currentRoute;U(),J(e)||track(e)})),o.afterEach((function(e,o){r.a.nextTick().then((function(){J(e)||(f(t)&&t(e,o),track(e,o),f(n)&&n(e,o))}))}))}))}():U(),!y)return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise((function(n,r){if("undefined"!=typeof document){var head=document.head||document.getElementsByTagName("head")[0],script=document.createElement("script");if(script.async=!0,script.src=e,script.defer=t.defer,t.preconnectOrigin){var link=document.createElement("link");link.href=t.preconnectOrigin,link.rel="preconnect",head.appendChild(link)}head.appendChild(script),script.onload=n,script.onerror=r}}))}("".concat(d,"?id=").concat(l.id,"&l=").concat(c),{preconnectOrigin:h,defer:A}).then((function(){t&&t(window[o])})).catch((function(e){return n&&n(e),e}))};t.a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;T(e),C(t),P(n),S().bootstrap&&H()}},function(e,t,n){"use strict";var r=n(21),o=(n(79),n(25),n(169),n(5)),c=n(6),l=window.__NUXT__;function d(){if(!this._hydrated)return this.$fetch()}function f(){if((e=this).$vnode&&e.$vnode.elm&&e.$vnode.elm.dataset&&e.$vnode.elm.dataset.fetchKey){var e;this._hydrated=!0,this._fetchKey=this.$vnode.elm.dataset.fetchKey;var data=l.fetch[this._fetchKey];if(data&&data._error)this.$fetchState.error=data._error;else for(var t in data)o.a.set(this.$data,t,data[t])}}function h(){var e=this;return this._fetchPromise||(this._fetchPromise=A.call(this).then((function(){delete e._fetchPromise}))),this._fetchPromise}function A(){return m.apply(this,arguments)}function m(){return(m=Object(r.a)(regeneratorRuntime.mark((function e(){var t,n,r,o=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.$nuxt.nbFetching++,this.$fetchState.pending=!0,this.$fetchState.error=null,this._hydrated=!1,t=null,n=Date.now(),e.prev=6,e.next=9,this.$options.fetch.call(this);case 9:e.next=15;break;case 11:e.prev=11,e.t0=e.catch(6),t=Object(c.p)(e.t0);case 15:if(!((r=this._fetchDelay-(Date.now()-n))>0)){e.next=19;break}return e.next=19,new Promise((function(e){return setTimeout(e,r)}));case 19:this.$fetchState.error=t,this.$fetchState.pending=!1,this.$fetchState.timestamp=Date.now(),this.$nextTick((function(){return o.$nuxt.nbFetching--}));case 23:case"end":return e.stop()}}),e,this,[[6,11]])})))).apply(this,arguments)}t.a={beforeCreate:function(){Object(c.l)(this)&&(this._fetchDelay="number"==typeof this.$options.fetchDelay?this.$options.fetchDelay:200,o.a.util.defineReactive(this,"$fetchState",{pending:!1,error:null,timestamp:Date.now()}),this.$fetch=h.bind(this),Object(c.a)(this,"created",f),Object(c.a)(this,"beforeMount",d))}}},,,,,,,,,,,,function(e,t,n){(function(e){e.installComponents=function(component,e){var n="function"==typeof component.exports?component.exports.extendOptions:component.options;for(var i in"function"==typeof component.exports&&(n.components=component.exports.options.components),n.components=n.components||{},e)n.components[i]=n.components[i]||e[i];n.functional&&function(component,e){if(component.exports[t])return;component.exports[t]=!0;var n=component.exports.render;component.exports.render=function(t,r){return n(t,Object.assign({},r,{_c:function(t,a,b){return r._c(e[t]||t,a,b)}}))}}(component,n.components)};var t="_functionalComponents"}).call(this,n(3))},function(e,t,n){"use strict";n.r(t),function(e){n(72),n(86),n(44),n(80),n(87);var t=n(60),r=n(21),o=(n(203),n(507),n(521),n(522),n(79),n(68),n(25),n(51),n(55),n(56),n(125),n(147),n(98),n(99),n(45),n(61),n(62),n(169),n(5)),c=n(466),l=n(263),d=n(6),f=n(67),h=n(477),A=n(191);function m(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return v(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return v(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,c=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return c=e.done,e},e:function(e){l=!0,o=e},f:function(){try{c||null==n.return||n.return()}finally{if(l)throw o}}}}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i2?t-2:0),r=2;r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(c&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),_(n),l}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;_(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:S(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},e}function u(e,t,n,r,o,i,a){try{var c=e[i](a),s=c.value}catch(e){return void n(e)}c.done?t(s):Promise.resolve(s).then(r,o)}function A(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){u(i,r,o,a,c,"next",e)}function c(e){u(i,r,o,a,c,"throw",e)}a(void 0)}))}}function m(){return(m=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,v);return c.createElement("svg",Object.assign({width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n),c.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:y(t),fill:"currentColor"}))},b=function(e){var t=e.name,n=e.description;return c.createElement("button",{className:"lk-block lk-w-full hover:lk-bg-[#d7ecec] lk-border-[4px] lk-border-solid lk-border-[#ebebeb] hover:lk-border-[#50e3c2] lk-rounded-[16px] lk-p-[24px] lk-transition-colors lk-cursor-pointer lk-group",onClick:e.onPress},c.createElement("div",{className:"lk-flex lk-items-center group-hover:lk-text-[#28646e]"},c.createElement(g,{type:e.type}),c.createElement("div",{className:"lk-ml-[12px] lk-font-bold"},t)),c.createElement("div",{className:"lk-mt-[16px] lk-text-[16px] lk-text-left"},n))},_=function(e){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},e),o.createElement("g",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,fill:"none"},o.createElement("path",{d:"M12 6.03v8"}),o.createElement("circle",{cx:12,cy:12,r:11})),o.createElement("circle",{cx:12,cy:18.47,r:1.5,fill:"currentColor"}))};(I=t.LikeCoinWalletConnectorMethod||(t.LikeCoinWalletConnectorMethod={})).Keplr="keplr",I.KeplrMobile="keplr-mobile",I.Cosmostation="cosmostation",I.LikerId="liker-id";var C=((w={})[t.LikeCoinWalletConnectorMethod.Keplr]={name:"Keplr",description:"Using Keplr browser extension"},w[t.LikeCoinWalletConnectorMethod.KeplrMobile]={name:"Keplr Mobile",description:"Using Keplr Mobile app"},w[t.LikeCoinWalletConnectorMethod.LikerId]={name:"Liker ID",description:"Using Liker Land app"},w[t.LikeCoinWalletConnectorMethod.Cosmostation]={name:"Cosmostation",description:"Using Cosmostation browser extension"},w),S=function(e){var t=e.methods,n=e.onClose,r=e.onSelectConnectionMethod,i=c.useState(!0),a=i[0],o=i[1],l=c.useMemo((function(){return t.filter((function(e){return!!C[e]})).map((function(e){return m({type:e},C[e])}))}),[t]);function u(){o(!1),n&&n()}return c.createElement(s.Dialog,{open:a,className:"lk-relative lk-z-[9999]",onClose:u},c.createElement("div",{className:"lk-fixed lk-inset-0 lk-bg-black/30","aria-hidden":"true"}),c.createElement("div",{className:"lk-fixed lk-inset-0 lk-flex lk-items-center lk-justify-center lk-overflow-y-auto lk-p-[24px]"},c.createElement("div",{className:"lk-flex lk-items-center lk-justify-center lk-min-h-screen"},c.createElement(s.Dialog.Panel,{className:"lk-mx-auto lk-max-w-sm lk-drop-shadow-xl"},c.createElement("div",null,c.createElement("button",{className:"lk-text-[#28646e] lk-bg-[#ebebeb] hover:lk-bg-[#e6e6e6] active:lk-bg-[#9b9b9b] lk-transition-colors lk-rounded-full lk-flex lk-justify-center lk-items-center p-[14px] lk-w-[48px] lk-h-[48px]",onClick:u},c.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},c.createElement("path",{d:"M14.8383 3.74744C15.2289 3.35691 15.862 3.35691 16.2525 3.74744C16.6431 4.13796 16.6431 4.77113 16.2525 5.16165L11.4142 10L16.2525 14.8383C16.6431 15.2289 16.6431 15.862 16.2525 16.2526C15.862 16.6431 15.2289 16.6431 14.8383 16.2526L9.99998 11.4142L5.16164 16.2526C4.77111 16.6431 4.13795 16.6431 3.74742 16.2526C3.3569 15.862 3.3569 15.2289 3.74742 14.8383L8.58577 10L3.74742 5.16165C3.3569 4.77113 3.3569 4.13796 3.74742 3.74744C4.13795 3.35691 4.77111 3.35691 5.16164 3.74744L9.99998 8.58578L14.8383 3.74744Z",fill:"currentColor"})))),c.createElement("div",{className:"lk-py-[32px] lk-px-[24px] lk-rounded-[24px] lk-bg-[#fff] lk-mt-[8px]"},c.createElement("h1",{className:"lk-text-[#28646e] lk-font-bold"},"Please choose your connection method"),c.createElement("ul",{className:"lk-grid lk-grid-flow-row lk-gap-[12px] lk-mt-[24px]"},l.map((function(e){return c.createElement("li",{key:e.type},c.createElement(b,{type:e.type,name:e.name,description:e.description,onPress:function(){return function(e){r&&r(e)}(e.type)}}))}))),c.createElement("div",{className:"lk-flex lk-items-center lk-gap-x-[16px] lk-mt-[16px] lk-text-[#9b9b9b] lk-px-[16px"},c.createElement(_,{className:"lk-w-[24px]"}),c.createElement("span",{className:"lk-grow lk-text-[14px] lk-leading-[1.25]"},"Ledger is not yet supported.")))))))},E="likecoin_wallet_connector_session";t.LikeCoinWalletConnector=function(){function n(n){var r=this;this._isConnectionMethodSelectDialogOpen=!1,this.closeConnectWalletModal=function(){r._renderingRoot.render(null);var e=document.getElementsByClassName("ReactModalPortal");e&&e.length>0&&document.body.removeChild(e[0]),r._isConnectionMethodSelectDialogOpen=!1},this.selectMethod=function(){var e=A(h().mark((function e(t){return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r.closeConnectWalletModal(),e.abrupt("return",r.init(t));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.disconnect=function(){r.deleteSession()},this.init=function(){var e=A(h().mark((function e(n){var o,c;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=n,e.next=e.t0===t.LikeCoinWalletConnectorMethod.Keplr?3:e.t0===t.LikeCoinWalletConnectorMethod.KeplrMobile?5:e.t0===t.LikeCoinWalletConnectorMethod.Cosmostation?7:e.t0===t.LikeCoinWalletConnectorMethod.LikerId?9:11;break;case 3:return o=r.initKeplr(),e.abrupt("break",12);case 5:return o=r.initKeplrMobile(),e.abrupt("break",12);case 7:return o=r.initCosmostation(),e.abrupt("break",12);case 9:return o=r.initLikerID(),e.abrupt("break",12);case 11:throw new Error("METHOD_NOT_SUPPORTED");case 12:return e.next=14,o;case 14:if(c=e.sent){e.next=17;break}throw new Error("ACCOUNT_INIT_FAILED");case 17:return r.saveSession({method:n,accounts:c.accounts}),e.abrupt("return",c);case 19:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.initIfNecessary=function(){var e=r.restoreSession();if(null!=e&&e.method)return r.init(e.method)},this.saveSession=function(e){window.localStorage.setItem(E,JSON.stringify({method:e.method,accounts:e.accounts}))},this.restoreSession=function(){var e;try{var t=window.localStorage.getItem(E);t&&(e=JSON.parse(t))}catch(e){}return e},this.deleteSession=function(){window.localStorage.removeItem(E)},this.initKeplr=function(){var e=A(h().mark((function e(t){var n,o;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0===t&&(t=0),(n=window).keplr){e.next=9;break}if(!(t>1,A=-7,i=n?o-1:0,m=n?-1:1,s=e[t+i];for(i+=m,c=s&(1<<-A)-1,s>>=-A,A+=d;A>0;c=256*c+e[t+i],i+=m,A-=8);for(l=c&(1<<-A)-1,c>>=-A,A+=r;A>0;l=256*l+e[t+i],i+=m,A-=8);if(0===c)c=1-h;else{if(c===f)return l?NaN:1/0*(s?-1:1);l+=Math.pow(2,r),c-=h}return(s?-1:1)*l*Math.pow(2,c-r)},t.write=function(e,t,n,r,o,c){var l,d,f,h=8*c-o-1,A=(1<>1,rt=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,i=r?0:c-1,v=r?1:-1,s=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(d=isNaN(t)?1:0,l=A):(l=Math.floor(Math.log(t)/Math.LN2),t*(f=Math.pow(2,-l))<1&&(l--,f*=2),(t+=l+m>=1?rt/f:rt*Math.pow(2,1-m))*f>=2&&(l++,f/=2),l+m>=A?(d=0,l=A):l+m>=1?(d=(t*f-1)*Math.pow(2,o),l+=m):(d=t*Math.pow(2,m-1)*Math.pow(2,o),l=0));o>=8;e[n+i]=255&d,i+=v,d/=256,o-=8);for(l=l<0;e[n+i]=255&l,i+=v,l/=256,h-=8);e[n+i-v]|=128*s}},function(e,t,n){"use strict";var r=Symbol.for("react.element"),o=Symbol.for("react.portal"),p=Symbol.for("react.fragment"),q=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),u=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),A=Symbol.for("react.lazy"),m=Symbol.iterator;var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},y=Object.assign,I={};function w(a,b,e){this.props=a,this.context=b,this.refs=I,this.updater=e||v}function _(){}function C(a,b,e){this.props=a,this.context=b,this.refs=I,this.updater=e||v}w.prototype.isReactComponent={},w.prototype.setState=function(a,b){if("object"!=typeof a&&"function"!=typeof a&&null!=a)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,a,b,"setState")},w.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,"forceUpdate")},_.prototype=w.prototype;var S=C.prototype=new _;S.constructor=C,y(S,w.prototype),S.isPureReactComponent=!0;var E=Array.isArray,B=Object.prototype.hasOwnProperty,k={current:null},O={key:!0,ref:!0,__self:!0,__source:!0};function R(a,b,e){var t,n={},o=null,c=null;if(null!=b)for(t in void 0!==b.ref&&(c=b.ref),void 0!==b.key&&(o=""+b.key),b)B.call(b,t)&&!O.hasOwnProperty(t)&&(n[t]=b[t]);var g=arguments.length-2;if(1===g)n.children=e;else if(1