require=functiont(e,n,r){functiono(a,u){if(!n[a]){if(!e[a]){vars="function"==typeofrequire&&require;if(!u&&s)returns(a,!0);if(i)returni(a,!0);varc=newError("Cannot find module '"+a+"'");throwc.code="MODULE_NOT_FOUND",c}varl=n[a]={exports:{}};e[a][0].call(l.exports,function(t){varn=e[a][1][t];returno(n?n:t)},l,l.exports,t,e,n,r)}returnn[a].exports}for(vari="function"==typeofrequire&&require,a=0;a<r.length;a++)o(r[a]);returno}({1:[function(t,e){varn=t("../utils/utils"),r=t("../utils/config"),o=t("./types"),i=t("./formatters"),a=function(t){thrownewError("parser does not support type: "+t)},u=function(t){return"[]"===t.slice(-2)},s=function(t,e){returnu(t)||"bytes"===t?i.formatInputInt(e.length):""},c=o.inputTypes(),l=function(t,e){varn="",r="",o="";returnt.forEach(function(t,r){n+=s(t.type,e[r])}),t.forEach(function(n,i){for(vars=!1,l=0;l<c.length&&!s;l++)s=c[l].type(t[i].type,e[i]);s||a(t[i].type);varf=c[l-1].format;u(t[i].type)?o+=e[i].reduce(function(t,e){returnt+f(e)},""):"bytes"===t[i].type?o+=f(e[i]):r+=f(e[i])}),n+=r+o},f=function(t){returnu(t)||"bytes"===t?2*r.ETH_PADDING:0},p=o.outputTypes(),m=function(t,e){e=e.slice(2);varn=[],s=2*r.ETH_PADDING,c=t.reduce(function(t,e){returnt+f(e.type)},0),l=e.slice(0,c);returne=e.slice(c),t.forEach(function(r,c){for(varf=!1,m=0;m<p.length&&!f;m++)f=p[m].type(t[c].type);f||a(t[c].type);varh=p[m-1].format;if(u(t[c].type)){vard=i.formatOutputUInt(l.slice(0,s));l=l.slice(s);for(varg=[],y=0;d>y;y++)g.push(h(e.slice(0,s))),e=e.slice(s);n.push(g)}elseo.prefixedType("bytes")(t[c].type)?(l=l.slice(s),n.push(h(e.slice(0,s))),e=e.slice(s)):(n.push(h(e.slice(0,s))),e=e.slice(s))}),n},h=function(t){vare={};returnt.forEach(function(t){varr=n.extractDisplayName(t.name),o=n.extractTypeName(t.name),i=function(){vare=Array.prototype.slice.call(arguments);returnl(t.inputs,e)};void0===e[r]&&(e[r]=i),e[r][o]=i}),e},d=function(t){vare={};returnt.forEach(function(t){varr=n.extractDisplayName(t.name),o=n.extractTypeName(t.name),i=function(e){returnm(t.outputs,e)};void0===e[r]&&(e[r]=i),e[r][o]=i}),e};e.exports={inputParser:h,outputParser:d,formatInput:l,formatOutput:m}},{"../utils/config":5,"../utils/utils":6,"./formatters":2,"./types":3}],2:[function(t,e){varn=t("bignumber.js"),r=t("../utils/utils"),o=t("../utils/config"),i=function(t,e,n){returnnewArray(e-t.length+1).join(n?n:"0")+t},a=function(t){vare=2*o.ETH_PADDING;returnn.config(o.ETH_BIGNUMBER_ROUNDING_MODE),i(r.toTwosComplement(t).round().toString(16),e)},u=function(t){returnr.fromAscii(t,o.ETH_PADDING).substr(2)},s=function(t){return"000000000000000000000000000000000000000000000000000000000000000"+(t?"1":"0")},c=function(t){returna(newn(t).times(newn(2).pow(128)))},l=function(t){return"1"===newn(t.substr(0,1),16).toString(2).substr(0,1)},f=function(t){returnt=t||"0",l(t)?newn(t,16).minus(newn("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16)).minus(1):newn(t,16)},p=function(t){returnt=t||"0",newn(t,16)},m=function(t){returnf(t).dividedBy(newn(2).pow(128))},h=function(t){returnp(t).dividedBy(newn(2).pow(128))},d=function(t){return"0x"+t},g=function(t){return"0000000000000000000000000000000000000000000000000000000000000001"===t?!0:!1},y=function(t){returnr.toAscii(t)},v=function(t){return"0x"+t.slice(t.length-40,t.length)};e.exports={formatInputInt:a,formatInputString:u,formatInputBool:s,formatInputReal:c,formatOutputInt:f,formatOutputUInt:p,formatOutputReal:m,formatOutputUReal:h,formatOutputHash:d,formatOutputBool:g,formatOutputString:y,formatOutputAddress:v}},{"../utils/config":5,"../utils/utils":6,"bignumber.js":"bignumber.js"}],3:[function(t,e){varn=t("./formatters"),r=function(t){returnfunction(e){return0===e.indexOf(t)}},o=function(t){returnfunction(e){returnt===e}},i=function(){return[{type:r("uint"),format:n.formatInputInt},{type:r("int"),format:n.formatInputInt},{type:r("bytes"),format:n.formatInputString},{type:r("real"),format:n.formatInputReal},{type:r("ureal"),format:n.formatInputReal},{type:o("address"),format:n.formatInputInt},{type:o("bo
}:function(){returno.length>n?null!=(t=o[n++]):void0};returna(e="DECIMAL_PLACES")&&z(t,0,D,2,e)&&(L=0|t),r[e]=L,a(e="ROUNDING_MODE")&&z(t,0,8,2,e)&&(U=0|t),r[e]=U,a(e="EXPONENTIAL_AT")&&(s(t)?z(t[0],-D,0,2,e)&&z(t[1],0,D,2,e)&&(R=0|t[0],j=0|t[1]):z(t,-D,D,2,e)&&(R=-(j=0|(0>t?-t:t)))),r[e]=[R,j],a(e="RANGE")&&(s(t)?z(t[0],-D,-1,2,e)&&z(t[1],1,D,2,e)&&(G=0|t[0],q=0|t[1]):z(t,-D,D,2,e)&&(0|t?G=-(q=0|(0>t?-t:t)):W&&S(2,e+" cannot be zero",t))),r[e]=[G,q],a(e="ERRORS")&&(t===!!t||1===t||0===t?(C=0,z=(W=!!t)?B:u):W&&S(2,e+b,t)),r[e]=W,a(e="CRYPTO")&&(t===!!t||1===t||0===t?(J=!(!t||!h||"object"!=typeofh),t&&!J&&W&&S(2,"crypto unavailable",h)):W&&S(2,e+b,t)),r[e]=J,a(e="MODULO_MODE")&&z(t,0,9,2,e)&&(V=0|t),r[e]=V,a(e="POW_PRECISION")&&z(t,0,D,2,e)&&($=0|t),r[e]=$,a(e="FORMAT")&&("object"==typeoft?K=t:W&&S(2,e+" not an object",t)),r[e]=K,r},e.max=function(){returnE(arguments,H.lt)},e.min=function(){returnE(arguments,H.gt)},e.random=function(){vart=9007199254740992,n=Math.random()*t&2097151?function(){returnv(Math.random()*t)}:function(){return8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)};returnfunction(t){varr,o,i,a,u,s=0,c=[],l=newe(M);if(t=null!=t&&z(t,0,D,14)?0|t:L,a=y(t/F),J)if(h&&h.getRandomValues){for(r=h.getRandomValues(newUint32Array(a*=2));a>s;)u=131072*r[s]+(r[s+1]>>>11),u>=9e15?(o=h.getRandomValues(newUint32Array(2)),r[s]=o[0],r[s+1]=o[1]):(c.push(u%1e14),s+=2);s=a/2}elseif(h&&h.randomBytes){for(r=h.randomBytes(a*=7);a>s;)u=281474976710656*(31&r[s])+1099511627776*r[s+1]+4294967296*r[s+2]+16777216*r[s+3]+(r[s+4]<<16)+(r[s+5]<<8)+r[s+6],u>=9e15?h.randomBytes(7).copy(r,s):(c.push(u%1e14),s+=7);s=a/7}elseW&&S(14,"crypto unavailable",h);if(!s)for(;a>s;)u=n(),9e15>u&&(c[s++]=u%1e14);for(a=c[--s],t%=F,a&&t&&(u=N[F-t],c[s]=v(a/u)*u);0===c[s];c.pop(),s--);if(0>s)c=[i=0];else{for(i=-1;0===c[0];c.shift(),i-=F);for(s=1,u=c[0];u>=10;u/=10,s++);F>s&&(i-=F-s)}returnl.e=i,l.c=c,l}}(),k=function(){functiont(t,e,n){varr,o,i,a,u=0,s=t.length,c=e%A,l=e/A|0;for(t=t.slice();s--;)i=t[s]%A,a=t[s]/A|0,r=l*i+a*c,o=c*i+r%A*A+u,u=(o/n|0)+(r/A|0)+l*a,t[s]=o%n;returnu&&t.unshift(u),t}functionn(t,e,n,r){varo,i;if(n!=r)i=n>r?1:-1;elsefor(o=i=0;n>o;o++)if(t[o]!=e[o]){i=t[o]>e[o]?1:-1;break}returni}functionr(t,e,n,r){for(varo=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());}returnfunction(i,a,u,s,c){varl,f,p,m,h,d,g,y,b,w,x,_,O,N,A,D,E,B=i.s==a.s?1:-1,P=i.c,S=a.c;if(!(P&&P[0]&&S&&S[0]))returnnewe(i.s&&a.s&&(P?!S||P[0]!=S[0]:S)?P&&0==P[0]||!S?0*B:B/0:0/0);for(y=newe(B),b=y.c=[],f=i.e-a.e,B=u+f+1,c||(c=T,f=o(i.e/F)-o(a.e/F),B=B/F|0),p=0;S[p]==(P[p]||0);p++);if(S[p]>(P[p]||0)&&f--,0>B)b.push(1),m=!0;else{for(N=P.length,D=S.length,p=0,B+=2,h=v(c/(S[0]+1)),h>1&&(S=t(S,h,c),P=t(P,h,c),D=S.length,N=P.length),O=D,w=P.slice(0,D),x=w.length;D>x;w[x++]=0);E=S.slice(),E.unshift(0),A=S[0],S[1]>=c/2&&A++;doh=0,l=n(S,w,D,x),0>l?(_=w[0],D!=x&&(_=_*c+(w[1]||0)),h=v(_/A),h>1?(h>=c&&(h=c-1),d=t(S,h,c),g=d.length,x=w.length,l=n(d,w,g,x),1==l&&(h--,r(d,g>D?E:S,g,c))):(0==h&&(l=h=1),d=S.slice()),g=d.length,x>g&&d.unshift(0),r(w,d,x,c),-1==l&&(x=w.length,l=n(S,w,D,x),1>l&&(h++,r(w,x>D?E:S,x,c))),x=w.length):0===l&&(h++,w=[0]),b[p++]=h,l&&w[0]?w[x++]=P[O]||0:(w=[P[O]],x=1);while((O++<N||null!=w[0])&&B--);m=null!=w[0],b[0]||b.shift()}if(c==T){for(p=1,B=b[0];B>=10;B/=10,p++);I(y,u+(y.e=p+f*F-1)+1,s,m)}elsey.e=f,y.r=+m;returny}}(),d=function(){vart=/^(-?)0([xbo])(?=\w[\w.]*$)/i,n=/^([^.]+)\.$/,r=/^\.([^.]+)$/,o=/^-?(Infinity|NaN)$/,i=/^\s*\+(?=[\w.])|^\s+|\s+$/g;returnfunction(a,u,s,c){varl,f=s?u:u.replace(i,"");if(o.test(f))a.s=isNaN(f)?null:0>f?-1:1;else{if(!s&&(f=f.replace(t,function(t,e,n){returnl="x"==(n=n.toLowerCase())?16:"b"==n?2:8,c&&c!=l?t:e}),c&&(l=c,f=f.replace(n,"$1").replace(r,"0.$1")),u!=f))returnnewe(f,l);W&&S(C,"not a"+(c?" base "+c:"")+" number",u),a.s=null}a.c=a.e=null,C=0}}(),H.absoluteValue=H.abs=function(){vart=newe(this);returnt.s<0&&(t.s=1),t},H.ceil=function(){returnI(newe(this),this.e+1,2)},H.comparedTo=H.cmp=function(t,n){returnC=1,a(this,newe(t,n))},