diff --git a/packages/nervos-chain/lib/bundle.js b/packages/nervos-chain/lib/bundle.js index 9bf6b22..ae5aef9 100644 --- a/packages/nervos-chain/lib/bundle.js +++ b/packages/nervos-chain/lib/bundle.js @@ -1 +1 @@ -(function(){function s(d,e,r){function t(o,i){if(!e[o]){if(!d[o]){var l="function"==typeof require&&require;if(!i&&l)return l(o,!0);if(n)return n(o,!0);var c=new Error("Cannot find module '"+o+"'");throw c.code="MODULE_NOT_FOUND",c}var a=e[o]={exports:{}};d[o][0].call(a.exports,function(e){var r=d[o][1][e];return t(r||e)},a,a.exports,s,d,e,r)}return e[o].exports}for(var n="function"==typeof require&&require,a=0;a{e.appchain=e.appchain||{},e.extend({property:"appchain",methods:[d.peerCount,d.getMetaData,d.getAbi,d.getCode,d.getBalance,d.getTransactionReceipt,d.getAccounts,d.getBlock,d.getBlockByHash,d.getBlockByNumber,d.getBlockNumber,d.getBlockTransactionCount,d.getTransaction,d.getTransactionCount,d.getTransactionProof,d.sendSignedTransaction,d.signTransaction,d.sendTransaction,d.sign,d.call,d.newMessageFilter,d.newBlockFilter,d.getFilterLogs,d.getFilterChanges,d.deleteMessageFilter,d.getLogs,p.getAccounts,p.newAccount,p.sign,p.ecRecover]}),e.appchain.accounts=e.eth.accounts,u.default.setProvider(e.currentProvider),u.default.accounts=e.appchain.accounts,e.appchain.Contract=u.default,e=c.default(e),e.appchain.signer=o.default,e.appchain.unsigner=o.unsigner,e.appchain.deploy=(t,r)=>n(this,void 0,void 0,function*(){const n=yield e.appchain.getBlockNumber().catch(e=>{console.error(e)});let s="",i=[],o=[],d="";"string"==typeof t?s=t:t.code&&(s=t.code,i=t.args||[],o=t.initTypes||[]),i.length&&(d=e.eth.abi.encodeParameters(o,i));const p=Object.assign({version:0,value:0,nonce:a(10*Math.random())},r,{data:s.replace(/^0x/,"")+d,validUntilBlock:+n+88}),c=l.default(e.eth.accounts.wallet)(p),u=yield e.appchain.sendTransaction(c).catch(e=>{throw new Error(e)});return u.hash?e.listeners.listenToTransactionReceipt(u.hash):new Error("No Transaction Hash Received")}),e.appchain._abiAddress="ffffffffffffffffffffffffffffffffff010001",Object.defineProperty(e.appchain,"abiAddress",{get:()=>e.appchain._abiAddress,set:t=>{if(e.utils.isAddress(t))e.appchain._abiAddress=t.replace(/^0x/,"");else throw new Error("Not valid address")}}),e.appchain.storeAbi=(t,r,s)=>n(this,void 0,void 0,function*(){if(!t)throw new Error("Store ABI needs contract address");if(!Array.isArray(r))throw new Error("ABI should be Array type");const n=Object.assign({version:0,value:0,nonce:a(10*Math.random())},s,{to:e.appchain.abiAddress}),i=l.default(e.eth.accounts.wallet)(n);try{const a=e.utils.utf8ToHex(JSON.stringify(r)).slice(2);i.data=t.replace(/^0x/i,"")+a}catch(e){throw new Error(e)}const o=yield e.appchain.sendTransaction(i),d=yield e.listeners.listenToTransactionReceipt(o.hash);return d});const t={sign:e.appchain.neuron_sign};return e.appchain.personal=t,f.default(e)}},{"../contract":8,"../utils/addPrivateKey":20,"./listener":2,"./neuron":3,"./proxy":4,"./rpc":6,"@nervos/signer":296}],2:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});const a=["getTransactionReceipt","getTransaction","getTransactionProof","getFilterChanges"];r.default=e=>{let t={};return a.forEach(r=>{t[`listenTo${r.slice(3)}`]=(t,a=10)=>new Promise((n,s)=>{let i=a,o=null;const d=()=>{clearInterval(o)};o=setInterval(()=>{i||(d(),s("No Result Receved")),e.appchain[r](t).then(e=>{i--,e&&(clearInterval(o),n(e))})},1e3)})}),e.listeners=t,e}},{}],3:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a=e("web3-core-helpers").formatters,n=e("web3-utils");r.getAccounts={name:"getAccounts",call:"personal_listAccounts",params:0,outputFormatter:n.toChecksumAddress},r.newAccount={name:"newAccount",call:"personal_newAccount",params:1,inputFormatter:[null],outputFormatter:n.toChecksumAddress},r.unlockAccount={name:"unlockAccount",call:"personal_unlockAccount",params:3,inputFormatter:[a.inputAddressFormatter,null,null]},r.lockAccount={name:"lockAccount",call:"personal_lockAccount",params:1,inputFormatter:[a.inputAddressFormatter]},r.sign={name:"neuron_sign",call:"neuron_sign",params:3,inputFormatter:[a.inputSignFormatter,a.inputAddressFormatter,null],transformPayload:function(e){return e.params.reverse(),e}},r.ecRecover={name:"ecRecover",call:"personal_ecRecover",params:2,inputFormatter:[a.inputSignFormatter,null]}},{"web3-core-helpers":231,"web3-utils":275}],4:[function(e,t,r){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0});const n=a(e("./proxyHandlers"));r.default=e=>(e.appchain.sendTransaction=new Proxy(e.appchain.sendTransaction,n.default.sendTransactionHandler),e)},{"./proxyHandlers":5}],5:[function(e,t,r){"use strict";var a=this&&this.__awaiter||function(e,t,r,a){return new(r||(r=Promise))(function(n,s){function i(e){try{d(a.next(e))}catch(t){s(t)}}function o(e){try{d(a["throw"](e))}catch(t){s(t)}}function d(e){e.done?n(e.value):new r(function(t){t(e.value)}).then(i,o)}d((a=a.apply(e,t||[])).next())})},n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0});const s=n(e("../../utils/addPrivateKey"));r.sendTransactionHandler={apply:function(e,t,r){return a(this,void 0,void 0,function*(){const a=r[0],n=s.default(t.accounts.wallet)(a);return e(n)})}},r.default={sendTransactionHandler:r.sendTransactionHandler}},{"../../utils/addPrivateKey":20}],6:[function(e,t,r){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t};Object.defineProperty(r,"__esModule",{value:!0});const s=a(e("@nervos/signer"));var i=e("underscore"),o=e("web3-core-helpers").formatters,d=e("web3-utils");const p=n(e("../utils/outputFormatters"));r.peerCount={name:"peerCount",call:"peerCount",params:0},r.getMetaData={name:"getMetaData",call:"getMetaData",params:1,inputFormatter:[o.inputDefaultBlockNumberFormatter]},r.getAbi={name:"getAbi",call:"getAbi",params:2,inputFormatter:[o.inputAddressFormatter,o.inputDefaultBlockNumberFormatter],outputFormatter:p.outputAbiFormatter},r.getTransactionReceipt={name:"getTransactionReceipt",call:"getTransactionReceipt",params:1,outputFormatter:o.outputTransactionReceiptFormatter},r.getCode={name:"getCode",call:"getCode",params:2,inputFormatter:[o.inputAddressFormatter,o.inputDefaultBlockNumberFormatter]},r.getAccounts={name:"getAccounts",call:"accounts",params:0,outputFormatter:d.toChecksumAddress},r.getBalance={name:"getBalance",call:"getBalance",params:2,inputFormatter:[o.inputAddressFormatter,o.inputDefaultBlockNumberFormatter],outputFormatter:d.hexToNumberString};r.getBlock={name:"getBlock",call:function(e){return i.isString(e[0])&&0===e[0].indexOf("0x")?"getBlockByHash":"getBlockByNumber"},params:2,inputFormatter:[o.inputBlockNumberFormatter,function(e){return!!e}],outputFormatter:o.outputBlockFormatter},r.getBlockByHash={name:"getBlockByHash",call:"getBlockByHash",params:2,inputFormatter:[o.inputBlockNumberFormatter,function(e){return!!e}],outputFormatter:o.outputBlockFormatter},r.getBlockByNumber={name:"getBlockByNumber",call:"getBlockByNumber",params:2,inputFormatter:[o.inputBlockNumberFormatter,function(e){return!!e}],outputFormatter:o.outputBlockFormatter},r.getBlockNumber={name:"getBlockNumber",call:"blockNumber",params:0,outputFormatter:d.hexToNumber};r.getBlockTransactionCount={name:"getBlockTransactionCount",call:function(e){return i.isString(e[0])&&0===e[0].indexOf("0x")?"getBlockTransactionCountByHash":"getBlockTransactionCountByNumber"},params:1,inputFormatter:[o.inputBlockNumberFormatter],outputFormatter:d.hexToNumber},r.getTransaction={name:"getTransaction",call:"getTransaction",params:1,inputFormatter:[null]},r.getTransactionCount={name:"getTransactionCount",call:"getTransactionCount",params:2,inputFormatter:[o.inputAddressFormatter,o.inputDefaultBlockNumberFormatter],outputFormatter:d.hexToNumber},r.getTransactionProof={name:"getTransactionProof",call:"getTransactionProof",params:1,inputFormatter:[o.inputAddressFormatter]},r.sendSignedTransaction={name:"sendSignedTransaction",call:"sendRawTransaction",params:1,inputFormatter:[null]},r.signTransaction={name:"signTransaction",call:"signTransaction",params:1,inputFormatter:[s.default]};r.sendTransaction={name:"sendTransaction",call:e=>e&&e.length&&e[0]&&e[0].privateKey?"sendRawTransaction":"sendTransaction",params:1,inputFormatter:[s.default]},r.newMessageFilter={name:"newMessageFilter",call:"newFilter",params:1},r.newBlockFilter={name:"newBlockFilter",call:"newBlockFilter",params:0},r.getFilterChanges={name:"getFilterChanges",call:"getFilterChanges",params:1},r.getFilterLogs={name:"getFilterLogs",call:"getFilterLogs",params:1},r.deleteMessageFilter={name:"deleteMessageFilter",call:"uninstallFilter",params:1},r.sign={name:"sign",call:"sign",params:2,inputFormatter:[o.inputSignFormatter,o.inputAddressFormatter],transformPayload:function(e){return e.params.reverse(),e}},r.call={name:"call",call:"call",params:2,inputFormatter:[o.inputCallFormatter,o.inputDefaultBlockNumberFormatter]},r.getLogs={name:"getLogs",call:"getLogs",params:1}},{"../utils/outputFormatters":21,"@nervos/signer":296,underscore:221,"web3-core-helpers":231,"web3-utils":275}],7:[function(e,t,r){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0});const n=a(e("./index"));window&&(window.Nervos=n.default)},{"./index":9}],8:[function(e,t,r){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t};Object.defineProperty(r,"__esModule",{value:!0});const s=a(e("@nervos/signer")),i=a(e("../utils/addPrivateKey")),o=n(e("underscore")),d=e("web3-eth-contract"),p=e("web3-core-method"),c=e("web3-utils"),{formatters:l}=e("web3-core-helpers"),u=e("web3-core-promievent");var f;(function(e){e.NONE="",e.CALL="call",e.SEND="send",e.SEND_TRANSACTION="sendTransaction"})(f||(f={}));const y=e=>{const t=i.default(d.accounts.wallet)(e);return s.default(t)};d.prototype._executeMethod=function(){const e=this;let t=this._parent._processExecuteArguments.call(this,Array.prototype.slice.call(arguments),void 0);var r=u("send"!==t.type);const a=e.constructor._ethAccounts||e._ethAccounts;if(t.generateRequest){const e={params:[l.inputCallFormatter.call(this._parent,t.options)],callback:t.callback,method:"",format:null};return t.type===f.CALL?(e.params.push(l.inputDefaultBlockNumberFormatter.call(this._parent,t.defaultBlock)),e.method=f.CALL,e.format=this._parent._decodeMethodReturn.bind(null,this._method.outputs)):e.method=f.SEND_TRANSACTION,e}switch(t.type){case f.CALL:const s=new p({name:"call",call:f.CALL,params:2,inputFormatter:[l.inputCallFormatter,l.inputDefaultBlockNumberFormatter],outputFormatter:function(t){return e._parent._decodeMethodReturn(e._method.outputs,t)},requestManager:e._parent._requestManager,accounts:a,defaultAccount:e._parent.defaultAccount,defaultBlock:e._parent.defaultBlock}).createFunction();return s(t.options,t.defaultBlock,t.callback);case f.SEND:if(!c.isAddress(t.options.from))return c._fireError(new Error("No \"from\" address specified in neither the given options, nor the default options."),r.eventEmitter,r.reject,t.callback);if(o.isBoolean(this._method.payable)&&!this._method.payable&&t.options.value&&0{if(o.isArray(t.logs)){var r=o.map(t.logs,function(t){return e._parent._decodeEventABI.call({name:"ALLEVENTS",jsonInterface:e._parent.options.jsonInterface},t)});t.events={};let a=0;r.forEach(e=>{e.event?t.events[e.event]?Array.isArray(t.events[e.event])?t.events[e.event].push(e):t.events[e.event]=[t.events[e.event],e]:t.events[e.event]=e:(t.events[a]=e,a++)}),delete t.logs}return t},contractDeployFormatter:t=>{const r=e._parent.clone();return r.options.address=t.contractAddress,r}}}).createFunction();return n(t.options,t.callback);}},r.default=d},{"../utils/addPrivateKey":20,"@nervos/signer":296,underscore:221,"web3-core-helpers":231,"web3-core-method":232,"web3-core-promievent":233,"web3-eth-contract":263,"web3-utils":275}],9:[function(e,t,r){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0});const n=a(e("web3")),s=a(e("./systems")),i=a(e("./appchain")),o=a(e("./utils/patchHexToBytes"));r.default=(e,t=n.default)=>{const r=new t(e);o.default(r);const a=i.default(r),d=s.default(a);return d}},{"./appchain":1,"./systems":19,"./utils/patchHexToBytes":22,web3:279}],10:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=[{constant:!1,inputs:[{name:"_account",type:"address"}],name:"update",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"_account",type:"address"}],name:"isAdmin",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"admin",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{inputs:[{name:"_account",type:"address"}],payable:!1,stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,name:"_account",type:"address"},{indexed:!0,name:"_old",type:"address"},{indexed:!0,name:"_sender",type:"address"}],name:"AdminUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"errorType",type:"uint8"},{indexed:!1,name:"msg",type:"string"}],name:"ErrorLog",type:"event"}]},{}],11:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=[{constant:!0,inputs:[],name:"deleteRoleAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_account",type:"address"},{name:"_permission",type:"address"}],name:"cancelAuth",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"createContractAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_account",type:"address"},{name:"_permission",type:"address"}],name:"checkPermission",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_permission",type:"address"}],name:"queryAccounts",outputs:[{name:"_accounts",type:"address[]"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"rootGroupAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"groupCreatorAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"newPermissionAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_permission",type:"address"}],name:"clearAuthOfPermission",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"permissionCreatorAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"deleteGroupAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"newRoleAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"cancelAuthAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"cancelRoleAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"newGroupAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"roleManagementAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"deletePermissionAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"setAuthAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"adminAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"updateRoleAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_account",type:"address"}],name:"queryPermissions",outputs:[{name:"_permissions",type:"address[]"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"userManagementAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"updateGroupAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_account",type:"address"}],name:"clearAuth",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"permissionManagementAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"authorizationAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"setRoleAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"sendTxAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"queryAllAccounts",outputs:[{name:"",type:"address[]"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_account",type:"address"},{name:"_cont",type:"address"},{name:"_func",type:"bytes4"}],name:"checkResource",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"roleAuthAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"updatePermissionAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"roleCreatorAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_account",type:"address"},{name:"_permission",type:"address"}],name:"setAuth",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{inputs:[{name:"_superAdmin",type:"address"}],payable:!1,stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,name:"_account",type:"address"},{indexed:!0,name:"_permission",type:"address"}],name:"AuthSetted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"_account",type:"address"},{indexed:!0,name:"_permission",type:"address"}],name:"AuthCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"_account",type:"address"}],name:"AuthCleared",type:"event"}]},{}],12:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=[{constant:!1,inputs:[],name:"getChainId",outputs:[{name:"",type:"uint32"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"chainId",type:"uint32"},{name:"blockNumber",type:"uint64"},{name:"stateProof",type:"bytes"}],name:"verifyState",outputs:[{name:"",type:"address"},{name:"",type:"uint256"},{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"chainId",type:"uint32"},{name:"blockHeader",type:"bytes"}],name:"verifyBlockHeader",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"id",type:"uint32"}],name:"getAuthorities",outputs:[{name:"",type:"address[]"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"getParentChainId",outputs:[{name:"",type:"uint32"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"id",type:"uint32"}],name:"enableSideChain",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"chainId",type:"uint32"}],name:"getExpectedBlockNumber",outputs:[{name:"",type:"uint64"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"sideChainId",type:"uint32"},{name:"addrs",type:"address[]"}],name:"newSideChain",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"id",type:"uint32"}],name:"disableSideChain",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"",type:"uint32"}],name:"sideChains",outputs:[{name:"status",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{inputs:[{name:"_pid",type:"uint32"},{name:"_addrs",type:"address[]"}],payable:!1,stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,name:"errorType",type:"uint8"},{indexed:!1,name:"msg",type:"string"}],name:"ErrorLog",type:"event"}]},{}],13:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=[{constant:!0,inputs:[],name:"deleteRoleAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"createContractAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_origin",type:"address"},{name:"_target",type:"address"},{name:"_accounts",type:"address[]"}],name:"addAccounts",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"rootGroupAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"groupCreatorAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"newPermissionAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"permissionCreatorAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"deleteGroupAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"newRoleAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"cancelAuthAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"cancelRoleAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"newGroupAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"roleManagementAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"deletePermissionAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"queryGroups",outputs:[{name:"",type:"address[]"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"setAuthAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_origin",type:"address"},{name:"_target",type:"address"},{name:"_name",type:"bytes32"}],name:"updateGroupName",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"adminAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"updateRoleAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"userManagementAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"updateGroupAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_origin",type:"address"},{name:"_target",type:"address"}],name:"deleteGroup",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"permissionManagementAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"authorizationAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"setRoleAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"sendTxAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_origin",type:"address"},{name:"_name",type:"bytes32"},{name:"_accounts",type:"address[]"}],name:"newGroup",outputs:[{name:"new_group",type:"address"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"_origin",type:"address"},{name:"_target",type:"address"},{name:"_accounts",type:"address[]"}],name:"deleteAccounts",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"roleAuthAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"updatePermissionAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_origin",type:"address"},{name:"_target",type:"address"}],name:"checkScope",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"roleCreatorAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{inputs:[],payable:!1,stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!1,name:"_group",type:"address"}],name:"GroupDeleted",type:"event"}]},{}],14:[function(e,t,r){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0});const n=a(e("./admin")),s=a(e("./authorization")),i=a(e("./chainManager")),o=a(e("./groupManagement")),d=a(e("./nodeManager")),p=a(e("./permissionManagement")),c=a(e("./quotaManager")),l={admin:n.default,authorization:s.default,chainManager:i.default,groupManagement:o.default,nodeManager:d.default,permissionManagement:p.default,quotaManager:c.default};r.default=l},{"./admin":10,"./authorization":11,"./chainManager":12,"./groupManagement":13,"./nodeManager":15,"./permissionManagement":16,"./quotaManager":17}],15:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=[{constant:!0,inputs:[],name:"deleteRoleAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_node",type:"address"}],name:"stakePermillage",outputs:[{name:"",type:"uint64"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"createContractAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_node",type:"address"}],name:"deleteNode",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"rootGroupAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_node",type:"address"}],name:"getStatus",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"groupCreatorAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"newPermissionAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"permissionCreatorAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"deleteGroupAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_node",type:"address"},{name:"stake",type:"uint64"}],name:"setStake",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"newRoleAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"cancelAuthAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"listNode",outputs:[{name:"",type:"address[]"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"cancelRoleAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"address"}],name:"status",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"newGroupAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"listStake",outputs:[{name:"_stakes",type:"uint64[]"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"roleManagementAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"deletePermissionAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"setAuthAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"adminAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"updateRoleAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"userManagementAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"updateGroupAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"permissionManagementAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"authorizationAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"setRoleAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"sendTxAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_node",type:"address"}],name:"approveNode",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"roleAuthAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"updatePermissionAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"roleCreatorAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{inputs:[{name:"_nodes",type:"address[]"},{name:"_stakes",type:"uint64[]"}],payable:!1,stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,name:"errorType",type:"uint8"},{indexed:!1,name:"msg",type:"string"}],name:"ErrorLog",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"_node",type:"address"}],name:"ApproveNode",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"_node",type:"address"}],name:"DeleteNode",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"_node",type:"address"},{indexed:!1,name:"_stake",type:"uint256"}],name:"SetStake",type:"event"}]},{}],16:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=[{constant:!0,inputs:[],name:"deleteRoleAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_account",type:"address"},{name:"_permission",type:"address"}],name:"setAuthorization",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"createContractAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"rootGroupAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"groupCreatorAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_account",type:"address"},{name:"_permission",type:"address"}],name:"cancelAuthorization",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"newPermissionAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"permissionCreatorAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"deleteGroupAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_account",type:"address"},{name:"_permissions",type:"address[]"}],name:"setAuthorizations",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"_permission",type:"address"},{name:"_name",type:"bytes32"}],name:"updatePermissionName",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"newRoleAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"cancelAuthAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"cancelRoleAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_permission",type:"address"},{name:"_conts",type:"address[]"},{name:"_funcs",type:"bytes4[]"}],name:"deleteResources",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"newGroupAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"roleManagementAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"deletePermissionAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"setAuthAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"adminAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"updateRoleAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_permission",type:"address"}],name:"deletePermission",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"userManagementAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_account",type:"address"}],name:"clearAuthorization",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"updateGroupAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_account",type:"address"},{name:"_permissions",type:"address[]"}],name:"cancelAuthorizations",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"permissionManagementAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"authorizationAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"setRoleAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"sendTxAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"roleAuthAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"updatePermissionAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"roleCreatorAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_permission",type:"address"},{name:"_conts",type:"address[]"},{name:"_funcs",type:"bytes4[]"}],name:"addResources",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"_name",type:"bytes32"},{name:"_conts",type:"address[]"},{name:"_funcs",type:"bytes4[]"}],name:"newPermission",outputs:[{name:"id",type:"address"}],payable:!1,stateMutability:"nonpayable",type:"function"},{anonymous:!1,inputs:[{indexed:!1,name:"_permission",type:"address"}],name:"PermissionDeleted",type:"event"}]},{}],17:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=[{constant:!0,inputs:[],name:"deleteRoleAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"getBQL",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"createContractAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"rootGroupAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"groupCreatorAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"newPermissionAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"permissionCreatorAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"deleteGroupAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_account",type:"address"},{name:"_value",type:"uint256"}],name:"setAQL",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"newRoleAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"cancelAuthAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"cancelRoleAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"newGroupAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"roleManagementAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"deletePermissionAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"setAuthAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"adminAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"updateRoleAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"getAccounts",outputs:[{name:"",type:"address[]"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_value",type:"uint256"}],name:"setBQL",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"_account",type:"address"}],name:"getAQL",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"userManagementAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"updateGroupAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_value",type:"uint256"}],name:"setDefaultAQL",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"permissionManagementAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"getDefaultAQL",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"authorizationAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"setRoleAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"sendTxAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"getQuotas",outputs:[{name:"",type:"uint256[]"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"roleAuthAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"updatePermissionAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"roleCreatorAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{inputs:[{name:"_admin",type:"address"}],payable:!1,stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,name:"errorType",type:"uint8"},{indexed:!1,name:"msg",type:"string"}],name:"ErrorLog",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"_value",type:"uint256"},{indexed:!0,name:"_sender",type:"address"}],name:"DefaultAqlSetted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"_value",type:"uint256"},{indexed:!0,name:"_sender",type:"address"}],name:"BqlSetted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"_account",type:"address"},{indexed:!1,name:"_value",type:"uint256"},{indexed:!0,name:"_sender",type:"address"}],name:"AqlSetted",type:"event"}]},{}],18:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.ReservedAddr={admin:"0xffffffffffffffffffffffffffffffffff02000c",authorization:"0xffffffffffffffffffffffffffffffffff020006",chainManageer:"0xffffffffffffffffffffffffffffffffff020002",groupManagement:"0xffffffffffffffffffffffffffffffffff02000a",nodeManager:"0xffffffffffffffffffffffffffffffffff020001",permissionManagement:"0xffffffffffffffffffffffffffffffffff020004",quotaManager:"0xffffffffffffffffffffffffffffffffff020003"}},{}],19:[function(e,t,r){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0});const n=e("./config"),s=a(e("./abis")),i=["admin","authorization","chainManager","groupManagement","nodeManager","permissionManagement","quotaManager"],o=(e,t)=>new e.appchain.Contract(s.default[t],n.ReservedAddr[t]);r.default=e=>{const t={};return i.forEach(r=>{t[r]=o(e,r)}),Object.assign(e,{system:t})}},{"./abis":14,"./config":18}],20:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=e=>t=>!e.length||t.privateKey&&(66===t.privateKey.length||64===t.privateKey.length)?t:(t.privateKey||(t.privateKey=e[0].privateKey,t.from=e[0].from),t)},{}],21:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a=e("web3-utils");r.outputAbiFormatter=e=>{if("string"!=typeof e)throw new Error("Malformed ABI");const t=a.hexToUtf8(e);try{const e=JSON.parse(t);return e}catch(e){throw new Error("Malformed ABI")}}},{"web3-utils":275}],22:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=e=>{e.utils.hexToBytes=new Proxy(e.utils.hexToBytes,{apply:(e,t,r)=>{let a=(""+r[0]||"").replace(/^0x/,"");return console.log(a),a.length%2&&(a="0"+a),e("0x"+a)}})}},{}],23:[function(e,t){t.exports=e("./register")().Promise},{"./register":25}],24:[function(e,t){"use strict";var r=null;t.exports=function(e,t){return function(a,n){a=a||null,n=n||{};var s=!1!==n.global;if(null===r&&s&&(r=e["@@any-promise/REGISTRATION"]||null),null!==r&&null!==a&&r.implementation!==a)throw new Error("any-promise already defined as \""+r.implementation+"\". You can only register an implementation before the first call to require(\"any-promise\") and an implementation cannot be changed");return null===r&&(r=null!==a&&"undefined"!=typeof n.Promise?{Promise:n.Promise,implementation:a}:t(a),s&&(e["@@any-promise/REGISTRATION"]=r)),r}}},{}],25:[function(e,t){"use strict";t.exports=e("./loader")(window,function(){if("undefined"==typeof window.Promise)throw new Error("any-promise browser requires a polyfill or explicit registration e.g: require('any-promise/register/bluebird')");return{Promise:window.Promise,implementation:"window.Promise"}})},{"./loader":24}],26:[function(e,t,r){var a=r;a.bignum=e("bn.js"),a.define=e("./asn1/api").define,a.base=e("./asn1/base"),a.constants=e("./asn1/constants"),a.decoders=e("./asn1/decoders"),a.encoders=e("./asn1/encoders")},{"./asn1/api":27,"./asn1/base":29,"./asn1/constants":33,"./asn1/decoders":35,"./asn1/encoders":38,"bn.js":41}],27:[function(e,t,r){function a(e,t){this.name=e,this.body=t,this.decoders={},this.encoders={}}var n=e("../asn1"),s=e("inherits");r.define=function(e,t){return new a(e,t)};a.prototype._createNamed=function(t){var r;try{r=e("vm").runInThisContext("(function "+this.name+"(entity) {\n this._initNamed(entity);\n})")}catch(t){r=function(e){this._initNamed(e)}}return s(r,t),r.prototype._initNamed=function(e){t.call(this,e)},new r(this)},a.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(n.decoders[e])),this.decoders[e]},a.prototype.decode=function(e,t,r){return this._getDecoder(t).decode(e,r)},a.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(n.encoders[e])),this.encoders[e]},a.prototype.encode=function(e,t,r){return this._getEncoder(t).encode(e,r)}},{"../asn1":26,inherits:137,vm:227}],28:[function(e,t,r){function a(e,t){return i.call(this,t),o.isBuffer(e)?void(this.base=e,this.offset=0,this.length=e.length):void this.error("Input not Buffer")}function n(e,t){if(Array.isArray(e))this.length=0,this.value=e.map(function(e){return e instanceof n||(e=new n(e,t)),this.length+=e.length,e},this);else if("number"==typeof e){if(!(0<=e&&255>=e))return t.error("non-byte EncoderBuffer value");this.value=e,this.length=1}else if("string"==typeof e)this.value=e,this.length=o.byteLength(e);else if(o.isBuffer(e))this.value=e,this.length=e.length;else return t.error("Unsupported type: "+typeof e)}var s=e("inherits"),i=e("../base").Reporter,o=e("buffer").Buffer;s(a,i),r.DecoderBuffer=a,a.prototype.save=function(){return{offset:this.offset,reporter:i.prototype.save.call(this)}},a.prototype.restore=function(e){var t=new a(this.base);return t.offset=e.offset,t.length=this.offset,this.offset=e.offset,i.prototype.restore.call(this,e.reporter),t},a.prototype.isEmpty=function(){return this.offset===this.length},a.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")},a.prototype.skip=function(e,t){if(!(this.offset+e<=this.length))return this.error(t||"DecoderBuffer overrun");var r=new a(this.base);return r._reporterState=this._reporterState,r.offset=this.offset,r.length=this.offset+e,this.offset+=e,r},a.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)},r.EncoderBuffer=n,n.prototype.join=function(e,t){return(e||(e=new o(this.length)),t||(t=0),0===this.length)?e:(Array.isArray(this.value)?this.value.forEach(function(r){r.join(e,t),t+=r.length}):("number"==typeof this.value?e[t]=this.value:"string"==typeof this.value?e.write(this.value,t):o.isBuffer(this.value)&&this.value.copy(e,t),t+=this.length),e)}},{"../base":29,buffer:73,inherits:137}],29:[function(e,t,r){var a=r;a.Reporter=e("./reporter").Reporter,a.DecoderBuffer=e("./buffer").DecoderBuffer,a.EncoderBuffer=e("./buffer").EncoderBuffer,a.Node=e("./node")},{"./buffer":28,"./node":30,"./reporter":31}],30:[function(e,t){function r(e,t){var r={};this._baseState=r,r.enc=e,r.parent=t||null,r.children=null,r.tag=null,r.args=null,r.reverseArgs=null,r.choice=null,r.optional=!1,r.any=!1,r.obj=!1,r.use=null,r.useDecoder=null,r.key=null,r["default"]=null,r.explicit=null,r.implicit=null,r.contains=null,r.parent||(r.children=[],this._wrap())}var a=e("../base").Reporter,n=e("../base").EncoderBuffer,s=e("../base").DecoderBuffer,i=e("minimalistic-assert"),o=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],d=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(o);t.exports=r;var p=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];r.prototype.clone=function(){var e=this._baseState,t={};p.forEach(function(r){t[r]=e[r]});var r=new this.constructor(t.parent);return r._baseState=t,r},r.prototype._wrap=function(){var e=this._baseState;d.forEach(function(t){this[t]=function(){var r=new this.constructor(this);return e.children.push(r),r[t].apply(r,arguments)}},this)},r.prototype._init=function(e){var t=this._baseState;i(null===t.parent),e.call(this),t.children=t.children.filter(function(e){return e._baseState.parent===this},this),i.equal(t.children.length,1,"Root node can have only one child")},r.prototype._useArgs=function(e){var t=this._baseState,r=e.filter(function(e){return e instanceof this.constructor},this);e=e.filter(function(e){return!(e instanceof this.constructor)},this),0!==r.length&&(i(null===t.children),t.children=r,r.forEach(function(e){e._baseState.parent=this},this)),0!==e.length&&(i(null===t.args),t.args=e,t.reverseArgs=e.map(function(e){if("object"!=typeof e||e.constructor!==Object)return e;var t={};return Object.keys(e).forEach(function(r){r==(0|r)&&(r|=0);var a=e[r];t[a]=r}),t}))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach(function(e){r.prototype[e]=function(){var t=this._baseState;throw new Error(e+" not implemented for encoding: "+t.enc)}}),o.forEach(function(e){r.prototype[e]=function(){var t=this._baseState,r=Array.prototype.slice.call(arguments);return i(null===t.tag),t.tag=e,this._useArgs(r),this}}),r.prototype.use=function(e){i(e);var t=this._baseState;return i(null===t.use),t.use=e,this},r.prototype.optional=function(){var e=this._baseState;return e.optional=!0,this},r.prototype.def=function(e){var t=this._baseState;return i(null===t["default"]),t["default"]=e,t.optional=!0,this},r.prototype.explicit=function(e){var t=this._baseState;return i(null===t.explicit&&null===t.implicit),t.explicit=e,this},r.prototype.implicit=function(e){var t=this._baseState;return i(null===t.explicit&&null===t.implicit),t.implicit=e,this},r.prototype.obj=function(){var e=this._baseState,t=Array.prototype.slice.call(arguments);return e.obj=!0,0!==t.length&&this._useArgs(t),this},r.prototype.key=function(e){var t=this._baseState;return i(null===t.key),t.key=e,this},r.prototype.any=function(){var e=this._baseState;return e.any=!0,this},r.prototype.choice=function(e){var t=this._baseState;return i(null===t.choice),t.choice=e,this._useArgs(Object.keys(e).map(function(t){return e[t]})),this},r.prototype.contains=function(e){var t=this._baseState;return i(null===t.use),t.contains=e,this},r.prototype._decode=function(e,t){var r=this._baseState;if(null===r.parent)return e.wrapResult(r.children[0]._decode(e,t));var a=r["default"],n=!0,i=null;if(null!==r.key&&(i=e.enterKey(r.key)),r.optional){var o=null;if(null===r.explicit?null===r.implicit?null!==r.tag&&(o=r.tag):o=r.implicit:o=r.explicit,null===o&&!r.any){var d=e.save();try{null===r.choice?this._decodeGeneric(r.tag,e,t):this._decodeChoice(e,t),n=!0}catch(t){n=!1}e.restore(d)}else if(n=this._peekTag(e,o,r.any),e.isError(n))return n}var p;if(r.obj&&n&&(p=e.enterObject()),n){if(null!==r.explicit){var c=this._decodeTag(e,r.explicit);if(e.isError(c))return c;e=c}var l=e.offset;if(null===r.use&&null===r.choice){if(r.any)var d=e.save();var u=this._decodeTag(e,null===r.implicit?r.tag:r.implicit,r.any);if(e.isError(u))return u;r.any?a=e.raw(d):e=u}if(t&&t.track&&null!==r.tag&&t.track(e.path(),l,e.length,"tagged"),t&&t.track&&null!==r.tag&&t.track(e.path(),e.offset,e.length,"content"),a=r.any?a:null===r.choice?this._decodeGeneric(r.tag,e,t):this._decodeChoice(e,t),e.isError(a))return a;if(r.any||null!==r.choice||null===r.children||r.children.forEach(function(r){r._decode(e,t)}),r.contains&&("octstr"===r.tag||"bitstr"===r.tag)){var f=new s(a);a=this._getUse(r.contains,e._reporterState.obj)._decode(f,t)}}return r.obj&&n&&(a=e.leaveObject(p)),null!==r.key&&(null!==a||!0===n)?e.leaveKey(i,r.key,a):null!==i&&e.exitKey(i),a},r.prototype._decodeGeneric=function(e,t,r){var a=this._baseState;if("seq"===e||"set"===e)return null;return"seqof"===e||"setof"===e?this._decodeList(t,e,a.args[0],r):/str$/.test(e)?this._decodeStr(t,e,r):"objid"===e&&a.args?this._decodeObjid(t,a.args[0],a.args[1],r):"objid"===e?this._decodeObjid(t,null,null,r):"gentime"===e||"utctime"===e?this._decodeTime(t,e,r):"null_"===e?this._decodeNull(t,r):"bool"===e?this._decodeBool(t,r):"objDesc"===e?this._decodeStr(t,e,r):"int"===e||"enum"===e?this._decodeInt(t,a.args&&a.args[0],r):null===a.use?t.error("unknown tag: "+e):this._getUse(a.use,t._reporterState.obj)._decode(t,r)},r.prototype._getUse=function(e,t){var r=this._baseState;return r.useDecoder=this._use(e,t),i(null===r.useDecoder._baseState.parent),r.useDecoder=r.useDecoder._baseState.children[0],r.implicit!==r.useDecoder._baseState.implicit&&(r.useDecoder=r.useDecoder.clone(),r.useDecoder._baseState.implicit=r.implicit),r.useDecoder},r.prototype._decodeChoice=function(t,e){var r=this._baseState,a=null,n=!1;return Object.keys(r.choice).some(function(s){var i=t.save(),o=r.choice[s];try{var d=o._decode(t,e);if(t.isError(d))return!1;a={type:s,value:d},n=!0}catch(r){return t.restore(i),!1}return!0},this),n?a:t.error("Choice not matched")},r.prototype._createEncoderBuffer=function(e){return new n(e,this.reporter)},r.prototype._encode=function(e,t,r){var a=this._baseState;if(null===a["default"]||a["default"]!==e){var n=this._encodeValue(e,t,r);return void 0===n||this._skipDefault(n,t,r)?void 0:n}},r.prototype._encodeValue=function(e,t,r){var n=this._baseState;if(null===n.parent)return n.children[0]._encode(e,t||new a);var s=null;if(this.reporter=t,n.optional&&void 0===e)if(null!==n["default"])e=n["default"];else return;var i=null,o=!1;if(n.any)s=this._createEncoderBuffer(e);else if(n.choice)s=this._encodeChoice(e,t);else if(n.contains)i=this._getUse(n.contains,r)._encode(e,t),o=!0;else if(n.children)i=n.children.map(function(r){if("null_"===r._baseState.tag)return r._encode(null,t,e);if(null===r._baseState.key)return t.error("Child should have a key");var a=t.enterKey(r._baseState.key);if("object"!=typeof e)return t.error("Child expected, but input is not object");var n=r._encode(e[r._baseState.key],t,e);return t.leaveKey(a),n},this).filter(function(e){return e}),i=this._createEncoderBuffer(i);else if("seqof"===n.tag||"setof"===n.tag){if(!(n.args&&1===n.args.length))return t.error("Too many args for : "+n.tag);if(!Array.isArray(e))return t.error("seqof/setof, but data is not Array");var d=this.clone();d._baseState.implicit=null,i=this._createEncoderBuffer(e.map(function(r){var a=this._baseState;return this._getUse(a.args[0],e)._encode(r,t)},d))}else null===n.use?(i=this._encodePrimitive(n.tag,e),o=!0):s=this._getUse(n.use,r)._encode(e,t);var s;if(!n.any&&null===n.choice){var p=null===n.implicit?n.tag:n.implicit,c=null===n.implicit?"universal":"context";null===p?null===n.use&&t.error("Tag could be omitted only for .use()"):null===n.use&&(s=this._encodeComposite(p,o,c,i))}return null!==n.explicit&&(s=this._encodeComposite(n.explicit,!1,"context",s)),s},r.prototype._encodeChoice=function(e,t){var r=this._baseState,a=r.choice[e.type];return a||i(!1,e.type+" not found in "+JSON.stringify(Object.keys(r.choice))),a._encode(e.value,t)},r.prototype._encodePrimitive=function(e,t){var r=this._baseState;if(/str$/.test(e))return this._encodeStr(t,e);if("objid"===e&&r.args)return this._encodeObjid(t,r.reverseArgs[0],r.args[1]);if("objid"===e)return this._encodeObjid(t,null,null);if("gentime"===e||"utctime"===e)return this._encodeTime(t,e);if("null_"===e)return this._encodeNull();if("int"===e||"enum"===e)return this._encodeInt(t,r.args&&r.reverseArgs[0]);if("bool"===e)return this._encodeBool(t);if("objDesc"===e)return this._encodeStr(t,e);throw new Error("Unsupported tag: "+e)},r.prototype._isNumstr=function(e){return /^[0-9 ]*$/.test(e)},r.prototype._isPrintstr=function(e){return /^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(e)}},{"../base":29,"minimalistic-assert":145}],31:[function(e,t,r){function a(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}function n(e,t){this.path=e,this.rethrow(t)}var s=e("inherits");r.Reporter=a,a.prototype.isError=function(e){return e instanceof n},a.prototype.save=function(){var e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}},a.prototype.restore=function(e){var t=this._reporterState;t.obj=e.obj,t.path=t.path.slice(0,e.pathLen)},a.prototype.enterKey=function(e){return this._reporterState.path.push(e)},a.prototype.exitKey=function(e){var t=this._reporterState;t.path=t.path.slice(0,e-1)},a.prototype.leaveKey=function(e,t,r){var a=this._reporterState;this.exitKey(e),null!==a.obj&&(a.obj[t]=r)},a.prototype.path=function(){return this._reporterState.path.join("/")},a.prototype.enterObject=function(){var e=this._reporterState,t=e.obj;return e.obj={},t},a.prototype.leaveObject=function(e){var t=this._reporterState,r=t.obj;return t.obj=e,r},a.prototype.error=function(e){var t=this._reporterState,r=e instanceof n,a;if(a=r?e:new n(t.path.map(function(e){return"["+JSON.stringify(e)+"]"}).join(""),e.message||e,e.stack),!t.options.partial)throw a;return r||t.errors.push(a),a},a.prototype.wrapResult=function(e){var t=this._reporterState;return t.options.partial?{result:this.isError(e)?null:e,errors:t.errors}:e};s(n,Error),n.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,n),!this.stack)try{throw new Error(this.message)}catch(t){this.stack=t.stack}return this}},{inherits:137}],32:[function(e,t,r){var a=e("../constants");r.tagClass={0:"universal",1:"application",2:"context",3:"private"},r.tagClassByName=a._reverse(r.tagClass),r.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},r.tagByName=a._reverse(r.tag)},{"../constants":33}],33:[function(e,t,r){var a=r;a._reverse=function(e){var t={};return Object.keys(e).forEach(function(r){(0|r)==r&&(r|=0);var a=e[r];t[a]=r}),t},a.der=e("./der")},{"./der":32}],34:[function(e,t){function r(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new a,this.tree._init(e.body)}function a(e){d.Node.call(this,"der",e)}function n(e,t){var r=e.readUInt8(t);if(e.isError(r))return r;var a=c.tagClass[r>>6],n=0==(32&r);if(31==(31&r)){var s=r;for(r=0;128==(128&s);){if(s=e.readUInt8(t),e.isError(s))return s;r<<=7,r|=127&s}}else r&=31;var i=c.tag[r];return{cls:a,primitive:n,tag:r,tagStr:i}}function s(e,t,r){var a=e.readUInt8(r);if(e.isError(a))return a;if(!t&&128===a)return null;if(0==(128&a))return a;var n=127&a;if(4a?2e3+a:1900+a}else return e.error("Decoding "+t+" time is not supported yet");return Date.UTC(a,n-1,s,i,o,d,0)},a.prototype._decodeNull=function(){return null},a.prototype._decodeBool=function(e){var t=e.readUInt8();return e.isError(t)?t:0!==t},a.prototype._decodeInt=function(e,t){var r=e.raw(),a=new p(r);return t&&(a=t[a.toString(10)]||a),a},a.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getDecoder("der").tree}},{"../../asn1":26,inherits:137}],35:[function(e,t,r){var a=r;a.der=e("./der"),a.pem=e("./pem")},{"./der":34,"./pem":36}],36:[function(e,t){function r(e){s.call(this,e),this.enc="pem"}var a=e("inherits"),n=e("buffer").Buffer,s=e("./der");a(r,s),t.exports=r,r.prototype.decode=function(e,t){for(var r=e.toString().split(/[\r\n]+/g),a=t.label.toUpperCase(),o=/^-----(BEGIN|END) ([^-]+)-----$/,d=-1,p=-1,c=0,l;ce?"0"+e:e}function s(e,t,r,a){var n;if("seqof"===e?e="seq":"setof"==e&&(e="set"),c.tagByName.hasOwnProperty(e))n=c.tagByName[e];else if("number"==typeof e&&(0|e)===e)n=e;else return a.error("Unknown tag: "+e);return 31<=n?a.error("Multi-octet tag encoding unsupported"):(t||(n|=32),n|=c.tagClassByName[r||"universal"]<<6,n)}var i=e("inherits"),o=e("buffer").Buffer,d=e("../../asn1"),p=d.base,c=d.constants.der;t.exports=r,r.prototype.encode=function(e,t){return this.tree._encode(e,t).join()},i(a,p.Node),a.prototype._encodeComposite=function(e,t,r,a){var n=s(e,t,r,this.reporter);if(128>a.length){var d=new o(2);return d[0]=n,d[1]=a.length,this._createEncoderBuffer([d,a])}for(var p=1,c=a.length;256<=c;c>>=8)p++;var d=new o(2+p);d[0]=n,d[1]=128|p;for(var c=1+p,l=a.length;0>=8)d[c]=255&l;return this._createEncoderBuffer([d,a])},a.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){for(var r=new o(2*e.length),a=0;a>=7)n++;for(var d=new o(n),p=d.length-1,a=e.length-1,s;0<=a;a--)for(s=e[a],d[p--]=127&s;0<(s>>=7);)d[p--]=128|127&s;return this._createEncoderBuffer(d)},a.prototype._encodeTime=function(e,t){var r=new Date(e),a;return"gentime"===t?a=[n(r.getFullYear()),n(r.getUTCMonth()+1),n(r.getUTCDate()),n(r.getUTCHours()),n(r.getUTCMinutes()),n(r.getUTCSeconds()),"Z"].join(""):"utctime"===t?a=[n(r.getFullYear()%100),n(r.getUTCMonth()+1),n(r.getUTCDate()),n(r.getUTCHours()),n(r.getUTCMinutes()),n(r.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(a,"octstr")},a.prototype._encodeNull=function(){return this._createEncoderBuffer("")},a.prototype._encodeInt=function(e,t){if("string"==typeof e){if(!t)return this.reporter.error("String int or enum given, but no values map");if(!t.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=t[e]}if("number"!=typeof e&&!o.isBuffer(e)){var r=e.toArray();!e.sign&&128&r[0]&&r.unshift(0),e=new o(r)}if(o.isBuffer(e)){var a=e.length;0===e.length&&a++;var n=new o(a);return e.copy(n),0===e.length&&(n[0]=0),this._createEncoderBuffer(n)}if(128>e)return this._createEncoderBuffer(e);if(256>e)return this._createEncoderBuffer([0,e]);for(var a=1,s=e;256<=s;s>>=8)a++;for(var n=Array(a),s=n.length-1;0<=s;s--)n[s]=255&e,e>>=8;return 128&n[0]&&n.unshift(0),this._createEncoderBuffer(new o(n))},a.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},a.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getEncoder("der").tree},a.prototype._skipDefault=function(e,t,r){var a=this._baseState,n;if(null===a["default"])return!1;var s=e.join();if(void 0===a.defaultBuffer&&(a.defaultBuffer=this._encodeValue(a["default"],t,r).join()),s.length!==a.defaultBuffer.length)return!1;for(n=0;n>16,o[d++]=255&f>>8,o[d++]=255&f;return 2===s&&(f=l[e.charCodeAt(c)]<<2|l[e.charCodeAt(c+1)]>>4,o[d++]=255&f),1===s&&(f=l[e.charCodeAt(c)]<<10|l[e.charCodeAt(c+1)]<<4|l[e.charCodeAt(c+2)]>>2,o[d++]=255&f>>8,o[d++]=255&f),o}function o(e){return c[63&e>>18]+c[63&e>>12]+c[63&e>>6]+c[63&e]}function d(e,t,r){for(var a=[],n=t,s;no?o:s+n));return 1===r?(p=e[t-1],a.push(c[p>>2]+c[63&p<<4]+"==")):2===r&&(p=(e[t-2]<<8)+e[t-1],a.push(c[p>>10]+c[63&p>>4]+c[63&p<<2]+"=")),a.join("")}r.byteLength=function(e){var t=a(e),r=t[0],n=t[1];return 3*(r+n)/4-n},r.toByteArray=s,r.fromByteArray=p;for(var c=[],l=[],u="undefined"==typeof Uint8Array?Array:Uint8Array,f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",y=0,b=f.length;y=p?p-49+10:17<=p&&22>=p?p-17+10:15&p;return n}function y(e,t,a,n){for(var s=0,o=d(e.length,a),p=t,l;p>>n}return t}function g(e,t,n){n.negative=t.negative^e.negative;var s=0|e.length+t.length;n.length=s,s=0|s-1;var p=0|e.words[0],c=0|t.words[0],l=p*c,u=67108863&l,f=0|l/67108864;n.words[0]=u;for(var y=1;y>>26,h=67108863&f,m=d(y,t.length-1),_=o(0,y-e.length+1),v;_<=m;_++)v=0|y-_,p=0|e.words[v],c=0|t.words[_],l=p*c+h,g+=0|l/67108864,h=67108863&l;n.words[y]=0|h,f=0|g}return 0===f?n.length--:n.words[y]=0|f,n.strip()}function h(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var s=0,p=0,c=0,l;c>>26),p+=l>>>26,l&=67108863}n.words[c]=u,s=l,l=p}return 0===s?n.length--:n.words[c]=s,n.strip()}function m(e,t,r){var a=new _;return a.mulp(e,t,r)}function _(e,t){this.x=e,this.y=t}function v(e,t){this.name=e,this.p=new f(t,16),this.n=this.p.bitLength(),this.k=new f(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function w(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function S(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function A(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function B(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function k(e){if("string"==typeof e){var t=f._prime(e);this.m=t.p,this.prime=t}else l(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function x(e){k.call(this,e),this.shift=this.m.bitLength(),0!=this.shift%26&&(this.shift+=26-this.shift%26),this.r=new f(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)}"object"==typeof t?t.exports=f:i.BN=f,f.BN=f,f.wordSize=26;var E;try{E=e("buffer").Buffer}catch(t){}f.isBN=function(e){return!!(e instanceof f)||null!==e&&"object"==typeof e&&e.constructor.wordSize===f.wordSize&&Array.isArray(e.words)},f.max=function(e,t){return 0e.cmp(t)?e:t},f.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),l(t===(0|t)&&2<=t&&36>=t),e=e.toString().replace(/\s+/g,"");var a=0;"-"===e[0]&&a++,16===t?this._parseHex(e,a):this._parseBase(e,t,a),"-"===e[0]&&(this.negative=1),this.strip();"le"!==r||this._initArray(this.toArray(),t,r)},f.prototype._initNumber=function(e,t,r){0>e&&(this.negative=1,e=-e),67108864>e?(this.words=[67108863&e],this.length=1):4503599627370496>e?(this.words=[67108863&e,67108863&e/67108864],this.length=2):(l(9007199254740992>e),this.words=[67108863&e,67108863&e/67108864,1],this.length=3);"le"!==r||this._initArray(this.toArray(),t,r)},f.prototype._initArray=function(e,t,r){if(l("number"==typeof e.length),0>=e.length)return this.words=[0],this.length=1,this;this.length=s(e.length/3),this.words=Array(this.length);for(var a=0;a>>26-n,n+=24,26<=n&&(n-=26,o++);else if("le"===r)for(a=0,o=0;a>>26-n,n+=24,26<=n&&(n-=26,o++);return this.strip()},f.prototype._parseHex=function(e,t){this.length=s((e.length-t)/6),this.words=Array(this.length);for(var r=0;r=t;r-=6)o=u(e,r,r+6),this.words[n]|=67108863&o<>>26-a,a+=24,26<=a&&(a-=26,n++);r+6!==t&&(o=u(e,t,r+6),this.words[n]|=67108863&o<>>26-a),this.strip()},f.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var a=0,n=1;67108863>=n;n*=t)a++;a--,n=0|n/t;for(var s=e.length-r,o=s%a,p=d(s,s-o)+r,c=0,l=r;lthis.words[0]+c?this.words[0]+=c:this._iaddn(c);if(0!==o){var u=1;for(c=y(e,l,e.length,t),l=0;lthis.words[0]+c?this.words[0]+=c:this._iaddn(c)}},f.prototype.copy=function(e){e.words=Array(this.length);for(var t=0;t"};var T=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],M=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],I=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];f.prototype.toString=function(e,t){e=e||10,t=0|t||1;var a;if(16===e||"hex"===e){a="";for(var n=0,s=0,o=0;o>>24-n,a=0!==s||o!=this.length-1?T[6-p.length]+p+a:p+a,n+=2,26<=n&&(n-=26,o--)}for(0!==s&&(a=s.toString(16)+a);0!=a.length%t;)a="0"+a;return 0!==this.negative&&(a="-"+a),a}if(e===(0|e)&&2<=e&&36>=e){var u=M[e],f=I[e];a="";var y=this.clone();for(y.negative=0;!y.isZero();){var b=y.modn(f).toString(e);y=y.idivn(f),a=y.isZero()?b+a:T[u-b.length]+b+a}for(this.isZero()&&(a="0"+a);0!=a.length%t;)a="0"+a;return 0!==this.negative&&(a="-"+a),a}l(!1,"Base should be between 2 and 36")},f.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:2>>=13),64<=a&&(n+=7,a>>>=7),8<=a&&(n+=4,a>>>=4),2<=a&&(n+=2,a>>>=2),n+a},f.prototype._zeroBits=function(e){if(0===e)return 26;var a=e,n=0;return 0==(8191&a)&&(n+=13,a>>>=13),0==(127&a)&&(n+=7,a>>>=7),0==(15&a)&&(n+=4,a>>>=4),0==(3&a)&&(n+=2,a>>>=2),0==(1&a)&&n++,n},f.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},f.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0,a;te.length?this.clone().ior(e):e.clone().ior(this)},f.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},f.prototype.iuand=function(e){var t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},f.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},f.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},f.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},f.prototype.inotn=function(e){l("number"==typeof e&&0<=e);var t=0|s(e/26),r=e%26;this._expand(t),0>26-r),this.strip()},f.prototype.notn=function(e){return this.clone().inotn(e)},f.prototype.setn=function(e,t){l("number"==typeof e&&0<=e);var r=0|e/26,a=e%26;return this._expand(r+1),t?this.words[r]|=1<e.length?(n=this,s=e):(n=e,s=this);for(var o=0,d=0;d>>26;for(;0!==o&&d>>26;if(this.length=n.length,0!==o)this.words[this.length]=o,this.length++;else if(n!==this)for(;de.length?this.clone().iadd(e):e.clone().iadd(this)},f.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n=this.cmp(e);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;var s,d;0>26,this.words[c]=67108863&t;for(;0!==p&&c>26,this.words[c]=67108863&t;if(0===p&&c>>13,u=0|s[1],f=8191&u,y=u>>>13,b=0|s[2],g=8191&b,h=b>>>13,m=0|s[3],_=8191&m,v=m>>>13,w=0|s[4],S=8191&w,A=w>>>13,B=0|s[5],k=8191&B,x=B>>>13,E=0|s[6],T=8191&E,M=E>>>13,I=0|s[7],C=8191&I,R=I>>>13,P=0|s[8],F=8191&P,O=P>>>13,N=0|s[9],j=8191&N,L=N>>>13,D=0|a[0],U=8191&D,W=D>>>13,H=0|a[1],q=8191&H,z=H>>>13,V=0|a[2],G=8191&V,K=V>>>13,X=0|a[3],Y=8191&X,Z=X>>>13,J=0|a[4],$=8191&J,Q=J>>>13,ee=0|a[5],te=8191&ee,re=ee>>>13,ae=0|a[6],ne=8191&ae,se=ae>>>13,ie=0|a[7],oe=8191&ie,de=ie>>>13,pe=0|a[8],ce=8191&pe,le=pe>>>13,ue=0|a[9],fe=8191&ue,ye=ue>>>13,be,ge,he;r.negative=e.negative^t.negative,r.length=19,be=n(p,U),ge=n(p,W),ge=0|ge+n(l,U),he=n(l,W);var me=0|(0|o+be)+((8191&ge)<<13);o=0|(0|he+(ge>>>13))+(me>>>26),me&=67108863,be=n(f,U),ge=n(f,W),ge=0|ge+n(y,U),he=n(y,W),be=0|be+n(p,q),ge=0|ge+n(p,z),ge=0|ge+n(l,q),he=0|he+n(l,z);var _e=0|(0|o+be)+((8191&ge)<<13);o=0|(0|he+(ge>>>13))+(_e>>>26),_e&=67108863,be=n(g,U),ge=n(g,W),ge=0|ge+n(h,U),he=n(h,W),be=0|be+n(f,q),ge=0|ge+n(f,z),ge=0|ge+n(y,q),he=0|he+n(y,z),be=0|be+n(p,G),ge=0|ge+n(p,K),ge=0|ge+n(l,G),he=0|he+n(l,K);var ve=0|(0|o+be)+((8191&ge)<<13);o=0|(0|he+(ge>>>13))+(ve>>>26),ve&=67108863,be=n(_,U),ge=n(_,W),ge=0|ge+n(v,U),he=n(v,W),be=0|be+n(g,q),ge=0|ge+n(g,z),ge=0|ge+n(h,q),he=0|he+n(h,z),be=0|be+n(f,G),ge=0|ge+n(f,K),ge=0|ge+n(y,G),he=0|he+n(y,K),be=0|be+n(p,Y),ge=0|ge+n(p,Z),ge=0|ge+n(l,Y),he=0|he+n(l,Z);var we=0|(0|o+be)+((8191&ge)<<13);o=0|(0|he+(ge>>>13))+(we>>>26),we&=67108863,be=n(S,U),ge=n(S,W),ge=0|ge+n(A,U),he=n(A,W),be=0|be+n(_,q),ge=0|ge+n(_,z),ge=0|ge+n(v,q),he=0|he+n(v,z),be=0|be+n(g,G),ge=0|ge+n(g,K),ge=0|ge+n(h,G),he=0|he+n(h,K),be=0|be+n(f,Y),ge=0|ge+n(f,Z),ge=0|ge+n(y,Y),he=0|he+n(y,Z),be=0|be+n(p,$),ge=0|ge+n(p,Q),ge=0|ge+n(l,$),he=0|he+n(l,Q);var Se=0|(0|o+be)+((8191&ge)<<13);o=0|(0|he+(ge>>>13))+(Se>>>26),Se&=67108863,be=n(k,U),ge=n(k,W),ge=0|ge+n(x,U),he=n(x,W),be=0|be+n(S,q),ge=0|ge+n(S,z),ge=0|ge+n(A,q),he=0|he+n(A,z),be=0|be+n(_,G),ge=0|ge+n(_,K),ge=0|ge+n(v,G),he=0|he+n(v,K),be=0|be+n(g,Y),ge=0|ge+n(g,Z),ge=0|ge+n(h,Y),he=0|he+n(h,Z),be=0|be+n(f,$),ge=0|ge+n(f,Q),ge=0|ge+n(y,$),he=0|he+n(y,Q),be=0|be+n(p,te),ge=0|ge+n(p,re),ge=0|ge+n(l,te),he=0|he+n(l,re);var Ae=0|(0|o+be)+((8191&ge)<<13);o=0|(0|he+(ge>>>13))+(Ae>>>26),Ae&=67108863,be=n(T,U),ge=n(T,W),ge=0|ge+n(M,U),he=n(M,W),be=0|be+n(k,q),ge=0|ge+n(k,z),ge=0|ge+n(x,q),he=0|he+n(x,z),be=0|be+n(S,G),ge=0|ge+n(S,K),ge=0|ge+n(A,G),he=0|he+n(A,K),be=0|be+n(_,Y),ge=0|ge+n(_,Z),ge=0|ge+n(v,Y),he=0|he+n(v,Z),be=0|be+n(g,$),ge=0|ge+n(g,Q),ge=0|ge+n(h,$),he=0|he+n(h,Q),be=0|be+n(f,te),ge=0|ge+n(f,re),ge=0|ge+n(y,te),he=0|he+n(y,re),be=0|be+n(p,ne),ge=0|ge+n(p,se),ge=0|ge+n(l,ne),he=0|he+n(l,se);var Be=0|(0|o+be)+((8191&ge)<<13);o=0|(0|he+(ge>>>13))+(Be>>>26),Be&=67108863,be=n(C,U),ge=n(C,W),ge=0|ge+n(R,U),he=n(R,W),be=0|be+n(T,q),ge=0|ge+n(T,z),ge=0|ge+n(M,q),he=0|he+n(M,z),be=0|be+n(k,G),ge=0|ge+n(k,K),ge=0|ge+n(x,G),he=0|he+n(x,K),be=0|be+n(S,Y),ge=0|ge+n(S,Z),ge=0|ge+n(A,Y),he=0|he+n(A,Z),be=0|be+n(_,$),ge=0|ge+n(_,Q),ge=0|ge+n(v,$),he=0|he+n(v,Q),be=0|be+n(g,te),ge=0|ge+n(g,re),ge=0|ge+n(h,te),he=0|he+n(h,re),be=0|be+n(f,ne),ge=0|ge+n(f,se),ge=0|ge+n(y,ne),he=0|he+n(y,se),be=0|be+n(p,oe),ge=0|ge+n(p,de),ge=0|ge+n(l,oe),he=0|he+n(l,de);var ke=0|(0|o+be)+((8191&ge)<<13);o=0|(0|he+(ge>>>13))+(ke>>>26),ke&=67108863,be=n(F,U),ge=n(F,W),ge=0|ge+n(O,U),he=n(O,W),be=0|be+n(C,q),ge=0|ge+n(C,z),ge=0|ge+n(R,q),he=0|he+n(R,z),be=0|be+n(T,G),ge=0|ge+n(T,K),ge=0|ge+n(M,G),he=0|he+n(M,K),be=0|be+n(k,Y),ge=0|ge+n(k,Z),ge=0|ge+n(x,Y),he=0|he+n(x,Z),be=0|be+n(S,$),ge=0|ge+n(S,Q),ge=0|ge+n(A,$),he=0|he+n(A,Q),be=0|be+n(_,te),ge=0|ge+n(_,re),ge=0|ge+n(v,te),he=0|he+n(v,re),be=0|be+n(g,ne),ge=0|ge+n(g,se),ge=0|ge+n(h,ne),he=0|he+n(h,se),be=0|be+n(f,oe),ge=0|ge+n(f,de),ge=0|ge+n(y,oe),he=0|he+n(y,de),be=0|be+n(p,ce),ge=0|ge+n(p,le),ge=0|ge+n(l,ce),he=0|he+n(l,le);var xe=0|(0|o+be)+((8191&ge)<<13);o=0|(0|he+(ge>>>13))+(xe>>>26),xe&=67108863,be=n(j,U),ge=n(j,W),ge=0|ge+n(L,U),he=n(L,W),be=0|be+n(F,q),ge=0|ge+n(F,z),ge=0|ge+n(O,q),he=0|he+n(O,z),be=0|be+n(C,G),ge=0|ge+n(C,K),ge=0|ge+n(R,G),he=0|he+n(R,K),be=0|be+n(T,Y),ge=0|ge+n(T,Z),ge=0|ge+n(M,Y),he=0|he+n(M,Z),be=0|be+n(k,$),ge=0|ge+n(k,Q),ge=0|ge+n(x,$),he=0|he+n(x,Q),be=0|be+n(S,te),ge=0|ge+n(S,re),ge=0|ge+n(A,te),he=0|he+n(A,re),be=0|be+n(_,ne),ge=0|ge+n(_,se),ge=0|ge+n(v,ne),he=0|he+n(v,se),be=0|be+n(g,oe),ge=0|ge+n(g,de),ge=0|ge+n(h,oe),he=0|he+n(h,de),be=0|be+n(f,ce),ge=0|ge+n(f,le),ge=0|ge+n(y,ce),he=0|he+n(y,le),be=0|be+n(p,fe),ge=0|ge+n(p,ye),ge=0|ge+n(l,fe),he=0|he+n(l,ye);var Ee=0|(0|o+be)+((8191&ge)<<13);o=0|(0|he+(ge>>>13))+(Ee>>>26),Ee&=67108863,be=n(j,q),ge=n(j,z),ge=0|ge+n(L,q),he=n(L,z),be=0|be+n(F,G),ge=0|ge+n(F,K),ge=0|ge+n(O,G),he=0|he+n(O,K),be=0|be+n(C,Y),ge=0|ge+n(C,Z),ge=0|ge+n(R,Y),he=0|he+n(R,Z),be=0|be+n(T,$),ge=0|ge+n(T,Q),ge=0|ge+n(M,$),he=0|he+n(M,Q),be=0|be+n(k,te),ge=0|ge+n(k,re),ge=0|ge+n(x,te),he=0|he+n(x,re),be=0|be+n(S,ne),ge=0|ge+n(S,se),ge=0|ge+n(A,ne),he=0|he+n(A,se),be=0|be+n(_,oe),ge=0|ge+n(_,de),ge=0|ge+n(v,oe),he=0|he+n(v,de),be=0|be+n(g,ce),ge=0|ge+n(g,le),ge=0|ge+n(h,ce),he=0|he+n(h,le),be=0|be+n(f,fe),ge=0|ge+n(f,ye),ge=0|ge+n(y,fe),he=0|he+n(y,ye);var Te=0|(0|o+be)+((8191&ge)<<13);o=0|(0|he+(ge>>>13))+(Te>>>26),Te&=67108863,be=n(j,G),ge=n(j,K),ge=0|ge+n(L,G),he=n(L,K),be=0|be+n(F,Y),ge=0|ge+n(F,Z),ge=0|ge+n(O,Y),he=0|he+n(O,Z),be=0|be+n(C,$),ge=0|ge+n(C,Q),ge=0|ge+n(R,$),he=0|he+n(R,Q),be=0|be+n(T,te),ge=0|ge+n(T,re),ge=0|ge+n(M,te),he=0|he+n(M,re),be=0|be+n(k,ne),ge=0|ge+n(k,se),ge=0|ge+n(x,ne),he=0|he+n(x,se),be=0|be+n(S,oe),ge=0|ge+n(S,de),ge=0|ge+n(A,oe),he=0|he+n(A,de),be=0|be+n(_,ce),ge=0|ge+n(_,le),ge=0|ge+n(v,ce),he=0|he+n(v,le),be=0|be+n(g,fe),ge=0|ge+n(g,ye),ge=0|ge+n(h,fe),he=0|he+n(h,ye);var Me=0|(0|o+be)+((8191&ge)<<13);o=0|(0|he+(ge>>>13))+(Me>>>26),Me&=67108863,be=n(j,Y),ge=n(j,Z),ge=0|ge+n(L,Y),he=n(L,Z),be=0|be+n(F,$),ge=0|ge+n(F,Q),ge=0|ge+n(O,$),he=0|he+n(O,Q),be=0|be+n(C,te),ge=0|ge+n(C,re),ge=0|ge+n(R,te),he=0|he+n(R,re),be=0|be+n(T,ne),ge=0|ge+n(T,se),ge=0|ge+n(M,ne),he=0|he+n(M,se),be=0|be+n(k,oe),ge=0|ge+n(k,de),ge=0|ge+n(x,oe),he=0|he+n(x,de),be=0|be+n(S,ce),ge=0|ge+n(S,le),ge=0|ge+n(A,ce),he=0|he+n(A,le),be=0|be+n(_,fe),ge=0|ge+n(_,ye),ge=0|ge+n(v,fe),he=0|he+n(v,ye);var Ie=0|(0|o+be)+((8191&ge)<<13);o=0|(0|he+(ge>>>13))+(Ie>>>26),Ie&=67108863,be=n(j,$),ge=n(j,Q),ge=0|ge+n(L,$),he=n(L,Q),be=0|be+n(F,te),ge=0|ge+n(F,re),ge=0|ge+n(O,te),he=0|he+n(O,re),be=0|be+n(C,ne),ge=0|ge+n(C,se),ge=0|ge+n(R,ne),he=0|he+n(R,se),be=0|be+n(T,oe),ge=0|ge+n(T,de),ge=0|ge+n(M,oe),he=0|he+n(M,de),be=0|be+n(k,ce),ge=0|ge+n(k,le),ge=0|ge+n(x,ce),he=0|he+n(x,le),be=0|be+n(S,fe),ge=0|ge+n(S,ye),ge=0|ge+n(A,fe),he=0|he+n(A,ye);var Ce=0|(0|o+be)+((8191&ge)<<13);o=0|(0|he+(ge>>>13))+(Ce>>>26),Ce&=67108863,be=n(j,te),ge=n(j,re),ge=0|ge+n(L,te),he=n(L,re),be=0|be+n(F,ne),ge=0|ge+n(F,se),ge=0|ge+n(O,ne),he=0|he+n(O,se),be=0|be+n(C,oe),ge=0|ge+n(C,de),ge=0|ge+n(R,oe),he=0|he+n(R,de),be=0|be+n(T,ce),ge=0|ge+n(T,le),ge=0|ge+n(M,ce),he=0|he+n(M,le),be=0|be+n(k,fe),ge=0|ge+n(k,ye),ge=0|ge+n(x,fe),he=0|he+n(x,ye);var Re=0|(0|o+be)+((8191&ge)<<13);o=0|(0|he+(ge>>>13))+(Re>>>26),Re&=67108863,be=n(j,ne),ge=n(j,se),ge=0|ge+n(L,ne),he=n(L,se),be=0|be+n(F,oe),ge=0|ge+n(F,de),ge=0|ge+n(O,oe),he=0|he+n(O,de),be=0|be+n(C,ce),ge=0|ge+n(C,le),ge=0|ge+n(R,ce),he=0|he+n(R,le),be=0|be+n(T,fe),ge=0|ge+n(T,ye),ge=0|ge+n(M,fe),he=0|he+n(M,ye);var Pe=0|(0|o+be)+((8191&ge)<<13);o=0|(0|he+(ge>>>13))+(Pe>>>26),Pe&=67108863,be=n(j,oe),ge=n(j,de),ge=0|ge+n(L,oe),he=n(L,de),be=0|be+n(F,ce),ge=0|ge+n(F,le),ge=0|ge+n(O,ce),he=0|he+n(O,le),be=0|be+n(C,fe),ge=0|ge+n(C,ye),ge=0|ge+n(R,fe),he=0|he+n(R,ye);var Fe=0|(0|o+be)+((8191&ge)<<13);o=0|(0|he+(ge>>>13))+(Fe>>>26),Fe&=67108863,be=n(j,ce),ge=n(j,le),ge=0|ge+n(L,ce),he=n(L,le),be=0|be+n(F,fe),ge=0|ge+n(F,ye),ge=0|ge+n(O,fe),he=0|he+n(O,ye);var Oe=0|(0|o+be)+((8191&ge)<<13);o=0|(0|he+(ge>>>13))+(Oe>>>26),Oe&=67108863,be=n(j,fe),ge=n(j,ye),ge=0|ge+n(L,fe),he=n(L,ye);var Ne=0|(0|o+be)+((8191&ge)<<13);return o=0|(0|he+(ge>>>13))+(Ne>>>26),Ne&=67108863,i[0]=me,i[1]=_e,i[2]=ve,i[3]=we,i[4]=Se,i[5]=Ae,i[6]=Be,i[7]=ke,i[8]=xe,i[9]=Ee,i[10]=Te,i[11]=Me,i[12]=Ie,i[13]=Ce,i[14]=Re,i[15]=Pe,i[16]=Fe,i[17]=Oe,i[18]=Ne,0!==o&&(i[19]=o,r.length++),r};n||(C=g),f.prototype.mulTo=function(e,t){var r=this.length+e.length,a;return a=10===this.length&&10===e.length?C(this,e,t):63>r?g(this,e,t):1024>r?h(this,e,t):m(this,e,t),a},_.prototype.makeRBT=function(e){for(var r=Array(e),t=f.prototype._countBits(e)-1,a=0;a>=1;return a},_.prototype.permute=function(e,t,r,a,n,s){for(var o=0;o>>=1)n++;return 1<=a))for(var n=0,s;nn?0:0|n/67108864;return e},_.prototype.convert13b=function(e,t,r,a){for(var n=0,s=0;s>>=13,r[2*s+1]=8191&n,n>>>=13;for(s=2*t;se);for(var t=0,r=0;r>=26,t+=0|a/67108864,t+=n>>>26,this.words[r]=67108863&n}return 0!==t&&(this.words[r]=t,this.length++),this},f.prototype.muln=function(e){return this.clone().imuln(e)},f.prototype.sqr=function(){return this.mul(this)},f.prototype.isqr=function(){return this.imul(this.clone())},f.prototype.pow=function(e){var t=b(e);if(0===t.length)return new f(1);for(var r=this,a=0;a>>26-t<<26-t,o=(0|this.words[a])-s<>>26-t}n&&(this.words[a]=n,this.length++)}if(0!==r){for(a=this.length-1;0<=a;a--)this.words[a+r]=this.words[a];for(a=0;ar)for(this.length-=r,c=0;c=n);c--){var f=0|this.words[c];this.words[c]=u<<26-p|f>>>p,u=f&(67108863^67108863>>>p<>>t<e),0>e?this.isubn(-e):0===this.negative?this._iaddn(e):1===this.length&&(0|this.words[0])e),0>e)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&0>this.words[0])this.words[0]=-this.words[0],this.negative=1;else for(var t=0;tthis.words[t];t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},f.prototype.addn=function(e){return this.clone().iaddn(e)},f.prototype.subn=function(e){return this.clone().isubn(e)},f.prototype.iabs=function(){return this.negative=0,this},f.prototype.abs=function(){return this.clone().iabs()},f.prototype._ishlnsubmul=function(e,t,r){var a=e.length+r,n;this._expand(a);var s=0,o;for(n=0;n>26)-(0|d/67108864),this.words[n+r]=67108863&o}for(;n>26,this.words[n+r]=67108863&o;if(0===s)return this.strip();for(l(-1===s),s=0,n=0;n>26,this.words[n]=67108863&o;return this.negative=1,this.strip()},f.prototype._wordDiv=function(e,t){var r=this.length-e.length,n=this.clone(),s=e,o=0|s.words[s.length-1],p=this._countBits(o);r=26-p,0!=r&&(s=s.ushln(r),n.iushln(r),o=0|s.words[s.length-1]);var c=n.length-s.length,l;if("mod"!==t){l=new f(null),l.length=c+1,l.words=Array(l.length);for(var u=0;uthis.length||0>this.cmp(e)?{div:new f(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new f(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new f(this.modn(e.words[0]))}:this._wordDiv(e,t):(s=this.neg().divmod(e.neg(),t),"div"!==t&&(n=s.mod.neg(),r&&0!==n.negative&&n.isub(e)),{div:s.div,mod:n})},f.prototype.div=function(e){return this.divmod(e,"div",!1).div},f.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},f.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},f.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0===t.div.negative?t.mod:t.mod.isub(e),a=e.ushrn(1),n=e.andln(1),s=r.cmp(a);return 0>s||1===n&&0===s?t.div:0===t.div.negative?t.div.iaddn(1):t.div.isubn(1)},f.prototype.modn=function(e){l(67108863>=e);for(var t=0,r=this.length-1;0<=r;r--)t=(67108864%e*t+(0|this.words[r]))%e;return t},f.prototype.idivn=function(e){l(67108863>=e);for(var t=0,r=this.length-1,a;0<=r;r--)a=(0|this.words[r])+67108864*t,this.words[r]=0|a/e,t=a%e;return this.strip()},f.prototype.divn=function(e){return this.clone().idivn(e)},f.prototype.egcd=function(e){l(0===e.negative),l(!e.isZero());var t=this,r=e.clone();t=0===t.negative?t.clone():t.umod(e);for(var a=new f(1),n=new f(0),s=new f(0),o=new f(1),d=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++d;for(var p=r.clone(),c=t.clone();!t.isZero();){for(var u=0,y=1;0==(t.words[0]&y)&&26>u;++u,y<<=1);if(0b;++b,h<<=1);if(0d;++d,p<<=1);if(0c;++c,u<<=1);if(0y.cmpn(0)&&y.iadd(e),y},f.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var n=this.clone(),s=e.clone();n.negative=0,s.negative=0;for(var i=0;n.isEven()&&s.isEven();i++)n.iushrn(1),s.iushrn(1);do{for(;n.isEven();)n.iushrn(1);for(;s.isEven();)s.iushrn(1);var o=n.cmp(s);if(0>o){var r=n;n=s,s=r}else if(0===o||0===s.cmpn(1))break;n.isub(s)}while(!0);return s.iushln(i)},f.prototype.invm=function(e){return this.egcd(e).a.umod(e)},f.prototype.isEven=function(){return 0==(1&this.words[0])},f.prototype.isOdd=function(){return 1==(1&this.words[0])},f.prototype.andln=function(e){return this.words[0]&e},f.prototype.bincn=function(e){l("number"==typeof e);var t=e%26,r=(e-t)/26,a=1<>>26,o&=67108863,this.words[s]=o;return 0!==n&&(this.words[s]=n,this.length++),this},f.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},f.prototype.cmpn=function(e){var t=0>e;if(0!==this.negative&&!t)return-1;if(0===this.negative&&t)return 1;this.strip();var r;if(1=e,"Number is too big");var a=0|this.words[0];r=a===e?0:ae.length)return 1;if(this.lengtha&&(t=1);break}}return t},f.prototype.gtn=function(e){return 1===this.cmpn(e)},f.prototype.gt=function(e){return 1===this.cmp(e)},f.prototype.gten=function(e){return 0<=this.cmpn(e)},f.prototype.gte=function(e){return 0<=this.cmp(e)},f.prototype.ltn=function(e){return-1===this.cmpn(e)},f.prototype.lt=function(e){return-1===this.cmp(e)},f.prototype.lten=function(e){return 0>=this.cmpn(e)},f.prototype.lte=function(e){return 0>=this.cmp(e)},f.prototype.eqn=function(e){return 0===this.cmpn(e)},f.prototype.eq=function(e){return 0===this.cmp(e)},f.red=function(e){return new k(e)},f.prototype.toRed=function(e){return l(!this.red,"Already a number in reduction context"),l(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},f.prototype.fromRed=function(){return l(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},f.prototype._forceRed=function(e){return this.red=e,this},f.prototype.forceRed=function(e){return l(!this.red,"Already a number in reduction context"),this._forceRed(e)},f.prototype.redAdd=function(e){return l(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},f.prototype.redIAdd=function(e){return l(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},f.prototype.redSub=function(e){return l(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},f.prototype.redISub=function(e){return l(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},f.prototype.redShl=function(e){return l(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},f.prototype.redMul=function(e){return l(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},f.prototype.redIMul=function(e){return l(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},f.prototype.redSqr=function(){return l(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},f.prototype.redISqr=function(){return l(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},f.prototype.redSqrt=function(){return l(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},f.prototype.redInvm=function(){return l(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},f.prototype.redNeg=function(){return l(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},f.prototype.redPow=function(e){return l(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var R={k256:null,p224:null,p192:null,p25519:null};v.prototype._tmp=function(){var e=new f(null);return e.words=Array(s(this.n/13)),e},v.prototype.ireduce=function(e){var t=e,a;do this.split(t,this.tmp),t=this.imulK(t),t=t.iadd(this.tmp),a=t.bitLength();while(a>this.n);var n=a=e.length)return e.words[0]=0,void(e.length=1);var s=e.words[9];for(t.words[t.length++]=s&r,n=10;n>>22,s=o}s>>>=22,e.words[n-10]=s,e.length-=0===s&&10>>=26,e.words[r]=n,t=a}return 0!==t&&(e.words[e.length++]=t),e},f._prime=function e(t){if(R[t])return R[t];var e;if("k256"===t)e=new w;else if("p224"===t)e=new S;else if("p192"===t)e=new A;else if("p25519"===t)e=new B;else throw new Error("Unknown prime "+t);return R[t]=e,e},k.prototype._verify1=function(e){l(0===e.negative,"red works only with positives"),l(e.red,"red works only with red numbers")},k.prototype._verify2=function(e,t){l(0==(e.negative|t.negative),"red works only with positives"),l(e.red&&e.red===t.red,"red works only with red numbers")},k.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},k.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},k.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return 0<=r.cmp(this.m)&&r.isub(this.m),r._forceRed(this)},k.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return 0<=r.cmp(this.m)&&r.isub(this.m),r},k.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return 0>r.cmpn(0)&&r.iadd(this.m),r._forceRed(this)},k.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return 0>r.cmpn(0)&&r.iadd(this.m),r},k.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},k.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},k.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},k.prototype.isqr=function(e){return this.imul(e,e.clone())},k.prototype.sqr=function(e){return this.mul(e,e)},k.prototype.sqrt=function(e){if(e.isZero())return e.clone();var a=this.m.andln(3);if(l(1==a%2),3===a){var n=this.m.add(new f(1)).iushrn(2);return this.pow(e,n)}for(var o=this.m.subn(1),d=0;!o.isZero()&&0===o.andln(1);)d++,o.iushrn(1);l(!o.isZero());var p=new f(1).toRed(this),u=p.redNeg(),y=this.m.subn(1).iushrn(1),g=this.m.bitLength();for(g=new f(2*g*g).toRed(this);0!==this.pow(g,y).cmp(u);)g.redIAdd(u);for(var h=this.pow(g,o),_=this.pow(e,o.addn(1).iushrn(1)),v=this.pow(e,o),w=d;0!==v.cmp(p);){for(var S=v,A=0;0!==S.cmp(p);A++)S=S.redSqr();l(A>c,n!==r[0]&&(n=this.sqr(n)),0===l&&0===s){o=0;continue}s<<=1,s|=l,o++,4!==o&&(0!=a||0!=c)||(n=this.mul(n,r[s]),o=0,s=0)}d=26}return n},k.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},k.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},f.mont=function(e){return new x(e)},c(x,k),x.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},x.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},x.prototype.imul=function(e,r){if(e.isZero()||r.isZero())return e.words[0]=0,e.length=1,e;var a=e.imul(r),t=a.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=a.isub(t).iushrn(this.shift),s=n;return 0<=n.cmp(this.m)?s=n.isub(this.m):0>n.cmpn(0)&&(s=n.iadd(this.m)),s._forceRed(this)},x.prototype.mul=function(e,r){if(e.isZero()||r.isZero())return new f(0)._forceRed(this);var a=e.mul(r),t=a.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=a.isub(t).iushrn(this.shift),s=n;return 0<=n.cmp(this.m)?s=n.isub(this.m):0>n.cmpn(0)&&(s=n.iadd(this.m)),s._forceRed(this)},x.prototype.invm=function(e){var t=this.imod(e._invmp(this.m).mul(this.r2));return t._forceRed(this)}})("undefined"==typeof t||t,this)},{buffer:43}],42:[function(e,t){function a(e){this.rand=e}var n;if(t.exports=function(e){return n||(n=new a(null)),n.generate(e)},t.exports.Rand=a,a.prototype.generate=function(e){return this._rand(e)},a.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),r=0;r>>24]^i[255&c>>>16]^o[255&l>>>8]^d[255&u]^t[f++],g=s[c>>>24]^i[255&l>>>16]^o[255&u>>>8]^d[255&p]^t[f++],h=s[l>>>24]^i[255&u>>>16]^o[255&p>>>8]^d[255&c]^t[f++],m=s[u>>>24]^i[255&p>>>16]^o[255&c>>>8]^d[255&l]^t[f++],p=b,c=g,l=h,u=m;return b=(a[p>>>24]<<24|a[255&c>>>16]<<16|a[255&l>>>8]<<8|a[255&u])^t[f++],g=(a[c>>>24]<<24|a[255&l>>>16]<<16|a[255&u>>>8]<<8|a[255&p])^t[f++],h=(a[l>>>24]<<24|a[255&u>>>16]<<16|a[255&p>>>8]<<8|a[255&c])^t[f++],m=(a[u>>>24]<<24|a[255&p>>>16]<<16|a[255&c>>>8]<<8|a[255&l])^t[f++],b>>>=0,g>>>=0,h>>>=0,m>>>=0,[b,g,h,m]}function s(e){this._key=r(e),this._reset()}var o=e("safe-buffer").Buffer,i=[0,1,2,4,8,16,32,64,128,27,54],d=function(){for(var e=Array(256),r=0;256>r;r++)e[r]=128>r?r<<1:283^r<<1;for(var a=[],n=[],s=[[],[],[],[]],o=[[],[],[],[]],d=0,p=0,c=0,l;256>c;++c){l=p^p<<1^p<<2^p<<3^p<<4,l=99^(l>>>8^255&l),a[d]=l,n[l]=d;var u=e[d],f=e[u],y=e[f],b=257*e[l]^16843008*l;s[0][d]=b<<24|b>>>8,s[1][d]=b<<16|b>>>16,s[2][d]=b<<8|b>>>24,s[3][d]=b,b=16843009*y^65537*f^257*u^16843008*d,o[0][l]=b<<24|b>>>8,o[1][l]=b<<16|b>>>16,o[2][l]=b<<8|b>>>24,o[3][l]=b,0===d?d=p=1:(d=u^e[e[e[y^u]]],p^=e[e[p]])}return{SBOX:a,INV_SBOX:n,SUB_MIX:s,INV_SUB_MIX:o}}();s.blockSize=16,s.keySize=32,s.prototype.blockSize=s.blockSize,s.prototype.keySize=s.keySize,s.prototype._reset=function(){for(var e=this._key,r=e.length,a=r+6,n=4*(a+1),s=[],o=0;o>>24,p=d.SBOX[p>>>24]<<24|d.SBOX[255&p>>>16]<<16|d.SBOX[255&p>>>8]<<8|d.SBOX[255&p],p^=i[0|o/r]<<24):6>>24]<<24|d.SBOX[255&p>>>16]<<16|d.SBOX[255&p>>>8]<<8|d.SBOX[255&p]),s[o]=s[o-r]^p}for(var c=[],l=0;ll||4>=u?f:d.INV_SUB_MIX[0][d.SBOX[f>>>24]]^d.INV_SUB_MIX[1][d.SBOX[255&f>>>16]]^d.INV_SUB_MIX[2][d.SBOX[255&f>>>8]]^d.INV_SUB_MIX[3][d.SBOX[255&f]]}this._nRounds=a,this._keySchedule=s,this._invKeySchedule=c},s.prototype.encryptBlockRaw=function(e){return e=r(e),n(e,this._keySchedule,d.SUB_MIX,d.SBOX,this._nRounds)},s.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),r=o.allocUnsafe(16);return r.writeUInt32BE(t[0],0),r.writeUInt32BE(t[1],4),r.writeUInt32BE(t[2],8),r.writeUInt32BE(t[3],12),r},s.prototype.decryptBlock=function(e){e=r(e);var t=e[1];e[1]=e[3],e[3]=t;var a=n(e,this._invKeySchedule,d.INV_SUB_MIX,d.INV_SBOX,this._nRounds),s=o.allocUnsafe(16);return s.writeUInt32BE(a[0],0),s.writeUInt32BE(a[3],4),s.writeUInt32BE(a[2],8),s.writeUInt32BE(a[1],12),s},s.prototype.scrub=function(){a(this._keySchedule),a(this._invKeySchedule),a(this._key)},t.exports.AES=s},{"safe-buffer":194}],45:[function(e,t){function r(e,t){var r=0;e.length!==t.length&&r++;for(var a=Math.min(e.length,t.length),n=0;nt&&(t=i.alloc(t,0),this._ghash.update(t))}this._called=!0;var r=this._mode.encrypt(this,e);return this._decrypt?this._ghash.update(e):this._ghash.update(r),this._len+=e.length,r},n.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var e=c(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&r(e,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=e,this._cipher.scrub()},n.prototype.getAuthTag=function(){if(this._decrypt||!i.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},n.prototype.setAuthTag=function(e){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=e},n.prototype.setAAD=function(e){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(e),this._alen+=e.length},t.exports=n},{"./aes":44,"./ghash":49,"./incr32":50,"buffer-xor":72,"cipher-base":75,inherits:137,"safe-buffer":194}],46:[function(e,t,r){var a=e("./encrypter"),n=e("./decrypter"),s=e("./modes/list.json");r.createCipher=r.Cipher=a.createCipher,r.createCipheriv=r.Cipheriv=a.createCipheriv,r.createDecipher=r.Decipher=n.createDecipher,r.createDecipheriv=r.Decipheriv=n.createDecipheriv,r.listCiphers=r.getCiphers=function(){return Object.keys(s)}},{"./decrypter":47,"./encrypter":48,"./modes/list.json":58}],47:[function(e,t,r){function a(e,t,r){l.call(this),this._cache=new n,this._last=void 0,this._cipher=new u.AES(t),this._prev=d.from(r),this._mode=e,this._autopadding=!0}function n(){this.cache=d.allocUnsafe(0)}function s(e){var t=e[15];if(1>t||16>>0,0),t.writeUInt32BE(e[1]>>>0,4),t.writeUInt32BE(e[2]>>>0,8),t.writeUInt32BE(e[3]>>>0,12),t}function n(e){this.h=e,this.state=s.alloc(16,0),this.cache=s.allocUnsafe(0)}var s=e("safe-buffer").Buffer,i=s.alloc(16,0);n.prototype.ghash=function(e){for(var t=-1;++t++n;){for(o=0!=(this.state[~~(n/8)]&1<<7-n%8),o&&(t[0]^=e[0],t[1]^=e[1],t[2]^=e[2],t[3]^=e[3]),d=0!=(1&e[3]),s=3;0>>1|(1&e[s-1])<<31;e[0]>>>=1,d&&(e[0]^=-520093696)}this.state=a(t)},n.prototype.update=function(e){this.cache=s.concat([this.cache,e]);for(var t;16<=this.cache.length;)t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t)},n.prototype.final=function(e,t){return this.cache.length&&this.ghash(s.concat([this.cache,i],16)),this.ghash(a([0,e,0,t])),this.state},t.exports=n},{"safe-buffer":194}],50:[function(e,t){t.exports=function(e){for(var t=e.length,r;t--;)if(r=e.readUInt8(t),255===r)e.writeUInt8(0,t);else{r++,e.writeUInt8(r,t);break}}},{}],51:[function(e,t,r){var a=e("buffer-xor");r.encrypt=function(e,t){var r=a(t,e._prev);return e._prev=e._cipher.encryptBlock(r),e._prev},r.decrypt=function(e,t){var r=e._prev;e._prev=t;var n=e._cipher.decryptBlock(t);return a(n,r)}},{"buffer-xor":72}],52:[function(e,t,r){function a(e,t,r){var a=t.length,i=s(t,e._cache);return e._cache=e._cache.slice(a),e._prev=n.concat([e._prev,r?t:i]),i}var n=e("safe-buffer").Buffer,s=e("buffer-xor");r.encrypt=function(e,t,r){for(var s=n.allocUnsafe(0),i;t.length;)if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=n.allocUnsafe(0)),e._cache.length<=t.length)i=e._cache.length,s=n.concat([s,a(e,t.slice(0,i),r)]),t=t.slice(i);else{s=n.concat([s,a(e,t,r)]);break}return s}},{"buffer-xor":72,"safe-buffer":194}],53:[function(e,t,r){function a(e,t,r){for(var a=-1,s=0,o,d,p;++a<8;)o=e._cipher.encryptBlock(e._prev),d=t&1<<7-a?128:0,p=o[0]^d,s+=(128&p)>>a%8,e._prev=n(e._prev,r?d:p);return s}function n(e,t){var r=e.length,a=-1,n=s.allocUnsafe(e.length);for(e=s.concat([e,s.from([t])]);++a>7;return n}var s=e("safe-buffer").Buffer;r.encrypt=function(e,t,r){for(var n=t.length,o=s.allocUnsafe(n),d=-1;++d=e.cmpn(0))throw new Error("invalid sig");if(e.cmp(t)>=t)throw new Error("invalid sig")}var o=e("bn.js"),s=e("elliptic").ec,d=e("parse-asn1"),p=e("./curves.json");t.exports=function(e,t,s,p,c){var l=d(s);if("ec"===l.type){if("ecdsa"!==p&&"ecdsa/rsa"!==p)throw new Error("wrong public key type");return a(e,t,l)}if("dsa"===l.type){if("dsa"!==p)throw new Error("wrong public key type");return n(e,t,l)}if("rsa"!==p&&"ecdsa/rsa"!==p)throw new Error("wrong public key type");t=r.concat([c,t]);for(var u=l.modulus.byteLength(),f=[1],y=0;t.length+f.length+2y?1:0;for(u=Math.min(e.length,f.length),e.length!==f.length&&(h=1),b=-1;++be)throw new RangeError("The value \""+e+"\" is invalid for option \"size\"")}function o(e,t,r){return i(e),0>=e?a(e):void 0===t?a(e):"string"==typeof r?a(e).fill(t,r):a(e).fill(t)}function d(e){return i(e),a(0>e?0:0|f(e))}function p(e,t){if(("string"!=typeof t||""===t)&&(t="utf8"),!n.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var r=0|y(e,t),s=a(r),i=s.write(e,t);return i!==r&&(s=s.slice(0,i)),s}function c(e){for(var t=0>e.length?0:0|f(e.length),r=a(t),n=0;nt||e.byteLength=2147483647)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+2147483647 .toString(16)+" bytes");return 0|e}function y(e,t){if(n.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||z(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError("The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. Received type "+typeof e);var r=e.length,a=2>>1;case"base64":return H(e).length;default:if(s)return a?-1:D(e).length;t=(""+t).toLowerCase(),s=!0;}}function b(e,t,r){var a=!1;if((void 0===t||0>t)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),0>=r)return"";if(r>>>=0,t>>>=0,r<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return I(this,t,r);case"utf8":case"utf-8":return x(this,t,r);case"ascii":return T(this,t,r);case"latin1":case"binary":return M(this,t,r);case"base64":return k(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,t,r);default:if(a)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),a=!0;}}function g(e,t,r){var a=e[t];e[t]=e[r],e[r]=a}function h(e,t,r,a,s){if(0===e.length)return-1;if("string"==typeof r?(a=r,r=0):2147483647r&&(r=-2147483648),r=+r,V(r)&&(r=s?0:e.length-1),0>r&&(r=e.length+r),r>=e.length){if(s)return-1;r=e.length-1}else if(0>r)if(s)r=0;else return-1;if("string"==typeof t&&(t=n.from(t,a)),n.isBuffer(t))return 0===t.length?-1:m(e,t,r,a,s);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?s?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):m(e,[t],r,a,s);throw new TypeError("val must be string, number or Buffer")}function m(e,t,r,a,n){function s(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}var o=1,d=e.length,p=t.length;if(void 0!==a&&(a=(a+"").toLowerCase(),"ucs2"===a||"ucs-2"===a||"utf16le"===a||"utf-16le"===a)){if(2>e.length||2>t.length)return-1;o=2,d/=2,p/=2,r/=2}var c;if(n){var l=-1;for(c=r;cd&&(r=d-p),c=r;0<=c;c--){for(var u=!0,f=0;fn&&(a=n)):a=n;var s=t.length;a>s/2&&(a=s/2);for(var o=0,d;os&&(o=s):2===d?(p=e[n+1],128==(192&p)&&(u=(31&s)<<6|63&p,127u||57343u&&(o=u))):void 0}null===o?(o=65533,d=1):65535>>10),o=56320|1023&o),a.push(o),n+=d}return E(a)}function E(e){var t=e.length;if(t<=4096)return X.apply(String,e);for(var r="",a=0;at)&&(t=0),(!r||0>r||r>a)&&(r=a);for(var n="",s=t;se)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function P(e,t,r,a,s,i){if(!n.isBuffer(e))throw new TypeError("\"buffer\" argument must be a Buffer instance");if(t>s||te.length)throw new RangeError("Index out of range")}function F(e,t,r,a){if(r+a>e.length)throw new RangeError("Index out of range");if(0>r)throw new RangeError("Index out of range")}function O(e,t,r,a,n){return t=+t,r>>>=0,n||F(e,t,r,4,34028234663852886e22,-34028234663852886e22),Z.write(e,t,r,a,23,4),r+4}function N(e,t,r,a,n){return t=+t,r>>>=0,n||F(e,t,r,8,17976931348623157e292,-17976931348623157e292),Z.write(e,t,r,a,52,8),r+8}function j(e){if(e=e.split("=")[0],e=e.trim().replace(J,""),2>e.length)return"";for(;0!=e.length%4;)e+="=";return e}function L(e){return 16>e?"0"+e.toString(16):e.toString(16)}function D(e,t){t=t||1/0;for(var r=e.length,a=null,n=[],s=0,o;so){if(!a){if(56319o){-1<(t-=3)&&n.push(239,191,189),a=o;continue}o=(a-55296<<10|o-56320)+65536}else a&&-1<(t-=3)&&n.push(239,191,189);if(a=null,128>o){if(0>(t-=1))break;n.push(o)}else if(2048>o){if(0>(t-=2))break;n.push(192|o>>6,128|63&o)}else if(65536>o){if(0>(t-=3))break;n.push(224|o>>12,128|63&o>>6,128|63&o)}else if(1114112>o){if(0>(t-=4))break;n.push(240|o>>18,128|63&o>>12,128|63&o>>6,128|63&o)}else throw new Error("Invalid code point")}return n}function U(e){for(var t=[],r=0;r(t-=2));++a)n=e.charCodeAt(a),s=n>>8,o=n%256,r.push(o),r.push(s);return r}function H(e){return Y.toByteArray(j(e))}function q(e,t,r,a){for(var n=0;n=t.length||n>=e.length);++n)t[n+r]=e[n];return n}function z(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function V(e){return e!==e}var G=Math.pow,K=Math.min,X=String.fromCharCode,Y=e("base64-js"),Z=e("ieee754");r.Buffer=n,r.SlowBuffer=function(e){return+e!=e&&(e=0),n.alloc(+e)},r.INSPECT_MAX_BYTES=50;r.kMaxLength=2147483647,n.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()}catch(t){return!1}}(),n.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(n.prototype,"parent",{enumerable:!0,get:function(){return n.isBuffer(this)?this.buffer:void 0}}),Object.defineProperty(n.prototype,"offset",{enumerable:!0,get:function(){return n.isBuffer(this)?this.byteOffset:void 0}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&n[Symbol.species]===n&&Object.defineProperty(n,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),n.poolSize=8192,n.from=function(e,t,r){return s(e,t,r)},n.prototype.__proto__=Uint8Array.prototype,n.__proto__=Uint8Array,n.alloc=function(e,t,r){return o(e,t,r)},n.allocUnsafe=function(e){return d(e)},n.allocUnsafeSlow=function(e){return d(e)},n.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==n.prototype},n.compare=function(e,t){if(z(e,Uint8Array)&&(e=n.from(e,e.offset,e.byteLength)),z(t,Uint8Array)&&(t=n.from(t,t.offset,t.byteLength)),!n.isBuffer(e)||!n.isBuffer(t))throw new TypeError("The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array");if(e===t)return 0;for(var r=e.length,s=t.length,o=0,d=K(r,s);ot&&(e+=" ... "),""},n.prototype.compare=function(e,t,r,a,s){if(z(e,Uint8Array)&&(e=n.from(e,e.offset,e.byteLength)),!n.isBuffer(e))throw new TypeError("The \"target\" argument must be one of type Buffer or Uint8Array. Received type "+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===a&&(a=0),void 0===s&&(s=this.length),0>t||r>e.length||0>a||s>this.length)throw new RangeError("out of range index");if(a>=s&&t>=r)return 0;if(a>=s)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,a>>>=0,s>>>=0,this===e)return 0;for(var o=s-a,d=r-t,p=K(o,d),c=this.slice(a,s),l=e.slice(t,r),u=0;u>>=0,isFinite(r)?(r>>>=0,void 0===a&&(a="utf8")):(a=r,r=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var n=this.length-t;if((void 0===r||r>n)&&(r=n),0r||0>t)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");a||(a="utf8");for(var s=!1;;)switch(a){case"hex":return _(this,e,t,r);case"utf8":case"utf-8":return v(this,e,t,r);case"ascii":return w(this,e,t,r);case"latin1":case"binary":return S(this,e,t,r);case"base64":return A(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,e,t,r);default:if(s)throw new TypeError("Unknown encoding: "+a);a=(""+a).toLowerCase(),s=!0;}},n.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};n.prototype.slice=function(e,t){var r=this.length;e=~~e,t=void 0===t?r:~~t,0>e?(e+=r,0>e&&(e=0)):e>r&&(e=r),0>t?(t+=r,0>t&&(t=0)):t>r&&(t=r),t>>=0,t>>>=0,r||R(e,t,this.length);for(var a=this[e],n=1,s=0;++s>>=0,t>>>=0,r||R(e,t,this.length);for(var a=this[e+--t],n=1;0>>=0,t||R(e,1,this.length),this[e]},n.prototype.readUInt16LE=function(e,t){return e>>>=0,t||R(e,2,this.length),this[e]|this[e+1]<<8},n.prototype.readUInt16BE=function(e,t){return e>>>=0,t||R(e,2,this.length),this[e]<<8|this[e+1]},n.prototype.readUInt32LE=function(e,t){return e>>>=0,t||R(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},n.prototype.readUInt32BE=function(e,t){return e>>>=0,t||R(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},n.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||R(e,t,this.length);for(var a=this[e],n=1,s=0;++s=n&&(a-=G(2,8*t)),a},n.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||R(e,t,this.length);for(var a=t,n=1,s=this[e+--a];0=n&&(s-=G(2,8*t)),s},n.prototype.readInt8=function(e,t){return e>>>=0,t||R(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},n.prototype.readInt16LE=function(e,t){e>>>=0,t||R(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},n.prototype.readInt16BE=function(e,t){e>>>=0,t||R(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},n.prototype.readInt32LE=function(e,t){return e>>>=0,t||R(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},n.prototype.readInt32BE=function(e,t){return e>>>=0,t||R(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},n.prototype.readFloatLE=function(e,t){return e>>>=0,t||R(e,4,this.length),Z.read(this,e,!0,23,4)},n.prototype.readFloatBE=function(e,t){return e>>>=0,t||R(e,4,this.length),Z.read(this,e,!1,23,4)},n.prototype.readDoubleLE=function(e,t){return e>>>=0,t||R(e,8,this.length),Z.read(this,e,!0,52,8)},n.prototype.readDoubleBE=function(e,t){return e>>>=0,t||R(e,8,this.length),Z.read(this,e,!1,52,8)},n.prototype.writeUIntLE=function(e,t,r,a){if(e=+e,t>>>=0,r>>>=0,!a){var n=G(2,8*r)-1;P(this,e,t,r,n,0)}var s=1,o=0;for(this[t]=255&e;++o>>=0,r>>>=0,!a){var n=G(2,8*r)-1;P(this,e,t,r,n,0)}var s=r-1,o=1;for(this[t+s]=255&e;0<=--s&&(o*=256);)this[t+s]=255&e/o;return t+r},n.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,1,255,0),this[t]=255&e,t+1},n.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},n.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},n.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},n.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},n.prototype.writeIntLE=function(e,t,r,a){if(e=+e,t>>>=0,!a){var n=G(2,8*r-1);P(this,e,t,r,n-1,-n)}var s=0,o=1,d=0;for(this[t]=255&e;++se&&0===d&&0!==this[t+s-1]&&(d=1),this[t+s]=255&(e/o>>0)-d;return t+r},n.prototype.writeIntBE=function(e,t,r,a){if(e=+e,t>>>=0,!a){var n=G(2,8*r-1);P(this,e,t,r,n-1,-n)}var s=r-1,o=1,d=0;for(this[t+s]=255&e;0<=--s&&(o*=256);)0>e&&0===d&&0!==this[t+s+1]&&(d=1),this[t+s]=255&(e/o>>0)-d;return t+r},n.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,1,127,-128),0>e&&(e=255+e+1),this[t]=255&e,t+1},n.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},n.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},n.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},n.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,4,2147483647,-2147483648),0>e&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},n.prototype.writeFloatLE=function(e,t,r){return O(this,e,t,!0,r)},n.prototype.writeFloatBE=function(e,t,r){return O(this,e,t,!1,r)},n.prototype.writeDoubleLE=function(e,t,r){return N(this,e,t,!0,r)},n.prototype.writeDoubleBE=function(e,t,r){return N(this,e,t,!1,r)},n.prototype.copy=function(e,t,r,a){if(!n.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),a||0===a||(a=this.length),t>=e.length&&(t=e.length),t||(t=0),0t)throw new RangeError("targetStart out of bounds");if(0>r||r>=this.length)throw new RangeError("Index out of range");if(0>a)throw new RangeError("sourceEnd out of bounds");a>this.length&&(a=this.length),e.length-ts||"latin1"===a)&&(e=s)}}else"number"==typeof e&&(e&=255);if(0>t||this.length>>=0,r=r===void 0?this.length:r>>>0,e||(e=0);var o;if("number"==typeof e)for(o=t;or){var a="rmd160"===e?new d:p(e);t=a.update(t).digest()}else t.length64?t=e(t):t.length<64&&(t=n.concat([t,o],64));for(var r=this._ipad=n.allocUnsafe(64),a=this._opad=n.allocUnsafe(64),d=0;d<64;d++)r[d]=54^t[d],a[d]=92^t[d];this._hash=[r]}var a=e("inherits"),n=e("safe-buffer").Buffer,s=e("cipher-base"),o=n.alloc(128);a(r,s),r.prototype._update=function(e){this._hash.push(e)},r.prototype._final=function(){var e=this._alg(n.concat(this._hash));return this._alg(n.concat([this._opad,e]))},t.exports=r},{"cipher-base":75,inherits:137,"safe-buffer":194}],83:[function(e,t,r){"use strict";r.randomBytes=r.rng=r.pseudoRandomBytes=r.prng=e("randombytes"),r.createHash=r.Hash=e("create-hash"),r.createHmac=r.Hmac=e("create-hmac");var a=e("browserify-sign/algos"),n=Object.keys(a),s=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(n);r.getHashes=function(){return s};var i=e("pbkdf2");r.pbkdf2=i.pbkdf2,r.pbkdf2Sync=i.pbkdf2Sync;var o=e("browserify-cipher");r.Cipher=o.Cipher,r.createCipher=o.createCipher,r.Cipheriv=o.Cipheriv,r.createCipheriv=o.createCipheriv,r.Decipher=o.Decipher,r.createDecipher=o.createDecipher,r.Decipheriv=o.Decipheriv,r.createDecipheriv=o.createDecipheriv,r.getCiphers=o.getCiphers,r.listCiphers=o.listCiphers;var d=e("diffie-hellman");r.DiffieHellmanGroup=d.DiffieHellmanGroup,r.createDiffieHellmanGroup=d.createDiffieHellmanGroup,r.getDiffieHellman=d.getDiffieHellman,r.createDiffieHellman=d.createDiffieHellman,r.DiffieHellman=d.DiffieHellman;var p=e("browserify-sign");r.createSign=p.createSign,r.Sign=p.Sign,r.createVerify=p.createVerify,r.Verify=p.Verify,r.createECDH=e("create-ecdh");var c=e("public-encrypt");r.publicEncrypt=c.publicEncrypt,r.privateEncrypt=c.privateEncrypt,r.publicDecrypt=c.publicDecrypt,r.privateDecrypt=c.privateDecrypt;var l=e("randomfill");r.randomFill=l.randomFill,r.randomFillSync=l.randomFillSync,r.createCredentials=function(){throw new Error("sorry, createCredentials is not implemented yet\nwe accept pull requests\nhttps://github.com/crypto-browserify/crypto-browserify")},r.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},{"browserify-cipher":61,"browserify-sign":68,"browserify-sign/algos":65,"create-ecdh":78,"create-hash":79,"create-hmac":81,"diffie-hellman":91,pbkdf2:158,"public-encrypt":164,randombytes:175,randomfill:176}],84:[function(e,t){"use strict";function r(e,t){try{return decodeURIComponent(e.join(""))}catch(e){}if(1===e.length)return e;t=t||1;var a=e.slice(0,t),n=e.slice(t);return Array.prototype.concat.call([],r(a),r(n))}function a(e){try{return decodeURIComponent(e)}catch(n){for(var t=e.match(s),a=1;a>>1],r=o.r28shl(r,d),a=o.r28shl(a,d),o.pc2(r,a,e.keys,s)},a.prototype._update=function(e,t,a,n){var s=this._desState,i=o.readUInt32BE(e,t),d=o.readUInt32BE(e,t+4);o.ip(i,d,s.tmp,0),i=s.tmp[0],d=s.tmp[1],"encrypt"===this.type?this._encrypt(s,i,d,s.tmp,0):this._decrypt(s,i,d,s.tmp,0),i=s.tmp[0],d=s.tmp[1],o.writeUInt32BE(a,i,n),o.writeUInt32BE(a,d,n+4)},a.prototype._pad=function(e,t){for(var r=e.length-t,a=t;a>>0,c=f}o.rip(u,c,d,p)},a.prototype._decrypt=function(e,a,n,d,p){for(var c=n,u=a,y=e.keys.length-2;0<=y;y-=2){var b=e.keys[y],g=e.keys[y+1];o.expand(c,e.tmp,0),b^=e.tmp[0],g^=e.tmp[1];var h=o.substitute(b,g),s=o.permute(h),f=c;c=(u^s)>>>0,u=f}o.rip(c,u,d,p)}},{"../des":85,inherits:137,"minimalistic-assert":145}],89:[function(e,t){"use strict";function r(e,t){n.equal(t.length,24,"Invalid key length");var r=t.slice(0,8),a=t.slice(8,16),s=t.slice(16,24);this.ciphers="encrypt"===e?[d.create({type:"encrypt",key:r}),d.create({type:"decrypt",key:a}),d.create({type:"encrypt",key:s})]:[d.create({type:"decrypt",key:s}),d.create({type:"encrypt",key:a}),d.create({type:"decrypt",key:r})]}function a(e){o.call(this,e);var t=new r(this.type,this.options.key);this._edeState=t}var n=e("minimalistic-assert"),s=e("inherits"),i=e("../des"),o=i.Cipher,d=i.DES;s(a,o),t.exports=a,a.create=function(e){return new a(e)},a.prototype._update=function(e,t,r,a){var n=this._edeState;n.ciphers[0]._update(e,t,r,a),n.ciphers[1]._update(r,a,r,a),n.ciphers[2]._update(r,a,r,a)},a.prototype._pad=d.prototype._pad,a.prototype._unpad=d.prototype._unpad},{"../des":85,inherits:137,"minimalistic-assert":145}],90:[function(e,t,r){"use strict";r.readUInt32BE=function(e,t){var r=e[0+t]<<24|e[1+t]<<16|e[2+t]<<8|e[3+t];return r>>>0},r.writeUInt32BE=function(e,t,r){e[0+r]=t>>>24,e[1+r]=255&t>>>16,e[2+r]=255&t>>>8,e[3+r]=255&t},r.ip=function(e,t,r,a){for(var n=0,s=0,o=6;0<=o;o-=2){for(var d=0;24>=d;d+=8)n<<=1,n|=1&t>>>d+o;for(var d=0;24>=d;d+=8)n<<=1,n|=1&e>>>d+o}for(var o=6;0<=o;o-=2){for(var d=1;25>=d;d+=8)s<<=1,s|=1&t>>>d+o;for(var d=1;25>=d;d+=8)s<<=1,s|=1&e>>>d+o}r[a+0]=n>>>0,r[a+1]=s>>>0},r.rip=function(e,t,r,a){for(var n=0,s=0,o=0;4>o;o++)for(var d=24;0<=d;d-=8)n<<=1,n|=1&t>>>d+o,n<<=1,n|=1&e>>>d+o;for(var o=4;8>o;o++)for(var d=24;0<=d;d-=8)s<<=1,s|=1&t>>>d+o,s<<=1,s|=1&e>>>d+o;r[a+0]=n>>>0,r[a+1]=s>>>0},r.pc1=function(e,t,r,a){for(var n=0,s=0,o=7;5<=o;o--){for(var d=0;24>=d;d+=8)n<<=1,n|=1&t>>d+o;for(var d=0;24>=d;d+=8)n<<=1,n|=1&e>>d+o}for(var d=0;24>=d;d+=8)n<<=1,n|=1&t>>d+o;for(var o=1;3>=o;o++){for(var d=0;24>=d;d+=8)s<<=1,s|=1&t>>d+o;for(var d=0;24>=d;d+=8)s<<=1,s|=1&e>>d+o}for(var d=0;24>=d;d+=8)s<<=1,s|=1&e>>d+o;r[a+0]=n>>>0,r[a+1]=s>>>0},r.r28shl=function(e,t){return 268435455&e<>>28-t};var a=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];r.pc2=function(e,t,r,n){for(var s=0,o=0,d=a.length>>>1,p=0;p>>a[p];for(var p=d;p>>a[p];r[n+0]=s>>>0,r[n+1]=o>>>0},r.expand=function(e,t,r){var a=0,n=0;a=(1&e)<<5|e>>>27;for(var s=23;15<=s;s-=4)a<<=6,a|=63&e>>>s;for(var s=11;3<=s;s-=4)n|=63&e>>>s,n<<=6;n|=(31&e)<<1|e>>>31,t[r+0]=a>>>0,t[r+1]=n>>>0};var n=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];r.substitute=function(e,t){for(var r=0,a=0;4>a;a++){var s=63&e>>>18-6*a,o=n[64*a+s];r<<=4,r|=o}for(var a=0;4>a;a++){var s=63&t>>>18-6*a,o=n[256+64*a+s];r<<=4,r|=o}return r>>>0};var s=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];r.permute=function(e){for(var t=0,r=0;r>>s[r];return t>>>0},r.padSplit=function(e,t,r){for(var a=e.toString(2);a.lengthr;r+=2){a=o(Math.sqrt(r));for(var n=0;ne)return 2===t||5===t?new d([140,123]):new d([140,39]);t=new d(t);for(var r,s;;){for(r=new d(i(o(e/8)));r.bitLength()>e;)r.ishrn(1);if(r.isEven()&&r.iadd(u),r.testn(1)||r.iadd(f),!t.cmp(f))for(;r.mod(p).cmp(v);)r.iadd(w);else if(!t.cmp(y))for(;r.mod(h).cmp(m);)r.iadd(w);if(s=r.shrn(1),a(s)&&a(r)&&n(s)&&n(r)&&l.test(s)&&l.test(r))return r}}var o=Math.ceil,i=e("randombytes");t.exports=s,s.simpleSieve=a,s.fermatTest=n;var d=e("bn.js"),p=new d(24),c=e("miller-rabin"),l=new c,u=new d(1),f=new d(2),y=new d(5),b=new d(16),g=new d(8),h=new d(10),m=new d(3),_=new d(7),v=new d(11),w=new d(4),S=new d(12),A=null},{"bn.js":41,"miller-rabin":144,randombytes:175}],94:[function(e,t){t.exports={modp1:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},modp2:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},modp5:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},modp14:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},modp15:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},modp16:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},modp17:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},modp18:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}},{}],95:[function(e,t,r){"use strict";var a=r;a.version=e("../package.json").version,a.utils=e("./elliptic/utils"),a.rand=e("brorand"),a.curve=e("./elliptic/curve"),a.curves=e("./elliptic/curves"),a.ec=e("./elliptic/ec"),a.eddsa=e("./elliptic/eddsa")},{"../package.json":110,"./elliptic/curve":98,"./elliptic/curves":101,"./elliptic/ec":102,"./elliptic/eddsa":105,"./elliptic/utils":109,brorand:42}],96:[function(e,t){"use strict";function r(e,t){this.type=e,this.p=new s(t.p,16),this.red=t.prime?s.red(t.prime):s.mont(this.p),this.zero=new s(0).toRed(this.red),this.one=new s(1).toRed(this.red),this.two=new s(2).toRed(this.red),this.n=t.n&&new s(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=[,,,,],this._wnafT2=[,,,,],this._wnafT3=[,,,,],this._wnafT4=[,,,,];var r=this.n&&this.p.div(this.n);!r||0=p;t--)l=(l<<1)+n[t];o.push(l)}for(var u=this.jpoint(null,null,null),f=this.jpoint(null,null,null),y=s;0p)break;var l=s[p];c(0!==l),o="affine"===e.type?0>1]):o.mixedAdd(n[-l-1>>1].neg()):0>1]):o.add(n[-l-1>>1].neg())}return"affine"===e.type?o.toP():o},r.prototype._wnafMulAdd=function(e,t,r,s,o){for(var c=this._wnafT1,l=this._wnafT2,u=this._wnafT3,f=0,y=0;yy)break;for(var w=0;w>1]:0>M&&(g=l[w][-M-1>>1].neg());B="affine"===g.type?B.mixedAdd(g):B.add(g)}}for(var y=0;y=Math.ceil((e.bitLength()+1)/t.step)},a.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],a=this,n=0;n":""},a.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},a.prototype._extDbl=function(){var t=this.x.redSqr(),r=this.y.redSqr(),a=this.z.redSqr();a=a.redIAdd(a);var n=this.curve._mulA(t),s=this.x.redAdd(this.y).redSqr().redISub(t).redISub(r),e=n.redAdd(r),i=e.redSub(a),o=n.redSub(r),d=s.redMul(i),p=e.redMul(o),l=s.redMul(o),u=i.redMul(e);return this.curve.point(d,p,u,l)},a.prototype._projDbl=function(){var t=this.x.redAdd(this.y).redSqr(),r=this.x.redSqr(),a=this.y.redSqr(),n,s,i;if(this.curve.twisted){var o=this.curve._mulA(r),d=o.redAdd(a);if(this.zOne)n=t.redSub(r).redSub(a).redMul(d.redSub(this.curve.two)),s=d.redMul(o.redSub(a)),i=d.redSqr().redSub(d).redSub(d);else{var p=this.z.redSqr(),c=d.redSub(p).redISub(p);n=t.redSub(r).redISub(a).redMul(c),s=d.redMul(o.redSub(a)),i=d.redMul(c)}}else{var o=r.redAdd(a),p=this.curve._mulC(this.z).redSqr(),c=o.redSub(p).redSub(p);n=this.curve._mulC(t.redISub(o)).redMul(c),s=this.curve._mulC(o).redMul(r.redISub(a)),i=o.redMul(c)}return this.curve.point(n,s,i)},a.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},a.prototype._extAdd=function(t){var r=this.y.redSub(this.x).redMul(t.y.redSub(t.x)),a=this.y.redAdd(this.x).redMul(t.y.redAdd(t.x)),n=this.t.redMul(this.curve.dd).redMul(t.t),s=this.z.redMul(t.z.redAdd(t.z)),i=a.redSub(r),e=s.redSub(n),o=s.redAdd(n),d=a.redAdd(r),p=i.redMul(e),c=o.redMul(d),l=i.redMul(d),u=e.redMul(o);return this.curve.point(p,c,u,l)},a.prototype._projAdd=function(t){var r=this.z.redMul(t.z),a=r.redSqr(),n=this.x.redMul(t.x),s=this.y.redMul(t.y),i=this.curve.d.redMul(n).redMul(s),e=a.redSub(i),o=a.redAdd(i),d=this.x.redAdd(this.y).redMul(t.x.redAdd(t.y)).redISub(n).redISub(s),p=r.redMul(e).redMul(d),c,l;return this.curve.twisted?(c=r.redMul(o).redMul(s.redSub(this.curve._mulA(n))),l=e.redMul(o)):(c=r.redMul(o).redMul(s.redSub(n)),l=this.curve._mulC(e).redMul(o)),this.curve.point(p,c,l)},a.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},a.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},a.prototype.mulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!1)},a.prototype.jmulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!0)},a.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},a.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},a.prototype.getX=function(){return this.normalize(),this.x.fromRed()},a.prototype.getY=function(){return this.normalize(),this.y.fromRed()},a.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},a.prototype.eqXToP=function(e){var r=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(r))return!0;for(var a=e.clone(),n=this.curve.redN.redMul(this.z);;){if(a.iadd(this.curve.n),0<=a.cmp(this.curve.p))return!1;if(r.redIAdd(n),0===this.x.cmp(r))return!0}},a.prototype.toP=a.prototype.normalize,a.prototype.mixedAdd=a.prototype.add},{"../../elliptic":95,"../curve":98,"bn.js":41,inherits:137}],98:[function(e,t,r){"use strict";var a=r;a.base=e("./base"),a.short=e("./short"),a.mont=e("./mont"),a.edwards=e("./edwards")},{"./base":96,"./edwards":97,"./mont":99,"./short":100}],99:[function(e,t){"use strict";function r(e){o.call(this,"mont",e),this.a=new s(e.a,16).toRed(this.red),this.b=new s(e.b,16).toRed(this.red),this.i4=new s(4).toRed(this.red).redInvm(),this.two=new s(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function a(e,t,r){o.BasePoint.call(this,e,"projective"),null===t&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new s(t,16),this.z=new s(r,16),!this.x.red&&(this.x=this.x.toRed(this.curve.red)),!this.z.red&&(this.z=this.z.toRed(this.curve.red)))}var n=e("../curve"),s=e("bn.js"),i=e("inherits"),o=n.base,d=e("../../elliptic"),p=d.utils;i(r,o),t.exports=r,r.prototype.validate=function(e){var t=e.normalize().x,r=t.redSqr(),a=r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t),n=a.redSqrt();return 0===n.redSqr().cmp(a)},i(a,o.BasePoint),r.prototype.decodePoint=function(e,t){return this.point(p.toArray(e,t),1)},r.prototype.point=function(e,t){return new a(this,e,t)},r.prototype.pointFromJSON=function(e){return a.fromJSON(this,e)},a.prototype.precompute=function(){},a.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},a.fromJSON=function(e,t){return new a(e,t[0],t[1]||e.one)},a.prototype.inspect=function(){return this.isInfinity()?"":""},a.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},a.prototype.dbl=function(){var e=this.x.redAdd(this.z),t=e.redSqr(),r=this.x.redSub(this.z),a=r.redSqr(),n=t.redSub(a),s=t.redMul(a),i=n.redMul(a.redAdd(this.curve.a24.redMul(n)));return this.curve.point(s,i)},a.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},a.prototype.diffAdd=function(e,t){var r=this.x.redAdd(this.z),a=this.x.redSub(this.z),n=e.x.redAdd(e.z),s=e.x.redSub(e.z),i=s.redMul(r),o=n.redMul(a),d=t.z.redMul(i.redAdd(o).redSqr()),p=t.x.redMul(i.redISub(o).redSqr());return this.curve.point(d,p)},a.prototype.mul=function(e){for(var r=e.clone(),t=this,n=this.curve.point(null,null),s=this,o=[];0!==r.cmpn(0);r.iushrn(1))o.push(r.andln(1));for(var d=o.length-1;0<=d;d--)0===o[d]?(t=t.diffAdd(n,s),n=n.dbl()):(n=t.diffAdd(n,s),t=t.dbl());return n},a.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},a.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},a.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},a.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},a.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},{"../../elliptic":95,"../curve":98,"bn.js":41,inherits:137}],100:[function(e,t){"use strict";function r(e){p.call(this,"short",e),this.a=new o(e.a,16).toRed(this.red),this.b=new o(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=[,,,,],this._endoWnafT2=[,,,,]}function a(e,t,r,a){p.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new o(t,16),this.y=new o(r,16),a&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),!this.x.red&&(this.x=this.x.toRed(this.curve.red)),!this.y.red&&(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function n(e,t,r,a){p.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===a?(this.x=this.curve.one,this.y=this.curve.one,this.z=new o(0)):(this.x=new o(t,16),this.y=new o(r,16),this.z=new o(a,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}var s=e("../curve"),i=e("../../elliptic"),o=e("bn.js"),d=e("inherits"),p=s.base,c=i.utils.assert;d(r,p),t.exports=r,r.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,r;if(e.beta)t=new o(e.beta,16).toRed(this.red);else{var a=this._getEndoRoots(this.p);t=0>a[0].cmp(a[1])?a[0]:a[1],t=t.toRed(this.red)}if(e.lambda)r=new o(e.lambda,16);else{var n=this._getEndoRoots(this.n);0===this.g.mul(n[0]).x.cmp(this.g.x.redMul(t))?r=n[0]:(r=n[1],c(0===this.g.mul(r).x.cmp(this.g.x.redMul(t))))}var s;return s=e.basis?e.basis.map(function(e){return{a:new o(e.a,16),b:new o(e.b,16)}}):this._getEndoBasis(r),{beta:t,lambda:r,basis:s}}},r.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:o.mont(e),r=new o(2).toRed(t).redInvm(),a=r.redNeg(),n=new o(3).toRed(t).redNeg().redSqrt().redMul(r),s=a.redAdd(n).fromRed(),i=a.redSub(n).fromRed();return[s,i]},r.prototype._getEndoBasis=function(e){for(var t=this.n.ushrn(Math.floor(this.n.bitLength()/2)),a=e,n=this.n.clone(),s=new o(1),d=new o(0),p=new o(0),c=new o(1),l=0,f,b,g,h,m,_,w,S,A,B;0!==a.cmpn(0);){B=n.div(a),S=n.sub(B.mul(a)),A=p.sub(B.mul(s));var k=c.sub(B.mul(d));if(!g&&0>S.cmp(t))f=w.neg(),b=s,g=S.neg(),h=A;else if(g&&2==++l)break;w=S,n=a,a=S,p=s,s=A,c=d,d=k}m=S.neg(),_=A;var y=g.sqr().add(h.sqr()),E=m.sqr().add(_.sqr());return 0<=E.cmp(y)&&(m=f,_=b),g.negative&&(g=g.neg(),h=h.neg()),m.negative&&(m=m.neg(),_=_.neg()),[{a:g,b:h},{a:m,b:_}]},r.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],a=t[1],n=a.b.mul(e).divRound(this.n),s=r.b.neg().mul(e).divRound(this.n),i=n.mul(r.a),o=s.mul(a.a),d=n.mul(r.b),p=s.mul(a.b),c=e.sub(i).sub(o),l=d.add(p).neg();return{k1:c,k2:l}},r.prototype.pointFromX=function(e,t){e=new o(e,16),e.red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),a=r.redSqrt();if(0!==a.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var n=a.fromRed().isOdd();return(t&&!n||!t&&n)&&(a=a.redNeg()),this.point(e,a)},r.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,a=this.a.redMul(t),n=t.redSqr().redMul(t).redIAdd(a).redIAdd(this.b);return 0===r.redSqr().redISub(n).cmpn(0)},r.prototype._endoWnafMulAdd=function(e,t,r){for(var a=this._endoWnafT1,n=this._endoWnafT2,s=0;s":""},a.prototype.isInfinity=function(){return this.inf},a.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),a=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,a)},a.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),a=e.redInvm(),n=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(a),s=n.redSqr().redISub(this.x.redAdd(this.x)),i=n.redMul(this.x.redSub(s)).redISub(this.y);return this.curve.point(s,i)},a.prototype.getX=function(){return this.x.fromRed()},a.prototype.getY=function(){return this.y.fromRed()},a.prototype.mul=function(e){return e=new o(e,16),this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},a.prototype.mulAdd=function(e,t,r){var a=[this,t],n=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(a,n):this.curve._wnafMulAdd(1,a,n,2)},a.prototype.jmulAdd=function(e,t,r){var a=[this,t],n=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(a,n,!0):this.curve._wnafMulAdd(1,a,n,2,!0)},a.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},a.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,a=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(a)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(a)}}}return t},a.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var e=this.curve.jpoint(this.x,this.y,this.curve.one);return e},d(n,p.BasePoint),r.prototype.jpoint=function(e,t,r){return new n(this,e,t,r)},n.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),a=this.y.redMul(t).redMul(e);return this.curve.point(r,a)},n.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},n.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),a=this.z.redSqr(),n=this.x.redMul(t),s=e.x.redMul(a),i=this.y.redMul(t.redMul(e.z)),o=e.y.redMul(a.redMul(this.z)),d=n.redSub(s),p=i.redSub(o);if(0===d.cmpn(0))return 0===p.cmpn(0)?this.dbl():this.curve.jpoint(null,null,null);var r=d.redSqr(),c=r.redMul(d),l=n.redMul(r),u=p.redSqr().redIAdd(c).redISub(l).redISub(l),f=p.redMul(l.redISub(u)).redISub(i.redMul(c)),y=this.z.redMul(e.z).redMul(d);return this.curve.jpoint(u,f,y)},n.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),a=this.x,n=e.x.redMul(t),s=this.y,i=e.y.redMul(t).redMul(this.z),o=a.redSub(n),d=s.redSub(i);if(0===o.cmpn(0))return 0===d.cmpn(0)?this.dbl():this.curve.jpoint(null,null,null);var r=o.redSqr(),p=r.redMul(o),c=a.redMul(r),l=d.redSqr().redIAdd(p).redISub(c).redISub(c),u=d.redMul(c.redISub(l)).redISub(s.redMul(p)),f=this.z.redMul(o);return this.curve.jpoint(l,u,f)},n.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();if(this.curve.zeroA||this.curve.threeA){for(var t=this,n=0;n":""},n.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},{"../../elliptic":95,"../curve":98,"bn.js":41,inherits:137}],101:[function(e,t,r){"use strict";function a(e){this.curve="short"===e.type?new o.curve.short(e):"edwards"===e.type?new o.curve.edwards(e):new o.curve.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,d(this.g.validate(),"Invalid curve"),d(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function n(e,t){Object.defineProperty(s,e,{configurable:!0,enumerable:!0,get:function(){var r=new a(t);return Object.defineProperty(s,e,{configurable:!0,enumerable:!0,value:r}),r}})}var s=r,i=e("hash.js"),o=e("../elliptic"),d=o.utils.assert;s.PresetCurve=a,n("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:i.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),n("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:i.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),n("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:i.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),n("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:i.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),n("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:i.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),n("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:i.sha256,gRed:!1,g:["9"]}),n("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:i.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var p;try{p=e("./precomputed/secp256k1")}catch(t){p=void 0}n("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:i.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",p]})},{"../elliptic":95,"./precomputed/secp256k1":108,"hash.js":122}],102:[function(e,t){"use strict";function r(e){return this instanceof r?void("string"==typeof e&&(o(s.curves.hasOwnProperty(e),"Unknown curve "+e),e=s.curves[e]),e instanceof s.curves.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash):new r(e)}var a=e("bn.js"),n=e("hmac-drbg"),s=e("../../elliptic"),i=s.utils,o=i.assert,d=e("./key"),c=e("./signature");t.exports=r,r.prototype.keyPair=function(e){return new d(this,e)},r.prototype.keyFromPrivate=function(e,t){return d.fromPrivate(this,e,t)},r.prototype.keyFromPublic=function(e,t){return d.fromPublic(this,e,t)},r.prototype.genKeyPair=function(e){e||(e={});var t=new n({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||s.rand(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),i=this.n.sub(new a(2));do{var o=new a(t.generate(r));if(0=b.cmpn(1)||0<=b.cmp(f))){var g=this.g.mul(b);if(!g.isInfinity()){var h=g.getX(),m=h.umod(this.n);if(0!==m.cmpn(0)){var r=b.invm(this.n).mul(m.mul(t.getPrivate()).iadd(e));if(r=r.umod(this.n),0!==r.cmpn(0)){var _=(g.getY().isOdd()?1:0)|(0===h.cmp(m)?0:2);return o.canonical&&0o.cmpn(1)||0<=o.cmp(this.n))return!1;if(0>r.cmpn(1)||0<=r.cmp(this.n))return!1;var s=r.invm(this.n),d=s.mul(e).umod(this.n),l=s.mul(o).umod(this.n);if(!this.curve._maxwellTrick){var u=this.g.mulAdd(d,n.getPublic(),l);return!u.isInfinity()&&0===u.getX().umod(this.n).cmp(o)}var u=this.g.jmulAdd(d,n.getPublic(),l);return!u.isInfinity()&&u.eqXToP(o)},r.prototype.recoverPubKey=function(t,i,d,p){o((3&d)===d,"The recovery param is more than two bits"),i=new c(i,p);var l=this.n,n=new a(t),e=i.r,u=i.s,s=1&d,f=d>>1;if(0<=e.cmp(this.curve.p.umod(this.curve.n))&&f)throw new Error("Unable to find sencond key candinate");e=f?this.curve.pointFromX(e.add(this.curve.n),s):this.curve.pointFromX(e,s);var y=i.r.invm(l),b=l.sub(n).mul(y).umod(l),g=u.mul(y).umod(l);return this.g.mulAdd(b,e,g)},r.prototype.getKeyRecoveryParam=function(t,e,r,a){if(e=new c(e,a),null!==e.recoveryParam)return e.recoveryParam;for(var n=0;4>n;n++){var s;try{s=this.recoverPubKey(t,e,n)}catch(t){continue}if(s.eq(r))return n}throw new Error("Unable to find valid recovery factor")}},{"../../elliptic":95,"./key":103,"./signature":104,"bn.js":41,"hmac-drbg":134}],103:[function(e,t){"use strict";function r(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}var a=e("bn.js"),n=e("../../elliptic"),s=n.utils,i=s.assert;t.exports=r,r.fromPublic=function(e,t,a){return t instanceof r?t:new r(e,{pub:t,pubEnc:a})},r.fromPrivate=function(e,t,a){return t instanceof r?t:new r(e,{priv:t,privEnc:a})},r.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},r.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},r.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},r.prototype._importPrivate=function(e,t){this.priv=new a(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},r.prototype._importPublic=function(e,t){return e.x||e.y?("mont"===this.ec.curve.type?i(e.x,"Need x coordinate"):("short"===this.ec.curve.type||"edwards"===this.ec.curve.type)&&i(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y))):void(this.pub=this.ec.curve.decodePoint(e,t))},r.prototype.derive=function(e){return e.mul(this.priv).getX()},r.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)},r.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},r.prototype.inspect=function(){return""}},{"../../elliptic":95,"bn.js":41}],104:[function(e,t){"use strict";function r(e,t){return e instanceof r?e:void(this._importDER(e,t)||(p(e.r&&e.s,"Signature without r or s"),this.r=new d(e.r,16),this.s=new d(e.s,16),this.recoveryParam=void 0===e.recoveryParam?null:e.recoveryParam))}function a(){this.place=0}function n(e,t){var r=e[t.place++];if(!(128&r))return r;for(var a=0,n=0,s=t.place;n<(15&r);n++,s++)a<<=8,a|=e[s];return t.place=s,a}function i(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&tt)return void e.push(t);var r=1+(Math.log(t)/Math.LN2>>>3);for(e.push(128|r);--r;)e.push(255&t>>>(r<<3));e.push(t)}var d=e("bn.js"),s=e("../../elliptic"),c=s.utils,p=c.assert;t.exports=r,r.prototype._importDER=function(e,t){e=c.toArray(e,t);var i=new a;if(48!==e[i.place++])return!1;var o=n(e,i);if(o+i.place!==e.length)return!1;if(2!==e[i.place++])return!1;var p=n(e,i),l=e.slice(i.place,p+i.place);if(i.place+=p,2!==e[i.place++])return!1;var u=n(e,i);if(e.length!==u+i.place)return!1;var f=e.slice(i.place,u+i.place);return 0===l[0]&&128&l[1]&&(l=l.slice(1)),0===f[0]&&128&f[1]&&(f=f.slice(1)),this.r=new d(l),this.s=new d(f),this.recoveryParam=null,!0},r.prototype.toDER=function(e){var t=this.r.toArray(),a=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&a[0]&&(a=[0].concat(a)),t=i(t),a=i(a);!a[0]&&!(128&a[1]);)a=a.slice(1);var n=[2];o(n,t.length),n=n.concat(t),n.push(2),o(n,a.length);var d=n.concat(a),p=[48];return o(p,d.length),p=p.concat(d),c.encode(p,e)}},{"../../elliptic":95,"bn.js":41}],105:[function(e,t){"use strict";function r(e){if(i("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof r))return new r(e);var e=n.curves[e].curve;this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=a.sha512}var a=e("hash.js"),n=e("../../elliptic"),s=n.utils,i=s.assert,o=s.parseBytes,d=e("./key"),p=e("./signature");t.exports=r,r.prototype.sign=function(e,t){e=o(e);var a=this.keyFromSecret(t),n=this.hashInt(a.messagePrefix(),e),r=this.g.mul(n),s=this.encodePoint(r),i=this.hashInt(s,a.pubBytes(),e).mul(a.priv()),d=n.add(i).umod(this.curve.n);return this.makeSignature({R:r,S:d,Rencoded:s})},r.prototype.verify=function(e,t,r){e=o(e),t=this.makeSignature(t);var a=this.keyFromPublic(r),n=this.hashInt(t.Rencoded(),a.pubBytes(),e),s=this.g.mul(t.S()),i=t.R().add(a.pub().mul(n));return i.eq(s)},r.prototype.hashInt=function(){for(var e=this.hash(),t=0;t(a>>1)-1?(a>>1)-o:o,n.isubn(s)}else s=0;r.push(s);for(var d=0!==n.cmpn(0)&&0===n.andln(a-1)?t+1:1,p=1;pn?"0":"")+n.toString(16);return t};t.exports={random:function(t){var r;if("undefined"!=typeof window&&window.crypto&&window.crypto.getRandomValues)r=window.crypto.getRandomValues(new Uint8Array(t));else if("undefined"!=typeof e)r=e("crypto").randomBytes(t);else throw"Safe random numbers not available.";for(var a="0x",n=0;nt.length?"0"+t:t},r="0x",a=0,n;a!=e.length;a++){if(n=e.charCodeAt(a),128>n){r+=t(n);continue}if(2048>n)r+=t(192|n>>6);else{if(55295n){if(++a==e.length)return null;var s=e.charCodeAt(a);if(56320>s||57343>18),r+=t(128|63&n>>12)}else r+=t(224|n>>12);r+=t(128|63&n>>6)}r+=t(128|63&n)}return r},toString:function(e){for(var t="",a=0,o=s(e);ad){if(a>=o)return null;d=(31&d)<<6|63&n(e,a)}else if(223d){if(a+1>=o)return null;d=(15&d)<<12|(63&n(e,a))<<6|63&n(e,++a)}else if(239d){if(a+2>=o)return null;d=(7&d)<<18|(63&n(e,a))<<12|(63&n(e,++a))<<6|63&n(e,++a)}else return null;++a}if(65535>=d)t+=r(d);else if(1114111>=d)d-=65536,t+=r(55296|d>>10),t+=r(56320|1023&d);else return null}return t},fromNumber:function(e){var t=e.toString(16);return 0==t.length%2?"0x"+t:"0x0"+t},toNumber:function(e){return parseInt(e.slice(2),16)},fromNat:function(e){return"0x0"===e?"0x":0==e.length%2?e:"0x0"+e.slice(2)},toNat:function(e){return"0"===e[2]?"0x"+e.slice(3):e},fromArray:o,toArray:i,fromUint8Array:function(e){return o([].slice.call(e,0))},toUint8Array:function(e){return new Uint8Array(i(e))}}},{"./array.js":111}],113:[function(e,t){var r=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],a=[1,256,65536,16777216],n=[0,8,16,24],i=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],s=function(e){return{blocks:[],reset:!0,block:0,start:0,blockCount:1600-(e<<1)>>5,outputBlocks:e>>5,s:function(e){return[].concat(e,e,e,e,e)}([0,0,0,0,0,0,0,0,0,0])}},o=function(e,t){for(var o=t.length,p=e.blocks,c=e.blockCount<<2,l=e.blockCount,u=e.outputBlocks,f=e.s,s=0,y,b;s>2]|=t[s]<b?p[y>>2]|=b<b?(p[y>>2]|=(192|b>>6)<>2]|=(128|63&b)<b||57344<=b?(p[y>>2]|=(224|b>>12)<>2]|=(128|63&b>>6)<>2]|=(128|63&b)<>2]|=(240|b>>18)<>2]|=(128|63&b>>12)<>2]|=(128|63&b>>6)<>2]|=(128|63&b)<=c){for(e.start=y-c,e.block=p[l],y=0;y>2]|=a[3&y],e.lastByteIndex===c)for(p[0]=p[l],y=1;y>4]+r[15&m]+r[15&m>>12]+r[15&m>>8]+r[15&m>>20]+r[15&m>>16]+r[15&m>>28]+r[15&m>>24];0==h%l&&(d(f),y=0)}return"0x"+g},d=function(e){var t,r,a,s,o,d,p,c,u,f,y,b,g,m,_,v,w,S,A,B,k,x,E,T,M,I,C,R,P,F,O,N,j,L,D,U,W,H,q,z,V,G,K,X,Y,Z,J,$,Q,ee,te,re,ae,ne,se,ie,oe,de,pe,ce,le,ue,fe;for(a=0;48>a;a+=2)s=e[0]^e[10]^e[20]^e[30]^e[40],o=e[1]^e[11]^e[21]^e[31]^e[41],d=e[2]^e[12]^e[22]^e[32]^e[42],p=e[3]^e[13]^e[23]^e[33]^e[43],c=e[4]^e[14]^e[24]^e[34]^e[44],u=e[5]^e[15]^e[25]^e[35]^e[45],f=e[6]^e[16]^e[26]^e[36]^e[46],y=e[7]^e[17]^e[27]^e[37]^e[47],b=e[8]^e[18]^e[28]^e[38]^e[48],g=e[9]^e[19]^e[29]^e[39]^e[49],t=b^(d<<1|p>>>31),r=g^(p<<1|d>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=s^(c<<1|u>>>31),r=o^(u<<1|c>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=d^(f<<1|y>>>31),r=p^(y<<1|f>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=c^(b<<1|g>>>31),r=u^(g<<1|b>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=f^(s<<1|o>>>31),r=y^(o<<1|s>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,m=e[0],_=e[1],Z=e[11]<<4|e[10]>>>28,J=e[10]<<4|e[11]>>>28,R=e[20]<<3|e[21]>>>29,P=e[21]<<3|e[20]>>>29,ce=e[31]<<9|e[30]>>>23,le=e[30]<<9|e[31]>>>23,G=e[40]<<18|e[41]>>>14,K=e[41]<<18|e[40]>>>14,L=e[2]<<1|e[3]>>>31,D=e[3]<<1|e[2]>>>31,v=e[13]<<12|e[12]>>>20,w=e[12]<<12|e[13]>>>20,$=e[22]<<10|e[23]>>>22,Q=e[23]<<10|e[22]>>>22,F=e[33]<<13|e[32]>>>19,O=e[32]<<13|e[33]>>>19,ue=e[42]<<2|e[43]>>>30,fe=e[43]<<2|e[42]>>>30,ne=e[5]<<30|e[4]>>>2,se=e[4]<<30|e[5]>>>2,U=e[14]<<6|e[15]>>>26,W=e[15]<<6|e[14]>>>26,S=e[25]<<11|e[24]>>>21,A=e[24]<<11|e[25]>>>21,ee=e[34]<<15|e[35]>>>17,te=e[35]<<15|e[34]>>>17,N=e[45]<<29|e[44]>>>3,j=e[44]<<29|e[45]>>>3,T=e[6]<<28|e[7]>>>4,M=e[7]<<28|e[6]>>>4,ie=e[17]<<23|e[16]>>>9,oe=e[16]<<23|e[17]>>>9,H=e[26]<<25|e[27]>>>7,q=e[27]<<25|e[26]>>>7,B=e[36]<<21|e[37]>>>11,k=e[37]<<21|e[36]>>>11,re=e[47]<<24|e[46]>>>8,ae=e[46]<<24|e[47]>>>8,X=e[8]<<27|e[9]>>>5,Y=e[9]<<27|e[8]>>>5,I=e[18]<<20|e[19]>>>12,C=e[19]<<20|e[18]>>>12,de=e[29]<<7|e[28]>>>25,pe=e[28]<<7|e[29]>>>25,z=e[38]<<8|e[39]>>>24,V=e[39]<<8|e[38]>>>24,x=e[48]<<14|e[49]>>>18,E=e[49]<<14|e[48]>>>18,e[0]=m^~v&S,e[1]=_^~w&A,e[10]=T^~I&R,e[11]=M^~C&P,e[20]=L^~U&H,e[21]=D^~W&q,e[30]=X^~Z&$,e[31]=Y^~J&Q,e[40]=ne^~ie&de,e[41]=se^~oe&pe,e[2]=v^~S&B,e[3]=w^~A&k,e[12]=I^~R&F,e[13]=C^~P&O,e[22]=U^~H&z,e[23]=W^~q&V,e[32]=Z^~$&ee,e[33]=J^~Q&te,e[42]=ie^~de&ce,e[43]=oe^~pe&le,e[4]=S^~B&x,e[5]=A^~k&E,e[14]=R^~F&N,e[15]=P^~O&j,e[24]=H^~z&G,e[25]=q^~V&K,e[34]=$^~ee&re,e[35]=Q^~te&ae,e[44]=de^~ce&ue,e[45]=pe^~le&fe,e[6]=B^~x&m,e[7]=k^~E&_,e[16]=F^~N&T,e[17]=O^~j&M,e[26]=z^~G&L,e[27]=V^~K&D,e[36]=ee^~re&X,e[37]=te^~ae&Y,e[46]=ce^~ue&ne,e[47]=le^~fe&se,e[8]=x^~m&v,e[9]=E^~_&w,e[18]=N^~T&I,e[19]=j^~M&C,e[28]=G^~L&U,e[29]=K^~D&W,e[38]=re^~X&Z,e[39]=ae^~Y&J,e[48]=ue^~ne&ie,e[49]=fe^~se&oe,e[0]^=i[a],e[1]^=i[a+1]},p=function(e){return function(t){var r;if("0x"===t.slice(0,2)){r=[];for(var a=2,n=t.length;ap)throw new Error("[ethjs-unit] while converting number "+e+" to wei, too many decimal places");for(;f.length=p?p-49+10:17<=p&&22>=p?p-17+10:15&p;return n}function y(e,t,a,n){for(var s=0,o=d(e.length,a),p=t,l;p>>n}return t}function g(e,t,n){n.negative=t.negative^e.negative;var s=0|e.length+t.length;n.length=s,s=0|s-1;var p=0|e.words[0],c=0|t.words[0],l=p*c,u=67108863&l,f=0|l/67108864;n.words[0]=u;for(var y=1;y>>26,h=67108863&f,m=d(y,t.length-1),_=o(0,y-e.length+1),v;_<=m;_++)v=0|y-_,p=0|e.words[v],c=0|t.words[_],l=p*c+h,g+=0|l/67108864,h=67108863&l;n.words[y]=0|h,f=0|g}return 0===f?n.length--:n.words[y]=0|f,n.strip()}function h(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var s=0,p=0,c=0,l;c>>26),p+=l>>>26,l&=67108863}n.words[c]=u,s=l,l=p}return 0===s?n.length--:n.words[c]=s,n.strip()}function m(e,t,r){var a=new _;return a.mulp(e,t,r)}function _(e,t){this.x=e,this.y=t}function v(e,t){this.name=e,this.p=new f(t,16),this.n=this.p.bitLength(),this.k=new f(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function w(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function S(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function A(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function B(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function k(e){if("string"==typeof e){var t=f._prime(e);this.m=t.p,this.prime=t}else l(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function x(e){k.call(this,e),this.shift=this.m.bitLength(),0!=this.shift%26&&(this.shift+=26-this.shift%26),this.r=new f(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)}"object"==typeof t?t.exports=f:i.BN=f,f.BN=f,f.wordSize=26;var E;try{E=e("buffer").Buffer}catch(t){}f.isBN=function(e){return!!(e instanceof f)||null!==e&&"object"==typeof e&&e.constructor.wordSize===f.wordSize&&Array.isArray(e.words)},f.max=function(e,t){return 0e.cmp(t)?e:t},f.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),l(t===(0|t)&&2<=t&&36>=t),e=e.toString().replace(/\s+/g,"");var a=0;"-"===e[0]&&a++,16===t?this._parseHex(e,a):this._parseBase(e,t,a),"-"===e[0]&&(this.negative=1),this.strip();"le"!==r||this._initArray(this.toArray(),t,r)},f.prototype._initNumber=function(e,t,r){0>e&&(this.negative=1,e=-e),67108864>e?(this.words=[67108863&e],this.length=1):4503599627370496>e?(this.words=[67108863&e,67108863&e/67108864],this.length=2):(l(9007199254740992>e),this.words=[67108863&e,67108863&e/67108864,1],this.length=3);"le"!==r||this._initArray(this.toArray(),t,r)},f.prototype._initArray=function(e,t,r){if(l("number"==typeof e.length),0>=e.length)return this.words=[0],this.length=1,this;this.length=s(e.length/3),this.words=Array(this.length);for(var a=0;a>>26-n,n+=24,26<=n&&(n-=26,o++);else if("le"===r)for(a=0,o=0;a>>26-n,n+=24,26<=n&&(n-=26,o++);return this.strip()},f.prototype._parseHex=function(e,t){this.length=s((e.length-t)/6),this.words=Array(this.length);for(var r=0;r=t;r-=6)o=u(e,r,r+6),this.words[n]|=67108863&o<>>26-a,a+=24,26<=a&&(a-=26,n++);r+6!==t&&(o=u(e,t,r+6),this.words[n]|=67108863&o<>>26-a),this.strip()},f.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var a=0,n=1;67108863>=n;n*=t)a++;a--,n=0|n/t;for(var s=e.length-r,o=s%a,p=d(s,s-o)+r,c=0,l=r;lthis.words[0]+c?this.words[0]+=c:this._iaddn(c);if(0!==o){var u=1;for(c=y(e,l,e.length,t),l=0;lthis.words[0]+c?this.words[0]+=c:this._iaddn(c)}},f.prototype.copy=function(e){e.words=Array(this.length);for(var t=0;t"};var T=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],M=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],I=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];f.prototype.toString=function(e,t){e=e||10,t=0|t||1;var a;if(16===e||"hex"===e){a="";for(var n=0,s=0,o=0;o>>24-n,a=0!==s||o!=this.length-1?T[6-p.length]+p+a:p+a,n+=2,26<=n&&(n-=26,o--)}for(0!==s&&(a=s.toString(16)+a);0!=a.length%t;)a="0"+a;return 0!==this.negative&&(a="-"+a),a}if(e===(0|e)&&2<=e&&36>=e){var u=M[e],f=I[e];a="";var y=this.clone();for(y.negative=0;!y.isZero();){var b=y.modn(f).toString(e);y=y.idivn(f),a=y.isZero()?b+a:T[u-b.length]+b+a}for(this.isZero()&&(a="0"+a);0!=a.length%t;)a="0"+a;return 0!==this.negative&&(a="-"+a),a}l(!1,"Base should be between 2 and 36")},f.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:2>>=13),64<=a&&(n+=7,a>>>=7),8<=a&&(n+=4,a>>>=4),2<=a&&(n+=2,a>>>=2),n+a},f.prototype._zeroBits=function(e){if(0===e)return 26;var a=e,n=0;return 0==(8191&a)&&(n+=13,a>>>=13),0==(127&a)&&(n+=7,a>>>=7),0==(15&a)&&(n+=4,a>>>=4),0==(3&a)&&(n+=2,a>>>=2),0==(1&a)&&n++,n},f.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},f.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0,a;te.length?this.clone().ior(e):e.clone().ior(this)},f.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},f.prototype.iuand=function(e){var t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},f.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},f.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},f.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},f.prototype.inotn=function(e){l("number"==typeof e&&0<=e);var t=0|s(e/26),r=e%26;this._expand(t),0>26-r),this.strip()},f.prototype.notn=function(e){return this.clone().inotn(e)},f.prototype.setn=function(e,t){l("number"==typeof e&&0<=e);var r=0|e/26,a=e%26;return this._expand(r+1),t?this.words[r]|=1<e.length?(n=this,s=e):(n=e,s=this);for(var o=0,d=0;d>>26;for(;0!==o&&d>>26;if(this.length=n.length,0!==o)this.words[this.length]=o,this.length++;else if(n!==this)for(;de.length?this.clone().iadd(e):e.clone().iadd(this)},f.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n=this.cmp(e);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;var s,d;0>26,this.words[c]=67108863&t;for(;0!==p&&c>26,this.words[c]=67108863&t;if(0===p&&c>>13,u=0|s[1],f=8191&u,y=u>>>13,b=0|s[2],g=8191&b,h=b>>>13,m=0|s[3],_=8191&m,v=m>>>13,w=0|s[4],S=8191&w,A=w>>>13,B=0|s[5],k=8191&B,x=B>>>13,E=0|s[6],T=8191&E,M=E>>>13,I=0|s[7],C=8191&I,R=I>>>13,P=0|s[8],F=8191&P,O=P>>>13,N=0|s[9],j=8191&N,L=N>>>13,D=0|a[0],U=8191&D,W=D>>>13,H=0|a[1],q=8191&H,z=H>>>13,V=0|a[2],G=8191&V,K=V>>>13,X=0|a[3],Y=8191&X,Z=X>>>13,J=0|a[4],$=8191&J,Q=J>>>13,ee=0|a[5],te=8191&ee,re=ee>>>13,ae=0|a[6],ne=8191&ae,se=ae>>>13,ie=0|a[7],oe=8191&ie,de=ie>>>13,pe=0|a[8],ce=8191&pe,le=pe>>>13,ue=0|a[9],fe=8191&ue,ye=ue>>>13,be,ge,he;r.negative=e.negative^t.negative,r.length=19,be=n(p,U),ge=n(p,W),ge=0|ge+n(l,U),he=n(l,W);var me=0|(0|o+be)+((8191&ge)<<13);o=0|(0|he+(ge>>>13))+(me>>>26),me&=67108863,be=n(f,U),ge=n(f,W),ge=0|ge+n(y,U),he=n(y,W),be=0|be+n(p,q),ge=0|ge+n(p,z),ge=0|ge+n(l,q),he=0|he+n(l,z);var _e=0|(0|o+be)+((8191&ge)<<13);o=0|(0|he+(ge>>>13))+(_e>>>26),_e&=67108863,be=n(g,U),ge=n(g,W),ge=0|ge+n(h,U),he=n(h,W),be=0|be+n(f,q),ge=0|ge+n(f,z),ge=0|ge+n(y,q),he=0|he+n(y,z),be=0|be+n(p,G),ge=0|ge+n(p,K),ge=0|ge+n(l,G),he=0|he+n(l,K);var ve=0|(0|o+be)+((8191&ge)<<13);o=0|(0|he+(ge>>>13))+(ve>>>26),ve&=67108863,be=n(_,U),ge=n(_,W),ge=0|ge+n(v,U),he=n(v,W),be=0|be+n(g,q),ge=0|ge+n(g,z),ge=0|ge+n(h,q),he=0|he+n(h,z),be=0|be+n(f,G),ge=0|ge+n(f,K),ge=0|ge+n(y,G),he=0|he+n(y,K),be=0|be+n(p,Y),ge=0|ge+n(p,Z),ge=0|ge+n(l,Y),he=0|he+n(l,Z);var we=0|(0|o+be)+((8191&ge)<<13);o=0|(0|he+(ge>>>13))+(we>>>26),we&=67108863,be=n(S,U),ge=n(S,W),ge=0|ge+n(A,U),he=n(A,W),be=0|be+n(_,q),ge=0|ge+n(_,z),ge=0|ge+n(v,q),he=0|he+n(v,z),be=0|be+n(g,G),ge=0|ge+n(g,K),ge=0|ge+n(h,G),he=0|he+n(h,K),be=0|be+n(f,Y),ge=0|ge+n(f,Z),ge=0|ge+n(y,Y),he=0|he+n(y,Z),be=0|be+n(p,$),ge=0|ge+n(p,Q),ge=0|ge+n(l,$),he=0|he+n(l,Q);var Se=0|(0|o+be)+((8191&ge)<<13);o=0|(0|he+(ge>>>13))+(Se>>>26),Se&=67108863,be=n(k,U),ge=n(k,W),ge=0|ge+n(x,U),he=n(x,W),be=0|be+n(S,q),ge=0|ge+n(S,z),ge=0|ge+n(A,q),he=0|he+n(A,z),be=0|be+n(_,G),ge=0|ge+n(_,K),ge=0|ge+n(v,G),he=0|he+n(v,K),be=0|be+n(g,Y),ge=0|ge+n(g,Z),ge=0|ge+n(h,Y),he=0|he+n(h,Z),be=0|be+n(f,$),ge=0|ge+n(f,Q),ge=0|ge+n(y,$),he=0|he+n(y,Q),be=0|be+n(p,te),ge=0|ge+n(p,re),ge=0|ge+n(l,te),he=0|he+n(l,re);var Ae=0|(0|o+be)+((8191&ge)<<13);o=0|(0|he+(ge>>>13))+(Ae>>>26),Ae&=67108863,be=n(T,U),ge=n(T,W),ge=0|ge+n(M,U),he=n(M,W),be=0|be+n(k,q),ge=0|ge+n(k,z),ge=0|ge+n(x,q),he=0|he+n(x,z),be=0|be+n(S,G),ge=0|ge+n(S,K),ge=0|ge+n(A,G),he=0|he+n(A,K),be=0|be+n(_,Y),ge=0|ge+n(_,Z),ge=0|ge+n(v,Y),he=0|he+n(v,Z),be=0|be+n(g,$),ge=0|ge+n(g,Q),ge=0|ge+n(h,$),he=0|he+n(h,Q),be=0|be+n(f,te),ge=0|ge+n(f,re),ge=0|ge+n(y,te),he=0|he+n(y,re),be=0|be+n(p,ne),ge=0|ge+n(p,se),ge=0|ge+n(l,ne),he=0|he+n(l,se);var Be=0|(0|o+be)+((8191&ge)<<13);o=0|(0|he+(ge>>>13))+(Be>>>26),Be&=67108863,be=n(C,U),ge=n(C,W),ge=0|ge+n(R,U),he=n(R,W),be=0|be+n(T,q),ge=0|ge+n(T,z),ge=0|ge+n(M,q),he=0|he+n(M,z),be=0|be+n(k,G),ge=0|ge+n(k,K),ge=0|ge+n(x,G),he=0|he+n(x,K),be=0|be+n(S,Y),ge=0|ge+n(S,Z),ge=0|ge+n(A,Y),he=0|he+n(A,Z),be=0|be+n(_,$),ge=0|ge+n(_,Q),ge=0|ge+n(v,$),he=0|he+n(v,Q),be=0|be+n(g,te),ge=0|ge+n(g,re),ge=0|ge+n(h,te),he=0|he+n(h,re),be=0|be+n(f,ne),ge=0|ge+n(f,se),ge=0|ge+n(y,ne),he=0|he+n(y,se),be=0|be+n(p,oe),ge=0|ge+n(p,de),ge=0|ge+n(l,oe),he=0|he+n(l,de);var ke=0|(0|o+be)+((8191&ge)<<13);o=0|(0|he+(ge>>>13))+(ke>>>26),ke&=67108863,be=n(F,U),ge=n(F,W),ge=0|ge+n(O,U),he=n(O,W),be=0|be+n(C,q),ge=0|ge+n(C,z),ge=0|ge+n(R,q),he=0|he+n(R,z),be=0|be+n(T,G),ge=0|ge+n(T,K),ge=0|ge+n(M,G),he=0|he+n(M,K),be=0|be+n(k,Y),ge=0|ge+n(k,Z),ge=0|ge+n(x,Y),he=0|he+n(x,Z),be=0|be+n(S,$),ge=0|ge+n(S,Q),ge=0|ge+n(A,$),he=0|he+n(A,Q),be=0|be+n(_,te),ge=0|ge+n(_,re),ge=0|ge+n(v,te),he=0|he+n(v,re),be=0|be+n(g,ne),ge=0|ge+n(g,se),ge=0|ge+n(h,ne),he=0|he+n(h,se),be=0|be+n(f,oe),ge=0|ge+n(f,de),ge=0|ge+n(y,oe),he=0|he+n(y,de),be=0|be+n(p,ce),ge=0|ge+n(p,le),ge=0|ge+n(l,ce),he=0|he+n(l,le);var xe=0|(0|o+be)+((8191&ge)<<13);o=0|(0|he+(ge>>>13))+(xe>>>26),xe&=67108863,be=n(j,U),ge=n(j,W),ge=0|ge+n(L,U),he=n(L,W),be=0|be+n(F,q),ge=0|ge+n(F,z),ge=0|ge+n(O,q),he=0|he+n(O,z),be=0|be+n(C,G),ge=0|ge+n(C,K),ge=0|ge+n(R,G),he=0|he+n(R,K),be=0|be+n(T,Y),ge=0|ge+n(T,Z),ge=0|ge+n(M,Y),he=0|he+n(M,Z),be=0|be+n(k,$),ge=0|ge+n(k,Q),ge=0|ge+n(x,$),he=0|he+n(x,Q),be=0|be+n(S,te),ge=0|ge+n(S,re),ge=0|ge+n(A,te),he=0|he+n(A,re),be=0|be+n(_,ne),ge=0|ge+n(_,se),ge=0|ge+n(v,ne),he=0|he+n(v,se),be=0|be+n(g,oe),ge=0|ge+n(g,de),ge=0|ge+n(h,oe),he=0|he+n(h,de),be=0|be+n(f,ce),ge=0|ge+n(f,le),ge=0|ge+n(y,ce),he=0|he+n(y,le),be=0|be+n(p,fe),ge=0|ge+n(p,ye),ge=0|ge+n(l,fe),he=0|he+n(l,ye);var Ee=0|(0|o+be)+((8191&ge)<<13);o=0|(0|he+(ge>>>13))+(Ee>>>26),Ee&=67108863,be=n(j,q),ge=n(j,z),ge=0|ge+n(L,q),he=n(L,z),be=0|be+n(F,G),ge=0|ge+n(F,K),ge=0|ge+n(O,G),he=0|he+n(O,K),be=0|be+n(C,Y),ge=0|ge+n(C,Z),ge=0|ge+n(R,Y),he=0|he+n(R,Z),be=0|be+n(T,$),ge=0|ge+n(T,Q),ge=0|ge+n(M,$),he=0|he+n(M,Q),be=0|be+n(k,te),ge=0|ge+n(k,re),ge=0|ge+n(x,te),he=0|he+n(x,re),be=0|be+n(S,ne),ge=0|ge+n(S,se),ge=0|ge+n(A,ne),he=0|he+n(A,se),be=0|be+n(_,oe),ge=0|ge+n(_,de),ge=0|ge+n(v,oe),he=0|he+n(v,de),be=0|be+n(g,ce),ge=0|ge+n(g,le),ge=0|ge+n(h,ce),he=0|he+n(h,le),be=0|be+n(f,fe),ge=0|ge+n(f,ye),ge=0|ge+n(y,fe),he=0|he+n(y,ye);var Te=0|(0|o+be)+((8191&ge)<<13);o=0|(0|he+(ge>>>13))+(Te>>>26),Te&=67108863,be=n(j,G),ge=n(j,K),ge=0|ge+n(L,G),he=n(L,K),be=0|be+n(F,Y),ge=0|ge+n(F,Z),ge=0|ge+n(O,Y),he=0|he+n(O,Z),be=0|be+n(C,$),ge=0|ge+n(C,Q),ge=0|ge+n(R,$),he=0|he+n(R,Q),be=0|be+n(T,te),ge=0|ge+n(T,re),ge=0|ge+n(M,te),he=0|he+n(M,re),be=0|be+n(k,ne),ge=0|ge+n(k,se),ge=0|ge+n(x,ne),he=0|he+n(x,se),be=0|be+n(S,oe),ge=0|ge+n(S,de),ge=0|ge+n(A,oe),he=0|he+n(A,de),be=0|be+n(_,ce),ge=0|ge+n(_,le),ge=0|ge+n(v,ce),he=0|he+n(v,le),be=0|be+n(g,fe),ge=0|ge+n(g,ye),ge=0|ge+n(h,fe),he=0|he+n(h,ye);var Me=0|(0|o+be)+((8191&ge)<<13);o=0|(0|he+(ge>>>13))+(Me>>>26),Me&=67108863,be=n(j,Y),ge=n(j,Z),ge=0|ge+n(L,Y),he=n(L,Z),be=0|be+n(F,$),ge=0|ge+n(F,Q),ge=0|ge+n(O,$),he=0|he+n(O,Q),be=0|be+n(C,te),ge=0|ge+n(C,re),ge=0|ge+n(R,te),he=0|he+n(R,re),be=0|be+n(T,ne),ge=0|ge+n(T,se),ge=0|ge+n(M,ne),he=0|he+n(M,se),be=0|be+n(k,oe),ge=0|ge+n(k,de),ge=0|ge+n(x,oe),he=0|he+n(x,de),be=0|be+n(S,ce),ge=0|ge+n(S,le),ge=0|ge+n(A,ce),he=0|he+n(A,le),be=0|be+n(_,fe),ge=0|ge+n(_,ye),ge=0|ge+n(v,fe),he=0|he+n(v,ye);var Ie=0|(0|o+be)+((8191&ge)<<13);o=0|(0|he+(ge>>>13))+(Ie>>>26),Ie&=67108863,be=n(j,$),ge=n(j,Q),ge=0|ge+n(L,$),he=n(L,Q),be=0|be+n(F,te),ge=0|ge+n(F,re),ge=0|ge+n(O,te),he=0|he+n(O,re),be=0|be+n(C,ne),ge=0|ge+n(C,se),ge=0|ge+n(R,ne),he=0|he+n(R,se),be=0|be+n(T,oe),ge=0|ge+n(T,de),ge=0|ge+n(M,oe),he=0|he+n(M,de),be=0|be+n(k,ce),ge=0|ge+n(k,le),ge=0|ge+n(x,ce),he=0|he+n(x,le),be=0|be+n(S,fe),ge=0|ge+n(S,ye),ge=0|ge+n(A,fe),he=0|he+n(A,ye);var Ce=0|(0|o+be)+((8191&ge)<<13);o=0|(0|he+(ge>>>13))+(Ce>>>26),Ce&=67108863,be=n(j,te),ge=n(j,re),ge=0|ge+n(L,te),he=n(L,re),be=0|be+n(F,ne),ge=0|ge+n(F,se),ge=0|ge+n(O,ne),he=0|he+n(O,se),be=0|be+n(C,oe),ge=0|ge+n(C,de),ge=0|ge+n(R,oe),he=0|he+n(R,de),be=0|be+n(T,ce),ge=0|ge+n(T,le),ge=0|ge+n(M,ce),he=0|he+n(M,le),be=0|be+n(k,fe),ge=0|ge+n(k,ye),ge=0|ge+n(x,fe),he=0|he+n(x,ye);var Re=0|(0|o+be)+((8191&ge)<<13);o=0|(0|he+(ge>>>13))+(Re>>>26),Re&=67108863,be=n(j,ne),ge=n(j,se),ge=0|ge+n(L,ne),he=n(L,se),be=0|be+n(F,oe),ge=0|ge+n(F,de),ge=0|ge+n(O,oe),he=0|he+n(O,de),be=0|be+n(C,ce),ge=0|ge+n(C,le),ge=0|ge+n(R,ce),he=0|he+n(R,le),be=0|be+n(T,fe),ge=0|ge+n(T,ye),ge=0|ge+n(M,fe),he=0|he+n(M,ye);var Pe=0|(0|o+be)+((8191&ge)<<13);o=0|(0|he+(ge>>>13))+(Pe>>>26),Pe&=67108863,be=n(j,oe),ge=n(j,de),ge=0|ge+n(L,oe),he=n(L,de),be=0|be+n(F,ce),ge=0|ge+n(F,le),ge=0|ge+n(O,ce),he=0|he+n(O,le),be=0|be+n(C,fe),ge=0|ge+n(C,ye),ge=0|ge+n(R,fe),he=0|he+n(R,ye);var Fe=0|(0|o+be)+((8191&ge)<<13);o=0|(0|he+(ge>>>13))+(Fe>>>26),Fe&=67108863,be=n(j,ce),ge=n(j,le),ge=0|ge+n(L,ce),he=n(L,le),be=0|be+n(F,fe),ge=0|ge+n(F,ye),ge=0|ge+n(O,fe),he=0|he+n(O,ye);var Oe=0|(0|o+be)+((8191&ge)<<13);o=0|(0|he+(ge>>>13))+(Oe>>>26),Oe&=67108863,be=n(j,fe),ge=n(j,ye),ge=0|ge+n(L,fe),he=n(L,ye);var Ne=0|(0|o+be)+((8191&ge)<<13);return o=0|(0|he+(ge>>>13))+(Ne>>>26),Ne&=67108863,i[0]=me,i[1]=_e,i[2]=ve,i[3]=we,i[4]=Se,i[5]=Ae,i[6]=Be,i[7]=ke,i[8]=xe,i[9]=Ee,i[10]=Te,i[11]=Me,i[12]=Ie,i[13]=Ce,i[14]=Re,i[15]=Pe,i[16]=Fe,i[17]=Oe,i[18]=Ne,0!==o&&(i[19]=o,r.length++),r};n||(C=g),f.prototype.mulTo=function(e,t){var r=this.length+e.length,a;return a=10===this.length&&10===e.length?C(this,e,t):63>r?g(this,e,t):1024>r?h(this,e,t):m(this,e,t),a},_.prototype.makeRBT=function(e){for(var r=Array(e),t=f.prototype._countBits(e)-1,a=0;a>=1;return a},_.prototype.permute=function(e,t,r,a,n,s){for(var o=0;o>>=1)n++;return 1<=a))for(var n=0,s;nn?0:0|n/67108864;return e},_.prototype.convert13b=function(e,t,r,a){for(var n=0,s=0;s>>=13,r[2*s+1]=8191&n,n>>>=13;for(s=2*t;se);for(var t=0,r=0;r>=26,t+=0|a/67108864,t+=n>>>26,this.words[r]=67108863&n}return 0!==t&&(this.words[r]=t,this.length++),this},f.prototype.muln=function(e){return this.clone().imuln(e)},f.prototype.sqr=function(){return this.mul(this)},f.prototype.isqr=function(){return this.imul(this.clone())},f.prototype.pow=function(e){var t=b(e);if(0===t.length)return new f(1);for(var r=this,a=0;a>>26-t<<26-t,o=(0|this.words[a])-s<>>26-t}n&&(this.words[a]=n,this.length++)}if(0!==r){for(a=this.length-1;0<=a;a--)this.words[a+r]=this.words[a];for(a=0;ar)for(this.length-=r,c=0;c=n);c--){var f=0|this.words[c];this.words[c]=u<<26-p|f>>>p,u=f&(67108863^67108863>>>p<>>t<e),0>e?this.isubn(-e):0===this.negative?this._iaddn(e):1===this.length&&(0|this.words[0])e),0>e)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&0>this.words[0])this.words[0]=-this.words[0],this.negative=1;else for(var t=0;tthis.words[t];t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},f.prototype.addn=function(e){return this.clone().iaddn(e)},f.prototype.subn=function(e){return this.clone().isubn(e)},f.prototype.iabs=function(){return this.negative=0,this},f.prototype.abs=function(){return this.clone().iabs()},f.prototype._ishlnsubmul=function(e,t,r){var a=e.length+r,n;this._expand(a);var s=0,o;for(n=0;n>26)-(0|d/67108864),this.words[n+r]=67108863&o}for(;n>26,this.words[n+r]=67108863&o;if(0===s)return this.strip();for(l(-1===s),s=0,n=0;n>26,this.words[n]=67108863&o;return this.negative=1,this.strip()},f.prototype._wordDiv=function(e,t){var r=this.length-e.length,n=this.clone(),s=e,o=0|s.words[s.length-1],p=this._countBits(o);r=26-p,0!=r&&(s=s.ushln(r),n.iushln(r),o=0|s.words[s.length-1]);var c=n.length-s.length,l;if("mod"!==t){l=new f(null),l.length=c+1,l.words=Array(l.length);for(var u=0;uthis.length||0>this.cmp(e)?{div:new f(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new f(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new f(this.modn(e.words[0]))}:this._wordDiv(e,t):(s=this.neg().divmod(e.neg(),t),"div"!==t&&(n=s.mod.neg(),r&&0!==n.negative&&n.isub(e)),{div:s.div,mod:n})},f.prototype.div=function(e){return this.divmod(e,"div",!1).div},f.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},f.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},f.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0===t.div.negative?t.mod:t.mod.isub(e),a=e.ushrn(1),n=e.andln(1),s=r.cmp(a);return 0>s||1===n&&0===s?t.div:0===t.div.negative?t.div.iaddn(1):t.div.isubn(1)},f.prototype.modn=function(e){l(67108863>=e);for(var t=0,r=this.length-1;0<=r;r--)t=(67108864%e*t+(0|this.words[r]))%e;return t},f.prototype.idivn=function(e){l(67108863>=e);for(var t=0,r=this.length-1,a;0<=r;r--)a=(0|this.words[r])+67108864*t,this.words[r]=0|a/e,t=a%e;return this.strip()},f.prototype.divn=function(e){return this.clone().idivn(e)},f.prototype.egcd=function(e){l(0===e.negative),l(!e.isZero());var t=this,r=e.clone();t=0===t.negative?t.clone():t.umod(e);for(var a=new f(1),n=new f(0),s=new f(0),o=new f(1),d=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++d;for(var p=r.clone(),c=t.clone();!t.isZero();){for(var u=0,y=1;0==(t.words[0]&y)&&26>u;++u,y<<=1);if(0b;++b,h<<=1);if(0d;++d,p<<=1);if(0c;++c,u<<=1);if(0y.cmpn(0)&&y.iadd(e),y},f.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var n=this.clone(),s=e.clone();n.negative=0,s.negative=0;for(var i=0;n.isEven()&&s.isEven();i++)n.iushrn(1),s.iushrn(1);do{for(;n.isEven();)n.iushrn(1);for(;s.isEven();)s.iushrn(1);var o=n.cmp(s);if(0>o){var r=n;n=s,s=r}else if(0===o||0===s.cmpn(1))break;n.isub(s)}while(!0);return s.iushln(i)},f.prototype.invm=function(e){return this.egcd(e).a.umod(e)},f.prototype.isEven=function(){return 0==(1&this.words[0])},f.prototype.isOdd=function(){return 1==(1&this.words[0])},f.prototype.andln=function(e){return this.words[0]&e},f.prototype.bincn=function(e){l("number"==typeof e);var t=e%26,r=(e-t)/26,a=1<>>26,o&=67108863,this.words[s]=o;return 0!==n&&(this.words[s]=n,this.length++),this},f.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},f.prototype.cmpn=function(e){var t=0>e;if(0!==this.negative&&!t)return-1;if(0===this.negative&&t)return 1;this.strip();var r;if(1=e,"Number is too big");var a=0|this.words[0];r=a===e?0:ae.length)return 1;if(this.lengtha&&(t=1);break}}return t},f.prototype.gtn=function(e){return 1===this.cmpn(e)},f.prototype.gt=function(e){return 1===this.cmp(e)},f.prototype.gten=function(e){return 0<=this.cmpn(e)},f.prototype.gte=function(e){return 0<=this.cmp(e)},f.prototype.ltn=function(e){return-1===this.cmpn(e)},f.prototype.lt=function(e){return-1===this.cmp(e)},f.prototype.lten=function(e){return 0>=this.cmpn(e)},f.prototype.lte=function(e){return 0>=this.cmp(e)},f.prototype.eqn=function(e){return 0===this.cmpn(e)},f.prototype.eq=function(e){return 0===this.cmp(e)},f.red=function(e){return new k(e)},f.prototype.toRed=function(e){return l(!this.red,"Already a number in reduction context"),l(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},f.prototype.fromRed=function(){return l(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},f.prototype._forceRed=function(e){return this.red=e,this},f.prototype.forceRed=function(e){return l(!this.red,"Already a number in reduction context"),this._forceRed(e)},f.prototype.redAdd=function(e){return l(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},f.prototype.redIAdd=function(e){return l(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},f.prototype.redSub=function(e){return l(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},f.prototype.redISub=function(e){return l(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},f.prototype.redShl=function(e){return l(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},f.prototype.redMul=function(e){return l(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},f.prototype.redIMul=function(e){return l(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},f.prototype.redSqr=function(){return l(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},f.prototype.redISqr=function(){return l(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},f.prototype.redSqrt=function(){return l(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},f.prototype.redInvm=function(){return l(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},f.prototype.redNeg=function(){return l(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},f.prototype.redPow=function(e){return l(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var R={k256:null,p224:null,p192:null,p25519:null};v.prototype._tmp=function(){var e=new f(null);return e.words=Array(s(this.n/13)),e},v.prototype.ireduce=function(e){var t=e,a;do this.split(t,this.tmp),t=this.imulK(t),t=t.iadd(this.tmp),a=t.bitLength();while(a>this.n);var n=a=e.length)return e.words[0]=0,void(e.length=1);var s=e.words[9];for(t.words[t.length++]=s&r,n=10;n>>22,s=o}s>>>=22,e.words[n-10]=s,e.length-=0===s&&10>>=26,e.words[r]=n,t=a}return 0!==t&&(e.words[e.length++]=t),e},f._prime=function e(t){if(R[t])return R[t];var e;if("k256"===t)e=new w;else if("p224"===t)e=new S;else if("p192"===t)e=new A;else if("p25519"===t)e=new B;else throw new Error("Unknown prime "+t);return R[t]=e,e},k.prototype._verify1=function(e){l(0===e.negative,"red works only with positives"),l(e.red,"red works only with red numbers")},k.prototype._verify2=function(e,t){l(0==(e.negative|t.negative),"red works only with positives"),l(e.red&&e.red===t.red,"red works only with red numbers")},k.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},k.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},k.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return 0<=r.cmp(this.m)&&r.isub(this.m),r._forceRed(this)},k.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return 0<=r.cmp(this.m)&&r.isub(this.m),r},k.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return 0>r.cmpn(0)&&r.iadd(this.m),r._forceRed(this)},k.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return 0>r.cmpn(0)&&r.iadd(this.m),r},k.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},k.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},k.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},k.prototype.isqr=function(e){return this.imul(e,e.clone())},k.prototype.sqr=function(e){return this.mul(e,e)},k.prototype.sqrt=function(e){if(e.isZero())return e.clone();var a=this.m.andln(3);if(l(1==a%2),3===a){var n=this.m.add(new f(1)).iushrn(2);return this.pow(e,n)}for(var o=this.m.subn(1),d=0;!o.isZero()&&0===o.andln(1);)d++,o.iushrn(1);l(!o.isZero());var p=new f(1).toRed(this),u=p.redNeg(),y=this.m.subn(1).iushrn(1),g=this.m.bitLength();for(g=new f(2*g*g).toRed(this);0!==this.pow(g,y).cmp(u);)g.redIAdd(u);for(var h=this.pow(g,o),_=this.pow(e,o.addn(1).iushrn(1)),v=this.pow(e,o),w=d;0!==v.cmp(p);){for(var S=v,A=0;0!==S.cmp(p);A++)S=S.redSqr();l(A>c,n!==r[0]&&(n=this.sqr(n)),0===l&&0===s){o=0;continue}s<<=1,s|=l,o++,4!==o&&(0!=a||0!=c)||(n=this.mul(n,r[s]),o=0,s=0)}d=26}return n},k.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},k.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},f.mont=function(e){return new x(e)},c(x,k),x.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},x.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},x.prototype.imul=function(e,r){if(e.isZero()||r.isZero())return e.words[0]=0,e.length=1,e;var a=e.imul(r),t=a.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=a.isub(t).iushrn(this.shift),s=n;return 0<=n.cmp(this.m)?s=n.isub(this.m):0>n.cmpn(0)&&(s=n.iadd(this.m)),s._forceRed(this)},x.prototype.mul=function(e,r){if(e.isZero()||r.isZero())return new f(0)._forceRed(this);var a=e.mul(r),t=a.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=a.isub(t).iushrn(this.shift),s=n;return 0<=n.cmp(this.m)?s=n.isub(this.m):0>n.cmpn(0)&&(s=n.iadd(this.m)),s._forceRed(this)},x.prototype.invm=function(e){var t=this.imod(e._invmp(this.m).mul(this.r2));return t._forceRed(this)}})("undefined"==typeof t||t,this)},{}],116:[function(e,t){"use strict";function r(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function a(){}var n="function"!=typeof Object.create&&"~";a.prototype._events=void 0,a.prototype.listeners=function(e,t){var r=n?n+e:e,a=this._events&&this._events[r];if(t)return!!a;if(!a)return[];if(a.fn)return[a.fn];for(var s=0,o=a.length,d=Array(o);ss)){o.warned=!0;var d=new Error("Possible EventEmitter memory leak detected. "+o.length+" \""+(t+"\" listeners added. Use emitter.setMaxListeners() to increase limit."));d.name="MaxListenersExceededWarning",d.emitter=e,d.type=t,d.count=o.length,"object"==typeof console&&console.warn&&console.warn("%s: %s",d.name,d.message)}return e}function l(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:for(var e=Array(arguments.length),t=0;te||e!==e)throw new TypeError("\"defaultMaxListeners\" must be a positive number");w=e}}):r.defaultMaxListeners=w,r.prototype.setMaxListeners=function(e){if("number"!=typeof e||0>e||isNaN(e))throw new TypeError("\"n\" argument must be a positive number");return this._maxListeners=e,this},r.prototype.getMaxListeners=function(){return a(this)},r.prototype.emit=function(e){var t="error"===e,r,a,o,l,u,f;if(f=this._events,f)t=t&&null==f.error;else if(!t)return!1;if(t){if(1n)return this;0===n?r.shift():b(r,n),1===r.length&&(a[e]=r[0]),a.removeListener&&this.emit("removeListener",e,o||t)}return this},r.prototype.removeAllListeners=function(e){var t,r,a;if(r=this._events,!r)return this;if(!r.removeListener)return 0===arguments.length?(this._events=_(null),this._eventsCount=0):r[e]&&(0==--this._eventsCount?this._events=_(null):delete r[e]),this;if(0===arguments.length){var n=m(r),s;for(a=0;a=this._blockSize;){for(var o=this._blockOffset;or;++r)this._length[r]=0;return t},a.prototype._digest=function(){throw new Error("_digest is not implemented")},t.exports=a},{inherits:137,"safe-buffer":194,stream:205}],122:[function(e,t,r){var a=r;a.utils=e("./hash/utils"),a.common=e("./hash/common"),a.sha=e("./hash/sha"),a.ripemd=e("./hash/ripemd"),a.hmac=e("./hash/hmac"),a.sha1=a.sha.sha1,a.sha256=a.sha.sha256,a.sha224=a.sha.sha224,a.sha384=a.sha.sha384,a.sha512=a.sha.sha512,a.ripemd160=a.ripemd.ripemd160},{"./hash/common":123,"./hash/hmac":124,"./hash/ripemd":125,"./hash/sha":126,"./hash/utils":133}],123:[function(e,t,r){"use strict";function a(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}var n=e("./utils"),s=e("minimalistic-assert");r.BlockHash=a,a.prototype.update=function(e,t){if(e=n.toArray(e,t),this.pending=this.pending?this.pending.concat(e):e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){e=this.pending;var a=e.length%this._delta8;this.pending=e.slice(e.length-a,e.length),0===this.pending.length&&(this.pending=null),e=n.join32(e,0,e.length-a,this.endian);for(var r=0;r>>24,n[s++]=255&e>>>16,n[s++]=255&e>>>8,n[s++]=255&e}else for(n[s++]=255&e,n[s++]=255&e>>>8,n[s++]=255&e>>>16,n[s++]=255&e>>>24,n[s++]=0,n[s++]=0,n[s++]=0,n[s++]=0,o=8;othis.blockSize&&(e=new this.Hash().update(e).digest()),n(e.length<=this.blockSize);for(var t=e.length;t=e?t^r^a:31>=e?t&r|~t&a:47>=e?(t|~r)^a:63>=e?t&a|r&~a:t^(r|~a)}function o(e){return 15>=e?0:31>=e?1518500249:47>=e?1859775393:63>=e?2400959708:2840853838}function d(e){return 15>=e?1352829926:31>=e?1548603684:47>=e?1836072691:63>=e?2053994217:0}var p=e("./utils"),c=e("./common"),l=p.rotl32,u=p.sum32,f=p.sum32_3,y=p.sum32_4,b=c.BlockHash;p.inherits(n,b),a.ripemd160=n,n.blockSize=512,n.outSize=160,n.hmacStrength=192,n.padLength=64,n.prototype._update=function(e,t){for(var a=this.h[0],n=this.h[1],p=this.h[2],c=this.h[3],b=this.h[4],m=a,_=n,v=p,w=c,S=b,k=0,x;80>k;k++)x=u(l(y(a,i(k,n,p,c),e[g[k]+t],o(k)),h[k]),b),a=b,b=c,c=l(p,10),p=n,n=x,x=u(l(y(m,i(79-k,_,v,w),e[r[k]+t],d(k)),s[k]),S),m=S,S=w,w=l(v,10),v=_,_=x;x=f(this.h[1],p,w),this.h[1]=f(this.h[2],c,S),this.h[2]=f(this.h[3],b,m),this.h[3]=f(this.h[4],a,_),this.h[4]=f(this.h[0],n,v),this.h[0]=x},n.prototype._digest=function(e){return"hex"===e?p.toHex32(this.h,"little"):p.split32(this.h,"little")};var g=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],r=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],h=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],s=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},{"./common":123,"./utils":133}],126:[function(e,t,r){"use strict";r.sha1=e("./sha/1"),r.sha224=e("./sha/224"),r.sha256=e("./sha/256"),r.sha384=e("./sha/384"),r.sha512=e("./sha/512")},{"./sha/1":127,"./sha/224":128,"./sha/256":129,"./sha/384":130,"./sha/512":131}],127:[function(e,t){"use strict";function r(){return this instanceof r?void(i.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=Array(80)):new r}var a=e("../utils"),n=e("../common"),s=e("./common"),o=a.rotl32,p=a.sum32,l=a.sum32_5,u=s.ft_1,i=n.BlockHash,f=[1518500249,1859775393,2400959708,3395469782];a.inherits(r,i),t.exports=r,r.blockSize=512,r.outSize=160,r.hmacStrength=80,r.padLength=64,r.prototype._update=function(r,n){for(var y=this.W,g=0;16>g;g++)y[g]=r[n+g];for(;gs;s++)n[s]=t[r+s];for(;si&&(i+=4294967296),i}function n(e,t,a,n,s,i){var o=t&n^~t&i;return 0>o&&(o+=4294967296),o}function s(e,t,a,n,s){var i=e&a^e&s^a&s;return 0>i&&(i+=4294967296),i}function o(e,t,a,n,s,i){var o=t&n^t&i^n&i;return 0>o&&(o+=4294967296),o}function d(e,t){var a=m(e,t,28),n=m(t,e,2),s=m(t,e,7),i=a^n^s;return 0>i&&(i+=4294967296),i}function p(e,t){var a=_(e,t,28),n=_(t,e,2),s=_(t,e,7),i=a^n^s;return 0>i&&(i+=4294967296),i}function c(e,t){var a=m(e,t,14),n=m(e,t,18),s=m(t,e,9),i=a^n^s;return 0>i&&(i+=4294967296),i}function l(e,t){var a=_(e,t,14),n=_(e,t,18),s=_(t,e,9),i=a^n^s;return 0>i&&(i+=4294967296),i}function u(e,t){var a=m(e,t,1),n=m(e,t,8),s=v(e,t,7),i=a^n^s;return 0>i&&(i+=4294967296),i}function f(e,t){var a=_(e,t,1),n=_(e,t,8),s=w(e,t,7),i=a^n^s;return 0>i&&(i+=4294967296),i}function y(e,t){var a=m(e,t,19),n=m(t,e,29),s=v(e,t,6),i=a^n^s;return 0>i&&(i+=4294967296),i}function b(e,t){var a=_(e,t,19),n=_(t,e,29),s=w(e,t,6),i=a^n^s;return 0>i&&(i+=4294967296),i}var i=e("../utils"),g=e("../common"),h=e("minimalistic-assert"),m=i.rotr64_hi,_=i.rotr64_lo,v=i.shr64_hi,w=i.shr64_lo,S=i.sum64,A=i.sum64_hi,B=i.sum64_lo,k=i.sum64_4_hi,x=i.sum64_4_lo,E=i.sum64_5_hi,T=i.sum64_5_lo,M=g.BlockHash,I=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];i.inherits(r,M),t.exports=r,r.blockSize=1024,r.outSize=512,r.hmacStrength=192,r.padLength=128,r.prototype._prepareBlock=function(e,t){for(var r=this.W,a=0;32>a;a++)r[a]=e[t+a];for(;a>>3},r.g1_256=function(e){return o(e,17)^o(e,19)^e>>>10}},{"../utils":133}],133:[function(e,t,r){"use strict";function a(e){return(e>>>24|65280&e>>>8|16711680&e<<8|(255&e)<<24)>>>0}function n(e){return 1===e.length?"0"+e:e}function s(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}var o=e("minimalistic-assert"),i=e("inherits");r.inherits=i,r.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if(!("string"==typeof e))for(a=0;a>8,o=255&n;s?r.push(s,o):r.push(o)}else if("hex"===t)for(e=e.replace(/[^a-z0-9]+/ig,""),0!=e.length%2&&(e="0"+e),a=0;a>>0}return s},r.split32=function(e,t){for(var r=Array(4*e.length),a=0,n=0,s;a>>24,r[n+1]=255&s>>>16,r[n+2]=255&s>>>8,r[n+3]=255&s):(r[n+3]=s>>>24,r[n+2]=255&s>>>16,r[n+1]=255&s>>>8,r[n]=255&s);return r},r.rotr32=function(e,t){return e>>>t|e<<32-t},r.rotl32=function(e,t){return e<>>32-t},r.sum32=function(e,t){return e+t>>>0},r.sum32_3=function(e,t,r){return e+t+r>>>0},r.sum32_4=function(e,t,r,a){return e+t+r+a>>>0},r.sum32_5=function(t,r,a,n,s){return t+r+a+n+s>>>0},r.sum64=function(e,t,r,a){var n=e[t],s=e[t+1],i=a+s>>>0,o=(i>>0,e[t+1]=i},r.sum64_hi=function(e,t,r,a){var n=(t+a>>>0>>0},r.sum64_lo=function(e,t,r,a){return t+a>>>0},r.sum64_4_hi=function(e,t,r,a,n,s,i,o){var d=0,p=t;p=p+a>>>0,d+=p>>0,d+=p>>0,d+=p>>0},r.sum64_4_lo=function(e,t,r,a,n,s,i,o){return t+a+s+o>>>0},r.sum64_5_hi=function(e,t,r,a,n,s,i,o,d,p){var c=0,l=t;l=l+a>>>0,c+=l>>0,c+=l>>0,c+=l>>0,c+=l>>0},r.sum64_5_lo=function(e,t,r,a,n,s,i,o,d,p){return t+a+s+o+p>>>0},r.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0},r.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},r.shr64_hi=function(e,t,r){return e>>>r},r.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0}},{inherits:137,"minimalistic-assert":145}],134:[function(e,t){"use strict";function r(e){if(!(this instanceof r))return new r(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=n.toArray(e.entropy,e.entropyEnc||"hex"),a=n.toArray(e.nonce,e.nonceEnc||"hex"),i=n.toArray(e.pers,e.persEnc||"hex");s(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,a,i)}var a=e("hash.js"),n=e("minimalistic-crypto-utils"),s=e("minimalistic-assert");t.exports=r,r.prototype._init=function(e,t,r){var a=e.concat(t).concat(r);this.K=Array(this.outLen/8),this.V=Array(this.outLen/8);for(var n=0;n=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},r.prototype.generate=function(e,t,r,a){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(a=r,r=t,t=null),r&&(r=n.toArray(r,a||"hex"),this._update(r));for(var s=[];s.length>1,f=-7,y=n?p-1:0,b=n?-1:1,d=t[r+y],g,h;for(y+=b,g=d&(1<<-f)-1,d>>=-f,f+=c;0>=-f,f+=o;0>1,b=23===p?5.960464477539063e-8-6.617444900424222e-24:0,g=o?0:l-1,h=o?1:-1,d=0>r||0===r&&0>1/r?1:0,s,_,v;for(r=Math.abs(r),isNaN(r)||r===1/0?(_=isNaN(r)?1:0,s=f):(s=Math.floor(Math.log(r)/Math.LN2),1>r*(v=a(2,-s))&&(s--,v*=2),r+=1<=s+y?b/v:b*a(2,1-y),2<=r*v&&(s++,v/=2),s+y>=f?(_=0,s=f):1<=s+y?(_=(r*v-1)*a(2,p),s+=y):(_=r*a(2,y-1)*a(2,p),s=0));8<=p;t[n+g]=255&_,g+=h,_/=256,p-=8);for(s=s<>>32-t}function s(e,t,r,a,i,o,d){return 0|n(0|e+(t&r|~t&a)+i+o,d)+t}function o(e,t,r,a,i,o,d){return 0|n(0|e+(t&a|r&~a)+i+o,d)+t}function p(e,t,r,a,i,o,d){return 0|n(0|e+(t^r^a)+i+o,d)+t}function l(e,t,r,a,i,o,d){return 0|n(0|e+(r^(t|~a))+i+o,d)+t}var i=e("inherits"),d=e("hash-base"),c=Array(16);i(a,d),a.prototype._update=function(){for(var e=c,t=0;16>t;++t)e[t]=this._block.readInt32LE(4*t);var r=this._a,n=this._b,u=this._c,f=this._d;r=s(r,n,u,f,e[0],3614090360,7),f=s(f,r,n,u,e[1],3905402710,12),u=s(u,f,r,n,e[2],606105819,17),n=s(n,u,f,r,e[3],3250441966,22),r=s(r,n,u,f,e[4],4118548399,7),f=s(f,r,n,u,e[5],1200080426,12),u=s(u,f,r,n,e[6],2821735955,17),n=s(n,u,f,r,e[7],4249261313,22),r=s(r,n,u,f,e[8],1770035416,7),f=s(f,r,n,u,e[9],2336552879,12),u=s(u,f,r,n,e[10],4294925233,17),n=s(n,u,f,r,e[11],2304563134,22),r=s(r,n,u,f,e[12],1804603682,7),f=s(f,r,n,u,e[13],4254626195,12),u=s(u,f,r,n,e[14],2792965006,17),n=s(n,u,f,r,e[15],1236535329,22),r=o(r,n,u,f,e[1],4129170786,5),f=o(f,r,n,u,e[6],3225465664,9),u=o(u,f,r,n,e[11],643717713,14),n=o(n,u,f,r,e[0],3921069994,20),r=o(r,n,u,f,e[5],3593408605,5),f=o(f,r,n,u,e[10],38016083,9),u=o(u,f,r,n,e[15],3634488961,14),n=o(n,u,f,r,e[4],3889429448,20),r=o(r,n,u,f,e[9],568446438,5),f=o(f,r,n,u,e[14],3275163606,9),u=o(u,f,r,n,e[3],4107603335,14),n=o(n,u,f,r,e[8],1163531501,20),r=o(r,n,u,f,e[13],2850285829,5),f=o(f,r,n,u,e[2],4243563512,9),u=o(u,f,r,n,e[7],1735328473,14),n=o(n,u,f,r,e[12],2368359562,20),r=p(r,n,u,f,e[5],4294588738,4),f=p(f,r,n,u,e[8],2272392833,11),u=p(u,f,r,n,e[11],1839030562,16),n=p(n,u,f,r,e[14],4259657740,23),r=p(r,n,u,f,e[1],2763975236,4),f=p(f,r,n,u,e[4],1272893353,11),u=p(u,f,r,n,e[7],4139469664,16),n=p(n,u,f,r,e[10],3200236656,23),r=p(r,n,u,f,e[13],681279174,4),f=p(f,r,n,u,e[0],3936430074,11),u=p(u,f,r,n,e[3],3572445317,16),n=p(n,u,f,r,e[6],76029189,23),r=p(r,n,u,f,e[9],3654602809,4),f=p(f,r,n,u,e[12],3873151461,11),u=p(u,f,r,n,e[15],530742520,16),n=p(n,u,f,r,e[2],3299628645,23),r=l(r,n,u,f,e[0],4096336452,6),f=l(f,r,n,u,e[7],1126891415,10),u=l(u,f,r,n,e[14],2878612391,15),n=l(n,u,f,r,e[5],4237533241,21),r=l(r,n,u,f,e[12],1700485571,6),f=l(f,r,n,u,e[3],2399980690,10),u=l(u,f,r,n,e[10],4293915773,15),n=l(n,u,f,r,e[1],2240044497,21),r=l(r,n,u,f,e[8],1873313359,6),f=l(f,r,n,u,e[15],4264355552,10),u=l(u,f,r,n,e[6],2734768916,15),n=l(n,u,f,r,e[13],1309151649,21),r=l(r,n,u,f,e[4],4149444226,6),f=l(f,r,n,u,e[11],3174756917,10),u=l(u,f,r,n,e[2],718787259,15),n=l(n,u,f,r,e[9],3951481745,21),this._a=0|this._a+r,this._b=0|this._b+n,this._c=0|this._c+u,this._d=0|this._d+f},a.prototype._digest=function(){this._block[this._blockOffset++]=128,56>8,o=255&n;s?r.push(s,o):r.push(o)}return r},s.zero2=a,s.toHex=n,s.encode=function(e,t){return"hex"===t?n(e):e}},{}],147:[function(e,t,r){arguments[4][115][0].apply(r,arguments)},{dup:115}],148:[function(e,t){var r=e("bn.js"),a=e("strip-hex-prefix");t.exports=function(e){if("string"==typeof e||"number"==typeof e){var t=new r(1),n=(e+"").toLowerCase().trim(),s="0x"===n.substr(0,2)||"-0x"===n.substr(0,3),i=a(n);if("-"===i.substr(0,1)&&(i=a(i.slice(1)),t=new r(-1,10)),i=""===i?"0":i,!i.match(/^-?[0-9]+$/)&&i.match(/^[0-9A-Fa-f]+$/)||i.match(/^[a-fA-F]+$/)||!0===s&&i.match(/^[0-9A-Fa-f]+$/))return new r(i,16).mul(t);if((i.match(/^-?[0-9]+$/)||""===i)&&!1===s)return new r(i,10).mul(t)}else if("object"==typeof e&&e.toString&&!e.pop&&!e.push&&e.toString(10).match(/^-?[0-9]+$/)&&(e.mul||e.dividedToIntegerBy))return new r(e.toString(10),10);throw new Error("[number-to-bn] while converting number "+JSON.stringify(e)+" to BN.js instance, error: invalid number value. Value must be an integer, hex string, BN or BigNumber instance. Note, decimals are not supported.")}},{"bn.js":147,"strip-hex-prefix":212}],149:[function(e,t){"use strict";function r(e){if(null===e||e===void 0)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var a=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable;t.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;10>r;r++)t["_"+String.fromCharCode(r)]=r;var a=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if("0123456789"!==a.join(""))return!1;var n={};return["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t"].forEach(function(e){n[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(e){for(var t=r(e),o=1,d,p;o65536&&(r("Max buffer length exceeded: textNode"),e=a(e,Q.length)),L.length>65536&&(r("Max buffer length exceeded: numberNode"),e=a(e,L.length)),j=65536-e+K}function r(e){Q!==void 0&&(l(Q),u(),Q=void 0),Z=i(e+"\nLn: "+Y+"\nCol: "+X+"\nChr: "+J),f(W(void 0,void 0,Z))}function n(){return H==g?(l({}),u(),void(U=!0)):void((H!==h||0!==G)&&r("Unexpected end"),Q!==void 0&&(l(Q),u(),Q=void 0),U=!0)}function s(e){return"\r"==e||"\n"==e||" "==e||"\t"==e}function o(e){if(!Z){if(U)return r("Cannot write after close");var a=0;for(J=e[0];J&&($=J,J=e[a++],!!J);)switch(K++,"\n"==J?(Y++,X=0):X++,H){case g:if("{"===J)H=m;else if("["===J)H=v;else if(!s(J))return r("Non-whitespace before {[.");continue;case A:case m:if(s(J))continue;if(H===A)q.push(B);else if("}"===J){l({}),u(),H=q.pop()||h;continue}else q.push(_);if("\""===J)H=S;else return r("Malformed object key should start with \" ");continue;case B:case _:if(s(J))continue;if(":"===J)H===_?(q.push(_),void 0!==Q&&(l({}),d(Q),Q=void 0),G++):void 0!==Q&&(d(Q),Q=void 0),H=h;else if("}"===J)void 0!==Q&&(l(Q),u(),Q=void 0),u(),G--,H=q.pop()||h;else if(","===J)H===_&&q.push(_),void 0!==Q&&(l(Q),u(),Q=void 0),H=A;else return r("Bad object");continue;case v:case h:if(s(J))continue;if(H===v)if(l([]),G++,H=h,"]"===J){u(),G--,H=q.pop()||h;continue}else q.push(w);if("\""===J)H=S;else if("{"===J)H=m;else if("["===J)H=v;else if("t"===J)H=k;else if("f"===J)H=T;else if("n"===J)H=R;else if("-"===J)L+=J;else if("0"===J)L+=J,H=N;else if(-1!=="123456789".indexOf(J))L+=J,H=N;else return r("Bad value");continue;case w:if(","===J)q.push(w),void 0!==Q&&(l(Q),u(),Q=void 0),H=h;else if("]"===J)void 0!==Q&&(l(Q),u(),Q=void 0),u(),G--,H=q.pop()||h;else if(s(J))continue;else return r("Bad array");continue;case S:void 0===Q&&(Q="");var n=a-1;STRING_BIGLOOP:for(;;){for(;0=j&&t()}}var d=e(_e).emit,l=e(ve).emit,u=e(we).emit,f=e(ue).emit,y=/[\\"\n]/g,b=0,g=b++,h=b++,m=b++,_=b++,v=b++,w=b++,S=b++,A=b++,B=b++,k=b++,x=b++,E=b++,T=b++,M=b++,I=b++,C=b++,R=b++,P=b++,F=b++,O=b++,N=b,j=65536,L="",D=!1,U=!1,H=g,q=[],z=null,V=0,G=0,K=0,X=0,Y=1,Z,J,$,Q;e(ge).on(o),e(he).on(n)}function C(e,t){"use strict";function r(e){return function(t){n=e(n,t)}}var a={},n;for(var s in t)e(s).on(r(t[s]),a);e(ce).on(function(e){var t=Q(n),r=ae(t),a=ee(n),s;a&&(s=ne(Q(a)),s[r]=e)}),e(le).on(function(){var e=Q(n),t=ae(e),r=ee(n),a;r&&(a=ne(Q(r)),delete a[t])}),e(me).on(function(){for(var r in t)e(r).un(a)})}function R(e){var t={};return e&&e.split("\r\n").forEach(function(e){var r=e.indexOf(": ");t[e.substring(0,r)]=e.substring(r+2)}),t}function P(e,t){function r(e){return{"http:":80,"https:":443}[e]}function a(t){return t.port||r(t.protocol||e.protocol)}return!!(t.protocol&&t.protocol!=e.protocol||t.host&&t.host!=e.host||t.host&&a(t)!=a(e))}function F(e){var t=/(\w+:)?(?:\/\/)([\w.-]+)?(?::(\d+))?\/?/,r=t.exec(e)||[];return{protocol:r[1]||"",host:r[2]||"",port:r[3]||""}}function O(){return new XMLHttpRequest}function N(e,t,r,a,s,i,o){"use strict";function d(){var e=t.responseText,r=e.substr(l);r&&p(r),l=Z(e)}var p=e(ge).emit,c=e(ue).emit,l=0,u=!0;e(me).on(function(){t.onreadystatechange=null,t.abort()}),"onprogress"in t&&(t.onprogress=d),t.onreadystatechange=function(){function r(){try{u&&e(be).emit(t.status,R(t.getAllResponseHeaders())),u=!1}catch(t){}}switch(t.readyState){case 2:case 3:return r();case 4:r();var a=2==(t.status+"")[0];a?(d(),e(he).emit()):c(W(t.status,t.responseText));}};try{for(var f in t.open(r,a,!0),i)t.setRequestHeader(f,i[f]);P(n.location,F(a))||t.setRequestHeader("X-Requested-With","XMLHttpRequest"),t.withCredentials=o,t.send(s)}catch(t){n.setTimeout(K(c,W(void 0,void 0,t)),0)}}function j(e,t){return{key:e,node:t}}function L(e){function t(e,t){var r=ne(Q(e));return h(s,r)?a(e,Z(r),t):e}function r(e,t,r){ne(Q(e))[t]=r}function a(e,t,a){e&&r(e,t,a);var s=v(j(t,a),e);return n(s),s}var n=e(de).emit,i=e(pe).emit,o=e(ye).emit,d=e(fe).emit,p={};return p[ve]=function(e,n){if(!e)return o(n),a(e,se,n);var s=t(e,n),i=ee(s),d=ae(Q(s));return r(i,d,n),v(j(d,n),i)},p[we]=function(e){return i(e),ee(e)||d(ne(Q(e)))},p[_e]=a,p}function D(e,t,r){function a(e){return function(t){return t.id==e}}var n,s;return{on:function(r,a){var i={listener:r,id:a||r};return t&&t.emit(e,r,i.id),n=v(i,n),s=v(r,s),this},emit:function(){E(s,arguments)},un:function(t){var i;n=k(n,a(t),function(e){i=e}),i&&(s=k(s,function(e){return e==i.listener}),r&&r.emit(e,i.listener,i.id))},listeners:function(){return s},hasListener:function(e){var t=e?a(e):b;return m(M(t,n))}}}function U(){function e(e){return r[e]=D(e,a,n)}function t(t){return r[t]||e(t)}var r={},a=e("newListener"),n=e("removeListener");return["emit","on","un"].forEach(function(e){t[e]=l(function(r,a){c(a,t(r)[e])})}),t}function W(e,t,r){try{var a=o.parse(t)}catch(t){}return{statusCode:e,body:t,jsonBody:a,thrown:r}}function H(e,t){function r(e,t,r){var a=T(r);e(t,S(ee(A(ae,a))),S(A(ne,a)))}function a(t,a,n){var s=e(t).emit;a.on(function(e){var t=n(e);!1!==t&&r(s,ne(t),e)},t),e("removeListener").on(function(r){r!=t||e(r).listeners()||a.un(t)})}var n={node:e(pe),path:e(de)};e("newListener").on(function(e){var r=/(node|path):(.*)/.exec(e);if(r){var s=n[r[1]];s.hasListener(e)||a(e,s,t(r[2]))}})}function q(e,t){function r(t,r){return e(t).on(n(r),r),w}function a(e,t,r){r=r||t;var a=n(t);return e.on(function(){var t=!1;w.forget=function(){t=!0},c(arguments,a),delete w.forget,t&&e.un(r)},r),w}function n(e){return function(){try{return e.apply(w,arguments)}catch(t){setTimeout(function(){throw t})}}}function s(t,r){return e(t+":"+r)}function i(e){return function(){var t=e.apply(this,arguments);m(t)&&(t==G.drop?b():h(t))}}function o(e,t,r){var n;n="node"==e?i(r):r,a(s(e,t),n,r)}function d(e,t){for(var r in t)o(e,r,t[r])}function p(e,t,r){return J(t)?o(e,t,r):d(e,t),w}var u=/^(node|path):./,f=e(fe),b=e(le).emit,h=e(ce).emit,_=l(function(t,r){if(w[t])c(r,w[t]);else{var n=e(t),s=r[0];u.test(t)?a(n,s):n.on(s)}return w}),v=function(t,r,a){if("done"==t)f.un(r);else if("node"==t||"path"==t)e.un(t+":"+r,a);else{e(t).un(r)}return w},w;return e(ye).on(function(e){w.root=g(e)}),e("start").on(function(e,t){w.header=function(e){return e?t[e]:t}}),w={on:_,addListener:_,removeListener:v,emit:e.emit,node:K(p,"node"),path:K(p,"path"),done:K(a,f),start:K(r,"start"),fail:e("fail").on,abort:e(me).emit,header:y,root:y,source:t}}function z(e,t,r,a,n){var s=U();return t&&N(s,O(),e,t,r,a,n),I(s),C(s,L(s)),H(s,ie),q(s,t)}function V(e,t,r,a,n,s,i){return n=n?o.parse(o.stringify(n)):{},a?!J(a)&&(a=o.stringify(a),n["Content-Type"]=n["Content-Type"]||"application/json"):a=null,e(r||"GET",function(e,t){return!1===t&&(e+=-1==e.indexOf("?")?"?":"&",e+="_="+new Date().getTime()),e}(t,i),a,n,s||!1)}function G(e){var t=te("resume","pause","pipe"),r=K(_,t);return e?r(e)||J(e)?V(z,e):V(z,e.url,e.method,e.body,e.headers,e.withCredentials,e.cached):z()}var K=l(function(e,t){var r=t.length;return l(function(a){for(var n=0;na)throw new TypeError("Bad iterations");if("number"!=typeof n)throw new TypeError("Key length not a number");if(0>n||1073741823s?t=n(t):t.length=t.length){s++;break}var o=t.slice(2,n-1),d=t.slice(n-1,n);if(("0002"!==a.toString("hex")&&!r||"0001"!==a.toString("hex")&&r)&&s++,8>o.length&&s++,s)throw new Error("decryption error");return t.slice(n)}function s(e,t){e=new r(e),t=new r(t);var n=0,s=e.length;e.length!==t.length&&(n++,s=Math.min(e.length,t.length));for(var o=-1;++ol||0<=new p(t).cmp(d.modulus))throw new Error("decryption error");var f=s?u(new p(t),d):c(t,d);var y=new r(l-f.length);if(y.fill(0),f=r.concat([y,f],l),4===o)return a(d,f);if(1===o)return n(d,f,s);if(3===o)return f;throw new Error("unknown padding")}}).call(this,e("buffer").Buffer)},{"./mgf":165,"./withPublic":168,"./xor":169,"bn.js":41,"browserify-rsa":64,buffer:73,"create-hash":79,"parse-asn1":156}],167:[function(e,t){(function(r){function a(e,t){var a=e.modulus.byteLength(),n=t.length,s=d("sha1").update(new r("")).digest(),i=s.length,u=2*i;if(n>a-u-2)throw new Error("message too long");var f=new r(a-n-u-2);f.fill(0);var y=a-i-1,b=o(i),g=c(r.concat([s,f,new r([1]),t],y),p(b,y)),h=c(b,p(g,i));return new l(r.concat([new r([0]),h,g],a))}function n(e,t,a){var n=t.length,i=e.modulus.byteLength();if(n>i-11)throw new Error("message too long");var o;return a?(o=new r(i-n-3),o.fill(255)):o=s(i-n-3),new l(r.concat([new r([0,a?1:2]),o,new r([0]),t],i))}function s(e){for(var t=new r(e),a=0,n=o(2*e),s=0,d;a=n&&r>>10),e=56320|1023&e),t+=w(e),t}).join("")}function p(e){return 10>e-48?e-22:26>e-65?e-65:26>e-97?e-97:36}function c(e,t){return e+22+75*(26>e)-((0!=t)<<5)}function l(e,t,r){var a=0;for(e=r?S(e/700):e>>1,e+=S(e/t);455y&&(y=0),b=0;b=a&&s("invalid-input"),v=p(e.charCodeAt(g++)),(36<=v||v>S((2147483647-o)/m))&&s("overflow"),o+=v*m,A=_<=u?1:_>=u+26?26:_-u,vS(2147483647/B)&&s("overflow"),m*=B}f=r.length+1,u=l(o-h,f,0==h),S(o/f)>2147483647-c&&s("overflow"),c+=S(o/f),o%=f,r.splice(o++,0,c)}return d(r)}function f(e){var r=[],a,i,d,p,u,f,y,b,g,h,_,v,A,B,x;for(e=o(e),v=e.length,a=128,i=0,u=72,f=0;f_&&r.push(w(_));for(d=p=r.length,p&&r.push("-");d=a&&_S((2147483647-i)/A)&&s("overflow"),i+=(y-a)*A,a=y,f=0;f=u+26?26:g-u,b= 0x80 (not a basic code point)","invalid-input":"Invalid input"},S=Math.floor,w=String.fromCharCode,A,B;if(A={version:"1.4.1",ucs2:{decode:o,encode:d},decode:u,encode:f,toASCII:function(e){return i(e,function(e){return m.test(e)?"xn--"+f(e):e})},toUnicode:function(e){return i(e,function(e){return h.test(e)?u(e.slice(4).toLowerCase()):e})}},"function"==typeof define&&"object"==typeof define.amd&&define.amd)define("punycode",function(){return A});else if(!(y&&b))a.punycode=A;else if(t.exports==y)b.exports=A;else for(B in A)A.hasOwnProperty(B)&&(y[B]=A[B])})(this)}).call(this,"undefined"==typeof global?"undefined"==typeof self?"undefined"==typeof window?{}:window:self:global)},{}],171:[function(e,t,r){"use strict";function a(e){switch(e.arrayFormat){case"index":return function(t,r,a){return null===r?[s(t,e),"[",a,"]"].join(""):[s(t,e),"[",s(a,e),"]=",s(r,e)].join("")};case"bracket":return function(t,r){return null===r?s(t,e):[s(t,e),"[]=",s(r,e)].join("")};default:return function(t,r){return null===r?s(t,e):[s(t,e),"=",s(r,e)].join("")};}}function n(e){var t;switch(e.arrayFormat){case"index":return function(e,r,a){return t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?void(void 0===a[e]&&(a[e]={}),a[e][t[1]]=r):void(a[e]=r)};case"bracket":return function(e,r,a){return(t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),!t)?void(a[e]=r):void 0===a[e]?void(a[e]=[r]):void(a[e]=[].concat(a[e],r))};default:return function(e,t,r){return void 0===r[e]?void(r[e]=t):void(r[e]=[].concat(r[e],t))};}}function s(e,t){return t.encode?t.strict?p(e):encodeURIComponent(e):e}function i(e){if(Array.isArray(e))return e.sort();return"object"==typeof e?i(Object.keys(e)).sort(function(e,t){return+e-+t}).map(function(t){return e[t]}):e}function o(e){var t=e.indexOf("?");return-1===t?"":e.slice(t+1)}function d(e,t){t=c({arrayFormat:"none"},t);var r=n(t),a=Object.create(null);return"string"==typeof e?(e=e.trim().replace(/^[?#&]/,""),!e)?a:(e.split("&").forEach(function(e){var t=e.replace(/\+/g," ").split("="),n=t.shift(),s=0p&&(c=p);for(var l=0;le)throw new TypeError("offset must be a uint32");if(e>l||e>t)throw new RangeError("offset out of range")}function i(e,t,r){if("number"!=typeof e||e!==e)throw new TypeError("size must be a number");if(4294967295e)throw new TypeError("size must be a uint32");if(e+t>r||e>l)throw new RangeError("buffer too small")}function o(e,r,a,n){if(t.browser){var s=e.buffer,i=new Uint8Array(s,r,a);return u.getRandomValues(i),n?void t.nextTick(function(){n(null,e)}):e}if(n)return void p(a,function(t,a){return t?n(t):void(a.copy(e,r),n(null,e))});var o=p(a);return o.copy(e,r),e}var d=e("safe-buffer"),p=e("randombytes"),c=d.Buffer,l=d.kMaxLength,u=a.crypto||a.msCrypto;u&&u.getRandomValues||!t.browser?(r.randomFill=function(e,t,r,n){if(!c.isBuffer(e)&&!(e instanceof a.Uint8Array))throw new TypeError("\"buf\" argument must be a Buffer or Uint8Array");if("function"==typeof t)n=t,t=0,r=e.length;else if("function"==typeof r)n=r,r=e.length-t;else if("function"!=typeof n)throw new TypeError("\"cb\" argument must be a function");return s(t,e.length),i(r,t,e.length),o(e,t,r,n)},r.randomFillSync=function(e,t,r){if("undefined"==typeof t&&(t=0),!c.isBuffer(e)&&!(e instanceof a.Uint8Array))throw new TypeError("\"buf\" argument must be a Buffer or Uint8Array");return s(t,e.length),void 0===r&&(r=e.length-t),i(r,t,e.length),o(e,t,r)}):(r.randomFill=n,r.randomFillSync=n)}).call(this,e("_process"),"undefined"==typeof global?"undefined"==typeof self?"undefined"==typeof window?{}:window:self:global)},{_process:71,randombytes:175,"safe-buffer":194}],177:[function(e,t){t.exports=window.crypto},{}],178:[function(e,t){t.exports=e("crypto")},{crypto:177}],179:[function(e,t){t.exports=function(t,r){var a=e("./crypto.js"),n="function"==typeof r;if(65536>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function y(e,t){return 0>=e||0===t.length&&t.ended?0:t.objectMode?1:e===e?(e>t.highWaterMark&&(t.highWaterMark=f(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0)):t.flowing&&t.length?t.buffer.head.data.length:t.length}function b(e,t){if(!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,g(e)}}function g(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(H("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?R.nextTick(h,e):h(e))}function h(e){H("emit readable"),e.emit("readable"),B(e)}function m(e,t){t.readingMore||(t.readingMore=!0,R.nextTick(_,e,t))}function _(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=x(e,t.buffer,t.decoder),r}function x(e,t,r){var a;return ei.length?i.length:e;if(s+=o===i.length?i:i.slice(0,e),e-=o,0===e){o===i.length?(++a,t.head=r.next?r.next:t.tail=null):(t.head=r,r.data=i.slice(o));break}++a}return t.length-=a,s}function T(e,t){var r=L.allocUnsafe(e),a=t.head,s=1;for(a.data.copy(r),e-=a.data.length;a=a.next;){var i=a.data,o=e>i.length?i.length:e;if(i.copy(r,r.length-e,0,o),e-=o,0===e){o===i.length?(++s,t.head=a.next?a.next:t.tail=null):(t.head=a,a.data=i.slice(o));break}++s}return t.length-=s,r}function M(e){var t=e._readableState;if(0=t.highWaterMark||t.ended))return H("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?M(this):g(this),null;if(e=y(e,t),0===e&&t.ended)return 0===t.length&&M(this),null;var a=t.needReadable;H("need readable",a),(0===t.length||t.length-e>>0),r=this.head,n=0;r;)a(r.data,t,n),n+=r.data.length,r=r.next;return t},e}(),n&&n.inspect&&n.inspect.custom&&(t.exports.prototype[n.inspect.custom]=function(){var e=n.inspect({length:this.length});return this.constructor.name+" "+e})},{"safe-buffer":194,util:43}],187:[function(e,t){"use strict";function r(e,t){e.emit("error",t)}var a=e("process-nextick-args");t.exports={destroy:function(e,t){var n=this,s=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return s||i?(t?t(e):e&&(!this._writableState||!this._writableState.errorEmitted)&&a.nextTick(r,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?(a.nextTick(r,n,e),n._writableState&&(n._writableState.errorEmitted=!0)):t&&t(e)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},{"process-nextick-args":163}],188:[function(e,t){t.exports=e("events").EventEmitter},{events:117}],189:[function(e,t){t.exports=e("./readable").PassThrough},{"./readable":190}],190:[function(e,t,r){r=t.exports=e("./lib/_stream_readable.js"),r.Stream=r,r.Readable=r,r.Writable=e("./lib/_stream_writable.js"),r.Duplex=e("./lib/_stream_duplex.js"),r.Transform=e("./lib/_stream_transform.js"),r.PassThrough=e("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":181,"./lib/_stream_passthrough.js":182,"./lib/_stream_readable.js":183,"./lib/_stream_transform.js":184,"./lib/_stream_writable.js":185}],191:[function(e,t){t.exports=e("./readable").Transform},{"./readable":190}],192:[function(e,t){t.exports=e("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":185}],193:[function(e,t){"use strict";function r(){l.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function n(e,t){return e<>>32-t}function a(t,r,a,i,o,e,d,p){return 0|n(0|t+(r^a^i)+e+d,p)+o}function s(t,r,a,i,o,e,d,p){return 0|n(0|t+(r&a|~r&i)+e+d,p)+o}function o(t,r,a,i,o,e,d,p){return 0|n(0|t+((r|~a)^i)+e+d,p)+o}function d(t,r,a,i,o,e,d,p){return 0|n(0|t+(r&i|a&~i)+e+d,p)+o}function p(t,r,a,i,o,e,d,p){return 0|n(0|t+(r^(a|~i))+e+d,p)+o}var i=e("buffer").Buffer,c=e("inherits"),l=e("hash-base"),u=Array(16),f=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],y=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],b=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],g=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],h=[0,1518500249,1859775393,2400959708,2840853838],m=[1352829926,1548603684,1836072691,2053994217,0];c(r,l),r.prototype._update=function(){for(var e=u,r=0;16>r;++r)e[r]=this._block.readInt32LE(4*r);for(var c=0|this._a,l=0|this._b,_=0|this._c,v=0|this._d,w=0|this._e,S=0|this._a,A=0|this._b,B=0|this._c,k=0|this._d,x=0|this._e,E=0;80>E;E+=1){var T,M;16>E?(T=a(c,l,_,v,w,e[f[E]],h[0],b[E]),M=p(S,A,B,k,x,e[y[E]],m[0],g[E])):32>E?(T=s(c,l,_,v,w,e[f[E]],h[1],b[E]),M=d(S,A,B,k,x,e[y[E]],m[1],g[E])):48>E?(T=o(c,l,_,v,w,e[f[E]],h[2],b[E]),M=o(S,A,B,k,x,e[y[E]],m[2],g[E])):64>E?(T=d(c,l,_,v,w,e[f[E]],h[3],b[E]),M=s(S,A,B,k,x,e[y[E]],m[3],g[E])):(T=p(c,l,_,v,w,e[f[E]],h[4],b[E]),M=a(S,A,B,k,x,e[y[E]],m[4],g[E])),c=w,w=v,v=n(_,10),_=l,l=T,S=x,x=k,k=n(B,10),B=A,A=M}var I=0|this._b+_+k;this._b=0|this._c+v+x,this._c=0|this._d+w+S,this._d=0|this._e+c+A,this._e=0|this._a+l+B,this._a=I},r.prototype._digest=function(){this._block[this._blockOffset++]=128,56>>32-t}function y(e){var t;for(t=0;16>t;t++)m[t]=(255&e[4*t+0])<<0,m[t]|=(255&e[4*t+1])<<8,m[t]|=(255&e[4*t+2])<<16,m[t]|=(255&e[4*t+3])<<24;for(n(m,0,_,0,16),t=8;0t;++t)m[t]=_[t]+m[t];for(t=0;16>t;t++){var r=4*t;e[r+0]=255&m[t]>>0,e[r+1]=255&m[t]>>8,e[r+2]=255&m[t]>>16,e[r+3]=255&m[t]>>24}}function b(e,t,r,a,n){for(var s=0;s 0 and a power of 2");if(o>2147483647/128/d)throw Error("Parameter N is too large");if(d>2147483647/128/r)throw Error("Parameter r is too large");var g=new a(256*d),h=new a(128*d*o),m=new Int32Array(16),_=new Int32Array(16),v=new a(64),w=s(e,t,1,128*r*d,"sha256"),S;if(c){var A=2*(r*o),B=0;S=function(){++B,0==B%1e3&&c({current:B,total:A,percent:100*(B/A)})}}for(var k=0;k=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(4294967295>=r)this._block.writeUInt32BE(r,this._blockSize-4);else{var a=(4294967295&r)>>>0;this._block.writeUInt32BE((r-a)/4294967296,this._blockSize-8),this._block.writeUInt32BE(a,this._blockSize-4)}this._update(this._block);var n=this._hash();return e?n.toString(e):n},r.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t.exports=r},{"safe-buffer":194}],198:[function(e,t,r){var r=t.exports=function(e){e=e.toLowerCase();var t=r[e];if(!t)throw new Error(e+" is not supported (we accept pull requests)");return new t};r.sha=e("./sha"),r.sha1=e("./sha1"),r.sha224=e("./sha224"),r.sha256=e("./sha256"),r.sha384=e("./sha384"),r.sha512=e("./sha512")},{"./sha":199,"./sha1":200,"./sha224":201,"./sha256":202,"./sha384":203,"./sha512":204}],199:[function(e,t){function r(){this.init(),this._w=c,s.call(this,64,56)}function n(e){return e<<5|e>>>27}function i(e){return e<<30|e>>>2}function o(e,t,r,a){return 0===e?t&r|~t&a:2===e?t&r|t&a|r&a:t^r^a}var a=e("inherits"),s=e("./hash"),d=e("safe-buffer").Buffer,p=[1518500249,1859775393,-1894007588,-899497514],c=Array(80);a(r,s),r.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},r.prototype._update=function(r){for(var l=this._w,u=0|this._a,f=0|this._b,y=0|this._c,g=0|this._d,h=0|this._e,m=0;16>m;++m)l[m]=r.readInt32BE(4*m);for(;80>m;++m)l[m]=l[m-3]^l[m-8]^l[m-14]^l[m-16];for(var _=0;80>_;++_){var v=~~(_/20),s=0|n(u)+o(v,f,y,g)+h+l[_]+p[v];h=g,g=y,y=i(f),f=u,u=s}this._a=0|u+this._a,this._b=0|f+this._b,this._c=0|y+this._c,this._d=0|g+this._d,this._e=0|h+this._e},r.prototype._hash=function(){var e=d.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},t.exports=r},{"./hash":197,inherits:137,"safe-buffer":194}],200:[function(e,t){function r(){this.init(),this._w=c,d.call(this,64,56)}function a(e){return e<<1|e>>>31}function n(e){return e<<5|e>>>27}function i(e){return e<<30|e>>>2}function o(e,t,r,a){return 0===e?t&r|~t&a:2===e?t&r|t&a|r&a:t^r^a}var s=e("inherits"),d=e("./hash"),p=e("safe-buffer").Buffer,l=[1518500249,1859775393,-1894007588,-899497514],c=Array(80);s(r,d),r.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},r.prototype._update=function(r){for(var p=this._w,u=0|this._a,f=0|this._b,y=0|this._c,g=0|this._d,h=0|this._e,m=0;16>m;++m)p[m]=r.readInt32BE(4*m);for(;80>m;++m)p[m]=a(p[m-3]^p[m-8]^p[m-14]^p[m-16]);for(var _=0;80>_;++_){var v=~~(_/20),s=0|n(u)+o(v,f,y,g)+h+p[_]+l[v];h=g,g=y,y=i(f),f=u,u=s}this._a=0|u+this._a,this._b=0|f+this._b,this._c=0|y+this._c,this._d=0|g+this._d,this._e=0|h+this._e},r.prototype._hash=function(){var e=p.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},t.exports=r},{"./hash":197,inherits:137,"safe-buffer":194}],201:[function(e,t){function r(){this.init(),this._w=o,s.call(this,64,56)}var a=e("inherits"),n=e("./sha256"),s=e("./hash"),i=e("safe-buffer").Buffer,o=Array(64);a(r,n),r.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},r.prototype._hash=function(){var e=i.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},t.exports=r},{"./hash":197,"./sha256":202,inherits:137,"safe-buffer":194}],202:[function(e,t){function r(){this.init(),this._w=f,c.call(this,64,56)}function n(e,t,r){return r^e&(t^r)}function s(e,t,r){return e&t|r&(e|t)}function i(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function o(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function a(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}function d(e){return(e>>>17|e<<15)^(e>>>19|e<<13)^e>>>10}var p=e("inherits"),c=e("./hash"),l=e("safe-buffer").Buffer,u=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],f=Array(64);p(r,c),r.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},r.prototype._update=function(t){for(var r=this._w,p=0|this._a,l=0|this._b,y=0|this._c,m=0|this._d,_=0|this._e,v=0|this._f,w=0|this._g,S=0|this._h,A=0;16>A;++A)r[A]=t.readInt32BE(4*A);for(;64>A;++A)r[A]=0|d(r[A-2])+r[A-7]+a(r[A-15])+r[A-16];for(var B=0;64>B;++B){var k=0|S+o(_)+n(_,v,w)+u[B]+r[B],x=0|i(p)+s(p,l,y);S=w,w=v,v=_,_=0|m+k,m=y,y=l,l=p,p=0|k+x}this._a=0|p+this._a,this._b=0|l+this._b,this._c=0|y+this._c,this._d=0|m+this._d,this._e=0|_+this._e,this._f=0|v+this._f,this._g=0|w+this._g,this._h=0|S+this._h},r.prototype._hash=function(){var e=l.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},t.exports=r},{"./hash":197,inherits:137,"safe-buffer":194}],203:[function(e,t){function r(){this.init(),this._w=o,s.call(this,128,112)}var a=e("inherits"),n=e("./sha512"),s=e("./hash"),i=e("safe-buffer").Buffer,o=Array(160);a(r,n),r.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},r.prototype._hash=function(){function e(e,r,a){t.writeInt32BE(e,a),t.writeInt32BE(r,a+4)}var t=i.allocUnsafe(48);return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),t},t.exports=r},{"./hash":197,"./sha512":204,inherits:137,"safe-buffer":194}],204:[function(e,t){function r(){this.init(),this._w=g,f.call(this,128,112)}function a(e,t,r){return r^e&(t^r)}function n(e,t,r){return e&t|r&(e|t)}function s(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function i(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function o(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function d(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function p(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function c(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function l(e,t){return e>>>0>>0?1:0}var u=e("inherits"),f=e("./hash"),y=e("safe-buffer").Buffer,b=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],g=Array(160);u(r,f),r.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},r.prototype._update=function(e){for(var t=this._w,r=0|this._ah,u=0|this._bh,f=0|this._ch,y=0|this._dh,g=0|this._eh,h=0|this._fh,m=0|this._gh,_=0|this._hh,v=0|this._al,w=0|this._bl,S=0|this._cl,A=0|this._dl,B=0|this._el,k=0|this._fl,x=0|this._gl,E=0|this._hl,T=0;32>T;T+=2)t[T]=e.readInt32BE(4*T),t[T+1]=e.readInt32BE(4*T+4);for(;160>T;T+=2){var M=t[T-30],I=t[T-30+1],C=o(M,I),R=d(I,M);M=t[T-4],I=t[T-4+1];var P=p(M,I),F=c(I,M),O=t[T-14],N=t[T-14+1],L=t[T-32],D=t[T-32+1],U=0|R+N,W=0|C+O+l(U,R);U=0|U+F,W=0|W+P+l(U,F),U=0|U+D,W=0|W+L+l(U,D),t[T]=W,t[T+1]=U}for(var H=0;160>H;H+=2){W=t[H],U=t[H+1];var q=n(r,u,f),z=n(v,w,S),V=s(r,v),G=s(v,r),K=i(g,B),X=i(B,g),Y=b[H],Z=b[H+1],J=a(g,h,m),$=a(B,k,x),Q=0|E+X,ee=0|_+K+l(Q,E);Q=0|Q+$,ee=0|ee+J+l(Q,$),Q=0|Q+Z,ee=0|ee+Y+l(Q,Z),Q=0|Q+U,ee=0|ee+W+l(Q,U);var te=0|G+z,re=0|V+q+l(te,G);_=m,E=x,m=h,x=k,h=g,k=B,B=0|A+Q,g=0|y+ee+l(B,A),y=f,A=S,f=u,S=w,u=r,w=v,v=0|Q+te,r=0|ee+re+l(v,Q)}this._al=0|this._al+v,this._bl=0|this._bl+w,this._cl=0|this._cl+S,this._dl=0|this._dl+A,this._el=0|this._el+B,this._fl=0|this._fl+k,this._gl=0|this._gl+x,this._hl=0|this._hl+E,this._ah=0|this._ah+r+l(this._al,v),this._bh=0|this._bh+u+l(this._bl,w),this._ch=0|this._ch+f+l(this._cl,S),this._dh=0|this._dh+y+l(this._dl,A),this._eh=0|this._eh+g+l(this._el,B),this._fh=0|this._fh+h+l(this._fl,k),this._gh=0|this._gh+m+l(this._gl,x),this._hh=0|this._hh+_+l(this._hl,E)},r.prototype._hash=function(){function e(e,r,a){t.writeInt32BE(e,a),t.writeInt32BE(r,a+4)}var t=y.allocUnsafe(64);return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),t},t.exports=r},{"./hash":197,inherits:137,"safe-buffer":194}],205:[function(e,t){function r(){a.call(this)}t.exports=r;var a=e("events").EventEmitter,n=e("inherits");n(r,a),r.Readable=e("readable-stream/readable.js"),r.Writable=e("readable-stream/writable.js"),r.Duplex=e("readable-stream/duplex.js"),r.Transform=e("readable-stream/transform.js"),r.PassThrough=e("readable-stream/passthrough.js"),r.Stream=r,r.prototype.pipe=function(e,t){function r(t){e.writable&&!1===e.write(t)&&p.pause&&p.pause()}function n(){p.readable&&p.resume&&p.resume()}function s(){c||(c=!0,e.end())}function i(){c||(c=!0,"function"==typeof e.destroy&&e.destroy())}function o(e){if(d(),0===a.listenerCount(this,"error"))throw e}function d(){p.removeListener("data",r),e.removeListener("drain",n),p.removeListener("end",s),p.removeListener("close",i),p.removeListener("error",o),e.removeListener("error",o),p.removeListener("end",d),p.removeListener("close",d),e.removeListener("close",d)}var p=this;p.on("data",r),e.on("drain",n),e._isStdio||t&&!1===t.end||(p.on("end",s),p.on("close",i));var c=!1;return p.on("error",o),e.on("error",o),p.on("end",d),p.on("close",d),e.on("close",d),e.emit("pipe",p),e}},{events:117,inherits:137,"readable-stream/duplex.js":180,"readable-stream/passthrough.js":189,"readable-stream/readable.js":190,"readable-stream/transform.js":191,"readable-stream/writable.js":192}],206:[function(e,t,r){(function(t){var a=e("./lib/request"),n=e("./lib/response"),s=e("xtend"),i=e("builtin-status-codes"),o=e("url"),d=r;d.request=function(e,r){e="string"==typeof e?o.parse(e):s(e);var n=-1===t.location.protocol.search(/^https?:$/)?"http:":"",i=e.protocol||n,d=e.hostname||e.host,p=e.port,c=e.path||"/";d&&-1!==d.indexOf(":")&&(d="["+d+"]"),e.url=(d?i+"//"+d:"")+(p?":"+p:"")+c,e.method=(e.method||"GET").toUpperCase(),e.headers=e.headers||{};var l=new a(e);return r&&l.on("response",r),l},d.get=function(e,t){var r=d.request(e,t);return r.end(),r},d.ClientRequest=a,d.IncomingMessage=n.IncomingMessage,d.Agent=function(){},d.Agent.defaultMaxSockets=4,d.globalAgent=new d.Agent,d.STATUS_CODES=i,d.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this,"undefined"==typeof global?"undefined"==typeof self?"undefined"==typeof window?{}:window:self:global)},{"./lib/request":208,"./lib/response":209,"builtin-status-codes":74,url:223,xtend:295}],207:[function(e,t,r){(function(e){function t(){if(o!==void 0)return o;if(e.XMLHttpRequest){o=new e.XMLHttpRequest;try{o.open("GET",e.XDomainRequest?"/":"https://example.com")}catch(t){o=null}}else o=null;return o}function a(e){var r=t();if(!r)return!1;try{return r.responseType=e,r.responseType===e}catch(t){}return!1}function n(e){return"function"==typeof e}r.fetch=n(e.fetch)&&n(e.ReadableStream),r.writableStream=n(e.WritableStream),r.abortController=n(e.AbortController),r.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),r.blobConstructor=!0}catch(t){}var s="undefined"!=typeof e.ArrayBuffer,i=s&&n(e.ArrayBuffer.prototype.slice),o;r.arraybuffer=r.fetch||s&&a("arraybuffer"),r.msstream=!r.fetch&&i&&a("ms-stream"),r.mozchunkedarraybuffer=!r.fetch&&s&&a("moz-chunked-arraybuffer"),r.overrideMimeType=r.fetch||!!t()&&n(t().overrideMimeType),r.vbArray=n(e.VBArray),o=null}).call(this,"undefined"==typeof global?"undefined"==typeof self?"undefined"==typeof window?{}:window:self:global)},{}],208:[function(e,t){(function(r,a,n){function s(e,t){return o.fetch&&t?"fetch":o.mozchunkedarraybuffer?"moz-chunked-arraybuffer":o.msstream?"ms-stream":o.arraybuffer&&e?"arraybuffer":o.vbArray&&e?"text:vbarray":"text"}function i(e){try{var t=e.status;return null!==t&&0!==t}catch(t){return!1}}var o=e("./capability"),d=e("inherits"),p=e("./response"),c=e("readable-stream"),l=e("to-arraybuffer"),u=p.IncomingMessage,f=p.readyStates,y=t.exports=function(e){var t=this;c.Writable.call(t),t._opts=e,t._body=[],t._headers={},e.auth&&t.setHeader("Authorization","Basic "+new n(e.auth).toString("base64")),Object.keys(e.headers).forEach(function(r){t.setHeader(r,e.headers[r])});var r=!0,a;if("disable-fetch"===e.mode||"requestTimeout"in e&&!o.abortController)r=!1,a=!0;else if("prefer-streaming"===e.mode)a=!1;else if("allow-wrong-content-type"===e.mode)a=!o.overrideMimeType;else if(!e.mode||"default"===e.mode||"prefer-fast"===e.mode)a=!0;else throw new Error("Invalid value for opts.mode");t._mode=s(a,r),t._fetchTimer=null,t.on("finish",function(){t._onFinish()})};d(y,c.Writable),y.prototype.setHeader=function(e,t){var r=this,a=e.toLowerCase();-1!==b.indexOf(a)||(r._headers[a]={name:e,value:t})},y.prototype.getHeader=function(e){var t=this._headers[e.toLowerCase()];return t?t.value:null},y.prototype.removeHeader=function(e){var t=this;delete t._headers[e.toLowerCase()]},y.prototype._onFinish=function(){var e=this;if(!e._destroyed){var t=e._opts,s=e._headers,i=null;"GET"!==t.method&&"HEAD"!==t.method&&(o.arraybuffer?i=l(n.concat(e._body)):o.blobConstructor?i=new a.Blob(e._body.map(function(e){return l(e)}),{type:(s["content-type"]||{}).value||""}):i=n.concat(e._body).toString());var d=[];if(Object.keys(s).forEach(function(e){var t=s[e].name,r=s[e].value;Array.isArray(r)?r.forEach(function(e){d.push([t,e])}):d.push([t,r])}),"fetch"===e._mode){var p=null;if(o.abortController){var c=new AbortController;p=c.signal,e._fetchAbortController=c,"requestTimeout"in t&&0!==t.requestTimeout&&(e._fetchTimer=a.setTimeout(function(){e.emit("requestTimeout"),e._fetchAbortController&&e._fetchAbortController.abort()},t.requestTimeout))}a.fetch(e._opts.url,{method:e._opts.method,headers:d,body:i||void 0,mode:"cors",credentials:t.withCredentials?"include":"same-origin",signal:p}).then(function(t){e._fetchResponse=t,e._connect()},function(t){a.clearTimeout(e._fetchTimer),e._destroyed||e.emit("error",t)})}else{var u=e._xhr=new a.XMLHttpRequest;try{u.open(e._opts.method,e._opts.url,!0)}catch(t){return void r.nextTick(function(){e.emit("error",t)})}"responseType"in u&&(u.responseType=e._mode.split(":")[0]),"withCredentials"in u&&(u.withCredentials=!!t.withCredentials),"text"===e._mode&&"overrideMimeType"in u&&u.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in t&&(u.timeout=t.requestTimeout,u.ontimeout=function(){e.emit("requestTimeout")}),d.forEach(function(e){u.setRequestHeader(e[0],e[1])}),e._response=null,u.onreadystatechange=function(){switch(u.readyState){case f.LOADING:case f.DONE:e._onXHRProgress();}},"moz-chunked-arraybuffer"===e._mode&&(u.onprogress=function(){e._onXHRProgress()}),u.onerror=function(){e._destroyed||e.emit("error",new Error("XHR error"))};try{u.send(i)}catch(t){return void r.nextTick(function(){e.emit("error",t)})}}}},y.prototype._onXHRProgress=function(){var e=this;!i(e._xhr)||e._destroyed||(!e._response&&e._connect(),e._response._onXHRProgress())},y.prototype._connect=function(){var e=this;e._destroyed||(e._response=new u(e._xhr,e._fetchResponse,e._mode,e._fetchTimer),e._response.on("error",function(t){e.emit("error",t)}),e.emit("response",e._response))},y.prototype._write=function(e,t,r){var a=this;a._body.push(e),r()},y.prototype.abort=y.prototype.destroy=function(){var e=this;e._destroyed=!0,a.clearTimeout(e._fetchTimer),e._response&&(e._response._destroyed=!0),e._xhr?e._xhr.abort():e._fetchAbortController&&e._fetchAbortController.abort()},y.prototype.end=function(e,t,r){var a=this;"function"==typeof e&&(r=e,e=void 0),c.Writable.prototype.end.call(a,e,t,r)},y.prototype.flushHeaders=function(){},y.prototype.setTimeout=function(){},y.prototype.setNoDelay=function(){},y.prototype.setSocketKeepAlive=function(){};var b=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"]}).call(this,e("_process"),"undefined"==typeof global?"undefined"==typeof self?"undefined"==typeof window?{}:window:self:global,e("buffer").Buffer)},{"./capability":207,"./response":209,_process:71,buffer:73,inherits:137,"readable-stream":190,"to-arraybuffer":219}],209:[function(e,t,r){(function(t,a,n){var s=e("./capability"),i=e("inherits"),o=e("readable-stream"),d=r.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},p=r.IncomingMessage=function(e,r,i,d){var p=this;if(o.Readable.call(p),p._mode=i,p.headers={},p.rawHeaders=[],p.trailers={},p.rawTrailers=[],p.on("end",function(){t.nextTick(function(){p.emit("close")})}),"fetch"===i){function e(){l.read().then(function(t){return p._destroyed?void 0:t.done?(a.clearTimeout(d),void p.push(null)):void(p.push(new n(t.value)),e())}).catch(function(e){a.clearTimeout(d),p._destroyed||p.emit("error",e)})}if(p._fetchResponse=r,p.url=r.url,p.statusCode=r.status,p.statusMessage=r.statusText,r.headers.forEach(function(e,t){p.headers[t.toLowerCase()]=e,p.rawHeaders.push(t,e)}),s.writableStream){var c=new WritableStream({write:function(e){return new Promise(function(t,r){p._destroyed?r():p.push(new n(e))?t():p._resumeFetch=t})},close:function(){a.clearTimeout(d),p._destroyed||p.push(null)},abort:function(e){p._destroyed||p.emit("error",e)}});try{return void r.body.pipeTo(c).catch(function(e){a.clearTimeout(d),p._destroyed||p.emit("error",e)})}catch(t){}}var l=r.body.getReader();e()}else{p._xhr=e,p._pos=0,p.url=e.responseURL,p.statusCode=e.status,p.statusMessage=e.statusText;var u=e.getAllResponseHeaders().split(/\r?\n/);if(u.forEach(function(e){var t=e.match(/^([^:]+):\s*(.*)/);if(t){var r=t[1].toLowerCase();"set-cookie"===r?(void 0===p.headers[r]&&(p.headers[r]=[]),p.headers[r].push(t[2])):void 0===p.headers[r]?p.headers[r]=t[2]:p.headers[r]+=", "+t[2],p.rawHeaders.push(t[1],t[2])}}),p._charset="x-user-defined",!s.overrideMimeType){var f=p.rawHeaders["mime-type"];if(f){var y=f.match(/;\s*charset=([^;])(;|$)/);y&&(p._charset=y[1].toLowerCase())}p._charset||(p._charset="utf-8")}}};i(p,o.Readable),p.prototype._read=function(){var e=this,t=e._resumeFetch;t&&(e._resumeFetch=null,t())},p.prototype._onXHRProgress=function(){var t=this,e=t._xhr,r=null;switch(t._mode){case"text:vbarray":if(e.readyState!==d.DONE)break;try{r=new a.VBArray(e.responseBody).toArray()}catch(t){}if(null!==r){t.push(new n(r));break}case"text":try{r=e.responseText}catch(r){t._mode="text:vbarray";break}if(r.length>t._pos){var s=r.substr(t._pos);if("x-user-defined"===t._charset){for(var o=new n(s.length),p=0;pt._pos&&(t.push(new n(new Uint8Array(c.result.slice(t._pos)))),t._pos=c.result.byteLength)},c.onload=function(){t.push(null)},c.readAsArrayBuffer(r);}t._xhr.readyState===d.DONE&&"ms-stream"!==t._mode&&t.push(null)}}).call(this,e("_process"),"undefined"==typeof global?"undefined"==typeof self?"undefined"==typeof window?{}:window:self:global,e("buffer").Buffer)},{"./capability":207,_process:71,buffer:73,inherits:137,"readable-stream":190}],210:[function(e,t){"use strict";t.exports=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}},{}],211:[function(e,t,r){"use strict";function a(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0;}}function n(e){var t=a(e);if("string"!=typeof t&&(g.isEncoding===h||!h(e)))throw new Error("Unknown encoding: "+e);return t||e}function s(e){this.encoding=n(e);var t;switch(this.encoding){case"utf16le":this.text=c,this.end=l,t=4;break;case"utf8":this.fillLast=p,t=4;break;case"base64":this.text=u,this.end=f,t=3;break;default:return this.write=y,void(this.end=b);}this.lastNeed=0,this.lastTotal=0,this.lastChar=g.allocUnsafe(t)}function o(e){if(127>=e)return 0;return 6==e>>5?2:14==e>>4?3:30==e>>3?4:2==e>>6?-1:-2}function d(e,t,r){var a=t.length-1;if(a=r)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],a.slice(0,-1)}return a}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function l(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function u(e,t){var r=(e.length-t)%3;return 0==r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1==r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function f(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function y(e){return e.toString(this.encoding)}function b(e){return e&&e.length?this.write(e):""}var g=e("safe-buffer").Buffer,h=g.isEncoding||function(e){switch(e=""+e,e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1;}};r.StringDecoder=s,s.prototype.write=function(e){if(0===e.length)return"";var t,a;if(this.lastNeed){if(t=this.fillLast(e),void 0===t)return"";a=this.lastNeed,this.lastNeed=0}else a=0;return a=r)return n(r,t);for(var s=4096;s*128arguments.length)&&o.call(arguments,1);return d[t]=!0,s(function(){d[t]&&(a?e.apply(null,a):e.call(null),r.clearImmediate(t))}),t},r.clearImmediate="function"==typeof a?a:function(e){delete d[e]}}).call(this,e("timers").setImmediate,e("timers").clearImmediate)},{"process/browser.js":218,timers:217}],218:[function(e,t,r){arguments[4][71][0].apply(r,arguments)},{dup:71}],219:[function(e,t){var r=e("buffer").Buffer;t.exports=function(e){if(e instanceof Uint8Array){if(0===e.byteOffset&&e.byteLength===e.buffer.byteLength)return e.buffer;if("function"==typeof e.buffer.slice)return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}if(r.isBuffer(e)){for(var t=new Uint8Array(e.length),a=e.length,n=0;narguments.length&&(n=r[i?i[d]:d],d+=e),t(r,a,n,i,d,o)}}function n(e){return function(t,r,a){r=B(r,a);for(var n=T(t),s=0a||null==r)return r;for(var n=1;na&&(a=s)}else t=B(t,r),A.each(e,function(e,r,s){o=t(e,r,s),(o>n||o===-Infinity&&a===-Infinity)&&(a=e,n=o)});return a},A.min=function(e,t,r){var a=1/0,n=1/0,s,o;if(null==t&&null!=e){e=M(e)?e:A.values(e);for(var d=0,p=e.length;da||void 0===r)return 1;if(r=t)throw new Error("bindAll must be passed function names");for(r=1;r=c||c>t?(a&&(clearTimeout(a),a=null),n=p,o=e.apply(s,i),!a&&(s=i=null)):!a&&!1!==r.trailing&&(a=setTimeout(d,c)),o}},A.debounce=function(e,t,r){var a=function(){var p=A.now()-o;p--e)return t.apply(this,arguments)}},A.before=function(e,t){var r;return function(){return 0<--e&&(r=t.apply(this,arguments)),1>=e&&(t=null),r}},A.once=A.partial(A.before,2);var P=!{toString:null}.propertyIsEnumerable("toString"),F=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];A.keys=function(e){if(!A.isObject(e))return[];if(m)return m(e);var t=[];for(var r in e)A.has(e,r)&&t.push(r);return P&&o(e,t),t},A.allKeys=function(e){if(!A.isObject(e))return[];var t=[];for(var r in e)t.push(r);return P&&o(e,t),t},A.values=function(e){for(var t=A.keys(e),r=t.length,a=Array(r),n=0;n":">",'"':""","'":"'","`":"`"},j=A.invert(N),L=function(e){var t=function(t){return e[t]},r="(?:"+A.keys(e).join("|")+")",a=RegExp(r),n=RegExp(r,"g");return function(e){return e=null==e?"":""+e,a.test(e)?e.replace(n,t):e}};A.escape=L(N),A.unescape=L(j),A.result=function(e,t,r){var a=null==e?void 0:e[t];return void 0===a&&(a=r),A.isFunction(a)?a.call(e):a};var D=0;A.uniqueId=function(e){var t=++D+"";return e?e+t:t},A.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var U=/(.)^/,W={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},H=/\\|'|\r|\n|\u2028|\u2029/g,q=function(e){return"\\"+W[e]};A.template=function(e,t,r){!t&&r&&(t=r),t=A.defaults({},t,A.templateSettings);var a=RegExp([(t.escape||U).source,(t.interpolate||U).source,(t.evaluate||U).source].join("|")+"|$","g"),n=0,s="__p+='";e.replace(a,function(t,r,a,i,o){return s+=e.slice(n,o).replace(H,q),n=o+t.length,r?s+="'+\n((__t=("+r+"))==null?'':_.escape(__t))+\n'":a?s+="'+\n((__t=("+a+"))==null?'':__t)+\n'":i&&(s+="';\n"+i+"\n__p+='"),t}),s+="';\n",t.variable||(s="with(obj||{}){\n"+s+"}\n"),s="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+s+"return __p;\n";try{var i=new Function(t.variable||"obj","_",s)}catch(t){throw t.source=s,t}var o=function(e){return i.call(this,e,A)},d=t.variable||"obj";return o.source="function("+d+"){\n"+s+"}",o},A.chain=function(e){var t=A(e);return t._chain=!0,t};var z=function(e,t){return e._chain?A(t).chain():t};A.mixin=function(e){A.each(A.functions(e),function(t){var r=A[t]=e[t];A.prototype[t]=function(){var e=[this._wrapped];return f.apply(e,arguments),z(this,r.apply(A,e))}})},A.mixin(A),A.each(["pop","push","reverse","shift","sort","splice","unshift"],function(e){var t=c[e];A.prototype[e]=function(){var r=this._wrapped;return t.apply(r,arguments),("shift"===e||"splice"===e)&&0===r.length&&delete r[0],z(this,r)}}),A.each(["concat","join","slice"],function(e){var t=c[e];A.prototype[e]=function(){return z(this,t.apply(this._wrapped,arguments))}}),A.prototype.value=function(){return this._wrapped},A.prototype.valueOf=A.prototype.toJSON=A.prototype.value,A.prototype.toString=function(){return""+this._wrapped},"function"==typeof define&&define.amd&&define("underscore",[],function(){return A})}).call(this)},{}],222:[function(e,t){t.exports=function(e,t){if(t){t=t.trim().replace(/^(\?|#|&)/,""),t=t?"?"+t:t;var r=e.split(/[\?\#]/),a=r[0];t&&/\:\/\/[^\/]*$/.test(a)&&(a+="/");var n=e.match(/(\#.*)$/);e=a+t,n&&(e+=n[0])}return e}},{}],223:[function(e,t,r){"use strict";function a(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function n(e,t,r){if(e&&o.isObject(e)&&e instanceof a)return e;var n=new a;return n.parse(e,t,r),n}var s=e("punycode"),o=e("./util");r.parse=n,r.resolve=function(e,t){return n(e,!1,!0).resolve(t)},r.resolveObject=function(e,t){return e?n(e,!1,!0).resolveObject(t):t},r.format=function(e){return o.isString(e)&&(e=n(e)),e instanceof a?e.format():a.prototype.format.call(e)},r.Url=a;var d=/^([a-z0-9.+-]+:)/i,i=/:[0-9]*$/,p=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,c=["{","}","|","\\","^","`"].concat(["<",">","\"","`"," ","\r","\n","\t"]),u=["'"].concat(c),l=["%","/","?",";","#"].concat(u),f=["/","?","#"],y=/^[+a-z0-9A-Z_-]{0,63}$/,b=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,g={javascript:!0,"javascript:":!0},m={javascript:!0,"javascript:":!0},_={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},v=e("querystring");a.prototype.parse=function(e,t,r){if(!o.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var a=e.indexOf("?"),n=-1!==a&&ah.length&&h.unshift(""),r.pathname=h.join("/")}else r.pathname=e.pathname;if(r.search=e.search,r.query=e.query,r.host=e.host||"",r.auth=e.auth,r.hostname=e.hostname||e.host,r.port=e.port,r.pathname||r.search){var w=r.pathname||"",p=r.search||"";r.path=w+p}return r.slashes=r.slashes||e.slashes,r.href=r.format(),r}var s=r.pathname&&"/"===r.pathname.charAt(0),S=e.host||e.pathname&&"/"===e.pathname.charAt(0),A=S||s||r.host&&e.pathname,B=A,x=r.pathname&&r.pathname.split("/")||[],h=e.pathname&&e.pathname.split("/")||[],E=r.protocol&&!_[r.protocol];if(E&&(r.hostname="",r.port=null,r.host&&(""===x[0]?x[0]=r.host:x.unshift(r.host)),r.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===h[0]?h[0]=e.host:h.unshift(e.host)),e.host=null),A=A&&(""===h[0]||""===x[0])),S)r.host=e.host||""===e.host?e.host:r.host,r.hostname=e.hostname||""===e.hostname?e.hostname:r.hostname,r.search=e.search,r.query=e.query,x=h;else if(h.length)x||(x=[]),x.pop(),x=x.concat(h),r.search=e.search,r.query=e.query;else if(!o.isNullOrUndefined(e.search)){if(E){r.hostname=r.host=x.shift();var T=!!(r.host&&0=n&&r>>10),n=56320|1023&n),a+=b(n);return a}function i(e){if(55296<=e&&57343>=e)throw Error("Lone surrogate U+"+e.toString(16).toUpperCase()+" is not a scalar value")}function o(e,t){return b(128|63&e>>t)}function d(e){if(0==(4294967168&e))return b(e);var t="";return 0==(4294965248&e)?t=b(192|31&e>>6):0==(4294901760&e)?(i(e),t=b(224|15&e>>12),t+=o(e,6)):0==(4292870144&e)&&(t=b(240|7&e>>18),t+=o(e,12),t+=o(e,6)),t+=b(128|63&e),t}function p(){if(_>=m)throw Error("Invalid byte index");var e=255&h[_];if(_++,128==(192&e))return 63&e;throw Error("Invalid continuation byte")}function c(){var e,t,r,a,n;if(_>m)throw Error("Invalid byte index");if(_==m)return!1;if(e=255&h[_],_++,0==(128&e))return e;if(192==(224&e)){var t=p();if(n=(31&e)<<6|t,128<=n)return n;throw Error("Invalid continuation byte")}if(224==(240&e)){if(t=p(),r=p(),n=(15&e)<<12|t<<6|r,2048<=n)return i(n),n;throw Error("Invalid continuation byte")}if(240==(248&e)&&(t=p(),r=p(),a=p(),n=(15&e)<<18|t<<12|r<<6|a,65536<=n&&1114111>=n))return n;throw Error("Invalid UTF-8 detected")}function l(e){h=n(e),m=h.length,_=0;for(var t=[],r;!1!==(r=c());)t.push(r);return s(t)}var u="object"==typeof r&&r,f="object"==typeof t&&t&&t.exports==u&&t,y="object"==typeof e&&e;(y.global===y||y.window===y)&&(a=y);var b=String.fromCharCode,g={version:"2.0.0",encode:function(e){for(var t=n(e),r=t.length,a=-1,s="",i;++a=p&&(c.unsubscribe(),u=!0,s._fireError(new Error("Transaction was not mined within"+p+" seconds, please make sure your transaction was properly sent. Be aware that it might still be mined!"),t.eventEmitter,t.reject)):y-1>=d&&(c.unsubscribe(),u=!0,s._fireError(new Error("Transaction was not mined within 50 blocks, please make sure your transaction was properly sent. Be aware that it might still be mined!"),t.eventEmitter,t.reject))}))},A=function(e){r.isFunction(this.requestManager.provider.on)?w.subscribe("newBlockHeaders",S.bind(null,e,!1)):g=setInterval(S.bind(null,e,!0),1e3)}.bind(this);w.getTransactionReceipt(e).then(function(e){e&&e.blockHash?(0a;a++)r+=7s.v?s.v:1-s.v%2),o="0x"+i.encode("hex",!1).slice(2),p=c(o),l=u("0x"+p.slice(-40));return l},encodeSignature:y,decodeSignature:b}}).call(this,e("buffer").Buffer)},{"./bytes":256,"./hash":257,"./nat":258,"./rlp":259,buffer:73,elliptic:95}],255:[function(e,t,r){arguments[4][111][0].apply(r,arguments)},{dup:111}],256:[function(e,t,r){arguments[4][112][0].apply(r,arguments)},{"./array.js":255,dup:112}],257:[function(e,t,r){arguments[4][113][0].apply(r,arguments)},{dup:113}],258:[function(e,t){var r=e("bn.js"),n=e("./bytes"),s=function(e){return"0x"+e.toString("hex")},i=function(e){return new r(e.slice(2),16)},a=function(e){var t="0x"+("0x"===e.slice(0,2)?new r(e.slice(2),16):new r(e,10)).toString("hex");return"0x0"==t?"0x":t},o=function(e){return"string"==typeof e?/^0x/.test(e)?e:"0x"+e:"0x"+new r(e).toString("hex")},d=function(e){return i(e).toNumber()},p=function(e){return function(t,r){return s(i(t)[e](i(r)))}},c=p("add"),l=p("mul"),u=p("div"),f=p("sub");t.exports={toString:function(e){return i(e).toString(10)},fromString:a,toNumber:d,fromNumber:o,toEther:function(e){return d(u(e,a("10000000000")))/1e8},fromEther:function(e){return l(o(Math.floor(1e8*e)),a("10000000000"))},toUint256:function(e){return n.pad(32,e)},add:c,mul:l,div:u,sub:f}},{"./bytes":256,"bn.js":41}],259:[function(e,t){t.exports={encode:function(e){var t=function(e){return 0==e.length%2?e:"0"+e},r=function(e){return t(e.toString(16))},a=function(e,t){return 56>e?r(t+e):r(t+r(e).length/2+55)+r(e)};return"0x"+function e(t){if("string"==typeof t){var r=t.slice(2),n=2!=r.length||"80"<=r?a(r.length/2,128):"";return n+r}var s=t.map(e).join(""),i=a(s.length/2,192);return i+s}(e)},decode:function(e){var t=2,r=function(){if(t>=e.length)throw"";var r=e.slice(t,t+2);return"80">r?(t+=2,"0x"+r):"c0">r?n():s()},a=function(){var r=parseInt(e.slice(t,t+=2),16)%64;return 56>r?r:parseInt(e.slice(t,t+=2*(r-55)),16)},n=function(){var r=a();return"0x"+e.slice(t,t+=2*r)},s=function(){for(var e=2*a()+t,n=[];te;e++)0==(3&e)&&(t=4294967296*Math.random()),n[e]=255&t>>>((3&e)<<3);return n}}t.exports=r}).call(this,"undefined"==typeof global?"undefined"==typeof self?"undefined"==typeof window?{}:window:self:global)},{}],261:[function(e,t){function r(e,t,r){var a=t&&r||0,n=0;for(t=t||[],e.toLowerCase().replace(/[0-9a-f]{2}/g,function(e){16>n&&(t[a+n++]=p[e])});16>n;)t[a+n++]=0;return t}function a(e,t){var r=t||0,a=d;return a[e[r++]]+a[e[r++]]+a[e[r++]]+a[e[r++]]+"-"+a[e[r++]]+a[e[r++]]+"-"+a[e[r++]]+a[e[r++]]+"-"+a[e[r++]]+a[e[r++]]+"-"+a[e[r++]]+a[e[r++]]+a[e[r++]]+a[e[r++]]+a[e[r++]]+a[e[r++]]}function n(e,t,r){var s=t&&r||0,o=t||[];e=e||{};var d=void 0===e.clockseq?f:e.clockseq,p=void 0===e.msecs?new Date().getTime():e.msecs,c=void 0===e.nsecs?g+1:e.nsecs,l=p-y+(c-g)/1e4;if(0>l&&void 0===e.clockseq&&(d=16383&d+1),(0>l||p>y)&&void 0===e.nsecs&&(c=0),1e4<=c)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");y=p,g=c,f=d,p+=122192928e5;var b=(1e4*(268435455&p)+c)%4294967296;o[s++]=255&b>>>24,o[s++]=255&b>>>16,o[s++]=255&b>>>8,o[s++]=255&b;var h=268435455&1e4*(p/4294967296);o[s++]=255&h>>>8,o[s++]=255&h,o[s++]=16|15&h>>>24,o[s++]=255&h>>>16,o[s++]=128|d>>>8,o[s++]=255&d;for(var m=e.node||u,_=0;6>_;_++)o[s+_]=m[_];return t?t:a(o)}function s(e,t,r){var n=t&&r||0;"string"==typeof e&&(t="binary"==e?Array(16):null,e=null),e=e||{};var s=e.random||(e.rng||o)();if(s[6]=64|15&s[6],s[8]=128|63&s[8],t)for(var i=0;16>i;i++)t[n+i]=s[i];return t||a(s)}for(var o=e("./rng"),d=[],p={},c=0;256>c;c++)d[c]=(c+256).toString(16).substr(1),p[d[c]]=c;var l=o(),u=[1|l[0],l[1],l[2],l[3],l[4],l[5]],f=16383&(l[6]<<8|l[7]),y=0,g=0,b=s;b.v1=n,b.v4=s,b.parse=r,b.unparse=a,t.exports=b},{"./rng":260}],262:[function(e,t){(function(r,a){"use strict";function n(e){this._accounts=e,this.length=0,this.defaultKeyName="web3js_wallet"}var s=e("underscore"),i=e("web3-core"),o=e("web3-core-method"),d=e("any-promise"),p=e("eth-lib/lib/account"),c=e("eth-lib/lib/hash"),l=e("eth-lib/lib/rlp"),u=e("eth-lib/lib/nat"),f=e("eth-lib/lib/bytes"),y="undefined"==typeof r?e("crypto-browserify"):e("crypto"),b=e("scrypt.js"),g=e("uuid"),h=e("web3-utils"),m=e("web3-core-helpers"),_=function(e){return s.isUndefined(e)||s.isNull(e)},v=function(e){for(;e&&e.startsWith("0x0");)e="0x"+e.slice(3);return e},w=function(e){return 1==e.length%2&&(e=e.replace("0x","0x0")),e},S=function(){var e=this;i.packageInit(this,arguments),delete this.BatchRequest,delete this.extend;var t=[new o({name:"getId",call:"net_version",params:0,outputFormatter:h.hexToNumber}),new o({name:"getGasPrice",call:"eth_gasPrice",params:0}),new o({name:"getTransactionCount",call:"eth_getTransactionCount",params:2,inputFormatter:[function(e){if(h.isAddress(e))return e;throw new Error("Address "+e+" is not a valid address to get the \"transactionCount\".")},function(){return"latest"}]})];this._ethereumCall={},s.each(t,function(t){t.attachToObject(e._ethereumCall),t.setRequestManager(e._requestManager)}),this.wallet=new n(this)};S.prototype._addAccountFunctions=function(e){var t=this;return e.signTransaction=function(r,a){return t.signTransaction(r,e.privateKey,a)},e.sign=function(r){return t.sign(r,e.privateKey)},e.encrypt=function(r,a){return t.encrypt(e.privateKey,r,a)},e},S.prototype.create=function(e){return this._addAccountFunctions(p.create(e||h.randomHex(32)))},S.prototype.privateKeyToAccount=function(e){return this._addAccountFunctions(p.fromPrivate(e))},S.prototype.signTransaction=function(e,t,r){function a(e){if(e.gas||e.gasLimit||(i=new Error("\"gas\" is missing")),(0>e.nonce||0>e.gas||0>e.gasPrice||0>e.chainId)&&(i=new Error("Gas, gasPrice, nonce or chainId is lower than 0")),i)return r(i),d.reject(new Error("\"gas\" is missing"));try{e=m.formatters.inputCallFormatter(e);var a=e;a.to=e.to||"0x",a.data=e.data||"0x",a.value=e.value||"0x",a.chainId=h.numberToHex(e.chainId);var n=l.encode([f.fromNat(a.nonce),f.fromNat(a.gasPrice),f.fromNat(a.gas),a.to.toLowerCase(),f.fromNat(a.value),a.data,f.fromNat(a.chainId||"0x1"),"0x","0x"]),s=c.keccak256(n),y=p.makeSigner(2*u.toNumber(a.chainId||"0x1")+35)(c.keccak256(n),t),b=l.decode(n).slice(0,6).concat(p.decodeSignature(y));b[6]=w(v(b[6])),b[7]=w(v(b[7])),b[8]=w(v(b[8]));var g=l.encode(b),_=l.decode(g);o={messageHash:s,v:v(_[6]),r:v(_[7]),s:v(_[8]),rawTransaction:g}}catch(t){return r(t),d.reject(t)}return r(null,o),o}var n=this,i=!1,o;return r=r||function(){},e?void 0!==e.nonce&&void 0!==e.chainId&&void 0!==e.gasPrice?d.resolve(a(e)):d.all([_(e.chainId)?n._ethereumCall.getId():e.chainId,_(e.gasPrice)?n._ethereumCall.getGasPrice():e.gasPrice,_(e.nonce)?n._ethereumCall.getTransactionCount(n.privateKeyToAccount(t).address):e.nonce]).then(function(t){if(_(t[0])||_(t[1])||_(t[2]))throw new Error("One of the values \"chainId\", \"gasPrice\", or \"nonce\" couldn't be fetched: "+JSON.stringify(t));return a(s.extend(e,{chainId:t[0],gasPrice:t[1],nonce:t[2]}))}):(i=new Error("No transaction object given!"),r(i),d.reject(i))},S.prototype.recoverTransaction=function(e){var t=l.decode(e),r=p.encodeSignature(t.slice(6,9)),a=f.toNumber(t[6]),n=35>a?[]:[f.fromNumber(a-35>>1),"0x","0x"],s=t.slice(0,6).concat(n),i=l.encode(s);return p.recover(c.keccak256(i),r)},S.prototype.hashMessage=function(e){var t=h.isHexStrict(e)?h.hexToBytes(e):e,r=a.from(t),n="\x19Ethereum Signed Message:\n"+t.length,s=a.from(n),i=a.concat([s,r]);return c.keccak256s(i)},S.prototype.sign=function(e,t){var r=this.hashMessage(e),a=p.sign(r,t),n=p.decodeSignature(a);return{message:e,messageHash:r,v:n[0],r:n[1],s:n[2],signature:a}},S.prototype.recover=function(e,t,r){var a=[].slice.apply(arguments);return s.isObject(e)?this.recover(e.messageHash,p.encodeSignature([e.v,e.r,e.s]),!0):(r||(e=this.hashMessage(e)),4<=a.length?(r=a.slice(-1)[0],r=!!s.isBoolean(r)&&!!r,this.recover(e,p.encodeSignature(a.slice(1,4)),r)):p.recover(e,t))},S.prototype.decrypt=function(e,t,r){if(!s.isString(t))throw new Error("No password given.");var n=s.isObject(e)?e:JSON.parse(r?e.toLowerCase():e);if(3!==n.version)throw new Error("Not a valid V3 wallet");var i,o;if("scrypt"===n.crypto.kdf)o=n.crypto.kdfparams,i=b(new a(t),new a(o.salt,"hex"),o.n,o.r,o.p,o.dklen);else if("pbkdf2"===n.crypto.kdf){if(o=n.crypto.kdfparams,"hmac-sha256"!==o.prf)throw new Error("Unsupported parameters to PBKDF2");i=y.pbkdf2Sync(new a(t),new a(o.salt,"hex"),o.c,o.dklen,"sha256")}else throw new Error("Unsupported key derivation scheme");var d=new a(n.crypto.ciphertext,"hex"),p=h.sha3(a.concat([i.slice(16,32),d])).replace("0x","");if(p!==n.crypto.mac)throw new Error("Key derivation failed - possibly wrong password");var c=y.createDecipheriv(n.crypto.cipher,i.slice(0,16),new a(n.crypto.cipherparams.iv,"hex")),l="0x"+a.concat([c.update(d),c.final()]).toString("hex");return this.privateKeyToAccount(l)},S.prototype.encrypt=function(e,t,r){var n=this.privateKeyToAccount(e);r=r||{};var s=r.salt||y.randomBytes(32),i=r.iv||y.randomBytes(16),o=r.kdf||"scrypt",d={dklen:r.dklen||32,salt:s.toString("hex")},p;if("pbkdf2"===o)d.c=r.c||262144,d.prf="hmac-sha256",p=y.pbkdf2Sync(new a(t),s,d.c,d.dklen,"sha256");else if("scrypt"===o)d.n=r.n||8192,d.r=r.r||8,d.p=r.p||1,p=b(new a(t),s,d.n,d.r,d.p,d.dklen);else throw new Error("Unsupported kdf");var c=y.createCipheriv(r.cipher||"aes-128-ctr",p.slice(0,16),i);if(!c)throw new Error("Unsupported cipher");var l=a.concat([c.update(new a(n.privateKey.replace("0x",""),"hex")),c.final()]),u=h.sha3(a.concat([p.slice(16,32),new a(l,"hex")])).replace("0x","");return{version:3,id:g.v4({random:r.uuid||y.randomBytes(16)}),address:n.address.toLowerCase().replace("0x",""),crypto:{ciphertext:l.toString("hex"),cipherparams:{iv:i.toString("hex")},cipher:r.cipher||"aes-128-ctr",kdf:o,kdfparams:d,mac:u.toString("hex")}}},n.prototype._findSafeIndex=function(e){return e=e||0,s.has(this,e)?this._findSafeIndex(e+1):e},n.prototype._currentIndexes=function(){var e=Object.keys(this),t=e.map(function(e){return parseInt(e)}).filter(function(e){return 9e20>e});return t},n.prototype.create=function(e,t){for(var r=0;re.highestBlock-200&&(t._isSyncing=!1,t.emit("changed",t._isSyncing),r.isFunction(t.callback)&&t.callback(null,t._isSyncing,t))},500)):(this._isSyncing=!0,this.emit("changed",t._isSyncing),r.isFunction(this.callback)&&this.callback(null,t._isSyncing,this),setTimeout(function(){t.emit("data",e),r.isFunction(t.callback)&&t.callback(null,e,t)},0))}}}})];B.forEach(function(t){t.attachToObject(e),t.setRequestManager(e._requestManager,e.accounts),t.defaultBlock=e.defaultBlock,t.defaultAccount=e.defaultAccount})};a.addProviders(w),t.exports=w},{"./getNetworkType.js":267,underscore:221,"web3-core":241,"web3-core-helpers":231,"web3-core-method":232,"web3-core-subscriptions":238,"web3-eth-abi":244,"web3-eth-accounts":262,"web3-eth-contract":263,"web3-eth-iban":265,"web3-eth-personal":266,"web3-net":269,"web3-utils":275}],269:[function(e,t){"use strict";var r=e("web3-core"),a=e("web3-core-method"),n=e("web3-utils"),s=function(){var e=this;r.packageInit(this,arguments),[new a({name:"getId",call:"net_version",params:0,outputFormatter:n.hexToNumber}),new a({name:"isListening",call:"net_listening",params:0}),new a({name:"getPeerCount",call:"net_peerCount",params:0,outputFormatter:n.hexToNumber})].forEach(function(t){t.attachToObject(e),t.setRequestManager(e._requestManager)})};r.addProviders(s),t.exports=s},{"web3-core":241,"web3-core-method":232,"web3-utils":275}],270:[function(e,t){var r=e("web3-core-helpers").errors,a=e("xhr2-cookies").XMLHttpRequest,n=function(e,t){t=t||{},this.host=e||"http://localhost:8545",this.timeout=t.timeout||0,this.headers=t.headers,this.connected=!1};n.prototype._prepareRequest=function(){var e=new a;return e.open("POST",this.host,!0),e.setRequestHeader("Content-Type","application/json"),e.timeout=this.timeout&&1!==this.timeout?this.timeout:0,e.withCredentials=!0,this.headers&&this.headers.forEach(function(t){e.setRequestHeader(t.name,t.value)}),e},n.prototype.send=function(e,t){var a=this,n=this._prepareRequest();n.onreadystatechange=function(){if(4===n.readyState&&1!==n.timeout){var e=n.responseText,s=null;try{e=JSON.parse(e)}catch(t){s=r.InvalidResponse(n.responseText)}a.connected=!0,t(s,e)}},n.ontimeout=function(){a.connected=!1,t(r.ConnectionTimeout(this.timeout))};try{n.send(JSON.stringify(e))}catch(e){this.connected=!1,t(r.InvalidConnection(this.host))}},t.exports=n},{"web3-core-helpers":231,"xhr2-cookies":290}],271:[function(e,t){"use strict";var r=e("underscore"),a=e("web3-core-helpers").errors,n=e("oboe"),s=function(e,t){var a=this;this.responseCallbacks={},this.notificationCallbacks=[],this.path=e,this.connected=!1,this.connection=t.connect({path:this.path}),this.addDefaultEvents();var s=function(e){var t=null;r.isArray(e)?e.forEach(function(e){a.responseCallbacks[e.id]&&(t=e.id)}):t=e.id,t||-1===e.method.indexOf("_subscription")?a.responseCallbacks[t]&&(a.responseCallbacks[t](null,e),delete a.responseCallbacks[t]):a.notificationCallbacks.forEach(function(t){r.isFunction(t)&&t(e)})};"Socket"===t.constructor.name?n(this.connection).done(s):this.connection.on("data",function(e){a._parseResponse(e.toString()).forEach(s)})};s.prototype.addDefaultEvents=function(){var e=this;this.connection.on("connect",function(){e.connected=!0}),this.connection.on("close",function(){e.connected=!1}),this.connection.on("error",function(){e._timeout()}),this.connection.on("end",function(){e._timeout()}),this.connection.on("timeout",function(){e._timeout()})},s.prototype._parseResponse=function(e){var t=this,r=[],n=e.replace(/\}[\n\r]?\{/g,"}|--|{").replace(/\}\][\n\r]?\[\{/g,"}]|--|[{").replace(/\}[\n\r]?\[\{/g,"}|--|[{").replace(/\}\][\n\r]?\{/g,"}]|--|{").split("|--|");return n.forEach(function(n){t.lastChunk&&(n=t.lastChunk+n);var e=null;try{e=JSON.parse(n)}catch(r){return t.lastChunk=n,clearTimeout(t.lastChunkTimeout),void(t.lastChunkTimeout=setTimeout(function(){throw t._timeout(),a.InvalidResponse(n)},15000))}clearTimeout(t.lastChunkTimeout),t.lastChunk=null,e&&r.push(e)}),r},s.prototype._addResponseCallback=function(e,t){var r=e.id||e[0].id,a=e.method||e[0].method;this.responseCallbacks[r]=t,this.responseCallbacks[r].method=a},s.prototype._timeout=function(){for(var e in this.responseCallbacks)this.responseCallbacks.hasOwnProperty(e)&&(this.responseCallbacks[e](a.InvalidConnection("on IPC")),delete this.responseCallbacks[e])},s.prototype.reconnect=function(){this.connection.connect({path:this.path})},s.prototype.send=function(e,t){this.connection.writable||this.connection.connect({path:this.path}),this.connection.write(JSON.stringify(e)),this._addResponseCallback(e,t)},s.prototype.on=function(e,t){if("function"!=typeof t)throw new Error("The second parameter callback must be a function.");switch(e){case"data":this.notificationCallbacks.push(t);break;default:this.connection.on(e,t);}},s.prototype.once=function(e,t){if("function"!=typeof t)throw new Error("The second parameter callback must be a function.");this.connection.once(e,t)},s.prototype.removeListener=function(e,t){var r=this;switch(e){case"data":this.notificationCallbacks.forEach(function(e,a){e===t&&r.notificationCallbacks.splice(a,1)});break;default:this.connection.removeListener(e,t);}},s.prototype.removeAllListeners=function(e){switch(e){case"data":this.notificationCallbacks=[];break;default:this.connection.removeAllListeners(e);}},s.prototype.reset=function(){this._timeout(),this.notificationCallbacks=[],this.connection.removeAllListeners("error"),this.connection.removeAllListeners("end"),this.connection.removeAllListeners("timeout"),this.addDefaultEvents()},t.exports=s},{oboe:150,underscore:221,"web3-core-helpers":231}],272:[function(e,t){(function(r){"use strict";var a=e("underscore"),n=e("web3-core-helpers").errors,s=null,i=null,o=null;if("undefined"!=typeof window&&"undefined"!=typeof window.WebSocket)s=window.WebSocket,i=btoa,o=function(e){return new URL(e)};else{s=e("websocket").w3cwebsocket,i=function(e){return r(e).toString("base64")};var d=e("url");if(d.URL){var p=d.URL;o=function(e){return new p(e)}}else o=e("url").parse}var c=function(e,t){var r=this;this.responseCallbacks={},this.notificationCallbacks=[],t=t||{},this._customTimeout=t.timeout;var n=o(e),d=t.headers||{},p=t.protocol||void 0;n.username&&n.password&&(d.authorization="Basic "+i(n.username+":"+n.password)),this.connection=new s(e,p,void 0,d),this.addDefaultEvents(),this.connection.onmessage=function(t){var e="string"==typeof t.data?t.data:"";r._parseResponse(e).forEach(function(e){var t=null;a.isArray(e)?e.forEach(function(e){r.responseCallbacks[e.id]&&(t=e.id)}):t=e.id,t||-1===e.method.indexOf("_subscription")?r.responseCallbacks[t]&&(r.responseCallbacks[t](null,e),delete r.responseCallbacks[t]):r.notificationCallbacks.forEach(function(t){a.isFunction(t)&&t(e)})})},Object.defineProperty(this,"connected",{get:function(){return this.connection&&this.connection.readyState===this.connection.OPEN},enumerable:!0})};c.prototype.addDefaultEvents=function(){var e=this;this.connection.onerror=function(){e._timeout()},this.connection.onclose=function(){e._timeout(),e.reset()}},c.prototype._parseResponse=function(e){var t=this,r=[],a=e.replace(/\}[\n\r]?\{/g,"}|--|{").replace(/\}\][\n\r]?\[\{/g,"}]|--|[{").replace(/\}[\n\r]?\[\{/g,"}|--|[{").replace(/\}\][\n\r]?\{/g,"}]|--|{").split("|--|");return a.forEach(function(a){t.lastChunk&&(a=t.lastChunk+a);var e=null;try{e=JSON.parse(a)}catch(r){return t.lastChunk=a,clearTimeout(t.lastChunkTimeout),void(t.lastChunkTimeout=setTimeout(function(){throw t._timeout(),n.InvalidResponse(a)},15000))}clearTimeout(t.lastChunkTimeout),t.lastChunk=null,e&&r.push(e)}),r},c.prototype._addResponseCallback=function(e,t){var r=e.id||e[0].id,a=e.method||e[0].method;this.responseCallbacks[r]=t,this.responseCallbacks[r].method=a;var s=this;this._customTimeout&&setTimeout(function(){s.responseCallbacks[r]&&(s.responseCallbacks[r](n.ConnectionTimeout(s._customTimeout)),delete s.responseCallbacks[r])},this._customTimeout)},c.prototype._timeout=function(){for(var e in this.responseCallbacks)this.responseCallbacks.hasOwnProperty(e)&&(this.responseCallbacks[e](n.InvalidConnection("on WS")),delete this.responseCallbacks[e])},c.prototype.send=function(e,t){var r=this;return this.connection.readyState===this.connection.CONNECTING?void setTimeout(function(){r.send(e,t)},10):this.connection.readyState===this.connection.OPEN?void(this.connection.send(JSON.stringify(e)),this._addResponseCallback(e,t)):(console.error("connection not open on send()"),"function"==typeof this.connection.onerror?this.connection.onerror(new Error("connection not open")):console.error("no error callback"),void t(new Error("connection not open")))},c.prototype.on=function(e,t){if("function"!=typeof t)throw new Error("The second parameter callback must be a function.");"data"===e?this.notificationCallbacks.push(t):"connect"===e?this.connection.onopen=t:"end"===e?this.connection.onclose=t:"error"===e?this.connection.onerror=t:void 0},c.prototype.removeListener=function(e,t){var r=this;"data"===e?this.notificationCallbacks.forEach(function(e,a){e===t&&r.notificationCallbacks.splice(a,1)}):void 0},c.prototype.removeAllListeners=function(e){switch(e){case"data":this.notificationCallbacks=[];break;case"connect":this.connection.onopen=null;break;case"end":this.connection.onclose=null;break;case"error":this.connection.onerror=null;break;default:}},c.prototype.reset=function(){this._timeout(),this.notificationCallbacks=[],this.addDefaultEvents()},t.exports=c}).call(this,e("buffer").Buffer)},{buffer:73,underscore:221,url:223,"web3-core-helpers":231,websocket:280}],273:[function(e,t){"use strict";var r=e("web3-core"),a=e("web3-core-subscriptions").subscriptions,n=e("web3-core-method"),s=e("web3-net"),i=function(){var e=this;r.packageInit(this,arguments);var t=this.setProvider;this.setProvider=function(){t.apply(e,arguments),e.net.setProvider.apply(e,arguments)},this.clearSubscriptions=e._requestManager.clearSubscriptions,this.net=new s(this.currentProvider),[new a({name:"subscribe",type:"shh",subscriptions:{messages:{params:1}}}),new n({name:"getVersion",call:"shh_version",params:0}),new n({name:"getInfo",call:"shh_info",params:0}),new n({name:"setMaxMessageSize",call:"shh_setMaxMessageSize",params:1}),new n({name:"setMinPoW",call:"shh_setMinPoW",params:1}),new n({name:"markTrustedPeer",call:"shh_markTrustedPeer",params:1}),new n({name:"newKeyPair",call:"shh_newKeyPair",params:0}),new n({name:"addPrivateKey",call:"shh_addPrivateKey",params:1}),new n({name:"deleteKeyPair",call:"shh_deleteKeyPair",params:1}),new n({name:"hasKeyPair",call:"shh_hasKeyPair",params:1}),new n({name:"getPublicKey",call:"shh_getPublicKey",params:1}),new n({name:"getPrivateKey",call:"shh_getPrivateKey",params:1}),new n({name:"newSymKey",call:"shh_newSymKey",params:0}),new n({name:"addSymKey",call:"shh_addSymKey",params:1}),new n({name:"generateSymKeyFromPassword",call:"shh_generateSymKeyFromPassword",params:1}),new n({name:"hasSymKey",call:"shh_hasSymKey",params:1}),new n({name:"getSymKey",call:"shh_getSymKey",params:1}),new n({name:"deleteSymKey",call:"shh_deleteSymKey",params:1}),new n({name:"newMessageFilter",call:"shh_newMessageFilter",params:1}),new n({name:"getFilterMessages",call:"shh_getFilterMessages",params:1}),new n({name:"deleteMessageFilter",call:"shh_deleteMessageFilter",params:1}),new n({name:"post",call:"shh_post",params:1,inputFormatter:[null]})].forEach(function(t){t.attachToObject(e),t.setRequestManager(e._requestManager)})};r.addProviders(i),t.exports=i},{"web3-core":241,"web3-core-method":232,"web3-core-subscriptions":238,"web3-net":269}],274:[function(e,t,r){arguments[4][115][0].apply(r,arguments)},{dup:115}],275:[function(e,t){var r=e("underscore"),a=e("ethjs-unit"),n=e("./utils.js"),s=e("./soliditySha3.js"),i=e("randomhex"),o=function(e){if(!n.isHexStrict(e))throw new Error("The parameter must be a valid HEX string.");var t="",r=0,a=e.length;for("0x"===e.substring(0,2)&&(r=2);rs.length?"0"+s:s}return"0x"+t},p=function(e){if(e=e?e.toLowerCase():"ether",!a.unitMap[e])throw new Error("This unit \""+e+"\" doesn't exist, please use the one of the following units"+JSON.stringify(a.unitMap,null,2));return e};t.exports={_fireError:function(e,t,a,n){return r.isObject(e)&&!(e instanceof Error)&&e.data&&((r.isObject(e.data)||r.isArray(e.data))&&(e.data=JSON.stringify(e.data,null,2)),e=e.message+"\n"+e.data),r.isString(e)&&(e=new Error(e)),r.isFunction(n)&&n(e),r.isFunction(a)&&((t&&r.isFunction(t.listeners)&&t.listeners("error").length||r.isFunction(n))&&t.catch(function(){}),setTimeout(function(){a(e)},1)),t&&r.isFunction(t.emit)&&setTimeout(function(){t.emit("error",e),t.removeAllListeners()},1),t},_jsonInterfaceMethodToString:function(e){if(r.isObject(e)&&e.name&&-1!==e.name.indexOf("("))return e.name;var t=e.inputs.map(function(e){return e.type}).join(",");return e.name+"("+t+")"},randomHex:i,_:r,BN:n.BN,isBN:n.isBN,isBigNumber:n.isBigNumber,isHex:n.isHex,isHexStrict:n.isHexStrict,sha3:n.sha3,keccak256:n.sha3,soliditySha3:s,isAddress:n.isAddress,checkAddressChecksum:n.checkAddressChecksum,toChecksumAddress:function(e){if("undefined"==typeof e)return"";if(!/^(0x)?[0-9a-f]{40}$/i.test(e))throw new Error("Given address \""+e+"\" is not a valid Ethereum address.");e=e.toLowerCase().replace(/^0x/i,"");for(var t=n.sha3(e).replace(/^0x/i,""),r="0x",a=0;ao||32o||256o)throw new Error("Supplied uint exceeds width: "+o+" vs "+p.bitLength());if(p.lt(new a(0)))throw new Error("Supplied uint "+p.toString()+" is negative");return o?n.leftPad(p.toString("hex"),2*(o/8)):p}if(e.startsWith("int")){if(o%8||8>o||256o)throw new Error("Supplied int exceeds width: "+o+" vs "+p.bitLength());return p.lt(new a(0))?p.toTwos(o).toString("hex"):o?n.leftPad(p.toString("hex"),2*(o/8)):p}throw new Error("Unsupported or invalid type: "+e)},c=function(e){if(r.isArray(e))throw new Error("Autodetection of array types is not supported.");var t="",s,i,d;if(r.isObject(e)&&(e.hasOwnProperty("v")||e.hasOwnProperty("t")||e.hasOwnProperty("value")||e.hasOwnProperty("type"))?(s=e.hasOwnProperty("t")?e.t:e.type,t=e.hasOwnProperty("v")?e.v:e.value):(s=n.toHex(e,!0),t=n.toHex(e),!s.startsWith("int")&&!s.startsWith("uint")&&(s="bytes")),(s.startsWith("int")||s.startsWith("uint"))&&"string"==typeof t&&!/^(-)?0x/i.test(t)&&(t=new a(t)),r.isArray(t))if(d=o(s),d&&t.length!==d)throw new Error(s+" is not matching the given array "+JSON.stringify(t));else d=t.length;return r.isArray(t)?(i=t.map(function(e){return p(s,e,d).toString("hex").replace("0x","")}),i.join("")):(i=p(s,t,d),i.toString("hex").replace("0x",""))};t.exports=function(){var e=Array.prototype.slice.call(arguments),t=r.map(e,c);return n.sha3("0x"+t.join(""))}},{"./utils.js":277,"bn.js":274,underscore:221}],277:[function(e,t){var r=e("underscore"),a=e("bn.js"),n=e("number-to-bn"),s=e("utf8"),i=e("eth-lib/lib/hash"),o=function(e){return e instanceof a||e&&e.constructor&&"BN"===e.constructor.name},d=function(e){return e&&e.constructor&&"BigNumber"===e.constructor.name},p=function(t){try{return n.apply(null,arguments)}catch(r){throw new Error(r+" Given value: \""+t+"\"")}},c=function(e){return!!/^(0x)?[0-9a-f]{40}$/i.test(e)&&(!!(/^(0x|0X)?[0-9a-f]{40}$/.test(e)||/^(0x|0X)?[0-9A-F]{40}$/.test(e))||l(e))},l=function(e){e=e.replace(/^0x/i,"");for(var t=g(e.toLowerCase()).replace(/^0x/i,""),r=0;40>r;r++)if(7=parseInt(t[r],16)&&e[r].toLowerCase()!==e[r])return!1;return!0},u=function(e){e=s.encode(e);var t="";e=e.replace(/^(?:\u0000)*/,""),e=e.split("").reverse().join(""),e=e.replace(/^(?:\u0000)*/,""),e=e.split("").reverse().join("");for(var r=0;ro.length?"0"+o:o}return"0x"+t},f=function(e){if(r.isNull(e)||r.isUndefined(e))return e;if(!isFinite(e)&&!b(e))throw new Error("Given input \""+e+"\" is not a number.");var t=p(e),n=t.toString(16);return t.lt(new a(0))?"-0x"+n.substr(1):"0x"+n},y=function(e){if(e=e.toString(16),!b(e))throw new Error("Given value \""+e+"\" is not a valid hex string.");e=e.replace(/^0x/i,"");for(var t=[],r=0;re?"int256":"uint256":f(e)},hexToBytes:y,bytesToHex:function(e){for(var t=[],r=0;r>>4).toString(16)),t.push((15&e[r]).toString(16));return"0x"+t.join("")},isHex:function(e){return(r.isString(e)||r.isNumber(e))&&/^(-0x|0x)?[0-9a-f]*$/i.test(e)},isHexStrict:b,leftPad:function(e,t,r){var a=/^0x/i.test(e)||"number"==typeof e;e=e.toString(16).replace(/^0x/i,"");var n=0<=t-e.length+1?t-e.length+1:0;return(a?"0x":"")+Array(n).join(r?r:"0")+e},rightPad:function(e,t,r){var a=/^0x/i.test(e)||"number"==typeof e;e=e.toString(16).replace(/^0x/i,"");var n=0<=t-e.length+1?t-e.length+1:0;return(a?"0x":"")+e+Array(n).join(r?r:"0")},toTwosComplement:function(e){return"0x"+p(e).toTwos(256).toString(16,64)},sha3:g}},{"bn.js":274,"eth-lib/lib/hash":113,"number-to-bn":148,underscore:221,utf8:225}],278:[function(e,t){t.exports={_from:"web3@^1.0.0-beta.34",_id:"web3@1.0.0-beta.35",_inBundle:!1,_integrity:"sha512-xwDmUhvTcHQvvNnOPcPZZgCxKUsI2e+GbHy7JkTK3/Rmnutazy8x7fsAXT9myw7V1qpi3GgLoZ3fkglSUbg1Mg==",_location:"/web3",_phantomChildren:{},_requested:{type:"range",registry:!0,raw:"web3@^1.0.0-beta.34",name:"web3",escapedName:"web3",rawSpec:"^1.0.0-beta.34",saveSpec:null,fetchSpec:"^1.0.0-beta.34"},_requiredBy:["/"],_resolved:"https://registry.npmjs.org/web3/-/web3-1.0.0-beta.35.tgz",_shasum:"6475095bd451a96e50a32b997ddee82279292f11",_spec:"web3@^1.0.0-beta.34",_where:"/Users/ChenYu/Documents/cryptape/projects/nervos/packages/nervos-chain",author:{name:"ethereum.org"},authors:[{name:"Fabian Vogelsteller",email:"fabian@ethereum.org",homepage:"http://frozeman.de"},{name:"Marek Kotewicz",email:"marek@parity.io",url:"https://github.com/debris"},{name:"Marian Oancea",url:"https://github.com/cubedro"},{name:"Gav Wood",email:"g@parity.io",homepage:"http://gavwood.com"},{name:"Jeffery Wilcke",email:"jeffrey.wilcke@ethereum.org",url:"https://github.com/obscuren"}],bugs:{url:"https://github.com/ethereum/web3.js/issues"},bundleDependencies:!1,dependencies:{"web3-bzz":"1.0.0-beta.35","web3-core":"1.0.0-beta.35","web3-eth":"1.0.0-beta.35","web3-eth-personal":"1.0.0-beta.35","web3-net":"1.0.0-beta.35","web3-shh":"1.0.0-beta.35","web3-utils":"1.0.0-beta.35"},deprecated:!1,description:"Ethereum JavaScript API",keywords:["Ethereum","JavaScript","API"],license:"LGPL-3.0",main:"src/index.js",name:"web3",namespace:"ethereum",repository:{type:"git",url:"https://github.com/ethereum/web3.js/tree/master/packages/web3"},types:"index.d.ts",version:"1.0.0-beta.35"}},{}],279:[function(e,t){"use strict";var r=e("../package.json").version,a=e("web3-core"),n=e("web3-eth"),s=e("web3-net"),i=e("web3-eth-personal"),o=e("web3-shh"),d=e("web3-bzz"),p=e("web3-utils"),c=function(){var e=this;a.packageInit(this,arguments),this.version=r,this.utils=p,this.eth=new n(this),this.shh=new o(this),this.bzz=new d(this);var t=this.setProvider;this.setProvider=function(r,a){return t.apply(e,arguments),this.eth.setProvider(r,a),this.shh.setProvider(r,a),this.bzz.setProvider(r),!0}};c.version=r,c.utils=p,c.modules={Eth:n,Net:s,Personal:i,Shh:o,Bzz:d},a.addProviders(c),t.exports=c},{"../package.json":278,"web3-bzz":228,"web3-core":241,"web3-eth":268,"web3-eth-personal":266,"web3-net":269,"web3-shh":273,"web3-utils":275}],280:[function(e,t){function r(e,t){var r;return r=t?new n(e,t):new n(e),r}var a=function(){return this||{}}(),n=a.WebSocket||a.MozWebSocket,s=e("./version");n&&["CONNECTING","OPEN","CLOSING","CLOSED"].forEach(function(e){Object.defineProperty(r,e,{get:function(){return n[e]}})}),t.exports={w3cwebsocket:n?r:null,version:s}},{"./version":281}],281:[function(e,t){t.exports=e("../package.json").version},{"../package.json":282}],282:[function(e,t){t.exports={_from:"git://github.com/frozeman/WebSocket-Node.git#browserifyCompatible",_id:"websocket@1.0.26",_inBundle:!1,_location:"/websocket",_phantomChildren:{},_requested:{type:"git",raw:"websocket@git://github.com/frozeman/WebSocket-Node.git#browserifyCompatible",name:"websocket",escapedName:"websocket",rawSpec:"git://github.com/frozeman/WebSocket-Node.git#browserifyCompatible",saveSpec:"git://github.com/frozeman/WebSocket-Node.git#browserifyCompatible",fetchSpec:"git://github.com/frozeman/WebSocket-Node.git",gitCommittish:"browserifyCompatible"},_requiredBy:["/web3-providers-ws"],_resolved:"git://github.com/frozeman/WebSocket-Node.git#6c72925e3f8aaaea8dc8450f97627e85263999f2",_spec:"websocket@git://github.com/frozeman/WebSocket-Node.git#browserifyCompatible",_where:"/Users/ChenYu/Documents/cryptape/projects/nervos/packages/nervos-chain/node_modules/web3-providers-ws",author:{name:"Brian McKelvey",email:"brian@worlize.com",url:"https://www.worlize.com/"},browser:"lib/browser.js",bugs:{url:"https://github.com/theturtle32/WebSocket-Node/issues"},bundleDependencies:!1,config:{verbose:!1},contributors:[{name:"I\xF1aki Baz Castillo",email:"ibc@aliax.net",url:"http://dev.sipdoc.net"}],dependencies:{debug:"^2.2.0",nan:"^2.3.3","typedarray-to-buffer":"^3.1.2",yaeti:"^0.0.6"},deprecated:!1,description:"Websocket Client & Server Library implementing the WebSocket protocol as specified in RFC 6455.",devDependencies:{"buffer-equal":"^1.0.0",faucet:"^0.0.1",gulp:"git+https://github.com/gulpjs/gulp.git#4.0","gulp-jshint":"^2.0.4",jshint:"^2.0.0","jshint-stylish":"^2.2.1",tape:"^4.0.1"},directories:{lib:"./lib"},engines:{node:">=0.10.0"},homepage:"https://github.com/theturtle32/WebSocket-Node",keywords:["websocket","websockets","socket","networking","comet","push","RFC-6455","realtime","server","client"],license:"Apache-2.0",main:"index",name:"websocket",repository:{type:"git",url:"git+https://github.com/theturtle32/WebSocket-Node.git"},scripts:{gulp:"gulp",install:"(node-gyp rebuild 2> builderror.log) || (exit 0)",test:"faucet test/unit"},version:"1.0.26"}},{}],283:[function(e,t){var r=e("xhr-request");t.exports=function(e,t){return new Promise(function(a,n){r(e,t,function(e,t){e?n(e):a(t)})})}},{"xhr-request":284}],284:[function(e,t){var r=e("query-string"),a=e("url-set-query"),n=e("object-assign"),s=e("./lib/ensure-header.js"),i=e("./lib/request.js"),o=function(){};t.exports=function(e,t,d){if(!e||"string"!=typeof e)throw new TypeError("must specify a URL");if("function"==typeof t&&(d=t,t={}),d&&"function"!=typeof d)throw new TypeError("expected cb to be undefined or a function");d=d||o,t=t||{};var p=t.json?"json":"text";t=n({responseType:p},t);var c=t.headers||{},l=(t.method||"GET").toUpperCase(),u=t.query;return u&&("string"!=typeof u&&(u=r.stringify(u)),e=a(e,u)),"json"===t.responseType&&s(c,"Accept","application/json"),t.json&&"GET"!==l&&"HEAD"!==l&&(s(c,"Content-Type","application/json"),t.body=JSON.stringify(t.body)),t.method=l,t.url=e,t.headers=c,delete t.query,delete t.json,i(t,d)}},{"./lib/ensure-header.js":285,"./lib/request.js":287,"object-assign":149,"query-string":171,"url-set-query":222}],285:[function(e,t){t.exports=function(e,t,r){var a=t.toLowerCase();e[t]||e[a]||(e[t]=r)}},{}],286:[function(e,t){t.exports=function(e,t){return t?{statusCode:t.statusCode,headers:t.headers,method:e.method,url:e.url,rawRequest:t.rawRequest?t.rawRequest:t}:null}},{}],287:[function(e,t){var r=e("xhr"),a=e("./normalize-response"),n=function(){};t.exports=function(e,t){delete e.uri;var s=!1;"json"===e.responseType&&(e.responseType="text",s=!0);var i=r(e,function(r,i,o){if(s&&!r)try{var d=i.rawRequest.responseText;o=JSON.parse(d)}catch(t){r=t}i=a(e,i),r?t(r,null,i):t(r,o,i),t=n}),o=i.onabort;return i.onabort=function(){var e=o.apply(i,Array.prototype.slice.call(arguments));return t(new Error("XHR Aborted")),t=n,e},i}},{"./normalize-response":286,xhr:288}],288:[function(e,t){"use strict";function r(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}function a(e,t,r){var a=e;return d(t)?(r=t,"string"==typeof e&&(a={uri:e})):a=c(t,{uri:e}),a.callback=r,a}function n(e,t,r){return t=a(e,t,r),s(t)}function s(e){function t(){4===l.readyState&&setTimeout(o,0)}function a(){var e;if(e=l.response?l.response:l.responseText||i(l),h)try{e=JSON.parse(e)}catch(t){}return e}function s(e){return clearTimeout(w),e instanceof Error||(e=new Error(""+(e||"Unknown XMLHttpRequest Error"))),e.statusCode=0,c(e,m)}function o(){if(!v){var t;clearTimeout(w),t=e.useXDR&&void 0===l.status?200:1223===l.status?204:l.status;var r=m,n=null;return 0===t?n=new Error("Internal XMLHttpRequest Error"):(r={body:a(),statusCode:t,method:f,headers:{},url:u,rawRequest:l},l.getAllResponseHeaders&&(r.headers=p(l.getAllResponseHeaders()))),c(n,r,r.body)}}if("undefined"==typeof e.callback)throw new Error("callback argument missing");var d=!1,c=function(t,r,a){d||(d=!0,e.callback(t,r,a))},l=e.xhr||null;l||(e.cors||e.useXDR?l=new n.XDomainRequest:l=new n.XMLHttpRequest);var u=l.url=e.uri||e.url,f=l.method=e.method||"GET",y=e.body||e.data,b=l.headers=e.headers||{},g=!!e.sync,h=!1,m={body:void 0,headers:{},statusCode:0,method:f,url:u,rawRequest:l},_,v,w;if("json"in e&&!1!==e.json&&(h=!0,b.accept||b.Accept||(b.Accept="application/json"),"GET"!==f&&"HEAD"!==f&&(b["content-type"]||b["Content-Type"]||(b["Content-Type"]="application/json"),y=JSON.stringify(!0===e.json?y:e.json))),l.onreadystatechange=t,l.onload=o,l.onerror=s,l.onprogress=function(){},l.onabort=function(){v=!0},l.ontimeout=s,l.open(f,u,!g,e.username,e.password),g||(l.withCredentials=!!e.withCredentials),!g&&0r||this.listeners[e].splice(r,1)}},e.prototype.dispatchEvent=function(e){var t=e.type.toLowerCase();if(e.target=this,this.listeners[t])for(var r=0,a=this.listeners[t],n;ra.randomHex(5),r.hex2bytes=e=>a.hexToBytes(e.startsWith("0x")?e:"0x"+e),r.bytes2hex=e=>a.bytesToHex(e);r.default=({privateKey:e,data:o="",nonce:d=r.getNonce(),quota:s,validUntilBlock:i,value:p="",version:c=0,chainId:l=1,to:u=""},f)=>{if(!e&&!f)return console.warn("No private key found"),{data:o,nonce:d,quota:s,validUntilBlock:i,value:p,version:c,chainId:l,to:u};const y=new n.Transaction;if(void 0===d?y.setNonce(r.getNonce()):y.setNonce(d),0t.from(e,"base64");r.default=e=>{const r=a.hex2bytes(e),o=s.UnverifiedTransaction.deserializeBinary(r),d=o.getTransaction(),p=o.getSignature(),c=o.getCrypto(),l=s.Transaction.toObject(!0,d);l.value=i(l.value),l.data=i(l.data);const u=new n({r:a.bytes2hex(p.slice(0,32)).slice(2),s:a.bytes2hex(p.slice(32,64)).slice(2),recoveryParam:p[64]}),f=d.serializeBinary(),y=a.sha3(f).slice(2),b=new t(y.toString(),"hex"),g=a.ec.recoverPubKey(b,u,u.recoveryParam,"hex"),h=g.encode("hex").slice(2).toLowerCase(),m=new t(a.hex2bytes(h)),_=a.sha3(m).slice(-40).toLowerCase(),v=a.bytes2hex(p).slice(2);return{transaction:l,signature:v,crypto:c,sender:{publicKey:h,address:_}}}}).call(this,e("buffer").Buffer)},{"../proto-js/blockchain_pb":501,"./index":296,buffer:73,"elliptic/lib/elliptic/ec/signature":372}],298:[function(e,t,r){arguments[4][23][0].apply(r,arguments)},{"./register":300,dup:23}],299:[function(e,t,r){arguments[4][24][0].apply(r,arguments)},{dup:24}],300:[function(e,t,r){arguments[4][25][0].apply(r,arguments)},{"./loader":299,dup:25}],301:[function(e,t,r){arguments[4][26][0].apply(r,arguments)},{"./asn1/api":302,"./asn1/base":304,"./asn1/constants":308,"./asn1/decoders":310,"./asn1/encoders":313,"bn.js":315,dup:26}],302:[function(e,t,r){arguments[4][27][0].apply(r,arguments)},{"../asn1":301,dup:27,inherits:399,vm:227}],303:[function(e,t,r){arguments[4][28][0].apply(r,arguments)},{"../base":304,buffer:73,dup:28,inherits:399}],304:[function(e,t,r){arguments[4][29][0].apply(r,arguments)},{"./buffer":303,"./node":305,"./reporter":306,dup:29}],305:[function(e,t,r){arguments[4][30][0].apply(r,arguments)},{"../base":304,dup:30,"minimalistic-assert":403}],306:[function(e,t,r){arguments[4][31][0].apply(r,arguments)},{dup:31,inherits:399}],307:[function(e,t,r){arguments[4][32][0].apply(r,arguments)},{"../constants":308,dup:32}],308:[function(e,t,r){arguments[4][33][0].apply(r,arguments)},{"./der":307,dup:33}],309:[function(e,t,r){arguments[4][34][0].apply(r,arguments)},{"../../asn1":301,dup:34,inherits:399}],310:[function(e,t,r){arguments[4][35][0].apply(r,arguments)},{"./der":309,"./pem":311,dup:35}],311:[function(e,t,r){arguments[4][36][0].apply(r,arguments)},{"./der":309,buffer:73,dup:36,inherits:399}],312:[function(e,t,r){arguments[4][37][0].apply(r,arguments)},{"../../asn1":301,buffer:73,dup:37,inherits:399}],313:[function(e,t,r){arguments[4][38][0].apply(r,arguments)},{"./der":312,"./pem":314,dup:38}],314:[function(e,t,r){arguments[4][39][0].apply(r,arguments)},{"./der":312,dup:39,inherits:399}],315:[function(e,t,r){arguments[4][41][0].apply(r,arguments)},{buffer:43,dup:41}],316:[function(e,t,r){arguments[4][42][0].apply(r,arguments)},{crypto:43,dup:42}],317:[function(e,t,r){arguments[4][44][0].apply(r,arguments)},{dup:44,"safe-buffer":430}],318:[function(e,t,r){arguments[4][45][0].apply(r,arguments)},{"./aes":317,"./ghash":322,"./incr32":323,"buffer-xor":344,"cipher-base":345,dup:45,inherits:399,"safe-buffer":430}],319:[function(e,t,r){arguments[4][46][0].apply(r,arguments)},{"./decrypter":320,"./encrypter":321,"./modes/list.json":331,dup:46}],320:[function(e,t,r){arguments[4][47][0].apply(r,arguments)},{"./aes":317,"./authCipher":318,"./modes":330,"./streamCipher":333,"cipher-base":345,dup:47,evp_bytestokey:383,inherits:399,"safe-buffer":430}],321:[function(e,t,r){arguments[4][48][0].apply(r,arguments)},{"./aes":317,"./authCipher":318,"./modes":330,"./streamCipher":333,"cipher-base":345,dup:48,evp_bytestokey:383,inherits:399,"safe-buffer":430}],322:[function(e,t,r){arguments[4][49][0].apply(r,arguments)},{dup:49,"safe-buffer":430}],323:[function(e,t,r){arguments[4][50][0].apply(r,arguments)},{dup:50}],324:[function(e,t,r){arguments[4][51][0].apply(r,arguments)},{"buffer-xor":344,dup:51}],325:[function(e,t,r){arguments[4][52][0].apply(r,arguments)},{"buffer-xor":344,dup:52,"safe-buffer":430}],326:[function(e,t,r){arguments[4][53][0].apply(r,arguments)},{dup:53,"safe-buffer":430}],327:[function(e,t,r){arguments[4][54][0].apply(r,arguments)},{dup:54,"safe-buffer":430}],328:[function(e,t,r){arguments[4][55][0].apply(r,arguments)},{"../incr32":323,"buffer-xor":344,dup:55,"safe-buffer":430}],329:[function(e,t,r){arguments[4][56][0].apply(r,arguments)},{dup:56}],330:[function(e,t,r){arguments[4][57][0].apply(r,arguments)},{"./cbc":324,"./cfb":325,"./cfb1":326,"./cfb8":327,"./ctr":328,"./ecb":329,"./list.json":331,"./ofb":332,dup:57}],331:[function(e,t,r){arguments[4][58][0].apply(r,arguments)},{dup:58}],332:[function(e,t,r){arguments[4][59][0].apply(r,arguments)},{buffer:73,"buffer-xor":344,dup:59}],333:[function(e,t,r){arguments[4][60][0].apply(r,arguments)},{"./aes":317,"cipher-base":345,dup:60,inherits:399,"safe-buffer":430}],334:[function(e,t,r){arguments[4][61][0].apply(r,arguments)},{"browserify-aes/browser":319,"browserify-aes/modes":330,"browserify-des":335,"browserify-des/modes":336,dup:61,evp_bytestokey:383}],335:[function(e,t,r){arguments[4][62][0].apply(r,arguments)},{"cipher-base":345,"des.js":353,dup:62,inherits:399,"safe-buffer":430}],336:[function(e,t,r){arguments[4][63][0].apply(r,arguments)},{dup:63}],337:[function(e,t,r){arguments[4][64][0].apply(r,arguments)},{"bn.js":315,buffer:73,dup:64,randombytes:424}],338:[function(e,t,r){arguments[4][65][0].apply(r,arguments)},{"./browser/algorithms.json":339,dup:65}],339:[function(e,t,r){arguments[4][66][0].apply(r,arguments)},{dup:66}],340:[function(e,t,r){arguments[4][67][0].apply(r,arguments)},{dup:67}],341:[function(e,t,r){arguments[4][68][0].apply(r,arguments)},{"./algorithms.json":339,"./sign":342,"./verify":343,buffer:73,"create-hash":348,dup:68,inherits:399,stream:205}],342:[function(e,t,r){arguments[4][69][0].apply(r,arguments)},{"./curves.json":340,"bn.js":315,"browserify-rsa":337,buffer:73,"create-hmac":350,dup:69,elliptic:363,"parse-asn1":412}],343:[function(e,t,r){arguments[4][70][0].apply(r,arguments)},{"./curves.json":340,"bn.js":315,buffer:73,dup:70,elliptic:363,"parse-asn1":412}],344:[function(e,t,r){arguments[4][72][0].apply(r,arguments)},{buffer:73,dup:72}],345:[function(e,t,r){arguments[4][75][0].apply(r,arguments)},{dup:75,inherits:399,"safe-buffer":430,stream:205,string_decoder:211}],346:[function(e,t,r){arguments[4][76][0].apply(r,arguments)},{dup:76}],347:[function(e,t,r){arguments[4][78][0].apply(r,arguments)},{"bn.js":315,buffer:73,dup:78,elliptic:363}],348:[function(e,t,r){arguments[4][79][0].apply(r,arguments)},{"cipher-base":345,dup:79,inherits:399,"md5.js":401,ripemd160:429,"sha.js":434}],349:[function(e,t,r){arguments[4][80][0].apply(r,arguments)},{dup:80,"md5.js":401}],350:[function(e,t,r){arguments[4][81][0].apply(r,arguments)},{"./legacy":351,"cipher-base":345,"create-hash/md5":349,dup:81,inherits:399,ripemd160:429,"safe-buffer":430,"sha.js":434}],351:[function(e,t,r){arguments[4][82][0].apply(r,arguments)},{"cipher-base":345,dup:82,inherits:399,"safe-buffer":430}],352:[function(e,t,r){arguments[4][83][0].apply(r,arguments)},{"browserify-cipher":334,"browserify-sign":341,"browserify-sign/algos":338,"create-ecdh":347,"create-hash":348,"create-hmac":350,"diffie-hellman":359,dup:83,pbkdf2:413,"public-encrypt":418,randombytes:424,randomfill:425}],353:[function(e,t,r){arguments[4][85][0].apply(r,arguments)},{"./des/cbc":354,"./des/cipher":355,"./des/des":356,"./des/ede":357,"./des/utils":358,dup:85}],354:[function(e,t,r){arguments[4][86][0].apply(r,arguments)},{dup:86,inherits:399,"minimalistic-assert":403}],355:[function(e,t,r){arguments[4][87][0].apply(r,arguments)},{dup:87,"minimalistic-assert":403}],356:[function(e,t,r){arguments[4][88][0].apply(r,arguments)},{"../des":353,dup:88,inherits:399,"minimalistic-assert":403}],357:[function(e,t,r){arguments[4][89][0].apply(r,arguments)},{"../des":353,dup:89,inherits:399,"minimalistic-assert":403}],358:[function(e,t,r){arguments[4][90][0].apply(r,arguments)},{dup:90}],359:[function(e,t,r){arguments[4][91][0].apply(r,arguments)},{"./lib/dh":360,"./lib/generatePrime":361,"./lib/primes.json":362,buffer:73,dup:91}],360:[function(e,t,r){arguments[4][92][0].apply(r,arguments)},{"./generatePrime":361,"bn.js":315,buffer:73,dup:92,"miller-rabin":402,randombytes:424}],361:[function(e,t,r){arguments[4][93][0].apply(r,arguments)},{"bn.js":315,dup:93,"miller-rabin":402,randombytes:424}],362:[function(e,t,r){arguments[4][94][0].apply(r,arguments)},{dup:94}],363:[function(e,t,r){arguments[4][95][0].apply(r,arguments)},{"../package.json":378,"./elliptic/curve":366,"./elliptic/curves":369,"./elliptic/ec":370,"./elliptic/eddsa":373,"./elliptic/utils":377,brorand:316,dup:95}],364:[function(e,t,r){arguments[4][96][0].apply(r,arguments)},{"../../elliptic":363,"bn.js":315,dup:96}],365:[function(e,t,r){arguments[4][97][0].apply(r,arguments)},{"../../elliptic":363,"../curve":366,"bn.js":315,dup:97,inherits:399}],366:[function(e,t,r){arguments[4][98][0].apply(r,arguments)},{"./base":364,"./edwards":365,"./mont":367,"./short":368,dup:98}],367:[function(e,t,r){arguments[4][99][0].apply(r,arguments)},{"../../elliptic":363,"../curve":366,"bn.js":315,dup:99,inherits:399}],368:[function(e,t,r){arguments[4][100][0].apply(r,arguments)},{"../../elliptic":363,"../curve":366,"bn.js":315,dup:100,inherits:399}],369:[function(e,t,r){arguments[4][101][0].apply(r,arguments)},{"../elliptic":363,"./precomputed/secp256k1":376,dup:101,"hash.js":386}],370:[function(e,t,r){arguments[4][102][0].apply(r,arguments)},{"../../elliptic":363,"./key":371,"./signature":372,"bn.js":315,dup:102,"hmac-drbg":398}],371:[function(e,t,r){arguments[4][103][0].apply(r,arguments)},{"../../elliptic":363,"bn.js":315,dup:103}],372:[function(e,t,r){arguments[4][104][0].apply(r,arguments)},{"../../elliptic":363,"bn.js":315,dup:104}],373:[function(e,t,r){arguments[4][105][0].apply(r,arguments)},{"../../elliptic":363,"./key":374,"./signature":375,dup:105,"hash.js":386}],374:[function(e,t,r){arguments[4][106][0].apply(r,arguments)},{"../../elliptic":363,dup:106}],375:[function(e,t,r){arguments[4][107][0].apply(r,arguments)},{"../../elliptic":363,"bn.js":315,dup:107}],376:[function(e,t,r){arguments[4][108][0].apply(r,arguments)},{dup:108}],377:[function(e,t,r){arguments[4][109][0].apply(r,arguments)},{"bn.js":315,dup:109,"minimalistic-assert":403,"minimalistic-crypto-utils":404}],378:[function(e,t){t.exports={_from:"elliptic@^6.4.0",_id:"elliptic@6.4.1",_inBundle:!1,_integrity:"sha512-BsXLz5sqX8OHcsh7CqBMztyXARmGQ3LWPtGjJi6DiJHq5C/qvi9P3OqgswKSDftbu8+IoI/QDTAm2fFnQ9SZSQ==",_location:"/elliptic",_phantomChildren:{},_requested:{type:"range",registry:!0,raw:"elliptic@^6.4.0",name:"elliptic",escapedName:"elliptic",rawSpec:"^6.4.0",saveSpec:null,fetchSpec:"^6.4.0"},_requiredBy:["/","/browserify-sign","/create-ecdh","/eth-lib","/web3-eth-accounts/eth-lib"],_resolved:"https://registry.npmjs.org/elliptic/-/elliptic-6.4.1.tgz",_shasum:"c2d0b7776911b86722c632c3c06c60f2f819939a",_spec:"elliptic@^6.4.0",_where:"/Users/ChenYu/Documents/cryptape/projects/nervos/packages/nervos-signer",author:{name:"Fedor Indutny",email:"fedor@indutny.com"},bugs:{url:"https://github.com/indutny/elliptic/issues"},bundleDependencies:!1,dependencies:{"bn.js":"^4.4.0",brorand:"^1.0.1","hash.js":"^1.0.0","hmac-drbg":"^1.0.0",inherits:"^2.0.1","minimalistic-assert":"^1.0.0","minimalistic-crypto-utils":"^1.0.0"},deprecated:!1,description:"EC cryptography",devDependencies:{brfs:"^1.4.3",coveralls:"^2.11.3",grunt:"^0.4.5","grunt-browserify":"^5.0.0","grunt-cli":"^1.2.0","grunt-contrib-connect":"^1.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^1.0.1","grunt-mocha-istanbul":"^3.0.1","grunt-saucelabs":"^8.6.2",istanbul:"^0.4.2",jscs:"^2.9.0",jshint:"^2.6.0",mocha:"^2.1.0"},files:["lib"],homepage:"https://github.com/indutny/elliptic",keywords:["EC","Elliptic","curve","Cryptography"],license:"MIT",main:"lib/elliptic.js",name:"elliptic",repository:{type:"git",url:"git+ssh://git@github.com/indutny/elliptic.git"},scripts:{jscs:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",jshint:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",lint:"npm run jscs && npm run jshint",test:"npm run lint && npm run unit",unit:"istanbul test _mocha --reporter=spec test/index.js",version:"grunt dist && git add dist/"},version:"6.4.1"}},{}],379:[function(e,t,r){arguments[4][113][0].apply(r,arguments)},{dup:113}],380:[function(e,t,r){arguments[4][114][0].apply(r,arguments)},{"bn.js":381,dup:114,"number-to-bn":406}],381:[function(e,t,r){arguments[4][115][0].apply(r,arguments)},{dup:115}],382:[function(e,t,r){arguments[4][116][0].apply(r,arguments)},{dup:116}],383:[function(e,t,r){arguments[4][118][0].apply(r,arguments)},{dup:118,"md5.js":401,"safe-buffer":430}],384:[function(require,module,exports){var _Mathabs=Math.abs,_MathLN=Math.LN2,_Mathlog=Math.log,_Mathfloor4=Math.floor,_Mathsqrt=Math.sqrt,_Mathpow3=Math.pow,_Mathmax7=Math.max,_Mathmin5=Math.min,_StringfromCharCode3=String.fromCharCode,_Mathround4=Math.round;(function(global,Buffer){var _Stringprototype=String.prototype,_Mathexp=Math.exp,$jscomp={scope:{},getGlobal:function(e){return"undefined"!=typeof window&&window===e?e:"undefined"==typeof global?e:global}};$jscomp.global=$jscomp.getGlobal(this),$jscomp.initSymbol=function(){$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol),$jscomp.initSymbol=function(){}},$jscomp.symbolCounter_=0,$jscomp.Symbol=function(e){return"jscomp_symbol_"+e+$jscomp.symbolCounter_++},$jscomp.initSymbolIterator=function(){$jscomp.initSymbol(),$jscomp.global.Symbol.iterator||($jscomp.global.Symbol.iterator=$jscomp.global.Symbol("iterator")),$jscomp.initSymbolIterator=function(){}},$jscomp.makeIterator=function(e){$jscomp.initSymbolIterator(),$jscomp.initSymbol(),$jscomp.initSymbolIterator();var t=e[Symbol.iterator];if(t)return t.call(e);var r=0;return{next:function(){return rt;)--r in this?this[--e]=this[r]:delete this[e];return this},$jscomp.array.copyWithin$install=function(){$jscomp.array.installHelper_("copyWithin",$jscomp.array.copyWithin)},$jscomp.array.fill=function(e,t,r){var a=this.length||0;for(0>t&&(t=_Mathmax7(0,a+t)),(null==r||r>a)&&(r=a),r=+r,0>r&&(r=_Mathmax7(0,a+r)),t=+(t||0);t>>0,0===e)return 32;var t=0;return 0==(4294901760&e)&&(e<<=16,t+=16),0==(4278190080&e)&&(e<<=8,t+=8),0==(4026531840&e)&&(e<<=4,t+=4),0==(3221225472&e)&&(e<<=2,t+=2),0==(2147483648&e)&&t++,t},$jscomp.math.imul=function(e,t){e=+e,t=+t;var r=65535&e,n=65535&t;return 0|r*n+((65535&e>>>16)*n+r*(65535&t>>>16)<<16>>>0)},$jscomp.math.sign=function(e){return e=+e,0===e||isNaN(e)?e:0t&&-.25t&&-.25e?-t:t},$jscomp.math.acosh=function(e){return e=+e,_Mathlog(e+_Mathsqrt(e*e-1))},$jscomp.math.asinh=function(e){if(e=+e,0===e)return e;var t=_Mathlog(_Mathabs(e)+_Mathsqrt(e*e+1));return 0>e?-t:t},$jscomp.math.atanh=function(e){return e=+e,($jscomp.math.log1p(e)-$jscomp.math.log1p(-e))/2},$jscomp.math.hypot=function(t,r){t=+t,r=+r;var n=_Mathmax7(_Mathabs(t),_Mathabs(r)),s,i,o;for(s=2;sn){for(t/=n,r/=n,o=t*t+r*r,s=2;se?-t:t},$jscomp.math.cbrt=function(e){if(0===e)return e;e=+e;var t=_Mathpow3(_Mathabs(e),1/3);return 0>e?-t:t},$jscomp.number=$jscomp.number||{},$jscomp.number.isFinite=function(e){return!("number"!=typeof e)&&!isNaN(e)&&1/0!==e&&-Infinity!==e},$jscomp.number.isInteger=function(e){return!!$jscomp.number.isFinite(e)&&e===_Mathfloor4(e)},$jscomp.number.isNaN=function(e){return"number"==typeof e&&isNaN(e)},$jscomp.number.isSafeInteger=function(e){return $jscomp.number.isInteger(e)&&_Mathabs(e)<=$jscomp.number.MAX_SAFE_INTEGER},$jscomp.number.EPSILON=function(){return 2.220446049250313e-16}(),$jscomp.number.MAX_SAFE_INTEGER=function(){return 9007199254740991}(),$jscomp.number.MIN_SAFE_INTEGER=function(){return-9007199254740991}(),$jscomp.object=$jscomp.object||{},$jscomp.object.assign=function(t){for(var r=1,a;rr||1114111=r?e+=_StringfromCharCode3(r):(r-=65536,e+=_StringfromCharCode3(55296|1023&r>>>10),e+=_StringfromCharCode3(56320|1023&r))}return e},$jscomp.string.repeat=function(e){var t=$jscomp.checkStringArgs(this,null,"repeat");if(0>e||1342177279>>=1)&&(t+=t);return r},$jscomp.string.repeat$install=function(){_Stringprototype.repeat||(_Stringprototype.repeat=$jscomp.string.repeat)},$jscomp.string.codePointAt=function(e){var t=$jscomp.checkStringArgs(this,null,"codePointAt"),r=t.length;if(e=+e||0,0<=e&&en||56319e||57343=i},$jscomp.string.startsWith$install=function(){_Stringprototype.startsWith||(_Stringprototype.startsWith=$jscomp.string.startsWith)},$jscomp.string.endsWith=function(t,r){var n=$jscomp.checkStringArgs(this,t,"endsWith");t+="",void 0===r&&(r=n.length);for(var s=_Mathmax7(0,_Mathmin5(0|r,n.length)),i=t.length;0=i},$jscomp.string.endsWith$install=function(){_Stringprototype.endsWith||(_Stringprototype.endsWith=$jscomp.string.endsWith)};var COMPILED=!0,goog=goog||{};goog.global=this,goog.isDef=function(e){return void 0!==e},goog.exportPath_=function(e,t,r){e=e.split("."),r=r||goog.global,e[0]in r||!r.execScript||r.execScript("var "+e[0]);for(var n;e.length&&(n=e.shift());)!e.length&&goog.isDef(t)?r[n]=t:r=r[n]?r[n]:r[n]={}},goog.define=function(e,t){!0,goog.exportPath_(e,t)},goog.DEBUG=!0,goog.LOCALE="en",goog.TRUSTED_SITE=!0,goog.STRICT_MODE_COMPATIBLE=!1,goog.DISALLOW_TEST_ONLY_CODE=!goog.DEBUG,goog.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING=!1,goog.provide=function(e){goog.constructNamespace_(e)},goog.constructNamespace_=function(e,t){goog.exportPath_(e,t)},goog.VALID_MODULE_RE_=/^[a-zA-Z_$][a-zA-Z0-9._$]*$/,goog.module=function(e){if(!goog.isString(e)||!e||-1==e.search(goog.VALID_MODULE_RE_))throw Error("Invalid module identifier");if(!goog.isInModuleLoader_())throw Error("Module "+e+" has been loaded incorrectly.");if(goog.moduleLoaderState_.moduleName)throw Error("goog.module may only be called once per module.");goog.moduleLoaderState_.moduleName=e},goog.module.get=function(e){return goog.module.getInternal_(e)},goog.module.getInternal_=function(){},goog.moduleLoaderState_=null,goog.isInModuleLoader_=function(){return null!=goog.moduleLoaderState_},goog.module.declareLegacyNamespace=function(){goog.moduleLoaderState_.declareLegacyNamespace=!0},goog.setTestOnly=function(e){if(goog.DISALLOW_TEST_ONLY_CODE)throw e=e||"",Error("Importing test-only code into non-debug environment"+(e?": "+e:"."))},goog.forwardDeclare=function(){},!0,goog.getObjectByName=function(t,r){for(var a=t.split("."),n=r||goog.global,s;s=a.shift();)if(goog.isDefAndNotNull(n[s]))n=n[s];else return null;return n},goog.globalize=function(e,t){var r=t||goog.global,a;for(a in e)r[a]=e[a]},goog.addDependency=function(t,r,n,s){if(goog.DEPENDENCIES_ENABLED){var i;t=t.replace(/\\/g,"/");for(var o=goog.dependencies_,p=0;i=r[p];p++)o.nameToPath[i]=t,o.pathIsModule[t]=!!s;for(s=0;r=n[s];s++)t in o.requires||(o.requires[t]={}),o.requires[t][r]=!0}},goog.ENABLE_DEBUG_LOADER=!0,goog.logToConsole_=function(e){goog.global.console&&goog.global.console.error(e)},goog.require=function(){},goog.basePath="",goog.nullFunction=function(){},goog.abstractMethod=function(){throw Error("unimplemented abstract method")},goog.addSingletonGetter=function(e){e.getInstance=function(){return e.instance_?e.instance_:(goog.DEBUG&&(goog.instantiatedSingletons_[goog.instantiatedSingletons_.length]=e),e.instance_=new e)}},goog.instantiatedSingletons_=[],goog.LOAD_MODULE_USING_EVAL=!0,goog.SEAL_MODULE_EXPORTS=goog.DEBUG,goog.loadedModules_={},goog.DEPENDENCIES_ENABLED=!1,goog.DEPENDENCIES_ENABLED&&(goog.dependencies_={pathIsModule:{},nameToPath:{},requires:{},visited:{},written:{},deferred:{}},goog.inHtmlDocument_=function(){var e=goog.global.document;return null!=e&&"write"in e},goog.findBasePath_=function(){if(goog.isDef(goog.global.CLOSURE_BASE_PATH))goog.basePath=goog.global.CLOSURE_BASE_PATH;else if(goog.inHtmlDocument_())for(var e=goog.global.document.getElementsByTagName("SCRIPT"),t=e.length-1;0<=t;--t){var r=e[t].src,a=r.lastIndexOf("?"),a=-1==a?r.length:a;if("base.js"==r.substr(a-7,7)){goog.basePath=r.substr(0,a-7);break}}},goog.importScript_=function(e,t){(goog.global.CLOSURE_IMPORT_SCRIPT||goog.writeScriptTag_)(e,t)&&(goog.dependencies_.written[e]=!0)},goog.IS_OLD_IE_=!goog.global.atob&&goog.global.document&&goog.global.document.all,goog.importModule_=function(e){goog.importScript_("","goog.retrieveAndExecModule_(\""+e+"\");")&&(goog.dependencies_.written[e]=!0)},goog.queuedModules_=[],goog.wrapModule_=function(e,t){return goog.LOAD_MODULE_USING_EVAL&&goog.isDef(goog.global.JSON)?"goog.loadModule("+goog.global.JSON.stringify(t+"\n//# sourceURL="+e+"\n")+");":"goog.loadModule(function(exports) {\"use strict\";"+t+"\n;return exports});\n//# sourceURL="+e+"\n"},goog.loadQueuedModules_=function(){var e=goog.queuedModules_.length;if(0")},goog.appendScriptSrcNode_=function(e){var t=goog.global.document,r=t.createElement("script");r.type="text/javascript",r.src=e,r.defer=!1,r.async=!1,t.head.appendChild(r)},goog.writeScriptTag_=function(e,t){if(goog.inHtmlDocument_()){var r=goog.global.document;if(!goog.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING&&"complete"==r.readyState){if(/\bdeps.js$/.test(e))return!1;throw Error("Cannot write \""+e+"\" after document load")}var a=goog.IS_OLD_IE_;return void 0===t?a?(a=" onreadystatechange='goog.onScriptLoad_(this, "+ ++goog.lastNonModuleScriptIndex_+")' ",r.write("")):goog.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING?goog.appendScriptSrcNode_(e):goog.writeScriptSrcNode_(e):r.write(""),!0}return!1},goog.lastNonModuleScriptIndex_=0,goog.onScriptLoad_=function(e,t){return"complete"==e.readyState&&goog.lastNonModuleScriptIndex_==t&&goog.loadQueuedModules_(),!0},goog.writeScripts_=function(t){function r(e){if(!(e in i.written||e in i.visited)){if(i.visited[e]=!0,e in i.requires)for(var t in i.requires[e])if(!goog.isProvided_(t))if(t in i.nameToPath)r(i.nameToPath[t]);else throw Error("Undefined nameToPath for "+t);e in s||(s[e]=!0,n.push(e))}}var n=[],s={},i=goog.dependencies_;for(r(t),t=0;t>>0),goog.uidCounter_=0,goog.getHashCode=goog.getUid,goog.removeHashCode=goog.removeUid,goog.cloneObject=function(e){var t=goog.typeOf(e);if("object"==t||"array"==t){if(e.clone)return e.clone();var t="array"==t?[]:{},r;for(r in e)t[r]=goog.cloneObject(e[r]);return t}return e},goog.bindNative_=function(e){return e.call.apply(e.bind,arguments)},goog.bindJs_=function(e,t){if(!e)throw Error();if(2=e||"\x80"<=e&&"\uFFFD">=e},goog.string.stripNewlines=function(e){return e.replace(/(\r\n|\r|\n)+/g," ")},goog.string.canonicalizeNewlines=function(e){return e.replace(/(\r\n|\r|\n)/g,"\n")},goog.string.normalizeWhitespace=function(e){return e.replace(/\xa0|\s/g," ")},goog.string.normalizeSpaces=function(e){return e.replace(/\xa0|[ \t]+/g," ")},goog.string.collapseBreakingSpaces=function(e){return e.replace(/[\t\r\n ]+/g," ").replace(/^[\t\r\n ]+|[\t\r\n ]+$/g,"")},goog.string.trim=goog.TRUSTED_SITE&&_Stringprototype.trim?function(e){return e.trim()}:function(e){return e.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},goog.string.trimLeft=function(e){return e.replace(/^[\s\xa0]+/,"")},goog.string.trimRight=function(e){return e.replace(/[\s\xa0]+$/,"")},goog.string.caseInsensitiveCompare=function(e,t){var r=(e+"").toLowerCase(),a=(t+"").toLowerCase();return r":"
")},goog.string.htmlEscape=function(e,t){if(t)e=e.replace(goog.string.AMP_RE_,"&").replace(goog.string.LT_RE_,"<").replace(goog.string.GT_RE_,">").replace(goog.string.QUOT_RE_,""").replace(goog.string.SINGLE_QUOTE_RE_,"'").replace(goog.string.NULL_RE_,"�"),goog.string.DETECT_DOUBLE_ESCAPING&&(e=e.replace(goog.string.E_RE_,"e"));else{if(!goog.string.ALL_RE_.test(e))return e;-1!=e.indexOf("&")&&(e=e.replace(goog.string.AMP_RE_,"&")),-1!=e.indexOf("<")&&(e=e.replace(goog.string.LT_RE_,"<")),-1!=e.indexOf(">")&&(e=e.replace(goog.string.GT_RE_,">")),-1!=e.indexOf("\"")&&(e=e.replace(goog.string.QUOT_RE_,""")),-1!=e.indexOf("'")&&(e=e.replace(goog.string.SINGLE_QUOTE_RE_,"'")),-1!=e.indexOf("\0")&&(e=e.replace(goog.string.NULL_RE_,"�")),goog.string.DETECT_DOUBLE_ESCAPING&&-1!=e.indexOf("e")&&(e=e.replace(goog.string.E_RE_,"e"))}return e},goog.string.AMP_RE_=/&/g,goog.string.LT_RE_=//g,goog.string.QUOT_RE_=/"/g,goog.string.SINGLE_QUOTE_RE_=/'/g,goog.string.NULL_RE_=/\x00/g,goog.string.E_RE_=/e/g,goog.string.ALL_RE_=goog.string.DETECT_DOUBLE_ESCAPING?/[\x00&<>"'e]/:/[\x00&<>"']/,goog.string.unescapeEntities=function(e){return goog.string.contains(e,"&")?!goog.string.FORCE_NON_DOM_HTML_UNESCAPING&&"document"in goog.global?goog.string.unescapeEntitiesUsingDom_(e):goog.string.unescapePureXmlEntities_(e):e},goog.string.unescapeEntitiesWithDocument=function(e,t){return goog.string.contains(e,"&")?goog.string.unescapeEntitiesUsingDom_(e,t):e},goog.string.unescapeEntitiesUsingDom_=function(e,t){var r={"&":"&","<":"<",">":">",""":"\""},n;return n=t?t.createElement("div"):goog.global.document.createElement("div"),e.replace(goog.string.HTML_ENTITY_PATTERN_,function(e,t){var a=r[e];if(a)return a;if("#"==t.charAt(0)){var s=+("0"+t.substr(1));isNaN(s)||(a=_StringfromCharCode3(s))}return a||(n.innerHTML=e+" ",a=n.firstChild.nodeValue.slice(0,-1)),r[e]=a})},goog.string.unescapePureXmlEntities_=function(e){return e.replace(/&([^;]+);/g,function(e,t){switch(t){case"amp":return"&";case"lt":return"<";case"gt":return">";case"quot":return"\"";default:if("#"==t.charAt(0)){var r=+("0"+t.substr(1));if(!isNaN(r))return _StringfromCharCode3(r)}return e;}})},goog.string.HTML_ENTITY_PATTERN_=/&([^;\s<&]+);?/g,goog.string.whitespaceEscape=function(e,t){return goog.string.newLineToBr(e.replace(/ /g,"  "),t)},goog.string.preserveSpaces=function(e){return e.replace(/(^|[\n ]) /g,"$1"+goog.string.Unicode.NBSP)},goog.string.stripQuotes=function(t,r){for(var a=r.length,n=0,s;nt&&(e=e.substring(0,t-3)+"..."),r&&(e=goog.string.htmlEscape(e)),e},goog.string.truncateMiddle=function(t,r,n,s){if(n&&(t=goog.string.unescapeEntities(t)),s&&t.length>r){s>r&&(s=r);var i=t.length-s;t=t.substring(0,r-s)+"..."+t.substring(i)}else t.length>r&&(s=_Mathfloor4(r/2),i=t.length-s,t=t.substring(0,s+r%2)+"..."+t.substring(i));return n&&(t=goog.string.htmlEscape(t)),t},goog.string.specialEscapeChars_={"":"\\0","":"\\b"," ":"\\f","\n":"\\n","\r":"\\r"," ":"\\t"," ":"\\x0B",'"':"\\\"","\\":"\\\\","<":"<"},goog.string.jsEscapeCache_={"'":"\\'"},goog.string.quote=function(t){t+="";for(var r=["\""],n=0;ni?s:goog.string.escapeChar(s))}return r.push("\""),r.join("")},goog.string.escapeString=function(e){for(var t=[],r=0;rt?r=e:(256>t?(r="\\x",16>t||256t&&(r+="0")),r+=t.toString(16).toUpperCase()),goog.string.jsEscapeCache_[e]=r},goog.string.contains=function(e,t){return-1!=e.indexOf(t)},goog.string.caseInsensitiveContains=function(e,t){return goog.string.contains(e.toLowerCase(),t.toLowerCase())},goog.string.countOf=function(e,t){return e&&t?e.split(t).length-1:0},goog.string.removeAt=function(e,t,r){var a=e;return 0<=t&&tt?1:0},goog.string.hashCode=function(e){for(var t=0,r=0;r>>0;return t},goog.string.uniqueStringCounter_=0|2147483648*Math.random(),goog.string.createUniqueString=function(){return"goog_"+goog.string.uniqueStringCounter_++},goog.string.toNumber=function(e){var t=+e;return 0==t&&goog.string.isEmptyOrWhitespace(e)?NaN:t},goog.string.isLowerCamelCase=function(e){return /^[a-z]+([A-Z][a-z]*)*$/.test(e)},goog.string.isUpperCamelCase=function(e){return /^([A-Z][a-z]*)+$/.test(e)},goog.string.toCamelCase=function(e){return(e+"").replace(/\-([a-z])/g,function(e,t){return t.toUpperCase()})},goog.string.toSelectorCase=function(e){return(e+"").replace(/([A-Z])/g,"-$1").toLowerCase()},goog.string.toTitleCase=function(e,t){var r=goog.isString(t)?goog.string.regExpEscape(t):"\\s";return e.replace(new RegExp("(^"+(r?"|["+r+"]+":"")+")([a-z])","g"),function(e,t,r){return t+r.toUpperCase()})},goog.string.capitalize=function(e){return(e.charAt(0)+"").toUpperCase()+(e.substr(1)+"").toLowerCase()},goog.string.parseInt=function(e){return isFinite(e)&&(e+=""),goog.isString(e)?/^\s*-?0x/i.test(e)?parseInt(e,16):parseInt(e,10):NaN},goog.string.splitLimit=function(e,t,r){e=e.split(t);for(var n=[];0r?_Mathmax7(0,e.length+r):r,goog.isString(e))return goog.isString(t)&&1==t.length?e.indexOf(t,r):-1;for(;rr&&(r=_Mathmax7(0,e.length+r)),goog.isString(e))return goog.isString(t)&&1==t.length?e.lastIndexOf(t,r):-1;for(;0<=r;r--)if(r in e&&e[r]===t)return r;return-1},goog.array.forEach=goog.NATIVE_ARRAY_PROTOTYPES&&(goog.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.forEach)?function(e,t,r){goog.asserts.assert(null!=e.length),Array.prototype.forEach.call(e,t,r)}:function(t,r,a){for(var n=t.length,s=goog.isString(t)?t.split(""):t,e=0;et?null:goog.isString(e)?e.charAt(t):e[t]},goog.array.findIndex=function(t,r,a){for(var n=t.length,s=goog.isString(t)?t.split(""):t,e=0;et?null:goog.isString(e)?e.charAt(t):e[t]},goog.array.findIndexRight=function(t,r,a){for(var n=t.length,s=goog.isString(t)?t.split(""):t,n=n-1;0<=n;n--)if(n in s&&r.call(a,s[n],n,t))return n;return-1},goog.array.contains=function(e,t){return 0<=goog.array.indexOf(e,t)},goog.array.isEmpty=function(e){return 0==e.length},goog.array.clear=function(e){if(!goog.isArray(e))for(var t=e.length-1;0<=t;t--)delete e[t];e.length=0},goog.array.insert=function(e,t){goog.array.contains(e,t)||e.push(t)},goog.array.insertAt=function(e,t,r){goog.array.splice(e,r,0,t)},goog.array.insertArrayAt=function(e,t,r){goog.partial(goog.array.splice,e,r,0).apply(null,t)},goog.array.insertBefore=function(e,t,r){var a;2==arguments.length||0>(a=goog.array.indexOf(e,r))?e.push(t):goog.array.insertAt(e,t,a)},goog.array.remove=function(e,t){var r=goog.array.indexOf(e,t),a;return(a=0<=r)&&goog.array.removeAt(e,r),a},goog.array.removeAt=function(e,t){return goog.asserts.assert(null!=e.length),1==Array.prototype.splice.call(e,t,1).length},goog.array.removeIf=function(e,t,r){return t=goog.array.findIndex(e,t,r),!!(0<=t)&&(goog.array.removeAt(e,t),!0)},goog.array.removeAllIf=function(t,r,a){var n=0;return goog.array.forEachRight(t,function(s,e){r.call(a,s,e,t)&&goog.array.removeAt(t,e)&&n++}),n},goog.array.concat=function(){return Array.prototype.concat.apply(Array.prototype,arguments)},goog.array.join=function(){return Array.prototype.concat.apply(Array.prototype,arguments)},goog.array.toArray=function(e){var t=e.length;if(0=arguments.length?Array.prototype.slice.call(e,t):Array.prototype.slice.call(e,t,r)},goog.array.removeDuplicates=function(t,r,a){r=r||t;var n=function(e){return goog.isObject(e)?"o"+goog.getUid(e):(typeof e).charAt(0)+e};a=a||n;for(var n={},s=0,i=0;i>1,p;p=a?r.call(s,t[d],d,t):r(n,t[d]),0t?1:er)&&(goog.array.insertAt(e,t,-(r+1)),!0)},goog.array.binaryRemove=function(e,t,r){return t=goog.array.binarySearch(e,t,r),!!(0<=t)&&goog.array.removeAt(e,t)},goog.array.bucket=function(t,r,a){for(var n={},s=0;sn*(o-i))return[];if(0o;t+=n)s.push(t);return s},goog.array.repeat=function(e,t){for(var r=[],a=0;at&&Array.prototype.push.apply(e,e.splice(0,-t))),e},goog.array.moveItem=function(e,t,r){goog.asserts.assert(0<=t&&t>=8;r[a++]=s}return r},goog.crypt.byteArrayToString=function(e){if(8192>=e.length)return _StringfromCharCode3.apply(null,e);for(var t="",r=0;rs?r[a++]=s:(2048>s?r[a++]=192|s>>6:(55296==(64512&s)&&n+1>18,r[a++]=128|63&s>>12):r[a++]=224|s>>12,r[a++]=128|63&s>>6),r[a++]=128|63&s);return r},goog.crypt.utf8ByteArrayToString=function(t){for(var r=[],a=0,n=0,s;as)r[n++]=_StringfromCharCode3(s);else if(191s){var i=t[a++];r[n++]=_StringfromCharCode3((31&s)<<6|63&i)}else if(239s){var i=t[a++],o=t[a++],p=t[a++],s=((7&s)<<18|(63&i)<<12|(63&o)<<6|63&p)-65536;r[n++]=_StringfromCharCode3(55296+(s>>10)),r[n++]=_StringfromCharCode3(56320+(1023&s))}else i=t[a++],o=t[a++],r[n++]=_StringfromCharCode3((15&s)<<12|(63&i)<<6|63&o);return r.join("")},goog.crypt.xorByteArray=function(e,t){goog.asserts.assert(e.length==t.length,"XOR array lengths must match");for(var r=[],a=0;aparseFloat(e))?t+"":e},goog.userAgent.getVersionRegexResult_=function(){var e=goog.userAgent.getUserAgentString();return goog.userAgent.GECKO?/rv\:([^\);]+)(\)|;)/.exec(e):goog.userAgent.EDGE?/Edge\/([\d\.]+)/.exec(e):goog.userAgent.IE?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(e):goog.userAgent.WEBKIT?/WebKit\/(\S+)/.exec(e):void 0},goog.userAgent.getDocumentMode_=function(){var e=goog.global.document;return e?e.documentMode:void 0},goog.userAgent.VERSION=goog.userAgent.determineVersion_(),goog.userAgent.compare=function(e,t){return goog.string.compareVersions(e,t)},goog.userAgent.isVersionOrHigherCache_={},goog.userAgent.isVersionOrHigher=function(e){return goog.userAgent.ASSUME_ANY_VERSION||goog.userAgent.isVersionOrHigherCache_[e]||(goog.userAgent.isVersionOrHigherCache_[e]=0<=goog.string.compareVersions(goog.userAgent.VERSION,e))},goog.userAgent.isVersion=goog.userAgent.isVersionOrHigher,goog.userAgent.isDocumentModeOrHigher=function(e){return+goog.userAgent.DOCUMENT_MODE>=e},goog.userAgent.isDocumentMode=goog.userAgent.isDocumentModeOrHigher,goog.userAgent.DOCUMENT_MODE=function(){var e=goog.global.document,t=goog.userAgent.getDocumentMode_();return e&&goog.userAgent.IE?t||("CSS1Compat"==e.compatMode?parseInt(goog.userAgent.VERSION,10):5):void 0}(),goog.userAgent.product={},goog.userAgent.product.ASSUME_FIREFOX=!1,goog.userAgent.product.ASSUME_IPHONE=!1,goog.userAgent.product.ASSUME_IPAD=!1,goog.userAgent.product.ASSUME_ANDROID=!1,goog.userAgent.product.ASSUME_CHROME=!1,goog.userAgent.product.ASSUME_SAFARI=!1,goog.userAgent.product.PRODUCT_KNOWN_=goog.userAgent.ASSUME_IE||goog.userAgent.ASSUME_EDGE||goog.userAgent.ASSUME_OPERA||goog.userAgent.product.ASSUME_FIREFOX||goog.userAgent.product.ASSUME_IPHONE||goog.userAgent.product.ASSUME_IPAD||goog.userAgent.product.ASSUME_ANDROID||goog.userAgent.product.ASSUME_CHROME||goog.userAgent.product.ASSUME_SAFARI,goog.userAgent.product.OPERA=goog.userAgent.OPERA,goog.userAgent.product.IE=goog.userAgent.IE,goog.userAgent.product.EDGE=goog.userAgent.EDGE,goog.userAgent.product.FIREFOX=goog.userAgent.product.PRODUCT_KNOWN_?goog.userAgent.product.ASSUME_FIREFOX:goog.labs.userAgent.browser.isFirefox(),goog.userAgent.product.isIphoneOrIpod_=function(){return goog.labs.userAgent.platform.isIphone()||goog.labs.userAgent.platform.isIpod()},goog.userAgent.product.IPHONE=goog.userAgent.product.PRODUCT_KNOWN_?goog.userAgent.product.ASSUME_IPHONE:goog.userAgent.product.isIphoneOrIpod_(),goog.userAgent.product.IPAD=goog.userAgent.product.PRODUCT_KNOWN_?goog.userAgent.product.ASSUME_IPAD:goog.labs.userAgent.platform.isIpad(),goog.userAgent.product.ANDROID=goog.userAgent.product.PRODUCT_KNOWN_?goog.userAgent.product.ASSUME_ANDROID:goog.labs.userAgent.browser.isAndroidBrowser(),goog.userAgent.product.CHROME=goog.userAgent.product.PRODUCT_KNOWN_?goog.userAgent.product.ASSUME_CHROME:goog.labs.userAgent.browser.isChrome(),goog.userAgent.product.isSafariDesktop_=function(){return goog.labs.userAgent.browser.isSafari()&&!goog.labs.userAgent.platform.isIos()},goog.userAgent.product.SAFARI=goog.userAgent.product.PRODUCT_KNOWN_?goog.userAgent.product.ASSUME_SAFARI:goog.userAgent.product.isSafariDesktop_(),goog.crypt.base64={},goog.crypt.base64.byteToCharMap_=null,goog.crypt.base64.charToByteMap_=null,goog.crypt.base64.byteToCharMapWebSafe_=null,goog.crypt.base64.ENCODED_VALS_BASE="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",goog.crypt.base64.ENCODED_VALS=goog.crypt.base64.ENCODED_VALS_BASE+"+/=",goog.crypt.base64.ENCODED_VALS_WEBSAFE=goog.crypt.base64.ENCODED_VALS_BASE+"-_.",goog.crypt.base64.ASSUME_NATIVE_SUPPORT_=goog.userAgent.GECKO||goog.userAgent.WEBKIT&&!goog.userAgent.product.SAFARI||goog.userAgent.OPERA,goog.crypt.base64.HAS_NATIVE_ENCODE_=goog.crypt.base64.ASSUME_NATIVE_SUPPORT_||"function"==typeof goog.global.btoa,goog.crypt.base64.HAS_NATIVE_DECODE_=goog.crypt.base64.ASSUME_NATIVE_SUPPORT_||!goog.userAgent.product.SAFARI&&!goog.userAgent.IE&&"function"==typeof goog.global.atob,goog.crypt.base64.encodeByteArray=function(t,r){goog.asserts.assert(goog.isArrayLike(t),"encodeByteArray takes an array as a parameter"),goog.crypt.base64.init_();for(var a=r?goog.crypt.base64.byteToCharMapWebSafe_:goog.crypt.base64.byteToCharMap_,n=[],s=0;s>2,i=(3&i)<<4|d>>4,d=(15&d)<<2|u>>6,u=63&u;c||(u=64,o||(d=64)),n.push(a[y],a[i],a[d],a[u])}return n.join("")},goog.crypt.base64.encodeString=function(e,t){return goog.crypt.base64.HAS_NATIVE_ENCODE_&&!t?goog.global.btoa(e):goog.crypt.base64.encodeByteArray(goog.crypt.stringToByteArray(e),t)},goog.crypt.base64.decodeString=function(e,t){if(goog.crypt.base64.HAS_NATIVE_DECODE_&&!t)return goog.global.atob(e);var r="";return goog.crypt.base64.decodeStringInternal_(e,function(e){r+=_StringfromCharCode3(e)}),r},goog.crypt.base64.decodeStringToByteArray=function(e){var t=[];return goog.crypt.base64.decodeStringInternal_(e,function(e){t.push(e)}),t},goog.crypt.base64.decodeStringToUint8Array=function(e){goog.asserts.assert(!goog.userAgent.IE||goog.userAgent.isVersionOrHigher("10"),"Browser does not support typed arrays");var t=new Uint8Array(Math.ceil(3*e.length/4)),r=0;return goog.crypt.base64.decodeStringInternal_(e,function(e){t[r++]=e}),t.subarray(0,r)},goog.crypt.base64.decodeStringInternal_=function(t,r){function a(r){for(;n>4),64!=i&&(r(240&e<<4|i>>2),64!=o&&r(192&i<<6|o))}},goog.crypt.base64.init_=function(){if(!goog.crypt.base64.byteToCharMap_){goog.crypt.base64.byteToCharMap_={},goog.crypt.base64.charToByteMap_={},goog.crypt.base64.byteToCharMapWebSafe_={};for(var e=0;e=goog.crypt.base64.ENCODED_VALS_BASE.length&&(goog.crypt.base64.charToByteMap_[goog.crypt.base64.ENCODED_VALS_WEBSAFE.charAt(e)]=e)}},jspb.ExtensionFieldInfo=function(t,r,a,n,s){this.fieldIndex=t,this.fieldName=r,this.ctor=a,this.toObjectFn=n,this.isRepeated=s},jspb.ExtensionFieldBinaryInfo=function(t,r,a,n,s,e){this.fieldInfo=t,this.binaryReaderFn=r,this.binaryWriterFn=a,this.binaryMessageSerializeFn=n,this.binaryMessageDeserializeFn=s,this.isPacked=e},jspb.ExtensionFieldInfo.prototype.isMessageType=function(){return!!this.ctor},jspb.Message=function(){},jspb.Message.GENERATE_TO_OBJECT=!0,jspb.Message.GENERATE_FROM_OBJECT=!goog.DISALLOW_TEST_ONLY_CODE,jspb.Message.GENERATE_TO_STRING=!0,jspb.Message.ASSUME_LOCAL_ARRAYS=!1,jspb.Message.SERIALIZE_EMPTY_TRAILING_FIELDS=!0,jspb.Message.SUPPORTS_UINT8ARRAY_="function"==typeof Uint8Array,jspb.Message.prototype.getJsPbMessageId=function(){return this.messageId_},jspb.Message.getIndex_=function(e,t){return t+e.arrayIndexOffset_},jspb.Message.getFieldNumber_=function(e,t){return t-e.arrayIndexOffset_},jspb.Message.initialize=function(t,r,a,n,s,e){if(t.wrappers_=null,r||(r=a?[a]:[]),t.messageId_=a?a+"":void 0,t.arrayIndexOffset_=0===a?-1:0,t.array=r,jspb.Message.initPivotAndExtensionObject_(t,n),t.convertedFloatingPointFields_={},jspb.Message.SERIALIZE_EMPTY_TRAILING_FIELDS||(t.repeatedFields=s),s)for(r=0;rn.length?a.length:n.length;for(t.getJsPbMessageId()&&(s[0]=t.getJsPbMessageId(),e=1);e>>1|(1&this.hi)<<31)>>>0,this.hi>>>1>>>0)},jspb.arith.UInt64.prototype.leftShift=function(){return new jspb.arith.UInt64(this.lo<<1>>>0,(this.hi<<1|this.lo>>>31)>>>0)},jspb.arith.UInt64.prototype.msb=function(){return!!(2147483648&this.hi)},jspb.arith.UInt64.prototype.lsb=function(){return!!(1&this.lo)},jspb.arith.UInt64.prototype.zero=function(){return 0==this.lo&&0==this.hi},jspb.arith.UInt64.prototype.add=function(e){return new jspb.arith.UInt64((4294967295&this.lo+e.lo)>>>0>>>0,((4294967295&this.hi+e.hi)>>>0)+(4294967296<=this.lo+e.lo?1:0)>>>0)},jspb.arith.UInt64.prototype.sub=function(e){return new jspb.arith.UInt64((4294967295&this.lo-e.lo)>>>0>>>0,((4294967295&this.hi-e.hi)>>>0)-(0>this.lo-e.lo?1:0)>>>0)},jspb.arith.UInt64.mul32x32=function(t,r){for(var a=65535&t,n=t>>>16,s=65535&r,e=r>>>16,i=a*s+65536*(65535&a*e)+65536*(65535&n*s),a=n*e+(a*e>>>16)+(n*s>>>16);4294967296<=i;)i-=4294967296,a+=1;return new jspb.arith.UInt64(i>>>0,a>>>0)},jspb.arith.UInt64.prototype.mul=function(e){var t=jspb.arith.UInt64.mul32x32(this.lo,e);return e=jspb.arith.UInt64.mul32x32(this.hi,e),e.hi=e.lo,e.lo=0,t.add(e)},jspb.arith.UInt64.prototype.div=function(e){if(0==e)return[];var t=new jspb.arith.UInt64(0,0),r=new jspb.arith.UInt64(this.lo,this.hi);e=new jspb.arith.UInt64(e,0);for(var n=new jspb.arith.UInt64(1,0);!e.msb();)e=e.leftShift(),n=n.leftShift();for(;!n.zero();)0>=e.cmp(r)&&(t=t.add(n),r=r.sub(e)),e=e.rightShift(),n=n.rightShift();return[t,r]},jspb.arith.UInt64.prototype.toString=function(){for(var e="",t=this;!t.zero();)var t=t.div(10),r=t[0],e=t[1].lo+e,t=r;return""==e&&(e="0"),e},jspb.arith.UInt64.fromString=function(t){for(var r=new jspb.arith.UInt64(0,0),a=new jspb.arith.UInt64(0,0),n=0;nt[n]||"9">>0>>>0,((4294967295&this.hi+e.hi)>>>0)+(4294967296<=this.lo+e.lo?1:0)>>>0)},jspb.arith.Int64.prototype.sub=function(e){return new jspb.arith.Int64((4294967295&this.lo-e.lo)>>>0>>>0,((4294967295&this.hi-e.hi)>>>0)-(0>this.lo-e.lo?1:0)>>>0)},jspb.arith.Int64.prototype.clone=function(){return new jspb.arith.Int64(this.lo,this.hi)},jspb.arith.Int64.prototype.toString=function(){var e=0!=(2147483648&this.hi),t=new jspb.arith.UInt64(this.lo,this.hi);return e&&(t=new jspb.arith.UInt64(0,0).sub(t)),(e?"-":"")+t.toString()},jspb.arith.Int64.fromString=function(e){var t=0>>0;e=_Mathfloor4((e-t)/jspb.BinaryConstants.TWO_TO_32)>>>0,jspb.utils.split64Low=t,jspb.utils.split64High=e},jspb.utils.splitInt64=function(e){var t=0>e;e=_Mathabs(e);var r=e>>>0;e=_Mathfloor4((e-r)/jspb.BinaryConstants.TWO_TO_32),e>>>=0,t&&(e=~e>>>0,r=(~r>>>0)+1,4294967295e;e=2*_Mathabs(e),jspb.utils.splitUint64(e),e=jspb.utils.split64Low;var r=jspb.utils.split64High;t&&(0==e?0==r?r=e=4294967295:(r--,e=4294967295):e--),jspb.utils.split64Low=e,jspb.utils.split64High=r},jspb.utils.splitFloat32=function(e){var t=0>e?1:0;e=t?-e:e;var r;0===e?0<1/e?(jspb.utils.split64High=0,jspb.utils.split64Low=0):(jspb.utils.split64High=0,jspb.utils.split64Low=2147483648):isNaN(e)?(jspb.utils.split64High=0,jspb.utils.split64Low=2147483647):e>jspb.BinaryConstants.FLOAT32_MAX?(jspb.utils.split64High=0,jspb.utils.split64Low=(2139095040|t<<31)>>>0):e>>0):(r=_Mathfloor4(_Mathlog(e)/_MathLN),e*=_Mathpow3(2,-r),e=8388607&_Mathround4(e*jspb.BinaryConstants.TWO_TO_23),jspb.utils.split64High=0,jspb.utils.split64Low=(t<<31|r+127<<23|e)>>>0)},jspb.utils.splitFloat64=function(e){var t=0>e?1:0;if(e=t?-e:e,0===e)jspb.utils.split64High=0<1/e?0:2147483648,jspb.utils.split64Low=0;else if(isNaN(e))jspb.utils.split64High=2147483647,jspb.utils.split64Low=4294967295;else if(e>jspb.BinaryConstants.FLOAT64_MAX)jspb.utils.split64High=(2146435072|t<<31)>>>0,jspb.utils.split64Low=0;else if(e>>0,jspb.utils.split64Low=r>>>0}else{var n=_Mathfloor4(_Mathlog(e)/_MathLN);1024==n&&(n=1023),r=e*_Mathpow3(2,-n),e=1048575&r*jspb.BinaryConstants.TWO_TO_20,r=r*jspb.BinaryConstants.TWO_TO_52>>>0,jspb.utils.split64High=(t<<31|n+1023<<20|e)>>>0,jspb.utils.split64Low=r}},jspb.utils.splitHash64=function(t){var r=t.charCodeAt(0),n=t.charCodeAt(1),s=t.charCodeAt(2),i=t.charCodeAt(3),e=t.charCodeAt(4),o=t.charCodeAt(5),d=t.charCodeAt(6);t=t.charCodeAt(7),jspb.utils.split64Low=r+(n<<8)+(s<<16)+(i<<24)>>>0,jspb.utils.split64High=e+(o<<8)+(d<<16)+(t<<24)>>>0},jspb.utils.joinUint64=function(e,t){return t*jspb.BinaryConstants.TWO_TO_32+e},jspb.utils.joinInt64=function(e,t){var r=2147483648&t;r&&(e=~e+1>>>0,t=~t>>>0,0==e&&(t=t+1>>>0));var n=jspb.utils.joinUint64(e,t);return r?-n:n},jspb.utils.joinZigzag64=function(e,t){var r=1&e;e=(e>>>1|t<<31)>>>0,t>>>=1,r&&(e=e+1>>>0,0==e&&(t=t+1>>>0));var n=jspb.utils.joinUint64(e,t);return r?-n:n},jspb.utils.joinFloat32=function(t){var r=2*(t>>31)+1,a=255&t>>>23,n=8388607&t;return 255==a?n?NaN:1/0*r:0==a?1.401298464324817e-45*r*n:r*_Mathpow3(2,a-150)*(n+8388608)},jspb.utils.joinFloat64=function(t,r){var a=2*(r>>31)+1,n=2047&r>>>20,s=jspb.BinaryConstants.TWO_TO_32*(1048575&r)+t;return 2047==n?s?NaN:1/0*a:0==n?5e-324*a*s:a*_Mathpow3(2,n-1075)*(s+jspb.BinaryConstants.TWO_TO_52)},jspb.utils.joinHash64=function(e,t){return _StringfromCharCode3(255&e>>>0,255&e>>>8,255&e>>>16,255&e>>>24,255&t>>>0,255&t>>>8,255&t>>>16,255&t>>>24)},jspb.utils.DIGITS=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],jspb.utils.joinUnsignedDecimalString=function(t,r){function a(e){for(var t=1E7,r=0;7>r;r++){var t=t/10,a=e/t%10>>>0;(0!=a||p)&&(p=!0,c+=o[a])}}if(2097151>=r)return""+(jspb.BinaryConstants.TWO_TO_32*r+t);var n=16777215&(t>>>24|r<<8)>>>0,s=65535&r>>16,i=(16777215&t)+6777216*n+6710656*s,n=n+8147497*s,s=2*s;1E7<=i&&(n+=_Mathfloor4(i/1E7),i%=1E7),1E7<=n&&(s+=_Mathfloor4(n/1E7),n%=1E7);var o=jspb.utils.DIGITS,p=!1,c="";return(s||p)&&a(s),(n||p)&&a(n),(i||p)&&a(i),c},jspb.utils.joinSignedDecimalString=function(e,t){var r=2147483648&t;r&&(e=~e+1>>>0,t=~t+(0==e?1:0)>>>0);var n=jspb.utils.joinUnsignedDecimalString(e,t);return r?"-"+n:n},jspb.utils.hash64ToDecimalString=function(e,t){jspb.utils.splitHash64(e);var r=jspb.utils.split64Low,a=jspb.utils.split64High;return t?jspb.utils.joinSignedDecimalString(r,a):jspb.utils.joinUnsignedDecimalString(r,a)},jspb.utils.hash64ArrayToDecimalStrings=function(e,t){for(var r=Array(e.length),a=0;ar&&(1!==e||0>>8}function n(){for(var e=0;8>e;e++)i[e]=255&~i[e]}goog.asserts.assert(0r;r++)a=e.charCodeAt(7-r),t[2*r+2]=jspb.utils.DIGITS[a>>4],t[2*r+3]=jspb.utils.DIGITS[15&a];return t.join("")},jspb.utils.hexStringToHash64=function(t){t=t.toLowerCase(),goog.asserts.assert(18==t.length),goog.asserts.assert("0"==t[0]),goog.asserts.assert("x"==t[1]);for(var r="",n=0;8>n;n++)var s=jspb.utils.DIGITS.indexOf(t[2*n+2]),i=jspb.utils.DIGITS.indexOf(t[2*n+3]),r=_StringfromCharCode3(16*s+i)+r;return r},jspb.utils.hash64ToNumber=function(e,t){jspb.utils.splitHash64(e);var r=jspb.utils.split64Low,a=jspb.utils.split64High;return t?jspb.utils.joinInt64(r,a):jspb.utils.joinUint64(r,a)},jspb.utils.numberToHash64=function(e){return jspb.utils.splitInt64(e),jspb.utils.joinHash64(jspb.utils.split64Low,jspb.utils.split64High)},jspb.utils.countVarints=function(t,r,a){for(var n=0,s=r;s>7;return a-r-n},jspb.utils.countVarintFields=function(t,r,a,n){var s=0;if(n=8*n+jspb.BinaryConstants.WireType.VARINT,128>n)for(;r>=7}if(t[r++]!=i)break;for(s++;i=t[r++],0!=(128&i););}return s},jspb.utils.countFixedFields_=function(t,r,a,n,s){var e=0;if(128>n)for(;r>=7}if(t[r++]!=i)break;e++,r+=s}return e},jspb.utils.countFixed32Fields=function(e,t,r,a){return jspb.utils.countFixedFields_(e,t,r,8*a+jspb.BinaryConstants.WireType.FIXED32,4)},jspb.utils.countFixed64Fields=function(e,t,r,a){return jspb.utils.countFixedFields_(e,t,r,8*a+jspb.BinaryConstants.WireType.FIXED64,8)},jspb.utils.countDelimitedFields=function(t,r,a,n){var s=0;for(n=8*n+jspb.BinaryConstants.WireType.DELIMITED;r>=7}if(t[r++]!=i)break;s++;for(var o=0,p=1;i=t[r++],o+=(127&i)*p,p*=128,0!=(128&i););r+=o}return s},jspb.utils.debugBytesToTextFormat=function(e){var t="\"";if(e){e=jspb.utils.byteSourceToUint8Array(e);for(var r=0;re[r]&&(t+="0"),t+=e[r].toString(16)}return t+"\""},jspb.utils.debugScalarToTextFormat=function(e){return goog.isString(e)?goog.string.quote(e):e.toString()},jspb.utils.stringToByteArray=function(e){for(var t=new Uint8Array(e.length),r=0,a;r>>7|t<<25)>>>0,t>>>=7;this.buffer_.push(e)},jspb.BinaryEncoder.prototype.writeSplitFixed64=function(e,t){goog.asserts.assert(e==_Mathfloor4(e)),goog.asserts.assert(t==_Mathfloor4(t)),goog.asserts.assert(0<=e&&e>>=7;this.buffer_.push(e)},jspb.BinaryEncoder.prototype.writeSignedVarint32=function(e){if(goog.asserts.assert(e==_Mathfloor4(e)),goog.asserts.assert(e>=-jspb.BinaryConstants.TWO_TO_31&&et;t++)this.buffer_.push(128|127&e),e>>=7;this.buffer_.push(1)}},jspb.BinaryEncoder.prototype.writeUnsignedVarint64=function(e){goog.asserts.assert(e==_Mathfloor4(e)),goog.asserts.assert(0<=e&&e=-jspb.BinaryConstants.TWO_TO_63&&e=-jspb.BinaryConstants.TWO_TO_31&&e>31)>>>0)},jspb.BinaryEncoder.prototype.writeZigzagVarint64=function(e){goog.asserts.assert(e==_Mathfloor4(e)),goog.asserts.assert(e>=-jspb.BinaryConstants.TWO_TO_63&&ee),this.buffer_.push(255&e>>>0)},jspb.BinaryEncoder.prototype.writeUint16=function(e){goog.asserts.assert(e==_Mathfloor4(e)),goog.asserts.assert(0<=e&&65536>e),this.buffer_.push(255&e>>>0),this.buffer_.push(255&e>>>8)},jspb.BinaryEncoder.prototype.writeUint32=function(e){goog.asserts.assert(e==_Mathfloor4(e)),goog.asserts.assert(0<=e&&e>>0),this.buffer_.push(255&e>>>8),this.buffer_.push(255&e>>>16),this.buffer_.push(255&e>>>24)},jspb.BinaryEncoder.prototype.writeUint64=function(e){goog.asserts.assert(e==_Mathfloor4(e)),goog.asserts.assert(0<=e&&ee),this.buffer_.push(255&e>>>0)},jspb.BinaryEncoder.prototype.writeInt16=function(e){goog.asserts.assert(e==_Mathfloor4(e)),goog.asserts.assert(-32768<=e&&32768>e),this.buffer_.push(255&e>>>0),this.buffer_.push(255&e>>>8)},jspb.BinaryEncoder.prototype.writeInt32=function(e){goog.asserts.assert(e==_Mathfloor4(e)),goog.asserts.assert(e>=-jspb.BinaryConstants.TWO_TO_31&&e>>0),this.buffer_.push(255&e>>>8),this.buffer_.push(255&e>>>16),this.buffer_.push(255&e>>>24)},jspb.BinaryEncoder.prototype.writeInt64=function(e){goog.asserts.assert(e==_Mathfloor4(e)),goog.asserts.assert(e>=-jspb.BinaryConstants.TWO_TO_63&&e=-jspb.BinaryConstants.TWO_TO_63&&+e=-jspb.BinaryConstants.FLOAT32_MAX&&e<=jspb.BinaryConstants.FLOAT32_MAX),jspb.utils.splitFloat32(e),this.writeUint32(jspb.utils.split64Low)},jspb.BinaryEncoder.prototype.writeDouble=function(e){goog.asserts.assert(e>=-jspb.BinaryConstants.FLOAT64_MAX&&e<=jspb.BinaryConstants.FLOAT64_MAX),jspb.utils.splitFloat64(e),this.writeUint32(jspb.utils.split64Low),this.writeUint32(jspb.utils.split64High)},jspb.BinaryEncoder.prototype.writeBool=function(e){goog.asserts.assert(goog.isBoolean(e)||goog.isNumber(e)),this.buffer_.push(e?1:0)},jspb.BinaryEncoder.prototype.writeEnum=function(e){goog.asserts.assert(e==_Mathfloor4(e)),goog.asserts.assert(e>=-jspb.BinaryConstants.TWO_TO_31&&en)this.buffer_.push(n);else if(2048>n)this.buffer_.push(192|n>>6),this.buffer_.push(128|63&n);else if(65536>n)if(55296<=n&&56319>=n&&a+1=s&&(n=1024*(n-55296)+s-56320+65536,this.buffer_.push(240|n>>18),this.buffer_.push(128|63&n>>12),this.buffer_.push(128|63&n>>6),this.buffer_.push(128|63&n),a++)}else this.buffer_.push(224|n>>12),this.buffer_.push(128|63&n>>6),this.buffer_.push(128|63&n);return this.buffer_.length-r},jspb.BinaryWriter=function(){this.blocks_=[],this.totalLength_=0,this.encoder_=new jspb.BinaryEncoder,this.bookmarks_=[]},jspb.BinaryWriter.prototype.appendUint8Array_=function(e){var t=this.encoder_.end();this.blocks_.push(t),this.blocks_.push(e),this.totalLength_+=t.length+e.length},jspb.BinaryWriter.prototype.beginDelimited_=function(e){return this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.DELIMITED),e=this.encoder_.end(),this.blocks_.push(e),this.totalLength_+=e.length,e.push(this.totalLength_),e},jspb.BinaryWriter.prototype.endDelimited_=function(e){var t=e.pop(),t=this.totalLength_+this.encoder_.length()-t;for(goog.asserts.assert(0<=t);127>>=7,this.totalLength_++;e.push(t),this.totalLength_++},jspb.BinaryWriter.prototype.writeSerializedMessage=function(e,t,r){this.appendUint8Array_(e.subarray(t,r))},jspb.BinaryWriter.prototype.maybeWriteSerializedMessage=function(e,t,r){null!=e&&null!=t&&null!=r&&this.writeSerializedMessage(e,t,r)},jspb.BinaryWriter.prototype.reset=function(){this.blocks_=[],this.encoder_.end(),this.totalLength_=0,this.bookmarks_=[]},jspb.BinaryWriter.prototype.getResultBuffer=function(){goog.asserts.assert(0==this.bookmarks_.length);for(var t=new Uint8Array(this.totalLength_+this.encoder_.length()),r=this.blocks_,a=r.length,n=0,s=0,i;s=-jspb.BinaryConstants.TWO_TO_31&&t=-jspb.BinaryConstants.TWO_TO_31&&r=-jspb.BinaryConstants.TWO_TO_63&&t=-jspb.BinaryConstants.TWO_TO_31&&t=-jspb.BinaryConstants.TWO_TO_63&&t=-jspb.BinaryConstants.TWO_TO_63&&+t=-jspb.BinaryConstants.TWO_TO_31&&t=-jspb.BinaryConstants.TWO_TO_63&&t=-jspb.BinaryConstants.TWO_TO_31&&tjspb.BinaryIterator.instanceCache_.length&&jspb.BinaryIterator.instanceCache_.push(this)},jspb.BinaryIterator.prototype.clear=function(){this.decoder_&&this.decoder_.free(),this.elements_=this.nextMethod_=this.decoder_=null,this.cursor_=0,this.nextValue_=null,this.atEnd_=!0},jspb.BinaryIterator.prototype.get=function(){return this.nextValue_},jspb.BinaryIterator.prototype.atEnd=function(){return this.atEnd_},jspb.BinaryIterator.prototype.next=function(){var e=this.nextValue_;return this.decoder_?this.decoder_.atEnd()?(this.nextValue_=null,this.atEnd_=!0):this.nextValue_=this.nextMethod_.call(this.decoder_):this.elements_&&(this.cursor_==this.elements_.length?(this.nextValue_=null,this.atEnd_=!0):this.nextValue_=this.elements_[this.cursor_++]),e},jspb.BinaryDecoder=function(e,t,r){this.bytes_=null,this.tempHigh_=this.tempLow_=this.cursor_=this.end_=this.start_=0,this.error_=!1,e&&this.setBlock(e,t,r)},jspb.BinaryDecoder.instanceCache_=[],jspb.BinaryDecoder.alloc=function(e,t,r){if(jspb.BinaryDecoder.instanceCache_.length){var a=jspb.BinaryDecoder.instanceCache_.pop();return e&&a.setBlock(e,t,r),a}return new jspb.BinaryDecoder(e,t,r)},jspb.BinaryDecoder.prototype.free=function(){this.clear(),100>jspb.BinaryDecoder.instanceCache_.length&&jspb.BinaryDecoder.instanceCache_.push(this)},jspb.BinaryDecoder.prototype.clone=function(){return jspb.BinaryDecoder.alloc(this.bytes_,this.start_,this.end_-this.start_)},jspb.BinaryDecoder.prototype.clear=function(){this.bytes_=null,this.cursor_=this.end_=this.start_=0,this.error_=!1},jspb.BinaryDecoder.prototype.getBuffer=function(){return this.bytes_},jspb.BinaryDecoder.prototype.setBlock=function(e,t,r){this.bytes_=jspb.utils.byteSourceToUint8Array(e),this.start_=goog.isDef(t)?t:0,this.end_=goog.isDef(r)?this.start_+r:this.bytes_.length,this.cursor_=this.start_},jspb.BinaryDecoder.prototype.getEnd=function(){return this.end_},jspb.BinaryDecoder.prototype.setEnd=function(e){this.end_=e},jspb.BinaryDecoder.prototype.reset=function(){this.cursor_=this.start_},jspb.BinaryDecoder.prototype.getCursor=function(){return this.cursor_},jspb.BinaryDecoder.prototype.setCursor=function(e){this.cursor_=e},jspb.BinaryDecoder.prototype.advance=function(e){this.cursor_+=e,goog.asserts.assert(this.cursor_<=this.end_)},jspb.BinaryDecoder.prototype.atEnd=function(){return this.cursor_==this.end_},jspb.BinaryDecoder.prototype.pastEnd=function(){return this.cursor_>this.end_},jspb.BinaryDecoder.prototype.getError=function(){return this.error_||0>this.cursor_||this.cursor_>this.end_},jspb.BinaryDecoder.prototype.readSplitVarint64_=function(){for(var e=0,t=0,r,n;4>t;t++)if(r=this.bytes_[this.cursor_++],e|=(127&r)<<7*t,128>r)return this.tempLow_=e>>>0,void(this.tempHigh_=0);if(r=this.bytes_[this.cursor_++],e|=(127&r)<<28,n=0|(127&r)>>4,128>r)this.tempLow_=e>>>0,this.tempHigh_=n>>>0;else{for(t=0;5>t;t++)if(r=this.bytes_[this.cursor_++],n|=(127&r)<<7*t+3,128>r)return this.tempLow_=e>>>0,void(this.tempHigh_=n>>>0);goog.asserts.fail("Failed to read varint, encoding is invalid."),this.error_=!0}},jspb.BinaryDecoder.prototype.skipVarint=function(){for(;128&this.bytes_[this.cursor_];)this.cursor_++;this.cursor_++},jspb.BinaryDecoder.prototype.unskipVarint=function(e){for(;128>>=7;this.cursor_--},jspb.BinaryDecoder.prototype.readUnsignedVarint32=function(){var e=this.bytes_,t;t=e[this.cursor_+0];var r=127&t;return 128>t?(this.cursor_+=1,goog.asserts.assert(this.cursor_<=this.end_),r):(t=e[this.cursor_+1],r|=(127&t)<<7,128>t)?(this.cursor_+=2,goog.asserts.assert(this.cursor_<=this.end_),r):(t=e[this.cursor_+2],r|=(127&t)<<14,128>t)?(this.cursor_+=3,goog.asserts.assert(this.cursor_<=this.end_),r):(t=e[this.cursor_+3],r|=(127&t)<<21,128>t)?(this.cursor_+=4,goog.asserts.assert(this.cursor_<=this.end_),r):(t=e[this.cursor_+4],r|=(15&t)<<28,128>t)?(this.cursor_+=5,goog.asserts.assert(this.cursor_<=this.end_),r>>>0):(this.cursor_+=5,128<=e[this.cursor_++]&&128<=e[this.cursor_++]&&128<=e[this.cursor_++]&&128<=e[this.cursor_++]&&128<=e[this.cursor_++]&&goog.asserts.assert(!1),goog.asserts.assert(this.cursor_<=this.end_),r)},jspb.BinaryDecoder.prototype.readSignedVarint32=jspb.BinaryDecoder.prototype.readUnsignedVarint32,jspb.BinaryDecoder.prototype.readUnsignedVarint32String=function(){return this.readUnsignedVarint32().toString()},jspb.BinaryDecoder.prototype.readSignedVarint32String=function(){return this.readSignedVarint32().toString()},jspb.BinaryDecoder.prototype.readZigzagVarint32=function(){var e=this.readUnsignedVarint32();return e>>>1^-(1&e)},jspb.BinaryDecoder.prototype.readUnsignedVarint64=function(){return this.readSplitVarint64_(),jspb.utils.joinUint64(this.tempLow_,this.tempHigh_)},jspb.BinaryDecoder.prototype.readUnsignedVarint64String=function(){return this.readSplitVarint64_(),jspb.utils.joinUnsignedDecimalString(this.tempLow_,this.tempHigh_)},jspb.BinaryDecoder.prototype.readSignedVarint64=function(){return this.readSplitVarint64_(),jspb.utils.joinInt64(this.tempLow_,this.tempHigh_)},jspb.BinaryDecoder.prototype.readSignedVarint64String=function(){return this.readSplitVarint64_(),jspb.utils.joinSignedDecimalString(this.tempLow_,this.tempHigh_)},jspb.BinaryDecoder.prototype.readZigzagVarint64=function(){return this.readSplitVarint64_(),jspb.utils.joinZigzag64(this.tempLow_,this.tempHigh_)},jspb.BinaryDecoder.prototype.readZigzagVarint64String=function(){return this.readZigzagVarint64().toString()},jspb.BinaryDecoder.prototype.readUint8=function(){var e=this.bytes_[this.cursor_+0];return this.cursor_+=1,goog.asserts.assert(this.cursor_<=this.end_),e},jspb.BinaryDecoder.prototype.readUint16=function(){var e=this.bytes_[this.cursor_+0],t=this.bytes_[this.cursor_+1];return this.cursor_+=2,goog.asserts.assert(this.cursor_<=this.end_),e<<0|t<<8},jspb.BinaryDecoder.prototype.readUint32=function(){var e=this.bytes_[this.cursor_+0],t=this.bytes_[this.cursor_+1],r=this.bytes_[this.cursor_+2],a=this.bytes_[this.cursor_+3];return this.cursor_+=4,goog.asserts.assert(this.cursor_<=this.end_),(e<<0|t<<8|r<<16|a<<24)>>>0},jspb.BinaryDecoder.prototype.readUint64=function(){var e=this.readUint32(),t=this.readUint32();return jspb.utils.joinUint64(e,t)},jspb.BinaryDecoder.prototype.readUint64String=function(){var e=this.readUint32(),t=this.readUint32();return jspb.utils.joinUnsignedDecimalString(e,t)},jspb.BinaryDecoder.prototype.readInt8=function(){var e=this.bytes_[this.cursor_+0];return this.cursor_+=1,goog.asserts.assert(this.cursor_<=this.end_),e<<24>>24},jspb.BinaryDecoder.prototype.readInt16=function(){var e=this.bytes_[this.cursor_+0],t=this.bytes_[this.cursor_+1];return this.cursor_+=2,goog.asserts.assert(this.cursor_<=this.end_),(e<<0|t<<8)<<16>>16},jspb.BinaryDecoder.prototype.readInt32=function(){var e=this.bytes_[this.cursor_+0],t=this.bytes_[this.cursor_+1],r=this.bytes_[this.cursor_+2],a=this.bytes_[this.cursor_+3];return this.cursor_+=4,goog.asserts.assert(this.cursor_<=this.end_),e<<0|t<<8|r<<16|a<<24},jspb.BinaryDecoder.prototype.readInt64=function(){var e=this.readUint32(),t=this.readUint32();return jspb.utils.joinInt64(e,t)},jspb.BinaryDecoder.prototype.readInt64String=function(){var e=this.readUint32(),t=this.readUint32();return jspb.utils.joinSignedDecimalString(e,t)},jspb.BinaryDecoder.prototype.readFloat=function(){var e=this.readUint32();return jspb.utils.joinFloat32(e,0)},jspb.BinaryDecoder.prototype.readDouble=function(){var e=this.readUint32(),t=this.readUint32();return jspb.utils.joinFloat64(e,t)},jspb.BinaryDecoder.prototype.readBool=function(){return!!this.bytes_[this.cursor_++]},jspb.BinaryDecoder.prototype.readEnum=function(){return this.readSignedVarint32()},jspb.BinaryDecoder.prototype.readString=function(t){var r=this.bytes_,n=this.cursor_;t=n+t;for(var s=[],i="",o;no)s.push(o);else if(192>o)continue;else if(224>o){var d=r[n++];s.push((31&o)<<6|63&d)}else if(240>o){var d=r[n++],p=r[n++];s.push((15&o)<<12|(63&d)<<6|63&p)}else if(248>o){var d=r[n++],p=r[n++],l=r[n++],o=(7&o)<<18|(63&d)<<12|(63&p)<<6|63&l,o=o-65536;s.push((1023&o>>10)+55296,(1023&o)+56320)}8192<=s.length&&(i+=_StringfromCharCode3.apply(null,s),s.length=0)}return i+=goog.crypt.byteArrayToString(s),this.cursor_=n,i},jspb.BinaryDecoder.prototype.readStringWithLength=function(){var e=this.readUnsignedVarint32();return this.readString(e)},jspb.BinaryDecoder.prototype.readBytes=function(e){if(0>e||this.cursor_+e>this.bytes_.length)return this.error_=!0,goog.asserts.fail("Invalid byte length!"),new Uint8Array(0);var t=this.bytes_.subarray(this.cursor_,this.cursor_+e);return this.cursor_+=e,goog.asserts.assert(this.cursor_<=this.end_),t},jspb.BinaryDecoder.prototype.readVarintHash64=function(){return this.readSplitVarint64_(),jspb.utils.joinHash64(this.tempLow_,this.tempHigh_)},jspb.BinaryDecoder.prototype.readFixedHash64=function(){var t=this.bytes_,r=this.cursor_,n=t[r+0],s=t[r+1],i=t[r+2],e=t[r+3],o=t[r+4],d=t[r+5],p=t[r+6],t=t[r+7];return this.cursor_+=8,_StringfromCharCode3(n,s,i,e,o,d,p,t)},jspb.BinaryReader=function(e,t,r){this.decoder_=jspb.BinaryDecoder.alloc(e,t,r),this.fieldCursor_=this.decoder_.getCursor(),this.nextField_=jspb.BinaryConstants.INVALID_FIELD_NUMBER,this.nextWireType_=jspb.BinaryConstants.WireType.INVALID,this.error_=!1,this.readCallbacks_=null},jspb.BinaryReader.instanceCache_=[],jspb.BinaryReader.alloc=function(e,t,r){if(jspb.BinaryReader.instanceCache_.length){var a=jspb.BinaryReader.instanceCache_.pop();return e&&a.decoder_.setBlock(e,t,r),a}return new jspb.BinaryReader(e,t,r)},jspb.BinaryReader.prototype.alloc=jspb.BinaryReader.alloc,jspb.BinaryReader.prototype.free=function(){this.decoder_.clear(),this.nextField_=jspb.BinaryConstants.INVALID_FIELD_NUMBER,this.nextWireType_=jspb.BinaryConstants.WireType.INVALID,this.error_=!1,this.readCallbacks_=null,100>jspb.BinaryReader.instanceCache_.length&&jspb.BinaryReader.instanceCache_.push(this)},jspb.BinaryReader.prototype.getFieldCursor=function(){return this.fieldCursor_},jspb.BinaryReader.prototype.getCursor=function(){return this.decoder_.getCursor()},jspb.BinaryReader.prototype.getBuffer=function(){return this.decoder_.getBuffer()},jspb.BinaryReader.prototype.getFieldNumber=function(){return this.nextField_},jspb.BinaryReader.prototype.getWireType=function(){return this.nextWireType_},jspb.BinaryReader.prototype.isEndGroup=function(){return this.nextWireType_==jspb.BinaryConstants.WireType.END_GROUP},jspb.BinaryReader.prototype.getError=function(){return this.error_||this.decoder_.getError()},jspb.BinaryReader.prototype.setBlock=function(e,t,r){this.decoder_.setBlock(e,t,r),this.nextField_=jspb.BinaryConstants.INVALID_FIELD_NUMBER,this.nextWireType_=jspb.BinaryConstants.WireType.INVALID},jspb.BinaryReader.prototype.reset=function(){this.decoder_.reset(),this.nextField_=jspb.BinaryConstants.INVALID_FIELD_NUMBER,this.nextWireType_=jspb.BinaryConstants.WireType.INVALID},jspb.BinaryReader.prototype.advance=function(e){this.decoder_.advance(e)},jspb.BinaryReader.prototype.nextField=function(){if(this.decoder_.atEnd())return!1;if(this.getError())return goog.asserts.fail("Decoder hit an error"),!1;this.fieldCursor_=this.decoder_.getCursor();var e=this.decoder_.readUnsignedVarint32(),t=e>>>3,e=7&e;return e!=jspb.BinaryConstants.WireType.VARINT&&e!=jspb.BinaryConstants.WireType.FIXED32&&e!=jspb.BinaryConstants.WireType.FIXED64&&e!=jspb.BinaryConstants.WireType.DELIMITED&&e!=jspb.BinaryConstants.WireType.START_GROUP&&e!=jspb.BinaryConstants.WireType.END_GROUP?(goog.asserts.fail("Invalid wire type"),this.error_=!0,!1):(this.nextField_=t,this.nextWireType_=e,!0)},jspb.BinaryReader.prototype.unskipHeader=function(){this.decoder_.unskipVarint(this.nextField_<<3|this.nextWireType_)},jspb.BinaryReader.prototype.skipMatchingFields=function(){var e=this.nextField_;for(this.unskipHeader();this.nextField()&&this.getFieldNumber()==e;)this.skipField();this.decoder_.atEnd()||this.unskipHeader()},jspb.BinaryReader.prototype.skipVarintField=function(){this.nextWireType_==jspb.BinaryConstants.WireType.VARINT?this.decoder_.skipVarint():(goog.asserts.fail("Invalid wire type for skipVarintField"),this.skipField())},jspb.BinaryReader.prototype.skipDelimitedField=function(){if(this.nextWireType_!=jspb.BinaryConstants.WireType.DELIMITED)goog.asserts.fail("Invalid wire type for skipDelimitedField"),this.skipField();else{var e=this.decoder_.readUnsignedVarint32();this.decoder_.advance(e)}},jspb.BinaryReader.prototype.skipFixed32Field=function(){this.nextWireType_==jspb.BinaryConstants.WireType.FIXED32?this.decoder_.advance(4):(goog.asserts.fail("Invalid wire type for skipFixed32Field"),this.skipField())},jspb.BinaryReader.prototype.skipFixed64Field=function(){this.nextWireType_==jspb.BinaryConstants.WireType.FIXED64?this.decoder_.advance(8):(goog.asserts.fail("Invalid wire type for skipFixed64Field"),this.skipField())},jspb.BinaryReader.prototype.skipGroup=function(){var e=[this.nextField_];do{if(!this.nextField()){goog.asserts.fail("Unmatched start-group tag: stream EOF"),this.error_=!0;break}if(this.nextWireType_==jspb.BinaryConstants.WireType.START_GROUP)e.push(this.nextField_);else if(this.nextWireType_==jspb.BinaryConstants.WireType.END_GROUP&&this.nextField_!=e.pop()){goog.asserts.fail("Unmatched end-group tag"),this.error_=!0;break}}while(0a)throw new TypeError("Bad iterations");if("number"!=typeof n)throw new TypeError("Key length not a number");if(0>n||1073741823=0.10.0"},homepage:"https://github.com/theturtle32/WebSocket-Node",keywords:["websocket","websockets","socket","networking","comet","push","RFC-6455","realtime","server","client"],license:"Apache-2.0",main:"index",name:"websocket",repository:{type:"git",url:"git+https://github.com/theturtle32/WebSocket-Node.git"},scripts:{gulp:"gulp",install:"(node-gyp rebuild 2> builderror.log) || (exit 0)",test:"faucet test/unit"},version:"1.0.26"}},{}],495:[function(e,t,r){arguments[4][289][0].apply(r,arguments)},{dup:289}],496:[function(e,t,r){arguments[4][290][0].apply(r,arguments)},{"./xml-http-request":500,"./xml-http-request-event-target":498,dup:290}],497:[function(e,t,r){arguments[4][291][0].apply(r,arguments)},{dup:291}],498:[function(e,t,r){arguments[4][292][0].apply(r,arguments)},{dup:292}],499:[function(e,t,r){arguments[4][293][0].apply(r,arguments)},{"./xml-http-request-event-target":498,buffer:73,dup:293}],500:[function(e,t,r){arguments[4][294][0].apply(r,arguments)},{"./errors":495,"./progress-event":497,"./xml-http-request-event-target":498,"./xml-http-request-upload":499,_process:71,buffer:73,cookiejar:346,dup:294,http:206,https:135,os:151,url:223}],501:[function(e,t,r){var a=e("google-protobuf"),n=a,s=Function("return this")();n.exportSymbol("proto.AccountGasLimit",null,s),n.exportSymbol("proto.BlackList",null,s),n.exportSymbol("proto.Block",null,s),n.exportSymbol("proto.BlockBody",null,s),n.exportSymbol("proto.BlockHeader",null,s),n.exportSymbol("proto.BlockTxs",null,s),n.exportSymbol("proto.BlockWithProof",null,s),n.exportSymbol("proto.Crypto",null,s),n.exportSymbol("proto.Proof",null,s),n.exportSymbol("proto.ProofType",null,s),n.exportSymbol("proto.RichStatus",null,s),n.exportSymbol("proto.SignedTransaction",null,s),n.exportSymbol("proto.Status",null,s),n.exportSymbol("proto.Transaction",null,s),n.exportSymbol("proto.UnverifiedTransaction",null,s),proto.Proof=function(e){a.Message.initialize(this,e,0,-1,null,null)},n.inherits(proto.Proof,a.Message),n.DEBUG&&!COMPILED&&(proto.Proof.displayName="proto.Proof"),a.Message.GENERATE_TO_OBJECT&&(proto.Proof.prototype.toObject=function(e){return proto.Proof.toObject(e,this)},proto.Proof.toObject=function(e,t){var r={content:t.getContent_asB64(),type:a.Message.getFieldWithDefault(t,2,0)};return e&&(r.$jspbMessageInstance=t),r}),proto.Proof.deserializeBinary=function(e){var t=new a.BinaryReader(e),r=new proto.Proof;return proto.Proof.deserializeBinaryFromReader(r,t)},proto.Proof.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){var r=t.getFieldNumber();switch(r){case 1:var a=t.readBytes();e.setContent(a);break;case 2:var a=t.readEnum();e.setType(a);break;default:t.skipField();}}return e},proto.Proof.prototype.serializeBinary=function(){var e=new a.BinaryWriter;return proto.Proof.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.Proof.serializeBinaryToWriter=function(e,t){var r;r=e.getContent_asU8(),0{e.appchain=e.appchain||{},e.extend({property:"appchain",methods:[d.peerCount,d.getMetaData,d.getAbi,d.getCode,d.getBalance,d.getTransactionReceipt,d.getAccounts,d.getBlock,d.getBlockByHash,d.getBlockByNumber,d.getBlockNumber,d.getBlockTransactionCount,d.getTransaction,d.getTransactionCount,d.getTransactionProof,d.sendSignedTransaction,d.signTransaction,d.sendTransaction,d.sign,d.call,d.newMessageFilter,d.newBlockFilter,d.getFilterLogs,d.getFilterChanges,d.deleteMessageFilter,d.getLogs,p.getAccounts,p.newAccount,p.sign,p.ecRecover]}),e.appchain.accounts=e.eth.accounts,u.default.setProvider(e.currentProvider),u.default.accounts=e.appchain.accounts,e.appchain.Contract=u.default,e=c.default(e),e.appchain.signer=o.default,e.appchain.unsigner=o.unsigner,e.appchain.deploy=(t,r)=>n(this,void 0,void 0,function*(){const n=yield e.appchain.getBlockNumber().catch(e=>{console.error(e)});let s="",i=[],o=[],d="";"string"==typeof t?s=t:t.code&&(s=t.code,i=t.args||[],o=t.initTypes||[]),i.length&&(d=e.eth.abi.encodeParameters(o,i));const p=Object.assign({version:0,value:0,nonce:a(10*Math.random())},r,{data:s.replace(/^0x/,"")+d,validUntilBlock:+n+88}),c=l.default(e.eth.accounts.wallet)(p),u=yield e.appchain.sendTransaction(c).catch(e=>{throw new Error(e)});return u.hash?e.listeners.listenToTransactionReceipt(u.hash):new Error("No Transaction Hash Received")}),e.appchain._abiAddress="ffffffffffffffffffffffffffffffffff010001",Object.defineProperty(e.appchain,"abiAddress",{get:()=>e.appchain._abiAddress,set:t=>{if(e.utils.isAddress(t))e.appchain._abiAddress=t.replace(/^0x/,"");else throw new Error("Not valid address")}}),e.appchain.storeAbi=(t,r,s)=>n(this,void 0,void 0,function*(){if(!t)throw new Error("Store ABI needs contract address");if(!Array.isArray(r))throw new Error("ABI should be Array type");const n=Object.assign({version:0,value:0,nonce:a(10*Math.random())},s,{to:e.appchain.abiAddress}),i=l.default(e.eth.accounts.wallet)(n);try{const a=e.utils.utf8ToHex(JSON.stringify(r)).slice(2);i.data=t.replace(/^0x/i,"")+a}catch(e){throw new Error(e)}const o=yield e.appchain.sendTransaction(i),d=yield e.listeners.listenToTransactionReceipt(o.hash);return d});const t={sign:e.appchain.neuron_sign};return e.appchain.personal=t,f.default(e)}},{"../contract":8,"../utils/addPrivateKey":20,"./listener":2,"./neuron":3,"./proxy":4,"./rpc":6,"@nervos/signer":296}],2:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});const a=["getTransactionReceipt","getTransaction","getTransactionProof","getFilterChanges"];r.default=e=>{let t={};return a.forEach(r=>{t[`listenTo${r.slice(3)}`]=(t,a=10)=>new Promise((n,s)=>{let i=a,o=null;const d=()=>{clearInterval(o)};o=setInterval(()=>{i||(d(),s("No Result Receved")),e.appchain[r](t).then(e=>{i--,e&&(clearInterval(o),n(e))})},1e3)})}),e.listeners=t,e}},{}],3:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a=e("web3-core-helpers").formatters,n=e("web3-utils");r.getAccounts={name:"getAccounts",call:"personal_listAccounts",params:0,outputFormatter:n.toChecksumAddress},r.newAccount={name:"newAccount",call:"personal_newAccount",params:1,inputFormatter:[null],outputFormatter:n.toChecksumAddress},r.unlockAccount={name:"unlockAccount",call:"personal_unlockAccount",params:3,inputFormatter:[a.inputAddressFormatter,null,null]},r.lockAccount={name:"lockAccount",call:"personal_lockAccount",params:1,inputFormatter:[a.inputAddressFormatter]},r.sign={name:"neuron_sign",call:"neuron_sign",params:3,inputFormatter:[a.inputSignFormatter,a.inputAddressFormatter,null],transformPayload:function(e){return e.params.reverse(),e}},r.ecRecover={name:"ecRecover",call:"personal_ecRecover",params:2,inputFormatter:[a.inputSignFormatter,null]}},{"web3-core-helpers":231,"web3-utils":275}],4:[function(e,t,r){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0});const n=a(e("./proxyHandlers"));r.default=e=>(e.appchain.sendTransaction=new Proxy(e.appchain.sendTransaction,n.default.sendTransactionHandler),e)},{"./proxyHandlers":5}],5:[function(e,t,r){"use strict";var a=this&&this.__awaiter||function(e,t,r,a){return new(r||(r=Promise))(function(n,s){function i(e){try{d(a.next(e))}catch(t){s(t)}}function o(e){try{d(a["throw"](e))}catch(t){s(t)}}function d(e){e.done?n(e.value):new r(function(t){t(e.value)}).then(i,o)}d((a=a.apply(e,t||[])).next())})},n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0});const s=n(e("../../utils/addPrivateKey"));r.sendTransactionHandler={apply:function(e,t,r){return a(this,void 0,void 0,function*(){const a=r[0],n=s.default(t.accounts.wallet)(a);return e(n)})}},r.default={sendTransactionHandler:r.sendTransactionHandler}},{"../../utils/addPrivateKey":20}],6:[function(e,t,r){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t};Object.defineProperty(r,"__esModule",{value:!0});const s=a(e("@nervos/signer"));var i=e("underscore"),o=e("web3-core-helpers").formatters,d=e("web3-utils");const p=n(e("../utils/outputFormatters"));r.peerCount={name:"peerCount",call:"peerCount",params:0},r.getMetaData={name:"getMetaData",call:"getMetaData",params:1,inputFormatter:[o.inputDefaultBlockNumberFormatter]},r.getAbi={name:"getAbi",call:"getAbi",params:2,inputFormatter:[o.inputAddressFormatter,o.inputDefaultBlockNumberFormatter],outputFormatter:p.outputAbiFormatter},r.getTransactionReceipt={name:"getTransactionReceipt",call:"getTransactionReceipt",params:1,outputFormatter:o.outputTransactionReceiptFormatter},r.getCode={name:"getCode",call:"getCode",params:2,inputFormatter:[o.inputAddressFormatter,o.inputDefaultBlockNumberFormatter]},r.getAccounts={name:"getAccounts",call:"accounts",params:0,outputFormatter:d.toChecksumAddress},r.getBalance={name:"getBalance",call:"getBalance",params:2,inputFormatter:[o.inputAddressFormatter,o.inputDefaultBlockNumberFormatter],outputFormatter:d.hexToNumberString};r.getBlock={name:"getBlock",call:function(e){return i.isString(e[0])&&0===e[0].indexOf("0x")?"getBlockByHash":"getBlockByNumber"},params:2,inputFormatter:[o.inputBlockNumberFormatter,function(e){return!!e}],outputFormatter:o.outputBlockFormatter},r.getBlockByHash={name:"getBlockByHash",call:"getBlockByHash",params:2,inputFormatter:[o.inputBlockNumberFormatter,function(e){return!!e}],outputFormatter:o.outputBlockFormatter},r.getBlockByNumber={name:"getBlockByNumber",call:"getBlockByNumber",params:2,inputFormatter:[o.inputBlockNumberFormatter,function(e){return!!e}],outputFormatter:o.outputBlockFormatter},r.getBlockNumber={name:"getBlockNumber",call:"blockNumber",params:0,outputFormatter:d.hexToNumber};r.getBlockTransactionCount={name:"getBlockTransactionCount",call:function(e){return i.isString(e[0])&&0===e[0].indexOf("0x")?"getBlockTransactionCountByHash":"getBlockTransactionCountByNumber"},params:1,inputFormatter:[o.inputBlockNumberFormatter],outputFormatter:d.hexToNumber},r.getTransaction={name:"getTransaction",call:"getTransaction",params:1,inputFormatter:[null]},r.getTransactionCount={name:"getTransactionCount",call:"getTransactionCount",params:2,inputFormatter:[o.inputAddressFormatter,o.inputDefaultBlockNumberFormatter],outputFormatter:d.hexToNumber},r.getTransactionProof={name:"getTransactionProof",call:"getTransactionProof",params:1,inputFormatter:[o.inputAddressFormatter]},r.sendSignedTransaction={name:"sendSignedTransaction",call:"sendRawTransaction",params:1,inputFormatter:[null]},r.signTransaction={name:"signTransaction",call:"signTransaction",params:1,inputFormatter:[s.default]};r.sendTransaction={name:"sendTransaction",call:e=>e&&e.length&&e[0]&&e[0].privateKey?"sendRawTransaction":"sendTransaction",params:1,inputFormatter:[s.default]},r.newMessageFilter={name:"newMessageFilter",call:"newFilter",params:1},r.newBlockFilter={name:"newBlockFilter",call:"newBlockFilter",params:0},r.getFilterChanges={name:"getFilterChanges",call:"getFilterChanges",params:1},r.getFilterLogs={name:"getFilterLogs",call:"getFilterLogs",params:1},r.deleteMessageFilter={name:"deleteMessageFilter",call:"uninstallFilter",params:1},r.sign={name:"sign",call:"sign",params:2,inputFormatter:[o.inputSignFormatter,o.inputAddressFormatter],transformPayload:function(e){return e.params.reverse(),e}},r.call={name:"call",call:"call",params:2,inputFormatter:[o.inputCallFormatter,o.inputDefaultBlockNumberFormatter]},r.getLogs={name:"getLogs",call:"getLogs",params:1}},{"../utils/outputFormatters":21,"@nervos/signer":296,underscore:221,"web3-core-helpers":231,"web3-utils":275}],7:[function(e,t,r){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0});const n=a(e("./index"));window&&(window.Nervos=n.default)},{"./index":9}],8:[function(e,t,r){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t};Object.defineProperty(r,"__esModule",{value:!0});const s=a(e("@nervos/signer")),i=a(e("../utils/addPrivateKey")),o=n(e("underscore")),d=e("web3-eth-contract"),p=e("web3-core-method"),c=e("web3-utils"),{formatters:l}=e("web3-core-helpers"),u=e("web3-core-promievent");var f;(function(e){e.NONE="",e.CALL="call",e.SEND="send",e.SEND_TRANSACTION="sendTransaction"})(f||(f={}));const y=e=>{const t=i.default(d.accounts.wallet)(e);return s.default(t)};d.prototype._executeMethod=function(){const e=this;let t=this._parent._processExecuteArguments.call(this,Array.prototype.slice.call(arguments),void 0);var r=u("send"!==t.type);const a=e.constructor._ethAccounts||e._ethAccounts;if(t.generateRequest){const e={params:[l.inputCallFormatter.call(this._parent,t.options)],callback:t.callback,method:"",format:null};return t.type===f.CALL?(e.params.push(l.inputDefaultBlockNumberFormatter.call(this._parent,t.defaultBlock)),e.method=f.CALL,e.format=this._parent._decodeMethodReturn.bind(null,this._method.outputs)):e.method=f.SEND_TRANSACTION,e}switch(t.type){case f.CALL:const s=new p({name:"call",call:f.CALL,params:2,inputFormatter:[l.inputCallFormatter,l.inputDefaultBlockNumberFormatter],outputFormatter:function(t){return e._parent._decodeMethodReturn(e._method.outputs,t)},requestManager:e._parent._requestManager,accounts:a,defaultAccount:e._parent.defaultAccount,defaultBlock:e._parent.defaultBlock}).createFunction();return s(t.options,t.defaultBlock,t.callback);case f.SEND:if(!c.isAddress(t.options.from))return c._fireError(new Error("No \"from\" address specified in neither the given options, nor the default options."),r.eventEmitter,r.reject,t.callback);if(o.isBoolean(this._method.payable)&&!this._method.payable&&t.options.value&&0{if(o.isArray(t.logs)){var r=o.map(t.logs,function(t){return e._parent._decodeEventABI.call({name:"ALLEVENTS",jsonInterface:e._parent.options.jsonInterface},t)});t.events={};let a=0;r.forEach(e=>{e.event?t.events[e.event]?Array.isArray(t.events[e.event])?t.events[e.event].push(e):t.events[e.event]=[t.events[e.event],e]:t.events[e.event]=e:(t.events[a]=e,a++)}),delete t.logs}return t},contractDeployFormatter:t=>{const r=e._parent.clone();return r.options.address=t.contractAddress,r}}}).createFunction();return n(t.options,t.callback);}},r.default=d},{"../utils/addPrivateKey":20,"@nervos/signer":296,underscore:221,"web3-core-helpers":231,"web3-core-method":232,"web3-core-promievent":233,"web3-eth-contract":263,"web3-utils":275}],9:[function(e,t,r){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0});const n=a(e("web3")),s=a(e("./systems")),i=a(e("./appchain")),o=a(e("./utils/patchHexToBytes"));r.default=(e,t=n.default)=>{const r=new t(e);o.default(r);const a=i.default(r),d=s.default(a);return d}},{"./appchain":1,"./systems":19,"./utils/patchHexToBytes":22,web3:279}],10:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=[{constant:!1,inputs:[{name:"_account",type:"address"}],name:"update",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"_account",type:"address"}],name:"isAdmin",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"admin",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{inputs:[{name:"_account",type:"address"}],payable:!1,stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,name:"_account",type:"address"},{indexed:!0,name:"_old",type:"address"},{indexed:!0,name:"_sender",type:"address"}],name:"AdminUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"errorType",type:"uint8"},{indexed:!1,name:"msg",type:"string"}],name:"ErrorLog",type:"event"}]},{}],11:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=[{constant:!0,inputs:[],name:"deleteRoleAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_account",type:"address"},{name:"_permission",type:"address"}],name:"cancelAuth",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"createContractAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_account",type:"address"},{name:"_permission",type:"address"}],name:"checkPermission",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_permission",type:"address"}],name:"queryAccounts",outputs:[{name:"_accounts",type:"address[]"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"rootGroupAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"groupCreatorAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"newPermissionAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_permission",type:"address"}],name:"clearAuthOfPermission",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"permissionCreatorAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"deleteGroupAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"newRoleAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"cancelAuthAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"cancelRoleAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"newGroupAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"roleManagementAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"deletePermissionAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"setAuthAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"adminAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"updateRoleAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_account",type:"address"}],name:"queryPermissions",outputs:[{name:"_permissions",type:"address[]"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"userManagementAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"updateGroupAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_account",type:"address"}],name:"clearAuth",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"permissionManagementAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"authorizationAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"setRoleAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"sendTxAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"queryAllAccounts",outputs:[{name:"",type:"address[]"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_account",type:"address"},{name:"_cont",type:"address"},{name:"_func",type:"bytes4"}],name:"checkResource",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"roleAuthAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"updatePermissionAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"roleCreatorAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_account",type:"address"},{name:"_permission",type:"address"}],name:"setAuth",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{inputs:[{name:"_superAdmin",type:"address"}],payable:!1,stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,name:"_account",type:"address"},{indexed:!0,name:"_permission",type:"address"}],name:"AuthSetted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"_account",type:"address"},{indexed:!0,name:"_permission",type:"address"}],name:"AuthCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"_account",type:"address"}],name:"AuthCleared",type:"event"}]},{}],12:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=[{constant:!1,inputs:[],name:"getChainId",outputs:[{name:"",type:"uint32"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"chainId",type:"uint32"},{name:"blockNumber",type:"uint64"},{name:"stateProof",type:"bytes"}],name:"verifyState",outputs:[{name:"",type:"address"},{name:"",type:"uint256"},{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"chainId",type:"uint32"},{name:"blockHeader",type:"bytes"}],name:"verifyBlockHeader",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"id",type:"uint32"}],name:"getAuthorities",outputs:[{name:"",type:"address[]"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"getParentChainId",outputs:[{name:"",type:"uint32"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"id",type:"uint32"}],name:"enableSideChain",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"chainId",type:"uint32"}],name:"getExpectedBlockNumber",outputs:[{name:"",type:"uint64"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"sideChainId",type:"uint32"},{name:"addrs",type:"address[]"}],name:"newSideChain",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"id",type:"uint32"}],name:"disableSideChain",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"",type:"uint32"}],name:"sideChains",outputs:[{name:"status",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{inputs:[{name:"_pid",type:"uint32"},{name:"_addrs",type:"address[]"}],payable:!1,stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,name:"errorType",type:"uint8"},{indexed:!1,name:"msg",type:"string"}],name:"ErrorLog",type:"event"}]},{}],13:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=[{constant:!0,inputs:[],name:"deleteRoleAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"createContractAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_origin",type:"address"},{name:"_target",type:"address"},{name:"_accounts",type:"address[]"}],name:"addAccounts",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"rootGroupAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"groupCreatorAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"newPermissionAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"permissionCreatorAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"deleteGroupAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"newRoleAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"cancelAuthAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"cancelRoleAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"newGroupAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"roleManagementAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"deletePermissionAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"queryGroups",outputs:[{name:"",type:"address[]"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"setAuthAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_origin",type:"address"},{name:"_target",type:"address"},{name:"_name",type:"bytes32"}],name:"updateGroupName",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"adminAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"updateRoleAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"userManagementAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"updateGroupAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_origin",type:"address"},{name:"_target",type:"address"}],name:"deleteGroup",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"permissionManagementAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"authorizationAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"setRoleAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"sendTxAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_origin",type:"address"},{name:"_name",type:"bytes32"},{name:"_accounts",type:"address[]"}],name:"newGroup",outputs:[{name:"new_group",type:"address"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"_origin",type:"address"},{name:"_target",type:"address"},{name:"_accounts",type:"address[]"}],name:"deleteAccounts",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"roleAuthAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"updatePermissionAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_origin",type:"address"},{name:"_target",type:"address"}],name:"checkScope",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"roleCreatorAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{inputs:[],payable:!1,stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!1,name:"_group",type:"address"}],name:"GroupDeleted",type:"event"}]},{}],14:[function(e,t,r){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0});const n=a(e("./admin")),s=a(e("./authorization")),i=a(e("./chainManager")),o=a(e("./groupManagement")),d=a(e("./nodeManager")),p=a(e("./permissionManagement")),c=a(e("./quotaManager")),l={admin:n.default,authorization:s.default,chainManager:i.default,groupManagement:o.default,nodeManager:d.default,permissionManagement:p.default,quotaManager:c.default};r.default=l},{"./admin":10,"./authorization":11,"./chainManager":12,"./groupManagement":13,"./nodeManager":15,"./permissionManagement":16,"./quotaManager":17}],15:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=[{constant:!0,inputs:[],name:"deleteRoleAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_node",type:"address"}],name:"stakePermillage",outputs:[{name:"",type:"uint64"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"createContractAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_node",type:"address"}],name:"deleteNode",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"rootGroupAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_node",type:"address"}],name:"getStatus",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"groupCreatorAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"newPermissionAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"permissionCreatorAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"deleteGroupAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_node",type:"address"},{name:"stake",type:"uint64"}],name:"setStake",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"newRoleAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"cancelAuthAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"listNode",outputs:[{name:"",type:"address[]"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"cancelRoleAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"address"}],name:"status",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"newGroupAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"listStake",outputs:[{name:"_stakes",type:"uint64[]"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"roleManagementAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"deletePermissionAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"setAuthAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"adminAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"updateRoleAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"userManagementAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"updateGroupAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"permissionManagementAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"authorizationAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"setRoleAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"sendTxAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_node",type:"address"}],name:"approveNode",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"roleAuthAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"updatePermissionAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"roleCreatorAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{inputs:[{name:"_nodes",type:"address[]"},{name:"_stakes",type:"uint64[]"}],payable:!1,stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,name:"errorType",type:"uint8"},{indexed:!1,name:"msg",type:"string"}],name:"ErrorLog",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"_node",type:"address"}],name:"ApproveNode",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"_node",type:"address"}],name:"DeleteNode",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"_node",type:"address"},{indexed:!1,name:"_stake",type:"uint256"}],name:"SetStake",type:"event"}]},{}],16:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=[{constant:!0,inputs:[],name:"deleteRoleAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_account",type:"address"},{name:"_permission",type:"address"}],name:"setAuthorization",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"createContractAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"rootGroupAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"groupCreatorAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_account",type:"address"},{name:"_permission",type:"address"}],name:"cancelAuthorization",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"newPermissionAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"permissionCreatorAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"deleteGroupAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_account",type:"address"},{name:"_permissions",type:"address[]"}],name:"setAuthorizations",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"_permission",type:"address"},{name:"_name",type:"bytes32"}],name:"updatePermissionName",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"newRoleAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"cancelAuthAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"cancelRoleAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_permission",type:"address"},{name:"_conts",type:"address[]"},{name:"_funcs",type:"bytes4[]"}],name:"deleteResources",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"newGroupAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"roleManagementAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"deletePermissionAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"setAuthAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"adminAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"updateRoleAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_permission",type:"address"}],name:"deletePermission",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"userManagementAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_account",type:"address"}],name:"clearAuthorization",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"updateGroupAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_account",type:"address"},{name:"_permissions",type:"address[]"}],name:"cancelAuthorizations",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"permissionManagementAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"authorizationAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"setRoleAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"sendTxAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"roleAuthAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"updatePermissionAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"roleCreatorAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_permission",type:"address"},{name:"_conts",type:"address[]"},{name:"_funcs",type:"bytes4[]"}],name:"addResources",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"_name",type:"bytes32"},{name:"_conts",type:"address[]"},{name:"_funcs",type:"bytes4[]"}],name:"newPermission",outputs:[{name:"id",type:"address"}],payable:!1,stateMutability:"nonpayable",type:"function"},{anonymous:!1,inputs:[{indexed:!1,name:"_permission",type:"address"}],name:"PermissionDeleted",type:"event"}]},{}],17:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=[{constant:!0,inputs:[],name:"deleteRoleAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"getBQL",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"createContractAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"rootGroupAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"groupCreatorAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"newPermissionAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"permissionCreatorAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"deleteGroupAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_account",type:"address"},{name:"_value",type:"uint256"}],name:"setAQL",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"newRoleAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"cancelAuthAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"cancelRoleAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"newGroupAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"roleManagementAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"deletePermissionAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"setAuthAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"adminAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"updateRoleAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"getAccounts",outputs:[{name:"",type:"address[]"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_value",type:"uint256"}],name:"setBQL",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"_account",type:"address"}],name:"getAQL",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"userManagementAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"updateGroupAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_value",type:"uint256"}],name:"setDefaultAQL",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"permissionManagementAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"getDefaultAQL",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"authorizationAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"setRoleAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"sendTxAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"getQuotas",outputs:[{name:"",type:"uint256[]"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"roleAuthAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"updatePermissionAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"roleCreatorAddr",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{inputs:[{name:"_admin",type:"address"}],payable:!1,stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,name:"errorType",type:"uint8"},{indexed:!1,name:"msg",type:"string"}],name:"ErrorLog",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"_value",type:"uint256"},{indexed:!0,name:"_sender",type:"address"}],name:"DefaultAqlSetted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"_value",type:"uint256"},{indexed:!0,name:"_sender",type:"address"}],name:"BqlSetted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"_account",type:"address"},{indexed:!1,name:"_value",type:"uint256"},{indexed:!0,name:"_sender",type:"address"}],name:"AqlSetted",type:"event"}]},{}],18:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.ReservedAddr={admin:"0xffffffffffffffffffffffffffffffffff02000c",authorization:"0xffffffffffffffffffffffffffffffffff020006",chainManageer:"0xffffffffffffffffffffffffffffffffff020002",groupManagement:"0xffffffffffffffffffffffffffffffffff02000a",nodeManager:"0xffffffffffffffffffffffffffffffffff020001",permissionManagement:"0xffffffffffffffffffffffffffffffffff020004",quotaManager:"0xffffffffffffffffffffffffffffffffff020003"}},{}],19:[function(e,t,r){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0});const n=e("./config"),s=a(e("./abis")),i=["admin","authorization","chainManager","groupManagement","nodeManager","permissionManagement","quotaManager"],o=(e,t)=>new e.appchain.Contract(s.default[t],n.ReservedAddr[t]);r.default=e=>{const t={};return i.forEach(r=>{t[r]=o(e,r)}),Object.assign(e,{system:t})}},{"./abis":14,"./config":18}],20:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=e=>t=>!e.length||t.privateKey&&(66===t.privateKey.length||64===t.privateKey.length)?t:(t.privateKey||(t.privateKey=e[0].privateKey,t.from=e[0].from),t)},{}],21:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a=e("web3-utils");r.outputAbiFormatter=e=>{if("string"!=typeof e)throw new Error("Malformed ABI");const t=a.hexToUtf8(e);try{const e=JSON.parse(t);return e}catch(e){throw new Error("Malformed ABI")}}},{"web3-utils":275}],22:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=e=>{e.utils.hexToBytes=new Proxy(e.utils.hexToBytes,{apply:(e,t,r)=>{let a=(""+r[0]||"").replace(/^0x/,"");return a.length%2&&(a="0"+a),e("0x"+a)}})}},{}],23:[function(e,t){t.exports=e("./register")().Promise},{"./register":25}],24:[function(e,t){"use strict";var r=null;t.exports=function(e,t){return function(a,n){a=a||null,n=n||{};var s=!1!==n.global;if(null===r&&s&&(r=e["@@any-promise/REGISTRATION"]||null),null!==r&&null!==a&&r.implementation!==a)throw new Error("any-promise already defined as \""+r.implementation+"\". You can only register an implementation before the first call to require(\"any-promise\") and an implementation cannot be changed");return null===r&&(r=null!==a&&"undefined"!=typeof n.Promise?{Promise:n.Promise,implementation:a}:t(a),s&&(e["@@any-promise/REGISTRATION"]=r)),r}}},{}],25:[function(e,t){"use strict";t.exports=e("./loader")(window,function(){if("undefined"==typeof window.Promise)throw new Error("any-promise browser requires a polyfill or explicit registration e.g: require('any-promise/register/bluebird')");return{Promise:window.Promise,implementation:"window.Promise"}})},{"./loader":24}],26:[function(e,t,r){var a=r;a.bignum=e("bn.js"),a.define=e("./asn1/api").define,a.base=e("./asn1/base"),a.constants=e("./asn1/constants"),a.decoders=e("./asn1/decoders"),a.encoders=e("./asn1/encoders")},{"./asn1/api":27,"./asn1/base":29,"./asn1/constants":33,"./asn1/decoders":35,"./asn1/encoders":38,"bn.js":41}],27:[function(e,t,r){function a(e,t){this.name=e,this.body=t,this.decoders={},this.encoders={}}var n=e("../asn1"),s=e("inherits");r.define=function(e,t){return new a(e,t)};a.prototype._createNamed=function(t){var r;try{r=e("vm").runInThisContext("(function "+this.name+"(entity) {\n this._initNamed(entity);\n})")}catch(t){r=function(e){this._initNamed(e)}}return s(r,t),r.prototype._initNamed=function(e){t.call(this,e)},new r(this)},a.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(n.decoders[e])),this.decoders[e]},a.prototype.decode=function(e,t,r){return this._getDecoder(t).decode(e,r)},a.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(n.encoders[e])),this.encoders[e]},a.prototype.encode=function(e,t,r){return this._getEncoder(t).encode(e,r)}},{"../asn1":26,inherits:137,vm:227}],28:[function(e,t,r){function a(e,t){return i.call(this,t),o.isBuffer(e)?void(this.base=e,this.offset=0,this.length=e.length):void this.error("Input not Buffer")}function n(e,t){if(Array.isArray(e))this.length=0,this.value=e.map(function(e){return e instanceof n||(e=new n(e,t)),this.length+=e.length,e},this);else if("number"==typeof e){if(!(0<=e&&255>=e))return t.error("non-byte EncoderBuffer value");this.value=e,this.length=1}else if("string"==typeof e)this.value=e,this.length=o.byteLength(e);else if(o.isBuffer(e))this.value=e,this.length=e.length;else return t.error("Unsupported type: "+typeof e)}var s=e("inherits"),i=e("../base").Reporter,o=e("buffer").Buffer;s(a,i),r.DecoderBuffer=a,a.prototype.save=function(){return{offset:this.offset,reporter:i.prototype.save.call(this)}},a.prototype.restore=function(e){var t=new a(this.base);return t.offset=e.offset,t.length=this.offset,this.offset=e.offset,i.prototype.restore.call(this,e.reporter),t},a.prototype.isEmpty=function(){return this.offset===this.length},a.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")},a.prototype.skip=function(e,t){if(!(this.offset+e<=this.length))return this.error(t||"DecoderBuffer overrun");var r=new a(this.base);return r._reporterState=this._reporterState,r.offset=this.offset,r.length=this.offset+e,this.offset+=e,r},a.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)},r.EncoderBuffer=n,n.prototype.join=function(e,t){return(e||(e=new o(this.length)),t||(t=0),0===this.length)?e:(Array.isArray(this.value)?this.value.forEach(function(r){r.join(e,t),t+=r.length}):("number"==typeof this.value?e[t]=this.value:"string"==typeof this.value?e.write(this.value,t):o.isBuffer(this.value)&&this.value.copy(e,t),t+=this.length),e)}},{"../base":29,buffer:73,inherits:137}],29:[function(e,t,r){var a=r;a.Reporter=e("./reporter").Reporter,a.DecoderBuffer=e("./buffer").DecoderBuffer,a.EncoderBuffer=e("./buffer").EncoderBuffer,a.Node=e("./node")},{"./buffer":28,"./node":30,"./reporter":31}],30:[function(e,t){function r(e,t){var r={};this._baseState=r,r.enc=e,r.parent=t||null,r.children=null,r.tag=null,r.args=null,r.reverseArgs=null,r.choice=null,r.optional=!1,r.any=!1,r.obj=!1,r.use=null,r.useDecoder=null,r.key=null,r["default"]=null,r.explicit=null,r.implicit=null,r.contains=null,r.parent||(r.children=[],this._wrap())}var a=e("../base").Reporter,n=e("../base").EncoderBuffer,s=e("../base").DecoderBuffer,i=e("minimalistic-assert"),o=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],d=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(o);t.exports=r;var p=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];r.prototype.clone=function(){var e=this._baseState,t={};p.forEach(function(r){t[r]=e[r]});var r=new this.constructor(t.parent);return r._baseState=t,r},r.prototype._wrap=function(){var e=this._baseState;d.forEach(function(t){this[t]=function(){var r=new this.constructor(this);return e.children.push(r),r[t].apply(r,arguments)}},this)},r.prototype._init=function(e){var t=this._baseState;i(null===t.parent),e.call(this),t.children=t.children.filter(function(e){return e._baseState.parent===this},this),i.equal(t.children.length,1,"Root node can have only one child")},r.prototype._useArgs=function(e){var t=this._baseState,r=e.filter(function(e){return e instanceof this.constructor},this);e=e.filter(function(e){return!(e instanceof this.constructor)},this),0!==r.length&&(i(null===t.children),t.children=r,r.forEach(function(e){e._baseState.parent=this},this)),0!==e.length&&(i(null===t.args),t.args=e,t.reverseArgs=e.map(function(e){if("object"!=typeof e||e.constructor!==Object)return e;var t={};return Object.keys(e).forEach(function(r){r==(0|r)&&(r|=0);var a=e[r];t[a]=r}),t}))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach(function(e){r.prototype[e]=function(){var t=this._baseState;throw new Error(e+" not implemented for encoding: "+t.enc)}}),o.forEach(function(e){r.prototype[e]=function(){var t=this._baseState,r=Array.prototype.slice.call(arguments);return i(null===t.tag),t.tag=e,this._useArgs(r),this}}),r.prototype.use=function(e){i(e);var t=this._baseState;return i(null===t.use),t.use=e,this},r.prototype.optional=function(){var e=this._baseState;return e.optional=!0,this},r.prototype.def=function(e){var t=this._baseState;return i(null===t["default"]),t["default"]=e,t.optional=!0,this},r.prototype.explicit=function(e){var t=this._baseState;return i(null===t.explicit&&null===t.implicit),t.explicit=e,this},r.prototype.implicit=function(e){var t=this._baseState;return i(null===t.explicit&&null===t.implicit),t.implicit=e,this},r.prototype.obj=function(){var e=this._baseState,t=Array.prototype.slice.call(arguments);return e.obj=!0,0!==t.length&&this._useArgs(t),this},r.prototype.key=function(e){var t=this._baseState;return i(null===t.key),t.key=e,this},r.prototype.any=function(){var e=this._baseState;return e.any=!0,this},r.prototype.choice=function(e){var t=this._baseState;return i(null===t.choice),t.choice=e,this._useArgs(Object.keys(e).map(function(t){return e[t]})),this},r.prototype.contains=function(e){var t=this._baseState;return i(null===t.use),t.contains=e,this},r.prototype._decode=function(e,t){var r=this._baseState;if(null===r.parent)return e.wrapResult(r.children[0]._decode(e,t));var a=r["default"],n=!0,i=null;if(null!==r.key&&(i=e.enterKey(r.key)),r.optional){var o=null;if(null===r.explicit?null===r.implicit?null!==r.tag&&(o=r.tag):o=r.implicit:o=r.explicit,null===o&&!r.any){var d=e.save();try{null===r.choice?this._decodeGeneric(r.tag,e,t):this._decodeChoice(e,t),n=!0}catch(t){n=!1}e.restore(d)}else if(n=this._peekTag(e,o,r.any),e.isError(n))return n}var p;if(r.obj&&n&&(p=e.enterObject()),n){if(null!==r.explicit){var c=this._decodeTag(e,r.explicit);if(e.isError(c))return c;e=c}var l=e.offset;if(null===r.use&&null===r.choice){if(r.any)var d=e.save();var u=this._decodeTag(e,null===r.implicit?r.tag:r.implicit,r.any);if(e.isError(u))return u;r.any?a=e.raw(d):e=u}if(t&&t.track&&null!==r.tag&&t.track(e.path(),l,e.length,"tagged"),t&&t.track&&null!==r.tag&&t.track(e.path(),e.offset,e.length,"content"),a=r.any?a:null===r.choice?this._decodeGeneric(r.tag,e,t):this._decodeChoice(e,t),e.isError(a))return a;if(r.any||null!==r.choice||null===r.children||r.children.forEach(function(r){r._decode(e,t)}),r.contains&&("octstr"===r.tag||"bitstr"===r.tag)){var f=new s(a);a=this._getUse(r.contains,e._reporterState.obj)._decode(f,t)}}return r.obj&&n&&(a=e.leaveObject(p)),null!==r.key&&(null!==a||!0===n)?e.leaveKey(i,r.key,a):null!==i&&e.exitKey(i),a},r.prototype._decodeGeneric=function(e,t,r){var a=this._baseState;if("seq"===e||"set"===e)return null;return"seqof"===e||"setof"===e?this._decodeList(t,e,a.args[0],r):/str$/.test(e)?this._decodeStr(t,e,r):"objid"===e&&a.args?this._decodeObjid(t,a.args[0],a.args[1],r):"objid"===e?this._decodeObjid(t,null,null,r):"gentime"===e||"utctime"===e?this._decodeTime(t,e,r):"null_"===e?this._decodeNull(t,r):"bool"===e?this._decodeBool(t,r):"objDesc"===e?this._decodeStr(t,e,r):"int"===e||"enum"===e?this._decodeInt(t,a.args&&a.args[0],r):null===a.use?t.error("unknown tag: "+e):this._getUse(a.use,t._reporterState.obj)._decode(t,r)},r.prototype._getUse=function(e,t){var r=this._baseState;return r.useDecoder=this._use(e,t),i(null===r.useDecoder._baseState.parent),r.useDecoder=r.useDecoder._baseState.children[0],r.implicit!==r.useDecoder._baseState.implicit&&(r.useDecoder=r.useDecoder.clone(),r.useDecoder._baseState.implicit=r.implicit),r.useDecoder},r.prototype._decodeChoice=function(t,e){var r=this._baseState,a=null,n=!1;return Object.keys(r.choice).some(function(s){var i=t.save(),o=r.choice[s];try{var d=o._decode(t,e);if(t.isError(d))return!1;a={type:s,value:d},n=!0}catch(r){return t.restore(i),!1}return!0},this),n?a:t.error("Choice not matched")},r.prototype._createEncoderBuffer=function(e){return new n(e,this.reporter)},r.prototype._encode=function(e,t,r){var a=this._baseState;if(null===a["default"]||a["default"]!==e){var n=this._encodeValue(e,t,r);return void 0===n||this._skipDefault(n,t,r)?void 0:n}},r.prototype._encodeValue=function(e,t,r){var n=this._baseState;if(null===n.parent)return n.children[0]._encode(e,t||new a);var s=null;if(this.reporter=t,n.optional&&void 0===e)if(null!==n["default"])e=n["default"];else return;var i=null,o=!1;if(n.any)s=this._createEncoderBuffer(e);else if(n.choice)s=this._encodeChoice(e,t);else if(n.contains)i=this._getUse(n.contains,r)._encode(e,t),o=!0;else if(n.children)i=n.children.map(function(r){if("null_"===r._baseState.tag)return r._encode(null,t,e);if(null===r._baseState.key)return t.error("Child should have a key");var a=t.enterKey(r._baseState.key);if("object"!=typeof e)return t.error("Child expected, but input is not object");var n=r._encode(e[r._baseState.key],t,e);return t.leaveKey(a),n},this).filter(function(e){return e}),i=this._createEncoderBuffer(i);else if("seqof"===n.tag||"setof"===n.tag){if(!(n.args&&1===n.args.length))return t.error("Too many args for : "+n.tag);if(!Array.isArray(e))return t.error("seqof/setof, but data is not Array");var d=this.clone();d._baseState.implicit=null,i=this._createEncoderBuffer(e.map(function(r){var a=this._baseState;return this._getUse(a.args[0],e)._encode(r,t)},d))}else null===n.use?(i=this._encodePrimitive(n.tag,e),o=!0):s=this._getUse(n.use,r)._encode(e,t);var s;if(!n.any&&null===n.choice){var p=null===n.implicit?n.tag:n.implicit,c=null===n.implicit?"universal":"context";null===p?null===n.use&&t.error("Tag could be omitted only for .use()"):null===n.use&&(s=this._encodeComposite(p,o,c,i))}return null!==n.explicit&&(s=this._encodeComposite(n.explicit,!1,"context",s)),s},r.prototype._encodeChoice=function(e,t){var r=this._baseState,a=r.choice[e.type];return a||i(!1,e.type+" not found in "+JSON.stringify(Object.keys(r.choice))),a._encode(e.value,t)},r.prototype._encodePrimitive=function(e,t){var r=this._baseState;if(/str$/.test(e))return this._encodeStr(t,e);if("objid"===e&&r.args)return this._encodeObjid(t,r.reverseArgs[0],r.args[1]);if("objid"===e)return this._encodeObjid(t,null,null);if("gentime"===e||"utctime"===e)return this._encodeTime(t,e);if("null_"===e)return this._encodeNull();if("int"===e||"enum"===e)return this._encodeInt(t,r.args&&r.reverseArgs[0]);if("bool"===e)return this._encodeBool(t);if("objDesc"===e)return this._encodeStr(t,e);throw new Error("Unsupported tag: "+e)},r.prototype._isNumstr=function(e){return /^[0-9 ]*$/.test(e)},r.prototype._isPrintstr=function(e){return /^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(e)}},{"../base":29,"minimalistic-assert":145}],31:[function(e,t,r){function a(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}function n(e,t){this.path=e,this.rethrow(t)}var s=e("inherits");r.Reporter=a,a.prototype.isError=function(e){return e instanceof n},a.prototype.save=function(){var e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}},a.prototype.restore=function(e){var t=this._reporterState;t.obj=e.obj,t.path=t.path.slice(0,e.pathLen)},a.prototype.enterKey=function(e){return this._reporterState.path.push(e)},a.prototype.exitKey=function(e){var t=this._reporterState;t.path=t.path.slice(0,e-1)},a.prototype.leaveKey=function(e,t,r){var a=this._reporterState;this.exitKey(e),null!==a.obj&&(a.obj[t]=r)},a.prototype.path=function(){return this._reporterState.path.join("/")},a.prototype.enterObject=function(){var e=this._reporterState,t=e.obj;return e.obj={},t},a.prototype.leaveObject=function(e){var t=this._reporterState,r=t.obj;return t.obj=e,r},a.prototype.error=function(e){var t=this._reporterState,r=e instanceof n,a;if(a=r?e:new n(t.path.map(function(e){return"["+JSON.stringify(e)+"]"}).join(""),e.message||e,e.stack),!t.options.partial)throw a;return r||t.errors.push(a),a},a.prototype.wrapResult=function(e){var t=this._reporterState;return t.options.partial?{result:this.isError(e)?null:e,errors:t.errors}:e};s(n,Error),n.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,n),!this.stack)try{throw new Error(this.message)}catch(t){this.stack=t.stack}return this}},{inherits:137}],32:[function(e,t,r){var a=e("../constants");r.tagClass={0:"universal",1:"application",2:"context",3:"private"},r.tagClassByName=a._reverse(r.tagClass),r.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},r.tagByName=a._reverse(r.tag)},{"../constants":33}],33:[function(e,t,r){var a=r;a._reverse=function(e){var t={};return Object.keys(e).forEach(function(r){(0|r)==r&&(r|=0);var a=e[r];t[a]=r}),t},a.der=e("./der")},{"./der":32}],34:[function(e,t){function r(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new a,this.tree._init(e.body)}function a(e){d.Node.call(this,"der",e)}function n(e,t){var r=e.readUInt8(t);if(e.isError(r))return r;var a=c.tagClass[r>>6],n=0==(32&r);if(31==(31&r)){var s=r;for(r=0;128==(128&s);){if(s=e.readUInt8(t),e.isError(s))return s;r<<=7,r|=127&s}}else r&=31;var i=c.tag[r];return{cls:a,primitive:n,tag:r,tagStr:i}}function s(e,t,r){var a=e.readUInt8(r);if(e.isError(a))return a;if(!t&&128===a)return null;if(0==(128&a))return a;var n=127&a;if(4a?2e3+a:1900+a}else return e.error("Decoding "+t+" time is not supported yet");return Date.UTC(a,n-1,s,i,o,d,0)},a.prototype._decodeNull=function(){return null},a.prototype._decodeBool=function(e){var t=e.readUInt8();return e.isError(t)?t:0!==t},a.prototype._decodeInt=function(e,t){var r=e.raw(),a=new p(r);return t&&(a=t[a.toString(10)]||a),a},a.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getDecoder("der").tree}},{"../../asn1":26,inherits:137}],35:[function(e,t,r){var a=r;a.der=e("./der"),a.pem=e("./pem")},{"./der":34,"./pem":36}],36:[function(e,t){function r(e){s.call(this,e),this.enc="pem"}var a=e("inherits"),n=e("buffer").Buffer,s=e("./der");a(r,s),t.exports=r,r.prototype.decode=function(e,t){for(var r=e.toString().split(/[\r\n]+/g),a=t.label.toUpperCase(),o=/^-----(BEGIN|END) ([^-]+)-----$/,d=-1,p=-1,c=0,l;ce?"0"+e:e}function s(e,t,r,a){var n;if("seqof"===e?e="seq":"setof"==e&&(e="set"),c.tagByName.hasOwnProperty(e))n=c.tagByName[e];else if("number"==typeof e&&(0|e)===e)n=e;else return a.error("Unknown tag: "+e);return 31<=n?a.error("Multi-octet tag encoding unsupported"):(t||(n|=32),n|=c.tagClassByName[r||"universal"]<<6,n)}var i=e("inherits"),o=e("buffer").Buffer,d=e("../../asn1"),p=d.base,c=d.constants.der;t.exports=r,r.prototype.encode=function(e,t){return this.tree._encode(e,t).join()},i(a,p.Node),a.prototype._encodeComposite=function(e,t,r,a){var n=s(e,t,r,this.reporter);if(128>a.length){var d=new o(2);return d[0]=n,d[1]=a.length,this._createEncoderBuffer([d,a])}for(var p=1,c=a.length;256<=c;c>>=8)p++;var d=new o(2+p);d[0]=n,d[1]=128|p;for(var c=1+p,l=a.length;0>=8)d[c]=255&l;return this._createEncoderBuffer([d,a])},a.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){for(var r=new o(2*e.length),a=0;a>=7)n++;for(var d=new o(n),p=d.length-1,a=e.length-1,s;0<=a;a--)for(s=e[a],d[p--]=127&s;0<(s>>=7);)d[p--]=128|127&s;return this._createEncoderBuffer(d)},a.prototype._encodeTime=function(e,t){var r=new Date(e),a;return"gentime"===t?a=[n(r.getFullYear()),n(r.getUTCMonth()+1),n(r.getUTCDate()),n(r.getUTCHours()),n(r.getUTCMinutes()),n(r.getUTCSeconds()),"Z"].join(""):"utctime"===t?a=[n(r.getFullYear()%100),n(r.getUTCMonth()+1),n(r.getUTCDate()),n(r.getUTCHours()),n(r.getUTCMinutes()),n(r.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(a,"octstr")},a.prototype._encodeNull=function(){return this._createEncoderBuffer("")},a.prototype._encodeInt=function(e,t){if("string"==typeof e){if(!t)return this.reporter.error("String int or enum given, but no values map");if(!t.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=t[e]}if("number"!=typeof e&&!o.isBuffer(e)){var r=e.toArray();!e.sign&&128&r[0]&&r.unshift(0),e=new o(r)}if(o.isBuffer(e)){var a=e.length;0===e.length&&a++;var n=new o(a);return e.copy(n),0===e.length&&(n[0]=0),this._createEncoderBuffer(n)}if(128>e)return this._createEncoderBuffer(e);if(256>e)return this._createEncoderBuffer([0,e]);for(var a=1,s=e;256<=s;s>>=8)a++;for(var n=Array(a),s=n.length-1;0<=s;s--)n[s]=255&e,e>>=8;return 128&n[0]&&n.unshift(0),this._createEncoderBuffer(new o(n))},a.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},a.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getEncoder("der").tree},a.prototype._skipDefault=function(e,t,r){var a=this._baseState,n;if(null===a["default"])return!1;var s=e.join();if(void 0===a.defaultBuffer&&(a.defaultBuffer=this._encodeValue(a["default"],t,r).join()),s.length!==a.defaultBuffer.length)return!1;for(n=0;n>16,o[d++]=255&f>>8,o[d++]=255&f;return 2===s&&(f=l[e.charCodeAt(c)]<<2|l[e.charCodeAt(c+1)]>>4,o[d++]=255&f),1===s&&(f=l[e.charCodeAt(c)]<<10|l[e.charCodeAt(c+1)]<<4|l[e.charCodeAt(c+2)]>>2,o[d++]=255&f>>8,o[d++]=255&f),o}function o(e){return c[63&e>>18]+c[63&e>>12]+c[63&e>>6]+c[63&e]}function d(e,t,r){for(var a=[],n=t,s;no?o:s+n));return 1===r?(p=e[t-1],a.push(c[p>>2]+c[63&p<<4]+"==")):2===r&&(p=(e[t-2]<<8)+e[t-1],a.push(c[p>>10]+c[63&p>>4]+c[63&p<<2]+"=")),a.join("")}r.byteLength=function(e){var t=a(e),r=t[0],n=t[1];return 3*(r+n)/4-n},r.toByteArray=s,r.fromByteArray=p;for(var c=[],l=[],u="undefined"==typeof Uint8Array?Array:Uint8Array,f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",y=0,b=f.length;y=p?p-49+10:17<=p&&22>=p?p-17+10:15&p;return n}function y(e,t,a,n){for(var s=0,o=d(e.length,a),p=t,l;p>>n}return t}function g(e,t,n){n.negative=t.negative^e.negative;var s=0|e.length+t.length;n.length=s,s=0|s-1;var p=0|e.words[0],c=0|t.words[0],l=p*c,u=67108863&l,f=0|l/67108864;n.words[0]=u;for(var y=1;y>>26,h=67108863&f,m=d(y,t.length-1),_=o(0,y-e.length+1),v;_<=m;_++)v=0|y-_,p=0|e.words[v],c=0|t.words[_],l=p*c+h,g+=0|l/67108864,h=67108863&l;n.words[y]=0|h,f=0|g}return 0===f?n.length--:n.words[y]=0|f,n.strip()}function h(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var s=0,p=0,c=0,l;c>>26),p+=l>>>26,l&=67108863}n.words[c]=u,s=l,l=p}return 0===s?n.length--:n.words[c]=s,n.strip()}function m(e,t,r){var a=new _;return a.mulp(e,t,r)}function _(e,t){this.x=e,this.y=t}function v(e,t){this.name=e,this.p=new f(t,16),this.n=this.p.bitLength(),this.k=new f(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function w(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function S(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function A(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function B(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function k(e){if("string"==typeof e){var t=f._prime(e);this.m=t.p,this.prime=t}else l(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function x(e){k.call(this,e),this.shift=this.m.bitLength(),0!=this.shift%26&&(this.shift+=26-this.shift%26),this.r=new f(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)}"object"==typeof t?t.exports=f:i.BN=f,f.BN=f,f.wordSize=26;var E;try{E=e("buffer").Buffer}catch(t){}f.isBN=function(e){return!!(e instanceof f)||null!==e&&"object"==typeof e&&e.constructor.wordSize===f.wordSize&&Array.isArray(e.words)},f.max=function(e,t){return 0e.cmp(t)?e:t},f.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),l(t===(0|t)&&2<=t&&36>=t),e=e.toString().replace(/\s+/g,"");var a=0;"-"===e[0]&&a++,16===t?this._parseHex(e,a):this._parseBase(e,t,a),"-"===e[0]&&(this.negative=1),this.strip();"le"!==r||this._initArray(this.toArray(),t,r)},f.prototype._initNumber=function(e,t,r){0>e&&(this.negative=1,e=-e),67108864>e?(this.words=[67108863&e],this.length=1):4503599627370496>e?(this.words=[67108863&e,67108863&e/67108864],this.length=2):(l(9007199254740992>e),this.words=[67108863&e,67108863&e/67108864,1],this.length=3);"le"!==r||this._initArray(this.toArray(),t,r)},f.prototype._initArray=function(e,t,r){if(l("number"==typeof e.length),0>=e.length)return this.words=[0],this.length=1,this;this.length=s(e.length/3),this.words=Array(this.length);for(var a=0;a>>26-n,n+=24,26<=n&&(n-=26,o++);else if("le"===r)for(a=0,o=0;a>>26-n,n+=24,26<=n&&(n-=26,o++);return this.strip()},f.prototype._parseHex=function(e,t){this.length=s((e.length-t)/6),this.words=Array(this.length);for(var r=0;r=t;r-=6)o=u(e,r,r+6),this.words[n]|=67108863&o<>>26-a,a+=24,26<=a&&(a-=26,n++);r+6!==t&&(o=u(e,t,r+6),this.words[n]|=67108863&o<>>26-a),this.strip()},f.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var a=0,n=1;67108863>=n;n*=t)a++;a--,n=0|n/t;for(var s=e.length-r,o=s%a,p=d(s,s-o)+r,c=0,l=r;lthis.words[0]+c?this.words[0]+=c:this._iaddn(c);if(0!==o){var u=1;for(c=y(e,l,e.length,t),l=0;lthis.words[0]+c?this.words[0]+=c:this._iaddn(c)}},f.prototype.copy=function(e){e.words=Array(this.length);for(var t=0;t"};var T=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],M=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],I=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];f.prototype.toString=function(e,t){e=e||10,t=0|t||1;var a;if(16===e||"hex"===e){a="";for(var n=0,s=0,o=0;o>>24-n,a=0!==s||o!=this.length-1?T[6-p.length]+p+a:p+a,n+=2,26<=n&&(n-=26,o--)}for(0!==s&&(a=s.toString(16)+a);0!=a.length%t;)a="0"+a;return 0!==this.negative&&(a="-"+a),a}if(e===(0|e)&&2<=e&&36>=e){var u=M[e],f=I[e];a="";var y=this.clone();for(y.negative=0;!y.isZero();){var b=y.modn(f).toString(e);y=y.idivn(f),a=y.isZero()?b+a:T[u-b.length]+b+a}for(this.isZero()&&(a="0"+a);0!=a.length%t;)a="0"+a;return 0!==this.negative&&(a="-"+a),a}l(!1,"Base should be between 2 and 36")},f.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:2>>=13),64<=a&&(n+=7,a>>>=7),8<=a&&(n+=4,a>>>=4),2<=a&&(n+=2,a>>>=2),n+a},f.prototype._zeroBits=function(e){if(0===e)return 26;var a=e,n=0;return 0==(8191&a)&&(n+=13,a>>>=13),0==(127&a)&&(n+=7,a>>>=7),0==(15&a)&&(n+=4,a>>>=4),0==(3&a)&&(n+=2,a>>>=2),0==(1&a)&&n++,n},f.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},f.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0,a;te.length?this.clone().ior(e):e.clone().ior(this)},f.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},f.prototype.iuand=function(e){var t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},f.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},f.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},f.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},f.prototype.inotn=function(e){l("number"==typeof e&&0<=e);var t=0|s(e/26),r=e%26;this._expand(t),0>26-r),this.strip()},f.prototype.notn=function(e){return this.clone().inotn(e)},f.prototype.setn=function(e,t){l("number"==typeof e&&0<=e);var r=0|e/26,a=e%26;return this._expand(r+1),t?this.words[r]|=1<e.length?(n=this,s=e):(n=e,s=this);for(var o=0,d=0;d>>26;for(;0!==o&&d>>26;if(this.length=n.length,0!==o)this.words[this.length]=o,this.length++;else if(n!==this)for(;de.length?this.clone().iadd(e):e.clone().iadd(this)},f.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n=this.cmp(e);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;var s,d;0>26,this.words[c]=67108863&t;for(;0!==p&&c>26,this.words[c]=67108863&t;if(0===p&&c>>13,u=0|s[1],f=8191&u,y=u>>>13,b=0|s[2],g=8191&b,h=b>>>13,m=0|s[3],_=8191&m,v=m>>>13,w=0|s[4],S=8191&w,A=w>>>13,B=0|s[5],k=8191&B,x=B>>>13,E=0|s[6],T=8191&E,M=E>>>13,I=0|s[7],C=8191&I,R=I>>>13,P=0|s[8],F=8191&P,O=P>>>13,N=0|s[9],j=8191&N,L=N>>>13,D=0|a[0],U=8191&D,W=D>>>13,H=0|a[1],q=8191&H,z=H>>>13,V=0|a[2],G=8191&V,K=V>>>13,X=0|a[3],Y=8191&X,Z=X>>>13,J=0|a[4],$=8191&J,Q=J>>>13,ee=0|a[5],te=8191&ee,re=ee>>>13,ae=0|a[6],ne=8191&ae,se=ae>>>13,ie=0|a[7],oe=8191&ie,de=ie>>>13,pe=0|a[8],ce=8191&pe,le=pe>>>13,ue=0|a[9],fe=8191&ue,ye=ue>>>13,be,ge,he;r.negative=e.negative^t.negative,r.length=19,be=n(p,U),ge=n(p,W),ge=0|ge+n(l,U),he=n(l,W);var me=0|(0|o+be)+((8191&ge)<<13);o=0|(0|he+(ge>>>13))+(me>>>26),me&=67108863,be=n(f,U),ge=n(f,W),ge=0|ge+n(y,U),he=n(y,W),be=0|be+n(p,q),ge=0|ge+n(p,z),ge=0|ge+n(l,q),he=0|he+n(l,z);var _e=0|(0|o+be)+((8191&ge)<<13);o=0|(0|he+(ge>>>13))+(_e>>>26),_e&=67108863,be=n(g,U),ge=n(g,W),ge=0|ge+n(h,U),he=n(h,W),be=0|be+n(f,q),ge=0|ge+n(f,z),ge=0|ge+n(y,q),he=0|he+n(y,z),be=0|be+n(p,G),ge=0|ge+n(p,K),ge=0|ge+n(l,G),he=0|he+n(l,K);var ve=0|(0|o+be)+((8191&ge)<<13);o=0|(0|he+(ge>>>13))+(ve>>>26),ve&=67108863,be=n(_,U),ge=n(_,W),ge=0|ge+n(v,U),he=n(v,W),be=0|be+n(g,q),ge=0|ge+n(g,z),ge=0|ge+n(h,q),he=0|he+n(h,z),be=0|be+n(f,G),ge=0|ge+n(f,K),ge=0|ge+n(y,G),he=0|he+n(y,K),be=0|be+n(p,Y),ge=0|ge+n(p,Z),ge=0|ge+n(l,Y),he=0|he+n(l,Z);var we=0|(0|o+be)+((8191&ge)<<13);o=0|(0|he+(ge>>>13))+(we>>>26),we&=67108863,be=n(S,U),ge=n(S,W),ge=0|ge+n(A,U),he=n(A,W),be=0|be+n(_,q),ge=0|ge+n(_,z),ge=0|ge+n(v,q),he=0|he+n(v,z),be=0|be+n(g,G),ge=0|ge+n(g,K),ge=0|ge+n(h,G),he=0|he+n(h,K),be=0|be+n(f,Y),ge=0|ge+n(f,Z),ge=0|ge+n(y,Y),he=0|he+n(y,Z),be=0|be+n(p,$),ge=0|ge+n(p,Q),ge=0|ge+n(l,$),he=0|he+n(l,Q);var Se=0|(0|o+be)+((8191&ge)<<13);o=0|(0|he+(ge>>>13))+(Se>>>26),Se&=67108863,be=n(k,U),ge=n(k,W),ge=0|ge+n(x,U),he=n(x,W),be=0|be+n(S,q),ge=0|ge+n(S,z),ge=0|ge+n(A,q),he=0|he+n(A,z),be=0|be+n(_,G),ge=0|ge+n(_,K),ge=0|ge+n(v,G),he=0|he+n(v,K),be=0|be+n(g,Y),ge=0|ge+n(g,Z),ge=0|ge+n(h,Y),he=0|he+n(h,Z),be=0|be+n(f,$),ge=0|ge+n(f,Q),ge=0|ge+n(y,$),he=0|he+n(y,Q),be=0|be+n(p,te),ge=0|ge+n(p,re),ge=0|ge+n(l,te),he=0|he+n(l,re);var Ae=0|(0|o+be)+((8191&ge)<<13);o=0|(0|he+(ge>>>13))+(Ae>>>26),Ae&=67108863,be=n(T,U),ge=n(T,W),ge=0|ge+n(M,U),he=n(M,W),be=0|be+n(k,q),ge=0|ge+n(k,z),ge=0|ge+n(x,q),he=0|he+n(x,z),be=0|be+n(S,G),ge=0|ge+n(S,K),ge=0|ge+n(A,G),he=0|he+n(A,K),be=0|be+n(_,Y),ge=0|ge+n(_,Z),ge=0|ge+n(v,Y),he=0|he+n(v,Z),be=0|be+n(g,$),ge=0|ge+n(g,Q),ge=0|ge+n(h,$),he=0|he+n(h,Q),be=0|be+n(f,te),ge=0|ge+n(f,re),ge=0|ge+n(y,te),he=0|he+n(y,re),be=0|be+n(p,ne),ge=0|ge+n(p,se),ge=0|ge+n(l,ne),he=0|he+n(l,se);var Be=0|(0|o+be)+((8191&ge)<<13);o=0|(0|he+(ge>>>13))+(Be>>>26),Be&=67108863,be=n(C,U),ge=n(C,W),ge=0|ge+n(R,U),he=n(R,W),be=0|be+n(T,q),ge=0|ge+n(T,z),ge=0|ge+n(M,q),he=0|he+n(M,z),be=0|be+n(k,G),ge=0|ge+n(k,K),ge=0|ge+n(x,G),he=0|he+n(x,K),be=0|be+n(S,Y),ge=0|ge+n(S,Z),ge=0|ge+n(A,Y),he=0|he+n(A,Z),be=0|be+n(_,$),ge=0|ge+n(_,Q),ge=0|ge+n(v,$),he=0|he+n(v,Q),be=0|be+n(g,te),ge=0|ge+n(g,re),ge=0|ge+n(h,te),he=0|he+n(h,re),be=0|be+n(f,ne),ge=0|ge+n(f,se),ge=0|ge+n(y,ne),he=0|he+n(y,se),be=0|be+n(p,oe),ge=0|ge+n(p,de),ge=0|ge+n(l,oe),he=0|he+n(l,de);var ke=0|(0|o+be)+((8191&ge)<<13);o=0|(0|he+(ge>>>13))+(ke>>>26),ke&=67108863,be=n(F,U),ge=n(F,W),ge=0|ge+n(O,U),he=n(O,W),be=0|be+n(C,q),ge=0|ge+n(C,z),ge=0|ge+n(R,q),he=0|he+n(R,z),be=0|be+n(T,G),ge=0|ge+n(T,K),ge=0|ge+n(M,G),he=0|he+n(M,K),be=0|be+n(k,Y),ge=0|ge+n(k,Z),ge=0|ge+n(x,Y),he=0|he+n(x,Z),be=0|be+n(S,$),ge=0|ge+n(S,Q),ge=0|ge+n(A,$),he=0|he+n(A,Q),be=0|be+n(_,te),ge=0|ge+n(_,re),ge=0|ge+n(v,te),he=0|he+n(v,re),be=0|be+n(g,ne),ge=0|ge+n(g,se),ge=0|ge+n(h,ne),he=0|he+n(h,se),be=0|be+n(f,oe),ge=0|ge+n(f,de),ge=0|ge+n(y,oe),he=0|he+n(y,de),be=0|be+n(p,ce),ge=0|ge+n(p,le),ge=0|ge+n(l,ce),he=0|he+n(l,le);var xe=0|(0|o+be)+((8191&ge)<<13);o=0|(0|he+(ge>>>13))+(xe>>>26),xe&=67108863,be=n(j,U),ge=n(j,W),ge=0|ge+n(L,U),he=n(L,W),be=0|be+n(F,q),ge=0|ge+n(F,z),ge=0|ge+n(O,q),he=0|he+n(O,z),be=0|be+n(C,G),ge=0|ge+n(C,K),ge=0|ge+n(R,G),he=0|he+n(R,K),be=0|be+n(T,Y),ge=0|ge+n(T,Z),ge=0|ge+n(M,Y),he=0|he+n(M,Z),be=0|be+n(k,$),ge=0|ge+n(k,Q),ge=0|ge+n(x,$),he=0|he+n(x,Q),be=0|be+n(S,te),ge=0|ge+n(S,re),ge=0|ge+n(A,te),he=0|he+n(A,re),be=0|be+n(_,ne),ge=0|ge+n(_,se),ge=0|ge+n(v,ne),he=0|he+n(v,se),be=0|be+n(g,oe),ge=0|ge+n(g,de),ge=0|ge+n(h,oe),he=0|he+n(h,de),be=0|be+n(f,ce),ge=0|ge+n(f,le),ge=0|ge+n(y,ce),he=0|he+n(y,le),be=0|be+n(p,fe),ge=0|ge+n(p,ye),ge=0|ge+n(l,fe),he=0|he+n(l,ye);var Ee=0|(0|o+be)+((8191&ge)<<13);o=0|(0|he+(ge>>>13))+(Ee>>>26),Ee&=67108863,be=n(j,q),ge=n(j,z),ge=0|ge+n(L,q),he=n(L,z),be=0|be+n(F,G),ge=0|ge+n(F,K),ge=0|ge+n(O,G),he=0|he+n(O,K),be=0|be+n(C,Y),ge=0|ge+n(C,Z),ge=0|ge+n(R,Y),he=0|he+n(R,Z),be=0|be+n(T,$),ge=0|ge+n(T,Q),ge=0|ge+n(M,$),he=0|he+n(M,Q),be=0|be+n(k,te),ge=0|ge+n(k,re),ge=0|ge+n(x,te),he=0|he+n(x,re),be=0|be+n(S,ne),ge=0|ge+n(S,se),ge=0|ge+n(A,ne),he=0|he+n(A,se),be=0|be+n(_,oe),ge=0|ge+n(_,de),ge=0|ge+n(v,oe),he=0|he+n(v,de),be=0|be+n(g,ce),ge=0|ge+n(g,le),ge=0|ge+n(h,ce),he=0|he+n(h,le),be=0|be+n(f,fe),ge=0|ge+n(f,ye),ge=0|ge+n(y,fe),he=0|he+n(y,ye);var Te=0|(0|o+be)+((8191&ge)<<13);o=0|(0|he+(ge>>>13))+(Te>>>26),Te&=67108863,be=n(j,G),ge=n(j,K),ge=0|ge+n(L,G),he=n(L,K),be=0|be+n(F,Y),ge=0|ge+n(F,Z),ge=0|ge+n(O,Y),he=0|he+n(O,Z),be=0|be+n(C,$),ge=0|ge+n(C,Q),ge=0|ge+n(R,$),he=0|he+n(R,Q),be=0|be+n(T,te),ge=0|ge+n(T,re),ge=0|ge+n(M,te),he=0|he+n(M,re),be=0|be+n(k,ne),ge=0|ge+n(k,se),ge=0|ge+n(x,ne),he=0|he+n(x,se),be=0|be+n(S,oe),ge=0|ge+n(S,de),ge=0|ge+n(A,oe),he=0|he+n(A,de),be=0|be+n(_,ce),ge=0|ge+n(_,le),ge=0|ge+n(v,ce),he=0|he+n(v,le),be=0|be+n(g,fe),ge=0|ge+n(g,ye),ge=0|ge+n(h,fe),he=0|he+n(h,ye);var Me=0|(0|o+be)+((8191&ge)<<13);o=0|(0|he+(ge>>>13))+(Me>>>26),Me&=67108863,be=n(j,Y),ge=n(j,Z),ge=0|ge+n(L,Y),he=n(L,Z),be=0|be+n(F,$),ge=0|ge+n(F,Q),ge=0|ge+n(O,$),he=0|he+n(O,Q),be=0|be+n(C,te),ge=0|ge+n(C,re),ge=0|ge+n(R,te),he=0|he+n(R,re),be=0|be+n(T,ne),ge=0|ge+n(T,se),ge=0|ge+n(M,ne),he=0|he+n(M,se),be=0|be+n(k,oe),ge=0|ge+n(k,de),ge=0|ge+n(x,oe),he=0|he+n(x,de),be=0|be+n(S,ce),ge=0|ge+n(S,le),ge=0|ge+n(A,ce),he=0|he+n(A,le),be=0|be+n(_,fe),ge=0|ge+n(_,ye),ge=0|ge+n(v,fe),he=0|he+n(v,ye);var Ie=0|(0|o+be)+((8191&ge)<<13);o=0|(0|he+(ge>>>13))+(Ie>>>26),Ie&=67108863,be=n(j,$),ge=n(j,Q),ge=0|ge+n(L,$),he=n(L,Q),be=0|be+n(F,te),ge=0|ge+n(F,re),ge=0|ge+n(O,te),he=0|he+n(O,re),be=0|be+n(C,ne),ge=0|ge+n(C,se),ge=0|ge+n(R,ne),he=0|he+n(R,se),be=0|be+n(T,oe),ge=0|ge+n(T,de),ge=0|ge+n(M,oe),he=0|he+n(M,de),be=0|be+n(k,ce),ge=0|ge+n(k,le),ge=0|ge+n(x,ce),he=0|he+n(x,le),be=0|be+n(S,fe),ge=0|ge+n(S,ye),ge=0|ge+n(A,fe),he=0|he+n(A,ye);var Ce=0|(0|o+be)+((8191&ge)<<13);o=0|(0|he+(ge>>>13))+(Ce>>>26),Ce&=67108863,be=n(j,te),ge=n(j,re),ge=0|ge+n(L,te),he=n(L,re),be=0|be+n(F,ne),ge=0|ge+n(F,se),ge=0|ge+n(O,ne),he=0|he+n(O,se),be=0|be+n(C,oe),ge=0|ge+n(C,de),ge=0|ge+n(R,oe),he=0|he+n(R,de),be=0|be+n(T,ce),ge=0|ge+n(T,le),ge=0|ge+n(M,ce),he=0|he+n(M,le),be=0|be+n(k,fe),ge=0|ge+n(k,ye),ge=0|ge+n(x,fe),he=0|he+n(x,ye);var Re=0|(0|o+be)+((8191&ge)<<13);o=0|(0|he+(ge>>>13))+(Re>>>26),Re&=67108863,be=n(j,ne),ge=n(j,se),ge=0|ge+n(L,ne),he=n(L,se),be=0|be+n(F,oe),ge=0|ge+n(F,de),ge=0|ge+n(O,oe),he=0|he+n(O,de),be=0|be+n(C,ce),ge=0|ge+n(C,le),ge=0|ge+n(R,ce),he=0|he+n(R,le),be=0|be+n(T,fe),ge=0|ge+n(T,ye),ge=0|ge+n(M,fe),he=0|he+n(M,ye);var Pe=0|(0|o+be)+((8191&ge)<<13);o=0|(0|he+(ge>>>13))+(Pe>>>26),Pe&=67108863,be=n(j,oe),ge=n(j,de),ge=0|ge+n(L,oe),he=n(L,de),be=0|be+n(F,ce),ge=0|ge+n(F,le),ge=0|ge+n(O,ce),he=0|he+n(O,le),be=0|be+n(C,fe),ge=0|ge+n(C,ye),ge=0|ge+n(R,fe),he=0|he+n(R,ye);var Fe=0|(0|o+be)+((8191&ge)<<13);o=0|(0|he+(ge>>>13))+(Fe>>>26),Fe&=67108863,be=n(j,ce),ge=n(j,le),ge=0|ge+n(L,ce),he=n(L,le),be=0|be+n(F,fe),ge=0|ge+n(F,ye),ge=0|ge+n(O,fe),he=0|he+n(O,ye);var Oe=0|(0|o+be)+((8191&ge)<<13);o=0|(0|he+(ge>>>13))+(Oe>>>26),Oe&=67108863,be=n(j,fe),ge=n(j,ye),ge=0|ge+n(L,fe),he=n(L,ye);var Ne=0|(0|o+be)+((8191&ge)<<13);return o=0|(0|he+(ge>>>13))+(Ne>>>26),Ne&=67108863,i[0]=me,i[1]=_e,i[2]=ve,i[3]=we,i[4]=Se,i[5]=Ae,i[6]=Be,i[7]=ke,i[8]=xe,i[9]=Ee,i[10]=Te,i[11]=Me,i[12]=Ie,i[13]=Ce,i[14]=Re,i[15]=Pe,i[16]=Fe,i[17]=Oe,i[18]=Ne,0!==o&&(i[19]=o,r.length++),r};n||(C=g),f.prototype.mulTo=function(e,t){var r=this.length+e.length,a;return a=10===this.length&&10===e.length?C(this,e,t):63>r?g(this,e,t):1024>r?h(this,e,t):m(this,e,t),a},_.prototype.makeRBT=function(e){for(var r=Array(e),t=f.prototype._countBits(e)-1,a=0;a>=1;return a},_.prototype.permute=function(e,t,r,a,n,s){for(var o=0;o>>=1)n++;return 1<=a))for(var n=0,s;n
n?0:0|n/67108864;return e},_.prototype.convert13b=function(e,t,r,a){for(var n=0,s=0;s>>=13,r[2*s+1]=8191&n,n>>>=13;for(s=2*t;se);for(var t=0,r=0;r>=26,t+=0|a/67108864,t+=n>>>26,this.words[r]=67108863&n}return 0!==t&&(this.words[r]=t,this.length++),this},f.prototype.muln=function(e){return this.clone().imuln(e)},f.prototype.sqr=function(){return this.mul(this)},f.prototype.isqr=function(){return this.imul(this.clone())},f.prototype.pow=function(e){var t=b(e);if(0===t.length)return new f(1);for(var r=this,a=0;a>>26-t<<26-t,o=(0|this.words[a])-s<>>26-t}n&&(this.words[a]=n,this.length++)}if(0!==r){for(a=this.length-1;0<=a;a--)this.words[a+r]=this.words[a];for(a=0;ar)for(this.length-=r,c=0;c=n);c--){var f=0|this.words[c];this.words[c]=u<<26-p|f>>>p,u=f&(67108863^67108863>>>p<>>t<e),0>e?this.isubn(-e):0===this.negative?this._iaddn(e):1===this.length&&(0|this.words[0])e),0>e)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&0>this.words[0])this.words[0]=-this.words[0],this.negative=1;else for(var t=0;tthis.words[t];t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},f.prototype.addn=function(e){return this.clone().iaddn(e)},f.prototype.subn=function(e){return this.clone().isubn(e)},f.prototype.iabs=function(){return this.negative=0,this},f.prototype.abs=function(){return this.clone().iabs()},f.prototype._ishlnsubmul=function(e,t,r){var a=e.length+r,n;this._expand(a);var s=0,o;for(n=0;n>26)-(0|d/67108864),this.words[n+r]=67108863&o}for(;n>26,this.words[n+r]=67108863&o;if(0===s)return this.strip();for(l(-1===s),s=0,n=0;n>26,this.words[n]=67108863&o;return this.negative=1,this.strip()},f.prototype._wordDiv=function(e,t){var r=this.length-e.length,n=this.clone(),s=e,o=0|s.words[s.length-1],p=this._countBits(o);r=26-p,0!=r&&(s=s.ushln(r),n.iushln(r),o=0|s.words[s.length-1]);var c=n.length-s.length,l;if("mod"!==t){l=new f(null),l.length=c+1,l.words=Array(l.length);for(var u=0;uthis.length||0>this.cmp(e)?{div:new f(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new f(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new f(this.modn(e.words[0]))}:this._wordDiv(e,t):(s=this.neg().divmod(e.neg(),t),"div"!==t&&(n=s.mod.neg(),r&&0!==n.negative&&n.isub(e)),{div:s.div,mod:n})},f.prototype.div=function(e){return this.divmod(e,"div",!1).div},f.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},f.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},f.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0===t.div.negative?t.mod:t.mod.isub(e),a=e.ushrn(1),n=e.andln(1),s=r.cmp(a);return 0>s||1===n&&0===s?t.div:0===t.div.negative?t.div.iaddn(1):t.div.isubn(1)},f.prototype.modn=function(e){l(67108863>=e);for(var t=0,r=this.length-1;0<=r;r--)t=(67108864%e*t+(0|this.words[r]))%e;return t},f.prototype.idivn=function(e){l(67108863>=e);for(var t=0,r=this.length-1,a;0<=r;r--)a=(0|this.words[r])+67108864*t,this.words[r]=0|a/e,t=a%e;return this.strip()},f.prototype.divn=function(e){return this.clone().idivn(e)},f.prototype.egcd=function(e){l(0===e.negative),l(!e.isZero());var t=this,r=e.clone();t=0===t.negative?t.clone():t.umod(e);for(var a=new f(1),n=new f(0),s=new f(0),o=new f(1),d=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++d;for(var p=r.clone(),c=t.clone();!t.isZero();){for(var u=0,y=1;0==(t.words[0]&y)&&26>u;++u,y<<=1);if(0b;++b,h<<=1);if(0d;++d,p<<=1);if(0c;++c,u<<=1);if(0y.cmpn(0)&&y.iadd(e),y},f.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var n=this.clone(),s=e.clone();n.negative=0,s.negative=0;for(var i=0;n.isEven()&&s.isEven();i++)n.iushrn(1),s.iushrn(1);do{for(;n.isEven();)n.iushrn(1);for(;s.isEven();)s.iushrn(1);var o=n.cmp(s);if(0>o){var r=n;n=s,s=r}else if(0===o||0===s.cmpn(1))break;n.isub(s)}while(!0);return s.iushln(i)},f.prototype.invm=function(e){return this.egcd(e).a.umod(e)},f.prototype.isEven=function(){return 0==(1&this.words[0])},f.prototype.isOdd=function(){return 1==(1&this.words[0])},f.prototype.andln=function(e){return this.words[0]&e},f.prototype.bincn=function(e){l("number"==typeof e);var t=e%26,r=(e-t)/26,a=1<>>26,o&=67108863,this.words[s]=o;return 0!==n&&(this.words[s]=n,this.length++),this},f.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},f.prototype.cmpn=function(e){var t=0>e;if(0!==this.negative&&!t)return-1;if(0===this.negative&&t)return 1;this.strip();var r;if(1=e,"Number is too big");var a=0|this.words[0];r=a===e?0:ae.length)return 1;if(this.lengtha&&(t=1);break}}return t},f.prototype.gtn=function(e){return 1===this.cmpn(e)},f.prototype.gt=function(e){return 1===this.cmp(e)},f.prototype.gten=function(e){return 0<=this.cmpn(e)},f.prototype.gte=function(e){return 0<=this.cmp(e)},f.prototype.ltn=function(e){return-1===this.cmpn(e)},f.prototype.lt=function(e){return-1===this.cmp(e)},f.prototype.lten=function(e){return 0>=this.cmpn(e)},f.prototype.lte=function(e){return 0>=this.cmp(e)},f.prototype.eqn=function(e){return 0===this.cmpn(e)},f.prototype.eq=function(e){return 0===this.cmp(e)},f.red=function(e){return new k(e)},f.prototype.toRed=function(e){return l(!this.red,"Already a number in reduction context"),l(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},f.prototype.fromRed=function(){return l(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},f.prototype._forceRed=function(e){return this.red=e,this},f.prototype.forceRed=function(e){return l(!this.red,"Already a number in reduction context"),this._forceRed(e)},f.prototype.redAdd=function(e){return l(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},f.prototype.redIAdd=function(e){return l(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},f.prototype.redSub=function(e){return l(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},f.prototype.redISub=function(e){return l(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},f.prototype.redShl=function(e){return l(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},f.prototype.redMul=function(e){return l(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},f.prototype.redIMul=function(e){return l(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},f.prototype.redSqr=function(){return l(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},f.prototype.redISqr=function(){return l(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},f.prototype.redSqrt=function(){return l(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},f.prototype.redInvm=function(){return l(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},f.prototype.redNeg=function(){return l(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},f.prototype.redPow=function(e){return l(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var R={k256:null,p224:null,p192:null,p25519:null};v.prototype._tmp=function(){var e=new f(null);return e.words=Array(s(this.n/13)),e},v.prototype.ireduce=function(e){var t=e,a;do this.split(t,this.tmp),t=this.imulK(t),t=t.iadd(this.tmp),a=t.bitLength();while(a>this.n);var n=a=e.length)return e.words[0]=0,void(e.length=1);var s=e.words[9];for(t.words[t.length++]=s&r,n=10;n>>22,s=o}s>>>=22,e.words[n-10]=s,e.length-=0===s&&10>>=26,e.words[r]=n,t=a}return 0!==t&&(e.words[e.length++]=t),e},f._prime=function e(t){if(R[t])return R[t];var e;if("k256"===t)e=new w;else if("p224"===t)e=new S;else if("p192"===t)e=new A;else if("p25519"===t)e=new B;else throw new Error("Unknown prime "+t);return R[t]=e,e},k.prototype._verify1=function(e){l(0===e.negative,"red works only with positives"),l(e.red,"red works only with red numbers")},k.prototype._verify2=function(e,t){l(0==(e.negative|t.negative),"red works only with positives"),l(e.red&&e.red===t.red,"red works only with red numbers")},k.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},k.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},k.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return 0<=r.cmp(this.m)&&r.isub(this.m),r._forceRed(this)},k.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return 0<=r.cmp(this.m)&&r.isub(this.m),r},k.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return 0>r.cmpn(0)&&r.iadd(this.m),r._forceRed(this)},k.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return 0>r.cmpn(0)&&r.iadd(this.m),r},k.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},k.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},k.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},k.prototype.isqr=function(e){return this.imul(e,e.clone())},k.prototype.sqr=function(e){return this.mul(e,e)},k.prototype.sqrt=function(e){if(e.isZero())return e.clone();var a=this.m.andln(3);if(l(1==a%2),3===a){var n=this.m.add(new f(1)).iushrn(2);return this.pow(e,n)}for(var o=this.m.subn(1),d=0;!o.isZero()&&0===o.andln(1);)d++,o.iushrn(1);l(!o.isZero());var p=new f(1).toRed(this),u=p.redNeg(),y=this.m.subn(1).iushrn(1),g=this.m.bitLength();for(g=new f(2*g*g).toRed(this);0!==this.pow(g,y).cmp(u);)g.redIAdd(u);for(var h=this.pow(g,o),_=this.pow(e,o.addn(1).iushrn(1)),v=this.pow(e,o),w=d;0!==v.cmp(p);){for(var S=v,A=0;0!==S.cmp(p);A++)S=S.redSqr();l(A>c,n!==r[0]&&(n=this.sqr(n)),0===l&&0===s){o=0;continue}s<<=1,s|=l,o++,4!==o&&(0!=a||0!=c)||(n=this.mul(n,r[s]),o=0,s=0)}d=26}return n},k.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},k.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},f.mont=function(e){return new x(e)},c(x,k),x.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},x.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},x.prototype.imul=function(e,r){if(e.isZero()||r.isZero())return e.words[0]=0,e.length=1,e;var a=e.imul(r),t=a.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=a.isub(t).iushrn(this.shift),s=n;return 0<=n.cmp(this.m)?s=n.isub(this.m):0>n.cmpn(0)&&(s=n.iadd(this.m)),s._forceRed(this)},x.prototype.mul=function(e,r){if(e.isZero()||r.isZero())return new f(0)._forceRed(this);var a=e.mul(r),t=a.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=a.isub(t).iushrn(this.shift),s=n;return 0<=n.cmp(this.m)?s=n.isub(this.m):0>n.cmpn(0)&&(s=n.iadd(this.m)),s._forceRed(this)},x.prototype.invm=function(e){var t=this.imod(e._invmp(this.m).mul(this.r2));return t._forceRed(this)}})("undefined"==typeof t||t,this)},{buffer:43}],42:[function(e,t){function a(e){this.rand=e}var n;if(t.exports=function(e){return n||(n=new a(null)),n.generate(e)},t.exports.Rand=a,a.prototype.generate=function(e){return this._rand(e)},a.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),r=0;r>>24]^i[255&c>>>16]^o[255&l>>>8]^d[255&u]^t[f++],g=s[c>>>24]^i[255&l>>>16]^o[255&u>>>8]^d[255&p]^t[f++],h=s[l>>>24]^i[255&u>>>16]^o[255&p>>>8]^d[255&c]^t[f++],m=s[u>>>24]^i[255&p>>>16]^o[255&c>>>8]^d[255&l]^t[f++],p=b,c=g,l=h,u=m;return b=(a[p>>>24]<<24|a[255&c>>>16]<<16|a[255&l>>>8]<<8|a[255&u])^t[f++],g=(a[c>>>24]<<24|a[255&l>>>16]<<16|a[255&u>>>8]<<8|a[255&p])^t[f++],h=(a[l>>>24]<<24|a[255&u>>>16]<<16|a[255&p>>>8]<<8|a[255&c])^t[f++],m=(a[u>>>24]<<24|a[255&p>>>16]<<16|a[255&c>>>8]<<8|a[255&l])^t[f++],b>>>=0,g>>>=0,h>>>=0,m>>>=0,[b,g,h,m]}function s(e){this._key=r(e),this._reset()}var o=e("safe-buffer").Buffer,i=[0,1,2,4,8,16,32,64,128,27,54],d=function(){for(var e=Array(256),r=0;256>r;r++)e[r]=128>r?r<<1:283^r<<1;for(var a=[],n=[],s=[[],[],[],[]],o=[[],[],[],[]],d=0,p=0,c=0,l;256>c;++c){l=p^p<<1^p<<2^p<<3^p<<4,l=99^(l>>>8^255&l),a[d]=l,n[l]=d;var u=e[d],f=e[u],y=e[f],b=257*e[l]^16843008*l;s[0][d]=b<<24|b>>>8,s[1][d]=b<<16|b>>>16,s[2][d]=b<<8|b>>>24,s[3][d]=b,b=16843009*y^65537*f^257*u^16843008*d,o[0][l]=b<<24|b>>>8,o[1][l]=b<<16|b>>>16,o[2][l]=b<<8|b>>>24,o[3][l]=b,0===d?d=p=1:(d=u^e[e[e[y^u]]],p^=e[e[p]])}return{SBOX:a,INV_SBOX:n,SUB_MIX:s,INV_SUB_MIX:o}}();s.blockSize=16,s.keySize=32,s.prototype.blockSize=s.blockSize,s.prototype.keySize=s.keySize,s.prototype._reset=function(){for(var e=this._key,r=e.length,a=r+6,n=4*(a+1),s=[],o=0;o>>24,p=d.SBOX[p>>>24]<<24|d.SBOX[255&p>>>16]<<16|d.SBOX[255&p>>>8]<<8|d.SBOX[255&p],p^=i[0|o/r]<<24):6>>24]<<24|d.SBOX[255&p>>>16]<<16|d.SBOX[255&p>>>8]<<8|d.SBOX[255&p]),s[o]=s[o-r]^p}for(var c=[],l=0;ll||4>=u?f:d.INV_SUB_MIX[0][d.SBOX[f>>>24]]^d.INV_SUB_MIX[1][d.SBOX[255&f>>>16]]^d.INV_SUB_MIX[2][d.SBOX[255&f>>>8]]^d.INV_SUB_MIX[3][d.SBOX[255&f]]}this._nRounds=a,this._keySchedule=s,this._invKeySchedule=c},s.prototype.encryptBlockRaw=function(e){return e=r(e),n(e,this._keySchedule,d.SUB_MIX,d.SBOX,this._nRounds)},s.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),r=o.allocUnsafe(16);return r.writeUInt32BE(t[0],0),r.writeUInt32BE(t[1],4),r.writeUInt32BE(t[2],8),r.writeUInt32BE(t[3],12),r},s.prototype.decryptBlock=function(e){e=r(e);var t=e[1];e[1]=e[3],e[3]=t;var a=n(e,this._invKeySchedule,d.INV_SUB_MIX,d.INV_SBOX,this._nRounds),s=o.allocUnsafe(16);return s.writeUInt32BE(a[0],0),s.writeUInt32BE(a[3],4),s.writeUInt32BE(a[2],8),s.writeUInt32BE(a[1],12),s},s.prototype.scrub=function(){a(this._keySchedule),a(this._invKeySchedule),a(this._key)},t.exports.AES=s},{"safe-buffer":194}],45:[function(e,t){function r(e,t){var r=0;e.length!==t.length&&r++;for(var a=Math.min(e.length,t.length),n=0;nt&&(t=i.alloc(t,0),this._ghash.update(t))}this._called=!0;var r=this._mode.encrypt(this,e);return this._decrypt?this._ghash.update(e):this._ghash.update(r),this._len+=e.length,r},n.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var e=c(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&r(e,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=e,this._cipher.scrub()},n.prototype.getAuthTag=function(){if(this._decrypt||!i.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},n.prototype.setAuthTag=function(e){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=e},n.prototype.setAAD=function(e){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(e),this._alen+=e.length},t.exports=n},{"./aes":44,"./ghash":49,"./incr32":50,"buffer-xor":72,"cipher-base":75,inherits:137,"safe-buffer":194}],46:[function(e,t,r){var a=e("./encrypter"),n=e("./decrypter"),s=e("./modes/list.json");r.createCipher=r.Cipher=a.createCipher,r.createCipheriv=r.Cipheriv=a.createCipheriv,r.createDecipher=r.Decipher=n.createDecipher,r.createDecipheriv=r.Decipheriv=n.createDecipheriv,r.listCiphers=r.getCiphers=function(){return Object.keys(s)}},{"./decrypter":47,"./encrypter":48,"./modes/list.json":58}],47:[function(e,t,r){function a(e,t,r){l.call(this),this._cache=new n,this._last=void 0,this._cipher=new u.AES(t),this._prev=d.from(r),this._mode=e,this._autopadding=!0}function n(){this.cache=d.allocUnsafe(0)}function s(e){var t=e[15];if(1>t||16>>0,0),t.writeUInt32BE(e[1]>>>0,4),t.writeUInt32BE(e[2]>>>0,8),t.writeUInt32BE(e[3]>>>0,12),t}function n(e){this.h=e,this.state=s.alloc(16,0),this.cache=s.allocUnsafe(0)}var s=e("safe-buffer").Buffer,i=s.alloc(16,0);n.prototype.ghash=function(e){for(var t=-1;++t++n;){for(o=0!=(this.state[~~(n/8)]&1<<7-n%8),o&&(t[0]^=e[0],t[1]^=e[1],t[2]^=e[2],t[3]^=e[3]),d=0!=(1&e[3]),s=3;0>>1|(1&e[s-1])<<31;e[0]>>>=1,d&&(e[0]^=-520093696)}this.state=a(t)},n.prototype.update=function(e){this.cache=s.concat([this.cache,e]);for(var t;16<=this.cache.length;)t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t)},n.prototype.final=function(e,t){return this.cache.length&&this.ghash(s.concat([this.cache,i],16)),this.ghash(a([0,e,0,t])),this.state},t.exports=n},{"safe-buffer":194}],50:[function(e,t){t.exports=function(e){for(var t=e.length,r;t--;)if(r=e.readUInt8(t),255===r)e.writeUInt8(0,t);else{r++,e.writeUInt8(r,t);break}}},{}],51:[function(e,t,r){var a=e("buffer-xor");r.encrypt=function(e,t){var r=a(t,e._prev);return e._prev=e._cipher.encryptBlock(r),e._prev},r.decrypt=function(e,t){var r=e._prev;e._prev=t;var n=e._cipher.decryptBlock(t);return a(n,r)}},{"buffer-xor":72}],52:[function(e,t,r){function a(e,t,r){var a=t.length,i=s(t,e._cache);return e._cache=e._cache.slice(a),e._prev=n.concat([e._prev,r?t:i]),i}var n=e("safe-buffer").Buffer,s=e("buffer-xor");r.encrypt=function(e,t,r){for(var s=n.allocUnsafe(0),i;t.length;)if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=n.allocUnsafe(0)),e._cache.length<=t.length)i=e._cache.length,s=n.concat([s,a(e,t.slice(0,i),r)]),t=t.slice(i);else{s=n.concat([s,a(e,t,r)]);break}return s}},{"buffer-xor":72,"safe-buffer":194}],53:[function(e,t,r){function a(e,t,r){for(var a=-1,s=0,o,d,p;++a<8;)o=e._cipher.encryptBlock(e._prev),d=t&1<<7-a?128:0,p=o[0]^d,s+=(128&p)>>a%8,e._prev=n(e._prev,r?d:p);return s}function n(e,t){var r=e.length,a=-1,n=s.allocUnsafe(e.length);for(e=s.concat([e,s.from([t])]);++a>7;return n}var s=e("safe-buffer").Buffer;r.encrypt=function(e,t,r){for(var n=t.length,o=s.allocUnsafe(n),d=-1;++d=e.cmpn(0))throw new Error("invalid sig");if(e.cmp(t)>=t)throw new Error("invalid sig")}var o=e("bn.js"),s=e("elliptic").ec,d=e("parse-asn1"),p=e("./curves.json");t.exports=function(e,t,s,p,c){var l=d(s);if("ec"===l.type){if("ecdsa"!==p&&"ecdsa/rsa"!==p)throw new Error("wrong public key type");return a(e,t,l)}if("dsa"===l.type){if("dsa"!==p)throw new Error("wrong public key type");return n(e,t,l)}if("rsa"!==p&&"ecdsa/rsa"!==p)throw new Error("wrong public key type");t=r.concat([c,t]);for(var u=l.modulus.byteLength(),f=[1],y=0;t.length+f.length+2y?1:0;for(u=Math.min(e.length,f.length),e.length!==f.length&&(h=1),b=-1;++be)throw new RangeError("The value \""+e+"\" is invalid for option \"size\"")}function o(e,t,r){return i(e),0>=e?a(e):void 0===t?a(e):"string"==typeof r?a(e).fill(t,r):a(e).fill(t)}function d(e){return i(e),a(0>e?0:0|f(e))}function p(e,t){if(("string"!=typeof t||""===t)&&(t="utf8"),!n.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var r=0|y(e,t),s=a(r),i=s.write(e,t);return i!==r&&(s=s.slice(0,i)),s}function c(e){for(var t=0>e.length?0:0|f(e.length),r=a(t),n=0;nt||e.byteLength=2147483647)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+2147483647 .toString(16)+" bytes");return 0|e}function y(e,t){if(n.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||z(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError("The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. Received type "+typeof e);var r=e.length,a=2>>1;case"base64":return H(e).length;default:if(s)return a?-1:D(e).length;t=(""+t).toLowerCase(),s=!0;}}function b(e,t,r){var a=!1;if((void 0===t||0>t)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),0>=r)return"";if(r>>>=0,t>>>=0,r<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return I(this,t,r);case"utf8":case"utf-8":return x(this,t,r);case"ascii":return T(this,t,r);case"latin1":case"binary":return M(this,t,r);case"base64":return k(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,t,r);default:if(a)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),a=!0;}}function g(e,t,r){var a=e[t];e[t]=e[r],e[r]=a}function h(e,t,r,a,s){if(0===e.length)return-1;if("string"==typeof r?(a=r,r=0):2147483647r&&(r=-2147483648),r=+r,V(r)&&(r=s?0:e.length-1),0>r&&(r=e.length+r),r>=e.length){if(s)return-1;r=e.length-1}else if(0>r)if(s)r=0;else return-1;if("string"==typeof t&&(t=n.from(t,a)),n.isBuffer(t))return 0===t.length?-1:m(e,t,r,a,s);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?s?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):m(e,[t],r,a,s);throw new TypeError("val must be string, number or Buffer")}function m(e,t,r,a,n){function s(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}var o=1,d=e.length,p=t.length;if(void 0!==a&&(a=(a+"").toLowerCase(),"ucs2"===a||"ucs-2"===a||"utf16le"===a||"utf-16le"===a)){if(2>e.length||2>t.length)return-1;o=2,d/=2,p/=2,r/=2}var c;if(n){var l=-1;for(c=r;cd&&(r=d-p),c=r;0<=c;c--){for(var u=!0,f=0;fn&&(a=n)):a=n;var s=t.length;a>s/2&&(a=s/2);for(var o=0,d;os&&(o=s):2===d?(p=e[n+1],128==(192&p)&&(u=(31&s)<<6|63&p,127u||57343u&&(o=u))):void 0}null===o?(o=65533,d=1):65535>>10),o=56320|1023&o),a.push(o),n+=d}return E(a)}function E(e){var t=e.length;if(t<=4096)return X.apply(String,e);for(var r="",a=0;at)&&(t=0),(!r||0>r||r>a)&&(r=a);for(var n="",s=t;se)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function P(e,t,r,a,s,i){if(!n.isBuffer(e))throw new TypeError("\"buffer\" argument must be a Buffer instance");if(t>s||te.length)throw new RangeError("Index out of range")}function F(e,t,r,a){if(r+a>e.length)throw new RangeError("Index out of range");if(0>r)throw new RangeError("Index out of range")}function O(e,t,r,a,n){return t=+t,r>>>=0,n||F(e,t,r,4,34028234663852886e22,-34028234663852886e22),Z.write(e,t,r,a,23,4),r+4}function N(e,t,r,a,n){return t=+t,r>>>=0,n||F(e,t,r,8,17976931348623157e292,-17976931348623157e292),Z.write(e,t,r,a,52,8),r+8}function j(e){if(e=e.split("=")[0],e=e.trim().replace(J,""),2>e.length)return"";for(;0!=e.length%4;)e+="=";return e}function L(e){return 16>e?"0"+e.toString(16):e.toString(16)}function D(e,t){t=t||1/0;for(var r=e.length,a=null,n=[],s=0,o;so){if(!a){if(56319o){-1<(t-=3)&&n.push(239,191,189),a=o;continue}o=(a-55296<<10|o-56320)+65536}else a&&-1<(t-=3)&&n.push(239,191,189);if(a=null,128>o){if(0>(t-=1))break;n.push(o)}else if(2048>o){if(0>(t-=2))break;n.push(192|o>>6,128|63&o)}else if(65536>o){if(0>(t-=3))break;n.push(224|o>>12,128|63&o>>6,128|63&o)}else if(1114112>o){if(0>(t-=4))break;n.push(240|o>>18,128|63&o>>12,128|63&o>>6,128|63&o)}else throw new Error("Invalid code point")}return n}function U(e){for(var t=[],r=0;r(t-=2));++a)n=e.charCodeAt(a),s=n>>8,o=n%256,r.push(o),r.push(s);return r}function H(e){return Y.toByteArray(j(e))}function q(e,t,r,a){for(var n=0;n=t.length||n>=e.length);++n)t[n+r]=e[n];return n}function z(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function V(e){return e!==e}var G=Math.pow,K=Math.min,X=String.fromCharCode,Y=e("base64-js"),Z=e("ieee754");r.Buffer=n,r.SlowBuffer=function(e){return+e!=e&&(e=0),n.alloc(+e)},r.INSPECT_MAX_BYTES=50;r.kMaxLength=2147483647,n.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()}catch(t){return!1}}(),n.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(n.prototype,"parent",{enumerable:!0,get:function(){return n.isBuffer(this)?this.buffer:void 0}}),Object.defineProperty(n.prototype,"offset",{enumerable:!0,get:function(){return n.isBuffer(this)?this.byteOffset:void 0}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&n[Symbol.species]===n&&Object.defineProperty(n,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),n.poolSize=8192,n.from=function(e,t,r){return s(e,t,r)},n.prototype.__proto__=Uint8Array.prototype,n.__proto__=Uint8Array,n.alloc=function(e,t,r){return o(e,t,r)},n.allocUnsafe=function(e){return d(e)},n.allocUnsafeSlow=function(e){return d(e)},n.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==n.prototype},n.compare=function(e,t){if(z(e,Uint8Array)&&(e=n.from(e,e.offset,e.byteLength)),z(t,Uint8Array)&&(t=n.from(t,t.offset,t.byteLength)),!n.isBuffer(e)||!n.isBuffer(t))throw new TypeError("The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array");if(e===t)return 0;for(var r=e.length,s=t.length,o=0,d=K(r,s);ot&&(e+=" ... "),""},n.prototype.compare=function(e,t,r,a,s){if(z(e,Uint8Array)&&(e=n.from(e,e.offset,e.byteLength)),!n.isBuffer(e))throw new TypeError("The \"target\" argument must be one of type Buffer or Uint8Array. Received type "+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===a&&(a=0),void 0===s&&(s=this.length),0>t||r>e.length||0>a||s>this.length)throw new RangeError("out of range index");if(a>=s&&t>=r)return 0;if(a>=s)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,a>>>=0,s>>>=0,this===e)return 0;for(var o=s-a,d=r-t,p=K(o,d),c=this.slice(a,s),l=e.slice(t,r),u=0;u>>=0,isFinite(r)?(r>>>=0,void 0===a&&(a="utf8")):(a=r,r=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var n=this.length-t;if((void 0===r||r>n)&&(r=n),0r||0>t)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");a||(a="utf8");for(var s=!1;;)switch(a){case"hex":return _(this,e,t,r);case"utf8":case"utf-8":return v(this,e,t,r);case"ascii":return w(this,e,t,r);case"latin1":case"binary":return S(this,e,t,r);case"base64":return A(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,e,t,r);default:if(s)throw new TypeError("Unknown encoding: "+a);a=(""+a).toLowerCase(),s=!0;}},n.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};n.prototype.slice=function(e,t){var r=this.length;e=~~e,t=void 0===t?r:~~t,0>e?(e+=r,0>e&&(e=0)):e>r&&(e=r),0>t?(t+=r,0>t&&(t=0)):t>r&&(t=r),t>>=0,t>>>=0,r||R(e,t,this.length);for(var a=this[e],n=1,s=0;++s>>=0,t>>>=0,r||R(e,t,this.length);for(var a=this[e+--t],n=1;0>>=0,t||R(e,1,this.length),this[e]},n.prototype.readUInt16LE=function(e,t){return e>>>=0,t||R(e,2,this.length),this[e]|this[e+1]<<8},n.prototype.readUInt16BE=function(e,t){return e>>>=0,t||R(e,2,this.length),this[e]<<8|this[e+1]},n.prototype.readUInt32LE=function(e,t){return e>>>=0,t||R(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},n.prototype.readUInt32BE=function(e,t){return e>>>=0,t||R(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},n.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||R(e,t,this.length);for(var a=this[e],n=1,s=0;++s=n&&(a-=G(2,8*t)),a},n.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||R(e,t,this.length);for(var a=t,n=1,s=this[e+--a];0=n&&(s-=G(2,8*t)),s},n.prototype.readInt8=function(e,t){return e>>>=0,t||R(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},n.prototype.readInt16LE=function(e,t){e>>>=0,t||R(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},n.prototype.readInt16BE=function(e,t){e>>>=0,t||R(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},n.prototype.readInt32LE=function(e,t){return e>>>=0,t||R(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},n.prototype.readInt32BE=function(e,t){return e>>>=0,t||R(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},n.prototype.readFloatLE=function(e,t){return e>>>=0,t||R(e,4,this.length),Z.read(this,e,!0,23,4)},n.prototype.readFloatBE=function(e,t){return e>>>=0,t||R(e,4,this.length),Z.read(this,e,!1,23,4)},n.prototype.readDoubleLE=function(e,t){return e>>>=0,t||R(e,8,this.length),Z.read(this,e,!0,52,8)},n.prototype.readDoubleBE=function(e,t){return e>>>=0,t||R(e,8,this.length),Z.read(this,e,!1,52,8)},n.prototype.writeUIntLE=function(e,t,r,a){if(e=+e,t>>>=0,r>>>=0,!a){var n=G(2,8*r)-1;P(this,e,t,r,n,0)}var s=1,o=0;for(this[t]=255&e;++o>>=0,r>>>=0,!a){var n=G(2,8*r)-1;P(this,e,t,r,n,0)}var s=r-1,o=1;for(this[t+s]=255&e;0<=--s&&(o*=256);)this[t+s]=255&e/o;return t+r},n.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,1,255,0),this[t]=255&e,t+1},n.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},n.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},n.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},n.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},n.prototype.writeIntLE=function(e,t,r,a){if(e=+e,t>>>=0,!a){var n=G(2,8*r-1);P(this,e,t,r,n-1,-n)}var s=0,o=1,d=0;for(this[t]=255&e;++se&&0===d&&0!==this[t+s-1]&&(d=1),this[t+s]=255&(e/o>>0)-d;return t+r},n.prototype.writeIntBE=function(e,t,r,a){if(e=+e,t>>>=0,!a){var n=G(2,8*r-1);P(this,e,t,r,n-1,-n)}var s=r-1,o=1,d=0;for(this[t+s]=255&e;0<=--s&&(o*=256);)0>e&&0===d&&0!==this[t+s+1]&&(d=1),this[t+s]=255&(e/o>>0)-d;return t+r},n.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,1,127,-128),0>e&&(e=255+e+1),this[t]=255&e,t+1},n.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},n.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},n.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},n.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,4,2147483647,-2147483648),0>e&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},n.prototype.writeFloatLE=function(e,t,r){return O(this,e,t,!0,r)},n.prototype.writeFloatBE=function(e,t,r){return O(this,e,t,!1,r)},n.prototype.writeDoubleLE=function(e,t,r){return N(this,e,t,!0,r)},n.prototype.writeDoubleBE=function(e,t,r){return N(this,e,t,!1,r)},n.prototype.copy=function(e,t,r,a){if(!n.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),a||0===a||(a=this.length),t>=e.length&&(t=e.length),t||(t=0),0t)throw new RangeError("targetStart out of bounds");if(0>r||r>=this.length)throw new RangeError("Index out of range");if(0>a)throw new RangeError("sourceEnd out of bounds");a>this.length&&(a=this.length),e.length-ts||"latin1"===a)&&(e=s)}}else"number"==typeof e&&(e&=255);if(0>t||this.length>>=0,r=r===void 0?this.length:r>>>0,e||(e=0);var o;if("number"==typeof e)for(o=t;or){var a="rmd160"===e?new d:p(e);t=a.update(t).digest()}else t.length64?t=e(t):t.length<64&&(t=n.concat([t,o],64));for(var r=this._ipad=n.allocUnsafe(64),a=this._opad=n.allocUnsafe(64),d=0;d<64;d++)r[d]=54^t[d],a[d]=92^t[d];this._hash=[r]}var a=e("inherits"),n=e("safe-buffer").Buffer,s=e("cipher-base"),o=n.alloc(128);a(r,s),r.prototype._update=function(e){this._hash.push(e)},r.prototype._final=function(){var e=this._alg(n.concat(this._hash));return this._alg(n.concat([this._opad,e]))},t.exports=r},{"cipher-base":75,inherits:137,"safe-buffer":194}],83:[function(e,t,r){"use strict";r.randomBytes=r.rng=r.pseudoRandomBytes=r.prng=e("randombytes"),r.createHash=r.Hash=e("create-hash"),r.createHmac=r.Hmac=e("create-hmac");var a=e("browserify-sign/algos"),n=Object.keys(a),s=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(n);r.getHashes=function(){return s};var i=e("pbkdf2");r.pbkdf2=i.pbkdf2,r.pbkdf2Sync=i.pbkdf2Sync;var o=e("browserify-cipher");r.Cipher=o.Cipher,r.createCipher=o.createCipher,r.Cipheriv=o.Cipheriv,r.createCipheriv=o.createCipheriv,r.Decipher=o.Decipher,r.createDecipher=o.createDecipher,r.Decipheriv=o.Decipheriv,r.createDecipheriv=o.createDecipheriv,r.getCiphers=o.getCiphers,r.listCiphers=o.listCiphers;var d=e("diffie-hellman");r.DiffieHellmanGroup=d.DiffieHellmanGroup,r.createDiffieHellmanGroup=d.createDiffieHellmanGroup,r.getDiffieHellman=d.getDiffieHellman,r.createDiffieHellman=d.createDiffieHellman,r.DiffieHellman=d.DiffieHellman;var p=e("browserify-sign");r.createSign=p.createSign,r.Sign=p.Sign,r.createVerify=p.createVerify,r.Verify=p.Verify,r.createECDH=e("create-ecdh");var c=e("public-encrypt");r.publicEncrypt=c.publicEncrypt,r.privateEncrypt=c.privateEncrypt,r.publicDecrypt=c.publicDecrypt,r.privateDecrypt=c.privateDecrypt;var l=e("randomfill");r.randomFill=l.randomFill,r.randomFillSync=l.randomFillSync,r.createCredentials=function(){throw new Error("sorry, createCredentials is not implemented yet\nwe accept pull requests\nhttps://github.com/crypto-browserify/crypto-browserify")},r.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},{"browserify-cipher":61,"browserify-sign":68,"browserify-sign/algos":65,"create-ecdh":78,"create-hash":79,"create-hmac":81,"diffie-hellman":91,pbkdf2:158,"public-encrypt":164,randombytes:175,randomfill:176}],84:[function(e,t){"use strict";function r(e,t){try{return decodeURIComponent(e.join(""))}catch(e){}if(1===e.length)return e;t=t||1;var a=e.slice(0,t),n=e.slice(t);return Array.prototype.concat.call([],r(a),r(n))}function a(e){try{return decodeURIComponent(e)}catch(n){for(var t=e.match(s),a=1;a>>1],r=o.r28shl(r,d),a=o.r28shl(a,d),o.pc2(r,a,e.keys,s)},a.prototype._update=function(e,t,a,n){var s=this._desState,i=o.readUInt32BE(e,t),d=o.readUInt32BE(e,t+4);o.ip(i,d,s.tmp,0),i=s.tmp[0],d=s.tmp[1],"encrypt"===this.type?this._encrypt(s,i,d,s.tmp,0):this._decrypt(s,i,d,s.tmp,0),i=s.tmp[0],d=s.tmp[1],o.writeUInt32BE(a,i,n),o.writeUInt32BE(a,d,n+4)},a.prototype._pad=function(e,t){for(var r=e.length-t,a=t;a>>0,c=f}o.rip(u,c,d,p)},a.prototype._decrypt=function(e,a,n,d,p){for(var c=n,u=a,y=e.keys.length-2;0<=y;y-=2){var b=e.keys[y],g=e.keys[y+1];o.expand(c,e.tmp,0),b^=e.tmp[0],g^=e.tmp[1];var h=o.substitute(b,g),s=o.permute(h),f=c;c=(u^s)>>>0,u=f}o.rip(c,u,d,p)}},{"../des":85,inherits:137,"minimalistic-assert":145}],89:[function(e,t){"use strict";function r(e,t){n.equal(t.length,24,"Invalid key length");var r=t.slice(0,8),a=t.slice(8,16),s=t.slice(16,24);this.ciphers="encrypt"===e?[d.create({type:"encrypt",key:r}),d.create({type:"decrypt",key:a}),d.create({type:"encrypt",key:s})]:[d.create({type:"decrypt",key:s}),d.create({type:"encrypt",key:a}),d.create({type:"decrypt",key:r})]}function a(e){o.call(this,e);var t=new r(this.type,this.options.key);this._edeState=t}var n=e("minimalistic-assert"),s=e("inherits"),i=e("../des"),o=i.Cipher,d=i.DES;s(a,o),t.exports=a,a.create=function(e){return new a(e)},a.prototype._update=function(e,t,r,a){var n=this._edeState;n.ciphers[0]._update(e,t,r,a),n.ciphers[1]._update(r,a,r,a),n.ciphers[2]._update(r,a,r,a)},a.prototype._pad=d.prototype._pad,a.prototype._unpad=d.prototype._unpad},{"../des":85,inherits:137,"minimalistic-assert":145}],90:[function(e,t,r){"use strict";r.readUInt32BE=function(e,t){var r=e[0+t]<<24|e[1+t]<<16|e[2+t]<<8|e[3+t];return r>>>0},r.writeUInt32BE=function(e,t,r){e[0+r]=t>>>24,e[1+r]=255&t>>>16,e[2+r]=255&t>>>8,e[3+r]=255&t},r.ip=function(e,t,r,a){for(var n=0,s=0,o=6;0<=o;o-=2){for(var d=0;24>=d;d+=8)n<<=1,n|=1&t>>>d+o;for(var d=0;24>=d;d+=8)n<<=1,n|=1&e>>>d+o}for(var o=6;0<=o;o-=2){for(var d=1;25>=d;d+=8)s<<=1,s|=1&t>>>d+o;for(var d=1;25>=d;d+=8)s<<=1,s|=1&e>>>d+o}r[a+0]=n>>>0,r[a+1]=s>>>0},r.rip=function(e,t,r,a){for(var n=0,s=0,o=0;4>o;o++)for(var d=24;0<=d;d-=8)n<<=1,n|=1&t>>>d+o,n<<=1,n|=1&e>>>d+o;for(var o=4;8>o;o++)for(var d=24;0<=d;d-=8)s<<=1,s|=1&t>>>d+o,s<<=1,s|=1&e>>>d+o;r[a+0]=n>>>0,r[a+1]=s>>>0},r.pc1=function(e,t,r,a){for(var n=0,s=0,o=7;5<=o;o--){for(var d=0;24>=d;d+=8)n<<=1,n|=1&t>>d+o;for(var d=0;24>=d;d+=8)n<<=1,n|=1&e>>d+o}for(var d=0;24>=d;d+=8)n<<=1,n|=1&t>>d+o;for(var o=1;3>=o;o++){for(var d=0;24>=d;d+=8)s<<=1,s|=1&t>>d+o;for(var d=0;24>=d;d+=8)s<<=1,s|=1&e>>d+o}for(var d=0;24>=d;d+=8)s<<=1,s|=1&e>>d+o;r[a+0]=n>>>0,r[a+1]=s>>>0},r.r28shl=function(e,t){return 268435455&e<>>28-t};var a=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];r.pc2=function(e,t,r,n){for(var s=0,o=0,d=a.length>>>1,p=0;p>>a[p];for(var p=d;p>>a[p];r[n+0]=s>>>0,r[n+1]=o>>>0},r.expand=function(e,t,r){var a=0,n=0;a=(1&e)<<5|e>>>27;for(var s=23;15<=s;s-=4)a<<=6,a|=63&e>>>s;for(var s=11;3<=s;s-=4)n|=63&e>>>s,n<<=6;n|=(31&e)<<1|e>>>31,t[r+0]=a>>>0,t[r+1]=n>>>0};var n=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];r.substitute=function(e,t){for(var r=0,a=0;4>a;a++){var s=63&e>>>18-6*a,o=n[64*a+s];r<<=4,r|=o}for(var a=0;4>a;a++){var s=63&t>>>18-6*a,o=n[256+64*a+s];r<<=4,r|=o}return r>>>0};var s=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];r.permute=function(e){for(var t=0,r=0;r>>s[r];return t>>>0},r.padSplit=function(e,t,r){for(var a=e.toString(2);a.lengthr;r+=2){a=o(Math.sqrt(r));for(var n=0;ne)return 2===t||5===t?new d([140,123]):new d([140,39]);t=new d(t);for(var r,s;;){for(r=new d(i(o(e/8)));r.bitLength()>e;)r.ishrn(1);if(r.isEven()&&r.iadd(u),r.testn(1)||r.iadd(f),!t.cmp(f))for(;r.mod(p).cmp(v);)r.iadd(w);else if(!t.cmp(y))for(;r.mod(h).cmp(m);)r.iadd(w);if(s=r.shrn(1),a(s)&&a(r)&&n(s)&&n(r)&&l.test(s)&&l.test(r))return r}}var o=Math.ceil,i=e("randombytes");t.exports=s,s.simpleSieve=a,s.fermatTest=n;var d=e("bn.js"),p=new d(24),c=e("miller-rabin"),l=new c,u=new d(1),f=new d(2),y=new d(5),b=new d(16),g=new d(8),h=new d(10),m=new d(3),_=new d(7),v=new d(11),w=new d(4),S=new d(12),A=null},{"bn.js":41,"miller-rabin":144,randombytes:175}],94:[function(e,t){t.exports={modp1:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},modp2:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},modp5:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},modp14:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},modp15:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},modp16:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},modp17:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},modp18:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}},{}],95:[function(e,t,r){"use strict";var a=r;a.version=e("../package.json").version,a.utils=e("./elliptic/utils"),a.rand=e("brorand"),a.curve=e("./elliptic/curve"),a.curves=e("./elliptic/curves"),a.ec=e("./elliptic/ec"),a.eddsa=e("./elliptic/eddsa")},{"../package.json":110,"./elliptic/curve":98,"./elliptic/curves":101,"./elliptic/ec":102,"./elliptic/eddsa":105,"./elliptic/utils":109,brorand:42}],96:[function(e,t){"use strict";function r(e,t){this.type=e,this.p=new s(t.p,16),this.red=t.prime?s.red(t.prime):s.mont(this.p),this.zero=new s(0).toRed(this.red),this.one=new s(1).toRed(this.red),this.two=new s(2).toRed(this.red),this.n=t.n&&new s(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=[,,,,],this._wnafT2=[,,,,],this._wnafT3=[,,,,],this._wnafT4=[,,,,];var r=this.n&&this.p.div(this.n);!r||0=p;t--)l=(l<<1)+n[t];o.push(l)}for(var u=this.jpoint(null,null,null),f=this.jpoint(null,null,null),y=s;0p)break;var l=s[p];c(0!==l),o="affine"===e.type?0>1]):o.mixedAdd(n[-l-1>>1].neg()):0>1]):o.add(n[-l-1>>1].neg())}return"affine"===e.type?o.toP():o},r.prototype._wnafMulAdd=function(e,t,r,s,o){for(var c=this._wnafT1,l=this._wnafT2,u=this._wnafT3,f=0,y=0;yy)break;for(var w=0;w>1]:0>M&&(g=l[w][-M-1>>1].neg());B="affine"===g.type?B.mixedAdd(g):B.add(g)}}for(var y=0;y=Math.ceil((e.bitLength()+1)/t.step)},a.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],a=this,n=0;n":""},a.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},a.prototype._extDbl=function(){var t=this.x.redSqr(),r=this.y.redSqr(),a=this.z.redSqr();a=a.redIAdd(a);var n=this.curve._mulA(t),s=this.x.redAdd(this.y).redSqr().redISub(t).redISub(r),e=n.redAdd(r),i=e.redSub(a),o=n.redSub(r),d=s.redMul(i),p=e.redMul(o),l=s.redMul(o),u=i.redMul(e);return this.curve.point(d,p,u,l)},a.prototype._projDbl=function(){var t=this.x.redAdd(this.y).redSqr(),r=this.x.redSqr(),a=this.y.redSqr(),n,s,i;if(this.curve.twisted){var o=this.curve._mulA(r),d=o.redAdd(a);if(this.zOne)n=t.redSub(r).redSub(a).redMul(d.redSub(this.curve.two)),s=d.redMul(o.redSub(a)),i=d.redSqr().redSub(d).redSub(d);else{var p=this.z.redSqr(),c=d.redSub(p).redISub(p);n=t.redSub(r).redISub(a).redMul(c),s=d.redMul(o.redSub(a)),i=d.redMul(c)}}else{var o=r.redAdd(a),p=this.curve._mulC(this.z).redSqr(),c=o.redSub(p).redSub(p);n=this.curve._mulC(t.redISub(o)).redMul(c),s=this.curve._mulC(o).redMul(r.redISub(a)),i=o.redMul(c)}return this.curve.point(n,s,i)},a.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},a.prototype._extAdd=function(t){var r=this.y.redSub(this.x).redMul(t.y.redSub(t.x)),a=this.y.redAdd(this.x).redMul(t.y.redAdd(t.x)),n=this.t.redMul(this.curve.dd).redMul(t.t),s=this.z.redMul(t.z.redAdd(t.z)),i=a.redSub(r),e=s.redSub(n),o=s.redAdd(n),d=a.redAdd(r),p=i.redMul(e),c=o.redMul(d),l=i.redMul(d),u=e.redMul(o);return this.curve.point(p,c,u,l)},a.prototype._projAdd=function(t){var r=this.z.redMul(t.z),a=r.redSqr(),n=this.x.redMul(t.x),s=this.y.redMul(t.y),i=this.curve.d.redMul(n).redMul(s),e=a.redSub(i),o=a.redAdd(i),d=this.x.redAdd(this.y).redMul(t.x.redAdd(t.y)).redISub(n).redISub(s),p=r.redMul(e).redMul(d),c,l;return this.curve.twisted?(c=r.redMul(o).redMul(s.redSub(this.curve._mulA(n))),l=e.redMul(o)):(c=r.redMul(o).redMul(s.redSub(n)),l=this.curve._mulC(e).redMul(o)),this.curve.point(p,c,l)},a.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},a.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},a.prototype.mulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!1)},a.prototype.jmulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!0)},a.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},a.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},a.prototype.getX=function(){return this.normalize(),this.x.fromRed()},a.prototype.getY=function(){return this.normalize(),this.y.fromRed()},a.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},a.prototype.eqXToP=function(e){var r=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(r))return!0;for(var a=e.clone(),n=this.curve.redN.redMul(this.z);;){if(a.iadd(this.curve.n),0<=a.cmp(this.curve.p))return!1;if(r.redIAdd(n),0===this.x.cmp(r))return!0}},a.prototype.toP=a.prototype.normalize,a.prototype.mixedAdd=a.prototype.add},{"../../elliptic":95,"../curve":98,"bn.js":41,inherits:137}],98:[function(e,t,r){"use strict";var a=r;a.base=e("./base"),a.short=e("./short"),a.mont=e("./mont"),a.edwards=e("./edwards")},{"./base":96,"./edwards":97,"./mont":99,"./short":100}],99:[function(e,t){"use strict";function r(e){o.call(this,"mont",e),this.a=new s(e.a,16).toRed(this.red),this.b=new s(e.b,16).toRed(this.red),this.i4=new s(4).toRed(this.red).redInvm(),this.two=new s(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function a(e,t,r){o.BasePoint.call(this,e,"projective"),null===t&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new s(t,16),this.z=new s(r,16),!this.x.red&&(this.x=this.x.toRed(this.curve.red)),!this.z.red&&(this.z=this.z.toRed(this.curve.red)))}var n=e("../curve"),s=e("bn.js"),i=e("inherits"),o=n.base,d=e("../../elliptic"),p=d.utils;i(r,o),t.exports=r,r.prototype.validate=function(e){var t=e.normalize().x,r=t.redSqr(),a=r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t),n=a.redSqrt();return 0===n.redSqr().cmp(a)},i(a,o.BasePoint),r.prototype.decodePoint=function(e,t){return this.point(p.toArray(e,t),1)},r.prototype.point=function(e,t){return new a(this,e,t)},r.prototype.pointFromJSON=function(e){return a.fromJSON(this,e)},a.prototype.precompute=function(){},a.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},a.fromJSON=function(e,t){return new a(e,t[0],t[1]||e.one)},a.prototype.inspect=function(){return this.isInfinity()?"":""},a.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},a.prototype.dbl=function(){var e=this.x.redAdd(this.z),t=e.redSqr(),r=this.x.redSub(this.z),a=r.redSqr(),n=t.redSub(a),s=t.redMul(a),i=n.redMul(a.redAdd(this.curve.a24.redMul(n)));return this.curve.point(s,i)},a.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},a.prototype.diffAdd=function(e,t){var r=this.x.redAdd(this.z),a=this.x.redSub(this.z),n=e.x.redAdd(e.z),s=e.x.redSub(e.z),i=s.redMul(r),o=n.redMul(a),d=t.z.redMul(i.redAdd(o).redSqr()),p=t.x.redMul(i.redISub(o).redSqr());return this.curve.point(d,p)},a.prototype.mul=function(e){for(var r=e.clone(),t=this,n=this.curve.point(null,null),s=this,o=[];0!==r.cmpn(0);r.iushrn(1))o.push(r.andln(1));for(var d=o.length-1;0<=d;d--)0===o[d]?(t=t.diffAdd(n,s),n=n.dbl()):(n=t.diffAdd(n,s),t=t.dbl());return n},a.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},a.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},a.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},a.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},a.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},{"../../elliptic":95,"../curve":98,"bn.js":41,inherits:137}],100:[function(e,t){"use strict";function r(e){p.call(this,"short",e),this.a=new o(e.a,16).toRed(this.red),this.b=new o(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=[,,,,],this._endoWnafT2=[,,,,]}function a(e,t,r,a){p.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new o(t,16),this.y=new o(r,16),a&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),!this.x.red&&(this.x=this.x.toRed(this.curve.red)),!this.y.red&&(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function n(e,t,r,a){p.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===a?(this.x=this.curve.one,this.y=this.curve.one,this.z=new o(0)):(this.x=new o(t,16),this.y=new o(r,16),this.z=new o(a,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}var s=e("../curve"),i=e("../../elliptic"),o=e("bn.js"),d=e("inherits"),p=s.base,c=i.utils.assert;d(r,p),t.exports=r,r.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,r;if(e.beta)t=new o(e.beta,16).toRed(this.red);else{var a=this._getEndoRoots(this.p);t=0>a[0].cmp(a[1])?a[0]:a[1],t=t.toRed(this.red)}if(e.lambda)r=new o(e.lambda,16);else{var n=this._getEndoRoots(this.n);0===this.g.mul(n[0]).x.cmp(this.g.x.redMul(t))?r=n[0]:(r=n[1],c(0===this.g.mul(r).x.cmp(this.g.x.redMul(t))))}var s;return s=e.basis?e.basis.map(function(e){return{a:new o(e.a,16),b:new o(e.b,16)}}):this._getEndoBasis(r),{beta:t,lambda:r,basis:s}}},r.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:o.mont(e),r=new o(2).toRed(t).redInvm(),a=r.redNeg(),n=new o(3).toRed(t).redNeg().redSqrt().redMul(r),s=a.redAdd(n).fromRed(),i=a.redSub(n).fromRed();return[s,i]},r.prototype._getEndoBasis=function(e){for(var t=this.n.ushrn(Math.floor(this.n.bitLength()/2)),a=e,n=this.n.clone(),s=new o(1),d=new o(0),p=new o(0),c=new o(1),l=0,f,b,g,h,m,_,w,S,A,B;0!==a.cmpn(0);){B=n.div(a),S=n.sub(B.mul(a)),A=p.sub(B.mul(s));var k=c.sub(B.mul(d));if(!g&&0>S.cmp(t))f=w.neg(),b=s,g=S.neg(),h=A;else if(g&&2==++l)break;w=S,n=a,a=S,p=s,s=A,c=d,d=k}m=S.neg(),_=A;var y=g.sqr().add(h.sqr()),E=m.sqr().add(_.sqr());return 0<=E.cmp(y)&&(m=f,_=b),g.negative&&(g=g.neg(),h=h.neg()),m.negative&&(m=m.neg(),_=_.neg()),[{a:g,b:h},{a:m,b:_}]},r.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],a=t[1],n=a.b.mul(e).divRound(this.n),s=r.b.neg().mul(e).divRound(this.n),i=n.mul(r.a),o=s.mul(a.a),d=n.mul(r.b),p=s.mul(a.b),c=e.sub(i).sub(o),l=d.add(p).neg();return{k1:c,k2:l}},r.prototype.pointFromX=function(e,t){e=new o(e,16),e.red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),a=r.redSqrt();if(0!==a.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var n=a.fromRed().isOdd();return(t&&!n||!t&&n)&&(a=a.redNeg()),this.point(e,a)},r.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,a=this.a.redMul(t),n=t.redSqr().redMul(t).redIAdd(a).redIAdd(this.b);return 0===r.redSqr().redISub(n).cmpn(0)},r.prototype._endoWnafMulAdd=function(e,t,r){for(var a=this._endoWnafT1,n=this._endoWnafT2,s=0;s":""},a.prototype.isInfinity=function(){return this.inf},a.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),a=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,a)},a.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),a=e.redInvm(),n=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(a),s=n.redSqr().redISub(this.x.redAdd(this.x)),i=n.redMul(this.x.redSub(s)).redISub(this.y);return this.curve.point(s,i)},a.prototype.getX=function(){return this.x.fromRed()},a.prototype.getY=function(){return this.y.fromRed()},a.prototype.mul=function(e){return e=new o(e,16),this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},a.prototype.mulAdd=function(e,t,r){var a=[this,t],n=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(a,n):this.curve._wnafMulAdd(1,a,n,2)},a.prototype.jmulAdd=function(e,t,r){var a=[this,t],n=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(a,n,!0):this.curve._wnafMulAdd(1,a,n,2,!0)},a.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},a.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,a=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(a)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(a)}}}return t},a.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var e=this.curve.jpoint(this.x,this.y,this.curve.one);return e},d(n,p.BasePoint),r.prototype.jpoint=function(e,t,r){return new n(this,e,t,r)},n.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),a=this.y.redMul(t).redMul(e);return this.curve.point(r,a)},n.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},n.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),a=this.z.redSqr(),n=this.x.redMul(t),s=e.x.redMul(a),i=this.y.redMul(t.redMul(e.z)),o=e.y.redMul(a.redMul(this.z)),d=n.redSub(s),p=i.redSub(o);if(0===d.cmpn(0))return 0===p.cmpn(0)?this.dbl():this.curve.jpoint(null,null,null);var r=d.redSqr(),c=r.redMul(d),l=n.redMul(r),u=p.redSqr().redIAdd(c).redISub(l).redISub(l),f=p.redMul(l.redISub(u)).redISub(i.redMul(c)),y=this.z.redMul(e.z).redMul(d);return this.curve.jpoint(u,f,y)},n.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),a=this.x,n=e.x.redMul(t),s=this.y,i=e.y.redMul(t).redMul(this.z),o=a.redSub(n),d=s.redSub(i);if(0===o.cmpn(0))return 0===d.cmpn(0)?this.dbl():this.curve.jpoint(null,null,null);var r=o.redSqr(),p=r.redMul(o),c=a.redMul(r),l=d.redSqr().redIAdd(p).redISub(c).redISub(c),u=d.redMul(c.redISub(l)).redISub(s.redMul(p)),f=this.z.redMul(o);return this.curve.jpoint(l,u,f)},n.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();if(this.curve.zeroA||this.curve.threeA){for(var t=this,n=0;n":""},n.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},{"../../elliptic":95,"../curve":98,"bn.js":41,inherits:137}],101:[function(e,t,r){"use strict";function a(e){this.curve="short"===e.type?new o.curve.short(e):"edwards"===e.type?new o.curve.edwards(e):new o.curve.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,d(this.g.validate(),"Invalid curve"),d(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function n(e,t){Object.defineProperty(s,e,{configurable:!0,enumerable:!0,get:function(){var r=new a(t);return Object.defineProperty(s,e,{configurable:!0,enumerable:!0,value:r}),r}})}var s=r,i=e("hash.js"),o=e("../elliptic"),d=o.utils.assert;s.PresetCurve=a,n("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:i.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),n("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:i.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),n("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:i.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),n("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:i.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),n("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:i.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),n("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:i.sha256,gRed:!1,g:["9"]}),n("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:i.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var p;try{p=e("./precomputed/secp256k1")}catch(t){p=void 0}n("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:i.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",p]})},{"../elliptic":95,"./precomputed/secp256k1":108,"hash.js":122}],102:[function(e,t){"use strict";function r(e){return this instanceof r?void("string"==typeof e&&(o(s.curves.hasOwnProperty(e),"Unknown curve "+e),e=s.curves[e]),e instanceof s.curves.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash):new r(e)}var a=e("bn.js"),n=e("hmac-drbg"),s=e("../../elliptic"),i=s.utils,o=i.assert,d=e("./key"),c=e("./signature");t.exports=r,r.prototype.keyPair=function(e){return new d(this,e)},r.prototype.keyFromPrivate=function(e,t){return d.fromPrivate(this,e,t)},r.prototype.keyFromPublic=function(e,t){return d.fromPublic(this,e,t)},r.prototype.genKeyPair=function(e){e||(e={});var t=new n({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||s.rand(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),i=this.n.sub(new a(2));do{var o=new a(t.generate(r));if(0=b.cmpn(1)||0<=b.cmp(f))){var g=this.g.mul(b);if(!g.isInfinity()){var h=g.getX(),m=h.umod(this.n);if(0!==m.cmpn(0)){var r=b.invm(this.n).mul(m.mul(t.getPrivate()).iadd(e));if(r=r.umod(this.n),0!==r.cmpn(0)){var _=(g.getY().isOdd()?1:0)|(0===h.cmp(m)?0:2);return o.canonical&&0o.cmpn(1)||0<=o.cmp(this.n))return!1;if(0>r.cmpn(1)||0<=r.cmp(this.n))return!1;var s=r.invm(this.n),d=s.mul(e).umod(this.n),l=s.mul(o).umod(this.n);if(!this.curve._maxwellTrick){var u=this.g.mulAdd(d,n.getPublic(),l);return!u.isInfinity()&&0===u.getX().umod(this.n).cmp(o)}var u=this.g.jmulAdd(d,n.getPublic(),l);return!u.isInfinity()&&u.eqXToP(o)},r.prototype.recoverPubKey=function(t,i,d,p){o((3&d)===d,"The recovery param is more than two bits"),i=new c(i,p);var l=this.n,n=new a(t),e=i.r,u=i.s,s=1&d,f=d>>1;if(0<=e.cmp(this.curve.p.umod(this.curve.n))&&f)throw new Error("Unable to find sencond key candinate");e=f?this.curve.pointFromX(e.add(this.curve.n),s):this.curve.pointFromX(e,s);var y=i.r.invm(l),b=l.sub(n).mul(y).umod(l),g=u.mul(y).umod(l);return this.g.mulAdd(b,e,g)},r.prototype.getKeyRecoveryParam=function(t,e,r,a){if(e=new c(e,a),null!==e.recoveryParam)return e.recoveryParam;for(var n=0;4>n;n++){var s;try{s=this.recoverPubKey(t,e,n)}catch(t){continue}if(s.eq(r))return n}throw new Error("Unable to find valid recovery factor")}},{"../../elliptic":95,"./key":103,"./signature":104,"bn.js":41,"hmac-drbg":134}],103:[function(e,t){"use strict";function r(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}var a=e("bn.js"),n=e("../../elliptic"),s=n.utils,i=s.assert;t.exports=r,r.fromPublic=function(e,t,a){return t instanceof r?t:new r(e,{pub:t,pubEnc:a})},r.fromPrivate=function(e,t,a){return t instanceof r?t:new r(e,{priv:t,privEnc:a})},r.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},r.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},r.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},r.prototype._importPrivate=function(e,t){this.priv=new a(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},r.prototype._importPublic=function(e,t){return e.x||e.y?("mont"===this.ec.curve.type?i(e.x,"Need x coordinate"):("short"===this.ec.curve.type||"edwards"===this.ec.curve.type)&&i(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y))):void(this.pub=this.ec.curve.decodePoint(e,t))},r.prototype.derive=function(e){return e.mul(this.priv).getX()},r.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)},r.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},r.prototype.inspect=function(){return""}},{"../../elliptic":95,"bn.js":41}],104:[function(e,t){"use strict";function r(e,t){return e instanceof r?e:void(this._importDER(e,t)||(p(e.r&&e.s,"Signature without r or s"),this.r=new d(e.r,16),this.s=new d(e.s,16),this.recoveryParam=void 0===e.recoveryParam?null:e.recoveryParam))}function a(){this.place=0}function n(e,t){var r=e[t.place++];if(!(128&r))return r;for(var a=0,n=0,s=t.place;n<(15&r);n++,s++)a<<=8,a|=e[s];return t.place=s,a}function i(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&tt)return void e.push(t);var r=1+(Math.log(t)/Math.LN2>>>3);for(e.push(128|r);--r;)e.push(255&t>>>(r<<3));e.push(t)}var d=e("bn.js"),s=e("../../elliptic"),c=s.utils,p=c.assert;t.exports=r,r.prototype._importDER=function(e,t){e=c.toArray(e,t);var i=new a;if(48!==e[i.place++])return!1;var o=n(e,i);if(o+i.place!==e.length)return!1;if(2!==e[i.place++])return!1;var p=n(e,i),l=e.slice(i.place,p+i.place);if(i.place+=p,2!==e[i.place++])return!1;var u=n(e,i);if(e.length!==u+i.place)return!1;var f=e.slice(i.place,u+i.place);return 0===l[0]&&128&l[1]&&(l=l.slice(1)),0===f[0]&&128&f[1]&&(f=f.slice(1)),this.r=new d(l),this.s=new d(f),this.recoveryParam=null,!0},r.prototype.toDER=function(e){var t=this.r.toArray(),a=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&a[0]&&(a=[0].concat(a)),t=i(t),a=i(a);!a[0]&&!(128&a[1]);)a=a.slice(1);var n=[2];o(n,t.length),n=n.concat(t),n.push(2),o(n,a.length);var d=n.concat(a),p=[48];return o(p,d.length),p=p.concat(d),c.encode(p,e)}},{"../../elliptic":95,"bn.js":41}],105:[function(e,t){"use strict";function r(e){if(i("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof r))return new r(e);var e=n.curves[e].curve;this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=a.sha512}var a=e("hash.js"),n=e("../../elliptic"),s=n.utils,i=s.assert,o=s.parseBytes,d=e("./key"),p=e("./signature");t.exports=r,r.prototype.sign=function(e,t){e=o(e);var a=this.keyFromSecret(t),n=this.hashInt(a.messagePrefix(),e),r=this.g.mul(n),s=this.encodePoint(r),i=this.hashInt(s,a.pubBytes(),e).mul(a.priv()),d=n.add(i).umod(this.curve.n);return this.makeSignature({R:r,S:d,Rencoded:s})},r.prototype.verify=function(e,t,r){e=o(e),t=this.makeSignature(t);var a=this.keyFromPublic(r),n=this.hashInt(t.Rencoded(),a.pubBytes(),e),s=this.g.mul(t.S()),i=t.R().add(a.pub().mul(n));return i.eq(s)},r.prototype.hashInt=function(){for(var e=this.hash(),t=0;t(a>>1)-1?(a>>1)-o:o,n.isubn(s)}else s=0;r.push(s);for(var d=0!==n.cmpn(0)&&0===n.andln(a-1)?t+1:1,p=1;pn?"0":"")+n.toString(16);return t};t.exports={random:function(t){var r;if("undefined"!=typeof window&&window.crypto&&window.crypto.getRandomValues)r=window.crypto.getRandomValues(new Uint8Array(t));else if("undefined"!=typeof e)r=e("crypto").randomBytes(t);else throw"Safe random numbers not available.";for(var a="0x",n=0;nt.length?"0"+t:t},r="0x",a=0,n;a!=e.length;a++){if(n=e.charCodeAt(a),128>n){r+=t(n);continue}if(2048>n)r+=t(192|n>>6);else{if(55295n){if(++a==e.length)return null;var s=e.charCodeAt(a);if(56320>s||57343>18),r+=t(128|63&n>>12)}else r+=t(224|n>>12);r+=t(128|63&n>>6)}r+=t(128|63&n)}return r},toString:function(e){for(var t="",a=0,o=s(e);ad){if(a>=o)return null;d=(31&d)<<6|63&n(e,a)}else if(223d){if(a+1>=o)return null;d=(15&d)<<12|(63&n(e,a))<<6|63&n(e,++a)}else if(239d){if(a+2>=o)return null;d=(7&d)<<18|(63&n(e,a))<<12|(63&n(e,++a))<<6|63&n(e,++a)}else return null;++a}if(65535>=d)t+=r(d);else if(1114111>=d)d-=65536,t+=r(55296|d>>10),t+=r(56320|1023&d);else return null}return t},fromNumber:function(e){var t=e.toString(16);return 0==t.length%2?"0x"+t:"0x0"+t},toNumber:function(e){return parseInt(e.slice(2),16)},fromNat:function(e){return"0x0"===e?"0x":0==e.length%2?e:"0x0"+e.slice(2)},toNat:function(e){return"0"===e[2]?"0x"+e.slice(3):e},fromArray:o,toArray:i,fromUint8Array:function(e){return o([].slice.call(e,0))},toUint8Array:function(e){return new Uint8Array(i(e))}}},{"./array.js":111}],113:[function(e,t){var r=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],a=[1,256,65536,16777216],n=[0,8,16,24],i=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],s=function(e){return{blocks:[],reset:!0,block:0,start:0,blockCount:1600-(e<<1)>>5,outputBlocks:e>>5,s:function(e){return[].concat(e,e,e,e,e)}([0,0,0,0,0,0,0,0,0,0])}},o=function(e,t){for(var o=t.length,p=e.blocks,c=e.blockCount<<2,l=e.blockCount,u=e.outputBlocks,f=e.s,s=0,y,b;s>2]|=t[s]<b?p[y>>2]|=b<b?(p[y>>2]|=(192|b>>6)<>2]|=(128|63&b)<b||57344<=b?(p[y>>2]|=(224|b>>12)<>2]|=(128|63&b>>6)<>2]|=(128|63&b)<>2]|=(240|b>>18)<>2]|=(128|63&b>>12)<>2]|=(128|63&b>>6)<>2]|=(128|63&b)<=c){for(e.start=y-c,e.block=p[l],y=0;y>2]|=a[3&y],e.lastByteIndex===c)for(p[0]=p[l],y=1;y>4]+r[15&m]+r[15&m>>12]+r[15&m>>8]+r[15&m>>20]+r[15&m>>16]+r[15&m>>28]+r[15&m>>24];0==h%l&&(d(f),y=0)}return"0x"+g},d=function(e){var t,r,a,s,o,d,p,c,u,f,y,b,g,m,_,v,w,S,A,B,k,x,E,T,M,I,C,R,P,F,O,N,j,L,D,U,W,H,q,z,V,G,K,X,Y,Z,J,$,Q,ee,te,re,ae,ne,se,ie,oe,de,pe,ce,le,ue,fe;for(a=0;48>a;a+=2)s=e[0]^e[10]^e[20]^e[30]^e[40],o=e[1]^e[11]^e[21]^e[31]^e[41],d=e[2]^e[12]^e[22]^e[32]^e[42],p=e[3]^e[13]^e[23]^e[33]^e[43],c=e[4]^e[14]^e[24]^e[34]^e[44],u=e[5]^e[15]^e[25]^e[35]^e[45],f=e[6]^e[16]^e[26]^e[36]^e[46],y=e[7]^e[17]^e[27]^e[37]^e[47],b=e[8]^e[18]^e[28]^e[38]^e[48],g=e[9]^e[19]^e[29]^e[39]^e[49],t=b^(d<<1|p>>>31),r=g^(p<<1|d>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=s^(c<<1|u>>>31),r=o^(u<<1|c>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=d^(f<<1|y>>>31),r=p^(y<<1|f>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=c^(b<<1|g>>>31),r=u^(g<<1|b>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=f^(s<<1|o>>>31),r=y^(o<<1|s>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,m=e[0],_=e[1],Z=e[11]<<4|e[10]>>>28,J=e[10]<<4|e[11]>>>28,R=e[20]<<3|e[21]>>>29,P=e[21]<<3|e[20]>>>29,ce=e[31]<<9|e[30]>>>23,le=e[30]<<9|e[31]>>>23,G=e[40]<<18|e[41]>>>14,K=e[41]<<18|e[40]>>>14,L=e[2]<<1|e[3]>>>31,D=e[3]<<1|e[2]>>>31,v=e[13]<<12|e[12]>>>20,w=e[12]<<12|e[13]>>>20,$=e[22]<<10|e[23]>>>22,Q=e[23]<<10|e[22]>>>22,F=e[33]<<13|e[32]>>>19,O=e[32]<<13|e[33]>>>19,ue=e[42]<<2|e[43]>>>30,fe=e[43]<<2|e[42]>>>30,ne=e[5]<<30|e[4]>>>2,se=e[4]<<30|e[5]>>>2,U=e[14]<<6|e[15]>>>26,W=e[15]<<6|e[14]>>>26,S=e[25]<<11|e[24]>>>21,A=e[24]<<11|e[25]>>>21,ee=e[34]<<15|e[35]>>>17,te=e[35]<<15|e[34]>>>17,N=e[45]<<29|e[44]>>>3,j=e[44]<<29|e[45]>>>3,T=e[6]<<28|e[7]>>>4,M=e[7]<<28|e[6]>>>4,ie=e[17]<<23|e[16]>>>9,oe=e[16]<<23|e[17]>>>9,H=e[26]<<25|e[27]>>>7,q=e[27]<<25|e[26]>>>7,B=e[36]<<21|e[37]>>>11,k=e[37]<<21|e[36]>>>11,re=e[47]<<24|e[46]>>>8,ae=e[46]<<24|e[47]>>>8,X=e[8]<<27|e[9]>>>5,Y=e[9]<<27|e[8]>>>5,I=e[18]<<20|e[19]>>>12,C=e[19]<<20|e[18]>>>12,de=e[29]<<7|e[28]>>>25,pe=e[28]<<7|e[29]>>>25,z=e[38]<<8|e[39]>>>24,V=e[39]<<8|e[38]>>>24,x=e[48]<<14|e[49]>>>18,E=e[49]<<14|e[48]>>>18,e[0]=m^~v&S,e[1]=_^~w&A,e[10]=T^~I&R,e[11]=M^~C&P,e[20]=L^~U&H,e[21]=D^~W&q,e[30]=X^~Z&$,e[31]=Y^~J&Q,e[40]=ne^~ie&de,e[41]=se^~oe&pe,e[2]=v^~S&B,e[3]=w^~A&k,e[12]=I^~R&F,e[13]=C^~P&O,e[22]=U^~H&z,e[23]=W^~q&V,e[32]=Z^~$&ee,e[33]=J^~Q&te,e[42]=ie^~de&ce,e[43]=oe^~pe&le,e[4]=S^~B&x,e[5]=A^~k&E,e[14]=R^~F&N,e[15]=P^~O&j,e[24]=H^~z&G,e[25]=q^~V&K,e[34]=$^~ee&re,e[35]=Q^~te&ae,e[44]=de^~ce&ue,e[45]=pe^~le&fe,e[6]=B^~x&m,e[7]=k^~E&_,e[16]=F^~N&T,e[17]=O^~j&M,e[26]=z^~G&L,e[27]=V^~K&D,e[36]=ee^~re&X,e[37]=te^~ae&Y,e[46]=ce^~ue&ne,e[47]=le^~fe&se,e[8]=x^~m&v,e[9]=E^~_&w,e[18]=N^~T&I,e[19]=j^~M&C,e[28]=G^~L&U,e[29]=K^~D&W,e[38]=re^~X&Z,e[39]=ae^~Y&J,e[48]=ue^~ne&ie,e[49]=fe^~se&oe,e[0]^=i[a],e[1]^=i[a+1]},p=function(e){return function(t){var r;if("0x"===t.slice(0,2)){r=[];for(var a=2,n=t.length;ap)throw new Error("[ethjs-unit] while converting number "+e+" to wei, too many decimal places");for(;f.length=p?p-49+10:17<=p&&22>=p?p-17+10:15&p;return n}function y(e,t,a,n){for(var s=0,o=d(e.length,a),p=t,l;p>>n}return t}function g(e,t,n){n.negative=t.negative^e.negative;var s=0|e.length+t.length;n.length=s,s=0|s-1;var p=0|e.words[0],c=0|t.words[0],l=p*c,u=67108863&l,f=0|l/67108864;n.words[0]=u;for(var y=1;y>>26,h=67108863&f,m=d(y,t.length-1),_=o(0,y-e.length+1),v;_<=m;_++)v=0|y-_,p=0|e.words[v],c=0|t.words[_],l=p*c+h,g+=0|l/67108864,h=67108863&l;n.words[y]=0|h,f=0|g}return 0===f?n.length--:n.words[y]=0|f,n.strip()}function h(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var s=0,p=0,c=0,l;c>>26),p+=l>>>26,l&=67108863}n.words[c]=u,s=l,l=p}return 0===s?n.length--:n.words[c]=s,n.strip()}function m(e,t,r){var a=new _;return a.mulp(e,t,r)}function _(e,t){this.x=e,this.y=t}function v(e,t){this.name=e,this.p=new f(t,16),this.n=this.p.bitLength(),this.k=new f(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function w(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function S(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function A(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function B(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function k(e){if("string"==typeof e){var t=f._prime(e);this.m=t.p,this.prime=t}else l(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function x(e){k.call(this,e),this.shift=this.m.bitLength(),0!=this.shift%26&&(this.shift+=26-this.shift%26),this.r=new f(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)}"object"==typeof t?t.exports=f:i.BN=f,f.BN=f,f.wordSize=26;var E;try{E=e("buffer").Buffer}catch(t){}f.isBN=function(e){return!!(e instanceof f)||null!==e&&"object"==typeof e&&e.constructor.wordSize===f.wordSize&&Array.isArray(e.words)},f.max=function(e,t){return 0e.cmp(t)?e:t},f.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),l(t===(0|t)&&2<=t&&36>=t),e=e.toString().replace(/\s+/g,"");var a=0;"-"===e[0]&&a++,16===t?this._parseHex(e,a):this._parseBase(e,t,a),"-"===e[0]&&(this.negative=1),this.strip();"le"!==r||this._initArray(this.toArray(),t,r)},f.prototype._initNumber=function(e,t,r){0>e&&(this.negative=1,e=-e),67108864>e?(this.words=[67108863&e],this.length=1):4503599627370496>e?(this.words=[67108863&e,67108863&e/67108864],this.length=2):(l(9007199254740992>e),this.words=[67108863&e,67108863&e/67108864,1],this.length=3);"le"!==r||this._initArray(this.toArray(),t,r)},f.prototype._initArray=function(e,t,r){if(l("number"==typeof e.length),0>=e.length)return this.words=[0],this.length=1,this;this.length=s(e.length/3),this.words=Array(this.length);for(var a=0;a>>26-n,n+=24,26<=n&&(n-=26,o++);else if("le"===r)for(a=0,o=0;a>>26-n,n+=24,26<=n&&(n-=26,o++);return this.strip()},f.prototype._parseHex=function(e,t){this.length=s((e.length-t)/6),this.words=Array(this.length);for(var r=0;r=t;r-=6)o=u(e,r,r+6),this.words[n]|=67108863&o<>>26-a,a+=24,26<=a&&(a-=26,n++);r+6!==t&&(o=u(e,t,r+6),this.words[n]|=67108863&o<>>26-a),this.strip()},f.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var a=0,n=1;67108863>=n;n*=t)a++;a--,n=0|n/t;for(var s=e.length-r,o=s%a,p=d(s,s-o)+r,c=0,l=r;lthis.words[0]+c?this.words[0]+=c:this._iaddn(c);if(0!==o){var u=1;for(c=y(e,l,e.length,t),l=0;lthis.words[0]+c?this.words[0]+=c:this._iaddn(c)}},f.prototype.copy=function(e){e.words=Array(this.length);for(var t=0;t"};var T=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],M=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],I=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];f.prototype.toString=function(e,t){e=e||10,t=0|t||1;var a;if(16===e||"hex"===e){a="";for(var n=0,s=0,o=0;o>>24-n,a=0!==s||o!=this.length-1?T[6-p.length]+p+a:p+a,n+=2,26<=n&&(n-=26,o--)}for(0!==s&&(a=s.toString(16)+a);0!=a.length%t;)a="0"+a;return 0!==this.negative&&(a="-"+a),a}if(e===(0|e)&&2<=e&&36>=e){var u=M[e],f=I[e];a="";var y=this.clone();for(y.negative=0;!y.isZero();){var b=y.modn(f).toString(e);y=y.idivn(f),a=y.isZero()?b+a:T[u-b.length]+b+a}for(this.isZero()&&(a="0"+a);0!=a.length%t;)a="0"+a;return 0!==this.negative&&(a="-"+a),a}l(!1,"Base should be between 2 and 36")},f.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:2>>=13),64<=a&&(n+=7,a>>>=7),8<=a&&(n+=4,a>>>=4),2<=a&&(n+=2,a>>>=2),n+a},f.prototype._zeroBits=function(e){if(0===e)return 26;var a=e,n=0;return 0==(8191&a)&&(n+=13,a>>>=13),0==(127&a)&&(n+=7,a>>>=7),0==(15&a)&&(n+=4,a>>>=4),0==(3&a)&&(n+=2,a>>>=2),0==(1&a)&&n++,n},f.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},f.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0,a;te.length?this.clone().ior(e):e.clone().ior(this)},f.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},f.prototype.iuand=function(e){var t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},f.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},f.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},f.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},f.prototype.inotn=function(e){l("number"==typeof e&&0<=e);var t=0|s(e/26),r=e%26;this._expand(t),0>26-r),this.strip()},f.prototype.notn=function(e){return this.clone().inotn(e)},f.prototype.setn=function(e,t){l("number"==typeof e&&0<=e);var r=0|e/26,a=e%26;return this._expand(r+1),t?this.words[r]|=1<e.length?(n=this,s=e):(n=e,s=this);for(var o=0,d=0;d>>26;for(;0!==o&&d>>26;if(this.length=n.length,0!==o)this.words[this.length]=o,this.length++;else if(n!==this)for(;de.length?this.clone().iadd(e):e.clone().iadd(this)},f.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n=this.cmp(e);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;var s,d;0>26,this.words[c]=67108863&t;for(;0!==p&&c>26,this.words[c]=67108863&t;if(0===p&&c>>13,u=0|s[1],f=8191&u,y=u>>>13,b=0|s[2],g=8191&b,h=b>>>13,m=0|s[3],_=8191&m,v=m>>>13,w=0|s[4],S=8191&w,A=w>>>13,B=0|s[5],k=8191&B,x=B>>>13,E=0|s[6],T=8191&E,M=E>>>13,I=0|s[7],C=8191&I,R=I>>>13,P=0|s[8],F=8191&P,O=P>>>13,N=0|s[9],j=8191&N,L=N>>>13,D=0|a[0],U=8191&D,W=D>>>13,H=0|a[1],q=8191&H,z=H>>>13,V=0|a[2],G=8191&V,K=V>>>13,X=0|a[3],Y=8191&X,Z=X>>>13,J=0|a[4],$=8191&J,Q=J>>>13,ee=0|a[5],te=8191&ee,re=ee>>>13,ae=0|a[6],ne=8191&ae,se=ae>>>13,ie=0|a[7],oe=8191&ie,de=ie>>>13,pe=0|a[8],ce=8191&pe,le=pe>>>13,ue=0|a[9],fe=8191&ue,ye=ue>>>13,be,ge,he;r.negative=e.negative^t.negative,r.length=19,be=n(p,U),ge=n(p,W),ge=0|ge+n(l,U),he=n(l,W);var me=0|(0|o+be)+((8191&ge)<<13);o=0|(0|he+(ge>>>13))+(me>>>26),me&=67108863,be=n(f,U),ge=n(f,W),ge=0|ge+n(y,U),he=n(y,W),be=0|be+n(p,q),ge=0|ge+n(p,z),ge=0|ge+n(l,q),he=0|he+n(l,z);var _e=0|(0|o+be)+((8191&ge)<<13);o=0|(0|he+(ge>>>13))+(_e>>>26),_e&=67108863,be=n(g,U),ge=n(g,W),ge=0|ge+n(h,U),he=n(h,W),be=0|be+n(f,q),ge=0|ge+n(f,z),ge=0|ge+n(y,q),he=0|he+n(y,z),be=0|be+n(p,G),ge=0|ge+n(p,K),ge=0|ge+n(l,G),he=0|he+n(l,K);var ve=0|(0|o+be)+((8191&ge)<<13);o=0|(0|he+(ge>>>13))+(ve>>>26),ve&=67108863,be=n(_,U),ge=n(_,W),ge=0|ge+n(v,U),he=n(v,W),be=0|be+n(g,q),ge=0|ge+n(g,z),ge=0|ge+n(h,q),he=0|he+n(h,z),be=0|be+n(f,G),ge=0|ge+n(f,K),ge=0|ge+n(y,G),he=0|he+n(y,K),be=0|be+n(p,Y),ge=0|ge+n(p,Z),ge=0|ge+n(l,Y),he=0|he+n(l,Z);var we=0|(0|o+be)+((8191&ge)<<13);o=0|(0|he+(ge>>>13))+(we>>>26),we&=67108863,be=n(S,U),ge=n(S,W),ge=0|ge+n(A,U),he=n(A,W),be=0|be+n(_,q),ge=0|ge+n(_,z),ge=0|ge+n(v,q),he=0|he+n(v,z),be=0|be+n(g,G),ge=0|ge+n(g,K),ge=0|ge+n(h,G),he=0|he+n(h,K),be=0|be+n(f,Y),ge=0|ge+n(f,Z),ge=0|ge+n(y,Y),he=0|he+n(y,Z),be=0|be+n(p,$),ge=0|ge+n(p,Q),ge=0|ge+n(l,$),he=0|he+n(l,Q);var Se=0|(0|o+be)+((8191&ge)<<13);o=0|(0|he+(ge>>>13))+(Se>>>26),Se&=67108863,be=n(k,U),ge=n(k,W),ge=0|ge+n(x,U),he=n(x,W),be=0|be+n(S,q),ge=0|ge+n(S,z),ge=0|ge+n(A,q),he=0|he+n(A,z),be=0|be+n(_,G),ge=0|ge+n(_,K),ge=0|ge+n(v,G),he=0|he+n(v,K),be=0|be+n(g,Y),ge=0|ge+n(g,Z),ge=0|ge+n(h,Y),he=0|he+n(h,Z),be=0|be+n(f,$),ge=0|ge+n(f,Q),ge=0|ge+n(y,$),he=0|he+n(y,Q),be=0|be+n(p,te),ge=0|ge+n(p,re),ge=0|ge+n(l,te),he=0|he+n(l,re);var Ae=0|(0|o+be)+((8191&ge)<<13);o=0|(0|he+(ge>>>13))+(Ae>>>26),Ae&=67108863,be=n(T,U),ge=n(T,W),ge=0|ge+n(M,U),he=n(M,W),be=0|be+n(k,q),ge=0|ge+n(k,z),ge=0|ge+n(x,q),he=0|he+n(x,z),be=0|be+n(S,G),ge=0|ge+n(S,K),ge=0|ge+n(A,G),he=0|he+n(A,K),be=0|be+n(_,Y),ge=0|ge+n(_,Z),ge=0|ge+n(v,Y),he=0|he+n(v,Z),be=0|be+n(g,$),ge=0|ge+n(g,Q),ge=0|ge+n(h,$),he=0|he+n(h,Q),be=0|be+n(f,te),ge=0|ge+n(f,re),ge=0|ge+n(y,te),he=0|he+n(y,re),be=0|be+n(p,ne),ge=0|ge+n(p,se),ge=0|ge+n(l,ne),he=0|he+n(l,se);var Be=0|(0|o+be)+((8191&ge)<<13);o=0|(0|he+(ge>>>13))+(Be>>>26),Be&=67108863,be=n(C,U),ge=n(C,W),ge=0|ge+n(R,U),he=n(R,W),be=0|be+n(T,q),ge=0|ge+n(T,z),ge=0|ge+n(M,q),he=0|he+n(M,z),be=0|be+n(k,G),ge=0|ge+n(k,K),ge=0|ge+n(x,G),he=0|he+n(x,K),be=0|be+n(S,Y),ge=0|ge+n(S,Z),ge=0|ge+n(A,Y),he=0|he+n(A,Z),be=0|be+n(_,$),ge=0|ge+n(_,Q),ge=0|ge+n(v,$),he=0|he+n(v,Q),be=0|be+n(g,te),ge=0|ge+n(g,re),ge=0|ge+n(h,te),he=0|he+n(h,re),be=0|be+n(f,ne),ge=0|ge+n(f,se),ge=0|ge+n(y,ne),he=0|he+n(y,se),be=0|be+n(p,oe),ge=0|ge+n(p,de),ge=0|ge+n(l,oe),he=0|he+n(l,de);var ke=0|(0|o+be)+((8191&ge)<<13);o=0|(0|he+(ge>>>13))+(ke>>>26),ke&=67108863,be=n(F,U),ge=n(F,W),ge=0|ge+n(O,U),he=n(O,W),be=0|be+n(C,q),ge=0|ge+n(C,z),ge=0|ge+n(R,q),he=0|he+n(R,z),be=0|be+n(T,G),ge=0|ge+n(T,K),ge=0|ge+n(M,G),he=0|he+n(M,K),be=0|be+n(k,Y),ge=0|ge+n(k,Z),ge=0|ge+n(x,Y),he=0|he+n(x,Z),be=0|be+n(S,$),ge=0|ge+n(S,Q),ge=0|ge+n(A,$),he=0|he+n(A,Q),be=0|be+n(_,te),ge=0|ge+n(_,re),ge=0|ge+n(v,te),he=0|he+n(v,re),be=0|be+n(g,ne),ge=0|ge+n(g,se),ge=0|ge+n(h,ne),he=0|he+n(h,se),be=0|be+n(f,oe),ge=0|ge+n(f,de),ge=0|ge+n(y,oe),he=0|he+n(y,de),be=0|be+n(p,ce),ge=0|ge+n(p,le),ge=0|ge+n(l,ce),he=0|he+n(l,le);var xe=0|(0|o+be)+((8191&ge)<<13);o=0|(0|he+(ge>>>13))+(xe>>>26),xe&=67108863,be=n(j,U),ge=n(j,W),ge=0|ge+n(L,U),he=n(L,W),be=0|be+n(F,q),ge=0|ge+n(F,z),ge=0|ge+n(O,q),he=0|he+n(O,z),be=0|be+n(C,G),ge=0|ge+n(C,K),ge=0|ge+n(R,G),he=0|he+n(R,K),be=0|be+n(T,Y),ge=0|ge+n(T,Z),ge=0|ge+n(M,Y),he=0|he+n(M,Z),be=0|be+n(k,$),ge=0|ge+n(k,Q),ge=0|ge+n(x,$),he=0|he+n(x,Q),be=0|be+n(S,te),ge=0|ge+n(S,re),ge=0|ge+n(A,te),he=0|he+n(A,re),be=0|be+n(_,ne),ge=0|ge+n(_,se),ge=0|ge+n(v,ne),he=0|he+n(v,se),be=0|be+n(g,oe),ge=0|ge+n(g,de),ge=0|ge+n(h,oe),he=0|he+n(h,de),be=0|be+n(f,ce),ge=0|ge+n(f,le),ge=0|ge+n(y,ce),he=0|he+n(y,le),be=0|be+n(p,fe),ge=0|ge+n(p,ye),ge=0|ge+n(l,fe),he=0|he+n(l,ye);var Ee=0|(0|o+be)+((8191&ge)<<13);o=0|(0|he+(ge>>>13))+(Ee>>>26),Ee&=67108863,be=n(j,q),ge=n(j,z),ge=0|ge+n(L,q),he=n(L,z),be=0|be+n(F,G),ge=0|ge+n(F,K),ge=0|ge+n(O,G),he=0|he+n(O,K),be=0|be+n(C,Y),ge=0|ge+n(C,Z),ge=0|ge+n(R,Y),he=0|he+n(R,Z),be=0|be+n(T,$),ge=0|ge+n(T,Q),ge=0|ge+n(M,$),he=0|he+n(M,Q),be=0|be+n(k,te),ge=0|ge+n(k,re),ge=0|ge+n(x,te),he=0|he+n(x,re),be=0|be+n(S,ne),ge=0|ge+n(S,se),ge=0|ge+n(A,ne),he=0|he+n(A,se),be=0|be+n(_,oe),ge=0|ge+n(_,de),ge=0|ge+n(v,oe),he=0|he+n(v,de),be=0|be+n(g,ce),ge=0|ge+n(g,le),ge=0|ge+n(h,ce),he=0|he+n(h,le),be=0|be+n(f,fe),ge=0|ge+n(f,ye),ge=0|ge+n(y,fe),he=0|he+n(y,ye);var Te=0|(0|o+be)+((8191&ge)<<13);o=0|(0|he+(ge>>>13))+(Te>>>26),Te&=67108863,be=n(j,G),ge=n(j,K),ge=0|ge+n(L,G),he=n(L,K),be=0|be+n(F,Y),ge=0|ge+n(F,Z),ge=0|ge+n(O,Y),he=0|he+n(O,Z),be=0|be+n(C,$),ge=0|ge+n(C,Q),ge=0|ge+n(R,$),he=0|he+n(R,Q),be=0|be+n(T,te),ge=0|ge+n(T,re),ge=0|ge+n(M,te),he=0|he+n(M,re),be=0|be+n(k,ne),ge=0|ge+n(k,se),ge=0|ge+n(x,ne),he=0|he+n(x,se),be=0|be+n(S,oe),ge=0|ge+n(S,de),ge=0|ge+n(A,oe),he=0|he+n(A,de),be=0|be+n(_,ce),ge=0|ge+n(_,le),ge=0|ge+n(v,ce),he=0|he+n(v,le),be=0|be+n(g,fe),ge=0|ge+n(g,ye),ge=0|ge+n(h,fe),he=0|he+n(h,ye);var Me=0|(0|o+be)+((8191&ge)<<13);o=0|(0|he+(ge>>>13))+(Me>>>26),Me&=67108863,be=n(j,Y),ge=n(j,Z),ge=0|ge+n(L,Y),he=n(L,Z),be=0|be+n(F,$),ge=0|ge+n(F,Q),ge=0|ge+n(O,$),he=0|he+n(O,Q),be=0|be+n(C,te),ge=0|ge+n(C,re),ge=0|ge+n(R,te),he=0|he+n(R,re),be=0|be+n(T,ne),ge=0|ge+n(T,se),ge=0|ge+n(M,ne),he=0|he+n(M,se),be=0|be+n(k,oe),ge=0|ge+n(k,de),ge=0|ge+n(x,oe),he=0|he+n(x,de),be=0|be+n(S,ce),ge=0|ge+n(S,le),ge=0|ge+n(A,ce),he=0|he+n(A,le),be=0|be+n(_,fe),ge=0|ge+n(_,ye),ge=0|ge+n(v,fe),he=0|he+n(v,ye);var Ie=0|(0|o+be)+((8191&ge)<<13);o=0|(0|he+(ge>>>13))+(Ie>>>26),Ie&=67108863,be=n(j,$),ge=n(j,Q),ge=0|ge+n(L,$),he=n(L,Q),be=0|be+n(F,te),ge=0|ge+n(F,re),ge=0|ge+n(O,te),he=0|he+n(O,re),be=0|be+n(C,ne),ge=0|ge+n(C,se),ge=0|ge+n(R,ne),he=0|he+n(R,se),be=0|be+n(T,oe),ge=0|ge+n(T,de),ge=0|ge+n(M,oe),he=0|he+n(M,de),be=0|be+n(k,ce),ge=0|ge+n(k,le),ge=0|ge+n(x,ce),he=0|he+n(x,le),be=0|be+n(S,fe),ge=0|ge+n(S,ye),ge=0|ge+n(A,fe),he=0|he+n(A,ye);var Ce=0|(0|o+be)+((8191&ge)<<13);o=0|(0|he+(ge>>>13))+(Ce>>>26),Ce&=67108863,be=n(j,te),ge=n(j,re),ge=0|ge+n(L,te),he=n(L,re),be=0|be+n(F,ne),ge=0|ge+n(F,se),ge=0|ge+n(O,ne),he=0|he+n(O,se),be=0|be+n(C,oe),ge=0|ge+n(C,de),ge=0|ge+n(R,oe),he=0|he+n(R,de),be=0|be+n(T,ce),ge=0|ge+n(T,le),ge=0|ge+n(M,ce),he=0|he+n(M,le),be=0|be+n(k,fe),ge=0|ge+n(k,ye),ge=0|ge+n(x,fe),he=0|he+n(x,ye);var Re=0|(0|o+be)+((8191&ge)<<13);o=0|(0|he+(ge>>>13))+(Re>>>26),Re&=67108863,be=n(j,ne),ge=n(j,se),ge=0|ge+n(L,ne),he=n(L,se),be=0|be+n(F,oe),ge=0|ge+n(F,de),ge=0|ge+n(O,oe),he=0|he+n(O,de),be=0|be+n(C,ce),ge=0|ge+n(C,le),ge=0|ge+n(R,ce),he=0|he+n(R,le),be=0|be+n(T,fe),ge=0|ge+n(T,ye),ge=0|ge+n(M,fe),he=0|he+n(M,ye);var Pe=0|(0|o+be)+((8191&ge)<<13);o=0|(0|he+(ge>>>13))+(Pe>>>26),Pe&=67108863,be=n(j,oe),ge=n(j,de),ge=0|ge+n(L,oe),he=n(L,de),be=0|be+n(F,ce),ge=0|ge+n(F,le),ge=0|ge+n(O,ce),he=0|he+n(O,le),be=0|be+n(C,fe),ge=0|ge+n(C,ye),ge=0|ge+n(R,fe),he=0|he+n(R,ye);var Fe=0|(0|o+be)+((8191&ge)<<13);o=0|(0|he+(ge>>>13))+(Fe>>>26),Fe&=67108863,be=n(j,ce),ge=n(j,le),ge=0|ge+n(L,ce),he=n(L,le),be=0|be+n(F,fe),ge=0|ge+n(F,ye),ge=0|ge+n(O,fe),he=0|he+n(O,ye);var Oe=0|(0|o+be)+((8191&ge)<<13);o=0|(0|he+(ge>>>13))+(Oe>>>26),Oe&=67108863,be=n(j,fe),ge=n(j,ye),ge=0|ge+n(L,fe),he=n(L,ye);var Ne=0|(0|o+be)+((8191&ge)<<13);return o=0|(0|he+(ge>>>13))+(Ne>>>26),Ne&=67108863,i[0]=me,i[1]=_e,i[2]=ve,i[3]=we,i[4]=Se,i[5]=Ae,i[6]=Be,i[7]=ke,i[8]=xe,i[9]=Ee,i[10]=Te,i[11]=Me,i[12]=Ie,i[13]=Ce,i[14]=Re,i[15]=Pe,i[16]=Fe,i[17]=Oe,i[18]=Ne,0!==o&&(i[19]=o,r.length++),r};n||(C=g),f.prototype.mulTo=function(e,t){var r=this.length+e.length,a;return a=10===this.length&&10===e.length?C(this,e,t):63>r?g(this,e,t):1024>r?h(this,e,t):m(this,e,t),a},_.prototype.makeRBT=function(e){for(var r=Array(e),t=f.prototype._countBits(e)-1,a=0;a>=1;return a},_.prototype.permute=function(e,t,r,a,n,s){for(var o=0;o>>=1)n++;return 1<=a))for(var n=0,s;nn?0:0|n/67108864;return e},_.prototype.convert13b=function(e,t,r,a){for(var n=0,s=0;s>>=13,r[2*s+1]=8191&n,n>>>=13;for(s=2*t;se);for(var t=0,r=0;r>=26,t+=0|a/67108864,t+=n>>>26,this.words[r]=67108863&n}return 0!==t&&(this.words[r]=t,this.length++),this},f.prototype.muln=function(e){return this.clone().imuln(e)},f.prototype.sqr=function(){return this.mul(this)},f.prototype.isqr=function(){return this.imul(this.clone())},f.prototype.pow=function(e){var t=b(e);if(0===t.length)return new f(1);for(var r=this,a=0;a>>26-t<<26-t,o=(0|this.words[a])-s<>>26-t}n&&(this.words[a]=n,this.length++)}if(0!==r){for(a=this.length-1;0<=a;a--)this.words[a+r]=this.words[a];for(a=0;ar)for(this.length-=r,c=0;c=n);c--){var f=0|this.words[c];this.words[c]=u<<26-p|f>>>p,u=f&(67108863^67108863>>>p<>>t<e),0>e?this.isubn(-e):0===this.negative?this._iaddn(e):1===this.length&&(0|this.words[0])e),0>e)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&0>this.words[0])this.words[0]=-this.words[0],this.negative=1;else for(var t=0;tthis.words[t];t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},f.prototype.addn=function(e){return this.clone().iaddn(e)},f.prototype.subn=function(e){return this.clone().isubn(e)},f.prototype.iabs=function(){return this.negative=0,this},f.prototype.abs=function(){return this.clone().iabs()},f.prototype._ishlnsubmul=function(e,t,r){var a=e.length+r,n;this._expand(a);var s=0,o;for(n=0;n>26)-(0|d/67108864),this.words[n+r]=67108863&o}for(;n>26,this.words[n+r]=67108863&o;if(0===s)return this.strip();for(l(-1===s),s=0,n=0;n>26,this.words[n]=67108863&o;return this.negative=1,this.strip()},f.prototype._wordDiv=function(e,t){var r=this.length-e.length,n=this.clone(),s=e,o=0|s.words[s.length-1],p=this._countBits(o);r=26-p,0!=r&&(s=s.ushln(r),n.iushln(r),o=0|s.words[s.length-1]);var c=n.length-s.length,l;if("mod"!==t){l=new f(null),l.length=c+1,l.words=Array(l.length);for(var u=0;uthis.length||0>this.cmp(e)?{div:new f(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new f(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new f(this.modn(e.words[0]))}:this._wordDiv(e,t):(s=this.neg().divmod(e.neg(),t),"div"!==t&&(n=s.mod.neg(),r&&0!==n.negative&&n.isub(e)),{div:s.div,mod:n})},f.prototype.div=function(e){return this.divmod(e,"div",!1).div},f.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},f.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},f.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0===t.div.negative?t.mod:t.mod.isub(e),a=e.ushrn(1),n=e.andln(1),s=r.cmp(a);return 0>s||1===n&&0===s?t.div:0===t.div.negative?t.div.iaddn(1):t.div.isubn(1)},f.prototype.modn=function(e){l(67108863>=e);for(var t=0,r=this.length-1;0<=r;r--)t=(67108864%e*t+(0|this.words[r]))%e;return t},f.prototype.idivn=function(e){l(67108863>=e);for(var t=0,r=this.length-1,a;0<=r;r--)a=(0|this.words[r])+67108864*t,this.words[r]=0|a/e,t=a%e;return this.strip()},f.prototype.divn=function(e){return this.clone().idivn(e)},f.prototype.egcd=function(e){l(0===e.negative),l(!e.isZero());var t=this,r=e.clone();t=0===t.negative?t.clone():t.umod(e);for(var a=new f(1),n=new f(0),s=new f(0),o=new f(1),d=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++d;for(var p=r.clone(),c=t.clone();!t.isZero();){for(var u=0,y=1;0==(t.words[0]&y)&&26>u;++u,y<<=1);if(0b;++b,h<<=1);if(0d;++d,p<<=1);if(0c;++c,u<<=1);if(0y.cmpn(0)&&y.iadd(e),y},f.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var n=this.clone(),s=e.clone();n.negative=0,s.negative=0;for(var i=0;n.isEven()&&s.isEven();i++)n.iushrn(1),s.iushrn(1);do{for(;n.isEven();)n.iushrn(1);for(;s.isEven();)s.iushrn(1);var o=n.cmp(s);if(0>o){var r=n;n=s,s=r}else if(0===o||0===s.cmpn(1))break;n.isub(s)}while(!0);return s.iushln(i)},f.prototype.invm=function(e){return this.egcd(e).a.umod(e)},f.prototype.isEven=function(){return 0==(1&this.words[0])},f.prototype.isOdd=function(){return 1==(1&this.words[0])},f.prototype.andln=function(e){return this.words[0]&e},f.prototype.bincn=function(e){l("number"==typeof e);var t=e%26,r=(e-t)/26,a=1<>>26,o&=67108863,this.words[s]=o;return 0!==n&&(this.words[s]=n,this.length++),this},f.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},f.prototype.cmpn=function(e){var t=0>e;if(0!==this.negative&&!t)return-1;if(0===this.negative&&t)return 1;this.strip();var r;if(1=e,"Number is too big");var a=0|this.words[0];r=a===e?0:ae.length)return 1;if(this.lengtha&&(t=1);break}}return t},f.prototype.gtn=function(e){return 1===this.cmpn(e)},f.prototype.gt=function(e){return 1===this.cmp(e)},f.prototype.gten=function(e){return 0<=this.cmpn(e)},f.prototype.gte=function(e){return 0<=this.cmp(e)},f.prototype.ltn=function(e){return-1===this.cmpn(e)},f.prototype.lt=function(e){return-1===this.cmp(e)},f.prototype.lten=function(e){return 0>=this.cmpn(e)},f.prototype.lte=function(e){return 0>=this.cmp(e)},f.prototype.eqn=function(e){return 0===this.cmpn(e)},f.prototype.eq=function(e){return 0===this.cmp(e)},f.red=function(e){return new k(e)},f.prototype.toRed=function(e){return l(!this.red,"Already a number in reduction context"),l(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},f.prototype.fromRed=function(){return l(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},f.prototype._forceRed=function(e){return this.red=e,this},f.prototype.forceRed=function(e){return l(!this.red,"Already a number in reduction context"),this._forceRed(e)},f.prototype.redAdd=function(e){return l(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},f.prototype.redIAdd=function(e){return l(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},f.prototype.redSub=function(e){return l(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},f.prototype.redISub=function(e){return l(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},f.prototype.redShl=function(e){return l(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},f.prototype.redMul=function(e){return l(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},f.prototype.redIMul=function(e){return l(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},f.prototype.redSqr=function(){return l(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},f.prototype.redISqr=function(){return l(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},f.prototype.redSqrt=function(){return l(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},f.prototype.redInvm=function(){return l(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},f.prototype.redNeg=function(){return l(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},f.prototype.redPow=function(e){return l(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var R={k256:null,p224:null,p192:null,p25519:null};v.prototype._tmp=function(){var e=new f(null);return e.words=Array(s(this.n/13)),e},v.prototype.ireduce=function(e){var t=e,a;do this.split(t,this.tmp),t=this.imulK(t),t=t.iadd(this.tmp),a=t.bitLength();while(a>this.n);var n=a=e.length)return e.words[0]=0,void(e.length=1);var s=e.words[9];for(t.words[t.length++]=s&r,n=10;n>>22,s=o}s>>>=22,e.words[n-10]=s,e.length-=0===s&&10>>=26,e.words[r]=n,t=a}return 0!==t&&(e.words[e.length++]=t),e},f._prime=function e(t){if(R[t])return R[t];var e;if("k256"===t)e=new w;else if("p224"===t)e=new S;else if("p192"===t)e=new A;else if("p25519"===t)e=new B;else throw new Error("Unknown prime "+t);return R[t]=e,e},k.prototype._verify1=function(e){l(0===e.negative,"red works only with positives"),l(e.red,"red works only with red numbers")},k.prototype._verify2=function(e,t){l(0==(e.negative|t.negative),"red works only with positives"),l(e.red&&e.red===t.red,"red works only with red numbers")},k.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},k.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},k.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return 0<=r.cmp(this.m)&&r.isub(this.m),r._forceRed(this)},k.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return 0<=r.cmp(this.m)&&r.isub(this.m),r},k.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return 0>r.cmpn(0)&&r.iadd(this.m),r._forceRed(this)},k.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return 0>r.cmpn(0)&&r.iadd(this.m),r},k.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},k.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},k.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},k.prototype.isqr=function(e){return this.imul(e,e.clone())},k.prototype.sqr=function(e){return this.mul(e,e)},k.prototype.sqrt=function(e){if(e.isZero())return e.clone();var a=this.m.andln(3);if(l(1==a%2),3===a){var n=this.m.add(new f(1)).iushrn(2);return this.pow(e,n)}for(var o=this.m.subn(1),d=0;!o.isZero()&&0===o.andln(1);)d++,o.iushrn(1);l(!o.isZero());var p=new f(1).toRed(this),u=p.redNeg(),y=this.m.subn(1).iushrn(1),g=this.m.bitLength();for(g=new f(2*g*g).toRed(this);0!==this.pow(g,y).cmp(u);)g.redIAdd(u);for(var h=this.pow(g,o),_=this.pow(e,o.addn(1).iushrn(1)),v=this.pow(e,o),w=d;0!==v.cmp(p);){for(var S=v,A=0;0!==S.cmp(p);A++)S=S.redSqr();l(A>c,n!==r[0]&&(n=this.sqr(n)),0===l&&0===s){o=0;continue}s<<=1,s|=l,o++,4!==o&&(0!=a||0!=c)||(n=this.mul(n,r[s]),o=0,s=0)}d=26}return n},k.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},k.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},f.mont=function(e){return new x(e)},c(x,k),x.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},x.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},x.prototype.imul=function(e,r){if(e.isZero()||r.isZero())return e.words[0]=0,e.length=1,e;var a=e.imul(r),t=a.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=a.isub(t).iushrn(this.shift),s=n;return 0<=n.cmp(this.m)?s=n.isub(this.m):0>n.cmpn(0)&&(s=n.iadd(this.m)),s._forceRed(this)},x.prototype.mul=function(e,r){if(e.isZero()||r.isZero())return new f(0)._forceRed(this);var a=e.mul(r),t=a.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=a.isub(t).iushrn(this.shift),s=n;return 0<=n.cmp(this.m)?s=n.isub(this.m):0>n.cmpn(0)&&(s=n.iadd(this.m)),s._forceRed(this)},x.prototype.invm=function(e){var t=this.imod(e._invmp(this.m).mul(this.r2));return t._forceRed(this)}})("undefined"==typeof t||t,this)},{}],116:[function(e,t){"use strict";function r(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function a(){}var n="function"!=typeof Object.create&&"~";a.prototype._events=void 0,a.prototype.listeners=function(e,t){var r=n?n+e:e,a=this._events&&this._events[r];if(t)return!!a;if(!a)return[];if(a.fn)return[a.fn];for(var s=0,o=a.length,d=Array(o);ss)){o.warned=!0;var d=new Error("Possible EventEmitter memory leak detected. "+o.length+" \""+(t+"\" listeners added. Use emitter.setMaxListeners() to increase limit."));d.name="MaxListenersExceededWarning",d.emitter=e,d.type=t,d.count=o.length,"object"==typeof console&&console.warn&&console.warn("%s: %s",d.name,d.message)}return e}function l(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:for(var e=Array(arguments.length),t=0;te||e!==e)throw new TypeError("\"defaultMaxListeners\" must be a positive number");w=e}}):r.defaultMaxListeners=w,r.prototype.setMaxListeners=function(e){if("number"!=typeof e||0>e||isNaN(e))throw new TypeError("\"n\" argument must be a positive number");return this._maxListeners=e,this},r.prototype.getMaxListeners=function(){return a(this)},r.prototype.emit=function(e){var t="error"===e,r,a,o,l,u,f;if(f=this._events,f)t=t&&null==f.error;else if(!t)return!1;if(t){if(1n)return this;0===n?r.shift():b(r,n),1===r.length&&(a[e]=r[0]),a.removeListener&&this.emit("removeListener",e,o||t)}return this},r.prototype.removeAllListeners=function(e){var t,r,a;if(r=this._events,!r)return this;if(!r.removeListener)return 0===arguments.length?(this._events=_(null),this._eventsCount=0):r[e]&&(0==--this._eventsCount?this._events=_(null):delete r[e]),this;if(0===arguments.length){var n=m(r),s;for(a=0;a=this._blockSize;){for(var o=this._blockOffset;or;++r)this._length[r]=0;return t},a.prototype._digest=function(){throw new Error("_digest is not implemented")},t.exports=a},{inherits:137,"safe-buffer":194,stream:205}],122:[function(e,t,r){var a=r;a.utils=e("./hash/utils"),a.common=e("./hash/common"),a.sha=e("./hash/sha"),a.ripemd=e("./hash/ripemd"),a.hmac=e("./hash/hmac"),a.sha1=a.sha.sha1,a.sha256=a.sha.sha256,a.sha224=a.sha.sha224,a.sha384=a.sha.sha384,a.sha512=a.sha.sha512,a.ripemd160=a.ripemd.ripemd160},{"./hash/common":123,"./hash/hmac":124,"./hash/ripemd":125,"./hash/sha":126,"./hash/utils":133}],123:[function(e,t,r){"use strict";function a(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}var n=e("./utils"),s=e("minimalistic-assert");r.BlockHash=a,a.prototype.update=function(e,t){if(e=n.toArray(e,t),this.pending=this.pending?this.pending.concat(e):e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){e=this.pending;var a=e.length%this._delta8;this.pending=e.slice(e.length-a,e.length),0===this.pending.length&&(this.pending=null),e=n.join32(e,0,e.length-a,this.endian);for(var r=0;r>>24,n[s++]=255&e>>>16,n[s++]=255&e>>>8,n[s++]=255&e}else for(n[s++]=255&e,n[s++]=255&e>>>8,n[s++]=255&e>>>16,n[s++]=255&e>>>24,n[s++]=0,n[s++]=0,n[s++]=0,n[s++]=0,o=8;othis.blockSize&&(e=new this.Hash().update(e).digest()),n(e.length<=this.blockSize);for(var t=e.length;t=e?t^r^a:31>=e?t&r|~t&a:47>=e?(t|~r)^a:63>=e?t&a|r&~a:t^(r|~a)}function o(e){return 15>=e?0:31>=e?1518500249:47>=e?1859775393:63>=e?2400959708:2840853838}function d(e){return 15>=e?1352829926:31>=e?1548603684:47>=e?1836072691:63>=e?2053994217:0}var p=e("./utils"),c=e("./common"),l=p.rotl32,u=p.sum32,f=p.sum32_3,y=p.sum32_4,b=c.BlockHash;p.inherits(n,b),a.ripemd160=n,n.blockSize=512,n.outSize=160,n.hmacStrength=192,n.padLength=64,n.prototype._update=function(e,t){for(var a=this.h[0],n=this.h[1],p=this.h[2],c=this.h[3],b=this.h[4],m=a,_=n,v=p,w=c,S=b,k=0,x;80>k;k++)x=u(l(y(a,i(k,n,p,c),e[g[k]+t],o(k)),h[k]),b),a=b,b=c,c=l(p,10),p=n,n=x,x=u(l(y(m,i(79-k,_,v,w),e[r[k]+t],d(k)),s[k]),S),m=S,S=w,w=l(v,10),v=_,_=x;x=f(this.h[1],p,w),this.h[1]=f(this.h[2],c,S),this.h[2]=f(this.h[3],b,m),this.h[3]=f(this.h[4],a,_),this.h[4]=f(this.h[0],n,v),this.h[0]=x},n.prototype._digest=function(e){return"hex"===e?p.toHex32(this.h,"little"):p.split32(this.h,"little")};var g=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],r=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],h=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],s=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},{"./common":123,"./utils":133}],126:[function(e,t,r){"use strict";r.sha1=e("./sha/1"),r.sha224=e("./sha/224"),r.sha256=e("./sha/256"),r.sha384=e("./sha/384"),r.sha512=e("./sha/512")},{"./sha/1":127,"./sha/224":128,"./sha/256":129,"./sha/384":130,"./sha/512":131}],127:[function(e,t){"use strict";function r(){return this instanceof r?void(i.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=Array(80)):new r}var a=e("../utils"),n=e("../common"),s=e("./common"),o=a.rotl32,p=a.sum32,l=a.sum32_5,u=s.ft_1,i=n.BlockHash,f=[1518500249,1859775393,2400959708,3395469782];a.inherits(r,i),t.exports=r,r.blockSize=512,r.outSize=160,r.hmacStrength=80,r.padLength=64,r.prototype._update=function(r,n){for(var y=this.W,g=0;16>g;g++)y[g]=r[n+g];for(;gs;s++)n[s]=t[r+s];for(;si&&(i+=4294967296),i}function n(e,t,a,n,s,i){var o=t&n^~t&i;return 0>o&&(o+=4294967296),o}function s(e,t,a,n,s){var i=e&a^e&s^a&s;return 0>i&&(i+=4294967296),i}function o(e,t,a,n,s,i){var o=t&n^t&i^n&i;return 0>o&&(o+=4294967296),o}function d(e,t){var a=m(e,t,28),n=m(t,e,2),s=m(t,e,7),i=a^n^s;return 0>i&&(i+=4294967296),i}function p(e,t){var a=_(e,t,28),n=_(t,e,2),s=_(t,e,7),i=a^n^s;return 0>i&&(i+=4294967296),i}function c(e,t){var a=m(e,t,14),n=m(e,t,18),s=m(t,e,9),i=a^n^s;return 0>i&&(i+=4294967296),i}function l(e,t){var a=_(e,t,14),n=_(e,t,18),s=_(t,e,9),i=a^n^s;return 0>i&&(i+=4294967296),i}function u(e,t){var a=m(e,t,1),n=m(e,t,8),s=v(e,t,7),i=a^n^s;return 0>i&&(i+=4294967296),i}function f(e,t){var a=_(e,t,1),n=_(e,t,8),s=w(e,t,7),i=a^n^s;return 0>i&&(i+=4294967296),i}function y(e,t){var a=m(e,t,19),n=m(t,e,29),s=v(e,t,6),i=a^n^s;return 0>i&&(i+=4294967296),i}function b(e,t){var a=_(e,t,19),n=_(t,e,29),s=w(e,t,6),i=a^n^s;return 0>i&&(i+=4294967296),i}var i=e("../utils"),g=e("../common"),h=e("minimalistic-assert"),m=i.rotr64_hi,_=i.rotr64_lo,v=i.shr64_hi,w=i.shr64_lo,S=i.sum64,A=i.sum64_hi,B=i.sum64_lo,k=i.sum64_4_hi,x=i.sum64_4_lo,E=i.sum64_5_hi,T=i.sum64_5_lo,M=g.BlockHash,I=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];i.inherits(r,M),t.exports=r,r.blockSize=1024,r.outSize=512,r.hmacStrength=192,r.padLength=128,r.prototype._prepareBlock=function(e,t){for(var r=this.W,a=0;32>a;a++)r[a]=e[t+a];for(;a>>3},r.g1_256=function(e){return o(e,17)^o(e,19)^e>>>10}},{"../utils":133}],133:[function(e,t,r){"use strict";function a(e){return(e>>>24|65280&e>>>8|16711680&e<<8|(255&e)<<24)>>>0}function n(e){return 1===e.length?"0"+e:e}function s(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}var o=e("minimalistic-assert"),i=e("inherits");r.inherits=i,r.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if(!("string"==typeof e))for(a=0;a>8,o=255&n;s?r.push(s,o):r.push(o)}else if("hex"===t)for(e=e.replace(/[^a-z0-9]+/ig,""),0!=e.length%2&&(e="0"+e),a=0;a>>0}return s},r.split32=function(e,t){for(var r=Array(4*e.length),a=0,n=0,s;a>>24,r[n+1]=255&s>>>16,r[n+2]=255&s>>>8,r[n+3]=255&s):(r[n+3]=s>>>24,r[n+2]=255&s>>>16,r[n+1]=255&s>>>8,r[n]=255&s);return r},r.rotr32=function(e,t){return e>>>t|e<<32-t},r.rotl32=function(e,t){return e<>>32-t},r.sum32=function(e,t){return e+t>>>0},r.sum32_3=function(e,t,r){return e+t+r>>>0},r.sum32_4=function(e,t,r,a){return e+t+r+a>>>0},r.sum32_5=function(t,r,a,n,s){return t+r+a+n+s>>>0},r.sum64=function(e,t,r,a){var n=e[t],s=e[t+1],i=a+s>>>0,o=(i>>0,e[t+1]=i},r.sum64_hi=function(e,t,r,a){var n=(t+a>>>0>>0},r.sum64_lo=function(e,t,r,a){return t+a>>>0},r.sum64_4_hi=function(e,t,r,a,n,s,i,o){var d=0,p=t;p=p+a>>>0,d+=p>>0,d+=p>>0,d+=p>>0},r.sum64_4_lo=function(e,t,r,a,n,s,i,o){return t+a+s+o>>>0},r.sum64_5_hi=function(e,t,r,a,n,s,i,o,d,p){var c=0,l=t;l=l+a>>>0,c+=l>>0,c+=l>>0,c+=l>>0,c+=l>>0},r.sum64_5_lo=function(e,t,r,a,n,s,i,o,d,p){return t+a+s+o+p>>>0},r.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0},r.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},r.shr64_hi=function(e,t,r){return e>>>r},r.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0}},{inherits:137,"minimalistic-assert":145}],134:[function(e,t){"use strict";function r(e){if(!(this instanceof r))return new r(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=n.toArray(e.entropy,e.entropyEnc||"hex"),a=n.toArray(e.nonce,e.nonceEnc||"hex"),i=n.toArray(e.pers,e.persEnc||"hex");s(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,a,i)}var a=e("hash.js"),n=e("minimalistic-crypto-utils"),s=e("minimalistic-assert");t.exports=r,r.prototype._init=function(e,t,r){var a=e.concat(t).concat(r);this.K=Array(this.outLen/8),this.V=Array(this.outLen/8);for(var n=0;n=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},r.prototype.generate=function(e,t,r,a){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(a=r,r=t,t=null),r&&(r=n.toArray(r,a||"hex"),this._update(r));for(var s=[];s.length>1,f=-7,y=n?p-1:0,b=n?-1:1,d=t[r+y],g,h;for(y+=b,g=d&(1<<-f)-1,d>>=-f,f+=c;0>=-f,f+=o;0>1,b=23===p?5.960464477539063e-8-6.617444900424222e-24:0,g=o?0:l-1,h=o?1:-1,d=0>r||0===r&&0>1/r?1:0,s,_,v;for(r=Math.abs(r),isNaN(r)||r===1/0?(_=isNaN(r)?1:0,s=f):(s=Math.floor(Math.log(r)/Math.LN2),1>r*(v=a(2,-s))&&(s--,v*=2),r+=1<=s+y?b/v:b*a(2,1-y),2<=r*v&&(s++,v/=2),s+y>=f?(_=0,s=f):1<=s+y?(_=(r*v-1)*a(2,p),s+=y):(_=r*a(2,y-1)*a(2,p),s=0));8<=p;t[n+g]=255&_,g+=h,_/=256,p-=8);for(s=s<>>32-t}function s(e,t,r,a,i,o,d){return 0|n(0|e+(t&r|~t&a)+i+o,d)+t}function o(e,t,r,a,i,o,d){return 0|n(0|e+(t&a|r&~a)+i+o,d)+t}function p(e,t,r,a,i,o,d){return 0|n(0|e+(t^r^a)+i+o,d)+t}function l(e,t,r,a,i,o,d){return 0|n(0|e+(r^(t|~a))+i+o,d)+t}var i=e("inherits"),d=e("hash-base"),c=Array(16);i(a,d),a.prototype._update=function(){for(var e=c,t=0;16>t;++t)e[t]=this._block.readInt32LE(4*t);var r=this._a,n=this._b,u=this._c,f=this._d;r=s(r,n,u,f,e[0],3614090360,7),f=s(f,r,n,u,e[1],3905402710,12),u=s(u,f,r,n,e[2],606105819,17),n=s(n,u,f,r,e[3],3250441966,22),r=s(r,n,u,f,e[4],4118548399,7),f=s(f,r,n,u,e[5],1200080426,12),u=s(u,f,r,n,e[6],2821735955,17),n=s(n,u,f,r,e[7],4249261313,22),r=s(r,n,u,f,e[8],1770035416,7),f=s(f,r,n,u,e[9],2336552879,12),u=s(u,f,r,n,e[10],4294925233,17),n=s(n,u,f,r,e[11],2304563134,22),r=s(r,n,u,f,e[12],1804603682,7),f=s(f,r,n,u,e[13],4254626195,12),u=s(u,f,r,n,e[14],2792965006,17),n=s(n,u,f,r,e[15],1236535329,22),r=o(r,n,u,f,e[1],4129170786,5),f=o(f,r,n,u,e[6],3225465664,9),u=o(u,f,r,n,e[11],643717713,14),n=o(n,u,f,r,e[0],3921069994,20),r=o(r,n,u,f,e[5],3593408605,5),f=o(f,r,n,u,e[10],38016083,9),u=o(u,f,r,n,e[15],3634488961,14),n=o(n,u,f,r,e[4],3889429448,20),r=o(r,n,u,f,e[9],568446438,5),f=o(f,r,n,u,e[14],3275163606,9),u=o(u,f,r,n,e[3],4107603335,14),n=o(n,u,f,r,e[8],1163531501,20),r=o(r,n,u,f,e[13],2850285829,5),f=o(f,r,n,u,e[2],4243563512,9),u=o(u,f,r,n,e[7],1735328473,14),n=o(n,u,f,r,e[12],2368359562,20),r=p(r,n,u,f,e[5],4294588738,4),f=p(f,r,n,u,e[8],2272392833,11),u=p(u,f,r,n,e[11],1839030562,16),n=p(n,u,f,r,e[14],4259657740,23),r=p(r,n,u,f,e[1],2763975236,4),f=p(f,r,n,u,e[4],1272893353,11),u=p(u,f,r,n,e[7],4139469664,16),n=p(n,u,f,r,e[10],3200236656,23),r=p(r,n,u,f,e[13],681279174,4),f=p(f,r,n,u,e[0],3936430074,11),u=p(u,f,r,n,e[3],3572445317,16),n=p(n,u,f,r,e[6],76029189,23),r=p(r,n,u,f,e[9],3654602809,4),f=p(f,r,n,u,e[12],3873151461,11),u=p(u,f,r,n,e[15],530742520,16),n=p(n,u,f,r,e[2],3299628645,23),r=l(r,n,u,f,e[0],4096336452,6),f=l(f,r,n,u,e[7],1126891415,10),u=l(u,f,r,n,e[14],2878612391,15),n=l(n,u,f,r,e[5],4237533241,21),r=l(r,n,u,f,e[12],1700485571,6),f=l(f,r,n,u,e[3],2399980690,10),u=l(u,f,r,n,e[10],4293915773,15),n=l(n,u,f,r,e[1],2240044497,21),r=l(r,n,u,f,e[8],1873313359,6),f=l(f,r,n,u,e[15],4264355552,10),u=l(u,f,r,n,e[6],2734768916,15),n=l(n,u,f,r,e[13],1309151649,21),r=l(r,n,u,f,e[4],4149444226,6),f=l(f,r,n,u,e[11],3174756917,10),u=l(u,f,r,n,e[2],718787259,15),n=l(n,u,f,r,e[9],3951481745,21),this._a=0|this._a+r,this._b=0|this._b+n,this._c=0|this._c+u,this._d=0|this._d+f},a.prototype._digest=function(){this._block[this._blockOffset++]=128,56>8,o=255&n;s?r.push(s,o):r.push(o)}return r},s.zero2=a,s.toHex=n,s.encode=function(e,t){return"hex"===t?n(e):e}},{}],147:[function(e,t,r){arguments[4][115][0].apply(r,arguments)},{dup:115}],148:[function(e,t){var r=e("bn.js"),a=e("strip-hex-prefix");t.exports=function(e){if("string"==typeof e||"number"==typeof e){var t=new r(1),n=(e+"").toLowerCase().trim(),s="0x"===n.substr(0,2)||"-0x"===n.substr(0,3),i=a(n);if("-"===i.substr(0,1)&&(i=a(i.slice(1)),t=new r(-1,10)),i=""===i?"0":i,!i.match(/^-?[0-9]+$/)&&i.match(/^[0-9A-Fa-f]+$/)||i.match(/^[a-fA-F]+$/)||!0===s&&i.match(/^[0-9A-Fa-f]+$/))return new r(i,16).mul(t);if((i.match(/^-?[0-9]+$/)||""===i)&&!1===s)return new r(i,10).mul(t)}else if("object"==typeof e&&e.toString&&!e.pop&&!e.push&&e.toString(10).match(/^-?[0-9]+$/)&&(e.mul||e.dividedToIntegerBy))return new r(e.toString(10),10);throw new Error("[number-to-bn] while converting number "+JSON.stringify(e)+" to BN.js instance, error: invalid number value. Value must be an integer, hex string, BN or BigNumber instance. Note, decimals are not supported.")}},{"bn.js":147,"strip-hex-prefix":212}],149:[function(e,t){"use strict";function r(e){if(null===e||e===void 0)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var a=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable;t.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;10>r;r++)t["_"+String.fromCharCode(r)]=r;var a=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if("0123456789"!==a.join(""))return!1;var n={};return["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t"].forEach(function(e){n[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(e){for(var t=r(e),o=1,d,p;o65536&&(r("Max buffer length exceeded: textNode"),e=a(e,Q.length)),L.length>65536&&(r("Max buffer length exceeded: numberNode"),e=a(e,L.length)),j=65536-e+K}function r(e){Q!==void 0&&(l(Q),u(),Q=void 0),Z=i(e+"\nLn: "+Y+"\nCol: "+X+"\nChr: "+J),f(W(void 0,void 0,Z))}function n(){return H==g?(l({}),u(),void(U=!0)):void((H!==h||0!==G)&&r("Unexpected end"),Q!==void 0&&(l(Q),u(),Q=void 0),U=!0)}function s(e){return"\r"==e||"\n"==e||" "==e||"\t"==e}function o(e){if(!Z){if(U)return r("Cannot write after close");var a=0;for(J=e[0];J&&($=J,J=e[a++],!!J);)switch(K++,"\n"==J?(Y++,X=0):X++,H){case g:if("{"===J)H=m;else if("["===J)H=v;else if(!s(J))return r("Non-whitespace before {[.");continue;case A:case m:if(s(J))continue;if(H===A)q.push(B);else if("}"===J){l({}),u(),H=q.pop()||h;continue}else q.push(_);if("\""===J)H=S;else return r("Malformed object key should start with \" ");continue;case B:case _:if(s(J))continue;if(":"===J)H===_?(q.push(_),void 0!==Q&&(l({}),d(Q),Q=void 0),G++):void 0!==Q&&(d(Q),Q=void 0),H=h;else if("}"===J)void 0!==Q&&(l(Q),u(),Q=void 0),u(),G--,H=q.pop()||h;else if(","===J)H===_&&q.push(_),void 0!==Q&&(l(Q),u(),Q=void 0),H=A;else return r("Bad object");continue;case v:case h:if(s(J))continue;if(H===v)if(l([]),G++,H=h,"]"===J){u(),G--,H=q.pop()||h;continue}else q.push(w);if("\""===J)H=S;else if("{"===J)H=m;else if("["===J)H=v;else if("t"===J)H=k;else if("f"===J)H=T;else if("n"===J)H=R;else if("-"===J)L+=J;else if("0"===J)L+=J,H=N;else if(-1!=="123456789".indexOf(J))L+=J,H=N;else return r("Bad value");continue;case w:if(","===J)q.push(w),void 0!==Q&&(l(Q),u(),Q=void 0),H=h;else if("]"===J)void 0!==Q&&(l(Q),u(),Q=void 0),u(),G--,H=q.pop()||h;else if(s(J))continue;else return r("Bad array");continue;case S:void 0===Q&&(Q="");var n=a-1;STRING_BIGLOOP:for(;;){for(;0=j&&t()}}var d=e(_e).emit,l=e(ve).emit,u=e(we).emit,f=e(ue).emit,y=/[\\"\n]/g,b=0,g=b++,h=b++,m=b++,_=b++,v=b++,w=b++,S=b++,A=b++,B=b++,k=b++,x=b++,E=b++,T=b++,M=b++,I=b++,C=b++,R=b++,P=b++,F=b++,O=b++,N=b,j=65536,L="",D=!1,U=!1,H=g,q=[],z=null,V=0,G=0,K=0,X=0,Y=1,Z,J,$,Q;e(ge).on(o),e(he).on(n)}function C(e,t){"use strict";function r(e){return function(t){n=e(n,t)}}var a={},n;for(var s in t)e(s).on(r(t[s]),a);e(ce).on(function(e){var t=Q(n),r=ae(t),a=ee(n),s;a&&(s=ne(Q(a)),s[r]=e)}),e(le).on(function(){var e=Q(n),t=ae(e),r=ee(n),a;r&&(a=ne(Q(r)),delete a[t])}),e(me).on(function(){for(var r in t)e(r).un(a)})}function R(e){var t={};return e&&e.split("\r\n").forEach(function(e){var r=e.indexOf(": ");t[e.substring(0,r)]=e.substring(r+2)}),t}function P(e,t){function r(e){return{"http:":80,"https:":443}[e]}function a(t){return t.port||r(t.protocol||e.protocol)}return!!(t.protocol&&t.protocol!=e.protocol||t.host&&t.host!=e.host||t.host&&a(t)!=a(e))}function F(e){var t=/(\w+:)?(?:\/\/)([\w.-]+)?(?::(\d+))?\/?/,r=t.exec(e)||[];return{protocol:r[1]||"",host:r[2]||"",port:r[3]||""}}function O(){return new XMLHttpRequest}function N(e,t,r,a,s,i,o){"use strict";function d(){var e=t.responseText,r=e.substr(l);r&&p(r),l=Z(e)}var p=e(ge).emit,c=e(ue).emit,l=0,u=!0;e(me).on(function(){t.onreadystatechange=null,t.abort()}),"onprogress"in t&&(t.onprogress=d),t.onreadystatechange=function(){function r(){try{u&&e(be).emit(t.status,R(t.getAllResponseHeaders())),u=!1}catch(t){}}switch(t.readyState){case 2:case 3:return r();case 4:r();var a=2==(t.status+"")[0];a?(d(),e(he).emit()):c(W(t.status,t.responseText));}};try{for(var f in t.open(r,a,!0),i)t.setRequestHeader(f,i[f]);P(n.location,F(a))||t.setRequestHeader("X-Requested-With","XMLHttpRequest"),t.withCredentials=o,t.send(s)}catch(t){n.setTimeout(K(c,W(void 0,void 0,t)),0)}}function j(e,t){return{key:e,node:t}}function L(e){function t(e,t){var r=ne(Q(e));return h(s,r)?a(e,Z(r),t):e}function r(e,t,r){ne(Q(e))[t]=r}function a(e,t,a){e&&r(e,t,a);var s=v(j(t,a),e);return n(s),s}var n=e(de).emit,i=e(pe).emit,o=e(ye).emit,d=e(fe).emit,p={};return p[ve]=function(e,n){if(!e)return o(n),a(e,se,n);var s=t(e,n),i=ee(s),d=ae(Q(s));return r(i,d,n),v(j(d,n),i)},p[we]=function(e){return i(e),ee(e)||d(ne(Q(e)))},p[_e]=a,p}function D(e,t,r){function a(e){return function(t){return t.id==e}}var n,s;return{on:function(r,a){var i={listener:r,id:a||r};return t&&t.emit(e,r,i.id),n=v(i,n),s=v(r,s),this},emit:function(){E(s,arguments)},un:function(t){var i;n=k(n,a(t),function(e){i=e}),i&&(s=k(s,function(e){return e==i.listener}),r&&r.emit(e,i.listener,i.id))},listeners:function(){return s},hasListener:function(e){var t=e?a(e):b;return m(M(t,n))}}}function U(){function e(e){return r[e]=D(e,a,n)}function t(t){return r[t]||e(t)}var r={},a=e("newListener"),n=e("removeListener");return["emit","on","un"].forEach(function(e){t[e]=l(function(r,a){c(a,t(r)[e])})}),t}function W(e,t,r){try{var a=o.parse(t)}catch(t){}return{statusCode:e,body:t,jsonBody:a,thrown:r}}function H(e,t){function r(e,t,r){var a=T(r);e(t,S(ee(A(ae,a))),S(A(ne,a)))}function a(t,a,n){var s=e(t).emit;a.on(function(e){var t=n(e);!1!==t&&r(s,ne(t),e)},t),e("removeListener").on(function(r){r!=t||e(r).listeners()||a.un(t)})}var n={node:e(pe),path:e(de)};e("newListener").on(function(e){var r=/(node|path):(.*)/.exec(e);if(r){var s=n[r[1]];s.hasListener(e)||a(e,s,t(r[2]))}})}function q(e,t){function r(t,r){return e(t).on(n(r),r),w}function a(e,t,r){r=r||t;var a=n(t);return e.on(function(){var t=!1;w.forget=function(){t=!0},c(arguments,a),delete w.forget,t&&e.un(r)},r),w}function n(e){return function(){try{return e.apply(w,arguments)}catch(t){setTimeout(function(){throw t})}}}function s(t,r){return e(t+":"+r)}function i(e){return function(){var t=e.apply(this,arguments);m(t)&&(t==G.drop?b():h(t))}}function o(e,t,r){var n;n="node"==e?i(r):r,a(s(e,t),n,r)}function d(e,t){for(var r in t)o(e,r,t[r])}function p(e,t,r){return J(t)?o(e,t,r):d(e,t),w}var u=/^(node|path):./,f=e(fe),b=e(le).emit,h=e(ce).emit,_=l(function(t,r){if(w[t])c(r,w[t]);else{var n=e(t),s=r[0];u.test(t)?a(n,s):n.on(s)}return w}),v=function(t,r,a){if("done"==t)f.un(r);else if("node"==t||"path"==t)e.un(t+":"+r,a);else{e(t).un(r)}return w},w;return e(ye).on(function(e){w.root=g(e)}),e("start").on(function(e,t){w.header=function(e){return e?t[e]:t}}),w={on:_,addListener:_,removeListener:v,emit:e.emit,node:K(p,"node"),path:K(p,"path"),done:K(a,f),start:K(r,"start"),fail:e("fail").on,abort:e(me).emit,header:y,root:y,source:t}}function z(e,t,r,a,n){var s=U();return t&&N(s,O(),e,t,r,a,n),I(s),C(s,L(s)),H(s,ie),q(s,t)}function V(e,t,r,a,n,s,i){return n=n?o.parse(o.stringify(n)):{},a?!J(a)&&(a=o.stringify(a),n["Content-Type"]=n["Content-Type"]||"application/json"):a=null,e(r||"GET",function(e,t){return!1===t&&(e+=-1==e.indexOf("?")?"?":"&",e+="_="+new Date().getTime()),e}(t,i),a,n,s||!1)}function G(e){var t=te("resume","pause","pipe"),r=K(_,t);return e?r(e)||J(e)?V(z,e):V(z,e.url,e.method,e.body,e.headers,e.withCredentials,e.cached):z()}var K=l(function(e,t){var r=t.length;return l(function(a){for(var n=0;na)throw new TypeError("Bad iterations");if("number"!=typeof n)throw new TypeError("Key length not a number");if(0>n||1073741823s?t=n(t):t.length=t.length){s++;break}var o=t.slice(2,n-1),d=t.slice(n-1,n);if(("0002"!==a.toString("hex")&&!r||"0001"!==a.toString("hex")&&r)&&s++,8>o.length&&s++,s)throw new Error("decryption error");return t.slice(n)}function s(e,t){e=new r(e),t=new r(t);var n=0,s=e.length;e.length!==t.length&&(n++,s=Math.min(e.length,t.length));for(var o=-1;++ol||0<=new p(t).cmp(d.modulus))throw new Error("decryption error");var f=s?u(new p(t),d):c(t,d);var y=new r(l-f.length);if(y.fill(0),f=r.concat([y,f],l),4===o)return a(d,f);if(1===o)return n(d,f,s);if(3===o)return f;throw new Error("unknown padding")}}).call(this,e("buffer").Buffer)},{"./mgf":165,"./withPublic":168,"./xor":169,"bn.js":41,"browserify-rsa":64,buffer:73,"create-hash":79,"parse-asn1":156}],167:[function(e,t){(function(r){function a(e,t){var a=e.modulus.byteLength(),n=t.length,s=d("sha1").update(new r("")).digest(),i=s.length,u=2*i;if(n>a-u-2)throw new Error("message too long");var f=new r(a-n-u-2);f.fill(0);var y=a-i-1,b=o(i),g=c(r.concat([s,f,new r([1]),t],y),p(b,y)),h=c(b,p(g,i));return new l(r.concat([new r([0]),h,g],a))}function n(e,t,a){var n=t.length,i=e.modulus.byteLength();if(n>i-11)throw new Error("message too long");var o;return a?(o=new r(i-n-3),o.fill(255)):o=s(i-n-3),new l(r.concat([new r([0,a?1:2]),o,new r([0]),t],i))}function s(e){for(var t=new r(e),a=0,n=o(2*e),s=0,d;a=n&&r>>10),e=56320|1023&e),t+=w(e),t}).join("")}function p(e){return 10>e-48?e-22:26>e-65?e-65:26>e-97?e-97:36}function c(e,t){return e+22+75*(26>e)-((0!=t)<<5)}function l(e,t,r){var a=0;for(e=r?S(e/700):e>>1,e+=S(e/t);455y&&(y=0),b=0;b=a&&s("invalid-input"),v=p(e.charCodeAt(g++)),(36<=v||v>S((2147483647-o)/m))&&s("overflow"),o+=v*m,A=_<=u?1:_>=u+26?26:_-u,vS(2147483647/B)&&s("overflow"),m*=B}f=r.length+1,u=l(o-h,f,0==h),S(o/f)>2147483647-c&&s("overflow"),c+=S(o/f),o%=f,r.splice(o++,0,c)}return d(r)}function f(e){var r=[],a,i,d,p,u,f,y,b,g,h,_,v,A,B,x;for(e=o(e),v=e.length,a=128,i=0,u=72,f=0;f_&&r.push(w(_));for(d=p=r.length,p&&r.push("-");d=a&&_S((2147483647-i)/A)&&s("overflow"),i+=(y-a)*A,a=y,f=0;f=u+26?26:g-u,b= 0x80 (not a basic code point)","invalid-input":"Invalid input"},S=Math.floor,w=String.fromCharCode,A,B;if(A={version:"1.4.1",ucs2:{decode:o,encode:d},decode:u,encode:f,toASCII:function(e){return i(e,function(e){return m.test(e)?"xn--"+f(e):e})},toUnicode:function(e){return i(e,function(e){return h.test(e)?u(e.slice(4).toLowerCase()):e})}},"function"==typeof define&&"object"==typeof define.amd&&define.amd)define("punycode",function(){return A});else if(!(y&&b))a.punycode=A;else if(t.exports==y)b.exports=A;else for(B in A)A.hasOwnProperty(B)&&(y[B]=A[B])})(this)}).call(this,"undefined"==typeof global?"undefined"==typeof self?"undefined"==typeof window?{}:window:self:global)},{}],171:[function(e,t,r){"use strict";function a(e){switch(e.arrayFormat){case"index":return function(t,r,a){return null===r?[s(t,e),"[",a,"]"].join(""):[s(t,e),"[",s(a,e),"]=",s(r,e)].join("")};case"bracket":return function(t,r){return null===r?s(t,e):[s(t,e),"[]=",s(r,e)].join("")};default:return function(t,r){return null===r?s(t,e):[s(t,e),"=",s(r,e)].join("")};}}function n(e){var t;switch(e.arrayFormat){case"index":return function(e,r,a){return t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?void(void 0===a[e]&&(a[e]={}),a[e][t[1]]=r):void(a[e]=r)};case"bracket":return function(e,r,a){return(t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),!t)?void(a[e]=r):void 0===a[e]?void(a[e]=[r]):void(a[e]=[].concat(a[e],r))};default:return function(e,t,r){return void 0===r[e]?void(r[e]=t):void(r[e]=[].concat(r[e],t))};}}function s(e,t){return t.encode?t.strict?p(e):encodeURIComponent(e):e}function i(e){if(Array.isArray(e))return e.sort();return"object"==typeof e?i(Object.keys(e)).sort(function(e,t){return+e-+t}).map(function(t){return e[t]}):e}function o(e){var t=e.indexOf("?");return-1===t?"":e.slice(t+1)}function d(e,t){t=c({arrayFormat:"none"},t);var r=n(t),a=Object.create(null);return"string"==typeof e?(e=e.trim().replace(/^[?#&]/,""),!e)?a:(e.split("&").forEach(function(e){var t=e.replace(/\+/g," ").split("="),n=t.shift(),s=0p&&(c=p);for(var l=0;le)throw new TypeError("offset must be a uint32");if(e>l||e>t)throw new RangeError("offset out of range")}function i(e,t,r){if("number"!=typeof e||e!==e)throw new TypeError("size must be a number");if(4294967295e)throw new TypeError("size must be a uint32");if(e+t>r||e>l)throw new RangeError("buffer too small")}function o(e,r,a,n){if(t.browser){var s=e.buffer,i=new Uint8Array(s,r,a);return u.getRandomValues(i),n?void t.nextTick(function(){n(null,e)}):e}if(n)return void p(a,function(t,a){return t?n(t):void(a.copy(e,r),n(null,e))});var o=p(a);return o.copy(e,r),e}var d=e("safe-buffer"),p=e("randombytes"),c=d.Buffer,l=d.kMaxLength,u=a.crypto||a.msCrypto;u&&u.getRandomValues||!t.browser?(r.randomFill=function(e,t,r,n){if(!c.isBuffer(e)&&!(e instanceof a.Uint8Array))throw new TypeError("\"buf\" argument must be a Buffer or Uint8Array");if("function"==typeof t)n=t,t=0,r=e.length;else if("function"==typeof r)n=r,r=e.length-t;else if("function"!=typeof n)throw new TypeError("\"cb\" argument must be a function");return s(t,e.length),i(r,t,e.length),o(e,t,r,n)},r.randomFillSync=function(e,t,r){if("undefined"==typeof t&&(t=0),!c.isBuffer(e)&&!(e instanceof a.Uint8Array))throw new TypeError("\"buf\" argument must be a Buffer or Uint8Array");return s(t,e.length),void 0===r&&(r=e.length-t),i(r,t,e.length),o(e,t,r)}):(r.randomFill=n,r.randomFillSync=n)}).call(this,e("_process"),"undefined"==typeof global?"undefined"==typeof self?"undefined"==typeof window?{}:window:self:global)},{_process:71,randombytes:175,"safe-buffer":194}],177:[function(e,t){t.exports=window.crypto},{}],178:[function(e,t){t.exports=e("crypto")},{crypto:177}],179:[function(e,t){t.exports=function(t,r){var a=e("./crypto.js"),n="function"==typeof r;if(65536>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function y(e,t){return 0>=e||0===t.length&&t.ended?0:t.objectMode?1:e===e?(e>t.highWaterMark&&(t.highWaterMark=f(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0)):t.flowing&&t.length?t.buffer.head.data.length:t.length}function b(e,t){if(!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,g(e)}}function g(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(H("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?R.nextTick(h,e):h(e))}function h(e){H("emit readable"),e.emit("readable"),B(e)}function m(e,t){t.readingMore||(t.readingMore=!0,R.nextTick(_,e,t))}function _(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=x(e,t.buffer,t.decoder),r}function x(e,t,r){var a;return ei.length?i.length:e;if(s+=o===i.length?i:i.slice(0,e),e-=o,0===e){o===i.length?(++a,t.head=r.next?r.next:t.tail=null):(t.head=r,r.data=i.slice(o));break}++a}return t.length-=a,s}function T(e,t){var r=L.allocUnsafe(e),a=t.head,s=1;for(a.data.copy(r),e-=a.data.length;a=a.next;){var i=a.data,o=e>i.length?i.length:e;if(i.copy(r,r.length-e,0,o),e-=o,0===e){o===i.length?(++s,t.head=a.next?a.next:t.tail=null):(t.head=a,a.data=i.slice(o));break}++s}return t.length-=s,r}function M(e){var t=e._readableState;if(0=t.highWaterMark||t.ended))return H("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?M(this):g(this),null;if(e=y(e,t),0===e&&t.ended)return 0===t.length&&M(this),null;var a=t.needReadable;H("need readable",a),(0===t.length||t.length-e>>0),r=this.head,n=0;r;)a(r.data,t,n),n+=r.data.length,r=r.next;return t},e}(),n&&n.inspect&&n.inspect.custom&&(t.exports.prototype[n.inspect.custom]=function(){var e=n.inspect({length:this.length});return this.constructor.name+" "+e})},{"safe-buffer":194,util:43}],187:[function(e,t){"use strict";function r(e,t){e.emit("error",t)}var a=e("process-nextick-args");t.exports={destroy:function(e,t){var n=this,s=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return s||i?(t?t(e):e&&(!this._writableState||!this._writableState.errorEmitted)&&a.nextTick(r,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?(a.nextTick(r,n,e),n._writableState&&(n._writableState.errorEmitted=!0)):t&&t(e)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},{"process-nextick-args":163}],188:[function(e,t){t.exports=e("events").EventEmitter},{events:117}],189:[function(e,t){t.exports=e("./readable").PassThrough},{"./readable":190}],190:[function(e,t,r){r=t.exports=e("./lib/_stream_readable.js"),r.Stream=r,r.Readable=r,r.Writable=e("./lib/_stream_writable.js"),r.Duplex=e("./lib/_stream_duplex.js"),r.Transform=e("./lib/_stream_transform.js"),r.PassThrough=e("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":181,"./lib/_stream_passthrough.js":182,"./lib/_stream_readable.js":183,"./lib/_stream_transform.js":184,"./lib/_stream_writable.js":185}],191:[function(e,t){t.exports=e("./readable").Transform},{"./readable":190}],192:[function(e,t){t.exports=e("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":185}],193:[function(e,t){"use strict";function r(){l.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function n(e,t){return e<>>32-t}function a(t,r,a,i,o,e,d,p){return 0|n(0|t+(r^a^i)+e+d,p)+o}function s(t,r,a,i,o,e,d,p){return 0|n(0|t+(r&a|~r&i)+e+d,p)+o}function o(t,r,a,i,o,e,d,p){return 0|n(0|t+((r|~a)^i)+e+d,p)+o}function d(t,r,a,i,o,e,d,p){return 0|n(0|t+(r&i|a&~i)+e+d,p)+o}function p(t,r,a,i,o,e,d,p){return 0|n(0|t+(r^(a|~i))+e+d,p)+o}var i=e("buffer").Buffer,c=e("inherits"),l=e("hash-base"),u=Array(16),f=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],y=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],b=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],g=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],h=[0,1518500249,1859775393,2400959708,2840853838],m=[1352829926,1548603684,1836072691,2053994217,0];c(r,l),r.prototype._update=function(){for(var e=u,r=0;16>r;++r)e[r]=this._block.readInt32LE(4*r);for(var c=0|this._a,l=0|this._b,_=0|this._c,v=0|this._d,w=0|this._e,S=0|this._a,A=0|this._b,B=0|this._c,k=0|this._d,x=0|this._e,E=0;80>E;E+=1){var T,M;16>E?(T=a(c,l,_,v,w,e[f[E]],h[0],b[E]),M=p(S,A,B,k,x,e[y[E]],m[0],g[E])):32>E?(T=s(c,l,_,v,w,e[f[E]],h[1],b[E]),M=d(S,A,B,k,x,e[y[E]],m[1],g[E])):48>E?(T=o(c,l,_,v,w,e[f[E]],h[2],b[E]),M=o(S,A,B,k,x,e[y[E]],m[2],g[E])):64>E?(T=d(c,l,_,v,w,e[f[E]],h[3],b[E]),M=s(S,A,B,k,x,e[y[E]],m[3],g[E])):(T=p(c,l,_,v,w,e[f[E]],h[4],b[E]),M=a(S,A,B,k,x,e[y[E]],m[4],g[E])),c=w,w=v,v=n(_,10),_=l,l=T,S=x,x=k,k=n(B,10),B=A,A=M}var I=0|this._b+_+k;this._b=0|this._c+v+x,this._c=0|this._d+w+S,this._d=0|this._e+c+A,this._e=0|this._a+l+B,this._a=I},r.prototype._digest=function(){this._block[this._blockOffset++]=128,56>>32-t}function y(e){var t;for(t=0;16>t;t++)m[t]=(255&e[4*t+0])<<0,m[t]|=(255&e[4*t+1])<<8,m[t]|=(255&e[4*t+2])<<16,m[t]|=(255&e[4*t+3])<<24;for(n(m,0,_,0,16),t=8;0t;++t)m[t]=_[t]+m[t];for(t=0;16>t;t++){var r=4*t;e[r+0]=255&m[t]>>0,e[r+1]=255&m[t]>>8,e[r+2]=255&m[t]>>16,e[r+3]=255&m[t]>>24}}function b(e,t,r,a,n){for(var s=0;s 0 and a power of 2");if(o>2147483647/128/d)throw Error("Parameter N is too large");if(d>2147483647/128/r)throw Error("Parameter r is too large");var g=new a(256*d),h=new a(128*d*o),m=new Int32Array(16),_=new Int32Array(16),v=new a(64),w=s(e,t,1,128*r*d,"sha256"),S;if(c){var A=2*(r*o),B=0;S=function(){++B,0==B%1e3&&c({current:B,total:A,percent:100*(B/A)})}}for(var k=0;k=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(4294967295>=r)this._block.writeUInt32BE(r,this._blockSize-4);else{var a=(4294967295&r)>>>0;this._block.writeUInt32BE((r-a)/4294967296,this._blockSize-8),this._block.writeUInt32BE(a,this._blockSize-4)}this._update(this._block);var n=this._hash();return e?n.toString(e):n},r.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t.exports=r},{"safe-buffer":194}],198:[function(e,t,r){var r=t.exports=function(e){e=e.toLowerCase();var t=r[e];if(!t)throw new Error(e+" is not supported (we accept pull requests)");return new t};r.sha=e("./sha"),r.sha1=e("./sha1"),r.sha224=e("./sha224"),r.sha256=e("./sha256"),r.sha384=e("./sha384"),r.sha512=e("./sha512")},{"./sha":199,"./sha1":200,"./sha224":201,"./sha256":202,"./sha384":203,"./sha512":204}],199:[function(e,t){function r(){this.init(),this._w=c,s.call(this,64,56)}function n(e){return e<<5|e>>>27}function i(e){return e<<30|e>>>2}function o(e,t,r,a){return 0===e?t&r|~t&a:2===e?t&r|t&a|r&a:t^r^a}var a=e("inherits"),s=e("./hash"),d=e("safe-buffer").Buffer,p=[1518500249,1859775393,-1894007588,-899497514],c=Array(80);a(r,s),r.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},r.prototype._update=function(r){for(var l=this._w,u=0|this._a,f=0|this._b,y=0|this._c,g=0|this._d,h=0|this._e,m=0;16>m;++m)l[m]=r.readInt32BE(4*m);for(;80>m;++m)l[m]=l[m-3]^l[m-8]^l[m-14]^l[m-16];for(var _=0;80>_;++_){var v=~~(_/20),s=0|n(u)+o(v,f,y,g)+h+l[_]+p[v];h=g,g=y,y=i(f),f=u,u=s}this._a=0|u+this._a,this._b=0|f+this._b,this._c=0|y+this._c,this._d=0|g+this._d,this._e=0|h+this._e},r.prototype._hash=function(){var e=d.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},t.exports=r},{"./hash":197,inherits:137,"safe-buffer":194}],200:[function(e,t){function r(){this.init(),this._w=c,d.call(this,64,56)}function a(e){return e<<1|e>>>31}function n(e){return e<<5|e>>>27}function i(e){return e<<30|e>>>2}function o(e,t,r,a){return 0===e?t&r|~t&a:2===e?t&r|t&a|r&a:t^r^a}var s=e("inherits"),d=e("./hash"),p=e("safe-buffer").Buffer,l=[1518500249,1859775393,-1894007588,-899497514],c=Array(80);s(r,d),r.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},r.prototype._update=function(r){for(var p=this._w,u=0|this._a,f=0|this._b,y=0|this._c,g=0|this._d,h=0|this._e,m=0;16>m;++m)p[m]=r.readInt32BE(4*m);for(;80>m;++m)p[m]=a(p[m-3]^p[m-8]^p[m-14]^p[m-16]);for(var _=0;80>_;++_){var v=~~(_/20),s=0|n(u)+o(v,f,y,g)+h+p[_]+l[v];h=g,g=y,y=i(f),f=u,u=s}this._a=0|u+this._a,this._b=0|f+this._b,this._c=0|y+this._c,this._d=0|g+this._d,this._e=0|h+this._e},r.prototype._hash=function(){var e=p.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},t.exports=r},{"./hash":197,inherits:137,"safe-buffer":194}],201:[function(e,t){function r(){this.init(),this._w=o,s.call(this,64,56)}var a=e("inherits"),n=e("./sha256"),s=e("./hash"),i=e("safe-buffer").Buffer,o=Array(64);a(r,n),r.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},r.prototype._hash=function(){var e=i.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},t.exports=r},{"./hash":197,"./sha256":202,inherits:137,"safe-buffer":194}],202:[function(e,t){function r(){this.init(),this._w=f,c.call(this,64,56)}function n(e,t,r){return r^e&(t^r)}function s(e,t,r){return e&t|r&(e|t)}function i(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function o(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function a(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}function d(e){return(e>>>17|e<<15)^(e>>>19|e<<13)^e>>>10}var p=e("inherits"),c=e("./hash"),l=e("safe-buffer").Buffer,u=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],f=Array(64);p(r,c),r.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},r.prototype._update=function(t){for(var r=this._w,p=0|this._a,l=0|this._b,y=0|this._c,m=0|this._d,_=0|this._e,v=0|this._f,w=0|this._g,S=0|this._h,A=0;16>A;++A)r[A]=t.readInt32BE(4*A);for(;64>A;++A)r[A]=0|d(r[A-2])+r[A-7]+a(r[A-15])+r[A-16];for(var B=0;64>B;++B){var k=0|S+o(_)+n(_,v,w)+u[B]+r[B],x=0|i(p)+s(p,l,y);S=w,w=v,v=_,_=0|m+k,m=y,y=l,l=p,p=0|k+x}this._a=0|p+this._a,this._b=0|l+this._b,this._c=0|y+this._c,this._d=0|m+this._d,this._e=0|_+this._e,this._f=0|v+this._f,this._g=0|w+this._g,this._h=0|S+this._h},r.prototype._hash=function(){var e=l.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},t.exports=r},{"./hash":197,inherits:137,"safe-buffer":194}],203:[function(e,t){function r(){this.init(),this._w=o,s.call(this,128,112)}var a=e("inherits"),n=e("./sha512"),s=e("./hash"),i=e("safe-buffer").Buffer,o=Array(160);a(r,n),r.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},r.prototype._hash=function(){function e(e,r,a){t.writeInt32BE(e,a),t.writeInt32BE(r,a+4)}var t=i.allocUnsafe(48);return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),t},t.exports=r},{"./hash":197,"./sha512":204,inherits:137,"safe-buffer":194}],204:[function(e,t){function r(){this.init(),this._w=g,f.call(this,128,112)}function a(e,t,r){return r^e&(t^r)}function n(e,t,r){return e&t|r&(e|t)}function s(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function i(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function o(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function d(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function p(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function c(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function l(e,t){return e>>>0>>0?1:0}var u=e("inherits"),f=e("./hash"),y=e("safe-buffer").Buffer,b=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],g=Array(160);u(r,f),r.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},r.prototype._update=function(e){for(var t=this._w,r=0|this._ah,u=0|this._bh,f=0|this._ch,y=0|this._dh,g=0|this._eh,h=0|this._fh,m=0|this._gh,_=0|this._hh,v=0|this._al,w=0|this._bl,S=0|this._cl,A=0|this._dl,B=0|this._el,k=0|this._fl,x=0|this._gl,E=0|this._hl,T=0;32>T;T+=2)t[T]=e.readInt32BE(4*T),t[T+1]=e.readInt32BE(4*T+4);for(;160>T;T+=2){var M=t[T-30],I=t[T-30+1],C=o(M,I),R=d(I,M);M=t[T-4],I=t[T-4+1];var P=p(M,I),F=c(I,M),O=t[T-14],N=t[T-14+1],L=t[T-32],D=t[T-32+1],U=0|R+N,W=0|C+O+l(U,R);U=0|U+F,W=0|W+P+l(U,F),U=0|U+D,W=0|W+L+l(U,D),t[T]=W,t[T+1]=U}for(var H=0;160>H;H+=2){W=t[H],U=t[H+1];var q=n(r,u,f),z=n(v,w,S),V=s(r,v),G=s(v,r),K=i(g,B),X=i(B,g),Y=b[H],Z=b[H+1],J=a(g,h,m),$=a(B,k,x),Q=0|E+X,ee=0|_+K+l(Q,E);Q=0|Q+$,ee=0|ee+J+l(Q,$),Q=0|Q+Z,ee=0|ee+Y+l(Q,Z),Q=0|Q+U,ee=0|ee+W+l(Q,U);var te=0|G+z,re=0|V+q+l(te,G);_=m,E=x,m=h,x=k,h=g,k=B,B=0|A+Q,g=0|y+ee+l(B,A),y=f,A=S,f=u,S=w,u=r,w=v,v=0|Q+te,r=0|ee+re+l(v,Q)}this._al=0|this._al+v,this._bl=0|this._bl+w,this._cl=0|this._cl+S,this._dl=0|this._dl+A,this._el=0|this._el+B,this._fl=0|this._fl+k,this._gl=0|this._gl+x,this._hl=0|this._hl+E,this._ah=0|this._ah+r+l(this._al,v),this._bh=0|this._bh+u+l(this._bl,w),this._ch=0|this._ch+f+l(this._cl,S),this._dh=0|this._dh+y+l(this._dl,A),this._eh=0|this._eh+g+l(this._el,B),this._fh=0|this._fh+h+l(this._fl,k),this._gh=0|this._gh+m+l(this._gl,x),this._hh=0|this._hh+_+l(this._hl,E)},r.prototype._hash=function(){function e(e,r,a){t.writeInt32BE(e,a),t.writeInt32BE(r,a+4)}var t=y.allocUnsafe(64);return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),t},t.exports=r},{"./hash":197,inherits:137,"safe-buffer":194}],205:[function(e,t){function r(){a.call(this)}t.exports=r;var a=e("events").EventEmitter,n=e("inherits");n(r,a),r.Readable=e("readable-stream/readable.js"),r.Writable=e("readable-stream/writable.js"),r.Duplex=e("readable-stream/duplex.js"),r.Transform=e("readable-stream/transform.js"),r.PassThrough=e("readable-stream/passthrough.js"),r.Stream=r,r.prototype.pipe=function(e,t){function r(t){e.writable&&!1===e.write(t)&&p.pause&&p.pause()}function n(){p.readable&&p.resume&&p.resume()}function s(){c||(c=!0,e.end())}function i(){c||(c=!0,"function"==typeof e.destroy&&e.destroy())}function o(e){if(d(),0===a.listenerCount(this,"error"))throw e}function d(){p.removeListener("data",r),e.removeListener("drain",n),p.removeListener("end",s),p.removeListener("close",i),p.removeListener("error",o),e.removeListener("error",o),p.removeListener("end",d),p.removeListener("close",d),e.removeListener("close",d)}var p=this;p.on("data",r),e.on("drain",n),e._isStdio||t&&!1===t.end||(p.on("end",s),p.on("close",i));var c=!1;return p.on("error",o),e.on("error",o),p.on("end",d),p.on("close",d),e.on("close",d),e.emit("pipe",p),e}},{events:117,inherits:137,"readable-stream/duplex.js":180,"readable-stream/passthrough.js":189,"readable-stream/readable.js":190,"readable-stream/transform.js":191,"readable-stream/writable.js":192}],206:[function(e,t,r){(function(t){var a=e("./lib/request"),n=e("./lib/response"),s=e("xtend"),i=e("builtin-status-codes"),o=e("url"),d=r;d.request=function(e,r){e="string"==typeof e?o.parse(e):s(e);var n=-1===t.location.protocol.search(/^https?:$/)?"http:":"",i=e.protocol||n,d=e.hostname||e.host,p=e.port,c=e.path||"/";d&&-1!==d.indexOf(":")&&(d="["+d+"]"),e.url=(d?i+"//"+d:"")+(p?":"+p:"")+c,e.method=(e.method||"GET").toUpperCase(),e.headers=e.headers||{};var l=new a(e);return r&&l.on("response",r),l},d.get=function(e,t){var r=d.request(e,t);return r.end(),r},d.ClientRequest=a,d.IncomingMessage=n.IncomingMessage,d.Agent=function(){},d.Agent.defaultMaxSockets=4,d.globalAgent=new d.Agent,d.STATUS_CODES=i,d.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this,"undefined"==typeof global?"undefined"==typeof self?"undefined"==typeof window?{}:window:self:global)},{"./lib/request":208,"./lib/response":209,"builtin-status-codes":74,url:223,xtend:295}],207:[function(e,t,r){(function(e){function t(){if(o!==void 0)return o;if(e.XMLHttpRequest){o=new e.XMLHttpRequest;try{o.open("GET",e.XDomainRequest?"/":"https://example.com")}catch(t){o=null}}else o=null;return o}function a(e){var r=t();if(!r)return!1;try{return r.responseType=e,r.responseType===e}catch(t){}return!1}function n(e){return"function"==typeof e}r.fetch=n(e.fetch)&&n(e.ReadableStream),r.writableStream=n(e.WritableStream),r.abortController=n(e.AbortController),r.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),r.blobConstructor=!0}catch(t){}var s="undefined"!=typeof e.ArrayBuffer,i=s&&n(e.ArrayBuffer.prototype.slice),o;r.arraybuffer=r.fetch||s&&a("arraybuffer"),r.msstream=!r.fetch&&i&&a("ms-stream"),r.mozchunkedarraybuffer=!r.fetch&&s&&a("moz-chunked-arraybuffer"),r.overrideMimeType=r.fetch||!!t()&&n(t().overrideMimeType),r.vbArray=n(e.VBArray),o=null}).call(this,"undefined"==typeof global?"undefined"==typeof self?"undefined"==typeof window?{}:window:self:global)},{}],208:[function(e,t){(function(r,a,n){function s(e,t){return o.fetch&&t?"fetch":o.mozchunkedarraybuffer?"moz-chunked-arraybuffer":o.msstream?"ms-stream":o.arraybuffer&&e?"arraybuffer":o.vbArray&&e?"text:vbarray":"text"}function i(e){try{var t=e.status;return null!==t&&0!==t}catch(t){return!1}}var o=e("./capability"),d=e("inherits"),p=e("./response"),c=e("readable-stream"),l=e("to-arraybuffer"),u=p.IncomingMessage,f=p.readyStates,y=t.exports=function(e){var t=this;c.Writable.call(t),t._opts=e,t._body=[],t._headers={},e.auth&&t.setHeader("Authorization","Basic "+new n(e.auth).toString("base64")),Object.keys(e.headers).forEach(function(r){t.setHeader(r,e.headers[r])});var r=!0,a;if("disable-fetch"===e.mode||"requestTimeout"in e&&!o.abortController)r=!1,a=!0;else if("prefer-streaming"===e.mode)a=!1;else if("allow-wrong-content-type"===e.mode)a=!o.overrideMimeType;else if(!e.mode||"default"===e.mode||"prefer-fast"===e.mode)a=!0;else throw new Error("Invalid value for opts.mode");t._mode=s(a,r),t._fetchTimer=null,t.on("finish",function(){t._onFinish()})};d(y,c.Writable),y.prototype.setHeader=function(e,t){var r=this,a=e.toLowerCase();-1!==b.indexOf(a)||(r._headers[a]={name:e,value:t})},y.prototype.getHeader=function(e){var t=this._headers[e.toLowerCase()];return t?t.value:null},y.prototype.removeHeader=function(e){var t=this;delete t._headers[e.toLowerCase()]},y.prototype._onFinish=function(){var e=this;if(!e._destroyed){var t=e._opts,s=e._headers,i=null;"GET"!==t.method&&"HEAD"!==t.method&&(o.arraybuffer?i=l(n.concat(e._body)):o.blobConstructor?i=new a.Blob(e._body.map(function(e){return l(e)}),{type:(s["content-type"]||{}).value||""}):i=n.concat(e._body).toString());var d=[];if(Object.keys(s).forEach(function(e){var t=s[e].name,r=s[e].value;Array.isArray(r)?r.forEach(function(e){d.push([t,e])}):d.push([t,r])}),"fetch"===e._mode){var p=null;if(o.abortController){var c=new AbortController;p=c.signal,e._fetchAbortController=c,"requestTimeout"in t&&0!==t.requestTimeout&&(e._fetchTimer=a.setTimeout(function(){e.emit("requestTimeout"),e._fetchAbortController&&e._fetchAbortController.abort()},t.requestTimeout))}a.fetch(e._opts.url,{method:e._opts.method,headers:d,body:i||void 0,mode:"cors",credentials:t.withCredentials?"include":"same-origin",signal:p}).then(function(t){e._fetchResponse=t,e._connect()},function(t){a.clearTimeout(e._fetchTimer),e._destroyed||e.emit("error",t)})}else{var u=e._xhr=new a.XMLHttpRequest;try{u.open(e._opts.method,e._opts.url,!0)}catch(t){return void r.nextTick(function(){e.emit("error",t)})}"responseType"in u&&(u.responseType=e._mode.split(":")[0]),"withCredentials"in u&&(u.withCredentials=!!t.withCredentials),"text"===e._mode&&"overrideMimeType"in u&&u.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in t&&(u.timeout=t.requestTimeout,u.ontimeout=function(){e.emit("requestTimeout")}),d.forEach(function(e){u.setRequestHeader(e[0],e[1])}),e._response=null,u.onreadystatechange=function(){switch(u.readyState){case f.LOADING:case f.DONE:e._onXHRProgress();}},"moz-chunked-arraybuffer"===e._mode&&(u.onprogress=function(){e._onXHRProgress()}),u.onerror=function(){e._destroyed||e.emit("error",new Error("XHR error"))};try{u.send(i)}catch(t){return void r.nextTick(function(){e.emit("error",t)})}}}},y.prototype._onXHRProgress=function(){var e=this;!i(e._xhr)||e._destroyed||(!e._response&&e._connect(),e._response._onXHRProgress())},y.prototype._connect=function(){var e=this;e._destroyed||(e._response=new u(e._xhr,e._fetchResponse,e._mode,e._fetchTimer),e._response.on("error",function(t){e.emit("error",t)}),e.emit("response",e._response))},y.prototype._write=function(e,t,r){var a=this;a._body.push(e),r()},y.prototype.abort=y.prototype.destroy=function(){var e=this;e._destroyed=!0,a.clearTimeout(e._fetchTimer),e._response&&(e._response._destroyed=!0),e._xhr?e._xhr.abort():e._fetchAbortController&&e._fetchAbortController.abort()},y.prototype.end=function(e,t,r){var a=this;"function"==typeof e&&(r=e,e=void 0),c.Writable.prototype.end.call(a,e,t,r)},y.prototype.flushHeaders=function(){},y.prototype.setTimeout=function(){},y.prototype.setNoDelay=function(){},y.prototype.setSocketKeepAlive=function(){};var b=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"]}).call(this,e("_process"),"undefined"==typeof global?"undefined"==typeof self?"undefined"==typeof window?{}:window:self:global,e("buffer").Buffer)},{"./capability":207,"./response":209,_process:71,buffer:73,inherits:137,"readable-stream":190,"to-arraybuffer":219}],209:[function(e,t,r){(function(t,a,n){var s=e("./capability"),i=e("inherits"),o=e("readable-stream"),d=r.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},p=r.IncomingMessage=function(e,r,i,d){var p=this;if(o.Readable.call(p),p._mode=i,p.headers={},p.rawHeaders=[],p.trailers={},p.rawTrailers=[],p.on("end",function(){t.nextTick(function(){p.emit("close")})}),"fetch"===i){function e(){l.read().then(function(t){return p._destroyed?void 0:t.done?(a.clearTimeout(d),void p.push(null)):void(p.push(new n(t.value)),e())}).catch(function(e){a.clearTimeout(d),p._destroyed||p.emit("error",e)})}if(p._fetchResponse=r,p.url=r.url,p.statusCode=r.status,p.statusMessage=r.statusText,r.headers.forEach(function(e,t){p.headers[t.toLowerCase()]=e,p.rawHeaders.push(t,e)}),s.writableStream){var c=new WritableStream({write:function(e){return new Promise(function(t,r){p._destroyed?r():p.push(new n(e))?t():p._resumeFetch=t})},close:function(){a.clearTimeout(d),p._destroyed||p.push(null)},abort:function(e){p._destroyed||p.emit("error",e)}});try{return void r.body.pipeTo(c).catch(function(e){a.clearTimeout(d),p._destroyed||p.emit("error",e)})}catch(t){}}var l=r.body.getReader();e()}else{p._xhr=e,p._pos=0,p.url=e.responseURL,p.statusCode=e.status,p.statusMessage=e.statusText;var u=e.getAllResponseHeaders().split(/\r?\n/);if(u.forEach(function(e){var t=e.match(/^([^:]+):\s*(.*)/);if(t){var r=t[1].toLowerCase();"set-cookie"===r?(void 0===p.headers[r]&&(p.headers[r]=[]),p.headers[r].push(t[2])):void 0===p.headers[r]?p.headers[r]=t[2]:p.headers[r]+=", "+t[2],p.rawHeaders.push(t[1],t[2])}}),p._charset="x-user-defined",!s.overrideMimeType){var f=p.rawHeaders["mime-type"];if(f){var y=f.match(/;\s*charset=([^;])(;|$)/);y&&(p._charset=y[1].toLowerCase())}p._charset||(p._charset="utf-8")}}};i(p,o.Readable),p.prototype._read=function(){var e=this,t=e._resumeFetch;t&&(e._resumeFetch=null,t())},p.prototype._onXHRProgress=function(){var t=this,e=t._xhr,r=null;switch(t._mode){case"text:vbarray":if(e.readyState!==d.DONE)break;try{r=new a.VBArray(e.responseBody).toArray()}catch(t){}if(null!==r){t.push(new n(r));break}case"text":try{r=e.responseText}catch(r){t._mode="text:vbarray";break}if(r.length>t._pos){var s=r.substr(t._pos);if("x-user-defined"===t._charset){for(var o=new n(s.length),p=0;pt._pos&&(t.push(new n(new Uint8Array(c.result.slice(t._pos)))),t._pos=c.result.byteLength)},c.onload=function(){t.push(null)},c.readAsArrayBuffer(r);}t._xhr.readyState===d.DONE&&"ms-stream"!==t._mode&&t.push(null)}}).call(this,e("_process"),"undefined"==typeof global?"undefined"==typeof self?"undefined"==typeof window?{}:window:self:global,e("buffer").Buffer)},{"./capability":207,_process:71,buffer:73,inherits:137,"readable-stream":190}],210:[function(e,t){"use strict";t.exports=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}},{}],211:[function(e,t,r){"use strict";function a(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0;}}function n(e){var t=a(e);if("string"!=typeof t&&(g.isEncoding===h||!h(e)))throw new Error("Unknown encoding: "+e);return t||e}function s(e){this.encoding=n(e);var t;switch(this.encoding){case"utf16le":this.text=c,this.end=l,t=4;break;case"utf8":this.fillLast=p,t=4;break;case"base64":this.text=u,this.end=f,t=3;break;default:return this.write=y,void(this.end=b);}this.lastNeed=0,this.lastTotal=0,this.lastChar=g.allocUnsafe(t)}function o(e){if(127>=e)return 0;return 6==e>>5?2:14==e>>4?3:30==e>>3?4:2==e>>6?-1:-2}function d(e,t,r){var a=t.length-1;if(a=r)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],a.slice(0,-1)}return a}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function l(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function u(e,t){var r=(e.length-t)%3;return 0==r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1==r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function f(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function y(e){return e.toString(this.encoding)}function b(e){return e&&e.length?this.write(e):""}var g=e("safe-buffer").Buffer,h=g.isEncoding||function(e){switch(e=""+e,e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1;}};r.StringDecoder=s,s.prototype.write=function(e){if(0===e.length)return"";var t,a;if(this.lastNeed){if(t=this.fillLast(e),void 0===t)return"";a=this.lastNeed,this.lastNeed=0}else a=0;return a=r)return n(r,t);for(var s=4096;s*128arguments.length)&&o.call(arguments,1);return d[t]=!0,s(function(){d[t]&&(a?e.apply(null,a):e.call(null),r.clearImmediate(t))}),t},r.clearImmediate="function"==typeof a?a:function(e){delete d[e]}}).call(this,e("timers").setImmediate,e("timers").clearImmediate)},{"process/browser.js":218,timers:217}],218:[function(e,t,r){arguments[4][71][0].apply(r,arguments)},{dup:71}],219:[function(e,t){var r=e("buffer").Buffer;t.exports=function(e){if(e instanceof Uint8Array){if(0===e.byteOffset&&e.byteLength===e.buffer.byteLength)return e.buffer;if("function"==typeof e.buffer.slice)return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}if(r.isBuffer(e)){for(var t=new Uint8Array(e.length),a=e.length,n=0;narguments.length&&(n=r[i?i[d]:d],d+=e),t(r,a,n,i,d,o)}}function n(e){return function(t,r,a){r=B(r,a);for(var n=T(t),s=0a||null==r)return r;for(var n=1;na&&(a=s)}else t=B(t,r),A.each(e,function(e,r,s){o=t(e,r,s),(o>n||o===-Infinity&&a===-Infinity)&&(a=e,n=o)});return a},A.min=function(e,t,r){var a=1/0,n=1/0,s,o;if(null==t&&null!=e){e=M(e)?e:A.values(e);for(var d=0,p=e.length;da||void 0===r)return 1;if(r=t)throw new Error("bindAll must be passed function names");for(r=1;r=c||c>t?(a&&(clearTimeout(a),a=null),n=p,o=e.apply(s,i),!a&&(s=i=null)):!a&&!1!==r.trailing&&(a=setTimeout(d,c)),o}},A.debounce=function(e,t,r){var a=function(){var p=A.now()-o;p--e)return t.apply(this,arguments)}},A.before=function(e,t){var r;return function(){return 0<--e&&(r=t.apply(this,arguments)),1>=e&&(t=null),r}},A.once=A.partial(A.before,2);var P=!{toString:null}.propertyIsEnumerable("toString"),F=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];A.keys=function(e){if(!A.isObject(e))return[];if(m)return m(e);var t=[];for(var r in e)A.has(e,r)&&t.push(r);return P&&o(e,t),t},A.allKeys=function(e){if(!A.isObject(e))return[];var t=[];for(var r in e)t.push(r);return P&&o(e,t),t},A.values=function(e){for(var t=A.keys(e),r=t.length,a=Array(r),n=0;n":">",'"':""","'":"'","`":"`"},j=A.invert(N),L=function(e){var t=function(t){return e[t]},r="(?:"+A.keys(e).join("|")+")",a=RegExp(r),n=RegExp(r,"g");return function(e){return e=null==e?"":""+e,a.test(e)?e.replace(n,t):e}};A.escape=L(N),A.unescape=L(j),A.result=function(e,t,r){var a=null==e?void 0:e[t];return void 0===a&&(a=r),A.isFunction(a)?a.call(e):a};var D=0;A.uniqueId=function(e){var t=++D+"";return e?e+t:t},A.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var U=/(.)^/,W={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},H=/\\|'|\r|\n|\u2028|\u2029/g,q=function(e){return"\\"+W[e]};A.template=function(e,t,r){!t&&r&&(t=r),t=A.defaults({},t,A.templateSettings);var a=RegExp([(t.escape||U).source,(t.interpolate||U).source,(t.evaluate||U).source].join("|")+"|$","g"),n=0,s="__p+='";e.replace(a,function(t,r,a,i,o){return s+=e.slice(n,o).replace(H,q),n=o+t.length,r?s+="'+\n((__t=("+r+"))==null?'':_.escape(__t))+\n'":a?s+="'+\n((__t=("+a+"))==null?'':__t)+\n'":i&&(s+="';\n"+i+"\n__p+='"),t}),s+="';\n",t.variable||(s="with(obj||{}){\n"+s+"}\n"),s="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+s+"return __p;\n";try{var i=new Function(t.variable||"obj","_",s)}catch(t){throw t.source=s,t}var o=function(e){return i.call(this,e,A)},d=t.variable||"obj";return o.source="function("+d+"){\n"+s+"}",o},A.chain=function(e){var t=A(e);return t._chain=!0,t};var z=function(e,t){return e._chain?A(t).chain():t};A.mixin=function(e){A.each(A.functions(e),function(t){var r=A[t]=e[t];A.prototype[t]=function(){var e=[this._wrapped];return f.apply(e,arguments),z(this,r.apply(A,e))}})},A.mixin(A),A.each(["pop","push","reverse","shift","sort","splice","unshift"],function(e){var t=c[e];A.prototype[e]=function(){var r=this._wrapped;return t.apply(r,arguments),("shift"===e||"splice"===e)&&0===r.length&&delete r[0],z(this,r)}}),A.each(["concat","join","slice"],function(e){var t=c[e];A.prototype[e]=function(){return z(this,t.apply(this._wrapped,arguments))}}),A.prototype.value=function(){return this._wrapped},A.prototype.valueOf=A.prototype.toJSON=A.prototype.value,A.prototype.toString=function(){return""+this._wrapped},"function"==typeof define&&define.amd&&define("underscore",[],function(){return A})}).call(this)},{}],222:[function(e,t){t.exports=function(e,t){if(t){t=t.trim().replace(/^(\?|#|&)/,""),t=t?"?"+t:t;var r=e.split(/[\?\#]/),a=r[0];t&&/\:\/\/[^\/]*$/.test(a)&&(a+="/");var n=e.match(/(\#.*)$/);e=a+t,n&&(e+=n[0])}return e}},{}],223:[function(e,t,r){"use strict";function a(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function n(e,t,r){if(e&&o.isObject(e)&&e instanceof a)return e;var n=new a;return n.parse(e,t,r),n}var s=e("punycode"),o=e("./util");r.parse=n,r.resolve=function(e,t){return n(e,!1,!0).resolve(t)},r.resolveObject=function(e,t){return e?n(e,!1,!0).resolveObject(t):t},r.format=function(e){return o.isString(e)&&(e=n(e)),e instanceof a?e.format():a.prototype.format.call(e)},r.Url=a;var d=/^([a-z0-9.+-]+:)/i,i=/:[0-9]*$/,p=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,c=["{","}","|","\\","^","`"].concat(["<",">","\"","`"," ","\r","\n","\t"]),u=["'"].concat(c),l=["%","/","?",";","#"].concat(u),f=["/","?","#"],y=/^[+a-z0-9A-Z_-]{0,63}$/,b=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,g={javascript:!0,"javascript:":!0},m={javascript:!0,"javascript:":!0},_={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},v=e("querystring");a.prototype.parse=function(e,t,r){if(!o.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var a=e.indexOf("?"),n=-1!==a&&ah.length&&h.unshift(""),r.pathname=h.join("/")}else r.pathname=e.pathname;if(r.search=e.search,r.query=e.query,r.host=e.host||"",r.auth=e.auth,r.hostname=e.hostname||e.host,r.port=e.port,r.pathname||r.search){var w=r.pathname||"",p=r.search||"";r.path=w+p}return r.slashes=r.slashes||e.slashes,r.href=r.format(),r}var s=r.pathname&&"/"===r.pathname.charAt(0),S=e.host||e.pathname&&"/"===e.pathname.charAt(0),A=S||s||r.host&&e.pathname,B=A,x=r.pathname&&r.pathname.split("/")||[],h=e.pathname&&e.pathname.split("/")||[],E=r.protocol&&!_[r.protocol];if(E&&(r.hostname="",r.port=null,r.host&&(""===x[0]?x[0]=r.host:x.unshift(r.host)),r.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===h[0]?h[0]=e.host:h.unshift(e.host)),e.host=null),A=A&&(""===h[0]||""===x[0])),S)r.host=e.host||""===e.host?e.host:r.host,r.hostname=e.hostname||""===e.hostname?e.hostname:r.hostname,r.search=e.search,r.query=e.query,x=h;else if(h.length)x||(x=[]),x.pop(),x=x.concat(h),r.search=e.search,r.query=e.query;else if(!o.isNullOrUndefined(e.search)){if(E){r.hostname=r.host=x.shift();var T=!!(r.host&&0=n&&r>>10),n=56320|1023&n),a+=b(n);return a}function i(e){if(55296<=e&&57343>=e)throw Error("Lone surrogate U+"+e.toString(16).toUpperCase()+" is not a scalar value")}function o(e,t){return b(128|63&e>>t)}function d(e){if(0==(4294967168&e))return b(e);var t="";return 0==(4294965248&e)?t=b(192|31&e>>6):0==(4294901760&e)?(i(e),t=b(224|15&e>>12),t+=o(e,6)):0==(4292870144&e)&&(t=b(240|7&e>>18),t+=o(e,12),t+=o(e,6)),t+=b(128|63&e),t}function p(){if(_>=m)throw Error("Invalid byte index");var e=255&h[_];if(_++,128==(192&e))return 63&e;throw Error("Invalid continuation byte")}function c(){var e,t,r,a,n;if(_>m)throw Error("Invalid byte index");if(_==m)return!1;if(e=255&h[_],_++,0==(128&e))return e;if(192==(224&e)){var t=p();if(n=(31&e)<<6|t,128<=n)return n;throw Error("Invalid continuation byte")}if(224==(240&e)){if(t=p(),r=p(),n=(15&e)<<12|t<<6|r,2048<=n)return i(n),n;throw Error("Invalid continuation byte")}if(240==(248&e)&&(t=p(),r=p(),a=p(),n=(15&e)<<18|t<<12|r<<6|a,65536<=n&&1114111>=n))return n;throw Error("Invalid UTF-8 detected")}function l(e){h=n(e),m=h.length,_=0;for(var t=[],r;!1!==(r=c());)t.push(r);return s(t)}var u="object"==typeof r&&r,f="object"==typeof t&&t&&t.exports==u&&t,y="object"==typeof e&&e;(y.global===y||y.window===y)&&(a=y);var b=String.fromCharCode,g={version:"2.0.0",encode:function(e){for(var t=n(e),r=t.length,a=-1,s="",i;++a=p&&(c.unsubscribe(),u=!0,s._fireError(new Error("Transaction was not mined within"+p+" seconds, please make sure your transaction was properly sent. Be aware that it might still be mined!"),t.eventEmitter,t.reject)):y-1>=d&&(c.unsubscribe(),u=!0,s._fireError(new Error("Transaction was not mined within 50 blocks, please make sure your transaction was properly sent. Be aware that it might still be mined!"),t.eventEmitter,t.reject))}))},A=function(e){r.isFunction(this.requestManager.provider.on)?w.subscribe("newBlockHeaders",S.bind(null,e,!1)):g=setInterval(S.bind(null,e,!0),1e3)}.bind(this);w.getTransactionReceipt(e).then(function(e){e&&e.blockHash?(0a;a++)r+=7s.v?s.v:1-s.v%2),o="0x"+i.encode("hex",!1).slice(2),p=c(o),l=u("0x"+p.slice(-40));return l},encodeSignature:y,decodeSignature:b}}).call(this,e("buffer").Buffer)},{"./bytes":256,"./hash":257,"./nat":258,"./rlp":259,buffer:73,elliptic:95}],255:[function(e,t,r){arguments[4][111][0].apply(r,arguments)},{dup:111}],256:[function(e,t,r){arguments[4][112][0].apply(r,arguments)},{"./array.js":255,dup:112}],257:[function(e,t,r){arguments[4][113][0].apply(r,arguments)},{dup:113}],258:[function(e,t){var r=e("bn.js"),n=e("./bytes"),s=function(e){return"0x"+e.toString("hex")},i=function(e){return new r(e.slice(2),16)},a=function(e){var t="0x"+("0x"===e.slice(0,2)?new r(e.slice(2),16):new r(e,10)).toString("hex");return"0x0"==t?"0x":t},o=function(e){return"string"==typeof e?/^0x/.test(e)?e:"0x"+e:"0x"+new r(e).toString("hex")},d=function(e){return i(e).toNumber()},p=function(e){return function(t,r){return s(i(t)[e](i(r)))}},c=p("add"),l=p("mul"),u=p("div"),f=p("sub");t.exports={toString:function(e){return i(e).toString(10)},fromString:a,toNumber:d,fromNumber:o,toEther:function(e){return d(u(e,a("10000000000")))/1e8},fromEther:function(e){return l(o(Math.floor(1e8*e)),a("10000000000"))},toUint256:function(e){return n.pad(32,e)},add:c,mul:l,div:u,sub:f}},{"./bytes":256,"bn.js":41}],259:[function(e,t){t.exports={encode:function(e){var t=function(e){return 0==e.length%2?e:"0"+e},r=function(e){return t(e.toString(16))},a=function(e,t){return 56>e?r(t+e):r(t+r(e).length/2+55)+r(e)};return"0x"+function e(t){if("string"==typeof t){var r=t.slice(2),n=2!=r.length||"80"<=r?a(r.length/2,128):"";return n+r}var s=t.map(e).join(""),i=a(s.length/2,192);return i+s}(e)},decode:function(e){var t=2,r=function(){if(t>=e.length)throw"";var r=e.slice(t,t+2);return"80">r?(t+=2,"0x"+r):"c0">r?n():s()},a=function(){var r=parseInt(e.slice(t,t+=2),16)%64;return 56>r?r:parseInt(e.slice(t,t+=2*(r-55)),16)},n=function(){var r=a();return"0x"+e.slice(t,t+=2*r)},s=function(){for(var e=2*a()+t,n=[];te;e++)0==(3&e)&&(t=4294967296*Math.random()),n[e]=255&t>>>((3&e)<<3);return n}}t.exports=r}).call(this,"undefined"==typeof global?"undefined"==typeof self?"undefined"==typeof window?{}:window:self:global)},{}],261:[function(e,t){function r(e,t,r){var a=t&&r||0,n=0;for(t=t||[],e.toLowerCase().replace(/[0-9a-f]{2}/g,function(e){16>n&&(t[a+n++]=p[e])});16>n;)t[a+n++]=0;return t}function a(e,t){var r=t||0,a=d;return a[e[r++]]+a[e[r++]]+a[e[r++]]+a[e[r++]]+"-"+a[e[r++]]+a[e[r++]]+"-"+a[e[r++]]+a[e[r++]]+"-"+a[e[r++]]+a[e[r++]]+"-"+a[e[r++]]+a[e[r++]]+a[e[r++]]+a[e[r++]]+a[e[r++]]+a[e[r++]]}function n(e,t,r){var s=t&&r||0,o=t||[];e=e||{};var d=void 0===e.clockseq?f:e.clockseq,p=void 0===e.msecs?new Date().getTime():e.msecs,c=void 0===e.nsecs?g+1:e.nsecs,l=p-y+(c-g)/1e4;if(0>l&&void 0===e.clockseq&&(d=16383&d+1),(0>l||p>y)&&void 0===e.nsecs&&(c=0),1e4<=c)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");y=p,g=c,f=d,p+=122192928e5;var b=(1e4*(268435455&p)+c)%4294967296;o[s++]=255&b>>>24,o[s++]=255&b>>>16,o[s++]=255&b>>>8,o[s++]=255&b;var h=268435455&1e4*(p/4294967296);o[s++]=255&h>>>8,o[s++]=255&h,o[s++]=16|15&h>>>24,o[s++]=255&h>>>16,o[s++]=128|d>>>8,o[s++]=255&d;for(var m=e.node||u,_=0;6>_;_++)o[s+_]=m[_];return t?t:a(o)}function s(e,t,r){var n=t&&r||0;"string"==typeof e&&(t="binary"==e?Array(16):null,e=null),e=e||{};var s=e.random||(e.rng||o)();if(s[6]=64|15&s[6],s[8]=128|63&s[8],t)for(var i=0;16>i;i++)t[n+i]=s[i];return t||a(s)}for(var o=e("./rng"),d=[],p={},c=0;256>c;c++)d[c]=(c+256).toString(16).substr(1),p[d[c]]=c;var l=o(),u=[1|l[0],l[1],l[2],l[3],l[4],l[5]],f=16383&(l[6]<<8|l[7]),y=0,g=0,b=s;b.v1=n,b.v4=s,b.parse=r,b.unparse=a,t.exports=b},{"./rng":260}],262:[function(e,t){(function(r,a){"use strict";function n(e){this._accounts=e,this.length=0,this.defaultKeyName="web3js_wallet"}var s=e("underscore"),i=e("web3-core"),o=e("web3-core-method"),d=e("any-promise"),p=e("eth-lib/lib/account"),c=e("eth-lib/lib/hash"),l=e("eth-lib/lib/rlp"),u=e("eth-lib/lib/nat"),f=e("eth-lib/lib/bytes"),y="undefined"==typeof r?e("crypto-browserify"):e("crypto"),b=e("scrypt.js"),g=e("uuid"),h=e("web3-utils"),m=e("web3-core-helpers"),_=function(e){return s.isUndefined(e)||s.isNull(e)},v=function(e){for(;e&&e.startsWith("0x0");)e="0x"+e.slice(3);return e},w=function(e){return 1==e.length%2&&(e=e.replace("0x","0x0")),e},S=function(){var e=this;i.packageInit(this,arguments),delete this.BatchRequest,delete this.extend;var t=[new o({name:"getId",call:"net_version",params:0,outputFormatter:h.hexToNumber}),new o({name:"getGasPrice",call:"eth_gasPrice",params:0}),new o({name:"getTransactionCount",call:"eth_getTransactionCount",params:2,inputFormatter:[function(e){if(h.isAddress(e))return e;throw new Error("Address "+e+" is not a valid address to get the \"transactionCount\".")},function(){return"latest"}]})];this._ethereumCall={},s.each(t,function(t){t.attachToObject(e._ethereumCall),t.setRequestManager(e._requestManager)}),this.wallet=new n(this)};S.prototype._addAccountFunctions=function(e){var t=this;return e.signTransaction=function(r,a){return t.signTransaction(r,e.privateKey,a)},e.sign=function(r){return t.sign(r,e.privateKey)},e.encrypt=function(r,a){return t.encrypt(e.privateKey,r,a)},e},S.prototype.create=function(e){return this._addAccountFunctions(p.create(e||h.randomHex(32)))},S.prototype.privateKeyToAccount=function(e){return this._addAccountFunctions(p.fromPrivate(e))},S.prototype.signTransaction=function(e,t,r){function a(e){if(e.gas||e.gasLimit||(i=new Error("\"gas\" is missing")),(0>e.nonce||0>e.gas||0>e.gasPrice||0>e.chainId)&&(i=new Error("Gas, gasPrice, nonce or chainId is lower than 0")),i)return r(i),d.reject(new Error("\"gas\" is missing"));try{e=m.formatters.inputCallFormatter(e);var a=e;a.to=e.to||"0x",a.data=e.data||"0x",a.value=e.value||"0x",a.chainId=h.numberToHex(e.chainId);var n=l.encode([f.fromNat(a.nonce),f.fromNat(a.gasPrice),f.fromNat(a.gas),a.to.toLowerCase(),f.fromNat(a.value),a.data,f.fromNat(a.chainId||"0x1"),"0x","0x"]),s=c.keccak256(n),y=p.makeSigner(2*u.toNumber(a.chainId||"0x1")+35)(c.keccak256(n),t),b=l.decode(n).slice(0,6).concat(p.decodeSignature(y));b[6]=w(v(b[6])),b[7]=w(v(b[7])),b[8]=w(v(b[8]));var g=l.encode(b),_=l.decode(g);o={messageHash:s,v:v(_[6]),r:v(_[7]),s:v(_[8]),rawTransaction:g}}catch(t){return r(t),d.reject(t)}return r(null,o),o}var n=this,i=!1,o;return r=r||function(){},e?void 0!==e.nonce&&void 0!==e.chainId&&void 0!==e.gasPrice?d.resolve(a(e)):d.all([_(e.chainId)?n._ethereumCall.getId():e.chainId,_(e.gasPrice)?n._ethereumCall.getGasPrice():e.gasPrice,_(e.nonce)?n._ethereumCall.getTransactionCount(n.privateKeyToAccount(t).address):e.nonce]).then(function(t){if(_(t[0])||_(t[1])||_(t[2]))throw new Error("One of the values \"chainId\", \"gasPrice\", or \"nonce\" couldn't be fetched: "+JSON.stringify(t));return a(s.extend(e,{chainId:t[0],gasPrice:t[1],nonce:t[2]}))}):(i=new Error("No transaction object given!"),r(i),d.reject(i))},S.prototype.recoverTransaction=function(e){var t=l.decode(e),r=p.encodeSignature(t.slice(6,9)),a=f.toNumber(t[6]),n=35>a?[]:[f.fromNumber(a-35>>1),"0x","0x"],s=t.slice(0,6).concat(n),i=l.encode(s);return p.recover(c.keccak256(i),r)},S.prototype.hashMessage=function(e){var t=h.isHexStrict(e)?h.hexToBytes(e):e,r=a.from(t),n="\x19Ethereum Signed Message:\n"+t.length,s=a.from(n),i=a.concat([s,r]);return c.keccak256s(i)},S.prototype.sign=function(e,t){var r=this.hashMessage(e),a=p.sign(r,t),n=p.decodeSignature(a);return{message:e,messageHash:r,v:n[0],r:n[1],s:n[2],signature:a}},S.prototype.recover=function(e,t,r){var a=[].slice.apply(arguments);return s.isObject(e)?this.recover(e.messageHash,p.encodeSignature([e.v,e.r,e.s]),!0):(r||(e=this.hashMessage(e)),4<=a.length?(r=a.slice(-1)[0],r=!!s.isBoolean(r)&&!!r,this.recover(e,p.encodeSignature(a.slice(1,4)),r)):p.recover(e,t))},S.prototype.decrypt=function(e,t,r){if(!s.isString(t))throw new Error("No password given.");var n=s.isObject(e)?e:JSON.parse(r?e.toLowerCase():e);if(3!==n.version)throw new Error("Not a valid V3 wallet");var i,o;if("scrypt"===n.crypto.kdf)o=n.crypto.kdfparams,i=b(new a(t),new a(o.salt,"hex"),o.n,o.r,o.p,o.dklen);else if("pbkdf2"===n.crypto.kdf){if(o=n.crypto.kdfparams,"hmac-sha256"!==o.prf)throw new Error("Unsupported parameters to PBKDF2");i=y.pbkdf2Sync(new a(t),new a(o.salt,"hex"),o.c,o.dklen,"sha256")}else throw new Error("Unsupported key derivation scheme");var d=new a(n.crypto.ciphertext,"hex"),p=h.sha3(a.concat([i.slice(16,32),d])).replace("0x","");if(p!==n.crypto.mac)throw new Error("Key derivation failed - possibly wrong password");var c=y.createDecipheriv(n.crypto.cipher,i.slice(0,16),new a(n.crypto.cipherparams.iv,"hex")),l="0x"+a.concat([c.update(d),c.final()]).toString("hex");return this.privateKeyToAccount(l)},S.prototype.encrypt=function(e,t,r){var n=this.privateKeyToAccount(e);r=r||{};var s=r.salt||y.randomBytes(32),i=r.iv||y.randomBytes(16),o=r.kdf||"scrypt",d={dklen:r.dklen||32,salt:s.toString("hex")},p;if("pbkdf2"===o)d.c=r.c||262144,d.prf="hmac-sha256",p=y.pbkdf2Sync(new a(t),s,d.c,d.dklen,"sha256");else if("scrypt"===o)d.n=r.n||8192,d.r=r.r||8,d.p=r.p||1,p=b(new a(t),s,d.n,d.r,d.p,d.dklen);else throw new Error("Unsupported kdf");var c=y.createCipheriv(r.cipher||"aes-128-ctr",p.slice(0,16),i);if(!c)throw new Error("Unsupported cipher");var l=a.concat([c.update(new a(n.privateKey.replace("0x",""),"hex")),c.final()]),u=h.sha3(a.concat([p.slice(16,32),new a(l,"hex")])).replace("0x","");return{version:3,id:g.v4({random:r.uuid||y.randomBytes(16)}),address:n.address.toLowerCase().replace("0x",""),crypto:{ciphertext:l.toString("hex"),cipherparams:{iv:i.toString("hex")},cipher:r.cipher||"aes-128-ctr",kdf:o,kdfparams:d,mac:u.toString("hex")}}},n.prototype._findSafeIndex=function(e){return e=e||0,s.has(this,e)?this._findSafeIndex(e+1):e},n.prototype._currentIndexes=function(){var e=Object.keys(this),t=e.map(function(e){return parseInt(e)}).filter(function(e){return 9e20>e});return t},n.prototype.create=function(e,t){for(var r=0;re.highestBlock-200&&(t._isSyncing=!1,t.emit("changed",t._isSyncing),r.isFunction(t.callback)&&t.callback(null,t._isSyncing,t))},500)):(this._isSyncing=!0,this.emit("changed",t._isSyncing),r.isFunction(this.callback)&&this.callback(null,t._isSyncing,this),setTimeout(function(){t.emit("data",e),r.isFunction(t.callback)&&t.callback(null,e,t)},0))}}}})];B.forEach(function(t){t.attachToObject(e),t.setRequestManager(e._requestManager,e.accounts),t.defaultBlock=e.defaultBlock,t.defaultAccount=e.defaultAccount})};a.addProviders(w),t.exports=w},{"./getNetworkType.js":267,underscore:221,"web3-core":241,"web3-core-helpers":231,"web3-core-method":232,"web3-core-subscriptions":238,"web3-eth-abi":244,"web3-eth-accounts":262,"web3-eth-contract":263,"web3-eth-iban":265,"web3-eth-personal":266,"web3-net":269,"web3-utils":275}],269:[function(e,t){"use strict";var r=e("web3-core"),a=e("web3-core-method"),n=e("web3-utils"),s=function(){var e=this;r.packageInit(this,arguments),[new a({name:"getId",call:"net_version",params:0,outputFormatter:n.hexToNumber}),new a({name:"isListening",call:"net_listening",params:0}),new a({name:"getPeerCount",call:"net_peerCount",params:0,outputFormatter:n.hexToNumber})].forEach(function(t){t.attachToObject(e),t.setRequestManager(e._requestManager)})};r.addProviders(s),t.exports=s},{"web3-core":241,"web3-core-method":232,"web3-utils":275}],270:[function(e,t){var r=e("web3-core-helpers").errors,a=e("xhr2-cookies").XMLHttpRequest,n=function(e,t){t=t||{},this.host=e||"http://localhost:8545",this.timeout=t.timeout||0,this.headers=t.headers,this.connected=!1};n.prototype._prepareRequest=function(){var e=new a;return e.open("POST",this.host,!0),e.setRequestHeader("Content-Type","application/json"),e.timeout=this.timeout&&1!==this.timeout?this.timeout:0,e.withCredentials=!0,this.headers&&this.headers.forEach(function(t){e.setRequestHeader(t.name,t.value)}),e},n.prototype.send=function(e,t){var a=this,n=this._prepareRequest();n.onreadystatechange=function(){if(4===n.readyState&&1!==n.timeout){var e=n.responseText,s=null;try{e=JSON.parse(e)}catch(t){s=r.InvalidResponse(n.responseText)}a.connected=!0,t(s,e)}},n.ontimeout=function(){a.connected=!1,t(r.ConnectionTimeout(this.timeout))};try{n.send(JSON.stringify(e))}catch(e){this.connected=!1,t(r.InvalidConnection(this.host))}},t.exports=n},{"web3-core-helpers":231,"xhr2-cookies":290}],271:[function(e,t){"use strict";var r=e("underscore"),a=e("web3-core-helpers").errors,n=e("oboe"),s=function(e,t){var a=this;this.responseCallbacks={},this.notificationCallbacks=[],this.path=e,this.connected=!1,this.connection=t.connect({path:this.path}),this.addDefaultEvents();var s=function(e){var t=null;r.isArray(e)?e.forEach(function(e){a.responseCallbacks[e.id]&&(t=e.id)}):t=e.id,t||-1===e.method.indexOf("_subscription")?a.responseCallbacks[t]&&(a.responseCallbacks[t](null,e),delete a.responseCallbacks[t]):a.notificationCallbacks.forEach(function(t){r.isFunction(t)&&t(e)})};"Socket"===t.constructor.name?n(this.connection).done(s):this.connection.on("data",function(e){a._parseResponse(e.toString()).forEach(s)})};s.prototype.addDefaultEvents=function(){var e=this;this.connection.on("connect",function(){e.connected=!0}),this.connection.on("close",function(){e.connected=!1}),this.connection.on("error",function(){e._timeout()}),this.connection.on("end",function(){e._timeout()}),this.connection.on("timeout",function(){e._timeout()})},s.prototype._parseResponse=function(e){var t=this,r=[],n=e.replace(/\}[\n\r]?\{/g,"}|--|{").replace(/\}\][\n\r]?\[\{/g,"}]|--|[{").replace(/\}[\n\r]?\[\{/g,"}|--|[{").replace(/\}\][\n\r]?\{/g,"}]|--|{").split("|--|");return n.forEach(function(n){t.lastChunk&&(n=t.lastChunk+n);var e=null;try{e=JSON.parse(n)}catch(r){return t.lastChunk=n,clearTimeout(t.lastChunkTimeout),void(t.lastChunkTimeout=setTimeout(function(){throw t._timeout(),a.InvalidResponse(n)},15000))}clearTimeout(t.lastChunkTimeout),t.lastChunk=null,e&&r.push(e)}),r},s.prototype._addResponseCallback=function(e,t){var r=e.id||e[0].id,a=e.method||e[0].method;this.responseCallbacks[r]=t,this.responseCallbacks[r].method=a},s.prototype._timeout=function(){for(var e in this.responseCallbacks)this.responseCallbacks.hasOwnProperty(e)&&(this.responseCallbacks[e](a.InvalidConnection("on IPC")),delete this.responseCallbacks[e])},s.prototype.reconnect=function(){this.connection.connect({path:this.path})},s.prototype.send=function(e,t){this.connection.writable||this.connection.connect({path:this.path}),this.connection.write(JSON.stringify(e)),this._addResponseCallback(e,t)},s.prototype.on=function(e,t){if("function"!=typeof t)throw new Error("The second parameter callback must be a function.");switch(e){case"data":this.notificationCallbacks.push(t);break;default:this.connection.on(e,t);}},s.prototype.once=function(e,t){if("function"!=typeof t)throw new Error("The second parameter callback must be a function.");this.connection.once(e,t)},s.prototype.removeListener=function(e,t){var r=this;switch(e){case"data":this.notificationCallbacks.forEach(function(e,a){e===t&&r.notificationCallbacks.splice(a,1)});break;default:this.connection.removeListener(e,t);}},s.prototype.removeAllListeners=function(e){switch(e){case"data":this.notificationCallbacks=[];break;default:this.connection.removeAllListeners(e);}},s.prototype.reset=function(){this._timeout(),this.notificationCallbacks=[],this.connection.removeAllListeners("error"),this.connection.removeAllListeners("end"),this.connection.removeAllListeners("timeout"),this.addDefaultEvents()},t.exports=s},{oboe:150,underscore:221,"web3-core-helpers":231}],272:[function(e,t){(function(r){"use strict";var a=e("underscore"),n=e("web3-core-helpers").errors,s=null,i=null,o=null;if("undefined"!=typeof window&&"undefined"!=typeof window.WebSocket)s=window.WebSocket,i=btoa,o=function(e){return new URL(e)};else{s=e("websocket").w3cwebsocket,i=function(e){return r(e).toString("base64")};var d=e("url");if(d.URL){var p=d.URL;o=function(e){return new p(e)}}else o=e("url").parse}var c=function(e,t){var r=this;this.responseCallbacks={},this.notificationCallbacks=[],t=t||{},this._customTimeout=t.timeout;var n=o(e),d=t.headers||{},p=t.protocol||void 0;n.username&&n.password&&(d.authorization="Basic "+i(n.username+":"+n.password)),this.connection=new s(e,p,void 0,d),this.addDefaultEvents(),this.connection.onmessage=function(t){var e="string"==typeof t.data?t.data:"";r._parseResponse(e).forEach(function(e){var t=null;a.isArray(e)?e.forEach(function(e){r.responseCallbacks[e.id]&&(t=e.id)}):t=e.id,t||-1===e.method.indexOf("_subscription")?r.responseCallbacks[t]&&(r.responseCallbacks[t](null,e),delete r.responseCallbacks[t]):r.notificationCallbacks.forEach(function(t){a.isFunction(t)&&t(e)})})},Object.defineProperty(this,"connected",{get:function(){return this.connection&&this.connection.readyState===this.connection.OPEN},enumerable:!0})};c.prototype.addDefaultEvents=function(){var e=this;this.connection.onerror=function(){e._timeout()},this.connection.onclose=function(){e._timeout(),e.reset()}},c.prototype._parseResponse=function(e){var t=this,r=[],a=e.replace(/\}[\n\r]?\{/g,"}|--|{").replace(/\}\][\n\r]?\[\{/g,"}]|--|[{").replace(/\}[\n\r]?\[\{/g,"}|--|[{").replace(/\}\][\n\r]?\{/g,"}]|--|{").split("|--|");return a.forEach(function(a){t.lastChunk&&(a=t.lastChunk+a);var e=null;try{e=JSON.parse(a)}catch(r){return t.lastChunk=a,clearTimeout(t.lastChunkTimeout),void(t.lastChunkTimeout=setTimeout(function(){throw t._timeout(),n.InvalidResponse(a)},15000))}clearTimeout(t.lastChunkTimeout),t.lastChunk=null,e&&r.push(e)}),r},c.prototype._addResponseCallback=function(e,t){var r=e.id||e[0].id,a=e.method||e[0].method;this.responseCallbacks[r]=t,this.responseCallbacks[r].method=a;var s=this;this._customTimeout&&setTimeout(function(){s.responseCallbacks[r]&&(s.responseCallbacks[r](n.ConnectionTimeout(s._customTimeout)),delete s.responseCallbacks[r])},this._customTimeout)},c.prototype._timeout=function(){for(var e in this.responseCallbacks)this.responseCallbacks.hasOwnProperty(e)&&(this.responseCallbacks[e](n.InvalidConnection("on WS")),delete this.responseCallbacks[e])},c.prototype.send=function(e,t){var r=this;return this.connection.readyState===this.connection.CONNECTING?void setTimeout(function(){r.send(e,t)},10):this.connection.readyState===this.connection.OPEN?void(this.connection.send(JSON.stringify(e)),this._addResponseCallback(e,t)):(console.error("connection not open on send()"),"function"==typeof this.connection.onerror?this.connection.onerror(new Error("connection not open")):console.error("no error callback"),void t(new Error("connection not open")))},c.prototype.on=function(e,t){if("function"!=typeof t)throw new Error("The second parameter callback must be a function.");"data"===e?this.notificationCallbacks.push(t):"connect"===e?this.connection.onopen=t:"end"===e?this.connection.onclose=t:"error"===e?this.connection.onerror=t:void 0},c.prototype.removeListener=function(e,t){var r=this;"data"===e?this.notificationCallbacks.forEach(function(e,a){e===t&&r.notificationCallbacks.splice(a,1)}):void 0},c.prototype.removeAllListeners=function(e){switch(e){case"data":this.notificationCallbacks=[];break;case"connect":this.connection.onopen=null;break;case"end":this.connection.onclose=null;break;case"error":this.connection.onerror=null;break;default:}},c.prototype.reset=function(){this._timeout(),this.notificationCallbacks=[],this.addDefaultEvents()},t.exports=c}).call(this,e("buffer").Buffer)},{buffer:73,underscore:221,url:223,"web3-core-helpers":231,websocket:280}],273:[function(e,t){"use strict";var r=e("web3-core"),a=e("web3-core-subscriptions").subscriptions,n=e("web3-core-method"),s=e("web3-net"),i=function(){var e=this;r.packageInit(this,arguments);var t=this.setProvider;this.setProvider=function(){t.apply(e,arguments),e.net.setProvider.apply(e,arguments)},this.clearSubscriptions=e._requestManager.clearSubscriptions,this.net=new s(this.currentProvider),[new a({name:"subscribe",type:"shh",subscriptions:{messages:{params:1}}}),new n({name:"getVersion",call:"shh_version",params:0}),new n({name:"getInfo",call:"shh_info",params:0}),new n({name:"setMaxMessageSize",call:"shh_setMaxMessageSize",params:1}),new n({name:"setMinPoW",call:"shh_setMinPoW",params:1}),new n({name:"markTrustedPeer",call:"shh_markTrustedPeer",params:1}),new n({name:"newKeyPair",call:"shh_newKeyPair",params:0}),new n({name:"addPrivateKey",call:"shh_addPrivateKey",params:1}),new n({name:"deleteKeyPair",call:"shh_deleteKeyPair",params:1}),new n({name:"hasKeyPair",call:"shh_hasKeyPair",params:1}),new n({name:"getPublicKey",call:"shh_getPublicKey",params:1}),new n({name:"getPrivateKey",call:"shh_getPrivateKey",params:1}),new n({name:"newSymKey",call:"shh_newSymKey",params:0}),new n({name:"addSymKey",call:"shh_addSymKey",params:1}),new n({name:"generateSymKeyFromPassword",call:"shh_generateSymKeyFromPassword",params:1}),new n({name:"hasSymKey",call:"shh_hasSymKey",params:1}),new n({name:"getSymKey",call:"shh_getSymKey",params:1}),new n({name:"deleteSymKey",call:"shh_deleteSymKey",params:1}),new n({name:"newMessageFilter",call:"shh_newMessageFilter",params:1}),new n({name:"getFilterMessages",call:"shh_getFilterMessages",params:1}),new n({name:"deleteMessageFilter",call:"shh_deleteMessageFilter",params:1}),new n({name:"post",call:"shh_post",params:1,inputFormatter:[null]})].forEach(function(t){t.attachToObject(e),t.setRequestManager(e._requestManager)})};r.addProviders(i),t.exports=i},{"web3-core":241,"web3-core-method":232,"web3-core-subscriptions":238,"web3-net":269}],274:[function(e,t,r){arguments[4][115][0].apply(r,arguments)},{dup:115}],275:[function(e,t){var r=e("underscore"),a=e("ethjs-unit"),n=e("./utils.js"),s=e("./soliditySha3.js"),i=e("randomhex"),o=function(e){if(!n.isHexStrict(e))throw new Error("The parameter must be a valid HEX string.");var t="",r=0,a=e.length;for("0x"===e.substring(0,2)&&(r=2);rs.length?"0"+s:s}return"0x"+t},p=function(e){if(e=e?e.toLowerCase():"ether",!a.unitMap[e])throw new Error("This unit \""+e+"\" doesn't exist, please use the one of the following units"+JSON.stringify(a.unitMap,null,2));return e};t.exports={_fireError:function(e,t,a,n){return r.isObject(e)&&!(e instanceof Error)&&e.data&&((r.isObject(e.data)||r.isArray(e.data))&&(e.data=JSON.stringify(e.data,null,2)),e=e.message+"\n"+e.data),r.isString(e)&&(e=new Error(e)),r.isFunction(n)&&n(e),r.isFunction(a)&&((t&&r.isFunction(t.listeners)&&t.listeners("error").length||r.isFunction(n))&&t.catch(function(){}),setTimeout(function(){a(e)},1)),t&&r.isFunction(t.emit)&&setTimeout(function(){t.emit("error",e),t.removeAllListeners()},1),t},_jsonInterfaceMethodToString:function(e){if(r.isObject(e)&&e.name&&-1!==e.name.indexOf("("))return e.name;var t=e.inputs.map(function(e){return e.type}).join(",");return e.name+"("+t+")"},randomHex:i,_:r,BN:n.BN,isBN:n.isBN,isBigNumber:n.isBigNumber,isHex:n.isHex,isHexStrict:n.isHexStrict,sha3:n.sha3,keccak256:n.sha3,soliditySha3:s,isAddress:n.isAddress,checkAddressChecksum:n.checkAddressChecksum,toChecksumAddress:function(e){if("undefined"==typeof e)return"";if(!/^(0x)?[0-9a-f]{40}$/i.test(e))throw new Error("Given address \""+e+"\" is not a valid Ethereum address.");e=e.toLowerCase().replace(/^0x/i,"");for(var t=n.sha3(e).replace(/^0x/i,""),r="0x",a=0;ao||32o||256o)throw new Error("Supplied uint exceeds width: "+o+" vs "+p.bitLength());if(p.lt(new a(0)))throw new Error("Supplied uint "+p.toString()+" is negative");return o?n.leftPad(p.toString("hex"),2*(o/8)):p}if(e.startsWith("int")){if(o%8||8>o||256o)throw new Error("Supplied int exceeds width: "+o+" vs "+p.bitLength());return p.lt(new a(0))?p.toTwos(o).toString("hex"):o?n.leftPad(p.toString("hex"),2*(o/8)):p}throw new Error("Unsupported or invalid type: "+e)},c=function(e){if(r.isArray(e))throw new Error("Autodetection of array types is not supported.");var t="",s,i,d;if(r.isObject(e)&&(e.hasOwnProperty("v")||e.hasOwnProperty("t")||e.hasOwnProperty("value")||e.hasOwnProperty("type"))?(s=e.hasOwnProperty("t")?e.t:e.type,t=e.hasOwnProperty("v")?e.v:e.value):(s=n.toHex(e,!0),t=n.toHex(e),!s.startsWith("int")&&!s.startsWith("uint")&&(s="bytes")),(s.startsWith("int")||s.startsWith("uint"))&&"string"==typeof t&&!/^(-)?0x/i.test(t)&&(t=new a(t)),r.isArray(t))if(d=o(s),d&&t.length!==d)throw new Error(s+" is not matching the given array "+JSON.stringify(t));else d=t.length;return r.isArray(t)?(i=t.map(function(e){return p(s,e,d).toString("hex").replace("0x","")}),i.join("")):(i=p(s,t,d),i.toString("hex").replace("0x",""))};t.exports=function(){var e=Array.prototype.slice.call(arguments),t=r.map(e,c);return n.sha3("0x"+t.join(""))}},{"./utils.js":277,"bn.js":274,underscore:221}],277:[function(e,t){var r=e("underscore"),a=e("bn.js"),n=e("number-to-bn"),s=e("utf8"),i=e("eth-lib/lib/hash"),o=function(e){return e instanceof a||e&&e.constructor&&"BN"===e.constructor.name},d=function(e){return e&&e.constructor&&"BigNumber"===e.constructor.name},p=function(t){try{return n.apply(null,arguments)}catch(r){throw new Error(r+" Given value: \""+t+"\"")}},c=function(e){return!!/^(0x)?[0-9a-f]{40}$/i.test(e)&&(!!(/^(0x|0X)?[0-9a-f]{40}$/.test(e)||/^(0x|0X)?[0-9A-F]{40}$/.test(e))||l(e))},l=function(e){e=e.replace(/^0x/i,"");for(var t=g(e.toLowerCase()).replace(/^0x/i,""),r=0;40>r;r++)if(7=parseInt(t[r],16)&&e[r].toLowerCase()!==e[r])return!1;return!0},u=function(e){e=s.encode(e);var t="";e=e.replace(/^(?:\u0000)*/,""),e=e.split("").reverse().join(""),e=e.replace(/^(?:\u0000)*/,""),e=e.split("").reverse().join("");for(var r=0;ro.length?"0"+o:o}return"0x"+t},f=function(e){if(r.isNull(e)||r.isUndefined(e))return e;if(!isFinite(e)&&!b(e))throw new Error("Given input \""+e+"\" is not a number.");var t=p(e),n=t.toString(16);return t.lt(new a(0))?"-0x"+n.substr(1):"0x"+n},y=function(e){if(e=e.toString(16),!b(e))throw new Error("Given value \""+e+"\" is not a valid hex string.");e=e.replace(/^0x/i,"");for(var t=[],r=0;re?"int256":"uint256":f(e)},hexToBytes:y,bytesToHex:function(e){for(var t=[],r=0;r>>4).toString(16)),t.push((15&e[r]).toString(16));return"0x"+t.join("")},isHex:function(e){return(r.isString(e)||r.isNumber(e))&&/^(-0x|0x)?[0-9a-f]*$/i.test(e)},isHexStrict:b,leftPad:function(e,t,r){var a=/^0x/i.test(e)||"number"==typeof e;e=e.toString(16).replace(/^0x/i,"");var n=0<=t-e.length+1?t-e.length+1:0;return(a?"0x":"")+Array(n).join(r?r:"0")+e},rightPad:function(e,t,r){var a=/^0x/i.test(e)||"number"==typeof e;e=e.toString(16).replace(/^0x/i,"");var n=0<=t-e.length+1?t-e.length+1:0;return(a?"0x":"")+e+Array(n).join(r?r:"0")},toTwosComplement:function(e){return"0x"+p(e).toTwos(256).toString(16,64)},sha3:g}},{"bn.js":274,"eth-lib/lib/hash":113,"number-to-bn":148,underscore:221,utf8:225}],278:[function(e,t){t.exports={_from:"web3@^1.0.0-beta.34",_id:"web3@1.0.0-beta.35",_inBundle:!1,_integrity:"sha512-xwDmUhvTcHQvvNnOPcPZZgCxKUsI2e+GbHy7JkTK3/Rmnutazy8x7fsAXT9myw7V1qpi3GgLoZ3fkglSUbg1Mg==",_location:"/web3",_phantomChildren:{},_requested:{type:"range",registry:!0,raw:"web3@^1.0.0-beta.34",name:"web3",escapedName:"web3",rawSpec:"^1.0.0-beta.34",saveSpec:null,fetchSpec:"^1.0.0-beta.34"},_requiredBy:["/"],_resolved:"https://registry.npmjs.org/web3/-/web3-1.0.0-beta.35.tgz",_shasum:"6475095bd451a96e50a32b997ddee82279292f11",_spec:"web3@^1.0.0-beta.34",_where:"/Users/ChenYu/Documents/cryptape/projects/nervos/packages/nervos-chain",author:{name:"ethereum.org"},authors:[{name:"Fabian Vogelsteller",email:"fabian@ethereum.org",homepage:"http://frozeman.de"},{name:"Marek Kotewicz",email:"marek@parity.io",url:"https://github.com/debris"},{name:"Marian Oancea",url:"https://github.com/cubedro"},{name:"Gav Wood",email:"g@parity.io",homepage:"http://gavwood.com"},{name:"Jeffery Wilcke",email:"jeffrey.wilcke@ethereum.org",url:"https://github.com/obscuren"}],bugs:{url:"https://github.com/ethereum/web3.js/issues"},bundleDependencies:!1,dependencies:{"web3-bzz":"1.0.0-beta.35","web3-core":"1.0.0-beta.35","web3-eth":"1.0.0-beta.35","web3-eth-personal":"1.0.0-beta.35","web3-net":"1.0.0-beta.35","web3-shh":"1.0.0-beta.35","web3-utils":"1.0.0-beta.35"},deprecated:!1,description:"Ethereum JavaScript API",keywords:["Ethereum","JavaScript","API"],license:"LGPL-3.0",main:"src/index.js",name:"web3",namespace:"ethereum",repository:{type:"git",url:"https://github.com/ethereum/web3.js/tree/master/packages/web3"},types:"index.d.ts",version:"1.0.0-beta.35"}},{}],279:[function(e,t){"use strict";var r=e("../package.json").version,a=e("web3-core"),n=e("web3-eth"),s=e("web3-net"),i=e("web3-eth-personal"),o=e("web3-shh"),d=e("web3-bzz"),p=e("web3-utils"),c=function(){var e=this;a.packageInit(this,arguments),this.version=r,this.utils=p,this.eth=new n(this),this.shh=new o(this),this.bzz=new d(this);var t=this.setProvider;this.setProvider=function(r,a){return t.apply(e,arguments),this.eth.setProvider(r,a),this.shh.setProvider(r,a),this.bzz.setProvider(r),!0}};c.version=r,c.utils=p,c.modules={Eth:n,Net:s,Personal:i,Shh:o,Bzz:d},a.addProviders(c),t.exports=c},{"../package.json":278,"web3-bzz":228,"web3-core":241,"web3-eth":268,"web3-eth-personal":266,"web3-net":269,"web3-shh":273,"web3-utils":275}],280:[function(e,t){function r(e,t){var r;return r=t?new n(e,t):new n(e),r}var a=function(){return this||{}}(),n=a.WebSocket||a.MozWebSocket,s=e("./version");n&&["CONNECTING","OPEN","CLOSING","CLOSED"].forEach(function(e){Object.defineProperty(r,e,{get:function(){return n[e]}})}),t.exports={w3cwebsocket:n?r:null,version:s}},{"./version":281}],281:[function(e,t){t.exports=e("../package.json").version},{"../package.json":282}],282:[function(e,t){t.exports={_from:"git://github.com/frozeman/WebSocket-Node.git#browserifyCompatible",_id:"websocket@1.0.26",_inBundle:!1,_location:"/websocket",_phantomChildren:{},_requested:{type:"git",raw:"websocket@git://github.com/frozeman/WebSocket-Node.git#browserifyCompatible",name:"websocket",escapedName:"websocket",rawSpec:"git://github.com/frozeman/WebSocket-Node.git#browserifyCompatible",saveSpec:"git://github.com/frozeman/WebSocket-Node.git#browserifyCompatible",fetchSpec:"git://github.com/frozeman/WebSocket-Node.git",gitCommittish:"browserifyCompatible"},_requiredBy:["/web3-providers-ws"],_resolved:"git://github.com/frozeman/WebSocket-Node.git#6c72925e3f8aaaea8dc8450f97627e85263999f2",_spec:"websocket@git://github.com/frozeman/WebSocket-Node.git#browserifyCompatible",_where:"/Users/ChenYu/Documents/cryptape/projects/nervos/packages/nervos-chain/node_modules/web3-providers-ws",author:{name:"Brian McKelvey",email:"brian@worlize.com",url:"https://www.worlize.com/"},browser:"lib/browser.js",bugs:{url:"https://github.com/theturtle32/WebSocket-Node/issues"},bundleDependencies:!1,config:{verbose:!1},contributors:[{name:"I\xF1aki Baz Castillo",email:"ibc@aliax.net",url:"http://dev.sipdoc.net"}],dependencies:{debug:"^2.2.0",nan:"^2.3.3","typedarray-to-buffer":"^3.1.2",yaeti:"^0.0.6"},deprecated:!1,description:"Websocket Client & Server Library implementing the WebSocket protocol as specified in RFC 6455.",devDependencies:{"buffer-equal":"^1.0.0",faucet:"^0.0.1",gulp:"git+https://github.com/gulpjs/gulp.git#4.0","gulp-jshint":"^2.0.4",jshint:"^2.0.0","jshint-stylish":"^2.2.1",tape:"^4.0.1"},directories:{lib:"./lib"},engines:{node:">=0.10.0"},homepage:"https://github.com/theturtle32/WebSocket-Node",keywords:["websocket","websockets","socket","networking","comet","push","RFC-6455","realtime","server","client"],license:"Apache-2.0",main:"index",name:"websocket",repository:{type:"git",url:"git+https://github.com/theturtle32/WebSocket-Node.git"},scripts:{gulp:"gulp",install:"(node-gyp rebuild 2> builderror.log) || (exit 0)",test:"faucet test/unit"},version:"1.0.26"}},{}],283:[function(e,t){var r=e("xhr-request");t.exports=function(e,t){return new Promise(function(a,n){r(e,t,function(e,t){e?n(e):a(t)})})}},{"xhr-request":284}],284:[function(e,t){var r=e("query-string"),a=e("url-set-query"),n=e("object-assign"),s=e("./lib/ensure-header.js"),i=e("./lib/request.js"),o=function(){};t.exports=function(e,t,d){if(!e||"string"!=typeof e)throw new TypeError("must specify a URL");if("function"==typeof t&&(d=t,t={}),d&&"function"!=typeof d)throw new TypeError("expected cb to be undefined or a function");d=d||o,t=t||{};var p=t.json?"json":"text";t=n({responseType:p},t);var c=t.headers||{},l=(t.method||"GET").toUpperCase(),u=t.query;return u&&("string"!=typeof u&&(u=r.stringify(u)),e=a(e,u)),"json"===t.responseType&&s(c,"Accept","application/json"),t.json&&"GET"!==l&&"HEAD"!==l&&(s(c,"Content-Type","application/json"),t.body=JSON.stringify(t.body)),t.method=l,t.url=e,t.headers=c,delete t.query,delete t.json,i(t,d)}},{"./lib/ensure-header.js":285,"./lib/request.js":287,"object-assign":149,"query-string":171,"url-set-query":222}],285:[function(e,t){t.exports=function(e,t,r){var a=t.toLowerCase();e[t]||e[a]||(e[t]=r)}},{}],286:[function(e,t){t.exports=function(e,t){return t?{statusCode:t.statusCode,headers:t.headers,method:e.method,url:e.url,rawRequest:t.rawRequest?t.rawRequest:t}:null}},{}],287:[function(e,t){var r=e("xhr"),a=e("./normalize-response"),n=function(){};t.exports=function(e,t){delete e.uri;var s=!1;"json"===e.responseType&&(e.responseType="text",s=!0);var i=r(e,function(r,i,o){if(s&&!r)try{var d=i.rawRequest.responseText;o=JSON.parse(d)}catch(t){r=t}i=a(e,i),r?t(r,null,i):t(r,o,i),t=n}),o=i.onabort;return i.onabort=function(){var e=o.apply(i,Array.prototype.slice.call(arguments));return t(new Error("XHR Aborted")),t=n,e},i}},{"./normalize-response":286,xhr:288}],288:[function(e,t){"use strict";function r(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}function a(e,t,r){var a=e;return d(t)?(r=t,"string"==typeof e&&(a={uri:e})):a=c(t,{uri:e}),a.callback=r,a}function n(e,t,r){return t=a(e,t,r),s(t)}function s(e){function t(){4===l.readyState&&setTimeout(o,0)}function a(){var e;if(e=l.response?l.response:l.responseText||i(l),h)try{e=JSON.parse(e)}catch(t){}return e}function s(e){return clearTimeout(w),e instanceof Error||(e=new Error(""+(e||"Unknown XMLHttpRequest Error"))),e.statusCode=0,c(e,m)}function o(){if(!v){var t;clearTimeout(w),t=e.useXDR&&void 0===l.status?200:1223===l.status?204:l.status;var r=m,n=null;return 0===t?n=new Error("Internal XMLHttpRequest Error"):(r={body:a(),statusCode:t,method:f,headers:{},url:u,rawRequest:l},l.getAllResponseHeaders&&(r.headers=p(l.getAllResponseHeaders()))),c(n,r,r.body)}}if("undefined"==typeof e.callback)throw new Error("callback argument missing");var d=!1,c=function(t,r,a){d||(d=!0,e.callback(t,r,a))},l=e.xhr||null;l||(e.cors||e.useXDR?l=new n.XDomainRequest:l=new n.XMLHttpRequest);var u=l.url=e.uri||e.url,f=l.method=e.method||"GET",y=e.body||e.data,b=l.headers=e.headers||{},g=!!e.sync,h=!1,m={body:void 0,headers:{},statusCode:0,method:f,url:u,rawRequest:l},_,v,w;if("json"in e&&!1!==e.json&&(h=!0,b.accept||b.Accept||(b.Accept="application/json"),"GET"!==f&&"HEAD"!==f&&(b["content-type"]||b["Content-Type"]||(b["Content-Type"]="application/json"),y=JSON.stringify(!0===e.json?y:e.json))),l.onreadystatechange=t,l.onload=o,l.onerror=s,l.onprogress=function(){},l.onabort=function(){v=!0},l.ontimeout=s,l.open(f,u,!g,e.username,e.password),g||(l.withCredentials=!!e.withCredentials),!g&&0r||this.listeners[e].splice(r,1)}},e.prototype.dispatchEvent=function(e){var t=e.type.toLowerCase();if(e.target=this,this.listeners[t])for(var r=0,a=this.listeners[t],n;ra.randomHex(5),r.hex2bytes=e=>a.hexToBytes(e.startsWith("0x")?e:"0x"+e),r.bytes2hex=e=>a.bytesToHex(e);r.default=({privateKey:e,data:o="",nonce:d=r.getNonce(),quota:s,validUntilBlock:i,value:p="",version:c=0,chainId:l=1,to:u=""},f)=>{if(!e&&!f)return console.warn("No private key found"),{data:o,nonce:d,quota:s,validUntilBlock:i,value:p,version:c,chainId:l,to:u};const y=new n.Transaction;if(void 0===d?y.setNonce(r.getNonce()):y.setNonce(d),0t.from(e,"base64");r.default=e=>{const r=a.hex2bytes(e),o=s.UnverifiedTransaction.deserializeBinary(r),d=o.getTransaction(),p=o.getSignature(),c=o.getCrypto(),l=s.Transaction.toObject(!0,d);l.value=i(l.value),l.data=i(l.data);const u=new n({r:a.bytes2hex(p.slice(0,32)).slice(2),s:a.bytes2hex(p.slice(32,64)).slice(2),recoveryParam:p[64]}),f=d.serializeBinary(),y=a.sha3(f).slice(2),b=new t(y.toString(),"hex"),g=a.ec.recoverPubKey(b,u,u.recoveryParam,"hex"),h=g.encode("hex").slice(2).toLowerCase(),m=new t(a.hex2bytes(h)),_=a.sha3(m).slice(-40).toLowerCase(),v=a.bytes2hex(p).slice(2);return{transaction:l,signature:v,crypto:c,sender:{publicKey:h,address:_}}}}).call(this,e("buffer").Buffer)},{"../proto-js/blockchain_pb":501,"./index":296,buffer:73,"elliptic/lib/elliptic/ec/signature":372}],298:[function(e,t,r){arguments[4][23][0].apply(r,arguments)},{"./register":300,dup:23}],299:[function(e,t,r){arguments[4][24][0].apply(r,arguments)},{dup:24}],300:[function(e,t,r){arguments[4][25][0].apply(r,arguments)},{"./loader":299,dup:25}],301:[function(e,t,r){arguments[4][26][0].apply(r,arguments)},{"./asn1/api":302,"./asn1/base":304,"./asn1/constants":308,"./asn1/decoders":310,"./asn1/encoders":313,"bn.js":315,dup:26}],302:[function(e,t,r){arguments[4][27][0].apply(r,arguments)},{"../asn1":301,dup:27,inherits:399,vm:227}],303:[function(e,t,r){arguments[4][28][0].apply(r,arguments)},{"../base":304,buffer:73,dup:28,inherits:399}],304:[function(e,t,r){arguments[4][29][0].apply(r,arguments)},{"./buffer":303,"./node":305,"./reporter":306,dup:29}],305:[function(e,t,r){arguments[4][30][0].apply(r,arguments)},{"../base":304,dup:30,"minimalistic-assert":403}],306:[function(e,t,r){arguments[4][31][0].apply(r,arguments)},{dup:31,inherits:399}],307:[function(e,t,r){arguments[4][32][0].apply(r,arguments)},{"../constants":308,dup:32}],308:[function(e,t,r){arguments[4][33][0].apply(r,arguments)},{"./der":307,dup:33}],309:[function(e,t,r){arguments[4][34][0].apply(r,arguments)},{"../../asn1":301,dup:34,inherits:399}],310:[function(e,t,r){arguments[4][35][0].apply(r,arguments)},{"./der":309,"./pem":311,dup:35}],311:[function(e,t,r){arguments[4][36][0].apply(r,arguments)},{"./der":309,buffer:73,dup:36,inherits:399}],312:[function(e,t,r){arguments[4][37][0].apply(r,arguments)},{"../../asn1":301,buffer:73,dup:37,inherits:399}],313:[function(e,t,r){arguments[4][38][0].apply(r,arguments)},{"./der":312,"./pem":314,dup:38}],314:[function(e,t,r){arguments[4][39][0].apply(r,arguments)},{"./der":312,dup:39,inherits:399}],315:[function(e,t,r){arguments[4][41][0].apply(r,arguments)},{buffer:43,dup:41}],316:[function(e,t,r){arguments[4][42][0].apply(r,arguments)},{crypto:43,dup:42}],317:[function(e,t,r){arguments[4][44][0].apply(r,arguments)},{dup:44,"safe-buffer":430}],318:[function(e,t,r){arguments[4][45][0].apply(r,arguments)},{"./aes":317,"./ghash":322,"./incr32":323,"buffer-xor":344,"cipher-base":345,dup:45,inherits:399,"safe-buffer":430}],319:[function(e,t,r){arguments[4][46][0].apply(r,arguments)},{"./decrypter":320,"./encrypter":321,"./modes/list.json":331,dup:46}],320:[function(e,t,r){arguments[4][47][0].apply(r,arguments)},{"./aes":317,"./authCipher":318,"./modes":330,"./streamCipher":333,"cipher-base":345,dup:47,evp_bytestokey:383,inherits:399,"safe-buffer":430}],321:[function(e,t,r){arguments[4][48][0].apply(r,arguments)},{"./aes":317,"./authCipher":318,"./modes":330,"./streamCipher":333,"cipher-base":345,dup:48,evp_bytestokey:383,inherits:399,"safe-buffer":430}],322:[function(e,t,r){arguments[4][49][0].apply(r,arguments)},{dup:49,"safe-buffer":430}],323:[function(e,t,r){arguments[4][50][0].apply(r,arguments)},{dup:50}],324:[function(e,t,r){arguments[4][51][0].apply(r,arguments)},{"buffer-xor":344,dup:51}],325:[function(e,t,r){arguments[4][52][0].apply(r,arguments)},{"buffer-xor":344,dup:52,"safe-buffer":430}],326:[function(e,t,r){arguments[4][53][0].apply(r,arguments)},{dup:53,"safe-buffer":430}],327:[function(e,t,r){arguments[4][54][0].apply(r,arguments)},{dup:54,"safe-buffer":430}],328:[function(e,t,r){arguments[4][55][0].apply(r,arguments)},{"../incr32":323,"buffer-xor":344,dup:55,"safe-buffer":430}],329:[function(e,t,r){arguments[4][56][0].apply(r,arguments)},{dup:56}],330:[function(e,t,r){arguments[4][57][0].apply(r,arguments)},{"./cbc":324,"./cfb":325,"./cfb1":326,"./cfb8":327,"./ctr":328,"./ecb":329,"./list.json":331,"./ofb":332,dup:57}],331:[function(e,t,r){arguments[4][58][0].apply(r,arguments)},{dup:58}],332:[function(e,t,r){arguments[4][59][0].apply(r,arguments)},{buffer:73,"buffer-xor":344,dup:59}],333:[function(e,t,r){arguments[4][60][0].apply(r,arguments)},{"./aes":317,"cipher-base":345,dup:60,inherits:399,"safe-buffer":430}],334:[function(e,t,r){arguments[4][61][0].apply(r,arguments)},{"browserify-aes/browser":319,"browserify-aes/modes":330,"browserify-des":335,"browserify-des/modes":336,dup:61,evp_bytestokey:383}],335:[function(e,t,r){arguments[4][62][0].apply(r,arguments)},{"cipher-base":345,"des.js":353,dup:62,inherits:399,"safe-buffer":430}],336:[function(e,t,r){arguments[4][63][0].apply(r,arguments)},{dup:63}],337:[function(e,t,r){arguments[4][64][0].apply(r,arguments)},{"bn.js":315,buffer:73,dup:64,randombytes:424}],338:[function(e,t,r){arguments[4][65][0].apply(r,arguments)},{"./browser/algorithms.json":339,dup:65}],339:[function(e,t,r){arguments[4][66][0].apply(r,arguments)},{dup:66}],340:[function(e,t,r){arguments[4][67][0].apply(r,arguments)},{dup:67}],341:[function(e,t,r){arguments[4][68][0].apply(r,arguments)},{"./algorithms.json":339,"./sign":342,"./verify":343,buffer:73,"create-hash":348,dup:68,inherits:399,stream:205}],342:[function(e,t,r){arguments[4][69][0].apply(r,arguments)},{"./curves.json":340,"bn.js":315,"browserify-rsa":337,buffer:73,"create-hmac":350,dup:69,elliptic:363,"parse-asn1":412}],343:[function(e,t,r){arguments[4][70][0].apply(r,arguments)},{"./curves.json":340,"bn.js":315,buffer:73,dup:70,elliptic:363,"parse-asn1":412}],344:[function(e,t,r){arguments[4][72][0].apply(r,arguments)},{buffer:73,dup:72}],345:[function(e,t,r){arguments[4][75][0].apply(r,arguments)},{dup:75,inherits:399,"safe-buffer":430,stream:205,string_decoder:211}],346:[function(e,t,r){arguments[4][76][0].apply(r,arguments)},{dup:76}],347:[function(e,t,r){arguments[4][78][0].apply(r,arguments)},{"bn.js":315,buffer:73,dup:78,elliptic:363}],348:[function(e,t,r){arguments[4][79][0].apply(r,arguments)},{"cipher-base":345,dup:79,inherits:399,"md5.js":401,ripemd160:429,"sha.js":434}],349:[function(e,t,r){arguments[4][80][0].apply(r,arguments)},{dup:80,"md5.js":401}],350:[function(e,t,r){arguments[4][81][0].apply(r,arguments)},{"./legacy":351,"cipher-base":345,"create-hash/md5":349,dup:81,inherits:399,ripemd160:429,"safe-buffer":430,"sha.js":434}],351:[function(e,t,r){arguments[4][82][0].apply(r,arguments)},{"cipher-base":345,dup:82,inherits:399,"safe-buffer":430}],352:[function(e,t,r){arguments[4][83][0].apply(r,arguments)},{"browserify-cipher":334,"browserify-sign":341,"browserify-sign/algos":338,"create-ecdh":347,"create-hash":348,"create-hmac":350,"diffie-hellman":359,dup:83,pbkdf2:413,"public-encrypt":418,randombytes:424,randomfill:425}],353:[function(e,t,r){arguments[4][85][0].apply(r,arguments)},{"./des/cbc":354,"./des/cipher":355,"./des/des":356,"./des/ede":357,"./des/utils":358,dup:85}],354:[function(e,t,r){arguments[4][86][0].apply(r,arguments)},{dup:86,inherits:399,"minimalistic-assert":403}],355:[function(e,t,r){arguments[4][87][0].apply(r,arguments)},{dup:87,"minimalistic-assert":403}],356:[function(e,t,r){arguments[4][88][0].apply(r,arguments)},{"../des":353,dup:88,inherits:399,"minimalistic-assert":403}],357:[function(e,t,r){arguments[4][89][0].apply(r,arguments)},{"../des":353,dup:89,inherits:399,"minimalistic-assert":403}],358:[function(e,t,r){arguments[4][90][0].apply(r,arguments)},{dup:90}],359:[function(e,t,r){arguments[4][91][0].apply(r,arguments)},{"./lib/dh":360,"./lib/generatePrime":361,"./lib/primes.json":362,buffer:73,dup:91}],360:[function(e,t,r){arguments[4][92][0].apply(r,arguments)},{"./generatePrime":361,"bn.js":315,buffer:73,dup:92,"miller-rabin":402,randombytes:424}],361:[function(e,t,r){arguments[4][93][0].apply(r,arguments)},{"bn.js":315,dup:93,"miller-rabin":402,randombytes:424}],362:[function(e,t,r){arguments[4][94][0].apply(r,arguments)},{dup:94}],363:[function(e,t,r){arguments[4][95][0].apply(r,arguments)},{"../package.json":378,"./elliptic/curve":366,"./elliptic/curves":369,"./elliptic/ec":370,"./elliptic/eddsa":373,"./elliptic/utils":377,brorand:316,dup:95}],364:[function(e,t,r){arguments[4][96][0].apply(r,arguments)},{"../../elliptic":363,"bn.js":315,dup:96}],365:[function(e,t,r){arguments[4][97][0].apply(r,arguments)},{"../../elliptic":363,"../curve":366,"bn.js":315,dup:97,inherits:399}],366:[function(e,t,r){arguments[4][98][0].apply(r,arguments)},{"./base":364,"./edwards":365,"./mont":367,"./short":368,dup:98}],367:[function(e,t,r){arguments[4][99][0].apply(r,arguments)},{"../../elliptic":363,"../curve":366,"bn.js":315,dup:99,inherits:399}],368:[function(e,t,r){arguments[4][100][0].apply(r,arguments)},{"../../elliptic":363,"../curve":366,"bn.js":315,dup:100,inherits:399}],369:[function(e,t,r){arguments[4][101][0].apply(r,arguments)},{"../elliptic":363,"./precomputed/secp256k1":376,dup:101,"hash.js":386}],370:[function(e,t,r){arguments[4][102][0].apply(r,arguments)},{"../../elliptic":363,"./key":371,"./signature":372,"bn.js":315,dup:102,"hmac-drbg":398}],371:[function(e,t,r){arguments[4][103][0].apply(r,arguments)},{"../../elliptic":363,"bn.js":315,dup:103}],372:[function(e,t,r){arguments[4][104][0].apply(r,arguments)},{"../../elliptic":363,"bn.js":315,dup:104}],373:[function(e,t,r){arguments[4][105][0].apply(r,arguments)},{"../../elliptic":363,"./key":374,"./signature":375,dup:105,"hash.js":386}],374:[function(e,t,r){arguments[4][106][0].apply(r,arguments)},{"../../elliptic":363,dup:106}],375:[function(e,t,r){arguments[4][107][0].apply(r,arguments)},{"../../elliptic":363,"bn.js":315,dup:107}],376:[function(e,t,r){arguments[4][108][0].apply(r,arguments)},{dup:108}],377:[function(e,t,r){arguments[4][109][0].apply(r,arguments)},{"bn.js":315,dup:109,"minimalistic-assert":403,"minimalistic-crypto-utils":404}],378:[function(e,t){t.exports={_from:"elliptic@^6.4.0",_id:"elliptic@6.4.1",_inBundle:!1,_integrity:"sha512-BsXLz5sqX8OHcsh7CqBMztyXARmGQ3LWPtGjJi6DiJHq5C/qvi9P3OqgswKSDftbu8+IoI/QDTAm2fFnQ9SZSQ==",_location:"/elliptic",_phantomChildren:{},_requested:{type:"range",registry:!0,raw:"elliptic@^6.4.0",name:"elliptic",escapedName:"elliptic",rawSpec:"^6.4.0",saveSpec:null,fetchSpec:"^6.4.0"},_requiredBy:["/","/browserify-sign","/create-ecdh","/eth-lib","/web3-eth-accounts/eth-lib"],_resolved:"https://registry.npmjs.org/elliptic/-/elliptic-6.4.1.tgz",_shasum:"c2d0b7776911b86722c632c3c06c60f2f819939a",_spec:"elliptic@^6.4.0",_where:"/Users/ChenYu/Documents/cryptape/projects/nervos/packages/nervos-signer",author:{name:"Fedor Indutny",email:"fedor@indutny.com"},bugs:{url:"https://github.com/indutny/elliptic/issues"},bundleDependencies:!1,dependencies:{"bn.js":"^4.4.0",brorand:"^1.0.1","hash.js":"^1.0.0","hmac-drbg":"^1.0.0",inherits:"^2.0.1","minimalistic-assert":"^1.0.0","minimalistic-crypto-utils":"^1.0.0"},deprecated:!1,description:"EC cryptography",devDependencies:{brfs:"^1.4.3",coveralls:"^2.11.3",grunt:"^0.4.5","grunt-browserify":"^5.0.0","grunt-cli":"^1.2.0","grunt-contrib-connect":"^1.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^1.0.1","grunt-mocha-istanbul":"^3.0.1","grunt-saucelabs":"^8.6.2",istanbul:"^0.4.2",jscs:"^2.9.0",jshint:"^2.6.0",mocha:"^2.1.0"},files:["lib"],homepage:"https://github.com/indutny/elliptic",keywords:["EC","Elliptic","curve","Cryptography"],license:"MIT",main:"lib/elliptic.js",name:"elliptic",repository:{type:"git",url:"git+ssh://git@github.com/indutny/elliptic.git"},scripts:{jscs:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",jshint:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",lint:"npm run jscs && npm run jshint",test:"npm run lint && npm run unit",unit:"istanbul test _mocha --reporter=spec test/index.js",version:"grunt dist && git add dist/"},version:"6.4.1"}},{}],379:[function(e,t,r){arguments[4][113][0].apply(r,arguments)},{dup:113}],380:[function(e,t,r){arguments[4][114][0].apply(r,arguments)},{"bn.js":381,dup:114,"number-to-bn":406}],381:[function(e,t,r){arguments[4][115][0].apply(r,arguments)},{dup:115}],382:[function(e,t,r){arguments[4][116][0].apply(r,arguments)},{dup:116}],383:[function(e,t,r){arguments[4][118][0].apply(r,arguments)},{dup:118,"md5.js":401,"safe-buffer":430}],384:[function(require,module,exports){var _Mathabs=Math.abs,_MathLN=Math.LN2,_Mathlog=Math.log,_Mathfloor4=Math.floor,_Mathsqrt=Math.sqrt,_Mathpow3=Math.pow,_Mathmax7=Math.max,_Mathmin5=Math.min,_StringfromCharCode3=String.fromCharCode,_Mathround4=Math.round;(function(global,Buffer){var _Stringprototype=String.prototype,_Mathexp=Math.exp,$jscomp={scope:{},getGlobal:function(e){return"undefined"!=typeof window&&window===e?e:"undefined"==typeof global?e:global}};$jscomp.global=$jscomp.getGlobal(this),$jscomp.initSymbol=function(){$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol),$jscomp.initSymbol=function(){}},$jscomp.symbolCounter_=0,$jscomp.Symbol=function(e){return"jscomp_symbol_"+e+$jscomp.symbolCounter_++},$jscomp.initSymbolIterator=function(){$jscomp.initSymbol(),$jscomp.global.Symbol.iterator||($jscomp.global.Symbol.iterator=$jscomp.global.Symbol("iterator")),$jscomp.initSymbolIterator=function(){}},$jscomp.makeIterator=function(e){$jscomp.initSymbolIterator(),$jscomp.initSymbol(),$jscomp.initSymbolIterator();var t=e[Symbol.iterator];if(t)return t.call(e);var r=0;return{next:function(){return rt;)--r in this?this[--e]=this[r]:delete this[e];return this},$jscomp.array.copyWithin$install=function(){$jscomp.array.installHelper_("copyWithin",$jscomp.array.copyWithin)},$jscomp.array.fill=function(e,t,r){var a=this.length||0;for(0>t&&(t=_Mathmax7(0,a+t)),(null==r||r>a)&&(r=a),r=+r,0>r&&(r=_Mathmax7(0,a+r)),t=+(t||0);t>>0,0===e)return 32;var t=0;return 0==(4294901760&e)&&(e<<=16,t+=16),0==(4278190080&e)&&(e<<=8,t+=8),0==(4026531840&e)&&(e<<=4,t+=4),0==(3221225472&e)&&(e<<=2,t+=2),0==(2147483648&e)&&t++,t},$jscomp.math.imul=function(e,t){e=+e,t=+t;var r=65535&e,n=65535&t;return 0|r*n+((65535&e>>>16)*n+r*(65535&t>>>16)<<16>>>0)},$jscomp.math.sign=function(e){return e=+e,0===e||isNaN(e)?e:0t&&-.25t&&-.25e?-t:t},$jscomp.math.acosh=function(e){return e=+e,_Mathlog(e+_Mathsqrt(e*e-1))},$jscomp.math.asinh=function(e){if(e=+e,0===e)return e;var t=_Mathlog(_Mathabs(e)+_Mathsqrt(e*e+1));return 0>e?-t:t},$jscomp.math.atanh=function(e){return e=+e,($jscomp.math.log1p(e)-$jscomp.math.log1p(-e))/2},$jscomp.math.hypot=function(t,r){t=+t,r=+r;var n=_Mathmax7(_Mathabs(t),_Mathabs(r)),s,i,o;for(s=2;sn){for(t/=n,r/=n,o=t*t+r*r,s=2;se?-t:t},$jscomp.math.cbrt=function(e){if(0===e)return e;e=+e;var t=_Mathpow3(_Mathabs(e),1/3);return 0>e?-t:t},$jscomp.number=$jscomp.number||{},$jscomp.number.isFinite=function(e){return!("number"!=typeof e)&&!isNaN(e)&&1/0!==e&&-Infinity!==e},$jscomp.number.isInteger=function(e){return!!$jscomp.number.isFinite(e)&&e===_Mathfloor4(e)},$jscomp.number.isNaN=function(e){return"number"==typeof e&&isNaN(e)},$jscomp.number.isSafeInteger=function(e){return $jscomp.number.isInteger(e)&&_Mathabs(e)<=$jscomp.number.MAX_SAFE_INTEGER},$jscomp.number.EPSILON=function(){return 2.220446049250313e-16}(),$jscomp.number.MAX_SAFE_INTEGER=function(){return 9007199254740991}(),$jscomp.number.MIN_SAFE_INTEGER=function(){return-9007199254740991}(),$jscomp.object=$jscomp.object||{},$jscomp.object.assign=function(t){for(var r=1,a;rr||1114111=r?e+=_StringfromCharCode3(r):(r-=65536,e+=_StringfromCharCode3(55296|1023&r>>>10),e+=_StringfromCharCode3(56320|1023&r))}return e},$jscomp.string.repeat=function(e){var t=$jscomp.checkStringArgs(this,null,"repeat");if(0>e||1342177279>>=1)&&(t+=t);return r},$jscomp.string.repeat$install=function(){_Stringprototype.repeat||(_Stringprototype.repeat=$jscomp.string.repeat)},$jscomp.string.codePointAt=function(e){var t=$jscomp.checkStringArgs(this,null,"codePointAt"),r=t.length;if(e=+e||0,0<=e&&en||56319e||57343=i},$jscomp.string.startsWith$install=function(){_Stringprototype.startsWith||(_Stringprototype.startsWith=$jscomp.string.startsWith)},$jscomp.string.endsWith=function(t,r){var n=$jscomp.checkStringArgs(this,t,"endsWith");t+="",void 0===r&&(r=n.length);for(var s=_Mathmax7(0,_Mathmin5(0|r,n.length)),i=t.length;0=i},$jscomp.string.endsWith$install=function(){_Stringprototype.endsWith||(_Stringprototype.endsWith=$jscomp.string.endsWith)};var COMPILED=!0,goog=goog||{};goog.global=this,goog.isDef=function(e){return void 0!==e},goog.exportPath_=function(e,t,r){e=e.split("."),r=r||goog.global,e[0]in r||!r.execScript||r.execScript("var "+e[0]);for(var n;e.length&&(n=e.shift());)!e.length&&goog.isDef(t)?r[n]=t:r=r[n]?r[n]:r[n]={}},goog.define=function(e,t){!0,goog.exportPath_(e,t)},goog.DEBUG=!0,goog.LOCALE="en",goog.TRUSTED_SITE=!0,goog.STRICT_MODE_COMPATIBLE=!1,goog.DISALLOW_TEST_ONLY_CODE=!goog.DEBUG,goog.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING=!1,goog.provide=function(e){goog.constructNamespace_(e)},goog.constructNamespace_=function(e,t){goog.exportPath_(e,t)},goog.VALID_MODULE_RE_=/^[a-zA-Z_$][a-zA-Z0-9._$]*$/,goog.module=function(e){if(!goog.isString(e)||!e||-1==e.search(goog.VALID_MODULE_RE_))throw Error("Invalid module identifier");if(!goog.isInModuleLoader_())throw Error("Module "+e+" has been loaded incorrectly.");if(goog.moduleLoaderState_.moduleName)throw Error("goog.module may only be called once per module.");goog.moduleLoaderState_.moduleName=e},goog.module.get=function(e){return goog.module.getInternal_(e)},goog.module.getInternal_=function(){},goog.moduleLoaderState_=null,goog.isInModuleLoader_=function(){return null!=goog.moduleLoaderState_},goog.module.declareLegacyNamespace=function(){goog.moduleLoaderState_.declareLegacyNamespace=!0},goog.setTestOnly=function(e){if(goog.DISALLOW_TEST_ONLY_CODE)throw e=e||"",Error("Importing test-only code into non-debug environment"+(e?": "+e:"."))},goog.forwardDeclare=function(){},!0,goog.getObjectByName=function(t,r){for(var a=t.split("."),n=r||goog.global,s;s=a.shift();)if(goog.isDefAndNotNull(n[s]))n=n[s];else return null;return n},goog.globalize=function(e,t){var r=t||goog.global,a;for(a in e)r[a]=e[a]},goog.addDependency=function(t,r,n,s){if(goog.DEPENDENCIES_ENABLED){var i;t=t.replace(/\\/g,"/");for(var o=goog.dependencies_,p=0;i=r[p];p++)o.nameToPath[i]=t,o.pathIsModule[t]=!!s;for(s=0;r=n[s];s++)t in o.requires||(o.requires[t]={}),o.requires[t][r]=!0}},goog.ENABLE_DEBUG_LOADER=!0,goog.logToConsole_=function(e){goog.global.console&&goog.global.console.error(e)},goog.require=function(){},goog.basePath="",goog.nullFunction=function(){},goog.abstractMethod=function(){throw Error("unimplemented abstract method")},goog.addSingletonGetter=function(e){e.getInstance=function(){return e.instance_?e.instance_:(goog.DEBUG&&(goog.instantiatedSingletons_[goog.instantiatedSingletons_.length]=e),e.instance_=new e)}},goog.instantiatedSingletons_=[],goog.LOAD_MODULE_USING_EVAL=!0,goog.SEAL_MODULE_EXPORTS=goog.DEBUG,goog.loadedModules_={},goog.DEPENDENCIES_ENABLED=!1,goog.DEPENDENCIES_ENABLED&&(goog.dependencies_={pathIsModule:{},nameToPath:{},requires:{},visited:{},written:{},deferred:{}},goog.inHtmlDocument_=function(){var e=goog.global.document;return null!=e&&"write"in e},goog.findBasePath_=function(){if(goog.isDef(goog.global.CLOSURE_BASE_PATH))goog.basePath=goog.global.CLOSURE_BASE_PATH;else if(goog.inHtmlDocument_())for(var e=goog.global.document.getElementsByTagName("SCRIPT"),t=e.length-1;0<=t;--t){var r=e[t].src,a=r.lastIndexOf("?"),a=-1==a?r.length:a;if("base.js"==r.substr(a-7,7)){goog.basePath=r.substr(0,a-7);break}}},goog.importScript_=function(e,t){(goog.global.CLOSURE_IMPORT_SCRIPT||goog.writeScriptTag_)(e,t)&&(goog.dependencies_.written[e]=!0)},goog.IS_OLD_IE_=!goog.global.atob&&goog.global.document&&goog.global.document.all,goog.importModule_=function(e){goog.importScript_("","goog.retrieveAndExecModule_(\""+e+"\");")&&(goog.dependencies_.written[e]=!0)},goog.queuedModules_=[],goog.wrapModule_=function(e,t){return goog.LOAD_MODULE_USING_EVAL&&goog.isDef(goog.global.JSON)?"goog.loadModule("+goog.global.JSON.stringify(t+"\n//# sourceURL="+e+"\n")+");":"goog.loadModule(function(exports) {\"use strict\";"+t+"\n;return exports});\n//# sourceURL="+e+"\n"},goog.loadQueuedModules_=function(){var e=goog.queuedModules_.length;if(0")},goog.appendScriptSrcNode_=function(e){var t=goog.global.document,r=t.createElement("script");r.type="text/javascript",r.src=e,r.defer=!1,r.async=!1,t.head.appendChild(r)},goog.writeScriptTag_=function(e,t){if(goog.inHtmlDocument_()){var r=goog.global.document;if(!goog.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING&&"complete"==r.readyState){if(/\bdeps.js$/.test(e))return!1;throw Error("Cannot write \""+e+"\" after document load")}var a=goog.IS_OLD_IE_;return void 0===t?a?(a=" onreadystatechange='goog.onScriptLoad_(this, "+ ++goog.lastNonModuleScriptIndex_+")' ",r.write("")):goog.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING?goog.appendScriptSrcNode_(e):goog.writeScriptSrcNode_(e):r.write(""),!0}return!1},goog.lastNonModuleScriptIndex_=0,goog.onScriptLoad_=function(e,t){return"complete"==e.readyState&&goog.lastNonModuleScriptIndex_==t&&goog.loadQueuedModules_(),!0},goog.writeScripts_=function(t){function r(e){if(!(e in i.written||e in i.visited)){if(i.visited[e]=!0,e in i.requires)for(var t in i.requires[e])if(!goog.isProvided_(t))if(t in i.nameToPath)r(i.nameToPath[t]);else throw Error("Undefined nameToPath for "+t);e in s||(s[e]=!0,n.push(e))}}var n=[],s={},i=goog.dependencies_;for(r(t),t=0;t>>0),goog.uidCounter_=0,goog.getHashCode=goog.getUid,goog.removeHashCode=goog.removeUid,goog.cloneObject=function(e){var t=goog.typeOf(e);if("object"==t||"array"==t){if(e.clone)return e.clone();var t="array"==t?[]:{},r;for(r in e)t[r]=goog.cloneObject(e[r]);return t}return e},goog.bindNative_=function(e){return e.call.apply(e.bind,arguments)},goog.bindJs_=function(e,t){if(!e)throw Error();if(2=e||"\x80"<=e&&"\uFFFD">=e},goog.string.stripNewlines=function(e){return e.replace(/(\r\n|\r|\n)+/g," ")},goog.string.canonicalizeNewlines=function(e){return e.replace(/(\r\n|\r|\n)/g,"\n")},goog.string.normalizeWhitespace=function(e){return e.replace(/\xa0|\s/g," ")},goog.string.normalizeSpaces=function(e){return e.replace(/\xa0|[ \t]+/g," ")},goog.string.collapseBreakingSpaces=function(e){return e.replace(/[\t\r\n ]+/g," ").replace(/^[\t\r\n ]+|[\t\r\n ]+$/g,"")},goog.string.trim=goog.TRUSTED_SITE&&_Stringprototype.trim?function(e){return e.trim()}:function(e){return e.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},goog.string.trimLeft=function(e){return e.replace(/^[\s\xa0]+/,"")},goog.string.trimRight=function(e){return e.replace(/[\s\xa0]+$/,"")},goog.string.caseInsensitiveCompare=function(e,t){var r=(e+"").toLowerCase(),a=(t+"").toLowerCase();return r":"
")},goog.string.htmlEscape=function(e,t){if(t)e=e.replace(goog.string.AMP_RE_,"&").replace(goog.string.LT_RE_,"<").replace(goog.string.GT_RE_,">").replace(goog.string.QUOT_RE_,""").replace(goog.string.SINGLE_QUOTE_RE_,"'").replace(goog.string.NULL_RE_,"�"),goog.string.DETECT_DOUBLE_ESCAPING&&(e=e.replace(goog.string.E_RE_,"e"));else{if(!goog.string.ALL_RE_.test(e))return e;-1!=e.indexOf("&")&&(e=e.replace(goog.string.AMP_RE_,"&")),-1!=e.indexOf("<")&&(e=e.replace(goog.string.LT_RE_,"<")),-1!=e.indexOf(">")&&(e=e.replace(goog.string.GT_RE_,">")),-1!=e.indexOf("\"")&&(e=e.replace(goog.string.QUOT_RE_,""")),-1!=e.indexOf("'")&&(e=e.replace(goog.string.SINGLE_QUOTE_RE_,"'")),-1!=e.indexOf("\0")&&(e=e.replace(goog.string.NULL_RE_,"�")),goog.string.DETECT_DOUBLE_ESCAPING&&-1!=e.indexOf("e")&&(e=e.replace(goog.string.E_RE_,"e"))}return e},goog.string.AMP_RE_=/&/g,goog.string.LT_RE_=//g,goog.string.QUOT_RE_=/"/g,goog.string.SINGLE_QUOTE_RE_=/'/g,goog.string.NULL_RE_=/\x00/g,goog.string.E_RE_=/e/g,goog.string.ALL_RE_=goog.string.DETECT_DOUBLE_ESCAPING?/[\x00&<>"'e]/:/[\x00&<>"']/,goog.string.unescapeEntities=function(e){return goog.string.contains(e,"&")?!goog.string.FORCE_NON_DOM_HTML_UNESCAPING&&"document"in goog.global?goog.string.unescapeEntitiesUsingDom_(e):goog.string.unescapePureXmlEntities_(e):e},goog.string.unescapeEntitiesWithDocument=function(e,t){return goog.string.contains(e,"&")?goog.string.unescapeEntitiesUsingDom_(e,t):e},goog.string.unescapeEntitiesUsingDom_=function(e,t){var r={"&":"&","<":"<",">":">",""":"\""},n;return n=t?t.createElement("div"):goog.global.document.createElement("div"),e.replace(goog.string.HTML_ENTITY_PATTERN_,function(e,t){var a=r[e];if(a)return a;if("#"==t.charAt(0)){var s=+("0"+t.substr(1));isNaN(s)||(a=_StringfromCharCode3(s))}return a||(n.innerHTML=e+" ",a=n.firstChild.nodeValue.slice(0,-1)),r[e]=a})},goog.string.unescapePureXmlEntities_=function(e){return e.replace(/&([^;]+);/g,function(e,t){switch(t){case"amp":return"&";case"lt":return"<";case"gt":return">";case"quot":return"\"";default:if("#"==t.charAt(0)){var r=+("0"+t.substr(1));if(!isNaN(r))return _StringfromCharCode3(r)}return e;}})},goog.string.HTML_ENTITY_PATTERN_=/&([^;\s<&]+);?/g,goog.string.whitespaceEscape=function(e,t){return goog.string.newLineToBr(e.replace(/ /g,"  "),t)},goog.string.preserveSpaces=function(e){return e.replace(/(^|[\n ]) /g,"$1"+goog.string.Unicode.NBSP)},goog.string.stripQuotes=function(t,r){for(var a=r.length,n=0,s;nt&&(e=e.substring(0,t-3)+"..."),r&&(e=goog.string.htmlEscape(e)),e},goog.string.truncateMiddle=function(t,r,n,s){if(n&&(t=goog.string.unescapeEntities(t)),s&&t.length>r){s>r&&(s=r);var i=t.length-s;t=t.substring(0,r-s)+"..."+t.substring(i)}else t.length>r&&(s=_Mathfloor4(r/2),i=t.length-s,t=t.substring(0,s+r%2)+"..."+t.substring(i));return n&&(t=goog.string.htmlEscape(t)),t},goog.string.specialEscapeChars_={"":"\\0","":"\\b"," ":"\\f","\n":"\\n","\r":"\\r"," ":"\\t"," ":"\\x0B",'"':"\\\"","\\":"\\\\","<":"<"},goog.string.jsEscapeCache_={"'":"\\'"},goog.string.quote=function(t){t+="";for(var r=["\""],n=0;ni?s:goog.string.escapeChar(s))}return r.push("\""),r.join("")},goog.string.escapeString=function(e){for(var t=[],r=0;rt?r=e:(256>t?(r="\\x",16>t||256t&&(r+="0")),r+=t.toString(16).toUpperCase()),goog.string.jsEscapeCache_[e]=r},goog.string.contains=function(e,t){return-1!=e.indexOf(t)},goog.string.caseInsensitiveContains=function(e,t){return goog.string.contains(e.toLowerCase(),t.toLowerCase())},goog.string.countOf=function(e,t){return e&&t?e.split(t).length-1:0},goog.string.removeAt=function(e,t,r){var a=e;return 0<=t&&tt?1:0},goog.string.hashCode=function(e){for(var t=0,r=0;r>>0;return t},goog.string.uniqueStringCounter_=0|2147483648*Math.random(),goog.string.createUniqueString=function(){return"goog_"+goog.string.uniqueStringCounter_++},goog.string.toNumber=function(e){var t=+e;return 0==t&&goog.string.isEmptyOrWhitespace(e)?NaN:t},goog.string.isLowerCamelCase=function(e){return /^[a-z]+([A-Z][a-z]*)*$/.test(e)},goog.string.isUpperCamelCase=function(e){return /^([A-Z][a-z]*)+$/.test(e)},goog.string.toCamelCase=function(e){return(e+"").replace(/\-([a-z])/g,function(e,t){return t.toUpperCase()})},goog.string.toSelectorCase=function(e){return(e+"").replace(/([A-Z])/g,"-$1").toLowerCase()},goog.string.toTitleCase=function(e,t){var r=goog.isString(t)?goog.string.regExpEscape(t):"\\s";return e.replace(new RegExp("(^"+(r?"|["+r+"]+":"")+")([a-z])","g"),function(e,t,r){return t+r.toUpperCase()})},goog.string.capitalize=function(e){return(e.charAt(0)+"").toUpperCase()+(e.substr(1)+"").toLowerCase()},goog.string.parseInt=function(e){return isFinite(e)&&(e+=""),goog.isString(e)?/^\s*-?0x/i.test(e)?parseInt(e,16):parseInt(e,10):NaN},goog.string.splitLimit=function(e,t,r){e=e.split(t);for(var n=[];0r?_Mathmax7(0,e.length+r):r,goog.isString(e))return goog.isString(t)&&1==t.length?e.indexOf(t,r):-1;for(;rr&&(r=_Mathmax7(0,e.length+r)),goog.isString(e))return goog.isString(t)&&1==t.length?e.lastIndexOf(t,r):-1;for(;0<=r;r--)if(r in e&&e[r]===t)return r;return-1},goog.array.forEach=goog.NATIVE_ARRAY_PROTOTYPES&&(goog.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.forEach)?function(e,t,r){goog.asserts.assert(null!=e.length),Array.prototype.forEach.call(e,t,r)}:function(t,r,a){for(var n=t.length,s=goog.isString(t)?t.split(""):t,e=0;et?null:goog.isString(e)?e.charAt(t):e[t]},goog.array.findIndex=function(t,r,a){for(var n=t.length,s=goog.isString(t)?t.split(""):t,e=0;et?null:goog.isString(e)?e.charAt(t):e[t]},goog.array.findIndexRight=function(t,r,a){for(var n=t.length,s=goog.isString(t)?t.split(""):t,n=n-1;0<=n;n--)if(n in s&&r.call(a,s[n],n,t))return n;return-1},goog.array.contains=function(e,t){return 0<=goog.array.indexOf(e,t)},goog.array.isEmpty=function(e){return 0==e.length},goog.array.clear=function(e){if(!goog.isArray(e))for(var t=e.length-1;0<=t;t--)delete e[t];e.length=0},goog.array.insert=function(e,t){goog.array.contains(e,t)||e.push(t)},goog.array.insertAt=function(e,t,r){goog.array.splice(e,r,0,t)},goog.array.insertArrayAt=function(e,t,r){goog.partial(goog.array.splice,e,r,0).apply(null,t)},goog.array.insertBefore=function(e,t,r){var a;2==arguments.length||0>(a=goog.array.indexOf(e,r))?e.push(t):goog.array.insertAt(e,t,a)},goog.array.remove=function(e,t){var r=goog.array.indexOf(e,t),a;return(a=0<=r)&&goog.array.removeAt(e,r),a},goog.array.removeAt=function(e,t){return goog.asserts.assert(null!=e.length),1==Array.prototype.splice.call(e,t,1).length},goog.array.removeIf=function(e,t,r){return t=goog.array.findIndex(e,t,r),!!(0<=t)&&(goog.array.removeAt(e,t),!0)},goog.array.removeAllIf=function(t,r,a){var n=0;return goog.array.forEachRight(t,function(s,e){r.call(a,s,e,t)&&goog.array.removeAt(t,e)&&n++}),n},goog.array.concat=function(){return Array.prototype.concat.apply(Array.prototype,arguments)},goog.array.join=function(){return Array.prototype.concat.apply(Array.prototype,arguments)},goog.array.toArray=function(e){var t=e.length;if(0=arguments.length?Array.prototype.slice.call(e,t):Array.prototype.slice.call(e,t,r)},goog.array.removeDuplicates=function(t,r,a){r=r||t;var n=function(e){return goog.isObject(e)?"o"+goog.getUid(e):(typeof e).charAt(0)+e};a=a||n;for(var n={},s=0,i=0;i>1,p;p=a?r.call(s,t[d],d,t):r(n,t[d]),0t?1:er)&&(goog.array.insertAt(e,t,-(r+1)),!0)},goog.array.binaryRemove=function(e,t,r){return t=goog.array.binarySearch(e,t,r),!!(0<=t)&&goog.array.removeAt(e,t)},goog.array.bucket=function(t,r,a){for(var n={},s=0;sn*(o-i))return[];if(0o;t+=n)s.push(t);return s},goog.array.repeat=function(e,t){for(var r=[],a=0;at&&Array.prototype.push.apply(e,e.splice(0,-t))),e},goog.array.moveItem=function(e,t,r){goog.asserts.assert(0<=t&&t>=8;r[a++]=s}return r},goog.crypt.byteArrayToString=function(e){if(8192>=e.length)return _StringfromCharCode3.apply(null,e);for(var t="",r=0;rs?r[a++]=s:(2048>s?r[a++]=192|s>>6:(55296==(64512&s)&&n+1>18,r[a++]=128|63&s>>12):r[a++]=224|s>>12,r[a++]=128|63&s>>6),r[a++]=128|63&s);return r},goog.crypt.utf8ByteArrayToString=function(t){for(var r=[],a=0,n=0,s;as)r[n++]=_StringfromCharCode3(s);else if(191s){var i=t[a++];r[n++]=_StringfromCharCode3((31&s)<<6|63&i)}else if(239s){var i=t[a++],o=t[a++],p=t[a++],s=((7&s)<<18|(63&i)<<12|(63&o)<<6|63&p)-65536;r[n++]=_StringfromCharCode3(55296+(s>>10)),r[n++]=_StringfromCharCode3(56320+(1023&s))}else i=t[a++],o=t[a++],r[n++]=_StringfromCharCode3((15&s)<<12|(63&i)<<6|63&o);return r.join("")},goog.crypt.xorByteArray=function(e,t){goog.asserts.assert(e.length==t.length,"XOR array lengths must match");for(var r=[],a=0;aparseFloat(e))?t+"":e},goog.userAgent.getVersionRegexResult_=function(){var e=goog.userAgent.getUserAgentString();return goog.userAgent.GECKO?/rv\:([^\);]+)(\)|;)/.exec(e):goog.userAgent.EDGE?/Edge\/([\d\.]+)/.exec(e):goog.userAgent.IE?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(e):goog.userAgent.WEBKIT?/WebKit\/(\S+)/.exec(e):void 0},goog.userAgent.getDocumentMode_=function(){var e=goog.global.document;return e?e.documentMode:void 0},goog.userAgent.VERSION=goog.userAgent.determineVersion_(),goog.userAgent.compare=function(e,t){return goog.string.compareVersions(e,t)},goog.userAgent.isVersionOrHigherCache_={},goog.userAgent.isVersionOrHigher=function(e){return goog.userAgent.ASSUME_ANY_VERSION||goog.userAgent.isVersionOrHigherCache_[e]||(goog.userAgent.isVersionOrHigherCache_[e]=0<=goog.string.compareVersions(goog.userAgent.VERSION,e))},goog.userAgent.isVersion=goog.userAgent.isVersionOrHigher,goog.userAgent.isDocumentModeOrHigher=function(e){return+goog.userAgent.DOCUMENT_MODE>=e},goog.userAgent.isDocumentMode=goog.userAgent.isDocumentModeOrHigher,goog.userAgent.DOCUMENT_MODE=function(){var e=goog.global.document,t=goog.userAgent.getDocumentMode_();return e&&goog.userAgent.IE?t||("CSS1Compat"==e.compatMode?parseInt(goog.userAgent.VERSION,10):5):void 0}(),goog.userAgent.product={},goog.userAgent.product.ASSUME_FIREFOX=!1,goog.userAgent.product.ASSUME_IPHONE=!1,goog.userAgent.product.ASSUME_IPAD=!1,goog.userAgent.product.ASSUME_ANDROID=!1,goog.userAgent.product.ASSUME_CHROME=!1,goog.userAgent.product.ASSUME_SAFARI=!1,goog.userAgent.product.PRODUCT_KNOWN_=goog.userAgent.ASSUME_IE||goog.userAgent.ASSUME_EDGE||goog.userAgent.ASSUME_OPERA||goog.userAgent.product.ASSUME_FIREFOX||goog.userAgent.product.ASSUME_IPHONE||goog.userAgent.product.ASSUME_IPAD||goog.userAgent.product.ASSUME_ANDROID||goog.userAgent.product.ASSUME_CHROME||goog.userAgent.product.ASSUME_SAFARI,goog.userAgent.product.OPERA=goog.userAgent.OPERA,goog.userAgent.product.IE=goog.userAgent.IE,goog.userAgent.product.EDGE=goog.userAgent.EDGE,goog.userAgent.product.FIREFOX=goog.userAgent.product.PRODUCT_KNOWN_?goog.userAgent.product.ASSUME_FIREFOX:goog.labs.userAgent.browser.isFirefox(),goog.userAgent.product.isIphoneOrIpod_=function(){return goog.labs.userAgent.platform.isIphone()||goog.labs.userAgent.platform.isIpod()},goog.userAgent.product.IPHONE=goog.userAgent.product.PRODUCT_KNOWN_?goog.userAgent.product.ASSUME_IPHONE:goog.userAgent.product.isIphoneOrIpod_(),goog.userAgent.product.IPAD=goog.userAgent.product.PRODUCT_KNOWN_?goog.userAgent.product.ASSUME_IPAD:goog.labs.userAgent.platform.isIpad(),goog.userAgent.product.ANDROID=goog.userAgent.product.PRODUCT_KNOWN_?goog.userAgent.product.ASSUME_ANDROID:goog.labs.userAgent.browser.isAndroidBrowser(),goog.userAgent.product.CHROME=goog.userAgent.product.PRODUCT_KNOWN_?goog.userAgent.product.ASSUME_CHROME:goog.labs.userAgent.browser.isChrome(),goog.userAgent.product.isSafariDesktop_=function(){return goog.labs.userAgent.browser.isSafari()&&!goog.labs.userAgent.platform.isIos()},goog.userAgent.product.SAFARI=goog.userAgent.product.PRODUCT_KNOWN_?goog.userAgent.product.ASSUME_SAFARI:goog.userAgent.product.isSafariDesktop_(),goog.crypt.base64={},goog.crypt.base64.byteToCharMap_=null,goog.crypt.base64.charToByteMap_=null,goog.crypt.base64.byteToCharMapWebSafe_=null,goog.crypt.base64.ENCODED_VALS_BASE="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",goog.crypt.base64.ENCODED_VALS=goog.crypt.base64.ENCODED_VALS_BASE+"+/=",goog.crypt.base64.ENCODED_VALS_WEBSAFE=goog.crypt.base64.ENCODED_VALS_BASE+"-_.",goog.crypt.base64.ASSUME_NATIVE_SUPPORT_=goog.userAgent.GECKO||goog.userAgent.WEBKIT&&!goog.userAgent.product.SAFARI||goog.userAgent.OPERA,goog.crypt.base64.HAS_NATIVE_ENCODE_=goog.crypt.base64.ASSUME_NATIVE_SUPPORT_||"function"==typeof goog.global.btoa,goog.crypt.base64.HAS_NATIVE_DECODE_=goog.crypt.base64.ASSUME_NATIVE_SUPPORT_||!goog.userAgent.product.SAFARI&&!goog.userAgent.IE&&"function"==typeof goog.global.atob,goog.crypt.base64.encodeByteArray=function(t,r){goog.asserts.assert(goog.isArrayLike(t),"encodeByteArray takes an array as a parameter"),goog.crypt.base64.init_();for(var a=r?goog.crypt.base64.byteToCharMapWebSafe_:goog.crypt.base64.byteToCharMap_,n=[],s=0;s>2,i=(3&i)<<4|d>>4,d=(15&d)<<2|u>>6,u=63&u;c||(u=64,o||(d=64)),n.push(a[y],a[i],a[d],a[u])}return n.join("")},goog.crypt.base64.encodeString=function(e,t){return goog.crypt.base64.HAS_NATIVE_ENCODE_&&!t?goog.global.btoa(e):goog.crypt.base64.encodeByteArray(goog.crypt.stringToByteArray(e),t)},goog.crypt.base64.decodeString=function(e,t){if(goog.crypt.base64.HAS_NATIVE_DECODE_&&!t)return goog.global.atob(e);var r="";return goog.crypt.base64.decodeStringInternal_(e,function(e){r+=_StringfromCharCode3(e)}),r},goog.crypt.base64.decodeStringToByteArray=function(e){var t=[];return goog.crypt.base64.decodeStringInternal_(e,function(e){t.push(e)}),t},goog.crypt.base64.decodeStringToUint8Array=function(e){goog.asserts.assert(!goog.userAgent.IE||goog.userAgent.isVersionOrHigher("10"),"Browser does not support typed arrays");var t=new Uint8Array(Math.ceil(3*e.length/4)),r=0;return goog.crypt.base64.decodeStringInternal_(e,function(e){t[r++]=e}),t.subarray(0,r)},goog.crypt.base64.decodeStringInternal_=function(t,r){function a(r){for(;n>4),64!=i&&(r(240&e<<4|i>>2),64!=o&&r(192&i<<6|o))}},goog.crypt.base64.init_=function(){if(!goog.crypt.base64.byteToCharMap_){goog.crypt.base64.byteToCharMap_={},goog.crypt.base64.charToByteMap_={},goog.crypt.base64.byteToCharMapWebSafe_={};for(var e=0;e=goog.crypt.base64.ENCODED_VALS_BASE.length&&(goog.crypt.base64.charToByteMap_[goog.crypt.base64.ENCODED_VALS_WEBSAFE.charAt(e)]=e)}},jspb.ExtensionFieldInfo=function(t,r,a,n,s){this.fieldIndex=t,this.fieldName=r,this.ctor=a,this.toObjectFn=n,this.isRepeated=s},jspb.ExtensionFieldBinaryInfo=function(t,r,a,n,s,e){this.fieldInfo=t,this.binaryReaderFn=r,this.binaryWriterFn=a,this.binaryMessageSerializeFn=n,this.binaryMessageDeserializeFn=s,this.isPacked=e},jspb.ExtensionFieldInfo.prototype.isMessageType=function(){return!!this.ctor},jspb.Message=function(){},jspb.Message.GENERATE_TO_OBJECT=!0,jspb.Message.GENERATE_FROM_OBJECT=!goog.DISALLOW_TEST_ONLY_CODE,jspb.Message.GENERATE_TO_STRING=!0,jspb.Message.ASSUME_LOCAL_ARRAYS=!1,jspb.Message.SERIALIZE_EMPTY_TRAILING_FIELDS=!0,jspb.Message.SUPPORTS_UINT8ARRAY_="function"==typeof Uint8Array,jspb.Message.prototype.getJsPbMessageId=function(){return this.messageId_},jspb.Message.getIndex_=function(e,t){return t+e.arrayIndexOffset_},jspb.Message.getFieldNumber_=function(e,t){return t-e.arrayIndexOffset_},jspb.Message.initialize=function(t,r,a,n,s,e){if(t.wrappers_=null,r||(r=a?[a]:[]),t.messageId_=a?a+"":void 0,t.arrayIndexOffset_=0===a?-1:0,t.array=r,jspb.Message.initPivotAndExtensionObject_(t,n),t.convertedFloatingPointFields_={},jspb.Message.SERIALIZE_EMPTY_TRAILING_FIELDS||(t.repeatedFields=s),s)for(r=0;rn.length?a.length:n.length;for(t.getJsPbMessageId()&&(s[0]=t.getJsPbMessageId(),e=1);e>>1|(1&this.hi)<<31)>>>0,this.hi>>>1>>>0)},jspb.arith.UInt64.prototype.leftShift=function(){return new jspb.arith.UInt64(this.lo<<1>>>0,(this.hi<<1|this.lo>>>31)>>>0)},jspb.arith.UInt64.prototype.msb=function(){return!!(2147483648&this.hi)},jspb.arith.UInt64.prototype.lsb=function(){return!!(1&this.lo)},jspb.arith.UInt64.prototype.zero=function(){return 0==this.lo&&0==this.hi},jspb.arith.UInt64.prototype.add=function(e){return new jspb.arith.UInt64((4294967295&this.lo+e.lo)>>>0>>>0,((4294967295&this.hi+e.hi)>>>0)+(4294967296<=this.lo+e.lo?1:0)>>>0)},jspb.arith.UInt64.prototype.sub=function(e){return new jspb.arith.UInt64((4294967295&this.lo-e.lo)>>>0>>>0,((4294967295&this.hi-e.hi)>>>0)-(0>this.lo-e.lo?1:0)>>>0)},jspb.arith.UInt64.mul32x32=function(t,r){for(var a=65535&t,n=t>>>16,s=65535&r,e=r>>>16,i=a*s+65536*(65535&a*e)+65536*(65535&n*s),a=n*e+(a*e>>>16)+(n*s>>>16);4294967296<=i;)i-=4294967296,a+=1;return new jspb.arith.UInt64(i>>>0,a>>>0)},jspb.arith.UInt64.prototype.mul=function(e){var t=jspb.arith.UInt64.mul32x32(this.lo,e);return e=jspb.arith.UInt64.mul32x32(this.hi,e),e.hi=e.lo,e.lo=0,t.add(e)},jspb.arith.UInt64.prototype.div=function(e){if(0==e)return[];var t=new jspb.arith.UInt64(0,0),r=new jspb.arith.UInt64(this.lo,this.hi);e=new jspb.arith.UInt64(e,0);for(var n=new jspb.arith.UInt64(1,0);!e.msb();)e=e.leftShift(),n=n.leftShift();for(;!n.zero();)0>=e.cmp(r)&&(t=t.add(n),r=r.sub(e)),e=e.rightShift(),n=n.rightShift();return[t,r]},jspb.arith.UInt64.prototype.toString=function(){for(var e="",t=this;!t.zero();)var t=t.div(10),r=t[0],e=t[1].lo+e,t=r;return""==e&&(e="0"),e},jspb.arith.UInt64.fromString=function(t){for(var r=new jspb.arith.UInt64(0,0),a=new jspb.arith.UInt64(0,0),n=0;nt[n]||"9">>0>>>0,((4294967295&this.hi+e.hi)>>>0)+(4294967296<=this.lo+e.lo?1:0)>>>0)},jspb.arith.Int64.prototype.sub=function(e){return new jspb.arith.Int64((4294967295&this.lo-e.lo)>>>0>>>0,((4294967295&this.hi-e.hi)>>>0)-(0>this.lo-e.lo?1:0)>>>0)},jspb.arith.Int64.prototype.clone=function(){return new jspb.arith.Int64(this.lo,this.hi)},jspb.arith.Int64.prototype.toString=function(){var e=0!=(2147483648&this.hi),t=new jspb.arith.UInt64(this.lo,this.hi);return e&&(t=new jspb.arith.UInt64(0,0).sub(t)),(e?"-":"")+t.toString()},jspb.arith.Int64.fromString=function(e){var t=0>>0;e=_Mathfloor4((e-t)/jspb.BinaryConstants.TWO_TO_32)>>>0,jspb.utils.split64Low=t,jspb.utils.split64High=e},jspb.utils.splitInt64=function(e){var t=0>e;e=_Mathabs(e);var r=e>>>0;e=_Mathfloor4((e-r)/jspb.BinaryConstants.TWO_TO_32),e>>>=0,t&&(e=~e>>>0,r=(~r>>>0)+1,4294967295e;e=2*_Mathabs(e),jspb.utils.splitUint64(e),e=jspb.utils.split64Low;var r=jspb.utils.split64High;t&&(0==e?0==r?r=e=4294967295:(r--,e=4294967295):e--),jspb.utils.split64Low=e,jspb.utils.split64High=r},jspb.utils.splitFloat32=function(e){var t=0>e?1:0;e=t?-e:e;var r;0===e?0<1/e?(jspb.utils.split64High=0,jspb.utils.split64Low=0):(jspb.utils.split64High=0,jspb.utils.split64Low=2147483648):isNaN(e)?(jspb.utils.split64High=0,jspb.utils.split64Low=2147483647):e>jspb.BinaryConstants.FLOAT32_MAX?(jspb.utils.split64High=0,jspb.utils.split64Low=(2139095040|t<<31)>>>0):e>>0):(r=_Mathfloor4(_Mathlog(e)/_MathLN),e*=_Mathpow3(2,-r),e=8388607&_Mathround4(e*jspb.BinaryConstants.TWO_TO_23),jspb.utils.split64High=0,jspb.utils.split64Low=(t<<31|r+127<<23|e)>>>0)},jspb.utils.splitFloat64=function(e){var t=0>e?1:0;if(e=t?-e:e,0===e)jspb.utils.split64High=0<1/e?0:2147483648,jspb.utils.split64Low=0;else if(isNaN(e))jspb.utils.split64High=2147483647,jspb.utils.split64Low=4294967295;else if(e>jspb.BinaryConstants.FLOAT64_MAX)jspb.utils.split64High=(2146435072|t<<31)>>>0,jspb.utils.split64Low=0;else if(e>>0,jspb.utils.split64Low=r>>>0}else{var n=_Mathfloor4(_Mathlog(e)/_MathLN);1024==n&&(n=1023),r=e*_Mathpow3(2,-n),e=1048575&r*jspb.BinaryConstants.TWO_TO_20,r=r*jspb.BinaryConstants.TWO_TO_52>>>0,jspb.utils.split64High=(t<<31|n+1023<<20|e)>>>0,jspb.utils.split64Low=r}},jspb.utils.splitHash64=function(t){var r=t.charCodeAt(0),n=t.charCodeAt(1),s=t.charCodeAt(2),i=t.charCodeAt(3),e=t.charCodeAt(4),o=t.charCodeAt(5),d=t.charCodeAt(6);t=t.charCodeAt(7),jspb.utils.split64Low=r+(n<<8)+(s<<16)+(i<<24)>>>0,jspb.utils.split64High=e+(o<<8)+(d<<16)+(t<<24)>>>0},jspb.utils.joinUint64=function(e,t){return t*jspb.BinaryConstants.TWO_TO_32+e},jspb.utils.joinInt64=function(e,t){var r=2147483648&t;r&&(e=~e+1>>>0,t=~t>>>0,0==e&&(t=t+1>>>0));var n=jspb.utils.joinUint64(e,t);return r?-n:n},jspb.utils.joinZigzag64=function(e,t){var r=1&e;e=(e>>>1|t<<31)>>>0,t>>>=1,r&&(e=e+1>>>0,0==e&&(t=t+1>>>0));var n=jspb.utils.joinUint64(e,t);return r?-n:n},jspb.utils.joinFloat32=function(t){var r=2*(t>>31)+1,a=255&t>>>23,n=8388607&t;return 255==a?n?NaN:1/0*r:0==a?1.401298464324817e-45*r*n:r*_Mathpow3(2,a-150)*(n+8388608)},jspb.utils.joinFloat64=function(t,r){var a=2*(r>>31)+1,n=2047&r>>>20,s=jspb.BinaryConstants.TWO_TO_32*(1048575&r)+t;return 2047==n?s?NaN:1/0*a:0==n?5e-324*a*s:a*_Mathpow3(2,n-1075)*(s+jspb.BinaryConstants.TWO_TO_52)},jspb.utils.joinHash64=function(e,t){return _StringfromCharCode3(255&e>>>0,255&e>>>8,255&e>>>16,255&e>>>24,255&t>>>0,255&t>>>8,255&t>>>16,255&t>>>24)},jspb.utils.DIGITS=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],jspb.utils.joinUnsignedDecimalString=function(t,r){function a(e){for(var t=1E7,r=0;7>r;r++){var t=t/10,a=e/t%10>>>0;(0!=a||p)&&(p=!0,c+=o[a])}}if(2097151>=r)return""+(jspb.BinaryConstants.TWO_TO_32*r+t);var n=16777215&(t>>>24|r<<8)>>>0,s=65535&r>>16,i=(16777215&t)+6777216*n+6710656*s,n=n+8147497*s,s=2*s;1E7<=i&&(n+=_Mathfloor4(i/1E7),i%=1E7),1E7<=n&&(s+=_Mathfloor4(n/1E7),n%=1E7);var o=jspb.utils.DIGITS,p=!1,c="";return(s||p)&&a(s),(n||p)&&a(n),(i||p)&&a(i),c},jspb.utils.joinSignedDecimalString=function(e,t){var r=2147483648&t;r&&(e=~e+1>>>0,t=~t+(0==e?1:0)>>>0);var n=jspb.utils.joinUnsignedDecimalString(e,t);return r?"-"+n:n},jspb.utils.hash64ToDecimalString=function(e,t){jspb.utils.splitHash64(e);var r=jspb.utils.split64Low,a=jspb.utils.split64High;return t?jspb.utils.joinSignedDecimalString(r,a):jspb.utils.joinUnsignedDecimalString(r,a)},jspb.utils.hash64ArrayToDecimalStrings=function(e,t){for(var r=Array(e.length),a=0;ar&&(1!==e||0>>8}function n(){for(var e=0;8>e;e++)i[e]=255&~i[e]}goog.asserts.assert(0r;r++)a=e.charCodeAt(7-r),t[2*r+2]=jspb.utils.DIGITS[a>>4],t[2*r+3]=jspb.utils.DIGITS[15&a];return t.join("")},jspb.utils.hexStringToHash64=function(t){t=t.toLowerCase(),goog.asserts.assert(18==t.length),goog.asserts.assert("0"==t[0]),goog.asserts.assert("x"==t[1]);for(var r="",n=0;8>n;n++)var s=jspb.utils.DIGITS.indexOf(t[2*n+2]),i=jspb.utils.DIGITS.indexOf(t[2*n+3]),r=_StringfromCharCode3(16*s+i)+r;return r},jspb.utils.hash64ToNumber=function(e,t){jspb.utils.splitHash64(e);var r=jspb.utils.split64Low,a=jspb.utils.split64High;return t?jspb.utils.joinInt64(r,a):jspb.utils.joinUint64(r,a)},jspb.utils.numberToHash64=function(e){return jspb.utils.splitInt64(e),jspb.utils.joinHash64(jspb.utils.split64Low,jspb.utils.split64High)},jspb.utils.countVarints=function(t,r,a){for(var n=0,s=r;s>7;return a-r-n},jspb.utils.countVarintFields=function(t,r,a,n){var s=0;if(n=8*n+jspb.BinaryConstants.WireType.VARINT,128>n)for(;r>=7}if(t[r++]!=i)break;for(s++;i=t[r++],0!=(128&i););}return s},jspb.utils.countFixedFields_=function(t,r,a,n,s){var e=0;if(128>n)for(;r>=7}if(t[r++]!=i)break;e++,r+=s}return e},jspb.utils.countFixed32Fields=function(e,t,r,a){return jspb.utils.countFixedFields_(e,t,r,8*a+jspb.BinaryConstants.WireType.FIXED32,4)},jspb.utils.countFixed64Fields=function(e,t,r,a){return jspb.utils.countFixedFields_(e,t,r,8*a+jspb.BinaryConstants.WireType.FIXED64,8)},jspb.utils.countDelimitedFields=function(t,r,a,n){var s=0;for(n=8*n+jspb.BinaryConstants.WireType.DELIMITED;r>=7}if(t[r++]!=i)break;s++;for(var o=0,p=1;i=t[r++],o+=(127&i)*p,p*=128,0!=(128&i););r+=o}return s},jspb.utils.debugBytesToTextFormat=function(e){var t="\"";if(e){e=jspb.utils.byteSourceToUint8Array(e);for(var r=0;re[r]&&(t+="0"),t+=e[r].toString(16)}return t+"\""},jspb.utils.debugScalarToTextFormat=function(e){return goog.isString(e)?goog.string.quote(e):e.toString()},jspb.utils.stringToByteArray=function(e){for(var t=new Uint8Array(e.length),r=0,a;r>>7|t<<25)>>>0,t>>>=7;this.buffer_.push(e)},jspb.BinaryEncoder.prototype.writeSplitFixed64=function(e,t){goog.asserts.assert(e==_Mathfloor4(e)),goog.asserts.assert(t==_Mathfloor4(t)),goog.asserts.assert(0<=e&&e>>=7;this.buffer_.push(e)},jspb.BinaryEncoder.prototype.writeSignedVarint32=function(e){if(goog.asserts.assert(e==_Mathfloor4(e)),goog.asserts.assert(e>=-jspb.BinaryConstants.TWO_TO_31&&et;t++)this.buffer_.push(128|127&e),e>>=7;this.buffer_.push(1)}},jspb.BinaryEncoder.prototype.writeUnsignedVarint64=function(e){goog.asserts.assert(e==_Mathfloor4(e)),goog.asserts.assert(0<=e&&e=-jspb.BinaryConstants.TWO_TO_63&&e=-jspb.BinaryConstants.TWO_TO_31&&e>31)>>>0)},jspb.BinaryEncoder.prototype.writeZigzagVarint64=function(e){goog.asserts.assert(e==_Mathfloor4(e)),goog.asserts.assert(e>=-jspb.BinaryConstants.TWO_TO_63&&ee),this.buffer_.push(255&e>>>0)},jspb.BinaryEncoder.prototype.writeUint16=function(e){goog.asserts.assert(e==_Mathfloor4(e)),goog.asserts.assert(0<=e&&65536>e),this.buffer_.push(255&e>>>0),this.buffer_.push(255&e>>>8)},jspb.BinaryEncoder.prototype.writeUint32=function(e){goog.asserts.assert(e==_Mathfloor4(e)),goog.asserts.assert(0<=e&&e>>0),this.buffer_.push(255&e>>>8),this.buffer_.push(255&e>>>16),this.buffer_.push(255&e>>>24)},jspb.BinaryEncoder.prototype.writeUint64=function(e){goog.asserts.assert(e==_Mathfloor4(e)),goog.asserts.assert(0<=e&&ee),this.buffer_.push(255&e>>>0)},jspb.BinaryEncoder.prototype.writeInt16=function(e){goog.asserts.assert(e==_Mathfloor4(e)),goog.asserts.assert(-32768<=e&&32768>e),this.buffer_.push(255&e>>>0),this.buffer_.push(255&e>>>8)},jspb.BinaryEncoder.prototype.writeInt32=function(e){goog.asserts.assert(e==_Mathfloor4(e)),goog.asserts.assert(e>=-jspb.BinaryConstants.TWO_TO_31&&e>>0),this.buffer_.push(255&e>>>8),this.buffer_.push(255&e>>>16),this.buffer_.push(255&e>>>24)},jspb.BinaryEncoder.prototype.writeInt64=function(e){goog.asserts.assert(e==_Mathfloor4(e)),goog.asserts.assert(e>=-jspb.BinaryConstants.TWO_TO_63&&e=-jspb.BinaryConstants.TWO_TO_63&&+e=-jspb.BinaryConstants.FLOAT32_MAX&&e<=jspb.BinaryConstants.FLOAT32_MAX),jspb.utils.splitFloat32(e),this.writeUint32(jspb.utils.split64Low)},jspb.BinaryEncoder.prototype.writeDouble=function(e){goog.asserts.assert(e>=-jspb.BinaryConstants.FLOAT64_MAX&&e<=jspb.BinaryConstants.FLOAT64_MAX),jspb.utils.splitFloat64(e),this.writeUint32(jspb.utils.split64Low),this.writeUint32(jspb.utils.split64High)},jspb.BinaryEncoder.prototype.writeBool=function(e){goog.asserts.assert(goog.isBoolean(e)||goog.isNumber(e)),this.buffer_.push(e?1:0)},jspb.BinaryEncoder.prototype.writeEnum=function(e){goog.asserts.assert(e==_Mathfloor4(e)),goog.asserts.assert(e>=-jspb.BinaryConstants.TWO_TO_31&&en)this.buffer_.push(n);else if(2048>n)this.buffer_.push(192|n>>6),this.buffer_.push(128|63&n);else if(65536>n)if(55296<=n&&56319>=n&&a+1=s&&(n=1024*(n-55296)+s-56320+65536,this.buffer_.push(240|n>>18),this.buffer_.push(128|63&n>>12),this.buffer_.push(128|63&n>>6),this.buffer_.push(128|63&n),a++)}else this.buffer_.push(224|n>>12),this.buffer_.push(128|63&n>>6),this.buffer_.push(128|63&n);return this.buffer_.length-r},jspb.BinaryWriter=function(){this.blocks_=[],this.totalLength_=0,this.encoder_=new jspb.BinaryEncoder,this.bookmarks_=[]},jspb.BinaryWriter.prototype.appendUint8Array_=function(e){var t=this.encoder_.end();this.blocks_.push(t),this.blocks_.push(e),this.totalLength_+=t.length+e.length},jspb.BinaryWriter.prototype.beginDelimited_=function(e){return this.writeFieldHeader_(e,jspb.BinaryConstants.WireType.DELIMITED),e=this.encoder_.end(),this.blocks_.push(e),this.totalLength_+=e.length,e.push(this.totalLength_),e},jspb.BinaryWriter.prototype.endDelimited_=function(e){var t=e.pop(),t=this.totalLength_+this.encoder_.length()-t;for(goog.asserts.assert(0<=t);127>>=7,this.totalLength_++;e.push(t),this.totalLength_++},jspb.BinaryWriter.prototype.writeSerializedMessage=function(e,t,r){this.appendUint8Array_(e.subarray(t,r))},jspb.BinaryWriter.prototype.maybeWriteSerializedMessage=function(e,t,r){null!=e&&null!=t&&null!=r&&this.writeSerializedMessage(e,t,r)},jspb.BinaryWriter.prototype.reset=function(){this.blocks_=[],this.encoder_.end(),this.totalLength_=0,this.bookmarks_=[]},jspb.BinaryWriter.prototype.getResultBuffer=function(){goog.asserts.assert(0==this.bookmarks_.length);for(var t=new Uint8Array(this.totalLength_+this.encoder_.length()),r=this.blocks_,a=r.length,n=0,s=0,i;s=-jspb.BinaryConstants.TWO_TO_31&&t=-jspb.BinaryConstants.TWO_TO_31&&r=-jspb.BinaryConstants.TWO_TO_63&&t=-jspb.BinaryConstants.TWO_TO_31&&t=-jspb.BinaryConstants.TWO_TO_63&&t=-jspb.BinaryConstants.TWO_TO_63&&+t=-jspb.BinaryConstants.TWO_TO_31&&t=-jspb.BinaryConstants.TWO_TO_63&&t=-jspb.BinaryConstants.TWO_TO_31&&tjspb.BinaryIterator.instanceCache_.length&&jspb.BinaryIterator.instanceCache_.push(this)},jspb.BinaryIterator.prototype.clear=function(){this.decoder_&&this.decoder_.free(),this.elements_=this.nextMethod_=this.decoder_=null,this.cursor_=0,this.nextValue_=null,this.atEnd_=!0},jspb.BinaryIterator.prototype.get=function(){return this.nextValue_},jspb.BinaryIterator.prototype.atEnd=function(){return this.atEnd_},jspb.BinaryIterator.prototype.next=function(){var e=this.nextValue_;return this.decoder_?this.decoder_.atEnd()?(this.nextValue_=null,this.atEnd_=!0):this.nextValue_=this.nextMethod_.call(this.decoder_):this.elements_&&(this.cursor_==this.elements_.length?(this.nextValue_=null,this.atEnd_=!0):this.nextValue_=this.elements_[this.cursor_++]),e},jspb.BinaryDecoder=function(e,t,r){this.bytes_=null,this.tempHigh_=this.tempLow_=this.cursor_=this.end_=this.start_=0,this.error_=!1,e&&this.setBlock(e,t,r)},jspb.BinaryDecoder.instanceCache_=[],jspb.BinaryDecoder.alloc=function(e,t,r){if(jspb.BinaryDecoder.instanceCache_.length){var a=jspb.BinaryDecoder.instanceCache_.pop();return e&&a.setBlock(e,t,r),a}return new jspb.BinaryDecoder(e,t,r)},jspb.BinaryDecoder.prototype.free=function(){this.clear(),100>jspb.BinaryDecoder.instanceCache_.length&&jspb.BinaryDecoder.instanceCache_.push(this)},jspb.BinaryDecoder.prototype.clone=function(){return jspb.BinaryDecoder.alloc(this.bytes_,this.start_,this.end_-this.start_)},jspb.BinaryDecoder.prototype.clear=function(){this.bytes_=null,this.cursor_=this.end_=this.start_=0,this.error_=!1},jspb.BinaryDecoder.prototype.getBuffer=function(){return this.bytes_},jspb.BinaryDecoder.prototype.setBlock=function(e,t,r){this.bytes_=jspb.utils.byteSourceToUint8Array(e),this.start_=goog.isDef(t)?t:0,this.end_=goog.isDef(r)?this.start_+r:this.bytes_.length,this.cursor_=this.start_},jspb.BinaryDecoder.prototype.getEnd=function(){return this.end_},jspb.BinaryDecoder.prototype.setEnd=function(e){this.end_=e},jspb.BinaryDecoder.prototype.reset=function(){this.cursor_=this.start_},jspb.BinaryDecoder.prototype.getCursor=function(){return this.cursor_},jspb.BinaryDecoder.prototype.setCursor=function(e){this.cursor_=e},jspb.BinaryDecoder.prototype.advance=function(e){this.cursor_+=e,goog.asserts.assert(this.cursor_<=this.end_)},jspb.BinaryDecoder.prototype.atEnd=function(){return this.cursor_==this.end_},jspb.BinaryDecoder.prototype.pastEnd=function(){return this.cursor_>this.end_},jspb.BinaryDecoder.prototype.getError=function(){return this.error_||0>this.cursor_||this.cursor_>this.end_},jspb.BinaryDecoder.prototype.readSplitVarint64_=function(){for(var e=0,t=0,r,n;4>t;t++)if(r=this.bytes_[this.cursor_++],e|=(127&r)<<7*t,128>r)return this.tempLow_=e>>>0,void(this.tempHigh_=0);if(r=this.bytes_[this.cursor_++],e|=(127&r)<<28,n=0|(127&r)>>4,128>r)this.tempLow_=e>>>0,this.tempHigh_=n>>>0;else{for(t=0;5>t;t++)if(r=this.bytes_[this.cursor_++],n|=(127&r)<<7*t+3,128>r)return this.tempLow_=e>>>0,void(this.tempHigh_=n>>>0);goog.asserts.fail("Failed to read varint, encoding is invalid."),this.error_=!0}},jspb.BinaryDecoder.prototype.skipVarint=function(){for(;128&this.bytes_[this.cursor_];)this.cursor_++;this.cursor_++},jspb.BinaryDecoder.prototype.unskipVarint=function(e){for(;128>>=7;this.cursor_--},jspb.BinaryDecoder.prototype.readUnsignedVarint32=function(){var e=this.bytes_,t;t=e[this.cursor_+0];var r=127&t;return 128>t?(this.cursor_+=1,goog.asserts.assert(this.cursor_<=this.end_),r):(t=e[this.cursor_+1],r|=(127&t)<<7,128>t)?(this.cursor_+=2,goog.asserts.assert(this.cursor_<=this.end_),r):(t=e[this.cursor_+2],r|=(127&t)<<14,128>t)?(this.cursor_+=3,goog.asserts.assert(this.cursor_<=this.end_),r):(t=e[this.cursor_+3],r|=(127&t)<<21,128>t)?(this.cursor_+=4,goog.asserts.assert(this.cursor_<=this.end_),r):(t=e[this.cursor_+4],r|=(15&t)<<28,128>t)?(this.cursor_+=5,goog.asserts.assert(this.cursor_<=this.end_),r>>>0):(this.cursor_+=5,128<=e[this.cursor_++]&&128<=e[this.cursor_++]&&128<=e[this.cursor_++]&&128<=e[this.cursor_++]&&128<=e[this.cursor_++]&&goog.asserts.assert(!1),goog.asserts.assert(this.cursor_<=this.end_),r)},jspb.BinaryDecoder.prototype.readSignedVarint32=jspb.BinaryDecoder.prototype.readUnsignedVarint32,jspb.BinaryDecoder.prototype.readUnsignedVarint32String=function(){return this.readUnsignedVarint32().toString()},jspb.BinaryDecoder.prototype.readSignedVarint32String=function(){return this.readSignedVarint32().toString()},jspb.BinaryDecoder.prototype.readZigzagVarint32=function(){var e=this.readUnsignedVarint32();return e>>>1^-(1&e)},jspb.BinaryDecoder.prototype.readUnsignedVarint64=function(){return this.readSplitVarint64_(),jspb.utils.joinUint64(this.tempLow_,this.tempHigh_)},jspb.BinaryDecoder.prototype.readUnsignedVarint64String=function(){return this.readSplitVarint64_(),jspb.utils.joinUnsignedDecimalString(this.tempLow_,this.tempHigh_)},jspb.BinaryDecoder.prototype.readSignedVarint64=function(){return this.readSplitVarint64_(),jspb.utils.joinInt64(this.tempLow_,this.tempHigh_)},jspb.BinaryDecoder.prototype.readSignedVarint64String=function(){return this.readSplitVarint64_(),jspb.utils.joinSignedDecimalString(this.tempLow_,this.tempHigh_)},jspb.BinaryDecoder.prototype.readZigzagVarint64=function(){return this.readSplitVarint64_(),jspb.utils.joinZigzag64(this.tempLow_,this.tempHigh_)},jspb.BinaryDecoder.prototype.readZigzagVarint64String=function(){return this.readZigzagVarint64().toString()},jspb.BinaryDecoder.prototype.readUint8=function(){var e=this.bytes_[this.cursor_+0];return this.cursor_+=1,goog.asserts.assert(this.cursor_<=this.end_),e},jspb.BinaryDecoder.prototype.readUint16=function(){var e=this.bytes_[this.cursor_+0],t=this.bytes_[this.cursor_+1];return this.cursor_+=2,goog.asserts.assert(this.cursor_<=this.end_),e<<0|t<<8},jspb.BinaryDecoder.prototype.readUint32=function(){var e=this.bytes_[this.cursor_+0],t=this.bytes_[this.cursor_+1],r=this.bytes_[this.cursor_+2],a=this.bytes_[this.cursor_+3];return this.cursor_+=4,goog.asserts.assert(this.cursor_<=this.end_),(e<<0|t<<8|r<<16|a<<24)>>>0},jspb.BinaryDecoder.prototype.readUint64=function(){var e=this.readUint32(),t=this.readUint32();return jspb.utils.joinUint64(e,t)},jspb.BinaryDecoder.prototype.readUint64String=function(){var e=this.readUint32(),t=this.readUint32();return jspb.utils.joinUnsignedDecimalString(e,t)},jspb.BinaryDecoder.prototype.readInt8=function(){var e=this.bytes_[this.cursor_+0];return this.cursor_+=1,goog.asserts.assert(this.cursor_<=this.end_),e<<24>>24},jspb.BinaryDecoder.prototype.readInt16=function(){var e=this.bytes_[this.cursor_+0],t=this.bytes_[this.cursor_+1];return this.cursor_+=2,goog.asserts.assert(this.cursor_<=this.end_),(e<<0|t<<8)<<16>>16},jspb.BinaryDecoder.prototype.readInt32=function(){var e=this.bytes_[this.cursor_+0],t=this.bytes_[this.cursor_+1],r=this.bytes_[this.cursor_+2],a=this.bytes_[this.cursor_+3];return this.cursor_+=4,goog.asserts.assert(this.cursor_<=this.end_),e<<0|t<<8|r<<16|a<<24},jspb.BinaryDecoder.prototype.readInt64=function(){var e=this.readUint32(),t=this.readUint32();return jspb.utils.joinInt64(e,t)},jspb.BinaryDecoder.prototype.readInt64String=function(){var e=this.readUint32(),t=this.readUint32();return jspb.utils.joinSignedDecimalString(e,t)},jspb.BinaryDecoder.prototype.readFloat=function(){var e=this.readUint32();return jspb.utils.joinFloat32(e,0)},jspb.BinaryDecoder.prototype.readDouble=function(){var e=this.readUint32(),t=this.readUint32();return jspb.utils.joinFloat64(e,t)},jspb.BinaryDecoder.prototype.readBool=function(){return!!this.bytes_[this.cursor_++]},jspb.BinaryDecoder.prototype.readEnum=function(){return this.readSignedVarint32()},jspb.BinaryDecoder.prototype.readString=function(t){var r=this.bytes_,n=this.cursor_;t=n+t;for(var s=[],i="",o;no)s.push(o);else if(192>o)continue;else if(224>o){var d=r[n++];s.push((31&o)<<6|63&d)}else if(240>o){var d=r[n++],p=r[n++];s.push((15&o)<<12|(63&d)<<6|63&p)}else if(248>o){var d=r[n++],p=r[n++],l=r[n++],o=(7&o)<<18|(63&d)<<12|(63&p)<<6|63&l,o=o-65536;s.push((1023&o>>10)+55296,(1023&o)+56320)}8192<=s.length&&(i+=_StringfromCharCode3.apply(null,s),s.length=0)}return i+=goog.crypt.byteArrayToString(s),this.cursor_=n,i},jspb.BinaryDecoder.prototype.readStringWithLength=function(){var e=this.readUnsignedVarint32();return this.readString(e)},jspb.BinaryDecoder.prototype.readBytes=function(e){if(0>e||this.cursor_+e>this.bytes_.length)return this.error_=!0,goog.asserts.fail("Invalid byte length!"),new Uint8Array(0);var t=this.bytes_.subarray(this.cursor_,this.cursor_+e);return this.cursor_+=e,goog.asserts.assert(this.cursor_<=this.end_),t},jspb.BinaryDecoder.prototype.readVarintHash64=function(){return this.readSplitVarint64_(),jspb.utils.joinHash64(this.tempLow_,this.tempHigh_)},jspb.BinaryDecoder.prototype.readFixedHash64=function(){var t=this.bytes_,r=this.cursor_,n=t[r+0],s=t[r+1],i=t[r+2],e=t[r+3],o=t[r+4],d=t[r+5],p=t[r+6],t=t[r+7];return this.cursor_+=8,_StringfromCharCode3(n,s,i,e,o,d,p,t)},jspb.BinaryReader=function(e,t,r){this.decoder_=jspb.BinaryDecoder.alloc(e,t,r),this.fieldCursor_=this.decoder_.getCursor(),this.nextField_=jspb.BinaryConstants.INVALID_FIELD_NUMBER,this.nextWireType_=jspb.BinaryConstants.WireType.INVALID,this.error_=!1,this.readCallbacks_=null},jspb.BinaryReader.instanceCache_=[],jspb.BinaryReader.alloc=function(e,t,r){if(jspb.BinaryReader.instanceCache_.length){var a=jspb.BinaryReader.instanceCache_.pop();return e&&a.decoder_.setBlock(e,t,r),a}return new jspb.BinaryReader(e,t,r)},jspb.BinaryReader.prototype.alloc=jspb.BinaryReader.alloc,jspb.BinaryReader.prototype.free=function(){this.decoder_.clear(),this.nextField_=jspb.BinaryConstants.INVALID_FIELD_NUMBER,this.nextWireType_=jspb.BinaryConstants.WireType.INVALID,this.error_=!1,this.readCallbacks_=null,100>jspb.BinaryReader.instanceCache_.length&&jspb.BinaryReader.instanceCache_.push(this)},jspb.BinaryReader.prototype.getFieldCursor=function(){return this.fieldCursor_},jspb.BinaryReader.prototype.getCursor=function(){return this.decoder_.getCursor()},jspb.BinaryReader.prototype.getBuffer=function(){return this.decoder_.getBuffer()},jspb.BinaryReader.prototype.getFieldNumber=function(){return this.nextField_},jspb.BinaryReader.prototype.getWireType=function(){return this.nextWireType_},jspb.BinaryReader.prototype.isEndGroup=function(){return this.nextWireType_==jspb.BinaryConstants.WireType.END_GROUP},jspb.BinaryReader.prototype.getError=function(){return this.error_||this.decoder_.getError()},jspb.BinaryReader.prototype.setBlock=function(e,t,r){this.decoder_.setBlock(e,t,r),this.nextField_=jspb.BinaryConstants.INVALID_FIELD_NUMBER,this.nextWireType_=jspb.BinaryConstants.WireType.INVALID},jspb.BinaryReader.prototype.reset=function(){this.decoder_.reset(),this.nextField_=jspb.BinaryConstants.INVALID_FIELD_NUMBER,this.nextWireType_=jspb.BinaryConstants.WireType.INVALID},jspb.BinaryReader.prototype.advance=function(e){this.decoder_.advance(e)},jspb.BinaryReader.prototype.nextField=function(){if(this.decoder_.atEnd())return!1;if(this.getError())return goog.asserts.fail("Decoder hit an error"),!1;this.fieldCursor_=this.decoder_.getCursor();var e=this.decoder_.readUnsignedVarint32(),t=e>>>3,e=7&e;return e!=jspb.BinaryConstants.WireType.VARINT&&e!=jspb.BinaryConstants.WireType.FIXED32&&e!=jspb.BinaryConstants.WireType.FIXED64&&e!=jspb.BinaryConstants.WireType.DELIMITED&&e!=jspb.BinaryConstants.WireType.START_GROUP&&e!=jspb.BinaryConstants.WireType.END_GROUP?(goog.asserts.fail("Invalid wire type"),this.error_=!0,!1):(this.nextField_=t,this.nextWireType_=e,!0)},jspb.BinaryReader.prototype.unskipHeader=function(){this.decoder_.unskipVarint(this.nextField_<<3|this.nextWireType_)},jspb.BinaryReader.prototype.skipMatchingFields=function(){var e=this.nextField_;for(this.unskipHeader();this.nextField()&&this.getFieldNumber()==e;)this.skipField();this.decoder_.atEnd()||this.unskipHeader()},jspb.BinaryReader.prototype.skipVarintField=function(){this.nextWireType_==jspb.BinaryConstants.WireType.VARINT?this.decoder_.skipVarint():(goog.asserts.fail("Invalid wire type for skipVarintField"),this.skipField())},jspb.BinaryReader.prototype.skipDelimitedField=function(){if(this.nextWireType_!=jspb.BinaryConstants.WireType.DELIMITED)goog.asserts.fail("Invalid wire type for skipDelimitedField"),this.skipField();else{var e=this.decoder_.readUnsignedVarint32();this.decoder_.advance(e)}},jspb.BinaryReader.prototype.skipFixed32Field=function(){this.nextWireType_==jspb.BinaryConstants.WireType.FIXED32?this.decoder_.advance(4):(goog.asserts.fail("Invalid wire type for skipFixed32Field"),this.skipField())},jspb.BinaryReader.prototype.skipFixed64Field=function(){this.nextWireType_==jspb.BinaryConstants.WireType.FIXED64?this.decoder_.advance(8):(goog.asserts.fail("Invalid wire type for skipFixed64Field"),this.skipField())},jspb.BinaryReader.prototype.skipGroup=function(){var e=[this.nextField_];do{if(!this.nextField()){goog.asserts.fail("Unmatched start-group tag: stream EOF"),this.error_=!0;break}if(this.nextWireType_==jspb.BinaryConstants.WireType.START_GROUP)e.push(this.nextField_);else if(this.nextWireType_==jspb.BinaryConstants.WireType.END_GROUP&&this.nextField_!=e.pop()){goog.asserts.fail("Unmatched end-group tag"),this.error_=!0;break}}while(0a)throw new TypeError("Bad iterations");if("number"!=typeof n)throw new TypeError("Key length not a number");if(0>n||1073741823=0.10.0"},homepage:"https://github.com/theturtle32/WebSocket-Node",keywords:["websocket","websockets","socket","networking","comet","push","RFC-6455","realtime","server","client"],license:"Apache-2.0",main:"index",name:"websocket",repository:{type:"git",url:"git+https://github.com/theturtle32/WebSocket-Node.git"},scripts:{gulp:"gulp",install:"(node-gyp rebuild 2> builderror.log) || (exit 0)",test:"faucet test/unit"},version:"1.0.26"}},{}],495:[function(e,t,r){arguments[4][289][0].apply(r,arguments)},{dup:289}],496:[function(e,t,r){arguments[4][290][0].apply(r,arguments)},{"./xml-http-request":500,"./xml-http-request-event-target":498,dup:290}],497:[function(e,t,r){arguments[4][291][0].apply(r,arguments)},{dup:291}],498:[function(e,t,r){arguments[4][292][0].apply(r,arguments)},{dup:292}],499:[function(e,t,r){arguments[4][293][0].apply(r,arguments)},{"./xml-http-request-event-target":498,buffer:73,dup:293}],500:[function(e,t,r){arguments[4][294][0].apply(r,arguments)},{"./errors":495,"./progress-event":497,"./xml-http-request-event-target":498,"./xml-http-request-upload":499,_process:71,buffer:73,cookiejar:346,dup:294,http:206,https:135,os:151,url:223}],501:[function(e,t,r){var a=e("google-protobuf"),n=a,s=Function("return this")();n.exportSymbol("proto.AccountGasLimit",null,s),n.exportSymbol("proto.BlackList",null,s),n.exportSymbol("proto.Block",null,s),n.exportSymbol("proto.BlockBody",null,s),n.exportSymbol("proto.BlockHeader",null,s),n.exportSymbol("proto.BlockTxs",null,s),n.exportSymbol("proto.BlockWithProof",null,s),n.exportSymbol("proto.Crypto",null,s),n.exportSymbol("proto.Proof",null,s),n.exportSymbol("proto.ProofType",null,s),n.exportSymbol("proto.RichStatus",null,s),n.exportSymbol("proto.SignedTransaction",null,s),n.exportSymbol("proto.Status",null,s),n.exportSymbol("proto.Transaction",null,s),n.exportSymbol("proto.UnverifiedTransaction",null,s),proto.Proof=function(e){a.Message.initialize(this,e,0,-1,null,null)},n.inherits(proto.Proof,a.Message),n.DEBUG&&!COMPILED&&(proto.Proof.displayName="proto.Proof"),a.Message.GENERATE_TO_OBJECT&&(proto.Proof.prototype.toObject=function(e){return proto.Proof.toObject(e,this)},proto.Proof.toObject=function(e,t){var r={content:t.getContent_asB64(),type:a.Message.getFieldWithDefault(t,2,0)};return e&&(r.$jspbMessageInstance=t),r}),proto.Proof.deserializeBinary=function(e){var t=new a.BinaryReader(e),r=new proto.Proof;return proto.Proof.deserializeBinaryFromReader(r,t)},proto.Proof.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){var r=t.getFieldNumber();switch(r){case 1:var a=t.readBytes();e.setContent(a);break;case 2:var a=t.readEnum();e.setType(a);break;default:t.skipField();}}return e},proto.Proof.prototype.serializeBinary=function(){var e=new a.BinaryWriter;return proto.Proof.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.Proof.serializeBinaryToWriter=function(e,t){var r;r=e.getContent_asU8(),0 { web3.utils.hexToBytes = new Proxy(web3.utils.hexToBytes, { apply: (target, _thisArg, argumentsList) => { let hex = ('' + argumentsList[0] || '').replace(/^0x/, ''); - console.log(hex); if (hex.length % 2) { hex = '0' + hex; }