UNPKG

next

Version:

The React Framework

1 lines • 364 kB
(function(){var e={7160:function(e,t,r){var i=t;i.bignum=r(711);i.define=r(495).define;i.base=r(853);i.constants=r(7335);i.decoders=r(6701);i.encoders=r(3418)},495:function(e,t,r){var i=r(7160);var n=r(3782);var a=t;a.define=function define(e,t){return new Entity(e,t)};function Entity(e,t){this.name=e;this.body=t;this.decoders={};this.encoders={}}Entity.prototype._createNamed=function createNamed(e){var t;try{t=r(6144).runInThisContext("(function "+this.name+"(entity) {\n"+" this._initNamed(entity);\n"+"})")}catch(e){t=function(e){this._initNamed(e)}}n(t,e);t.prototype._initNamed=function initnamed(t){e.call(this,t)};return new t(this)};Entity.prototype._getDecoder=function _getDecoder(e){e=e||"der";if(!this.decoders.hasOwnProperty(e))this.decoders[e]=this._createNamed(i.decoders[e]);return this.decoders[e]};Entity.prototype.decode=function decode(e,t,r){return this._getDecoder(t).decode(e,r)};Entity.prototype._getEncoder=function _getEncoder(e){e=e||"der";if(!this.encoders.hasOwnProperty(e))this.encoders[e]=this._createNamed(i.encoders[e]);return this.encoders[e]};Entity.prototype.encode=function encode(e,t,r){return this._getEncoder(t).encode(e,r)}},6483:function(e,t,r){var i=r(3782);var n=r(853).Reporter;var a=r(4300).Buffer;function DecoderBuffer(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(DecoderBuffer,n);t.C=DecoderBuffer;DecoderBuffer.prototype.save=function save(){return{offset:this.offset,reporter:n.prototype.save.call(this)}};DecoderBuffer.prototype.restore=function restore(e){var t=new DecoderBuffer(this.base);t.offset=e.offset;t.length=this.offset;this.offset=e.offset;n.prototype.restore.call(this,e.reporter);return t};DecoderBuffer.prototype.isEmpty=function isEmpty(){return this.offset===this.length};DecoderBuffer.prototype.readUInt8=function readUInt8(e){if(this.offset+1<=this.length)return this.base.readUInt8(this.offset++,true);else return this.error(e||"DecoderBuffer overrun")};DecoderBuffer.prototype.skip=function skip(e,t){if(!(this.offset+e<=this.length))return this.error(t||"DecoderBuffer overrun");var r=new DecoderBuffer(this.base);r._reporterState=this._reporterState;r.offset=this.offset;r.length=this.offset+e;this.offset+=e;return r};DecoderBuffer.prototype.raw=function raw(e){return this.base.slice(e?e.offset:this.offset,this.length)};function EncoderBuffer(e,t){if(Array.isArray(e)){this.length=0;this.value=e.map((function(e){if(!(e instanceof EncoderBuffer))e=new EncoderBuffer(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)}}t.R=EncoderBuffer;EncoderBuffer.prototype.join=function join(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}},853:function(e,t,r){var i=t;i.Reporter=r(1293).b;i.DecoderBuffer=r(6483).C;i.EncoderBuffer=r(6483).R;i.Node=r(9374)},9374:function(e,t,r){var i=r(853).Reporter;var n=r(853).EncoderBuffer;var a=r(853).DecoderBuffer;var s=r(3523);var o=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"];var h=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(o);var u=["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"];function Node(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;r.contains=null;if(!r.parent){r.children=[];this._wrap()}}e.exports=Node;var d=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];Node.prototype.clone=function clone(){var e=this._baseState;var t={};d.forEach((function(r){t[r]=e[r]}));var r=new this.constructor(t.parent);r._baseState=t;return r};Node.prototype._wrap=function wrap(){var e=this._baseState;h.forEach((function(t){this[t]=function _wrappedMethod(){var r=new this.constructor(this);e.children.push(r);return r[t].apply(r,arguments)}}),this)};Node.prototype._init=function init(e){var t=this._baseState;s(t.parent===null);e.call(this);t.children=t.children.filter((function(e){return e._baseState.parent===this}),this);s.equal(t.children.length,1,"Root node can have only one child")};Node.prototype._useArgs=function useArgs(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){s(t.children===null);t.children=r;r.forEach((function(e){e._baseState.parent=this}),this)}if(e.length!==0){s(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}))}};u.forEach((function(e){Node.prototype[e]=function _overrided(){var t=this._baseState;throw new Error(e+" not implemented for encoding: "+t.enc)}}));o.forEach((function(e){Node.prototype[e]=function _tagMethod(){var t=this._baseState;var r=Array.prototype.slice.call(arguments);s(t.tag===null);t.tag=e;this._useArgs(r);return this}}));Node.prototype.use=function use(e){s(e);var t=this._baseState;s(t.use===null);t.use=e;return this};Node.prototype.optional=function optional(){var e=this._baseState;e.optional=true;return this};Node.prototype.def=function def(e){var t=this._baseState;s(t["default"]===null);t["default"]=e;t.optional=true;return this};Node.prototype.explicit=function explicit(e){var t=this._baseState;s(t.explicit===null&&t.implicit===null);t.explicit=e;return this};Node.prototype.implicit=function implicit(e){var t=this._baseState;s(t.explicit===null&&t.implicit===null);t.implicit=e;return this};Node.prototype.obj=function obj(){var e=this._baseState;var t=Array.prototype.slice.call(arguments);e.obj=true;if(t.length!==0)this._useArgs(t);return this};Node.prototype.key=function key(e){var t=this._baseState;s(t.key===null);t.key=e;return this};Node.prototype.any=function any(){var e=this._baseState;e.any=true;return this};Node.prototype.choice=function choice(e){var t=this._baseState;s(t.choice===null);t.choice=e;this._useArgs(Object.keys(e).map((function(t){return e[t]})));return this};Node.prototype.contains=function contains(e){var t=this._baseState;s(t.use===null);t.contains=e;return this};Node.prototype._decode=function decode(e,t){var r=this._baseState;if(r.parent===null)return e.wrapResult(r.children[0]._decode(e,t));var i=r["default"];var n=true;var s=null;if(r.key!==null)s=e.enterKey(r.key);if(r.optional){var o=null;if(r.explicit!==null)o=r.explicit;else if(r.implicit!==null)o=r.implicit;else if(r.tag!==null)o=r.tag;if(o===null&&!r.any){var h=e.save();try{if(r.choice===null)this._decodeGeneric(r.tag,e,t);else this._decodeChoice(e,t);n=true}catch(e){n=false}e.restore(h)}else{n=this._peekTag(e,o,r.any);if(e.isError(n))return n}}var u;if(r.obj&&n)u=e.enterObject();if(n){if(r.explicit!==null){var d=this._decodeTag(e,r.explicit);if(e.isError(d))return d;e=d}var c=e.offset;if(r.use===null&&r.choice===null){if(r.any)var h=e.save();var l=this._decodeTag(e,r.implicit!==null?r.implicit:r.tag,r.any);if(e.isError(l))return l;if(r.any)i=e.raw(h);else e=l}if(t&&t.track&&r.tag!==null)t.track(e.path(),c,e.length,"tagged");if(t&&t.track&&r.tag!==null)t.track(e.path(),e.offset,e.length,"content");if(r.any)i=i;else if(r.choice===null)i=this._decodeGeneric(r.tag,e,t);else i=this._decodeChoice(e,t);if(e.isError(i))return i;if(!r.any&&r.choice===null&&r.children!==null){r.children.forEach((function decodeChildren(r){r._decode(e,t)}))}if(r.contains&&(r.tag==="octstr"||r.tag==="bitstr")){var p=new a(i);i=this._getUse(r.contains,e._reporterState.obj)._decode(p,t)}}if(r.obj&&n)i=e.leaveObject(u);if(r.key!==null&&(i!==null||n===true))e.leaveKey(s,r.key,i);else if(s!==null)e.exitKey(s);return i};Node.prototype._decodeGeneric=function decodeGeneric(e,t,r){var i=this._baseState;if(e==="seq"||e==="set")return null;if(e==="seqof"||e==="setof")return this._decodeList(t,e,i.args[0],r);else if(/str$/.test(e))return this._decodeStr(t,e,r);else if(e==="objid"&&i.args)return this._decodeObjid(t,i.args[0],i.args[1],r);else if(e==="objid")return this._decodeObjid(t,null,null,r);else if(e==="gentime"||e==="utctime")return this._decodeTime(t,e,r);else if(e==="null_")return this._decodeNull(t,r);else if(e==="bool")return this._decodeBool(t,r);else if(e==="objDesc")return this._decodeStr(t,e,r);else if(e==="int"||e==="enum")return this._decodeInt(t,i.args&&i.args[0],r);if(i.use!==null){return this._getUse(i.use,t._reporterState.obj)._decode(t,r)}else{return t.error("unknown tag: "+e)}};Node.prototype._getUse=function _getUse(e,t){var r=this._baseState;r.useDecoder=this._use(e,t);s(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};Node.prototype._decodeChoice=function decodeChoice(e,t){var r=this._baseState;var i=null;var n=false;Object.keys(r.choice).some((function(a){var s=e.save();var o=r.choice[a];try{var h=o._decode(e,t);if(e.isError(h))return false;i={type:a,value:h};n=true}catch(t){e.restore(s);return false}return true}),this);if(!n)return e.error("Choice not matched");return i};Node.prototype._createEncoderBuffer=function createEncoderBuffer(e){return new n(e,this.reporter)};Node.prototype._encode=function encode(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};Node.prototype._encodeValue=function encode(e,t,r){var n=this._baseState;if(n.parent===null)return n.children[0]._encode(e,t||new i);var a=null;this.reporter=t;if(n.optional&&e===undefined){if(n["default"]!==null)e=n["default"];else return}var s=null;var o=false;if(n.any){a=this._createEncoderBuffer(e)}else if(n.choice){a=this._encodeChoice(e,t)}else if(n.contains){s=this._getUse(n.contains,r)._encode(e,t);o=true}else if(n.children){s=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}));s=this._createEncoderBuffer(s)}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;s=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{s=this._encodePrimitive(n.tag,e);o=true}}var a;if(!n.any&&n.choice===null){var u=n.implicit!==null?n.implicit:n.tag;var d=n.implicit===null?"universal":"context";if(u===null){if(n.use===null)t.error("Tag could be omitted only for .use()")}else{if(n.use===null)a=this._encodeComposite(u,o,d,s)}}if(n.explicit!==null)a=this._encodeComposite(n.explicit,false,"context",a);return a};Node.prototype._encodeChoice=function encodeChoice(e,t){var r=this._baseState;var i=r.choice[e.type];if(!i){s(false,e.type+" not found in "+JSON.stringify(Object.keys(r.choice)))}return i._encode(e.value,t)};Node.prototype._encodePrimitive=function encodePrimitive(e,t){var r=this._baseState;if(/str$/.test(e))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 if(e==="objDesc")return this._encodeStr(t,e);else throw new Error("Unsupported tag: "+e)};Node.prototype._isNumstr=function isNumstr(e){return/^[0-9 ]*$/.test(e)};Node.prototype._isPrintstr=function isPrintstr(e){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(e)}},1293:function(e,t,r){var i=r(3782);function Reporter(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}t.b=Reporter;Reporter.prototype.isError=function isError(e){return e instanceof ReporterError};Reporter.prototype.save=function save(){var e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}};Reporter.prototype.restore=function restore(e){var t=this._reporterState;t.obj=e.obj;t.path=t.path.slice(0,e.pathLen)};Reporter.prototype.enterKey=function enterKey(e){return this._reporterState.path.push(e)};Reporter.prototype.exitKey=function exitKey(e){var t=this._reporterState;t.path=t.path.slice(0,e-1)};Reporter.prototype.leaveKey=function leaveKey(e,t,r){var i=this._reporterState;this.exitKey(e);if(i.obj!==null)i.obj[t]=r};Reporter.prototype.path=function path(){return this._reporterState.path.join("/")};Reporter.prototype.enterObject=function enterObject(){var e=this._reporterState;var t=e.obj;e.obj={};return t};Reporter.prototype.leaveObject=function leaveObject(e){var t=this._reporterState;var r=t.obj;t.obj=e;return r};Reporter.prototype.error=function error(e){var t;var r=this._reporterState;var i=e instanceof ReporterError;if(i){t=e}else{t=new ReporterError(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};Reporter.prototype.wrapResult=function wrapResult(e){var t=this._reporterState;if(!t.options.partial)return e;return{result:this.isError(e)?null:e,errors:t.errors}};function ReporterError(e,t){this.path=e;this.rethrow(t)}i(ReporterError,Error);ReporterError.prototype.rethrow=function rethrow(e){this.message=e+" at: "+(this.path||"(shallow)");if(Error.captureStackTrace)Error.captureStackTrace(this,ReporterError);if(!this.stack){try{throw new Error(this.message)}catch(e){this.stack=e.stack}}return this}},9791:function(e,t,r){var i=r(7335);t.tagClass={0:"universal",1:"application",2:"context",3:"private"};t.tagClassByName=i._reverse(t.tagClass);t.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"};t.tagByName=i._reverse(t.tag)},7335:function(e,t,r){var i=t;i._reverse=function reverse(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=r(9791)},2259:function(e,t,r){var i=r(3782);var n=r(7160);var a=n.base;var s=n.bignum;var o=n.constants.der;function DERDecoder(e){this.enc="der";this.name=e.name;this.entity=e;this.tree=new DERNode;this.tree._init(e.body)}e.exports=DERDecoder;DERDecoder.prototype.decode=function decode(e,t){if(!(e instanceof a.DecoderBuffer))e=new a.DecoderBuffer(e,t);return this.tree._decode(e,t)};function DERNode(e){a.Node.call(this,"der",e)}i(DERNode,a.Node);DERNode.prototype._peekTag=function peekTag(e,t,r){if(e.isEmpty())return false;var i=e.save();var n=derDecodeTag(e,'Failed to peek tag: "'+t+'"');if(e.isError(n))return n;e.restore(i);return n.tag===t||n.tagStr===t||n.tagStr+"of"===t||r};DERNode.prototype._decodeTag=function decodeTag(e,t,r){var i=derDecodeTag(e,'Failed to decode tag of "'+t+'"');if(e.isError(i))return i;var n=derDecodeLen(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 s=this._skipUntilEnd(e,'Failed to skip indefinite length body: "'+this.tag+'"');if(e.isError(s))return s;n=e.offset-a.offset;e.restore(a);return e.skip(n,'Failed to match body of: "'+t+'"')};DERNode.prototype._skipUntilEnd=function skipUntilEnd(e,t){while(true){var r=derDecodeTag(e,t);if(e.isError(r))return r;var i=derDecodeLen(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}};DERNode.prototype._decodeList=function decodeList(e,t,r,i){var n=[];while(!e.isEmpty()){var a=this._peekTag(e,"end");if(e.isError(a))return a;var s=r.decode(e,"der",i);if(e.isError(s)&&a)break;n.push(s)}return n};DERNode.prototype._decodeStr=function decodeStr(e,t){if(t==="bitstr"){var r=e.readUInt8();if(e.isError(r))return r;return{unused:r,data:e.raw()}}else if(t==="bmpstr"){var i=e.raw();if(i.length%2===1)return e.error("Decoding of string type: bmpstr length mismatch");var n="";for(var a=0;a<i.length/2;a++){n+=String.fromCharCode(i.readUInt16BE(a*2))}return n}else if(t==="numstr"){var s=e.raw().toString("ascii");if(!this._isNumstr(s)){return e.error("Decoding of string type: "+"numstr unsupported characters")}return s}else if(t==="octstr"){return e.raw()}else if(t==="objDesc"){return e.raw()}else if(t==="printstr"){var o=e.raw().toString("ascii");if(!this._isPrintstr(o)){return e.error("Decoding of string type: "+"printstr unsupported characters")}return o}else if(/str$/.test(t)){return e.raw().toString()}else{return e.error("Decoding of string type: "+t+" unsupported")}};DERNode.prototype._decodeObjid=function decodeObjid(e,t,r){var i;var n=[];var a=0;while(!e.isEmpty()){var s=e.readUInt8();a<<=7;a|=s&127;if((s&128)===0){n.push(a);a=0}}if(s&128)n.push(a);var o=n[0]/40|0;var h=n[0]%40;if(r)i=n;else i=[o,h].concat(n.slice(1));if(t){var u=t[i.join(" ")];if(u===undefined)u=t[i.join(".")];if(u!==undefined)i=u}return i};DERNode.prototype._decodeTime=function decodeTime(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 s=r.slice(8,10)|0;var o=r.slice(10,12)|0;var h=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 s=r.slice(6,8)|0;var o=r.slice(8,10)|0;var h=r.slice(10,12)|0;if(i<70)i=2e3+i;else i=1900+i}else{return e.error("Decoding "+t+" time is not supported yet")}return Date.UTC(i,n-1,a,s,o,h,0)};DERNode.prototype._decodeNull=function decodeNull(e){return null};DERNode.prototype._decodeBool=function decodeBool(e){var t=e.readUInt8();if(e.isError(t))return t;else return t!==0};DERNode.prototype._decodeInt=function decodeInt(e,t){var r=e.raw();var i=new s(r);if(t)i=t[i.toString(10)]||i;return i};DERNode.prototype._use=function use(e,t){if(typeof e==="function")e=e(t);return e._getDecoder("der").tree};function derDecodeTag(e,t){var r=e.readUInt8(t);if(e.isError(r))return r;var i=o.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 s=o.tag[r];return{cls:i,primitive:n,tag:r,tagStr:s}}function derDecodeLen(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 s=e.readUInt8(r);if(e.isError(s))return s;i|=s}return i}},6701:function(e,t,r){var i=t;i.der=r(2259);i.pem=r(8527)},8527:function(e,t,r){var i=r(3782);var n=r(4300).Buffer;var a=r(2259);function PEMDecoder(e){a.call(this,e);this.enc="pem"}i(PEMDecoder,a);e.exports=PEMDecoder;PEMDecoder.prototype.decode=function decode(e,t){var r=e.toString().split(/[\r\n]+/g);var i=t.label.toUpperCase();var s=/^-----(BEGIN|END) ([^-]+)-----$/;var o=-1;var h=-1;for(var u=0;u<r.length;u++){var d=r[u].match(s);if(d===null)continue;if(d[2]!==i)continue;if(o===-1){if(d[1]!=="BEGIN")break;o=u}else{if(d[1]!=="END")break;h=u;break}}if(o===-1||h===-1)throw new Error("PEM section not found for: "+i);var c=r.slice(o+1,h).join("");c.replace(/[^a-z0-9\+\/=]+/gi,"");var l=new n(c,"base64");return a.prototype.decode.call(this,l,t)}},7804:function(e,t,r){var i=r(3782);var n=r(4300).Buffer;var a=r(7160);var s=a.base;var o=a.constants.der;function DEREncoder(e){this.enc="der";this.name=e.name;this.entity=e;this.tree=new DERNode;this.tree._init(e.body)}e.exports=DEREncoder;DEREncoder.prototype.encode=function encode(e,t){return this.tree._encode(e,t).join()};function DERNode(e){s.Node.call(this,"der",e)}i(DERNode,s.Node);DERNode.prototype._encodeComposite=function encodeComposite(e,t,r,i){var a=encodeTag(e,t,r,this.reporter);if(i.length<128){var s=new n(2);s[0]=a;s[1]=i.length;return this._createEncoderBuffer([s,i])}var o=1;for(var h=i.length;h>=256;h>>=8)o++;var s=new n(1+1+o);s[0]=a;s[1]=128|o;for(var h=1+o,u=i.length;u>0;h--,u>>=8)s[h]=u&255;return this._createEncoderBuffer([s,i])};DERNode.prototype._encodeStr=function encodeStr(e,t){if(t==="bitstr"){return this._createEncoderBuffer([e.unused|0,e.data])}else if(t==="bmpstr"){var r=new n(e.length*2);for(var i=0;i<e.length;i++){r.writeUInt16BE(e.charCodeAt(i),i*2)}return this._createEncoderBuffer(r)}else if(t==="numstr"){if(!this._isNumstr(e)){return this.reporter.error("Encoding of string type: numstr supports "+"only digits and space")}return this._createEncoderBuffer(e)}else if(t==="printstr"){if(!this._isPrintstr(e)){return this.reporter.error("Encoding of string type: printstr supports "+"only latin upper and lower case letters, "+"digits, space, apostrophe, left and rigth "+"parenthesis, plus sign, comma, hyphen, "+"dot, slash, colon, equal sign, "+"question mark")}return this._createEncoderBuffer(e)}else if(/str$/.test(t)){return this._createEncoderBuffer(e)}else if(t==="objDesc"){return this._createEncoderBuffer(e)}else{return this.reporter.error("Encoding of string type: "+t+" unsupported")}};DERNode.prototype._encodeObjid=function encodeObjid(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 s=e[i];for(a++;s>=128;s>>=7)a++}var o=new n(a);var h=o.length-1;for(var i=e.length-1;i>=0;i--){var s=e[i];o[h--]=s&127;while((s>>=7)>0)o[h--]=128|s&127}return this._createEncoderBuffer(o)};function two(e){if(e<10)return"0"+e;else return e}DERNode.prototype._encodeTime=function encodeTime(e,t){var r;var i=new Date(e);if(t==="gentime"){r=[two(i.getFullYear()),two(i.getUTCMonth()+1),two(i.getUTCDate()),two(i.getUTCHours()),two(i.getUTCMinutes()),two(i.getUTCSeconds()),"Z"].join("")}else if(t==="utctime"){r=[two(i.getFullYear()%100),two(i.getUTCMonth()+1),two(i.getUTCDate()),two(i.getUTCHours()),two(i.getUTCMinutes()),two(i.getUTCSeconds()),"Z"].join("")}else{this.reporter.error("Encoding "+t+" time is not supported yet")}return this._encodeStr(r,"octstr")};DERNode.prototype._encodeNull=function encodeNull(){return this._createEncoderBuffer("")};DERNode.prototype._encodeInt=function encodeInt(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 s=e;s>=256;s>>=8)i++;var a=new Array(i);for(var s=a.length-1;s>=0;s--){a[s]=e&255;e>>=8}if(a[0]&128){a.unshift(0)}return this._createEncoderBuffer(new n(a))};DERNode.prototype._encodeBool=function encodeBool(e){return this._createEncoderBuffer(e?255:0)};DERNode.prototype._use=function use(e,t){if(typeof e==="function")e=e(t);return e._getEncoder("der").tree};DERNode.prototype._skipDefault=function skipDefault(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 encodeTag(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}},3418:function(e,t,r){var i=t;i.der=r(7804);i.pem=r(1564)},1564:function(e,t,r){var i=r(3782);var n=r(7804);function PEMEncoder(e){n.call(this,e);this.enc="pem"}i(PEMEncoder,n);e.exports=PEMEncoder;PEMEncoder.prototype.encode=function encode(e,t){var r=n.prototype.encode.call(this,e);var i=r.toString("base64");var a=["-----BEGIN "+t.label+"-----"];for(var s=0;s<i.length;s+=64)a.push(i.slice(s,s+64));a.push("-----END "+t.label+"-----");return a.join("\n")}},711:function(e,t,r){e=r.nmd(e);(function(e,t){"use strict";function assert(e,t){if(!e)throw new Error(t||"Assertion failed")}function inherits(e,t){e.super_=t;var TempCtor=function(){};TempCtor.prototype=t.prototype;e.prototype=new TempCtor;e.prototype.constructor=e}function BN(e,t,r){if(BN.isBN(e)){return e}this.negative=0;this.words=null;this.length=0;this.red=null;if(e!==null){if(t==="le"||t==="be"){r=t;t=10}this._init(e||0,t||10,r||"be")}}if(typeof e==="object"){e.exports=BN}else{t.BN=BN}BN.BN=BN;BN.wordSize=26;var i;try{i=r(4300).Buffer}catch(e){}BN.isBN=function isBN(e){if(e instanceof BN){return true}return e!==null&&typeof e==="object"&&e.constructor.wordSize===BN.wordSize&&Array.isArray(e.words)};BN.max=function max(e,t){if(e.cmp(t)>0)return e;return t};BN.min=function min(e,t){if(e.cmp(t)<0)return e;return t};BN.prototype._init=function init(e,t,r){if(typeof e==="number"){return this._initNumber(e,t,r)}if(typeof e==="object"){return this._initArray(e,t,r)}if(t==="hex"){t=16}assert(t===(t|0)&&t>=2&&t<=36);e=e.toString().replace(/\s+/g,"");var i=0;if(e[0]==="-"){i++}if(t===16){this._parseHex(e,i)}else{this._parseBase(e,t,i)}if(e[0]==="-"){this.negative=1}this.strip();if(r!=="le")return;this._initArray(this.toArray(),t,r)};BN.prototype._initNumber=function _initNumber(e,t,r){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{assert(e<9007199254740992);this.words=[e&67108863,e/67108864&67108863,1];this.length=3}if(r!=="le")return;this._initArray(this.toArray(),t,r)};BN.prototype._initArray=function _initArray(e,t,r){assert(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 i=0;i<this.length;i++){this.words[i]=0}var n,a;var s=0;if(r==="be"){for(i=e.length-1,n=0;i>=0;i-=3){a=e[i]|e[i-1]<<8|e[i-2]<<16;this.words[n]|=a<<s&67108863;this.words[n+1]=a>>>26-s&67108863;s+=24;if(s>=26){s-=26;n++}}}else if(r==="le"){for(i=0,n=0;i<e.length;i+=3){a=e[i]|e[i+1]<<8|e[i+2]<<16;this.words[n]|=a<<s&67108863;this.words[n+1]=a>>>26-s&67108863;s+=24;if(s>=26){s-=26;n++}}}return this.strip()};function parseHex(e,t,r){var i=0;var n=Math.min(e.length,r);for(var a=t;a<n;a++){var s=e.charCodeAt(a)-48;i<<=4;if(s>=49&&s<=54){i|=s-49+10}else if(s>=17&&s<=22){i|=s-17+10}else{i|=s&15}}return i}BN.prototype._parseHex=function _parseHex(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,n;var a=0;for(r=e.length-6,i=0;r>=t;r-=6){n=parseHex(e,r,r+6);this.words[i]|=n<<a&67108863;this.words[i+1]|=n>>>26-a&4194303;a+=24;if(a>=26){a-=26;i++}}if(r+6!==t){n=parseHex(e,t,r+6);this.words[i]|=n<<a&67108863;this.words[i+1]|=n>>>26-a&4194303}this.strip()};function parseBase(e,t,r,i){var n=0;var a=Math.min(e.length,r);for(var s=t;s<a;s++){var o=e.charCodeAt(s)-48;n*=i;if(o>=49){n+=o-49+10}else if(o>=17){n+=o-17+10}else{n+=o}}return n}BN.prototype._parseBase=function _parseBase(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 h=0;for(var u=r;u<o;u+=i){h=parseBase(e,u,u+i,t);this.imuln(n);if(this.words[0]+h<67108864){this.words[0]+=h}else{this._iaddn(h)}}if(s!==0){var d=1;h=parseBase(e,u,e.length,t);for(u=0;u<s;u++){d*=t}this.imuln(d);if(this.words[0]+h<67108864){this.words[0]+=h}else{this._iaddn(h)}}};BN.prototype.copy=function copy(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};BN.prototype.clone=function clone(){var e=new BN(null);this.copy(e);return e};BN.prototype._expand=function _expand(e){while(this.length<e){this.words[this.length++]=0}return this};BN.prototype.strip=function strip(){while(this.length>1&&this.words[this.length-1]===0){this.length--}return this._normSign()};BN.prototype._normSign=function _normSign(){if(this.length===1&&this.words[0]===0){this.negative=0}return this};BN.prototype.inspect=function inspect(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var n=["","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 a=[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 s=[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];BN.prototype.toString=function toString(e,t){e=e||10;t=t|0||1;var r;if(e===16||e==="hex"){r="";var i=0;var o=0;for(var h=0;h<this.length;h++){var u=this.words[h];var d=((u<<i|o)&16777215).toString(16);o=u>>>24-i&16777215;if(o!==0||h!==this.length-1){r=n[6-d.length]+d+r}else{r=d+r}i+=2;if(i>=26){i-=26;h--}}if(o!==0){r=o.toString(16)+r}while(r.length%t!==0){r="0"+r}if(this.negative!==0){r="-"+r}return r}if(e===(e|0)&&e>=2&&e<=36){var c=a[e];var l=s[e];r="";var p=this.clone();p.negative=0;while(!p.isZero()){var v=p.modn(l).toString(e);p=p.idivn(l);if(!p.isZero()){r=n[c-v.length]+v+r}else{r=v+r}}if(this.isZero()){r="0"+r}while(r.length%t!==0){r="0"+r}if(this.negative!==0){r="-"+r}return r}assert(false,"Base should be between 2 and 36")};BN.prototype.toNumber=function toNumber(){var e=this.words[0];if(this.length===2){e+=this.words[1]*67108864}else if(this.length===3&&this.words[2]===1){e+=4503599627370496+this.words[1]*67108864}else if(this.length>2){assert(false,"Number can only safely store up to 53 bits")}return this.negative!==0?-e:e};BN.prototype.toJSON=function toJSON(){return this.toString(16)};BN.prototype.toBuffer=function toBuffer(e,t){assert(typeof i!=="undefined");return this.toArrayLike(i,e,t)};BN.prototype.toArray=function toArray(e,t){return this.toArrayLike(Array,e,t)};BN.prototype.toArrayLike=function toArrayLike(e,t,r){var i=this.byteLength();var n=r||Math.max(1,i);assert(i<=n,"byte array longer than desired length");assert(n>0,"Requested array length <= 0");this.strip();var a=t==="le";var s=new e(n);var o,h;var u=this.clone();if(!a){for(h=0;h<n-i;h++){s[h]=0}for(h=0;!u.isZero();h++){o=u.andln(255);u.iushrn(8);s[n-h-1]=o}}else{for(h=0;!u.isZero();h++){o=u.andln(255);u.iushrn(8);s[h]=o}for(;h<n;h++){s[h]=0}}return s};if(Math.clz32){BN.prototype._countBits=function _countBits(e){return 32-Math.clz32(e)}}else{BN.prototype._countBits=function _countBits(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}}BN.prototype._zeroBits=function _zeroBits(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};BN.prototype.bitLength=function bitLength(){var e=this.words[this.length-1];var t=this._countBits(e);return(this.length-1)*26+t};function toBitArray(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}BN.prototype.zeroBits=function zeroBits(){if(this.isZero())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};BN.prototype.byteLength=function byteLength(){return Math.ceil(this.bitLength()/8)};BN.prototype.toTwos=function toTwos(e){if(this.negative!==0){return this.abs().inotn(e).iaddn(1)}return this.clone()};BN.prototype.fromTwos=function fromTwos(e){if(this.testn(e-1)){return this.notn(e).iaddn(1).ineg()}return this.clone()};BN.prototype.isNeg=function isNeg(){return this.negative!==0};BN.prototype.neg=function neg(){return this.clone().ineg()};BN.prototype.ineg=function ineg(){if(!this.isZero()){this.negative^=1}return this};BN.prototype.iuor=function iuor(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()};BN.prototype.ior=function ior(e){assert((this.negative|e.negative)===0);return this.iuor(e)};BN.prototype.or=function or(e){if(this.length>e.length)return this.clone().ior(e);return e.clone().ior(this)};BN.prototype.uor=function uor(e){if(this.length>e.length)return this.clone().iuor(e);return e.clone().iuor(this)};BN.prototype.iuand=function iuand(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()};BN.prototype.iand=function iand(e){assert((this.negative|e.negative)===0);return this.iuand(e)};BN.prototype.and=function and(e){if(this.length>e.length)return this.clone().iand(e);return e.clone().iand(this)};BN.prototype.uand=function uand(e){if(this.length>e.length)return this.clone().iuand(e);return e.clone().iuand(this)};BN.prototype.iuxor=function iuxor(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()};BN.prototype.ixor=function ixor(e){assert((this.negative|e.negative)===0);return this.iuxor(e)};BN.prototype.xor=function xor(e){if(this.length>e.length)return this.clone().ixor(e);return e.clone().ixor(this)};BN.prototype.uxor=function uxor(e){if(this.length>e.length)return this.clone().iuxor(e);return e.clone().iuxor(this)};BN.prototype.inotn=function inotn(e){assert(typeof e==="number"&&e>=0);var t=Math.ceil(e/26)|0;var r=e%26;this._expand(t);if(r>0){t--}for(var i=0;i<t;i++){this.words[i]=~this.words[i]&67108863}if(r>0){this.words[i]=~this.words[i]&67108863>>26-r}return this.strip()};BN.prototype.notn=function notn(e){return this.clone().inotn(e)};BN.prototype.setn=function setn(e,t){assert(typeof e==="number"&&e>=0);var r=e/26|0;var i=e%26;this._expand(r+1);if(t){this.words[r]=this.words[r]|1<<i}else{this.words[r]=this.words[r]&~(1<<i)}return this.strip()};BN.prototype.iadd=function iadd(e){var t;if(this.negative!==0&&e.negative===0){this.negative=0;t=this.isub(e);this.negative^=1;return this._normSign()}else if(this.negative===0&&e.negative!==0){e.negative=0;t=this.isub(e);e.negative=1;return t._normSign()}var r,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++){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++){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};BN.prototype.add=function add(e){var t;if(e.negative!==0&&this.negative===0){e.negative=0;t=this.sub(e);e.negative^=1;return t}else if(e.negative===0&&this.negative!==0){this.negative=0;t=e.sub(this);this.negative=1;return t}if(this.length>e.length)return this.clone().iadd(e);return e.clone().iadd(this)};BN.prototype.isub=function isub(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,n;if(r>0){i=this;n=e}else{i=e;n=this}var a=0;for(var s=0;s<n.length;s++){t=(i.words[s]|0)-(n.words[s]|0)+a;a=t>>26;this.words[s]=t&67108863}for(;a!==0&&s<i.length;s++){t=(i.words[s]|0)+a;a=t>>26;this.words[s]=t&67108863}if(a===0&&s<i.length&&i!==this){for(;s<i.length;s++){this.words[s]=i.words[s]}}this.length=Math.max(this.length,s);if(i!==this){this.negative=1}return this.strip()};BN.prototype.sub=function sub(e){return this.clone().isub(e)};function smallMulTo(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 s=n*a;var o=s&67108863;var h=s/67108864|0;r.words[0]=o;for(var u=1;u<i;u++){var d=h>>>26;var c=h&67108863;var l=Math.min(u,t.length-1);for(var p=Math.max(0,u-e.length+1);p<=l;p++){var v=u-p|0;n=e.words[v]|0;a=t.words[p]|0;s=n*a+c;d+=s/67108864|0;c=s&67108863}r.words[u]=c|0;h=d|0}if(h!==0){r.words[u]=h|0}else{r.length--}return r.strip()}var o=function comb10MulTo(e,t,r){var i=e.words;var n=t.words;var a=r.words;var s=0;var o;var h;var u;var d=i[0]|0;var c=d&8191;var l=d>>>13;var p=i[1]|0;var v=p&8191;var b=p>>>13;var m=i[2]|0;var y=m&8191;var g=m>>>13;var _=i[3]|0;var w=_&8191;var M=_>>>13;var B=i[4]|0;var E=B&8191;var k=B>>>13;var A=i[5]|0;var N=A&8191;var P=A>>>13;var x=i[6]|0;var I=x&8191;var C=x>>>13;var D=i[7]|0;var T=D&8191;var j=D>>>13;var q=i[8]|0;var O=q&8191;var H=q>>>13;var L=i[9]|0;var z=L&8191;var F=L>>>13;var U=n[0]|0;var W=U&8191;var V=U>>>13;var G=n[1]|0;var J=G&8191;var Z=G>>>13;var X=n[2]|0;var Y=X&8191;var $=X>>>13;var Q=n[3]|0;var ee=Q&8191;var te=Q>>>13;var re=n[4]|0;var ie=re&8191;var ne=re>>>13;var ae=n[5]|0;var fe=ae&8191;var se=ae>>>13;var oe=n[6]|0;var he=oe&8191;var ue=oe>>>13;var de=n[7]|0;var ce=de&8191;var le=de>>>13;var pe=n[8]|0;var ve=pe&8191;var be=pe>>>13;var me=n[9]|0;var ye=me&8191;var ge=me>>>13;r.negative=e.negative^t.negative;r.length=19;o=Math.imul(c,W);h=Math.imul(c,V);h=h+Math.imul(l,W)|0;u=Math.imul(l,V);var _e=(s+o|0)+((h&8191)<<13)|0;s=(u+(h>>>13)|0)+(_e>>>26)|0;_e&=67108863;o=Math.imul(v,W);h=Math.imul(v,V);h=h+Math.imul(b,W)|0;u=Math.imul(b,V);o=o+Math.imul(c,J)|0;h=h+Math.imul(c,Z)|0;h=h+Math.imul(l,J)|0;u=u+Math.imul(l,Z)|0;var we=(s+o|0)+((h&8191)<<13)|0;s=(u+(h>>>13)|0)+(we>>>26)|0;we&=67108863;o=Math.imul(y,W);h=Math.imul(y,V);h=h+Math.imul(g,W)|0;u=Math.imul(g,V);o=o+Math.imul(v,J)|0;h=h+Math.imul(v,Z)|0;h=h+Math.imul(b,J)|0;u=u+Math.imul(b,Z)|0;o=o+Math.imul(c,Y)|0;h=h+Math.imul(c,$)|0;h=h+Math.imul(l,Y)|0;u=u+Math.imul(l,$)|0;var Me=(s+o|0)+((h&8191)<<13)|0;s=(u+(h>>>13)|0)+(Me>>>26)|0;Me&=67108863;o=Math.imul(w,W);h=Math.imul(w,V);h=h+Math.imul(M,W)|0;u=Math.imul(M,V);o=o+Math.imul(y,J)|0;h=h+Math.imul(y,Z)|0;h=h+Math.imul(g,J)|0;u=u+Math.imul(g,Z)|0;o=o+Math.imul(v,Y)|0;h=h+Math.imul(v,$)|0;h=h+Math.imul(b,Y)|0;u=u+Math.imul(b,$)|0;o=o+Math.imul(c,ee)|0;h=h+Math.imul(c,te)|0;h=h+Math.imul(l,ee)|0;u=u+Math.imul(l,te)|0;var Se=(s+o|0)+((h&8191)<<13)|0;s=(u+(h>>>13)|0)+(Se>>>26)|0;Se&=67108863;o=Math.imul(E,W);h=Math.imul(E,V);h=h+Math.imul(k,W)|0;u=Math.imul(k,V);o=o+Math.imul(w,J)|0;h=h+Math.imul(w,Z)|0;h=h+Math.imul(M,J)|0;u=u+Math.imul(M,Z)|0;o=o+Math.imul(y,Y)|0;h=h+Math.imul(y,$)|0;h=h+Math.imul(g,Y)|0;u=u+Math.imul(g,$)|0;o=o+Math.imul(v,ee)|0;h=h+Math.imul(v,te)|0;h=h+Math.imul(b,ee)|0;u=u+Math.imul(b,te)|0;o=o+Math.imul(c,ie)|0;h=h+Math.imul(c,ne)|0;h=h+Math.imul(l,ie)|0;u=u+Math.imul(l,ne)|0;var Be=(s+o|0)+((h&8191)<<13)|0;s=(u+(h>>>13)|0)+(Be>>>26)|0;Be&=67108863;o=Math.imul(N,W);h=Math.imul(N,V);h=h+Math.imul(P,W)|0;u=Math.imul(P,V);o=o+Math.imul(E,J)|0;h=h+Math.imul(E,Z)|0;h=h+Math.imul(k,J)|0;u=u+Math.imul(k,Z)|0;o=o+Math.imul(w,Y)|0;h=h+Math.imul(w,$)|0;h=h+Math.imul(M,Y)|0;u=u+Math.imul(M,$)|0;o=o+Math.imul(y,ee)|0;h=h+Math.imul(y,te)|0;h=h+Math.imul(g,ee)|0;u=u+Math.imul(g,te)|0;o=o+Math.imul(v,ie)|0;h=h+Math.imul(v,ne)|0;h=h+Math.imul(b,ie)|0;u=u+Math.imul(b,ne)|0;o=o+Math.imul(c,fe)|0;h=h+Math.imul(c,se)|0;h=h+Math.imul(l,fe)|0;u=u+Math.imul(l,se)|0;var Ee=(s+o|0)+((h&8191)<<13)|0;s=(u+(h>>>13)|0)+(Ee>>>26)|0;Ee&=67108863;o=Math.imul(I,W);h=Math.imul(I,V);h=h+Math.imul(C,W)|0;u=Math.imul(C,V);o=o+Math.imul(N,J)|0;h=h+Math.imul(N,Z)|0;h=h+Math.imul(P,J)|0;u=u+Math.imul(P,Z)|0;o=o+Math.imul(E,Y)|0;h=h+Math.imul(E,$)|0;h=h+Math.imul(k,Y)|0;u=u+Math.imul(k,$)|0;o=o+Math.imul(w,ee)|0;h=h+Math.imul(w,te)|0;h=h+Math.imul(M,ee)|0;u=u+Math.imul(M,te)|0;o=o+Math.imul(y,ie)|0;h=h+Math.imul(y,ne)|0;h=h+Math.imul(g,ie)|0;u=u+Math.imul(g,ne)|0;o=o+Math.imul(v,fe)|0;h=h+Math.imul(v,se)|0;h=h+Math.imul(b,fe)|0;u=u+Math.imul(b,se)|0;o=o+Math.imul(c,he)|0;h=h+Math.imul(c,ue)|0;h=h+Math.imul(l,he)|0;u=u+Math.imul(l,ue)|0;var ke=(s+o|0)+((h&8191)<<13)|0;s=(u+(h>>>13)|0)+(ke>>>26)|0;ke&=67108863;o=Math.imul(T,W);h=Math.imul(T,V);h=h+Math.imul(j,W)|0;u=Math.imul(j,V);o=o+Math.imul(I,J)|0;h=h+Math.imul(I,Z)|0;h=h+Math.imul(C,J)|0;u=u+Math.imul(C,Z)|0;o=o+Math.imul(N,Y)|0;h=h+Math.imul(N,$)|0;h=h+Math.imul(P,Y)|0;u=u+Math.imul(P,$)|0;o=o+Math.imul(E,ee)|0;h=h+Math.imul(E,te)|0;h=h+Math.imul(k,ee)|0;u=u+Math.imul(k,te)|0;o=o+Math.imul(w,ie)|0;h=h+Math.imul(w,ne)|0;h=h+Math.imul(M,ie)|0;u=u+Math.imul(M,ne)|0;o=o+Math.imul(y,fe)|0;h=h+Math.imul(y,se)|0;h=h+Math.imul(g,fe)|0;u=u+Math.imul(g,se)|0;o=o+Math.imul(v,he)|0;h=h+Math.imul(v,ue)|0;h=h+Math.imul(b,he)|0;u=u+Math.imul(b,ue)|0;o=o+Math.imul(c,ce)|0;h=h+Math.imul(c,le)|0;h=h+Math.imul(l,ce)|0;u=u+Math.imul(l,le)|0;var Ae=(s+o|0)+((h&8191)<<13)|0;s=(u+(h>>>13)|0)+(Ae>>>26)|0;Ae&=67108863;o=Math.imul(O,W);h=Math.imul(O,V);h=h+Math.imul(H,W)|0;u=Math.imul(H,V);o=o+Math.imul(T,J)|0;h=h+Math.imul(T,Z)|0;h=h+Math.imul(j,J)|0;u=u+Math.imul(j,Z)|0;o=o+Math.imul(I,Y)|0;h=h+Math.imul(I,$)|0;h=h+Math.imul(C,Y)|0;u=u+Math.imul(C,$)|0;o=o+Math.imul(N,ee)|0;h=h+Math.imul(N,te)|0;h=h+Math.imul(P,ee)|0;u=u+Math.imul(P,te)|0;o=o+Math.imul(E,ie)|0;h=h+Math.imul(E,ne)|0;h=h+Math.imul(k,ie)|0;u=u+Math.imul(k,ne)|0;o=o+Math.imul(w,fe)|0;h=h+Math.imul(w,se)|0;h=h+Math.imul(M,fe)|0;u=u+Math.imul(M,se)|0;o=o+Math.imul(y,he)|0;h=h+Math.imul(y,ue)|0;h=h+Math.imul(g,he)|0;u=u+Math.imul(g,ue)|0;o=o+Math.imul(v,ce)|0;h=h+Math.imul(v,le)|0;h=h+Math.imul(b,ce)|0;u=u+Math.imul(b,le)|0;o=o+Math.imul(c,ve)|0;h=h+Math.imul(c,be)|0;h=h+Math.imul(l,ve)|0;u=u+Math.imul(l,be)|0;var Ne=(s+o|0)+((h&8191)<<13)|0;s=(u+(h>>>13)|0)+(Ne>>>26)|0;Ne&=67108863;o=Math.imul(z,W);h=Math.imul(z,V);h=h+Math.imul(F,W)|0;u=Math.imul(F,V);o=o+Math.imul(O,J)|0;h=h+Math.imul(O,Z)|0;h=h+Math.imul(H,J)|0;u=u+Math.imul(H,Z)|0;o=o+Math.imul(T,Y)|0;h=h+Math.imul(T,$)|0;h=h+Math.imul(j,Y)|0;u=u+Math.imul(j,$)|0;o=o+Math.imul(I,ee)|0;h=h+Math.imul(I,te)|0;h=h+Math.imul(C,ee)|0;u=u+Math.imul(C,te)|0;o=o+Math.imul(N,ie)|0;h=h+Math.imul(N,ne)|0;h=h+Math.imul(P,ie)|0;u=u+Math.imul(P,ne)|0;o=o+Math.imul(E,fe)|0;h=h+Math.imul(E,se)|0;h=h+Math.imul(k,fe)|0;u=u+Math.imul(k,se)|0;o=o+Math.imul(w,he)|0;h=h+Math.imul(w,ue)|0;h=h+Math.imul(M,he)|0;u=u+Math.imul(M,ue)|0;o=o+Math.imul(y,ce)|0;h=h+Math.imul(y,le)|0;h=h+Math.imul(g,ce)|0;u=u+Math.imul(g,le)|0;o=o+Math.imul(v,ve)|0;h=h+Math.imul(v,be)|0;h=h+Math.imul(b,ve)|0;u=u+Math.imul(b,be)|0;o=o+Math.imul(c,ye)|0;h=h+Math.imul(c,ge)|0;h=h+Math.imul(l,ye)|0;u=u+Math.imul(l,ge)|0;var Re=(s+o|0)+((h&8191)<<13)|0;s=(u+(h>>>13)|0)+(Re>>>26)|0;Re&=67108863;o=Math.imul(z,J);h=Math.imul(z,Z);h=h+Math.imul(F,J)|0;u=Math.imul(F,Z);o=o+Math.imul(O,Y)|0;h=h+Math.imul(O,$)|0;h=h+Math.imul(H,Y)|0;u=u+Math.imul(H,$)|0;o=o+Math.imul(T,ee)|0;h=h+Math.imul(T,te)|0;h=h+Math.imul(j,ee)|0;u=u+Math.imul(j,te)|0;o=o+Math.imul(I,ie)|0;h=h+Math.imul(I,ne)|0;h=h+Math.imul(C,ie)|0;u=u+Math.imul(C,ne)|0;o=o+Math.imul(N,fe)|0;h=h+Math.imul(N,se)|0;h=h+Math.imul(P,fe)|0;u=u+Math.imul(P,se)|0;o=o+Math.imul(E,he)|0;h=h+Math.imul(E,ue)|0;h=h+Math.imul(k,he)|0;u=u+Math.imul(k,ue)|0;o=o+Math.imul(w,ce)|0;h=h+Math.imul(w,le)|0;h=h+Math.imul(M,ce)|0;u=u+Math.imul(M,le)|0;o=o+Math.imul(y,ve)|0;h=h+Math.imul(y,be)|0;h=h+Math.imul(g,ve)|0;u=u+Math.imul(g,be)|0;o=o+Math.imul(v,ye)|0;h=h+Math.imul(v,ge)|0;h=h+Math.imul(b,ye)|0;u=u+Math.imul(b,ge)|0;var Pe=(s+o|0)+((h&8191)<<13)|0;s=(u+(h>>>13)|0)+(Pe>>>26)|0;Pe&=67108863;o=Math.imul(z,Y);h=Math.imul(z,$);h=h+Math.imul(F,Y)|0;u=Math.imul(F,$);o=o+Math.imul(O,ee)|0;h=h+Math.imul(O,te)|0;h=h+Math.imul(H,ee)|0;u=u+Math.imul(H,te)|0;o=o+Math.imul(T,ie)|0;h=h+Math.imul(T,ne)|0;h=h+Math.imul(j,ie)|0;u=u+Math.imul(j,ne)|0;o=o+Math.imul(I,fe)|0;h=h+Math.imul(I,se)|0;h=h+Math.imul(C,fe)|0;u=u+Math.imul(C,se)|0;o=o+Math.imul(N,he)|0;h=h+Math.imul(N,ue)|0;h=h+Math.imul(P,he)|0;u=u+Math.imul(P,ue)|0;o=o+Math.imul(E,ce)|0;h=h+Math.imul(E,le)|0;h=h+Math.imul(k,ce)|0;u=u+Math.imul(k,le)|0;o=o+Math.imul(w,ve)|0;h=h+Math.imul(w,be)|0;h=h+Math.imul(M,ve)|0;u=u+Math.imul(M,be)|0;o=o+Math.imul(y,ye)|0;h=h+Math.imul(y,ge)|0;h=h+Math.imul(g,ye)|0;u=u+Math.imul(g,ge)|0;var xe=(s+o|0)+((h&8191)<<13)|0;s=(u+(h>>>13)|0)+(xe>>>26)|0;xe&=67108863;o=Math.imul(z,ee);h=Math.imul(z,te);h=h+Math.imul(F,ee)|0;u=Math.imul(F,te);o=o+Math.imul(O,ie)|0;h=h+Math.imul(O,ne)|0;h=h+Math.imul(H,ie)|0;u=u+Math.imul(H,ne)|0;o=o+Math.imul(T,fe)|0;h=h+Math.imul(T,se)|0;h=h+Math.imul(j,fe)|0;u=u+Math.imul(j,se)|0;o=o+Math.imul(I,he)|0;h=h+Math.imul(I,ue)|0;h=h+Math.imul(C,he)|0;u=u+Math.imul(C,ue)|0;o=o+Math.imul(N,ce)|0;h=h+Math.imul(N,le)|0;h=h+Math.imul(P,ce)|0;u=u+Math.imul(P,le)|0;o=o+Math.imul(E,ve)|0;h=h+Math.imul(E,be)|0;h=h+Math.imul(k,ve)|0;u=u+Math.imul(k,be)|0;o=o+Math.imul(w,ye)|0;h=h+Math.imul(w,ge)|0;h=h+Math.imul(M,ye)|0;u=u+Math.imul(M,ge)|0;var Ie=(s+o|0)+((h&8191)<<13)|0;s=(u+(h>>>13)|0)+(Ie>>>26)|0;Ie&=67108863;o=Math.imul(z,ie);h=Math.imul(z,ne);h=h+Math.imul(F,ie)|0;u=Math.imul(F,ne);o=o+Math.imul(O,fe)|0;h=h+Math.imul(O,se)|0;h=h+Math.imul(H,fe)|0;u=u+Math.imul(H,se)|0;o=o+Math.imul(T,he)|0;h=h+Math.imul(T,ue)|0;h=h+Math.imul(j,he)|0;u=u+Math.imul(j,ue)|0;o=o+Math.imul(I,ce)|0;h=h+Math.imul(I,le)|0;h=h+Math.imul(C,ce)|0;u=u+Math.imul(C,le)|0;o=o+Math.imul(N,ve)|0;h=h+Math.imul(N,be)|0;h=h+Math.imul(P,ve)|0;u=u+Math.imul(P,be)|0;o=o+Math.imul(E,ye)|0;h=h+Math.imul(E,ge)|0;h=h+Math.imul(k,ye)|0;u=u+Math.imul(k,ge)|0;var Ce=(s+o|0)+((h&8191)<<13)|0;s=(u+(h>>>13)|0)+(Ce>>>26)|0;Ce&=67108863;o=Math.imul(z,fe);h=Math.imul(z,se);h=h+Math.imul(F,fe)|0;u=Math.imul(F,se);o=o+Math.imul(O,he)|0;h=h+Math.imul(O,ue)|0;h=h+Math.imul(H,he)|0;u=u+Math.imul(H,ue)|0;o=o+Math.imul(T,ce)|0;h=h+Math.imul(T,le)|0;h=h+Math.imul(j,ce)|0;u=u+Math.imul(j,le)|0;o=o+Math.imul(I,ve)|0;h=h+Math.imul(I,be)|0;h=h+Math.imul(C,ve)|0;u=u+Math.imul(C,be)|0;o=o+Math.imul(N,ye)|0;h=h+Math.imul(N,ge)|0;h=h+Math.imul(P,ye)|0;u=u+Math.imul(P,ge)|0;var De=(s+o|0)+((h&8191)<<13)|0;s=(u+(h>>>13)|0)+(De>>>26)|0;De&=67108863;o=Math.imul(z,he);h=Math.imul(z,ue);h=h+Math.imul(F,he)|0;u=Math.imul(F,ue);o=o+Math.imul(O,ce)|0;h=h+Math.imul(O,le)|0;h=h+Math.imul(H,ce)|0;u=u+Math.imul(H,le)|0;o=o+Math.imul(T,ve)|0;h=h+Math.imul(T,be)|0;h=h+Math.imul(j,ve)|0;u=u+Math.imul(j,be)|0;o=o+Math.imul(I,ye)|0;h=h+Math.imul(I,ge)|0;h=h+Math.imul(C,ye)|0;u=u+Math.imul(C,ge)|0;var Te=(s+o|0)+((h&8191)<<13)|0;s=(u+(h>>>13)|0)+(Te>>>26)|0;Te&=67108863;o=Math.imul(z,ce);h=Math.imul(z,le);h=h+Math.imul(F,ce)|0;u=Math.imul(F,le);o=o+Math.imul(O,ve)|0;h=h+Math.imul(O,be)|0;h=h+Math.imul(H,ve)|0;u=u+Math.imul(H,be)|0;o=o+Math.imul(T,ye)|0;h=h+Math.imul(T,ge)|0;h=h+Math.imul(j,ye)|0;u=u+Math.imul(j,ge)|0;var je=(s+o|0)+((h&8191)<<13)|0;s=(u+(h>>>13)|0)+(je>>>26)|0;je&=67108863;o=Math.imul(z,ve);h=Math.imul(z,be);h=h+Math.imul(F,ve)|0;u=Math.imul(F,be);o=o+Math.imul(O,ye)|0;h=h+Math.imul(O,ge)|0;h=h+Math.imul(H,ye)|0;u=u+Math.imul(H,ge)|0;var qe=(s+o|0)+((h&8191)<<13)|0;s=(u+(h>>>13)|0)+(qe>>>26)|0;qe&=67108863;o=Math.imul(z,ye);h=Math.imul(z,ge);h=h+Math.imul(F,ye)|0;u=Math.imul(F,ge);var Oe=(s+o|0)+((h&8191)<<13)|0;s=(u+(h>>>13)|0)+(Oe>>>26)|0;Oe&=67108863;a[0]=_e;a[1]=we;a[2]=Me;a[3]=Se;a[4]=Be;a[5]=Ee;a[6]=ke;a[7]=Ae;a[8]=Ne;a[9]=Re;a[10]=Pe;a[11]=xe;a[12]=Ie;a[13]=Ce;a[14]=De;a[15