},o.prototype.sendAsync=function(t,e){this.connection._handle||this.connection.connect({path:this.path}),this.connection.write(JSON.stringify(t)),this._getResponse(t,e)},e.exports=o},{"../utils/utils":6,"./errors":13,net:32}],22:[function(t,e,r){varn=function(){returnarguments.callee._singletonInstance?arguments.callee._singletonInstance:(arguments.callee._singletonInstance=this,void(this.messageId=1))};n.getInstance=function(){vart=newn;returnt},n.prototype.toPayload=function(t,e){returnt||console.error("jsonrpc method should be specified!"),{jsonrpc:"2.0",method:t,params:e||[],id:this.messageId++}},n.prototype.isValidResponse=function(t){return!!t&&!t.error&&"2.0"===t.jsonrpc&&"number"==typeoft.id&&void0!==t.result},n.prototype.toBatchPayload=function(t){vare=this;returnt.map(function(t){returne.toPayload(t.method,t.params)})},e.exports=n},{}],23:[function(t,e,r){varn=t("./requestmanager"),i=t("../utils/utils"),o=t("./errors"),s=function(t){this.name=t.name,this.call=t.call,this.params=t.params||0,this.inputFormatter=t.inputFormatter,this.outputFormatter=t.outputFormatter};s.prototype.getCall=function(t){returni.isFunction(this.call)?this.call(t):this.call},s.prototype.extractCallback=function(t){returni.isFunction(t[t.length-1])?t.pop():void0},s.prototype.validateArgs=function(t){if(t.length!==this.params)throwo.InvalidNumberOfParams()},s.prototype.formatInput=function(t){returnthis.inputFormatter?this.inputFormatter.map(function(e,r){returne?e(t[r]):t[r]}):t},s.prototype.formatOutput=function(t){returnthis.outputFormatter&&null!==t?this.outputFormatter(t):t},s.prototype.attachToObject=function(t){vare=this.send.bind(this);e.request=this.request.bind(this),e.call=this.call;varr=this.name.split(".");r.length>1?(t[r[0]]=t[r[0]]||{},t[r[0]][r[1]]=e):t[r[0]]=e},s.prototype.toPayload=function(t){vare=this.getCall(t),r=this.extractCallback(t),n=this.formatInput(t);returnthis.validateArgs(n),{method:e,params:n,callback:r}},s.prototype.request=function(){vart=this.toPayload(Array.prototype.slice.call(arguments));returnt.format=this.formatOutput.bind(this),t},s.prototype.send=function(){vart=this.toPayload(Array.prototype.slice.call(arguments));if(t.callback){vare=this;returnn.getInstance().sendAsync(t,function(r,n){t.callback(r,e.formatOutput(n))})}returnthis.formatOutput(n.getInstance().send(t))},e.exports=s},{"../utils/utils":6,"./errors":13,"./requestmanager":28}],24:[function(t,e,r){varn=t("./contract"),i="0xc6d9d2cd449a754c494264e1809c50e34d64562b",o=[{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:"o_subRegistrar",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"},{constant:!0,inputs:[{name:"_name",type:"bytes32"}],name:"register",outputs:[{name:"",type:"address"}],type:"function"},{anonymous:!1,inputs:[{in
elseif(s(r)){for(a=o;a-->0;)if(r[a]===e||r[a].listener&&r[a].listener===e){n=a;break}if(0>n)returnthis;1===r.length?(r.length=0,deletethis._events[t]):r.splice(n,1),this._events.removeListener&&this.emit("removeListener",t,e)}returnthis},n.prototype.removeAllListeners=function(t){vare,r;if(!this._events)returnthis;if(!this._events.removeListener)return0===arguments.length?this._events={}:this._events[t]&&deletethis._events[t],this;if(0===arguments.length){for(einthis._events)"removeListener"!==e&&this.removeAllListeners(e);returnthis.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[t],i(r))this.removeListener(t,r);elsefor(;r.length;)this.removeListener(t,r[r.length-1]);returndeletethis._events[t],this},n.prototype.listeners=function(t){vare;returne=this._events&&this._events[t]?i(this._events[t])?[this._events[t]]:this._events[t].slice():[]},n.listenerCount=function(t,e){varr;returnr=t._events&&t._events[e]?i(t._events[e])?1:t._events[e].length:0}},{}],39:[function(t,e,r){varn=e.exports,i=(t("events").EventEmitter,t("./lib/request")),o=t("url");n.request=function(t,e){"string"==typeoft&&(t=o.parse(t)),t||(t={}),t.host||t.port||(t.port=parseInt(window.location.port,10)),!t.host&&t.hostname&&(t.host=t.hostname),t.protocol||(t.protocol=t.scheme?t.scheme+":":window.location.protocol),t.host||(t.host=window.location.hostname||window.location.host),/:/.test(t.host)&&(t.port||(t.port=t.host.split(":")[1]),t.host=t.host.split(":")[0]),t.port||(t.port="https:"==t.protocol?443:80);varr=newi(news,t);returne&&r.on("response",e),r},n.get=function(t,e){t.method="GET";varr=n.request(t,e);returnr.end(),r},n.Agent=function(){},n.Agent.defaultMaxSockets=4;vars=function(){if("undefined"==typeofwindow)thrownewError("no window object present");if(window.XMLHttpRequest)returnwindow.XMLHttpRequest;if(window.ActiveXObject){for(vart=["Msxml2.XMLHTTP.6.0","Msxml2.XMLHTTP.3.0","Microsoft.XMLHTTP"],e=0;e<t.length;e++)try{varr=newwindow.ActiveXObject(t[e]);returnfunction(){if(r){varn=r;returnr=null,n}returnnewwindow.ActiveXObject(t[e])}}catch(n){}thrownewError("ajax not supported in this browser")}thrownewError("ajax not supported in this browser")}();n.STATUS_CODES={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",300:"Multiple Choices",301:"Moved Permanently",302:"Moved Temporarily",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Time-out",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Request Entity Too Large",414:"Request-URI Too Large",415:"Unsupported Media Type",416:"Requested Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Time-out",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},{"./lib/request":40,events:38,url:63}],40:[function(t,e,r){varn=t("stream"),i=t("./response"),o=t("Base64"),s=t("inherits"),a=e.exports=function(t,e){varr=this;r.writable=!0,r.xhr=t,r.body=[],r.uri=(e.protocol||"http:")+"//"+e.host+(e.port?":"+e.port:"")+(e.path||"/"),"undefined"==typeofe.withCredentials&&(e.withCredentials=!0);try{t.withCredentials=e.withCredentials}catch(n){}if(e.responseType)try{t.responseType=e.responseType}catch(n){}if(t.open(e.method||"GET",r.uri,!0),t.onerror=function(t){r.emit("error",newError("Network error"))},r.