From 9270bdfcc4098575b48b961c288c3d4a009c15dd Mon Sep 17 00:00:00 2001 From: cebgcontract <99630598+cebgcontract@users.noreply.github.com> Date: Tue, 8 Nov 2022 19:38:28 +0800 Subject: [PATCH] update wallet lib --- js/jcwallet.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/jcwallet.js b/js/jcwallet.js index c0cb44f..03742f8 100644 --- a/js/jcwallet.js +++ b/js/jcwallet.js @@ -41,7 +41,7 @@ return function(t){var r=e,n=r.lib,a=n.WordArray,i=n.Hasher,o=r.algo,c=a.create( * derived from CryptoJS.mode.CTR * Jan Hruby jhruby.web@gmail.com */ -return e.mode.CTRGladman=function(){var t=e.lib.BlockCipherMode.extend();function r(e){if(255==(e>>24&255)){var t=e>>16&255,r=e>>8&255,n=255&e;255===t?(t=0,255===r?(r=0,255===n?n=0:++n):++r):++t,e=0,e+=t<<16,e+=r<<8,e+=n}else e+=1<<24;return e}var n=t.Encryptor=t.extend({processBlock:function(e,t){var n=this._cipher,a=n.blockSize,i=this._iv,o=this._counter;i&&(o=this._counter=i.slice(0),this._iv=void 0),function(e){0===(e[0]=r(e[0]))&&(e[1]=r(e[1]))}(o);var c=o.slice(0);n.encryptBlock(c,0);for(var f=0;f>>2]|=a<<24-i%4*8,e.sigBytes+=a},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},e.pad.Ansix923},"object"===c(t)?e.exports=t=o(r(2),r(12)):(a=[r(2),r(12)],void 0===(i="function"==typeof(n=o)?n.apply(t,a):n)||(e.exports=i))},function(e,t,r){var n,a,i,o;function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}o=function(e){return e.pad.Iso10126={pad:function(t,r){var n=4*r,a=n-t.sigBytes%n;t.concat(e.lib.WordArray.random(a-1)).concat(e.lib.WordArray.create([a<<24],1))},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},e.pad.Iso10126},"object"===c(t)?e.exports=t=o(r(2),r(12)):(a=[r(2),r(12)],void 0===(i="function"==typeof(n=o)?n.apply(t,a):n)||(e.exports=i))},function(e,t,r){var n,a,i,o;function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}o=function(e){return e.pad.Iso97971={pad:function(t,r){t.concat(e.lib.WordArray.create([2147483648],1)),e.pad.ZeroPadding.pad(t,r)},unpad:function(t){e.pad.ZeroPadding.unpad(t),t.sigBytes--}},e.pad.Iso97971},"object"===c(t)?e.exports=t=o(r(2),r(12)):(a=[r(2),r(12)],void 0===(i="function"==typeof(n=o)?n.apply(t,a):n)||(e.exports=i))},function(e,t,r){var n,a,i,o;function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}o=function(e){return e.pad.ZeroPadding={pad:function(e,t){var r=4*t;e.clamp(),e.sigBytes+=r-(e.sigBytes%r||r)},unpad:function(e){var t=e.words,r=e.sigBytes-1;for(r=e.sigBytes-1;r>=0;r--)if(t[r>>>2]>>>24-r%4*8&255){e.sigBytes=r+1;break}}},e.pad.ZeroPadding},"object"===c(t)?e.exports=t=o(r(2),r(12)):(a=[r(2),r(12)],void 0===(i="function"==typeof(n=o)?n.apply(t,a):n)||(e.exports=i))},function(e,t,r){var n,a,i,o;function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}o=function(e){return e.pad.NoPadding={pad:function(){},unpad:function(){}},e.pad.NoPadding},"object"===c(t)?e.exports=t=o(r(2),r(12)):(a=[r(2),r(12)],void 0===(i="function"==typeof(n=o)?n.apply(t,a):n)||(e.exports=i))},function(e,t,r){var n,a,i,o;function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}o=function(e){var t,r,n;return r=(t=e).lib.CipherParams,n=t.enc.Hex,t.format.Hex={stringify:function(e){return e.ciphertext.toString(n)},parse:function(e){var t=n.parse(e);return r.create({ciphertext:t})}},e.format.Hex},"object"===c(t)?e.exports=t=o(r(2),r(12)):(a=[r(2),r(12)],void 0===(i="function"==typeof(n=o)?n.apply(t,a):n)||(e.exports=i))},function(e,t,r){var n,a,i,o;function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}o=function(e){return function(){var t=e,r=t.lib.BlockCipher,n=t.algo,a=[],i=[],o=[],c=[],f=[],d=[],s=[],u=[],b=[],h=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var r=0,n=0;for(t=0;t<256;t++){var l=n^n<<1^n<<2^n<<3^n<<4;l=l>>>8^255&l^99,a[r]=l,i[l]=r;var p=e[r],m=e[p],x=e[m],y=257*e[l]^16843008*l;o[r]=y<<24|y>>>8,c[r]=y<<16|y>>>16,f[r]=y<<8|y>>>24,d[r]=y,y=16843009*x^65537*m^257*p^16843008*r,s[l]=y<<24|y>>>8,u[l]=y<<16|y>>>16,b[l]=y<<8|y>>>24,h[l]=y,r?(r=p^e[e[e[x^p]]],n^=e[e[n]]):r=n=1}}();var l=[0,1,2,4,8,16,32,64,128,27,54],p=n.AES=r.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,r=e.sigBytes/4,n=4*((this._nRounds=r+6)+1),i=this._keySchedule=[],o=0;o6&&o%r==4&&(d=a[d>>>24]<<24|a[d>>>16&255]<<16|a[d>>>8&255]<<8|a[255&d]):(d=a[(d=d<<8|d>>>24)>>>24]<<24|a[d>>>16&255]<<16|a[d>>>8&255]<<8|a[255&d],d^=l[o/r|0]<<24),i[o]=i[o-r]^d);for(var c=this._invKeySchedule=[],f=0;f>>24]]^u[a[d>>>16&255]]^b[a[d>>>8&255]]^h[a[255&d]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,o,c,f,d,a)},decryptBlock:function(e,t){var r=e[t+1];e[t+1]=e[t+3],e[t+3]=r,this._doCryptBlock(e,t,this._invKeySchedule,s,u,b,h,i),r=e[t+1],e[t+1]=e[t+3],e[t+3]=r},_doCryptBlock:function(e,t,r,n,a,i,o,c){for(var f=this._nRounds,d=e[t]^r[0],s=e[t+1]^r[1],u=e[t+2]^r[2],b=e[t+3]^r[3],h=4,l=1;l>>24]^a[s>>>16&255]^i[u>>>8&255]^o[255&b]^r[h++],m=n[s>>>24]^a[u>>>16&255]^i[b>>>8&255]^o[255&d]^r[h++],x=n[u>>>24]^a[b>>>16&255]^i[d>>>8&255]^o[255&s]^r[h++],y=n[b>>>24]^a[d>>>16&255]^i[s>>>8&255]^o[255&u]^r[h++];d=p,s=m,u=x,b=y}p=(c[d>>>24]<<24|c[s>>>16&255]<<16|c[u>>>8&255]<<8|c[255&b])^r[h++],m=(c[s>>>24]<<24|c[u>>>16&255]<<16|c[b>>>8&255]<<8|c[255&d])^r[h++],x=(c[u>>>24]<<24|c[b>>>16&255]<<16|c[d>>>8&255]<<8|c[255&s])^r[h++],y=(c[b>>>24]<<24|c[d>>>16&255]<<16|c[s>>>8&255]<<8|c[255&u])^r[h++],e[t]=p,e[t+1]=m,e[t+2]=x,e[t+3]=y},keySize:8});t.AES=r._createHelper(p)}(),e.AES},"object"===c(t)?e.exports=t=o(r(2),r(31),r(28),r(24),r(12)):(a=[r(2),r(31),r(28),r(24),r(12)],void 0===(i="function"==typeof(n=o)?n.apply(t,a):n)||(e.exports=i))},function(e,t,r){var n,a,i,o;function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}o=function(e){return function(){var t=e,r=t.lib,n=r.WordArray,a=r.BlockCipher,i=t.algo,o=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],c=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],f=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],d=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],s=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],u=i.DES=a.extend({_doReset:function(){for(var e=this._key.words,t=[],r=0;r<56;r++){var n=o[r]-1;t[r]=e[n>>>5]>>>31-n%32&1}for(var a=this._subKeys=[],i=0;i<16;i++){var d=a[i]=[],s=f[i];for(r=0;r<24;r++)d[r/6|0]|=t[(c[r]-1+s)%28]<<31-r%6,d[4+(r/6|0)]|=t[28+(c[r+24]-1+s)%28]<<31-r%6;for(d[0]=d[0]<<1|d[0]>>>31,r=1;r<7;r++)d[r]=d[r]>>>4*(r-1)+3;d[7]=d[7]<<5|d[7]>>>27}var u=this._invSubKeys=[];for(r=0;r<16;r++)u[r]=a[15-r]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._subKeys)},decryptBlock:function(e,t){this._doCryptBlock(e,t,this._invSubKeys)},_doCryptBlock:function(e,t,r){this._lBlock=e[t],this._rBlock=e[t+1],b.call(this,4,252645135),b.call(this,16,65535),h.call(this,2,858993459),h.call(this,8,16711935),b.call(this,1,1431655765);for(var n=0;n<16;n++){for(var a=r[n],i=this._lBlock,o=this._rBlock,c=0,f=0;f<8;f++)c|=d[f][((o^a[f])&s[f])>>>0];this._lBlock=o,this._rBlock=i^c}var u=this._lBlock;this._lBlock=this._rBlock,this._rBlock=u,b.call(this,1,1431655765),h.call(this,8,16711935),h.call(this,2,858993459),b.call(this,16,65535),b.call(this,4,252645135),e[t]=this._lBlock,e[t+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function b(e,t){var r=(this._lBlock>>>e^this._rBlock)&t;this._rBlock^=r,this._lBlock^=r<>>e^this._lBlock)&t;this._lBlock^=r,this._rBlock^=r<192.");var t=e.slice(0,2),r=e.length<4?e.slice(0,2):e.slice(2,4),a=e.length<6?e.slice(0,2):e.slice(4,6);this._des1=u.createEncryptor(n.create(t)),this._des2=u.createEncryptor(n.create(r)),this._des3=u.createEncryptor(n.create(a))},encryptBlock:function(e,t){this._des1.encryptBlock(e,t),this._des2.decryptBlock(e,t),this._des3.encryptBlock(e,t)},decryptBlock:function(e,t){this._des3.decryptBlock(e,t),this._des2.encryptBlock(e,t),this._des1.decryptBlock(e,t)},keySize:6,ivSize:2,blockSize:2});t.TripleDES=a._createHelper(l)}(),e.TripleDES},"object"===c(t)?e.exports=t=o(r(2),r(31),r(28),r(24),r(12)):(a=[r(2),r(31),r(28),r(24),r(12)],void 0===(i="function"==typeof(n=o)?n.apply(t,a):n)||(e.exports=i))},function(e,t,r){var n,a,i,o;function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}o=function(e){return function(){var t=e,r=t.lib.StreamCipher,n=t.algo,a=n.RC4=r.extend({_doReset:function(){for(var e=this._key,t=e.words,r=e.sigBytes,n=this._S=[],a=0;a<256;a++)n[a]=a;a=0;for(var i=0;a<256;a++){var o=a%r,c=t[o>>>2]>>>24-o%4*8&255;i=(i+n[a]+c)%256;var f=n[a];n[a]=n[i],n[i]=f}this._i=this._j=0},_doProcessBlock:function(e,t){e[t]^=i.call(this)},keySize:8,ivSize:0});function i(){for(var e=this._S,t=this._i,r=this._j,n=0,a=0;a<4;a++){r=(r+e[t=(t+1)%256])%256;var i=e[t];e[t]=e[r],e[r]=i,n|=e[(e[t]+e[r])%256]<<24-8*a}return this._i=t,this._j=r,n}t.RC4=r._createHelper(a);var o=n.RC4Drop=a.extend({cfg:a.cfg.extend({drop:192}),_doReset:function(){a._doReset.call(this);for(var e=this.cfg.drop;e>0;e--)i.call(this)}});t.RC4Drop=r._createHelper(o)}(),e.RC4},"object"===c(t)?e.exports=t=o(r(2),r(31),r(28),r(24),r(12)):(a=[r(2),r(31),r(28),r(24),r(12)],void 0===(i="function"==typeof(n=o)?n.apply(t,a):n)||(e.exports=i))},function(e,t,r){var n,a,i,o;function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}o=function(e){return function(){var t=e,r=t.lib.StreamCipher,n=t.algo,a=[],i=[],o=[],c=n.Rabbit=r.extend({_doReset:function(){for(var e=this._key.words,t=this.cfg.iv,r=0;r<4;r++)e[r]=16711935&(e[r]<<8|e[r]>>>24)|4278255360&(e[r]<<24|e[r]>>>8);var n=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],a=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];for(this._b=0,r=0;r<4;r++)f.call(this);for(r=0;r<8;r++)a[r]^=n[r+4&7];if(t){var i=t.words,o=i[0],c=i[1],d=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),s=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),u=d>>>16|4294901760&s,b=s<<16|65535&d;for(a[0]^=d,a[1]^=u,a[2]^=s,a[3]^=b,a[4]^=d,a[5]^=u,a[6]^=s,a[7]^=b,r=0;r<4;r++)f.call(this)}},_doProcessBlock:function(e,t){var r=this._X;f.call(this),a[0]=r[0]^r[5]>>>16^r[3]<<16,a[1]=r[2]^r[7]>>>16^r[5]<<16,a[2]=r[4]^r[1]>>>16^r[7]<<16,a[3]=r[6]^r[3]>>>16^r[1]<<16;for(var n=0;n<4;n++)a[n]=16711935&(a[n]<<8|a[n]>>>24)|4278255360&(a[n]<<24|a[n]>>>8),e[t+n]^=a[n]},blockSize:4,ivSize:2});function f(){for(var e=this._X,t=this._C,r=0;r<8;r++)i[r]=t[r];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0>>0?1:0)|0,this._b=t[7]>>>0>>0?1:0,r=0;r<8;r++){var n=e[r]+t[r],a=65535&n,c=n>>>16,f=((a*a>>>17)+a*c>>>15)+c*c,d=((4294901760&n)*n|0)+((65535&n)*n|0);o[r]=f^d}e[0]=o[0]+(o[7]<<16|o[7]>>>16)+(o[6]<<16|o[6]>>>16)|0,e[1]=o[1]+(o[0]<<8|o[0]>>>24)+o[7]|0,e[2]=o[2]+(o[1]<<16|o[1]>>>16)+(o[0]<<16|o[0]>>>16)|0,e[3]=o[3]+(o[2]<<8|o[2]>>>24)+o[1]|0,e[4]=o[4]+(o[3]<<16|o[3]>>>16)+(o[2]<<16|o[2]>>>16)|0,e[5]=o[5]+(o[4]<<8|o[4]>>>24)+o[3]|0,e[6]=o[6]+(o[5]<<16|o[5]>>>16)+(o[4]<<16|o[4]>>>16)|0,e[7]=o[7]+(o[6]<<8|o[6]>>>24)+o[5]|0}t.Rabbit=r._createHelper(c)}(),e.Rabbit},"object"===c(t)?e.exports=t=o(r(2),r(31),r(28),r(24),r(12)):(a=[r(2),r(31),r(28),r(24),r(12)],void 0===(i="function"==typeof(n=o)?n.apply(t,a):n)||(e.exports=i))},function(e,t,r){var n,a,i,o;function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}o=function(e){return function(){var t=e,r=t.lib.StreamCipher,n=t.algo,a=[],i=[],o=[],c=n.RabbitLegacy=r.extend({_doReset:function(){var e=this._key.words,t=this.cfg.iv,r=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],n=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];this._b=0;for(var a=0;a<4;a++)f.call(this);for(a=0;a<8;a++)n[a]^=r[a+4&7];if(t){var i=t.words,o=i[0],c=i[1],d=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),s=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),u=d>>>16|4294901760&s,b=s<<16|65535&d;for(n[0]^=d,n[1]^=u,n[2]^=s,n[3]^=b,n[4]^=d,n[5]^=u,n[6]^=s,n[7]^=b,a=0;a<4;a++)f.call(this)}},_doProcessBlock:function(e,t){var r=this._X;f.call(this),a[0]=r[0]^r[5]>>>16^r[3]<<16,a[1]=r[2]^r[7]>>>16^r[5]<<16,a[2]=r[4]^r[1]>>>16^r[7]<<16,a[3]=r[6]^r[3]>>>16^r[1]<<16;for(var n=0;n<4;n++)a[n]=16711935&(a[n]<<8|a[n]>>>24)|4278255360&(a[n]<<24|a[n]>>>8),e[t+n]^=a[n]},blockSize:4,ivSize:2});function f(){for(var e=this._X,t=this._C,r=0;r<8;r++)i[r]=t[r];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0>>0?1:0)|0,this._b=t[7]>>>0>>0?1:0,r=0;r<8;r++){var n=e[r]+t[r],a=65535&n,c=n>>>16,f=((a*a>>>17)+a*c>>>15)+c*c,d=((4294901760&n)*n|0)+((65535&n)*n|0);o[r]=f^d}e[0]=o[0]+(o[7]<<16|o[7]>>>16)+(o[6]<<16|o[6]>>>16)|0,e[1]=o[1]+(o[0]<<8|o[0]>>>24)+o[7]|0,e[2]=o[2]+(o[1]<<16|o[1]>>>16)+(o[0]<<16|o[0]>>>16)|0,e[3]=o[3]+(o[2]<<8|o[2]>>>24)+o[1]|0,e[4]=o[4]+(o[3]<<16|o[3]>>>16)+(o[2]<<16|o[2]>>>16)|0,e[5]=o[5]+(o[4]<<8|o[4]>>>24)+o[3]|0,e[6]=o[6]+(o[5]<<16|o[5]>>>16)+(o[4]<<16|o[4]>>>16)|0,e[7]=o[7]+(o[6]<<8|o[6]>>>24)+o[5]|0}t.RabbitLegacy=r._createHelper(c)}(),e.RabbitLegacy},"object"===c(t)?e.exports=t=o(r(2),r(31),r(28),r(24),r(12)):(a=[r(2),r(31),r(28),r(24),r(12)],void 0===(i="function"==typeof(n=o)?n.apply(t,a):n)||(e.exports=i))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WALLET_API_HOST=t.WALLET_STORAGE_KEY_NAME=void 0,t.WALLET_STORAGE_KEY_NAME="jc_wallet_data",t.WALLET_API_HOST="http://10.0.1.3:3007"},function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}: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||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.isHexString=t.getKeys=t.fromAscii=t.fromUtf8=t.toAscii=t.arrayContainsArray=t.getBinarySize=t.padToEven=t.stripHexPrefix=t.isHexPrefixed=void 0,a(r(315),t),a(r(316),t),a(r(709),t),a(r(173),t),a(r(710),t),a(r(57),t),a(r(711),t),a(r(43),t),a(r(174),t);var i=r(75);Object.defineProperty(t,"isHexPrefixed",{enumerable:!0,get:function(){return i.isHexPrefixed}}),Object.defineProperty(t,"stripHexPrefix",{enumerable:!0,get:function(){return i.stripHexPrefix}}),Object.defineProperty(t,"padToEven",{enumerable:!0,get:function(){return i.padToEven}}),Object.defineProperty(t,"getBinarySize",{enumerable:!0,get:function(){return i.getBinarySize}}),Object.defineProperty(t,"arrayContainsArray",{enumerable:!0,get:function(){return i.arrayContainsArray}}),Object.defineProperty(t,"toAscii",{enumerable:!0,get:function(){return i.toAscii}}),Object.defineProperty(t,"fromUtf8",{enumerable:!0,get:function(){return i.fromUtf8}}),Object.defineProperty(t,"fromAscii",{enumerable:!0,get:function(){return i.fromAscii}}),Object.defineProperty(t,"getKeys",{enumerable:!0,get:function(){return i.getKeys}}),Object.defineProperty(t,"isHexString",{enumerable:!0,get:function(){return i.isHexString}})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KECCAK256_RLP=t.KECCAK256_RLP_S=t.KECCAK256_RLP_ARRAY=t.KECCAK256_RLP_ARRAY_S=t.KECCAK256_NULL=t.KECCAK256_NULL_S=t.TWO_POW256=t.MAX_INTEGER=t.MAX_UINT64=void 0;var n=r(0),a=r(43);t.MAX_UINT64=new a.BN("ffffffffffffffff",16),t.MAX_INTEGER=new a.BN("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16),t.TWO_POW256=new a.BN("10000000000000000000000000000000000000000000000000000000000000000",16),t.KECCAK256_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",t.KECCAK256_NULL=n.Buffer.from(t.KECCAK256_NULL_S,"hex"),t.KECCAK256_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",t.KECCAK256_RLP_ARRAY=n.Buffer.from(t.KECCAK256_RLP_ARRAY_S,"hex"),t.KECCAK256_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",t.KECCAK256_RLP=n.Buffer.from(t.KECCAK256_RLP_S,"hex")},function(e,t,r){"use strict";(function(e){var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,a,i=r.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)o.push(n.value)}catch(e){a={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(a)throw a.error}}return o},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.isZeroAddress=t.zeroAddress=t.importPublic=t.privateToAddress=t.privateToPublic=t.publicToAddress=t.pubToAddress=t.isValidPublic=t.isValidPrivate=t.generateAddress2=t.generateAddress=t.isValidChecksumAddress=t.toChecksumAddress=t.isValidAddress=t.Account=void 0;var i=a(r(14)),o=r(43),c=r(22),f=r(75),d=r(315),s=r(57),u=r(173),b=r(117),h=r(174),l=function(){function e(e,t,r,n){void 0===e&&(e=new o.BN(0)),void 0===t&&(t=new o.BN(0)),void 0===r&&(r=d.KECCAK256_RLP),void 0===n&&(n=d.KECCAK256_NULL),this.nonce=e,this.balance=t,this.stateRoot=r,this.codeHash=n,this._validate()}return e.fromAccountData=function(t){var r=t.nonce,n=t.balance,a=t.stateRoot,i=t.codeHash;return new e(r?new o.BN((0,s.toBuffer)(r)):void 0,n?new o.BN((0,s.toBuffer)(n)):void 0,a?(0,s.toBuffer)(a):void 0,i?(0,s.toBuffer)(i):void 0)},e.fromRlpSerializedAccount=function(e){var t=o.rlp.decode(e);if(!Array.isArray(t))throw new Error("Invalid serialized account input. Must be array");return this.fromValuesArray(t)},e.fromValuesArray=function(t){var r=n(t,4),a=r[0],i=r[1],c=r[2],f=r[3];return new e(new o.BN(a),new o.BN(i),c,f)},e.prototype._validate=function(){if(this.nonce.lt(new o.BN(0)))throw new Error("nonce must be greater than zero");if(this.balance.lt(new o.BN(0)))throw new Error("balance must be greater than zero");if(32!==this.stateRoot.length)throw new Error("stateRoot must have a length of 32");if(32!==this.codeHash.length)throw new Error("codeHash must have a length of 32")},e.prototype.raw=function(){return[(0,h.bnToUnpaddedBuffer)(this.nonce),(0,h.bnToUnpaddedBuffer)(this.balance),this.stateRoot,this.codeHash]},e.prototype.serialize=function(){return o.rlp.encode(this.raw())},e.prototype.isContract=function(){return!this.codeHash.equals(d.KECCAK256_NULL)},e.prototype.isEmpty=function(){return this.balance.isZero()&&this.nonce.isZero()&&this.codeHash.equals(d.KECCAK256_NULL)},e}();t.Account=l;t.isValidAddress=function(e){try{(0,b.assertIsString)(e)}catch(e){return!1}return/^0x[0-9a-fA-F]{40}$/.test(e)};t.toChecksumAddress=function(e,t){(0,b.assertIsHexString)(e);var r=(0,f.stripHexPrefix)(e).toLowerCase(),n="";t&&(n=(0,h.toType)(t,h.TypeOutput.BN).toString()+"0x");for(var a=(0,u.keccakFromString)(n+r).toString("hex"),i="0x",o=0;o=8?i+=r[o].toUpperCase():i+=r[o];return i};t.isValidChecksumAddress=function(e,r){return(0,t.isValidAddress)(e)&&(0,t.toChecksumAddress)(e,r)===e};t.generateAddress=function(t,r){(0,b.assertIsBuffer)(t),(0,b.assertIsBuffer)(r);var n=new o.BN(r);return n.isZero()?(0,u.rlphash)([t,null]).slice(-20):(0,u.rlphash)([t,e.from(n.toArray())]).slice(-20)};t.generateAddress2=function(t,r,n){return(0,b.assertIsBuffer)(t),(0,b.assertIsBuffer)(r),(0,b.assertIsBuffer)(n),(0,i.default)(20===t.length),(0,i.default)(32===r.length),(0,u.keccak256)(e.concat([e.from("ff","hex"),t,r,(0,u.keccak256)(n)])).slice(-20)};t.isValidPrivate=function(e){return(0,c.privateKeyVerify)(e)};t.isValidPublic=function(t,r){return void 0===r&&(r=!1),(0,b.assertIsBuffer)(t),64===t.length?(0,c.publicKeyVerify)(e.concat([e.from([4]),t])):!!r&&(0,c.publicKeyVerify)(t)};t.pubToAddress=function(t,r){return void 0===r&&(r=!1),(0,b.assertIsBuffer)(t),r&&64!==t.length&&(t=e.from((0,c.publicKeyConvert)(t,!1).slice(1))),(0,i.default)(64===t.length),(0,u.keccak)(t).slice(-20)},t.publicToAddress=t.pubToAddress;t.privateToPublic=function(t){return(0,b.assertIsBuffer)(t),e.from((0,c.publicKeyCreate)(t,!1)).slice(1)};t.privateToAddress=function(e){return(0,t.publicToAddress)((0,t.privateToPublic)(e))};t.importPublic=function(t){return(0,b.assertIsBuffer)(t),64!==t.length&&(t=e.from((0,c.publicKeyConvert)(t,!1).slice(1))),t};t.zeroAddress=function(){var e=(0,s.zeros)(20);return(0,s.bufferToHex)(e)};t.isZeroAddress=function(e){try{(0,b.assertIsString)(e)}catch(e){return!1}return(0,t.zeroAddress)()===e}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";var n=r(19),a=r(715);e.exports=a((function(e){var t=n("sha256").update(e).digest();return n("sha256").update(t).digest()}))},function(e,t,r){ +return e.mode.CTRGladman=function(){var t=e.lib.BlockCipherMode.extend();function r(e){if(255==(e>>24&255)){var t=e>>16&255,r=e>>8&255,n=255&e;255===t?(t=0,255===r?(r=0,255===n?n=0:++n):++r):++t,e=0,e+=t<<16,e+=r<<8,e+=n}else e+=1<<24;return e}var n=t.Encryptor=t.extend({processBlock:function(e,t){var n=this._cipher,a=n.blockSize,i=this._iv,o=this._counter;i&&(o=this._counter=i.slice(0),this._iv=void 0),function(e){0===(e[0]=r(e[0]))&&(e[1]=r(e[1]))}(o);var c=o.slice(0);n.encryptBlock(c,0);for(var f=0;f>>2]|=a<<24-i%4*8,e.sigBytes+=a},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},e.pad.Ansix923},"object"===c(t)?e.exports=t=o(r(2),r(12)):(a=[r(2),r(12)],void 0===(i="function"==typeof(n=o)?n.apply(t,a):n)||(e.exports=i))},function(e,t,r){var n,a,i,o;function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}o=function(e){return e.pad.Iso10126={pad:function(t,r){var n=4*r,a=n-t.sigBytes%n;t.concat(e.lib.WordArray.random(a-1)).concat(e.lib.WordArray.create([a<<24],1))},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},e.pad.Iso10126},"object"===c(t)?e.exports=t=o(r(2),r(12)):(a=[r(2),r(12)],void 0===(i="function"==typeof(n=o)?n.apply(t,a):n)||(e.exports=i))},function(e,t,r){var n,a,i,o;function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}o=function(e){return e.pad.Iso97971={pad:function(t,r){t.concat(e.lib.WordArray.create([2147483648],1)),e.pad.ZeroPadding.pad(t,r)},unpad:function(t){e.pad.ZeroPadding.unpad(t),t.sigBytes--}},e.pad.Iso97971},"object"===c(t)?e.exports=t=o(r(2),r(12)):(a=[r(2),r(12)],void 0===(i="function"==typeof(n=o)?n.apply(t,a):n)||(e.exports=i))},function(e,t,r){var n,a,i,o;function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}o=function(e){return e.pad.ZeroPadding={pad:function(e,t){var r=4*t;e.clamp(),e.sigBytes+=r-(e.sigBytes%r||r)},unpad:function(e){var t=e.words,r=e.sigBytes-1;for(r=e.sigBytes-1;r>=0;r--)if(t[r>>>2]>>>24-r%4*8&255){e.sigBytes=r+1;break}}},e.pad.ZeroPadding},"object"===c(t)?e.exports=t=o(r(2),r(12)):(a=[r(2),r(12)],void 0===(i="function"==typeof(n=o)?n.apply(t,a):n)||(e.exports=i))},function(e,t,r){var n,a,i,o;function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}o=function(e){return e.pad.NoPadding={pad:function(){},unpad:function(){}},e.pad.NoPadding},"object"===c(t)?e.exports=t=o(r(2),r(12)):(a=[r(2),r(12)],void 0===(i="function"==typeof(n=o)?n.apply(t,a):n)||(e.exports=i))},function(e,t,r){var n,a,i,o;function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}o=function(e){var t,r,n;return r=(t=e).lib.CipherParams,n=t.enc.Hex,t.format.Hex={stringify:function(e){return e.ciphertext.toString(n)},parse:function(e){var t=n.parse(e);return r.create({ciphertext:t})}},e.format.Hex},"object"===c(t)?e.exports=t=o(r(2),r(12)):(a=[r(2),r(12)],void 0===(i="function"==typeof(n=o)?n.apply(t,a):n)||(e.exports=i))},function(e,t,r){var n,a,i,o;function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}o=function(e){return function(){var t=e,r=t.lib.BlockCipher,n=t.algo,a=[],i=[],o=[],c=[],f=[],d=[],s=[],u=[],b=[],h=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var r=0,n=0;for(t=0;t<256;t++){var l=n^n<<1^n<<2^n<<3^n<<4;l=l>>>8^255&l^99,a[r]=l,i[l]=r;var p=e[r],m=e[p],x=e[m],y=257*e[l]^16843008*l;o[r]=y<<24|y>>>8,c[r]=y<<16|y>>>16,f[r]=y<<8|y>>>24,d[r]=y,y=16843009*x^65537*m^257*p^16843008*r,s[l]=y<<24|y>>>8,u[l]=y<<16|y>>>16,b[l]=y<<8|y>>>24,h[l]=y,r?(r=p^e[e[e[x^p]]],n^=e[e[n]]):r=n=1}}();var l=[0,1,2,4,8,16,32,64,128,27,54],p=n.AES=r.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,r=e.sigBytes/4,n=4*((this._nRounds=r+6)+1),i=this._keySchedule=[],o=0;o6&&o%r==4&&(d=a[d>>>24]<<24|a[d>>>16&255]<<16|a[d>>>8&255]<<8|a[255&d]):(d=a[(d=d<<8|d>>>24)>>>24]<<24|a[d>>>16&255]<<16|a[d>>>8&255]<<8|a[255&d],d^=l[o/r|0]<<24),i[o]=i[o-r]^d);for(var c=this._invKeySchedule=[],f=0;f>>24]]^u[a[d>>>16&255]]^b[a[d>>>8&255]]^h[a[255&d]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,o,c,f,d,a)},decryptBlock:function(e,t){var r=e[t+1];e[t+1]=e[t+3],e[t+3]=r,this._doCryptBlock(e,t,this._invKeySchedule,s,u,b,h,i),r=e[t+1],e[t+1]=e[t+3],e[t+3]=r},_doCryptBlock:function(e,t,r,n,a,i,o,c){for(var f=this._nRounds,d=e[t]^r[0],s=e[t+1]^r[1],u=e[t+2]^r[2],b=e[t+3]^r[3],h=4,l=1;l>>24]^a[s>>>16&255]^i[u>>>8&255]^o[255&b]^r[h++],m=n[s>>>24]^a[u>>>16&255]^i[b>>>8&255]^o[255&d]^r[h++],x=n[u>>>24]^a[b>>>16&255]^i[d>>>8&255]^o[255&s]^r[h++],y=n[b>>>24]^a[d>>>16&255]^i[s>>>8&255]^o[255&u]^r[h++];d=p,s=m,u=x,b=y}p=(c[d>>>24]<<24|c[s>>>16&255]<<16|c[u>>>8&255]<<8|c[255&b])^r[h++],m=(c[s>>>24]<<24|c[u>>>16&255]<<16|c[b>>>8&255]<<8|c[255&d])^r[h++],x=(c[u>>>24]<<24|c[b>>>16&255]<<16|c[d>>>8&255]<<8|c[255&s])^r[h++],y=(c[b>>>24]<<24|c[d>>>16&255]<<16|c[s>>>8&255]<<8|c[255&u])^r[h++],e[t]=p,e[t+1]=m,e[t+2]=x,e[t+3]=y},keySize:8});t.AES=r._createHelper(p)}(),e.AES},"object"===c(t)?e.exports=t=o(r(2),r(31),r(28),r(24),r(12)):(a=[r(2),r(31),r(28),r(24),r(12)],void 0===(i="function"==typeof(n=o)?n.apply(t,a):n)||(e.exports=i))},function(e,t,r){var n,a,i,o;function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}o=function(e){return function(){var t=e,r=t.lib,n=r.WordArray,a=r.BlockCipher,i=t.algo,o=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],c=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],f=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],d=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],s=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],u=i.DES=a.extend({_doReset:function(){for(var e=this._key.words,t=[],r=0;r<56;r++){var n=o[r]-1;t[r]=e[n>>>5]>>>31-n%32&1}for(var a=this._subKeys=[],i=0;i<16;i++){var d=a[i]=[],s=f[i];for(r=0;r<24;r++)d[r/6|0]|=t[(c[r]-1+s)%28]<<31-r%6,d[4+(r/6|0)]|=t[28+(c[r+24]-1+s)%28]<<31-r%6;for(d[0]=d[0]<<1|d[0]>>>31,r=1;r<7;r++)d[r]=d[r]>>>4*(r-1)+3;d[7]=d[7]<<5|d[7]>>>27}var u=this._invSubKeys=[];for(r=0;r<16;r++)u[r]=a[15-r]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._subKeys)},decryptBlock:function(e,t){this._doCryptBlock(e,t,this._invSubKeys)},_doCryptBlock:function(e,t,r){this._lBlock=e[t],this._rBlock=e[t+1],b.call(this,4,252645135),b.call(this,16,65535),h.call(this,2,858993459),h.call(this,8,16711935),b.call(this,1,1431655765);for(var n=0;n<16;n++){for(var a=r[n],i=this._lBlock,o=this._rBlock,c=0,f=0;f<8;f++)c|=d[f][((o^a[f])&s[f])>>>0];this._lBlock=o,this._rBlock=i^c}var u=this._lBlock;this._lBlock=this._rBlock,this._rBlock=u,b.call(this,1,1431655765),h.call(this,8,16711935),h.call(this,2,858993459),b.call(this,16,65535),b.call(this,4,252645135),e[t]=this._lBlock,e[t+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function b(e,t){var r=(this._lBlock>>>e^this._rBlock)&t;this._rBlock^=r,this._lBlock^=r<>>e^this._lBlock)&t;this._lBlock^=r,this._rBlock^=r<192.");var t=e.slice(0,2),r=e.length<4?e.slice(0,2):e.slice(2,4),a=e.length<6?e.slice(0,2):e.slice(4,6);this._des1=u.createEncryptor(n.create(t)),this._des2=u.createEncryptor(n.create(r)),this._des3=u.createEncryptor(n.create(a))},encryptBlock:function(e,t){this._des1.encryptBlock(e,t),this._des2.decryptBlock(e,t),this._des3.encryptBlock(e,t)},decryptBlock:function(e,t){this._des3.decryptBlock(e,t),this._des2.encryptBlock(e,t),this._des1.decryptBlock(e,t)},keySize:6,ivSize:2,blockSize:2});t.TripleDES=a._createHelper(l)}(),e.TripleDES},"object"===c(t)?e.exports=t=o(r(2),r(31),r(28),r(24),r(12)):(a=[r(2),r(31),r(28),r(24),r(12)],void 0===(i="function"==typeof(n=o)?n.apply(t,a):n)||(e.exports=i))},function(e,t,r){var n,a,i,o;function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}o=function(e){return function(){var t=e,r=t.lib.StreamCipher,n=t.algo,a=n.RC4=r.extend({_doReset:function(){for(var e=this._key,t=e.words,r=e.sigBytes,n=this._S=[],a=0;a<256;a++)n[a]=a;a=0;for(var i=0;a<256;a++){var o=a%r,c=t[o>>>2]>>>24-o%4*8&255;i=(i+n[a]+c)%256;var f=n[a];n[a]=n[i],n[i]=f}this._i=this._j=0},_doProcessBlock:function(e,t){e[t]^=i.call(this)},keySize:8,ivSize:0});function i(){for(var e=this._S,t=this._i,r=this._j,n=0,a=0;a<4;a++){r=(r+e[t=(t+1)%256])%256;var i=e[t];e[t]=e[r],e[r]=i,n|=e[(e[t]+e[r])%256]<<24-8*a}return this._i=t,this._j=r,n}t.RC4=r._createHelper(a);var o=n.RC4Drop=a.extend({cfg:a.cfg.extend({drop:192}),_doReset:function(){a._doReset.call(this);for(var e=this.cfg.drop;e>0;e--)i.call(this)}});t.RC4Drop=r._createHelper(o)}(),e.RC4},"object"===c(t)?e.exports=t=o(r(2),r(31),r(28),r(24),r(12)):(a=[r(2),r(31),r(28),r(24),r(12)],void 0===(i="function"==typeof(n=o)?n.apply(t,a):n)||(e.exports=i))},function(e,t,r){var n,a,i,o;function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}o=function(e){return function(){var t=e,r=t.lib.StreamCipher,n=t.algo,a=[],i=[],o=[],c=n.Rabbit=r.extend({_doReset:function(){for(var e=this._key.words,t=this.cfg.iv,r=0;r<4;r++)e[r]=16711935&(e[r]<<8|e[r]>>>24)|4278255360&(e[r]<<24|e[r]>>>8);var n=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],a=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];for(this._b=0,r=0;r<4;r++)f.call(this);for(r=0;r<8;r++)a[r]^=n[r+4&7];if(t){var i=t.words,o=i[0],c=i[1],d=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),s=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),u=d>>>16|4294901760&s,b=s<<16|65535&d;for(a[0]^=d,a[1]^=u,a[2]^=s,a[3]^=b,a[4]^=d,a[5]^=u,a[6]^=s,a[7]^=b,r=0;r<4;r++)f.call(this)}},_doProcessBlock:function(e,t){var r=this._X;f.call(this),a[0]=r[0]^r[5]>>>16^r[3]<<16,a[1]=r[2]^r[7]>>>16^r[5]<<16,a[2]=r[4]^r[1]>>>16^r[7]<<16,a[3]=r[6]^r[3]>>>16^r[1]<<16;for(var n=0;n<4;n++)a[n]=16711935&(a[n]<<8|a[n]>>>24)|4278255360&(a[n]<<24|a[n]>>>8),e[t+n]^=a[n]},blockSize:4,ivSize:2});function f(){for(var e=this._X,t=this._C,r=0;r<8;r++)i[r]=t[r];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0>>0?1:0)|0,this._b=t[7]>>>0>>0?1:0,r=0;r<8;r++){var n=e[r]+t[r],a=65535&n,c=n>>>16,f=((a*a>>>17)+a*c>>>15)+c*c,d=((4294901760&n)*n|0)+((65535&n)*n|0);o[r]=f^d}e[0]=o[0]+(o[7]<<16|o[7]>>>16)+(o[6]<<16|o[6]>>>16)|0,e[1]=o[1]+(o[0]<<8|o[0]>>>24)+o[7]|0,e[2]=o[2]+(o[1]<<16|o[1]>>>16)+(o[0]<<16|o[0]>>>16)|0,e[3]=o[3]+(o[2]<<8|o[2]>>>24)+o[1]|0,e[4]=o[4]+(o[3]<<16|o[3]>>>16)+(o[2]<<16|o[2]>>>16)|0,e[5]=o[5]+(o[4]<<8|o[4]>>>24)+o[3]|0,e[6]=o[6]+(o[5]<<16|o[5]>>>16)+(o[4]<<16|o[4]>>>16)|0,e[7]=o[7]+(o[6]<<8|o[6]>>>24)+o[5]|0}t.Rabbit=r._createHelper(c)}(),e.Rabbit},"object"===c(t)?e.exports=t=o(r(2),r(31),r(28),r(24),r(12)):(a=[r(2),r(31),r(28),r(24),r(12)],void 0===(i="function"==typeof(n=o)?n.apply(t,a):n)||(e.exports=i))},function(e,t,r){var n,a,i,o;function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}o=function(e){return function(){var t=e,r=t.lib.StreamCipher,n=t.algo,a=[],i=[],o=[],c=n.RabbitLegacy=r.extend({_doReset:function(){var e=this._key.words,t=this.cfg.iv,r=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],n=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];this._b=0;for(var a=0;a<4;a++)f.call(this);for(a=0;a<8;a++)n[a]^=r[a+4&7];if(t){var i=t.words,o=i[0],c=i[1],d=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),s=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),u=d>>>16|4294901760&s,b=s<<16|65535&d;for(n[0]^=d,n[1]^=u,n[2]^=s,n[3]^=b,n[4]^=d,n[5]^=u,n[6]^=s,n[7]^=b,a=0;a<4;a++)f.call(this)}},_doProcessBlock:function(e,t){var r=this._X;f.call(this),a[0]=r[0]^r[5]>>>16^r[3]<<16,a[1]=r[2]^r[7]>>>16^r[5]<<16,a[2]=r[4]^r[1]>>>16^r[7]<<16,a[3]=r[6]^r[3]>>>16^r[1]<<16;for(var n=0;n<4;n++)a[n]=16711935&(a[n]<<8|a[n]>>>24)|4278255360&(a[n]<<24|a[n]>>>8),e[t+n]^=a[n]},blockSize:4,ivSize:2});function f(){for(var e=this._X,t=this._C,r=0;r<8;r++)i[r]=t[r];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0>>0?1:0)|0,this._b=t[7]>>>0>>0?1:0,r=0;r<8;r++){var n=e[r]+t[r],a=65535&n,c=n>>>16,f=((a*a>>>17)+a*c>>>15)+c*c,d=((4294901760&n)*n|0)+((65535&n)*n|0);o[r]=f^d}e[0]=o[0]+(o[7]<<16|o[7]>>>16)+(o[6]<<16|o[6]>>>16)|0,e[1]=o[1]+(o[0]<<8|o[0]>>>24)+o[7]|0,e[2]=o[2]+(o[1]<<16|o[1]>>>16)+(o[0]<<16|o[0]>>>16)|0,e[3]=o[3]+(o[2]<<8|o[2]>>>24)+o[1]|0,e[4]=o[4]+(o[3]<<16|o[3]>>>16)+(o[2]<<16|o[2]>>>16)|0,e[5]=o[5]+(o[4]<<8|o[4]>>>24)+o[3]|0,e[6]=o[6]+(o[5]<<16|o[5]>>>16)+(o[4]<<16|o[4]>>>16)|0,e[7]=o[7]+(o[6]<<8|o[6]>>>24)+o[5]|0}t.RabbitLegacy=r._createHelper(c)}(),e.RabbitLegacy},"object"===c(t)?e.exports=t=o(r(2),r(31),r(28),r(24),r(12)):(a=[r(2),r(31),r(28),r(24),r(12)],void 0===(i="function"==typeof(n=o)?n.apply(t,a):n)||(e.exports=i))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WALLET_API_HOST=t.WALLET_STORAGE_KEY_NAME=void 0,t.WALLET_STORAGE_KEY_NAME="jc_wallet_data",t.WALLET_API_HOST="https://wallet.cebggame.com"},function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}: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||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.isHexString=t.getKeys=t.fromAscii=t.fromUtf8=t.toAscii=t.arrayContainsArray=t.getBinarySize=t.padToEven=t.stripHexPrefix=t.isHexPrefixed=void 0,a(r(315),t),a(r(316),t),a(r(709),t),a(r(173),t),a(r(710),t),a(r(57),t),a(r(711),t),a(r(43),t),a(r(174),t);var i=r(75);Object.defineProperty(t,"isHexPrefixed",{enumerable:!0,get:function(){return i.isHexPrefixed}}),Object.defineProperty(t,"stripHexPrefix",{enumerable:!0,get:function(){return i.stripHexPrefix}}),Object.defineProperty(t,"padToEven",{enumerable:!0,get:function(){return i.padToEven}}),Object.defineProperty(t,"getBinarySize",{enumerable:!0,get:function(){return i.getBinarySize}}),Object.defineProperty(t,"arrayContainsArray",{enumerable:!0,get:function(){return i.arrayContainsArray}}),Object.defineProperty(t,"toAscii",{enumerable:!0,get:function(){return i.toAscii}}),Object.defineProperty(t,"fromUtf8",{enumerable:!0,get:function(){return i.fromUtf8}}),Object.defineProperty(t,"fromAscii",{enumerable:!0,get:function(){return i.fromAscii}}),Object.defineProperty(t,"getKeys",{enumerable:!0,get:function(){return i.getKeys}}),Object.defineProperty(t,"isHexString",{enumerable:!0,get:function(){return i.isHexString}})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KECCAK256_RLP=t.KECCAK256_RLP_S=t.KECCAK256_RLP_ARRAY=t.KECCAK256_RLP_ARRAY_S=t.KECCAK256_NULL=t.KECCAK256_NULL_S=t.TWO_POW256=t.MAX_INTEGER=t.MAX_UINT64=void 0;var n=r(0),a=r(43);t.MAX_UINT64=new a.BN("ffffffffffffffff",16),t.MAX_INTEGER=new a.BN("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16),t.TWO_POW256=new a.BN("10000000000000000000000000000000000000000000000000000000000000000",16),t.KECCAK256_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",t.KECCAK256_NULL=n.Buffer.from(t.KECCAK256_NULL_S,"hex"),t.KECCAK256_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",t.KECCAK256_RLP_ARRAY=n.Buffer.from(t.KECCAK256_RLP_ARRAY_S,"hex"),t.KECCAK256_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",t.KECCAK256_RLP=n.Buffer.from(t.KECCAK256_RLP_S,"hex")},function(e,t,r){"use strict";(function(e){var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,a,i=r.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)o.push(n.value)}catch(e){a={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(a)throw a.error}}return o},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.isZeroAddress=t.zeroAddress=t.importPublic=t.privateToAddress=t.privateToPublic=t.publicToAddress=t.pubToAddress=t.isValidPublic=t.isValidPrivate=t.generateAddress2=t.generateAddress=t.isValidChecksumAddress=t.toChecksumAddress=t.isValidAddress=t.Account=void 0;var i=a(r(14)),o=r(43),c=r(22),f=r(75),d=r(315),s=r(57),u=r(173),b=r(117),h=r(174),l=function(){function e(e,t,r,n){void 0===e&&(e=new o.BN(0)),void 0===t&&(t=new o.BN(0)),void 0===r&&(r=d.KECCAK256_RLP),void 0===n&&(n=d.KECCAK256_NULL),this.nonce=e,this.balance=t,this.stateRoot=r,this.codeHash=n,this._validate()}return e.fromAccountData=function(t){var r=t.nonce,n=t.balance,a=t.stateRoot,i=t.codeHash;return new e(r?new o.BN((0,s.toBuffer)(r)):void 0,n?new o.BN((0,s.toBuffer)(n)):void 0,a?(0,s.toBuffer)(a):void 0,i?(0,s.toBuffer)(i):void 0)},e.fromRlpSerializedAccount=function(e){var t=o.rlp.decode(e);if(!Array.isArray(t))throw new Error("Invalid serialized account input. Must be array");return this.fromValuesArray(t)},e.fromValuesArray=function(t){var r=n(t,4),a=r[0],i=r[1],c=r[2],f=r[3];return new e(new o.BN(a),new o.BN(i),c,f)},e.prototype._validate=function(){if(this.nonce.lt(new o.BN(0)))throw new Error("nonce must be greater than zero");if(this.balance.lt(new o.BN(0)))throw new Error("balance must be greater than zero");if(32!==this.stateRoot.length)throw new Error("stateRoot must have a length of 32");if(32!==this.codeHash.length)throw new Error("codeHash must have a length of 32")},e.prototype.raw=function(){return[(0,h.bnToUnpaddedBuffer)(this.nonce),(0,h.bnToUnpaddedBuffer)(this.balance),this.stateRoot,this.codeHash]},e.prototype.serialize=function(){return o.rlp.encode(this.raw())},e.prototype.isContract=function(){return!this.codeHash.equals(d.KECCAK256_NULL)},e.prototype.isEmpty=function(){return this.balance.isZero()&&this.nonce.isZero()&&this.codeHash.equals(d.KECCAK256_NULL)},e}();t.Account=l;t.isValidAddress=function(e){try{(0,b.assertIsString)(e)}catch(e){return!1}return/^0x[0-9a-fA-F]{40}$/.test(e)};t.toChecksumAddress=function(e,t){(0,b.assertIsHexString)(e);var r=(0,f.stripHexPrefix)(e).toLowerCase(),n="";t&&(n=(0,h.toType)(t,h.TypeOutput.BN).toString()+"0x");for(var a=(0,u.keccakFromString)(n+r).toString("hex"),i="0x",o=0;o=8?i+=r[o].toUpperCase():i+=r[o];return i};t.isValidChecksumAddress=function(e,r){return(0,t.isValidAddress)(e)&&(0,t.toChecksumAddress)(e,r)===e};t.generateAddress=function(t,r){(0,b.assertIsBuffer)(t),(0,b.assertIsBuffer)(r);var n=new o.BN(r);return n.isZero()?(0,u.rlphash)([t,null]).slice(-20):(0,u.rlphash)([t,e.from(n.toArray())]).slice(-20)};t.generateAddress2=function(t,r,n){return(0,b.assertIsBuffer)(t),(0,b.assertIsBuffer)(r),(0,b.assertIsBuffer)(n),(0,i.default)(20===t.length),(0,i.default)(32===r.length),(0,u.keccak256)(e.concat([e.from("ff","hex"),t,r,(0,u.keccak256)(n)])).slice(-20)};t.isValidPrivate=function(e){return(0,c.privateKeyVerify)(e)};t.isValidPublic=function(t,r){return void 0===r&&(r=!1),(0,b.assertIsBuffer)(t),64===t.length?(0,c.publicKeyVerify)(e.concat([e.from([4]),t])):!!r&&(0,c.publicKeyVerify)(t)};t.pubToAddress=function(t,r){return void 0===r&&(r=!1),(0,b.assertIsBuffer)(t),r&&64!==t.length&&(t=e.from((0,c.publicKeyConvert)(t,!1).slice(1))),(0,i.default)(64===t.length),(0,u.keccak)(t).slice(-20)},t.publicToAddress=t.pubToAddress;t.privateToPublic=function(t){return(0,b.assertIsBuffer)(t),e.from((0,c.publicKeyCreate)(t,!1)).slice(1)};t.privateToAddress=function(e){return(0,t.publicToAddress)((0,t.privateToPublic)(e))};t.importPublic=function(t){return(0,b.assertIsBuffer)(t),64!==t.length&&(t=e.from((0,c.publicKeyConvert)(t,!1).slice(1))),t};t.zeroAddress=function(){var e=(0,s.zeros)(20);return(0,s.bufferToHex)(e)};t.isZeroAddress=function(e){try{(0,b.assertIsString)(e)}catch(e){return!1}return(0,t.zeroAddress)()===e}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";var n=r(19),a=r(715);e.exports=a((function(e){var t=n("sha256").update(e).digest();return n("sha256").update(t).digest()}))},function(e,t,r){ /*! MIT License. Copyright 2015-2018 Richard Moore . See LICENSE.txt. */ !function(t){"use strict";function r(e){return parseInt(e)===e}function n(e){if(!r(e.length))return!1;for(var t=0;t255)return!1;return!0}function a(e,t){if(e.buffer&&"Uint8Array"===e.name)return t&&(e=e.slice?e.slice():Array.prototype.slice.call(e)),e;if(Array.isArray(e)){if(!n(e))throw new Error("Array contains invalid value: "+e);return new Uint8Array(e)}if(r(e.length)&&n(e))return new Uint8Array(e);throw new Error("unsupported array-like object")}function i(e){return new Uint8Array(e)}function o(e,t,r,n,a){null==n&&null==a||(e=e.slice?e.slice(n,a):Array.prototype.slice.call(e,n,a)),t.set(e,r)}var c,f={toBytes:function(e){var t=[],r=0;for(e=encodeURI(e);r191&&n<224?(t.push(String.fromCharCode((31&n)<<6|63&e[r+1])),r+=2):(t.push(String.fromCharCode((15&n)<<12|(63&e[r+1])<<6|63&e[r+2])),r+=3)}return t.join("")}},d=(c="0123456789abcdef",{toBytes:function(e){for(var t=[],r=0;r>4]+c[15&n])}return t.join("")}}),s={16:10,24:12,32:14},u=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],b=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],h=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],l=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],p=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],m=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],x=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],y=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],v=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],g=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],w=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],_=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],M=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],k=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],S=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function A(e){for(var t=[],r=0;r>2,this._Ke[r][t%4]=i[t],this._Kd[e-r][t%4]=i[t];for(var o,c=0,f=a;f>16&255]<<24^b[o>>8&255]<<16^b[255&o]<<8^b[o>>24&255]^u[c]<<24,c+=1,8!=a)for(t=1;t>8&255]<<8^b[o>>16&255]<<16^b[o>>24&255]<<24;for(t=a/2+1;t>2,h=f%4,this._Ke[d][h]=i[t],this._Kd[e-d][h]=i[t++],f++}for(var d=1;d>24&255]^M[o>>16&255]^k[o>>8&255]^S[255&o]},E.prototype.encrypt=function(e){if(16!=e.length)throw new Error("invalid plaintext size (must be 16 bytes)");for(var t=this._Ke.length-1,r=[0,0,0,0],n=A(e),a=0;a<4;a++)n[a]^=this._Ke[0][a];for(var o=1;o>24&255]^p[n[(a+1)%4]>>16&255]^m[n[(a+2)%4]>>8&255]^x[255&n[(a+3)%4]]^this._Ke[o][a];n=r.slice()}var c,f=i(16);for(a=0;a<4;a++)c=this._Ke[t][a],f[4*a]=255&(b[n[a]>>24&255]^c>>24),f[4*a+1]=255&(b[n[(a+1)%4]>>16&255]^c>>16),f[4*a+2]=255&(b[n[(a+2)%4]>>8&255]^c>>8),f[4*a+3]=255&(b[255&n[(a+3)%4]]^c);return f},E.prototype.decrypt=function(e){if(16!=e.length)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var t=this._Kd.length-1,r=[0,0,0,0],n=A(e),a=0;a<4;a++)n[a]^=this._Kd[0][a];for(var o=1;o>24&255]^v[n[(a+3)%4]>>16&255]^g[n[(a+2)%4]>>8&255]^w[255&n[(a+1)%4]]^this._Kd[o][a];n=r.slice()}var c,f=i(16);for(a=0;a<4;a++)c=this._Kd[t][a],f[4*a]=255&(h[n[a]>>24&255]^c>>24),f[4*a+1]=255&(h[n[(a+3)%4]>>16&255]^c>>16),f[4*a+2]=255&(h[n[(a+2)%4]>>8&255]^c>>8),f[4*a+3]=255&(h[255&n[(a+1)%4]]^c);return f};var O=function e(t){if(!(this instanceof e))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new E(t)};O.prototype.encrypt=function(e){if((e=a(e)).length%16!=0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var t=i(e.length),r=i(16),n=0;nNumber.MAX_SAFE_INTEGER)throw new Error("integer value out of safe range");for(var t=15;t>=0;--t)this._counter[t]=e%256,e=parseInt(e/256)},B.prototype.setBytes=function(e){if(16!=(e=a(e,!0)).length)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=e},B.prototype.increment=function(){for(var e=15;e>=0;e--){if(255!==this._counter[e]){this._counter[e]++;break}this._counter[e]=0}};var R=function e(t,r){if(!(this instanceof e))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",r instanceof B||(r=new B(r)),this._counter=r,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new E(t)};R.prototype.encrypt=function(e){for(var t=a(e,!0),r=0;r16)throw new Error("PKCS#7 padding byte out of range");for(var r=e.length-t,n=0;n=0;f--)(i=e[f])&&(c=(o<3?i(c):o>3?i(t,r,c):i(t,r))||c);return o>3&&c&&Object.defineProperty(t,r,c),c};Object.defineProperty(t,"__esModule",{value:!0}),t.NativeSvr=void 0;var i=r(5),o=r(115),c=r(97),f=function(){function e(){this._event=o.createWalletEvents()}return e.prototype._subscribeToResponse=function(e,t){this._event.on("response:"+e,t)},e.prototype._subscribeToCallResponse=function(e){var t=this;return new Promise((function(r,n){t._subscribeToResponse(e,(function(e){e.errcode?n(e.errcode):r(e.data)}))}))},e.prototype.handleNativeCallback=function(){for(var e=[],t=0;t=0;f--)(i=e[f])&&(c=(o<3?i(c):o>3?i(t,r,c):i(t,r))||c);return o>3&&c&&Object.defineProperty(t,r,c),c};Object.defineProperty(t,"__esModule",{value:!0}),t.WalletEnv=void 0;var i=r(115),o=r(97),c=function(){function e(){this.handler=i.createWalletEvents()}return e=a([o.singleton],e)}();t.WalletEnv=c},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.abiERC1155=void 0,t.abiERC1155=[{inputs:[{internalType:"string",name:"uri_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256[]",name:"ids",type:"uint256[]"},{indexed:!1,internalType:"uint256[]",name:"values",type:"uint256[]"}],name:"TransferBatch",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"id",type:"uint256"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"TransferSingle",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"string",name:"value",type:"string"},{indexed:!0,internalType:"uint256",name:"id",type:"uint256"}],name:"URI",type:"event"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"uint256",name:"id",type:"uint256"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"accounts",type:"address[]"},{internalType:"uint256[]",name:"ids",type:"uint256[]"}],name:"balanceOfBatch",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256[]",name:"ids",type:"uint256[]"},{internalType:"uint256[]",name:"amounts",type:"uint256[]"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeBatchTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"id",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"uri",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}]},function(e,t,r){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.WalletConnect=void 0;var o=i(r(852)),c=r(752),f=function(e){function t(t,r){return e.call(this,{cryptoLib:c,connectorOpts:t,pushServerOpts:r})||this}return a(t,e),t.getInstance=function(e,r){return this._instance||(this._instance=new t(e,r)),this._instance},t}(o.default);t.WalletConnect=f},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(755),t),a(r(756),t),a(r(757),t),a(r(335),t),a(r(758),t)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LENGTH_1024=t.LENGTH_512=t.LENGTH_256=t.LENGTH_128=t.LENGTH_64=t.LENGTH_32=t.LENGTH_16=t.LENGTH_1=t.LENGTH_0=void 0,t.LENGTH_0=0,t.LENGTH_1=1,t.LENGTH_16=16,t.LENGTH_32=32,t.LENGTH_64=64,t.LENGTH_128=128,t.LENGTH_256=256,t.LENGTH_512=512,t.LENGTH_1024=1024},function(e,t,r){"use strict";var n=function(e,t){return function(){for(var r=this,n=t.promiseModule,a=new Array(arguments.length),i=0;i-1&&e%1==0&&e<=9007199254740991}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={},e.exports=t.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(t,r,f){if(f=(0,a.default)(f||n.default),e<=0||!t)return f(null);var d=(0,i.default)(t),s=!1,u=0,b=!1;function h(e,t){if(u-=1,e)s=!0,f(e);else{if(t===c.default||s&&u<=0)return s=!0,f(null);b||l()}}function l(){for(b=!0;u=e.params.length?e.params:"eth_getBlockByNumber"===e.method?e.params.slice(1):e.params.slice(0,t)}function o(e){switch(e.method){case"eth_getStorageAt":return 2;case"eth_getBalance":case"eth_getCode":case"eth_getTransactionCount":case"eth_call":case"eth_estimateGas":return 1;case"eth_getBlockByNumber":return 0;default:return}}function c(e){switch(e.method){case"web3_clientVersion":case"web3_sha3":case"eth_protocolVersion":case"eth_getBlockTransactionCountByHash":case"eth_getUncleCountByBlockHash":case"eth_getCode":case"eth_getBlockByHash":case"eth_getTransactionByHash":case"eth_getTransactionByBlockHashAndIndex":case"eth_getTransactionReceipt":case"eth_getUncleByBlockHashAndIndex":case"eth_getCompilers":case"eth_compileLLL":case"eth_compileSolidity":case"eth_compileSerpent":case"shh_version":return"perma";case"eth_getBlockByNumber":case"eth_getBlockTransactionCountByNumber":case"eth_getUncleCountByBlockNumber":case"eth_getTransactionByBlockNumberAndIndex":case"eth_getUncleByBlockNumberAndIndex":return"fork";case"eth_gasPrice":case"eth_getBalance":case"eth_getStorageAt":case"eth_getTransactionCount":case"eth_call":case"eth_estimateGas":case"eth_getFilterLogs":case"eth_getLogs":case"eth_blockNumber":return"block";case"net_version":case"net_peerCount":case"net_listening":case"eth_syncing":case"eth_sign":case"eth_coinbase":case"eth_mining":case"eth_hashrate":case"eth_accounts":case"eth_sendTransaction":case"eth_sendRawTransaction":case"eth_newFilter":case"eth_newBlockFilter":case"eth_newPendingTransactionFilter":case"eth_uninstallFilter":case"eth_getFilterChanges":case"eth_getWork":case"eth_submitWork":case"eth_submitHashrate":case"db_putString":case"db_getString":case"db_putHex":case"db_getHex":case"shh_post":case"shh_newIdentity":case"shh_hasIdentity":case"shh_newGroup":case"shh_addToGroup":case"shh_newFilter":case"shh_uninstallFilter":case"shh_getFilterChanges":case"shh_getMessages":return"never"}}e.exports={cacheIdentifierForPayload:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!a(e))return null;var r=t.includeBlockRef,o=r?e.params:i(e);return e.method+":"+n(o)},canCache:a,blockTagForPayload:function(e){var t=o(e);if(t>=e.params.length)return null;return e.params[t]},paramsWithoutBlockTag:i,blockTagParamIndex:o,cacheTypeForPayload:c}},function(e,t,r){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var a="undefined"!=typeof JSON?JSON:r(803);e.exports=function(e,t){t||(t={}),"function"==typeof t&&(t={cmp:t});var r=t.space||"";"number"==typeof r&&(r=Array(r+1).join(" "));var c,f="boolean"==typeof t.cycles&&t.cycles,d=t.replacer||function(e,t){return t},s=t.cmp&&(c=t.cmp,function(e){return function(t,r){var n={key:t,value:e[t]},a={key:r,value:e[r]};return c(n,a)}}),u=[];return function e(t,c,b,h){var l=r?"\n"+new Array(h+1).join(r):"",p=r?": ":":";if(b&&b.toJSON&&"function"==typeof b.toJSON&&(b=b.toJSON()),void 0!==(b=d.call(t,c,b))){if("object"!==n(b)||null===b)return a.stringify(b);if(i(b)){for(var m=[],x=0;x=0;--a){var i=this.tryEntries[a],o=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),f=r.call(i,"finallyLoc");if(c&&f){if(this.prev=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),k(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;k(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:A(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),b}},e}function i(e,t,r,n,a,i,o){try{var c=e[i](o),f=c.value}catch(e){return void r(e)}c.done?t(f):Promise.resolve(f).then(n,a)}function o(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function c(e){i(o,n,a,c,f,"next",e)}function f(e){i(o,n,a,c,f,"throw",e)}c(void 0)}))}}var c=r(853).Mutex,f=r(351).createAsyncMiddleware,d=r(355),s=r(821),u=r(824),b=r(825),h=r(91),l=h.intToHex,p=h.hexToInt;function m(e){return x(o(a().mark((function t(){var r,n,i=arguments;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.apply(void 0,i);case 2:return r=t.sent,n=l(r.id),t.abrupt("return",n);case 5:case"end":return t.stop()}}),t)}))))}function x(e){return f(function(){var t=o(a().mark((function t(r,n){var i;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.apply(null,r.params);case 2:i=t.sent,n.result=i;case 4:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}())}function y(e,t){var r=[];for(var n in e)r.push(e[n]);return r}e.exports=function(e){var t=e.blockTracker,r=e.provider,n=0,i={},f=new c,h=function(e){var t=e.mutex;return function(e){return function(){var r=o(a().mark((function r(n,i,o,c){return a().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,t.acquire();case 2:(0,r.sent)(),e(n,i,o,c);case 5:case"end":return r.stop()}}),r)})));return function(e,t,n,a){return r.apply(this,arguments)}}()}}({mutex:f}),v=d({eth_newFilter:h(m(w)),eth_newBlockFilter:h(m(M)),eth_newPendingTransactionFilter:h(m(S)),eth_uninstallFilter:h(x(j)),eth_getFilterChanges:h(x(E)),eth_getFilterLogs:h(x(T))}),g=function(){var e=o(a().mark((function e(t){var r,n,c;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.oldBlock,n=t.newBlock,0!==i.length){e.next=3;break}return e.abrupt("return");case 3:return e.next=5,f.acquire();case 5:return c=e.sent,e.prev=6,e.next=9,Promise.all(y(i).map(function(){var e=o(a().mark((function e(t){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t.update({oldBlock:r,newBlock:n});case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),console.error(e.t0);case 8:case"end":return e.stop()}}),e,null,[[0,5]])})));return function(t){return e.apply(this,arguments)}}()));case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(6),console.error(e.t0);case 14:c();case 15:case"end":return e.stop()}}),e,null,[[6,11]])})));return function(t){return e.apply(this,arguments)}}();return v.newLogFilter=w,v.newBlockFilter=M,v.newPendingTransactionFilter=S,v.uninstallFilter=j,v.getFilterChanges=E,v.getFilterLogs=T,v.destroy=function(){!function(){N.apply(this,arguments)}()},v;function w(e){return _.apply(this,arguments)}function _(){return(_=o(a().mark((function e(t){var n;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=new s({provider:r,params:t}),e.next=3,R(n);case 3:return e.sent,e.abrupt("return",n);case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function M(){return k.apply(this,arguments)}function k(){return(k=o(a().mark((function e(){var t;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=new u({provider:r}),e.next=3,R(t);case 3:return e.sent,e.abrupt("return",t);case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function S(){return A.apply(this,arguments)}function A(){return(A=o(a().mark((function e(){var t;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=new b({provider:r}),e.next=3,R(t);case 3:return e.sent,e.abrupt("return",t);case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function E(e){return O.apply(this,arguments)}function O(){return(O=o(a().mark((function e(t){var r,n,o;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=p(t),n=i[r]){e.next=4;break}throw new Error('No filter for index "'.concat(r,'"'));case 4:return o=n.getChangesAndClear(),e.abrupt("return",o);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function T(e){return P.apply(this,arguments)}function P(){return(P=o(a().mark((function e(t){var r,n;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=p(t),n=i[r]){e.next=4;break}throw new Error('No filter for index "'.concat(r,'"'));case 4:return"log"===n.type?results=n.getAllResults():results=[],e.abrupt("return",results);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function j(e){return B.apply(this,arguments)}function B(){return(B=o(a().mark((function e(t){var r,n,o;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=p(t),n=i[r],!(o=Boolean(n))){e.next=6;break}return e.next=6,I(r);case 6:return e.abrupt("return",o);case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function R(e){return C.apply(this,arguments)}function C(){return(C=o(a().mark((function e(r){var o,c,f;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=y(i).length,e.next=3,t.getLatestBlock();case 3:return c=e.sent,e.next=6,r.initialize({currentBlock:c});case 6:return n++,i[n]=r,r.id=n,r.idHex=l(n),f=y(i).length,U({prevFilterCount:o,newFilterCount:f}),e.abrupt("return",n);case 13:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function I(e){return L.apply(this,arguments)}function L(){return(L=o(a().mark((function e(t){var r,n;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=y(i).length,delete i[t],n=y(i).length,U({prevFilterCount:r,newFilterCount:n});case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function N(){return(N=o(a().mark((function e(){var t;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=y(i).length,i={},U({prevFilterCount:t,newFilterCount:0});case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function U(e){var r=e.prevFilterCount,n=e.newFilterCount;0===r&&n>0?t.on("sync",g):r>0&&0===n&&t.removeListener("sync",g)}}},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||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),a(r(813),t),a(r(814),t),a(r(815),t),a(r(352),t),a(r(353),t),a(r(819),t)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getUniqueId=void 0;var n=Math.floor(4294967295*Math.random());t.getUniqueId=function(){return n=(n+1)%4294967295}},function(e,t,r){"use strict";function n(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=c(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,f=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){f=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(f)throw i}}}}function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */i=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",c=n.asyncIterator||"@@asyncIterator",f=n.toStringTag||"@@toStringTag";function d(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{d({},"")}catch(e){d=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var a=t&&t.prototype instanceof h?t:h,i=Object.create(a.prototype),o=new S(n||[]);return i._invoke=function(e,t,r){var n="suspendedStart";return function(a,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw i;return E()}for(r.method=a,r.arg=i;;){var o=r.delegate;if(o){var c=_(o,r);if(c){if(c===b)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var f=u(e,t,r);if("normal"===f.type){if(n=r.done?"completed":"suspendedYield",f.arg===b)continue;return{value:f.arg,done:r.done}}"throw"===f.type&&(n="completed",r.method="throw",r.arg=f.arg)}}}(e,r,o),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=s;var b={};function h(){}function l(){}function p(){}var m={};d(m,o,(function(){return this}));var x=Object.getPrototypeOf,y=x&&x(x(A([])));y&&y!==t&&r.call(y,o)&&(m=y);var v=p.prototype=h.prototype=Object.create(m);function g(e){["next","throw","return"].forEach((function(t){d(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){var n;this._invoke=function(i,o){function c(){return new t((function(n,c){!function n(i,o,c,f){var d=u(e[i],e,o);if("throw"!==d.type){var s=d.arg,b=s.value;return b&&"object"==a(b)&&r.call(b,"__await")?t.resolve(b.__await).then((function(e){n("next",e,c,f)}),(function(e){n("throw",e,c,f)})):t.resolve(b).then((function(e){s.value=e,c(s)}),(function(e){return n("throw",e,c,f)}))}f(d.arg)}(i,o,n,c)}))}return n=n?n.then(c,c):c()}}function _(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,_(e,t),"throw"===t.method))return b;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return b}var n=u(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,b;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,b):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,b)}function M(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function k(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function S(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(M,this),this.reset(!0)}function A(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n=0;--a){var i=this.tryEntries[a],o=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),f=r.call(i,"finallyLoc");if(c&&f){if(this.prev=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),k(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;k(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:A(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),b}},e}function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,a,i=[],o=!0,c=!1;try{for(r=r.call(e);!(o=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);o=!0);}catch(e){c=!0,a=e}finally{try{o||null==r.return||r.return()}finally{if(c)throw a}}return i}(e,t)||c(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){if(e){if("string"==typeof e)return f(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?f(e,t):void 0}}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==arguments[1]?arguments[1]:c;if(Number.isInteger(e)){var n=e.toString();if(h(a.errorValues,n))return a.errorValues[n].message;if(u(e))return t.JSON_RPC_SERVER_ERROR_MESSAGE}return r}function s(e){if(!Number.isInteger(e))return!1;var t=e.toString();return!!a.errorValues[t]||!!u(e)}function u(e){return e>=-32099&&e<=-32e3}function b(e){return e&&"object"===n(e)&&!Array.isArray(e)?Object.assign({},e):e}function h(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.",t.getMessageFromCode=d,t.isValidCode=s,t.serializeError=function(e){var t,r,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=a.fallbackError,c=void 0===o?f:o,u=a.shouldIncludeStack,l=void 0!==u&&u;if(!c||!Number.isInteger(c.code)||"string"!=typeof c.message)throw new Error("Must provide fallback error with integer number code and string message.");if(e instanceof i.EthereumRpcError)return e.serialize();var p={};if(e&&"object"===n(e)&&!Array.isArray(e)&&h(e,"code")&&s(e.code)){var m=e;p.code=m.code,m.message&&"string"==typeof m.message?(p.message=m.message,h(m,"data")&&(p.data=m.data)):(p.message=d(p.code),p.data={originalError:b(e)})}else{p.code=c.code;var x=null===(t=e)||void 0===t?void 0:t.message;p.message=x&&"string"==typeof x?x:c.message,p.data={originalError:b(e)}}var y=null===(r=e)||void 0===r?void 0:r.stack;return l&&e&&y&&"string"==typeof y&&(p.stack=y),p}},function(e,t,r){e.exports=r(820)},function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(a,i){function o(e){try{f(n.next(e))}catch(e){i(e)}}function c(e){try{f(n.throw(e))}catch(e){i(e)}}function f(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,c)}f((n=n.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var r,n,a,i,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(a=2&i[0]?n.return:i[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,i[1])).done)return a;switch(n=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,n=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!(a=o.trys,(a=a.length>0&&a[a.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]=a)n="0."+n;else{var i=a-t;n=n.slice(0,i)+"."+n.slice(i)}return n=n.slice(0,n.lastIndexOf(".")+r+1)},t.toHexChainId=function(e){return"0x"+e.toString(16)},t.getTypeByAddress=function(e,r){var n=i.DEFAULT_NFT_TYPES[e],a=t.UNKNOW,o="erc721";if(n)for(var c in n)n[c]&&n[c].address===r&&(a=c,o=n[c].type);return{categor:a,type:o}},t.getJCErc721Info=function(e){return n(this,void 0,void 0,(function(){var t;return a(this,(function(r){return t=""+i.BASE_TOKEN_URI+e,[2,fetch(t).then((function(e){return e.json()}))]}))}))}},function(e,t,r){"use strict";r.r(t),r.d(t,"ConstructorFragment",(function(){return P})),r.d(t,"ErrorFragment",(function(){return R})),r.d(t,"EventFragment",(function(){return A})),r.d(t,"Fragment",(function(){return S})),r.d(t,"FunctionFragment",(function(){return j})),r.d(t,"ParamType",(function(){return M})),r.d(t,"FormatTypes",(function(){return w})),r.d(t,"AbiCoder",(function(){return Ct})),r.d(t,"defaultAbiCoder",(function(){return It})),r.d(t,"Interface",(function(){return er})),r.d(t,"Indexed",(function(){return Yt})),r.d(t,"checkResultErrors",(function(){return D})),r.d(t,"LogDescription",(function(){return Zt})),r.d(t,"TransactionDescription",(function(){return Jt}));var n=r(47),a=r(10),i=r(3);function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f(e,t)}function f(e,t){return(f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function d(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=u(e);if(t){var a=u(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return s(this,r)}}function s(e,t){if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function b(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){for(var r=0;r=0||"tuple"===e)&&y[t])return!0;return(x[t]||"payable"===t)&&p.throwArgumentError("invalid modifier","name",t),!1}function g(e,t){for(var r in t)Object(a.c)(e,r,t[r])}var w=Object.freeze({sighash:"sighash",minimal:"minimal",full:"full",json:"json"}),_=new RegExp(/^(.*)\[([0-9]*)\]$/),M=function(){function e(t,r){b(this,e),t!==m&&p.throwError("use fromString",i.a.errors.UNSUPPORTED_OPERATION,{operation:"new ParamType()"}),g(this,r);var n=this.type.match(_);g(this,n?{arrayLength:parseInt(n[2]||"-1"),arrayChildren:e.fromObject({type:n[1],components:this.components}),baseType:"array"}:{arrayLength:null,arrayChildren:null,baseType:null!=this.components?"tuple":this.type}),this._isParamType=!0,Object.freeze(this)}return l(e,[{key:"format",value:function(e){if(e||(e=w.sighash),w[e]||p.throwArgumentError("invalid format type","format",e),e===w.json){var t={type:"tuple"===this.baseType?"tuple":this.type,name:this.name||void 0};return"boolean"==typeof this.indexed&&(t.indexed=this.indexed),this.components&&(t.components=this.components.map((function(t){return JSON.parse(t.format(e))}))),JSON.stringify(t)}var r="";return"array"===this.baseType?(r+=this.arrayChildren.format(e),r+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):"tuple"===this.baseType?(e!==w.sighash&&(r+=this.type),r+="("+this.components.map((function(t){return t.format(e)})).join(e===w.full?", ":",")+")"):r+=this.type,e!==w.sighash&&(!0===this.indexed&&(r+=" indexed"),e===w.full&&this.name&&(r+=" "+this.name)),r}}],[{key:"from",value:function(t,r){return"string"==typeof t?e.fromString(t,r):e.fromObject(t)}},{key:"fromObject",value:function(t){return e.isParamType(t)?t:new e(m,{name:t.name||null,type:C(t.type),indexed:null==t.indexed?null:!!t.indexed,components:t.components?t.components.map(e.fromObject):null})}},{key:"fromString",value:function(t,r){return function(t){return e.fromObject({name:t.name,type:t.type,indexed:t.indexed,components:t.components})}(function(e,t){var r=e;function n(t){p.throwArgumentError("unexpected character at position ".concat(t),"param",e)}function a(e){var r={type:"",name:"",parent:e,state:{allowType:!0}};return t&&(r.indexed=!1),r}e=e.replace(/\s/g," ");for(var i={type:"",name:"",state:{allowType:!0}},o=i,c=0;c2&&p.throwArgumentError("invalid human-readable ABI signature","value",e),r[1].match(/^[0-9]+$/)||p.throwArgumentError("invalid human-readable ABI signature gas","value",e),t.gas=n.a.from(r[1]),r[0]):e}function O(e,t){t.constant=!1,t.payable=!1,t.stateMutability="nonpayable",e.split(" ").forEach((function(e){switch(e.trim()){case"constant":t.constant=!0;break;case"payable":t.payable=!0,t.stateMutability="payable";break;case"nonpayable":t.payable=!1,t.stateMutability="nonpayable";break;case"pure":t.constant=!0,t.stateMutability="pure";break;case"view":t.constant=!0,t.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+e)}}))}function T(e){var t={constant:!1,payable:!0,stateMutability:"payable"};return null!=e.stateMutability?(t.stateMutability=e.stateMutability,t.constant="view"===t.stateMutability||"pure"===t.stateMutability,null!=e.constant&&!!e.constant!==t.constant&&p.throwArgumentError("cannot have constant function with mutability "+t.stateMutability,"value",e),t.payable="payable"===t.stateMutability,null!=e.payable&&!!e.payable!==t.payable&&p.throwArgumentError("cannot have payable function with mutability "+t.stateMutability,"value",e)):null!=e.payable?(t.payable=!!e.payable,null!=e.constant||t.payable||"constructor"===e.type||p.throwArgumentError("unable to determine stateMutability","value",e),t.constant=!!e.constant,t.constant?t.stateMutability="view":t.stateMutability=t.payable?"payable":"nonpayable",t.payable&&t.constant&&p.throwArgumentError("cannot have constant payable function","value",e)):null!=e.constant?(t.constant=!!e.constant,t.payable=!t.constant,t.stateMutability=t.constant?"view":"payable"):"constructor"!==e.type&&p.throwArgumentError("unable to determine stateMutability","value",e),t}var P=function(e){c(r,e);var t=d(r);function r(){return b(this,r),t.apply(this,arguments)}return l(r,[{key:"format",value:function(e){if(e||(e=w.sighash),w[e]||p.throwArgumentError("invalid format type","format",e),e===w.json)return JSON.stringify({type:"constructor",stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((function(t){return JSON.parse(t.format(e))}))});e===w.sighash&&p.throwError("cannot format a constructor for sighash",i.a.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});var t="constructor("+this.inputs.map((function(t){return t.format(e)})).join(e===w.full?", ":",")+") ";return this.stateMutability&&"nonpayable"!==this.stateMutability&&(t+=this.stateMutability+" "),t.trim()}}],[{key:"from",value:function(e){return"string"==typeof e?r.fromString(e):r.fromObject(e)}},{key:"fromObject",value:function(e){if(r.isConstructorFragment(e))return e;"constructor"!==e.type&&p.throwArgumentError("invalid constructor object","value",e);var t=T(e);t.constant&&p.throwArgumentError("constructor cannot be constant","value",e);var a={name:null,type:e.type,inputs:e.inputs?e.inputs.map(M.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?n.a.from(e.gas):null};return new r(m,a)}},{key:"fromString",value:function(e){var t={type:"constructor"},n=(e=E(e,t)).match(N);return n&&"constructor"===n[1].trim()||p.throwArgumentError("invalid constructor string","value",e),t.inputs=k(n[2].trim(),!1),O(n[3].trim(),t),r.fromObject(t)}},{key:"isConstructorFragment",value:function(e){return e&&e._isFragment&&"constructor"===e.type}}]),r}(S),j=function(e){c(r,e);var t=d(r);function r(){return b(this,r),t.apply(this,arguments)}return l(r,[{key:"format",value:function(e){if(e||(e=w.sighash),w[e]||p.throwArgumentError("invalid format type","format",e),e===w.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((function(t){return JSON.parse(t.format(e))})),outputs:this.outputs.map((function(t){return JSON.parse(t.format(e))}))});var t="";return e!==w.sighash&&(t+="function "),t+=this.name+"("+this.inputs.map((function(t){return t.format(e)})).join(e===w.full?", ":",")+") ",e!==w.sighash&&(this.stateMutability?"nonpayable"!==this.stateMutability&&(t+=this.stateMutability+" "):this.constant&&(t+="view "),this.outputs&&this.outputs.length&&(t+="returns ("+this.outputs.map((function(t){return t.format(e)})).join(", ")+") "),null!=this.gas&&(t+="@"+this.gas.toString()+" ")),t.trim()}}],[{key:"from",value:function(e){return"string"==typeof e?r.fromString(e):r.fromObject(e)}},{key:"fromObject",value:function(e){if(r.isFunctionFragment(e))return e;"function"!==e.type&&p.throwArgumentError("invalid function object","value",e);var t=T(e),a={type:e.type,name:L(e.name),constant:t.constant,inputs:e.inputs?e.inputs.map(M.fromObject):[],outputs:e.outputs?e.outputs.map(M.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?n.a.from(e.gas):null};return new r(m,a)}},{key:"fromString",value:function(e){var t={type:"function"},n=(e=E(e,t)).split(" returns ");n.length>2&&p.throwArgumentError("invalid function string","value",e);var a=n[0].match(N);if(a||p.throwArgumentError("invalid function signature","value",e),t.name=a[1].trim(),t.name&&L(t.name),t.inputs=k(a[2],!1),O(a[3].trim(),t),n.length>1){var i=n[1].match(N);""==i[1].trim()&&""==i[3].trim()||p.throwArgumentError("unexpected tokens","value",e),t.outputs=k(i[2],!1)}else t.outputs=[];return r.fromObject(t)}},{key:"isFunctionFragment",value:function(e){return e&&e._isFragment&&"function"===e.type}}]),r}(P);function B(e){var t=e.format();return"Error(string)"!==t&&"Panic(uint256)"!==t||p.throwArgumentError("cannot specify user defined ".concat(t," error"),"fragment",e),e}var R=function(e){c(r,e);var t=d(r);function r(){return b(this,r),t.apply(this,arguments)}return l(r,[{key:"format",value:function(e){if(e||(e=w.sighash),w[e]||p.throwArgumentError("invalid format type","format",e),e===w.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map((function(t){return JSON.parse(t.format(e))}))});var t="";return e!==w.sighash&&(t+="error "),(t+=this.name+"("+this.inputs.map((function(t){return t.format(e)})).join(e===w.full?", ":",")+") ").trim()}}],[{key:"from",value:function(e){return"string"==typeof e?r.fromString(e):r.fromObject(e)}},{key:"fromObject",value:function(e){if(r.isErrorFragment(e))return e;"error"!==e.type&&p.throwArgumentError("invalid error object","value",e);var t={type:e.type,name:L(e.name),inputs:e.inputs?e.inputs.map(M.fromObject):[]};return B(new r(m,t))}},{key:"fromString",value:function(e){var t={type:"error"},n=e.match(N);return n||p.throwArgumentError("invalid error signature","value",e),t.name=n[1].trim(),t.name&&L(t.name),t.inputs=k(n[2],!1),B(r.fromObject(t))}},{key:"isErrorFragment",value:function(e){return e&&e._isFragment&&"error"===e.type}}]),r}(S);function C(e){return e.match(/^uint($|[^1-9])/)?e="uint256"+e.substring(4):e.match(/^int($|[^1-9])/)&&(e="int256"+e.substring(3)),e}var I=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function L(e){return e&&e.match(I)||p.throwArgumentError('invalid identifier "'.concat(e,'"'),"value",e),e}var N=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");var U=r(1);function z(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function F(e,t){for(var r=0;rthis.wordSize&&H.throwError("value out-of-bounds",i.a.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:t.length}),t.length%this.wordSize&&(t=Object(U.b)([this._padding.slice(t.length%this.wordSize),t])),t}},{key:"writeValue",value:function(e){return this._writeData(this._getValue(e))}},{key:"writeUpdatableValue",value:function(){var e=this,t=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,function(r){e._data[t]=e._getValue(r)}}}]),e}(),W=function(){function e(t,r,n,i){z(this,e),Object(a.c)(this,"_data",Object(U.a)(t)),Object(a.c)(this,"wordSize",r||32),Object(a.c)(this,"_coerceFunc",n),Object(a.c)(this,"allowLoose",i),this._offset=0}return q(e,[{key:"data",get:function(){return Object(U.g)(this._data)}},{key:"consumed",get:function(){return this._offset}},{key:"coerce",value:function(t,r){return this._coerceFunc?this._coerceFunc(t,r):e.coerce(t,r)}},{key:"_peekBytes",value:function(e,t,r){var n=Math.ceil(t/this.wordSize)*this.wordSize;return this._offset+n>this._data.length&&(this.allowLoose&&r&&this._offset+t<=this._data.length?n=t:H.throwError("data out-of-bounds",i.a.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+n})),this._data.slice(this._offset,this._offset+n)}},{key:"subReader",value:function(t){return new e(this._data.slice(this._offset+t),this.wordSize,this._coerceFunc,this.allowLoose)}},{key:"readBytes",value:function(e,t){var r=this._peekBytes(0,e,!!t);return this._offset+=r.length,r.slice(0,e)}},{key:"readValue",value:function(){return n.a.from(this.readBytes(this.wordSize))}}],[{key:"coerce",value:function(e,t){var r=e.match("^u?int([0-9]+)$");return r&&parseInt(r[1])<=48&&(t=t.toNumber()),t}}]),e}(),V=r(33);function Z(e){return(Z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function J(e,t){for(var r=0;r=0?t:"")+"]",c=-1===t||e.dynamic;return(n=a.call(this,"array",i,r,c)).coder=e,n.length=t,n}return t=o,(r=[{key:"defaultValue",value:function(){for(var e=this.coder.defaultValue(),t=[],r=0;re._data.length&&le.throwError("insufficient data length",i.a.errors.BUFFER_OVERRUN,{length:e._data.length,count:t});for(var r=[],n=0;n>6==2;o++)i++;return i}return e===ot.OVERRUN?r.length-t-1:0}!function(e){e.current="",e.NFC="NFC",e.NFD="NFD",e.NFKC="NFKC",e.NFKD="NFKD"}(it||(it={})),function(e){e.UNEXPECTED_CONTINUE="unexpected continuation byte",e.BAD_PREFIX="bad codepoint prefix",e.OVERRUN="string overrun",e.MISSING_CONTINUE="missing continuation byte",e.OUT_OF_RANGE="out of UTF-8 range",e.UTF16_SURROGATE="UTF-16 surrogate",e.OVERLONG="overlong representation"}(ot||(ot={}));var st=Object.freeze({error:function(e,t,r,n,a){return ft.throwArgumentError("invalid codepoint at offset ".concat(t,"; ").concat(e),"bytes",r)},ignore:dt,replace:function(e,t,r,n,a){return e===ot.OVERLONG?(n.push(a),0):(n.push(65533),dt(e,t,r))}});function ut(e,t){null==t&&(t=st.error),e=Object(U.a)(e);for(var r=[],n=0;n>7!=0){var i=null,o=null;if(192==(224&a))i=1,o=127;else if(224==(240&a))i=2,o=2047;else{if(240!=(248&a)){n+=t(128==(192&a)?ot.UNEXPECTED_CONTINUE:ot.BAD_PREFIX,n-1,e,r);continue}i=3,o=65535}if(n-1+i>=e.length)n+=t(ot.OVERRUN,n-1,e,r);else{for(var c=a&(1<<8-i-1)-1,f=0;f1114111?n+=t(ot.OUT_OF_RANGE,n-1-i,e,r,c):c>=55296&&c<=57343?n+=t(ot.UTF16_SURROGATE,n-1-i,e,r,c):c<=o?n+=t(ot.OVERLONG,n-1-i,e,r,c):r.push(c))}}else r.push(a)}return r}function bt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:it.current;t!=it.current&&(ft.checkNormalize(),e=e.normalize(t));for(var r=[],n=0;n>6|192),r.push(63&a|128);else if(55296==(64512&a)){n++;var i=e.charCodeAt(n);if(n>=e.length||56320!=(64512&i))throw new Error("invalid utf-8 string");var o=65536+((1023&a)<<10)+(1023&i);r.push(o>>18|240),r.push(o>>12&63|128),r.push(o>>6&63|128),r.push(63&o|128)}else r.push(a>>12|224),r.push(a>>6&63|128),r.push(63&a|128)}return Object(U.a)(r)}function ht(e,t){return ut(e,t).map((function(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10&1023),56320+(1023&e)))})).join("")}function lt(e){return(lt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function pt(e,t){for(var r=0;r256||n%8!=0)&&jt.throwArgumentError("invalid "+r[1]+" bit length","param",e),new ct(n/8,"int"===r[1],e.name)}if(r=e.type.match(Bt)){var a=parseInt(r[1]);return(0===a||a>32)&&jt.throwArgumentError("invalid bytes length","param",e),new Ke(a,e.name)}return jt.throwArgumentError("invalid type","type",e.type)}},{key:"_getWordSize",value:function(){return 32}},{key:"_getReader",value:function(e,t){return new W(e,this._getWordSize(),this.coerceFunc,t)}},{key:"_getWriter",value:function(){return new G(this._getWordSize())}},{key:"getDefaultValue",value:function(e){var t=this,r=e.map((function(e){return t._getCoder(M.from(e))}));return new Tt(r,"_").defaultValue()}},{key:"encode",value:function(e,t){var r=this;e.length!==t.length&&jt.throwError("types/values length mismatch",i.a.errors.INVALID_ARGUMENT,{count:{types:e.length,values:t.length},value:{types:e,values:t}});var n=e.map((function(e){return r._getCoder(M.from(e))})),a=new Tt(n,"_"),o=this._getWriter();return a.encode(o,t),o.data}},{key:"decode",value:function(e,t,r){var n=this,a=e.map((function(e){return n._getCoder(M.from(e))}));return new Tt(a,"_").decode(this._getReader(Object(U.a)(t),r))}}])&&Pt(t.prototype,r),n&&Pt(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),It=new Ct,Lt=r(20);function Nt(e){return Object(Lt.a)(bt(e))}function Ut(e){return(Ut="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function zt(e,t){for(var r=0;r1&&Vt.throwArgumentError("multiple matching functions","name",r),this.functions[n[0]]}var a=this.functions[j.fromString(e).format()];return a||Vt.throwArgumentError("no matching function","signature",e),a}},{key:"getEvent",value:function(e){if(Object(U.j)(e)){var t=e.toLowerCase();for(var r in this.events)if(t===this.getEventTopic(r))return this.events[r];Vt.throwArgumentError("no matching event","topichash",t)}if(-1===e.indexOf("(")){var n=e.trim(),a=Object.keys(this.events).filter((function(e){return e.split("(")[0]===n}));return 0===a.length?Vt.throwArgumentError("no matching event","name",n):a.length>1&&Vt.throwArgumentError("multiple matching events","name",n),this.events[a[0]]}var i=this.events[A.fromString(e).format()];return i||Vt.throwArgumentError("no matching event","signature",e),i}},{key:"getError",value:function(e){if(Object(U.j)(e)){var t=Object(a.d)(this.constructor,"getSighash");for(var r in this.errors){if(e===t(this.errors[r]))return this.errors[r]}Vt.throwArgumentError("no matching error","sighash",e)}if(-1===e.indexOf("(")){var n=e.trim(),i=Object.keys(this.errors).filter((function(e){return e.split("(")[0]===n}));return 0===i.length?Vt.throwArgumentError("no matching error","name",n):i.length>1&&Vt.throwArgumentError("multiple matching errors","name",n),this.errors[i[0]]}var o=this.errors[j.fromString(e).format()];return o||Vt.throwArgumentError("no matching error","signature",e),o}},{key:"getSighash",value:function(e){if("string"==typeof e)try{e=this.getFunction(e)}catch(t){try{e=this.getError(e)}catch(e){throw t}}return Object(a.d)(this.constructor,"getSighash")(e)}},{key:"getEventTopic",value:function(e){return"string"==typeof e&&(e=this.getEvent(e)),Object(a.d)(this.constructor,"getEventTopic")(e)}},{key:"_decodeParams",value:function(e,t){return this._abiCoder.decode(e,t)}},{key:"_encodeParams",value:function(e,t){return this._abiCoder.encode(e,t)}},{key:"encodeDeploy",value:function(e){return this._encodeParams(this.deploy.inputs,e||[])}},{key:"decodeErrorResult",value:function(e,t){"string"==typeof e&&(e=this.getError(e));var r=Object(U.a)(t);return Object(U.g)(r.slice(0,4))!==this.getSighash(e)&&Vt.throwArgumentError("data signature does not match error ".concat(e.name,"."),"data",Object(U.g)(r)),this._decodeParams(e.inputs,r.slice(4))}},{key:"encodeErrorResult",value:function(e,t){return"string"==typeof e&&(e=this.getError(e)),Object(U.g)(Object(U.b)([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}},{key:"decodeFunctionData",value:function(e,t){"string"==typeof e&&(e=this.getFunction(e));var r=Object(U.a)(t);return Object(U.g)(r.slice(0,4))!==this.getSighash(e)&&Vt.throwArgumentError("data signature does not match function ".concat(e.name,"."),"data",Object(U.g)(r)),this._decodeParams(e.inputs,r.slice(4))}},{key:"encodeFunctionData",value:function(e,t){return"string"==typeof e&&(e=this.getFunction(e)),Object(U.g)(Object(U.b)([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}},{key:"decodeFunctionResult",value:function(e,t){"string"==typeof e&&(e=this.getFunction(e));var r=Object(U.a)(t),n=null,a="",o=null,c=null,f=null;switch(r.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,r)}catch(u){}break;case 4:var d=Object(U.g)(r.slice(0,4)),s=$t[d];if(s)o=this._abiCoder.decode(s.inputs,r.slice(4)),c=s.name,f=s.signature,s.reason&&(n=o[0]),"Error"===c?a="; VM Exception while processing transaction: reverted with reason string ".concat(JSON.stringify(o[0])):"Panic"===c&&(a="; VM Exception while processing transaction: reverted with panic code ".concat(o[0]));else try{var u=this.getError(d);o=this._abiCoder.decode(u.inputs,r.slice(4)),c=u.name,f=u.format()}catch(u){}}return Vt.throwError("call revert exception"+a,i.a.errors.CALL_EXCEPTION,{method:e.format(),data:Object(U.g)(t),errorArgs:o,errorName:c,errorSignature:f,reason:n})}},{key:"encodeFunctionResult",value:function(e,t){return"string"==typeof e&&(e=this.getFunction(e)),Object(U.g)(this._abiCoder.encode(e.outputs,t||[]))}},{key:"encodeFilterTopics",value:function(e,t){var r=this;"string"==typeof e&&(e=this.getEvent(e)),t.length>e.inputs.length&&Vt.throwError("too many arguments for "+e.format(),i.a.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:t});var a=[];e.anonymous||a.push(this.getEventTopic(e));var o=function(e,t){return"string"===e.type?Nt(t):"bytes"===e.type?Object(Lt.a)(Object(U.g)(t)):("bool"===e.type&&"boolean"==typeof t&&(t=t?"0x01":"0x00"),e.type.match(/^u?int/)&&(t=n.a.from(t).toHexString()),"address"===e.type&&r._abiCoder.encode(["address"],[t]),Object(U.f)(Object(U.g)(t),32))};for(t.forEach((function(t,r){var n=e.inputs[r];n.indexed?null==t?a.push(null):"array"===n.baseType||"tuple"===n.baseType?Vt.throwArgumentError("filtering with tuples or arrays not supported","contract."+n.name,t):Array.isArray(t)?a.push(t.map((function(e){return o(n,e)}))):a.push(o(n,t)):null!=t&&Vt.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+n.name,t)}));a.length&&null===a[a.length-1];)a.pop();return a}},{key:"encodeEventLog",value:function(e,t){var r=this;"string"==typeof e&&(e=this.getEvent(e));var n=[],a=[],i=[];return e.anonymous||n.push(this.getEventTopic(e)),t.length!==e.inputs.length&&Vt.throwArgumentError("event arguments/values mismatch","values",t),e.inputs.forEach((function(e,o){var c=t[o];if(e.indexed)if("string"===e.type)n.push(Nt(c));else if("bytes"===e.type)n.push(Object(Lt.a)(c));else{if("tuple"===e.baseType||"array"===e.baseType)throw new Error("not implemented");n.push(r._abiCoder.encode([e.type],[c]))}else a.push(e),i.push(c)})),{data:this._abiCoder.encode(a,i),topics:n}}},{key:"decodeEventLog",value:function(e,t,r){if("string"==typeof e&&(e=this.getEvent(e)),null!=r&&!e.anonymous){var n=this.getEventTopic(e);Object(U.j)(r[0],32)&&r[0].toLowerCase()===n||Vt.throwError("fragment/topic mismatch",i.a.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:n,value:r[0]}),r=r.slice(1)}var a=[],o=[],c=[];e.inputs.forEach((function(e,t){e.indexed?"string"===e.type||"bytes"===e.type||"tuple"===e.baseType||"array"===e.baseType?(a.push(M.fromObject({type:"bytes32",name:e.name})),c.push(!0)):(a.push(e),c.push(!1)):(o.push(e),c.push(!1))}));var f=null!=r?this._abiCoder.decode(a,Object(U.b)(r)):null,d=this._abiCoder.decode(o,t,!0),s=[],u=0,b=0;e.inputs.forEach((function(e,t){if(e.indexed)if(null==f)s[t]=new Yt({_isIndexed:!0,hash:null});else if(c[t])s[t]=new Yt({_isIndexed:!0,hash:f[b++]});else try{s[t]=f[b++]}catch(e){s[t]=e}else try{s[t]=d[u++]}catch(e){s[t]=e}if(e.name&&null==s[e.name]){var r=s[t];r instanceof Error?Object.defineProperty(s,e.name,{enumerable:!0,get:function(){throw Qt("property ".concat(JSON.stringify(e.name)),r)}}):s[e.name]=r}}));for(var h=function(e){var t=s[e];t instanceof Error&&Object.defineProperty(s,e,{enumerable:!0,get:function(){throw Qt("index ".concat(e),t)}})},l=0;l=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void a(!1,"Invalid character in "+e)}function d(e,t,r){var n=f(e,r);return r-1>=t&&(n|=f(e,r-1)<<4),n}function s(e,t,r,n){for(var i=0,o=0,c=Math.min(e.length,r),f=t;f=49?d-49+10:d>=17?d-17+10:d,a(d>=0&&o0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,r,n){if("number"==typeof e)return this._initNumber(e,r,n);if("object"===t(e))return this._initArray(e,r,n);"hex"===r&&(r=16),a(r===(0|r)&&r>=2&&r<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;n-=3)o=e[n]|e[n-1]<<8|e[n-2]<<16,this.words[i]|=o<>>26-c&67108863,(c+=24)>=26&&(c-=26,i++);else if("le"===r)for(n=0,i=0;n>>26-c&67108863,(c+=24)>=26&&(c-=26,i++);return this._strip()},o.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n=t;n-=2)a=d(e,t,n)<=18?(i-=18,o+=1,this.words[o]|=a>>>26):i+=8;else for(n=(e.length-t)%2==0?t+1:t;n=18?(i-=18,o+=1,this.words[o]|=a>>>26):i+=8;this._strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,a=1;a<=67108863;a*=t)n++;n--,a=a/t|0;for(var i=e.length-r,o=i%n,c=Math.min(i,i-o)+r,f=0,d=r;d1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=b}catch(e){o.prototype.inspect=b}else o.prototype.inspect=b;function b(){return(this.red?""}var h=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],l=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];o.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var n=0,i=0,o=0;o>>24-n&16777215,(n+=2)>=26&&(n-=26,o--),r=0!==i||o!==this.length-1?h[6-f.length]+f+r:f+r}for(0!==i&&(r=i.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var d=l[e],s=p[e];r="";var u=this.clone();for(u.negative=0;!u.isZero();){var b=u.modrn(s).toString(e);r=(u=u.idivn(s)).isZero()?b+r:h[d-b.length]+b+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}a(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&a(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16,2)},c&&(o.prototype.toBuffer=function(e,t){return this.toArrayLike(c,e,t)}),o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};function m(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var a=0|e.words[0],i=0|t.words[0],o=a*i,c=67108863&o,f=o/67108864|0;r.words[0]=c;for(var d=1;d>>26,u=67108863&f,b=Math.min(d,t.length-1),h=Math.max(0,d-e.length+1);h<=b;h++){var l=d-h|0;s+=(o=(a=0|e.words[l])*(i=0|t.words[h])+u)/67108864|0,u=67108863&o}r.words[d]=0|u,f=0|s}return 0!==f?r.words[d]=0|f:r.length--,r._strip()}o.prototype.toArrayLike=function(e,t,r){this._strip();var n=this.byteLength(),i=r||Math.max(1,n);a(n<=i,"byte array longer than desired length"),a(i>0,"Requested array length <= 0");var o=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,i);return this["_toArrayLike"+("le"===t?"LE":"BE")](o,n),o},o.prototype._toArrayLikeLE=function(e,t){for(var r=0,n=0,a=0,i=0;a>8&255),r>16&255),6===i?(r>24&255),n=0,i=0):(n=o>>>24,i+=2)}if(r=0&&(e[r--]=o>>8&255),r>=0&&(e[r--]=o>>16&255),6===i?(r>=0&&(e[r--]=o>>24&255),n=0,i=0):(n=o>>>24,i+=2)}if(r>=0)for(e[r--]=n;r>=0;)e[r--]=0},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){a("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var n=0;n0&&(this.words[n]=~this.words[n]&67108863>>26-r),this._strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){a("number"==typeof e&&e>=0);var r=e/26|0,n=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var a=0,i=0;i>>26;for(;0!==a&&i>>26;if(this.length=r.length,0!==a)this.words[this.length]=a,this.length++;else if(r!==this)for(;ie.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,a=this.cmp(e);if(0===a)return this.negative=0,this.length=1,this.words[0]=0,this;a>0?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o>26,this.words[o]=67108863&t;for(;0!==i&&o>26,this.words[o]=67108863&t;if(0===i&&o>>13,h=0|o[1],l=8191&h,p=h>>>13,m=0|o[2],x=8191&m,y=m>>>13,v=0|o[3],g=8191&v,w=v>>>13,_=0|o[4],M=8191&_,k=_>>>13,S=0|o[5],A=8191&S,E=S>>>13,O=0|o[6],T=8191&O,P=O>>>13,j=0|o[7],B=8191&j,R=j>>>13,C=0|o[8],I=8191&C,L=C>>>13,N=0|o[9],U=8191&N,z=N>>>13,F=0|c[0],q=8191&F,H=F>>>13,D=0|c[1],K=8191&D,G=D>>>13,W=0|c[2],V=8191&W,Z=W>>>13,J=0|c[3],X=8191&J,Y=J>>>13,$=0|c[4],Q=8191&$,ee=$>>>13,te=0|c[5],re=8191&te,ne=te>>>13,ae=0|c[6],ie=8191&ae,oe=ae>>>13,ce=0|c[7],fe=8191&ce,de=ce>>>13,se=0|c[8],ue=8191&se,be=se>>>13,he=0|c[9],le=8191&he,pe=he>>>13;r.negative=e.negative^t.negative,r.length=19;var me=(d+(n=Math.imul(u,q))|0)+((8191&(a=(a=Math.imul(u,H))+Math.imul(b,q)|0))<<13)|0;d=((i=Math.imul(b,H))+(a>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(l,q),a=(a=Math.imul(l,H))+Math.imul(p,q)|0,i=Math.imul(p,H);var xe=(d+(n=n+Math.imul(u,K)|0)|0)+((8191&(a=(a=a+Math.imul(u,G)|0)+Math.imul(b,K)|0))<<13)|0;d=((i=i+Math.imul(b,G)|0)+(a>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(x,q),a=(a=Math.imul(x,H))+Math.imul(y,q)|0,i=Math.imul(y,H),n=n+Math.imul(l,K)|0,a=(a=a+Math.imul(l,G)|0)+Math.imul(p,K)|0,i=i+Math.imul(p,G)|0;var ye=(d+(n=n+Math.imul(u,V)|0)|0)+((8191&(a=(a=a+Math.imul(u,Z)|0)+Math.imul(b,V)|0))<<13)|0;d=((i=i+Math.imul(b,Z)|0)+(a>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(g,q),a=(a=Math.imul(g,H))+Math.imul(w,q)|0,i=Math.imul(w,H),n=n+Math.imul(x,K)|0,a=(a=a+Math.imul(x,G)|0)+Math.imul(y,K)|0,i=i+Math.imul(y,G)|0,n=n+Math.imul(l,V)|0,a=(a=a+Math.imul(l,Z)|0)+Math.imul(p,V)|0,i=i+Math.imul(p,Z)|0;var ve=(d+(n=n+Math.imul(u,X)|0)|0)+((8191&(a=(a=a+Math.imul(u,Y)|0)+Math.imul(b,X)|0))<<13)|0;d=((i=i+Math.imul(b,Y)|0)+(a>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(M,q),a=(a=Math.imul(M,H))+Math.imul(k,q)|0,i=Math.imul(k,H),n=n+Math.imul(g,K)|0,a=(a=a+Math.imul(g,G)|0)+Math.imul(w,K)|0,i=i+Math.imul(w,G)|0,n=n+Math.imul(x,V)|0,a=(a=a+Math.imul(x,Z)|0)+Math.imul(y,V)|0,i=i+Math.imul(y,Z)|0,n=n+Math.imul(l,X)|0,a=(a=a+Math.imul(l,Y)|0)+Math.imul(p,X)|0,i=i+Math.imul(p,Y)|0;var ge=(d+(n=n+Math.imul(u,Q)|0)|0)+((8191&(a=(a=a+Math.imul(u,ee)|0)+Math.imul(b,Q)|0))<<13)|0;d=((i=i+Math.imul(b,ee)|0)+(a>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(A,q),a=(a=Math.imul(A,H))+Math.imul(E,q)|0,i=Math.imul(E,H),n=n+Math.imul(M,K)|0,a=(a=a+Math.imul(M,G)|0)+Math.imul(k,K)|0,i=i+Math.imul(k,G)|0,n=n+Math.imul(g,V)|0,a=(a=a+Math.imul(g,Z)|0)+Math.imul(w,V)|0,i=i+Math.imul(w,Z)|0,n=n+Math.imul(x,X)|0,a=(a=a+Math.imul(x,Y)|0)+Math.imul(y,X)|0,i=i+Math.imul(y,Y)|0,n=n+Math.imul(l,Q)|0,a=(a=a+Math.imul(l,ee)|0)+Math.imul(p,Q)|0,i=i+Math.imul(p,ee)|0;var we=(d+(n=n+Math.imul(u,re)|0)|0)+((8191&(a=(a=a+Math.imul(u,ne)|0)+Math.imul(b,re)|0))<<13)|0;d=((i=i+Math.imul(b,ne)|0)+(a>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(T,q),a=(a=Math.imul(T,H))+Math.imul(P,q)|0,i=Math.imul(P,H),n=n+Math.imul(A,K)|0,a=(a=a+Math.imul(A,G)|0)+Math.imul(E,K)|0,i=i+Math.imul(E,G)|0,n=n+Math.imul(M,V)|0,a=(a=a+Math.imul(M,Z)|0)+Math.imul(k,V)|0,i=i+Math.imul(k,Z)|0,n=n+Math.imul(g,X)|0,a=(a=a+Math.imul(g,Y)|0)+Math.imul(w,X)|0,i=i+Math.imul(w,Y)|0,n=n+Math.imul(x,Q)|0,a=(a=a+Math.imul(x,ee)|0)+Math.imul(y,Q)|0,i=i+Math.imul(y,ee)|0,n=n+Math.imul(l,re)|0,a=(a=a+Math.imul(l,ne)|0)+Math.imul(p,re)|0,i=i+Math.imul(p,ne)|0;var _e=(d+(n=n+Math.imul(u,ie)|0)|0)+((8191&(a=(a=a+Math.imul(u,oe)|0)+Math.imul(b,ie)|0))<<13)|0;d=((i=i+Math.imul(b,oe)|0)+(a>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(B,q),a=(a=Math.imul(B,H))+Math.imul(R,q)|0,i=Math.imul(R,H),n=n+Math.imul(T,K)|0,a=(a=a+Math.imul(T,G)|0)+Math.imul(P,K)|0,i=i+Math.imul(P,G)|0,n=n+Math.imul(A,V)|0,a=(a=a+Math.imul(A,Z)|0)+Math.imul(E,V)|0,i=i+Math.imul(E,Z)|0,n=n+Math.imul(M,X)|0,a=(a=a+Math.imul(M,Y)|0)+Math.imul(k,X)|0,i=i+Math.imul(k,Y)|0,n=n+Math.imul(g,Q)|0,a=(a=a+Math.imul(g,ee)|0)+Math.imul(w,Q)|0,i=i+Math.imul(w,ee)|0,n=n+Math.imul(x,re)|0,a=(a=a+Math.imul(x,ne)|0)+Math.imul(y,re)|0,i=i+Math.imul(y,ne)|0,n=n+Math.imul(l,ie)|0,a=(a=a+Math.imul(l,oe)|0)+Math.imul(p,ie)|0,i=i+Math.imul(p,oe)|0;var Me=(d+(n=n+Math.imul(u,fe)|0)|0)+((8191&(a=(a=a+Math.imul(u,de)|0)+Math.imul(b,fe)|0))<<13)|0;d=((i=i+Math.imul(b,de)|0)+(a>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(I,q),a=(a=Math.imul(I,H))+Math.imul(L,q)|0,i=Math.imul(L,H),n=n+Math.imul(B,K)|0,a=(a=a+Math.imul(B,G)|0)+Math.imul(R,K)|0,i=i+Math.imul(R,G)|0,n=n+Math.imul(T,V)|0,a=(a=a+Math.imul(T,Z)|0)+Math.imul(P,V)|0,i=i+Math.imul(P,Z)|0,n=n+Math.imul(A,X)|0,a=(a=a+Math.imul(A,Y)|0)+Math.imul(E,X)|0,i=i+Math.imul(E,Y)|0,n=n+Math.imul(M,Q)|0,a=(a=a+Math.imul(M,ee)|0)+Math.imul(k,Q)|0,i=i+Math.imul(k,ee)|0,n=n+Math.imul(g,re)|0,a=(a=a+Math.imul(g,ne)|0)+Math.imul(w,re)|0,i=i+Math.imul(w,ne)|0,n=n+Math.imul(x,ie)|0,a=(a=a+Math.imul(x,oe)|0)+Math.imul(y,ie)|0,i=i+Math.imul(y,oe)|0,n=n+Math.imul(l,fe)|0,a=(a=a+Math.imul(l,de)|0)+Math.imul(p,fe)|0,i=i+Math.imul(p,de)|0;var ke=(d+(n=n+Math.imul(u,ue)|0)|0)+((8191&(a=(a=a+Math.imul(u,be)|0)+Math.imul(b,ue)|0))<<13)|0;d=((i=i+Math.imul(b,be)|0)+(a>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(U,q),a=(a=Math.imul(U,H))+Math.imul(z,q)|0,i=Math.imul(z,H),n=n+Math.imul(I,K)|0,a=(a=a+Math.imul(I,G)|0)+Math.imul(L,K)|0,i=i+Math.imul(L,G)|0,n=n+Math.imul(B,V)|0,a=(a=a+Math.imul(B,Z)|0)+Math.imul(R,V)|0,i=i+Math.imul(R,Z)|0,n=n+Math.imul(T,X)|0,a=(a=a+Math.imul(T,Y)|0)+Math.imul(P,X)|0,i=i+Math.imul(P,Y)|0,n=n+Math.imul(A,Q)|0,a=(a=a+Math.imul(A,ee)|0)+Math.imul(E,Q)|0,i=i+Math.imul(E,ee)|0,n=n+Math.imul(M,re)|0,a=(a=a+Math.imul(M,ne)|0)+Math.imul(k,re)|0,i=i+Math.imul(k,ne)|0,n=n+Math.imul(g,ie)|0,a=(a=a+Math.imul(g,oe)|0)+Math.imul(w,ie)|0,i=i+Math.imul(w,oe)|0,n=n+Math.imul(x,fe)|0,a=(a=a+Math.imul(x,de)|0)+Math.imul(y,fe)|0,i=i+Math.imul(y,de)|0,n=n+Math.imul(l,ue)|0,a=(a=a+Math.imul(l,be)|0)+Math.imul(p,ue)|0,i=i+Math.imul(p,be)|0;var Se=(d+(n=n+Math.imul(u,le)|0)|0)+((8191&(a=(a=a+Math.imul(u,pe)|0)+Math.imul(b,le)|0))<<13)|0;d=((i=i+Math.imul(b,pe)|0)+(a>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(U,K),a=(a=Math.imul(U,G))+Math.imul(z,K)|0,i=Math.imul(z,G),n=n+Math.imul(I,V)|0,a=(a=a+Math.imul(I,Z)|0)+Math.imul(L,V)|0,i=i+Math.imul(L,Z)|0,n=n+Math.imul(B,X)|0,a=(a=a+Math.imul(B,Y)|0)+Math.imul(R,X)|0,i=i+Math.imul(R,Y)|0,n=n+Math.imul(T,Q)|0,a=(a=a+Math.imul(T,ee)|0)+Math.imul(P,Q)|0,i=i+Math.imul(P,ee)|0,n=n+Math.imul(A,re)|0,a=(a=a+Math.imul(A,ne)|0)+Math.imul(E,re)|0,i=i+Math.imul(E,ne)|0,n=n+Math.imul(M,ie)|0,a=(a=a+Math.imul(M,oe)|0)+Math.imul(k,ie)|0,i=i+Math.imul(k,oe)|0,n=n+Math.imul(g,fe)|0,a=(a=a+Math.imul(g,de)|0)+Math.imul(w,fe)|0,i=i+Math.imul(w,de)|0,n=n+Math.imul(x,ue)|0,a=(a=a+Math.imul(x,be)|0)+Math.imul(y,ue)|0,i=i+Math.imul(y,be)|0;var Ae=(d+(n=n+Math.imul(l,le)|0)|0)+((8191&(a=(a=a+Math.imul(l,pe)|0)+Math.imul(p,le)|0))<<13)|0;d=((i=i+Math.imul(p,pe)|0)+(a>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(U,V),a=(a=Math.imul(U,Z))+Math.imul(z,V)|0,i=Math.imul(z,Z),n=n+Math.imul(I,X)|0,a=(a=a+Math.imul(I,Y)|0)+Math.imul(L,X)|0,i=i+Math.imul(L,Y)|0,n=n+Math.imul(B,Q)|0,a=(a=a+Math.imul(B,ee)|0)+Math.imul(R,Q)|0,i=i+Math.imul(R,ee)|0,n=n+Math.imul(T,re)|0,a=(a=a+Math.imul(T,ne)|0)+Math.imul(P,re)|0,i=i+Math.imul(P,ne)|0,n=n+Math.imul(A,ie)|0,a=(a=a+Math.imul(A,oe)|0)+Math.imul(E,ie)|0,i=i+Math.imul(E,oe)|0,n=n+Math.imul(M,fe)|0,a=(a=a+Math.imul(M,de)|0)+Math.imul(k,fe)|0,i=i+Math.imul(k,de)|0,n=n+Math.imul(g,ue)|0,a=(a=a+Math.imul(g,be)|0)+Math.imul(w,ue)|0,i=i+Math.imul(w,be)|0;var Ee=(d+(n=n+Math.imul(x,le)|0)|0)+((8191&(a=(a=a+Math.imul(x,pe)|0)+Math.imul(y,le)|0))<<13)|0;d=((i=i+Math.imul(y,pe)|0)+(a>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(U,X),a=(a=Math.imul(U,Y))+Math.imul(z,X)|0,i=Math.imul(z,Y),n=n+Math.imul(I,Q)|0,a=(a=a+Math.imul(I,ee)|0)+Math.imul(L,Q)|0,i=i+Math.imul(L,ee)|0,n=n+Math.imul(B,re)|0,a=(a=a+Math.imul(B,ne)|0)+Math.imul(R,re)|0,i=i+Math.imul(R,ne)|0,n=n+Math.imul(T,ie)|0,a=(a=a+Math.imul(T,oe)|0)+Math.imul(P,ie)|0,i=i+Math.imul(P,oe)|0,n=n+Math.imul(A,fe)|0,a=(a=a+Math.imul(A,de)|0)+Math.imul(E,fe)|0,i=i+Math.imul(E,de)|0,n=n+Math.imul(M,ue)|0,a=(a=a+Math.imul(M,be)|0)+Math.imul(k,ue)|0,i=i+Math.imul(k,be)|0;var Oe=(d+(n=n+Math.imul(g,le)|0)|0)+((8191&(a=(a=a+Math.imul(g,pe)|0)+Math.imul(w,le)|0))<<13)|0;d=((i=i+Math.imul(w,pe)|0)+(a>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(U,Q),a=(a=Math.imul(U,ee))+Math.imul(z,Q)|0,i=Math.imul(z,ee),n=n+Math.imul(I,re)|0,a=(a=a+Math.imul(I,ne)|0)+Math.imul(L,re)|0,i=i+Math.imul(L,ne)|0,n=n+Math.imul(B,ie)|0,a=(a=a+Math.imul(B,oe)|0)+Math.imul(R,ie)|0,i=i+Math.imul(R,oe)|0,n=n+Math.imul(T,fe)|0,a=(a=a+Math.imul(T,de)|0)+Math.imul(P,fe)|0,i=i+Math.imul(P,de)|0,n=n+Math.imul(A,ue)|0,a=(a=a+Math.imul(A,be)|0)+Math.imul(E,ue)|0,i=i+Math.imul(E,be)|0;var Te=(d+(n=n+Math.imul(M,le)|0)|0)+((8191&(a=(a=a+Math.imul(M,pe)|0)+Math.imul(k,le)|0))<<13)|0;d=((i=i+Math.imul(k,pe)|0)+(a>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(U,re),a=(a=Math.imul(U,ne))+Math.imul(z,re)|0,i=Math.imul(z,ne),n=n+Math.imul(I,ie)|0,a=(a=a+Math.imul(I,oe)|0)+Math.imul(L,ie)|0,i=i+Math.imul(L,oe)|0,n=n+Math.imul(B,fe)|0,a=(a=a+Math.imul(B,de)|0)+Math.imul(R,fe)|0,i=i+Math.imul(R,de)|0,n=n+Math.imul(T,ue)|0,a=(a=a+Math.imul(T,be)|0)+Math.imul(P,ue)|0,i=i+Math.imul(P,be)|0;var Pe=(d+(n=n+Math.imul(A,le)|0)|0)+((8191&(a=(a=a+Math.imul(A,pe)|0)+Math.imul(E,le)|0))<<13)|0;d=((i=i+Math.imul(E,pe)|0)+(a>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(U,ie),a=(a=Math.imul(U,oe))+Math.imul(z,ie)|0,i=Math.imul(z,oe),n=n+Math.imul(I,fe)|0,a=(a=a+Math.imul(I,de)|0)+Math.imul(L,fe)|0,i=i+Math.imul(L,de)|0,n=n+Math.imul(B,ue)|0,a=(a=a+Math.imul(B,be)|0)+Math.imul(R,ue)|0,i=i+Math.imul(R,be)|0;var je=(d+(n=n+Math.imul(T,le)|0)|0)+((8191&(a=(a=a+Math.imul(T,pe)|0)+Math.imul(P,le)|0))<<13)|0;d=((i=i+Math.imul(P,pe)|0)+(a>>>13)|0)+(je>>>26)|0,je&=67108863,n=Math.imul(U,fe),a=(a=Math.imul(U,de))+Math.imul(z,fe)|0,i=Math.imul(z,de),n=n+Math.imul(I,ue)|0,a=(a=a+Math.imul(I,be)|0)+Math.imul(L,ue)|0,i=i+Math.imul(L,be)|0;var Be=(d+(n=n+Math.imul(B,le)|0)|0)+((8191&(a=(a=a+Math.imul(B,pe)|0)+Math.imul(R,le)|0))<<13)|0;d=((i=i+Math.imul(R,pe)|0)+(a>>>13)|0)+(Be>>>26)|0,Be&=67108863,n=Math.imul(U,ue),a=(a=Math.imul(U,be))+Math.imul(z,ue)|0,i=Math.imul(z,be);var Re=(d+(n=n+Math.imul(I,le)|0)|0)+((8191&(a=(a=a+Math.imul(I,pe)|0)+Math.imul(L,le)|0))<<13)|0;d=((i=i+Math.imul(L,pe)|0)+(a>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Ce=(d+(n=Math.imul(U,le))|0)+((8191&(a=(a=Math.imul(U,pe))+Math.imul(z,le)|0))<<13)|0;return d=((i=Math.imul(z,pe))+(a>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,f[0]=me,f[1]=xe,f[2]=ye,f[3]=ve,f[4]=ge,f[5]=we,f[6]=_e,f[7]=Me,f[8]=ke,f[9]=Se,f[10]=Ae,f[11]=Ee,f[12]=Oe,f[13]=Te,f[14]=Pe,f[15]=je,f[16]=Be,f[17]=Re,f[18]=Ce,0!==d&&(f[19]=d,r.length++),r};function y(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,a=0,i=0;i>>26)|0)>>>26,o&=67108863}r.words[i]=c,n=o,o=a}return 0!==n?r.words[i]=n:r.length--,r._strip()}function v(e,t,r){return y(e,t,r)}function g(e,t){this.x=e,this.y=t}Math.imul||(x=m),o.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?x(this,e,t):r<63?m(this,e,t):r<1024?y(this,e,t):v(this,e,t)},g.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,n=0;n>=1;return n},g.prototype.permute=function(e,t,r,n,a,i){for(var o=0;o>>=1)a++;return 1<>>=13,r[2*o+1]=8191&i,i>>>=13;for(o=2*t;o>=26,r+=i/67108864|0,r+=o>>>26,this.words[n]=67108863&o}return 0!==r&&(this.words[n]=r,this.length++),t?this.ineg():this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>a&1}return t}(e);if(0===t.length)return new o(1);for(var r=this,n=0;n=0);var t,r=e%26,n=(e-r)/26,i=67108863>>>26-r<<26-r;if(0!==r){var o=0;for(t=0;t>>26-r}o&&(this.words[t]=o,this.length++)}if(0!==n){for(t=this.length-1;t>=0;t--)this.words[t+n]=this.words[t];for(t=0;t=0),n=t?(t-t%26)/26:0;var i=e%26,o=Math.min((e-i)/26,this.length),c=67108863^67108863>>>i<o)for(this.length-=o,d=0;d=0&&(0!==s||d>=n);d--){var u=0|this.words[d];this.words[d]=s<<26-i|u>>>i,s=u&c}return f&&0!==s&&(f.words[f.length++]=s),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(e,t,r){return a(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){a("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,n=1<=0);var t=e%26,r=(e-t)/26;if(a(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var n=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(a("number"==typeof e),a(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(f/67108864|0),this.words[n+r]=67108863&i}for(;n>26,this.words[n+r]=67108863&i;if(0===c)return this._strip();for(a(-1===c),c=0,n=0;n>26,this.words[n]=67108863&i;return this.negative=1,this._strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),a=e,i=0|a.words[a.length-1];0!==(r=26-this._countBits(i))&&(a=a.ushln(r),n.iushln(r),i=0|a.words[a.length-1]);var c,f=n.length-a.length;if("mod"!==t){(c=new o(null)).length=f+1,c.words=new Array(c.length);for(var d=0;d=0;u--){var b=67108864*(0|n.words[a.length+u])+(0|n.words[a.length+u-1]);for(b=Math.min(b/i|0,67108863),n._ishlnsubmul(a,b,u);0!==n.negative;)b--,n.negative=0,n._ishlnsubmul(a,1,u),n.isZero()||(n.negative^=1);c&&(c.words[u]=b)}return c&&c._strip(),n._strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:c||null,mod:n}},o.prototype.divmod=function(e,t,r){return a(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(c=this.neg().divmod(e,t),"mod"!==t&&(n=c.div.neg()),"div"!==t&&(i=c.mod.neg(),r&&0!==i.negative&&i.iadd(e)),{div:n,mod:i}):0===this.negative&&0!==e.negative?(c=this.divmod(e.neg(),t),"mod"!==t&&(n=c.div.neg()),{div:n,mod:c.mod}):0!=(this.negative&e.negative)?(c=this.neg().divmod(e.neg(),t),"div"!==t&&(i=c.mod.neg(),r&&0!==i.negative&&i.isub(e)),{div:c.div,mod:i}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modrn(e.words[0]))}:this._wordDiv(e,t);var n,i,c},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),a=e.andln(1),i=r.cmp(n);return i<0||1===a&&0===i?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modrn=function(e){var t=e<0;t&&(e=-e),a(e<=67108863);for(var r=(1<<26)%e,n=0,i=this.length-1;i>=0;i--)n=(r*n+(0|this.words[i]))%e;return t?-n:n},o.prototype.modn=function(e){return this.modrn(e)},o.prototype.idivn=function(e){var t=e<0;t&&(e=-e),a(e<=67108863);for(var r=0,n=this.length-1;n>=0;n--){var i=(0|this.words[n])+67108864*r;this.words[n]=i/e|0,r=i%e}return this._strip(),t?this.ineg():this},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){a(0===e.negative),a(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var n=new o(1),i=new o(0),c=new o(0),f=new o(1),d=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++d;for(var s=r.clone(),u=t.clone();!t.isZero();){for(var b=0,h=1;0==(t.words[0]&h)&&b<26;++b,h<<=1);if(b>0)for(t.iushrn(b);b-- >0;)(n.isOdd()||i.isOdd())&&(n.iadd(s),i.isub(u)),n.iushrn(1),i.iushrn(1);for(var l=0,p=1;0==(r.words[0]&p)&&l<26;++l,p<<=1);if(l>0)for(r.iushrn(l);l-- >0;)(c.isOdd()||f.isOdd())&&(c.iadd(s),f.isub(u)),c.iushrn(1),f.iushrn(1);t.cmp(r)>=0?(t.isub(r),n.isub(c),i.isub(f)):(r.isub(t),c.isub(n),f.isub(i))}return{a:c,b:f,gcd:r.iushln(d)}},o.prototype._invmp=function(e){a(0===e.negative),a(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var n,i=new o(1),c=new o(0),f=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var d=0,s=1;0==(t.words[0]&s)&&d<26;++d,s<<=1);if(d>0)for(t.iushrn(d);d-- >0;)i.isOdd()&&i.iadd(f),i.iushrn(1);for(var u=0,b=1;0==(r.words[0]&b)&&u<26;++u,b<<=1);if(u>0)for(r.iushrn(u);u-- >0;)c.isOdd()&&c.iadd(f),c.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(c)):(r.isub(t),c.isub(i))}return(n=0===t.cmpn(1)?i:c).cmpn(0)<0&&n.iadd(e),n},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var a=t.cmp(r);if(a<0){var i=t;t=r,r=i}else if(0===a||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){a("number"==typeof e);var t=e%26,r=(e-t)/26,n=1<>>26,c&=67108863,this.words[o]=c}return 0!==i&&(this.words[o]=i,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)t=1;else{r&&(e=-e),a(e<=67108863,"Number is too big");var n=0|this.words[0];t=n===e?0:ne.length)return 1;if(this.length=0;r--){var n=0|this.words[r],a=0|e.words[r];if(n!==a){na&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new E(e)},o.prototype.toRed=function(e){return a(!this.red,"Already a number in reduction context"),a(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return a(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return a(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return a(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return a(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return a(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return a(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return a(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return a(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return a(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return a(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return a(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return a(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return a(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return a(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return a(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var w={k256:null,p224:null,p192:null,p25519:null};function _(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function M(){_.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function k(){_.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function S(){_.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function A(){_.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else a(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function O(e){E.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}_.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},_.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},_.prototype.split=function(e,t){e.iushrn(this.n,0,t)},_.prototype.imulK=function(e){return e.imul(this.k)},i(M,_),M.prototype.split=function(e,t){for(var r=Math.min(e.length,9),n=0;n>>22,a=i}a>>>=22,e.words[n-10]=a,0===a&&e.length>10?e.length-=10:e.length-=9},M.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=a,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(w[e])return w[e];var t;if("k256"===e)t=new M;else if("p224"===e)t=new k;else if("p192"===e)t=new S;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new A}return w[e]=t,t},E.prototype._verify1=function(e){a(0===e.negative,"red works only with positives"),a(e.red,"red works only with red numbers")},E.prototype._verify2=function(e,t){a(0==(e.negative|t.negative),"red works only with positives"),a(e.red&&e.red===t.red,"red works only with red numbers")},E.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(u(e,e.umod(this.m)._forceRed(this)),e)},E.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},E.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},E.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},E.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},E.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},E.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},E.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},E.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},E.prototype.isqr=function(e){return this.imul(e,e.clone())},E.prototype.sqr=function(e){return this.mul(e,e)},E.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(a(t%2==1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var n=this.m.subn(1),i=0;!n.isZero()&&0===n.andln(1);)i++,n.iushrn(1);a(!n.isZero());var c=new o(1).toRed(this),f=c.redNeg(),d=this.m.subn(1).iushrn(1),s=this.m.bitLength();for(s=new o(2*s*s).toRed(this);0!==this.pow(s,d).cmp(f);)s.redIAdd(f);for(var u=this.pow(s,n),b=this.pow(e,n.addn(1).iushrn(1)),h=this.pow(e,n),l=i;0!==h.cmp(c);){for(var p=h,m=0;0!==p.cmp(c);m++)p=p.redSqr();a(m=0;n--){for(var d=t.words[n],s=f-1;s>=0;s--){var u=d>>s&1;a!==r[0]&&(a=this.sqr(a)),0!==u||0!==i?(i<<=1,i|=u,(4===++c||0===n&&0===s)&&(a=this.mul(a,r[i]),c=0,i=0)):c=0}f=26}return a},E.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},E.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new O(e)},i(O,E),O.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},O.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},O.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=r.isub(n).iushrn(this.shift),i=a;return a.cmp(this.m)>=0?i=a.isub(this.m):a.cmpn(0)<0&&(i=a.iadd(this.m)),i._forceRed(this)},O.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=r.isub(n).iushrn(this.shift),i=a;return a.cmp(this.m)>=0?i=a.isub(this.m):a.cmpn(0)<0&&(i=a.iadd(this.m)),i._forceRed(this)},O.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)}).call(this,r(15)(e))},function(e,t,r){"use strict";(function(e){r.d(t,"a",(function(){return D}));var n=r(8),a=r.n(n),i=r(25),o=r.n(i);function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==e||"undefined"!=typeof self&&self;function f(e,t,r){return e(r={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&r.path)}},r.exports),r.exports}var d=s;function s(e,t){if(!e)throw new Error(t||"Assertion failed")}s.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)};var u=f((function(e,t){var r=t;function n(e){return 1===e.length?"0"+e:e}function a(e){for(var t="",r=0;r>8,o=255&a;i?r.push(i,o):r.push(o)}return r},r.zero2=n,r.toHex=a,r.encode=function(e,t){return"hex"===t?a(e):e}})),b=f((function(e,t){var r=t;r.assert=d,r.toArray=u.toArray,r.zero2=u.zero2,r.toHex=u.toHex,r.encode=u.encode,r.getNAF=function(e,t,r){var n=new Array(Math.max(e.bitLength(),r)+1);n.fill(0);for(var a=1<(a>>1)-1?(a>>1)-f:f,i.isubn(c)):c=0,n[o]=c,i.iushrn(1)}return n},r.getJSF=function(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var n,a=0,i=0;e.cmpn(-a)>0||t.cmpn(-i)>0;){var o,c,f=e.andln(3)+a&3,d=t.andln(3)+i&3;3===f&&(f=-1),3===d&&(d=-1),o=0==(1&f)?0:3!==(n=e.andln(7)+a&7)&&5!==n||2!==d?f:-f,r[0].push(o),c=0==(1&d)?0:3!==(n=t.andln(7)+i&7)&&5!==n||2!==f?d:-d,r[1].push(c),2*a===o+1&&(a=1-a),2*i===c+1&&(i=1-i),e.iushrn(1),t.iushrn(1)}return r},r.cachedProperty=function(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},r.parseBytes=function(e){return"string"==typeof e?r.toArray(e,"hex"):e},r.intFromLE=function(e){return new a.a(e,"hex","le")}})),h=b.getNAF,l=b.getJSF,p=b.assert;function m(e,t){this.type=e,this.p=new a.a(t.p,16),this.red=t.prime?a.a.red(t.prime):a.a.mont(this.p),this.zero=new a.a(0).toRed(this.red),this.one=new a.a(1).toRed(this.red),this.two=new a.a(2).toRed(this.red),this.n=t.n&&new a.a(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var x=m;function y(e,t){this.curve=e,this.type=t,this.precomputed=null}m.prototype.point=function(){throw new Error("Not implemented")},m.prototype.validate=function(){throw new Error("Not implemented")},m.prototype._fixedNafMul=function(e,t){p(e.precomputed);var r=e._getDoubles(),n=h(t,1,this._bitLength),a=(1<=i;f--)o=(o<<1)+n[f];c.push(o)}for(var d=this.jpoint(null,null,null),s=this.jpoint(null,null,null),u=a;u>0;u--){for(i=0;i=0;c--){for(var f=0;c>=0&&0===i[c];c--)f++;if(c>=0&&f++,o=o.dblp(f),c<0)break;var d=i[c];p(0!==d),o="affine"===e.type?d>0?o.mixedAdd(a[d-1>>1]):o.mixedAdd(a[-d-1>>1].neg()):d>0?o.add(a[d-1>>1]):o.add(a[-d-1>>1].neg())}return"affine"===e.type?o.toP():o},m.prototype._wnafMulAdd=function(e,t,r,n,a){var i,o,c,f=this._wnafT1,d=this._wnafT2,s=this._wnafT3,u=0;for(i=0;i=1;i-=2){var p=i-1,m=i;if(1===f[p]&&1===f[m]){var x=[t[p],null,null,t[m]];0===t[p].y.cmp(t[m].y)?(x[1]=t[p].add(t[m]),x[2]=t[p].toJ().mixedAdd(t[m].neg())):0===t[p].y.cmp(t[m].y.redNeg())?(x[1]=t[p].toJ().mixedAdd(t[m]),x[2]=t[p].add(t[m].neg())):(x[1]=t[p].toJ().mixedAdd(t[m]),x[2]=t[p].toJ().mixedAdd(t[m].neg()));var y=[-3,-1,-5,-7,0,7,5,1,3],v=l(r[p],r[m]);for(u=Math.max(v[0].length,u),s[p]=new Array(u),s[m]=new Array(u),o=0;o=0;i--){for(var k=0;i>=0;){var S=!0;for(o=0;o=0&&k++,_=_.dblp(k),i<0)break;for(o=0;o0?c=d[o][A-1>>1]:A<0&&(c=d[o][-A-1>>1].neg()),_="affine"===c.type?_.mixedAdd(c):_.add(c))}}for(i=0;i=Math.ceil((e.bitLength()+1)/t.step)},y.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,a=0;a=0&&(o=t,c=r),n.negative&&(n=n.neg(),i=i.neg()),o.negative&&(o=o.neg(),c=c.neg()),[{a:n,b:i},{a:o,b:c}]},w.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],a=n.b.mul(e).divRound(this.n),i=r.b.neg().mul(e).divRound(this.n),o=a.mul(r.a),c=i.mul(n.a),f=a.mul(r.b),d=i.mul(n.b);return{k1:e.sub(o).sub(c),k2:f.add(d).neg()}},w.prototype.pointFromX=function(e,t){(e=new a.a(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var i=n.fromRed().isOdd();return(t&&!i||!t&&i)&&(n=n.redNeg()),this.point(e,n)},w.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),a=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(a).cmpn(0)},w.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,a=this._endoWnafT2,i=0;i":""},M.prototype.isInfinity=function(){return this.inf},M.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},M.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),a=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),i=a.redSqr().redISub(this.x.redAdd(this.x)),o=a.redMul(this.x.redSub(i)).redISub(this.y);return this.curve.point(i,o)},M.prototype.getX=function(){return this.x.fromRed()},M.prototype.getY=function(){return this.y.fromRed()},M.prototype.mul=function(e){return e=new a.a(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},M.prototype.mulAdd=function(e,t,r){var n=[this,t],a=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,a):this.curve._wnafMulAdd(1,n,a,2)},M.prototype.jmulAdd=function(e,t,r){var n=[this,t],a=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,a,!0):this.curve._wnafMulAdd(1,n,a,2,!0)},M.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},M.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},M.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},v(k,x.BasePoint),w.prototype.jpoint=function(e,t,r){return new k(this,e,t,r)},k.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},k.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},k.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),a=e.x.redMul(r),i=this.y.redMul(t.redMul(e.z)),o=e.y.redMul(r.redMul(this.z)),c=n.redSub(a),f=i.redSub(o);if(0===c.cmpn(0))return 0!==f.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var d=c.redSqr(),s=d.redMul(c),u=n.redMul(d),b=f.redSqr().redIAdd(s).redISub(u).redISub(u),h=f.redMul(u.redISub(b)).redISub(i.redMul(s)),l=this.z.redMul(e.z).redMul(c);return this.curve.jpoint(b,h,l)},k.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),a=this.y,i=e.y.redMul(t).redMul(this.z),o=r.redSub(n),c=a.redSub(i);if(0===o.cmpn(0))return 0!==c.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var f=o.redSqr(),d=f.redMul(o),s=r.redMul(f),u=c.redSqr().redIAdd(d).redISub(s).redISub(s),b=c.redMul(s.redISub(u)).redISub(a.redMul(d)),h=this.z.redMul(o);return this.curve.jpoint(u,b,h)},k.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var r=this;for(t=0;t=0)return!1;if(r.redIAdd(a),0===this.x.cmp(r))return!0}},k.prototype.inspect=function(){return this.isInfinity()?"":""},k.prototype.isInfinity=function(){return 0===this.z.cmpn(0)};var S=f((function(e,t){var r=t;r.base=x,r.short=_,r.mont=null,r.edwards=null})),A=f((function(e,t){var r,n=t,a=b.assert;function i(e){"short"===e.type?this.curve=new S.short(e):"edwards"===e.type?this.curve=new S.edwards(e):this.curve=new S.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,a(this.g.validate(),"Invalid curve"),a(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function c(e,t){Object.defineProperty(n,e,{configurable:!0,enumerable:!0,get:function(){var r=new i(t);return Object.defineProperty(n,e,{configurable:!0,enumerable:!0,value:r}),r}})}n.PresetCurve=i,c("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:o.a.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),c("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:o.a.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),c("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:o.a.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),c("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:o.a.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),c("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:o.a.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),c("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.a.sha256,gRed:!1,g:["9"]}),c("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.a.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{r=null.crash()}catch(e){r=void 0}c("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:o.a.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",r]})}));function E(e){if(!(this instanceof E))return new E(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=u.toArray(e.entropy,e.entropyEnc||"hex"),r=u.toArray(e.nonce,e.nonceEnc||"hex"),n=u.toArray(e.pers,e.persEnc||"hex");d(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}var O=E;E.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var a=0;a=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},E.prototype.generate=function(e,t,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(n=r,r=t,t=null),r&&(r=u.toArray(r,n||"hex"),this._update(r));for(var a=[];a.length"};var B=b.assert;function R(e,t){if(e instanceof R)return e;this._importDER(e,t)||(B(e.r&&e.s,"Signature without r or s"),this.r=new a.a(e.r,16),this.s=new a.a(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}var C=R;function I(){this.place=0}function L(e,t){var r=e[t.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;for(var a=0,i=0,o=t.place;i>>=0;return!(a<=127)&&(t.place=o,a)}function N(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&t>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}}R.prototype._importDER=function(e,t){e=b.toArray(e,t);var r=new I;if(48!==e[r.place++])return!1;var n=L(e,r);if(!1===n)return!1;if(n+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var i=L(e,r);if(!1===i)return!1;var o=e.slice(r.place,i+r.place);if(r.place+=i,2!==e[r.place++])return!1;var c=L(e,r);if(!1===c)return!1;if(e.length!==c+r.place)return!1;var f=e.slice(r.place,c+r.place);if(0===o[0]){if(!(128&o[1]))return!1;o=o.slice(1)}if(0===f[0]){if(!(128&f[1]))return!1;f=f.slice(1)}return this.r=new a.a(o),this.s=new a.a(f),this.recoveryParam=null,!0},R.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=N(t),r=N(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];U(n,t.length),(n=n.concat(t)).push(2),U(n,r.length);var a=n.concat(r),i=[48];return U(i,a.length),i=i.concat(a),b.encode(i,e)};var z=function(){throw new Error("unsupported")},F=b.assert;function q(e){if(!(this instanceof q))return new q(e);"string"==typeof e&&(F(Object.prototype.hasOwnProperty.call(A,e),"Unknown curve "+e),e=A[e]),e instanceof A.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}var H=q;q.prototype.keyPair=function(e){return new j(this,e)},q.prototype.keyFromPrivate=function(e,t){return j.fromPrivate(this,e,t)},q.prototype.keyFromPublic=function(e,t){return j.fromPublic(this,e,t)},q.prototype.genKeyPair=function(e){e||(e={});for(var t=new O({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||z(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),n=this.n.sub(new a.a(2));;){var i=new a.a(t.generate(r));if(!(i.cmp(n)>0))return i.iaddn(1),this.keyFromPrivate(i)}},q.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},q.prototype.sign=function(e,t,r,n){"object"===c(r)&&(n=r,r=null),n||(n={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new a.a(e,16));for(var i=this.n.byteLength(),o=t.getPrivate().toArray("be",i),f=e.toArray("be",i),d=new O({hash:this.hash,entropy:o,nonce:f,pers:n.pers,persEnc:n.persEnc||"utf8"}),s=this.n.sub(new a.a(1)),u=0;;u++){var b=n.k?n.k(u):new a.a(d.generate(this.n.byteLength()));if(!((b=this._truncateToN(b,!0)).cmpn(1)<=0||b.cmp(s)>=0)){var h=this.g.mul(b);if(!h.isInfinity()){var l=h.getX(),p=l.umod(this.n);if(0!==p.cmpn(0)){var m=b.invm(this.n).mul(p.mul(t.getPrivate()).iadd(e));if(0!==(m=m.umod(this.n)).cmpn(0)){var x=(h.getY().isOdd()?1:0)|(0!==l.cmp(p)?2:0);return n.canonical&&m.cmp(this.nh)>0&&(m=this.n.sub(m),x^=1),new C({r:p,s:m,recoveryParam:x})}}}}}},q.prototype.verify=function(e,t,r,n){e=this._truncateToN(new a.a(e,16)),r=this.keyFromPublic(r,n);var i=(t=new C(t,"hex")).r,o=t.s;if(i.cmpn(1)<0||i.cmp(this.n)>=0)return!1;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;var c,f=o.invm(this.n),d=f.mul(e).umod(this.n),s=f.mul(i).umod(this.n);return this.curve._maxwellTrick?!(c=this.g.jmulAdd(d,r.getPublic(),s)).isInfinity()&&c.eqXToP(i):!(c=this.g.mulAdd(d,r.getPublic(),s)).isInfinity()&&0===c.getX().umod(this.n).cmp(i)},q.prototype.recoverPubKey=function(e,t,r,n){F((3&r)===r,"The recovery param is more than two bits"),t=new C(t,n);var i=this.n,o=new a.a(e),c=t.r,f=t.s,d=1&r,s=r>>1;if(c.cmp(this.curve.p.umod(this.curve.n))>=0&&s)throw new Error("Unable to find sencond key candinate");c=s?this.curve.pointFromX(c.add(this.curve.n),d):this.curve.pointFromX(c,d);var u=t.r.invm(i),b=i.sub(o).mul(u).umod(i),h=f.mul(u).umod(i);return this.g.mulAdd(b,c,h)},q.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new C(t,n)).recoveryParam)return t.recoveryParam;for(var a=0;a<4;a++){var i;try{i=this.recoverPubKey(e,t,a)}catch(e){continue}if(i.eq(r))return a}throw new Error("Unable to find valid recovery factor")};var D=f((function(e,t){var r=t;r.version="6.5.4",r.utils=b,r.rand=function(){throw new Error("unsupported")},r.curve=S,r.curves=A,r.ec=H,r.eddsa=null})).ec}).call(this,r(13))},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.getWindowMetadata=void 0;var a=r(26);t.getWindowMetadata=function(){var e,t;try{e=a.getDocumentOrThrow(),t=a.getLocationOrThrow()}catch(e){return null}function r(){for(var t=arguments.length,r=new Array(t),a=0;a-1){var c=i.getAttribute("href");if(c)if(-1===c.toLowerCase().indexOf("https:")&&-1===c.toLowerCase().indexOf("http:")&&0!==c.indexOf("//")){var f=t.protocol+"//"+t.host;if(0===c.indexOf("/"))f+=c;else{var d=t.pathname.split("/");d.pop(),f+=d.join("/")+"/"+c}n.push(f)}else if(0===c.indexOf("//")){var s=t.protocol+c;n.push(s)}else n.push(c)}}return n}(),name:i}}},function(e,t,r){"use strict";(function(e){r.d(t,"a",(function(){return b}));var n=function(){for(var e=0,t=0,r=arguments.length;t=0;--a){var i=this.tryEntries[a],o=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),f=r.call(i,"finallyLoc");if(c&&f){if(this.prev=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),k(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;k(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:A(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),b}},e}function c(e,t,r,n,a,i,o){try{var c=e[i](o),f=c.value}catch(e){return void r(e)}c.done?t(f):Promise.resolve(f).then(n,a)}function f(e,t){for(var r=0;r=0;f--)(i=e[f])&&(c=(o<3?i(c):o>3?i(t,r,c):i(t,r))||c);return o>3&&c&&Object.defineProperty(t,r,c),c},o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||a(t,e,r)},c=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(a,i){function o(e){try{f(n.next(e))}catch(e){i(e)}}function c(e){try{f(n.throw(e))}catch(e){i(e)}}function f(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,c)}f((n=n.apply(e,t||[])).next())}))},f=this&&this.__generator||function(e,t){var r,n,a,i,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(a=2&i[0]?n.return:i[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,i[1])).done)return a;switch(n=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,n=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!(a=o.trys,(a=a.length>0&&a[a.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},s=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,a,i=r.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)o.push(n.value)}catch(e){a={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(a)throw a.error}}return o},u=this&&this.__spread||function(){for(var e=[],t=0;tt&&c[t].tokenId&&!n)&&(this.updateTokenInfo(c[t],e,t,r),_.saveData(this.data)),[2,c[t]]}))}))},t.prototype.nftList=function(e,t){return c(this,void 0,void 0,(function(){var r,n,a,i,o,c,d,s,u;return f(this,(function(f){switch(f.label){case 0:return t=t||this.currentAccount().address,r=this.wallet.currentChain.id,[4,this.erc721Standard.getBalance(e,t)];case 1:if(n=f.sent(),a=P.getTypeByAddress(r,e),i=a.categor,o=a.type,c=[],i!==P.UNKNOW&&(c=this.currentAccountData.tokenData[r][i+"s"]),d=!1,c.length!==n&&(d=!0),d)for(c.length=0,s=0;s0?o-4:o;for(r=0;r>16&255,f[s++]=t>>8&255,f[s++]=255&t;2===c&&(t=a[e.charCodeAt(r)]<<2|a[e.charCodeAt(r+1)]>>4,f[s++]=255&t);1===c&&(t=a[e.charCodeAt(r)]<<10|a[e.charCodeAt(r+1)]<<4|a[e.charCodeAt(r+2)]>>2,f[s++]=t>>8&255,f[s++]=255&t);return f},t.fromByteArray=function(e){for(var t,r=e.length,a=r%3,i=[],o=0,c=r-a;oc?c:o+16383));1===a?(t=e[r-1],i.push(n[t>>2]+n[t<<4&63]+"==")):2===a&&(t=(e[r-2]<<8)+e[r-1],i.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return i.join("")};for(var n=[],a=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c=0,f=o.length;c0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function s(e,t,r){for(var a,i,o=[],c=t;c>18&63]+n[i>>12&63]+n[i>>6&63]+n[63&i]);return o.join("")}a["-".charCodeAt(0)]=62,a["_".charCodeAt(0)]=63},function(e,t){ /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */