require=function e(t,n,r){function o(s,a){if(!n[s]){if(!t[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(i)return i(s,!0);var f=new Error("Cannot find module '"+s+"'");throw f.code="MODULE_NOT_FOUND",f}var c=n[s]={exports:{}};t[s][0].call(c.exports,function(e){var n=t[s][1][e];return o(n?n:e)},c,c.exports,e,t,n,r)}return n[s].exports}for(var i="function"==typeof require&&require,s=0;sd;d++)h.push(i(n.slice(0,c))),n=n.slice(c);s.push(h)}else a("string")(u.outputs[t].type)?(p=p.slice(c),s.push(i(n.slice(0,c))),n=n.slice(c)):(s.push(i(n.slice(0,c))),n=n.slice(c))}),s}},O=function(e){var t={};return e.forEach(function(n){t[n.name]=function(){var t=Array.prototype.slice.call(arguments);return g(e,n.name,t)}}),t},A=function(e){var t={};return e.forEach(function(n){t[n.name]=function(t){return k(e,n.name,t)}}),t},q=function(e,t){var r=e[i(e,t)],o=t+"(",s=r.inputs.map(function(e){return e.type});return o+=s.join(","),o+=")",n.sha3(n.fromAscii(o))};t.exports={inputParser:O,outputParser:A,methodSignature:q}},{"./web3":8}],2:[function(e,t){var n=e("./web3"),r=function(e){if(!n.haveProvider()){if(this.sendQueue=[],this.onmessageQueue=[],navigator.qt)return void(this.provider=new n.providers.QtProvider);e=e||{};var t={httprpc:e.httprpc||"http://localhost:8080",websockets:e.websockets||"ws://localhost:40404/eth"},r=this,o=function(e){i.close(),e?r.provider=new n.providers.WebSocketProvider(t.websockets):(r.provider=new n.providers.HttpRpcProvider(t.httprpc),r.poll=r.provider.poll.bind(r.provider)),r.sendQueue.forEach(function(e){r.provider.send(e)}),r.onmessageQueue.forEach(function(e){r.provider.onmessage=e})},i=new WebSocket(t.websockets);i.onopen=function(){o(!0)},i.onerror=function(){o(!1)}}};r.prototype.send=function(e){return this.provider?void this.provider.send(e):void this.sendQueue.push(e)},Object.defineProperty(r.prototype,"onmessage",{set:function(e){return this.provider?void(this.provider.onmessage=e):void this.onmessageQueue.push(e)}}),t.exports=r},{"./web3":8}],3:[function(e,t){var n=e("./web3"),r=e("./abi"),o=4,i=function(e,t){var i=r.inputParser(t),s=r.outputParser(t),a={};return t.forEach(function(u){a[u.name]=function(){var a=Array.prototype.slice.call(arguments),f=i[u.name].apply(null,a),c=function(e){return s[u.name](e)};return{call:function(i){return i=i||{},i.to=e,r.methodSignature(t,u.name).then(function(e){return i.data=e.slice(0,2+2*o)+f,n.eth.call(i).then(c)})},transact:function(i){return i=i||{},i.to=e,r.methodSignature(t,u.name).then(function(e){return i.data=e.slice(0,2+2*o)+f,n.eth.transact(i).then(c)})}}}}),a};t.exports=i},{"./abi":1,"./web3":8}],4:[function(e,t){var n=e("./web3"),r=function(e,t){this.impl=t,this.callbacks=[];var r=this;this.promise=t.newFilter(e),this.promise.then(function(e){r.id=e,n.on(t.changed,e,r.trigger.bind(r)),n.provider.startPolling({call:t.changed,args:[e]},e)})};r.prototype.arrived=function(e){this.changed(e)},r.prototype.changed=function(e){var t=this;this.promise.then(function(){t.callbacks.push(e)})},r.prototype.trigger=function(e){for(var t=0;tn;n+=2){var o=parseInt(e.substr(n,2),16);if(0===o)break;t+=String.fromCharCode(o)}return t},fromAscii:function(e,t){t=void 0===t?0:t;for(var n=this.toHex(e);n.length<2*t;)n+="00";return"0x"+n},toDecimal:function(e){return h(e.substring(2))},fromDecimal:function(e){return"0x"+d(e)},toEth:function(e){for(var t="string"==typeof e?0===e.indexOf("0x")?parseInt(e.substr(2),16):parseInt(e):e,n=0,r=["wei","Kwei","Mwei","Gwei","szabo","finney","ether","grand","Mether","Gether","Tether","Pether","Eether","Zether","Yether","Nether","Dether","Vether","Uether"];t>3e3&&n