mirror of
https://github.com/fluencelabs/js-peer-id
synced 2025-04-25 06:42:25 +00:00
12 lines
331 KiB
JavaScript
12 lines
331 KiB
JavaScript
(function(e){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=e()}else if(typeof define==="function"&&define.amd){define([],e)}else{var t;if(typeof window!=="undefined"){t=window}else if(typeof global!=="undefined"){t=global}else if(typeof self!=="undefined"){t=self}else{t=this}t.PeerId=e()}})(function(){var define,module,exports;return function e(t,r,i){function n(f,s){if(!r[f]){if(!t[f]){var o=typeof require=="function"&&require;if(!s&&o)return o(f,!0);if(a)return a(f,!0);var c=new Error("Cannot find module '"+f+"'");throw c.code="MODULE_NOT_FOUND",c}var h=r[f]={exports:{}};t[f][0].call(h.exports,function(e){var r=t[f][1][e];return n(r?r:e)},h,h.exports,e,t,r,i)}return r[f].exports}var a=typeof require=="function"&&require;for(var f=0;f<i.length;f++)n(i[f]);return n}({1:[function(e,t,r){var i=r;i.bignum=e("bn.js");i.define=e("./asn1/api").define;i.base=e("./asn1/base");i.constants=e("./asn1/constants");i.decoders=e("./asn1/decoders");i.encoders=e("./asn1/encoders")},{"./asn1/api":2,"./asn1/base":4,"./asn1/constants":8,"./asn1/decoders":10,"./asn1/encoders":13,"bn.js":17}],2:[function(e,t,r){var i=e("../asn1");var n=e("inherits");var a=r;a.define=function s(e,t){return new f(e,t)};function f(e,t){this.name=e;this.body=t;this.decoders={};this.encoders={}}f.prototype._createNamed=function o(t){var r;try{r=e("vm").runInThisContext("(function "+this.name+"(entity) {\n"+" this._initNamed(entity);\n"+"})")}catch(i){r=function(e){this._initNamed(e)}}n(r,t);r.prototype._initNamed=function a(e){t.call(this,e)};return new r(this)};f.prototype._getDecoder=function c(e){if(!this.decoders.hasOwnProperty(e))this.decoders[e]=this._createNamed(i.decoders[e]);return this.decoders[e]};f.prototype.decode=function h(e,t,r){return this._getDecoder(t).decode(e,r)};f.prototype._getEncoder=function d(e){if(!this.encoders.hasOwnProperty(e))this.encoders[e]=this._createNamed(i.encoders[e]);return this.encoders[e]};f.prototype.encode=function u(e,t,r){return this._getEncoder(t).encode(e,r)}},{"../asn1":1,inherits:92,vm:138}],3:[function(e,t,r){var i=e("inherits");var n=e("../base").Reporter;var a=e("buffer").Buffer;function f(e,t){n.call(this,t);if(!a.isBuffer(e)){this.error("Input not Buffer");return}this.base=e;this.offset=0;this.length=e.length}i(f,n);r.DecoderBuffer=f;f.prototype.save=function o(){return{offset:this.offset,reporter:n.prototype.save.call(this)}};f.prototype.restore=function c(e){var t=new f(this.base);t.offset=e.offset;t.length=this.offset;this.offset=e.offset;n.prototype.restore.call(this,e.reporter);return t};f.prototype.isEmpty=function h(){return this.offset===this.length};f.prototype.readUInt8=function d(e){if(this.offset+1<=this.length)return this.base.readUInt8(this.offset++,true);else return this.error(e||"DecoderBuffer overrun")};f.prototype.skip=function u(e,t){if(!(this.offset+e<=this.length))return this.error(t||"DecoderBuffer overrun");var r=new f(this.base);r._reporterState=this._reporterState;r.offset=this.offset;r.length=this.offset+e;this.offset+=e;return r};f.prototype.raw=function l(e){return this.base.slice(e?e.offset:this.offset,this.length)};function s(e,t){if(Array.isArray(e)){this.length=0;this.value=e.map(function(e){if(!(e instanceof s))e=new s(e,t);this.length+=e.length;return e},this)}else if(typeof e==="number"){if(!(0<=e&&e<=255))return t.error("non-byte EncoderBuffer value");this.value=e;this.length=1}else if(typeof e==="string"){this.value=e;this.length=a.byteLength(e)}else if(a.isBuffer(e)){this.value=e;this.length=e.length}else{return t.error("Unsupported type: "+typeof e)}}r.EncoderBuffer=s;s.prototype.join=function p(e,t){if(!e)e=new a(this.length);if(!t)t=0;if(this.length===0)return e;if(Array.isArray(this.value)){this.value.forEach(function(r){r.join(e,t);t+=r.length})}else{if(typeof this.value==="number")e[t]=this.value;else if(typeof this.value==="string")e.write(this.value,t);else if(a.isBuffer(this.value))this.value.copy(e,t);t+=this.length}return e}},{"../base":4,buffer:46,inherits:92}],4:[function(e,t,r){var i=r;i.Reporter=e("./reporter").Reporter;i.DecoderBuffer=e("./buffer").DecoderBuffer;i.EncoderBuffer=e("./buffer").EncoderBuffer;i.Node=e("./node")},{"./buffer":3,"./node":5,"./reporter":6}],5:[function(e,t,r){var i=e("../base").Reporter;var n=e("../base").EncoderBuffer;var a=e("minimalistic-assert");var f=["seq","seqof","set","setof","octstr","bitstr","objid","bool","gentime","utctime","null_","enum","int","ia5str","utf8str"];var s=["key","obj","use","optional","explicit","implicit","def","choice","any"].concat(f);var o=["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"];function c(e,t){var r={};this._baseState=r;r.enc=e;r.parent=t||null;r.children=null;r.tag=null;r.args=null;r.reverseArgs=null;r.choice=null;r.optional=false;r.any=false;r.obj=false;r.use=null;r.useDecoder=null;r.key=null;r["default"]=null;r.explicit=null;r.implicit=null;if(!r.parent){r.children=[];this._wrap()}}t.exports=c;var h=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit"];c.prototype.clone=function d(){var e=this._baseState;var t={};h.forEach(function(r){t[r]=e[r]});var r=new this.constructor(t.parent);r._baseState=t;return r};c.prototype._wrap=function u(){var e=this._baseState;s.forEach(function(t){this[t]=function r(){var r=new this.constructor(this);e.children.push(r);return r[t].apply(r,arguments)}},this)};c.prototype._init=function l(e){var t=this._baseState;a(t.parent===null);e.call(this);t.children=t.children.filter(function(e){return e._baseState.parent===this},this);a.equal(t.children.length,1,"Root node can have only one child")};c.prototype._useArgs=function p(e){var t=this._baseState;var r=e.filter(function(e){return e instanceof this.constructor},this);e=e.filter(function(e){return!(e instanceof this.constructor)},this);if(r.length!==0){a(t.children===null);t.children=r;r.forEach(function(e){e._baseState.parent=this},this)}if(e.length!==0){a(t.args===null);t.args=e;t.reverseArgs=e.map(function(e){if(typeof e!=="object"||e.constructor!==Object)return e;var t={};Object.keys(e).forEach(function(r){if(r==(r|0))r|=0;var i=e[r];t[i]=r});return t})}};o.forEach(function(e){c.prototype[e]=function t(){var t=this._baseState;throw new Error(e+" not implemented for encoding: "+t.enc)}});f.forEach(function(e){c.prototype[e]=function t(){var t=this._baseState;var r=Array.prototype.slice.call(arguments);a(t.tag===null);t.tag=e;this._useArgs(r);return this}});c.prototype.use=function b(e){var t=this._baseState;a(t.use===null);t.use=e;return this};c.prototype.optional=function v(){var e=this._baseState;e.optional=true;return this};c.prototype.def=function y(e){var t=this._baseState;a(t["default"]===null);t["default"]=e;t.optional=true;return this};c.prototype.explicit=function g(e){var t=this._baseState;a(t.explicit===null&&t.implicit===null);t.explicit=e;return this};c.prototype.implicit=function m(e){var t=this._baseState;a(t.explicit===null&&t.implicit===null);t.implicit=e;return this};c.prototype.obj=function w(){var e=this._baseState;var t=Array.prototype.slice.call(arguments);e.obj=true;if(t.length!==0)this._useArgs(t);return this};c.prototype.key=function _(e){var t=this._baseState;a(t.key===null);t.key=e;return this};c.prototype.any=function S(){var e=this._baseState;e.any=true;return this};c.prototype.choice=function E(e){var t=this._baseState;a(t.choice===null);t.choice=e;this._useArgs(Object.keys(e).map(function(t){return e[t]}));return this};c.prototype._decode=function B(e){var t=this._baseState;if(t.parent===null)return e.wrapResult(t.children[0]._decode(e));var r=t["default"];var i=true;var n;if(t.key!==null)n=e.enterKey(t.key);if(t.optional){var a=null;if(t.explicit!==null)a=t.explicit;else if(t.implicit!==null)a=t.implicit;else if(t.tag!==null)a=t.tag;if(a===null&&!t.any){var f=e.save();try{if(t.choice===null)this._decodeGeneric(t.tag,e);else this._decodeChoice(e);i=true}catch(s){i=false}e.restore(f)}else{i=this._peekTag(e,a,t.any);if(e.isError(i))return i}}var o;if(t.obj&&i)o=e.enterObject();if(i){if(t.explicit!==null){var c=this._decodeTag(e,t.explicit);if(e.isError(c))return c;e=c}if(t.use===null&&t.choice===null){if(t.any)var f=e.save();var h=this._decodeTag(e,t.implicit!==null?t.implicit:t.tag,t.any);if(e.isError(h))return h;if(t.any)r=e.raw(f);else e=h}if(t.any)r=r;else if(t.choice===null)r=this._decodeGeneric(t.tag,e);else r=this._decodeChoice(e);if(e.isError(r))return r;if(!t.any&&t.choice===null&&t.children!==null){var d=t.children.some(function u(t){t._decode(e)});if(d)return err}}if(t.obj&&i)r=e.leaveObject(o);if(t.key!==null&&(r!==null||i===true))e.leaveKey(n,t.key,r);return r};c.prototype._decodeGeneric=function A(e,t){var r=this._baseState;if(e==="seq"||e==="set")return null;if(e==="seqof"||e==="setof")return this._decodeList(t,e,r.args[0]);else if(e==="octstr"||e==="bitstr")return this._decodeStr(t,e);else if(e==="ia5str"||e==="utf8str")return this._decodeStr(t,e);else if(e==="objid"&&r.args)return this._decodeObjid(t,r.args[0],r.args[1]);else if(e==="objid")return this._decodeObjid(t,null,null);else if(e==="gentime"||e==="utctime")return this._decodeTime(t,e);else if(e==="null_")return this._decodeNull(t);else if(e==="bool")return this._decodeBool(t);else if(e==="int"||e==="enum")return this._decodeInt(t,r.args&&r.args[0]);else if(r.use!==null)return this._getUse(r.use,t._reporterState.obj)._decode(t);else return t.error("unknown tag: "+e);return null};c.prototype._getUse=function I(e,t){var r=this._baseState;r.useDecoder=this._use(e,t);a(r.useDecoder._baseState.parent===null);r.useDecoder=r.useDecoder._baseState.children[0];if(r.implicit!==r.useDecoder._baseState.implicit){r.useDecoder=r.useDecoder.clone();r.useDecoder._baseState.implicit=r.implicit}return r.useDecoder};c.prototype._decodeChoice=function k(e){var t=this._baseState;var r=null;var i=false;Object.keys(t.choice).some(function(n){var a=e.save();var f=t.choice[n];try{var s=f._decode(e);if(e.isError(s))return false;r={type:n,value:s};i=true}catch(o){e.restore(a);return false}return true},this);if(!i)return e.error("Choice not matched");return r};c.prototype._createEncoderBuffer=function x(e){return new n(e,this.reporter)};c.prototype._encode=function R(e,t,r){var i=this._baseState;if(i["default"]!==null&&i["default"]===e)return;var n=this._encodeValue(e,t,r);if(n===undefined)return;if(this._skipDefault(n,t,r))return;return n};c.prototype._encodeValue=function T(e,t,r){var n=this._baseState;if(n.parent===null)return n.children[0]._encode(e,t||new i);var a=null;var f=true;this.reporter=t;if(n.optional&&e===undefined){if(n["default"]!==null)e=n["default"];else return}var s;var o=null;var c=false;if(n.any){a=this._createEncoderBuffer(e)}else if(n.choice){a=this._encodeChoice(e,t)}else if(n.children){o=n.children.map(function(r){if(r._baseState.tag==="null_")return r._encode(null,t,e);if(r._baseState.key===null)return t.error("Child should have a key");var i=t.enterKey(r._baseState.key);if(typeof e!=="object")return t.error("Child expected, but input is not object");var n=r._encode(e[r._baseState.key],t,e);t.leaveKey(i);return n},this).filter(function(e){return e});o=this._createEncoderBuffer(o)}else{if(n.tag==="seqof"||n.tag==="setof"){if(!(n.args&&n.args.length===1))return t.error("Too many args for : "+n.tag);if(!Array.isArray(e))return t.error("seqof/setof, but data is not Array");var h=this.clone();h._baseState.implicit=null;o=this._createEncoderBuffer(e.map(function(r){var i=this._baseState;return this._getUse(i.args[0],e)._encode(r,t)},h))}else if(n.use!==null){a=this._getUse(n.use,r)._encode(e,t)}else{o=this._encodePrimitive(n.tag,e);c=true}}var a;if(!n.any&&n.choice===null){var d=n.implicit!==null?n.implicit:n.tag;var u=n.implicit===null?"universal":"context";if(d===null){if(n.use===null)t.error("Tag could be ommited only for .use()")}else{if(n.use===null)a=this._encodeComposite(d,c,u,o)}}if(n.explicit!==null)a=this._encodeComposite(n.explicit,false,"context",a);return a};c.prototype._encodeChoice=function C(e,t){var r=this._baseState;var i=r.choice[e.type];if(!i){a(false,e.type+" not found in "+JSON.stringify(Object.keys(r.choice)))}return i._encode(e.value,t)};c.prototype._encodePrimitive=function M(e,t){var r=this._baseState;if(e==="octstr"||e==="bitstr"||e==="ia5str")return this._encodeStr(t,e);else if(e==="utf8str")return this._encodeStr(t,e);else if(e==="objid"&&r.args)return this._encodeObjid(t,r.reverseArgs[0],r.args[1]);else if(e==="objid")return this._encodeObjid(t,null,null);else if(e==="gentime"||e==="utctime")return this._encodeTime(t,e);else if(e==="null_")return this._encodeNull();else if(e==="int"||e==="enum")return this._encodeInt(t,r.args&&r.reverseArgs[0]);else if(e==="bool")return this._encodeBool(t);else throw new Error("Unsupported tag: "+e)}},{"../base":4,"minimalistic-assert":99}],6:[function(e,t,r){var i=e("inherits");function n(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}r.Reporter=n;n.prototype.isError=function f(e){return e instanceof a};n.prototype.save=function s(){var e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}};n.prototype.restore=function o(e){var t=this._reporterState;t.obj=e.obj;t.path=t.path.slice(0,e.pathLen)};n.prototype.enterKey=function c(e){return this._reporterState.path.push(e)};n.prototype.leaveKey=function h(e,t,r){var i=this._reporterState;i.path=i.path.slice(0,e-1);if(i.obj!==null)i.obj[t]=r};n.prototype.enterObject=function d(){var e=this._reporterState;var t=e.obj;e.obj={};return t};n.prototype.leaveObject=function u(e){var t=this._reporterState;var r=t.obj;t.obj=e;return r};n.prototype.error=function l(e){var t;var r=this._reporterState;var i=e instanceof a;if(i){t=e}else{t=new a(r.path.map(function(e){return"["+JSON.stringify(e)+"]"}).join(""),e.message||e,e.stack)}if(!r.options.partial)throw t;if(!i)r.errors.push(t);return t};n.prototype.wrapResult=function p(e){var t=this._reporterState;if(!t.options.partial)return e;return{result:this.isError(e)?null:e,errors:t.errors}};function a(e,t){this.path=e;this.rethrow(t)}i(a,Error);a.prototype.rethrow=function b(e){this.message=e+" at: "+(this.path||"(shallow)");Error.captureStackTrace(this,a);return this}},{inherits:92}],7:[function(e,t,r){var i=e("../constants");r.tagClass={0:"universal",1:"application",2:"context",3:"private"};r.tagClassByName=i._reverse(r.tagClass);r.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"};r.tagByName=i._reverse(r.tag)},{"../constants":8}],8:[function(e,t,r){var i=r;i._reverse=function n(e){var t={};Object.keys(e).forEach(function(r){if((r|0)==r)r=r|0;var i=e[r];t[i]=r});return t};i.der=e("./der")},{"./der":7}],9:[function(e,t,r){var i=e("inherits");var n=e("../../asn1");var a=n.base;var f=n.bignum;var s=n.constants.der;function o(e){this.enc="der";this.name=e.name;this.entity=e;this.tree=new c;this.tree._init(e.body)}t.exports=o;o.prototype.decode=function u(e,t){if(!(e instanceof a.DecoderBuffer))e=new a.DecoderBuffer(e,t);return this.tree._decode(e,t)};function c(e){a.Node.call(this,"der",e)}i(c,a.Node);c.prototype._peekTag=function l(e,t,r){if(e.isEmpty())return false;var i=e.save();var n=h(e,'Failed to peek tag: "'+t+'"');if(e.isError(n))return n;e.restore(i);return n.tag===t||n.tagStr===t||r};c.prototype._decodeTag=function p(e,t,r){var i=h(e,'Failed to decode tag of "'+t+'"');if(e.isError(i))return i;var n=d(e,i.primitive,'Failed to get length of "'+t+'"');if(e.isError(n))return n;if(!r&&i.tag!==t&&i.tagStr!==t&&i.tagStr+"of"!==t){return e.error('Failed to match tag: "'+t+'"')}if(i.primitive||n!==null)return e.skip(n,'Failed to match body of: "'+t+'"');var a=e.save();var f=this._skipUntilEnd(e,'Failed to skip indefinite length body: "'+this.tag+'"');if(e.isError(f))return f;n=e.offset-a.offset;e.restore(a);return e.skip(n,'Failed to match body of: "'+t+'"')};c.prototype._skipUntilEnd=function b(e,t){while(true){var r=h(e,t);if(e.isError(r))return r;var i=d(e,r.primitive,t);if(e.isError(i))return i;var n;if(r.primitive||i!==null)n=e.skip(i);else n=this._skipUntilEnd(e,t);if(e.isError(n))return n;if(r.tagStr==="end")break}};c.prototype._decodeList=function v(e,t,r){var i=[];while(!e.isEmpty()){var n=this._peekTag(e,"end");if(e.isError(n))return n;var a=r.decode(e,"der");if(e.isError(a)&&n)break;i.push(a)}return i};c.prototype._decodeStr=function y(e,t){if(t==="octstr"){return e.raw()}else if(t==="bitstr"){var r=e.readUInt8();if(e.isError(r))return r;return{unused:r,data:e.raw()}}else if(t==="ia5str"||t==="utf8str"){return e.raw().toString()}else{return this.error("Decoding of string type: "+t+" unsupported")}};c.prototype._decodeObjid=function g(e,t,r){var i=[];var n=0;while(!e.isEmpty()){var a=e.readUInt8();n<<=7;n|=a&127;if((a&128)===0){i.push(n);n=0}}if(a&128)i.push(n);var f=i[0]/40|0;var s=i[0]%40;if(r)result=i;else result=[f,s].concat(i.slice(1));if(t)result=t[result.join(" ")];return result};c.prototype._decodeTime=function m(e,t){var r=e.raw().toString();if(t==="gentime"){var i=r.slice(0,4)|0;var n=r.slice(4,6)|0;var a=r.slice(6,8)|0;var f=r.slice(8,10)|0;var s=r.slice(10,12)|0;var o=r.slice(12,14)|0}else if(t==="utctime"){var i=r.slice(0,2)|0;var n=r.slice(2,4)|0;var a=r.slice(4,6)|0;var f=r.slice(6,8)|0;var s=r.slice(8,10)|0;var o=r.slice(10,12)|0;if(i<70)i=2e3+i;else i=1900+i}else{return this.error("Decoding "+t+" time is not supported yet")}return Date.UTC(i,n-1,a,f,s,o,0)};c.prototype._decodeNull=function w(e){return null};c.prototype._decodeBool=function _(e){var t=e.readUInt8();if(e.isError(t))return t;else return t!==0};c.prototype._decodeInt=function S(e,t){var r=e.raw();var i=new f(r);if(t)i=t[i.toString(10)]||i;return i};c.prototype._use=function E(e,t){if(typeof e==="function")e=e(t);return e._getDecoder("der").tree};function h(e,t){var r=e.readUInt8(t);if(e.isError(r))return r;var i=s.tagClass[r>>6];var n=(r&32)===0;if((r&31)===31){var a=r;r=0;while((a&128)===128){a=e.readUInt8(t);if(e.isError(a))return a;r<<=7;r|=a&127}}else{r&=31}var f=s.tag[r];return{cls:i,primitive:n,tag:r,tagStr:f}}function d(e,t,r){var i=e.readUInt8(r);if(e.isError(i))return i;if(!t&&i===128)return null;if((i&128)===0){return i}var n=i&127;if(n>=4)return e.error("length octect is too long");i=0;for(var a=0;a<n;a++){i<<=8;var f=e.readUInt8(r);if(e.isError(f))return f;i|=f}return i}},{"../../asn1":1,inherits:92}],10:[function(e,t,r){var i=r;i.der=e("./der");i.pem=e("./pem")},{"./der":9,"./pem":11}],11:[function(e,t,r){var i=e("inherits");var n=e("buffer").Buffer;var a=e("../../asn1");var f=e("./der");function s(e){f.call(this,e);this.enc="pem"}i(s,f);t.exports=s;s.prototype.decode=function o(e,t){var r=e.toString().split(/[\r\n]+/g);var i=t.label.toUpperCase();var a=/^-----(BEGIN|END) ([^-]+)-----$/;var s=-1;var o=-1;for(var c=0;c<r.length;c++){var h=r[c].match(a);if(h===null)continue;if(h[2]!==i)continue;if(s===-1){if(h[1]!=="BEGIN")break;s=c}else{if(h[1]!=="END")break;o=c;break}}if(s===-1||o===-1)throw new Error("PEM section not found for: "+i);var d=r.slice(s+1,o).join("");d.replace(/[^a-z0-9\+\/=]+/gi,"");var u=new n(d,"base64");return f.prototype.decode.call(this,u,t)}},{"../../asn1":1,"./der":9,buffer:46,inherits:92}],12:[function(e,t,r){var i=e("inherits");var n=e("buffer").Buffer;var a=e("../../asn1");var f=a.base;var s=a.bignum;var o=a.constants.der;function c(e){this.enc="der";this.name=e.name;this.entity=e;this.tree=new h;this.tree._init(e.body)}t.exports=c;c.prototype.encode=function l(e,t){return this.tree._encode(e,t).join()};function h(e){f.Node.call(this,"der",e)}i(h,f.Node);h.prototype._encodeComposite=function p(e,t,r,i){var a=u(e,t,r,this.reporter);if(i.length<128){var f=new n(2);f[0]=a;f[1]=i.length;return this._createEncoderBuffer([f,i])}var s=1;for(var o=i.length;o>=256;o>>=8)s++;var f=new n(1+1+s);f[0]=a;f[1]=128|s;for(var o=1+s,c=i.length;c>0;o--,c>>=8)f[o]=c&255;return this._createEncoderBuffer([f,i])};h.prototype._encodeStr=function b(e,t){if(t==="octstr")return this._createEncoderBuffer(e);else if(t==="bitstr")return this._createEncoderBuffer([e.unused|0,e.data]);else if(t==="ia5str"||t==="utf8str")return this._createEncoderBuffer(e);return this.reporter.error("Encoding of string type: "+t+" unsupported")};h.prototype._encodeObjid=function v(e,t,r){if(typeof e==="string"){if(!t)return this.reporter.error("string objid given, but no values map found");if(!t.hasOwnProperty(e))return this.reporter.error("objid not found in values map");e=t[e].split(/[\s\.]+/g);for(var i=0;i<e.length;i++)e[i]|=0}else if(Array.isArray(e)){e=e.slice();for(var i=0;i<e.length;i++)e[i]|=0}if(!Array.isArray(e)){return this.reporter.error("objid() should be either array or string, "+"got: "+JSON.stringify(e))}if(!r){if(e[1]>=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,e[0]*40+e[1])}var a=0;for(var i=0;i<e.length;i++){var f=e[i];for(a++;f>=128;f>>=7)a++}var s=new n(a);var o=s.length-1;for(var i=e.length-1;i>=0;i--){var f=e[i];s[o--]=f&127;while((f>>=7)>0)s[o--]=128|f&127}return this._createEncoderBuffer(s)};function d(e){if(e<10)return"0"+e;else return e}h.prototype._encodeTime=function y(e,t){var r;var i=new Date(e);if(t==="gentime"){r=[d(i.getFullYear()),d(i.getUTCMonth()+1),d(i.getUTCDate()),d(i.getUTCHours()),d(i.getUTCMinutes()),d(i.getUTCSeconds()),"Z"].join("")}else if(t==="utctime"){r=[d(i.getFullYear()%100),d(i.getUTCMonth()+1),d(i.getUTCDate()),d(i.getUTCHours()),d(i.getUTCMinutes()),d(i.getUTCSeconds()),"Z"].join("")}else{this.reporter.error("Encoding "+t+" time is not supported yet")}return this._encodeStr(r,"octstr")};h.prototype._encodeNull=function g(){return this._createEncoderBuffer("")};h.prototype._encodeInt=function m(e,t){if(typeof e==="string"){if(!t)return this.reporter.error("String int or enum given, but no values map");if(!t.hasOwnProperty(e)){return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e))}e=t[e]}if(typeof e!=="number"&&!n.isBuffer(e)){var r=e.toArray();if(!e.sign&&r[0]&128){r.unshift(0)}e=new n(r)}if(n.isBuffer(e)){var i=e.length;if(e.length===0)i++;var a=new n(i);e.copy(a);if(e.length===0)a[0]=0;return this._createEncoderBuffer(a)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);var i=1;for(var f=e;f>=256;f>>=8)i++;var a=new Array(i);for(var f=a.length-1;f>=0;f--){a[f]=e&255;e>>=8}if(a[0]&128){a.unshift(0)}return this._createEncoderBuffer(new n(a))};h.prototype._encodeBool=function w(e){return this._createEncoderBuffer(e?255:0)};h.prototype._use=function _(e,t){if(typeof e==="function")e=e(t);return e._getEncoder("der").tree};h.prototype._skipDefault=function S(e,t,r){var i=this._baseState;var n;if(i["default"]===null)return false;var a=e.join();if(i.defaultBuffer===undefined)i.defaultBuffer=this._encodeValue(i["default"],t,r).join();if(a.length!==i.defaultBuffer.length)return false;for(n=0;n<a.length;n++)if(a[n]!==i.defaultBuffer[n])return false;return true};function u(e,t,r,i){var n;if(e==="seqof")e="seq";else if(e==="setof")e="set";if(o.tagByName.hasOwnProperty(e))n=o.tagByName[e];else if(typeof e==="number"&&(e|0)===e)n=e;else return i.error("Unknown tag: "+e);if(n>=31)return i.error("Multi-octet tag encoding unsupported");if(!t)n|=32;n|=o.tagClassByName[r||"universal"]<<6;return n}},{"../../asn1":1,buffer:46,inherits:92}],13:[function(e,t,r){var i=r;i.der=e("./der");i.pem=e("./pem")},{"./der":12,"./pem":14}],14:[function(e,t,r){var i=e("inherits");var n=e("buffer").Buffer;var a=e("../../asn1");var f=e("./der");function s(e){f.call(this,e);this.enc="pem"}i(s,f);t.exports=s;s.prototype.encode=function o(e,t){var r=f.prototype.encode.call(this,e);var i=r.toString("base64");var n=["-----BEGIN "+t.label+"-----"];for(var a=0;a<i.length;a+=64)n.push(i.slice(a,a+64));n.push("-----END "+t.label+"-----");return n.join("\n")}},{"../../asn1":1,"./der":12,buffer:46,inherits:92}],15:[function(e,t,r){t.exports=function i(e){var t={};var r=e.length;var i=e.charAt(0);for(var n=0;n<e.length;n++){t[e.charAt(n)]=n}function a(t){if(t.length===0)return"";var i,n;var a=[0];for(i=0;i<t.length;i++){for(n=0;n<a.length;n++)a[n]<<=8;a[0]+=t[i];var f=0;for(n=0;n<a.length;++n){a[n]+=f;f=a[n]/r|0;a[n]%=r}while(f){a.push(f%r);f=f/r|0}}for(i=0;t[i]===0&&i<t.length-1;i++){a.push(0)}return a.reverse().map(function(t){return e[t]}).join("")}function f(e){if(e.length===0)return[];var n,a;var f=[0];for(n=0;n<e.length;n++){var s=e[n];if(!(s in t))throw new Error("Non-base"+r+" character");for(a=0;a<f.length;a++)f[a]*=r;f[0]+=t[s];var o=0;for(a=0;a<f.length;++a){f[a]+=o;o=f[a]>>8;f[a]&=255}while(o){f.push(o&255);o>>=8}}for(n=0;e[n]===i&&n<e.length-1;n++){f.push(0)}return f.reverse()}return{encode:a,decode:f}}},{}],16:[function(e,t,r){var i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";(function(e){"use strict";var t=typeof Uint8Array!=="undefined"?Uint8Array:Array;var r="+".charCodeAt(0);var n="/".charCodeAt(0);var a="0".charCodeAt(0);var f="a".charCodeAt(0);var s="A".charCodeAt(0);var o="-".charCodeAt(0);var c="_".charCodeAt(0);function h(e){var t=e.charCodeAt(0);if(t===r||t===o)return 62;if(t===n||t===c)return 63;if(t<a)return-1;if(t<a+10)return t-a+26+26;if(t<s+26)return t-s;if(t<f+26)return t-f+26}function d(e){var r,i,n,a,f,s;if(e.length%4>0){throw new Error("Invalid string. Length must be a multiple of 4")}var o=e.length;f="="===e.charAt(o-2)?2:"="===e.charAt(o-1)?1:0;s=new t(e.length*3/4-f);n=f>0?e.length-4:e.length;var c=0;function d(e){s[c++]=e}for(r=0,i=0;r<n;r+=4,i+=3){a=h(e.charAt(r))<<18|h(e.charAt(r+1))<<12|h(e.charAt(r+2))<<6|h(e.charAt(r+3));d((a&16711680)>>16);d((a&65280)>>8);d(a&255)}if(f===2){a=h(e.charAt(r))<<2|h(e.charAt(r+1))>>4;d(a&255)}else if(f===1){a=h(e.charAt(r))<<10|h(e.charAt(r+1))<<4|h(e.charAt(r+2))>>2;d(a>>8&255);d(a&255)}return s}function u(e){var t,r=e.length%3,n="",a,f;function s(e){return i.charAt(e)}function o(e){return s(e>>18&63)+s(e>>12&63)+s(e>>6&63)+s(e&63)}for(t=0,f=e.length-r;t<f;t+=3){a=(e[t]<<16)+(e[t+1]<<8)+e[t+2];n+=o(a)}switch(r){case 1:a=e[e.length-1];n+=s(a>>2);n+=s(a<<4&63);n+="==";break;case 2:a=(e[e.length-2]<<8)+e[e.length-1];n+=s(a>>10);n+=s(a>>4&63);n+=s(a<<2&63);n+="=";break}return n}e.toByteArray=d;e.fromByteArray=u})(typeof r==="undefined"?this.base64js={}:r)},{}],17:[function(e,t,r){(function(e,t){"use strict";function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype;e.prototype=new r;e.prototype.constructor=e}function n(e,t,r){if(e!==null&&typeof e==="object"&&Array.isArray(e.words)){return e}this.negative=0;this.words=null;this.length=0;this.red=null;if(t==="le"||t==="be"){r=t;t=10}if(e!==null)this._init(e||0,t||10,r||"be")}if(typeof e==="object")e.exports=n;else t.BN=n;n.BN=n;n.wordSize=26;n.max=function _(e,t){if(e.cmp(t)>0)return e;else return t};n.min=function S(e,t){if(e.cmp(t)<0)return e;else return t};n.prototype._init=function E(e,t,i){if(typeof e==="number"){return this._initNumber(e,t,i)}else if(typeof e==="object"){return this._initArray(e,t,i)}if(t==="hex")t=16;r(t===(t|0)&&t>=2&&t<=36);e=e.toString().replace(/\s+/g,"");var n=0;if(e[0]==="-")n++;if(t===16)this._parseHex(e,n);else this._parseBase(e,t,n);if(e[0]==="-")this.negative=1;this.strip();if(i!=="le")return;this._initArray(this.toArray(),t,i)};n.prototype._initNumber=function B(e,t,i){if(e<0){this.negative=1;e=-e}if(e<67108864){this.words=[e&67108863];this.length=1}else if(e<4503599627370496){this.words=[e&67108863,e/67108864&67108863];this.length=2}else{r(e<9007199254740992);this.words=[e&67108863,e/67108864&67108863,1];this.length=3}if(i!=="le")return;this._initArray(this.toArray(),t,i)};n.prototype._initArray=function A(e,t,i){r(typeof e.length==="number");if(e.length<=0){this.words=[0];this.length=1;return this}this.length=Math.ceil(e.length/3);this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var a=0;if(i==="be"){for(var n=e.length-1,f=0;n>=0;n-=3){var s=e[n]|e[n-1]<<8|e[n-2]<<16;this.words[f]|=s<<a&67108863;this.words[f+1]=s>>>26-a&67108863;a+=24;if(a>=26){a-=26;f++}}}else if(i==="le"){for(var n=0,f=0;n<e.length;n+=3){var s=e[n]|e[n+1]<<8|e[n+2]<<16;this.words[f]|=s<<a&67108863;this.words[f+1]=s>>>26-a&67108863;a+=24;if(a>=26){a-=26;f++}}}return this.strip()};function a(e,t,r){var i=0;var n=Math.min(e.length,r);for(var a=t;a<n;a++){var f=e.charCodeAt(a)-48;i<<=4;if(f>=49&&f<=54)i|=f-49+10;else if(f>=17&&f<=22)i|=f-17+10;else i|=f&15}return i}n.prototype._parseHex=function I(e,t){this.length=Math.ceil((e.length-t)/6);this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var i=0;for(var r=e.length-6,n=0;r>=t;r-=6){var f=a(e,r,r+6);this.words[n]|=f<<i&67108863;this.words[n+1]|=f>>>26-i&4194303;i+=24;if(i>=26){i-=26;n++}}if(r+6!==t){var f=a(e,t,r+6);this.words[n]|=f<<i&67108863;this.words[n+1]|=f>>>26-i&4194303}this.strip()};function f(e,t,r,i){var n=0;var a=Math.min(e.length,r);for(var f=t;f<a;f++){var s=e.charCodeAt(f)-48;n*=i;if(s>=49)n+=s-49+10;else if(s>=17)n+=s-17+10;else n+=s}return n}n.prototype._parseBase=function k(e,t,r){this.words=[0];this.length=1;for(var i=0,n=1;n<=67108863;n*=t)i++;i--;n=n/t|0;var a=e.length-r;var s=a%i;var o=Math.min(a,a-s)+r;var c=0;for(var h=r;h<o;h+=i){c=f(e,h,h+i,t);this.imuln(n);if(this.words[0]+c<67108864)this.words[0]+=c;else this._iaddn(c)}if(s!==0){var d=1;var c=f(e,h,e.length,t);for(var h=0;h<s;h++)d*=t;this.imuln(d);if(this.words[0]+c<67108864)this.words[0]+=c;else this._iaddn(c)}};n.prototype.copy=function x(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length;e.negative=this.negative;e.red=this.red};n.prototype.clone=function R(){var e=new n(null);this.copy(e);return e};n.prototype.strip=function T(){while(this.length>1&&this.words[this.length-1]===0)this.length--;return this._normSign()};n.prototype._normSign=function C(){if(this.length===1&&this.words[0]===0)this.negative=0;return this};n.prototype.inspect=function M(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var s=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"];var o=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];var c=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];n.prototype.toString=function P(e,t){e=e||10;var t=t|0||1;if(e===16||e==="hex"){var i="";var n=0;var a=0;for(var f=0;f<this.length;f++){var h=this.words[f];var d=((h<<n|a)&16777215).toString(16);a=h>>>24-n&16777215;if(a!==0||f!==this.length-1)i=s[6-d.length]+d+i;else i=d+i;n+=2;if(n>=26){n-=26;f--}}if(a!==0)i=a.toString(16)+i;while(i.length%t!==0)i="0"+i;if(this.negative!==0)i="-"+i;return i}else if(e===(e|0)&&e>=2&&e<=36){var u=o[e];var l=c[e];var i="";var p=this.clone();p.negative=0;while(p.cmpn(0)!==0){var b=p.modn(l).toString(e);p=p.idivn(l);if(p.cmpn(0)!==0)i=s[u-b.length]+b+i;else i=b+i}if(this.cmpn(0)===0)i="0"+i;while(i.length%t!==0)i="0"+i;if(this.negative!==0)i="-"+i;return i}else{
|
|
r(false,"Base should be between 2 and 36")}};n.prototype.toJSON=function D(){return this.toString(16)};n.prototype.toArray=function L(e,t){this.strip();var i=e==="le";var n=new Array(this.byteLength());n[0]=0;var a=this.clone();if(!i){for(var f=0;a.cmpn(0)!==0;f++){var s=a.andln(255);a.iushrn(8);n[n.length-f-1]=s}}else{for(var f=0;a.cmpn(0)!==0;f++){var s=a.andln(255);a.iushrn(8);n[f]=s}}if(t){r(n.length<=t,"byte array longer than desired length");while(n.length<t){if(i)n.push(0);else n.unshift(0)}}return n};if(Math.clz32){n.prototype._countBits=function j(e){return 32-Math.clz32(e)}}else{n.prototype._countBits=function q(e){var t=e;var r=0;if(t>=4096){r+=13;t>>>=13}if(t>=64){r+=7;t>>>=7}if(t>=8){r+=4;t>>>=4}if(t>=2){r+=2;t>>>=2}return r+t}}n.prototype._zeroBits=function N(e){if(e===0)return 26;var t=e;var r=0;if((t&8191)===0){r+=13;t>>>=13}if((t&127)===0){r+=7;t>>>=7}if((t&15)===0){r+=4;t>>>=4}if((t&3)===0){r+=2;t>>>=2}if((t&1)===0)r++;return r};n.prototype.bitLength=function O(){var e=0;var t=this.words[this.length-1];var e=this._countBits(t);return(this.length-1)*26+e};function h(e){var t=new Array(e.bitLength());for(var r=0;r<t.length;r++){var i=r/26|0;var n=r%26;t[r]=(e.words[i]&1<<n)>>>n}return t}n.prototype.zeroBits=function U(){if(this.cmpn(0)===0)return 0;var e=0;for(var t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);e+=r;if(r!==26)break}return e};n.prototype.byteLength=function z(){return Math.ceil(this.bitLength()/8)};n.prototype.neg=function K(){if(this.cmpn(0)===0)return this.clone();var e=this.clone();e.negative=this.negative^1;return e};n.prototype.ineg=function F(){this.negative^=1;return this};n.prototype.iuor=function V(e){while(this.length<e.length)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()};n.prototype.ior=function H(e){r((this.negative|e.negative)===0);return this.iuor(e)};n.prototype.or=function Y(e){if(this.length>e.length)return this.clone().ior(e);else return e.clone().ior(this)};n.prototype.uor=function X(e){if(this.length>e.length)return this.clone().iuor(e);else return e.clone().iuor(this)};n.prototype.iuand=function W(e){var t;if(this.length>e.length)t=e;else t=this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];this.length=t.length;return this.strip()};n.prototype.iand=function G(e){r((this.negative|e.negative)===0);return this.iuand(e)};n.prototype.and=function J(e){if(this.length>e.length)return this.clone().iand(e);else return e.clone().iand(this)};n.prototype.uand=function Z(e){if(this.length>e.length)return this.clone().iuand(e);else return e.clone().iuand(this)};n.prototype.iuxor=function Q(e){var t;var r;if(this.length>e.length){t=this;r=e}else{t=e;r=this}for(var i=0;i<r.length;i++)this.words[i]=t.words[i]^r.words[i];if(this!==t)for(;i<t.length;i++)this.words[i]=t.words[i];this.length=t.length;return this.strip()};n.prototype.ixor=function $(e){r((this.negative|e.negative)===0);return this.iuxor(e)};n.prototype.xor=function ee(e){if(this.length>e.length)return this.clone().ixor(e);else return e.clone().ixor(this)};n.prototype.uxor=function te(e){if(this.length>e.length)return this.clone().iuxor(e);else return e.clone().iuxor(this)};n.prototype.setn=function re(e,t){r(typeof e==="number"&&e>=0);var i=e/26|0;var n=e%26;while(this.length<=i)this.words[this.length++]=0;if(t)this.words[i]=this.words[i]|1<<n;else this.words[i]=this.words[i]&~(1<<n);return this.strip()};n.prototype.iadd=function ie(e){if(this.negative!==0&&e.negative===0){this.negative=0;var t=this.isub(e);this.negative^=1;return this._normSign()}else if(this.negative===0&&e.negative!==0){e.negative=0;var t=this.isub(e);e.negative=1;return t._normSign()}var r;var i;if(this.length>e.length){r=this;i=e}else{r=e;i=this}var n=0;for(var a=0;a<i.length;a++){var t=(r.words[a]|0)+(i.words[a]|0)+n;this.words[a]=t&67108863;n=t>>>26}for(;n!==0&&a<r.length;a++){var t=(r.words[a]|0)+n;this.words[a]=t&67108863;n=t>>>26}this.length=r.length;if(n!==0){this.words[this.length]=n;this.length++}else if(r!==this){for(;a<r.length;a++)this.words[a]=r.words[a]}return this};n.prototype.add=function ne(e){if(e.negative!==0&&this.negative===0){e.negative=0;var t=this.sub(e);e.negative^=1;return t}else if(e.negative===0&&this.negative!==0){this.negative=0;var t=e.sub(this);this.negative=1;return t}if(this.length>e.length)return this.clone().iadd(e);else return e.clone().iadd(this)};n.prototype.isub=function ae(e){if(e.negative!==0){e.negative=0;var t=this.iadd(e);e.negative=1;return t._normSign()}else if(this.negative!==0){this.negative=0;this.iadd(e);this.negative=1;return this._normSign()}var r=this.cmp(e);if(r===0){this.negative=0;this.length=1;this.words[0]=0;return this}var i;var n;if(r>0){i=this;n=e}else{i=e;n=this}var a=0;for(var f=0;f<n.length;f++){var t=(i.words[f]|0)-(n.words[f]|0)+a;a=t>>26;this.words[f]=t&67108863}for(;a!==0&&f<i.length;f++){var t=(i.words[f]|0)+a;a=t>>26;this.words[f]=t&67108863}if(a===0&&f<i.length&&i!==this)for(;f<i.length;f++)this.words[f]=i.words[f];this.length=Math.max(this.length,f);if(i!==this)this.negative=1;return this.strip()};n.prototype.sub=function fe(e){return this.clone().isub(e)};function d(e,t,r){r.negative=t.negative^e.negative;var i=e.length+t.length|0;r.length=i;i=i-1|0;var n=e.words[0]|0;var a=t.words[0]|0;var f=n*a;var s=f&67108863;var o=f/67108864|0;r.words[0]=s;for(var c=1;c<i;c++){var h=o>>>26;var d=o&67108863;var u=Math.min(c,t.length-1);for(var l=Math.max(0,c-e.length+1);l<=u;l++){var p=c-l|0;var n=e.words[p]|0;var a=t.words[l]|0;var f=n*a;var s=f&67108863;h=h+(f/67108864|0)|0;s=s+d|0;d=s&67108863;h=h+(s>>>26)|0}r.words[c]=d|0;o=h|0}if(o!==0){r.words[c]=o|0}else{r.length--}return r.strip()}function u(e,t,r){r.negative=t.negative^e.negative;r.length=e.length+t.length;var i=0;var n=0;for(var a=0;a<r.length-1;a++){var f=n;n=0;var s=i&67108863;var o=Math.min(a,t.length-1);for(var c=Math.max(0,a-e.length+1);c<=o;c++){var h=a-c;var d=e.words[h]|0;var u=t.words[c]|0;var l=d*u;var p=l&67108863;f=f+(l/67108864|0)|0;p=p+s|0;s=p&67108863;f=f+(p>>>26)|0;n+=f>>>26;f&=67108863}r.words[a]=s;i=f;f=n}if(i!==0){r.words[a]=i}else{r.length--}return r.strip()}n.prototype.mulTo=function se(e,t){var r;if(this.length+e.length<63)r=d(this,e,t);else r=u(this,e,t);return r};n.prototype.mul=function oe(e){var t=new n(null);t.words=new Array(this.length+e.length);return this.mulTo(e,t)};n.prototype.imul=function ce(e){if(this.cmpn(0)===0||e.cmpn(0)===0){this.words[0]=0;this.length=1;return this}var t=this.length;var r=e.length;this.negative=e.negative^this.negative;this.length=this.length+e.length;this.words[this.length-1]=0;for(var i=this.length-2;i>=0;i--){var n=0;var a=0;var f=Math.min(i,r-1);for(var s=Math.max(0,i-t+1);s<=f;s++){var o=i-s;var c=this.words[o]|0;var h=e.words[s]|0;var d=c*h;var u=d&67108863;n+=d/67108864|0;u+=a;a=u&67108863;n+=u>>>26}this.words[i]=a;this.words[i+1]+=n;n=0}var n=0;for(var o=1;o<this.length;o++){var l=(this.words[o]|0)+n;this.words[o]=l&67108863;n=l>>>26}return this.strip()};n.prototype.imuln=function he(e){r(typeof e==="number");var t=0;for(var i=0;i<this.length;i++){var n=(this.words[i]|0)*e;var a=(n&67108863)+(t&67108863);t>>=26;t+=n/67108864|0;t+=a>>>26;this.words[i]=a&67108863}if(t!==0){this.words[i]=t;this.length++}return this};n.prototype.muln=function de(e){return this.clone().imuln(e)};n.prototype.sqr=function ue(){return this.mul(this)};n.prototype.isqr=function le(){return this.mul(this)};n.prototype.pow=function pe(e){var t=h(e);if(t.length===0)return new n(1);var r=this;for(var i=0;i<t.length;i++,r=r.sqr())if(t[i]!==0)break;if(++i<t.length){for(var a=r.sqr();i<t.length;i++,a=a.sqr()){if(t[i]===0)continue;r=r.mul(a)}}return r};n.prototype.iushln=function be(e){r(typeof e==="number"&&e>=0);var t=e%26;var i=(e-t)/26;var n=67108863>>>26-t<<26-t;if(t!==0){var a=0;for(var f=0;f<this.length;f++){var s=this.words[f]&n;var o=(this.words[f]|0)-s<<t;this.words[f]=o|a;a=s>>>26-t}if(a){this.words[f]=a;this.length++}}if(i!==0){for(var f=this.length-1;f>=0;f--)this.words[f+i]=this.words[f];for(var f=0;f<i;f++)this.words[f]=0;this.length+=i}return this.strip()};n.prototype.ishln=function ve(e){r(this.negative===0);return this.iushln(e)};n.prototype.iushrn=function ye(e,t,i){r(typeof e==="number"&&e>=0);var n;if(t)n=(t-t%26)/26;else n=0;var a=e%26;var f=Math.min((e-a)/26,this.length);var s=67108863^67108863>>>a<<a;var o=i;n-=f;n=Math.max(0,n);if(o){for(var c=0;c<f;c++)o.words[c]=this.words[c];o.length=f}if(f===0){}else if(this.length>f){this.length-=f;for(var c=0;c<this.length;c++)this.words[c]=this.words[c+f]}else{this.words[0]=0;this.length=1}var h=0;for(var c=this.length-1;c>=0&&(h!==0||c>=n);c--){var d=this.words[c]|0;this.words[c]=h<<26-a|d>>>a;h=d&s}if(o&&h!==0)o.words[o.length++]=h;if(this.length===0){this.words[0]=0;this.length=1}this.strip();return this};n.prototype.ishrn=function ge(e,t,i){r(this.negative===0);return this.iushrn(e,t,i)};n.prototype.shln=function me(e){return this.clone().ishln(e)};n.prototype.ushln=function we(e){return this.clone().iushln(e)};n.prototype.shrn=function _e(e){return this.clone().ishrn(e)};n.prototype.ushrn=function Se(e){return this.clone().iushrn(e)};n.prototype.testn=function Ee(e){r(typeof e==="number"&&e>=0);var t=e%26;var i=(e-t)/26;var n=1<<t;if(this.length<=i){return false}var a=this.words[i];return!!(a&n)};n.prototype.imaskn=function Be(e){r(typeof e==="number"&&e>=0);var t=e%26;var i=(e-t)/26;r(this.negative===0,"imaskn works only with positive numbers");if(t!==0)i++;this.length=Math.min(i,this.length);if(t!==0){var n=67108863^67108863>>>t<<t;this.words[this.length-1]&=n}return this.strip()};n.prototype.maskn=function Ae(e){return this.clone().imaskn(e)};n.prototype.iaddn=function Ie(e){r(typeof e==="number");if(e<0)return this.isubn(-e);if(this.negative!==0){if(this.length===1&&(this.words[0]|0)<e){this.words[0]=e-(this.words[0]|0);this.negative=0;return this}this.negative=0;this.isubn(e);this.negative=1;return this}return this._iaddn(e)};n.prototype._iaddn=function ke(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++){this.words[t]-=67108864;if(t===this.length-1)this.words[t+1]=1;else this.words[t+1]++}this.length=Math.max(this.length,t+1);return this};n.prototype.isubn=function xe(e){r(typeof e==="number");if(e<0)return this.iaddn(-e);if(this.negative!==0){this.negative=0;this.iaddn(e);this.negative=1;return this}this.words[0]-=e;for(var t=0;t<this.length&&this.words[t]<0;t++){this.words[t]+=67108864;this.words[t+1]-=1}return this.strip()};n.prototype.addn=function Re(e){return this.clone().iaddn(e)};n.prototype.subn=function Te(e){return this.clone().isubn(e)};n.prototype.iabs=function Ce(){this.negative=0;return this};n.prototype.abs=function Me(){return this.clone().iabs()};n.prototype._ishlnsubmul=function Pe(e,t,i){var n=e.length+i;var a;if(this.words.length<n){var f=new Array(n);for(var a=0;a<this.length;a++)f[a]=this.words[a];this.words=f}else{a=this.length}this.length=Math.max(this.length,n);for(;a<this.length;a++)this.words[a]=0;var s=0;for(var a=0;a<e.length;a++){var o=(this.words[a+i]|0)+s;var c=(e.words[a]|0)*t;o-=c&67108863;s=(o>>26)-(c/67108864|0);this.words[a+i]=o&67108863}for(;a<this.length-i;a++){var o=(this.words[a+i]|0)+s;s=o>>26;this.words[a+i]=o&67108863}if(s===0)return this.strip();r(s===-1);s=0;for(var a=0;a<this.length;a++){var o=-(this.words[a]|0)+s;s=o>>26;this.words[a]=o&67108863}this.negative=1;return this.strip()};n.prototype._wordDiv=function De(e,t){var r=this.length-e.length;var i=this.clone();var a=e;var f=a.words[a.length-1]|0;var s=this._countBits(f);r=26-s;if(r!==0){a=a.ushln(r);i.iushln(r);f=a.words[a.length-1]|0}var o=i.length-a.length;var c;if(t!=="mod"){c=new n(null);c.length=o+1;c.words=new Array(c.length);for(var h=0;h<c.length;h++)c.words[h]=0}var d=i.clone()._ishlnsubmul(a,1,o);if(d.negative===0){i=d;if(c)c.words[o]=1}for(var u=o-1;u>=0;u--){var l=(i.words[a.length+u]|0)*67108864+(i.words[a.length+u-1]|0);l=Math.min(l/f|0,67108863);i._ishlnsubmul(a,l,u);while(i.negative!==0){l--;i.negative=0;i._ishlnsubmul(a,1,u);if(i.cmpn(0)!==0)i.negative^=1}if(c)c.words[u]=l}if(c)c.strip();i.strip();if(t!=="div"&&r!==0)i.iushrn(r);return{div:c?c:null,mod:i}};n.prototype.divmod=function Le(e,t,i){r(e.cmpn(0)!==0);if(this.negative!==0&&e.negative===0){var a=this.neg().divmod(e,t);var f;var s;if(t!=="mod")f=a.div.neg();if(t!=="div"){s=a.mod.neg();if(i&&s.neg)s=s.add(e)}return{div:f,mod:s}}else if(this.negative===0&&e.negative!==0){var a=this.divmod(e.neg(),t);var f;if(t!=="mod")f=a.div.neg();return{div:f,mod:a.mod}}else if((this.negative&e.negative)!==0){var a=this.neg().divmod(e.neg(),t);var s;if(t!=="div"){s=a.mod.neg();if(i&&s.neg)s=s.isub(e)}return{div:a.div,mod:s}}if(e.length>this.length||this.cmp(e)<0)return{div:new n(0),mod:this};if(e.length===1){if(t==="div")return{div:this.divn(e.words[0]),mod:null};else if(t==="mod")return{div:null,mod:new n(this.modn(e.words[0]))};return{div:this.divn(e.words[0]),mod:new n(this.modn(e.words[0]))}}return this._wordDiv(e,t)};n.prototype.div=function je(e){return this.divmod(e,"div",false).div};n.prototype.mod=function qe(e){return this.divmod(e,"mod",false).mod};n.prototype.umod=function Ne(e){return this.divmod(e,"mod",true).mod};n.prototype.divRound=function Oe(e){var t=this.divmod(e);if(t.mod.cmpn(0)===0)return t.div;var r=t.div.negative!==0?t.mod.isub(e):t.mod;var i=e.ushrn(1);var n=e.andln(1);var a=r.cmp(i);if(a<0||n===1&&a===0)return t.div;return t.div.negative!==0?t.div.isubn(1):t.div.iaddn(1)};n.prototype.modn=function Ue(e){r(e<=67108863);var t=(1<<26)%e;var i=0;for(var n=this.length-1;n>=0;n--)i=(t*i+(this.words[n]|0))%e;return i};n.prototype.idivn=function ze(e){r(e<=67108863);var t=0;for(var i=this.length-1;i>=0;i--){var n=(this.words[i]|0)+t*67108864;this.words[i]=n/e|0;t=n%e}return this.strip()};n.prototype.divn=function Ke(e){return this.clone().idivn(e)};n.prototype.egcd=function Fe(e){r(e.negative===0);r(e.cmpn(0)!==0);var t=this;var i=e.clone();if(t.negative!==0)t=t.umod(e);else t=t.clone();var a=new n(1);var f=new n(0);var s=new n(0);var o=new n(1);var c=0;while(t.isEven()&&i.isEven()){t.iushrn(1);i.iushrn(1);++c}var h=i.clone();var d=t.clone();while(t.cmpn(0)!==0){while(t.isEven()){t.iushrn(1);if(a.isEven()&&f.isEven()){a.iushrn(1);f.iushrn(1)}else{a.iadd(h).iushrn(1);f.isub(d).iushrn(1)}}while(i.isEven()){i.iushrn(1);if(s.isEven()&&o.isEven()){s.iushrn(1);o.iushrn(1)}else{s.iadd(h).iushrn(1);o.isub(d).iushrn(1)}}if(t.cmp(i)>=0){t.isub(i);a.isub(s);f.isub(o)}else{i.isub(t);s.isub(a);o.isub(f)}}return{a:s,b:o,gcd:i.iushln(c)}};n.prototype._invmp=function Ve(e){r(e.negative===0);r(e.cmpn(0)!==0);var t=this;var i=e.clone();if(t.negative!==0)t=t.umod(e);else t=t.clone();var a=new n(1);var f=new n(0);var s=i.clone();while(t.cmpn(1)>0&&i.cmpn(1)>0){while(t.isEven()){t.iushrn(1);if(a.isEven())a.iushrn(1);else a.iadd(s).iushrn(1)}while(i.isEven()){i.iushrn(1);if(f.isEven())f.iushrn(1);else f.iadd(s).iushrn(1)}if(t.cmp(i)>=0){t.isub(i);a.isub(f)}else{i.isub(t);f.isub(a)}}var o;if(t.cmpn(1)===0)o=a;else o=f;if(o.cmpn(0)<0)o.iadd(e);return o};n.prototype.gcd=function He(e){if(this.cmpn(0)===0)return e.clone();if(e.cmpn(0)===0)return this.clone();var t=this.clone();var r=e.clone();t.negative=0;r.negative=0;for(var i=0;t.isEven()&&r.isEven();i++){t.iushrn(1);r.iushrn(1)}do{while(t.isEven())t.iushrn(1);while(r.isEven())r.iushrn(1);var n=t.cmp(r);if(n<0){var a=t;t=r;r=a}else if(n===0||r.cmpn(1)===0){break}t.isub(r)}while(true);return r.iushln(i)};n.prototype.invm=function Ye(e){return this.egcd(e).a.umod(e)};n.prototype.isEven=function Xe(){return(this.words[0]&1)===0};n.prototype.isOdd=function We(){return(this.words[0]&1)===1};n.prototype.andln=function Ge(e){return this.words[0]&e};n.prototype.bincn=function Je(e){r(typeof e==="number");var t=e%26;var i=(e-t)/26;var n=1<<t;if(this.length<=i){for(var a=this.length;a<i+1;a++)this.words[a]=0;this.words[i]|=n;this.length=i+1;return this}var f=n;for(var a=i;f!==0&&a<this.length;a++){var s=this.words[a]|0;s+=f;f=s>>>26;s&=67108863;this.words[a]=s}if(f!==0){this.words[a]=f;this.length++}return this};n.prototype.cmpn=function Ze(e){var t=e<0;if(t)e=-e;if(this.negative!==0&&!t)return-1;else if(this.negative===0&&t)return 1;e&=67108863;this.strip();var r;if(this.length>1){r=1}else{var i=this.words[0]|0;r=i===e?0:i<e?-1:1}if(this.negative!==0)r=-r;return r};n.prototype.cmp=function Qe(e){if(this.negative!==0&&e.negative===0)return-1;else if(this.negative===0&&e.negative!==0)return 1;var t=this.ucmp(e);if(this.negative!==0)return-t;else return t};n.prototype.ucmp=function $e(e){if(this.length>e.length)return 1;else if(this.length<e.length)return-1;var t=0;for(var r=this.length-1;r>=0;r--){var i=this.words[r]|0;var n=e.words[r]|0;if(i===n)continue;if(i<n)t=-1;else if(i>n)t=1;break}return t};n.red=function et(e){return new m(e)};n.prototype.toRed=function tt(e){r(!this.red,"Already a number in reduction context");r(this.negative===0,"red works only with positives");return e.convertTo(this)._forceRed(e)};n.prototype.fromRed=function rt(){r(this.red,"fromRed works only with numbers in reduction context");return this.red.convertFrom(this)};n.prototype._forceRed=function it(e){this.red=e;return this};n.prototype.forceRed=function nt(e){r(!this.red,"Already a number in reduction context");return this._forceRed(e)};n.prototype.redAdd=function at(e){r(this.red,"redAdd works only with red numbers");return this.red.add(this,e)};n.prototype.redIAdd=function ft(e){r(this.red,"redIAdd works only with red numbers");return this.red.iadd(this,e)};n.prototype.redSub=function st(e){r(this.red,"redSub works only with red numbers");return this.red.sub(this,e)};n.prototype.redISub=function ot(e){r(this.red,"redISub works only with red numbers");return this.red.isub(this,e)};n.prototype.redShl=function ct(e){r(this.red,"redShl works only with red numbers");return this.red.ushl(this,e)};n.prototype.redMul=function ht(e){r(this.red,"redMul works only with red numbers");this.red._verify2(this,e);return this.red.mul(this,e)};n.prototype.redIMul=function dt(e){r(this.red,"redMul works only with red numbers");this.red._verify2(this,e);return this.red.imul(this,e)};n.prototype.redSqr=function ut(){r(this.red,"redSqr works only with red numbers");this.red._verify1(this);return this.red.sqr(this)};n.prototype.redISqr=function lt(){r(this.red,"redISqr works only with red numbers");this.red._verify1(this);return this.red.isqr(this)};n.prototype.redSqrt=function pt(){r(this.red,"redSqrt works only with red numbers");this.red._verify1(this);return this.red.sqrt(this)};n.prototype.redInvm=function bt(){r(this.red,"redInvm works only with red numbers");this.red._verify1(this);return this.red.invm(this)};n.prototype.redNeg=function vt(){r(this.red,"redNeg works only with red numbers");this.red._verify1(this);return this.red.neg(this)};n.prototype.redPow=function yt(e){r(this.red&&!e.red,"redPow(normalNum)");this.red._verify1(this);return this.red.pow(this,e)};var l={k256:null,p224:null,p192:null,p25519:null};function p(e,t){this.name=e;this.p=new n(t,16);this.n=this.p.bitLength();this.k=new n(1).iushln(this.n).isub(this.p);this.tmp=this._tmp()}p.prototype._tmp=function gt(){var e=new n(null);e.words=new Array(Math.ceil(this.n/13));return e};p.prototype.ireduce=function mt(e){var t=e;var r;do{this.split(t,this.tmp);t=this.imulK(t);t=t.iadd(this.tmp);r=t.bitLength()}while(r>this.n);var i=r<this.n?-1:t.ucmp(this.p);if(i===0){t.words[0]=0;t.length=1}else if(i>0){t.isub(this.p)}else{t.strip()}return t};p.prototype.split=function wt(e,t){e.iushrn(this.n,0,t)};p.prototype.imulK=function _t(e){return e.imul(this.k)};function b(){p.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(b,p);b.prototype.split=function St(e,t){var r=4194303;var i=Math.min(e.length,9);for(var n=0;n<i;n++)t.words[n]=e.words[n];t.length=i;if(e.length<=9){e.words[0]=0;e.length=1;return}var a=e.words[9];t.words[t.length++]=a&r;for(var n=10;n<e.length;n++){var f=e.words[n]|0;e.words[n-10]=(f&r)<<4|a>>>22;a=f}e.words[n-10]=a>>>22;e.length-=9};b.prototype.imulK=function Et(e){e.words[e.length]=0;e.words[e.length+1]=0;e.length+=2;var t;var r=0;for(var i=0;i<e.length;i++){var n=e.words[i]|0;t=n*64;r+=n*977;t+=r/67108864|0;r&=67108863;e.words[i]=r;r=t}if(e.words[e.length-1]===0){e.length--;if(e.words[e.length-1]===0)e.length--}return e};function v(){p.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}i(v,p);function y(){p.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}i(y,p);function g(){p.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}i(g,p);g.prototype.imulK=function Bt(e){var t=0;for(var r=0;r<e.length;r++){var i=(e.words[r]|0)*19+t;var n=i&67108863;i>>>=26;e.words[r]=n;t=i}if(t!==0)e.words[e.length++]=t;return e};n._prime=function At(e){if(l[e])return l[e];var At;if(e==="k256")At=new b;else if(e==="p224")At=new v;else if(e==="p192")At=new y;else if(e==="p25519")At=new g;else throw new Error("Unknown prime "+e);l[e]=At;return At};function m(e){if(typeof e==="string"){var t=n._prime(e);this.m=t.p;this.prime=t}else{this.m=e;this.prime=null}}m.prototype._verify1=function It(e){r(e.negative===0,"red works only with positives");r(e.red,"red works only with red numbers")};m.prototype._verify2=function kt(e,t){r((e.negative|t.negative)===0,"red works only with positives");r(e.red&&e.red===t.red,"red works only with red numbers")};m.prototype.imod=function xt(e){if(this.prime)return this.prime.ireduce(e)._forceRed(this);return e.umod(this.m)._forceRed(this)};m.prototype.neg=function Rt(e){var t=e.clone();t.negative^=1;return t.iadd(this.m)._forceRed(this)};m.prototype.add=function Tt(e,t){this._verify2(e,t);var r=e.add(t);if(r.cmp(this.m)>=0)r.isub(this.m);return r._forceRed(this)};m.prototype.iadd=function Ct(e,t){this._verify2(e,t);var r=e.iadd(t);if(r.cmp(this.m)>=0)r.isub(this.m);return r};m.prototype.sub=function Mt(e,t){this._verify2(e,t);var r=e.sub(t);if(r.cmpn(0)<0)r.iadd(this.m);return r._forceRed(this)};m.prototype.isub=function Pt(e,t){this._verify2(e,t);var r=e.isub(t);if(r.cmpn(0)<0)r.iadd(this.m);return r};m.prototype.shl=function Dt(e,t){this._verify1(e);return this.imod(e.ushln(t))};m.prototype.imul=function Lt(e,t){this._verify2(e,t);return this.imod(e.imul(t))};m.prototype.mul=function jt(e,t){this._verify2(e,t);return this.imod(e.mul(t))};m.prototype.isqr=function qt(e){return this.imul(e,e)};m.prototype.sqr=function Nt(e){return this.mul(e,e)};m.prototype.sqrt=function Ot(e){if(e.cmpn(0)===0)return e.clone();var t=this.m.andln(3);r(t%2===1);if(t===3){var i=this.m.add(new n(1)).iushrn(2);var a=this.pow(e,i);return a}var f=this.m.subn(1);var s=0;while(f.cmpn(0)!==0&&f.andln(1)===0){s++;f.iushrn(1)}r(f.cmpn(0)!==0);var o=new n(1).toRed(this);var c=o.redNeg();var h=this.m.subn(1).iushrn(1);var d=this.m.bitLength();d=new n(2*d*d).toRed(this);while(this.pow(d,h).cmp(c)!==0)d.redIAdd(c);var u=this.pow(d,f);var a=this.pow(e,f.addn(1).iushrn(1));var l=this.pow(e,f);var p=s;while(l.cmp(o)!==0){var b=l;for(var v=0;b.cmp(o)!==0;v++)b=b.redSqr();r(v<p);var y=this.pow(u,new n(1).iushln(p-v-1));a=a.redMul(y);u=y.redSqr();l=l.redMul(u);p=v}return a};m.prototype.invm=function Ut(e){var t=e._invmp(this.m);if(t.negative!==0){t.negative=0;return this.imod(t).redNeg()}else{return this.imod(t)}};m.prototype.pow=function zt(e,t){if(t.cmpn(0)===0)return new n(1);if(t.cmpn(1)===0)return e.clone();var r=4;var i=new Array(1<<r);i[0]=new n(1).toRed(this);i[1]=e;for(var a=2;a<i.length;a++)i[a]=this.mul(i[a-1],e);var f=i[0];var s=0;var o=0;var c=t.bitLength()%26;if(c===0)c=26;for(var a=t.length-1;a>=0;a--){var h=t.words[a];for(var d=c-1;d>=0;d--){var u=h>>d&1;if(f!==i[0])f=this.sqr(f);if(u===0&&s===0){o=0;continue}s<<=1;s|=u;o++;if(o!==r&&(a!==0||d!==0))continue;f=this.mul(f,i[s]);o=0;s=0}c=26}return f};m.prototype.convertTo=function Kt(e){var t=e.umod(this.m);if(t===e)return t.clone();else return t};m.prototype.convertFrom=function Ft(e){var t=e.clone();t.red=null;return t};n.mont=function Vt(e){return new w(e)};function w(e){m.call(this,e);this.shift=this.m.bitLength();if(this.shift%26!==0)this.shift+=26-this.shift%26;this.r=new n(1).iushln(this.shift);this.r2=this.imod(this.r.sqr());this.rinv=this.r._invmp(this.m);this.minv=this.rinv.mul(this.r).isubn(1).div(this.m);this.minv=this.minv.umod(this.r);this.minv=this.r.sub(this.minv)}i(w,m);w.prototype.convertTo=function Ht(e){return this.imod(e.ushln(this.shift))};w.prototype.convertFrom=function Yt(e){var t=this.imod(e.mul(this.rinv));t.red=null;return t};w.prototype.imul=function Xt(e,t){if(e.cmpn(0)===0||t.cmpn(0)===0){e.words[0]=0;e.length=1;return e}var r=e.imul(t);var i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);var n=r.isub(i).iushrn(this.shift);var a=n;if(n.cmp(this.m)>=0)a=n.isub(this.m);else if(n.cmpn(0)<0)a=n.iadd(this.m);return a._forceRed(this)};w.prototype.mul=function Wt(e,t){if(e.cmpn(0)===0||t.cmpn(0)===0)return new n(0)._forceRed(this);var r=e.mul(t);var i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);var a=r.isub(i).iushrn(this.shift);var f=a;if(a.cmp(this.m)>=0)f=a.isub(this.m);else if(a.cmpn(0)<0)f=a.iadd(this.m);return f._forceRed(this)};w.prototype.invm=function Gt(e){var t=this.imod(e._invmp(this.m).mul(this.r2));return t._forceRed(this)}})(typeof t==="undefined"||t,this)},{}],18:[function(e,t,r){var i;t.exports=function s(e){if(!i)i=new n(null);return i.generate(e)};function n(e){this.rand=e}t.exports.Rand=n;n.prototype.generate=function o(e){return this._rand(e)};if(typeof window==="object"){if(window.crypto&&window.crypto.getRandomValues){n.prototype._rand=function c(e){var t=new Uint8Array(e);window.crypto.getRandomValues(t);return t}}else if(window.msCrypto&&window.msCrypto.getRandomValues){n.prototype._rand=function h(e){var t=new Uint8Array(e);window.msCrypto.getRandomValues(t);return t}}else{n.prototype._rand=function(){throw new Error("Not implemented yet")}}}else{try{var a=e("cry"+"pto");n.prototype._rand=function d(e){return a.randomBytes(e)}}catch(f){n.prototype._rand=function u(e){var t=new Uint8Array(e);for(var r=0;r<t.length;r++)t[r]=this.rand.getByte();return t}}}},{}],19:[function(e,t,r){},{}],20:[function(e,t,r){(function(e){var t=Math.pow(2,32);function i(e){var r,i;r=e>t||e<0?(i=Math.abs(e)%t,e<0?t-i:i):e;return r}function n(e){for(var t=0;t<e.length;e++){e[t]=0}return false}function a(){this.SBOX=[];this.INV_SBOX=[];this.SUB_MIX=[[],[],[],[]];this.INV_SUB_MIX=[[],[],[],[]];this.init();this.RCON=[0,1,2,4,8,16,32,64,128,27,54]}a.prototype.init=function(){var e,t,r,i,n,a,f,s,o,c;e=function(){var e,r;r=[];for(t=e=0;e<256;t=++e){if(t<128){r.push(t<<1)}else{r.push(t<<1^283)}}return r}();n=0;o=0;for(t=c=0;c<256;t=++c){r=o^o<<1^o<<2^o<<3^o<<4;r=r>>>8^r&255^99;this.SBOX[n]=r;this.INV_SBOX[r]=n;a=e[n];f=e[a];s=e[f];i=e[r]*257^r*16843008;this.SUB_MIX[0][n]=i<<24|i>>>8;this.SUB_MIX[1][n]=i<<16|i>>>16;this.SUB_MIX[2][n]=i<<8|i>>>24;this.SUB_MIX[3][n]=i;i=s*16843009^f*65537^a*257^n*16843008;this.INV_SUB_MIX[0][r]=i<<24|i>>>8;this.INV_SUB_MIX[1][r]=i<<16|i>>>16;this.INV_SUB_MIX[2][r]=i<<8|i>>>24;this.INV_SUB_MIX[3][r]=i;if(n===0){n=o=1}else{n=a^e[e[e[s^a]]];o^=e[e[o]]}}return true};var f=new a;o.blockSize=4*4;o.prototype.blockSize=o.blockSize;o.keySize=256/8;o.prototype.keySize=o.keySize;function s(e){var t=e.length/4;var r=new Array(t);var i=-1;while(++i<t){r[i]=e.readUInt32BE(i*4)}return r}function o(e){this._key=s(e);this._doReset()}o.prototype._doReset=function(){var e,t,r,i,n,a;r=this._key;t=r.length;this._nRounds=t+6;n=(this._nRounds+1)*4;this._keySchedule=[];for(i=0;i<n;i++){this._keySchedule[i]=i<t?r[i]:(a=this._keySchedule[i-1],i%t===0?(a=a<<8|a>>>24,a=f.SBOX[a>>>24]<<24|f.SBOX[a>>>16&255]<<16|f.SBOX[a>>>8&255]<<8|f.SBOX[a&255],a^=f.RCON[i/t|0]<<24):t>6&&i%t===4?a=f.SBOX[a>>>24]<<24|f.SBOX[a>>>16&255]<<16|f.SBOX[a>>>8&255]<<8|f.SBOX[a&255]:void 0,this._keySchedule[i-t]^a)}this._invKeySchedule=[];for(e=0;e<n;e++){i=n-e;a=this._keySchedule[i-(e%4?0:4)];this._invKeySchedule[e]=e<4||i<=4?a:f.INV_SUB_MIX[0][f.SBOX[a>>>24]]^f.INV_SUB_MIX[1][f.SBOX[a>>>16&255]]^f.INV_SUB_MIX[2][f.SBOX[a>>>8&255]]^f.INV_SUB_MIX[3][f.SBOX[a&255]]}return true};o.prototype.encryptBlock=function(t){t=s(new e(t));var r=this._doCryptBlock(t,this._keySchedule,f.SUB_MIX,f.SBOX);var i=new e(16);i.writeUInt32BE(r[0],0);i.writeUInt32BE(r[1],4);i.writeUInt32BE(r[2],8);i.writeUInt32BE(r[3],12);return i};o.prototype.decryptBlock=function(t){t=s(new e(t));var r=[t[3],t[1]];t[1]=r[0];t[3]=r[1];var i=this._doCryptBlock(t,this._invKeySchedule,f.INV_SUB_MIX,f.INV_SBOX);var n=new e(16);n.writeUInt32BE(i[0],0);n.writeUInt32BE(i[3],4);n.writeUInt32BE(i[2],8);n.writeUInt32BE(i[1],12);return n};o.prototype.scrub=function(){n(this._keySchedule);n(this._invKeySchedule);n(this._key)};o.prototype._doCryptBlock=function(e,t,r,n){var a,f,s,o,c,h,d,u,l;f=e[0]^t[0];s=e[1]^t[1];o=e[2]^t[2];c=e[3]^t[3];a=4;for(var p=1;p<this._nRounds;p++){h=r[0][f>>>24]^r[1][s>>>16&255]^r[2][o>>>8&255]^r[3][c&255]^t[a++];d=r[0][s>>>24]^r[1][o>>>16&255]^r[2][c>>>8&255]^r[3][f&255]^t[a++];u=r[0][o>>>24]^r[1][c>>>16&255]^r[2][f>>>8&255]^r[3][s&255]^t[a++];l=r[0][c>>>24]^r[1][f>>>16&255]^r[2][s>>>8&255]^r[3][o&255]^t[a++];f=h;s=d;o=u;c=l}h=(n[f>>>24]<<24|n[s>>>16&255]<<16|n[o>>>8&255]<<8|n[c&255])^t[a++];d=(n[s>>>24]<<24|n[o>>>16&255]<<16|n[c>>>8&255]<<8|n[f&255])^t[a++];u=(n[o>>>24]<<24|n[c>>>16&255]<<16|n[f>>>8&255]<<8|n[s&255])^t[a++];l=(n[c>>>24]<<24|n[f>>>16&255]<<16|n[s>>>8&255]<<8|n[o&255])^t[a++];return[i(h),i(d),i(u),i(l)]};r.AES=o}).call(this,e("buffer").Buffer)},{buffer:46}],21:[function(e,t,r){(function(r){var i=e("./aes");var n=e("cipher-base");var a=e("inherits");var f=e("./ghash");var s=e("buffer-xor");a(o,n);t.exports=o;function o(e,t,a,s){if(!(this instanceof o)){return new o(e,t,a)}n.call(this);this._finID=r.concat([a,new r([0,0,0,1])]);a=r.concat([a,new r([0,0,0,2])]);this._cipher=new i.AES(t);this._prev=new r(a.length);this._cache=new r("");this._secCache=new r("");this._decrypt=s;this._alen=0;this._len=0;a.copy(this._prev);this._mode=e;var c=new r(4);c.fill(0);this._ghash=new f(this._cipher.encryptBlock(c));this._authTag=null;this._called=false}o.prototype._update=function(e){if(!this._called&&this._alen){var t=16-this._alen%16;if(t<16){t=new r(t);t.fill(0);this._ghash.update(t)}}this._called=true;var i=this._mode.encrypt(this,e);if(this._decrypt){this._ghash.update(e)}else{this._ghash.update(i)}this._len+=e.length;return i};o.prototype._final=function(){if(this._decrypt&&!this._authTag){throw new Error("Unsupported state or unable to authenticate data")}var e=s(this._ghash.final(this._alen*8,this._len*8),this._cipher.encryptBlock(this._finID));if(this._decrypt){if(c(e,this._authTag)){throw new Error("Unsupported state or unable to authenticate data")}}else{this._authTag=e}this._cipher.scrub()};o.prototype.getAuthTag=function h(){if(!this._decrypt&&r.isBuffer(this._authTag)){return this._authTag}else{throw new Error("Attempting to get auth tag in unsupported state")}};o.prototype.setAuthTag=function d(e){if(this._decrypt){this._authTag=e}else{throw new Error("Attempting to set auth tag in unsupported state")}};o.prototype.setAAD=function u(e){if(!this._called){this._ghash.update(e);this._alen+=e.length}else{throw new Error("Attempting to set AAD in unsupported state")}};function c(e,t){var r=0;if(e.length!==t.length){r++}var i=Math.min(e.length,t.length);var n=-1;while(++n<i){r+=e[n]^t[n]}return r}}).call(this,e("buffer").Buffer)},{"./aes":20,"./ghash":25,buffer:46,"buffer-xor":45,"cipher-base":47,inherits:92}],22:[function(e,t,r){var i=e("./encrypter");r.createCipher=r.Cipher=i.createCipher;r.createCipheriv=r.Cipheriv=i.createCipheriv;var n=e("./decrypter");r.createDecipher=r.Decipher=n.createDecipher;r.createDecipheriv=r.Decipheriv=n.createDecipheriv;var a=e("./modes");function f(){return Object.keys(a)}r.listCiphers=r.getCiphers=f},{"./decrypter":23,
|
|
"./encrypter":24,"./modes":26}],23:[function(e,t,r){(function(t){var i=e("./aes");var n=e("cipher-base");var a=e("inherits");var f=e("./modes");var s=e("./streamCipher");var o=e("./authCipher");var c=e("evp_bytestokey");a(h,n);function h(e,r,a){if(!(this instanceof h)){return new h(e,r,a)}n.call(this);this._cache=new d;this._last=void 0;this._cipher=new i.AES(r);this._prev=new t(a.length);a.copy(this._prev);this._mode=e;this._autopadding=true}h.prototype._update=function(e){this._cache.add(e);var r;var i;var n=[];while(r=this._cache.get(this._autopadding)){i=this._mode.decrypt(this,r);n.push(i)}return t.concat(n)};h.prototype._final=function(){var e=this._cache.flush();if(this._autopadding){return u(this._mode.decrypt(this,e))}else if(e){throw new Error("data not multiple of block length")}};h.prototype.setAutoPadding=function(e){this._autopadding=!!e};function d(){if(!(this instanceof d)){return new d}this.cache=new t("")}d.prototype.add=function(e){this.cache=t.concat([this.cache,e])};d.prototype.get=function(e){var t;if(e){if(this.cache.length>16){t=this.cache.slice(0,16);this.cache=this.cache.slice(16);return t}}else{if(this.cache.length>=16){t=this.cache.slice(0,16);this.cache=this.cache.slice(16);return t}}return null};d.prototype.flush=function(){if(this.cache.length){return this.cache}};function u(e){var t=e[15];var r=-1;while(++r<t){if(e[r+(16-t)]!==t){throw new Error("unable to decrypt data")}}if(t===16){return}return e.slice(0,16-t)}var l={ECB:e("./modes/ecb"),CBC:e("./modes/cbc"),CFB:e("./modes/cfb"),CFB8:e("./modes/cfb8"),CFB1:e("./modes/cfb1"),OFB:e("./modes/ofb"),CTR:e("./modes/ctr"),GCM:e("./modes/ctr")};function p(e,r,i){var n=f[e.toLowerCase()];if(!n){throw new TypeError("invalid suite type")}if(typeof i==="string"){i=new t(i)}if(typeof r==="string"){r=new t(r)}if(r.length!==n.key/8){throw new TypeError("invalid key length "+r.length)}if(i.length!==n.iv){throw new TypeError("invalid iv length "+i.length)}if(n.type==="stream"){return new s(l[n.mode],r,i,true)}else if(n.type==="auth"){return new o(l[n.mode],r,i,true)}return new h(l[n.mode],r,i)}function b(e,t){var r=f[e.toLowerCase()];if(!r){throw new TypeError("invalid suite type")}var i=c(t,false,r.key,r.iv);return p(e,i.key,i.iv)}r.createDecipher=b;r.createDecipheriv=p}).call(this,e("buffer").Buffer)},{"./aes":20,"./authCipher":21,"./modes":26,"./modes/cbc":27,"./modes/cfb":28,"./modes/cfb1":29,"./modes/cfb8":30,"./modes/ctr":31,"./modes/ecb":32,"./modes/ofb":33,"./streamCipher":34,buffer:46,"cipher-base":47,evp_bytestokey:83,inherits:92}],24:[function(e,t,r){(function(t){var i=e("./aes");var n=e("cipher-base");var a=e("inherits");var f=e("./modes");var s=e("evp_bytestokey");var o=e("./streamCipher");var c=e("./authCipher");a(h,n);function h(e,r,a){if(!(this instanceof h)){return new h(e,r,a)}n.call(this);this._cache=new d;this._cipher=new i.AES(r);this._prev=new t(a.length);a.copy(this._prev);this._mode=e;this._autopadding=true}h.prototype._update=function(e){this._cache.add(e);var r;var i;var n=[];while(r=this._cache.get()){i=this._mode.encrypt(this,r);n.push(i)}return t.concat(n)};h.prototype._final=function(){var e=this._cache.flush();if(this._autopadding){e=this._mode.encrypt(this,e);this._cipher.scrub();return e}else if(e.toString("hex")!=="10101010101010101010101010101010"){this._cipher.scrub();throw new Error("data not multiple of block length")}};h.prototype.setAutoPadding=function(e){this._autopadding=!!e};function d(){if(!(this instanceof d)){return new d}this.cache=new t("")}d.prototype.add=function(e){this.cache=t.concat([this.cache,e])};d.prototype.get=function(){if(this.cache.length>15){var e=this.cache.slice(0,16);this.cache=this.cache.slice(16);return e}return null};d.prototype.flush=function(){var e=16-this.cache.length;var r=new t(e);var i=-1;while(++i<e){r.writeUInt8(e,i)}var n=t.concat([this.cache,r]);return n};var u={ECB:e("./modes/ecb"),CBC:e("./modes/cbc"),CFB:e("./modes/cfb"),CFB8:e("./modes/cfb8"),CFB1:e("./modes/cfb1"),OFB:e("./modes/ofb"),CTR:e("./modes/ctr"),GCM:e("./modes/ctr")};function l(e,r,i){var n=f[e.toLowerCase()];if(!n){throw new TypeError("invalid suite type")}if(typeof i==="string"){i=new t(i)}if(typeof r==="string"){r=new t(r)}if(r.length!==n.key/8){throw new TypeError("invalid key length "+r.length)}if(i.length!==n.iv){throw new TypeError("invalid iv length "+i.length)}if(n.type==="stream"){return new o(u[n.mode],r,i)}else if(n.type==="auth"){return new c(u[n.mode],r,i)}return new h(u[n.mode],r,i)}function p(e,t){var r=f[e.toLowerCase()];if(!r){throw new TypeError("invalid suite type")}var i=s(t,false,r.key,r.iv);return l(e,i.key,i.iv)}r.createCipheriv=l;r.createCipher=p}).call(this,e("buffer").Buffer)},{"./aes":20,"./authCipher":21,"./modes":26,"./modes/cbc":27,"./modes/cfb":28,"./modes/cfb1":29,"./modes/cfb8":30,"./modes/ctr":31,"./modes/ecb":32,"./modes/ofb":33,"./streamCipher":34,buffer:46,"cipher-base":47,evp_bytestokey:83,inherits:92}],25:[function(e,t,r){(function(e){var r=new e(16);r.fill(0);t.exports=i;function i(t){this.h=t;this.state=new e(16);this.state.fill(0);this.cache=new e("")}i.prototype.ghash=function(e){var t=-1;while(++t<e.length){this.state[t]^=e[t]}this._multiply()};i.prototype._multiply=function(){var e=n(this.h);var t=[0,0,0,0];var r,i,f;var s=-1;while(++s<128){i=(this.state[~~(s/8)]&1<<7-s%8)!==0;if(i){t=o(t,e)}f=(e[3]&1)!==0;for(r=3;r>0;r--){e[r]=e[r]>>>1|(e[r-1]&1)<<31}e[0]=e[0]>>>1;if(f){e[0]=e[0]^225<<24}}this.state=a(t)};i.prototype.update=function(t){this.cache=e.concat([this.cache,t]);var r;while(this.cache.length>=16){r=this.cache.slice(0,16);this.cache=this.cache.slice(16);this.ghash(r)}};i.prototype.final=function(t,i){if(this.cache.length){this.ghash(e.concat([this.cache,r],16))}this.ghash(a([0,t,0,i]));return this.state};function n(e){return[e.readUInt32BE(0),e.readUInt32BE(4),e.readUInt32BE(8),e.readUInt32BE(12)]}function a(t){t=t.map(s);var r=new e(16);r.writeUInt32BE(t[0],0);r.writeUInt32BE(t[1],4);r.writeUInt32BE(t[2],8);r.writeUInt32BE(t[3],12);return r}var f=Math.pow(2,32);function s(e){var t,r;t=e>f||e<0?(r=Math.abs(e)%f,e<0?f-r:r):e;return t}function o(e,t){return[e[0]^t[0],e[1]^t[1],e[2]^t[2],e[3]^t[3]]}}).call(this,e("buffer").Buffer)},{buffer:46}],26:[function(e,t,r){r["aes-128-ecb"]={cipher:"AES",key:128,iv:0,mode:"ECB",type:"block"};r["aes-192-ecb"]={cipher:"AES",key:192,iv:0,mode:"ECB",type:"block"};r["aes-256-ecb"]={cipher:"AES",key:256,iv:0,mode:"ECB",type:"block"};r["aes-128-cbc"]={cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"};r["aes-192-cbc"]={cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"};r["aes-256-cbc"]={cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"};r["aes128"]=r["aes-128-cbc"];r["aes192"]=r["aes-192-cbc"];r["aes256"]=r["aes-256-cbc"];r["aes-128-cfb"]={cipher:"AES",key:128,iv:16,mode:"CFB",type:"stream"};r["aes-192-cfb"]={cipher:"AES",key:192,iv:16,mode:"CFB",type:"stream"};r["aes-256-cfb"]={cipher:"AES",key:256,iv:16,mode:"CFB",type:"stream"};r["aes-128-cfb8"]={cipher:"AES",key:128,iv:16,mode:"CFB8",type:"stream"};r["aes-192-cfb8"]={cipher:"AES",key:192,iv:16,mode:"CFB8",type:"stream"};r["aes-256-cfb8"]={cipher:"AES",key:256,iv:16,mode:"CFB8",type:"stream"};r["aes-128-cfb1"]={cipher:"AES",key:128,iv:16,mode:"CFB1",type:"stream"};r["aes-192-cfb1"]={cipher:"AES",key:192,iv:16,mode:"CFB1",type:"stream"};r["aes-256-cfb1"]={cipher:"AES",key:256,iv:16,mode:"CFB1",type:"stream"};r["aes-128-ofb"]={cipher:"AES",key:128,iv:16,mode:"OFB",type:"stream"};r["aes-192-ofb"]={cipher:"AES",key:192,iv:16,mode:"OFB",type:"stream"};r["aes-256-ofb"]={cipher:"AES",key:256,iv:16,mode:"OFB",type:"stream"};r["aes-128-ctr"]={cipher:"AES",key:128,iv:16,mode:"CTR",type:"stream"};r["aes-192-ctr"]={cipher:"AES",key:192,iv:16,mode:"CTR",type:"stream"};r["aes-256-ctr"]={cipher:"AES",key:256,iv:16,mode:"CTR",type:"stream"};r["aes-128-gcm"]={cipher:"AES",key:128,iv:12,mode:"GCM",type:"auth"};r["aes-192-gcm"]={cipher:"AES",key:192,iv:12,mode:"GCM",type:"auth"};r["aes-256-gcm"]={cipher:"AES",key:256,iv:12,mode:"GCM",type:"auth"}},{}],27:[function(e,t,r){var i=e("buffer-xor");r.encrypt=function(e,t){var r=i(t,e._prev);e._prev=e._cipher.encryptBlock(r);return e._prev};r.decrypt=function(e,t){var r=e._prev;e._prev=t;var n=e._cipher.decryptBlock(t);return i(n,r)}},{"buffer-xor":45}],28:[function(e,t,r){(function(t){var i=e("buffer-xor");r.encrypt=function(e,r,i){var a=new t("");var f;while(r.length){if(e._cache.length===0){e._cache=e._cipher.encryptBlock(e._prev);e._prev=new t("")}if(e._cache.length<=r.length){f=e._cache.length;a=t.concat([a,n(e,r.slice(0,f),i)]);r=r.slice(f)}else{a=t.concat([a,n(e,r,i)]);break}}return a};function n(e,r,n){var a=r.length;var f=i(r,e._cache);e._cache=e._cache.slice(a);e._prev=t.concat([e._prev,n?r:f]);return f}}).call(this,e("buffer").Buffer)},{buffer:46,"buffer-xor":45}],29:[function(e,t,r){(function(e){function t(e,t,r){var n;var a=-1;var f=8;var s=0;var o,c;while(++a<f){n=e._cipher.encryptBlock(e._prev);o=t&1<<7-a?128:0;c=n[0]^o;s+=(c&128)>>a%8;e._prev=i(e._prev,r?o:c)}return s}r.encrypt=function(r,i,n){var a=i.length;var f=new e(a);var s=-1;while(++s<a){f[s]=t(r,i[s],n)}return f};function i(t,r){var i=t.length;var n=-1;var a=new e(t.length);t=e.concat([t,new e([r])]);while(++n<i){a[n]=t[n]<<1|t[n+1]>>7}return a}}).call(this,e("buffer").Buffer)},{buffer:46}],30:[function(e,t,r){(function(e){function t(t,r,i){var n=t._cipher.encryptBlock(t._prev);var a=n[0]^r;t._prev=e.concat([t._prev.slice(1),new e([i?r:a])]);return a}r.encrypt=function(r,i,n){var a=i.length;var f=new e(a);var s=-1;while(++s<a){f[s]=t(r,i[s],n)}return f}}).call(this,e("buffer").Buffer)},{buffer:46}],31:[function(e,t,r){(function(t){var i=e("buffer-xor");function n(e){var t=e.length;var r;while(t--){r=e.readUInt8(t);if(r===255){e.writeUInt8(0,t)}else{r++;e.writeUInt8(r,t);break}}}function a(e){var t=e._cipher.encryptBlock(e._prev);n(e._prev);return t}r.encrypt=function(e,r){while(e._cache.length<r.length){e._cache=t.concat([e._cache,a(e)])}var n=e._cache.slice(0,r.length);e._cache=e._cache.slice(r.length);return i(r,n)}}).call(this,e("buffer").Buffer)},{buffer:46,"buffer-xor":45}],32:[function(e,t,r){r.encrypt=function(e,t){return e._cipher.encryptBlock(t)};r.decrypt=function(e,t){return e._cipher.decryptBlock(t)}},{}],33:[function(e,t,r){(function(t){var i=e("buffer-xor");function n(e){e._prev=e._cipher.encryptBlock(e._prev);return e._prev}r.encrypt=function(e,r){while(e._cache.length<r.length){e._cache=t.concat([e._cache,n(e)])}var a=e._cache.slice(0,r.length);e._cache=e._cache.slice(r.length);return i(r,a)}}).call(this,e("buffer").Buffer)},{buffer:46,"buffer-xor":45}],34:[function(e,t,r){(function(r){var i=e("./aes");var n=e("cipher-base");var a=e("inherits");a(f,n);t.exports=f;function f(e,t,a,s){if(!(this instanceof f)){return new f(e,t,a)}n.call(this);this._cipher=new i.AES(t);this._prev=new r(a.length);this._cache=new r("");this._secCache=new r("");this._decrypt=s;a.copy(this._prev);this._mode=e}f.prototype._update=function(e){return this._mode.encrypt(this,e,this._decrypt)};f.prototype._final=function(){this._cipher.scrub()}}).call(this,e("buffer").Buffer)},{"./aes":20,buffer:46,"cipher-base":47,inherits:92}],35:[function(e,t,r){var i=e("evp_bytestokey");var n=e("browserify-aes/browser");var a=e("browserify-des");var f=e("browserify-des/modes");var s=e("browserify-aes/modes");function o(e,t){var r,n;e=e.toLowerCase();if(s[e]){r=s[e].key;n=s[e].iv}else if(f[e]){r=f[e].key*8;n=f[e].iv}else{throw new TypeError("invalid suite type")}var a=i(t,false,r,n);return h(e,a.key,a.iv)}function c(e,t){var r,n;e=e.toLowerCase();if(s[e]){r=s[e].key;n=s[e].iv}else if(f[e]){r=f[e].key*8;n=f[e].iv}else{throw new TypeError("invalid suite type")}var a=i(t,false,r,n);return d(e,a.key,a.iv)}function h(e,t,r){e=e.toLowerCase();if(s[e]){return n.createCipheriv(e,t,r)}else if(f[e]){return new a({key:t,iv:r,mode:e})}else{throw new TypeError("invalid suite type")}}function d(e,t,r){e=e.toLowerCase();if(s[e]){return n.createDecipheriv(e,t,r)}else if(f[e]){return new a({key:t,iv:r,mode:e,decrypt:true})}else{throw new TypeError("invalid suite type")}}r.createCipher=r.Cipher=o;r.createCipheriv=r.Cipheriv=h;r.createDecipher=r.Decipher=c;r.createDecipheriv=r.Decipheriv=d;function u(){return Object.keys(f).concat(n.getCiphers())}r.listCiphers=r.getCiphers=u},{"browserify-aes/browser":22,"browserify-aes/modes":26,"browserify-des":36,"browserify-des/modes":37,evp_bytestokey:83}],36:[function(e,t,r){(function(r){var i=e("cipher-base");var n=e("des.js");var a=e("inherits");var f={"des-ede3-cbc":n.CBC.instantiate(n.EDE),"des-ede3":n.EDE,"des-ede-cbc":n.CBC.instantiate(n.EDE),"des-ede":n.EDE,"des-cbc":n.CBC.instantiate(n.DES),"des-ecb":n.DES};f.des=f["des-cbc"];f.des3=f["des-ede3-cbc"];t.exports=s;a(s,i);function s(e){i.call(this);var t=e.mode.toLowerCase();var n=f[t];var a;if(e.decrypt){a="decrypt"}else{a="encrypt"}var s=e.key;if(t==="des-ede"||t==="des-ede-cbc"){s=r.concat([s,s.slice(0,8)])}var o=e.iv;this._des=n.create({key:s,iv:o,type:a})}s.prototype._update=function(e){return new r(this._des.update(e))};s.prototype._final=function(){return new r(this._des.final())}}).call(this,e("buffer").Buffer)},{buffer:46,"cipher-base":47,"des.js":55,inherits:92}],37:[function(e,t,r){r["des-ecb"]={key:8,iv:0};r["des-cbc"]=r.des={key:8,iv:8};r["des-ede3-cbc"]=r.des3={key:24,iv:8};r["des-ede3"]={key:24,iv:0};r["des-ede-cbc"]={key:16,iv:8};r["des-ede"]={key:16,iv:0}},{}],38:[function(e,t,r){(function(r){var i=e("bn.js");var n=e("randombytes");t.exports=f;function a(e){var t=s(e);var r=t.toRed(i.mont(e.modulus)).redPow(new i(e.publicExponent)).fromRed();return{blinder:r,unblinder:t.invm(e.modulus)}}function f(e,t){var n=a(t);var f=t.modulus.byteLength();var s=i.mont(t.modulus);var o=new i(e).mul(n.blinder).umod(t.modulus);var c=o.toRed(i.mont(t.prime1));var h=o.toRed(i.mont(t.prime2));var d=t.coefficient;var u=t.prime1;var l=t.prime2;var p=c.redPow(t.exponent1);var b=h.redPow(t.exponent2);p=p.fromRed();b=b.fromRed();var v=p.isub(b).imul(d).umod(u);v.imul(l);b.iadd(v);return new r(b.imul(n.unblinder).umod(t.modulus).toArray(false,f))}f.getr=s;function s(e){var t=e.modulus.byteLength();var r=new i(n(t));while(r.cmp(e.modulus)>=0||!r.umod(e.prime1)||!r.umod(e.prime2)){r=new i(n(t))}return r}}).call(this,e("buffer").Buffer)},{"bn.js":17,buffer:46,randombytes:115}],39:[function(e,t,r){(function(e){"use strict";r["RSA-SHA224"]=r.sha224WithRSAEncryption={sign:"rsa",hash:"sha224",id:new e("302d300d06096086480165030402040500041c","hex")};r["RSA-SHA256"]=r.sha256WithRSAEncryption={sign:"rsa",hash:"sha256",id:new e("3031300d060960864801650304020105000420","hex")};r["RSA-SHA384"]=r.sha384WithRSAEncryption={sign:"rsa",hash:"sha384",id:new e("3041300d060960864801650304020205000430","hex")};r["RSA-SHA512"]=r.sha512WithRSAEncryption={sign:"rsa",hash:"sha512",id:new e("3051300d060960864801650304020305000440","hex")};r["RSA-SHA1"]={sign:"rsa",hash:"sha1",id:new e("3021300906052b0e03021a05000414","hex")};r["ecdsa-with-SHA1"]={sign:"ecdsa",hash:"sha1",id:new e("","hex")};r.DSA=r["DSA-SHA1"]=r["DSA-SHA"]={sign:"dsa",hash:"sha1",id:new e("","hex")};r["DSA-SHA224"]=r["DSA-WITH-SHA224"]={sign:"dsa",hash:"sha224",id:new e("","hex")};r["DSA-SHA256"]=r["DSA-WITH-SHA256"]={sign:"dsa",hash:"sha256",id:new e("","hex")};r["DSA-SHA384"]=r["DSA-WITH-SHA384"]={sign:"dsa",hash:"sha384",id:new e("","hex")};r["DSA-SHA512"]=r["DSA-WITH-SHA512"]={sign:"dsa",hash:"sha512",id:new e("","hex")};r["DSA-RIPEMD160"]={sign:"dsa",hash:"rmd160",id:new e("","hex")};r["RSA-RIPEMD160"]=r.ripemd160WithRSA={sign:"rsa",hash:"rmd160",id:new e("3021300906052b2403020105000414","hex")};r["RSA-MD5"]=r.md5WithRSAEncryption={sign:"rsa",hash:"md5",id:new e("3020300c06082a864886f70d020505000410","hex")}}).call(this,e("buffer").Buffer)},{buffer:46}],40:[function(e,t,r){(function(r){var i=e("./algos");var n=e("create-hash");var a=e("inherits");var f=e("./sign");var s=e("stream");var o=e("./verify");var c={};Object.keys(i).forEach(function(e){c[e]=c[e.toLowerCase()]=i[e]});function h(e){s.Writable.call(this);var t=c[e];if(!t){throw new Error("Unknown message digest")}this._hashType=t.hash;this._hash=n(t.hash);this._tag=t.id;this._signType=t.sign}a(h,s.Writable);h.prototype._write=function p(e,t,r){this._hash.update(e);r()};h.prototype.update=function b(e,t){if(typeof e==="string"){e=new r(e,t)}this._hash.update(e);return this};h.prototype.sign=function v(e,t){this.end();var i=this._hash.digest();var n=f(r.concat([this._tag,i]),e,this._hashType,this._signType);return t?n.toString(t):n};function d(e){s.Writable.call(this);var t=c[e];if(!t){throw new Error("Unknown message digest")}this._hash=n(t.hash);this._tag=t.id;this._signType=t.sign}a(d,s.Writable);d.prototype._write=function y(e,t,r){this._hash.update(e);r()};d.prototype.update=function g(e,t){if(typeof e==="string"){e=new r(e,t)}this._hash.update(e);return this};d.prototype.verify=function m(e,t,i){if(typeof t==="string"){t=new r(t,i)}this.end();var n=this._hash.digest();return o(t,r.concat([this._tag,n]),e,this._signType)};function u(e){return new h(e)}function l(e){return new d(e)}t.exports={Sign:u,Verify:l,createSign:u,createVerify:l}}).call(this,e("buffer").Buffer)},{"./algos":39,"./sign":42,"./verify":43,buffer:46,"create-hash":50,inherits:92,stream:135}],41:[function(e,t,r){"use strict";r["1.3.132.0.10"]="secp256k1";r["1.3.132.0.33"]="p224";r["1.2.840.10045.3.1.1"]="p192";r["1.2.840.10045.3.1.7"]="p256";r["1.3.132.0.34"]="p384";r["1.3.132.0.35"]="p521"},{}],42:[function(e,t,r){(function(r){var i=e("create-hmac");var n=e("browserify-rsa");var a=e("./curves");var f=e("elliptic");var s=e("parse-asn1");var o=e("bn.js");var c=f.ec;function h(e,t,r,i){var a=s(t);if(a.curve){if(i!=="ecdsa")throw new Error("wrong private key type");return d(e,a)}else if(a.type==="dsa"){if(i!=="dsa"){throw new Error("wrong private key type")}return u(e,a,r)}else{if(i!=="rsa")throw new Error("wrong private key type")}var f=a.modulus.byteLength();var o=[0,1];while(e.length+o.length+1<f){o.push(255)}o.push(0);var c=-1;while(++c<e.length){o.push(e[c])}var h=n(o,a);return h}function d(e,t){var i=a[t.curve.join(".")];if(!i)throw new Error("unknown curve "+t.curve.join("."));var n=new c(i);var f=n.genKeyPair();f._importPrivate(t.privateKey);var s=f.sign(e);return new r(s.toDER())}function u(e,t,r){var i=t.params.priv_key;var n=t.params.p;var a=t.params.q;var f=t.params.g;var s=new o(0);var c;var h=b(e,a).mod(a);var d=false;var u=p(i,a,e,r);while(d===false){c=y(a,u,r);s=g(f,c,n,a);d=c.invm(a).imul(h.add(i.mul(s))).mod(a);if(!d.cmpn(0)){d=false;s=new o(0)}}return l(s,d)}function l(e,t){e=e.toArray();t=t.toArray();if(e[0]&128){e=[0].concat(e)}if(t[0]&128){t=[0].concat(t)}var i=e.length+t.length+4;var n=[48,i,2,e.length];n=n.concat(e,[2,t.length],t);return new r(n)}function p(e,t,n,a){e=new r(e.toArray());if(e.length<t.byteLength()){var f=new r(t.byteLength()-e.length);f.fill(0);e=r.concat([f,e])}var s=n.length;var o=v(n,t);var c=new r(s);c.fill(1);var h=new r(s);h.fill(0);h=i(a,h).update(c).update(new r([0])).update(e).update(o).digest();c=i(a,h).update(c).digest();h=i(a,h).update(c).update(new r([1])).update(e).update(o).digest();c=i(a,h).update(c).digest();return{k:h,v:c}}function b(e,t){var r=new o(e);var i=(e.length<<3)-t.bitLength();if(i>0){r.ishrn(i)}return r}function v(e,t){e=b(e,t);e=e.mod(t);var i=new r(e.toArray());if(i.length<t.byteLength()){var n=new r(t.byteLength()-i.length);n.fill(0);i=r.concat([n,i])}return i}function y(e,t,n){var a,f;do{a=new r("");while(a.length*8<e.bitLength()){t.v=i(n,t.k).update(t.v).digest();a=r.concat([a,t.v])}f=b(a,e);t.k=i(n,t.k).update(t.v).update(new r([0])).digest();t.v=i(n,t.k).update(t.v).digest()}while(f.cmp(e)!==-1);return f}function g(e,t,r,i){return e.toRed(o.mont(r)).redPow(t).fromRed().mod(i)}t.exports=h;t.exports.getKey=p;t.exports.makeKey=y}).call(this,e("buffer").Buffer)},{"./curves":41,"bn.js":17,"browserify-rsa":38,buffer:46,"create-hmac":53,elliptic:65,"parse-asn1":105}],43:[function(e,t,r){(function(r){var i=e("./curves");var n=e("elliptic");var a=e("parse-asn1");var f=e("bn.js");var s=n.ec;function o(e,t,i,n){var s=a(i);if(s.type==="ec"){if(n!=="ecdsa"){throw new Error("wrong public key type")}return c(e,t,s)}else if(s.type==="dsa"){if(n!=="dsa"){throw new Error("wrong public key type")}return h(e,t,s)}else{if(n!=="rsa"){throw new Error("wrong public key type")}}var o=s.modulus.byteLength();var d=[1];var u=0;while(t.length+d.length+2<o){d.push(255);u++}d.push(0);var l=-1;while(++l<t.length){d.push(t[l])}d=new r(d);var p=f.mont(s.modulus);e=new f(e).toRed(p);e=e.redPow(new f(s.publicExponent));e=new r(e.fromRed().toArray());var b=0;if(u<8){b=1}o=Math.min(e.length,d.length);if(e.length!==d.length){b=1}l=-1;while(++l<o){b|=e[l]^d[l]}return b===0}function c(e,t,r){var n=i[r.data.algorithm.curve.join(".")];if(!n)throw new Error("unknown curve "+r.data.algorithm.curve.join("."));var a=new s(n);var f=r.data.subjectPrivateKey.data;return a.verify(t,e,f)}function h(e,t,r){var i=r.data.p;var n=r.data.q;var s=r.data.g;var o=r.data.pub_key;var c=a.signature.decode(e,"der");var h=c.s;var u=c.r;d(h,n);d(u,n);var l=f.mont(i);var p=h.invm(n);var b=s.toRed(l).redPow(new f(t).mul(p).mod(n)).fromRed().mul(o.toRed(l).redPow(u.mul(p).mod(n)).fromRed()).mod(i).mod(n);return!b.cmp(u)}function d(e,t){if(e.cmpn(0)<=0){throw new Error("invalid sig")}if(e.cmp(t)>=t){throw new Error("invalid sig")}}t.exports=o}).call(this,e("buffer").Buffer)},{"./curves":41,"bn.js":17,buffer:46,elliptic:65,"parse-asn1":105}],44:[function(e,t,r){var i=e("base-x");var n="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";var a=i(n);t.exports={encode:a.encode,decode:a.decode}},{"base-x":15}],45:[function(e,t,r){(function(e){t.exports=function r(t,i){var n=Math.min(t.length,i.length);var a=new e(n);for(var f=0;f<n;++f){a[f]=t[f]^i[f]}return a}}).call(this,e("buffer").Buffer)},{buffer:46}],46:[function(e,t,r){(function(t){var i=e("base64-js");var n=e("ieee754");var a=e("is-array");r.Buffer=c;r.SlowBuffer=_;r.INSPECT_MAX_BYTES=50;c.poolSize=8192;var f={};c.TYPED_ARRAY_SUPPORT=t.TYPED_ARRAY_SUPPORT!==undefined?t.TYPED_ARRAY_SUPPORT:s();function s(){function e(){}try{var t=new Uint8Array(1);t.foo=function(){return 42};t.constructor=e;return t.foo()===42&&t.constructor===e&&typeof t.subarray==="function"&&t.subarray(1,1).byteLength===0}catch(r){return false}}function o(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function c(e){if(!(this instanceof c)){if(arguments.length>1)return new c(e,arguments[1]);return new c(e)}this.length=0;this.parent=undefined;if(typeof e==="number"){return h(this,e)}if(typeof e==="string"){return d(this,e,arguments.length>1?arguments[1]:"utf8")}return u(this,e)}function h(e,t){e=m(e,t<0?0:w(t)|0);if(!c.TYPED_ARRAY_SUPPORT){for(var r=0;r<t;r++){e[r]=0}}return e}function d(e,t,r){if(typeof r!=="string"||r==="")r="utf8";var i=S(t,r)|0;e=m(e,i);e.write(t,r);return e}function u(e,t){if(c.isBuffer(t))return l(e,t);if(a(t))return p(e,t);if(t==null){throw new TypeError("must start with number, buffer, array or string")}if(typeof ArrayBuffer!=="undefined"){if(t.buffer instanceof ArrayBuffer){return b(e,t)}if(t instanceof ArrayBuffer){return v(e,t)}}if(t.length)return y(e,t);return g(e,t)}function l(e,t){var r=w(t.length)|0;e=m(e,r);t.copy(e,0,0,r);return e}function p(e,t){var r=w(t.length)|0;e=m(e,r);for(var i=0;i<r;i+=1){e[i]=t[i]&255}return e}function b(e,t){var r=w(t.length)|0;e=m(e,r);for(var i=0;i<r;i+=1){e[i]=t[i]&255}return e}function v(e,t){if(c.TYPED_ARRAY_SUPPORT){t.byteLength;e=c._augment(new Uint8Array(t))}else{e=b(e,new Uint8Array(t))}return e}function y(e,t){var r=w(t.length)|0;e=m(e,r);for(var i=0;i<r;i+=1){e[i]=t[i]&255}return e}function g(e,t){var r;var i=0;if(t.type==="Buffer"&&a(t.data)){r=t.data;i=w(r.length)|0}e=m(e,i);for(var n=0;n<i;n+=1){e[n]=r[n]&255}return e}if(c.TYPED_ARRAY_SUPPORT){c.prototype.__proto__=Uint8Array.prototype;c.__proto__=Uint8Array}function m(e,t){if(c.TYPED_ARRAY_SUPPORT){e=c._augment(new Uint8Array(t));e.__proto__=c.prototype}else{e.length=t;e._isBuffer=true}var r=t!==0&&t<=c.poolSize>>>1;if(r)e.parent=f;return e}function w(e){if(e>=o()){throw new RangeError("Attempt to allocate Buffer larger than maximum "+"size: 0x"+o().toString(16)+" bytes")}return e|0}function _(e,t){if(!(this instanceof _))return new _(e,t);var r=new c(e,t);delete r.parent;return r}c.isBuffer=function te(e){return!!(e!=null&&e._isBuffer)};c.compare=function re(e,t){if(!c.isBuffer(e)||!c.isBuffer(t)){throw new TypeError("Arguments must be Buffers")}if(e===t)return 0;var r=e.length;var i=t.length;var n=0;var a=Math.min(r,i);while(n<a){if(e[n]!==t[n])break;++n}if(n!==a){r=e[n];i=t[n]}if(r<i)return-1;if(i<r)return 1;return 0};c.isEncoding=function ie(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return true;default:return false}};c.concat=function ne(e,t){if(!a(e))throw new TypeError("list argument must be an Array of Buffers.");if(e.length===0){return new c(0)}var r;if(t===undefined){t=0;for(r=0;r<e.length;r++){t+=e[r].length}}var i=new c(t);var n=0;for(r=0;r<e.length;r++){var f=e[r];f.copy(i,n);n+=f.length}return i};function S(e,t){if(typeof e!=="string")e=""+e;var r=e.length;if(r===0)return 0;var i=false;for(;;){switch(t){case"ascii":case"binary":case"raw":case"raws":return r;case"utf8":case"utf-8":return J(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return $(e).length;default:if(i)return J(e).length;t=(""+t).toLowerCase();i=true}}}c.byteLength=S;c.prototype.length=undefined;c.prototype.parent=undefined;function E(e,t,r){var i=false;t=t|0;r=r===undefined||r===Infinity?this.length:r|0;if(!e)e="utf8";if(t<0)t=0;if(r>this.length)r=this.length;if(r<=t)return"";while(true){switch(e){case"hex":return j(this,t,r);case"utf8":case"utf-8":return C(this,t,r);case"ascii":return D(this,t,r);case"binary":return L(this,t,r);case"base64":return T(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return q(this,t,r);default:if(i)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase();i=true}}}c.prototype.toString=function ae(){var e=this.length|0;if(e===0)return"";if(arguments.length===0)return C(this,0,e);return E.apply(this,arguments)};c.prototype.equals=function fe(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(this===e)return true;return c.compare(this,e)===0};c.prototype.inspect=function se(){var e="";var t=r.INSPECT_MAX_BYTES;if(this.length>0){e=this.toString("hex",0,t).match(/.{2}/g).join(" ");if(this.length>t)e+=" ... "}return"<Buffer "+e+">"};c.prototype.compare=function oe(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(this===e)return 0;return c.compare(this,e)};c.prototype.indexOf=function ce(e,t){if(t>2147483647)t=2147483647;else if(t<-2147483648)t=-2147483648;t>>=0;if(this.length===0)return-1;if(t>=this.length)return-1;if(t<0)t=Math.max(this.length+t,0);if(typeof e==="string"){if(e.length===0)return-1;return String.prototype.indexOf.call(this,e,t)}if(c.isBuffer(e)){return r(this,e,t)}if(typeof e==="number"){if(c.TYPED_ARRAY_SUPPORT&&Uint8Array.prototype.indexOf==="function"){return Uint8Array.prototype.indexOf.call(this,e,t)}return r(this,[e],t)}function r(e,t,r){var i=-1;for(var n=0;r+n<e.length;n++){if(e[r+n]===t[i===-1?0:n-i]){if(i===-1)i=n;if(n-i+1===t.length)return r+i}else{i=-1}}return-1}throw new TypeError("val must be string, number or Buffer")};c.prototype.get=function he(e){console.log(".get() is deprecated. Access using array indexes instead.");return this.readUInt8(e)};c.prototype.set=function de(e,t){console.log(".set() is deprecated. Access using array indexes instead.");return this.writeUInt8(e,t)};function B(e,t,r,i){r=Number(r)||0;var n=e.length-r;if(!i){i=n}else{i=Number(i);if(i>n){i=n}}var a=t.length;if(a%2!==0)throw new Error("Invalid hex string");if(i>a/2){i=a/2}for(var f=0;f<i;f++){var s=parseInt(t.substr(f*2,2),16);if(isNaN(s))throw new Error("Invalid hex string");e[r+f]=s}return f}function A(e,t,r,i){return ee(J(t,e.length-r),e,r,i)}function I(e,t,r,i){return ee(Z(t),e,r,i)}function k(e,t,r,i){return I(e,t,r,i)}function x(e,t,r,i){return ee($(t),e,r,i)}function R(e,t,r,i){return ee(Q(t,e.length-r),e,r,i)}c.prototype.write=function ue(e,t,r,i){if(t===undefined){i="utf8";r=this.length;t=0}else if(r===undefined&&typeof t==="string"){i=t;r=this.length;t=0}else if(isFinite(t)){t=t|0;if(isFinite(r)){r=r|0;if(i===undefined)i="utf8"}else{i=r;r=undefined}}else{var n=i;i=t;t=r|0;r=n}var a=this.length-t;if(r===undefined||r>a)r=a;if(e.length>0&&(r<0||t<0)||t>this.length){throw new RangeError("attempt to write outside buffer bounds")}if(!i)i="utf8";var f=false;for(;;){switch(i){case"hex":return B(this,e,t,r);case"utf8":case"utf-8":return A(this,e,t,r);case"ascii":return I(this,e,t,r);case"binary":return k(this,e,t,r);case"base64":return x(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,e,t,r);default:if(f)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase();f=true}}};c.prototype.toJSON=function le(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function T(e,t,r){if(t===0&&r===e.length){return i.fromByteArray(e)}else{return i.fromByteArray(e.slice(t,r))}}function C(e,t,r){r=Math.min(e.length,r);var i=[];var n=t;while(n<r){var a=e[n];var f=null;var s=a>239?4:a>223?3:a>191?2:1;if(n+s<=r){var o,c,h,d;switch(s){case 1:if(a<128){f=a}break;case 2:o=e[n+1];if((o&192)===128){d=(a&31)<<6|o&63;if(d>127){f=d}}break;case 3:o=e[n+1];c=e[n+2];if((o&192)===128&&(c&192)===128){d=(a&15)<<12|(o&63)<<6|c&63;if(d>2047&&(d<55296||d>57343)){f=d}}break;case 4:o=e[n+1];c=e[n+2];h=e[n+3];if((o&192)===128&&(c&192)===128&&(h&192)===128){d=(a&15)<<18|(o&63)<<12|(c&63)<<6|h&63;if(d>65535&&d<1114112){f=d}}}}if(f===null){f=65533;s=1}else if(f>65535){f-=65536;i.push(f>>>10&1023|55296);f=56320|f&1023}i.push(f);n+=s}return P(i)}var M=4096;function P(e){var t=e.length;if(t<=M){return String.fromCharCode.apply(String,e)}var r="";var i=0;while(i<t){r+=String.fromCharCode.apply(String,e.slice(i,i+=M))}return r}function D(e,t,r){var i="";r=Math.min(e.length,r);for(var n=t;n<r;n++){i+=String.fromCharCode(e[n]&127)}return i}function L(e,t,r){var i="";r=Math.min(e.length,r);for(var n=t;n<r;n++){i+=String.fromCharCode(e[n])}return i}function j(e,t,r){var i=e.length;if(!t||t<0)t=0;if(!r||r<0||r>i)r=i;var n="";for(var a=t;a<r;a++){n+=G(e[a])}return n}function q(e,t,r){var i=e.slice(t,r);var n="";for(var a=0;a<i.length;a+=2){n+=String.fromCharCode(i[a]+i[a+1]*256)}return n}c.prototype.slice=function pe(e,t){var r=this.length;e=~~e;t=t===undefined?r:~~t;if(e<0){e+=r;if(e<0)e=0}else if(e>r){e=r}if(t<0){t+=r;if(t<0)t=0}else if(t>r){t=r}if(t<e)t=e;var i;if(c.TYPED_ARRAY_SUPPORT){i=c._augment(this.subarray(e,t))}else{var n=t-e;i=new c(n,undefined);for(var a=0;a<n;a++){i[a]=this[a+e]}}if(i.length)i.parent=this.parent||this;return i};function N(e,t,r){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}c.prototype.readUIntLE=function be(e,t,r){e=e|0;t=t|0;if(!r)N(e,t,this.length);var i=this[e];var n=1;var a=0;while(++a<t&&(n*=256)){i+=this[e+a]*n}return i};c.prototype.readUIntBE=function ve(e,t,r){e=e|0;t=t|0;if(!r){N(e,t,this.length)}var i=this[e+--t];var n=1;while(t>0&&(n*=256)){i+=this[e+--t]*n}return i};c.prototype.readUInt8=function ye(e,t){if(!t)N(e,1,this.length);return this[e]};c.prototype.readUInt16LE=function ge(e,t){if(!t)N(e,2,this.length);return this[e]|this[e+1]<<8};c.prototype.readUInt16BE=function me(e,t){if(!t)N(e,2,this.length);return this[e]<<8|this[e+1]};c.prototype.readUInt32LE=function we(e,t){if(!t)N(e,4,this.length);return(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};c.prototype.readUInt32BE=function _e(e,t){if(!t)N(e,4,this.length);return this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3]);
|
|
};c.prototype.readIntLE=function Se(e,t,r){e=e|0;t=t|0;if(!r)N(e,t,this.length);var i=this[e];var n=1;var a=0;while(++a<t&&(n*=256)){i+=this[e+a]*n}n*=128;if(i>=n)i-=Math.pow(2,8*t);return i};c.prototype.readIntBE=function Ee(e,t,r){e=e|0;t=t|0;if(!r)N(e,t,this.length);var i=t;var n=1;var a=this[e+--i];while(i>0&&(n*=256)){a+=this[e+--i]*n}n*=128;if(a>=n)a-=Math.pow(2,8*t);return a};c.prototype.readInt8=function Be(e,t){if(!t)N(e,1,this.length);if(!(this[e]&128))return this[e];return(255-this[e]+1)*-1};c.prototype.readInt16LE=function Ae(e,t){if(!t)N(e,2,this.length);var r=this[e]|this[e+1]<<8;return r&32768?r|4294901760:r};c.prototype.readInt16BE=function Ie(e,t){if(!t)N(e,2,this.length);var r=this[e+1]|this[e]<<8;return r&32768?r|4294901760:r};c.prototype.readInt32LE=function ke(e,t){if(!t)N(e,4,this.length);return this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};c.prototype.readInt32BE=function xe(e,t){if(!t)N(e,4,this.length);return this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};c.prototype.readFloatLE=function Re(e,t){if(!t)N(e,4,this.length);return n.read(this,e,true,23,4)};c.prototype.readFloatBE=function Te(e,t){if(!t)N(e,4,this.length);return n.read(this,e,false,23,4)};c.prototype.readDoubleLE=function Ce(e,t){if(!t)N(e,8,this.length);return n.read(this,e,true,52,8)};c.prototype.readDoubleBE=function Me(e,t){if(!t)N(e,8,this.length);return n.read(this,e,false,52,8)};function O(e,t,r,i,n,a){if(!c.isBuffer(e))throw new TypeError("buffer must be a Buffer instance");if(t>n||t<a)throw new RangeError("value is out of bounds");if(r+i>e.length)throw new RangeError("index out of range")}c.prototype.writeUIntLE=function Pe(e,t,r,i){e=+e;t=t|0;r=r|0;if(!i)O(this,e,t,r,Math.pow(2,8*r),0);var n=1;var a=0;this[t]=e&255;while(++a<r&&(n*=256)){this[t+a]=e/n&255}return t+r};c.prototype.writeUIntBE=function De(e,t,r,i){e=+e;t=t|0;r=r|0;if(!i)O(this,e,t,r,Math.pow(2,8*r),0);var n=r-1;var a=1;this[t+n]=e&255;while(--n>=0&&(a*=256)){this[t+n]=e/a&255}return t+r};c.prototype.writeUInt8=function Le(e,t,r){e=+e;t=t|0;if(!r)O(this,e,t,1,255,0);if(!c.TYPED_ARRAY_SUPPORT)e=Math.floor(e);this[t]=e&255;return t+1};function U(e,t,r,i){if(t<0)t=65535+t+1;for(var n=0,a=Math.min(e.length-r,2);n<a;n++){e[r+n]=(t&255<<8*(i?n:1-n))>>>(i?n:1-n)*8}}c.prototype.writeUInt16LE=function je(e,t,r){e=+e;t=t|0;if(!r)O(this,e,t,2,65535,0);if(c.TYPED_ARRAY_SUPPORT){this[t]=e&255;this[t+1]=e>>>8}else{U(this,e,t,true)}return t+2};c.prototype.writeUInt16BE=function qe(e,t,r){e=+e;t=t|0;if(!r)O(this,e,t,2,65535,0);if(c.TYPED_ARRAY_SUPPORT){this[t]=e>>>8;this[t+1]=e&255}else{U(this,e,t,false)}return t+2};function z(e,t,r,i){if(t<0)t=4294967295+t+1;for(var n=0,a=Math.min(e.length-r,4);n<a;n++){e[r+n]=t>>>(i?n:3-n)*8&255}}c.prototype.writeUInt32LE=function Ne(e,t,r){e=+e;t=t|0;if(!r)O(this,e,t,4,4294967295,0);if(c.TYPED_ARRAY_SUPPORT){this[t+3]=e>>>24;this[t+2]=e>>>16;this[t+1]=e>>>8;this[t]=e&255}else{z(this,e,t,true)}return t+4};c.prototype.writeUInt32BE=function Oe(e,t,r){e=+e;t=t|0;if(!r)O(this,e,t,4,4294967295,0);if(c.TYPED_ARRAY_SUPPORT){this[t]=e>>>24;this[t+1]=e>>>16;this[t+2]=e>>>8;this[t+3]=e&255}else{z(this,e,t,false)}return t+4};c.prototype.writeIntLE=function Ue(e,t,r,i){e=+e;t=t|0;if(!i){var n=Math.pow(2,8*r-1);O(this,e,t,r,n-1,-n)}var a=0;var f=1;var s=e<0?1:0;this[t]=e&255;while(++a<r&&(f*=256)){this[t+a]=(e/f>>0)-s&255}return t+r};c.prototype.writeIntBE=function ze(e,t,r,i){e=+e;t=t|0;if(!i){var n=Math.pow(2,8*r-1);O(this,e,t,r,n-1,-n)}var a=r-1;var f=1;var s=e<0?1:0;this[t+a]=e&255;while(--a>=0&&(f*=256)){this[t+a]=(e/f>>0)-s&255}return t+r};c.prototype.writeInt8=function Ke(e,t,r){e=+e;t=t|0;if(!r)O(this,e,t,1,127,-128);if(!c.TYPED_ARRAY_SUPPORT)e=Math.floor(e);if(e<0)e=255+e+1;this[t]=e&255;return t+1};c.prototype.writeInt16LE=function Fe(e,t,r){e=+e;t=t|0;if(!r)O(this,e,t,2,32767,-32768);if(c.TYPED_ARRAY_SUPPORT){this[t]=e&255;this[t+1]=e>>>8}else{U(this,e,t,true)}return t+2};c.prototype.writeInt16BE=function Ve(e,t,r){e=+e;t=t|0;if(!r)O(this,e,t,2,32767,-32768);if(c.TYPED_ARRAY_SUPPORT){this[t]=e>>>8;this[t+1]=e&255}else{U(this,e,t,false)}return t+2};c.prototype.writeInt32LE=function He(e,t,r){e=+e;t=t|0;if(!r)O(this,e,t,4,2147483647,-2147483648);if(c.TYPED_ARRAY_SUPPORT){this[t]=e&255;this[t+1]=e>>>8;this[t+2]=e>>>16;this[t+3]=e>>>24}else{z(this,e,t,true)}return t+4};c.prototype.writeInt32BE=function Ye(e,t,r){e=+e;t=t|0;if(!r)O(this,e,t,4,2147483647,-2147483648);if(e<0)e=4294967295+e+1;if(c.TYPED_ARRAY_SUPPORT){this[t]=e>>>24;this[t+1]=e>>>16;this[t+2]=e>>>8;this[t+3]=e&255}else{z(this,e,t,false)}return t+4};function K(e,t,r,i,n,a){if(t>n||t<a)throw new RangeError("value is out of bounds");if(r+i>e.length)throw new RangeError("index out of range");if(r<0)throw new RangeError("index out of range")}function F(e,t,r,i,a){if(!a){K(e,t,r,4,3.4028234663852886e38,-3.4028234663852886e38)}n.write(e,t,r,i,23,4);return r+4}c.prototype.writeFloatLE=function Xe(e,t,r){return F(this,e,t,true,r)};c.prototype.writeFloatBE=function We(e,t,r){return F(this,e,t,false,r)};function V(e,t,r,i,a){if(!a){K(e,t,r,8,1.7976931348623157e308,-1.7976931348623157e308)}n.write(e,t,r,i,52,8);return r+8}c.prototype.writeDoubleLE=function Ge(e,t,r){return V(this,e,t,true,r)};c.prototype.writeDoubleBE=function Je(e,t,r){return V(this,e,t,false,r)};c.prototype.copy=function Ze(e,t,r,i){if(!r)r=0;if(!i&&i!==0)i=this.length;if(t>=e.length)t=e.length;if(!t)t=0;if(i>0&&i<r)i=r;if(i===r)return 0;if(e.length===0||this.length===0)return 0;if(t<0){throw new RangeError("targetStart out of bounds")}if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");if(i>this.length)i=this.length;if(e.length-t<i-r){i=e.length-t+r}var n=i-r;var a;if(this===e&&r<t&&t<i){for(a=n-1;a>=0;a--){e[a+t]=this[a+r]}}else if(n<1e3||!c.TYPED_ARRAY_SUPPORT){for(a=0;a<n;a++){e[a+t]=this[a+r]}}else{e._set(this.subarray(r,r+n),t)}return n};c.prototype.fill=function Qe(e,t,r){if(!e)e=0;if(!t)t=0;if(!r)r=this.length;if(r<t)throw new RangeError("end < start");if(r===t)return;if(this.length===0)return;if(t<0||t>=this.length)throw new RangeError("start out of bounds");if(r<0||r>this.length)throw new RangeError("end out of bounds");var i;if(typeof e==="number"){for(i=t;i<r;i++){this[i]=e}}else{var n=J(e.toString());var a=n.length;for(i=t;i<r;i++){this[i]=n[i%a]}}return this};c.prototype.toArrayBuffer=function $e(){if(typeof Uint8Array!=="undefined"){if(c.TYPED_ARRAY_SUPPORT){return new c(this).buffer}else{var e=new Uint8Array(this.length);for(var t=0,r=e.length;t<r;t+=1){e[t]=this[t]}return e.buffer}}else{throw new TypeError("Buffer.toArrayBuffer not supported in this browser")}};var H=c.prototype;c._augment=function et(e){e.constructor=c;e._isBuffer=true;e._set=e.set;e.get=H.get;e.set=H.set;e.write=H.write;e.toString=H.toString;e.toLocaleString=H.toString;e.toJSON=H.toJSON;e.equals=H.equals;e.compare=H.compare;e.indexOf=H.indexOf;e.copy=H.copy;e.slice=H.slice;e.readUIntLE=H.readUIntLE;e.readUIntBE=H.readUIntBE;e.readUInt8=H.readUInt8;e.readUInt16LE=H.readUInt16LE;e.readUInt16BE=H.readUInt16BE;e.readUInt32LE=H.readUInt32LE;e.readUInt32BE=H.readUInt32BE;e.readIntLE=H.readIntLE;e.readIntBE=H.readIntBE;e.readInt8=H.readInt8;e.readInt16LE=H.readInt16LE;e.readInt16BE=H.readInt16BE;e.readInt32LE=H.readInt32LE;e.readInt32BE=H.readInt32BE;e.readFloatLE=H.readFloatLE;e.readFloatBE=H.readFloatBE;e.readDoubleLE=H.readDoubleLE;e.readDoubleBE=H.readDoubleBE;e.writeUInt8=H.writeUInt8;e.writeUIntLE=H.writeUIntLE;e.writeUIntBE=H.writeUIntBE;e.writeUInt16LE=H.writeUInt16LE;e.writeUInt16BE=H.writeUInt16BE;e.writeUInt32LE=H.writeUInt32LE;e.writeUInt32BE=H.writeUInt32BE;e.writeIntLE=H.writeIntLE;e.writeIntBE=H.writeIntBE;e.writeInt8=H.writeInt8;e.writeInt16LE=H.writeInt16LE;e.writeInt16BE=H.writeInt16BE;e.writeInt32LE=H.writeInt32LE;e.writeInt32BE=H.writeInt32BE;e.writeFloatLE=H.writeFloatLE;e.writeFloatBE=H.writeFloatBE;e.writeDoubleLE=H.writeDoubleLE;e.writeDoubleBE=H.writeDoubleBE;e.fill=H.fill;e.inspect=H.inspect;e.toArrayBuffer=H.toArrayBuffer;return e};var Y=/[^+\/0-9A-Za-z-_]/g;function X(e){e=W(e).replace(Y,"");if(e.length<2)return"";while(e.length%4!==0){e=e+"="}return e}function W(e){if(e.trim)return e.trim();return e.replace(/^\s+|\s+$/g,"")}function G(e){if(e<16)return"0"+e.toString(16);return e.toString(16)}function J(e,t){t=t||Infinity;var r;var i=e.length;var n=null;var a=[];for(var f=0;f<i;f++){r=e.charCodeAt(f);if(r>55295&&r<57344){if(!n){if(r>56319){if((t-=3)>-1)a.push(239,191,189);continue}else if(f+1===i){if((t-=3)>-1)a.push(239,191,189);continue}n=r;continue}if(r<56320){if((t-=3)>-1)a.push(239,191,189);n=r;continue}r=n-55296<<10|r-56320|65536}else if(n){if((t-=3)>-1)a.push(239,191,189)}n=null;if(r<128){if((t-=1)<0)break;a.push(r)}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else{throw new Error("Invalid code point")}}return a}function Z(e){var t=[];for(var r=0;r<e.length;r++){t.push(e.charCodeAt(r)&255)}return t}function Q(e,t){var r,i,n;var a=[];for(var f=0;f<e.length;f++){if((t-=2)<0)break;r=e.charCodeAt(f);i=r>>8;n=r%256;a.push(n);a.push(i)}return a}function $(e){return i.toByteArray(X(e))}function ee(e,t,r,i){for(var n=0;n<i;n++){if(n+r>=t.length||n>=e.length)break;t[n+r]=e[n]}return n}}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"base64-js":16,ieee754:90,"is-array":94}],47:[function(e,t,r){(function(r){var i=e("stream").Transform;var n=e("inherits");var a=e("string_decoder").StringDecoder;t.exports=f;n(f,i);function f(e){i.call(this);this.hashMode=typeof e==="string";if(this.hashMode){this[e]=this._finalOrDigest}else{this.final=this._finalOrDigest}this._decoder=null;this._encoding=null}f.prototype.update=function(e,t,i){if(typeof e==="string"){e=new r(e,t)}var n=this._update(e);if(this.hashMode){return this}if(i){n=this._toString(n,i)}return n};f.prototype.setAutoPadding=function(){};f.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")};f.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")};f.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")};f.prototype._transform=function(e,t,r){var i;try{if(this.hashMode){this._update(e)}else{this.push(this._update(e))}}catch(n){i=n}finally{r(i)}};f.prototype._flush=function(e){var t;try{this.push(this._final())}catch(r){t=r}finally{e(t)}};f.prototype._finalOrDigest=function(e){var t=this._final()||new r("");if(e){t=this._toString(t,e,true)}return t};f.prototype._toString=function(e,t,r){if(!this._decoder){this._decoder=new a(t);this._encoding=t}if(this._encoding!==t){throw new Error("can't switch encodings")}var i=this._decoder.write(e);if(r){i+=this._decoder.end()}return i}}).call(this,e("buffer").Buffer)},{buffer:46,inherits:92,stream:135,string_decoder:136}],48:[function(e,t,r){(function(e){function t(e){return Array.isArray(e)}r.isArray=t;function i(e){return typeof e==="boolean"}r.isBoolean=i;function n(e){return e===null}r.isNull=n;function a(e){return e==null}r.isNullOrUndefined=a;function f(e){return typeof e==="number"}r.isNumber=f;function s(e){return typeof e==="string"}r.isString=s;function o(e){return typeof e==="symbol"}r.isSymbol=o;function c(e){return e===void 0}r.isUndefined=c;function h(e){return d(e)&&y(e)==="[object RegExp]"}r.isRegExp=h;function d(e){return typeof e==="object"&&e!==null}r.isObject=d;function u(e){return d(e)&&y(e)==="[object Date]"}r.isDate=u;function l(e){return d(e)&&(y(e)==="[object Error]"||e instanceof Error)}r.isError=l;function p(e){return typeof e==="function"}r.isFunction=p;function b(e){return e===null||typeof e==="boolean"||typeof e==="number"||typeof e==="string"||typeof e==="symbol"||typeof e==="undefined"}r.isPrimitive=b;function v(t){return e.isBuffer(t)}r.isBuffer=v;function y(e){return Object.prototype.toString.call(e)}}).call(this,{isBuffer:e("../../is-buffer/index.js")})},{"../../is-buffer/index.js":95}],49:[function(e,t,r){(function(r){var i=e("elliptic");var n=e("bn.js");t.exports=function o(e){return new f(e)};var a={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};a.p224=a.secp224r1;a.p256=a.secp256r1=a.prime256v1;a.p192=a.secp192r1=a.prime192v1;a.p384=a.secp384r1;a.p521=a.secp521r1;function f(e){this.curveType=a[e];if(!this.curveType){this.curveType={name:e}}this.curve=new i.ec(this.curveType.name);this.keys=void 0}f.prototype.generateKeys=function(e,t){this.keys=this.curve.genKeyPair();return this.getPublicKey(e,t)};f.prototype.computeSecret=function(e,t,i){t=t||"utf8";if(!r.isBuffer(e)){e=new r(e,t)}var n=this.curve.keyFromPublic(e).getPublic();var a=n.mul(this.keys.getPrivate()).getX();return s(a,i,this.curveType.byteLength)};f.prototype.getPublicKey=function(e,t){var r=this.keys.getPublic(t==="compressed",true);if(t==="hybrid"){if(r[r.length-1]%2){r[0]=7}else{r[0]=6}}return s(r,e)};f.prototype.getPrivateKey=function(e){return s(this.keys.getPrivate(),e)};f.prototype.setPublicKey=function(e,t){t=t||"utf8";if(!r.isBuffer(e)){e=new r(e,t)}this.keys._importPublic(e);return this};f.prototype.setPrivateKey=function(e,t){t=t||"utf8";if(!r.isBuffer(e)){e=new r(e,t)}var i=new n(e);i=i.toString(16);this.keys._importPrivate(i);return this};function s(e,t,i){if(!Array.isArray(e)){e=e.toArray()}var n=new r(e);if(i&&n.length<i){var a=new r(i-n.length);a.fill(0);n=r.concat([a,n])}if(!t){return n}else{return n.toString(t)}}}).call(this,e("buffer").Buffer)},{"bn.js":17,buffer:46,elliptic:65}],50:[function(e,t,r){(function(r){"use strict";var i=e("inherits");var n=e("./md5");var a=e("ripemd160");var f=e("sha.js");var s=e("cipher-base");function o(e){s.call(this,"digest");this._hash=e;this.buffers=[]}i(o,s);o.prototype._update=function(e){this.buffers.push(e)};o.prototype._final=function(){var e=r.concat(this.buffers);var t=this._hash(e);this.buffers=null;return t};function c(e){s.call(this,"digest");this._hash=e}i(c,s);c.prototype._update=function(e){this._hash.update(e)};c.prototype._final=function(){return this._hash.digest()};t.exports=function h(e){e=e.toLowerCase();if("md5"===e)return new o(n);if("rmd160"===e||"ripemd160"===e)return new o(a);return new c(f(e))}}).call(this,e("buffer").Buffer)},{"./md5":52,buffer:46,"cipher-base":47,inherits:92,ripemd160:126,"sha.js":128}],51:[function(e,t,r){(function(e){"use strict";var t=4;var i=new e(t);i.fill(0);var n=8;function a(r,n){if(r.length%t!==0){var a=r.length+(t-r.length%t);r=e.concat([r,i],a)}var f=[];var s=n?r.readInt32BE:r.readInt32LE;for(var o=0;o<r.length;o+=t){f.push(s.call(r,o))}return f}function f(t,r,i){var n=new e(r);var a=i?n.writeInt32BE:n.writeInt32LE;for(var f=0;f<t.length;f++){a.call(n,t[f],f*4,true)}return n}function s(t,r,i,s){if(!e.isBuffer(t))t=new e(t);var o=r(a(t,s),t.length*n);return f(o,i,s)}r.hash=s}).call(this,e("buffer").Buffer)},{buffer:46}],52:[function(e,t,r){"use strict";var i=e("./helpers");function n(e,t){e[t>>5]|=128<<t%32;e[(t+64>>>9<<4)+14]=t;var r=1732584193;var i=-271733879;var n=-1732584194;var a=271733878;for(var d=0;d<e.length;d+=16){var u=r;var l=i;var p=n;var b=a;r=f(r,i,n,a,e[d+0],7,-680876936);a=f(a,r,i,n,e[d+1],12,-389564586);n=f(n,a,r,i,e[d+2],17,606105819);i=f(i,n,a,r,e[d+3],22,-1044525330);r=f(r,i,n,a,e[d+4],7,-176418897);a=f(a,r,i,n,e[d+5],12,1200080426);n=f(n,a,r,i,e[d+6],17,-1473231341);i=f(i,n,a,r,e[d+7],22,-45705983);r=f(r,i,n,a,e[d+8],7,1770035416);a=f(a,r,i,n,e[d+9],12,-1958414417);n=f(n,a,r,i,e[d+10],17,-42063);i=f(i,n,a,r,e[d+11],22,-1990404162);r=f(r,i,n,a,e[d+12],7,1804603682);a=f(a,r,i,n,e[d+13],12,-40341101);n=f(n,a,r,i,e[d+14],17,-1502002290);i=f(i,n,a,r,e[d+15],22,1236535329);r=s(r,i,n,a,e[d+1],5,-165796510);a=s(a,r,i,n,e[d+6],9,-1069501632);n=s(n,a,r,i,e[d+11],14,643717713);i=s(i,n,a,r,e[d+0],20,-373897302);r=s(r,i,n,a,e[d+5],5,-701558691);a=s(a,r,i,n,e[d+10],9,38016083);n=s(n,a,r,i,e[d+15],14,-660478335);i=s(i,n,a,r,e[d+4],20,-405537848);r=s(r,i,n,a,e[d+9],5,568446438);a=s(a,r,i,n,e[d+14],9,-1019803690);n=s(n,a,r,i,e[d+3],14,-187363961);i=s(i,n,a,r,e[d+8],20,1163531501);r=s(r,i,n,a,e[d+13],5,-1444681467);a=s(a,r,i,n,e[d+2],9,-51403784);n=s(n,a,r,i,e[d+7],14,1735328473);i=s(i,n,a,r,e[d+12],20,-1926607734);r=o(r,i,n,a,e[d+5],4,-378558);a=o(a,r,i,n,e[d+8],11,-2022574463);n=o(n,a,r,i,e[d+11],16,1839030562);i=o(i,n,a,r,e[d+14],23,-35309556);r=o(r,i,n,a,e[d+1],4,-1530992060);a=o(a,r,i,n,e[d+4],11,1272893353);n=o(n,a,r,i,e[d+7],16,-155497632);i=o(i,n,a,r,e[d+10],23,-1094730640);r=o(r,i,n,a,e[d+13],4,681279174);a=o(a,r,i,n,e[d+0],11,-358537222);n=o(n,a,r,i,e[d+3],16,-722521979);i=o(i,n,a,r,e[d+6],23,76029189);r=o(r,i,n,a,e[d+9],4,-640364487);a=o(a,r,i,n,e[d+12],11,-421815835);n=o(n,a,r,i,e[d+15],16,530742520);i=o(i,n,a,r,e[d+2],23,-995338651);r=c(r,i,n,a,e[d+0],6,-198630844);a=c(a,r,i,n,e[d+7],10,1126891415);n=c(n,a,r,i,e[d+14],15,-1416354905);i=c(i,n,a,r,e[d+5],21,-57434055);r=c(r,i,n,a,e[d+12],6,1700485571);a=c(a,r,i,n,e[d+3],10,-1894986606);n=c(n,a,r,i,e[d+10],15,-1051523);i=c(i,n,a,r,e[d+1],21,-2054922799);r=c(r,i,n,a,e[d+8],6,1873313359);a=c(a,r,i,n,e[d+15],10,-30611744);n=c(n,a,r,i,e[d+6],15,-1560198380);i=c(i,n,a,r,e[d+13],21,1309151649);r=c(r,i,n,a,e[d+4],6,-145523070);a=c(a,r,i,n,e[d+11],10,-1120210379);n=c(n,a,r,i,e[d+2],15,718787259);i=c(i,n,a,r,e[d+9],21,-343485551);r=h(r,u);i=h(i,l);n=h(n,p);a=h(a,b)}return Array(r,i,n,a)}function a(e,t,r,i,n,a){return h(d(h(h(t,e),h(i,a)),n),r)}function f(e,t,r,i,n,f,s){return a(t&r|~t&i,e,t,n,f,s)}function s(e,t,r,i,n,f,s){return a(t&i|r&~i,e,t,n,f,s)}function o(e,t,r,i,n,f,s){return a(t^r^i,e,t,n,f,s)}function c(e,t,r,i,n,f,s){return a(r^(t|~i),e,t,n,f,s)}function h(e,t){var r=(e&65535)+(t&65535);var i=(e>>16)+(t>>16)+(r>>16);return i<<16|r&65535}function d(e,t){return e<<t|e>>>32-t}t.exports=function u(e){return i.hash(e,n,16)}},{"./helpers":51}],53:[function(e,t,r){(function(r){"use strict";var i=e("create-hash/browser");var n=e("inherits");var a=e("stream").Transform;var f=new r(128);f.fill(0);function s(e,t){a.call(this);e=e.toLowerCase();if(typeof t==="string"){t=new r(t)}var n=e==="sha512"||e==="sha384"?128:64;this._alg=e;this._key=t;if(t.length>n){t=i(e).update(t).digest()}else if(t.length<n){t=r.concat([t,f],n)}var s=this._ipad=new r(n);var o=this._opad=new r(n);for(var c=0;c<n;c++){s[c]=t[c]^54;o[c]=t[c]^92}this._hash=i(e).update(s)}n(s,a);s.prototype.update=function(e,t){this._hash.update(e,t);return this};s.prototype._transform=function(e,t,r){this._hash.update(e);r()};s.prototype._flush=function(e){this.push(this.digest());e()};s.prototype.digest=function(e){var t=this._hash.digest();return i(this._alg).update(this._opad).update(t).digest(e)};t.exports=function o(e,t){return new s(e,t)}}).call(this,e("buffer").Buffer)},{buffer:46,"create-hash/browser":50,inherits:92,stream:135}],54:[function(e,t,r){"use strict";r.randomBytes=r.rng=r.pseudoRandomBytes=r.prng=e("randombytes");r.createHash=r.Hash=e("create-hash");r.createHmac=r.Hmac=e("create-hmac");var i=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(Object.keys(e("browserify-sign/algos")));r.getHashes=function(){return i};var n=e("pbkdf2");r.pbkdf2=n.pbkdf2;r.pbkdf2Sync=n.pbkdf2Sync;var a=e("browserify-cipher");["Cipher","createCipher","Cipheriv","createCipheriv","Decipher","createDecipher","Decipheriv","createDecipheriv","getCiphers","listCiphers"].forEach(function(e){r[e]=a[e]});var f=e("diffie-hellman");["DiffieHellmanGroup","createDiffieHellmanGroup","getDiffieHellman","createDiffieHellman","DiffieHellman"].forEach(function(e){r[e]=f[e]});var s=e("browserify-sign");["createSign","Sign","createVerify","Verify"].forEach(function(e){r[e]=s[e]});r.createECDH=e("create-ecdh");var o=e("public-encrypt");["publicEncrypt","privateEncrypt","publicDecrypt","privateDecrypt"].forEach(function(e){r[e]=o[e]});["createCredentials"].forEach(function(e){r[e]=function(){throw new Error(["sorry, "+e+" is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))}})},{"browserify-cipher":35,"browserify-sign":40,"browserify-sign/algos":39,"create-ecdh":49,"create-hash":50,"create-hmac":53,"diffie-hellman":61,pbkdf2:106,"public-encrypt":109,randombytes:115}],55:[function(e,t,r){"use strict";r.utils=e("./des/utils");r.Cipher=e("./des/cipher");r.DES=e("./des/des");r.CBC=e("./des/cbc");r.EDE=e("./des/ede")},{"./des/cbc":56,"./des/cipher":57,"./des/des":58,"./des/ede":59,"./des/utils":60}],56:[function(e,t,r){"use strict";var i=e("minimalistic-assert");var n=e("inherits");var a={};function f(e){i.equal(e.length,8,"Invalid IV length");this.iv=new Array(8);for(var t=0;t<this.iv.length;t++)this.iv[t]=e[t]}function s(e){function t(t){e.call(this,t);this._cbcInit()}n(t,e);var r=Object.keys(a);for(var i=0;i<r.length;i++){var f=r[i];t.prototype[f]=a[f]}t.create=function s(e){return new t(e)};return t}r.instantiate=s;a._cbcInit=function o(){var e=new f(this.options.iv);this._cbcState=e};a._update=function c(e,t,r,i){var n=this._cbcState;var a=this.constructor.super_.prototype;var f=n.iv;if(this.type==="encrypt"){for(var s=0;s<this.blockSize;s++)f[s]^=e[t+s];a._update.call(this,f,0,r,i);for(var s=0;s<this.blockSize;s++)f[s]=r[i+s]}else{a._update.call(this,e,t,r,i);for(var s=0;s<this.blockSize;s++)r[i+s]^=f[s];for(var s=0;s<this.blockSize;s++)f[s]=e[t+s]}}},{inherits:92,"minimalistic-assert":99}],57:[function(e,t,r){"use strict";var i=e("minimalistic-assert");function n(e){this.options=e;this.type=this.options.type;this.blockSize=8;this._init();this.buffer=new Array(this.blockSize);this.bufferOff=0}t.exports=n;n.prototype._init=function a(){};n.prototype.update=function f(e){if(e.length===0)return[];if(this.type==="decrypt")return this._updateDecrypt(e);else return this._updateEncrypt(e)};n.prototype._buffer=function s(e,t){var r=Math.min(this.buffer.length-this.bufferOff,e.length-t);for(var i=0;i<r;i++)this.buffer[this.bufferOff+i]=e[t+i];this.bufferOff+=r;return r};n.prototype._flushBuffer=function o(e,t){this._update(this.buffer,0,e,t);this.bufferOff=0;return this.blockSize};n.prototype._updateEncrypt=function c(e){var t=0;var r=0;var i=(this.bufferOff+e.length)/this.blockSize|0;var n=new Array(i*this.blockSize);if(this.bufferOff!==0){t+=this._buffer(e,t);if(this.bufferOff===this.buffer.length)r+=this._flushBuffer(n,r)}var a=e.length-(e.length-t)%this.blockSize;for(;t<a;t+=this.blockSize){this._update(e,t,n,r);r+=this.blockSize}for(;t<e.length;t++,this.bufferOff++)this.buffer[this.bufferOff]=e[t];return n};n.prototype._updateDecrypt=function h(e){var t=0;var r=0;var i=Math.ceil((this.bufferOff+e.length)/this.blockSize)-1;var n=new Array(i*this.blockSize);for(;i>0;i--){t+=this._buffer(e,t);r+=this._flushBuffer(n,r)}t+=this._buffer(e,t);return n};n.prototype.final=function d(e){var t;if(e)t=this.update(e);var r;if(this.type==="encrypt")r=this._finalEncrypt();else r=this._finalDecrypt();if(t)return t.concat(r);else return r};n.prototype._pad=function u(e,t){if(t===0)return false;while(t<e.length)e[t++]=0;return true};n.prototype._finalEncrypt=function l(){if(!this._pad(this.buffer,this.bufferOff))return[];var e=new Array(this.blockSize);this._update(this.buffer,0,e,0);return e};n.prototype._unpad=function p(e){return e};n.prototype._finalDecrypt=function b(){i.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var e=new Array(this.blockSize);this._flushBuffer(e,0);return this._unpad(e)}},{"minimalistic-assert":99}],58:[function(e,t,r){"use strict";var i=e("minimalistic-assert");var n=e("inherits");var a=e("../des");var f=a.utils;var s=a.Cipher;function o(){this.tmp=new Array(2);this.keys=null}function c(e){s.call(this,e);var t=new o;this._desState=t;this.deriveKeys(t,e.key)}n(c,s);t.exports=c;c.create=function d(e){return new c(e)};var h=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];c.prototype.deriveKeys=function u(e,t){e.keys=new Array(16*2);i.equal(t.length,this.blockSize,"Invalid key length");var r=f.readUInt32BE(t,0);var n=f.readUInt32BE(t,4);f.pc1(r,n,e.tmp,0);r=e.tmp[0];n=e.tmp[1];for(var a=0;a<e.keys.length;a+=2){var s=h[a>>>1];r=f.r28shl(r,s);n=f.r28shl(n,s);f.pc2(r,n,e.keys,a)}};c.prototype._update=function l(e,t,r,i){var n=this._desState;var a=f.readUInt32BE(e,t);var s=f.readUInt32BE(e,t+4);f.ip(a,s,n.tmp,0);a=n.tmp[0];s=n.tmp[1];if(this.type==="encrypt")this._encrypt(n,a,s,n.tmp,0);else this._decrypt(n,a,s,n.tmp,0);a=n.tmp[0];s=n.tmp[1];f.writeUInt32BE(r,a,i);f.writeUInt32BE(r,s,i+4)};c.prototype._pad=function p(e,t){var r=e.length-t;for(var i=t;i<e.length;i++)e[i]=r;return true};c.prototype._unpad=function b(e){var t=e[e.length-1];for(var r=e.length-t;r<e.length;r++)i.equal(e[r],t);return e.slice(0,e.length-t)};c.prototype._encrypt=function v(e,t,r,i,n){var a=t;var s=r;for(var o=0;o<e.keys.length;o+=2){var c=e.keys[o];var h=e.keys[o+1];f.expand(s,e.tmp,0);c^=e.tmp[0];h^=e.tmp[1];var d=f.substitute(c,h);var u=f.permute(d);var l=s;s=(a^u)>>>0;a=l}f.rip(s,a,i,n)};c.prototype._decrypt=function y(e,t,r,i,n){var a=r;var s=t;for(var o=e.keys.length-2;o>=0;o-=2){var c=e.keys[o];var h=e.keys[o+1];f.expand(a,e.tmp,0);c^=e.tmp[0];h^=e.tmp[1];var d=f.substitute(c,h);var u=f.permute(d);var l=a;a=(s^u)>>>0;s=l}f.rip(a,s,i,n)}},{"../des":55,inherits:92,"minimalistic-assert":99}],59:[function(e,t,r){"use strict";var i=e("minimalistic-assert");var n=e("inherits");var a=e("../des");var f=a.Cipher;var s=a.DES;function o(e,t){i.equal(t.length,24,"Invalid key length");var r=t.slice(0,8);var n=t.slice(8,16);var a=t.slice(16,24);if(e==="encrypt"){this.ciphers=[s.create({type:"encrypt",key:r}),s.create({type:"decrypt",key:n}),s.create({type:"encrypt",key:a})]}else{this.ciphers=[s.create({type:"decrypt",key:a}),s.create({type:"encrypt",key:n}),s.create({type:"decrypt",key:r})]}}function c(e){f.call(this,e);var t=new o(this.type,this.options.key);this._edeState=t}n(c,f);t.exports=c;c.create=function h(e){return new c(e)};c.prototype._update=function d(e,t,r,i){var n=this._edeState;n.ciphers[0]._update(e,t,r,i);n.ciphers[1]._update(r,i,r,i);n.ciphers[2]._update(r,i,r,i)};c.prototype._pad=s.prototype._pad;c.prototype._unpad=s.prototype._unpad},{"../des":55,inherits:92,"minimalistic-assert":99}],60:[function(e,t,r){"use strict";r.readUInt32BE=function f(e,t){var r=e[0+t]<<24|e[1+t]<<16|e[2+t]<<8|e[3+t];return r>>>0};r.writeUInt32BE=function s(e,t,r){e[0+r]=t>>>24;e[1+r]=t>>>16&255;e[2+r]=t>>>8&255;e[3+r]=t&255};r.ip=function o(e,t,r,i){var n=0;var a=0;for(var f=6;f>=0;f-=2){for(var s=0;s<=24;s+=8){n<<=1;n|=t>>>s+f&1}for(var s=0;s<=24;s+=8){n<<=1;n|=e>>>s+f&1}}for(var f=6;f>=0;f-=2){for(var s=1;s<=25;s+=8){a<<=1;a|=t>>>s+f&1}for(var s=1;s<=25;s+=8){a<<=1;a|=e>>>s+f&1}}r[i+0]=n>>>0;r[i+1]=a>>>0};r.rip=function c(e,t,r,i){var n=0;var a=0;for(var f=0;f<4;f++){for(var s=24;s>=0;s-=8){n<<=1;n|=t>>>s+f&1;n<<=1;n|=e>>>s+f&1}}for(var f=4;f<8;f++){for(var s=24;s>=0;s-=8){a<<=1;a|=t>>>s+f&1;a<<=1;a|=e>>>s+f&1}}r[i+0]=n>>>0;r[i+1]=a>>>0};r.pc1=function h(e,t,r,i){var n=0;var a=0;for(var f=7;f>=5;f--){for(var s=0;s<=24;s+=8){n<<=1;n|=t>>s+f&1}for(var s=0;s<=24;s+=8){n<<=1;n|=e>>s+f&1}}for(var s=0;s<=24;s+=8){n<<=1;n|=t>>s+f&1}for(var f=1;f<=3;f++){for(var s=0;s<=24;s+=8){a<<=1;a|=t>>s+f&1}for(var s=0;s<=24;s+=8){a<<=1;a|=e>>s+f&1}}for(var s=0;s<=24;s+=8){a<<=1;a|=e>>s+f&1}r[i+0]=n>>>0;r[i+1]=a>>>0};r.r28shl=function d(e,t){return e<<t&268435455|e>>>28-t};var i=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];r.pc2=function u(e,t,r,n){var a=0;var f=0;var s=i.length>>>1;for(var o=0;o<s;o++){a<<=1;a|=e>>>i[o]&1}for(var o=s;o<i.length;o++){f<<=1;f|=t>>>i[o]&1}r[n+0]=a>>>0;r[n+1]=f>>>0};r.expand=function l(e,t,r){var i=0;var n=0;i=(e&1)<<5|e>>>27;for(var a=23;a>=15;a-=4){i<<=6;i|=e>>>a&63}for(var a=11;a>=3;a-=4){n|=e>>>a&63;n<<=6}n|=(e&31)<<1|e>>>31;t[r+0]=i>>>0;t[r+1]=n>>>0};var n=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];r.substitute=function p(e,t){var r=0;for(var i=0;i<4;i++){var a=e>>>18-i*6&63;var f=n[i*64+a];r<<=4;r|=f}for(var i=0;i<4;i++){var a=t>>>18-i*6&63;var f=n[4*64+i*64+a];r<<=4;r|=f}return r>>>0};var a=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];r.permute=function b(e){var t=0;for(var r=0;r<a.length;r++){t<<=1;t|=e>>>a[r]&1}return t>>>0};r.padSplit=function v(e,t,r){var i=e.toString(2);while(i.length<t)i="0"+i;var n=[];for(var a=0;a<t;a+=r)n.push(i.slice(a,a+r));return n.join(" ")}},{}],61:[function(e,t,r){(function(t){var i=e("./lib/generatePrime");var n=e("./lib/primes");var a=e("./lib/dh");function f(e){var r=new t(n[e].prime,"hex");var i=new t(n[e].gen,"hex");return new a(r,i)}function s(e,r,n,f){if(t.isBuffer(r)||typeof r==="string"&&["hex","binary","base64"].indexOf(r)===-1){f=n;n=r;r=undefined}r=r||"binary";f=f||"binary";n=n||new t([2]);if(!t.isBuffer(n)){n=new t(n,f)}if(typeof e==="number"){return new a(i(e,n),n,true)}if(!t.isBuffer(e)){e=new t(e,r)}return new a(e,n,true)}r.DiffieHellmanGroup=r.createDiffieHellmanGroup=r.getDiffieHellman=f;r.createDiffieHellman=r.DiffieHellman=s}).call(this,e("buffer").Buffer)},{"./lib/dh":62,"./lib/generatePrime":63,"./lib/primes":64,buffer:46}],62:[function(e,t,r){(function(r){var i=e("bn.js");var n=e("miller-rabin");var a=new n;var f=new i(24);var s=new i(11);var o=new i(10);var c=new i(3);var h=new i(7);var d=e("./generatePrime");var u=e("randombytes");t.exports=y;function l(e,t){t=t||"utf8";if(!r.isBuffer(e)){e=new r(e,t)}this._pub=new i(e);return this}function p(e,t){t=t||"utf8";if(!r.isBuffer(e)){e=new r(e,t)}this._priv=new i(e);return this}var b={};function v(e,t){var r=t.toString("hex");var i=[r,e.toString(16)].join("_");if(i in b){return b[i]}var n=0;if(e.isEven()||!d.simpleSieve||!d.fermatTest(e)||!a.test(e)){n+=1;if(r==="02"||r==="05"){n+=8}else{n+=4}b[i]=n;return n}if(!a.test(e.shrn(1))){n+=2}var u;switch(r){case"02":if(e.mod(f).cmp(s)){n+=8}break;case"05":u=e.mod(o);if(u.cmp(c)&&u.cmp(h)){n+=8}break;default:n+=4}b[i]=n;return n}function y(e,t,r){this.setGenerator(t);this.__prime=new i(e);this._prime=i.mont(this.__prime);this._primeLen=e.length;this._pub=undefined;this._priv=undefined;this._primeCode=undefined;if(r){this.setPublicKey=l;this.setPrivateKey=p}else{this._primeCode=8}}Object.defineProperty(y.prototype,"verifyError",{enumerable:true,get:function(){if(typeof this._primeCode!=="number"){this._primeCode=v(this.__prime,this.__gen)}return this._primeCode}});y.prototype.generateKeys=function(){if(!this._priv){this._priv=new i(u(this._primeLen))}this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed();
|
|
return this.getPublicKey()};y.prototype.computeSecret=function(e){e=new i(e);e=e.toRed(this._prime);var t=e.redPow(this._priv).fromRed();var n=new r(t.toArray());var a=this.getPrime();if(n.length<a.length){var f=new r(a.length-n.length);f.fill(0);n=r.concat([f,n])}return n};y.prototype.getPublicKey=function m(e){return g(this._pub,e)};y.prototype.getPrivateKey=function w(e){return g(this._priv,e)};y.prototype.getPrime=function(e){return g(this.__prime,e)};y.prototype.getGenerator=function(e){return g(this._gen,e)};y.prototype.setGenerator=function(e,t){t=t||"utf8";if(!r.isBuffer(e)){e=new r(e,t)}this.__gen=e;this._gen=new i(e);return this};function g(e,t){var i=new r(e.toArray());if(!t){return i}else{return i.toString(t)}}}).call(this,e("buffer").Buffer)},{"./generatePrime":63,"bn.js":17,buffer:46,"miller-rabin":98,randombytes:115}],63:[function(e,t,r){var i=e("randombytes");t.exports=E;E.simpleSieve=_;E.fermatTest=S;var n=e("bn.js");var a=new n(24);var f=e("miller-rabin");var s=new f;var o=new n(1);var c=new n(2);var h=new n(5);var d=new n(16);var u=new n(8);var l=new n(10);var p=new n(3);var b=new n(7);var v=new n(11);var y=new n(4);var g=new n(12);var m=null;function w(){if(m!==null)return m;var e=1048576;var t=[];t[0]=2;for(var r=1,i=3;i<e;i+=2){var n=Math.ceil(Math.sqrt(i));for(var a=0;a<r&&t[a]<=n;a++)if(i%t[a]===0)break;if(r!==a&&t[a]<=n)continue;t[r++]=i}m=t;return t}function _(e){var t=w();for(var r=0;r<t.length;r++)if(e.modn(t[r])===0){if(e.cmpn(t[r])===0){return true}else{return false}}return true}function S(e){var t=n.mont(e);return c.toRed(t).redPow(e.subn(1)).fromRed().cmpn(1)===0}function E(e,t){if(e<16){if(t===2||t===5){return new n([140,123])}else{return new n([140,39])}}t=new n(t);var r,f;while(true){r=new n(i(Math.ceil(e/8)));while(r.bitLength()>e){r.ishrn(1)}if(r.isEven()){r.iadd(o)}if(!r.testn(1)){r.iadd(c)}if(!t.cmp(c)){while(r.mod(a).cmp(v)){r.iadd(y)}}else if(!t.cmp(h)){while(r.mod(l).cmp(p)){r.iadd(y)}}f=r.shrn(1);if(_(f)&&_(r)&&S(f)&&S(r)&&s.test(f)&&s.test(r)){return r}}}},{"bn.js":17,"miller-rabin":98,randombytes:115}],64:[function(e,t,r){t.exports={modp1:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},modp2:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},modp5:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},modp14:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},modp15:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},modp16:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},modp17:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},modp18:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}},{}],65:[function(e,t,r){"use strict";var i=r;i.version=e("../package.json").version;i.utils=e("./elliptic/utils");i.rand=e("brorand");i.hmacDRBG=e("./elliptic/hmac-drbg");i.curve=e("./elliptic/curve");i.curves=e("./elliptic/curves");i.ec=e("./elliptic/ec");i.eddsa=e("./elliptic/eddsa")},{"../package.json":81,"./elliptic/curve":68,"./elliptic/curves":71,"./elliptic/ec":72,"./elliptic/eddsa":75,"./elliptic/hmac-drbg":78,"./elliptic/utils":80,brorand:18}],66:[function(e,t,r){"use strict";var i=e("bn.js");var n=e("../../elliptic");var a=n.utils;var f=a.getNAF;var s=a.getJSF;var o=a.assert;function c(e,t){this.type=e;this.p=new i(t.p,16);this.red=t.prime?i.red(t.prime):i.mont(this.p);this.zero=new i(0).toRed(this.red);this.one=new i(1).toRed(this.red);this.two=new i(2).toRed(this.red);this.n=t.n&&new i(t.n,16);this.g=t.g&&this.pointFromJSON(t.g,t.gRed);this._wnafT1=new Array(4);this._wnafT2=new Array(4);this._wnafT3=new Array(4);this._wnafT4=new Array(4)}t.exports=c;c.prototype.point=function d(){throw new Error("Not implemented")};c.prototype.validate=function u(){throw new Error("Not implemented")};c.prototype._fixedNafMul=function l(e,t){o(e.precomputed);var r=e._getDoubles();var i=f(t,1);var n=(1<<r.step+1)-(r.step%2===0?2:1);n/=3;var a=[];for(var s=0;s<i.length;s+=r.step){var c=0;for(var t=s+r.step-1;t>=s;t--)c=(c<<1)+i[t];a.push(c)}var h=this.jpoint(null,null,null);var d=this.jpoint(null,null,null);for(var u=n;u>0;u--){for(var s=0;s<a.length;s++){var c=a[s];if(c===u)d=d.mixedAdd(r.points[s]);else if(c===-u)d=d.mixedAdd(r.points[s].neg())}h=h.add(d)}return h.toP()};c.prototype._wnafMul=function p(e,t){var r=4;var i=e._getNAFPoints(r);r=i.wnd;var n=i.points;var a=f(t,r);var s=this.jpoint(null,null,null);for(var c=a.length-1;c>=0;c--){for(var t=0;c>=0&&a[c]===0;c--)t++;if(c>=0)t++;s=s.dblp(t);if(c<0)break;var h=a[c];o(h!==0);if(e.type==="affine"){if(h>0)s=s.mixedAdd(n[h-1>>1]);else s=s.mixedAdd(n[-h-1>>1].neg())}else{if(h>0)s=s.add(n[h-1>>1]);else s=s.add(n[-h-1>>1].neg())}}return e.type==="affine"?s.toP():s};c.prototype._wnafMulAdd=function b(e,t,r,i){var n=this._wnafT1;var a=this._wnafT2;var o=this._wnafT3;var c=0;for(var h=0;h<i;h++){var d=t[h];var u=d._getNAFPoints(e);n[h]=u.wnd;a[h]=u.points}for(var h=i-1;h>=1;h-=2){var l=h-1;var p=h;if(n[l]!==1||n[p]!==1){o[l]=f(r[l],n[l]);o[p]=f(r[p],n[p]);c=Math.max(o[l].length,c);c=Math.max(o[p].length,c);continue}var b=[t[l],null,null,t[p]];if(t[l].y.cmp(t[p].y)===0){b[1]=t[l].add(t[p]);b[2]=t[l].toJ().mixedAdd(t[p].neg())}else if(t[l].y.cmp(t[p].y.redNeg())===0){b[1]=t[l].toJ().mixedAdd(t[p]);b[2]=t[l].add(t[p].neg())}else{b[1]=t[l].toJ().mixedAdd(t[p]);b[2]=t[l].toJ().mixedAdd(t[p].neg())}var v=[-3,-1,-5,-7,0,7,5,1,3];var y=s(r[l],r[p]);c=Math.max(y[0].length,c);o[l]=new Array(c);o[p]=new Array(c);for(var g=0;g<c;g++){var m=y[0][g]|0;var w=y[1][g]|0;o[l][g]=v[(m+1)*3+(w+1)];o[p][g]=0;a[l]=b}}var _=this.jpoint(null,null,null);var S=this._wnafT4;for(var h=c;h>=0;h--){var E=0;while(h>=0){var B=true;for(var g=0;g<i;g++){S[g]=o[g][h]|0;if(S[g]!==0)B=false}if(!B)break;E++;h--}if(h>=0)E++;_=_.dblp(E);if(h<0)break;for(var g=0;g<i;g++){var A=S[g];var d;if(A===0)continue;else if(A>0)d=a[g][A-1>>1];else if(A<0)d=a[g][-A-1>>1].neg();if(d.type==="affine")_=_.mixedAdd(d);else _=_.add(d)}}for(var h=0;h<i;h++)a[h]=null;return _.toP()};function h(e,t){this.curve=e;this.type=t;this.precomputed=null}c.BasePoint=h;h.prototype.eq=function v(){throw new Error("Not implemented")};h.prototype.validate=function y(){return this.curve.validate(this)};c.prototype.decodePoint=function g(e,t){e=a.toArray(e,t);var r=this.p.byteLength();if(e[0]===4&&e.length-1===2*r){return this.point(e.slice(1,1+r),e.slice(1+r,1+2*r))}else if((e[0]===2||e[0]===3)&&e.length-1===r){return this.pointFromX(e.slice(1,1+r),e[0]===3)}throw new Error("Unknown point format")};h.prototype.encodeCompressed=function m(e){return this.encode(e,true)};h.prototype._encode=function w(e){var t=this.curve.p.byteLength();var r=this.getX().toArray("be",t);if(e)return[this.getY().isEven()?2:3].concat(r);return[4].concat(r,this.getY().toArray("be",t))};h.prototype.encode=function _(e,t){return a.encode(this._encode(t),e)};h.prototype.precompute=function S(e){if(this.precomputed)return this;var t={doubles:null,naf:null,beta:null};t.naf=this._getNAFPoints(8);t.doubles=this._getDoubles(4,e);t.beta=this._getBeta();this.precomputed=t;return this};h.prototype._hasDoubles=function E(e){if(!this.precomputed)return false;var t=this.precomputed.doubles;if(!t)return false;return t.points.length>=Math.ceil((e.bitLength()+1)/t.step)};h.prototype._getDoubles=function B(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;var r=[this];var i=this;for(var n=0;n<t;n+=e){for(var a=0;a<e;a++)i=i.dbl();r.push(i)}return{step:e,points:r}};h.prototype._getNAFPoints=function A(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;var t=[this];var r=(1<<e)-1;var i=r===1?null:this.dbl();for(var n=1;n<r;n++)t[n]=t[n-1].add(i);return{wnd:e,points:t}};h.prototype._getBeta=function I(){return null};h.prototype.dblp=function k(e){var t=this;for(var r=0;r<e;r++)t=t.dbl();return t}},{"../../elliptic":65,"bn.js":17}],67:[function(e,t,r){"use strict";var i=e("../curve");var n=e("../../elliptic");var a=e("bn.js");var f=e("inherits");var s=i.base;var o=n.utils.assert;function c(e){this.twisted=(e.a|0)!==1;this.mOneA=this.twisted&&(e.a|0)===-1;this.extended=this.mOneA;s.call(this,"edwards",e);this.a=new a(e.a,16).umod(this.red.m);this.a=this.a.toRed(this.red);this.c=new a(e.c,16).toRed(this.red);this.c2=this.c.redSqr();this.d=new a(e.d,16).toRed(this.red);this.dd=this.d.redAdd(this.d);o(!this.twisted||this.c.fromRed().cmpn(1)===0);this.oneC=(e.c|0)===1}f(c,s);t.exports=c;c.prototype._mulA=function d(e){if(this.mOneA)return e.redNeg();else return this.a.redMul(e)};c.prototype._mulC=function u(e){if(this.oneC)return e;else return this.c.redMul(e)};c.prototype.jpoint=function l(e,t,r,i){return this.point(e,t,r,i)};c.prototype.pointFromX=function p(e,t){e=new a(e,16);if(!e.red)e=e.toRed(this.red);var r=e.redSqr();var i=this.c2.redSub(this.a.redMul(r));var n=this.one.redSub(this.c2.redMul(this.d).redMul(r));var f=i.redMul(n.redInvm()).redSqrt();var s=f.fromRed().isOdd();if(t&&!s||!t&&s)f=f.redNeg();return this.point(e,f)};c.prototype.pointFromY=function b(e,t){e=new a(e,16);if(!e.red)e=e.toRed(this.red);var r=e.redSqr();var i=r.redSub(this.one);var n=r.redMul(this.d).redAdd(this.one);var f=i.redMul(n.redInvm());if(f.cmp(this.zero)===0){if(t)throw new Error("invalid point");else return this.point(this.zero,e)}var s=f.redSqrt();if(s.redSqr().redSub(f).cmp(this.zero)!==0)throw new Error("invalid point");if(s.isOdd()!==t)s=s.redNeg();return this.point(s,e)};c.prototype.validate=function v(e){if(e.isInfinity())return true;e.normalize();var t=e.x.redSqr();var r=e.y.redSqr();var i=t.redMul(this.a).redAdd(r);var n=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(r)));return i.cmp(n)===0};function h(e,t,r,i,n){s.BasePoint.call(this,e,"projective");if(t===null&&r===null&&i===null){this.x=this.curve.zero;this.y=this.curve.one;this.z=this.curve.one;this.t=this.curve.zero;this.zOne=true}else{this.x=new a(t,16);this.y=new a(r,16);this.z=i?new a(i,16):this.curve.one;this.t=n&&new a(n,16);if(!this.x.red)this.x=this.x.toRed(this.curve.red);if(!this.y.red)this.y=this.y.toRed(this.curve.red);if(!this.z.red)this.z=this.z.toRed(this.curve.red);if(this.t&&!this.t.red)this.t=this.t.toRed(this.curve.red);this.zOne=this.z===this.curve.one;if(this.curve.extended&&!this.t){this.t=this.x.redMul(this.y);if(!this.zOne)this.t=this.t.redMul(this.z.redInvm())}}}f(h,s.BasePoint);c.prototype.pointFromJSON=function y(e){return h.fromJSON(this,e)};c.prototype.point=function g(e,t,r,i){return new h(this,e,t,r,i)};h.fromJSON=function m(e,t){return new h(e,t[0],t[1],t[2])};h.prototype.inspect=function w(){if(this.isInfinity())return"<EC Point Infinity>";return"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"};h.prototype.isInfinity=function _(){return this.x.cmpn(0)===0&&this.y.cmp(this.z)===0};h.prototype._extDbl=function S(){var e=this.x.redSqr();var t=this.y.redSqr();var r=this.z.redSqr();r=r.redIAdd(r);var i=this.curve._mulA(e);var n=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t);var a=i.redAdd(t);var f=a.redSub(r);var s=i.redSub(t);var o=n.redMul(f);var c=a.redMul(s);var h=n.redMul(s);var d=f.redMul(a);return this.curve.point(o,c,d,h)};h.prototype._projDbl=function E(){var e=this.x.redAdd(this.y).redSqr();var t=this.x.redSqr();var r=this.y.redSqr();var i;var n;var a;if(this.curve.twisted){var f=this.curve._mulA(t);var s=f.redAdd(r);if(this.zOne){i=e.redSub(t).redSub(r).redMul(s.redSub(this.curve.two));n=s.redMul(f.redSub(r));a=s.redSqr().redSub(s).redSub(s)}else{var o=this.z.redSqr();var c=s.redSub(o).redISub(o);i=e.redSub(t).redISub(r).redMul(c);n=s.redMul(f.redSub(r));a=s.redMul(c)}}else{var f=t.redAdd(r);var o=this.curve._mulC(this.c.redMul(this.z)).redSqr();var c=f.redSub(o).redSub(o);i=this.curve._mulC(e.redISub(f)).redMul(c);n=this.curve._mulC(f).redMul(t.redISub(r));a=f.redMul(c)}return this.curve.point(i,n,a)};h.prototype.dbl=function B(){if(this.isInfinity())return this;if(this.curve.extended)return this._extDbl();else return this._projDbl()};h.prototype._extAdd=function A(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x));var r=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x));var i=this.t.redMul(this.curve.dd).redMul(e.t);var n=this.z.redMul(e.z.redAdd(e.z));var a=r.redSub(t);var f=n.redSub(i);var s=n.redAdd(i);var o=r.redAdd(t);var c=a.redMul(f);var h=s.redMul(o);var d=a.redMul(o);var u=f.redMul(s);return this.curve.point(c,h,u,d)};h.prototype._projAdd=function I(e){var t=this.z.redMul(e.z);var r=t.redSqr();var i=this.x.redMul(e.x);var n=this.y.redMul(e.y);var a=this.curve.d.redMul(i).redMul(n);var f=r.redSub(a);var s=r.redAdd(a);var o=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(i).redISub(n);var c=t.redMul(f).redMul(o);var h;var d;if(this.curve.twisted){h=t.redMul(s).redMul(n.redSub(this.curve._mulA(i)));d=f.redMul(s)}else{h=t.redMul(s).redMul(n.redSub(i));d=this.curve._mulC(f).redMul(s)}return this.curve.point(c,h,d)};h.prototype.add=function k(e){if(this.isInfinity())return e;if(e.isInfinity())return this;if(this.curve.extended)return this._extAdd(e);else return this._projAdd(e)};h.prototype.mul=function x(e){if(this._hasDoubles(e))return this.curve._fixedNafMul(this,e);else return this.curve._wnafMul(this,e)};h.prototype.mulAdd=function R(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2)};h.prototype.normalize=function T(){if(this.zOne)return this;var e=this.z.redInvm();this.x=this.x.redMul(e);this.y=this.y.redMul(e);if(this.t)this.t=this.t.redMul(e);this.z=this.curve.one;this.zOne=true;return this};h.prototype.neg=function C(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())};h.prototype.getX=function M(){this.normalize();return this.x.fromRed()};h.prototype.getY=function P(){this.normalize();return this.y.fromRed()};h.prototype.eq=function D(e){return this===e||this.getX().cmp(e.getX())===0&&this.getY().cmp(e.getY())===0};h.prototype.toP=h.prototype.normalize;h.prototype.mixedAdd=h.prototype.add},{"../../elliptic":65,"../curve":68,"bn.js":17,inherits:92}],68:[function(e,t,r){"use strict";var i=r;i.base=e("./base");i.short=e("./short");i.mont=e("./mont");i.edwards=e("./edwards")},{"./base":66,"./edwards":67,"./mont":69,"./short":70}],69:[function(e,t,r){"use strict";var i=e("../curve");var n=e("bn.js");var a=e("inherits");var f=i.base;var s=e("../../elliptic");var o=s.utils;function c(e){f.call(this,"mont",e);this.a=new n(e.a,16).toRed(this.red);this.b=new n(e.b,16).toRed(this.red);this.i4=new n(4).toRed(this.red).redInvm();this.two=new n(2).toRed(this.red);this.a24=this.i4.redMul(this.a.redAdd(this.two))}a(c,f);t.exports=c;c.prototype.validate=function d(e){var t=e.normalize().x;var r=t.redSqr();var i=r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t);var n=i.redSqrt();return n.redSqr().cmp(i)===0};function h(e,t,r){f.BasePoint.call(this,e,"projective");if(t===null&&r===null){this.x=this.curve.one;this.z=this.curve.zero}else{this.x=new n(t,16);this.z=new n(r,16);if(!this.x.red)this.x=this.x.toRed(this.curve.red);if(!this.z.red)this.z=this.z.toRed(this.curve.red)}}a(h,f.BasePoint);c.prototype.decodePoint=function u(e,t){return this.point(o.toArray(e,t),1)};c.prototype.point=function l(e,t){return new h(this,e,t)};c.prototype.pointFromJSON=function p(e){return h.fromJSON(this,e)};h.prototype.precompute=function b(){};h.prototype._encode=function v(){return this.getX().toArray("be",this.curve.p.byteLength())};h.fromJSON=function y(e,t){return new h(e,t[0],t[1]||e.one)};h.prototype.inspect=function g(){if(this.isInfinity())return"<EC Point Infinity>";return"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"};h.prototype.isInfinity=function m(){return this.z.cmpn(0)===0};h.prototype.dbl=function w(){var e=this.x.redAdd(this.z);var t=e.redSqr();var r=this.x.redSub(this.z);var i=r.redSqr();var n=t.redSub(i);var a=t.redMul(i);var f=n.redMul(i.redAdd(this.curve.a24.redMul(n)));return this.curve.point(a,f)};h.prototype.add=function _(){throw new Error("Not supported on Montgomery curve")};h.prototype.diffAdd=function S(e,t){var r=this.x.redAdd(this.z);var i=this.x.redSub(this.z);var n=e.x.redAdd(e.z);var a=e.x.redSub(e.z);var f=a.redMul(r);var s=n.redMul(i);var o=t.z.redMul(f.redAdd(s).redSqr());var c=t.x.redMul(f.redISub(s).redSqr());return this.curve.point(o,c)};h.prototype.mul=function E(e){var t=e.clone();var r=this;var i=this.curve.point(null,null);var n=this;for(var a=[];t.cmpn(0)!==0;t.iushrn(1))a.push(t.andln(1));for(var f=a.length-1;f>=0;f--){if(a[f]===0){r=r.diffAdd(i,n);i=i.dbl()}else{i=r.diffAdd(i,n);r=r.dbl()}}return i};h.prototype.mulAdd=function B(){throw new Error("Not supported on Montgomery curve")};h.prototype.eq=function A(e){return this.getX().cmp(e.getX())===0};h.prototype.normalize=function I(){this.x=this.x.redMul(this.z.redInvm());this.z=this.curve.one;return this};h.prototype.getX=function k(){this.normalize();return this.x.fromRed()}},{"../../elliptic":65,"../curve":68,"bn.js":17,inherits:92}],70:[function(e,t,r){"use strict";var i=e("../curve");var n=e("../../elliptic");var a=e("bn.js");var f=e("inherits");var s=i.base;var o=n.utils.assert;function c(e){s.call(this,"short",e);this.a=new a(e.a,16).toRed(this.red);this.b=new a(e.b,16).toRed(this.red);this.tinv=this.two.redInvm();this.zeroA=this.a.fromRed().cmpn(0)===0;this.threeA=this.a.fromRed().sub(this.p).cmpn(-3)===0;this.endo=this._getEndomorphism(e);this._endoWnafT1=new Array(4);this._endoWnafT2=new Array(4)}f(c,s);t.exports=c;c.prototype._getEndomorphism=function u(e){if(!this.zeroA||!this.g||!this.n||this.p.modn(3)!==1)return;var t;var r;if(e.beta){t=new a(e.beta,16).toRed(this.red)}else{var i=this._getEndoRoots(this.p);t=i[0].cmp(i[1])<0?i[0]:i[1];t=t.toRed(this.red)}if(e.lambda){r=new a(e.lambda,16)}else{var n=this._getEndoRoots(this.n);if(this.g.mul(n[0]).x.cmp(this.g.x.redMul(t))===0){r=n[0]}else{r=n[1];o(this.g.mul(r).x.cmp(this.g.x.redMul(t))===0)}}var f;if(e.basis){f=e.basis.map(function(e){return{a:new a(e.a,16),b:new a(e.b,16)}})}else{f=this._getEndoBasis(r)}return{beta:t,lambda:r,basis:f}};c.prototype._getEndoRoots=function l(e){var t=e===this.p?this.red:a.mont(e);var r=new a(2).toRed(t).redInvm();var i=r.redNeg();var n=new a(3).toRed(t).redNeg().redSqrt().redMul(r);var f=i.redAdd(n).fromRed();var s=i.redSub(n).fromRed();return[f,s]};c.prototype._getEndoBasis=function p(e){var t=this.n.ushrn(Math.floor(this.n.bitLength()/2));var r=e;var i=this.n.clone();var n=new a(1);var f=new a(0);var s=new a(0);var o=new a(1);var c;var h;var d;var u;var l;var p;var b;var v=0;var y;var g;while(r.cmpn(0)!==0){var m=i.div(r);y=i.sub(m.mul(r));g=s.sub(m.mul(n));var w=o.sub(m.mul(f));if(!d&&y.cmp(t)<0){c=b.neg();h=n;d=y.neg();u=g}else if(d&&++v===2){break}b=y;i=r;r=y;s=n;n=g;o=f;f=w}l=y.neg();p=g;var _=d.sqr().add(u.sqr());var S=l.sqr().add(p.sqr());if(S.cmp(_)>=0){l=c;p=h}if(d.negative){d=d.neg();u=u.neg()}if(l.negative){l=l.neg();p=p.neg()}return[{a:d,b:u},{a:l,b:p}]};c.prototype._endoSplit=function b(e){var t=this.endo.basis;var r=t[0];var i=t[1];var n=i.b.mul(e).divRound(this.n);var a=r.b.neg().mul(e).divRound(this.n);var f=n.mul(r.a);var s=a.mul(i.a);var o=n.mul(r.b);var c=a.mul(i.b);var h=e.sub(f).sub(s);var d=o.add(c).neg();return{k1:h,k2:d}};c.prototype.pointFromX=function v(e,t){e=new a(e,16);if(!e.red)e=e.toRed(this.red);var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b);var i=r.redSqrt();var n=i.fromRed().isOdd();if(t&&!n||!t&&n)i=i.redNeg();return this.point(e,i)};c.prototype.validate=function y(e){if(e.inf)return true;var t=e.x;var r=e.y;var i=this.a.redMul(t);var n=t.redSqr().redMul(t).redIAdd(i).redIAdd(this.b);return r.redSqr().redISub(n).cmpn(0)===0};c.prototype._endoWnafMulAdd=function g(e,t){var r=this._endoWnafT1;var i=this._endoWnafT2;for(var n=0;n<e.length;n++){var a=this._endoSplit(t[n]);var f=e[n];var s=f._getBeta();if(a.k1.negative){a.k1.ineg();f=f.neg(true)}if(a.k2.negative){a.k2.ineg();s=s.neg(true)}r[n*2]=f;r[n*2+1]=s;i[n*2]=a.k1;i[n*2+1]=a.k2}var o=this._wnafMulAdd(1,r,i,n*2);for(var c=0;c<n*2;c++){r[c]=null;i[c]=null}return o};function h(e,t,r,i){s.BasePoint.call(this,e,"affine");if(t===null&&r===null){this.x=null;this.y=null;this.inf=true}else{this.x=new a(t,16);this.y=new a(r,16);if(i){this.x.forceRed(this.curve.red);this.y.forceRed(this.curve.red)}if(!this.x.red)this.x=this.x.toRed(this.curve.red);if(!this.y.red)this.y=this.y.toRed(this.curve.red);this.inf=false}}f(h,s.BasePoint);c.prototype.point=function m(e,t,r){return new h(this,e,t,r)};c.prototype.pointFromJSON=function w(e,t){return h.fromJSON(this,e,t)};h.prototype._getBeta=function _(){if(!this.curve.endo)return;var e=this.precomputed;if(e&&e.beta)return e.beta;var t=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var r=this.curve;var i=function(e){return r.point(e.x.redMul(r.endo.beta),e.y)};e.beta=t;t.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(i)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(i)}}}return t};h.prototype.toJSON=function S(){if(!this.precomputed)return[this.x,this.y];return[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]};h.fromJSON=function E(e,t,r){if(typeof t==="string")t=JSON.parse(t);var i=e.point(t[0],t[1],r);if(!t[2])return i;function n(t){return e.point(t[0],t[1],r)}var a=t[2];i.precomputed={beta:null,doubles:a.doubles&&{step:a.doubles.step,points:[i].concat(a.doubles.points.map(n))},naf:a.naf&&{wnd:a.naf.wnd,points:[i].concat(a.naf.points.map(n))}};return i};h.prototype.inspect=function B(){if(this.isInfinity())return"<EC Point Infinity>";return"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"};h.prototype.isInfinity=function A(){return this.inf};h.prototype.add=function I(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(this.x.cmp(e.x)===0)return this.curve.point(null,null);var t=this.y.redSub(e.y);if(t.cmpn(0)!==0)t=t.redMul(this.x.redSub(e.x).redInvm());var r=t.redSqr().redISub(this.x).redISub(e.x);var i=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,i)};h.prototype.dbl=function k(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(e.cmpn(0)===0)return this.curve.point(null,null);var t=this.curve.a;var r=this.x.redSqr();var i=e.redInvm();var n=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(i);var a=n.redSqr().redISub(this.x.redAdd(this.x));var f=n.redMul(this.x.redSub(a)).redISub(this.y);return this.curve.point(a,f)};h.prototype.getX=function x(){return this.x.fromRed()};h.prototype.getY=function R(){return this.y.fromRed()};h.prototype.mul=function T(e){e=new a(e,16);if(this._hasDoubles(e))return this.curve._fixedNafMul(this,e);else if(this.curve.endo)return this.curve._endoWnafMulAdd([this],[e]);else return this.curve._wnafMul(this,e)};h.prototype.mulAdd=function C(e,t,r){var i=[this,t];var n=[e,r];if(this.curve.endo)return this.curve._endoWnafMulAdd(i,n);else return this.curve._wnafMulAdd(1,i,n,2)};h.prototype.eq=function M(e){return this===e||this.inf===e.inf&&(this.inf||this.x.cmp(e.x)===0&&this.y.cmp(e.y)===0)};h.prototype.neg=function P(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed;var i=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(i)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(i)}}}return t};h.prototype.toJ=function D(){if(this.inf)return this.curve.jpoint(null,null,null);var e=this.curve.jpoint(this.x,this.y,this.curve.one);return e};function d(e,t,r,i){s.BasePoint.call(this,e,"jacobian");if(t===null&&r===null&&i===null){this.x=this.curve.one;this.y=this.curve.one;this.z=new a(0)}else{this.x=new a(t,16);this.y=new a(r,16);this.z=new a(i,16)}if(!this.x.red)this.x=this.x.toRed(this.curve.red);if(!this.y.red)this.y=this.y.toRed(this.curve.red);if(!this.z.red)this.z=this.z.toRed(this.curve.red);this.zOne=this.z===this.curve.one}f(d,s.BasePoint);c.prototype.jpoint=function L(e,t,r){return new d(this,e,t,r)};d.prototype.toP=function j(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm();var t=e.redSqr();var r=this.x.redMul(t);var i=this.y.redMul(t).redMul(e);return this.curve.point(r,i)};d.prototype.neg=function q(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};d.prototype.add=function N(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr();var r=this.z.redSqr();var i=this.x.redMul(t);var n=e.x.redMul(r);var a=this.y.redMul(t.redMul(e.z));var f=e.y.redMul(r.redMul(this.z));var s=i.redSub(n);var o=a.redSub(f);if(s.cmpn(0)===0){if(o.cmpn(0)!==0)return this.curve.jpoint(null,null,null);else return this.dbl()}var c=s.redSqr();var h=c.redMul(s);var d=i.redMul(c);var u=o.redSqr().redIAdd(h).redISub(d).redISub(d);var l=o.redMul(d.redISub(u)).redISub(a.redMul(h));var p=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(u,l,p)};d.prototype.mixedAdd=function O(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr();var r=this.x;var i=e.x.redMul(t);var n=this.y;var a=e.y.redMul(t).redMul(this.z);var f=r.redSub(i);var s=n.redSub(a);if(f.cmpn(0)===0){if(s.cmpn(0)!==0)return this.curve.jpoint(null,null,null);else return this.dbl()}var o=f.redSqr();var c=o.redMul(f);var h=r.redMul(o);var d=s.redSqr().redIAdd(c).redISub(h).redISub(h);
|
|
var u=s.redMul(h.redISub(d)).redISub(n.redMul(c));var l=this.z.redMul(f);return this.curve.jpoint(d,u,l)};d.prototype.dblp=function U(e){if(e===0)return this;if(this.isInfinity())return this;if(!e)return this.dbl();if(this.curve.zeroA||this.curve.threeA){var t=this;for(var r=0;r<e;r++)t=t.dbl();return t}var i=this.curve.a;var n=this.curve.tinv;var a=this.x;var f=this.y;var s=this.z;var o=s.redSqr().redSqr();var c=f.redAdd(f);for(var r=0;r<e;r++){var h=a.redSqr();var d=c.redSqr();var u=d.redSqr();var l=h.redAdd(h).redIAdd(h).redIAdd(i.redMul(o));var p=a.redMul(d);var b=l.redSqr().redISub(p.redAdd(p));var v=p.redISub(b);var y=l.redMul(v);y=y.redIAdd(y).redISub(u);var g=c.redMul(s);if(r+1<e)o=o.redMul(u);a=b;s=g;c=y}return this.curve.jpoint(a,c.redMul(n),s)};d.prototype.dbl=function z(){if(this.isInfinity())return this;if(this.curve.zeroA)return this._zeroDbl();else if(this.curve.threeA)return this._threeDbl();else return this._dbl()};d.prototype._zeroDbl=function K(){var e;var t;var r;if(this.zOne){var i=this.x.redSqr();var n=this.y.redSqr();var a=n.redSqr();var f=this.x.redAdd(n).redSqr().redISub(i).redISub(a);f=f.redIAdd(f);var s=i.redAdd(i).redIAdd(i);var o=s.redSqr().redISub(f).redISub(f);var c=a.redIAdd(a);c=c.redIAdd(c);c=c.redIAdd(c);e=o;t=s.redMul(f.redISub(o)).redISub(c);r=this.y.redAdd(this.y)}else{var h=this.x.redSqr();var d=this.y.redSqr();var u=d.redSqr();var l=this.x.redAdd(d).redSqr().redISub(h).redISub(u);l=l.redIAdd(l);var p=h.redAdd(h).redIAdd(h);var b=p.redSqr();var v=u.redIAdd(u);v=v.redIAdd(v);v=v.redIAdd(v);e=b.redISub(l).redISub(l);t=p.redMul(l.redISub(e)).redISub(v);r=this.y.redMul(this.z);r=r.redIAdd(r)}return this.curve.jpoint(e,t,r)};d.prototype._threeDbl=function F(){var e;var t;var r;if(this.zOne){var i=this.x.redSqr();var n=this.y.redSqr();var a=n.redSqr();var f=this.x.redAdd(n).redSqr().redISub(i).redISub(a);f=f.redIAdd(f);var s=i.redAdd(i).redIAdd(i).redIAdd(this.curve.a);var o=s.redSqr().redISub(f).redISub(f);e=o;var c=a.redIAdd(a);c=c.redIAdd(c);c=c.redIAdd(c);t=s.redMul(f.redISub(o)).redISub(c);r=this.y.redAdd(this.y)}else{var h=this.z.redSqr();var d=this.y.redSqr();var u=this.x.redMul(d);var l=this.x.redSub(h).redMul(this.x.redAdd(h));l=l.redAdd(l).redIAdd(l);var p=u.redIAdd(u);p=p.redIAdd(p);var b=p.redAdd(p);e=l.redSqr().redISub(b);r=this.y.redAdd(this.z).redSqr().redISub(d).redISub(h);var v=d.redSqr();v=v.redIAdd(v);v=v.redIAdd(v);v=v.redIAdd(v);t=l.redMul(p.redISub(e)).redISub(v)}return this.curve.jpoint(e,t,r)};d.prototype._dbl=function V(){var e=this.curve.a;var t=this.x;var r=this.y;var i=this.z;var n=i.redSqr().redSqr();var a=t.redSqr();var f=r.redSqr();var s=a.redAdd(a).redIAdd(a).redIAdd(e.redMul(n));var o=t.redAdd(t);o=o.redIAdd(o);var c=o.redMul(f);var h=s.redSqr().redISub(c.redAdd(c));var d=c.redISub(h);var u=f.redSqr();u=u.redIAdd(u);u=u.redIAdd(u);u=u.redIAdd(u);var l=s.redMul(d).redISub(u);var p=r.redAdd(r).redMul(i);return this.curve.jpoint(h,l,p)};d.prototype.trpl=function H(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr();var t=this.y.redSqr();var r=this.z.redSqr();var i=t.redSqr();var n=e.redAdd(e).redIAdd(e);var a=n.redSqr();var f=this.x.redAdd(t).redSqr().redISub(e).redISub(i);f=f.redIAdd(f);f=f.redAdd(f).redIAdd(f);f=f.redISub(a);var s=f.redSqr();var o=i.redIAdd(i);o=o.redIAdd(o);o=o.redIAdd(o);o=o.redIAdd(o);var c=n.redIAdd(f).redSqr().redISub(a).redISub(s).redISub(o);var h=t.redMul(c);h=h.redIAdd(h);h=h.redIAdd(h);var d=this.x.redMul(s).redISub(h);d=d.redIAdd(d);d=d.redIAdd(d);var u=this.y.redMul(c.redMul(o.redISub(c)).redISub(f.redMul(s)));u=u.redIAdd(u);u=u.redIAdd(u);u=u.redIAdd(u);var l=this.z.redAdd(f).redSqr().redISub(r).redISub(s);return this.curve.jpoint(d,u,l)};d.prototype.mul=function Y(e,t){e=new a(e,t);return this.curve._wnafMul(this,e)};d.prototype.eq=function X(e){if(e.type==="affine")return this.eq(e.toJ());if(this===e)return true;var t=this.z.redSqr();var r=e.z.redSqr();if(this.x.redMul(r).redISub(e.x.redMul(t)).cmpn(0)!==0)return false;var i=t.redMul(this.z);var n=r.redMul(e.z);return this.y.redMul(n).redISub(e.y.redMul(i)).cmpn(0)===0};d.prototype.inspect=function W(){if(this.isInfinity())return"<EC JPoint Infinity>";return"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"};d.prototype.isInfinity=function G(){return this.z.cmpn(0)===0}},{"../../elliptic":65,"../curve":68,"bn.js":17,inherits:92}],71:[function(e,t,r){"use strict";var i=r;var n=e("hash.js");var a=e("../elliptic");var f=a.utils.assert;function s(e){if(e.type==="short")this.curve=new a.curve.short(e);else if(e.type==="edwards")this.curve=new a.curve.edwards(e);else this.curve=new a.curve.mont(e);this.g=this.curve.g;this.n=this.curve.n;this.hash=e.hash;f(this.g.validate(),"Invalid curve");f(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}i.PresetCurve=s;function o(e,t){Object.defineProperty(i,e,{configurable:true,enumerable:true,get:function(){var r=new s(t);Object.defineProperty(i,e,{configurable:true,enumerable:true,value:r});return r}})}o("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:n.sha256,gRed:false,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]});o("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:n.sha256,gRed:false,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]});o("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:n.sha256,gRed:false,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]});o("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff "+"fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff "+"fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f "+"5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 "+"f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:n.sha384,gRed:false,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 "+"5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 "+"0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]});o("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff "+"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff "+"ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff "+"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff "+"ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b "+"99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd "+"3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff "+"ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 "+"f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:n.sha512,gRed:false,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 "+"053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 "+"a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 "+"579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 "+"3fad0761 353c7086 a272c240 88be9476 9fd16650"]});o("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"0",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:n.sha256,gRed:false,g:["9"]});o("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:n.sha256,gRed:false,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var c;try{c=e("./precomputed/secp256k1")}catch(h){c=undefined}o("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:n.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:false,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",c]})},{"../elliptic":65,"./precomputed/secp256k1":79,"hash.js":84}],72:[function(e,t,r){"use strict";var i=e("bn.js");var n=e("../../elliptic");var a=n.utils;var f=a.assert;var s=e("./key");var o=e("./signature");function c(e){if(!(this instanceof c))return new c(e);if(typeof e==="string"){f(n.curves.hasOwnProperty(e),"Unknown curve "+e);e=n.curves[e]}if(e instanceof n.curves.PresetCurve)e={curve:e};this.curve=e.curve.curve;this.n=this.curve.n;this.nh=this.n.ushrn(1);this.g=this.curve.g;this.g=e.curve.g;this.g.precompute(e.curve.n.bitLength()+1);this.hash=e.hash||e.curve.hash}t.exports=c;c.prototype.keyPair=function h(e){return new s(this,e)};c.prototype.keyFromPrivate=function d(e,t){return s.fromPrivate(this,e,t)};c.prototype.keyFromPublic=function u(e,t){return s.fromPublic(this,e,t)};c.prototype.genKeyPair=function l(e){if(!e)e={};var t=new n.hmacDRBG({hash:this.hash,pers:e.pers,entropy:e.entropy||n.rand(this.hash.hmacStrength),nonce:this.n.toArray()});var r=this.n.byteLength();var a=this.n.sub(new i(2));do{var f=new i(t.generate(r));if(f.cmp(a)>0)continue;f.iaddn(1);return this.keyFromPrivate(f)}while(true)};c.prototype._truncateToN=function p(e,t){var r=e.byteLength()*8-this.n.bitLength();if(r>0)e=e.ushrn(r);if(!t&&e.cmp(this.n)>=0)return e.sub(this.n);else return e};c.prototype.sign=function b(e,t,r,a){if(typeof r==="object"){a=r;r=null}if(!a)a={};t=this.keyFromPrivate(t,r);e=this._truncateToN(new i(e,16));var f=this.n.byteLength();var s=t.getPrivate().toArray();for(var c=s.length;c<f;c++)s.unshift(0);var h=e.toArray();for(var c=h.length;c<f;c++)h.unshift(0);var d=new n.hmacDRBG({hash:this.hash,entropy:s,nonce:h});var u=this.n.sub(new i(1));do{var l=new i(d.generate(this.n.byteLength()));l=this._truncateToN(l,true);if(l.cmpn(1)<=0||l.cmp(u)>=0)continue;var p=this.g.mul(l);if(p.isInfinity())continue;var b=p.getX();var v=b.umod(this.n);if(v.cmpn(0)===0)continue;var y=l.invm(this.n).mul(v.mul(t.getPrivate()).iadd(e));y=y.umod(this.n);if(y.cmpn(0)===0)continue;var g=(p.getY().isOdd()?1:0)|(b.cmp(v)!==0?2:0);if(a.canonical&&y.cmp(this.nh)>0){y=this.n.sub(y);g^=1}return new o({r:v,s:y,recoveryParam:g})}while(true)};c.prototype.verify=function v(e,t,r,n){e=this._truncateToN(new i(e,16));r=this.keyFromPublic(r,n);t=new o(t,"hex");var a=t.r;var f=t.s;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return false;if(f.cmpn(1)<0||f.cmp(this.n)>=0)return false;var s=f.invm(this.n);var c=s.mul(e).umod(this.n);var h=s.mul(a).umod(this.n);var d=this.g.mulAdd(c,r.getPublic(),h);if(d.isInfinity())return false;return d.getX().umod(this.n).cmp(a)===0};c.prototype.recoverPubKey=function(e,t,r,n){f((3&r)===r,"The recovery param is more than two bits");t=new o(t,n);var a=this.n;var s=new i(e);var c=t.r;var h=t.s;var d=r&1;var u=r>>1;if(c.cmp(this.curve.p.umod(this.curve.n))>=0&&u)throw new Error("Unable to find sencond key candinate");if(u)c=this.curve.pointFromX(c.add(this.curve.n),d);else c=this.curve.pointFromX(c,d);var l=a.sub(s);var p=t.r.invm(a);return c.mul(h).add(this.g.mul(l)).mul(p)};c.prototype.getKeyRecoveryParam=function(e,t,r,i){t=new o(t,i);if(t.recoveryParam!==null)return t.recoveryParam;for(var n=0;n<4;n++){var a=this.recoverPubKey(e,t,n);if(a.eq(r))return n}throw new Error("Unable to find valid recovery factor")}},{"../../elliptic":65,"./key":73,"./signature":74,"bn.js":17}],73:[function(e,t,r){"use strict";var i=e("bn.js");function n(e,t){this.ec=e;this.priv=null;this.pub=null;if(t.priv)this._importPrivate(t.priv,t.privEnc);if(t.pub)this._importPublic(t.pub,t.pubEnc)}t.exports=n;n.fromPublic=function a(e,t,r){if(t instanceof n)return t;return new n(e,{pub:t,pubEnc:r})};n.fromPrivate=function f(e,t,r){if(t instanceof n)return t;return new n(e,{priv:t,privEnc:r})};n.prototype.validate=function s(){var e=this.getPublic();if(e.isInfinity())return{result:false,reason:"Invalid public key"};if(!e.validate())return{result:false,reason:"Public key is not a point"};if(!e.mul(this.ec.curve.n).isInfinity())return{result:false,reason:"Public key * N != O"};return{result:true,reason:null}};n.prototype.getPublic=function o(e,t){if(typeof e==="string"){t=e;e=null}if(!this.pub)this.pub=this.ec.g.mul(this.priv);if(!t)return this.pub;return this.pub.encode(t,e)};n.prototype.getPrivate=function c(e){if(e==="hex")return this.priv.toString(16,2);else return this.priv};n.prototype._importPrivate=function h(e,t){this.priv=new i(e,t||16);this.priv=this.priv.umod(this.ec.curve.n)};n.prototype._importPublic=function d(e,t){if(e.x||e.y){this.pub=this.ec.curve.point(e.x,e.y);return}this.pub=this.ec.curve.decodePoint(e,t)};n.prototype.derive=function u(e){return e.mul(this.priv).getX()};n.prototype.sign=function l(e,t,r){return this.ec.sign(e,this,t,r)};n.prototype.verify=function p(e,t){return this.ec.verify(e,t,this)};n.prototype.inspect=function b(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}},{"bn.js":17}],74:[function(e,t,r){"use strict";var i=e("bn.js");var n=e("../../elliptic");var a=n.utils;var f=a.assert;function s(e,t){if(e instanceof s)return e;if(this._importDER(e,t))return;f(e.r&&e.s,"Signature without r or s");this.r=new i(e.r,16);this.s=new i(e.s,16);if(e.recoveryParam!==null)this.recoveryParam=e.recoveryParam;else this.recoveryParam=null}t.exports=s;function o(){this.place=0}function c(e,t){var r=e[t.place++];if(!(r&128)){return r}var i=r&15;var n=0;for(var a=0,f=t.place;a<i;a++,f++){n<<=8;n|=e[f]}t.place=f;return n}function h(e){var t=0;var r=e.length-1;while(!e[t]&&!(e[t+1]&128)&&t<r){t++}if(t===0){return e}return e.slice(t)}s.prototype._importDER=function u(e,t){e=a.toArray(e,t);var r=new o;if(e[r.place++]!==48){return false}var n=c(e,r);if(n+r.place!==e.length){return false}if(e[r.place++]!==2){return false}var f=c(e,r);var s=e.slice(r.place,f+r.place);r.place+=f;if(e[r.place++]!==2){return false}var h=c(e,r);if(e.length!==h+r.place){return false}var d=e.slice(r.place,h+r.place);if(s[0]===0&&s[1]&128){s=s.slice(1)}if(d[0]===0&&d[1]&128){d=d.slice(1)}this.r=new i(s);this.s=new i(d);this.recoveryParam=null;return true};function d(e,t){if(t<128){e.push(t);return}var r=1+(Math.log(t)/Math.LN2>>>3);e.push(r|128);while(--r){e.push(t>>>(r<<3)&255)}e.push(t)}s.prototype.toDER=function l(e){var t=this.r.toArray();var r=this.s.toArray();if(t[0]&128)t=[0].concat(t);if(r[0]&128)r=[0].concat(r);t=h(t);r=h(r);while(!r[0]&&!(r[1]&128)){r=r.slice(1)}var i=[2];d(i,t.length);i=i.concat(t);i.push(2);d(i,r.length);var n=i.concat(r);var f=[48];d(f,n.length);f=f.concat(n);return a.encode(f,e)}},{"../../elliptic":65,"bn.js":17}],75:[function(e,t,r){"use strict";var i=e("hash.js");var n=e("../../elliptic");var a=n.utils;var f=a.assert;var s=a.parseBytes;var o=e("./key");var c=e("./signature");function h(e){f(e==="ed25519","only tested with ed25519 so far");if(!(this instanceof h))return new h(e);var e=n.curves[e].curve;this.curve=e;this.g=e.g;this.g.precompute(e.n.bitLength()+1);this.pointClass=e.point().constructor;this.encodingLength=Math.ceil(e.n.bitLength()/8);this.hash=i.sha512}t.exports=h;h.prototype.sign=function d(e,t){e=s(e);var r=this.keyFromSecret(t);var i=this.hashInt(r.messagePrefix(),e);var n=this.g.mul(i);var a=this.encodePoint(n);var f=this.hashInt(a,r.pubBytes(),e).mul(r.priv());var o=i.add(f).umod(this.curve.n);return this.makeSignature({R:n,S:o,Rencoded:a})};h.prototype.verify=function u(e,t,r){e=s(e);t=this.makeSignature(t);var i=this.keyFromPublic(r);var n=this.hashInt(t.Rencoded(),i.pubBytes(),e);var a=this.g.mul(t.S());var f=t.R().add(i.pub().mul(n));return f.eq(a)};h.prototype.hashInt=function l(){var e=this.hash();for(var t=0;t<arguments.length;t++)e.update(arguments[t]);return a.intFromLE(e.digest()).umod(this.curve.n)};h.prototype.keyFromPublic=function p(e){return o.fromPublic(this,e)};h.prototype.keyFromSecret=function b(e){return o.fromSecret(this,e)};h.prototype.makeSignature=function v(e){if(e instanceof c)return e;return new c(this,e)};h.prototype.encodePoint=function y(e){var t=e.getY().toArray("le",this.encodingLength);t[this.encodingLength-1]|=e.getX().isOdd()?128:0;return t};h.prototype.decodePoint=function g(e){e=a.parseBytes(e);var t=e.length-1;var r=e.slice(0,t).concat(e[t]&~128);var i=(e[t]&128)!==0;var n=a.intFromLE(r);return this.curve.pointFromY(n,i)};h.prototype.encodeInt=function m(e){return e.toArray("le",this.encodingLength)};h.prototype.decodeInt=function w(e){return a.intFromLE(e)};h.prototype.isPoint=function _(e){return e instanceof this.pointClass}},{"../../elliptic":65,"./key":76,"./signature":77,"hash.js":84}],76:[function(e,t,r){"use strict";var i=e("../../elliptic");var n=i.utils;var a=n.assert;var f=n.parseBytes;var s=n.cachedProperty;function o(e,t){this.eddsa=e;this._secret=f(t.secret);if(e.isPoint(t.pub))this._pub=t.pub;else this._pubBytes=f(t.pub)}o.fromPublic=function c(e,t){if(t instanceof o)return t;return new o(e,{pub:t})};o.fromSecret=function h(e,t){if(t instanceof o)return t;return new o(e,{secret:t})};o.prototype.secret=function d(){return this._secret};s(o,function u(){return this.eddsa.encodePoint(this.pub())});s(o,function l(){if(this._pubBytes)return this.eddsa.decodePoint(this._pubBytes);return this.eddsa.g.mul(this.priv())});s(o,function p(){var e=this.eddsa;var t=this.hash();var r=e.encodingLength-1;var i=t.slice(0,e.encodingLength);i[0]&=248;i[r]&=127;i[r]|=64;return i});s(o,function b(){return this.eddsa.decodeInt(this.privBytes())});s(o,function v(){return this.eddsa.hash().update(this.secret()).digest()});s(o,function y(){return this.hash().slice(this.eddsa.encodingLength)});o.prototype.sign=function g(e){a(this._secret,"KeyPair can only verify");return this.eddsa.sign(e,this)};o.prototype.verify=function m(e,t){return this.eddsa.verify(e,t,this)};o.prototype.getSecret=function w(e){a(this._secret,"KeyPair is public only");return n.encode(this.secret(),e)};o.prototype.getPublic=function _(e){return n.encode(this.pubBytes(),e)};t.exports=o},{"../../elliptic":65}],77:[function(e,t,r){"use strict";var i=e("bn.js");var n=e("../../elliptic");var a=n.utils;var f=a.assert;var s=a.cachedProperty;var o=a.parseBytes;function c(e,t){this.eddsa=e;if(typeof t!=="object")t=o(t);if(Array.isArray(t)){t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}}f(t.R&&t.S,"Signature without R or S");if(e.isPoint(t.R))this._R=t.R;if(t.S instanceof i)this._S=t.S;this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded;this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}s(c,function h(){return this.eddsa.decodeInt(this.Sencoded())});s(c,function d(){return this.eddsa.decodePoint(this.Rencoded())});s(c,function u(){return this.eddsa.encodePoint(this.R())});s(c,function l(){return this.eddsa.encodeInt(this.S())});c.prototype.toBytes=function p(){return this.Rencoded().concat(this.Sencoded())};c.prototype.toHex=function b(){return a.encode(this.toBytes(),"hex").toUpperCase()};t.exports=c},{"../../elliptic":65,"bn.js":17}],78:[function(e,t,r){"use strict";var i=e("hash.js");var n=e("../elliptic");var a=n.utils;var f=a.assert;function s(e){if(!(this instanceof s))return new s(e);this.hash=e.hash;this.predResist=!!e.predResist;this.outLen=this.hash.outSize;this.minEntropy=e.minEntropy||this.hash.hmacStrength;this.reseed=null;this.reseedInterval=null;this.K=null;this.V=null;var t=a.toArray(e.entropy,e.entropyEnc);var r=a.toArray(e.nonce,e.nonceEnc);var i=a.toArray(e.pers,e.persEnc);f(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits");this._init(t,r,i)}t.exports=s;s.prototype._init=function o(e,t,r){var i=e.concat(t).concat(r);this.K=new Array(this.outLen/8);this.V=new Array(this.outLen/8);for(var n=0;n<this.V.length;n++){this.K[n]=0;this.V[n]=1}this._update(i);this.reseed=1;this.reseedInterval=281474976710656};s.prototype._hmac=function c(){return new i.hmac(this.hash,this.K)};s.prototype._update=function h(e){var t=this._hmac().update(this.V).update([0]);if(e)t=t.update(e);this.K=t.digest();this.V=this._hmac().update(this.V).digest();if(!e)return;this.K=this._hmac().update(this.V).update([1]).update(e).digest();this.V=this._hmac().update(this.V).digest()};s.prototype.reseed=function d(e,t,r,i){if(typeof t!=="string"){i=r;r=t;t=null}e=a.toBuffer(e,t);r=a.toBuffer(r,i);f(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits");this._update(e.concat(r||[]));this.reseed=1};s.prototype.generate=function u(e,t,r,i){if(this.reseed>this.reseedInterval)throw new Error("Reseed is required");if(typeof t!=="string"){i=r;r=t;t=null}if(r){r=a.toArray(r,i);this._update(r)}var n=[];while(n.length<e){this.V=this._hmac().update(this.V).digest();n=n.concat(this.V)}var f=n.slice(0,e);this._update(r);this.reseed++;return a.encode(f,t)}},{"../elliptic":65,"hash.js":84}],79:[function(e,t,r){t.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]
|
|
}}},{}],80:[function(e,t,r){"use strict";var i=r;var n=e("bn.js");i.assert=function l(e,t){if(!e)throw new Error(t||"Assertion failed")};function a(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if(typeof e!=="string"){for(var i=0;i<e.length;i++)r[i]=e[i]|0;return r}if(!t){for(var i=0;i<e.length;i++){var n=e.charCodeAt(i);var a=n>>8;var f=n&255;if(a)r.push(a,f);else r.push(f)}}else if(t==="hex"){e=e.replace(/[^a-z0-9]+/gi,"");if(e.length%2!==0)e="0"+e;for(var i=0;i<e.length;i+=2)r.push(parseInt(e[i]+e[i+1],16))}return r}i.toArray=a;function f(e){if(e.length===1)return"0"+e;else return e}i.zero2=f;function s(e){var t="";for(var r=0;r<e.length;r++)t+=f(e[r].toString(16));return t}i.toHex=s;i.encode=function p(e,t){if(t==="hex")return s(e);else return e};function o(e,t){var r=[];var i=1<<t+1;var n=e.clone();while(n.cmpn(1)>=0){var a;if(n.isOdd()){var f=n.andln(i-1);if(f>(i>>1)-1)a=(i>>1)-f;else a=f;n.isubn(a)}else{a=0}r.push(a);var s=n.cmpn(0)!==0&&n.andln(i-1)===0?t+1:1;for(var o=1;o<s;o++)r.push(0);n.iushrn(s)}return r}i.getNAF=o;function c(e,t){var r=[[],[]];e=e.clone();t=t.clone();var i=0;var n=0;while(e.cmpn(-i)>0||t.cmpn(-n)>0){var a=e.andln(3)+i&3;var f=t.andln(3)+n&3;if(a===3)a=-1;if(f===3)f=-1;var s;if((a&1)===0){s=0}else{var o=e.andln(7)+i&7;if((o===3||o===5)&&f===2)s=-a;else s=a}r[0].push(s);var c;if((f&1)===0){c=0}else{var o=t.andln(7)+n&7;if((o===3||o===5)&&a===2)c=-f;else c=f}r[1].push(c);if(2*i===s+1)i=1-i;if(2*n===c+1)n=1-n;e.iushrn(1);t.iushrn(1)}return r}i.getJSF=c;function h(e,t){var r=t.name;var i="_"+r;e.prototype[r]=function n(){return this[i]!==undefined?this[i]:this[i]=t.call(this)}}i.cachedProperty=h;function d(e){return typeof e==="string"?i.toArray(e,"hex"):e}i.parseBytes=d;function u(e){return new n(e,"hex","le")}i.intFromLE=u},{"bn.js":17}],81:[function(e,t,r){t.exports={_args:[["elliptic@^6.0.0","/Users/david/Documents/code/ipfs/libp2p/node/peer-id/node_modules/browserify-sign"]],_from:"elliptic@>=6.0.0 <7.0.0",_id:"elliptic@6.0.1",_inCache:true,_installable:true,_location:"/elliptic",_nodeVersion:"5.0.0",_npmUser:{email:"fedor@indutny.com",name:"indutny"},_npmVersion:"3.3.6",_phantomChildren:{},_requested:{name:"elliptic",raw:"elliptic@^6.0.0",rawSpec:"^6.0.0",scope:null,spec:">=6.0.0 <7.0.0",type:"range"},_requiredBy:["/browserify-sign","/create-ecdh"],_resolved:"https://registry.npmjs.org/elliptic/-/elliptic-6.0.1.tgz",_shasum:"91d573ecb2a3c274b8c07e0d1f35ff19f07e6978",_shrinkwrap:null,_spec:"elliptic@^6.0.0",_where:"/Users/david/Documents/code/ipfs/libp2p/node/peer-id/node_modules/browserify-sign",author:{email:"fedor@indutny.com",name:"Fedor Indutny"},bugs:{url:"https://github.com/indutny/elliptic/issues"},dependencies:{"bn.js":"^4.0.0",brorand:"^1.0.1","hash.js":"^1.0.0",inherits:"^2.0.1"},description:"EC cryptography",devDependencies:{browserify:"^3.44.2",coveralls:"^2.11.3",istanbul:"^0.3.17",jscs:"^1.11.3",jshint:"^2.6.0",mocha:"^2.1.0","uglify-js":"^2.4.13"},directories:{},dist:{shasum:"91d573ecb2a3c274b8c07e0d1f35ff19f07e6978",tarball:"http://registry.npmjs.org/elliptic/-/elliptic-6.0.1.tgz"},gitHead:"a9eb628eec9a2f562e67947c5417e9b2435d0a2d",homepage:"https://github.com/indutny/elliptic",keywords:["Cryptography","EC","Elliptic","curve"],license:"MIT",main:"lib/elliptic.js",maintainers:[{name:"indutny",email:"fedor@indutny.com"}],name:"elliptic",optionalDependencies:{},repository:{type:"git",url:"git+ssh://git@github.com/indutny/elliptic.git"},scripts:{coveralls:"cat ./coverage/lcov.info | coveralls",test:"make lint && istanbul test _mocha --reporter=spec test/*-test.js"},version:"6.0.1"}},{}],82:[function(e,t,r){function i(){this._events=this._events||{};this._maxListeners=this._maxListeners||undefined}t.exports=i;i.EventEmitter=i;i.prototype._events=undefined;i.prototype._maxListeners=undefined;i.defaultMaxListeners=10;i.prototype.setMaxListeners=function(e){if(!a(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");this._maxListeners=e;return this};i.prototype.emit=function(e){var t,r,i,a,o,c;if(!this._events)this._events={};if(e==="error"){if(!this._events.error||f(this._events.error)&&!this._events.error.length){t=arguments[1];if(t instanceof Error){throw t}throw TypeError('Uncaught, unspecified "error" event.')}}r=this._events[e];if(s(r))return false;if(n(r)){switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:i=arguments.length;a=new Array(i-1);for(o=1;o<i;o++)a[o-1]=arguments[o];r.apply(this,a)}}else if(f(r)){i=arguments.length;a=new Array(i-1);for(o=1;o<i;o++)a[o-1]=arguments[o];c=r.slice();i=c.length;for(o=0;o<i;o++)c[o].apply(this,a)}return true};i.prototype.addListener=function(e,t){var r;if(!n(t))throw TypeError("listener must be a function");if(!this._events)this._events={};if(this._events.newListener)this.emit("newListener",e,n(t.listener)?t.listener:t);if(!this._events[e])this._events[e]=t;else if(f(this._events[e]))this._events[e].push(t);else this._events[e]=[this._events[e],t];if(f(this._events[e])&&!this._events[e].warned){var r;if(!s(this._maxListeners)){r=this._maxListeners}else{r=i.defaultMaxListeners}if(r&&r>0&&this._events[e].length>r){this._events[e].warned=true;console.error("(node) warning: possible EventEmitter memory "+"leak detected. %d listeners added. "+"Use emitter.setMaxListeners() to increase limit.",this._events[e].length);if(typeof console.trace==="function"){console.trace()}}}return this};i.prototype.on=i.prototype.addListener;i.prototype.once=function(e,t){if(!n(t))throw TypeError("listener must be a function");var r=false;function i(){this.removeListener(e,i);if(!r){r=true;t.apply(this,arguments)}}i.listener=t;this.on(e,i);return this};i.prototype.removeListener=function(e,t){var r,i,a,s;if(!n(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;r=this._events[e];a=r.length;i=-1;if(r===t||n(r.listener)&&r.listener===t){delete this._events[e];if(this._events.removeListener)this.emit("removeListener",e,t)}else if(f(r)){for(s=a;s-->0;){if(r[s]===t||r[s].listener&&r[s].listener===t){i=s;break}}if(i<0)return this;if(r.length===1){r.length=0;delete this._events[e]}else{r.splice(i,1)}if(this._events.removeListener)this.emit("removeListener",e,t)}return this};i.prototype.removeAllListeners=function(e){var t,r;if(!this._events)return this;if(!this._events.removeListener){if(arguments.length===0)this._events={};else if(this._events[e])delete this._events[e];return this}if(arguments.length===0){for(t in this._events){if(t==="removeListener")continue;this.removeAllListeners(t)}this.removeAllListeners("removeListener");this._events={};return this}r=this._events[e];if(n(r)){this.removeListener(e,r)}else{while(r.length)this.removeListener(e,r[r.length-1])}delete this._events[e];return this};i.prototype.listeners=function(e){var t;if(!this._events||!this._events[e])t=[];else if(n(this._events[e]))t=[this._events[e]];else t=this._events[e].slice();return t};i.listenerCount=function(e,t){var r;if(!e._events||!e._events[t])r=0;else if(n(e._events[t]))r=1;else r=e._events[t].length;return r};function n(e){return typeof e==="function"}function a(e){return typeof e==="number"}function f(e){return typeof e==="object"&&e!==null}function s(e){return e===void 0}},{}],83:[function(e,t,r){(function(r){var i=e("create-hash/md5");t.exports=n;function n(e,t,n,a){if(!r.isBuffer(e)){e=new r(e,"binary")}if(t&&!r.isBuffer(t)){t=new r(t,"binary")}n=n/8;a=a||0;var f=0;var s=0;var o=new r(n);var c=new r(a);var h=0;var d;var u;var l=[];while(true){if(h++>0){l.push(d)}l.push(e);if(t){l.push(t)}d=i(r.concat(l));l=[];u=0;if(n>0){while(true){if(n===0){break}if(u===d.length){break}o[f++]=d[u];n--;u++}}if(a>0&&u!==d.length){while(true){if(a===0){break}if(u===d.length){break}c[s++]=d[u];a--;u++}}if(n===0&&a===0){break}}for(u=0;u<d.length;u++){d[u]=0}return{key:o,iv:c}}}).call(this,e("buffer").Buffer)},{buffer:46,"create-hash/md5":52}],84:[function(e,t,r){var i=r;i.utils=e("./hash/utils");i.common=e("./hash/common");i.sha=e("./hash/sha");i.ripemd=e("./hash/ripemd");i.hmac=e("./hash/hmac");i.sha1=i.sha.sha1;i.sha256=i.sha.sha256;i.sha224=i.sha.sha224;i.sha384=i.sha.sha384;i.sha512=i.sha.sha512;i.ripemd160=i.ripemd.ripemd160},{"./hash/common":85,"./hash/hmac":86,"./hash/ripemd":87,"./hash/sha":88,"./hash/utils":89}],85:[function(e,t,r){var i=e("../hash");var n=i.utils;var a=n.assert;function f(){this.pending=null;this.pendingTotal=0;this.blockSize=this.constructor.blockSize;this.outSize=this.constructor.outSize;this.hmacStrength=this.constructor.hmacStrength;this.padLength=this.constructor.padLength/8;this.endian="big";this._delta8=this.blockSize/8;this._delta32=this.blockSize/32}r.BlockHash=f;f.prototype.update=function s(e,t){e=n.toArray(e,t);if(!this.pending)this.pending=e;else this.pending=this.pending.concat(e);this.pendingTotal+=e.length;if(this.pending.length>=this._delta8){e=this.pending;var r=e.length%this._delta8;this.pending=e.slice(e.length-r,e.length);if(this.pending.length===0)this.pending=null;e=n.join32(e,0,e.length-r,this.endian);for(var i=0;i<e.length;i+=this._delta32)this._update(e,i,i+this._delta32)}return this};f.prototype.digest=function o(e){this.update(this._pad());a(this.pending===null);return this._digest(e)};f.prototype._pad=function c(){var e=this.pendingTotal;var t=this._delta8;var r=t-(e+this.padLength)%t;var i=new Array(r+this.padLength);i[0]=128;for(var n=1;n<r;n++)i[n]=0;e<<=3;if(this.endian==="big"){for(var a=8;a<this.padLength;a++)i[n++]=0;i[n++]=0;i[n++]=0;i[n++]=0;i[n++]=0;i[n++]=e>>>24&255;i[n++]=e>>>16&255;i[n++]=e>>>8&255;i[n++]=e&255}else{i[n++]=e&255;i[n++]=e>>>8&255;i[n++]=e>>>16&255;i[n++]=e>>>24&255;i[n++]=0;i[n++]=0;i[n++]=0;i[n++]=0;for(var a=8;a<this.padLength;a++)i[n++]=0}return i}},{"../hash":84}],86:[function(e,t,r){var i=r;var n=e("../hash");var a=n.utils;var f=a.assert;function s(e,t,r){if(!(this instanceof s))return new s(e,t,r);this.Hash=e;this.blockSize=e.blockSize/8;this.outSize=e.outSize/8;this.inner=null;this.outer=null;this._init(a.toArray(t,r))}t.exports=s;s.prototype._init=function o(e){if(e.length>this.blockSize)e=(new this.Hash).update(e).digest();f(e.length<=this.blockSize);for(var t=e.length;t<this.blockSize;t++)e.push(0);for(var t=0;t<e.length;t++)e[t]^=54;this.inner=(new this.Hash).update(e);for(var t=0;t<e.length;t++)e[t]^=106;this.outer=(new this.Hash).update(e)};s.prototype.update=function c(e,t){this.inner.update(e,t);return this};s.prototype.digest=function h(e){this.outer.update(this.inner.digest());return this.outer.digest(e)}},{"../hash":84}],87:[function(e,t,r){var i=e("../hash");var n=i.utils;var a=n.rotl32;var f=n.sum32;var s=n.sum32_3;var o=n.sum32_4;var c=i.common.BlockHash;function h(){if(!(this instanceof h))return new h;c.call(this);this.h=[1732584193,4023233417,2562383102,271733878,3285377520];this.endian="little"}n.inherits(h,c);r.ripemd160=h;h.blockSize=512;h.outSize=160;h.hmacStrength=192;h.padLength=64;h.prototype._update=function g(e,t){var r=this.h[0];var i=this.h[1];var n=this.h[2];var c=this.h[3];var h=this.h[4];var g=r;var m=i;var w=n;var _=c;var S=h;for(var E=0;E<80;E++){var B=f(a(o(r,d(E,i,n,c),e[p[E]+t],u(E)),v[E]),h);r=h;h=c;c=a(n,10);n=i;i=B;B=f(a(o(g,d(79-E,m,w,_),e[b[E]+t],l(E)),y[E]),S);g=S;S=_;_=a(w,10);w=m;m=B}B=s(this.h[1],n,_);this.h[1]=s(this.h[2],c,S);this.h[2]=s(this.h[3],h,g);this.h[3]=s(this.h[4],r,m);this.h[4]=s(this.h[0],i,w);this.h[0]=B};h.prototype._digest=function m(e){if(e==="hex")return n.toHex32(this.h,"little");else return n.split32(this.h,"little")};function d(e,t,r,i){if(e<=15)return t^r^i;else if(e<=31)return t&r|~t&i;else if(e<=47)return(t|~r)^i;else if(e<=63)return t&i|r&~i;else return t^(r|~i)}function u(e){if(e<=15)return 0;else if(e<=31)return 1518500249;else if(e<=47)return 1859775393;else if(e<=63)return 2400959708;else return 2840853838}function l(e){if(e<=15)return 1352829926;else if(e<=31)return 1548603684;else if(e<=47)return 1836072691;else if(e<=63)return 2053994217;else return 0}var p=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13];var b=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11];var v=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6];var y=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},{"../hash":84}],88:[function(e,t,r){var i=e("../hash");var n=i.utils;var a=n.assert;var f=n.rotr32;var s=n.rotl32;var o=n.sum32;var c=n.sum32_4;var h=n.sum32_5;var d=n.rotr64_hi;var u=n.rotr64_lo;var l=n.shr64_hi;var p=n.shr64_lo;var b=n.sum64;var v=n.sum64_hi;var y=n.sum64_lo;var g=n.sum64_4_hi;var m=n.sum64_4_lo;var w=n.sum64_5_hi;var _=n.sum64_5_lo;var S=i.common.BlockHash;var E=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];var B=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];var A=[1518500249,1859775393,2400959708,3395469782];function I(){if(!(this instanceof I))return new I;S.call(this);this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225];this.k=E;this.W=new Array(64)}n.inherits(I,S);r.sha256=I;I.blockSize=512;I.outSize=256;I.hmacStrength=192;I.padLength=64;I.prototype._update=function Z(e,t){var r=this.W;for(var i=0;i<16;i++)r[i]=e[t+i];for(;i<r.length;i++)r[i]=c(q(r[i-2]),r[i-7],j(r[i-15]),r[i-16]);var n=this.h[0];var f=this.h[1];var s=this.h[2];var d=this.h[3];var u=this.h[4];var l=this.h[5];var p=this.h[6];var b=this.h[7];a(this.k.length===r.length);for(var i=0;i<r.length;i++){var v=h(b,L(u),C(u,l,p),this.k[i],r[i]);var y=o(D(n),M(n,f,s));b=p;p=l;l=u;u=o(d,v);d=s;s=f;f=n;n=o(v,y)}this.h[0]=o(this.h[0],n);this.h[1]=o(this.h[1],f);this.h[2]=o(this.h[2],s);this.h[3]=o(this.h[3],d);this.h[4]=o(this.h[4],u);this.h[5]=o(this.h[5],l);this.h[6]=o(this.h[6],p);this.h[7]=o(this.h[7],b)};I.prototype._digest=function Q(e){if(e==="hex")return n.toHex32(this.h,"big");else return n.split32(this.h,"big")};function k(){if(!(this instanceof k))return new k;I.call(this);this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}n.inherits(k,I);r.sha224=k;k.blockSize=512;k.outSize=224;k.hmacStrength=192;k.padLength=64;k.prototype._digest=function $(e){if(e==="hex")return n.toHex32(this.h.slice(0,7),"big");else return n.split32(this.h.slice(0,7),"big")};function x(){if(!(this instanceof x))return new x;S.call(this);this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209];this.k=B;this.W=new Array(160)}n.inherits(x,S);r.sha512=x;x.blockSize=1024;x.outSize=512;x.hmacStrength=192;x.padLength=128;x.prototype._prepareBlock=function ee(e,t){var r=this.W;for(var i=0;i<32;i++)r[i]=e[t+i];for(;i<r.length;i+=2){var n=G(r[i-4],r[i-3]);var a=J(r[i-4],r[i-3]);var f=r[i-14];var s=r[i-13];var o=X(r[i-30],r[i-29]);var c=W(r[i-30],r[i-29]);var h=r[i-32];var d=r[i-31];r[i]=g(n,a,f,s,o,c,h,d);r[i+1]=m(n,a,f,s,o,c,h,d)}};x.prototype._update=function te(e,t){this._prepareBlock(e,t);var r=this.W;var i=this.h[0];var n=this.h[1];var f=this.h[2];var s=this.h[3];var o=this.h[4];var c=this.h[5];var h=this.h[6];var d=this.h[7];var u=this.h[8];var l=this.h[9];var p=this.h[10];var g=this.h[11];var m=this.h[12];var S=this.h[13];var E=this.h[14];var B=this.h[15];a(this.k.length===r.length);for(var A=0;A<r.length;A+=2){var I=E;var k=B;var x=H(u,l);var R=Y(u,l);var T=O(u,l,p,g,m,S);var C=U(u,l,p,g,m,S);var M=this.k[A];var P=this.k[A+1];var D=r[A];var L=r[A+1];var j=w(I,k,x,R,T,C,M,P,D,L);var q=_(I,k,x,R,T,C,M,P,D,L);var I=F(i,n);var k=V(i,n);var x=z(i,n,f,s,o,c);var R=K(i,n,f,s,o,c);var N=v(I,k,x,R);var X=y(I,k,x,R);E=m;B=S;m=p;S=g;p=u;g=l;u=v(h,d,j,q);l=y(d,d,j,q);h=o;d=c;o=f;c=s;f=i;s=n;i=v(j,q,N,X);n=y(j,q,N,X)}b(this.h,0,i,n);b(this.h,2,f,s);b(this.h,4,o,c);b(this.h,6,h,d);b(this.h,8,u,l);b(this.h,10,p,g);b(this.h,12,m,S);b(this.h,14,E,B)};x.prototype._digest=function re(e){if(e==="hex")return n.toHex32(this.h,"big");else return n.split32(this.h,"big")};function R(){if(!(this instanceof R))return new R;x.call(this);this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}n.inherits(R,x);r.sha384=R;R.blockSize=1024;R.outSize=384;R.hmacStrength=192;R.padLength=128;R.prototype._digest=function ie(e){if(e==="hex")return n.toHex32(this.h.slice(0,12),"big");else return n.split32(this.h.slice(0,12),"big")};function T(){if(!(this instanceof T))return new T;S.call(this);this.h=[1732584193,4023233417,2562383102,271733878,3285377520];this.W=new Array(80)}n.inherits(T,S);r.sha1=T;T.blockSize=512;T.outSize=160;T.hmacStrength=80;T.padLength=64;T.prototype._update=function ne(e,t){var r=this.W;for(var i=0;i<16;i++)r[i]=e[t+i];for(;i<r.length;i++)r[i]=s(r[i-3]^r[i-8]^r[i-14]^r[i-16],1);var n=this.h[0];var a=this.h[1];var f=this.h[2];var c=this.h[3];var d=this.h[4];for(var i=0;i<r.length;i++){var u=~~(i/20);var l=h(s(n,5),N(u,a,f,c),d,r[i],A[u]);d=c;c=f;f=s(a,30);a=n;n=l}this.h[0]=o(this.h[0],n);this.h[1]=o(this.h[1],a);this.h[2]=o(this.h[2],f);this.h[3]=o(this.h[3],c);this.h[4]=o(this.h[4],d)};T.prototype._digest=function ae(e){if(e==="hex")return n.toHex32(this.h,"big");else return n.split32(this.h,"big")};function C(e,t,r){return e&t^~e&r}function M(e,t,r){return e&t^e&r^t&r}function P(e,t,r){return e^t^r}function D(e){return f(e,2)^f(e,13)^f(e,22)}function L(e){return f(e,6)^f(e,11)^f(e,25)}function j(e){return f(e,7)^f(e,18)^e>>>3}function q(e){return f(e,17)^f(e,19)^e>>>10}function N(e,t,r,i){if(e===0)return C(t,r,i);if(e===1||e===3)return P(t,r,i);if(e===2)return M(t,r,i)}function O(e,t,r,i,n,a){var f=e&r^~e&n;if(f<0)f+=4294967296;return f}function U(e,t,r,i,n,a){var f=t&i^~t&a;if(f<0)f+=4294967296;return f}function z(e,t,r,i,n,a){var f=e&r^e&n^r&n;if(f<0)f+=4294967296;return f}function K(e,t,r,i,n,a){var f=t&i^t&a^i&a;if(f<0)f+=4294967296;return f}function F(e,t){var r=d(e,t,28);var i=d(t,e,2);var n=d(t,e,7);var a=r^i^n;if(a<0)a+=4294967296;return a}function V(e,t){var r=u(e,t,28);var i=u(t,e,2);var n=u(t,e,7);var a=r^i^n;if(a<0)a+=4294967296;return a}function H(e,t){var r=d(e,t,14);var i=d(e,t,18);var n=d(t,e,9);var a=r^i^n;if(a<0)a+=4294967296;return a}function Y(e,t){var r=u(e,t,14);var i=u(e,t,18);var n=u(t,e,9);var a=r^i^n;if(a<0)a+=4294967296;return a}function X(e,t){var r=d(e,t,1);var i=d(e,t,8);var n=l(e,t,7);var a=r^i^n;if(a<0)a+=4294967296;return a}function W(e,t){var r=u(e,t,1);var i=u(e,t,8);var n=p(e,t,7);var a=r^i^n;if(a<0)a+=4294967296;return a}function G(e,t){var r=d(e,t,19);var i=d(t,e,29);var n=l(e,t,6);var a=r^i^n;if(a<0)a+=4294967296;return a}function J(e,t){var r=u(e,t,19);var i=u(t,e,29);var n=p(e,t,6);var a=r^i^n;if(a<0)a+=4294967296;return a}},{"../hash":84}],89:[function(e,t,r){var i=r;var n=e("inherits");function a(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if(typeof e==="string"){if(!t){for(var i=0;i<e.length;i++){var n=e.charCodeAt(i);var a=n>>8;var f=n&255;if(a)r.push(a,f);else r.push(f)}}else if(t==="hex"){e=e.replace(/[^a-z0-9]+/gi,"");if(e.length%2!==0)e="0"+e;for(var i=0;i<e.length;i+=2)r.push(parseInt(e[i]+e[i+1],16))}}else{for(var i=0;i<e.length;i++)r[i]=e[i]|0}return r}i.toArray=a;function f(e){var t="";for(var r=0;r<e.length;r++)t+=c(e[r].toString(16));return t}i.toHex=f;function s(e){var t=e>>>24|e>>>8&65280|e<<8&16711680|(e&255)<<24;return t>>>0}i.htonl=s;function o(e,t){var r="";for(var i=0;i<e.length;i++){var n=e[i];if(t==="little")n=s(n);r+=h(n.toString(16))}return r}i.toHex32=o;function c(e){if(e.length===1)return"0"+e;else return e}i.zero2=c;function h(e){if(e.length===7)return"0"+e;else if(e.length===6)return"00"+e;else if(e.length===5)return"000"+e;else if(e.length===4)return"0000"+e;else if(e.length===3)return"00000"+e;else if(e.length===2)return"000000"+e;else if(e.length===1)return"0000000"+e;else return e}i.zero8=h;function d(e,t,r,i){var n=r-t;m(n%4===0);var a=new Array(n/4);for(var f=0,s=t;f<a.length;f++,s+=4){var o;if(i==="big")o=e[s]<<24|e[s+1]<<16|e[s+2]<<8|e[s+3];else o=e[s+3]<<24|e[s+2]<<16|e[s+1]<<8|e[s];a[f]=o>>>0}return a}i.join32=d;function u(e,t){var r=new Array(e.length*4);for(var i=0,n=0;i<e.length;i++,n+=4){var a=e[i];if(t==="big"){r[n]=a>>>24;r[n+1]=a>>>16&255;r[n+2]=a>>>8&255;r[n+3]=a&255}else{r[n+3]=a>>>24;r[n+2]=a>>>16&255;r[n+1]=a>>>8&255;r[n]=a&255}}return r}i.split32=u;function l(e,t){return e>>>t|e<<32-t}i.rotr32=l;function p(e,t){return e<<t|e>>>32-t}i.rotl32=p;function b(e,t){return e+t>>>0}i.sum32=b;function v(e,t,r){return e+t+r>>>0}i.sum32_3=v;function y(e,t,r,i){return e+t+r+i>>>0}i.sum32_4=y;function g(e,t,r,i,n){return e+t+r+i+n>>>0}i.sum32_5=g;function m(e,t){if(!e)throw new Error(t||"Assertion failed")}i.assert=m;i.inherits=n;function w(e,t,r,i){var n=e[t];var a=e[t+1];var f=i+a>>>0;var s=(f<i?1:0)+r+n;e[t]=s>>>0;e[t+1]=f}r.sum64=w;function _(e,t,r,i){var n=t+i>>>0;var a=(n<t?1:0)+e+r;return a>>>0}r.sum64_hi=_;function S(e,t,r,i){var n=t+i;return n>>>0}r.sum64_lo=S;function E(e,t,r,i,n,a,f,s){var o=0;var c=t;c=c+i>>>0;o+=c<t?1:0;c=c+a>>>0;o+=c<a?1:0;c=c+s>>>0;o+=c<s?1:0;var h=e+r+n+f+o;return h>>>0}r.sum64_4_hi=E;function B(e,t,r,i,n,a,f,s){var o=t+i+a+s;return o>>>0}r.sum64_4_lo=B;function A(e,t,r,i,n,a,f,s,o,c){var h=0;var d=t;d=d+i>>>0;h+=d<t?1:0;d=d+a>>>0;h+=d<a?1:0;d=d+s>>>0;h+=d<s?1:0;d=d+c>>>0;h+=d<c?1:0;var u=e+r+n+f+o+h;return u>>>0}r.sum64_5_hi=A;function I(e,t,r,i,n,a,f,s,o,c){var h=t+i+a+s+c;return h>>>0}r.sum64_5_lo=I;function k(e,t,r){var i=t<<32-r|e>>>r;return i>>>0}r.rotr64_hi=k;function x(e,t,r){var i=e<<32-r|t>>>r;return i>>>0}r.rotr64_lo=x;function R(e,t,r){return e>>>r}r.shr64_hi=R;function T(e,t,r){var i=e<<32-r|t>>>r;return i>>>0}r.shr64_lo=T},{inherits:92}],90:[function(e,t,r){r.read=function(e,t,r,i,n){var a,f;var s=n*8-i-1;var o=(1<<s)-1;var c=o>>1;var h=-7;var d=r?n-1:0;var u=r?-1:1;var l=e[t+d];d+=u;a=l&(1<<-h)-1;l>>=-h;h+=s;for(;h>0;a=a*256+e[t+d],d+=u,h-=8){}f=a&(1<<-h)-1;a>>=-h;h+=i;for(;h>0;f=f*256+e[t+d],d+=u,h-=8){}if(a===0){a=1-c}else if(a===o){return f?NaN:(l?-1:1)*Infinity}else{f=f+Math.pow(2,i);a=a-c}return(l?-1:1)*f*Math.pow(2,a-i)};r.write=function(e,t,r,i,n,a){var f,s,o;var c=a*8-n-1;var h=(1<<c)-1;var d=h>>1;var u=n===23?Math.pow(2,-24)-Math.pow(2,-77):0;var l=i?0:a-1;var p=i?1:-1;var b=t<0||t===0&&1/t<0?1:0;t=Math.abs(t);if(isNaN(t)||t===Infinity){s=isNaN(t)?1:0;f=h}else{f=Math.floor(Math.log(t)/Math.LN2);if(t*(o=Math.pow(2,-f))<1){f--;o*=2}if(f+d>=1){t+=u/o}else{t+=u*Math.pow(2,1-d)}if(t*o>=2){f++;o/=2}if(f+d>=h){s=0;f=h}else if(f+d>=1){s=(t*o-1)*Math.pow(2,n);f=f+d}else{s=t*Math.pow(2,d-1)*Math.pow(2,n);f=0}}for(;n>=8;e[r+l]=s&255,l+=p,s/=256,n-=8){}f=f<<n|s;c+=n;for(;c>0;e[r+l]=f&255,l+=p,f/=256,c-=8){}e[r+l-p]|=b*128}},{}],91:[function(e,t,r){var i=[].indexOf;t.exports=function(e,t){if(i)return e.indexOf(t);for(var r=0;r<e.length;++r){if(e[r]===t)return r}return-1}},{}],92:[function(e,t,r){if(typeof Object.create==="function"){t.exports=function i(e,t){e.super_=t;e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}})}}else{t.exports=function n(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype;e.prototype=new r;e.prototype.constructor=e}}},{}],93:[function(e,t,r){"use strict";function i(e){var t={};for(var r in e){if(e.hasOwnProperty(r)){t[e[r]]=r}}return t}t.exports=i},{}],94:[function(e,t,r){var i=Array.isArray;var n=Object.prototype.toString;t.exports=i||function(e){return!!e&&"[object Array]"==n.call(e)}},{}],95:[function(e,t,r){t.exports=function(e){return!!(e!=null&&(e._isBuffer||e.constructor&&typeof e.constructor.isBuffer==="function"&&e.constructor.isBuffer(e)))}},{}],96:[function(e,t,r){t.exports=Array.isArray||function(e){return Object.prototype.toString.call(e)=="[object Array]"}},{}],97:[function(e,t,r){(function(e){var r={};var i=r.aes={};var n=r.md={};var a=r.pki={};var f=r.pki.rsa=r.rsa={};var s=r.util={};t.exports=function(e){if(!e)e={};if(typeof e.bits=="undefined")e.bits=2048;var t=r.rsa.generateKeyPair(e);t={"public":o(r.pki.publicKeyToRSAPublicKeyPem(t.publicKey,72)),"private":o(r.pki.privateKeyToPem(t.privateKey,72))};return t};function o(e){return e.replace(/\r/g,"")+"\n"}s.fillString=function(e,t){var r="";while(t>0){if(t&1){r+=e}t>>>=1;if(t>0){e+=e}}return r};var c=r.sha1=r.md.sha1={};var h=null;var d=false;var u=function(){h=String.fromCharCode(128);h+=r.util.fillString(String.fromCharCode(0),64);d=true};var l=function(e,t,r){var i,n,a,f,s,o,c,h;var d=r.length();while(d>=64){n=e.h0;a=e.h1;f=e.h2;s=e.h3;o=e.h4;for(h=0;h<16;++h){i=r.getInt32();t[h]=i;c=s^a&(f^s);i=(n<<5|n>>>27)+c+o+1518500249+i;o=s;s=f;f=a<<30|a>>>2;a=n;n=i}for(;h<20;++h){i=t[h-3]^t[h-8]^t[h-14]^t[h-16];i=i<<1|i>>>31;t[h]=i;c=s^a&(f^s);i=(n<<5|n>>>27)+c+o+1518500249+i;o=s;s=f;f=a<<30|a>>>2;a=n;n=i}for(;h<32;++h){i=t[h-3]^t[h-8]^t[h-14]^t[h-16];i=i<<1|i>>>31;t[h]=i;c=a^f^s;i=(n<<5|n>>>27)+c+o+1859775393+i;o=s;s=f;f=a<<30|a>>>2;a=n;n=i}for(;h<40;++h){i=t[h-6]^t[h-16]^t[h-28]^t[h-32];i=i<<2|i>>>30;t[h]=i;c=a^f^s;i=(n<<5|n>>>27)+c+o+1859775393+i;o=s;s=f;f=a<<30|a>>>2;a=n;n=i}for(;h<60;++h){i=t[h-6]^t[h-16]^t[h-28]^t[h-32];i=i<<2|i>>>30;t[h]=i;c=a&f|s&(a^f);i=(n<<5|n>>>27)+c+o+2400959708+i;o=s;s=f;f=a<<30|a>>>2;a=n;n=i}for(;h<80;++h){i=t[h-6]^t[h-16]^t[h-28]^t[h-32];i=i<<2|i>>>30;t[h]=i;c=a^f^s;i=(n<<5|n>>>27)+c+o+3395469782+i;o=s;s=f;f=a<<30|a>>>2;a=n;n=i}e.h0+=n;e.h1+=a;e.h2+=f;e.h3+=s;e.h4+=o;d-=64}};c.create=function(){if(!d){u()}var e=null;var t=r.util.createBuffer();var i=new Array(80);var n={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0};n.start=function(){n.messageLength=0;t=r.util.createBuffer();e={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878,h4:3285377520}};n.start();n.update=function(a,f){if(f==="utf8"){a=r.util.encodeUtf8(a)}n.messageLength+=a.length;t.putBytes(a);l(e,i,t);if(t.read>2048||t.length()===0){t.compact()}};n.digest=function(){var a=n.messageLength;var f=r.util.createBuffer();f.putBytes(t.bytes());f.putBytes(h.substr(0,64-(a+8)%64));f.putInt32(a>>>29&255);f.putInt32(a<<3&4294967295);var s={h0:e.h0,h1:e.h1,h2:e.h2,h3:e.h3,h4:e.h4};l(s,i,f);var o=r.util.createBuffer();o.putInt32(s.h0);o.putInt32(s.h1);o.putInt32(s.h2);o.putInt32(s.h3);o.putInt32(s.h4);return o};return n};s.ByteBuffer=function(e){this.data=e||"";this.read=0};s.ByteBuffer.prototype.length=function(){return this.data.length-this.read};s.ByteBuffer.prototype.isEmpty=function(){return this.data.length-this.read===0};s.ByteBuffer.prototype.putByte=function(e){this.data+=String.fromCharCode(e)};s.ByteBuffer.prototype.fillWithByte=function(e,t){e=String.fromCharCode(e);var r=this.data;while(t>0){if(t&1){r+=e}t>>>=1;if(t>0){e+=e}}this.data=r};s.ByteBuffer.prototype.putBytes=function(e){this.data+=e};s.ByteBuffer.prototype.putString=function(e){this.data+=s.encodeUtf8(e)};s.ByteBuffer.prototype.putInt16=function(e){this.data+=String.fromCharCode(e>>8&255)+String.fromCharCode(e&255)};s.ByteBuffer.prototype.putInt24=function(e){this.data+=String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(e&255)};s.ByteBuffer.prototype.putInt32=function(e){this.data+=String.fromCharCode(e>>24&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(e&255)};s.ByteBuffer.prototype.putInt16Le=function(e){this.data+=String.fromCharCode(e&255)+String.fromCharCode(e>>8&255)};s.ByteBuffer.prototype.putInt24Le=function(e){this.data+=String.fromCharCode(e&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(e>>16&255)};s.ByteBuffer.prototype.putInt32Le=function(e){this.data+=String.fromCharCode(e&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>24&255)};s.ByteBuffer.prototype.putInt=function(e,t){do{t-=8;this.data+=String.fromCharCode(e>>t&255)}while(t>0)};s.ByteBuffer.prototype.putBuffer=function(e){this.data+=e.getBytes()};s.ByteBuffer.prototype.getByte=function(){return this.data.charCodeAt(this.read++)};s.ByteBuffer.prototype.getInt16=function(){var e=this.data.charCodeAt(this.read)<<8^this.data.charCodeAt(this.read+1);this.read+=2;return e};s.ByteBuffer.prototype.getInt24=function(){var e=this.data.charCodeAt(this.read)<<16^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2);this.read+=3;return e};s.ByteBuffer.prototype.getInt32=function(){var e=this.data.charCodeAt(this.read)<<24^this.data.charCodeAt(this.read+1)<<16^this.data.charCodeAt(this.read+2)<<8^this.data.charCodeAt(this.read+3);this.read+=4;return e};s.ByteBuffer.prototype.getInt16Le=function(){var e=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8;this.read+=2;return e};s.ByteBuffer.prototype.getInt24Le=function(){var e=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16;this.read+=3;return e};s.ByteBuffer.prototype.getInt32Le=function(){var e=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16^this.data.charCodeAt(this.read+3)<<24;this.read+=4;return e};s.ByteBuffer.prototype.getInt=function(e){var t=0;do{t=(t<<e)+this.data.charCodeAt(this.read++);
|
|
e-=8}while(e>0);return t};s.ByteBuffer.prototype.getBytes=function(e){var t;if(e){e=Math.min(this.length(),e);t=this.data.slice(this.read,this.read+e);this.read+=e}else if(e===0){t=""}else{t=this.read===0?this.data:this.data.slice(this.read);this.clear()}return t};s.ByteBuffer.prototype.bytes=function(e){return typeof e==="undefined"?this.data.slice(this.read):this.data.slice(this.read,this.read+e)};s.ByteBuffer.prototype.at=function(e){return this.data.charCodeAt(this.read+e)};s.ByteBuffer.prototype.setAt=function(e,t){this.data=this.data.substr(0,this.read+e)+String.fromCharCode(t)+this.data.substr(this.read+e+1)};s.ByteBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)};s.ByteBuffer.prototype.copy=function(){var e=s.createBuffer(this.data);e.read=this.read;return e};s.ByteBuffer.prototype.compact=function(){if(this.read>0){this.data=this.data.slice(this.read);this.read=0}};s.ByteBuffer.prototype.clear=function(){this.data="";this.read=0};s.ByteBuffer.prototype.truncate=function(e){var t=Math.max(0,this.length()-e);this.data=this.data.substr(this.read,t);this.read=0};s.ByteBuffer.prototype.toHex=function(){var e="";for(var t=this.read;t<this.data.length;++t){var r=this.data.charCodeAt(t);if(r<16){e+="0"}e+=r.toString(16)}return e};s.ByteBuffer.prototype.toString=function(){return s.decodeUtf8(this.bytes())};s.createBuffer=function(e,t){t=t||"raw";if(e!==undefined&&t==="utf8"){e=s.encodeUtf8(e)}return new s.ByteBuffer(e)};var p=r.prng={};var b=null;p.create=function(e){var t={plugin:e,key:null,seed:null,time:null,reseeds:0,generated:0};var i=e.md;var n=new Array(32);for(var a=0;a<32;++a){n[a]=i.create()}t.pools=n;t.pool=0;t.generate=function(e,i){if(!i){return t.generateSync(e)}var n=t.plugin.cipher;var a=t.plugin.increment;var s=t.plugin.formatKey;var o=t.plugin.formatSeed;var c=r.util.createBuffer();h();function h(d){if(d){return i(d)}if(c.length()>=e){return i(null,c.getBytes(e))}if(t.generated>=1048576){var u=+new Date;if(t.time===null||u-t.time>100){t.key=null}}if(t.key===null){return f(h)}var l=n(t.key,t.seed);t.generated+=l.length;c.putBytes(l);t.key=s(n(t.key,a(t.seed)));t.seed=o(n(t.key,t.seed));r.util.setImmediate(h)}};t.generateSync=function(e){var i=t.plugin.cipher;var n=t.plugin.increment;var a=t.plugin.formatKey;var f=t.plugin.formatSeed;var o=r.util.createBuffer();while(o.length()<e){if(t.generated>=1048576){var c=+new Date;if(t.time===null||c-t.time>100){t.key=null}}if(t.key===null){s()}var h=i(t.key,t.seed);t.generated+=h.length;o.putBytes(h);t.key=a(i(t.key,n(t.seed)));t.seed=f(i(t.key,t.seed))}return o.getBytes(e)};function f(e){if(t.pools[0].messageLength>=32){o();return e()}var r=32-t.pools[0].messageLength<<5;t.seedFile(r,function(r,i){if(r){return e(r)}t.collect(i);o();e()})}function s(){if(t.pools[0].messageLength>=32){return o()}var e=32-t.pools[0].messageLength<<5;t.collect(t.seedFileSync(e));o()}function o(){var e=r.md.sha1.create();e.update(t.pools[0].digest().getBytes());t.pools[0].start();var i=1;for(var n=1;n<32;++n){i=i===31?2147483648:i<<2;if(i%t.reseeds===0){e.update(t.pools[n].digest().getBytes());t.pools[n].start()}}var a=e.digest().getBytes();e.start();e.update(a);var f=e.digest().getBytes();t.key=t.plugin.formatKey(a);t.seed=t.plugin.formatSeed(f);++t.reseeds;t.generated=0;t.time=+new Date}function c(e){var t=r.util.createBuffer();if(typeof window!=="undefined"&&window.crypto&&window.crypto.getRandomValues){var i=new Uint32Array(e/4);try{window.crypto.getRandomValues(i);for(var n=0;n<i.length;++n){t.putInt32(i[n])}}catch(a){}}if(t.length()<e){var f,s,o;var c=Math.floor(Math.random()*65535);while(t.length()<e){s=16807*(c&65535);f=16807*(c>>16);s+=(f&32767)<<16;s+=f>>15;s=(s&2147483647)+(s>>31);c=s&4294967295;for(var n=0;n<3;++n){o=c>>>(n<<3);o^=Math.floor(Math.random()*255);t.putByte(String.fromCharCode(o&255))}}}return t.getBytes()}if(b){t.seedFile=function(e,t){b.randomBytes(e,function(e,r){if(e){return t(e)}t(null,r.toString())})};t.seedFileSync=function(e){return b.randomBytes(e).toString()}}else{t.seedFile=function(e,t){try{t(null,c(e))}catch(r){t(r)}};t.seedFileSync=c}t.collect=function(e){var r=e.length;for(var i=0;i<r;++i){t.pools[t.pool].update(e.substr(i,1));t.pool=t.pool===31?0:t.pool+1}};t.collectInt=function(e,r){var i="";for(var n=0;n<r;n+=8){i+=String.fromCharCode(e>>n&255)}t.collect(i)};t.registerWorker=function(e){if(e===self){t.seedFile=function(e,t){function r(e){var i=e.data;if(i.forge&&i.forge.prng){self.removeEventListener("message",r);t(i.forge.prng.err,i.forge.prng.bytes)}}self.addEventListener("message",r);self.postMessage({forge:{prng:{needed:e}}})}}else{function r(r){var i=r.data;if(i.forge&&i.forge.prng){t.seedFile(i.forge.prng.needed,function(t,r){e.postMessage({forge:{prng:{err:t,bytes:r}}})})}}e.addEventListener("message",r)}};return t};var v=false;var y=4;var g;var m;var w;var _;var S;var E=function(){v=true;w=[0,1,2,4,8,16,32,64,128,27,54];var e=new Array(256);for(var t=0;t<128;++t){e[t]=t<<1;e[t+128]=t+128<<1^283}g=new Array(256);m=new Array(256);_=new Array(4);S=new Array(4);for(var t=0;t<4;++t){_[t]=new Array(256);S[t]=new Array(256)}var r=0,i=0,n,a,f,s,o,c,h;for(var t=0;t<256;++t){s=i^i<<1^i<<2^i<<3^i<<4;s=s>>8^s&255^99;g[r]=s;m[s]=r;o=e[s];n=e[r];a=e[n];f=e[a];c=o<<24^s<<16^s<<8^(s^o);h=(n^a^f)<<24^(r^f)<<16^(r^a^f)<<8^(r^n^f);for(var d=0;d<4;++d){_[d][r]=c;S[d][s]=h;c=c<<24|c>>>8;h=h<<24|h>>>8}if(r===0){r=i=1}else{r=n^e[e[e[n^f]]];i^=e[e[i]]}}};var B=function(e,t){var r=e.slice(0);var i,n=1;var a=r.length;var f=a+6+1;var s=y*f;for(var o=a;o<s;++o){i=r[o-1];if(o%a===0){i=g[i>>>16&255]<<24^g[i>>>8&255]<<16^g[i&255]<<8^g[i>>>24]^w[n]<<24;n++}else if(a>6&&o%a==4){i=g[i>>>24]<<24^g[i>>>16&255]<<16^g[i>>>8&255]<<8^g[i&255]}r[o]=r[o-a]^i}if(t){var c;var h=S[0];var d=S[1];var u=S[2];var l=S[3];var p=r.slice(0);var s=r.length;for(var o=0,b=s-y;o<s;o+=y,b-=y){if(o===0||o===s-y){p[o]=r[b];p[o+1]=r[b+3];p[o+2]=r[b+2];p[o+3]=r[b+1]}else{for(var v=0;v<y;++v){c=r[b+v];p[o+(3&-v)]=h[g[c>>>24]]^d[g[c>>>16&255]]^u[g[c>>>8&255]]^l[g[c&255]]}}}r=p}return r};r.aes._expandKey=function(e,t){if(!v){E()}return B(e,t)};var A=function(e,t,r,i){var n=e.length/4-1;var a,f,s,o,c;if(i){a=S[0];f=S[1];s=S[2];o=S[3];c=m}else{a=_[0];f=_[1];s=_[2];o=_[3];c=g}var h,d,u,l,p,b,v;h=t[0]^e[0];d=t[i?3:1]^e[1];u=t[2]^e[2];l=t[i?1:3]^e[3];var y=3;for(var w=1;w<n;++w){p=a[h>>>24]^f[d>>>16&255]^s[u>>>8&255]^o[l&255]^e[++y];b=a[d>>>24]^f[u>>>16&255]^s[l>>>8&255]^o[h&255]^e[++y];v=a[u>>>24]^f[l>>>16&255]^s[h>>>8&255]^o[d&255]^e[++y];l=a[l>>>24]^f[h>>>16&255]^s[d>>>8&255]^o[u&255]^e[++y];h=p;d=b;u=v}r[0]=c[h>>>24]<<24^c[d>>>16&255]<<16^c[u>>>8&255]<<8^c[l&255]^e[++y];r[i?3:1]=c[d>>>24]<<24^c[u>>>16&255]<<16^c[l>>>8&255]<<8^c[h&255]^e[++y];r[2]=c[u>>>24]<<24^c[l>>>16&255]<<16^c[h>>>8&255]<<8^c[d&255]^e[++y];r[i?1:3]=c[l>>>24]<<24^c[h>>>16&255]<<16^c[d>>>8&255]<<8^c[u&255]^e[++y]};r.aes._updateBlock=A;var I={};var k=new Array(4);var x=r.util.createBuffer();I.formatKey=function(e){var t=r.util.createBuffer(e);e=new Array(4);e[0]=t.getInt32();e[1]=t.getInt32();e[2]=t.getInt32();e[3]=t.getInt32();return r.aes._expandKey(e,false)};I.formatSeed=function(e){var t=r.util.createBuffer(e);e=new Array(4);e[0]=t.getInt32();e[1]=t.getInt32();e[2]=t.getInt32();e[3]=t.getInt32();return e};I.cipher=function(e,t){r.aes._updateBlock(e,t,k,false);x.putInt32(k[0]);x.putInt32(k[1]);x.putInt32(k[2]);x.putInt32(k[3]);return x.getBytes()};I.increment=function(e){++e[3];return e};I.md=r.md.sha1;var R=r.prng.create(I);if(typeof window=="undefined"||!window.crypto||!window.crypto.getRandomValues){if(typeof window==="undefined"||window.document===undefined){}R.collectInt(+new Date,32);if(typeof navigator!=="undefined"){var T="";for(var C in navigator){try{if(typeof navigator[C]=="string"){T+=navigator[C]}}catch(M){}}R.collect(T);T=null}}r.random=R;r.random.getBytes=function(e,t){return r.random.generate(e,t)};r.pki.rsa.createKeyPairGenerationState=function(e,t){if(typeof e==="string"){e=parseInt(e,10)}e=e||1024;var i={nextBytes:function(e){var t=r.random.getBytes(e.length);for(var i=0;i<e.length;++i){e[i]=t.charCodeAt(i)}}};var n={state:0,bits:e,rng:i,eInt:t||65537,e:new j(null),p:null,q:null,qBits:e>>1,pBits:e-(e>>1),pqState:0,num:null,keys:null};n.e.fromInt(n.eInt);return n};var P;var D=0xdeadbeefcafe;var L=(D&16777215)==15715070;function j(e,t,r){this.data=[];if(e!=null)if("number"==typeof e)this.fromNumber(e,t,r);else if(t==null&&"string"!=typeof e)this.fromString(e,256);else this.fromString(e,t)}function q(){return new j(null)}function N(e,t,r,i,n,a){while(--a>=0){var f=t*this.data[e++]+r.data[i]+n;n=Math.floor(f/67108864);r.data[i++]=f&67108863}return n}function O(e,t,r,i,n,a){var f=t&32767,s=t>>15;while(--a>=0){var o=this.data[e]&32767;var c=this.data[e++]>>15;var h=s*o+c*f;o=f*o+((h&32767)<<15)+r.data[i]+(n&1073741823);n=(o>>>30)+(h>>>15)+s*c+(n>>>30);r.data[i++]=o&1073741823}return n}function U(e,t,r,i,n,a){var f=t&16383,s=t>>14;while(--a>=0){var o=this.data[e]&16383;var c=this.data[e++]>>14;var h=s*o+c*f;o=f*o+((h&16383)<<14)+r.data[i]+n;n=(o>>28)+(h>>14)+s*c;r.data[i++]=o&268435455}return n}if(typeof navigator==="undefined"){j.prototype.am=U;P=28}else if(L&&navigator.appName=="Microsoft Internet Explorer"){j.prototype.am=O;P=30}else if(L&&navigator.appName!="Netscape"){j.prototype.am=N;P=26}else{j.prototype.am=U;P=28}j.prototype.DB=P;j.prototype.DM=(1<<P)-1;j.prototype.DV=1<<P;var z=52;j.prototype.FV=Math.pow(2,z);j.prototype.F1=z-P;j.prototype.F2=2*P-z;var K="0123456789abcdefghijklmnopqrstuvwxyz";var F=new Array;var V,H;V="0".charCodeAt(0);for(H=0;H<=9;++H)F[V++]=H;V="a".charCodeAt(0);for(H=10;H<36;++H)F[V++]=H;V="A".charCodeAt(0);for(H=10;H<36;++H)F[V++]=H;function Y(e){return K.charAt(e)}function X(e,t){var r=F[e.charCodeAt(t)];return r==null?-1:r}function W(e){for(var t=this.t-1;t>=0;--t)e.data[t]=this.data[t];e.t=this.t;e.s=this.s}function G(e){this.t=1;this.s=e<0?-1:0;if(e>0)this.data[0]=e;else if(e<-1)this.data[0]=e+DV;else this.t=0}function J(e){var t=q();t.fromInt(e);return t}function Z(e,t){var r;if(t==16)r=4;else if(t==8)r=3;else if(t==256)r=8;else if(t==2)r=1;else if(t==32)r=5;else if(t==4)r=2;else{this.fromRadix(e,t);return}this.t=0;this.s=0;var i=e.length,n=false,a=0;while(--i>=0){var f=r==8?e[i]&255:X(e,i);if(f<0){if(e.charAt(i)=="-")n=true;continue}n=false;if(a==0)this.data[this.t++]=f;else if(a+r>this.DB){this.data[this.t-1]|=(f&(1<<this.DB-a)-1)<<a;this.data[this.t++]=f>>this.DB-a}else this.data[this.t-1]|=f<<a;a+=r;if(a>=this.DB)a-=this.DB}if(r==8&&(e[0]&128)!=0){this.s=-1;if(a>0)this.data[this.t-1]|=(1<<this.DB-a)-1<<a}this.clamp();if(n)j.ZERO.subTo(this,this)}function Q(){var e=this.s&this.DM;while(this.t>0&&this.data[this.t-1]==e)--this.t}function $(e){if(this.s<0)return"-"+this.negate().toString(e);var t;if(e==16)t=4;else if(e==8)t=3;else if(e==2)t=1;else if(e==32)t=5;else if(e==4)t=2;else return this.toRadix(e);var r=(1<<t)-1,i,n=false,a="",f=this.t;var s=this.DB-f*this.DB%t;if(f-->0){if(s<this.DB&&(i=this.data[f]>>s)>0){n=true;a=Y(i)}while(f>=0){if(s<t){i=(this.data[f]&(1<<s)-1)<<t-s;i|=this.data[--f]>>(s+=this.DB-t)}else{i=this.data[f]>>(s-=t)&r;if(s<=0){s+=this.DB;--f}}if(i>0)n=true;if(n)a+=Y(i)}}return n?a:"0"}function ee(){var e=q();j.ZERO.subTo(this,e);return e}function te(){return this.s<0?this.negate():this}function re(e){var t=this.s-e.s;if(t!=0)return t;var r=this.t;t=r-e.t;if(t!=0)return this.s<0?-t:t;while(--r>=0)if((t=this.data[r]-e.data[r])!=0)return t;return 0}function ie(e){var t=1,r;if((r=e>>>16)!=0){e=r;t+=16}if((r=e>>8)!=0){e=r;t+=8}if((r=e>>4)!=0){e=r;t+=4}if((r=e>>2)!=0){e=r;t+=2}if((r=e>>1)!=0){e=r;t+=1}return t}function ne(){if(this.t<=0)return 0;return this.DB*(this.t-1)+ie(this.data[this.t-1]^this.s&this.DM)}function ae(e,t){var r;for(r=this.t-1;r>=0;--r)t.data[r+e]=this.data[r];for(r=e-1;r>=0;--r)t.data[r]=0;t.t=this.t+e;t.s=this.s}function fe(e,t){for(var r=e;r<this.t;++r)t.data[r-e]=this.data[r];t.t=Math.max(this.t-e,0);t.s=this.s}function se(e,t){var r=e%this.DB;var i=this.DB-r;var n=(1<<i)-1;var a=Math.floor(e/this.DB),f=this.s<<r&this.DM,s;for(s=this.t-1;s>=0;--s){t.data[s+a+1]=this.data[s]>>i|f;f=(this.data[s]&n)<<r}for(s=a-1;s>=0;--s)t.data[s]=0;t.data[a]=f;t.t=this.t+a+1;t.s=this.s;t.clamp()}function oe(e,t){t.s=this.s;var r=Math.floor(e/this.DB);if(r>=this.t){t.t=0;return}var i=e%this.DB;var n=this.DB-i;var a=(1<<i)-1;t.data[0]=this.data[r]>>i;for(var f=r+1;f<this.t;++f){t.data[f-r-1]|=(this.data[f]&a)<<n;t.data[f-r]=this.data[f]>>i}if(i>0)t.data[this.t-r-1]|=(this.s&a)<<n;t.t=this.t-r;t.clamp()}function ce(e,t){var r=0,i=0,n=Math.min(e.t,this.t);while(r<n){i+=this.data[r]-e.data[r];t.data[r++]=i&this.DM;i>>=this.DB}if(e.t<this.t){i-=e.s;while(r<this.t){i+=this.data[r];t.data[r++]=i&this.DM;i>>=this.DB}i+=this.s}else{i+=this.s;while(r<e.t){i-=e.data[r];t.data[r++]=i&this.DM;i>>=this.DB}i-=e.s}t.s=i<0?-1:0;if(i<-1)t.data[r++]=this.DV+i;else if(i>0)t.data[r++]=i;t.t=r;t.clamp()}function he(e,t){var r=this.abs(),i=e.abs();var n=r.t;t.t=n+i.t;while(--n>=0)t.data[n]=0;for(n=0;n<i.t;++n)t.data[n+r.t]=r.am(0,i.data[n],t,n,0,r.t);t.s=0;t.clamp();if(this.s!=e.s)j.ZERO.subTo(t,t)}function de(e){var t=this.abs();var r=e.t=2*t.t;while(--r>=0)e.data[r]=0;for(r=0;r<t.t-1;++r){var i=t.am(r,t.data[r],e,2*r,0,1);if((e.data[r+t.t]+=t.am(r+1,2*t.data[r],e,2*r+1,i,t.t-r-1))>=t.DV){e.data[r+t.t]-=t.DV;e.data[r+t.t+1]=1}}if(e.t>0)e.data[e.t-1]+=t.am(r,t.data[r],e,2*r,0,1);e.s=0;e.clamp()}function ue(e,t,r){var i=e.abs();if(i.t<=0)return;var n=this.abs();if(n.t<i.t){if(t!=null)t.fromInt(0);if(r!=null)this.copyTo(r);return}if(r==null)r=q();var a=q(),f=this.s,s=e.s;var o=this.DB-ie(i.data[i.t-1]);if(o>0){i.lShiftTo(o,a);n.lShiftTo(o,r)}else{i.copyTo(a);n.copyTo(r)}var c=a.t;var h=a.data[c-1];if(h==0)return;var d=h*(1<<this.F1)+(c>1?a.data[c-2]>>this.F2:0);var u=this.FV/d,l=(1<<this.F1)/d,p=1<<this.F2;var b=r.t,v=b-c,y=t==null?q():t;a.dlShiftTo(v,y);if(r.compareTo(y)>=0){r.data[r.t++]=1;r.subTo(y,r)}j.ONE.dlShiftTo(c,y);y.subTo(a,a);while(a.t<c)a.data[a.t++]=0;while(--v>=0){var g=r.data[--b]==h?this.DM:Math.floor(r.data[b]*u+(r.data[b-1]+p)*l);if((r.data[b]+=a.am(0,g,r,v,0,c))<g){a.dlShiftTo(v,y);r.subTo(y,r);while(r.data[b]<--g)r.subTo(y,r)}}if(t!=null){r.drShiftTo(c,t);if(f!=s)j.ZERO.subTo(t,t)}r.t=c;r.clamp();if(o>0)r.rShiftTo(o,r);if(f<0)j.ZERO.subTo(r,r)}function le(e){var t=q();this.abs().divRemTo(e,null,t);if(this.s<0&&t.compareTo(j.ZERO)>0)e.subTo(t,t);return t}function pe(e){this.m=e}function be(e){if(e.s<0||e.compareTo(this.m)>=0)return e.mod(this.m);else return e}function ve(e){return e}function ye(e){e.divRemTo(this.m,null,e)}function ge(e,t,r){e.multiplyTo(t,r);this.reduce(r)}function me(e,t){e.squareTo(t);this.reduce(t)}pe.prototype.convert=be;pe.prototype.revert=ve;pe.prototype.reduce=ye;pe.prototype.mulTo=ge;pe.prototype.sqrTo=me;function we(){if(this.t<1)return 0;var e=this.data[0];if((e&1)==0)return 0;var t=e&3;t=t*(2-(e&15)*t)&15;t=t*(2-(e&255)*t)&255;t=t*(2-((e&65535)*t&65535))&65535;t=t*(2-e*t%this.DV)%this.DV;return t>0?this.DV-t:-t}function _e(e){this.m=e;this.mp=e.invDigit();this.mpl=this.mp&32767;this.mph=this.mp>>15;this.um=(1<<e.DB-15)-1;this.mt2=2*e.t}function Se(e){var t=q();e.abs().dlShiftTo(this.m.t,t);t.divRemTo(this.m,null,t);if(e.s<0&&t.compareTo(j.ZERO)>0)this.m.subTo(t,t);return t}function Ee(e){var t=q();e.copyTo(t);this.reduce(t);return t}function Be(e){while(e.t<=this.mt2)e.data[e.t++]=0;for(var t=0;t<this.m.t;++t){var r=e.data[t]&32767;var i=r*this.mpl+((r*this.mph+(e.data[t]>>15)*this.mpl&this.um)<<15)&e.DM;r=t+this.m.t;e.data[r]+=this.m.am(0,i,e,t,0,this.m.t);while(e.data[r]>=e.DV){e.data[r]-=e.DV;e.data[++r]++}}e.clamp();e.drShiftTo(this.m.t,e);if(e.compareTo(this.m)>=0)e.subTo(this.m,e)}function Ae(e,t){e.squareTo(t);this.reduce(t)}function Ie(e,t,r){e.multiplyTo(t,r);this.reduce(r)}_e.prototype.convert=Se;_e.prototype.revert=Ee;_e.prototype.reduce=Be;_e.prototype.mulTo=Ie;_e.prototype.sqrTo=Ae;function ke(){return(this.t>0?this.data[0]&1:this.s)==0}function xe(e,t){if(e>4294967295||e<1)return j.ONE;var r=q(),i=q(),n=t.convert(this),a=ie(e)-1;n.copyTo(r);while(--a>=0){t.sqrTo(r,i);if((e&1<<a)>0)t.mulTo(i,n,r);else{var f=r;r=i;i=f}}return t.revert(r)}function Re(e,t){var r;if(e<256||t.isEven())r=new pe(t);else r=new _e(t);return this.exp(e,r)}j.prototype.copyTo=W;j.prototype.fromInt=G;j.prototype.fromString=Z;j.prototype.clamp=Q;j.prototype.dlShiftTo=ae;j.prototype.drShiftTo=fe;j.prototype.lShiftTo=se;j.prototype.rShiftTo=oe;j.prototype.subTo=ce;j.prototype.multiplyTo=he;j.prototype.squareTo=de;j.prototype.divRemTo=ue;j.prototype.invDigit=we;j.prototype.isEven=ke;j.prototype.exp=xe;j.prototype.toString=$;j.prototype.negate=ee;j.prototype.abs=te;j.prototype.compareTo=re;j.prototype.bitLength=ne;j.prototype.mod=le;j.prototype.modPowInt=Re;j.ZERO=J(0);j.ONE=J(1);function Te(){var e=q();this.copyTo(e);return e}function Ce(){if(this.s<0){if(this.t==1)return this.data[0]-this.DV;else if(this.t==0)return-1}else if(this.t==1)return this.data[0];else if(this.t==0)return 0;return(this.data[1]&(1<<32-this.DB)-1)<<this.DB|this.data[0]}function Me(){return this.t==0?this.s:this.data[0]<<24>>24}function Pe(){return this.t==0?this.s:this.data[0]<<16>>16}function De(e){return Math.floor(Math.LN2*this.DB/Math.log(e))}function Le(){if(this.s<0)return-1;else if(this.t<=0||this.t==1&&this.data[0]<=0)return 0;else return 1}function je(e){if(e==null)e=10;if(this.signum()==0||e<2||e>36)return"0";var t=this.chunkSize(e);var r=Math.pow(e,t);var i=J(r),n=q(),a=q(),f="";this.divRemTo(i,n,a);while(n.signum()>0){f=(r+a.intValue()).toString(e).substr(1)+f;n.divRemTo(i,n,a)}return a.intValue().toString(e)+f}function qe(e,t){this.fromInt(0);if(t==null)t=10;var r=this.chunkSize(t);var i=Math.pow(t,r),n=false,a=0,f=0;for(var s=0;s<e.length;++s){var o=X(e,s);if(o<0){if(e.charAt(s)=="-"&&this.signum()==0)n=true;continue}f=t*f+o;if(++a>=r){this.dMultiply(i);this.dAddOffset(f,0);a=0;f=0}}if(a>0){this.dMultiply(Math.pow(t,a));this.dAddOffset(f,0)}if(n)j.ZERO.subTo(this,this)}function Ne(e,t,r){if("number"==typeof t){if(e<2)this.fromInt(1);else{this.fromNumber(e,r);if(!this.testBit(e-1))this.bitwiseTo(j.ONE.shiftLeft(e-1),Ye,this);if(this.isEven())this.dAddOffset(1,0);while(!this.isProbablePrime(t)){this.dAddOffset(2,0);if(this.bitLength()>e)this.subTo(j.ONE.shiftLeft(e-1),this)}}}else{var i=new Array,n=e&7;i.length=(e>>3)+1;t.nextBytes(i);if(n>0)i[0]&=(1<<n)-1;else i[0]=0;this.fromString(i,256)}}function Oe(){var e=this.t,t=new Array;t[0]=this.s;var r=this.DB-e*this.DB%8,i,n=0;if(e-->0){if(r<this.DB&&(i=this.data[e]>>r)!=(this.s&this.DM)>>r)t[n++]=i|this.s<<this.DB-r;while(e>=0){if(r<8){i=(this.data[e]&(1<<r)-1)<<8-r;i|=this.data[--e]>>(r+=this.DB-8)}else{i=this.data[e]>>(r-=8)&255;if(r<=0){r+=this.DB;--e}}if((i&128)!=0)i|=-256;if(n==0&&(this.s&128)!=(i&128))++n;if(n>0||i!=this.s)t[n++]=i}}return t}function Ue(e){return this.compareTo(e)==0}function ze(e){return this.compareTo(e)<0?this:e}function Ke(e){return this.compareTo(e)>0?this:e}function Fe(e,t,r){var i,n,a=Math.min(e.t,this.t);for(i=0;i<a;++i)r.data[i]=t(this.data[i],e.data[i]);if(e.t<this.t){n=e.s&this.DM;for(i=a;i<this.t;++i)r.data[i]=t(this.data[i],n);r.t=this.t}else{n=this.s&this.DM;for(i=a;i<e.t;++i)r.data[i]=t(n,e.data[i]);r.t=e.t}r.s=t(this.s,e.s);r.clamp()}function Ve(e,t){return e&t}function He(e){var t=q();this.bitwiseTo(e,Ve,t);return t}function Ye(e,t){return e|t}function Xe(e){var t=q();this.bitwiseTo(e,Ye,t);return t}function We(e,t){return e^t}function Ge(e){var t=q();this.bitwiseTo(e,We,t);return t}function Je(e,t){return e&~t}function Ze(e){var t=q();this.bitwiseTo(e,Je,t);return t}function Qe(){var e=q();for(var t=0;t<this.t;++t)e.data[t]=this.DM&~this.data[t];e.t=this.t;e.s=~this.s;return e}function $e(e){var t=q();if(e<0)this.rShiftTo(-e,t);else this.lShiftTo(e,t);return t}function et(e){var t=q();if(e<0)this.lShiftTo(-e,t);else this.rShiftTo(e,t);return t}function tt(e){if(e==0)return-1;var t=0;if((e&65535)==0){e>>=16;t+=16}if((e&255)==0){e>>=8;t+=8}if((e&15)==0){e>>=4;t+=4}if((e&3)==0){e>>=2;t+=2}if((e&1)==0)++t;return t}function rt(){for(var e=0;e<this.t;++e)if(this.data[e]!=0)return e*this.DB+tt(this.data[e]);if(this.s<0)return this.t*this.DB;return-1}function it(e){var t=0;while(e!=0){e&=e-1;++t}return t}function nt(){var e=0,t=this.s&this.DM;for(var r=0;r<this.t;++r)e+=it(this.data[r]^t);return e}function at(e){var t=Math.floor(e/this.DB);if(t>=this.t)return this.s!=0;return(this.data[t]&1<<e%this.DB)!=0}function ft(e,t){var r=j.ONE.shiftLeft(e);this.bitwiseTo(r,t,r);return r}function st(e){return this.changeBit(e,Ye)}function ot(e){return this.changeBit(e,Je)}function ct(e){return this.changeBit(e,We)}function ht(e,t){var r=0,i=0,n=Math.min(e.t,this.t);while(r<n){i+=this.data[r]+e.data[r];t.data[r++]=i&this.DM;i>>=this.DB}if(e.t<this.t){i+=e.s;while(r<this.t){i+=this.data[r];t.data[r++]=i&this.DM;i>>=this.DB}i+=this.s}else{i+=this.s;while(r<e.t){i+=e.data[r];t.data[r++]=i&this.DM;i>>=this.DB}i+=e.s}t.s=i<0?-1:0;if(i>0)t.data[r++]=i;else if(i<-1)t.data[r++]=this.DV+i;t.t=r;t.clamp()}function dt(e){var t=q();this.addTo(e,t);return t}function ut(e){var t=q();this.subTo(e,t);return t}function lt(e){var t=q();this.multiplyTo(e,t);return t}function pt(e){var t=q();this.divRemTo(e,t,null);return t}function bt(e){var t=q();this.divRemTo(e,null,t);return t}function vt(e){var t=q(),r=q();this.divRemTo(e,t,r);return new Array(t,r)}function yt(e){this.data[this.t]=this.am(0,e-1,this,0,0,this.t);++this.t;this.clamp()}function gt(e,t){if(e==0)return;while(this.t<=t)this.data[this.t++]=0;this.data[t]+=e;while(this.data[t]>=this.DV){this.data[t]-=this.DV;if(++t>=this.t)this.data[this.t++]=0;++this.data[t]}}function mt(){}function wt(e){return e}function _t(e,t,r){e.multiplyTo(t,r)}function St(e,t){e.squareTo(t)}mt.prototype.convert=wt;mt.prototype.revert=wt;mt.prototype.mulTo=_t;mt.prototype.sqrTo=St;function Et(e){return this.exp(e,new mt)}function Bt(e,t,r){var i=Math.min(this.t+e.t,t);r.s=0;r.t=i;while(i>0)r.data[--i]=0;var n;for(n=r.t-this.t;i<n;++i)r.data[i+this.t]=this.am(0,e.data[i],r,i,0,this.t);for(n=Math.min(e.t,t);i<n;++i)this.am(0,e.data[i],r,i,0,t-i);r.clamp()}function At(e,t,r){--t;var i=r.t=this.t+e.t-t;r.s=0;while(--i>=0)r.data[i]=0;for(i=Math.max(t-this.t,0);i<e.t;++i)r.data[this.t+i-t]=this.am(t-i,e.data[i],r,0,0,this.t+i-t);r.clamp();r.drShiftTo(1,r)}function It(e){this.r2=q();this.q3=q();j.ONE.dlShiftTo(2*e.t,this.r2);this.mu=this.r2.divide(e);this.m=e}function kt(e){if(e.s<0||e.t>2*this.m.t)return e.mod(this.m);else if(e.compareTo(this.m)<0)return e;else{var t=q();e.copyTo(t);this.reduce(t);return t}}function xt(e){return e}function Rt(e){e.drShiftTo(this.m.t-1,this.r2);if(e.t>this.m.t+1){e.t=this.m.t+1;e.clamp()}this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3);this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);while(e.compareTo(this.r2)<0)e.dAddOffset(1,this.m.t+1);e.subTo(this.r2,e);while(e.compareTo(this.m)>=0)e.subTo(this.m,e)}function Tt(e,t){e.squareTo(t);this.reduce(t)}function Ct(e,t,r){e.multiplyTo(t,r);this.reduce(r)}It.prototype.convert=kt;It.prototype.revert=xt;It.prototype.reduce=Rt;It.prototype.mulTo=Ct;It.prototype.sqrTo=Tt;function Mt(e,t){var r=e.bitLength(),i,n=J(1),a;if(r<=0)return n;else if(r<18)i=1;else if(r<48)i=3;else if(r<144)i=4;else if(r<768)i=5;else i=6;if(r<8)a=new pe(t);else if(t.isEven())a=new It(t);else a=new _e(t);var f=new Array,s=3,o=i-1,c=(1<<i)-1;f[1]=a.convert(this);if(i>1){var h=q();a.sqrTo(f[1],h);while(s<=c){f[s]=q();a.mulTo(h,f[s-2],f[s]);s+=2}}var d=e.t-1,u,l=true,p=q(),b;r=ie(e.data[d])-1;while(d>=0){if(r>=o)u=e.data[d]>>r-o&c;else{u=(e.data[d]&(1<<r+1)-1)<<o-r;if(d>0)u|=e.data[d-1]>>this.DB+r-o}s=i;while((u&1)==0){u>>=1;--s}if((r-=s)<0){r+=this.DB;--d}if(l){f[u].copyTo(n);l=false}else{while(s>1){a.sqrTo(n,p);a.sqrTo(p,n);s-=2}if(s>0)a.sqrTo(n,p);else{b=n;n=p;p=b}a.mulTo(p,f[u],n)}while(d>=0&&(e.data[d]&1<<r)==0){a.sqrTo(n,p);b=n;n=p;p=b;if(--r<0){r=this.DB-1;--d}}}return a.revert(n)}function Pt(e){var t=this.s<0?this.negate():this.clone();var r=e.s<0?e.negate():e.clone();if(t.compareTo(r)<0){var i=t;t=r;r=i}var n=t.getLowestSetBit(),a=r.getLowestSetBit();if(a<0)return t;if(n<a)a=n;if(a>0){t.rShiftTo(a,t);r.rShiftTo(a,r)}while(t.signum()>0){if((n=t.getLowestSetBit())>0)t.rShiftTo(n,t);if((n=r.getLowestSetBit())>0)r.rShiftTo(n,r);if(t.compareTo(r)>=0){t.subTo(r,t);t.rShiftTo(1,t)}else{r.subTo(t,r);r.rShiftTo(1,r)}}if(a>0)r.lShiftTo(a,r);return r}function Dt(e){if(e<=0)return 0;var t=this.DV%e,r=this.s<0?e-1:0;if(this.t>0)if(t==0)r=this.data[0]%e;else for(var i=this.t-1;i>=0;--i)r=(t*r+this.data[i])%e;return r}function Lt(e){var t=e.isEven();if(this.isEven()&&t||e.signum()==0)return j.ZERO;var r=e.clone(),i=this.clone();var n=J(1),a=J(0),f=J(0),s=J(1);while(r.signum()!=0){while(r.isEven()){r.rShiftTo(1,r);if(t){if(!n.isEven()||!a.isEven()){n.addTo(this,n);a.subTo(e,a)}n.rShiftTo(1,n)}else if(!a.isEven())a.subTo(e,a);a.rShiftTo(1,a)}while(i.isEven()){i.rShiftTo(1,i);if(t){if(!f.isEven()||!s.isEven()){f.addTo(this,f);s.subTo(e,s)}f.rShiftTo(1,f)}else if(!s.isEven())s.subTo(e,s);s.rShiftTo(1,s)}if(r.compareTo(i)>=0){r.subTo(i,r);if(t)n.subTo(f,n);a.subTo(s,a)}else{i.subTo(r,i);if(t)f.subTo(n,f);s.subTo(a,s)}}if(i.compareTo(j.ONE)!=0)return j.ZERO;if(s.compareTo(e)>=0)return s.subtract(e);if(s.signum()<0)s.addTo(e,s);else return s;if(s.signum()<0)return s.add(e);else return s}var jt=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509];var qt=(1<<26)/jt[jt.length-1];function Nt(e){var t,r=this.abs();if(r.t==1&&r.data[0]<=jt[jt.length-1]){for(t=0;t<jt.length;++t)if(r.data[0]==jt[t])return true;return false}if(r.isEven())return false;t=1;while(t<jt.length){var i=jt[t],n=t+1;while(n<jt.length&&i<qt)i*=jt[n++];i=r.modInt(i);while(t<n)if(i%jt[t++]==0)return false}return r.millerRabin(e)}function Ot(e){var t=this.subtract(j.ONE);var r=t.getLowestSetBit();if(r<=0)return false;var i=t.shiftRight(r);e=e+1>>1;if(e>jt.length)e=jt.length;var n=q();for(var a=0;a<e;++a){n.fromInt(jt[a]);var f=n.modPow(i,this);if(f.compareTo(j.ONE)!=0&&f.compareTo(t)!=0){var s=1;while(s++<r&&f.compareTo(t)!=0){f=f.modPowInt(2,this);if(f.compareTo(j.ONE)==0)return false}if(f.compareTo(t)!=0)return false}}return true}j.prototype.chunkSize=De;j.prototype.toRadix=je;j.prototype.fromRadix=qe;j.prototype.fromNumber=Ne;j.prototype.bitwiseTo=Fe;j.prototype.changeBit=ft;j.prototype.addTo=ht;j.prototype.dMultiply=yt;j.prototype.dAddOffset=gt;j.prototype.multiplyLowerTo=Bt;j.prototype.multiplyUpperTo=At;j.prototype.modInt=Dt;j.prototype.millerRabin=Ot;j.prototype.clone=Te;j.prototype.intValue=Ce;j.prototype.byteValue=Me;j.prototype.shortValue=Pe;j.prototype.signum=Le;j.prototype.toByteArray=Oe;j.prototype.equals=Ue;j.prototype.min=ze;j.prototype.max=Ke;j.prototype.and=He;j.prototype.or=Xe;j.prototype.xor=Ge;j.prototype.andNot=Ze;j.prototype.not=Qe;j.prototype.shiftLeft=$e;j.prototype.shiftRight=et;j.prototype.getLowestSetBit=rt;j.prototype.bitCount=nt;j.prototype.testBit=at;j.prototype.setBit=st;j.prototype.clearBit=ot;j.prototype.flipBit=ct;j.prototype.add=dt;j.prototype.subtract=ut;j.prototype.multiply=lt;j.prototype.divide=pt;j.prototype.remainder=bt;j.prototype.divideAndRemainder=vt;j.prototype.modPow=Mt;j.prototype.modInverse=Lt;j.prototype.pow=Et;j.prototype.gcd=Pt;j.prototype.isProbablePrime=Nt;r.jsbn=r.jsbn||{};r.jsbn.BigInteger=j;var s=r.util=r.util||{};if(typeof e==="undefined"||!e.nextTick){if(typeof setImmediate==="function"){s.setImmediate=setImmediate;s.nextTick=function(e){return setImmediate(e)}}else{s.setImmediate=function(e){setTimeout(e,0)};s.nextTick=s.setImmediate}}else{s.nextTick=e.nextTick;if(typeof setImmediate==="function"){s.setImmediate=setImmediate}else{s.setImmediate=s.nextTick}}var Ut=function(e,t,r){var i;if(r){i=e.modPow(t.e,t.n)}else{if(!t.dP){t.dP=t.d.mod(t.p.subtract(j.ONE))}if(!t.dQ){t.dQ=t.d.mod(t.q.subtract(j.ONE))}if(!t.qInv){t.qInv=t.q.modInverse(t.p)}var n=e.mod(t.p).modPow(t.dP,t.p);var a=e.mod(t.q).modPow(t.dQ,t.q);while(n.compareTo(a)<0){n=n.add(t.p)}i=n.subtract(a).multiply(t.qInv).mod(t.p).multiply(t.q).add(a)}return i};s.encodeUtf8=function(e){return unescape(encodeURIComponent(e))};s.decodeUtf8=function(e){return decodeURIComponent(escape(e))};s.createBuffer=function(e,t){t=t||"raw";if(e!==undefined&&t==="utf8"){e=s.encodeUtf8(e)}return new s.ByteBuffer(e)};s.hexToBytes=function(e){var t="";var r=0;if(e.length&1==1){r=1;t+=String.fromCharCode(parseInt(e[0],16))}for(;r<e.length;r+=2){t+=String.fromCharCode(parseInt(e.substr(r,2),16))}return t};a.rsa.decrypt=function(e,t,i,n){var a=Math.ceil(t.n.bitLength()/8);if(e.length!=a){throw{message:"Encrypted message length is invalid.",length:e.length,expected:a}}var f=new j(r.util.createBuffer(e).toHex(),16);var s=Ut(f,t,i);var o=s.toString(16);var c=r.util.createBuffer();var h=a-Math.ceil(o.length/2);while(h>0){c.putByte(0);--h}c.putBytes(r.util.hexToBytes(o));if(n!==false){var d=c.getByte();var u=c.getByte();if(d!==0||i&&u!==0&&u!==1||!i&&u!=2||i&&u===0&&typeof n==="undefined"){throw{message:"Encryption block is invalid."}}var l=0;if(u===0){l=a-3-n;for(var p=0;p<l;++p){if(c.getByte()!==0){throw{message:"Encryption block is invalid."}}}}else if(u===1){l=0;while(c.length()>1){if(c.getByte()!==255){--c.read;break}++l}}else if(u===2){l=0;while(c.length()>1){if(c.getByte()===0){--c.read;break}++l}}var b=c.getByte();if(b!==0||l!==a-3-c.length()){throw{message:"Encryption block is invalid."}}}return c.getBytes()};a.rsa.encrypt=function(e,t,i){var n=i;var a=r.util.createBuffer();var f=Math.ceil(t.n.bitLength()/8);if(i!==false&&i!==true){if(e.length>f-11){throw{message:"Message is too long to encrypt.",length:e.length,max:f-11}}a.putByte(0);a.putByte(i);var s=f-3-e.length;var o;if(i===0||i===1){n=false;o=i===0?0:255;for(var c=0;c<s;++c){a.putByte(o)}}else{n=true;for(var c=0;c<s;++c){o=Math.floor(Math.random()*255)+1;a.putByte(o)}}a.putByte(0)}a.putBytes(e);var h=new j(a.toHex(),16);var d=Ut(h,t,n);var u=d.toString(16);var l=r.util.createBuffer();var p=f-Math.ceil(u.length/2);while(p>0){l.putByte(0);--p}l.putBytes(r.util.hexToBytes(u));return l.getBytes()};a.rsa.setPrivateKey=function(e,t,r,i,n,f,s,o){var c={n:e,e:t,d:r,p:i,q:n,dP:f,dQ:s,qInv:o};c.decrypt=function(e){return a.rsa.decrypt(e,c,false)};c.sign=function(e,t){var r=false;if(t===undefined){t={encode:emsaPkcs1v15encode};r=1}var i=t.encode(e,c.n.bitLength());return a.rsa.encrypt(i,c,r)};return c};var zt=function(e){var t=e.getByte();if(t==128){return undefined}var r;var i=t&128;if(!i){r=t}else{r=e.getInt((t&127)<<3)}return r};var Kt=r.asn1=r.asn1||{};Kt.Type={NONE:0,BOOLEAN:1,INTEGER:2,BITSTRING:3,OCTETSTRING:4,NULL:5,OID:6,ODESC:7,EXTERNAL:8,REAL:9,ENUMERATED:10,EMBEDDED:11,UTF8:12,ROID:13,SEQUENCE:16,SET:17,PRINTABLESTRING:19,IA5STRING:22,UTCTIME:23,GENERALIZEDTIME:24,BMPSTRING:30};Kt.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192};Kt.create=function(e,t,r,i){if(i.constructor==Array){var n=[];for(var a=0;a<i.length;++a){if(i[a]!==undefined){n.push(i[a])}}i=n}return{tagClass:e,type:t,constructed:r,composed:r||i.constructor==Array,value:i}};Kt.fromDer=function(e){if(e.constructor==String){e=r.util.createBuffer(e)}if(e.length()<2){throw{message:"Too few bytes to parse DER.",bytes:e.length()}}var t=e.getByte();var i=t&192;var n=t&31;var a=zt(e);if(e.length()<a){throw{message:"Too few bytes to read ASN.1 value.",detail:e.length()+" < "+a}}var f;var s=(t&32)==32;var o=s;if(!o&&i===Kt.Class.UNIVERSAL&&n===Kt.Type.BITSTRING&&a>1){var c=e.read;var h=e.getByte();if(h===0){t=e.getByte();var d=t&192;if(d===Kt.Class.UNIVERSAL||d===Kt.Class.CONTEXT_SPECIFIC){try{var u=zt(e);o=u===a-(e.read-c);if(o){++c;--a}}catch(l){}}}e.read=c}if(o){f=[];if(a===undefined){for(;;){if(e.bytes(2)===String.fromCharCode(0,0)){
|
|
e.getBytes(2);break}f.push(Kt.fromDer(e))}}else{var p=e.length();while(a>0){f.push(Kt.fromDer(e));a-=p-e.length();p=e.length()}}}else{if(a===undefined){throw{message:"Non-constructed ASN.1 object of indefinite length."}}if(n===Kt.Type.BMPSTRING){f="";for(var b=0;b<a;b+=2){f+=String.fromCharCode(e.getInt16())}}else{f=e.getBytes(a)}}return Kt.create(i,n,s,f)};Kt.toDer=function(e){var t=r.util.createBuffer();var i=e.tagClass|e.type;var n=r.util.createBuffer();if(e.composed){if(e.constructed){i|=32}else{n.putByte(0)}for(var a=0;a<e.value.length;++a){if(e.value[a]!==undefined){n.putBuffer(Kt.toDer(e.value[a]))}}}else{if(e.type===Kt.Type.BMPSTRING){for(var a=0;a<e.value.length;++a){n.putInt16(e.value.charCodeAt(a))}}else{n.putBytes(e.value)}}t.putByte(i);if(n.length()<=127){t.putByte(n.length()&127)}else{var f=n.length();var s="";do{s+=String.fromCharCode(f&255);f=f>>>8}while(f>0);t.putByte(s.length|128);for(var a=s.length-1;a>=0;--a){t.putByte(s.charCodeAt(a))}}t.putBuffer(n);return t};a.rsa.setPublicKey=function(e,t){var r={n:e,e:t};r.encrypt=function(e){return a.rsa.encrypt(e,r,2)};r.verify=function(e,t,i){var n=i===undefined?undefined:false;var f=a.rsa.decrypt(t,r,true,n);if(i===undefined){var s=Kt.fromDer(f);return e===s.value[1].value}else{return i.verify(e,f,r.n.bitLength())}};return r};var Ft=[6,4,2,4,2,4,6,2];a.rsa.stepKeyPairGenerationState=function(e,t){var i=new j(null);i.fromInt(30);var n=0;var a=function(e,t){return e|t};var f=+new Date;var s;var o=0;while(e.keys===null&&(t<=0||o<t)){if(e.state===0){var c=e.p===null?e.pBits:e.qBits;var h=c-1;if(e.pqState===0){e.num=new j(c,e.rng);if(!e.num.testBit(h)){e.num.bitwiseTo(j.ONE.shiftLeft(h),a,e.num)}e.num.dAddOffset(31-e.num.mod(i).byteValue(),0);n=0;++e.pqState}else if(e.pqState===1){if(e.num.bitLength()>c){e.pqState=0}else if(e.num.isProbablePrime(1)){++e.pqState}else{e.num.dAddOffset(Ft[n++%8],0)}}else if(e.pqState===2){e.pqState=e.num.subtract(j.ONE).gcd(e.e).compareTo(j.ONE)===0?3:0}else if(e.pqState===3){e.pqState=0;if(e.num.isProbablePrime(10)){if(e.p===null){e.p=e.num}else{e.q=e.num}if(e.p!==null&&e.q!==null){++e.state}}e.num=null}}else if(e.state===1){if(e.p.compareTo(e.q)<0){e.num=e.p;e.p=e.q;e.q=e.num}++e.state}else if(e.state===2){e.p1=e.p.subtract(j.ONE);e.q1=e.q.subtract(j.ONE);e.phi=e.p1.multiply(e.q1);++e.state}else if(e.state===3){if(e.phi.gcd(e.e).compareTo(j.ONE)===0){++e.state}else{e.p=null;e.q=null;e.state=0}}else if(e.state===4){e.n=e.p.multiply(e.q);if(e.n.bitLength()===e.bits){++e.state}else{e.q=null;e.state=0}}else if(e.state===5){var d=e.e.modInverse(e.phi);e.keys={privateKey:r.pki.rsa.setPrivateKey(e.n,e.e,d,e.p,e.q,d.mod(e.p1),d.mod(e.q1),e.q.modInverse(e.p)),publicKey:r.pki.rsa.setPublicKey(e.n,e.e)}}s=+new Date;o+=s-f;f=s}return e.keys!==null};function Vt(e,t,i){if(typeof t==="function"){i=t;t={}}if(false||typeof Worker==="undefined"){function n(){if(r.pki.rsa.stepKeyPairGenerationState(e,10)){return i(null,e.keys)}r.util.setImmediate(n)}return n()}var a=t.workers||2;var f=t.workLoad||100;var s=f*30/8;var o=t.workerScript||"forge/prime.worker.js";var c=new j(null);c.fromInt(30);var h=function(e,t){return e|t};d();function d(){u(e.pBits,function(t,r){if(t){return i(t)}e.p=r;u(e.qBits,l)})}function u(t,r){var i=[];for(var n=0;n<a;++n){i[n]=new Worker(o)}var d=a;var u=l();for(var n=0;n<a;++n){i[n].addEventListener("message",b)}function l(){var r=t-1;var i=new j(t,e.rng);if(!i.testBit(r)){i.bitwiseTo(j.ONE.shiftLeft(r),h,i)}i.dAddOffset(31-i.mod(c).byteValue(),0);return i}var p=false;function b(n){if(p){return}--d;var a=n.data;if(a.found){for(var o=0;o<i.length;++o){i[o].terminate()}p=true;return r(null,new j(a.prime,16))}if(u.bitLength()>t){u=l()}var c=u.toString(16);n.target.postMessage({e:e.eInt,hex:c,workLoad:f});u.dAddOffset(s,0)}}function l(t,n){e.q=n;if(e.p.compareTo(e.q)<0){var a=e.p;e.p=e.q;e.q=a}e.p1=e.p.subtract(j.ONE);e.q1=e.q.subtract(j.ONE);e.phi=e.p1.multiply(e.q1);if(e.phi.gcd(e.e).compareTo(j.ONE)!==0){e.p=e.q=null;d();return}e.n=e.p.multiply(e.q);if(e.n.bitLength()!==e.bits){e.q=null;u(e.qBits,l);return}var f=e.e.modInverse(e.phi);e.keys={privateKey:r.pki.rsa.setPrivateKey(e.n,e.e,f,e.p,e.q,f.mod(e.p1),f.mod(e.q1),e.q.modInverse(e.p)),publicKey:r.pki.rsa.setPublicKey(e.n,e.e)};i(null,e.keys)}}a.rsa.generateKeyPair=function(e,t,r,i){if(arguments.length===1){if(typeof e==="object"){r=e;e=undefined}else if(typeof e==="function"){i=e;e=undefined}}else if(arguments.length===2){if(typeof e==="number"){if(typeof t==="function"){i=t}else{r=t}}else{r=e;i=t;e=undefined}t=undefined}else if(arguments.length===3){if(typeof t==="number"){if(typeof r==="function"){i=r;r=undefined}}else{i=r;r=t;t=undefined}}r=r||{};if(e===undefined){e=r.bits||1024}if(t===undefined){t=r.e||65537}var n=a.rsa.createKeyPairGenerationState(e,t);if(!i){a.rsa.stepKeyPairGenerationState(n,0);return n.keys}Vt(n,r,i)};var Ht=function(e){var t=e.toString(16);if(t[0]>="8"){t="00"+t}return r.util.hexToBytes(t)};a.publicKeyToRSAPublicKey=function(e){return Kt.create(Kt.Class.UNIVERSAL,Kt.Type.SEQUENCE,true,[Kt.create(Kt.Class.UNIVERSAL,Kt.Type.INTEGER,false,Ht(e.n)),Kt.create(Kt.Class.UNIVERSAL,Kt.Type.INTEGER,false,Ht(e.e))])};var Yt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";s.encode64=function(e,t){var r="";var i="";var n,a,f;var s=0;while(s<e.length){n=e.charCodeAt(s++);a=e.charCodeAt(s++);f=e.charCodeAt(s++);r+=Yt.charAt(n>>2);r+=Yt.charAt((n&3)<<4|a>>4);if(isNaN(a)){r+="=="}else{r+=Yt.charAt((a&15)<<2|f>>6);r+=isNaN(f)?"=":Yt.charAt(f&63)}if(t&&r.length>t){i+=r.substr(0,t)+"\r\n";r=r.substr(t)}}i+=r;return i};a.publicKeyToRSAPublicKeyPem=function(e,t){var i=Kt.toDer(a.publicKeyToRSAPublicKey(e));i=r.util.encode64(i.getBytes(),t||64);return"-----BEGIN RSA PUBLIC KEY-----\r\n"+i+"\r\n-----END RSA PUBLIC KEY-----"};a.privateKeyToAsn1=a.privateKeyToRSAPrivateKey=function(e){return Kt.create(Kt.Class.UNIVERSAL,Kt.Type.SEQUENCE,true,[Kt.create(Kt.Class.UNIVERSAL,Kt.Type.INTEGER,false,String.fromCharCode(0)),Kt.create(Kt.Class.UNIVERSAL,Kt.Type.INTEGER,false,Ht(e.n)),Kt.create(Kt.Class.UNIVERSAL,Kt.Type.INTEGER,false,Ht(e.e)),Kt.create(Kt.Class.UNIVERSAL,Kt.Type.INTEGER,false,Ht(e.d)),Kt.create(Kt.Class.UNIVERSAL,Kt.Type.INTEGER,false,Ht(e.p)),Kt.create(Kt.Class.UNIVERSAL,Kt.Type.INTEGER,false,Ht(e.q)),Kt.create(Kt.Class.UNIVERSAL,Kt.Type.INTEGER,false,Ht(e.dP)),Kt.create(Kt.Class.UNIVERSAL,Kt.Type.INTEGER,false,Ht(e.dQ)),Kt.create(Kt.Class.UNIVERSAL,Kt.Type.INTEGER,false,Ht(e.qInv))])};a.privateKeyToPem=function(e,t){var i=Kt.toDer(a.privateKeyToAsn1(e));i=r.util.encode64(i.getBytes(),t||64);return"-----BEGIN RSA PRIVATE KEY-----\r\n"+i+"\r\n-----END RSA PRIVATE KEY-----"}}).call(this,e("_process"))},{_process:108}],98:[function(e,t,r){var i=e("bn.js");var n=e("brorand");function a(e){this.rand=e||new n.Rand}t.exports=a;a.create=function f(e){return new a(e)};a.prototype._rand=function s(e){var t=e.bitLength();var r=this.rand.generate(Math.ceil(t/8));r[0]|=3;var n=t&7;if(n!==0)r[r.length-1]>>=7-n;return new i(r)};a.prototype.test=function o(e,t,r){var n=e.bitLength();var a=i.mont(e);var f=new i(1).toRed(a);if(!t)t=Math.max(1,n/48|0);var s=e.subn(1);var o=s.subn(1);for(var c=0;!s.testn(c);c++){}var h=e.shrn(c);var d=s.toRed(a);var u=true;for(;t>0;t--){var l=this._rand(o);if(r)r(l);var p=l.toRed(a).redPow(h);if(p.cmp(f)===0||p.cmp(d)===0)continue;for(var b=1;b<c;b++){p=p.redSqr();if(p.cmp(f)===0)return false;if(p.cmp(d)===0)break}if(b===c)return false}return u};a.prototype.getDivisor=function c(e,t){var r=e.bitLength();var n=i.mont(e);var a=new i(1).toRed(n);if(!t)t=Math.max(1,r/48|0);var f=e.subn(1);var s=f.subn(1);for(var o=0;!f.testn(o);o++){}var c=e.shrn(o);var h=f.toRed(n);for(;t>0;t--){var d=this._rand(s);var u=e.gcd(d);if(u.cmpn(1)!==0)return u;var l=d.toRed(n).redPow(c);if(l.cmp(a)===0||l.cmp(h)===0)continue;for(var p=1;p<o;p++){l=l.redSqr();if(l.cmp(a)===0)return l.fromRed().subn(1).gcd(e);if(l.cmp(h)===0)break}if(p===o){l=l.redSqr();return l.fromRed().subn(1).gcd(e)}}return false}},{"bn.js":17,brorand:18}],99:[function(e,t,r){t.exports=i;function i(e,t){if(!e)throw new Error(t||"Assertion failed")}i.equal=function n(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)}},{}],100:[function(e,t,r){(function(r){var i=e("invert-hash");var n=t.exports=function(){if(arguments.length===1){return n.decode.apply(this,arguments)}else if(arguments.length>1){return n.encode.apply(this,arguments)}throw new Error("multihash must be called with the encode or decode parameters.")};n.names={sha1:17,"sha2-256":18,"sha2-512":19,sha3:20,blake2b:64,blake2s:65};n.codes=i(n.names);n.defaultLengths={17:20,18:32,19:64,20:64,64:64,65:32};n.encode=function a(e,t,i){if(!e||!t){throw new Error("multihash encode requires at least two args: hashfn, digest")}t=n.coerceCode(t);if(!r.isBuffer(e)){throw new Error("digest should be a Buffer")}if(!i){i=e.length}if(i&&e.length!==i){throw new Error("digest length should be equal to specified length.")}if(i>127){throw new Error("multihash does not yet support digest lengths greater than 127 bytes.")}return r.concat([new r([t,i]),e])};n.decode=function f(e){var t=n.validate(e);if(t){throw t}var r={};r.code=e[0];r.name=n.codes[r.code];r.length=e[1];r.digest=e.slice(2);return r};n.validate=function s(e){if(!r.isBuffer(e)){return new Error("multihash must be a Buffer")}if(e.length<3){return new Error("multihash too short. must be > 3 bytes.")}if(e.length>129){return new Error("multihash too long. must be < 129 bytes.")}if(!n.isAppCode(e[0])&&!n.codes[e[0]]){return new Error("multihash unknown function code: 0x"+e[0].toString(16))}if(e.slice(2).length!==e[1]){return new Error("multihash length inconsistent: 0x"+e.toString("hex"))}return false};n.coerceCode=function o(e){var t=e;if(typeof e==="string"){if(!n.names[e]){throw new Error("Unrecognized hash function named: "+e)}t=n.names[e]}if(typeof t!=="number"){throw new Error("Hash function code should be a number. Got: "+t)}if(!n.codes[t]&&!n.isAppCode(t)){throw new Error("Unrecognized function code: "+t)}return t};n.isAppCode=function c(e){return e>0&&e<16}}).call(this,e("buffer").Buffer)},{buffer:46,"invert-hash":93}],101:[function(e,t,r){(function(r){var i=e("multihashes");var n=e("webcrypto");var a=t.exports=f;a.Buffer=r;function f(e,t,r){return i.encode(a.digest(e,t,r),t,r)}a.multihash=i;a.digest=function(e,t,r){var i=a.createHash(t).update(e).digest();if(r){i=i.slice(0,r)}return i};a.createHash=function(e,t){e=i.coerceCode(e);if(!a.functions[e]){throw new Error("multihash function "+e+" not yet supported")}return a.functions[e]()};a.functions={17:s,18:o,19:c};function s(){return n.createHash("sha1")}function o(){return n.createHash("sha256")}function c(){return n.createHash("sha512")}}).call(this,e("buffer").Buffer)},{buffer:46,multihashes:100,webcrypto:139}],102:[function(e,t,r){t.exports={"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}},{}],103:[function(e,t,r){var i=e("asn1.js");var n=i.define("RSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())});r.RSAPrivateKey=n;var a=i.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});r.RSAPublicKey=a;var f=i.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(s),this.key("subjectPublicKey").bitstr())});r.PublicKey=f;var s=i.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())});var o=i.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(s),this.key("subjectPrivateKey").octstr())});r.PrivateKey=o;var c=i.define("EncryptedPrivateKeyInfo",function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())});r.EncryptedPrivateKey=c;var h=i.define("DSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())});r.DSAPrivateKey=h;r.DSAparam=i.define("DSAparam",function(){this.int()});var d=i.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(u),this.key("publicKey").optional().explicit(1).bitstr())});r.ECPrivateKey=d;var u=i.define("ECParameters",function(){this.choice({namedCurve:this.objid()})});r.signature=i.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())})},{"asn1.js":1}],104:[function(e,t,r){(function(r){var i=/Proc-Type: 4,ENCRYPTED\r?\nDEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)\r?\n\r?\n([0-9A-z\n\r\+\/\=]+)\r?\n/m;var n=/^-----BEGIN (.*) KEY-----\r?\n/m;var a=/^-----BEGIN (.*) KEY-----\r?\n([0-9A-z\n\r\+\/\=]+)\r?\n-----END \1 KEY-----$/m;var f=e("evp_bytestokey");var s=e("browserify-aes");t.exports=function(e,t){var o=e.toString();var c=o.match(i);var h;if(!c){var d=o.match(a);h=new r(d[2].replace(/\r?\n/g,""),"base64")}else{var u="aes"+c[1];var l=new r(c[2],"hex");var p=new r(c[3].replace(/\r?\n/g,""),"base64");var b=f(t,l.slice(0,8),parseInt(c[1],10)).key;var v=[];var y=s.createDecipheriv(u,b,l);v.push(y.update(p));v.push(y.final());h=r.concat(v)}var g=o.match(n)[1]+" KEY";return{tag:g,data:h}}}).call(this,e("buffer").Buffer)},{"browserify-aes":22,buffer:46,evp_bytestokey:83}],105:[function(e,t,r){(function(r){var i=e("./asn1");var n=e("./aesid.json");var a=e("./fixProc");var f=e("browserify-aes");var s=e("pbkdf2");t.exports=o;function o(e){var t;if(typeof e==="object"&&!r.isBuffer(e)){t=e.passphrase;e=e.key}if(typeof e==="string"){e=new r(e)}var n=a(e,t);var f=n.tag;var s=n.data;var o,h;switch(f){case"PUBLIC KEY":h=i.PublicKey.decode(s,"der");o=h.algorithm.algorithm.join(".");switch(o){case"1.2.840.113549.1.1.1":return i.RSAPublicKey.decode(h.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":h.subjectPrivateKey=h.subjectPublicKey;return{type:"ec",data:h};case"1.2.840.10040.4.1":h.algorithm.params.pub_key=i.DSAparam.decode(h.subjectPublicKey.data,"der");return{type:"dsa",data:h.algorithm.params};default:throw new Error("unknown key id "+o)}throw new Error("unknown key type "+f);case"ENCRYPTED PRIVATE KEY":s=i.EncryptedPrivateKey.decode(s,"der");s=c(s,t);case"PRIVATE KEY":h=i.PrivateKey.decode(s,"der");o=h.algorithm.algorithm.join(".");switch(o){case"1.2.840.113549.1.1.1":return i.RSAPrivateKey.decode(h.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:h.algorithm.curve,privateKey:i.ECPrivateKey.decode(h.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":h.algorithm.params.priv_key=i.DSAparam.decode(h.subjectPrivateKey,"der");return{type:"dsa",params:h.algorithm.params};default:throw new Error("unknown key id "+o)}throw new Error("unknown key type "+f);case"RSA PUBLIC KEY":return i.RSAPublicKey.decode(s,"der");case"RSA PRIVATE KEY":return i.RSAPrivateKey.decode(s,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:i.DSAPrivateKey.decode(s,"der")};case"EC PRIVATE KEY":s=i.ECPrivateKey.decode(s,"der");return{curve:s.parameters.value,privateKey:s.privateKey};default:throw new Error("unknown key type "+f)}}o.signature=i.signature;function c(e,t){var i=e.algorithm.decrypt.kde.kdeparams.salt;var a=parseInt(e.algorithm.decrypt.kde.kdeparams.iters.toString(),10);var o=n[e.algorithm.decrypt.cipher.algo.join(".")];var c=e.algorithm.decrypt.cipher.iv;var h=e.subjectPrivateKey;var d=parseInt(o.split("-")[1],10)/8;var u=s.pbkdf2Sync(t,i,a,d);var l=f.createDecipheriv(o,u,c);var p=[];p.push(l.update(h));p.push(l.final());return r.concat(p)}}).call(this,e("buffer").Buffer)},{"./aesid.json":102,"./asn1":103,"./fixProc":104,"browserify-aes":22,buffer:46,pbkdf2:106}],106:[function(e,t,r){(function(t){var i=e("create-hmac");var n=Math.pow(2,30)-1;r.pbkdf2=a;function a(e,t,r,i,n,a){if(typeof n==="function"){a=n;n=undefined}if(typeof a!=="function"){throw new Error("No callback provided to pbkdf2")}var s=f(e,t,r,i,n);setTimeout(function(){a(undefined,s)})}r.pbkdf2Sync=f;function f(e,r,a,f,s){if(typeof a!=="number"){throw new TypeError("Iterations not a number")}if(a<0){throw new TypeError("Bad iterations")}if(typeof f!=="number"){throw new TypeError("Key length not a number")}if(f<0||f>n){throw new TypeError("Bad key length")}s=s||"sha1";if(!t.isBuffer(e))e=new t(e,"binary");if(!t.isBuffer(r))r=new t(r,"binary");var o;var c=1;var h=new t(f);var d=new t(r.length+4);r.copy(d,0,0,r.length);var u;var l;for(var p=1;p<=c;p++){d.writeUInt32BE(p,r.length);var b=i(s,e).update(d).digest();if(!o){o=b.length;l=new t(o);c=Math.ceil(f/o);u=f-(c-1)*o}b.copy(l,0,0,o);for(var v=1;v<a;v++){b=i(s,e).update(b).digest();for(var y=0;y<o;y++){l[y]^=b[y]}}var g=(p-1)*o;var m=p===c?u:o;l.copy(h,g,0,m)}return h}}).call(this,e("buffer").Buffer)},{buffer:46,"create-hmac":53}],107:[function(e,t,r){(function(e){"use strict";t.exports=r;function r(t){var r=new Array(arguments.length-1);var i=0;while(i<r.length){r[i++]=arguments[i]}e.nextTick(function n(){t.apply(null,r)})}}).call(this,e("_process"))},{_process:108}],108:[function(e,t,r){var i=t.exports={};var n=[];var a=false;var f;var s=-1;function o(){a=false;if(f.length){n=f.concat(n)}else{s=-1}if(n.length){c()}}function c(){if(a){return}var e=setTimeout(o);a=true;var t=n.length;while(t){f=n;n=[];while(++s<t){if(f){f[s].run()}}s=-1;t=n.length}f=null;a=false;clearTimeout(e)}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1){for(var r=1;r<arguments.length;r++){t[r-1]=arguments[r]}}n.push(new h(e,t));if(n.length===1&&!a){setTimeout(c,0)}};function h(e,t){this.fun=e;this.array=t}h.prototype.run=function(){this.fun.apply(null,this.array)};i.title="browser";i.browser=true;i.env={};i.argv=[];i.version="";i.versions={};function d(){}i.on=d;i.addListener=d;i.once=d;i.off=d;i.removeListener=d;i.removeAllListeners=d;i.emit=d;i.binding=function(e){throw new Error("process.binding is not supported")};i.cwd=function(){return"/"};i.chdir=function(e){throw new Error("process.chdir is not supported")};i.umask=function(){return 0}},{}],109:[function(e,t,r){r.publicEncrypt=e("./publicEncrypt");r.privateDecrypt=e("./privateDecrypt");r.privateEncrypt=function i(e,t){return r.publicEncrypt(e,t,true)};r.publicDecrypt=function n(e,t){return r.privateDecrypt(e,t,true)}},{"./privateDecrypt":111,"./publicEncrypt":112}],110:[function(e,t,r){(function(r){var i=e("create-hash");t.exports=function(e,t){var a=new r("");var f=0,s;while(a.length<t){s=n(f++);a=r.concat([a,i("sha1").update(e).update(s).digest()])}return a.slice(0,t)};function n(e){var t=new r(4);t.writeUInt32BE(e,0);return t}}).call(this,e("buffer").Buffer)},{buffer:46,"create-hash":50}],111:[function(e,t,r){(function(r){var i=e("parse-asn1");var n=e("./mgf");var a=e("./xor");var f=e("bn.js");var s=e("browserify-rsa");var o=e("create-hash");var c=e("./withPublic");t.exports=function l(e,t,n){var a;if(e.padding){a=e.padding}else if(n){a=1}else{a=4}var o=i(e);var u=o.modulus.byteLength();if(t.length>u||new f(t).cmp(o.modulus)>=0){throw new Error("decryption error")}var l;if(n){l=c(new f(t),o)}else{l=s(t,o)}var p=new r(u-l.length);p.fill(0);l=r.concat([p,l],u);if(a===4){return h(o,l)}else if(a===1){return d(o,l,n)}else if(a===3){return l}else{throw new Error("unknown padding")}};function h(e,t){var i=e.modulus;var f=e.modulus.byteLength();var s=t.length;var c=o("sha1").update(new r("")).digest();var h=c.length;var d=2*h;if(t[0]!==0){throw new Error("decryption error")}var l=t.slice(1,h+1);var p=t.slice(h+1);var b=a(l,n(p,h));var v=a(p,n(b,f-h-1));if(u(c,v.slice(0,h))){throw new Error("decryption error")}var y=h;while(v[y]===0){y++}if(v[y++]!==1){throw new Error("decryption error")}return v.slice(y)}function d(e,t,r){var i=t.slice(0,2);var n=2;var a=0;while(t[n++]!==0){if(n>=t.length){a++;break}}var f=t.slice(2,n-1);var s=t.slice(n-1,n);if(i.toString("hex")!=="0002"&&!r||i.toString("hex")!=="0001"&&r){a++}if(f.length<8){a++}if(a){throw new Error("decryption error")}return t.slice(n)}function u(e,t){e=new r(e);t=new r(t);var i=0;var n=e.length;if(e.length!==t.length){i++;n=Math.min(e.length,t.length)}var a=-1;while(++a<n){i+=e[a]^t[a]}return i}}).call(this,e("buffer").Buffer)},{"./mgf":110,"./withPublic":113,"./xor":114,"bn.js":17,"browserify-rsa":38,buffer:46,"create-hash":50,"parse-asn1":105}],112:[function(e,t,r){(function(r){var i=e("parse-asn1");var n=e("randombytes");var a=e("create-hash");var f=e("./mgf");var s=e("./xor");var o=e("bn.js");var c=e("./withPublic");var h=e("browserify-rsa");var d={RSA_PKCS1_OAEP_PADDING:4,RSA_PKCS1_PADDIN:1,RSA_NO_PADDING:3};t.exports=function b(e,t,r){var n;if(e.padding){n=e.padding}else if(r){n=1}else{n=4}var a=i(e);var f;if(n===4){f=u(a,t)}else if(n===1){f=l(a,t,r)}else if(n===3){f=new o(t);if(f.cmp(a.modulus)>=0){throw new Error("data too long for modulus")}}else{throw new Error("unknown padding")}if(r){return h(f,a)}else{return c(f,a)}};function u(e,t){var i=e.modulus.byteLength();var c=t.length;var h=a("sha1").update(new r("")).digest();var d=h.length;var u=2*d;if(c>i-u-2){throw new Error("message too long")}var l=new r(i-c-u-2);l.fill(0);var p=i-d-1;var b=n(d);var v=s(r.concat([h,l,new r([1]),t],p),f(b,p));var y=s(b,f(v,d));return new o(r.concat([new r([0]),y,v],i))}function l(e,t,i){var n=t.length;var a=e.modulus.byteLength();if(n>a-11){throw new Error("message too long")}var f;if(i){f=new r(a-n-3);f.fill(255)}else{f=p(a-n-3)}return new o(r.concat([new r([0,i?1:2]),f,new r([0]),t],a))}function p(e,t){var i=new r(e);var a=0;var f=n(e*2);var s=0;var o;while(a<e){if(s===f.length){f=n(e*2);s=0}o=f[s++];if(o){i[a++]=o}}return i}}).call(this,e("buffer").Buffer)},{"./mgf":110,"./withPublic":113,"./xor":114,"bn.js":17,"browserify-rsa":38,buffer:46,"create-hash":50,"parse-asn1":105,randombytes:115}],113:[function(e,t,r){(function(r){var i=e("bn.js");function n(e,t){return new r(e.toRed(i.mont(t.modulus)).redPow(new i(t.publicExponent)).fromRed().toArray())}t.exports=n}).call(this,e("buffer").Buffer)},{"bn.js":17,buffer:46}],114:[function(e,t,r){t.exports=function i(e,t){var r=e.length;var i=-1;while(++i<r){e[i]^=t[i]}return e}},{}],115:[function(e,t,r){(function(e,r,i){"use strict";var n=r.crypto||r.msCrypto;if(n&&n.getRandomValues){t.exports=a}else{t.exports=f}function a(t,r){var a=new i(t);n.getRandomValues(a);if(typeof r==="function"){return e.nextTick(function(){r(null,a)})}return a}function f(){throw new Error("secure random number generation not supported by this browser\n"+"use chrome, FireFox or Internet Explorer 11")}}).call(this,e("_process"),typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{},e("buffer").Buffer)},{_process:108,buffer:46}],116:[function(e,t,r){t.exports=e("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":117}],117:[function(e,t,r){"use strict";var i=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};t.exports=d;var n=e("process-nextick-args");var a=e("core-util-is");a.inherits=e("inherits");var f=e("./_stream_readable");var s=e("./_stream_writable");a.inherits(d,f);var o=i(s.prototype);for(var c=0;c<o.length;c++){var h=o[c];if(!d.prototype[h])d.prototype[h]=s.prototype[h]}function d(e){if(!(this instanceof d))return new d(e);f.call(this,e);s.call(this,e);if(e&&e.readable===false)this.readable=false;if(e&&e.writable===false)this.writable=false;this.allowHalfOpen=true;if(e&&e.allowHalfOpen===false)this.allowHalfOpen=false;this.once("end",u)}function u(){if(this.allowHalfOpen||this._writableState.ended)return;n(l,this)}function l(e){e.end()}function p(e,t){for(var r=0,i=e.length;r<i;r++){t(e[r],r)}}},{"./_stream_readable":119,"./_stream_writable":121,"core-util-is":48,inherits:92,"process-nextick-args":107}],118:[function(e,t,r){"use strict";t.exports=a;var i=e("./_stream_transform");var n=e("core-util-is");n.inherits=e("inherits");n.inherits(a,i);function a(e){if(!(this instanceof a))return new a(e);i.call(this,e)}a.prototype._transform=function(e,t,r){r(null,e)}},{"./_stream_transform":120,"core-util-is":48,inherits:92}],119:[function(e,t,r){(function(r){"use strict";t.exports=p;var i=e("process-nextick-args");var n=e("isarray");var a=e("buffer").Buffer;p.ReadableState=l;var f=e("events");var s=function(e,t){return e.listeners(t).length};var o;(function(){try{o=e("st"+"ream")}catch(t){}finally{if(!o)o=e("events").EventEmitter}})();var a=e("buffer").Buffer;var c=e("core-util-is");c.inherits=e("inherits");var h=e("util");var d;if(h&&h.debuglog){d=h.debuglog("stream")}else{d=function(){}}var u;c.inherits(p,o);function l(t,r){var i=e("./_stream_duplex");t=t||{};this.objectMode=!!t.objectMode;if(r instanceof i)this.objectMode=this.objectMode||!!t.readableObjectMode;var n=t.highWaterMark;var a=this.objectMode?16:16*1024;this.highWaterMark=n||n===0?n:a;this.highWaterMark=~~this.highWaterMark;this.buffer=[];this.length=0;this.pipes=null;this.pipesCount=0;this.flowing=null;this.ended=false;this.endEmitted=false;this.reading=false;this.sync=true;this.needReadable=false;this.emittedReadable=false;this.readableListening=false;this.defaultEncoding=t.defaultEncoding||"utf8";this.ranOut=false;this.awaitDrain=0;this.readingMore=false;this.decoder=null;this.encoding=null;if(t.encoding){if(!u)u=e("string_decoder/").StringDecoder;this.decoder=new u(t.encoding);this.encoding=t.encoding}}function p(t){var r=e("./_stream_duplex");if(!(this instanceof p))return new p(t);this._readableState=new l(t,this);this.readable=true;if(t&&typeof t.read==="function")this._read=t.read;o.call(this)}p.prototype.push=function(e,t){var r=this._readableState;if(!r.objectMode&&typeof e==="string"){t=t||r.defaultEncoding;if(t!==r.encoding){e=new a(e,t);t=""}}return b(this,r,e,t,false)};p.prototype.unshift=function(e){var t=this._readableState;return b(this,t,e,"",true)};p.prototype.isPaused=function(){return this._readableState.flowing===false};function b(e,t,r,i,n){var a=w(t,r);if(a){e.emit("error",a)}else if(r===null){t.reading=false;_(e,t)}else if(t.objectMode||r&&r.length>0){if(t.ended&&!n){var f=new Error("stream.push() after EOF");e.emit("error",f)}else if(t.endEmitted&&n){var f=new Error("stream.unshift() after end event");e.emit("error",f)}else{if(t.decoder&&!n&&!i)r=t.decoder.write(r);if(!n)t.reading=false;if(t.flowing&&t.length===0&&!t.sync){e.emit("data",r);e.read(0)}else{t.length+=t.objectMode?1:r.length;if(n)t.buffer.unshift(r);else t.buffer.push(r);if(t.needReadable)S(e)}B(e,t)}}else if(!n){t.reading=false}return v(t)}function v(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||e.length===0)}p.prototype.setEncoding=function(t){if(!u)u=e("string_decoder/").StringDecoder;this._readableState.decoder=new u(t);this._readableState.encoding=t;return this};var y=8388608;function g(e){if(e>=y){e=y}else{e--;e|=e>>>1;e|=e>>>2;e|=e>>>4;e|=e>>>8;e|=e>>>16;e++}return e}function m(e,t){if(t.length===0&&t.ended)return 0;if(t.objectMode)return e===0?0:1;if(e===null||isNaN(e)){if(t.flowing&&t.buffer.length)return t.buffer[0].length;else return t.length}if(e<=0)return 0;if(e>t.highWaterMark)t.highWaterMark=g(e);if(e>t.length){if(!t.ended){t.needReadable=true;return 0}else{return t.length}}return e}p.prototype.read=function(e){d("read",e);var t=this._readableState;var r=e;if(typeof e!=="number"||e>0)t.emittedReadable=false;if(e===0&&t.needReadable&&(t.length>=t.highWaterMark||t.ended)){d("read: emitReadable",t.length,t.ended);if(t.length===0&&t.ended)M(this);else S(this);return null}e=m(e,t);if(e===0&&t.ended){if(t.length===0)M(this);return null}var i=t.needReadable;d("need readable",i);if(t.length===0||t.length-e<t.highWaterMark){i=true;d("length less than watermark",i)}if(t.ended||t.reading){i=false;d("reading or ended",i)}if(i){d("do read");t.reading=true;t.sync=true;if(t.length===0)t.needReadable=true;this._read(t.highWaterMark);t.sync=false}if(i&&!t.reading)e=m(r,t);var n;if(e>0)n=C(e,t);else n=null;if(n===null){t.needReadable=true;e=0}t.length-=e;if(t.length===0&&!t.ended)t.needReadable=true;if(r!==e&&t.ended&&t.length===0)M(this);if(n!==null)this.emit("data",n);return n};function w(e,t){var r=null;if(!a.isBuffer(t)&&typeof t!=="string"&&t!==null&&t!==undefined&&!e.objectMode){r=new TypeError("Invalid non-string/buffer chunk")}return r}function _(e,t){if(t.ended)return;if(t.decoder){var r=t.decoder.end();if(r&&r.length){t.buffer.push(r);t.length+=t.objectMode?1:r.length}}t.ended=true;S(e)}function S(e){var t=e._readableState;t.needReadable=false;if(!t.emittedReadable){d("emitReadable",t.flowing);t.emittedReadable=true;if(t.sync)i(E,e);else E(e)}}function E(e){d("emit readable");e.emit("readable");T(e)}function B(e,t){if(!t.readingMore){t.readingMore=true;i(A,e,t)}}function A(e,t){var r=t.length;while(!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark){d("maybeReadMore read 0");e.read(0);if(r===t.length)break;else r=t.length}t.readingMore=false}p.prototype._read=function(e){this.emit("error",new Error("not implemented"))};p.prototype.pipe=function(e,t){var a=this;var f=this._readableState;switch(f.pipesCount){case 0:f.pipes=e;break;case 1:f.pipes=[f.pipes,e];break;default:f.pipes.push(e);break}f.pipesCount+=1;d("pipe count=%d opts=%j",f.pipesCount,t);var o=(!t||t.end!==false)&&e!==r.stdout&&e!==r.stderr;var c=o?u:b;if(f.endEmitted)i(c);else a.once("end",c);e.on("unpipe",h);function h(e){d("onunpipe");if(e===a){b()}}function u(){d("onend");e.end()}var l=I(a);e.on("drain",l);var p=false;function b(){d("cleanup");e.removeListener("close",g);e.removeListener("finish",m);e.removeListener("drain",l);e.removeListener("error",y);e.removeListener("unpipe",h);a.removeListener("end",u);a.removeListener("end",b);a.removeListener("data",v);p=true;if(f.awaitDrain&&(!e._writableState||e._writableState.needDrain))l()}a.on("data",v);function v(t){d("ondata");var r=e.write(t);if(false===r){if(f.pipesCount===1&&f.pipes[0]===e&&a.listenerCount("data")===1&&!p){d("false write response, pause",a._readableState.awaitDrain);a._readableState.awaitDrain++}a.pause()}}function y(t){d("onerror",t);w();e.removeListener("error",y);if(s(e,"error")===0)e.emit("error",t)}if(!e._events||!e._events.error)e.on("error",y);else if(n(e._events.error))e._events.error.unshift(y);else e._events.error=[y,e._events.error];function g(){e.removeListener("finish",m);w()}e.once("close",g);function m(){d("onfinish");e.removeListener("close",g);w()}e.once("finish",m);function w(){d("unpipe");a.unpipe(e)}e.emit("pipe",a);if(!f.flowing){d("pipe resume");a.resume()}return e};function I(e){return function(){var t=e._readableState;d("pipeOnDrain",t.awaitDrain);if(t.awaitDrain)t.awaitDrain--;if(t.awaitDrain===0&&s(e,"data")){t.flowing=true;T(e)}}}p.prototype.unpipe=function(e){var t=this._readableState;if(t.pipesCount===0)return this;if(t.pipesCount===1){if(e&&e!==t.pipes)return this;if(!e)e=t.pipes;t.pipes=null;t.pipesCount=0;t.flowing=false;if(e)e.emit("unpipe",this);return this}if(!e){var r=t.pipes;var i=t.pipesCount;t.pipes=null;t.pipesCount=0;t.flowing=false;for(var n=0;n<i;n++)r[n].emit("unpipe",this);
|
|
return this}var n=L(t.pipes,e);if(n===-1)return this;t.pipes.splice(n,1);t.pipesCount-=1;if(t.pipesCount===1)t.pipes=t.pipes[0];e.emit("unpipe",this);return this};p.prototype.on=function(e,t){var r=o.prototype.on.call(this,e,t);if(e==="data"&&false!==this._readableState.flowing){this.resume()}if(e==="readable"&&this.readable){var n=this._readableState;if(!n.readableListening){n.readableListening=true;n.emittedReadable=false;n.needReadable=true;if(!n.reading){i(k,this)}else if(n.length){S(this,n)}}}return r};p.prototype.addListener=p.prototype.on;function k(e){d("readable nexttick read 0");e.read(0)}p.prototype.resume=function(){var e=this._readableState;if(!e.flowing){d("resume");e.flowing=true;x(this,e)}return this};function x(e,t){if(!t.resumeScheduled){t.resumeScheduled=true;i(R,e,t)}}function R(e,t){if(!t.reading){d("resume read 0");e.read(0)}t.resumeScheduled=false;e.emit("resume");T(e);if(t.flowing&&!t.reading)e.read(0)}p.prototype.pause=function(){d("call pause flowing=%j",this._readableState.flowing);if(false!==this._readableState.flowing){d("pause");this._readableState.flowing=false;this.emit("pause")}return this};function T(e){var t=e._readableState;d("flow",t.flowing);if(t.flowing){do{var r=e.read()}while(null!==r&&t.flowing)}}p.prototype.wrap=function(e){var t=this._readableState;var r=false;var i=this;e.on("end",function(){d("wrapped end");if(t.decoder&&!t.ended){var e=t.decoder.end();if(e&&e.length)i.push(e)}i.push(null)});e.on("data",function(n){d("wrapped data");if(t.decoder)n=t.decoder.write(n);if(t.objectMode&&(n===null||n===undefined))return;else if(!t.objectMode&&(!n||!n.length))return;var a=i.push(n);if(!a){r=true;e.pause()}});for(var n in e){if(this[n]===undefined&&typeof e[n]==="function"){this[n]=function(t){return function(){return e[t].apply(e,arguments)}}(n)}}var a=["error","close","destroy","pause","resume"];D(a,function(t){e.on(t,i.emit.bind(i,t))});i._read=function(t){d("wrapped _read",t);if(r){r=false;e.resume()}};return i};p._fromList=C;function C(e,t){var r=t.buffer;var i=t.length;var n=!!t.decoder;var f=!!t.objectMode;var s;if(r.length===0)return null;if(i===0)s=null;else if(f)s=r.shift();else if(!e||e>=i){if(n)s=r.join("");else if(r.length===1)s=r[0];else s=a.concat(r,i);r.length=0}else{if(e<r[0].length){var o=r[0];s=o.slice(0,e);r[0]=o.slice(e)}else if(e===r[0].length){s=r.shift()}else{if(n)s="";else s=new a(e);var c=0;for(var h=0,d=r.length;h<d&&c<e;h++){var o=r[0];var u=Math.min(e-c,o.length);if(n)s+=o.slice(0,u);else o.copy(s,c,0,u);if(u<o.length)r[0]=o.slice(u);else r.shift();c+=u}}}return s}function M(e){var t=e._readableState;if(t.length>0)throw new Error("endReadable called on non-empty stream");if(!t.endEmitted){t.ended=true;i(P,t,e)}}function P(e,t){if(!e.endEmitted&&e.length===0){e.endEmitted=true;t.readable=false;t.emit("end")}}function D(e,t){for(var r=0,i=e.length;r<i;r++){t(e[r],r)}}function L(e,t){for(var r=0,i=e.length;r<i;r++){if(e[r]===t)return r}return-1}}).call(this,e("_process"))},{"./_stream_duplex":117,_process:108,buffer:46,"core-util-is":48,events:82,inherits:92,isarray:96,"process-nextick-args":107,"string_decoder/":136,util:19}],120:[function(e,t,r){"use strict";t.exports=s;var i=e("./_stream_duplex");var n=e("core-util-is");n.inherits=e("inherits");n.inherits(s,i);function a(e){this.afterTransform=function(t,r){return f(e,t,r)};this.needTransform=false;this.transforming=false;this.writecb=null;this.writechunk=null}function f(e,t,r){var i=e._transformState;i.transforming=false;var n=i.writecb;if(!n)return e.emit("error",new Error("no writecb in Transform class"));i.writechunk=null;i.writecb=null;if(r!==null&&r!==undefined)e.push(r);if(n)n(t);var a=e._readableState;a.reading=false;if(a.needReadable||a.length<a.highWaterMark){e._read(a.highWaterMark)}}function s(e){if(!(this instanceof s))return new s(e);i.call(this,e);this._transformState=new a(this);var t=this;this._readableState.needReadable=true;this._readableState.sync=false;if(e){if(typeof e.transform==="function")this._transform=e.transform;if(typeof e.flush==="function")this._flush=e.flush}this.once("prefinish",function(){if(typeof this._flush==="function")this._flush(function(e){o(t,e)});else o(t)})}s.prototype.push=function(e,t){this._transformState.needTransform=false;return i.prototype.push.call(this,e,t)};s.prototype._transform=function(e,t,r){throw new Error("not implemented")};s.prototype._write=function(e,t,r){var i=this._transformState;i.writecb=r;i.writechunk=e;i.writeencoding=t;if(!i.transforming){var n=this._readableState;if(i.needTransform||n.needReadable||n.length<n.highWaterMark)this._read(n.highWaterMark)}};s.prototype._read=function(e){var t=this._transformState;if(t.writechunk!==null&&t.writecb&&!t.transforming){t.transforming=true;this._transform(t.writechunk,t.writeencoding,t.afterTransform)}else{t.needTransform=true}};function o(e,t){if(t)return e.emit("error",t);var r=e._writableState;var i=e._transformState;if(r.length)throw new Error("calling transform done when ws.length != 0");if(i.transforming)throw new Error("calling transform done when still transforming");return e.push(null)}},{"./_stream_duplex":117,"core-util-is":48,inherits:92}],121:[function(e,t,r){"use strict";t.exports=d;var i=e("process-nextick-args");var n=e("buffer").Buffer;d.WritableState=h;var a=e("core-util-is");a.inherits=e("inherits");var f={deprecate:e("util-deprecate")};var s;(function(){try{s=e("st"+"ream")}catch(t){}finally{if(!s)s=e("events").EventEmitter}})();var n=e("buffer").Buffer;a.inherits(d,s);function o(){}function c(e,t,r){this.chunk=e;this.encoding=t;this.callback=r;this.next=null}function h(t,r){var i=e("./_stream_duplex");t=t||{};this.objectMode=!!t.objectMode;if(r instanceof i)this.objectMode=this.objectMode||!!t.writableObjectMode;var n=t.highWaterMark;var a=this.objectMode?16:16*1024;this.highWaterMark=n||n===0?n:a;this.highWaterMark=~~this.highWaterMark;this.needDrain=false;this.ending=false;this.ended=false;this.finished=false;var f=t.decodeStrings===false;this.decodeStrings=!f;this.defaultEncoding=t.defaultEncoding||"utf8";this.length=0;this.writing=false;this.corked=0;this.sync=true;this.bufferProcessing=false;this.onwrite=function(e){m(r,e)};this.writecb=null;this.writelen=0;this.bufferedRequest=null;this.lastBufferedRequest=null;this.pendingcb=0;this.prefinished=false;this.errorEmitted=false}h.prototype.getBuffer=function k(){var e=this.bufferedRequest;var t=[];while(e){t.push(e);e=e.next}return t};(function(){try{Object.defineProperty(h.prototype,"buffer",{get:f.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer "+"instead.")})}catch(e){}})();function d(t){var r=e("./_stream_duplex");if(!(this instanceof d)&&!(this instanceof r))return new d(t);this._writableState=new h(t,this);this.writable=true;if(t){if(typeof t.write==="function")this._write=t.write;if(typeof t.writev==="function")this._writev=t.writev}s.call(this)}d.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe. Not readable."))};function u(e,t){var r=new Error("write after end");e.emit("error",r);i(t,r)}function l(e,t,r,a){var f=true;if(!n.isBuffer(r)&&typeof r!=="string"&&r!==null&&r!==undefined&&!t.objectMode){var s=new TypeError("Invalid non-string/buffer chunk");e.emit("error",s);i(a,s);f=false}return f}d.prototype.write=function(e,t,r){var i=this._writableState;var a=false;if(typeof t==="function"){r=t;t=null}if(n.isBuffer(e))t="buffer";else if(!t)t=i.defaultEncoding;if(typeof r!=="function")r=o;if(i.ended)u(this,r);else if(l(this,i,e,r)){i.pendingcb++;a=b(this,i,e,t,r)}return a};d.prototype.cork=function(){var e=this._writableState;e.corked++};d.prototype.uncork=function(){var e=this._writableState;if(e.corked){e.corked--;if(!e.writing&&!e.corked&&!e.finished&&!e.bufferProcessing&&e.bufferedRequest)S(this,e)}};d.prototype.setDefaultEncoding=function x(e){if(typeof e==="string")e=e.toLowerCase();if(!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);this._writableState.defaultEncoding=e};function p(e,t,r){if(!e.objectMode&&e.decodeStrings!==false&&typeof t==="string"){t=new n(t,r)}return t}function b(e,t,r,i,a){r=p(t,r,i);if(n.isBuffer(r))i="buffer";var f=t.objectMode?1:r.length;t.length+=f;var s=t.length<t.highWaterMark;if(!s)t.needDrain=true;if(t.writing||t.corked){var o=t.lastBufferedRequest;t.lastBufferedRequest=new c(r,i,a);if(o){o.next=t.lastBufferedRequest}else{t.bufferedRequest=t.lastBufferedRequest}}else{v(e,t,false,f,r,i,a)}return s}function v(e,t,r,i,n,a,f){t.writelen=i;t.writecb=f;t.writing=true;t.sync=true;if(r)e._writev(n,t.onwrite);else e._write(n,a,t.onwrite);t.sync=false}function y(e,t,r,n,a){--t.pendingcb;if(r)i(a,n);else a(n);e._writableState.errorEmitted=true;e.emit("error",n)}function g(e){e.writing=false;e.writecb=null;e.length-=e.writelen;e.writelen=0}function m(e,t){var r=e._writableState;var n=r.sync;var a=r.writecb;g(r);if(t)y(e,r,n,t,a);else{var f=E(r);if(!f&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest){S(e,r)}if(n){i(w,e,r,f,a)}else{w(e,r,f,a)}}}function w(e,t,r,i){if(!r)_(e,t);t.pendingcb--;i();A(e,t)}function _(e,t){if(t.length===0&&t.needDrain){t.needDrain=false;e.emit("drain")}}function S(e,t){t.bufferProcessing=true;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var i=[];var n=[];while(r){n.push(r.callback);i.push(r);r=r.next}t.pendingcb++;t.lastBufferedRequest=null;v(e,t,true,t.length,i,"",function(e){for(var r=0;r<n.length;r++){t.pendingcb--;n[r](e)}})}else{while(r){var a=r.chunk;var f=r.encoding;var s=r.callback;var o=t.objectMode?1:a.length;v(e,t,false,o,a,f,s);r=r.next;if(t.writing){break}}if(r===null)t.lastBufferedRequest=null}t.bufferedRequest=r;t.bufferProcessing=false}d.prototype._write=function(e,t,r){r(new Error("not implemented"))};d.prototype._writev=null;d.prototype.end=function(e,t,r){var i=this._writableState;if(typeof e==="function"){r=e;e=null;t=null}else if(typeof t==="function"){r=t;t=null}if(e!==null&&e!==undefined)this.write(e,t);if(i.corked){i.corked=1;this.uncork()}if(!i.ending&&!i.finished)I(this,i,r)};function E(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}function B(e,t){if(!t.prefinished){t.prefinished=true;e.emit("prefinish")}}function A(e,t){var r=E(t);if(r){if(t.pendingcb===0){B(e,t);t.finished=true;e.emit("finish")}else{B(e,t)}}return r}function I(e,t,r){t.ending=true;A(e,t);if(r){if(t.finished)i(r);else e.once("finish",r)}t.ended=true}},{"./_stream_duplex":117,buffer:46,"core-util-is":48,events:82,inherits:92,"process-nextick-args":107,"util-deprecate":137}],122:[function(e,t,r){t.exports=e("./lib/_stream_passthrough.js")},{"./lib/_stream_passthrough.js":118}],123:[function(e,t,r){var i=function(){try{return e("st"+"ream")}catch(t){}}();r=t.exports=e("./lib/_stream_readable.js");r.Stream=i||r;r.Readable=r;r.Writable=e("./lib/_stream_writable.js");r.Duplex=e("./lib/_stream_duplex.js");r.Transform=e("./lib/_stream_transform.js");r.PassThrough=e("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":117,"./lib/_stream_passthrough.js":118,"./lib/_stream_readable.js":119,"./lib/_stream_transform.js":120,"./lib/_stream_writable.js":121}],124:[function(e,t,r){t.exports=e("./lib/_stream_transform.js")},{"./lib/_stream_transform.js":120}],125:[function(e,t,r){t.exports=e("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":121}],126:[function(e,t,r){(function(e){var r=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13];var i=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11];var n=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6];var a=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11];var f=[0,1518500249,1859775393,2400959708,2840853838];var s=[1352829926,1548603684,1836072691,2053994217,0];function o(e){var t=[];for(var r=0,i=0;r<e.length;r++,i+=8){t[i>>>5]|=e[r]<<24-i%32}return t}function c(e){var t=[];for(var r=0;r<e.length*32;r+=8){t.push(e[r>>>5]>>>24-r%32&255)}return t}function h(e,t,o){for(var c=0;c<16;c++){var h=o+c;var y=t[h];t[h]=(y<<8|y>>>24)&16711935|(y<<24|y>>>8)&4278255360}var g,m,w,_,S;var E,B,A,I,k;E=g=e[0];B=m=e[1];A=w=e[2];I=_=e[3];k=S=e[4];var x;for(c=0;c<80;c+=1){x=g+t[o+r[c]]|0;if(c<16){x+=d(m,w,_)+f[0]}else if(c<32){x+=u(m,w,_)+f[1]}else if(c<48){x+=l(m,w,_)+f[2]}else if(c<64){x+=p(m,w,_)+f[3]}else{x+=b(m,w,_)+f[4]}x=x|0;x=v(x,n[c]);x=x+S|0;g=S;S=_;_=v(w,10);w=m;m=x;x=E+t[o+i[c]]|0;if(c<16){x+=b(B,A,I)+s[0]}else if(c<32){x+=p(B,A,I)+s[1]}else if(c<48){x+=l(B,A,I)+s[2]}else if(c<64){x+=u(B,A,I)+s[3]}else{x+=d(B,A,I)+s[4]}x=x|0;x=v(x,a[c]);x=x+k|0;E=k;k=I;I=v(A,10);A=B;B=x}x=e[1]+w+I|0;e[1]=e[2]+_+k|0;e[2]=e[3]+S+E|0;e[3]=e[4]+g+B|0;e[4]=e[0]+m+A|0;e[0]=x}function d(e,t,r){return e^t^r}function u(e,t,r){return e&t|~e&r}function l(e,t,r){return(e|~t)^r}function p(e,t,r){return e&r|t&~r}function b(e,t,r){return e^(t|~r)}function v(e,t){return e<<t|e>>>32-t}function y(t){var r=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof t==="string"){t=new e(t,"utf8")}var i=o(t);var n=t.length*8;var a=t.length*8;i[n>>>5]|=128<<24-n%32;i[(n+64>>>9<<4)+14]=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360;for(var f=0;f<i.length;f+=16){h(r,i,f)}for(f=0;f<5;f++){var s=r[f];r[f]=(s<<8|s>>>24)&16711935|(s<<24|s>>>8)&4278255360}var d=c(r);return new e(d)}t.exports=y}).call(this,e("buffer").Buffer)},{buffer:46}],127:[function(e,t,r){(function(e){function r(t,r){this._block=new e(t);this._finalSize=r;this._blockSize=t;this._len=0;this._s=0}r.prototype.update=function(t,r){if(typeof t==="string"){r=r||"utf8";t=new e(t,r)}var i=this._len+=t.length;var n=this._s||0;var a=0;var f=this._block;while(n<i){var s=Math.min(t.length,a+this._blockSize-n%this._blockSize);var o=s-a;for(var c=0;c<o;c++){f[n%this._blockSize+c]=t[c+a]}n+=o;a+=o;if(n%this._blockSize===0){this._update(f)}}this._s=n;return this};r.prototype.digest=function(e){var t=this._len*8;this._block[this._len%this._blockSize]=128;this._block.fill(0,this._len%this._blockSize+1);if(t%(this._blockSize*8)>=this._finalSize*8){this._update(this._block);this._block.fill(0)}this._block.writeInt32BE(t,this._blockSize-4);var r=this._update(this._block)||this._hash();return e?r.toString(e):r};r.prototype._update=function(){throw new Error("_update must be implemented by subclass")};t.exports=r}).call(this,e("buffer").Buffer)},{buffer:46}],128:[function(e,t,r){var r=t.exports=function i(e){e=e.toLowerCase();var t=r[e];if(!t)throw new Error(e+" is not supported (we accept pull requests)");return new t};r.sha=e("./sha");r.sha1=e("./sha1");r.sha224=e("./sha224");r.sha256=e("./sha256");r.sha384=e("./sha384");r.sha512=e("./sha512")},{"./sha":129,"./sha1":130,"./sha224":131,"./sha256":132,"./sha384":133,"./sha512":134}],129:[function(e,t,r){(function(r){var i=e("inherits");var n=e("./hash");var a=new Array(80);function f(){this.init();this._w=a;n.call(this,64,56)}i(f,n);f.prototype.init=function(){this._a=1732584193|0;this._b=4023233417|0;this._c=2562383102|0;this._d=271733878|0;this._e=3285377520|0;return this};function s(e,t){return e<<t|e>>>32-t}f.prototype._update=function(e){var t=this._w;var r=this._a;var i=this._b;var n=this._c;var a=this._d;var f=this._e;var o=0;var c;function h(){return t[o-3]^t[o-8]^t[o-14]^t[o-16]}function d(e,h){t[o]=e;var d=s(r,5)+h+f+e+c;f=a;a=n;n=s(i,30);i=r;r=d;o++}c=1518500249;while(o<16)d(e.readInt32BE(o*4),i&n|~i&a);while(o<20)d(h(),i&n|~i&a);c=1859775393;while(o<40)d(h(),i^n^a);c=-1894007588;while(o<60)d(h(),i&n|i&a|n&a);c=-899497514;while(o<80)d(h(),i^n^a);this._a=r+this._a|0;this._b=i+this._b|0;this._c=n+this._c|0;this._d=a+this._d|0;this._e=f+this._e|0};f.prototype._hash=function(){var e=new r(20);e.writeInt32BE(this._a|0,0);e.writeInt32BE(this._b|0,4);e.writeInt32BE(this._c|0,8);e.writeInt32BE(this._d|0,12);e.writeInt32BE(this._e|0,16);return e};t.exports=f}).call(this,e("buffer").Buffer)},{"./hash":127,buffer:46,inherits:92}],130:[function(e,t,r){(function(r){var i=e("inherits");var n=e("./hash");var a=new Array(80);function f(){this.init();this._w=a;n.call(this,64,56)}i(f,n);f.prototype.init=function(){this._a=1732584193|0;this._b=4023233417|0;this._c=2562383102|0;this._d=271733878|0;this._e=3285377520|0;return this};function s(e,t){return e<<t|e>>>32-t}f.prototype._update=function(e){var t=this._w;var r=this._a;var i=this._b;var n=this._c;var a=this._d;var f=this._e;var o=0;var c;function h(){return s(t[o-3]^t[o-8]^t[o-14]^t[o-16],1)}function d(e,h){t[o]=e;var d=s(r,5)+h+f+e+c;f=a;a=n;n=s(i,30);i=r;r=d;o++}c=1518500249;while(o<16)d(e.readInt32BE(o*4),i&n|~i&a);while(o<20)d(h(),i&n|~i&a);c=1859775393;while(o<40)d(h(),i^n^a);c=-1894007588;while(o<60)d(h(),i&n|i&a|n&a);c=-899497514;while(o<80)d(h(),i^n^a);this._a=r+this._a|0;this._b=i+this._b|0;this._c=n+this._c|0;this._d=a+this._d|0;this._e=f+this._e|0};f.prototype._hash=function(){var e=new r(20);e.writeInt32BE(this._a|0,0);e.writeInt32BE(this._b|0,4);e.writeInt32BE(this._c|0,8);e.writeInt32BE(this._d|0,12);e.writeInt32BE(this._e|0,16);return e};t.exports=f}).call(this,e("buffer").Buffer)},{"./hash":127,buffer:46,inherits:92}],131:[function(e,t,r){(function(r){var i=e("inherits");var n=e("./sha256");var a=e("./hash");var f=new Array(64);function s(){this.init();this._w=f;a.call(this,64,56)}i(s,n);s.prototype.init=function(){this._a=3238371032|0;this._b=914150663|0;this._c=812702999|0;this._d=4144912697|0;this._e=4290775857|0;this._f=1750603025|0;this._g=1694076839|0;this._h=3204075428|0;return this};s.prototype._hash=function(){var e=new r(28);e.writeInt32BE(this._a,0);e.writeInt32BE(this._b,4);e.writeInt32BE(this._c,8);e.writeInt32BE(this._d,12);e.writeInt32BE(this._e,16);e.writeInt32BE(this._f,20);e.writeInt32BE(this._g,24);return e};t.exports=s}).call(this,e("buffer").Buffer)},{"./hash":127,"./sha256":132,buffer:46,inherits:92}],132:[function(e,t,r){(function(r){var i=e("inherits");var n=e("./hash");var a=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];var f=new Array(64);function s(){this.init();this._w=f;n.call(this,64,56)}i(s,n);s.prototype.init=function(){this._a=1779033703|0;this._b=3144134277|0;this._c=1013904242|0;this._d=2773480762|0;this._e=1359893119|0;this._f=2600822924|0;this._g=528734635|0;this._h=1541459225|0;return this};function o(e,t,r){return r^e&(t^r)}function c(e,t,r){return e&t|r&(e|t)}function h(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function d(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function u(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}function l(e){return(e>>>17|e<<15)^(e>>>19|e<<13)^e>>>10}s.prototype._update=function(e){var t=this._w;var r=this._a|0;var i=this._b|0;var n=this._c|0;var f=this._d|0;var s=this._e|0;var p=this._f|0;var b=this._g|0;var v=this._h|0;var y=0;function g(){return l(t[y-2])+t[y-7]+u(t[y-15])+t[y-16]}function m(e){t[y]=e;var u=v+d(s)+o(s,p,b)+a[y]+e;var l=h(r)+c(r,i,n);v=b;b=p;p=s;s=f+u;f=n;n=i;i=r;r=u+l;y++}while(y<16)m(e.readInt32BE(y*4));while(y<64)m(g());this._a=r+this._a|0;this._b=i+this._b|0;this._c=n+this._c|0;this._d=f+this._d|0;this._e=s+this._e|0;this._f=p+this._f|0;this._g=b+this._g|0;this._h=v+this._h|0};s.prototype._hash=function(){var e=new r(32);e.writeInt32BE(this._a,0);e.writeInt32BE(this._b,4);e.writeInt32BE(this._c,8);e.writeInt32BE(this._d,12);e.writeInt32BE(this._e,16);e.writeInt32BE(this._f,20);e.writeInt32BE(this._g,24);e.writeInt32BE(this._h,28);return e};t.exports=s}).call(this,e("buffer").Buffer)},{"./hash":127,buffer:46,inherits:92}],133:[function(e,t,r){(function(r){var i=e("inherits");var n=e("./sha512");var a=e("./hash");var f=new Array(160);function s(){this.init();this._w=f;a.call(this,128,112)}i(s,n);s.prototype.init=function(){this._a=3418070365|0;this._b=1654270250|0;this._c=2438529370|0;this._d=355462360|0;this._e=1731405415|0;this._f=2394180231|0;this._g=3675008525|0;this._h=1203062813|0;this._al=3238371032|0;this._bl=914150663|0;this._cl=812702999|0;this._dl=4144912697|0;this._el=4290775857|0;this._fl=1750603025|0;this._gl=1694076839|0;this._hl=3204075428|0;return this};s.prototype._hash=function(){var e=new r(48);function t(t,r,i){e.writeInt32BE(t,i);e.writeInt32BE(r,i+4)}t(this._a,this._al,0);t(this._b,this._bl,8);t(this._c,this._cl,16);t(this._d,this._dl,24);t(this._e,this._el,32);t(this._f,this._fl,40);return e};t.exports=s}).call(this,e("buffer").Buffer)},{"./hash":127,"./sha512":134,buffer:46,inherits:92}],134:[function(e,t,r){(function(r){var i=e("inherits");var n=e("./hash");var a=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];var f=new Array(160);function s(){this.init();this._w=f;n.call(this,128,112)}i(s,n);s.prototype.init=function(){this._a=1779033703|0;this._b=3144134277|0;this._c=1013904242|0;this._d=2773480762|0;this._e=1359893119|0;this._f=2600822924|0;this._g=528734635|0;this._h=1541459225|0;this._al=4089235720|0;this._bl=2227873595|0;this._cl=4271175723|0;this._dl=1595750129|0;this._el=2917565137|0;this._fl=725511199|0;this._gl=4215389547|0;this._hl=327033209|0;return this};function o(e,t,r){return r^e&(t^r)}function c(e,t,r){return e&t|r&(e|t)}function h(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function d(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function u(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function l(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function p(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function b(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}s.prototype._update=function(e){var t=this._w;var r=this._a|0;var i=this._b|0;var n=this._c|0;var f=this._d|0;var s=this._e|0;var v=this._f|0;var y=this._g|0;var g=this._h|0;var m=this._al|0;var w=this._bl|0;var _=this._cl|0;var S=this._dl|0;var E=this._el|0;var B=this._fl|0;var A=this._gl|0;var I=this._hl|0;var k=0;var x=0;var R,T;function C(){var e=t[x-15*2];var r=t[x-15*2+1];var i=u(e,r);var n=l(r,e);e=t[x-2*2];r=t[x-2*2+1];var a=p(e,r);var f=b(r,e);var s=t[x-7*2];var o=t[x-7*2+1];var c=t[x-16*2];var h=t[x-16*2+1];T=n+o;R=i+s+(T>>>0<n>>>0?1:0);T=T+f;R=R+a+(T>>>0<f>>>0?1:0);T=T+h;R=R+c+(T>>>0<h>>>0?1:0)}function M(){t[x]=R;t[x+1]=T;var e=c(r,i,n);var u=c(m,w,_);var l=h(r,m);var p=h(m,r);var b=d(s,E);var C=d(E,s);var M=a[x];var P=a[x+1];var D=o(s,v,y);var L=o(E,B,A);var j=I+C;var q=g+b+(j>>>0<I>>>0?1:0);j=j+L;q=q+D+(j>>>0<L>>>0?1:0);j=j+P;q=q+M+(j>>>0<P>>>0?1:0);j=j+T;q=q+R+(j>>>0<T>>>0?1:0);var N=p+u;var O=l+e+(N>>>0<p>>>0?1:0);g=y;I=A;y=v;A=B;v=s;B=E;E=S+j|0;s=f+q+(E>>>0<S>>>0?1:0)|0;f=n;S=_;n=i;_=w;i=r;w=m;m=j+N|0;r=q+O+(m>>>0<j>>>0?1:0)|0;k++;x+=2}while(k<16){R=e.readInt32BE(x*4);T=e.readInt32BE(x*4+4);M()}while(k<80){C();M()}this._al=this._al+m|0;this._bl=this._bl+w|0;this._cl=this._cl+_|0;this._dl=this._dl+S|0;this._el=this._el+E|0;this._fl=this._fl+B|0;this._gl=this._gl+A|0;this._hl=this._hl+I|0;this._a=this._a+r+(this._al>>>0<m>>>0?1:0)|0;this._b=this._b+i+(this._bl>>>0<w>>>0?1:0)|0;this._c=this._c+n+(this._cl>>>0<_>>>0?1:0)|0;this._d=this._d+f+(this._dl>>>0<S>>>0?1:0)|0;this._e=this._e+s+(this._el>>>0<E>>>0?1:0)|0;this._f=this._f+v+(this._fl>>>0<B>>>0?1:0)|0;this._g=this._g+y+(this._gl>>>0<A>>>0?1:0)|0;this._h=this._h+g+(this._hl>>>0<I>>>0?1:0)|0};s.prototype._hash=function(){var e=new r(64);function t(t,r,i){e.writeInt32BE(t,i);e.writeInt32BE(r,i+4)}t(this._a,this._al,0);t(this._b,this._bl,8);t(this._c,this._cl,16);t(this._d,this._dl,24);t(this._e,this._el,32);t(this._f,this._fl,40);t(this._g,this._gl,48);t(this._h,this._hl,56);return e};t.exports=s}).call(this,e("buffer").Buffer)},{"./hash":127,buffer:46,inherits:92}],135:[function(e,t,r){t.exports=a;var i=e("events").EventEmitter;var n=e("inherits");n(a,i);a.Readable=e("readable-stream/readable.js");a.Writable=e("readable-stream/writable.js");a.Duplex=e("readable-stream/duplex.js");a.Transform=e("readable-stream/transform.js");a.PassThrough=e("readable-stream/passthrough.js");a.Stream=a;function a(){i.call(this)}a.prototype.pipe=function(e,t){var r=this;function n(t){if(e.writable){if(false===e.write(t)&&r.pause){r.pause()}}}r.on("data",n);function a(){if(r.readable&&r.resume){r.resume()}}e.on("drain",a);if(!e._isStdio&&(!t||t.end!==false)){r.on("end",s);r.on("close",o)}var f=false;function s(){if(f)return;f=true;e.end()}function o(){if(f)return;f=true;if(typeof e.destroy==="function")e.destroy()}function c(e){h();if(i.listenerCount(this,"error")===0){throw e}}r.on("error",c);e.on("error",c);function h(){r.removeListener("data",n);e.removeListener("drain",a);r.removeListener("end",s);r.removeListener("close",o);r.removeListener("error",c);e.removeListener("error",c);r.removeListener("end",h);r.removeListener("close",h);e.removeListener("close",h)}r.on("end",h);r.on("close",h);e.on("close",h);e.emit("pipe",r);return e}},{events:82,inherits:92,"readable-stream/duplex.js":116,"readable-stream/passthrough.js":122,"readable-stream/readable.js":123,"readable-stream/transform.js":124,"readable-stream/writable.js":125}],136:[function(e,t,r){var i=e("buffer").Buffer;var n=i.isEncoding||function(e){switch(e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return true;default:return false}};function a(e){if(e&&!n(e)){throw new Error("Unknown encoding: "+e)}}var f=r.StringDecoder=function(e){this.encoding=(e||"utf8").toLowerCase().replace(/[-_]/,"");a(e);switch(this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2;this.detectIncompleteChar=o;break;case"base64":this.surrogateSize=3;this.detectIncompleteChar=c;break;default:this.write=s;return}this.charBuffer=new i(6);this.charReceived=0;this.charLength=0};f.prototype.write=function(e){var t="";while(this.charLength){var r=e.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;e.copy(this.charBuffer,this.charReceived,0,r);this.charReceived+=r;if(this.charReceived<this.charLength){return""}e=e.slice(r,e.length);t=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var i=t.charCodeAt(t.length-1);if(i>=55296&&i<=56319){this.charLength+=this.surrogateSize;t="";continue}this.charReceived=this.charLength=0;if(e.length===0){return t}break}this.detectIncompleteChar(e);var n=e.length;if(this.charLength){e.copy(this.charBuffer,0,e.length-this.charReceived,n);n-=this.charReceived}t+=e.toString(this.encoding,0,n);var n=t.length-1;var i=t.charCodeAt(n);if(i>=55296&&i<=56319){var a=this.surrogateSize;this.charLength+=a;this.charReceived+=a;this.charBuffer.copy(this.charBuffer,a,0,a);e.copy(this.charBuffer,0,0,a);return t.substring(0,n)}return t};f.prototype.detectIncompleteChar=function(e){var t=e.length>=3?3:e.length;for(;t>0;t--){var r=e[e.length-t];if(t==1&&r>>5==6){this.charLength=2;break}if(t<=2&&r>>4==14){this.charLength=3;break}if(t<=3&&r>>3==30){this.charLength=4;break}}this.charReceived=t};f.prototype.end=function(e){var t="";if(e&&e.length)t=this.write(e);if(this.charReceived){var r=this.charReceived;var i=this.charBuffer;var n=this.encoding;t+=i.slice(0,r).toString(n)}return t};function s(e){return e.toString(this.encoding)}function o(e){this.charReceived=e.length%2;this.charLength=this.charReceived?2:0}function c(e){this.charReceived=e.length%3;this.charLength=this.charReceived?3:0}},{buffer:46}],137:[function(e,t,r){(function(e){t.exports=r;function r(e,t){if(i("noDeprecation")){return e}var r=false;function n(){if(!r){if(i("throwDeprecation")){throw new Error(t)}else if(i("traceDeprecation")){console.trace(t)}else{console.warn(t)}r=true}return e.apply(this,arguments)}return n}function i(t){try{if(!e.localStorage)return false}catch(r){return false}var i=e.localStorage[t];if(null==i)return false;return String(i).toLowerCase()==="true"}}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],138:[function(require,module,exports){var indexOf=require("indexof");var Object_keys=function(e){if(Object.keys)return Object.keys(e);else{var t=[];for(var r in e)t.push(r);return t}};var forEach=function(e,t){if(e.forEach)return e.forEach(t);else for(var r=0;r<e.length;r++){t(e[r],r,e)}};var defineProp=function(){try{Object.defineProperty({},"_",{});return function(e,t,r){Object.defineProperty(e,t,{writable:true,enumerable:false,configurable:true,value:r})}}catch(e){return function(e,t,r){e[t]=r}}}();var globals=["Array","Boolean","Date","Error","EvalError","Function","Infinity","JSON","Math","NaN","Number","Object","RangeError","ReferenceError","RegExp","String","SyntaxError","TypeError","URIError","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","eval","isFinite","isNaN","parseFloat","parseInt","undefined","unescape"];function Context(){}Context.prototype={};var Script=exports.Script=function e(t){if(!(this instanceof Script))return new Script(t);this.code=t};Script.prototype.runInContext=function(e){if(!(e instanceof Context)){throw new TypeError("needs a 'context' argument.")}var t=document.createElement("iframe");if(!t.style)t.style={};t.style.display="none";document.body.appendChild(t);var r=t.contentWindow;var i=r.eval,n=r.execScript;if(!i&&n){n.call(r,"null");i=r.eval}forEach(Object_keys(e),function(t){
|
|
r[t]=e[t]});forEach(globals,function(t){if(e[t]){r[t]=e[t]}});var a=Object_keys(r);var f=i.call(r,this.code);forEach(Object_keys(r),function(t){if(t in e||indexOf(a,t)===-1){e[t]=r[t]}});forEach(globals,function(t){if(!(t in e)){defineProp(e,t,r[t])}});document.body.removeChild(t);return f};Script.prototype.runInThisContext=function(){return eval(this.code)};Script.prototype.runInNewContext=function(e){var t=Script.createContext(e);var r=this.runInContext(t);forEach(Object_keys(t),function(r){e[r]=t[r]});return r};forEach(Object_keys(Script.prototype),function(e){exports[e]=Script[e]=function(t){var r=Script(t);return r[e].apply(r,[].slice.call(arguments,1))}});exports.createScript=function(e){return exports.Script(e)};exports.createContext=Script.createContext=function(e){var t=new Context;if(typeof e==="object"){forEach(Object_keys(e),function(r){t[r]=e[r]})}return t}},{indexof:91}],139:[function(e,t,r){(function(r){var i=!r.window;if(i){t.exports=e("crypto")}else{t.exports=e("crypto-browserify")}}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{crypto:19,"crypto-browserify":54}],140:[function(e,t,r){(function(i){var n=e("multihashing");var a=e("bs58");var f=e("keypair");r=t.exports=s;r.Buffer=i;function s(e,t,r){var i=this;if(!(i instanceof s)){throw new Error("Id must be called with new")}i.privKey=t;i.pubKey=r;i.id=e;i.toPrint=function(){return{id:i.toHexString(),privKey:t.toString("hex"),pubKey:r.toString("hex")}};i.toHexString=function(){return i.id.toString("hex")};i.toBytes=function(){return i.id};i.toB58String=function(){return a.encode(i.id)}}r.create=function(){var e=f();var t=n(e.public,"sha2-256");return new s(t,e.private,e.public)};r.createFromHexString=function(e){return new s(new i(e),"hex")};r.createFromBytes=function(e){return new s(e)};r.createFromB58String=function(e){return new s(new i(a.decode(e)))};r.createFromPubKey=function(e){var t=n(e,"sha2-256");return new s(t,null,e)};r.createFromPrivKey=function(){}}).call(this,e("buffer").Buffer)},{bs58:44,buffer:46,keypair:97,multihashing:101}]},{},[140])(140)});
|