web3.js/dist/web3.min.js

3 lines
82 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

require=function t(e,n,r){function o(a,s){if(!n[a]){if(!e[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(i)return i(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var f=n[a]={exports:{}};e[a][0].call(f.exports,function(t){var n=e[a][1][t];return o(n?n:t)},f,f.exports,t,e,n,r)}return n[a].exports}for(var i="function"==typeof require&&require,a=0;a<r.length;a++)o(r[a]);return o}({1:[function(t,e,n){e.exports=[{constant:!0,inputs:[{name:"_owner",type:"address"}],name:"name",outputs:[{name:"o_name",type:"bytes32"}],type:"function"},{constant:!0,inputs:[{name:"_name",type:"bytes32"}],name:"owner",outputs:[{name:"",type:"address"}],type:"function"},{constant:!0,inputs:[{name:"_name",type:"bytes32"}],name:"content",outputs:[{name:"",type:"bytes32"}],type:"function"},{constant:!0,inputs:[{name:"_name",type:"bytes32"}],name:"addr",outputs:[{name:"",type:"address"}],type:"function"},{constant:!1,inputs:[{name:"_name",type:"bytes32"}],name:"reserve",outputs:[],type:"function"},{constant:!0,inputs:[{name:"_name",type:"bytes32"}],name:"subRegistrar",outputs:[{name:"",type:"address"}],type:"function"},{constant:!1,inputs:[{name:"_name",type:"bytes32"},{name:"_newOwner",type:"address"}],name:"transfer",outputs:[],type:"function"},{constant:!1,inputs:[{name:"_name",type:"bytes32"},{name:"_registrar",type:"address"}],name:"setSubRegistrar",outputs:[],type:"function"},{constant:!1,inputs:[],name:"Registrar",outputs:[],type:"function"},{constant:!1,inputs:[{name:"_name",type:"bytes32"},{name:"_a",type:"address"},{name:"_primary",type:"bool"}],name:"setAddress",outputs:[],type:"function"},{constant:!1,inputs:[{name:"_name",type:"bytes32"},{name:"_content",type:"bytes32"}],name:"setContent",outputs:[],type:"function"},{constant:!1,inputs:[{name:"_name",type:"bytes32"}],name:"disown",outputs:[],type:"function"},{anonymous:!1,inputs:[{indexed:!0,name:"_name",type:"bytes32"},{indexed:!1,name:"_winner",type:"address"}],name:"AuctionEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"_name",type:"bytes32"},{indexed:!1,name:"_bidder",type:"address"},{indexed:!1,name:"_value",type:"uint256"}],name:"NewBid",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"name",type:"bytes32"}],name:"Changed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"name",type:"bytes32"},{indexed:!0,name:"addr",type:"address"}],name:"PrimaryChanged",type:"event"}]},{}],2:[function(t,e,n){e.exports=[{constant:!0,inputs:[{name:"_name",type:"bytes32"}],name:"owner",outputs:[{name:"",type:"address"}],type:"function"},{constant:!1,inputs:[{name:"_name",type:"bytes32"},{name:"_refund",type:"address"}],name:"disown",outputs:[],type:"function"},{constant:!0,inputs:[{name:"_name",type:"bytes32"}],name:"addr",outputs:[{name:"",type:"address"}],type:"function"},{constant:!1,inputs:[{name:"_name",type:"bytes32"}],name:"reserve",outputs:[],type:"function"},{constant:!1,inputs:[{name:"_name",type:"bytes32"},{name:"_newOwner",type:"address"}],name:"transfer",outputs:[],type:"function"},{constant:!1,inputs:[{name:"_name",type:"bytes32"},{name:"_a",type:"address"}],name:"setAddr",outputs:[],type:"function"},{anonymous:!1,inputs:[{indexed:!0,name:"name",type:"bytes32"}],name:"Changed",type:"event"}]},{}],3:[function(t,e,n){e.exports=[{constant:!1,inputs:[{name:"from",type:"bytes32"},{name:"to",type:"address"},{name:"value",type:"uint256"}],name:"transfer",outputs:[],type:"function"},{constant:!1,inputs:[{name:"from",type:"bytes32"},{name:"to",type:"address"},{name:"indirectId",type:"bytes32"},{name:"value",type:"uint256"}],name:"icapTransfer",outputs:[],type:"function"},{constant:!1,inputs:[{name:"to",type:"bytes32"}],name:"deposit",outputs:[],type:"function"},{anonymous:!1,inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"AnonymousDeposit",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"bytes32"},{indexed:!1,name:"value",type:"uint256"}],name:"Deposit",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"from",type:"bytes32"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Transfer",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"from",type:"bytes32"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"indirectId",type:"bytes32"},{indexed:!1,name:"value",type:"uint256"}],name:"IcapTransfer",type:"event"}]},{}],4:[function(t,e,n){var r=t("./formatters"),o=t("./type"),i=function(){this._inputFormatter=r.formatInputInt,this._outputFormatter=r.formatOutputAddress};i.prototype=new o({}),i.prototype.constructor=i,i.prototype.isType=function(t){return!!t.match(/address(\[([0-9]*)\])?/)},i.prototype.staticPartLength=function(t){return 32*this.staticArrayLength(t)},e.exports=i},{"./formatters":9,"./type":14}],5:[function(t,e,n){var r=t("./formatters"),o=t("./type"),i=function(){this._inputFormatter=r.formatInputBool,this._outputFormatter=r.formatOutputBool};i.prototype=new o({}),i.prototype.constructor=i,i.prototype.isType=function(t){return!!t.match(/^bool(\[([0-9]*)\])*$/)},i.prototype.staticPartLength=function(t){return 32*this.staticArrayLength(t)},e.exports=i},{"./formatters":9,"./type":14}],6:[function(t,e,n){var r=t("./formatters"),o=t("./type"),i=function(){this._inputFormatter=r.formatInputBytes,this._outputFormatter=r.formatOutputBytes};i.prototype=new o({}),i.prototype.constructor=i,i.prototype.isType=function(t){return!!t.match(/^bytes([0-9]{1,})(\[([0-9]*)\])*$/)},i.prototype.staticPartLength=function(t){var e=t.match(/^bytes([0-9]*)/),n=parseInt(e[1]);return n*this.staticArrayLength(t)},e.exports=i},{"./formatters":9,"./type":14}],7:[function(t,e,n){var r=t("./formatters"),o=t("./address"),i=t("./bool"),a=t("./int"),s=t("./uint"),u=t("./dynamicbytes"),c=t("./string"),f=t("./real"),l=t("./ureal"),p=t("./bytes"),h=function(t){this._types=t};h.prototype._requireType=function(t){var e=this._types.filter(function(e){return e.isType(t)})[0];if(!e)throw Error("invalid solidity type!: "+t);return e},h.prototype.encodeParam=function(t,e){return this.encodeParams([t],[e])},h.prototype.encodeParams=function(t,e){var n=this.getSolidityTypes(t),r=n.map(function(n,r){return n.encode(e[r],t[r])}),o=n.reduce(function(e,n,r){return e+n.staticPartLength(t[r])},0),i=this.encodeMultiWithOffset(t,n,r,o);return i},h.prototype.encodeMultiWithOffset=function(t,e,n,o){var i="",a=this,s=function(n){return e[n].isDynamicArray(t[n])||e[n].isDynamicType(t[n])};return t.forEach(function(u,c){if(s(c)){i+=r.formatInputInt(o).encode();var f=a.encodeWithOffset(t[c],e[c],n[c],o);o+=f.length/2}else i+=a.encodeWithOffset(t[c],e[c],n[c],o)}),t.forEach(function(r,u){if(s(u)){var c=a.encodeWithOffset(t[u],e[u],n[u],o);o+=c.length/2,i+=c}}),i},h.prototype.encodeWithOffset=function(t,e,n,o){var i=this;return e.isDynamicArray(t)?function(){var a=e.nestedName(t),s=e.staticPartLength(a),u=n[0];return function(){var t=2;if(e.isDynamicArray(a))for(var i=1;i<n.length;i++)t+=+n[i-1][0]||0,u+=r.formatInputInt(o+i*s+32*t).encode()}(),function(){for(var t=0;t<n.length-1;t++){var r=u/2;u+=i.encodeWithOffset(a,e,n[t+1],o+r)}}(),u}():e.isStaticArray(t)?function(){var a=e.nestedName(t),s=e.staticPartLength(a),u="";return e.isDynamicArray(a)&&!function(){for(var t=0,e=0;e<n.length;e++)t+=+(n[e-1]||[])[0]||0,u+=r.formatInputInt(o+e*s+32*t).encode()}(),function(){for(var t=0;t<n.length;t++){var r=u/2;u+=i.encodeWithOffset(a,e,n[t],o+r)}}(),u}():n},h.prototype.decodeParam=function(t,e){return this.decodeParams([t],e)[0]},h.prototype.decodeParams=function(t,e){var n=this.getSolidityTypes(t),r=this.getOffsets(t,n);return n.map(function(n,o){return n.decode(e,r[o],t[o],o)})},h.prototype.getOffsets=function(t,e){for(var n=e.map(function(e,n){return e.staticPartLength(t[n])}),r=1;r<n.length;r++)n[r]+=n[r-1];return n.map(function(n,r){var o=e[r].staticPartLength(t[r]);return n-o})},h.prototype.getSolidityTypes=function(t){var e=this;return t.map(function(t){return e._requireType(t)})};var m=new h([new o,new i,new a,new s,new u,new p,new c,new f,new l]);e.exports=m},{"./address":4,"./bool":5,"./bytes":6,"./dynamicbytes":8,"./formatters":9,"./int":10,"./real":12,"./string":13,"./uint":15,"./ureal":16}],8:[function(t,e,n){var r=t("./formatters"),o=t("./type"),i=function(){this._inputFormatter=r.formatInputDynamicBytes,this._outputFormatter=r.formatOutputDynamicBytes};i.prototype=new o({}),i.prototype.constructor=i,i.prototype.isType=function(t){return!!t.match(/^bytes(\[([0-9]*)\])*$/)},i.prototype.staticPartLength=function(t){return 32*this.staticArrayLength(t)},i.prototype.isDynamicType=function(){return!0},e.exports=i},{"./formatters":9,"./type":14}],9:[function(t,e,n){var r=t("bignumber.js"),o=t("../utils/utils"),i=t("../utils/config"),a=t("./param"),s=function(t){r.config(i.ETH_BIGNUMBER_ROUNDING_MODE);var e=o.padLeft(o.toTwosComplement(t).round().toString(16),64);return new a(e)},u=function(t){var e=o.toHex(t).substr(2),n=Math.floor((e.length+63)/64);return e=o.padRight(e,64*n),new a(e)},c=function(t){var e=o.toHex(t).substr(2),n=e.length/2,r=Math.floor((e.length+63)/64);return e=o.padRight(e,64*r),new a(s(n).value+e)},f=function(t){var e=o.fromUtf8(t).substr(2),n=e.length/2,r=Math.floor((e.length+63)/64);return e=o.padRight(e,64*r),new a(s(n).value+e)},l=function(t){var e="000000000000000000000000000000000000000000000000000000000000000"+(t?"1":"0");return new a(e)},p=function(t){return s(new r(t).times(new r(2).pow(128)))},h=function(t){return"1"===new r(t.substr(0,1),16).toString(2).substr(0,1)},m=function(t){var e=t.staticPart()||"0";return h(e)?new r(e,16).minus(new r("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16)).minus(1):new r(e,16)},d=function(t){var e=t.staticPart()||"0";return new r(e,16)},y=function(t){return m(t).dividedBy(new r(2).pow(128))},g=function(t){return d(t).dividedBy(new r(2).pow(128))},v=function(t){return"0000000000000000000000000000000000000000000000000000000000000001"===t.staticPart()?!0:!1},b=function(t){return"0x"+t.staticPart()},w=function(t){var e=2*new r(t.dynamicPart().slice(0,64),16).toNumber();return"0x"+t.dynamicPart().substr(64,e)},_=function(t){var e=2*new r(t.dynamicPart().slice(0,64),16).toNumber();return o.toUtf8(t.dynamicPart().substr(64,e))},x=function(t){var e=t.staticPart();return"0x"+e.slice(e.length-40,e.length)};e.exports={formatInputInt:s,formatInputBytes:u,formatInputDynamicBytes:c,formatInputString:f,formatInputBool:l,formatInputReal:p,formatOutputInt:m,formatOutputUInt:d,formatOutputReal:y,formatOutputUReal:g,formatOutputBool:v,formatOutputBytes:b,formatOutputDynamicBytes:w,formatOutputString:_,formatOutputAddress:x}},{"../utils/config":18,"../utils/utils":20,"./param":11,"bignumber.js":"bignumber.js"}],10:[function(t,e,n){var r=t("./formatters"),o=t("./type"),i=function(){this._inputFormatter=r.formatInputInt,this._outputFormatter=r.formatOutputInt};i.prototype=new o({}),i.prototype.constructor=i,i.prototype.isType=function(t){return!!t.match(/^int([0-9]*)?(\[([0-9]*)\])*$/)},i.prototype.staticPartLength=function(t){return 32*this.staticArrayLength(t)},e.exports=i},{"./formatters":9,"./type":14}],11:[function(t,e,n){var r=t("../utils/utils"),o=function(t,e){this.value=t||"",this.offset=e};o.prototype.dynamicPartLength=function(){return this.dynamicPart().length/2},o.prototype.withOffset=function(t){return new o(this.value,t)},o.prototype.combine=function(t){return new o(this.value+t.value)},o.prototype.isDynamic=function(){return void 0!==this.offset},o.prototype.offsetAsBytes=function(){return this.isDynamic()?r.padLeft(r.toTwosComplement(this.offset).toString(16),64):""},o.prototype.staticPart=function(){return this.isDynamic()?this.offsetAsBytes():this.value},o.prototype.dynamicPart=function(){return this.isDynamic()?this.value:""},o.prototype.encode=function(){return this.staticPart()+this.dynamicPart()},o.encodeList=function(t){var e=32*t.length,n=t.map(function(t){if(!t.isDynamic())return t;var n=e;return e+=t.dynamicPartLength(),t.withOffset(n)});return n.reduce(function(t,e){return t+e.dynamicPart()},n.reduce(function(t,e){return t+e.staticPart()},""))},e.exports=o},{"../utils/utils":20}],12:[function(t,e,n){var r=t("./formatters"),o=t("./type"),i=function(){this._inputFormatter=r.formatInputReal,this._outputFormatter=r.formatOutputReal};i.prototype=new o({}),i.prototype.constructor=i,i.prototype.isType=function(t){return!!t.match(/real([0-9]*)?(\[([0-9]*)\])?/)},i.prototype.staticPartLength=function(t){return 32*this.staticArrayLength(t)},e.exports=i},{"./formatters":9,"./type":14}],13:[function(t,e,n){var r=t("./formatters"),o=t("./type"),i=function(){this._inputFormatter=r.formatInputString,this._outputFormatter=r.formatOutputString};i.prototype=new o({}),i.prototype.constructor=i,i.prototype.isType=function(t){return!!t.match(/^string(\[([0-9]*)\])*$/)},i.prototype.staticPartLength=function(t){return 32*this.staticArrayLength(t)},i.prototype.isDynamicType=function(){return!0},e.exports=i},{"./formatters":9,"./type":14}],14:[function(t,e,n){var r=t("./formatters"),o=t("./param"),i=function(t){this._inputFormatter=t.inputFormatter,this._outputFormatter=t.outputFormatter};i.prototype.isType=function(t){throw"this method should be overrwritten for type "+t},i.prototype.staticPartLength=function(t){throw"this method should be overrwritten for type: "+t},i.prototype.isDynamicArray=function(t){var e=this.nestedTypes(t);return!!e&&!e[e.length-1].match(/[0-9]{1,}/g)},i.prototype.isStaticArray=function(t){var e=this.nestedTypes(t);return!!e&&!!e[e.length-1].match(/[0-9]{1,}/g)},i.prototype.staticArrayLength=function(t){var e=this.nestedTypes(t);return e?parseInt(e[e.length-1].match(/[0-9]{1,}/g)||1):1},i.prototype.nestedName=function(t){var e=this.nestedTypes(t);return e?t.substr(0,t.length-e[e.length-1].length):t},i.prototype.isDynamicType=function(){return!1},i.prototype.nestedTypes=function(t){return t.match(/(\[[0-9]*\])/g)},i.prototype.encode=function(t,e){var n=this;return this.isDynamicArray(e)?function(){var o=t.length,i=n.nestedName(e),a=[];return a.push(r.formatInputInt(o).encode()),t.forEach(function(t){a.push(n.encode(t,i))}),a}():this.isStaticArray(e)?function(){for(var r=n.staticArrayLength(e),o=n.nestedName(e),i=[],a=0;r>a;a++)i.push(n.encode(t[a],o));return i}():this._inputFormatter(t,e).encode()},i.prototype.decode=function(t,e,n){var r=this;if(this.isDynamicArray(n))return function(){for(var o=parseInt("0x"+t.substr(2*e,64)),i=parseInt("0x"+t.substr(2*o,64)),a=o+32,s=r.nestedName(n),u=r.staticPartLength(s),c=32*Math.floor((u+31)/32),f=[],l=0;i*c>l;l+=c)f.push(r.decode(t,a+l,s));return f}();if(this.isStaticArray(n))return function(){for(var o=r.staticArrayLength(n),i=e,a=r.nestedName(n),s=r.staticPartLength(a),u=32*Math.floor((s+31)/32),c=[],f=0;o*u>f;f+=u)c.push(r.decode(t,i+f,a));return c}();if(this.isDynamicType(n))return function(){var n=parseInt("0x"+t.substr(2*e,64)),i=parseInt("0x"+t.substr(2*n,64)),a=Math.floor((i+31)/32);return r._outputFormatter(new o(t.substr(2*n,64*(1+a)),0))}();var i=this.staticPartLength(n);return this._outputFormatter(new o(t.substr(2*e,2*i)))},e.exports=i},{"./formatters":9,"./param":11}],15:[function(t,e,n){var r=t("./formatters"),o=t("./type"),i=function(){this._inputFormatter=r.formatInputInt,this._outputFormatter=r.formatOutputUInt};i.prototype=new o({}),i.prototype.constructor=i,i.prototype.isType=function(t){return!!t.match(/^uint([0-9]*)?(\[([0-9]*)\])*$/)},i.prototype.staticPartLength=function(t){return 32*this.staticArrayLength(t)},e.exports=i},{"./formatters":9,"./type":14}],16:[function(t,e,n){var r=t("./formatters"),o=t("./type"),i=function(){this._inputFormatter=r.formatInputReal,this._outputFormatter=r.formatOutputUReal};i.prototype=new o({}),i.prototype.constructor=i,i.prototype.isType=function(t){return!!t.match(/^ureal([0-9]*)?(\[([0-9]*)\])*$/)},i.prototype.staticPartLength=function(t){return 32*this.staticArrayLength(t)},e.exports=i},{"./formatters":9,"./type":14}],17:[function(t,e,n){"use strict";"undefined"==typeof XMLHttpRequest?n.XMLHttpRequest={}:n.XMLHttpRequest=XMLHttpRequest},{}],18:[function(t,e,n){var r=t("bignumber.js"),o=["wei","kwei","Mwei","Gwei","szabo","finney","femtoether","picoether","nanoether","microether","milliether","nano","micro","milli","ether","grand","Mether","Gether","Tether","Pether","Eether","Zether","Yether","Nether","Dether","Vether","Uether"];e.exports={ETH_PADDING:32,ETH_SIGNATURE_LENGTH:4,ETH_UNITS:o,ETH_BIGNUMBER_ROUNDING_MODE:{ROUNDING_MODE:r.ROUND_DOWN},ETH_POLLING_TIMEOUT:500,defaultBlock:"latest",defaultAccount:void 0}},{"bignumber.js":"bignumber.js"}],19:[function(t,e,n){var r=t("./utils"),o=t("crypto-js/sha3");e.exports=function(t,e){return"0x"!==t.substr(0,2)||e||(console.warn("requirement of using web3.fromAscii before sha3 is deprecated"),console.warn("new usage: 'web3.sha3(\"hello\")'"),console.warn("see https://github.com/ethereum/web3.js/pull/205"),console.warn("if you need to hash hex value, you can do 'sha3(\"0xfff\", true)'"),t=r.toUtf8(t)),o(t,{outputLength:256}).toString()}},{"./utils":20,"crypto-js/sha3":48}],20:[function(t,e,n){var r=t("bignumber.js"),o=t("utf8"),i={wei:"1",kwei:"1000",ada:"1000",femtoether:"1000",mwei:"1000000",babbage:"1000000",picoether:"1000000",gwei:"1000000000",shannon:"1000000000",nanoether:"1000000000",nano:"1000000000",szabo:"1000000000000",microether:"1000000000000",micro:"1000000000000",finney:"1000000000000000",milliether:"1000000000000000",milli:"1000000000000000",ether:"1000000000000000000",kether:"1000000000000000000000",grand:"1000000000000000000000",einstein:"1000000000000000000000",mether:"1000000000000000000000000",gether:"1000000000000000000000000000",tether:"1000000000000000000000000000000"},a=function(t,e,n){return new Array(e-t.length+1).join(n?n:"0")+t},s=function(t,e,n){return t+new Array(e-t.length+1).join(n?n:"0")},u=function(t){var e="",n=0,r=t.length;for("0x"===t.substring(0,2)&&(n=2);r>n;n+=2){var i=parseInt(t.substr(n,2),16);e+=String.fromCharCode(i)}return o.decode(e)},c=function(t){var e="",n=0,r=t.length;for("0x"===t.substring(0,2)&&(n=2);r>n;n+=2){var o=parseInt(t.substr(n,2),16);e+=String.fromCharCode(o)}return e},f=function(t){t=o.encode(t);for(var e="",n=0;n<t.length;n++){var r=t.charCodeAt(n).toString(16);e+=r.length<2?"0"+r:r}return"0x"+e},l=function(t){for(var e="",n=0;n<t.length;n++){var r=t.charCodeAt(n),o=r.toString(16);e+=o.length<2?"0"+o:o}return"0x"+e},p=function(t){if(-1!==t.name.indexOf("("))return t.name;var e=t.inputs.map(function(t){return t.type}).join();return t.name+"("+e+")"},h=function(t){var e=t.indexOf("(");return-1!==e?t.substr(0,e):t},m=function(t){var e=t.indexOf("(");return-1!==e?t.substr(e+1,t.length-1-(e+1)).replace(" ",""):""},d=function(t){return _(t).toNumber()},y=function(t){var e=_(t),n=e.toString(16);return e.lessThan(0)?"-0x"+n.substr(1):"0x"+n},g=function(t){if(O(t))return y(+t);if(k(t))return y(t);if(T(t))return f(JSON.stringify(t));if(B(t)){if(0===t.indexOf("-0x"))return y(t);if(0===t.indexOf("0x"))return t;if(!isFinite(t))return l(t)}return y(t)},v=function(t){t=t?t.toLowerCase():"ether";var e=i[t];if(void 0===e)throw new Error("This unit doesn't exists, please use the one of the following units"+JSON.stringify(i,null,2));return new r(e,10)},b=function(t,e){var n=_(t).dividedBy(v(e));return k(t)?n:n.toString(10)},w=function(t,e){var n=_(t).times(v(e));return k(t)?n:n.toString(10)},_=function(t){return t=t||0,k(t)?t:!B(t)||0!==t.indexOf("0x")&&0!==t.indexOf("-0x")?new r(t.toString(10),10):new r(t.replace("0x",""),16)},x=function(t){var e=_(t);return e.lessThan(0)?new r("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16).plus(e).plus(1):e},I=function(t){return/^0x[0-9a-f]{40}$/i.test(t)},F=function(t){return/^(0x)?[0-9a-f]{40}$/i.test(t)},N=function(t){return I(t)?t:/^[0-9a-f]{40}$/.test(t)?"0x"+t:"0x"+a(g(t).substr(2),40)},k=function(t){return t instanceof r||t&&t.constructor&&"BigNumber"===t.constructor.name},B=function(t){return"string"==typeof t||t&&t.constructor&&"String"===t.constructor.name},A=function(t){return"function"==typeof t},T=function(t){return"object"==typeof t},O=function(t){return"boolean"==typeof t},P=function(t){return t instanceof Array},C=function(t){try{return!!JSON.parse(t)}catch(e){return!1}};e.exports={padLeft:a,padRight:s,toHex:g,toDecimal:d,fromDecimal:y,toUtf8:u,toAscii:c,fromUtf8:f,fromAscii:l,transformToFullName:p,extractDisplayName:h,extractTypeName:m,toWei:w,fromWei:b,toBigNumber:_,toTwosComplement:x,toAddress:N,isBigNumber:k,isStrictAddress:I,isAddress:F,isFunction:A,isString:B,isObject:T,isBoolean:O,isArray:P,isJson:C}},{"bignumber.js":"bignumber.js",utf8:50}],21:[function(t,e,n){e.exports={version:"0.13.0"}},{}],22:[function(t,e,n){var r=t("./version.json"),o=t("./web3/methods/net"),i=t("./web3/methods/eth"),a=t("./web3/methods/db"),s=t("./web3/methods/shh"),u=t("./web3/methods/watches"),c=t("./web3/filter"),f=t("./web3/syncing"),l=t("./utils/utils"),p=t("./web3/formatters"),h=t("./web3/requestmanager"),m=t("./utils/config"),d=t("./web3/property"),y=t("./web3/batch"),g=t("./utils/sha3"),v=t("./web3/iban"),b=[new d({name:"version.client",getter:"web3_clientVersion"}),new d({name:"version.network",getter:"net_version",inputFormatter:l.toDecimal}),new d({name:"version.ethereum",getter:"eth_protocolVersion",inputFormatter:l.toDecimal}),new d({name:"version.whisper",getter:"shh_version",inputFormatter:l.toDecimal})],w=function(t,e){e.forEach(function(e){e.attachToObject(t)})},_=function(t,e){e.forEach(function(e){e.attachToObject(t)})},x={};x.providers={},x.currentProvider=null,x.version={},x.version.api=r.version,x.eth={},x.eth.isSyncing=function(t){return new f(t)},x.eth.filter=function(t,e){return new c(t,u.eth(),p.outputLogFormatter,e)},x.shh={},x.shh.filter=function(t,e){return new c(t,u.shh(),p.outputPostFormatter,e)},x.net={},x.db={},x.setProvider=function(t){this.currentProvider=t,h.getInstance().setProvider(t)},x.isConnected=function(){return this.currentProvider&&this.currentProvider.isConnected()},x.reset=function(t){h.getInstance().reset(t),m.defaultBlock="latest",m.defaultAccount=void 0},x.toHex=l.toHex,x.toAscii=l.toAscii,x.toUtf8=l.toUtf8,x.fromAscii=l.fromAscii,x.fromUtf8=l.fromUtf8,x.toDecimal=l.toDecimal,x.fromDecimal=l.fromDecimal,x.toBigNumber=l.toBigNumber,x.toWei=l.toWei,x.fromWei=l.fromWei,x.isAddress=l.isAddress,x.isIBAN=l.isIBAN,x.sha3=g,x.createBatch=function(){return new y},x.fromICAP=function(t){var e=new v(t);return e.address()},Object.defineProperty(x.eth,"defaultBlock",{get:function(){return m.defaultBlock},set:function(t){return m.defaultBlock=t,t}}),Object.defineProperty(x.eth,"defaultAccount",{get:function(){return m.defaultAccount},set:function(t){return m.defaultAccount=t,t}}),x._extend=function(t){t.property&&!x[t.property]&&(x[t.property]={}),w(x[t.property]||x,t.methods||[]),_(x[t.property]||x,t.properties||[])},x._extend.formatters=p,x._extend.utils=l,x._extend.Method=t("./web3/method"),x._extend.Property=t("./web3/property"),_(x,b),w(x.net,o.methods),_(x.net,o.properties),w(x.eth,i.methods),_(x.eth,i.properties),w(x.db,a.methods),w(x.shh,s.methods),e.exports=x},{"./utils/config":18,"./utils/sha3":19,"./utils/utils":20,"./version.json":21,"./web3/batch":24,"./web3/filter":28,"./web3/formatters":29,"./web3/iban":32,"./web3/method":35,"./web3/methods/db":36,"./web3/methods/eth":37,"./web3/methods/net":38,"./web3/methods/shh":39,"./web3/methods/watches":40,"./web3/property":42,"./web3/requestmanager":43,"./web3/syncing":44}],23:[function(t,e,n){var r=t("../utils/sha3"),o=t("./event"),i=t("./formatters"),a=t("../utils/utils"),s=t("./filter"),u=t("./methods/watches"),c=function(t,e){this._json=t,this._address=e};c.prototype.encode=function(t){t=t||{};var e={};return["fromBlock","toBlock"].filter(function(e){return void 0!==t[e]}).forEach(function(n){e[n]=i.inputBlockNumberFormatter(t[n])}),e.address=this._address,e},c.prototype.decode=function(t){t.data=t.data||"",t.topics=t.topics||[];var e=t.topics[0].slice(2),n=this._json.filter(function(t){return e===r(a.transformToFullName(t))})[0];if(!n)return console.warn("cannot find event for log"),t;var i=new o(n,this._address);return i.decode(t)},c.prototype.execute=function(t,e){a.isFunction(arguments[arguments.length-1])&&(e=arguments[arguments.length-1],1===arguments.length&&(t=null));var n=this.encode(t),r=this.decode.bind(this);return new s(n,u.eth(),r,e)},c.prototype.attachToContract=function(t){var e=this.execute.bind(this);t.allEvents=e},e.exports=c},{"../utils/sha3":19,"../utils/utils":20,"./event":27,"./filter":28,"./formatters":29,"./methods/watches":40}],24:[function(t,e,n){var r=t("./requestmanager"),o=t("./jsonrpc"),i=t("./errors"),a=function(){this.requests=[]};a.prototype.add=function(t){this.requests.push(t)},a.prototype.execute=function(){var t=this.requests;r.getInstance().sendBatch(t,function(e,n){n=n||[],t.map(function(t,e){return n[e]||{}}).forEach(function(e,n){if(t[n].callback){if(!o.getInstance().isValidResponse(e))return t[n].callback(i.InvalidResponse(e));t[n].callback(null,t[n].format?t[n].format(e.result):e.result)}})})},e.exports=a},{"./errors":26,"./jsonrpc":34,"./requestmanager":43}],25:[function(t,e,n){var r=t("../web3"),o=t("../utils/utils"),i=t("../solidity/coder"),a=t("./event"),s=t("./function"),u=t("./allevents"),c=function(t,e){return t.filter(function(t){return"constructor"===t.type&&t.inputs.length===e.length}).map(function(t){return t.inputs.map(function(t){return t.type})}).map(function(t){return i.encodeParams(t,e)})[0]||""},f=function(t,e){e.filter(function(t){return"function"===t.type}).map(function(e){return new s(e,t.address)}).forEach(function(e){e.attachToContract(t)})},l=function(t,e){var n=e.filter(function(t){return"event"===t.type}),r=new u(n,t.address);r.attachToContract(t),n.map(function(e){return new a(e,t.address)}).forEach(function(e){e.attachToContract(t)})},p=function(t){return new m(t)},h=function(t,e,n){var o=0,i=!1,a=r.eth.filter("latest",function(s){if(!s&&!i)if(o++,o>50){if(a.stopWatching(),i=!0,!n)throw new Error("Contract transaction couldn't be found after 50 blocks");n(new Error("Contract transaction couldn't be found after 50 blocks"))}else r.eth.getTransactionReceipt(t.transactionHash,function(o,s){s&&!i&&r.eth.getCode(s.contractAddress,function(r,o){if(!i)if(a.stopWatching(),i=!0,o.length>2)t.address=s.contractAddress,f(t,e),l(t,e),n&&n(null,t);else{if(!n)throw new Error("The contract code couldn't be stored, please check your gas amount.");n(new Error("The contract code couldn't be stored, please check your gas amount."))}})})})},m=function(t){this.abi=t};m.prototype["new"]=function(){var t,e=this,n=new d(this.abi),i={},a=Array.prototype.slice.call(arguments);o.isFunction(a[a.length-1])&&(t=a.pop());var s=a[a.length-1];o.isObject(s)&&!o.isArray(s)&&(i=a.pop());var u=c(this.abi,a);if(i.data+=u,t)r.eth.sendTransaction(i,function(r,o){r?t(r):(n.transactionHash=o,t(null,n),h(n,e.abi,t))});else{var f=r.eth.sendTransaction(i);n.transactionHash=f,h(n,e.abi)}return n},m.prototype.at=function(t,e){var n=new d(this.abi,t);return f(n,this.abi),l(n,this.abi),e&&e(null,n),n};var d=function(t,e){this.address=e};e.exports=p},{"../solidity/coder":7,"../utils/utils":20,"../web3":22,"./allevents":23,"./event":27,"./function":30}],26:[function(t,e,n){e.exports={InvalidNumberOfParams:function(){return new Error("Invalid number of input parameters")},InvalidConnection:function(t){return new Error("CONNECTION ERROR: Couldn't connect to node "+t+", is it running?")},InvalidProvider:function(){return new Error("Provider not set or invalid")},InvalidResponse:function(t){var e=t&&t.error&&t.error.message?t.error.message:"Invalid JSON RPC response: "+t;return new Error(e)}}},{}],27:[function(t,e,n){var r=t("../utils/utils"),o=t("../solidity/coder"),i=t("./formatters"),a=t("../utils/sha3"),s=t("./filter"),u=t("./methods/watches"),c=function(t,e){this._params=t.inputs,this._name=r.transformToFullName(t),this._address=e,this._anonymous=t.anonymous};c.prototype.types=function(t){return this._params.filter(function(e){return e.indexed===t}).map(function(t){return t.type})},c.prototype.displayName=function(){return r.extractDisplayName(this._name)},c.prototype.typeName=function(){return r.extractTypeName(this._name)},c.prototype.signature=function(){return a(this._name)},c.prototype.encode=function(t,e){t=t||{},e=e||{};var n={};["fromBlock","toBlock"].filter(function(t){return void 0!==e[t]}).forEach(function(t){n[t]=i.inputBlockNumberFormatter(e[t])}),n.topics=[],n.address=this._address,this._anonymous||n.topics.push("0x"+this.signature());var a=this._params.filter(function(t){return t.indexed===!0}).map(function(e){var n=t[e.name];return void 0===n||null===n?null:r.isArray(n)?n.map(function(t){return"0x"+o.encodeParam(e.type,t)}):"0x"+o.encodeParam(e.type,n)});return n.topics=n.topics.concat(a),n},c.prototype.decode=function(t){t.data=t.data||"",t.topics=t.topics||[];var e=this._anonymous?t.topics:t.topics.slice(1),n=e.map(function(t){return t.slice(2)}).join(""),r=o.decodeParams(this.types(!0),n),a=t.data.slice(2),s=o.decodeParams(this.types(!1),a),u=i.outputLogFormatter(t);return u.event=this.displayName(),u.address=t.address,u.args=this._params.reduce(function(t,e){return t[e.name]=e.indexed?r.shift():s.shift(),t},{}),delete u.data,delete u.topics,u},c.prototype.execute=function(t,e,n){r.isFunction(arguments[arguments.length-1])&&(n=arguments[arguments.length-1],2===arguments.length&&(e=null),1===arguments.length&&(e=null,t={}));var o=this.encode(t,e),i=this.decode.bind(this);return new s(o,u.eth(),i,n)},c.prototype.attachToContract=function(t){var e=this.execute.bind(this),n=this.displayName();t[n]||(t[n]=e),t[n][this.typeName()]=this.execute.bind(this,t)},e.exports=c},{"../solidity/coder":7,"../utils/sha3":19,"../utils/utils":20,"./filter":28,"./formatters":29,"./methods/watches":40}],28:[function(t,e,n){var r=t("./requestmanager"),o=t("./formatters"),i=t("../utils/utils"),a=function(t){return null===t||"undefined"==typeof t?null:(t=String(t),0===t.indexOf("0x")?t:i.fromUtf8(t))},s=function(t){return i.isString(t)?t:(t=t||{},t.topics=t.topics||[],t.topics=t.topics.map(function(t){return i.isArray(t)?t.map(a):a(t)}),{topics:t.topics,to:t.to,address:t.address,fromBlock:o.inputBlockNumberFormatter(t.fromBlock),toBlock:o.inputBlockNumberFormatter(t.toBlock)})},u=function(t,e){i.isString(t.options)||t.get(function(t,n){t&&e(t),i.isArray(n)&&n.forEach(function(t){e(null,t)})})},c=function(t){var e=function(e,n){return e?t.callbacks.forEach(function(t){t(e)}):void(i.isArray(n)&&n.forEach(function(e){e=t.formatter?t.formatter(e):e,t.callbacks.forEach(function(t){t(null,e)})}))};r.getInstance().startPolling({method:t.implementation.poll.call,params:[t.filterId]},t.filterId,e,t.stopWatching.bind(t))},f=function(t,e,n,r){var o=this,i={};return e.forEach(function(t){t.attachToObject(i)}),this.options=s(t),this.implementation=i,this.filterId=null,this.callbacks=[],this.getLogsCallbacks=[],this.pollFilters=[],this.formatter=n,this.implementation.newFilter(this.options,function(t,e){if(t)o.callbacks.forEach(function(e){e(t)});else if(o.filterId=e,o.getLogsCallbacks.forEach(function(t){o.get(t)}),o.getLogsCallbacks=[],o.callbacks.forEach(function(t){u(o,t)}),o.callbacks.length>0&&c(o),r)return o.watch(r)}),this};f.prototype.watch=function(t){return this.callbacks.push(t),this.filterId&&(u(this,t),c(this)),this},f.prototype.stopWatching=function(){r.getInstance().stopPolling(this.filterId),this.implementation.uninstallFilter(this.filterId,function(){}),this.callbacks=[]},f.prototype.get=function(t){var e=this;if(!i.isFunction(t)){if(null===this.filterId)throw new Error("Filter ID Error: filter().get() can't be chained synchronous, please provide a callback for the get() method.");var n=this.implementation.getLogs(this.filterId);return n.map(function(t){return e.formatter?e.formatter(t):t})}return null===this.filterId?this.getLogsCallbacks.push(t):this.implementation.getLogs(this.filterId,function(n,r){
n?t(n):t(null,r.map(function(t){return e.formatter?e.formatter(t):t}))}),this},e.exports=f},{"../utils/utils":20,"./formatters":29,"./requestmanager":43}],29:[function(t,e,n){var r=t("../utils/utils"),o=t("../utils/config"),i=t("./iban"),a=function(t){return r.toBigNumber(t)},s=function(t){return"latest"===t||"pending"===t||"earliest"===t},u=function(t){return void 0===t?o.defaultBlock:c(t)},c=function(t){return void 0===t?void 0:s(t)?t:r.toHex(t)},f=function(t){return t.from=t.from||o.defaultAccount,t.from&&(t.from=v(t.from)),t.to&&(t.to=v(t.to)),["gasPrice","gas","value","nonce"].filter(function(e){return void 0!==t[e]}).forEach(function(e){t[e]=r.fromDecimal(t[e])}),t},l=function(t){return t.from=t.from||o.defaultAccount,t.from=v(t.from),t.to&&(t.to=v(t.to)),["gasPrice","gas","value","nonce"].filter(function(e){return void 0!==t[e]}).forEach(function(e){t[e]=r.fromDecimal(t[e])}),t},p=function(t){return null!==t.blockNumber&&(t.blockNumber=r.toDecimal(t.blockNumber)),null!==t.transactionIndex&&(t.transactionIndex=r.toDecimal(t.transactionIndex)),t.nonce=r.toDecimal(t.nonce),t.gas=r.toDecimal(t.gas),t.gasPrice=r.toBigNumber(t.gasPrice),t.value=r.toBigNumber(t.value),t},h=function(t){return null!==t.blockNumber&&(t.blockNumber=r.toDecimal(t.blockNumber)),null!==t.transactionIndex&&(t.transactionIndex=r.toDecimal(t.transactionIndex)),t.cumulativeGasUsed=r.toDecimal(t.cumulativeGasUsed),t.gasUsed=r.toDecimal(t.gasUsed),r.isArray(t.logs)&&(t.logs=t.logs.map(function(t){return d(t)})),t},m=function(t){return t.gasLimit=r.toDecimal(t.gasLimit),t.gasUsed=r.toDecimal(t.gasUsed),t.size=r.toDecimal(t.size),t.timestamp=r.toDecimal(t.timestamp),null!==t.number&&(t.number=r.toDecimal(t.number)),t.difficulty=r.toBigNumber(t.difficulty),t.totalDifficulty=r.toBigNumber(t.totalDifficulty),r.isArray(t.transactions)&&t.transactions.forEach(function(t){return r.isString(t)?void 0:p(t)}),t},d=function(t){return null!==t.blockNumber&&(t.blockNumber=r.toDecimal(t.blockNumber)),null!==t.transactionIndex&&(t.transactionIndex=r.toDecimal(t.transactionIndex)),null!==t.logIndex&&(t.logIndex=r.toDecimal(t.logIndex)),t},y=function(t){return t.payload=r.toHex(t.payload),t.ttl=r.fromDecimal(t.ttl),t.workToProve=r.fromDecimal(t.workToProve),t.priority=r.fromDecimal(t.priority),r.isArray(t.topics)||(t.topics=t.topics?[t.topics]:[]),t.topics=t.topics.map(function(t){return r.fromUtf8(t)}),t},g=function(t){return t.expiry=r.toDecimal(t.expiry),t.sent=r.toDecimal(t.sent),t.ttl=r.toDecimal(t.ttl),t.workProved=r.toDecimal(t.workProved),t.payloadRaw=t.payload,t.payload=r.toUtf8(t.payload),r.isJson(t.payload)&&(t.payload=JSON.parse(t.payload)),t.topics||(t.topics=[]),t.topics=t.topics.map(function(t){return r.toUtf8(t)}),t},v=function(t){var e=new i(t);if(e.isValid()&&e.isDirect())return"0x"+e.address();if(r.isStrictAddress(t))return t;if(r.isAddress(t))return"0x"+t;throw"invalid address"},b=function(t){return t.startingBlock=r.toDecimal(t.startingBlock),t.currentBlock=r.toDecimal(t.currentBlock),t.highestBlock=r.toDecimal(t.highestBlock),t};e.exports={inputDefaultBlockNumberFormatter:u,inputBlockNumberFormatter:c,inputCallFormatter:f,inputTransactionFormatter:l,inputAddressFormatter:v,inputPostFormatter:y,outputBigNumberFormatter:a,outputTransactionFormatter:p,outputTransactionReceiptFormatter:h,outputBlockFormatter:m,outputLogFormatter:d,outputPostFormatter:g,outputSyncingFormatter:b}},{"../utils/config":18,"../utils/utils":20,"./iban":32}],30:[function(t,e,n){var r=t("../web3"),o=t("../solidity/coder"),i=t("../utils/utils"),a=t("./formatters"),s=t("../utils/sha3"),u=function(t,e){this._inputTypes=t.inputs.map(function(t){return t.type}),this._outputTypes=t.outputs.map(function(t){return t.type}),this._constant=t.constant,this._name=i.transformToFullName(t),this._address=e};u.prototype.extractCallback=function(t){return i.isFunction(t[t.length-1])?t.pop():void 0},u.prototype.extractDefaultBlock=function(t){return t.length>this._inputTypes.length&&!i.isObject(t[t.length-1])?a.inputDefaultBlockNumberFormatter(t.pop()):void 0},u.prototype.toPayload=function(t){var e={};return t.length>this._inputTypes.length&&i.isObject(t[t.length-1])&&(e=t[t.length-1]),e.to=this._address,e.data="0x"+this.signature()+o.encodeParams(this._inputTypes,t),e},u.prototype.signature=function(){return s(this._name).slice(0,8)},u.prototype.unpackOutput=function(t){if(t){t=t.length>=2?t.slice(2):t;var e=o.decodeParams(this._outputTypes,t);return 1===e.length?e[0]:e}},u.prototype.call=function(){var t=Array.prototype.slice.call(arguments).filter(function(t){return void 0!==t}),e=this.extractCallback(t),n=this.extractDefaultBlock(t),o=this.toPayload(t);if(!e){var i=r.eth.call(o,n);return this.unpackOutput(i)}var a=this;r.eth.call(o,n,function(t,n){e(t,a.unpackOutput(n))})},u.prototype.sendTransaction=function(){var t=Array.prototype.slice.call(arguments).filter(function(t){return void 0!==t}),e=this.extractCallback(t),n=this.toPayload(t);return e?void r.eth.sendTransaction(n,e):r.eth.sendTransaction(n)},u.prototype.estimateGas=function(){var t=Array.prototype.slice.call(arguments),e=this.extractCallback(t),n=this.toPayload(t);return e?void r.eth.estimateGas(n,e):r.eth.estimateGas(n)},u.prototype.displayName=function(){return i.extractDisplayName(this._name)},u.prototype.typeName=function(){return i.extractTypeName(this._name)},u.prototype.request=function(){var t=Array.prototype.slice.call(arguments),e=this.extractCallback(t),n=this.toPayload(t),r=this.unpackOutput.bind(this);return{method:this._constant?"eth_call":"eth_sendTransaction",callback:e,params:[n],format:r}},u.prototype.execute=function(){var t=!this._constant;return t?this.sendTransaction.apply(this,Array.prototype.slice.call(arguments)):this.call.apply(this,Array.prototype.slice.call(arguments))},u.prototype.attachToContract=function(t){var e=this.execute.bind(this);e.request=this.request.bind(this),e.call=this.call.bind(this),e.sendTransaction=this.sendTransaction.bind(this),e.estimateGas=this.estimateGas.bind(this);var n=this.displayName();t[n]||(t[n]=e),t[n][this.typeName()]=e},e.exports=u},{"../solidity/coder":7,"../utils/sha3":19,"../utils/utils":20,"../web3":22,"./formatters":29}],31:[function(t,e,n){"use strict";var r,o=t("./errors");r="undefined"!=typeof Meteor&&Meteor.isServer?Npm.require("xmlhttprequest").XMLHttpRequest:"undefined"!=typeof window&&window.XMLHttpRequest?window.XMLHttpRequest:t("xmlhttprequest").XMLHttpRequest;var i=function(t){this.host=t||"http://localhost:8545"};i.prototype.prepareRequest=function(t){var e=new r;return e.open("POST",this.host,t),e.setRequestHeader("Content-Type","application/json"),e},i.prototype.send=function(t){var e=this.prepareRequest(!1);try{e.send(JSON.stringify(t))}catch(n){throw o.InvalidConnection(this.host)}var r=e.responseText;try{r=JSON.parse(r)}catch(i){throw o.InvalidResponse(e.responseText)}return r},i.prototype.sendAsync=function(t,e){var n=this.prepareRequest(!0);n.onreadystatechange=function(){if(4===n.readyState){var t=n.responseText,r=null;try{t=JSON.parse(t)}catch(i){r=o.InvalidResponse(n.responseText)}e(r,t)}};try{n.send(JSON.stringify(t))}catch(r){e(o.InvalidConnection(this.host))}},i.prototype.isConnected=function(){try{return this.send({id:9999999999,jsonrpc:"2.0",method:"net_listening",params:[]}),!0}catch(t){return!1}},e.exports=i},{"./errors":26,xmlhttprequest:17}],32:[function(t,e,n){var r=t("bignumber.js"),o=function(t,e){for(var n=t;n.length<2*e;)n="00"+n;return n},i=function(t){var e="A".charCodeAt(0),n="Z".charCodeAt(0);return t=t.toUpperCase(),t=t.substr(4)+t.substr(0,4),t.split("").map(function(t){var r=t.charCodeAt(0);return r>=e&&n>=r?r-e+10:t}).join("")},a=function(t){for(var e,n=t;n.length>2;)e=n.slice(0,9),n=parseInt(e,10)%97+n.slice(e.length);return parseInt(n,10)%97},s=function(t){this._iban=t};s.fromAddress=function(t){var e=new r(t,16),n=e.toString(36),i=o(n,15);return s.fromBban(i.toUpperCase())},s.fromBban=function(t){var e="XE",n=a(i(e+"00"+t)),r=("0"+(98-n)).slice(-2);return new s(e+r+t)},s.createIndirect=function(t){return s.fromBban("ETH"+t.institution+t.identifier)},s.isValid=function(t){var e=new s(t);return e.isValid()},s.prototype.isValid=function(){return/^XE[0-9]{2}(ETH[0-9A-Z]{13}|[0-9A-Z]{30,31})$/.test(this._iban)&&1===a(i(this._iban))},s.prototype.isDirect=function(){return 34===this._iban.length||35===this._iban.length},s.prototype.isIndirect=function(){return 20===this._iban.length},s.prototype.checksum=function(){return this._iban.substr(2,2)},s.prototype.institution=function(){return this.isIndirect()?this._iban.substr(7,4):""},s.prototype.client=function(){return this.isIndirect()?this._iban.substr(11):""},s.prototype.address=function(){if(this.isDirect()){var t=this._iban.substr(4),e=new r(t,36);return o(e.toString(16),20)}return""},s.prototype.toString=function(){return this._iban},e.exports=s},{"bignumber.js":"bignumber.js"}],33:[function(t,e,n){"use strict";var r=t("../utils/utils"),o=t("./errors"),i=function(t,e){var n={jsonrpc:"2.0",error:{code:-32603,message:"IPC Request timed out for method '"+t+"'"},id:e};return JSON.stringify(n)},a=function(t,e){var n=this;this.responseCallbacks={},this.path=t,this.connection=e.connect({path:this.path}),this.connection.on("error",function(t){console.error("IPC Connection Error",t),n._timeout()}),this.connection.on("end",function(){n._timeout()}),this.connection.on("data",function(t){n._parseResponse(t.toString()).forEach(function(t){var e=null;r.isArray(t)?t.forEach(function(t){n.responseCallbacks[t.id]&&(e=t.id)}):e=t.id,n.responseCallbacks[e]&&(n.responseCallbacks[e](null,t),delete n.responseCallbacks[e])})})};a.prototype._parseResponse=function(t){var e=this,n=[],r=t.replace(/\}\{/g,"}|--|{").replace(/\}\]\[\{/g,"}]|--|[{").replace(/\}\[\{/g,"}|--|[{").replace(/\}\]\{/g,"}]|--|{").split("|--|");return r.forEach(function(t){e.lastChunk&&(t=e.lastChunk+t);var r=null;try{r=JSON.parse(t)}catch(i){return e.lastChunk=t,clearTimeout(e.lastChunkTimeout),void(e.lastChunkTimeout=setTimeout(function(){throw e.timeout(),o.InvalidResponse(t)},15e3))}clearTimeout(e.lastChunkTimeout),e.lastChunk=null,r&&n.push(r)}),n},a.prototype._addResponseCallback=function(t,e){var n=t.id||t[0].id,r=t.method||t[0].method;this.responseCallbacks[n]=e,this.responseCallbacks[n].method=r},a.prototype._timeout=function(){for(var t in this.responseCallbacks)this.responseCallbacks.hasOwnProperty(t)&&(this.responseCallbacks[t](i(this.responseCallbacks[t].method,t)),delete this.responseCallbacks[t])},a.prototype.isConnected=function(){var t=this;return t.connection.writable||t.connection.connect({path:t.path}),!!this.connection.writable},a.prototype.send=function(t){if(this.connection.writeSync){var e;this.connection.writable||this.connection.connect({path:this.path});var n=this.connection.writeSync(JSON.stringify(t));try{e=JSON.parse(n)}catch(r){throw o.InvalidResponse(n)}return e}throw new Error('You tried to send "'+t.method+'" synchronously. Synchronous requests are not supported by the IPC provider.')},a.prototype.sendAsync=function(t,e){this.connection.writable||this.connection.connect({path:this.path}),this.connection.write(JSON.stringify(t)),this._addResponseCallback(t,e)},e.exports=a},{"../utils/utils":20,"./errors":26}],34:[function(t,e,n){var r=function(){return arguments.callee._singletonInstance?arguments.callee._singletonInstance:(arguments.callee._singletonInstance=this,void(this.messageId=1))};r.getInstance=function(){var t=new r;return t},r.prototype.toPayload=function(t,e){return t||console.error("jsonrpc method should be specified!"),{jsonrpc:"2.0",method:t,params:e||[],id:this.messageId++}},r.prototype.isValidResponse=function(t){return!!t&&!t.error&&"2.0"===t.jsonrpc&&"number"==typeof t.id&&void 0!==t.result},r.prototype.toBatchPayload=function(t){var e=this;return t.map(function(t){return e.toPayload(t.method,t.params)})},e.exports=r},{}],35:[function(t,e,n){var r=t("./requestmanager"),o=t("../utils/utils"),i=t("./errors"),a=function(t){this.name=t.name,this.call=t.call,this.params=t.params||0,this.inputFormatter=t.inputFormatter,this.outputFormatter=t.outputFormatter};a.prototype.getCall=function(t){return o.isFunction(this.call)?this.call(t):this.call},a.prototype.extractCallback=function(t){return o.isFunction(t[t.length-1])?t.pop():void 0},a.prototype.validateArgs=function(t){if(t.length!==this.params)throw i.InvalidNumberOfParams()},a.prototype.formatInput=function(t){return this.inputFormatter?this.inputFormatter.map(function(e,n){return e?e(t[n]):t[n]}):t},a.prototype.formatOutput=function(t){return this.outputFormatter&&t?this.outputFormatter(t):t},a.prototype.attachToObject=function(t){var e=this.send.bind(this);e.request=this.request.bind(this),e.call=this.call;var n=this.name.split(".");n.length>1?(t[n[0]]=t[n[0]]||{},t[n[0]][n[1]]=e):t[n[0]]=e},a.prototype.toPayload=function(t){var e=this.getCall(t),n=this.extractCallback(t),r=this.formatInput(t);return this.validateArgs(r),{method:e,params:r,callback:n}},a.prototype.request=function(){var t=this.toPayload(Array.prototype.slice.call(arguments));return t.format=this.formatOutput.bind(this),t},a.prototype.send=function(){var t=this.toPayload(Array.prototype.slice.call(arguments));if(t.callback){var e=this;return r.getInstance().sendAsync(t,function(n,r){t.callback(n,e.formatOutput(r))})}return this.formatOutput(r.getInstance().send(t))},e.exports=a},{"../utils/utils":20,"./errors":26,"./requestmanager":43}],36:[function(t,e,n){var r=t("../method"),o=new r({name:"putString",call:"db_putString",params:3}),i=new r({name:"getString",call:"db_getString",params:2}),a=new r({name:"putHex",call:"db_putHex",params:3}),s=new r({name:"getHex",call:"db_getHex",params:2}),u=[o,i,a,s];e.exports={methods:u}},{"../method":35}],37:[function(t,e,n){"use strict";var r=t("../formatters"),o=t("../../utils/utils"),i=t("../method"),a=t("../property"),s=function(t){return o.isString(t[0])&&0===t[0].indexOf("0x")?"eth_getBlockByHash":"eth_getBlockByNumber"},u=function(t){return o.isString(t[0])&&0===t[0].indexOf("0x")?"eth_getTransactionByBlockHashAndIndex":"eth_getTransactionByBlockNumberAndIndex"},c=function(t){return o.isString(t[0])&&0===t[0].indexOf("0x")?"eth_getUncleByBlockHashAndIndex":"eth_getUncleByBlockNumberAndIndex"},f=function(t){return o.isString(t[0])&&0===t[0].indexOf("0x")?"eth_getBlockTransactionCountByHash":"eth_getBlockTransactionCountByNumber"},l=function(t){return o.isString(t[0])&&0===t[0].indexOf("0x")?"eth_getUncleCountByBlockHash":"eth_getUncleCountByBlockNumber"},p=new i({name:"getBalance",call:"eth_getBalance",params:2,inputFormatter:[r.inputAddressFormatter,r.inputDefaultBlockNumberFormatter],outputFormatter:r.outputBigNumberFormatter}),h=new i({name:"getStorageAt",call:"eth_getStorageAt",params:3,inputFormatter:[null,o.toHex,r.inputDefaultBlockNumberFormatter]}),m=new i({name:"getCode",call:"eth_getCode",params:2,inputFormatter:[r.inputAddressFormatter,r.inputDefaultBlockNumberFormatter]}),d=new i({name:"getBlock",call:s,params:2,inputFormatter:[r.inputBlockNumberFormatter,function(t){return!!t}],outputFormatter:r.outputBlockFormatter}),y=new i({name:"getUncle",call:c,params:2,inputFormatter:[r.inputBlockNumberFormatter,o.toHex],outputFormatter:r.outputBlockFormatter}),g=new i({name:"getCompilers",call:"eth_getCompilers",params:0}),v=new i({name:"getBlockTransactionCount",call:f,params:1,inputFormatter:[r.inputBlockNumberFormatter],outputFormatter:o.toDecimal}),b=new i({name:"getBlockUncleCount",call:l,params:1,inputFormatter:[r.inputBlockNumberFormatter],outputFormatter:o.toDecimal}),w=new i({name:"getTransaction",call:"eth_getTransactionByHash",params:1,outputFormatter:r.outputTransactionFormatter}),_=new i({name:"getTransactionFromBlock",call:u,params:2,inputFormatter:[r.inputBlockNumberFormatter,o.toHex],outputFormatter:r.outputTransactionFormatter}),x=new i({name:"getTransactionReceipt",call:"eth_getTransactionReceipt",params:1,outputFormatter:r.outputTransactionReceiptFormatter}),I=new i({name:"getTransactionCount",call:"eth_getTransactionCount",params:2,inputFormatter:[null,r.inputDefaultBlockNumberFormatter],outputFormatter:o.toDecimal}),F=new i({name:"sendRawTransaction",call:"eth_sendRawTransaction",params:1,inputFormatter:[null]}),N=new i({name:"sendTransaction",call:"eth_sendTransaction",params:1,inputFormatter:[r.inputTransactionFormatter]}),k=new i({name:"call",call:"eth_call",params:2,inputFormatter:[r.inputCallFormatter,r.inputDefaultBlockNumberFormatter]}),B=new i({name:"estimateGas",call:"eth_estimateGas",params:1,inputFormatter:[r.inputCallFormatter],outputFormatter:o.toDecimal}),A=new i({name:"compile.solidity",call:"eth_compileSolidity",params:1}),T=new i({name:"compile.lll",call:"eth_compileLLL",params:1}),O=new i({name:"compile.serpent",call:"eth_compileSerpent",params:1}),P=new i({name:"submitWork",call:"eth_submitWork",params:3}),C=new i({name:"getWork",call:"eth_getWork",params:0}),S=[p,h,m,d,y,g,v,b,w,_,x,I,k,B,F,N,A,T,O,P,C],D=[new a({name:"coinbase",getter:"eth_coinbase"}),new a({name:"mining",getter:"eth_mining"}),new a({name:"hashrate",getter:"eth_hashrate",outputFormatter:o.toDecimal}),new a({name:"syncing",getter:"eth_syncing",outputFormatter:r.outputSyncingFormatter}),new a({name:"gasPrice",getter:"eth_gasPrice",outputFormatter:r.outputBigNumberFormatter}),new a({name:"accounts",getter:"eth_accounts"}),new a({name:"blockNumber",getter:"eth_blockNumber",outputFormatter:o.toDecimal})];e.exports={methods:S,properties:D}},{"../../utils/utils":20,"../formatters":29,"../method":35,"../property":42}],38:[function(t,e,n){var r=t("../../utils/utils"),o=t("../property"),i=[],a=[new o({name:"listening",getter:"net_listening"}),new o({name:"peerCount",getter:"net_peerCount",outputFormatter:r.toDecimal})];e.exports={methods:i,properties:a}},{"../../utils/utils":20,"../property":42}],39:[function(t,e,n){var r=t("../method"),o=t("../formatters"),i=new r({name:"post",call:"shh_post",params:1,inputFormatter:[o.inputPostFormatter]}),a=new r({name:"newIdentity",call:"shh_newIdentity",params:0}),s=new r({name:"hasIdentity",call:"shh_hasIdentity",params:1}),u=new r({name:"newGroup",call:"shh_newGroup",params:0}),c=new r({name:"addToGroup",call:"shh_addToGroup",params:0}),f=[i,a,s,u,c];e.exports={methods:f}},{"../formatters":29,"../method":35}],40:[function(t,e,n){var r=t("../method"),o=function(){var t=function(t){var e=t[0];switch(e){case"latest":return t.shift(),this.params=0,"eth_newBlockFilter";case"pending":return t.shift(),this.params=0,"eth_newPendingTransactionFilter";default:return"eth_newFilter"}},e=new r({name:"newFilter",call:t,params:1}),n=new r({name:"uninstallFilter",call:"eth_uninstallFilter",params:1}),o=new r({name:"getLogs",call:"eth_getFilterLogs",params:1}),i=new r({name:"poll",call:"eth_getFilterChanges",params:1});return[e,n,o,i]},i=function(){var t=new r({name:"newFilter",call:"shh_newFilter",params:1}),e=new r({name:"uninstallFilter",call:"shh_uninstallFilter",params:1}),n=new r({name:"getLogs",call:"shh_getMessages",params:1}),o=new r({name:"poll",call:"shh_getFilterChanges",params:1});return[t,e,n,o]};e.exports={eth:o,shh:i}},{"../method":35}],41:[function(t,e,n){var r=t("./contract"),o=t("../contracts/GlobalRegistrar.json"),i=t("../contracts/ICAPRegistrar.json"),a="0xc6d9d2cd449a754c494264e1809c50e34d64562b",s="0xa1a111bc074c9cfa781f0c38e63bd51c91b8af00";e.exports={namereg:r(o).at(a),ibanNamereg:r(i).at(s)}},{"../contracts/GlobalRegistrar.json":1,"../contracts/ICAPRegistrar.json":2,"./contract":25}],42:[function(t,e,n){var r=t("./requestmanager"),o=t("../utils/utils"),i=function(t){this.name=t.name,this.getter=t.getter,this.setter=t.setter,this.outputFormatter=t.outputFormatter,this.inputFormatter=t.inputFormatter};i.prototype.formatInput=function(t){return this.inputFormatter?this.inputFormatter(t):t},i.prototype.formatOutput=function(t){return this.outputFormatter&&null!==t?this.outputFormatter(t):t},i.prototype.extractCallback=function(t){return o.isFunction(t[t.length-1])?t.pop():void 0},i.prototype.attachToObject=function(t){var e={get:this.get.bind(this)},n=this.name.split("."),r=n[0];n.length>1&&(t[n[0]]=t[n[0]]||{},t=t[n[0]],r=n[1]),Object.defineProperty(t,r,e);var o=function(t,e){return t+e.charAt(0).toUpperCase()+e.slice(1)},i=this.getAsync.bind(this);i.request=this.request.bind(this),t[o("get",r)]=i},i.prototype.get=function(){return this.formatOutput(r.getInstance().send({method:this.getter}))},i.prototype.getAsync=function(t){var e=this;r.getInstance().sendAsync({method:this.getter},function(n,r){return n?t(n):void t(n,e.formatOutput(r))})},i.prototype.request=function(){var t={method:this.getter,params:[],callback:this.extractCallback(Array.prototype.slice.call(arguments))};return t.format=this.formatOutput.bind(this),t},e.exports=i},{"../utils/utils":20,"./requestmanager":43}],43:[function(t,e,n){var r=t("./jsonrpc"),o=t("../utils/utils"),i=t("../utils/config"),a=t("./errors"),s=function(t){return arguments.callee._singletonInstance?arguments.callee._singletonInstance:(arguments.callee._singletonInstance=this,this.provider=t,this.polls={},this.timeout=null,void(this.isPolling=!1))};s.getInstance=function(){var t=new s;return t},s.prototype.send=function(t){if(!this.provider)return console.error(a.InvalidProvider()),null;var e=r.getInstance().toPayload(t.method,t.params),n=this.provider.send(e);if(!r.getInstance().isValidResponse(n))throw a.InvalidResponse(n);return n.result},s.prototype.sendAsync=function(t,e){if(!this.provider)return e(a.InvalidProvider());var n=r.getInstance().toPayload(t.method,t.params);this.provider.sendAsync(n,function(t,n){return t?e(t):r.getInstance().isValidResponse(n)?void e(null,n.result):e(a.InvalidResponse(n))})},s.prototype.sendBatch=function(t,e){if(!this.provider)return e(a.InvalidProvider());var n=r.getInstance().toBatchPayload(t);this.provider.sendAsync(n,function(t,n){return t?e(t):o.isArray(n)?void e(t,n):e(a.InvalidResponse(n))})},s.prototype.setProvider=function(t){this.provider=t,this.provider&&!this.isPolling&&(this.poll(),this.isPolling=!0)},s.prototype.startPolling=function(t,e,n,r){this.polls[e]={data:t,id:e,callback:n,uninstall:r}},s.prototype.stopPolling=function(t){delete this.polls[t]},s.prototype.reset=function(t){for(var e in this.polls)t&&-1!==e.indexOf("syncPoll_")||(this.polls[e].uninstall(),delete this.polls[e]);this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.poll()},s.prototype.poll=function(){if(this.timeout=setTimeout(this.poll.bind(this),i.ETH_POLLING_TIMEOUT),0!==Object.keys(this.polls).length){if(!this.provider)return void console.error(a.InvalidProvider());var t=[],e=[];for(var n in this.polls)t.push(this.polls[n].data),e.push(n);if(0!==t.length){var s=r.getInstance().toBatchPayload(t),u={};s.forEach(function(t,n){u[t.id]=e[n]});var c=this;this.provider.sendAsync(s,function(t,e){if(!t){if(!o.isArray(e))throw a.InvalidResponse(e);e.map(function(t){var e=u[t.id];return c.polls[e]?(t.callback=c.polls[e].callback,t):!1}).filter(function(t){return!!t}).filter(function(t){var e=r.getInstance().isValidResponse(t);return e||t.callback(a.InvalidResponse(t)),e}).forEach(function(t){t.callback(null,t.result)})}})}}},e.exports=s},{"../utils/config":18,"../utils/utils":20,"./errors":26,"./jsonrpc":34}],44:[function(t,e,n){var r=t("./requestmanager"),o=t("./method"),i=t("./formatters"),a=t("../utils/utils"),s=function(t){var e=!1,n=function(n,r){return n?t.callbacks.forEach(function(t){t(n)}):(a.isObject(r)&&(r=t.implementation.outputFormatter(r)),void t.callbacks.forEach(function(t){e!==r&&(!e&&a.isObject(r)&&t(null,!0),setTimeout(function(){t(null,r)},1),e=r)}))};r.getInstance().startPolling({method:t.implementation.call,params:[]},t.pollId,n,t.stopWatching.bind(t))},u=function(t){return this.pollId="syncPoll_"+Math.floor(1e3*Math.random()),this.callbacks=[],this.implementation=new o({name:"isSyncing",call:"eth_syncing",params:0,outputFormatter:i.outputSyncingFormatter}),this.addCallback(t),s(this),this};u.prototype.addCallback=function(t){return t&&this.callbacks.push(t),this},u.prototype.stopWatching=function(){r.getInstance().stopPolling(this.pollId),this.callbacks=[]},e.exports=u},{"../utils/utils":20,"./formatters":29,"./method":35,"./requestmanager":43}],45:[function(t,e,n){var r=t("../web3"),o=t("./iban"),i=t("./namereg").ibanNamereg,a=t("./contract"),s=t("../contracts/SmartExchange.json"),u=function(t,e,n,r){var a=new o(e);if(!a.isValid())throw new Error("invalid iban address");if(a.isDirect())return c(t,a.address(),n,r);if(!r){var s=i.addr(a.institution());return f(t,s,n,a.client())}i.addr(a.institution(),function(e,o){return f(t,o,n,a.client(),r)})},c=function(t,e,n,o){return r.eth.sendTransaction({address:e,from:t,value:n},o)},f=function(t,e,n,r,o){var i=s;return a(i).at(e).deposit(r,{from:t,value:n},o)};e.exports=u},{"../contracts/SmartExchange.json":3,"../web3":22,"./contract":25,"./iban":32,"./namereg":41}],46:[function(t,e,n){},{}],47:[function(t,e,n){!function(t,r){"object"==typeof n?e.exports=n=r():"function"==typeof define&&define.amd?define([],r):t.CryptoJS=r()}(this,function(){var t=t||function(t,e){var n={},r=n.lib={},o=r.Base=function(){function t(){}return{extend:function(e){t.prototype=this;var n=new t;return e&&n.mixIn(e),n.hasOwnProperty("init")||(n.init=function(){n.$super.init.apply(this,arguments)}),n.init.prototype=n,n.$super=this,n},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),i=r.WordArray=o.extend({init:function(t,n){t=this.words=t||[],n!=e?this.sigBytes=n:this.sigBytes=4*t.length},toString:function(t){return(t||s).stringify(this)},concat:function(t){var e=this.words,n=t.words,r=this.sigBytes,o=t.sigBytes;if(this.clamp(),r%4)for(var i=0;o>i;i++){var a=n[i>>>2]>>>24-i%4*8&255;e[r+i>>>2]|=a<<24-(r+i)%4*8}else for(var i=0;o>i;i+=4)e[r+i>>>2]=n[i>>>2];return this.sigBytes+=o,this},clamp:function(){var e=this.words,n=this.sigBytes;e[n>>>2]&=4294967295<<32-n%4*8,e.length=t.ceil(n/4)},clone:function(){var t=o.clone.call(this);return t.words=this.words.slice(0),t},random:function(e){for(var n,r=[],o=function(e){var e=e,n=987654321,r=4294967295;return function(){n=36969*(65535&n)+(n>>16)&r,e=18e3*(65535&e)+(e>>16)&r;var o=(n<<16)+e&r;return o/=4294967296,o+=.5,o*(t.random()>.5?1:-1)}},a=0;e>a;a+=4){var s=o(4294967296*(n||t.random()));n=987654071*s(),r.push(4294967296*s()|0)}return new i.init(r,e)}}),a=n.enc={},s=a.Hex={stringify:function(t){for(var e=t.words,n=t.sigBytes,r=[],o=0;n>o;o++){var i=e[o>>>2]>>>24-o%4*8&255;r.push((i>>>4).toString(16)),r.push((15&i).toString(16))}return r.join("")},parse:function(t){for(var e=t.length,n=[],r=0;e>r;r+=2)n[r>>>3]|=parseInt(t.substr(r,2),16)<<24-r%8*4;return new i.init(n,e/2)}},u=a.Latin1={stringify:function(t){for(var e=t.words,n=t.sigBytes,r=[],o=0;n>o;o++){var i=e[o>>>2]>>>24-o%4*8&255;r.push(String.fromCharCode(i))}return r.join("")},parse:function(t){for(var e=t.length,n=[],r=0;e>r;r++)n[r>>>2]|=(255&t.charCodeAt(r))<<24-r%4*8;return new i.init(n,e)}},c=a.Utf8={stringify:function(t){try{return decodeURIComponent(escape(u.stringify(t)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(t){return u.parse(unescape(encodeURIComponent(t)))}},f=r.BufferedBlockAlgorithm=o.extend({reset:function(){this._data=new i.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=c.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(e){var n=this._data,r=n.words,o=n.sigBytes,a=this.blockSize,s=4*a,u=o/s;u=e?t.ceil(u):t.max((0|u)-this._minBufferSize,0);var c=u*a,f=t.min(4*c,o);if(c){for(var l=0;c>l;l+=a)this._doProcessBlock(r,l);var p=r.splice(0,c);n.sigBytes-=f}return new i.init(p,f)},clone:function(){var t=o.clone.call(this);return t._data=this._data.clone(),t},_minBufferSize:0}),l=(r.Hasher=f.extend({cfg:o.extend(),init:function(t){this.cfg=this.cfg.extend(t),this.reset()},reset:function(){f.reset.call(this),this._doReset()},update:function(t){return this._append(t),this._process(),this},finalize:function(t){t&&this._append(t);var e=this._doFinalize();return e},blockSize:16,_createHelper:function(t){return function(e,n){return new t.init(n).finalize(e)}},_createHmacHelper:function(t){return function(e,n){return new l.HMAC.init(t,n).finalize(e)}}}),n.algo={});return n}(Math);return t})},{}],48:[function(t,e,n){!function(r,o,i){"object"==typeof n?e.exports=n=o(t("./core"),t("./x64-core")):"function"==typeof define&&define.amd?define(["./core","./x64-core"],o):o(r.CryptoJS)}(this,function(t){return function(e){var n=t,r=n.lib,o=r.WordArray,i=r.Hasher,a=n.x64,s=a.Word,u=n.algo,c=[],f=[],l=[];!function(){for(var t=1,e=0,n=0;24>n;n++){c[t+5*e]=(n+1)*(n+2)/2%64;var r=e%5,o=(2*t+3*e)%5;t=r,e=o}for(var t=0;5>t;t++)for(var e=0;5>e;e++)f[t+5*e]=e+(2*t+3*e)%5*5;for(var i=1,a=0;24>a;a++){for(var u=0,p=0,h=0;7>h;h++){if(1&i){var m=(1<<h)-1;32>m?p^=1<<m:u^=1<<m-32}128&i?i=i<<1^113:i<<=1}l[a]=s.create(u,p)}}();var p=[];!function(){for(var t=0;25>t;t++)p[t]=s.create()}();var h=u.SHA3=i.extend({cfg:i.cfg.extend({outputLength:512}),_doReset:function(){for(var t=this._state=[],e=0;25>e;e++)t[e]=new s.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(t,e){for(var n=this._state,r=this.blockSize/2,o=0;r>o;o++){var i=t[e+2*o],a=t[e+2*o+1];i=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),a=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8);var s=n[o];s.high^=a,s.low^=i}for(var u=0;24>u;u++){for(var h=0;5>h;h++){for(var m=0,d=0,y=0;5>y;y++){var s=n[h+5*y];m^=s.high,d^=s.low}var g=p[h];g.high=m,g.low=d}for(var h=0;5>h;h++)for(var v=p[(h+4)%5],b=p[(h+1)%5],w=b.high,_=b.low,m=v.high^(w<<1|_>>>31),d=v.low^(_<<1|w>>>31),y=0;5>y;y++){var s=n[h+5*y];s.high^=m,s.low^=d}for(var x=1;25>x;x++){var s=n[x],I=s.high,F=s.low,N=c[x];if(32>N)var m=I<<N|F>>>32-N,d=F<<N|I>>>32-N;else var m=F<<N-32|I>>>64-N,d=I<<N-32|F>>>64-N;var k=p[f[x]];k.high=m,k.low=d}var B=p[0],A=n[0];B.high=A.high,B.low=A.low;for(var h=0;5>h;h++)for(var y=0;5>y;y++){var x=h+5*y,s=n[x],T=p[x],O=p[(h+1)%5+5*y],P=p[(h+2)%5+5*y];s.high=T.high^~O.high&P.high,s.low=T.low^~O.low&P.low}var s=n[0],C=l[u];s.high^=C.high,s.low^=C.low}},_doFinalize:function(){var t=this._data,n=t.words,r=(8*this._nDataBytes,8*t.sigBytes),i=32*this.blockSize;n[r>>>5]|=1<<24-r%32,n[(e.ceil((r+1)/i)*i>>>5)-1]|=128,t.sigBytes=4*n.length,this._process();for(var a=this._state,s=this.cfg.outputLength/8,u=s/8,c=[],f=0;u>f;f++){var l=a[f],p=l.high,h=l.low;p=16711935&(p<<8|p>>>24)|4278255360&(p<<24|p>>>8),h=16711935&(h<<8|h>>>24)|4278255360&(h<<24|h>>>8),c.push(h),c.push(p)}return new o.init(c,s)},clone:function(){for(var t=i.clone.call(this),e=t._state=this._state.slice(0),n=0;25>n;n++)e[n]=e[n].clone();return t}});n.SHA3=i._createHelper(h),n.HmacSHA3=i._createHmacHelper(h)}(Math),t.SHA3})},{"./core":47,"./x64-core":49}],49:[function(t,e,n){!function(r,o){"object"==typeof n?e.exports=n=o(t("./core")):"function"==typeof define&&define.amd?define(["./core"],o):o(r.CryptoJS)}(this,function(t){return function(e){var n=t,r=n.lib,o=r.Base,i=r.WordArray,a=n.x64={};a.Word=o.extend({init:function(t,e){this.high=t,this.low=e}}),a.WordArray=o.extend({init:function(t,n){t=this.words=t||[],n!=e?this.sigBytes=n:this.sigBytes=8*t.length},toX32:function(){for(var t=this.words,e=t.length,n=[],r=0;e>r;r++){var o=t[r];n.push(o.high),n.push(o.low)}return i.create(n,this.sigBytes)},clone:function(){for(var t=o.clone.call(this),e=t.words=this.words.slice(0),n=e.length,r=0;n>r;r++)e[r]=e[r].clone();return t}})}(),t})},{"./core":47}],50:[function(t,e,n){!function(t){function r(t){for(var e,n,r=[],o=0,i=t.length;i>o;)e=t.charCodeAt(o++),e>=55296&&56319>=e&&i>o?(n=t.charCodeAt(o++),56320==(64512&n)?r.push(((1023&e)<<10)+(1023&n)+65536):(r.push(e),o--)):r.push(e);return r}function o(t){for(var e,n=t.length,r=-1,o="";++r<n;)e=t[r],
e>65535&&(e-=65536,o+=v(e>>>10&1023|55296),e=56320|1023&e),o+=v(e);return o}function i(t){if(t>=55296&&57343>=t)throw Error("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value")}function a(t,e){return v(t>>e&63|128)}function s(t){if(0==(4294967168&t))return v(t);var e="";return 0==(4294965248&t)?e=v(t>>6&31|192):0==(4294901760&t)?(i(t),e=v(t>>12&15|224),e+=a(t,6)):0==(4292870144&t)&&(e=v(t>>18&7|240),e+=a(t,12),e+=a(t,6)),e+=v(63&t|128)}function u(t){for(var e,n=r(t),o=n.length,i=-1,a="";++i<o;)e=n[i],a+=s(e);return a}function c(){if(g>=y)throw Error("Invalid byte index");var t=255&d[g];if(g++,128==(192&t))return 63&t;throw Error("Invalid continuation byte")}function f(){var t,e,n,r,o;if(g>y)throw Error("Invalid byte index");if(g==y)return!1;if(t=255&d[g],g++,0==(128&t))return t;if(192==(224&t)){var e=c();if(o=(31&t)<<6|e,o>=128)return o;throw Error("Invalid continuation byte")}if(224==(240&t)){if(e=c(),n=c(),o=(15&t)<<12|e<<6|n,o>=2048)return i(o),o;throw Error("Invalid continuation byte")}if(240==(248&t)&&(e=c(),n=c(),r=c(),o=(15&t)<<18|e<<12|n<<6|r,o>=65536&&1114111>=o))return o;throw Error("Invalid UTF-8 detected")}function l(t){d=r(t),y=d.length,g=0;for(var e,n=[];(e=f())!==!1;)n.push(e);return o(n)}var p="object"==typeof n&&n,h="object"==typeof e&&e&&e.exports==p&&e,m="object"==typeof global&&global;(m.global===m||m.window===m)&&(t=m);var d,y,g,v=String.fromCharCode,b={version:"2.0.0",encode:u,decode:l};if("function"==typeof define&&"object"==typeof define.amd&&define.amd)define(function(){return b});else if(p&&!p.nodeType)if(h)h.exports=b;else{var w={},_=w.hasOwnProperty;for(var x in b)_.call(b,x)&&(p[x]=b[x])}else t.utf8=b}(this)},{}],"bignumber.js":[function(t,e,n){!function(n){"use strict";function r(t){function e(t,r){var o,i,a,s,u,c,f=this;if(!(f instanceof e))return W&&C(26,"constructor call without new",t),new e(t,r);if(null!=r&&z(r,2,64,E,"base")){if(r=0|r,c=t+"",10==r)return f=new e(t instanceof e?t:c),S(f,j+f.e+1,U);if((s="number"==typeof t)&&0*t!=0||!new RegExp("^-?"+(o="["+x.slice(0,r)+"]+")+"(?:\\."+o+")?$",37>r?"i":"").test(c))return d(f,c,s,r);s?(f.s=0>1/t?(c=c.slice(1),-1):1,W&&c.replace(/^0\.0*|\./,"").length>15&&C(E,_,t),s=!1):f.s=45===c.charCodeAt(0)?(c=c.slice(1),-1):1,c=n(c,10,r,f.s)}else{if(t instanceof e)return f.s=t.s,f.e=t.e,f.c=(t=t.c)?t.slice():t,void(E=0);if((s="number"==typeof t)&&0*t==0){if(f.s=0>1/t?(t=-t,-1):1,t===~~t){for(i=0,a=t;a>=10;a/=10,i++);return f.e=i,f.c=[t],void(E=0)}c=t+""}else{if(!y.test(c=t+""))return d(f,c,s);f.s=45===c.charCodeAt(0)?(c=c.slice(1),-1):1}}for((i=c.indexOf("."))>-1&&(c=c.replace(".","")),(a=c.search(/e/i))>0?(0>i&&(i=a),i+=+c.slice(a+1),c=c.substring(0,a)):0>i&&(i=c.length),a=0;48===c.charCodeAt(a);a++);for(u=c.length;48===c.charCodeAt(--u););if(c=c.slice(a,u+1))if(u=c.length,s&&W&&u>15&&C(E,_,f.s*t),i=i-a-1,i>G)f.c=f.e=null;else if(M>i)f.c=[f.e=0];else{if(f.e=i,f.c=[],a=(i+1)%F,0>i&&(a+=F),u>a){for(a&&f.c.push(+c.slice(0,a)),u-=F;u>a;)f.c.push(+c.slice(a,a+=F));c=c.slice(a),a=F-c.length}else a-=u;for(;a--;c+="0");f.c.push(+c)}else f.c=[f.e=0];E=0}function n(t,n,r,o){var a,s,u,f,p,h,m,d=t.indexOf("."),y=j,g=U;for(37>r&&(t=t.toLowerCase()),d>=0&&(u=V,V=0,t=t.replace(".",""),m=new e(r),p=m.pow(t.length-d),V=u,m.c=c(l(i(p.c),p.e),10,n),m.e=m.c.length),h=c(t,r,n),s=u=h.length;0==h[--u];h.pop());if(!h[0])return"0";if(0>d?--s:(p.c=h,p.e=s,p.s=o,p=D(p,m,y,g,n),h=p.c,f=p.r,s=p.e),a=s+y+1,d=h[a],u=n/2,f=f||0>a||null!=h[a+1],f=4>g?(null!=d||f)&&(0==g||g==(p.s<0?3:2)):d>u||d==u&&(4==g||f||6==g&&1&h[a-1]||g==(p.s<0?8:7)),1>a||!h[0])t=f?l("1",-y):"0";else{if(h.length=a,f)for(--n;++h[--a]>n;)h[a]=0,a||(++s,h.unshift(1));for(u=h.length;!h[--u];);for(d=0,t="";u>=d;t+=x.charAt(h[d++]));t=l(t,s)}return t}function h(t,n,r,o){var a,s,u,c,p;if(r=null!=r&&z(r,0,8,o,w)?0|r:U,!t.c)return t.toString();if(a=t.c[0],u=t.e,null==n)p=i(t.c),p=19==o||24==o&&H>=u?f(p,u):l(p,u);else if(t=S(new e(t),n,r),s=t.e,p=i(t.c),c=p.length,19==o||24==o&&(s>=n||H>=s)){for(;n>c;p+="0",c++);p=f(p,s)}else if(n-=u,p=l(p,s),s+1>c){if(--n>0)for(p+=".";n--;p+="0");}else if(n+=s-c,n>0)for(s+1==c&&(p+=".");n--;p+="0");return t.s<0&&a?"-"+p:p}function T(t,n){var r,o,i=0;for(u(t[0])&&(t=t[0]),r=new e(t[0]);++i<t.length;){if(o=new e(t[i]),!o.s){r=o;break}n.call(r,o)&&(r=o)}return r}function O(t,e,n,r,o){return(e>t||t>n||t!=p(t))&&C(r,(o||"decimal places")+(e>t||t>n?" out of range":" not an integer"),t),!0}function P(t,e,n){for(var r=1,o=e.length;!e[--o];e.pop());for(o=e[0];o>=10;o/=10,r++);return(n=r+n*F-1)>G?t.c=t.e=null:M>n?t.c=[t.e=0]:(t.e=n,t.c=e),t}function C(t,e,n){var r=new Error(["new BigNumber","cmp","config","div","divToInt","eq","gt","gte","lt","lte","minus","mod","plus","precision","random","round","shift","times","toDigits","toExponential","toFixed","toFormat","toFraction","pow","toPrecision","toString","BigNumber"][t]+"() "+e+": "+n);throw r.name="BigNumber Error",E=0,r}function S(t,e,n,r){var o,i,a,s,u,c,f,l=t.c,p=k;if(l){t:{for(o=1,s=l[0];s>=10;s/=10,o++);if(i=e-o,0>i)i+=F,a=e,u=l[c=0],f=u/p[o-a-1]%10|0;else if(c=g((i+1)/F),c>=l.length){if(!r)break t;for(;l.length<=c;l.push(0));u=f=0,o=1,i%=F,a=i-F+1}else{for(u=s=l[c],o=1;s>=10;s/=10,o++);i%=F,a=i-F+o,f=0>a?0:u/p[o-a-1]%10|0}if(r=r||0>e||null!=l[c+1]||(0>a?u:u%p[o-a-1]),r=4>n?(f||r)&&(0==n||n==(t.s<0?3:2)):f>5||5==f&&(4==n||r||6==n&&(i>0?a>0?u/p[o-a]:0:l[c-1])%10&1||n==(t.s<0?8:7)),1>e||!l[0])return l.length=0,r?(e-=t.e+1,l[0]=p[e%F],t.e=-e||0):l[0]=t.e=0,t;if(0==i?(l.length=c,s=1,c--):(l.length=c+1,s=p[F-i],l[c]=a>0?v(u/p[o-a]%p[a])*s:0),r)for(;;){if(0==c){for(i=1,a=l[0];a>=10;a/=10,i++);for(a=l[0]+=s,s=1;a>=10;a/=10,s++);i!=s&&(t.e++,l[0]==I&&(l[0]=1));break}if(l[c]+=s,l[c]!=I)break;l[c--]=0,s=1}for(i=l.length;0===l[--i];l.pop());}t.e>G?t.c=t.e=null:t.e<M&&(t.c=[t.e=0])}return t}var D,E=0,R=e.prototype,L=new e(1),j=20,U=4,H=-7,q=21,M=-1e7,G=1e7,W=!0,z=O,$=!1,J=1,V=100,X={decimalSeparator:".",groupSeparator:",",groupSize:3,secondaryGroupSize:0,fractionGroupSeparator:" ",fractionGroupSize:0};return e.another=r,e.ROUND_UP=0,e.ROUND_DOWN=1,e.ROUND_CEIL=2,e.ROUND_FLOOR=3,e.ROUND_HALF_UP=4,e.ROUND_HALF_DOWN=5,e.ROUND_HALF_EVEN=6,e.ROUND_HALF_CEIL=7,e.ROUND_HALF_FLOOR=8,e.EUCLID=9,e.config=function(){var t,e,n=0,r={},o=arguments,i=o[0],a=i&&"object"==typeof i?function(){return i.hasOwnProperty(e)?null!=(t=i[e]):void 0}:function(){return o.length>n?null!=(t=o[n++]):void 0};return a(e="DECIMAL_PLACES")&&z(t,0,A,2,e)&&(j=0|t),r[e]=j,a(e="ROUNDING_MODE")&&z(t,0,8,2,e)&&(U=0|t),r[e]=U,a(e="EXPONENTIAL_AT")&&(u(t)?z(t[0],-A,0,2,e)&&z(t[1],0,A,2,e)&&(H=0|t[0],q=0|t[1]):z(t,-A,A,2,e)&&(H=-(q=0|(0>t?-t:t)))),r[e]=[H,q],a(e="RANGE")&&(u(t)?z(t[0],-A,-1,2,e)&&z(t[1],1,A,2,e)&&(M=0|t[0],G=0|t[1]):z(t,-A,A,2,e)&&(0|t?M=-(G=0|(0>t?-t:t)):W&&C(2,e+" cannot be zero",t))),r[e]=[M,G],a(e="ERRORS")&&(t===!!t||1===t||0===t?(E=0,z=(W=!!t)?O:s):W&&C(2,e+b,t)),r[e]=W,a(e="CRYPTO")&&(t===!!t||1===t||0===t?($=!(!t||!m||"object"!=typeof m),t&&!$&&W&&C(2,"crypto unavailable",m)):W&&C(2,e+b,t)),r[e]=$,a(e="MODULO_MODE")&&z(t,0,9,2,e)&&(J=0|t),r[e]=J,a(e="POW_PRECISION")&&z(t,0,A,2,e)&&(V=0|t),r[e]=V,a(e="FORMAT")&&("object"==typeof t?X=t:W&&C(2,e+" not an object",t)),r[e]=X,r},e.max=function(){return T(arguments,R.lt)},e.min=function(){return T(arguments,R.gt)},e.random=function(){var t=9007199254740992,n=Math.random()*t&2097151?function(){return v(Math.random()*t)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)};return function(t){var r,o,i,a,s,u=0,c=[],f=new e(L);if(t=null!=t&&z(t,0,A,14)?0|t:j,a=g(t/F),$)if(m&&m.getRandomValues){for(r=m.getRandomValues(new Uint32Array(a*=2));a>u;)s=131072*r[u]+(r[u+1]>>>11),s>=9e15?(o=m.getRandomValues(new Uint32Array(2)),r[u]=o[0],r[u+1]=o[1]):(c.push(s%1e14),u+=2);u=a/2}else if(m&&m.randomBytes){for(r=m.randomBytes(a*=7);a>u;)s=281474976710656*(31&r[u])+1099511627776*r[u+1]+4294967296*r[u+2]+16777216*r[u+3]+(r[u+4]<<16)+(r[u+5]<<8)+r[u+6],s>=9e15?m.randomBytes(7).copy(r,u):(c.push(s%1e14),u+=7);u=a/7}else W&&C(14,"crypto unavailable",m);if(!u)for(;a>u;)s=n(),9e15>s&&(c[u++]=s%1e14);for(a=c[--u],t%=F,a&&t&&(s=k[F-t],c[u]=v(a/s)*s);0===c[u];c.pop(),u--);if(0>u)c=[i=0];else{for(i=-1;0===c[0];c.shift(),i-=F);for(u=1,s=c[0];s>=10;s/=10,u++);F>u&&(i-=F-u)}return f.e=i,f.c=c,f}}(),D=function(){function t(t,e,n){var r,o,i,a,s=0,u=t.length,c=e%B,f=e/B|0;for(t=t.slice();u--;)i=t[u]%B,a=t[u]/B|0,r=f*i+a*c,o=c*i+r%B*B+s,s=(o/n|0)+(r/B|0)+f*a,t[u]=o%n;return s&&t.unshift(s),t}function n(t,e,n,r){var o,i;if(n!=r)i=n>r?1:-1;else for(o=i=0;n>o;o++)if(t[o]!=e[o]){i=t[o]>e[o]?1:-1;break}return i}function r(t,e,n,r){for(var o=0;n--;)t[n]-=o,o=t[n]<e[n]?1:0,t[n]=o*r+t[n]-e[n];for(;!t[0]&&t.length>1;t.shift());}return function(i,a,s,u,c){var f,l,p,h,m,d,y,g,b,w,_,x,N,k,B,A,T,O=i.s==a.s?1:-1,P=i.c,C=a.c;if(!(P&&P[0]&&C&&C[0]))return new e(i.s&&a.s&&(P?!C||P[0]!=C[0]:C)?P&&0==P[0]||!C?0*O:O/0:NaN);for(g=new e(O),b=g.c=[],l=i.e-a.e,O=s+l+1,c||(c=I,l=o(i.e/F)-o(a.e/F),O=O/F|0),p=0;C[p]==(P[p]||0);p++);if(C[p]>(P[p]||0)&&l--,0>O)b.push(1),h=!0;else{for(k=P.length,A=C.length,p=0,O+=2,m=v(c/(C[0]+1)),m>1&&(C=t(C,m,c),P=t(P,m,c),A=C.length,k=P.length),N=A,w=P.slice(0,A),_=w.length;A>_;w[_++]=0);T=C.slice(),T.unshift(0),B=C[0],C[1]>=c/2&&B++;do{if(m=0,f=n(C,w,A,_),0>f){if(x=w[0],A!=_&&(x=x*c+(w[1]||0)),m=v(x/B),m>1)for(m>=c&&(m=c-1),d=t(C,m,c),y=d.length,_=w.length;1==n(d,w,y,_);)m--,r(d,y>A?T:C,y,c),y=d.length,f=1;else 0==m&&(f=m=1),d=C.slice(),y=d.length;if(_>y&&d.unshift(0),r(w,d,_,c),_=w.length,-1==f)for(;n(C,w,A,_)<1;)m++,r(w,_>A?T:C,_,c),_=w.length}else 0===f&&(m++,w=[0]);b[p++]=m,w[0]?w[_++]=P[N]||0:(w=[P[N]],_=1)}while((N++<k||null!=w[0])&&O--);h=null!=w[0],b[0]||b.shift()}if(c==I){for(p=1,O=b[0];O>=10;O/=10,p++);S(g,s+(g.e=p+l*F-1)+1,u,h)}else g.e=l,g.r=+h;return g}}(),d=function(){var t=/^(-?)0([xbo])/i,n=/^([^.]+)\.$/,r=/^\.([^.]+)$/,o=/^-?(Infinity|NaN)$/,i=/^\s*\+|^\s+|\s+$/g;return function(a,s,u,c){var f,l=u?s:s.replace(i,"");if(o.test(l))a.s=isNaN(l)?null:0>l?-1:1;else{if(!u&&(l=l.replace(t,function(t,e,n){return f="x"==(n=n.toLowerCase())?16:"b"==n?2:8,c&&c!=f?t:e}),c&&(f=c,l=l.replace(n,"$1").replace(r,"0.$1")),s!=l))return new e(l,f);W&&C(E,"not a"+(c?" base "+c:"")+" number",s),a.s=null}a.c=a.e=null,E=0}}(),R.absoluteValue=R.abs=function(){var t=new e(this);return t.s<0&&(t.s=1),t},R.ceil=function(){return S(new e(this),this.e+1,2)},R.comparedTo=R.cmp=function(t,n){return E=1,a(this,new e(t,n))},R.decimalPlaces=R.dp=function(){var t,e,n=this.c;if(!n)return null;if(t=((e=n.length-1)-o(this.e/F))*F,e=n[e])for(;e%10==0;e/=10,t--);return 0>t&&(t=0),t},R.dividedBy=R.div=function(t,n){return E=3,D(this,new e(t,n),j,U)},R.dividedToIntegerBy=R.divToInt=function(t,n){return E=4,D(this,new e(t,n),0,1)},R.equals=R.eq=function(t,n){return E=5,0===a(this,new e(t,n))},R.floor=function(){return S(new e(this),this.e+1,3)},R.greaterThan=R.gt=function(t,n){return E=6,a(this,new e(t,n))>0},R.greaterThanOrEqualTo=R.gte=function(t,n){return E=7,1===(n=a(this,new e(t,n)))||0===n},R.isFinite=function(){return!!this.c},R.isInteger=R.isInt=function(){return!!this.c&&o(this.e/F)>this.c.length-2},R.isNaN=function(){return!this.s},R.isNegative=R.isNeg=function(){return this.s<0},R.isZero=function(){return!!this.c&&0==this.c[0]},R.lessThan=R.lt=function(t,n){return E=8,a(this,new e(t,n))<0},R.lessThanOrEqualTo=R.lte=function(t,n){return E=9,-1===(n=a(this,new e(t,n)))||0===n},R.minus=R.sub=function(t,n){var r,i,a,s,u=this,c=u.s;if(E=10,t=new e(t,n),n=t.s,!c||!n)return new e(NaN);if(c!=n)return t.s=-n,u.plus(t);var f=u.e/F,l=t.e/F,p=u.c,h=t.c;if(!f||!l){if(!p||!h)return p?(t.s=-n,t):new e(h?u:NaN);if(!p[0]||!h[0])return h[0]?(t.s=-n,t):new e(p[0]?u:3==U?-0:0)}if(f=o(f),l=o(l),p=p.slice(),c=f-l){for((s=0>c)?(c=-c,a=p):(l=f,a=h),a.reverse(),n=c;n--;a.push(0));a.reverse()}else for(i=(s=(c=p.length)<(n=h.length))?c:n,c=n=0;i>n;n++)if(p[n]!=h[n]){s=p[n]<h[n];break}if(s&&(a=p,p=h,h=a,t.s=-t.s),n=(i=h.length)-(r=p.length),n>0)for(;n--;p[r++]=0);for(n=I-1;i>c;){if(p[--i]<h[i]){for(r=i;r&&!p[--r];p[r]=n);--p[r],p[i]+=I}p[i]-=h[i]}for(;0==p[0];p.shift(),--l);return p[0]?P(t,p,l):(t.s=3==U?-1:1,t.c=[t.e=0],t)},R.modulo=R.mod=function(t,n){var r,o,i=this;return E=11,t=new e(t,n),!i.c||!t.s||t.c&&!t.c[0]?new e(NaN):!t.c||i.c&&!i.c[0]?new e(i):(9==J?(o=t.s,t.s=1,r=D(i,t,0,3),t.s=o,r.s*=o):r=D(i,t,0,J),i.minus(r.times(t)))},R.negated=R.neg=function(){var t=new e(this);return t.s=-t.s||null,t},R.plus=R.add=function(t,n){var r,i=this,a=i.s;if(E=12,t=new e(t,n),n=t.s,!a||!n)return new e(NaN);if(a!=n)return t.s=-n,i.minus(t);var s=i.e/F,u=t.e/F,c=i.c,f=t.c;if(!s||!u){if(!c||!f)return new e(a/0);if(!c[0]||!f[0])return f[0]?t:new e(c[0]?i:0*a)}if(s=o(s),u=o(u),c=c.slice(),a=s-u){for(a>0?(u=s,r=f):(a=-a,r=c),r.reverse();a--;r.push(0));r.reverse()}for(a=c.length,n=f.length,0>a-n&&(r=f,f=c,c=r,n=a),a=0;n;)a=(c[--n]=c[n]+f[n]+a)/I|0,c[n]%=I;return a&&(c.unshift(a),++u),P(t,c,u)},R.precision=R.sd=function(t){var e,n,r=this,o=r.c;if(null!=t&&t!==!!t&&1!==t&&0!==t&&(W&&C(13,"argument"+b,t),t!=!!t&&(t=null)),!o)return null;if(n=o.length-1,e=n*F+1,n=o[n]){for(;n%10==0;n/=10,e--);for(n=o[0];n>=10;n/=10,e++);}return t&&r.e+1>e&&(e=r.e+1),e},R.round=function(t,n){var r=new e(this);return(null==t||z(t,0,A,15))&&S(r,~~t+this.e+1,null!=n&&z(n,0,8,15,w)?0|n:U),r},R.shift=function(t){var n=this;return z(t,-N,N,16,"argument")?n.times("1e"+p(t)):new e(n.c&&n.c[0]&&(-N>t||t>N)?n.s*(0>t?0:1/0):n)},R.squareRoot=R.sqrt=function(){var t,n,r,a,s,u=this,c=u.c,f=u.s,l=u.e,p=j+4,h=new e("0.5");if(1!==f||!c||!c[0])return new e(!f||0>f&&(!c||c[0])?NaN:c?u:1/0);if(f=Math.sqrt(+u),0==f||f==1/0?(n=i(c),(n.length+l)%2==0&&(n+="0"),f=Math.sqrt(n),l=o((l+1)/2)-(0>l||l%2),f==1/0?n="1e"+l:(n=f.toExponential(),n=n.slice(0,n.indexOf("e")+1)+l),r=new e(n)):r=new e(f+""),r.c[0])for(l=r.e,f=l+p,3>f&&(f=0);;)if(s=r,r=h.times(s.plus(D(u,s,p,1))),i(s.c).slice(0,f)===(n=i(r.c)).slice(0,f)){if(r.e<l&&--f,n=n.slice(f-3,f+1),"9999"!=n&&(a||"4999"!=n)){(!+n||!+n.slice(1)&&"5"==n.charAt(0))&&(S(r,r.e+j+2,1),t=!r.times(r).eq(u));break}if(!a&&(S(s,s.e+j+2,0),s.times(s).eq(u))){r=s;break}p+=4,f+=4,a=1}return S(r,r.e+j+1,U,t)},R.times=R.mul=function(t,n){var r,i,a,s,u,c,f,l,p,h,m,d,y,g,v,b=this,w=b.c,_=(E=17,t=new e(t,n)).c;if(!(w&&_&&w[0]&&_[0]))return!b.s||!t.s||w&&!w[0]&&!_||_&&!_[0]&&!w?t.c=t.e=t.s=null:(t.s*=b.s,w&&_?(t.c=[0],t.e=0):t.c=t.e=null),t;for(i=o(b.e/F)+o(t.e/F),t.s*=b.s,f=w.length,h=_.length,h>f&&(y=w,w=_,_=y,a=f,f=h,h=a),a=f+h,y=[];a--;y.push(0));for(g=I,v=B,a=h;--a>=0;){for(r=0,m=_[a]%v,d=_[a]/v|0,u=f,s=a+u;s>a;)l=w[--u]%v,p=w[u]/v|0,c=d*l+p*m,l=m*l+c%v*v+y[s]+r,r=(l/g|0)+(c/v|0)+d*p,y[s--]=l%g;y[s]=r}return r?++i:y.shift(),P(t,y,i)},R.toDigits=function(t,n){var r=new e(this);return t=null!=t&&z(t,1,A,18,"precision")?0|t:null,n=null!=n&&z(n,0,8,18,w)?0|n:U,t?S(r,t,n):r},R.toExponential=function(t,e){return h(this,null!=t&&z(t,0,A,19)?~~t+1:null,e,19)},R.toFixed=function(t,e){return h(this,null!=t&&z(t,0,A,20)?~~t+this.e+1:null,e,20)},R.toFormat=function(t,e){var n=h(this,null!=t&&z(t,0,A,21)?~~t+this.e+1:null,e,21);if(this.c){var r,o=n.split("."),i=+X.groupSize,a=+X.secondaryGroupSize,s=X.groupSeparator,u=o[0],c=o[1],f=this.s<0,l=f?u.slice(1):u,p=l.length;if(a&&(r=i,i=a,a=r,p-=r),i>0&&p>0){for(r=p%i||i,u=l.substr(0,r);p>r;r+=i)u+=s+l.substr(r,i);a>0&&(u+=s+l.slice(r)),f&&(u="-"+u)}n=c?u+X.decimalSeparator+((a=+X.fractionGroupSize)?c.replace(new RegExp("\\d{"+a+"}\\B","g"),"$&"+X.fractionGroupSeparator):c):u}return n},R.toFraction=function(t){var n,r,o,a,s,u,c,f,l,p=W,h=this,m=h.c,d=new e(L),y=r=new e(L),g=c=new e(L);if(null!=t&&(W=!1,u=new e(t),W=p,(!(p=u.isInt())||u.lt(L))&&(W&&C(22,"max denominator "+(p?"out of range":"not an integer"),t),t=!p&&u.c&&S(u,u.e+1,1).gte(L)?u:null)),!m)return h.toString();for(l=i(m),a=d.e=l.length-h.e-1,d.c[0]=k[(s=a%F)<0?F+s:s],t=!t||u.cmp(d)>0?a>0?d:y:u,s=G,G=1/0,u=new e(l),c.c[0]=0;f=D(u,d,0,1),o=r.plus(f.times(g)),1!=o.cmp(t);)r=g,g=o,y=c.plus(f.times(o=y)),c=o,d=u.minus(f.times(o=d)),u=o;return o=D(t.minus(r),g,0,1),c=c.plus(o.times(y)),r=r.plus(o.times(g)),c.s=y.s=h.s,a*=2,n=D(y,g,a,U).minus(h).abs().cmp(D(c,r,a,U).minus(h).abs())<1?[y.toString(),g.toString()]:[c.toString(),r.toString()],G=s,n},R.toNumber=function(){var t=this;return+t||(t.s?0*t.s:NaN)},R.toPower=R.pow=function(t){var n,r,o=v(0>t?-t:+t),i=this;if(!z(t,-N,N,23,"exponent")&&(!isFinite(t)||o>N&&(t/=0)||parseFloat(t)!=t&&!(t=NaN)))return new e(Math.pow(+i,t));for(n=V?g(V/F+2):0,r=new e(L);;){if(o%2){if(r=r.times(i),!r.c)break;n&&r.c.length>n&&(r.c.length=n)}if(o=v(o/2),!o)break;i=i.times(i),n&&i.c&&i.c.length>n&&(i.c.length=n)}return 0>t&&(r=L.div(r)),n?S(r,V,U):r},R.toPrecision=function(t,e){return h(this,null!=t&&z(t,1,A,24,"precision")?0|t:null,e,24)},R.toString=function(t){var e,r=this,o=r.s,a=r.e;return null===a?o?(e="Infinity",0>o&&(e="-"+e)):e="NaN":(e=i(r.c),e=null!=t&&z(t,2,64,25,"base")?n(l(e,a),0|t,10,o):H>=a||a>=q?f(e,a):l(e,a),0>o&&r.c[0]&&(e="-"+e)),e},R.truncated=R.trunc=function(){return S(new e(this),this.e+1,1)},R.valueOf=R.toJSON=function(){return this.toString()},null!=t&&e.config(t),e}function o(t){var e=0|t;return t>0||t===e?e:e-1}function i(t){for(var e,n,r=1,o=t.length,i=t[0]+"";o>r;){for(e=t[r++]+"",n=F-e.length;n--;e="0"+e);i+=e}for(o=i.length;48===i.charCodeAt(--o););return i.slice(0,o+1||1)}function a(t,e){var n,r,o=t.c,i=e.c,a=t.s,s=e.s,u=t.e,c=e.e;if(!a||!s)return null;if(n=o&&!o[0],r=i&&!i[0],n||r)return n?r?0:-s:a;if(a!=s)return a;if(n=0>a,r=u==c,!o||!i)return r?0:!o^n?1:-1;if(!r)return u>c^n?1:-1;for(s=(u=o.length)<(c=i.length)?u:c,a=0;s>a;a++)if(o[a]!=i[a])return o[a]>i[a]^n?1:-1;return u==c?0:u>c^n?1:-1}function s(t,e,n){return(t=p(t))>=e&&n>=t}function u(t){return"[object Array]"==Object.prototype.toString.call(t)}function c(t,e,n){for(var r,o,i=[0],a=0,s=t.length;s>a;){for(o=i.length;o--;i[o]*=e);for(i[r=0]+=x.indexOf(t.charAt(a++));r<i.length;r++)i[r]>n-1&&(null==i[r+1]&&(i[r+1]=0),i[r+1]+=i[r]/n|0,i[r]%=n)}return i.reverse()}function f(t,e){return(t.length>1?t.charAt(0)+"."+t.slice(1):t)+(0>e?"e":"e+")+e}function l(t,e){var n,r;if(0>e){for(r="0.";++e;r+="0");t=r+t}else if(n=t.length,++e>n){for(r="0",e-=n;--e;r+="0");t+=r}else n>e&&(t=t.slice(0,e)+"."+t.slice(e));return t}function p(t){return t=parseFloat(t),0>t?g(t):v(t)}var h,m,d,y=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,g=Math.ceil,v=Math.floor,b=" not a boolean or binary digit",w="rounding mode",_="number type has more than 15 significant digits",x="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_",I=1e14,F=14,N=9007199254740991,k=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],B=1e7,A=1e9;if(h=r(),"function"==typeof define&&define.amd)define(function(){return h});else if("undefined"!=typeof e&&e.exports){if(e.exports=h,!m)try{m=t("crypto")}catch(T){}}else n.BigNumber=h}(this)},{crypto:46}],web3:[function(t,e,n){var r=t("./lib/web3"),o=t("./lib/web3/namereg");r.providers.HttpProvider=t("./lib/web3/httpprovider"),r.providers.IpcProvider=t("./lib/web3/ipcprovider"),r.eth.contract=t("./lib/web3/contract"),r.eth.namereg=o.namereg,r.eth.ibanNamereg=o.ibanNamereg,r.eth.sendIBANTransaction=t("./lib/web3/transfer"),r.eth.iban=t("./lib/web3/iban"),"undefined"!=typeof window&&"undefined"==typeof window.web3&&(window.web3=r),e.exports=r},{"./lib/web3":22,"./lib/web3/contract":25,"./lib/web3/httpprovider":31,"./lib/web3/iban":32,"./lib/web3/ipcprovider":33,"./lib/web3/namereg":41,"./lib/web3/transfer":45}]},{},["web3"]);