-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpolkadot.02.c7f4486f.js
1 lines (1 loc) · 222 KB
/
polkadot.02.c7f4486f.js
1
(("undefined"!=typeof self?self:this).webpackJsonp=("undefined"!=typeof self?self:this).webpackJsonp||[]).push([[6],{1012:function(e,t,r){"use strict";(function(e){r.d(t,"a",(function(){return u}));var n=r(166),a=r.n(n),o=r(65);class u{constructor(){this.exchangeTimeout=3e4,this.unresponsiveTimeout=15e3,this.deviceModel=null,this._events=new a.a,this.send=async(t,r,n,a,u=e.alloc(0),i=[o.StatusCodes.OK])=>{if(u.length>=256)throw new o.TransportError("data.length exceed 256 bytes limit. Got: "+u.length,"DataLengthTooBig");const s=await this.exchange(e.concat([e.from([t,r,n,a]),e.from([u.length]),u])),c=s.readUInt16BE(s.length-2);if(!i.some(e=>e===c))throw new o.TransportStatusError(c);return s},this.exchangeBusyPromise=void 0,this.exchangeAtomicImpl=async e=>{if(this.exchangeBusyPromise)throw new o.TransportRaceCondition("An action was already pending on the Ledger device. Please deny or reconnect.");let t;const r=new Promise(e=>{t=e});this.exchangeBusyPromise=r;let n=!1;const a=setTimeout(()=>{n=!0,this.emit("unresponsive")},this.unresponsiveTimeout);try{const r=await e();return n&&this.emit("responsive"),r}finally{clearTimeout(a),t&&t(),this.exchangeBusyPromise=null}},this._appAPIlock=null}exchange(e){throw new Error("exchange not implemented")}setScrambleKey(e){}close(){return Promise.resolve()}on(e,t){this._events.on(e,t)}off(e,t){this._events.removeListener(e,t)}emit(e,...t){this._events.emit(e,...t)}setDebugMode(){console.warn("setDebugMode is deprecated. use @ledgerhq/logs instead. No logs are emitted in this anymore.")}setExchangeTimeout(e){this.exchangeTimeout=e}setExchangeUnresponsiveTimeout(e){this.unresponsiveTimeout=e}static create(e=3e3,t){return new Promise((r,n)=>{let a=!1;const u=this.listen({next:t=>{a=!0,u&&u.unsubscribe(),i&&clearTimeout(i),this.open(t.descriptor,e).then(r,n)},error:e=>{i&&clearTimeout(i),n(e)},complete:()=>{i&&clearTimeout(i),a||n(new o.TransportError(this.ErrorMessage_NoDeviceFound,"NoDeviceFound"))}}),i=t?setTimeout(()=>{u.unsubscribe(),n(new o.TransportError(this.ErrorMessage_ListenTimeout,"ListenTimeout"))},t):null})}decorateAppAPIMethods(e,t,r){for(let n of t)e[n]=this.decorateAppAPIMethod(n,e[n],e,r)}decorateAppAPIMethod(e,t,r,n){return async(...a)=>{const{_appAPIlock:u}=this;if(u)return Promise.reject(new o.TransportError("Ledger Device is busy (lock "+u+")","TransportLocked"));try{return this._appAPIlock=e,this.setScrambleKey(n),await t.apply(r,a)}finally{this._appAPIlock=null}}}}u.isSupported=void 0,u.list=void 0,u.listen=void 0,u.open=void 0,u.ErrorMessage_ListenTimeout="No Ledger device found (timeout)",u.ErrorMessage_NoDeviceFound="No Ledger device found"}).call(this,r(36).Buffer)},1013:function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(65);function a(t){const r=e.alloc(2);return r.writeUInt16BE(t,0),r}const o={data:e.alloc(0),dataLength:0,sequence:0};var u=(t,r)=>({makeBlocks(n){let o=e.concat([a(n.length),n]);const u=r-5,i=Math.ceil(o.length/u);o=e.concat([o,e.alloc(i*u-o.length+1).fill(0)]);const s=[];for(let r=0;r<i;r++){const n=e.alloc(5);n.writeUInt16BE(t,0),n.writeUInt8(5,2),n.writeUInt16BE(r,3);const a=o.slice(r*u,(r+1)*u);s.push(e.concat([n,a]))}return s},reduceResponse(r,a){let{data:u,dataLength:i,sequence:s}=r||o;if(a.readUInt16BE(0)!==t)throw new n.TransportError("Invalid channel","InvalidChannel");if(5!==a.readUInt8(2))throw new n.TransportError("Invalid tag","InvalidTag");if(a.readUInt16BE(3)!==s)throw new n.TransportError("Invalid sequence","InvalidSequence");r||(i=a.readUInt16BE(5)),s++;const c=a.slice(r?5:7);return u=e.concat([u,c]),u.length>i&&(u=u.slice(0,i)),{data:u,dataLength:i,sequence:s}},getReducedResult(e){if(e&&e.dataLength===e.data.length)return e.data}});t.default=u}).call(this,r(36).Buffer)},112:function(e,t,r){!function(e){"use strict";var t=function(e){var t,r=new Float64Array(16);if(e)for(t=0;t<e.length;t++)r[t]=e[t];return r},n=function(){throw new Error("no PRNG")},a=new Uint8Array(16),o=new Uint8Array(32);o[0]=9;var u=t(),i=t([1]),s=t([56129,1]),c=t([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),d=t([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),l=t([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),f=t([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),p=t([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function b(e,t,r,n){e[t]=r>>24&255,e[t+1]=r>>16&255,e[t+2]=r>>8&255,e[t+3]=255&r,e[t+4]=n>>24&255,e[t+5]=n>>16&255,e[t+6]=n>>8&255,e[t+7]=255&n}function y(e,t,r,n,a){var o,u=0;for(o=0;o<a;o++)u|=e[t+o]^r[n+o];return(1&u-1>>>8)-1}function h(e,t,r,n){return y(e,t,r,n,16)}function v(e,t,r,n){return y(e,t,r,n,32)}function g(e,t,r,n){!function(e,t,r,n){for(var a,o=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,u=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,i=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,s=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,c=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,d=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,l=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,f=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,p=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,b=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,y=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,h=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,v=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,g=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,m=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,_=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,O=o,P=u,j=i,E=s,A=c,w=d,S=l,T=f,M=p,U=b,I=y,k=h,D=v,x=g,C=m,N=_,R=0;R<20;R+=2)O^=(a=(D^=(a=(M^=(a=(A^=(a=O+D|0)<<7|a>>>25)+O|0)<<9|a>>>23)+A|0)<<13|a>>>19)+M|0)<<18|a>>>14,w^=(a=(P^=(a=(x^=(a=(U^=(a=w+P|0)<<7|a>>>25)+w|0)<<9|a>>>23)+U|0)<<13|a>>>19)+x|0)<<18|a>>>14,I^=(a=(S^=(a=(j^=(a=(C^=(a=I+S|0)<<7|a>>>25)+I|0)<<9|a>>>23)+C|0)<<13|a>>>19)+j|0)<<18|a>>>14,N^=(a=(k^=(a=(T^=(a=(E^=(a=N+k|0)<<7|a>>>25)+N|0)<<9|a>>>23)+E|0)<<13|a>>>19)+T|0)<<18|a>>>14,O^=(a=(E^=(a=(j^=(a=(P^=(a=O+E|0)<<7|a>>>25)+O|0)<<9|a>>>23)+P|0)<<13|a>>>19)+j|0)<<18|a>>>14,w^=(a=(A^=(a=(T^=(a=(S^=(a=w+A|0)<<7|a>>>25)+w|0)<<9|a>>>23)+S|0)<<13|a>>>19)+T|0)<<18|a>>>14,I^=(a=(U^=(a=(M^=(a=(k^=(a=I+U|0)<<7|a>>>25)+I|0)<<9|a>>>23)+k|0)<<13|a>>>19)+M|0)<<18|a>>>14,N^=(a=(C^=(a=(x^=(a=(D^=(a=N+C|0)<<7|a>>>25)+N|0)<<9|a>>>23)+D|0)<<13|a>>>19)+x|0)<<18|a>>>14;O=O+o|0,P=P+u|0,j=j+i|0,E=E+s|0,A=A+c|0,w=w+d|0,S=S+l|0,T=T+f|0,M=M+p|0,U=U+b|0,I=I+y|0,k=k+h|0,D=D+v|0,x=x+g|0,C=C+m|0,N=N+_|0,e[0]=O>>>0&255,e[1]=O>>>8&255,e[2]=O>>>16&255,e[3]=O>>>24&255,e[4]=P>>>0&255,e[5]=P>>>8&255,e[6]=P>>>16&255,e[7]=P>>>24&255,e[8]=j>>>0&255,e[9]=j>>>8&255,e[10]=j>>>16&255,e[11]=j>>>24&255,e[12]=E>>>0&255,e[13]=E>>>8&255,e[14]=E>>>16&255,e[15]=E>>>24&255,e[16]=A>>>0&255,e[17]=A>>>8&255,e[18]=A>>>16&255,e[19]=A>>>24&255,e[20]=w>>>0&255,e[21]=w>>>8&255,e[22]=w>>>16&255,e[23]=w>>>24&255,e[24]=S>>>0&255,e[25]=S>>>8&255,e[26]=S>>>16&255,e[27]=S>>>24&255,e[28]=T>>>0&255,e[29]=T>>>8&255,e[30]=T>>>16&255,e[31]=T>>>24&255,e[32]=M>>>0&255,e[33]=M>>>8&255,e[34]=M>>>16&255,e[35]=M>>>24&255,e[36]=U>>>0&255,e[37]=U>>>8&255,e[38]=U>>>16&255,e[39]=U>>>24&255,e[40]=I>>>0&255,e[41]=I>>>8&255,e[42]=I>>>16&255,e[43]=I>>>24&255,e[44]=k>>>0&255,e[45]=k>>>8&255,e[46]=k>>>16&255,e[47]=k>>>24&255,e[48]=D>>>0&255,e[49]=D>>>8&255,e[50]=D>>>16&255,e[51]=D>>>24&255,e[52]=x>>>0&255,e[53]=x>>>8&255,e[54]=x>>>16&255,e[55]=x>>>24&255,e[56]=C>>>0&255,e[57]=C>>>8&255,e[58]=C>>>16&255,e[59]=C>>>24&255,e[60]=N>>>0&255,e[61]=N>>>8&255,e[62]=N>>>16&255,e[63]=N>>>24&255}(e,t,r,n)}function m(e,t,r,n){!function(e,t,r,n){for(var a,o=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,u=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,i=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,s=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,c=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,d=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,l=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,f=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,p=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,b=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,y=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,h=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,v=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,g=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,m=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,_=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,O=0;O<20;O+=2)o^=(a=(v^=(a=(p^=(a=(c^=(a=o+v|0)<<7|a>>>25)+o|0)<<9|a>>>23)+c|0)<<13|a>>>19)+p|0)<<18|a>>>14,d^=(a=(u^=(a=(g^=(a=(b^=(a=d+u|0)<<7|a>>>25)+d|0)<<9|a>>>23)+b|0)<<13|a>>>19)+g|0)<<18|a>>>14,y^=(a=(l^=(a=(i^=(a=(m^=(a=y+l|0)<<7|a>>>25)+y|0)<<9|a>>>23)+m|0)<<13|a>>>19)+i|0)<<18|a>>>14,_^=(a=(h^=(a=(f^=(a=(s^=(a=_+h|0)<<7|a>>>25)+_|0)<<9|a>>>23)+s|0)<<13|a>>>19)+f|0)<<18|a>>>14,o^=(a=(s^=(a=(i^=(a=(u^=(a=o+s|0)<<7|a>>>25)+o|0)<<9|a>>>23)+u|0)<<13|a>>>19)+i|0)<<18|a>>>14,d^=(a=(c^=(a=(f^=(a=(l^=(a=d+c|0)<<7|a>>>25)+d|0)<<9|a>>>23)+l|0)<<13|a>>>19)+f|0)<<18|a>>>14,y^=(a=(b^=(a=(p^=(a=(h^=(a=y+b|0)<<7|a>>>25)+y|0)<<9|a>>>23)+h|0)<<13|a>>>19)+p|0)<<18|a>>>14,_^=(a=(m^=(a=(g^=(a=(v^=(a=_+m|0)<<7|a>>>25)+_|0)<<9|a>>>23)+v|0)<<13|a>>>19)+g|0)<<18|a>>>14;e[0]=o>>>0&255,e[1]=o>>>8&255,e[2]=o>>>16&255,e[3]=o>>>24&255,e[4]=d>>>0&255,e[5]=d>>>8&255,e[6]=d>>>16&255,e[7]=d>>>24&255,e[8]=y>>>0&255,e[9]=y>>>8&255,e[10]=y>>>16&255,e[11]=y>>>24&255,e[12]=_>>>0&255,e[13]=_>>>8&255,e[14]=_>>>16&255,e[15]=_>>>24&255,e[16]=l>>>0&255,e[17]=l>>>8&255,e[18]=l>>>16&255,e[19]=l>>>24&255,e[20]=f>>>0&255,e[21]=f>>>8&255,e[22]=f>>>16&255,e[23]=f>>>24&255,e[24]=p>>>0&255,e[25]=p>>>8&255,e[26]=p>>>16&255,e[27]=p>>>24&255,e[28]=b>>>0&255,e[29]=b>>>8&255,e[30]=b>>>16&255,e[31]=b>>>24&255}(e,t,r,n)}var _=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function O(e,t,r,n,a,o,u){var i,s,c=new Uint8Array(16),d=new Uint8Array(64);for(s=0;s<16;s++)c[s]=0;for(s=0;s<8;s++)c[s]=o[s];for(;a>=64;){for(g(d,c,u,_),s=0;s<64;s++)e[t+s]=r[n+s]^d[s];for(i=1,s=8;s<16;s++)i=i+(255&c[s])|0,c[s]=255&i,i>>>=8;a-=64,t+=64,n+=64}if(a>0)for(g(d,c,u,_),s=0;s<a;s++)e[t+s]=r[n+s]^d[s];return 0}function P(e,t,r,n,a){var o,u,i=new Uint8Array(16),s=new Uint8Array(64);for(u=0;u<16;u++)i[u]=0;for(u=0;u<8;u++)i[u]=n[u];for(;r>=64;){for(g(s,i,a,_),u=0;u<64;u++)e[t+u]=s[u];for(o=1,u=8;u<16;u++)o=o+(255&i[u])|0,i[u]=255&o,o>>>=8;r-=64,t+=64}if(r>0)for(g(s,i,a,_),u=0;u<r;u++)e[t+u]=s[u];return 0}function j(e,t,r,n,a){var o=new Uint8Array(32);m(o,n,a,_);for(var u=new Uint8Array(8),i=0;i<8;i++)u[i]=n[i+16];return P(e,t,r,u,o)}function E(e,t,r,n,a,o,u){var i=new Uint8Array(32);m(i,o,u,_);for(var s=new Uint8Array(8),c=0;c<8;c++)s[c]=o[c+16];return O(e,t,r,n,a,s,i)}var A=function(e){var t,r,n,a,o,u,i,s;this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.leftover=0,this.fin=0,t=255&e[0]|(255&e[1])<<8,this.r[0]=8191&t,r=255&e[2]|(255&e[3])<<8,this.r[1]=8191&(t>>>13|r<<3),n=255&e[4]|(255&e[5])<<8,this.r[2]=7939&(r>>>10|n<<6),a=255&e[6]|(255&e[7])<<8,this.r[3]=8191&(n>>>7|a<<9),o=255&e[8]|(255&e[9])<<8,this.r[4]=255&(a>>>4|o<<12),this.r[5]=o>>>1&8190,u=255&e[10]|(255&e[11])<<8,this.r[6]=8191&(o>>>14|u<<2),i=255&e[12]|(255&e[13])<<8,this.r[7]=8065&(u>>>11|i<<5),s=255&e[14]|(255&e[15])<<8,this.r[8]=8191&(i>>>8|s<<8),this.r[9]=s>>>5&127,this.pad[0]=255&e[16]|(255&e[17])<<8,this.pad[1]=255&e[18]|(255&e[19])<<8,this.pad[2]=255&e[20]|(255&e[21])<<8,this.pad[3]=255&e[22]|(255&e[23])<<8,this.pad[4]=255&e[24]|(255&e[25])<<8,this.pad[5]=255&e[26]|(255&e[27])<<8,this.pad[6]=255&e[28]|(255&e[29])<<8,this.pad[7]=255&e[30]|(255&e[31])<<8};function w(e,t,r,n,a,o){var u=new A(o);return u.update(r,n,a),u.finish(e,t),0}function S(e,t,r,n,a,o){var u=new Uint8Array(16);return w(u,0,r,n,a,o),h(e,t,u,0)}function T(e,t,r,n,a){var o;if(r<32)return-1;for(E(e,0,t,0,r,n,a),w(e,16,e,32,r-32,e),o=0;o<16;o++)e[o]=0;return 0}function M(e,t,r,n,a){var o,u=new Uint8Array(32);if(r<32)return-1;if(j(u,0,32,n,a),0!==S(t,16,t,32,r-32,u))return-1;for(E(e,0,t,0,r,n,a),o=0;o<32;o++)e[o]=0;return 0}function U(e,t){var r;for(r=0;r<16;r++)e[r]=0|t[r]}function I(e){var t,r,n=1;for(t=0;t<16;t++)r=e[t]+n+65535,n=Math.floor(r/65536),e[t]=r-65536*n;e[0]+=n-1+37*(n-1)}function k(e,t,r){for(var n,a=~(r-1),o=0;o<16;o++)n=a&(e[o]^t[o]),e[o]^=n,t[o]^=n}function D(e,r){var n,a,o,u=t(),i=t();for(n=0;n<16;n++)i[n]=r[n];for(I(i),I(i),I(i),a=0;a<2;a++){for(u[0]=i[0]-65517,n=1;n<15;n++)u[n]=i[n]-65535-(u[n-1]>>16&1),u[n-1]&=65535;u[15]=i[15]-32767-(u[14]>>16&1),o=u[15]>>16&1,u[14]&=65535,k(i,u,1-o)}for(n=0;n<16;n++)e[2*n]=255&i[n],e[2*n+1]=i[n]>>8}function x(e,t){var r=new Uint8Array(32),n=new Uint8Array(32);return D(r,e),D(n,t),v(r,0,n,0)}function C(e){var t=new Uint8Array(32);return D(t,e),1&t[0]}function N(e,t){var r;for(r=0;r<16;r++)e[r]=t[2*r]+(t[2*r+1]<<8);e[15]&=32767}function R(e,t,r){for(var n=0;n<16;n++)e[n]=t[n]+r[n]}function L(e,t,r){for(var n=0;n<16;n++)e[n]=t[n]-r[n]}function F(e,t,r){var n,a,o=0,u=0,i=0,s=0,c=0,d=0,l=0,f=0,p=0,b=0,y=0,h=0,v=0,g=0,m=0,_=0,O=0,P=0,j=0,E=0,A=0,w=0,S=0,T=0,M=0,U=0,I=0,k=0,D=0,x=0,C=0,N=r[0],R=r[1],L=r[2],F=r[3],B=r[4],H=r[5],K=r[6],G=r[7],V=r[8],W=r[9],$=r[10],q=r[11],z=r[12],Y=r[13],X=r[14],J=r[15];o+=(n=t[0])*N,u+=n*R,i+=n*L,s+=n*F,c+=n*B,d+=n*H,l+=n*K,f+=n*G,p+=n*V,b+=n*W,y+=n*$,h+=n*q,v+=n*z,g+=n*Y,m+=n*X,_+=n*J,u+=(n=t[1])*N,i+=n*R,s+=n*L,c+=n*F,d+=n*B,l+=n*H,f+=n*K,p+=n*G,b+=n*V,y+=n*W,h+=n*$,v+=n*q,g+=n*z,m+=n*Y,_+=n*X,O+=n*J,i+=(n=t[2])*N,s+=n*R,c+=n*L,d+=n*F,l+=n*B,f+=n*H,p+=n*K,b+=n*G,y+=n*V,h+=n*W,v+=n*$,g+=n*q,m+=n*z,_+=n*Y,O+=n*X,P+=n*J,s+=(n=t[3])*N,c+=n*R,d+=n*L,l+=n*F,f+=n*B,p+=n*H,b+=n*K,y+=n*G,h+=n*V,v+=n*W,g+=n*$,m+=n*q,_+=n*z,O+=n*Y,P+=n*X,j+=n*J,c+=(n=t[4])*N,d+=n*R,l+=n*L,f+=n*F,p+=n*B,b+=n*H,y+=n*K,h+=n*G,v+=n*V,g+=n*W,m+=n*$,_+=n*q,O+=n*z,P+=n*Y,j+=n*X,E+=n*J,d+=(n=t[5])*N,l+=n*R,f+=n*L,p+=n*F,b+=n*B,y+=n*H,h+=n*K,v+=n*G,g+=n*V,m+=n*W,_+=n*$,O+=n*q,P+=n*z,j+=n*Y,E+=n*X,A+=n*J,l+=(n=t[6])*N,f+=n*R,p+=n*L,b+=n*F,y+=n*B,h+=n*H,v+=n*K,g+=n*G,m+=n*V,_+=n*W,O+=n*$,P+=n*q,j+=n*z,E+=n*Y,A+=n*X,w+=n*J,f+=(n=t[7])*N,p+=n*R,b+=n*L,y+=n*F,h+=n*B,v+=n*H,g+=n*K,m+=n*G,_+=n*V,O+=n*W,P+=n*$,j+=n*q,E+=n*z,A+=n*Y,w+=n*X,S+=n*J,p+=(n=t[8])*N,b+=n*R,y+=n*L,h+=n*F,v+=n*B,g+=n*H,m+=n*K,_+=n*G,O+=n*V,P+=n*W,j+=n*$,E+=n*q,A+=n*z,w+=n*Y,S+=n*X,T+=n*J,b+=(n=t[9])*N,y+=n*R,h+=n*L,v+=n*F,g+=n*B,m+=n*H,_+=n*K,O+=n*G,P+=n*V,j+=n*W,E+=n*$,A+=n*q,w+=n*z,S+=n*Y,T+=n*X,M+=n*J,y+=(n=t[10])*N,h+=n*R,v+=n*L,g+=n*F,m+=n*B,_+=n*H,O+=n*K,P+=n*G,j+=n*V,E+=n*W,A+=n*$,w+=n*q,S+=n*z,T+=n*Y,M+=n*X,U+=n*J,h+=(n=t[11])*N,v+=n*R,g+=n*L,m+=n*F,_+=n*B,O+=n*H,P+=n*K,j+=n*G,E+=n*V,A+=n*W,w+=n*$,S+=n*q,T+=n*z,M+=n*Y,U+=n*X,I+=n*J,v+=(n=t[12])*N,g+=n*R,m+=n*L,_+=n*F,O+=n*B,P+=n*H,j+=n*K,E+=n*G,A+=n*V,w+=n*W,S+=n*$,T+=n*q,M+=n*z,U+=n*Y,I+=n*X,k+=n*J,g+=(n=t[13])*N,m+=n*R,_+=n*L,O+=n*F,P+=n*B,j+=n*H,E+=n*K,A+=n*G,w+=n*V,S+=n*W,T+=n*$,M+=n*q,U+=n*z,I+=n*Y,k+=n*X,D+=n*J,m+=(n=t[14])*N,_+=n*R,O+=n*L,P+=n*F,j+=n*B,E+=n*H,A+=n*K,w+=n*G,S+=n*V,T+=n*W,M+=n*$,U+=n*q,I+=n*z,k+=n*Y,D+=n*X,x+=n*J,_+=(n=t[15])*N,u+=38*(P+=n*L),i+=38*(j+=n*F),s+=38*(E+=n*B),c+=38*(A+=n*H),d+=38*(w+=n*K),l+=38*(S+=n*G),f+=38*(T+=n*V),p+=38*(M+=n*W),b+=38*(U+=n*$),y+=38*(I+=n*q),h+=38*(k+=n*z),v+=38*(D+=n*Y),g+=38*(x+=n*X),m+=38*(C+=n*J),o=(n=(o+=38*(O+=n*R))+(a=1)+65535)-65536*(a=Math.floor(n/65536)),u=(n=u+a+65535)-65536*(a=Math.floor(n/65536)),i=(n=i+a+65535)-65536*(a=Math.floor(n/65536)),s=(n=s+a+65535)-65536*(a=Math.floor(n/65536)),c=(n=c+a+65535)-65536*(a=Math.floor(n/65536)),d=(n=d+a+65535)-65536*(a=Math.floor(n/65536)),l=(n=l+a+65535)-65536*(a=Math.floor(n/65536)),f=(n=f+a+65535)-65536*(a=Math.floor(n/65536)),p=(n=p+a+65535)-65536*(a=Math.floor(n/65536)),b=(n=b+a+65535)-65536*(a=Math.floor(n/65536)),y=(n=y+a+65535)-65536*(a=Math.floor(n/65536)),h=(n=h+a+65535)-65536*(a=Math.floor(n/65536)),v=(n=v+a+65535)-65536*(a=Math.floor(n/65536)),g=(n=g+a+65535)-65536*(a=Math.floor(n/65536)),m=(n=m+a+65535)-65536*(a=Math.floor(n/65536)),_=(n=_+a+65535)-65536*(a=Math.floor(n/65536)),o=(n=(o+=a-1+37*(a-1))+(a=1)+65535)-65536*(a=Math.floor(n/65536)),u=(n=u+a+65535)-65536*(a=Math.floor(n/65536)),i=(n=i+a+65535)-65536*(a=Math.floor(n/65536)),s=(n=s+a+65535)-65536*(a=Math.floor(n/65536)),c=(n=c+a+65535)-65536*(a=Math.floor(n/65536)),d=(n=d+a+65535)-65536*(a=Math.floor(n/65536)),l=(n=l+a+65535)-65536*(a=Math.floor(n/65536)),f=(n=f+a+65535)-65536*(a=Math.floor(n/65536)),p=(n=p+a+65535)-65536*(a=Math.floor(n/65536)),b=(n=b+a+65535)-65536*(a=Math.floor(n/65536)),y=(n=y+a+65535)-65536*(a=Math.floor(n/65536)),h=(n=h+a+65535)-65536*(a=Math.floor(n/65536)),v=(n=v+a+65535)-65536*(a=Math.floor(n/65536)),g=(n=g+a+65535)-65536*(a=Math.floor(n/65536)),m=(n=m+a+65535)-65536*(a=Math.floor(n/65536)),_=(n=_+a+65535)-65536*(a=Math.floor(n/65536)),o+=a-1+37*(a-1),e[0]=o,e[1]=u,e[2]=i,e[3]=s,e[4]=c,e[5]=d,e[6]=l,e[7]=f,e[8]=p,e[9]=b,e[10]=y,e[11]=h,e[12]=v,e[13]=g,e[14]=m,e[15]=_}function B(e,t){F(e,t,t)}function H(e,r){var n,a=t();for(n=0;n<16;n++)a[n]=r[n];for(n=253;n>=0;n--)B(a,a),2!==n&&4!==n&&F(a,a,r);for(n=0;n<16;n++)e[n]=a[n]}function K(e,r){var n,a=t();for(n=0;n<16;n++)a[n]=r[n];for(n=250;n>=0;n--)B(a,a),1!==n&&F(a,a,r);for(n=0;n<16;n++)e[n]=a[n]}function G(e,r,n){var a,o,u=new Uint8Array(32),i=new Float64Array(80),c=t(),d=t(),l=t(),f=t(),p=t(),b=t();for(o=0;o<31;o++)u[o]=r[o];for(u[31]=127&r[31]|64,u[0]&=248,N(i,n),o=0;o<16;o++)d[o]=i[o],f[o]=c[o]=l[o]=0;for(c[0]=f[0]=1,o=254;o>=0;--o)k(c,d,a=u[o>>>3]>>>(7&o)&1),k(l,f,a),R(p,c,l),L(c,c,l),R(l,d,f),L(d,d,f),B(f,p),B(b,c),F(c,l,c),F(l,d,p),R(p,c,l),L(c,c,l),B(d,c),L(l,f,b),F(c,l,s),R(c,c,f),F(l,l,c),F(c,f,b),F(f,d,i),B(d,p),k(c,d,a),k(l,f,a);for(o=0;o<16;o++)i[o+16]=c[o],i[o+32]=l[o],i[o+48]=d[o],i[o+64]=f[o];var y=i.subarray(32),h=i.subarray(16);return H(y,y),F(h,h,y),D(e,h),0}function V(e,t){return G(e,t,o)}function W(e,t){return n(t,32),V(e,t)}function $(e,t,r){var n=new Uint8Array(32);return G(n,r,t),m(e,a,n,_)}A.prototype.blocks=function(e,t,r){for(var n,a,o,u,i,s,c,d,l,f,p,b,y,h,v,g,m,_,O,P=this.fin?0:2048,j=this.h[0],E=this.h[1],A=this.h[2],w=this.h[3],S=this.h[4],T=this.h[5],M=this.h[6],U=this.h[7],I=this.h[8],k=this.h[9],D=this.r[0],x=this.r[1],C=this.r[2],N=this.r[3],R=this.r[4],L=this.r[5],F=this.r[6],B=this.r[7],H=this.r[8],K=this.r[9];r>=16;)f=l=0,f+=(j+=8191&(n=255&e[t+0]|(255&e[t+1])<<8))*D,f+=(E+=8191&(n>>>13|(a=255&e[t+2]|(255&e[t+3])<<8)<<3))*(5*K),f+=(A+=8191&(a>>>10|(o=255&e[t+4]|(255&e[t+5])<<8)<<6))*(5*H),f+=(w+=8191&(o>>>7|(u=255&e[t+6]|(255&e[t+7])<<8)<<9))*(5*B),l=(f+=(S+=8191&(u>>>4|(i=255&e[t+8]|(255&e[t+9])<<8)<<12))*(5*F))>>>13,f&=8191,f+=(T+=i>>>1&8191)*(5*L),f+=(M+=8191&(i>>>14|(s=255&e[t+10]|(255&e[t+11])<<8)<<2))*(5*R),f+=(U+=8191&(s>>>11|(c=255&e[t+12]|(255&e[t+13])<<8)<<5))*(5*N),f+=(I+=8191&(c>>>8|(d=255&e[t+14]|(255&e[t+15])<<8)<<8))*(5*C),p=l+=(f+=(k+=d>>>5|P)*(5*x))>>>13,p+=j*x,p+=E*D,p+=A*(5*K),p+=w*(5*H),l=(p+=S*(5*B))>>>13,p&=8191,p+=T*(5*F),p+=M*(5*L),p+=U*(5*R),p+=I*(5*N),l+=(p+=k*(5*C))>>>13,p&=8191,b=l,b+=j*C,b+=E*x,b+=A*D,b+=w*(5*K),l=(b+=S*(5*H))>>>13,b&=8191,b+=T*(5*B),b+=M*(5*F),b+=U*(5*L),b+=I*(5*R),y=l+=(b+=k*(5*N))>>>13,y+=j*N,y+=E*C,y+=A*x,y+=w*D,l=(y+=S*(5*K))>>>13,y&=8191,y+=T*(5*H),y+=M*(5*B),y+=U*(5*F),y+=I*(5*L),h=l+=(y+=k*(5*R))>>>13,h+=j*R,h+=E*N,h+=A*C,h+=w*x,l=(h+=S*D)>>>13,h&=8191,h+=T*(5*K),h+=M*(5*H),h+=U*(5*B),h+=I*(5*F),v=l+=(h+=k*(5*L))>>>13,v+=j*L,v+=E*R,v+=A*N,v+=w*C,l=(v+=S*x)>>>13,v&=8191,v+=T*D,v+=M*(5*K),v+=U*(5*H),v+=I*(5*B),g=l+=(v+=k*(5*F))>>>13,g+=j*F,g+=E*L,g+=A*R,g+=w*N,l=(g+=S*C)>>>13,g&=8191,g+=T*x,g+=M*D,g+=U*(5*K),g+=I*(5*H),m=l+=(g+=k*(5*B))>>>13,m+=j*B,m+=E*F,m+=A*L,m+=w*R,l=(m+=S*N)>>>13,m&=8191,m+=T*C,m+=M*x,m+=U*D,m+=I*(5*K),_=l+=(m+=k*(5*H))>>>13,_+=j*H,_+=E*B,_+=A*F,_+=w*L,l=(_+=S*R)>>>13,_&=8191,_+=T*N,_+=M*C,_+=U*x,_+=I*D,O=l+=(_+=k*(5*K))>>>13,O+=j*K,O+=E*H,O+=A*B,O+=w*F,l=(O+=S*L)>>>13,O&=8191,O+=T*R,O+=M*N,O+=U*C,O+=I*x,j=f=8191&(l=(l=((l+=(O+=k*D)>>>13)<<2)+l|0)+(f&=8191)|0),E=p+=l>>>=13,A=b&=8191,w=y&=8191,S=h&=8191,T=v&=8191,M=g&=8191,U=m&=8191,I=_&=8191,k=O&=8191,t+=16,r-=16;this.h[0]=j,this.h[1]=E,this.h[2]=A,this.h[3]=w,this.h[4]=S,this.h[5]=T,this.h[6]=M,this.h[7]=U,this.h[8]=I,this.h[9]=k},A.prototype.finish=function(e,t){var r,n,a,o,u=new Uint16Array(10);if(this.leftover){for(o=this.leftover,this.buffer[o++]=1;o<16;o++)this.buffer[o]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(r=this.h[1]>>>13,this.h[1]&=8191,o=2;o<10;o++)this.h[o]+=r,r=this.h[o]>>>13,this.h[o]&=8191;for(this.h[0]+=5*r,r=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=r,r=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=r,u[0]=this.h[0]+5,r=u[0]>>>13,u[0]&=8191,o=1;o<10;o++)u[o]=this.h[o]+r,r=u[o]>>>13,u[o]&=8191;for(u[9]-=8192,n=(1^r)-1,o=0;o<10;o++)u[o]&=n;for(n=~n,o=0;o<10;o++)this.h[o]=this.h[o]&n|u[o];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),a=this.h[0]+this.pad[0],this.h[0]=65535&a,o=1;o<8;o++)a=(this.h[o]+this.pad[o]|0)+(a>>>16)|0,this.h[o]=65535&a;e[t+0]=this.h[0]>>>0&255,e[t+1]=this.h[0]>>>8&255,e[t+2]=this.h[1]>>>0&255,e[t+3]=this.h[1]>>>8&255,e[t+4]=this.h[2]>>>0&255,e[t+5]=this.h[2]>>>8&255,e[t+6]=this.h[3]>>>0&255,e[t+7]=this.h[3]>>>8&255,e[t+8]=this.h[4]>>>0&255,e[t+9]=this.h[4]>>>8&255,e[t+10]=this.h[5]>>>0&255,e[t+11]=this.h[5]>>>8&255,e[t+12]=this.h[6]>>>0&255,e[t+13]=this.h[6]>>>8&255,e[t+14]=this.h[7]>>>0&255,e[t+15]=this.h[7]>>>8&255},A.prototype.update=function(e,t,r){var n,a;if(this.leftover){for((a=16-this.leftover)>r&&(a=r),n=0;n<a;n++)this.buffer[this.leftover+n]=e[t+n];if(r-=a,t+=a,this.leftover+=a,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(r>=16&&(a=r-r%16,this.blocks(e,t,a),t+=a,r-=a),r){for(n=0;n<r;n++)this.buffer[this.leftover+n]=e[t+n];this.leftover+=r}};var q=T,z=M;var Y=[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];function X(e,t,r,n){for(var a,o,u,i,s,c,d,l,f,p,b,y,h,v,g,m,_,O,P,j,E,A,w,S,T,M,U=new Int32Array(16),I=new Int32Array(16),k=e[0],D=e[1],x=e[2],C=e[3],N=e[4],R=e[5],L=e[6],F=e[7],B=t[0],H=t[1],K=t[2],G=t[3],V=t[4],W=t[5],$=t[6],q=t[7],z=0;n>=128;){for(P=0;P<16;P++)j=8*P+z,U[P]=r[j+0]<<24|r[j+1]<<16|r[j+2]<<8|r[j+3],I[P]=r[j+4]<<24|r[j+5]<<16|r[j+6]<<8|r[j+7];for(P=0;P<80;P++)if(a=k,o=D,u=x,i=C,s=N,c=R,d=L,F,f=B,p=H,b=K,y=G,h=V,v=W,g=$,q,w=65535&(A=q),S=A>>>16,T=65535&(E=F),M=E>>>16,w+=65535&(A=(V>>>14|N<<18)^(V>>>18|N<<14)^(N>>>9|V<<23)),S+=A>>>16,T+=65535&(E=(N>>>14|V<<18)^(N>>>18|V<<14)^(V>>>9|N<<23)),M+=E>>>16,w+=65535&(A=V&W^~V&$),S+=A>>>16,T+=65535&(E=N&R^~N&L),M+=E>>>16,w+=65535&(A=Y[2*P+1]),S+=A>>>16,T+=65535&(E=Y[2*P]),M+=E>>>16,E=U[P%16],S+=(A=I[P%16])>>>16,T+=65535&E,M+=E>>>16,T+=(S+=(w+=65535&A)>>>16)>>>16,w=65535&(A=O=65535&w|S<<16),S=A>>>16,T=65535&(E=_=65535&T|(M+=T>>>16)<<16),M=E>>>16,w+=65535&(A=(B>>>28|k<<4)^(k>>>2|B<<30)^(k>>>7|B<<25)),S+=A>>>16,T+=65535&(E=(k>>>28|B<<4)^(B>>>2|k<<30)^(B>>>7|k<<25)),M+=E>>>16,S+=(A=B&H^B&K^H&K)>>>16,T+=65535&(E=k&D^k&x^D&x),M+=E>>>16,l=65535&(T+=(S+=(w+=65535&A)>>>16)>>>16)|(M+=T>>>16)<<16,m=65535&w|S<<16,w=65535&(A=y),S=A>>>16,T=65535&(E=i),M=E>>>16,S+=(A=O)>>>16,T+=65535&(E=_),M+=E>>>16,D=a,x=o,C=u,N=i=65535&(T+=(S+=(w+=65535&A)>>>16)>>>16)|(M+=T>>>16)<<16,R=s,L=c,F=d,k=l,H=f,K=p,G=b,V=y=65535&w|S<<16,W=h,$=v,q=g,B=m,P%16==15)for(j=0;j<16;j++)E=U[j],w=65535&(A=I[j]),S=A>>>16,T=65535&E,M=E>>>16,E=U[(j+9)%16],w+=65535&(A=I[(j+9)%16]),S+=A>>>16,T+=65535&E,M+=E>>>16,_=U[(j+1)%16],w+=65535&(A=((O=I[(j+1)%16])>>>1|_<<31)^(O>>>8|_<<24)^(O>>>7|_<<25)),S+=A>>>16,T+=65535&(E=(_>>>1|O<<31)^(_>>>8|O<<24)^_>>>7),M+=E>>>16,_=U[(j+14)%16],S+=(A=((O=I[(j+14)%16])>>>19|_<<13)^(_>>>29|O<<3)^(O>>>6|_<<26))>>>16,T+=65535&(E=(_>>>19|O<<13)^(O>>>29|_<<3)^_>>>6),M+=E>>>16,M+=(T+=(S+=(w+=65535&A)>>>16)>>>16)>>>16,U[j]=65535&T|M<<16,I[j]=65535&w|S<<16;w=65535&(A=B),S=A>>>16,T=65535&(E=k),M=E>>>16,E=e[0],S+=(A=t[0])>>>16,T+=65535&E,M+=E>>>16,M+=(T+=(S+=(w+=65535&A)>>>16)>>>16)>>>16,e[0]=k=65535&T|M<<16,t[0]=B=65535&w|S<<16,w=65535&(A=H),S=A>>>16,T=65535&(E=D),M=E>>>16,E=e[1],S+=(A=t[1])>>>16,T+=65535&E,M+=E>>>16,M+=(T+=(S+=(w+=65535&A)>>>16)>>>16)>>>16,e[1]=D=65535&T|M<<16,t[1]=H=65535&w|S<<16,w=65535&(A=K),S=A>>>16,T=65535&(E=x),M=E>>>16,E=e[2],S+=(A=t[2])>>>16,T+=65535&E,M+=E>>>16,M+=(T+=(S+=(w+=65535&A)>>>16)>>>16)>>>16,e[2]=x=65535&T|M<<16,t[2]=K=65535&w|S<<16,w=65535&(A=G),S=A>>>16,T=65535&(E=C),M=E>>>16,E=e[3],S+=(A=t[3])>>>16,T+=65535&E,M+=E>>>16,M+=(T+=(S+=(w+=65535&A)>>>16)>>>16)>>>16,e[3]=C=65535&T|M<<16,t[3]=G=65535&w|S<<16,w=65535&(A=V),S=A>>>16,T=65535&(E=N),M=E>>>16,E=e[4],S+=(A=t[4])>>>16,T+=65535&E,M+=E>>>16,M+=(T+=(S+=(w+=65535&A)>>>16)>>>16)>>>16,e[4]=N=65535&T|M<<16,t[4]=V=65535&w|S<<16,w=65535&(A=W),S=A>>>16,T=65535&(E=R),M=E>>>16,E=e[5],S+=(A=t[5])>>>16,T+=65535&E,M+=E>>>16,M+=(T+=(S+=(w+=65535&A)>>>16)>>>16)>>>16,e[5]=R=65535&T|M<<16,t[5]=W=65535&w|S<<16,w=65535&(A=$),S=A>>>16,T=65535&(E=L),M=E>>>16,E=e[6],S+=(A=t[6])>>>16,T+=65535&E,M+=E>>>16,M+=(T+=(S+=(w+=65535&A)>>>16)>>>16)>>>16,e[6]=L=65535&T|M<<16,t[6]=$=65535&w|S<<16,w=65535&(A=q),S=A>>>16,T=65535&(E=F),M=E>>>16,E=e[7],S+=(A=t[7])>>>16,T+=65535&E,M+=E>>>16,M+=(T+=(S+=(w+=65535&A)>>>16)>>>16)>>>16,e[7]=F=65535&T|M<<16,t[7]=q=65535&w|S<<16,z+=128,n-=128}return n}function J(e,t,r){var n,a=new Int32Array(8),o=new Int32Array(8),u=new Uint8Array(256),i=r;for(a[0]=1779033703,a[1]=3144134277,a[2]=1013904242,a[3]=2773480762,a[4]=1359893119,a[5]=2600822924,a[6]=528734635,a[7]=1541459225,o[0]=4089235720,o[1]=2227873595,o[2]=4271175723,o[3]=1595750129,o[4]=2917565137,o[5]=725511199,o[6]=4215389547,o[7]=327033209,X(a,o,t,r),r%=128,n=0;n<r;n++)u[n]=t[i-r+n];for(u[r]=128,u[(r=256-128*(r<112?1:0))-9]=0,b(u,r-8,i/536870912|0,i<<3),X(a,o,u,r),n=0;n<8;n++)b(e,8*n,a[n],o[n]);return 0}function Z(e,r){var n=t(),a=t(),o=t(),u=t(),i=t(),s=t(),c=t(),l=t(),f=t();L(n,e[1],e[0]),L(f,r[1],r[0]),F(n,n,f),R(a,e[0],e[1]),R(f,r[0],r[1]),F(a,a,f),F(o,e[3],r[3]),F(o,o,d),F(u,e[2],r[2]),R(u,u,u),L(i,a,n),L(s,u,o),R(c,u,o),R(l,a,n),F(e[0],i,s),F(e[1],l,c),F(e[2],c,s),F(e[3],i,l)}function Q(e,t,r){var n;for(n=0;n<4;n++)k(e[n],t[n],r)}function ee(e,r){var n=t(),a=t(),o=t();H(o,r[2]),F(n,r[0],o),F(a,r[1],o),D(e,a),e[31]^=C(n)<<7}function te(e,t,r){var n,a;for(U(e[0],u),U(e[1],i),U(e[2],i),U(e[3],u),a=255;a>=0;--a)Q(e,t,n=r[a/8|0]>>(7&a)&1),Z(t,e),Z(e,e),Q(e,t,n)}function re(e,r){var n=[t(),t(),t(),t()];U(n[0],l),U(n[1],f),U(n[2],i),F(n[3],l,f),te(e,n,r)}function ne(e,r,a){var o,u=new Uint8Array(64),i=[t(),t(),t(),t()];for(a||n(r,32),J(u,r,32),u[0]&=248,u[31]&=127,u[31]|=64,re(i,u),ee(e,i),o=0;o<32;o++)r[o+32]=e[o];return 0}var ae=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function oe(e,t){var r,n,a,o;for(n=63;n>=32;--n){for(r=0,a=n-32,o=n-12;a<o;++a)t[a]+=r-16*t[n]*ae[a-(n-32)],r=Math.floor((t[a]+128)/256),t[a]-=256*r;t[a]+=r,t[n]=0}for(r=0,a=0;a<32;a++)t[a]+=r-(t[31]>>4)*ae[a],r=t[a]>>8,t[a]&=255;for(a=0;a<32;a++)t[a]-=r*ae[a];for(n=0;n<32;n++)t[n+1]+=t[n]>>8,e[n]=255&t[n]}function ue(e){var t,r=new Float64Array(64);for(t=0;t<64;t++)r[t]=e[t];for(t=0;t<64;t++)e[t]=0;oe(e,r)}function ie(e,r,n,a){var o,u,i=new Uint8Array(64),s=new Uint8Array(64),c=new Uint8Array(64),d=new Float64Array(64),l=[t(),t(),t(),t()];J(i,a,32),i[0]&=248,i[31]&=127,i[31]|=64;var f=n+64;for(o=0;o<n;o++)e[64+o]=r[o];for(o=0;o<32;o++)e[32+o]=i[32+o];for(J(c,e.subarray(32),n+32),ue(c),re(l,c),ee(e,l),o=32;o<64;o++)e[o]=a[o];for(J(s,e,n+64),ue(s),o=0;o<64;o++)d[o]=0;for(o=0;o<32;o++)d[o]=c[o];for(o=0;o<32;o++)for(u=0;u<32;u++)d[o+u]+=s[o]*i[u];return oe(e.subarray(32),d),f}function se(e,r,n,a){var o,s=new Uint8Array(32),d=new Uint8Array(64),l=[t(),t(),t(),t()],f=[t(),t(),t(),t()];if(n<64)return-1;if(function(e,r){var n=t(),a=t(),o=t(),s=t(),d=t(),l=t(),f=t();return U(e[2],i),N(e[1],r),B(o,e[1]),F(s,o,c),L(o,o,e[2]),R(s,e[2],s),B(d,s),B(l,d),F(f,l,d),F(n,f,o),F(n,n,s),K(n,n),F(n,n,o),F(n,n,s),F(n,n,s),F(e[0],n,s),B(a,e[0]),F(a,a,s),x(a,o)&&F(e[0],e[0],p),B(a,e[0]),F(a,a,s),x(a,o)?-1:(C(e[0])===r[31]>>7&&L(e[0],u,e[0]),F(e[3],e[0],e[1]),0)}(f,a))return-1;for(o=0;o<n;o++)e[o]=r[o];for(o=0;o<32;o++)e[o+32]=a[o];if(J(d,e,n),ue(d),te(l,f,d),re(f,r.subarray(32)),Z(l,f),ee(s,l),n-=64,v(r,0,s,0)){for(o=0;o<n;o++)e[o]=0;return-1}for(o=0;o<n;o++)e[o]=r[o+64];return n}function ce(e,t){if(32!==e.length)throw new Error("bad key size");if(24!==t.length)throw new Error("bad nonce size")}function de(){for(var e=0;e<arguments.length;e++)if(!(arguments[e]instanceof Uint8Array))throw new TypeError("unexpected type, use Uint8Array")}function le(e){for(var t=0;t<e.length;t++)e[t]=0}e.lowlevel={crypto_core_hsalsa20:m,crypto_stream_xor:E,crypto_stream:j,crypto_stream_salsa20_xor:O,crypto_stream_salsa20:P,crypto_onetimeauth:w,crypto_onetimeauth_verify:S,crypto_verify_16:h,crypto_verify_32:v,crypto_secretbox:T,crypto_secretbox_open:M,crypto_scalarmult:G,crypto_scalarmult_base:V,crypto_box_beforenm:$,crypto_box_afternm:q,crypto_box:function(e,t,r,n,a,o){var u=new Uint8Array(32);return $(u,a,o),q(e,t,r,n,u)},crypto_box_open:function(e,t,r,n,a,o){var u=new Uint8Array(32);return $(u,a,o),z(e,t,r,n,u)},crypto_box_keypair:W,crypto_hash:J,crypto_sign:ie,crypto_sign_keypair:ne,crypto_sign_open:se,crypto_secretbox_KEYBYTES:32,crypto_secretbox_NONCEBYTES:24,crypto_secretbox_ZEROBYTES:32,crypto_secretbox_BOXZEROBYTES:16,crypto_scalarmult_BYTES:32,crypto_scalarmult_SCALARBYTES:32,crypto_box_PUBLICKEYBYTES:32,crypto_box_SECRETKEYBYTES:32,crypto_box_BEFORENMBYTES:32,crypto_box_NONCEBYTES:24,crypto_box_ZEROBYTES:32,crypto_box_BOXZEROBYTES:16,crypto_sign_BYTES:64,crypto_sign_PUBLICKEYBYTES:32,crypto_sign_SECRETKEYBYTES:64,crypto_sign_SEEDBYTES:32,crypto_hash_BYTES:64,gf:t,D:c,L:ae,pack25519:D,unpack25519:N,M:F,A:R,S:B,Z:L,pow2523:K,add:Z,set25519:U,modL:oe,scalarmult:te,scalarbase:re},e.randomBytes=function(e){var t=new Uint8Array(e);return n(t,e),t},e.secretbox=function(e,t,r){de(e,t,r),ce(r,t);for(var n=new Uint8Array(32+e.length),a=new Uint8Array(n.length),o=0;o<e.length;o++)n[o+32]=e[o];return T(a,n,n.length,t,r),a.subarray(16)},e.secretbox.open=function(e,t,r){de(e,t,r),ce(r,t);for(var n=new Uint8Array(16+e.length),a=new Uint8Array(n.length),o=0;o<e.length;o++)n[o+16]=e[o];return n.length<32||0!==M(a,n,n.length,t,r)?null:a.subarray(32)},e.secretbox.keyLength=32,e.secretbox.nonceLength=24,e.secretbox.overheadLength=16,e.scalarMult=function(e,t){if(de(e,t),32!==e.length)throw new Error("bad n size");if(32!==t.length)throw new Error("bad p size");var r=new Uint8Array(32);return G(r,e,t),r},e.scalarMult.base=function(e){if(de(e),32!==e.length)throw new Error("bad n size");var t=new Uint8Array(32);return V(t,e),t},e.scalarMult.scalarLength=32,e.scalarMult.groupElementLength=32,e.box=function(t,r,n,a){var o=e.box.before(n,a);return e.secretbox(t,r,o)},e.box.before=function(e,t){de(e,t),function(e,t){if(32!==e.length)throw new Error("bad public key size");if(32!==t.length)throw new Error("bad secret key size")}(e,t);var r=new Uint8Array(32);return $(r,e,t),r},e.box.after=e.secretbox,e.box.open=function(t,r,n,a){var o=e.box.before(n,a);return e.secretbox.open(t,r,o)},e.box.open.after=e.secretbox.open,e.box.keyPair=function(){var e=new Uint8Array(32),t=new Uint8Array(32);return W(e,t),{publicKey:e,secretKey:t}},e.box.keyPair.fromSecretKey=function(e){if(de(e),32!==e.length)throw new Error("bad secret key size");var t=new Uint8Array(32);return V(t,e),{publicKey:t,secretKey:new Uint8Array(e)}},e.box.publicKeyLength=32,e.box.secretKeyLength=32,e.box.sharedKeyLength=32,e.box.nonceLength=24,e.box.overheadLength=e.secretbox.overheadLength,e.sign=function(e,t){if(de(e,t),64!==t.length)throw new Error("bad secret key size");var r=new Uint8Array(64+e.length);return ie(r,e,e.length,t),r},e.sign.open=function(e,t){if(de(e,t),32!==t.length)throw new Error("bad public key size");var r=new Uint8Array(e.length),n=se(r,e,e.length,t);if(n<0)return null;for(var a=new Uint8Array(n),o=0;o<a.length;o++)a[o]=r[o];return a},e.sign.detached=function(t,r){for(var n=e.sign(t,r),a=new Uint8Array(64),o=0;o<a.length;o++)a[o]=n[o];return a},e.sign.detached.verify=function(e,t,r){if(de(e,t,r),64!==t.length)throw new Error("bad signature size");if(32!==r.length)throw new Error("bad public key size");var n,a=new Uint8Array(64+e.length),o=new Uint8Array(64+e.length);for(n=0;n<64;n++)a[n]=t[n];for(n=0;n<e.length;n++)a[n+64]=e[n];return se(o,a,a.length,r)>=0},e.sign.keyPair=function(){var e=new Uint8Array(32),t=new Uint8Array(64);return ne(e,t),{publicKey:e,secretKey:t}},e.sign.keyPair.fromSecretKey=function(e){if(de(e),64!==e.length)throw new Error("bad secret key size");for(var t=new Uint8Array(32),r=0;r<t.length;r++)t[r]=e[32+r];return{publicKey:t,secretKey:new Uint8Array(e)}},e.sign.keyPair.fromSeed=function(e){if(de(e),32!==e.length)throw new Error("bad seed size");for(var t=new Uint8Array(32),r=new Uint8Array(64),n=0;n<32;n++)r[n]=e[n];return ne(t,r,!0),{publicKey:t,secretKey:r}},e.sign.publicKeyLength=32,e.sign.secretKeyLength=64,e.sign.seedLength=32,e.sign.signatureLength=64,e.hash=function(e){de(e);var t=new Uint8Array(64);return J(t,e,e.length),t},e.hash.hashLength=64,e.verify=function(e,t){return de(e,t),0!==e.length&&0!==t.length&&(e.length===t.length&&0===y(e,0,t,0,e.length))},e.setPRNG=function(e){n=e},function(){var t="undefined"!=typeof self?self.crypto||self.msCrypto:null;if(t&&t.getRandomValues){e.setPRNG((function(e,r){var n,a=new Uint8Array(r);for(n=0;n<r;n+=65536)t.getRandomValues(a.subarray(n,n+Math.min(r-n,65536)));for(n=0;n<r;n++)e[n]=a[n];le(a)}))}else(t=r(1438))&&t.randomBytes&&e.setPRNG((function(e,r){var n,a=t.randomBytes(r);for(n=0;n<r;n++)e[n]=a[n];le(a)}))}()}(e.exports?e.exports:self.nacl=self.nacl||{})},1222:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Settings=void 0;var a=n(r(28)),o=n(r(29)),u=n(r(344)),i=n(r(137)),s=r(3),c=r(676);function d(e,t,r){const n=t||r;return e.some(({value:e})=>e===n)?n:r}var l=(0,o.default)("emitter"),f=(0,o.default)("apiUrl"),p=(0,o.default)("camera"),b=(0,o.default)("i18nLang"),y=(0,o.default)("icon"),h=(0,o.default)("ledgerConn"),v=(0,o.default)("locking"),g=(0,o.default)("prefix"),m=(0,o.default)("uiMode"),_=(0,o.default)("uiTheme");class O{constructor(){Object.defineProperty(this,l,{writable:!0,value:void 0}),Object.defineProperty(this,f,{writable:!0,value:void 0}),Object.defineProperty(this,p,{writable:!0,value:void 0}),Object.defineProperty(this,b,{writable:!0,value:void 0}),Object.defineProperty(this,y,{writable:!0,value:void 0}),Object.defineProperty(this,h,{writable:!0,value:void 0}),Object.defineProperty(this,v,{writable:!0,value:void 0}),Object.defineProperty(this,g,{writable:!0,value:void 0}),Object.defineProperty(this,m,{writable:!0,value:void 0}),Object.defineProperty(this,_,{writable:!0,value:void 0});const e=i.default.get("settings")||{};(0,a.default)(this,l)[l]=new u.default,(0,a.default)(this,f)[f]="string"==typeof e.apiUrl&&e.apiUrl||c.ENDPOINT_DEFAULT.value,(0,a.default)(this,p)[p]=d(c.CAMERA,e.camera,c.CAMERA_DEFAULT),(0,a.default)(this,h)[h]=d(c.LEDGER_CONN,e.ledgerConn,c.LEDGER_CONN_DEFAULT),(0,a.default)(this,b)[b]=e.i18nLang||c.LANGUAGE_DEFAULT,(0,a.default)(this,y)[y]=e.icon||c.ICON_DEFAULT,(0,a.default)(this,v)[v]=e.locking||c.LOCKING_DEFAULT,(0,a.default)(this,g)[g]=(0,s.isUndefined)(e.prefix)?c.PREFIX_DEFAULT:e.prefix,(0,a.default)(this,m)[m]=e.uiMode||c.UIMODE_DEFAULT,(0,a.default)(this,_)[_]=e.uiTheme||c.UITHEME_DEFAULT}get camera(){return(0,a.default)(this,p)[p]}get apiUrl(){return(0,a.default)(this,f)[f]}get i18nLang(){return(0,a.default)(this,b)[b]}get icon(){return(0,a.default)(this,y)[y]}get ledgerConn(){return(0,a.default)(this,h)[h]}get locking(){return(0,a.default)(this,v)[v]}get prefix(){return(0,a.default)(this,g)[g]}get uiMode(){return(0,a.default)(this,m)[m]}get uiTheme(){return(0,a.default)(this,_)[_]}get availableCamera(){return c.CAMERA}get availableCryptos(){return c.CRYPTOS}get availableCryptosEth(){return c.CRYPTOS_ETH}get availableIcons(){return c.ICONS}get availableLedgerConn(){return c.LEDGER_CONN}get availableLocking(){return c.LOCKING}get availableNodes(){return c.ENDPOINTS}get availablePrefixes(){return c.PREFIXES}get availableUIModes(){return c.UIMODES}get availableUIThemes(){return c.UITHEMES}get(){return{apiUrl:(0,a.default)(this,f)[f],camera:(0,a.default)(this,p)[p],i18nLang:(0,a.default)(this,b)[b],icon:(0,a.default)(this,y)[y],ledgerConn:(0,a.default)(this,h)[h],locking:(0,a.default)(this,v)[v],prefix:(0,a.default)(this,g)[g],uiMode:(0,a.default)(this,m)[m],uiTheme:(0,a.default)(this,_)[_]}}set(e){(0,a.default)(this,f)[f]=e.apiUrl||(0,a.default)(this,f)[f],(0,a.default)(this,p)[p]=e.camera||(0,a.default)(this,p)[p],(0,a.default)(this,h)[h]=e.ledgerConn||(0,a.default)(this,h)[h],(0,a.default)(this,b)[b]=e.i18nLang||(0,a.default)(this,b)[b],(0,a.default)(this,y)[y]=e.icon||(0,a.default)(this,y)[y],(0,a.default)(this,v)[v]=e.locking||(0,a.default)(this,v)[v],(0,a.default)(this,g)[g]=(0,s.isUndefined)(e.prefix)?(0,a.default)(this,g)[g]:e.prefix,(0,a.default)(this,m)[m]=e.uiMode||(0,a.default)(this,m)[m],(0,a.default)(this,_)[_]=e.uiTheme||(0,a.default)(this,_)[_];const t=this.get();i.default.set("settings",t),(0,a.default)(this,l)[l].emit("change",t)}on(e,t){(0,a.default)(this,l)[l].on(e,t)}}t.Settings=O;var P=new O;t.default=P},1223:function(e,t,r){"use strict";r(1224),r(1225),r(1226),r(1227)},1224:function(e,t,r){"use strict";Array.prototype.fill||(Array.prototype.fill=function(e,t=0,r){if(!this)throw new TypeError("this is null or not defined");const n=Object(this),a=n.length>>>0,o=t>>0;let u=o<0?Math.max(a+o,0):Math.min(o,a);const i=void 0===r?a:r>>0,s=i<0?Math.max(a+i,0):Math.min(i,a);for(;u<s;)n[u]=e,u++;return n}),Uint8Array.prototype.fill||(Uint8Array.prototype.fill=Array.prototype.fill)},1225:function(e,t,r){"use strict";String.prototype.padEnd||(String.prototype.padEnd=function(e,t=" "){let r=String(this);for(;r.length<e;)r+=t;return r})},1226:function(e,t,r){"use strict";String.prototype.padStart||(String.prototype.padStart=function(e,t=" "){let r=String(this);for(;r.length<e;)r=t+r;return r})},1227:function(e,t,r){"use strict";Object.setPrototypeOf||(Object.setPrototypeOf=function(e,t){return e.__proto__=t,e})},1228:function(e,t,r){"use strict";(function(e){var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function({name:t,version:r},n){const u="undefined"!=typeof window?window:e;u.__polkadotjs||(u.__polkadotjs={});if((0,a.default)(t.startsWith("@polkadot"),"Invalid package descriptor "+t),u.__polkadotjs[t]=[...u.__polkadotjs[t]||[],{path:n||"",version:r}],1!==u.__polkadotjs[t].length){const e=function(e){const t=e.map(e=>(0,o.default)(e)?{version:e}:e),r=t.reduce((e,{version:t})=>Math.max(e,t.length),0);return t.map(({path:e,version:t})=>`\t${t.padEnd(r)}\t${function(e){return!e||e.length<5?"<unknown>":e}(e)}`).join("\n")}(u.__polkadotjs[t]);console.warn(`Multiple instances of ${t} detected, ensure that there is only one package in your dependency tree.\n${e}`)}};var a=n(r(198)),o=n(r(231))}).call(this,r(48))},1229:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t){if(!t)return s;if(t<1e3)return u(u({},s),{},{milliseconds:t});const r=t/1e3;if(r<60){const n=Math.floor(r);return i(u(u({},s),{},{seconds:n}),e(t-1e3*n))}const n=r/60;if(n<60){const r=Math.floor(n);return i(u(u({},s),{},{minutes:r}),e(t-60*r*1e3))}const a=n/60;if(a<24){const r=Math.floor(a);return i(u(u({},s),{},{hours:r}),e(t-3600*r*1e3))}const o=Math.floor(a/24);return i(u(u({},s),{},{days:o}),e(t-86400*o*1e3))};var a=n(r(8));function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){(0,a.default)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function i(e,t){return{days:e.days+t.days,hours:e.hours+t.hours,milliseconds:e.milliseconds+t.milliseconds,minutes:e.minutes+t.minutes,seconds:e.seconds+t.seconds}}const s={days:0,hours:0,milliseconds:0,minutes:0,seconds:0}},1240:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,...r){return new Promise((n,a)=>{t.apply(e,r.concat((e,t)=>{e?a(e):n(t)}))})}},1241:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"arrayFilter",{enumerable:!0,get:function(){return a.default}});var a=n(r(1242))},1242:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t=!0){return e.filter(e=>!(0,o.default)(e)&&(t||!(0,a.default)(e)))};var a=n(r(347)),o=n(r(232))},1243:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.BN_THOUSAND=t.BN_HUNDRED=t.BN_TEN=t.BN_ONE=t.BN_ZERO=void 0;var a=n(r(18));const o=new a.default(0);t.BN_ZERO=o;const u=new a.default(1);t.BN_ONE=u;const i=new a.default(10);t.BN_TEN=i;const s=new a.default(100);t.BN_HUNDRED=s;const c=new a.default(1e3);t.BN_THOUSAND=c},1244:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(280)).default;t.default=a},1245:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(...e){return(0,o.default)(e&&e.length>=1,"Must provide one or more BN arguments"),e.reduce((e,t)=>a.default.max(e,t),e[0])};var a=n(r(18)),o=n(r(198))},1246:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(...e){return(0,o.default)(e&&e.length>=1,"Must provide one or more BN arguments"),e.reduce((e,t)=>a.default.min(e,t),e[0])};var a=n(r(18)),o=n(r(198))},1247:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,o.default)(e.gten(0),"square root of negative numbers is not supported"),e.ltn(2)?e:function e(t,r){const n=t.div(r).add(r).shrn(1);if(r.eq(n)||r.eq(n.subn(1)))return r;return e(t,n)}(e,new a.default(1))};var a=n(r(18)),o=n(r(198))},1248:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(8)),o=n(r(471)),u=n(r(666)),i=r(282);function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}var c=function(e,t={bitLength:-1,isLe:!1,isNegative:!1},r){if(!e)return"0x00";const n=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach((function(t){(0,a.default)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({isLe:!1,isNegative:!1},(0,o.default)(t)?{bitLength:t,isLe:r}:t);return(0,i.u8aToHex)((0,u.default)(e,n))};t.default=c},1249:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(...e){let t=0,r=0;const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=(0,a.default)(e[r]),t+=n[r].length;const o=new Uint8Array(t);for(let e=0;e<n.length;e++)o.set(n[e],r),r+=n[e].length;return o};var a=n(r(283))},1251:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t=-1,r=!1){const n=Math.ceil(t/8);if(-1===t||e.length===n)return e;if(e.length>n)return e.subarray(0,n);const a=new Uint8Array(n);r?a.set(e,0):a.set(e,n-e.length);return a}},1252:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e.sort((e,t)=>{let r=0;for(;;){if((0,a.default)(e[r])&&(0,a.default)(t[r]))return 0;if((0,a.default)(e[r]))return-1;if((0,a.default)(t[r]))return 1;const n=e[r]-t[r];if(0!==n)return n;r++}})};var a=n(r(232))},1253:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t={isLe:!0,isNegative:!1}){return(0,a.default)((0,o.default)(e),t)};var a=n(r(280)),o=n(r(346))},1254:function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(t){return t?e.from(t):e.from([])}}).call(this,r(36).Buffer)},1256:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"bufferToU8a",{enumerable:!0,get:function(){return a.default}});var a=n(r(667))},1257:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"compactAddLength",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"compactStripLength",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"compactFromU8a",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"compactToU8a",{enumerable:!0,get:function(){return i.default}});var a=n(r(1258)),o=n(r(1259)),u=n(r(671)),i=n(r(670))},1258:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,a.u8aConcat)((0,o.default)(e.length),e)};var a=r(282),o=n(r(670))},1259:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t=a.DEFAULT_BITLENGTH){const[r,n]=(0,o.default)(e,t),u=r+n.toNumber();return[u,e.subarray(r,u)]};var a=r(473),o=n(r(671))},1260:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"formatBalance",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"formatDate",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"formatDecimal",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"formatElapsed",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"formatNumber",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"calcSi",{enumerable:!0,get:function(){return c.calcSi}}),Object.defineProperty(t,"findSi",{enumerable:!0,get:function(){return c.findSi}});var a=n(r(1261)),o=n(r(660)),u=n(r(474)),i=n(r(1262)),s=n(r(1263)),c=r(672)},1261:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(349)),o=n(r(468)),u=n(r(232)),i=n(r(474)),s=r(672);const c=s.SI[s.SI_MID].text;let d=0,l=c;const f=function(e,t=!0,r=d){let n=(0,a.default)(e).toString();if(0===n.length||"0"===n)return"0";const u=n[0].startsWith("-");u&&(n=n.substr(1));const{decimals:c=r,forceUnit:l,withSi:f=!0,withSiFull:p=!1,withUnit:b=!0}=(0,o.default)(t)?{withSi:t}:t,y=(0,s.calcSi)(n,c,l),h=n.length-(c+y.power),v=n.substr(0,h),g=(`${new Array((h<0?0-h:0)+1).join("0")}${n}`.substr(h<0?0:h)+"0000").substr(0,4),m=f||p?"-"===y.value?b?" "+((0,o.default)(b)?y.text:b):"":` ${p?y.text:y.value}${b?`${p?" ":""}${(0,o.default)(b)?s.SI[s.SI_MID].text:b}`:""}`:"";return`${u?"-":""}${(0,i.default)(v||"0")}.${g}${m}`};f.calcSi=(e,t=d)=>(0,s.calcSi)(e,t),f.findSi=s.findSi,f.getDefaults=()=>({decimals:d,unit:l}),f.getOptions=(e=d)=>s.SI.filter(({power:t})=>!(t<0)||e+t>=0),f.setDefaults=({decimals:e,unit:t})=>{d=(0,u.default)(e)?d:e,l=(0,u.default)(t)?l:t,s.SI[s.SI_MID].text=l};var p=f;t.default=p},1262:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){const r=e&&e.getTime()||0,n=function e(t){if(t){if((0,o.default)(t))return e(t.toBn());if(t instanceof Date)return e(t.getTime());if(t instanceof a.default)return e(t.toNumber())}return t||0}(t);let u="0.0s";if(r&&n){const e=Math.max(Math.abs(r-n),0)/1e3;u=e<15?e.toFixed(1)+"s":e<60?(0|e)+"s":e<3600?(e/60|0)+"m":(e/3600|0)+"h"}return u};var a=n(r(18)),o=n(r(470))},1263:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,o.default)((0,a.default)(e).toString())};var a=n(r(349)),o=n(r(474))},1264:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"hexAddPrefix",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"hexFixLength",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"hexHasPrefix",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"hexStripPrefix",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"hexToBn",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"hexToNumber",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"hexToString",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"hexToU8a",{enumerable:!0,get:function(){return l.default}});var a=n(r(673)),o=n(r(674)),u=n(r(469)),i=n(r(348)),s=n(r(280)),c=n(r(1265)),d=n(r(1266)),l=n(r(350))},1265:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e?(0,a.default)(e).toNumber():NaN};var a=n(r(280))},1266:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,a.default)((0,o.default)(e))};var a=n(r(669)),o=n(r(350))},1267:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isAscii",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"isBigInt",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"isBn",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"isBuffer",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"isBoolean",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"isChildClass",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"isError",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"isFunction",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"isHex",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(t,"isInstanceOf",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(t,"isIp",{enumerable:!0,get:function(){return b.default}}),Object.defineProperty(t,"isJsonObject",{enumerable:!0,get:function(){return y.default}}),Object.defineProperty(t,"isNull",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(t,"isNumber",{enumerable:!0,get:function(){return v.default}}),Object.defineProperty(t,"isObject",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(t,"isObservable",{enumerable:!0,get:function(){return m.default}}),Object.defineProperty(t,"isString",{enumerable:!0,get:function(){return _.default}}),Object.defineProperty(t,"isTestChain",{enumerable:!0,get:function(){return O.default}}),Object.defineProperty(t,"isToBn",{enumerable:!0,get:function(){return P.default}}),Object.defineProperty(t,"isU8a",{enumerable:!0,get:function(){return j.default}}),Object.defineProperty(t,"isUndefined",{enumerable:!0,get:function(){return E.default}}),Object.defineProperty(t,"isUtf8",{enumerable:!0,get:function(){return A.default}}),Object.defineProperty(t,"isWasm",{enumerable:!0,get:function(){return w.default}});var a=n(r(1268)),o=n(r(665)),u=n(r(661)),i=n(r(466)),s=n(r(468)),c=n(r(1269)),d=n(r(1270)),l=n(r(279)),f=n(r(281)),p=n(r(345)),b=n(r(1271)),y=n(r(1273)),h=n(r(347)),v=n(r(471)),g=n(r(467)),m=n(r(1274)),_=n(r(231)),O=n(r(1275)),P=n(r(470)),j=n(r(663)),E=n(r(232)),A=n(r(1276)),w=n(r(1277))},1268:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if(!e)return(0,o.default)(e);return!(0,a.default)(e).some(e=>e>=127||e<32&&!u.includes(e))};var a=n(r(283)),o=n(r(231));const u=[9,10,13]},1269:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return!!t&&(e===t||e.isPrototypeOf(t))}},1270:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,a.default)(e,Error)};var a=n(r(345))},1271:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if("v4"===t)return a.default.v4({exact:!0}).test(e);if("v6"===t)return a.default.v6({exact:!0}).test(e);return(0,a.default)({exact:!0}).test(e)};var a=n(r(1272))},1273:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const t="string"!=typeof e?JSON.stringify(e):e;try{const e=JSON.parse(t);return"object"==typeof e&&null!==e}catch(e){return!1}}},1274:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,o.default)(e)&&(0,a.default)(e.next)};var a=n(r(279)),o=n(r(467))},1275:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if(!e)return!1;return!!n.test(e.toString())};const n=new RegExp("(Development|Local Testnet)$")},1276:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if(!e)return(0,o.default)(e);const t=(0,a.default)(e),r=t.length;let n=0;for(;n<r;)if(t[n]<=127)n+=1;else if(t[n]>=194&&t[n]<=223){if(!(n+1<r))return!1;if(t[n+1]<128||t[n+1]>191)return!1;n+=2}else if(224===t[n]){if(!(n+2<r))return!1;if(t[n+1]<160||t[n+1]>191)return!1;if(t[n+2]<128||t[n+2]>191)return!1;n+=3}else if(t[n]>=225&&t[n]<=236){if(!(n+2<r))return!1;if(t[n+1]<128||t[n+1]>191)return!1;if(t[n+2]<128||t[n+2]>191)return!1;n+=3}else if(237===t[n]){if(!(n+2<r))return!1;if(t[n+1]<128||t[n+1]>159)return!1;if(t[n+2]<128||t[n+2]>191)return!1;n+=3}else if(t[n]>=238&&t[n]<=239){if(!(n+2<r))return!1;if(t[n+1]<128||t[n+1]>191)return!1;if(t[n+2]<128||t[n+2]>191)return!1;n+=3}else if(240===t[n]){if(!(n+3<r))return!1;if(t[n+1]<144||t[n+1]>191)return!1;if(t[n+2]<128||t[n+2]>191)return!1;if(t[n+3]<128||t[n+3]>191)return!1;n+=4}else if(t[n]>=241&&t[n]<=243){if(!(n+3<r))return!1;if(t[n+1]<128||t[n+1]>191)return!1;if(t[n+2]<128||t[n+2]>191)return!1;if(t[n+3]<128||t[n+3]>191)return!1;n+=4}else{if(244!==t[n])return!1;if(!(n+3<r))return!1;if(t[n+1]<128||t[n+1]>143)return!1;if(t[n+2]<128||t[n+2]>191)return!1;if(t[n+3]<128||t[n+3]>191)return!1;n+=4}return!0};var a=n(r(283)),o=n(r(231))},1277:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return!!e&&(0,a.default)(e.subarray(0,4),o)};var a=n(r(668));const o=new Uint8Array([0,97,115,109])},1278:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"numberToHex",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"numberToU8a",{enumerable:!0,get:function(){return o.default}});var a=n(r(675)),o=n(r(1279))},1279:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t=-1){if((0,u.default)(e)||(0,o.default)(e)||isNaN(e))return new Uint8Array;return(0,a.default)((0,i.default)(e,t))};var a=n(r(350)),o=n(r(347)),u=n(r(232)),i=n(r(675))},1280:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"stringCamelCase",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"stringLowerFirst",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"stringShorten",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"stringToHex",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"stringToU8a",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"stringUpperFirst",{enumerable:!0,get:function(){return c.default}});var a=n(r(1281)),o=n(r(1283)),u=n(r(1284)),i=n(r(1285)),s=n(r(472)),c=n(r(1286))},1281:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(1282)).default;t.default=a},1283:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e?e.charAt(0).toLowerCase()+e.slice(1):""}},1284:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t=6){if(e.length<=2+2*t)return e;return`${e.substr(0,t)}…${e.slice(-t)}`}},1285:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,a.default)((0,o.default)(e))};var a=n(r(346)),o=n(r(472))},1286:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e?e.charAt(0).toUpperCase()+e.slice(1):""}},1287:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CRYPTOS_ETH=t.CRYPTOS=void 0;t.CRYPTOS=[{info:"sr25519",text:"Schnorrkel (sr25519, recommended)",value:"sr25519"},{info:"ed25519",text:"Edwards (ed25519, alternative)",value:"ed25519"},{info:"ecdsa",text:"ECDSA (Non BTC/ETH compatible)",value:"ecdsa"}];t.CRYPTOS_ETH=[{info:"ethereum",text:"ECDSA (ETH compatible)",value:"ethereum"}]},1288:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ENDPOINT_DEFAULT=t.ENDPOINTS=void 0;const n=[{info:"local",text:"Local Node (Own, 127.0.0.1:9944)",value:"ws://127.0.0.1:9944/"}];t.ENDPOINTS=n;const a=n[0];t.ENDPOINT_DEFAULT=a},1289:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LEDGER_CONN=t.LEDGER_CONN_DEFAULT=void 0;t.LEDGER_CONN_DEFAULT="none";t.LEDGER_CONN=[{info:"none",text:"Do not attach Ledger devices",value:"none"},{info:"webusb",text:"Attach Ledger via WebUSB",value:"webusb"}]},1290:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PREFIXES=t.PREFIX_DEFAULT=void 0;t.PREFIX_DEFAULT=-1;t.PREFIXES=[{info:"default",text:"Default for the connected node",value:-1},{info:"substrate",text:"Substrate (generic)",value:42},{info:"polkadot",text:"Polkadot (live)",value:0},{info:"kusama",text:"Kusama (canary)",value:2},{info:"edgeware",text:"Edgeware (live)",value:7},{info:"kulupu",text:"Kulupu (live)",value:16},{info:"subsocial",text:"Subsocial (live)",value:28}]},1291:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UITHEMES=t.UITHEME_DEFAULT=t.UIMODES=t.UIMODE_DEFAULT=t.LANGUAGE_DEFAULT=t.ICONS=t.ICON_DEFAULT_HOST=t.ICON_DEFAULT=void 0;var n=r(1292);t.LANGUAGE_DEFAULT="default";const a=!n.isPolkadot&&"undefined"!=typeof window&&window.location.host.includes("ui-light")?"light":"full";t.UIMODE_DEFAULT=a;t.UIMODES=[{info:"full",text:"Fully featured",value:"full"},{info:"light",text:"Basic features only",value:"light"}];const o=n.isPolkadot?"polkadot":"substrate";t.UITHEME_DEFAULT=o;t.UITHEMES=[{info:"polkadot",text:"Polkadot",value:"polkadot"},{info:"substrate",text:"Substrate",value:"substrate"}];t.ICON_DEFAULT="default";const u=n.isPolkadot?"polkadot":"substrate";t.ICON_DEFAULT_HOST=u;t.ICONS=[{info:"default",text:"Default for the connected node",value:"default"},{info:"polkadot",text:"Polkadot",value:"polkadot"},{info:"substrate",text:"Substrate",value:"substrate"},{info:"beachball",text:"Beachball",value:"beachball"}]},1292:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isPolkadot=void 0;const n="undefined"!=typeof window&&window.location.host.includes("polkadot");t.isPolkadot=n},1293:function(e,t,r){},1421:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.cryptoIsReady=function(){return a.default.isReady()},t.cryptoWaitReady=o;var a=n(r(57));function o(){return a.default.waitReady().then(()=>!0).catch(e=>(console.error("Unable to initialize @polkadot/util-crypto",e),!1))}o().catch(()=>{})},1427:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"checkAddress",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"checkAddressChecksum",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"createKeyMulti",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"createKeyDerived",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"decodeAddress",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"deriveAddress",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"encodeAddress",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"encodeDerivedAddress",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"encodeMultiAddress",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(t,"addressEq",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(t,"setSS58Format",{enumerable:!0,get:function(){return b.default}}),Object.defineProperty(t,"sortAddresses",{enumerable:!0,get:function(){return y.default}});var a=n(r(1428)),o=n(r(503)),u=n(r(753)),i=n(r(754)),s=n(r(159)),c=n(r(1434)),d=n(r(296)),l=n(r(1444)),f=n(r(1445)),p=n(r(1446)),b=n(r(1447)),y=n(r(1448))},1428:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){let r;try{r=(0,a.default)(e)}catch(e){return[!1,e.message]}if(r[0]!==t)return[!1,`Prefix mismatch, expected ${t}, found ${r[0]}`];if(!u.default.allowedEncodedLengths.includes(r.length))return[!1,"Invalid decoded address length"];const[n]=(0,o.default)(r);return[n,n?null:"Invalid decoded address checksum"]};var a=n(r(501)),o=n(r(503)),u=n(r(295))},1433:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.allowedSS58=void 0;t.allowedSS58=[0,1,2,3,4,16,17,20,21,22,42,43,68,69]},1434:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){const{path:n}=(0,o.keyExtractPath)(t);return(0,a.assert)(n.length&&!n.some(e=>e.isHard),"Expected suri to contain a combination of non-hard paths"),(0,s.default)(n.reduce((e,t)=>(0,u.schnorrkelDerivePublic)(e,t.chainCode),(0,i.default)(e)),r)};var a=r(3),o=r(755),u=r(764),i=n(r(159)),s=n(r(296))},1435:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(28)),o=n(r(29)),u=r(3),i=n(r(158));const s=/^\d+$/,c={bitLength:256,isLe:!0};var d=(0,o.default)("chainCode"),l=(0,o.default)("isHard");class f{constructor(){Object.defineProperty(this,d,{writable:!0,value:new Uint8Array(32)}),Object.defineProperty(this,l,{writable:!0,value:!1})}static from(e){const t=new f,[r,n]=e.startsWith("/")?[e.substr(1),!0]:[e,!1];return t.soft(s.test(r)?parseInt(r,10):r),n?t.harden():t}get chainCode(){return(0,a.default)(this,d)[d]}get isHard(){return(0,a.default)(this,l)[l]}get isSoft(){return!(0,a.default)(this,l)[l]}hard(e){return this.soft(e).harden()}harden(){return(0,a.default)(this,l)[l]=!0,this}soft(e){return(0,u.isNumber)(e)||(0,u.isBn)(e)||(0,u.isBigInt)(e)?this.soft((0,u.bnToHex)(e,c)):(0,u.isString)(e)?(0,u.isHex)(e)?this.soft((0,u.hexToU8a)(e)):this.soft((0,u.compactAddLength)((0,u.stringToU8a)(e))):e.length>32?this.soft((0,i.default)(e)):((0,a.default)(this,d)[d].fill(0),(0,a.default)(this,d)[d].set(e,0),this)}soften(){return(0,a.default)(this,l)[l]=!1,this}}t.default=f},1436:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const t=e.match(u);(0,a.assert)(!(0,a.isNull)(t),"Unable to match provided value to a secret URI");const[,r,,n,,,i]=t,{path:s}=(0,o.default)(n);return{password:i,path:s,phrase:r}};var a=r(3),o=n(r(756));const u=/^(\w+( \w+)*)((\/\/?[^/]+)*)(\/\/\/(.*))?$/},1437:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){const n=i[r];return t.reduce((e,t)=>n(e,t),e)};var a=n(r(757)),o=n(r(1439)),u=n(r(762));const i={ecdsa:u.default,ed25519:a.default,ethereum:u.default,sr25519:o.default}},1439:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,{chainCode:t,isSoft:r}){return r?(0,o.default)(e,t):(0,a.default)(e,t)};var a=n(r(759)),o=n(r(761))},1440:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return(0,o.default)((0,a.u8aConcat)(u,e,t),256)};var a=r(3),o=n(r(158));const u=(0,a.compactAddLength)((0,a.stringToU8a)("Secp256k1HDKD"))},1441:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return(0,n.sr25519DerivePublicSoft)(e,t)},r(97);var n=r(57)},1442:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,o.default)((0,a.sr25519KeypairFromSeed)(e))},r(97);var a=r(57),o=n(r(505))},1443:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,{publicKey:t,secretKey:r}){(0,n.assert)(32===(null==t?void 0:t.length),"Expected a valid publicKey, 32-bytes"),(0,n.assert)(64===(null==r?void 0:r.length),"Expected a valid secretKey, 64-bytes");const o=(0,n.u8aToU8a)(e);return(0,a.sr25519Sign)(t,r,o)},r(97);var n=r(3),a=r(57)},1444:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){return(0,o.default)((0,u.default)((0,a.default)(e),t),r)};var a=n(r(159)),o=n(r(296)),u=n(r(754))},1445:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){return(0,a.default)((0,o.default)(e,t),r)};var a=n(r(296)),o=n(r(753))},1446:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return(0,a.u8aEq)((0,o.default)(e),(0,o.default)(t))};var a=r(3),o=n(r(159))},1447:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){a.default.prefix=e};var a=n(r(295))},1448:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return(0,a.u8aSorted)(e.map(e=>(0,o.default)(e))).map(e=>(0,u.default)(e,t))};var a=r(3),o=n(r(159)),u=n(r(296))},1449:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"base32Decode",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"base32Encode",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"base32Validate",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"isBase32",{enumerable:!0,get:function(){return i.default}});var a=n(r(1450)),o=n(r(1451)),u=n(r(507)),i=n(r(1452))},1450:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t=!1){(0,u.default)(e,t);const r=new Uint8Array((e.length-(t?1:0))*o.BITS_PER_CHAR/8|0);let n=0,s=0,c=0;for(let a=t?1:0;a<e.length;++a)s=s<<o.BITS_PER_CHAR|i[e[a]],n+=o.BITS_PER_CHAR,n>=8&&(n-=8,r[c++]=255&s>>n);return(0,a.assert)(!(n>=o.BITS_PER_CHAR||255&s<<8-n),"Unexpected end of data"),r};var a=r(3),o=r(506),u=n(r(507));const i=o.BASE32_ALPHABET.split("").reduce((e,t,r)=>(e[t]=r,e),{})},1451:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t=!1){const r=(0,n.u8aToU8a)(e);let u="",i=0,s=0;for(let e=0;e<r.length;++e)for(s=s<<8|r[e],i+=8;i>a.BITS_PER_CHAR;)i-=a.BITS_PER_CHAR,u+=a.BASE32_ALPHABET[o&s>>i];i&&(u+=a.BASE32_ALPHABET[o&s<<a.BITS_PER_CHAR-i]);return t?"b"+u:u};var n=r(3),a=r(506);const o=(1<<a.BITS_PER_CHAR)-1},1452:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){try{return(0,a.default)(e)}catch(e){return!1}};var a=n(r(507))},1453:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"base58Decode",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"base58Encode",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"base58Validate",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"isBase58",{enumerable:!0,get:function(){return i.default}});var a=n(r(501)),o=n(r(766)),u=n(r(361)),i=n(r(1454))},1454:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){try{return(0,a.default)(e,t)}catch(e){return!1}};var a=n(r(361))},1455:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"base64Decode",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"base64Encode",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"base64Pad",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"base64Trim",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"base64Validate",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"isBase64",{enumerable:!0,get:function(){return c.default}});var a=n(r(1456)),o=n(r(1457)),u=n(r(1458)),i=n(r(1459)),s=n(r(508)),c=n(r(1460))},1456:function(e,t,r){"use strict";(function(e){var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(t){return(0,o.default)(t),(0,a.bufferToU8a)(e.from(t,"base64"))};var a=r(3),o=n(r(508))}).call(this,r(36).Buffer)},1457:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,n.u8aToBuffer)((0,n.u8aToU8a)(e)).toString("base64")};var n=r(3)},1458:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e.padEnd(e.length+e.length%4,"=")}},1459:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){for(;e.length&&"="===e[e.length-1];)e=e.slice(0,-1);return e}},1460:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){try{return(0,a.default)(e)}catch(e){return!1}};var a=n(r(508))},1461:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t=256){return(0,a.u8aToHex)((0,o.default)(e,t))};var a=r(3),o=n(r(158))},1462:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ethereumEncode",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"isEthereumAddress",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"isEthereumChecksum",{enumerable:!0,get:function(){return u.default}});var a=n(r(1463)),o=n(r(1470)),u=n(r(773))},1463:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if(!e)return"0x";const t=(0,n.u8aToU8a)(e);(0,n.assert)([20,32,33,65].includes(t.length),"Invalid address or publicKey passed");const r=(0,n.u8aToHex)(function(e){[33,65].includes(e.length)&&(e=(0,a.keccakAsU8a)((0,o.secp256k1Expand)(e)));return e.slice(-20)}(t),-1,!1),u=(0,n.u8aToHex)((0,a.keccakAsU8a)(r),-1,!1);let i="";for(let e=0;e<40;e++)i=`${i}${parseInt(u[e],16)>7?r[e].toUpperCase():r[e]}`;return"0x"+i};var n=r(3),a=r(362),o=r(769)},1464:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,a.u8aToHex)((0,o.default)(e))};var a=r(3),o=n(r(768))},1467:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,o.assert)([33,65].includes(e.length),"Invalid publicKey provided"),new Uint8Array(u.keyFromPublic(e).getPublic().encodeCompressed())};var a=n(r(139)),o=r(3);const u=new(0,a.default.ec)("secp256k1")},1468:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){return new Uint8Array(a.recoverPubKey(e,{r:t.slice(0,32),s:t.slice(32,64)},r).encode(null,!0))};const a=new(0,n(r(139)).default.ec)("secp256k1")},1469:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,{secretKey:t},r="blake2"){(0,o.assert)(32===(null==t?void 0:t.length),"Expected valid secp256k1 secretKey, 32-bytes");const n=i.keyFromPrivate(t).sign((0,u.default)(r,e));return(0,o.u8aConcat)((0,o.bnToU8a)(n.r,{bitLength:256,isLe:!1}),(0,o.bnToU8a)(n.s,{bitLength:256,isLe:!1}),new Uint8Array([n.recoveryParam||0]))};var a=n(r(139)),o=r(3),u=n(r(772));const i=new(0,a.default.ec)("secp256k1")},1470:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if(!e||42!==e.length||!(0,a.isHex)(e))return!1;if(/^(0x)?[0-9a-f]{40}$/.test(e)||/^(0x)?[0-9A-F]{40}$/.test(e))return!0;return(0,o.default)(e)};var a=r(3),o=n(r(773))},1471:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"mnemonicToBip39",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"mnemonicGenerate",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"mnemonicToEntropy",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"mnemonicToMiniSecret",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"mnemonicValidate",{enumerable:!0,get:function(){return s.default}}),r(97);var a=n(r(1472)),o=n(r(1481)),u=n(r(775)),i=n(r(1482)),s=n(r(1483))},1472:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t=""){return(0,o.isReady)()?(0,o.bip39ToSeed)(e,t):(0,a.bufferToU8a)((0,n.mnemonicToSeedSync)(e,t)).subarray(0,32)};var n=r(363),a=r(3),o=r(57)},1481:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e=12){return(0,a.isReady)()?(0,a.bip39Generate)(e):(0,n.generateMnemonic)(o[e])},r(97);var n=r(363),a=r(57);const o={12:128,15:160,18:192,21:224,24:256}},1482:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t=""){if((0,u.isReady)())return(0,u.bip39ToMiniSecret)(e,t);const r=(0,o.u8aToBuffer)((0,i.default)(e)),n=(0,o.u8aToBuffer)((0,o.stringToU8a)("mnemonic"+t));return(0,o.bufferToU8a)((0,a.pbkdf2Sync)(r,n,2048,64,"sha512")).slice(0,32)},r(97);var a=r(291),o=r(3),u=r(57),i=n(r(775))},1483:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,a.isReady)()?(0,a.bip39Validate)(e):(0,n.validateMnemonic)(e)},r(97);var n=r(363),a=r(57)},1484:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"naclDecrypt",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"deriveHard",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"naclEncrypt",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"naclKeypairFromRandom",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"naclKeypairFromSecret",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"naclKeypairFromSeed",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"naclKeypairFromString",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"naclSign",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"naclVerify",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(t,"naclBoxKeypairFromSecret",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(t,"naclOpen",{enumerable:!0,get:function(){return b.default}}),Object.defineProperty(t,"naclSeal",{enumerable:!0,get:function(){return y.default}});var a=n(r(1485)),o=n(r(758)),u=n(r(1486)),i=n(r(1487)),s=n(r(1488)),c=n(r(504)),d=n(r(1489)),l=n(r(1490)),f=n(r(776)),p=n(r(1491)),b=n(r(1492)),y=n(r(1493))},1485:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){return a.default.secretbox.open(e,t,r)||null};var a=n(r(112))},1486:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r=(0,o.default)(24)){return{encrypted:a.default.secretbox(e,r,t),nonce:r}};var a=n(r(112)),o=n(r(239))},1487:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return a.default.sign.keyPair()};var a=n(r(112))},1488:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return a.default.sign.keyPair.fromSecretKey(e)};var a=n(r(112))},1489:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,u.default)((0,o.default)((0,a.stringToU8a)(e),256))};var a=r(3),o=n(r(158)),u=n(r(504))},1490:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,{publicKey:t,secretKey:r}){(0,o.assert)(r,"Expected a valid secretKey");const n=(0,o.u8aToU8a)(e);return(0,u.isReady)()?(0,u.ed25519Sign)(t,r.subarray(0,32),n):a.default.sign.detached(n,r)};var a=n(r(112)),o=r(3),u=r(57)},1491:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return a.default.box.keyPair.fromSecretKey(e.slice(0,32))};var a=n(r(112))},1492:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r,n){return a.default.box.open(e,t,r,n)||null};var a=n(r(112))},1493:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r,n=(0,o.default)(24)){return{nonce:n,sealed:a.default.box(e,n,r,t)}};var a=n(r(112)),o=n(r(239))},1494:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"pbkdf2Encode",{enumerable:!0,get:function(){return a.default}});var a=n(r(1495))},1495:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t=(0,i.default)(),r=2048){const n=(0,o.u8aToU8a)(e);return{password:(0,u.isReady)()?(0,u.pbkdf2)(n,t,r):(0,o.bufferToU8a)((0,a.pbkdf2Sync)((0,o.u8aToBuffer)(n),(0,o.u8aToBuffer)(t),r,64)),rounds:r,salt:t}};var a=r(291),o=r(3),u=r(57),i=n(r(239))},1496:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"randomAsHex",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"randomAsNumber",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"randomAsU8a",{enumerable:!0,get:function(){return u.default}});var a=n(r(777)),o=n(r(1497)),u=n(r(239))},1497:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return(0,o.hexToBn)((0,u.default)(8)).and(i).toNumber()};var a=n(r(18)),o=r(3),u=n(r(777));const i=new a.default(9007199254740991)},1498:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"scryptEncode",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"scryptFromU8a",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"scryptToU8a",{enumerable:!0,get:function(){return u.default}});var a=n(r(1499)),o=n(r(1503)),u=n(r(1504))},1499:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t=(0,i.default)(),r=s.DEFAULT_PARAMS){const n=(0,u.isReady)()?(0,u.scrypt)((0,o.u8aToU8a)(e),t,Math.log2(r.N),r.r,r.p):(0,o.bufferToU8a)((0,a.default)((0,o.u8aToBuffer)((0,o.u8aToU8a)(e)),(0,o.u8aToBuffer)(t),r.N,r.r,r.p,64));return{params:r,password:n,salt:t}};var a=n(r(1500)),o=r(3),u=r(57),i=n(r(239)),s=r(779)},1503:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const t=e.subarray(0,32),r=(0,n.u8aToBn)(e.subarray(32,36),{isLe:!0}).toNumber(),o=(0,n.u8aToBn)(e.subarray(36,40),{isLe:!0}).toNumber(),u=(0,n.u8aToBn)(e.subarray(40,44),{isLe:!0}).toNumber();return(0,n.assert)(r===a.DEFAULT_PARAMS.N&&o===a.DEFAULT_PARAMS.p&&u===a.DEFAULT_PARAMS.r,"Invalid injected scrypt params found"),{params:{N:r,p:o,r:u},salt:t}};var n=r(3),a=r(779)},1504:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,{N:t,p:r,r:a}){return(0,n.u8aConcat)(e,(0,n.bnToU8a)(t,{bitLength:32,isLe:!0}),(0,n.bnToU8a)(r,{bitLength:32,isLe:!0}),(0,n.bnToU8a)(a,{bitLength:32,isLe:!0}))};var n=r(3)},1505:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"sha512AsU8a",{enumerable:!0,get:function(){return a.default}});var a=n(r(1506))},1506:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,o.isReady)()?(0,o.sha512)(e):a.default.hash(e)};var a=n(r(112)),o=r(57)},1507:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"signatureVerify",{enumerable:!0,get:function(){return a.default}});var a=n(r(1508))},1508:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){const n=(0,a.u8aToU8a)(t);(0,a.assert)([64,65,66].includes(n.length),"Invalid signature length, expected [64..66] bytes, found "+n.length);const l={crypto:"none",isValid:!1},f=(0,o.default)(r);return[0,1,2].includes(n[0])&&[65,66].includes(n.length)?function(e,t,r,n){(0,a.assert)([0,1,2].includes(r[0]),"Unknown crypto type, expected signature prefix [0..2], found "+r[0]),e.crypto=d[r[0]]||"none";try{e.isValid={ecdsa:()=>(0,s.default)(t,r.subarray(1),n,"blake2"),ed25519:()=>(0,u.default)(t,r.subarray(1),n),ethereum:()=>(0,s.default)(t,r.subarray(1),n,"keccak"),none:()=>{throw Error("no verify for `none` crypto type")},sr25519:()=>(0,i.default)(t,r.subarray(1),n)}[e.crypto]()}catch(e){}return e}(l,e,n,f):function(e,t,r,n){return e.isValid=c.some(([a,o])=>{try{if(o(t,r,n))return e.crypto=a,!0}catch(e){}return!1}),e}(l,e,n,f)};var a=r(3),o=n(r(159)),u=n(r(776)),i=n(r(765)),s=n(r(771));const c=[["ed25519",u.default],["sr25519",i.default],["ecdsa",(e,t,r)=>(0,s.default)(e,t,r,"blake2")],["ethereum",(e,t,r)=>(0,s.default)(e,t,r,"keccak")]],d=["ed25519","sr25519","ecdsa","ethereum"]},1509:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"xxhashAsHex",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"xxhashAsU8a",{enumerable:!0,get:function(){return o.default}});var a=n(r(1510)),o=n(r(780))},1510:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t=64){return(0,a.u8aToHex)((0,o.default)(e,t))};var a=r(3),o=n(r(780))},1511:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return new a.default((0,o.default)(e,t),16)};var a=n(r(18)),o=n(r(1512))},1512:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return(0,a.default)(e,t).toString(16)};var a=n(r(1513))},1513:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if((0,o.isBuffer)(e)||(0,o.isString)(e))return a.default.h64(e,t);return a.default.h64((0,o.u8aToBuffer)(e),t)};var a=n(r(1514)),o=r(3)},158:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t=256,r=null,n=!1){const i=Math.ceil(t/8);return(0,u.isReady)()&&!n?(0,u.blake2b)((0,o.u8aToU8a)(e),(0,o.u8aToU8a)(r),i):a.default.blake2b((0,o.u8aToU8a)(e),r,i)};var a=n(r(1430)),o=r(3),u=r(57)},159:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r=99){if((0,a.isU8a)(e)||(0,a.isHex)(e))return(0,a.u8aToU8a)(e);const n=t=>`Decoding ${e}: ${t}`;let s;try{s=(0,o.default)(e)}catch(e){throw new Error(n(e.message))}(0,a.assert)(i.default.allowedEncodedLengths.includes(s.length),n("Invalid decoded address length"));const[c,d]=(0,u.default)(s);return(0,a.assert)(t||c,n("Invalid decoded address checksum")),s.slice(1,d)};var a=r(3),o=n(r(501)),u=n(r(503)),i=n(r(295))},1818:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return a(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const u=o(r(518)),i={...Object.values(u).reduce((e,{types:t})=>({...e,...t}),{}),"voting::VoteType":"VoteType","voting::TallyType":"TallyType","voting::Tally":"VotingTally",CompactAssignments:"CompactAssignmentsTo257",ContractExecResult:"ContractExecResultTo255",RefCount:"RefCountTo259"};t.default={types:i,typesAlias:{voting:{Tally:"VotingTally"}}}},1819:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={types:{ProposalRecord:{index:"u32",author:"AccountId",stage:"VoteStage",transition_time:"u32",title:"Text",contents:"Text",vote_id:"u64"},ProposalContents:"Bytes",ProposalTitle:"Bytes"}}},1820:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={types:{Balance2:"u128"}}},1821:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={types:{VoteStage:{_enum:["PreVoting","Commit","Voting","Completed"]},VoteType:{_enum:["Binary","MultiOption","RankedChoice"]},TallyType:{_enum:["OnePerson","OneCoin"]},VoteOutcome:"[u8; 32]",VotingTally:"Option<Vec<(VoteOutcome, u128)>>",VoteData:{initiator:"AccountId",stage:"VoteStage",vote_type:"VoteType",tally_type:"TallyType",is_commit_reveal:"bool"},Commitments:"Vec<(AccountId, VoteOutcome)>",Reveals:"Vec<(AccountId, Vec<VoteOutcome>)>",VoteRecord:{id:"u64",commitments:"Commitments",reveals:"Reveals",data:"VoteData",outcomes:"Vec<VoteOutcome>"}}}},1822:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return a(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const u=o(r(518)),i={...Object.values(u).reduce((e,{types:t})=>({...e,...t}),{}),"voting::VoteType":"VoteType","voting::TallyType":"TallyType","voting::Tally":"VotingTally"};t.default={types:i,typesAlias:{voting:{Tally:"VotingTally"}}}},1823:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return a(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const u=o(r(518)),i={...Object.values(u).reduce((e,{types:t})=>({...e,...t}),{}),"voting::VoteType":"VoteType","voting::TallyType":"TallyType","voting::Tally":"VotingTally"};t.default={types:i,typesAlias:{voting:{Tally:"VotingTally"}}}},1824:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||t.hasOwnProperty(r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),a(r(1825),t)},1825:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||t.hasOwnProperty(r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),a(r(1826),t),a(r(1827),t),a(r(1828),t)},1826:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},1827:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},1828:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},1832:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0});var a={accounts:!0,auctionManager:!0,cdpEngine:!0,dex:!0,homa:!0,loans:!0,nomineesElection:!0,primitives:!0,stakingPool:!0,support:!0,runtime:!0,incentives:!0};Object.defineProperty(t,"accounts",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"auctionManager",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"cdpEngine",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"dex",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"homa",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"loans",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"nomineesElection",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(t,"primitives",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(t,"stakingPool",{enumerable:!0,get:function(){return b.default}}),Object.defineProperty(t,"support",{enumerable:!0,get:function(){return y.default}}),Object.defineProperty(t,"runtime",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(t,"incentives",{enumerable:!0,get:function(){return v.default}});var o=r(821);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(a,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))}));var u=n(r(1840)),i=n(r(1841)),s=n(r(1842)),c=n(r(1843)),d=n(r(1844)),l=n(r(1845)),f=n(r(1846)),p=n(r(1847)),b=n(r(1848)),y=n(r(1849)),h=n(r(1850)),v=n(r(1851))},1833:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={rpc:{},types:{CallOf:"Call"}}},1834:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={rpc:{},types:{StorageValue:"Vec<u8>",GraduallyUpdate:{key:"StorageKey",targetValue:"StorageValue",perBlock:"StorageValue"}}}},1835:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={rpc:{getValue:{description:"Retrieves the oracle value for a given key.",params:[{name:"DataProviderId",type:"DataProviderId"},{name:"key",type:"OracleKey"}],type:"Option<TimestampedValue>"},getAllValues:{description:"Retrieves all oracle values.",params:[{name:"DataProviderId",type:"DataProviderId"}],type:"Vec<(OracleKey, Option<TimestampedValue>)>"}},types:{DataProviderId:"u8",TimestampedValue:{value:"OracleValue",timestamp:"Moment"},TimestampedValueOf:"TimestampedValue",OrderedSet:"Vec<AccountId>"}}},1836:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={rpc:{},types:{OrmlAccountData:{free:"Balance",frozen:"Balance",reserved:"Balance"},OrmlBalanceLock:{amount:"Balance",id:"LockIdentifier"}},typesAlias:{tokens:{AccountData:"OrmlAccountData",BalanceLock:"OrmlBalanceLock"}}}},1837:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={rpc:{},types:{AuctionInfo:{bid:"Option<(AccountId, Balance)>",start:"BlockNumber",end:"Option<BlockNumber>"},DelayedDispatchTime:{_enum:{At:"BlockNumber",After:"BlockNumber"}},DispatchId:"u32",Price:"FixedU128"}}},1838:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={rpc:{},types:{OrmlVestingSchedule:{start:"BlockNumber",period:"BlockNumber",periodCount:"u32",perPeriod:"Compact<Balance>"},VestingScheduleOf:"OrmlVestingSchedule"}}},1839:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={rpc:{},types:{PoolInfo:{totalShares:"Compact<Share>",totalRewards:"Compact<Balance>",totalWithdrawnRewards:"Compact<Balance>"},Share:"u128"}}},1840:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={rpc:{},types:{PalletBalanceOf:"Balance"}}},1841:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={rpc:{},types:{CollateralAuctionItem:{refundRecipient:"AccountId",currencyId:"CurrencyId",initialAmount:"Compact<Balance>",amount:"Compact<Balance>",target:"Compact<Balance>",startTime:"BlockNumber"},DebitAuctionItem:{initialAmount:"Compact<Balance>",amount:"Compact<Balance>",fix:"Compact<Balance>",startTime:"BlockNumber"},SurplusAuctionItem:{amount:"Compact<Balance>",startTime:"BlockNumber"}}}},1842:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={rpc:{},types:{LiquidationStrategy:{_enum:["Auction","Exchange"]},OptionRate:"Option<Rate>",OptionRatio:"Option<Ratio>",ChangeOptionRate:{_enum:{NoChange:"Null",NewValue:"OptionRate"}},ChangeOptionRatio:{_enum:{NoChange:"Null",NewValue:"OptionRatio"}},ChangeBalance:{_enum:{NoChange:"Null",NewValue:"Balance"}},RiskManagementParams:{maximumTotalDebitValue:"Balance",stabilityFee:"Option<Rate>",liquidationRatio:"Option<Rate>",liquidationPenalty:"Option<Rate>",requiredCollateralRatio:"Option<Rate>"}}}},1843:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={rpc:{getSupplyAmount:{description:"Get supply amount",params:[{name:"supplyCurrencyId",type:"CurrencyId"},{name:"targetCurrencyId",type:"CurrencyId"},{name:"targetCurrencyAmount",type:"BalanceRequest"}],type:"BalanceWrapper"},getTargetAmount:{description:"Get target amount",params:[{name:"supplyCurrencyId",type:"CurrencyId"},{name:"targetCurrencyId",type:"CurrencyId"},{name:"supplyCurrencyAmount",type:"BalanceRequest"}],type:"BalanceWrapper"}},types:{BalanceWrapper:{amount:"Balance"},BalanceRequest:{amount:"Balance"}}}},1844:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={rpc:{},types:{RedeemStrategy:{_enum:{Immediately:"Null",Target:"EraIndex",WaitForUnbonding:"Null"}}}}},1845:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={rpc:{},types:{Position:{collateral:"Balance",debit:"Balance"}}}},1846:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={rpc:{},types:{HomaUnlockChunk:{value:"Compact<Balance>",era:"Compact<EraIndex>"},BondingLedger:{total:"Compact<Balance>",active:"Compact<Balance>",unlocking:"Vec<UnlockChunk>"}},typesAlias:{nomineesElection:{UnlockChunk:"HomaUnlockChunk"}}}},1847:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={rpc:{},types:{CurrencyId:{_enum:["ACA","AUSD","DOT","XBTC","LDOT","RENBTC"]},AirDropCurrencyId:{_enum:["KAR","ACA"]},DataProviderId:{_enum:["Aggregated","Acala","Band"]}}}},1848:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={rpc:{getAvailableUnbonded:{description:"Get Available Unbonded",params:[{name:"account",type:"AccountId"}],type:"BalanceInfo"},getLiquidStakingExchangeRate:{description:"get liquid staking exchange rate",params:[],type:"ExchangeRate"}},types:{BalanceInfo:{amount:"Balance"},StakingBalance:"Balance",LiquidBalance:"Balance",StakingBalanceOf:"StakingBalance",LiquidBalanceOf:"LiquidBalance",PolkadotAccountId:"AccountId",PolkadotAccountIdOf:"PolkadotAccountId"}}},1849:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={rpc:{},types:{ExchangeRate:"FixedU128",Rate:"FixedU128",Ratio:"FixedU128"}}},1850:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={types:{AuctionId:"u32",AuctionIdOf:"AuctionId",CurrencyIdOf:"CurrencyId",Amount:"i128",AmountOf:"Amount",DebitAmount:"Amount",DebitAmountOf:"DebitAmount",DebitBalance:"Balance",DebitBalanceOf:"Balance",OracleKey:"CurrencyId",OracleValue:"Price",Share:"u128"}}},1851:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={rpc:{},types:{PoolId:{_enum:{Loans:"CurrencyId",DexIncentive:"CurrencyId",DexSaving:"CurrencyId",Homa:"Null"}}}}},1865:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0});var a={margin:!0,runtime:!0,synthetic:!0};Object.defineProperty(t,"margin",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"runtime",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"synthetic",{enumerable:!0,get:function(){return s.default}});var o=r(821);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(a,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))}));var u=n(r(1866)),i=n(r(1867)),s=n(r(1868))},1866:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={rpc:{poolState:{description:"",params:[{name:"pool_id",type:"u32"},{name:"at",type:"BlockHash",isOptional:!0}],type:"MarginPoolState"},traderState:{description:"",params:[{name:"who",type:"AccountId"},{name:"pool_id",type:"LiquidityPoolId"},{name:"at",type:"BlockHash",isOptional:!0}],type:"MarginTraderState"}},types:{MarginPoolState:{enp:"FixedI128",ell:"FixedI128",required_deposit:"FixedI128"},MarginTraderState:{equity:"FixedI128",margin_held:"FixedI128",margin_level:"FixedI128",free_margin:"FixedI128",unrealized_pl:"FixedI128"}}}},1867:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={rpc:{},types:{CurrencyId:{_enum:["LAMI","AUSD","FEUR","FJPY","FBTC","FETH","FAUD","FCAD","FCHF","FXAU","FOIL","FGBP"]},Leverage:{_enum:["LongTwo","LongThree","LongFive","LongTen","LongTwenty","LongThirty","LongFifty","LongReserved","ShortTwo","ShortThree","ShortFive","ShortTen","ShortTwenty","ShortThirty","ShortFifty","ShortReserved"]},SwapRate:{long:"Rate",short:"Rate"},CurrencyIdOf:"CurrencyId",Amount:"FixedI128",AmountOf:"Amount",OracleKey:"CurrencyId",OracleValue:"Price",LiquidityPoolId:"u32",Leverages:{_set:{_bitLength:16,LongTwo:1,LongThree:2,LongFive:4,LongTen:8,LongTwenty:16,LongThirty:32,LongFifty:64,LongReserved:128,ShortTwo:256,ShortThree:512,ShortFive:1024,ShortTen:2048,ShortTwenty:4096,ShortThirty:8192,ShortFifty:16384,ShortReserved:32768}},TradingPair:{base:"CurrencyId",quote:"CurrencyId"},AccumulateConfig:{frequency:"Moment",offset:"Moment"},IdentityDepositBalanceOf:"Balance",Pool:{owner:"AccountId",balance:"Balance"},MarginTradingPairOption:{enabled:"bool",maxSpread:"Option<FixedU128>",swapRate:"SwapRate",accumulateConfig:"Option<AccumulateConfig>"},MarginPoolOption:{additionalSwapRate:"FixedI128",minLeveragedAmount:"FixedU128"},MarginPoolTradingPairOption:{enabled:"bool",bidSpread:"Option<FixedU128>",askSpread:"Option<FixedU128>",enabledTrades:"Leverages"},SyntheticPoolCurrencyOption:{bidSpread:"Option<FixedU128>",askSpread:"Option<FixedU128>",additionalCollateralRatio:"Option<Permill>",syntheticEnabled:"bool"},MarginPosition:{owner:"AccountId",poolId:"LiquidityPoolId",pair:"TradingPair",leverage:"Leverage",leveragedHeld:"FixedI128",leveragedDebits:"FixedI128",openAccumulatedSwapRate:"Rate",marginHeld:"FixedI128"},SyntheticPosition:{collateral:"FixedU128",synthetic:"FixedU128"},RiskThreshold:{marginCall:"Permill",stopOut:"Permill"},PositionId:"u64",Rate:"FixedI128",PoolTraderInfo:{positionNum:"PositionId",long:"PairInfo",short:"PairInfo"},PairInfo:{baseAmount:"FixedI128",quoteAmount:"FixedI128"},TradingPairRiskThreshold:{trader:"Option<RiskThreshold>",enp:"Option<RiskThreshold>",ell:"Option<RiskThreshold>"},SyntheticTokensRatio:{extreme:"Option<Permill>",liquidation:"Option<Permill>",collateral:"Option<Permill>"},PositionsSnapshot:{positionsCount:"PositionId",long:"LeveragedAmounts",short:"LeveragedAmounts"},LeveragedAmounts:{held:"FixedI128",debits:"FixedI128"},LiquidityPoolIdentityInfo:{legalName:"Vec<u8>",displayName:"Vec<u8>",web:"Vec<u8>",email:"Vec<u8>",image_url:"Vec<u8>"}}}},1868:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={rpc:{poolState:{description:"",params:[{name:"pool_id",type:"u32"},{name:"currency_id",type:"CurrencyId"}],type:"SyntheticPoolState"}},types:{SyntheticPoolState:{collateral_ratio:"FixedI128",is_safe:"boolean"}}}},1876:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"subsocial",{enumerable:!0,get:function(){return a.default}});var a=n(r(1877))},1877:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={types:{Address:"AccountId",LookupSource:"AccountId",RefCount:"u8",IpfsCid:"Text",DonationId:"u64",DonationRecipient:{_enum:{Account:"AccountId",Space:"SpaceId",Post:"PostId"}},Donation:{id:"DonationId",created:"WhoAndWhen",recipient:"DonationRecipient",donation_wallet:"AccountId",amount:"Balance",comment_id:"Option<PostId>"},DonationSettings:{donations_allowed:"bool",min_amount:"Option<Balance>",max_amount:"Option<Balance>"},DonationSettingsUpdate:{donations_allowed:"Option<bool>",min_amount:"Option<Option<Balance>>",max_amount:"Option<Option<Balance>>"},DropId:"u64",Drop:{id:"DropId",first_drop_at:"BlockNumber",total_dropped:"Balance"},FaucetSettings:{period:"Option<BlockNumber>",period_limit:"Balance"},FaucetSettingsUpdate:{period:"Option<Option<BlockNumber>>",period_limit:"Option<Balance>"},ReportId:"u64",EntityId:{_enum:{Content:"Content",Account:"AccountId",Space:"SpaceId",Post:"PostId"}},EntityStatus:{_enum:["Allowed","Blocked"]},Report:{id:"ReportId",created:"WhoAndWhen",reported_entity:"EntityId",reported_within:"SpaceId",reason:"Content"},SuggestedStatus:{suggested:"WhoAndWhen",status:"Option<EntityStatus>",report_id:"Option<ReportId>"},SpaceModerationSettings:{autoblock_threshold:"Option<u16>"},SpaceModerationSettingsUpdate:{autoblock_threshold:"Option<Option<u16>>"},SpacePermissionSet:"BTreeSet<SpacePermission>",SpacePermission:{_enum:["ManageRoles","RepresentSpaceInternally","RepresentSpaceExternally","UpdateSpace","CreateSubspaces","UpdateOwnSubspaces","DeleteOwnSubspaces","HideOwnSubspaces","UpdateAnySubspace","DeleteAnySubspace","HideAnySubspace","CreatePosts","UpdateOwnPosts","DeleteOwnPosts","HideOwnPosts","UpdateAnyPost","DeleteAnyPost","HideAnyPost","CreateComments","UpdateOwnComments","DeleteOwnComments","HideOwnComments","HideAnyComment","Upvote","Downvote","Share","OverrideSubspacePermissions","OverridePostPermissions","SuggestEntityStatus","UpdateEntityStatus","UpdateSpaceSettings"]},SpacePermissions:{none:"Option<SpacePermissionSet>",everyone:"Option<SpacePermissionSet>",follower:"Option<SpacePermissionSet>",space_owner:"Option<SpacePermissionSet>"},SpacePermissionsContext:{space_id:"SpaceId",is_space_owner:"bool",is_space_follower:"bool",space_perms:"Option<SpacePermissions>"},PostHistoryRecord:{edited:"WhoAndWhen",old_data:"PostUpdate"},PostId:"u64",Post:{id:"PostId",created:"WhoAndWhen",updated:"Option<WhoAndWhen>",owner:"AccountId",extension:"PostExtension",space_id:"Option<SpaceId>",content:"Content",hidden:"bool",replies_count:"u16",hidden_replies_count:"u16",shares_count:"u16",upvotes_count:"u16",downvotes_count:"u16",score:"i32"},PostUpdate:{space_id:"Option<SpaceId>",content:"Option<Content>",hidden:"Option<bool>"},PostExtension:{_enum:{RegularPost:"Null",Comment:"Comment",SharedPost:"PostId"}},Comment:{parent_id:"Option<PostId>",root_post_id:"PostId"},ProfileHistoryRecord:{edited:"WhoAndWhen",old_data:"ProfileUpdate"},SocialAccount:{followers_count:"u32",following_accounts_count:"u16",following_spaces_count:"u16",reputation:"u32",profile:"Option<Profile>"},Profile:{created:"WhoAndWhen",updated:"Option<WhoAndWhen>",content:"Content"},ProfileUpdate:{content:"Option<Content>"},ReactionId:"u64",ReactionKind:{_enum:["Upvote","Downvote"]},Reaction:{id:"ReactionId",created:"WhoAndWhen",updated:"Option<WhoAndWhen>",kind:"ReactionKind"},RoleId:"u64",Role:{created:"WhoAndWhen",updated:"Option<WhoAndWhen>",id:"RoleId",space_id:"SpaceId",disabled:"bool",expires_at:"Option<BlockNumber>",content:"Content",permissions:"SpacePermissionSet"},RoleUpdate:{disabled:"Option<bool>",content:"Option<Content>",permissions:"Option<SpacePermissionSet>"},ScoringAction:{_enum:["UpvotePost","DownvotePost","SharePost","CreateComment","UpvoteComment","DownvoteComment","ShareComment","FollowSpace","FollowAccount"]},SessionKey:{created:"WhoAndWhen",updated:"Option<WhoAndWhen>",expires_at:"BlockNumber",limit:"Option<Balance>",spent:"Balance"},SpaceHistoryRecord:{edited:"WhoAndWhen",old_data:"SpaceUpdate"},Space:{id:"SpaceId",created:"WhoAndWhen",updated:"Option<WhoAndWhen>",owner:"AccountId",parent_id:"Option<SpaceId>",handle:"Option<Text>",content:"Content",hidden:"bool",posts_count:"u32",hidden_posts_count:"u32",followers_count:"u32",score:"i32",permissions:"Option<SpacePermissions>"},SpaceUpdate:{parent_id:"Option<Option<SpaceId>>",handle:"Option<Option<Text>>",content:"Option<Content>",hidden:"Option<bool>",permissions:"Option<Option<SpacePermissions>>"},SubscriptionPlanId:"u64",SubscriptionId:"u64",SubscriptionPeriod:{_enum:{Daily:"Null",Weekly:"Null",Monthly:"Null",Quarterly:"Null",Yearly:"Null",Custom:"BlockNumber"}},SubscriptionPlan:{id:"SubscriptionPlanId",created:"WhoAndWhen",updated:"Option<WhoAndWhen>",is_active:"bool",content:"Content",space_id:"SpaceId",wallet:"Option<AccountId>",price:"Balance",period:"SubscriptionPeriod"},Subscription:{id:"SubscriptionPlanId",created:"WhoAndWhen",updated:"Option<WhoAndWhen>",is_active:"bool",wallet:"Option<AccountId>",plan_id:"SubscriptionPlanId"},SpaceId:"u64",WhoAndWhen:{account:"AccountId",block:"BlockNumber",time:"Moment"},User:{_enum:{Account:"AccountId",Space:"SpaceId"}},Content:{_enum:{None:"Null",Raw:"Text",IPFS:"Text",Hyper:"Text"}}}}},1879:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.documentReadyPromise=function(e){return new Promise(t=>{["complete","interactive"].includes(document.readyState)?t(e()):window.addEventListener("load",()=>{t(e())})})}},1881:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Keyring=void 0;var a=n(r(8)),o=n(r(28)),u=n(r(29)),i=n(r(523)),s=n(r(822)),c=r(3),d=r(23),l=n(r(525)),f=n(r(1885)),p=r(370),b=n(r(825));function y(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function h(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?y(Object(r),!0).forEach((function(t){(0,a.default)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):y(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var v=(0,u.default)("stores");class g extends f.default{constructor(...e){super(...e),Object.defineProperty(this,v,{writable:!0,value:{account:()=>this.accounts,address:()=>this.addresses,contract:()=>this.contracts}})}addExternal(e,t={}){const r=this.keyring.addFromAddress(e,h(h({},t),{},{isExternal:!0}),null);return{json:this.saveAccount(r),pair:r}}addHardware(e,t,r={}){return this.addExternal(e,h(h({},r),{},{hardwareType:t,isHardware:!0}))}addMultisig(e,t,r={}){const n=(0,d.createKeyMulti)(e,t),a=(0,c.u8aSorted)(e.map(e=>this.decodeAddress(e))).map(e=>this.encodeAddress(e));return this.addExternal(n,h(h({},r),{},{isMultisig:!0,threshold:(0,c.bnToBn)(t).toNumber(),who:a}))}addPair(e,t){return this.keyring.addPair(e),{json:this.saveAccount(e,t),pair:e}}addUri(e,t,r={},n){const a=this.keyring.addFromUri(e,r,n);return{json:this.saveAccount(a,t),pair:a}}backupAccount(e,t){return e.isLocked||e.lock(),e.decodePkcs8(t),e.toJson(t)}createFromJson(e,t={}){return this.keyring.createFromJson(h(h({},e),{},{meta:h(h({},e.meta||{}),{},{meta:t})}))}createFromUri(e,t={},r){return this.keyring.createFromUri(e,t,r)}encryptAccount(e,t){const r=e.toJson(t);r.meta.whenEdited=Date.now(),this.keyring.addFromJson(r),this.accounts.add(this._store,e.address,r)}forgetAccount(e){this.keyring.removePair(e),this.accounts.remove(this._store,e)}forgetAddress(e){this.addresses.remove(this._store,e)}forgetContract(e){this.contracts.remove(this._store,e)}getAccount(e){return this.getAddress(e,"account")}getAccounts(){const e=this.accounts.subject.getValue();return Object.keys(e).map(e=>this.getAddress(e,"account")).filter(e=>l.default.isDevelopment()||!0!==e.meta.isTesting)}getAddress(e,t=null){const r=(0,c.isString)(e)?e:this.encodeAddress(e),n=this.decodeAddress(r),a=(t?[(0,o.default)(this,v)[v][t]]:Object.values((0,o.default)(this,v)[v])).reduce((e,t)=>t().subject.getValue()[r]||e,void 0);return a&&{address:r,meta:a.json.meta,publicKey:n}}getAddresses(){const e=this.addresses.subject.getValue();return Object.keys(e).map(e=>this.getAddress(e))}getContract(e){return this.getAddress(e,"contract")}getContracts(){const e=this.contracts.subject.getValue();return Object.entries(e).filter(([,{json:{meta:{contract:e}}}])=>!!e&&e.genesisHash===this.genesisHash).map(([e])=>this.getContract(e))}rewriteKey(e,t,r,n){"0x"!==r.substr(0,2)&&(this._store.remove(t),this._store.set(n(r),e))}loadAccount(e,t){if(!e.meta.isTesting&&e.encoded){const t=this.keyring.addFromJson(e,!0);this.accounts.add(this._store,t.address,e)}const[,r]=t.split(":");this.rewriteKey(e,t,r.trim(),p.accountKey)}loadAddress(e,t){const{isRecent:r,whenCreated:n=0}=e.meta;if(r&&Date.now()-n>86400)return void this._store.remove(t);const a=this.encodeAddress((0,c.isHex)(e.address)?(0,c.hexToU8a)(e.address):this.decodeAddress(e.address,!0)),[,o]=t.split(":");this.addresses.add(this._store,a,e),this.rewriteKey(e,t,o,p.addressKey)}loadContract(e,t){const r=this.encodeAddress(this.decodeAddress(e.address)),[,n]=t.split(":");e.meta.genesisHash=e.meta.genesisHash||e.meta.contract&&e.meta.contract.genesisHash,this.contracts.add(this._store,r,e),this.rewriteKey(e,t,n,p.contractKey)}loadInjected(e,t){const r={address:e,meta:h(h({},t),{},{isInjected:!0})},n=this.keyring.addFromAddress(e,r.meta);this.accounts.add(this._store,n.address,r)}allowGenesis(e){if(e&&e.meta&&this.genesisHash){const t=Object.values(s.default).find(e=>e.includes(this.genesisHash||""))||[this.genesisHash];if(e.meta.genesisHash)return t.includes(e.meta.genesisHash);if(e.meta.contract)return t.includes(e.meta.contract.genesisHash)}return!0}loadAll(e,t=[]){super.initKeyring(e),this._store.all((t,r)=>{e.filter&&!e.filter(r)||this.allowGenesis(r)&&(p.accountRegex.test(t)?this.loadAccount(r,t):p.addressRegex.test(t)?this.loadAddress(r,t):p.contractRegex.test(t)&&this.loadContract(r,t))}),t.forEach(e=>{this.allowGenesis(e)&&this.loadInjected(e.address,e.meta)}),b.default.init(this)}restoreAccount(e,t){const r=Array.isArray(e.encoding.content)?e.encoding.content[1]:"ed25519",n=Array.isArray(e.encoding.type)?e.encoding.type:[e.encoding.type],a=(0,i.default)({toSS58:this.encodeAddress,type:r},{publicKey:this.decodeAddress(e.address,!0)},e.meta,(0,c.isHex)(e.encoded)?(0,c.hexToU8a)(e.encoded):(0,d.base64Decode)(e.encoded),n);return a.decodePkcs8(t),this.addPair(a,t),a.lock(),a}saveAccount(e,t){this.addTimestamp(e);const r=e.toJson(t);return this.keyring.addFromJson(r),this.accounts.add(this._store,e.address,r),r}saveAccountMeta(e,t){const r=e.address;this._store.get((0,p.accountKey)(r),n=>{e.setMeta(t),n.meta=e.meta,this.accounts.add(this._store,r,n)})}saveAddress(e,t,r="address"){const n=this.addresses.subject.getValue(),a=n[e]&&n[e].json||{address:e,meta:{isRecent:void 0,whenCreated:Date.now()}};return Object.keys(t).forEach(e=>{a.meta[e]=t[e]}),delete a.meta.isRecent,(0,o.default)(this,v)[v][r]().add(this._store,e,a),a}saveContract(e,t){return this.saveAddress(e,t,"contract")}saveRecent(e){return this.addresses.subject.getValue()[e]||this.addresses.add(this._store,e,{address:e,meta:{genesisHash:this.genesisHash,isRecent:!0,whenCreated:Date.now()}}),this.addresses.subject.getValue()[e]}}t.Keyring=g;var m=new g;t.default=m},1882:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r=o.ENCODING){(0,n.assert)(t,"No encrypted data available to decode"),(0,n.assert)(e||!r.includes("xsalsa20-poly1305"),"Password required to decode encypted data");let i=t;if(e){let u;if(r.includes("scrypt")){const{params:r,salt:n}=(0,a.scryptFromU8a)(t);u=(0,a.scryptEncode)(e,n,r).password,t=t.subarray(o.SCRYPT_LENGTH)}else u=(0,n.stringToU8a)(e);i=(0,a.naclDecrypt)(t.subarray(o.NONCE_LENGTH),t.subarray(0,o.NONCE_LENGTH),(0,n.u8aFixLength)(u,256,!0))}return(0,n.assert)(i,"Unable to decode using the supplied passphrase"),function(e){const t=e.subarray(0,o.PKCS8_HEADER.length);(0,n.assert)(t.toString()===o.PKCS8_HEADER.toString(),"Invalid Pkcs8 header found in body");let r=e.subarray(u,u+o.SEC_LENGTH),a=u+o.SEC_LENGTH,i=e.subarray(a,a+o.PKCS8_DIVIDER.length);i.toString()!==o.PKCS8_DIVIDER.toString()&&(a=u+o.SEED_LENGTH,r=e.subarray(u,a),i=e.subarray(a,a+o.PKCS8_DIVIDER.length));(0,n.assert)(i.toString()===o.PKCS8_DIVIDER.toString(),"Invalid Pkcs8 divider found in body");const s=a+o.PKCS8_DIVIDER.length;return{publicKey:e.subarray(s,s+o.PUB_LENGTH),secretKey:r}}(i)};var n=r(3),a=r(23),o=r(524);const u=o.PKCS8_HEADER.length},1883:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function({publicKey:e,secretKey:t},r){(0,n.assert)(t,"Expected a valid secretKey to be passed to encode");const u=(0,n.u8aConcat)(o.PKCS8_HEADER,t,o.PKCS8_DIVIDER,e);if(!r)return u;const{params:i,password:s,salt:c}=(0,a.scryptEncode)(r),{encrypted:d,nonce:l}=(0,a.naclEncrypt)(u,s.subarray(0,32));return(0,n.u8aConcat)((0,a.scryptToU8a)(c,i),l,d)};var n=r(3),a=r(23),o=r(524)},1884:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,{address:t,meta:r},u,i){return{address:t,encoded:(0,n.base64Encode)(u),encoding:{content:["pkcs8",e],type:i?a.ENCODING:o,version:"3"},meta:r}};var n=r(23),a=r(524);const o=["none"]},1885:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(28)),o=n(r(29)),u=n(r(1886)),i=r(3),s=n(r(527)),c=n(r(529)),d=n(r(530)),l=n(r(525)),f=n(r(1890)),p=(0,o.default)("accounts"),b=(0,o.default)("addresses"),y=(0,o.default)("contracts"),h=(0,o.default)("keyring");t.default=class{constructor(){Object.defineProperty(this,p,{writable:!0,value:void 0}),Object.defineProperty(this,b,{writable:!0,value:void 0}),Object.defineProperty(this,y,{writable:!0,value:void 0}),Object.defineProperty(this,h,{writable:!0,value:void 0}),this._store=void 0,this._genesisHash=void 0,this.decodeAddress=(e,t,r)=>this.keyring.decodeAddress(e,t,r),this.encodeAddress=(e,t)=>this.keyring.encodeAddress(e,t),(0,a.default)(this,p)[p]=s.default,(0,a.default)(this,b)[b]=c.default,(0,a.default)(this,y)[y]=d.default,this._store=new f.default}get accounts(){return(0,a.default)(this,p)[p]}get addresses(){return(0,a.default)(this,b)[b]}get contracts(){return(0,a.default)(this,y)[y]}get keyring(){if((0,a.default)(this,h)[h])return(0,a.default)(this,h)[h];throw new Error("Keyring should be initialised via 'loadAll' before use")}get genesisHash(){return this._genesisHash}getPair(e){return this.keyring.getPair(e)}getPairs(){return this.keyring.getPairs().filter(e=>l.default.isDevelopment()||!0!==e.meta.isTesting)}isAvailable(e){const t=this.accounts.subject.getValue(),r=this.addresses.subject.getValue(),n=this.contracts.subject.getValue(),a=(0,i.isString)(e)?e:this.encodeAddress(e);return!t[a]&&!r[a]&&!n[a]}isPassValid(e){return e.length>0}setSS58Format(e){(0,a.default)(this,h)[h]&&e&&(0,a.default)(this,h)[h].setSS58Format(e)}setDevMode(e){l.default.set(e)}initKeyring(e){const t=(0,u.default)(e,!0);(0,i.isBoolean)(e.isDevelopment)&&this.setDevMode(e.isDevelopment),(0,a.default)(this,h)[h]=t,this._genesisHash=e.genesisHash&&e.genesisHash.toHex(),this._store=e.store||this._store,this.addAccountPairs()}addAccountPairs(){this.keyring.getPairs().forEach(({address:e,meta:t})=>{this.accounts.add(this._store,e,{address:e,meta:t})})}addTimestamp(e){e.meta.whenCreated||e.setMeta({whenCreated:Date.now()})}}},1886:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e={},t=!0){const r=new u.default(e);return i.forEach(({name:n,publicKey:a,secretKey:u,seed:i,type:s="sr25519"})=>{const c={isTesting:!0,name:n||i.replace("//","_").toLowerCase()};(t||n?r.addPair((0,o.default)({toSS58:r.encodeAddress,type:s},{publicKey:a,secretKey:u},c)):r.addFromUri(i,c,e.type)).lock=()=>{}}),r},t.PAIRS=void 0;var a=r(3),o=n(r(523)),u=n(r(526));const i=[{publicKey:(0,a.hexToU8a)("0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d"),secretKey:(0,a.hexToU8a)("0x98319d4ff8a9508c4bb0cf0b5a78d760a0b2082c02775e6e82370816fedfff48925a225d97aa00682d6a59b95b18780c10d7032336e88f3442b42361f4a66011"),seed:"Alice"},{publicKey:(0,a.hexToU8a)("0xbe5ddb1579b72e84524fc29e78609e3caf42e85aa118ebfe0b0ad404b5bdd25f"),secretKey:(0,a.hexToU8a)("0xe8da6c9d810e020f5e3c7f5af2dea314cbeaa0d72bc6421e92c0808a0c584a6046ab28e97c3ffc77fe12b5a4d37e8cd4afbfebbf2391ffc7cb07c0f38c023efd"),seed:"Alice//stash"},{publicKey:(0,a.hexToU8a)("0x8eaf04151687736326c9fea17e25fc5287613693c912909cb226aa4794f26a48"),secretKey:(0,a.hexToU8a)("0x081ff694633e255136bdb456c20a5fc8fed21f8b964c11bb17ff534ce80ebd5941ae88f85d0c1bfc37be41c904e1dfc01de8c8067b0d6d5df25dd1ac0894a325"),seed:"Bob"},{publicKey:(0,a.hexToU8a)("0xfe65717dad0447d715f660a0a58411de509b42e6efb8375f562f58a554d5860e"),secretKey:(0,a.hexToU8a)("0xc006507cdfc267a21532394c49ca9b754ca71de21e15a1cdf807c7ceab6d0b6c3ed408d9d35311540dcd54931933e67cf1ea10d46f75408f82b789d9bd212fde"),seed:"Bob//stash"},{publicKey:(0,a.hexToU8a)("0x90b5ab205c6974c9ea841be688864633dc9ca8a357843eeacf2314649965fe22"),secretKey:(0,a.hexToU8a)("0xa8f2d83016052e5d6d77b2f6fd5d59418922a09024cda701b3c34369ec43a7668faf12ff39cd4e5d92bb773972f41a7a5279ebc2ed92264bed8f47d344f8f18c"),seed:"Charlie"},{publicKey:(0,a.hexToU8a)("0x306721211d5404bd9da88e0204360a1a9ab8b87c66c1bc2fcdd37f3c2222cc20"),secretKey:(0,a.hexToU8a)("0x20e05482ca4677e0edbc58ae9a3a59f6ed3b1a9484ba17e64d6fe8688b2b7b5d108c4487b9323b98b11fe36cb301b084e920f7b7895536809a6d62a451b25568"),seed:"Dave"},{publicKey:(0,a.hexToU8a)("0xe659a7a1628cdd93febc04a4e0646ea20e9f5f0ce097d9a05290d4a9e054df4e"),secretKey:(0,a.hexToU8a)("0x683576abfd5dc35273e4264c23095a1bf21c14517bece57c7f0cc5c0ed4ce06a3dbf386b7828f348abe15d76973a72009e6ef86a5c91db2990cb36bb657c6587"),seed:"Eve"},{publicKey:(0,a.hexToU8a)("0x1cbd2d43530a44705ad088af313e18f80b53ef16b36177cd4b77b846f2a5f07c"),secretKey:(0,a.hexToU8a)("0xb835c20f450079cf4f513900ae9faf8df06ad86c681884122c752a4b2bf74d4303e4f21bc6cc62bb4eeed5a9cce642c25e2d2ac1464093b50f6196d78e3a7426"),seed:"Ferdie"}];t.PAIRS=i},1887:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(28)),o=n(r(29)),u=r(3),i=r(23),s=r(823),c=n(r(523)),d=n(r(1888));const l={ecdsa:e=>(0,i.secp256k1KeypairFromSeed)(e),ed25519:e=>(0,i.naclKeypairFromSeed)(e),ethereum:e=>(0,i.secp256k1KeypairFromSeed)(e),sr25519:e=>(0,i.schnorrkelKeypairFromSeed)(e)};var f=(0,o.default)("pairs"),p=(0,o.default)("type"),b=(0,o.default)("ss58");t.default=class{constructor(e={}){Object.defineProperty(this,f,{writable:!0,value:void 0}),Object.defineProperty(this,p,{writable:!0,value:void 0}),Object.defineProperty(this,b,{writable:!0,value:void 0}),this.decodeAddress=i.decodeAddress,this.encodeAddress=(e,t)=>(0,i.encodeAddress)(e,(0,u.isUndefined)(t)?(0,a.default)(this,b)[b]:t),e.type=e.type||"ed25519",(0,u.assert)(e&&["ecdsa","ethereum","ed25519","sr25519"].includes(e.type||"undefined"),"Expected a keyring type of either 'ed25519', 'sr25519' or 'ecdsa', found '"+e.type),(0,a.default)(this,f)[f]=new d.default,(0,a.default)(this,b)[b]=e.ss58Format,(0,a.default)(this,p)[p]=e.type}get pairs(){return this.getPairs()}get publicKeys(){return this.getPublicKeys()}get type(){return(0,a.default)(this,p)[p]}addPair(e){return(0,a.default)(this,f)[f].add(e)}addFromAddress(e,t={},r=null,n=this.type,a,o){const u=this.decodeAddress(e,a);return this.addPair((0,c.default)({toSS58:this.encodeAddress,type:n},{publicKey:u,secretKey:new Uint8Array},t,r,o))}addFromJson(e,t){return this.addPair(this.createFromJson(e,t))}addFromMnemonic(e,t={},r=this.type){return this.addFromUri(e,t,r)}addFromSeed(e,t={},r=this.type){return this.addPair((0,c.default)({toSS58:this.encodeAddress,type:r},l[r](e),t,null))}addFromUri(e,t={},r=this.type){return this.addPair(this.createFromUri(e,t,r))}createFromJson({address:e,encoded:t,encoding:{content:r,type:n,version:a},meta:o},s){const d="0"!==a&&Array.isArray(r)?r[1]:this.type,l=Array.isArray(n)?n:[n],f=(0,u.isHex)(e)?(0,u.hexToU8a)(e):this.decodeAddress(e,s),p=(0,u.isHex)(t)?(0,u.hexToU8a)(t):(0,i.base64Decode)(t);return(0,c.default)({toSS58:this.encodeAddress,type:d},{publicKey:f,secretKey:new Uint8Array},o,p,l)}createFromUri(e,t={},r=this.type){const n=e.startsWith("//")?`${s.DEV_PHRASE}${e}`:e,{password:a,path:o,phrase:d}=(0,i.keyExtractSuri)(n);let f;if((0,u.isHex)(d,256))f=(0,u.hexToU8a)(d);else{const e=d,t=e.split(" ");[12,15,18,21,24].includes(t.length)?f="ethereum"===r?(0,i.mnemonicToBip39)(d):(0,i.mnemonicToMiniSecret)(d,a):((0,u.assert)(e.length<=32,"specified phrase is not a valid mnemonic and is invalid as a raw seed at > 32 bytes"),f=(0,u.stringToU8a)(e.padEnd(32)))}const p=(0,i.keyFromPath)(l[r](f),o,r);return(0,c.default)({toSS58:this.encodeAddress,type:r},p,t,null)}getPair(e){return(0,a.default)(this,f)[f].get(e)}getPairs(){return(0,a.default)(this,f)[f].all()}getPublicKeys(){return(0,a.default)(this,f)[f].all().map(({publicKey:e})=>e)}removePair(e){(0,a.default)(this,f)[f].remove(e)}setSS58Format(e){(0,a.default)(this,b)[b]=e}toJson(e,t){return(0,a.default)(this,f)[f].get(e).toJson(t)}}},1888:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(28)),o=n(r(29)),u=r(3),i=r(23),s=(0,o.default)("map");t.default=class{constructor(){Object.defineProperty(this,s,{writable:!0,value:{}})}add(e){return(0,a.default)(this,s)[s][(0,i.decodeAddress)(e.address).toString()]=e,e}all(){return Object.values((0,a.default)(this,s)[s])}get(e){const t=(0,a.default)(this,s)[s][(0,i.decodeAddress)(e).toString()];return(0,u.assert)(t,()=>`Unable to retrieve keypair '${(0,u.isU8a)(e)||(0,u.isHex)(e)?(0,u.u8aToHex)((0,u.u8aToU8a)(e)):e}'`),t}remove(e){delete(0,a.default)(this,s)[s][(0,i.decodeAddress)(e).toString()]}}},1889:function(e){e.exports=JSON.parse('{"name":"@polkadot/keyring","version":"3.5.1","description":"Keyring management","main":"index.js","publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"repository":{"type":"git","url":"git+https://github.com/polkadot-js/common.git"},"keywords":["Polkadot","Keyring","ed25519"],"author":"Jaco Greeff <jacogr@gmail.com>","maintainers":["Jaco Greeff <jacogr@gmail.com>"],"contributors":[],"license":"Apache-2.0","bugs":{"url":"https://github.com/polkadot-js/common/issues"},"homepage":"https://github.com/polkadot-js/common/tree/master/packages/keyring#readme","dependencies":{"@babel/runtime":"^7.11.2","@polkadot/util":"3.5.1","@polkadot/util-crypto":"3.5.1"}}')},1890:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(137));t.default=class{all(e){a.default.each((t,r)=>{e(r,t)})}get(e,t){t(a.default.get(e))}remove(e,t){a.default.remove(e),t&&t()}set(e,t,r){a.default.set(e,t),r&&r()}}},1891:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(16),o=r(13),u=n(r(527)),i=n(r(529)),s=n(r(530)),c=(0,a.combineLatest)(u.default.subject,i.default.subject,s.default.subject).pipe((0,o.map)(([e,t,r])=>({accounts:e,addresses:t,contracts:r})));t.default=c},1892:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.LEDGER_DEFAULT_INDEX=t.LEDGER_DEFAULT_CHANGE=t.LEDGER_DEFAULT_ACCOUNT=void 0;var a=n(r(28)),o=n(r(29)),u=r(1893),i=r(3),s=n(r(1899)),c=n(r(1900));t.LEDGER_DEFAULT_ACCOUNT=2147483648;t.LEDGER_DEFAULT_CHANGE=2147483648;t.LEDGER_DEFAULT_INDEX=2147483648;const d=s.default.concat(c.default),l={kusama:u.newKusamaApp,polkadot:u.newPolkadotApp};var f=(0,o.default)("app"),p=(0,o.default)("chain"),b=(0,o.default)("transport");t.default=class{constructor(e,t){Object.defineProperty(this,f,{writable:!0,value:null}),Object.defineProperty(this,p,{writable:!0,value:void 0}),Object.defineProperty(this,b,{writable:!0,value:void 0}),(0,i.assert)(["hid","webusb"].includes(e),"Unsupported transport "+e),(0,i.assert)(Object.keys(l).includes(t),"Unsupported chain "+t),(0,a.default)(this,p)[p]=t,(0,a.default)(this,b)[b]=e}async _getApp(){if(!(0,a.default)(this,f)[f]){const e=d.find(({type:e})=>e===(0,a.default)(this,b)[b]);(0,i.assert)(e,"Unable to find a transport for "+(0,a.default)(this,b)[b]);const t=await e.create();(0,a.default)(this,f)[f]=l[(0,a.default)(this,p)[p]](t)}return(0,a.default)(this,f)[f]}async _withApp(e){try{const t=await this._getApp();return await e(t)}catch(e){throw(0,a.default)(this,f)[f]=null,e}}async _wrapError(e){const t=await e;return(0,i.assert)(36864===t.return_code,t.error_message),t}async getAddress(e=!1,t=0,r=0,{account:n=2147483648,addressIndex:a=2147483648,change:o=2147483648}={}){return this._withApp(async u=>{const{address:i,pubKey:s}=await this._wrapError(u.getAddress(n+t,o,a+r,e));return{address:i,publicKey:"0x"+s}})}async getVersion(){return this._withApp(async e=>{const{device_locked:t,major:r,minor:n,patch:a,test_mode:o}=await this._wrapError(e.getVersion());return{isLocked:t,isTestMode:o,version:[r,n,a]}})}async sign(e,t=0,r=0,{account:n=2147483648,addressIndex:a=2147483648,change:o=2147483648}={}){return this._withApp(async u=>{const s=(0,i.u8aToBuffer)(e),{signature:c}=await this._wrapError(u.sign(n+t,o,a+r,s));return{signature:(0,i.u8aToHex)((0,i.bufferToU8a)(c))}})}}},1893:function(e,t,r){"use strict";(function(t){var n=r(0),a=n(r(243)),o=n(r(826)),u=n(r(827)),i=n(r(49)),s=n(r(51)),c=r(1897),d=r(1898),l=1,f=2,p=144,b=145,y=146,h=147,v=function(){function e(t,r,n){if((0,i.default)(this,e),!t)throw new Error("Transport has not been defined");this.transport=t,this.cla=r,this.slip0044=n}var r,n,d,v,g,m,_,O,P,j;return(0,s.default)(e,[{key:"getVersion",value:(j=(0,u.default)(o.default.mark((function e(){return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,(0,c.getVersion)(this.transport,this.cla);case 3:return e.abrupt("return",e.sent);case 6:return e.prev=6,e.t0=e.catch(0),e.abrupt("return",(0,c.processErrorResponse)(e.t0));case 9:case"end":return e.stop()}}),e,this,[[0,6]])}))),function(){return j.apply(this,arguments)})},{key:"appInfo",value:(P=(0,u.default)(o.default.mark((function e(){return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.transport.send(176,1,0,0).then((function(e){var t=e.slice(-2),r=256*t[0]+t[1],n={},a="err",o="err",u=0,i=0;if(1!==e[0])n.error_message="response format ID not recognized",n.return_code=36865;else{var s=e[1];a=e.slice(2,2+s).toString("ascii");var d=2+s,l=e[d];d+=1,o=e.slice(d,d+l).toString("ascii"),u=e[d+=l],i=e[d+=1]}return{return_code:r,error_message:(0,c.errorCodeToString)(r),appName:a,appVersion:o,flagLen:u,flagsValue:i,flag_recovery:0!=(1&i),flag_signed_mcu_code:0!=(2&i),flag_onboarded:0!=(4&i),flag_pin_validated:0!=(128&i)}}),c.processErrorResponse));case 1:case"end":return e.stop()}}),e,this)}))),function(){return P.apply(this,arguments)})},{key:"getAddress",value:(O=(0,u.default)(o.default.mark((function t(r,n,a){var u,i,s,d=arguments;return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return u=d.length>3&&void 0!==d[3]&&d[3],i=e.serializePath(this.slip0044,r,n,a),s=0,u&&(s=1),t.abrupt("return",this.transport.send(this.cla,l,s,0,i).then((function(e){var t=e.slice(-2),r=256*t[0]+t[1];return{pubKey:e.slice(0,32).toString("hex"),address:e.slice(32,e.length-2).toString("ascii"),return_code:r,error_message:(0,c.errorCodeToString)(r)}}),c.processErrorResponse));case 5:case"end":return t.stop()}}),t,this)}))),function(e,t,r){return O.apply(this,arguments)})},{key:"signSendChunk",value:(_=(0,u.default)(o.default.mark((function e(t,r,n){var a;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=c.PAYLOAD_TYPE.ADD,1===t&&(a=c.PAYLOAD_TYPE.INIT),t===r&&(a=c.PAYLOAD_TYPE.LAST),e.abrupt("return",this.transport.send(this.cla,f,a,0,n,[c.ERROR_CODE.NoError,27012,27264]).then((function(e){var t=e.slice(-2),r=256*t[0]+t[1],n=(0,c.errorCodeToString)(r),a=null;return 27264===r||27012===r?n=e.slice(0,e.length-2).toString("ascii"):e.length>2&&(a=e.slice(0,e.length-2)),{signature:a,return_code:r,error_message:n}}),c.processErrorResponse));case 4:case"end":return e.stop()}}),e,this)}))),function(e,t,r){return _.apply(this,arguments)})},{key:"sign",value:(m=(0,u.default)(o.default.mark((function t(r,n,a,i){var s,d=this;return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return s=e.signGetChunks(this.slip0044,r,n,a,i),t.abrupt("return",this.signSendChunk(1,s.length,s[0]).then(function(){var e=(0,u.default)(o.default.mark((function e(t){var r;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=1;case 1:if(!(r<s.length)){e.next=10;break}return e.next=4,d.signSendChunk(1+r,s.length,s[r]);case 4:if((t=e.sent).return_code===c.ERROR_CODE.NoError){e.next=7;break}return e.abrupt("break",10);case 7:r+=1,e.next=1;break;case 10:return e.abrupt("return",{return_code:t.return_code,error_message:t.error_message,signature:t.signature});case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),c.processErrorResponse));case 2:case"end":return t.stop()}}),t,this)}))),function(e,t,r,n){return m.apply(this,arguments)})},{key:"getAllowlistPubKey",value:(g=(0,u.default)(o.default.mark((function e(){return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.transport.send(this.cla,p,0,0).then((function(e){var t=e.slice(-2),r=256*t[0]+t[1];console.log(e);var n=e.slice(0,32);return 34!==e.length?{return_code:27012,error_message:(0,c.errorCodeToString)(27012)}:{return_code:r,error_message:(0,c.errorCodeToString)(r),pubkey:n}}),c.processErrorResponse));case 1:case"end":return e.stop()}}),e,this)}))),function(){return g.apply(this,arguments)})},{key:"setAllowlistPubKey",value:(v=(0,u.default)(o.default.mark((function e(t){return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.transport.send(this.cla,b,0,0,t).then((function(e){var t=e.slice(-2),r=256*t[0]+t[1];return{return_code:r,error_message:(0,c.errorCodeToString)(r)}}),c.processErrorResponse));case 1:case"end":return e.stop()}}),e,this)}))),function(e){return v.apply(this,arguments)})},{key:"getAllowlistHash",value:(d=(0,u.default)(o.default.mark((function e(){return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.transport.send(this.cla,y,0,0).then((function(e){var t=e.slice(-2),r=256*t[0]+t[1];console.log(e);var n=e.slice(0,32);return 34!==e.length?{return_code:27012,error_message:(0,c.errorCodeToString)(27012)}:{return_code:r,error_message:(0,c.errorCodeToString)(r),hash:n}}),c.processErrorResponse));case 1:case"end":return e.stop()}}),e,this)}))),function(){return d.apply(this,arguments)})},{key:"uploadSendChunk",value:(n=(0,u.default)(o.default.mark((function e(t,r,n){var a;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=c.PAYLOAD_TYPE.ADD,1===t&&(a=c.PAYLOAD_TYPE.INIT),t===r&&(a=c.PAYLOAD_TYPE.LAST),e.abrupt("return",this.transport.send(this.cla,h,a,0,n,[c.ERROR_CODE.NoError]).then((function(e){var t=e.slice(-2),r=256*t[0]+t[1];return{return_code:r,error_message:(0,c.errorCodeToString)(r)}}),c.processErrorResponse));case 4:case"end":return e.stop()}}),e,this)}))),function(e,t,r){return n.apply(this,arguments)})},{key:"uploadAllowlist",value:(r=(0,u.default)(o.default.mark((function r(n){var i,s=this;return o.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return(i=[]).push(t.from([0])),i.push.apply(i,(0,a.default)(e.GetChunks(n))),r.abrupt("return",this.uploadSendChunk(1,i.length,i[0]).then(function(){var e=(0,u.default)(o.default.mark((function e(t){var r;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.return_code===c.ERROR_CODE.NoError){e.next=2;break}return e.abrupt("return",{return_code:t.return_code,error_message:t.error_message});case 2:r=1;case 3:if(!(r<i.length)){e.next=12;break}return e.next=6,s.uploadSendChunk(1+r,i.length,i[r]);case 6:if((t=e.sent).return_code===c.ERROR_CODE.NoError){e.next=9;break}return e.abrupt("break",12);case 9:r+=1,e.next=3;break;case 12:return e.abrupt("return",{return_code:t.return_code,error_message:t.error_message});case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),c.processErrorResponse));case 4:case"end":return r.stop()}}),r,this)}))),function(e){return r.apply(this,arguments)})}],[{key:"serializePath",value:function(e,r,n,a){if(!Number.isInteger(r))throw new Error("Input must be an integer");if(!Number.isInteger(n))throw new Error("Input must be an integer");if(!Number.isInteger(a))throw new Error("Input must be an integer");var o=t.alloc(20);return o.writeUInt32LE(2147483692,0),o.writeUInt32LE(e,4),o.writeUInt32LE(r,8),o.writeUInt32LE(n,12),o.writeUInt32LE(a,16),o}},{key:"GetChunks",value:function(e){for(var r=[],n=t.from(e),a=0;a<n.length;a+=c.CHUNK_SIZE){var o=a+c.CHUNK_SIZE;a>n.length&&(o=n.length),r.push(n.slice(a,o))}return r}},{key:"signGetChunks",value:function(t,r,n,o,u){var i=[],s=e.serializePath(t,r,n,o);return i.push(s),i.push.apply(i,(0,a.default)(e.GetChunks(u))),i}}]),e}();e.exports={newKusamaApp:function(e){return new v(e,d.CLA.KUSAMA,d.SLIP0044.KUSAMA)},newPolkadotApp:function(e){return new v(e,d.CLA.POLKADOT,d.SLIP0044.POLKADOT)}}}).call(this,r(36).Buffer)},1897:function(e,t,r){"use strict";var n=r(0),a=n(r(826)),o=n(r(827)),u=n(r(101)),i={GET_VERSION:0},s={1:"U2F: Unknown",2:"U2F: Bad request",3:"U2F: Configuration unsupported",4:"U2F: Device Ineligible",5:"U2F: Timeout",14:"Timeout",36864:"No errors",36865:"Device is busy",26626:"Error deriving keys",25600:"Execution Error",26368:"Wrong Length",27010:"Empty Buffer",27011:"Output buffer too small",27012:"Data is invalid",27013:"Conditions not satisfied",27014:"Transaction rejected",27264:"Bad key handle",27392:"Invalid P1/P2",27904:"Instruction not supported",28160:"App does not seem to be open",28416:"Unknown error",28417:"Sign/verify error"};function c(e){return e in s?s[e]:"Unknown Status Code: ".concat(e)}function d(e){if(e){if(t=e,!("object"!==(0,u.default)(t)||null===t||t instanceof Array||t instanceof Date)){if(Object.prototype.hasOwnProperty.call(e,"statusCode"))return{return_code:e.statusCode,error_message:c(e.statusCode)};if(Object.prototype.hasOwnProperty.call(e,"return_code")&&Object.prototype.hasOwnProperty.call(e,"error_message"))return e}return{return_code:65535,error_message:e.toString()}}var t;return{return_code:65535,error_message:e.toString()}}function l(){return(l=(0,o.default)(a.default.mark((function e(t,r){return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",t.send(r,i.GET_VERSION,0,0).then((function(e){var t=e.slice(-2),r=256*t[0]+t[1];if(14!==e.length)return{return_code:27012,error_message:c(27012)};var n=256*e[1]+e[2],a=256*e[3]+e[4],o=256*e[5]+e[6],u=1===e[7],i=(e[8]<<24)+(e[9]<<16)+(e[10]<<8)+(e[11]<<0);return{return_code:r,error_message:c(r),test_mode:0!==e[0],major:n,minor:a,patch:o,deviceLocked:u,target_id:i.toString(16)}}),d));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}e.exports={CHUNK_SIZE:250,INS:i,PAYLOAD_TYPE:{INIT:0,ADD:1,LAST:2},P1_VALUES:{ONLY_RETRIEVE:0,SHOW_ADDRESS_IN_DEVICE:1},ERROR_CODE:{NoError:36864},getVersion:function(e,t){return l.apply(this,arguments)},processErrorResponse:d,errorCodeToString:c}},1898:function(e,t,r){"use strict";e.exports={CLA:{KUSAMA:153,POLKADOT:144},SLIP0044:{KUSAMA:2147484082,POLKADOT:2147484002}}},1899:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=[];t.default=n},1900:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(1901));var o=[{create:()=>a.default.create(),type:"webusb"}];t.default=o},1901:function(e,t,r){"use strict";r.r(t),function(e){r.d(t,"default",(function(){return d}));var n=r(1012),a=r(1013),o=r.n(a),u=r(272),i=r(615),s=r(65),c=r(274);class d extends n.a{constructor(t,r){super(),this.device=void 0,this.deviceModel=void 0,this.channel=Math.floor(65535*Math.random()),this.packetSize=64,this.interfaceNumber=void 0,this._disconnectEmitted=!1,this._emitDisconnect=e=>{this._disconnectEmitted||(this._disconnectEmitted=!0,this.emit("disconnect",e))},this.exchange=t=>this.exchangeAtomicImpl(async()=>{const{channel:r,packetSize:n}=this;Object(i.a)("apdu","=> "+t.toString("hex"));const a=o()(r,n),u=a.makeBlocks(t);for(let e=0;e<u.length;e++)await this.device.transferOut(3,u[e]);let s,c;for(;!(s=a.getReducedResult(c));){const t=await this.device.transferIn(3,n),r=e.from(t.data.buffer);c=a.reduceResponse(c,r)}return Object(i.a)("apdu","<= "+s.toString("hex")),s}).catch(e=>{if(e&&e.message&&e.message.includes("disconnected"))throw this._emitDisconnect(e),new s.DisconnectedDeviceDuringOperation(e.message);throw e}),this.device=t,this.interfaceNumber=r,this.deviceModel=Object(u.a)(t.productId)}static async request(){const e=await Object(c.d)();return d.open(e)}static async openConnected(){const e=await Object(c.b)();return 0===e.length?null:d.open(e[0])}static async open(e){await e.open(),null===e.configuration&&await e.selectConfiguration(1),await e.reset();const t=e.configurations[0].interfaces.find(({alternates:e})=>e.some(e=>255===e.interfaceClass));if(!t)throw new s.TransportInterfaceNotAvailable("No WebUSB interface found for your Ledger device. Please upgrade firmware or contact techsupport.");const r=t.interfaceNumber;try{await e.claimInterface(r)}catch(t){throw await e.close(),new s.TransportInterfaceNotAvailable(t.message)}const n=new d(e,r),a=t=>{e===t.device&&(navigator.usb.removeEventListener("disconnect",a),n._emitDisconnect(new s.DisconnectedDevice))};return navigator.usb.addEventListener("disconnect",a),n}async close(){await this.exchangeBusyPromise,await this.device.releaseInterface(this.interfaceNumber),await this.device.reset(),await this.device.close()}setScrambleKey(){}}d.isSupported=c.c,d.list=c.b,d.listen=e=>{let t=!1;return Object(c.a)().then(r=>{if(!t){const t=Object(u.a)(r.productId);e.next({type:"add",descriptor:r,deviceModel:t}),e.complete()}},t=>{window.DOMException&&t instanceof window.DOMException&&18===t.code?e.error(new s.TransportWebUSBGestureRequired(t.message)):e.error(new s.TransportOpenUserCancelled(t.message))}),{unsubscribe:function(){t=!0}}}}.call(this,r(36).Buffer)},1902:function(e){e.exports=JSON.parse('{"name":"@polkadot/ui-keyring","version":"0.60.1","main":"index.js","repository":"https://github.com/polkadot-js/apps.git","author":"Jaco Greeff <jacogr@gmail.com>","maintainers":["Jaco Greeff <jacogr@gmail.com>"],"contributors":[],"license":"Apache-2.0","browser":{"./ledger/transportsNode":"./ledger/transportsEmpty"},"react-native":{"./ledger/transportsNode":"./ledger/transportsEmpty","./ledger/transportsWeb":"./ledger/transportsEmpty"},"dependencies":{"@babel/runtime":"^7.11.2","@ledgerhq/hw-transport-webusb":"^5.25.0","@zondax/ledger-polkadot":"^0.11.0","mkdirp":"^1.0.4","rxjs":"^6.6.3","store":"^2.0.12"},"devDependencies":{"@polkadot/keyring":"^3.5.1","@polkadot/types":"^2.1.2-1","@polkadot/util":"^3.5.1","@types/ledgerhq__hw-transport-node-hid":"^4.22.2","@types/ledgerhq__hw-transport-webusb":"^4.70.1","@types/mkdirp":"^1.0.1","@types/store":"^2.0.2"},"optionalDependencies":{"@ledgerhq/hw-transport-node-hid":"^5.25.0"},"peerDependencies":{"@polkadot/keyring":"*","@polkadot/ui-settings":"*","@polkadot/util":"*"}}')},1940:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"QrDisplayAddress",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"QrDisplayPayload",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"QrScanAddress",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"QrScanSignature",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"QrNetworkSpecs",{enumerable:!0,get:function(){return s.default}});var a=n(r(1941)),o=n(r(1944)),u=n(r(1945)),i=n(r(1951)),s=n(r(1952))},1941:function(e,t,r){"use strict";var n=r(0),a=r(2);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=a(r(1)),u=r(300),i=n(r(541));function s({address:e,className:t,genesisHash:r,size:n,style:a}){const s=(0,o.useMemo)(()=>(0,u.createAddressPayload)(e,r),[e,r]);return s?o.default.createElement(i.default,{className:t,size:n,skipEncoding:!0,style:a,value:s}):null}var c=o.default.memo(s);t.default=c},1942:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;const a=n(r(1943)).default;a.stringToBytes=e=>e;var o=a;t.default=o},1944:function(e,t,r){"use strict";var n=r(0),a=r(2);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=a(r(1)),u=r(300),i=n(r(541));function s({address:e,className:t,cmd:r,genesisHash:n,payload:a,size:s,style:c}){const d=(0,o.useMemo)(()=>(0,u.createSignPayload)(e,r,a,n),[e,r,a,n]);return d?o.default.createElement(i.default,{className:t,size:s,style:c,value:d}):null}var c=o.default.memo(s);t.default=c},1945:function(e,t,r){"use strict";var n=r(0),a=r(2);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=a(r(1)),u=r(3),i=r(23),s=r(836),c=n(r(837));function d({className:e,onError:t,onScan:r,size:n,style:a}){const d=(0,o.useCallback)(e=>{if(e)try{const[t,n,a,...o]=e.split(":"),c=t===s.ADDRESS_PREFIX||t===s.SEED_PREFIX;(0,u.assert)(c,`Invalid prefix received, expected '${s.ADDRESS_PREFIX}/${s.SEED_PREFIX}' , found '${t}'`);const d=t===s.ADDRESS_PREFIX;d&&(0,i.decodeAddress)(n),r({content:n,genesisHash:a,isAddress:d,name:(null==o?void 0:o.length)?o.join(":"):void 0})}catch(t){console.error("@polkadot/react-qr:QrScanAddress",t.message,e)}},[r]);return o.default.createElement(c.default,{className:e,onError:t,onScan:d,size:n,style:a})}var l=o.default.memo(d);t.default=l},1951:function(e,t,r){"use strict";var n=r(0),a=r(2);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=a(r(1)),u=n(r(837));function i({className:e,onError:t,onScan:r,size:n,style:a}){const i=(0,o.useCallback)(e=>e&&r({signature:"0x"+e}),[r]);return o.default.createElement(u.default,{className:e,onError:t,onScan:i,size:n,style:a})}var s=o.default.memo(i);t.default=s},1952:function(e,t,r){"use strict";var n=r(0),a=r(2);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=a(r(1)),u=n(r(541)),i=r(300);function s({className:e,networkSpecs:t,size:r,style:n}){const a=(0,o.useMemo)(()=>(0,i.encodeString)(JSON.stringify(t)),[t]);return a?o.default.createElement(u.default,{className:e,size:r,skipEncoding:!0,style:n,value:a}):null}var c=o.default.memo(s);t.default=c},198:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(!e)throw new Error((0,a.default)(t)?t():t)};var a=n(r(279))},2234:function(e,t,r){"use strict";var n=r(2),a=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=a(r(1)),u=a(r(586)),i=a(r(7)),s=n(r(81)),c=r(3),d=r(23),l=r(922);const f=l.Beachball,p=64,b={beachball:l.Beachball,empty:l.Empty,jdenticon:l.Jdenticon,polkadot:l.Polkadot,substrate:l.Jdenticon},y=i.default.div.withConfig({displayName:"Identicon__Wrapper",componentId:"sc-1gm2vek-0"})(["cursor:copy;display:inline-block;line-height:0;> .container{position:relative;> div,> svg{position:relative;}&.highlight:before{position:absolute;top:0;left:0;right:0;bottom:0;border-radius:50%;box-shadow:0 0 5px 2px #aaa;content:'';}}"]);class h extends o.default.PureComponent{constructor(...e){super(...e),this.state={address:"",publicKey:"0x"},this.onCopy=()=>{const{onCopy:e}=this.props,{address:t}=this.state;t&&e&&e(t)}}static setDefaultPrefix(e){h.prefix=e}static getDerivedStateFromProps({prefix:e=h.prefix,value:t},r){try{const n=(0,c.isU8a)(t)||(0,c.isHex)(t)?(0,d.encodeAddress)(t,e):t||"",a=(0,c.u8aToHex)((0,d.decodeAddress)(n,!1,e));return n===r.address?null:{address:n,publicKey:a}}catch(e){return{address:"",publicKey:"0x"}}}render(){const{address:e}=this.state,t=this.getWrapped(this.state,this.props);return e?o.default.createElement(u.default,{onCopy:this.onCopy,text:e},t):t}getWrapped({address:e,publicKey:t},{Custom:r}){const{className:n="",isAlternative:a,isHighlight:u,size:i=p,style:c,theme:d=s.default.icon}=this.props,h=e?r||b["default"===d?s.ICON_DEFAULT_HOST:d]||f:l.Empty;return o.default.createElement(y,{className:"ui--IdentityIcon "+n,key:e,style:c},o.default.createElement(h,{address:e,className:u?"highlight":"",isAlternative:a,publicKey:t,size:i}))}}function v(e){return o.default.createElement(h,e)}h.prefix=void 0;var g=o.default.memo(v);t.default=g},2238:function(e,t,r){"use strict";var n=r(2);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(1)),o=r(923);function u({address:e,className:t="",size:r,style:n}){const u=(0,a.useCallback)(t=>{t&&t.appendChild((0,o.beachballIcon)(e,{isAlternative:!1,size:r}))},[e,r]);return a.default.createElement("div",{className:t,ref:u,style:n})}var i=a.default.memo(u);t.default=i},2239:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"beachballIcon",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"polkadotIcon",{enumerable:!0,get:function(){return o.default}});var a=n(r(2240)),o=n(r(2254))},2240:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,{size:t=256},r="",n){const d=(0,u.default)(e),l=(0,a.default)(d),f=(0,o.default)(t,"white",r,n),p=(0,o.default)(t,l()),b=(0,s.default)(t);f.appendChild(p),p.appendChild(b);for(let e=0;e<c.SHAPE_COUNT;e++){const r=l(),n=(0,i.default)(d,r,t,e);b.appendChild(n)}return f};var a=n(r(2241)),o=n(r(2249)),u=n(r(2250)),i=n(r(2251)),s=n(r(2253)),c=r(587)},2241:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const t=30*e()-15,r=o.COLORS.map(e=>(0,a.default)(e).rotate(t));return(t=1)=>{const n=Math.floor(r.length*e());return r.splice(n,1)[0].alpha(t).string()}};var a=n(r(2242)),o=r(587)},2249:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t="white",r="",n={}){const a=document.createElement("div"),o=Object.assign({background:t,borderRadius:e/2+"px",display:"inline-block",height:e+"px",margin:"0px",overflow:"hidden",padding:"0px",width:e+"px"},n);return a.className=r,a.style.background=t,Object.keys(o).forEach(e=>{a.style[e]=o[e]}),a}},2250:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e=new Uint8Array(32)){const t=(0,n.isU8a)(e)?e:(0,n.stringToU8a)(e);let r=t[Math.floor(t.length/2)]%t.length-1;const a=()=>(r+=1,r===t.length&&(r=0),t[r]);return()=>(256*a()+a())/65536};var n=r(3)},2251:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r,n){const u=r/2,i=360*e(),s=(o.SHAPE_COUNT-n)/o.SHAPE_COUNT*(r/2)+r/8*e(),c=r/4*(e()+(n+1)/o.SHAPE_COUNT),d=c*Math.sin(i)+u,l=c*Math.cos(i)+u,f=(0,a.default)(s,d,l);return f.setAttributeNS("","fill",t),f};var a=n(r(2252)),o=r(587)},2252:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){const n=(0,a.default)("circle");return n.setAttributeNS("","cx",""+t),n.setAttributeNS("","cy",""+r),n.setAttributeNS("","r",""+e),n};var a=n(r(925))},2253:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t="svg",r=0,n=0){const o=(0,a.default)(t);return o.setAttributeNS("","x",""+r),o.setAttributeNS("","y",""+n),o.setAttributeNS("","width",""+e),o.setAttributeNS("","height",""+e),o};var a=n(r(925))},2254:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,{isAlternative:t}){const r=function(e){const t=Object.values(i).map(e=>e.freq).reduce((e,t)=>e+t),r=function(e){return a((0,n.decodeAddress)(e)).map((e,t)=>(e+256-u[t])%256)}(e),o=Math.floor((r[30]+256*r[31])%t),s=r[28]%6*3,c=Math.floor(70*r[29]/256+26)%80+30,d=function(e){let t=0;const r=Object.values(i).find(r=>(t+=r.freq,e<t));if(!r)throw new Error("Unable to find schema");return r}(o),l=Array.from(r).map((e,t)=>{const r=(e+t%28*58)%256;if(0===r)return"#444";if(255===r)return"transparent";const n=Math.floor(r%64*360/64),a=[53,15,35,75][Math.floor(r/64)];return`hsl(${n}, ${c}%, ${a}%)`});return d.colors.map((e,t)=>l[d.colors[t<18?(t+s)%18:18]])}(e);return[s].concat(function(e){const{r:t,r3o4:r,ro2:n,ro4:a,rroot3o2:u,rroot3o4:i}=function(e){const t=e?20:24,r=t*Math.sqrt(3)/2,n=t/2,a=t*Math.sqrt(3)/4;return{r:t,r3o4:3*t/4,ro2:n,ro4:t/4,rroot3o2:r,rroot3o4:a}}(e);return[[o,o-t],[o,o-n],[o-i,o-r],[o-u,o-n],[o-i,o-a],[o-u,o],[o-u,o+n],[o-i,o+a],[o-i,o+r],[o,o+t],[o,o+n],[o+i,o+r],[o+u,o+n],[o+i,o+a],[o+u,o],[o+u,o-n],[o+i,o-a],[o+i,o-r],[o,o]]}(t).map(([e,t],n)=>({cx:e,cy:t,fill:r[n],r:5})))};var n=r(23);const a=e=>(0,n.blake2AsU8a)(e,512),o=32,u=a(new Uint8Array(32)),i={target:{colors:[0,28,0,0,28,0,0,28,0,0,28,0,0,28,0,0,28,0,1],freq:1},cube:{colors:[0,1,3,2,4,3,0,1,3,2,4,3,0,1,3,2,4,3,5],freq:20},quazar:{colors:[1,2,3,1,2,4,5,5,4,1,2,3,1,2,4,5,5,4,0],freq:16},flower:{colors:[0,1,2,0,1,2,0,1,2,0,1,2,0,1,2,0,1,2,3],freq:32},cyclic:{colors:[0,1,2,3,4,5,0,1,2,3,4,5,0,1,2,3,4,5,6],freq:32},vmirror:{colors:[0,1,2,3,4,5,3,4,2,0,1,6,7,8,9,7,8,6,10],freq:128},hmirror:{colors:[0,1,2,3,4,5,6,7,8,9,10,8,6,7,5,3,4,2,11],freq:128}},s={cx:o,cy:o,fill:"#eee",r:o}},2255:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(1));function o({className:e="",size:t,style:r}){return a.default.createElement("svg",{className:e,height:t,style:r,viewBox:"0 0 64 64",width:t})}var u=a.default.memo(o);t.default=u},2256:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(1)),o=n(r(2257));function u({className:e="",publicKey:t,size:r,style:n}){return a.default.createElement("div",{className:e,dangerouslySetInnerHTML:{__html:o.default.toSvg(t.substr(2),r)},style:n})}var i=a.default.memo(u);t.default=i},2258:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(1)),o=r(923);function u({cx:e,cy:t,fill:r,r:n},o){return a.default.createElement("circle",{cx:e,cy:t,fill:r,key:o,r:n})}function i({address:e,className:t="",isAlternative:r=!1,size:n,style:i}){return a.default.createElement("svg",{className:t,height:n,id:e,name:e,style:i,viewBox:"0 0 64 64",width:n},(0,o.polkadotIcon)(e,{isAlternative:r}).map(u))}var s=a.default.memo(i);t.default=s},23:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(97);var n=r(1421);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}));var a=r(1427);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}})}));var o=r(1449);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})}));var u=r(1453);Object.keys(u).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return u[e]}})}));var i=r(1455);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}})}));var s=r(767);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}})}));var c=r(1462);Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return c[e]}})}));var d=r(362);Object.keys(d).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return d[e]}})}));var l=r(755);Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return l[e]}})}));var f=r(1471);Object.keys(f).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return f[e]}})}));var p=r(1484);Object.keys(p).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return p[e]}})}));var b=r(1494);Object.keys(b).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return b[e]}})}));var y=r(1496);Object.keys(y).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return y[e]}})}));var h=r(764);Object.keys(h).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return h[e]}})}));var v=r(1498);Object.keys(v).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return v[e]}})}));var g=r(769);Object.keys(g).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return g[e]}})}));var m=r(1505);Object.keys(m).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return m[e]}})}));var _=r(1507);Object.keys(_).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return _[e]}})}));var O=r(1509);Object.keys(O).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return O[e]}})}))},231:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return"string"==typeof e||e instanceof String}},232:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return void 0===e}},239:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e=32){return a.default.randomBytes(e)};var a=n(r(112))},272:function(e,t,r){"use strict";r.d(t,"b",(function(){return o})),r.d(t,"a",(function(){return u}));const n={blue:{id:"blue",productName:"Ledger Blue",productIdMM:0,legacyUsbProductId:0,usbOnly:!0,memorySize:491520,blockSize:4096},nanoS:{id:"nanoS",productName:"Ledger Nano S",productIdMM:16,legacyUsbProductId:1,usbOnly:!0,memorySize:327680,blockSize:4096},nanoX:{id:"nanoX",productName:"Ledger Nano X",productIdMM:64,legacyUsbProductId:4,usbOnly:!1,memorySize:2097152,blockSize:4096,bluetoothSpec:[{serviceUuid:"d973f2e0-b19e-11e2-9e96-0800200c9a66",notifyUuid:"d973f2e1-b19e-11e2-9e96-0800200c9a66",writeUuid:"d973f2e2-b19e-11e2-9e96-0800200c9a66"},{serviceUuid:"13d63400-2c97-0004-0000-4c6564676572",notifyUuid:"13d63400-2c97-0004-0001-4c6564676572",writeUuid:"13d63400-2c97-0004-0002-4c6564676572"}]}},a=Object.values(n),o=11415,u=e=>{const t=a.find(t=>t.legacyUsbProductId===e);if(t)return t;const r=e>>8;return a.find(e=>e.productIdMM===r)},i=[],s={};for(let e in n){const t=n[e],{bluetoothSpec:r}=t;if(r)for(let e=0;e<r.length;e++){const n=r[e];i.push(n.serviceUuid),s[n.serviceUuid]=s[n.serviceUuid.replace(/-/g,"")]={deviceModel:t,...n}}}},274:function(e,t,r){"use strict";r.d(t,"d",(function(){return o})),r.d(t,"b",(function(){return u})),r.d(t,"a",(function(){return i})),r.d(t,"c",(function(){return s}));var n=r(272);const a=[{vendorId:n.b}];async function o(){return await navigator.usb.requestDevice({filters:a})}async function u(){return(await navigator.usb.getDevices()).filter(e=>e.vendorId===n.b)}async function i(){const e=await u();return e.length>0?e[0]:o()}const s=()=>Promise.resolve(!!navigator&&!!navigator.usb&&"function"==typeof navigator.usb.getDevices)},279:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return"function"==typeof e}},280:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t={isLe:!1,isNegative:!1}){if(!e)return new o.default(0);const r=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach((function(t){(0,a.default)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({isLe:!1,isNegative:!1},(0,u.default)(t)?{isLe:t}:t),n=(0,i.default)(e),c=new o.default((r.isLe?function(e){return(e.match(new RegExp(".{1,2}","g"))||[]).reverse().join("")}(n):n)||"00",16);return r.isNegative?c.fromTwos(4*n.length):c};var a=n(r(8)),o=n(r(18)),u=n(r(468)),i=n(r(348));function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}},281:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t=-1,r=!1){const n="0x"===e||(0,a.default)(e)&&o.test(e.toString());if(n&&-1!==t)return e.length===2+Math.ceil(t/4);return n&&(r||e.length%2==0)};var a=n(r(231));const o=/^0x[a-fA-F0-9]+$/},282:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"u8aConcat",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"u8aEq",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"u8aFixLength",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"u8aSorted",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"u8aToBn",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"u8aToBuffer",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"u8aToHex",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"u8aToString",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"u8aToU8a",{enumerable:!0,get:function(){return f.default}});var a=n(r(1249)),o=n(r(668)),u=n(r(1251)),i=n(r(1252)),s=n(r(1253)),c=n(r(1254)),d=n(r(346)),l=n(r(669)),f=n(r(283))},283:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if(!e)return new Uint8Array;if((0,a.default)(e))return(0,i.default)(e);if((0,u.default)(e))return(0,o.default)(e)?(0,s.default)(e):(0,c.default)(e);return Array.isArray(e)?Uint8Array.from(e):e};var a=n(r(466)),o=n(r(281)),u=n(r(231)),i=n(r(667)),s=n(r(350)),c=n(r(472))},295:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n={allowedDecodedLengths:[1,2,4,8,32,33],allowedEncodedLengths:[3,4,6,10,35,36],allowedPrefix:r(1433).allowedSS58,prefix:42};t.default=n},296:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t=i.default.prefix){const r=(0,u.default)(e);(0,a.assert)(i.default.allowedDecodedLengths.includes(r.length),"Expected a valid key to convert, with length "+i.default.allowedDecodedLengths.join(", "));const n=[32,33].includes(r.length),c=(0,a.u8aConcat)(new Uint8Array([t]),r),d=(0,s.default)(c);return(0,o.default)((0,a.u8aConcat)(c,d.subarray(0,n?2:1)))};var a=r(3),o=n(r(766)),u=n(r(159)),i=n(r(295)),s=n(r(751))},3:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0});var a={assert:!0,detectPackage:!0,extractTime:!0,logger:!0,promisify:!0};Object.defineProperty(t,"assert",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"detectPackage",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"extractTime",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"logger",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"promisify",{enumerable:!0,get:function(){return c.default}}),r(1223);var o=n(r(198)),u=n(r(1228)),i=n(r(1229)),s=n(r(657)),c=n(r(1240)),d=r(1241);Object.keys(d).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(a,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return d[e]}}))}));var l=r(664);Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(a,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return l[e]}}))}));var f=r(1256);Object.keys(f).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(a,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return f[e]}}))}));var p=r(1257);Object.keys(p).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(a,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return p[e]}}))}));var b=r(1260);Object.keys(b).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(a,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return b[e]}}))}));var y=r(1264);Object.keys(y).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(a,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return y[e]}}))}));var h=r(1267);Object.keys(h).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(a,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return h[e]}}))}));var v=r(1278);Object.keys(v).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(a,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return v[e]}}))}));var g=r(1280);Object.keys(g).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(a,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return g[e]}}))}));var m=r(282);Object.keys(m).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(a,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return m[e]}}))}))},300:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeNumber=i,t.encodeString=s,t.decodeString=function(e){return e.reduce((e,t)=>e+String.fromCharCode(t),"")},t.createAddressPayload=function(e,t){return s(`${o.ADDRESS_PREFIX}:${e}:${t}`)},t.createSignPayload=function(e,t,r,u){return(0,n.u8aConcat)(o.SUBSTRATE_ID,o.CRYPTO_SR25519,new Uint8Array([t]),(0,a.decodeAddress)(e),(0,n.u8aToU8a)(r),(0,n.u8aToU8a)(u))},t.createFrames=function(e){const t=[];let r=0;for(;r<e.length;)t.push(e.subarray(r,r+o.FRAME_SIZE)),r+=o.FRAME_SIZE;return t.map((e,r)=>(0,n.u8aConcat)(u,i(t.length),i(r),e))},t.createImgSize=function(e){if(!e)return{height:"auto",width:"100%"};const t=(0,n.isString)(e)?e:e+"px";return{height:t,width:t}};var n=r(3),a=r(23),o=r(836);const u=new Uint8Array([0]);function i(e){return new Uint8Array([e>>8,255&e])}function s(e){const t=new Uint8Array(e.length);for(let r=0;r<e.length;r++)t[r]=e.charCodeAt(r);return t}},32:function(e,t,r){"use strict";(function(e){var n=r(0),a=r(2);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Keyring",{enumerable:!0,get:function(){return u.Keyring}}),Object.defineProperty(t,"Ledger",{enumerable:!0,get:function(){return i.default}}),t.default=void 0;var o=r(3),u=a(r(1881)),i=n(r(1892));(0,o.detectPackage)(r(1902),e);var s=u.default;t.default=s}).call(this,"/")},345:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return e instanceof t}},346:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t,r=-1,a=!0){const o=a?"0x":"";if(!(null==t?void 0:t.length))return o;const u=Math.ceil(r/8);if(u>0&&t.length>u){const r=Math.ceil(u/2);return`${e(t.subarray(0,r),-1,a)}…${e(t.subarray(t.length-r),-1,!1)}`}const i=new Array(t.length);for(let e=0;e<t.length;e++)i[e]=n[t[e]];return o+i.join("")};const n=new Array(256);for(let e=0;e<256;++e)n[e]=e.toString(16).padStart(2,"0")},347:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return null===e}},348:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if(!e)return"";if((0,a.default)(e))return e.substr(2);if(o.test(e))return e;throw new Error(`Invalid hex ${e} passed to hexStripPrefix`)};var a=n(r(469));const o=/^[a-fA-F0-9]+$/},349:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if(!e)return new a.default(0);if((0,i.default)(e))return(0,s.default)(e.toString());if((0,o.default)(e))return new a.default(e.toString());return a.default.isBN(e)?e:(0,u.default)(e)?e.toBn():new a.default(e)};var a=n(r(18)),o=n(r(665)),u=n(r(470)),i=n(r(281)),s=n(r(280))},350:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t=-1){if(!e)return new Uint8Array;(0,a.default)((0,o.default)(e),`Expected hex value to convert, found '${e}'`);const r=(0,u.default)(e),n=r.length/2,i=Math.ceil(-1===t?n:t/8),s=new Uint8Array(i),c=Math.max(0,i-n);for(let e=0;e<i;e++)s[e+c]=parseInt(r.substr(2*e,2),16);return s};var a=n(r(198)),o=n(r(281)),u=n(r(348))},361:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateChars=o,t.default=function(e,t=!1){return o("base58",a.BASE58_ALPHABET,e,t?"z":void 0)};var n=r(3),a=r(502);function o(e,t,r,a){(0,n.assert)(r,`Expected non-null, non-empty ${e} input`),(0,n.assert)(!a||r[0]===a,`Expected ${e} to start with '${a||""}'`);for(let o=a?1:0;o<r.length;o++)(0,n.assert)(t.includes(r[o]),`Invalid ${e} character "${r[o]}" (0x${r.charCodeAt(o).toString(16)}) at index ${o}`);return!0}},362:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"keccakAsHex",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"keccakAsU8a",{enumerable:!0,get:function(){return o.default}});var a=n(r(1464)),o=n(r(768))},369:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.web3Enable=function(e){if(!e)throw new Error("You must pass a name for your app to the web3Enable function");return t.web3EnablePromise=b=(0,u.documentReadyPromise)(()=>Promise.all(Object.entries(c.injectedWeb3).map(([t,{enable:r,version:n}])=>Promise.all([Promise.resolve({name:t,version:n}),r(e).catch(e=>{console.error(`Error initializing ${t}: ${e.message}`)})]))).then(e=>e.filter(([,e])=>!!e).map(([e,t])=>{t&&!t.accounts.subscribe&&(t.accounts.subscribe=e=>(t.accounts.get().then(e).catch(console.error),()=>{}));return s(s({},e),t)})).catch(()=>[]).then(e=>{const r=e.map(({name:e,version:t})=>`${e}/${t}`);return t.isWeb3Injected=p=d(),console.log(`web3Enable: Enabled ${e.length} extension${1!==e.length?"s":""}: ${r.join(", ")}`),e})),b},t.web3Accounts=y,t.web3AccountsSubscribe=async function(e,{ss58Format:t}={}){if(!b)return l("web3AccountsSubscribe");const r={},n=(await b).map(({accounts:{subscribe:n},name:a})=>n(n=>{r[a]=n,e(Object.entries(r).reduce((e,[r,n])=>(e.push(...f(r,n,t)),e),[]))}));return()=>{n.forEach(e=>{e()})}},t.web3FromSource=h,t.web3FromAddress=async function(e){if(!b)return l("web3FromAddress");const t=await y(),r=e&&t.find(t=>t.address===e);if(!r)throw new Error("web3FromAddress: Unable to find injected "+e);return h(r.meta.source)},t.web3ListRpcProviders=async function(e){const{provider:t}=await h(e);if(!t)return console.warn(`Extension ${e} does not expose any provider`),null;return t.listProviders()},t.web3UseRpcProvider=async function(e,t){const{provider:r}=await h(e);if(!r)throw new Error(`Extension ${e} does not expose any provider`);return{meta:await r.startProvider(t),provider:r}},t.web3EnablePromise=t.isWeb3Injected=void 0;var a=n(r(8)),o=r(23),u=r(1879);function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach((function(t){(0,a.default)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const c=window;function d(){return 0!==Object.keys(c.injectedWeb3).length}function l(e){throw new Error(`${e}: web3Enable(originName) needs to be called before ${e}`)}function f(e,t,r){return t.map(({address:t,genesisHash:n,name:a})=>({address:(0,o.encodeAddress)((0,o.decodeAddress)(t),r),meta:{genesisHash:n,name:a,source:e}}))}c.injectedWeb3=c.injectedWeb3||{};let p=d();t.isWeb3Injected=p;let b=null;async function y({ss58Format:e}={}){if(!b)return l("web3Accounts");const t=[],r=await b;(await Promise.all(r.map(async({accounts:t,name:r})=>{try{return f(r,await t.get(),e)}catch(e){return[]}}))).forEach(e=>{t.push(...e)});const n=t.map(({address:e})=>e);return console.log(`web3Accounts: Found ${t.length} address${1!==t.length?"es":""}: ${n.join(", ")}`),t}async function h(e){if(!b)return l("web3FromSource");const t=await b,r=e&&t.find(({name:t})=>t===e);if(!r)throw new Error("web3FromSource: Unable to find an injected "+e);return r}t.web3EnablePromise=b},370:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.contractRegex=t.contractKey=t.addressRegex=t.addressKey=t.accountRegex=t.accountKey=void 0;var n=r(3),a=r(526);function o(e){return(0,n.u8aToHex)((0,a.decodeAddress)(e,!0))}t.accountKey=e=>"account:"+o(e);t.addressKey=e=>"address:"+o(e);t.contractKey=e=>"contract:"+o(e);const u=new RegExp("^account:0x[0-9a-f]*","");t.accountRegex=u;const i=new RegExp("^address:0x[0-9a-f]*","");t.addressRegex=i;const s=new RegExp("^contract:0x[0-9a-f]*","");t.contractRegex=s},4129:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{match:t,runs:r=10,withCase:n=!1}=e,o=[],u=Date.now(),i=(n?t:t.toLowerCase()).split(",").map(e=>e.split(""));for(;o.length!==r;)o.push((0,a.default)(i,e));return{elapsed:Date.now()-u,found:o}};var a=n(r(4130))},4130:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){const r=t.withHex?void 0:(0,a.mnemonicGenerate)(12),n=r?(0,a.mnemonicToMiniSecret)(r):(0,a.randomAsU8a)(),u="sr25519"===t.type?(0,a.schnorrkelKeypairFromSeed)(n):(0,a.naclKeypairFromSeed)(n),i=(0,a.encodeAddress)(u.publicKey),{count:s,offset:c}=(0,o.default)(e,i,t);return{address:i,count:s,mnemonic:r,offset:c,seed:n}};var a=r(23),o=n(r(4131))},4131:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,{atOffset:r=-1,withCase:n=!1}){const o=n?t:t.toLowerCase();if(r>0)return a(r,e,o);let u=0,i=1;for(let t=0;t<5;t++){const{count:r,offset:n}=a(t,e,o);r>u&&(u=r,i=n)}return{count:u,offset:i}};function n(e,t,r){return{count:t.reduce((t,n,a)=>(a===t&&(t+="?"===n||n===r.charAt(a+e)?1:0),t),0),offset:e}}function a(e,t,r){let a=0,o=1;for(let u=0;u<t.length;u++){const{count:i,offset:s}=n(e,t[u],r);i>a&&(a=i,o=s)}return{count:a,offset:o}}},4132:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=new RegExp("^[1-9A-HJ-NP-Za-km-z]*$","");t.default=n},4133:function(e,t,r){"use strict";function n(e,t){return e>t?-1:e<t?1:0}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){const r=n(e.count,t.count);if(0!==r)return r;const a=n(t.offset,e.offset);if(0!==a)return a;return e.address.localeCompare(t.address)}},466:function(e,t,r){"use strict";(function(e){var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(t){return(0,a.default)(t,e)};var a=n(r(345))}).call(this,r(36).Buffer)},467:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return"object"==typeof e}},468:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return"boolean"==typeof e}},469:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return!(!e||!(0,a.default)(e,-1,!0)||"0x"!==e.substr(0,2))};var a=n(r(281))},470:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return!!e&&(0,a.default)(e.toBn)};var a=n(r(279))},471:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return"number"==typeof e}},472:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e?a.encode(e):new Uint8Array};const a=new(n(r(1250)).default)},473:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_BITLENGTH=void 0;t.DEFAULT_BITLENGTH=32},474:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const t=e[0].startsWith("-"),r=t?e.substr(1).match(n):e.match(n);return r?`${t?"-":""}${r.join(",")}`:e};const n=new RegExp("(\\d+?)(?=(\\d{3})+(?!\\d)|$)","g")},501:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return(0,u.default)(e,t),(0,a.bufferToU8a)(o.bs58.decode(e.substr(t?1:0)))};var a=r(3),o=r(502),u=n(r(361))},502:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.bs58=t.BASE58_ALPHABET=void 0;var a=n(r(1429));const o="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";t.BASE58_ALPHABET=o;const u=(0,a.default)(o);t.bs58=u},503:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const t=[35,36].includes(e.length),r=e.length-(t?2:1),n=(0,a.default)(e.subarray(0,r));return[t?e[e.length-2]===n[0]&&e[e.length-1]===n[1]:e[e.length-1]===n[0],r]};var a=n(r(751))},504:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if((0,o.isReady)()){const t=(0,o.ed25519KeypairFromSeed)(e);return{publicKey:t.slice(32),secretKey:t.slice(0,64)}}return a.default.sign.keyPair.fromSeed(e)};var a=n(r(112)),o=r(57)},505:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return{publicKey:e.slice(64,96),secretKey:e.slice(0,64)}}},506:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BITS_PER_CHAR=t.BASE32_ALPHABET=void 0;t.BASE32_ALPHABET="abcdefghijklmnopqrstuvwxyz234567";t.BITS_PER_CHAR=5},507:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t=!1){return(0,n.validateChars)("base32",a.BASE32_ALPHABET,e,t?"b":void 0)};var n=r(361),a=r(506)},508:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,n.assert)(e,"Expected non-null, non-empty base64 input"),(0,n.assert)(/^(?:[A-Za-z0-9+/]{2}[A-Za-z0-9+/]{2})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e),"Invalid base64 encoding"),!0};var n=r(3)},518:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1819);Object.defineProperty(t,"signaling",{enumerable:!0,get:function(){return n.default}});var a=r(1820);Object.defineProperty(t,"treasuryRewards",{enumerable:!0,get:function(){return a.default}});var o=r(1821);Object.defineProperty(t,"voting",{enumerable:!0,get:function(){return o.default}})},523:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e({toSS58:t,type:r},{publicKey:n,secretKey:a},d={},m=null,_){const O=(e,t)=>{const o=(0,i.default)(e,t||m,_);if(64===o.secretKey.length)n=o.publicKey,a=o.secretKey;else{const e=p[r](o.secretKey);n=e.publicKey,a=e.secretKey}},P=e=>(g(a)&&m&&O(e,m),m=(0,s.default)({publicKey:n,secretKey:a},e),_=void 0,m),j=()=>{const e=h[r](n);return"ethereum"===r?(0,u.ethereumEncode)(e):t(e)};return{get address(){return j()},get addressRaw(){const e=h[r](n);return"ethereum"===r?e.slice(-20):e},get isLocked(){return g(a)},get meta(){return d},get publicKey(){return n},get type(){return r},decodePkcs8:O,derive:(i,s)=>{(0,o.assert)(!g(a),"Cannot derive on a locked keypair");const{path:c}=(0,u.keyExtractPath)(i),d=(0,u.keyFromPath)({publicKey:n,secretKey:a},c,r);return e({toSS58:t,type:r},d,s,null)},encodePkcs8:e=>P(e),lock:()=>{a=new Uint8Array},setMeta:e=>{d=l(l({},d),e)},sign:(e,t={})=>((0,o.assert)(!g(a),"Cannot sign with a locked key pair"),(0,o.u8aConcat)(t.withType?b[r]:f,y[r](e,{publicKey:n,secretKey:a}))),toJson:e=>{const t=["ecdsa","ethereum"].includes(r)?(0,o.u8aToHex)((0,u.secp256k1Compress)(n)):j();return(0,c.default)(r,{address:t,meta:d},P(e),!!e)},verify:(e,t)=>v[r](e,t,n)}};var a=n(r(8)),o=r(3),u=r(23),i=n(r(1882)),s=n(r(1883)),c=n(r(1884));function d(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?d(Object(r),!0).forEach((function(t){(0,a.default)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const f=new Uint8Array,p={ecdsa:u.secp256k1KeypairFromSeed,ed25519:u.naclKeypairFromSeed,ethereum:u.secp256k1KeypairFromSeed,sr25519:u.schnorrkelKeypairFromSeed},b={ecdsa:new Uint8Array([2]),ed25519:new Uint8Array([0]),ethereum:new Uint8Array([2]),sr25519:new Uint8Array([1])},y={ecdsa:(e,t)=>(0,u.secp256k1Sign)(e,t,"blake2"),ed25519:u.naclSign,ethereum:(e,t)=>(0,u.secp256k1Sign)(e,t,"keccak"),sr25519:u.schnorrkelSign},h={ecdsa:e=>e.length>32?(0,u.blake2AsU8a)(e):e,ed25519:e=>e,ethereum:e=>(0,u.keccakAsU8a)((0,u.secp256k1Expand)(e)),sr25519:e=>e},v={ecdsa:(e,t,r)=>(0,u.secp256k1Verify)(e,t,h.ecdsa(r),"blake2"),ed25519:u.naclVerify,ethereum:(e,t,r)=>(0,u.secp256k1Verify)(e,t,h.ethereum(r),"keccak",!0),sr25519:u.schnorrkelVerify};function g(e){return!e||0===e.length||0===e.reduce((e,t)=>e+t,0)}},524:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SCRYPT_LENGTH=t.SEED_LENGTH=t.SEC_LENGTH=t.SALT_LENGTH=t.PUB_LENGTH=t.PKCS8_HEADER=t.PKCS8_DIVIDER=t.NONCE_LENGTH=t.ENCODING=void 0;t.ENCODING=["scrypt","xsalsa20-poly1305"];t.NONCE_LENGTH=24;const n=new Uint8Array([161,35,3,33,0]);t.PKCS8_DIVIDER=n;const a=new Uint8Array([48,83,2,1,1,48,5,6,3,43,101,112,4,34,4,32]);t.PKCS8_HEADER=a;t.PUB_LENGTH=32;t.SALT_LENGTH=32;t.SEC_LENGTH=64;t.SEED_LENGTH=32;t.SCRYPT_LENGTH=44},525:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;const n=new(r(16).BehaviorSubject)(!1);var a={isDevelopment:()=>n.getValue(),set:e=>{n.next(e)},subject:n};t.default=a},526:function(e,t,r){"use strict";(function(e){var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"decodeAddress",{enumerable:!0,get:function(){return o.decodeAddress}}),Object.defineProperty(t,"encodeAddress",{enumerable:!0,get:function(){return o.encodeAddress}}),Object.defineProperty(t,"setSS58Format",{enumerable:!0,get:function(){return o.setSS58Format}}),Object.defineProperty(t,"Keyring",{enumerable:!0,get:function(){return u.default}}),t.default=void 0;var a=r(3),o=r(23),u=n(r(1887));(0,a.detectPackage)(r(1889),e);var i=u.default;t.default=i}).call(this,"/")},527:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(370),o=(0,n(r(528)).default)(a.accountKey,!0);t.default=o},528:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t=!1){let r={};const n=new o.BehaviorSubject({}),a=()=>function(e,t,r){const n=i.default.isDevelopment(),a={};Object.keys(e).forEach(t=>{const{json:{meta:{isTesting:o=!1}={}}={}}=e[t];r&&!n&&!0===o||(a[t]=e[t])}),t.next(a)}(r,n,t);return i.default.subject.subscribe(a),{add:(t,n,o)=>(r=c({},r),r[n]={json:c(c({},o),{},{address:n}),option:(0,u.default)(n,o.meta.name)},o.meta.isInjected||o.meta.isHardware||o.meta.isTesting&&!i.default.isDevelopment()||t.set(e(n),o),a(),r[n]),remove:(t,n)=>{r=c({},r),delete r[n],t.remove(e(n)),a()},subject:n}};var a=n(r(8)),o=r(16),u=n(r(824)),i=n(r(525));function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach((function(t){(0,a.default)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}},529:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(370),o=(0,n(r(528)).default)(a.addressKey);t.default=o},530:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(370),o=(0,n(r(528)).default)(a.contractKey);t.default=o},541:function(e,t,r){"use strict";var n=r(2),a=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=a(r(8)),u=n(r(1)),i=a(r(7)),s=r(23),c=a(r(1942)),d=r(300);function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function f(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach((function(t){(0,o.default)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function p(e){const t=(0,c.default)(0,"M");return t.addData(e,"Byte"),t.make(),t.createDataURL(16,0)}var b=u.default.memo((0,i.default)((function({className:e,size:t,skipEncoding:r,style:n,value:a}){const[{image:o},i]=(0,u.useState)({frameIdx:0,frames:[],image:null,valueHash:null}),c=(0,u.useRef)({timerDelay:2500,timerId:null}),l=(0,u.useMemo)(()=>(0,d.createImgSize)(t),[t]);return(0,u.useEffect)(()=>{const e=()=>i(t=>{if(t.frames.length<=1)return t;let r=t.frameIdx+1;return r===t.frames.length&&(r=0,c.current.timerDelay=c.current.timerDelay+500),c.current.timerId=setTimeout(e,c.current.timerDelay),f(f({},t),{},{frameIdx:r,image:p(t.frames[r])})});return c.current.timerId=window.setTimeout(e,2500),()=>{c.current.timerId&&clearTimeout(c.current.timerId)}},[]),(0,u.useEffect)(()=>{i(e=>{const t=(0,s.xxhashAsHex)(a);if(t===e.valueHash)return e;const n=r?[a]:(0,d.createFrames)(a);return{frameIdx:0,frames:n,image:p(n[0]),valueHash:t}})},[r,a]),o?u.default.createElement("div",{className:e,style:l},u.default.createElement("div",{className:"ui--qr-Display",style:n},u.default.createElement("img",{src:o}))):null})).withConfig({displayName:"Display",componentId:"f0xthb-0"})([".ui--qr-Display{height:100%;width:100%;img,svg{background:white;height:auto !important;max-height:100%;max-width:100%;width:auto !important;}}"]));t.default=b},587:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SHAPE_COUNT=t.COLORS=void 0;t.COLORS=["#ffe119","#4363d8","#f58231","#fabebe","#e6beff","#800000","#000075","#a9a9a9","#ffffff","#000000"];t.SHAPE_COUNT=5},615:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));let n=0;const a=[],o=(e,t,r)=>{const o={type:e,id:String(++n),date:new Date};t&&(o.message=t),r&&(o.data=r),function(e){for(let t=0;t<a.length;t++)try{a[t](e)}catch(e){console.error(e)}}(o)},u=e=>(a.push(e),()=>{const t=a.indexOf(e);-1!==t&&(a[t]=a[a.length-1],a.pop())});"undefined"!=typeof window&&(window.__ledgerLogsListen=u)},65:function(e,t,r){"use strict";r.r(t),r.d(t,"AccountNameRequiredError",(function(){return c})),r.d(t,"AccountNotSupported",(function(){return d})),r.d(t,"AmountRequired",(function(){return l})),r.d(t,"BluetoothRequired",(function(){return f})),r.d(t,"BtcUnmatchedApp",(function(){return p})),r.d(t,"CantOpenDevice",(function(){return b})),r.d(t,"CantScanQRCode",(function(){return Ne})),r.d(t,"CashAddrNotSupported",(function(){return y})),r.d(t,"CurrencyNotSupported",(function(){return h})),r.d(t,"DBNotReset",(function(){return ze})),r.d(t,"DBWrongPassword",(function(){return qe})),r.d(t,"DeviceAppVerifyNotSupported",(function(){return v})),r.d(t,"DeviceGenuineSocketEarlyClose",(function(){return g})),r.d(t,"DeviceHalted",(function(){return j})),r.d(t,"DeviceInOSUExpected",(function(){return P})),r.d(t,"DeviceNameInvalid",(function(){return E})),r.d(t,"DeviceNotGenuineError",(function(){return m})),r.d(t,"DeviceOnDashboardExpected",(function(){return _})),r.d(t,"DeviceOnDashboardUnexpected",(function(){return O})),r.d(t,"DeviceShouldStayInApp",(function(){return Ue})),r.d(t,"DeviceSocketFail",(function(){return A})),r.d(t,"DeviceSocketNoBulkStatus",(function(){return w})),r.d(t,"DisconnectedDevice",(function(){return S})),r.d(t,"DisconnectedDeviceDuringOperation",(function(){return T})),r.d(t,"ETHAddressNonEIP",(function(){return Ce})),r.d(t,"EnpointConfigError",(function(){return M})),r.d(t,"EthAppPleaseEnableContractData",(function(){return U})),r.d(t,"FeeEstimationFailed",(function(){return I})),r.d(t,"FeeNotLoaded",(function(){return Re})),r.d(t,"FeeRequired",(function(){return Le})),r.d(t,"FeeTooHigh",(function(){return Fe})),r.d(t,"FirmwareNotRecognized",(function(){return k})),r.d(t,"FirmwareOrAppUpdateRequired",(function(){return We})),r.d(t,"GasLessThanEstimate",(function(){return ue})),r.d(t,"GenuineCheckFailed",(function(){return Ke})),r.d(t,"HardResetFail",(function(){return D})),r.d(t,"InvalidAddress",(function(){return C})),r.d(t,"InvalidAddressBecauseDestinationIsAlsoSource",(function(){return N})),r.d(t,"InvalidXRPTag",(function(){return x})),r.d(t,"LatestMCUInstalledError",(function(){return R})),r.d(t,"LedgerAPI4xx",(function(){return Ge})),r.d(t,"LedgerAPI5xx",(function(){return Ve})),r.d(t,"LedgerAPIError",(function(){return F})),r.d(t,"LedgerAPIErrorWithMessage",(function(){return B})),r.d(t,"LedgerAPINotAvailable",(function(){return H})),r.d(t,"MCUNotGenuineToDashboard",(function(){return pe})),r.d(t,"ManagerAppAlreadyInstalledError",(function(){return K})),r.d(t,"ManagerAppDepInstallRequired",(function(){return V})),r.d(t,"ManagerAppDepUninstallRequired",(function(){return W})),r.d(t,"ManagerAppRelyOnBTCError",(function(){return G})),r.d(t,"ManagerDeviceLockedError",(function(){return $})),r.d(t,"ManagerFirmwareNotEnoughSpaceError",(function(){return q})),r.d(t,"ManagerNotEnoughSpaceError",(function(){return z})),r.d(t,"ManagerUninstallBTCDep",(function(){return Y})),r.d(t,"NetworkDown",(function(){return X})),r.d(t,"NoAccessToCamera",(function(){return ne})),r.d(t,"NoAddressesFound",(function(){return J})),r.d(t,"NoDBPathGiven",(function(){return $e})),r.d(t,"NotEnoughBalance",(function(){return Z})),r.d(t,"NotEnoughBalanceBecauseDestinationNotCreated",(function(){return re})),r.d(t,"NotEnoughBalanceInParentAccount",(function(){return ee})),r.d(t,"NotEnoughBalanceToDelegate",(function(){return Q})),r.d(t,"NotEnoughGas",(function(){return ae})),r.d(t,"NotEnoughSpendableBalance",(function(){return te})),r.d(t,"NotSupportedLegacyAddress",(function(){return oe})),r.d(t,"PairingFailed",(function(){return He})),r.d(t,"PasswordIncorrectError",(function(){return se})),r.d(t,"PasswordsDontMatchError",(function(){return ie})),r.d(t,"RecipientRequired",(function(){return be})),r.d(t,"RecommendSubAccountsToEmpty",(function(){return ce})),r.d(t,"RecommendUndelegation",(function(){return de})),r.d(t,"StatusCodes",(function(){return Xe})),r.d(t,"SyncError",(function(){return Be})),r.d(t,"TimeoutTagged",(function(){return le})),r.d(t,"TransportError",(function(){return Ye})),r.d(t,"TransportInterfaceNotAvailable",(function(){return Se})),r.d(t,"TransportOpenUserCancelled",(function(){return we})),r.d(t,"TransportRaceCondition",(function(){return Te})),r.d(t,"TransportStatusError",(function(){return Ze})),r.d(t,"TransportWebUSBGestureRequired",(function(){return Me})),r.d(t,"UnavailableTezosOriginatedAccountReceive",(function(){return ye})),r.d(t,"UnavailableTezosOriginatedAccountSend",(function(){return he})),r.d(t,"UnexpectedBootloader",(function(){return fe})),r.d(t,"UnknownMCU",(function(){return L})),r.d(t,"UpdateFetchFileFail",(function(){return ve})),r.d(t,"UpdateIncorrectHash",(function(){return ge})),r.d(t,"UpdateIncorrectSig",(function(){return me})),r.d(t,"UpdateYourApp",(function(){return _e})),r.d(t,"UserRefusedAddress",(function(){return Pe})),r.d(t,"UserRefusedAllowManager",(function(){return Ee})),r.d(t,"UserRefusedDeviceNameChange",(function(){return Oe})),r.d(t,"UserRefusedFirmwareUpdate",(function(){return je})),r.d(t,"UserRefusedOnDevice",(function(){return Ae})),r.d(t,"WebsocketConnectionError",(function(){return Ie})),r.d(t,"WebsocketConnectionFailed",(function(){return ke})),r.d(t,"WrongAppForCurrency",(function(){return xe})),r.d(t,"WrongDeviceForAccount",(function(){return De})),r.d(t,"addCustomErrorDeserializer",(function(){return o})),r.d(t,"createCustomErrorClass",(function(){return u})),r.d(t,"deserializeError",(function(){return i})),r.d(t,"getAltStatusMessage",(function(){return Je})),r.d(t,"serializeError",(function(){return s}));var n={},a={},o=function(e,t){a[e]=t},u=function(e){var t=function(t,r){Object.assign(this,r),this.name=e,this.message=t||e,this.stack=(new Error).stack};return t.prototype=new Error,n[e]=t,t},i=function(e){if("object"==typeof e&&e){try{var t=JSON.parse(e.message);t.message&&t.name&&(e=t)}catch(e){}var r=void 0;if("string"==typeof e.name){var o=e.name,s=a[o];if(s)r=s(e);else{var c="Error"===o?Error:n[o];c||(console.warn("deserializing an unknown class '"+o+"'"),c=u(o)),r=Object.create(c.prototype);try{for(var d in e)e.hasOwnProperty(d)&&(r[d]=e[d])}catch(e){}}}else r=new Error(e.message);return!r.stack&&Error.captureStackTrace&&Error.captureStackTrace(r,i),r}return new Error(String(e))},s=function(e){return e?"object"==typeof e?function e(t,r){var n={};r.push(t);for(var a=0,o=Object.keys(t);a<o.length;a++){var u=o[a],i=t[u];"function"!=typeof i&&(i&&"object"==typeof i?-1!==r.indexOf(t[u])?n[u]="[Circular]":n[u]=e(t[u],r.slice(0)):n[u]=i)}"string"==typeof t.name&&(n.name=t.name);"string"==typeof t.message&&(n.message=t.message);"string"==typeof t.stack&&(n.stack=t.stack);return n}(e,[]):"function"==typeof e?"[Function: "+(e.name||"anonymous")+"]":e:e};var c=u("AccountNameRequired"),d=u("AccountNotSupported"),l=u("AmountRequired"),f=u("BluetoothRequired"),p=u("BtcUnmatchedApp"),b=u("CantOpenDevice"),y=u("CashAddrNotSupported"),h=u("CurrencyNotSupported"),v=u("DeviceAppVerifyNotSupported"),g=u("DeviceGenuineSocketEarlyClose"),m=u("DeviceNotGenuine"),_=u("DeviceOnDashboardExpected"),O=u("DeviceOnDashboardUnexpected"),P=u("DeviceInOSUExpected"),j=u("DeviceHalted"),E=u("DeviceNameInvalid"),A=u("DeviceSocketFail"),w=u("DeviceSocketNoBulkStatus"),S=u("DisconnectedDevice"),T=u("DisconnectedDeviceDuringOperation"),M=u("EnpointConfig"),U=u("EthAppPleaseEnableContractData"),I=u("FeeEstimationFailed"),k=u("FirmwareNotRecognized"),D=u("HardResetFail"),x=u("InvalidXRPTag"),C=u("InvalidAddress"),N=u("InvalidAddressBecauseDestinationIsAlsoSource"),R=u("LatestMCUInstalledError"),L=u("UnknownMCU"),F=u("LedgerAPIError"),B=u("LedgerAPIErrorWithMessage"),H=u("LedgerAPINotAvailable"),K=u("ManagerAppAlreadyInstalled"),G=u("ManagerAppRelyOnBTC"),V=u("ManagerAppDepInstallRequired"),W=u("ManagerAppDepUninstallRequired"),$=u("ManagerDeviceLocked"),q=u("ManagerFirmwareNotEnoughSpace"),z=u("ManagerNotEnoughSpace"),Y=u("ManagerUninstallBTCDep"),X=u("NetworkDown"),J=u("NoAddressesFound"),Z=u("NotEnoughBalance"),Q=u("NotEnoughBalanceToDelegate"),ee=u("NotEnoughBalanceInParentAccount"),te=u("NotEnoughSpendableBalance"),re=u("NotEnoughBalanceBecauseDestinationNotCreated"),ne=u("NoAccessToCamera"),ae=u("NotEnoughGas"),oe=u("NotSupportedLegacyAddress"),ue=u("GasLessThanEstimate"),ie=u("PasswordsDontMatch"),se=u("PasswordIncorrect"),ce=u("RecommendSubAccountsToEmpty"),de=u("RecommendUndelegation"),le=u("TimeoutTagged"),fe=u("UnexpectedBootloader"),pe=u("MCUNotGenuineToDashboard"),be=u("RecipientRequired"),ye=u("UnavailableTezosOriginatedAccountReceive"),he=u("UnavailableTezosOriginatedAccountSend"),ve=u("UpdateFetchFileFail"),ge=u("UpdateIncorrectHash"),me=u("UpdateIncorrectSig"),_e=u("UpdateYourApp"),Oe=u("UserRefusedDeviceNameChange"),Pe=u("UserRefusedAddress"),je=u("UserRefusedFirmwareUpdate"),Ee=u("UserRefusedAllowManager"),Ae=u("UserRefusedOnDevice"),we=u("TransportOpenUserCancelled"),Se=u("TransportInterfaceNotAvailable"),Te=u("TransportRaceCondition"),Me=u("TransportWebUSBGestureRequired"),Ue=u("DeviceShouldStayInApp"),Ie=u("WebsocketConnectionError"),ke=u("WebsocketConnectionFailed"),De=u("WrongDeviceForAccount"),xe=u("WrongAppForCurrency"),Ce=u("ETHAddressNonEIP"),Ne=u("CantScanQRCode"),Re=u("FeeNotLoaded"),Le=u("FeeRequired"),Fe=u("FeeTooHigh"),Be=u("SyncError"),He=u("PairingFailed"),Ke=u("GenuineCheckFailed"),Ge=u("LedgerAPI4xx"),Ve=u("LedgerAPI5xx"),We=u("FirmwareOrAppUpdateRequired"),$e=u("NoDBPathGiven"),qe=u("DBWrongPassword"),ze=u("DBNotReset");function Ye(e,t){this.name="TransportError",this.message=e,this.stack=(new Error).stack,this.id=t}Ye.prototype=new Error,o("TransportError",(function(e){return new Ye(e.message,e.id)}));var Xe={PIN_REMAINING_ATTEMPTS:25536,INCORRECT_LENGTH:26368,MISSING_CRITICAL_PARAMETER:26624,COMMAND_INCOMPATIBLE_FILE_STRUCTURE:27009,SECURITY_STATUS_NOT_SATISFIED:27010,CONDITIONS_OF_USE_NOT_SATISFIED:27013,INCORRECT_DATA:27264,NOT_ENOUGH_MEMORY_SPACE:27268,REFERENCED_DATA_NOT_FOUND:27272,FILE_ALREADY_EXISTS:27273,INCORRECT_P1_P2:27392,INS_NOT_SUPPORTED:27904,CLA_NOT_SUPPORTED:28160,TECHNICAL_PROBLEM:28416,OK:36864,MEMORY_PROBLEM:37440,NO_EF_SELECTED:37888,INVALID_OFFSET:37890,FILE_NOT_FOUND:37892,INCONSISTENT_FILE:37896,ALGORITHM_NOT_SUPPORTED:38020,INVALID_KCV:38021,CODE_NOT_INITIALIZED:38914,ACCESS_CONDITION_NOT_FULFILLED:38916,CONTRADICTION_SECRET_CODE_STATUS:38920,CONTRADICTION_INVALIDATION:38928,CODE_BLOCKED:38976,MAX_VALUE_REACHED:38992,GP_AUTH_FAILED:25344,LICENSING:28482,HALTED:28586};function Je(e){switch(e){case 26368:return"Incorrect length";case 26624:return"Missing critical parameter";case 27010:return"Security not satisfied (dongle locked or have invalid access rights)";case 27013:return"Condition of use not satisfied (denied by the user?)";case 27264:return"Invalid data received";case 27392:return"Invalid parameter received"}if(28416<=e&&e<=28671)return"Internal error, please report"}function Ze(e){this.name="TransportStatusError";var t=Object.keys(Xe).find((function(t){return Xe[t]===e}))||"UNKNOWN_ERROR",r=Je(e)||t,n=e.toString(16);this.message="Ledger device: "+r+" (0x"+n+")",this.stack=(new Error).stack,this.statusCode=e,this.statusText=t}Ze.prototype=new Error,o("TransportStatusError",(function(e){return new Ze(e.statusCode)}))},657:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.format=b,t.default=function(e){const t=(e.toUpperCase()+":").padStart(16);let r;try{const t=!1,n=(Object({NODE_ENV:"production",VERSION:"0.62.2-2",WS_URL:void 0}).DEBUG||"").split(",");r=t||!!n.find(t=>e.startsWith(t))}catch(e){r=!1}return{debug:r?(...e)=>y("debug",t,e):h,error:(...e)=>y("error",t,e),log:(...e)=>y("log",t,e),noop:h,warn:(...e)=>y("warn",t,e)}};var a=n(r(1230)),o=n(r(660)),u=n(r(661)),i=n(r(466)),s=n(r(279)),c=n(r(467)),d=n(r(663)),l=n(r(346));const f={debug:"log",error:"error",log:"log",warn:"warn"},p={debug:a.default.gray,error:a.default.red,log:a.default.reset,warn:a.default.yellow};function b(e){return Array.isArray(e)?e.map(b):(0,u.default)(e)?e.toString():(0,i.default)(e)?"0x"+e.toString("hex"):(0,d.default)(e)?(0,l.default)(e):e&&(0,c.default)(e)&&e.constructor===Object?function(e){return Object.keys(e).reduce((t,r)=>(t[r]=b(e[r]),t),{})}(e):e}function y(e,t,r){if(1===r.length&&(0,s.default)(r[0])){const n=r[0]();return y(e,t,Array.isArray(n)?n:[n])}const n=t=>p[e](t);console[f[e]](n((0,o.default)(new Date)),n(t),...r.map(b))}function h(){}},660:function(e,t,r){"use strict";function n(e){return e.toString().padStart(2,"0")}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const t=e.getFullYear().toString(),r=n(e.getMonth()+1),a=n(e.getDate()),o=n(e.getHours()),u=n(e.getMinutes()),i=n(e.getSeconds());return`${t}-${r}-${a} ${o}:${u}:${i}`}},661:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return a.default.isBN(e)};var a=n(r(18))},663:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,a.default)(e,Uint8Array)};var a=n(r(345))},664:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0});var a={bnFromHex:!0,bnMax:!0,bnMin:!0,bnSqrt:!0,bnToBn:!0,bnToHex:!0,bnToU8a:!0};Object.defineProperty(t,"bnFromHex",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"bnMax",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"bnMin",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"bnSqrt",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"bnToBn",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"bnToHex",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"bnToU8a",{enumerable:!0,get:function(){return f.default}});var o=r(1243);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(a,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))}));var u=n(r(1244)),i=n(r(1245)),s=n(r(1246)),c=n(r(1247)),d=n(r(349)),l=n(r(1248)),f=n(r(666))},665:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return"bigint"==typeof e}},666:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(8)),o=n(r(471)),u=n(r(349));function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}var s=function(e,t={bitLength:-1,isLe:!0,isNegative:!1},r){const n=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach((function(t){(0,a.default)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({bitLength:-1,isLe:!0,isNegative:!1},(0,o.default)(t)?{bitLength:t,isLe:r}:t),s=(0,u.default)(e),c=-1===n.bitLength?Math.ceil(s.bitLength()/8):Math.ceil((n.bitLength||0)/8);if(!e)return-1===n.bitLength?new Uint8Array:new Uint8Array(c);const d=new Uint8Array(c),l=n.isNegative?s.toTwos(8*c):s;return d.set(l.toArray(n.isLe?"le":"be",c),0),d};t.default=s},667:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return new Uint8Array(e||[])}},668:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return function(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}((0,a.default)(e),(0,a.default)(t))};var a=n(r(283))},669:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(null==e?void 0:e.length)?a.decode(e):""};const a=new(n(r(1255)).default)("utf-8")},670:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const t=(0,u.bnToBn)(e);if(t.lte(s))return new Uint8Array([t.toNumber()<<2]);if(t.lte(c))return(0,u.bnToU8a)(t.shln(2).addn(1),16,!0);if(t.lte(d))return(0,u.bnToU8a)(t.shln(2).addn(2),32,!0);const r=(0,u.bnToU8a)(t);let n=r.length;for(;0===r[n-1];)n--;return(0,o.default)(n>=4,"Previous tests match anyting less than 2^30; qed"),(0,i.u8aConcat)(new Uint8Array([3+(n-4<<2)]),r.subarray(0,n))};var a=n(r(18)),o=n(r(198)),u=r(664),i=r(282);const s=new a.default(2).pow(new a.default(6)).subn(1),c=new a.default(2).pow(new a.default(14)).subn(1),d=new a.default(2).pow(new a.default(30)).subn(1)},671:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t=u.DEFAULT_BITLENGTH){const r=(0,o.u8aToU8a)(e),n=3&r[0];if(0===n)return[1,new a.default(r[0]).shrn(2)];if(1===n)return[2,(0,o.u8aToBn)(r.slice(0,2),!0).shrn(2)];if(2===n)return[4,(0,o.u8aToBn)(r.slice(0,4),!0).shrn(2)];const i=1+new a.default(r[0]).shrn(2).addn(4).toNumber();return[i,(0,o.u8aToBn)(r.subarray(1,i),!0)]};var a=n(r(18)),o=r(282),u=r(473)},672:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findSi=a,t.calcSi=function(e,t,r){if(r)return a(r);const o=7+Math.ceil((e.length-t)/3);return n[o]||n[o<0?0:n.length-1]},t.SI=t.SI_MID=void 0;t.SI_MID=8;const n=[{power:-24,text:"yocto",value:"y"},{power:-21,text:"zepto",value:"z"},{power:-18,text:"atto",value:"a"},{power:-15,text:"femto",value:"f"},{power:-12,text:"pico",value:"p"},{power:-9,text:"nano",value:"n"},{power:-6,text:"micro",value:"µ"},{power:-3,text:"milli",value:"m"},{power:0,text:"Unit",value:"-"},{power:3,text:"Kilo",value:"k"},{power:6,text:"Mega",value:"M"},{power:9,text:"Giga",value:"G"},{power:12,text:"Tera",value:"T"},{power:15,text:"Peta",value:"P"},{power:18,text:"Exa",value:"E"},{power:21,text:"Zeta",value:"Z"},{power:24,text:"Yotta",value:"Y"}];function a(e){for(let t=0;t<n.length;t++)if(n[t].value===e)return n[t];return n[8]}t.SI=n},673:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if(e&&(0,a.default)(e))return e;return`0x${e&&e.length%2==1?"0":""}${e||""}`};var a=n(r(469))},674:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t=-1,r=!1){const n=Math.ceil(t/4),u=n+2;return(0,a.default)(-1===t||e.length===u||!r&&e.length<u?(0,o.default)(e):e.length>u?(0,o.default)(e).slice(-1*n):`${"0".repeat(n)}${(0,o.default)(e)}`.slice(-1*n))};var a=n(r(673)),o=n(r(348))},675:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t=-1){if((0,u.default)(e)||(0,o.default)(e)||isNaN(e))return"0x";return(0,a.default)(e.toString(16),t,!0)};var a=n(r(674)),o=n(r(347)),u=n(r(232))},676:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"CRYPTOS",{enumerable:!0,get:function(){return n.CRYPTOS}}),Object.defineProperty(t,"CRYPTOS_ETH",{enumerable:!0,get:function(){return n.CRYPTOS_ETH}}),Object.defineProperty(t,"ENDPOINTS",{enumerable:!0,get:function(){return a.ENDPOINTS}}),Object.defineProperty(t,"ENDPOINT_DEFAULT",{enumerable:!0,get:function(){return a.ENDPOINT_DEFAULT}}),Object.defineProperty(t,"LEDGER_CONN",{enumerable:!0,get:function(){return o.LEDGER_CONN}}),Object.defineProperty(t,"LEDGER_CONN_DEFAULT",{enumerable:!0,get:function(){return o.LEDGER_CONN_DEFAULT}}),Object.defineProperty(t,"PREFIXES",{enumerable:!0,get:function(){return u.PREFIXES}}),Object.defineProperty(t,"PREFIX_DEFAULT",{enumerable:!0,get:function(){return u.PREFIX_DEFAULT}}),Object.defineProperty(t,"ICON_DEFAULT",{enumerable:!0,get:function(){return i.ICON_DEFAULT}}),Object.defineProperty(t,"ICON_DEFAULT_HOST",{enumerable:!0,get:function(){return i.ICON_DEFAULT_HOST}}),Object.defineProperty(t,"ICONS",{enumerable:!0,get:function(){return i.ICONS}}),Object.defineProperty(t,"UIMODE_DEFAULT",{enumerable:!0,get:function(){return i.UIMODE_DEFAULT}}),Object.defineProperty(t,"UIMODES",{enumerable:!0,get:function(){return i.UIMODES}}),Object.defineProperty(t,"UITHEME_DEFAULT",{enumerable:!0,get:function(){return i.UITHEME_DEFAULT}}),Object.defineProperty(t,"UITHEMES",{enumerable:!0,get:function(){return i.UITHEMES}}),t.LOCKING=t.LOCKING_DEFAULT=t.LANGUAGE_DEFAULT=t.CAMERA=t.CAMERA_DEFAULT=void 0;var n=r(1287),a=r(1288),o=r(1289),u=r(1290),i=r(1291);t.CAMERA_DEFAULT="off";t.CAMERA=[{info:"on",text:"Allow camera access",value:"on"},{info:"off",text:"Do not allow camera access",value:"off"}];t.LANGUAGE_DEFAULT="default";t.LOCKING_DEFAULT="session";t.LOCKING=[{info:"session",text:"Once per session",value:"session"},{info:"tx",text:"On each transaction",value:"tx"}]},751:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,o.default)((0,a.u8aConcat)(u,e),512)};var a=r(3),o=n(r(158));const u=(0,a.stringToU8a)("SS58PRE")},753:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return(0,o.default)((0,a.u8aConcat)(i,(0,a.compactToU8a)(e.length),...(0,a.u8aSorted)(e.map(e=>(0,u.default)(e))),(0,a.bnToU8a)(t,{bitLength:16,isLe:!0})))};var a=r(3),o=n(r(158)),u=n(r(159));const i=(0,a.stringToU8a)("modlpy/utilisuba")},754:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return(0,o.default)((0,a.u8aConcat)(i,(0,u.default)(e),(0,a.bnToU8a)(t,{bitLength:16,isLe:!0})))};var a=r(3),o=n(r(158)),u=n(r(159));const i=(0,a.stringToU8a)("modlpy/utilisuba")},755:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"keyExtractPath",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"keyExtractSuri",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"keyFromPath",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"keyHdkdEd25519",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"keyHdkdSr25519",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"keyHdkdEcdsa",{enumerable:!0,get:function(){return s.default}});var a=n(r(756)),o=n(r(1436)),u=n(r(1437)),i=n(r(757)),s=n(r(762))},756:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const t=e.match(u),r=[];let n="";t&&(n=t.join(""),t.forEach(e=>{r.push(a.default.from(e.substr(1)))}));return(0,o.assert)(n===e,`Re-constructed path "${n}" does not match input`),{parts:t,path:r}};var a=n(r(1435)),o=r(3);const u=/\/(\/?)([^/]+)/g},757:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,{chainCode:t,isHard:r}){return(0,a.assert)(r,"A soft key was found in the path (and is unsupported)"),(0,u.default)((0,o.default)(e.secretKey.subarray(0,32),t))};var a=r(3),o=n(r(758)),u=n(r(504))},758:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return(0,o.default)((0,a.u8aConcat)(u,e,t))};var a=r(3),o=n(r(158));const u=(0,a.compactAddLength)((0,a.stringToU8a)("Ed25519HDKD"))},759:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return(0,o.default)((0,a.sr25519DeriveKeypairHard)((0,u.default)(e),t))},r(97);var a=r(57),o=n(r(505)),u=n(r(760))},760:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function({publicKey:e,secretKey:t}){return(0,n.u8aConcat)(t,e).slice()};var n=r(3)},761:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return(0,o.default)((0,a.sr25519DeriveKeypairSoft)((0,u.default)(e),t))},r(97);var a=r(57),o=n(r(505)),u=n(r(760))},762:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,{chainCode:t,isHard:r}){return(0,a.assert)(r,"A soft key was found in the path (and is unsupported)"),(0,u.default)((0,o.default)(e.secretKey.subarray(0,32),t))};var a=r(3),o=n(r(1440)),u=n(r(763))},763:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,o.assert)(32===e.length,"Expected valid 32-byte private key as a seed");const t=u.keyFromPrivate(e);return{publicKey:new Uint8Array(t.getPublic().encodeCompressed()),secretKey:(0,o.bnToU8a)(t.getPrivate(),{bitLength:256,isLe:!1})}};var a=n(r(139)),o=r(3);const u=new(0,a.default.ec)("secp256k1")},764:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"schnorrkelDeriveHard",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"schnorrkelDerivePublic",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"schnorrkelDeriveSoft",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"schnorrkelKeypairFromSeed",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"schnorrkelSign",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"schnorrkelVerify",{enumerable:!0,get:function(){return c.default}}),r(97);var a=n(r(759)),o=n(r(1441)),u=n(r(761)),i=n(r(1442)),s=n(r(1443)),c=n(r(765))},765:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){const o=(0,n.u8aToU8a)(e),u=(0,n.u8aToU8a)(r),i=(0,n.u8aToU8a)(t);return(0,n.assert)(32===u.length,`Invalid publicKey, received ${u.length} bytes, expected 32`),(0,n.assert)(64===i.length,`Invalid signature, received ${i.length} bytes, expected 64`),(0,a.sr25519Verify)(i,o,u)},r(97);var n=r(3),a=r(57)},766:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){const r=a.bs58.encode((0,n.u8aToBuffer)((0,n.u8aToU8a)(e)));return t?"z"+r:r};var n=r(3),a=r(502)},767:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"blake2AsHex",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"blake2AsU8a",{enumerable:!0,get:function(){return o.default}});var a=n(r(1461)),o=n(r(158))},768:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,u.isReady)()?(0,u.keccak256)((0,o.u8aToU8a)(e)):new Uint8Array(a.default.keccak256.update((0,o.u8aToU8a)(e)).arrayBuffer())};var a=n(r(1465)),o=r(3),u=r(57)},769:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"secp256k1Compress",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"secp256k1Expand",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"secp256k1KeypairFromSeed",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"secp256k1Recover",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"secp256k1Verify",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"secp256k1Sign",{enumerable:!0,get:function(){return c.default}});var a=n(r(1467)),o=n(r(770)),u=n(r(763)),i=n(r(1468)),s=n(r(771)),c=n(r(1469))},770:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,o.assert)([33,65].includes(e.length),"Invalid publicKey provided");const t=u.keyFromPublic(e).getPublic();return(0,o.u8aConcat)((0,o.bnToU8a)(t.getX(),{bitLength:256,isLe:!1}),(0,o.bnToU8a)(t.getY(),{bitLength:256,isLe:!1}))};var a=n(r(139)),o=r(3);const u=new(0,a.default.ec)("secp256k1")},771:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r,n="blake2",a=!1){const c=(0,o.u8aToU8a)(t);(0,o.assert)(65===c.length,`Expected signature with 65 bytes, ${c.length} found instead`);const d=new Uint8Array(s.recoverPubKey((0,i.default)(n,e),{r:c.slice(0,32),s:c.slice(32,64)},c[64]).encodeCompressed());return(0,o.u8aEq)((0,i.default)(n,a?(0,u.default)(d):d),(0,o.u8aToU8a)(r))};var a=n(r(139)),o=r(3),u=n(r(770)),i=n(r(772));const s=new(0,a.default.ec)("secp256k1")},772:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if("blake2"===e)return(0,n.blake2AsU8a)(t);if("keccak"===e)return(0,a.keccakAsU8a)(t);throw new Error(`Unsupported secp256k1 hasher '${e}', expected one of ${o.join(", ")}`)};var n=r(767),a=r(362);const o=["blake2","keccak"]},773:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const t=e.replace("0x",""),r=(0,n.u8aToHex)((0,a.keccakAsU8a)(t.toLowerCase()),-1,!1);for(let e=0;e<40;e++){const n=t[e],a=parseInt(r[e],16);if(a>7&&n!==n.toUpperCase()||a<=7&&n!==n.toLowerCase())return!1}return!0};var n=r(3),a=r(362)},775:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,o.isReady)()?(0,o.bip39ToEntropy)(e):(0,a.hexToU8a)((0,a.hexAddPrefix)((0,n.mnemonicToEntropy)(e)))},r(97);var n=r(363),a=r(3),o=r(57)},776:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){const n=(0,o.u8aToU8a)(e),i=(0,o.u8aToU8a)(r),s=(0,o.u8aToU8a)(t);return(0,o.assert)(32===i.length,`Invalid publicKey, received ${i.length}, expected 32`),(0,o.assert)(64===s.length,`Invalid signature, received ${s.length} bytes, expected 64`),(0,u.isReady)()?(0,u.ed25519Verify)(s,n,i):a.default.sign.detached.verify(n,s,i)};var a=n(r(112)),o=r(3),u=r(57)},777:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e=32){return(0,a.u8aToHex)((0,o.default)(e))};var a=r(3),o=n(r(239))},779:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_PARAMS=void 0;t.DEFAULT_PARAMS={N:32768,p:1,r:8}},780:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t=64){const r=Math.ceil(t/64);if((0,o.isReady)())return(0,o.twox)((0,a.u8aToU8a)(e),r);const n=new Uint8Array(Math.ceil(t/8));for(let t=0;t<r;t++)n.set((0,u.default)(e,t).toArray("le",8),8*t);return n};var a=r(3),o=r(57),u=n(r(1511))},81:function(e,t,r){"use strict";var n=r(2);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Settings",{enumerable:!0,get:function(){return a.Settings}}),Object.defineProperty(t,"ENDPOINT_DEFAULT",{enumerable:!0,get:function(){return o.ENDPOINT_DEFAULT}}),Object.defineProperty(t,"ICON_DEFAULT",{enumerable:!0,get:function(){return o.ICON_DEFAULT}}),Object.defineProperty(t,"ICON_DEFAULT_HOST",{enumerable:!0,get:function(){return o.ICON_DEFAULT_HOST}}),Object.defineProperty(t,"LANGUAGE_DEFAULT",{enumerable:!0,get:function(){return o.LANGUAGE_DEFAULT}}),Object.defineProperty(t,"LOCKING_DEFAULT",{enumerable:!0,get:function(){return o.LOCKING_DEFAULT}}),Object.defineProperty(t,"PREFIX_DEFAULT",{enumerable:!0,get:function(){return o.PREFIX_DEFAULT}}),Object.defineProperty(t,"UIMODE_DEFAULT",{enumerable:!0,get:function(){return o.UIMODE_DEFAULT}}),Object.defineProperty(t,"UITHEME_DEFAULT",{enumerable:!0,get:function(){return o.UITHEME_DEFAULT}}),Object.defineProperty(t,"SettingsStruct",{enumerable:!0,get:function(){return u.SettingsStruct}}),Object.defineProperty(t,"NetworkSpecsStruct",{enumerable:!0,get:function(){return u.NetworkSpecsStruct}}),t.default=void 0;var a=n(r(1222)),o=r(676),u=r(1293),i=a.default;t.default=i},820:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||t.hasOwnProperty(r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0});var o=r(1818);Object.defineProperty(t,"Mainnet",{enumerable:!0,get:function(){return o.default}});var u=r(1822);Object.defineProperty(t,"Beresheet",{enumerable:!0,get:function(){return u.default}});var i=r(1823);Object.defineProperty(t,"dev",{enumerable:!0,get:function(){return i.default}}),a(r(1824),t)},821:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"authority",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"graduallyUpdates",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"oracle",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"tokens",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"traits",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"vesting",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"rewards",{enumerable:!0,get:function(){return d.default}});var a=n(r(1833)),o=n(r(1834)),u=n(r(1835)),i=n(r(1836)),s=n(r(1837)),c=n(r(1838)),d=n(r(1839))},822:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n={kusama:["0x3fd7b9eb6a00376e5be61f01abb429ffb0b104be05eaff4d458da48fcd425baf","0xe3777fa922cafbff200cadeaea1a76bd7898ad5b89f7848999058b50e715f636","0xb0a8d493285c2df73290dfb7e61f870f17b41801197a149ca93654499ea3dafe"],polkadot:["0x91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3"]};t.default=n},823:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEV_SEED=t.DEV_PHRASE=void 0;t.DEV_PHRASE="bottom drive obey lake curtain smoke basket hold race lonely fit walk";t.DEV_SEED="0xfac7959dbfe72f052e5a0c3c8d6530f202b02fd8f9f5ca3580ec8deb7797479e"},824:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){const r=(0,n.isUndefined)(t)?e.length>15?`${e.slice(0,6)}…${e.slice(-6)}`:e:t;return{key:e,name:r,value:e}};var n=r(3)},825:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(16),o=r(3),u=n(r(1891));let i=!1;const s=(e,t)=>{const r=e.option.name,n=t.option.name;return r.localeCompare(n)},c=(e,t)=>{const r=e.json.meta.whenCreated||0,n=t.json.meta.whenCreated||0;return r<n?1:r>n?-1:0};var d=new class{constructor(){this.optionsSubject=new a.BehaviorSubject(this.emptyOptions())}createOptionHeader(e){return{key:"header-"+e.toLowerCase(),name:e,value:null}}init(e){(0,o.assert)(!i,"Unable to initialise options more than once"),u.default.subscribe(()=>{const t=this.emptyOptions();this.addAccounts(e,t),this.addAddresses(e,t),this.addContracts(e,t),t.address=this.linkItems({Addresses:t.address,Recent:t.recent}),t.account=this.linkItems({Accounts:t.account,Development:t.testing}),t.contract=this.linkItems({Contracts:t.contract}),t.all=[].concat(t.account,t.address),t.allPlus=[].concat(t.account,t.address,t.contract),this.optionsSubject.next(t)}),i=!0}linkItems(e){return Object.keys(e).reduce((t,r)=>{const n=e[r];return t.concat(n.length?[this.createOptionHeader(r)]:[],n)},[])}addAccounts(e,t){const r=e.accounts.subject.getValue();Object.values(r).sort(s).forEach(({json:{meta:{isTesting:e=!1}},option:r})=>{e?t.testing.push(r):t.account.push(r)})}addAddresses(e,t){const r=e.addresses.subject.getValue();Object.values(r).filter(({json:e})=>!!e.meta.isRecent).sort(c).forEach(({option:e})=>{t.recent.push(e)}),Object.values(r).filter(({json:e})=>!e.meta.isRecent).sort(s).forEach(({option:e})=>{t.address.push(e)})}addContracts(e,t){const r=e.contracts.subject.getValue();Object.values(r).sort(s).forEach(({option:e})=>{t.contract.push(e)})}emptyOptions(){return{account:[],address:[],all:[],allPlus:[],contract:[],recent:[],testing:[]}}};t.default=d},836:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SUBSTRATE_ID=t.SEED_PREFIX=t.FRAME_SIZE=t.CRYPTO_SR25519=t.CMD_SIGN_MSG=t.CMD_SIGN_IMMORTAL_TX=t.CMD_SIGN_TX_HASH=t.CMD_SIGN_TX=t.ADDRESS_PREFIX=void 0;t.ADDRESS_PREFIX="substrate";t.SEED_PREFIX="secret";t.FRAME_SIZE=1024;const n=new Uint8Array([83]);t.SUBSTRATE_ID=n;const a=new Uint8Array([1]);t.CRYPTO_SR25519=a;const o=new Uint8Array([0]);t.CMD_SIGN_TX=o;const u=new Uint8Array([1]);t.CMD_SIGN_TX_HASH=u;const i=new Uint8Array([2]);t.CMD_SIGN_IMMORTAL_TX=i;const s=new Uint8Array([3]);t.CMD_SIGN_MSG=s},837:function(e,t,r){"use strict";var n=r(0),a=r(2);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=a(r(1)),u=n(r(1946)),i=n(r(7)),s=r(300);const c=e=>{console.error("@polkadot/react-qr:Scan",e.message)};var d=o.default.memo((0,i.default)((function({className:e,delay:t=150,onError:r=c,onScan:n,size:a,style:i}){const d=(0,o.useMemo)(()=>(0,s.createImgSize)(a),[a]),l=(0,o.useCallback)(e=>r(e),[r]),f=(0,o.useCallback)(e=>e&&n(e),[n]);return o.default.createElement("div",{className:e,style:d},o.default.createElement(u.default,{className:"ui--qr-Scan",delay:t,onError:l,onScan:f,style:i}))})).withConfig({displayName:"Scan",componentId:"zwjyub-0"})([".ui--qr-Scan{display:inline-block;height:100%;transform:matrix(-1,0,0,1,0,0);width:100%;video{margin:0;}}"]));t.default=d},921:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0});var a={};t.default=void 0;var o=n(r(2234)),u=r(922);Object.keys(u).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(a,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return u[e]}}))}));var i=o.default;t.default=i},922:function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Beachball",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"Empty",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"Jdenticon",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"Polkadot",{enumerable:!0,get:function(){return i.default}});var a=n(r(2238)),o=n(r(2255)),u=n(r(2256)),i=n(r(2258))},923:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2239);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}))},925:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}},97:function(e,t,r){"use strict";r(1323)}}]);