diff --git a/angular.json b/angular.json index 56d56842..97ff8ec0 100644 --- a/angular.json +++ b/angular.json @@ -31,7 +31,8 @@ "node_modules/@clr/icons/clr-icons.min.css", "node_modules/primeng/resources/themes/darkness/theme.css", "node_modules/angular2-toaster/toaster.css", - "node_modules/primeng/resources/primeng.min.css" + "node_modules/primeng/resources/primeng.min.css", + "node_modules/primeicons/primeicons.css" ], "scripts": [ "node_modules/@clr/icons/clr-icons.min.js", diff --git a/index.js b/index.js index c7685749..3e50cc0d 100644 --- a/index.js +++ b/index.js @@ -49,8 +49,6 @@ function createWindow() { win = new BrowserWindow({ title: 'simplEOS', darkTheme: true, - x: 100, - y: 100, width: 1440, height: 800, minWidth: 800, @@ -59,14 +57,17 @@ function createWindow() { icon: path.join(__dirname, 'src/assets/icons/ico/simpleos.ico') }); win.setMenu(null); + win.loadURL(url.format({ pathname: path.join(__dirname, 'ng-dist', 'index.html'), protocol: 'file:', slashes: true })); + if (devtools) { win.webContents.openDevTools(); } + win.on('closed', () => { win = null }); diff --git a/ng-dist/3rdpartylicenses.txt b/ng-dist/3rdpartylicenses.txt index d2ebb88f..e8260c6d 100644 --- a/ng-dist/3rdpartylicenses.txt +++ b/ng-dist/3rdpartylicenses.txt @@ -320,7 +320,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -primeng@5.2.7 +primeng@6.0.0-rc.1 MIT The MIT License (MIT) @@ -406,7 +406,7 @@ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -@angular/core@6.0.4 +@angular/core@6.0.5 MIT MIT @@ -441,15 +441,15 @@ For more information, please refer to MIT MIT -@angular/common@6.0.4 +@angular/common@6.0.5 MIT MIT -@clr/angular@0.12.0-rc.2 +@clr/angular@0.12.0 MIT MIT -@angular/animations@6.0.4 +@angular/animations@6.0.5 MIT MIT @@ -620,15 +620,15 @@ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -@angular/router@6.0.4 +@angular/router@6.0.5 MIT MIT -@angular/platform-browser@6.0.4 +@angular/platform-browser@6.0.5 MIT MIT -@angular/forms@6.0.4 +@angular/forms@6.0.5 MIT MIT @@ -802,11 +802,35 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -@clr/ui@0.12.0-rc.2 +primeicons@1.0.0-beta.7 +MIT +MIT License + +Copyright (c) 2018 PrimeTek + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +@clr/ui@0.12.0 MIT MIT -@clr/icons@0.12.0-rc.2 +@clr/icons@0.12.0 MIT MIT diff --git a/ng-dist/main.js b/ng-dist/main.js index c0d830ef..8a0980c9 100644 --- a/ng-dist/main.js +++ b/ng-dist/main.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[4],{9:function(n,t,e){n.exports=e("zUnb")},RnhZ:function(n,t,e){var l={"./af":"K/tc","./af.js":"K/tc","./ar":"jnO4","./ar-dz":"o1bE","./ar-dz.js":"o1bE","./ar-kw":"Qj4J","./ar-kw.js":"Qj4J","./ar-ly":"HP3h","./ar-ly.js":"HP3h","./ar-ma":"CoRJ","./ar-ma.js":"CoRJ","./ar-sa":"gjCT","./ar-sa.js":"gjCT","./ar-tn":"bYM6","./ar-tn.js":"bYM6","./ar.js":"jnO4","./az":"SFxW","./az.js":"SFxW","./be":"H8ED","./be.js":"H8ED","./bg":"hKrs","./bg.js":"hKrs","./bm":"p/rL","./bm.js":"p/rL","./bn":"kEOa","./bn.js":"kEOa","./bo":"0mo+","./bo.js":"0mo+","./br":"aIdf","./br.js":"aIdf","./bs":"JVSJ","./bs.js":"JVSJ","./ca":"1xZ4","./ca.js":"1xZ4","./cs":"PA2r","./cs.js":"PA2r","./cv":"A+xa","./cv.js":"A+xa","./cy":"l5ep","./cy.js":"l5ep","./da":"DxQv","./da.js":"DxQv","./de":"tGlX","./de-at":"s+uk","./de-at.js":"s+uk","./de-ch":"u3GI","./de-ch.js":"u3GI","./de.js":"tGlX","./dv":"WYrj","./dv.js":"WYrj","./el":"jUeY","./el.js":"jUeY","./en-au":"Dmvi","./en-au.js":"Dmvi","./en-ca":"OIYi","./en-ca.js":"OIYi","./en-gb":"Oaa7","./en-gb.js":"Oaa7","./en-ie":"4dOw","./en-ie.js":"4dOw","./en-il":"czMo","./en-il.js":"czMo","./en-nz":"b1Dy","./en-nz.js":"b1Dy","./eo":"Zduo","./eo.js":"Zduo","./es":"iYuL","./es-do":"CjzT","./es-do.js":"CjzT","./es-us":"Vclq","./es-us.js":"Vclq","./es.js":"iYuL","./et":"7BjC","./et.js":"7BjC","./eu":"D/JM","./eu.js":"D/JM","./fa":"jfSC","./fa.js":"jfSC","./fi":"gekB","./fi.js":"gekB","./fo":"ByF4","./fo.js":"ByF4","./fr":"nyYc","./fr-ca":"2fjn","./fr-ca.js":"2fjn","./fr-ch":"Dkky","./fr-ch.js":"Dkky","./fr.js":"nyYc","./fy":"cRix","./fy.js":"cRix","./gd":"9rRi","./gd.js":"9rRi","./gl":"iEDd","./gl.js":"iEDd","./gom-latn":"DKr+","./gom-latn.js":"DKr+","./gu":"4MV3","./gu.js":"4MV3","./he":"x6pH","./he.js":"x6pH","./hi":"3E1r","./hi.js":"3E1r","./hr":"S6ln","./hr.js":"S6ln","./hu":"WxRl","./hu.js":"WxRl","./hy-am":"1rYy","./hy-am.js":"1rYy","./id":"UDhR","./id.js":"UDhR","./is":"BVg3","./is.js":"BVg3","./it":"bpih","./it.js":"bpih","./ja":"B55N","./ja.js":"B55N","./jv":"tUCv","./jv.js":"tUCv","./ka":"IBtZ","./ka.js":"IBtZ","./kk":"bXm7","./kk.js":"bXm7","./km":"6B0Y","./km.js":"6B0Y","./kn":"PpIw","./kn.js":"PpIw","./ko":"Ivi+","./ko.js":"Ivi+","./ky":"lgnt","./ky.js":"lgnt","./lb":"RAwQ","./lb.js":"RAwQ","./lo":"sp3z","./lo.js":"sp3z","./lt":"JvlW","./lt.js":"JvlW","./lv":"uXwI","./lv.js":"uXwI","./me":"KTz0","./me.js":"KTz0","./mi":"aIsn","./mi.js":"aIsn","./mk":"aQkU","./mk.js":"aQkU","./ml":"AvvY","./ml.js":"AvvY","./mn":"lYtQ","./mn.js":"lYtQ","./mr":"Ob0Z","./mr.js":"Ob0Z","./ms":"6+QB","./ms-my":"ZAMP","./ms-my.js":"ZAMP","./ms.js":"6+QB","./mt":"G0Uy","./mt.js":"G0Uy","./my":"honF","./my.js":"honF","./nb":"bOMt","./nb.js":"bOMt","./ne":"OjkT","./ne.js":"OjkT","./nl":"+s0g","./nl-be":"2ykv","./nl-be.js":"2ykv","./nl.js":"+s0g","./nn":"uEye","./nn.js":"uEye","./pa-in":"8/+R","./pa-in.js":"8/+R","./pl":"jVdC","./pl.js":"jVdC","./pt":"8mBD","./pt-br":"0tRk","./pt-br.js":"0tRk","./pt.js":"8mBD","./ro":"lyxo","./ro.js":"lyxo","./ru":"lXzo","./ru.js":"lXzo","./sd":"Z4QM","./sd.js":"Z4QM","./se":"//9w","./se.js":"//9w","./si":"7aV9","./si.js":"7aV9","./sk":"e+ae","./sk.js":"e+ae","./sl":"gVVK","./sl.js":"gVVK","./sq":"yPMs","./sq.js":"yPMs","./sr":"zx6S","./sr-cyrl":"E+lV","./sr-cyrl.js":"E+lV","./sr.js":"zx6S","./ss":"Ur1D","./ss.js":"Ur1D","./sv":"X709","./sv.js":"X709","./sw":"dNwA","./sw.js":"dNwA","./ta":"PeUW","./ta.js":"PeUW","./te":"XLvN","./te.js":"XLvN","./tet":"V2x9","./tet.js":"V2x9","./tg":"Oxv6","./tg.js":"Oxv6","./th":"EOgW","./th.js":"EOgW","./tl-ph":"Dzi0","./tl-ph.js":"Dzi0","./tlh":"z3Vd","./tlh.js":"z3Vd","./tr":"DoHr","./tr.js":"DoHr","./tzl":"z1FC","./tzl.js":"z1FC","./tzm":"wQk9","./tzm-latn":"tT3J","./tzm-latn.js":"tT3J","./tzm.js":"wQk9","./ug-cn":"YRex","./ug-cn.js":"YRex","./uk":"raLr","./uk.js":"raLr","./ur":"UpQW","./ur.js":"UpQW","./uz":"Loxo","./uz-latn":"AQ68","./uz-latn.js":"AQ68","./uz.js":"Loxo","./vi":"KSF8","./vi.js":"KSF8","./x-pseudo":"/X5v","./x-pseudo.js":"/X5v","./yo":"fzPg","./yo.js":"fzPg","./zh-cn":"XDpg","./zh-cn.js":"XDpg","./zh-hk":"SatO","./zh-hk.js":"SatO","./zh-tw":"kOpN","./zh-tw.js":"kOpN"};function r(n){var t=u(n);return e(t)}function u(n){var t=l[n];if(!(t+1)){var e=new Error('Cannot find module "'+n+'".');throw e.code="MODULE_NOT_FOUND",e}return t}r.keys=function(){return Object.keys(l)},r.resolve=u,n.exports=r,r.id="RnhZ"},ZECR:function(n,t,e){(function(t,e){var l;n.exports=function n(t,e,r){function u(o,a){if(!e[o]){if(!t[o]){if(!a&&"function"==typeof l&&l)return l(o,!0);if(i)return i(o,!0);var s=new Error("Cannot find module '"+o+"'");throw s.code="MODULE_NOT_FOUND",s}var c=e[o]={exports:{}};t[o][0].call(c.exports,function(n){return u(t[o][1][n]||n)},c,c.exports,n,t,e,r)}return e[o].exports}for(var i="function"==typeof l&&l,o=0;o1&&void 0!==arguments[1])||arguments[1];return l(u,"required account"),0==i&&null!=e[u]?Promise.resolve(e[u]):(l(n,"Network is required, provide config.httpEndpoint"),n.getCode(u).then(function(n){var i=n.abi;l(i,"Missing ABI for account: "+u);var o=function(n){var t={};return n.types&&n.types.forEach(function(n){t[n.new_type_name]=n.type}),n.structs&&n.structs.forEach(function(n){var e={},l=!0,r=!1,u=void 0;try{for(var i,o=n.fields[Symbol.iterator]();!(l=(i=o.next()).done);l=!0){var a=i.value;e[a.name]=a.type}}catch(n){r=!0,u=n}finally{try{!l&&o.return&&o.return()}finally{if(r)throw u}}t[n.name]={base:n.base,fields:e},""===n.base&&delete t[n.name].base}),t}(i),a=r(t,o);return e[u]=Object.assign({abi:i,schema:o},a)}))},abi:function(n){var t=e[n];if(null==t)throw new Error("Abi '"+n+"' is not cached");return t}}}},{"./structs":8,assert:10}],2:[function(n,t,e){"use strict";var l=u(n("babel-runtime/helpers/slicedToArray")),r=u(n("babel-runtime/helpers/typeof"));function u(n){return n&&n.__esModule?n:{default:n}}var i=n("assert"),o=n("bytebuffer").Long;function a(n){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;if("number"==typeof n){if(n>Number.MAX_SAFE_INTEGER)throw new TypeError("value parameter overflow");n=o.fromString(String(n),t,e)}else if("string"==typeof n)n=o.fromString(n,t,e);else if(!o.isLong(n))throw new TypeError("value parameter is a requied Long, Number or String");return n}t.exports={ULong:a,isName:function(n,t){try{return f(n),!0}catch(n){return t&&t(n),!1}},encodeName:f,decodeName:d,encodeNameHex:function(n){return o.fromString(f(n),!0).toString(16)},decodeNameHex:function(n){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return d(o.fromString(n,!0,16).toString(),t)},UDecimalString:h,UDecimalPad:p,UDecimalImply:function(n,t){return p(n,t).replace(".","")},UDecimalUnimply:function(n,t){i(null!=n,"value is required"),n="object"===n&&n.toString?n.toString():String(n),i(/^\d+$/.test(n),"invalid whole number "+n),i(null!=t,"precision required"),i(t>=0&&t<=18,"Precision should be 18 characters or less");var e=t-n.length;e>0&&(n=""+"0".repeat(e)+n);var l=n.length-t;return p(n=n.slice(0,l)+"."+n.slice(l),t)},printAsset:m,parseAsset:function(n){var t=n.split(" "),e=(0,l.default)(t,1)[0].match(/^([0-9]+(\.[0-9]+)?)( |$)/),r=e?e[1]:null,u=n.match(/(^| )([0-9]+),([A-Z]+)(@|$)/),o=u?Number(u[2]):null,a=r?(r.split(".")[1]||"").length:null,s=null!=o?o:a,c=n.match(/(^| |,)([A-Z]+)(@|$)/),f=c?c[2]:null,d=n.split("@"),h=(0,l.default)(d,2)[1],p=/^[a-z0-5]+(\.[a-z0-5]+)*$/.test(h)?h:null,g=m({amount:r,precision:s,symbol:f,contract:p});return i.equal(n,g,"Invalid extended asset string: "+n+" !== "+g),null!=s&&i(s>=0&&s<=18,"Precision should be 18 characters or less"),null!=f&&i(f.length<=7,"Asset symbol is 7 characters or less"),null!=p&&i(p.length<=12,"Contract is 12 characters or less"),{amount:r,precision:s,symbol:f,contract:p}}};var s=".12345abcdefghijklmnopqrstuvwxyz",c=function(n){var t=s.indexOf(n);if(-1===t)throw new TypeError("Invalid character: '"+n+"'");return t};function f(n){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if("string"!=typeof n)throw new TypeError("name parameter is a required string");if(n.length>12)throw new TypeError("A name can be up to 12 characters long");for(var e="",l=0;l<=12;l++){var r=lu)throw new TypeError("Invalid name "+n);e+=i="0".repeat(u-i.length)+i}var a=o.fromString(e,!0,2),s="",f=t?a.toBytesLE():a.toBytesBE(),d=!0,h=!1,p=void 0;try{for(var m,g=f[Symbol.iterator]();!(d=(m=g.next()).done);d=!0){var v=Number(m.value).toString(16);s+=(1===v.length?"0":"")+v}}catch(n){h=!0,p=n}finally{try{!d&&g.return&&g.return()}finally{if(h)throw p}}return o.fromString(s,!0,16).toString().toString()}function d(n){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];n=a(n);var e="",l=t?n.toBytesLE():n.toBytesBE(),r=!0,u=!1,i=void 0;try{for(var c,f=l[Symbol.iterator]();!(r=(c=f.next()).done);r=!0){var d=Number(c.value).toString(16);e+=(1===d.length?"0":"")+d}}catch(n){u=!0,i=n}finally{try{!r&&f.return&&f.return()}finally{if(u)throw i}}e+="0".repeat(16-e.length);for(var h=o.fromNumber(31,!0),p=o.fromNumber(15,!0),m="",g=o.fromString(e,!0,16),v=0;v<=12;v++)m=s[g.and(0===v?p:h)]+m,g=g.shiftRight(0===v?4:5);return m.replace(/\.+$/,"")}function h(n){i(null!=n,"value is required"),"."===(n="object"===n&&n.toString?n.toString():String(n))[0]&&(n="0"+n);var t=n.split(".");return i(t.length<=2,"invalid decimal "+n),i(/^\d+(,?\d)*\d*$/.test(t[0]),"invalid decimal "+n),2===t.length&&(i(/^\d*$/.test(t[1]),"invalid decimal "+n),t[1]=t[1].replace(/0+$/,""),""===t[1]&&t.pop()),t[0]=t[0].replace(/^0*/,""),""===t[0]&&(t[0]="0"),t.join(".")}function p(n,t){var e=h(n);if(null==t)return n;i(t>=0&&t<=18,"Precision should be 18 characters or less");var l=e.split(".");if(0===t&&1===l.length)return l[0];if(1===l.length)return l[0]+"."+"0".repeat(t);var r=t-l[1].length;return i(r>=0,"decimal '"+e+"' exceeds precision "+t),l[0]+"."+l[1]+"0".repeat(r)}function m(n){var t=n.amount,e=n.precision,l=n.symbol,u=n.contract;i.equal(void 0===l?"undefined":(0,r.default)(l),"string","symbol is a required string"),null!=t&&null!=e&&(t=p(t,e));var o=function(n,t){return null==n?"":null==t?"":n+t};return null!=t?o(t," ")+l+o("@",u):o(e,",")+l+o("@",u)}},{assert:10,"babel-runtime/helpers/slicedToArray":15,"babel-runtime/helpers/typeof":16,bytebuffer:45}],3:[function(n,t,e){"use strict";var l=u(n("babel-runtime/regenerator")),r=u(n("babel-runtime/helpers/typeof"));function u(n){return n&&n.__esModule?n:{default:n}}var i=n("eosjs-ecc"),o=n("fcbuffer"),a=n("eosjs-api"),s=n("assert"),c=n("./structs"),f=n("./abi-cache"),d=n("./write-api"),h=n("./format"),p=n("./schema"),m=n("../package.json"),g=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={log:(n=Object.assign({},{httpEndpoint:"http://127.0.0.1:8888",debug:!1,verbose:!1,broadcast:!0,sign:!0},n)).verbose?console.log:null,error:console.error};return n.logger=Object.assign({},t,n.logger),function(n){var t=null!=n.httpEndpoint?a(n):null;if(n.network=t,n.abiCache=f(t,n),n.chainId||(n.chainId="cf057bbfb72640471fd910bcb67639c22df9f92470936cddc1ade0e2f2e7dc4f"),t&&function(n,t,e){n.getInfo({}).then(function(n){n.chain_id!==t&&e.error&&e.error("chainId mismatch, signatures will not match transaction authority. expected "+t+" !== actual "+n.chain_id)}).catch(function(n){e.error&&e.error(n)})}(t,n.chainId,n.logger),null!=n.mockTransactions){if("string"==typeof n.mockTransactions){var e=n.mockTransactions;n.mockTransactions=function(){return e}}s.equal((0,r.default)(n.mockTransactions),"function","config.mockTransactions")}var l=c(n),u=l.structs,i=l.types,o=l.fromBuffer,h=l.toBuffer,m=function(n,t,e){var l=n.network,r=Object.assign({},l),u=d(t,l,e,n,p);return function(n,t,e){for(var l in n)if(t[l])throw new TypeError("Conflicting methods in EosApi and Transaction Api: "+l)}(r,u),Object.assign(r,u),r}(n,a,u);return Object.assign(m,{fc:{structs:u,types:i,fromBuffer:o,toBuffer:h}}),n.signProvider||(n.signProvider=v(m,n)),m}(n)};t.exports=g,Object.assign(g,{version:m.version,modules:{format:h,api:a,ecc:i,json:{api:a.api,schema:p},Fcbuffer:o},Testnet:function(n){return console.error("deprecated, change Eos.Testnet(..) to just Eos(..)"),g(n)},Localnet:function(n){return console.error("deprecated, change Eos.Localnet(..) to just Eos(..)"),g(n)}});var v=function(n,t){return function(e){var r,u,o,a,c,f,d,h,p,m,g,v,b,y,_,w,E=e.sign,C=e.buf,A=e.transaction;return l.default.async(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.keyProvider){e.next=3;break}throw new TypeError("This transaction requires a config.keyProvider for signing");case 3:return u=r,"function"==typeof r&&(u=r({transaction:A})),e.next=7,l.default.awrap(Promise.resolve(u));case 7:if(u=e.sent,Array.isArray(u)||(u=[u]),(u=u.map(function(n){try{return{private:i.PrivateKey(n).toString()}}catch(t){return{public:i.PublicKey(n).toString()}}s(!1,"expecting public or private keys from keyProvider")})).length){e.next=12;break}throw new Error("missing key, check your keyProvider");case 12:if(1!==u.length||!u[0].private){e.next=15;break}return e.abrupt("return",E(C,u[0].private));case 15:if(null!=t.httpEndpoint){e.next=37;break}for(o=[],a=!0,c=!1,f=void 0,e.prev=20,d=u[Symbol.iterator]();!(a=(h=d.next()).done);a=!0)o.push(E(C,h.value.private));e.next=28;break;case 24:e.prev=24,e.t0=e.catch(20),c=!0,f=e.t0;case 28:e.prev=28,e.prev=29,!a&&d.return&&d.return();case 31:if(e.prev=31,!c){e.next=34;break}throw f;case 34:return e.finish(31);case 35:return e.finish(28);case 36:return e.abrupt("return",o);case 37:for(p=new Map,m=!0,g=!1,v=void 0,e.prev=41,b=u[Symbol.iterator]();!(m=(y=b.next()).done);m=!0)null!=(_=y.value).private?p.set(i.privateToPublic(_.private),_.private):p.set(_.public,null);e.next=49;break;case 45:e.prev=45,e.t1=e.catch(41),g=!0,v=e.t1;case 49:e.prev=49,e.prev=50,!m&&b.return&&b.return();case 52:if(e.prev=52,!g){e.next=55;break}throw v;case 55:return e.finish(52);case 56:return e.finish(49);case 57:return w=Array.from(p.keys()),e.abrupt("return",n.getRequiredKeys(A,w).then(function(n){var t=n.required_keys;if(!t.length)throw new Error("missing required keys for "+JSON.stringify(A));var e=[],l=[],u=!0,o=!1,a=void 0;try{for(var c,f=t[Symbol.iterator]();!(u=(c=f.next()).done);u=!0){var d=c.value;d=i.PublicKey(d).toString();var h=p.get(d);h?e.push(h):l.push(d)}}catch(n){o=!0,a=n}finally{try{!u&&f.return&&f.return()}finally{if(o)throw a}}0!==l.length&&(s("function"==typeof r,"keyProvider function is needed for private key lookup"),r({pubkeys:l}).forEach(function(n){e.push(n)}));var m=[],g=!0,v=!1,b=void 0;try{for(var y,_=e[Symbol.iterator]();!(g=(y=_.next()).done);g=!0)m.push(E(C,y.value))}catch(n){v=!0,b=n}finally{try{!g&&_.return&&_.return()}finally{if(v)throw b}}return m}));case 59:case"end":return e.stop()}},null,this,[[20,24,28,36],[29,,31,35],[41,45,49,57],[50,,52,56]])}}},{"../package.json":206,"./abi-cache":1,"./format":2,"./schema":7,"./structs":8,"./write-api":9,assert:10,"babel-runtime/helpers/typeof":16,"babel-runtime/regenerator":17,"eosjs-api":134,"eosjs-ecc":143,fcbuffer:152}],4:[function(n,t,e){t.exports={name:"uint64",checksum160:"fixed_bytes20",checksum256:"fixed_bytes32",checksum512:"fixed_bytes64",signature:"fixed_bytes65",public_key:"fixed_bytes33",message_type:"fixed_string16",symbol:"uint64",symbol_code:"uint64",field_name:"string",account_name:"name",permission_name:"name",type_name:"string",token_name:"name",table_name:"name",scope_name:"name",action_name:"name",time_point:"int64",time_point_sec:"time",timestamp:"uint32",block_timestamp_type:"timestamp",block_id:"fixed_bytes32",checksum_type:"fixed_bytes32",checksum256_type:"fixed_bytes32",checksum512_type:"fixed_bytes64",checksum160_type:"fixed_bytes20",sha256:"fixed_bytes32",sha512:"fixed_bytes64",sha160:"fixed_bytes20",weight_type:"uint16",block_num_type:"uint32",share_type:"int64",digest_type:"checksum_type",context_free_type:"bytes",unsigned_int:"varuint32",bool:"uint8",extensions_type:{base:"",fields:{type:"uint16",data:"bytes"}},transaction_header:{base:"",fields:{expiration:"time",ref_block_num:"uint16",ref_block_prefix:"uint32",net_usage_words:"unsigned_int",max_cpu_usage_ms:"uint8",delay_sec:"unsigned_int"}},transaction:{base:"transaction_header",fields:{context_free_actions:"action[]",actions:"action[]",transaction_extensions:"extensions_type[]"}},signed_transaction:{base:"transaction",fields:{signatures:"signature[]",context_free_data:"bytes[]"}},fields:"field_def[]",field_def:{fields:{name:"field_name",type:"type_name"}},asset:{fields:{amount:"share_type",sym:"symbol"}},producer_key:{fields:{producer_name:"account_name",block_signing_key:"public_key"}},producer_schedule:{fields:{version:"uint32",producers:"producer_key[]"}},chain_config:{fields:{target_block_size:"uint32",max_block_size:"uint32",target_block_acts_per_scope:"uint32",max_block_acts_per_scope:"uint32",target_block_acts:"uint32",max_block_acts:"uint32",real_threads:"uint64",max_storage_size:"uint64",max_transaction_lifetime:"uint32",max_authority_depth:"uint16",max_transaction_exec_time:"uint32",max_inline_depth:"uint16",max_inline_action_size:"uint32",max_generated_transaction_size:"uint32"}},type_def:{base:"",fields:{new_type_name:"type_name",type:"type_name"}},struct_def:{base:"",fields:{name:"type_name",base:"type_name",fields:"field_def[]"}},clause_pair:{base:"",fields:{id:"string",body:"string"}},error_message:{base:"",fields:{error_code:"uint64",error_msg:"string"}},abi_def:{base:"",fields:{version:"string",types:"type_def[]",structs:"struct_def[]",actions:"action_def[]",tables:"table_def[]",ricardian_clauses:"clause_pair[]",error_messages:"error_message[]",abi_extensions:"extensions_type[]"}},table_def:{base:"",fields:{name:"table_name",index_type:"type_name",key_names:"field_name[]",key_types:"type_name[]",type:"type_name"}},action:{base:"",fields:{account:"account_name",name:"action_name",authorization:"permission_level[]",data:"bytes"}},action_def:{base:"",fields:{name:"action_name",type:"type_name",ricardian_contract:"string"}},block_header:{base:"",fields:{previous:"checksum256",timestamp:"timestamp",transaction_mroot:"checksum256",action_mroot:"checksum256",block_mroot:"checksum256",producer:"account_name",schedule_version:"uint32",new_producers:"producer_schedule?"}},packed_transaction:{fields:{signatures:"signature[]",compression:"uint8",packed_context_free_data:"bytes",packed_trx:"bytes"}},nonce:{action:{name:"nonce",account:"eosio.null"},fields:{value:"string"}}}},{}],5:[function(n,t,e){t.exports={account_name:"name",action_name:"name",authority:{base:"",fields:{threshold:"uint32",keys:"key_weight[]",accounts:"permission_level_weight[]",waits:"wait_weight[]"}},bidname:{base:"",action:{name:"bidname",account:"eosio"},fields:{bidder:"account_name",newname:"account_name",bid:"asset"}},blockchain_parameters:{base:"",fields:{max_block_net_usage:"uint64",target_block_net_usage_pct:"uint32",max_transaction_net_usage:"uint32",base_per_transaction_net_usage:"uint32",net_usage_leeway:"uint32",context_free_discount_net_usage_num:"uint32",context_free_discount_net_usage_den:"uint32",max_block_cpu_usage:"uint32",target_block_cpu_usage_pct:"uint32",max_transaction_cpu_usage:"uint32",min_transaction_cpu_usage:"uint32",max_transaction_lifetime:"uint32",deferred_trx_expiration_window:"uint32",max_transaction_delay:"uint32",max_inline_action_size:"uint32",max_inline_action_depth:"uint16",max_authority_depth:"uint16"}},buyram:{base:"",action:{name:"buyram",account:"eosio"},fields:{payer:"account_name",receiver:"account_name",quant:"asset"}},buyrambytes:{base:"",action:{name:"buyrambytes",account:"eosio"},fields:{payer:"account_name",receiver:"account_name",bytes:"uint32"}},canceldelay:{base:"",action:{name:"canceldelay",account:"eosio"},fields:{canceling_auth:"permission_level",trx_id:"transaction_id_type"}},claimrewards:{base:"",action:{name:"claimrewards",account:"eosio"},fields:{owner:"account_name"}},connector:{base:"",fields:{balance:"asset",weight:"float64"}},delegatebw:{base:"",action:{name:"delegatebw",account:"eosio"},fields:{from:"account_name",receiver:"account_name",stake_net_quantity:"asset",stake_cpu_quantity:"asset",transfer:"bool"}},delegated_bandwidth:{base:"",fields:{from:"account_name",to:"account_name",net_weight:"asset",cpu_weight:"asset"}},deleteauth:{base:"",action:{name:"deleteauth",account:"eosio"},fields:{account:"account_name",permission:"permission_name"}},eosio_global_state:{base:"blockchain_parameters",fields:{max_ram_size:"uint64",total_ram_bytes_reserved:"uint64",total_ram_stake:"int64",last_producer_schedule_update:"block_timestamp_type",last_pervote_bucket_fill:"uint64",pervote_bucket:"int64",perblock_bucket:"int64",total_unpaid_blocks:"uint32",total_activated_stake:"int64",thresh_activated_stake_time:"uint64",last_producer_schedule_size:"uint16",total_producer_vote_weight:"float64",last_name_close:"block_timestamp_type"}},exchange_state:{base:"",fields:{supply:"asset",base:"connector",quote:"connector"}},key_weight:{base:"",fields:{key:"public_key",weight:"weight_type"}},linkauth:{base:"",action:{name:"linkauth",account:"eosio"},fields:{account:"account_name",code:"account_name",type:"action_name",requirement:"permission_name"}},namebid_info:{base:"",fields:{newname:"account_name",high_bidder:"account_name",high_bid:"int64",last_bid_time:"uint64"}},newaccount:{base:"",action:{name:"newaccount",account:"eosio"},fields:{creator:"account_name",name:"account_name",owner:"authority",active:"authority"}},onerror:{base:"",action:{name:"onerror",account:"eosio"},fields:{sender_id:"uint128",sent_trx:"bytes"}},permission_level:{base:"",fields:{actor:"account_name",permission:"permission_name"}},permission_level_weight:{base:"",fields:{permission:"permission_level",weight:"weight_type"}},permission_name:"name",producer_info:{base:"",fields:{owner:"account_name",total_votes:"float64",producer_key:"public_key",is_active:"bool",url:"string",unpaid_blocks:"uint32",last_claim_time:"uint64",location:"uint16"}},producer_key:{base:"",fields:{producer_name:"account_name",block_signing_key:"public_key"}},refund:{base:"",action:{name:"refund",account:"eosio"},fields:{owner:"account_name"}},refund_request:{base:"",fields:{owner:"account_name",request_time:"time_point_sec",net_amount:"asset",cpu_amount:"asset"}},regproducer:{base:"",action:{name:"regproducer",account:"eosio"},fields:{producer:"account_name",producer_key:"public_key",url:"string",location:"uint16"}},regproxy:{base:"",action:{name:"regproxy",account:"eosio"},fields:{proxy:"account_name",isproxy:"bool"}},require_auth:{base:"",action:{name:"reqauth",account:"eosio"},fields:{from:"account_name"}},rmvproducer:{base:"",action:{name:"rmvproducer",account:"eosio"},fields:{producer:"account_name"}},sellram:{base:"",action:{name:"sellram",account:"eosio"},fields:{account:"account_name",bytes:"uint64"}},set_account_limits:{base:"",action:{name:"setalimits",account:"eosio"},fields:{account:"account_name",ram_bytes:"int64",net_weight:"int64",cpu_weight:"int64"}},set_global_limits:{base:"",action:{name:"setglimits",account:"eosio"},fields:{cpu_usec_per_period:"int64"}},set_producers:{base:"",action:{name:"setprods",account:"eosio"},fields:{schedule:"producer_key[]"}},setabi:{base:"",action:{name:"setabi",account:"eosio"},fields:{account:"account_name",abi:"bytes"}},setcode:{base:"",action:{name:"setcode",account:"eosio"},fields:{account:"account_name",vmtype:"uint8",vmversion:"uint8",code:"bytes"}},setparams:{base:"",action:{name:"setparams",account:"eosio"},fields:{params:"blockchain_parameters"}},setpriv:{base:"",action:{name:"setpriv",account:"eosio"},fields:{account:"account_name",is_priv:"int8"}},setram:{base:"",action:{name:"setram",account:"eosio"},fields:{max_ram_size:"uint64"}},total_resources:{base:"",fields:{owner:"account_name",net_weight:"asset",cpu_weight:"asset",ram_bytes:"uint64"}},transaction_id_type:"checksum256",undelegatebw:{base:"",action:{name:"undelegatebw",account:"eosio"},fields:{from:"account_name",receiver:"account_name",unstake_net_quantity:"asset",unstake_cpu_quantity:"asset"}},unlinkauth:{base:"",action:{name:"unlinkauth",account:"eosio"},fields:{account:"account_name",code:"account_name",type:"action_name"}},unregprod:{base:"",action:{name:"unregprod",account:"eosio"},fields:{producer:"account_name"}},updateauth:{base:"",action:{name:"updateauth",account:"eosio"},fields:{account:"account_name",permission:"permission_name",parent:"permission_name",auth:"authority"}},user_resources:{base:"",fields:{owner:"account_name",net_weight:"asset",cpu_weight:"asset",ram_bytes:"uint64"}},voteproducer:{base:"",action:{name:"voteproducer",account:"eosio"},fields:{voter:"account_name",proxy:"account_name",producers:"account_name[]"}},voter_info:{base:"",fields:{owner:"account_name",proxy:"account_name",producers:"account_name[]",staked:"int64",last_vote_weight:"float64",proxied_vote_weight:"float64",is_proxy:"bool",deferred_trx_id:"uint32",last_unstake_time:"time_point_sec",unstaking:"asset"}},wait_weight:{base:"",fields:{wait_sec:"uint32",weight:"weight_type"}},weight_type:"uint16"}},{}],6:[function(n,t,e){t.exports={account:{base:"",fields:{balance:"asset"}},account_name:"name",create:{base:"",action:{name:"create",account:"eosio.token"},fields:{issuer:"account_name",maximum_supply:"asset"}},currency_stats:{base:"",fields:{supply:"asset",max_supply:"asset",issuer:"account_name"}},issue:{base:"",action:{name:"issue",account:"eosio.token"},fields:{to:"account_name",quantity:"asset",memo:"string"}},transfer:{base:"",action:{name:"transfer",account:"eosio.token"},fields:{from:"account_name",to:"account_name",quantity:"asset",memo:"string"}}}},{}],7:[function(n,t,e){"use strict";var l=Object.assign({},n("./chain_types.json"),n("./eosio_system.json"),n("./eosio_token.json"));t.exports=l},{"./chain_types.json":4,"./eosio_system.json":5,"./eosio_token.json":6}],8:[function(n,t,e){(function(e){"use strict";var l=u(n("babel-runtime/helpers/slicedToArray")),r=u(n("babel-runtime/helpers/typeof"));function u(n){return n&&n.__esModule?n:{default:n}}var i=n("eosjs-ecc"),o=i.Signature,a=i.PublicKey,s=n("fcbuffer"),c=n("bytebuffer"),f=n("assert"),d={schema:n("./schema")},h=n("./format"),p=h.encodeName,m=h.decodeName,g=h.UDecimalPad,v=h.UDecimalImply,b=h.UDecimalUnimply,y=h.printAsset,_=h.parseAsset;t.exports=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1],e=function(t,e){if(new Set(["eosio","eosio.token","eosio.null"]).has(e))return a[t];var l=n.abiCache.abi(e),r=l.structs[t];if(null!=r)return r;var u=!0,i=!1,o=void 0;try{for(var s,c=l.abi.actions[Symbol.iterator]();!(u=(s=c.next()).done);u=!0){var f=s.value;if(f.name===t){var d=l.structs[f.type];if(null!=d)return d}}}catch(n){i=!0,o=n}finally{try{!u&&c.return&&c.return()}finally{if(i)throw o}}throw new Error("Missing ABI struct or action: "+t)},l=null==n.forceActionDataHex||n.forceActionDataHex,r=Object.assign({},B,D(e),I(n),M(e,l),n.override),u=Object.assign({},{name:function(){return[w]},public_key:function(){return[E(C)]},symbol:function(){return[A]},extended_symbol:function(){return[x]},asset:function(){return[k]},extended_asset:function(){return[F]},signature:function(){return[E(S)]}},n.customTypes);(n=Object.assign({override:r},{customTypes:u},n)).sort=Object.assign({},n.sort),n.sort["action.authorization"]=!0,n.sort["signed_transaction.signature"]=!0,n.sort["authority.accounts"]=!0,n.sort["authority.keys"]=!0;var i=Object.assign({},d.schema,t),o=s(i,n),a=o.structs,c=o.types,f=o.errors,h=o.fromBuffer,p=o.toBuffer;if(0!==f.length)throw new Error(JSON.stringify(f,null,4));return{structs:a,types:c,fromBuffer:h,toBuffer:p}};var w=function(n){return{fromByteBuffer:function(n){return m(n.readUint64(),!1)},appendByteBuffer:function(n,t){n.writeUint64(p(t,!1))},fromObject:function(n){return n},toObject:function(t){return n.defaults&&null==t?"":t}}},E=function(){for(var n=arguments.length,t=Array(n),e=0;e, got: "+(void 0===n?"undefined":(0,r.default)(n)));var e=t.amount,l=t.precision,u=t.symbol,i=t.contract;return f(null!=e,"missing amount"),f(null!=l,"missing precision"),f(null!=u,"missing symbol"),f(null!=i,"missing contract"),{amount:e,precision:l,symbol:u,contract:i}},toObject:function(t){if(n.defaults&&null==t)return{amount:"1.0000",precision:4,symbol:"SYS",contract:"eosio.token"};f.equal(void 0===t?"undefined":(0,r.default)(t),"object","expecting extended_asset object");var e=t.precision,l=t.symbol,u=t.contract;return{amount:g(t.amount,e),precision:e,symbol:l,contract:u}}}},S=function(n,t){var e=t.fixed_bytes65(n);return{fromByteBuffer:function(n){var t=e.fromByteBuffer(n);return o.from(t).toString()},appendByteBuffer:function(n,t){var l=o.from(t);e.appendByteBuffer(n,l.toBuffer())},fromObject:function(n){return o.from(n).toString()},toObject:function(t){return n.defaults&&null==t?"SIG_K1_bas58signature..":o.from(t).toString()}}},B={"authority.fromObject":function(n){if(a.fromString(n))return{threshold:1,keys:[{key:n,weight:1}]};if("string"==typeof n){var t=n.split("@"),e=(0,l.default)(t,2),r=e[1];return{threshold:1,accounts:[{permission:{actor:e[0],permission:void 0===r?"active":r},weight:1}]}}}},D=function(n){return{"abi.fromObject":function(n){return"string"==typeof n?JSON.parse(n):e.isBuffer(n)?JSON.parse(n.toString()):void 0},"setabi.abi.appendByteBuffer":function(t){var e=t.object,l=t.b,r=n("abi_def","eosio"),u=new c(c.DEFAULT_CAPACITY,c.LITTLE_ENDIAN);r.appendByteBuffer(u,e.abi),l.writeVarint32(u.offset),l.append(u.copy(0,u.offset),"binary")}}},I=function(n){return{"setcode.code.fromObject":function(t){var l=t.object,r=t.result;try{var u=l.code.toString();if(/^\s*\(module/.test(u)){var i=n.binaryen;f(null!=i,'required: config.binaryen = require("binaryen")'),n.debug&&console.log("Assembling WASM..");var o=e.from(i.parseText(u).emitBinary());r.code=o}else r.code=l.code}catch(n){throw console.error(n,l.code),n}}}},M=function(n,t){return{"action.data.fromByteBuffer":function(t){var l=t.object,r=t.b,u=t.config,i=""==(l.name||"")?t.fields.data:n(l.name,l.account);if(i)r.readVarint32(),l.data=i.fromByteBuffer(r,u);else{var o=r.readVarint32(),a=r.copy(r.offset,r.offset+o);r.skip(o),l.data=e.from(a.toBinary(),"binary")}},"action.data.appendByteBuffer":function(t){var l=t.object,r=t.b,u=""==(l.name||"")?t.fields.data:n(l.name,l.account);if(u){var i=new c(c.DEFAULT_CAPACITY,c.LITTLE_ENDIAN);u.appendByteBuffer(i,l.data),r.writeVarint32(i.offset),r.append(i.copy(0,i.offset),"binary")}else{var o="string"==typeof l.data?new e(l.data,"hex"):l.data;if(!e.isBuffer(o))throw new TypeError("Unknown struct '"+l.name+"' for contract '"+l.account+"', locate this struct or provide serialized action.data");r.writeVarint32(o.length),r.append(o.toString("binary"),"binary")}},"action.data.fromObject":function(t){var l=t.object,u=t.result,i=l.data,o=l.name,a=""==(o||"")?t.fields.data:n(o,l.account);if(a)if("object"===(void 0===i?"undefined":(0,r.default)(i)))u.data=a.fromObject(i);else{if("string"!=typeof i)throw new TypeError("Expecting hex string or object in action.data");var c=new e(i,"hex");u.data=s.fromBuffer(a,c)}else u.data=i},"action.data.toObject":function(l){var r=l.object,u=l.result,i=l.config,o=r||{},a=o.data,s=o.name,f=""==(s||"")?l.fields.data:n(s,r.account);if(f){if(t){var d=new c(c.DEFAULT_CAPACITY,c.LITTLE_ENDIAN);return a&&f.appendByteBuffer(d,a),void(u.data=d.copy(0,d.offset).toString("hex"))}u.data=f.toObject(a,i)}else u.data=e.isBuffer(a)?a.toString("hex"):a}}}}).call(this,n("buffer").Buffer)},{"./format":2,"./schema":7,assert:10,"babel-runtime/helpers/slicedToArray":15,"babel-runtime/helpers/typeof":16,buffer:44,bytebuffer:45,"eosjs-ecc":143,fcbuffer:152}],9:[function(n,t,e){(function(e){"use strict";var l=i(n("babel-runtime/helpers/slicedToArray")),r=i(n("babel-runtime/regenerator")),u=i(n("babel-runtime/helpers/typeof"));function i(n){return n&&n.__esModule?n:{default:n}}var o=n("assert"),a=n("eosjs-ecc"),s=n("fcbuffer"),c=n("create-hash"),f=n("eosjs-api").processArgs,d=n("./structs");t.exports=function(n,t,i,b,y){if("string"!=typeof b.chainId)throw new TypeError("config.chainId is required");var _=function(n,t,i,b){var y=function(n,t){return function(){for(var n=arguments.length,e=Array(n),l=0;l1&&"function"==typeof e[e.length-1]&&(c=e.pop()),e.length>1&&"object"===(0,u.default)(e[e.length-1])&&(s=e.pop()),o.equal(e.length,1,"transaction args: contracts, transaction, [options], [callback]"),A=e[0],!a){n.next=67;break}for(o(!c,"callback with contracts are not supported"),o.equal("function",void 0===A?"undefined":(0,u.default)(A),"provide function callback following contracts array parameter"),x=[],k=!0,F=!1,S=void 0,n.prev=50,B=a[Symbol.iterator]();!(k=(D=B.next()).done);k=!0)x.push(_(D.value,t.transaction));n.next=58;break;case 54:n.prev=54,n.t1=n.catch(50),F=!0,S=n.t1;case 58:n.prev=58,n.prev=59,!k&&B.return&&B.return();case 61:if(n.prev=61,!F){n.next=64;break}throw S;case 64:return n.finish(61);case 65:return n.finish(58);case 66:return n.abrupt("return",Promise.all(x).then(function(n){var t={};return n.forEach(function(n,e){t[a[e]]=n}),E(A,s,f?t:t[a[0]])}));case 67:if("function"!=typeof A){n.next=69;break}return n.abrupt("return",E(A,s,t));case 69:if("object"!==(void 0===A?"undefined":(0,u.default)(A))){n.next=71;break}return n.abrupt("return",C(A,s,c));case 71:throw new Error("first transaction argument unrecognized",A);case 72:case"end":return n.stop()}},null,this,[[18,22,26,34],[27,,29,33],[50,54,58,66],[59,,61,65]])}};function _(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return i.abiCache.abiAsync(n).then(function(e){o(Array.isArray(e.abi.actions)&&e.abi.actions.length,"No actions");var l={};return l.transaction=t||y(e.structs,l),e.abi.actions.forEach(function(t){var r=t.name,u=t.type,i=v(e.schema,u);l[r]=w(u,i,l.transaction,n,r)}),l.fc=e,l})}function w(t,e,r){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"eosio.token",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:t;return function(){for(var c=arguments.length,h=Array(c),p=0;pt.actor?1:n.actor0&&void 0!==arguments[0]?arguments[0]:"")+"\n"};i("CONTRACT"),i(l),i(),i("FUNCTION"),i(n),i();var o=void 0;if("eosio"===l||"eosio.token"===l)o=d(Object.assign({defaults:!0,network:e},r)).structs[n],i("PARAMETERS"),i(JSON.stringify(t,null,4)),i(),i("EXAMPLE"),i(JSON.stringify(o.toObject(),null,4));else{var a=r.abiCache.abi(l);i("PARAMETERS"),i(JSON.stringify(v(a.schema,n),null,4)),i(),o=a.structs[n],i("EXAMPLE"),i(JSON.stringify(o.toObject(),null,4))}if(null==o)throw TypeError("Unknown type: "+n);return u}(t,e,n,a,i))}}function E(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=arguments[2];o.equal("function",void 0===n?"undefined":(0,u.default)(n),"trCallback"),o.equal("object",void 0===t?"undefined":(0,u.default)(t),"options"),o.equal("object",void 0===e?"undefined":(0,u.default)(e),"merges"),o(!Array.isArray(e),"merges should not be an array"),o.equal("function",(0,u.default)(C),"transaction");var r=[],i={},a=function(n){return function(){for(var t=arguments.length,e=Array(t),l=0;l0&&-1===n.findIndex(function(n){return"string"!=typeof n})},m=function(n){return"object"===(void 0===n?"undefined":(0,u.default)(n))?n:"boolean"==typeof n?{broadcast:n}:void 0},g=function(n,t,e){return function(l,r){l?(t.error&&t.error("error",l),n(l)):Promise.resolve(e(r)).catch(function(t){n(t)})}};function v(n,t){var e=n[t],l=e.base,r=e.fields,u={};return l&&""!==l&&Object.assign(u,v(n,l)),Object.assign(u,r),u}}).call(this,n("buffer").Buffer)},{"./structs":8,assert:10,"babel-runtime/helpers/slicedToArray":15,"babel-runtime/helpers/typeof":16,"babel-runtime/regenerator":17,buffer:44,"create-hash":119,"eosjs-api":134,"eosjs-ecc":143,fcbuffer:152}],10:[function(n,e,l){(function(t){"use strict";function l(n,t){if(n===t)return 0;for(var e=n.length,l=t.length,r=0,u=Math.min(e,l);r=0;s--)if(c[s]!==f[s])return!1;for(s=c.length-1;s>=0;s--)if(!b(n[a=c[s]],t[a],e,l))return!1;return!0}(n,t,e,i))}return e?n===t:n==t}function y(n){return"[object Arguments]"==Object.prototype.toString.call(n)}function _(n,t){if(!n||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(n);try{if(n instanceof t)return!0}catch(n){}return!Error.isPrototypeOf(t)&&!0===t.call({},n)}function w(n,t,e,l){var r;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof e&&(l=e,e=null),r=function(n){var t;try{n()}catch(n){t=n}return t}(t),l=(e&&e.name?" ("+e.name+").":".")+(l?" "+l:"."),n&&!r&&g(r,e,"Missing expected exception"+l);var i="string"==typeof l,o=!n&&u.isError(r),a=!n&&r&&!e;if((o&&i&&_(r,e)||a)&&g(r,e,"Got unwanted exception"+l),n&&r&&e&&!_(r,e)||!n&&r)throw r}f.AssertionError=function(n){var t;this.name="AssertionError",this.actual=n.actual,this.expected=n.expected,this.operator=n.operator,n.message?(this.message=n.message,this.generatedMessage=!1):(this.message=p(m((t=this).actual),128)+" "+t.operator+" "+p(m(t.expected),128),this.generatedMessage=!0);var e=n.stackStartFunction||g;if(Error.captureStackTrace)Error.captureStackTrace(this,e);else{var l=new Error;if(l.stack){var r=l.stack,u=h(e),i=r.indexOf("\n"+u);if(i>=0){var o=r.indexOf("\n",i+1);r=r.substring(o+1)}this.stack=r}}},u.inherits(f.AssertionError,Error),f.fail=g,f.ok=v,f.equal=function(n,t,e){n!=t&&g(n,t,e,"==",f.equal)},f.notEqual=function(n,t,e){n==t&&g(n,t,e,"!=",f.notEqual)},f.deepEqual=function(n,t,e){b(n,t,!1)||g(n,t,e,"deepEqual",f.deepEqual)},f.deepStrictEqual=function(n,t,e){b(n,t,!0)||g(n,t,e,"deepStrictEqual",f.deepStrictEqual)},f.notDeepEqual=function(n,t,e){b(n,t,!1)&&g(n,t,e,"notDeepEqual",f.notDeepEqual)},f.notDeepStrictEqual=function n(t,e,l){b(t,e,!0)&&g(t,e,l,"notDeepStrictEqual",n)},f.strictEqual=function(n,t,e){n!==t&&g(n,t,e,"===",f.strictEqual)},f.notStrictEqual=function(n,t,e){n===t&&g(n,t,e,"!==",f.notStrictEqual)},f.throws=function(n,t,e){w(!0,n,t,e)},f.doesNotThrow=function(n,t,e){w(!1,n,t,e)},f.ifError=function(n){if(n)throw n};var E=Object.keys||function(n){var t=[];for(var e in n)i.call(n,e)&&t.push(e);return t}}).call(this,void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"util/":204}],11:[function(n,t,e){t.exports={default:n("core-js/library/fn/get-iterator"),__esModule:!0}},{"core-js/library/fn/get-iterator":48}],12:[function(n,t,e){t.exports={default:n("core-js/library/fn/is-iterable"),__esModule:!0}},{"core-js/library/fn/is-iterable":49}],13:[function(n,t,e){t.exports={default:n("core-js/library/fn/symbol"),__esModule:!0}},{"core-js/library/fn/symbol":50}],14:[function(n,t,e){t.exports={default:n("core-js/library/fn/symbol/iterator"),__esModule:!0}},{"core-js/library/fn/symbol/iterator":51}],15:[function(n,t,e){"use strict";e.__esModule=!0;var l=u(n("../core-js/is-iterable")),r=u(n("../core-js/get-iterator"));function u(n){return n&&n.__esModule?n:{default:n}}e.default=function(n,t){if(Array.isArray(n))return n;if((0,l.default)(Object(n)))return function(n,t){var e=[],l=!0,u=!1,i=void 0;try{for(var o,a=(0,r.default)(n);!(l=(o=a.next()).done)&&(e.push(o.value),!t||e.length!==t);l=!0);}catch(n){u=!0,i=n}finally{try{!l&&a.return&&a.return()}finally{if(u)throw i}}return e}(n,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}},{"../core-js/get-iterator":11,"../core-js/is-iterable":12}],16:[function(n,t,e){"use strict";e.__esModule=!0;var l=i(n("../core-js/symbol/iterator")),r=i(n("../core-js/symbol")),u="function"==typeof r.default&&"symbol"==typeof l.default?function(n){return typeof n}:function(n){return n&&"function"==typeof r.default&&n.constructor===r.default&&n!==r.default.prototype?"symbol":typeof n};function i(n){return n&&n.__esModule?n:{default:n}}e.default="function"==typeof r.default&&"symbol"===u(l.default)?function(n){return void 0===n?"undefined":u(n)}:function(n){return n&&"function"==typeof r.default&&n.constructor===r.default&&n!==r.default.prototype?"symbol":void 0===n?"undefined":u(n)}},{"../core-js/symbol":13,"../core-js/symbol/iterator":14}],17:[function(n,t,e){t.exports=n("regenerator-runtime")},{"regenerator-runtime":186}],18:[function(n,t,e){var l=n("safe-buffer").Buffer;t.exports=function(n){for(var t={},e=n.length,r=n.charAt(0),u=0;u>=8;for(;s>0;)u.push(255&s),s>>=8}for(var c=0;n[c]===r&&c0;)l.push(i%e),i=i/e|0}for(var o="",a=0;0===t[a]&&a=0;--s)o+=n[l[s]];return o},decodeUnsafe:o,decode:function(n){var t=o(n);if(t)return t;throw new Error("Non-base"+e+" character")}}}},{"safe-buffer":189}],19:[function(n,t,e){"use strict";e.byteLength=function(n){return 3*n.length/4-s(n)},e.toByteArray=function(n){var t,e,l,i,o,a=n.length;i=s(n),o=new u(3*a/4-i),e=i>0?a-4:a;var c=0;for(t=0;t>16&255,o[c++]=l>>8&255,o[c++]=255&l;return 2===i?(l=r[n.charCodeAt(t)]<<2|r[n.charCodeAt(t+1)]>>4,o[c++]=255&l):1===i&&(l=r[n.charCodeAt(t)]<<10|r[n.charCodeAt(t+1)]<<4|r[n.charCodeAt(t+2)]>>2,o[c++]=l>>8&255,o[c++]=255&l),o},e.fromByteArray=function(n){for(var t,e=n.length,r=e%3,u="",i=[],o=0,a=e-r;oa?a:o+16383));return 1===r?(u+=l[(t=n[e-1])>>2],u+=l[t<<4&63],u+="=="):2===r&&(u+=l[(t=(n[e-2]<<8)+n[e-1])>>10],u+=l[t>>4&63],u+=l[t<<2&63],u+="="),i.push(u),i.join("")};for(var l=[],r=[],u="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,a=i.length;o0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===n[t-2]?2:"="===n[t-1]?1:0}function c(n,t,e){for(var r,u=[],i=t;i>18&63]+l[r>>12&63]+l[r>>6&63]+l[63&r]);return u.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},{}],20:[function(n,t,e){function l(n,t,e){if(!(this instanceof l))return new l(n,t,e);null!=n&&("number"==typeof n?this.fromNumber(n,t,e):this.fromString(n,null==t&&"string"!=typeof n?256:t))}var r=l.prototype;r.__bigi=n("../package.json").version,l.isBigInteger=function(n,t){return n&&n.__bigi&&(!t||n.__bigi===r.__bigi)},l.prototype.am=function(n,t,e,l,r,u){for(;--u>=0;){var i=t*this[n++]+e[l]+r;r=Math.floor(i/67108864),e[l++]=67108863&i}return r},l.prototype.DB=26,l.prototype.DM=67108863;var u=l.prototype.DV=1<<26;l.prototype.FV=Math.pow(2,52),l.prototype.F1=26,l.prototype.F2=0;var i,o,a="0123456789abcdefghijklmnopqrstuvwxyz",s=new Array;for(i="0".charCodeAt(0),o=0;o<=9;++o)s[i++]=o;for(i="a".charCodeAt(0),o=10;o<36;++o)s[i++]=o;for(i="A".charCodeAt(0),o=10;o<36;++o)s[i++]=o;function c(n){return a.charAt(n)}function f(n,t){var e=s[n.charCodeAt(t)];return null==e?-1:e}function d(n){var t=new l;return t.fromInt(n),t}function h(n){var t,e=1;return 0!=(t=n>>>16)&&(n=t,e+=16),0!=(t=n>>8)&&(n=t,e+=8),0!=(t=n>>4)&&(n=t,e+=4),0!=(t=n>>2)&&(n=t,e+=2),0!=(t=n>>1)&&(n=t,e+=1),e}function p(n){this.m=n}function m(n){this.m=n,this.mp=n.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<>=16,t+=16),0==(255&n)&&(n>>=8,t+=8),0==(15&n)&&(n>>=4,t+=4),0==(3&n)&&(n>>=2,t+=2),0==(1&n)&&++t,t}function w(n){for(var t=0;0!=n;)n&=n-1,++t;return t}function E(){}function C(n){return n}function A(n){this.r2=new l,this.q3=new l,l.ONE.dlShiftTo(2*n.t,this.r2),this.mu=this.r2.divide(n),this.m=n}p.prototype.convert=function(n){return n.s<0||n.compareTo(this.m)>=0?n.mod(this.m):n},p.prototype.revert=function(n){return n},p.prototype.reduce=function(n){n.divRemTo(this.m,null,n)},p.prototype.mulTo=function(n,t,e){n.multiplyTo(t,e),this.reduce(e)},p.prototype.sqrTo=function(n,t){n.squareTo(t),this.reduce(t)},m.prototype.convert=function(n){var t=new l;return n.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),n.s<0&&t.compareTo(l.ZERO)>0&&this.m.subTo(t,t),t},m.prototype.revert=function(n){var t=new l;return n.copyTo(t),this.reduce(t),t},m.prototype.reduce=function(n){for(;n.t<=this.mt2;)n[n.t++]=0;for(var t=0;t>15)*this.mpl&this.um)<<15)&n.DM;for(n[e=t+this.m.t]+=this.m.am(0,l,n,t,0,this.m.t);n[e]>=n.DV;)n[e]-=n.DV,n[++e]++}n.clamp(),n.drShiftTo(this.m.t,n),n.compareTo(this.m)>=0&&n.subTo(this.m,n)},m.prototype.mulTo=function(n,t,e){n.multiplyTo(t,e),this.reduce(e)},m.prototype.sqrTo=function(n,t){n.squareTo(t),this.reduce(t)},r.copyTo=function(n){for(var t=this.t-1;t>=0;--t)n[t]=this[t];n.t=this.t,n.s=this.s},r.fromInt=function(n){this.t=1,this.s=n<0?-1:0,n>0?this[0]=n:n<-1?this[0]=n+u:this.t=0},r.fromString=function(n,t){var e;if(16==t)e=4;else if(8==t)e=3;else if(256==t)e=8;else if(2==t)e=1;else if(32==t)e=5;else{if(4!=t)return void this.fromRadix(n,t);e=2}this.t=0,this.s=0;for(var r=n.length,u=!1,i=0;--r>=0;){var o=8==e?255&n[r]:f(n,r);o<0?"-"==n.charAt(r)&&(u=!0):(u=!1,0==i?this[this.t++]=o:i+e>this.DB?(this[this.t-1]|=(o&(1<>this.DB-i):this[this.t-1]|=o<=this.DB&&(i-=this.DB))}8==e&&0!=(128&n[0])&&(this.s=-1,i>0&&(this[this.t-1]|=(1<0&&this[this.t-1]==n;)--this.t},r.dlShiftTo=function(n,t){var e;for(e=this.t-1;e>=0;--e)t[e+n]=this[e];for(e=n-1;e>=0;--e)t[e]=0;t.t=this.t+n,t.s=this.s},r.drShiftTo=function(n,t){for(var e=n;e=0;--e)t[e+i+1]=this[e]>>r|o,o=(this[e]&u)<=0;--e)t[e]=0;t[i]=o,t.t=this.t+i+1,t.s=this.s,t.clamp()},r.rShiftTo=function(n,t){t.s=this.s;var e=Math.floor(n/this.DB);if(e>=this.t)t.t=0;else{var l=n%this.DB,r=this.DB-l,u=(1<>l;for(var i=e+1;i>l;l>0&&(t[this.t-e-1]|=(this.s&u)<>=this.DB;if(n.t>=this.DB;l+=this.s}else{for(l+=this.s;e>=this.DB;l-=n.s}t.s=l<0?-1:0,l<-1?t[e++]=this.DV+l:l>0&&(t[e++]=l),t.t=e,t.clamp()},r.multiplyTo=function(n,t){var e=this.abs(),r=n.abs(),u=e.t;for(t.t=u+r.t;--u>=0;)t[u]=0;for(u=0;u=0;)n[e]=0;for(e=0;e=t.DV&&(n[e+t.t]-=t.DV,n[e+t.t+1]=1)}n.t>0&&(n[n.t-1]+=t.am(e,t[e],n,2*e,0,1)),n.s=0,n.clamp()},r.divRemTo=function(n,t,e){var r=n.abs();if(!(r.t<=0)){var u=this.abs();if(u.t0?(r.lShiftTo(s,i),u.lShiftTo(s,e)):(r.copyTo(i),u.copyTo(e));var c=i.t,f=i[c-1];if(0!=f){var d=f*(1<1?i[c-2]>>this.F2:0),p=this.FV/d,m=(1<=0&&(e[e.t++]=1,e.subTo(y,e)),l.ONE.dlShiftTo(c,y),y.subTo(i,i);i.t=0;){var _=e[--v]==f?this.DM:Math.floor(e[v]*p+(e[v-1]+g)*m);if((e[v]+=i.am(0,_,e,b,0,c))<_)for(i.dlShiftTo(b,y),e.subTo(y,e);e[v]<--_;)e.subTo(y,e)}null!=t&&(e.drShiftTo(c,t),o!=a&&l.ZERO.subTo(t,t)),e.t=c,e.clamp(),s>0&&e.rShiftTo(s,e),o<0&&l.ZERO.subTo(e,e)}}},r.invDigit=function(){if(this.t<1)return 0;var n=this[0];if(0==(1&n))return 0;var t=3&n;return(t=(t=(t=(t=t*(2-(15&n)*t)&15)*(2-(255&n)*t)&255)*(2-((65535&n)*t&65535))&65535)*(2-n*t%this.DV)%this.DV)>0?this.DV-t:-t},r.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)},r.exp=function(n,t){if(n>4294967295||n<1)return l.ONE;var e=new l,r=new l,u=t.convert(this),i=h(n)-1;for(u.copyTo(e);--i>=0;)if(t.sqrTo(e,r),(n&1<0)t.mulTo(r,u,e);else{var o=e;e=r,r=o}return t.revert(e)},r.toString=function(n){var t;if(this.s<0)return"-"+this.negate().toString(n);if(16==n)t=4;else if(8==n)t=3;else if(2==n)t=1;else if(32==n)t=5;else{if(4!=n)return this.toRadix(n);t=2}var e,l=(1<0)for(o>o)>0&&(r=!0,u=c(e));i>=0;)o>(o+=this.DB-t)):(e=this[i]>>(o-=t)&l,o<=0&&(o+=this.DB,--i)),e>0&&(r=!0),r&&(u+=c(e));return r?u:"0"},r.negate=function(){var n=new l;return l.ZERO.subTo(this,n),n},r.abs=function(){return this.s<0?this.negate():this},r.compareTo=function(n){var t=this.s-n.s;if(0!=t)return t;var e=this.t;if(0!=(t=e-n.t))return this.s<0?-t:t;for(;--e>=0;)if(0!=(t=this[e]-n[e]))return t;return 0},r.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+h(this[this.t-1]^this.s&this.DM)},r.byteLength=function(){return this.bitLength()>>3},r.mod=function(n){var t=new l;return this.abs().divRemTo(n,null,t),this.s<0&&t.compareTo(l.ZERO)>0&&n.subTo(t,t),t},r.modPowInt=function(n,t){var e;return e=n<256||t.isEven()?new p(t):new m(t),this.exp(n,e)},E.prototype.convert=C,E.prototype.revert=C,E.prototype.mulTo=function(n,t,e){n.multiplyTo(t,e)},E.prototype.sqrTo=function(n,t){n.squareTo(t)},A.prototype.convert=function(n){if(n.s<0||n.t>2*this.m.t)return n.mod(this.m);if(n.compareTo(this.m)<0)return n;var t=new l;return n.copyTo(t),this.reduce(t),t},A.prototype.revert=function(n){return n},A.prototype.reduce=function(n){for(n.drShiftTo(this.m.t-1,this.r2),n.t>this.m.t+1&&(n.t=this.m.t+1,n.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);n.compareTo(this.r2)<0;)n.dAddOffset(1,this.m.t+1);for(n.subTo(this.r2,n);n.compareTo(this.m)>=0;)n.subTo(this.m,n)},A.prototype.mulTo=function(n,t,e){n.multiplyTo(t,e),this.reduce(e)},A.prototype.sqrTo=function(n,t){n.squareTo(t),this.reduce(t)};var x=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],k=(1<<26)/x[x.length-1];r.chunkSize=function(n){return Math.floor(Math.LN2*this.DB/Math.log(n))},r.toRadix=function(n){if(null==n&&(n=10),0==this.signum()||n<2||n>36)return"0";var t=this.chunkSize(n),e=Math.pow(n,t),r=d(e),u=new l,i=new l,o="";for(this.divRemTo(r,u,i);u.signum()>0;)o=(e+i.intValue()).toString(n).substr(1)+o,u.divRemTo(r,u,i);return i.intValue().toString(n)+o},r.fromRadix=function(n,t){this.fromInt(0),null==t&&(t=10);for(var e=this.chunkSize(t),r=Math.pow(t,e),u=!1,i=0,o=0,a=0;a=e&&(this.dMultiply(r),this.dAddOffset(o,0),i=0,o=0))}i>0&&(this.dMultiply(Math.pow(t,i)),this.dAddOffset(o,0)),u&&l.ZERO.subTo(this,this)},r.fromNumber=function(n,t,e){if("number"==typeof t)if(n<2)this.fromInt(1);else for(this.fromNumber(n,e),this.testBit(n-1)||this.bitwiseTo(l.ONE.shiftLeft(n-1),v,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(t);)this.dAddOffset(2,0),this.bitLength()>n&&this.subTo(l.ONE.shiftLeft(n-1),this);else{var r=new Array,u=7&n;r.length=1+(n>>3),t.nextBytes(r),u>0?r[0]&=(1<>=this.DB;if(n.t>=this.DB;l+=this.s}else{for(l+=this.s;e>=this.DB;l+=n.s}t.s=l<0?-1:0,l>0?t[e++]=l:l<-1&&(t[e++]=this.DV+l),t.t=e,t.clamp()},r.dMultiply=function(n){this[this.t]=this.am(0,n-1,this,0,0,this.t),++this.t,this.clamp()},r.dAddOffset=function(n,t){if(0!=n){for(;this.t<=t;)this[this.t++]=0;for(this[t]+=n;this[t]>=this.DV;)this[t]-=this.DV,++t>=this.t&&(this[this.t++]=0),++this[t]}},r.multiplyLowerTo=function(n,t,e){var l,r=Math.min(this.t+n.t,t);for(e.s=0,e.t=r;r>0;)e[--r]=0;for(l=e.t-this.t;r=0;)e[l]=0;for(l=Math.max(t-this.t,0);l0)if(0==t)e=this[0]%n;else for(var l=this.t-1;l>=0;--l)e=(t*e+this[l])%n;return e},r.millerRabin=function(n){var t=this.subtract(l.ONE),e=t.getLowestSetBit();if(e<=0)return!1;var r=t.shiftRight(e);(n=n+1>>1)>x.length&&(n=x.length);for(var u=new l(null),i=[],o=0;o>24},r.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},r.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},r.toByteArray=function(){var n=this.t,t=new Array;t[0]=this.s;var e,l=this.DB-n*this.DB%8,r=0;if(n-- >0)for(l>l)!=(this.s&this.DM)>>l&&(t[r++]=e|this.s<=0;)l<8?(e=(this[n]&(1<>(l+=this.DB-8)):(e=this[n]>>(l-=8)&255,l<=0&&(l+=this.DB,--n)),0!=(128&e)&&(e|=-256),0===r&&(128&this.s)!=(128&e)&&++r,(r>0||e!=this.s)&&(t[r++]=e);return t},r.equals=function(n){return 0==this.compareTo(n)},r.min=function(n){return this.compareTo(n)<0?this:n},r.max=function(n){return this.compareTo(n)>0?this:n},r.and=function(n){var t=new l;return this.bitwiseTo(n,g,t),t},r.or=function(n){var t=new l;return this.bitwiseTo(n,v,t),t},r.xor=function(n){var t=new l;return this.bitwiseTo(n,b,t),t},r.andNot=function(n){var t=new l;return this.bitwiseTo(n,y,t),t},r.not=function(){for(var n=new l,t=0;t=this.t?0!=this.s:0!=(this[t]&1<1){var f=new l;for(r.sqrTo(o[1],f);a<=c;)o[a]=new l,r.mulTo(f,o[a-2],o[a]),a+=2}var g,v,b=n.t-1,y=!0,_=new l;for(u=h(n[b])-1;b>=0;){for(u>=s?g=n[b]>>u-s&c:(g=(n[b]&(1<0&&(g|=n[b-1]>>this.DB+u-s)),a=e;0==(1&g);)g>>=1,--a;if((u-=a)<0&&(u+=this.DB,--b),y)o[g].copyTo(i),y=!1;else{for(;a>1;)r.sqrTo(i,_),r.sqrTo(_,i),a-=2;a>0?r.sqrTo(i,_):(v=i,i=_,_=v),r.mulTo(_,o[g],i)}for(;b>=0&&0==(n[b]&1<=0?(e.subTo(r,e),t&&u.subTo(o,u),i.subTo(a,i)):(r.subTo(e,r),t&&o.subTo(u,o),a.subTo(i,a))}if(0!=r.compareTo(l.ONE))return l.ZERO;for(;a.compareTo(n)>=0;)a.subTo(n,a);for(;a.signum()<0;)a.addTo(n,a);return a},r.pow=function(n){return this.exp(n,new E)},r.gcd=function(n){var t=this.s<0?this.negate():this.clone(),e=n.s<0?n.negate():n.clone();if(t.compareTo(e)<0){var l=t;t=e,e=l}var r=t.getLowestSetBit(),u=e.getLowestSetBit();if(u<0)return t;for(r0&&(t.rShiftTo(u,t),e.rShiftTo(u,e));t.signum()>0;)(r=t.getLowestSetBit())>0&&t.rShiftTo(r,t),(r=e.getLowestSetBit())>0&&e.rShiftTo(r,e),t.compareTo(e)>=0?(t.subTo(e,t),t.rShiftTo(1,t)):(e.subTo(t,e),e.rShiftTo(1,e));return u>0&&e.lShiftTo(u,e),e},r.isProbablePrime=function(n){var t,e=this.abs();if(1==e.t&&e[0]<=x[x.length-1]){for(t=0;t=49&&i<=54?i-49+10:i>=17&&i<=22?i-17+10:15&i}return l}function a(n,t,e,l){for(var r=0,u=Math.min(n.length,e),i=t;i=49?o-49+10:o>=17?o-17+10:o}return r}u.isBN=function(n){return n instanceof u||null!==n&&"object"==typeof n&&n.constructor.wordSize===u.wordSize&&Array.isArray(n.words)},u.max=function(n,t){return n.cmp(t)>0?n:t},u.min=function(n,t){return n.cmp(t)<0?n:t},u.prototype._init=function(n,t,e){if("number"==typeof n)return this._initNumber(n,t,e);if("object"==typeof n)return this._initArray(n,t,e);"hex"===t&&(t=16),l(t===(0|t)&&t>=2&&t<=36);var r=0;"-"===(n=n.toString().replace(/\s+/g,""))[0]&&r++,16===t?this._parseHex(n,r):this._parseBase(n,t,r),"-"===n[0]&&(this.negative=1),this.strip(),"le"===e&&this._initArray(this.toArray(),t,e)},u.prototype._initNumber=function(n,t,e){n<0&&(this.negative=1,n=-n),n<67108864?(this.words=[67108863&n],this.length=1):n<4503599627370496?(this.words=[67108863&n,n/67108864&67108863],this.length=2):(l(n<9007199254740992),this.words=[67108863&n,n/67108864&67108863,1],this.length=3),"le"===e&&this._initArray(this.toArray(),t,e)},u.prototype._initArray=function(n,t,e){if(l("number"==typeof n.length),n.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(n.length/3),this.words=new Array(this.length);for(var r=0;r=0;r-=3)this.words[u]|=(i=n[r]|n[r-1]<<8|n[r-2]<<16)<>>26-o&67108863,(o+=24)>=26&&(o-=26,u++);else if("le"===e)for(r=0,u=0;r>>26-o&67108863,(o+=24)>=26&&(o-=26,u++);return this.strip()},u.prototype._parseHex=function(n,t){this.length=Math.ceil((n.length-t)/6),this.words=new Array(this.length);for(var e=0;e=t;e-=6)r=o(n,e,e+6),this.words[l]|=r<>>26-u&4194303,(u+=24)>=26&&(u-=26,l++);e+6!==t&&(r=o(n,t,e+6),this.words[l]|=r<>>26-u&4194303),this.strip()},u.prototype._parseBase=function(n,t,e){this.words=[0],this.length=1;for(var l=0,r=1;r<=67108863;r*=t)l++;r=r/t|0;for(var u=n.length-e,i=u%--l,o=Math.min(u,u-i)+e,s=0,c=e;c1&&0===this.words[this.length-1];)this.length--;return this._normSign()},u.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},u.prototype.inspect=function(){return(this.red?""};var s=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],c=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function d(n,t,e){e.negative=t.negative^n.negative;var l=n.length+t.length|0;e.length=l,l=l-1|0;var r=0|n.words[0],u=0|t.words[0],i=r*u,o=i/67108864|0;e.words[0]=67108863&i;for(var a=1;a>>26,c=67108863&o,f=Math.min(a,t.length-1),d=Math.max(0,a-n.length+1);d<=f;d++)s+=(i=(r=0|n.words[a-d|0])*(u=0|t.words[d])+c)/67108864|0,c=67108863&i;e.words[a]=0|c,o=0|s}return 0!==o?e.words[a]=0|o:e.length--,e.strip()}u.prototype.toString=function(n,t){var e;if(n=n||10,t=0|t||1,16===n||"hex"===n){e="";for(var r=0,u=0,i=0;i>>24-r&16777215)||i!==this.length-1?s[6-a.length]+a+e:a+e,(r+=2)>=26&&(r-=26,i--)}for(0!==u&&(e=u.toString(16)+e);e.length%t!=0;)e="0"+e;return 0!==this.negative&&(e="-"+e),e}if(n===(0|n)&&n>=2&&n<=36){var d=c[n],h=f[n];e="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(h).toString(n);e=(p=p.idivn(h)).isZero()?m+e:s[d-m.length]+m+e}for(this.isZero()&&(e="0"+e);e.length%t!=0;)e="0"+e;return 0!==this.negative&&(e="-"+e),e}l(!1,"Base should be between 2 and 36")},u.prototype.toNumber=function(){var n=this.words[0];return 2===this.length?n+=67108864*this.words[1]:3===this.length&&1===this.words[2]?n+=4503599627370496+67108864*this.words[1]:this.length>2&&l(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-n:n},u.prototype.toJSON=function(){return this.toString(16)},u.prototype.toBuffer=function(n,t){return l(void 0!==i),this.toArrayLike(i,n,t)},u.prototype.toArray=function(n,t){return this.toArrayLike(Array,n,t)},u.prototype.toArrayLike=function(n,t,e){var r=this.byteLength(),u=e||Math.max(1,r);l(r<=u,"byte array longer than desired length"),l(u>0,"Requested array length <= 0"),this.strip();var i,o,a="le"===t,s=new n(u),c=this.clone();if(a){for(o=0;!c.isZero();o++)i=c.andln(255),c.iushrn(8),s[o]=i;for(;o=4096&&(e+=13,t>>>=13),t>=64&&(e+=7,t>>>=7),t>=8&&(e+=4,t>>>=4),t>=2&&(e+=2,t>>>=2),e+t},u.prototype._zeroBits=function(n){if(0===n)return 26;var t=n,e=0;return 0==(8191&t)&&(e+=13,t>>>=13),0==(127&t)&&(e+=7,t>>>=7),0==(15&t)&&(e+=4,t>>>=4),0==(3&t)&&(e+=2,t>>>=2),0==(1&t)&&e++,e},u.prototype.bitLength=function(){var n=this._countBits(this.words[this.length-1]);return 26*(this.length-1)+n},u.prototype.zeroBits=function(){if(this.isZero())return 0;for(var n=0,t=0;tn.length?this.clone().ior(n):n.clone().ior(this)},u.prototype.uor=function(n){return this.length>n.length?this.clone().iuor(n):n.clone().iuor(this)},u.prototype.iuand=function(n){var t;t=this.length>n.length?n:this;for(var e=0;en.length?this.clone().iand(n):n.clone().iand(this)},u.prototype.uand=function(n){return this.length>n.length?this.clone().iuand(n):n.clone().iuand(this)},u.prototype.iuxor=function(n){var t,e;this.length>n.length?(t=this,e=n):(t=n,e=this);for(var l=0;ln.length?this.clone().ixor(n):n.clone().ixor(this)},u.prototype.uxor=function(n){return this.length>n.length?this.clone().iuxor(n):n.clone().iuxor(this)},u.prototype.inotn=function(n){l("number"==typeof n&&n>=0);var t=0|Math.ceil(n/26),e=n%26;this._expand(t),e>0&&t--;for(var r=0;r0&&(this.words[r]=~this.words[r]&67108863>>26-e),this.strip()},u.prototype.notn=function(n){return this.clone().inotn(n)},u.prototype.setn=function(n,t){l("number"==typeof n&&n>=0);var e=n/26|0,r=n%26;return this._expand(e+1),this.words[e]=t?this.words[e]|1<n.length?(e=this,l=n):(e=n,l=this);for(var r=0,u=0;u>>26;for(;0!==r&&u>>26;if(this.length=e.length,0!==r)this.words[this.length]=r,this.length++;else if(e!==this)for(;un.length?this.clone().iadd(n):n.clone().iadd(this)},u.prototype.isub=function(n){if(0!==n.negative){n.negative=0;var t=this.iadd(n);return n.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(n),this.negative=1,this._normSign();var e,l,r=this.cmp(n);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;r>0?(e=this,l=n):(e=n,l=this);for(var u=0,i=0;i>26,this.words[i]=67108863&t;for(;0!==u&&i>26,this.words[i]=67108863&t;if(0===u&&i>>13,h=0|i[1],p=8191&h,m=h>>>13,g=0|i[2],v=8191&g,b=g>>>13,y=0|i[3],_=8191&y,w=y>>>13,E=0|i[4],C=8191&E,A=E>>>13,x=0|i[5],k=8191&x,F=x>>>13,S=0|i[6],B=8191&S,D=S>>>13,I=0|i[7],M=8191&I,T=I>>>13,O=0|i[8],R=8191&O,N=O>>>13,j=0|i[9],P=8191&j,L=j>>>13,q=0|o[0],U=8191&q,V=q>>>13,z=0|o[1],H=8191&z,G=z>>>13,Z=0|o[2],K=8191&Z,$=Z>>>13,W=0|o[3],Y=8191&W,X=W>>>13,J=0|o[4],Q=8191&J,nn=J>>>13,tn=0|o[5],en=8191&tn,ln=tn>>>13,rn=0|o[6],un=8191&rn,on=rn>>>13,an=0|o[7],sn=8191&an,cn=an>>>13,fn=0|o[8],dn=8191&fn,hn=fn>>>13,pn=0|o[9],mn=8191&pn,gn=pn>>>13;e.negative=n.negative^t.negative,e.length=19;var vn=(s+(l=Math.imul(f,U))|0)+((8191&(r=(r=Math.imul(f,V))+Math.imul(d,U)|0))<<13)|0;s=((u=Math.imul(d,V))+(r>>>13)|0)+(vn>>>26)|0,vn&=67108863,l=Math.imul(p,U),r=(r=Math.imul(p,V))+Math.imul(m,U)|0,u=Math.imul(m,V);var bn=(s+(l=l+Math.imul(f,H)|0)|0)+((8191&(r=(r=r+Math.imul(f,G)|0)+Math.imul(d,H)|0))<<13)|0;s=((u=u+Math.imul(d,G)|0)+(r>>>13)|0)+(bn>>>26)|0,bn&=67108863,l=Math.imul(v,U),r=(r=Math.imul(v,V))+Math.imul(b,U)|0,u=Math.imul(b,V),l=l+Math.imul(p,H)|0,r=(r=r+Math.imul(p,G)|0)+Math.imul(m,H)|0,u=u+Math.imul(m,G)|0;var yn=(s+(l=l+Math.imul(f,K)|0)|0)+((8191&(r=(r=r+Math.imul(f,$)|0)+Math.imul(d,K)|0))<<13)|0;s=((u=u+Math.imul(d,$)|0)+(r>>>13)|0)+(yn>>>26)|0,yn&=67108863,l=Math.imul(_,U),r=(r=Math.imul(_,V))+Math.imul(w,U)|0,u=Math.imul(w,V),l=l+Math.imul(v,H)|0,r=(r=r+Math.imul(v,G)|0)+Math.imul(b,H)|0,u=u+Math.imul(b,G)|0,l=l+Math.imul(p,K)|0,r=(r=r+Math.imul(p,$)|0)+Math.imul(m,K)|0,u=u+Math.imul(m,$)|0;var _n=(s+(l=l+Math.imul(f,Y)|0)|0)+((8191&(r=(r=r+Math.imul(f,X)|0)+Math.imul(d,Y)|0))<<13)|0;s=((u=u+Math.imul(d,X)|0)+(r>>>13)|0)+(_n>>>26)|0,_n&=67108863,l=Math.imul(C,U),r=(r=Math.imul(C,V))+Math.imul(A,U)|0,u=Math.imul(A,V),l=l+Math.imul(_,H)|0,r=(r=r+Math.imul(_,G)|0)+Math.imul(w,H)|0,u=u+Math.imul(w,G)|0,l=l+Math.imul(v,K)|0,r=(r=r+Math.imul(v,$)|0)+Math.imul(b,K)|0,u=u+Math.imul(b,$)|0,l=l+Math.imul(p,Y)|0,r=(r=r+Math.imul(p,X)|0)+Math.imul(m,Y)|0,u=u+Math.imul(m,X)|0;var wn=(s+(l=l+Math.imul(f,Q)|0)|0)+((8191&(r=(r=r+Math.imul(f,nn)|0)+Math.imul(d,Q)|0))<<13)|0;s=((u=u+Math.imul(d,nn)|0)+(r>>>13)|0)+(wn>>>26)|0,wn&=67108863,l=Math.imul(k,U),r=(r=Math.imul(k,V))+Math.imul(F,U)|0,u=Math.imul(F,V),l=l+Math.imul(C,H)|0,r=(r=r+Math.imul(C,G)|0)+Math.imul(A,H)|0,u=u+Math.imul(A,G)|0,l=l+Math.imul(_,K)|0,r=(r=r+Math.imul(_,$)|0)+Math.imul(w,K)|0,u=u+Math.imul(w,$)|0,l=l+Math.imul(v,Y)|0,r=(r=r+Math.imul(v,X)|0)+Math.imul(b,Y)|0,u=u+Math.imul(b,X)|0,l=l+Math.imul(p,Q)|0,r=(r=r+Math.imul(p,nn)|0)+Math.imul(m,Q)|0,u=u+Math.imul(m,nn)|0;var En=(s+(l=l+Math.imul(f,en)|0)|0)+((8191&(r=(r=r+Math.imul(f,ln)|0)+Math.imul(d,en)|0))<<13)|0;s=((u=u+Math.imul(d,ln)|0)+(r>>>13)|0)+(En>>>26)|0,En&=67108863,l=Math.imul(B,U),r=(r=Math.imul(B,V))+Math.imul(D,U)|0,u=Math.imul(D,V),l=l+Math.imul(k,H)|0,r=(r=r+Math.imul(k,G)|0)+Math.imul(F,H)|0,u=u+Math.imul(F,G)|0,l=l+Math.imul(C,K)|0,r=(r=r+Math.imul(C,$)|0)+Math.imul(A,K)|0,u=u+Math.imul(A,$)|0,l=l+Math.imul(_,Y)|0,r=(r=r+Math.imul(_,X)|0)+Math.imul(w,Y)|0,u=u+Math.imul(w,X)|0,l=l+Math.imul(v,Q)|0,r=(r=r+Math.imul(v,nn)|0)+Math.imul(b,Q)|0,u=u+Math.imul(b,nn)|0,l=l+Math.imul(p,en)|0,r=(r=r+Math.imul(p,ln)|0)+Math.imul(m,en)|0,u=u+Math.imul(m,ln)|0;var Cn=(s+(l=l+Math.imul(f,un)|0)|0)+((8191&(r=(r=r+Math.imul(f,on)|0)+Math.imul(d,un)|0))<<13)|0;s=((u=u+Math.imul(d,on)|0)+(r>>>13)|0)+(Cn>>>26)|0,Cn&=67108863,l=Math.imul(M,U),r=(r=Math.imul(M,V))+Math.imul(T,U)|0,u=Math.imul(T,V),l=l+Math.imul(B,H)|0,r=(r=r+Math.imul(B,G)|0)+Math.imul(D,H)|0,u=u+Math.imul(D,G)|0,l=l+Math.imul(k,K)|0,r=(r=r+Math.imul(k,$)|0)+Math.imul(F,K)|0,u=u+Math.imul(F,$)|0,l=l+Math.imul(C,Y)|0,r=(r=r+Math.imul(C,X)|0)+Math.imul(A,Y)|0,u=u+Math.imul(A,X)|0,l=l+Math.imul(_,Q)|0,r=(r=r+Math.imul(_,nn)|0)+Math.imul(w,Q)|0,u=u+Math.imul(w,nn)|0,l=l+Math.imul(v,en)|0,r=(r=r+Math.imul(v,ln)|0)+Math.imul(b,en)|0,u=u+Math.imul(b,ln)|0,l=l+Math.imul(p,un)|0,r=(r=r+Math.imul(p,on)|0)+Math.imul(m,un)|0,u=u+Math.imul(m,on)|0;var An=(s+(l=l+Math.imul(f,sn)|0)|0)+((8191&(r=(r=r+Math.imul(f,cn)|0)+Math.imul(d,sn)|0))<<13)|0;s=((u=u+Math.imul(d,cn)|0)+(r>>>13)|0)+(An>>>26)|0,An&=67108863,l=Math.imul(R,U),r=(r=Math.imul(R,V))+Math.imul(N,U)|0,u=Math.imul(N,V),l=l+Math.imul(M,H)|0,r=(r=r+Math.imul(M,G)|0)+Math.imul(T,H)|0,u=u+Math.imul(T,G)|0,l=l+Math.imul(B,K)|0,r=(r=r+Math.imul(B,$)|0)+Math.imul(D,K)|0,u=u+Math.imul(D,$)|0,l=l+Math.imul(k,Y)|0,r=(r=r+Math.imul(k,X)|0)+Math.imul(F,Y)|0,u=u+Math.imul(F,X)|0,l=l+Math.imul(C,Q)|0,r=(r=r+Math.imul(C,nn)|0)+Math.imul(A,Q)|0,u=u+Math.imul(A,nn)|0,l=l+Math.imul(_,en)|0,r=(r=r+Math.imul(_,ln)|0)+Math.imul(w,en)|0,u=u+Math.imul(w,ln)|0,l=l+Math.imul(v,un)|0,r=(r=r+Math.imul(v,on)|0)+Math.imul(b,un)|0,u=u+Math.imul(b,on)|0,l=l+Math.imul(p,sn)|0,r=(r=r+Math.imul(p,cn)|0)+Math.imul(m,sn)|0,u=u+Math.imul(m,cn)|0;var xn=(s+(l=l+Math.imul(f,dn)|0)|0)+((8191&(r=(r=r+Math.imul(f,hn)|0)+Math.imul(d,dn)|0))<<13)|0;s=((u=u+Math.imul(d,hn)|0)+(r>>>13)|0)+(xn>>>26)|0,xn&=67108863,l=Math.imul(P,U),r=(r=Math.imul(P,V))+Math.imul(L,U)|0,u=Math.imul(L,V),l=l+Math.imul(R,H)|0,r=(r=r+Math.imul(R,G)|0)+Math.imul(N,H)|0,u=u+Math.imul(N,G)|0,l=l+Math.imul(M,K)|0,r=(r=r+Math.imul(M,$)|0)+Math.imul(T,K)|0,u=u+Math.imul(T,$)|0,l=l+Math.imul(B,Y)|0,r=(r=r+Math.imul(B,X)|0)+Math.imul(D,Y)|0,u=u+Math.imul(D,X)|0,l=l+Math.imul(k,Q)|0,r=(r=r+Math.imul(k,nn)|0)+Math.imul(F,Q)|0,u=u+Math.imul(F,nn)|0,l=l+Math.imul(C,en)|0,r=(r=r+Math.imul(C,ln)|0)+Math.imul(A,en)|0,u=u+Math.imul(A,ln)|0,l=l+Math.imul(_,un)|0,r=(r=r+Math.imul(_,on)|0)+Math.imul(w,un)|0,u=u+Math.imul(w,on)|0,l=l+Math.imul(v,sn)|0,r=(r=r+Math.imul(v,cn)|0)+Math.imul(b,sn)|0,u=u+Math.imul(b,cn)|0,l=l+Math.imul(p,dn)|0,r=(r=r+Math.imul(p,hn)|0)+Math.imul(m,dn)|0,u=u+Math.imul(m,hn)|0;var kn=(s+(l=l+Math.imul(f,mn)|0)|0)+((8191&(r=(r=r+Math.imul(f,gn)|0)+Math.imul(d,mn)|0))<<13)|0;s=((u=u+Math.imul(d,gn)|0)+(r>>>13)|0)+(kn>>>26)|0,kn&=67108863,l=Math.imul(P,H),r=(r=Math.imul(P,G))+Math.imul(L,H)|0,u=Math.imul(L,G),l=l+Math.imul(R,K)|0,r=(r=r+Math.imul(R,$)|0)+Math.imul(N,K)|0,u=u+Math.imul(N,$)|0,l=l+Math.imul(M,Y)|0,r=(r=r+Math.imul(M,X)|0)+Math.imul(T,Y)|0,u=u+Math.imul(T,X)|0,l=l+Math.imul(B,Q)|0,r=(r=r+Math.imul(B,nn)|0)+Math.imul(D,Q)|0,u=u+Math.imul(D,nn)|0,l=l+Math.imul(k,en)|0,r=(r=r+Math.imul(k,ln)|0)+Math.imul(F,en)|0,u=u+Math.imul(F,ln)|0,l=l+Math.imul(C,un)|0,r=(r=r+Math.imul(C,on)|0)+Math.imul(A,un)|0,u=u+Math.imul(A,on)|0,l=l+Math.imul(_,sn)|0,r=(r=r+Math.imul(_,cn)|0)+Math.imul(w,sn)|0,u=u+Math.imul(w,cn)|0,l=l+Math.imul(v,dn)|0,r=(r=r+Math.imul(v,hn)|0)+Math.imul(b,dn)|0,u=u+Math.imul(b,hn)|0;var Fn=(s+(l=l+Math.imul(p,mn)|0)|0)+((8191&(r=(r=r+Math.imul(p,gn)|0)+Math.imul(m,mn)|0))<<13)|0;s=((u=u+Math.imul(m,gn)|0)+(r>>>13)|0)+(Fn>>>26)|0,Fn&=67108863,l=Math.imul(P,K),r=(r=Math.imul(P,$))+Math.imul(L,K)|0,u=Math.imul(L,$),l=l+Math.imul(R,Y)|0,r=(r=r+Math.imul(R,X)|0)+Math.imul(N,Y)|0,u=u+Math.imul(N,X)|0,l=l+Math.imul(M,Q)|0,r=(r=r+Math.imul(M,nn)|0)+Math.imul(T,Q)|0,u=u+Math.imul(T,nn)|0,l=l+Math.imul(B,en)|0,r=(r=r+Math.imul(B,ln)|0)+Math.imul(D,en)|0,u=u+Math.imul(D,ln)|0,l=l+Math.imul(k,un)|0,r=(r=r+Math.imul(k,on)|0)+Math.imul(F,un)|0,u=u+Math.imul(F,on)|0,l=l+Math.imul(C,sn)|0,r=(r=r+Math.imul(C,cn)|0)+Math.imul(A,sn)|0,u=u+Math.imul(A,cn)|0,l=l+Math.imul(_,dn)|0,r=(r=r+Math.imul(_,hn)|0)+Math.imul(w,dn)|0,u=u+Math.imul(w,hn)|0;var Sn=(s+(l=l+Math.imul(v,mn)|0)|0)+((8191&(r=(r=r+Math.imul(v,gn)|0)+Math.imul(b,mn)|0))<<13)|0;s=((u=u+Math.imul(b,gn)|0)+(r>>>13)|0)+(Sn>>>26)|0,Sn&=67108863,l=Math.imul(P,Y),r=(r=Math.imul(P,X))+Math.imul(L,Y)|0,u=Math.imul(L,X),l=l+Math.imul(R,Q)|0,r=(r=r+Math.imul(R,nn)|0)+Math.imul(N,Q)|0,u=u+Math.imul(N,nn)|0,l=l+Math.imul(M,en)|0,r=(r=r+Math.imul(M,ln)|0)+Math.imul(T,en)|0,u=u+Math.imul(T,ln)|0,l=l+Math.imul(B,un)|0,r=(r=r+Math.imul(B,on)|0)+Math.imul(D,un)|0,u=u+Math.imul(D,on)|0,l=l+Math.imul(k,sn)|0,r=(r=r+Math.imul(k,cn)|0)+Math.imul(F,sn)|0,u=u+Math.imul(F,cn)|0,l=l+Math.imul(C,dn)|0,r=(r=r+Math.imul(C,hn)|0)+Math.imul(A,dn)|0,u=u+Math.imul(A,hn)|0;var Bn=(s+(l=l+Math.imul(_,mn)|0)|0)+((8191&(r=(r=r+Math.imul(_,gn)|0)+Math.imul(w,mn)|0))<<13)|0;s=((u=u+Math.imul(w,gn)|0)+(r>>>13)|0)+(Bn>>>26)|0,Bn&=67108863,l=Math.imul(P,Q),r=(r=Math.imul(P,nn))+Math.imul(L,Q)|0,u=Math.imul(L,nn),l=l+Math.imul(R,en)|0,r=(r=r+Math.imul(R,ln)|0)+Math.imul(N,en)|0,u=u+Math.imul(N,ln)|0,l=l+Math.imul(M,un)|0,r=(r=r+Math.imul(M,on)|0)+Math.imul(T,un)|0,u=u+Math.imul(T,on)|0,l=l+Math.imul(B,sn)|0,r=(r=r+Math.imul(B,cn)|0)+Math.imul(D,sn)|0,u=u+Math.imul(D,cn)|0,l=l+Math.imul(k,dn)|0,r=(r=r+Math.imul(k,hn)|0)+Math.imul(F,dn)|0,u=u+Math.imul(F,hn)|0;var Dn=(s+(l=l+Math.imul(C,mn)|0)|0)+((8191&(r=(r=r+Math.imul(C,gn)|0)+Math.imul(A,mn)|0))<<13)|0;s=((u=u+Math.imul(A,gn)|0)+(r>>>13)|0)+(Dn>>>26)|0,Dn&=67108863,l=Math.imul(P,en),r=(r=Math.imul(P,ln))+Math.imul(L,en)|0,u=Math.imul(L,ln),l=l+Math.imul(R,un)|0,r=(r=r+Math.imul(R,on)|0)+Math.imul(N,un)|0,u=u+Math.imul(N,on)|0,l=l+Math.imul(M,sn)|0,r=(r=r+Math.imul(M,cn)|0)+Math.imul(T,sn)|0,u=u+Math.imul(T,cn)|0,l=l+Math.imul(B,dn)|0,r=(r=r+Math.imul(B,hn)|0)+Math.imul(D,dn)|0,u=u+Math.imul(D,hn)|0;var In=(s+(l=l+Math.imul(k,mn)|0)|0)+((8191&(r=(r=r+Math.imul(k,gn)|0)+Math.imul(F,mn)|0))<<13)|0;s=((u=u+Math.imul(F,gn)|0)+(r>>>13)|0)+(In>>>26)|0,In&=67108863,l=Math.imul(P,un),r=(r=Math.imul(P,on))+Math.imul(L,un)|0,u=Math.imul(L,on),l=l+Math.imul(R,sn)|0,r=(r=r+Math.imul(R,cn)|0)+Math.imul(N,sn)|0,u=u+Math.imul(N,cn)|0,l=l+Math.imul(M,dn)|0,r=(r=r+Math.imul(M,hn)|0)+Math.imul(T,dn)|0,u=u+Math.imul(T,hn)|0;var Mn=(s+(l=l+Math.imul(B,mn)|0)|0)+((8191&(r=(r=r+Math.imul(B,gn)|0)+Math.imul(D,mn)|0))<<13)|0;s=((u=u+Math.imul(D,gn)|0)+(r>>>13)|0)+(Mn>>>26)|0,Mn&=67108863,l=Math.imul(P,sn),r=(r=Math.imul(P,cn))+Math.imul(L,sn)|0,u=Math.imul(L,cn),l=l+Math.imul(R,dn)|0,r=(r=r+Math.imul(R,hn)|0)+Math.imul(N,dn)|0,u=u+Math.imul(N,hn)|0;var Tn=(s+(l=l+Math.imul(M,mn)|0)|0)+((8191&(r=(r=r+Math.imul(M,gn)|0)+Math.imul(T,mn)|0))<<13)|0;s=((u=u+Math.imul(T,gn)|0)+(r>>>13)|0)+(Tn>>>26)|0,Tn&=67108863,l=Math.imul(P,dn),r=(r=Math.imul(P,hn))+Math.imul(L,dn)|0,u=Math.imul(L,hn);var On=(s+(l=l+Math.imul(R,mn)|0)|0)+((8191&(r=(r=r+Math.imul(R,gn)|0)+Math.imul(N,mn)|0))<<13)|0;s=((u=u+Math.imul(N,gn)|0)+(r>>>13)|0)+(On>>>26)|0,On&=67108863;var Rn=(s+(l=Math.imul(P,mn))|0)+((8191&(r=(r=Math.imul(P,gn))+Math.imul(L,mn)|0))<<13)|0;return s=((u=Math.imul(L,gn))+(r>>>13)|0)+(Rn>>>26)|0,Rn&=67108863,a[0]=vn,a[1]=bn,a[2]=yn,a[3]=_n,a[4]=wn,a[5]=En,a[6]=Cn,a[7]=An,a[8]=xn,a[9]=kn,a[10]=Fn,a[11]=Sn,a[12]=Bn,a[13]=Dn,a[14]=In,a[15]=Mn,a[16]=Tn,a[17]=On,a[18]=Rn,0!==s&&(a[19]=s,e.length++),e};function p(n,t,e){return(new m).mulp(n,t,e)}function m(n,t){this.x=n,this.y=t}Math.imul||(h=d),u.prototype.mulTo=function(n,t){var e=this.length+n.length;return 10===this.length&&10===n.length?h(this,n,t):e<63?d(this,n,t):e<1024?function(n,t,e){e.negative=t.negative^n.negative,e.length=n.length+t.length;for(var l=0,r=0,u=0;u>>26)|0)>>>26,i&=67108863}e.words[u]=o,l=i,i=r}return 0!==l?e.words[u]=l:e.length--,e.strip()}(this,n,t):p(this,n,t)},m.prototype.makeRBT=function(n){for(var t=new Array(n),e=u.prototype._countBits(n)-1,l=0;l>=1;return l},m.prototype.permute=function(n,t,e,l,r,u){for(var i=0;i>>=1)r++;return 1<>>=13),u>>>=13;for(i=2*t;i>=26,t+=r/67108864|0,t+=u>>>26,this.words[e]=67108863&u}return 0!==t&&(this.words[e]=t,this.length++),this},u.prototype.muln=function(n){return this.clone().imuln(n)},u.prototype.sqr=function(){return this.mul(this)},u.prototype.isqr=function(){return this.imul(this.clone())},u.prototype.pow=function(n){var t=function(n){for(var t=new Array(n.bitLength()),e=0;e>>l}return t}(n);if(0===t.length)return new u(1);for(var e=this,l=0;l=0);var t,e=n%26,r=(n-e)/26,u=67108863>>>26-e<<26-e;if(0!==e){var i=0;for(t=0;t>>26-e}i&&(this.words[t]=i,this.length++)}if(0!==r){for(t=this.length-1;t>=0;t--)this.words[t+r]=this.words[t];for(t=0;t=0),r=t?(t-t%26)/26:0;var u=n%26,i=Math.min((n-u)/26,this.length),o=67108863^67108863>>>u<i)for(this.length-=i,s=0;s=0&&(0!==c||s>=r);s--){var f=0|this.words[s];this.words[s]=c<<26-u|f>>>u,c=f&o}return a&&0!==c&&(a.words[a.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},u.prototype.ishrn=function(n,t,e){return l(0===this.negative),this.iushrn(n,t,e)},u.prototype.shln=function(n){return this.clone().ishln(n)},u.prototype.ushln=function(n){return this.clone().iushln(n)},u.prototype.shrn=function(n){return this.clone().ishrn(n)},u.prototype.ushrn=function(n){return this.clone().iushrn(n)},u.prototype.testn=function(n){l("number"==typeof n&&n>=0);var t=n%26,e=(n-t)/26;return!(this.length<=e||!(this.words[e]&1<=0);var t=n%26,e=(n-t)/26;return l(0===this.negative,"imaskn works only with positive numbers"),this.length<=e?this:(0!==t&&e++,this.length=Math.min(e,this.length),0!==t&&(this.words[this.length-1]&=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},u.prototype.isubn=function(n){if(l("number"==typeof n),l(n<67108864),n<0)return this.iaddn(-n);if(0!==this.negative)return this.negative=0,this.iaddn(n),this.negative=1,this;if(this.words[0]-=n,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(o/67108864|0),this.words[r+e]=67108863&u}for(;r>26,this.words[r+e]=67108863&u;if(0===i)return this.strip();for(l(-1===i),i=0,r=0;r>26,this.words[r]=67108863&u;return this.negative=1,this.strip()},u.prototype._wordDiv=function(n,t){var e,l=this.clone(),r=n,i=0|r.words[r.length-1];0!=(e=26-this._countBits(i))&&(r=r.ushln(e),l.iushln(e),i=0|r.words[r.length-1]);var o,a=l.length-r.length;if("mod"!==t){(o=new u(null)).length=a+1,o.words=new Array(o.length);for(var s=0;s=0;f--){var d=67108864*(0|l.words[r.length+f])+(0|l.words[r.length+f-1]);for(d=Math.min(d/i|0,67108863),l._ishlnsubmul(r,d,f);0!==l.negative;)d--,l.negative=0,l._ishlnsubmul(r,1,f),l.isZero()||(l.negative^=1);o&&(o.words[f]=d)}return o&&o.strip(),l.strip(),"div"!==t&&0!==e&&l.iushrn(e),{div:o||null,mod:l}},u.prototype.divmod=function(n,t,e){return l(!n.isZero()),this.isZero()?{div:new u(0),mod:new u(0)}:0!==this.negative&&0===n.negative?(o=this.neg().divmod(n,t),"mod"!==t&&(r=o.div.neg()),"div"!==t&&(i=o.mod.neg(),e&&0!==i.negative&&i.iadd(n)),{div:r,mod:i}):0===this.negative&&0!==n.negative?(o=this.divmod(n.neg(),t),"mod"!==t&&(r=o.div.neg()),{div:r,mod:o.mod}):0!=(this.negative&n.negative)?(o=this.neg().divmod(n.neg(),t),"div"!==t&&(i=o.mod.neg(),e&&0!==i.negative&&i.isub(n)),{div:o.div,mod:i}):n.length>this.length||this.cmp(n)<0?{div:new u(0),mod:this}:1===n.length?"div"===t?{div:this.divn(n.words[0]),mod:null}:"mod"===t?{div:null,mod:new u(this.modn(n.words[0]))}:{div:this.divn(n.words[0]),mod:new u(this.modn(n.words[0]))}:this._wordDiv(n,t);var r,i,o},u.prototype.div=function(n){return this.divmod(n,"div",!1).div},u.prototype.mod=function(n){return this.divmod(n,"mod",!1).mod},u.prototype.umod=function(n){return this.divmod(n,"mod",!0).mod},u.prototype.divRound=function(n){var t=this.divmod(n);if(t.mod.isZero())return t.div;var e=0!==t.div.negative?t.mod.isub(n):t.mod,l=n.ushrn(1),r=n.andln(1),u=e.cmp(l);return u<0||1===r&&0===u?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},u.prototype.modn=function(n){l(n<=67108863);for(var t=(1<<26)%n,e=0,r=this.length-1;r>=0;r--)e=(t*e+(0|this.words[r]))%n;return e},u.prototype.idivn=function(n){l(n<=67108863);for(var t=0,e=this.length-1;e>=0;e--){var r=(0|this.words[e])+67108864*t;this.words[e]=r/n|0,t=r%n}return this.strip()},u.prototype.divn=function(n){return this.clone().idivn(n)},u.prototype.egcd=function(n){l(0===n.negative),l(!n.isZero());var t=this,e=n.clone();t=0!==t.negative?t.umod(n):t.clone();for(var r=new u(1),i=new u(0),o=new u(0),a=new u(1),s=0;t.isEven()&&e.isEven();)t.iushrn(1),e.iushrn(1),++s;for(var c=e.clone(),f=t.clone();!t.isZero();){for(var d=0,h=1;0==(t.words[0]&h)&&d<26;++d,h<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(r.isOdd()||i.isOdd())&&(r.iadd(c),i.isub(f)),r.iushrn(1),i.iushrn(1);for(var p=0,m=1;0==(e.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(e.iushrn(p);p-- >0;)(o.isOdd()||a.isOdd())&&(o.iadd(c),a.isub(f)),o.iushrn(1),a.iushrn(1);t.cmp(e)>=0?(t.isub(e),r.isub(o),i.isub(a)):(e.isub(t),o.isub(r),a.isub(i))}return{a:o,b:a,gcd:e.iushln(s)}},u.prototype._invmp=function(n){l(0===n.negative),l(!n.isZero());var t=this,e=n.clone();t=0!==t.negative?t.umod(n):t.clone();for(var r,i=new u(1),o=new u(0),a=e.clone();t.cmpn(1)>0&&e.cmpn(1)>0;){for(var s=0,c=1;0==(t.words[0]&c)&&s<26;++s,c<<=1);if(s>0)for(t.iushrn(s);s-- >0;)i.isOdd()&&i.iadd(a),i.iushrn(1);for(var f=0,d=1;0==(e.words[0]&d)&&f<26;++f,d<<=1);if(f>0)for(e.iushrn(f);f-- >0;)o.isOdd()&&o.iadd(a),o.iushrn(1);t.cmp(e)>=0?(t.isub(e),i.isub(o)):(e.isub(t),o.isub(i))}return(r=0===t.cmpn(1)?i:o).cmpn(0)<0&&r.iadd(n),r},u.prototype.gcd=function(n){if(this.isZero())return n.abs();if(n.isZero())return this.abs();var t=this.clone(),e=n.clone();t.negative=0,e.negative=0;for(var l=0;t.isEven()&&e.isEven();l++)t.iushrn(1),e.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;e.isEven();)e.iushrn(1);var r=t.cmp(e);if(r<0){var u=t;t=e,e=u}else if(0===r||0===e.cmpn(1))break;t.isub(e)}return e.iushln(l)},u.prototype.invm=function(n){return this.egcd(n).a.umod(n)},u.prototype.isEven=function(){return 0==(1&this.words[0])},u.prototype.isOdd=function(){return 1==(1&this.words[0])},u.prototype.andln=function(n){return this.words[0]&n},u.prototype.bincn=function(n){l("number"==typeof n);var t=n%26,e=(n-t)/26,r=1<>>26,this.words[i]=o&=67108863}return 0!==u&&(this.words[i]=u,this.length++),this},u.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},u.prototype.cmpn=function(n){var t,e=n<0;if(0!==this.negative&&!e)return-1;if(0===this.negative&&e)return 1;if(this.strip(),this.length>1)t=1;else{e&&(n=-n),l(n<=67108863,"Number is too big");var r=0|this.words[0];t=r===n?0:rn.length)return 1;if(this.length=0;e--){var l=0|this.words[e],r=0|n.words[e];if(l!==r){lr&&(t=1);break}}return t},u.prototype.gtn=function(n){return 1===this.cmpn(n)},u.prototype.gt=function(n){return 1===this.cmp(n)},u.prototype.gten=function(n){return this.cmpn(n)>=0},u.prototype.gte=function(n){return this.cmp(n)>=0},u.prototype.ltn=function(n){return-1===this.cmpn(n)},u.prototype.lt=function(n){return-1===this.cmp(n)},u.prototype.lten=function(n){return this.cmpn(n)<=0},u.prototype.lte=function(n){return this.cmp(n)<=0},u.prototype.eqn=function(n){return 0===this.cmpn(n)},u.prototype.eq=function(n){return 0===this.cmp(n)},u.red=function(n){return new E(n)},u.prototype.toRed=function(n){return l(!this.red,"Already a number in reduction context"),l(0===this.negative,"red works only with positives"),n.convertTo(this)._forceRed(n)},u.prototype.fromRed=function(){return l(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},u.prototype._forceRed=function(n){return this.red=n,this},u.prototype.forceRed=function(n){return l(!this.red,"Already a number in reduction context"),this._forceRed(n)},u.prototype.redAdd=function(n){return l(this.red,"redAdd works only with red numbers"),this.red.add(this,n)},u.prototype.redIAdd=function(n){return l(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,n)},u.prototype.redSub=function(n){return l(this.red,"redSub works only with red numbers"),this.red.sub(this,n)},u.prototype.redISub=function(n){return l(this.red,"redISub works only with red numbers"),this.red.isub(this,n)},u.prototype.redShl=function(n){return l(this.red,"redShl works only with red numbers"),this.red.shl(this,n)},u.prototype.redMul=function(n){return l(this.red,"redMul works only with red numbers"),this.red._verify2(this,n),this.red.mul(this,n)},u.prototype.redIMul=function(n){return l(this.red,"redMul works only with red numbers"),this.red._verify2(this,n),this.red.imul(this,n)},u.prototype.redSqr=function(){return l(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},u.prototype.redISqr=function(){return l(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},u.prototype.redSqrt=function(){return l(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},u.prototype.redInvm=function(){return l(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},u.prototype.redNeg=function(){return l(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},u.prototype.redPow=function(n){return l(this.red&&!n.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,n)};var g={k256:null,p224:null,p192:null,p25519:null};function v(n,t){this.name=n,this.p=new u(t,16),this.n=this.p.bitLength(),this.k=new u(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function y(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(n){if("string"==typeof n){var t=u._prime(n);this.m=t.p,this.prime=t}else l(n.gtn(1),"modulus must be greater than 1"),this.m=n,this.prime=null}function C(n){E.call(this,n),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new u(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)}v.prototype._tmp=function(){var n=new u(null);return n.words=new Array(Math.ceil(this.n/13)),n},v.prototype.ireduce=function(n){var t,e=n;do{this.split(e,this.tmp),t=(e=(e=this.imulK(e)).iadd(this.tmp)).bitLength()}while(t>this.n);var l=t0?e.isub(this.p):e.strip(),e},v.prototype.split=function(n,t){n.iushrn(this.n,0,t)},v.prototype.imulK=function(n){return n.imul(this.k)},r(b,v),b.prototype.split=function(n,t){for(var e=Math.min(n.length,9),l=0;l>>22,r=u}n.words[l-10]=r>>>=22,n.length-=0===r&&n.length>10?10:9},b.prototype.imulK=function(n){n.words[n.length]=0,n.words[n.length+1]=0,n.length+=2;for(var t=0,e=0;e>>=26,n.words[e]=r,t=l}return 0!==t&&(n.words[n.length++]=t),n},u._prime=function(n){if(g[n])return g[n];var t;if("k256"===n)t=new b;else if("p224"===n)t=new y;else if("p192"===n)t=new _;else{if("p25519"!==n)throw new Error("Unknown prime "+n);t=new w}return g[n]=t,t},E.prototype._verify1=function(n){l(0===n.negative,"red works only with positives"),l(n.red,"red works only with red numbers")},E.prototype._verify2=function(n,t){l(0==(n.negative|t.negative),"red works only with positives"),l(n.red&&n.red===t.red,"red works only with red numbers")},E.prototype.imod=function(n){return this.prime?this.prime.ireduce(n)._forceRed(this):n.umod(this.m)._forceRed(this)},E.prototype.neg=function(n){return n.isZero()?n.clone():this.m.sub(n)._forceRed(this)},E.prototype.add=function(n,t){this._verify2(n,t);var e=n.add(t);return e.cmp(this.m)>=0&&e.isub(this.m),e._forceRed(this)},E.prototype.iadd=function(n,t){this._verify2(n,t);var e=n.iadd(t);return e.cmp(this.m)>=0&&e.isub(this.m),e},E.prototype.sub=function(n,t){this._verify2(n,t);var e=n.sub(t);return e.cmpn(0)<0&&e.iadd(this.m),e._forceRed(this)},E.prototype.isub=function(n,t){this._verify2(n,t);var e=n.isub(t);return e.cmpn(0)<0&&e.iadd(this.m),e},E.prototype.shl=function(n,t){return this._verify1(n),this.imod(n.ushln(t))},E.prototype.imul=function(n,t){return this._verify2(n,t),this.imod(n.imul(t))},E.prototype.mul=function(n,t){return this._verify2(n,t),this.imod(n.mul(t))},E.prototype.isqr=function(n){return this.imul(n,n.clone())},E.prototype.sqr=function(n){return this.mul(n,n)},E.prototype.sqrt=function(n){if(n.isZero())return n.clone();var t=this.m.andln(3);if(l(t%2==1),3===t){var e=this.m.add(new u(1)).iushrn(2);return this.pow(n,e)}for(var r=this.m.subn(1),i=0;!r.isZero()&&0===r.andln(1);)i++,r.iushrn(1);l(!r.isZero());var o=new u(1).toRed(this),a=o.redNeg(),s=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new u(2*c*c).toRed(this);0!==this.pow(c,s).cmp(a);)c.redIAdd(a);for(var f=this.pow(c,r),d=this.pow(n,r.addn(1).iushrn(1)),h=this.pow(n,r),p=i;0!==h.cmp(o);){for(var m=h,g=0;0!==m.cmp(o);g++)m=m.redSqr();l(g=0;l--){for(var s=t.words[l],c=a-1;c>=0;c--){var f=s>>c&1;r!==e[0]&&(r=this.sqr(r)),0!==f||0!==i?(i<<=1,i|=f,(4==++o||0===l&&0===c)&&(r=this.mul(r,e[i]),o=0,i=0)):o=0}a=26}return r},E.prototype.convertTo=function(n){var t=n.umod(this.m);return t===n?t.clone():t},E.prototype.convertFrom=function(n){var t=n.clone();return t.red=null,t},u.mont=function(n){return new C(n)},r(C,E),C.prototype.convertTo=function(n){return this.imod(n.ushln(this.shift))},C.prototype.convertFrom=function(n){var t=this.imod(n.mul(this.rinv));return t.red=null,t},C.prototype.imul=function(n,t){if(n.isZero()||t.isZero())return n.words[0]=0,n.length=1,n;var e=n.imul(t),l=e.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=e.isub(l).iushrn(this.shift),u=r;return r.cmp(this.m)>=0?u=r.isub(this.m):r.cmpn(0)<0&&(u=r.iadd(this.m)),u._forceRed(this)},C.prototype.mul=function(n,t){if(n.isZero()||t.isZero())return new u(0)._forceRed(this);var e=n.mul(t),l=e.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=e.isub(l).iushrn(this.shift),i=r;return r.cmp(this.m)>=0?i=r.isub(this.m):r.cmpn(0)<0&&(i=r.iadd(this.m)),i._forceRed(this)},C.prototype.invm=function(n){return this.imod(n._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===t||t,this)},{buffer:25}],25:[function(n,t,e){},{}],26:[function(n,t,e){var l=n("safe-buffer").Buffer;function r(n){l.isBuffer(n)||(n=l.from(n));for(var t=n.length/4|0,e=new Array(t),r=0;r>>24]^c[p>>>16&255]^f[m>>>8&255]^d[255&g]^t[v++],i=s[p>>>24]^c[m>>>16&255]^f[g>>>8&255]^d[255&h]^t[v++],o=s[m>>>24]^c[g>>>16&255]^f[h>>>8&255]^d[255&p]^t[v++],a=s[g>>>24]^c[h>>>16&255]^f[p>>>8&255]^d[255&m]^t[v++],h=u,p=i,m=o,g=a;return u=(l[h>>>24]<<24|l[p>>>16&255]<<16|l[m>>>8&255]<<8|l[255&g])^t[v++],i=(l[p>>>24]<<24|l[m>>>16&255]<<16|l[g>>>8&255]<<8|l[255&h])^t[v++],o=(l[m>>>24]<<24|l[g>>>16&255]<<16|l[h>>>8&255]<<8|l[255&p])^t[v++],a=(l[g>>>24]<<24|l[h>>>16&255]<<16|l[p>>>8&255]<<8|l[255&m])^t[v++],[u>>>=0,i>>>=0,o>>>=0,a>>>=0]}var o=[0,1,2,4,8,16,32,64,128,27,54],a=function(){for(var n=new Array(256),t=0;t<256;t++)n[t]=t<128?t<<1:t<<1^283;for(var e=[],l=[],r=[[],[],[],[]],u=[[],[],[],[]],i=0,o=0,a=0;a<256;++a){var s=o^o<<1^o<<2^o<<3^o<<4;e[i]=s=s>>>8^255&s^99,l[s]=i;var c=n[i],f=n[c],d=n[f],h=257*n[s]^16843008*s;r[0][i]=h<<24|h>>>8,r[1][i]=h<<16|h>>>16,r[2][i]=h<<8|h>>>24,r[3][i]=h,u[0][s]=(h=16843009*d^65537*f^257*c^16843008*i)<<24|h>>>8,u[1][s]=h<<16|h>>>16,u[2][s]=h<<8|h>>>24,u[3][s]=h,0===i?i=o=1:(i=c^n[n[n[d^c]]],o^=n[n[o]])}return{SBOX:e,INV_SBOX:l,SUB_MIX:r,INV_SUB_MIX:u}}();function s(n){this._key=r(n),this._reset()}s.blockSize=16,s.keySize=32,s.prototype.blockSize=s.blockSize,s.prototype.keySize=s.keySize,s.prototype._reset=function(){for(var n=this._key,t=n.length,e=t+6,l=4*(e+1),r=[],u=0;u>>24)>>>24]<<24|a.SBOX[i>>>16&255]<<16|a.SBOX[i>>>8&255]<<8|a.SBOX[255&i],i^=o[u/t|0]<<24):t>6&&u%t==4&&(i=a.SBOX[i>>>24]<<24|a.SBOX[i>>>16&255]<<16|a.SBOX[i>>>8&255]<<8|a.SBOX[255&i]),r[u]=r[u-t]^i}for(var s=[],c=0;c>>24]]^a.INV_SUB_MIX[1][a.SBOX[d>>>16&255]]^a.INV_SUB_MIX[2][a.SBOX[d>>>8&255]]^a.INV_SUB_MIX[3][a.SBOX[255&d]]}this._nRounds=e,this._keySchedule=r,this._invKeySchedule=s},s.prototype.encryptBlockRaw=function(n){return i(n=r(n),this._keySchedule,a.SUB_MIX,a.SBOX,this._nRounds)},s.prototype.encryptBlock=function(n){var t=this.encryptBlockRaw(n),e=l.allocUnsafe(16);return e.writeUInt32BE(t[0],0),e.writeUInt32BE(t[1],4),e.writeUInt32BE(t[2],8),e.writeUInt32BE(t[3],12),e},s.prototype.decryptBlock=function(n){var t=(n=r(n))[1];n[1]=n[3],n[3]=t;var e=i(n,this._invKeySchedule,a.INV_SUB_MIX,a.INV_SBOX,this._nRounds),u=l.allocUnsafe(16);return u.writeUInt32BE(e[0],0),u.writeUInt32BE(e[3],4),u.writeUInt32BE(e[2],8),u.writeUInt32BE(e[1],12),u},s.prototype.scrub=function(){u(this._keySchedule),u(this._invKeySchedule),u(this._key)},t.exports.AES=s},{"safe-buffer":189}],27:[function(n,t,e){var l=n("./aes"),r=n("safe-buffer").Buffer,u=n("cipher-base"),i=n("inherits"),o=n("./ghash"),a=n("buffer-xor");function s(n,t,e,i){u.call(this),this._finID=r.concat([e,r.from([0,0,0,1])]),e=r.concat([e,r.from([0,0,0,2])]),this._cipher=new l.AES(t),this._prev=r.from(e),this._cache=r.allocUnsafe(0),this._secCache=r.allocUnsafe(0),this._decrypt=i,this._alen=0,this._len=0,this._mode=n;var a=r.alloc(4,0);this._ghash=new o(this._cipher.encryptBlock(a)),this._authTag=null,this._called=!1}i(s,u),s.prototype._update=function(n){if(!this._called&&this._alen){var t=16-this._alen%16;t<16&&(t=r.alloc(t,0),this._ghash.update(t))}this._called=!0;var e=this._mode.encrypt(this,n);return this._ghash.update(this._decrypt?n:e),this._len+=n.length,e},s.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var n=a(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(n,t){var e=0;n.length!==t.length&&e++;for(var l=Math.min(n.length,t.length),r=0;r16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t}else if(this.cache.length>=16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t;return null},f.prototype.flush=function(){if(this.cache.length)return this.cache},e.createDecipher=function(n,t){var e=u[n.toLowerCase()];if(!e)throw new TypeError("invalid suite type");var l=s(t,!1,e.key,e.iv);return d(n,l.key,l.iv)},e.createDecipheriv=d},{"./aes":26,"./authCipher":27,"./modes":38,"./streamCipher":41,"cipher-base":47,evp_bytestokey:150,inherits:158,"safe-buffer":189}],30:[function(n,t,e){var l=n("./modes"),r=n("./authCipher"),u=n("safe-buffer").Buffer,i=n("./streamCipher"),o=n("cipher-base"),a=n("./aes"),s=n("evp_bytestokey");function c(n,t,e){o.call(this),this._cache=new d,this._cipher=new a.AES(t),this._prev=u.from(e),this._mode=n,this._autopadding=!0}n("inherits")(c,o),c.prototype._update=function(n){var t,e;this._cache.add(n);for(var l=[];t=this._cache.get();)e=this._mode.encrypt(this,t),l.push(e);return u.concat(l)};var f=u.alloc(16,16);function d(){this.cache=u.allocUnsafe(0)}function h(n,t,e){var o=l[n.toLowerCase()];if(!o)throw new TypeError("invalid suite type");if("string"==typeof t&&(t=u.from(t)),t.length!==o.key/8)throw new TypeError("invalid key length "+t.length);if("string"==typeof e&&(e=u.from(e)),e.length!==o.iv)throw new TypeError("invalid iv length "+e.length);return"stream"===o.type?new i(o.module,t,e):"auth"===o.type?new r(o.module,t,e):new c(o.module,t,e)}c.prototype._final=function(){var n=this._cache.flush();if(this._autopadding)return n=this._mode.encrypt(this,n),this._cipher.scrub(),n;if(!n.equals(f))throw this._cipher.scrub(),new Error("data not multiple of block length")},c.prototype.setAutoPadding=function(n){return this._autopadding=!!n,this},d.prototype.add=function(n){this.cache=u.concat([this.cache,n])},d.prototype.get=function(){if(this.cache.length>15){var n=this.cache.slice(0,16);return this.cache=this.cache.slice(16),n}return null},d.prototype.flush=function(){for(var n=16-this.cache.length,t=u.allocUnsafe(n),e=-1;++e>>0,0),t.writeUInt32BE(n[1]>>>0,4),t.writeUInt32BE(n[2]>>>0,8),t.writeUInt32BE(n[3]>>>0,12),t}function i(n){this.h=n,this.state=l.alloc(16,0),this.cache=l.allocUnsafe(0)}i.prototype.ghash=function(n){for(var t=-1;++t0;t--)l[t]=l[t]>>>1|(1&l[t-1])<<31;l[0]=l[0]>>>1,e&&(l[0]=l[0]^225<<24)}this.state=u(r)},i.prototype.update=function(n){var t;for(this.cache=l.concat([this.cache,n]);this.cache.length>=16;)t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t)},i.prototype.final=function(n,t){return this.cache.length&&this.ghash(l.concat([this.cache,r],16)),this.ghash(u([0,n,0,t])),this.state},t.exports=i},{"safe-buffer":189}],32:[function(n,t,e){var l=n("buffer-xor");e.encrypt=function(n,t){var e=l(t,n._prev);return n._prev=n._cipher.encryptBlock(e),n._prev},e.decrypt=function(n,t){var e=n._prev;n._prev=t;var r=n._cipher.decryptBlock(t);return l(r,e)}},{"buffer-xor":43}],33:[function(n,t,e){var l=n("safe-buffer").Buffer,r=n("buffer-xor");function u(n,t,e){var u=t.length,i=r(t,n._cache);return n._cache=n._cache.slice(u),n._prev=l.concat([n._prev,e?t:i]),i}e.encrypt=function(n,t,e){for(var r,i=l.allocUnsafe(0);t.length;){if(0===n._cache.length&&(n._cache=n._cipher.encryptBlock(n._prev),n._prev=l.allocUnsafe(0)),!(n._cache.length<=t.length)){i=l.concat([i,u(n,t,e)]);break}i=l.concat([i,u(n,t.slice(0,r=n._cache.length),e)]),t=t.slice(r)}return i}},{"buffer-xor":43,"safe-buffer":189}],34:[function(n,t,e){var l=n("safe-buffer").Buffer;function r(n,t,e){for(var l,r,i=-1,o=0;++i<8;)o+=(128&(r=n._cipher.encryptBlock(n._prev)[0]^(l=t&1<<7-i?128:0)))>>i%8,n._prev=u(n._prev,e?l:r);return o}function u(n,t){var e=n.length,r=-1,u=l.allocUnsafe(n.length);for(n=l.concat([n,l.from([t])]);++r>7;return u}e.encrypt=function(n,t,e){for(var u=t.length,i=l.allocUnsafe(u),o=-1;++ou)throw new RangeError("Invalid typed array length");var t=new Uint8Array(n);return t.__proto__=o.prototype,t}function o(n,t,e){if("number"==typeof n){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return c(n)}return a(n,t,e)}function a(n,t,e){if("number"==typeof n)throw new TypeError('"value" argument must not be a number');return L(n)?function(n,t,e){if(t<0||n.byteLength=u)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+u.toString(16)+" bytes");return 0|n}function h(n,t){if(o.isBuffer(n))return n.length;if(q(n)||L(n))return n.byteLength;"string"!=typeof n&&(n=""+n);var e=n.length;if(0===e)return 0;for(var l=!1;;)switch(t){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return N(n).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*e;case"hex":return e>>>1;case"base64":return j(n).length;default:if(l)return N(n).length;t=(""+t).toLowerCase(),l=!0}}function p(n,t,e){var l=n[t];n[t]=n[e],n[e]=l}function m(n,t,e,l,r){if(0===n.length)return-1;if("string"==typeof e?(l=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),U(e=+e)&&(e=r?0:n.length-1),e<0&&(e=n.length+e),e>=n.length){if(r)return-1;e=n.length-1}else if(e<0){if(!r)return-1;e=0}if("string"==typeof t&&(t=o.from(t,l)),o.isBuffer(t))return 0===t.length?-1:g(n,t,e,l,r);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?r?Uint8Array.prototype.indexOf.call(n,t,e):Uint8Array.prototype.lastIndexOf.call(n,t,e):g(n,[t],e,l,r);throw new TypeError("val must be string, number or Buffer")}function g(n,t,e,l,r){var u,i=1,o=n.length,a=t.length;if(void 0!==l&&("ucs2"===(l=String(l).toLowerCase())||"ucs-2"===l||"utf16le"===l||"utf-16le"===l)){if(n.length<2||t.length<2)return-1;i=2,o/=2,a/=2,e/=2}function s(n,t){return 1===i?n[t]:n.readUInt16BE(t*i)}if(r){var c=-1;for(u=e;uo&&(e=o-a),u=e;u>=0;u--){for(var f=!0,d=0;dr&&(l=r):l=r;var u=t.length;if(u%2!=0)throw new TypeError("Invalid hex string");l>u/2&&(l=u/2);for(var i=0;i>8,r.push(e%256),r.push(l);return r}(t,n.length-e),n,e,l)}function C(n,t,e){return l.fromByteArray(0===t&&e===n.length?n:n.slice(t,e))}function A(n,t,e){e=Math.min(n.length,e);for(var l=[],r=t;r239?4:s>223?3:s>191?2:1;if(r+f<=e)switch(f){case 1:s<128&&(c=s);break;case 2:128==(192&(u=n[r+1]))&&(a=(31&s)<<6|63&u)>127&&(c=a);break;case 3:i=n[r+2],128==(192&(u=n[r+1]))&&128==(192&i)&&(a=(15&s)<<12|(63&u)<<6|63&i)>2047&&(a<55296||a>57343)&&(c=a);break;case 4:i=n[r+2],o=n[r+3],128==(192&(u=n[r+1]))&&128==(192&i)&&128==(192&o)&&(a=(15&s)<<18|(63&u)<<12|(63&i)<<6|63&o)>65535&&a<1114112&&(c=a)}null===c?(c=65533,f=1):c>65535&&(l.push((c-=65536)>>>10&1023|55296),c=56320|1023&c),l.push(c),r+=f}return function(n){var t=n.length;if(t<=x)return String.fromCharCode.apply(String,n);for(var e="",l=0;lthis.length)return"";if((void 0===e||e>this.length)&&(e=this.length),e<=0)return"";if((e>>>=0)<=(t>>>=0))return"";for(n||(n="utf8");;)switch(n){case"hex":return S(this,t,e);case"utf8":case"utf-8":return A(this,t,e);case"ascii":return k(this,t,e);case"latin1":case"binary":return F(this,t,e);case"base64":return C(this,t,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,t,e);default:if(l)throw new TypeError("Unknown encoding: "+n);n=(n+"").toLowerCase(),l=!0}}).apply(this,arguments)},o.prototype.equals=function(n){if(!o.isBuffer(n))throw new TypeError("Argument must be a Buffer");return this===n||0===o.compare(this,n)},o.prototype.inspect=function(){var n="",t=e.INSPECT_MAX_BYTES;return this.length>0&&(n=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(n+=" ... ")),""},o.prototype.compare=function(n,t,e,l,r){if(!o.isBuffer(n))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===e&&(e=n?n.length:0),void 0===l&&(l=0),void 0===r&&(r=this.length),t<0||e>n.length||l<0||r>this.length)throw new RangeError("out of range index");if(l>=r&&t>=e)return 0;if(l>=r)return-1;if(t>=e)return 1;if(t>>>=0,e>>>=0,l>>>=0,r>>>=0,this===n)return 0;for(var u=r-l,i=e-t,a=Math.min(u,i),s=this.slice(l,r),c=n.slice(t,e),f=0;f>>=0,isFinite(e)?(e>>>=0,void 0===l&&(l="utf8")):(l=e,e=void 0)}var r=this.length-t;if((void 0===e||e>r)&&(e=r),n.length>0&&(e<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");l||(l="utf8");for(var u=!1;;)switch(l){case"hex":return v(this,n,t,e);case"utf8":case"utf-8":return b(this,n,t,e);case"ascii":return y(this,n,t,e);case"latin1":case"binary":return _(this,n,t,e);case"base64":return w(this,n,t,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,n,t,e);default:if(u)throw new TypeError("Unknown encoding: "+l);l=(""+l).toLowerCase(),u=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var x=4096;function k(n,t,e){var l="";e=Math.min(n.length,e);for(var r=t;rr)&&(e=r);for(var u="",i=t;ie)throw new RangeError("Trying to access beyond buffer length")}function I(n,t,e,l,r,u){if(!o.isBuffer(n))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>r||tn.length)throw new RangeError("Index out of range")}function M(n,t,e,l,r,u){if(e+l>n.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function T(n,t,e,l,u){return t=+t,e>>>=0,u||M(n,0,e,4),r.write(n,t,e,l,23,4),e+4}function O(n,t,e,l,u){return t=+t,e>>>=0,u||M(n,0,e,8),r.write(n,t,e,l,52,8),e+8}o.prototype.slice=function(n,t){var e=this.length;n=~~n,t=void 0===t?e:~~t,n<0?(n+=e)<0&&(n=0):n>e&&(n=e),t<0?(t+=e)<0&&(t=0):t>e&&(t=e),t>>=0,t>>>=0,e||D(n,t,this.length);for(var l=this[n],r=1,u=0;++u>>=0,t>>>=0,e||D(n,t,this.length);for(var l=this[n+--t],r=1;t>0&&(r*=256);)l+=this[n+--t]*r;return l},o.prototype.readUInt8=function(n,t){return n>>>=0,t||D(n,1,this.length),this[n]},o.prototype.readUInt16LE=function(n,t){return n>>>=0,t||D(n,2,this.length),this[n]|this[n+1]<<8},o.prototype.readUInt16BE=function(n,t){return n>>>=0,t||D(n,2,this.length),this[n]<<8|this[n+1]},o.prototype.readUInt32LE=function(n,t){return n>>>=0,t||D(n,4,this.length),(this[n]|this[n+1]<<8|this[n+2]<<16)+16777216*this[n+3]},o.prototype.readUInt32BE=function(n,t){return n>>>=0,t||D(n,4,this.length),16777216*this[n]+(this[n+1]<<16|this[n+2]<<8|this[n+3])},o.prototype.readIntLE=function(n,t,e){n>>>=0,t>>>=0,e||D(n,t,this.length);for(var l=this[n],r=1,u=0;++u=(r*=128)&&(l-=Math.pow(2,8*t)),l},o.prototype.readIntBE=function(n,t,e){n>>>=0,t>>>=0,e||D(n,t,this.length);for(var l=t,r=1,u=this[n+--l];l>0&&(r*=256);)u+=this[n+--l]*r;return u>=(r*=128)&&(u-=Math.pow(2,8*t)),u},o.prototype.readInt8=function(n,t){return n>>>=0,t||D(n,1,this.length),128&this[n]?-1*(255-this[n]+1):this[n]},o.prototype.readInt16LE=function(n,t){n>>>=0,t||D(n,2,this.length);var e=this[n]|this[n+1]<<8;return 32768&e?4294901760|e:e},o.prototype.readInt16BE=function(n,t){n>>>=0,t||D(n,2,this.length);var e=this[n+1]|this[n]<<8;return 32768&e?4294901760|e:e},o.prototype.readInt32LE=function(n,t){return n>>>=0,t||D(n,4,this.length),this[n]|this[n+1]<<8|this[n+2]<<16|this[n+3]<<24},o.prototype.readInt32BE=function(n,t){return n>>>=0,t||D(n,4,this.length),this[n]<<24|this[n+1]<<16|this[n+2]<<8|this[n+3]},o.prototype.readFloatLE=function(n,t){return n>>>=0,t||D(n,4,this.length),r.read(this,n,!0,23,4)},o.prototype.readFloatBE=function(n,t){return n>>>=0,t||D(n,4,this.length),r.read(this,n,!1,23,4)},o.prototype.readDoubleLE=function(n,t){return n>>>=0,t||D(n,8,this.length),r.read(this,n,!0,52,8)},o.prototype.readDoubleBE=function(n,t){return n>>>=0,t||D(n,8,this.length),r.read(this,n,!1,52,8)},o.prototype.writeUIntLE=function(n,t,e,l){n=+n,t>>>=0,e>>>=0,l||I(this,n,t,e,Math.pow(2,8*e)-1,0);var r=1,u=0;for(this[t]=255&n;++u>>=0,e>>>=0,l||I(this,n,t,e,Math.pow(2,8*e)-1,0);var r=e-1,u=1;for(this[t+r]=255&n;--r>=0&&(u*=256);)this[t+r]=n/u&255;return t+e},o.prototype.writeUInt8=function(n,t,e){return n=+n,t>>>=0,e||I(this,n,t,1,255,0),this[t]=255&n,t+1},o.prototype.writeUInt16LE=function(n,t,e){return n=+n,t>>>=0,e||I(this,n,t,2,65535,0),this[t]=255&n,this[t+1]=n>>>8,t+2},o.prototype.writeUInt16BE=function(n,t,e){return n=+n,t>>>=0,e||I(this,n,t,2,65535,0),this[t]=n>>>8,this[t+1]=255&n,t+2},o.prototype.writeUInt32LE=function(n,t,e){return n=+n,t>>>=0,e||I(this,n,t,4,4294967295,0),this[t+3]=n>>>24,this[t+2]=n>>>16,this[t+1]=n>>>8,this[t]=255&n,t+4},o.prototype.writeUInt32BE=function(n,t,e){return n=+n,t>>>=0,e||I(this,n,t,4,4294967295,0),this[t]=n>>>24,this[t+1]=n>>>16,this[t+2]=n>>>8,this[t+3]=255&n,t+4},o.prototype.writeIntLE=function(n,t,e,l){if(n=+n,t>>>=0,!l){var r=Math.pow(2,8*e-1);I(this,n,t,e,r-1,-r)}var u=0,i=1,o=0;for(this[t]=255&n;++u>0)-o&255;return t+e},o.prototype.writeIntBE=function(n,t,e,l){if(n=+n,t>>>=0,!l){var r=Math.pow(2,8*e-1);I(this,n,t,e,r-1,-r)}var u=e-1,i=1,o=0;for(this[t+u]=255&n;--u>=0&&(i*=256);)n<0&&0===o&&0!==this[t+u+1]&&(o=1),this[t+u]=(n/i>>0)-o&255;return t+e},o.prototype.writeInt8=function(n,t,e){return n=+n,t>>>=0,e||I(this,n,t,1,127,-128),n<0&&(n=255+n+1),this[t]=255&n,t+1},o.prototype.writeInt16LE=function(n,t,e){return n=+n,t>>>=0,e||I(this,n,t,2,32767,-32768),this[t]=255&n,this[t+1]=n>>>8,t+2},o.prototype.writeInt16BE=function(n,t,e){return n=+n,t>>>=0,e||I(this,n,t,2,32767,-32768),this[t]=n>>>8,this[t+1]=255&n,t+2},o.prototype.writeInt32LE=function(n,t,e){return n=+n,t>>>=0,e||I(this,n,t,4,2147483647,-2147483648),this[t]=255&n,this[t+1]=n>>>8,this[t+2]=n>>>16,this[t+3]=n>>>24,t+4},o.prototype.writeInt32BE=function(n,t,e){return n=+n,t>>>=0,e||I(this,n,t,4,2147483647,-2147483648),n<0&&(n=4294967295+n+1),this[t]=n>>>24,this[t+1]=n>>>16,this[t+2]=n>>>8,this[t+3]=255&n,t+4},o.prototype.writeFloatLE=function(n,t,e){return T(this,n,t,!0,e)},o.prototype.writeFloatBE=function(n,t,e){return T(this,n,t,!1,e)},o.prototype.writeDoubleLE=function(n,t,e){return O(this,n,t,!0,e)},o.prototype.writeDoubleBE=function(n,t,e){return O(this,n,t,!1,e)},o.prototype.copy=function(n,t,e,l){if(e||(e=0),l||0===l||(l=this.length),t>=n.length&&(t=n.length),t||(t=0),l>0&&l=this.length)throw new RangeError("sourceStart out of bounds");if(l<0)throw new RangeError("sourceEnd out of bounds");l>this.length&&(l=this.length),n.length-t=0;--r)n[r+t]=this[r+e];else if(u<1e3)for(r=0;r>>=0,e=void 0===e?this.length:e>>>0,n||(n=0),"number"==typeof n)for(u=t;u55295&&e<57344){if(!r){if(e>56319){(t-=3)>-1&&u.push(239,191,189);continue}if(i+1===l){(t-=3)>-1&&u.push(239,191,189);continue}r=e;continue}if(e<56320){(t-=3)>-1&&u.push(239,191,189),r=e;continue}e=65536+(r-55296<<10|e-56320)}else r&&(t-=3)>-1&&u.push(239,191,189);if(r=null,e<128){if((t-=1)<0)break;u.push(e)}else if(e<2048){if((t-=2)<0)break;u.push(e>>6|192,63&e|128)}else if(e<65536){if((t-=3)<0)break;u.push(e>>12|224,e>>6&63|128,63&e|128)}else{if(!(e<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;u.push(e>>18|240,e>>12&63|128,e>>6&63|128,63&e|128)}}return u}function j(n){return l.toByteArray(function(n){if((n=n.trim().replace(R,"")).length<2)return"";for(;n.length%4!=0;)n+="=";return n}(n))}function P(n,t,e,l){for(var r=0;r=t.length||r>=n.length);++r)t[r+e]=n[r];return r}function L(n){return n instanceof ArrayBuffer||null!=n&&null!=n.constructor&&"ArrayBuffer"===n.constructor.name&&"number"==typeof n.byteLength}function q(n){return"function"==typeof ArrayBuffer.isView&&ArrayBuffer.isView(n)}function U(n){return n!=n}},{"base64-js":19,ieee754:157}],45:[function(n,t,e){var l;l=function(n){"use strict";var t=function(n,e,r){if(void 0===n&&(n=t.DEFAULT_CAPACITY),void 0===e&&(e=t.DEFAULT_ENDIAN),void 0===r&&(r=t.DEFAULT_NOASSERT),!r){if((n|=0)<0)throw RangeError("Illegal capacity");e=!!e,r=!!r}this.buffer=0===n?l:new ArrayBuffer(n),this.view=0===n?null:new Uint8Array(this.buffer),this.offset=0,this.markedOffset=-1,this.limit=n,this.littleEndian=e,this.noAssert=r};t.VERSION="5.0.1",t.LITTLE_ENDIAN=!0,t.BIG_ENDIAN=!1,t.DEFAULT_CAPACITY=16,t.DEFAULT_ENDIAN=t.BIG_ENDIAN,t.DEFAULT_NOASSERT=!1,t.Long=n||null;var e=t.prototype;Object.defineProperty(e,"__isByteBuffer__",{value:!0,enumerable:!1,configurable:!1});var l=new ArrayBuffer(0),r=String.fromCharCode;function u(n){var t=0;return function(){return t1024&&(t.push(r.apply(String,n)),n.length=0),Array.prototype.push.apply(n,arguments)}}function o(n,t,e,l,r){var u,i,o=8*r-l-1,a=(1<>1,c=-7,f=e?r-1:0,d=e?-1:1,h=n[t+f];for(f+=d,u=h&(1<<-c)-1,h>>=-c,c+=o;c>0;u=256*u+n[t+f],f+=d,c-=8);for(i=u&(1<<-c)-1,u>>=-c,c+=l;c>0;i=256*i+n[t+f],f+=d,c-=8);if(0===u)u=1-s;else{if(u===a)return i?NaN:1/0*(h?-1:1);i+=Math.pow(2,l),u-=s}return(h?-1:1)*i*Math.pow(2,u-l)}function a(n,t,e,l,r,u){var i,o,a,s=8*u-r-1,c=(1<>1,d=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,h=l?0:u-1,p=l?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,i=c):(i=Math.floor(Math.log(t)/Math.LN2),t*(a=Math.pow(2,-i))<1&&(i--,a*=2),(t+=i+f>=1?d/a:d*Math.pow(2,1-f))*a>=2&&(i++,a/=2),i+f>=c?(o=0,i=c):i+f>=1?(o=(t*a-1)*Math.pow(2,r),i+=f):(o=t*Math.pow(2,f-1)*Math.pow(2,r),i=0));r>=8;n[e+h]=255&o,h+=p,o/=256,r-=8);for(i=i<0;n[e+h]=255&i,h+=p,i/=256,s-=8);n[e+h-p]|=128*m}t.accessor=function(){return Uint8Array},t.allocate=function(n,e,l){return new t(n,e,l)},t.concat=function(n,e,l,r){"boolean"!=typeof e&&"string"==typeof e||(r=l,l=e,e=void 0);for(var u,i=0,o=0,a=n.length;o0&&(i+=u);if(0===i)return new t(0,l,r);var s,c=new t(i,l,r);for(o=0;o0&&(i.buffer=n.buffer,i.offset=n.byteOffset,i.limit=n.byteOffset+n.byteLength,i.view=new Uint8Array(n.buffer));else if(n instanceof ArrayBuffer)i=new t(0,r,u),n.byteLength>0&&(i.buffer=n,i.offset=0,i.limit=n.byteLength,i.view=n.byteLength>0?new Uint8Array(n):null);else{if("[object Array]"!==Object.prototype.toString.call(n))throw TypeError("Illegal buffer");(i=new t(n.length,r,u)).limit=n.length;for(var o=0;o>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}var l,r=t,u=n.length,i=u>>3,o=0;for(t+=this.writeVarint32(u,t);i--;)l=1&!!n[o++]|(1&!!n[o++])<<1|(1&!!n[o++])<<2|(1&!!n[o++])<<3|(1&!!n[o++])<<4|(1&!!n[o++])<<5|(1&!!n[o++])<<6|(1&!!n[o++])<<7,this.writeByte(l,t++);if(o>3,i=0,o=[];for(n+=l.length;u--;)e=this.readByte(n++),o[i++]=!!(1&e),o[i++]=!!(2&e),o[i++]=!!(4&e),o[i++]=!!(8&e),o[i++]=!!(16&e),o[i++]=!!(32&e),o[i++]=!!(64&e),o[i++]=!!(128&e);if(i>a++&1)}return t&&(this.offset=n),o},e.readBytes=function(n,t){var e=void 0===t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+n>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+"+n+") <= "+this.buffer.byteLength)}var l=this.slice(t,t+n);return e&&(this.offset+=n),l},e.writeBytes=e.append,e.writeInt8=function(n,t){var e=void 0===t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof n||n%1!=0)throw TypeError("Illegal value: "+n+" (not an integer)");if(n|=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}var l=this.buffer.byteLength;return(t+=1)>l&&this.resize((l*=2)>t?l:t),this.view[t-=1]=n,e&&(this.offset+=1),this},e.writeByte=e.writeInt8,e.readInt8=function(n){var t=void 0===n;if(t&&(n=this.offset),!this.noAssert){if("number"!=typeof n||n%1!=0)throw TypeError("Illegal offset: "+n+" (not an integer)");if((n>>>=0)<0||n+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+1) <= "+this.buffer.byteLength)}var e=this.view[n];return 128==(128&e)&&(e=-(255-e+1)),t&&(this.offset+=1),e},e.readByte=e.readInt8,e.writeUint8=function(n,t){var e=void 0===t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof n||n%1!=0)throw TypeError("Illegal value: "+n+" (not an integer)");if(n>>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}var l=this.buffer.byteLength;return(t+=1)>l&&this.resize((l*=2)>t?l:t),this.view[t-=1]=n,e&&(this.offset+=1),this},e.writeUInt8=e.writeUint8,e.readUint8=function(n){var t=void 0===n;if(t&&(n=this.offset),!this.noAssert){if("number"!=typeof n||n%1!=0)throw TypeError("Illegal offset: "+n+" (not an integer)");if((n>>>=0)<0||n+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+1) <= "+this.buffer.byteLength)}var e=this.view[n];return t&&(this.offset+=1),e},e.readUInt8=e.readUint8,e.writeInt16=function(n,t){var e=void 0===t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof n||n%1!=0)throw TypeError("Illegal value: "+n+" (not an integer)");if(n|=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}var l=this.buffer.byteLength;return(t+=2)>l&&this.resize((l*=2)>t?l:t),t-=2,this.littleEndian?(this.view[t+1]=(65280&n)>>>8,this.view[t]=255&n):(this.view[t]=(65280&n)>>>8,this.view[t+1]=255&n),e&&(this.offset+=2),this},e.writeShort=e.writeInt16,e.readInt16=function(n){var t=void 0===n;if(t&&(n=this.offset),!this.noAssert){if("number"!=typeof n||n%1!=0)throw TypeError("Illegal offset: "+n+" (not an integer)");if((n>>>=0)<0||n+2>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+2) <= "+this.buffer.byteLength)}var e=0;return this.littleEndian?(e=this.view[n],e|=this.view[n+1]<<8):(e=this.view[n]<<8,e|=this.view[n+1]),32768==(32768&e)&&(e=-(65535-e+1)),t&&(this.offset+=2),e},e.readShort=e.readInt16,e.writeUint16=function(n,t){var e=void 0===t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof n||n%1!=0)throw TypeError("Illegal value: "+n+" (not an integer)");if(n>>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}var l=this.buffer.byteLength;return(t+=2)>l&&this.resize((l*=2)>t?l:t),t-=2,this.littleEndian?(this.view[t+1]=(65280&n)>>>8,this.view[t]=255&n):(this.view[t]=(65280&n)>>>8,this.view[t+1]=255&n),e&&(this.offset+=2),this},e.writeUInt16=e.writeUint16,e.readUint16=function(n){var t=void 0===n;if(t&&(n=this.offset),!this.noAssert){if("number"!=typeof n||n%1!=0)throw TypeError("Illegal offset: "+n+" (not an integer)");if((n>>>=0)<0||n+2>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+2) <= "+this.buffer.byteLength)}var e=0;return this.littleEndian?(e=this.view[n],e|=this.view[n+1]<<8):(e=this.view[n]<<8,e|=this.view[n+1]),t&&(this.offset+=2),e},e.readUInt16=e.readUint16,e.writeInt32=function(n,t){var e=void 0===t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof n||n%1!=0)throw TypeError("Illegal value: "+n+" (not an integer)");if(n|=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}var l=this.buffer.byteLength;return(t+=4)>l&&this.resize((l*=2)>t?l:t),t-=4,this.littleEndian?(this.view[t+3]=n>>>24&255,this.view[t+2]=n>>>16&255,this.view[t+1]=n>>>8&255,this.view[t]=255&n):(this.view[t]=n>>>24&255,this.view[t+1]=n>>>16&255,this.view[t+2]=n>>>8&255,this.view[t+3]=255&n),e&&(this.offset+=4),this},e.writeInt=e.writeInt32,e.readInt32=function(n){var t=void 0===n;if(t&&(n=this.offset),!this.noAssert){if("number"!=typeof n||n%1!=0)throw TypeError("Illegal offset: "+n+" (not an integer)");if((n>>>=0)<0||n+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+4) <= "+this.buffer.byteLength)}var e=0;return this.littleEndian?(e=this.view[n+2]<<16,e|=this.view[n+1]<<8,e|=this.view[n],e+=this.view[n+3]<<24>>>0):(e=this.view[n+1]<<16,e|=this.view[n+2]<<8,e|=this.view[n+3],e+=this.view[n]<<24>>>0),e|=0,t&&(this.offset+=4),e},e.readInt=e.readInt32,e.writeUint32=function(n,t){var e=void 0===t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof n||n%1!=0)throw TypeError("Illegal value: "+n+" (not an integer)");if(n>>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}var l=this.buffer.byteLength;return(t+=4)>l&&this.resize((l*=2)>t?l:t),t-=4,this.littleEndian?(this.view[t+3]=n>>>24&255,this.view[t+2]=n>>>16&255,this.view[t+1]=n>>>8&255,this.view[t]=255&n):(this.view[t]=n>>>24&255,this.view[t+1]=n>>>16&255,this.view[t+2]=n>>>8&255,this.view[t+3]=255&n),e&&(this.offset+=4),this},e.writeUInt32=e.writeUint32,e.readUint32=function(n){var t=void 0===n;if(t&&(n=this.offset),!this.noAssert){if("number"!=typeof n||n%1!=0)throw TypeError("Illegal offset: "+n+" (not an integer)");if((n>>>=0)<0||n+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+4) <= "+this.buffer.byteLength)}var e=0;return this.littleEndian?(e=this.view[n+2]<<16,e|=this.view[n+1]<<8,e|=this.view[n],e+=this.view[n+3]<<24>>>0):(e=this.view[n+1]<<16,e|=this.view[n+2]<<8,e|=this.view[n+3],e+=this.view[n]<<24>>>0),t&&(this.offset+=4),e},e.readUInt32=e.readUint32,n&&(e.writeInt64=function(t,e){var l=void 0===e;if(l&&(e=this.offset),!this.noAssert){if("number"==typeof t)t=n.fromNumber(t);else if("string"==typeof t)t=n.fromString(t);else if(!(t&&t instanceof n))throw TypeError("Illegal value: "+t+" (not an integer or Long)");if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}"number"==typeof t?t=n.fromNumber(t):"string"==typeof t&&(t=n.fromString(t));var r=this.buffer.byteLength;(e+=8)>r&&this.resize((r*=2)>e?r:e),e-=8;var u=t.low,i=t.high;return this.littleEndian?(this.view[e+3]=u>>>24&255,this.view[e+2]=u>>>16&255,this.view[e+1]=u>>>8&255,this.view[e]=255&u,this.view[(e+=4)+3]=i>>>24&255,this.view[e+2]=i>>>16&255,this.view[e+1]=i>>>8&255,this.view[e]=255&i):(this.view[e]=i>>>24&255,this.view[e+1]=i>>>16&255,this.view[e+2]=i>>>8&255,this.view[e+3]=255&i,this.view[e+=4]=u>>>24&255,this.view[e+1]=u>>>16&255,this.view[e+2]=u>>>8&255,this.view[e+3]=255&u),l&&(this.offset+=8),this},e.writeLong=e.writeInt64,e.readInt64=function(t){var e=void 0===t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+8) <= "+this.buffer.byteLength)}var l=0,r=0;this.littleEndian?(l=this.view[t+2]<<16,l|=this.view[t+1]<<8,l|=this.view[t],l+=this.view[t+3]<<24>>>0,r=this.view[(t+=4)+2]<<16,r|=this.view[t+1]<<8,r|=this.view[t],r+=this.view[t+3]<<24>>>0):(r=this.view[t+1]<<16,r|=this.view[t+2]<<8,r|=this.view[t+3],r+=this.view[t]<<24>>>0,l=this.view[(t+=4)+1]<<16,l|=this.view[t+2]<<8,l|=this.view[t+3],l+=this.view[t]<<24>>>0);var u=new n(l,r,!1);return e&&(this.offset+=8),u},e.readLong=e.readInt64,e.writeUint64=function(t,e){var l=void 0===e;if(l&&(e=this.offset),!this.noAssert){if("number"==typeof t)t=n.fromNumber(t);else if("string"==typeof t)t=n.fromString(t);else if(!(t&&t instanceof n))throw TypeError("Illegal value: "+t+" (not an integer or Long)");if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}"number"==typeof t?t=n.fromNumber(t):"string"==typeof t&&(t=n.fromString(t));var r=this.buffer.byteLength;(e+=8)>r&&this.resize((r*=2)>e?r:e),e-=8;var u=t.low,i=t.high;return this.littleEndian?(this.view[e+3]=u>>>24&255,this.view[e+2]=u>>>16&255,this.view[e+1]=u>>>8&255,this.view[e]=255&u,this.view[(e+=4)+3]=i>>>24&255,this.view[e+2]=i>>>16&255,this.view[e+1]=i>>>8&255,this.view[e]=255&i):(this.view[e]=i>>>24&255,this.view[e+1]=i>>>16&255,this.view[e+2]=i>>>8&255,this.view[e+3]=255&i,this.view[e+=4]=u>>>24&255,this.view[e+1]=u>>>16&255,this.view[e+2]=u>>>8&255,this.view[e+3]=255&u),l&&(this.offset+=8),this},e.writeUInt64=e.writeUint64,e.readUint64=function(t){var e=void 0===t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+8) <= "+this.buffer.byteLength)}var l=0,r=0;this.littleEndian?(l=this.view[t+2]<<16,l|=this.view[t+1]<<8,l|=this.view[t],l+=this.view[t+3]<<24>>>0,r=this.view[(t+=4)+2]<<16,r|=this.view[t+1]<<8,r|=this.view[t],r+=this.view[t+3]<<24>>>0):(r=this.view[t+1]<<16,r|=this.view[t+2]<<8,r|=this.view[t+3],r+=this.view[t]<<24>>>0,l=this.view[(t+=4)+1]<<16,l|=this.view[t+2]<<8,l|=this.view[t+3],l+=this.view[t]<<24>>>0);var u=new n(l,r,!0);return e&&(this.offset+=8),u},e.readUInt64=e.readUint64),e.writeFloat32=function(n,t){var e=void 0===t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof n)throw TypeError("Illegal value: "+n+" (not a number)");if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}var l=this.buffer.byteLength;return(t+=4)>l&&this.resize((l*=2)>t?l:t),a(this.view,n,t-=4,this.littleEndian,23,4),e&&(this.offset+=4),this},e.writeFloat=e.writeFloat32,e.readFloat32=function(n){var t=void 0===n;if(t&&(n=this.offset),!this.noAssert){if("number"!=typeof n||n%1!=0)throw TypeError("Illegal offset: "+n+" (not an integer)");if((n>>>=0)<0||n+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+4) <= "+this.buffer.byteLength)}var e=o(this.view,n,this.littleEndian,23,4);return t&&(this.offset+=4),e},e.readFloat=e.readFloat32,e.writeFloat64=function(n,t){var e=void 0===t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof n)throw TypeError("Illegal value: "+n+" (not a number)");if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}var l=this.buffer.byteLength;return(t+=8)>l&&this.resize((l*=2)>t?l:t),a(this.view,n,t-=8,this.littleEndian,52,8),e&&(this.offset+=8),this},e.writeDouble=e.writeFloat64,e.readFloat64=function(n){var t=void 0===n;if(t&&(n=this.offset),!this.noAssert){if("number"!=typeof n||n%1!=0)throw TypeError("Illegal offset: "+n+" (not an integer)");if((n>>>=0)<0||n+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+8) <= "+this.buffer.byteLength)}var e=o(this.view,n,this.littleEndian,52,8);return t&&(this.offset+=8),e},e.readDouble=e.readFloat64,t.MAX_VARINT32_BYTES=5,t.calculateVarint32=function(n){return(n>>>=0)<128?1:n<16384?2:n<1<<21?3:n<1<<28?4:5},t.zigZagEncode32=function(n){return((n|=0)<<1^n>>31)>>>0},t.zigZagDecode32=function(n){return n>>>1^-(1&n)|0},e.writeVarint32=function(n,e){var l=void 0===e;if(l&&(e=this.offset),!this.noAssert){if("number"!=typeof n||n%1!=0)throw TypeError("Illegal value: "+n+" (not an integer)");if(n|=0,"number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}var r=t.calculateVarint32(n),u=this.buffer.byteLength;for((e+=r)>u&&this.resize((u*=2)>e?u:e),e-=r,n>>>=0;n>=128;)this.view[e++]=127&n|128,n>>>=7;return this.view[e++]=n,l?(this.offset=e,this):r},e.writeVarint32ZigZag=function(n,e){return this.writeVarint32(t.zigZagEncode32(n),e)},e.readVarint32=function(n){var t=void 0===n;if(t&&(n=this.offset),!this.noAssert){if("number"!=typeof n||n%1!=0)throw TypeError("Illegal offset: "+n+" (not an integer)");if((n>>>=0)<0||n+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+1) <= "+this.buffer.byteLength)}var e,l=0,r=0;do{if(!this.noAssert&&n>this.limit){var u=Error("Truncated");throw u.truncated=!0,u}e=this.view[n++],l<5&&(r|=(127&e)<<7*l),++l}while(0!=(128&e));return r|=0,t?(this.offset=n,r):{value:r,length:l}},e.readVarint32ZigZag=function(n){var e=this.readVarint32(n);return"object"==typeof e?e.value=t.zigZagDecode32(e.value):e=t.zigZagDecode32(e),e},n&&(t.MAX_VARINT64_BYTES=10,t.calculateVarint64=function(t){"number"==typeof t?t=n.fromNumber(t):"string"==typeof t&&(t=n.fromString(t));var e=t.toInt()>>>0,l=t.shiftRightUnsigned(28).toInt()>>>0,r=t.shiftRightUnsigned(56).toInt()>>>0;return 0==r?0==l?e<16384?e<128?1:2:e<1<<21?3:4:l<16384?l<128?5:6:l<1<<21?7:8:r<128?9:10},t.zigZagEncode64=function(t){return"number"==typeof t?t=n.fromNumber(t,!1):"string"==typeof t?t=n.fromString(t,!1):!1!==t.unsigned&&(t=t.toSigned()),t.shiftLeft(1).xor(t.shiftRight(63)).toUnsigned()},t.zigZagDecode64=function(t){return"number"==typeof t?t=n.fromNumber(t,!1):"string"==typeof t?t=n.fromString(t,!1):!1!==t.unsigned&&(t=t.toSigned()),t.shiftRightUnsigned(1).xor(t.and(n.ONE).toSigned().negate()).toSigned()},e.writeVarint64=function(e,l){var r=void 0===l;if(r&&(l=this.offset),!this.noAssert){if("number"==typeof e)e=n.fromNumber(e);else if("string"==typeof e)e=n.fromString(e);else if(!(e&&e instanceof n))throw TypeError("Illegal value: "+e+" (not an integer or Long)");if("number"!=typeof l||l%1!=0)throw TypeError("Illegal offset: "+l+" (not an integer)");if((l>>>=0)<0||l+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+l+" (+0) <= "+this.buffer.byteLength)}"number"==typeof e?e=n.fromNumber(e,!1):"string"==typeof e?e=n.fromString(e,!1):!1!==e.unsigned&&(e=e.toSigned());var u=t.calculateVarint64(e),i=e.toInt()>>>0,o=e.shiftRightUnsigned(28).toInt()>>>0,a=e.shiftRightUnsigned(56).toInt()>>>0,s=this.buffer.byteLength;switch((l+=u)>s&&this.resize((s*=2)>l?s:l),l-=u,u){case 10:this.view[l+9]=a>>>7&1;case 9:this.view[l+8]=9!==u?128|a:127&a;case 8:this.view[l+7]=8!==u?o>>>21|128:o>>>21&127;case 7:this.view[l+6]=7!==u?o>>>14|128:o>>>14&127;case 6:this.view[l+5]=6!==u?o>>>7|128:o>>>7&127;case 5:this.view[l+4]=5!==u?128|o:127&o;case 4:this.view[l+3]=4!==u?i>>>21|128:i>>>21&127;case 3:this.view[l+2]=3!==u?i>>>14|128:i>>>14&127;case 2:this.view[l+1]=2!==u?i>>>7|128:i>>>7&127;case 1:this.view[l]=1!==u?128|i:127&i}return r?(this.offset+=u,this):u},e.writeVarint64ZigZag=function(n,e){return this.writeVarint64(t.zigZagEncode64(n),e)},e.readVarint64=function(t){var e=void 0===t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+1) <= "+this.buffer.byteLength)}var l=t,r=0,u=0,i=0,o=0;if(r=127&(o=this.view[t++]),128&o&&(r|=(127&(o=this.view[t++]))<<7,(128&o||this.noAssert&&void 0===o)&&(r|=(127&(o=this.view[t++]))<<14,(128&o||this.noAssert&&void 0===o)&&(r|=(127&(o=this.view[t++]))<<21,(128&o||this.noAssert&&void 0===o)&&(u=127&(o=this.view[t++]),(128&o||this.noAssert&&void 0===o)&&(u|=(127&(o=this.view[t++]))<<7,(128&o||this.noAssert&&void 0===o)&&(u|=(127&(o=this.view[t++]))<<14,(128&o||this.noAssert&&void 0===o)&&(u|=(127&(o=this.view[t++]))<<21,(128&o||this.noAssert&&void 0===o)&&(i=127&(o=this.view[t++]),(128&o||this.noAssert&&void 0===o)&&(i|=(127&(o=this.view[t++]))<<7,128&o||this.noAssert&&void 0===o))))))))))throw Error("Buffer overrun");var a=n.fromBits(r|u<<28,u>>>4|i<<24,!1);return e?(this.offset=t,a):{value:a,length:t-l}},e.readVarint64ZigZag=function(e){var l=this.readVarint64(e);return l&&l.value instanceof n?l.value=t.zigZagDecode64(l.value):l=t.zigZagDecode64(l),l}),e.writeCString=function(n,t){var e=void 0===t;e&&(t=this.offset);var l,r=n.length;if(!this.noAssert){if("string"!=typeof n)throw TypeError("Illegal str: Not a string");for(l=0;l>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}r=c.calculateUTF16asUTF8(u(n))[1];var i=this.buffer.byteLength;return(t+=r+1)>i&&this.resize((i*=2)>t?i:t),t-=r+1,c.encodeUTF16toUTF8(u(n),(function(n){this.view[t++]=n}).bind(this)),this.view[t++]=0,e?(this.offset=t,this):r},e.readCString=function(n){var t=void 0===n;if(t&&(n=this.offset),!this.noAssert){if("number"!=typeof n||n%1!=0)throw TypeError("Illegal offset: "+n+" (not an integer)");if((n>>>=0)<0||n+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+1) <= "+this.buffer.byteLength)}var e,l=n,r=-1;return c.decodeUTF8toUTF16((function(){if(0===r)return null;if(n>=this.limit)throw RangeError("Illegal range: Truncated data, "+n+" < "+this.limit);return 0===(r=this.view[n++])?null:r}).bind(this),e=i(),!0),t?(this.offset=n,e()):{string:e(),length:n-l}},e.writeIString=function(n,t){var e=void 0===t;if(e&&(t=this.offset),!this.noAssert){if("string"!=typeof n)throw TypeError("Illegal str: Not a string");if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}var l,r=t;l=c.calculateUTF16asUTF8(u(n),this.noAssert)[1];var i=this.buffer.byteLength;if((t+=4+l)>i&&this.resize((i*=2)>t?i:t),t-=4+l,this.littleEndian?(this.view[t+3]=l>>>24&255,this.view[t+2]=l>>>16&255,this.view[t+1]=l>>>8&255,this.view[t]=255&l):(this.view[t]=l>>>24&255,this.view[t+1]=l>>>16&255,this.view[t+2]=l>>>8&255,this.view[t+3]=255&l),t+=4,c.encodeUTF16toUTF8(u(n),(function(n){this.view[t++]=n}).bind(this)),t!==r+4+l)throw RangeError("Illegal range: Truncated data, "+t+" == "+(t+4+l));return e?(this.offset=t,this):t-r},e.readIString=function(n){var e=void 0===n;if(e&&(n=this.offset),!this.noAssert){if("number"!=typeof n||n%1!=0)throw TypeError("Illegal offset: "+n+" (not an integer)");if((n>>>=0)<0||n+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+4) <= "+this.buffer.byteLength)}var l=n,r=this.readUint32(n),u=this.readUTF8String(r,t.METRICS_BYTES,n+=4);return n+=u.length,e?(this.offset=n,u.string):{string:u.string,length:n-l}},t.METRICS_CHARS="c",t.METRICS_BYTES="b",e.writeUTF8String=function(n,t){var e,l=void 0===t;if(l&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}var r=t;e=c.calculateUTF16asUTF8(u(n))[1];var i=this.buffer.byteLength;return(t+=e)>i&&this.resize((i*=2)>t?i:t),t-=e,c.encodeUTF16toUTF8(u(n),(function(n){this.view[t++]=n}).bind(this)),l?(this.offset=t,this):t-r},e.writeString=e.writeUTF8String,t.calculateUTF8Chars=function(n){return c.calculateUTF16asUTF8(u(n))[0]},t.calculateUTF8Bytes=function(n){return c.calculateUTF16asUTF8(u(n))[1]},t.calculateString=t.calculateUTF8Bytes,e.readUTF8String=function(n,e,l){"number"==typeof e&&(l=e,e=void 0);var r=void 0===l;if(r&&(l=this.offset),void 0===e&&(e=t.METRICS_CHARS),!this.noAssert){if("number"!=typeof n||n%1!=0)throw TypeError("Illegal length: "+n+" (not an integer)");if(n|=0,"number"!=typeof l||l%1!=0)throw TypeError("Illegal offset: "+l+" (not an integer)");if((l>>>=0)<0||l+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+l+" (+0) <= "+this.buffer.byteLength)}var u,o=0,a=l;if(e===t.METRICS_CHARS){if(u=i(),c.decodeUTF8((function(){return o>>=0)<0||l+n>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+l+" (+"+n+") <= "+this.buffer.byteLength)}var s=l+n;if(c.decodeUTF8toUTF16((function(){return l>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}var r,i,o=e;r=c.calculateUTF16asUTF8(u(n),this.noAssert)[1],i=t.calculateVarint32(r);var a=this.buffer.byteLength;if((e+=i+r)>a&&this.resize((a*=2)>e?a:e),e-=i+r,e+=this.writeVarint32(r,e),c.encodeUTF16toUTF8(u(n),(function(n){this.view[e++]=n}).bind(this)),e!==o+r+i)throw RangeError("Illegal range: Truncated data, "+e+" == "+(e+r+i));return l?(this.offset=e,this):e-o},e.readVString=function(n){var e=void 0===n;if(e&&(n=this.offset),!this.noAssert){if("number"!=typeof n||n%1!=0)throw TypeError("Illegal offset: "+n+" (not an integer)");if((n>>>=0)<0||n+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+1) <= "+this.buffer.byteLength)}var l=n,r=this.readVarint32(n),u=this.readUTF8String(r.value,t.METRICS_BYTES,n+=r.length);return n+=u.length,e?(this.offset=n,u.string):{string:u.string,length:n-l}},e.append=function(n,e,l){"number"!=typeof e&&"string"==typeof e||(l=e,e=void 0);var r=void 0===l;if(r&&(l=this.offset),!this.noAssert){if("number"!=typeof l||l%1!=0)throw TypeError("Illegal offset: "+l+" (not an integer)");if((l>>>=0)<0||l+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+l+" (+0) <= "+this.buffer.byteLength)}n instanceof t||(n=t.wrap(n,e));var u=n.limit-n.offset;if(u<=0)return this;var i=this.buffer.byteLength;return(l+=u)>i&&this.resize((i*=2)>l?i:l),l-=u,this.view.set(n.view.subarray(n.offset,n.limit),l),n.offset+=u,r&&(this.offset+=u),this},e.appendTo=function(n,t){return n.append(this,t),this},e.assert=function(n){return this.noAssert=!n,this},e.capacity=function(){return this.buffer.byteLength},e.clear=function(){return this.offset=0,this.limit=this.buffer.byteLength,this.markedOffset=-1,this},e.clone=function(n){var e=new t(0,this.littleEndian,this.noAssert);return n?(e.buffer=new ArrayBuffer(this.buffer.byteLength),e.view=new Uint8Array(e.buffer)):(e.buffer=this.buffer,e.view=this.view),e.offset=this.offset,e.markedOffset=this.markedOffset,e.limit=this.limit,e},e.compact=function(n,t){if(void 0===n&&(n=this.offset),void 0===t&&(t=this.limit),!this.noAssert){if("number"!=typeof n||n%1!=0)throw TypeError("Illegal begin: Not an integer");if(n>>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal end: Not an integer");if(t>>>=0,n<0||n>t||t>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+n+" <= "+t+" <= "+this.buffer.byteLength)}if(0===n&&t===this.buffer.byteLength)return this;var e=t-n;if(0===e)return this.buffer=l,this.view=null,this.markedOffset>=0&&(this.markedOffset-=n),this.offset=0,this.limit=0,this;var r=new ArrayBuffer(e),u=new Uint8Array(r);return u.set(this.view.subarray(n,t)),this.buffer=r,this.view=u,this.markedOffset>=0&&(this.markedOffset-=n),this.offset=0,this.limit=e,this},e.copy=function(n,e){if(void 0===n&&(n=this.offset),void 0===e&&(e=this.limit),!this.noAssert){if("number"!=typeof n||n%1!=0)throw TypeError("Illegal begin: Not an integer");if(n>>>=0,"number"!=typeof e||e%1!=0)throw TypeError("Illegal end: Not an integer");if(e>>>=0,n<0||n>e||e>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+n+" <= "+e+" <= "+this.buffer.byteLength)}if(n===e)return new t(0,this.littleEndian,this.noAssert);var l=e-n,r=new t(l,this.littleEndian,this.noAssert);return r.offset=0,r.limit=l,r.markedOffset>=0&&(r.markedOffset-=n),this.copyTo(r,0,n,e),r},e.copyTo=function(n,e,l,r){var u,i;if(!this.noAssert&&!t.isByteBuffer(n))throw TypeError("Illegal target: Not a ByteBuffer");if(e=(i=void 0===e)?n.offset:0|e,l=(u=void 0===l)?this.offset:0|l,r=void 0===r?this.limit:0|r,e<0||e>n.buffer.byteLength)throw RangeError("Illegal target range: 0 <= "+e+" <= "+n.buffer.byteLength);if(l<0||r>this.buffer.byteLength)throw RangeError("Illegal source range: 0 <= "+l+" <= "+this.buffer.byteLength);var o=r-l;return 0===o?n:(n.ensureCapacity(e+o),n.view.set(this.view.subarray(l,r),e),u&&(this.offset+=o),i&&(n.offset+=o),this)},e.ensureCapacity=function(n){var t=this.buffer.byteLength;return tn?t:n):this},e.fill=function(n,t,e){var l=void 0===t;if(l&&(t=this.offset),"string"==typeof n&&n.length>0&&(n=n.charCodeAt(0)),void 0===t&&(t=this.offset),void 0===e&&(e=this.limit),!this.noAssert){if("number"!=typeof n||n%1!=0)throw TypeError("Illegal value: "+n+" (not an integer)");if(n|=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal begin: Not an integer");if(t>>>=0,"number"!=typeof e||e%1!=0)throw TypeError("Illegal end: Not an integer");if(e>>>=0,t<0||t>e||e>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+e+" <= "+this.buffer.byteLength)}if(t>=e)return this;for(;t>>=0)<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}return this.markedOffset=n,this},e.order=function(n){if(!this.noAssert&&"boolean"!=typeof n)throw TypeError("Illegal littleEndian: Not a boolean");return this.littleEndian=!!n,this},e.LE=function(n){return this.littleEndian=void 0===n||!!n,this},e.BE=function(n){return this.littleEndian=void 0!==n&&!n,this},e.prepend=function(n,e,l){"number"!=typeof e&&"string"==typeof e||(l=e,e=void 0);var r=void 0===l;if(r&&(l=this.offset),!this.noAssert){if("number"!=typeof l||l%1!=0)throw TypeError("Illegal offset: "+l+" (not an integer)");if((l>>>=0)<0||l+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+l+" (+0) <= "+this.buffer.byteLength)}n instanceof t||(n=t.wrap(n,e));var u=n.limit-n.offset;if(u<=0)return this;var i=u-l;if(i>0){var o=new ArrayBuffer(this.buffer.byteLength+i),a=new Uint8Array(o);a.set(this.view.subarray(l,this.buffer.byteLength),u),this.buffer=o,this.view=a,this.offset+=i,this.markedOffset>=0&&(this.markedOffset+=i),this.limit+=i,l+=i}else new Uint8Array(this.buffer);return this.view.set(n.view.subarray(n.offset,n.limit),l-u),n.offset=n.limit,r&&(this.offset-=u),this},e.prependTo=function(n,t){return n.prepend(this,t),this},e.printDebug=function(n){"function"!=typeof n&&(n=console.log.bind(console)),n(this.toString()+"\n-------------------------------------------------------------------\n"+this.toDebug(!0))},e.remaining=function(){return this.limit-this.offset},e.reset=function(){return this.markedOffset>=0?(this.offset=this.markedOffset,this.markedOffset=-1):this.offset=0,this},e.resize=function(n){if(!this.noAssert){if("number"!=typeof n||n%1!=0)throw TypeError("Illegal capacity: "+n+" (not an integer)");if((n|=0)<0)throw RangeError("Illegal capacity: 0 <= "+n)}if(this.buffer.byteLength>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal end: Not an integer");if(t>>>=0,n<0||n>t||t>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+n+" <= "+t+" <= "+this.buffer.byteLength)}return n===t?this:(Array.prototype.reverse.call(this.view.subarray(n,t)),this)},e.skip=function(n){if(!this.noAssert){if("number"!=typeof n||n%1!=0)throw TypeError("Illegal length: "+n+" (not an integer)");n|=0}var t=this.offset+n;if(!this.noAssert&&(t<0||t>this.buffer.byteLength))throw RangeError("Illegal length: 0 <= "+this.offset+" + "+n+" <= "+this.buffer.byteLength);return this.offset=t,this},e.slice=function(n,t){if(void 0===n&&(n=this.offset),void 0===t&&(t=this.limit),!this.noAssert){if("number"!=typeof n||n%1!=0)throw TypeError("Illegal begin: Not an integer");if(n>>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal end: Not an integer");if(t>>>=0,n<0||n>t||t>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+n+" <= "+t+" <= "+this.buffer.byteLength)}var e=this.clone();return e.offset=n,e.limit=t,e},e.toBuffer=function(n){var t=this.offset,e=this.limit;if(!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: Not an integer");if(t>>>=0,"number"!=typeof e||e%1!=0)throw TypeError("Illegal limit: Not an integer");if(e>>>=0,t<0||t>e||e>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+e+" <= "+this.buffer.byteLength)}if(!n&&0===t&&e===this.buffer.byteLength)return this.buffer;if(t===e)return l;var r=new ArrayBuffer(e-t);return new Uint8Array(r).set(new Uint8Array(this.buffer).subarray(t,e),0),r},e.toArrayBuffer=e.toBuffer,e.toString=function(n,t,e){if(void 0===n)return"ByteBufferAB(offset="+this.offset+",markedOffset="+this.markedOffset+",limit="+this.limit+",capacity="+this.capacity()+")";switch("number"==typeof n&&(e=t=n="utf8"),n){case"utf8":return this.toUTF8(t,e);case"base64":return this.toBase64(t,e);case"hex":return this.toHex(t,e);case"binary":return this.toBinary(t,e);case"debug":return this.toDebug();case"columns":return this.toColumns();default:throw Error("Unsupported encoding: "+n)}};var s=function(){for(var n={},t=[65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,48,49,50,51,52,53,54,55,56,57,43,47],e=[],l=0,r=t.length;l>2&63]),r=(3&l)<<4,null!==(l=n())?(e(t[63&((r|=l>>4&15)|l>>4&15)]),r=(15&l)<<2,null!==(l=n())?(e(t[63&(r|l>>6&3)]),e(t[63&l])):(e(t[63&r]),e(61))):(e(t[63&r]),e(61),e(61))},n.decode=function(n,t){var l,r,u;function i(n){throw Error("Illegal character code: "+n)}for(;null!==(l=n());)if(void 0===(r=e[l])&&i(l),null!==(l=n())&&(void 0===(u=e[l])&&i(l),t(r<<2>>>0|(48&u)>>4),null!==(l=n()))){if(void 0===(r=e[l])){if(61===l)break;i(l)}if(t((15&u)<<4>>>0|(60&r)>>2),null!==(l=n())){if(void 0===(u=e[l])){if(61===l)break;i(l)}t((3&r)<<6>>>0|u)}}},n.test=function(n){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(n)},n}();e.toBase64=function(n,t){if(void 0===n&&(n=this.offset),void 0===t&&(t=this.limit),t|=0,(n|=0)<0||t>this.capacity||n>t)throw RangeError("begin, end");var e;return s.encode((function(){return nthis.capacity()||n>t)throw RangeError("begin, end");if(n===t)return"";for(var e=[],l=[];n=1024&&(l.push(String.fromCharCode.apply(String,e)),e=[]);return l.join("")+String.fromCharCode.apply(String,e)},t.fromBinary=function(n,e){if("string"!=typeof n)throw TypeError("str");for(var l,r=0,u=n.length,i=new t(u,e);r255)throw RangeError("illegal char code: "+l);i.view[r++]=l}return i.limit=u,i},e.toDebug=function(n){for(var t,e=-1,l=this.buffer.byteLength,r="",u="",i="";e32&&t<127?String.fromCharCode(t):".")),++e,n&&e>0&&e%16==0&&e!==l){for(;r.length<51;)r+=" ";i+=r+u+"\n",r=u=""}r+=e===this.offset&&e===this.limit?e===this.markedOffset?"!":"|":e===this.offset?e===this.markedOffset?"[":"<":e===this.limit?e===this.markedOffset?"]":">":e===this.markedOffset?"'":n||0!==e&&e!==l?" ":""}if(n&&" "!==r){for(;r.length<51;)r+=" ";i+=r+u+"\n"}return n?i:r},t.fromDebug=function(n,e,l){for(var r,u,i=n.length,o=new t((i+1)/3|0,e,l),a=0,s=0,c=!1,f=!1,d=!1,h=!1,p=!1;a":if(!l){if(h){p=!0;break}h=!0}o.limit=s,c=!1;break;case"'":if(!l){if(d){p=!0;break}d=!0}o.markedOffset=s,c=!1;break;case" ":c=!1;break;default:if(!l&&c){p=!0;break}if(u=parseInt(r+n.charAt(a++),16),!l&&(isNaN(u)||u<0||u>255))throw TypeError("Illegal str: Not a debug encoded string");o.view[s++]=u,c=!0}if(p)throw TypeError("Illegal str: Invalid symbol at "+a)}if(!l){if(!f||!h)throw TypeError("Illegal str: Missing offset or limit");if(s>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal end: Not an integer");if(t>>>=0,n<0||n>t||t>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+n+" <= "+t+" <= "+this.buffer.byteLength)}for(var e,l=new Array(t-n);n255))throw TypeError("Illegal str: Contains non-hex characters");i.view[a++]=r}return i.limit=a,i};var c=function(){var n={MAX_CODEPOINT:1114111,encodeUTF8:function(n,t){var e=null;for("number"==typeof n&&(e=n,n=function(){return null});null!==e||null!==(e=n());)e<128?t(127&e):e<2048?(t(e>>6&31|192),t(63&e|128)):e<65536?(t(e>>12&15|224),t(e>>6&63|128),t(63&e|128)):(t(e>>18&7|240),t(e>>12&63|128),t(e>>6&63|128),t(63&e|128)),e=null},decodeUTF8:function(n,t){for(var e,l,r,u,i=function(n){n=n.slice(0,n.indexOf(null));var t=Error(n.toString());throw t.name="TruncatedError",t.bytes=n,t};null!==(e=n());)if(0==(128&e))t(e);else if(192==(224&e))null===(l=n())&&i([e,l]),t((31&e)<<6|63&l);else if(224==(240&e))(null===(l=n())||null===(r=n()))&&i([e,l,r]),t((15&e)<<12|(63&l)<<6|63&r);else{if(240!=(248&e))throw RangeError("Illegal starting byte: "+e);(null===(l=n())||null===(r=n())||null===(u=n()))&&i([e,l,r,u]),t((7&e)<<18|(63&l)<<12|(63&r)<<6|63&u)}},UTF16toUTF8:function(n,t){for(var e,l=null;null!==(e=null!==l?l:n());)e>=55296&&e<=57343&&null!==(l=n())&&l>=56320&&l<=57343?(t(1024*(e-55296)+l-56320+65536),l=null):t(e);null!==l&&t(l)},UTF8toUTF16:function(n,t){var e=null;for("number"==typeof n&&(e=n,n=function(){return null});null!==e||null!==(e=n());)e<=65535?t(e):(t(55296+((e-=65536)>>10)),t(e%1024+56320)),e=null},encodeUTF16toUTF8:function(t,e){n.UTF16toUTF8(t,function(t){n.encodeUTF8(t,e)})},decodeUTF8toUTF16:function(t,e){n.decodeUTF8(t,function(t){n.UTF8toUTF16(t,e)})},calculateCodePoint:function(n){return n<128?1:n<2048?2:n<65536?3:4},calculateUTF8:function(n){for(var t,e=0;null!==(t=n());)e+=t<128?1:t<2048?2:t<65536?3:4;return e},calculateUTF16asUTF8:function(t){var e=0,l=0;return n.UTF16toUTF8(t,function(n){++e,l+=n<128?1:n<2048?2:n<65536?3:4}),[e,l]}};return n}();return e.toUTF8=function(n,t){if(void 0===n&&(n=this.offset),void 0===t&&(t=this.limit),!this.noAssert){if("number"!=typeof n||n%1!=0)throw TypeError("Illegal begin: Not an integer");if(n>>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal end: Not an integer");if(t>>>=0,n<0||n>t||t>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+n+" <= "+t+" <= "+this.buffer.byteLength)}var e;try{c.decodeUTF8toUTF16((function(){return nc;)if((o=a[c++])!=o)return!0}else for(;s>c;c++)if((n||c in a)&&a[c]===e)return n||c||0;return!n&&-1}}},{"./_to-absolute-index":98,"./_to-iobject":100,"./_to-length":101}],56:[function(n,t,e){var l=n("./_cof"),r=n("./_wks")("toStringTag"),u="Arguments"==l(function(){return arguments}());t.exports=function(n){var t,e,i;return void 0===n?"Undefined":null===n?"Null":"string"==typeof(e=function(n,t){try{return n[t]}catch(n){}}(t=Object(n),r))?e:u?l(t):"Object"==(i=l(t))&&"function"==typeof t.callee?"Arguments":i}},{"./_cof":57,"./_wks":107}],57:[function(n,t,e){var l={}.toString;t.exports=function(n){return l.call(n).slice(8,-1)}},{}],58:[function(n,t,e){var l=t.exports={version:"2.5.1"};"number"==typeof __e&&(__e=l)},{}],59:[function(n,t,e){var l=n("./_a-function");t.exports=function(n,t,e){if(l(n),void 0===t)return n;switch(e){case 1:return function(e){return n.call(t,e)};case 2:return function(e,l){return n.call(t,e,l)};case 3:return function(e,l,r){return n.call(t,e,l,r)}}return function(){return n.apply(t,arguments)}}},{"./_a-function":52}],60:[function(n,t,e){t.exports=function(n){if(void 0==n)throw TypeError("Can't call method on "+n);return n}},{}],61:[function(n,t,e){t.exports=!n("./_fails")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},{"./_fails":66}],62:[function(n,t,e){var l=n("./_is-object"),r=n("./_global").document,u=l(r)&&l(r.createElement);t.exports=function(n){return u?r.createElement(n):{}}},{"./_global":67,"./_is-object":74}],63:[function(n,t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],64:[function(n,t,e){var l=n("./_object-keys"),r=n("./_object-gops"),u=n("./_object-pie");t.exports=function(n){var t=l(n),e=r.f;if(e)for(var i,o=e(n),a=u.f,s=0;o.length>s;)a.call(n,i=o[s++])&&t.push(i);return t}},{"./_object-gops":87,"./_object-keys":90,"./_object-pie":91}],65:[function(n,t,e){var l=n("./_global"),r=n("./_core"),u=n("./_ctx"),i=n("./_hide"),o=function(n,t,e){var a,s,c,f=n&o.F,d=n&o.G,h=n&o.S,p=n&o.P,m=n&o.B,g=n&o.W,v=d?r:r[t]||(r[t]={}),b=v.prototype,y=d?l:h?l[t]:(l[t]||{}).prototype;for(a in d&&(e=t),e)(s=!f&&y&&void 0!==y[a])&&a in v||(c=s?y[a]:e[a],v[a]=d&&"function"!=typeof y[a]?e[a]:m&&s?u(c,l):g&&y[a]==c?function(n){var t=function(t,e,l){if(this instanceof n){switch(arguments.length){case 0:return new n;case 1:return new n(t);case 2:return new n(t,e)}return new n(t,e,l)}return n.apply(this,arguments)};return t.prototype=n.prototype,t}(c):p&&"function"==typeof c?u(Function.call,c):c,p&&((v.virtual||(v.virtual={}))[a]=c,n&o.R&&b&&!b[a]&&i(b,a,c)))};o.F=1,o.G=2,o.S=4,o.P=8,o.B=16,o.W=32,o.U=64,o.R=128,t.exports=o},{"./_core":58,"./_ctx":59,"./_global":67,"./_hide":69}],66:[function(n,t,e){t.exports=function(n){try{return!!n()}catch(n){return!0}}},{}],67:[function(n,t,e){var l=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=l)},{}],68:[function(n,t,e){var l={}.hasOwnProperty;t.exports=function(n,t){return l.call(n,t)}},{}],69:[function(n,t,e){var l=n("./_object-dp"),r=n("./_property-desc");t.exports=n("./_descriptors")?function(n,t,e){return l.f(n,t,r(1,e))}:function(n,t,e){return n[t]=e,n}},{"./_descriptors":61,"./_object-dp":82,"./_property-desc":92}],70:[function(n,t,e){var l=n("./_global").document;t.exports=l&&l.documentElement},{"./_global":67}],71:[function(n,t,e){t.exports=!n("./_descriptors")&&!n("./_fails")(function(){return 7!=Object.defineProperty(n("./_dom-create")("div"),"a",{get:function(){return 7}}).a})},{"./_descriptors":61,"./_dom-create":62,"./_fails":66}],72:[function(n,t,e){var l=n("./_cof");t.exports=Object("z").propertyIsEnumerable(0)?Object:function(n){return"String"==l(n)?n.split(""):Object(n)}},{"./_cof":57}],73:[function(n,t,e){var l=n("./_cof");t.exports=Array.isArray||function(n){return"Array"==l(n)}},{"./_cof":57}],74:[function(n,t,e){t.exports=function(n){return"object"==typeof n?null!==n:"function"==typeof n}},{}],75:[function(n,t,e){"use strict";var l=n("./_object-create"),r=n("./_property-desc"),u=n("./_set-to-string-tag"),i={};n("./_hide")(i,n("./_wks")("iterator"),function(){return this}),t.exports=function(n,t,e){n.prototype=l(i,{next:r(1,e)}),u(n,t+" Iterator")}},{"./_hide":69,"./_object-create":81,"./_property-desc":92,"./_set-to-string-tag":94,"./_wks":107}],76:[function(n,t,e){"use strict";var l=n("./_library"),r=n("./_export"),u=n("./_redefine"),i=n("./_hide"),o=n("./_has"),a=n("./_iterators"),s=n("./_iter-create"),c=n("./_set-to-string-tag"),f=n("./_object-gpo"),d=n("./_wks")("iterator"),h=!([].keys&&"next"in[].keys()),p=function(){return this};t.exports=function(n,t,e,m,g,v,b){s(e,t,m);var y,_,w,E=function(n){if(!h&&n in k)return k[n];switch(n){case"keys":case"values":return function(){return new e(this,n)}}return function(){return new e(this,n)}},C=t+" Iterator",A="values"==g,x=!1,k=n.prototype,F=k[d]||k["@@iterator"]||g&&k[g],S=F||E(g),B=g?A?E("entries"):S:void 0,D="Array"==t&&k.entries||F;if(D&&(w=f(D.call(new n)))!==Object.prototype&&w.next&&(c(w,C,!0),l||o(w,d)||i(w,d,p)),A&&F&&"values"!==F.name&&(x=!0,S=function(){return F.call(this)}),l&&!b||!h&&!x&&k[d]||i(k,d,S),a[t]=S,a[C]=p,g)if(y={values:A?S:E("values"),keys:v?S:E("keys"),entries:B},b)for(_ in y)_ in k||u(k,_,y[_]);else r(r.P+r.F*(h||x),t,y);return y}},{"./_export":65,"./_has":68,"./_hide":69,"./_iter-create":75,"./_iterators":78,"./_library":79,"./_object-gpo":88,"./_redefine":93,"./_set-to-string-tag":94,"./_wks":107}],77:[function(n,t,e){t.exports=function(n,t){return{value:t,done:!!n}}},{}],78:[function(n,t,e){t.exports={}},{}],79:[function(n,t,e){t.exports=!0},{}],80:[function(n,t,e){var l=n("./_uid")("meta"),r=n("./_is-object"),u=n("./_has"),i=n("./_object-dp").f,o=0,a=Object.isExtensible||function(){return!0},s=!n("./_fails")(function(){return a(Object.preventExtensions({}))}),c=function(n){i(n,l,{value:{i:"O"+ ++o,w:{}}})},f=t.exports={KEY:l,NEED:!1,fastKey:function(n,t){if(!r(n))return"symbol"==typeof n?n:("string"==typeof n?"S":"P")+n;if(!u(n,l)){if(!a(n))return"F";if(!t)return"E";c(n)}return n[l].i},getWeak:function(n,t){if(!u(n,l)){if(!a(n))return!0;if(!t)return!1;c(n)}return n[l].w},onFreeze:function(n){return s&&f.NEED&&a(n)&&!u(n,l)&&c(n),n}}},{"./_fails":66,"./_has":68,"./_is-object":74,"./_object-dp":82,"./_uid":104}],81:[function(n,t,e){var l=n("./_an-object"),r=n("./_object-dps"),u=n("./_enum-bug-keys"),i=n("./_shared-key")("IE_PROTO"),o=function(){},a=function(){var t,e=n("./_dom-create")("iframe"),l=u.length;for(e.style.display="none",n("./_html").appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("