require=function e(t,n,r){function i(s,a){if(!n[s]){if(!t[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(o)return o(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 i(n?n:e)},c,c.exports,e,t,n,r)}return n[s].exports}for(var o="function"==typeof require&&require,s=0;sd;d++)h.push(o(n.slice(0,c))),n=n.slice(c);s.push(h)}else a("string")(u.outputs[t].type)?(p=p.slice(c),s.push(o(n.slice(0,c))),n=n.slice(c)):(s.push(o(n.slice(0,c))),n=n.slice(c))}),s}},E=function(e){var t=e.indexOf("(");return-1!==t?e.substr(0,t):e},F=function(e){var t=e.indexOf("(");return-1!==t?e.substr(t+1,e.length-1-(t+1)):""},M=function(e){var t={};return e.forEach(function(n){var r=E(n.name),i=F(n.name),o=function(){var t=Array.prototype.slice.call(arguments);return m(e,n.name,t)};void 0===t[r]&&(t[r]=o),t[r][i]=o}),t},D=function(e){var t={};return e.forEach(function(n){var r=E(n.name),i=F(n.name),o=function(t){return q(e,n.name,t)};void 0===t[r]&&(t[r]=o),t[r][i]=o}),t},T=function(e,t){return n.sha3(n.fromAscii(t))};t.exports={inputParser:M,outputParser:D,methodSignature:T,methodDisplayName:E,methodTypeName:F}},{"./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,i=function(e){o.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})},o=new WebSocket(t.websockets);o.onopen=function(){i(!0)},o.onerror=function(){i(!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"),i=4,o=function(e,t){var o=r.inputParser(t),s=r.outputParser(t),a={};return t.forEach(function(u){var f=r.methodDisplayName(u.name),c=r.methodTypeName(u.name),l=function(){var a=Array.prototype.slice.call(arguments),l=o[f][c].apply(null,a),p=function(e){return s[f][c](e)};return{call:function(o){return o=o||{},o.to=e,r.methodSignature(t,u.name).then(function(e){return o.data=e.slice(0,2+2*i)+l,n.eth.call(o).then(p)})},transact:function(o){return o=o||{},o.to=e,r.methodSignature(t,u.name).then(function(e){return o.data=e.slice(0,2+2*i)+l,n.eth.transact(o).then(p)})}}};void 0===a[f]&&(a[f]=l),a[f][c]=l}),a};t.exports=o},{"./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 i=parseInt(e.substr(n,2),16);if(0===i)break;t+=String.fromCharCode(i)}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