PageSourceSearch

https://vcbdigibank.vietcombank.com.vn/node_modules_node-forge_lib_index_js.80acceaa8861c5cb.js

js vietcombank.com.vn collected 2026-09-24 09:14:25 UTC 282,236 bytes, 1 lines download raw bytes

1(self.webpackChunkdigibank_omni=self.webpackChunkdigibank_omni||[]).push([["node_modules_node-forge_lib_index_js"],{28097:(re,ce,O)=>{var a=O(9185);function e(g,T){a.cipher.registerAlgorithm(g,function(){return new a.aes.Algorithm(g,T)})}O(81635),O(19464),O(96615),re.exports=a.aes=a.aes||{},a.aes.startEncrypting=function(g,T,h,v){var n=E({key:g,output:h,decrypt:!1,mode:v});return n.start(T),n},a.aes.createEncryptionCipher=function(g,T){return E({key:g,output:null,decrypt:!1,mode:T})},a.aes.startDecrypting=function(g,T,h,v){var n=E({key:g,output:h,decrypt:!0,mode:v});return n.start(T),n},a.aes.createDecryptionCipher=function(g,T){return E({key:g,output:null,decrypt:!0,mode:T})},a.aes.Algorithm=function(g,T){i||f();var h=this;h.name=g,h.mode=new T({blockSize:16,cipher:{encrypt:function(v,n){return U(h._w,v,n,!1)},decrypt:function(v,n){return U(h._w,v,n,!0)}}}),h._init=!1},a.aes.Algorithm.prototype.initialize=function(g){if(!this._init){var h,T=g.key;if("string"!=typeof T||16!==T.length&&24!==T.length&&32!==T.length){if(a.util.isArray(T)&&(16===T.length||24===T.length||32===T.length)){h=T,T=a.util.createBuffer();for(var v=0;v<h.length;++v)T.putByte(h[v])}}else T=a.util.createBuffer(T);if(!a.util.isArray(T)){h=T,T=[];var n=h.length();if(16===n||24===n||32===n)for(n>>>=2,v=0;v<n;++v)T.push(h.getInt32())}if(!a.util.isArray(T)||4!==T.length&&6!==T.length&&8!==T.length)throw new Error("Invalid key parameter.");var p=-1!==["CFB","OFB","CTR","GCM"].indexOf(this.mode.name);this._w=I(T,g.decrypt&&!p),this._init=!0}},a.aes._expandKey=function(g,T){return i||f(),I(g,T)},a.aes._updateBlock=U,e("AES-ECB",a.cipher.modes.ecb),e("AES-CBC",a.cipher.modes.cbc),e("AES-CFB",a.cipher.modes.cfb),e("AES-OFB",a.cipher.modes.ofb),e("AES-CTR",a.cipher.modes.ctr),e("AES-GCM",a.cipher.modes.gcm);var m,x,d,l,r,i=!1,C=4;function f(){i=!0,d=[0,1,2,4,8,16,32,64,128,27,54];for(var g=new Array(256),T=0;T<128;++T)g[T]=T<<1,g[T+128]=T+128<<1^283;for(m=new Array(256),x=new Array(256),l=new Array(4),r=new Array(4),T=0;T<4;++T)l[T]=new Array(256),r[T]=new Array(256);var n,u,p,A,R,k,c,h=0,v=0;for(T=0;T<256;++T){m[h]=A=(A=v^v<<1^v<<2^v<<3^v<<4)>>8^255&A^99,x[A]=h,k=(R=g[A])<<24^A<<16^A<<8^A^R,c=((n=g[h])^(u=g[n])^(p=g[u]))<<24^(h^p)<<16^(h^u^p)<<8^h^n^p;for(var y=0;y<4;++y)l[y][h]=k,r[y][A]=c,k=k<<24|k>>>8,c=c<<24|c>>>8;0===h?h=v=1:(h=n^g[g[g[n^p]]],v^=g[g[v]])}}function I(g,T){for(var v,h=g.slice(0),n=1,u=h.length,A=C*(u+6+1),R=u;R<A;++R)v=h[R-1],R%u==0?(v=m[v>>>16&255]<<24^m[v>>>8&255]<<16^m[255&v]<<8^m[v>>>24]^d[n]<<24,n++):u>6&&R%u==4&&(v=m[v>>>24]<<24^m[v>>>16&255]<<16^m[v>>>8&255]<<8^m[255&v]),h[R]=h[R-u]^v;if(T){for(var k,c=r[0],y=r[1],N=r[2],t=r[3],L=h.slice(0),V=(R=0,(A=h.length)-C);R<A;R+=C,V-=C)if(0===R||R===A-C)L[R]=h[V],L[R+1]=h[V+3],L[R+2]=h[V+2],L[R+3]=h[V+1];else for(var D=0;D<C;++D)L[R+(3&-D)]=c[m[(k=h[V+D])>>>24]]^y[m[k>>>16&255]]^N[m[k>>>8&255]]^t[m[255&k]];h=L}return h}function U(g,T,h,v){var u,p,A,R,k,c,y,N,t,L,V,D,n=g.length/4-1;v?(u=r[0],p=r[1],A=r[2],R=r[3],k=x):(u=l[0],p=l[1],A=l[2],R=l[3],k=m),c=T[0]^g[0],y=T[v?3:1]^g[1],N=T[2]^g[2],t=T[v?1:3]^g[3];for(var M=3,_=1;_<n;++_)L=u[c>>>24]^p[y>>>16&255]^A[N>>>8&255]^R[255&t]^g[++M],V=u[y>>>24]^p[N>>>16&255]^A[t>>>8&255]^R[255&c]^g[++M],D=u[N>>>24]^p[t>>>16&255]^A[c>>>8&255]^R[255&y]^g[++M],t=u[t>>>24]^p[c>>>16&255]^A[y>>>8&255]^R[255&N]^g[++M],c=L,y=V,N=D;h[0]=k[c>>>24]<<24^k[y>>>16&255]<<16^k[N>>>8&255]<<8^k[255&t]^g[++M],h[v?3:1]=k[y>>>24]<<24^k[N>>>16&255]<<16^k[t>>>8&255]<<8^k[255&c]^g[++M],h[2]=k[N>>>24]<<24^k[t>>>16&255]<<16^k[c>>>8&255]<<8^k[255&y]^g[++M],h[v?1:3]=k[t>>>24]<<24^k[c>>>16&255]<<16^k[y>>>8&255]<<8^k[255&N]^g[++M]}function E(g){var v,h="AES-"+((g=g||{}).mode||"CBC").toUpperCase(),n=(v=g.decrypt?a.cipher.createDecipher(h,g.key):a.cipher.createCipher(h,g.key)).start;return v.start=function(u,p){var A=null;p instanceof a.util.ByteBuffer&&(A=p,p={}),(p=p||{}).output=A,p.iv=u,n.call(v,p)},v}},71122:(re,ce,O)=>{var a=O(9185);O(28097),O(83704);var e=re.exports=a.tls;function i(r,f,I){var U=f.entity===a.tls.ConnectionEnd.client;r.read.cipherState={init:!1,cipher:a.cipher.createDecipher("AES-CBC",U?I.keys.server_write_key:I.keys.client_write_key),iv:U?I.keys.server_write_IV:I.keys.client_write_IV},r.write.cipherState={init:!1,cipher:a.cipher.createCipher("AES-CBC",U?I.keys.client_write_key:I.keys.server_write_key),iv:U?I.keys.client_write_IV:I.keys.server_write_IV},r.read.cipherFunction=d,r.write.cipherFunction=C,r.read.macLength=r.write.macLength=I.mac_length,r.read.mac
1Function=r.write.macFunction=e.hmac_sha1}function C(r,f){var E,I=!1,U=f.macFunction(f.macKey,f.sequenceNumber,r);r.fragment.putBytes(U),f.updateSequenceNumber(),E=r.version.minor===e.Versions.TLS_1_0.minor?f.cipherState.init?null:f.cipherState.iv:a.random.getBytesSync(16),f.cipherState.init=!0;var g=f.cipherState.cipher;return g.start({iv:E}),r.version.minor>=e.Versions.TLS_1_1.minor&&g.output.putBytes(E),g.update(r.fragment),g.finish(m)&&(r.fragment=g.output,r.length=r.fragment.length(),I=!0),I}function m(r,f,I){if(!I){var U=r-f.length()%r;f.fillWithByte(U-1,U)}return!0}function x(r,f,I){var U=!0;if(I){for(var E=f.length(),g=f.last(),T=E-1-g;T<E-1;++T)U=U&&f.at(T)==g;U&&f.truncate(g+1)}return U}function d(r,f){var U,I=!1;U=r.version.minor===e.Versions.TLS_1_0.minor?f.cipherState.init?null:f.cipherState.iv:r.fragment.getBytes(16),f.cipherState.init=!0;var E=f.cipherState.cipher;E.start({iv:U}),E.update(r.fragment),I=E.finish(x);var g=f.macLength,T=a.random.getBytesSync(g),h=E.output.length();h>=g?(r.fragment=E.output.getBytes(h-g),T=E.output.getBytes(g)):r.fragment=E.output.getBytes(),r.fragment=a.util.createBuffer(r.fragment),r.length=r.fragment.length();var v=f.macFunction(f.macKey,f.sequenceNumber,r);return f.updateSequenceNumber(),I=function l(r,f,I){var U=a.hmac.create();return U.start("SHA1",r),U.update(f),f=U.digest().getBytes(),U.start(null,null),U.update(I),f===(I=U.digest().getBytes())}(f.macKey,T,v)&&I,I}e.CipherSuites.TLS_RSA_WITH_AES_128_CBC_SHA={id:[0,47],name:"TLS_RSA_WITH_AES_128_CBC_SHA",initSecurityParameters:function(r){r.bulk_cipher_algorithm=e.BulkCipherAlgorithm.aes,r.cipher_type=e.CipherType.block,r.enc_key_length=16,r.block_length=16,r.fixed_iv_length=16,r.record_iv_length=16,r.mac_algorithm=e.MACAlgorithm.hmac_sha1,r.mac_length=20,r.mac_key_length=20},initConnectionState:i},e.CipherSuites.TLS_RSA_WITH_AES_256_CBC_SHA={id:[0,53],name:"TLS_RSA_WITH_AES_256_CBC_SHA",initSecurityParameters:function(r){r.bulk_cipher_algorithm=e.BulkCipherAlgorithm.aes,r.cipher_type=e.CipherType.block,r.enc_key_length=32,r.block_length=16,r.fixed_iv_length=16,r.record_iv_length=16,r.mac_algorithm=e.MACAlgorithm.hmac_sha1,r.mac_length=20,r.mac_key_length=20},initConnectionState:i}},78593:(re,ce,O)=>{var a=O(9185);O(6902);var e=a.asn1;ce.privateKeyValidator={name:"PrivateKeyInfo",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:e.Class.UNIVERSAL,type:e.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},ce.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{tagClass:e.Class.UNIVERSAL,type:e.Type.BITSTRING,constructed:!1,composed:!0,captureBitStringValue:"ed25519PublicKey"}]}},6902:(re,ce,O)=>{var a=O(9185);O(96615),O(65853);var e=re.exports=a.asn1=a.asn1||{};function i(d,l,r){if(r>l){var f=new Error("Too few bytes to parse DER.");throw f.available=d.length(),f.remaining=l,f.requested=r,f}}function m(d,l,r,f){var I;i(d,l,2);var U=d.getByte();l--;var E=192&U,g=31&U;I=d.length();var T=function(d,l){var r=d.getByte();if(l--,128!==r){var f;if(128&r){var U=127&r;i(d,l,U),f=d.getInt(U<<3)}else f=r;if(f<0)throw new Error("Negative length: "+f);return f}}(d,l);if(l-=I-d.length(),void 0!==T&&T>l){if(f.strict){var h=new Error("Too few bytes to read ASN.1 value.");throw h.available=d.length(),h.remaining=l,h.requested=T,h}T=l}var v,n,u=32==(32&U);if(u)if(v=[],void 0===T)for(;;){if(i(d,l,2),d.bytes(2)===String.fromCharCode(0,0)){d.getBytes(2),l-=2;break}I=d.length(),v.push(m(d,l,r+1,f)),l-=I-d.length()}else for(;T>0;)I=d.length(),v.push(m(d,T,r+1,f)),l-=I-d.length(),T-=I-d.length();if(void 0===v&&E===e.Class.UNIVERSAL&&g===e.Type.BITSTRING&&(n=d.bytes(T)),void 0===v&&f.decodeBitStrings&&E===e.Class.UNIVERSAL&&g===e.Type.BITSTRING&&T>1){var p=d.read,A=l,R=0;if(g===e.Type.BITSTRING&&(i(d,l,1),R=d.getByte(),l--),0===R)try{I=d.length();var c=m(d,l,r+1,{strict:!0,decodeBitStrings:!0}),y=I-d.length();l-=y,g==e.Type.BITSTRING&&y++;var N=c.tagClass;y===T&&(N===e.Class.UNIVERSAL||N===e.Class.CONTEXT_SPECIFIC)&&(v=[c])}catch{}void 0===v&&(d.read=p,l=A)}if(void 0===v){if(void 0===T){if(f.strict)throw new Error("Non-constructed ASN.1 object of indefinite length.");T=l}if(g===e.Type.BMPSTRING)for(v="";T>0;T-=2)i(d,l,2),v+=String.fromCharCode(d.getInt16()),l-=2;else v=d.getBytes(T),l-=T}return e.create(E,g,u,v,void 0===n?null:{bitStringContents:n})}e.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192},e.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},e.create=function(d,l,r,f,I){if(a.util.isArray(f)){for(var U=[],E=0;E<f.length;++E)void 0!==f[E]&&U.push(f[E]);f=U}var g={tagClass:d,type:l,constructed:r,composed:r||a.util.isArray(f),value:f};return I&&"bitStringContents"in I&&(g.bitStringContents=I.bitStringContents,g.original=e.copy(g)),g},e.copy=function(d,l){var r;if(a.util.isArray(d)){r=[];for(var f=0;f<d.length;++f)r.push(e.copy(d[f],l));return r}return"string"==typeof d?d:(r={tagClass:d.tagClass,type:d.type,constructed:d.constructed,composed:d.composed,value:e.copy(d.value,l)},l&&!l.excludeBitStringContents&&(r.bitStringContents=d.bitStringContents),r)},e.equals=function(d,l,r){if(a.util.isArray(d)){if(!a.util.isArray(l)||d.length!==l.length)return!1;for(var f=0;f<d.length;++f)if(!e.equals(d[f],l[f]))return!1;return!0}if(typeof d!=typeof l)return!1;if("string"==typeof d)return d===l;var I=d.tagClass===l.tagClass&&d.type===l.type&&d.constructed===l.constructed&&d.composed===l.composed&&e.equals(d.value,l.value);
1return r&&r.includeBitStringContents&&(I=I&&d.bitStringContents===l.bitStringContents),I},e.getBerValueLength=function(d){var l=d.getByte();if(128!==l)return 128&l?d.getInt((127&l)<<3):l},e.fromDer=function(d,l){void 0===l&&(l={strict:!0,parseAllBytes:!0,decodeBitStrings:!0}),"boolean"==typeof l&&(l={strict:l,parseAllBytes:!0,decodeBitStrings:!0}),"strict"in l||(l.strict=!0),"parseAllBytes"in l||(l.parseAllBytes=!0),"decodeBitStrings"in l||(l.decodeBitStrings=!0),"string"==typeof d&&(d=a.util.createBuffer(d));var r=d.length(),f=m(d,d.length(),0,l);if(l.parseAllBytes&&0!==d.length()){var I=new Error("Unparsed DER bytes remain after ASN.1 parsing.");throw I.byteCount=r,I.remaining=d.length(),I}return f},e.toDer=function(d){var l=a.util.createBuffer(),r=d.tagClass|d.type,f=a.util.createBuffer(),I=!1;if("bitStringContents"in d&&(I=!0,d.original&&(I=e.equals(d,d.original))),I)f.putBytes(d.bitStringContents);else if(d.composed){d.constructed?r|=32:f.putByte(0);for(var U=0;U<d.value.length;++U)void 0!==d.value[U]&&f.putBuffer(e.toDer(d.value[U]))}else if(d.type===e.Type.BMPSTRING)for(U=0;U<d.value.length;++U)f.putInt16(d.value.charCodeAt(U));else d.type===e.Type.INTEGER&&d.value.length>1&&(0===d.value.charCodeAt(0)&&!(128&d.value.charCodeAt(1))||255===d.value.charCodeAt(0)&&128==(128&d.value.charCodeAt(1)))?f.putBytes(d.value.substr(1)):f.putBytes(d.value);if(l.putByte(r),f.length()<=127)l.putByte(127&f.length());else{var E=f.length(),g="";do{g+=String.fromCharCode(255&E),E>>>=8}while(E>0);for(l.putByte(128|g.length),U=g.length-1;U>=0;--U)l.putByte(g.charCodeAt(U))}return l.putBuffer(f),l},e.oidToDer=function(d){var l=d.split("."),r=a.util.createBuffer();r.putByte(40*parseInt(l[0],10)+parseInt(l[1],10));for(var f,I,U,E,g=2;g<l.length;++g){f=!0,I=[],U=parseInt(l[g],10);do{E=127&U,U>>>=7,f||(E|=128),I.push(E),f=!1}while(U>0);for(var T=I.length-1;T>=0;--T)r.putByte(I[T])}return r},e.derToOid=function(d){var l;"string"==typeof d&&(d=a.util.createBuffer(d));var r=d.getByte();l=Math.floor(r/40)+"."+r%40;for(var f=0;d.length()>0;)f<<=7,128&(r=d.getByte())?f+=127&r:(l+="."+(f+r),f=0);return l},e.utcTimeToDate=function(d){var l=new Date,r=parseInt(d.substr(0,2),10);r=r>=50?1900+r:2e3+r;var f=parseInt(d.substr(2,2),10)-1,I=parseInt(d.substr(4,2),10),U=parseInt(d.substr(6,2),10),E=parseInt(d.substr(8,2),10),g=0;if(d.length>11){var T=d.charAt(10),h=10;"+"!==T&&"-"!==T&&(g=parseInt(d.substr(10,2),10),h+=2)}
1if(l.setUTCFullYear(r,f,I),l.setUTCHours(U,E,g,0),h&&("+"===(T=d.charAt(h))||"-"===T)){var u=60*parseInt(d.substr(h+1,2),10)+parseInt(d.substr(h+4,2),10);u*=6e4,l.setTime("+"===T?+l-u:+l+u)}return l},e.generalizedTimeToDate=function(d){var l=new Date,r=parseInt(d.substr(0,4),10),f=parseInt(d.substr(4,2),10)-1,I=parseInt(d.substr(6,2),10),U=parseInt(d.substr(8,2),10),E=parseInt(d.substr(10,2),10),g=parseInt(d.substr(12,2),10),T=0,h=0,v=!1;"Z"===d.charAt(d.length-1)&&(v=!0);var n=d.length-5,u=d.charAt(n);return"+"!==u&&"-"!==u||(h=60*parseInt(d.substr(n+1,2),10)+parseInt(d.substr(n+4,2),10),h*=6e4,"+"===u&&(h*=-1),v=!0),"."===d.charAt(14)&&(T=1e3*parseFloat(d.substr(14),10)),v?(l.setUTCFullYear(r,f,I),l.setUTCHours(U,E,g,T),l.setTime(+l+h)):(l.setFullYear(r,f,I),l.setHours(U,E,g,T)),l},e.dateToUtcTime=function(d){if("string"==typeof d)return d;var l="",r=[];r.push((""+d.getUTCFullYear()).substr(2)),r.push(""+(d.getUTCMonth()+1)),r.push(""+d.getUTCDate()),r.push(""+d.getUTCHours()),r.push(""+d.getUTCMinutes()),r.push(""+d.getUTCSeconds());for(var f=0;f<r.length;++f)r[f].length<2&&(l+="0"),l+=r[f];return l+"Z"},e.dateToGeneralizedTime=function(d){if("string"==typeof d)return d;var l="",r=[];r.push(""+d.getUTCFullYear()),r.push(""+(d.getUTCMonth()+1)),r.push(""+d.getUTCDate()),r.push(""+d.getUTCHours()),r.push(""+d.getUTCMinutes()),r.push(""+d.getUTCSeconds());for(var f=0;f<r.length;++f)r[f].length<2&&(l+="0"),l+=r[f];return l+"Z"},e.integerToDer=function(d){var l=a.util.createBuffer();if(d>=-128&&d<128)return l.putSignedInt(d,8);if(d>=-32768&&d<32768)return l.putSignedInt(d,16);if(d>=-8388608&&d<8388608)return l.putSignedInt(d,24);if(d>=-2147483648&&d<2147483648)return l.putSignedInt(d,32);var r=new Error("Integer too large; max is 32-bits.");throw r.integer=d,r},e.derToInteger=function(d){"string"==typeof d&&(d=a.util.createBuffer(d));var l=8*d.length();if(l>32)throw new Error("Integer too large; max is 32-bits.");return d.getSignedInt(l)},e.validate=function(d,l,r,f){var I=!1;if((d.tagClass===l.tagClass||typeof l.tagClass>"u")&&(d.type===l.type||typeof l.type>"u"))if(d.constructed===l.constructed||typeof l.constructed>"u"){if(I=!0,l.value&&a.util.isArray(l.value))for(var U=0,E=0;I&&E<l.value.length;++E)I=l.value[E].optional||!1,d.value[U]&&((I=e.validate(d.value[U],l.value[E],r,f))?++U:l.value[E].optional&&(I=!0)),!I&&f&&f.push("["+l.name+'] Tag class "'+l.tagClass+'", type "'+l.type+'" expected value length "'+l.value.length+'", got "'+d.value.length+'"');if(I&&r&&(l.capture&&(r[l.capture]=d.value),l.captureAsn1&&(r[l.captureAsn1]=d),l.captureBitStringContents&&"bitStringContents"in d&&(r[l.captureBitStringContents]=d.bitStringContents),l.captureBitStringValue&&"bitStringContents"in d))if(d.bitStringContents.length<2)r[l.captureBitStringValue]="";else{if(0!==d.bitStringContents.charCodeAt(0))throw new Error("captureBitStringValue only supported for zero unused bits");r[l.captureBitStringValue]=d.bitStringContents.slice(1)}}else f&&f.push("["+l.name+'] Expected constructed "'+l.constructed+'", got "'+d.constructed+'"');else f&&(d.tagClass!==l.tagClass&&f.push("["+l.name+'] Expected tag class "'+l.tagClass+'", got "'+d.tagClass+'"'),d.type!==l.type&&f.push("["+l.name+'] Expected type "'+l.type+'", got "'+d.type+'"'));return I};var x=/[^\\u0000-\\u00ff]/;e.prettyPrint=function(d,l,r){var f="";r=r||2,(l=l||0)>0&&(f+="\n");for(var I="",U=0;U<l*r;++U)I+=" ";switch(f+=I+"Tag: ",d.tagClass){case e.Class.UNIVERSAL:f+="Universal:";break;case e.Class.APPLICATION:f+="Application:";break;case e.Class.CONTEXT_SPECIFIC:f+="Context-Specific:";break;case e.Class.PRIVATE:f+="Private:"}if(d.tagClass===e.Class.UNIVERSAL)switch(f+=d.type,d.type){case e.Type.NONE:f+=" (None)";break;case e.Type.BOOLEAN:f+=" (Boolean)";break;case e.Type.INTEGER:f+=" (Integer)";break;case e.Type.BITSTRING:f+=" (Bit string)";break;case e.Type.OCTETSTRING:f+=" (Octet string)";break;case e.Type.NULL:f+=" (Null)";break;case e.Type.OID:f+=" (Object Identifier)";break;case e.Type.ODESC:f+=" (Object Descriptor)";break;case e.Type.EXTERNAL:f+=" (External or Instance of)";break;case e.Type.REAL:f+=" (Real)";break;case e.Type.ENUMERATED:f+=" (Enumerated)";break;case e.Type.EMBEDDED:f+=" (Embedded PDV)";break;case e.Type.UTF8:f+=" (UTF8)";break;case e.Type.ROID:f+=" (Relative Object Identifier)";break;case e.Type.SEQUENCE:f+=" (Sequence)";break;case e.Type.SET:f+=" (Set)";break;case e.Type.PRINTABLESTRING:f+=" (Printable String)";break;case e.Type.IA5String:f+=" (IA5String (ASCII))";break;case e.Type.UTCTIME:f+=" (UTC time)";break;case e.Type.GENERALIZEDTIME:f+=" (Generalized time)";break;case e.Type.BMPSTRING:f+=" (BMP String)"}else f+=d.type;if(f+="\n",f+=I+"Constructed: "+d.constructed+"\n",d.composed){var E=0,g="";for(U=0;U<d.value.length;++U)void 0!==d.value[U]&&(E+=1,g+=e.prettyPrint(d.value[U],l+1,r),U+1<d.value.length&&(g+=","));f+=I+"Sub values: "+E+g}else{if(f+=I+"Value: ",d.type===e.Type.OID){var T=e.derToOid(d.value);f+=T,a.pki&&a.pki.oids&&T in a.pki.oids&&(f+=" ("+a.pki.oids[T]+") ")}if(d.type===e.Type.INTEGER)try{f+=e.derToInteger(d.value)}
1catch{f+="0x"+a.util.bytesToHex(d.value)}else if(d.type===e.Type.BITSTRING){if(f+=d.value.length>1?"0x"+a.util.bytesToHex(d.value.slice(1)):"(none)",d.value.length>0){var h=d.value.charCodeAt(0);1==h?f+=" (1 unused bit shown)":h>1&&(f+=" ("+h+" unused bits shown)")}}else if(d.type===e.Type.OCTETSTRING)x.test(d.value)||(f+="("+d.value+") "),f+="0x"+a.util.bytesToHex(d.value);else if(d.type===e.Type.UTF8)try{f+=a.util.decodeUtf8(d.value)}catch(v){if("URI malformed"!==v.message)throw v;f+="0x"+a.util.bytesToHex(d.value)+" (malformed UTF8)"}else d.type===e.Type.PRINTABLESTRING||d.type===e.Type.IA5String?f+=d.value:x.test(d.value)?f+="0x"+a.util.bytesToHex(d.value):f+=0===d.value.length?"[null]":d.value}return f}},8549:re=>{var ce={};re.exports=ce;var O={};ce.encode=function(e,i,C){if("string"!=typeof i)throw new TypeError('"alphabet" must be a string.');if(void 0!==C&&"number"!=typeof C)throw new TypeError('"maxline" must be a number.');var m="";if(e instanceof Uint8Array){var x=0,d=i.length,l=i.charAt(0),r=[0];for(x=0;x<e.length;++x){for(var f=0,I=e[x];f<r.length;++f)r[f]=(I+=r[f]<<8)%d,I=I/d|0;for(;I>0;)r.push(I%d),I=I/d|0}for(x=0;0===e[x]&&x<e.length-1;++x)m+=l;for(x=r.length-1;x>=0;--x)m+=i[r[x]]}else m=function a(e,i){var C=0,m=i.length,x=i.charAt(0),d=[0];for(C=0;C<e.length();++C){for(var l=0,r=e.at(C);l<d.length;++l)d[l]=(r+=d[l]<<8)%m,r=r/m|0;for(;r>0;)d.push(r%m),r=r/m|0}var f="";for(C=0;0===e.at(C)&&C<e.length()-1;++C)f+=x;for(C=d.length-1;C>=0;--C)f+=i[d[C]];return f}(e,i);if(C){var U=new RegExp(".{1,"+C+"}","g");m=m.match(U).join("\r\n")}return m},ce.decode=function(e,i){if("string"!=typeof e)throw new TypeError('"input" must be a string.');if("string"!=typeof i)throw new TypeError('"alphabet" must be a string.');var C=O[i];if(!C){C=O[i]=[];for(var m=0;m<i.length;++m)C[i.charCodeAt(m)]=m}e=e.replace(/\s/g,"");var x=i.length,d=i.charAt(0),l=[0];for(m=0;m<e.length;m++){var r=C[e.charCodeAt(m)];if(void 0===r)return;for(var f=0,I=r;f<l.length;++f)l[f]=255&(I+=l[f]*x),I>>=8;for(;I>0;)l.push(255&I),I>>=8}for(var U=0;e[U]===d&&U<e.length-1;++U)l.push(0);return typeof Buffer<"u"?Buffer.from(l.reverse()):new Uint8Array(l.reverse())}},81635:(re,ce,O)=>{var a=O(9185);O(96615),re.exports=a.cipher=a.cipher||{},a.cipher.algorithms=a.cipher.algorithms||{},a.cipher.createCipher=function(i,C){var m=i;if("string"==typeof m&&(m=a.cipher.getAlgorithm(m))&&(m=m()),!m)throw new Error("Unsupported algorithm: "+i);return new a.cipher.BlockCipher({algorithm:m,key:C,decrypt:!1})},a.cipher.createDecipher=function(i,C){var m=i;if("string"==typeof m&&(m=a.cipher.getAlgorithm(m))&&(m=m()),!m)throw new Error("Unsupported algorithm: "+i);return new a.cipher.BlockCipher({algorithm:m,key:C,decrypt:!0})},a.cipher.registerAlgorithm=function(i,C){i=i.toUpperCase(),a.cipher.algorithms[i]=C},a.cipher.getAlgorithm=function(i){return(i=i.toUpperCase())in a.cipher.algorithms?a.cipher.algorithms[i]:null};var e=a.cipher.BlockCipher=function(i){this.algorithm=i.algorithm,this.mode=this.algorithm.mode,this.blockSize=this.mode.blockSize,this._finish=!1,this._input=null,this.output=null,this._op=i.decrypt?this.mode.decrypt:this.mode.encrypt,this._decrypt=i.decrypt,this.algorithm.initialize(i)};e.prototype.start=function(i){i=i||{};var C={};for(var m in i)C[m]=i[m];C.decrypt=this._decrypt,this._finish=!1,this._input=a.util.createBuffer(),this.output=i.output||a.util.createBuffer(),this.mode.start(C)},e.prototype.update=function(i){for(i&&this._input.putBuffer(i);!this._op.call(this.mode,this._input,this.output,this._finish)&&!this._finish;);this._input.compact()},e.prototype.finish=function(i){i&&("ECB"===this.mode.name||"CBC"===this.mode.name)&&(this.mode.pad=function(m){return i(this.blockSize,m,!1)},this.mode.unpad=function(m){return i(this.blockSize,m,!0)});var C={};return C.decrypt=this._decrypt,C.overflow=this._input.length()%this.blockSize,!(!this._decrypt&&this.mode.pad&&!this.mode.pad(this._input,C)||(this._finish=!0,this.update(),this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,C))||this.mode.afterFinish&&!this.mode.afterFinish(this.output,C))}},19464:(re,ce,O)=>{var a=O(9185);O(96615),a.cipher=a.cipher||{};var e=re.exports=a.cipher.modes=a.cipher.modes||{};function i(x,d){if("string"==typeof x&&(x=a.util.createBuffer(x)),a.util.isArray(x)&&x.length>4){var l=x;x=a.util.createBuffer();for(var r=0;r<l.length;++r)x.putByte(l[r])}if(x.length()<d)throw new Error("Invalid IV length;
1 got "+x.length()+" bytes and expected "+d+" bytes.");if(!a.util.isArray(x)){var f=[],I=d/4;for(r=0;r<I;++r)f.push(x.getInt32());x=f}return x}function C(x){x[x.length-1]=x[x.length-1]+1&4294967295}function m(x){return[x/4294967296|0,4294967295&x]}e.ecb=function(x){x=x||{},this.name="ECB",this.cipher=x.cipher,this.blockSize=x.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)},e.ecb.prototype.start=function(x){},e.ecb.prototype.encrypt=function(x,d,l){if(x.length()<this.blockSize&&!(l&&x.length()>0))return!0;for(var r=0;r<this._ints;++r)this._inBlock[r]=x.getInt32();for(this.cipher.encrypt(this._inBlock,this._outBlock),r=0;r<this._ints;++r)d.putInt32(this._outBlock[r])},e.ecb.prototype.decrypt=function(x,d,l){if(x.length()<this.blockSize&&!(l&&x.length()>0))return!0;for(var r=0;r<this._ints;++r)this._inBlock[r]=x.getInt32();for(this.cipher.decrypt(this._inBlock,this._outBlock),r=0;r<this._ints;++r)d.putInt32(this._outBlock[r])},e.ecb.prototype.pad=function(x,d){var l=x.length()===this.blockSize?this.blockSize:this.blockSize-x.length();return x.fillWithByte(l,l),!0},e.ecb.prototype.unpad=function(x,d){if(d.overflow>0)return!1;var l=x.length(),r=x.at(l-1);return!(r>this.blockSize<<2||(x.truncate(r),0))},e.cbc=function(x){x=x||{},this.name="CBC",this.cipher=x.cipher,this.blockSize=x.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)},e.cbc.prototype.start=function(x){if(null===x.iv){if(!this._prev)throw new Error("Invalid IV parameter.");this._iv=this._prev.slice(0)}else{if(!("iv"in x))throw new Error("Invalid IV parameter.");this._iv=i(x.iv,this.blockSize),this._prev=this._iv.slice(0)}},e.cbc.prototype.encrypt=function(x,d,l){if(x.length()<this.blockSize&&!(l&&x.length()>0))return!0;for(var r=0;r<this._ints;++r)this._inBlock[r]=this._prev[r]^x.getInt32();for(this.cipher.encrypt(this._inBlock,this._outBlock),r=0;r<this._ints;++r)d.putInt32(this._outBlock[r]);this._prev=this._outBlock},e.cbc.prototype.decrypt=function(x,d,l){if(x.length()<this.blockSize&&!(l&&x.length()>0))return!0;for(var r=0;r<this._ints;++r)this._inBlock[r]=x.getInt32();for(this.cipher.decrypt(this._inBlock,this._outBlock),r=0;r<this._ints;++r)d.putInt32(this._prev[r]^this._outBlock[r]);this._prev=this._inBlock.slice(0)},e.cbc.prototype.pad=function(x,d){var l=x.length()===this.blockSize?this.blockSize:this.blockSize-x.length();return x.fillWithByte(l,l),!0},e.cbc.prototype.unpad=function(x,d){if(d.overflow>0)return!1;var l=x.length(),r=x.at(l-1);return!(r>this.blockSize<<2||(x.truncate(r),0))},e.cfb=function(x){x=x||{},this.name="CFB",this.cipher=x.cipher,this.blockSize=x.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialBlock=new Array(this._ints),this._partialOutput=a.util.createBuffer(),this._partialBytes=0},e.cfb.prototype.start=function(x){if(!("iv"in x))throw new Error("Invalid IV parameter.");this._iv=i(x.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0},e.cfb.prototype.encrypt=function(x,d,l){var r=x.length();if(0===r)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&r>=this.blockSize)for(var f=0;f<this._ints;++f)this._inBlock[f]=x.getInt32()^this._outBlock[f],d.putInt32(this._inBlock[f]);else{var I=(this.blockSize-r)%this.blockSize;for(I>0&&(I=this.blockSize-I),this._partialOutput.clear(),f=0;f<this._ints;++f)this._partialBlock[f]=x.getInt32()^this._outBlock[f],this._partialOutput.putInt32(this._partialBlock[f]);if(I>0)x.read-=this.blockSize;else for(f=0;f<this._ints;++f)this._inBlock[f]=this._partialBlock[f];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),I>0&&!l)return d.putBytes(this._partialOutput.getBytes(I-this._partialBytes)),this._partialBytes=I,!0;d.putBytes(this._partialOutput.getBytes(r-this._partialBytes)),this._partialBytes=0}},e.cfb.prototype.decrypt=function(x,d,l){var r=x.length();if(0===r)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&r>=this.blockSize)for(var f=0;f<this._ints;++f)this._inBlock[f]=x.getInt32(),d.putInt32(this._inBlock[f]^this._outBlock[f]);else{var I=(this.blockSize-r)%this.blockSize;for(I>0&&(I=this.blockSize-I),this._partialOutput.clear(),f=0;f<this._ints;++f)this._partialBlock[f]=x.getInt32(),this._partialOutput.putInt32(this._partialBlock[f]^this._outBlock[f]);if(I>0)x.read-=this.blockSize;else for(f=0;f<this._ints;++f)this._inBlock[f]=this._partialBlock[f];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),I>0&&!l)return d.putBytes(this._partialOutput.getBytes(I-this._partialBytes)),this._partialBytes=I,!0;d.putBytes(this._partialOutput.getBytes(r-this._partialBytes)),this._partialBytes=0}},e.ofb=function(x){x=x||{},this.name="OFB",this.cipher=x.cipher,this.blockSize=x.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=a.util.createBuffer(),this._partialBytes=0},e.ofb.prototype.start=function(x){if(!("iv"in x))throw new Error("Invalid IV parameter.");this._iv=i(x.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0},e.ofb.prototype.encrypt=function(x,d,l){var r=x.length();if(0===x.length())return!0;
vendor: 13,066 bytes, line 1
1if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&r>=this.blockSize)for(var f=0;f<this._ints;++f)d.putInt32(x.getInt32()^this._outBlock[f]),this._inBlock[f]=this._outBlock[f];else{var I=(this.blockSize-r)%this.blockSize;for(I>0&&(I=this.blockSize-I),this._partialOutput.clear(),f=0;f<this._ints;++f)this._partialOutput.putInt32(x.getInt32()^this._outBlock[f]);if(I>0)x.read-=this.blockSize;else for(f=0;f<this._ints;++f)this._inBlock[f]=this._outBlock[f];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),I>0&&!l)return d.putBytes(this._partialOutput.getBytes(I-this._partialBytes)),this._partialBytes=I,!0;d.putBytes(this._partialOutput.getBytes(r-this._partialBytes)),this._partialBytes=0}},e.ofb.prototype.decrypt=e.ofb.prototype.encrypt,e.ctr=function(x){x=x||{},this.name="CTR",this.cipher=x.cipher,this.blockSize=x.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=a.util.createBuffer(),this._partialBytes=0},e.ctr.prototype.start=function(x){if(!("iv"in x))throw new Error("Invalid IV parameter.");this._iv=i(x.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0},e.ctr.prototype.encrypt=function(x,d,l){var r=x.length();if(0===r)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&r>=this.blockSize)for(var f=0;f<this._ints;++f)d.putInt32(x.getInt32()^this._outBlock[f]);else{var I=(this.blockSize-r)%this.blockSize;for(I>0&&(I=this.blockSize-I),this._partialOutput.clear(),f=0;f<this._ints;++f)this._partialOutput.putInt32(x.getInt32()^this._outBlock[f]);if(I>0&&(x.read-=this.blockSize),this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),I>0&&!l)return d.putBytes(this._partialOutput.getBytes(I-this._partialBytes)),this._partialBytes=I,!0;d.putBytes(this._partialOutput.getBytes(r-this._partialBytes)),this._partialBytes=0}C(this._inBlock)},e.ctr.prototype.decrypt=e.ctr.prototype.encrypt,e.gcm=function(x){x=x||{},this.name="GCM",this.cipher=x.cipher,this.blockSize=x.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints),this._partialOutput=a.util.createBuffer(),this._partialBytes=0,this._R=3774873600},e.gcm.prototype.start=function(x){if(!("iv"in x))throw new Error("Invalid IV parameter.");var l,d=a.util.createBuffer(x.iv);if(this._cipherLength=0,l="additionalData"in x?a.util.createBuffer(x.additionalData):a.util.createBuffer(),this._tagLength="tagLength"in x?x.tagLength:128,this._tag=null,x.decrypt&&(this._tag=a.util.createBuffer(x.tag).getBytes(),this._tag.length!==this._tagLength/8))throw new Error("Authentication tag does not match tag length.");this._hashBlock=new Array(this._ints),this.tag=null,this._hashSubkey=new Array(this._ints),this.cipher.encrypt([0,0,0,0],this._hashSubkey),this.componentBits=4,this._m=this.generateHashTable(this._hashSubkey,this.componentBits);var r=d.length();if(12===r)this._j0=[d.getInt32(),d.getInt32(),d.getInt32(),1];else{for(this._j0=[0,0,0,0];d.length()>0;)this._j0=this.ghash(this._hashSubkey,this._j0,[d.getInt32(),d.getInt32(),d.getInt32(),d.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(m(8*r)))}this._inBlock=this._j0.slice(0),C(this._inBlock),this._partialBytes=0,l=a.util.createBuffer(l),this._aDataLength=m(8*l.length());var f=l.length()%this.blockSize;for(f&&l.fillWithByte(0,this.blockSize-f),this._s=[0,0,0,0];l.length()>0;)this._s=this.ghash(this._hashSubkey,this._s,[l.getInt32(),l.getInt32(),l.getInt32(),l.getInt32()])},e.gcm.prototype.encrypt=function(x,d,l){var r=x.length();if(0===r)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&r>=this.blockSize){for(var f=0;f<this._ints;++f)d.putInt32(this._outBlock[f]^=x.getInt32());this._cipherLength+=this.blockSize}else{var I=(this.blockSize-r)%this.blockSize;for(I>0&&(I=this.blockSize-I),this._partialOutput.clear(),f=0;f<this._ints;++f)this._partialOutput.putInt32(x.getInt32()^this._outBlock[f]);if(I<=0||l){if(l){var U=r%this.blockSize;this._cipherLength+=U,this._partialOutput.truncate(this.blockSize-U)}else this._cipherLength+=this.blockSize;for(f=0;f<this._ints;++f)this._outBlock[f]=this._partialOutput.getInt32();this._partialOutput.read-=this.blockSize}if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),I>0&&!l)return x.read-=this.blockSize,d.putBytes(this._partialOutput.getBytes(I-this._partialBytes)),this._partialBytes=I,!0;d.putBytes(this._partialOutput.getBytes(r-this._partialBytes)),this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock),C(this._inBlock)},e.gcm.prototype.decrypt=function(x,d,l){var r=x.length();if(r<this.blockSize&&!(l&&r>0))return!0;this.cipher.encrypt(this._inBlock,this._outBlock),C(this._inBlock),this._hashBlock[0]=x.getInt32(),this._hashBlock[1]=x.getInt32(),this._hashBlock[2]=x.getInt32(),this._hashBlock[3]=x.getInt32(),this._s=this.ghash(this._hashSubkey,this._s,this._hashBlock);for(var f=0;f<this._ints;++f)d.putInt32(this._outBlock[f]^this._hashBlock[f]);this._cipherLength+=r<this.blockSize?r%this.blockSize:this.blockSize},e.gcm.prototype.afterFinish=function(x,d){var l=!0;d.decrypt&&d.overflow&&x.truncate(this.blockSize-d.overflow),this.tag=a.util.createBuffer();var r=this._aDataLength.concat(m(8*this._cipherLength));this._s=this.ghash(this._hashSubkey,this._s,r);var f=[];this.cipher.encrypt(this._j0,f);for(var I=0;I<this._ints;++I)this.tag.putInt32(this._s[I]^f[I]);return this.tag.truncate(this.tag.length()%(this._tagLength/8)),d.decrypt&&this.tag.bytes()!==this._tag&&(l=!1),l},e.gcm.prototype.multiply=function(x,d){for(var l=[0,0,0,0],r=d.slice(0),f=0;f<128;++f)x[f/32|0]&1<<31-f%32&&(l[0]^=r[0],l[1]^=r[1],l[2]^=r[2],l[3]^=r[3]),this.pow(r,r);return l},e.gcm.prototype.pow=function(x,d){for(var l=1&x[3],r=3;r>0;--r)d[r]=x[r]>>>1|(1&x[r-1])<<31;d[0]=x[0]>>>1,l&&(d[0]^=this._R)},e.gcm.prototype.tableMultiply=function(x){for(var d=[0,0,0,0],l=0;l<32;++l){var I=this._m[l][x[l/8|0]>>>4*(7-l%8)&15];d[0]^=I[0],d[1]^=I[1],d[2]^=I[2],d[3]^=I[3]}return d},e.gcm.prototype.ghash=function(x,d,l){return d[0]^=l[0],d[1]^=l[1],d[2]^=l[2],d[3]^=l[3],this.tableMultiply(d)},e.gcm.prototype.generateHashTable=function(x,d){for(var l=8/d,r=4*l,f=16*l,I=new Array(f),U=0;U<f;++U){var E=[0,0,0,0];E[U/r|0]=1<<d-1<<(r-1-U%r)*d,I[U]=this.generateSubHashTable(this.multiply(E,x),d)}return I},e.gcm.prototype.generateSubHashTable=function(x,d){var l=1<<d,r=l>>>1,f=new Array(l);f[r]=x.slice(0);for(var I=r>>>1;I>0;)this.pow(f[2*I],f[I]=[]),I>>=1;for(I=2;I<r;){for(var U=1;U<I;++U){var E=f[I],g=f[U];f[I+U]=[E[0]^g[0],E[1]^g[1],E[2]^g[2],E[3]^g[3]]}I*=2}for(f[0]=[0,0,0,0],I=r+1;I<l;++I){var T=f[I^r];f[I]=[x[0]^T[0],x[1]^T[1],x[2]^T[2],x[3]^T[3]]}return f}},39857:(re,ce,O)=>{var a=O(9185);function e(g,T){a.cipher.registerAlgorithm(g,function(){return new a.des.Algorithm(g,T)})}O(81635),O(19464),O(96615),re.exports=a.des=a.des||{},a.des.startEncrypting=function(g,T,h,v){var n=E({key:g,output:h,decrypt:!1,mode:v||(null===T?"ECB":"CBC")});return n.start(T),n},a.des.createEncryptionCipher=function(g,T){return E({key:g,output:null,decrypt:!1,mode:T})},a.des.startDecrypting=function(g,T,h,v){var n=E({key:g,output:h,decrypt:!0,mode:v||(null===T?"ECB":"CBC")});return n.start(T),n},a.des.createDecryptionCipher=function(g,T){return E({key:g,output:null,decrypt:!0,mode:T})},a.des.Algorithm=function(g,T){var h=this;h.name=g,h.mode=new T({blockSize:8,cipher:{encrypt:function(v,n){return U(h._keys,v,n,!1)},decrypt:function(v,n){return U(h._keys,v,n,!0)}}}),h._init=!1},a.des.Algorithm.prototype.initialize=function(g){if(!this._init){var T=a.util.createBuffer(g.key);if(0===this.name.indexOf("3DES")&&24!==T.length())throw new Error("Invalid Triple-DES key size: "+8*T.length());this._keys=function I(g){for(var G,T=[0,4,536870912,536870916,65536,65540,536936448,536936452,512,516,536871424,536871428,66048,66052,536936960,536936964],h=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],v=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],n=[0,2097152,134217728,136314880,8192,2105344,134225920,136323072,131072,2228224,134348800,136445952,139264,2236416,134356992,136454144],u=[0,262144,16,262160,0,262144,16,262160,4096,266240,4112,266256,4096,266240,4112,266256],p=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],A=[0,268435456,524288,268959744,2,268435458,524290,268959746,0,268435456,524288,268959744,2,268435458,524290,268959746],R=[0,65536,2048,67584,536870912,536936448,536872960,536938496,131072,196608,133120,198656,537001984,537067520,537004032,537069568],k=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],c=[0,268435456,8,268435464,0,268435456,8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],y=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],N=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],t=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],L=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],V=g.length()>8?3:1,D=[],M=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],_=0,X=0;X<V;X++){var W=g.getInt32(),j=g.getInt32();W^=(G=252645135&(W>>>4^j))<<4,W^=G=65535&((j^=G)>>>-16^W),W^=(G=858993459&(W>>>2^(j^=G<<-16)))<<2,W^=G=65535&((j^=G)>>>-16^W),W^=(G=1431655765&(W>>>1^(j^=G<<-16)))<<1,W^=G=16711935&((j^=G)>>>8^W),G=(W^=(G=1431655765&(W>>>1^(j^=G<<8)))<<1)<<8|(j^=G)>>>20&240,W=j<<24|j<<8&16711680|j>>>8&65280|j>>>24&240,j=G;for(var te=0;te<M.length;++te){M[te]?(W=W<<2|W>>>26,j=j<<2|j>>>26):(W=W<<1|W>>>27,j=j<<1|j>>>27);var fe=T[(W&=-15)>>>28]|h[W>>>24&15]|v[W>>>20&15]|n[W>>>16&15]|u[W>>>12&15]|p[W>>>8&15]|A[W>>>4&15],he=R[(j&=-15)>>>28]|k[j>>>24&15]|c[j>>>20&15]|y[j>>>16&15]|N[j>>>12&15]|t[j>>>8&15]|L[j>>>4&15];D[_++]=fe^(G=65535&(he>>>16^fe)),D[_++]=he^G<<16}}return D}(T),this._init=!0}},e("DES-ECB",a.cipher.modes.ecb),e("DES-CBC",a.cipher.modes.cbc),e("DES-CFB",a.cipher.modes.cfb),e("DES-OFB",a.cipher.modes.ofb),e("DES-CTR",a.cipher.modes.ctr),e("3DES-ECB",a.cipher.modes.ecb),e("3DES-CBC",a.cipher.modes.cbc),e("3DES-CFB",a.cipher.modes.cfb),e("3DES-OFB",a.cipher.modes.ofb),e("3DES-CTR",a.cipher.modes.ctr);var i=[16843776,0,65536,16843780,16842756,66564,4,65536,1024,16843776,16843780,1024,16778244,16842756,16777216,4,1028,16778240,16778240,66560,66560,16842752,16842752,16778244,65540,16777220,16777220,65540,0,1028,66564,16777216,65536,16843780,4,16842752,16843776,16777216,16777216,1024,16842756,65536,66560,16777220,1024,4,16778244,66564,16843780,65540,16842752,16778244,16777220,1028,66564,16843776,1028,16778240,16778240,0,65540,66560,0,16842756],C=[-2146402272,-2147450880,32768,1081376,1048576,32,-2146435040,-2147450848,-2147483616,-2146402272,-2146402304,-2147483648,-2147450880,1048576,32,-2146435040,1081344,1048608,-2147450848,0,-2147483648,32768,1081376,-2146435072,1048608,-2147483616,0,1081344,32800,-2146402304,-2146435072,32800,0,1081376,-2146435040,1048576,-2147450848,-2146435072,-2146402304,32768,-2146435072,-2147450880,32,-2146402272,1081376,32,32768,-2147483648,32800,-2146402304,1048576,-2147483616,1048608,-2147450848,-2147483616,1048608,1081344,0,-2147450880,32800,-2147483648,-2146435040,-2146402272,1081344],m=[520,134349312,0,134348808,134218240,0,131592,134218240,131080,134217736,134217736,131072,134349320,131080,134348800,520,134217728,8,134349312,512,131584,134348800,134348808,131592,134218248,131584,131072,134218248,8,134349320,512,134217728,134349312,134217728,131080,520,131072,134349312,134218240,0,512,131080,134349320,134218240,134217736,512,0,134348808,134218248,131072,134217728,134349320,8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],x=[8396801,8321,8321,128,8396928,8388737,8388609,8193,0,8396800,8396800,8396929,129,0,8388736,8388609,1,8192,8388608,8396801,128,8388608,8193,8320,8388737,1,8320,8388736,8192,8396928,8396929,129,8388736,8388609,8396800,8396929,129,0,0,8396800,8320,8388736,8388737,1,8396801,8321,8321,128,8396929,129,1,8192,8388609,8193,8396928,8388737,8193,8320,8388608,8396801,128,8388608,8192,8396928],d=[256,34078976,34078720,1107296512,524288,256,1073741824,34078720,1074266368,524288,33554688,1074266368,1107296512,1107820544,524544,1073741824,33554432,1074266112,1074266112,0,1073742080,1107820800,1107820800,33554688,1107820544,1073742080,0,1107296256,34078976,33554432,1107296256,524544,524288,1107296512,256,33554432,1073741824,34078720,1107296512,1074266368,33554688,1073741824,1107820544,34078976,1074266368,256,33554432,1107820544,1107820800,524544,1107296256,1107820800,34078720,0,1074266112,1107296256,524544,33554688,1073742080,524288,0,1074266112,34078976,1073742080],l=[536870928,541065216,16384,541081616,54106
15216,16,541081616,4194304,536887296,4210704,4194304,536870928,4194320,536887296,536870912,16400,0,4194320,536887312,16384,4210688,536887312,16,541065232,541065232,0,4210704,541081600,16400,4210688,541081600,536870912,536887296,16,541065232,4210688,541081616,4194304,16400,536870928,4194304,536887296,536870912,16400,536870928,541081616,4210688,541065216,4210704,541081600,0,541065232,16,16384,541065216,4210704,16384,4194320,536887312,0,541081600,536870912,4194320,536887312],r=[2097152,69206018,67110914,0,2048,67110914,2099202,69208064,69208066,2097152,0,67108866,2,67108864,69206018,2050,67110912,2099202,2097154,67110912,67108866,69206016,69208064,2097154,69206016,2048,2050,69208066,2099200,2,67108864,2099200,67108864,2099200,2097152,67110914,67110914,69206018,69206018,2,2097154,67108864,67110912,2097152,69208064,2050,2099202,69208064,2050,67108866,69208066,69206016,2099200,0,2,69208066,0,2099202,69206016,2048,67108866,67110912,2048,2097154],f=[268439616,4096,262144,268701760,268435456,268439616,64,268435456,262208,268697600,268701760,266240,268701696,266304,4096,64,268697600,268435520,268439552,4160,266240,262208,268697664,268701696,4160,0,0,268697664,268435520,268439552,266304,262144,266304,262144,268701696,4096,64,268697664,4096,266304,268439552,64,268435520,268697600,268697664,268435456,262144,268439616,0,268701760,262208,268435520,268697600,268439552,268439616,0,268701760,266240,266240,4160,4160,262208,268435456,268701696];function U(g,T,h,v){var u,n=32===g.length?3:9;u=3===n?v?[30,-2,-2]:[0,32,2]:v?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var p,A=T[0],R=T[1];A^=(p=252645135&(A>>>4^R))<<4,A^=(p=65535&(A>>>16^(R^=p)))<<16,A^=p=858993459&((R^=p)>>>2^A),A^=p=16711935&((R^=p<<2)>>>8^A),A=(A^=(p=1431655765&(A>>>1^(R^=p<<8)))<<1)<<1|A>>>31,R=(R^=p)<<1|R>>>31;for(var k=0;k<n;k+=3){for(var c=u[k+1],y=u[k+2],N=u[k];N!=c;N+=y){var t=R^g[N],L=(R>>>4|R<<28)^g[N+1];p=A,A=R,R=p^(C[t>>>24&63]|x[t>>>16&63]|l[t>>>8&63]|f[63&t]|i[L>>>24&63]|m[L>>>16&63]|d[L>>>8&63]|r[63&L])}p=A,A=R,R=p}R=R>>>1|R<<31,R^=p=1431655765&((A=A>>>1|A<<31)>>>1^R),R^=(p=16711935&(R>>>8^(A^=p<<1)))<<8,R^=(p=858993459&(R>>>2^(A^=p)))<<2,R^=p=65535&((A^=p)>>>16^R),R^=p=252645135&((A^=p<<16)>>>4^R),h[0]=A^=p<<4,h[1]=R}function E(g){var v,h="DES-"+((g=g||{}).mode||"CBC").toUpperCase(),n=(v=g.decrypt?a.cipher.createDecipher(h,g.key):a.cipher.createCipher(h,g.key)).start;return v.start=function(u,p){var A=null;p instanceof a.util.ByteBuffer&&(A=p,p={}),(p=p||{}).output=A,p.iv=u,n.call(v,p)},v}},57339:(re,ce,O)=>{var a=O(9185);O(2059),O(58045),O(78325),O(96615);var e=O(78593),i=e.publicKeyValidator,C=e.privateKeyValidator;if(typeof m>"u")var m=a.jsbn.BigInteger;var x=a.util.ByteBuffer,d=typeof Buffer>"u"?Uint8Array:Buffer;a.pki=a.pki||{},re.exports=a.pki.ed25519=a.ed25519=a.ed25519||{};var l=a.ed25519;function r(z){var Q=z.message;if(Q instanceof Uint8Array||Q instanceof d)return Q;var o=z.encoding;if(void 0===Q){if(!z.md)throw new TypeError('"options.message" or "options.md" not specified.');Q=z.md.digest().getBytes(),o="binary"}if("string"==typeof Q&&!o)throw new TypeError('"options.encoding" must be "binary" or "utf8".');if("string"==typeof Q){if(typeof Buffer<"u")return Buffer.from(Q,o);Q=new x(Q,o)}else if(!(Q instanceof x))throw new TypeError('"options.message" must be a node.js Buffer, a Uint8Array, a forge ByteBuffer, or a string with "options.encoding" specifying its encoding.');for(var s=new d(Q.length()),S=0;S<s.length;++S)s[S]=Q.at(S);return s}l.constants={},l.constants.PUBLIC_KEY_BYTE_LENGTH=32,l.constants.PRIVATE_KEY_BYTE_LENGTH=64,l.constants.SEED_BYTE_LENGTH=32,l.constants.SIGN_BYTE_LENGTH=64,l.constants.HASH_BYTE_LENGTH=64,l.generateKeyPair=function(z){var Q=(z=z||{}).seed;if(void 0===Q)Q=a.random.getBytesSync(l.constants.SEED_BYTE_LENGTH);else if("string"==typeof Q){if(Q.length!==l.constants.SEED_BYTE_LENGTH)throw new TypeError('"seed" must be '+l.constants.SEED_BYTE_LENGTH+" bytes in length.")}else if(!(Q instanceof Uint8Array))throw new TypeError('"seed" must be a node.js Buffer, Uint8Array, or a binary string.');Q=r({message:Q,encoding:"binary"});for(var o=new d(l.constants.PUBLIC_KEY_BYTE_LENGTH),s=new d(l.constants.PRIVATE_KEY_BYTE_LENGTH),S=0;S<32;++S)s[S]=Q[S];return function u(z,Q){var s,o=[J(),J(),J(),J()],S=n(Q,32);for(S[0]&=248,S[31]&=127,S[31]|=64,j(o,S),N(z,o),s=0;s<32;++s)Q[s+32]=z[s]}(o,s),{publicKey:o,privateKey:s}},l.privateKeyFromAsn1=function(z){var Q={},o=[];if(!a.asn1.validate(z,C,Q,o)){var S=new Error("Invalid Key.");throw S.errors=o,S}var P=a.asn1.derToOid(Q.privateKeyOid),K=a.oids.EdDSA25519;if(P!==K)throw new Error('Invalid OID "'+P+'"; OID must be "'+K+'".');return{privateKeyBytes:r({message:a.asn1.fromDer(Q.privateKey).value,encoding:"binary"})}},l.publicKeyFromAsn1=function(z){var Q={},o=[];if(!a.asn1.validate(z,i,Q,o)){var S=new Error("Invalid Key.");throw S.errors=o,S}var P=a.asn1.derToOid(Q.publicKeyOid),K=a.oids.EdDSA25519;if(P!==K)throw new Error('Invalid OID "'+P+'"; OID must be "'+K+'".');var Y=Q.ed25519PublicKey;if(Y.length!==l.constants.PUBLIC_KEY_BYTE_LENGTH)throw new Error("Ke
1y length is invalid.");return r({message:Y,encoding:"binary"})},l.publicKeyFromPrivateKey=function(z){var Q=r({message:(z=z||{}).privateKey,encoding:"binary"});if(Q.length!==l.constants.PRIVATE_KEY_BYTE_LENGTH)throw new TypeError('"options.privateKey" must have a byte length of '+l.constants.PRIVATE_KEY_BYTE_LENGTH);for(var o=new d(l.constants.PUBLIC_KEY_BYTE_LENGTH),s=0;s<o.length;++s)o[s]=Q[32+s];return o},l.sign=function(z){var Q=r(z=z||{}),o=r({message:z.privateKey,encoding:"binary"});if(o.length===l.constants.SEED_BYTE_LENGTH)o=l.generateKeyPair({seed:o}).privateKey;else if(o.length!==l.constants.PRIVATE_KEY_BYTE_LENGTH)throw new TypeError('"options.privateKey" must have a byte length of '+l.constants.SEED_BYTE_LENGTH+" or "+l.constants.PRIVATE_KEY_BYTE_LENGTH);var S=new d(l.constants.SIGN_BYTE_LENGTH+Q.length);!function p(z,Q,o,s){var S,P,K=new Float64Array(64),Y=[J(),J(),J(),J()],F=n(s,32);F[0]&=248,F[31]&=127,F[31]|=64;var ee=o+64;for(S=0;S<o;++S)z[64+S]=Q[S];for(S=0;S<32;++S)z[32+S]=F[32+S];var oe=n(z.subarray(32),o+32);for(k(oe),j(Y,oe),N(z,Y),S=32;S<64;++S)z[S]=s[S];var ue=n(z,o+64);for(k(ue),S=32;S<64;++S)K[S]=0;for(S=0;S<32;++S)K[S]=oe[S];for(S=0;S<32;++S)for(P=0;P<32;P++)K[S+P]+=ue[S]*F[P];R(z.subarray(32),K)}(S,Q,Q.length,o);for(var P=new d(l.constants.SIGN_BYTE_LENGTH),K=0;K<P.length;++K)P[K]=S[K];return P},l.verify=function(z){var Q=r(z=z||{});if(void 0===z.signature)throw new TypeError('"options.signature" must be a node.js Buffer, a Uint8Array, a forge ByteBuffer, or a binary string.');var o=r({message:z.signature,encoding:"binary"});if(o.length!==l.constants.SIGN_BYTE_LENGTH)throw new TypeError('"options.signature" must have a byte length of '+l.constants.SIGN_BYTE_LENGTH);var s=r({message:z.publicKey,encoding:"binary"});if(s.length!==l.constants.PUBLIC_KEY_BYTE_LENGTH)throw new TypeError('"options.publicKey" must have a byte length of '+l.constants.PUBLIC_KEY_BYTE_LENGTH);var K,S=new d(l.constants.SIGN_BYTE_LENGTH+Q.length),P=new d(l.constants.SIGN_BYTE_LENGTH+Q.length);for(K=0;K<l.constants.SIGN_BYTE_LENGTH;++K)S[K]=o[K];for(K=0;K<Q.length;++K)S[K+l.constants.SIGN_BYTE_LENGTH]=Q[K];return function A(z,Q,o,s){var S,K=new d(32),Y=[J(),J(),J(),J()],F=[J(),J(),J(),J()];if(-1,o<64||function L(z,Q){var o=J(),s=J(),S=J(),P=J(),K=J(),Y=J(),F=J();return te(z[2],I),function V(z,Q){var o;for(o=0;o<16;++o)z[o]=Q[2*o]+(Q[2*o+1]<<8);z[15]&=32767}(z[1],Q),ge(S,z[1]),ve(P,S,U),ie(S,S,z[2]),Ce(P,z[2],P),ge(K,P),ge(Y,K),ve(F,Y,K),ve(o,F,S),ve(o,o,P),function D(z,Q){var s,o=J();for(s=0;s<16;++s)o[s]=Q[s];for(s=250;s>=0;--s)ge(o,o),1!==s&&ve(o,o,Q);for(s=0;s<16;++s)z[s]=o[s]}(o,o),ve(o,o,S),ve(o,o,P),ve(o,o,P),ve(z[0],o,P),ge(s,z[0]),ve(s,s,P),M(s,S)&&ve(z[0],z[0],v),ge(s,z[0]),ve(s,s,P),M(s,S)?-1:(X(z[0])===Q[31]>>7&&ie(z[0],f,z[0]),ve(z[3],z[0],z[1]),0)}(F,s))return-1;for(S=0;S<o;++S)z[S]=Q[S];for(S=0;S<32;++S)z[S+32]=s[S];var ee=n(z,o);if(k(ee),W(Y,F,ee),j(F,Q.subarray(32)),c(Y,F),N(K,Y),o-=64,_(Q,0,K,0)){for(S=0;S<o;++S)z[S]=0;return-1}for(S=0;S<o;++S)z[S]=Q[S+64];return o}(P,S,S.length,s)>=0};var f=J(),I=J([1]),U=J([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),E=J([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),g=J([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),T=J([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),h=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]),v=J([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function n(z,Q){var o=a.md.sha512.create(),s=new x(z);o.update(s.getBytes(Q),"binary");var S=o.digest().getBytes();if(typeof Buffer<"u")return Buffer.from(S,"binary");for(var P=new d(l.constants.HASH_BYTE_LENGTH),K=0;K<64;++K)P[K]=S.charCodeAt(K);return P}function R(z,Q){var o,s,S,P;for(s=63;s>=32;--s){for(o=0,S=s-32,P=s-12;S<P;++S)Q[S]+=o-16*Q[s]*h[S-(s-32)],Q[S]-=256*(o=Q[S]+128>>8);Q[S]+=o,Q[s]=0}for(o=0,S=0;S<32;++S)Q[S]+=o-(Q[31]>>4)*h[S],o=Q[S]>>8,Q[S]&=255;for(S=0;S<32;++S)Q[S]-=o*h[S];for(s=0;s<32;++s)Q[s+1]+=Q[s]>>8,z[s]=255&Q[s]}function k(z){for(var Q=new Float64Array(64),o=0;o<64;++o)Q[o]=z[o],z[o]=0;R(z,Q)}function c(z,Q){var o=J(),s=J(),S=J(),P=J(),K=J(),Y=J(),F=J(),ee=J(),oe=J();
vendor: 7,868 bytes, line 1
1ie(o,z[1],z[0]),ie(oe,Q[1],Q[0]),ve(o,o,oe),Ce(s,z[0],z[1]),Ce(oe,Q[0],Q[1]),ve(s,s,oe),ve(S,z[3],Q[3]),ve(S,S,E),ve(P,z[2],Q[2]),Ce(P,P,P),ie(K,s,o),ie(Y,P,S),Ce(F,P,S),Ce(ee,s,o),ve(z[0],K,Y),ve(z[1],ee,F),ve(z[2],F,Y),ve(z[3],K,ee)}function y(z,Q,o){for(var s=0;s<4;++s)pe(z[s],Q[s],o)}function N(z,Q){var o=J(),s=J(),S=J();(function fe(z,Q){var s,o=J();for(s=0;s<16;++s)o[s]=Q[s];for(s=253;s>=0;--s)ge(o,o),2!==s&&4!==s&&ve(o,o,Q);for(s=0;s<16;++s)z[s]=o[s]})(S,Q[2]),ve(o,Q[0],S),ve(s,Q[1],S),t(z,s),z[31]^=X(o)<<7}function t(z,Q){var o,s,S,P=J(),K=J();for(o=0;o<16;++o)K[o]=Q[o];for(he(K),he(K),he(K),s=0;s<2;++s){for(P[0]=K[0]-65517,o=1;o<15;++o)P[o]=K[o]-65535-(P[o-1]>>16&1),P[o-1]&=65535;P[15]=K[15]-32767-(P[14]>>16&1),S=P[15]>>16&1,P[14]&=65535,pe(K,P,1-S)}for(o=0;o<16;o++)z[2*o]=255&K[o],z[2*o+1]=K[o]>>8}function M(z,Q){var o=new d(32),s=new d(32);return t(o,z),t(s,Q),_(o,0,s,0)}function _(z,Q,o,s){return function G(z,Q,o,s,S){var P,K=0;for(P=0;P<S;++P)K|=z[Q+P]^o[s+P];return(1&K-1>>>8)-1}(z,Q,o,s,32)}function X(z){var Q=new d(32);return t(Q,z),1&Q[0]}function W(z,Q,o){var s,S;for(te(z[0],f),te(z[1],I),te(z[2],I),te(z[3],f),S=255;S>=0;--S)y(z,Q,s=o[S/8|0]>>(7&S)&1),c(Q,z),c(z,z),y(z,Q,s)}function j(z,Q){var o=[J(),J(),J(),J()];te(o[0],g),te(o[1],T),te(o[2],I),ve(o[3],g,T),W(z,o,Q)}function te(z,Q){var o;for(o=0;o<16;o++)z[o]=0|Q[o]}function he(z){var Q,o,s=1;for(Q=0;Q<16;++Q)o=z[Q]+s+65535,s=Math.floor(o/65536),z[Q]=o-65536*s;z[0]+=s-1+37*(s-1)}function pe(z,Q,o){for(var s,S=~(o-1),P=0;P<16;++P)z[P]^=s=S&(z[P]^Q[P]),Q[P]^=s}function J(z){var Q,o=new Float64Array(16);if(z)for(Q=0;Q<z.length;++Q)o[Q]=z[Q];return o}function Ce(z,Q,o){for(var s=0;s<16;++s)z[s]=Q[s]+o[s]}function ie(z,Q,o){for(var s=0;s<16;++s)z[s]=Q[s]-o[s]}function ge(z,Q){ve(z,Q,Q)}function ve(z,Q,o){var s,S,P=0,K=0,Y=0,F=0,ee=0,oe=0,ue=0,q=0,se=0,le=0,ye=0,de=0,Ee=0,Te=0,xe=0,Se=0,Be=0,Ge=0,be=0,Qe=0,ze=0,Ye=0,Xe=0,je=0,et=0,tt=0,at=0,it=0,st=0,ut=0,ft=0,Ne=o[0],Re=o[1],Le=o[2],De=o[3],we=o[4],Ue=o[5],ke=o[6],Pe=o[7],Ve=o[8],Oe=o[9],Fe=o[10],Ke=o[11],_e=o[12],Me=o[13],Ie=o[14],Ae=o[15];P+=(s=Q[0])*Ne,K+=s*Re,Y+=s*Le,F+=s*De,ee+=s*we,oe+=s*Ue,ue+=s*ke,q+=s*Pe,se+=s*Ve,le+=s*Oe,ye+=s*Fe,de+=s*Ke,Ee+=s*_e,Te+=s*Me,xe+=s*Ie,Se+=s*Ae,K+=(s=Q[1])*Ne,Y+=s*Re,F+=s*Le,ee+=s*De,oe+=s*we,ue+=s*Ue,q+=s*ke,se+=s*Pe,le+=s*Ve,ye+=s*Oe,de+=s*Fe,Ee+=s*Ke,Te+=s*_e,xe+=s*Me,Se+=s*Ie,Be+=s*Ae,Y+=(s=Q[2])*Ne,F+=s*Re,ee+=s*Le,oe+=s*De,ue+=s*we,q+=s*Ue,se+=s*ke,le+=s*Pe,ye+=s*Ve,de+=s*Oe,Ee+=s*Fe,Te+=s*Ke,xe+=s*_e,Se+=s*Me,Be+=s*Ie,Ge+=s*Ae,F+=(s=Q[3])*Ne,ee+=s*Re,oe+=s*Le,ue+=s*De,q+=s*we,se+=s*Ue,le+=s*ke,ye+=s*Pe,de+=s*Ve,Ee+=s*Oe,Te+=s*Fe,xe+=s*Ke,Se+=s*_e,Be+=s*Me,Ge+=s*Ie,be+=s*Ae,ee+=(s=Q[4])*Ne,oe+=s*Re,ue+=s*Le,q+=s*De,se+=s*we,le+=s*Ue,ye+=s*ke,de+=s*Pe,Ee+=s*Ve,Te+=s*Oe,xe+=s*Fe,Se+=s*Ke,Be+=s*_e,Ge+=s*Me,be+=s*Ie,Qe+=s*Ae,oe+=(s=Q[5])*Ne,ue+=s*Re,q+=s*Le,se+=s*De,le+=s*we,ye+=s*Ue,de+=s*ke,Ee+=s*Pe,Te+=s*Ve,xe+=s*Oe,Se+=s*Fe,Be+=s*Ke,Ge+=s*_e,be+=s*Me,Qe+=s*Ie,ze+=s*Ae,ue+=(s=Q[6])*Ne,q+=s*Re,se+=s*Le,le+=s*De,ye+=s*we,de+=s*Ue,Ee+=s*ke,Te+=s*Pe,xe+=s*Ve,Se+=s*Oe,Be+=s*Fe,Ge+=s*Ke,be+=s*_e,Qe+=s*Me,ze+=s*Ie,Ye+=s*Ae,q+=(s=Q[7])*Ne,se+=s*Re,le+=s*Le,ye+=s*De,de+=s*we,Ee+=s*Ue,Te+=s*ke,xe+=s*Pe,Se+=s*Ve,Be+=s*Oe,Ge+=s*Fe,be+=s*Ke,Qe+=s*_e,ze+=s*Me,Ye+=s*Ie,Xe+=s*Ae,se+=(s=Q[8])*Ne,le+=s*Re,ye+=s*Le,de+=s*De,Ee+=s*we,Te+=s*Ue,xe+=s*ke,Se+=s*Pe,Be+=s*Ve,Ge+=s*Oe,be+=s*Fe,Qe+=s*Ke,ze+=s*_e,Ye+=s*Me,Xe+=s*Ie,je+=s*Ae,le+=(s=Q[9])*Ne,ye+=s*Re,de+=s*Le,Ee+=s*De,Te+=s*we,xe+=s*Ue,Se+=s*ke,Be+=s*Pe,Ge+=s*Ve,be+=s*Oe,Qe+=s*Fe,ze+=s*Ke,Ye+=s*_e,Xe+=s*Me,je+=s*Ie,et+=s*Ae,ye+=(s=Q[10])*Ne,de+=s*Re,Ee+=s*Le,Te+=s*De,xe+=s*we,Se+=s*Ue,Be+=s*ke,Ge+=s*Pe,be+=s*Ve,Qe+=s*Oe,ze+=s*Fe,Ye+=s*Ke,Xe+=s*_e,je+=s*Me,et+=s*Ie,tt+=s*Ae,de+=(s=Q[11])*Ne,Ee+=s*Re,Te+=s*Le,xe+=s*De,Se+=s*we,Be+=s*Ue,Ge+=s*ke,be+=s*Pe,Qe+=s*Ve,ze+=s*Oe,Ye+=s*Fe,Xe+=s*Ke,je+=s*_e,et+=s*Me,tt+=s*Ie,at+=s*Ae,Ee+=(s=Q[12])*Ne,Te+=s*Re,xe+=s*Le,Se+=s*De,Be+=s*we,Ge+=s*Ue,be+=s*ke,Qe+=s*Pe,ze+=s*Ve,Ye+=s*Oe,Xe+=s*Fe,je+=s*Ke,et+=s*_e,tt+=s*Me,at+=s*Ie,it+=s*Ae,Te+=(s=Q[13])*Ne,xe+=s*Re,Se+=s*Le,Be+=s*De,Ge+=s*we,be+=s*Ue,Qe+=s*ke,ze+=s*Pe,Ye+=s*Ve,Xe+=s*Oe,je+=s*Fe,et+=s*Ke,tt+=s*_e,at+=s*Me,it+=s*Ie,st+=s*Ae,xe+=(s=Q[14])*Ne,Se+=s*Re,Be+=s*Le,Ge+=s*De,be+=s*we,Qe+=s*Ue,ze+=s*ke,Ye+=s*Pe,Xe+=s*Ve,je+=s*Oe,et+=s*Fe,tt+=s*Ke,at+=s*_e,it+=s*Me,st+=s*Ie,ut+=s*Ae,Se+=(s=Q[15])*Ne,K+=38*(Ge+=s*Le),Y+=38*(be+=s*De),F+=38*(Qe+=s*we),ee+=38*(ze+=s*Ue),oe+=38*(Ye+=s*ke),ue+=38*(Xe+=s*Pe),q+=38*(je+=s*Ve),se+=38*(et+=s*Oe),le+=38*(tt+=s*Fe),ye+=38*(at+=s*Ke),de+=38*(it+=s*_e),Ee+=38*(st+=s*Me),Te+=38*(ut+=s*Ie),xe+=38*(ft+=s*Ae),P=(s=(P+=38*(Be+=s*Re))+(S=1)+65535)-65536*(S=Math.floor(s/65536)),K=(s=K+S+65535)-65536*(S=Math.floor(s/65536)),Y=(s=Y+S+65535)-65536*(S=Math.floor(s/65536)),F=(s=F+S+65535)-65536*(S=Math.floor(s/65536)),ee=(s=ee+S+65535)-65536*(S=Math.floor(s/65536)),oe=(s=oe+S+65535)-65536*(S=Math.floor(s/65536)),ue=(s=ue+S+65535)-65536*(S=Math.floor(s/65536)),q=(s=q+S+65535)-65536*(S=Math.floor(s/65536)),se=(s=se+S+65535)-65536*(S=Math.floor(s/65536)),le=(s=le+S+65535)-65536*(S=Math.floor(s/65536)),ye=(s=ye+S+65535)-65536*(S=Math.floor(s/65536)),de=(s=de+S+65535)-65536*(S=Math.floor(s/65536)),Ee=(s=Ee+S+65535)-65536*(S=Math.floor(s/65536)),Te=(s=Te+S+65535)-65536*(S=Math.floor(s/65536)),xe=(s=xe+S+65535)-65536*(S=Math.floor(s/65536)),Se=(s=Se+S+65535)-65536*(S=Math.floor(s/65536)),P=(s=(P+=S-1+37*(S-1))+(S=1)+65535)-65536*(S=Math.floor(s/65536)),K=(s=K+S+65535)-65536*(S=Math.floor(s/65536)),Y=(s=Y+S+65535)-65536*(S=Math.floor(s/65536)),F=(s=F+S+65535)-65536*(S=Math.floor(s/65536)),ee=(s=ee+S+65535)-65536*(S=Math.floor(s/65536)),oe=(s=oe+S+65535)-65536*(S=Math.floor(s/65536)),ue=(s=ue+S+65535)-65536*(S=Math.floor(s/65536)),q=(s=q+S+65535)-65536*(S=Math.floor(s/65536)),se=(s=se+S+65535)-65536*(S=Math.floor(s/65536)),le=(s=le+S+65535)-65536*(S=Math.floor(s/65536)),ye=(s=ye+S+65535)-65536*(S=Math.floor(s/65536)),de=(s=de+S+65535)-65536*(S=Math.floor(s/65536)),Ee=(s=Ee+S+65535)-65536*(S=Math.floor(s/65536)),Te=(s=Te+S+65535)-65536*(S=Math.floor(s/65536)),xe=(s=xe+S+65535)-65536*(S=Math.floor(s/65536)),Se=(s=Se+S+65535)-65536*(S=Math.floor(s/65536)),z[0]=P+=S-1+37*(S-1),z[1]=K,z[2]=Y,z[3]=F,z[4]=ee,z[5]=oe,z[6]=ue,z[7]=q,z[8]=se,z[9]=le,z[10]=ye,z[11]=de,z[12]=Ee,z[13]=Te,z[14]=xe,z[15]=Se}},9185:re=>{re.exports={options:{usePureJavaScript:!1}}},41583:(re,ce,O)=>{var a=O(9185);O(91501),O(96615),(re.exports=a.hmac=a.hmac||{}).create=function(){var i=null,C=null,m=null,x=null,d={start:function(l,r){if(null!==l)if("string"==typeof l){if(!((l=l.toLowerCase())in a.md.algorithms))throw new Error('Unknown hash algorithm "'+l+'"');C=a.md.algorithms[l].create()}else C=l;if(null===r)r=i;else{if("string"==typeof r)r=a.util.createBuffer(r);else if(a.util.isArray(r)){var f=r;r=a.util.createBuffer();for(var I=0;I<f.length;++I)r.putByte(f[I])}var U=r.length();for(U>C.blockLength&&(C.start(),C.update(r.bytes()),r=C.digest()),m=a.util.createBuffer(),x=a.util.createBuffer(),U=r.length(),I=0;I<U;++I)f=r.at(I),m.putByte(54^f),x.putByte(92^f);if(U<C.blockLength)for(f=C.blockLength-U,I=0;I<f;++I)m.putByte(54),x.putByte(92);i=r,m=m.bytes(),x=x.bytes()}C.start(),C.update(m)},update:function(l){C.update(l)},getMac:function(){var l=C.digest().bytes();return C.start(),C.update(x),C.update(l),C.digest()}};return d.digest=d.getMac,d}},72861:(re,ce,O)=>{re.exports=O(9185),O(28097),O(71122),O(6902),O(81635),O(39857),O(57339),O(41583),O(31616),O(44800),O(62056),O(93534),O(34495),O(10248),O(18270),O(24563),O(69521),O(18624),O(99447),O(41550),O(76892),O(58045),O(80282),O(61617),O(83704),O(96615)},2059:(re,ce,O)=>{var e,a=O(9185);function m(B,b,w){this.data=[],null!=B&&("number"==typeof B?this.fromNumber(B,b,w):this.fromString(B,null==b&&"string"!=typeof B?256:b))}function x(){return new m(null)}function r(B,b,w,H,Z,$){for(var ne=16383&b,ae=b>>14;--$>=0;
1){var me=16383&this.data[B],He=this.data[B++]>>14,qe=ae*me+He*ne;Z=((me=ne*me+((16383&qe)<<14)+w.data[H]+Z)>>28)+(qe>>14)+ae*He,w.data[H++]=268435455&me}return Z}re.exports=a.jsbn=a.jsbn||{},a.jsbn.BigInteger=m,typeof navigator>"u"?(m.prototype.am=r,e=28):"Microsoft Internet Explorer"==navigator.appName?(m.prototype.am=function l(B,b,w,H,Z,$){for(var ne=32767&b,ae=b>>15;--$>=0;){var me=32767&this.data[B],He=this.data[B++]>>15,qe=ae*me+He*ne;Z=((me=ne*me+((32767&qe)<<15)+w.data[H]+(1073741823&Z))>>>30)+(qe>>>15)+ae*He+(Z>>>30),w.data[H++]=1073741823&me}return Z},e=30):"Netscape"!=navigator.appName?(m.prototype.am=function d(B,b,w,H,Z,$){for(;--$>=0;){var ne=b*this.data[B++]+w.data[H]+Z;Z=Math.floor(ne/67108864),w.data[H++]=67108863&ne}return Z},e=26):(m.prototype.am=r,e=28),m.prototype.DB=e,m.prototype.DM=(1<<e)-1,m.prototype.DV=1<<e,m.prototype.FV=Math.pow(2,52),m.prototype.F1=52-e,m.prototype.F2=2*e-52;var E,g,U=new Array;for(E="0".charCodeAt(0),g=0;g<=9;++g)U[E++]=g;for(E="a".charCodeAt(0),g=10;g<36;++g)U[E++]=g;for(E="A".charCodeAt(0),g=10;g<36;++g)U[E++]=g;function T(B){return"0123456789abcdefghijklmnopqrstuvwxyz".charAt(B)}function h(B,b){return U[B.charCodeAt(b)]??-1}function u(B){var b=x();return b.fromInt(B),b}function N(B){var w,b=1;return 0!=(w=B>>>16)&&(B=w,b+=16),0!=(w=B>>8)&&(B=w,b+=8),0!=(w=B>>4)&&(B=w,b+=4),0!=(w=B>>2)&&(B=w,b+=2),0!=(w=B>>1)&&(B=w,b+=1),b}function te(B){this.m=B}function ge(B){this.m=B,this.mp=B.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<B.DB-15)-1,this.mt2=2*B.t}function Be(B,b){return B&b}function be(B,b){return B|b}function ze(B,b){return B^b}function Xe(B,b){return B&~b}function it(B){if(0==B)return-1;var b=0;return 65535&B||(B>>=16,b+=16),255&B||(B>>=8,b+=8),15&B||(B>>=4,b+=4),3&B||(B>>=2,b+=2),1&B||++b,b}function ut(B){for(var b=0;0!=B;)B&=B-1,++b;return b}function Ie(){}function Ae(B){return B}function ot(B){this.r2=x(),this.q3=x(),m.ONE.dlShiftTo(2*B.t,this.r2),this.mu=this.r2.divide(B),this.m=B}te.prototype.convert=function fe(B){return B.s<0||B.compareTo(this.m)>=0?B.mod(this.m):B},te.prototype.revert=function he(B){return B},te.prototype.reduce=function pe(B){B.divRemTo(this.m,null,B)},te.prototype.mulTo=function J(B,b,w){B.multiplyTo(b,w),this.reduce(w)},te.prototype.sqrTo=function Ce(B,b){B.squareTo(b),this.reduce(b)},ge.prototype.convert=function ve(B){var b=x();return B.abs().dlShiftTo(this.m.t,b),b.divRemTo(this.m,null,b),B.s<0&&b.compareTo(m.ZERO)>0&&this.m.subTo(b,b),b},ge.prototype.revert=function z(B){var b=x();return B.copyTo(b),this.reduce(b),b},ge.prototype.reduce=function Q(B){for(;B.t<=this.mt2;)B.data[B.t++]=0;for(var b=0;b<this.m.t;++b){var w=32767&B.data[b],H=w*this.mpl+((w*this.mph+(B.data[b]>>15)*this.mpl&this.um)<<15)&B.DM;for(B.data[w=b+this.m.t]+=this.m.am(0,H,B,b,0,this.m.t);B.data[w]>=B.DV;)B.data[w]-=B.DV,B.data[++w]++}B.clamp(),B.drShiftTo(this.m.t,B),B.compareTo(this.m)>=0&&B.subTo(this.m,B)},ge.prototype.mulTo=function s(B,b,w){B.multiplyTo(b,w),this.reduce(w)},ge.prototype.sqrTo=function o(B,b){B.squareTo(b),this.reduce(b)},m.prototype.copyTo=function v(B){for(var b=this.t-1;b>=0;--b)B.data[b]=this.data[b];B.t=this.t,B.s=this.s},m.prototype.fromInt=function n(B){this.t=1,this.s=B<0?-1:0,B>0?this.data[0]=B:B<-1?this.data[0]=B+this.DV:this.t=0},m.prototype.fromString=function p(B,b){var w;if(16==b)w=4;else if(8==b)w=3;else if(256==b)w=8;else if(2==b)w=1;else if(32==b)w=5;else{if(4!=b)return void this.fromRadix(B,b);w=2}this.t=0,this.s=0;for(var H=B.length,Z=!1,$=0;--H>=0;){var ne=8==w?255&B[H]:h(B,H);ne<0?"-"==B.charAt(H)&&(Z=!0):(Z=!1,0==$?this.data[this.t++]=ne:$+w>this.DB?(this.data[this.t-1]|=(ne&(1<<this.DB-$)-1)<<$,this.data[this.t++]=ne>>this.DB-$):this.data[this.t-1]|=ne<<$,($+=w)>=this.DB&&($-=this.DB))}8==w&&128&B[0]&&(this.s=-1,$>0&&(this.data[this.t-1]|=(1<<this.DB-$)-1<<$)),this.clamp(),Z&&m.ZERO.subTo(this,this)},m.prototype.clamp=function A(){for(var B=this.s&this.DM;this.t>0&&this.data[this.t-1]==B;)--this.t},m.prototype.dlShiftTo=function L(B,b){var w;for(w=this.t-1;w>=0;--w)b.data[w+B]=this.data[w];for(w=B-1;w>=0;--w)b.data[w]=0;
vendor: 4,559 bytes, line 1
1b.t=this.t+B,b.s=this.s},m.prototype.drShiftTo=function V(B,b){for(var w=B;w<this.t;++w)b.data[w-B]=this.data[w];b.t=Math.max(this.t-B,0),b.s=this.s},m.prototype.lShiftTo=function D(B,b){var ae,w=B%this.DB,H=this.DB-w,Z=(1<<H)-1,$=Math.floor(B/this.DB),ne=this.s<<w&this.DM;for(ae=this.t-1;ae>=0;--ae)b.data[ae+$+1]=this.data[ae]>>H|ne,ne=(this.data[ae]&Z)<<w;for(ae=$-1;ae>=0;--ae)b.data[ae]=0;b.data[$]=ne,b.t=this.t+$+1,b.s=this.s,b.clamp()},m.prototype.rShiftTo=function M(B,b){b.s=this.s;var w=Math.floor(B/this.DB);if(w>=this.t)b.t=0;else{var H=B%this.DB,Z=this.DB-H,$=(1<<H)-1;b.data[0]=this.data[w]>>H;for(var ne=w+1;ne<this.t;++ne)b.data[ne-w-1]|=(this.data[ne]&$)<<Z,b.data[ne-w]=this.data[ne]>>H;H>0&&(b.data[this.t-w-1]|=(this.s&$)<<Z),b.t=this.t-w,b.clamp()}},m.prototype.subTo=function _(B,b){for(var w=0,H=0,Z=Math.min(B.t,this.t);w<Z;)H+=this.data[w]-B.data[w],b.data[w++]=H&this.DM,H>>=this.DB;if(B.t<this.t){for(H-=B.s;w<this.t;)H+=this.data[w],b.data[w++]=H&this.DM,H>>=this.DB;H+=this.s}else{for(H+=this.s;w<B.t;)H-=B.data[w],b.data[w++]=H&this.DM,H>>=this.DB;H-=B.s}b.s=H<0?-1:0,H<-1?b.data[w++]=this.DV+H:H>0&&(b.data[w++]=H),b.t=w,b.clamp()},m.prototype.multiplyTo=function G(B,b){var w=this.abs(),H=B.abs(),Z=w.t;for(b.t=Z+H.t;--Z>=0;)b.data[Z]=0;for(Z=0;Z<H.t;++Z)b.data[Z+w.t]=w.am(0,H.data[Z],b,Z,0,w.t);b.s=0,b.clamp(),this.s!=B.s&&m.ZERO.subTo(b,b)},m.prototype.squareTo=function X(B){for(var b=this.abs(),w=B.t=2*b.t;--w>=0;)B.data[w]=0;for(w=0;w<b.t-1;++w){var H=b.am(w,b.data[w],B,2*w,0,1);(B.data[w+b.t]+=b.am(w+1,2*b.data[w],B,2*w+1,H,b.t-w-1))>=b.DV&&(B.data[w+b.t]-=b.DV,B.data[w+b.t+1]=1)}B.t>0&&(B.data[B.t-1]+=b.am(w,b.data[w],B,2*w,0,1)),B.s=0,B.clamp()},m.prototype.divRemTo=function W(B,b,w){var H=B.abs();if(!(H.t<=0)){var Z=this.abs();if(Z.t<H.t)return b?.fromInt(0),void(null!=w&&this.copyTo(w));null==w&&(w=x());var $=x(),ne=this.s,ae=B.s,me=this.DB-N(H.data[H.t-1]);me>0?(H.lShiftTo(me,$),Z.lShiftTo(me,w)):(H.copyTo($),Z.copyTo(w));var He=$.t,qe=$.data[He-1];if(0!=qe){var We=qe*(1<<this.F1)+(He>1?$.data[He-2]>>this.F2:0),rt=this.FV/We,lt=(1<<this.F1)/We,Je=1<<this.F2,$e=w.t,ct=$e-He,nt=b??x();for($.dlShiftTo(ct,nt),w.compareTo(nt)>=0&&(w.data[w.t++]=1,w.subTo(nt,w)),m.ONE.dlShiftTo(He,nt),nt.subTo($,$);$.t<He;)$.data[$.t++]=0;for(;--ct>=0;){var ht=w.data[--$e]==qe?this.DM:Math.floor(w.data[$e]*rt+(w.data[$e-1]+Je)*lt);if((w.data[$e]+=$.am(0,ht,w,ct,0,He))<ht)for($.dlShiftTo(ct,nt),w.subTo(nt,w);w.data[$e]<--ht;)w.subTo(nt,w)}null!=b&&(w.drShiftTo(He,b),ne!=ae&&m.ZERO.subTo(b,b)),w.t=He,w.clamp(),me>0&&w.rShiftTo(me,w),ne<0&&m.ZERO.subTo(w,w)}}},m.prototype.invDigit=function ie(){if(this.t<1)return 0;var B=this.data[0];if(!(1&B))return 0;var b=3&B;return(b=(b=(b=(b=b*(2-(15&B)*b)&15)*(2-(255&B)*b)&255)*(2-((65535&B)*b&65535))&65535)*(2-B*b%this.DV)%this.DV)>0?this.DV-b:-b},m.prototype.isEven=function S(){return 0==(this.t>0?1&this.data[0]:this.s)},m.prototype.exp=function P(B,b){if(B>4294967295||B<1)return m.ONE;var w=x(),H=x(),Z=b.convert(this),$=N(B)-1;for(Z.copyTo(w);--$>=0;)if(b.sqrTo(w,H),(B&1<<$)>0)b.mulTo(H,Z,w);else{var ne=w;w=H,H=ne}return b.revert(w)},m.prototype.toString=function R(B){if(this.s<0)return"-"+this.negate().toString(B);var b;if(16==B)b=4;else if(8==B)b=3;else if(2==B)b=1;else if(32==B)b=5;else{if(4!=B)return this.toRadix(B);b=2}var H,w=(1<<b)-1,Z=!1,$="",ne=this.t,ae=this.DB-ne*this.DB%b;if(ne-- >0)for(ae<this.DB&&(H=this.data[ne]>>ae)>0&&(Z=!0,$=T(H));ne>=0;)ae<b?(H=(this.data[ne]&(1<<ae)-1)<<b-ae,H|=this.data[--ne]>>(ae+=this.DB-b)):(H=this.data[ne]>>(ae-=b)&w,ae<=0&&(ae+=this.DB,--ne)),H>0&&(Z=!0),Z&&($+=T(H));return Z?$:"0"},m.prototype.negate=function k(){var B=x();return m.ZERO.subTo(this,B),B},m.prototype.abs=function c(){return this.s<0?this.negate():this},m.prototype.compareTo=function y(B){var b=this.s-B.s;if(0!=b)return b;var w=this.t;if(0!=(b=w-B.t))return this.s<0?-b:b;for(;--w>=0;)if(0!=(b=this.data[w]-B.data[w]))return b;return 0},m.prototype.bitLength=function t(){return this.t<=0?0:this.DB*(this.t-1)+N(this.data[this.t-1]^this.s&this.DM)},m.prototype.mod=function j(B){var b=x();return this.abs().divRemTo(B,null,b),this.s<0&&b.compareTo(m.ZERO)>0&&B.subTo(b,b),b},m.prototype.modPowInt=function K(B,b){var w;return w=B<256||b.isEven()?new te(b):new ge(b),this.exp(B,w)},m.ZERO=u(0),m.ONE=u(1),Ie.prototype.convert=Ae,Ie.prototype.revert=Ae,Ie.prototype.mulTo=function dt(B,b,w){B.multiplyTo(b,w)},Ie.prototype.sqrTo=function pt(B,b){B.squareTo(b)},ot.prototype.convert=function Ct(B){if(B.s<0||B.t>2*this.m.t)return B.mod(this.m);
vendor: 1,748 bytes, line 1
1if(B.compareTo(this.m)<0)return B;var b=x();return B.copyTo(b),this.reduce(b),b},ot.prototype.revert=function mt(B){return B},ot.prototype.reduce=function Et(B){for(B.drShiftTo(this.m.t-1,this.r2),B.t>this.m.t+1&&(B.t=this.m.t+1,B.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);B.compareTo(this.r2)<0;)B.dAddOffset(1,this.m.t+1);for(B.subTo(this.r2,B);B.compareTo(this.m)>=0;)B.subTo(this.m,B)},ot.prototype.mulTo=function St(B,b,w){B.multiplyTo(b,w),this.reduce(w)},ot.prototype.sqrTo=function xt(B,b){B.squareTo(b),this.reduce(b)};var Ze=[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],bt=(1<<26)/Ze[Ze.length-1];m.prototype.chunkSize=function ue(B){return Math.floor(Math.LN2*this.DB/Math.log(B))},m.prototype.toRadix=function se(B){if(null==B&&(B=10),0==this.signum()||B<2||B>36)return"0";var b=this.chunkSize(B),w=Math.pow(B,b),H=u(w),Z=x(),$=x(),ne="";for(this.divRemTo(H,Z,$);Z.signum()>0;)ne=(w+$.intValue()).toString(B).substr(1)+ne,Z.divRemTo(H,Z,$);return $.intValue().toString(B)+ne},m.prototype.fromRadix=function le(B,b){this.fromInt(0),null==b&&(b=10);for(var w=this.chunkSize(b),H=Math.pow(b,w),Z=!1,$=0,ne=0,ae=0;ae<B.length;++ae){var me=h(B,ae);me<0?"-"==B.charAt(ae)&&0==this.signum()&&(Z=!0):(ne=b*ne+me,++$>=w&&(this.dMultiply(H),this.dAddOffset(ne,0),$=0,ne=0))}$>0&&(this.dMultiply(Math.pow(b,$)),this.dAddOffset(ne,0)),Z&&m.ZERO.subTo(this,this)}
vendor: 14,548 bytes, line 1
1,m.prototype.fromNumber=function ye(B,b,w){if("number"==typeof b)if(B<2)this.fromInt(1);else for(this.fromNumber(B,w),this.testBit(B-1)||this.bitwiseTo(m.ONE.shiftLeft(B-1),be,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(b);)this.dAddOffset(2,0),this.bitLength()>B&&this.subTo(m.ONE.shiftLeft(B-1),this);else{var H=new Array,Z=7&B;H.length=1+(B>>3),b.nextBytes(H),Z>0?H[0]&=(1<<Z)-1:H[0]=0,this.fromString(H,256)}},m.prototype.bitwiseTo=function Se(B,b,w){var H,Z,$=Math.min(B.t,this.t);for(H=0;H<$;++H)w.data[H]=b(this.data[H],B.data[H]);if(B.t<this.t){for(Z=B.s&this.DM,H=$;H<this.t;++H)w.data[H]=b(this.data[H],Z);w.t=this.t}else{for(Z=this.s&this.DM,H=$;H<B.t;++H)w.data[H]=b(Z,B.data[H]);w.t=B.t}w.s=b(this.s,B.s),w.clamp()},m.prototype.changeBit=function Re(B,b){var w=m.ONE.shiftLeft(B);return this.bitwiseTo(w,b,w),w},m.prototype.addTo=function Ue(B,b){for(var w=0,H=0,Z=Math.min(B.t,this.t);w<Z;)H+=this.data[w]+B.data[w],b.data[w++]=H&this.DM,H>>=this.DB;if(B.t<this.t){for(H+=B.s;w<this.t;)H+=this.data[w],b.data[w++]=H&this.DM,H>>=this.DB;H+=this.s}else{for(H+=this.s;w<B.t;)H+=B.data[w],b.data[w++]=H&this.DM,H>>=this.DB;H+=B.s}b.s=H<0?-1:0,H>0?b.data[w++]=H:H<-1&&(b.data[w++]=this.DV+H),b.t=w,b.clamp()},m.prototype.dMultiply=function _e(B){this.data[this.t]=this.am(0,B-1,this,0,0,this.t),++this.t,this.clamp()},m.prototype.dAddOffset=function Me(B,b){if(0!=B){for(;this.t<=b;)this.data[this.t++]=0;for(this.data[b]+=B;this.data[b]>=this.DV;)this.data[b]-=this.DV,++b>=this.t&&(this.data[this.t++]=0),++this.data[b]}},m.prototype.multiplyLowerTo=function yt(B,b,w){var Z,H=Math.min(this.t+B.t,b);for(w.s=0,w.t=H;H>0;)w.data[--H]=0;for(Z=w.t-this.t;H<Z;++H)w.data[H+this.t]=this.am(0,B.data[H],w,H,0,this.t);for(Z=Math.min(B.t,b);H<Z;++H)this.am(0,B.data[H],w,H,0,b-H);w.clamp()},m.prototype.multiplyUpperTo=function gt(B,b,w){--b;var H=w.t=this.t+B.t-b;for(w.s=0;--H>=0;)w.data[H]=0;for(H=Math.max(b-this.t,0);H<B.t;++H)w.data[this.t+H-b]=this.am(b-H,B.data[H],w,0,0,this.t+H-b);w.clamp(),w.drShiftTo(1,w)},m.prototype.modInt=function At(B){if(B<=0)return 0;var b=this.DV%B,w=this.s<0?B-1:0;if(this.t>0)if(0==b)w=this.data[0]%B;else for(var H=this.t-1;H>=0;--H)w=(b*w+this.data[H])%B;return w},m.prototype.millerRabin=function Rt(B){var b=this.subtract(m.ONE),w=b.getLowestSetBit();if(w<=0)return!1;for(var $,H=b.shiftRight(w),Z=function Lt(){return{nextBytes:function(B){for(var b=0;b<B.length;++b)B[b]=Math.floor(256*Math.random())}}}(),ne=0;ne<B;++ne){do{$=new m(this.bitLength(),Z)}while($.compareTo(m.ONE)<=0||$.compareTo(b)>=0);var ae=$.modPow(H,this);if(0!=ae.compareTo(m.ONE)&&0!=ae.compareTo(b)){for(var me=1;me++<w&&0!=ae.compareTo(b);)if(0==(ae=ae.modPowInt(2,this)).compareTo(m.ONE))return!1;if(0!=ae.compareTo(b))return!1}}return!0},m.prototype.clone=function Y(){var B=x();return this.copyTo(B),B},m.prototype.intValue=function F(){if(this.s<0){if(1==this.t)return this.data[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this.data[0];if(0==this.t)return 0}return(this.data[1]&(1<<32-this.DB)-1)<<this.DB|this.data[0]},m.prototype.byteValue=function ee(){return 0==this.t?this.s:this.data[0]<<24>>24},m.prototype.shortValue=function oe(){return 0==this.t?this.s:this.data[0]<<16>>16},m.prototype.signum=function q(){return this.s<0?-1:this.t<=0||1==this.t&&this.data[0]<=0?0:1},m.prototype.toByteArray=function de(){var B=this.t,b=new Array;b[0]=this.s;var H,w=this.DB-B*this.DB%8,Z=0;if(B-- >0)for(w<this.DB&&(H=this.data[B]>>w)!=(this.s&this.DM)>>w&&(b[Z++]=H|this.s<<this.DB-w);B>=0;)w<8?(H=(this.data[B]&(1<<w)-1)<<8-w,H|=this.data[--B]>>(w+=this.DB-8)):(H=this.data[B]>>(w-=8)&255,w<=0&&(w+=this.DB,--B)),128&H&&(H|=-256),0==Z&&(128&this.s)!=(128&H)&&++Z,(Z>0||H!=this.s)&&(b[Z++]=H);return b},m.prototype.equals=function Ee(B){return 0==this.compareTo(B)},m.prototype.min=function Te(B){return this.compareTo(B)<0?this:B},m.prototype.max=function xe(B){return this.compareTo(B)>0?this:B},m.prototype.and=function Ge(B){var b=x();return this.bitwiseTo(B,Be,b),b},m.prototype.or=function Qe(B){var b=x();return this.bitwiseTo(B,be,b),b},m.prototype.xor=function Ye(B){var b=x();return this.bitwiseTo(B,ze,b),b},m.prototype.andNot=function je(B){var b=x();return this.bitwiseTo(B,Xe,b),b},m.prototype.not=function et(){for(var B=x(),b=0;b<this.t;++b)B.data[b]=this.DM&~this.data[b];return B.t=this.t,B.s=~this.s,B},m.prototype.shiftLeft=function tt(B){var b=x();return B<0?this.rShiftTo(-B,b):this.lShiftTo(B,b),b},m.prototype.shiftRight=function at(B){var b=x();return B<0?this.lShiftTo(-B,b):this.rShiftTo(B,b),b},m.prototype.getLowestSetBit=function st(){for(var B=0;B<this.t;++B)if(0!=this.data[B])return B*this.DB+it(this.data[B]);return this.s<0?this.t*this.DB:-1},m.prototype.bitCount=function ft(){for(var B=0,b=this.s&this.DM,w=0;w<this.t;++w)B+=ut(this.data[w]^b);return B},m.prototype.testBit=function Ne(B){var b=Math.floor(B/this.DB);return b>=this.t?0!=this.s:0!=(this.data[b]&1<<B%this.DB)},m.prototype.setBit=function Le(B){return this.changeBit(B,be)},m.prototype.clearBit=function De(B){return this.changeBit(B,Xe)},m.prototype.flipBit=function we(B){return this.changeBit(B,ze)},m.prototype.add=function ke(B){var b=x();return this.addTo(B,b),b},m.prototype.subtract=function Pe(B){var b=x();return this.subTo(B,b),b},m.prototype.multiply=function Ve(B){var b=x();return this.multiplyTo(B,b),b},m.prototype.divide=function Oe(B){var b=x();return this.divRemTo(B,b,null),b},m.prototype.remainder=function Fe(B){var b=x();return this.divRemTo(B,null,b),b},m.prototype.divideAndRemainder=function Ke(B){var b=x(),w=x();return this.divRemTo(B,b,w),new Array(b,w)},m.prototype.modPow=function Tt(B,b){var H,$,w=B.bitLength(),Z=u(1);if(w<=0)return Z;H=w<18?1:w<48?3:w<144?4:w<768?5:6,$=w<8?new te(b):b.isEven()?new ot(b):new ge(b);var ne=new Array,ae=3,me=H-1,He=(1<<H)-1;if(ne[1]=$.convert(this),H>1){var qe=x();for($.sqrTo(ne[1],qe);ae<=He;)ne[ae]=x(),$.mulTo(qe,ne[ae-2],ne[ae]),ae+=2}var rt,$e,We=B.t-1,lt=!0,Je=x();for(w=N(B.data[We])-1;We>=0;){for(w>=me?rt=B.data[We]>>w-me&He:(rt=(B.data[We]&(1<<w+1)-1)<<me-w,We>0&&(rt|=B.data[We-1]>>this.DB+w-me)),ae=H;!(1&rt);)rt>>=1,--ae;if((w-=ae)<0&&(w+=this.DB,--We),lt)ne[rt].copyTo(Z),lt=!1;else{for(;ae>1;)$.sqrTo(Z,Je),$.sqrTo(Je,Z),ae-=2;ae>0?$.sqrTo(Z,Je):($e=Z,Z=Je,Je=$e),$.mulTo(Je,ne[rt],Z)}for(;We>=0&&!(B.data[We]&1<<w);)$.sqrTo(Z,Je),$e=Z,Z=Je,Je=$e,--w<0&&(w=this.DB-1,--We)}return $.revert(Z)},m.prototype.modInverse=function Bt(B){var b=B.isEven();if(this.isEven()&&b||0==B.signum())return m.ZERO;for(var w=B.clone(),H=this.clone(),Z=u(1),$=u(0),ne=u(0),ae=u(1);0!=w.signum();){for(;w.isEven();)w.rShiftTo(1,w),b?((!Z.isEven()||!$.isEven())&&(Z.addTo(this,Z),$.subTo(B,$)),Z.rShiftTo(1,Z)):$.isEven()||$.subTo(B,$),$.rShiftTo(1,$);for(;H.isEven();)H.rShiftTo(1,H),b?((!ne.isEven()||!ae.isEven())&&(ne.addTo(this,ne),ae.subTo(B,ae)),ne.rShiftTo(1,ne)):ae.isEven()||ae.subTo(B,ae),ae.rShiftTo(1,ae);w.compareTo(H)>=0?(w.subTo(H,w),b&&Z.subTo(ne,Z),$.subTo(ae,$)):(H.subTo(w,H),b&&ne.subTo(Z,ne),ae.subTo($,ae))}return 0!=H.compareTo(m.ONE)?m.ZERO:ae.compareTo(B)>=0?ae.subtract(B):ae.signum()<0?(ae.addTo(B,ae),ae.signum()<0?ae.add(B):ae):ae},m.prototype.pow=function vt(B){return this.exp(B,new Ie)},m.prototype.gcd=function It(B){var b=this.s<0?this.negate():this.clone(),w=B.s<0?B.negate():B.clone();if(b.compareTo(w)<0){var H=b;b=w,w=H}var Z=b.getLowestSetBit(),$=w.getLowestSetBit();if($<0)return b;for(Z<$&&($=Z),$>0&&(b.rShiftTo($,b),w.rShiftTo($,w));b.signum()>0;)(Z=b.getLowestSetBit())>0&&b.rShiftTo(Z,b),(Z=w.getLowestSetBit())>0&&w.rShiftTo(Z,w),b.compareTo(w)>=0?(b.subTo(w,b),b.rShiftTo(1,b)):(w.subTo(b,w),w.rShiftTo(1,w));return $>0&&w.lShiftTo($,w),w},m.prototype.isProbablePrime=function Nt(B){var b,w=this.abs();if(1==w.t&&w.data[0]<=Ze[Ze.length-1]){for(b=0;b<Ze.length;++b)if(w.data[0]==Ze[b])return!0;return!1}if(w.isEven())return!1;for(b=1;b<Ze.length;){for(var H=Ze[b],Z=b+1;Z<Ze.length&&H<bt;)H*=Ze[Z++];for(H=w.modInt(H);b<Z;)if(H%Ze[b++]==0)return!1}return w.millerRabin(B)}},31616:(re,ce,O)=>{var a=O(9185);O(96615),O(58045),O(2059),re.exports=a.kem=a.kem||{};var e=a.jsbn.BigInteger;function i(C,m,x,d){C.generate=function(l,r){for(var f=new a.util.ByteBuffer,I=Math.ceil(r/d)+x,U=new a.util.ByteBuffer,E=x;E<I;++E){U.putInt32(E),m.start(),m.update(l+U.getBytes());var g=m.digest();f.putBytes(g.getBytes(d))}return f.truncate(f.length()-r),f.getBytes()}}a.kem.rsa={},a.kem.rsa.create=function(C,m){var x=(m=m||{}).prng||a.random;return{encrypt:function(l,r){var I,f=Math.ceil(l.n.bitLength()/8);do{I=new e(a.util.bytesToHex(x.getBytesSync(f)),16).mod(l.n)}while(I.compareTo(e.ONE)<=0);var U=f-(I=a.util.hexToBytes(I.toString(16))).length;return U>0&&(I=a.util.fillString(String.fromCharCode(0),U)+I),{encapsulation:l.encrypt(I,"NONE"),key:C.generate(I,r)}},decrypt:function(l,r,f){var I=l.decrypt(r,"NONE");return C.generate(I,f)}}},a.kem.kdf1=function(C,m){i(this,C,0,m||C.digestLength)},a.kem.kdf2=function(C,m){i(this,C,1,m||C.digestLength)}},44800:(re,ce,O)=>{var a=O(9185);O(96615),re.exports=a.log=a.log||{},a.log.levels=["none","error","warning","info","debug","verbose","max"];var e={},i=[],C=null;a.log.LEVEL_LOCKED=2,a.log.NO_LEVEL_CHECK=4,a.log.INTERPOLATE=8;for(var m=0;m<a.log.levels.length;++m){var x=a.log.levels[m];e[x]={index:m,name:x.toUpperCase()}}a.log.logMessage=function(E){for(var g=e[E.level].index,T=0;T<i.length;++T){var h=i[T];h.flags&a.log.NO_LEVEL_CHECK?h.f(E):g<=e[h.level].index&&h.f(h,E)}},a.log.prepareStandard=function(E){"standard"in E||(E.standard=e[E.level].name+" ["+E.category+"] "+E.message)},a.log.prepareFull=function(E){if(!("full"in E)){var g=[E.message];g=g.concat([]),E.full=a.util.format.apply(this,g)}},a.log.prepareStandardFull=function(E){"standardFull"in E||(a.log.prepareStandard(E),E.standardFull=E.standard)};var d=["error","warning","info","debug","verbose"];for(m=0;m<d.length;++m)!function(g){a.log[g]=function(T,h){var v=Array.prototype.slice.call(arguments).slice(2);a.log.logMessage({timestamp:new Date,level:g,category:T,message:h,arguments:v})}}(d[m]);if(a.log.makeLogger=function(E){var g={flags:0,f:E};return a.log.setLevel(g,"none"),g},a.log.setLevel=function(E,g){var T=!1;if(E&&!(E.flags&a.log.LEVEL_LOCKED))for(var h=0;h<a.log.levels.length;++h)if(g==a.log.levels[h]){E.level=g,T=!0;break}return T},a.log.lock=function(E,g){typeof g>"u"||g?E.flags|=a.log.LEVEL_LOCKED:E.flags&=~a.log.LEVEL_LOCKED},a.log.addLogger=function(E){i.push(E)},typeof console<"u"&&"log"in console){var l;if(console.error&&console.warn&&console.info&&console.debug){var r={error:console.error,warning:console.warn,info:console.info,debug:console.debug,verbose:console.debug},f=function(E,g){a.log.prepareStandard(g);var T=r[g.level],h=[g.standard];h=h.concat(g.arguments.slice()),T.apply(console,h)};l=a.log.makeLogger(f)}else f=function(g,T){a.log.prepareStandardFull(T),console.log(T.standardFull)},l=a.log.makeLogger(f);a.log.setLevel(l,"debug"),a.log.addLogger(l),C=l}else console={log:function(){}};if(null!==C&&typeof window<"u"&&window.location){var I=new URL(window.location.href).searchParams;I.has("console.level")&&a.log.setLevel(C,I.get("console.level").slice(-1)[0]),I.has("console.lock")&&"true"==I.get("console.lock").slice(-1)[0]&&a.log.lock(C)}a.log.consoleLogger=C},62056:(re,ce,O)=>{re.exports=O(91501),O(71469),O(97634),O(22032),O(78325)},91501:(re,ce,O)=>{var a=O(9185);re.exports=a.md=a.md||{},a.md.algorithms=a.md.algorithms||{}},71469:(re,ce,O)=>{var a=O(9185);O(91501),O(96615);var e=re.exports=a.md5=a.md5||{};a.md.md5=a.md.algorithms.md5=e,e.create=function(){d||function l(){i=String.fromCharCode(128),i+=a.util.fillString(String.fromCharCode(0),64),C=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,1,6,11,0,5,10,15,4,9,14,3,8,13,2,7,12,5,8,11,14,1,4,7,10,13,0,3,6,9,12,15,2,0,7,14,5,12,3,10,1,8,15,6,13,4,11,2,9],m=[7,12,17,22,7,12,17,22,7,12,17,22,7,12,17,22,5,9,14,20,5,9,14,20,5,9,14,20,5,9,14,20,4,11,16,23,4,11,16,23,4,11,16,23,4,11,16,23,6,10,15,21,6,10,15,21,6,10,15,21,6,10,15,21],x=new Array(64);for(var f=0;f<64;++f)x[f]=Math.floor(4294967296*Math.abs(Math.sin(f+1)));d=!0}();var f=null,I=a.util.createBuffer(),U=new Array(16),E={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){E.messageLength=0,E.fullMessageLength=E.messageLength64=[];for(var g=E.messageLengthSize/4,T=0;T<g;++T)E.fullMessageLength.push(0);return I=a.util.createBuffer(),f={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878},E}};return E.start(),E.update=function(g,T){"utf8"===T&&(g=a.util.encodeUtf8(g));var h=g.length;E.messageLength+=h,h=[h/4294967296>>>0,h>>>0];for(var v=E.fullMessageLength.length-1;v>=0;--v)E.fullMessageLength[v]+=h[1],h[1]=h[0]+(E.fullMessageLength[v]/4294967296>>>0),E.fullMessageLength[v]=E.fullMessageLength[v]>>>0,h[0]=h[1]/4294967296>>>0;return I.putBytes(g),r(f,U,I),(I.read>2048||0===I.length())&&I.compact(),E},E.digest=function(){var g=a.util.createBuffer();g.putBytes(I.bytes()),g.putBytes(i.substr(0,E.blockLength-(E.fullMessageLength[E.fullMessageLength.length-1]+E.messageLengthSize&E.blockLength-1)));for(var v,n=0,u=E.fullMessageLength.length-1;u>=0;--u)n=(v=8*E.fullMessageLength[u]+n)/4294967296>>>0,g.putInt32Le(v>>>0);var p={h0:f.h0,h1:f.h1,h2:f.h2,h3:f.h3};r(p,U,g);var A=a.util.createBuffer();return A.putInt32Le(p.h0),A.putInt32Le(p.h1),A.putInt32Le(p.h2),A.putInt32Le(p.h3),A},E};var i=null,C=null,m=null,x=null,d=!1;function r(f,I,U){for(var E,g,T,h,v,u,p,A=U.length();A>=64;){for(g=f.h0,T=f.h1,h=f.h2,v=f.h3,p=0;p<16;++p)I[p]=U.getInt32Le(),E=g+(v^T&(h^v))+x[p]+I[p],g=v,v=h,h=T,T+=E<<(u=m[p])|E>>>32-u;for(;p<32;++p)E=g+(h^v&(T^h))+x[p]+I[C[p]],g=v,v=h,h=T,T+=E<<(u=m[p])|E>>>32-u;for(;p<48;++p)E=g+(T^h^v)+x[p]+I[C[p]],g=v,v=h,h=T,T+=E<<(u=m[p])|E>>>32-u;for(;p<64;++p)E=g+(h^(T|~v))+x[p]+I[C[p]],g=v,v=h,h=T,T+=E<<(u=m[p])|E>>>32-u;f.h0=f.h0+g|0,f.h1=f.h1+T|0,f.h2=f.h2+h|0,f.h3=f.h3+v|0,A-=64}}},69118:(re,ce,O)=>{var a=O(9185);O(93534),re.exports=a.mgf=a.mgf||{},a.mgf.mgf1=a.mgf1},93534:(re,ce,O)=>{var a=O(9185);O(96615),a.mgf=a.mgf||{},(re.exports=a.mgf.mgf1=a.mgf1=a.mgf1||{}).create=function(i){return{generate:function(m,x){for(var d=new a.util.ByteBuffer,l=Math.ceil(x/i.digestLength),r=0;r<l;r++){var f=new a.util.ByteBuffer;f.putInt32(r),i.start(),i.update(m+f.getBytes()),d.putBuffer(i.digest())}return d.truncate(d.length()-x),d.getBytes()}}}},65853:(re,ce,O)=>{var a=O(9185);a.pki=a.pki||{};var e=re.exports=a.pki.oids=a.oids=a.oids||{};function i(m,x){e[m]=x,e[x]=m}function C(m,x){e[m]=x}
1i("1.2.840.113549.1.1.1","rsaEncryption"),i("1.2.840.113549.1.1.4","md5WithRSAEncryption"),i("1.2.840.113549.1.1.5","sha1WithRSAEncryption"),i("1.2.840.113549.1.1.7","RSAES-OAEP"),i("1.2.840.113549.1.1.8","mgf1"),i("1.2.840.113549.1.1.9","pSpecified"),i("1.2.840.113549.1.1.10","RSASSA-PSS"),i("1.2.840.113549.1.1.11","sha256WithRSAEncryption"),i("1.2.840.113549.1.1.12","sha384WithRSAEncryption"),i("1.2.840.113549.1.1.13","sha512WithRSAEncryption"),i("1.3.101.112","EdDSA25519"),i("1.2.840.10040.4.3","dsa-with-sha1"),i("1.3.14.3.2.7","desCBC"),i("1.3.14.3.2.26","sha1"),i("1.3.14.3.2.29","sha1WithRSASignature"),i("2.16.840.1.101.3.4.2.1","sha256"),i("2.16.840.1.101.3.4.2.2","sha384"),i("2.16.840.1.101.3.4.2.3","sha512"),i("2.16.840.1.101.3.4.2.4","sha224"),i("2.16.840.1.101.3.4.2.5","sha512-224"),i("2.16.840.1.101.3.4.2.6","sha512-256"),i("1.2.840.113549.2.2","md2"),i("1.2.840.113549.2.5","md5"),i("1.2.840.113549.1.7.1","data"),i("1.2.840.113549.1.7.2","signedData"),i("1.2.840.113549.1.7.3","envelopedData"),i("1.2.840.113549.1.7.4","signedAndEnvelopedData"),i("1.2.840.113549.1.7.5","digestedData"),i("1.2.840.113549.1.7.6","encryptedData"),i("1.2.840.113549.1.9.1","emailAddress"),i("1.2.840.113549.1.9.2","unstructuredName"),i("1.2.840.113549.1.9.3","contentType"),i("1.2.840.113549.1.9.4","messageDigest"),i("1.2.840.113549.1.9.5","signingTime"),i("1.2.840.113549.1.9.6","counterSignature"),i("1.2.840.113549.1.9.7","challengePassword"),i("1.2.840.113549.1.9.8","unstructuredAddress"),i("1.2.840.113549.1.9.14","extensionRequest"),i("1.2.840.113549.1.9.20","friendlyName"),i("1.2.840.113549.1.9.21","localKeyId"),i("1.2.840.113549.1.9.22.1","x509Certificate"),i("1.2.840.113549.1.12.10.1.1","keyBag"),i("1.2.840.113549.1.12.10.1.2","pkcs8ShroudedKeyBag"),i("1.2.840.113549.1.12.10.1.3","certBag"),i("1.2.840.113549.1.12.10.1.4","crlBag"),i("1.2.840.113549.1.12.10.1.5","secretBag"),i("1.2.840.113549.1.12.10.1.6","safeContentsBag"),i("1.2.840.113549.1.5.13","pkcs5PBES2"),i("1.2.840.113549.1.5.12","pkcs5PBKDF2"),i("1.2.840.113549.1.12.1.1","pbeWithSHAAnd128BitRC4"),i("1.2.840.113549.1.12.1.2","pbeWithSHAAnd40BitRC4"),i("1.2.840.113549.1.12.1.3","pbeWithSHAAnd3-KeyTripleDES-CBC"),i("1.2.840.113549.1.12.1.4","pbeWithSHAAnd2-KeyTripleDES-CBC"),i("1.2.840.113549.1.12.1.5","pbeWithSHAAnd128BitRC2-CBC"),i("1.2.840.113549.1.12.1.6","pbewithSHAAnd40BitRC2-CBC"),i("1.2.840.113549.2.7","hmacWithSHA1"),i("1.2.840.113549.2.8","hmacWithSHA224"),i("1.2.840.113549.2.9","hmacWithSHA256"),i("1.2.840.113549.2.10","hmacWithSHA384"),i("1.2.840.113549.2.11","hmacWithSHA512"),i("1.2.840.113549.3.7","des-EDE3-CBC"),i("2.16.840.1.101.3.4.1.2","aes128-CBC"),i("2.16.840.1.101.3.4.1.22","aes192-CBC"),i("2.16.840.1.101.3.4.1.42","ae
1s256-CBC"),i("2.5.4.3","commonName"),i("2.5.4.4","surname"),i("2.5.4.5","serialNumber"),i("2.5.4.6","countryName"),i("2.5.4.7","localityName"),i("2.5.4.8","stateOrProvinceName"),i("2.5.4.9","streetAddress"),i("2.5.4.10","organizationName"),i("2.5.4.11","organizationalUnitName"),i("2.5.4.12","title"),i("2.5.4.13","description"),i("2.5.4.15","businessCategory"),i("2.5.4.17","postalCode"),i("2.5.4.42","givenName"),i("1.3.6.1.4.1.311.60.2.1.2","jurisdictionOfIncorporationStateOrProvinceName"),i("1.3.6.1.4.1.311.60.2.1.3","jurisdictionOfIncorporationCountryName"),i("2.16.840.1.113730.1.1","nsCertType"),i("2.16.840.1.113730.1.13","nsComment"),C("2.5.29.1","authorityKeyIdentifier"),C("2.5.29.2","keyAttributes"),C("2.5.29.3","certificatePolicies"),C("2.5.29.4","keyUsageRestriction"),C("2.5.29.5","policyMapping"),C("2.5.29.6","subtreesConstraint"),C("2.5.29.7","subjectAltName"),C("2.5.29.8","issuerAltName"),C("2.5.29.9","subjectDirectoryAttributes"),C("2.5.29.10","basicConstraints"),C("2.5.29.11","nameConstraints"),C("2.5.29.12","policyConstraints"),C("2.5.29.13","basicConstraints"),i("2.5.29.14","subjectKeyIdentifier"),i("2.5.29.15","keyUsage"),C("2.5.29.16","privateKeyUsagePeriod"),i("2.5.29.17","subjectAltName"),i("2.5.29.18","issuerAltName"),i("2.5.29.19","basicConstraints"),C("2.5.29.20","cRLNumber"),C("2.5.29.21","cRLReason"),C("2.5.29.22","expirationDate"),C("2.5.29.23","instructionCode"),C("2.5.29.24","invali
1dityDate"),C("2.5.29.25","cRLDistributionPoints"),C("2.5.29.26","issuingDistributionPoint"),C("2.5.29.27","deltaCRLIndicator"),C("2.5.29.28","issuingDistributionPoint"),C("2.5.29.29","certificateIssuer"),C("2.5.29.30","nameConstraints"),i("2.5.29.31","cRLDistributionPoints"),i("2.5.29.32","certificatePolicies"),C("2.5.29.33","policyMappings"),C("2.5.29.34","policyConstraints"),i("2.5.29.35","authorityKeyIdentifier"),C("2.5.29.36","policyConstraints"),i("2.5.29.37","extKeyUsage"),C("2.5.29.46","freshestCRL"),C("2.5.29.54","inhibitAnyPolicy"),i("1.3.6.1.4.1.11129.2.4.2","timestampList"),i("1.3.6.1.5.5.7.1.1","authorityInfoAccess"),i("1.3.6.1.5.5.7.3.1","serverAuth"),i("1.3.6.1.5.5.7.3.2","clientAuth"),i("1.3.6.1.5.5.7.3.3","codeSigning"),i("1.3.6.1.5.5.7.3.4","emailProtection"),i("1.3.6.1.5.5.7.3.8","timeStamping")},22801:(re,ce,O)=>{var a=O(9185);if(O(28097),O(6902),O(39857),O(91501),O(65853),O(34495),O(10248),O(58045),O(80282),O(98563),O(96615),typeof e>"u")var e=a.jsbn.BigInteger;var i=a.asn1,C=a.pki=a.pki||{};re.exports=C.pbe=a.pbe=a.pbe||{};var m=C.oids,x={name:"EncryptedPrivateKeyInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedPrivateKeyInfo.encryptionAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"encryptionOid"},{name:"AlgorithmIdentifier.parameters",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"encryptionParams"}]},{name:"EncryptedPrivateKeyInfo.encryptedData",tagClass:i.Class.UNIVERSAL,type:i.Type.OCTETSTRING,constructed:!1,capture:"encryptedData"}]},d={name:"PBES2Algorithms",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc.oid",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"kdfOid"},{name:"PBES2Algorithms.params",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.params.salt",tagClass:i.Class.UNIVERSAL,type:i.Type.OCTETSTRING,constructed:!1,capture:"kdfSalt"},{name:"PBES2Algorithms.params.iterationCount",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"kdfIterationCount"},{name:"PBES2Algorithms.params.keyLength",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,optional:!0,capture:"keyLength"},{name:"PBES2Algorithms.params.prf",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,optional:!0,value:[{name:"PBES2Algorithms.params.prf.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"prfOid"}]}]}]},{name:"PBES2Algorithms.encryptionScheme",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.encryptionScheme.oid",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"encOid"},{name:"PBES2Algorithms.encryptionScheme.iv",tagClass:i.Class.UNIVERSAL,type:i.Type.OCTETSTRING,constructed:!1,capture:"encIv"}]}]},l={name:"pkcs-12PbeParams",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"pkcs-12PbeParams.salt",tagClass:i.Class.UNIVERSAL,type:i.Type.OCTETSTRING,constructed:!1,capture:"salt"},{name:"pkcs-12PbeParams.iterations",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"iterations"}]};function r(E,g){return E.start().update(g).digest().getBytes()}function f(E){var g;if(E){if(!(g=C.oids[i.derToOid(E)])){var T=new Error("Unsupported PRF OID.");throw T.oid=E,T.supported=["hmacWithSHA1","hmacWithSHA224","hmacWithSHA256","hmacWithSHA384","hmacWithSHA512"],T}}else g="hmacWithSHA1";return I(g)}function I(E){var g=a.md;switch(E){case"hmacWithSHA224":g=a.md.sha512;case"hmacWithSHA1":case"hmacWithSHA256":case"hmacWithSHA384":case"hmacWithSHA512":E=E.substr(8).toLowerCase();break;default:var T=new Error("Unsupported PRF algorithm.");throw T.algorithm=E,T.supported=["hmacWithSHA1","hmacWithSHA224","hmacWithSHA256","hmacWithSHA384","hmacWithSHA512"],T}if(!g||!(E in g))throw new Error("Unknown hash algorithm: "+E);return g[E].create()}C.encryptPrivateKeyInfo=function(E,g,T){(T=T||{}).saltSize=T.saltSize||8,T.count=T.count||2048,T.algorithm=T.algorithm||"aes128",T.prfAlgorithm=T.prfAlgorithm||"sha1";var u,p,A,h=a.random.getBytesSync(T.saltSize),v=T.count,n=i.integerToDer(v);if(0===T.algorithm.indexOf("aes")||"des"===T.algorithm){var R,k,c;switch(T.algorithm){case"aes128":u=16,R=16,k=m["aes128-CBC"],c=a.aes.createEncryptionCipher;break;
vendor: 34,452 bytes, line 1
1case"aes192":u=24,R=16,k=m["aes192-CBC"],c=a.aes.createEncryptionCipher;break;case"aes256":u=32,R=16,k=m["aes256-CBC"],c=a.aes.createEncryptionCipher;break;case"des":u=8,R=8,k=m.desCBC,c=a.des.createEncryptionCipher;break;default:throw(y=new Error("Cannot encrypt private key. Unknown encryption algorithm.")).algorithm=T.algorithm,y}var N="hmacWith"+T.prfAlgorithm.toUpperCase(),t=I(N),L=a.pkcs5.pbkdf2(g,h,v,u,t),V=a.random.getBytesSync(R);(D=c(L)).start(V),D.update(i.toDer(E)),D.finish(),A=D.output.getBytes();var M=function U(E,g,T,h){var v=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,E),i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,g.getBytes())]);return"hmacWithSHA1"!==h&&v.value.push(i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,a.util.hexToBytes(T.toString(16))),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(C.oids[h]).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.NULL,!1,"")])),v}(h,n,u,N);p=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(m.pkcs5PBES2).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(m.pkcs5PBKDF2).getBytes()),M]),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(k).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,V)])])])}else{var y;if("3des"!==T.algorithm)throw(y=new Error("Cannot encrypt private key. Unknown encryption algorithm.")).algorithm=T.algorithm,y;u=24;var D,_=new a.util.ByteBuffer(h);L=C.pbe.generatePkcs12Key(g,_,1,v,u),V=C.pbe.generatePkcs12Key(g,_,2,v,u),(D=a.des.createEncryptionCipher(L)).start(V),D.update(i.toDer(E)),D.finish(),A=D.output.getBytes(),p=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(m["pbeWithSHAAnd3-KeyTripleDES-CBC"]).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,h),i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,n.getBytes())])])}return i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[p,i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,A)])},C.decryptPrivateKeyInfo=function(E,g){var T=null,h={},v=[];if(!i.validate(E,x,h,v)){var n=new Error("Cannot read encrypted private key. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw n.errors=v,n}var u=i.derToOid(h.encryptionOid),p=C.pbe.getCipher(u,h.encryptionParams,g),A=a.util.createBuffer(h.encryptedData);return p.update(A),p.finish()&&(T=i.fromDer(p.output)),T},C.encryptedPrivateKeyToPem=function(E,g){var T={type:"ENCRYPTED PRIVATE KEY",body:i.toDer(E).getBytes()};return a.pem.encode(T,{maxline:g})},C.encryptedPrivateKeyFromPem=function(E){var g=a.pem.decode(E)[0];if("ENCRYPTED PRIVATE KEY"!==g.type){var T=new Error('Could not convert encrypted private key from PEM; PEM header type is "ENCRYPTED PRIVATE KEY".');throw T.headerType=g.type,T}if(g.procType&&"ENCRYPTED"===g.procType.type)throw new Error("Could not convert encrypted private key from PEM; PEM is encrypted.");return i.fromDer(g.body)},C.encryptRsaPrivateKey=function(E,g,T){if(!(T=T||{}).legacy){var h=C.wrapRsaPrivateKey(C.privateKeyToAsn1(E));return h=C.encryptPrivateKeyInfo(h,g,T),C.encryptedPrivateKeyToPem(h)}var v,n,u,p;switch(T.algorithm){case"aes128":v="AES-128-CBC",u=16,n=a.random.getBytesSync(16),p=a.aes.createEncryptionCipher;break;case"aes192":v="AES-192-CBC",u=24,n=a.random.getBytesSync(16),p=a.aes.createEncryptionCipher;break;case"aes256":v="AES-256-CBC",u=32,n=a.random.getBytesSync(16),p=a.aes.createEncryptionCipher;break;case"3des":v="DES-EDE3-CBC",u=24,n=a.random.getBytesSync(8),p=a.des.createEncryptionCipher;break;case"des":v="DES-CBC",u=8,n=a.random.getBytesSync(8),p=a.des.createEncryptionCipher;break;default:var A=new Error('Could not encrypt RSA private key; unsupported encryption algorithm "'+T.algorithm+'".');throw A.algorithm=T.algorithm,A}var k=p(a.pbe.opensslDeriveBytes(g,n.substr(0,8),u));k.start(n),k.update(i.toDer(C.privateKeyToAsn1(E))),k.finish();var c={type:"RSA PRIVATE KEY",procType:{version:"4",type:"ENCRYPTED"},dekInfo:{algorithm:v,parameters:a.util.bytesToHex(n).toUpperCase()},body:k.output.getBytes()};return a.pem.encode(c)},C.decryptRsaPrivateKey=function(E,g){var T=null,h=a.pem.decode(E)[0];if("ENCRYPTED PRIVATE KEY"!==h.type&&"PRIVATE KEY"!==h.type&&"RSA PRIVATE KEY"!==h.type)throw(v=new Error('Could not convert private key from PEM; PEM header type is not "ENCRYPTED PRIVATE KEY", "PRIVATE KEY", or "RSA PRIVATE KEY".')).headerType=v,v;if(h.procType&&"ENCRYPTED"===h.procType.type){var n,u;switch(h.dekInfo.algorithm){case"DES-CBC":n=8,u=a.des.createDecryptionCipher;break;case"DES-EDE3-CBC":n=24,u=a.des.createDecryptionCipher;break;case"AES-128-CBC":n=16,u=a.aes.createDecryptionCipher;break;case"AES-192-CBC":n=24,u=a.aes.createDecryptionCipher;break;case"AES-256-CBC":n=32,u=a.aes.createDecryptionCipher;break;case"RC2-40-CBC":n=5,u=function(c){return a.rc2.createDecryptionCipher(c,40)};break;case"RC2-64-CBC":n=8,u=function(c){return a.rc2.createDecryptionCipher(c,64)};break;case"RC2-128-CBC":n=16,u=function(c){return a.rc2.createDecryptionCipher(c,128)};break;default:var v;throw(v=new Error('Could not decrypt private key; unsupported encryption algorithm "'+h.dekInfo.algorithm+'".')).algorithm=h.dekInfo.algorithm,v}var p=a.util.hexToBytes(h.dekInfo.parameters),R=u(a.pbe.opensslDeriveBytes(g,p.substr(0,8),n));if(R.start(p),R.update(a.util.createBuffer(h.body)),!R.finish())return T;T=R.output.getBytes()}else T=h.body;return null!==(T="ENCRYPTED PRIVATE KEY"===h.type?C.decryptPrivateKeyInfo(i.fromDer(T),g):i.fromDer(T))&&(T=C.privateKeyFromAsn1(T)),T},C.pbe.generatePkcs12Key=function(E,g,T,h,v,n){var u,p;if(typeof n>"u"||null===n){if(!("sha1"in a.md))throw new Error('"sha1" hash algorithm unavailable.');n=a.md.sha1.create()}var A=n.digestLength,R=n.blockLength,k=new a.util.ByteBuffer,c=new a.util.ByteBuffer;if(null!=E){for(p=0;p<E.length;p++)c.putInt16(E.charCodeAt(p));c.putInt16(0)}var y=c.length(),N=g.length(),t=new a.util.ByteBuffer;t.fillWithByte(T,R);var L=R*Math.ceil(N/R),V=new a.util.ByteBuffer;for(p=0;p<L;p++)V.putByte(g.at(p%N));var D=R*Math.ceil(y/R),M=new a.util.ByteBuffer;for(p=0;p<D;p++)M.putByte(c.at(p%y));var _=V;_.putBuffer(M);for(var G=Math.ceil(v/A),X=1;X<=G;X++){var W=new a.util.ByteBuffer;W.putBytes(t.bytes()),W.putBytes(_.bytes());for(var j=0;j<h;j++)n.start(),n.update(W.getBytes()),W=n.digest();var te=new a.util.ByteBuffer;for(p=0;p<R;p++)te.putByte(W.at(p%A));var fe=Math.ceil(N/R)+Math.ceil(y/R),he=new a.util.ByteBuffer;for(u=0;u<fe;u++){var pe=new a.util.ByteBuffer(_.getBytes(R)),J=511;for(p=te.length()-1;p>=0;p--)J>>=8,J+=te.at(p)+pe.at(p),pe.setAt(p,255&J);he.putBuffer(pe)}_=he,k.putBuffer(W)}return k.truncate(k.length()-v),k},C.pbe.getCipher=function(E,g,T){switch(E){case C.oids.pkcs5PBES2:return C.pbe.getCipherForPBES2(E,g,T);case C.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case C.oids["pbewithSHAAnd40BitRC2-CBC"]:return C.pbe.getCipherForPKCS12PBE(E,g,T);default:var h=new Error("Cannot read encrypted PBE data block. Unsupported OID.");throw h.oid=E,h.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC","pbewithSHAAnd40BitRC2-CBC"],h}},C.pbe.getCipherForPBES2=function(E,g,T){var n,h={},v=[];if(!i.validate(g,d,h,v))throw(n=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.")).errors=v,n;if((E=i.derToOid(h.kdfOid))!==C.oids.pkcs5PBKDF2)throw(n=new Error("Cannot read encrypted private key. Unsupported key derivation function OID.")).oid=E,n.supportedOids=["pkcs5PBKDF2"],n;if((E=i.derToOid(h.encOid))!==C.oids["aes128-CBC"]&&E!==C.oids["aes192-CBC"]&&E!==C.oids["aes256-CBC"]&&E!==C.oids["des-EDE3-CBC"]&&E!==C.oids.desCBC)throw(n=new Error("Cannot read encrypted private key. Unsupported encryption scheme OID.")).oid=E,n.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],n;var A,R,u=h.kdfSalt,p=a.util.createBuffer(h.kdfIterationCount);switch(p=p.getInt(p.length()<<3),C.oids[E]){case"aes128-CBC":A=16,R=a.aes.createDecryptionCipher;break;case"aes192-CBC":A=24,R=a.aes.createDecryptionCipher;break;case"aes256-CBC":A=32,R=a.aes.createDecryptionCipher;break;case"des-EDE3-CBC":A=24,R=a.des.createDecryptionCipher;break;case"desCBC":A=8,R=a.des.createDecryptionCipher}var k=f(h.prfOid),c=a.pkcs5.pbkdf2(T,u,p,A,k),y=h.encIv,N=R(c);return N.start(y),N},C.pbe.getCipherForPKCS12PBE=function(E,g,T){var h={},v=[];if(!i.validate(g,l,h,v))throw(n=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.")).errors=v,n;var A,R,k,u=a.util.createBuffer(h.salt),p=a.util.createBuffer(h.iterations);switch(p=p.getInt(p.length()<<3),E){case C.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:A=24,R=8,k=a.des.startDecrypting;break;case C.oids["pbewithSHAAnd40BitRC2-CBC"]:A=5,R=8,k=function(L,V){var D=a.rc2.createDecryptionCipher(L,40);return D.start(V,null),D};break;default:var n;throw(n=new Error("Cannot read PKCS #12 PBE data block. Unsupported OID.")).oid=E,n}var c=f(h.prfOid),y=C.pbe.generatePkcs12Key(T,u,1,p,A,c);return c.start(),k(y,C.pbe.generatePkcs12Key(T,u,2,p,R,c))},C.pbe.opensslDeriveBytes=function(E,g,T,h){if(typeof h>"u"||null===h){if(!("md5"in a.md))throw new Error('"md5" hash algorithm unavailable.');h=a.md.md5.create()}null===g&&(g="");for(var v=[r(h,E+g)],n=16,u=1;n<T;++u,n+=16)v.push(r(h,v[u-1]+E+g));return v.join("").substr(0,T)}},34495:(re,ce,O)=>{var a=O(9185);O(41583),O(91501),O(96615);var i,e=a.pkcs5=a.pkcs5||{};a.util.isNodejs&&!a.options.usePureJavaScript&&(i=O(25819)),re.exports=a.pbkdf2=e.pbkdf2=function(C,m,x,d,l,r){if("function"==typeof l&&(r=l,l=null),a.util.isNodejs&&!a.options.usePureJavaScript&&i.pbkdf2&&(null===l||"object"!=typeof l)&&(i.pbkdf2Sync.length>4||!l||"sha1"===l))return"string"!=typeof l&&(l="sha1"),C=Buffer.from(C,"binary"),m=Buffer.from(m,"binary"),r?4===i.pbkdf2Sync.length?i.pbkdf2(C,m,x,d,function(k,c){if(k)return r(k);r(null,c.toString("binary"))}):i.pbkdf2(C,m,x,d,l,function(k,c){if(k)return r(k);r(null,c.toString("binary"))}):4===i.pbkdf2Sync.length?i.pbkdf2Sync(C,m,x,d).toString("binary"):i.pbkdf2Sync(C,m,x,d,l).toString("binary");if((typeof l>"u"||null===l)&&(l="sha1"),"string"==typeof l){if(!(l in a.md.algorithms))throw new Error("Unknown hash algorithm: "+l);l=a.md[l].create()}var f=l.digestLength;if(d>4294967295*f){var I=new Error("Derived key is too long.");if(r)return r(I);throw I}var U=Math.ceil(d/f),E=d-(U-1)*f,g=a.hmac.create();g.start(l,C);var h,v,n,T="";if(!r){for(var u=1;u<=U;++u){g.start(null,null),g.update(m),g.update(a.util.int32ToBytes(u)),h=n=g.digest().getBytes();for(var p=2;p<=x;++p)g.start(null,null),g.update(n),v=g.digest().getBytes(),h=a.util.xorBytes(h,v,f),n=v;T+=u<U?h:h.substr(0,E)}return T}function A(){if(u>U)return r(null,T);g.start(null,null),g.update(m),g.update(a.util.int32ToBytes(u)),h=n=g.digest().getBytes(),p=2,R()}function R(){if(p<=x)return g.start(null,null),g.update(n),v=g.digest().getBytes(),h=a.util.xorBytes(h,v,f),n=v,++p,a.util.setImmediate(R);T+=u<U?h:h.substr(0,E),++u,A()}u=1,A()}},10248:(re,ce,O)=>{var a=O(9185);O(96615);var e=re.exports=a.pem=a.pem||{};function i(m){for(var x=m.name+": ",d=[],l=function(E,g){return" "+g},r=0;r<m.values.length;++r)d.push(m.values[r].replace(/^(\S+\r\n)/,l));x+=d.join(",")+"\r\n";var f=0,I=-1;for(r=0;r<x.length;++r,++f)if(f>65&&-1!==I){var U=x[I];","===U?(++I,x=x.substr(0,I)+"\r\n "+x.substr(I)):x=x.substr(0,I)+"\r\n"+U+x.substr(I+1),f=r-I-1,I=-1,++r}else(" "===x[r]||"\t"===x[r]||","===x[r])&&(I=r);return x}function C(m){return m.replace(/^\s+/,"")}e.encode=function(m,x){x=x||{};var l,d="-----BEGIN "+m.type+"-----\r\n";if(m.procType&&(d+=i(l={name:"Proc-Type",values:[String(m.procType.version),m.procType.type]})),m.contentDomain&&(d+=i(l={name:"Content-Domain",values:[m.contentDomain]})),m.dekInfo&&(l={name:"DEK-Info",values:[m.dekInfo.algorithm]},m.dekInfo.parameters&&l.values.push(m.dekInfo.parameters),d+=i(l)),m.headers)for(var r=0;r<m.headers.length;++r)d+=i(m.headers[r]);return m.procType&&(d+="\r\n"),(d+=a.util.encode64(m.body,x.maxline||64)+"\r\n")+"-----END "+m.type+"-----\r\n"},e.decode=function(m){for(var f,x=[],d=/\s*-----BEGIN ([A-Z0-9- ]+)-----\r?\n?([\x21-\x7e\s]+?(?:\r?\n\r?\n))?([:A-Za-z0-9+\/=\s]+?)-----END \1-----/g,l=/([\x21-\x7e]+):\s*([\x21-\x7e\s^:]+)/,r=/\r?\n/;f=d.exec(m);){var I=f[1];"NEW CERTIFICATE REQUEST"===I&&(I="CERTIFICATE REQUEST");var U={type:I,procType:null,contentDomain:null,dekInfo:null,headers:[],body:a.util.decode64(f[3])};if(x.push(U),f[2]){for(var E=f[2].split(r),g=0;f&&g<E.length;){for(var T=E[g].replace(/\s+$/,""),h=g+1;h<E.length;++h){var v=E[h];if(!/\s/.test(v[0]))break;T+=v,g=h}if(f=T.match(l)){for(var n={name:f[1],values:[]},u=f[2].split(","),p=0;p<u.length;++p)n.values.push(C(u[p]));if(U.procType)if(U.contentDomain||"Content-Domain"!==n.name)if(U.dekInfo||"DEK-Info"!==n.name)U.headers.push(n);else{if(0===n.values.length)throw new Error('Invalid PEM formatted message. The "DEK-Info" header must have at least one subfield.');U.dekInfo={algorithm:u[0],parameters:u[1]||null}}else U.contentDomain=u[0]||"";else{if("Proc-Type"!==n.name)throw new Error('Invalid PEM formatted message. The first encapsulated header must be "Proc-Type".');if(2!==n.values.length)throw new Error('Invalid PEM formatted message. The "Proc-Type" header must have two subfields.');U.procType={version:u[0],type:u[1]}}}++g}if("ENCRYPTED"===U.procType&&!U.dekInfo)throw new Error('Invalid PEM formatted message. The "DEK-Info" header must be present if "Proc-Type" is "ENCRYPTED".')}}if(0===x.length)throw new Error("Invalid PEM formatted message.");return x}},18270:(re,ce,O)=>{var a=O(9185);O(96615),O(58045),O(97634);var e=re.exports=a.pkcs1=a.pkcs1||{};function i(C,m,x){x||(x=a.md.sha1.create());for(var d="",l=Math.ceil(m/x.digestLength),r=0;r<l;++r){var f=String.fromCharCode(r>>24&255,r>>16&255,r>>8&255,255&r);x.start(),x.update(C+f),d+=x.digest().getBytes()}return d.substring(0,m)}e.encode_rsa_oaep=function(C,m,x){var d,l,r,f;"string"==typeof x?(d=x,l=arguments[3]||void 0,r=arguments[4]||void 0):x&&(d=x.label||void 0,l=x.seed||void 0,r=x.md||void 0,x.mgf1&&x.mgf1.md&&(f=x.mgf1.md)),r?r.start():r=a.md.sha1.create(),f||(f=r);var I=Math.ceil(C.n.bitLength()/8),U=I-2*r.digestLength-2;if(m.length>U)throw(E=new Error("RSAES-OAEP input message length is too long.")).length=m.length,E.maxLength=U,E;d||(d=""),r.update(d,"raw");for(var g=r.digest(),T="",h=U-m.length,v=0;v<h;v++)T+="\0";var n=g.getBytes()+T+"\x01"+m;if(l){if(l.length!==r.digestLength){var E;throw(E=new Error("Invalid RSAES-OAEP seed. The seed length must match the digest length.")).seedLength=l.length,E.digestLength=r.digestLength,E}}else l=a.random.getBytes(r.digestLength);var u=i(l,I-r.digestLength-1,f),p=a.util.xorBytes(n,u,n.length),A=i(p,r.digestLength,f);return"\0"+a.util.xorBytes(l,A,l.length)+p},e.decode_rsa_oaep=function(C,m,x){var d,l,r;"string"==typeof x?(d=x,l=arguments[3]||void 0):x&&(d=x.label||void 0,l=x.md||void 0,x.mgf1&&x.mgf1.md&&(r=x.mgf1.md));var f=Math.ceil(C.n.bitLength()/8);if(m.length!==f)throw(p=new Error("RSAES-OAEP encoded message length is invalid.")).length=m.length,p.expectedLength=f,p;if(void 0===l?l=a.md.sha1.create():l.start(),r||(r=l),f<2*l.digestLength+2)throw new Error("RSAES-OAEP key is too short for the hash function.");d||(d=""),l.update(d,"raw");for(var I=l.digest().getBytes(),U=m.charAt(0),E=m.substring(1,l.digestLength+1),g=m.substring(1+l.digestLength),T=i(g,l.digestLength,r),v=i(a.util.xorBytes(E,T,E.length),f-l.digestLength-1,r),n=a.util.xorBytes(g,v,g.length),u=n.substring(0,l.digestLength),p="\0"!==U,A=0;A<l.digestLength;++A)p|=I.charAt(A)!==u.charAt(A);for(var R=1,k=l.digestLength,c=l.digestLength;c<n.length;c++){var y=n.charCodeAt(c);p|=y&(R?65534:0),k+=R&=1&y^1}if(p||1!==n.charCodeAt(k))throw new Error("Invalid RSAES-OAEP padding.");return n.substring(k+1)}},24563:(re,ce,O)=>{var a=O(9185);O(6902),O(41583),O(65853),O(69916),O(22801),O(58045),O(98563),O(97634),O(96615),O(42529);var e=a.asn1,i=a.pki,C=re.exports=a.pkcs12=a.pkcs12||{},m={name:"ContentInfo",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.contentType",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:e.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"content"}]},x={name:"PFX",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.version",tagClass:e.Class.UNIVERSAL,type:e.Type.INTEGER,constructed:!1,capture:"version"},m,{name:"PFX.macData",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"mac",value:[{name:"PFX.macData.mac",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm.algorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"macAlgorithm"},{name:"PFX.macData.mac.digestAlgorithm.parameters",tagClass:e.Class.UNIVERSAL,captureAsn1:"macAlgorithmParameters"}]},{name:"PFX.macData.mac.digest",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"macDigest"}]},{name:"PFX.macData.macSalt",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"macSalt"},{name:"PFX.macData.iterations",tagClass:e.Class.UNIVERSAL,type:e.Type.INTEGER,constructed:!1,optional:!0,capture:"macIterations"}]}]},d={name:"SafeBag",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"SafeBag.bagId",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"bagId"},{name:"SafeBag.bagValue",tagClass:e.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"bagValue"},{name:"SafeBag.bagAttributes",tagClass:e.Class.UNIVERSAL,type:e.Type.SET,constructed:!0,optional:!0,capture:"bagAttributes"}]},l={name:"Attribute",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"Attribute.attrId",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"oid"},{name:"Attribute.attrValues",tagClass:e.Class.UNIVERSAL,type:e.Type.SET,constructed:!0,capture:"values"}]},r={name:"CertBag",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"CertBag.certId",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"certId"},{name:"CertBag.certValue",tagClass:e.Class.CONTEXT_SPECIFIC,constructed:!0,value:[{name:"CertBag.certValue[0]",tagClass:e.Class.UNIVERSAL,type:e.Class.OCTETSTRING,constructed:!1,capture:"cert"}]}]};function f(h,v,n,u){for(var p=[],A=0;A<h.length;A++)for(var R=0;R<h[A].safeBags.length;R++){var k=h[A].safeBags[R];if(void 0===u||k.type===u){if(null===v){p.push(k);continue}void 0!==k.attributes[v]&&k.attributes[v].indexOf(n)>=0&&p.push(k)}}return p}function I(h){if(h.composed||h.constructed){for(var v=a.util.createBuffer(),n=0;n<h.value.length;++n)v.putBytes(h.value[n].value);h.composed=h.constructed=!1,h.value=v.getBytes()}return h}function E(h,v){var n={},u=[];if(!e.validate(h,a.pkcs7.asn1.encryptedDataValidator,n,u))throw(p=new Error("Cannot read EncryptedContentInfo.")).errors=u,p;var p,A=e.derToOid(n.contentType);if(A!==i.oids.data)throw(p=new Error("PKCS#12 EncryptedContentInfo ContentType is not Data.")).oid=A,p;A=e.derToOid(n.encAlgorithm);var R=i.pbe.getCipher(A,n.encParameter,v),k=I(n.encryptedContentAsn1),c=a.util.createBuffer(k.value);if(R.update(c),!R.finish())throw new Error("Failed to decrypt PKCS#12 SafeContents.");return R.output.getBytes()}function g(h,v,n){if(!v&&0===h.length)return[];if((h=e.fromDer(h,v)).tagClass!==e.Class.UNIVERSAL||h.type!==e.Type.SEQUENCE||!0!==h.constructed)throw new Error("PKCS#12 SafeContents expected to be a SEQUENCE OF SafeBag.");for(var u=[],p=0;p<h.value.length;p++){var R={},k=[];if(!e.validate(h.value[p],d,R,k))throw(c=new Error("Cannot read SafeBag.")).errors=k,c;var y={type:e.derToOid(R.bagId),attributes:T(R.bagAttributes)};u.push(y);var N,t,L=R.bagValue.value[0];switch(y.type){case i.oids.pkcs8ShroudedKeyBag:if(null===(L=i.decryptPrivateKeyInfo(L,n)))throw new Error("Unable to decrypt PKCS#8 ShroudedKeyBag, wrong password?");case i.oids.keyBag:try{y.key=i.privateKeyFromAsn1(L)}catch{y.key=null,y.asn1=L}continue;case i.oids.certBag:N=r,t=function(){if(e.derToOid(R.certId)!==i.oids.x509Certificate){var D=new Error("Unsupported certificate type, only X.509 supported.");throw D.oid=e.derToOid(R.certId),D}var M=e.fromDer(R.cert,v);try{y.cert=i.certificateFromAsn1(M,!0)}catch{y.cert=null,y.asn1=M}};break;default:var c;throw(c=new Error("Unsupported PKCS#12 SafeBag type.")).oid=y.type,c}if(void 0!==N&&!e.validate(L,N,R,k))throw(c=new Error("Cannot read PKCS#12 "+N.name)).errors=k,c;t()}return u}function T(h){var v={};if(void 0!==h)for(var n=0;n<h.length;++n){var u={},p=[];if(!e.validate(h[n],l,u,p)){var A=new Error("Cannot read PKCS#12 BagAttribute.");throw A.errors=p,A}var R=e.derToOid(u.oid);if(void 0!==i.oids[R]){v[i.oids[R]]=[];for(var k=0;k<u.values.length;++k)v[i.oids[R]].push(u.values[k].value)}}return v}C.pkcs12FromAsn1=function(h,v,n){"string"==typeof v?(n=v,v=!0):void 0===v&&(v=!0);var u={};if(!e.validate(h,x,u,[]))throw(A=new Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX.")).errors=A,A;var A,R={version:u.version.charCodeAt(0),safeContents:[],getBags:function(_){var X,G={};return"localKeyId"in _?X=_.localKeyId:"localKeyIdHex"in _&&(X=a.util.hexToBytes(_.localKeyIdHex)),void 0===X&&!("friendlyName"in _)&&"bagType"in _&&(G[_.bagType]=f(R.safeContents,null,null,_.bagType)),void 0!==X&&(G.localKeyId=f(R.safeContents,"localKeyId",X,_.bagType)),"friendlyName"in _&&(G.friendlyName=f(R.safeContents,"friendlyName",_.friendlyName,_.bagType)),G},getBagsByFriendlyName:function(_,G){return f(R.safeContents,"friendlyName",_,G)},getBagsByLocalKeyId:function(_,G){return f(R.safeContents,"localKeyId",_,G)}};if(3!==u.version.charCodeAt(0))throw(A=new Error("PKCS#12 PFX of version other than 3 not supported.")).version=u.version.charCodeAt(0),A;if(e.derToOid(u.contentType)!==i.oids.data)throw(A=new Error("Only PKCS#12 PFX in password integrity mode supported.")).oid=e.derToOid(u.contentType),A;var k=u.content.value[0];if(k.tagClass!==e.Class.UNIVERSAL||k.type!==e.Type.OCTETSTRING)throw new Error("PKCS#12 authSafe content data is not an OCTET STRING.");if(k=I(k),u.mac){var c=null,y=0,N=e.derToOid(u.macAlgorithm);switch(N){case i.oids.sha1:c=a.md.sha1.create(),y=20;break;case i.oids.sha256:c=a.md.sha256.create(),y=32;break;case i.oids.sha384:c=a.md.sha384.create(),y=48;break;case i.oids.sha512:c=a.md.sha512.create(),y=64;break;case i.oids.md5:c=a.md.md5.create(),y=16}if(null===c)throw new Error("PKCS#12 uses unsupported MAC algorithm: "+N);var t=new a.util.ByteBuffer(u.macSalt),L="macIterations"in u?parseInt(a.util.bytesToHex(u.macIterations),16):1,V=C.generateKey(n,t,3,L,y,c),D=a.hmac.create();if(D.start(c,V),D.update(k.value),D.getMac().getBytes()!==u.macDigest)throw new Error("PKCS#12 MAC could not be verified. Invalid password?")}return function U(h,v,n,u){if((v=e.fromDer(v,n)).tagClass!==e.Class.UNIVERSAL||v.type!==e.Type.SEQUENCE||!0!==v.constructed)throw new Error("PKCS#12 AuthenticatedSafe expected to be a SEQUENCE OF ContentInfo");for(var p=0;p<v.value.length;p++){var R={},k=[];if(!e.validate(v.value[p],m,R,k))throw(c=new Error("Cannot read ContentInfo.")).errors=k,c;var y={encrypted:!1},N=null,t=R.content.value[0];switch(e.derToOid(R.contentType)){case i.oids.data:if(t.tagClass!==e.Class.UNIVERSAL||t.type!==e.Type.OCTETSTRING)throw new Error("PKCS#12 SafeContents Data is not an OCTET STRING.");N=I(t).value;break;case i.oids.encryptedData:N=E(t,u),y.encrypted=!0;break;default:var c;throw(c=new Error("Unsupported PKCS#12 contentType.")).contentType=e.derToOid(R.contentType),c}y.safeBags=g(N,n,u),h.safeContents.push(y)}}(R,k.value,v,n),R},C.toPkcs12Asn1=function(h,v,n,u){(u=u||{}).saltSize=u.saltSize||8,u.count=u.count||2048,u.algorithm=u.algorithm||u.encAlgorithm||"aes128","useMac"in u||(u.useMac=!0),"localKeyId"in u||(u.localKeyId=null),"generateLocalKeyId"in u||(u.generateLocalKeyId=!0);var A,p=u.localKeyId;if(null!==p)p=a.util.hexToBytes(p);else if(u.generateLocalKeyId)if(v){var R=a.util.isArray(v)?v[0]:v;"string"==typeof R&&(R=i.certificateFromPem(R)),(k=a.md.sha1.create()).update(e.toDer(i.certificateToAsn1(R)).getBytes()),p=k.digest().getBytes()}else p=a.random.getBytes(20);var c=[];null!==p&&c.push(e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(i.oids.localKeyId).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.SET,!0,[e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,!1,p)])])),"friendlyName"in u&&c.push(e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(i.oids.friendlyName).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.SET,!0,[e.create(e.Class.UNIVERSAL,e.Type.BMPSTRING,!1,u.friendlyName)])])),c.length>0&&(A=e.create(e.Class.UNIVERSAL,e.Type.SET,!0,c));var y=[],N=[];null!==v&&(N=a.util.isArray(v)?v:[v]);for(var t=[],L=0;L<N.length;++L){"string"==typeof(v=N[L])&&(v=i.certificateFromPem(v));var V=0===L?A:void 0,D=i.certificateToAsn1(v),M=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(i.oids.certBag).getBytes()),e.create(e.Class.CONTEXT_SPECIFIC,0,!0,[e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(i.oids.x509Certificate).getBytes()),e.create(e.Class.CONTEXT_SPECIFIC,0,!0,[e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,!1,e.toDer(D).getBytes())])])]),V]);t.push(M)}if(t.length>0){var _=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,t),G=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(i.oids.data).getBytes()),e.create(e.Class.CONTEXT_SPECIFIC,0,!0,[e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,!1,e.toDer(_).getBytes())])]);y.push(G)}var X=null;if(null!==h){var W=i.wrapRsaPrivateKey(i.privateKeyToAsn1(h));X=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,null===n?[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(i.oids.keyBag).getBytes()),e.create(e.Class.CONTEXT_SPECIFIC,0,!0,[W]),A]:[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(i.oids.pkcs8ShroudedKeyBag).getBytes()),e.create(e.Class.CONTEXT_SPECIFIC,0,!0,[i.encryptPrivateKeyInfo(W,n,u)]),A]);var j=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[X]),te=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(i.oids.data).getBytes()),e.create(e.Class.CONTEXT_SPECIFIC,0,!0,[e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,!1,e.toDer(j).getBytes())])]);y.push(te)}var he,fe=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,y);if(u.useMac){var k=a.md.sha1.create(),pe=new a.util.ByteBuffer(a.random.getBytes(u.saltSize)),J=u.count,Ce=(h=C.generateKey(n,pe,3,J,20),a.hmac.create());Ce.start(k,h),Ce.update(e.toDer(fe).getBytes());var ie=Ce.getMac();he=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(i.oids.sha1).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.NULL,!1,"")]),e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,!1,ie.getBytes())]),e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,!1,pe.getBytes()),e.create(e.Class.UNIVERSAL,e.Type.INTEGER,!1,e.integerToDer(J).getBytes())])}return e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.INTEGER,!1,e.integerToDer(3).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(i.oids.data).getBytes()),e.create(e.Class.CONTEXT_SPECIFIC,0,!0,[e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,!1,e.toDer(fe).getBytes())])]),he])},C.generateKey=a.pbe.generatePkcs12Key},69521:(re,ce,O)=>{var a=O(9185);O(28097),O(6902),O(39857),O(65853),O(10248),O(69916),O(58045),O(96615),O(42529);var e=a.asn1,i=re.exports=a.pkcs7=a.pkcs7||{};function C(h){var v={},n=[];if(!e.validate(h,i.asn1.recipientInfoValidator,v,n)){var u=new Error("Cannot read PKCS#7 RecipientInfo. ASN.1 object is not an PKCS#7 RecipientInfo.");throw u.errors=n,u}return{version:v.version.charCodeAt(0),issuer:a.pki.RDNAttributesAsArray(v.issuer),serialNumber:a.util.createBuffer(v.serial).toHex(),encryptedContent:{algorithm:e.derToOid(v.encAlgorithm),parameter:v.encParameter?v.encParameter.value:void 0,content:v.encKey}}}function m(h){return e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.INTEGER,!1,e.integerToDer(h.version).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[a.pki.distinguishedNameToAsn1({attributes:h.issuer}),e.create(e.Class.UNIVERSAL,e.Type.INTEGER,!1,a.util.hexToBytes(h.serialNumber))]),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(h.encryptedContent.algorithm).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.NULL,!1,"")]),e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,!1,h.encryptedContent.content)])}function d(h){for(var v=[],n=0;n<h.length;++n)v.push(m(h[n]));return v}function r(h){var v=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.INTEGER,!1,e.integerToDer(h.version).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[a.pki.distinguishedNameToAsn1({attributes:h.issuer}),e.create(e.Class.UNIVERSAL,e.Type.INTEGER,!1,a.util.hexToBytes(h.serialNumber))]),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(h.digestAlgorithm).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.NULL,!1,"")])]);if(h.authenticatedAttributesAsn1&&v.value.push(h.authenticatedAttributesAsn1),v.value.push(e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(h.signatureAlgorithm).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.NULL,!1,"")])),v.value.push(e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,!1,h.signature)),h.unauthenticatedAttributes.length>0){for(var n=e.create(e.Class.CONTEXT_SPECIFIC,1,!0,[]),u=0;u<h.unauthenticatedAttributes.length;++u)n.values.push(U(h.unauthenticatedAttributes[u]));v.value.push(n)}return v}function U(h){var v;if(h.type===a.pki.oids.contentType)v=e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(h.value).getBytes());else if(h.type===a.pki.oids.messageDigest)v=e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,!1,h.value.bytes());else if(h.type===a.pki.oids.signingTime){var n=new Date("1950-01-01T00:00:00Z"),u=new Date("2050-01-01T00:00:00Z"),p=h.value;if("string"==typeof p){var A=Date.parse(p);p=isNaN(A)?13===p.length?e.utcTimeToDate(p):e.generalizedTimeToDate(p):new Date(A)}v=p>=n&&p<u?e.create(e.Class.UNIVERSAL,e.Type.UTCTIME,!1,e.dateToUtcTime(p)):e.create(e.Class.UNIVERSAL,e.Type.GENERALIZEDTIME,!1,e.dateToGeneralizedTime(p))}return e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(h.type).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.SET,!0,[v])])}function E(h){return[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(a.pki.oids.data).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(h.algorithm).getBytes()),h.parameter?e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,!1,h.parameter.getBytes()):void 0]),e.create(e.Class.CONTEXT_SPECIFIC,0,!0,[e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,!1,h.content.getBytes())])]}function g(h,v,n){var u={};if(!e.validate(v,n,u,[])){var A=new Error("Cannot read PKCS#7 message. ASN.1 object is not a supported PKCS#7 message.");throw A.errors=A,A}if(e.derToOid(u.contentType)!==a.pki.oids.data)throw new Error("Unsupported PKCS#7 message. Only wrapped ContentType Data supported.");if(u.encryptedContent){var k="";if(a.util.isArray(u.encryptedContent))for(var c=0;c<u.encryptedContent.length;++c){if(u.encryptedContent[c].type!==e.Type.OCTETSTRING)throw new Error("Malformed PKCS#7 message, expecting encrypted content constructed of only OCTET STRING objects.");k+=u.encryptedContent[c].value}else k=u.encryptedContent;h.encryptedContent={algorithm:e.derToOid(u.encAlgorithm),parameter:a.util.createBuffer(u.encParameter.value),content:a.util.createBuffer(k)}}if(u.content){if(k="",a.util.isArray(u.content))for(c=0;c<u.content.length;++c){if(u.content[c].type!==e.Type.OCTETSTRING)throw new Error("Malformed PKCS#7 message, expecting content constructed of only OCTET STRING objects.");k+=u.content[c].value}else k=u.content;h.content=a.util.createBuffer(k)}return h.version=u.version.charCodeAt(0),h.rawCapture=u,u}function T(h){if(void 0===h.encryptedContent.key)throw new Error("Symmetric key not available.");if(void 0===h.content){var v;switch(h.encryptedContent.algorithm){case a.pki.oids["aes128-CBC"]:case a.pki.oids["aes192-CBC"]:case a.pki.oids["aes256-CBC"]:v=a.aes.createDecryptionCipher(h.encryptedContent.key);break;case a.pki.oids.desCBC:case a.pki.oids["des-EDE3-CBC"]:v=a.des.createDecryptionCipher(h.encryptedContent.key);break;default:throw new Error("Unsupported symmetric cipher, OID "+h.encryptedContent.algorithm)}if(v.start(h.encryptedContent.parameter),v.update(h.encryptedContent.content),!v.finish())throw new Error("Symmetric decryption failed.");h.content=v.output}}i.messageFromPem=function(h){var v=a.pem.decode(h)[0];if("PKCS7"!==v.type){var n=new Error('Could not convert PKCS#7 message from PEM; PEM header type is not "PKCS#7".');throw n.headerType=v.type,n}if(v.procType&&"ENCRYPTED"===v.procType.type)throw new Error("Could not convert PKCS#7 message from PEM; PEM is encrypted.");var u=e.fromDer(v.body);return i.messageFromAsn1(u)},i.messageToPem=function(h,v){var n={type:"PKCS7",body:e.toDer(h.toAsn1()).getBytes()};return a.pem.encode(n,{maxline:v})},i.messageFromAsn1=function(h){var v={},n=[];if(!e.validate(h,i.asn1.contentInfoValidator,v,n)){var u=new Error("Cannot read PKCS#7 message. ASN.1 object is not an PKCS#7 ContentInfo.");throw u.errors=n,u}var A,p=e.derToOid(v.contentType);switch(p){case a.pki.oids.envelopedData:A=i.createEnvelopedData();break;case a.pki.oids.encryptedData:A=i.createEncryptedData();break;case a.pki.oids.signedData:A=i.createSignedData();break;
1default:throw new Error("Cannot read PKCS#7 message. ContentType with OID "+p+" is not (yet) supported.")}return A.fromAsn1(v.content.value[0]),A},i.createSignedData=function(){var h=null;return h={type:a.pki.oids.signedData,version:1,certificates:[],crls:[],signers:[],digestAlgorithmIdentifiers:[],contentInfo:null,signerInfos:[],fromAsn1:function(u){if(g(h,u,i.asn1.signedDataValidator),h.certificates=[],h.crls=[],h.digestAlgorithmIdentifiers=[],h.contentInfo=null,h.signerInfos=[],h.rawCapture.certificates)for(var p=h.rawCapture.certificates.value,A=0;A<p.length;++A)h.certificates.push(a.pki.certificateFromAsn1(p[A]))},toAsn1:function(){h.contentInfo||h.sign();for(var u=[],p=0;p<h.certificates.length;++p)u.push(a.pki.certificateToAsn1(h.certificates[p]));var A=[],R=e.create(e.Class.CONTEXT_SPECIFIC,0,!0,[e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.INTEGER,!1,e.integerToDer(h.version).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.SET,!0,h.digestAlgorithmIdentifiers),h.contentInfo])]);return u.length>0&&R.value[0].value.push(e.create(e.Class.CONTEXT_SPECIFIC,0,!0,u)),A.length>0&&R.value[0].value.push(e.create(e.Class.CONTEXT_SPECIFIC,1,!0,A)),R.value[0].value.push(e.create(e.Class.UNIVERSAL,e.Type.SET,!0,h.signerInfos)),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(h.type).getBytes()),R])},addSigner:function(u){var p=u.issuer,A=u.serialNumber;if(u.certificate){var R=u.certificate;"string"==typeof R&&(R=a.pki.certificateFromPem(R)),p=R.issuer.attributes,A=R.serialNumber}var k=u.key;if(!k)throw new Error("Could not add PKCS#7 signer; no private key specified.");"string"==typeof k&&(k=a.pki.privateKeyFromPem(k));var c=u.digestAlgorithm||a.pki.oids.sha1;switch(c){case a.pki.oids.sha1:case a.pki.oids.sha256:case a.pki.oids.sha384:case a.pki.oids.sha512:case a.pki.oids.md5:break;default:throw new Error("Could not add PKCS#7 signer; unknown message digest algorithm: "+c)}var y=u.authenticatedAttributes||[];if(y.length>0){for(var N=!1,t=!1,L=0;L<y.length;++L){var V=y[L];if(N||V.type!==a.pki.oids.contentType){if(t||V.type!==a.pki.oids.messageDigest);else if(t=!0,N)break}else if(N=!0,t)break}if(!N||!t)throw new Error("Invalid signer.authenticatedAttributes. If signer.authenticatedAttributes is specified, then it must contain at least two attributes, PKCS #9 content-type and PKCS #9 message-digest.")}h.signers.push({key:k,version:1,issuer:p,serialNumber:A,digestAlgorithm:c,signatureAlgorithm:a.pki.oids.rsaEncryption,signature:null,authenticatedAttributes:y,unauthenticatedAttributes:[]})},sign:function(u){var p;if(u=u||{},"object"==typeof h.content&&null!==h.contentInfo||(h.contentInfo=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(a.pki.oids.data).getBytes())]),!("content"in h))||(h.content instanceof a.util.ByteBuffer?p=h.content.bytes():"string"==typeof h.content&&(p=a.util.encodeUtf8(h.content)),u.detached?h.detachedContent=e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,!1,p):h.contentInfo.value.push(e.create(e.Class.CONTEXT_SPECIFIC,0,!0,[e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,!1,p)]))),0!==h.signers.length){var A=function v(){for(var u={},p=0;p<h.signers.length;++p){var A=h.signers[p];(R=A.digestAlgorithm)in u||(u[R]=a.md[a.pki.oids[R]].create()),A.md=0===A.authenticatedAttributes.length?u[R]:a.md[a.pki.oids[R]].create()}for(var R in h.digestAlgorithmIdentifiers=[],u)h.digestAlgorithmIdentifiers.push(e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(R).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.NULL,!1,"")]));return u}();!function n(u){var p;if(h.detachedContent?p=h.detachedContent:p=(p=h.contentInfo.value[1]).value[0],!p)throw new Error("Could not sign PKCS#7 message; there is no content to sign.");var A=e.derToOid(h.contentInfo.value[0].value),R=e.toDer(p);for(var k in R.getByte(),e.getBerValueLength(R),R=R.getBytes(),u)u[k].start().update(R);for(var c=new Date,y=0;y<h.signers.length;++y){var N=h.signers[y];if(0===N.authenticatedAttributes.length){if(A!==a.pki.oids.data)throw new Error("Invalid signer;
1 authenticatedAttributes must be present when the ContentInfo content type is not PKCS#7 Data.")}else{N.authenticatedAttributesAsn1=e.create(e.Class.CONTEXT_SPECIFIC,0,!0,[]);for(var t=e.create(e.Class.UNIVERSAL,e.Type.SET,!0,[]),L=0;L<N.authenticatedAttributes.length;++L){var V=N.authenticatedAttributes[L];V.type===a.pki.oids.messageDigest?V.value=u[N.digestAlgorithm].digest():V.type===a.pki.oids.signingTime&&(V.value||(V.value=c)),t.value.push(U(V)),N.authenticatedAttributesAsn1.value.push(U(V))}R=e.toDer(t).getBytes(),N.md.start().update(R)}N.signature=N.key.sign(N.md,"RSASSA-PKCS1-V1_5")}h.signerInfos=function I(h){for(var v=[],n=0;n<h.length;++n)v.push(r(h[n]));return v}(h.signers)}(A)}},verify:function(){throw new Error("PKCS#7 signature verification not yet implemented.")},addCertificate:function(u){"string"==typeof u&&(u=a.pki.certificateFromPem(u)),h.certificates.push(u)},addCertificateRevokationList:function(u){throw new Error("PKCS#7 CRL support not yet implemented.")}}},i.createEncryptedData=function(){var h=null;return h={type:a.pki.oids.encryptedData,version:0,encryptedContent:{algorithm:a.pki.oids["aes256-CBC"]},fromAsn1:function(v){g(h,v,i.asn1.encryptedDataValidator)},decrypt:function(v){void 0!==v&&(h.encryptedContent.key=v),T(h)}}},i.createEnvelopedData=function(){var h=null;return h={type:a.pki.oids.envelopedData,version:0,recipients:[],encryptedContent:{algorithm:a.pki.oids["aes256-CBC"]},fromAsn1:function(v){var n=g(h,v,i.asn1.envelopedDataValidator);h.recipients=function x(h){for(var v=[],n=0;n<h.length;++n)v.push(C(h[n]));return v}(n.recipientInfos.value)},toAsn1:function(){return e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(h.type).getBytes()),e.create(e.Class.CONTEXT_SPECIFIC,0,!0,[e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.INTEGER,!1,e.integerToDer(h.version).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.SET,!0,d(h.recipients)),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,E(h.encryptedContent))])])])},findRecipient:function(v){for(var n=v.issuer.attributes,u=0;u<h.recipients.length;++u){var p=h.recipients[u],A=p.issuer;if(p.serialNumber===v.serialNumber&&A.length===n.length){for(var R=!0,k=0;k<n.length;++k)if(A[k].type!==n[k].type||A[k].value!==n[k].value){R=!1;break}if(R)return p}}return null},decrypt:function(v,n){if(void 0===h.encryptedContent.key&&void 0!==v&&void 0!==n)switch(v.encryptedContent.algorithm){case a.pki.oids.rsaEncryption:case a.pki.oids.desCBC:var u=n.decrypt(v.encryptedContent.content);h.encryptedContent.key=a.util.createBuffer(u);break;default:throw new Error("Unsupported asymmetric cipher, OID "+v.encryptedContent.algorithm)}T(h)},addRecipient:function(v){h.recipients.push({version:0,issuer:v.issuer.attributes,serialNumber:v.serialNumber,encryptedContent:{algorithm:a.pki.oids.rsaEncryption,key:v.publicKey}})},encrypt:function(v,n){if(void 0===h.encryptedContent.content){var u,p,A;switch(v=v||h.encryptedContent.key,n=n||h.encryptedContent.algorithm){case a.pki.oids["aes128-CBC"]:u=16,p=16,A=a.aes.createEncryptionCipher;break;case a.pki.oids["aes192-CBC"]:u=24,p=16,A=a.aes.createEncryptionCipher;break;case a.pki.oids["aes256-CBC"]:u=32,p=16,A=a.aes.createEncryptionCipher;break;case a.pki.oids["des-EDE3-CBC"]:u=24,p=8,A=a.des.createEncryptionCipher;break;default:throw new Error("Unsupported symmetric cipher, OID "+n)}if(void 0===v)v=a.util.createBuffer(a.random.getBytes(u));else if(v.length()!=u)throw new Error("Symmetric key has wrong length; got "+v.length()+" bytes, expected "+u+".");h.encryptedContent.algorithm=n,h.encryptedContent.key=v,h.encryptedContent.parameter=a.util.createBuffer(a.random.getBytes(p));var R=A(v);if(R.start(h.encryptedContent.parameter.copy()),R.update(h.content),!R.finish())throw new Error("Symmetric encryption failed.");h.encryptedContent.content=R.output}for(var k=0;k<h.recipients.length;++k){var c=h.recipients[k];if(void 0===c.encryptedContent.content){if(c.encryptedContent.algorithm!==a.pki.oids.rsaEncryption)throw new Error("Unsupported asymmetric cipher, OID "+c.encryptedContent.algorithm);
1c.encryptedContent.content=c.encryptedContent.key.encrypt(h.encryptedContent.key.data)}}}}}},69916:(re,ce,O)=>{var a=O(9185);O(6902),O(96615);var e=a.asn1,i=re.exports=a.pkcs7asn1=a.pkcs7asn1||{};a.pkcs7=a.pkcs7||{},a.pkcs7.asn1=i;var C={name:"ContentInfo",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.ContentType",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:e.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,captureAsn1:"content"}]};i.contentInfoValidator=C;var m={name:"EncryptedContentInfo",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentType",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"contentType"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentEncryptionAlgorithm.algorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm.parameter",tagClass:e.Class.UNIVERSAL,captureAsn1:"encParameter"}]},{name:"EncryptedContentInfo.encryptedContent",tagClass:e.Class.CONTEXT_SPECIFIC,type:0,capture:"encryptedContent",captureAsn1:"encryptedContentAsn1"}]};i.envelopedDataValidator={name:"EnvelopedData",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"EnvelopedData.Version",tagClass:e.Class.UNIVERSAL,type:e.Type.INTEGER,constructed:!1,capture:"version"},{name:"EnvelopedData.RecipientInfos",tagClass:e.Class.UNIVERSAL,type:e.Type.SET,constructed:!0,captureAsn1:"recipientInfos"}].concat(m)},i.encryptedDataValidator={name:"EncryptedData",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedData.Version",tagClass:e.Class.UNIVERSAL,type:e.Type.INTEGER,constructed:!1,capture:"version"}].concat(m)},i.signedDataValidator={name:"SignedData",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"SignedData.Version",tagClass:e.Class.UNIVERSAL,type:e.Type.INTEGER,constructed:!1,capture:"version"},{name:"SignedData.DigestAlgorithms",tagClass:e.Class.UNIVERSAL,type:e.Type.SET,constructed:!0,captureAsn1:"digestAlgorithms"},C,{name:"SignedData.Certificates",tagClass:e.Class.CONTEXT_SPECIFIC,type:0,optional:!0,captureAsn1:"certificates"},{name:"SignedData.CertificateRevocationLists",tagClass:e.Class.CONTEXT_SPECIFIC,type:1,optional:!0,captureAsn1:"crls"},{name:"SignedData.SignerInfos",tagClass:e.Class.UNIVERSAL,type:e.Type.SET,capture:"signerInfos",optional:!0,value:[{name:"SignerInfo",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.version",tagClass:e.Class.UNIVERSAL,type:e.Type.INTEGER,constructed:!1},{name:"SignerInfo.issuerAndSerialNumber",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.issuerAndSerialNumber.issuer",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"SignerInfo.issuerAndSerialNumber.serialNumber",tagClass:e.Class.UNIVERSAL,type:e.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"SignerInfo.digestAlgorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.digestAlgorithm.algorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"digestAlgorithm"},{name:"SignerInfo.digestAlgorithm.parameter",tagClass:e.Class.UNIVERSAL,constructed:!1,captureAsn1:"digestParameter",optional:!0}]},{name:"SignerInfo.authenticatedAttributes",tagClass:e.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"authenticatedAttributes"},{name:"SignerInfo.digestEncryptionAlgorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,capture:"signatureAlgorithm"},{name:"SignerInfo.encryptedDigest",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"signature"},{name:"SignerInfo.unauthenticatedAttributes",tagClass:e.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,capture:"unauthenticatedAttributes"}]}]}]},i.recipientInfoValidator={name:"RecipientInfo",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.version",tagClass:e.Class.UNIVERSAL,type:e.Type.INTEGER,c
1onstructed:!1,capture:"version"},{name:"RecipientInfo.issuerAndSerial",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.issuerAndSerial.issuer",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"RecipientInfo.issuerAndSerial.serialNumber",tagClass:e.Class.UNIVERSAL,type:e.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"RecipientInfo.keyEncryptionAlgorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.keyEncryptionAlgorithm.algorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"RecipientInfo.keyEncryptionAlgorithm.parameter",tagClass:e.Class.UNIVERSAL,constructed:!1,captureAsn1:"encParameter",optional:!0}]},{name:"RecipientInfo.encryptedKey",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"encKey"}]}},18624:(re,ce,O)=>{var a=O(9185);O(6902),O(65853),O(22801),O(10248),O(34495),O(24563),O(76892),O(98563),O(96615),O(42529);var e=a.asn1,i=re.exports=a.pki=a.pki||{};i.pemToDer=function(C){var m=a.pem.decode(C)[0];if(m.procType&&"ENCRYPTED"===m.procType.type)throw new Error("Could not convert PEM to DER; PEM is encrypted.");return a.util.createBuffer(m.body)},i.privateKeyFromPem=function(C){var m=a.pem.decode(C)[0];if("PRIVATE KEY"!==m.type&&"RSA PRIVATE KEY"!==m.type){var x=new Error('Could not convert private key from PEM; PEM header type is not "PRIVATE KEY" or "RSA PRIVATE KEY".');throw x.headerType=m.type,x}if(m.procType&&"ENCRYPTED"===m.procType.type)throw new Error("Could not convert private key from PEM; PEM is encrypted.");var d=e.fromDer(m.body);return i.privateKeyFromAsn1(d)},i.privateKeyToPem=function(C,m){var x={type:"RSA PRIVATE KEY",body:e.toDer(i.privateKeyToAsn1(C)).getBytes()};return a.pem.encode(x,{maxline:m})},i.privateKeyInfoToPem=function(C,m){var x={type:"PRIVATE KEY",body:e.toDer(C).getBytes()};return a.pem.encode(x,{maxline:m})}},99447:(re,ce,O)=>{var a=O(9185);O(96615),O(2059),O(58045),function(){if(a.prime)re.exports=a.prime;else{var e=re.exports=a.prime=a.prime||{},i=a.jsbn.BigInteger,C=[6,4,2,4,2,4,6,2],m=new i(null);m.fromInt(30);var x=function(E,g){return E|g};e.generateProbablePrime=function(E,g,T){"function"==typeof g&&(T=g,g={});var h=(g=g||{}).algorithm||"PRIMEINC";"string"==typeof h&&(h={name:h}),h.options=h.options||{};var v=g.prng||a.random;if("PRIMEINC"===h.name)return function d(E,g,T,h){return"workers"in T?function f(E,g,T,h){if(typeof Worker>"u")return l(E,g,T,h);var v=I(E,g),n=T.workers,u=T.workLoad||100,p=30*u/8,A=T.workerScript||"forge/prime.worker.js";if(-1===n)return a.util.estimateCores(function(k,c){k&&(c=2),n=c-1,R()});function R(){n=Math.max(1,n);for(var k=[],c=0;c<n;++c)k[c]=new Worker(A);for(c=0;c<n;++c)k[c].addEventListener("message",t);var N=!1;function t(L){if(!N){var V=L.data;if(V.found){for(var D=0;D<k.length;++D)k[D].terminate();return N=!0,h(null,new i(V.prime,16))}v.bitLength()>E&&(v=I(E,g));var M=v.toString(16);L.target.postMessage({hex:M,workLoad:u}),v.dAddOffset(p,0)}}}R()}(E,g,T,h):l(E,g,T,h)}(E,{nextBytes:function(u){for(var p=v.getBytesSync(u.length),A=0;A<u.length;++A)u[A]=p.charCodeAt(A)}},h.options,T);throw new Error("Invalid prime generation algorithm: "+h.name)}}function l(E,g,T,h){var v=I(E,g),u=function U(E){return E<=100?27:E<=150?18:E<=200?15:E<=250?12:E<=300?9:E<=350?8:E<=400?7:E<=500?6:E<=600?5:E<=800?4:E<=1250?3:2}
1(v.bitLength());"millerRabinTests"in T&&(u=T.millerRabinTests);var p=10;"maxBlockTime"in T&&(p=T.maxBlockTime),r(v,E,g,0,u,p,h)}function r(E,g,T,h,v,n,u){var p=+new Date;do{if(E.bitLength()>g&&(E=I(g,T)),E.isProbablePrime(v))return u(null,E);E.dAddOffset(C[h++%8],0)}while(n<0||+new Date-p<n);a.util.setImmediate(function(){r(E,g,T,h,v,n,u)})}function I(E,g){var T=new i(E,g),h=E-1;return T.testBit(h)||T.bitwiseTo(i.ONE.shiftLeft(h),x,T),T.dAddOffset(31-T.mod(m).byteValue(),0),T}}()},41550:(re,ce,O)=>{var a=O(9185);O(96615);var e=null;a.util.isNodejs&&!a.options.usePureJavaScript&&!process.versions["node-webkit"]&&(e=O(25819)),(re.exports=a.prng=a.prng||{}).create=function(C){for(var m={plugin:C,key:null,seed:null,time:null,reseeds:0,generated:0,keyBytes:""},x=C.md,d=new Array(32),l=0;l<32;++l)d[l]=x.create();function f(){if(m.pools[0].messageLength>=32)return I();m.collect(m.seedFileSync(32-m.pools[0].messageLength<<5)),I()}function I(){m.reseeds=4294967295===m.reseeds?0:m.reseeds+1;var E=m.plugin.md.create();E.update(m.keyBytes);for(var g=1,T=0;T<32;++T)m.reseeds%g==0&&(E.update(m.pools[T].digest().getBytes()),m.pools[T].start()),g<<=1;m.keyBytes=E.digest().getBytes(),E.start(),E.update(m.keyBytes);var h=E.digest().getBytes();m.key=m.plugin.formatKey(m.keyBytes),m.seed=m.plugin.formatSeed(h),m.generated=0}function U(E){var g=null,T=a.util.globalScope,h=T.crypto||T.msCrypto;h&&h.getRandomValues&&(g=function(y){return h.getRandomValues(y)});var v=a.util.createBuffer();if(g)for(;v.length()<E;){var n=Math.max(1,Math.min(E-v.length(),65536)/4),u=new Uint32Array(Math.floor(n));try{g(u);for(var p=0;p<u.length;++p)v.putInt32(u[p])}catch(y){if(!(typeof QuotaExceededError<"u"&&y instanceof QuotaExceededError))throw y}}if(v.length()<E)for(var A,R,k,c=Math.floor(65536*Math.random());v.length()<E;)for(R=16807*(65535&c),R+=(32767&(A=16807*(c>>16)))<<16,c=4294967295&(R=(2147483647&(R+=A>>15))+(R>>31)),p=0;p<3;++p)k=c>>>(p<<3),k^=Math.floor(256*Math.random()),v.putByte(255&k);return v.getBytes(E)}return m.pools=d,m.pool=0,m.generate=function(E,g){if(!g)return m.generateSync(E);var T=m.plugin.cipher,h=m.plugin.increment,v=m.plugin.formatKey,n=m.plugin.formatSeed,u=a.util.createBuffer();m.key=null,function p(A){if(A)return g(A);if(u.length()>=E)return g(null,u.getBytes(E));if(m.generated>1048575&&(m.key=null),null===m.key)return a.util.nextTick(function(){!function r(E){if(m.pools[0].messageLength>=32)return I(),E();m.seedFile(32-m.pools[0].messageLength<<5,function(T,h){if(T)return E(T);m.collect(h),I(),E()})}(p)});var R=T(m.key,m.seed);m.generated+=R.length,u.putBytes(R),m.key=v(T(m.key,h(m.seed))),m.seed=n(T(m.key,m.seed)),a.util.setImmediate(p)}()},m.generateSync=function(E){var g=m.plugin.cipher,T=m.plugin.increment,h=m.plugin.formatKey,v=m.plugin.formatSeed;m.key=null;for(var n=a.util.createBuffer();n.length()<E;){m.generated>1048575&&(m.key=null),null===m.key&&f();var u=g(m.key,m.seed);m.generated+=u.length,n.putBytes(u),m.key=h(g(m.key,T(m.seed))),m.seed=v(g(m.key,m.seed))}return n.getBytes(E)},e?(m.seedFile=function(E,g){e.randomBytes(E,function(T,h){if(T)return g(T);g(null,h.toString())})},m.seedFileSync=function(E){return e.randomBytes(E).toString()}):(m.seedFile=function(E,g){try{g(null,U(E))}catch(T){g(T)}},m.seedFileSync=U),m.collect=function(E){for(var g=E.length,T=0;T<g;++T)m.pools[m.pool].update(E.substr(T,1)),m.pool=31===m.pool?0:m.pool+1},m.collectInt=function(E,g){for(var T="",h=0;h<g;h+=8)T+=String.fromCharCode(E>>h&255);m.collect(T)},m.registerWorker=function(E){E===self?m.seedFile=function(T,h){self.addEventListener("message",function v(n){var u=n.data;u.forge&&u.forge.prng&&(self.removeEventListener("message",v),h(u.forge.prng.err,u.forge.prng.bytes))}),self.postMessage({forge:{prng:{needed:T}}})}:E.addEventListener("message",function(T){var h=T.data;h.forge&&h.forge.prng&&m.seedFile(h.forge.prng.needed,function(v,n){E.postMessage({forge:{prng:{err:v,bytes:n}}})})})},m}},76892:(re,ce,O)=>{var a=O(9185);O(58045),O(96615),(re.exports=a.pss=a.pss||{}).create=function(i){3===arguments.length&&(i={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var l,C=i.md,m=i.mgf,x=C.digestLength,d=i.salt||null;if("string"==typeof d&&(d=a.util.createBuffer(d)),"saltLength"in i)l=i.saltLength;else{if(null===d)throw new Error("Salt length not specified or specific salt not given.");l=d.length()}if(null!==d&&d.length()!==l)throw new Error("Given salt length does not match length of given salt.");var r=i.prng||a.random;return{encode:function(I,U){var E,v,g=U-1,T=Math.ceil(g/8),h=I.digest().getBytes();if(T<x+l+2)throw new Error("Message is too long to encrypt.");v=null===d?r.getBytesSync(l):d.bytes();var n=new a.util.ByteBuffer;n.fillWithByte(0,8),n.putBytes(h),n.putBytes(v),C.start(),C.update(n.getBytes());var u=C.digest().getBytes(),p=new a.util.ByteBuffer;p.fillWithByte(0,T-l-x-2),p.putByte(1),p.putBytes(v);var A=p.getBytes(),R=T-x-1,k=m.generate(u,R),c="";for(E=0;E<R;
1E++)c+=String.fromCharCode(A.charCodeAt(E)^k.charCodeAt(E));var y=65280>>8*T-g&255;return(c=String.fromCharCode(c.charCodeAt(0)&~y)+c.substr(1))+u+String.fromCharCode(188)},verify:function(I,U,E){var g,T=E-1,h=Math.ceil(T/8);if(U=U.substr(-h),h<x+l+2)throw new Error("Inconsistent parameters to PSS signature verification.");if(188!==U.charCodeAt(h-1))throw new Error("Encoded message does not end in 0xBC.");var v=h-x-1,n=U.substr(0,v),u=U.substr(v,x),p=65280>>8*h-T&255;if(n.charCodeAt(0)&p)throw new Error("Bits beyond keysize not zero as expected.");var A=m.generate(u,v),R="";for(g=0;g<v;g++)R+=String.fromCharCode(n.charCodeAt(g)^A.charCodeAt(g));R=String.fromCharCode(R.charCodeAt(0)&~p)+R.substr(1);var k=h-x-l-2;for(g=0;g<k;g++)if(0!==R.charCodeAt(g))throw new Error("Leftmost octets not zero as expected");if(1!==R.charCodeAt(k))throw new Error("Inconsistent PSS signature, 0x01 marker not found");var c=R.substr(-l),y=new a.util.ByteBuffer;return y.fillWithByte(0,8),y.putBytes(I),y.putBytes(c),C.start(),C.update(y.getBytes()),u===C.digest().getBytes()}}}},58045:(re,ce,O)=>{var a=O(9185);O(28097),O(22032),O(41550),O(96615),a.random&&a.random.getBytes?re.exports=a.random:function(e){var i={},C=new Array(4),m=a.util.createBuffer();function x(){var E=a.prng.create(i);return E.getBytes=function(g,T){return E.generate(g,T)},E.getBytesSync=function(g){return E.generate(g)},E}i.formatKey=function(E){var g=a.util.createBuffer(E);return(E=new Array(4))[0]=g.getInt32(),E[1]=g.getInt32(),E[2]=g.getInt32(),E[3]=g.getInt32(),a.aes._expandKey(E,!1)},i.formatSeed=function(E){var g=a.util.createBuffer(E);return(E=new Array(4))[0]=g.getInt32(),E[1]=g.getInt32(),E[2]=g.getInt32(),E[3]=g.getInt32(),E},i.cipher=function(E,g){return a.aes._updateBlock(E,g,C,!1),m.putInt32(C[0]),m.putInt32(C[1]),m.putInt32(C[2]),m.putInt32(C[3]),m.getBytes()},i.increment=function(E){return++E[3],E},i.md=a.md.sha256;var d=x(),l=null,r=a.util.globalScope,f=r.crypto||r.msCrypto;if(f&&f.getRandomValues&&(l=function(E){return f.getRandomValues(E)}),a.options.usePureJavaScript||!a.util.isNodejs&&!l){if(typeof window>"u"||window,d.collectInt(+new Date,32),typeof navigator<"u"){var I="";for(var U in navigator)try{"string"==typeof navigator[U]&&(I+=navigator[U])}catch{}d.collect(I),I=null}e&&(e().mousemove(function(E){d.collectInt(E.clientX,16),d.collectInt(E.clientY,16)}),e().keypress(function(E){d.collectInt(E.charCode,8)}))}if(a.random)for(var U in d)a.random[U]=d[U];else a.random=d;a.random.createInstance=x,re.exports=a.random}(typeof jQuery<"u"?jQuery:null)},80282:(re,ce,O)=>{var a=O(9185);O(96615);var e=[217,120,249,196,25,221,181,237,40,233,253,121,74,160,216,157,198,126,55,131,43,118,83,142,98,76,100,136,68,139,251,162,23,154,89,245,135,179,79,19,97,69,109,141,9,129,125,50,189,143,64,235,134,183,123,11,240,149,33,34,92,107,78,130,84,214,101,147,206,96,178,28,115,86,192,20,167,140,241,220,18,117,202,31,59,190,228,209,66,61,212,48,163,60,182,38,111,191,14,218,70,105,7,87,39,242,29,155,188,148,67,3,248,17,199,246,144,239,62,231,6,195,213,47,200,102,30,215,8,232,234,222,128,82,238,247,132,170,114,172,53,77,106,42,150,26,210,113,90,21,73,116,75,159,208,94,4,24,164,236,194,224,65,110,15,81,203,204,36,145,175,80,161,244,112,57,153,124,58,133,35,184,180,122,252,2,54,91,37,85,151,49,45,93,250,152,227,138,146,174,5,223,41,16,103,108,186,201,211,0,230,207,225,158,168,44,99,22,1,63,88,226,137,169,13,56,52,27,171,51,255,176,187,72,12,95,185,177,205,46,197,243,219,71,229,165,156,119,10,166,32,104,254,127,193,173],i=[1,2,3,5],C=function(d,l){return d<<l&65535|(65535&d)>>16-l},m=function(d,l){return(65535&d)>>l|d<<16-l&65535}
vendor: 11,833 bytes, line 1
1;re.exports=a.rc2=a.rc2||{},a.rc2.expandKey=function(d,l){"string"==typeof d&&(d=a.util.createBuffer(d)),l=l||128;var g,r=d,f=d.length(),I=l,U=Math.ceil(I/8),E=255>>(7&I);for(g=f;g<128;g++)r.putByte(e[r.at(g-1)+r.at(g-f)&255]);for(r.setAt(128-U,e[r.at(128-U)&E]),g=127-U;g>=0;g--)r.setAt(g,e[r.at(g+1)^r.at(g+U)]);return r};var x=function(d,l,r){var g,T,h,v,f=!1,I=null,U=null,E=null,n=[];for(d=a.rc2.expandKey(d,l),h=0;h<64;h++)n.push(d.getInt16Le());r?(g=function(A){for(h=0;h<4;h++)A[h]+=n[v]+(A[(h+3)%4]&A[(h+2)%4])+(~A[(h+3)%4]&A[(h+1)%4]),A[h]=C(A[h],i[h]),v++},T=function(A){for(h=0;h<4;h++)A[h]+=n[63&A[(h+3)%4]]}):(g=function(A){for(h=3;h>=0;h--)A[h]=m(A[h],i[h]),A[h]-=n[v]+(A[(h+3)%4]&A[(h+2)%4])+(~A[(h+3)%4]&A[(h+1)%4]),v--},T=function(A){for(h=3;h>=0;h--)A[h]-=n[63&A[(h+3)%4]]});var u=function(A){var R=[];for(h=0;h<4;h++){var k=I.getInt16Le();null!==E&&(r?k^=E.getInt16Le():E.putInt16Le(k)),R.push(65535&k)}v=r?0:63;for(var c=0;c<A.length;c++)for(var y=0;y<A[c][0];y++)A[c][1](R);for(h=0;h<4;h++)null!==E&&(r?E.putInt16Le(R[h]):R[h]^=E.getInt16Le()),U.putInt16Le(R[h])},p=null;return p={start:function(A,R){A&&"string"==typeof A&&(A=a.util.createBuffer(A)),f=!1,I=a.util.createBuffer(),U=R||new a.util.createBuffer,E=A,p.output=U},update:function(A){for(f||I.putBuffer(A);I.length()>=8;)u([[5,g],[1,T],[6,g],[1,T],[5,g]])},finish:function(A){var R=!0;if(r)if(A)R=A(8,I,!r);else{var k=8===I.length()?8:8-I.length();I.fillWithByte(k,k)}if(R&&(f=!0,p.update()),!r&&(R=0===I.length()))if(A)R=A(8,U,!r);else{var c=U.length(),y=U.at(c-1);y>c?R=!1:U.truncate(y)}return R}}};a.rc2.startEncrypting=function(d,l,r){var f=a.rc2.createEncryptionCipher(d,128);return f.start(l,r),f},a.rc2.createEncryptionCipher=function(d,l){return x(d,l,!0)},a.rc2.startDecrypting=function(d,l,r){var f=a.rc2.createDecryptionCipher(d,128);return f.start(l,r),f},a.rc2.createDecryptionCipher=function(d,l){return x(d,l,!1)}},98563:(re,ce,O)=>{var a=O(9185);if(O(6902),O(2059),O(65853),O(18270),O(99447),O(58045),O(96615),typeof e>"u")var e=a.jsbn.BigInteger;var i=a.util.isNodejs?O(25819):null,C=a.asn1,m=a.util;a.pki=a.pki||{},re.exports=a.pki.rsa=a.rsa=a.rsa||{};var x=a.pki,d=[6,4,2,4,2,4,6,2],l={name:"PrivateKeyInfo",tagClass:C.Class.UNIVERSAL,type:C.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:C.Class.UNIVERSAL,type:C.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:C.Class.UNIVERSAL,type:C.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:C.Class.UNIVERSAL,type:C.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:C.Class.UNIVERSAL,type:C.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},r={name:"RSAPrivateKey",tagClass:C.Class.UNIVERSAL,type:C.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:C.Class.UNIVERSAL,type:C.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",tagClass:C.Class.UNIVERSAL,type:C.Type.INTEGER,constructed:!1,capture:"privateKeyModulus"},{name:"RSAPrivateKey.publicExponent",tagClass:C.Class.UNIVERSAL,type:C.Type.INTEGER,constructed:!1,capture:"privateKeyPublicExponent"},{name:"RSAPrivateKey.privateExponent",tagClass:C.Class.UNIVERSAL,type:C.Type.INTEGER,constructed:!1,capture:"privateKeyPrivateExponent"},{name:"RSAPrivateKey.prime1",tagClass:C.Class.UNIVERSAL,type:C.Type.INTEGER,constructed:!1,capture:"privateKeyPrime1"},{name:"RSAPrivateKey.prime2",tagClass:C.Class.UNIVERSAL,type:C.Type.INTEGER,constructed:!1,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",tagClass:C.Class.UNIVERSAL,type:C.Type.INTEGER,constructed:!1,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",tagClass:C.Class.UNIVERSAL,type:C.Type.INTEGER,constructed:!1,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",tagClass:C.Class.UNIVERSAL,type:C.Type.INTEGER,constructed:!1,capture:"privateKeyCoefficient"}]},f={name:"RSAPublicKey",tagClass:C.Class.UNIVERSAL,type:C.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPublicKey.modulus",tagClass:C.Class.UNIVERSAL,type:C.Type.INTEGER,constructed:!1,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",tagClass:C.Class.UNIVERSAL,type:C.Type.INTEGER,constructed:!1,capture:"publicKeyExponent"}]},I=a.pki.rsa.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:C.Class.UNIVERSAL,type:C.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:C.Class.UNIVERSAL,type:C.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:C.Class.UNIVERSAL,type:C.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:C.Class.UNIVERSAL,type:C.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:C.Class.UNIVERSAL,type:C.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},U={name:"DigestInfo",tagClass:C.Class.UNIVERSAL,type:C.Type.SEQUENCE,constructed:!0,value:[{name:"DigestInfo.DigestAlgorithm",tagClass:C.Class.UNIVERSAL,type:C.Type.SEQUENCE,constructed:!0,value:[{name:"DigestInfo.DigestAlgorithm.algorithmIdentifier",tagClass:C.Class.UNIVERSAL,type:C.Type.OID,constructed:!1,capture:"algorithmIdentifier"},{name:"DigestInfo.DigestAlgorithm.parameters",tagClass:C.Class.UNIVERSAL,type:C.Type.NULL,capture:"parameters",optional:!0,constructed:!1}]},{name:"DigestInfo.digest",tagClass:C.Class.UNIVERSAL,type:C.Type.OCTETSTRING,constructed:!1,capture:"digest"}]},E=function(t){if(!(t.algorithm in x.oids)){var V=new Error("Unknown message digest algorithm.");throw V.algorithm=t.algorithm,V}var D=C.oidToDer(x.oids[t.algorithm]).getBytes(),M=C.create(C.Class.UNIVERSAL,C.Type.SEQUENCE,!0,[]),_=C.create(C.Class.UNIVERSAL,C.Type.SEQUENCE,!0,[]);_.value.push(C.create(C.Class.UNIVERSAL,C.Type.OID,!1,D)),_.value.push(C.create(C.Class.UNIVERSAL,C.Type.NULL,!1,""));var G=C.create(C.Class.UNIVERSAL,C.Type.OCTETSTRING,!1,t.digest().getBytes());return M.value.push(_),M.value.push(G),C.toDer(M).getBytes()},g=function(t,L,V){if(V)return t.modPow(L.e,L.n);if(!L.p||!L.q)return t.modPow(L.d,L.n);var D;L.dP||(L.dP=L.d.mod(L.p.subtract(e.ONE))),L.dQ||(L.dQ=L.d.mod(L.q.subtract(e.ONE))),L.qInv||(L.qInv=L.q.modInverse(L.p));do{D=new e(a.util.bytesToHex(a.random.getBytes(L.n.bitLength()/8)),16)}while(D.compareTo(L.n)>=0||!D.gcd(L.n).equals(e.ONE));for(var M=(t=t.multiply(D.modPow(L.e,L.n)).mod(L.n)).mod(L.p).modPow(L.dP,L.p),_=t.mod(L.q).modPow(L.dQ,L.q);M.compareTo(_)<0;)M=M.add(L.p);var G=M.subtract(_).multiply(L.qInv).mod(L.p).multiply(L.q).add(_);return G.multiply(D.modInverse(L.n)).mod(L.n)};function T(t,L,V){var D=a.util.createBuffer(),M=Math.ceil(L.n.bitLength()/8);if(t.length>M-11){var _=new Error("Message is too long for PKCS#1 v1.5 padding.");throw _.length=t.length,_.max=M-11,_}D.putByte(0),D.putByte(V);var X,G=M-3-t.length;if(0===V||1===V){X=0===V?0:255;for(var W=0;W<G;++W)D.putByte(X)}else for(;G>0;){var j=0,te=a.random.getBytes(G);for(W=0;W<G;++W)0===(X=te.charCodeAt(W))?++j:D.putByte(X);G=j}return D.putByte(0),D.putBytes(t),D}function h(t,L,V,D){var M=Math.ceil(L.n.bitLength()/8),_=a.util.createBuffer(t),G=_.getByte(),X=_.getByte();if(0!==G||V&&0!==X&&1!==X||!V&&2!=X||V&&0===X&&typeof D>"u")throw new Error("Encryption block is invalid.");var W=0;if(0===X){W=M-3-D;for(var j=0;j<W;++j)if(0!==_.getByte())throw new Error("Encryption block is invalid.")}else if(1===X)for(W=0;_.length()>1;){if(255!==_.getByte()){--_.read;break}++W}else if(2===X)for(W=0;_.length()>1;){if(0===_.getByte()){--_.read;break}++W}if(0!==_.getByte()||W!==M-3-_.length())throw new Error("Encryption block is invalid.");return _.getBytes()}function n(t){var L=t.toString(16);L[0]>="8"&&(L="00"+L);var V=a.util.hexToBytes(L);return V.length>1&&(0===V.charCodeAt(0)&&!(128&V.charCodeAt(1))||255===V.charCodeAt(0)&&128==(128&V.charCodeAt(1)))?V.substr(1):V}function u(t){return t<=100?27:t<=150?18:t<=200?15:t<=250?12:t<=300?9:t<=350?8:t<=400?7:t<=500?6:t<=600?5:t<=800?4:t<=1250?3:2}function p(t){return a.util.isNodejs&&"function"==typeof i[t]}function A(t){return typeof m.globalScope<"u"&&"object"==typeof m.globalScope.crypto&&"object"==typeof m.globalScope.crypto.subtle&&"function"==typeof m.globalScope.crypto.subtle[t]}function R(t){return typeof m.globalScope<"u"&&"object"==typeof m.globalScope.msCrypto&&"object"==typeof m.globalScope.msCrypto.subtle&&"function"==typeof m.globalScope.msCrypto.subtle[t]}function k(t){for(var L=a.util.hexToBytes(t.toString(16)),V=new Uint8Array(L.length),D=0;D<L.length;++D)V[D]=L.charCodeAt(D);return V}x.rsa.encrypt=function(t,L,V){var M,D=V,_=Math.ceil(L.n.bitLength()/8);!1!==V&&!0!==V?(D=2===V,M=T(t,L,V)):(M=a.util.createBuffer()).putBytes(t);for(var G=new e(M.toHex(),16),W=g(G,L,D).toString(16),j=a.util.createBuffer(),te=_-Math.ceil(W.length/2);te>0;)j.putByte(0),--te;return j.putBytes(a.util.hexToBytes(W)),j.getBytes()},x.rsa.decrypt=function(t,L,V,D){var M=Math.ceil(L.n.bitLength()/8);if(t.length!==M){var _=new Error("Encrypted message length is invalid.");throw _.length=t.length,_.expected=M,_}var G=new e(a.util.createBuffer(t).toHex(),16);if(G.compareTo(L.n)>=0)throw new Error("Encrypted message is invalid.");for(var W=g(G,L,V).toString(16),j=a.util.createBuffer(),te=M-Math.ceil(W.length/2);te>0;)j.putByte(0),--te;return j.putBytes(a.util.hexToBytes(W)),!1!==D?h(j.getBytes(),L,V):j.getBytes()},x.rsa.createKeyPairGenerationState=function(t,L,V){"string"==typeof t&&(t=parseInt(t,10)),t=t||2048;var G,D=(V=V||{}).prng||a.random,M={nextBytes:function(X){for(var W=D.getBytesSync(X.length),j=0;j<X.length;++j)X[j]=W.charCodeAt(j)}},_=V.algorithm||"PRIMEINC";if("PRIMEINC"!==_)throw new Error("Invalid key generation algorithm: "+_);return(G={algorithm:_,state:0,bits:t,rng:M,eInt:L||65537,e:new e(null),p:null,q:null,qBits:t>>1,pBits:t-(t>>1),pqState:0,num:null,keys:null}).e.fromInt(G.eInt),G},x.rsa.stepKeyPairGenerationState=function(t,L){"algorithm"in t||(t.algorithm="PRIMEINC");var V=new e(null);V.fromInt(30);for(var G,D=0,M=function(fe,he){return fe|he},_=+new Date,X=0;null===t.keys&&(L<=0||X<L);){if(0===t.state){var W=null===t.p?t.pBits:t.qBits,j=W-1;0===t.pqState?(t.num=new e(W,t.rng),t.num.testBit(j)||t.num.bitwiseTo(e.ONE.shiftLeft(j),M,t.num),t.num.dAddOffset(31-t.num.mod(V).byteValue(),0),D=0,++t.pqState):1===t.pqState?t.num.bitLength()>W?t.pqState=0:t.num.isProbablePrime(u(t.num.bitLength()))?++t.pqState:t.num.dAddOffset(d[D++%8],0):2===t.pqState?t.pqState=0===t.num.subtract(e.ONE).gcd(t.e).compareTo(e.ONE)?3:0:3===t.pqState&&(t.pqState=0,null===t.p?t.p=t.num:t.q=t.num,null!==t.p&&null!==t.q&&++t.state,t.num=null)}else if(1===t.state)t.p.compareTo(t.q)<0&&(t.num=t.p,t.p=t.q,t.q=t.num),++t.state;else if(2===t.state)t.p1=t.p.subtract(e.ONE),t.q1=t.q.subtract(e.ONE),t.phi=t.p1.multiply(t.q1),++t.state;else if(3===t.state)0===t.phi.gcd(t.e).compareTo(e.ONE)?++t.state:(t.p=null,t.q=null,t.state=0);else if(4===t.state)t.n=t.p.multiply(t.q),t.n.bitLength()===t.bits?++t.state:(t.q=null,t.state=0);else if(5===t.state){var te=t.e.modInverse(t.phi);t.keys={privateKey:x.rsa.setPrivateKey(t.n,t.e,te,t.p,t.q,te.mod(t.p1),te.mod(t.q1),t.q.modInverse(t.p)),publicKey:x.rsa.setPublicKey(t.n,t.e)}}X+=(G=+new Date)-_,_=G}return null!==t.keys},x.rsa.generateKeyPair=function(t,L,V,D){if(1===arguments.length?"object"==typeof t?(V=t,t=void 0):"function"==typeof t&&(D=t,t=void 0):2===arguments.length?"number"==typeof t?"function"==typeof L?(D=L,L=void 0):"number"!=typeof L&&(V=L,L=void 0):(V=t,D=L,t=void 0,L=void 0):3===arguments.length&&("number"==typeof L?"function"==typeof V&&(D=V,V=void 0):(D=V,V=L,L=void 0)),V=V||{},void 0===t&&(t=V.bits||2048),void 0===L&&(L=V.e||65537),!a.options.usePureJavaScript&&!V.prng&&t>
1=256&&t<=16384&&(65537===L||3===L))if(D){if(p("generateKeyPair"))return i.generateKeyPair("rsa",{modulusLength:t,publicExponent:L,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}},function(X,W,j){if(X)return D(X);D(null,{privateKey:x.privateKeyFromPem(j),publicKey:x.publicKeyFromPem(W)})});if(A("generateKey")&&A("exportKey"))return m.globalScope.crypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:t,publicExponent:k(L),hash:{name:"SHA-256"}},!0,["sign","verify"]).then(function(X){return m.globalScope.crypto.subtle.exportKey("pkcs8",X.privateKey)}).then(void 0,function(X){D(X)}).then(function(X){if(X){var W=x.privateKeyFromAsn1(C.fromDer(a.util.createBuffer(X)));D(null,{privateKey:W,publicKey:x.setRsaPublicKey(W.n,W.e)})}});if(R("generateKey")&&R("exportKey")){var M=m.globalScope.msCrypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:t,publicExponent:k(L),hash:{name:"SHA-256"}},!0,["sign","verify"]);return M.oncomplete=function(X){var j=m.globalScope.msCrypto.subtle.exportKey("pkcs8",X.target.result.privateKey);j.oncomplete=function(te){var he=x.privateKeyFromAsn1(C.fromDer(a.util.createBuffer(te.target.result)));D(null,{privateKey:he,publicKey:x.setRsaPublicKey(he.n,he.e)})},j.onerror=function(te){D(te)}},void(M.onerror=function(X){D(X)})}}else if(p("generateKeyPairSync")){var _=i.generateKeyPairSync("rsa",{modulusLength:t,publicExponent:L,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}});return{privateKey:x.privateKeyFromPem(_.privateKey),publicKey:x.publicKeyFromPem(_.publicKey)}}var G=x.rsa.createKeyPairGenerationState(t,L,V);if(!D)return x.rsa.stepKeyPairGenerationState(G,0),G.keys;!function v(t,L,V){"function"==typeof L&&(V=L,L={});var D={algorithm:{name:(L=L||{}).algorithm||"PRIMEINC",options:{workers:L.workers||2,workLoad:L.workLoad||100,workerScript:L.workerScript}}};function M(){_(t.pBits,function(X,W){return X?V(X):(t.p=W,null!==t.q?G(X,t.q):void _(t.qBits,G))})}function _(X,W){a.prime.generateProbablePrime(X,D,W)}function G(X,W){if(X)return V(X);if(t.q=W,t.p.compareTo(t.q)<0){var j=t.p;t.p=t.q,t.q=j}if(0!==t.p.subtract(e.ONE).gcd(t.e).compareTo(e.ONE))return t.p=null,void M();if(0!==t.q.subtract(e.ONE).gcd(t.e).compareTo(e.ONE))return t.q=null,void _(t.qBits,G);if(t.p1=t.p.subtract(e.ONE),t.q1=t.q.subtract(e.ONE),t.phi=t.p1.multiply(t.q1),0!==t.phi.gcd(t.e).compareTo(e.ONE))return t.p=t.q=null,void M();if(t.n=t.p.multiply(t.q),t.n.bitLength()!==t.bits)return t.q=null,void _(t.qBits,G);var te=t.e.modInverse(t.phi);t.keys={privateKey:x.rsa.setPrivateKey(t.n,t.e,te,t.p,t.q,te.mod(t.p1),te.mod(t.q1),t.q.modInverse(t.p)),publicKey:x.rsa.setPublicKey(t.n,t.e)},V(null,t.keys)}"prng"in L&&(D.prng=L.prng),M()}(G,V,D)},x.setRsaPublicKey=x.rsa.setPublicKey=function(t,L){var V={n:t,e:L,encrypt:function(D,M,_){if("string"==typeof M?M=M.toUpperCase():void 0===M&&(M="RSAES-PKCS1-V1_5"),"RSAES-PKCS1-V1_5"===M)M={encode:function(X,W,j){return T(X,W,2).getBytes()}};else if("RSA-OAEP"===M||"RSAES-OAEP"===M)M={encode:function(X,W){return a.pkcs1.encode_rsa_oaep(W,X,_)}};else if(-1!==["RAW","NONE","NULL",null].indexOf(M))M={encode:function(X){return X}};else if("string"==typeof M)throw new Error('Unsupported encryption scheme: "'+M+'".');var G=M.encode(D,V,!0);return x.rsa.encrypt(G,V,!0)},verify:function(D,M,_,G){"string"==typeof _?_=_.toUpperCase():void 0===_&&(_="RSASSA-PKCS1-V1_5"),void 0===G&&(G={_parseAllDigestBytes:!0}),"_parseAllDigestBytes"in G||(G._parseAllDigestBytes=!0),"RSASSA-PKCS1-V1_5"===_?_={verify:function(W,j){j=h(j,V,!0);var te=C.fromDer(j,{parseAllBytes:G._parseAllDigestBytes}),fe={},he=[];if(!C.validate(te,U,fe,he))throw(pe=new Error("ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 DigestInfo value.")).errors=he,pe;var pe,J=C.derToOid(fe.algorithmIdentifier);if(J!==a.oids.md2&&J!==a.oids.md5&&J!==a.oids.sha1&&J!==a.oids.sha224&&J!==a.oids.sha256&&J!==a.oids.sha384&&J!==a.oids.sha512&&J!==a.oids["sha512-224"]&&J!==a.oids["sha512-256"])throw(pe=new Error("Unknown RSASSA-PKCS1-v1_5 DigestAlgorithm identifier.")).oid=J,pe;if((J===a.oids.md2||J===a.oids.md5)&&!("parameters"in fe))throw new Error("ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 DigestInfo value. Missing algorithm identifer NULL parameters.");return W===fe.digest}}:("NONE"===_||"NULL"===_||null===_)&&(_={verify:function(W,j){return W===h(j,V,!0)}});var X=x.rsa.decrypt(M,V,!0,!1);return _.verify(D,X,V.n.bitLength())}};return V},x.setRsaPrivateKey=x.rsa.setPrivateKey=function(t,L,V,D,M,_,G,X){var W={n:t,e:L,d:V,p:D,q:M,dP:_,dQ:G,qInv:X,decrypt:function(j,te,fe){"string"==typeof te?te=te.toUpperCase():void 0===te&&(te="RSAES-PKCS1-V1_5");var he=x.rsa.decrypt(j,W,!1,!1);if("RSAES-PKCS1-V1_5"===te)te={decode:h};else if("RSA-OAEP"===te||"RSAES-OAEP"===te)te={decode:function(pe,J){return a.pkcs1.decode_rsa_oaep(J,pe,fe)}};else{if(-1===["RAW","NONE","NULL",null].indexOf(te))throw new Error('Unsupported encryption scheme: "'+te+'".');te={decode:function(pe){return pe}}}return te.decode(he,W,!1)},sign:function(j,te){var fe=!1;"string"==typeof te&&(te=te.toUpperCase()),void 0===te||"RSASSA-PKCS1-V1_5"===te?(te={encode:E},fe=1):("NONE"===te||"NULL"===te||null===te)&&(te={encode:function(){return j}},fe=1);var he=te.encode(j,W.n.bitLength());
1return x.rsa.encrypt(he,W,fe)}};return W},x.wrapRsaPrivateKey=function(t){return C.create(C.Class.UNIVERSAL,C.Type.SEQUENCE,!0,[C.create(C.Class.UNIVERSAL,C.Type.INTEGER,!1,C.integerToDer(0).getBytes()),C.create(C.Class.UNIVERSAL,C.Type.SEQUENCE,!0,[C.create(C.Class.UNIVERSAL,C.Type.OID,!1,C.oidToDer(x.oids.rsaEncryption).getBytes()),C.create(C.Class.UNIVERSAL,C.Type.NULL,!1,"")]),C.create(C.Class.UNIVERSAL,C.Type.OCTETSTRING,!1,C.toDer(t).getBytes())])},x.privateKeyFromAsn1=function(t){var M,_,G,X,W,j,te,fe,L={},V=[];if(C.validate(t,l,L,V)&&(t=C.fromDer(a.util.createBuffer(L.privateKey))),!C.validate(t,r,L={},V=[])){var D=new Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey.");throw D.errors=V,D}return M=a.util.createBuffer(L.privateKeyModulus).toHex(),_=a.util.createBuffer(L.privateKeyPublicExponent).toHex(),G=a.util.createBuffer(L.privateKeyPrivateExponent).toHex(),X=a.util.createBuffer(L.privateKeyPrime1).toHex(),W=a.util.createBuffer(L.privateKeyPrime2).toHex(),j=a.util.createBuffer(L.privateKeyExponent1).toHex(),te=a.util.createBuffer(L.privateKeyExponent2).toHex(),fe=a.util.createBuffer(L.privateKeyCoefficient).toHex(),x.setRsaPrivateKey(new e(M,16),new e(_,16),new e(G,16),new e(X,16),new e(W,16),new e(j,16),new e(te,16),new e(fe,16))},x.privateKeyToAsn1=x.privateKeyToRSAPrivateKey=function(t){return C.create(C.Class.UNIVERSAL,C.Type.SEQUENCE,!0,[C.create(C.Class.UNIVERSAL,C.Type.INTEGER,!1,C.integerToDer(0).getBytes()),C.create(C.Class.UNIVERSAL,C.Type.INTEGER,!1,n(t.n)),C.create(C.Class.UNIVERSAL,C.Type.INTEGER,!1,n(t.e)),C.create(C.Class.UNIVERSAL,C.Type.INTEGER,!1,n(t.d)),C.create(C.Class.UNIVERSAL,C.Type.INTEGER,!1,n(t.p)),C.create(C.Class.UNIVERSAL,C.Type.INTEGER,!1,n(t.q)),C.create(C.Class.UNIVERSAL,C.Type.INTEGER,!1,n(t.dP)),C.create(C.Class.UNIVERSAL,C.Type.INTEGER,!1,n(t.dQ)),C.create(C.Class.UNIVERSAL,C.Type.INTEGER,!1,n(t.qInv))])},x.publicKeyFromAsn1=function(t){var L={},V=[];if(C.validate(t,I,L,V)){var M,D=C.derToOid(L.publicKeyOid);if(D!==x.oids.rsaEncryption)throw(M=new Error("Cannot read public key. Unknown OID.")).oid=D,M;t=L.rsaPublicKey}if(!C.validate(t,f,L,V=[]))throw(M=new Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey.")).errors=V,M;var _=a.util.createBuffer(L.publicKeyModulus).toHex(),G=a.util.createBuffer(L.publicKeyExponent).toHex();return x.setRsaPublicKey(new e(_,16),new e(G,16))},x.publicKeyToAsn1=x.publicKeyToSubjectPublicKeyInfo=function(t){return C.create(C.Class.UNIVERSAL,C.Type.SEQUENCE,!0,[C.create(C.Class.UNIVERSAL,C.Type.SEQUENCE,!0,[C.create(C.Class.UNIVERSAL,C.Type.OID,!1,C.oidToDer(x.oids.rsaEncryption).getBytes()),C.create(C.Class.UNIVERSAL,C.Type.NULL,!1,"")]),C.create(C.Class.UNIVERSAL,C.Type.BITSTRING,!1,[x.publicKeyToRSAPublicKey(t)])])},x.publicKeyToRSAPublicKey=function(t){return C.create(C.Class.UNIVERSAL,C.Type.SEQUENCE,!0,[C.create(C.Class.UNIVERSAL,C.Type.INTEGER,!1,n(t.n)),C.create(C.Class.UNIVERSAL,C.Type.INTEGER,!1,n(t.e))])}},97634:(re,ce,O)=>{var a=O(9185);O(91501),O(96615);var e=re.exports=a.sha1=a.sha1||{};a.md.sha1=a.md.algorithms.sha1=e,e.create=function(){C||function m(){i=String.fromCharCode(128),i+=a.util.fillString(String.fromCharCode(0),64),C=!0}();var d=null,l=a.util.createBuffer(),r=new Array(80),f={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){f.messageLength=0,f.fullMessageLength=f.messageLength64=[];for(var I=f.messageLengthSize/4,U=0;U<I;++U)f.fullMessageLength.push(0);return l=a.util.createBuffer(),d={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878,h4:3285377520},f}};return f.start(),f.update=function(I,U){"utf8"===U&&(I=a.util.encodeUtf8(I));var E=I.length;f.messageLength+=E,E=[E/4294967296>>>0,E>>>0];for(var g=f.fullMessageLength.length-1;g>=0;--g)f.fullMessageLength[g]+=E[1],E[1]=E[0]+(f.fullMessageLength[g]/4294967296>>>0),f.fullMessageLength[g]=f.fullMessageLength[g]>>>0,E[0]=E[1]/4294967296>>>0;return l.putBytes(I),x(d,r,l),(l.read>2048||0===l.length())&&l.compact(),f},f.digest=function(){var I=a.util.createBuffer();I.putBytes(l.bytes()),I.putBytes(i.substr(0,f.blockLength-(f.fullMessageLength[f.fullMessageLength.length-1]+f.messageLengthSize&f.blockLength-1)));for(var g,h=8*f.fullMessageLength[0],v=0;v<f.fullMessageLength.length-1;++v)I.putInt32((h+=(g=8*f.fullMessageLength[v+1])/4294967296>>>0)>>>0),h=g>>>0;I.putInt32(h);var n={h0:d.h0,h1:d.h1,h2:d.h2,h3:d.h3,h4:d.h4};x(n,r,I);var u=a.util.createBuffer();return u.putInt32(n.h0),u.putInt32(n.h1),u.putInt32(n.h2),u.putInt32(n.h3),u.putInt32(n.h4),u},f};var i=null,C=!1;function x(d,l,r){for(var f,I,U,E,g,T,v,n=r.length();n>=64;){for(I=d.h0,U=d.h1,E=d.h2,g=d.h3,T=d.h4,v=0;v<16;++v)f=r.getInt32(),l[v]=f,f=(I<<5|I>>>27)+(g^U&(E^g))+T+1518500249+f,T=g,g=E,E=(U<<30|U>>>2)>>>0,U=I,I=f;
1for(;v<20;++v)l[v]=f=(f=l[v-3]^l[v-8]^l[v-14]^l[v-16])<<1|f>>>31,f=(I<<5|I>>>27)+(g^U&(E^g))+T+1518500249+f,T=g,g=E,E=(U<<30|U>>>2)>>>0,U=I,I=f;for(;v<32;++v)l[v]=f=(f=l[v-3]^l[v-8]^l[v-14]^l[v-16])<<1|f>>>31,f=(I<<5|I>>>27)+(U^E^g)+T+1859775393+f,T=g,g=E,E=(U<<30|U>>>2)>>>0,U=I,I=f;for(;v<40;++v)l[v]=f=(f=l[v-6]^l[v-16]^l[v-28]^l[v-32])<<2|f>>>30,f=(I<<5|I>>>27)+(U^E^g)+T+1859775393+f,T=g,g=E,E=(U<<30|U>>>2)>>>0,U=I,I=f;for(;v<60;++v)l[v]=f=(f=l[v-6]^l[v-16]^l[v-28]^l[v-32])<<2|f>>>30,f=(I<<5|I>>>27)+(U&E|g&(U^E))+T+2400959708+f,T=g,g=E,E=(U<<30|U>>>2)>>>0,U=I,I=f;for(;v<80;++v)l[v]=f=(f=l[v-6]^l[v-16]^l[v-28]^l[v-32])<<2|f>>>30,f=(I<<5|I>>>27)+(U^E^g)+T+3395469782+f,T=g,g=E,E=(U<<30|U>>>2)>>>0,U=I,I=f;d.h0=d.h0+I|0,d.h1=d.h1+U|0,d.h2=d.h2+E|0,d.h3=d.h3+g|0,d.h4=d.h4+T|0,n-=64}}},22032:(re,ce,O)=>{var a=O(9185);O(91501),O(96615);var e=re.exports=a.sha256=a.sha256||{};a.md.sha256=a.md.algorithms.sha256=e,e.create=function(){C||function x(){i=String.fromCharCode(128),i+=a.util.fillString(String.fromCharCode(0),64),m=[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],C=!0}();var l=null,r=a.util.createBuffer(),f=new Array(64),I={algorithm:"sha256",blockLength:64,digestLength:32,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){I.messageLength=0,I.fullMessageLength=I.messageLength64=[];for(var U=I.messageLengthSize/4,E=0;E<U;++E)I.fullMessageLength.push(0);return r=a.util.createBuffer(),l={h0:1779033703,h1:3144134277,h2:1013904242,h3:2773480762,h4:1359893119,h5:2600822924,h6:528734635,h7:1541459225},I}};return I.start(),I.update=function(U,E){"utf8"===E&&(U=a.util.encodeUtf8(U));var g=U.length;I.messageLength+=g,g=[g/4294967296>>>0,g>>>0];for(var T=I.fullMessageLength.length-1;T>=0;--T)I.fullMessageLength[T]+=g[1],g[1]=g[0]+(I.fullMessageLength[T]/4294967296>>>0),I.fullMessageLength[T]=I.fullMessageLength[T]>>>0,g[0]=g[1]/4294967296>>>0;return r.putBytes(U),d(l,f,r),(r.read>2048||0===r.length())&&r.compact(),I},I.digest=function(){var U=a.util.createBuffer();U.putBytes(r.bytes()),U.putBytes(i.substr(0,I.blockLength-(I.fullMessageLength[I.fullMessageLength.length-1]+I.messageLengthSize&I.blockLength-1)));for(var T,v=8*I.fullMessageLength[0],n=0;n<I.fullMessageLength.length-1;++n)U.putInt32((v+=(T=8*I.fullMessageLength[n+1])/4294967296>>>0)>>>0),v=T>>>0;U.putInt32(v);var u={h0:l.h0,h1:l.h1,h2:l.h2,h3:l.h3,h4:l.h4,h5:l.h5,h6:l.h6,h7:l.h7};d(u,f,U);var p=a.util.createBuffer();return p.putInt32(u.h0),p.putInt32(u.h1),p.putInt32(u.h2),p.putInt32(u.h3),p.putInt32(u.h4),p.putInt32(u.h5),p.putInt32(u.h6),p.putInt32(u.h7),p},I};var i=null,C=!1,m=null;function d(l,r,f){for(var I,U,h,v,n,u,p,A,R,k,c,y,N=f.length();N>=64;){for(v=0;v<16;++v)r[v]=f.getInt32();for(;v<64;++v)r[v]=(I=((I=r[v-2])>>>17|I<<15)^(I>>>19|I<<13)^I>>>10)+r[v-7]+(U=((U=r[v-15])>>>7|U<<25)^(U>>>18|U<<14)^U>>>3)+r[v-16]|0;for(n=l.h0,u=l.h1,p=l.h2,A=l.h3,R=l.h4,k=l.h5,c=l.h6,y=l.h7,v=0;v<64;++v)h=n&u|p&(n^u),I=y+((R>>>6|R<<26)^(R>>>11|R<<21)^(R>>>25|R<<7))+(c^R&(k^c))+m[v]+r[v],y=c,c=k,k=R,R=A+I>>>0,A=p,p=u,u=n,n=I+(U=((n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10))+h)>>>0;l.h0=l.h0+n|0,l.h1=l.h1+u|0,l.h2=l.h2+p|0,l.h3=l.h3+A|0,l.h4=l.h4+R|0,l.h5=l.h5+k|0,l.h6=l.h6+c|0,l.h7=l.h7+y|0,N-=64}}},78325:(re,ce,O)=>{var a=O(9185);O(91501),O(96615);var e=re.exports=a.sha512=a.sha512||{};a.md.sha512=a.md.algorithms.sha512=e;var i=a.sha384=a.sha512.sha384=a.sha512.sha384||{};i.create=function(){return e.create("SHA-384")},a.md.sha384=a.md.algorithms.sha384=i,a.sha512.sha256=a.sha512.sha256||{create:function(){return e.create("SHA-512/256")}},a.md["sha512/256"]=a.md.algorithms["sha512/256"]=a.sha512.sha256,a.sha512.sha224=a.sha512.sha224||{create:function(){return e.create("SHA-512/224")}},a.md["sha512/224"]=a.md.algorithms["sha512/224"]=a.sha512.sha224,e.create=function(f){if(m||function l(){C=String.fromCharCode(128),C+=a.util.fillString(String.fromCharCode(0),128),x=[[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]],(d={})["SHA-512"]=[[1779033703,4089235720],[3144134277,2227873595],[1013904242,4271175723],[2773480762,1595750129],[1359893119,2917565137],[2600822924,725511199],[528734635,4215389547],[1541459225,327033209]],d["SHA-384"]=[[3418070365,3238371032],[1654270250,914150663],[2438529370,812702999],[355462360,4144912697],[1731405415,4290775857],[2394180231,1750603025],[3675008525,1694076839],[1203062813,3204075428]],d["SHA-512/256"]=[[573645204,4230739756],[2673172387,3360449730],[596883563,1867755857],[2520282905,1497426621],[2519219938,28279439
107],[3193839141,1401305490],[721525244,746961066],[246885852,2177182882]],d["SHA-512/224"]=[[2352822216,424955298],[1944164710,2312950998],[502970286,855612546],[1738396948,1479516111],[258812777,2077511080],[2011393907,79989058],[1067287976,1780299464],[286451373,2446758561]],m=!0}(),typeof f>"u"&&(f="SHA-512"),!(f in d))throw new Error("Invalid SHA-512 algorithm: "+f);for(var I=d[f],U=null,E=a.util.createBuffer(),g=new Array(80),T=0;T<80;++T)g[T]=new Array(2);var h=64;switch(f){case"SHA-384":h=48;break;case"SHA-512/256":h=32;break;case"SHA-512/224":h=28}var v={algorithm:f.replace("-","").toLowerCase(),blockLength:128,digestLength:h,messageLength:0,fullMessageLength:null,messageLengthSize:16,start:function(){v.messageLength=0,v.fullMessageLength=v.messageLength128=[];for(var n=v.messageLengthSize/4,u=0;u<n;++u)v.fullMessageLength.push(0);for(E=a.util.createBuffer(),U=new Array(I.length),u=0;u<I.length;++u)U[u]=I[u].slice(0);return v}};return v.start(),v.update=function(n,u){"utf8"===u&&(n=a.util.encodeUtf8(n));var p=n.length;v.messageLength+=p,p=[p/4294967296>>>0,p>>>0];for(var A=v.fullMessageLength.length-1;A>=0;--A)v.fullMessageLength[A]+=p[1],p[1]=p[0]+(v.fullMessageLength[A]/4294967296>>>0),v.fullMessageLength[A]=v.fullMessageLength[A]>>>0,p[0]=p[1]/4294967296>>>0;return E.putBytes(n),r(U,g,E),(E.read>2048||0===E.length())&&E.compact(),v},v.digest=function(){var n=a.util.createBuffer();n.putBytes(E.bytes()),n.putBytes(C.substr(0,v.blockLength-(v.fullMessageLength[v.fullMessageLength.length-1]+v.messageLengthSize&v.blockLength-1)));for(var A,k=8*v.fullMessageLength[0],c=0;c<v.fullMessageLength.length-1;++c)n.putInt32((k+=(A=8*v.fullMessageLength[c+1])/4294967296>>>0)>>>0),k=A>>>0;n.putInt32(k);var y=new Array(U.length);for(c=0;c<U.length;++c)y[c]=U[c].slice(0);r(y,g,n);var t,N=a.util.createBuffer();for(t="SHA-512"===f?y.length:"SHA-384"===f?y.length-2:y.length-4,c=0;c<t;++c)N.putInt32(y[c][0]),(c!==t-1||"SHA-512/224"!==f)&&N.putInt32(y[c][1]);return N},v};var C=null,m=!1,x=null,d=null;function r(f,I,U){for(var E,g,T,h,y,N,t,L,V,D,M,_,G,X,W,j,te,fe,he,pe,J,Ce,ie,ge,ve,z,Q,o=U.length();o>=128;){for(J=0;J<16;++J)I[J][0]=U.getInt32()>>>0,I[J][1]=U.getInt32()>>>0;for(;J<80;++J)g=(((Ce=(ge=I[J-2])[0])<<13|(ie=ge[1])>>>19)^(ie<<3|Ce>>>29)^(Ce<<26|ie>>>6))>>>0,I[J][0]=(E=((Ce>>>19|ie<<13)^(ie>>>29|Ce<<3)^Ce>>>6)>>>0)+(ve=I[J-7])[0]+(T=(((Ce=(z=I[J-15])[0])>>>1|(ie=z[1])<<31)^(Ce>>>8|ie<<24)^Ce>>>7)>>>0)+(Q=I[J-16])[0]+((ie=g+ve[1]+(h=((Ce<<31|ie>>>1)^(Ce<<24|ie>>>8)^(Ce<<25|ie>>>7))>>>0)+Q[1])/4294967296>>>0)>>>0,I[J][1]=ie>>>0;for(y=f[0][0],N=f[0][1],t=f[1][0],L=f[1][1],V=f[2][0],D=f[2][1],M=f[3][0],_=f[3][1],G=f[4][0],X=f[4][1],W=f[5][0],j=f[5][1],te=f[6][0],fe=f[6][1],he=f[7][0],pe=f[7][1],J=0;J<80;++J)E=he+(((G>>>14|X<<18)^(G>>>18|X<<14)^(X>>>9|G<<23))>>>0)+((te^G&(W^te))>>>0)+x[J][0]+I[J][0]+((ie=pe+(((G<<18|X>>>14)^(G<<14|X>>>18)^(X<<23|G>>>9))>>>0)+((fe^X&(j^fe))>>>0)+x[J][1]+I[J][1])/4294967296>>>0)>>>0,g=ie>>>0,T=(((y>>>28|N<<4)^(N>>>2|y<<30)^(N>>>7|y<<25))>>>0)+((y&t|V&(y^t))>>>0)+((ie=(((y<<4|N>>>28)^(N<<30|y>>>2)^(N<<25|y>>>7))>>>0)+((N&L|D&(N^L))>>>0))/4294967296>>>0)>>>0,h=ie>>>0,he=te,pe=fe,te=W,fe=j,W=G,j=X,G=M+E+((ie=_+g)/4294967296>>>0)>>>0,X=ie>>>0,M=V,_=D,V=t,D=L,t=y,L=N,y=E+T+((ie=g+h)/4294967296>>>0)>>>0,N=ie>>>0;f[0][0]=f[0][0]+y+((ie=f[0][1]+N)/4294967296>>>0)>>>0,f[0][1]=ie>>>0,f[1][0]=f[1][0]+t+((ie=f[1][1]+L)/4294967296>>>0)>>>0,f[1][1]=ie>>>0,f[2][0]=f[2][0]+V+((ie=f[2][1]+D)/4294967296>>>0)>>>0,f[2][1]=ie>>>0,f[3][0]=f[3][0]+M+((ie=f[3][1]+_)/4294967296>>>0)>>>0,f[3][1]=ie>>>0,f[4][0]=f[4][0]+G+((ie=f[4][1]+X)/4294967296>>>0)>>>0,f[4][1]=ie>>>0,f[5][0]=f[5][0]+W+((ie=f[5][1]+j)/4294967296>>>0)>>>0,f[5][1]=ie>>>0,f[6][0]=f[6][0]+te+((ie=f[6][1]+fe)/4294967296>>>0)>>>0,f[6][1]=ie>>>0,f[7][0]=f[7][0]+he+((ie=f[7][1]+pe)/4294967296>>>0)>>>0,f[7][1]=ie>>>0,o-=128}}},61617:(re,ce,O)=>{var a=O(9185);O(28097),O(41583),O(71469),O(97634),O(96615);var e=re.exports=a.ssh=a.ssh||{};function i(x,d){var l=d.toString(16);l[0]>="8"&&(l="00"+l);var r=a.util.hexToBytes(l);x.putInt32(r.length),x.putBytes(r)}function C(x,d){x.putInt32(d.length),x.putString(d)}function m(){for(var x=a.md.sha1.create(),d=arguments.length,l=0;l<d;++l)x.update(arguments[l]);return x.digest()}e.privateKeyToPutty=function(x,d,l){var r="ssh-rsa",f=""===(d=d||"")?"none":"aes256-cbc",I="PuTTY-User-Key-File-2: "+r+"\r\n";I+="Encryption: "+f+"\r\n",I+="Comment: "+(l=l||"")+"\r\n";var U=a.util.createBuffer();C(U,r),i(U,x.e),i(U,x.n);var E=a.util.encode64(U.bytes(),64),g=Math.floor(E.length/66)+1;I+="Public-Lines: "+g+"\r\n",I+=E;var h,T=a.util.createBuffer();if(i(T,x.d),i(T,x.p),i(T,x.q),i(T,x.qInv),d){var v=T.length()+16-1;v-=v%16;var n=m(T.bytes());n.truncate(n.length()-v+T.length()),T.putBuffer(n);var u=a.util.createBuffer();u.putBuffer(m("\0\0\0\0",d)),u.putBuffer(m("\0\0\0\x01",d));var p=a.aes.createEncryptionCipher(u.truncate(8),"CBC");p.start(a.util.createBuffer().fillWithByte(0,16)),p.update(T.copy()),p.finish();var A=p.output;A.truncate(16),h=a.util.encode64(A.bytes(),64)}else h=a.util.encode64(T.bytes(),64);I+="\r\nPrivate-Lines: "+(g=Math.floor(h.length/66)+1)+"\r\n",I+=h;var R=m("putty-private-key-file-mac-key",d),k=a.util.createBuffer();C(k,r),C(k,f),C(k,l),k.putInt32(U.length()),k.putBuffer(U),k.putInt32(T.length()),k.putBuffer(T);var c=a.hmac.create();return c.start("sha1",R),c.update(k.bytes()),I+"\r\nPrivate-MAC: "+c.digest().toHex()+"\r\n"},e.publicKeyToOpenSSH=function(x,d){var l="ssh-rsa";d=d||"";var r=a.util.createBuffer();return C(r,l),i(r,x.e),i(r,x.n),l+" "+a.util.encode64(r.bytes())+" "+d},e.privateKeyToOpenSSH=function(x,d){return d?a.pki.encryptRsaPrivateKey(x,d,{legacy:!0,algorithm:"aes128"}):a.pki.privateKeyToPem(x)},e.getPublicKeyFingerprint=function(x,d){var l=(d=d||{}).md||a.md.md5.create(),f=a.util.createBuffer();C(f,"ssh-rsa"),i(f,x.e),i(f,x.n),l.start(),l.update(f.getBytes());var I=l.digest();if("hex"===d.encoding){var U=I.toHex();return d.delimiter?U.match(/.{2}/g).join(d.delimiter):U}if("binary"===d.encoding)return I.getBytes();if(d.encoding)throw new Error('Unknown encoding "'+d.encoding+'".');return I}},83704:(re,ce,O)=>{var a=O(9185);O(6902),O(41583),O(71469),O(10248),O(18624),O(58045),O(97634),O(96615);var e=function(o,s,S,P){var K=a.util.createBuffer(),Y=o.length>>1,F=Y+(1&o.length),ee=o.substr(0,F),oe=o.substr(Y,F),ue=a.util.createBuffer(),q=a.hmac.create();S=s+S;var se=Math.ceil(P/16),le=Math.ceil(P/20);q.start("MD5",ee);var ye=a.util.createBuffer();ue.putBytes(S);for(var de=0;de<se;++de)q.start(null,null),q.update(ue.getBytes()),ue.putBuffer(q.digest()),q.start(null,null),q.update(ue.bytes()+S),ye.putBuffer(q.digest());q.start("SHA1",oe);var Ee=a.util.createBuffer();for(ue.clear(),ue.putBytes(S),de=0;de<le;++de)q.start(null,null),q.update(ue.getBytes()),ue.putBuffer(q.digest()),q.start(null,null),q.update(ue.bytes()+S),Ee.putBuffer(q.digest());return K.putBytes(a.util.xorBytes(ye.getBytes(),Ee.getBytes(),P)),K},m=function(o,s,S){var P=!1;try{var K=o.deflate(s.fragment.getBytes());s.fragment=a.util.createBuffer(K),s.length=K.length,P=!0}catch{}return P},x=function(o,s,S){var P=!1;try{var K=o.inflate(s.fragment.getBytes());s.fragment=a.util.createBuffer(K),s.length=K.length,P=!0}catch{}return P},d=function(o,s){var S=0;switch(s){case 1:S=o.getByte();break;case 2:S=o.getInt16();break;case 3:S=o.getInt24();break;case 4:S=o.getInt32()}return a.util.createBuffer(o.getBytes(S))},l=function(o,s,S){o.putInt(S.length(),s<<3),o.putBuffer(S)},r={Versions:{TLS_1_0:{major:3,minor:1},TLS_1_1:{major:3,minor:2},TLS_1_2:{major:3,minor:3}}};r.SupportedVersions=[r.Versions.TLS_1_1,r.Versions.TLS_1_0],r.Version=r.SupportedVersions[0],r.MaxFragment=15360,r.ConnectionEnd={server:0,client:1},r.PRFAlgorithm={tls_prf_sha256:0},r.BulkCipherAlgorithm={none:null,rc4:0,des3:1,aes:2}
vendor: 55,752 bytes, line 1
1,r.CipherType={stream:0,block:1,aead:2},r.MACAlgorithm={none:null,hmac_md5:0,hmac_sha1:1,hmac_sha256:2,hmac_sha384:3,hmac_sha512:4},r.CompressionMethod={none:0,deflate:1},r.ContentType={change_cipher_spec:20,alert:21,handshake:22,application_data:23,heartbeat:24},r.HandshakeType={hello_request:0,client_hello:1,server_hello:2,certificate:11,server_key_exchange:12,certificate_request:13,server_hello_done:14,certificate_verify:15,client_key_exchange:16,finished:20},r.Alert={},r.Alert.Level={warning:1,fatal:2},r.Alert.Description={close_notify:0,unexpected_message:10,bad_record_mac:20,decryption_failed:21,record_overflow:22,decompression_failure:30,handshake_failure:40,bad_certificate:42,unsupported_certificate:43,certificate_revoked:44,certificate_expired:45,certificate_unknown:46,illegal_parameter:47,unknown_ca:48,access_denied:49,decode_error:50,decrypt_error:51,export_restriction:60,protocol_version:70,insufficient_security:71,internal_error:80,user_canceled:90,no_renegotiation:100},r.HeartbeatMessageType={heartbeat_request:1,heartbeat_response:2},r.CipherSuites={},r.getCipherSuite=function(o){var s=null;for(var S in r.CipherSuites){var P=r.CipherSuites[S];if(P.id[0]===o.charCodeAt(0)&&P.id[1]===o.charCodeAt(1)){s=P;break}}return s},r.handleUnexpected=function(o,s){!o.open&&o.entity===r.ConnectionEnd.client||o.error(o,{message:"Unexpected message. Received TLS record out of order.",send:!0,alert:{level:r.Alert.Level.fatal,description:r.Alert.Description.unexpected_message}})},r.handleHelloRequest=function(o,s,S){!o.handshaking&&o.handshakes>0&&(r.queue(o,r.createAlert(o,{level:r.Alert.Level.warning,description:r.Alert.Description.no_renegotiation})),r.flush(o)),o.process()},r.parseHelloMessage=function(o,s,S){var P=null,K=o.entity===r.ConnectionEnd.client;if(S<38)o.error(o,{message:K?"Invalid ServerHello message. Message too short.":"Invalid ClientHello message. Message too short.",send:!0,alert:{level:r.Alert.Level.fatal,description:r.Alert.Description.illegal_parameter}});else{var Y=s.fragment,F=Y.length();if(P={version:{major:Y.getByte(),minor:Y.getByte()},random:a.util.createBuffer(Y.getBytes(32)),session_id:d(Y,1),extensions:[]},K?(P.cipher_suite=Y.getBytes(2),P.compression_method=Y.getByte()):(P.cipher_suites=d(Y,2),P.compression_methods=d(Y,1)),(F=S-(F-Y.length()))>0){for(var ee=d(Y,2);ee.length()>0;)P.extensions.push({type:[ee.getByte(),ee.getByte()],data:d(ee,2)});if(!K)for(var oe=0;oe<P.extensions.length;++oe){var ue=P.extensions[oe];if(0===ue.type[0]&&0===ue.type[1])for(var q=d(ue.data,2);q.length()>0&&0===q.getByte();)o.session.extensions.server_name.serverNameList.push(d(q,2).getBytes())}}if(o.session.version&&(P.version.major!==o.session.version.major||P.version.minor!==o.session.version.minor))return o.error(o,{message:"TLS version change is disallowed during renegotiation.",send:!0,alert:{level:r.Alert.Level.fatal,description:r.Alert.Description.protocol_version}});if(K)o.session.cipherSuite=r.getCipherSuite(P.cipher_suite);else for(var le=a.util.createBuffer(P.cipher_suites.bytes());le.length()>0&&(o.session.cipherSuite=r.getCipherSuite(le.getBytes(2)),null===o.session.cipherSuite););if(null===o.session.cipherSuite)return o.error(o,{message:"No cipher suites in common.",send:!0,alert:{level:r.Alert.Level.fatal,description:r.Alert.Description.handshake_failure},cipherSuite:a.util.bytesToHex(P.cipher_suite)});o.session.compressionMethod=K?P.compression_method:r.CompressionMethod.none}return P},r.createSecurityParameters=function(o,s){var S=o.entity===r.ConnectionEnd.client,P=s.random.bytes(),K=S?o.session.sp.client_random:P,Y=S?P:r.createRandom().getBytes();o.session.sp={entity:o.entity,prf_algorithm:r.PRFAlgorithm.tls_prf_sha256,bulk_cipher_algorithm:null,cipher_type:null,enc_key_length:null,block_length:null,fixed_iv_length:null,record_iv_length:null,mac_algorithm:null,mac_length:null,mac_key_length:null,compression_algorithm:o.session.compressionMethod,pre_master_secret:null,master_secret:null,client_random:K,server_random:Y}},r.handleServerHello=function(o,s,S){var P=r.parseHelloMessage(o,s,S);if(!o.fail){if(!(P.version.minor<=o.version.minor))return o.error(o,{message:"Incompatible TLS version.",send:!0,alert:{level:r.Alert.Level.fatal,description:r.Alert.Description.protocol_version}});o.version.minor=P.version.minor,o.session.version=o.version;var K=P.session_id.bytes();K.length>0&&K===o.session.id?(o.expect=T,o.session.resuming=!0,o.session.sp.server_random=P.random.bytes()):(o.expect=I,o.session.resuming=!1,r.createSecurityParameters(o,P)),o.session.id=K,o.process()}},r.handleClientHello=function(o,s,S){var P=r.parseHelloMessage(o,s,S);if(!o.fail){var K=P.session_id.bytes(),Y=null;if(o.sessionCache&&(null===(Y=o.sessionCache.getSession(K))?K="":(Y.version.major!==P.version.major||Y.version.minor>P.version.minor)&&(Y=null,K="")),0===K.length&&(K=a.random.getBytes(32)),o.session.id=K,o.session.clientHelloVersion=P.version,o.session.sp={},Y)o.version=o.session.version=Y.version,o.session.sp=Y.sp;else{for(var F,ee=1;ee<r.SupportedVersions.length&&!((F=r.SupportedVersions[ee]).minor<=P.version.minor);++ee);o.version={major:F.major,minor:F.minor},o.session.version=o.version}null!==Y?(o.expect=k,o.session.resuming=!0,o.session.sp.client_random=P.random.bytes()):(o.expect=!1!==o.verifyClient?p:A,o.session.resuming=!1,r.createSecurityParameters(o,P)),o.open=!0,r.queue(o,r.createRecord(o,{type:r.ContentType.handshake,data:r.createServerHello(o)})),o.session.resuming?(r.queue(o,r.createRecord(o,{type:r.ContentType.change_cipher_spec,data:r.createChangeCipherSpec()})),o.state.pending=r.createConnectionState(o),o.state.current.write=o.state.pending.write,r.queue(o,r.createRecord(o,{type:r.ContentType.handshake,data:r.createFinished(o)}))):(r.queue(o,r.createRecord(o,{type:r.ContentType.handshake,data:r.createCertificate(o)})),o.fail||(r.queue(o,r.createRecord(o,{type:r.ContentType.handshake,data:r.createServerKeyExchange(o)})),!1!==o.verifyClient&&r.queue(o,r.createRecord(o,{type:r.ContentType.handshake,data:r.createCertificateRequest(o)})),r.queue(o,r.createRecord(o,{type:r.ContentType.handshake,data:r.createServerHelloDone(o)})))),r.flush(o),o.process()}},r.handleCertificate=function(o,s,S){if(S<3)return o.error(o,{message:"Invalid Certificate message. Message too short.",send:!0,alert:{level:r.Alert.Level.fatal,description:r.Alert.Description.illegal_parameter}});var Y,F,K={certificate_list:d(s.fragment,3)},ee=[];try{for(;K.certificate_list.length()>0;)Y=d(K.certificate_list,3),F=a.asn1.fromDer(Y),Y=a.pki.certificateFromAsn1(F,!0),ee.push(Y)}catch(ue){return o.error(o,{message:"Could not parse certificate list.",cause:ue,send:!0,alert:{level:r.Alert.Level.fatal,description:r.Alert.Description.bad_certificate}})}var oe=o.entity===r.ConnectionEnd.client;!oe&&!0!==o.verifyClient||0!==ee.length?0===ee.length?o.expect=oe?U:A:(oe?o.session.serverCertificate=ee[0]:o.session.clientCertificate=ee[0],r.verifyCertificateChain(o,ee)&&(o.expect=oe?U:A)):o.error(o,{message:oe?"No server certificate provided.":"No client certificate provided.",send:!0,alert:{level:r.Alert.Level.fatal,description:r.Alert.Description.illegal_parameter}}),o.process()},r.handleServerKeyExchange=function(o,s,S){if(S>0)return o.error(o,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:r.Alert.Level.fatal,description:r.Alert.Description.unsupported_certificate}});o.expect=E,o.process()},r.handleClientKeyExchange=function(o,s,S){if(S<48)return o.error(o,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:r.Alert.Level.fatal,description:r.Alert.Description.unsupported_certificate}});var K={enc_pre_master_secret:d(s.fragment,2).getBytes()},Y=null;if(o.getPrivateKey)try{Y=o.getPrivateKey(o,o.session.serverCertificate),Y=a.pki.privateKeyFromPem(Y)}catch(oe){o.error(o,{message:"Could not get private key.",cause:oe,send:!0,alert:{level:r.Alert.Level.fatal,description:r.Alert.Description.internal_error}})}if(null===Y)return o.error(o,{message:"No private key set.",send:!0,alert:{level:r.Alert.Level.fatal,description:r.Alert.Description.internal_error}});try{var F=o.session.sp;F.pre_master_secret=Y.decrypt(K.enc_pre_master_secret);var ee=o.session.clientHelloVersion;if(ee.major!==F.pre_master_secret.charCodeAt(0)||ee.minor!==F.pre_master_secret.charCodeAt(1))throw new Error("TLS version rollback attack detected.")}catch{F.pre_master_secret=a.random.getBytes(48)}o.expect=k,null!==o.session.clientCertificate&&(o.expect=R),o.process()},r.handleCertificateRequest=function(o,s,S){if(S<3)return o.error(o,{message:"Invalid CertificateRequest. Message too short.",send:!0,alert:{level:r.Alert.Level.fatal,description:r.Alert.Description.illegal_parameter}});var P=s.fragment,K={certificate_types:d(P,1),certificate_authorities:d(P,2)};o.session.certificateRequest=K,o.expect=g,o.process()},r.handleCertificateVerify=function(o,s,S){if(S<2)return o.error(o,{message:"Invalid CertificateVerify. Message too short.",send:!0,alert:{level:r.Alert.Level.fatal,description:r.Alert.Description.illegal_parameter}});var P=s.fragment;P.read-=4;var K=P.bytes();P.read+=4;var Y={signature:d(P,2).getBytes()},F=a.util.createBuffer();F.putBuffer(o.session.md5.digest()),F.putBuffer(o.session.sha1.digest()),F=F.getBytes();try{if(!o.session.clientCertificate.publicKey.verify(F,Y.signature,"NONE"))throw new Error("CertificateVerify signature does not match.");o.session.md5.update(K),o.session.sha1.update(K)}catch{return o.error(o,{message:"Bad signature in CertificateVerify.",send:!0,alert:{level:r.Alert.Level.fatal,description:r.Alert.Description.handshake_failure}})}o.expect=k,o.process()},r.handleServerHelloDone=function(o,s,S){if(S>0)return o.error(o,{message:"Invalid ServerHelloDone message. Invalid length.",send:!0,alert:{level:r.Alert.Level.fatal,description:r.Alert.Description.record_overflow}});if(null===o.serverCertificate){var P={message:"No server certificate provided. Not enough security.",send:!0,alert:{level:r.Alert.Level.fatal,description:r.Alert.Description.insufficient_security}},Y=o.verify(o,P.alert.description,0,[]);if(!0!==Y)return(Y||0===Y)&&("object"!=typeof Y||a.util.isArray(Y)?"number"==typeof Y&&(P.alert.description=Y):(Y.message&&(P.message=Y.message),Y.alert&&(P.alert.description=Y.alert))),o.error(o,P)}null!==o.session.certificateRequest&&(s=r.createRecord(o,{type:r.ContentType.handshake,data:r.createCertificate(o)}),r.queue(o,s)),s=r.createRecord(o,{type:r.ContentType.handshake,data:r.createClientKeyExchange(o)}),r.queue(o,s),o.expect=n;var F=function(ee,oe){null!==ee.session.certificateRequest&&null!==ee.session.clientCertificate&&r.queue(ee,r.createRecord(ee,{type:r.ContentType.handshake,data:r.createCertificateVerify(ee,oe)})),r.queue(ee,r.createRecord(ee,{type:r.ContentType.change_cipher_spec,data:r.createChangeCipherSpec()})),ee.state.pending=r.createConnectionState(ee),ee.state.current.write=ee.state.pending.write,r.queue(ee,r.createRecord(ee,{type:r.ContentType.handshake,data:r.createFinished(ee)})),ee.expect=T,r.flush(ee),ee.process()};if(null===o.session.certificateRequest||null===o.session.clientCertificate)return F(o,null);r.getClientSignature(o,F)},r.handleChangeCipherSpec=function(o,s){if(1!==s.fragment.getByte())return o.error(o,{message:"Invalid ChangeCipherSpec message received.",send:!0,alert:{level:r.Alert.Level.fatal,description:r.Alert.Description.illegal_parameter}});var S=o.entity===r.ConnectionEnd.client;(o.session.resuming&&S||!o.session.resuming&&!S)&&(o.state.pending=r.createConnectionState(o)),o.state.current.read=o.state.pending.read,(!o.session.resuming&&S||o.session.resuming&&!S)&&(o.state.pending=null),o.expect=S?h:c,o.process()},r.handleFinished=function(o,s,S){var P=s.fragment;P.read-=4;var K=P.bytes();P.read+=4;var Y=s.fragment.getBytes();(P=a.util.createBuffer()).putBuffer(o.session.md5.digest()),P.putBuffer(o.session.sha1.digest());var F=o.entity===r.ConnectionEnd.client;if((P=e(o.session.sp.master_secret,F?"server finished":"client finished",P.getBytes(),12)).getBytes()!==Y)return o.error(o,{message:"Invalid verify_data in Finished message.",send:!0,alert:{level:r.Alert.Level.fatal,description:r.Alert.Description.decrypt_error}});o.session.md5.update(K),o.session.sha1.update(K),(o.session.resuming&&F||!o.session.resuming&&!F)&&(r.queue(o,r.createRecord(o,{type:r.ContentType.change_cipher_spec,data:r.createChangeCipherSpec()})),o.state.current.write=o.state.pending.write,o.state.pending=null,r.queue(o,r.createRecord(o,{type:r.ContentType.handshake,data:r.createFinished(o)}))),o.expect=F?v:y,o.handshaking=!1,++o.handshakes,o.peerCertificate=F?o.session.serverCertificate:o.session.clientCertificate,r.flush(o),o.isConnected=!0,o.connected(o),o.process()},r.handleAlert=function(o,s){var K,S=s.fragment,P={level:S.getByte(),description:S.getByte()};switch(P.description){case r.Alert.Description.close_notify:K="Connection closed.";break;case r.Alert.Description.unexpected_message:K="Unexpected message.";break;case r.Alert.Description.bad_record_mac:K="Bad record MAC.";break;case r.Alert.Description.decryption_failed:K="Decryption failed.";break;case r.Alert.Description.record_overflow:K="Record overflow.";break;case r.Alert.Description.decompression_failure:K="Decompression failed.";break;case r.Alert.Description.handshake_failure:K="Handshake failure.";break;case r.Alert.Description.bad_certificate:K="Bad certificate.";break;case r.Alert.Description.unsupported_certificate:K="Unsupported certificate.";break;case r.Alert.Description.certificate_revoked:K="Certificate revoked.";break;case r.Alert.Description.certificate_expired:K="Certificate expired.";break;case r.Alert.Description.certificate_unknown:K="Certificate unknown.";break;case r.Alert.Description.illegal_parameter:K="Illegal parameter.";break;case r.Alert.Description.unknown_ca:K="Unknown certificate authority.";break;case r.Alert.Description.access_denied:K="Access denied.";break;case r.Alert.Description.decode_error:K="Decode error.";break;case r.Alert.Description.decrypt_error:K="Decrypt error.";break;case r.Alert.Description.export_restriction:K="Export restriction.";break;case r.Alert.Description.protocol_version:K="Unsupported protocol version.";break;case r.Alert.Description.insufficient_security:K="Insufficient security.";break;case r.Alert.Description.internal_error:K="Internal error.";break;case r.Alert.Description.user_canceled:K="User canceled.";break;case r.Alert.Description.no_renegotiation:K="Renegotiation not supported.";break;default:K="Unknown error."}if(P.description===r.Alert.Description.close_notify)return o.close();o.error(o,{message:K,send:!1,origin:o.entity===r.ConnectionEnd.client?"server":"client",alert:P}),o.process()},r.handleHandshake=function(o,s){var S=s.fragment,P=S.getByte(),K=S.getInt24();if(K>S.length())return o.fragmented=s,s.fragment=a.util.createBuffer(),S.read-=4,o.process();o.fragmented=null,S.read-=4;var Y=S.bytes(K+4);S.read+=4,P in J[o.entity][o.expect]?(o.entity===r.ConnectionEnd.server&&!o.open&&!o.fail&&(o.handshaking=!0,o.session={version:null,extensions:{server_name:{serverNameList:[]}},cipherSuite:null,compressionMethod:null,serverCertificate:null,clientCertificate:null,md5:a.md.md5.create(),sha1:a.md.sha1.create()}),P!==r.HandshakeType.hello_request&&P!==r.HandshakeType.certificate_verify&&P!==r.HandshakeType.finished&&(o.session.md5.update(Y),o.session.sha1.update(Y)),J[o.entity][o.expect][P](o,s,K)):r.handleUnexpected(o,s)},r.handleApplicationData=function(o,s){o.data.putBuffer(s.fragment),o.dataReady(o),o.process()},r.handleHeartbeat=function(o,s){var S=s.fragment,P=S.getByte(),K=S.getInt16(),Y=S.getBytes(K);if(P===r.HeartbeatMessageType.heartbeat_request){if(o.handshaking||K>Y.length)return o.process();r.queue(o,r.createRecord(o,{type:r.ContentType.heartbeat,data:r.createHeartbeat(r.HeartbeatMessageType.heartbeat_response,Y)})),r.flush(o)}else if(P===r.HeartbeatMessageType.heartbeat_response){if(Y!==o.expectedHeartbeatPayload)return o.process();o.heartbeatReceived&&o.heartbeatReceived(o,a.util.createBuffer(Y))}o.process()};var I=1,U=2,E=3,g=4,T=5,h=6,v=7,n=8,p=1,A=2,R=3,k=4,c=5,y=6,t=r.handleUnexpected,L=r.handleChangeCipherSpec,V=r.handleAlert,D=r.handleHandshake,M=r.handleApplicationData,_=r.handleHeartbeat,G=[];G[r.ConnectionEnd.client]=[[t,V,D,t,_],[t,V,D,t,_],[t,V,D,t,_],[t,V,D,t,_],[t,V,D,t,_],[L,V,t,t,_],[t,V,D,t,_],[t,V,D,M,_],[t,V,D,t,_]],G[r.ConnectionEnd.server]=[[t,V,D,t,_],[t,V,D,t,_],[t,V,D,t,_],[t,V,D,t,_],[L,V,t,t,_],[t,V,D,t,_],[t,V,D,M,_],[t,V,D,t,_]];var X=r.handleHelloRequest,j=r.handleCertificate,te=r.handleServerKeyExchange,fe=r.handleCertificateRequest,he=r.handleServerHelloDone,pe=r.handleFinished,J=[];J[r.ConnectionEnd.client]=[[t,t,r.handleServerHello,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t],[X,t,t,t,t,t,t,t,t,t,t,j,te,fe,he,t,t,t,t,t,t],[X,t,t,t,t,t,t,t,t,t,t,t,te,fe,he,t,t,t,t,t,t],[X,t,t,t,t,t,t,t,t,t,t,t,t,fe,he,t,t,t,t,t,t],[X,t,t,t,t,t,t,t,t,t,t,t,t,t,he,t,t,t,t,t,t],[X,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t],[X,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,pe],[X,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t],[X,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t]],J[r.ConnectionEnd.server]=[[t,r.handleClientHello,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t],[t,t,t,t,t,t,t,t,t,t,t,j,t,t,t,t,t,t,t,t,t],[t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,r.handleClientKeyExchange,t,t,t,t],[t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,r.handleCertificateVerify,t,t,t,t,t],[t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t],[t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,pe],[t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t],[t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t]],r.generateKeys=function(o,s){var S=e,P=s.client_random+s.server_random;o.session.resuming||(s.master_secret=S(s.pre_master_secret,"master secret",P,48).bytes(),s.pre_master_secret=null);var K=2*s.mac_key_length+2*s.enc_key_length,Y=o.version.major===r.Versions.TLS_1_0.major&&o.version.minor===r.Versions.TLS_1_0.minor;Y&&(K+=2*s.fixed_iv_length);var F=S(s.master_secret,"key expansion",P=s.server_random+s.client_random,K),ee={client_write_MAC_key:F.getBytes(s.mac_key_length),server_write_MAC_key:F.getBytes(s.mac_key_length),client_write_key:F.getBytes(s.enc_key_length),server_write_key:F.getBytes(s.enc_key_length)};return Y&&(ee.client_write_IV=F.getBytes(s.fixed_iv_length),ee.server_write_IV=F.getBytes(s.fixed_iv_length)),ee},r.createConnectionState=function(o){var s=o.entity===r.ConnectionEnd.client,S=function(){var Y={sequenceNumber:[0,0],macKey:null,macLength:0,macFunction:null,cipherState:null,cipherFunction:function(F){return!0},compressionState:null,compressFunction:function(F){return!0},updateSequenceNumber:function(){4294967295===Y.sequenceNumber[1]?(Y.sequenceNumber[1]=0,++Y.sequenceNumber[0]):++Y.sequenceNumber[1]}};return Y},P={read:S(),write:S()};if(P.read.update=function(Y,F){return P.read.cipherFunction(F,P.read)?P.read.compressFunction(Y,F,P.read)||Y.error(Y,{message:"Could not decompress record.",send:!0,alert:{level:r.Alert.Level.fatal,description:r.Alert.Description.decompression_failure}}):Y.error(Y,{message:"Could not decrypt record or bad MAC.",send:!0,alert:{level:r.Alert.Level.fatal,description:r.Alert.Description.bad_record_mac}}),!Y.fail},P.write.update=function(Y,F){return P.write.compressFunction(Y,F,P.write)?P.write.cipherFunction(F,P.write)||Y.error(Y,{message:"Could not encrypt record.",send:!1,alert:{level:r.Alert.Level.fatal,description:r.Alert.Description.internal_error}}):Y.error(Y,{message:"Could not compress record.",send:!1,alert:{level:r.Alert.Level.fatal,description:r.Alert.Description.internal_error}}),!Y.fail},o.session){var K=o.session.sp;switch(o.session.cipherSuite.initSecurityParameters(K),K.keys=r.generateKeys(o,K),P.read.macKey=s?K.keys.server_write_MAC_key:K.keys.client_write_MAC_key,P.write.macKey=s?K.keys.client_write_MAC_key:K.keys.server_write_MAC_key,o.session.cipherSuite.initConnectionState(P,o,K),K.compression_algorithm){case r.CompressionMethod.none:break;case r.CompressionMethod.deflate:P.read.compressFunction=x,P.write.compressFunction=m;break;default:throw new Error("Unsupported compression algorithm.")}}return P},r.createRandom=function(){var o=new Date,s=+o+6e4*o.getTimezoneOffset(),S=a.util.createBuffer();return S.putInt32(s),S.putBytes(a.random.getBytes(28)),S},r.createRecord=function(o,s){return s.data?{type:s.type,version:{major:o.version.major,minor:o.version.minor},length:s.data.length(),fragment:s.data}:null},r.createAlert=function(o,s){var S=a.util.createBuffer();return S.putByte(s.level),S.putByte(s.description),r.createRecord(o,{type:r.ContentType.alert,data:S})},r.createClientHello=function(o){o.session.clientHelloVersion={major:o.version.major,minor:o.version.minor};for(var s=a.util.createBuffer(),S=0;S<o.cipherSuites.length;++S){var P=o.cipherSuites[S];s.putByte(P.id[0]),s.putByte(P.id[1])}var K=s.length(),Y=a.util.createBuffer();Y.putByte(r.CompressionMethod.none);var F=Y.length(),ee=a.util.createBuffer();if(o.virtualHost){var oe=a.util.createBuffer();oe.putByte(0),oe.putByte(0);var ue=a.util.createBuffer();ue.putByte(0),l(ue,2,a.util.createBuffer(o.virtualHost));var q=a.util.createBuffer();l(q,2,ue),l(oe,2,q),ee.putBuffer(oe)}var se=ee.length();se>0&&(se+=2);var le=o.session.id,ye=le.length+1+2+4+28+2+K+1+F+se,de=a.util.createBuffer();return de.putByte(r.HandshakeType.client_hello),de.putInt24(ye),de.putByte(o.version.major),de.putByte(o.version.minor),de.putBytes(o.session.sp.client_random),l(de,1,a.util.createBuffer(le)),l(de,2,s),l(de,1,Y),se>0&&l(de,2,ee),de},r.createServerHello=function(o){var s=o.session.id,S=s.length+1+2+4+28+2+1,P=a.util.createBuffer();return P.putByte(r.HandshakeType.server_hello),P.putInt24(S),P.putByte(o.version.major),P.putByte(o.version.minor),P.putBytes(o.session.sp.server_random),l(P,1,a.util.createBuffer(s)),P.putByte(o.session.cipherSuite.id[0]),P.putByte(o.session.cipherSuite.id[1]),P.putByte(o.session.compressionMethod),P},r.createCertificate=function(o){var s=o.entity===r.ConnectionEnd.client,S=null;o.getCertificate&&(S=o.getCertificate(o,s?o.session.certificateRequest:o.session.extensions.server_name.serverNameList));var K=a.util.createBuffer();if(null!==S)try{a.util.isArray(S)||(S=[S]);for(var Y=null,F=0;F<S.length;++F){var ee=a.pem.decode(S[F])[0];if("CERTIFICATE"!==ee.type&&"X509 CERTIFICATE"!==ee.type&&"TRUSTED CERTIFICATE"!==ee.type){var oe=new Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');throw oe.headerType=ee.type,oe}if(ee.procType&&"ENCRYPTED"===ee.procType.type)throw new Error("Could not convert certificate from PEM; PEM is encrypted.");var ue=a.util.createBuffer(ee.body);null===Y&&(Y=a.asn1.fromDer(ue.bytes(),!1));var q=a.util.createBuffer();l(q,3,ue),K.putBuffer(q)}S=a.pki.certificateFromAsn1(Y),s?o.session.clientCertificate=S:o.session.serverCertificate=S}catch(ye){return o.error(o,{message:"Could not send certificate list.",cause:ye,send:!0,alert:{level:r.Alert.Level.fatal,description:r.Alert.Description.bad_certificate}})}var se=3+K.length(),le=a.util.createBuffer();return le.putByte(r.HandshakeType.certificate),le.putInt24(se),l(le,3,K),le},r.createClientKeyExchange=function(o){var s=a.util.createBuffer();s.putByte(o.session.clientHelloVersion.major),s.putByte(o.session.clientHelloVersion.minor),s.putBytes(a.random.getBytes(46));var S=o.session.sp;S.pre_master_secret=s.getBytes();var K=(s=o.session.serverCertificate.publicKey.encrypt(S.pre_master_secret)).length+2,Y=a.util.createBuffer();return Y.putByte(r.HandshakeType.client_key_exchange),Y.putInt24(K),Y.putInt16(s.length),Y.putBytes(s),Y},r.createServerKeyExchange=function(o){return a.util.createBuffer()},r.getClientSignature=function(o,s){var S=a.util.createBuffer();S.putBuffer(o.session.md5.digest()),S.putBuffer(o.session.sha1.digest()),S=S.getBytes(),o.getSignature=o.getSignature||function(P,K,Y){var F=null;if(P.getPrivateKey)try{F=P.getPrivateKey(P,P.session.clientCertificate),F=a.pki.privateKeyFromPem(F)}catch(ee){P.error(P,{message:"Could not get private key.",cause:ee,send:!0,alert:{level:r.Alert.Level.fatal,description:r.Alert.Description.internal_error}})}null===F?P.error(P,{message:"No private key set.",send:!0,alert:{level:r.Alert.Level.fatal,description:r.Alert.Description.internal_error}}):K=F.sign(K,null),Y(P,K)},o.getSignature(o,S,s)},r.createCertificateVerify=function(o,s){var S=s.length+2,P=a.util.createBuffer();return P.putByte(r.HandshakeType.certificate_verify),P.putInt24(S),P.putInt16(s.length),P.putBytes(s),P},r.createCertificateRequest=function(o){var s=a.util.createBuffer();s.putByte(1);var S=a.util.createBuffer();for(var P in o.caStore.certs){var Y=a.pki.distinguishedNameToAsn1(o.caStore.certs[P].subject),F=a.asn1.toDer(Y);S.putInt16(F.length()),S.putBuffer(F)}var ee=1+s.length()+2+S.length(),oe=a.util.createBuffer();return oe.putByte(r.HandshakeType.certificate_request),oe.putInt24(ee),l(oe,1,s),l(oe,2,S),oe},r.createServerHelloDone=function(o){var s=a.util.createBuffer();return s.putByte(r.HandshakeType.server_hello_done),s.putInt24(0),s},r.createChangeCipherSpec=function(){var o=a.util.createBuffer();return o.putByte(1),o},r.createFinished=function(o){var s=a.util.createBuffer();s.putBuffer(o.session.md5.digest()),s.putBuffer(o.session.sha1.digest()),s=e(o.session.sp.master_secret,o.entity===r.ConnectionEnd.client?"client finished":"server finished",s.getBytes(),12);var ee=a.util.createBuffer();return ee.putByte(r.HandshakeType.finished),ee.putInt24(s.length()),ee.putBuffer(s),ee},r.createHeartbeat=function(o,s,S){typeof S>"u"&&(S=s.length);var P=a.util.createBuffer();P.putByte(o),P.putInt16(S),P.putBytes(s);var K=P.length(),Y=Math.max(16,K-S-3);return P.putBytes(a.random.getBytes(Y)),P},r.queue=function(o,s){if(s&&(0!==s.fragment.length()||s.type!==r.ContentType.handshake&&s.type!==r.ContentType.alert&&s.type!==r.ContentType.change_cipher_spec)){if(s.type===r.ContentType.handshake){var S=s.fragment.bytes();o.session.md5.update(S),o.session.sha1.update(S),S=null}var P;if(s.fragment.length()<=r.MaxFragment)P=[s];else{P=[];for(var K=s.fragment.bytes();K.length>r.MaxFragment;)P.push(r.createRecord(o,{type:s.type,data:a.util.createBuffer(K.slice(0,r.MaxFragment))})),K=K.slice(r.MaxFragment);K.length>0&&P.push(r.createRecord(o,{type:s.type,data:a.util.createBuffer(K)}))}for(var Y=0;Y<P.length&&!o.fail;++Y){var F=P[Y];o.state.current.write.update(o,F)&&o.records.push(F)}}},r.flush=function(o){for(var s=0;s<o.records.length;++s){var S=o.records[s];o.tlsData.putByte(S.type),o.tlsData.putByte(S.version.major),o.tlsData.putByte(S.version.minor),o.tlsData.putInt16(S.fragment.length()),o.tlsData.putBuffer(o.records[s].fragment)}return o.records=[],o.tlsDataReady(o)};var ve=function(o){switch(o){case!0:return!0;case a.pki.certificateError.bad_certificate:return r.Alert.Description.bad_certificate;case a.pki.certificateError.unsupported_certificate:return r.Alert.Description.unsupported_certificate;case a.pki.certificateError.certificate_revoked:return r.Alert.Description.certificate_revoked;case a.pki.certificateError.certificate_expired:return r.Alert.Description.certificate_expired;case a.pki.certificateError.certificate_unknown:return r.Alert.Description.certificate_unknown;case a.pki.certificateError.unknown_ca:return r.Alert.Description.unknown_ca;default:return r.Alert.Description.bad_certificate}};for(var Q in r.verifyCertificateChain=function(o,s){try{var S={};for(var P in o.verifyOptions)S[P]=o.verifyOptions[P];S.verify=function(Y,F,ee){ve(Y);var ue=o.verify(o,Y,F,ee);if(!0!==ue){if("object"==typeof ue&&!a.util.isArray(ue)){var q=new Error("The application rejected the certificate.");throw q.send=!0,q.alert={level:r.Alert.Level.fatal,description:r.Alert.Description.bad_certificate},ue.message&&(q.message=ue.message),ue.alert&&(q.alert.description=ue.alert),q}ue!==Y&&(ue=function(o){switch(o){case!0:return!0;case r.Alert.Description.bad_certificate:return a.pki.certificateError.bad_certificate;case r.Alert.Description.unsupported_certificate:return a.pki.certificateError.unsupported_certificate;case r.Alert.Description.certificate_revoked:return a.pki.certificateError.certificate_revoked;case r.Alert.Description.certificate_expired:return a.pki.certificateError.certificate_expired;case r.Alert.Description.certificate_unknown:return a.pki.certificateError.certificate_unknown;case r.Alert.Description.unknown_ca:return a.pki.certificateError.unknown_ca;default:return a.pki.certificateError.bad_certificate}}(ue))}return ue},a.pki.verifyCertificateChain(o.caStore,s,S)}catch(Y){var K=Y;("object"!=typeof K||a.util.isArray(K))&&(K={send:!0,alert:{level:r.Alert.Level.fatal,description:ve(Y)}}),"send"in K||(K.send=!0),"alert"in K||(K.alert={level:r.Alert.Level.fatal,description:ve(K.error)}),o.error(o,K)}return!o.fail},r.createSessionCache=function(o,s){var S=null;if(o&&o.getSession&&o.setSession&&o.order)S=o;else{for(var P in(S={}).cache=o||{},S.capacity=Math.max(s||100,1),S.order=[],o)S.order.length<=s?S.order.push(P):delete o[P];S.getSession=function(K){var Y=null,F=null;if(K?F=a.util.bytesToHex(K):S.order.length>0&&(F=S.order[0]),null!==F&&F in S.cache)for(var ee in Y=S.cache[F],delete S.cache[F],S.order)if(S.order[ee]===F){S.order.splice(ee,1);break}return Y},S.setSession=function(K,Y){if(S.order.length===S.capacity){var F=S.order.shift();delete S.cache[F]}F=a.util.bytesToHex(K),S.order.push(F),S.cache[F]=Y}}return S},r.createConnection=function(o){var s;s=o.caStore?a.util.isArray(o.caStore)?a.pki.createCaStore(o.caStore):o.caStore:a.pki.createCaStore();var S=o.cipherSuites||null;if(null===S)for(var P in S=[],r.CipherSuites)S.push(r.CipherSuites[P]);var K=o.server?r.ConnectionEnd.server:r.ConnectionEnd.client,Y=o.sessionCache?r.createSessionCache(o.sessionCache):null,F={version:{major:r.Version.major,minor:r.Version.minor},entity:K,sessionId:o.sessionId,caStore:s,sessionCache:Y,cipherSuites:S,connected:o.connected,virtualHost:o.virtualHost||null,verifyClient:o.verifyClient||!1,verify:o.verify||function(q,se,le,ye){return se},verifyOptions:o.verifyOptions||{},getCertificate:o.getCertificate||null,getPrivateKey:o.getPrivateKey||null,getSignature:o.getSignature||null,input:a.util.createBuffer(),tlsData:a.util.createBuffer(),data:a.util.createBuffer(),tlsDataReady:o.tlsDataReady,dataReady:o.dataReady,heartbeatReceived:o.heartbeatReceived,closed:o.closed,error:function(q,se){se.origin=se.origin||(q.entity===r.ConnectionEnd.client?"client":"server"),se.send&&(r.queue(q,r.createAlert(q,se.alert)),r.flush(q));var le=!1!==se.fatal;le&&(q.fail=!0),o.error(q,se),le&&q.close(!1)},deflate:o.deflate||null,inflate:o.inflate||null,reset:function(q){F.version={major:r.Version.major,minor:r.Version.minor},F.record=null,F.session=null,F.peerCertificate=null,F.state={pending:null,current:null},F.expect=0,F.fragmented=null,F.records=[],F.open=!1,F.handshakes=0,F.handshaking=!1,F.isConnected=!1,F.fail=!(q||typeof q>"u"),F.input.clear(),F.tlsData.clear(),F.data.clear(),F.state.current=r.createConnectionState(F)}};return F.reset(),F.handshake=function(q){if(F.entity!==r.ConnectionEnd.client)F.error(F,{message:"Cannot initiate handshake as a server.",fatal:!1});else if(F.handshaking)F.error(F,{message:"Handshake already in progress.",fatal:!1});else{F.fail&&!F.open&&0===F.handshakes&&(F.fail=!1),F.handshaking=!0;var se=null;(q=q||"").length>0&&(F.sessionCache&&(se=F.sessionCache.getSession(q)),null===se&&(q="")),0===q.length&&F.sessionCache&&null!==(se=F.sessionCache.getSession())&&(q=se.id),F.session={id:q,version:null,cipherSuite:null,compressionMethod:null,serverCertificate:null,certificateRequest:null,clientCertificate:null,sp:{},md5:a.md.md5.create(),sha1:a.md.sha1.create()},se&&(F.version=se.version,F.session.sp=se.sp),F.session.sp.client_random=r.createRandom().getBytes(),F.open=!0,r.queue(F,r.createRecord(F,{type:r.ContentType.handshake,data:r.createClientHello(F)})),r.flush(F)}},F.process=function(q){var se=0;return q&&F.input.putBytes(q),F.fail||(null!==F.record&&F.record.ready&&F.record.fragment.isEmpty()&&(F.record=null),null===F.record&&(se=function(q){var se=0,le=q.input,ye=le.length();if(ye<5)se=5-ye;else{q.record={type:le.getByte(),version:{major:le.getByte(),minor:le.getByte()},length:le.getInt16(),fragment:a.util.createBuffer(),ready:!1};var de=q.record.version.major===q.version.major;de&&q.session&&q.session.version&&(de=q.record.version.minor===q.version.minor),de||q.error(q,{message:"Incompatible TLS version.",send:!0,alert:{level:r.Alert.Level.fatal,description:r.Alert.Description.protocol_version}})}return se}(F)),!F.fail&&null!==F.record&&!F.record.ready&&(se=function(q){var se=0,le=q.input,ye=le.length();return ye<q.record.length?se=q.record.length-ye:(q.record.fragment.putBytes(le.getBytes(q.record.length)),le.compact(),q.state.current.read.update(q,q.record)&&(null!==q.fragmented&&(q.fragmented.type===q.record.type?(q.fragmented.fragment.putBuffer(q.record.fragment),q.record=q.fragmented):q.error(q,{message:"Invalid fragmented record.",send:!0,alert:{level:r.Alert.Level.fatal,description:r.Alert.Description.unexpected_message}})),q.record.ready=!0)),se}(F)),!F.fail&&null!==F.record&&F.record.ready&&function(q,se){var le=se.type-r.ContentType.change_cipher_spec,ye=G[q.entity][q.expect];le in ye?ye[le](q,se):r.handleUnexpected(q,se)}(F,F.record)),se},F.prepare=function(q){return r.queue(F,r.createRecord(F,{type:r.ContentType.application_data,data:a.util.createBuffer(q)})),r.flush(F)},F.prepareHeartbeatRequest=function(q,se){return q instanceof a.util.ByteBuffer&&(q=q.bytes()),typeof se>"u"&&(se=q.length),F.expectedHeartbeatPayload=q,r.queue(F,r.createRecord(F,{type:r.ContentType.heartbeat,data:r.createHeartbeat(r.HeartbeatMessageType.heartbeat_request,q,se)})),r.flush(F)},F.close=function(q){if(!F.fail&&F.sessionCache&&F.session){var se={id:F.session.id,version:F.session.version,sp:F.session.sp};se.sp.keys=null,F.sessionCache.setSession(se.id,se)}F.open&&(F.open=!1,F.input.clear(),(F.isConnected||F.handshaking)&&(F.isConnected=F.handshaking=!1,r.queue(F,r.createAlert(F,{level:r.Alert.Level.warning,description:r.Alert.Description.close_notify})),r.flush(F)),F.closed(F)),F.reset(q)},F},re.exports=a.tls=a.tls||{},r)"function"!=typeof r[Q]&&(a.tls[Q]=r[Q]);a.tls.prf_tls1=e,a.tls.hmac_sha1=function(o,s,S){var P=a.hmac.create();P.start("SHA1",o);var K=a.util.createBuffer();return K.putInt32(s[0]),K.putInt32(s[1]),K.putByte(S.type),K.putByte(S.version.major),K.putByte(S.version.minor),K.putInt16(S.length),K.putBytes(S.fragment.bytes()),P.update(K.getBytes()),P.digest().getBytes()},a.tls.createSessionCache=r.createSessionCache,a.tls.createConnection=r.createConnection},96615:(re,ce,O)=>{var a=O(9185),e=O(8549),i=re.exports=a.util=a.util||{};function C(n){if(8!==n&&16!==n&&24!==n&&32!==n)throw new Error("Only 8, 16, 24, or 32 bits supported: "+n)}function m(n){if(this.data="",this.read=0,"string"==typeof n)this.data=n;else if(i.isArrayBuffer(n)||i.isArrayBufferView(n))if(typeof Buffer<"u"&&n instanceof Buffer)this.data=n.toString("binary");else{var u=new Uint8Array(n);try{this.data=String.fromCharCode.apply(null,u)}catch{for(var p=0;p<u.length;++p)this.putByte(u[p])}}else(n instanceof m||"object"==typeof n&&"string"==typeof n.data&&"number"==typeof n.read)&&(this.data=n.data,this.read=n.read);this._constructedStringLength=0}(function(){if(typeof process<"u"&&process.nextTick&&!process.browser)return i.nextTick=process.nextTick,void(i.setImmediate="function"==typeof setImmediate?setImmediate:i.nextTick);if("function"==typeof setImmediate)return i.setImmediate=function(){return setImmediate.apply(void 0,arguments)},void(i.nextTick=function(y){return setImmediate(y)});if(i.setImmediate=function(y){setTimeout(y,0)},typeof window<"u"&&"function"==typeof window.postMessage){let y=function(N){if(N.source===window&&N.data===n){N.stopPropagation();var t=u.slice();u.length=0,t.forEach(function(L){L()})}};var n="forge.setImmediate",u=[];i.setImmediate=function(N){u.push(N),1===u.length&&window.postMessage(n,"*")},window.addEventListener("message",y,!0)}if(typeof MutationObserver<"u"){var p=Date.now(),A=!0,R=document.createElement("div");u=[],new MutationObserver(function(){var N=u.slice();u.length=0,N.forEach(function(t){t()})}).observe(R,{attributes:!0});var k=i.setImmediate;i.setImmediate=function(N){Date.now()-p>15?(p=Date.now(),k(N)):(u.push(N),1===u.length&&R.setAttribute("a",A=!A))}}i.nextTick=i.setImmediate})(),i.isNodejs=typeof process<"u"&&process.versions&&process.versions.node,i.globalScope=i.isNodejs?global:typeof self>"u"?window:self,i.isArray=Array.isArray||function(n){return"[object Array]"===Object.prototype.toString.call(n)},i.isArrayBuffer=function(n){return typeof ArrayBuffer<"u"&&n instanceof ArrayBuffer},i.isArrayBufferView=function(n){return n&&i.isArrayBuffer(n.buffer)&&void 0!==n.byteLength},i.ByteBuffer=m,i.ByteStringBuffer=m,i.ByteStringBuffer.prototype._optimizeConstructedString=function(n){this._constructedStringLength+=n,this._constructedStringLength>4096&&(this.data.substr(0,1),this._constructedStringLength=0)},i.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read},i.ByteStringBuffer.prototype.isEmpty=function(){return this.length()<=0},i.ByteStringBuffer.prototype.putByte=function(n){return this.putBytes(String.fromCharCode(n))},i.ByteStringBuffer.prototype.fillWithByte=function(n,u){n=String.fromCharCode(n);for(var p=this.data;u>0;)1&u&&(p+=n),(u>>>=1)>0&&(n+=n);return this.data=p,this._optimizeConstructedString(u),this},i.ByteStringBuffer.prototype.putBytes=function(n){return this.data+=n,this._optimizeConstructedString(n.length),this},i.ByteStringBuffer.prototype.putString=function(n){return this.putBytes(i.encodeUtf8(n))},i.ByteStringBuffer.prototype.putInt16=function(n){return this.putBytes(String.fromCharCode(n>>8&255)+String.fromCharCode(255&n))},i.ByteStringBuffer.prototype.putInt24=function(n){return this.putBytes(String.fromCharCode(n>>16&255)+String.fromCharCode(n>>8&255)+String.fromCharCode(255&n))},i.ByteStringBuffer.prototype.putInt32=function(n){return this.putBytes(String.fromCharCode(n>>24&255)+String.fromCharCode(n>>16&255)+String.fromCharCode(n>>8&255)+String.fromCharCode(255&n))},i.ByteStringBuffer.prototype.putInt16Le=function(n){return this.putBytes(String.fromCharCode(255&n)+String.fromCharCode(n>>8&255))},i.ByteStringBuffer.prototype.putInt24Le=function(n){return this.putBytes(String.fromCharCode(255&n)+String.fromCharCode(n>>8&255)+String.fromCharCode(n>>16&255))},i.ByteStringBuffer.prototype.putInt32Le=function(n){return this.putBytes(String.fromCharCode(255&n)+String.fromCharCode(n>>8&255)+String.fromCharCode(n>>16&255)+String.fromCharCode(n>>24&255))},i.ByteStringBuffer.prototype.putInt=function(n,u){C(u);var p="";do{u-=8,p+=String.fromCharCode(n>>u&255)}while(u>0);return this.putBytes(p)},i.ByteStringBuffer.prototype.putSignedInt=function(n,u){return n<0&&(n+=2<<u-1),this.putInt(n,u)},i.ByteStringBuffer.prototype.putBuffer=function(n){return this.putBytes(n.getBytes())},i.ByteStringBuffer.prototype.getByte=function(){return this.data.charCodeAt(this.read++)},i.ByteStringBuffer.prototype.getInt16=function(){var n=this.data.charCodeAt(this.read)<<8^this.data.charCodeAt(this.read+1);return this.read+=2,n},i.ByteStringBuffer.prototype.getInt24=function(){var n=this.data.charCodeAt(this.read)<<16^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2);return this.read+=3,n},i.ByteStringBuffer.prototype.getInt32=function(){var n=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);return this.read+=4,n},i.ByteStringBuffer.prototype.getInt16Le=function(){var n=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8;return this.read+=2,n},i.ByteStringBuffer.prototype.getInt24Le=function(){var n=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16;return this.read+=3,n},i.ByteStringBuffer.prototype.getInt32Le=function(){var n=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;return this.read+=4,n},i.ByteStringBuffer.prototype.getInt=function(n){C(n);var u=0;do{u=(u<<8)+this.data.charCodeAt(this.read++),n-=8}while(n>0);return u},i.ByteStringBuffer.prototype.getSignedInt=function(n){var u=this.getInt(n),p=2<<n-2;return u>=p&&(u-=p<<1),u},i.ByteStringBuffer.prototype.getBytes=function(n){var u;return n?(n=Math.min(this.length(),n),u=this.data.slice(this.read,this.read+n),this.read+=n):0===n?u="":(u=0===this.read?this.data:this.data.slice(this.read),this.clear()),u},i.ByteStringBuffer.prototype.bytes=function(n){return typeof n>"u"?this.data.slice(this.read):this.data.slice(this.read,this.read+n)},i.ByteStringBuffer.prototype.at=function(n){return this.data.charCodeAt(this.read+n)},i.ByteStringBuffer.prototype.setAt=function(n,u){return this.data=this.data.substr(0,this.read+n)+String.fromCharCode(u)+this.data.substr(this.read+n+1),this},i.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)},i.ByteStringBuffer.prototype.copy=function(){var n=i.createBuffer(this.data);return n.read=this.read,n},i.ByteStringBuffer.prototype.compact=function(){return this.read>0&&(this.data=this.data.slice(this.read),this.read=0),this},i.ByteStringBuffer.prototype.clear=function(){return this.data="",this.read=0,this},i.ByteStringBuffer.prototype.truncate=function(n){var u=Math.max(0,this.length()-n);return this.data=this.data.substr(this.read,u),this.read=0,this},i.ByteStringBuffer.prototype.toHex=function(){for(var n="",u=this.read;u<this.data.length;++u){var p=this.data.charCodeAt(u);p<16&&(n+="0"),n+=p.toString(16)}return n},i.ByteStringBuffer.prototype.toString=function(){return i.decodeUtf8(this.bytes())},i.DataBuffer=function d(n,u){this.read=(u=u||{}).readOffset||0,this.growSize=u.growSize||1024;var p=i.isArrayBuffer(n),A=i.isArrayBufferView(n);if(p||A)return this.data=p?new DataView(n):new DataView(n.buffer,n.byteOffset,n.byteLength),void(this.write="writeOffset"in u?u.writeOffset:this.data.byteLength);this.data=new DataView(new ArrayBuffer(0)),this.write=0,null!=n&&this.putBytes(n),"writeOffset"in u&&(this.write=u.writeOffset)},i.DataBuffer.prototype.length=function(){return this.write-this.read},i.DataBuffer.prototype.isEmpty=function(){return this.length()<=0},i.DataBuffer.prototype.accommodate=function(n,u){if(this.length()>=n)return this;u=Math.max(u||this.growSize,n);var p=new Uint8Array(this.data.buffer,this.data.byteOffset,this.data.byteLength),A=new Uint8Array(this.length()+u);return A.set(p),this.data=new DataView(A.buffer),this},i.DataBuffer.prototype.putByte=function(n){return this.accommodate(1),this.data.setUint8(this.write++,n),this},i.DataBuffer.prototype.fillWithByte=function(n,u){this.accommodate(u);for(var p=0;p<u;++p)this.data.setUint8(n);return this},i.DataBuffer.prototype.putBytes=function(n,u){if(i.isArrayBufferView(n)){var A=(p=new Uint8Array(n.buffer,n.byteOffset,n.byteLength)).byteLength-p.byteOffset;return this.accommodate(A),new Uint8Array(this.data.buffer,this.write).set(p),this.write+=A,this}if(i.isArrayBuffer(n)){var p=new Uint8Array(n);return this.accommodate(p.byteLength),new Uint8Array(this.data.buffer).set(p,this.write),this.write+=p.byteLength,this}if(n instanceof i.DataBuffer||"object"==typeof n&&"number"==typeof n.read&&"number"==typeof n.write&&i.isArrayBufferView(n.data))return p=new Uint8Array(n.data.byteLength,n.read,n.length()),this.accommodate(p.byteLength),new Uint8Array(n.data.byteLength,this.write).set(p),this.write+=p.byteLength,this;if(n instanceof i.ByteStringBuffer&&(n=n.data,u="binary"),u=u||"binary","string"==typeof n){var k;if("hex"===u)return this.accommodate(Math.ceil(n.length/2)),k=new Uint8Array(this.data.buffer,this.write),this.write+=i.binary.hex.decode(n,k,this.write),this;if("base64"===u)return this.accommodate(3*Math.ceil(n.length/4)),k=new Uint8Array(this.data.buffer,this.write),this.write+=i.binary.base64.decode(n,k,this.write),this;if("utf8"===u&&(n=i.encodeUtf8(n),u="binary"),"binary"===u||"raw"===u)return this.accommodate(n.length),k=new Uint8Array(this.data.buffer,this.write),this.write+=i.binary.raw.decode(k),this;if("utf16"===u)return this.accommodate(2*n.length),k=new Uint16Array(this.data.buffer,this.write),this.write+=i.text.utf16.encode(k),this;throw new Error("Invalid encoding: "+u)}throw Error("Invalid parameter: "+n)},i.DataBuffer.prototype.putBuffer=function(n){return this.putBytes(n),n.clear(),this},i.DataBuffer.prototype.putString=function(n){return this.putBytes(n,"utf16")},i.DataBuffer.prototype.putInt16=function(n){return this.accommodate(2),this.data.setInt16(this.write,n),this.write+=2,this},i.DataBuffer.prototype.putInt24=function(n){return this.accommodate(3),this.data.setInt16(this.write,n>>8&65535),this.data.setInt8(this.write,n>>16&255),this.write+=3,this},i.DataBuffer.prototype.putInt32=function(n){return this.accommodate(4),this.data.setInt32(this.write,n),this.write+=4,this},i.DataBuffer.prototype.putInt16Le=function(n){return this.accommodate(2),this.data.setInt16(this.write,n,!0),this.write+=2,this},i.DataBuffer.prototype.putInt24Le=function(n){return this.accommodate(3),this.data.setInt8(this.write,n>>16&255),this.data.setInt16(this.write,n>>8&65535,!0),this.write+=3,this},i.DataBuffer.prototype.putInt32Le=function(n){return this.accommodate(4),this.data.setInt32(this.write,n,!0),this.write+=4,this},i.DataBuffer.prototype.putInt=function(n,u){C(u),this.accommodate(u/8);do{u-=8,this.data.setInt8(this.write++,n>>u&255)}while(u>0);return this},i.DataBuffer.prototype.putSignedInt=function(n,u){return C(u),this.accommodate(u/8),n<0&&(n+=2<<u-1),this.putInt(n,u)},i.DataBuffer.prototype.getByte=function(){return this.data.getInt8(this.read++)},i.DataBuffer.prototype.getInt16=function(){var n=this.data.getInt16(this.read);return this.read+=2,n},i.DataBuffer.prototype.getInt24=function(){var n=this.data.getInt16(this.read)<<8^this.data.getInt8(this.read+2);return this.read+=3,n},i.DataBuffer.prototype.getInt32=function(){var n=this.data.getInt32(this.read);return this.read+=4,n},i.DataBuffer.prototype.getInt16Le=function(){var n=this.data.getInt16(this.read,!0);return this.read+=2,n},i.DataBuffer.prototype.getInt24Le=function(){var n=this.data.getInt8(this.read)^this.data.getInt16(this.read+1,!0)<<8;return this.read+=3,n},i.DataBuffer.prototype.getInt32Le=function(){var n=this.data.getInt32(this.read,!0);return this.read+=4,n},i.DataBuffer.prototype.getInt=function(n){C(n);var u=0;do{u=(u<<8)+this.data.getInt8(this.read++),n-=8}while(n>0);return u},i.DataBuffer.prototype.getSignedInt=function(n){var u=this.getInt(n),p=2<<n-2;return u>=p&&(u-=p<<1),u},i.DataBuffer.prototype.getBytes=function(n){var u;return n?(n=Math.min(this.length(),n),u=this.data.slice(this.read,this.read+n),this.read+=n):0===n?u="":(u=0===this.read?this.data:this.data.slice(this.read),this.clear()),u},i.DataBuffer.prototype.bytes=function(n){return typeof n>"u"?this.data.slice(this.read):this.data.slice(this.read,this.read+n)},i.DataBuffer.prototype.at=function(n){return this.data.getUint8(this.read+n)},i.DataBuffer.prototype.setAt=function(n,u){return this.data.setUint8(n,u),this},i.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)},i.DataBuffer.prototype.copy=function(){return new i.DataBuffer(this)},i.DataBuffer.prototype.compact=function(){if(this.read>0){var n=new Uint8Array(this.data.buffer,this.read),u=new Uint8Array(n.byteLength);u.set(n),this.data=new DataView(u),this.write-=this.read,this.read=0}return this},i.DataBuffer.prototype.clear=function(){return this.data=new DataView(new ArrayBuffer(0)),this.read=this.write=0,this},i.DataBuffer.prototype.truncate=function(n){return this.write=Math.max(0,this.length()-n),this.read=Math.min(this.read,this.write),this},i.DataBuffer.prototype.toHex=function(){for(var n="",u=this.read;u<this.data.byteLength;++u){var p=this.data.getUint8(u);p<16&&(n+="0"),n+=p.toString(16)}return n},i.DataBuffer.prototype.toString=function(n){var u=new Uint8Array(this.data,this.read,this.length());if("binary"===(n=n||"utf8")||"raw"===n)return i.binary.raw.encode(u);if("hex"===n)return i.binary.hex.encode(u);if("base64"===n)return i.binary.base64.encode(u);if("utf8"===n)return i.text.utf8.decode(u);if("utf16"===n)return i.text.utf16.decode(u);throw new Error("Invalid encoding: "+n)},i.createBuffer=function(n,u){return u=u||"raw",void 0!==n&&"utf8"===u&&(n=i.encodeUtf8(n)),new i.ByteBuffer(n)},i.fillString=function(n,u){for(var p="";u>0;)1&u&&(p+=n),(u>>>=1)>0&&(n+=n);return p},i.xorBytes=function(n,u,p){for(var A="",R="",k="",c=0,y=0;p>0;--p,++c)R=n.charCodeAt(c)^u.charCodeAt(c),y>=10&&(A+=k,k="",y=0),k+=String.fromCharCode(R),++y;return A+k},i.hexToBytes=function(n){var u="",p=0;for(!0&n.length&&(p=1,u+=String.fromCharCode(parseInt(n[0],16)));p<n.length;p+=2)u+=String.fromCharCode(parseInt(n.substr(p,2),16));return u},i.bytesToHex=function(n){return i.createBuffer(n).toHex()},i.int32ToBytes=function(n){return String.fromCharCode(n>>24&255)+String.fromCharCode(n>>16&255)+String.fromCharCode(n>>8&255)+String.fromCharCode(255&n)};var l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",r=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],f="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";i.encode64=function(n,u){for(var R,k,c,p="",A="",y=0;y<n.length;)R=n.charCodeAt(y++),k=n.charCodeAt(y++),c=n.charCodeAt(y++),p+=l.charAt(R>>2),p+=l.charAt((3&R)<<4|k>>4),isNaN(k)?p+="==":(p+=l.charAt((15&k)<<2|c>>6),p+=isNaN(c)?"=":l.charAt(63&c)),u&&p.length>u&&(A+=p.substr(0,u)+"\r\n",p=p.substr(u));return A+p},i.decode64=function(n){n=n.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var p,A,R,k,u="",c=0;c<n.length;)p=r[n.charCodeAt(c++)-43],A=r[n.charCodeAt(c++)-43],R=r[n.charCodeAt(c++)-43],k=r[n.charCodeAt(c++)-43],u+=String.fromCharCode(p<<2|A>>4),64!==R&&(u+=String.fromCharCode((15&A)<<4|R>>2),64!==k&&(u+=String.fromCharCode((3&R)<<6|k)));return u},i.encodeUtf8=function(n){return unescape(encodeURIComponent(n))},i.decodeUtf8=function(n){return decodeURIComponent(escape(n))},i.binary={raw:{},hex:{},base64:{},base58:{},baseN:{encode:e.encode,decode:e.decode}},i.binary.raw.encode=function(n){return String.fromCharCode.apply(null,n)},i.binary.raw.decode=function(n,u,p){var A=u;A||(A=new Uint8Array(n.length));for(var R=p=p||0,k=0;k<n.length;++k)A[R++]=n.charCodeAt(k);return u?R-p:A},i.binary.hex.encode=i.bytesToHex,i.binary.hex.decode=function(n,u,p){var A=u;A||(A=new Uint8Array(Math.ceil(n.length/2)));var R=0,k=p=p||0;for(1&n.length&&(R=1,A[k++]=parseInt(n[0],16));R<n.length;R+=2)A[k++]=parseInt(n.substr(R,2),16);return u?k-p:A},i.binary.base64.encode=function(n,u){for(var R,k,c,p="",A="",y=0;y<n.byteLength;)R=n[y++],k=n[y++],c=n[y++],p+=l.charAt(R>>2),p+=l.charAt((3&R)<<4|k>>4),isNaN(k)?p+="==":(p+=l.charAt((15&k)<<2|c>>6),p+=isNaN(c)?"=":l.charAt(63&c)),u&&p.length>u&&(A+=p.substr(0,u)+"\r\n",p=p.substr(u));return A+p},i.binary.base64.decode=function(n,u,p){var A=u;A||(A=new Uint8Array(3*Math.ceil(n.length/4))),n=n.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var R,k,c,y,N=0,t=p=p||0;N<n.length;)R=r[n.charCodeAt(N++)-43],k=r[n.charCodeAt(N++)-43],c=r[n.charCodeAt(N++)-43],y=r[n.charCodeAt(N++)-43],A[t++]=R<<2|k>>4,64!==c&&(A[t++]=(15&k)<<4|c>>2,64!==y&&(A[t++]=(3&c)<<6|y));return u?t-p:A.subarray(0,t)},i.binary.base58.encode=function(n,u){return i.binary.baseN.encode(n,f,u)},i.binary.base58.decode=function(n,u){return i.binary.baseN.decode(n,f,u)},i.text={utf8:{},utf16:{}},i.text.utf8.encode=function(n,u,p){n=i.encodeUtf8(n);var A=u;A||(A=new Uint8Array(n.length));for(var R=p=p||0,k=0;k<n.length;++k)A[R++]=n.charCodeAt(k);return u?R-p:A},i.text.utf8.decode=function(n){return i.decodeUtf8(String.fromCharCode.apply(null,n))},i.text.utf16.encode=function(n,u,p){var A=u;A||(A=new Uint8Array(2*n.length));for(var R=new Uint16Array(A.buffer),k=p=p||0,c=p,y=0;y<n.length;++y)R[c++]=n.charCodeAt(y),k+=2;return u?k-p:A},i.text.utf16.decode=function(n){return String.fromCharCode.apply(null,new Uint16Array(n.buffer))},i.deflate=function(n,u,p){if(u=i.decode64(n.deflate(i.encode64(u)).rval),p){var A=2;32&u.charCodeAt(1)&&(A=6),u=u.substring(A,u.length-4)}return u},i.inflate=function(n,u,p){var A=n.inflate(i.encode64(u)).rval;return null===A?null:i.decode64(A)};var I=function(n,u,p){if(!n)throw new Error("WebStorage not available.");var A;if(null===p?A=n.removeItem(u):(p=i.encode64(JSON.stringify(p)),A=n.setItem(u,p)),typeof A<"u"&&!0!==A.rval){var R=new Error(A.error.message);throw R.id=A.error.id,R.name=A.error.name,R}},U=function(n,u){if(!n)throw new Error("WebStorage not available.");var p=n.getItem(u);if(n.init)if(null===p.rval){if(p.error){var A=new Error(p.error.message);throw A.id=p.error.id,A.name=p.error.name,A}p=null}else p=p.rval;return null!==p&&(p=JSON.parse(i.decode64(p))),p},E=function(n,u,p,A){var R=U(n,u);null===R&&(R={}),R[p]=A,I(n,u,R)},g=function(n,u,p){var A=U(n,u);return null!==A&&(A=p in A?A[p]:null),A},T=function(n,u,p){var A=U(n,u);if(null!==A&&p in A){delete A[p];var R=!0;for(var k in A){R=!1;break}R&&(A=null),I(n,u,A)}},h=function(n,u){I(n,u,null)},v=function(n,u,p){var A=null;typeof p>"u"&&(p=["web","flash"]);var R,k=!1,c=null;for(var y in p){R=p[y];try{if("flash"===R||"both"===R){if(null===u[0])throw new Error("Flash local storage not available.");A=n.apply(this,u),k="flash"===R}("web"===R||"both"===R)&&(u[0]=localStorage,A=n.apply(this,u),k=!0)}catch(N){c=N}if(k)break}if(!k)throw c;return A};i.setItem=function(n,u,p,A,R){v(E,arguments,R)},i.getItem=function(n,u,p,A){return v(g,arguments,A)},i.removeItem=function(n,u,p,A){v(T,arguments,A)},i.clearItems=function(n,u,p){v(h,arguments,p)},i.isEmpty=function(n){for(var u in n)if(n.hasOwnProperty(u))return!1;return!0},i.format=function(n){for(var p,A,u=/%./g,R=0,k=[],c=0;p=u.exec(n);){(A=n.substring(c,u.lastIndex-2)).length>0&&k.push(A),c=u.lastIndex;var y=p[0][1];switch(y){case"s":case"o":k.push(R<arguments.length?arguments[1+R++]:"<?>");break;case"%":k.push("%");break;default:k.push("<%"+y+"?>")}}return k.push(n.substring(c)),k.join("")},i.formatNumber=function(n,u,p,A){var R=n,k=isNaN(u=Math.abs(u))?2:u,c=void 0===p?",":p,y=void 0===A?".":A,N=R<0?"-":"",t=parseInt(R=Math.abs(+R||0).toFixed(k),10)+"",L=t.length>3?t.length%3:0;return N+(L?t.substr(0,L)+y:"")+t.substr(L).replace(/(\d{3})(?=\d)/g,"$1"+y)+(k?c+Math.abs(R-t).toFixed(k).slice(2):"")},i.formatSize=function(n){return n>=1073741824?i.formatNumber(n/1073741824,2,".","")+" GiB":n>=1048576?i.formatNumber(n/1048576,2,".","")+" MiB":n>=1024?i.formatNumber(n/1024,0)+" KiB":i.formatNumber(n,0)+" bytes"},i.bytesFromIP=function(n){return-1!==n.indexOf(".")?i.bytesFromIPv4(n):-1!==n.indexOf(":")?i.bytesFromIPv6(n):null},i.bytesFromIPv4=function(n){if(4!==(n=n.split(".")).length)return null;for(var u=i.createBuffer(),p=0;p<n.length;++p){var A=parseInt(n[p],10);if(isNaN(A))return null;u.putByte(A)}return u.getBytes()},i.bytesFromIPv6=function(n){for(var u=0,p=2*(8-(n=n.split(":").filter(function(c){return 0===c.length&&++u,!0})).length+u),A=i.createBuffer(),R=0;R<8;++R)if(n[R]&&0!==n[R].length){var k=i.hexToBytes(n[R]);k.length<2&&A.putByte(0),A.putBytes(k)}else A.fillWithByte(0,p),p=0;return A.getBytes()},i.bytesToIP=function(n){return 4===n.length?i.bytesToIPv4(n):16===n.length?i.bytesToIPv6(n):null},i.bytesToIPv4=function(n){if(4!==n.length)return null;for(var u=[],p=0;p<n.length;
1++p)u.push(n.charCodeAt(p));return u.join(".")},i.bytesToIPv6=function(n){if(16!==n.length)return null;for(var u=[],p=[],A=0,R=0;R<n.length;R+=2){for(var k=i.bytesToHex(n[R]+n[R+1]);"0"===k[0]&&"0"!==k;)k=k.substr(1);if("0"===k){var c=p[p.length-1],y=u.length;c&&y===c.end+1?(c.end=y,c.end-c.start>p[A].end-p[A].start&&(A=p.length-1)):p.push({start:y,end:y})}u.push(k)}if(p.length>0){var N=p[A];N.end-N.start>0&&(u.splice(N.start,N.end-N.start+1,""),0===N.start&&u.unshift(""),7===N.end&&u.push(""))}return u.join(":")},i.estimateCores=function(n,u){if("function"==typeof n&&(u=n,n={}),n=n||{},"cores"in i&&!n.update)return u(null,i.cores);if(typeof navigator<"u"&&"hardwareConcurrency"in navigator&&navigator.hardwareConcurrency>0)return i.cores=navigator.hardwareConcurrency,u(null,i.cores);if(typeof Worker>"u")return i.cores=1,u(null,i.cores);if(typeof Blob>"u")return i.cores=2,u(null,i.cores);var p=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",function(c){for(var y=Date.now(),N=y+4;Date.now()<N;);self.postMessage({st:y,et:N})})}.toString(),")()"],{type:"application/javascript"}));!function A(c,y,N){if(0===y){var t=Math.floor(c.reduce(function(L,V){return L+V},0)/c.length);return i.cores=Math.max(1,t),URL.revokeObjectURL(p),u(null,i.cores)}!function R(c,y){for(var N=[],t=[],L=0;L<c;++L){var V=new Worker(p);V.addEventListener("message",function(D){if(t.push(D.data),t.length===c){for(var M=0;M<c;++M)N[M].terminate();y(null,t)}}),N.push(V)}for(L=0;L<c;++L)N[L].postMessage(L)}(N,function(L,V){c.push(function k(c,y){for(var N=[],t=0;t<c;++t)for(var L=y[t],V=N[t]=[],D=0;D<c;++D)if(t!==D){var M=y[D];(L.st>M.st&&L.st<M.et||M.st>L.st&&M.st<L.et)&&V.push(D)}return N.reduce(function(_,G){return Math.max(_,G.length)},0)}(N,V)),A(c,y-1,N)})}([],5,16)}},42529:(re,ce,O)=>{var a=O(9185);O(28097),O(6902),O(39857),O(91501),O(69118),O(65853),O(10248),O(76892),O(98563),O(96615);var e=a.asn1,i=re.exports=a.pki=a.pki||{},C=i.oids,m={};m.CN=C.commonName,m.commonName="CN",m.C=C.countryName,m.countryName="C",m.L=C.localityName,m.localityName="L",m.ST=C.stateOrProvinceName,m.stateOrProvinceName="ST",m.O=C.organizationName,m.organizationName="O",m.OU=C.organizationalUnitName,m.organizationalUnitName="OU",m.E=C.emailAddress,m.emailAddress="E";var x=a.pki.rsa.publicKeyValidator,d={name:"Certificate",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,captureAsn1:"tbsCertificate",value:[{name:"Certificate.TBSCertificate.version",tagClass:e.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.version.integer",tagClass:e.Class.UNIVERSAL,type:e.Type.INTEGER,constructed:!1,capture:"certVersion"}]},{name:"Certificate.TBSCertificate.serialNumber",tagClass:e.Class.UNIVERSAL,type:e.Type.INTEGER,constructed:!1,capture:"certSerialNumber"},{name:"Certificate.TBSCertificate.signature",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.signature.algorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"certinfoSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:e.Class.UNIVERSAL,optional:!0,captureAsn1:"certinfoSignatureParams"}]},{name:"Certificate.TBSCertificate.issuer",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,captureAsn1:"certIssuer"},{name:"Certificate.TBSCertificate.validity",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.validity.notBefore (utc)",tagClass:e.Class.UNIVERSAL,type:e.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity1UTCTime"},{name:"Certificate.TBSCertificate.validity.notBefore (generalized)",tagClass:e.Class.UNIVERSAL,type:e.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity2GeneralizedTime"},{name:"Certificate.TBSCertificate.validity.notAfter (utc)",tagClass:e.Class.UNIVERSAL,type:e.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity3UTCTime"},{name:"Certificate.TBSCertificate.validity.notAfter (generalized)",tagClass:e.Class.UNIVERSAL,type:e.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity4GeneralizedTime"}]},{name:"Certificate.TBSCertificate.subject",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,captureAsn1:"certSubject"},x,{name:"Certificate.TBSCertificate.issuerUniqueID",tagClass:e.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.issuerUniqueID.id",tagClass:e.Class.UNIVERSAL,type:e.Type.BITSTRING,constructed:!1,captureBitStringValue:"certIssuerUniqueId"}]},{name:"Certificate.TBSCertificate.subjectUniqueID",tagClass:e.Class.CONTEXT_SPECIFIC,type:2,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.subjectUniqueID.id",tagClass:e.Class.UNIVERSAL,type:e.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSubjectUniqueId"}]},{name:"Certificate.TBSCertificate.extensions",tagClass:e.Class.CONTEXT_SPECIFIC,type:3,constructed:!0,captureAsn1:"certExtensions",optional:!0}]},{name:"Certificate.signatureAlgorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.signatureAlgorithm.algorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"certSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:e.Class.UNIVERSAL,optional:!0,captureAsn1:"certSignatureParam
1s"}]},{name:"Certificate.signatureValue",tagClass:e.Class.UNIVERSAL,type:e.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSignature"}]},l={name:"rsapss",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.hashAlgorithm",tagClass:e.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier",tagClass:e.Class.UNIVERSAL,type:e.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier.algorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"hashOid"}]}]},{name:"rsapss.maskGenAlgorithm",tagClass:e.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier",tagClass:e.Class.UNIVERSAL,type:e.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.algorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"maskGenOid"},{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params.algorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"maskGenHashOid"}]}]}]},{name:"rsapss.saltLength",tagClass:e.Class.CONTEXT_SPECIFIC,type:2,optional:!0,value:[{name:"rsapss.saltLength.saltLength",tagClass:e.Class.UNIVERSAL,type:e.Class.INTEGER,constructed:!1,capture:"saltLength"}]},{name:"rsapss.trailerField",tagClass:e.Class.CONTEXT_SPECIFIC,type:3,optional:!0,value:[{name:"rsapss.trailer.trailer",tagClass:e.Class.UNIVERSAL,type:e.Class.INTEGER,constructed:!1,capture:"trailer"}]}]},f={name:"CertificationRequest",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,captureAsn1:"csr",value:[{name:"CertificationRequestInfo",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfo",value:[{name:"CertificationRequestInfo.integer",tagClass:e.Class.UNIVERSAL,type:e.Type.INTEGER,constructed:!1,capture:"certificationRequestInfoVersion"},{name:"CertificationRequestInfo.subject",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfoSubject"},x,{name:"CertificationRequestInfo.attributes",tagClass:e.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"certificationRequestInfoAttributes",value:[{name:"CertificationRequestInfo.attributes",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequestInfo.attributes.type",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1},{name:"CertificationRequestInfo.attributes.value",tagClass:e.Class.UNIVERSAL,type:e.Type.SET,constructed:!0}]}]}]},{name:"CertificationRequest.signatureAlgorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequest.signatureAlgorithm.algorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"csrSignatureOid"},{name:"CertificationRequest.signatureAlgorithm.parameters",tagClass:e.Class.UNIVERSAL,optional:!0,captureAsn1:"csrSignatureParams"}]},{name:"CertificationRequest.signature",tagClass:e.Class.UNIVERSAL,type:e.Type.BITSTRING,constructed:!1,captureBitStringValue:"csrSignature"}]};function I(c,y){"string"==typeof y&&(y={shortName:y});for(var t,N=null,L=0;null===N&&L<c.attributes.length;++L)t=c.attributes[L],(y.type&&y.type===t.type||y.name&&y.name===t.name||y.shortName&&y.shortName===t.shortName)&&(N=t);return N}i.RDNAttributesAsArray=function(c,y){for(var t,L,V,N=[],D=0;D<c.value.length;++D){t=c.value[D];for(var M=0;M<t.value.length;++M)(V={}).type=e.derToOid((L=t.value[M]).value[0].value),V.value=L.value[1].value,V.valueTagClass=L.value[1].type,V.type in C&&(V.name=C[V.type],V.name in m&&(V.shortName=m[V.name])),y&&(y.update(V.type),y.update(V.value)),N.push(V)}return N},i.CRIAttributesAsArray=function(c){for(var y=[],N=0;N<c.length;++N)for(var t=c[N],L=e.derToOid(t.value[0].value),V=t.value[1].value,D=0;D<V.length;++D){var M={};
vendor: 25,331 bytes, line 1
1if(M.type=L,M.value=V[D].value,M.valueTagClass=V[D].type,M.type in C&&(M.name=C[M.type],M.name in m&&(M.shortName=m[M.name])),M.type===C.extensionRequest){M.extensions=[];for(var _=0;_<M.value.length;++_)M.extensions.push(i.certificateExtensionFromAsn1(M.value[_]))}y.push(M)}return y};var U=function(c,y,N){var t={};if(c!==C["RSASSA-PSS"])return t;N&&(t={hash:{algorithmOid:C.sha1},mgf:{algorithmOid:C.mgf1,hash:{algorithmOid:C.sha1}},saltLength:20});var L={},V=[];if(!e.validate(y,l,L,V)){var D=new Error("Cannot read RSASSA-PSS parameter block.");throw D.errors=V,D}return void 0!==L.hashOid&&(t.hash=t.hash||{},t.hash.algorithmOid=e.derToOid(L.hashOid)),void 0!==L.maskGenOid&&(t.mgf=t.mgf||{},t.mgf.algorithmOid=e.derToOid(L.maskGenOid),t.mgf.hash=t.mgf.hash||{},t.mgf.hash.algorithmOid=e.derToOid(L.maskGenHashOid)),void 0!==L.saltLength&&(t.saltLength=L.saltLength.charCodeAt(0)),t},E=function(c){switch(C[c.signatureOid]){case"sha1WithRSAEncryption":case"sha1WithRSASignature":return a.md.sha1.create();case"md5WithRSAEncryption":return a.md.md5.create();case"sha256WithRSAEncryption":case"RSASSA-PSS":return a.md.sha256.create();case"sha384WithRSAEncryption":return a.md.sha384.create();case"sha512WithRSAEncryption":return a.md.sha512.create();default:var y=new Error("Could not compute "+c.type+" digest. Unknown signature OID.");throw y.signatureOid=c.signatureOid,y}},g=function(c){var N,y=c.certificate;switch(y.signatureOid){case C.sha1WithRSAEncryption:case C.sha1WithRSASignature:break;case C["RSASSA-PSS"]:var t,L,V;if(void 0===(t=C[y.signatureParameters.mgf.hash.algorithmOid])||void 0===a.md[t])throw(V=new Error("Unsupported MGF hash function.")).oid=y.signatureParameters.mgf.hash.algorithmOid,V.name=t,V;if(void 0===(L=C[y.signatureParameters.mgf.algorithmOid])||void 0===a.mgf[L])throw(V=new Error("Unsupported MGF function.")).oid=y.signatureParameters.mgf.algorithmOid,V.name=L,V;if(L=a.mgf[L].create(a.md[t].create()),void 0===(t=C[y.signatureParameters.hash.algorithmOid])||void 0===a.md[t])throw(V=new Error("Unsupported RSASSA-PSS hash function.")).oid=y.signatureParameters.hash.algorithmOid,V.name=t,V;N=a.pss.create(a.md[t].create(),L,y.signatureParameters.saltLength)}return y.publicKey.verify(c.md.digest().getBytes(),c.signature,N)};function T(c){for(var N,t,y=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[]),L=c.attributes,V=0;V<L.length;++V){var D=(N=L[V]).value,M=e.Type.PRINTABLESTRING;"valueTagClass"in N&&(M=N.valueTagClass)===e.Type.UTF8&&(D=a.util.encodeUtf8(D)),t=e.create(e.Class.UNIVERSAL,e.Type.SET,!0,[e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(N.type).getBytes()),e.create(e.Class.UNIVERSAL,M,!1,D)])]),y.value.push(t)}return y}function v(c){for(var y,N=0;N<c.length;++N){if(typeof(y=c[N]).name>"u"&&(y.type&&y.type in i.oids?y.name=i.oids[y.type]:y.shortName&&y.shortName in m&&(y.name=i.oids[m[y.shortName]])),typeof y.type>"u"){if(!y.name||!(y.name in i.oids))throw(t=new Error("Attribute type not specified.")).attribute=y,t;y.type=i.oids[y.name]}if(typeof y.shortName>"u"&&y.name&&y.name in m&&(y.shortName=m[y.name]),y.type===C.extensionRequest&&(y.valueConstructed=!0,y.valueTagClass=e.Type.SEQUENCE,!y.value&&y.extensions)){y.value=[];for(var L=0;L<y.extensions.length;++L)y.value.push(i.certificateExtensionToAsn1(n(y.extensions[L])))}var t;if(typeof y.value>"u")throw(t=new Error("Attribute value not specified.")).attribute=y,t}}function n(c,y){if(y=y||{},typeof c.name>"u"&&c.id&&c.id in i.oids&&(c.name=i.oids[c.id]),typeof c.id>"u"){if(!c.name||!(c.name in i.oids))throw(N=new Error("Extension ID not specified.")).extension=c,N;c.id=i.oids[c.name]}if(typeof c.value<"u")return c;if("keyUsage"===c.name){var t=0,L=0,V=0;c.digitalSignature&&(L|=128,t=7),c.nonRepudiation&&(L|=64,t=6),c.keyEncipherment&&(L|=32,t=5),c.dataEncipherment&&(L|=16,t=4),c.keyAgreement&&(L|=8,t=3),c.keyCertSign&&(L|=4,t=2),c.cRLSign&&(L|=2,t=1),c.encipherOnly&&(L|=1,t=0),c.decipherOnly&&(V|=128,t=7);var D=String.fromCharCode(t);0!==V?D+=String.fromCharCode(L)+String.fromCharCode(V):0!==L&&(D+=String.fromCharCode(L)),c.value=e.create(e.Class.UNIVERSAL,e.Type.BITSTRING,!1,D)}else if("basicConstraints"===c.name)c.value=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[]),c.cA&&c.value.value.push(e.create(e.Class.UNIVERSAL,e.Type.BOOLEAN,!1,String.fromCharCode(255))),"pathLenConstraint"in c&&c.value.value.push(e.create(e.Class.UNIVERSAL,e.Type.INTEGER,!1,e.integerToDer(c.pathLenConstraint).getBytes()));else if("extKeyUsage"===c.name){c.value=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[]);var M=c.value.value;for(var _ in c)!0===c[_]&&(_ in C?M.push(e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(C[_]).getBytes())):-1!==_.indexOf(".")&&M.push(e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(_).getBytes())))}else if("nsCertType"===c.name)t=0,L=0,c.client&&(L|=128,t=7),c.server&&(L|=64,t=6),c.email&&(L|=32,t=5),c.objsign&&(L|=16,t=4),c.reserved&&(L|=8,t=3),c.sslCA&&(L|=4,t=2),c.emailCA&&(L|=2,t=1),c.objCA&&(L|=1,t=0),D=String.fromCharCode(t),0!==L&&(D+=String.fromCharCode(L)),c.value=e.create(e.Class.UNIVERSAL,e.Type.BITSTRING,!1,D);else if("subjectAltName"===c.name||"issuerAltName"===c.name){c.value=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[]);for(var X=0;X<c.altNames.length;++X){if(D=(G=c.altNames[X]).value,7===G.type&&G.ip){if(null===(D=a.util.bytesFromIP(G.ip)))throw(N=new Error('Extension "ip" value is not a valid IPv4 or IPv6 address.')).extension=c,N}else 8===G.type&&(D=e.oidToDer(G.oid?e.oidToDer(G.oid):D));c.value.value.push(e.create(e.Class.CONTEXT_SPECIFIC,G.type,!1,D))}}else if("nsComment"===c.name&&y.cert){if(!/^[\x00-\x7F]*$/.test(c.comment)||c.comment.length<1||c.comment.length>128)throw new Error('Invalid "nsComment" content.');c.value=e.create(e.Class.UNIVERSAL,e.Type.IA5STRING,!1,c.comment)}else if("subjectKeyIdentifier"===c.name&&y.cert){var W=y.cert.generateSubjectKeyIdentifier();c.subjectKeyIdentifier=W.toHex(),c.value=e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,!1,W.getBytes())}else if("authorityKeyIdentifier"===c.name&&y.cert){if(c.value=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[]),M=c.value.value,c.keyIdentifier){var j=!0===c.keyIdentifier?y.cert.generateSubjectKeyIdentifier().getBytes():c.keyIdentifier;M.push(e.create(e.Class.CONTEXT_SPECIFIC,0,!1,j))}if(c.authorityCertIssuer){var te=[e.create(e.Class.CONTEXT_SPECIFIC,4,!0,[T(!0===c.authorityCertIssuer?y.cert.issuer:c.authorityCertIssuer)])];M.push(e.create(e.Class.CONTEXT_SPECIFIC,1,!0,te))}if(c.serialNumber){var fe=a.util.hexToBytes(!0===c.serialNumber?y.cert.serialNumber:c.serialNumber);M.push(e.create(e.Class.CONTEXT_SPECIFIC,2,!1,fe))}}else if("cRLDistributionPoints"===c.name){c.value=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[]),M=c.value.value;var G,he=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[]),pe=e.create(e.Class.CONTEXT_SPECIFIC,0,!0,[]);for(X=0;X<c.altNames.length;++X){if(D=(G=c.altNames[X]).value,7===G.type&&G.ip){if(null===(D=a.util.bytesFromIP(G.ip)))throw(N=new Error('Extension "ip" value is not a valid IPv4 or IPv6 address.')).extension=c,N}else 8===G.type&&(D=e.oidToDer(G.oid?e.oidToDer(G.oid):D));pe.value.push(e.create(e.Class.CONTEXT_SPECIFIC,G.type,!1,D))}he.value.push(e.create(e.Class.CONTEXT_SPECIFIC,0,!0,[pe])),M.push(he)}var N;if(typeof c.value>"u")throw(N=new Error("Extension value not specified.")).extension=c,N;return c}function u(c,y){if(c===C["RSASSA-PSS"]){var N=[];return void 0!==y.hash.algorithmOid&&N.push(e.create(e.Class.CONTEXT_SPECIFIC,0,!0,[e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(y.hash.algorithmOid).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.NULL,!1,"")])])),void 0!==y.mgf.algorithmOid&&N.push(e.create(e.Class.CONTEXT_SPECIFIC,1,!0,[e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(y.mgf.algorithmOid).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(y.mgf.hash.algorithmOid).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.NULL,!1,"")])])])),void 0!==y.saltLength&&N.push(e.create(e.Class.CONTEXT_SPECIFIC,2,!0,[e.create(e.Class.UNIVERSAL,e.Type.INTEGER,!1,e.integerToDer(y.saltLength).getBytes())])),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,N)}return e.create(e.Class.UNIVERSAL,e.Type.NULL,!1,"")}function p(c){var y=e.create(e.Class.CONTEXT_SPECIFIC,0,!0,[]);if(0===c.attributes.length)return y;for(var N=c.attributes,t=0;t<N.length;++t){var L=N[t],V=L.value,D=e.Type.UTF8;"valueTagClass"in L&&(D=L.valueTagClass),D===e.Type.UTF8&&(V=a.util.encodeUtf8(V));var M=!1;"valueConstructed"in L&&(M=L.valueConstructed);var _=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(L.type).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.SET,!0,[e.create(e.Class.UNIVERSAL,D,M,V)])]);y.value.push(_)}return y}i.certificateFromPem=function(c,y,N){var t=a.pem.decode(c)[0];if("CERTIFICATE"!==t.type&&"X509 CERTIFICATE"!==t.type&&"TRUSTED CERTIFICATE"!==t.type){var L=new Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');throw L.headerType=t.type,L}if(t.procType&&"ENCRYPTED"===t.procType.type)throw new Error("Could not convert certificate from PEM; PEM is encrypted.");var V=e.fromDer(t.body,N);return i.certificateFromAsn1(V,y)},i.certificateToPem=function(c,y){var N={type:"CERTIFICATE",body:e.toDer(i.certificateToAsn1(c)).getBytes()};return a.pem.encode(N,{maxline:y})},i.publicKeyFromPem=function(c){var y=a.pem.decode(c)[0];if("PUBLIC KEY"!==y.type&&"RSA PUBLIC KEY"!==y.type){var N=new Error('Could not convert public key from PEM; PEM header type is not "PUBLIC KEY" or "RSA PUBLIC KEY".');throw N.headerType=y.type,N}if(y.procType&&"ENCRYPTED"===y.procType.type)throw new Error("Could not convert public key from PEM; PEM is encrypted.");var t=e.fromDer(y.body);return i.publicKeyFromAsn1(t)},i.publicKeyToPem=function(c,y){var N={type:"PUBLIC KEY",body:e.toDer(i.publicKeyToAsn1(c)).getBytes()};return a.pem.encode(N,{maxline:y})},i.publicKeyToRSAPublicKeyPem=function(c,y){var N={type:"RSA PUBLIC KEY",body:e.toDer(i.publicKeyToRSAPublicKey(c)).getBytes()};return a.pem.encode(N,{maxline:y})},i.getPublicKeyFingerprint=function(c,y){var L,N=(y=y||{}).md||a.md.sha1.create();switch(y.type||"RSAPublicKey"){case"RSAPublicKey":L=e.toDer(i.publicKeyToRSAPublicKey(c)).getBytes();break;case"SubjectPublicKeyInfo":L=e.toDer(i.publicKeyToAsn1(c)).getBytes();break;default:throw new Error('Unknown fingerprint type "'+y.type+'".')}N.start(),N.update(L);var V=N.digest();if("hex"===y.encoding){var D=V.toHex();return y.delimiter?D.match(/.{2}/g).join(y.delimiter):D}if("binary"===y.encoding)return V.getBytes();if(y.encoding)throw new Error('Unknown encoding "'+y.encoding+'".');return V},i.certificationRequestFromPem=function(c,y,N){var t=a.pem.decode(c)[0];if("CERTIFICATE REQUEST"!==t.type){var L=new Error('Could not convert certification request from PEM; PEM header type is not "CERTIFICATE REQUEST".');throw L.headerType=t.type,L}if(t.procType&&"ENCRYPTED"===t.procType.type)throw new Error("Could not convert certification request from PEM; PEM is encrypted.");var V=e.fromDer(t.body,N);return i.certificationRequestFromAsn1(V,y)},i.certificationRequestToPem=function(c,y){var N={type:"CERTIFICATE REQUEST",body:e.toDer(i.certificationRequestToAsn1(c)).getBytes()};return a.pem.encode(N,{maxline:y})},i.createCertificate=function(){var c={version:2,serialNumber:"00",signatureOid:null,signature:null,siginfo:{}};return c.siginfo.algorithmOid=null,c.validity={},c.validity.notBefore=new Date,c.validity.notAfter=new Date,c.issuer={},c.issuer.getField=function(y){return I(c.issuer,y)},c.issuer.addField=function(y){v([y]),c.issuer.attributes.push(y)},c.issuer.attributes=[],c.issuer.hash=null,c.subject={},c.subject.getField=function(y){return I(c.subject,y)},c.subject.addField=function(y){v([y]),c.subject.attributes.push(y)},c.subject.attributes=[],c.subject.hash=null,c.extensions=[],c.publicKey=null,c.md=null,c.setSubject=function(y,N){v(y),c.subject.attributes=y,delete c.subject.uniqueId,N&&(c.subject.uniqueId=N),c.subject.hash=null},c.setIssuer=function(y,N){v(y),c.issuer.attributes=y,delete c.issuer.uniqueId,N&&(c.issuer.uniqueId=N),c.issuer.hash=null},c.setExtensions=function(y){for(var N=0;N<y.length;++N)n(y[N],{cert:c});c.extensions=y},c.getExtension=function(y){"string"==typeof y&&(y={name:y});for(var t,N=null,L=0;null===N&&L<c.extensions.length;++L)t=c.extensions[L],(y.id&&t.id===y.id||y.name&&t.name===y.name)&&(N=t);return N},c.sign=function(y,N){c.md=N||a.md.sha1.create();var t=C[c.md.algorithm+"WithRSAEncryption"];if(!t){var L=new Error("Could not compute certificate digest. Unknown message digest algorithm OID.");throw L.algorithm=c.md.algorithm,L}c.signatureOid=c.siginfo.algorithmOid=t,c.tbsCertificate=i.getTBSCertificate(c);var V=e.toDer(c.tbsCertificate);c.md.update(V.getBytes()),c.signature=y.sign(c.md)},c.verify=function(y){var N=!1;if(!c.issued(y)){var t=y.issuer,L=c.subject,V=new Error("The parent certificate did not issue the given child certificate; the child certificate's issuer does not match the parent's subject.");throw V.expectedIssuer=L.attributes,V.actualIssuer=t.attributes,V}var D=y.md;if(null===D){D=E({signatureOid:y.signatureOid,type:"certificate"});var M=y.tbsCertificate||i.getTBSCertificate(y),_=e.toDer(M);D.update(_.getBytes())}return null!==D&&(N=g({certificate:c,md:D,signature:y.signature})),N},c.isIssuer=function(y){var N=!1,t=c.issuer,L=y.subject;if(t.hash&&L.hash)N=t.hash===L.hash;else if(t.attributes.length===L.attributes.length){N=!0;for(var V,D,M=0;N&&M<t.attributes.length;++M)((V=t.attributes[M]).type!==(D=L.attributes[M]).type||V.value!==D.value)&&(N=!1)}return N},c.issued=function(y){return y.isIssuer(c)},c.generateSubjectKeyIdentifier=function(){return i.getPublicKeyFingerprint(c.publicKey,{type:"RSAPublicKey"})},c.verifySubjectKeyIdentifier=function(){for(var y=C.subjectKeyIdentifier,N=0;N<c.extensions.length;++N){var t=c.extensions[N];if(t.id===y){var L=c.generateSubjectKeyIdentifier().getBytes();return a.util.hexToBytes(t.subjectKeyIdentifier)===L}}return!1},c},i.certificateFromAsn1=function(c,y){var N={},t=[];if(!e.validate(c,d,N,t)){var L=new Error("Cannot read X.509 certificate. ASN.1 object is not an X509v3 Certificate.");throw L.errors=t,L}if(e.derToOid(N.publicKeyOid)!==i.oids.rsaEncryption)throw new Error("Cannot read public key. OID is not RSA.");var D=i.createCertificate();D.version=N.certVersion?N.certVersion.charCodeAt(0):0;var M=a.util.createBuffer(N.certSerialNumber);D.serialNumber=M.toHex(),D.signatureOid=a.asn1.derToOid(N.certSignatureOid),D.signatureParameters=U(D.signatureOid,N.certSignatureParams,!0),D.siginfo.algorithmOid=a.asn1.derToOid(N.certinfoSignatureOid),D.siginfo.parameters=U(D.siginfo.algorithmOid,N.certinfoSignatureParams,!1),D.signature=N.certSignature;var _=[];if(void 0!==N.certValidity1UTCTime&&_.push(e.utcTimeToDate(N.certValidity1UTCTime)),void 0!==N.certValidity2GeneralizedTime&&_.push(e.generalizedTimeToDate(N.certValidity2GeneralizedTime)),void 0!==N.certValidity3UTCTime&&_.push(e.utcTimeToDate(N.certValidity3UTCTime)),void 0!==N.certValidity4GeneralizedTime&&_.push(e.generalizedTimeToDate(N.certValidity4GeneralizedTime)),_.length>2)throw new Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(_.length<2)throw new Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");if(D.validity.notBefore=_[0],D.validity.notAfter=_[1],D.tbsCertificate=N.tbsCertificate,y){D.md=E({signatureOid:D.signatureOid,type:"certificate"});var G=e.toDer(D.tbsCertificate);D.md.update(G.getBytes())}var X=a.md.sha1.create(),W=e.toDer(N.certIssuer);X.update(W.getBytes()),D.issuer.getField=function(fe){return I(D.issuer,fe)},D.issuer.addField=function(fe){v([fe]),D.issuer.attributes.push(fe)},D.issuer.attributes=i.RDNAttributesAsArray(N.certIssuer),N.certIssuerUniqueId&&(D.issuer.uniqueId=N.certIssuerUniqueId),D.issuer.hash=X.digest().toHex();var j=a.md.sha1.create(),te=e.toDer(N.certSubject);return j.update(te.getBytes()),D.subject.getField=function(fe){return I(D.subject,fe)},D.subject.addField=function(fe){v([fe]),D.subject.attributes.push(fe)},D.subject.attributes=i.RDNAttributesAsArray(N.certSubject),N.certSubjectUniqueId&&(D.subject.uniqueId=N.certSubjectUniqueId),D.subject.hash=j.digest().toHex(),D.extensions=N.certExtensions?i.certificateExtensionsFromAsn1(N.certExtensions):[],D.publicKey=i.publicKeyFromAsn1(N.subjectPublicKeyInfo),D},i.certificateExtensionsFromAsn1=function(c){for(var y=[],N=0;N<c.value.length;++N)for(var t=c.value[N],L=0;L<t.value.length;++L)y.push(i.certificateExtensionFromAsn1(t.value[L]));return y},i.certificateExtensionFromAsn1=function(c){var y={};if(y.id=e.derToOid(c.value[0].value),y.critical=!1,c.value[1].type===e.Type.BOOLEAN?(y.critical=0!==c.value[1].value.charCodeAt(0),y.value=c.value[2].value):y.value=c.value[1].value,y.id in C)if(y.name=C[y.id],"keyUsage"===y.name){var t=0,L=0;(N=e.fromDer(y.value)).value.length>1&&(t=N.value.charCodeAt(1),L=N.value.length>2?N.value.charCodeAt(2):0),y.digitalSignature=128==(128&t),y.nonRepudiation=64==(64&t),y.keyEncipherment=32==(32&t),y.dataEncipherment=16==(16&t),y.keyAgreement=8==(8&t),y.keyCertSign=4==(4&t),y.cRLSign=2==(2&t),y.encipherOnly=1==(1&t),y.decipherOnly=128==(128&L)}else if("basicConstraints"===y.name){var N=e.fromDer(y.value);y.cA=N.value.length>0&&N.value[0].type===e.Type.BOOLEAN&&0!==N.value[0].value.charCodeAt(0);var V=null;N.value.length>0&&N.value[0].type===e.Type.INTEGER?V=N.value[0].value:N.value.length>1&&(V=N.value[1].value),null!==V&&(y.pathLenConstraint=e.derToInteger(V))}else if("extKeyUsage"===y.name){N=e.fromDer(y.value);for(var D=0;D<N.value.length;++D){var M=e.derToOid(N.value[D].value);M in C?y[C[M]]=!0:y[M]=!0}}else if("nsCertType"===y.name)t=0,(N=e.fromDer(y.value)).value.length>1&&(t=N.value.charCodeAt(1)),y.client=128==(128&t),y.server=64==(64&t),y.email=32==(32&t),y.objsign=16==(16&t),y.reserved=8==(8&t),y.sslCA=4==(4&t),y.emailCA=2==(2&t),y.objCA=1==(1&t);else if("subjectAltName"===y.name||"issuerAltName"===y.name){y.altNames=[],N=e.fromDer(y.value);for(var _,G=0;G<N.value.length;++G){var X={type:(_=N.value[G]).type,value:_.value};switch(y.altNames.push(X),_.type){case 1:case 2:case 6:break;case 7:X.ip=a.util.bytesToIP(_.value);break;case 8:X.oid=e.derToOid(_.value)}}}else"subjectKeyIdentifier"===y.name&&(N=e.fromDer(y.value),y.subjectKeyIdentifier=a.util.bytesToHex(N.value));return y},i.certificationRequestFromAsn1=function(c,y){var N={},t=[];if(!e.validate(c,f,N,t)){var L=new Error("Cannot read PKCS#10 certificate request. ASN.1 object is not a PKCS#10 CertificationRequest.");throw L.errors=t,L}if(e.derToOid(N.publicKeyOid)!==i.oids.rsaEncryption)throw new Error("Cannot read public key. OID is not RSA.");var D=i.createCertificationRequest();if(D.version=N.csrVersion?N.csrVersion.charCodeAt(0):0,D.signatureOid=a.asn1.derToOid(N.csrSignatureOid),D.signatureParameters=U(D.signatureOid,N.csrSignatureParams,!0),D.siginfo.algorithmOid=a.asn1.derToOid(N.csrSignatureOid),D.siginfo.parameters=U(D.siginfo.algorithmOid,N.csrSignatureParams,!1),D.signature=N.csrSignature,D.certificationRequestInfo=N.certificationRequestInfo,y){D.md=E({signatureOid:D.signatureOid,type:"certification request"});var M=e.toDer(D.certificationRequestInfo);D.md.update(M.getBytes())}var _=a.md.sha1.create();return D.subject.getField=function(G){return I(D.subject,G)},D.subject.addField=function(G){v([G]),D.subject.attributes.push(G)},D.subject.attributes=i.RDNAttributesAsArray(N.certificationRequestInfoSubject,_),D.subject.hash=_.digest().toHex(),D.publicKey=i.publicKeyFromAsn1(N.subjectPublicKeyInfo),D.getAttribute=function(G){return I(D,G)},D.addAttribute=function(G){v([G]),D.attributes.push(G)},D.attributes=i.CRIAttributesAsArray(N.certificationRequestInfoAttributes||[]),D},i.createCertificationRequest=function(){var c={version:0,signatureOid:null,signature:null,siginfo:{}};return c.siginfo.algorithmOid=null,c.subject={},c.subject.getField=function(y){return I(c.subject,y)},c.subject.addField=function(y){v([y]),c.subject.attributes.push(y)},c.subject.attributes=[],c.subject.hash=null,c.publicKey=null,c.attributes=[],c.getAttribute=function(y){return I(c,y)},c.addAttribute=function(y){v([y]),c.attributes.push(y)},c.md=null,c.setSubject=function(y){v(y),c.subject.attributes=y,c.subject.hash=null},c.setAttributes=function(y){v(y),c.attributes=y},c.sign=function(y,N){c.md=N||a.md.sha1.create();var t=C[c.md.algorithm+"WithRSAEncryption"];if(!t){var L=new Error("Could not compute certification request digest. Unknown message digest algorithm OID.");throw L.algorithm=c.md.algorithm,L}c.signatureOid=c.siginfo.algorithmOid=t,c.certificationRequestInfo=i.getCertificationRequestInfo(c);var V=e.toDer(c.certificationRequestInfo);c.md.update(V.getBytes()),c.signature=y.sign(c.md)},c.verify=function(){var y=!1,N=c.md;if(null===N){N=E({signatureOid:c.signatureOid,type:"certification request"});var t=c.certificationRequestInfo||i.getCertificationRequestInfo(c),L=e.toDer(t);N.update(L.getBytes())}return null!==N&&(y=g({certificate:c,md:N,signature:c.signature})),y},c};var A=new Date("1950-01-01T00:00:00Z"),R=new Date("2050-01-01T00:00:00Z");function k(c){return c>=A&&c<R?e.create(e.Class.UNIVERSAL,e.Type.UTCTIME,!1,e.dateToUtcTime(c)):e.create(e.Class.UNIVERSAL,e.Type.GENERALIZEDTIME,!1,e.dateToGeneralizedTime(c))}i.getTBSCertificate=function(c){var y=k(c.validity.notBefore),N=k(c.validity.notAfter),t=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.CONTEXT_SPECIFIC,0,!0,[e.create(e.Class.UNIVERSAL,e.Type.INTEGER,!1,e.integerToDer(c.version).getBytes())]),e.create(e.Class.UNIVERSAL,e.Type.INTEGER,!1,a.util.hexToBytes(c.serialNumber)),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(c.siginfo.algorithmOid).getBytes()),u(c.siginfo.algorithmOid,c.siginfo.parameters)]),T(c.issuer),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[y,N]),T(c.subject),i.publicKeyToAsn1(c.publicKey)]);return c.issuer.uniqueId&&t.value.push(e.create(e.Class.CONTEXT_SPECIFIC,1,!0,[e.create(e.Class.UNIVERSAL,e.Type.BITSTRING,!1,String.fromCharCode(0)+c.issuer.uniqueId)])),c.subject.uniqueId&&t.value.push(e.create(e.Class.CONTEXT_SPECIFIC,2,!0,[e.create(e.Class.UNIVERSAL,e.Type.BITSTRING,!1,String.fromCharCode(0)+c.subject.uniqueId)])),c.extensions.length>0&&t.value.push(i.certificateExtensionsToAsn1(c.extensions)),t},i.getCertificationRequestInfo=function(c){return e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.INTEGER,!1,e.integerToDer(c.version).getBytes()),T(c.subject),i.publicKeyToAsn1(c.publicKey),p(c)])},i.distinguishedNameToAsn1=function(c){return T(c)},i.certificateToAsn1=function(c){var y=c.tbsCertificate||i.getTBSCertificate(c);return e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[y,e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(c.signatureOid).getBytes()),u(c.signatureOid,c.signatureParameters)]),e.create(e.Class.UNIVERSAL,e.Type.BITSTRING,!1,String.fromCharCode(0)+c.signature)])},i.certificateExtensionsToAsn1=function(c){var y=e.create(e.Class.CONTEXT_SPECIFIC,3,!0,[]),N=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[]);y.value.push(N);for(var t=0;t<c.length;++t)N.value.push(i.certificateExtensionToAsn1(c[t]));return y},i.certificateExtensionToAsn1=function(c){var y=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[]);y.value.push(e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(c.id).getBytes())),c.critical&&y.value.push(e.create(e.Class.UNIVERSAL,e.Type.BOOLEAN,!1,String.fromCharCode(255)));var N=c.value;return"string"!=typeof c.value&&(N=e.toDer(N).getBytes()),y.value.push(e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,!1,N)),y},i.certificationRequestToAsn1=function(c){var y=c.certificationRequestInfo||i.getCertificationRequestInfo(c);return e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[y,e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(c.signatureOid).getBytes()),u(c.signatureOid,c.signatureParameters)]),e.create(e.Class.UNIVERSAL,e.Type.BITSTRING,!1,String.fromCharCode(0)+c.signature)])},i.createCaStore=function(c){var y={certs:{}};function N(D){return t(D),y.certs[D.hash]||null}function t(D){if(!D.hash){var M=a.md.sha1.create();D.attributes=i.RDNAttributesAsArray(T(D),M),D.hash=M.digest().toHex()}}if(y.getIssuer=function(D){return N(D.issuer)},y.addCertificate=function(D){if("string"==typeof D&&(D=a.pki.certificateFromPem(D)),t(D.subject),!y.hasCertificate(D))if(D.subject.hash in y.certs){var M=y.certs[D.subject.hash];a.util.isArray(M)||(M=[M]),M.push(D),y.certs[D.subject.hash]=M}else y.certs[D.subject.hash]=D},y.hasCertificate=function(D){"string"==typeof D&&(D=a.pki.certificateFromPem(D));var M=N(D.subject);if(!M)return!1;a.util.isArray(M)||(M=[M]);for(var _=e.toDer(i.certificateToAsn1(D)).getBytes(),G=0;G<M.length;++G)if(_===e.toDer(i.certificateToAsn1(M[G])).getBytes())return!0;return!1},y.listAllCertificates=function(){var D=[];
1for(var M in y.certs)if(y.certs.hasOwnProperty(M)){var _=y.certs[M];if(a.util.isArray(_))for(var G=0;G<_.length;++G)D.push(_[G]);else D.push(_)}return D},y.removeCertificate=function(D){var M;if("string"==typeof D&&(D=a.pki.certificateFromPem(D)),t(D.subject),!y.hasCertificate(D))return null;var _=N(D.subject);if(!a.util.isArray(_))return M=y.certs[D.subject.hash],delete y.certs[D.subject.hash],M;for(var G=e.toDer(i.certificateToAsn1(D)).getBytes(),X=0;X<_.length;++X)G===e.toDer(i.certificateToAsn1(_[X])).getBytes()&&(M=_[X],_.splice(X,1));return 0===_.length&&delete y.certs[D.subject.hash],M},c)for(var L=0;L<c.length;++L)y.addCertificate(c[L]);return y},i.certificateError={bad_certificate:"forge.pki.BadCertificate",unsupported_certificate:"forge.pki.UnsupportedCertificate",certificate_revoked:"forge.pki.CertificateRevoked",certificate_expired:"forge.pki.CertificateExpired",certificate_unknown:"forge.pki.CertificateUnknown",unknown_ca:"forge.pki.UnknownCertificateAuthority"},i.verifyCertificateChain=function(c,y,N){"function"==typeof N&&(N={verify:N}),N=N||{};var t=(y=y.slice(0)).slice(0),L=N.validityCheckDate;typeof L>"u"&&(L=new Date);var V=!0,D=null,M=0;do{var _=y.shift(),G=null,X=!1;if(L&&(L<_.validity.notBefore||L>_.validity.notAfter)&&(D={message:"Certificate is not valid yet or has expired.",error:i.certificateError.certificate_expired,notBefore:_.validity.notBefore,notAfter:_.validity.notAfter,now:L}),null===D){if(null===(G=y[0]||c.getIssuer(_))&&_.isIssuer(_)&&(X=!0,G=_),G){var W=G;a.util.isArray(W)||(W=[W]);for(var j=!1;!j&&W.length>0;){G=W.shift();try{j=G.verify(_)}catch{}}j||(D={message:"Certificate signature is invalid.",error:i.certificateError.bad_certificate})}null===D&&(!G||X)&&!c.hasCertificate(_)&&(D={message:"Certificate is not trusted.",error:i.certificateError.unknown_ca})}if(null===D&&G&&!_.isIssuer(G)&&(D={message:"Certificate issuer is invalid.",error:i.certificateError.bad_certificate}),null===D)for(var te={keyUsage:!0,basicConstraints:!0},fe=0;null===D&&fe<_.extensions.length;++fe){var he=_.extensions[fe];he.critical&&!(he.name in te)&&(D={message:"Certificate has an unsupported critical extension.",error:i.certificateError.unsupported_certificate})}if(null===D&&(!V||0===y.length&&(!G||X))){var pe=_.getExtension("basicConstraints"),J=_.getExtension("keyUsage");null!==J&&(!J.keyCertSign||null===pe)&&(D={message:"Certificate keyUsage or basicConstraints conflict or indicate that the certificate is not a CA. If the certificate is the only one in the chain or isn't the first then the certificate must be a valid CA.",error:i.certificateError.bad_certificate}),null===D&&null!==pe&&!pe.cA&&(D={message:"Certificate basicConstraints indicates the certificate is not a CA.",error:i.certificateError.bad_certificate}),null===D&&null!==J&&"pathLenConstraint"in pe&&M-1>pe.pathLenConstraint&&(D={message:"Certificate basicConstraints pathLenConstraint violated.",error:i.certificateError.bad_certificate})}var ie=null===D||D.error,ge=N.verify?N.verify(ie,M,t):ie;if(!0!==ge)throw!0===ie&&(D={message:"The application rejected the certificate.",error:i.certificateError.bad_certificate}),(ge||0===ge)&&("object"!=typeof ge||a.util.isArray(ge)?"string"==typeof ge&&(D.error=ge):(ge.message&&(D.message=ge.message),ge.error&&(D.error=ge.error))),D;D=null,V=!1,++M}while(y.length>0);return!0}},25819:()=>{}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.