CyberChef/modules/Ciphers.js

2 lines
1.1 MiB
Executable File
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*! For license information please see Ciphers.js.LICENSE.txt */
(()=>{var __webpack_modules__={64133:function(module){var factory;factory=function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=177)}([function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},function(e,t,r){var n=r(2),i=n.Buffer;function a(e,t){for(var r in e)t[r]=e[r]}function o(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(a(n,t),t.Buffer=o),a(i,o),o.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},o.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},function(e,t,r){"use strict";(function(e){var n=r(169),i=r(168),a=r(76);function o(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(o()<t)throw new RangeError("Invalid typed array length");return c.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=c.prototype:(null===e&&(e=new c(t)),e.length=t),e}function c(e,t,r){if(!(c.TYPED_ARRAY_SUPPORT||this instanceof c))return new c(e,t,r);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return h(this,e)}return u(this,e,t,r)}function u(e,t,r,n){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,r,n){if(t.byteLength,r<0||t.byteLength<r)throw new RangeError("'offset' is out of bounds");if(t.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");return t=void 0===r&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,r):new Uint8Array(t,r,n),c.TYPED_ARRAY_SUPPORT?(e=t).__proto__=c.prototype:e=l(e,t),e}(e,t,r,n):"string"==typeof t?function(e,t,r){if("string"==typeof r&&""!==r||(r="utf8"),!c.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|p(t,r),i=(e=s(e,n)).write(t,r);return i!==n&&(e=e.slice(0,i)),e}(e,t,r):function(e,t){if(c.isBuffer(t)){var r=0|d(t.length);return 0===(e=s(e,r)).length||t.copy(e,0,0,r),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(n=t.length)!=n?s(e,0):l(e,t);if("Buffer"===t.type&&a(t.data))return l(e,t.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function f(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function h(e,t){if(f(t),e=s(e,t<0?0:0|d(t)),!c.TYPED_ARRAY_SUPPORT)for(var r=0;r<t;++r)e[r]=0;return e}function l(e,t){var r=t.length<0?0:0|d(t.length);e=s(e,r);for(var n=0;n<r;n+=1)e[n]=255&t[n];return e}function d(e){if(e>=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|e}function p(e,t){if(c.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return K(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return G(e).length;default:if(n)return K(e).length;t=(""+t).toLowerCase(),n=!0}}function y(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return R(this,t,r);case"utf8":case"utf-8":return T(this,t,r);case"ascii":return k(this,t,r);case"latin1":case"binary":return _(this,t,r);case"base64":return B(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function g(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function v(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=c.from(t,n)),c.isBuffer(t))return 0===t.length?-1:m(e,t,r,n,i);if("number"==typeof t)return t&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):m(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function m(e,t,r,n,i){var a,o=1,s=e.length,c=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;o=2,s/=2,c/=2,r/=2}function u(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){var f=-1;for(a=r;a<s;a++)if(u(e,a)===u(t,-1===f?0:a-f)){if(-1===f&&(f=a),a-f+1===c)return f*o}else-1!==f&&(a-=a-f),f=-1}else for(r+c>s&&(r=s-c),a=r;a>=0;a--){for(var h=!0,l=0;l<c;l++)if(u(e,a+l)!==u(t,l)){h=!1;break}if(h)return a}return-1}function b(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;var a=t.length;if(a%2!=0)throw new TypeError("Invalid hex string");n>a/2&&(n=a/2);for(var o=0;o<n;++o){var s=parseInt(t.substr(2*o,2),16);if(isNaN(s))return o;e[r+o]=s}return o}function w(e,t,r,n){return j(K(t,e.length-r),e,r,n)}function C(e,t,r,n){return j(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function E(e,t,r,n){return C(e,t,r,n)}function S(e,t,r,n){return j(G(t),e,r,n)}function A(e,t,r,n){return j(function(e,t){for(var r,n,i,a=[],o=0;o<e.length&&!((t-=2)<0);++o)n=(r=e.charCodeAt(o))>>8,i=r%256,a.push(i),a.push(n);return a}(t,e.length-r),e,r,n)}function B(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function T(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i<r;){var a,o,s,c,u=e[i],f=null,h=u>239?4:u>223?3:u>191?2:1;if(i+h<=r)switch(h){case 1:u<128&&(f=u);break;case 2:128==(192&(a=e[i+1]))&&(c=(31&u)<<6|63&a)>127&&(f=c);break;case 3:a=e[i+1],o=e[i+2],128==(192&a)&&128==(192&o)&&(c=(15&u)<<12|(63&a)<<6|63&o)>2047&&(c<55296||c>57343)&&(f=c);break;case 4:a=e[i+1],o=e[i+2],s=e[i+3],128==(192&a)&&128==(192&o)&&128==(192&s)&&(c=(15&u)<<18|(63&a)<<12|(63&o)<<6|63&s)>65535&&c<1114112&&(f=c)}null===f?(f=65533,h=1):f>65535&&(f-=65536,n.push(f>>>10&1023|55296),f=56320|1023&f),n.push(f),i+=h}return function(e){var t=e.length;if(t<=I)return String.fromCharCode.apply(String,e);for(var r="",n=0;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=I));return r}(n)}t.Buffer=c,t.SlowBuffer=function(e){return+e!=e&&(e=0),c.alloc(+e)},t.INSPECT_MAX_BYTES=50,c.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=o(),c.poolSize=8192,c._augment=function(e){return e.__proto__=c.prototype,e},c.from=function(e,t,r){return u(null,e,t,r)},c.TYPED_ARRAY_SUPPORT&&(c.prototype.__proto__=Uint8Array.prototype,c.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&c[Symbol.species]===c&&Object.defineProperty(c,Symbol.species,{value:null,configurable:!0})),c.alloc=function(e,t,r){return function(e,t,r,n){return f(t),t<=0?s(e,t):void 0!==r?"string"==typeof n?s(e,t).fill(r,n):s(e,t).fill(r):s(e,t)}(null,e,t,r)},c.allocUnsafe=function(e){return h(null,e)},c.allocUnsafeSlow=function(e){return h(null,e)},c.isBuffer=function(e){return!(null==e||!e._isBuffer)},c.compare=function(e,t){if(!c.isBuffer(e)||!c.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,n=t.length,i=0,a=Math.min(r,n);i<a;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},c.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(e,t){if(!a(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=c.allocUnsafe(t),i=0;for(r=0;r<e.length;++r){var o=e[r];if(!c.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,i),i+=o.length}return n},c.byteLength=p,c.prototype._isBuffer=!0,c.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)g(this,t,t+1);return this},c.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)g(this,t,t+3),g(this,t+1,t+2);return this},c.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},c.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?T(this,0,e):y.apply(this,arguments)},c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){var e="",r=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),"<Buffer "+e+">"},c.prototype.compare=function(e,t,r,n,i){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;for(var a=(i>>>=0)-(n>>>=0),o=(r>>>=0)-(t>>>=0),s=Math.min(a,o),u=this.slice(n,i),f=e.slice(t,r),h=0;h<s;++h)if(u[h]!==f[h]){a=u[h],o=f[h];break}return a<o?-1:o<a?1:0},c.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},c.prototype.indexOf=function(e,t,r){return v(this,e,t,r,!0)},c.prototype.lastIndexOf=function(e,t,r){return v(this,e,t,r,!1)},c.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var a=!1;;)switch(n){case"hex":return b(this,e,t,r);case"utf8":case"utf-8":return w(this,e,t,r);case"ascii":return C(this,e,t,r);case"latin1":case"binary":return E(this,e,t,r);case"base64":return S(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,e,t,r);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var I=4096;function k(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function _(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function R(e,t,r){var n,i=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>i)&&(r=i);for(var a="",o=t;o<r;++o)a+=(n=e[o])<16?"0"+n.toString(16):n.toString(16);return a}function x(e,t,r){for(var n=e.slice(t,r),i="",a=0;a<n.length;a+=2)i+=String.fromCharCode(n[a]+256*n[a+1]);return i}function F(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function D(e,t,r,n,i,a){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<a)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function P(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,a=Math.min(e.length-r,2);i<a;++i)e[r+i]=(t&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function U(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,a=Math.min(e.length-r,4);i<a;++i)e[r+i]=t>>>8*(n?i:3-i)&255}function N(e,t,r,n,i,a){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function L(e,t,r,n,a){return a||N(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function M(e,t,r,n,a){return a||N(e,0,r,8),i.write(e,t,r,n,52,8),r+8}c.prototype.slice=function(e,t){var r,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e),c.TYPED_ARRAY_SUPPORT)(r=this.subarray(e,t)).__proto__=c.prototype;else{var i=t-e;r=new c(i,void 0);for(var a=0;a<i;++a)r[a]=this[a+e]}return r},c.prototype.readUIntLE=function(e,t,r){e|=0,t|=0,r||F(e,t,this.length);for(var n=this[e],i=1,a=0;++a<t&&(i*=256);)n+=this[e+a]*i;return n},c.prototype.readUIntBE=function(e,t,r){e|=0,t|=0,r||F(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},c.prototype.readUInt8=function(e,t){return t||F(e,1,this.length),this[e]},c.prototype.readUInt16LE=function(e,t){return t||F(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUInt16BE=function(e,t){return t||F(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUInt32LE=function(e,t){return t||F(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUInt32BE=function(e,t){return t||F(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||F(e,t,this.length);for(var n=this[e],i=1,a=0;++a<t&&(i*=256);)n+=this[e+a]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*t)),n},c.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||F(e,t,this.length);for(var n=t,i=1,a=this[e+--n];n>0&&(i*=256);)a+=this[e+--n]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*t)),a},c.prototype.readInt8=function(e,t){return t||F(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){t||F(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(e,t){t||F(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(e,t){return t||F(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return t||F(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readFloatLE=function(e,t){return t||F(e,4,this.length),i.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return t||F(e,4,this.length),i.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return t||F(e,8,this.length),i.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return t||F(e,8,this.length),i.read(this,e,!1,52,8)},c.prototype.writeUIntLE=function(e,t,r,n){e=+e,t|=0,r|=0,n||D(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,a=0;for(this[t]=255&e;++a<r&&(i*=256);)this[t+a]=e/i&255;return t+r},c.prototype.writeUIntBE=function(e,t,r,n){e=+e,t|=0,r|=0,n||D(this,e,t,r,Math.pow(2,8*r)-1,0);var i=r-1,a=1;for(this[t+i]=255&e;--i>=0&&(a*=256);)this[t+i]=e/a&255;return t+r},c.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||D(this,e,t,1,255,0),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},c.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||D(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):P(this,e,t,!0),t+2},c.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||D(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):P(this,e,t,!1),t+2},c.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||D(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):U(this,e,t,!0),t+4},c.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||D(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):U(this,e,t,!1),t+4},c.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);D(this,e,t,r,i-1,-i)}var a=0,o=1,s=0;for(this[t]=255&e;++a<r&&(o*=256);)e<0&&0===s&&0!==this[t+a-1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+r},c.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);D(this,e,t,r,i-1,-i)}var a=r-1,o=1,s=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+r},c.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||D(this,e,t,1,127,-128),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||D(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):P(this,e,t,!0),t+2},c.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||D(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):P(this,e,t,!1),t+2},c.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||D(this,e,t,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):U(this,e,t,!0),t+4},c.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||D(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):U(this,e,t,!1),t+4},c.prototype.writeFloatLE=function(e,t,r){return L(this,e,t,!0,r)},c.prototype.writeFloatBE=function(e,t,r){return L(this,e,t,!1,r)},c.prototype.writeDoubleLE=function(e,t,r){return M(this,e,t,!0,r)},c.prototype.writeDoubleBE=function(e,t,r){return M(this,e,t,!1,r)},c.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var i,a=n-r;if(this===e&&r<t&&t<n)for(i=a-1;i>=0;--i)e[i+t]=this[i+r];else if(a<1e3||!c.TYPED_ARRAY_SUPPORT)for(i=0;i<a;++i)e[i+t]=this[i+r];else Uint8Array.prototype.set.call(e,this.subarray(r,r+a),t);return a},c.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!c.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;var a;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(a=t;a<r;++a)this[a]=e;else{var o=c.isBuffer(e)?e:K(new c(e,n).toString()),s=o.length;for(a=0;a<r-t;++a)this[a+t]=o[a%s]}return this};var O=/[^+\/0-9A-Za-z-_]/g;function K(e,t){var r;t=t||1/0;for(var n=e.length,i=null,a=[],o=0;o<n;++o){if((r=e.charCodeAt(o))>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===n){(t-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&a.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;a.push(r)}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function G(e){return n.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(O,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function j(e,t,r,n){for(var i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}}).call(this,r(7))},function(e,t,r){(function(e){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function a(e,t,r){if(a.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var o;"object"==typeof e?e.exports=a:t.BN=a,a.BN=a,a.wordSize=26;try{o=r(130).Buffer}catch(e){}function s(e,t,r){for(var n=0,i=Math.min(e.length,r),a=t;a<i;a++){var o=e.charCodeAt(a)-48;n<<=4,n|=o>=49&&o<=54?o-49+10:o>=17&&o<=22?o-17+10:15&o}return n}function c(e,t,r,n){for(var i=0,a=Math.min(e.length,r),o=t;o<a;o++){var s=e.charCodeAt(o)-48;i*=n,i+=s>=49?s-49+10:s>=17?s-17+10:s}return i}a.isBN=function(e){return e instanceof a||null!==e&&"object"==typeof e&&e.constructor.wordSize===a.wordSize&&Array.isArray(e.words)},a.max=function(e,t){return e.cmp(t)>0?e:t},a.min=function(e,t){return e.cmp(t)<0?e:t},a.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&i++,16===t?this._parseHex(e,i):this._parseBase(e,t,i),"-"===e[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),t,r)},a.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},a.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var a,o,s=0;if("be"===r)for(i=e.length-1,a=0;i>=0;i-=3)o=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[a]|=o<<s&67108863,this.words[a+1]=o>>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);else if("le"===r)for(i=0,a=0;i<e.length;i+=3)o=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[a]|=o<<s&67108863,this.words[a+1]=o>>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);return this.strip()},a.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n,i,a=0;for(r=e.length-6,n=0;r>=t;r-=6)i=s(e,r,r+6),this.words[n]|=i<<a&67108863,this.words[n+1]|=i>>>26-a&4194303,(a+=24)>=26&&(a-=26,n++);r+6!==t&&(i=s(e,t,r+6),this.words[n]|=i<<a&67108863,this.words[n+1]|=i>>>26-a&4194303),this.strip()},a.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var a=e.length-r,o=a%n,s=Math.min(a,a-o)+r,u=0,f=r;f<s;f+=n)u=c(e,f,f+n,t),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==o){var h=1;for(u=c(e,f,e.length,t),f=0;f<o;f++)h*=t;this.imuln(h),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}},a.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},a.prototype.clone=function(){var e=new a(null);return this.copy(e),e},a.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},a.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],h=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function l(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],a=0|t.words[0],o=i*a,s=67108863&o,c=o/67108864|0;r.words[0]=s;for(var u=1;u<n;u++){for(var f=c>>>26,h=67108863&c,l=Math.min(u,t.length-1),d=Math.max(0,u-e.length+1);d<=l;d++){var p=u-d|0;f+=(o=(i=0|e.words[p])*(a=0|t.words[d])+h)/67108864|0,h=67108863&o}r.words[u]=0|h,c=0|f}return 0!==c?r.words[u]=0|c:r.length--,r.strip()}a.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,a=0,o=0;o<this.length;o++){var s=this.words[o],c=(16777215&(s<<i|a)).toString(16);r=0!=(a=s>>>24-i&16777215)||o!==this.length-1?u[6-c.length]+c+r:c+r,(i+=2)>=26&&(i-=26,o--)}for(0!==a&&(r=a.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var l=f[e],d=h[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var y=p.modn(d).toString(e);r=(p=p.idivn(d)).isZero()?y+r:u[l-y.length]+y+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(e,t){return n(void 0!==o),this.toArrayLike(o,e,t)},a.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},a.prototype.toArrayLike=function(e,t,r){var i=this.byteLength(),a=r||Math.max(1,i);n(i<=a,"byte array longer than desired length"),n(a>0,"Requested array length <= 0"),this.strip();var o,s,c="le"===t,u=new e(a),f=this.clone();if(c){for(s=0;!f.isZero();s++)o=f.andln(255),f.iushrn(8),u[s]=o;for(;s<a;s++)u[s]=0}else{for(s=0;s<a-i;s++)u[s]=0;for(s=0;!f.isZero();s++)o=f.andln(255),f.iushrn(8),u[a-s-1]=o}return u},Math.clz32?a.prototype._countBits=function(e){return 32-Math.clz32(e)}:a.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},a.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},a.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},a.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},a.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},a.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},a.prototype.isNeg=function(){return 0!==this.negative},a.prototype.neg=function(){return this.clone().ineg()},a.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},a.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},a.prototype.ior=function(e){return n(0==(this.negative|e.negative)),this.iuor(e)},a.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},a.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},a.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this.strip()},a.prototype.iand=function(e){return n(0==(this.negative|e.negative)),this.iuand(e)},a.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},a.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},a.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;n<r.length;n++)this.words[n]=t.words[n]^r.words[n];if(this!==t)for(;n<t.length;n++)this.words[n]=t.words[n];return this.length=t.length,this.strip()},a.prototype.ixor=function(e){return n(0==(this.negative|e.negative)),this.iuxor(e)},a.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},a.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},a.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},a.prototype.notn=function(e){return this.clone().inotn(e)},a.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<i:this.words[r]&~(1<<i),this.strip()},a.prototype.iadd=function(e){var t,r,n;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(r=this,n=e):(r=e,n=this);for(var i=0,a=0;a<n.length;a++)t=(0|r.words[a])+(0|n.words[a])+i,this.words[a]=67108863&t,i=t>>>26;for(;0!==i&&a<r.length;a++)t=(0|r.words[a])+i,this.words[a]=67108863&t,i=t>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this},a.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},a.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var a=0,o=0;o<n.length;o++)a=(t=(0|r.words[o])-(0|n.words[o])+a)>>26,this.words[o]=67108863&t;for(;0!==a&&o<r.length;o++)a=(t=(0|r.words[o])+a)>>26,this.words[o]=67108863&t;if(0===a&&o<r.length&&r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this.length=Math.max(this.length,o),r!==this&&(this.negative=1),this.strip()},a.prototype.sub=function(e){return this.clone().isub(e)};var d=function(e,t,r){var n,i,a,o=e.words,s=t.words,c=r.words,u=0,f=0|o[0],h=8191&f,l=f>>>13,d=0|o[1],p=8191&d,y=d>>>13,g=0|o[2],v=8191&g,m=g>>>13,b=0|o[3],w=8191&b,C=b>>>13,E=0|o[4],S=8191&E,A=E>>>13,B=0|o[5],T=8191&B,I=B>>>13,k=0|o[6],_=8191&k,R=k>>>13,x=0|o[7],F=8191&x,D=x>>>13,P=0|o[8],U=8191&P,N=P>>>13,L=0|o[9],M=8191&L,O=L>>>13,K=0|s[0],G=8191&K,j=K>>>13,V=0|s[1],H=8191&V,q=V>>>13,z=0|s[2],W=8191&z,X=z>>>13,Y=0|s[3],Q=8191&Y,Z=Y>>>13,J=0|s[4],$=8191&J,ee=J>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ie=0|s[6],ae=8191&ie,oe=ie>>>13,se=0|s[7],ce=8191&se,ue=se>>>13,fe=0|s[8],he=8191&fe,le=fe>>>13,de=0|s[9],pe=8191&de,ye=de>>>13;r.negative=e.negative^t.negative,r.length=19;var ge=(u+(n=Math.imul(h,G))|0)+((8191&(i=(i=Math.imul(h,j))+Math.imul(l,G)|0))<<13)|0;u=((a=Math.imul(l,j))+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(p,G),i=(i=Math.imul(p,j))+Math.imul(y,G)|0,a=Math.imul(y,j);var ve=(u+(n=n+Math.imul(h,H)|0)|0)+((8191&(i=(i=i+Math.imul(h,q)|0)+Math.imul(l,H)|0))<<13)|0;u=((a=a+Math.imul(l,q)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(v,G),i=(i=Math.imul(v,j))+Math.imul(m,G)|0,a=Math.imul(m,j),n=n+Math.imul(p,H)|0,i=(i=i+Math.imul(p,q)|0)+Math.imul(y,H)|0,a=a+Math.imul(y,q)|0;var me=(u+(n=n+Math.imul(h,W)|0)|0)+((8191&(i=(i=i+Math.imul(h,X)|0)+Math.imul(l,W)|0))<<13)|0;u=((a=a+Math.imul(l,X)|0)+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(w,G),i=(i=Math.imul(w,j))+Math.imul(C,G)|0,a=Math.imul(C,j),n=n+Math.imul(v,H)|0,i=(i=i+Math.imul(v,q)|0)+Math.imul(m,H)|0,a=a+Math.imul(m,q)|0,n=n+Math.imul(p,W)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(y,W)|0,a=a+Math.imul(y,X)|0;var be=(u+(n=n+Math.imul(h,Q)|0)|0)+((8191&(i=(i=i+Math.imul(h,Z)|0)+Math.imul(l,Q)|0))<<13)|0;u=((a=a+Math.imul(l,Z)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(S,G),i=(i=Math.imul(S,j))+Math.imul(A,G)|0,a=Math.imul(A,j),n=n+Math.imul(w,H)|0,i=(i=i+Math.imul(w,q)|0)+Math.imul(C,H)|0,a=a+Math.imul(C,q)|0,n=n+Math.imul(v,W)|0,i=(i=i+Math.imul(v,X)|0)+Math.imul(m,W)|0,a=a+Math.imul(m,X)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(y,Q)|0,a=a+Math.imul(y,Z)|0;var we=(u+(n=n+Math.imul(h,$)|0)|0)+((8191&(i=(i=i+Math.imul(h,ee)|0)+Math.imul(l,$)|0))<<13)|0;u=((a=a+Math.imul(l,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(T,G),i=(i=Math.imul(T,j))+Math.imul(I,G)|0,a=Math.imul(I,j),n=n+Math.imul(S,H)|0,i=(i=i+Math.imul(S,q)|0)+Math.imul(A,H)|0,a=a+Math.imul(A,q)|0,n=n+Math.imul(w,W)|0,i=(i=i+Math.imul(w,X)|0)+Math.imul(C,W)|0,a=a+Math.imul(C,X)|0,n=n+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,Z)|0)+Math.imul(m,Q)|0,a=a+Math.imul(m,Z)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(y,$)|0,a=a+Math.imul(y,ee)|0;var Ce=(u+(n=n+Math.imul(h,re)|0)|0)+((8191&(i=(i=i+Math.imul(h,ne)|0)+Math.imul(l,re)|0))<<13)|0;u=((a=a+Math.imul(l,ne)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(_,G),i=(i=Math.imul(_,j))+Math.imul(R,G)|0,a=Math.imul(R,j),n=n+Math.imul(T,H)|0,i=(i=i+Math.imul(T,q)|0)+Math.imul(I,H)|0,a=a+Math.imul(I,q)|0,n=n+Math.imul(S,W)|0,i=(i=i+Math.imul(S,X)|0)+Math.imul(A,W)|0,a=a+Math.imul(A,X)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,Z)|0)+Math.imul(C,Q)|0,a=a+Math.imul(C,Z)|0,n=n+Math.imul(v,$)|0,i=(i=i+Math.imul(v,ee)|0)+Math.imul(m,$)|0,a=a+Math.imul(m,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(y,re)|0,a=a+Math.imul(y,ne)|0;var Ee=(u+(n=n+Math.imul(h,ae)|0)|0)+((8191&(i=(i=i+Math.imul(h,oe)|0)+Math.imul(l,ae)|0))<<13)|0;u=((a=a+Math.imul(l,oe)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(F,G),i=(i=Math.imul(F,j))+Math.imul(D,G)|0,a=Math.imul(D,j),n=n+Math.imul(_,H)|0,i=(i=i+Math.imul(_,q)|0)+Math.imul(R,H)|0,a=a+Math.imul(R,q)|0,n=n+Math.imul(T,W)|0,i=(i=i+Math.imul(T,X)|0)+Math.imul(I,W)|0,a=a+Math.imul(I,X)|0,n=n+Math.imul(S,Q)|0,i=(i=i+Math.imul(S,Z)|0)+Math.imul(A,Q)|0,a=a+Math.imul(A,Z)|0,n=n+Math.imul(w,$)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(C,$)|0,a=a+Math.imul(C,ee)|0,n=n+Math.imul(v,re)|0,i=(i=i+Math.imul(v,ne)|0)+Math.imul(m,re)|0,a=a+Math.imul(m,ne)|0,n=n+Math.imul(p,ae)|0,i=(i=i+Math.imul(p,oe)|0)+Math.imul(y,ae)|0,a=a+Math.imul(y,oe)|0;var Se=(u+(n=n+Math.imul(h,ce)|0)|0)+((8191&(i=(i=i+Math.imul(h,ue)|0)+Math.imul(l,ce)|0))<<13)|0;u=((a=a+Math.imul(l,ue)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(U,G),i=(i=Math.imul(U,j))+Math.imul(N,G)|0,a=Math.imul(N,j),n=n+Math.imul(F,H)|0,i=(i=i+Math.imul(F,q)|0)+Math.imul(D,H)|0,a=a+Math.imul(D,q)|0,n=n+Math.imul(_,W)|0,i=(i=i+Math.imul(_,X)|0)+Math.imul(R,W)|0,a=a+Math.imul(R,X)|0,n=n+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,Z)|0)+Math.imul(I,Q)|0,a=a+Math.imul(I,Z)|0,n=n+Math.imul(S,$)|0,i=(i=i+Math.imul(S,ee)|0)+Math.imul(A,$)|0,a=a+Math.imul(A,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(C,re)|0,a=a+Math.imul(C,ne)|0,n=n+Math.imul(v,ae)|0,i=(i=i+Math.imul(v,oe)|0)+Math.imul(m,ae)|0,a=a+Math.imul(m,oe)|0,n=n+Math.imul(p,ce)|0,i=(i=i+Math.imul(p,ue)|0)+Math.imul(y,ce)|0,a=a+Math.imul(y,ue)|0;var Ae=(u+(n=n+Math.imul(h,he)|0)|0)+((8191&(i=(i=i+Math.imul(h,le)|0)+Math.imul(l,he)|0))<<13)|0;u=((a=a+Math.imul(l,le)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(M,G),i=(i=Math.imul(M,j))+Math.imul(O,G)|0,a=Math.imul(O,j),n=n+Math.imul(U,H)|0,i=(i=i+Math.imul(U,q)|0)+Math.imul(N,H)|0,a=a+Math.imul(N,q)|0,n=n+Math.imul(F,W)|0,i=(i=i+Math.imul(F,X)|0)+Math.imul(D,W)|0,a=a+Math.imul(D,X)|0,n=n+Math.imul(_,Q)|0,i=(i=i+Math.imul(_,Z)|0)+Math.imul(R,Q)|0,a=a+Math.imul(R,Z)|0,n=n+Math.imul(T,$)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(I,$)|0,a=a+Math.imul(I,ee)|0,n=n+Math.imul(S,re)|0,i=(i=i+Math.imul(S,ne)|0)+Math.imul(A,re)|0,a=a+Math.imul(A,ne)|0,n=n+Math.imul(w,ae)|0,i=(i=i+Math.imul(w,oe)|0)+Math.imul(C,ae)|0,a=a+Math.imul(C,oe)|0,n=n+Math.imul(v,ce)|0,i=(i=i+Math.imul(v,ue)|0)+Math.imul(m,ce)|0,a=a+Math.imul(m,ue)|0,n=n+Math.imul(p,he)|0,i=(i=i+Math.imul(p,le)|0)+Math.imul(y,he)|0,a=a+Math.imul(y,le)|0;var Be=(u+(n=n+Math.imul(h,pe)|0)|0)+((8191&(i=(i=i+Math.imul(h,ye)|0)+Math.imul(l,pe)|0))<<13)|0;u=((a=a+Math.imul(l,ye)|0)+(i>>>13)|0)+(Be>>>26)|0,Be&=67108863,n=Math.imul(M,H),i=(i=Math.imul(M,q))+Math.imul(O,H)|0,a=Math.imul(O,q),n=n+Math.imul(U,W)|0,i=(i=i+Math.imul(U,X)|0)+Math.imul(N,W)|0,a=a+Math.imul(N,X)|0,n=n+Math.imul(F,Q)|0,i=(i=i+Math.imul(F,Z)|0)+Math.imul(D,Q)|0,a=a+Math.imul(D,Z)|0,n=n+Math.imul(_,$)|0,i=(i=i+Math.imul(_,ee)|0)+Math.imul(R,$)|0,a=a+Math.imul(R,ee)|0,n=n+Math.imul(T,re)|0,i=(i=i+Math.imul(T,ne)|0)+Math.imul(I,re)|0,a=a+Math.imul(I,ne)|0,n=n+Math.imul(S,ae)|0,i=(i=i+Math.imul(S,oe)|0)+Math.imul(A,ae)|0,a=a+Math.imul(A,oe)|0,n=n+Math.imul(w,ce)|0,i=(i=i+Math.imul(w,ue)|0)+Math.imul(C,ce)|0,a=a+Math.imul(C,ue)|0,n=n+Math.imul(v,he)|0,i=(i=i+Math.imul(v,le)|0)+Math.imul(m,he)|0,a=a+Math.imul(m,le)|0;var Te=(u+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,ye)|0)+Math.imul(y,pe)|0))<<13)|0;u=((a=a+Math.imul(y,ye)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(M,W),i=(i=Math.imul(M,X))+Math.imul(O,W)|0,a=Math.imul(O,X),n=n+Math.imul(U,Q)|0,i=(i=i+Math.imul(U,Z)|0)+Math.imul(N,Q)|0,a=a+Math.imul(N,Z)|0,n=n+Math.imul(F,$)|0,i=(i=i+Math.imul(F,ee)|0)+Math.imul(D,$)|0,a=a+Math.imul(D,ee)|0,n=n+Math.imul(_,re)|0,i=(i=i+Math.imul(_,ne)|0)+Math.imul(R,re)|0,a=a+Math.imul(R,ne)|0,n=n+Math.imul(T,ae)|0,i=(i=i+Math.imul(T,oe)|0)+Math.imul(I,ae)|0,a=a+Math.imul(I,oe)|0,n=n+Math.imul(S,ce)|0,i=(i=i+Math.imul(S,ue)|0)+Math.imul(A,ce)|0,a=a+Math.imul(A,ue)|0,n=n+Math.imul(w,he)|0,i=(i=i+Math.imul(w,le)|0)+Math.imul(C,he)|0,a=a+Math.imul(C,le)|0;var Ie=(u+(n=n+Math.imul(v,pe)|0)|0)+((8191&(i=(i=i+Math.imul(v,ye)|0)+Math.imul(m,pe)|0))<<13)|0;u=((a=a+Math.imul(m,ye)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(M,Q),i=(i=Math.imul(M,Z))+Math.imul(O,Q)|0,a=Math.imul(O,Z),n=n+Math.imul(U,$)|0,i=(i=i+Math.imul(U,ee)|0)+Math.imul(N,$)|0,a=a+Math.imul(N,ee)|0,n=n+Math.imul(F,re)|0,i=(i=i+Math.imul(F,ne)|0)+Math.imul(D,re)|0,a=a+Math.imul(D,ne)|0,n=n+Math.imul(_,ae)|0,i=(i=i+Math.imul(_,oe)|0)+Math.imul(R,ae)|0,a=a+Math.imul(R,oe)|0,n=n+Math.imul(T,ce)|0,i=(i=i+Math.imul(T,ue)|0)+Math.imul(I,ce)|0,a=a+Math.imul(I,ue)|0,n=n+Math.imul(S,he)|0,i=(i=i+Math.imul(S,le)|0)+Math.imul(A,he)|0,a=a+Math.imul(A,le)|0;var ke=(u+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,ye)|0)+Math.imul(C,pe)|0))<<13)|0;u=((a=a+Math.imul(C,ye)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(M,$),i=(i=Math.imul(M,ee))+Math.imul(O,$)|0,a=Math.imul(O,ee),n=n+Math.imul(U,re)|0,i=(i=i+Math.imul(U,ne)|0)+Math.imul(N,re)|0,a=a+Math.imul(N,ne)|0,n=n+Math.imul(F,ae)|0,i=(i=i+Math.imul(F,oe)|0)+Math.imul(D,ae)|0,a=a+Math.imul(D,oe)|0,n=n+Math.imul(_,ce)|0,i=(i=i+Math.imul(_,ue)|0)+Math.imul(R,ce)|0,a=a+Math.imul(R,ue)|0,n=n+Math.imul(T,he)|0,i=(i=i+Math.imul(T,le)|0)+Math.imul(I,he)|0,a=a+Math.imul(I,le)|0;var _e=(u+(n=n+Math.imul(S,pe)|0)|0)+((8191&(i=(i=i+Math.imul(S,ye)|0)+Math.imul(A,pe)|0))<<13)|0;u=((a=a+Math.imul(A,ye)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(M,re),i=(i=Math.imul(M,ne))+Math.imul(O,re)|0,a=Math.imul(O,ne),n=n+Math.imul(U,ae)|0,i=(i=i+Math.imul(U,oe)|0)+Math.imul(N,ae)|0,a=a+Math.imul(N,oe)|0,n=n+Math.imul(F,ce)|0,i=(i=i+Math.imul(F,ue)|0)+Math.imul(D,ce)|0,a=a+Math.imul(D,ue)|0,n=n+Math.imul(_,he)|0,i=(i=i+Math.imul(_,le)|0)+Math.imul(R,he)|0,a=a+Math.imul(R,le)|0;var Re=(u+(n=n+Math.imul(T,pe)|0)|0)+((8191&(i=(i=i+Math.imul(T,ye)|0)+Math.imul(I,pe)|0))<<13)|0;u=((a=a+Math.imul(I,ye)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,n=Math.imul(M,ae),i=(i=Math.imul(M,oe))+Math.imul(O,ae)|0,a=Math.imul(O,oe),n=n+Math.imul(U,ce)|0,i=(i=i+Math.imul(U,ue)|0)+Math.imul(N,ce)|0,a=a+Math.imul(N,ue)|0,n=n+Math.imul(F,he)|0,i=(i=i+Math.imul(F,le)|0)+Math.imul(D,he)|0,a=a+Math.imul(D,le)|0;var xe=(u+(n=n+Math.imul(_,pe)|0)|0)+((8191&(i=(i=i+Math.imul(_,ye)|0)+Math.imul(R,pe)|0))<<13)|0;u=((a=a+Math.imul(R,ye)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(M,ce),i=(i=Math.imul(M,ue))+Math.imul(O,ce)|0,a=Math.imul(O,ue),n=n+Math.imul(U,he)|0,i=(i=i+Math.imul(U,le)|0)+Math.imul(N,he)|0,a=a+Math.imul(N,le)|0;var Fe=(u+(n=n+Math.imul(F,pe)|0)|0)+((8191&(i=(i=i+Math.imul(F,ye)|0)+Math.imul(D,pe)|0))<<13)|0;u=((a=a+Math.imul(D,ye)|0)+(i>>>13)|0)+(Fe>>>26)|0,Fe&=67108863,n=Math.imul(M,he),i=(i=Math.imul(M,le))+Math.imul(O,he)|0,a=Math.imul(O,le);var De=(u+(n=n+Math.imul(U,pe)|0)|0)+((8191&(i=(i=i+Math.imul(U,ye)|0)+Math.imul(N,pe)|0))<<13)|0;u=((a=a+Math.imul(N,ye)|0)+(i>>>13)|0)+(De>>>26)|0,De&=67108863;var Pe=(u+(n=Math.imul(M,pe))|0)+((8191&(i=(i=Math.imul(M,ye))+Math.imul(O,pe)|0))<<13)|0;return u=((a=Math.imul(O,ye))+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,c[0]=ge,c[1]=ve,c[2]=me,c[3]=be,c[4]=we,c[5]=Ce,c[6]=Ee,c[7]=Se,c[8]=Ae,c[9]=Be,c[10]=Te,c[11]=Ie,c[12]=ke,c[13]=_e,c[14]=Re,c[15]=xe,c[16]=Fe,c[17]=De,c[18]=Pe,0!==u&&(c[19]=u,r.length++),r};function p(e,t,r){return(new y).mulp(e,t,r)}function y(e,t){this.x=e,this.y=t}Math.imul||(d=l),a.prototype.mulTo=function(e,t){var r,n=this.length+e.length;return r=10===this.length&&10===e.length?d(this,e,t):n<63?l(this,e,t):n<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,a=0;a<r.length-1;a++){var o=i;i=0;for(var s=67108863&n,c=Math.min(a,t.length-1),u=Math.max(0,a-e.length+1);u<=c;u++){var f=a-u,h=(0|e.words[f])*(0|t.words[u]),l=67108863&h;s=67108863&(l=l+s|0),i+=(o=(o=o+(h/67108864|0)|0)+(l>>>26)|0)>>>26,o&=67108863}r.words[a]=s,n=o,o=i}return 0!==n?r.words[a]=n:r.length--,r.strip()}(this,e,t):p(this,e,t),r},y.prototype.makeRBT=function(e){for(var t=new Array(e),r=a.prototype._countBits(e)-1,n=0;n<e;n++)t[n]=this.revBin(n,r,e);return t},y.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e;for(var n=0,i=0;i<t;i++)n|=(1&e)<<t-i-1,e>>=1;return n},y.prototype.permute=function(e,t,r,n,i,a){for(var o=0;o<a;o++)n[o]=t[e[o]],i[o]=r[e[o]]},y.prototype.transform=function(e,t,r,n,i,a){this.permute(a,e,t,r,n,i);for(var o=1;o<i;o<<=1)for(var s=o<<1,c=Math.cos(2*Math.PI/s),u=Math.sin(2*Math.PI/s),f=0;f<i;f+=s)for(var h=c,l=u,d=0;d<o;d++){var p=r[f+d],y=n[f+d],g=r[f+d+o],v=n[f+d+o],m=h*g-l*v;v=h*v+l*g,g=m,r[f+d]=p+g,n[f+d]=y+v,r[f+d+o]=p-g,n[f+d+o]=y-v,d!==s&&(m=c*h-u*l,l=c*l+u*h,h=m)}},y.prototype.guessLen13b=function(e,t){var r=1|Math.max(t,e),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},y.prototype.conjugate=function(e,t,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=e[n];e[n]=e[r-n-1],e[r-n-1]=i,i=t[n],t[n]=-t[r-n-1],t[r-n-1]=-i}},y.prototype.normalize13b=function(e,t){for(var r=0,n=0;n<t/2;n++){var i=8192*Math.round(e[2*n+1]/t)+Math.round(e[2*n]/t)+r;e[n]=67108863&i,r=i<67108864?0:i/67108864|0}return e},y.prototype.convert13b=function(e,t,r,i){for(var a=0,o=0;o<t;o++)a+=0|e[o],r[2*o]=8191&a,a>>>=13,r[2*o+1]=8191&a,a>>>=13;for(o=2*t;o<i;++o)r[o]=0;n(0===a),n(0==(-8192&a))},y.prototype.stub=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=0;return t},y.prototype.mulp=function(e,t,r){var n=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(n),a=this.stub(n),o=new Array(n),s=new Array(n),c=new Array(n),u=new Array(n),f=new Array(n),h=new Array(n),l=r.words;l.length=n,this.convert13b(e.words,e.length,o,n),this.convert13b(t.words,t.length,u,n),this.transform(o,a,s,c,n,i),this.transform(u,a,f,h,n,i);for(var d=0;d<n;d++){var p=s[d]*f[d]-c[d]*h[d];c[d]=s[d]*h[d]+c[d]*f[d],s[d]=p}return this.conjugate(s,c,n),this.transform(s,c,l,a,n,i),this.conjugate(l,a,n),this.normalize13b(l,n),r.negative=e.negative^t.negative,r.length=e.length+t.length,r.strip()},a.prototype.mul=function(e){var t=new a(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},a.prototype.mulf=function(e){var t=new a(null);return t.words=new Array(this.length+e.length),p(this,e,t)},a.prototype.imul=function(e){return this.clone().mulTo(e,this)},a.prototype.imuln=function(e){n("number"==typeof e),n(e<67108864);for(var t=0,r=0;r<this.length;r++){var i=(0|this.words[r])*e,a=(67108863&i)+(67108863&t);t>>=26,t+=i/67108864|0,t+=a>>>26,this.words[r]=67108863&a}return 0!==t&&(this.words[r]=t,this.length++),this},a.prototype.muln=function(e){return this.clone().imuln(e)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r<t.length;r++){var n=r/26|0,i=r%26;t[r]=(e.words[n]&1<<i)>>>i}return t}(e);if(0===t.length)return new a(1);for(var r=this,n=0;n<t.length&&0===t[n];n++,r=r.sqr());if(++n<t.length)for(var i=r.sqr();n<t.length;n++,i=i.sqr())0!==t[n]&&(r=r.mul(i));return r},a.prototype.iushln=function(e){n("number"==typeof e&&e>=0);var t,r=e%26,i=(e-r)/26,a=67108863>>>26-r<<26-r;if(0!==r){var o=0;for(t=0;t<this.length;t++){var s=this.words[t]&a,c=(0|this.words[t])-s<<r;this.words[t]=c|o,o=s>>>26-r}o&&(this.words[t]=o,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this.strip()},a.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},a.prototype.iushrn=function(e,t,r){var i;n("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var a=e%26,o=Math.min((e-a)/26,this.length),s=67108863^67108863>>>a<<a,c=r;if(i-=o,i=Math.max(0,i),c){for(var u=0;u<o;u++)c.words[u]=this.words[u];c.length=o}if(0===o);else if(this.length>o)for(this.length-=o,u=0;u<this.length;u++)this.words[u]=this.words[u+o];else this.words[0]=0,this.length=1;var f=0;for(u=this.length-1;u>=0&&(0!==f||u>=i);u--){var h=0|this.words[u];this.words[u]=f<<26-a|h>>>a,f=h&s}return c&&0!==f&&(c.words[c.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},a.prototype.shln=function(e){return this.clone().ishln(e)},a.prototype.ushln=function(e){return this.clone().iushln(e)},a.prototype.shrn=function(e){return this.clone().ishrn(e)},a.prototype.ushrn=function(e){return this.clone().iushrn(e)},a.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<<t;return!(this.length<=r||!(this.words[r]&i))},a.prototype.imaskn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this.strip()},a.prototype.maskn=function(e){return this.clone().imaskn(e)},a.prototype.iaddn=function(e){return n("number"==typeof e),n(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},a.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},a.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},a.prototype.addn=function(e){return this.clone().iaddn(e)},a.prototype.subn=function(e){return this.clone().isubn(e)},a.prototype.iabs=function(){return this.negative=0,this},a.prototype.abs=function(){return this.clone().iabs()},a.prototype._ishlnsubmul=function(e,t,r){var i,a,o=e.length+r;this._expand(o);var s=0;for(i=0;i<e.length;i++){a=(0|this.words[i+r])+s;var c=(0|e.words[i])*t;s=((a-=67108863&c)>>26)-(c/67108864|0),this.words[i+r]=67108863&a}for(;i<this.length-r;i++)s=(a=(0|this.words[i+r])+s)>>26,this.words[i+r]=67108863&a;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i<this.length;i++)s=(a=-(0|this.words[i])+s)>>26,this.words[i]=67108863&a;return this.negative=1,this.strip()},a.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,o=0|i.words[i.length-1];0!=(r=26-this._countBits(o))&&(i=i.ushln(r),n.iushln(r),o=0|i.words[i.length-1]);var s,c=n.length-i.length;if("mod"!==t){(s=new a(null)).length=c+1,s.words=new Array(s.length);for(var u=0;u<s.length;u++)s.words[u]=0}var f=n.clone()._ishlnsubmul(i,1,c);0===f.negative&&(n=f,s&&(s.words[c]=1));for(var h=c-1;h>=0;h--){var l=67108864*(0|n.words[i.length+h])+(0|n.words[i.length+h-1]);for(l=Math.min(l/o|0,67108863),n._ishlnsubmul(i,l,h);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(i,1,h),n.isZero()||(n.negative^=1);s&&(s.words[h]=l)}return s&&s.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},a.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.iadd(e)),{div:i,mod:o}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.isub(e)),{div:s.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new a(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new a(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new a(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,o,s},a.prototype.div=function(e){return this.divmod(e,"div",!1).div},a.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},a.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},a.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),a=r.cmp(n);return a<0||1===i&&0===a?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},a.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},a.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},a.prototype.divn=function(e){return this.clone().idivn(e)},a.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new a(1),o=new a(0),s=new a(0),c=new a(1),u=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++u;for(var f=r.clone(),h=t.clone();!t.isZero();){for(var l=0,d=1;0==(t.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(t.iushrn(l);l-- >0;)(i.isOdd()||o.isOdd())&&(i.iadd(f),o.isub(h)),i.iushrn(1),o.iushrn(1);for(var p=0,y=1;0==(r.words[0]&y)&&p<26;++p,y<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||c.isOdd())&&(s.iadd(f),c.isub(h)),s.iushrn(1),c.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(s),o.isub(c)):(r.isub(t),s.isub(i),c.isub(o))}return{a:s,b:c,gcd:r.iushln(u)}},a.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,o=new a(1),s=new a(0),c=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,f=1;0==(t.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(t.iushrn(u);u-- >0;)o.isOdd()&&o.iadd(c),o.iushrn(1);for(var h=0,l=1;0==(r.words[0]&l)&&h<26;++h,l<<=1);if(h>0)for(r.iushrn(h);h-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),o.isub(s)):(r.isub(t),s.isub(o))}return(i=0===t.cmpn(1)?o:s).cmpn(0)<0&&i.iadd(e),i},a.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var a=t;t=r,r=a}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},a.prototype.invm=function(e){return this.egcd(e).a.umod(e)},a.prototype.isEven=function(){return 0==(1&this.words[0])},a.prototype.isOdd=function(){return 1==(1&this.words[0])},a.prototype.andln=function(e){return this.words[0]&e},a.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var a=i,o=r;0!==a&&o<this.length;o++){var s=0|this.words[o];a=(s+=a)>>>26,s&=67108863,this.words[o]=s}return 0!==a&&(this.words[o]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},a.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},a.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){n<i?t=-1:n>i&&(t=1);break}}return t},a.prototype.gtn=function(e){return 1===this.cmpn(e)},a.prototype.gt=function(e){return 1===this.cmp(e)},a.prototype.gten=function(e){return this.cmpn(e)>=0},a.prototype.gte=function(e){return this.cmp(e)>=0},a.prototype.ltn=function(e){return-1===this.cmpn(e)},a.prototype.lt=function(e){return-1===this.cmp(e)},a.prototype.lten=function(e){return this.cmpn(e)<=0},a.prototype.lte=function(e){return this.cmp(e)<=0},a.prototype.eqn=function(e){return 0===this.cmpn(e)},a.prototype.eq=function(e){return 0===this.cmp(e)},a.red=function(e){return new E(e)},a.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},a.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(e){return this.red=e,this},a.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},a.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},a.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},a.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},a.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},a.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},a.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},a.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},a.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var g={k256:null,p224:null,p192:null,p25519:null};function v(e,t){this.name=e,this.p=new a(t,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function m(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function b(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function C(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(e){if("string"==typeof e){var t=a._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function S(e){E.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var e=new a(null);return e.words=new Array(Math.ceil(this.n/13)),e},v.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):r.strip(),r},v.prototype.split=function(e,t){e.iushrn(this.n,0,t)},v.prototype.imulK=function(e){return e.imul(this.k)},i(m,v),m.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i<n;i++)t.words[i]=e.words[i];if(t.length=n,e.length<=9)return e.words[0]=0,void(e.length=1);var a=e.words[9];for(t.words[t.length++]=a&r,i=10;i<e.length;i++){var o=0|e.words[i];e.words[i-10]=(o&r)<<4|a>>>22,a=o}a>>>=22,e.words[i-10]=a,0===a&&e.length>10?e.length-=10:e.length-=9},m.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var n=0|e.words[r];t+=977*n,e.words[r]=67108863&t,t=64*n+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(b,v),i(w,v),i(C,v),C.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var n=19*(0|e.words[r])+t,i=67108863&n;n>>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},a._prime=function(e){if(g[e])return g[e];var t;if("k256"===e)t=new m;else if("p224"===e)t=new b;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new C}return g[e]=t,t},E.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},E.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},E.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},E.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},E.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},E.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},E.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},E.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},E.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},E.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},E.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},E.prototype.isqr=function(e){return this.imul(e,e.clone())},E.prototype.sqr=function(e){return this.mul(e,e)},E.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new a(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),o=0;!i.isZero()&&0===i.andln(1);)o++,i.iushrn(1);n(!i.isZero());var s=new a(1).toRed(this),c=s.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new a(2*f*f).toRed(this);0!==this.pow(f,u).cmp(c);)f.redIAdd(c);for(var h=this.pow(f,i),l=this.pow(e,i.addn(1).iushrn(1)),d=this.pow(e,i),p=o;0!==d.cmp(s);){for(var y=d,g=0;0!==y.cmp(s);g++)y=y.redSqr();n(g<p);var v=this.pow(h,new a(1).iushln(p-g-1));l=l.redMul(v),h=v.redSqr(),d=d.redMul(h),p=g}return l},E.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},E.prototype.pow=function(e,t){if(t.isZero())return new a(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=new Array(16);r[0]=new a(1).toRed(this),r[1]=e;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],e);var i=r[0],o=0,s=0,c=t.bitLength()%26;for(0===c&&(c=26),n=t.length-1;n>=0;n--){for(var u=t.words[n],f=c-1;f>=0;f--){var h=u>>f&1;i!==r[0]&&(i=this.sqr(i)),0!==h||0!==o?(o<<=1,o|=h,(4==++s||0===n&&0===f)&&(i=this.mul(i,r[o]),s=0,o=0)):s=0}c=26}return i},E.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},E.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},a.mont=function(e){return new S(e)},i(S,E),S.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},S.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},S.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},S.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new a(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},S.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===e||e,this)}).call(this,r(131)(e))},function(e,t,r){"use strict";var n=t;n.version=r(124).version,n.utils=r(123),n.rand=r(54),n.curve=r(21),n.curves=r(118),n.ec=r(110),n.eddsa=r(106)},function(e,t){function r(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=r,r.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)}},function(e,t,r){"use strict";var n=r(5),i=r(0);function a(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function o(e){return 1===e.length?"0"+e:e}function s(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=i,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),n=0;n<e.length;n+=2)r.push(parseInt(e[n]+e[n+1],16))}else for(var n=0;n<e.length;n++){var i=e.charCodeAt(n),a=i>>8,o=255&i;a?r.push(a,o):r.push(o)}else for(n=0;n<e.length;n++)r[n]=0|e[n];return r},t.toHex=function(e){for(var t="",r=0;r<e.length;r++)t+=o(e[r].toString(16));return t},t.htonl=a,t.toHex32=function(e,t){for(var r="",n=0;n<e.length;n++){var i=e[n];"little"===t&&(i=a(i)),r+=s(i.toString(16))}return r},t.zero2=o,t.zero8=s,t.join32=function(e,t,r,i){var a=r-t;n(a%4==0);for(var o=new Array(a/4),s=0,c=t;s<o.length;s++,c+=4){var u;u="big"===i?e[c]<<24|e[c+1]<<16|e[c+2]<<8|e[c+3]:e[c+3]<<24|e[c+2]<<16|e[c+1]<<8|e[c],o[s]=u>>>0}return o},t.split32=function(e,t){for(var r=new Array(4*e.length),n=0,i=0;n<e.length;n++,i+=4){var a=e[n];"big"===t?(r[i]=a>>>24,r[i+1]=a>>>16&255,r[i+2]=a>>>8&255,r[i+3]=255&a):(r[i+3]=a>>>24,r[i+2]=a>>>16&255,r[i+1]=a>>>8&255,r[i]=255&a)}return r},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<<t|e>>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,r){return e+t+r>>>0},t.sum32_4=function(e,t,r,n){return e+t+r+n>>>0},t.sum32_5=function(e,t,r,n,i){return e+t+r+n+i>>>0},t.sum64=function(e,t,r,n){var i=e[t],a=n+e[t+1]>>>0,o=(a<n?1:0)+r+i;e[t]=o>>>0,e[t+1]=a},t.sum64_hi=function(e,t,r,n){return(t+n>>>0<t?1:0)+e+r>>>0},t.sum64_lo=function(e,t,r,n){return t+n>>>0},t.sum64_4_hi=function(e,t,r,n,i,a,o,s){var c=0,u=t;return c+=(u=u+n>>>0)<t?1:0,c+=(u=u+a>>>0)<a?1:0,e+r+i+o+(c+=(u=u+s>>>0)<s?1:0)>>>0},t.sum64_4_lo=function(e,t,r,n,i,a,o,s){return t+n+a+s>>>0},t.sum64_5_hi=function(e,t,r,n,i,a,o,s,c,u){var f=0,h=t;return f+=(h=h+n>>>0)<t?1:0,f+=(h=h+a>>>0)<a?1:0,f+=(h=h+s>>>0)<s?1:0,e+r+i+o+c+(f+=(h=h+u>>>0)<u?1:0)>>>0},t.sum64_5_lo=function(e,t,r,n,i,a,o,s,c,u){return t+n+a+s+u>>>0},t.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0},t.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},t.shr64_hi=function(e,t,r){return e>>>r},t.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0}},function(e,t){var r;r=function(){return this}();try{r=r||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(r=window)}e.exports=r},function(e,t,r){var n=r(1).Buffer,i=r(37).Transform,a=r(33).StringDecoder;function o(e){i.call(this),this.hashMode="string"==typeof e,this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}r(0)(o,i),o.prototype.update=function(e,t,r){"string"==typeof e&&(e=n.from(e,t));var i=this._update(e);return this.hashMode?this:(r&&(i=this._toString(i,r)),i)},o.prototype.setAutoPadding=function(){},o.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},o.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},o.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},o.prototype._transform=function(e,t,r){var n;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(e){n=e}finally{r(n)}},o.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(e){t=e}e(t)},o.prototype._finalOrDigest=function(e){var t=this.__final()||n.alloc(0);return e&&(t=this._toString(t,e,!0)),t},o.prototype._toString=function(e,t,r){if(this._decoder||(this._decoder=new a(t),this._encoding=t),this._encoding!==t)throw new Error("can't switch encodings");var n=this._decoder.write(e);return r&&(n+=this._decoder.end()),n},e.exports=o},function(e,t){var r,n,i=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(e){if(r===setTimeout)return setTimeout(e,0);if((r===a||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:a}catch(e){r=a}try{n="function"==typeof clearTimeout?clearTimeout:o}catch(e){n=o}}();var c,u=[],f=!1,h=-1;function l(){f&&c&&(f=!1,c.length?u=c.concat(u):h=-1,u.length&&d())}function d(){if(!f){var e=s(l);f=!0;for(var t=u.length;t;){for(c=u,u=[];++h<t;)c&&c[h].run();h=-1,t=u.length}c=null,f=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===o||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{return n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function y(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];u.push(new p(e,t)),1!==u.length||f||s(d)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=y,i.addListener=y,i.once=y,i.off=y,i.removeListener=y,i.removeAllListeners=y,i.emit=y,i.prependListener=y,i.prependOnceListener=y,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(e,t,r){"use strict";var n=r(24),i=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=h;var a=r(17);a.inherits=r(0);var o=r(74),s=r(34);a.inherits(h,o);for(var c=i(s.prototype),u=0;u<c.length;u++){var f=c[u];h.prototype[f]||(h.prototype[f]=s.prototype[f])}function h(e){if(!(this instanceof h))return new h(e);o.call(this,e),s.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",l)}function l(){this.allowHalfOpen||this._writableState.ended||n.nextTick(d,this)}function d(e){e.end()}Object.defineProperty(h.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(h.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),h.prototype._destroy=function(e,t){this.push(null),this.end(),n.nextTick(t,e)}},function(e,t,r){var n=r(1).Buffer;function i(e,t){this._block=n.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}i.prototype.update=function(e,t){"string"==typeof e&&(t=t||"utf8",e=n.from(e,t));for(var r=this._block,i=this._blockSize,a=e.length,o=this._len,s=0;s<a;){for(var c=o%i,u=Math.min(a-s,i-c),f=0;f<u;f++)r[c+f]=e[s+f];s+=u,(o+=u)%i==0&&this._update(r)}return this._len+=a,this},i.prototype.digest=function(e){var t=this._len%this._blockSize;this._block[t]=128,this._block.fill(0,t+1),t>=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(4294967295&r)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var a=this._hash();return e?a.toString(e):a},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=i},function(e,t,r){"use strict";(function(t,n){var i=r(1).Buffer,a=t.crypto||t.msCrypto;a&&a.getRandomValues?e.exports=function(e,r){if(e>65536)throw new Error("requested too many random bytes");var o=new t.Uint8Array(e);e>0&&a.getRandomValues(o);var s=i.from(o.buffer);return"function"==typeof r?n.nextTick((function(){r(null,s)})):s}:e.exports=function(){throw new Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11")}}).call(this,r(7),r(9))},function(e,t,r){var n=t;n.Reporter=r(99).Reporter,n.DecoderBuffer=r(49).DecoderBuffer,n.EncoderBuffer=r(49).EncoderBuffer,n.Node=r(98)},function(e,t,r){var n=t;n.bignum=r(3),n.define=r(102).define,n.base=r(13),n.constants=r(48),n.decoders=r(96),n.encoders=r(94)},function(e,t,r){"use strict";var n=r(6),i=r(5);function a(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}t.BlockHash=a,a.prototype.update=function(e,t){if(e=n.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var r=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=n.join32(e,0,e.length-r,this.endian);for(var i=0;i<e.length;i+=this._delta32)this._update(e,i,i+this._delta32)}return this},a.prototype.digest=function(e){return this.update(this._pad()),i(null===this.pending),this._digest(e)},a.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,r=t-(e+this.padLength)%t,n=new Array(r+this.padLength);n[0]=128;for(var i=1;i<r;i++)n[i]=0;if(e<<=3,"big"===this.endian){for(var a=8;a<this.padLength;a++)n[i++]=0;n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=e>>>24&255,n[i++]=e>>>16&255,n[i++]=e>>>8&255,n[i++]=255&e}else for(n[i++]=255&e,n[i++]=e>>>8&255,n[i++]=e>>>16&255,n[i++]=e>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,a=8;a<this.padLength;a++)n[i++]=0;return n}},function(e,t,r){(function(t){e.exports=function(e,r){for(var n=Math.min(e.length,r.length),i=new t(n),a=0;a<n;++a)i[a]=e[a]^r[a];return i}}).call(this,r(2).Buffer)},function(e,t,r){(function(e){function r(e){return Object.prototype.toString.call(e)}t.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===r(e)},t.isBoolean=function(e){return"boolean"==typeof e},t.isNull=function(e){return null===e},t.isNullOrUndefined=function(e){return null==e},t.isNumber=function(e){return"number"==typeof e},t.isString=function(e){return"string"==typeof e},t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=function(e){return void 0===e},t.isRegExp=function(e){return"[object RegExp]"===r(e)},t.isObject=function(e){return"object"==typeof e&&null!==e},t.isDate=function(e){return"[object Date]"===r(e)},t.isError=function(e){return"[object Error]"===r(e)||e instanceof Error},t.isFunction=function(e){return"function"==typeof e},t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=e.isBuffer}).call(this,r(2).Buffer)},function(e,t,r){"use strict";var n=r(0),i=r(38),a=r(32),o=r(31),s=r(8);function c(e){s.call(this,"digest"),this._hash=e}n(c,s),c.prototype._update=function(e){this._hash.update(e)},c.prototype._final=function(){return this._hash.digest()},e.exports=function(e){return"md5"===(e=e.toLowerCase())?new i:"rmd160"===e||"ripemd160"===e?new a:new c(o(e))}},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.NotSupportedError=function(e){function t(){return n(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,Error),t}(),t.DataError=function(e){function t(){return n(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,Error),t}(),t.OperationError=function(e){function t(){return n(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,Error),t}()},function(e,t,r){(function(t){var n=r(103),i=r(91),a=r(90),o=r(29),s=r(65);function c(e){var r;"object"!=typeof e||t.isBuffer(e)||(r=e.passphrase,e=e.key),"string"==typeof e&&(e=new t(e));var c,u,f=a(e,r),h=f.tag,l=f.data;switch(h){case"CERTIFICATE":u=n.certificate.decode(l,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(u||(u=n.PublicKey.decode(l,"der")),c=u.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return n.RSAPublicKey.decode(u.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return u.subjectPrivateKey=u.subjectPublicKey,{type:"ec",data:u};case"1.2.840.10040.4.1":return u.algorithm.params.pub_key=n.DSAparam.decode(u.subjectPublicKey.data,"der"),{type:"dsa",data:u.algorithm.params};default:throw new Error("unknown key id "+c)}throw new Error("unknown key type "+h);case"ENCRYPTED PRIVATE KEY":l=function(e,r){var n=e.algorithm.decrypt.kde.kdeparams.salt,a=parseInt(e.algorithm.decrypt.kde.kdeparams.iters.toString(),10),c=i[e.algorithm.decrypt.cipher.algo.join(".")],u=e.algorithm.decrypt.cipher.iv,f=e.subjectPrivateKey,h=parseInt(c.split("-")[1],10)/8,l=s.pbkdf2Sync(r,n,a,h),d=o.createDecipheriv(c,l,u),p=[];return p.push(d.update(f)),p.push(d.final()),t.concat(p)}(l=n.EncryptedPrivateKey.decode(l,"der"),r);case"PRIVATE KEY":switch(c=(u=n.PrivateKey.decode(l,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return n.RSAPrivateKey.decode(u.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:u.algorithm.curve,privateKey:n.ECPrivateKey.decode(u.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return u.algorithm.params.priv_key=n.DSAparam.decode(u.subjectPrivateKey,"der"),{type:"dsa",params:u.algorithm.params};default:throw new Error("unknown key id "+c)}throw new Error("unknown key type "+h);case"RSA PUBLIC KEY":return n.RSAPublicKey.decode(l,"der");case"RSA PRIVATE KEY":return n.RSAPrivateKey.decode(l,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:n.DSAPrivateKey.decode(l,"der")};case"EC PRIVATE KEY":return{curve:(l=n.ECPrivateKey.decode(l,"der")).parameters.value,privateKey:l.privateKey};default:throw new Error("unknown key type "+h)}}e.exports=c,c.signature=n.signature}).call(this,r(2).Buffer)},function(e,t,r){"use strict";var n=t;n.base=r(122),n.short=r(121),n.mont=r(120),n.edwards=r(119)},function(e,t,r){var n=r(1).Buffer,i=r(38);e.exports=function(e,t,r,a){if(n.isBuffer(e)||(e=n.from(e,"binary")),t&&(n.isBuffer(t)||(t=n.from(t,"binary")),8!==t.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var o=r/8,s=n.alloc(o),c=n.alloc(a||0),u=n.alloc(0);o>0||a>0;){var f=new i;f.update(u),f.update(e),t&&f.update(t),u=f.digest();var h=0;if(o>0){var l=s.length-o;h=Math.min(o,u.length),u.copy(s,l,0,h),o-=h}if(h<u.length&&a>0){var d=c.length-a,p=Math.min(a,u.length-h);u.copy(c,d,h,h+p),a-=p}}return u.fill(0),{key:s,iv:c}}},function(e,t,r){var n=r(1).Buffer;function i(e){n.isBuffer(e)||(e=n.from(e));for(var t=e.length/4|0,r=new Array(t),i=0;i<t;i++)r[i]=e.readUInt32BE(4*i);return r}function a(e){for(;0<e.length;e++)e[0]=0}function o(e,t,r,n,i){for(var a,o,s,c,u=r[0],f=r[1],h=r[2],l=r[3],d=e[0]^t[0],p=e[1]^t[1],y=e[2]^t[2],g=e[3]^t[3],v=4,m=1;m<i;m++)a=u[d>>>24]^f[p>>>16&255]^h[y>>>8&255]^l[255&g]^t[v++],o=u[p>>>24]^f[y>>>16&255]^h[g>>>8&255]^l[255&d]^t[v++],s=u[y>>>24]^f[g>>>16&255]^h[d>>>8&255]^l[255&p]^t[v++],c=u[g>>>24]^f[d>>>16&255]^h[p>>>8&255]^l[255&y]^t[v++],d=a,p=o,y=s,g=c;return a=(n[d>>>24]<<24|n[p>>>16&255]<<16|n[y>>>8&255]<<8|n[255&g])^t[v++],o=(n[p>>>24]<<24|n[y>>>16&255]<<16|n[g>>>8&255]<<8|n[255&d])^t[v++],s=(n[y>>>24]<<24|n[g>>>16&255]<<16|n[d>>>8&255]<<8|n[255&p])^t[v++],c=(n[g>>>24]<<24|n[d>>>16&255]<<16|n[p>>>8&255]<<8|n[255&y])^t[v++],[a>>>=0,o>>>=0,s>>>=0,c>>>=0]}var s=[0,1,2,4,8,16,32,64,128,27,54],c=function(){for(var e=new Array(256),t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;for(var r=[],n=[],i=[[],[],[],[]],a=[[],[],[],[]],o=0,s=0,c=0;c<256;++c){var u=s^s<<1^s<<2^s<<3^s<<4;u=u>>>8^255&u^99,r[o]=u,n[u]=o;var f=e[o],h=e[f],l=e[h],d=257*e[u]^16843008*u;i[0][o]=d<<24|d>>>8,i[1][o]=d<<16|d>>>16,i[2][o]=d<<8|d>>>24,i[3][o]=d,d=16843009*l^65537*h^257*f^16843008*o,a[0][u]=d<<24|d>>>8,a[1][u]=d<<16|d>>>16,a[2][u]=d<<8|d>>>24,a[3][u]=d,0===o?o=s=1:(o=f^e[e[e[l^f]]],s^=e[e[s]])}return{SBOX:r,INV_SBOX:n,SUB_MIX:i,INV_SUB_MIX:a}}();function u(e){this._key=i(e),this._reset()}u.blockSize=16,u.keySize=32,u.prototype.blockSize=u.blockSize,u.prototype.keySize=u.keySize,u.prototype._reset=function(){for(var e=this._key,t=e.length,r=t+6,n=4*(r+1),i=[],a=0;a<t;a++)i[a]=e[a];for(a=t;a<n;a++){var o=i[a-1];a%t==0?(o=o<<8|o>>>24,o=c.SBOX[o>>>24]<<24|c.SBOX[o>>>16&255]<<16|c.SBOX[o>>>8&255]<<8|c.SBOX[255&o],o^=s[a/t|0]<<24):t>6&&a%t==4&&(o=c.SBOX[o>>>24]<<24|c.SBOX[o>>>16&255]<<16|c.SBOX[o>>>8&255]<<8|c.SBOX[255&o]),i[a]=i[a-t]^o}for(var u=[],f=0;f<n;f++){var h=n-f,l=i[h-(f%4?0:4)];u[f]=f<4||h<=4?l:c.INV_SUB_MIX[0][c.SBOX[l>>>24]]^c.INV_SUB_MIX[1][c.SBOX[l>>>16&255]]^c.INV_SUB_MIX[2][c.SBOX[l>>>8&255]]^c.INV_SUB_MIX[3][c.SBOX[255&l]]}this._nRounds=r,this._keySchedule=i,this._invKeySchedule=u},u.prototype.encryptBlockRaw=function(e){return o(e=i(e),this._keySchedule,c.SUB_MIX,c.SBOX,this._nRounds)},u.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),r=n.allocUnsafe(16);return r.writeUInt32BE(t[0],0),r.writeUInt32BE(t[1],4),r.writeUInt32BE(t[2],8),r.writeUInt32BE(t[3],12),r},u.prototype.decryptBlock=function(e){var t=(e=i(e))[1];e[1]=e[3],e[3]=t;var r=o(e,this._invKeySchedule,c.INV_SUB_MIX,c.INV_SBOX,this._nRounds),a=n.allocUnsafe(16);return a.writeUInt32BE(r[0],0),a.writeUInt32BE(r[3],4),a.writeUInt32BE(r[2],8),a.writeUInt32BE(r[1],12),a},u.prototype.scrub=function(){a(this._keySchedule),a(this._invKeySchedule),a(this._key)},e.exports.AES=u},function(e,t,r){"use strict";(function(t){!t.version||0===t.version.indexOf("v0.")||0===t.version.indexOf("v1.")&&0!==t.version.indexOf("v1.8.")?e.exports={nextTick:function(e,r,n,i){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var a,o,s=arguments.length;switch(s){case 0:case 1:return t.nextTick(e);case 2:return t.nextTick((function(){e.call(null,r)}));case 3:return t.nextTick((function(){e.call(null,r,n)}));case 4:return t.nextTick((function(){e.call(null,r,n,i)}));default:for(a=new Array(s-1),o=0;o<a.length;)a[o++]=arguments[o];return t.nextTick((function(){e.apply(null,a)}))}}}:e.exports=t}).call(this,r(9))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSeed=function(e){var t=new n.GostRandom;try{var r=new Uint8Array(Math.ceil(e/8));return t.getRandomValues(r),r}catch(e){throw new Error("Error occurred during random values generation")}},t.randomSeed=function(e){try{return(new n.GostRandom).getRandomValues(e)}catch(e){throw new Error("Error occurred during random values generation")}};var n=r(80)},function(e,t,r){var n=t;n.utils=r(6),n.common=r(15),n.sha=r(117),n.ripemd=r(113),n.hmac=r(112),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},function(e,t,r){(function(t){var n=r(3),i=r(12);function a(e,r){var i=function(e){var t=o(e);return{blinder:t.toRed(n.mont(e.modulus)).redPow(new n(e.publicExponent)).fromRed(),unblinder:t.invm(e.modulus)}}(r),a=r.modulus.byteLength(),s=(n.mont(r.modulus),new n(e).mul(i.blinder).umod(r.modulus)),c=s.toRed(n.mont(r.prime1)),u=s.toRed(n.mont(r.prime2)),f=r.coefficient,h=r.prime1,l=r.prime2,d=c.redPow(r.exponent1),p=u.redPow(r.exponent2);d=d.fromRed(),p=p.fromRed();var y=d.isub(p).imul(f).umod(h);return y.imul(l),p.iadd(y),new t(p.imul(i.unblinder).umod(r.modulus).toArray(!1,a))}function o(e){for(var t=e.modulus.byteLength(),r=new n(i(t));r.cmp(e.modulus)>=0||!r.umod(e.prime1)||!r.umod(e.prime2);)r=new n(i(t));return r}e.exports=a,a.getr=o}).call(this,r(2).Buffer)},function(e,t,r){var n={ECB:r(141),CBC:r(140),CFB:r(139),CFB8:r(138),CFB1:r(137),OFB:r(136),CTR:r(61),GCM:r(61)},i=r(59);for(var a in i)i[a].module=n[i[a].mode];e.exports=i},function(e,t,r){var n=r(142),i=r(134),a=r(59);t.createCipher=t.Cipher=n.createCipher,t.createCipheriv=t.Cipheriv=n.createCipheriv,t.createDecipher=t.Decipher=i.createDecipher,t.createDecipheriv=t.Decipheriv=i.createDecipheriv,t.listCiphers=t.getCiphers=function(){return Object.keys(a)}},function(e,t,r){"use strict";t.utils=r(147),t.Cipher=r(146),t.DES=r(145),t.CBC=r(144),t.EDE=r(143)},function(e,t,r){(t=e.exports=function(e){e=e.toLowerCase();var r=t[e];if(!r)throw new Error(e+" is not supported (we accept pull requests)");return new r}).sha=r(156),t.sha1=r(155),t.sha224=r(154),t.sha256=r(70),t.sha384=r(153),t.sha512=r(69)},function(e,t,r){"use strict";var n=r(2).Buffer,i=r(0),a=r(75),o=new Array(16),s=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],c=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],u=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],f=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],h=[0,1518500249,1859775393,2400959708,2840853838],l=[1352829926,1548603684,1836072691,2053994217,0];function d(){a.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function p(e,t){return e<<t|e>>>32-t}function y(e,t,r,n,i,a,o,s){return p(e+(t^r^n)+a+o|0,s)+i|0}function g(e,t,r,n,i,a,o,s){return p(e+(t&r|~t&n)+a+o|0,s)+i|0}function v(e,t,r,n,i,a,o,s){return p(e+((t|~r)^n)+a+o|0,s)+i|0}function m(e,t,r,n,i,a,o,s){return p(e+(t&n|r&~n)+a+o|0,s)+i|0}function b(e,t,r,n,i,a,o,s){return p(e+(t^(r|~n))+a+o|0,s)+i|0}i(d,a),d.prototype._update=function(){for(var e=o,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);for(var r=0|this._a,n=0|this._b,i=0|this._c,a=0|this._d,d=0|this._e,w=0|this._a,C=0|this._b,E=0|this._c,S=0|this._d,A=0|this._e,B=0;B<80;B+=1){var T,I;B<16?(T=y(r,n,i,a,d,e[s[B]],h[0],u[B]),I=b(w,C,E,S,A,e[c[B]],l[0],f[B])):B<32?(T=g(r,n,i,a,d,e[s[B]],h[1],u[B]),I=m(w,C,E,S,A,e[c[B]],l[1],f[B])):B<48?(T=v(r,n,i,a,d,e[s[B]],h[2],u[B]),I=v(w,C,E,S,A,e[c[B]],l[2],f[B])):B<64?(T=m(r,n,i,a,d,e[s[B]],h[3],u[B]),I=g(w,C,E,S,A,e[c[B]],l[3],f[B])):(T=b(r,n,i,a,d,e[s[B]],h[4],u[B]),I=y(w,C,E,S,A,e[c[B]],l[4],f[B])),r=d,d=a,a=p(i,10),i=n,n=T,w=A,A=S,S=p(E,10),E=C,C=I}var k=this._b+i+S|0;this._b=this._c+a+A|0,this._c=this._d+d+w|0,this._d=this._e+r+C|0,this._e=this._a+n+E|0,this._a=k},d.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=n.alloc?n.alloc(20):new n(20);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e},e.exports=d},function(e,t,r){"use strict";var n=r(1).Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function a(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=c,this.end=u,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=f,this.end=h,t=3;break;default:return this.write=l,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function o(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"<22>";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"<22>";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"<22>"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function c(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function u(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function f(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function h(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function l(e){return e.toString(this.encoding)}function d(e){return e&&e.length?this.write(e):""}t.StringDecoder=a,a.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},a.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"<22>":t},a.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var i=o(t[n]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--n<r||-2===i?0:(i=o(t[n]))>=0?(i>0&&(e.lastNeed=i-2),i):--n<r||-2===i?0:(i=o(t[n]))>=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},a.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},function(e,t,r){"use strict";(function(t,n,i){var a=r(24);function o(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;for(e.entry=null;n;){var i=n.callback;t.pendingcb--,i(undefined),n=n.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}(t,e)}}e.exports=m;var s,c=!t.browser&&["v0.10","v0.9."].indexOf(t.version.slice(0,5))>-1?n:a.nextTick;m.WritableState=v;var u=r(17);u.inherits=r(0);var f,h={deprecate:r(162)},l=r(73),d=r(1).Buffer,p=i.Uint8Array||function(){},y=r(72);function g(){}function v(e,t){s=s||r(10),e=e||{};var n=t instanceof s;this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var i=e.highWaterMark,u=e.writableHighWaterMark,f=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(u||0===u)?u:f,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var h=!1===e.decodeStrings;this.decodeStrings=!h,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,i=r.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,i){--t.pendingcb,r?(a.nextTick(i,n),a.nextTick(A,e,t),e._writableState.errorEmitted=!0,e.emit("error",n)):(i(n),e._writableState.errorEmitted=!0,e.emit("error",n),A(e,t))}(e,r,n,t,i);else{var o=E(r);o||r.corked||r.bufferProcessing||!r.bufferedRequest||C(e,r),n?c(w,e,r,o,i):w(e,r,o,i)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this)}function m(e){if(s=s||r(10),!(f.call(m,this)||this instanceof s))return new m(e);this._writableState=new v(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),l.call(this)}function b(e,t,r,n,i,a,o){t.writelen=n,t.writecb=o,t.writing=!0,t.sync=!0,r?e._writev(i,t.onwrite):e._write(i,a,t.onwrite),t.sync=!1}function w(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),A(e,t)}function C(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,i=new Array(n),a=t.corkedRequestsFree;a.entry=r;for(var s=0,c=!0;r;)i[s]=r,r.isBuf||(c=!1),r=r.next,s+=1;i.allBuffers=c,b(e,t,!0,t.length,i,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new o(t),t.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,f=r.encoding,h=r.callback;if(b(e,t,!1,t.objectMode?1:u.length,u,f,h),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function E(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function S(e,t){e._final((function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),A(e,t)}))}function A(e,t){var r=E(t);return r&&(function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,a.nextTick(S,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),r}u.inherits(m,l),v.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(v.prototype,"buffer",{get:h.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(f=Function.prototype[Symbol.hasInstance],Object.defineProperty(m,Symbol.hasInstance,{value:function(e){return!!f.call(this,e)||this===m&&e&&e._writableState instanceof v}})):f=function(e){return e instanceof this},m.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},m.prototype.write=function(e,t,r){var n,i=this._writableState,o=!1,s=!i.objectMode&&(n=e,d.isBuffer(n)||n instanceof p);return s&&!d.isBuffer(e)&&(e=function(e){return d.from(e)}(e)),"function"==typeof t&&(r=t,t=null),s?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof r&&(r=g),i.ended?function(e,t){var r=new Error("write after end");e.emit("error",r),a.nextTick(t,r)}(this,r):(s||function(e,t,r,n){var i=!0,o=!1;return null===r?o=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||t.objectMode||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(e.emit("error",o),a.nextTick(n,o),i=!1),i}(this,i,e,r))&&(i.pendingcb++,o=function(e,t,r,n,i,a){if(!r){var o=function(e,t,r){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=d.from(t,r)),t}(t,n,i);n!==o&&(r=!0,i="buffer",n=o)}var s=t.objectMode?1:n.length;t.length+=s;var c=t.length<t.highWaterMark;if(c||(t.needDrain=!0),t.writing||t.corked){var u=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:a,next:null},u?u.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else b(e,t,!1,s,n,i,a);return c}(this,i,s,e,t,r)),o},m.prototype.cork=function(){this._writableState.corked++},m.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||C(this,e))},m.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(m.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),m.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},m.prototype._writev=null,m.prototype.end=function(e,t,r){var n=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||function(e,t,r){t.ending=!0,A(e,t),r&&(t.finished?a.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}(this,n,r)},Object.defineProperty(m.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),m.prototype.destroy=y.destroy,m.prototype._undestroy=y.undestroy,m.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,r(9),r(164).setImmediate,r(7))},function(e,t,r){(t=e.exports=r(74)).Stream=t,t.Readable=t,t.Writable=r(34),t.Duplex=r(10),t.Transform=r(71),t.PassThrough=r(161)},function(e,t){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function n(e){return"function"==typeof e}function i(e){return"object"==typeof e&&null!==e}function a(e){return void 0===e}e.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},r.prototype.emit=function(e){var t,r,o,s,c,u;if(this._events||(this._events={}),"error"===e&&(!this._events.error||i(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var f=new Error('Uncaught, unspecified "error" event. ('+t+")");throw f.context=t,f}if(a(r=this._events[e]))return!1;if(n(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:s=Array.prototype.slice.call(arguments,1),r.apply(this,s)}else if(i(r))for(s=Array.prototype.slice.call(arguments,1),o=(u=r.slice()).length,c=0;c<o;c++)u[c].apply(this,s);return!0},r.prototype.addListener=function(e,t){var o;if(!n(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,n(t.listener)?t.listener:t),this._events[e]?i(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,i(this._events[e])&&!this._events[e].warned&&(o=a(this._maxListeners)?r.defaultMaxListeners:this._maxListeners)&&o>0&&this._events[e].length>o&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(e,t){if(!n(t))throw TypeError("listener must be a function");var r=!1;function i(){this.removeListener(e,i),r||(r=!0,t.apply(this,arguments))}return i.listener=t,this.on(e,i),this},r.prototype.removeListener=function(e,t){var r,a,o,s;if(!n(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(o=(r=this._events[e]).length,a=-1,r===t||n(r.listener)&&r.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(i(r)){for(s=o;s-- >0;)if(r[s]===t||r[s].listener&&r[s].listener===t){a=s;break}if(a<0)return this;1===r.length?(r.length=0,delete this._events[e]):r.splice(a,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},r.prototype.removeAllListeners=function(e){var t,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n(r=this._events[e]))this.removeListener(e,r);else if(r)for(;r.length;)this.removeListener(e,r[r.length-1]);return delete this._events[e],this},r.prototype.listeners=function(e){return this._events&&this._events[e]?n(this._events[e])?[this._events[e]]:this._events[e].slice():[]},r.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(n(t))return 1;if(t)return t.length}return 0},r.listenerCount=function(e,t){return e.listenerCount(t)}},function(e,t,r){e.exports=i;var n=r(36).EventEmitter;function i(){n.call(this)}r(0)(i,n),i.Readable=r(35),i.Writable=r(160),i.Duplex=r(159),i.Transform=r(158),i.PassThrough=r(157),i.Stream=i,i.prototype.pipe=function(e,t){var r=this;function i(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function a(){r.readable&&r.resume&&r.resume()}r.on("data",i),e.on("drain",a),e._isStdio||t&&!1===t.end||(r.on("end",s),r.on("close",c));var o=!1;function s(){o||(o=!0,e.end())}function c(){o||(o=!0,"function"==typeof e.destroy&&e.destroy())}function u(e){if(f(),0===n.listenerCount(this,"error"))throw e}function f(){r.removeListener("data",i),e.removeListener("drain",a),r.removeListener("end",s),r.removeListener("close",c),r.removeListener("error",u),e.removeListener("error",u),r.removeListener("end",f),r.removeListener("close",f),e.removeListener("close",f)}return r.on("error",u),e.on("error",u),r.on("end",f),r.on("close",f),e.on("close",f),e.emit("pipe",r),e}},function(e,t,r){"use strict";(function(t){var n=r(0),i=r(75),a=new Array(16);function o(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function s(e,t){return e<<t|e>>>32-t}function c(e,t,r,n,i,a,o){return s(e+(t&r|~t&n)+i+a|0,o)+t|0}function u(e,t,r,n,i,a,o){return s(e+(t&n|r&~n)+i+a|0,o)+t|0}function f(e,t,r,n,i,a,o){return s(e+(t^r^n)+i+a|0,o)+t|0}function h(e,t,r,n,i,a,o){return s(e+(r^(t|~n))+i+a|0,o)+t|0}n(o,i),o.prototype._update=function(){for(var e=a,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var r=this._a,n=this._b,i=this._c,o=this._d;r=c(r,n,i,o,e[0],3614090360,7),o=c(o,r,n,i,e[1],3905402710,12),i=c(i,o,r,n,e[2],606105819,17),n=c(n,i,o,r,e[3],3250441966,22),r=c(r,n,i,o,e[4],4118548399,7),o=c(o,r,n,i,e[5],1200080426,12),i=c(i,o,r,n,e[6],2821735955,17),n=c(n,i,o,r,e[7],4249261313,22),r=c(r,n,i,o,e[8],1770035416,7),o=c(o,r,n,i,e[9],2336552879,12),i=c(i,o,r,n,e[10],4294925233,17),n=c(n,i,o,r,e[11],2304563134,22),r=c(r,n,i,o,e[12],1804603682,7),o=c(o,r,n,i,e[13],4254626195,12),i=c(i,o,r,n,e[14],2792965006,17),r=u(r,n=c(n,i,o,r,e[15],1236535329,22),i,o,e[1],4129170786,5),o=u(o,r,n,i,e[6],3225465664,9),i=u(i,o,r,n,e[11],643717713,14),n=u(n,i,o,r,e[0],3921069994,20),r=u(r,n,i,o,e[5],3593408605,5),o=u(o,r,n,i,e[10],38016083,9),i=u(i,o,r,n,e[15],3634488961,14),n=u(n,i,o,r,e[4],3889429448,20),r=u(r,n,i,o,e[9],568446438,5),o=u(o,r,n,i,e[14],3275163606,9),i=u(i,o,r,n,e[3],4107603335,14),n=u(n,i,o,r,e[8],1163531501,20),r=u(r,n,i,o,e[13],2850285829,5),o=u(o,r,n,i,e[2],4243563512,9),i=u(i,o,r,n,e[7],1735328473,14),r=f(r,n=u(n,i,o,r,e[12],2368359562,20),i,o,e[5],4294588738,4),o=f(o,r,n,i,e[8],2272392833,11),i=f(i,o,r,n,e[11],1839030562,16),n=f(n,i,o,r,e[14],4259657740,23),r=f(r,n,i,o,e[1],2763975236,4),o=f(o,r,n,i,e[4],1272893353,11),i=f(i,o,r,n,e[7],4139469664,16),n=f(n,i,o,r,e[10],3200236656,23),r=f(r,n,i,o,e[13],681279174,4),o=f(o,r,n,i,e[0],3936430074,11),i=f(i,o,r,n,e[3],3572445317,16),n=f(n,i,o,r,e[6],76029189,23),r=f(r,n,i,o,e[9],3654602809,4),o=f(o,r,n,i,e[12],3873151461,11),i=f(i,o,r,n,e[15],530742520,16),r=h(r,n=f(n,i,o,r,e[2],3299628645,23),i,o,e[0],4096336452,6),o=h(o,r,n,i,e[7],1126891415,10),i=h(i,o,r,n,e[14],2878612391,15),n=h(n,i,o,r,e[5],4237533241,21),r=h(r,n,i,o,e[12],1700485571,6),o=h(o,r,n,i,e[3],2399980690,10),i=h(i,o,r,n,e[10],4293915773,15),n=h(n,i,o,r,e[1],2240044497,21),r=h(r,n,i,o,e[8],1873313359,6),o=h(o,r,n,i,e[15],4264355552,10),i=h(i,o,r,n,e[6],2734768916,15),n=h(n,i,o,r,e[13],1309151649,21),r=h(r,n,i,o,e[4],4149444226,6),o=h(o,r,n,i,e[11],3174756917,10),i=h(i,o,r,n,e[2],718787259,15),n=h(n,i,o,r,e[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+n|0,this._c=this._c+i|0,this._d=this._d+o|0},o.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=new t(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e},e.exports=o}).call(this,r(2).Buffer)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.gostCodingInstance=void 0,t.GostCoding=o;var n=r(19),i=ArrayBuffer;function a(e){if(e instanceof i)return e;if(e&&e.buffer&&e.buffer instanceof i)return 0===e.byteOffset&&e.byteLength===e.buffer.byteLength?e.buffer:new Uint8Array(new Uint8Array(e,e.byteOffset,e.byteLength)).buffer;throw new n.DataError("CryptoOperationData required")}function o(){}var s={decode:function(e){for(var t,r,n=(e=e.replace(/[^A-Za-z0-9\+\/]/g,"")).length,i=3*n+1>>2,a=new Uint8Array(i),o=0,s=0,c=0;c<n;c++){r=3&c;var u=e.charCodeAt(c);if(o|=(u=u>64&&u<91?u-65:u>96&&u<123?u-71:u>47&&u<58?u+4:43===u?62:47===u?63:0)<<18-6*r,3===r||n-c==1){for(t=0;t<3&&s<i;t++,s++)a[s]=o>>>(16>>>t&24)&255;o=0}}return a.buffer},encode:function(e){for(var t=new Uint8Array(a(e)),r=2,n="",i=t.length,o=0,s=0;s<i;s++)if(r=s%3,s>0&&4*s/3%96==0&&(n+="\r\n"),o|=t[s]<<(16>>>r&24),2===r||i-s==1){for(var c=18;c>=0;c-=6){var u=o>>>c&63;u=u<26?u+65:u<52?u+71:u<62?u-4:62===u?43:63===u?47:65,n+=String.fromCharCode(u)}o=0}return n.substr(0,n.length-2+r)+(2===r?"":1===r?"=":"==")}};o.prototype.Base64=s;var c=function(){var e={1026:128,1027:129,8218:130,1107:131,8222:132,8230:133,8224:134,8225:135,8364:136,8240:137,1033:138,8249:139,1034:140,1036:141,1035:142,1039:143,1106:144,8216:145,8217:146,8220:147,8221:148,8226:149,8211:150,8212:151,8482:153,1113:154,8250:155,1114:156,1116:157,1115:158,1119:159,160:160,1038:161,1118:162,1032:163,164:164,1168:165,166:166,167:167,1025:168,169:169,1028:170,171:171,172:172,173:173,174:174,1031:175,176:176,177:177,1030:178,1110:179,1169:180,181:181,182:182,183:183,1105:184,8470:185,1108:186,187:187,1112:188,1029:189,1109:190,1111:191},t={};for(var r in e)t[e[r]]=r;return{decode:function(t,r){r=(r||"win1251").toLowerCase().replace("-","");for(var n=[],i=0,a=t.length;i<a;i++){var o=t.charCodeAt(i);if("utf8"===r)o<128?n.push(o):o<2048?(n.push(192+(o>>>6)),n.push(128+(63&o))):o<65536?(n.push(224+(o>>>12)),n.push(128+(o>>>6&63)),n.push(128+(63&o))):o<2097152?(n.push(240+(o>>>18)),n.push(128+(o>>>12&63)),n.push(128+(o>>>6&63)),n.push(128+(63&o))):o<67108864?(n.push(248+(o>>>24)),n.push(128+(o>>>18&63)),n.push(128+(o>>>12&63)),n.push(128+(o>>>6&63)),n.push(128+(63&o))):(n.push(252+(o>>>30)),n.push(128+(o>>>24&63)),n.push(128+(o>>>18&63)),n.push(128+(o>>>12&63)),n.push(128+(o>>>6&63)),n.push(128+(63&o)));else if("unicode"===r||"ucs2"===r||"utf16"===r){if(o<55296||o>=57344&&o<=65536)n.push(o>>>8),n.push(255&o);else if(o>=65536&&o<1114112){var s=55296+((1047552&(o-=65536))>>10),c=56320+(1023&o);n.push(s>>>8),n.push(255&s),n.push(c>>>8),n.push(255&c)}}else"utf32"===r||"ucs4"===r?(n.push(o>>>24&255),n.push(o>>>16&255),n.push(o>>>8&255),n.push(255&o)):"win1251"===r?(o>=128&&(o>=1040&&o<1104?o-=848:o=e[o]||0),n.push(o)):n.push(255&o)}return new Uint8Array(n).buffer},encode:function(e,r){r=(r||"win1251").toLowerCase().replace("-","");for(var n=[],i=new Uint8Array(a(e)),o=0,s=i.length;o<s;o++){var c=i[o];"utf8"===r?c=c>=252&&c<254&&o+5<s?1073741824*(c-252)+(i[++o]-128<<24)+(i[++o]-128<<18)+(i[++o]-128<<12)+(i[++o]-128<<6)+i[++o]-128:c>>248&&c<252&&o+4<s?(c-248<<24)+(i[++o]-128<<18)+(i[++o]-128<<12)+(i[++o]-128<<6)+i[++o]-128:c>>240&&c<248&&o+3<s?(c-240<<18)+(i[++o]-128<<12)+(i[++o]-128<<6)+i[++o]-128:c>=224&&c<240&&o+2<s?(c-224<<12)+(i[++o]-128<<6)+i[++o]-128:c>=192&&c<224&&o+1<s?(c-192<<6)+i[++o]-128:c:"unicode"===r||"ucs2"===r||"utf16"===r?(c=(c<<8)+i[++o])>=55296&&c<57344&&(c=(c-55296<<10)+((c=((c=i[++o])<<8)+i[++o])-56320)+65536):"utf32"===r||"ucs4"===r?c=((c=((c=(c<<8)+i[++o])<<8)+i[++o])<<8)+i[++o]:"win1251"===r&&c>=128&&(c>=192&&c<256?c+=848:c=t[c]||0),n.push(String.fromCharCode(c))}return n.join("")}}}();o.prototype.Chars=c;var u={decode:function(e,t){e=e.replace(/[^A-fa-f0-9]/g,"");var r=Math.ceil(e.length/2),n=new Uint8Array(r);if(e=(e.length%2>0?"0":"")+e,t&&("string"!=typeof t||t.toLowerCase().indexOf("little")<0))for(var i=0;i<r;i++)n[i]=parseInt(e.substr(2*(r-i-1),2),16);else for(i=0;i<r;i++)n[i]=parseInt(e.substr(2*i,2),16);return n.buffer},encode:function(e,t){var r=[],n=new Uint8Array(a(e)),i=n.length;if(t&&("string"!=typeof t||t.toLowerCase().indexOf("little")<0))for(var o=0;o<i;o++){var s=i-o-1;r[s]=(s>0&&s%32==0?"\r\n":"")+("00"+n[o].toString(16)).slice(-2)}else for(o=0;o<i;o++)r[o]=(o>0&&o%32==0?"\r\n":"")+("00"+n[o].toString(16)).slice(-2);return r.join("")}};o.prototype.Hex=u;var f={decode:function(e){0===(e=(e||"").replace(/[^\-A-fa-f0-9]/g,"")).length&&(e="0");var t=!1;for("-"===e.charAt(0)&&(t=!0,e=e.substring(1));"0"===e.charAt(0)&&e.length>1;)e=e.substring(1);e=(e.length%2>0?"0":"")+e,(!t&&!/^[0-7]/.test(e)||t&&!/^[0-7]|8[0]+$/.test(e))&&(e="00"+e);for(var r=e.length/2,n=new Uint8Array(r),i=0,a=r-1;a>=0;--a){var o=parseInt(e.substr(2*a,2),16);t&&o+i>0&&(o=256-o-i,i=1),n[a]=o}return n.buffer},encode:function(e){var t=new Uint8Array(a(e)),r=t.length;if(0===t.length)return"0x00";for(var n=[],i=t[0]>127,o=0,s=r-1;s>=0;--s){var c=t[s];i&&c+o>0&&(c=256-c-o,o=1),n[s]=("00"+c.toString(16)).slice(-2)}for(n=n.join("");"0"===n.charAt(0);)n=n.substring(1);return(i?"-":"")+"0x"+n}};o.prototype.Int16=f;var h=function(){function e(t,r,o){var s=t.object;void 0===s&&(s=t);var h=t.tagClass=t.tagClass||0;if(0===h){var l=t.tagNumber;if(void 0===l)if("string"==typeof s)l=""===s?5:/^\-?0x[0-9a-fA-F]+$/.test(s)?2:/^(\d+\.)+\d+$/.test(s)?6:/^[01]+$/.test(s)?3:/^(true|false)$/.test(s)?1:/^[0-9a-fA-F]+$/.test(s)?4:19;else if("number"==typeof s)l=2;else if("boolean"==typeof s)l=1;else if(s instanceof Array)l=16;else if(s instanceof Date)l=24;else{if(!(s instanceof i||s&&s.buffer instanceof i))throw new n.DataError("Unrecognized type for "+s);l=4}}var d,p=t.tagConstructed;if(void 0===p&&(p=t.tagConstructed=s instanceof Array),s instanceof i||s&&s.buffer instanceof i){if(d=new Uint8Array(a(s)),3===l){var y=new Uint8Array(a(d));(d=new Uint8Array(y.length+1))[0]=0,d.set(y,1)}}else if(p){if(!(s instanceof Array))throw new n.DataError("Constracted block can't be primitive");for(var g=0,v=[],m=0,b=0,w=s.length;b<w;b++)v[b]=e(s[b],r),g+=v[b].length;for(17===l&&v.sort((function(e,t){for(var r=0,n=Math.min(e.length,t.length);r<n;r++){var i=e[r]-t[r];if(0!==i)return i}return e.length-t.length})),"CER"===r&&(v[w]=new Uint8Array(2),g+=2),d=new Uint8Array(g),b=0,w=v.length;b<w;b++)d.set(v[b],m),m+=v[b].length}else switch(l){case 1:(d=new Uint8Array(1))[0]=s?255:0;break;case 2:case 10:d=f.decode("number"==typeof s?s.toString(16):s);break;case 3:if("string"==typeof s){var C=7-(s.length+7)%8;for(w=Math.ceil(s.length/8),(d=new Uint8Array(w+1))[0]=C,b=0;b<w;b++){for(var E=0,S=0;S<8;S++){var A;E=(E<<1)+((A=8*b+S)<s.length&&"1"===s.charAt(A)?1:0)}d[b+1]=E}}break;case 4:d=u.decode("number"==typeof s?s.toString(16):s);break;case 6:y=s.match(/\d+/g);var B=[];for(b=1;b<y.length;b++){w=+y[b];var T=[];1===b&&(w+=40*y[0]);do{T.push(127&w),w>>>=7}while(w);for(S=T.length-1;S>=0;--S)B.push(T[S]+(0===S?0:128))}d=new Uint8Array(B);break;case 12:d=c.decode(s,"utf8");break;case 18:case 22:case 19:case 20:case 21:case 25:case 26:case 27:for(b=0,w=s.length;b<w;b++)s.charCodeAt(b)>255&&(l=12);d=12===l?c.decode(s,"utf8"):c.decode(s,"ascii");break;case 23:case 24:var I=s.original;if(!I){var k=new Date(s);k.setMinutes(k.getMinutes()+k.getTimezoneOffset());for(var _=24===l?k.getMilliseconds().toString():"";_.length>0&&"0"===_.charAt(_.length-1);)_=_.substring(0,_.length-1);_.length>0&&(_="."+_),I=(23===l?k.getYear().toString().slice(-2):k.getFullYear().toString())+("00"+(k.getMonth()+1)).slice(-2)+("00"+k.getDate()).slice(-2)+("00"+k.getHours()).slice(-2)+("00"+k.getMinutes()).slice(-2)+("00"+k.getSeconds()).slice(-2)+_+"Z"}d=c.decode(I,"ascii");break;case 28:d=c.decode(s,"utf32");break;case 30:d=c.decode(s,"utf16")}if(d||(d=new Uint8Array(0)),d instanceof i&&(d=new Uint8Array(d)),!p&&"CER"===r)switch(l){case 3:A=1;case 4:case 12:case 18:case 19:case 20:case 21:case 22:case 25:case 26:case 27:case 28:case 30:for(g=0,v=[],m=0,b=A=A||0,w=d.length;b<w;b+=1e3-A)v[b]=e({object:new Unit8Array(d.buffer,b,Math.min(1e3-A,w-b)),tagNumber:l,tagClass:0,tagConstructed:!1},r),g+=v[b].length;for(v[w]=new Uint8Array(2),g+=2,d=new Uint8Array(g),b=0,w=v.length;b<w;b++)d.set(v[b],m),m+=v[b].length}if(t.tagNumber=0===h?l:l=t.tagNumber||0,t.content=d,o)return d;var R=[],x=3===h?192:2===h?128:1===h?64:0;if(p&&(x|=32),l<31)x|=31&l,R.push(x);else{x|=31,R.push(x),w=l;var F=[];do{F.push(127&w),w>>>=7}while(w);for(S=F.length-1;S>=0;--S)R.push(F[S]+(0===S?0:128))}if(p&&"CER"===r)R.push(128);else{var D=d.length;if(D>127){var P=D,U=[];do{U.push(255&P),P>>>=8}while(P);for(R.push(U.length+128),S=U.length-1;S>=0;--S)R.push(U[S])}else R.push(D)}var N=t.header=new Uint8Array(R),L=new Uint8Array(N.length+d.length);return L.set(N,0),L.set(d,N.length),L}function t(e,r){var a,o,s,u,h,l,d,p,y,g=r||0,v=g;if(e.object)a=e.tagNumber,o=e.tagClass,s=e.tagConstructed,u=e.content,h=e.header,l=e.object instanceof i?new Uint8Array(e.object):null,d=e.object instanceof Array?e.object:null,p=l&&l.length||null;else{var m=e,b=m[g++];if(o=b>>6,s=0!=(32&b),31==(a=31&b)){a=0;do{if(a>9007199254740864)throw new n.DataError("Convertor not supported tag number more then (2^53 - 1) at position "+r);a=(a<<7)+(127&(b=m[g++]))}while(128&b)}if((p=127&(b=m[g++]))!==b){if(p>6)throw new n.DataError("Length over 48 bits not supported at position "+r);if(0===p)p=null;else{b=0;for(var w=0;w<p;++w)b=(b<<8)+m[g++];p=b}}if(v=g,d=null,s)if(d=[],null!==p){for(var C=v+p;g<C;){var E=t(m,g);d.push(E),g+=E.header.length+E.content.length}if(g!==C)throw new n.DataError("Content size is not correct for container starting at offset "+v)}else try{for(;g+=(E=t(m,g)).header.length+E.content.length,0!==E.tagClass||0!==E.tagNumber;)d.push(E);p=g-v}catch(e){throw new n.DataError("Exception "+e+" while decoding undefined length content at offset "+v)}h=new Uint8Array(m.buffer,r,v-r),l=u=new Uint8Array(m.buffer,v,p)}if(null!==d&&0===o)switch(a){case 3:y=1;case 4:case 12:case 18:case 19:case 20:case 21:case 22:case 25:case 26:case 27:case 28:case 30:if(y=y||0,0===d.length)throw new n.DataError("No constructed encoding content of string type at offset "+v);p=y,w=0;for(var S=d.length;w<S;w++){if((E=d[w]).tagClass!==o||E.tagNumber!==a||E.tagConstructed)throw new n.DataError("Invalid constructed encoding of string type at offset "+v);p+=E.content.length-y}l=new Uint8Array(p),w=0,S=d.length;for(var A=y;w<S;w++)E=d[w],y>0?l.set(E.content.subarray(1),A):l.set(E.content,A),A+=E.content.length-y;s=!1,d=null}var B="";if(null===d){if(null===p)throw new n.DataError("Invalid tag with undefined length at offset "+v);if(0===o)switch(a){case 1:B=0!==l[0];break;case 2:case 10:if(p>6)B=f.encode(l);else{var T=l[0];for(l[0]>127&&(T-=256),w=1;w<p;w++)T=256*T+l[w];B=T}break;case 3:if(p>5)B=new Uint8Array(l.subarray(1)).buffer;else{var I=l[0];for(E=[],w=p-1;w>=1;--w){var k=l[w];for(A=I;A<8;++A)E.push(k>>A&1?"1":"0");I=0}B=E.reverse().join("")}break;case 4:B=new Uint8Array(l).buffer;break;case 6:E="",S=0;var _=0;for(w=0;w<p;++w)S=(S<<7)+(127&(T=l[w])),_+=7,128&T||(""===E?E=(R=S<80?S<40?0:1:2)+"."+(S-40*R):E+="."+S.toString(),S=0,_=0);if(_>0)throw new n.DataError("Incompleted OID at offset "+v);B=E;break;case 16:case 17:B=[];break;case 12:B=c.encode(l,"utf8");break;case 18:case 19:case 20:case 21:case 22:case 25:case 26:case 27:B=c.encode(l,"ascii");break;case 28:B=c.encode(l,"utf32");break;case 30:B=c.encode(l,"utf16");break;case 23:case 24:var R,x=23===a;if(E=c.encode(l,"ascii"),!(R=(x?/^(\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/:/^(\d\d\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/).exec(E)))throw new n.DataError('Unrecognized time format "'+E+'" at offset '+v);x&&(R[1]=+R[1],R[1]+=R[1]<50?2e3:1900);var F=new Date(R[1],+R[2]-1,+R[3],+(R[4]||"0"),+(R[5]||"0"),+(R[6]||"0"),+(R[7]||"0")),D=F.getTimezoneOffset();(R[8]||23===a)&&("Z"!==R[8].toUpperCase()&&R[9]&&(D+=parseInt(R[9])),F.setMinutes(F.getMinutes()-D)),F.original=E,B=F}else B=new Uint8Array(l).buffer}else B=d;return{tagConstructed:s,tagClass:o,tagNumber:a,header:h,content:u,object:B}}return{encode:function(t,r,n){return e(t,r,n).buffer},decode:function(e){return t(e.object?e:new Uint8Array(a(e)),0)}}}();o.prototype.BER=h;var l={encode:function(e,t){return(t?"-----BEGIN "+t.toUpperCase()+"-----\r\n":"")+s.encode(e instanceof i?e:h.encode(e))+(t?"\r\n-----END "+t.toUpperCase()+"-----":"")},decode:function(e,t,r,i){var a=/([A-Za-z0-9\+\/\s\=]+)/g.exec(e);a[1].length!==e.length&&(a=!1),!a&&t&&(a=new RegExp("-----\\s?BEGIN "+t.toUpperCase()+"-----([A-Za-z0-9\\+\\/\\s\\=]+)-----\\s?END "+t.toUpperCase()+"-----","g").exec(e)),a||(a=new RegExp("-----\\s?BEGIN [A-Z0-9\\s]+-----([A-Za-z0-9\\+\\/\\s\\=]+)-----\\s?END [A-Z0-9\\s]+-----","g").exec(e));var o=a&&a[1+(i||0)];if(!o)throw new n.DataError("Not valid PEM format");var c=s.decode(o);return r&&(c=h.decode(c)),c}};o.prototype.PEM=l,t.gostCodingInstance=new o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GostDigest=function(e){switch(e=e||{},this.name=(e.name||"GOST R 34.10")+"-"+(e.version||2012)%100+((e.version||2012)>1?"-"+(e.length||256):"")+("HASH"!==(e.mode||"HASH")?"-"+e.mode:"")+(e.procreator?"/"+e.procreator:"")+("string"==typeof e.sBox?"/"+e.sBox:""),this.procreator=e.procreator,this.bitLength=e.length||256,e.version||2012){case 1:this.digest=l,this.bitLength=160;break;case 1994:this.digest=h,this.sBox=(e.sBox||("SC"===e.procreator?"D-SC":"D-A")).toUpperCase(),this.cipher=new i.GostCipher({name:"GOST 28147",block:"ECB",sBox:this.sBox,procreator:this.procreator});break;case 2012:this.digest=f;break;default:throw new a.NotSupportedError("Algorithm version "+e.version+" not supported")}switch(this.keySize=e.keySize||(e.version<=2?this.bitLength/8:32),e.mode||"HASH"){case"HASH":break;case"HMAC":this.sign=d,this.verify=p,this.generateKey=y;break;case"KDF":this.deriveKey=w,this.deriveBits=v,this.label=e.label,this.context=e.context;break;case"PBKDF2":this.deriveKey=w,this.deriveBits=m,this.generateKey=y,this.salt=e.salt,this.iterations=e.iterations||2e3,this.diversifier=e.diversifier||1;break;case"PFXKDF":this.deriveKey=w,this.deriveBits=g,this.generateKey=y,this.salt=e.salt,this.iterations=e.iterations||2e3,this.diversifier=e.diversifier||1;break;case"CPKDF":this.deriveKey=w,this.deriveBits=b,this.generateKey=y,this.salt=e.salt,this.iterations=e.iterations||2e3;break;default:throw new a.NotSupportedError("Algorithm mode "+e.mode+" not supported")}};var n=r(25),i=r(41),a=r(19);function o(e,t,r,n,i){for(var a=0;a<i;a++)r[n+a]=e[t+a]}function s(e){for(var t=new Uint8Array(e),r=new Uint8Array(t.length),n=0,i=t.length;n<i;n++)r[i-n-1]=t[n];return r.buffer}function c(e){for(var t,r,n=e.length,i=3*n+1>>2,a=new Uint8Array(i),o=0,s=0,c=0;c<n;c++){r=3&c;var u=e.charCodeAt(c);if(o|=(u=u>64&&u<91?u-65:u>96&&u<123?u-71:u>47&&u<58?u+4:43===u?62:47===u?63:0)<<18-6*r,3===r||n-c==1){for(t=0;t<3&&s<i;t++,s++)a[s]=o>>>(16>>>t&24)&255;o=0}}return a.buffer}function u(e){if(e instanceof ArrayBuffer)return e;if(e&&e.buffer&&e.buffer instanceof ArrayBuffer)return 0===e.byteOffset&&e.byteLength===e.buffer.byteLength?e.buffer:new Uint8Array(new Uint8Array(e,e.byteOffset,e.byteLength)).buffer;throw new a.DataError("ArrayBuffer or ArrayBufferView required")}var f=function(){var e=new Int32Array(16),t=new Int32Array(16);t[0]=512;var r,n,i,a=function(e){for(var t=new Int32Array(c("B0Wm8lllgN0jTXTMNnR2BRXTYKQIKkKiAWlnkpHgfEv8xIV1jbhOcRbQRS5DdmovH3xlwIEvy+vp2soe2lsIsbebsSFwBHnmVs3L1xui3VXKpwrbwmG1XFiZ1hJrF7WaMQG1Fg9e1WGYKyMKcur+89e1cA9GneNPGi+dqYq1o2+yCroK9ZYemTHbeoZD9LbCCdtiYDc6ycGxnjWQ5A/i03t7KbEUderyix+cUl9e8QY1hD1qKPw5Cscvzius3HT1LtHjhLy+DCLxN+iToepTNL4DUpMzE7fYddYD7YIs16k/NV5orRxynX08XDN+hY5I3eRxXaDhSPnSZhXos98f71f+bHz9WBdg9WPqqX6iVnoWGicjtwD/36P1OiVHF82/vf8PgNc1njVKEIYWHxwVf2MjqWwMQT+amUdHraxr6ktufWRGekBo+jVPkDZyxXG/tsa+wmYf8gq0t5oct6b6z8aO8Jq0mn8YbKRCUfnEZi3AOTB6O8Okb9nTOh2urk+uk9QUOk1WhojzSjyiTEUXNQQFSiiDaUcGNyyCLcWrkgnJk3oZMz5H08mHv+bHxp45VAkkv/6GrFHsxaruFg7H9B7nAr/UDX+k2ahRWTXCrDYvxKXRK43RaZAGm5LLK4n0msTbTTtEtIke3jaccfi3TkFBbgwCqucDp8mTTUJbH5vbWiODUURhcmAqH8uS3DgOVJwHppqKK3uxzrLbC0QKgIQJDeC3Vdk8JEKJJRs6fTreXxbs2JpMlJsiMRZUWo837ZxFmPvHtHTDtjsV0fqYNvRSdjswbB56SzNprwJn558DYTMbiuH/H9t4iv8c50GJ8/PkskjlKjhSbwWApt6+qxst84HNpMprXdhvwEpZot6Ybkd9Hc2678q5SOrvcR2KeWaEFCGAASBhB6vru2v62JT+WmPNxgIw+4nI79CezXsg1xvxSpK8SJkbstnVF/T6UijhiKqkHeeGzJEYne+AXZufITDUEiD4dx3fvDI8pM16sUkEsIAT0roxFvFn5443")),r=new Array(12),n=0;n<12;n++)r[n]=new Int32Array(t.buffer,64*n,16);return r}(),o=new Int32Array(c("5vh+XFtxH9Alg3eACST6FshJ4H6FLqSoW0aGoY8GwWoLMumi13tBbqvaN6RngVxm9heWqBpoZnb13AtwY5GVS0hi84235kvx/1ximmi9hcXLgn2m/NdXlWbTba9pufCJNWyfdEg9g7B8vOyxI4yZoTanAqwxxHCNnrao0C+839aLGfpR5bOuN5zPtUCKEn0LvAx4tQggj1rlM+OEIojs7c7Cx9N3wV/S7HgXtlBdD165TMLAgzaHHYwgXbTLCwStdjyFWyigiS9YjRt59v8yVz/s9p5DEZM+D8DTn4A6GMnuAQom9fOtgxDv6PRBGXmmXc2hDH3pOhBKG+4dEkjpLFO/8tshhHM5tPUMz6aiPQlftLyc2EeYzeiKLYsHHFb5f3dxaVp1apzF8C5xoLoevKZj+atCFeZyLrGeIt5fu3gNuc4PJZS6FIJSDmOXZk2ELwMeagII6phcfyFEob5r8Ho3yxzRY2Lbg+COK0sxHGTPcEebq5YOMoVrqYa53ucetUeMh3r1bOm4/kKIX2HW/RvdAVaWYjjIYiFXkj74qS78l/9CEUR2+J19NQhWRSzrTJDJsOCnElYjCFAt+8sBbC16A/qnpkhF9G6LOL/GxKu9vvj91HfeujqsTOvIB5t58JyxBeiHnQwn+moQrIpYy4lg58FAHQzqGm+BHko1aSiQxPsHc9GW/0NQGi9gnQqf96UW4MY/N5Yc5KazuNqSUhMkdSw44IqbpahkczvsFU8r8SRXVUmzP9dm2xVEDcXHp9F5455Ct5La3xUaYZl/04agNF7AJxQjONVRe22pOaRlGPB3EEADtAJ5HZClrqLdiNJniZxKXQqTD2bfCihlwk7p1CBFCbCLMlU4kWaFKSpBKQe/xTOoQrJ+K2JUTcZzbFMERWKV4Ada9AbpU1GQih8vO2vBI2Fvw3sJ3FJV5cY5Z9Ezsf5oRCmIOcfw5xHiQJuH9xlk+aLpOK3D20sHGQwLTkf5w+v0VTTVdtNriENGEKBa64sC2CDDzfWCMvJRbeGEDb7Cseeg6N4GsPodCHuFS1QNNDM7QuKaZ7zKW3/YpgiKxDfdDsY7s6nZQ+2BIXFNvV5lo7FnYe3nte6haSQx98jVc6v21R/GheGjZxpeBjzUBBDJLSg6uY8ssEACj+vAbLLy95AX1k8Rb6HTPOBzWfGpnuSqeE7WjHTNwAZuKhnVxztC2ocStBYccEXDNxWC5O2TIW2s45BBSTn2/H7F8SGGIjt8wLCUBCusFvv510U3mlJ+v3N8Py6jtoFoM+e42brSeMqpoyo0wi/+u+SBY8z+370NjllAJG6lpnBRxu9LhCrR5CK60GUnnFCM2RSIwhhgjO4xnqVJH3zaF9OU4SgTTJxgCUv0MnLV47Ob9hKlpKrXkcy72kPSb/0PNN4fPJRq0lBPW1RomV7ha9+fr2/qj3eUJkjqWHDdCSu/x+Vtcdl8Z93msv9PIdVJPCdrRjroYAORdntPr4bHH2ihPng11LmgtowRXwMMn9QUHdLJFlggAZg9j33dUySsZKpwP8wXUlTCyYmUjgK0Jj5edtafRsLeUHRvA1h9gARF2z2CknLx5WBYSgKbVgvz+65Ypz/83GKhWl5ObK1M6EupblXOH7jMCPl0eq6CslPBAhRM9/tHG58EKJjz6442BosnrfLv+3rtypf+jApevneOBRP099jPMCwlAcMri/eNkt38F1xVTfhlxX9GBS9f6vMwG6Ky9CSqaLfsu9YNhpmPDzUBBHVMAAAAAAAAAADxLjFNNNDM7HEFIr4GGCO1rygNmTDABcGX/VziXWk8ZRmkHMYzzJoVlYRBcvjHnrjcVDK3k3aEqZQ2wTokkM9YgCsT8zLI71nEQq45fO1PXPoc2O/jq42C8uWslU0pP9Fq2CPokHobfU0iSfg88EO2A8ud2Hn58z3eLS8nNtgmdCpDpB+JHuLfb5iZnRtsEzrUrUbNPfQ2+rs131AmmCXAlk/cqoE+bYXrQbBTfuWlxAVAunWLFghHpBrkO+e7RK/juMQp0GcXl4GZk7vun765rpqN0eyXVCHzVyzdkX5uMWOT19rir/jOR6IgEjfcUzijI0PeyQPuNXn8VsSompHmAbKASNxXUeASlvVk5Lfbe3X3GINRWXoS222VUr3OLjMenbsjHXQwj1INcpP90yLZ4gpEYQwwRnf+7uLStOrUJcow/e4ggAZ1YerKSkcBWhPnSv4UhyZOMCzIg7J78RmlFmTPWbP2gtyoEap8HnivWx1WJvtkjcOytz6RF99bzjTQX3zwarVvXf0lfwrNEycYV03I5nbFKp4HOaflLriqmlSGVT4PPNmjVv9IrqqSe36+dWUlrY4th30ObPn/28hBOx7MoxRQyplpE74w6YPoQK1REAmVbqccsbW2ui20NU5Eab3KTiWgBRWvUoHKD3HhdEWYy40OK/JZP5sxKqhjt++zim4ppPxja2qjoEwtSp09lesO5r8x46KRw5YVVL/VGBacju+by/URXWi8nU4oRrqHXxj6z3Qg0e38uLbiPr2wBzby8eNkroTZKc5libb+cLei9tpPclUOclPXXG1JKQTyOj1XQVmnCoBp6gssEI5J0HPFa7EaEYqrehk55P/XzQlaCw44rO/J+2A2WXn1SJK95pfWfzQix4kz4QUUvGHhwdm5dcm1StImYWDPG82AmkSS7Xj9hnGzzKsqiBqXk3LOv2Z/4dCI1tRbXZhalCfIEagFjD9V3mX1tDGWtQYZ90+WsdZwbkOFnR6Ly0PTNlqrioXM+j2E+ce/mcKV/P2iH9Wh3ktjD82z73Y7i0VtgD9Z+Hz3w4WyfHO+XzGRPJjjrGYzsEghv2FnTCa4+BgP+8mVxMEwyKqghiAQdhqYYFfzQiEBFqr2PHYMBlTMNS3bRcxmfZBCvPRalkvUA4Jo6KDD7zxvPae9ktJp/3O8KQriAgHtIoe33jTN6IWBj9kB7qfdYQWb1vonMhmgNVPVbxrodMzOyeoxJFwug/VUcDRVXaB75JnOJtKsVue+9/0WGFelBU44ag59pFJ0NtFb2Go4HN6f8sr3dWIxdwwysJqu2eJ5yNBd7xCRxgZ02xEQRqJRXlBFI1Ns5HKYAvzFDLz39bY8+nOhaIfNFx8DfSlBr9nyjb0/Xj60Wk87nYTu/jYbZ3FAPbjj0+cHYnEaOij58g/SSH68fHW0nnYndOXyk8frVlwY3PWeT0eLpAxu9E+prctSxpmBLZjax2B4iwbcbkadDvxl+Op1IexOMKX3IZ6OC1Ur7D9lvKV7a93QSWm68bdemZBM2+OU6lcUsgHR5upA9ruwwIJBKErdUPIEY7+PHf/o1/k7k8usuE2Mto5HfIbowd0bOZImjj98WqESCdYvyy89mKvbNcmuZxNpViv9X/UVweFsNs7igB1+su3485sX2pTTfbAN/gGHe8PsdguK2suEld/hU65EBaJHc7e0ELMShXt4PDKr3463cNBoElE7U2c5udLj5mVYTVficbJkaNeJx4/JhJclqTW7+n0a4QKLFTej36ZBiNDNXZvDeN56Ssgsmk2Az7dCd38bg722IHLSiDodM711XnotS6tqj0H02qtruxyV2ZBc/+f9jTG2g6pkIhGbOB/ArvuEQgIsSaD5CMZjAzrjpCivCASTiCat5Bw0GopTx65xIe535qhdxH9cSiWSnoy1OOmqVc3YYwY3eqna2OspoYroe7MnmJVu39pqNeSEFGt9nRmCUJSn1Bz6VaTobL/lyu3J6kLFnKNsNRwOb8F5UYHk3m+rv4n/8MUwGE0X1J1B6xWEBFiSHA1SUCjXOWHxeOwYDKiFapoFcQGO+BHNQJGifD7178wZrxUjn2Mp0jR0UO/5HrmQ4RtKB43Sd1m5Vh3l/GATMZEvH1otqZPAFlTctluiGRo+Ld4JimuZ64pm1x4PguP+jFGtt9VaCNdFM+UPiUH/fwLm3We9SFns4Giqul321S/CSCbj/0p1pWw5Bw2IrN34ZIZUjEaRpG/Rvr0mE1x8DLMPkwOPFTNKgtmEn8G/mmmcMguoVCD65PpSgkOv+QdnntTWz+loowi4Jf1YLESxR5t2kbxe3LO7x+phkEj+ZRYQY6YfgXryM0fVOGg0CaaTY8LOmExt7TAqn9/YbIHZHXseOwYDKmaUZmCJ6/vZ/YMKWY7mc3UgewdEmhQK/ElfLKilcbZZMjQfmG+KRbvC+zgapKBQs3LCVCOjrdgfrzoXJzwLi4a7bP6DJY3IabWiKHkCv9HJgPH1qUvWazg3r4iACnmyyroSVVBDEAg7DUzfNpQOB7nusgTRp85nkLLFYSQT//EltNwm8SuXxSwST4YII1GmLyis75NjL5k35ec1B7BSKTob5ucsMK5XCpxw01hgQa4UJeDeRXSz151MxJK6IoBAxWha8AsMpdyMJxy+Eofx9pxabvOeMX+x4NyGSV0RQCDsNC1pm0B+PxjNS9yjqdRq1RUoDR0U8nmJaSQAAAAAAAAAAFk+t1+hlsYeLk54FgsRa9htSuewWIh/juZf0BOHLj4Gem3bu9MOxOKsl/yJyq7xsQnMszweGdvhifPqxGLuGGR3cM9JqoetxlbFfsplV/bWA5U92m1s+5o2ko2IRFbgfB7rjzeVn2CNMdYXnE6qqSNvrDrX5cAmYkMEn6ZTmRRWq9NmncBSuO6vAsFTp8IKKzzLA243I8AHk8nCPZDhyizDO8ZeL27X00z/VjOXWCSeselOZDJdaqY34W01lHJCCnn45mG+Yj94UhTZBALHRBNILvH98MiWWxP2m8XsFgmpDogpKBTlkr5OGYtUKhB9cszAD8vrr+cbG0nIRCIrcD4lZBZNqEDp1SDGUT4f9PlmusMgP5EM6Kvy7dHCYcR+8IFMuUWs02Hzlf64lEo5IQVcnPAsFiLWrZcYZfP3cXjpvYe6K5vwofREQAWyWWVdCe11vkgkf7wLdZYSLhfP9Cq0SwkXhel6FZZrhU4nVdqf7uCDkkkTR5EyQypGI8ZSuahGW0etPkN0+LRfJBKxXoskF/bweGRLo/shYv5/3aURS7vMJ52kbcEBc+C90CSidiIgjFmivKCKj8SQbbg2803kuQ10OmZn6nFHteBwX0bvJ4LLKhUIsDnsBl719FsefSG1sYPP0FsQ2+czwGApXHefpzZyOUwBfs9VMhGGwxyB2HIOGg1Fp+07j5l6Pd+JWDr8ecft+ysu6aQZhkPvDs5fCc32e04tN09qa+n6NN8Etq3UcDihI/mNIk0KBX6qocliSLhcG/eo4/2XYDCaLrULKm5bo1GCDetCxOH+p1cilI1YKZodg3N/z5zIZLrUUaVbT7XUtypQCL9Tgc49eZdGptjV5C0E5dIrgPx+MIeWV7aed7VzVKA5aUQdgJfQtDMwyvvz4vDP4o533eC+jMNisS4lnElPRqbOcm+529HKQeJCwe7RTbp2Ay/0eqMPsEWyaKk6zeTMr38L6IRUnQgEg1SzwUaCY5JUNcLIDv7S7k438n/f+6cWejOSDGDxTfsSO1LqA+WESgyrU/27kAed6vY4D3iKGctI7FWPDLMqtZ3Estb+9+Dc28oi9PPsthHfWBNUmpxA4z/e31aKztOgwcgSQyLpwwela4FY+m0NdyeVebHh893ZsYt0QirABLjsLZ//q8KU9Kz4qC11kU97v2mx7ytoeMT2L69Iesfhds6AnMZ+XQxnEdiPkuTBTGJ7mdkkPe3+I0qlw9+2i1GQmx8VJi2/bU9m6gVLYry1GuLPWlKqaui+oFP70M4BSO1oCMDmYxTJQ/4WzRWoJxDNBJIxoGlw9ue8imyXzEywM3zoNfyzucBl3vJYfMeA81IhTt5BMrtQlfFeQ5D0k9+HCDliXdLg8UExPBr7i2avkXIK8FGyEbxHfUJ+1O6lcy47TO72474lgmJ4NOsLzEOcA+PdeOckyCh3MorZhn35FLUZReJDsPJXSw+I9+uX4oi2+piapJQ6GcTwaMsWhYZQ7mQJrxH6733zF9XATqukelZ8VJi0xqm2u/uAT0IYjjzCK887xc0L0EM26qo5dxPwL6wb7DMTLCUG26fw00iN1+Zda/LDGh5eubIWH/gg9YQuBlDEbg+fcWvrHZ6EMAGpM3WMqzFe1D/kFP2ieSJlJ8nxcB7wCTJzpMHKcKdxvpQYS6bnaz0OQNgp/4wUyH4PvsP6x3Z0yzYWqWNKapVyjxORGcJe+Tf1Re1NWuo/nugCSZZQujh7ZDfnvQtYLiLmVZ+J4FPiYYCtUuMFKI38bcVaI+NLmTXeFOD1GtCtCcY5BXimWYZeltdhcQlIfLHi1ss6IRVgAgHpFeV3n67RrbAhP2p33LeYgLduuaGmq12fjSSGRM+b/V5FNsVmJljxxrn+m6y9/erNY0G+mXnE76ciFwhAVXZRB3Hs2I5UPsK6UctnHwQ9CtSCrHGvWHn+eHoEXNrJNrI4rzOOBJrtvYZsyUly7iZhXabrvYECkDKV/dCLLBcR+DQEYHO/CurzCZMpdY/8QhyusT59z6k0uiMHSBGIgysk785Ch0zmXA5X1h+w6doas9G61vmbNDzAdXsciTxFgitRDbhAOpKXXHaYwfHbYUo+DQEY1eaMtNYPSI6FXLTPrpYeDfPLM9k6jlWrFKAO10IXAyhiN4nBg4tt0ZyUYpKJX+997Ts668/LuOZOSjFJBkx+ZC9lw9w9Kz4qTFpj2lvT80CpIQxHtHTRV6FhWTGsWTTaHehyZm7jZRF693ZbyG7TZxawXESbpohcIB1JxbkFOHqINGxFExByxLq53f+/SUYep1GvmdUpd7wc4FuhsPeF5GAn21JUbTC6bld4jDBa1wdlD1auyYfGgmEv8pWlq4lE9fvFcX7VKOdZ8kTKjdy7zix9uIiqFUq+Mo2xuh5hm+mT7OiLCfK9nugTtxd0AapLKF0csyGFjxQxlcruSMOBhBOY0bj8t1DTsvmIiTmoapmNHOG5H4iODORzRlp4mVaDdpeHFgLPKtfuI0G/hccTtbPxoU7/kW/hK0Vn53waAjC30QV1DJj8yF7Km6Wj5/cg2p4GrWpgMaK7sfQ4lz50lH7X0mAs9GY5GMD/ml9Qp/NoZ44kNNmDtKRJ1M1orxt1VZK1h388PQIubeobq/xfW0USH2sNcektKVU1dN/99RBtTwPYCBuoe5+MGcbbfqGjrAmBu7vKEq1mFy36eXBDZgEIKccXkyZ3e/9fnAAAAAAAAAAA6yR2pMkG1xVyTdQvBzjfb7dS7mU43bZfN/+8hj31O6OO+oT8tcFX5unrXHMnJZaqGwvavyU1xDmG4SyHKk1OIJlpoovOPgh6+vsut52cS1UFakFWttksslo65qXevqKWIqOwJqgpJYBTyFs7Nq0VgbEekAEXuHWDxR86Sj/laTDgGeHtzzYhveyBHSWR/LoYRFt9TE1SSh2o2mBp3K7wBVj1zHIwneMp1MBiWWt/9XDOIq0DOdWfmFkc2ZdHAk34i5DFqgMYe1T2Y9J/w1bQ8NhYnpE1tW7VNTCWUdPWehwS+WchzSZzLtKMHD1EGjasSSqUYWQHf2ktHXPcb19RS28KcPQNaNiKYLSzDsoerEHTZQnYM4WYfQs9l0kGMPaonszJCpbEZXeiDuLFrQGofOSatV4OcKPepEKcoYJka6Dal7RG25Yvaszth9TX9t4nKrgYXTelPEafJdzv4VvLpsGcbvn+o+tTp2SjkxvYhM4v0lkLgXwQ9FaiGm2AdDkz5XOgu3nvDQ8VXAygldweI2wsT8aU1DfkEDZN9iMFMpHdMt/Hg2xCZwMmPzKZvO9uZvjNauV7b52MNa4rW+IWWTGzwuISkPh/k70gJ7+RUANpRg6QIg0bVimeJ2+uGdMoY5KMPFOiQy9wgv746Rue0LxveSw+7UD3TEDVN9LeU9t16L+uX8KyYk2pwNKlQf0KTo//4Dz9EmQmIOSVaW+n4+Hw9Ai4qY9s0aojD92m2cLH0BCd0cYoj4p50E90h9WFRpRXm6NxC6I4QX98+oNPaB1HpNsKUAflIGya8UYKZD+hKN33NL1HEoFERwZytyMt8uCGzAIQUpMYLeWNvIkrV8qh+bD4kx37a4kkR8wuWun53RGFBCCkO0vlvraKJD7WVYQlXxnI1l07Z0BOYz+gBqaNtnZsRyof94rHmrTJfiHDU0QuEICq7JpPnblXgucUBbp7yCybMiAxpUZl+LZeT7G2Ufd1R/TUi/oNhXukZoKFqWxaoWqYu5kPrvkI63nJoV43okf0pi12hX3NXSd0HvjFC4AKGCC8vmXcsgH3orRmbRuYb5Qm50zJIb9TxOZIlUEKD5PZykIgzcyqZHuk70KaQGCJChhxDE6k9psys4vM2jYt3jVM05bcI7x8Wy+pwwm7aKqFGrPSYTGnNkjgEwIdxSlB/E2yzVrat3BL5IqneWXZhO1x5jI4b9YXNLuk6C1t1TirckVcIUfqYXe0sV2hq3DPCRzorJB/znK4vf9XyF39lyJ4qKTkTGprb5QNOFGZW08f3+RiV4zK7XG8ntmIK7DAHSwKkXudXRE8UDuiwx4RqHZDxuRjySOjmcHO9xaGxX6odtyHtKlz4JbVCa8NVn2dOlgUtAwqP1ncxvQ2AviEldEh3dPh3T2YNkhK+UXnGqRmiOV1GFR+sqWR9ZNmWHRQwB2JnqgQGGWMBltPVAgMvEYDoy0DhMZRN7893DJQeOyGHirqMKj8eVc/9yFNIDDKBQy2ZfAyK4AWwwxpvpbdGyRwh9uV7pmB4WG40fwYFNnKBfiCDtK7zA3nKWPXYFBDDxTHO8yw6KCdOg+OQHZNVz9UojnRdcHhYXe9EvWjfHNPH0urN8EvH9/CbVZIsWc5XNDxbATtFTe/QqftlxYdFDBAZX1sZ9qrcrgH7Bf6h7pO6Dzfr3nLAwT7wXM/BgVxvEY+eNYcEofpiifQfPSOd7StobnCYlNskN0m4kSbWGCAFgWPwJrX+UH8+/rYzqlL5G0Oo0PyiwYI65+bEmvQSRc0e5qSh0rnaZwiGwF8QsTmnuA6TFxyDuOSVktun14+o5naa6NT9FrYPTXn/uCQTBskJSLQCYMlh+ldhCmAwA8UMOLGs8Cghh4okwh0M6QZ1ynyNB89rdQtbG/uCj+u+7Kljkruc8SQ3TGDqrcttbGhajSpKgQGXiOP33tLNaFoa2/MaiO/bvSmlWwZHLlrhRrTUlXVmNTW3jUayWBN5fKufvMcpsKjqYHhct4vlVGtelOYMCWq/1bI9hYVUh2dHihg2VBv4xz6RQc6GJxV8StkewsBgOyarn6oWXzsi0AFDBBeI1DlGYv5QQTvitM0VcwN1wenvuFtZ3+S5eMluQ3naZdaBhWRom5jerYR7xYYIItGCfTfPrepgaseuweK6H2swLeRA4y2XiMfD9ONRXSwVmBn7fcCweqOvrpfS+CDEjjN48R3ws7+vlwNzkhsNUwb0oxds2QWwxkQJuqe0adicyQDnSmz74Ll658o/ILL8q4CqKronPBdJ4ZDGqz6J3SwKM9HH54xt6k4WBvQuOOSLsi8eBmbQAvvBpD7cce/QvhiHzvrEEYDBJloPnpHtVrY3piPQmOmldGQ2AjHKm5jhFMGJ1J7wxnXy+uwRGbXKZeu5n4MCuJljHwU0vEHsFbIgHEiwywwQAuMinrhH9Xaztug3ts46YoOdK0Qk1TcxhWmC+kaF/ZVzBmN3V/+uL2xSb/lMCiviQrt1lum9bStemp5VvCIKZcifhDoZlUys1L5DlNh39rO/jnOx/MEn8kBYf9itWFnf18ul1zPJtIlh/BR7w+GVDuvYy8eQe8Qy/KPUnImNbu5SoiujbrnM0TwTUEHadNmiP2as6uU3jS7uWaAExeSjfGqm6VkoPDFETxU8THUvr2xoRd/caLz6o71tUCHhUnI9lXDfvFOaUTwXezURmPc9VE32PKs/Q1SM0T8AAAAAAAAAABfvG5ZjvVRWhbPNC7xqoUysDa9bds5XI0TdU/m3TG3Ervfp3otbJCUiefIrDpYKzA8aw4JzfpFncSuBYnH4mUhSXNad39f1GjK/WRWHSybGNoVAgMvn8nhiGckNpQmg2k3ghQeO6+JhJy11TEkcEvp19tKbxrT0jOm+YlDKpPZv501OauKDuOwU/LKrxXH4tFuGSg8dkMPFT3r4pNjhO3EXjyCwyCL+QMzuINMuUoT/WRw3rEuaGtVNZ/RN3pTxDZhyqV5AvNZdQQ6l1KC5Zp5/X9wSCaDEpzFLukTaZzNeCi5/w59rI0dVFV0TnignUPLfYjMs1IzQUS9EhtKE8+6TUnNJf26ThE+dssgjAYILz/2J7oieKB2wolX8gT7supFPf6B5G1n45TB5pU9p2IbLINoXP9JF2TzLBGX/E3spSsk1r2SLmj2sit4RJrFET9I87bt0SF8MS6erXW+tVrWF0/YtF/ULWtO1OSWEjir+pLmtO7+vrXQRqDXMgvvgghHIDuopZEqUST3W/jmnj6W8LE4JBPPCU7+4ln7yQH3dydqcksJHNt9vfj1Ae51R19ZmzwiTeyGkW2EAY+Zwer+dJi45BzbOazgWV5xIXxbtyqkOic8UMCv9QtD7D9UO26Djj4hYnNPcMCUkttFB/9Ycr/qn9/C7mcRaIrPnM36oBqBkNhqmDa5esvZO8YVx5XHMyw6KGCAyoY0RelO6H1Q9pZqX9DW3oXprYFPltXaHHCiL7aePqPVCmn2jVgrZEC4Qo7Jwu51f2BKSeOsjfEsW4b5CwwQyyPh2bLrjwLz7ik5E5TT0iVEyOChf1zQ1qq1jMal96JurYGT+wgjjwLC1caPRlsvn4H8/5zSiP26xXcFkVfzWdxHHSYuOQf/SSv7WCIz5ZrFV92yvOJC+LZzJXe3Ykjgls9vmcSm2D2nTMEUfkHreVcB9IuvdpEqkzc+8p0kmywKGenhYyK2+GIvVTaZQEd1f3qfTVbVpHsLM4IlZ0ZqoRdMuPUFfesIL7LMSMEL9EdfUzcwiNQnXew6lo9DJRgK7RAXPSMs9wFhUa5O0J+Ub8wT/UtHQcRTmHMbWz8N2ZM3ZS/8sJZ7ZEBS4CN20gqJhAyjrjpwMpsY10GcvSM13oUm+v6/EVt8MZkDlwdPhaqbDcWK1PtINrlwvsYL4/xBBKge/zbcS3CHchMf3DPthFO2CETjPjQXZNMP8RtuqzjNOWQ1Hwp3YbhaO1aU9QnPug4whXCEuHJF0Eevs70il6488rpcL29rVUp0vcR2H09w4c/fxkRx7cRe5hB4TB3ArxZ6yinWPBE/KC3tQRd2qFmvrF8hHpmj1e7UhPlJqH7zOzzjbKWW4BPk0SDwmDqdQyxrxARk3Fl1Y2nV9eXRlWyemulfBDaYuyTJ7MjaZqTvRNaVCMilsurGxAwiNcBQO4A4wZO6jGUhAxzux11GvJ6P0zEBGTdRWtHY4uVohuylD7E3EI1XecmRcJ87aQXKQgZP61CDFoDK7+xFavMkG9I4WNZzr+GBq74kL1Tnytm/jAIR8YENzBn9kLxNuw9DxgqVGERqnaB2HaG/y/E/VwEqK95PiWHhcrUnuFOoT3MkgbCx5kPfH0thGMw4Qlw5rGjSt/fXvzfYITEDhkowFMcgFKokY3Kr+lxuYA21TrrFdDlHZXQEA6PzCcIV8Lxx5iMqWLlH6YfwRXtM3xi0d73Ylwm165Bsb+BzCDwmgGDZC/7cQA5B+QN+KElIxuRL6bhyjsroCAZb+wYzDp4XSSsaWVCFYWnnKU665PT85sQ2T8p7z5XjDnRJfX/RhqM+lsJSg2EQ2FrWkE36oQIbTNMSkTq7dYclRPrdRuy5FA8VGD1lmmsehpEUwj8sq9cZEJrXE/4GLdRoNtCmBlay+8HcIhxaed2QlJbv0m28obFJNQ537aAjXk/Jy/05W2to9rkN4OrvpvTUxAQi/x8ahTLn+Wm4Xt7WqpR/biAHrvKPPzrQYjuBqTj+ZiTui3qtoae2gujdyFZge6eMxW8oHiowx5slekX6oI1bQXTgZCsws19ji/9+rgJUS8mvnAwF+AjOWTCK+YtGro/FjanMVcOIgDSWx2dtDrHzPKrh5w3XurtiAjJuorS/1QIPhyAYccudXKdUqbcSzoQWadh96DxWimGEeF62c59CC7pssHQeK/EtW2Dqwc5Hdqw19xKDaRwsa7fZ/s7bX/zNsY9MNRqDH3nAEsMWBYLwq62uYqdMt+GlgByC7wb8Z6IYRfLLI1dRFGZfXfBNnb9A/S10J4ZYoDk9P7cxg9oFpAnRkuOwF6n7KM8LQGX5JamiKUK/PXzbdeInA0Y+ArMm4QxatdBs55aOgpWmLea5c/OzY26tQt9XHTgZwwzl7lSbcinXy8USmSr9ZeLRRvjvTpBWsChktwQeE0Aw4ovALt0q2tUJZ5MrSvSK6V0Hb+b7e8bcR4Qjmqy3VfYWZkAaS+29uAfWSF6o04mvYwWkG8IgrbSxPXU7MriXKfIRmX5YS7MyICkdaDGTztocf/9atsDJn4GOFrvV4n9n46GlnTTuJdIzzZj4roU7VKLZbfcK+ssQXnl5XS6ZubukJY5De2dEM0F4AYb2zohmgvDr8JKjuzR70rzX+mLxjR1VrdnX0BHFVx4L0+Rxsb3/3qpsL4CO6v70XuV9MfbIgKT1D6R/8ET8oBrdycNR9bWV6nZkbTNS+SIAAAAAAAAAAIWQnxb1jr6mRilFc6rxLMwKVRK/Odt9Lnjb2Fcx3SbVKc++CGwta0ghi102WDoPmxUs0q36zXisg6ORiOLHlbzDudplX3+Sap7LoBssHYnDB7X4UJ8vqep+6NbJJpQNzza2fhqvO27KhgeYWXAkJav7eEnf0xqzaUx8V8yTKlHi2WQTpg6KJ/8mPqVmxxWmcWxx/DRDdtyJSk9ZUoRjevja8xTpiyC88lcnaMFKuWaHEIjbfGguyLuIcHX5U3pqYi56RljzAsKiYZEW2+WCCE2ofd4BgybnCdzAGnecaZfo7cOcPax9UMimCjOhoHiowMGoK+RSs4uXP3Rr6hNKiOmiKMy+uv2aJ6vq2U4GjHwE9IlSsXgiflBc9Iyw+wSZWWAX4BVt5Iq9RDi08qc9NTGMUormSf9YhbUV75JN/Pt2DGYcIS6SVjS0kxlcxZp5hpzaUZoh0ZA+MpSBBbW+XC0ZSs6M1F8umEONTKI4Epzbm2+pyr7+OdSBsmAJ7wuMQd7R6/aRpY4VTm2mTZ7mSB9UsG+OzxP9iknYXh0ByeH1r8gmURwJTuP2mKMwde5nrVrHgi7sTbJDjdR8KMGZ2nWJ9oM32xzoks3ON8V8Id2jUwWX3lA8VGBqQvKqVD/3k11yen5zYhup4jKHUwdFnfFWoZ4Pwt/kd8Yd07TNnCJ95Yd/A5hqNBuUnrKkFcb07WIGEZRgKJNAY4DnWuhOEbCL53K21tDxb1CSkJHVls9t6GeV7D6e4N98+SdIK1gUMshqPhTuwm20cRnNp42swPbkAYnNEAy265KtvDoCj9/3sqAXwtLTUpwgDav40FyNazSnj5ui93c347RxnY8jHwFFvkI8L1u3wfceVf79iOVdaFMDK1nz7m5ls+nE/wc6qncqwzma5evsh4Ful/hCp1sRDi2y4EhKSzMSd8s92N7dvVEMrHnrn6U1IXlVKpH1x4qwqWhG4GptQ8foC0vwszoIybNUaxYe5TnxwjXrqZC+wb7yN2YGx7IsIJIzYUVpqusBUjtvwyialGlTq5Nazt0nKDj2PhM0DosEVeyhK6BSd6GyxJeP+KKlUSLKE+VAhiJ2E1hi0/HN243f3gi3bP5dHhLInkoXig5WgWsDlphn7l95lTMD7Vmv7XSLq3jXHW2Sny35PlPu9dio+Lp5jCr2GbFpjjnPa5Xdry90kQTi7CqcgOCIZCfOXI/YgluV6sTg2Zk6xgJxRpnDpRcwdvk9GxUfUKKfQp7VBeorx1lGNGZaz9x/S5hhsftTKSNC98chwAgOhkEwhpPNFpb9e3SHJzGScTaxS9NEbIpjoXIbZpo16KZoDkrKtljyOVCaFqTl3k70Loq5N6dDXug/CNkTTmI54mx/loJ5Gjwt9nSIP27wCoMpFjyOWn5C/etlkVyq7kx5gd21GfI0eFrx6A0lXd3j7Zi9cFCJijKpnMysKMpFGdpOZlauWYgPTLMdIg2XmPo31tsmMvlo8LT/zRqgDwlkTyWFRfo61RdeJN5y9GxUfF2yRhVxPoD7/w9+IHhDzytz0qr6vRfqNq7fYrT9ERus0W+Sz0q6p9vHLWfgs0FrXa1J+tO8oxaySRSoixXRUAaK7PkU4nwd6+Me/EBP5Ix1m+2iI37c/RQbUix4TlBw8XwmaBzmlsrBWBXzvDXSpks7tIGngAz/Kf59/fYe2frD1bqksGwmY6ke9ZnRA8EZkTRAQ0H3rU3tafIFVM2dlkm2G9aryMO95+rbE2jRMYmfsCr7ZR0Y41Lh+ufx2jkjWu98psGhu/XgqO5PepE3eAXPmgseMThxYYC/jlvZ+DrL2zzlgAJ15RXTi4l+Ry0/IfD7vMYtlG63ho6jlbo8JI0hlC4J5yI2Rb/eOYP/ZP65AuQbscl3QWMNENlXw8sXIrWNTsyieuxxnK4MO5n+y1GkjBX7FGWsgm0nMyvhvQR6116/AXn3M6+UGWDFZy7JbEGjxHXCf+umUkaE82Tv0P1144c07Z5gBAdDrhj7jimTue8UTThFPrEMYlqBaXhIB0I1XBJIz0LOFKbunhysH9YGMS3Oe4LWukeS6budFBx7H4caB1YWuA3BHEouuEnBmPIfp3d8qRgByNmlBrE0jkh+wnOtQbINHph7OkR0YKtVo8+744TmKANFdvIKG4fRbYl6YXMP4n3v5F1SWIPN5rjKPb63DCNkftAdERl6Nio+oFkjhLYfQPPxiT8QddRX0UQEcdxFWNo0I3A1uNymEWWH/CBDjZtn08mrJtArC1yI7g4lF2/nejgqtdqQJpzEctnY/jFjxB5G+qjLibervHcWQvUvfR3khS8SbzmoxrowJDOboGAFB9fO6IjIj+6Cxhogr65XokSJJteAEfyl5yg2pFjwByvOu49LTL1Je75K820koTyv6Zu3aVV9EvqevQWntanowEuqW4Nr20JzFI+sO3kFkIOEgShRwSHlV9NQbFWw/XL/mWrLTz1hPtoMjmTi3APwhoNW5rlJ6QTq1yq7Cw/8F6S1E1lncGrjyOFvBNU2f/hPMAKNr1cMGEbI/L06IjJbgSD39sqRCNRvojHs6j6mM02UdFM0ByVYQDlmworSSb7W86eanyH1aMy0g6X+li3QhXUbV+ExWv7QAj3lL9GOSw5bXyDmrd8aMy3pbrGrTKPOEPV7ZcYEEI97qNYsPNerB6OhEHPY4WsNrRKRvtVs8vNmQzUywJcuVXcmss7g1AAAAAAAAAAAywKkdt6bUCnk4y/Ui556wnNLZe4shPdeblOGvM1+EK8BtPyE58vKP8/oc1xlkF/VNhO/2g/0wuYRO4csMef26C/hi6JVBSrr6XS3LrxIoeQKvFZBuJ2Xm7RqpeYiArZuROwmsMS7/4emkDtbJ6UDx39oAZD8meZHl6hKOqcajZzdEu3hYDfqfMVUJR3dDchOiMVMfZVr4xNNkWlgSGYrXbCAcsyZCbmStd5ZYsXJfFGBuAOtGbY3ybL1l9lKgjDsCwiqxV9WXaTxMn/SAXKD1q2YkZ54815jarlRlnZ1H1Mk6SFnClN3T7n9PRwV1G1IkvZhlPvaSF9aNdxzEQFbN97T9HBUd6k9wAoOs4HNDY27iNgJxl/kNhYQSZe+rLpVIbcKyVaTsoxZ9MXiJUEYdtXbXrULIfSZVdehnPVcCW+pcka0w/hRn4VS1IeivTg1VGNdGBKXw1Ajwu/chRg78p9h+W7MDJN5U0iTo53cj+1e3wtZqgpUy6wsbRqfOJRc1667oNiqfecqv6AMCcXvKNhMxk889y+/IAP2TbFYeLOnJMffwG7J+AafMj9ogIaCzClqzVHQHJQFXiuuXMDFw2Jw4sIdYwG2O4QnIDgiGcDS8JAOhGq4JFL8byd6F0XSxpU8jOlNiw/gCfj+MJV1PmVbLHmSKE0LmEo31UNH38Tqta6/iAjipZo/0sCQzFa6nKDg//hM0DhMJZXkr63hYt9nCPSzvGMCv2IPI31U68qTQp0QHBGCYAl9T9CM3dTajC+bVy5g7O9winx/GMS0Hzow26Tf6dP/QAbxmn+w8Htfa/fdTcGe9B9tBkcycW6P+fvMhmpknTMwjI3lZ3REZIlxsPlyoCks1hpHJD9ht9jv64UR1MgnZpYctr5A0UejqrNfJfe4Et52FU5AcEQynVE9drZOVwaT80eax9L5Cqibiy5EdwechSl+uZ09haxpfjfmLfx9QMN3byWk7pOeW+BFyFDdj7Wthu1bpxH/GVLpHQvZz2FrNTfgqyVuQI/7lgf2wDECWnoLAvXhFtI8nfPYSGv7UGUMYhz/J8QIdfV9QMtx+l/TSm2qZhbaopBin181SSPshOLshHw9xQfDswJaNmgEPOIFqL+ebE2sCxn6gIvi6b67lLW5nFJ3x0+jeNm8lfA5e8zjMuUM260mJMdPzhKTMnl+Fyns6y6nCavC1rn2mVTR+F2JjL+6uFUahZp2+xfditsb6FiGNi9/tfZBP4/xNs2K0xEPpbu341wKL+7VFMxNEegwEO3Nfxq5oedd5V9C1YHu3kpVwTshtvL1U1/5ThSADMG0bRiIdh684V/bZSmROy0l6JdacYHCcYF/HOLXpVQuUsXLXFMSS/n3pr7vnCgdnnIufSHy9W7OFw2bgdyn5g6bggUctJQbHnEvYjxJ1zMh5Fz6Qvn33MuOen+Lug9gjpiDGgEPtkZHTM8NjolbI6mShVhPsnqVjMK1cgUzVENC1bjphO/zpQEtGzQCHnGMV6Ziaq50GAv/GfwG49gTEjW6nU1qfG3+ydRMF4+G7WVQZSPmoC5SiAN3LVwGIpOJiwH0/gtpHsD42r2K7YJZkUxOOuyYW2e+sQ3wgn+/lqlqaSea1Pja4eeGidzT1f8ugS4aKx+lU9H7rZDW66DKGBrFQ7I0MQ45FgT33yy5eCemJBxpURifAnU1E8zqr3xeZPKln8hMTvokfSseSJ9fWttk1xirR0xIefSnofInCkAVc9qDKpvrrjSXhnloYhxyUUg40qIwIwTwr2U3/XL2hR0GAj46a0S6Z4WIw85u3XNmqJP3zHCs/9TSTim17anfOFYyFHDqamwHw0GMDlpKgyvLsi9WNbrNBLRs0Ah42QoG7lq4DEQ7DzshH0h2yPnlCVjDiRLu3pjRSznNv4sBWTl7KSBy9Bvgh8BAkxPhaN6tJumIR8qjn04UDIScZ4W71f9VHbfz2FOgykbRXVykDc1gIMeH/jRvhLdtzxXD+1fe/aD8oSHkzkuNe2CWAS09msZCrSmKLGQIddi9EPCvFLNXxup7g3SsTWMh2JpFFjLtqWcJxxmyP/dsJLvzKLwGxmLVJpEsCPI84l7EeJKzZrl4KD9vTzm9wIyPnp1oM/1PORewnnn0N1k94G+ywIwQ1oh4QbHRS9oZsm7uMhOdsLSUh2Z12T4vglk3dxmHwFiQ6ax4PUZhdfGCfgP/bIcJlF3AqDU+uH9FFvllirW5Jj+Vc5h+sCDvuFUzC21RSDEq5qkbVCvLQWMx5BPGFgR5QI+OgYDTEaDv81FhwyVQOtBmIvm9lXDViHbZog1LjUmlUzE1VzoMi+Fo02TfkcQh9BsJ5/UKL48SsJsPJMGhLdpJzCypWT3EH1w0Vj5Xpr9U0U82qFaLgq983+BD9kGa6momhclD+Lzl3L+01+kdK7J63d55nQUga0Q8rtbmq217rpHJ9hvoRT64aKx8rlFjEce2UyLjMqTSPBSRuamS0I+1mC4DEcfKcKxkKODJ1NiJW8KWD1X8xXZCPpDsje/Xb/BQft6ecmc9z0XweozC6kqgYFSUH1yxWBD7W7De/Zxe/qHjvJrGk27dS0rcgAPrdBgI+OixDdIUXsG3KIWaIii8n3NQFylEJwoGQk69zNOXKu30Mxwr9gWZd+QKZqiGJVAwKkqBLtbdio2gpwN3R8UV+HqXDpt7MCPqqWAaxXi346o6c/utpg+2mTEequWXAAAAAAAAAAAxDvGdYgS09CKTcaZE22RVDeyvWRqWB5JcpJeLuKYklhwrGQo4dTU2QaKVtYLNYCwyedzBZCYnfcGhlKqfdkJxE52AOybf0KGuUcTUQegwFtgT+kStZd/BrAvyvEXU0hMjvmqSRsUV2UnXTQiSPc84nQUDISfQZucvf97/Xk1jx6R+KgFVJH0HmbFv8S+ov+1GYdQ5jJcqr9/Qu8ijP5VC3KeWlKUdBsuwIOu2faHnJboPBWNpbao05PGkgNX3bKfEOONOlRDq95OegSQ7ZPL8je+uRgctJc8sCPOjWG/wTtelY3WzzzpWIMlHzkDnhlBD+KPdhvGCKVaLeV6sammHgAMBHx27Il31NhLT9xReAxifddowDew8lXDbnDcgyfO7Ih5Xa3PbuHL2UkDk9TbdRDviUYiryKriH/442bNXqP1Dym7n5PEXyqNhS4mkfuz+NOcy4cZinoN0LEMbmbHUzzoWr4PC1mqq5agESZDpHCYnHXZMo71fkcS3TD9YEPl8bdBF+EGixn8a/Rn+YzFPyPlXI42YnOmnCQddUwbujlX8VAKqSPoOSPpWPJAjvrRl376rylI/dmyHfSLYvOHuzE0784XgReO+u2mzYRVzPhDqrWcg/UMots6xDnHl3Cq9zETvZzfgt1I/FY6kErCNmJx0xS22zmGb61mZK5Rd6Ios78oJd29Mo71rjVt+N4TrRz2xy12JMMP7osKbSqB0nCgYFSXOF2toMxHy0MQ45F/Tute+hLcf/G7RWuX6gJs2zbARbF7+dymRhEdSCVjIopBwuVlgRghTEg66pgzBAToMBHx01ohpaR4KxtLaSWhz20l05utHUXqDiv30BZnJWkrNM7TiH5lgRslPwDSX8OarkujRy46iM1TH9WY4VvHZPuFwr3uuTWFr0nvCKuZ8krOaEDl6g3CryLMwS46YkL+WcodjCwKyW2fWB7b8bhXQMcOXzlU/5ha6WwGwBrUlqJut5ilucMhqH1Jdd9NDW24QNXBXPfoLZg77Khf8lat2Mnqel2NL9kutnWRiRYv18YMMrtvD90jFyPVCZpEx/5UEShzcSLDLiSli3zz4uGawueII6TDBNaFPs/BhGnZ8jSYF8hwWATbWtxki/sxUnjcIlDilkH2LC12jjlgD1JxaW8yc6m88vO2uJG07c//l0rh+D94i7c5eVKuxyoGF7B3n+I/oBWG5rV4ahwE1oIwvKtvWZc7MdleAtaeC9YNYPtyKLu3kez/J2Vw1Br7nD4O+ER1sTgXupgO5CVk2dBAQPIG0gJ/eXSxptgJ9DHdKOZCA19XIeVMJ1B4WSHQGtM3WOxgmUF5f+Z3C9JsCmOic0FQKlDy2f7yoS3+JHxfFcj0ds7eN8qZ4qm5x5ztPLhQz5pmgcWcNhPIb5FRiB4KY3zMntNIPL/BJ3OLTdp5c22xgGZZW63pkh0ayB4tHgzLNI1mNy63PHqSVW/DH2oXpoUNAG51Gtf2Spdm77CG4yBOMeQ4Ljhsu4AuabXulYvhXEriTt/H86yj+2AvqlJ1WSmXrikDqTGyZiOhHSigjRTWJixIdjy2r2MAyMazL9Loukcq5hny9eWC+Pe+OJjoMEal3YC/W8MtQ4a0WyTUn6uIulANf/YkoZtEvXeLOGv8bGEGrm/OQn5M53oz+DUOWRyfIxIoL91JFAsaqrlMcm5xe86wQtBNPovpJQqsypT8WWmLlURIrx0FI2nbm49eSSEDl5GSyp9NyrkPWl4TaIztyoQXhGoakigSRSUGmOLS2hSXJ3nhl3eq6rKbPgAIKl3PCULa9iMKE/7tevTOTi6DfRyyPak4q72y3TZUcMkJ5g3IqMY1Bc/fN/784m7IHTAr5OCwCbIpqDwskOgNab9rlPF+Ikx/Gi5iWflOKw0T/WccaqOY54vzgzkOekimiDN4kedjNQBnon6LI69jp9Ea7z/OYJwxDs1M+IoTkVdgvDc2OlFBGUQZvErJs6CDnOVeva8VCbQgezlpAwW+gOxk9T8W/q3t/5mSI3xdNQg6YFO9wWATYgTeshXw518axczJE4YWoIWlcP4lvEfhn9s8GV+Pv9SQaq/J20Clj1S2jZk51uR5eAom9mBB30iiQwf199BNgjzxVN7b9k6kXqhIQfjkZouAGhtq1MJlreNqmsFWe44Juw04v91YIWodtU1ikT/9BN/xYdZWzWUisfKUJXMfV9n77FH9si3VKwL/rJquR3az5aJbvxWekkXPKmjHhHnxcM7vkQYaxMxWpDdt5O2iav+RwtKArp/ogjuR6OntzB/lRjOzVvhSjaCLu7Um5I7FE2Rdwi024s9wxYIghnydl/tOz+o/c8fJ6CZELLTH8pgmbD1LEo3jtbcxQzL9eutmBNGvVghF/ZipPlM6aUNT92d8rJbz7RSB1JmfEK2YfSfy/SSQg/HIyWd0DQ23UGMK7PB9uRRf4crORoIVjvGmvH2jUPqS67ruGtgHK0EwItWkUrJTKywmAyZhUw9hzmjc4ZCb+xcAtusrC3qnXeL4NOz4ED2ctIO65UOWw6jd7spBF8wqxNsu0JWBiAZwHNxIs++hrkwwTKC+hzBzrVC7lN0tTj9KKohs6CBthIjrYnArBNsJEdK0lFJ96I9Pp90ydBr4h9ueZaMXtz1+GgDYnjHf3BdYb61qcME0rR9FS3OCNX557/cI07Pgkd3hYPc0Y6oZ7pnxEFdWqTOGXnVppiZkAAAAAAAAAAOxk9CEzxpbxtXxVacFrEXHBx5JvRn+Ir2VNlv4PPi6XFfk21ajEDhm4pyxSqfGulalRfaoh2xncWNJxBPoY7pRZGKFI8q2HgFzdFina9lfEgnTBUWT7bPrR+xPbxuBW8n1v2RDPYJ9qtj84vdmpqk09n+f69SbAA3S7xwaHFJne32MHNLa4Uio60+0DzQrCb/reryCDwCPUwA1CI07K4buFOMuoXNdulsQCJQ5uJFjrR7w0EwJqXQWv16cfEUJypJeN94TMP2LjuW38HqFEx4Ehss85FZbIrjGOTo2VCRbzzpVWzD6S5WM4WlCb3X0QRzWBKaC156+j5vOH42NwK3ngdV1WU+lAAXvpA6X/+fQSErU8LJDoDHUzB/MVhX7E24+vuGoMYdMe2eXdgYYhOVJ3+KrSn9Yi4iW9qBQ1eHH+dXEXSo+h8MoTf+xgmF1lYTBEnsGdvH/npUDU3UH0zyzcIGrgrnrpFluRHNDi2lWosjBfkPlHEx00S/nsvVLGt10XxmXSQz7QGCJP7sBesf2eWemShEtkV5pWjr+kpd0Ho8YOaHFtpFR+LLTE16IkVoexdjBMoLy+QTrupjLzNn2ZFeNrvGdmO0DwPuo6Rl9pHC0ow+CwCK1OaCoFSh5bsQXFt2EoW9BE4b+NGltcKRXywGF6wwFMdLf16PHRHMNZY8tMSz+nRe+dGoRGnInfa+M2MIJLK/s91fR09uYO76L1jGuD+y1OGEZ25F8K3zQRIHgfdR0jobq9Ypszgap+0a4dd1MZ9xuw/tHIDaMumoRVCQg/koJRcCmsAWNVV6cOp8lpRVGDHQSOZWgmBNS6ChH2UfiIKrdJ133JbvZ5PYrvJ5n1KwQtzUju8LB6hzDJIvGi7Q1Uc5JhQvHTL9CXx0pnTShq8OLhgP18yXSMvtJxfnBnr09JmpOCkKns0duziOOykzRN0XInNBWMJQ+j1g"));function f(e,t){return e[t>>2]>>((3&t)<<3)&255}function h(e,t){for(var r,n,i=0,a=0;a<16;a++)r=(65535&e[a])+(65535&t[a])+(i||0),n=(e[a]>>>16)+(t[a]>>>16)+(r>>>16),e[a]=65535&r|n<<16,i=n>>>16}function l(e){return new Int32Array(e.buffer,e.byteOffset,16)}function d(e,t){for(var r=0;r<16;r++)e[r]=t[r]}function p(){return new Int32Array(16)}function y(e,t){for(var r=0;r<16;r++)e[r]=e[r]^t[r]}var g=p();function v(e,t){d(g,e),y(g,t);for(var r=0;r<8;r++){var n,i,a=f(g,r)<<1;n=o[a],i=o[a+1];for(var s=1;s<8;s++)a=(s<<9)+(f(g,(s<<3)+r)<<1),n^=o[a],i^=o[a+1];e[r<<1]=n,e[1+(r<<1)]=i}}var m=p(),b=p();function w(e,t,r){var n;for(d(m,e),v(m,t),d(b,m),v(m,r),n=0;n<11;n++)v(b,a[n]),v(m,b);v(b,a[11]),y(m,b),y(e,m),y(e,r)}function C(e){var a=l(e);w(i,n,a),h(n,t),h(r,a)}function E(t){var a=t.length;if(!(a>63)){var o=new Int32Array(16);o[0]=a<<3;for(var s=new Uint8Array(64),c=0;c<a;c++)s[c]=t[c];s[a]=1;var u=l(s),f=l(o);w(i,n,u),h(n,f),h(r,u),w(i,e,n),w(i,e,r)}}return function(e){r=p(),n=p(),i=p();for(var t=0;t<16;t++)256===this.bitLength&&(i[t]=16843009);var a,o=new Uint8Array(u(e)),c=o.length,f=c%64,h=(c-f)/64;for(t=0;t<h;t++)C.call(this,new Uint8Array(o.buffer,64*t,64));if(E.call(this,new Uint8Array(o.buffer,64*h,f)),256===this.bitLength)for(a=new Int32Array(8),t=0;t<8;t++)a[t]=i[8+t];else for(a=new Int32Array(16),t=0;t<16;t++)a[t]=i[t];return"SC"===this.procreator||"VN"===this.procreator?s(a.buffer):a.buffer}}(),h=function(){var e,t,r,n;function i(e){for(var t=new Uint8Array(32),r=0;r<8;r++)t[4*r]=e[r],t[1+4*r]=e[8+r],t[2+4*r]=e[16+r],t[3+4*r]=e[24+r];return t}function a(e){for(var t=new Uint8Array(8),r=0;r<8;r++)t[r]=e[r]^e[r+8];return o(e,8,e,0,24),o(t,0,e,24,8),e}function c(e){var t=new Uint16Array(e.buffer,0,16),r=t[0]^t[1]^t[2]^t[3]^t[12]^t[15];o(t,1,t,0,15),t[15]=r}function f(e,t,r,n,i){var a=new Uint8Array(8);o(n,i,a,0,8),o(new Uint8Array(this.cipher.encrypt(e,a)),0,t,r,8)}function h(n,s){var u=new Uint8Array(32),h=new Uint8Array(32),l=new Uint8Array(32),d=new Uint8Array(32);o(n,s,r,0,32),o(t,0,h,0,32),o(r,0,l,0,32);for(var p=0;p<32;p++)d[p]=h[p]^l[p];f.call(this,i(d),u,0,t,0);for(var y=1;y<4;y++){var g=a(h);for(p=0;p<32;p++)h[p]=g[p]^e[y][p];for(l=a(a(l)),p=0;p<32;p++)d[p]=h[p]^l[p];f.call(this,i(d),u,8*y,t,8*y)}for(var v=0;v<12;v++)c(u);for(v=0;v<32;v++)u[v]=u[v]^r[v];for(c(u),v=0;v<32;v++)u[v]=t[v]^u[v];for(v=0;v<61;v++)c(u);o(u,0,t,0,t.length)}function l(e){for(var t=0,r=0;r<n.length;r++){var i=(255&n[r])+(255&e[r])+t;n[r]=i,t=i>>>8}}var d=new Uint8Array([0,255,0,255,0,255,0,255,255,0,255,0,255,0,255,0,0,255,255,0,255,0,0,255,255,0,0,0,255,255,0,255]);return function(i){t=new Uint8Array(32),r=new Uint8Array(32),n=new Uint8Array(32),e=new Array(4);for(var a=0;a<4;a++)e[a]=new Uint8Array(32);o(d,0,e[2],0,d.length);var c=new Uint8Array(u(i)),f=c.length,p=f%32,y=(f-p)/32;for(a=0;a<y;a++){var g=new Uint8Array(c.buffer,32*a,32);l.call(this,g),h.call(this,g,0)}if(p>0){g=new Uint8Array(c.buffer,32*y);var v=new Uint8Array(32);o(g,0,v,0,p),l.call(this,v),h.call(this,v,0)}for(var m=new Uint8Array(32),b=8*f,w=0;b>0;)m[w++]=255&b,b=Math.floor(b/256);h.call(this,m,0),h.call(this,n,0);var C=t.buffer;return"SC"===this.procreator&&(C=s(C)),C}}(),l=function(){var e,t=new Uint32Array(80);function r(e,t,r,n,i){return i+t+r+n+(e<<5|e>>>27)>>>0}function n(e,t,n,i,a,o){return r(e,a,o,1518500249,i^t&(n^i))}function i(e,t,n,i,a,o){return r(e,a,o,1859775393,t^n^i)}function a(e,t,n,i,a,o){return r(e,a,o,2400959708,t&n|i&(t|n))}function o(e,t,n,i,a,o){return r(e,a,o,3395469782,t^n^i)}function s(e,t){for(var r=e[0],s=e[1],c=e[2],u=e[3],f=e[4],h=n,l=0;l<80;l+=5)20===l?h=i:40===l?h=a:60===l&&(h=o),f=h(r,s,c,u,f,t[l]),u=h(f,r,s=(s<<30|s>>>2)>>>0,c,u,t[l+1]),c=h(u,f,r=(r<<30|r>>>2)>>>0,s,c,t[l+2]),s=h(c,u,f=(f<<30|f>>>2)>>>0,r,s,t[l+3]),r=h(s,c,u=(u<<30|u>>>2)>>>0,f,r,t[l+4]),c=(c<<30|c>>>2)>>>0;e[0]+=r,e[1]+=s,e[2]+=c,e[3]+=u,e[4]+=f}function c(e){return(255&e)<<24|(65280&e)<<8|e>>8&65280|e>>24&255}return function(r){var n=new Uint8Array(u(r)),i=n.length,a=i+9;a%64&&(a+=64-a%64),(e=new Uint32Array(5))[0]=1732584193,e[1]=4023233417,e[2]=2562383102,e[3]=271733878,e[4]=3285377520;for(var o=0;o<a;o+=64){for(var f=0;f<64;f++){var h=0,l=o+f;if(l<i)h=n[l];else if(l===i)h=128;else{var d=a-l-1;d>=0&&d<4&&(h=i<<3>>>8*d&255)}f%4==0?t[f>>2]=h<<24:t[f>>2]|=h<<8*(3-f%4)}for(f=16;f<80;f++){var p=t[f-3]^t[f-8]^t[f-14]^t[f-16];t[f]=p<<1|p>>>31}s(e,t)}for(f=0;f<5;f++)e[f]=c(e[f]);return e.buffer}}();function d(e,t){var r=this.digest===h?32:64,n=this.bitLength/8,i=u(e),a=u(t);if(i.byteLength===r)o=new Uint8Array(i);else{var o=new Uint8Array(r);i.byteLength>r?o.set(new Uint8Array(this.digest(i))):o.set(new Uint8Array(i))}for(var s=new Uint8Array(r+a.byteLength),c=new Uint8Array(r+n),f=0;f<r;f++)s[f]=54^o[f],c[f]=92^o[f];return s.set(new Uint8Array(a),r),c.set(new Uint8Array(this.digest(s)),r),this.digest(c)}function p(e,t,r){var n=new Uint8Array(this.sign(e,r)),i=new Uint8Array(t);if(n.length!==i.length)return!1;for(var a=0,o=n.length;a<o;a++)if(n[a]!==i[a])return!1;return!0}function y(){return(0,n.getSeed)(this.bitLength).buffer}function g(e,t){if(t%8>0)throw new a.DataError("Length must multiple of 8");for(var r=this.bitLength/8,n=this.digest===h?32:64,i=t/8,s=this.iterations,c=this.diversifier,f=new Uint8Array(n),l=0;l<n;l++)f[l]=c;var d=new Uint8Array(u(this.salt)),p=d.length,y=n*Math.ceil(p/n),g=new Uint8Array(y);for(l=0;l<y;l++)g[l]=d[l%p];var v=new Uint8Array(u(e)),m=v.length,b=n*Math.ceil(m/n),w=new Uint8Array(b);for(l=0;l<b;l++)w[l]=v[l%m];var C=new Uint8Array(y+b);o(g,0,C,0,y),o(w,0,C,y,b);var E=Math.ceil(i/r),S=new Uint8Array(E*r);for(l=0;l<E;l++){var A=new Uint8Array(n+y+b);o(f,0,A,0,n),o(C,0,A,n,y+b);for(var B=0;B<s;B++)A=new Uint8Array(this.digest(A));o(A,0,S,l*r,r);var T=new Uint8Array(n);for(B=0;B<n;B++)T[B]=A[B%r];var I=(y+b)/n;for(B=0;B<I;B++)for(var k,_=1,R=n-1;R>=0;--R)_=(k=C[n*B+R]+T[R]+_)>>>8,C[n*B+R]=255&k}var x=new Uint8Array(i);return o(S,0,x,0,i),x.buffer}function v(e,t){if(t%8>0)throw new a.DataError("Length must be multiple of 8");var r,n=t/8,i=new Uint8Array(u(this.context)),o=this.bitLength/8,s=Math.ceil(n/o);r=this.label?new Uint8Array(u(this.label)):new Uint8Array([38,189,184,120]);for(var c=new Uint8Array(n),f=0;f<s;f++){var h=new Uint8Array(r.length+i.length+4);h[0]=f+1,h.set(r,1),h[r.length+1]=0,h.set(i,r.length+2),h[h.length-2]=t>>>8,h[h.length-1]=255&t,c.set(new Uint8Array(d.call(this,e,h),0,f<s-1?o:n-f*o),f*o)}return c.buffer}function m(e,t){var r=this.diversifier||1;if((t*=r)<this.bitLength/2||t%8>0)throw new a.DataError("Length must be more than "+this.bitLength/2+" bits and multiple of 8");var n=this.bitLength/8,i=t/8,s=this.iterations,c=new Uint8Array(u(e)),f=new Uint8Array(u(this.salt)),h=f.byteLength,l=new Uint8Array(h+4);if(o(f,0,l,0,h),i>137438953408)throw new a.DataError("Invalid parameters: Length value");for(var p=Math.ceil(i/n),y=new Uint8Array(i),g=1;g<=p;g++){l[h]=g>>>24&255,l[h+1]=g>>>16&255,l[h+2]=g>>>8&255,l[h+3]=255&g;for(var v=new Uint8Array(d.call(this,c,l)),m=v,b=1;b<s;b++){v=new Uint8Array(d.call(this,c,v));for(var w=0;w<n;w++)m[w]=v[w]^m[w]}var C=(g-1)*n;o(m,0,y,C,Math.min(n,i-C))}if(r>1){var E=i/r,S=new Uint8Array(E);return o(y,i-E,S,0,E),S.buffer}return y.buffer}function b(e,t){if(t>this.bitLength||t%8>0)throw new a.DataError("Length can't be more than "+this.bitLength+" bits and multiple of 8");var r=this.digest===h?32:64,n=this.bitLength/8,i=!!(e&&e.byteLength>0)&&new Uint8Array(u(e)),s=i?i.length:0,c=this.iterations,f=new Uint8Array(u(this.salt)),l=f.length,d=new Uint8Array(l+s);o(f,0,d,0,l),i&&o(i,0,d,l,s);for(var p=new Uint8Array(this.digest(d)),y=new Uint8Array(r),g=new Uint8Array(r),v=new Uint8Array(r),m=0;m<32;m++)y[m]="DENEFH028.760246785.IUEFHWUIO.EF".charCodeAt(m);d=new Uint8Array(2*(r+n));for(var b=0;b<c;b++){for(m=0;m<r;m++)g[m]=54^y[m],v[m]=92^y[m],y[m]=0;o(g,0,d,0,r),o(p,0,d,r,n),o(v,0,d,r+n,r),o(p,0,d,r+n+r,n),o(new Uint8Array(this.digest(d)),0,y,0,n)}for(m=0;m<n;m++)g[m]=54^y[m],v[m]=92^y[m],y[m]=0;if(o(g,0,d=new Uint8Array(2*n+l+s),0,n),o(f,0,d,n,l),o(v,0,d,n+l,n),i&&o(i,0,d,n+l+n,s),p=this.digest(this.digest(d)),t===this.bitLength)return p;var w=t/8,C=new Uint8Array(w);return o(p,0,C,0,w),C.buffer}function w(e){return this.deriveBits(e,8*this.keySize)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GostCipher=function(e){if(!o)throw new n.NotSupportedError("Big endian platform not supported");switch(e=e||{},this.keySize=32,this.blockLength=e.length||64,this.blockSize=this.blockLength>>3,this.name=(e.name||(1===e.version?"RC2":1989===e.version?"GOST 28147":"GOST R 34.12"))+(e.version>4?"-"+(e.version||1989)%100:"")+"-"+(64===this.blockLength?"":this.blockLength+"-")+("MAC"===e.mode?"MAC-"+(e.macLength||this.blockLength>>1):"KW"===e.mode||e.keyWrapping?("NO"!==(e.keyWrapping||"NO")?e.keyWrapping:"")+"KW":(e.block||"ECB")+(("CFB"===e.block||"OFB"===e.block||"CTR"===e.block&&2015===e.version)&&e.shiftBits&&e.shiftBits!==this.blockLength?"-"+e.shiftBits:"")+(e.padding?"-"+(e.padding||("CTR"===e.block||"CFB"===e.block||"OFB"===e.block?"NO":"ZERO"))+"PADDING":"")+("NO"!==(e.keyMeshing||"NO")?"-CPKEYMESHING":""))+(e.procreator?"/"+e.procreator:"")+("string"==typeof e.sBox?"/"+e.sBox:""),this.procreator=e.procreator,e.version||1989){case 1:this.process=N,this.keySchedule=U,this.blockLength=64,this.effectiveLength=e.length||32,this.keySize=8*Math.ceil(this.effectiveLength/8),this.blockSize=this.blockLength>>3;break;case 2015:if(this.version=2015,64===this.blockLength)this.process=x,this.keySchedule=D;else{if(128!==this.blockLength)throw new n.DataError("Invalid block length");this.process=k,this.keySchedule=I}this.processMAC=Y;break;case 1989:if(this.version=1989,this.process=R,this.processMAC=W,this.keySchedule=F,64!==this.blockLength)throw new n.DataError("Invalid block length");break;default:throw new n.NotSupportedError("Algorithm version "+e.version+" not supported")}switch(e.mode||e.keyWrapping&&"KW"||"ES"){case"ES":switch(e.block||"ECB"){case"ECB":this.encrypt=L,this.decrypt=M;break;case"CTR":1989===this.version?(this.encrypt=j,this.decrypt=j):(this.encrypt=V,this.decrypt=V,this.shiftBits=e.shiftBits||this.blockLength);break;case"CBC":this.encrypt=H,this.decrypt=q;break;case"CFB":this.encrypt=O,this.decrypt=K,this.shiftBits=e.shiftBits||this.blockLength;break;case"OFB":this.encrypt=G,this.decrypt=G,this.shiftBits=e.shiftBits||this.blockLength;break;default:throw new n.NotSupportedError("Block mode "+e.block+" not supported")}if("CP"===e.keyMeshing?this.keyMeshing=he:this.keyMeshing=le,this.encrypt===L||this.encrypt===H)switch(e.padding){case"PKCS5P":this.pad=pe,this.unpad=ye;break;case"RANDOM":this.pad=be,this.unpad=de;break;case"BIT":this.pad=ve,this.unpad=me;break;default:this.pad=ge,this.unpad=de}else this.pad=de,this.unpad=de;this.generateKey=z;break;case"MAC":this.sign=Q,this.verify=Z,this.generateKey=z,this.macLength=e.macLength||this.blockLength>>1,this.pad=de,this.unpad=de,this.keyMeshing=le;break;case"KW":switch(this.pad=de,this.unpad=de,this.keyMeshing=le,e.keyWrapping){case"CP":this.wrapKey=te,this.unwrapKey=re,this.generateKey=z,this.shiftBits=e.shiftBits||this.blockLength;break;case"SC":this.wrapKey=ae,this.unwrapKey=oe,this.generateKey=se;break;default:this.wrapKey=J,this.unwrapKey=$,this.generateKey=z}break;case"MASK":this.wrapKey=ue,this.unwrapKey=fe,this.generateKey=z;break;default:throw new n.NotSupportedError("Mode "+e.mode+" not supported")}var t,r=e.sBox;if(r){if("string"==typeof r){if(t=r.toUpperCase(),!(r=c[t]))throw new SyntaxError("Unknown sBox name: "+e.sBox)}else if(!r.length||r.length!==c["E-Z"].length)throw new SyntaxError("Length of sBox must be "+c["E-Z"].length)}else r=2015===this.version?c["E-Z"]:"SC"===this.procreator?c["E-SC"]:c["E-A"];if(this.sBox=r,e.iv){if(this.iv=new Uint8Array(e.iv),this.iv.byteLength!==this.blockSize&&1989===this.version)throw new SyntaxError("Length of iv must be "+this.blockLength+" bits");if(this.iv.byteLength!==this.blockSize>>1&&this.encrypt===V)throw new SyntaxError("Length of iv must be "+this.blockLength>>"1 bits");if(this.iv.byteLength%this.blockSize!=0&&this.encrypt!==V)throw new SyntaxError("Length of iv must be a multiple of "+this.blockLength+" bits")}else this.iv=128===this.blockLength?g:s;if(e.ukm&&(this.ukm=new Uint8Array(e.ukm),8*this.ukm.byteLength!==this.blockLength))throw new SyntaxError("Length of ukm must be "+this.blockLength+" bits")};var n=r(19),i=r(25),a=ArrayBuffer,o=function(){var e=new a(2);return new DataView(e).setInt16(0,256,!0),256===new Int16Array(e)[0]}(),s=new Uint8Array([0,0,0,0,0,0,0,0]),c={"E-TEST":[4,2,15,5,9,1,0,8,14,3,11,12,13,7,10,6,12,9,15,14,8,1,3,10,2,7,4,13,6,0,11,5,13,8,14,12,7,3,9,10,1,5,2,4,6,15,0,11,14,9,11,2,5,15,7,1,0,13,12,6,10,4,3,8,3,14,5,9,6,8,0,13,10,11,7,12,2,1,15,4,8,15,6,11,1,9,12,5,13,3,7,10,0,14,2,4,9,11,12,0,3,6,7,5,4,8,14,15,1,10,2,13,12,6,5,2,11,0,9,13,3,14,7,10,15,4,1,8],"E-A":[9,6,3,2,8,11,1,7,10,4,14,15,12,0,13,5,3,7,14,9,8,10,15,0,5,2,6,12,11,4,13,1,14,4,6,2,11,3,13,8,12,15,5,10,0,7,1,9,14,7,10,12,13,1,3,9,0,2,11,4,15,8,5,6,11,5,1,9,8,13,15,0,14,4,2,3,12,7,10,6,3,10,13,12,1,2,0,11,7,5,9,4,8,15,14,6,1,13,2,9,7,10,6,0,8,12,4,5,15,3,11,14,11,10,15,5,0,12,14,8,6,2,3,9,1,7,13,4],"E-B":[8,4,11,1,3,5,0,9,2,14,10,12,13,6,7,15,0,1,2,10,4,13,5,12,9,7,3,15,11,8,6,14,14,12,0,10,9,2,13,11,7,5,8,15,3,6,1,4,7,5,0,13,11,6,1,2,3,10,12,15,4,14,9,8,2,7,12,15,9,5,10,11,1,4,0,13,6,8,14,3,8,3,2,6,4,13,14,11,12,1,7,15,10,0,9,5,5,2,10,11,9,1,12,3,7,4,13,0,6,15,8,14,0,4,11,14,8,3,7,1,10,2,9,6,15,13,5,12],"E-C":[1,11,12,2,9,13,0,15,4,5,8,14,10,7,6,3,0,1,7,13,11,4,5,2,8,14,15,12,9,10,6,3,8,2,5,0,4,9,15,10,3,7,12,13,6,14,1,11,3,6,0,1,5,13,10,8,11,2,9,7,14,15,12,4,8,13,11,0,4,5,1,2,9,3,12,14,6,15,10,7,12,9,11,1,8,14,2,4,7,3,6,5,10,0,15,13,10,9,6,8,13,14,2,0,15,3,5,11,4,1,12,7,7,4,0,5,10,2,15,14,12,6,1,11,13,9,3,8],"E-D":[15,12,2,10,6,4,5,0,7,9,14,13,1,11,8,3,11,6,3,4,12,15,14,2,7,13,8,0,5,10,9,1,1,12,11,0,15,14,6,5,10,13,4,8,9,3,7,2,1,5,14,12,10,7,0,13,6,2,11,4,9,3,15,8,0,12,8,9,13,2,10,11,7,3,6,5,4,14,15,1,8,0,15,3,2,5,14,11,1,10,4,7,12,9,13,6,3,0,6,15,1,14,9,2,13,8,12,4,11,10,5,7,1,10,6,8,15,11,0,4,12,3,5,9,7,13,2,14],"E-SC":[3,6,1,0,5,7,13,9,4,11,8,12,14,15,2,10,7,1,5,2,8,11,9,12,13,0,3,10,15,14,4,6,15,1,4,6,12,8,9,2,14,3,7,10,11,13,5,0,3,4,15,12,5,9,14,0,6,8,7,10,1,11,13,2,6,9,0,7,11,8,4,12,2,14,10,15,1,13,5,3,6,1,2,15,0,11,9,12,7,13,10,5,8,4,14,3,0,2,14,12,9,1,4,7,3,15,6,8,10,13,11,5,5,2,11,8,4,12,7,1,10,6,14,0,9,3,13,15],"E-Z":[12,4,6,2,10,5,11,9,14,8,13,7,0,3,15,1,6,8,2,3,9,10,5,12,1,14,4,7,11,13,0,15,11,3,5,8,2,15,10,13,14,1,7,4,12,9,6,0,12,8,2,1,13,4,15,6,7,0,10,5,3,14,9,11,7,15,5,10,8,1,6,13,0,9,3,14,11,4,2,12,5,13,15,6,9,2,12,10,11,7,8,1,4,3,14,0,8,14,2,5,6,9,1,12,15,4,11,0,13,10,3,7,1,7,14,13,0,5,8,3,4,15,10,6,9,12,11,2],"D-TEST":[4,10,9,2,13,8,0,14,6,11,1,12,7,15,5,3,14,11,4,12,6,13,15,10,2,3,8,1,0,7,5,9,5,8,1,13,10,3,4,2,14,15,12,7,6,0,9,11,7,13,10,1,0,8,9,15,14,4,6,12,11,2,5,3,6,12,7,1,5,15,13,8,4,10,9,14,0,3,11,2,4,11,10,0,7,2,1,13,3,6,8,5,9,12,15,14,13,11,4,1,3,15,5,9,0,10,14,7,6,8,2,12,1,15,13,0,5,7,10,4,9,2,3,14,6,11,8,12],"D-A":[10,4,5,6,8,1,3,7,13,12,14,0,9,2,11,15,5,15,4,0,2,13,11,9,1,7,6,3,12,14,10,8,7,15,12,14,9,4,1,0,3,11,5,2,6,10,8,13,4,10,7,12,0,15,2,8,14,1,6,5,13,11,9,3,7,6,4,11,9,12,2,10,1,8,0,14,15,13,3,5,7,6,2,4,13,9,15,0,10,1,5,11,8,14,12,3,13,14,4,1,7,0,5,10,3,12,8,15,6,2,9,11,1,3,10,9,5,11,4,15,8,6,7,14,13,0,2,12],"D-SC":[11,13,7,0,5,4,1,15,9,14,6,10,3,12,8,2,1,2,7,9,13,11,15,8,14,12,4,0,5,6,10,3,5,1,13,3,15,6,12,7,9,8,11,2,4,14,0,10,13,1,11,4,9,12,14,0,7,5,8,15,6,2,10,3,2,13,10,15,9,11,3,7,8,12,5,14,6,0,1,4,0,4,6,12,5,3,8,13,10,11,15,2,1,9,7,14,1,3,12,8,10,6,11,0,2,14,7,9,15,4,5,13,10,11,6,0,1,3,4,7,14,13,5,15,8,2,9,12]},u=new Uint8Array([105,0,114,34,100,201,4,35,141,58,219,150,70,233,42,196,24,254,172,148,0,237,7,18,192,134,220,194,239,76,169,43]);function f(e){return e>=2147483648?e-4294967296:e}function h(e){return e<0?e+4294967296:e}function l(e){if(e instanceof a)return e;if(e&&e.buffer&&e.buffer instanceof a)return 0===e.byteOffset&&e.byteLength===e.buffer.byteLength?e.buffer:new Uint8Array(new Uint8Array(e,e.byteOffset,e.byteLength)).buffer;throw new n.DataError("CryptoOperationData required")}function d(e){return new Uint8Array(l(e))}function p(e){return new Uint8Array(d(e))}function y(e){return(255&e)<<24|(65280&e)<<8|e>>8&65280|e>>24&255}var g=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),v=function(){function e(e,t){var r,n,i=0;for(r=0;r<8;r++)1&t&&(i^=e),n=128&e,e=e<<1&255,n&&(e^=195),t>>=1;return 255&i}for(var t=[1,16,32,133,148,192,194,251],r=[],n=0;n<8;n++){r[n]=[];for(var i=0;i<256;i++)r[n][i]=e(t[n],i)}return r}(),m=[4,2,3,1,6,5,0,7,0,5,6,1,3,2,4,0];function b(e){for(var t=0,r=0;r<16;r++)t^=v[m[r]][e[r]];for(r=16;r>0;--r)e[r]=e[r-1];e[0]=t}function w(e){for(var t=e[0],r=0;r<15;r++)e[r]=e[r+1];e[15]=t;var n=0;for(r=0;r<16;r++)n^=v[m[r]][e[r]];e[15]=n}var C=[252,238,221,17,207,110,49,22,251,196,250,218,35,197,4,77,233,119,240,219,147,46,153,186,23,54,241,187,20,205,95,193,249,24,101,90,226,92,239,33,129,28,60,66,139,1,142,79,5,132,2,174,227,106,143,160,6,11,237,152,127,212,211,31,235,52,44,81,234,200,72,171,242,42,104,162,253,58,206,204,181,112,14,86,8,12,118,18,191,114,19,71,156,183,93,135,21,161,150,41,16,123,154,199,243,145,120,111,157,158,178,177,50,117,25,61,255,53,138,126,109,84,198,128,195,189,13,87,223,245,36,169,62,168,67,201,215,121,214,246,124,34,185,3,224,15,236,222,122,148,176,188,220,232,40,80,78,51,10,74,167,151,96,115,30,0,98,68,26,184,56,130,100,159,38,65,173,69,70,146,39,94,85,47,140,163,165,125,105,213,149,59,7,88,179,64,134,172,29,247,48,55,107,228,136,217,231,137,225,27,131,73,76,63,248,254,141,83,170,144,202,216,133,97,32,113,103,164,45,43,9,91,203,155,37,208,190,229,108,82,89,166,116,210,230,244,180,192,209,102,175,194,57,75,99,182],E=function(){for(var e=[],t=0,r=C.length;t<r;t++)e[C[t]]=t;return e}();function S(e,t){for(var r=0;r<16;++r)e[r]^=t[r]}function A(e){for(var t=0;t<16;++t)b(e)}function B(e,t){S(e,t),function(e){for(var t=0;t<16;++t)e[t]=C[e[t]]}(e),A(e)}function T(e,t){for(var r=0;r<15;r++)t[r]=0;t[15]=e,A(t)}function I(e){var t,r,n,i,a=new Uint8Array(160),o=new Uint8Array(16);a.set(d(e));for(var s=0;s<4;s++){var c=32*s,u=32*(s+1);a.set(new Uint8Array(a.buffer,c,32),u);for(var f=1;f<9;f++)T(8*s+f,o),t=new Uint8Array(a.buffer,u,16),r=new Uint8Array(a.buffer,u+16,16),n=o,void 0,i=new Uint8Array(t),B(t,n),S(t,r),r.set(i)}return a}function k(e,t,r,n){r=r||t.byteOffset;var i,a,o=new Uint8Array(t.buffer,r,16);if(n){for(var s=0;s<9;s++)i=o,a=new Uint8Array(e.buffer,16*(9-s),16),S(i,a),function(e){for(var t=0;t<16;++t)w(e)}(i),function(e){for(var t=0;t<16;++t)e[t]=E[e[t]]}(i);S(o,new Uint8Array(e.buffer,0,16))}else{for(s=0;s<9;s++)B(o,new Uint8Array(e.buffer,16*s,16));S(o,new Uint8Array(e.buffer,144,16))}}function _(e,t,r){var n=t[0]+r&4294967295,i=e[0+(n>>0&15)]<<0;i|=e[16+(n>>4&15)]<<4,i|=e[32+(n>>8&15)]<<8,i|=e[48+(n>>12&15)]<<12,i|=e[64+(n>>16&15)]<<16,i|=e[80+(n>>20&15)]<<20,i|=e[96+(n>>24&15)]<<24,n=(i|=e[112+(n>>28&15)]<<28)<<11|i>>>21,n^=t[1],t[1]=t[0],t[0]=n}function R(e,t,r){r=r||t.byteOffset;for(var n=this.sBox,i=new Int32Array(t.buffer,r,2),a=0;a<32;a++)_(n,i,e[a]);var o=i[0];i[0]=i[1],i[1]=o}function x(e,t,r){r=r||t.byteOffset;var n=this.sBox,i=new Int32Array(t.buffer,r,2),a=y(i[0]);i[0]=y(i[1]),i[1]=a;for(var o=0;o<32;o++)_(n,i,e[o]);i[0]=y(i[0]),i[1]=y(i[1])}function F(e,t){for(var r=new Int32Array(32),n=new Int32Array(l(e)),i=0;i<8;i++)r[i]=n[i];if(t){for(i=0;i<8;i++)r[i+8]=r[7-i];for(i=0;i<8;i++)r[i+16]=r[7-i]}else{for(i=0;i<8;i++)r[i+8]=r[i];for(i=0;i<8;i++)r[i+16]=r[i]}for(i=0;i<8;i++)r[i+24]=r[7-i];return r}function D(e,t){for(var r=new Int32Array(32),n=new Int32Array(l(e)),i=0;i<8;i++)r[i]=y(n[i]);if(t){for(i=0;i<8;i++)r[i+8]=r[7-i];for(i=0;i<8;i++)r[i+16]=r[7-i]}else{for(i=0;i<8;i++)r[i+8]=r[i];for(i=0;i<8;i++)r[i+16]=r[i]}for(i=0;i<8;i++)r[i+24]=r[7-i];return r}var P,U=(P=new Uint8Array([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]),function(e){for(var t=new Uint8Array(l(e)),r=Math.min(t.length,128),n=this.effectiveLength,i=Math.floor((n+7)/8),a=255%Math.pow(2,8+n-8*i),o=new Uint8Array(128),s=new Uint16Array(o.buffer),c=0;c<r;c++)o[c]=t[c];for(c=r;c<128;c++)o[c]=P[(o[c-1]+o[c-r])%256];for(o[128-i]=P[o[128-i]&a],c=127-i;c>=0;--c)o[c]=P[o[c+1]^o[c+i]];return s}),N=function(){var e,t,r,n=new Uint16Array(4),i=new Uint16Array([1,2,3,5]);function a(a){r?(n[a]=function(e,t){return 65535&(e>>>t|e<<16-t)}(n[a],i[a]),n[a]=n[a]-e[t]-(n[(a+3)%4]&n[(a+2)%4])-(~n[(a+3)%4]&n[(a+1)%4]),t-=1):(n[a]=n[a]+e[t]+(n[(a+3)%4]&n[(a+2)%4])+(~n[(a+3)%4]&n[(a+1)%4]),t+=1,n[a]=function(e,t){return 65535&(e<<t|e>>>16-t)}(n[a],i[a]))}function o(t){n[t]=r?n[t]-e[63&n[(t+3)%4]]:n[t]+e[63&n[(t+3)%4]]}function s(e,t){t=t||1;for(var n=0;n<t;n++)if(r)for(var i=3;i>=0;--i)e(i);else for(i=0;i<4;i++)e(i)}return function(i,c,u,f){r=f,n=new Uint16Array(c.buffer,u||c.byteOffset,4),e=i,t=f?63:0,s(a,5),s(o),s(a,6),s(o),s(a,5)}}();function L(e,t){for(var r=this.pad(d(t)),n=this.blockSize,i=r.byteLength/n,a=this.keySchedule(e),o=0;o<i;o++)this.process(a,r,n*o);return r.buffer}function M(e,t){for(var r=p(t),n=this.blockSize,i=r.byteLength/n,a=this.keySchedule(e,1),o=0;o<i;o++)this.process(a,r,n*o,1);return this.unpad(r).buffer}function O(e,t,r){for(var n=new Uint8Array(r||this.iv),i=p(t),a=n.length,o=new Uint8Array(a),s=this.shiftBits>>3,c=i.length,u=c%s,f=(c-u)/s,h=this.keySchedule(e),l=0;l<f;l++){for(var d=0;d<a;d++)o[d]=n[d];for(this.process(h,n),d=0;d<s;d++)i[l*s+d]^=n[d];for(d=0;d<a-s;d++)n[d]=o[s+d];for(d=0;d<s;d++)n[a-s+d]=i[l*s+d];e=this.keyMeshing(e,n,l,h)}if(u>0)for(this.process(h,n),l=0;l<u;l++)i[f*s+l]^=n[l];return i.buffer}function K(e,t,r){for(var n=new Uint8Array(r||this.iv),i=p(t),a=n.length,o=new Uint8Array(a),s=this.shiftBits>>3,c=i.length,u=c%s,f=(c-u)/s,h=this.keySchedule(e),l=0;l<f;l++){for(var d=0;d<a;d++)o[d]=n[d];for(this.process(h,n),d=0;d<s;d++)o[d]=i[l*s+d],i[l*s+d]^=n[d];for(d=0;d<a-s;d++)n[d]=o[s+d];for(d=0;d<s;d++)n[a-s+d]=o[d];e=this.keyMeshing(e,n,l,h)}if(u>0)for(this.process(h,n),l=0;l<u;l++)i[f*s+l]^=n[l];return i.buffer}function G(e,t,r){for(var n=new Uint8Array(r||this.iv),i=p(t),a=n.length,o=new Uint8Array(a),s=this.shiftBits>>3,c=new Uint8Array(s),u=i.length,f=u%s,h=(u-f)/s,l=this.keySchedule(e),d=0;d<h;d++){for(var y=0;y<a;y++)o[y]=n[y];for(this.process(l,n),y=0;y<s;y++)c[y]=n[y];for(y=0;y<s;y++)i[d*s+y]^=n[y];for(y=0;y<a-s;y++)n[y]=o[s+y];for(y=0;y<s;y++)n[a-s+y]=c[y];e=this.keyMeshing(e,n,d,l)}if(f>0)for(this.process(l,n),d=0;d<f;d++)i[h*s+d]^=n[d];return i.buffer}function j(e,t,r){var n=new Uint8Array(r||this.iv),i=p(t),a=this.blockSize,o=new Int8Array(a),s=i.length,c=s%a,u=(s-c)/a,l=this.keySchedule(e),d=new Int32Array(n.buffer);this.process(l,n);for(var y=0;y<u;y++){d[0]=d[0]+16843009&4294967295;var g=h(d[1])+16843012;d[1]=f(g<4294967296?g:g-4294967295);for(var v=0;v<a;v++)o[v]=n[v];for(this.process(l,d),v=0;v<a;v++)i[y*a+v]^=n[v];for(v=0;v<a;v++)n[v]=o[v];e=this.keyMeshing(e,n,y,l)}if(c>0)for(d[0]=d[0]+16843009&4294967295,g=h(d[1])+16843012,d[1]=f(g<4294967296?g:g-4294967295),this.process(l,d),y=0;y<c;y++)i[u*a+y]^=n[y];return i.buffer}function V(e,t,r){var n=p(t),i=this.blockSize,a=this.shiftBits>>3,o=n.length,s=o%a,c=(o-s)/a,u=new Uint8Array(i),f=new Int32Array(i),h=this.keySchedule(e);u.set(r||this.iv);for(var l=0;l<c;l++){for(var d=0;d<i;d++)f[d]=u[d];for(this.process(h,u),d=0;d<a;d++)n[a*l+d]^=u[d];for(d=0;d<i;d++)u[d]=f[d];for(d=i-1;l>=0;--l){if(!(u[d]>254)){u[d]++;break}u[d]-=254}}if(s>0)for(this.process(h,u),d=0;d<s;d++)n[a*c+d]^=u[d];return n.buffer}function H(e,t,r){for(var n=new Uint8Array(r||this.iv),i=this.blockSize,a=n.length,o=this.pad(d(t)),s=this.keySchedule(e),c=0,u=o.length/i;c<u;c++){for(var f=0;f<i;f++)n[f]^=o[c*i+f];for(this.process(s,n),f=0;f<i;f++)o[c*i+f]=n[f];if(a!==i){for(f=0;f<a-i;f++)n[f]=n[i+f];for(f=0;f<i;f++)n[f+a-i]=o[c*i+f]}e=this.keyMeshing(e,n,c,s)}return o.buffer}function q(e,t,r){for(var n=new Uint8Array(r||this.iv),i=this.blockSize,a=n.length,o=p(t),s=new Uint8Array(i),c=this.keySchedule(e,1),u=0,f=o.length/i;u<f;u++){for(var h=0;h<i;h++)s[h]=o[u*i+h];for(this.process(c,o,u*i,1),h=0;h<i;h++)o[u*i+h]^=n[h];if(a!==i)for(h=0;h<a-i;h++)n[h]=n[i+h];for(h=0;h<i;h++)n[h+a-i]=s[h];e=this.keyMeshing(e,n,u,c,1)}return this.unpad(o).buffer}function z(){var e=new Uint8Array(this.keySize);return(0,i.randomSeed)(e),e.buffer}function W(e,t,r){for(var n=ge.call(this,d(r)),i=this.blockSize,a=n.length/i,o=this.sBox,s=new Int32Array(t.buffer),c=0;c<a;c++){for(var u=0;u<i;u++)t[u]^=n[c*i+u];for(u=0;u<16;u++)_(o,s,e[u])}}function X(e){for(var t=0,r=e.length,n=r-1;n>=0;--n){var i=e[n]>>>7;e[n]=e[n]<<1&255|t,t=i}0!==t&&(16===r?e[15]^=135:e[7]^=27)}function Y(e,t,r){var n=this.blockSize,i=(this.sBox,d(r)),a=new Uint8Array(n);this.process(e,a),X(a),r.byteLength%n!=0&&(i=ve.call(this,d(r)),X(a));for(var o=0,s=i.length/n;o<s;o++){for(var c=0;c<n;c++)t[c]^=i[o*n+c];if(o===s-1)for(c=0;c<n;c++)t[c]^=a[c];this.process(e,t)}}function Q(e,t,r){var n=this.keySchedule(e),i=new Uint8Array(r||this.iv),a=Math.ceil(this.macLength>>3)||this.blockSize>>1;this.processMAC(n,i,t);var o=new Uint8Array(a);return o.set(new Uint8Array(i.buffer,0,a)),o.buffer}function Z(e,t,r,n){var i=new Uint8Array(Q.call(this,e,r,n)),a=d(t);if(i.length!==a.length)return!1;for(var o=0,s=i.length;o<s;o++)if(i[o]!==a[o])return!1;return!0}function J(e,t){var r=this.blockSize,i=this.keySize,a=i+(r>>1);if(!this.ukm)throw new n.DataError("UKM must be defined");var o=new Uint8Array(this.ukm),s=Q.call(this,e,t,o),c=L.call(this,e,t),u=new Uint8Array(a);return u.set(new Uint8Array(c),0),u.set(new Uint8Array(s),i),u.buffer}function $(e,t){var r=this.blockSize,i=this.keySize,a=i+(r>>1),o=l(t);if(o.byteLength!==a)throw new n.DataError("Wrapping key size must be "+a+" bytes");if(!this.ukm)throw new n.DataError("UKM must be defined");var s=new Uint8Array(this.ukm),c=new Uint8Array(o,0,i),u=new Uint8Array(o,i,r>>1),f=M.call(this,e,c);if(!Z.call(this,e,u,f,s))throw new n.DataError("Error verify MAC of wrapping key");return f}function ee(e,t){for(var r=this.blockSize,n=new Int32Array(l(e)),i=[],a=0;a<r;a++){i[a]=[];for(var o=0;o<8;o++)i[a][o]=t[a]>>>o&1}for(a=0;a<r;a++){var s=new Int32Array(2);for(o=0;o<8;o++)i[a][o]?s[0]=s[0]+n[o]&4294967295:s[1]=s[1]+n[o]&4294967295;var c=new Uint8Array(s.buffer);n=new Int32Array(O.call(this,n,n,c))}return n}function te(e,t){var r=this.blockSize,i=this.keySize,a=i+(r>>1);if(!this.ukm)throw new n.DataError("UKM must be defined");var o=new Uint8Array(this.ukm),s=ee.call(this,e,o),c=Q.call(this,s,t,o),u=L.call(this,s,t),f=new Uint8Array(a);return f.set(new Uint8Array(u),0),f.set(new Uint8Array(c),i),f.buffer}function re(e,t){var r=this.blockSize,i=this.keySize,a=i+(r>>1),o=l(t);if(o.byteLength!==a)throw new n.DataError("Wrapping key size must be "+a+" bytes");if(!this.ukm)throw new n.DataError("UKM must be defined");var s=new Uint8Array(this.ukm),c=new Uint8Array(o,0,i),u=new Uint8Array(o,i,r>>1),f=ee.call(this,e,s),h=M.call(this,f,c);if(!Z.call(this,f,u,h,s))throw new n.DataError("Error verify MAC of wrapping key");return h}function ne(e,t){var r=this.blockSize>>1,a=this.keySize,o=8,s=new Uint8Array(l(e));if(s.byteLength!==a)throw new n.DataError("Wrong cleartext size "+s.byteLength+" bytes");if(t=t||this.ukm){if(!((t=new Uint8Array(l(t))).byteLength>0&&t.byteLength%a==0))throw new n.DataError("Wrong rand size "+t.byteLength+" bytes");o=t.byteLength/a+1}else(0,i.randomSeed)(t=new Uint8Array((o-1)*a));var c=new Uint8Array(o*a+r+2),u=c.buffer,f=new Uint8Array(a),h=Q.call(this,s,f);c[0]=34,c[1]=o,c.set(new Uint8Array(h),2),c.set(t,a+r+2);for(var d=1;d<o;d++)for(var p=new Uint8Array(u,2+r+a*d),y=0;y<a;y++)s[y]^=p[y];return c.set(s,r+2),c.buffer}function ie(e){var t=this.blockSize>>1,r=this.keySize,i=l(e);if(34!==new Uint8Array(i,0,1)[0])throw new n.DataError("Invalid magic number");for(var a=new Uint8Array(i,1,1)[0],o=new Uint8Array(i,2,t),s=new Uint8Array(r),u=0;u<a;u++)for(var f=new Uint8Array(i,2+t+r*u,r),h=0;h<r;h++)s[h]^=f[h];var d=new Uint8Array(r),p=Z.call(this,s,o,d);if(!p)for(var y=["E-A","E-B","E-C","E-D","E-SC"],g=(u=0,y.length);u<g&&(this.sBox=c[y[u]],!(p=Z.call(this,s,o,d)));u++);if(!p)throw new n.DataError("Invalid main key MAC");return s.buffer}function ae(e,t){var r=this.blockSize>>1,n=this.keySize,i=l(e),a=l(t);i.byteLength!==n&&(i=ie.call(this,i));var o=L.call(this,i,a),s=Q.call(this,i,a),c=new Uint8Array(r+n);return c.set(new Uint8Array(o),0),c.set(new Uint8Array(s),n),c.buffer}function oe(e,t){var r=this.blockSize>>1,i=this.keySize,a=l(e),o=l(t);a.byteLength!==i&&(a=ie.call(this,a));var s=new Uint8Array(o,0,i),c=new Uint8Array(o,i,r),u=M.call(this,a,s);if(!Z.call(this,a,c,u))throw new n.DataError("Invalid key MAC");return u}function se(){return ne.call(this,z.call(this))}function ce(e,t,r,n){var i=n/4,a=new Int32Array(l(e)),o=new Int32Array(l(t)),s=new Int32Array(i);if(r)for(var c=0;c<i;c++)s[c]=o[c]+a[c]&4294967295;else for(c=0;c<i;c++)s[c]=o[c]-a[c]&4294967295;return s.buffer}function ue(e,t){return ce(e,t,"VN"===this.procreator,this.keySize)}function fe(e,t){return ce(e,t,"VN"!==this.procreator,this.keySize)}function he(e,t,r,n,i){return(r+1)*this.blockSize%1024==0&&(e=M.call(this,e,u),t.set(new Uint8Array(L.call(this,e,t))),n.set(this.keySchedule(e,i))),e}function le(e){return e}function de(e){return new Uint8Array(e)}function pe(e){var t=e.byteLength,r=this.blockSize,n=r-t%r,i=Math.ceil((t+1)/r)*r,a=new Uint8Array(i);a.set(e);for(var o=t;o<i;o++)a[o]=n;return a}function ye(e){var t=e.byteLength,r=this.blockSize,i=e[t-1],a=t-i;if(i>r)throw(0,n.DataError)("Invalid padding");var o=new Uint8Array(a);return a>0&&o.set(new Uint8Array(e.buffer,0,a)),o}function ge(e){var t=e.byteLength,r=this.blockSize,n=Math.ceil(t/r)*r,i=new Uint8Array(n);i.set(e);for(var a=t;a<n;a++)i[a]=0;return i}function ve(e){var t=e.byteLength,r=this.blockSize,n=Math.ceil((t+1)/r)*r,i=new Uint8Array(n);i.set(e),i[t]=1;for(var a=t+1;a<n;a++)i[a]=0;return i}function me(e){for(var t=e.byteLength;t>1&&0===e[t-1];)t--;if(1!==e[t-1])throw(0,n.DataError)("Invalid padding");t--;var r=new Uint8Array(t);return t>0&&r.set(new Uint8Array(e.buffer,0,t)),r}function be(e){var t=e.byteLength,r=this.blockSize,n=r-t%r,a=Math.ceil(t/r)*r,o=new Uint8Array(a),s=new Uint8Array(o.buffer,t,n);return o.set(e),(0,i.randomSeed)(s),o}},function(e,t,r){(function(t){var n=r(3);e.exports=function(e,r){return new t(e.toRed(n.mont(r.modulus)).redPow(new n(r.publicExponent)).fromRed().toArray())}}).call(this,r(2).Buffer)},function(e,t){e.exports=function(e,t){for(var r=e.length,n=-1;++n<r;)e[n]^=t[n];return e}},function(e,t,r){(function(t){var n=r(18);function i(e){var r=new t(4);return r.writeUInt32BE(e,0),r}e.exports=function(e,r){for(var a,o=new t(""),s=0;o.length<r;)a=i(s++),o=t.concat([o,n("sha1").update(e).update(a).digest()]);return o.slice(0,r)}}).call(this,r(2).Buffer)},function(e){e.exports={"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}},function(e,t,r){var n=r(0),i=r(2).Buffer,a=r(14),o=a.base,s=a.constants.der;function c(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new u,this.tree._init(e.body)}function u(e){o.Node.call(this,"der",e)}function f(e){return e<10?"0"+e:e}e.exports=c,c.prototype.encode=function(e,t){return this.tree._encode(e,t).join()},n(u,o.Node),u.prototype._encodeComposite=function(e,t,r,n){var a,o=function(e,t,r,n){var i;if("seqof"===e?e="seq":"setof"===e&&(e="set"),s.tagByName.hasOwnProperty(e))i=s.tagByName[e];else{if("number"!=typeof e||(0|e)!==e)return n.error("Unknown tag: "+e);i=e}return i>=31?n.error("Multi-octet tag encoding unsupported"):(t||(i|=32),i|=s.tagClassByName[r||"universal"]<<6)}(e,t,r,this.reporter);if(n.length<128)return(a=new i(2))[0]=o,a[1]=n.length,this._createEncoderBuffer([a,n]);for(var c=1,u=n.length;u>=256;u>>=8)c++;(a=new i(2+c))[0]=o,a[1]=128|c,u=1+c;for(var f=n.length;f>0;u--,f>>=8)a[u]=255&f;return this._createEncoderBuffer([a,n])},u.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){for(var r=new i(2*e.length),n=0;n<e.length;n++)r.writeUInt16BE(e.charCodeAt(n),2*n);return this._createEncoderBuffer(r)}return"numstr"===t?this._isNumstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: numstr supports only digits and space"):"printstr"===t?this._isPrintstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(t)||"objDesc"===t?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: "+t+" unsupported")},u.prototype._encodeObjid=function(e,t,r){if("string"==typeof e){if(!t)return this.reporter.error("string objid given, but no values map found");if(!t.hasOwnProperty(e))return this.reporter.error("objid not found in values map");e=t[e].split(/[\s\.]+/g);for(var n=0;n<e.length;n++)e[n]|=0}else if(Array.isArray(e))for(e=e.slice(),n=0;n<e.length;n++)e[n]|=0;if(!Array.isArray(e))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(e));if(!r){if(e[1]>=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}var a=0;for(n=0;n<e.length;n++){var o=e[n];for(a++;o>=128;o>>=7)a++}var s=new i(a),c=s.length-1;for(n=e.length-1;n>=0;n--)for(o=e[n],s[c--]=127&o;(o>>=7)>0;)s[c--]=128|127&o;return this._createEncoderBuffer(s)},u.prototype._encodeTime=function(e,t){var r,n=new Date(e);return"gentime"===t?r=[f(n.getFullYear()),f(n.getUTCMonth()+1),f(n.getUTCDate()),f(n.getUTCHours()),f(n.getUTCMinutes()),f(n.getUTCSeconds()),"Z"].join(""):"utctime"===t?r=[f(n.getFullYear()%100),f(n.getUTCMonth()+1),f(n.getUTCDate()),f(n.getUTCHours()),f(n.getUTCMinutes()),f(n.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(r,"octstr")},u.prototype._encodeNull=function(){return this._createEncoderBuffer("")},u.prototype._encodeInt=function(e,t){if("string"==typeof e){if(!t)return this.reporter.error("String int or enum given, but no values map");if(!t.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=t[e]}if("number"!=typeof e&&!i.isBuffer(e)){var r=e.toArray();!e.sign&&128&r[0]&&r.unshift(0),e=new i(r)}if(i.isBuffer(e)){var n=e.length;0===e.length&&n++;var a=new i(n);return e.copy(a),0===e.length&&(a[0]=0),this._createEncoderBuffer(a)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);n=1;for(var o=e;o>=256;o>>=8)n++;for(o=(a=new Array(n)).length-1;o>=0;o--)a[o]=255&e,e>>=8;return 128&a[0]&&a.unshift(0),this._createEncoderBuffer(new i(a))},u.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},u.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getEncoder("der").tree},u.prototype._skipDefault=function(e,t,r){var n,i=this._baseState;if(null===i.default)return!1;var a=e.join();if(void 0===i.defaultBuffer&&(i.defaultBuffer=this._encodeValue(i.default,t,r).join()),a.length!==i.defaultBuffer.length)return!1;for(n=0;n<a.length;n++)if(a[n]!==i.defaultBuffer[n])return!1;return!0}},function(e,t,r){var n=r(0),i=r(14),a=i.base,o=i.bignum,s=i.constants.der;function c(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new u,this.tree._init(e.body)}function u(e){a.Node.call(this,"der",e)}function f(e,t){var r=e.readUInt8(t);if(e.isError(r))return r;var n=s.tagClass[r>>6],i=0==(32&r);if(31==(31&r)){var a=r;for(r=0;128==(128&a);){if(a=e.readUInt8(t),e.isError(a))return a;r<<=7,r|=127&a}}else r&=31;return{cls:n,primitive:i,tag:r,tagStr:s.tag[r]}}function h(e,t,r){var n=e.readUInt8(r);if(e.isError(n))return n;if(!t&&128===n)return null;if(0==(128&n))return n;var i=127&n;if(i>4)return e.error("length octect is too long");n=0;for(var a=0;a<i;a++){n<<=8;var o=e.readUInt8(r);if(e.isError(o))return o;n|=o}return n}e.exports=c,c.prototype.decode=function(e,t){return e instanceof a.DecoderBuffer||(e=new a.DecoderBuffer(e,t)),this.tree._decode(e,t)},n(u,a.Node),u.prototype._peekTag=function(e,t,r){if(e.isEmpty())return!1;var n=e.save(),i=f(e,'Failed to peek tag: "'+t+'"');return e.isError(i)?i:(e.restore(n),i.tag===t||i.tagStr===t||i.tagStr+"of"===t||r)},u.prototype._decodeTag=function(e,t,r){var n=f(e,'Failed to decode tag of "'+t+'"');if(e.isError(n))return n;var i=h(e,n.primitive,'Failed to get length of "'+t+'"');if(e.isError(i))return i;if(!r&&n.tag!==t&&n.tagStr!==t&&n.tagStr+"of"!==t)return e.error('Failed to match tag: "'+t+'"');if(n.primitive||null!==i)return e.skip(i,'Failed to match body of: "'+t+'"');var a=e.save(),o=this._skipUntilEnd(e,'Failed to skip indefinite length body: "'+this.tag+'"');return e.isError(o)?o:(i=e.offset-a.offset,e.restore(a),e.skip(i,'Failed to match body of: "'+t+'"'))},u.prototype._skipUntilEnd=function(e,t){for(;;){var r=f(e,t);if(e.isError(r))return r;var n,i=h(e,r.primitive,t);if(e.isError(i))return i;if(n=r.primitive||null!==i?e.skip(i):this._skipUntilEnd(e,t),e.isError(n))return n;if("end"===r.tagStr)break}},u.prototype._decodeList=function(e,t,r,n){for(var i=[];!e.isEmpty();){var a=this._peekTag(e,"end");if(e.isError(a))return a;var o=r.decode(e,"der",n);if(e.isError(o)&&a)break;i.push(o)}return i},u.prototype._decodeStr=function(e,t){if("bitstr"===t){var r=e.readUInt8();return e.isError(r)?r:{unused:r,data:e.raw()}}if("bmpstr"===t){var n=e.raw();if(n.length%2==1)return e.error("Decoding of string type: bmpstr length mismatch");for(var i="",a=0;a<n.length/2;a++)i+=String.fromCharCode(n.readUInt16BE(2*a));return i}if("numstr"===t){var o=e.raw().toString("ascii");return this._isNumstr(o)?o:e.error("Decoding of string type: numstr unsupported characters")}if("octstr"===t)return e.raw();if("objDesc"===t)return e.raw();if("printstr"===t){var s=e.raw().toString("ascii");return this._isPrintstr(s)?s:e.error("Decoding of string type: printstr unsupported characters")}return/str$/.test(t)?e.raw().toString():e.error("Decoding of string type: "+t+" unsupported")},u.prototype._decodeObjid=function(e,t,r){for(var n,i=[],a=0;!e.isEmpty();){var o=e.readUInt8();a<<=7,a|=127&o,0==(128&o)&&(i.push(a),a=0)}128&o&&i.push(a);var s=i[0]/40|0,c=i[0]%40;if(n=r?i:[s,c].concat(i.slice(1)),t){var u=t[n.join(" ")];void 0===u&&(u=t[n.join(".")]),void 0!==u&&(n=u)}return n},u.prototype._decodeTime=function(e,t){var r=e.raw().toString();if("gentime"===t)var n=0|r.slice(0,4),i=0|r.slice(4,6),a=0|r.slice(6,8),o=0|r.slice(8,10),s=0|r.slice(10,12),c=0|r.slice(12,14);else{if("utctime"!==t)return e.error("Decoding "+t+" time is not supported yet");n=0|r.slice(0,2),i=0|r.slice(2,4),a=0|r.slice(4,6),o=0|r.slice(6,8),s=0|r.slice(8,10),c=0|r.slice(10,12),n=n<70?2e3+n:1900+n}return Date.UTC(n,i-1,a,o,s,c,0)},u.prototype._decodeNull=function(e){return null},u.prototype._decodeBool=function(e){var t=e.readUInt8();return e.isError(t)?t:0!==t},u.prototype._decodeInt=function(e,t){var r=e.raw(),n=new o(r);return t&&(n=t[n.toString(10)]||n),n},u.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getDecoder("der").tree}},function(e,t,r){var n=t;n._reverse=function(e){var t={};return Object.keys(e).forEach((function(r){(0|r)==r&&(r|=0);var n=e[r];t[n]=r})),t},n.der=r(97)},function(e,t,r){var n=r(0),i=r(13).Reporter,a=r(2).Buffer;function o(e,t){i.call(this,t),a.isBuffer(e)?(this.base=e,this.offset=0,this.length=e.length):this.error("Input not Buffer")}function s(e,t){if(Array.isArray(e))this.length=0,this.value=e.map((function(e){return e instanceof s||(e=new s(e,t)),this.length+=e.length,e}),this);else if("number"==typeof e){if(!(0<=e&&e<=255))return t.error("non-byte EncoderBuffer value");this.value=e,this.length=1}else if("string"==typeof e)this.value=e,this.length=a.byteLength(e);else{if(!a.isBuffer(e))return t.error("Unsupported type: "+typeof e);this.value=e,this.length=e.length}}n(o,i),t.DecoderBuffer=o,o.prototype.save=function(){return{offset:this.offset,reporter:i.prototype.save.call(this)}},o.prototype.restore=function(e){var t=new o(this.base);return t.offset=e.offset,t.length=this.offset,this.offset=e.offset,i.prototype.restore.call(this,e.reporter),t},o.prototype.isEmpty=function(){return this.offset===this.length},o.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")},o.prototype.skip=function(e,t){if(!(this.offset+e<=this.length))return this.error(t||"DecoderBuffer overrun");var r=new o(this.base);return r._reporterState=this._reporterState,r.offset=this.offset,r.length=this.offset+e,this.offset+=e,r},o.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)},t.EncoderBuffer=s,s.prototype.join=function(e,t){return e||(e=new a(this.length)),t||(t=0),0===this.length||(Array.isArray(this.value)?this.value.forEach((function(r){r.join(e,t),t+=r.length})):("number"==typeof this.value?e[t]=this.value:"string"==typeof this.value?e.write(this.value,t):a.isBuffer(this.value)&&this.value.copy(e,t),t+=this.length)),e}},function(e,t,r){"use strict";var n=r(6),i=r(15),a=r(5),o=n.rotr64_hi,s=n.rotr64_lo,c=n.shr64_hi,u=n.shr64_lo,f=n.sum64,h=n.sum64_hi,l=n.sum64_lo,d=n.sum64_4_hi,p=n.sum64_4_lo,y=n.sum64_5_hi,g=n.sum64_5_lo,v=i.BlockHash,m=[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];function b(){if(!(this instanceof b))return new b;v.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=m,this.W=new Array(160)}function w(e,t,r,n,i){var a=e&r^~e&i;return a<0&&(a+=4294967296),a}function C(e,t,r,n,i,a){var o=t&n^~t&a;return o<0&&(o+=4294967296),o}function E(e,t,r,n,i){var a=e&r^e&i^r&i;return a<0&&(a+=4294967296),a}function S(e,t,r,n,i,a){var o=t&n^t&a^n&a;return o<0&&(o+=4294967296),o}function A(e,t){var r=o(e,t,28)^o(t,e,2)^o(t,e,7);return r<0&&(r+=4294967296),r}function B(e,t){var r=s(e,t,28)^s(t,e,2)^s(t,e,7);return r<0&&(r+=4294967296),r}function T(e,t){var r=s(e,t,14)^s(e,t,18)^s(t,e,9);return r<0&&(r+=4294967296),r}function I(e,t){var r=o(e,t,1)^o(e,t,8)^c(e,t,7);return r<0&&(r+=4294967296),r}function k(e,t){var r=s(e,t,1)^s(e,t,8)^u(e,t,7);return r<0&&(r+=4294967296),r}function _(e,t){var r=s(e,t,19)^s(t,e,29)^u(e,t,6);return r<0&&(r+=4294967296),r}n.inherits(b,v),e.exports=b,b.blockSize=1024,b.outSize=512,b.hmacStrength=192,b.padLength=128,b.prototype._prepareBlock=function(e,t){for(var r=this.W,n=0;n<32;n++)r[n]=e[t+n];for(;n<r.length;n+=2){var i=(g=r[n-4],v=r[n-3],m=void 0,(m=o(g,v,19)^o(v,g,29)^c(g,v,6))<0&&(m+=4294967296),m),a=_(r[n-4],r[n-3]),s=r[n-14],u=r[n-13],f=I(r[n-30],r[n-29]),h=k(r[n-30],r[n-29]),l=r[n-32],y=r[n-31];r[n]=d(i,a,s,u,f,h,l,y),r[n+1]=p(i,a,s,u,f,h,l,y)}var g,v,m},b.prototype._update=function(e,t){this._prepareBlock(e,t);var r,n,i,s=this.W,c=this.h[0],u=this.h[1],d=this.h[2],p=this.h[3],v=this.h[4],m=this.h[5],b=this.h[6],I=this.h[7],k=this.h[8],_=this.h[9],R=this.h[10],x=this.h[11],F=this.h[12],D=this.h[13],P=this.h[14],U=this.h[15];a(this.k.length===s.length);for(var N=0;N<s.length;N+=2){var L=P,M=U,O=(i=void 0,(i=o(r=k,n=_,14)^o(r,n,18)^o(n,r,9))<0&&(i+=4294967296),i),K=T(k,_),G=w(k,0,R,0,F),j=C(0,_,0,x,0,D),V=this.k[N],H=this.k[N+1],q=s[N],z=s[N+1],W=y(L,M,O,K,G,j,V,H,q,z),X=g(L,M,O,K,G,j,V,H,q,z);L=A(c,u),M=B(c,u),O=E(c,0,d,0,v),K=S(0,u,0,p,0,m);var Y=h(L,M,O,K),Q=l(L,M,O,K);P=F,U=D,F=R,D=x,R=k,x=_,k=h(b,I,W,X),_=l(I,I,W,X),b=v,I=m,v=d,m=p,d=c,p=u,c=h(W,X,Y,Q),u=l(W,X,Y,Q)}f(this.h,0,c,u),f(this.h,2,d,p),f(this.h,4,v,m),f(this.h,6,b,I),f(this.h,8,k,_),f(this.h,10,R,x),f(this.h,12,F,D),f(this.h,14,P,U)},b.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},function(e,t,r){"use strict";var n=r(6),i=r(15),a=r(52),o=r(5),s=n.sum32,c=n.sum32_4,u=n.sum32_5,f=a.ch32,h=a.maj32,l=a.s0_256,d=a.s1_256,p=a.g0_256,y=a.g1_256,g=i.BlockHash,v=[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];function m(){if(!(this instanceof m))return new m;g.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=v,this.W=new Array(64)}n.inherits(m,g),e.exports=m,m.blockSize=512,m.outSize=256,m.hmacStrength=192,m.padLength=64,m.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n<r.length;n++)r[n]=c(y(r[n-2]),r[n-7],p(r[n-15]),r[n-16]);var i=this.h[0],a=this.h[1],g=this.h[2],v=this.h[3],m=this.h[4],b=this.h[5],w=this.h[6],C=this.h[7];for(o(this.k.length===r.length),n=0;n<r.length;n++){var E=u(C,d(m),f(m,b,w),this.k[n],r[n]),S=s(l(i),h(i,a,g));C=w,w=b,b=m,m=s(v,E),v=g,g=a,a=i,i=s(E,S)}this.h[0]=s(this.h[0],i),this.h[1]=s(this.h[1],a),this.h[2]=s(this.h[2],g),this.h[3]=s(this.h[3],v),this.h[4]=s(this.h[4],m),this.h[5]=s(this.h[5],b),this.h[6]=s(this.h[6],w),this.h[7]=s(this.h[7],C)},m.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},function(e,t,r){"use strict";var n=r(6).rotr32;function i(e,t,r){return e&t^~e&r}function a(e,t,r){return e&t^e&r^t&r}function o(e,t,r){return e^t^r}t.ft_1=function(e,t,r,n){return 0===e?i(t,r,n):1===e||3===e?o(t,r,n):2===e?a(t,r,n):void 0},t.ch32=i,t.maj32=a,t.p32=o,t.s0_256=function(e){return n(e,2)^n(e,13)^n(e,22)},t.s1_256=function(e){return n(e,6)^n(e,11)^n(e,25)},t.g0_256=function(e){return n(e,7)^n(e,18)^e>>>3},t.g1_256=function(e){return n(e,17)^n(e,19)^e>>>10}},function(e,t,r){"use strict";var n=t;function i(e){return 1===e.length?"0"+e:e}function a(e){for(var t="",r=0;r<e.length;r++)t+=i(e[r].toString(16));return t}n.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"!=typeof e){for(var n=0;n<e.length;n++)r[n]=0|e[n];return r}if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),n=0;n<e.length;n+=2)r.push(parseInt(e[n]+e[n+1],16));else for(n=0;n<e.length;n++){var i=e.charCodeAt(n),a=i>>8,o=255&i;a?r.push(a,o):r.push(o)}return r},n.zero2=i,n.toHex=a,n.encode=function(e,t){return"hex"===t?a(e):e}},function(e,t,r){var n;function i(e){this.rand=e}if(e.exports=function(e){return n||(n=new i(null)),n.generate(e)},e.exports.Rand=i,i.prototype.generate=function(e){return this._rand(e)},i.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),r=0;r<t.length;r++)t[r]=this.rand.getByte();return t},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?i.prototype._rand=function(e){var t=new Uint8Array(e);return self.crypto.getRandomValues(t),t}:self.msCrypto&&self.msCrypto.getRandomValues?i.prototype._rand=function(e){var t=new Uint8Array(e);return self.msCrypto.getRandomValues(t),t}:"object"==typeof window&&(i.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var a=r(129);if("function"!=typeof a.randomBytes)throw new Error("Not supported");i.prototype._rand=function(e){return a.randomBytes(e)}}catch(e){}},function(e,t,r){var n=r(3),i=r(54);function a(e){this.rand=e||new i.Rand}e.exports=a,a.create=function(e){return new a(e)},a.prototype._randbelow=function(e){var t=e.bitLength(),r=Math.ceil(t/8);do{var i=new n(this.rand.generate(r))}while(i.cmp(e)>=0);return i},a.prototype._randrange=function(e,t){var r=t.sub(e);return e.add(this._randbelow(r))},a.prototype.test=function(e,t,r){var i=e.bitLength(),a=n.mont(e),o=new n(1).toRed(a);t||(t=Math.max(1,i/48|0));for(var s=e.subn(1),c=0;!s.testn(c);c++);for(var u=e.shrn(c),f=s.toRed(a);t>0;t--){var h=this._randrange(new n(2),s);r&&r(h);var l=h.toRed(a).redPow(u);if(0!==l.cmp(o)&&0!==l.cmp(f)){for(var d=1;d<c;d++){if(0===(l=l.redSqr()).cmp(o))return!1;if(0===l.cmp(f))break}if(d===c)return!1}}return!0},a.prototype.getDivisor=function(e,t){var r=e.bitLength(),i=n.mont(e),a=new n(1).toRed(i);t||(t=Math.max(1,r/48|0));for(var o=e.subn(1),s=0;!o.testn(s);s++);for(var c=e.shrn(s),u=o.toRed(i);t>0;t--){var f=this._randrange(new n(2),o),h=e.gcd(f);if(0!==h.cmpn(1))return h;var l=f.toRed(i).redPow(c);if(0!==l.cmp(a)&&0!==l.cmp(u)){for(var d=1;d<s;d++){if(0===(l=l.redSqr()).cmp(a))return l.fromRed().subn(1).gcd(e);if(0===l.cmp(u))break}if(d===s)return(l=l.redSqr()).fromRed().subn(1).gcd(e)}}return!1}},function(e,t,r){var n=r(12);e.exports=m,m.simpleSieve=g,m.fermatTest=v;var i=r(3),a=new i(24),o=new(r(55)),s=new i(1),c=new i(2),u=new i(5),f=(new i(16),new i(8),new i(10)),h=new i(3),l=(new i(7),new i(11)),d=new i(4),p=(new i(12),null);function y(){if(null!==p)return p;var e=[];e[0]=2;for(var t=1,r=3;r<1048576;r+=2){for(var n=Math.ceil(Math.sqrt(r)),i=0;i<t&&e[i]<=n&&r%e[i]!=0;i++);t!==i&&e[i]<=n||(e[t++]=r)}return p=e,e}function g(e){for(var t=y(),r=0;r<t.length;r++)if(0===e.modn(t[r]))return 0===e.cmpn(t[r]);return!0}function v(e){var t=i.mont(e);return 0===c.toRed(t).redPow(e.subn(1)).fromRed().cmpn(1)}function m(e,t){if(e<16)return new i(2===t||5===t?[140,123]:[140,39]);var r,p;for(t=new i(t);;){for(r=new i(n(Math.ceil(e/8)));r.bitLength()>e;)r.ishrn(1);if(r.isEven()&&r.iadd(s),r.testn(1)||r.iadd(c),t.cmp(c)){if(!t.cmp(u))for(;r.mod(f).cmp(h);)r.iadd(d)}else for(;r.mod(a).cmp(l);)r.iadd(d);if(g(p=r.shrn(1))&&g(r)&&v(p)&&v(r)&&o.test(p)&&o.test(r))return r}}},function(e,t,r){var n=r(23),i=r(1).Buffer,a=r(8);function o(e,t,r,o){a.call(this),this._cipher=new n.AES(t),this._prev=i.from(r),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=o,this._mode=e}r(0)(o,a),o.prototype._update=function(e){return this._mode.encrypt(this,e,this._decrypt)},o.prototype._final=function(){this._cipher.scrub()},e.exports=o},function(e,t,r){var n=r(23),i=r(1).Buffer,a=r(8),o=r(0),s=r(135),c=r(16),u=r(60);function f(e,t,r,o){a.call(this);var c=i.alloc(4,0);this._cipher=new n.AES(t);var f=this._cipher.encryptBlock(c);this._ghash=new s(f),r=function(e,t,r){if(12===t.length)return e._finID=i.concat([t,i.from([0,0,0,1])]),i.concat([t,i.from([0,0,0,2])]);var n=new s(r),a=t.length,o=a%16;n.update(t),o&&(o=16-o,n.update(i.alloc(o,0))),n.update(i.alloc(8,0));var c=8*a,f=i.alloc(8);f.writeUIntBE(c,0,8),n.update(f),e._finID=n.state;var h=i.from(e._finID);return u(h),h}(this,r,f),this._prev=i.from(r),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=o,this._alen=0,this._len=0,this._mode=e,this._authTag=null,this._called=!1}o(f,a),f.prototype._update=function(e){if(!this._called&&this._alen){var t=16-this._alen%16;t<16&&(t=i.alloc(t,0),this._ghash.update(t))}this._called=!0;var r=this._mode.encrypt(this,e);return this._decrypt?this._ghash.update(e):this._ghash.update(r),this._len+=e.length,r},f.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var e=c(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(e,t){var r=0;e.length!==t.length&&r++;for(var n=Math.min(e.length,t.length),i=0;i<n;++i)r+=e[i]^t[i];return r}(e,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=e,this._cipher.scrub()},f.prototype.getAuthTag=function(){if(this._decrypt||!i.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},f.prototype.setAuthTag=function(e){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=e},f.prototype.setAAD=function(e){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(e),this._alen+=e.length},e.exports=f},function(e){e.exports={"aes-128-ecb":{cipher:"AES",key:128,iv:0,mode:"ECB",type:"block"},"aes-192-ecb":{cipher:"AES",key:192,iv:0,mode:"ECB",type:"block"},"aes-256-ecb":{cipher:"AES",key:256,iv:0,mode:"ECB",type:"block"},"aes-128-cbc":{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},"aes-192-cbc":{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},"aes-256-cbc":{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},aes128:{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},aes192:{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},aes256:{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},"aes-128-cfb":{cipher:"AES",key:128,iv:16,mode:"CFB",type:"stream"},"aes-192-cfb":{cipher:"AES",key:192,iv:16,mode:"CFB",type:"stream"},"aes-256-cfb":{cipher:"AES",key:256,iv:16,mode:"CFB",type:"stream"},"aes-128-cfb8":{cipher:"AES",key:128,iv:16,mode:"CFB8",type:"stream"},"aes-192-cfb8":{cipher:"AES",key:192,iv:16,mode:"CFB8",type:"stream"},"aes-256-cfb8":{cipher:"AES",key:256,iv:16,mode:"CFB8",type:"stream"},"aes-128-cfb1":{cipher:"AES",key:128,iv:16,mode:"CFB1",type:"stream"},"aes-192-cfb1":{cipher:"AES",key:192,iv:16,mode:"CFB1",type:"stream"},"aes-256-cfb1":{cipher:"AES",key:256,iv:16,mode:"CFB1",type:"stream"},"aes-128-ofb":{cipher:"AES",key:128,iv:16,mode:"OFB",type:"stream"},"aes-192-ofb":{cipher:"AES",key:192,iv:16,mode:"OFB",type:"stream"},"aes-256-ofb":{cipher:"AES",key:256,iv:16,mode:"OFB",type:"stream"},"aes-128-ctr":{cipher:"AES",key:128,iv:16,mode:"CTR",type:"stream"},"aes-192-ctr":{cipher:"AES",key:192,iv:16,mode:"CTR",type:"stream"},"aes-256-ctr":{cipher:"AES",key:256,iv:16,mode:"CTR",type:"stream"},"aes-128-gcm":{cipher:"AES",key:128,iv:12,mode:"GCM",type:"auth"},"aes-192-gcm":{cipher:"AES",key:192,iv:12,mode:"GCM",type:"auth"},"aes-256-gcm":{cipher:"AES",key:256,iv:12,mode:"GCM",type:"auth"}}},function(e,t){e.exports=function(e){for(var t,r=e.length;r--;){if(255!==(t=e.readUInt8(r))){t++,e.writeUInt8(t,r);break}e.writeUInt8(0,r)}}},function(e,t,r){var n=r(16),i=r(1).Buffer,a=r(60);function o(e){var t=e._cipher.encryptBlockRaw(e._prev);return a(e._prev),t}t.encrypt=function(e,t){var r=Math.ceil(t.length/16),a=e._cache.length;e._cache=i.concat([e._cache,i.allocUnsafe(16*r)]);for(var s=0;s<r;s++){var c=o(e),u=a+16*s;e._cache.writeUInt32BE(c[0],u+0),e._cache.writeUInt32BE(c[1],u+4),e._cache.writeUInt32BE(c[2],u+8),e._cache.writeUInt32BE(c[3],u+12)}var f=e._cache.slice(0,t.length);return e._cache=e._cache.slice(t.length),n(t,f)}},function(e,t,r){var n=r(67),i=r(32),a=r(31),o=r(64),s=r(63),c=r(1).Buffer,u=c.alloc(128),f={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function h(e,t,r){var o=function(e){return"rmd160"===e||"ripemd160"===e?i:"md5"===e?n:function(t){return a(e).update(t).digest()}}(e),s="sha512"===e||"sha384"===e?128:64;t.length>s?t=o(t):t.length<s&&(t=c.concat([t,u],s));for(var h=c.allocUnsafe(s+f[e]),l=c.allocUnsafe(s+f[e]),d=0;d<s;d++)h[d]=54^t[d],l[d]=92^t[d];var p=c.allocUnsafe(s+r+4);h.copy(p,0,0,s),this.ipad1=p,this.ipad2=h,this.opad=l,this.alg=e,this.blocksize=s,this.hash=o,this.size=f[e]}h.prototype.run=function(e,t){return e.copy(t,this.blocksize),this.hash(t).copy(this.opad,this.blocksize),this.hash(this.opad)},e.exports=function(e,t,r,n,i){o(e,t,r,n),c.isBuffer(e)||(e=c.from(e,s)),c.isBuffer(t)||(t=c.from(t,s));var a=new h(i=i||"sha1",e,t.length),u=c.allocUnsafe(n),l=c.allocUnsafe(t.length+4);t.copy(l,0,0,t.length);for(var d=0,p=f[i],y=Math.ceil(n/p),g=1;g<=y;g++){l.writeUInt32BE(g,t.length);for(var v=a.run(l,a.ipad1),m=v,b=1;b<r;b++){m=a.run(m,a.ipad2);for(var w=0;w<p;w++)v[w]^=m[w]}v.copy(u,d),d+=p}return u}},function(e,t,r){(function(t){var r;r=t.browser||parseInt(t.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary",e.exports=r}).call(this,r(9))},function(e,t,r){(function(t){var r=Math.pow(2,30)-1;function n(e,r){if("string"!=typeof e&&!t.isBuffer(e))throw new TypeError(r+" must be a buffer or string")}e.exports=function(e,t,i,a){if(n(e,"Password"),n(t,"Salt"),"number"!=typeof i)throw new TypeError("Iterations not a number");if(i<0)throw new TypeError("Bad iterations");if("number"!=typeof a)throw new TypeError("Key length not a number");if(a<0||a>r||a!=a)throw new TypeError("Bad key length")}}).call(this,r(2).Buffer)},function(e,t,r){t.pbkdf2=r(150),t.pbkdf2Sync=r(62)},function(e){e.exports={sha224WithRSAEncryption:{sign:"rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},"RSA-SHA224":{sign:"ecdsa/rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},sha256WithRSAEncryption:{sign:"rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},"RSA-SHA256":{sign:"ecdsa/rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},sha384WithRSAEncryption:{sign:"rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},"RSA-SHA384":{sign:"ecdsa/rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},sha512WithRSAEncryption:{sign:"rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA512":{sign:"ecdsa/rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA1":{sign:"rsa",hash:"sha1",id:"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{sign:"ecdsa",hash:"sha1",id:""},sha256:{sign:"ecdsa",hash:"sha256",id:""},sha224:{sign:"ecdsa",hash:"sha224",id:""},sha384:{sign:"ecdsa",hash:"sha384",id:""},sha512:{sign:"ecdsa",hash:"sha512",id:""},"DSA-SHA":{sign:"dsa",hash:"sha1",id:""},"DSA-SHA1":{sign:"dsa",hash:"sha1",id:""},DSA:{sign:"dsa",hash:"sha1",id:""},"DSA-WITH-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-WITH-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-WITH-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-WITH-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-RIPEMD160":{sign:"dsa",hash:"rmd160",id:""},ripemd160WithRSA:{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},"RSA-RIPEMD160":{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},md5WithRSAEncryption:{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"},"RSA-MD5":{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"}}},function(e,t,r){var n=r(38);e.exports=function(e){return(new n).update(e).digest()}},function(e,t,r){"use strict";var n=r(0),i=r(152),a=r(8),o=r(1).Buffer,s=r(67),c=r(32),u=r(31),f=o.alloc(128);function h(e,t){a.call(this,"digest"),"string"==typeof t&&(t=o.from(t));var r="sha512"===e||"sha384"===e?128:64;this._alg=e,this._key=t,t.length>r?t=("rmd160"===e?new c:u(e)).update(t).digest():t.length<r&&(t=o.concat([t,f],r));for(var n=this._ipad=o.allocUnsafe(r),i=this._opad=o.allocUnsafe(r),s=0;s<r;s++)n[s]=54^t[s],i[s]=92^t[s];this._hash="rmd160"===e?new c:u(e),this._hash.update(n)}n(h,a),h.prototype._update=function(e){this._hash.update(e)},h.prototype._final=function(){var e=this._hash.digest();return("rmd160"===this._alg?new c:u(this._alg)).update(this._opad).update(e).digest()},e.exports=function(e,t){return"rmd160"===(e=e.toLowerCase())||"ripemd160"===e?new h("rmd160",t):"md5"===e?new i(s,t):new h(e,t)}},function(e,t,r){var n=r(0),i=r(11),a=r(1).Buffer,o=[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],s=new Array(160);function c(){this.init(),this._w=s,i.call(this,128,112)}function u(e,t,r){return r^e&(t^r)}function f(e,t,r){return e&t|r&(e|t)}function h(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function l(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function d(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function p(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function y(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function g(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function v(e,t){return e>>>0<t>>>0?1:0}n(c,i),c.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},c.prototype._update=function(e){for(var t=this._w,r=0|this._ah,n=0|this._bh,i=0|this._ch,a=0|this._dh,s=0|this._eh,c=0|this._fh,m=0|this._gh,b=0|this._hh,w=0|this._al,C=0|this._bl,E=0|this._cl,S=0|this._dl,A=0|this._el,B=0|this._fl,T=0|this._gl,I=0|this._hl,k=0;k<32;k+=2)t[k]=e.readInt32BE(4*k),t[k+1]=e.readInt32BE(4*k+4);for(;k<160;k+=2){var _=t[k-30],R=t[k-30+1],x=d(_,R),F=p(R,_),D=y(_=t[k-4],R=t[k-4+1]),P=g(R,_),U=t[k-14],N=t[k-14+1],L=t[k-32],M=t[k-32+1],O=F+N|0,K=x+U+v(O,F)|0;K=(K=K+D+v(O=O+P|0,P)|0)+L+v(O=O+M|0,M)|0,t[k]=K,t[k+1]=O}for(var G=0;G<160;G+=2){K=t[G],O=t[G+1];var j=f(r,n,i),V=f(w,C,E),H=h(r,w),q=h(w,r),z=l(s,A),W=l(A,s),X=o[G],Y=o[G+1],Q=u(s,c,m),Z=u(A,B,T),J=I+W|0,$=b+z+v(J,I)|0;$=($=($=$+Q+v(J=J+Z|0,Z)|0)+X+v(J=J+Y|0,Y)|0)+K+v(J=J+O|0,O)|0;var ee=q+V|0,te=H+j+v(ee,q)|0;b=m,I=T,m=c,T=B,c=s,B=A,s=a+$+v(A=S+J|0,S)|0,a=i,S=E,i=n,E=C,n=r,C=w,r=$+te+v(w=J+ee|0,J)|0}this._al=this._al+w|0,this._bl=this._bl+C|0,this._cl=this._cl+E|0,this._dl=this._dl+S|0,this._el=this._el+A|0,this._fl=this._fl+B|0,this._gl=this._gl+T|0,this._hl=this._hl+I|0,this._ah=this._ah+r+v(this._al,w)|0,this._bh=this._bh+n+v(this._bl,C)|0,this._ch=this._ch+i+v(this._cl,E)|0,this._dh=this._dh+a+v(this._dl,S)|0,this._eh=this._eh+s+v(this._el,A)|0,this._fh=this._fh+c+v(this._fl,B)|0,this._gh=this._gh+m+v(this._gl,T)|0,this._hh=this._hh+b+v(this._hl,I)|0},c.prototype._hash=function(){var e=a.allocUnsafe(64);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e},e.exports=c},function(e,t,r){var n=r(0),i=r(11),a=r(1).Buffer,o=[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],s=new Array(64);function c(){this.init(),this._w=s,i.call(this,64,56)}function u(e,t,r){return r^e&(t^r)}function f(e,t,r){return e&t|r&(e|t)}function h(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function l(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function d(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}n(c,i),c.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},c.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,a=0|this._c,s=0|this._d,c=0|this._e,p=0|this._f,y=0|this._g,g=0|this._h,v=0;v<16;++v)r[v]=e.readInt32BE(4*v);for(;v<64;++v)r[v]=0|(((t=r[v-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+r[v-7]+d(r[v-15])+r[v-16];for(var m=0;m<64;++m){var b=g+l(c)+u(c,p,y)+o[m]+r[m]|0,w=h(n)+f(n,i,a)|0;g=y,y=p,p=c,c=s+b|0,s=a,a=i,i=n,n=b+w|0}this._a=n+this._a|0,this._b=i+this._b|0,this._c=a+this._c|0,this._d=s+this._d|0,this._e=c+this._e|0,this._f=p+this._f|0,this._g=y+this._g|0,this._h=g+this._h|0},c.prototype._hash=function(){var e=a.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},e.exports=c},function(e,t,r){"use strict";e.exports=o;var n=r(10),i=r(17);function a(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function o(e){if(!(this instanceof o))return new o(e);n.call(this,e),this._transformState={afterTransform:a.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",s)}function s(){var e=this;"function"==typeof this._flush?this._flush((function(t,r){c(e,t,r)})):c(this,null,null)}function c(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}i.inherits=r(0),i.inherits(o,n),o.prototype.push=function(e,t){return this._transformState.needTransform=!1,n.prototype.push.call(this,e,t)},o.prototype._transform=function(e,t,r){throw new Error("_transform() is not implemented")},o.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},o.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},o.prototype._destroy=function(e,t){var r=this;n.prototype._destroy.call(this,e,(function(e){t(e),r.emit("close")}))}},function(e,t,r){"use strict";var n=r(24);function i(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var r=this,a=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return a||o?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||n.nextTick(i,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?(n.nextTick(i,r,e),r._writableState&&(r._writableState.errorEmitted=!0)):t&&t(e)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},function(e,t,r){e.exports=r(36).EventEmitter},function(e,t,r){"use strict";(function(t,n){var i=r(24);e.exports=b;var a,o=r(76);b.ReadableState=m,r(36).EventEmitter;var s=function(e,t){return e.listeners(t).length},c=r(73),u=r(1).Buffer,f=t.Uint8Array||function(){},h=r(17);h.inherits=r(0);var l=r(167),d=void 0;d=l&&l.debuglog?l.debuglog("stream"):function(){};var p,y=r(166),g=r(72);h.inherits(b,c);var v=["error","close","destroy","pause","resume"];function m(e,t){e=e||{};var n=t instanceof(a=a||r(10));this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var i=e.highWaterMark,o=e.readableHighWaterMark,s=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(o||0===o)?o:s,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new y,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(p||(p=r(33).StringDecoder),this.decoder=new p(e.encoding),this.encoding=e.encoding)}function b(e){if(a=a||r(10),!(this instanceof b))return new b(e);this._readableState=new m(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),c.call(this)}function w(e,t,r,n,i){var a,o=e._readableState;return null===t?(o.reading=!1,function(e,t){if(!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,A(e)}}(e,o)):(i||(a=function(e,t){var r,n;return n=t,u.isBuffer(n)||n instanceof f||"string"==typeof t||void 0===t||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk")),r}(o,t)),a?e.emit("error",a):o.objectMode||t&&t.length>0?("string"==typeof t||o.objectMode||Object.getPrototypeOf(t)===u.prototype||(t=function(e){return u.from(e)}(t)),n?o.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):C(e,o,t,!0):o.ended?e.emit("error",new Error("stream.push() after EOF")):(o.reading=!1,o.decoder&&!r?(t=o.decoder.write(t),o.objectMode||0!==t.length?C(e,o,t,!1):T(e,o)):C(e,o,t,!1))):n||(o.reading=!1)),function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(o)}function C(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&A(e)),T(e,t)}Object.defineProperty(b.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),b.prototype.destroy=g.destroy,b.prototype._undestroy=g.undestroy,b.prototype._destroy=function(e,t){this.push(null),t(e)},b.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=u.from(e,t),t=""),r=!0),w(this,e,t,!1,r)},b.prototype.unshift=function(e){return w(this,e,null,!0,!1)},b.prototype.isPaused=function(){return!1===this._readableState.flowing},b.prototype.setEncoding=function(e){return p||(p=r(33).StringDecoder),this._readableState.decoder=new p(e),this._readableState.encoding=e,this};var E=8388608;function S(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=E?e=E:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function A(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(d("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?i.nextTick(B,e):B(e))}function B(e){d("emit readable"),e.emit("readable"),R(e)}function T(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(I,e,t))}function I(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(d("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=!1}function k(e){d("readable nexttick read 0"),e.read(0)}function _(e,t){t.reading||(d("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),R(e),t.flowing&&!t.reading&&e.read(0)}function R(e){var t=e._readableState;for(d("flow",t.flowing);t.flowing&&null!==e.read(););}function x(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=function(e,t,r){var n;return e<t.head.data.length?(n=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):n=e===t.head.data.length?t.shift():r?function(e,t){var r=t.head,n=1,i=r.data;for(e-=i.length;r=r.next;){var a=r.data,o=e>a.length?a.length:e;if(o===a.length?i+=a:i+=a.slice(0,e),0==(e-=o)){o===a.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=a.slice(o));break}++n}return t.length-=n,i}(e,t):function(e,t){var r=u.allocUnsafe(e),n=t.head,i=1;for(n.data.copy(r),e-=n.data.length;n=n.next;){var a=n.data,o=e>a.length?a.length:e;if(a.copy(r,r.length-e,0,o),0==(e-=o)){o===a.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=a.slice(o));break}++i}return t.length-=i,r}(e,t),n}(e,t.buffer,t.decoder),r);var r}function F(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,i.nextTick(D,t,e))}function D(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function P(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}b.prototype.read=function(e){d("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return d("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?F(this):A(this),null;if(0===(e=S(e,t))&&t.ended)return 0===t.length&&F(this),null;var n,i=t.needReadable;return d("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&d("length less than watermark",i=!0),t.ended||t.reading?d("reading or ended",i=!1):i&&(d("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=S(r,t))),null===(n=e>0?x(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&F(this)),null!==n&&this.emit("data",n),n},b.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},b.prototype.pipe=function(e,t){var r=this,a=this._readableState;switch(a.pipesCount){case 0:a.pipes=e;break;case 1:a.pipes=[a.pipes,e];break;default:a.pipes.push(e)}a.pipesCount+=1,d("pipe count=%d opts=%j",a.pipesCount,t);var c=t&&!1===t.end||e===n.stdout||e===n.stderr?m:u;function u(){d("onend"),e.end()}a.endEmitted?i.nextTick(c):r.once("end",c),e.on("unpipe",(function t(n,i){d("onunpipe"),n===r&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,d("cleanup"),e.removeListener("close",g),e.removeListener("finish",v),e.removeListener("drain",f),e.removeListener("error",y),e.removeListener("unpipe",t),r.removeListener("end",u),r.removeListener("end",m),r.removeListener("data",p),h=!0,!a.awaitDrain||e._writableState&&!e._writableState.needDrain||f())}));var f=function(e){return function(){var t=e._readableState;d("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&s(e,"data")&&(t.flowing=!0,R(e))}}(r);e.on("drain",f);var h=!1,l=!1;function p(t){d("ondata"),l=!1,!1!==e.write(t)||l||((1===a.pipesCount&&a.pipes===e||a.pipesCount>1&&-1!==P(a.pipes,e))&&!h&&(d("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,l=!0),r.pause())}function y(t){d("onerror",t),m(),e.removeListener("error",y),0===s(e,"error")&&e.emit("error",t)}function g(){e.removeListener("finish",v),m()}function v(){d("onfinish"),e.removeListener("close",g),m()}function m(){d("unpipe"),r.unpipe(e)}return r.on("data",p),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?o(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",y),e.once("close",g),e.once("finish",v),e.emit("pipe",r),a.flowing||(d("pipe resume"),r.resume()),e},b.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a<i;a++)n[a].emit("unpipe",this,r);return this}var o=P(t.pipes,e);return-1===o||(t.pipes.splice(o,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},b.prototype.on=function(e,t){var r=c.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var n=this._readableState;n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.emittedReadable=!1,n.reading?n.length&&A(this):i.nextTick(k,this))}return r},b.prototype.addListener=b.prototype.on,b.prototype.resume=function(){var e=this._readableState;return e.flowing||(d("resume"),e.flowing=!0,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,i.nextTick(_,e,t))}(this,e)),this},b.prototype.pause=function(){return d("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(d("pause"),this._readableState.flowing=!1,this.emit("pause")),this},b.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",(function(){if(d("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){d("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i||(r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var a=0;a<v.length;a++)e.on(v[a],this.emit.bind(this,v[a]));return this._read=function(t){d("wrapped _read",t),n&&(n=!1,e.resume())},this},Object.defineProperty(b.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),b._fromList=x}).call(this,r(7),r(9))},function(e,t,r){"use strict";var n=r(1).Buffer,i=r(37).Transform;function a(e){i.call(this),this._block=n.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}r(0)(a,i),a.prototype._transform=function(e,t,r){var n=null;try{this.update(e,t)}catch(e){n=e}r(n)},a.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(e){t=e}e(t)},a.prototype.update=function(e,t){if(function(e,t){if(!n.isBuffer(e)&&"string"!=typeof e)throw new TypeError("Data must be a string or a buffer")}(e),this._finalized)throw new Error("Digest already called");n.isBuffer(e)||(e=n.from(e,t));for(var r=this._block,i=0;this._blockOffset+e.length-i>=this._blockSize;){for(var a=this._blockOffset;a<this._blockSize;)r[a++]=e[i++];this._update(),this._blockOffset=0}for(;i<e.length;)r[this._blockOffset++]=e[i++];for(var o=0,s=8*e.length;s>0;++o)this._length[o]+=s,(s=this._length[o]/4294967296|0)>0&&(this._length[o]-=4294967296*s);return this},a.prototype._update=function(){throw new Error("_update is not implemented")},a.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();void 0!==e&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return t},a.prototype._digest=function(){throw new Error("_digest is not implemented")},e.exports=a},function(e,t){var r={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.gostASN1Instance=void 0;var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.GostASN1=Ia;var i=r(176),a=r(78),o=r(39),s=ArrayBuffer,c=a.gostSecurityInstance.algorithms,u=a.gostSecurityInstance.names,f=a.gostSecurityInstance.identifiers,h=a.gostSecurityInstance.attributes,l=a.gostSecurityInstance.parameters,d=o.gostCodingInstance.BER,p=o.gostCodingInstance.PEM,y=o.gostCodingInstance.Chars,g=o.gostCodingInstance.Hex,v=o.gostCodingInstance.Int16;function m(e){e instanceof s&&(e=new Uint8Array(e));for(var t=new Uint8Array(e.length),r=0,n=e.length;r<n;r++)t[n-r-1]=e[r];return t.buffer}function b(e){return e instanceof s||e.buffer instanceof s}function w(e){return e<=2?e:e<=4?4:e<=8?8:e<=16?16:e<=32?32:e<=64?64:e<=128?128:e<=256?256:e<512?512:e<1024?1024:void 0}var C=function(e,t){return"0x"+g.encode(e,t)},E=function(e,t,r){"number"==typeof e&&(e=e.toString(16));var n,i,a=e.replace("0x","");return r=r||w(a.length),g.decode((i=r,(n=a).length>=i?n:new Array(i-n.length+1).join("0")+n),t)};function S(e){if(e)throw Error("Invalid format")}function A(e,t,r,i){"object"!==(void 0===r?"undefined":n(r))&&(r={value:r}),void 0!==i&&(r.enumerable=i),Object.defineProperty(e,t,r)}function B(e,t,r){for(var n in t)A(e,n,t[n],r)}function T(e,t){return Object.getOwnPropertyDescriptor(e,t)}function I(e,t,r,n,i,a){S(void 0===t);var o={tagNumber:r,tagClass:n||0,tagConstructed:i||!1,object:t};return"DER"!==(e=e||"DER")&&"CER"!==e||(o=d.encode(o,e)),"PEM"===e&&(o=p.encode(o,a)),o}function k(e,t,r,n,i){if(S(void 0===e),"string"==typeof e&&(e=p.decode(e,i,!1)),e instanceof s)try{e=p.decode(y.encode(e),i,!0)}catch(t){e=d.decode(e)}return r=r||0,n=n||!1,void 0===e.tagNumber&&(e=I(!0,e.object,t,r,e.object instanceof Array),e=d.decode(e)),S(e.tagClass!==r||e.tagNumber!==t||e.tagConstructed!==n),0===r&&5===t?null:e.object}function _(e,t,r,n){if("function"!=typeof t&&(n=r,r=t,t=function(){e.apply(this,arguments)}),t.prototype=Object.create(e.prototype,{constructor:{value:t},superclass:{value:e.prototype}}),r&&B(t.prototype,r),e!==Object)for(var i in e)t[i]=e[i];return t.super=e,n&&B(t,n,!0),t}var R,x,F,D=_(Object,(function(e){this.object=e}),{_set:function(e,t,r){e.property(t).set.call(this,r)},_get:function(e,t){return e.property(t).get.call(this)},_call:function(e,t,r){return e.method(t).apply(this,r)},hasProperty:function(e){return this.hasOwnProperty(e)||!!this.constructor.property(e)},encode:function(){return this.object}},{decode:function(e){return new this(e)},property:function(e){for(var t=this.prototype;t;){var r=T(t,e);if(r)return r;t=t.superclass}},method:function(e){for(var t=this.prototype;t;){if(t[e])return t[e];t=t.superclass}}}),P=function(e){return _(D,{encode:function(t){return I(t,this.object,e)}},{decode:function(t){return new this(k(t,e))}})},U=D,N=P(1),L=P(22),M=P(18),O=P(19),K=P(20),G=P(12),j=P(23),V=P(24),H=P(28),q=P(30),z=_(P(5),{object:{get:function(){return null},set:function(e){S(null!==e)}}}),W=function(e){var t=_(P(e),(function(r){if(!(this instanceof t))return n=r,_(P(e),(function(e){t.super.call(this,e)}),{encode:function(t){return I(t,n[this.object],e)}},{decode:function(t){var r=k(t,e);for(var i in n)if(r===n[i])return new this(i);S(!0)}});var n;t.super.apply(this,arguments)}));return t},X=W(2),Y=W(10),Q=(R=_(P(4),(function(e){if(!(this instanceof R))return(t=e)?_(t,{encode:function(e){return I(e,t.method("encode").call(this,!0),4)}},{decode:function(e){return t.decode.call(this,k(e,4))}}):R;var t;R.super.apply(this,arguments)})),R),Z=function(){var e=_(P(3),(function(t){if(!(this instanceof e))return"object"===(void 0===t?"undefined":n(t))?(i=t,_(D,(function(e,t){D.call(this,e),this.numbits=t||0}),{encode:function(e){var t=this.object,r=[];if(t instanceof Array){for(var n=0,a=t.length;n<a;n++){var o=i[t[n]];void 0!==o&&(r[o]="1")}for(n=0,a=Math.max(r.length,this.numbits);n<a;n++)r[n]||(r[n]="0");r=r.join("")}else r="0";return I(e,r,3)}},{decode:function(e){var t=k(e,3),r=[];for(var n in i){var a=i[n];"1"===t.charAt(a)&&r.push(n)}return new this(r,t.length)}})):(r=t)?_(r,{encode:function(e){return I(e,r.method("encode").call(this,!0),3)}},{decode:function(e){return r.decode.call(this,k(e,3))}}):e;var r,i;e.super.apply(this,arguments)}));return e}(),J=function(e){return e.combine=function(t,r){for(var n in e.prototype)e.prototype.hasOwnProperty(n)&&!t.hasProperty(n)&&A(t,n,function(e){return{get:function(){return this[r]&&this[r][e]},set:function(t){this[r]||(this[r]={}),this[r][e]=t},configurable:!1,enumerable:!0}}(n))},e},$=function(e,t){var r=_(D,(function(e,t){A(this,"items",{writable:!0,value:{}}),"string"==typeof e||e instanceof s?this.decode(e):void 0!==e&&(this.object=e,t&&this.check())}),{object:{get:function(){return this},set:function(t){if(t instanceof r)for(var n in this.items=t.items,e)(o=this.getItemClass(n,this.items)).combine&&o.combine(this,n);else{var i={};for(var n in e){var a=t[n],o=this.getItemClass(n,i);void 0!==a?i[n]=new o(a):o.combine&&(i[n]=new o(t)),o.combine&&o.combine(this,n)}this.items=i}}},getItemClass:function(t,r){return e[t]},encode:function(r){var n=[],i=this.items;for(var a in e)if(i[a]){var o=i[a].encode(!0);void 0!==o&&n.push(o)}return I(r,n,16,0,!0,t)},decode:function(e){this.object=this.constructor.decode(e)},check:function(){this.constructor.decode(this.encode(!0))}},{encode:function(e,t){return new this(e).encode(t)},decode:function(r){r=k(r,16,0,!0,t);var n=0,i=new this,a=i.items={};for(var o in e){var s=i.getItemClass(o,a),c=s.decode(r[n]);void 0!==c&&(a[o]=c,s.combine&&s.combine(i,o),n++)}return i}});for(var n in e)A(r.prototype,n,function(t){return{get:function(){return this.items[t]&&this.items[t].object},set:function(e){if(void 0!==e){var r=this.getItemClass(t,this.items);this.items[t]=new r(e)}else delete this.items[t]},configurable:!1,enumerable:!e[t].combine}}(n)),e[n].combine&&e[n].combine(r.prototype,n);return r},ee=function(e,t,r,n,i){var a=$(e,i);return function i(o,s){t=t||"type",r=r||"value",s=s||n||U;var c=_(a,(function(e){if(!(this instanceof c))return i.apply(this,arguments);a.apply(this,arguments)}),{getItemClass:function(n,i){var a=e[n];if(r===n){var c,u=i&&i[t];if(u){var f=u.object;o&&(c="function"==typeof o?o(f):o[f])}c=c||s||U,a=a===U?c:a(c)}return a}});return A(c.prototype,t,{get:function(){return this.items[t]&&this.items[t].object},set:function(){S(!0)},configurable:!1,enumerable:!0}),c}()},te=_(D,{encode:function(e){var t=this.object;return S(!(t=/^(\d+\.)+\d+$/.test(t)?t:f[t])),I(e,t,6)}},{decode:function(e){var t=k(e,6);return new this(u[t]||t)}}),re=function(e){return _(e=e||U,{encode:function(t){var r=e.method("encode").call(this,t);return"string"==typeof r||r instanceof s?r:4===r.tagNumber||0!==r.tagClass||r.object instanceof Array?{object:r.object}:{object:d.encode(r,"DER",!0)}}},{decode:function(t){return"string"==typeof t||t instanceof s||(t={object:t.object,header:t.header,content:t.content}),e.decode.call(this,t)}})},ne=function(e){return _(e=e||U,{encode:function(t){var r=e.method("encode").call(this,t);return"string"==typeof r||r instanceof s?r:{object:[r]}}},{decode:function(t){return"string"==typeof t||t instanceof s?e.decode.call(this,t):e.decode.call(this,t.object[0])}})},ie=function(e,t){return _(t,(function(){t.apply(this,arguments)}),{encode:function(r){var n=t.method("encode").call(this,r);return"string"==typeof n||n instanceof s||(n.tagNumber=e,n.tagClass=2,n.tagConstructed=n.object instanceof Array),n}},{decode:function(r){return S(void 0!==r.tagNumber&&(2!==r.tagClass||r.tagNumber!==e)),t.decode.call(this,r)}})},ae=function(e){return function(t,r){return t=t||U,function n(i,a){var o="function"==typeof t&&void 0!==i?t(i,a):t;if(r){var s=_(D,(function(e){if(!(this instanceof s))return n.apply(this,arguments);A(this,"items",{writable:!0,value:{}}),D.call(this,e||{})}),{object:{get:function(){return this.read(),this},set:function(e){if(e instanceof s)e.read(),this.items=e.items;else{var t={};for(var r in e){var n=e[r];t[r]=this.createItem(n,r)}this.items=t}this.reset()}},createItem:function(e,t){if(r){var n={};n[r.typeName]=t,n[r.valueName]=e}else n=e;return new o(n)},getItemValue:function(e){var t=this.items[e];return r?t.object[r.valueName]:t.object},setItemValue:function(e,t){var n=this.items[e];r?n.object[r.valueName]=t:n.object=t},isItemType:function(e){return r?f[e]:!isNaN(parseInt(e))},reset:function(){var e=this.items;for(var t in this)this.hasOwnProperty(t)&&!this.items[t]&&this.isItemType(t)&&delete this[t];for(var t in e)this[t]=this.getItemValue(t)},read:function(){var e=this.items;for(var t in this)this.isItemType(t)&&(this.items[t]?this.getItemValue(t)!==this[t]&&this.setItemValue(t,this[t]):(e[t]=this.createItem(this[t],t),this[t]=this.getItemValue(t)))},encode:function(t){this.read();var r=this.items,n=[];for(var i in r){var a=r[i].encode(!0);void 0!==a&&n.push(a)}return I(t,n,e,0,!0)},decode:function(e){this.object=this.constructor.decode(e)},check:function(){this.constructor.decode(this.encode(!0))}},{encode:function(e,t){return new this(e).encode(t)},decode:function(t){t=k(t,e,0,!0);for(var n=new this,i=n.items={},a=0,s=t.length;a<s;a++){var c=o.decode(t[a]);i[r?c.object[r.typeName]:a]=c}return n.reset(),n}});return s}var c=_(D,(function(e){if(!(this instanceof c))return n.apply(this,arguments);B(this,{items:{writable:!0,value:[]},values:{writable:!0,value:[]}}),D.call(this,e||[])}),{object:{get:function(){return this.read(),this.values},set:function(e){if(e instanceof c)e.read(),this.items=e.items;else{for(var t=[],r=0,n=e.length;r<n;r++)t[r]=new o(e[r]);this.items=t}this.reset()}},encode:function(t){this.read();for(var r=this.items,n=[],i=0,a=r.length;i<a;i++){var o=r[i].encode(!0);void 0!==o&&n.push(o)}return I(t,n,e,0,!0)},decode:function(e){this.object=this.constructor.decode(e)},check:function(){this.constructor.decode(this.encode(!0))},reset:function(){for(var e=0,t=this.items.length;e<t;e++)this.values.push(this.items[e].object)},read:function(){for(var e=this.items,t=this.values,r=0,n=t.length;r<n;r++)this.items[r]?e[r].object!==t[r]&&(e[r].object=t[r]):(e[r]=new o(t[r]),t[r]=e[r].object)}},{encode:function(e,t){return new this(e).encode(t)},decode:function(t){t=k(t,e,0,!0);var r=new this;r.items=[];for(var n=0,i=t.length;n<i;n++)r.items.push(o.decode(t[n]));return r.reset(),r}});return c}()}},oe=ae(16),se=ae(17),ce=function(e,t){if(t){var r=_(D,{object:{get:function(){return this.item?t.decode(this.item.object):void 0},set:function(r){void 0!==r?this.item=new e(t.encode(r)):delete this.item}},encode:function(e){return this.item.encode(e)}},{decode:function(t){var r=new this;return r.item=e.decode(t),r}});for(var n in e)r[n]||(r[n]=e[n]);return r}return e},ue=function(e){return ce(se(e),{encode:function(e){return[e]},decode:function(e){return e[0]}})},fe=function(e,t){return _(D,{object:{get:function(){return this.item&&this.item.object},set:function(r){if(r instanceof D)for(var n in e)if(r instanceof e[n])return void(this.item=r);S(!(n="function"==typeof t?t(r):t)||!e[n]),r=new e[n](r),this.item=r}},encode:function(e){return this.item.encode(e)}},{decode:function(t){for(var r in e)try{var n=e[r].decode(t);if(void 0!==n)return new this(n)}catch(e){}S(!0)}})},he=function(e){return _(e=e||U,{encode:function(){return d.encode(e.method("encode").call(this,!0))}},{encode:function(e,t){return new this(e).encode(t)},decode:function(t){return e.decode.call(this,d.decode(t))}})},le=function(e,t){return _(e=e||U,{encode:function(r){if(this.object!==t)return e.method("encode").call(this,r)}},{decode:function(r){if(void 0===r)return new this(t);try{return e.decode.call(this,r)}catch(e){return}}})},de=function(e){return _(e=e||U,{},{decode:function(t){if(void 0!==t)try{return e.decode.call(this,t)}catch(e){return}}})},pe=fe({teletexString:K,printableString:O,universalString:H,utf8String:G,bmpString:q,numericString:M},(function(e){return/^[A-Za-z0-9\.@\+\-\:\=\\\/\?\!\#\$\%\^\&\*\(\)\[\]\{\}\>\<\|\~]*$/.test(e)?"printableString":"utf8String"})),ye=fe({utcTime:j,generalTime:V},(function(e){return e.getYear()>=2050?"generalTime":"utcTime"})),ge=te,ve=U,me=ee({type:ge,value:ve}),be={typeName:"type",valueName:"value"},we=ue(me({serialName:O,countryName:O,dnQualifier:O,emailAddress:L,domainComponent:L,SNILS:M,OGRN:M,INN:M},pe)),Ce=oe(we,be)(),Ee=fe({rdnSequence:Ce},"rdnSequence"),Se=J($({notBefore:ye,notAfter:ye})),Ae=X,Be=ee({type:te,value:U}),Te=se(Be,be),Ie=oe(Be,be),ke=X,_e=$({a:ke,b:ke,seed:de(Z)}),Re=Q(_(D,{encode:function(){var e=this.object,t=Math.max(w(e.x.length-2),w(e.y.length-2))/2,r=new Uint8Array(2*t+1);return r[0]=4,r.set(new Uint8Array(E(e.x,!1,t)),1),r.set(new Uint8Array(E(e.y,!1,t)),t+1),r.buffer}},{decode:function(e){var t=(e.byteLength-1)/2;return new this({x:C(new Uint8Array(e,1,t)),y:C(new Uint8Array(e,t+1,t))})}})),xe=$({fieldType:te,parameters:X}),Fe=$({version:Ae,fieldID:xe,curve:_e,base:Re,order:X,cofactor:de(X)}),De=$({publicKeyParamSet:te,digestParamSet:te,encryptionParamSet:de(te)}),Pe=function(e,t){return _(e=e||U,{encode:function(r){return this.object===t?new z(null).encode(r):e.method("encode").call(this,r)}},{decode:function(r){if(void 0!==r){if(null===r||5===r.tagNumber&&0===r.tagClass)return new this(t);try{return e.decode.call(this,r)}catch(e){return}}}})}(te,"id-GostR3411-94-CryptoProParamSet"),Ue=fe({namedParameters:te,ecParameters:Fe,implicitly:de(z)},(function(e){return"string"==typeof e||e instanceof String?"namedParameters":"ecParameters"})),Ne=function(e,t){return ce($({algorithm:te,parameters:de(e)}),t)},Le=function(){var e=Ne(U),t=_(D,(function(e){if(!(this instanceof t))return r(e);t.super.apply(this,arguments)}),{encode:function(t){return new e(this.object).encode(t)}},{decode:function(t){return new this(e.decode(t).object)}}),r=function(e){return _(D,{object:{get:function(){return this.item?this.item.object:void 0},set:function(t){if(t){var r=e[t.id];if(!r)throw new Error("Algorithm not supported");this.item=new r(t)}else delete this.item}},encode:function(e){return this.item.encode(e)}},{decode:function(t){"string"==typeof t&&(t=p.decode(t,void 0,!1)),t instanceof s&&(t=d.decode(t));var r=e[u[t.object[0].object]];if(r){var n=new this;return n.item=r.decode(t),n}throw new Error("Algorithm not supported")}})};return t}(),Me=Ne(Ue,{encode:function(e){var t;return t="string"==typeof e.namedCurve?h.namedCurve[e.namedCurve]:{version:1,fieldID:{fieldType:"id-prime-Field",parameters:e.curve.p},curve:{a:e.curve.a,b:e.curve.b},base:{x:e.curve.x,y:e.curve.y},order:e.curve.q,cofactor:1},{algorithm:e.id,parameters:t}},decode:function(e){var t=e.parameters,r=c[e.algorithm];if("string"==typeof t||t instanceof String)r=(0,i.expand)(r,l[t]);else{if("object"!==(void 0===t?"undefined":n(t)))throw new DataError("Invalid key paramters");r=(0,i.expand)(r,{curve:{p:t.fieldID.parameters,a:t.curve.a,b:t.curve.b,x:t.base.x,y:t.base.y,q:t.order}})}return r}}),Oe=Ne(De,{encode:function(e){var t=e.namedCurve?"namedCurve":"namedParam",r=e.name.indexOf("-94")>=0||e.name.indexOf("-2001")>=0||1994===e.version||2001===e.version?e.sBox||"D-A":e.name.indexOf("-512")>=0||512===e.length?"D-512":"D-256";return{algorithm:e.id,parameters:{publicKeyParamSet:h[t][e[t]],digestParamSet:h.sBox[r],encryptionParamSet:e.encParams&&e.encParams.sBox?h.sBox[e.encParams.sBox]:void 0}}},decode:function(e){var t=e.parameters,r=(0,i.expand)(c[e.algorithm],l[t.publicKeyParamSet],l[t.digestParamSet]);return t.encryptionParamSet&&(r.encParams=l[t.encryptionParamSet]),r}}),Ke=Ne(U,{encode:function(e){return{algorithm:e.id}},decode:function(e){return c[e.algorithm]}}),Ge=Ne(z,{encode:function(e){return{algorithm:e.id,parameters:null}},decode:function(e){return c[e.algorithm]}}),je=Ne(Pe,{encode:function(e){return{algorithm:e.id,parameters:h.sBox[e.sBox||e.hash&&e.hash.sBox||"D-A"]}},decode:function(e){var t=(0,i.expand)(c[e.algorithm]),r=l[e.parameters];return t.hash?t.hash=(0,i.expand)(t.hash,r):t=(0,i.expand)(t,r),t}}),Ve=Le({ecdsa:Me,noSignature:Ge,rsaEncryption:Ge,"id-sc-gostR3410-2001":Me,"id-GostR3410-2001":Oe,"id-GostR3410-94":Oe,"id-GostR3410-2001DH":Oe,"id-GostR3410-94DH":Oe,"id-tc26-gost3410-12-256":Oe,"id-tc26-gost3410-12-512":Oe,"id-tc26-agreement-gost-3410-12-256":Oe,"id-tc26-agreement-gost-3410-12-512":Oe,"id-sc-gost28147-gfb":Ke,"id-Gost28147-89":Ke}),He=Le({noSignature:Ge,rsaEncryption:Ge,sha1withRSAEncryption:Ge,sha256withRSAEncryption:Ge,sha384withRSAEncryption:Ge,sha512withRSAEncryption:Ge,ecdsa:Ke,"ecdsa-with-SHA1":Ke,"ecdsa-with-SHA256":Ke,"ecdsa-with-SHA384":Ke,"ecdsa-with-SHA512":Ke,"id-GostR3410-94":Ge,"id-GostR3410-2001":Ge,"id-GostR3411-94-with-GostR3410-2001":Ke,"id-GostR3411-94-with-GostR3410-94":Ke,"id-tc26-gost3410-12-256":Ge,"id-tc26-gost3410-12-512":Ge,"id-tc26-signwithdigest-gost3410-12-94":Ke,"id-tc26-signwithdigest-gost3410-12-256":Ke,"id-tc26-signwithdigest-gost3410-12-512":Ke,"id-sc-gostR3410-94":Ge,"id-sc-gostR3410-2001":Ge,"id-sc-gostR3411-94-with-gostR3410-94":Ge,"id-sc-gostR3411-94-with-gostR3410-2001":Ge}),qe=Le({sha1:Ke,sha256:Ge,sha384:Ge,sha512:Ge,"id-GostR3411-94":je,"id-tc26-gost3411-94":je,"id-tc26-gost3411-12-256":Ge,"id-tc26-gost3411-12-512":Ge,"id-sc-gostR3411-94":Ke}),ze=Q,We=Q,Xe=te,Ye=Q,Qe=$({iv:Ye,encryptionParamSet:Xe}),Ze=$({encryptionParamSet:Xe,ukm:de(Q)}),Je=Ne(Qe,{encode:function(e){return{algorithm:e.id,parameters:{iv:e.iv,encryptionParamSet:h.sBox[e.sBox||"E-A"]}}},decode:function(e){var t=(0,i.expand)(c[e.algorithm],l[e.parameters.encryptionParamSet]);return t.iv=e.parameters.iv,t}}),$e=Ne(Ye,{encode:function(e){return{algorithm:e.id,parameters:e.iv}},decode:function(e){var t=(0,i.expand)(c[e.algorithm]);return t.iv=e.parameters||new Uint8Array([0,0,0,0,0,0,0,0]),t}}),et=Ne(Ze,{encode:function(e){return{algorithm:e.id,parameters:{encryptionParamSet:h.sBox[e.sBox||"E-A"],ukm:e.ukm}}},decode:function(e){var t=(0,i.expand)(c[e.algorithm],l[e.parameters.encryptionParamSet]);return e.parameters.ukm&&(t.ukm=e.parameters.ukm),t}}),tt=Le({"id-Gost28147-89-None-KeyWrap":et,"id-Gost28147-89-CryptoPro-KeyWrap":et}),rt=Ne(tt,{encode:function(e){return{algorithm:e.id,parameters:e.wrapping}},decode:function(e){var t=(0,i.expand)(c[e.algorithm]);return t.wrapping=e.parameters,t}}),nt=Le({"id-sc-gost28147-gfb":$e,"id-Gost28147-89":Je}),it=Le({"id-Gost28147-89-MAC":Qe,"id-HMACGostR3411-94":je,"id-tc26-hmac-gost-3411-12-256":je,"id-tc26-hmac-gost-3411-12-512":je,hmacWithSHA1:Ke,hmacWithSHA224:Ke,hmacWithSHA256:Ke,hmacWithSHA384:Ke,hmacWithSHA512:Ke,"id-sc-gost28147-mac":Ke,"id-sc-hmacWithGostR3411":Ke}),at=$({salt:fe({specified:Q,otherSource:Le},(function(e){return b(e)?"specified":"otherSource"})),iterationCount:X,keyLength:de(X),prf:it}),ot=Ne(at,{encode:function(e){return{algorithm:e.id,parameters:{salt:e.salt,iterationCount:e.iterations,prf:e.hmac}}},decode:function(e){var t=(0,i.expand)(c[e.algorithm]);return t.salt=e.parameters.salt,t.iterations=e.parameters.iterationCount,t.hmac=e.parameters.prf,t.hash=t.hmac.hash,t}}),st=Le({PBKDF2:ot}),ct=$({salt:Q,iterationCount:X}),ut=Ne(ct,{paramType:ct,encode:function(e){return{algorithm:e.id,parameters:{salt:e.derivation.salt,iterationCount:e.derivation.iterations}}},decode:function(e){var t=(0,i.expand)(c[e.algorithm]);return t.derivation=(0,i.expand)(t.derivation,{salt:e.parameters.salt,iterations:e.parameters.iterationCount}),t}}),ft=$({keyDerivationFunc:st,encryptionScheme:nt}),ht=Ne(ft,{encode:function(e){return{algorithm:e.id,parameters:{keyDerivationFunc:e.derivation,encryptionScheme:e.encryption}}},decode:function(e){var t=(0,i.expand)(c[e.algorithm]);return t.derivation=e.parameters.keyDerivationFunc,t.encryption=e.parameters.encryptionScheme,t}}),lt=(Le({"pbeWithSHAAndAES128-CBC":ut,"pbeWithSHAAndAES192-CBC":ut,"pbeWithSHAAndAES256-CBC":ut,"pbeWithSHA256AndAES128-CBC":ut,"pbeWithSHA256AndAES192-CBC":ut,"pbeWithSHA256AndAES256-CBC":ut,"id-sc-pbeWithGost3411AndGost28147":ut,"id-sc-pbeWithGost3411AndGost28147CFB":ut,"pbeWithSHAAnd3-KeyTripleDES-CBC":ut,"pbeWithSHAAnd2-KeyTripleDES-CBC":ut,"pbeWithSHAAnd128BitRC2-CBC":ut,"pbeWithSHAAnd40BitRC2-CBC":ut,pbeUnknownGost:ut,PBES2:ht}),Le({ecdsa:Me,rsaEncryption:Ge,"id-sc-gost28147-gfb":$e,"id-Gost28147-89":Je,"id-sc-gostR3410-2001":Me,"id-GostR3410-2001":Oe,"id-GostR3410-94":Oe,"id-tc26-gost3410-12-256":Oe,"id-tc26-gost3410-12-512":Oe,"id-GostR3410-94-CryptoPro-ESDH":rt,"id-GostR3410-2001-CryptoPro-ESDH":rt,"id-tc26-agreement-gost-3410-12-256":rt,"id-tc26-agreement-gost-3410-12-512":rt,"id-sc-r3410-ESDH-r3411kdf":Ge,"id-Gost28147-89-None-KeyWrap":et,"id-Gost28147-89-CryptoPro-KeyWrap":et,"id-sc-cmsGostWrap":Ke,"id-sc-cmsGost28147Wrap":Ke,"pbeWithSHAAndAES128-CBC":ut,"pbeWithSHAAndAES192-CBC":ut,"pbeWithSHAAndAES256-CBC":ut,"pbeWithSHA256AndAES128-CBC":ut,"pbeWithSHA256AndAES192-CBC":ut,"pbeWithSHA256AndAES256-CBC":ut,"id-sc-pbeWithGost3411AndGost28147":ut,"id-sc-pbeWithGost3411AndGost28147CFB":ut,"pbeWithSHAAnd3-KeyTripleDES-CBC":ut,"pbeWithSHAAnd2-KeyTripleDES-CBC":ut,"pbeWithSHAAnd128BitRC2-CBC":ut,"pbeWithSHAAnd40BitRC2-CBC":ut,pbeUnknownGost:ut,PBES2:ht})),dt=$({keyDerivationFunc:st,messageAuthScheme:it}),pt=Ne(dt,{encode:function(e){return{algorithm:e.id,parameters:{keyDerivationFunc:e.derivation,messageAuthScheme:e.hmac}}},decode:function(e){var t=(0,i.expand)(c[e.algorithm]);return t.derivation=e.parameters.keyDerivationFunc,t.hmac=e.parameters.messageAuthScheme,t}}),yt=(Le({PBMAC1:pt}),Le({"id-sc-gost28147-gfb":$e,"id-Gost28147-89":Je,"pbeWithSHAAndAES128-CBC":ut,"pbeWithSHAAndAES192-CBC":ut,"pbeWithSHAAndAES256-CBC":ut,"pbeWithSHA256AndAES128-CBC":ut,"pbeWithSHA256AndAES192-CBC":ut,"pbeWithSHA256AndAES256-CBC":ut,"id-sc-pbeWithGost3411AndGost28147":ut,"id-sc-pbeWithGost3411AndGost28147CFB":ut,"pbeWithSHAAnd3-KeyTripleDES-CBC":ut,"pbeWithSHAAnd2-KeyTripleDES-CBC":ut,"pbeWithSHAAnd128BitRC2-CBC":ut,"pbeWithSHAAnd40BitRC2-CBC":ut,pbeUnknownGost:ut,PBES2:ht})),gt=ce,vt=gt(Z(he(X)),{encode:function(e){return v.encode(m(e))},decode:function(e){return m(v.decode(e))}}),mt=gt(Z(he(Q)),{encode:function(e){var t=new Uint8Array(e.byteLength+1),r=m(e),n=e.byteLength/2;return t[0]=4,t.set(new Uint8Array(r,n,n),1),t.set(new Uint8Array(r,0,n),n+1),t.buffer},decode:function(e){S(0==(1&e.byteLength));var t=new Uint8Array(e.byteLength-1),r=t.byteLength/2;return t.set(new Uint8Array(e,r+1,r),0),t.set(new Uint8Array(e,1,r),r),m(t)}}),bt=Z(he(Q)),wt=$({algorithm:Ve,subjectPublicKey:Z},"PUBLIC KEY"),Ct=(x={"id-sc-gostR3410-2001":mt,"id-sc-gostR3410-94":vt,"id-GostR3410-2001":bt,"id-GostR3410-94":bt,"id-tc26-gost3410-12-256":bt,"id-tc26-gost3410-12-512":bt},ce(ee({algorithm:Ve,subjectPublicKey:U},"algorithm","subjectPublicKey")((function(e){return x[e.id]})),{encode:function(e){return{algorithm:e.algorithm,subjectPublicKey:e.buffer}},decode:function(e){return{algorithm:e.algorithm,type:"public",extractable:!0,usages:["verify","deriveKey","deriveBits"],buffer:e.subjectPublicKey}}})),Et=Q,St=gt(Et(he(X)),{encode:function(e){return C(e,!0)},decode:function(e){return E(e,!0)}}),At=Q,Bt=$({keyValueMask:At,keyValyePublicKey:Q}),Tt=fe({privateKey:Et(he(fe({keyValueMask:At,keyValueInfo:Bt},(function(e){return b(e)?"keyValueMask":"keyValueInfo"})))),keyValueMask:At},(function(e){return e.enclosed?"keyValueMask":"privateKey"})),It=function(e){return ee({version:Ae,privateKeyAlgorithm:Ve,privateKeyWrapped:gt(Et(he($({keyData:X,keyMac:X}))),{encode:function(e){var t=e.byteLength-4;return{keyData:C(new Uint8Array(e,0,t)),keyMac:C(new Uint8Array(e,t,4))}},decode:function(e){var t=E(e.keyData),r=E(e.keyMac),n=new Uint8Array(t.byteLength+r.byteLength);return n.set(new Uint8Array(t)),n.set(new Uint8Array(r),t.byteLength),n}}),attributes:U},"privateKeyAlgorithm","attributes")((function(t){return de(ie(0,re(Te({"id-sc-gostR3410-2001-publicKey":ue(e[t.id])}))))}))}({"id-sc-gostR3410-2001":mt,"id-sc-gostR3410-94":vt,"id-GostR3410-2001":bt,"id-GostR3410-94":bt,"id-GostR3410-2001DH":bt,"id-GostR3410-94DH":bt,"id-tc26-gost3410-12-256":bt,"id-tc26-gost3410-12-512":bt,"id-tc26-agreement-gost-3410-12-256":bt,"id-tc26-agreement-gost-3410-12-512":bt}),kt=$({version:Ae,privateKeyAlgorithm:Ve,privateKey:Et,attributes:de(ie(0,re(Te)))},"PRIVATE KEY"),_t=Ve,Rt=Z,xt=$({version:Ae,privateKeyAlgorithm:_t,privateKey:Et,attributes:de(ie(0,re(Te))),publicKey:de(ie(1,re(Rt)))}),Ft=oe(xt),Dt=function(e){return ce(ee({version:Ae,privateKeyAlgorithm:Ve,privateKey:U,attributes:de(ie(0,re(Te)))},"privateKeyAlgorithm","privateKey")((function(t){return e[t.id]})),{encode:function(e){return{version:0,privateKeyAlgorithm:e.algorithm,privateKey:e.buffer}},decode:function(e){return{algorithm:e.privateKeyAlgorithm,type:"private",extractable:!0,usages:["sign","deriveKey","deriveBits"],buffer:b(e.privateKey)?e.privateKey:e.privateKey.keyValueMask}}})}({"id-sc-gostR3410-2001":St,"id-sc-gostR3410-94":St,"id-GostR3410-2001":Tt,"id-GostR3410-94":Tt,"id-GostR3410-2001DH":Tt,"id-GostR3410-94DH":Tt,"id-tc26-gost3410-12-256":Tt,"id-tc26-gost3410-12-512":Tt,"id-tc26-agreement-gost-3410-12-256":Tt,"id-tc26-agreement-gost-3410-12-512":Tt}),Pt=Q,Ut=$({encryptionAlgorithm:lt,encryptedData:Pt},"ENCRYPTED PRIVATE KEY"),Nt=Z,Lt=X,Mt=$({cA:le(N,!1),pathLenConstraint:de(X)}),Ot=Z({digitalSignature:0,nonRepudiation:1,keyEncipherment:2,dataEncipherment:3,keyAgreement:4,keyCertSign:5,cRLSign:6,encipherOnly:7,decipherOnly:8}),Kt=te,Gt=oe(Kt),jt=Q,Vt=$({type:te,value:ie(0,ne(U))}),Ht=$({nameAssigner:de(ie(0,re(pe))),partyName:de(ie(1,re(pe)))}),qt=$({}),zt=fe({otherName:ie(0,re(Vt)),rfc822Name:ie(1,re(pe)),dNSName:ie(2,re(pe)),x400Address:ie(3,re(qt)),directoryName:ie(4,ne(Ee)),ediPartyName:ie(5,re(Ht)),uniformResourceIdentifier:ie(6,re(pe)),iPAddress:ie(7,re(Q)),registeredID:ie(8,re(te))},(function(e){return"string"==typeof e||e instanceof String?e.indexOf("@")>=0?"rfc822Name":"dNSName":b(e)?"iPAddress":"directoryName"})),Wt=oe(zt),Xt=$({keyIdentifier:de(ie(0,re(jt))),authorityCertIssuer:de(ie(1,re(Wt))),authorityCertSerialNumber:de(ie(2,re(Lt)))}),Yt=$({notBefore:de(ie(0,re(V))),notAfter:de(ie(1,re(V)))}),Qt=te,Zt=$({policyQualifierId:te,qualifier:U}),Jt=$({policyIdentifier:Qt,policyQualifiers:de(oe(Zt))}),$t=$({issuerDomainPolicy:Qt,subjectDomainPolicy:Qt}),er=X,tr=oe($({base:zt,minimum:le(ie(0,re(er)),0),maximum:de(ie(1,re(er)))})),rr=$({permittedSubtrees:de(ie(0,re(tr))),excludedSubtrees:de(ie(1,re(tr)))}),nr=X,ir=$({requireExplicitPolicy:de(ie(0,re(nr))),inhibitPolicyMapping:de(ie(1,re(nr)))}),ar=Z({unused:0,keyCompromise:1,cACompromise:2,affiliationChanged:3,superseded:4,cessationOfOperation:5,certificateHold:6,privilegeWithdrawn:7,aACompromise:8}),or=fe({fullName:ie(0,re(Wt)),nameRelativeToCRLIssuer:ie(1,re(we))},(function(e){return e instanceof Array?"fullName":"nameRelativeToCRLIssuer"})),sr=oe($({distributionPoint:de(ie(0,ne(or))),reasons:de(ie(1,re(ar))),cRLIssuer:de(ie(2,re(Wt)))})),cr=sr,ur=$({accessMethod:te,accessLocation:zt}),fr=function(e,t){var r=_(ee({extnID:te,critical:le(N,!1),extnValue:function(e){return Q(he(e))}},"extnID","extnValue")(e),{object:{get:function(){var e=this._get(r.super,"object");return e&&"object"===n(e.extnValue)&&this.defineValue(e.extnValue),e},set:function(e){this._set(r.super,"object",e),e&&e.extnValue&&(void 0!==e.extnValue.critical?this.critical=e.extnValue.critical:void 0===this.critical&&t&&(this.critical=t(this.extnID,e.extnValue)))}},extnValue:{get:function(){var e=this._get(r.super,"extnValue");return"object"===(void 0===e?"undefined":n(e))&&this.defineValue(e),e},set:function(e){this._set(r.super,"extnValue",e),e&&(void 0!==e.critical?this.critical=e.critical:void 0===this.critical&&t&&(this.critical=t(this.extnID,e)))}},defineValue:function(e){if("object"===(void 0===e?"undefined":n(e))&&!T(e,"critical")){var t=this;A(e,"critical",{get:function(){return t.critical},set:function(e){t.critical=e},enumerable:!0,configurable:!1})}}});return r},hr=$({signTool:G,cATool:G,signToolCert:G,cAToolCert:G}),lr=oe(fr,{typeName:"extnID",valueName:"extnValue"}),dr=lr({authorityKeyIdentifier:Xt,subjectKeyIdentifier:jt,keyUsage:Ot,privateKeyUsagePeriod:Yt,certificatePolicies:oe(Jt),policyMappings:oe($t),subjectAltName:Wt,issuerAltName:Wt,subjectDirectoryAttributes:Ie,basicConstraints:Mt,nameConstraints:rr,policyConstraints:ir,extKeyUsage:Gt,cRLDistributionPoints:sr,inhibitAnyPolicy:nr,freshestCRL:cr,authorityInfoAccess:oe(ur),subjectInfoAccess:oe(ur),subjectSignTool:G,issuerSignTool:hr},(function(e,t){return"keyUsage"===e||"basicConstraints"===e&&void 0===t.pathLenConstraint})),pr=$({r:X,s:X}),yr=J($({version:ie(0,ne(Ae)),serialNumber:Lt,signature:He,issuer:Ee,validity:Se,subject:Ee,subjectPublicKeyInfo:wt,issuerUniqueID:de(ie(1,re(Nt))),subjectUniqueID:de(ie(2,re(Nt))),extensions:de(ie(3,ne(dr)))})),gr=$({tbsCertificate:yr,signatureAlgorithm:He,signatureValue:Z},"CERTIFICATE"),vr=dr,mr=Te({challengePassword:ue(pe),extensionRequest:ue(vr),msCertExtensions:ue(dr),extendedCertificateAttributes:ue(Te)}),br=J($({version:X,subject:Ee,subjectPublicKeyInfo:wt,attributes:ie(0,re(mr))})),wr=$({requestInfo:br,signatureAlgorithm:He,signatureValue:Z},"CERTIFICATE REQUEST"),Cr=X,Er=Y({unspecified:0,keyCompromise:1,cACompromise:2,affiliationChanged:3,superseded:4,cessationOfOperation:5,certificateHold:6,removeFromCRL:8,privilegeWithdrawn:9,aACompromise:10}),Sr=lr({authorityKeyIdentifier:Xt,issuerAltName:Wt,cRLNumber:Cr,deltaCRLIndicator:Cr,issuingDistributionPoint:$({distributionPoint:de(ie(0,ne(or))),onlyContainsUserCerts:le(ie(1,re(N)),!1),onlyContainsCACerts:le(ie(2,re(N)),!1),onlySomeReasons:de(ie(3,re(ar))),indirectCRL:le(ie(4,re(N)),!1),onlyContainsAttributeCerts:le(ie(5,re(N)),!1)}),freshestCRL:cr},(function(e){return"cRLNumber"===e})),Ar=lr({cRLReason:Er,instructionCode:te,invalidityDate:V,certificateIssuer:Wt}),Br=J($({version:de(Ae),signature:He,issuer:Ee,thisUpdate:ye,nextUpdate:de(ye),revokedCertificates:de(oe($({userCertificate:Lt,revocationDate:ye,crlEntryExtensions:de(Ar)}))),crlExtensions:de(ie(0,ne(Sr)))})),Tr=$({tbsCertList:Br,signatureAlgorithm:He,signatureValue:Z},"CRL"),Ir=X,kr=$({digestedObjectType:Y({publicKey:0,publicKeyCert:1,otherObjectTypes:2}),otherObjectTypeID:de(te),digestAlgorithm:qe,objectDigest:Z}),_r=$({issuer:Wt,serial:Lt,issuerUID:de(Nt)}),Rr=$({issuerName:de(Wt),baseCertificateID:de(ie(0,re(_r))),objectDigestInfo:de(ie(1,re(kr)))}),xr=$({targetCertificate:_r,targetName:de(zt),certDigestInfo:de(kr)}),Fr=oe(fe({targetName:ie(0,ne(zt)),targetGroup:ie(1,ne(zt)),targetCert:ie(2,re(xr))})),Dr=lr({auditIdentity:Q,targetInformation:Fr,authorityKeyIdentifier:Xt,authorityInfoAccess:oe(ur),cRLDistributionPoints:sr,noRevAvail:z},(function(e){return"auditIdentity"===e||"targetInformation"===e})),Pr=$({baseCertificateID:de(ie(0,re(_r))),entityName:de(ie(1,re(Wt))),objectDigestInfo:de(ie(2,re(kr)))}),Ur=fe({v1Form:Wt,v2Form:ie(0,re(Rr))},"v2Form"),Nr=$({notBeforeTime:V,notAfterTime:V}),Lr=$({service:zt,ident:zt,authInfo:de(Q)}),Mr=$({roleAuthority:de(ie(0,re(Wt))),roleName:ie(1,ne(zt))}),Or=Z({unmarked:0,unclassified:1,restricted:2,confidential:3,secret:4,topSecret:5}),Kr=$({type:ie(0,re(te)),value:ie(1,re(U))}),Gr=$({policyId:ie(0,re(te)),classList:le(ie(1,re(Or)),["unclassified"]),securityCategories:de(ie(2,re(se(Kr))))}),jr=$({policyAuthority:de(ie(0,re(Wt))),values:oe(fe({octets:Q,oid:te,string:G},(function(e){return b?"octets":getIdentifier(e)?"oid":"string"})))}),Vr=J($({version:Ir,holder:Pr,issuer:Ur,signature:He,serialNumber:Lt,attrCertValidityPeriod:Nr,attributes:Ie({authenticationInfo:se(Lr),accessIdentity:se(Lr),chargingIdentity:ue(jr),group:ue(jr),role:se(Mr),clearance:se(Gr)}),issuerUniqueID:de(Nt),extensions:de(Dr)})),Hr=$({acinfo:Vr,signatureAlgorithm:He,signatureValue:Z},"ATTRIBUTE CERTIFICATE"),qr=Q,zr=Q,Wr=Q,Xr=($({keyInfo:tt,entityUInfo:de(ie(0,ne(Q))),suppPubInfo:ie(2,ne(Q))}),ce($({encryptedKey:ze,maskKey:de(ie(0,re(ze))),macKey:We}),{encode:function(e){return{encryptedKey:new Uint8Array(new Uint8Array(e,0,32)).buffer,macKey:new Uint8Array(new Uint8Array(e,32,4)).buffer}},decode:function(e){var t=e.encryptedKey,r=e.maskKey,n=e.macKey;if(r)for(var i=new Int32Array(r),a=new Int32Array(t),o=0,s=i.length/a.length;o<s;o++)for(var c=0,u=a.length;c<u;c++)a[c]=a[c]+i[u*o+c]&4294967295;var f=new Uint8Array(t.byteLength+n.byteLength);return f.set(new Uint8Array(t),0),f.set(new Uint8Array(n),32),f.buffer}})),Yr=$({encryptionParamSet:Xe,ephemeralPublicKey:de(ie(0,re(Ct))),ukm:Q}),Qr=ce($({sessionEncryptedKey:Xr,transportParameters:de(ie(0,re(Yr)))}),{encode:function(e){var t=e.algorithm;return{sessionEncryptedKey:e.sessionEncryptedKey,transportParameters:{encryptionParamSet:h.sBox[t.wrapping.sBox||"E-A"],ephemeralPublicKey:t.public,ukm:t.ukm}}},decode:function(e){return{algorithm:{wrapping:l[e.transportParameters.encryptionParamSet],ukm:e.transportParameters.ukm,public:e.transportParameters.ephemeralPublicKey},sessionEncryptedKey:e.sessionEncryptedKey}}}),Zr=ce($({sessionEncryptedKey:Xr,ukm:$({ephemeralPublicKey:Ct,addedukm:de(ie(0,ne(Wr)))})}),{encode:function(e){var t=e.algorithm;return{sessionEncryptedKey:e.sessionEncryptedKey,ukm:{ephemeralPublicKey:t.public,addedukm:t.ukm}}},decode:function(e){return{algorithm:{ukm:e.ukm.addedukm,public:e.ukm.ephemeralPublicKey},sessionEncryptedKey:e.sessionEncryptedKey}}}),Jr=(F={"id-sc-gostR3410-2001":Zr,"id-sc-gostR3410-94":Zr,"id-GostR3410-2001":Qr,"id-GostR3410-94":Qr,"id-tc26-gost3410-12-256":Qr,"id-tc26-gost3410-12-512":Qr,"id-GostR3410-94-CryptoPro-ESDH":Xr,"id-GostR3410-2001-CryptoPro-ESDH":Xr,"id-tc26-agreement-gost-3410-12-256":Xr,"id-tc26-agreement-gost-3410-12-512":Xr,"id-sc-r3410-ESDH-r3411kdf":Xr,"id-Gost28147-89-None-KeyWrap":Xr,"id-Gost28147-89-CryptoPro-KeyWrap":Xr,"id-sc-cmsGostWrap":Xr,"id-sc-cmsGost28147Wrap":Xr},function(e){var t=F[e.id];return t?he(t):U}),$r=Z({kccaSoftPassword:0,kccaReservePrimary:1,kccaPrimaryKeyAbsent:2,kccaFKCShared:3}),en=Z({pkaExportable:0,pkaUserProtect:1,pkaExchange:2,pkaEphemeral:3,pkaNonCachable:4,pkaDhAllowed:5}),tn=$({attributes:de(en),privateKeyAlgorithm:de(ie(0,re(Ve)))}),rn=$({path:L,hmac:We}),nn=Le,an=$({containerAlgoritmIdentifier:de(ie(0,re(Le))),containerName:de(L),attributes:$r,primaryPrivateKeyParameters:tn,hmacPassword:de(ie(2,re(We))),secondaryEncryptedPrivateKey:de(ie(3,re(Xr))),secondaryPrivateKeyParameters:de(ie(4,re(tn))),primaryCertificate:de(ie(5,re(Q(he(gr))))),secondaryCertificate:de(ie(6,re(Q(he(gr))))),encryptionContainerName:de(ie(7,re(L))),primaryCertificateLink:de(ie(8,re(rn))),secondaryCertificateLink:de(ie(9,re(rn))),primaryFP:de(ie(10,re(Q))),secondaryFP:de(ie(11,re(Q))),passwordPolicy:de(nn),containerSecurityLevel:de(X),extensions:de(ie(12,re(lr({keyValidity:$({notBefore:de(ie(0,re(V))),notAfter:de(ie(1,re(V)))})})))),secondaryEncryptionContainerName:de(ie(13,re(L)))}),on=$({keyContainerContent:an,hmacKeyContainerContent:We}),sn=$({containerName:L,extElem1:de(U)}),cn=$({primaryKey:ze,secondaryKey:de(ze),hmacKey:de(We)}),un=$({mask:ze,randomStatus:Q,hmacRandom:We}),fn=$({keyClass:X,keyType:X,algorithm:de(ie(0,ne(Ve))),serialNumber:de(ie(1,ne(Q))),addSerialNumber:de(ie(2,ne(Q))),certSerialNumber:de(ie(3,ne(Q))),subjectUID:de(ie(4,ne(Q))),recipientUID:de(ie(5,ne(Q))),validity:de(ie(6,ne(fe({validity:Se,keyValidity:$({notBefore:de(ie(0,re(V))),notAfter:de(ie(1,re(V)))})},(function(){return"keyValidity"}))))),keyUID:de(ie(7,ne(Z))),flags:de(ie(10,ne(X)))}),hn=$({version:X,keyInfo:fn,defenceKeyInfo:fn,certificate:de(ie(0,ne(gr))),publicKey:de(ie(1,ne(Q)))}),ln=X,dn=te,pn=ye,yn=Q,gn=Q,vn=Q,mn=X,bn=oe(mn),wn=$({bodyPartPath:bn,identifier:te,content:U}),Cn=Te({contentType:ue(dn),signingTime:ue(pn),messageDigest:ue(Q)}),En=Te((function(e){return{countersignature:se(_n),unsignedData:se(wn)}[e]})),Sn=Cn,An=Te,Bn=Te,Tn=$({issuer:Ee,serialNumber:Lt}),In=fe({issuerAndSerialNumber:Tn,subjectKeyIdentifier:ie(0,re(yn))},(function(e){return b(e)?"subjectKeyIdentifier":"issuerAndSerialNumber"})),kn=$({version:ln,sid:In,digestAlgorithm:qe,signedAttrs:de(ie(0,re(Cn))),signatureAlgorithm:He,signatureValue:Q,unsignedAttrs:de(ie(1,re(En)))}),_n=kn,Rn=se(kn),xn=se(qe),Fn=Hr,Dn=J($({version:ln,certificate:gr,attributes:An})),Pn=$({extendedCertificateInfo:Dn,signatureAlgorithm:He,signatureValue:Z}),Un=$({otherCertFormat:te,otherCert:U}),Nn=J($({version:X,subject:fe({baseCertificateID:ie(0,re(_r)),subjectName:ie(1,re(Wt))},(function(e){return e.issuer?"baseCertificateID":"subjectName"})),issuer:Wt,signature:He,serialNumber:Lt,attCertValidityPeriod:Nr,attributes:Ie,issuerUniqueID:de(Nt),extensions:de(dr)})),Ln=$({acInfo:Nn,signatureAlgorithm:He,signatureValue:Z}),Mn=$({eContentType:dn,eContent:de(ie(0,ne(Q)))}),On=fe({certificate:gr,extendedCertificate:ie(0,re(Pn)),v1AttrCert:ie(1,re(Ln)),v2AttrCert:ie(2,re(Fn)),other:ie(3,re(Un))},(function(e){return e.holder?"AttributeCertificateV2":e.certificate?"ExtendedCertificate":e.otherCertFormat?"other":"certificate"})),Kn=$({otherRevInfoFormat:te,otherRevInfo:U}),Gn=fe({crl:Tr,other:ie(1,re(Kn))},(function(e){return e.otherRevInfoFormat?"other":"crl"})),jn=se(On),Vn=se(Gn),Hn=$({version:ln,digestAlgorithms:xn,encapContentInfo:Mn,certificates:de(ie(0,re(jn))),crls:de(ie(1,re(Vn))),signerInfos:Rn}),qn=fe({issuerAndSerialNumber:Tn,subjectKeyIdentifier:ie(0,re(yn))},(function(e){return b(e)?"subjectKeyIdentifier":"issuerAndSerialNumber"})),zn=$({version:ln,rid:qn,keyEncryptionAlgorithm:lt,encryptedKey:qr}),Wn=$({keyAttrId:te,keyAttr:de(U)}),Xn=$({subjectKeyIdentifier:yn,date:de(V),other:de(Wn)}),Yn=fe({issuerAndSerialNumber:Tn,rKeyId:ie(0,re(Xn))},(function(e){return b(e)?"rKeyId":"issuerAndSerialNumber"})),Qn=oe($({rid:Yn,encryptedKey:qr})),Zn=$({algorithm:Ve,publicKey:Z}),Jn=($({ephemeralPublicKey:Zn,addedukm:de(ie(0,ne(Wr)))}),fe({issuerAndSerialNumber:Tn,subjectKeyIdentifier:ie(0,re(yn)),originatorKey:ie(1,re(Zn))},(function(e){return b(e)?"subjectKeyIdentifier":e.algorithm?"originatorKey":"issuerAndSerialNumber"}))),$n=$({version:ln,originator:ie(0,ne(Jn)),ukm:de(ie(1,ne(Wr))),keyEncryptionAlgorithm:lt,recipientEncryptedKeys:Qn}),ei=$({keyIdentifier:Q,date:de(V),other:de(Wn)}),ti=$({version:ln,kekid:ei,keyEncryptionAlgorithm:lt,encryptedKey:qr}),ri=$({version:ln,friendlyName:de(ie(0,re(st))),keyEncryptionAlgorithm:lt,encryptedKey:qr}),ni=$({oriType:te,oriValue:U}),ii=fe({ktri:zn,kari:ie(1,re($n)),kekri:ie(2,re(ti)),pwri:ie(3,re(ri)),ori:ie(4,re(ni))},(function(e){return e.rid?"ktri":e.originator?"kari":e.kekid?"kekri":e.oriType?"ori":"pwri"})),ai=$({certs:de(ie(0,re(jn))),crls:de(ie(1,re(Vn)))}),oi=se(ii),si=$({contentType:dn,contentEncryptionAlgorithm:yt,encryptedContent:de(ie(0,re(zr)))}),ci=$({version:ln,originatorInfo:de(ie(0,re(ai))),recipientInfos:oi,encryptedContentInfo:si,unprotectedAttrs:de(ie(1,re(Bn)))}),ui=$({version:ln,digestAlgorithm:qe,encapContentInfo:Mn,digest:gn}),fi=$({version:ln,encryptedContentInfo:si,unprotectedAttrs:de(ie(1,re(Bn)))}),hi=$({version:ln,originatorInfo:de(ie(0,re(ai))),recipientInfos:oi,macAlgorithm:it,digestAlgorithm:de(ie(1,qe)),encapContentInfo:Mn,authAttrs:de(ie(2,re(Sn))),mac:vn,unauthAttrs:de(ie(3,re(An)))}),li=$({version:ln,originatorInfo:de(ie(0,re(ai))),recipientInfos:oi,authEncryptedContentInfo:si,authAttrs:de(ie(1,re(Sn))),mac:vn,unauthAttrs:de(ie(2,re(An)))}),di=fe({encrypted:fi,enveloped:ie(0,re(ci)),authEnveloped:ie(1,re(li))},(function(e){return e.encryptedContentInfo?e.recipientInfos?"enveloped":"encrypted":"authEnveloped"})),pi=ee({contentType:dn=te,content:function(e){return ie(0,ne(e))}},"contentType","content",void 0,"CMS")({data:Q,signedData:J(Hn),envelopedData:J(ci),digestedData:J(ui),encryptedData:J(fi),authData:J(hi),encryptedKeyPkg:J(di),aKeyPackage:J(Ft)}),yi=$({digestAlgorithm:qe,digest:gn}),gi=Te({friendlyName:ue(q),keyProviderNameAttr:ue(q),localKeyId:ue(Q),certKeyIdentifierPropId:ue(Q)}),vi=te,mi=te,bi=te,wi=kt,Ci=Ut,Ei=ee({certId:te,certValue:function(e){return ie(0,ne(e))}},"certId","certValue")({x509Certificate:Q(he(gr)),sdsiCertificate:L},Q),Si=ee({crlId:mi,crlValue:function(e){return ie(0,ne(e))}},"crlId","crlValue")({x509CRL:Q(he(Tr))},Q),Ai=ee({secretTypeId:bi,secretValue:function(e){return ie(0,ne(e))}},"secretTypeId","secretValue")({secret:Q},Q),Bi=oe(ee({bagId:vi,bagValue:function(e){return ie(0,ne(e))},bagAttributes:de(gi)},"bagId","bagValue")((function(e){return{keyBag:wi,pkcs8ShroudedKeyBag:Ci,certBag:Ei,crlBag:Si,secretBag:Ai,safeContentsBag:Bi}[e]}))),Ti=oe(pi),Ii=$({mac:yi,macSalt:Q,iterations:le(X,1)}),ki=$({version:X,authSafe:pi,macData:de(Ii)},"PFX"),_i=G,Ri=G,xi=$({issuer:zt,serialNumber:X}),Fi=wt,Di=$({intendedAlg:de(ie(0,re(Le))),symmAlg:de(ie(1,re(Le))),encSymmKey:de(ie(2,re(Z))),keyAlg:de(ie(3,re(Le))),valueHint:de(ie(4,re(Q))),encValue:Z}),Pi=Q,Ui=(qr=fe({encryptedValue:Di,envelopedData:ie(0,re(ci))},(function(e){return e.encryptedContentInfo?"envelopedData":"encryptedValue"})),fe({encryptedPrivKey:ie(0,qr),keyGenParameters:ie(1,re(Pi)),archiveRemGenPrivKey:ie(2,re(N))})),Ni=$({pubMethod:X({dontCare:0,x500:1,web:2,ldap:3}),pubLocation:de(zt)}),Li=$({action:X({dontPublish:0,pleasePublish:1}),pubInfos:de(oe(Ni))}),Mi=X({encrCert:0,challengeResp:1}),Oi=fe({thisMessage:ie(0,re(Z)),subsequentMessage:ie(1,re(Mi)),dhMAC:ie(2,re(Z)),agreeMAC:ie(3,re(Ki)),encryptedKey:ie(4,re(ci))}),Ki=($({salt:Q,owf:Le,iterationCount:X,mac:Le}),$({algId:Le,value:Z})),Gi=$({authInfo:fe({sender:ie(0,ne(zt)),publicKeyMAC:Ki}),publicKey:wt}),ji=$({poposkInput:de(ie(0,Gi)),algorithmIdentifier:Le,signature:Z}),Vi=fe({raVerified:ie(0,re(z)),signature:ie(1,re(ji)),keyEncipherment:ie(2,re(Oi)),keyAgreement:ie(3,re(Oi))}),Hi=oe(me({regToken:_i,authenticator:Ri,pkiPublicationInfo:Li,pkiArchiveOptions:Ui,oldCertID:xi,protocolEncrKey:Fi})),qi=$({notBefore:de(ie(0,re(ye))),notAfter:de(ie(1,re(ye)))}),zi=$({version:de(ie(0,re(Ae))),serialNumber:de(ie(1,re(X))),signingAlg:de(ie(2,re(Le))),issuer:de(ie(3,re(Ee))),validity:de(ie(4,re(qi))),subject:de(ie(5,re(Ee))),publicKey:de(ie(6,re(wt))),issuerUID:de(ie(7,re(Nt))),subjectUID:de(ie(8,re(Nt))),extensions:de(ie(9,re(lr)))}),Wi=$({certReqId:X,certTemplate:zi,controls:de(Hi)}),Xi=G,Yi=Wi,Qi=$({privateKey:kt,identifier:de(fe({string:G,generalName:zt},(function(e){return"string"==typeof e||e instanceof String?"string":"generalName"})))}),Zi=$({certReq:Wi,popo:de(Vi),regInfo:de(oe(me({utf8Pairs:Xi,certReq:Yi,encKeyWithID:Qi})))}),Ji=(oe(Zi),$({pendToken:Q,pendTime:V})),$i=X({success:0,failed:2,pending:3,noSupport:4,confirmRequired:5,popRequired:6,partial:7}),ea=X({badAlg:0,badMessageCheck:1,badRequest:2,badTime:3,badCertId:4,unsupportedExt:5,mustArchiveKeys:6,badIdentity:7,popRequired:8,popFailed:9,noKeyReuse:10,internalCAError:11,tryLater:12,authDataFail:13}),ta=$({cMCStatus:$i,bodyList:oe(mn),statusString:de(G),otherInfo:de(fe({failInfo:ea,pendInfo:Ji}))}),ra=$({pkiDataReference:mn,certReferences:oe(mn),extensions:oe(fr)}),na=$({pkiDataBodyid:mn,bodyIds:oe(mn)}),ia=$({issuerName:zt,serialNumber:X}),aa=$({issuerName:Ee,cRLName:de(zt),time:de(V),reasons:de(ar)}),oa=$({issuerName:Ee,serialNumber:X,reason:Er,invalidityDate:de(V),passphrase:de(Q),comment:de(G)}),sa=$({bodyPartID:mn,thePOPAlgID:Le,thePOP:Q}),ca=Tn,ua=fe({bodyPartID:mn,bodyPartPath:bn}),fa=$({cMCStatus:$i,bodyList:oe(ua),statusString:de(G),otherInfo:de(fe({failInfo:ea,pendInfo:Ji,extendedFailInfo:$({failInfoOID:te,failInfoValue:ve})}))}),ha=$({seqNumber:X,hashAlgorithm:Le,anchorHashes:oe(Q)}),la=mn,da=oe(mn),pa=$({hashAlg:Le,certHashes:oe(Q),pubInfo:Li}),ya=$({pkiDataReference:bn,certReferences:da,replace:le(N,!0),certTemplate:zi}),ga=$({bodyList:oe(ua)}),va=$({proofAlgID:Le,macAlgId:Le,witness:Q}),ma=$({keyGenAlgorithm:Le,macAlgorithm:Le,witness:Q}),ba=$({bodyPartID:mn,certificationRequest:wr}),wa=$({bodyPartID:mn,contentInfo:pi}),Ca=$({bodyPartID:mn,otherMsgType:te,otherMsgValue:U}),Ea=fe({tcr:ie(0,re(ba)),crm:ie(1,re(Zi)),orm:ie(2,re($({bodyPartID:mn,requestMessageType:te,requestMessageValue:U})))}),Sa=$({request:Ea,cms:pi,thePOPAlgID:Le,witnessAlgID:Le,witness:Q}),Aa=ee({bodyPartID:mn,attrType:te,attrValues:function(e){return se(e)}},"attrType","attrValues",ve)({statusInfo:ta,identification:G,identityProof:Q,dataReturn:Q,transactionId:X,senderNonce:Q,recipientNonce:Q,addExtensions:ra,encryptedPOP:Sa,decryptedPOP:sa,lraPOPWitness:na,getCert:ia,getCRL:aa,revokeRequest:oa,regInfo:Q,responseInfo:Q,queryPending:Q,popLinkRandom:Q,popLinkWitness:Q,confirmCertAcceptance:ca,statusInfoV2:fa,trustedAnchors:ha,authPublish:la,batchRequests:da,batchResponses:da,publishCert:pa,modCertTemplate:ya,controlProcessed:ga,popLinkWitnessV2:ma,identityProofV2:va}),Ba=$({controlSequence:oe(Aa),reqSequence:oe(Ea),cmsSequence:oe(wa),otherMsgSequence:oe(Ca)},"PKI REQUEST"),Ta=$({controlSequence:oe(Aa),cmsSequence:oe(wa),otherMsgSequence:oe(Ca)},"PKI RESPONSE");function Ia(){}Ia.prototype={GostPrivateKeyInfo:Dt,GostSubjectPublicKeyInfo:Ct,GostKeyContainer:on,GostKeyContainerName:sn,GostPrivateKeys:cn,GostPrivateMasks:un,ViPNetInfo:hn,GostSignature:pr,GostEncryptedKey:Jr,GostWrappedPrivateKey:It,PrivateKeyInfo:kt,EncryptedPrivateKeyInfo:Ut,SubjectPublicKeyInfo:wt,TBSCertificate:yr,Certificate:gr,CertificationRequestInfo:br,CertificationRequest:wr,TBSCertList:Br,CertificateList:Tr,AttributeCertificateInfo:Vr,AttributeCertificate:Hr,SignedAttributes:Cn,UnsignedAttributes:En,ContentInfo:pi,SafeContents:Bi,AuthenticatedSafe:Ti,PFX:ki,PKIData:Ba,PKIResponse:Ta},t.gostASN1Instance=new Ia},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function i(){for(var e={},t=0,r=arguments.length;t<r;t++){var i=arguments[t];if("object"===(void 0===i?"undefined":n(i)))for(var a in i)e[a]=i[a]}return e}t.GostSecurity=l;var a={"1.2.643.2.2":"CryptoPro","1.2.643.2.2.3":"id-GostR3411-94-with-GostR3410-2001","1.2.643.2.2.4":"id-GostR3411-94-with-GostR3410-94","1.2.643.2.2.9":"id-GostR3411-94","1.2.643.2.2.10":"id-HMACGostR3411-94","1.2.643.2.2.13.0":"id-Gost28147-89-None-KeyWrap","1.2.643.2.2.13.1":"id-Gost28147-89-CryptoPro-KeyWrap","1.2.643.2.2.14.0":"id-Gost28147-89-None-KeyMeshing","1.2.643.2.2.14.1":"id-Gost28147-89-CryptoPro-KeyMeshing","1.2.643.2.2.19":"id-GostR3410-2001","1.2.643.2.2.20":"id-GostR3410-94","1.2.643.2.2.20.1":"id-GostR3410-94-a","1.2.643.2.2.20.2":"id-GostR3410-94-aBis","1.2.643.2.2.20.3":"id-GostR3410-94-b","1.2.643.2.2.20.4":"id-GostR3410-94-bBis","1.2.643.2.2.21":"id-Gost28147-89","1.2.643.2.2.22":"id-Gost28147-89-MAC","1.2.643.2.2.30.0":"id-GostR3411-94-TestParamSet","1.2.643.2.2.30.1":"id-GostR3411-94-CryptoProParamSet","1.2.643.2.2.30.2":"id-GostR3411-94-CryptoPro-B-ParamSet","1.2.643.2.2.30.3":"id-GostR3411-94-CryptoPro-C-ParamSet","1.2.643.2.2.30.4":"id-GostR3411-94-CryptoPro-D-ParamSet","1.2.643.2.2.31.0":"id-Gost28147-89-TestParamSet","1.2.643.2.2.31.1":"id-Gost28147-89-CryptoPro-A-ParamSet","1.2.643.2.2.31.2":"id-Gost28147-89-CryptoPro-B-ParamSet","1.2.643.2.2.31.3":"id-Gost28147-89-CryptoPro-C-ParamSet","1.2.643.2.2.31.4":"id-Gost28147-89-CryptoPro-D-ParamSet","1.2.643.2.2.31.5":"id-Gost28147-89-CryptoPro-Oscar-1-1-ParamSet","1.2.643.2.2.31.6":"id-Gost28147-89-CryptoPro-Oscar-1-0-ParamSet","1.2.643.2.2.31.7":"id-Gost28147-89-CryptoPro-RIC-1-ParamSet ","1.2.643.2.2.31.12":"id-Gost28147-89-CryptoPro-tc26-1","1.2.643.2.2.31.13":"id-Gost28147-89-CryptoPro-tc26-2","1.2.643.2.2.31.14":"id-Gost28147-89-CryptoPro-tc26-3","1.2.643.2.2.31.15":"id-Gost28147-89-CryptoPro-tc26-4","1.2.643.2.2.31.16":"id-Gost28147-89-CryptoPro-tc26-5","1.2.643.2.2.31.17":"id-Gost28147-89-CryptoPro-tc26-6","1.2.643.2.2.32.0":"id-GostR3410-94-TestParamSet","1.2.643.2.2.32.2":"id-GostR3410-94-CryptoPro-A-ParamSet","1.2.643.2.2.32.3":"id-GostR3410-94-CryptoPro-B-ParamSet","1.2.643.2.2.32.4":"id-GostR3410-94-CryptoPro-C-ParamSet","1.2.643.2.2.32.5":"id-GostR3410-94-CryptoPro-D-ParamSet","1.2.643.2.2.33.1":"id-GostR3410-94-CryptoPro-XchA-ParamSet","1.2.643.2.2.33.2":"id-GostR3410-94-CryptoPro-XchB-ParamSet","1.2.643.2.2.33.3":"id-GostR3410-94-CryptoPro-XchC-ParamSet","1.2.643.2.2.34.2":"temporaryAccessToRC","1.2.643.2.2.34.3":"internetContentSignature","1.2.643.2.2.34.4":"adminRC","1.2.643.2.2.34.5":"operatorRC","1.2.643.2.2.34.6":"userRC","1.2.643.2.2.34.7":"clientRC","1.2.643.2.2.34.8":"serverRC","1.2.643.2.2.34.9":"sysAdminRC","1.2.643.2.2.34.10":"arcAdminRC","1.2.643.2.2.34.11":"authorityPersonRC","1.2.643.2.2.34.12":"clientCC","1.2.643.2.2.34.13":"sysAdminCC","1.2.643.2.2.34.14":"arcAdminCC","1.2.643.2.2.34.15":"accessIPSecCA","1.2.643.2.2.34.16":"auditAdminHSM","1.2.643.2.2.34.21":"adminHSM","1.2.643.2.2.34.22":"serverAdminHSH","1.2.643.2.2.34.24":"winlogonCA","1.2.643.2.2.34.25":"timestampServiceUser","1.2.643.2.2.34.26":"statusServiceUser","1.2.643.2.2.34.27":"arcAdminHSM","1.2.643.2.2.34.28":"auditorHSM","1.2.643.2.2.35.0":"id-GostR3410-2001-CryptoPro-TestParamSet","1.2.643.2.2.35.1":"id-GostR3410-2001-CryptoPro-A-ParamSet","1.2.643.2.2.35.2":"id-GostR3410-2001-CryptoPro-B-ParamSet","1.2.643.2.2.35.3":"id-GostR3410-2001-CryptoPro-C-ParamSet","1.2.643.2.2.36.0":"id-GostR3410-2001-CryptoPro-XchA-ParamSet","1.2.643.2.2.36.1":"id-GostR3410-2001-CryptoPro-XchB-ParamSet","1.2.643.2.2.37.1":"id-CryptoPro-GostPrivateKeys-V1","1.2.643.2.2.37.2":"id-CryptoPro-GostPrivateKeys-V2","1.2.643.2.2.37.2.1":"id-CryptoPro-GostPrivateKeys-V2-Full","1.2.643.2.2.37.2.2":"id-CryptoPro-GostPrivateKeys-V2-PartOf","1.2.643.2.2.37.3.1":"intermediateCertificates","1.2.643.2.2.37.3.2":"trustedCertificatesSignature","1.2.643.2.2.37.3.3":"trustedCertificatesExchange","1.2.643.2.2.37.3.10":"keyValidity","1.2.643.2.2.38.1":"personalBaseProlicy","1.2.643.2.2.38.2":"networkBasePolicy","1.2.643.2.2.47.1":"id-CryptoPro-ocsp-treats-exp-key-or-exp-cert-rev","1.2.643.2.2.47.2":"id-CryptoPro-ocsp-crl-locator","1.2.643.2.2.47.3":"id-CryptoPro-ocsp-instant-revocation-indicator","1.2.643.2.2.47.4":"id-CryptoPro-ocsp-revocation-announcement-reference","1.2.643.2.2.47.5":"id-CryptoPro-ocsp-historical-request","1.2.643.2.2.49.2":"limitedLicense","1.2.643.2.2.96":"id-GostR3410-2001-CryptoPro-ESDH","1.2.643.2.2.97":"id-GostR3410-94-CryptoPro-ESDH","1.2.643.2.2.98":"id-GostR3410-2001DH","1.2.643.2.2.99":"id-GostR3410-94DH","1.2.643.2.45.1.1.1":"signatureComment","1.2.643.2.45.1.1.2":"resourceName","1.2.643.2.45.1.1.3":"signatureUsage","1.2.643.3.131.1.1":"INN","1.2.643.3.141.1.1":"RNS FSS","1.2.643.3.141.1.2":"KP FSS","1.2.643.7.1":"tc26","1.2.643.7.1.1.1.1":"id-tc26-gost3410-12-256","1.2.643.7.1.1.1.2":"id-tc26-gost3410-12-512","1.2.643.7.1.1.2.1":"id-tc26-gost3411-94","1.2.643.7.1.1.2.2":"id-tc26-gost3411-12-256","1.2.643.7.1.1.2.3":"id-tc26-gost3411-12-512","1.2.643.7.1.1.3.1":"id-tc26-signwithdigest-gost3410-12-94","1.2.643.7.1.1.3.2":"id-tc26-signwithdigest-gost3410-12-256","1.2.643.7.1.1.3.3":"id-tc26-signwithdigest-gost3410-12-512","1.2.643.7.1.1.4.1":"id-tc26-hmac-gost-3411-12-256","1.2.643.7.1.1.4.2":"id-tc26-hmac-gost-3411-12-512","1.2.643.7.1.1.6.1":"id-tc26-agreement-gost-3410-12-256","1.2.643.7.1.1.6.2":"id-tc26-agreement-gost-3410-12-512","1.2.643.7.1.2.1.1.0":"id-tc26-gost-3410-12-256-paramSetTest","1.2.643.7.1.2.1.1.1":"id-tc26-gost-3410-12-256-paramSetA","1.2.643.7.1.2.1.1.2":"id-tc26-gost-3410-12-256-paramSetB","1.2.643.7.1.2.1.2.0":"id-tc26-gost-3410-12-512-paramSetTest","1.2.643.7.1.2.1.2.1":"id-tc26-gost-3410-12-512-paramSetA","1.2.643.7.1.2.1.2.2":"id-tc26-gost-3410-12-512-paramSetB","1.2.643.7.1.2.1.2.3":"id-tc26-gost-3410-12-512-paramSetC","1.2.643.7.1.2.1.2.4":"id-tc26-gost-3410-12-512-paramSetD","1.2.643.7.1.2.5.1.1":"id-tc26-gost-28147-param-Z","1.2.643.100.1":"OGRN","1.2.643.100.2.1":"SMEV-person","1.2.643.100.2.2":"SMEV-government","1.2.643.100.3":"SNILS","1.2.643.100.4":"KPP","1.2.643.100.5":"OGRNIP","1.2.643.100.6":"internal-government","1.2.643.100.111":"subjectSignTool","1.2.643.100.112":"issuerSignTool","1.2.643.100.113.1":"signToolClassKC1","1.2.643.100.113.2":"signToolClassKC2","1.2.643.100.113.3":"signToolClassKC3","1.2.643.100.113.4":"signToolClassKB1","1.2.643.100.113.5":"signToolClassKB2","1.2.643.100.113.6":"signToolClassKA1","1.2.643.100.114.1":"issuerToolClassKC1","1.2.643.100.114.2":"issuerToolClassKC2","1.2.643.100.114.3":"issuerToolClassKC3","1.2.643.100.114.4":"issuerToolClassKB2","1.2.643.100.114.5":"issuerToolClassKB1","1.2.643.100.114.6":"issuerToolClassKA1","1.2.840.10040.4":"x9cm","1.2.840.10040.4.1":"dsa","1.2.840.10040.4.3":"dsa-with-SHA1","1.2.840.10045":"ansi-x962","1.2.840.10045.1":"id-fieldType","1.2.840.10045.1.1":"id-prime-Field","1.2.840.10045.1.2":"id-characteristic-two-field","1.2.840.10045.2.1":"ecPublicKey","1.2.840.10045.3.0":"characteristicTwo","1.2.840.10045.3.1.1":"secp192r1","1.2.840.10045.3.1.2":"prime192v2","1.2.840.10045.3.1.3":"prime192v3","1.2.840.10045.3.1.4":"prime239v1","1.2.840.10045.3.1.5":"prime239v2","1.2.840.10045.3.1.6":"prime239v3","1.2.840.10045.3.1.7":"secp256r1","1.2.840.10045.4":"ecdsa","1.2.840.10045.4.1":"ecdsa-with-SHA1","1.2.840.10045.4.2":"ecdsa-with-Recommended","1.2.840.10045.4.4":"ecdsa-with-SHA2","1.2.840.10045.4.4.1":"ecdsa-with-SHA224","1.2.840.10045.4.4.2":"ecdsa-with-SHA256","1.2.840.10045.4.4.3":"ecdsa-with-SHA384","1.2.840.10045.4.4.4":"ecdsa-with-SHA512","1.2.840.113533.7.66.13":"PasswordBasedMac","1.3.6.1.4.1.22554.1.1.2.1.2":"pbeWithSHAAndAES128-CBC","1.3.6.1.4.1.22554.1.1.2.1.22":"pbeWithSHAAndAES192-CBC","1.3.6.1.4.1.22554.1.1.2.1.42":"pbeWithSHAAndAES256-CBC","1.3.6.1.4.1.22554.1.2.1.2.1.2":"pbeWithSHA256AndAES128-CBC","1.3.6.1.4.1.22554.1.2.1.2.1.22":"pbeWithSHA256AndAES192-CBC","1.3.6.1.4.1.22554.1.2.1.2.1.42":"pbeWithSHA256AndAES256-CBC","1.2.840.113549":"rsa","1.2.840.113549.1.1.1":"rsaEncryption","1.2.840.113549.1.1.2":"md2withRSAEncryption","1.2.840.113549.1.1.3":"md4withRSAEncryption","1.2.840.113549.1.1.4":"md5withRSAEncryption","1.2.840.113549.1.1.5":"sha1withRSAEncryption","1.2.840.113549.1.1.7":"rsaes-oaep","1.2.840.113549.1.1.8":"mgf1","1.2.840.113549.1.1.9":"pSpecified","1.2.840.113549.1.1.10":"rsassa-pss","1.2.840.113549.1.1.11":"sha256withRSAEncryption","1.2.840.113549.1.1.12":"sha384withRSAEncryption","1.2.840.113549.1.1.13":"sha512withRSAEncryption","1.2.840.113549.1.2.7":"hmacWithSHA1","1.2.840.113549.1.2.8":"hmacWithSHA224","1.2.840.113549.1.2.9":"hmacWithSHA256","1.2.840.113549.1.2.10":"hmacWithSHA384","1.2.840.113549.1.2.11":"hmacWithSHA512","1.2.840.113549.1.3.1":"dhKeyAgreement","1.2.840.113549.1.5.12":"PBKDF2","1.2.840.113549.1.5.13":"PBES2","1.2.840.113549.1.5.14":"PBMAC1","1.2.840.113549.1.7.1":"data","1.2.840.113549.1.7.2":"signedData","1.2.840.113549.1.7.3":"envelopedData","1.2.840.113549.1.7.4":"signedAndEnvelopedData","1.2.840.113549.1.7.5":"digestedData","1.2.840.113549.1.7.6":"encryptedData","1.2.840.113549.1.9.1":"emailAddress","1.2.840.113549.1.9.2":"unstructuredName","1.2.840.113549.1.9.3":"contentType","1.2.840.113549.1.9.4":"messageDigest","1.2.840.113549.1.9.5":"signingTime","1.2.840.113549.1.9.6":"countersignature","1.2.840.113549.1.9.7":"challengePassword","1.2.840.113549.1.9.8":"unstructuredAddress","1.2.840.113549.1.9.9":"extendedCertificateAttributes","1.2.840.113549.1.9.10":"issuerAndSerialNumber","1.2.840.113549.1.9.11":"passwordCheck","1.2.840.113549.1.9.12":"publicKey","1.2.840.113549.1.9.13":"signingDescription","1.2.840.113549.1.9.14":"extensionRequest","1.2.840.113549.1.9.15":"sMimeCapabilities","1.2.840.113549.1.9.16":"sMimeObjectIdentifierRegistry","1.2.840.113549.1.9.16.1.2":"authData","1.2.840.113549.1.9.16.1.4 ":"timestampToken","1.2.840.113549.1.9.16.1.17 ":"firmwareLoadReceipt","1.2.840.113549.1.9.16.1.21":"encKeyWithID","1.2.840.113549.1.9.16.1.23":"authEnvelopedData","1.2.840.113549.1.9.16.2":"sMimeAttributes","1.2.840.113549.1.9.16.2.1":"receiptRequest","1.2.840.113549.1.9.16.2.12":"signingCertificate","1.2.840.113549.1.9.16.2.14":"timeStampToken","1.2.840.113549.1.9.16.2.2":"securityLabel","1.2.840.113549.1.9.16.2.3":"mlExpansionHistory","1.2.840.113549.1.9.16.2.34":"unsignedData","1.2.840.113549.1.9.16.2.47":"signingCertificateV2","1.2.840.113549.1.9.16.3.5":"ESDH","1.2.840.113549.1.9.20":"friendlyName","1.2.840.113549.1.9.21":"localKeyId","1.2.840.113549.1.9.22":"certTypes","1.2.840.113549.1.9.22.1":"x509Certificate","1.2.840.113549.1.9.22.2":"sdsiCertificate","1.2.840.113549.1.9.23":"crlTypes","1.2.840.113549.1.9.23.1":"x509CRL","1.2.840.113549.1.9.24":"secretTypes","1.2.840.113549.1.9.24.1":"secret","1.2.840.113549.1.9.25.1":"pkcs15Token","1.2.840.113549.1.9.25.2":"encryptedPrivateKeyInfo","1.2.840.113549.1.9.25.3":"randomNonce","1.2.840.113549.1.9.25.4":"sequenceNumber","1.2.840.113549.1.9.25.5":"pkcs7PDU","1.2.840.113549.1.9.26.1":"pkcs9String","1.2.840.113549.1.9.26.2":"signingTimeString","1.2.840.113549.1.9.27.1":"caseIgnoreMatch","1.2.840.113549.1.9.27.2":"signingTimeMatch","1.2.840.113549.1.12.0.1":"pkcs-12","1.2.840.113549.1.12.1":"pbe","1.2.840.113549.1.12.1.1":"pbeWithSHAAnd128BitRC4","1.2.840.113549.1.12.1.2":"pbeWithSHAAnd40BitRC4","1.2.840.113549.1.12.1.3":"pbeWithSHAAnd3-KeyTripleDES-CBC","1.2.840.113549.1.12.1.4":"pbeWithSHAAnd2-KeyTripleDES-CBC","1.2.840.113549.1.12.1.5":"pbeWithSHAAnd128BitRC2-CBC","1.2.840.113549.1.12.1.6":"pbeWithSHAAnd40BitRC2-CBC","1.2.840.113549.1.12.1.80":"pbeUnknownGost","1.2.840.113549.1.12.2.1":"pkcs8-key-shrouding","1.2.840.113549.1.12.3.1":"keyBagId","1.2.840.113549.1.12.3.2":"certAndCRLBagId","1.2.840.113549.1.12.3.3":"secretBagId","1.2.840.113549.1.12.3.4":"safeContentsId","1.2.840.113549.1.12.3.5":"pkcs-8ShroudedKeyBagId","1.2.840.113549.1.12.4.1":"x509CertCRLBagId","1.2.840.113549.1.12.4.2":"pkcs-12-SDSICertBag","1.2.840.113549.1.12.10.1.1":"keyBag","1.2.840.113549.1.12.10.1.2":"pkcs8ShroudedKeyBag","1.2.840.113549.1.12.10.1.3":"certBag","1.2.840.113549.1.12.10.1.4":"crlBag","1.2.840.113549.1.12.10.1.5":"secretBag","1.2.840.113549.1.12.10.1.6":"safeContentsBag","1.2.840.113549.2.5":"md-5","1.2.840.113549.3.7":"des-EDE3-CBC","1.3.132.0.34":"secp384r1","1.3.132.0.35":"secp521r1","1.3.132.112":"ecDH","1.3.14.3.2.26":"sha1","1.3.6.1.4.1.311.2.1.14":"msCertExtensions","1.3.6.1.4.1.311.17.1":"keyProviderNameAttr","1.3.6.1.4.1.311.17.2":"localMachineKeyset","1.3.6.1.4.1.311.17.3.20":"certKeyIdentifierPropId","1.3.6.1.4.1.5849":"SignalCom","1.3.6.1.4.1.5849.1.1.1":"id-sc-gost28147-ecb","1.3.6.1.4.1.5849.1.1.2":"id-sc-gost28147-gamma","1.3.6.1.4.1.5849.1.1.3":"id-sc-gost28147-gfb","1.3.6.1.4.1.5849.1.1.4":"id-sc-gost28147-mac","1.3.6.1.4.1.5849.1.1.5":"id-sc-gostR3410-94","1.3.6.1.4.1.5849.1.1.6.1.1.1":"id-sc-gostR3410-94-default","1.3.6.1.4.1.5849.1.1.6.1.1.2":"id-sc-gostR3410-94-test","1.3.6.1.4.1.5849.1.2.1":"id-sc-gostR3411-94","1.3.6.1.4.1.5849.1.3.1":"id-sc-gostR3411-94-with-gostR3410-94","1.3.6.1.4.1.5849.1.3.2":"id-sc-gostR3411-94-with-gostR3410-2001","1.3.6.1.4.1.5849.1.4.1":"id-sc-cmsGostWrap","1.3.6.1.4.1.5849.1.4.2":"id-sc-cmsGost28147Wrap","1.3.6.1.4.1.5849.1.5.1":"id-sc-pbeWithGost3411AndGost28147","1.3.6.1.4.1.5849.1.5.2":"id-sc-pbeWithGost3411AndGost28147CFB","1.3.6.1.4.1.5849.1.6.2":"id-sc-gostR3410-2001","1.3.6.1.4.1.5849.1.7.2":"id-sc-hmacWithGostR3411","1.3.6.1.4.1.5849.1.8.1":"id-sc-r3410-ESDH-r3411kdf","1.3.6.1.4.1.5849.1.8.3":"id-sc-ecdh-singlePass-cofactor-r3411kdf","1.3.6.1.4.1.5849.2.2.1":"id-sc-gostR3410-2001-publicKey","1.3.6.1.5.5.7.0.12":"attribute-cert","1.3.6.1.5.5.7.1.1":"authorityInfoAccess","1.3.6.1.5.5.7.1.4":"auditIdentity","1.3.6.1.5.5.7.1.6":"aaControls","1.3.6.1.5.5.7.1.10":"ac-proxying","1.3.6.1.5.5.7.1.11":"subjectInfoAccess","1.3.6.1.5.5.7.3.1":"serverAuth","1.3.6.1.5.5.7.3.2":"clientAuth","1.3.6.1.5.5.7.3.3":"codeSigning","1.3.6.1.5.5.7.3.4":"emailProtection","1.3.6.1.5.5.7.3.5":"ipsecEndSystem","1.3.6.1.5.5.7.3.6":"ipsecTunnel","1.3.6.1.5.5.7.3.7":"ipsecUser","1.3.6.1.5.5.7.3.8":"timeStamping","1.3.6.1.5.5.7.3.9":"OCSPSigning","1.3.6.1.5.5.7.5.1":"regCtrl","1.3.6.1.5.5.7.5.1.1":"regToken","1.3.6.1.5.5.7.5.1.2":"authenticator","1.3.6.1.5.5.7.5.1.3":"pkiPublicationInfo","1.3.6.1.5.5.7.5.1.4":"pkiArchiveOptions","1.3.6.1.5.5.7.5.1.5":"oldCertID","1.3.6.1.5.5.7.5.1.6":"protocolEncrKey","1.3.6.1.5.5.7.5.2":"regInfoAttr","1.3.6.1.5.5.7.5.2.1":"UTF8Pairs","1.3.6.1.5.5.7.5.2.2":"certReq","1.3.6.1.5.5.7.6.2":"noSignature","1.3.6.1.5.5.7.7.1":"statusInfo","1.3.6.1.5.5.7.7.2":"identification","1.3.6.1.5.5.7.7.3":"identityProof","1.3.6.1.5.5.7.7.4":"dataReturn","1.3.6.1.5.5.7.7.5":"transactionId","1.3.6.1.5.5.7.7.6":"senderNonce","1.3.6.1.5.5.7.7.7":"recipientNonce","1.3.6.1.5.5.7.7.8":"addExtensions","1.3.6.1.5.5.7.7.9":"encryptedPOP","1.3.6.1.5.5.7.7.10":"decryptedPOP","1.3.6.1.5.5.7.7.11":"lraPOPWitness","1.3.6.1.5.5.7.7.15":"getCert","1.3.6.1.5.5.7.7.16":"getCRL","1.3.6.1.5.5.7.7.17":"revokeRequest","1.3.6.1.5.5.7.7.18":"regInfo","1.3.6.1.5.5.7.7.19":"responseInfo","1.3.6.1.5.5.7.7.21":"queryPending","1.3.6.1.5.5.7.7.22":"popLinkRandom","1.3.6.1.5.5.7.7.23":"popLinkWitness","1.3.6.1.5.5.7.7.24":"confirmCertAcceptance","1.3.6.1.5.5.7.7.25":"statusInfoV2","1.3.6.1.5.5.7.7.26":"trustedAnchors","1.3.6.1.5.5.7.7.27":"authPublish","1.3.6.1.5.5.7.7.28":"batchRequests","1.3.6.1.5.5.7.7.29":"batchResponses","1.3.6.1.5.5.7.7.30":"publishCert","1.3.6.1.5.5.7.7.31":"modCertTemplate","1.3.6.1.5.5.7.7.32":"controlProcessed","1.3.6.1.5.5.7.7.33":"popLinkWitnessV2","1.3.6.1.5.5.7.7.34":"identityProofV2","1.3.6.1.5.5.7.9.1":"dateOfBirth","1.3.6.1.5.5.7.9.2":"placeOfBirth","1.3.6.1.5.5.7.9.3":"gender","1.3.6.1.5.5.7.9.4":"countryOfCitizenship","1.3.6.1.5.5.7.9.5":"countryOfResidence","1.3.6.1.5.5.7.10.1":"authenticationInfo","1.3.6.1.5.5.7.10.2":"accessIdentity","1.3.6.1.5.5.7.10.3":"chargingIdentity","1.3.6.1.5.5.7.10.4":"group","1.3.6.1.5.5.7.10.6":"encAttrs","1.3.6.1.5.5.7.12.2":"PKIData","1.3.6.1.5.5.7.12.3":"PKIResponse","1.3.6.1.5.5.7.48.1.1":"ocsp-basic","1.3.6.1.5.5.7.48.1.2":"ocsp-nonce","1.3.6.1.5.5.7.48.1.3":"ocsp-crl","1.3.6.1.5.5.7.48.1.4":"ocsp-response","1.3.6.1.5.5.7.48.1.5":"ocsp-nocheck","1.3.6.1.5.5.7.48.1.6":"ocsp-archive-cutoff","1.3.6.1.5.5.7.48.1.7":"ocsp-service-locator","2.16.840.1.101.2.1.2.78.2":"encryptedKeyPkg","2.16.840.1.101.2.1.2.78.3":"keyPackageReceipt","2.16.840.1.101.2.1.2.78.5":"aKeyPackage","2.16.840.1.101.2.1.2.78.6":"keyPackageError","2.16.840.1.101.3.4":"nistAlgorithms","2.16.840.1.101.3.4.1":"aes","2.16.840.1.101.3.4.1.1":"aes128-ECB","2.16.840.1.101.3.4.1.2":"aes128-CBC","2.16.840.1.101.3.4.1.3":"aes128-OFB","2.16.840.1.101.3.4.1.4":"aes128-CFB","2.16.840.1.101.3.4.1.5":"aes128-wrap","2.16.840.1.101.3.4.1.6":"aes128-GCM","2.16.840.1.101.3.4.1.7":"aes128-CCM","2.16.840.1.101.3.4.1.8":"aes128-wrap-pad","2.16.840.1.101.3.4.1.21":"aes192-ECB","2.16.840.1.101.3.4.1.22":"aes192-CBC","2.16.840.1.101.3.4.1.23":"aes192-OFB","2.16.840.1.101.3.4.1.24":"aes192-CFB","2.16.840.1.101.3.4.1.25":"aes192-wrap","2.16.840.1.101.3.4.1.26":"aes192-GCM","2.16.840.1.101.3.4.1.27":"aes192-CCM","2.16.840.1.101.3.4.1.28":"aes192-wrap-pad","2.16.840.1.101.3.4.1.41":"aes256-ECB","2.16.840.1.101.3.4.1.42":"aes256-CBC","2.16.840.1.101.3.4.1.43":"aes256-OFB","2.16.840.1.101.3.4.1.44":"aes256-CFB","2.16.840.1.101.3.4.1.45":"aes256-wrap","2.16.840.1.101.3.4.1.46":"aes256-GCM","2.16.840.1.101.3.4.1.47":"aes256-CCM","2.16.840.1.101.3.4.1.48":"aes256-wrap-pad","2.16.840.1.101.3.4.2.1":"sha256","2.16.840.1.101.3.4.2.2":"sha384","2.16.840.1.101.3.4.2.3":"sha512","2.16.840.1.113730.3.1.216":"userPKCS12","2.5.1.5.55":"clearance","2.5.4.0":"objectClass","2.5.4.1":"aliasedEntryName","2.5.4.2":"knowldgeinformation","2.5.4.3":"commonName","2.5.4.5":"serialName","2.5.4.6":"countryName","2.5.4.7":"localityName","2.5.4.8":"stateOrProvinceName","2.5.4.9":"streetAddress","2.5.4.10":"organizationName","2.5.4.11":"organizationalUnitName","2.5.4.12":"title","2.5.4.13":"description","2.5.4.14":"searchGuide","2.5.4.15":"businessCategory","2.5.4.16":"postalAddress","2.5.4.17":"postalCode","2.5.4.18":"postOfficeBox","2.5.4.19":"physicalDeliveryOfficeName","2.5.4.20":"telephoneNumber","2.5.4.21":"telexNumber","2.5.4.22":"teletexTerminalIdentifier","2.5.4.23":"facsimileTelephoneNumber","2.5.4.24":"x121Address","2.5.4.25":"internationalISDNNumber","2.5.4.26":"registeredAddress","2.5.4.27":"destinationIndicator","2.5.4.28":"preferredDeliveryMethod","2.5.4.29":"presentationAddress","2.5.4.30":"supportedApplicationContext","2.5.4.31":"member","2.5.4.32":"owner","2.5.4.33":"roleOccupant","2.5.4.34":"seeAlso","2.5.4.35":"userPassword","2.5.4.36":"userCertificate","2.5.4.37":"cACertificate","2.5.4.38":"authorityRevocationList","2.5.4.39":"certificateRevocationList","2.5.4.40":"crossCertificatePair","2.5.4.41":"name","2.5.4.42":"givenName","2.5.4.43":"initials","2.5.4.44":"generationQualifier","2.5.4.45":"uniqueIdentifier","2.5.4.46":"dnQualifier","2.5.4.47":"enhancedSearchGuide","2.5.4.48":"protocolInformation","2.5.4.49":"distinguishedName","2.5.4.50":"uniqueMember","2.5.4.51":"houseIdentifier","2.5.4.52":"supportedAlgorithms","2.5.4.53":"deltaRevocationList","2.5.4.58":"attributeCertificate","2.5.4.65":"pseudonym","2.5.4.72":"role","2.5.29.1":"authorityKeyIdentifierX","2.5.29.2":"keyAttributesX","2.5.29.3":"certificatePoliciesX","2.5.29.4":"keyUsageRestriction","2.5.29.5":"policyMapping","2.5.29.6":"subtreesConstraint","2.5.29.7":"subjectAltNameX","2.5.29.8":"issuerAltNameX","2.5.29.9":"subjectDirectoryAttributes","2.5.29.10":"basicConstraintsX","2.5.29.11":"nameConstraintsX","2.5.29.12":"policyConstraintsX","2.5.29.13":"basicConstraintsY","2.5.29.14":"subjectKeyIdentifier","2.5.29.15":"keyUsage","2.5.29.16":"privateKeyUsagePeriod","2.5.29.17":"subjectAltName","2.5.29.18":"issuerAltName","2.5.29.19":"basicConstraints","2.5.29.20":"cRLNumber","2.5.29.21":"cRLReason","2.5.29.22":"expirationDate","2.5.29.23":"instructionCode","2.5.29.24":"invalidityDate","2.5.29.25":"cRLDistributionPointsX","2.5.29.26":"issuingDistributionPointX","2.5.29.27":"deltaCRLIndicator","2.5.29.28":"issuingDistributionPoint","2.5.29.29":"certificateIssuer","2.5.29.30":"nameConstraints","2.5.29.31":"cRLDistributionPoints","2.5.29.32":"certificatePolicies","2.5.29.33":"policyMappings","2.5.29.34":"policyConstraintsY","2.5.29.35":"authorityKeyIdentifier","2.5.29.36":"policyConstraints","2.5.29.37":"extKeyUsage","2.5.29.46":"freshestCRL","2.5.29.54":"inhibitAnyPolicy","2.5.29.55":"targetInformation","2.5.29.56":"noRevAvail"},o={};for(var s in a)o[a[s]]=s;var c={"id-GostR3411-94-with-GostR3410-2001":"GOST R 34.10-2001/GOST R 34.11-94","id-GostR3411-94-with-GostR3410-94":"GOST R 34.10-94/GOST R 34.11-94","id-GostR3411-94":"GOST R 34.11-94","id-HMACGostR3411-94":{name:"HMAC",hash:{name:"GOST R 34.11-94"}},"id-Gost28147-89-None-KeyWrap":"GOST 28147-89-KW","id-Gost28147-89-CryptoPro-KeyWrap":"GOST 28147-89-CPKW","id-GostR3410-2001":"GOST R 34.10-2001","id-GostR3410-94":"GOST R 34.10-94","id-GostR3410-94-a":"GOST R 34.10-94","id-GostR3410-94-aBis":"GOST R 34.10-94","id-GostR3410-94-b":"GOST R 34.10-94","id-GostR3410-94-bBis":"GOST R 34.10-94","id-Gost28147-89":"GOST 28147-89","id-Gost28147-89-MAC":"GOST 28147-89-MAC","id-GostR3410-2001-CryptoPro-ESDH":"GOST R 34.10-2001-DH/GOST R 34.11-94","id-GostR3410-94-CryptoPro-ESDH":"GOST R 34.10-94-DH/GOST R 34.11-94","id-GostR3410-2001DH":"GOST R 34.10-2001-DH","id-GostR3410-94DH":"GOST R 34.10-94-DH","id-tc26-gost3410-12-256":"GOST R 34.10-256","id-tc26-gost3410-12-512":"GOST R 34.10-512","id-tc26-gost3411-94":"GOST R 34.11-94","id-tc26-gost3411-12-256":"GOST R 34.11-256","id-tc26-gost3411-12-512":"GOST R 34.11-512","id-tc26-signwithdigest-gost3410-12-94":"GOST R 34.10-256/GOST R 34.11-94","id-tc26-signwithdigest-gost3410-12-256":"GOST R 34.10-256/GOST R 34.11-256","id-tc26-signwithdigest-gost3410-12-512":"GOST R 34.10-512/GOST R 34.11-512","id-tc26-hmac-gost-3411-12-256":{name:"HMAC",hash:{name:"GOST R 34.11-256"}},"id-tc26-hmac-gost-3411-12-512":{name:"HMAC",hash:{name:"GOST R 34.11-512"}},"id-tc26-agreement-gost-3410-12-256":"GOST R 34.10-256-DH/GOST R 34.11-256","id-tc26-agreement-gost-3410-12-512":"GOST R 34.10-512-DH/GOST R 34.11-256","id-sc-gost28147-ecb":"GOST 28147-89-ECB/SC","id-sc-gost28147-gamma":"GOST 28147-89-CTR/SC","id-sc-gost28147-gfb":"GOST 28147-89-CFB/SC","id-sc-gost28147-mac":"GOST 28147-89-MAC/SC","id-sc-gostR3410-94":"GOST R 34.10-94/SC","id-sc-gostR3410-94-default":"GOST R 34.10-94/SC","id-sc-gostR3410-94-test":"GOST R 34.10-94/SC/S-TEST","id-sc-gostR3411-94":"GOST R 34.11-94/SC","id-sc-gostR3411-94-with-gostR3410-94":"GOST R 34.10-94/GOST R 34.11-94/SC","id-sc-gostR3411-94-with-gostR3410-2001":"GOST R 34.10-2001/GOST R 34.11-94/SC","id-sc-cmsGostWrap":"GOST 28147-89-SCKW/SC","id-sc-cmsGost28147Wrap":"GOST 28147-89-KW/SC","id-sc-pbeWithGost3411AndGost28147":{derivation:{name:"GOST R 34.11-94-PBKDF2/SC"},encryption:{name:"GOST 28147-ECB/SC"}},"id-sc-pbeWithGost3411AndGost28147CFB":{derivation:{name:"GOST R 34.11-94-PBKDF2/SC"},encryption:{name:"GOST 28147-CFB/SC"}},"id-sc-gostR3410-2001":"GOST R 34.10-2001/SC","id-sc-hmacWithGostR3411":{name:"HMAC",hash:{name:"GOST R 34.11-94/SC"}},"id-sc-r3410-ESDH-r3411kdf":"GOST R 34.10-2001-DH/GOST R 34.11-94/SC",noSignature:"NONE",rsaEncryption:{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},sha1withRSAEncryption:{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-1"}},sha256withRSAEncryption:{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},sha384withRSAEncryption:{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-384"}},sha512withRSAEncryption:{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-512"}},"rsaes-oaep":"RSA-OAEP","rsassa-pss":"RSA-PSS",ecdsa:"ECDSA","ecdsa-with-SHA1":{name:"ECDSA",hash:{name:"SHA-1"}},"ecdsa-with-SHA256":{name:"ECDSA",hash:{name:"SHA-256"}},"ecdsa-with-SHA384":{name:"ECDSA",hash:{name:"SHA-384"}},"ecdsa-with-SHA512":{name:"ECDSA",hash:{name:"SHA-512"}},"pbeWithSHAAndAES128-CBC":{derivation:{name:"PBKDF2",hash:{name:"SHA-1"}},encryption:{name:"AES-CBC",length:128}},"pbeWithSHAAndAES192-CBC":{derivation:{name:"PBKDF2",hash:{name:"SHA-1"}},encryption:{name:"AES-CBC",length:192}},"pbeWithSHAAndAES256-CBC":{derivation:{name:"PBKDF2",hash:{name:"SHA-1"}},encryption:{name:"AES-CBC",length:256}},"pbeWithSHA256AndAES128-CBC":{derivation:{name:"PBKDF2",hash:{name:"SHA-256"}},encryption:{name:"AES-CBC",length:128}},"pbeWithSHA256AndAES192-CBC":{derivation:{name:"PBKDF2",hash:{name:"SHA-256"}},encryption:{name:"AES-CBC",length:192}},"pbeWithSHA256AndAES256-CBC":{derivation:{name:"PBKDF2",hash:{name:"SHA-256"}},encryption:{name:"AES-CBC",length:256}},"pbeWithSHAAnd3-KeyTripleDES-CBC":{derivation:{name:"PFXKDF",iterations:2e3,hash:"SHA-1"},encryption:{name:"3DES",block:"CBC"}},"pbeWithSHAAnd2-KeyTripleDES-CBC":{derivation:{name:"PFXKDF",iterations:2e3,hash:"SHA-1"},encryption:{name:"2DES",block:"CBC"}},"pbeWithSHAAnd128BitRC2-CBC":{derivation:{name:"PFXKDF",iterations:2e3,hash:"SHA-1"},encryption:{name:"RC2",block:"CBC",length:128}},"pbeWithSHAAnd40BitRC2-CBC":{derivation:{name:"PFXKDF",iterations:2e3,hash:"SHA-1"},encryption:{name:"RC2",block:"CBC",length:40}},pbeUnknownGost:{derivation:{name:"PFXKDF",iterations:2e3,hash:"GOST R 34.11-94"},encryption:{name:"GOST 28147-89-CFB"}},ecDH:"ECDH",dhKeyAgreement:"DH","aes128-CBC":{name:"AES-CBC",length:128},"aes128-CFB":{name:"AES-CFB-8",length:128},"aes128-GCM":{name:"AES-GCM",length:128},"aes128-wrap":{name:"AES-KW",length:128},"aes192-CBC":{name:"AES-CBC",length:192},"aes192-CFB":{name:"AES-CFB-8",length:192},"aes192-GCM":{name:"AES-GCM",length:192},"aes192-wrap":{name:"AES-KW",length:192},"aes256-CBC":{name:"AES-CBC",length:256},"aes256-CFB":{name:"AES-CFB-8",length:256},"aes256-GCM":{name:"AES-GCM",length:256},"aes256-wrap":{name:"AES-KW",length:256},sha1:"SHA-1",sha256:"SHA-256",sha384:"SHA-384",sha512:"SHA-512",PBKDF2:"PBKDF2",PBES2:{derivation:{name:"PBKDF2"},encryption:{}},PBMAC1:{derivation:{name:"PBKDF2"},hmac:{}},hmacWithSHA1:"SHA-1-HMAC",hmacWithSHA256:{name:"HMAC",hash:{name:"SHA-256"}},hmacWithSHA384:{name:"HMAC",hash:{name:"SHA-384"}},hmacWithSHA512:{name:"HMAC",hash:{name:"SHA-512"}}};for(var u in c){var f=c[u];"string"==typeof f&&(f={name:f}),f.id=u,c[u]=f}var h={"CP-94":{title:"Crypto-Pro GOST R 34.10-94 Cryptographic Service Provider",signature:c["id-GostR3411-94-with-GostR3410-94"],publicKey:{id:"id-GostR3410-94",name:"GOST R 34.10-94",namedParam:"X-A"},privateKey:{id:"id-GostR3410-94DH",name:"GOST R 34.10-94-DH",namedParam:"X-A"},digest:c["id-GostR3411-94"],wrapping:{id:"id-Gost28147-89-CryptoPro-KeyWrap",name:"GOST 28147-89-CPKW",sBox:"E-A"},hmac:c["id-HMACGostR3411-94"],agreement:c["id-GostR3410-94-CryptoPro-ESDH"],encryption:{id:"id-Gost28147-89",name:"GOST 28147-89",block:"CFB",sBox:"E-A",keyMeshing:"CP"},derivation:{id:"PBKDF2",name:"GOST R 34.11-94-PBKDF2",iterations:2e3}},"CP-01":{title:"Crypto-Pro GOST R 34.10-2001 Cryptographic Service Provider",signature:c["id-GostR3411-94-with-GostR3410-2001"],publicKey:{id:"id-GostR3410-2001",name:"GOST R 34.10-2001",namedCurve:"X-256-A"},privateKey:{id:"id-GostR3410-2001DH",name:"GOST R 34.10-2001-DH",namedCurve:"X-256-A"},digest:{id:"id-GostR3411-94",name:"GOST R 34.11-94",sBox:"D-A"},wrapping:{id:"id-Gost28147-89-CryptoPro-KeyWrap",name:"GOST 28147-89-CPKW",sBox:"E-A"},hmac:c["id-HMACGostR3411-94"],agreement:c["id-GostR3410-2001-CryptoPro-ESDH"],encryption:{id:"id-Gost28147-89",name:"GOST 28147-89-CFB-CPKM",sBox:"E-A"},derivation:{id:"PBKDF2",name:"GOST R 34.11-94-PBKDF2",iterations:2e3}},"TC-256":{title:"Crypto-Pro GOST R 34.10-2012 Cryptographic Service Provider",signature:c["id-tc26-signwithdigest-gost3410-12-256"],publicKey:{id:"id-tc26-gost3410-12-256",name:"GOST R 34.10-256",namedCurve:"X-256-A"},privateKey:{id:"id-tc26-agreement-gost-3410-12-256",name:"GOST R 34.10-256-DH/GOST R 34.11-256",namedCurve:"X-256-A"},digest:c["id-tc26-gost3411-12-256"],wrapping:{id:"id-Gost28147-89-CryptoPro-KeyWrap",name:"GOST 28147-89-CPKW",sBox:"E-A"},hmac:c["id-tc26-hmac-gost-3411-12-256"],agreement:c["id-tc26-agreement-gost-3410-12-256"],encryption:{id:"id-Gost28147-89",name:"GOST 28147-89-CFB-CPKM",sBox:"E-A"},derivation:{id:"PBKDF2",name:"GOST R 34.11-256-12-PBKDF2",iterations:2e3}},"TC-512":{title:"Crypto-Pro GOST R 34.10-2012 Strong Cryptographic Service Provider",signature:c["id-tc26-signwithdigest-gost3410-12-512"],publicKey:{id:"id-tc26-gost3410-12-512",name:"GOST R 34.10-512",namedCurve:"T-512-A"},privateKey:{id:"id-tc26-agreement-gost-3410-12-512",name:"GOST R 34.10-512-DH/GOST R 34.11-256",namedCurve:"T-512-A"},digest:c["id-tc26-gost3411-12-512"],wrapping:{id:"id-Gost28147-89-CryptoPro-KeyWrap",name:"GOST 28147-89-CPKW",sBox:"E-A"},hmac:c["id-tc26-hmac-gost-3411-12-512"],agreement:c["id-tc26-agreement-gost-3410-12-512"],encryption:{id:"id-Gost28147-89",name:"GOST 28147-89-CFB-CPKM",sBox:"E-A"},derivation:{id:"PBKDF2",name:"GOST R 34.11-256-PBKDF2",iterations:2e3}},"SC-94":{title:"Signal-COM GOST Cryptographic Provider",signature:c["id-sc-gostR3411-94-with-gostR3410-94"],publicKey:{id:"id-sc-gostR3410-94",name:"GOST R 34.10-94/SC",namedParam:"S-A"},privateKey:{id:"id-sc-gostR3410-94",name:"GOST R 34.10-94/SC",modulusLength:1024,param:{p:"0xB4E25EFB018E3C8B87505E2A67553C5EDC56C2914B7E4F89D23F03F03377E70A2903489DD60E78418D3D851EDB5317C4871E40B04228C3B7902963C4B7D85D52B9AA88F2AFDBEB28DA8869D6DF846A1D98924E925561BD69300B9DDD05D247B5922D967CBB02671881C57D10E5EF72D3E6DAD4223DC82AA1F7D0294651A480DF",q:"0x972432A437178B30BD96195B773789AB2FFF15594B176DD175B63256EE5AF2CF",a:"0x8FD36731237654BBE41F5F1F8453E71CA414FFC22C25D915309E5D2E62A2A26C7111F3FC79568DAFA028042FE1A52A0489805C0DE9A1A469C844C7CABBEE625C3078888C1D85EEA883F1AD5BC4E6776E8E1A0750912DF64F79956499F1E182475B0B60E2632ADCD8CF94E9C54FD1F3B109D81F00BF2AB8CB862ADF7D40B9369A"}},digest:c["id-sc-gostR3411-94"],encryption:{id:"id-sc-gost28147-gfb",name:"GOST 28147-89-CFB/SC"},hmac:c["id-sc-hmacWithGostR3411"],wrapping:["id-sc-cmsGostWrap"],agreement:c["id-sc-r3410-ESDH-r3411kdf"],derivation:{id:"PBKDF2",name:"GOST R 34.11-94-PBKDF2/SC",iterations:2048},pbes:{id:"id-sc-pbeWithGost3411AndGost28147CFB",derivation:{id:"PBKDF2",name:"GOST R 34.11-94-PBKDF2/SC",iterations:2048},encryption:{id:"id-sc-gost28147-gfb",name:"GOST 28147-CFB/SC",iv:new Uint8Array([0,0,0,0,0,0,0,0])}}},"SC-01":{title:"Signal-COM ECGOST Cryptographic Provider",signature:c["id-sc-gostR3411-94-with-gostR3410-2001"],publicKey:{id:"id-sc-gostR3410-2001",name:"GOST R 34.10-2001/SC",namedCurve:"P-256"},privateKey:{id:"id-sc-gostR3410-2001",name:"GOST R 34.10-2001/SC",curve:{p:"0xFFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF",a:"0xFFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFC",b:"0x5AC635D8AA3A93E7B3EBBD55769886BC651D06B0CC53B0F63BCE3C3E27D2604B",x:"0x6B17D1F2E12C4247F8BCE6E563A440F277037D812DEB33A0F4A13945D898C296",y:"0x4FE342E2FE1A7F9B8EE7EB4A7C0F9E162BCE33576B315ECECBB6406837BF51F5",q:"0xFFFFFFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632551"}},digest:c["id-sc-gostR3411-94"],encryption:{id:"id-sc-gost28147-gfb",name:"GOST 28147-89-CFB/SC"},hmac:c["id-sc-hmacWithGostR3411"],wrapping:c["id-sc-cmsGostWrap"],agreement:c["id-sc-r3410-ESDH-r3411kdf"],derivation:{id:"PBKDF2",name:"GOST R 34.11-94-PBKDF2/SC",iterations:2048},pbes:{id:"id-sc-pbeWithGost3411AndGost28147CFB",derivation:{id:"PBKDF2",name:"GOST R 34.11-94-PBKDF2/SC",iterations:2048},encryption:{id:"id-sc-gost28147-gfb",name:"GOST 28147-CFB/SC",iv:new Uint8Array([0,0,0,0,0,0,0,0])}}},"RSA-2048":{title:"Microsoft Strong Cryptographic Provider",signature:c.sha256withRSAEncryption,publicKey:{id:"rsaEncryption",name:"RSASSA-PKCS1-v1_5",modulusLength:2048,publicExponent:new Uint8Array([1,0,1]),hash:c.sha256},privateKey:{id:"rsaEncryption",name:"RSASSA-PKCS1-v1_5",modulusLength:2048,publicExponent:new Uint8Array([1,0,1]),hash:c.sha256},digest:c.sha256,encryption:c["aes256-CFB"],hmac:c.hmacWithSHA256},"ECDSA-256":{title:"Microsoft Base DSS and Diffie-Hellman Cryptographic Provider",signature:c["ecdsa-with-SHA256"],publicKey:{id:"ecdsa",name:"ECDSA",namedCurve:"P-256"},privateKey:{id:"ecdsa",name:"ECDSA",namedCurve:"P-256"},digest:c.sha256,encryption:c["aes256-CFB"],hmac:c.hmacWithSHA256,agreement:c.ecDH}};function l(){}["CP-94","CP-01","TC-256","TC-512","SC-94","SC-01"].forEach((function(e){var t=h[e];t.hmac=i(t.hmac,{hash:t.digest}),t.derivation=i(t.derivation,{hash:t.digest,hmac:t.hmac}),t.pbes=t.pbes||{id:"PBES2",derivation:t.derivation,encryption:t.encryption},t.pbmac=t.pbmac||{id:"PBMAC1",derivation:t.derivation,hmac:t.hmac},t.agreement=i(t.agreement,{wrapping:t.wrapping})})),["RSA-2048","ECDSA-256"].forEach((function(e){var t=h[e];t.derivation=t.derivation||{id:"PBKDF2",name:"PBKDF2",iterations:2048,hash:t.digest},t.pbes=t.pbes||{id:"PBES2",derivation:t.derivation,encryption:t.encryption},t.pbmac=t.pbmac||{id:"PBMAC1",derivation:t.derivation,hmac:t.hmac}})),l.prototype={names:a,identifiers:o,algorithms:c,parameters:{"id-GostR3410-94-TestParamSet":{namedParam:"S-TEST"},"id-GostR3410-94-CryptoPro-A-ParamSet":{namedParam:"S-A"},"id-GostR3410-94-CryptoPro-B-ParamSet":{namedParam:"S-B"},"id-GostR3410-94-CryptoPro-C-ParamSet":{namedParam:"S-C"},"id-GostR3410-94-CryptoPro-D-ParamSet":{namedParam:"S-D"},"id-GostR3410-94-CryptoPro-XchA-ParamSet":{namedParam:"X-A"},"id-GostR3410-94-CryptoPro-XchB-ParamSet":{namedParam:"X-B"},"id-GostR3410-94-CryptoPro-XchC-ParamSet":{namedParam:"X-C"},"id-GostR3410-2001-CryptoPro-TestParamSet":{namedCurve:"S-256-TEST"},"id-GostR3410-2001-CryptoPro-A-ParamSet":{namedCurve:"S-256-A"},"id-GostR3410-2001-CryptoPro-B-ParamSet":{namedCurve:"S-256-B"},"id-GostR3410-2001-CryptoPro-C-ParamSet":{namedCurve:"S-256-C"},"id-GostR3410-2001-CryptoPro-XchA-ParamSet":{namedCurve:"X-256-A"},"id-GostR3410-2001-CryptoPro-XchB-ParamSet":{namedCurve:"X-256-B"},"id-tc26-gost-3410-12-256-paramSetTest":{namedCurve:"T-256-TEST"},"id-tc26-gost-3410-12-256-paramSetA":{namedCurve:"T-256-A"},"id-tc26-gost-3410-12-256-paramSetB":{namedCurve:"T-256-B"},"id-tc26-gost-3410-12-512-paramSetTest":{namedCurve:"T-512-TEST"},"id-tc26-gost-3410-12-512-paramSetA":{namedCurve:"T-512-A"},"id-tc26-gost-3410-12-512-paramSetB":{namedCurve:"T-512-B"},"id-tc26-gost-3410-12-512-paramSetC":{namedCurve:"T-512-C"},"id-tc26-gost-3410-12-512-paramSetD":{namedCurve:"T-512-D"},secp256r1:{namedCurve:"P-256"},secp384r:{namedCurve:"P-384"},secp521r:{namedCurve:"P-521"},"id-GostR3411-94-TestParamSet":{sBox:"D-TEST"},"id-GostR3411-94-CryptoProParamSet":{sBox:"D-A"},"id-GostR3411-94-CryptoPro-A-ParamSet":{sBox:"D-B"},"id-GostR3411-94-CryptoPro-B-ParamSet":{sBox:"D-C"},"id-GostR3411-94-CryptoPro-C-ParamSet":{sBox:"D-D"},"id-Gost28147-89-TestParamSet":{block:"CTR",sBox:"E-TEST"},"id-Gost28147-89-CryptoPro-A-ParamSet":{block:"CFB",sBox:"E-A",keyMeshing:"CP"},"id-Gost28147-89-CryptoPro-B-ParamSet":{block:"CFB",sBox:"E-B",keyMeshing:"CP"},"id-Gost28147-89-CryptoPro-C-ParamSet":{block:"CFB",sBox:"E-C",keyMeshing:"CP"},"id-Gost28147-89-CryptoPro-D-ParamSet":{block:"CFB",sBox:"E-D",keyMeshing:"CP"},"id-Gost28147-89-None-KeyMeshing":{keyMeshing:"NO"},"id-Gost28147-89-CryptoPro-KeyMeshing":{keyMeshing:"CP"},"id-tc26-gost-28147-param-Z":{block:"CFB",sBox:"E-Z"}},attributes:{sBox:{"D-TEST":"id-GostR3411-94-TestParamSet","D-A":"id-GostR3411-94-CryptoProParamSet","D-B":"id-GostR3411-94-CryptoPro-A-ParamSet","D-C":"id-GostR3411-94-CryptoPro-B-ParamSet","D-D":"id-GostR3411-94-CryptoPro-C-ParamSet","E-TEST":"id-Gost28147-89-TestParamSet","E-A":"id-Gost28147-89-CryptoPro-A-ParamSet","E-B":"id-Gost28147-89-CryptoPro-B-ParamSet","E-C":"id-Gost28147-89-CryptoPro-C-ParamSet","E-D":"id-Gost28147-89-CryptoPro-D-ParamSet","E-Z":"id-tc26-gost-28147-param-Z","D-256":"id-tc26-gost3411-12-256","D-512":"id-tc26-gost3411-12-512"},namedParam:{"S-TEST":"id-GostR3410-94-TestParamSet","S-A":"id-GostR3410-94-CryptoPro-A-ParamSet","S-B":"id-GostR3410-94-CryptoPro-B-ParamSet","S-C":"id-GostR3410-94-CryptoPro-C-ParamSet","S-D":"id-GostR3410-94-CryptoPro-D-ParamSet","X-A":"id-GostR3410-94-CryptoPro-XchA-ParamSet","X-B":"id-GostR3410-94-CryptoPro-XchB-ParamSet","X-C":"id-GostR3410-94-CryptoPro-XchC-ParamSet"},namedCurve:{"S-256-TEST":"id-GostR3410-2001-CryptoPro-TestParamSet","S-256-A":"id-GostR3410-2001-CryptoPro-A-ParamSet","S-256-B":"id-GostR3410-2001-CryptoPro-B-ParamSet","S-256-C":"id-GostR3410-2001-CryptoPro-C-ParamSet","X-256-A":"id-GostR3410-2001-CryptoPro-XchA-ParamSet","X-256-B":"id-GostR3410-2001-CryptoPro-XchB-ParamSet","P-256":"secp256r1","T-256-TEST":"id-tc26-gost-3410-12-256-paramSetTest","T-256-A":"id-tc26-gost-3410-12-256-paramSetA","T-256-B":"id-tc26-gost-3410-12-256-paramSetB","T-512-TEST":"id-tc26-gost-3410-12-512-paramSetTest","T-512-A":"id-tc26-gost-3410-12-512-paramSetA","T-512-B":"id-tc26-gost-3410-12-512-paramSetB"}},providers:h},t.gostSecurityInstance=new l},function(e,t,r){"use strict";(function(n){Object.defineProperty(t,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function a(){return o()?n:self}function o(){return"object"===i(t)&&void 0!==e}t.getRoot=a,t.getCryptoModule=function(){var e=a();if(a().hasOwnProperty("crypto"))return e.crypto;if(e.hasOwnProperty("msCrypto"))return e.msCrypto;if(o())return r(170);throw new Error("Your environment does not have сrypto module")},t.isInNode=o,t.isBrowser=function(){return"undefined"!=typeof window},t.isInWebWorker=function(){return"undefined"!=typeof importScripts}}).call(this,r(7))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GostRandom=f;var n=r(79);function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s={seed:new Uint8Array(1024),getIndex:0,setIndex:0,set:function(e){this.setIndex>=1024&&(this.setIndex=0),this.seed[this.setIndex++]=e},get:function(){return this.getIndex>=1024&&(this.getIndex=0),this.seed[this.getIndex++]}};if((0,n.isBrowser)()){try{document.addEventListener("mousemove",(function(e){s.set(255&(new Date).getTime()^255&(e.clientX||e.pageX)^255&(e.clientY||e.pageY))}),!1)}catch(e){}try{document.addEventListener("keydown",(function(e){s.set(255&(new Date).getTime()^255&e.keyCode)}),!1)}catch(e){}}var c=function(e){function t(){return i(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,Error),t}(),u=function(e){function t(){return i(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,Error),t}();function f(){}var h=(0,n.getCryptoModule)();f.prototype.getRandomValues=function(e){if(!e.byteLength)throw new c("Array is not of an integer type (Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, or Uint32Array)");if(e.byteLength>65536)throw new u("Byte length of array can't be greate then 65536");var t=new Uint8Array(e.buffer,e.byteOffset,e.byteLength);if(h&&h.getRandomValues)h.getRandomValues(t);else for(var r=0,n=t.length;r<n;r++)t[r]=255&Math.floor(256*Math.random());for(r=0,n=t.length;r<n;r++)t[r]=t[r]^s.get();return e}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GostSign=function(e){e=e||{},this.name=(e.name||"GOST R 34.10")+"-"+(e.version||2012)%100+"-"+(e.length||256)+("SIGN"!==(e.mode||"SIGN")?"-"+e.mode:"")+("string"==typeof e.namedParam?"/"+e.namedParam:"")+("string"==typeof e.namedCurve?"/"+e.namedCurve:"")+("string"==typeof e.sBox?"/"+e.sBox:"");var t,r,a=e.version||2012;switch(e.mode||"SIGN"){case"SIGN":this.sign=Te,this.verify=Ie,this.generateKey=ke;break;case"DH":this.deriveBits=De,this.deriveKey=Pe,this.generateKey=ke;break;case"MASK":this.wrapKey=xe,this.unwrapKey=Re,this.generateKey=_e}if(1994===a)(o=e.param)||(o=c[this.namedParam=(e.namedParam||"S-A").toUpperCase()]),this.modulusLength=e.modulusLength||o.modulusLength||1024,this.p=be(o.p),this.q=be(o.q),this.a=be(o.a),e.public&&(this.peer_y=ve(e.public));else{var o;(o=e.curve)||(o=s[this.namedCurve=(e.namedCurve||"S-256-A").toUpperCase()]);var u=this.curve=function(e,t,r){var n={};return n.q=e,n.r=new $(e),n.a=te(n,t),n.b=te(n,r),n.infinity=ue(n),n}(be(o.p),be(o.a),be(o.b));if(this.P=ue(u,te(u,be(o.x)),te(u,be(o.y))),this.q=be(o.q),e.public){var f=Ae(e.public);this.peer_Q=new ue(this.curve,te(this.curve,f[0]),te(this.curve,f[1]))}}if(this.curve){if((r=e.length||L(this.q))>508&&r<=512)r=512;else{if(!(r>254&&r<=256))throw new i.NotSupportedError("Support keys only 256 or 512 bits length");r=256}t=r}else{if((r=e.modulusLength||L(this.p))>1016&&r<=1024)r=1024;else{if(!(r>508&&r<=512))throw new i.NotSupportedError("Support keys only 512 or 1024 bits length");r=512}t=256}this.bitLength=t,this.keyLength=r,this.procreator=e.procreator;var h=e.hash;h&&(("string"==typeof h||h instanceof String)&&(h={name:h}),1994===e.version||2001===e.version?(h.version=1994,h.length=256,h.sBox=e.sBox||h.sBox):(h.version=2012,h.length=t),h.procreator=h.procreator||e.procreator,this.hash=new n.GostDigest(h)),e.ukm&&(this.ukm=e.ukm)};var n=r(40),i=r(19),a=r(25),o=ArrayBuffer,s={"S-256-TEST":{a:7,b:"0x5FBFF498AA938CE739B8E022FBAFEF40563F6E6A3472FC2A514C0CE9DAE23B7E",p:"0x8000000000000000000000000000000000000000000000000000000000000431",q:"0x8000000000000000000000000000000150FE8A1892976154C59CFC193ACCF5B3",x:2,y:"0x8E2A8A0E65147D4BD6316030E16D19C85C97F0A9CA267122B96ABBCEA7E8FC8"},"S-256-A":{a:"0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFD94",b:166,p:"0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFD97",q:"0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF6C611070995AD10045841B09B761B893",x:1,y:"0x8D91E471E0989CDA27DF505A453F2B7635294F2DDF23E3B122ACC99C9E9F1E14"},"S-256-B":{a:"0x8000000000000000000000000000000000000000000000000000000000000C96",b:"0x3E1AF419A269A5F866A7D3C25C3DF80AE979259373FF2B182F49D4CE7E1BBC8B",p:"0x8000000000000000000000000000000000000000000000000000000000000C99",q:"0x800000000000000000000000000000015F700CFFF1A624E5E497161BCC8A198F",x:1,y:"0x3FA8124359F96680B83D1C3EB2C070E5C545C9858D03ECFB744BF8D717717EFC"},"S-256-C":{a:"0x9B9F605F5A858107AB1EC85E6B41C8AACF846E86789051D37998F7B9022D7598",b:32858,p:"0x9B9F605F5A858107AB1EC85E6B41C8AACF846E86789051D37998F7B9022D759B",q:"0x9B9F605F5A858107AB1EC85E6B41C8AA582CA3511EDDFB74F02F3A6598980BB9",x:0,y:"0x41ECE55743711A8C3CBF3783CD08C0EE4D4DC440D4641A8F366E550DFDB3BB67"},"P-256":{p:"0xFFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF",a:"0xFFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFC",b:"0x5AC635D8AA3A93E7B3EBBD55769886BC651D06B0CC53B0F63BCE3C3E27D2604B",x:"0x6B17D1F2E12C4247F8BCE6E563A440F277037D812DEB33A0F4A13945D898C296",y:"0x4FE342E2FE1A7F9B8EE7EB4A7C0F9E162BCE33576B315ECECBB6406837BF51F5",q:"0xFFFFFFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632551"},"T-512-TEST":{a:7,b:"0x1CFF0806A31116DA29D8CFA54E57EB748BC5F377E49400FDD788B649ECA1AC4361834013B2AD7322480A89CA58E0CF74BC9E540C2ADD6897FAD0A3084F302ADC",p:"0x4531ACD1FE0023C7550D267B6B2FEE80922B14B2FFB90F04D4EB7C09B5D2D15DF1D852741AF4704A0458047E80E4546D35B8336FAC224DD81664BBF528BE6373",q:"0x4531ACD1FE0023C7550D267B6B2FEE80922B14B2FFB90F04D4EB7C09B5D2D15DA82F2D7ECB1DBAC719905C5EECC423F1D86E25EDBE23C595D644AAF187E6E6DF",x:"0x24D19CC64572EE30F396BF6EBBFD7A6C5213B3B3D7057CC825F91093A68CD762FD60611262CD838DC6B60AA7EEE804E28BC849977FAC33B4B530F1B120248A9A",y:"0x2BB312A43BD2CE6E0D020613C857ACDDCFBF061E91E5F2C3F32447C259F39B2C83AB156D77F1496BF7EB3351E1EE4E43DC1A18B91B24640B6DBB92CB1ADD371E"},"T-512-A":{p:"0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFDC7",a:"0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFDC4",b:"0xE8C2505DEDFC86DDC1BD0B2B6667F1DA34B82574761CB0E879BD081CFD0B6265EE3CB090F30D27614CB4574010DA90DD862EF9D4EBEE4761503190785A71C760",q:"0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF27E69532F48D89116FF22B8D4E0560609B4B38ABFAD2B85DCACDB1411F10B275",x:3,y:"0x7503CFE87A836AE3A61B8816E25450E6CE5E1C93ACF1ABC1778064FDCBEFA921DF1626BE4FD036E93D75E6A50E3A41E98028FE5FC235F5B889A589CB5215F2A4"},"T-512-B":{p:"0x8000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006F",a:"0x8000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006C",b:"0x687D1B459DC841457E3E06CF6F5E2517B97C7D614AF138BCBF85DC806C4B289F3E965D2DB1416D217F8B276FAD1AB69C50F78BEE1FA3106EFB8CCBC7C5140116",q:"0x800000000000000000000000000000000000000000000000000000000000000149A1EC142565A545ACFDB77BD9D40CFA8B996712101BEA0EC6346C54374F25BD",x:2,y:"0x1A8F7EDA389B094C2C071E3647A8940F3C123B697578C213BE6DD9E6C8EC7335DCB228FD1EDF4A39152CBCAAF8C0398828041055F94CEEEC7E21340780FE41BD"}};s["X-256-A"]=s["S-256-A"],s["X-256-B"]=s["S-256-C"],s["T-256-TEST"]=s["S-256-TEST"],s["T-256-A"]=s["S-256-A"],s["T-256-B"]=s["S-256-B"],s["T-256-C"]=s["S-256-C"];var c={"S-TEST":{modulusLength:512,p:"0xEE8172AE8996608FB69359B89EB82A69854510E2977A4D63BC97322CE5DC3386EA0A12B343E9190F23177539845839786BB0C345D165976EF2195EC9B1C379E3",q:"0x98915E7EC8265EDFCDA31E88F24809DDB064BDC7285DD50D7289F0AC6F49DD2D",a:"0x9e96031500c8774a869582d4afde2127afad2538b4b6270a6f7c8837b50d50f206755984a49e509304d648be2ab5aab18ebe2cd46ac3d8495b142aa6ce23e21c"},"S-A":{modulusLength:1024,p:"0xB4E25EFB018E3C8B87505E2A67553C5EDC56C2914B7E4F89D23F03F03377E70A2903489DD60E78418D3D851EDB5317C4871E40B04228C3B7902963C4B7D85D52B9AA88F2AFDBEB28DA8869D6DF846A1D98924E925561BD69300B9DDD05D247B5922D967CBB02671881C57D10E5EF72D3E6DAD4223DC82AA1F7D0294651A480DF",q:"0x972432A437178B30BD96195B773789AB2FFF15594B176DD175B63256EE5AF2CF",a:"0x8FD36731237654BBE41F5F1F8453E71CA414FFC22C25D915309E5D2E62A2A26C7111F3FC79568DAFA028042FE1A52A0489805C0DE9A1A469C844C7CABBEE625C3078888C1D85EEA883F1AD5BC4E6776E8E1A0750912DF64F79956499F1E182475B0B60E2632ADCD8CF94E9C54FD1F3B109D81F00BF2AB8CB862ADF7D40B9369A"},"S-B":{modulusLength:1024,p:"0xC6971FC57524B30C9018C5E621DE15499736854F56A6F8AEE65A7A404632B1BCF0349FFCAFCB0A103177971FC1612ADCDB8C8CC938C70225C8FD12AFF01B1D064E0AD6FDE6AB9159166CB9F2FC171D92F0CC7B6A6B2CD7FA342ACBE2C9315A42D576B1ECCE77A963157F3D0BD96A8EB0B0F3502AD238101B05116334F1E5B7AB",q:"0xB09D634C10899CD7D4C3A7657403E05810B07C61A688BAB2C37F475E308B0607",a:"0x3D26B467D94A3FFC9D71BF8DB8934084137264F3C2E9EB16DCA214B8BC7C872485336744934FD2EF5943F9ED0B745B90AA3EC8D70CDC91682478B664A2E1F8FB56CEF2972FEE7EDB084AF746419B854FAD02CC3E3646FF2E1A18DD4BEB3C44F7F2745588029649674546CC9187C207FB8F2CECE8E2293F68395C4704AF04BAB5"},"S-C":{modulusLength:1024,p:"0x9D88E6D7FE3313BD2E745C7CDD2AB9EE4AF3C8899E847DE74A33783EA68BC30588BA1F738C6AAF8AB350531F1854C3837CC3C860FFD7E2E106C3F63B3D8A4C034CE73942A6C3D585B599CF695ED7A3C4A93B2B947B7157BB1A1C043AB41EC8566C6145E938A611906DE0D32E562494569D7E999A0DDA5C879BDD91FE124DF1E9",q:"0xFADD197ABD19A1B4653EECF7ECA4D6A22B1F7F893B641F901641FBB555354FAF",a:"0x7447ED7156310599070B12609947A5C8C8A8625CF1CF252B407B331F93D639DDD1BA392656DECA992DD035354329A1E95A6E32D6F47882D960B8F10ACAFF796D13CD9611F853DAB6D2623483E46788708493937A1A29442598AEC2E0742022563440FE9C18740ECE6765AC05FAF024A64B026E7E408840819E962E7E5F401AE3"},"S-D":{modulusLength:1024,p:"0x80F102D32B0FD167D069C27A307ADAD2C466091904DBAA55D5B8CC7026F2F7A1919B890CB652C40E054E1E9306735B43D7B279EDDF9102001CD9E1A831FE8A163EED89AB07CF2ABE8242AC9DEDDDBF98D62CDDD1EA4F5F15D3A42A6677BDD293B24260C0F27C0F1D15948614D567B66FA902BAA11A69AE3BCEADBB83E399C9B5",q:"0xF0F544C418AAC234F683F033511B65C21651A6078BDA2D69BB9F732867502149",a:"0x6BCC0B4FADB3889C1E06ADD23CC09B8AB6ECDEDF73F04632595EE4250005D6AF5F5ADE44CB1E26E6263C672347CFA26F9E9393681E6B759733784CDE5DBD9A14A39369DFD99FA85CC0D10241C4010343F34A91393A706CF12677CBFA1F578D6B6CFBE8A1242CFCC94B3B653A476E145E3862C18CC3FED8257CFEF74CDB205BF1"},"X-A":{modulusLength:1024,p:"0xCA3B3F2EEE9FD46317D49595A9E7518E6C63D8F4EB4D22D10D28AF0B8839F079F8289E603B03530784B9BB5A1E76859E4850C670C7B71C0DF84CA3E0D6C177FE9F78A9D8433230A883CD82A2B2B5C7A3306980278570CDB79BF01074A69C9623348824B0C53791D53C6A78CAB69E1CFB28368611A397F50F541E16DB348DBE5F",q:"0xCAE4D85F80C147704B0CA48E85FB00A9057AA4ACC44668E17F1996D7152690D9",a:"0xBE27D652F2F1E339DA734211B85B06AE4DE236AA8FBEEB3F1ADCC52CD43853777E834A6A518138678A8ADBD3A55C70A7EAB1BA7A0719548677AAF4E609FFB47F6B9D7E45B0D06D83D7ADC53310ABD85783E7317F7EC73268B6A9C08D260B85D8485696CA39C17B17F044D1E050489036ABD381C5E6BF82BA352A1AFF136601AF"},"X-B":{modulusLength:1024,p:"0x9286DBDA91ECCFC3060AA5598318E2A639F5BA90A4CA656157B2673FB191CD0589EE05F4CEF1BD13508408271458C30851CE7A4EF534742BFB11F4743C8F787B11193BA304C0E6BCA25701BF88AF1CB9B8FD4711D89F88E32B37D95316541BF1E5DBB4989B3DF13659B88C0F97A3C1087B9F2D5317D557DCD4AFC6D0A754E279",q:"0xC966E9B3B8B7CDD82FF0F83AF87036C38F42238EC50A876CD390E43D67B6013F",a:"0x7E9C3096676F51E3B2F9884CF0AC2156779496F410E049CED7E53D8B7B5B366B1A6008E5196605A55E89C3190DABF80B9F1163C979FCD18328DAE5E9048811B370107BB7715F82091BB9DE0E33EE2FED6255474F8769FCE5EAFAEEF1CB5A32E0D5C6C2F0FC0B3447072947F5B4C387666993A333FC06568E534AD56D2338D729"},"X-C":{modulusLength:1024,p:"0xB194036ACE14139D36D64295AE6C50FC4B7D65D8B340711366CA93F383653908EE637BE428051D86612670AD7B402C09B820FA77D9DA29C8111A8496DA6C261A53ED252E4D8A69A20376E6ADDB3BDCD331749A491A184B8FDA6D84C31CF05F9119B5ED35246EA4562D85928BA1136A8D0E5A7E5C764BA8902029A1336C631A1D",q:"0x96120477DF0F3896628E6F4A88D83C93204C210FF262BCCB7DAE450355125259",a:"0x3F1817052BAA7598FE3E4F4FC5C5F616E122CFF9EBD89EF81DC7CE8BF56CC64B43586C80F1C4F56DD5718FDD76300BE336784259CA25AADE5A483F64C02A20CF4A10F9C189C433DEFE31D263E6C9764660A731ECCAECB74C8279303731E8CF69205BC73E5A70BDF93E5BB681DAB4EEB9C733CAAB2F673C475E0ECA921D29782E"}},u=28,f=(1<<u)-1,h=1<<u,l=Math.pow(2,52),d=52-u,p=2*u-52;function y(e,t,r,n,i,a,o){for(var s=16383&r,c=r>>14;--o>=0;){var u=16383&e[t],f=e[t++]>>14,h=c*u+f*s;a=((u=s*u+((16383&h)<<14)+n[i]+a)>>28)+(h>>14)+c*f,n[i++]=268435455&u}return a}function g(e){var t=new Array(Math.ceil(e));return t.s=0,t.t=0,t}function v(e,t){for(var r=e.t-1;r>=0;--r)t[r]=e[r];return t.t=e.t,t.s=e.s,t}function m(e){return v(e,g(e.t))}function b(e,t){return e.t=1,e.s=t<0?-1:0,t>0?e[0]=t:t<-1?e[0]=t+h:e.t=0,e}function w(e){var t=g(1);return b(t,e),t}var C=w(0),E=w(1),S=w(3);function A(e){for(var t=e.s&f;e.t>0&&e[e.t-1]===t;)--e.t;return e}function B(e,t,r){for(var n=0,i=0,a=Math.min(t.t,e.t);n<a;)i+=e[n]-t[n],r[n++]=i&f,i>>=u;if(t.t<e.t){for(i-=t.s;n<e.t;)i+=e[n],r[n++]=i&f,i>>=u;i+=e.s}else{for(i+=e.s;n<t.t;)i-=t[n],r[n++]=i&f,i>>=u;i-=t.s}return r.s=i<0?-1:0,i<-1?r[n++]=h+i:i>0&&(r[n++]=i),r.t=n,A(r)}function T(e,t){return B(e,t,g(e.t))}function I(e,t,r){for(var n=0,i=0,a=Math.min(t.t,e.t);n<a;)i+=e[n]+t[n],r[n++]=i&f,i>>=u;if(t.t<e.t){for(i+=t.s;n<e.t;)i+=e[n],r[n++]=i&f,i>>=u;i+=e.s}else{for(i+=e.s;n<t.t;)i+=t[n],r[n++]=i&f,i>>=u;i+=t.s}return r.s=i<0?-1:0,i>0?r[n++]=i:i<-1&&(r[n++]=h+i),r.t=n,A(r)}function k(e,t){return I(e,t,g(e.t))}function _(e,t){return B(C,e,t)}function R(e){return e.s<0?function(e){return _(e,g(e.t))}(e):e}function x(e,t){var r=e.s-t.s;if(0!==r)return r;var n=e.t;if(0!=(r=n-t.t))return e.s<0?-r:r;for(;--n>=0;)if(0!=(r=e[n]-t[n]))return r;return 0}function F(e){var t,r=1;return 0!=(t=e>>>16)&&(e=t,r+=16),0!=(t=e>>8)&&(e=t,r+=8),0!=(t=e>>4)&&(e=t,r+=4),0!=(t=e>>2)&&(e=t,r+=2),0!=(t=e>>1)&&(e=t,r+=1),r}function D(e,t,r){var n;for(n=e.t-1;n>=0;--n)r[n+t]=e[n];for(n=t-1;n>=0;--n)r[n]=0;return r.t=e.t+t,r.s=e.s,r}function P(e,t,r){for(var n=t;n<e.t;++n)r[n-t]=e[n];return r.t=Math.max(e.t-t,0),r.s=e.s,r}function U(e,t,r){var n,i=t%u,a=u-i,o=(1<<a)-1,s=Math.floor(t/u),c=e.s<<i&f;for(n=e.t-1;n>=0;--n)r[n+s+1]=e[n]>>a|c,c=(e[n]&o)<<i;for(n=s-1;n>=0;--n)r[n]=0;return r[s]=c,r.t=e.t+s+1,r.s=e.s,A(r)}function N(e,t,r){r.s=e.s;var n=Math.floor(t/u);if(!(n>=e.t)){var i=t%u,a=u-i,o=(1<<i)-1;r[0]=e[n]>>i;for(var s=n+1;s<e.t;++s)r[s-n-1]|=(e[s]&o)<<a,r[s-n]=e[s]>>i;return i>0&&(r[e.t-n-1]|=(e.s&o)<<a),r.t=e.t-n,A(r)}r.t=0}function L(e){return e.t<=0?0:u*(e.t-1)+F(e[e.t-1]^e.s&f)}function M(e,t,r){var n=R(e),i=R(t),a=n.t;for(r.t=a+i.t;--a>=0;)r[a]=0;for(a=0;a<i.t;++a)r[a+n.t]=y(n,0,i[a],r,a,0,n.t);return r.s=0,e.s!==t.s&&B(C,r,r),A(r)}function O(e,t){return M(e,t,g(e.t+t.t))}function K(e,t){for(var r=R(e),n=t.t=2*r.t;--n>=0;)t[n]=0;for(n=0;n<r.t-1;++n){var i=y(r,n,r[n],t,2*n,0,1);(t[n+r.t]+=y(r,n+1,2*r[n],t,2*n+1,i,r.t-n-1))>=r.DV&&(t[n+r.t]-=r.DV,t[n+r.t+1]=1)}return t.t>0&&(t[t.t-1]+=y(r,n,r[n],t,2*n,0,1)),t.s=0,A(t)}function G(e,t,r,n){var i=R(t);if(i.t<=0)throw new OperationError("Division by zero");var a=R(e);if(a.t<i.t)return r&&b(r,0),n&&v(e,n),r;n||(n=g(t.t));var o=g(t.t),s=e.s,c=t.s,h=u-F(i[i.t-1]);h>0?(U(i,h,o),U(a,h,n)):(v(i,o),v(a,n));var m=o.t,w=o[m-1];if(0===w)return r;var S=w*(1<<d)+(m>1?o[m-2]>>p:0),T=l/S,I=(1<<d)/S,k=1<<p,_=n.t,L=_-m,M=r||g(Math.max(e.t-t.t,1));for(D(o,L,M),x(n,M)>=0&&(n[n.t++]=1,B(n,M,n)),D(E,m,M),B(M,o,o);o.t<m;)o[o.t++]=0;for(;--L>=0;){var O=n[--_]===w?f:Math.floor(n[_]*T+(n[_-1]+k)*I);if((n[_]+=y(o,0,O,n,L,0,m))<O)for(D(o,L,M),B(n,M,n);n[_]<--O;)B(n,M,n)}return r&&(P(n,m,r),s!==c&&B(C,r,r)),n.t=m,A(n),h>0&&N(n,h,n),s<0&&B(C,n,n),r}function j(e,t,r){return G(R(e),t,null,r),e.s<0&&x(r,C)>0&&B(t,r,r),r}function V(e,t){return j(e,t,g(t.t))}function H(e){return 0===(e.t>0?1&e[0]:e.s)}function q(e){return function(e,t){return 0===x(e,t)}(e,C)}function z(e){return e.s<0?-1:e.t<=0||1===e.t&&e[0]<=0?0:1}function W(e,t){var r=H(t);if(H(e)&&r||0===z(t))return C;for(var n=m(t),i=m(e),a=w(1),o=w(0),s=w(0),c=w(1);0!==z(n);){for(;H(n);)N(n,1,n),r?(H(a)&&H(o)||(I(a,e,a),B(o,t,o)),N(a,1,a)):H(o)||B(o,t,o),N(o,1,o);for(;H(i);)N(i,1,i),r?(H(s)&&H(c)||(I(s,e,s),B(c,t,c)),N(s,1,s)):H(c)||B(c,t,c),N(c,1,c);x(n,i)>=0?(B(n,i,n),r&&B(a,s,a),B(o,c,o)):(B(i,n,i),r&&B(s,a,s),B(c,o,c))}return 0!==x(i,E)?C:x(c,t)>=0?T(c,t):z(c)<0?(I(c,t,c),z(c)<0?k(c,t):c):c}function X(e,t){var r=Math.floor(t/u);return r>=e.t?0!==e.s:0!=(e[r]&1<<t%u)}function Y(e,t){for(var r in t)e.prototype[r]=t[r]}var Q=function(e){this.m=e};Y(Q,{convert:function(e){return e.s<0||x(e,this.m)>=0?V(e,this.m):e},revert:function(e){return e},reduce:function(e){j(e,this.m,e)},sqrTo:function(e,t){K(e,t),this.reduce(t)},mulTo:function(e,t,r){M(e,t,r),this.reduce(r)}});var Z=function(e){this.m=e,this.mp=function(e){if(e.t<1)return 0;var t=e[0];if(0==(1&t))return 0;var r=3&t;return(r=(r=(r=(r=r*(2-(15&t)*r)&15)*(2-(255&t)*r)&255)*(2-((65535&t)*r&65535))&65535)*(2-t*r%h)%h)>0?h-r:-r}(e),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<u-15)-1,this.mt2=2*e.t};function J(e,t,r){if(0!==t){for(;e.t<=r;)e[e.t++]=0;for(e[r]+=t;e[r]>=h;)e[r]-=h,++r>=e.t&&(e[e.t++]=0),++e[r]}}function $(e){var t,r;this.r2=g(2*e.t),this.q3=g(2*e.t),D(E,2*e.t,this.r2),this.mu=G(t=this.r2,r=e,g(Math.max(t.t-r.t,1)),null),this.m=e}function ee(e,t,r){var n,i,a=L(t),o=w(1);if(a<=0)return o;n=a<18?1:a<48?3:a<144?4:a<768?5:6,i=a<8?new Q(r):H(r)?new $(r):new Z(r);var s=new Array,c=3,f=n-1,h=(1<<n)-1;if(s[1]=i.convert(e),n>1){var l=g(2*r.t);for(i.sqrTo(s[1],l);c<=h;)s[c]=g(2*r.t),i.mulTo(l,s[c-2],s[c]),c+=2}var d,p,y=t.t-1,m=!0,b=g(2*r.t);for(a=F(t[y])-1;y>=0;){for(a>=f?d=t[y]>>a-f&h:(d=(t[y]&(1<<a+1)-1)<<f-a,y>0&&(d|=t[y-1]>>u+a-f)),c=n;0==(1&d);)d>>=1,--c;if((a-=c)<0&&(a+=u,--y),m)v(s[d],o),m=!1;else{for(;c>1;)i.sqrTo(o,b),i.sqrTo(b,o),c-=2;c>0?i.sqrTo(o,b):(p=o,o=b,b=p),i.mulTo(b,s[d],o)}for(;y>=0&&0==(t[y]&1<<a);)i.sqrTo(o,b),p=o,o=b,b=p,--a<0&&(a=u-1,--y)}return i.revert(o)}function te(e,t){return e.r.reduce(t),t.q=e.q,t.r=e.r,t}function re(e,t){return t.q=e.q,t.r=e.r,t}function ne(e,t){var r=k(e,t);return x(r,e.q)>0&&B(r,e.q,r),re(e,r)}function ie(e,t){var r=T(e,t);return r.s<0&&I(e.q,r,r),re(e,r)}function ae(e,t){return te(e,O(e,t))}function oe(e){return te(e,function(e){return K(e,g(2*e.t))}(e))}function se(e,t){return te(e,(n=t,i=g((r=e).t),n<0?N(r,-n,i):U(r,n,i),i));var r,n,i}function ce(e){return re(e,W(e,e.q))}function ue(e,t,r,n){return{curve:e,x:t,y:r,z:n||te(e,E)}}function fe(e){return e.zinv||(e.zinv=ce(e.z)),ae(e.x,e.zinv)}function he(e){return e.zinv||(e.zinv=ce(e.z)),ae(e.y,e.zinv)}function le(e){return!e.x&&!e.y||q(e.z)&&!q(e.y)}function de(e){return e.curve.infinity}function pe(e,t){if(le(e))return t;if(le(t))return e;var r=ie(ae(t.y,e.z),ae(e.y,t.z)),n=ie(ae(t.x,e.z),ae(e.x,t.z));if(q(n))return q(r)?ye(e):de(e);var i=e.x,a=e.y,o=oe(n),s=ae(o,n),c=ae(i,o),u=ae(oe(r),e.z),f=ae(ie(ae(ie(u,se(c,1)),t.z),s),n),h=ne(ae(ie(ie(ae(ae(c,S),r),ae(a,s)),ae(u,r)),t.z),ae(r,s)),l=ae(ae(s,e.z),t.z);return ue(e.curve,f,h,l)}function ye(e){if(le(e))return e;if(0===z(e.y))return de(e);var t=e.x,r=e.y,n=ae(r,e.z),i=ae(n,r),a=e.curve.a,o=ae(oe(t),S);q(a)||(o=ne(o,ae(oe(e.z),a)));var s=ae(se(ie(oe(o),ae(se(t,3),i)),1),n),c=ie(ae(se(ie(ae(ae(o,S),t),se(i,1)),2),i),ae(oe(o),o)),u=se(ae(oe(n),n),3);return ue(e.curve,s,c,u)}function ge(e,t){if(le(e))return e;if(0===z(t))return de(e);var r,n=t,i=O(n,S),a=function(e){return ue(e.curve,e.x,function(e){return re(e,T(e.q,e))}(e.y),e.z)}(e),o=e;for(r=L(i)-2;r>0;--r){o=ye(o);var s=X(i,r);s!==X(n,r)&&(o=pe(o,s?e:a))}return o}function ve(e){var t=new Uint8Array(e),r=g(8*t.length/u);r.t=0,r.s=0;for(var n=0,i=0,a=t.length;i<a;i++){var o=t[i];0===n?r[r.t++]=o:n+8>u?(r[r.t-1]|=(o&(1<<u-n)-1)<<n,r[r.t++]=o>>u-n):r[r.t-1]|=o<<n,(n+=8)>=u&&(n-=u)}return A(r)}function me(e,t){var r,n=!1,i=[],a=e.t,o=u-a*u%8;if(a-- >0)for(o<u&&(r=e[a]>>o)>0&&(n=!0,i.push(r));a>=0;)o<8?(r=(e[a]&(1<<o)-1)<<8-o,r|=e[--a]>>(o+=u-8)):(r=e[a]>>(o-=8)&255,o<=0&&(o+=u,--a)),r>0&&(n=!0),n&&i.push(r);var s=new Uint8Array(t?t/8:i.length);return n&&s.set(i.reverse()),s.buffer}function be(e){if("number"==typeof e||e instanceof Number)return w(e);(e=e.replace(/[^\-A-Fa-f0-9]/g,""))||(e="0");for(var t=g(e.length/7),r=e.length,n=!1,i=0;--r>=0;)if("-"!==e.charAt(r)){var a=parseInt(e.charAt(r),16);n=!1,0===i?t[t.t++]=a:i+4>u?(t[t.t-1]|=(a&(1<<u-i)-1)<<i,t[t.t++]=a>>u-i):t[t.t-1]|=a<<i,(i+=4)>=u&&(i-=u)}else n=!0;return n&&B(C,t,t),A(t)}function we(e){if(e.s<0)return"-"+we(_(e,g(e.t)));var t,r=!1,n="",i=e.t,a=u-i*u%4;if(i-- >0)for(a<u&&(t=e[i]>>a)>0&&(r=!0,n=t.toString(16));i>=0;)a<4?(t=(e[i]&(1<<a)-1)<<4-a,t|=e[--i]>>(a+=u-4)):(t=e[i]>>(a-=4)&15,a<=0&&(a+=u,--i)),t>0&&(r=!0),r&&(n+=t.toString(16));return"0x"+(r?n:"0")}function Ce(e){for(var t=new Uint8Array(e),r=new Uint8Array(t.length),n=0,i=t.length;n<i;n++)r[i-n-1]=t[n];return r.buffer}function Ee(e){return this.hash&&(e=this.hash.digest(e)),("SC"===this.procreator||"VN"===this.procreator&&2012===this.hash.version)&&(e=Ce(e)),e}function Se(e){if(e instanceof o)return e;if(e&&e.buffer&&e.buffer instanceof o)return 0===e.byteOffset&&e.byteLength===e.buffer.byteLength?e.buffer:new Uint8Array(new Uint8Array(e,e.byteOffset,e.byteLength)).buffer;throw new i.DataError("CryptoOperationData or CryptoOperationDataView required")}function Ae(e){var t=Se(e);if(t.byteLength%2>0)throw new i.DataError("Buffer length must be even");var r=t.byteLength/2;return[ve(new Uint8Array(t,0,r)),ve(new Uint8Array(t,r,r))]}function Be(e,t,r){var n=me(e,r),i=me(t,r),a=new Uint8Array(n.byteLength+i.byteLength);return a.set(new Uint8Array(n)),a.set(new Uint8Array(i),n.byteLength),a.buffer}function Te(e,t){var r=Se(t),n=ve(Ee.call(this,r)),i=this.q,o=V(ve(Se(e)),i),s=V(n,i);q(s)&&(s=E);for(var c,u=C;q(u);){for(var f=C;q(f);){var h=V(ve(this.ukm||(0,a.getSeed)(this.bitLength)),i);if(this.curve)f=V(fe(ge(this.P,h)),i);else{var l=this.p;f=V(ee(this.a,h,l),i)}}u=V(k(O(f,o),O(h,s)),i)}return"SC"===this.procreator?c={r:we(f),s:we(u)}:(c=Be(f,u,this.bitLength),"CP"!==this.procreator&&"VN"!==this.procreator||(c=Ce(c))),c}function Ie(e,t,r){var n,i,a=this.q;if("SC"===this.procreator)n=be(t.r),i=be(t.s);else{"CP"!==this.procreator&&"VN"!==this.procreator||(t=Ce(t));var o=Ae(t);i=o[1],n=o[0]}if(x(n,a)>=0||x(i,a)>=0)return!1;var s=Se(r),c=V(ve(Ee.call(this,s)),a);0===q(c)&&(c=E);var u=W(c,a),f=V(O(i,u),a),h=T(a,V(O(n,u),a));if(this.curve)var l=Ae(e),d=this.curve,p=function(e,t,r,n){var i;i=L(t)>L(n)?L(t)-1:L(n)-1;for(var a=de(e),o=pe(e,r);i>=0;)a=ye(a),X(t,i)?a=X(n,i)?pe(a,o):pe(a,e):X(n,i)&&(a=pe(a,r)),--i;return a}(this.P,f,new ue(d,te(d,l[0]),m=te(d,l[1])),h),y=V(fe(p),a);else{var g=this.p,v=this.a,m=ve(e);y=V(V(O(ee(v,f,g),ee(m,h,g)),g),a)}return 0===x(y,n)}function ke(){var e=this.curve;if(e){for(var t=e.infinity;le(t);){var r=C;if(this.ukm)r=ve(this.ukm);else for(;q(r);)r=V(ve((0,a.getSeed)(this.bitLength)),this.q);var n=fe(t=ge(this.P,r)),o=he(t)}return{privateKey:me(r,this.bitLength),publicKey:Be(n,o,this.bitLength)}}throw new i.NotSupportedError("Key generation for GOST R 34.10-94 not supported")}function _e(){if(this.curve){for(var e=C;q(e);)e=V(ve((0,a.getSeed)(this.bitLength)),this.q);return me(e,this.bitLength)}throw new i.NotSupportedError("Key generation for GOST R 34.10-94 not supported")}function Re(e,t){if(this.curve){var r=this.q,n=V(ve(Se(t)),r),a=V(ve(Se(e)),r);return me("VN"===this.procreator?V(O(n,a),r):V(O(n,W(a,r)),r))}throw new i.NotSupportedError("Key wrapping GOST R 34.10-94 not supported")}function xe(e,t){if(this.curve){var r=this.q,n=V(ve(Se(t)),r),a=V(ve(Se(e)),r);return me("VN"===this.procreator?V(O(n,W(a,r)),r):V(O(n,a),r))}throw new i.NotSupportedError("Key wrapping GOST R 34.10-94 not supported")}function Fe(e){var t,r=ve(this.ukm),n=this.q,i=V(ve(Se(e)),n);if(this.curve){var a=ge(this.peer_Q,V(O(r,i),n));t=Be(fe(a),he(a),this.bitLength)}else{var o=this.p;this.a,t=me(ee(this.peer_y,i,o))}return Ee.call(this,t)}function De(e,t){if(t<8||t>this.bitLength||t%8>0)throw new i.DataError("Length must be no more than "+this.bitLength+" bits and multiple of 8");var r=t/8,n=Fe.call(this,e),a=new Uint8Array(r);return a.set(new Uint8Array(n,0,r)),a.buffer}function Pe(e){var t=Fe.call(this,e),r=new Uint8Array(32);return r.set(new Uint8Array(t,0,32)),r.buffer}Y(Z,{convert:function(e){var t=g(e.t);return D(R(e),this.m.t,t),G(t,this.m,null,t),e.s<0&&x(t,C)>0&&B(this.m,t,t),t},revert:function(e){var t=g(e.t);return v(e,t),this.reduce(t),t},reduce:function(e){for(;e.t<=this.mt2;)e[e.t++]=0;for(var t=0;t<this.m.t;++t){var r=32767&e[t],n=r*this.mpl+((r*this.mph+(e[t]>>15)*this.mpl&this.um)<<15)&f;for(e[r=t+this.m.t]+=y(this.m,0,n,e,t,0,this.m.t);e[r]>=h;)e[r]-=h,e[++r]++}A(e),P(e,this.m.t,e),x(e,this.m)>=0&&B(e,this.m,e)},sqrTo:function(e,t){K(e,t),this.reduce(t)},mulTo:function(e,t,r){M(e,t,r),this.reduce(r)}}),Y($,{convert:function(e){if(e.s<0||e.t>2*this.m.t)return V(e,this.m);if(x(e,this.m)<0)return e;var t=g(e.t);return v(e,t),this.reduce(t),t},revert:function(e){return e},reduce:function(e){for(P(e,this.m.t-1,this.r2),e.t>this.m.t+1&&(e.t=this.m.t+1,A(e)),function(e,t,r,n){--r;var i=n.t=e.t+t.t-r;for(n.s=0;--i>=0;)n[i]=0;for(i=Math.max(r-e.t,0);i<t.t;++i)n[e.t+i-r]=y(e,r-i,t[i],n,0,0,e.t+i-r);A(n),P(n,1,n)}(this.mu,this.r2,this.m.t+1,this.q3),function(e,t,r,n){var i,a=Math.min(e.t+t.t,r);for(n.s=0,n.t=a;a>0;)n[--a]=0;for(i=n.t-e.t;a<i;++a)n[a+e.t]=y(e,0,t[a],n,a,0,e.t);for(i=Math.min(t.t,r);a<i;++a)y(e,0,t[a],n,a,0,r-a);A(n)}(this.m,this.q3,this.m.t+1,this.r2);x(e,this.r2)<0;)J(e,1,this.m.t+1);for(B(e,this.r2,e);x(e,this.m)>=0;)B(e,this.m,e)},sqrTo:function(e,t){K(e,t),this.reduce(t)},mulTo:function(e,t,r){M(e,t,r),this.reduce(r)}})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.gostEngine=void 0;var n=r(41),i=r(40),a=r(81),o=r(19),s={execute:function(e,t,r){var n=function(e,t){if(!t)throw new(SyntaxError||Error)("Algorithm not defined");if(!t.name)throw new(SyntaxError||Error)("Algorithm name not defined");var r=t.name,n=t.mode;if("GOST 28147"!==r&&"GOST R 34.12"!==r&&"RC2"!==r||"generateKey"!==e&&("MAC"!==n||"sign"!==e&&"verify"!==e)&&("KW"!==n&&"MASK"!==n||"wrapKey"!==e&&"unwrapKey"!==e)&&(n&&"ES"!==n||"encrypt"!==e&&"decrypt"!==e)){if("GOST R 34.11"!==r&&"SHA"!==r||"digest"!==e&&("HMAC"!==n||"sign"!==e&&"verify"!==e&&"generateKey"!==e)&&("KDF"!==n&&"PBKDF2"!==n&&"PFXKDF"!==n&&"CPKDF"!==n||"deriveKey"!==e&&"deriveBits"!==e&&"generateKey"!==e)){if("GOST R 34.10"!==r||"generateKey"!==e&&(n&&"SIGN"!==n||"sign"!==e&&"verify"!==e)&&("MASK"!==n||"wrapKey"!==e&&"unwrapKey"!==e)&&("DH"!==n||"deriveKey"!==e&&"deriveBits"!==e))throw new o.NotSupportedError("Algorithm "+r+"-"+n+" is not valid for "+e);return"GostSign"}return"GostDigest"}return"GostCipher"}(t,e),i=this["get"+n](e);return i[t].apply(i,r)},getGostCipher:function(e){return new n.GostCipher(e)},getGostDigest:function(e){return new i.GostDigest(e)},getGostSign:function(e){return new a.GostSign(e)}};t.gostEngine=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.gostSubtleInstance=void 0,t.SubtleCrypto=E;var n=r(82),i=r(79),a=r(19),o=r(77);function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var f=function(e){function t(){return s(this,t),c(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return u(t,Error),t}(),h=function(e){function t(){return s(this,t),c(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return u(t,Error),t}(),l=(0,i.getCryptoModule)();function d(e,t){("string"==typeof e||e instanceof String)&&(e={name:e});var r=e.name;if(!r)throw new SyntaxError("Algorithm name not defined");var n=(n=r.split("/"))[0].split("-").concat(n.slice(1)),i={};if(r=n[0].replace(/[\.\s]/g,""),n=n.slice(1),r.indexOf("28147")>=0)i={name:"GOST 28147",version:1989,mode:(e.mode||("sign"===t||"verify"===t?"MAC":"wrapKey"===t||"unwrapKey"===t?"KW":"ES")).toUpperCase(),length:e.length||64};else if(r.indexOf("3412")>=0)i={name:"GOST R 34.12",version:2015,mode:(e.mode||("sign"===t||"verify"===t?"MAC":"wrapKey"===t||"unwrapKey"===t?"KW":"ES")).toUpperCase(),length:e.length||64};else if(r.indexOf("3411")>=0)i={name:"GOST R 34.11",version:2012,mode:(e.mode||("deriveKey"===t||"deriveBits"===t?"KDF":"sign"===t||"verify"===t?"HMAC":"HASH")).toUpperCase(),length:e.length||256};else if(r.indexOf("3410")>=0)i={name:"GOST R 34.10",version:2012,mode:(e.mode||("deriveKey"===t||"deriveBits"===t?"DH":"SIGN")).toUpperCase(),length:e.length||256};else if(r.indexOf("SHA")>=0)i={name:"SHA",version:160===(e.length||160)?1:2,mode:(e.mode||("deriveKey"===t||"deriveBits"===t?"KDF":"sign"===t||"verify"===t?"HMAC":"HASH")).toUpperCase(),length:e.length||160};else if(r.indexOf("RC2")>=0)i={name:"RC2",version:1,mode:(e.mode||("sign"===t||"verify"===t?"MAC":"wrapKey"===t||"unwrapKey"===t?"KW":"ES")).toUpperCase(),length:e.length||32};else if(r.indexOf("PBKDF2")>=0)(i=d(e.hash,"digest")).mode="PBKDF2";else if(r.indexOf("PFXKDF")>=0)(i=d(e.hash,"digest")).mode="PFXKDF";else if(r.indexOf("CPKDF")>=0)(i=d(e.hash,"digest")).mode="CPKDF";else{if(!(r.indexOf("HMAC")>=0))throw new a.NotSupportedError("Algorithm not supported");(i=d(e.hash,"digest")).mode="HMAC"}switch(n.forEach((function(e){if(e=e.toUpperCase(),/^[0-9]+$/.test(e))if(["8","16","32"].indexOf(e)>=0||"128"===i.length&&"64"===e)if("ES"===i.mode)i.shiftBits=parseInt(e);else{if("MAC"!==i.mode)throw new a.NotSupportedError("Algorithm "+i.name+" mode "+e+" not supported");i.macLength=parseInt(e)}else if(["89","94","01","12","15","1989","1994","2001","2012","2015"].indexOf(e)>=0){var t=parseInt(e);t=t<1900?t<80?2e3+t:1900+t:t,i.version=t}else["1"].indexOf(e)>=0&&"SHA"===i.name?(i.version=1,i.length=160):["256","384","512"].indexOf(e)>=0&&"SHA"===i.name?(i.version=2,i.length=parseInt(e)):["40","128"].indexOf(e)>=0&&"RC2"===i.name?(i.version=1,i.length=parseInt(e)):["64","128","256","512"].indexOf(e)>=0?i.length=parseInt(e):["1000","2000"].indexOf(e)>=0&&(i.iterations=parseInt(e));else if(["E-TEST","E-A","E-B","E-C","E-D","E-SC","E-Z","D-TEST","D-A","D-SC"].indexOf(e)>=0)i.sBox=e;else if(["S-TEST","S-A","S-B","S-C","S-D","X-A","X-B","X-C"].indexOf(e)>=0)i.namedParam=e;else if(["S-256-TEST","S-256-A","S-256-B","S-256-C","P-256","T-512-TEST","T-512-A","T-512-B","X-256-A","X-256-B","T-256-TEST","T-256-A","T-256-B","S-256-B","T-256-C","S-256-C"].indexOf(e)>=0)i.namedCurve=e;else if(["SC","CP","VN"].indexOf(e)>=0)i.procreator=e;else if("GOST 28147"===i.name||"GOST R 34.12"===i.name||"RC2"===i.name)if(["ES","MAC","KW","MASK"].indexOf(e)>=0)i.mode=e;else if(["ECB","CFB","OFB","CTR","CBC"].indexOf(e)>=0)i.mode="ES",i.block=e;else if(["CPKW","NOKW","SCKW"].indexOf(e)>=0)i.mode="KW",i.keyWrapping=e.replace("KW","");else if(["ZEROPADDING","PKCS5PADDING","NOPADDING","RANDOMPADDING","BITPADDING"].indexOf(e)>=0)i.padding=e.replace("PADDING","");else{if(!(["NOKM","CPKM"].indexOf(e)>=0))throw new a.NotSupportedError("Algorithm "+i.name+" mode "+e+" not supported");i.keyMeshing=e.replace("KM","")}else if("GOST R 34.11"===i.name||"SHA"===i.name){if(!(["HASH","KDF","HMAC","PBKDF2","PFXKDF","CPKDF"].indexOf(e)>=0))throw new a.NotSupportedError("Algorithm "+i.name+" mode "+e+" not supported");i.mode=e}else if("GOST R 34.10"===i.name){var r=e.replace(/[\.\s]/g,"");if(r.indexOf("GOST")>=0&&r.indexOf("3411")>=0)i.hash=e;else{if(!["SIGN","DH","MASK"].indexOf(e))throw new a.NotSupportedError("Algorithm "+i.name+" mode "+e+" not supported");i.mode=e}}})),i.procreator=e.procreator||i.procreator||"CP",i.name){case"GOST R 34.10":i.keySize=i.length/(1994===i.version?4:8);break;case"GOST R 34.11":case"GOST 28147":case"GOST R 34.12":i.keySize=32;break;case"RC2":i.keySize=Math.ceil(i.length/8);break;case"SHA":i.keySize=i.length/8}switch("ES"===i.mode&&(e.block&&(i.block=e.block),i.block&&(i.block=i.block.toUpperCase()),e.padding&&(i.padding=e.padding),i.padding&&(i.padding=i.padding.toUpperCase()),e.shiftBits&&(i.shiftBits=e.shiftBits),e.keyMeshing&&(i.keyMeshing=e.keyMeshing),i.keyMeshing&&(i.keyMeshing=i.keyMeshing.toUpperCase()),"importKey"!==t&&"generateKey"!==t&&(i.block=i.block||"ECB",i.padding=i.padding||("CBC"===i.block||"ECB"===i.block?"ZERO":"NO"),"CFB"!==i.block&&"OFB"!==i.block||(i.shiftBits=i.shiftBits||i.length),i.keyMeshing=i.keyMeshing||"NO")),"KW"===i.mode&&(e.keyWrapping&&(i.keyWrapping=e.keyWrapping),i.keyWrapping&&(i.keyWrapping=i.keyWrapping.toUpperCase()),"importKey"!==t&&"generateKey"!==t&&(i.keyWrapping=i.keyWrapping||"NO")),["sBox","namedParam","namedCurve","curve","param","modulusLength"].forEach((function(t){e[t]&&(i[t]=e[t])})),"importKey"!==t&&"generateKey"!==t&&("GOST 28147"===i.name?i.sBox=i.sBox||("SC"===i.procreator?"E-SC":"E-A"):"GOST R 34.12"===i.name&&64===i.length?i.sBox="E-Z":"GOST R 34.11"===i.name&&1994===i.version?i.sBox=i.sBox||("SC"===i.procreator?"D-SC":"D-A"):"GOST R 34.10"===i.name&&1994===i.version?i.namedParam=i.namedParam||("DH"===i.mode?"X-A":"S-A"):("GOST R 34.10"===i.name&&2001===i.version||"GOST R 34.10"===i.name&&2012===i.version)&&(i.namedCurve=i.namedCurve||(256===i.length?"SC"===i.procreator?"P-256":"DH"===i.mode?"X-256-A":"S-256-A":"T-512-A"===i.mode))),i.mode){case"DH":e.ukm&&(i.ukm=e.ukm),e.public&&(i.public=e.public);break;case"SIGN":case"KW":e.ukm&&(i.ukm=e.ukm);break;case"ES":case"MAC":e.iv&&(i.iv=e.iv);break;case"KDF":e.label&&(i.label=e.label),e.contex&&(i.context=e.contex);break;case"PBKDF2":case"PFXKDF":e.salt&&(i.salt=e.salt),e.iterations&&(i.iterations=e.iterations),e.diversifier&&(i.diversifier=e.diversifier);break;case"CPKDF":e.salt&&(i.salt=e.salt),e.iterations&&(i.iterations=e.iterations)}if(t&&("ES"!==i.mode&&"SIGN"!==i.mode&&"MAC"!==i.mode&&"HMAC"!==i.mode&&"KW"!==i.mode&&"DH"!==i.mode&&"MASK"!==i.mode&&"generateKey"===t||"ES"!==i.mode&&("encrypt"===t||"decrypt"===t)||"SIGN"!==i.mode&&"MAC"!==i.mode&&"HMAC"!==i.mode&&("sign"===t||"verify"===t)||"HASH"!==i.mode&&"digest"===t||"KW"!==i.mode&&"MASK"!==i.mode&&("wrapKey"===t||"unwrapKey"===t)||"DH"!==i.mode&&"PBKDF2"!==i.mode&&"PFXKDF"!==i.mode&&"CPKDF"!==i.mode&&"KDF"!==i.mode&&("deriveKey"===t||"deriveBits"===t)))throw new a.NotSupportedError("Algorithm mode "+i.mode+" not valid for method "+t);return e.hash&&(i.hash=e.hash),i.hash&&(("string"==typeof i.hash||i.hash instanceof String)&&i.procreator&&(i.hash=i.hash+"/"+i.procreator),i.hash=d(i.hash,"digest")),e.id&&(i.id=e.id),i}function p(e){if(!l||!l.subtle||!e)return!1;var t="string"==typeof e||e instanceof String?t=e:e.name;return!!t&&(((t=t.toUpperCase()).indexOf("KDF")>=0||t.indexOf("HMAC")>=0)&&e.hash?p(e.hash):-1===t.indexOf("GOST")&&-1===t.indexOf("SHA-1")&&-1===t.indexOf("RC2")&&-1===t.indexOf("?DES"))}function y(e,t){if(!e.algorithm)throw new SyntaxError("Key algorithm not defined");if(!e.algorithm.name)throw new SyntaxError("Key algorithm name not defined");var r=e.algorithm.name,n="GOST 28147"===r||"GOST R 34.12"===r||"RC2"===r,i="GOST R 34.11"===r||"SHA"===r,o="GOST R 34.10"===r;if(!n&&!o&&!i)throw new a.NotSupportedError("Key algorithm "+r+" is unsupproted");if(!e.type)throw new SyntaxError("Key type not defined");if((n||i)&&"secret"!==e.type||o&&"public"!==e.type&&"private"!==e.type)throw new a.DataError("Key type "+e.type+" is not valid for algorithm "+r);if(!e.usages||!e.usages.indexOf)throw new SyntaxError("Key usages not defined");for(var s=0,c=e.usages.length;s<c;s++){var u=e.usages[s];if(("encrypt"===u||"decrypt"===u)&&"secret"!==e.type||"sign"===u&&"public"===e.type||"verify"===u&&"private"===e.type)throw new f("Key type "+e.type+" is not valid for "+u)}if(t&&-1===e.usages.indexOf(t))throw new h("Key usages is not contain method "+t);if(!e.buffer)throw new SyntaxError("Key buffer is not defined");var l=8*e.buffer.byteLength,d=8*e.algorithm.keySize;if("secret"===e.type&&l!==(d||256)&&(e.usages.indexOf("encrypt")>=0||e.usages.indexOf("decrypt")>=0)||"private"===e.type&&256!==l&&512!==l||"public"===e.type&&512!==l&&1024!==l)throw new SyntaxError("Key buffer has wrong size "+l+" bit")}function g(e,t,r){if(y(r,e),t){var n;switch(t.mode){case"ES":n=["sBox","keyMeshing","padding","block"];break;case"SIGN":n=["namedCurve","namedParam","sBox","curve","param","modulusLength"];break;case"MAC":n=["sBox"];break;case"KW":n=["keyWrapping","ukm"];break;case"DH":n=["namedCurve","namedParam","sBox","ukm","curve","param","modulusLength"];break;case"KDF":n=["context","label"];break;case"PBKDF2":n=["sBox","iterations","salt"];break;case"PFXKDF":n=["sBox","iterations","salt","diversifier"];break;case"CPKDF":n=["sBox","salt"]}n&&n.forEach((function(e){r.algorithm[e]&&(t[e]=r.algorithm[e])}))}return r.buffer}function v(e,t,r,n,i){var a={type:i||("GOST R 34.10"===e.name?"private":"secret"),extractable:t||"false",algorithm:e,usages:r||[],buffer:n};return y(a),a}function m(e){e instanceof C&&(e=new Uint8Array(e));for(var t=new Uint8Array(e.length),r=0,n=e.length;r<n;r++)t[n-r-1]=e[r];return t.buffer}function b(e,t,r){return new Promise((function(i,a){try{i(n.gostEngine.execute(e,t,r))}catch(e){a(e)}}))}function w(e){try{e()}catch(e){}}var C=ArrayBuffer;function E(){}E.prototype.encrypt=function(e,t,r){return new Promise(w).then((function(){return p(e)?l.subtle.encrypt(e,t,r):b(e=d(e,"encrypt"),"encrypt",[g("encrypt",e,t),r])}))},E.prototype.decrypt=function(e,t,r){return new Promise(w).then((function(){return p(e)?l.subtle.decrypt(e,t,r):b(e=d(e,"decrypt"),"decrypt",[g("decrypt",e,t),r])}))},E.prototype.sign=function(e,t,r){return new Promise(w).then((function(){if(p(e))return l.subtle.sign(e,t,r);var n=b(e=d(e,"sign"),"sign",[g("sign",e,t),r]).then((function(t){return"SC"===e.procreator&&"SIGN"===e.mode&&(t=o.gostASN1Instance.GostSignature.encode(t)),t}));return n}))},E.prototype.verify=function(e,t,r,n){return new Promise(w).then((function(){if(p(e))return l.subtle.verify(e,t,r,n);if("SC"===(e=d(e,"verify")).procreator&&"SIGN"===e.mode){var i=o.gostASN1Instance.GostSignature.decode(r);r={r:i.r,s:i.s}}return b(e,"verify",[g("verify",e,t),r,n])}))},E.prototype.digest=function(e,t){return new Promise(w).then((function(){return p(e)?l.subtle.digest(e,t):b(e=d(e,"digest"),"digest",[t])}))},E.prototype.generateKey=function(e,t,r){return new Promise(w).then((function(){if(p(e))return l.subtle.generateKey(e,t,r);var n=e.privateKey,i=e.publicKey;return e=d(e,"generateKey"),n=n?d(n,"generateKey"):e,i=i?d(i,"generateKey"):e,b(e,"generateKey",[]).then((function(a){return a.publicKey&&a.privateKey?function(e,t,r,n,i,a){if(!n||!n.indexOf)throw new SyntaxError("Key usages not defined");var o=n.filter((function(e){return"sign"!==e})),s=n.filter((function(e){return"verify"!==e}));return{publicKey:v(e,r,o,i,"public"),privateKey:v(t,r,s,a,"private")}}(i,n,t,r,a.publicKey,a.privateKey):v(e,t,r,a)}))}))},E.prototype.deriveKey=function(e,t,r,n,i){return new Promise(w).then((function(){return p(e)?l.subtle.deriveKey(e,t,r,n,i):(e=d(e,"deriveKey"),r=d(r,"generateKey"),e.keySize=r.keySize,e.public&&(e.public.algorithm=d(e.public.algorithm),e.public=g("deriveKey",e,e.public)),b(e,"deriveKey",[g("deriveKey",e,t)]).then((function(e){return v(r,n,i,e)})))}))},E.prototype.deriveBits=function(e,t,r){return new Promise(w).then((function(){return p(e)?l.subtle.deriveBits(e,t,r):((e=d(e,"deriveBits")).public&&(e.public=g("deriveBits",e,e.public)),b(e,"deriveBits",[g("deriveBits",e,t),r]))}))},E.prototype.importKey=function(e,t,r,n,i){var s;return new Promise(w).then((function(){if(p(r))return l.subtle.importKey(e,t,r,n,i);if("raw"===e){if(r=d(r,"importKey"),i&&i.indexOf){var c=r.name.toUpperCase().replace(/[\.\s]/g,"");c.indexOf("3410")>=0&&i.indexOf("sign")>=0?s="private":c.indexOf("3410")>=0&&i.indexOf("verify")>=0&&(s="public")}return t}var u;if("pkcs8"===e)u=o.gostASN1Instance.GostPrivateKeyInfo.decode(t).object;else{if("spki"!==e)throw new a.NotSupportedError("Key format not supported");u=o.gostASN1Instance.GostSubjectPublicKeyInfo.decode(t).object}if(r=d(u.algorithm,"importKey"),s=u.type,!1!==n&&(n=n||u.extractable),i){for(var f=0;f<i.length;f++)if(u.usages.indexOf(i[f])<0)throw(0,a.DataError)("Key usage not valid for this key")}else i=u.usages;var h=u.buffer,y=r.keySize,g=h.byteLength;if("public"===s||y===g)return h;if(g%y>0)throw new a.DataError("Invalid key size");r.mode="MASK",r.procreator="VN";var v=[];for(f=y;f<g;f+=y)v.push(function(e){return function(t){return b(r,"unwrapKey",[e,t]).then((function(e){var t=v.pop();return t?t(e):(delete r.mode,e)}))}}(new Uint8Array(h,f,y)));return v.pop()(new Uint8Array(h,0,y))})).then((function(e){return v(r,n,i,e,s)}))},E.prototype.exportKey=function(e,t){return new Promise(w).then((function(){if(t&&p(t.algorithm))return l.subtle.exportKey(e,t);if(!t.extractable)throw new h("Key not extractable");var r=g(null,null,t);if("raw"===e)return r;if("pkcs8"===e&&t.algorithm&&t.algorithm.id){if("VN"===t.algorithm.procreator){var n,i=t.algorithm;return i.mode="MASK",b(i,"generateKey").then((function(e){return b(i,"wrapKey",[n=e,t.buffer])})).then((function(e){delete i.mode;var t=new Uint8Array(e.byteLength+n.byteLength);t.set(new Uint8Array(e,0,e.byteLength)),t.set(new Uint8Array(n,0,n.byteLength),e.byteLength);var r=t.buffer;return r.enclosed=!0,o.gostASN1Instance.GostPrivateKeyInfo.encode({algorithm:i,buffer:r})}))}return o.gostASN1Instance.GostPrivateKeyInfo.encode(t)}if("spki"===e&&t.algorithm&&t.algorithm.id)return o.gostASN1Instance.GostSubjectPublicKeyInfo.encode(t);throw new a.NotSupportedError("Key format not supported")}))},E.prototype.wrapKey=function(e,t,r,n){return new Promise(w).then((function(){if(p(n))return l.subtle.wrapKey(e,t,r,n);n=d(n,"wrapKey");var i=g(null,null,t);return"SC"===n.procreator&&"private"===t.type&&(i=m(i)),b(n,"wrapKey",[g("wrapKey",n,r),i]).then((function(t){if("raw"===e)return t;throw new a.NotSupportedError("Key format not supported")}))}))},E.prototype.unwrapKey=function(e,t,r,n,i,o,s){return new Promise(w).then((function(){if(p(n))return l.subtle.unwrapKey(e,t,r,n,i,o,s);if(n=d(n,"unwrapKey"),i=d(i,"importKey"),"raw"!==e)throw new a.NotSupportedError("Key format not supported");return b(n,"unwrapKey",[g("unwrapKey",n,r),t]).then((function(e){var t;if(i&&i.name){var r=i.name.toUpperCase().replace(/[\.\s]/g,"");r.indexOf("3410")>=0&&s.indexOf("sign")>=0?t="private":r.indexOf("3410")>=0&&s.indexOf("verify")>=0&&(t="public")}return"SC"===n.procreator&&"private"===t&&(e=m(e)),v(i,o,s,e,t)}))}))},t.gostSubtleInstance=new E},function(e,t,r){"use strict";(function(e,n){function i(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var a=r(1),o=r(12),s=a.Buffer,c=a.kMaxLength,u=e.crypto||e.msCrypto,f=Math.pow(2,32)-1;function h(e,t){if("number"!=typeof e||e!=e)throw new TypeError("offset must be a number");if(e>f||e<0)throw new TypeError("offset must be a uint32");if(e>c||e>t)throw new RangeError("offset out of range")}function l(e,t,r){if("number"!=typeof e||e!=e)throw new TypeError("size must be a number");if(e>f||e<0)throw new TypeError("size must be a uint32");if(e+t>r||e>c)throw new RangeError("buffer too small")}function d(e,t,r,i){if(n.browser){var a=e.buffer,s=new Uint8Array(a,t,r);return u.getRandomValues(s),i?void n.nextTick((function(){i(null,e)})):e}if(!i)return o(r).copy(e,t),e;o(r,(function(r,n){if(r)return i(r);n.copy(e,t),i(null,e)}))}u&&u.getRandomValues||!n.browser?(t.randomFill=function(t,r,n,i){if(!(s.isBuffer(t)||t instanceof e.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof r)i=r,r=0,n=t.length;else if("function"==typeof n)i=n,n=t.length-r;else if("function"!=typeof i)throw new TypeError('"cb" argument must be a function');return h(r,t.length),l(n,r,t.length),d(t,r,n,i)},t.randomFillSync=function(t,r,n){if(void 0===r&&(r=0),!(s.isBuffer(t)||t instanceof e.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return h(r,t.length),void 0===n&&(n=t.length-r),l(n,r,t.length),d(t,r,n)}):(t.randomFill=i,t.randomFillSync=i)}).call(this,r(7),r(9))},function(e,t,r){(function(t){var n=r(20),i=r(44),a=r(43),o=r(3),s=r(27),c=r(18),u=r(42);e.exports=function(e,r,f){var h;h=e.padding?e.padding:f?1:4;var l,d=n(e),p=d.modulus.byteLength();if(r.length>p||new o(r).cmp(d.modulus)>=0)throw new Error("decryption error");l=f?u(new o(r),d):s(r,d);var y=new t(p-l.length);if(y.fill(0),l=t.concat([y,l],p),4===h)return function(e,r){e.modulus;var n=e.modulus.byteLength(),o=(r.length,c("sha1").update(new t("")).digest()),s=o.length;if(0!==r[0])throw new Error("decryption error");var u=r.slice(1,s+1),f=r.slice(s+1),h=a(u,i(f,s)),l=a(f,i(h,n-s-1));if(function(e,r){e=new t(e),r=new t(r);var n=0,i=e.length;e.length!==r.length&&(n++,i=Math.min(e.length,r.length));for(var a=-1;++a<i;)n+=e[a]^r[a];return n}(o,l.slice(0,s)))throw new Error("decryption error");for(var d=s;0===l[d];)d++;if(1!==l[d++])throw new Error("decryption error");return l.slice(d)}(d,l);if(1===h)return function(e,t,r){for(var n=t.slice(0,2),i=2,a=0;0!==t[i++];)if(i>=t.length){a++;break}var o=t.slice(2,i-1);if(t.slice(i-1,i),("0002"!==n.toString("hex")&&!r||"0001"!==n.toString("hex")&&r)&&a++,o.length<8&&a++,a)throw new Error("decryption error");return t.slice(i)}(0,l,f);if(3===h)return l;throw new Error("unknown padding")}}).call(this,r(2).Buffer)},function(e,t,r){(function(t){var n=r(20),i=r(12),a=r(18),o=r(44),s=r(43),c=r(3),u=r(42),f=r(27);e.exports=function(e,r,h){var l;l=e.padding?e.padding:h?1:4;var d,p=n(e);if(4===l)d=function(e,r){var n=e.modulus.byteLength(),u=r.length,f=a("sha1").update(new t("")).digest(),h=f.length,l=2*h;if(u>n-l-2)throw new Error("message too long");var d=new t(n-u-l-2);d.fill(0);var p=n-h-1,y=i(h),g=s(t.concat([f,d,new t([1]),r],p),o(y,p)),v=s(y,o(g,h));return new c(t.concat([new t([0]),v,g],n))}(p,r);else if(1===l)d=function(e,r,n){var a,o=r.length,s=e.modulus.byteLength();if(o>s-11)throw new Error("message too long");return n?(a=new t(s-o-3)).fill(255):a=function(e,r){for(var n,a=new t(e),o=0,s=i(2*e),c=0;o<e;)c===s.length&&(s=i(2*e),c=0),(n=s[c++])&&(a[o++]=n);return a}(s-o-3),new c(t.concat([new t([0,n?1:2]),a,new t([0]),r],s))}(p,r,h);else{if(3!==l)throw new Error("unknown padding");if((d=new c(r)).cmp(p.modulus)>=0)throw new Error("data too long for modulus")}return h?f(d,p):u(d,p)}}).call(this,r(2).Buffer)},function(e,t,r){t.publicEncrypt=r(86),t.privateDecrypt=r(85),t.privateEncrypt=function(e,r){return t.publicEncrypt(e,r,!0)},t.publicDecrypt=function(e,r){return t.privateDecrypt(e,r,!0)}},function(e,t,r){(function(t){var n=r(4),i=r(3);e.exports=function(e){return new o(e)};var a={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function o(e){this.curveType=a[e],this.curveType||(this.curveType={name:e}),this.curve=new n.ec(this.curveType.name),this.keys=void 0}function s(e,r,n){Array.isArray(e)||(e=e.toArray());var i=new t(e);if(n&&i.length<n){var a=new t(n-i.length);a.fill(0),i=t.concat([a,i])}return r?i.toString(r):i}a.p224=a.secp224r1,a.p256=a.secp256r1=a.prime256v1,a.p192=a.secp192r1=a.prime192v1,a.p384=a.secp384r1,a.p521=a.secp521r1,o.prototype.generateKeys=function(e,t){return this.keys=this.curve.genKeyPair(),this.getPublicKey(e,t)},o.prototype.computeSecret=function(e,r,n){return r=r||"utf8",t.isBuffer(e)||(e=new t(e,r)),s(this.curve.keyFromPublic(e).getPublic().mul(this.keys.getPrivate()).getX(),n,this.curveType.byteLength)},o.prototype.getPublicKey=function(e,t){var r=this.keys.getPublic("compressed"===t,!0);return"hybrid"===t&&(r[r.length-1]%2?r[0]=7:r[0]=6),s(r,e)},o.prototype.getPrivateKey=function(e){return s(this.keys.getPrivate(),e)},o.prototype.setPublicKey=function(e,r){return r=r||"utf8",t.isBuffer(e)||(e=new t(e,r)),this.keys._importPublic(e),this},o.prototype.setPrivateKey=function(e,r){r=r||"utf8",t.isBuffer(e)||(e=new t(e,r));var n=new i(e);return n=n.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(n),this}}).call(this,r(2).Buffer)},function(e,t,r){(function(t){var n=r(3),i=r(4).ec,a=r(20),o=r(45);function s(e,t){if(e.cmpn(0)<=0)throw new Error("invalid sig");if(e.cmp(t)>=t)throw new Error("invalid sig")}e.exports=function(e,r,c,u,f){var h=a(c);if("ec"===h.type){if("ecdsa"!==u&&"ecdsa/rsa"!==u)throw new Error("wrong public key type");return function(e,t,r){var n=o[r.data.algorithm.curve.join(".")];if(!n)throw new Error("unknown curve "+r.data.algorithm.curve.join("."));var a=new i(n),s=r.data.subjectPrivateKey.data;return a.verify(t,e,s)}(e,r,h)}if("dsa"===h.type){if("dsa"!==u)throw new Error("wrong public key type");return function(e,t,r){var i=r.data.p,o=r.data.q,c=r.data.g,u=r.data.pub_key,f=a.signature.decode(e,"der"),h=f.s,l=f.r;s(h,o),s(l,o);var d=n.mont(i),p=h.invm(o);return 0===c.toRed(d).redPow(new n(t).mul(p).mod(o)).fromRed().mul(u.toRed(d).redPow(l.mul(p).mod(o)).fromRed()).mod(i).mod(o).cmp(l)}(e,r,h)}if("rsa"!==u&&"ecdsa/rsa"!==u)throw new Error("wrong public key type");r=t.concat([f,r]);for(var l=h.modulus.byteLength(),d=[1],p=0;r.length+d.length+2<l;)d.push(255),p++;d.push(0);for(var y=-1;++y<r.length;)d.push(r[y]);d=new t(d);var g=n.mont(h.modulus);e=(e=new n(e).toRed(g)).redPow(new n(h.publicExponent)),e=new t(e.fromRed().toArray());var v=p<8?1:0;for(l=Math.min(e.length,d.length),e.length!==d.length&&(v=1),y=-1;++y<l;)v|=e[y]^d[y];return 0===v}}).call(this,r(2).Buffer)},function(e,t,r){(function(t){var n=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r\+\/\=]+)[\n\r]+/m,i=/^-----BEGIN ((?:.* KEY)|CERTIFICATE)-----/m,a=/^-----BEGIN ((?:.* KEY)|CERTIFICATE)-----([0-9A-z\n\r\+\/\=]+)-----END \1-----$/m,o=r(22),s=r(29);e.exports=function(e,r){var c,u=e.toString(),f=u.match(n);if(f){var h="aes"+f[1],l=new t(f[2],"hex"),d=new t(f[3].replace(/[\r\n]/g,""),"base64"),p=o(r,l.slice(0,8),parseInt(f[1],10)).key,y=[],g=s.createDecipheriv(h,p,l);y.push(g.update(d)),y.push(g.final()),c=t.concat(y)}else{var v=u.match(a);c=new t(v[2].replace(/[\r\n]/g,""),"base64")}return{tag:u.match(i)[1],data:c}}}).call(this,r(2).Buffer)},function(e){e.exports={"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}},function(e,t,r){"use strict";var n=r(14),i=n.define("Time",(function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})})),a=n.define("AttributeTypeValue",(function(){this.seq().obj(this.key("type").objid(),this.key("value").any())})),o=n.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional())})),s=n.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(o),this.key("subjectPublicKey").bitstr())})),c=n.define("RelativeDistinguishedName",(function(){this.setof(a)})),u=n.define("RDNSequence",(function(){this.seqof(c)})),f=n.define("Name",(function(){this.choice({rdnSequence:this.use(u)})})),h=n.define("Validity",(function(){this.seq().obj(this.key("notBefore").use(i),this.key("notAfter").use(i))})),l=n.define("Extension",(function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())})),d=n.define("TBSCertificate",(function(){this.seq().obj(this.key("version").explicit(0).int(),this.key("serialNumber").int(),this.key("signature").use(o),this.key("issuer").use(f),this.key("validity").use(h),this.key("subject").use(f),this.key("subjectPublicKeyInfo").use(s),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(l).optional())})),p=n.define("X509Certificate",(function(){this.seq().obj(this.key("tbsCertificate").use(d),this.key("signatureAlgorithm").use(o),this.key("signatureValue").bitstr())}));e.exports=p},function(e,t,r){var n=r(0),i=r(46);function a(e){i.call(this,e),this.enc="pem"}n(a,i),e.exports=a,a.prototype.encode=function(e,t){for(var r=i.prototype.encode.call(this,e).toString("base64"),n=["-----BEGIN "+t.label+"-----"],a=0;a<r.length;a+=64)n.push(r.slice(a,a+64));return n.push("-----END "+t.label+"-----"),n.join("\n")}},function(e,t,r){var n=t;n.der=r(46),n.pem=r(93)},function(e,t,r){var n=r(0),i=r(2).Buffer,a=r(47);function o(e){a.call(this,e),this.enc="pem"}n(o,a),e.exports=o,o.prototype.decode=function(e,t){for(var r=e.toString().split(/[\r\n]+/g),n=t.label.toUpperCase(),o=/^-----(BEGIN|END) ([^-]+)-----$/,s=-1,c=-1,u=0;u<r.length;u++){var f=r[u].match(o);if(null!==f&&f[2]===n){if(-1!==s){if("END"!==f[1])break;c=u;break}if("BEGIN"!==f[1])break;s=u}}if(-1===s||-1===c)throw new Error("PEM section not found for: "+n);var h=r.slice(s+1,c).join("");h.replace(/[^a-z0-9\+\/=]+/gi,"");var l=new i(h,"base64");return a.prototype.decode.call(this,l,t)}},function(e,t,r){var n=t;n.der=r(47),n.pem=r(95)},function(e,t,r){var n=r(48);t.tagClass={0:"universal",1:"application",2:"context",3:"private"},t.tagClassByName=n._reverse(t.tagClass),t.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},t.tagByName=n._reverse(t.tag)},function(e,t,r){var n=r(13).Reporter,i=r(13).EncoderBuffer,a=r(13).DecoderBuffer,o=r(5),s=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],c=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(s);function u(e,t){var r={};this._baseState=r,r.enc=e,r.parent=t||null,r.children=null,r.tag=null,r.args=null,r.reverseArgs=null,r.choice=null,r.optional=!1,r.any=!1,r.obj=!1,r.use=null,r.useDecoder=null,r.key=null,r.default=null,r.explicit=null,r.implicit=null,r.contains=null,r.parent||(r.children=[],this._wrap())}e.exports=u;var f=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];u.prototype.clone=function(){var e=this._baseState,t={};f.forEach((function(r){t[r]=e[r]}));var r=new this.constructor(t.parent);return r._baseState=t,r},u.prototype._wrap=function(){var e=this._baseState;c.forEach((function(t){this[t]=function(){var r=new this.constructor(this);return e.children.push(r),r[t].apply(r,arguments)}}),this)},u.prototype._init=function(e){var t=this._baseState;o(null===t.parent),e.call(this),t.children=t.children.filter((function(e){return e._baseState.parent===this}),this),o.equal(t.children.length,1,"Root node can have only one child")},u.prototype._useArgs=function(e){var t=this._baseState,r=e.filter((function(e){return e instanceof this.constructor}),this);e=e.filter((function(e){return!(e instanceof this.constructor)}),this),0!==r.length&&(o(null===t.children),t.children=r,r.forEach((function(e){e._baseState.parent=this}),this)),0!==e.length&&(o(null===t.args),t.args=e,t.reverseArgs=e.map((function(e){if("object"!=typeof e||e.constructor!==Object)return e;var t={};return Object.keys(e).forEach((function(r){r==(0|r)&&(r|=0);var n=e[r];t[n]=r})),t})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(e){u.prototype[e]=function(){var t=this._baseState;throw new Error(e+" not implemented for encoding: "+t.enc)}})),s.forEach((function(e){u.prototype[e]=function(){var t=this._baseState,r=Array.prototype.slice.call(arguments);return o(null===t.tag),t.tag=e,this._useArgs(r),this}})),u.prototype.use=function(e){o(e);var t=this._baseState;return o(null===t.use),t.use=e,this},u.prototype.optional=function(){return this._baseState.optional=!0,this},u.prototype.def=function(e){var t=this._baseState;return o(null===t.default),t.default=e,t.optional=!0,this},u.prototype.explicit=function(e){var t=this._baseState;return o(null===t.explicit&&null===t.implicit),t.explicit=e,this},u.prototype.implicit=function(e){var t=this._baseState;return o(null===t.explicit&&null===t.implicit),t.implicit=e,this},u.prototype.obj=function(){var e=this._baseState,t=Array.prototype.slice.call(arguments);return e.obj=!0,0!==t.length&&this._useArgs(t),this},u.prototype.key=function(e){var t=this._baseState;return o(null===t.key),t.key=e,this},u.prototype.any=function(){return this._baseState.any=!0,this},u.prototype.choice=function(e){var t=this._baseState;return o(null===t.choice),t.choice=e,this._useArgs(Object.keys(e).map((function(t){return e[t]}))),this},u.prototype.contains=function(e){var t=this._baseState;return o(null===t.use),t.contains=e,this},u.prototype._decode=function(e,t){var r=this._baseState;if(null===r.parent)return e.wrapResult(r.children[0]._decode(e,t));var n,i=r.default,o=!0,s=null;if(null!==r.key&&(s=e.enterKey(r.key)),r.optional){var c=null;if(null!==r.explicit?c=r.explicit:null!==r.implicit?c=r.implicit:null!==r.tag&&(c=r.tag),null!==c||r.any){if(o=this._peekTag(e,c,r.any),e.isError(o))return o}else{var u=e.save();try{null===r.choice?this._decodeGeneric(r.tag,e,t):this._decodeChoice(e,t),o=!0}catch(e){o=!1}e.restore(u)}}if(r.obj&&o&&(n=e.enterObject()),o){if(null!==r.explicit){var f=this._decodeTag(e,r.explicit);if(e.isError(f))return f;e=f}var h=e.offset;if(null===r.use&&null===r.choice){r.any&&(u=e.save());var l=this._decodeTag(e,null!==r.implicit?r.implicit:r.tag,r.any);if(e.isError(l))return l;r.any?i=e.raw(u):e=l}if(t&&t.track&&null!==r.tag&&t.track(e.path(),h,e.length,"tagged"),t&&t.track&&null!==r.tag&&t.track(e.path(),e.offset,e.length,"content"),r.any||(i=null===r.choice?this._decodeGeneric(r.tag,e,t):this._decodeChoice(e,t)),e.isError(i))return i;if(r.any||null!==r.choice||null===r.children||r.children.forEach((function(r){r._decode(e,t)})),r.contains&&("octstr"===r.tag||"bitstr"===r.tag)){var d=new a(i);i=this._getUse(r.contains,e._reporterState.obj)._decode(d,t)}}return r.obj&&o&&(i=e.leaveObject(n)),null===r.key||null===i&&!0!==o?null!==s&&e.exitKey(s):e.leaveKey(s,r.key,i),i},u.prototype._decodeGeneric=function(e,t,r){var n=this._baseState;return"seq"===e||"set"===e?null:"seqof"===e||"setof"===e?this._decodeList(t,e,n.args[0],r):/str$/.test(e)?this._decodeStr(t,e,r):"objid"===e&&n.args?this._decodeObjid(t,n.args[0],n.args[1],r):"objid"===e?this._decodeObjid(t,null,null,r):"gentime"===e||"utctime"===e?this._decodeTime(t,e,r):"null_"===e?this._decodeNull(t,r):"bool"===e?this._decodeBool(t,r):"objDesc"===e?this._decodeStr(t,e,r):"int"===e||"enum"===e?this._decodeInt(t,n.args&&n.args[0],r):null!==n.use?this._getUse(n.use,t._reporterState.obj)._decode(t,r):t.error("unknown tag: "+e)},u.prototype._getUse=function(e,t){var r=this._baseState;return r.useDecoder=this._use(e,t),o(null===r.useDecoder._baseState.parent),r.useDecoder=r.useDecoder._baseState.children[0],r.implicit!==r.useDecoder._baseState.implicit&&(r.useDecoder=r.useDecoder.clone(),r.useDecoder._baseState.implicit=r.implicit),r.useDecoder},u.prototype._decodeChoice=function(e,t){var r=this._baseState,n=null,i=!1;return Object.keys(r.choice).some((function(a){var o=e.save(),s=r.choice[a];try{var c=s._decode(e,t);if(e.isError(c))return!1;n={type:a,value:c},i=!0}catch(t){return e.restore(o),!1}return!0}),this),i?n:e.error("Choice not matched")},u.prototype._createEncoderBuffer=function(e){return new i(e,this.reporter)},u.prototype._encode=function(e,t,r){var n=this._baseState;if(null===n.default||n.default!==e){var i=this._encodeValue(e,t,r);if(void 0!==i&&!this._skipDefault(i,t,r))return i}},u.prototype._encodeValue=function(e,t,r){var i=this._baseState;if(null===i.parent)return i.children[0]._encode(e,t||new n);var a=null;if(this.reporter=t,i.optional&&void 0===e){if(null===i.default)return;e=i.default}var o=null,s=!1;if(i.any)a=this._createEncoderBuffer(e);else if(i.choice)a=this._encodeChoice(e,t);else if(i.contains)o=this._getUse(i.contains,r)._encode(e,t),s=!0;else if(i.children)o=i.children.map((function(r){if("null_"===r._baseState.tag)return r._encode(null,t,e);if(null===r._baseState.key)return t.error("Child should have a key");var n=t.enterKey(r._baseState.key);if("object"!=typeof e)return t.error("Child expected, but input is not object");var i=r._encode(e[r._baseState.key],t,e);return t.leaveKey(n),i}),this).filter((function(e){return e})),o=this._createEncoderBuffer(o);else if("seqof"===i.tag||"setof"===i.tag){if(!i.args||1!==i.args.length)return t.error("Too many args for : "+i.tag);if(!Array.isArray(e))return t.error("seqof/setof, but data is not Array");var c=this.clone();c._baseState.implicit=null,o=this._createEncoderBuffer(e.map((function(r){var n=this._baseState;return this._getUse(n.args[0],e)._encode(r,t)}),c))}else null!==i.use?a=this._getUse(i.use,r)._encode(e,t):(o=this._encodePrimitive(i.tag,e),s=!0);if(!i.any&&null===i.choice){var u=null!==i.implicit?i.implicit:i.tag,f=null===i.implicit?"universal":"context";null===u?null===i.use&&t.error("Tag could be omitted only for .use()"):null===i.use&&(a=this._encodeComposite(u,s,f,o))}return null!==i.explicit&&(a=this._encodeComposite(i.explicit,!1,"context",a)),a},u.prototype._encodeChoice=function(e,t){var r=this._baseState,n=r.choice[e.type];return n||o(!1,e.type+" not found in "+JSON.stringify(Object.keys(r.choice))),n._encode(e.value,t)},u.prototype._encodePrimitive=function(e,t){var r=this._baseState;if(/str$/.test(e))return this._encodeStr(t,e);if("objid"===e&&r.args)return this._encodeObjid(t,r.reverseArgs[0],r.args[1]);if("objid"===e)return this._encodeObjid(t,null,null);if("gentime"===e||"utctime"===e)return this._encodeTime(t,e);if("null_"===e)return this._encodeNull();if("int"===e||"enum"===e)return this._encodeInt(t,r.args&&r.reverseArgs[0]);if("bool"===e)return this._encodeBool(t);if("objDesc"===e)return this._encodeStr(t,e);throw new Error("Unsupported tag: "+e)},u.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)},u.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(e)}},function(e,t,r){var n=r(0);function i(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}function a(e,t){this.path=e,this.rethrow(t)}t.Reporter=i,i.prototype.isError=function(e){return e instanceof a},i.prototype.save=function(){var e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}},i.prototype.restore=function(e){var t=this._reporterState;t.obj=e.obj,t.path=t.path.slice(0,e.pathLen)},i.prototype.enterKey=function(e){return this._reporterState.path.push(e)},i.prototype.exitKey=function(e){var t=this._reporterState;t.path=t.path.slice(0,e-1)},i.prototype.leaveKey=function(e,t,r){var n=this._reporterState;this.exitKey(e),null!==n.obj&&(n.obj[t]=r)},i.prototype.path=function(){return this._reporterState.path.join("/")},i.prototype.enterObject=function(){var e=this._reporterState,t=e.obj;return e.obj={},t},i.prototype.leaveObject=function(e){var t=this._reporterState,r=t.obj;return t.obj=e,r},i.prototype.error=function(e){var t,r=this._reporterState,n=e instanceof a;if(t=n?e:new a(r.path.map((function(e){return"["+JSON.stringify(e)+"]"})).join(""),e.message||e,e.stack),!r.options.partial)throw t;return n||r.errors.push(t),t},i.prototype.wrapResult=function(e){var t=this._reporterState;return t.options.partial?{result:this.isError(e)?null:e,errors:t.errors}:e},n(a,Error),a.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,a),!this.stack)try{throw new Error(this.message)}catch(e){this.stack=e.stack}return this}},function(e,t){var r=[].indexOf;e.exports=function(e,t){if(r)return e.indexOf(t);for(var n=0;n<e.length;++n)if(e[n]===t)return n;return-1}},function(module,exports,__nested_webpack_require_938008__){var indexOf=__nested_webpack_require_938008__(100),Object_keys=function(e){if(Object.keys)return Object.keys(e);var t=[];for(var r in e)t.push(r);return t},forEach=function(e,t){if(e.forEach)return e.forEach(t);for(var r=0;r<e.length;r++)t(e[r],r,e)},defineProp=function(){try{return Object.defineProperty({},"_",{}),function(e,t,r){Object.defineProperty(e,t,{writable:!0,enumerable:!1,configurable:!0,value:r})}}catch(e){return function(e,t,r){e[t]=r}}}(),globals=["Array","Boolean","Date","Error","EvalError","Function","Infinity","JSON","Math","NaN","Number","Object","RangeError","ReferenceError","RegExp","String","SyntaxError","TypeError","URIError","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","eval","isFinite","isNaN","parseFloat","parseInt","undefined","unescape"];function Context(){}Context.prototype={};var Script=exports.Script=function(e){if(!(this instanceof Script))return new Script(e);this.code=e};Script.prototype.runInContext=function(e){if(!(e instanceof Context))throw new TypeError("needs a 'context' argument.");var t=document.createElement("iframe");t.style||(t.style={}),t.style.display="none",document.body.appendChild(t);var r=t.contentWindow,n=r.eval,i=r.execScript;!n&&i&&(i.call(r,"null"),n=r.eval),forEach(Object_keys(e),(function(t){r[t]=e[t]})),forEach(globals,(function(t){e[t]&&(r[t]=e[t])}));var a=Object_keys(r),o=n.call(r,this.code);return forEach(Object_keys(r),(function(t){(t in e||-1===indexOf(a,t))&&(e[t]=r[t])})),forEach(globals,(function(t){t in e||defineProp(e,t,r[t])})),document.body.removeChild(t),o},Script.prototype.runInThisContext=function(){return eval(this.code)},Script.prototype.runInNewContext=function(e){var t=Script.createContext(e),r=this.runInContext(t);return forEach(Object_keys(t),(function(r){e[r]=t[r]})),r},forEach(Object_keys(Script.prototype),(function(e){exports[e]=Script[e]=function(t){var r=Script(t);return r[e].apply(r,[].slice.call(arguments,1))}})),exports.createScript=function(e){return exports.Script(e)},exports.createContext=Script.createContext=function(e){var t=new Context;return"object"==typeof e&&forEach(Object_keys(e),(function(r){t[r]=e[r]})),t}},function(e,t,r){var n=r(14),i=r(0);function a(e,t){this.name=e,this.body=t,this.decoders={},this.encoders={}}t.define=function(e,t){return new a(e,t)},a.prototype._createNamed=function(e){var t;try{t=r(101).runInThisContext("(function "+this.name+"(entity) {\n this._initNamed(entity);\n})")}catch(e){t=function(e){this._initNamed(e)}}return i(t,e),t.prototype._initNamed=function(t){e.call(this,t)},new t(this)},a.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(n.decoders[e])),this.decoders[e]},a.prototype.decode=function(e,t,r){return this._getDecoder(t).decode(e,r)},a.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(n.encoders[e])),this.encoders[e]},a.prototype.encode=function(e,t,r){return this._getEncoder(t).encode(e,r)}},function(e,t,r){"use strict";var n=r(14);t.certificate=r(92);var i=n.define("RSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())}));t.RSAPrivateKey=i;var a=n.define("RSAPublicKey",(function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())}));t.RSAPublicKey=a;var o=n.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(s),this.key("subjectPublicKey").bitstr())}));t.PublicKey=o;var s=n.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())})),c=n.define("PrivateKeyInfo",(function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(s),this.key("subjectPrivateKey").octstr())}));t.PrivateKey=c;var u=n.define("EncryptedPrivateKeyInfo",(function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())}));t.EncryptedPrivateKey=u;var f=n.define("DSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())}));t.DSAPrivateKey=f,t.DSAparam=n.define("DSAparam",(function(){this.int()}));var h=n.define("ECPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(l),this.key("publicKey").optional().explicit(1).bitstr())}));t.ECPrivateKey=h;var l=n.define("ECParameters",(function(){this.choice({namedCurve:this.objid()})}));t.signature=n.define("signature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())}))},function(e,t,r){"use strict";var n=r(3),i=r(4).utils,a=i.assert,o=i.cachedProperty,s=i.parseBytes;function c(e,t){this.eddsa=e,"object"!=typeof t&&(t=s(t)),Array.isArray(t)&&(t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),a(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof n&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}o(c,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),o(c,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),o(c,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),o(c,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),c.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},c.prototype.toHex=function(){return i.encode(this.toBytes(),"hex").toUpperCase()},e.exports=c},function(e,t,r){"use strict";var n=r(4).utils,i=n.assert,a=n.parseBytes,o=n.cachedProperty;function s(e,t){this.eddsa=e,this._secret=a(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=a(t.pub)}s.fromPublic=function(e,t){return t instanceof s?t:new s(e,{pub:t})},s.fromSecret=function(e,t){return t instanceof s?t:new s(e,{secret:t})},s.prototype.secret=function(){return this._secret},o(s,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),o(s,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),o(s,"privBytes",(function(){var e=this.eddsa,t=this.hash(),r=e.encodingLength-1,n=t.slice(0,e.encodingLength);return n[0]&=248,n[r]&=127,n[r]|=64,n})),o(s,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),o(s,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),o(s,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),s.prototype.sign=function(e){return i(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},s.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},s.prototype.getSecret=function(e){return i(this._secret,"KeyPair is public only"),n.encode(this.secret(),e)},s.prototype.getPublic=function(e){return n.encode(this.pubBytes(),e)},e.exports=s},function(e,t,r){"use strict";var n=r(26),i=r(4),a=i.utils,o=a.assert,s=a.parseBytes,c=r(105),u=r(104);function f(e){if(o("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof f))return new f(e);e=i.curves[e].curve,this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=n.sha512}e.exports=f,f.prototype.sign=function(e,t){e=s(e);var r=this.keyFromSecret(t),n=this.hashInt(r.messagePrefix(),e),i=this.g.mul(n),a=this.encodePoint(i),o=this.hashInt(a,r.pubBytes(),e).mul(r.priv()),c=n.add(o).umod(this.curve.n);return this.makeSignature({R:i,S:c,Rencoded:a})},f.prototype.verify=function(e,t,r){e=s(e),t=this.makeSignature(t);var n=this.keyFromPublic(r),i=this.hashInt(t.Rencoded(),n.pubBytes(),e),a=this.g.mul(t.S());return t.R().add(n.pub().mul(i)).eq(a)},f.prototype.hashInt=function(){for(var e=this.hash(),t=0;t<arguments.length;t++)e.update(arguments[t]);return a.intFromLE(e.digest()).umod(this.curve.n)},f.prototype.keyFromPublic=function(e){return c.fromPublic(this,e)},f.prototype.keyFromSecret=function(e){return c.fromSecret(this,e)},f.prototype.makeSignature=function(e){return e instanceof u?e:new u(this,e)},f.prototype.encodePoint=function(e){var t=e.getY().toArray("le",this.encodingLength);return t[this.encodingLength-1]|=e.getX().isOdd()?128:0,t},f.prototype.decodePoint=function(e){var t=(e=a.parseBytes(e)).length-1,r=e.slice(0,t).concat(-129&e[t]),n=0!=(128&e[t]),i=a.intFromLE(r);return this.curve.pointFromY(i,n)},f.prototype.encodeInt=function(e){return e.toArray("le",this.encodingLength)},f.prototype.decodeInt=function(e){return a.intFromLE(e)},f.prototype.isPoint=function(e){return e instanceof this.pointClass}},function(e,t,r){"use strict";var n=r(3),i=r(4).utils,a=i.assert;function o(e,t){if(e instanceof o)return e;this._importDER(e,t)||(a(e.r&&e.s,"Signature without r or s"),this.r=new n(e.r,16),this.s=new n(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function s(){this.place=0}function c(e,t){var r=e[t.place++];if(!(128&r))return r;for(var n=15&r,i=0,a=0,o=t.place;a<n;a++,o++)i<<=8,i|=e[o];return t.place=o,i}function u(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&t<r;)t++;return 0===t?e:e.slice(t)}function f(e,t){if(t<128)e.push(t);else{var r=1+(Math.log(t)/Math.LN2>>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}}e.exports=o,o.prototype._importDER=function(e,t){e=i.toArray(e,t);var r=new s;if(48!==e[r.place++])return!1;if(c(e,r)+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var a=c(e,r),o=e.slice(r.place,a+r.place);if(r.place+=a,2!==e[r.place++])return!1;var u=c(e,r);if(e.length!==u+r.place)return!1;var f=e.slice(r.place,u+r.place);return 0===o[0]&&128&o[1]&&(o=o.slice(1)),0===f[0]&&128&f[1]&&(f=f.slice(1)),this.r=new n(o),this.s=new n(f),this.recoveryParam=null,!0},o.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=u(t),r=u(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];f(n,t.length),(n=n.concat(t)).push(2),f(n,r.length);var a=n.concat(r),o=[48];return f(o,a.length),o=o.concat(a),i.encode(o,e)}},function(e,t,r){"use strict";var n=r(3),i=r(4).utils.assert;function a(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}e.exports=a,a.fromPublic=function(e,t,r){return t instanceof a?t:new a(e,{pub:t,pubEnc:r})},a.fromPrivate=function(e,t,r){return t instanceof a?t:new a(e,{priv:t,privEnc:r})},a.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},a.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},a.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},a.prototype._importPrivate=function(e,t){this.priv=new n(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},a.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?i(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||i(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},a.prototype.derive=function(e){return e.mul(this.priv).getX()},a.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)},a.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},a.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}},function(e,t,r){"use strict";var n=r(26),i=r(53),a=r(5);function o(e){if(!(this instanceof o))return new o(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=i.toArray(e.entropy,e.entropyEnc||"hex"),r=i.toArray(e.nonce,e.nonceEnc||"hex"),n=i.toArray(e.pers,e.persEnc||"hex");a(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}e.exports=o,o.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i<this.V.length;i++)this.K[i]=0,this.V[i]=1;this._update(n),this._reseed=1,this.reseedInterval=281474976710656},o.prototype._hmac=function(){return new n.hmac(this.hash,this.K)},o.prototype._update=function(e){var t=this._hmac().update(this.V).update([0]);e&&(t=t.update(e)),this.K=t.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())},o.prototype.reseed=function(e,t,r,n){"string"!=typeof t&&(n=r,r=t,t=null),e=i.toArray(e,t),r=i.toArray(r,n),a(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},o.prototype.generate=function(e,t,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(n=r,r=t,t=null),r&&(r=i.toArray(r,n||"hex"),this._update(r));for(var a=[];a.length<e;)this.V=this._hmac().update(this.V).digest(),a=a.concat(this.V);var o=a.slice(0,e);return this._update(r),this._reseed++,i.encode(o,t)}},function(e,t,r){"use strict";var n=r(3),i=r(109),a=r(4),o=a.utils.assert,s=r(108),c=r(107);function u(e){if(!(this instanceof u))return new u(e);"string"==typeof e&&(o(a.curves.hasOwnProperty(e),"Unknown curve "+e),e=a.curves[e]),e instanceof a.curves.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}e.exports=u,u.prototype.keyPair=function(e){return new s(this,e)},u.prototype.keyFromPrivate=function(e,t){return s.fromPrivate(this,e,t)},u.prototype.keyFromPublic=function(e,t){return s.fromPublic(this,e,t)},u.prototype.genKeyPair=function(e){e||(e={});for(var t=new i({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||a.rand(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),o=this.n.sub(new n(2));;){var s=new n(t.generate(r));if(!(s.cmp(o)>0))return s.iaddn(1),this.keyFromPrivate(s)}},u.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},u.prototype.sign=function(e,t,r,a){"object"==typeof r&&(a=r,r=null),a||(a={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new n(e,16));for(var o=this.n.byteLength(),s=t.getPrivate().toArray("be",o),u=e.toArray("be",o),f=new i({hash:this.hash,entropy:s,nonce:u,pers:a.pers,persEnc:a.persEnc||"utf8"}),h=this.n.sub(new n(1)),l=0;;l++){var d=a.k?a.k(l):new n(f.generate(this.n.byteLength()));if(!((d=this._truncateToN(d,!0)).cmpn(1)<=0||d.cmp(h)>=0)){var p=this.g.mul(d);if(!p.isInfinity()){var y=p.getX(),g=y.umod(this.n);if(0!==g.cmpn(0)){var v=d.invm(this.n).mul(g.mul(t.getPrivate()).iadd(e));if(0!==(v=v.umod(this.n)).cmpn(0)){var m=(p.getY().isOdd()?1:0)|(0!==y.cmp(g)?2:0);return a.canonical&&v.cmp(this.nh)>0&&(v=this.n.sub(v),m^=1),new c({r:g,s:v,recoveryParam:m})}}}}}},u.prototype.verify=function(e,t,r,i){e=this._truncateToN(new n(e,16)),r=this.keyFromPublic(r,i);var a=(t=new c(t,"hex")).r,o=t.s;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;var s,u=o.invm(this.n),f=u.mul(e).umod(this.n),h=u.mul(a).umod(this.n);return this.curve._maxwellTrick?!(s=this.g.jmulAdd(f,r.getPublic(),h)).isInfinity()&&s.eqXToP(a):!(s=this.g.mulAdd(f,r.getPublic(),h)).isInfinity()&&0===s.getX().umod(this.n).cmp(a)},u.prototype.recoverPubKey=function(e,t,r,i){o((3&r)===r,"The recovery param is more than two bits"),t=new c(t,i);var a=this.n,s=new n(e),u=t.r,f=t.s,h=1&r,l=r>>1;if(u.cmp(this.curve.p.umod(this.curve.n))>=0&&l)throw new Error("Unable to find sencond key candinate");u=l?this.curve.pointFromX(u.add(this.curve.n),h):this.curve.pointFromX(u,h);var d=t.r.invm(a),p=a.sub(s).mul(d).umod(a),y=f.mul(d).umod(a);return this.g.mulAdd(p,u,y)},u.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new c(t,n)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var a;try{a=this.recoverPubKey(e,t,i)}catch(e){continue}if(a.eq(r))return i}throw new Error("Unable to find valid recovery factor")}},function(e,t){e.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},function(e,t,r){"use strict";var n=r(6),i=r(5);function a(e,t,r){if(!(this instanceof a))return new a(e,t,r);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(n.toArray(t,r))}e.exports=a,a.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),i(e.length<=this.blockSize);for(var t=e.length;t<this.blockSize;t++)e.push(0);for(t=0;t<e.length;t++)e[t]^=54;for(this.inner=(new this.Hash).update(e),t=0;t<e.length;t++)e[t]^=106;this.outer=(new this.Hash).update(e)},a.prototype.update=function(e,t){return this.inner.update(e,t),this},a.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)}},function(e,t,r){"use strict";var n=r(6),i=r(15),a=n.rotl32,o=n.sum32,s=n.sum32_3,c=n.sum32_4,u=i.BlockHash;function f(){if(!(this instanceof f))return new f;u.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function h(e,t,r,n){return e<=15?t^r^n:e<=31?t&r|~t&n:e<=47?(t|~r)^n:e<=63?t&n|r&~n:t^(r|~n)}function l(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function d(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}n.inherits(f,u),t.ripemd160=f,f.blockSize=512,f.outSize=160,f.hmacStrength=192,f.padLength=64,f.prototype._update=function(e,t){for(var r=this.h[0],n=this.h[1],i=this.h[2],u=this.h[3],f=this.h[4],m=r,b=n,w=i,C=u,E=f,S=0;S<80;S++){var A=o(a(c(r,h(S,n,i,u),e[p[S]+t],l(S)),g[S]),f);r=f,f=u,u=a(i,10),i=n,n=A,A=o(a(c(m,h(79-S,b,w,C),e[y[S]+t],d(S)),v[S]),E),m=E,E=C,C=a(w,10),w=b,b=A}A=s(this.h[1],i,C),this.h[1]=s(this.h[2],u,E),this.h[2]=s(this.h[3],f,m),this.h[3]=s(this.h[4],r,b),this.h[4]=s(this.h[0],n,w),this.h[0]=A},f.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"little"):n.split32(this.h,"little")};var p=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],y=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],g=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],v=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},function(e,t,r){"use strict";var n=r(6),i=r(50);function a(){if(!(this instanceof a))return new a;i.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}n.inherits(a,i),e.exports=a,a.blockSize=1024,a.outSize=384,a.hmacStrength=192,a.padLength=128,a.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,12),"big"):n.split32(this.h.slice(0,12),"big")}},function(e,t,r){"use strict";var n=r(6),i=r(51);function a(){if(!(this instanceof a))return new a;i.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}n.inherits(a,i),e.exports=a,a.blockSize=512,a.outSize=224,a.hmacStrength=192,a.padLength=64,a.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,7),"big"):n.split32(this.h.slice(0,7),"big")}},function(e,t,r){"use strict";var n=r(6),i=r(15),a=r(52),o=n.rotl32,s=n.sum32,c=n.sum32_5,u=a.ft_1,f=i.BlockHash,h=[1518500249,1859775393,2400959708,3395469782];function l(){if(!(this instanceof l))return new l;f.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}n.inherits(l,f),e.exports=l,l.blockSize=512,l.outSize=160,l.hmacStrength=80,l.padLength=64,l.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n<r.length;n++)r[n]=o(r[n-3]^r[n-8]^r[n-14]^r[n-16],1);var i=this.h[0],a=this.h[1],f=this.h[2],l=this.h[3],d=this.h[4];for(n=0;n<r.length;n++){var p=~~(n/20),y=c(o(i,5),u(p,a,f,l),d,r[n],h[p]);d=l,l=f,f=o(a,30),a=i,i=y}this.h[0]=s(this.h[0],i),this.h[1]=s(this.h[1],a),this.h[2]=s(this.h[2],f),this.h[3]=s(this.h[3],l),this.h[4]=s(this.h[4],d)},l.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},function(e,t,r){"use strict";t.sha1=r(116),t.sha224=r(115),t.sha256=r(51),t.sha384=r(114),t.sha512=r(50)},function(e,t,r){"use strict";var n,i=t,a=r(26),o=r(4),s=o.utils.assert;function c(e){"short"===e.type?this.curve=new o.curve.short(e):"edwards"===e.type?this.curve=new o.curve.edwards(e):this.curve=new o.curve.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,s(this.g.validate(),"Invalid curve"),s(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function u(e,t){Object.defineProperty(i,e,{configurable:!0,enumerable:!0,get:function(){var r=new c(t);return Object.defineProperty(i,e,{configurable:!0,enumerable:!0,value:r}),r}})}i.PresetCurve=c,u("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:a.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),u("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:a.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),u("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:a.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),u("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:a.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),u("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:a.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),u("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:a.sha256,gRed:!1,g:["9"]}),u("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:a.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{n=r(111)}catch(e){n=void 0}u("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:a.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",n]})},function(e,t,r){"use strict";var n=r(21),i=r(4),a=r(3),o=r(0),s=n.base,c=i.utils.assert;function u(e){this.twisted=1!=(0|e.a),this.mOneA=this.twisted&&-1==(0|e.a),this.extended=this.mOneA,s.call(this,"edwards",e),this.a=new a(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new a(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new a(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),c(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|e.c)}function f(e,t,r,n,i){s.BasePoint.call(this,e,"projective"),null===t&&null===r&&null===n?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new a(t,16),this.y=new a(r,16),this.z=n?new a(n,16):this.curve.one,this.t=i&&new a(i,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}o(u,s),e.exports=u,u.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},u.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},u.prototype.jpoint=function(e,t,r,n){return this.point(e,t,r,n)},u.prototype.pointFromX=function(e,t){(e=new a(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),n=this.c2.redSub(this.a.redMul(r)),i=this.one.redSub(this.c2.redMul(this.d).redMul(r)),o=n.redMul(i.redInvm()),s=o.redSqrt();if(0!==s.redSqr().redSub(o).cmp(this.zero))throw new Error("invalid point");var c=s.fromRed().isOdd();return(t&&!c||!t&&c)&&(s=s.redNeg()),this.point(e,s)},u.prototype.pointFromY=function(e,t){(e=new a(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),n=r.redSub(this.one),i=r.redMul(this.d).redAdd(this.one),o=n.redMul(i.redInvm());if(0===o.cmp(this.zero)){if(t)throw new Error("invalid point");return this.point(this.zero,e)}var s=o.redSqrt();if(0!==s.redSqr().redSub(o).cmp(this.zero))throw new Error("invalid point");return s.isOdd()!==t&&(s=s.redNeg()),this.point(s,e)},u.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),r=e.y.redSqr(),n=t.redMul(this.a).redAdd(r),i=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(r)));return 0===n.cmp(i)},o(f,s.BasePoint),u.prototype.pointFromJSON=function(e){return f.fromJSON(this,e)},u.prototype.point=function(e,t,r,n){return new f(this,e,t,r,n)},f.fromJSON=function(e,t){return new f(e,t[0],t[1],t[2])},f.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},f.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&0===this.y.cmp(this.z)},f.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var n=this.curve._mulA(e),i=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),a=n.redAdd(t),o=a.redSub(r),s=n.redSub(t),c=i.redMul(o),u=a.redMul(s),f=i.redMul(s),h=o.redMul(a);return this.curve.point(c,u,h,f)},f.prototype._projDbl=function(){var e,t,r,n=this.x.redAdd(this.y).redSqr(),i=this.x.redSqr(),a=this.y.redSqr();if(this.curve.twisted){var o=(u=this.curve._mulA(i)).redAdd(a);if(this.zOne)e=n.redSub(i).redSub(a).redMul(o.redSub(this.curve.two)),t=o.redMul(u.redSub(a)),r=o.redSqr().redSub(o).redSub(o);else{var s=this.z.redSqr(),c=o.redSub(s).redISub(s);e=n.redSub(i).redISub(a).redMul(c),t=o.redMul(u.redSub(a)),r=o.redMul(c)}}else{var u=i.redAdd(a);s=this.curve._mulC(this.c.redMul(this.z)).redSqr(),c=u.redSub(s).redSub(s),e=this.curve._mulC(n.redISub(u)).redMul(c),t=this.curve._mulC(u).redMul(i.redISub(a)),r=u.redMul(c)}return this.curve.point(e,t,r)},f.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},f.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),r=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),n=this.t.redMul(this.curve.dd).redMul(e.t),i=this.z.redMul(e.z.redAdd(e.z)),a=r.redSub(t),o=i.redSub(n),s=i.redAdd(n),c=r.redAdd(t),u=a.redMul(o),f=s.redMul(c),h=a.redMul(c),l=o.redMul(s);return this.curve.point(u,f,l,h)},f.prototype._projAdd=function(e){var t,r,n=this.z.redMul(e.z),i=n.redSqr(),a=this.x.redMul(e.x),o=this.y.redMul(e.y),s=this.curve.d.redMul(a).redMul(o),c=i.redSub(s),u=i.redAdd(s),f=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(a).redISub(o),h=n.redMul(c).redMul(f);return this.curve.twisted?(t=n.redMul(u).redMul(o.redSub(this.curve._mulA(a))),r=c.redMul(u)):(t=n.redMul(u).redMul(o.redSub(a)),r=this.curve._mulC(c).redMul(u)),this.curve.point(h,t,r)},f.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},f.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},f.prototype.mulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!1)},f.prototype.jmulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!0)},f.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},f.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},f.prototype.getX=function(){return this.normalize(),this.x.fromRed()},f.prototype.getY=function(){return this.normalize(),this.y.fromRed()},f.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},f.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var r=e.clone(),n=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(n),0===this.x.cmp(t))return!0}return!1},f.prototype.toP=f.prototype.normalize,f.prototype.mixedAdd=f.prototype.add},function(e,t,r){"use strict";var n=r(21),i=r(3),a=r(0),o=n.base,s=r(4).utils;function c(e){o.call(this,"mont",e),this.a=new i(e.a,16).toRed(this.red),this.b=new i(e.b,16).toRed(this.red),this.i4=new i(4).toRed(this.red).redInvm(),this.two=new i(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function u(e,t,r){o.BasePoint.call(this,e,"projective"),null===t&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new i(t,16),this.z=new i(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}a(c,o),e.exports=c,c.prototype.validate=function(e){var t=e.normalize().x,r=t.redSqr(),n=r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t);return 0===n.redSqrt().redSqr().cmp(n)},a(u,o.BasePoint),c.prototype.decodePoint=function(e,t){return this.point(s.toArray(e,t),1)},c.prototype.point=function(e,t){return new u(this,e,t)},c.prototype.pointFromJSON=function(e){return u.fromJSON(this,e)},u.prototype.precompute=function(){},u.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},u.fromJSON=function(e,t){return new u(e,t[0],t[1]||e.one)},u.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},u.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},u.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),r=e.redSub(t),n=e.redMul(t),i=r.redMul(t.redAdd(this.curve.a24.redMul(r)));return this.curve.point(n,i)},u.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.diffAdd=function(e,t){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=e.x.redAdd(e.z),a=e.x.redSub(e.z).redMul(r),o=i.redMul(n),s=t.z.redMul(a.redAdd(o).redSqr()),c=t.x.redMul(a.redISub(o).redSqr());return this.curve.point(s,c)},u.prototype.mul=function(e){for(var t=e.clone(),r=this,n=this.curve.point(null,null),i=[];0!==t.cmpn(0);t.iushrn(1))i.push(t.andln(1));for(var a=i.length-1;a>=0;a--)0===i[a]?(r=r.diffAdd(n,this),n=n.dbl()):(n=r.diffAdd(n,this),r=r.dbl());return n},u.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},u.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},u.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},function(e,t,r){"use strict";var n=r(21),i=r(4),a=r(3),o=r(0),s=n.base,c=i.utils.assert;function u(e){s.call(this,"short",e),this.a=new a(e.a,16).toRed(this.red),this.b=new a(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function f(e,t,r,n){s.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new a(t,16),this.y=new a(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function h(e,t,r,n){s.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new a(0)):(this.x=new a(t,16),this.y=new a(r,16),this.z=new a(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}o(u,s),e.exports=u,u.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,r;if(e.beta)t=new a(e.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);t=(t=n[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red)}if(e.lambda)r=new a(e.lambda,16);else{var i=this._getEndoRoots(this.n);0===this.g.mul(i[0]).x.cmp(this.g.x.redMul(t))?r=i[0]:(r=i[1],c(0===this.g.mul(r).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:r,basis:e.basis?e.basis.map((function(e){return{a:new a(e.a,16),b:new a(e.b,16)}})):this._getEndoBasis(r)}}},u.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:a.mont(e),r=new a(2).toRed(t).redInvm(),n=r.redNeg(),i=new a(3).toRed(t).redNeg().redSqrt().redMul(r);return[n.redAdd(i).fromRed(),n.redSub(i).fromRed()]},u.prototype._getEndoBasis=function(e){for(var t,r,n,i,o,s,c,u,f,h=this.n.ushrn(Math.floor(this.n.bitLength()/2)),l=e,d=this.n.clone(),p=new a(1),y=new a(0),g=new a(0),v=new a(1),m=0;0!==l.cmpn(0);){var b=d.div(l);u=d.sub(b.mul(l)),f=g.sub(b.mul(p));var w=v.sub(b.mul(y));if(!n&&u.cmp(h)<0)t=c.neg(),r=p,n=u.neg(),i=f;else if(n&&2==++m)break;c=u,d=l,l=u,g=p,p=f,v=y,y=w}o=u.neg(),s=f;var C=n.sqr().add(i.sqr());return o.sqr().add(s.sqr()).cmp(C)>=0&&(o=t,s=r),n.negative&&(n=n.neg(),i=i.neg()),o.negative&&(o=o.neg(),s=s.neg()),[{a:n,b:i},{a:o,b:s}]},u.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],i=n.b.mul(e).divRound(this.n),a=r.b.neg().mul(e).divRound(this.n),o=i.mul(r.a),s=a.mul(n.a),c=i.mul(r.b),u=a.mul(n.b);return{k1:e.sub(o).sub(s),k2:c.add(u).neg()}},u.prototype.pointFromX=function(e,t){(e=new a(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var i=n.fromRed().isOdd();return(t&&!i||!t&&i)&&(n=n.redNeg()),this.point(e,n)},u.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},u.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,a=0;a<e.length;a++){var o=this._endoSplit(t[a]),s=e[a],c=s._getBeta();o.k1.negative&&(o.k1.ineg(),s=s.neg(!0)),o.k2.negative&&(o.k2.ineg(),c=c.neg(!0)),n[2*a]=s,n[2*a+1]=c,i[2*a]=o.k1,i[2*a+1]=o.k2}for(var u=this._wnafMulAdd(1,n,i,2*a,r),f=0;f<2*a;f++)n[f]=null,i[f]=null;return u},o(f,s.BasePoint),u.prototype.point=function(e,t,r){return new f(this,e,t,r)},u.prototype.pointFromJSON=function(e,t){return f.fromJSON(this,e,t)},f.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var t=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var r=this.curve,n=function(e){return r.point(e.x.redMul(r.endo.beta),e.y)};e.beta=t,t.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(n)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(n)}}}return t}},f.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},f.fromJSON=function(e,t,r){"string"==typeof t&&(t=JSON.parse(t));var n=e.point(t[0],t[1],r);if(!t[2])return n;function i(t){return e.point(t[0],t[1],r)}var a=t[2];return n.precomputed={beta:null,doubles:a.doubles&&{step:a.doubles.step,points:[n].concat(a.doubles.points.map(i))},naf:a.naf&&{wnd:a.naf.wnd,points:[n].concat(a.naf.points.map(i))}},n},f.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},f.prototype.isInfinity=function(){return this.inf},f.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},f.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),a=i.redSqr().redISub(this.x.redAdd(this.x)),o=i.redMul(this.x.redSub(a)).redISub(this.y);return this.curve.point(a,o)},f.prototype.getX=function(){return this.x.fromRed()},f.prototype.getY=function(){return this.y.fromRed()},f.prototype.mul=function(e){return e=new a(e,16),this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},f.prototype.mulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},f.prototype.jmulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},f.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},f.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},f.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},o(h,s.BasePoint),u.prototype.jpoint=function(e,t,r){return new h(this,e,t,r)},h.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},h.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},h.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),i=e.x.redMul(r),a=this.y.redMul(t.redMul(e.z)),o=e.y.redMul(r.redMul(this.z)),s=n.redSub(i),c=a.redSub(o);if(0===s.cmpn(0))return 0!==c.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=s.redSqr(),f=u.redMul(s),h=n.redMul(u),l=c.redSqr().redIAdd(f).redISub(h).redISub(h),d=c.redMul(h.redISub(l)).redISub(a.redMul(f)),p=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(l,d,p)},h.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),i=this.y,a=e.y.redMul(t).redMul(this.z),o=r.redSub(n),s=i.redSub(a);if(0===o.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=o.redSqr(),u=c.redMul(o),f=r.redMul(c),h=s.redSqr().redIAdd(u).redISub(f).redISub(f),l=s.redMul(f.redISub(h)).redISub(i.redMul(u)),d=this.z.redMul(o);return this.curve.jpoint(h,l,d)},h.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();if(this.curve.zeroA||this.curve.threeA){for(var t=this,r=0;r<e;r++)t=t.dbl();return t}var n=this.curve.a,i=this.curve.tinv,a=this.x,o=this.y,s=this.z,c=s.redSqr().redSqr(),u=o.redAdd(o);for(r=0;r<e;r++){var f=a.redSqr(),h=u.redSqr(),l=h.redSqr(),d=f.redAdd(f).redIAdd(f).redIAdd(n.redMul(c)),p=a.redMul(h),y=d.redSqr().redISub(p.redAdd(p)),g=p.redISub(y),v=d.redMul(g);v=v.redIAdd(v).redISub(l);var m=u.redMul(s);r+1<e&&(c=c.redMul(l)),a=y,s=m,u=v}return this.curve.jpoint(a,u.redMul(i),s)},h.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},h.prototype._zeroDbl=function(){var e,t,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),a=i.redSqr(),o=this.x.redAdd(i).redSqr().redISub(n).redISub(a);o=o.redIAdd(o);var s=n.redAdd(n).redIAdd(n),c=s.redSqr().redISub(o).redISub(o),u=a.redIAdd(a);u=(u=u.redIAdd(u)).redIAdd(u),e=c,t=s.redMul(o.redISub(c)).redISub(u),r=this.y.redAdd(this.y)}else{var f=this.x.redSqr(),h=this.y.redSqr(),l=h.redSqr(),d=this.x.redAdd(h).redSqr().redISub(f).redISub(l);d=d.redIAdd(d);var p=f.redAdd(f).redIAdd(f),y=p.redSqr(),g=l.redIAdd(l);g=(g=g.redIAdd(g)).redIAdd(g),e=y.redISub(d).redISub(d),t=p.redMul(d.redISub(e)).redISub(g),r=(r=this.y.redMul(this.z)).redIAdd(r)}return this.curve.jpoint(e,t,r)},h.prototype._threeDbl=function(){var e,t,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),a=i.redSqr(),o=this.x.redAdd(i).redSqr().redISub(n).redISub(a);o=o.redIAdd(o);var s=n.redAdd(n).redIAdd(n).redIAdd(this.curve.a),c=s.redSqr().redISub(o).redISub(o);e=c;var u=a.redIAdd(a);u=(u=u.redIAdd(u)).redIAdd(u),t=s.redMul(o.redISub(c)).redISub(u),r=this.y.redAdd(this.y)}else{var f=this.z.redSqr(),h=this.y.redSqr(),l=this.x.redMul(h),d=this.x.redSub(f).redMul(this.x.redAdd(f));d=d.redAdd(d).redIAdd(d);var p=l.redIAdd(l),y=(p=p.redIAdd(p)).redAdd(p);e=d.redSqr().redISub(y),r=this.y.redAdd(this.z).redSqr().redISub(h).redISub(f);var g=h.redSqr();g=(g=(g=g.redIAdd(g)).redIAdd(g)).redIAdd(g),t=d.redMul(p.redISub(e)).redISub(g)}return this.curve.jpoint(e,t,r)},h.prototype._dbl=function(){var e=this.curve.a,t=this.x,r=this.y,n=this.z,i=n.redSqr().redSqr(),a=t.redSqr(),o=r.redSqr(),s=a.redAdd(a).redIAdd(a).redIAdd(e.redMul(i)),c=t.redAdd(t),u=(c=c.redIAdd(c)).redMul(o),f=s.redSqr().redISub(u.redAdd(u)),h=u.redISub(f),l=o.redSqr();l=(l=(l=l.redIAdd(l)).redIAdd(l)).redIAdd(l);var d=s.redMul(h).redISub(l),p=r.redAdd(r).redMul(n);return this.curve.jpoint(f,d,p)},h.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr(),n=t.redSqr(),i=e.redAdd(e).redIAdd(e),a=i.redSqr(),o=this.x.redAdd(t).redSqr().redISub(e).redISub(n),s=(o=(o=(o=o.redIAdd(o)).redAdd(o).redIAdd(o)).redISub(a)).redSqr(),c=n.redIAdd(n);c=(c=(c=c.redIAdd(c)).redIAdd(c)).redIAdd(c);var u=i.redIAdd(o).redSqr().redISub(a).redISub(s).redISub(c),f=t.redMul(u);f=(f=f.redIAdd(f)).redIAdd(f);var h=this.x.redMul(s).redISub(f);h=(h=h.redIAdd(h)).redIAdd(h);var l=this.y.redMul(u.redMul(c.redISub(u)).redISub(o.redMul(s)));l=(l=(l=l.redIAdd(l)).redIAdd(l)).redIAdd(l);var d=this.z.redAdd(o).redSqr().redISub(r).redISub(s);return this.curve.jpoint(h,l,d)},h.prototype.mul=function(e,t){return e=new a(e,t),this.curve._wnafMul(this,e)},h.prototype.eq=function(e){if("affine"===e.type)return this.eq(e.toJ());if(this===e)return!0;var t=this.z.redSqr(),r=e.z.redSqr();if(0!==this.x.redMul(r).redISub(e.x.redMul(t)).cmpn(0))return!1;var n=t.redMul(this.z),i=r.redMul(e.z);return 0===this.y.redMul(i).redISub(e.y.redMul(n)).cmpn(0)},h.prototype.eqXToP=function(e){var t=this.z.redSqr(),r=e.toRed(this.curve.red).redMul(t);if(0===this.x.cmp(r))return!0;for(var n=e.clone(),i=this.curve.redN.redMul(t);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}return!1},h.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},h.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},function(e,t,r){"use strict";var n=r(3),i=r(4).utils,a=i.getNAF,o=i.getJSF,s=i.assert;function c(e,t){this.type=e,this.p=new n(t.p,16),this.red=t.prime?n.red(t.prime):n.mont(this.p),this.zero=new n(0).toRed(this.red),this.one=new n(1).toRed(this.red),this.two=new n(2).toRed(this.red),this.n=t.n&&new n(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4);var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function u(e,t){this.curve=e,this.type=t,this.precomputed=null}e.exports=c,c.prototype.point=function(){throw new Error("Not implemented")},c.prototype.validate=function(){throw new Error("Not implemented")},c.prototype._fixedNafMul=function(e,t){s(e.precomputed);var r=e._getDoubles(),n=a(t,1),i=(1<<r.step+1)-(r.step%2==0?2:1);i/=3;for(var o=[],c=0;c<n.length;c+=r.step){var u=0;for(t=c+r.step-1;t>=c;t--)u=(u<<1)+n[t];o.push(u)}for(var f=this.jpoint(null,null,null),h=this.jpoint(null,null,null),l=i;l>0;l--){for(c=0;c<o.length;c++)(u=o[c])===l?h=h.mixedAdd(r.points[c]):u===-l&&(h=h.mixedAdd(r.points[c].neg()));f=f.add(h)}return f.toP()},c.prototype._wnafMul=function(e,t){var r=4,n=e._getNAFPoints(r);r=n.wnd;for(var i=n.points,o=a(t,r),c=this.jpoint(null,null,null),u=o.length-1;u>=0;u--){for(t=0;u>=0&&0===o[u];u--)t++;if(u>=0&&t++,c=c.dblp(t),u<0)break;var f=o[u];s(0!==f),c="affine"===e.type?f>0?c.mixedAdd(i[f-1>>1]):c.mixedAdd(i[-f-1>>1].neg()):f>0?c.add(i[f-1>>1]):c.add(i[-f-1>>1].neg())}return"affine"===e.type?c.toP():c},c.prototype._wnafMulAdd=function(e,t,r,n,i){for(var s=this._wnafT1,c=this._wnafT2,u=this._wnafT3,f=0,h=0;h<n;h++){var l=(B=t[h])._getNAFPoints(e);s[h]=l.wnd,c[h]=l.points}for(h=n-1;h>=1;h-=2){var d=h-1,p=h;if(1===s[d]&&1===s[p]){var y=[t[d],null,null,t[p]];0===t[d].y.cmp(t[p].y)?(y[1]=t[d].add(t[p]),y[2]=t[d].toJ().mixedAdd(t[p].neg())):0===t[d].y.cmp(t[p].y.redNeg())?(y[1]=t[d].toJ().mixedAdd(t[p]),y[2]=t[d].add(t[p].neg())):(y[1]=t[d].toJ().mixedAdd(t[p]),y[2]=t[d].toJ().mixedAdd(t[p].neg()));var g=[-3,-1,-5,-7,0,7,5,1,3],v=o(r[d],r[p]);f=Math.max(v[0].length,f),u[d]=new Array(f),u[p]=new Array(f);for(var m=0;m<f;m++){var b=0|v[0][m],w=0|v[1][m];u[d][m]=g[3*(b+1)+(w+1)],u[p][m]=0,c[d]=y}}else u[d]=a(r[d],s[d]),u[p]=a(r[p],s[p]),f=Math.max(u[d].length,f),f=Math.max(u[p].length,f)}var C=this.jpoint(null,null,null),E=this._wnafT4;for(h=f;h>=0;h--){for(var S=0;h>=0;){var A=!0;for(m=0;m<n;m++)E[m]=0|u[m][h],0!==E[m]&&(A=!1);if(!A)break;S++,h--}if(h>=0&&S++,C=C.dblp(S),h<0)break;for(m=0;m<n;m++){var B,T=E[m];0!==T&&(T>0?B=c[m][T-1>>1]:T<0&&(B=c[m][-T-1>>1].neg()),C="affine"===B.type?C.mixedAdd(B):C.add(B))}}for(h=0;h<n;h++)c[h]=null;return i?C:C.toP()},c.BasePoint=u,u.prototype.eq=function(){throw new Error("Not implemented")},u.prototype.validate=function(){return this.curve.validate(this)},c.prototype.decodePoint=function(e,t){e=i.toArray(e,t);var r=this.p.byteLength();if((4===e[0]||6===e[0]||7===e[0])&&e.length-1==2*r)return 6===e[0]?s(e[e.length-1]%2==0):7===e[0]&&s(e[e.length-1]%2==1),this.point(e.slice(1,1+r),e.slice(1+r,1+2*r));if((2===e[0]||3===e[0])&&e.length-1===r)return this.pointFromX(e.slice(1,1+r),3===e[0]);throw new Error("Unknown point format")},u.prototype.encodeCompressed=function(e){return this.encode(e,!0)},u.prototype._encode=function(e){var t=this.curve.p.byteLength(),r=this.getX().toArray("be",t);return e?[this.getY().isEven()?2:3].concat(r):[4].concat(r,this.getY().toArray("be",t))},u.prototype.encode=function(e,t){return i.encode(this._encode(t),e)},u.prototype.precompute=function(e){if(this.precomputed)return this;var t={doubles:null,naf:null,beta:null};return t.naf=this._getNAFPoints(8),t.doubles=this._getDoubles(4,e),t.beta=this._getBeta(),this.precomputed=t,this},u.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var t=this.precomputed.doubles;return!!t&&t.points.length>=Math.ceil((e.bitLength()+1)/t.step)},u.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i<t;i+=e){for(var a=0;a<e;a++)n=n.dbl();r.push(n)}return{step:e,points:r}},u.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var t=[this],r=(1<<e)-1,n=1===r?null:this.dbl(),i=1;i<r;i++)t[i]=t[i-1].add(n);return{wnd:e,points:t}},u.prototype._getBeta=function(){return null},u.prototype.dblp=function(e){for(var t=this,r=0;r<e;r++)t=t.dbl();return t}},function(e,t,r){"use strict";var n=t,i=r(3),a=r(5),o=r(53);n.assert=a,n.toArray=o.toArray,n.zero2=o.zero2,n.toHex=o.toHex,n.encode=o.encode,n.getNAF=function(e,t){for(var r=[],n=1<<t+1,i=e.clone();i.cmpn(1)>=0;){var a;if(i.isOdd()){var o=i.andln(n-1);a=o>(n>>1)-1?(n>>1)-o:o,i.isubn(a)}else a=0;r.push(a);for(var s=0!==i.cmpn(0)&&0===i.andln(n-1)?t+1:1,c=1;c<s;c++)r.push(0);i.iushrn(s)}return r},n.getJSF=function(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var n=0,i=0;e.cmpn(-n)>0||t.cmpn(-i)>0;){var a,o,s,c=e.andln(3)+n&3,u=t.andln(3)+i&3;3===c&&(c=-1),3===u&&(u=-1),a=0==(1&c)?0:3!=(s=e.andln(7)+n&7)&&5!==s||2!==u?c:-c,r[0].push(a),o=0==(1&u)?0:3!=(s=t.andln(7)+i&7)&&5!==s||2!==c?u:-u,r[1].push(o),2*n===a+1&&(n=1-n),2*i===o+1&&(i=1-i),e.iushrn(1),t.iushrn(1)}return r},n.cachedProperty=function(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},n.parseBytes=function(e){return"string"==typeof e?n.toArray(e,"hex"):e},n.intFromLE=function(e){return new i(e,"hex","le")}},function(e){e.exports={_args:[["elliptic@6.4.0","/Users/mtokarev/projects/js/crypto"]],_development:!0,_from:"elliptic@6.4.0",_id:"elliptic@6.4.0",_inBundle:!1,_integrity:"sha1-ysmvh2LIWDYYcAPI3+GT5eLq5d8=",_location:"/elliptic",_phantomChildren:{},_requested:{type:"version",registry:!0,raw:"elliptic@6.4.0",name:"elliptic",escapedName:"elliptic",rawSpec:"6.4.0",saveSpec:null,fetchSpec:"6.4.0"},_requiredBy:["/browserify-sign","/create-ecdh"],_resolved:"https://registry.npmjs.org/elliptic/-/elliptic-6.4.0.tgz",_spec:"6.4.0",_where:"/Users/mtokarev/projects/js/crypto",author:{name:"Fedor Indutny",email:"fedor@indutny.com"},bugs:{url:"https://github.com/indutny/elliptic/issues"},dependencies:{"bn.js":"^4.4.0",brorand:"^1.0.1","hash.js":"^1.0.0","hmac-drbg":"^1.0.0",inherits:"^2.0.1","minimalistic-assert":"^1.0.0","minimalistic-crypto-utils":"^1.0.0"},description:"EC cryptography",devDependencies:{brfs:"^1.4.3",coveralls:"^2.11.3",grunt:"^0.4.5","grunt-browserify":"^5.0.0","grunt-cli":"^1.2.0","grunt-contrib-connect":"^1.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^1.0.1","grunt-mocha-istanbul":"^3.0.1","grunt-saucelabs":"^8.6.2",istanbul:"^0.4.2",jscs:"^2.9.0",jshint:"^2.6.0",mocha:"^2.1.0"},files:["lib"],homepage:"https://github.com/indutny/elliptic",keywords:["EC","Elliptic","curve","Cryptography"],license:"MIT",main:"lib/elliptic.js",name:"elliptic",repository:{type:"git",url:"git+ssh://git@github.com/indutny/elliptic.git"},scripts:{jscs:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",jshint:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",lint:"npm run jscs && npm run jshint",test:"npm run lint && npm run unit",unit:"istanbul test _mocha --reporter=spec test/index.js",version:"grunt dist && git add dist/"},version:"6.4.0"}},function(e,t,r){(function(t){var n=r(68),i=r(27),a=r(4).ec,o=r(3),s=r(20),c=r(45);function u(e,r,i,a){if((e=new t(e.toArray())).length<r.byteLength()){var o=new t(r.byteLength()-e.length);o.fill(0),e=t.concat([o,e])}var s=i.length,c=function(e,r){e=(e=f(e,r)).mod(r);var n=new t(e.toArray());if(n.length<r.byteLength()){var i=new t(r.byteLength()-n.length);i.fill(0),n=t.concat([i,n])}return n}(i,r),u=new t(s);u.fill(1);var h=new t(s);return h.fill(0),h=n(a,h).update(u).update(new t([0])).update(e).update(c).digest(),u=n(a,h).update(u).digest(),{k:h=n(a,h).update(u).update(new t([1])).update(e).update(c).digest(),v:u=n(a,h).update(u).digest()}}function f(e,t){var r=new o(e),n=(e.length<<3)-t.bitLength();return n>0&&r.ishrn(n),r}function h(e,r,i){var a,o;do{for(a=new t(0);8*a.length<e.bitLength();)r.v=n(i,r.k).update(r.v).digest(),a=t.concat([a,r.v]);o=f(a,e),r.k=n(i,r.k).update(r.v).update(new t([0])).digest(),r.v=n(i,r.k).update(r.v).digest()}while(-1!==o.cmp(e));return o}function l(e,t,r,n){return e.toRed(o.mont(r)).redPow(t).fromRed().mod(n)}e.exports=function(e,r,n,d,p){var y=s(r);if(y.curve){if("ecdsa"!==d&&"ecdsa/rsa"!==d)throw new Error("wrong private key type");return function(e,r){var n=c[r.curve.join(".")];if(!n)throw new Error("unknown curve "+r.curve.join("."));var i=new a(n).keyFromPrivate(r.privateKey).sign(e);return new t(i.toDER())}(e,y)}if("dsa"===y.type){if("dsa"!==d)throw new Error("wrong private key type");return function(e,r,n){for(var i,a=r.params.priv_key,s=r.params.p,c=r.params.q,d=r.params.g,p=new o(0),y=f(e,c).mod(c),g=!1,v=u(a,c,e,n);!1===g;)p=l(d,i=h(c,v,n),s,c),0===(g=i.invm(c).imul(y.add(a.mul(p))).mod(c)).cmpn(0)&&(g=!1,p=new o(0));return function(e,r){e=e.toArray(),r=r.toArray(),128&e[0]&&(e=[0].concat(e)),128&r[0]&&(r=[0].concat(r));var n=[48,e.length+r.length+4,2,e.length];return n=n.concat(e,[2,r.length],r),new t(n)}(p,g)}(e,y,n)}if("rsa"!==d&&"ecdsa/rsa"!==d)throw new Error("wrong private key type");e=t.concat([p,e]);for(var g=y.modulus.byteLength(),v=[0,1];e.length+v.length+1<g;)v.push(255);v.push(0);for(var m=-1;++m<e.length;)v.push(e[m]);return i(v,y)},e.exports.getKey=u,e.exports.makeKey=h}).call(this,r(2).Buffer)},function(e,t,r){(function(t){var n=r(18),i=r(37),a=r(0),o=r(125),s=r(89),c=r(66);function u(e){i.Writable.call(this);var t=c[e];if(!t)throw new Error("Unknown message digest");this._hashType=t.hash,this._hash=n(t.hash),this._tag=t.id,this._signType=t.sign}function f(e){i.Writable.call(this);var t=c[e];if(!t)throw new Error("Unknown message digest");this._hash=n(t.hash),this._tag=t.id,this._signType=t.sign}function h(e){return new u(e)}function l(e){return new f(e)}Object.keys(c).forEach((function(e){c[e].id=new t(c[e].id,"hex"),c[e.toLowerCase()]=c[e]})),a(u,i.Writable),u.prototype._write=function(e,t,r){this._hash.update(e),r()},u.prototype.update=function(e,r){return"string"==typeof e&&(e=new t(e,r)),this._hash.update(e),this},u.prototype.sign=function(e,t){this.end();var r=this._hash.digest(),n=o(r,e,this._hashType,this._signType,this._tag);return t?n.toString(t):n},a(f,i.Writable),f.prototype._write=function(e,t,r){this._hash.update(e),r()},f.prototype.update=function(e,r){return"string"==typeof e&&(e=new t(e,r)),this._hash.update(e),this},f.prototype.verify=function(e,r,n){"string"==typeof r&&(r=new t(r,n)),this.end();var i=this._hash.digest();return s(r,i,e,this._signType,this._tag)},e.exports={Sign:h,Verify:l,createSign:h,createVerify:l}}).call(this,r(2).Buffer)},function(e,t,r){(function(t){var n=r(3),i=new(r(55)),a=new n(24),o=new n(11),s=new n(10),c=new n(3),u=new n(7),f=r(56),h=r(12);function l(e,r){return r=r||"utf8",t.isBuffer(e)||(e=new t(e,r)),this._pub=new n(e),this}function d(e,r){return r=r||"utf8",t.isBuffer(e)||(e=new t(e,r)),this._priv=new n(e),this}e.exports=y;var p={};function y(e,t,r){this.setGenerator(t),this.__prime=new n(e),this._prime=n.mont(this.__prime),this._primeLen=e.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,r?(this.setPublicKey=l,this.setPrivateKey=d):this._primeCode=8}function g(e,r){var n=new t(e.toArray());return r?n.toString(r):n}Object.defineProperty(y.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=function(e,t){var r=t.toString("hex"),n=[r,e.toString(16)].join("_");if(n in p)return p[n];var h,l=0;if(e.isEven()||!f.simpleSieve||!f.fermatTest(e)||!i.test(e))return l+=1,l+="02"===r||"05"===r?8:4,p[n]=l,l;switch(i.test(e.shrn(1))||(l+=2),r){case"02":e.mod(a).cmp(o)&&(l+=8);break;case"05":(h=e.mod(s)).cmp(c)&&h.cmp(u)&&(l+=8);break;default:l+=4}return p[n]=l,l}(this.__prime,this.__gen)),this._primeCode}}),y.prototype.generateKeys=function(){return this._priv||(this._priv=new n(h(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},y.prototype.computeSecret=function(e){var r=(e=(e=new n(e)).toRed(this._prime)).redPow(this._priv).fromRed(),i=new t(r.toArray()),a=this.getPrime();if(i.length<a.length){var o=new t(a.length-i.length);o.fill(0),i=t.concat([o,i])}return i},y.prototype.getPublicKey=function(e){return g(this._pub,e)},y.prototype.getPrivateKey=function(e){return g(this._priv,e)},y.prototype.getPrime=function(e){return g(this.__prime,e)},y.prototype.getGenerator=function(e){return g(this._gen,e)},y.prototype.setGenerator=function(e,r){return r=r||"utf8",t.isBuffer(e)||(e=new t(e,r)),this.__gen=e,this._gen=new n(e),this}}).call(this,r(2).Buffer)},function(e){e.exports={modp1:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},modp2:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},modp5:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},modp14:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},modp15:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},modp16:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},modp17:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},modp18:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}},function(e,t){},function(e,t){},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,r){(function(e){var n=r(56),i=r(128),a=r(127),o={binary:!0,hex:!0,base64:!0};t.DiffieHellmanGroup=t.createDiffieHellmanGroup=t.getDiffieHellman=function(t){var r=new e(i[t].prime,"hex"),n=new e(i[t].gen,"hex");return new a(r,n)},t.createDiffieHellman=t.DiffieHellman=function t(r,i,s,c){return e.isBuffer(i)||void 0===o[i]?t(r,"binary",i,s):(i=i||"binary",c=c||"binary",s=s||new e([2]),e.isBuffer(s)||(s=new e(s,c)),"number"==typeof r?new a(n(r,s),s,!0):(e.isBuffer(r)||(r=new e(r,i)),new a(r,s,!0)))}}).call(this,r(2).Buffer)},function(e,t){t["des-ecb"]={key:8,iv:0},t["des-cbc"]=t.des={key:8,iv:8},t["des-ede3-cbc"]=t.des3={key:24,iv:8},t["des-ede3"]={key:24,iv:0},t["des-ede-cbc"]={key:16,iv:8},t["des-ede"]={key:16,iv:0}},function(e,t,r){var n=r(58),i=r(1).Buffer,a=r(28),o=r(57),s=r(8),c=r(23),u=r(22);function f(e,t,r){s.call(this),this._cache=new h,this._last=void 0,this._cipher=new c.AES(t),this._prev=i.from(r),this._mode=e,this._autopadding=!0}function h(){this.cache=i.allocUnsafe(0)}function l(e,t,r){var s=a[e.toLowerCase()];if(!s)throw new TypeError("invalid suite type");if("string"==typeof r&&(r=i.from(r)),"GCM"!==s.mode&&r.length!==s.iv)throw new TypeError("invalid iv length "+r.length);if("string"==typeof t&&(t=i.from(t)),t.length!==s.key/8)throw new TypeError("invalid key length "+t.length);return"stream"===s.type?new o(s.module,t,r,!0):"auth"===s.type?new n(s.module,t,r,!0):new f(s.module,t,r)}r(0)(f,s),f.prototype._update=function(e){var t,r;this._cache.add(e);for(var n=[];t=this._cache.get(this._autopadding);)r=this._mode.decrypt(this,t),n.push(r);return i.concat(n)},f.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return function(e){var t=e[15];if(t<1||t>16)throw new Error("unable to decrypt data");for(var r=-1;++r<t;)if(e[r+(16-t)]!==t)throw new Error("unable to decrypt data");if(16!==t)return e.slice(0,16-t)}(this._mode.decrypt(this,e));if(e)throw new Error("data not multiple of block length")},f.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},h.prototype.add=function(e){this.cache=i.concat([this.cache,e])},h.prototype.get=function(e){var t;if(e){if(this.cache.length>16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t}else if(this.cache.length>=16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t;return null},h.prototype.flush=function(){if(this.cache.length)return this.cache},t.createDecipher=function(e,t){var r=a[e.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var n=u(t,!1,r.key,r.iv);return l(e,n.key,n.iv)},t.createDecipheriv=l},function(e,t,r){var n=r(1).Buffer,i=n.alloc(16,0);function a(e){var t=n.allocUnsafe(16);return t.writeUInt32BE(e[0]>>>0,0),t.writeUInt32BE(e[1]>>>0,4),t.writeUInt32BE(e[2]>>>0,8),t.writeUInt32BE(e[3]>>>0,12),t}function o(e){this.h=e,this.state=n.alloc(16,0),this.cache=n.allocUnsafe(0)}o.prototype.ghash=function(e){for(var t=-1;++t<e.length;)this.state[t]^=e[t];this._multiply()},o.prototype._multiply=function(){for(var e,t,r,n=[(e=this.h).readUInt32BE(0),e.readUInt32BE(4),e.readUInt32BE(8),e.readUInt32BE(12)],i=[0,0,0,0],o=-1;++o<128;){for(0!=(this.state[~~(o/8)]&1<<7-o%8)&&(i[0]^=n[0],i[1]^=n[1],i[2]^=n[2],i[3]^=n[3]),r=0!=(1&n[3]),t=3;t>0;t--)n[t]=n[t]>>>1|(1&n[t-1])<<31;n[0]=n[0]>>>1,r&&(n[0]=n[0]^225<<24)}this.state=a(i)},o.prototype.update=function(e){var t;for(this.cache=n.concat([this.cache,e]);this.cache.length>=16;)t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t)},o.prototype.final=function(e,t){return this.cache.length&&this.ghash(n.concat([this.cache,i],16)),this.ghash(a([0,e,0,t])),this.state},e.exports=o},function(e,t,r){(function(e){var n=r(16);function i(e){return e._prev=e._cipher.encryptBlock(e._prev),e._prev}t.encrypt=function(t,r){for(;t._cache.length<r.length;)t._cache=e.concat([t._cache,i(t)]);var a=t._cache.slice(0,r.length);return t._cache=t._cache.slice(r.length),n(r,a)}}).call(this,r(2).Buffer)},function(e,t,r){var n=r(1).Buffer;function i(e,t,r){for(var n,i,o=-1,s=0;++o<8;)n=t&1<<7-o?128:0,s+=(128&(i=e._cipher.encryptBlock(e._prev)[0]^n))>>o%8,e._prev=a(e._prev,r?n:i);return s}function a(e,t){var r=e.length,i=-1,a=n.allocUnsafe(e.length);for(e=n.concat([e,n.from([t])]);++i<r;)a[i]=e[i]<<1|e[i+1]>>7;return a}t.encrypt=function(e,t,r){for(var a=t.length,o=n.allocUnsafe(a),s=-1;++s<a;)o[s]=i(e,t[s],r);return o}},function(e,t,r){var n=r(1).Buffer;function i(e,t,r){var i=e._cipher.encryptBlock(e._prev)[0]^t;return e._prev=n.concat([e._prev.slice(1),n.from([r?t:i])]),i}t.encrypt=function(e,t,r){for(var a=t.length,o=n.allocUnsafe(a),s=-1;++s<a;)o[s]=i(e,t[s],r);return o}},function(e,t,r){var n=r(1).Buffer,i=r(16);function a(e,t,r){var a=t.length,o=i(t,e._cache);return e._cache=e._cache.slice(a),e._prev=n.concat([e._prev,r?t:o]),o}t.encrypt=function(e,t,r){for(var i,o=n.allocUnsafe(0);t.length;){if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=n.allocUnsafe(0)),!(e._cache.length<=t.length)){o=n.concat([o,a(e,t,r)]);break}i=e._cache.length,o=n.concat([o,a(e,t.slice(0,i),r)]),t=t.slice(i)}return o}},function(e,t,r){var n=r(16);t.encrypt=function(e,t){var r=n(t,e._prev);return e._prev=e._cipher.encryptBlock(r),e._prev},t.decrypt=function(e,t){var r=e._prev;e._prev=t;var i=e._cipher.decryptBlock(t);return n(i,r)}},function(e,t){t.encrypt=function(e,t){return e._cipher.encryptBlock(t)},t.decrypt=function(e,t){return e._cipher.decryptBlock(t)}},function(e,t,r){var n=r(28),i=r(58),a=r(1).Buffer,o=r(57),s=r(8),c=r(23),u=r(22);function f(e,t,r){s.call(this),this._cache=new l,this._cipher=new c.AES(t),this._prev=a.from(r),this._mode=e,this._autopadding=!0}r(0)(f,s),f.prototype._update=function(e){var t,r;this._cache.add(e);for(var n=[];t=this._cache.get();)r=this._mode.encrypt(this,t),n.push(r);return a.concat(n)};var h=a.alloc(16,16);function l(){this.cache=a.allocUnsafe(0)}function d(e,t,r){var s=n[e.toLowerCase()];if(!s)throw new TypeError("invalid suite type");if("string"==typeof t&&(t=a.from(t)),t.length!==s.key/8)throw new TypeError("invalid key length "+t.length);if("string"==typeof r&&(r=a.from(r)),"GCM"!==s.mode&&r.length!==s.iv)throw new TypeError("invalid iv length "+r.length);return"stream"===s.type?new o(s.module,t,r):"auth"===s.type?new i(s.module,t,r):new f(s.module,t,r)}f.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return e=this._mode.encrypt(this,e),this._cipher.scrub(),e;if(!e.equals(h))throw this._cipher.scrub(),new Error("data not multiple of block length")},f.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},l.prototype.add=function(e){this.cache=a.concat([this.cache,e])},l.prototype.get=function(){if(this.cache.length>15){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e}return null},l.prototype.flush=function(){for(var e=16-this.cache.length,t=a.allocUnsafe(e),r=-1;++r<e;)t.writeUInt8(e,r);return a.concat([this.cache,t])},t.createCipheriv=d,t.createCipher=function(e,t){var r=n[e.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var i=u(t,!1,r.key,r.iv);return d(e,i.key,i.iv)}},function(e,t,r){"use strict";var n=r(5),i=r(0),a=r(30),o=a.Cipher,s=a.DES;function c(e,t){n.equal(t.length,24,"Invalid key length");var r=t.slice(0,8),i=t.slice(8,16),a=t.slice(16,24);this.ciphers="encrypt"===e?[s.create({type:"encrypt",key:r}),s.create({type:"decrypt",key:i}),s.create({type:"encrypt",key:a})]:[s.create({type:"decrypt",key:a}),s.create({type:"encrypt",key:i}),s.create({type:"decrypt",key:r})]}function u(e){o.call(this,e);var t=new c(this.type,this.options.key);this._edeState=t}i(u,o),e.exports=u,u.create=function(e){return new u(e)},u.prototype._update=function(e,t,r,n){var i=this._edeState;i.ciphers[0]._update(e,t,r,n),i.ciphers[1]._update(r,n,r,n),i.ciphers[2]._update(r,n,r,n)},u.prototype._pad=s.prototype._pad,u.prototype._unpad=s.prototype._unpad},function(e,t,r){"use strict";var n=r(5),i=r(0),a={};function o(e){n.equal(e.length,8,"Invalid IV length"),this.iv=new Array(8);for(var t=0;t<this.iv.length;t++)this.iv[t]=e[t]}t.instantiate=function(e){function t(t){e.call(this,t),this._cbcInit()}i(t,e);for(var r=Object.keys(a),n=0;n<r.length;n++){var o=r[n];t.prototype[o]=a[o]}return t.create=function(e){return new t(e)},t},a._cbcInit=function(){var e=new o(this.options.iv);this._cbcState=e},a._update=function(e,t,r,n){var i=this._cbcState,a=this.constructor.super_.prototype,o=i.iv;if("encrypt"===this.type){for(var s=0;s<this.blockSize;s++)o[s]^=e[t+s];for(a._update.call(this,o,0,r,n),s=0;s<this.blockSize;s++)o[s]=r[n+s]}else{for(a._update.call(this,e,t,r,n),s=0;s<this.blockSize;s++)r[n+s]^=o[s];for(s=0;s<this.blockSize;s++)o[s]=e[t+s]}}},function(e,t,r){"use strict";var n=r(5),i=r(0),a=r(30),o=a.utils,s=a.Cipher;function c(){this.tmp=new Array(2),this.keys=null}function u(e){s.call(this,e);var t=new c;this._desState=t,this.deriveKeys(t,e.key)}i(u,s),e.exports=u,u.create=function(e){return new u(e)};var f=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];u.prototype.deriveKeys=function(e,t){e.keys=new Array(32),n.equal(t.length,this.blockSize,"Invalid key length");var r=o.readUInt32BE(t,0),i=o.readUInt32BE(t,4);o.pc1(r,i,e.tmp,0),r=e.tmp[0],i=e.tmp[1];for(var a=0;a<e.keys.length;a+=2){var s=f[a>>>1];r=o.r28shl(r,s),i=o.r28shl(i,s),o.pc2(r,i,e.keys,a)}},u.prototype._update=function(e,t,r,n){var i=this._desState,a=o.readUInt32BE(e,t),s=o.readUInt32BE(e,t+4);o.ip(a,s,i.tmp,0),a=i.tmp[0],s=i.tmp[1],"encrypt"===this.type?this._encrypt(i,a,s,i.tmp,0):this._decrypt(i,a,s,i.tmp,0),a=i.tmp[0],s=i.tmp[1],o.writeUInt32BE(r,a,n),o.writeUInt32BE(r,s,n+4)},u.prototype._pad=function(e,t){for(var r=e.length-t,n=t;n<e.length;n++)e[n]=r;return!0},u.prototype._unpad=function(e){for(var t=e[e.length-1],r=e.length-t;r<e.length;r++)n.equal(e[r],t);return e.slice(0,e.length-t)},u.prototype._encrypt=function(e,t,r,n,i){for(var a=t,s=r,c=0;c<e.keys.length;c+=2){var u=e.keys[c],f=e.keys[c+1];o.expand(s,e.tmp,0),u^=e.tmp[0],f^=e.tmp[1];var h=o.substitute(u,f),l=s;s=(a^o.permute(h))>>>0,a=l}o.rip(s,a,n,i)},u.prototype._decrypt=function(e,t,r,n,i){for(var a=r,s=t,c=e.keys.length-2;c>=0;c-=2){var u=e.keys[c],f=e.keys[c+1];o.expand(a,e.tmp,0),u^=e.tmp[0],f^=e.tmp[1];var h=o.substitute(u,f),l=a;a=(s^o.permute(h))>>>0,s=l}o.rip(a,s,n,i)}},function(e,t,r){"use strict";var n=r(5);function i(e){this.options=e,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0}e.exports=i,i.prototype._init=function(){},i.prototype.update=function(e){return 0===e.length?[]:"decrypt"===this.type?this._updateDecrypt(e):this._updateEncrypt(e)},i.prototype._buffer=function(e,t){for(var r=Math.min(this.buffer.length-this.bufferOff,e.length-t),n=0;n<r;n++)this.buffer[this.bufferOff+n]=e[t+n];return this.bufferOff+=r,r},i.prototype._flushBuffer=function(e,t){return this._update(this.buffer,0,e,t),this.bufferOff=0,this.blockSize},i.prototype._updateEncrypt=function(e){var t=0,r=0,n=(this.bufferOff+e.length)/this.blockSize|0,i=new Array(n*this.blockSize);0!==this.bufferOff&&(t+=this._buffer(e,t),this.bufferOff===this.buffer.length&&(r+=this._flushBuffer(i,r)));for(var a=e.length-(e.length-t)%this.blockSize;t<a;t+=this.blockSize)this._update(e,t,i,r),r+=this.blockSize;for(;t<e.length;t++,this.bufferOff++)this.buffer[this.bufferOff]=e[t];return i},i.prototype._updateDecrypt=function(e){for(var t=0,r=0,n=Math.ceil((this.bufferOff+e.length)/this.blockSize)-1,i=new Array(n*this.blockSize);n>0;n--)t+=this._buffer(e,t),r+=this._flushBuffer(i,r);return t+=this._buffer(e,t),i},i.prototype.final=function(e){var t,r;return e&&(t=this.update(e)),r="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),t?t.concat(r):r},i.prototype._pad=function(e,t){if(0===t)return!1;for(;t<e.length;)e[t++]=0;return!0},i.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var e=new Array(this.blockSize);return this._update(this.buffer,0,e,0),e},i.prototype._unpad=function(e){return e},i.prototype._finalDecrypt=function(){n.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var e=new Array(this.blockSize);return this._flushBuffer(e,0),this._unpad(e)}},function(e,t,r){"use strict";t.readUInt32BE=function(e,t){return(e[0+t]<<24|e[1+t]<<16|e[2+t]<<8|e[3+t])>>>0},t.writeUInt32BE=function(e,t,r){e[0+r]=t>>>24,e[1+r]=t>>>16&255,e[2+r]=t>>>8&255,e[3+r]=255&t},t.ip=function(e,t,r,n){for(var i=0,a=0,o=6;o>=0;o-=2){for(var s=0;s<=24;s+=8)i<<=1,i|=t>>>s+o&1;for(s=0;s<=24;s+=8)i<<=1,i|=e>>>s+o&1}for(o=6;o>=0;o-=2){for(s=1;s<=25;s+=8)a<<=1,a|=t>>>s+o&1;for(s=1;s<=25;s+=8)a<<=1,a|=e>>>s+o&1}r[n+0]=i>>>0,r[n+1]=a>>>0},t.rip=function(e,t,r,n){for(var i=0,a=0,o=0;o<4;o++)for(var s=24;s>=0;s-=8)i<<=1,i|=t>>>s+o&1,i<<=1,i|=e>>>s+o&1;for(o=4;o<8;o++)for(s=24;s>=0;s-=8)a<<=1,a|=t>>>s+o&1,a<<=1,a|=e>>>s+o&1;r[n+0]=i>>>0,r[n+1]=a>>>0},t.pc1=function(e,t,r,n){for(var i=0,a=0,o=7;o>=5;o--){for(var s=0;s<=24;s+=8)i<<=1,i|=t>>s+o&1;for(s=0;s<=24;s+=8)i<<=1,i|=e>>s+o&1}for(s=0;s<=24;s+=8)i<<=1,i|=t>>s+o&1;for(o=1;o<=3;o++){for(s=0;s<=24;s+=8)a<<=1,a|=t>>s+o&1;for(s=0;s<=24;s+=8)a<<=1,a|=e>>s+o&1}for(s=0;s<=24;s+=8)a<<=1,a|=e>>s+o&1;r[n+0]=i>>>0,r[n+1]=a>>>0},t.r28shl=function(e,t){return e<<t&268435455|e>>>28-t};var n=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];t.pc2=function(e,t,r,i){for(var a=0,o=0,s=n.length>>>1,c=0;c<s;c++)a<<=1,a|=e>>>n[c]&1;for(c=s;c<n.length;c++)o<<=1,o|=t>>>n[c]&1;r[i+0]=a>>>0,r[i+1]=o>>>0},t.expand=function(e,t,r){var n=0,i=0;n=(1&e)<<5|e>>>27;for(var a=23;a>=15;a-=4)n<<=6,n|=e>>>a&63;for(a=11;a>=3;a-=4)i|=e>>>a&63,i<<=6;i|=(31&e)<<1|e>>>31,t[r+0]=n>>>0,t[r+1]=i>>>0};var i=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];t.substitute=function(e,t){for(var r=0,n=0;n<4;n++)r<<=4,r|=i[64*n+(e>>>18-6*n&63)];for(n=0;n<4;n++)r<<=4,r|=i[256+64*n+(t>>>18-6*n&63)];return r>>>0};var a=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];t.permute=function(e){for(var t=0,r=0;r<a.length;r++)t<<=1,t|=e>>>a[r]&1;return t>>>0},t.padSplit=function(e,t,r){for(var n=e.toString(2);n.length<t;)n="0"+n;for(var i=[],a=0;a<t;a+=r)i.push(n.slice(a,a+r));return i.join(" ")}},function(e,t,r){(function(t){var n=r(8),i=r(30),a=r(0),o={"des-ede3-cbc":i.CBC.instantiate(i.EDE),"des-ede3":i.EDE,"des-ede-cbc":i.CBC.instantiate(i.EDE),"des-ede":i.EDE,"des-cbc":i.CBC.instantiate(i.DES),"des-ecb":i.DES};function s(e){n.call(this);var r,i=e.mode.toLowerCase(),a=o[i];r=e.decrypt?"decrypt":"encrypt";var s=e.key;"des-ede"!==i&&"des-ede-cbc"!==i||(s=t.concat([s,s.slice(0,8)]));var c=e.iv;this._des=a.create({key:s,iv:c,type:r})}o.des=o["des-cbc"],o.des3=o["des-ede3-cbc"],e.exports=s,a(s,n),s.prototype._update=function(e){return new t(this._des.update(e))},s.prototype._final=function(){return new t(this._des.final())}}).call(this,r(2).Buffer)},function(e,t,r){var n=r(148),i=r(29),a=r(28),o=r(133),s=r(22);function c(e,t,r){if(e=e.toLowerCase(),a[e])return i.createCipheriv(e,t,r);if(o[e])return new n({key:t,iv:r,mode:e});throw new TypeError("invalid suite type")}function u(e,t,r){if(e=e.toLowerCase(),a[e])return i.createDecipheriv(e,t,r);if(o[e])return new n({key:t,iv:r,mode:e,decrypt:!0});throw new TypeError("invalid suite type")}t.createCipher=t.Cipher=function(e,t){var r,n;if(e=e.toLowerCase(),a[e])r=a[e].key,n=a[e].iv;else{if(!o[e])throw new TypeError("invalid suite type");r=8*o[e].key,n=o[e].iv}var i=s(t,!1,r,n);return c(e,i.key,i.iv)},t.createCipheriv=t.Cipheriv=c,t.createDecipher=t.Decipher=function(e,t){var r,n;if(e=e.toLowerCase(),a[e])r=a[e].key,n=a[e].iv;else{if(!o[e])throw new TypeError("invalid suite type");r=8*o[e].key,n=o[e].iv}var i=s(t,!1,r,n);return u(e,i.key,i.iv)},t.createDecipheriv=t.Decipheriv=u,t.listCiphers=t.getCiphers=function(){return Object.keys(o).concat(i.getCiphers())}},function(e,t,r){(function(t,n){var i,a=r(64),o=r(63),s=r(62),c=r(1).Buffer,u=t.crypto&&t.crypto.subtle,f={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},h=[];function l(e,t,r,n,i){return u.importKey("raw",e,{name:"PBKDF2"},!1,["deriveBits"]).then((function(e){return u.deriveBits({name:"PBKDF2",salt:t,iterations:r,hash:{name:i}},e,n<<3)})).then((function(e){return c.from(e)}))}e.exports=function(e,r,d,p,y,g){"function"==typeof y&&(g=y,y=void 0);var v=f[(y=y||"sha1").toLowerCase()];if(!v||"function"!=typeof t.Promise)return n.nextTick((function(){var t;try{t=s(e,r,d,p,y)}catch(e){return g(e)}g(null,t)}));if(a(e,r,d,p),"function"!=typeof g)throw new Error("No callback provided to pbkdf2");c.isBuffer(e)||(e=c.from(e,o)),c.isBuffer(r)||(r=c.from(r,o)),function(e,t){e.then((function(e){n.nextTick((function(){t(null,e)}))}),(function(e){n.nextTick((function(){t(e)}))}))}(function(e){if(t.process&&!t.process.browser)return Promise.resolve(!1);if(!u||!u.importKey||!u.deriveBits)return Promise.resolve(!1);if(void 0!==h[e])return h[e];var r=l(i=i||c.alloc(8),i,10,128,e).then((function(){return!0})).catch((function(){return!1}));return h[e]=r,r}(v).then((function(t){return t?l(e,r,d,p,v):s(e,r,d,p,y)})),g)}}).call(this,r(7),r(9))},function(e,t,r){e.exports=r(66)},function(e,t,r){"use strict";var n=r(0),i=r(1).Buffer,a=r(8),o=i.alloc(128),s=64;function c(e,t){a.call(this,"digest"),"string"==typeof t&&(t=i.from(t)),this._alg=e,this._key=t,t.length>s?t=e(t):t.length<s&&(t=i.concat([t,o],s));for(var r=this._ipad=i.allocUnsafe(s),n=this._opad=i.allocUnsafe(s),c=0;c<s;c++)r[c]=54^t[c],n[c]=92^t[c];this._hash=[r]}n(c,a),c.prototype._update=function(e){this._hash.push(e)},c.prototype._final=function(){var e=this._alg(i.concat(this._hash));return this._alg(i.concat([this._opad,e]))},e.exports=c},function(e,t,r){var n=r(0),i=r(69),a=r(11),o=r(1).Buffer,s=new Array(160);function c(){this.init(),this._w=s,a.call(this,128,112)}n(c,i),c.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},c.prototype._hash=function(){var e=o.allocUnsafe(48);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e},e.exports=c},function(e,t,r){var n=r(0),i=r(70),a=r(11),o=r(1).Buffer,s=new Array(64);function c(){this.init(),this._w=s,a.call(this,64,56)}n(c,i),c.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},c.prototype._hash=function(){var e=o.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},e.exports=c},function(e,t,r){var n=r(0),i=r(11),a=r(1).Buffer,o=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function c(){this.init(),this._w=s,i.call(this,64,56)}function u(e){return e<<5|e>>>27}function f(e){return e<<30|e>>>2}function h(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(c,i),c.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},c.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,a=0|this._c,s=0|this._d,c=0|this._e,l=0;l<16;++l)r[l]=e.readInt32BE(4*l);for(;l<80;++l)r[l]=(t=r[l-3]^r[l-8]^r[l-14]^r[l-16])<<1|t>>>31;for(var d=0;d<80;++d){var p=~~(d/20),y=u(n)+h(p,i,a,s)+c+r[d]+o[p]|0;c=s,s=a,a=f(i),i=n,n=y}this._a=n+this._a|0,this._b=i+this._b|0,this._c=a+this._c|0,this._d=s+this._d|0,this._e=c+this._e|0},c.prototype._hash=function(){var e=a.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=c},function(e,t,r){var n=r(0),i=r(11),a=r(1).Buffer,o=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function c(){this.init(),this._w=s,i.call(this,64,56)}function u(e){return e<<30|e>>>2}function f(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(c,i),c.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},c.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,a=0|this._c,s=0|this._d,c=0|this._e,h=0;h<16;++h)r[h]=e.readInt32BE(4*h);for(;h<80;++h)r[h]=r[h-3]^r[h-8]^r[h-14]^r[h-16];for(var l=0;l<80;++l){var d=~~(l/20),p=0|((t=n)<<5|t>>>27)+f(d,i,a,s)+c+r[l]+o[d];c=s,s=a,a=u(i),i=n,n=p}this._a=n+this._a|0,this._b=i+this._b|0,this._c=a+this._c|0,this._d=s+this._d|0,this._e=c+this._e|0},c.prototype._hash=function(){var e=a.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=c},function(e,t,r){e.exports=r(35).PassThrough},function(e,t,r){e.exports=r(35).Transform},function(e,t,r){e.exports=r(10)},function(e,t,r){e.exports=r(34)},function(e,t,r){"use strict";e.exports=a;var n=r(71),i=r(17);function a(e){if(!(this instanceof a))return new a(e);n.call(this,e)}i.inherits=r(0),i.inherits(a,n),a.prototype._transform=function(e,t,r){r(null,e)}},function(e,t,r){(function(t){function r(e){try{if(!t.localStorage)return!1}catch(e){return!1}var r=t.localStorage[e];return null!=r&&"true"===String(r).toLowerCase()}e.exports=function(e,t){if(r("noDeprecation"))return e;var n=!1;return function(){if(!n){if(r("throwDeprecation"))throw new Error(t);r("traceDeprecation")?console.trace(t):console.warn(t),n=!0}return e.apply(this,arguments)}}}).call(this,r(7))},function(e,t,r){(function(e,t){!function(e,r){"use strict";if(!e.setImmediate){var n,i,a,o,s,c=1,u={},f=!1,h=e.document,l=Object.getPrototypeOf&&Object.getPrototypeOf(e);l=l&&l.setTimeout?l:e,"[object process]"==={}.toString.call(e.process)?n=function(e){t.nextTick((function(){p(e)}))}:function(){if(e.postMessage&&!e.importScripts){var t=!0,r=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=r,t}}()?(o="setImmediate$"+Math.random()+"$",s=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(o)&&p(+t.data.slice(o.length))},e.addEventListener?e.addEventListener("message",s,!1):e.attachEvent("onmessage",s),n=function(t){e.postMessage(o+t,"*")}):e.MessageChannel?((a=new MessageChannel).port1.onmessage=function(e){p(e.data)},n=function(e){a.port2.postMessage(e)}):h&&"onreadystatechange"in h.createElement("script")?(i=h.documentElement,n=function(e){var t=h.createElement("script");t.onreadystatechange=function(){p(e),t.onreadystatechange=null,i.removeChild(t),t=null},i.appendChild(t)}):n=function(e){setTimeout(p,0,e)},l.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),r=0;r<t.length;r++)t[r]=arguments[r+1];var i={callback:e,args:t};return u[c]=i,n(c),c++},l.clearImmediate=d}function d(e){delete u[e]}function p(e){if(f)setTimeout(p,0,e);else{var t=u[e];if(t){f=!0;try{!function(e){var t=e.callback,r=e.args;switch(r.length){case 0:t();break;case 1:t(r[0]);break;case 2:t(r[0],r[1]);break;case 3:t(r[0],r[1],r[2]);break;default:t.apply(undefined,r)}}(t)}finally{d(e),f=!1}}}}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,r(7),r(9))},function(e,t,r){(function(e){var n=void 0!==e&&e||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function a(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new a(i.call(setTimeout,n,arguments),clearTimeout)},t.setInterval=function(){return new a(i.call(setInterval,n,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},a.prototype.unref=a.prototype.ref=function(){},a.prototype.close=function(){this._clearFn.call(n,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},r(163),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,r(7))},function(e,t){},function(e,t,r){"use strict";var n=r(1).Buffer,i=r(165);e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r},e.prototype.concat=function(e){if(0===this.length)return n.alloc(0);if(1===this.length)return this.head.data;for(var t,r,i=n.allocUnsafe(e>>>0),a=this.head,o=0;a;)t=i,r=o,a.data.copy(t,r),o+=a.data.length,a=a.next;return i},e}(),i&&i.inspect&&i.inspect.custom&&(e.exports.prototype[i.inspect.custom]=function(){var e=i.inspect({length:this.length});return this.constructor.name+" "+e})},function(e,t){},function(e,t){t.read=function(e,t,r,n,i){var a,o,s=8*i-n-1,c=(1<<s)-1,u=c>>1,f=-7,h=r?i-1:0,l=r?-1:1,d=e[t+h];for(h+=l,a=d&(1<<-f)-1,d>>=-f,f+=s;f>0;a=256*a+e[t+h],h+=l,f-=8);for(o=a&(1<<-f)-1,a>>=-f,f+=n;f>0;o=256*o+e[t+h],h+=l,f-=8);if(0===a)a=1-u;else{if(a===c)return o?NaN:1/0*(d?-1:1);o+=Math.pow(2,n),a-=u}return(d?-1:1)*o*Math.pow(2,a-n)},t.write=function(e,t,r,n,i,a){var o,s,c,u=8*a-i-1,f=(1<<u)-1,h=f>>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:a-1,p=n?1:-1,y=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=f):(o=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-o))<1&&(o--,c*=2),(t+=o+h>=1?l/c:l*Math.pow(2,1-h))*c>=2&&(o++,c/=2),o+h>=f?(s=0,o=f):o+h>=1?(s=(t*c-1)*Math.pow(2,i),o+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,i),o=0));i>=8;e[r+d]=255&s,d+=p,s/=256,i-=8);for(o=o<<i|s,u+=i;u>0;e[r+d]=255&o,d+=p,o/=256,u-=8);e[r+d-p]|=128*y}},function(e,t,r){"use strict";t.byteLength=function(e){var t=c(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){for(var t,r=c(e),n=r[0],o=r[1],s=new a(function(e,t,r){return 3*(t+r)/4-r}(0,n,o)),u=0,f=o>0?n-4:n,h=0;h<f;h+=4)t=i[e.charCodeAt(h)]<<18|i[e.charCodeAt(h+1)]<<12|i[e.charCodeAt(h+2)]<<6|i[e.charCodeAt(h+3)],s[u++]=t>>16&255,s[u++]=t>>8&255,s[u++]=255&t;return 2===o&&(t=i[e.charCodeAt(h)]<<2|i[e.charCodeAt(h+1)]>>4,s[u++]=255&t),1===o&&(t=i[e.charCodeAt(h)]<<10|i[e.charCodeAt(h+1)]<<4|i[e.charCodeAt(h+2)]>>2,s[u++]=t>>8&255,s[u++]=255&t),s},t.fromByteArray=function(e){for(var t,r=e.length,i=r%3,a=[],o=16383,s=0,c=r-i;s<c;s+=o)a.push(u(e,s,s+o>c?c:s+o));return 1===i?(t=e[r-1],a.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],a.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"=")),a.join("")};for(var n=[],i=[],a="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)n[s]=o[s],i[o.charCodeAt(s)]=s;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function u(e,t,r){for(var i,a,o=[],s=t;s<r;s+=3)i=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),o.push(n[(a=i)>>18&63]+n[a>>12&63]+n[a>>6&63]+n[63&a]);return o.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t,r){"use strict";t.randomBytes=t.rng=t.pseudoRandomBytes=t.prng=r(12),t.createHash=t.Hash=r(18),t.createHmac=t.Hmac=r(68);var n=r(151),i=Object.keys(n),a=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(i);t.getHashes=function(){return a};var o=r(65);t.pbkdf2=o.pbkdf2,t.pbkdf2Sync=o.pbkdf2Sync;var s=r(149);t.Cipher=s.Cipher,t.createCipher=s.createCipher,t.Cipheriv=s.Cipheriv,t.createCipheriv=s.createCipheriv,t.Decipher=s.Decipher,t.createDecipher=s.createDecipher,t.Decipheriv=s.Decipheriv,t.createDecipheriv=s.createDecipheriv,t.getCiphers=s.getCiphers,t.listCiphers=s.listCiphers;var c=r(132);t.DiffieHellmanGroup=c.DiffieHellmanGroup,t.createDiffieHellmanGroup=c.createDiffieHellmanGroup,t.getDiffieHellman=c.getDiffieHellman,t.createDiffieHellman=c.createDiffieHellman,t.DiffieHellman=c.DiffieHellman;var u=r(126);t.createSign=u.createSign,t.Sign=u.Sign,t.createVerify=u.createVerify,t.Verify=u.Verify,t.createECDH=r(88);var f=r(87);t.publicEncrypt=f.publicEncrypt,t.privateEncrypt=f.privateEncrypt,t.publicDecrypt=f.publicDecrypt,t.privateDecrypt=f.privateDecrypt;var h=r(84);t.randomFill=h.randomFill,t.randomFillSync=h.randomFillSync,t.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},t.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.gostCertInstance=void 0;var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.GostCert=R;var i=r(173),a=r(78),o=r(39),s=r(77),c=r(83),u=ArrayBuffer,f=o.gostCodingInstance,h=a.gostSecurityInstance.providers,l=s.gostASN1Instance,d=c.gostSubtleInstance;function p(e){for(var t=1,r=arguments.length;t<r;t++){var i=arguments[t];if("object"===(void 0===i?"undefined":n(i)))for(var a in i)i.hasOwnProperty(a)&&(e[a]=i[a])}return e}function y(e){var t=function(){};t.prototype=e.prototype;for(var r=[new t],n=1;n<arguments.length;n++)r.push(arguments[n]);return p.apply(this,r)}function g(e){var t=new Date;return t.setHours(0,0,0,0),e&&t.setDate(t.getDate()+e),t}function v(e){try{e()}catch(e){}}var m,b,w=(m=function(e){var t=void 0===e?"undefined":n(e);return"undefined"===t||""===e?"0":"number"===t||e instanceof Number?e.toString(16).toLowerCase():e.replace("0x","").toLowerCase()},b=function(e,t){return(new Array(t+1).join("0")+e).slice(-t)},function(e,t){e=m(e),t=m(t);var r=Math.max(e.length,t.length);return b(e,r)===b(t,r)});function C(e,t){for(var r in e)if(e[r]!==t[r])return!1;for(var r in t)if(e[r]!==t[r])return!1;return!0}function E(e,t){var r=e.extensions&&e.extensions.subjectKeyIdentifier;return e&&t&&(!t.issuer||C(e.issuer,t.issuer))&&(!t.serialNumber||w(e.serialNumber,t.serialNumber))&&(!t.subjectKeyIdentifier||function(e,t){var r=new Uint8Array(e),n=new Uint8Array(t);if(r.length!==n.length)return!1;for(var i=0,a=r.length;i<a;i++)if(r[i]!==n[i])return!1;return!0}(r,t.subjectKeyIdentifier))&&(!t.subject||C(e.subject,t.subject))&&(!t.date||e.notBefore.getTime()<=t.date.getTime()&&e.notAfter.getTime()>t.date.getTime())}function S(e,t,r){var n={subject:e.issuer,date:r},i=t&&t.authorityKeyIdentifier;return i&&(n.subjectKeyIdentifier=i.keyIdentifier,i.authorityCertIssuer&&i.authorityCertIssuer[0]&&i.authorityCertSerialNumber&&(n.issuer=i.authorityCertIssuer[0],n.serialNumber=i.authorityCertSerialNumber)),n}function A(e,t){for(var r=[],n=0,i=e.length;n<i;n++)E(e[n],t)&&r.push(e[n]);return r}function B(e,t){return(!t.issuer||C(e.issuer,t.issuer))&&(!t.date||e.thisUpdate.getTime()<t.date.getTime())}function T(e,t){for(var r=[],n=0,i=e.length;n<i;n++)B(e[n],t)&&r.push(e[n]);return r}function I(e){var t=e.id;for(var r in h){var n=h[r];if(n.publicKey.id===t)return n}}function k(e,t,r,i){"object"!==(void 0===r?"undefined":n(r))&&(r={value:r}),void 0!==i&&(r.enumerable=i),Object.defineProperty(e,t,r)}function _(e,t,r){for(var n in t)k(e,n,t[n],r)}function y(e,t,r,n){if("function"!=typeof t&&(n=r,r=t,t=function(){e.apply(this,arguments)}),t.prototype=Object.create(e.prototype,{constructor:{value:t},superclass:{value:e.prototype}}),r&&_(t.prototype,r,!0),e!==Object)for(var i in e)t[i]=e[i];return t.super=e,n&&_(t,n,!0),t}function R(){}var x={providerName:"CP-01",subject:{countryName:"RU",commonName:"Anonymous"},caKeyUsage:["digitalSignature","nonRepudiation","keyEncipherment","dataEncipherment","keyAgreement","keyCertSign","cRLSign"],caExtKeyUsage:["serverAuth","clientAuth","codeSigning","emailProtection","ipsecEndSystem","ipsecTunnel","ipsecUser","timeStamping","OCSPSigning"],userKeyUsage:["digitalSignature","nonRepudiation","keyEncipherment","dataEncipherment","keyAgreement"],userExtKeyUsage:["clientAuth","emailProtection"],days:7305};R.prototype.options=x;var F=function(e){try{l.Certificate.call(this,e,!0)}catch(r){try{e=new l.CertificationRequest(e,!0)}catch(e){}e=e||{},l.Certificate.call(this,{version:2,serialNumber:e.serialNumber||(t=new Uint8Array(4),i.gostCrypto.getRandomValues(t),t[0]=127&t[0],f.Int16.encode(t)),signature:e.signature||{id:"noSignature"},issuer:e.subject||x.subject,notBefore:e.notBefore||g(),notAfter:e.notAfter||g(e.days||x.days),subject:e.subject||x.subject,subjectPublicKeyInfo:e.subjectPublicKeyInfo||{algorithm:{id:"noSignature"},subjectPublicKey:new u(0)},extensions:e.attributes&&(e.attributes.extensionRequest||e.attributes.msCertExtensions)||e.extensions,signatureAlgorithm:{id:"noSignature"},signatureValue:new u(0)})}var t};y(l.Certificate,F,{sign:function(e,t){var r=this,n=r.subjectPublicKeyInfo;return new Promise(v).then((function(){if(!n||!n.algorithm||"noSignature"===n.algorithm)throw new Error("Key pair was not generated for the certificate");if(!e)throw new Error("The private key of the issuer is not defined");return t=t||r,d.digest("SHA-1",n.subjectPublicKey)})).then((function(n){var i=t.getProvider()||h[x.providerName];r.signature&&"noSignature"!==r.signature.id||(r.signature=i.signature),r.signatureAlgorithm=r.signature,r.issuer=t.subject,r.extensions||(r.extensions={});var a=r.extensions,o=t.extensions;if(r===t)a.keyUsage=a.keyUsage||x.caKeyUsage,a.extKeyUsage=a.extKeyUsage||x.caExtKeyUsage,a.basicConstraints=a.basicConstraints||{cA:!0};else{if(!t.checkUsage("keyCertSign",r.notBefore))throw new Error("The issuer's certificate is not valid for signing a certificate");if(a.keyUsage=a.keyUsage||x.userKeyUsage,a.extKeyUsage=a.extKeyUsage||x.userExtKeyUsage,a.basicConstraints=a.basicConstraints||{cA:a.keyUsage.indexOf("keyCertSign")>=0},a.basicConstraints.cA){var s=o&&o.basicConstraints&&o.pathLenConstraint;if(void 0!==s){if(!(s>0))throw new Error("Path length constraint exceeded");a.basicConstraints.pathLenConstraint=s-1}}}return a.subjectKeyIdentifier=n,o&&o.subjectKeyIdentifier&&(a.authorityKeyIdentifier={keyIdentifier:o.subjectKeyIdentifier,authorityCertIssuer:[t.issuer],authorityCertSerialNumber:t.serialNumber}),d.importKey("pkcs8",e.encode(),e.privateKeyAlgorithm,!1,["sign"])})).then((function(e){return d.sign(r.signatureAlgorithm,e,r.tbsCertificate.encode())})).then((function(e){return r.signatureValue=e,r}))},generate:function(e){var t,r,n=this;return(r=e?h[e]:this.getProvider()||h[x.providerName])&&(e=p(r.publicKey,{privateKey:r.privateKey})),new Promise(v).then((function(){return d.generateKey(e,"true",["sign","verify"])})).then((function(e){return t=e.privateKey,d.exportKey("spki",e.publicKey)})).then((function(e){return n.subjectPublicKeyInfo=new l.SubjectPublicKeyInfo(e),d.exportKey("pkcs8",t)})).then((function(e){return new l.PrivateKeyInfo(e)}))},getPublicKey:function(){var e=this.subjectPublicKeyInfo,t="rsaEncryption"===e.algorithm.id?["verify"]:["verify","deriveKey","deriveBits"];return d.importKey("spki",e.encode(),e.algorithm,"false",t)},getProvider:function(){return I(this.subjectPublicKeyInfo.algorithm)},verify:function(e,t,r){var n=this,i=n.extensions;return new Promise(v).then((function(){if(r=r||g(),n.notBefore.getTime()>r.getTime()||n.notAfter.getTime()<=r.getTime())throw new Error("The certificate has not yet started or expired");for(var t in i)if(i[t].critical&&["authorityKeyIdentifier","subjectKeyIdentifier","keyUsage","certificatePolicies","policyMappings","basicConstraints","nameConstraints","policyConstraints","extKeyUsage"].indexOf(t)<0)throw new Error("The critical extension '"+t+"' is unrecognized");var a=S(n,i,n.notBefore);if(!e&&E(n,a)&&(e=n),e){if(!E(e,a)||!e.checkUsage("keyCertSign",n.notBefore))throw new Error("The issuer's certificate is not valid");return e.verifySignature(n.tbsCertificate.encode(),n.signatureValue,n.signatureAlgorithm)}return!0})).then((function(e){if(!e)throw new Error("The certificate has invalid signature");if(t){if(!B(t,{issuer:n.issuer,date:r}))throw new Error("The issuer's CRL is not valid");if(t.isRevoked(n.serialNumber))throw new Error("The certificate is revoked")}return n}))},verifySignature:function(e,t,r){return this.getPublicKey().then((function(n){return d.verify(r,n,t,e)}))},checkUsage:function(e,t){var r=this,n=r.extensions;return t=t||g(),r.notBefore.getTime()<=t.getTime()&&r.notAfter.getTime()>t.getTime()&&(!n||!(["keyCertSign","cRLSign"].indexOf(e)>0&&n.basicConstraints&&!n.basicConstraints.cA||n.keyUsage&&n.keyUsage.indexOf(e)<0&&n.extKeyUsage&&n.extKeyUsage.indexOf(e)<0))}}),R.prototype.X509=F;var D=function e(t){e.super.call(this,t),this.version||(this.version=1),this.revokedCertificates||(this.revokedCertificates=[]),this.thisUpdate||(this.thisUpdate=g())};function P(e){try{l.CertificationRequest.call(this,e,!0)}catch(t){e=e||{},l.CertificationRequest.call(this,{version:0,subject:e.subject||x.subject,subjectPublicKeyInfo:e.subjectPublicKeyInfo||{algorithm:{id:"noSignature"},subjectPublicKey:new u(0)},attributes:e.attributes||{extensionRequest:{keyUsage:x.userKeyUsage,extKeyUsage:x.userExtKeyUsage}},signatureAlgorithm:{id:"noSignature"},signatureValue:new u(0)})}}function U(e,t){this.certificates=e||[],this.crls=t||[]}function N(e){this.certStore=e}function L(){}function M(e,t,r){this.trustedCACerts=e||[],this.requireCRL=t||!1,this.requireCA=r||!0}y(l.CertificateList,D,{sign:function(e,t){var r=this;return new Promise(v).then((function(){if(!e)throw new Error("The issuer's private key is not defined");if(!t)throw new Error("The issuer's certificate is not defined");if(r.issuer){if(!C(r.issuer,t.issuer))throw new Error("The CRL prototype and authority certificate have different issuers")}else r.issuer=t.issuer;if(!t.checkUsage("cRLSign",r.thisUpdate))throw new Error("The issuer's certificate is not valid for signing a CRL");var n=t.getProvider()||h[x.providerName];r.signature||(r.signature=n.signature),r.signatureAlgorithm=r.signature,r.issuer=t.subject,r.crlExtensions||(r.crlExtensions={});var i=r.crlExtensions,a=t.extensions;return a&&a.subjectKeyIdentifier&&(i.authorityKeyIdentifier={keyIdentifier:a.subjectKeyIdentifier,authorityCertIssuer:[t.issuer],authorityCertSerialNumber:t.serialNumber}),i.cRLNumber=i.cRLNumber||0,d.importKey("pkcs8",e.encode(),e.privateKeyAlgorithm,!1,["sign"])})).then((function(e){return d.sign(r.signatureAlgorithm,e,r.tbsCertList.encode())})).then((function(e){return r.signatureValue=e,r}))},verify:function(e,t){var r=this,n=r.crlExtensions;return new Promise(v).then((function(){if(t=t||g(),!r.thisUpdate.getTime()>t.getTime())throw new Error("The CRL has not yet started");if(e){if(!E(e,S(r,n,r.thisUpdate))||!e.checkUsage("cRLSign",r.thisUpdate))throw new Error("The issuer's certificate is not valid");if(!r.signatureValue||!r.signatureAlgorithm)throw new Error("The has no signature");return e.verifySignature(r.tbsCertList.encode(),r.signatureValue,r.signatureAlgorithm)}})).then((function(e){if(!e)throw new Error("The CRL has invalid signature");return r}))},isRevoked:function(e,t){var r=this.revokedCertificates;t=t||g();for(var n=0;n<r.length;n++)if(t.getTime()>=r[n].revocationDate.getTime()&&w(r[n].userCertificate,e))return!0;return!1}}),R.prototype.CRL=D,y(l.CertificationRequest,P,{generate:function(e){var t,r,n=this;return(r=e?h[e]:this.getProvider()||h[x.providerName])&&(e=p(r.publicKey,{privateKey:r.privateKey})),new Promise(v).then((function(){return d.generateKey(e,"true",["sign","verify"])})).then((function(e){return t=e.privateKey,d.exportKey("spki",e.publicKey)})).then((function(e){return n.subjectPublicKeyInfo=new l.SubjectPublicKeyInfo(e),d.exportKey("pkcs8",t)})).then((function(e){return t=new l.PrivateKeyInfo(e),n.sign(t)})).then((function(){return t}))},getProvider:function(){return I(this.subjectPublicKeyInfo.algorithm)},sign:function(e){var t=this,r=t.subjectPublicKeyInfo;return new Promise(v).then((function(){if(!r||!r.algorithm||"noSignature"===r.algorithm)throw new Error("Key pair was not generated for the certificate");if(!e)throw new Error("The private key is not defined");var n=I(r.algorithm)||h[x.providerName];return t.signatureAlgorithm=n.signature,d.importKey("pkcs8",e.encode(),e.privateKeyAlgorithm,!1,["sign"])})).then((function(e){return d.sign(t.signatureAlgorithm,e,t.requestInfo.encode())})).then((function(e){return t.signatureValue=e,t}))},verify:function(){var e=this,t=e.subjectPublicKeyInfo;return new Promise(v).then((function(){return d.importKey("spki",t.encode(),t.algorithm,"false",["verify"])})).then((function(t){return d.verify(e.signatureAlgorithm,t,e.signatureValue,e.requestInfo.encode())})).then((function(t){if(!t)throw new Error("The certification request has invalid signature");return e}))}}),R.prototype.Request=P,y(Object,U,{getCertificates:function(e){return A(this.certificates,e)},getCRLs:function(e){return T(this.certificates,e)},load:function(e){for(var t=new l.ContentInfo(e),r=t.certificates,n=t.crls,i=0;i<r.length;i++)this.certificates.push(new F(r[i]));for(i=0;i<n.length;i++)this.crls.push(new D(n[i]));return this},store:function(){return new l.ContentInfo({contentType:"signedData",version:0,digestAlgorithms:[],encapContentInfo:{contentType:"data"},certificates:this.certs,crls:this.crls,signerInfos:[]})}}),R.prototype.CertStore=U,y(Object,N,{build:function(e,t){var r=this;return new Promise(v).then((function(){for(var n=new F(e),i=[],a=!1,o=[];n;){var s=[],c=[];if(i.push(n),!a){s=r.certStore.getCRLs({issuer:n.issuer,date:t});var u=S(n,n.extensions,n.notBefore);E(n,u)?a=!0:c=r.certStore.getCertificates(u)}var f=c.length>0&&new F(c[0]),h=s.length>0&&new D(s[0]);h&&o.push(h.verify(f,t)),o.push(n.verify(f,h,t)),n=f}if(!a)throw new Error("Root certificate is not found");return Promise.all(o).then((function(e){for(var t=0;t<e;t++)if(!e[t])throw new Error("Certification path is not validated");return i}))}))}}),R.prototype.CertPath=N,y(Object,L,{getValidCertificate:function(e,t,r){}}),R.prototype.CertificateTrustPolicy=L,y(L,M,{getValidCertificate:function(e,t,r,n){var i,a=this;return new Promise(v).then((function(){t=t||[],r=r||[];var o=A(a.trustedCACerts,e);if(o.length>0)return new F(o[0]);if(0!==(o=A(t,e)).length){var s=new F(o[0]),c=!1,u=[];for(i=[];s;){var f=[],h=[];if(i.push(s),!c){if(0===(f=T(r,{issuer:s.issuer,date:n})).length&&a.requireCRL)return;if(e=S(s,s.extensions,s.notBefore),0===(h=A(a.trustedCACerts,e)).length){if(!E(s,e)){if(!((h=A(t,e)).length>0))return;var l=h[0].extensions;if(a.requireCA){if(!l||!l.basicConstraints||!l.basicConstraints.cA)return;if(void 0!==l.basicConstraints.pathLenConstraint&&l.basicConstraints.pathLenConstraint<i.length-1)return}}}else c=!0}var d=h.length>0&&new F(h[0]),p=f.length>0&&new D(f[0]);p&&u.push(p.verify(d,n)),u.push(s.verify(d,p,n)),s=d}if(!c)throw new Error("Trusted root certificate is not found");return Promise.all(u).then((function(e){for(var t=0;t<e;t++)if(!e[t])throw new Error("Certification path is not validated");return i[0]}))}}))}}),R.prototype.TrustedCAPolicy=M,t.gostCertInstance=new R},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.gostCMSInstance=void 0;var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.GostCMS=D;var i=r(83),a=r(77),o=r(39),s=r(171),c=r(78),u=ArrayBuffer,f=c.gostSecurityInstance.providers,h=o.gostCodingInstance,l=a.gostASN1Instance,d=i.gostSubtleInstance,p=s.gostCertInstance;function y(){for(var e={},t=0,r=arguments.length;t<r;t++){var i=arguments[t];if("object"===(void 0===i?"undefined":n(i)))for(var a in i)i.hasOwnProperty(a)&&(e[a]=i[a])}return e}function g(e,t,r,i){"object"!==(void 0===r?"undefined":n(r))&&(r={value:r}),void 0!==i&&(r.enumerable=i),Object.defineProperty(e,t,r)}function v(e,t,r){for(var n in t)g(e,n,t[n],r)}function m(e,t,r,n){if("function"!=typeof t&&(n=r,r=t,t=function(){e.apply(this,arguments)}),t.prototype=Object.create(e.prototype,{constructor:{value:t},superclass:{value:e.prototype}}),r&&v(t.prototype,r,!0),e!==Object)for(var i in e)t[i]=e[i];return t.super=e,n&&v(t,n,!0),t}function b(e){try{e()}catch(e){}}function w(e,t){var r=new Uint8Array(e),n=new Uint8Array(t);if(r.length!==n.length)return!1;for(var i=0,a=r.length;i<a;i++)if(r[i]!==n[i])return!1;return!0}var C,E,S=(C=function(e){var t=void 0===e?"undefined":n(e);return"undefined"===t||""===e?"0":"number"===t||e instanceof Number?e.toString(16).toLowerCase():e.replace("0x","").toLowerCase()},E=function(e,t){return(new Array(t+1).join("0")+e).slice(-t)},function(e,t){e=C(e),t=C(t);var r=Math.max(e.length,t.length);return E(e,r)===E(t,r)});function A(e,t){for(var r in e)if(e[r]!==t[r])return!1;for(var r in t)if(e[r]!==t[r])return!1;return!0}function B(e,t,r){for(var n=!1,i=0,a=e.length;i<a;i++)if(r(e[i],t)){n=!0;break}n||e.push(t)}function T(e,t){var r=e.content;switch(e.contentType){case"data":e.content=t.content;break;case"digestedData":case"signedData":case"authData":r.encapContentInfo={eContentType:t.contentType,eContent:t.content};break;case"envelopedData":case"encryptedData":r.encryptedContentInfo={contentType:t.contentType,encryptedContent:t.content}}}function I(e){var t=e.content;switch(e.contentType){case"data":return{contentType:e.contentType,content:e.content};case"digestedData":case"signedData":case"authData":var r=t.encapContentInfo;return{contentType:r.eContentType,content:r.eContent};case"envelopedData":case"encryptedData":var n=t.encryptedContentInfo;return{contentType:n.contentType,content:n.encryptedContent}}}function k(e){var t,r;if(e){if("string"==typeof e)try{e=h.PEM.decode(e)}catch(t){e=h.Chars.decode(e)}if(e instanceof u)try{e=l.ContentInfo.decode(e)}catch(t){e={contentType:"data",content:e}}if(!(r=e.contentType))throw new Error("Invalid content object");return(t=e.content)instanceof u||(t=t.encode()),{contentType:r,content:t}}return{contentType:"data"}}function _(e){try{e=new l.ContentInfo(e.content,!0)}catch(e){}switch(e.contentType){case"data":return new U(e);case"digestedData":return new N(e);case"signedData":return new L(e);case"encryptedData":return new M(e);case"envelopedData":return new O(e);default:return new l.ContentInfo(e)}}function R(e,t){return e instanceof u?t.extensions&&w(e,t.extensions.subjectKeyIdentifier):A(t.issuer,e.issuer)&&S(t.serialNumber,e.serialNumber)}function x(e){var t=new Uint8Array(e);return gostCrypto.getRandomValues(t),t.buffer}function F(e,t){if(!t)return new u(0);if(t instanceof u)return t;if("string"!=typeof t)throw new Error("The password must be string or raw data type");if(e.name.indexOf("CPKDF")>=0){for(var r=[],n=0;n<t.length;n++){var i=t.charCodeAt(n);r.push(255&i),r.push(i>>>8&255),r.push(0),r.push(0)}return new Uint8Array(r).buffer}return e.name.indexOf("PFXKDF")>=0?h.Chars.decode(t+"\0","unicode"):h.Chars.decode(t,"utf8")}function D(){}var P={providerName:"CP-01",autoAddCert:!1,useKeyIdentifier:!1};function U(e,t){if(l.ContentInfo.call(this,e||t||{contentType:"data"}),t&&this.contentType!==(t.contentType||"data"))throw new Error("Invalid content type")}function N(e){U.call(this,e,{contentType:"digestedData",version:0,digestAlgorithm:f[P.providerName].digest,encapContentInfo:{eContentType:"data"},digest:new u(0)})}function L(e){U.call(this,e,{contentType:"signedData",version:1,digestAlgorithms:[],encapContentInfo:{eContentType:"data"},signerInfos:[]})}function M(e){U.call(this,e,{contentType:"encryptedData",version:0,encryptedContentInfo:{contentType:"data",contentEncryptionAlgorithm:f[P.providerName].encryption}})}function O(e){U.call(this,e,{contentType:"envelopedData",version:0,recipientInfos:[],encryptedContentInfo:{contentType:"data",contentEncryptionAlgorithm:f[P.providerName].encryption}})}D.prototype.options=P,m(l.ContentInfo,U,{isDetached:{value:!1,enumerable:!0,writable:!0},writeDetached:function(e){this.isDetached=e},encode:function(e){if(this.isDetached){var t=I(this);T(this,{contentType:t.contentType});var r=l.ContentInfo.method("encode").call(this,e);return T(this,t),r}return l.ContentInfo.method("encode").call(this,e)},encloseContent:function(e){var t=this;return new Promise(b).then((function(){return t.setEnclosed(e),t}))},setEnclosed:function(e){T(this,k(e))},getEnclosed:function(){return _(I(this))}}),D.prototype.DataContentInfo=U,m(U,N,{encloseContent:function(e,t){var r=this;return new Promise(b).then((function(){if(r.setEnclosed(e),t){var n=f[t];r.digestAlgorithm=n&&n.digest||t}return d.digest(r.digestAlgorithm,r.encapContentInfo.eContent)})).then((function(e){r.digest=e}))},verify:function(e){var t=this;return new Promise(b).then((function(){if(e&&t.setEnclosed(e),!t.encapContentInfo||!t.encapContentInfo.eContent)throw new Error("Detached content is not found");return d.digest(t.digestAlgorithm,t.encapContentInfo.eContent)})).then((function(e){if(!w(e,t.digest))throw Error("Message digest is not verified");return _({contentType:t.encapContentInfo.eContentType,content:t.encapContentInfo.eContent})}))}}),D.prototype.DigestedDataContentInfo=N,m(U,L,{addSignature:function(e,t,r,i){var a,o,s,c=this;return new Promise(b).then((function(){if(!e||!t)throw new Error("Signer key or certificate is not defined");t instanceof Array?t=(s=t)[0]:s=[t];var u=t.getProvider()||f[P.providerName],h=P.useKeyIdentifier&&t.extensions&&t.extensions.subjectKeyIdentifier;if(o=c.encapContentInfo.eContent,a={version:h?2:0,sid:h?t.extensions.subjectKeyIdentifier:{issuer:t.issuer,serialNumber:t.serialNumber},digestAlgorithm:u.digest,signatureAlgorithm:t.subjectPublicKeyInfo.algorithm},i&&(a.unsignedAttrs=i),r)return"object"!==(void 0===r?"undefined":n(r))&&(r={}),d.digest(a.digestAlgorithm,o)})).then((function(t){return t&&(r.contentType=c.encapContentInfo.eContentType,r.messageDigest=t,r.signingTime=new Date,a.signedAttrs=r,o=l.SignedAttributes.encode(a.signedAttrs)),d.importKey("pkcs8",l.PrivateKeyInfo.encode(e),e.privateKeyAlgorithm,!1,["sign"])})).then((function(e){var t=y(a.signatureAlgorithm,{hash:a.digestAlgorithm});return d.sign(t,e,o)})).then((function(e){if(a.signatureValue=e,B(c.digestAlgorithms,a.digestAlgorithm,(function(e,t){return e.id===t.id})),P.autoAddCert){c.certificates||(c.certificates=[]);for(var t=0,r=s.length;t<r;t++)B(c.certificates,s[t],(function(e,t){return A(e.issuer,t.issuer)&&S(e.serialNumber,t.serialNumber)}))}c.signerInfos.push(a)}))},isDegenerate:{get:function(){return!(this.signerInfos&&this.signerInfos.length>0)}},verify:function(e,t){var r,n=this;return new Promise(b).then((function(){if(t&&n.setEnclosed(t),!n.signerInfos||0===n.signerInfos.length)throw new Error("No signatures found");return Promise.all(n.signerInfos.map((function(t,r){var i,a=t.sid,o=a instanceof u?{subjectKeyIdentifier:a}:{issuer:a.issuer,serialNumber:a.serialNumber};return t.signedAttrs&&t.signedAttrs.signingTime&&(i=t.signedAttrs.signingTime),e.getValidCertificate(o,n.certificates,n.crls,i).catch((function(){}))})))})).then((function(e){var t=[];if(e.forEach((function(e){e&&t.push(n.verifySignature(e).then((function(e){r=e}),(function(){})))})),0===t.length)throw new Error("Valid verification path not found");return Promise.all(t)})).then((function(){if(!r)throw Error("Verification path found but no valid signature");return r}))},verifySignature:function(e,t){var r,n,i,a=this;return new Promise(b).then((function(){if(t&&a.setEnclosed(t),!(n=a.encapContentInfo&&a.encapContentInfo.eContent))throw new Error("Detached content is not found");for(var o=0;o<a.signerInfos.length;o++)if(R(a.signerInfos[o].sid,e)){r=a.signerInfos[o];break}if(!r)throw new Error("Signature not found for the certificate");if(r.signedAttrs){if(!(i=r.signedAttrs.messageDigest))throw new Error("Message digest must present in signed attributes");n=r.signedAttrs.encode()}if(!n)throw new Error("Data for verification not found");var s=y(r.signatureAlgorithm,{hash:r.digestAlgorithm});return e.verifySignature(n,r.signatureValue,s)})).then((function(e){if(!e)throw new Error("Signature not verified");if(r.signedAttrs)return d.digest(r.digestAlgorithm,a.encapContentInfo.eContent)})).then((function(e){if(e&&!w(e,i))throw new Error("Message digest not verified");return _({contentType:a.encapContentInfo.eContentType,content:a.encapContentInfo.eContent})}))}}),D.prototype.SignedDataContentInfo=L,m(U,M,{encloseContent:function(e,t,r){var n,i,a=this;return new Promise(b).then((function(){if(!(e=k(e)).content)throw new Error("Content for encryption must be specified");var a,o="string"==typeof t?"pbes":"encryption";if(r){var s=f[r];r=s&&s[o]||r}else r=f[P.providerName][o];if(r.derivation)return i=y(r.derivation),n=y(r.encryption),i.salt=x(function(e){switch(e.id){case"pbeWithSHAAnd40BitRC2-CBC":case"pbeWithSHAAnd128BitRC2-CBC":return 8;case"pbeUnknownGost":return 16;case"sha1":return 20;default:return 32}}(r)),d.importKey("raw",F(i,t),i,!1,["deriveKey","deriveBits"]).then((function(e){if(a=e,i.name.indexOf("PFXKDF")>=0)return i.diversifier=2,d.deriveBits(i,a,64)})).then((function(e){return e&&(n.iv=e),i.diversifier=1,d.deriveKey(i,a,n,!1,["encrypt"])})).then((function(e){return e}));if(n=y(r),t instanceof u)return d.importKey("raw",t,n,!1,["encrypt"]);if("secret"===t.type)return t;throw new Error("Content encryption key must be raw data or secret key type")})).then((function(t){return n.iv||(n.iv=x(8)),d.encrypt(n,t,e.content)})).then((function(t){return r.derivation?(delete i.diversifier,r=y(r,{derivation:i,encryption:n})):r=n,a.encryptedContentInfo={contentType:e.contentType,contentEncryptionAlgorithm:r,encryptedContent:t},a}))},getEnclosed:function(e,t){var r,n,i,a=this;return new Promise(b).then((function(){if(t&&a.setEnclosed(t),!(i=a.encryptedContentInfo.encryptedContent))throw new Error("Encrypted content must be specified");var o;if((r=y(a.encryptedContentInfo.contentEncryptionAlgorithm)).derivation)return n=y(r.derivation),r=y(r.encryption),d.importKey("raw",F(n,e),n,!1,["deriveKey","deriveBits"]).then((function(e){if(o=e,n.name.indexOf("PFXKDF")>=0)return n.diversifier=2,d.deriveBits(n,o,64)})).then((function(e){return e&&(r.iv=e),n.diversifier=1,d.deriveKey(n,o,r,!1,["decrypt"])}));if(e instanceof u)return d.importKey("raw",e,r,!1,["decrypt"]);if("secret"===e.type)return e;throw new Error("Decryption key must be raw data or secret key type")})).then((function(e){return d.decrypt(r,e,i)})).then((function(e){return _({contentType:a.encryptedContentInfo.contentType,content:e})}))}}),D.prototype.EncryptedDataContentInfo=M,m(U,O,{encloseContent:function(e,t){var r=this;return new Promise(b).then((function(){if(!(e=k(e)).content)throw new Error("Content for encryption must be specified");if(t){var r=f[t];t=r&&r.encryption||t}else t=f[P.providerName].encryption;return d.generateKey(t,!0,["encrypt"])})).then((function(n){return r.contentEncryptionKey=n,t.iv||(t.iv=x(8)),d.encrypt(t,n,e.content)})).then((function(n){return r.encryptedContentInfo={contentType:e.contentType,contentEncryptionAlgorithm:t,encryptedContent:n},r}))},addRecipient:function(e,t,r,n){var i,a,o,s,c=this;return new Promise(b).then((function(){if(e=new p.X509(e),t&&"string"!=typeof t&&!t.algorithm&&(n=r,r=t,t=void 0),a=t?f[t]:e.getProvider(),!c.contentEncryptionKey)throw new Error("The content encryption key is not assigned");if(n){var i;if(n instanceof Array?n=(i=n)[0]:i=[n],P.autoAddCert){c.originatorInfo?c.originatorInfo.certs||(c.originatorInfo.certs=[]):c.originatorInfo={certs:[]};for(var o=0,s=i.length;o<s;o++)B(c.originatorInfo.certs,i[o],(function(e,t){return A(e.issuer,t.issuer)&&S(e.serialNumber,t.serialNumber)}))}if(a?t=y(a.agreement):a=e.getProvider(),e.subjectPublicKeyInfo.algorithm.namedCurve!==n.subjectPublicKeyInfo.algorithm.namedCurve)throw new Error("The sender and the recipient have different public key algorithms");return d.importKey("pkcs8",r.encode(),r.privateKeyAlgorithm,!1,["deriveKey"])}return a?t=y(e.subjectPublicKeyInfo.algorithm):a=e.getProvider(),d.generateKey(t,!0,["deriveKey"]).then((function(e){return t.public=e.publicKey,e.privateKey}))})).then((function(t){return i=t,d.importKey("spki",e.subjectPublicKeyInfo.encode(),e.subjectPublicKeyInfo.algorithm,!1,["deriveKey","deriveBits"])})).then((function(e){return t.ukm=x(8),o=y(a.agreement,{sBox:t.sBox,ukm:t.ukm,public:e}),s=y(t.wrapping||a.wrapping,{ukm:t.ukm}),d.deriveKey(o,i,s,!0,["wrapKey"])})).then((function(e){return t.wrapping=s,d.wrapKey("raw",c.contentEncryptionKey,e,s)})).then((function(r){var i,a=P.useKeyIdentifier&&e.extensions&&e.extensions.subjectKeyIdentifier?e.extensions.subjectKeyIdentifier:{issuer:e.issuer,serialNumber:e.serialNumber};if(n){var o=n.subjectPublicKeyInfo;i={version:3,originator:{algorithm:o.algorithm,publicKey:o.subjectPublicKey},ukm:t.ukm,keyEncryptionAlgorithm:t,recipientEncryptedKeys:[{rid:a,encryptedKey:l.GostEncryptedKey(t).encode(r)}]}}else i={version:0,rid:a,keyEncryptionAlgorithm:t,encryptedKey:l.GostEncryptedKey(t).encode({algorithm:t,sessionEncryptedKey:r})};return c.recipientInfos.push(i),c}))},getEnclosed:function(e,t,r,n){var i,a,o,s,c,u=this;return new Promise(b).then((function(){var e=t.getProvider();if(r&&u.setEnclosed(r),!(a=u.encryptedContentInfo.encryptedContent))throw new Error("Encrypted content must be specified");c=u.encryptedContentInfo.contentEncryptionAlgorithm;for(var f=0;f<u.recipientInfos.length;f++){var h=u.recipientInfos[f],p=y(h.keyEncryptionAlgorithm);if(h.rid){if(R(h.rid,t)){var g=l.GostEncryptedKey(p).decode(h.encryptedKey).object;return i=g.sessionEncryptedKey,p=y(p,g.algorithm),o=y(e.agreement,{ukm:p.ukm,sBox:p.sBox}),s=y(e.wrapping,p.wrapping,{ukm:p.ukm}),p.public}}else{var v=h.recipientEncryptedKeys;if(v)for(var m=0;m<v.length;m++)if(R(v[m].rid,t)){p=y(e.agreement,p,{ukm:h.ukm}),i=l.GostEncryptedKey(p).decode(v[m].encryptedKey).object,o=p,s=y(p.wrapping||e.wrapping,{ukm:h.ukm});var b=h.originator;if(b.algorithm){var w=new l.SubjectPublicKeyInfo({algorithm:b.algorithm,subjectPublicKey:b.publicKey});return d.importKey("spki",w.encode(),w.algorithm,!1,["deriveKey","deriveBits"])}if(n&&R(b,n))return importKey("pkcs",n.subjectPublicKeyInfo.encode(),n.subjectPublicKeyInfo.algorithm,!1,["deriveKey","deriveBits"]);throw Error("Originator certificate not specified or not valid")}}}throw new Error("Recipient not found or format not supported")})).then((function(t){return o.public=t,d.importKey("pkcs8",e.encode(),e.privateKeyAlgorithm,!1,["deriveKey","deriveBits"])})).then((function(e){return d.deriveKey(o,e,s,!0,["unwrapKey"])})).then((function(e){return d.unwrapKey("raw",i,e,s,c,!1,["decrypt"])})).then((function(e){return d.decrypt(c,e,a)})).then((function(e){return _({contentType:u.encryptedContentInfo.contentType,content:e})}))}}),D.prototype.EnvelopedDataContentInfo=O,t.gostCMSInstance=new D},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.gostCrypto=void 0;var n=r(80),i=r(39),a=r(78),o=r(77),s=r(83),c=r(171),u=r(172),f=r(175);(t.gostCrypto={coding:i.gostCodingInstance,security:a.gostSecurityInstance,asn1:o.gostASN1Instance,subtle:s.gostSubtleInstance,cert:c.gostCertInstance,cms:u.gostCMSInstance,keys:f.gostKeysInstance}).getRandomValues=function(e){try{return(new n.GostRandom).getRandomValues(e)}catch(e){throw new Error("Error occurred during random values generation")}}},,function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.gostKeysInstance=void 0;var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.GostKeys=x;var i=r(78),a=r(39),o=r(77),s=r(83),c=r(171),u=r(172),f=ArrayBuffer,h=a.gostCodingInstance,l=i.gostSecurityInstance.providers,d=o.gostASN1Instance,p=s.gostSubtleInstance,y=c.gostCertInstance,g=u.gostCMSInstance;function v(){for(var e={},t=0,r=arguments.length;t<r;t++){var i=arguments[t];if("object"===(void 0===i?"undefined":n(i)))for(var a in i)i.hasOwnProperty(a)&&(e[a]=i[a])}return e}function m(e,t,r,i){"object"!==(void 0===r?"undefined":n(r))&&(r={value:r}),void 0!==i&&(r.enumerable=i),Object.defineProperty(e,t,r)}function b(e,t,r){for(var n in t)m(e,n,t[n],r)}function w(e,t,r,n){if("function"!=typeof t&&(n=r,r=t,t=function(){e.apply(this,arguments)}),t.prototype=Object.create(e.prototype,{constructor:{value:t},superclass:{value:e.prototype}}),r&&b(t.prototype,r,!0),e!==Object)for(var i in e)t[i]=e[i];return t.super=e,n&&b(t,n,!0),t}function C(e){var t=new Uint8Array(e);return gostCrypto.getRandomValues(t),t.buffer}function E(e){try{e()}catch(e){}}function S(e){if(e instanceof f)return e;if(e&&e.buffer&&e.buffer instanceof f)return 0===e.byteOffset&&e.byteLength===e.buffer.byteLength?e.buffer:new Uint8Array(new Uint8Array(e,e.byteOffset,e.byteLength)).buffer;throw new DataError("CryptoOperationData required")}function A(e){var t=new Date;return e&&t.setDate(t.getDate()+e),t}function B(e){var t=A(e);return t.setHours(0,0,0,0),t}function T(e,t){var r=new Uint8Array(e),n=new Uint8Array(t);if(r.length!==n.length)return!1;for(var i=0,a=r.length;i<a;i++)if(r[i]!==n[i])return!1;return!0}function I(e,t){var r=new Uint8Array(e,t,4);return r[3]<<24|r[2]<<16|r[1]<<8|r[0]}function k(e,t,r){var n=new Uint8Array(e,t,4);return n[3]=r>>>24,n[2]=r>>>16&255,n[1]=r>>>8&255,n[0]=255&r,n}function _(e){switch(e.id){case"pbeWithSHAAnd40BitRC2-CBC":case"pbeWithSHAAnd128BitRC2-CBC":return 8;case"pbeUnknownGost":return 16;case"sha1":return 20;default:return 32}}function R(e,t){if(!t)return new f(0);if(e.name.indexOf("CPKDF")>=0){for(var r=[],n=0;n<t.length;n++){var i=t.charCodeAt(n);r.push(255&i),r.push(i>>>8&255),r.push(0),r.push(0)}return new Uint8Array(r).buffer}return e.name.indexOf("PFXKDF")>=0?h.Chars.decode(t+"\0","unicode"):h.Chars.decode(t,"utf8")}function x(){}var F={providerName:"CP-01",days:7305};function D(e){d.PrivateKeyInfo.call(this,e)}function P(e){d.EncryptedPrivateKeyInfo.call(this,e)}function U(e){if(e){var t=this;["mk.db3","masks.db3","kek.opq","rand.opq"].forEach((function(r){t[r]=e[r]}))}}function N(e,t){d.GostWrappedPrivateKey.call(this,e),U.call(this,t)}function L(e){e&&(this.header=d.GostKeyContainer.decode(e.header),this.name=d.GostKeyContainerName.decode(e.name),this.primary=d.GostPrivateKeys.decode(e.primary),this.masks=d.GostPrivateMasks.decode(e.masks),e.primary2&&e.masks2&&(this.primary2=d.GostPrivateKeys.decode(e.primary2),this.masks2=d.GostPrivateMasks.decode(e.masks2)))}function M(e){d.ViPNetInfo.call(this,e||{version:3,keyInfo:{keyClass:1,keyType:43556,flags:1},defenceKeyInfo:{keyClass:1024,keyType:24622,keyUID:C(32),flags:-2147483648}})}function O(e){e&&(e instanceof f||e.buffer instanceof f||"string"==typeof e)?this.decode(e):(e=e||{},this.fileType=e.fileType||"ITCS",this.fileVersion=e.fileVersion||16,e.applicationHeader&&(this.applicationHeader=e.applicationHeader),this.entries=e.entries||[])}function K(e){d.PFX.call(this,e||{version:3,authSafe:{contentType:"data"}})}function G(e){if(this.entries={},e)for(var t in e)this.setEntry(t,e[t])}x.prototype.options=F,w(d.PrivateKeyInfo,D,{getPrivateKey:function(){var e="rsaEncryption"===this.privateKeyAlgorithm.id?["sign"]:["sign","deriveKey","deriveBits"];return p.importKey("pkcs8",this.encode(),this.privateKeyAlgorithm,"true",e)},setPrivateKey:function(e){var t=this;return p.exportKey("pkcs8",e).then((function(e){return d.PrivateKeyInfo.call(t,e),t}))},generate:function(e,t){var r=this;return new Promise(E).then((function(){return e instanceof y.Request||(e=new y.Request(e)),e.generate(t)})).then((function(t){return d.PrivateKeyInfo.call(r,t),e}))}}),x.prototype.PKCS8=D,w(d.EncryptedPrivateKeyInfo,P,{getKey:function(e){var t=this;return new Promise(E).then((function(){return new g.EncryptedDataContentInfo({contentType:"encryptedData",version:0,encryptedContentInfo:{contentType:"data",contentEncryptionAlgorithm:t.encryptionAlgorithm,encryptedContent:t.encryptedData}}).getEnclosed(e)})).then((function(e){return D.decode(e.content)}))},getPrivateKey:function(e){return this.getKey(e).then((function(e){return e.getPrivateKey()}))},setKey:function(e,t,r){var n,i=this;return new Promise(E).then((function(){return e=new D(e),(n=new g.EncryptedDataContentInfo).encloseContent(e.encode(),t,r||F.providerName)})).then((function(){return i.encryptionAlgorithm=n.encryptedContentInfo.contentEncryptionAlgorithm,i.encryptedData=n.encryptedContentInfo.encryptedContent,i}))},setPrivateKey:function(e,t,r){var n=this;return(new D).setPrivateKey(e).then((function(e){return n.setKey(e,t,r)}))},generate:function(e,t,r,n){var i=this;return new Promise(E).then((function(){return e instanceof y.Request||(e=new y.Request(e)),e.generate(r)})).then((function(e){return i.setKey(e,t,n)})).then((function(){return e}))}}),x.prototype.PKCS8Encrypted=P,w(Object,U,{getEncryptionKey:function(e){var t=this,r=l["SC-01"].wrapping,n=l["SC-01"].encryption,i=l["SC-01"].derivation,a=t["masks.db3"],o=t["mk.db3"],s=t["kek.opq"];return new Promise(E).then((function(){if(!a||!o||!s)throw new Error("Not enougth key container files");if(a.byteLength>32){if(e)return p.importKey("raw",h.Chars.decode(e,"utf8"),i,!1,["deriveKey","deriveBits"]).then((function(e){return p.deriveKey(v(i,{salt:new Uint8Array([0,0,0,0,0,0,0,0])}),e,n,!1,["decrypt"])})).then((function(e){return new g.EncryptedDataContentInfo(a).getEnclosed(e)})).then((function(e){return e.verify()})).then((function(e){return e.content}));throw new Error("Key password is required")}if(e)throw new Error("Key password is not required");return a})).then((function(e){a=e;var t=new Uint8Array(o.byteLength+a.byteLength);return t.set(new Uint8Array(o),0),t.set(new Uint8Array(a),o.byteLength),p.importKey("raw",t.buffer,r,!1,["unwrapKey"])})).then((function(e){return p.unwrapKey("raw",s,e,r,n,!1,["wrapKey","unwrapKey"])}))},generateContainer:function(e){var t,r,n=this,i=l["SC-01"].wrapping,a=l["SC-01"].encryption,o=l["SC-01"].derivation,s=l["SC-01"].digest;return new Promise(E).then((function(){return p.generateKey(i,!0,["wrapKey"])})).then((function(t){var i=(r=t).buffer.byteLength;n["mk.db3"]=new Uint8Array(new Uint8Array(r.buffer,0,i-32)).buffer;var c=new Uint8Array(new Uint8Array(r.buffer,i-32,32)).buffer;if(e){var u=new g.EncryptedDataContentInfo,f=new g.DigestedDataContentInfo;return f.encloseContent(c,s).then((function(){return f={contentType:"digestedData",content:f.encode()},p.importKey("raw",h.Chars.decode(e,"utf8"),o,!1,["deriveKey","deriveBits"])})).then((function(e){return p.deriveKey(v(o,{salt:new Uint8Array([0,0,0,0,0,0,0,0])}),e,a,!1,["encrypt"])})).then((function(e){return u.encloseContent(f,e,a)})).then((function(){return u.encode()}))}return c})).then((function(e){return n["masks.db3"]=e,p.generateKey(a,!1,["wrapKey","unwrapKey"])})).then((function(e){return t=e,p.wrapKey("raw",e,r,i)})).then((function(e){return n["kek.opq"]=e,p.generateKey(a,!1,["wrapKey","unwrapKey"])})).then((function(e){return p.wrapKey("raw",e,r,i)})).then((function(e){return n["rand.opq"]=e,t}))}}),x.prototype.SignalComKeyContainer=U,w(d.GostWrappedPrivateKey,N,{getKey:function(e){return this.getPrivateKey(e).then((function(e){return(new D).setPrivateKey(e)}))},getPrivateKey:function(e){var t,r=this,n=l["SC-01"].wrapping;return new Promise(E).then((function(){return r.getEncryptionKey(e,!0)})).then((function(e){return p.unwrapKey("raw",r.privateKeyWrapped,e,n,r.privateKeyAlgorithm,!0,["sign","deriveKey","deriveBits"])})).then((function(e){return(t=r.attributes&&r.attributes["id-sc-gostR3410-2001-publicKey"])?p.generateKey(v(e.algorithm,{ukm:e.buffer}),e.extractable,e.usages):{privateKey:e}})).then((function(e){if(t&&!T(e.publicKey.buffer,t))throw new Error("Check public key failed");return e.privateKey}))},setKey:function(e,t){var r=this;return new D(e).getPrivateKey().then((function(e){return r.setPrivateKey(e,t)}))},setPrivateKey:function(e,t){var r,n=this,i=l["SC-01"].wrapping;return new Promise(E).then((function(){return n.getEncryptionKey(t).catch((function(){return n.generateContainer(t)}))})).then((function(t){return p.wrapKey("raw",e,t,i)})).then((function(t){return r=t,p.generateKey(v(e.algorithm,{ukm:e.buffer}),!0,["sign","verify"])})).then((function(t){return n.object={version:0,privateKeyAlgorithm:e.algorithm,privateKeyWrapped:r,attributes:{"id-sc-gostR3410-2001-publicKey":t.publicKey.buffer}},n}))},changePassword:function(e,t){var r=this;return r.getPrivateKey(e).then((function(e){return r.setPrivateKey(e,t)}))},generate:function(e,t,r){var n,i=this;return new Promise(E).then((function(){return e instanceof y.Request||(e=new y.Request(e)),e.generate(r)})).then((function(e){return n=e,i.setKey(n,t)})).then((function(){return e}))}}),b(N.prototype,U.prototype),x.prototype.SignalComPrivateKeyInfo=N,w(Object,L,function(){function e(e,t,r){var n=function(e){return!(e.name.indexOf("-94")>=0||e.name.indexOf("-2001")>=0||1994===e.version||2001===e.version)}(e)?"GOST R 34.11-256":"GOST R 34.11-94/"+(e.sBox||"D-A"),i={name:"CPKDF",hash:n,salt:r,iterations:t?2e3:2};return p.importKey("raw",R(i,t),i,!1,["deriveKey","deriveBits"]).then((function(e){return p.deriveKey(i,e,"GOST 28147",!1,["sign","verify","encrypt","decrypt"])}))}function t(t,r,n){var i=v({name:"GOST 28147-MAC"},t.encParams);return e(t,r,n).then((function(e){return p.sign(i,e,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]))}))}function r(e,t){var r=v({name:"GOST 28147-MAC"},e.encParams),n=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);return p.importKey("raw",n,r,!1,["sign"]).then((function(e){return p.sign(r,e,t.encode())}))}function n(e,t,r){var n=v({name:"GOST 28147-MAC"},e.encParams),i=64===t.byteLength?new Uint8Array(new Uint8Array(t,32,32)).buffer:t;return p.importKey("raw",i,n,!1,["sign"]).then((function(e){return p.sign(n,e,r)}))}function i(e){return p.generateKey(v(e.algorithm,{ukm:e.buffer}),!0,["sign","verify"]).then((function(e){return new Uint8Array(new Uint8Array(e.publicKey.buffer,0,8)).buffer}))}function a(e,t,r,n,a){var o,s,c={name:"GOST 28147-ECB",sBox:e.encParams&&e.encParams.sBox},u=v(e,{mode:"MASK"});return u.name=u.name.replace("-DH",""),p.decrypt(c,t,r).then((function(e){return s=e,p.importKey("raw",n,u,"false",["sign","unwrapKey"])})).then((function(t){return p.unwrapKey("raw",s,t,u,e,"true",["sign"])})).then((function(e){return i(o=e)})).then((function(e){if(!T(e,a))throw new Error("Incorrect fp");return o}))}function o(t,r,i,o,s){var c=t.primaryPrivateKeyParameters.privateKeyAlgorithm;return new Promise(E).then((function(){if(r.hmacKey)throw new Error("Old key format");if(i.randomStatus.byteLength<12)throw new Error("Invalid random status length");return n(c,i.mask,i.randomStatus)})).then((function(t){if(!T(t,i.hmacRandom))throw new Error("Imita for mask is invalid");return e(c,o,new Uint8Array(i.randomStatus,0,12))})).then((function(e){return s&&r.secondaryKey?a(t.secondaryPrivateKeyParameters.privateKeyAlgorithm,e,r.secondaryKey,i.mask,t.secondaryFP):a(c,e,r.primaryKey,i.mask,t.primaryFP)}))}return{getKey:function(e,t){return this.getPrivateKey(e,t).then((function(e){return(new D).setPrivateKey(e)}))},getPrivateKey:function(e,t){var r=this,n=r.header.keyContainerContent;return o(n,r.primary,r.masks,e,t).catch((function(i){if(r.primary2&&r.masks2)return o(n,r.primary2,r.masks2,e,t);throw i}))},getCertificate:function(e){var t=this.header.keyContainerContent;return new Promise(E).then((function(){return e?new y.X509(t.secondaryCertificate):new y.X509(t.primaryCertificate)}))},getContainerName:function(){return this.name.containerName},setKey:function(e,t,r,n){var i=this;return new D(e).getPrivateKey().then((function(e){return i.setPrivateKey(e,t,r,n)}))},setPrivateKey:function(a,o,s,c){var u,f,h=this;return new Promise(E).then((function(){h.header=h.header||new d.GostKeyContainer({keyContainerContent:{containerAlgoritmIdentifier:{algorithm:"id-CryptoPro-GostPrivateKeys-V2-Full"},attributes:["kccaReservePrimary","kccaPrimaryKeyAbsent"],extensions:{keyValidity:{notAfter:A(c||F.days)}}}}),u=h.header.keyContainerContent;var e=s?u.secondaryPrivateKeyParameters:u.primaryPrivateKeyParameters;if(e)f=e.privateKeyAlgorithm;else if(e={attributes:["pkaExportable","pkaExchange","pkaDhAllowed"],privateKeyAlgorithm:f=v(a.algorithm,{sBox:"D-A",encParams:{block:"CFB",sBox:"E-A",keyMeshing:"CP"}})},s){if(!u.primaryPrivateKeyParameters)throw new Error("Primary key must be defined first");u.secondaryPrivateKeyParameters=e}else{u.primaryPrivateKeyParameters=e;var t=u.attributes.indexOf("kccaPrimaryKeyAbsent");t>=0&&u.attributes.splice(t,1)}var r=[];return[0,1].forEach((function(e){var t="masks"+(e>0?"2":"");h[t]||r.push(function(e){var t,r=v(e,{mode:"MASK"}),i=C(12);return r.name=r.name.replace("-DH",""),p.generateKey(r,!0,["wrapKey","unwrapKey"]).then((function(e){return p.exportKey("raw",e)})).then((function(r){return n(e,t=r,i)})).then((function(e){return new d.GostPrivateMasks({mask:t,randomStatus:i,hmacRandom:e})}))}(f).then((function(e){h[t]=e})))})),Promise.all(r)})).then((function(){var t=[];return[0,1].forEach((function(r){var n="primary"+(r>0?"2":""),i="masks"+(r>0?"2":"");t.push(function(t,r,n,i,a,o){return e(t,i,new Uint8Array(n.randomStatus,0,12)).then((function(e){return function(e,t,r,n){var i={name:"GOST 28147-ECB",sBox:e.encParams&&e.encParams.sBox},a=v(e,{mode:"MASK"});return a.name=a.name.replace("-DH",""),p.importKey("raw",n,a,!1,["sign","wrapKey"]).then((function(e){return p.wrapKey("raw",r,e,a)})).then((function(e){return p.encrypt(i,t,e)}))}(t,e,o,n.mask)})).then((function(e){return r||(r=new d.GostPrivateKeys),a?r.secondaryKey=e:r.primaryKey=e,r}))}(f,h[n],h[i],o,s,a).then((function(e){h[n]=e})))})),Promise.all(t)})).then((function(){return i(a).then((function(e){s?u.secondaryFP=e:u.primaryFP=e}))})).then((function(){var e=u.attributes.indexOf("kccaSoftPassword");if(o)return e<0&&u.attributes.push("kccaSoftPassword"),t(f,o,u.primaryFP);e>=0&&u.attributes.splice(e,1)})).then((function(e){return e&&(u.hmacPassword=e),r(f,u)})).then((function(e){return h.header.hmacKeyContainerContent=e,h}))},setCertificate:function(e,t,n){var i,a,o=this;return new Promise(E).then((function(){return o.header=o.header||new d.GostKeyContainer({keyContainerContent:{containerAlgoritmIdentifier:{algorithm:"id-CryptoPro-GostPrivateKeys-V2-Full"},attributes:["kccaReservePrimary","kccaPrimaryKeyAbsent"],extensions:{keyValidity:{notAfter:A(n||F.days)}}}}),i=o.header.keyContainerContent,e=new y.X509(e),a=i.primaryPrivateKeyParameters&&i.primaryPrivateKeyParameters.privateKeyAlgorithm||v(e.subjectPublicKeyInfo.algorithm,{sBox:"D-A",encParams:{block:"CFB",sBox:"E-A",keyMeshing:"CP"}}),e.getPublicKey()})).then((function(n){if(t){if(i.secondaryFP&&!T(i.secondaryFP,new Uint8Array(n.buffer,0,i.secondaryFP.byteLength)))throw new Error("The public key of the certificate does not match the private key");i.secondaryCertificate=e}else{if(i.primaryFP&&!T(i.primaryFP,new Uint8Array(n.buffer,0,i.primaryFP.byteLength)))throw new Error("The public key of the certificate does not match the private key");i.primaryCertificate=e}return r(a,i)})).then((function(e){return o.header.hmacKeyContainerContent=e,o}))},setContainerName:function(e){this.name=new d.GostKeyContainerName({containerName:e})},verify:function(e){var n,i,a=this;return new Promise(E).then((function(){return n=a.header.keyContainerContent,r(i=n.primaryPrivateKeyParameters.privateKeyAlgorithm,n)})).then((function(r){if(!T(r,a.header.hmacKeyContainerContent))throw new Error("Container is not valid.");var o=n.attributes.indexOf("kccaSoftPassword")>=0;if(!e&&o)throw new Error("Password is required");if(e&&!o)throw new Error("Password is not reqiured.");return e?t(i,e,n.primaryFP).then((function(e){if(!T(e,n.hmacPassword))throw new Error("Password is not valid.");return a})):a}))},changePassword:function(e,t){var r,n=this;return new Promise(E).then((function(){if(!(r=n.header.keyContainerContent).primaryPrivateKeyParameters)throw new Error("Private key not yet defined");return n.getPrivateKey(e).then((function(e){return n.setPrivateKey(e,t)}))})).then((function(){return r.secondaryPrivateKeyParameters?n.getPrivateKey(e,!0).then((function(e){return n.setPrivateKey(e,t,!0)})):n}))},generate:function(e,t,r){var n,i,a=this;return new Promise(E).then((function(){return e instanceof y.Request||(e=new y.Request(e)),e.generate(r)})).then((function(e){return i=e,a.setKey(i,t)})).then((function(){return(n=new y.X509(e)).sign(i)})).then((function(){return a.setCertificate(n)})).then((function(){return e}))},encode:function(e){return{header:this.header.encode(e),name:this.name.encode(e),masks:this.masks.encode(e),primary:this.primary.encode(e),masks2:this.masks2.encode(e),primary2:this.primary2.encode(e)}}}}()),x.prototype.CryptoProKeyContainer=L,w(d.ViPNetInfo,M,function(){function e(e){void 0===e&&(e="");var t,r=h.Chars.decode(e,"win1251");return p.digest("GOST R 34.11-94",r).then((function(e){t=e;var n=new Uint8Array(r.byteLength+t.byteLength);return n.set(new Uint8Array(r),0),n.set(new Uint8Array(t),r.byteLength),p.digest("GOST R 34.11-94",n)})).then((function(e){return p.importKey("raw",e,"GOST 28147",!1,["unwrapKey"])})).then((function(e){return p.unwrapKey("raw",t,e,"GOST 28147-MASK/VN","GOST 28147-89","false",["encrypt","decrypt","sign","verify"])}))}return{getPrivateKey:function(t){var r,n,i=this;return new Promise(E).then((function(){return t&&"string"!=typeof t?t:e(t)})).then((function(e){t=e,r=i.keyPart,n=new Uint8Array(r,0,r.byteLength-4-8);var a=new Uint8Array(r,n.byteLength,4),o=i.keyInfo.encode(),s=new Uint8Array(n.byteLength+o.byteLength);return s.set(new Uint8Array(n),0),s.set(new Uint8Array(o),n.byteLength),p.verify({name:"GOST 28147-89-MAC"},t,a,s)})).then((function(e){if(!e)throw new Error("Invalid key password");var i=new Uint8Array(r,r.byteLength-8,8);return p.decrypt({name:"GOST 28147-89-CFB",iv:i},t,n)})).then((function(e){var t=e.byteLength/2;if(!1&i.keyInfo.keyClass)return p.importKey("raw",new Int32Array(e,t,t),"GOST 28147",!1,["unwrapKey"]).then((function(r){return p.unwrapKey("raw",new Int32Array(e,0,t),r,"GOST 28147-MASK/VN","GOST 28147-89","false",["encrypt","decrypt","sign","verify"])}));var r=i.keyInfo.algorithm||i.certificate&&i.certificate.subjectPublicKeyInfo.algorithm;if(!r)throw new Error("Algorithm is not specified");var n=v(r,{mode:"MASK",procreator:"VN"});n.name=n.name.replace("-DH","");var a=new Uint8Array(e,0,t),o=new Uint8Array(e,t,t);return p.importKey("raw",o,n,"false",["sign","unwrapKey"]).then((function(e){return p.unwrapKey("raw",a,e,n,r,"true",["sign","deriveBits","deriveKey"])})).then((function(e){return i.publicKey?p.generateKey(v(e.algorithm,{ukm:e.buffer}),e.extractable,e.usages):{privateKey:e}})).then((function(e){if(i.publicKey&&!T(e.publicKey.buffer,i.publicKey))throw new Error("Check public key failed");return e.privateKey}))}))},setPrivateKey:function(t,r,n){var i,a,o,s,c=this;return new Promise(E).then((function(){return r&&"string"!=typeof r?r:e(r)})).then((function(e){r=e;var a=t.algorithm;if(c.keyInfo.algorithm=a,c.keyInfo.serialNumber=C(16),c.keyInfo.keyUID=C(8),c.keyInfo.validity={notBefore:B(),notAfter:B(n||F.days)},"private"===t.type)return(i=v(a,{mode:"MASK",procreator:"VN"})).name=i.name.replace("-DH",""),c.keyInfo.keyClass=1,c.keyInfo.keyType=43556,p.generateKey(v(a,{ukm:t.buffer}),!0,["sign","verify"]).then((function(e){if(c.publicKey=e.publicKey.buffer,c.certificate){var t=c.certificate.subjectPublicKeyInfo;return p.importKey("spki",t.encode(),t.algorithm,!0,["verify"])}})).then((function(e){e&&!T(e.buffer,c.publicKey)&&delete c.certificate}));if("secret"!==t.type)throw new Error("Invalid key type");i="GOST 28147/MASK/VN",delete c.certificate,delete c.publicKey,c.keyInfo.keyClass=64,c.keyInfo.keyType=24622})).then((function(){return p.generateKey(i,!0,["wrapKey","unwrapKey"])})).then((function(e){return a=e,p.wrapKey("raw",t,a,i)})).then((function(e){return(o=new Uint8Array(2*e.byteLength)).set(new Uint8Array(e)),p.exportKey("raw",a)})).then((function(e){o.set(new Uint8Array(e),e.byteLength),s=new Uint8Array(o.byteLength+12);var t={name:"GOST 28147-CFB",iv:C(8)};return s.set(new Uint8Array(t.iv),s.byteLength-8),p.encrypt(t,r,o)})).then((function(e){s.set(new Uint8Array(e));var t=c.keyInfo.encode(),n=new Uint8Array(e.byteLength+t.byteLength);return n.set(new Uint8Array(e),0),n.set(new Uint8Array(t),e.byteLength),p.sign({name:"GOST 28147-89-MAC"},r,n)})).then((function(e){return s.set(new Uint8Array(e),s.byteLength-12),c.keyPart=s.buffer,c}))},encode:function(e){var t=d.ViPNetInfo.method("encode").call(this),r=new Uint8Array(8+t.byteLength+this.keyPart.byteLength);return k(r.buffer,0,4+t.byteLength+this.keyPart.byteLength),r.set(new Uint8Array(t),4),k(r.buffer,4+t.byteLength,this.keyPart.byteLength),r.set(new Uint8Array(this.keyPart),8+t.byteLength),"PEM"===e?h.Base64.encode(r.buffer):r.buffer}}}(),{decode:function(e){"string"==typeof e&&(e=h.Base64.decode(e));var t=I(e=S(e),0);if(e.byteLength!==t+4)throw new Error("Invalid container entry size");var r=h.BER.decode(new Uint8Array(e,4,t)),n=d.ViPNetInfo.decode.call(this,r),i=r.header.byteLength+r.content.byteLength,a=I(e,4+i);if(e.byteLength!==i+a+8)throw new Error("Invalid container key part size");return n.keyPart=new Uint8Array(new Uint8Array(e,i+8,a)).buffer,n}}),x.prototype.ViPNetContainerEntry=M,w(Object,O,{getCertificate:function(e){var t=this;return new Promise(E).then((function(){var r=t.entries[e||0];if(!r)throw new Error("Entry not defined");if(r.certificate)return new y.X509(r.certificate)}))},getKey:function(e,t){return this.getPrivateKey(e,t).then((function(e){return(new D).setPrivateKey(e)}))},getPrivateKey:function(e,t){var r=this;return new Promise(E).then((function(){var n=r.entries[t||0];if(!n)throw new Error("Entry not defined");return n.getPrivateKey(e)}))},setCertificate:function(e,t){var r,n=this;return new Promise(E).then((function(){if(r=n.entries[t||0]||(n.entries[t||0]=new M),e=new y.X509(e),r.publicKey)return e.getPublicKey()})).then((function(t){if(t&&!T(r.publicKey,t.buffer))throw new Error("Invalid certificate for private key");return r.certificate=e,n}))},setKey:function(e,t,r,n){var i=this;return new D(e).getPrivateKey().then((function(e){return i.setPrivateKey(e,t,r,n)}))},setPrivateKey:function(e,t,r,n){var i=this;return new Promise(E).then((function(){return(i.entries[r||0]||(i.entries[r||0]=new M)).setPrivateKey(e,t,n)})).then((function(){return i}))},changePassword:function(e,t){var r=this;return new Promise(E).then((function(){return r.getPrivateKey(e).then((function(e){return r.setPrivateKey(e,t)}))}))},generate:function(e,t,r){var n,i,a=this;return new Promise(E).then((function(){return e instanceof y.Request||(e=new y.Request(e)),e.generate(r)})).then((function(e){return i=e,a.setKey(i,t)})).then((function(){return(n=new y.X509(e)).sign(i)})).then((function(){return a.setCertificate(n)})).then((function(){return e}))},encode:function(e){var t=[],r=0;this.entries.forEach((function(e){var n=e.encode();r+=n.byteLength,t.push(n)}));var n=this.applicationHeader?this.applicationHeader.byteLength:0,i=new Uint8Array(12+n+r);i.set(new Uint8Array(h.Chars.decode(this.fileType,"ascii"))),k(i.buffer,4,this.fileVersion),k(i.buffer,8,n),n>0&&i.set(new Uint8Array(this.applicationHeader),12);var a=12+n;return t.forEach((function(e){i.set(new Uint8Array(e),a),a+=e.byteLength})),"PEM"===e?h.Base64.encode(i.buffer):i.buffer},decode:function(e){e=this.constructor.decode(e),this.fileType=e.fileType,this.fileVersion=e.fileVersion,e.applicationHeader&&(this.applicationHeader=e.applicationHeader),this.entries=e.entries}},{encode:function(e,t){return new this(e).encode(t)},decode:function(e){"string"==typeof e&&(e=h.Base64.decode(e)),e=S(e);var t=h.Chars.encode(new Uint8Array(e,0,4),"ascii");if("ITCS"!==t&&"PKEY"!==t&&"_CCK"!==t&&"_LCK"!==t)throw new Error("Unsupported ViPNet container type");var r=I(e,4),n=r>>>16;if(0!==n&&1!==n||(65535&r)>255)throw new Error("Unsupported ViPNet container version");var i,a=I(e,8);a>0&&(i=S(new Uint8Array(e,12,a)));for(var o=12+a,s=[];o<e.byteLength;){var c=I(e,o);s.push(M.decode(new Uint8Array(e,o,c+4))),o=o+c+4}return new O({fileType:t,fileVersion:r,applicationHeader:i,entries:s})}}),x.prototype.ViPNetContainer=O,w(d.PFX,K,function(){function e(e,t,r){var n={name:"HMAC",hash:e.hash};return p.importKey("raw",R(e,t),e,!1,["deriveKey"]).then((function(t){return p.deriveKey(e,t,n,!1,["sign"])})).then((function(e){return p.sign(n,e,r)}))}function t(t,r,n,i){return e(t,r,i).then((function(e){if(!T(n,e))throw new Error("Invalid password, MAC is not verified")}))}return{sign:function(t,r){var n=this;return new Promise(E).then((function(){if(t){var i,a,o;r?o=l[r]:r=l[F.providerName].digest,o?(i=o.digest,a=o.derivation):a={name:"PFXKDF",hash:i=r,iterations:2e3},a=v(a,{salt:C(_(i)),diversifier:3});var s=n.authSafe.content;return e(a,t,s).then((function(e){return n.macData={mac:{digestAlgorithm:i,digest:e},macSalt:a.salt,iterations:a.iterations},n}))}return n}))},verify:function(e){var r,n=this,i=n.authSafe;return new Promise(E).then((function(){if("data"!==i.contentType)throw new Error("Unsupported format");if(n.macData){if(!e)throw new Error("Password must be defined for the MAC verification");r={name:"PFXKDF",hash:n.macData.mac.digestAlgorithm,salt:n.macData.macSalt,iterations:n.macData.iterations,diversifier:3};var a=n.authSafe.content,o=n.macData.mac.digest;return t(r,e,o,a).catch((function(){return r.name="PBKDF2",t(r,e,o,a)}))}})).then((function(){return n}))}}}()),x.prototype.PKCS12=K,w(Object,G,{aliases:function(){var e=[];for(var t in this.entries)e.push(t);return e},containsAlias:function(e){return!!this.entries[e]},deleteEntry:function(e){delete this.entries[e]},setEntry:function(e,t){var r={};if(t.key)try{r.key=new D(t.key,!0)}catch(e){try{r.key=new P(t.key,!0)}catch(e){if(!(t.key instanceof f))throw new Error("Unknown Key format");r.key=t.key}}if(t.certs){for(var n=t.certs instanceof Array?t.certs:[t.certs],i=0;i<n.length;i++)try{n[i]=new y.X509(n[i])}catch(e){}r.certs=n}if(t.crls){var a=t.crls instanceof Array?t.crls:[t.crls];for(i=0;i<a.length;i++)try{a[i]=new y.CRL(a[i])}catch(e){}r.crls=a}this.entries[e]=r},getEntry:function(e){return this.entries[e]},load:function(e,t){var r=this;return new Promise(E).then((function(){return(e=new K(e)).verify(t)})).then((function(){if("data"!==e.authSafe.contentType)throw new Error("Unsupported PFX format");var r=d.AuthenticatedSafe.decode(e.authSafe.content).object,n=[];return r.forEach((function(e){if("data"===e.contentType)n.push(new g.DataContentInfo(e));else{if("encryptedData"!==e.contentType)throw new Error("Unsupported PFX format");n.push(new g.EncryptedDataContentInfo(e).getEnclosed(t))}})),Promise.all(n)})).then((function(e){var r={};e.forEach((function(e){d.SafeContents.decode(e.content).object.forEach((function(e){var t=h.Hex.encode(e.bagAttributes&&e.bagAttributes.localKeyId||C(4),!0),n=r[t]||(r[t]={});switch(e.bagId){case"keyBag":n.key=new D(e.bagValue);break;case"pkcs8ShroudedKeyBag":n.key=new P(e.bagValue);break;case"secretBag":"secret"===e.bagValue.secretTypeId&&(n.key=e.bagValue.secretValue);break;case"certBag":var i=n.certs||(n.certs=[]);"x509Certificate"===e.bagValue.certId&&i.push(new y.X509(e.bagValue.certValue));break;case"crlBag":var a=n.crls||(n.crls=[]);"x509CRL"===e.bagValue.crlId&&a.push(new y.CRL(e.bagValue.crlValue))}e.bagAttributes&&e.bagAttributes.friendlyName&&(n.friendlyName=e.bagAttributes.friendlyName)}))}));var n=[];for(var i in r)n.push(function(e){return e.key instanceof P?e.key.getKey(t).then((function(t){return e.key=t,e})).catch((function(){return e})):e}(r[i]));return Promise.all(n)})).then((function(e){return e.forEach((function(e){var t=e.friendlyName;t?(delete e.friendlyName,r.entries[t]=e):r.entries[function(){for(var e=new Uint8Array(C(16)),t="",r=0;r<16;r++)t+=("00"+e[r].toString(16)).slice(-2);return t.substr(0,8)+"-"+t.substr(8,4)+"-4"+t.substr(13,3)+"-9"+t.substr(17,3)+"-"+t.substr(20,12)}()]=e})),r}))},store:function(e,t,r){var n=this,i=[],a=[],o=[];return new Promise(E).then((function(){for(var o in r=r?l[r]?l[r].pbes:r:t&&l[t]?l[t].pbes:l[F.providerName].pbes,n.entries){var s=new Uint32Array([1]),c=n.entries[o];c.key&&function(t,n){t instanceof f?a.push({bagId:"secretBag",bagValue:{secretTypeId:"secret",secretValue:t,bagAttributes:n}}):t instanceof D?r&&e?i.push((new P).setKey(t,e,r).then((function(e){return{bagId:"pkcs8ShroudedKeyBag",bagValue:e,bagAttributes:n}}))):i.push({bagId:"keyBag",bagValue:t,bagAttributes:n}):t instanceof P&&i.push({bagId:"pkcs8ShroudedKeyBag",bagValue:t,bagAttributes:n})}(c.key,{localKeyId:s,friendlyName:o}),c.certs&&c.certs.forEach((function(e){var t={localKeyId:s};e instanceof y.X509&&a.push({bagId:"certBag",bagValue:{certId:"x509Certificate",certValue:e},bagAttributes:t})})),c.crls&&c.crls.forEach((function(e){var t={localKeyId:s};e instanceof y.CRL&&a.push({bagId:"crlBag",bagValue:{crlId:"x509CRL",crlValue:e},bagAttributes:t})}))}if(i.length>0)return Promise.all(i)})).then((function(t){if(t){var n=d.SafeContents.encode(t);o.push(new g.DataContentInfo({contentType:"data",content:n}))}if(a.length>0)return a=d.SafeContents.encode(a),r&&e?(new g.EncryptedDataContentInfo).encloseContent(a,e,r):(new g.DataContentInfo).encloseContent(a)})).then((function(r){o.push(r),o=new d.AuthenticatedSafe(o);var n=new K;return n.authSafe={contentType:"data",content:o.encode()},n.sign(e,t)}))}}),x.prototype.KeyStore=G,t.gostKeysInstance=new x},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.expand=function(){for(var e={},t=0,r=arguments.length;t<r;t++){var i=arguments[t];if("object"===(void 0===i?"undefined":n(i)))for(var a in i)e[a]=i[a]}return e}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GostEngine=t.CryptoGost=void 0;var n=r(173),i=r(82);t.CryptoGost=n.gostCrypto,t.GostEngine=i.gostEngine}])},module.exports=factory()},99976:(e,t,r)=>{e.exports=r(64133)},25704:(e,t)=>{"use strict";t.byteLength=function(e){var t=s(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,a=s(e),o=a[0],c=a[1],u=new i(function(e,t,r){return 3*(t+r)/4-r}(0,o,c)),f=0,h=c>0?o-4:o;for(r=0;r<h;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],u[f++]=t>>16&255,u[f++]=t>>8&255,u[f++]=255&t;return 2===c&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,u[f++]=255&t),1===c&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,u[f++]=t>>8&255,u[f++]=255&t),u},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,a=[],o=16383,s=0,u=n-i;s<u;s+=o)a.push(c(e,s,s+o>u?u:s+o));return 1===i?(t=e[n-1],a.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],a.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),a.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0;o<64;++o)r[o]=a[o],n[a.charCodeAt(o)]=o;function s(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function c(e,t,n){for(var i,a,o=[],s=t;s<n;s+=3)i=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),o.push(r[(a=i)>>18&63]+r[a>>12&63]+r[a>>6&63]+r[63&a]);return o.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},33296:(e,t,r)=>{"use strict";const n=r(25704),i=r(24404),a="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=c,t.INSPECT_MAX_BYTES=50;const o=2147483647;function s(e){if(e>o)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,c.prototype),t}function c(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return h(e)}return u(e,t,r)}function u(e,t,r){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!c.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|y(e,t);let n=s(r);const i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(Y(e,Uint8Array)){const t=new Uint8Array(e);return d(t.buffer,t.byteOffset,t.byteLength)}return l(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(Y(e,ArrayBuffer)||e&&Y(e.buffer,ArrayBuffer))return d(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(Y(e,SharedArrayBuffer)||e&&Y(e.buffer,SharedArrayBuffer)))return d(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return c.from(n,t,r);const i=function(e){if(c.isBuffer(e)){const t=0|p(e.length),r=s(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||Q(e.length)?s(0):l(e):"Buffer"===e.type&&Array.isArray(e.data)?l(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return c.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function f(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function h(e){return f(e),s(e<0?0:0|p(e))}function l(e){const t=e.length<0?0:0|p(e.length),r=s(t);for(let n=0;n<t;n+=1)r[n]=255&e[n];return r}function d(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(n,c.prototype),n}function p(e){if(e>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|e}function y(e,t){if(c.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Y(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return z(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return W(e).length;default:if(i)return n?-1:z(e).length;t=(""+t).toLowerCase(),i=!0}}function g(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return R(this,t,r);case"utf8":case"utf-8":return T(this,t,r);case"ascii":return k(this,t,r);case"latin1":case"binary":return _(this,t,r);case"base64":return B(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function v(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function m(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),Q(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=c.from(t,n)),c.isBuffer(t))return 0===t.length?-1:b(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):b(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function b(e,t,r,n,i){let a,o=1,s=e.length,c=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;o=2,s/=2,c/=2,r/=2}function u(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){let n=-1;for(a=r;a<s;a++)if(u(e,a)===u(t,-1===n?0:a-n)){if(-1===n&&(n=a),a-n+1===c)return n*o}else-1!==n&&(a-=a-n),n=-1}else for(r+c>s&&(r=s-c),a=r;a>=0;a--){let r=!0;for(let n=0;n<c;n++)if(u(e,a+n)!==u(t,n)){r=!1;break}if(r)return a}return-1}function w(e,t,r,n){r=Number(r)||0;const i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;const a=t.length;let o;for(n>a/2&&(n=a/2),o=0;o<n;++o){const n=parseInt(t.substr(2*o,2),16);if(Q(n))return o;e[r+o]=n}return o}function C(e,t,r,n){return X(z(t,e.length-r),e,r,n)}function E(e,t,r,n){return X(function(e){const t=[];for(let r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function S(e,t,r,n){return X(W(t),e,r,n)}function A(e,t,r,n){return X(function(e,t){let r,n,i;const a=[];for(let o=0;o<e.length&&!((t-=2)<0);++o)r=e.charCodeAt(o),n=r>>8,i=r%256,a.push(i),a.push(n);return a}(t,e.length-r),e,r,n)}function B(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function T(e,t,r){r=Math.min(e.length,r);const n=[];let i=t;for(;i<r;){const t=e[i];let a=null,o=t>239?4:t>223?3:t>191?2:1;if(i+o<=r){let r,n,s,c;switch(o){case 1:t<128&&(a=t);break;case 2:r=e[i+1],128==(192&r)&&(c=(31&t)<<6|63&r,c>127&&(a=c));break;case 3:r=e[i+1],n=e[i+2],128==(192&r)&&128==(192&n)&&(c=(15&t)<<12|(63&r)<<6|63&n,c>2047&&(c<55296||c>57343)&&(a=c));break;case 4:r=e[i+1],n=e[i+2],s=e[i+3],128==(192&r)&&128==(192&n)&&128==(192&s)&&(c=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&s,c>65535&&c<1114112&&(a=c))}}null===a?(a=65533,o=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),i+=o}return function(e){const t=e.length;if(t<=I)return String.fromCharCode.apply(String,e);let r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=I));return r}(n)}c.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),c.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}}),c.poolSize=8192,c.from=function(e,t,r){return u(e,t,r)},Object.setPrototypeOf(c.prototype,Uint8Array.prototype),Object.setPrototypeOf(c,Uint8Array),c.alloc=function(e,t,r){return function(e,t,r){return f(e),e<=0?s(e):void 0!==t?"string"==typeof r?s(e).fill(t,r):s(e).fill(t):s(e)}(e,t,r)},c.allocUnsafe=function(e){return h(e)},c.allocUnsafeSlow=function(e){return h(e)},c.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==c.prototype},c.compare=function(e,t){if(Y(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),Y(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),!c.isBuffer(e)||!c.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let i=0,a=Math.min(r,n);i<a;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},c.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);let r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;const n=c.allocUnsafe(t);let i=0;for(r=0;r<e.length;++r){let t=e[r];if(Y(t,Uint8Array))i+t.length>n.length?(c.isBuffer(t)||(t=c.from(t)),t.copy(n,i)):Uint8Array.prototype.set.call(n,t,i);else{if(!c.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,i)}i+=t.length}return n},c.byteLength=y,c.prototype._isBuffer=!0,c.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)v(this,t,t+1);return this},c.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)v(this,t,t+3),v(this,t+1,t+2);return this},c.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)v(this,t,t+7),v(this,t+1,t+6),v(this,t+2,t+5),v(this,t+3,t+4);return this},c.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?T(this,0,e):g.apply(this,arguments)},c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){let e="";const r=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},a&&(c.prototype[a]=c.prototype.inspect),c.prototype.compare=function(e,t,r,n,i){if(Y(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),!c.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;let a=(i>>>=0)-(n>>>=0),o=(r>>>=0)-(t>>>=0);const s=Math.min(a,o),u=this.slice(n,i),f=e.slice(t,r);for(let e=0;e<s;++e)if(u[e]!==f[e]){a=u[e],o=f[e];break}return a<o?-1:o<a?1:0},c.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},c.prototype.indexOf=function(e,t,r){return m(this,e,t,r,!0)},c.prototype.lastIndexOf=function(e,t,r){return m(this,e,t,r,!1)},c.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let a=!1;for(;;)switch(n){case"hex":return w(this,e,t,r);case"utf8":case"utf-8":return C(this,e,t,r);case"ascii":case"latin1":case"binary":return E(this,e,t,r);case"base64":return S(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,e,t,r);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const I=4096;function k(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function _(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function R(e,t,r){const n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);let i="";for(let n=t;n<r;++n)i+=Z[e[n]];return i}function x(e,t,r){const n=e.slice(t,r);let i="";for(let e=0;e<n.length-1;e+=2)i+=String.fromCharCode(n[e]+256*n[e+1]);return i}function F(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function D(e,t,r,n,i,a){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<a)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function P(e,t,r,n,i){j(t,n,i,e,r,7);let a=Number(t&BigInt(4294967295));e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,r}function U(e,t,r,n,i){j(t,n,i,e,r,7);let a=Number(t&BigInt(4294967295));e[r+7]=a,a>>=8,e[r+6]=a,a>>=8,e[r+5]=a,a>>=8,e[r+4]=a;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=o,o>>=8,e[r+2]=o,o>>=8,e[r+1]=o,o>>=8,e[r]=o,r+8}function N(e,t,r,n,i,a){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function L(e,t,r,n,a){return t=+t,r>>>=0,a||N(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function M(e,t,r,n,a){return t=+t,r>>>=0,a||N(e,0,r,8),i.write(e,t,r,n,52,8),r+8}c.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);const n=this.subarray(e,t);return Object.setPrototypeOf(n,c.prototype),n},c.prototype.readUintLE=c.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||F(e,t,this.length);let n=this[e],i=1,a=0;for(;++a<t&&(i*=256);)n+=this[e+a]*i;return n},c.prototype.readUintBE=c.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||F(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n},c.prototype.readUint8=c.prototype.readUInt8=function(e,t){return e>>>=0,t||F(e,1,this.length),this[e]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(e,t){return e>>>=0,t||F(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(e,t){return e>>>=0,t||F(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(e,t){return e>>>=0,t||F(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(e,t){return e>>>=0,t||F(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readBigUInt64LE=J((function(e){V(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||H(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(i)<<BigInt(32))})),c.prototype.readBigUInt64BE=J((function(e){V(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||H(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<<BigInt(32))+BigInt(i)})),c.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||F(e,t,this.length);let n=this[e],i=1,a=0;for(;++a<t&&(i*=256);)n+=this[e+a]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*t)),n},c.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||F(e,t,this.length);let n=t,i=1,a=this[e+--n];for(;n>0&&(i*=256);)a+=this[e+--n]*i;return i*=128,a>=i&&(a-=Math.pow(2,8*t)),a},c.prototype.readInt8=function(e,t){return e>>>=0,t||F(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){e>>>=0,t||F(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(e,t){e>>>=0,t||F(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(e,t){return e>>>=0,t||F(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return e>>>=0,t||F(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readBigInt64LE=J((function(e){V(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||H(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)})),c.prototype.readBigInt64BE=J((function(e){V(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||H(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+r)})),c.prototype.readFloatLE=function(e,t){return e>>>=0,t||F(e,4,this.length),i.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return e>>>=0,t||F(e,4,this.length),i.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return e>>>=0,t||F(e,8,this.length),i.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return e>>>=0,t||F(e,8,this.length),i.read(this,e,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||D(this,e,t,r,Math.pow(2,8*r)-1,0);let i=1,a=0;for(this[t]=255&e;++a<r&&(i*=256);)this[t+a]=e/i&255;return t+r},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||D(this,e,t,r,Math.pow(2,8*r)-1,0);let i=r-1,a=1;for(this[t+i]=255&e;--i>=0&&(a*=256);)this[t+i]=e/a&255;return t+r},c.prototype.writeUint8=c.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,1,255,0),this[t]=255&e,t+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigUInt64LE=J((function(e,t=0){return P(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeBigUInt64BE=J((function(e,t=0){return U(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);D(this,e,t,r,n-1,-n)}let i=0,a=1,o=0;for(this[t]=255&e;++i<r&&(a*=256);)e<0&&0===o&&0!==this[t+i-1]&&(o=1),this[t+i]=(e/a>>0)-o&255;return t+r},c.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);D(this,e,t,r,n-1,-n)}let i=r-1,a=1,o=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===o&&0!==this[t+i+1]&&(o=1),this[t+i]=(e/a>>0)-o&255;return t+r},c.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},c.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigInt64LE=J((function(e,t=0){return P(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeBigInt64BE=J((function(e,t=0){return U(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeFloatLE=function(e,t,r){return L(this,e,t,!0,r)},c.prototype.writeFloatBE=function(e,t,r){return L(this,e,t,!1,r)},c.prototype.writeDoubleLE=function(e,t,r){return M(this,e,t,!0,r)},c.prototype.writeDoubleBE=function(e,t,r){return M(this,e,t,!1,r)},c.prototype.copy=function(e,t,r,n){if(!c.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);const i=n-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),i},c.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!c.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){const t=e.charCodeAt(0);("utf8"===n&&t<128||"latin1"===n)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;let i;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{const a=c.isBuffer(e)?e:c.from(e,n),o=a.length;if(0===o)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<r-t;++i)this[i+t]=a[i%o]}return this};const O={};function K(e,t,r){O[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function G(e){let t="",r=e.length;const n="-"===e[0]?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function j(e,t,r,n,i,a){if(e>r||e<t){const n="bigint"==typeof t?"n":"";let i;throw i=a>3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(a+1)}${n}`:`>= -(2${n} ** ${8*(a+1)-1}${n}) and < 2 ** ${8*(a+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new O.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,r){V(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||H(t,e.length-(r+1))}(n,i,a)}function V(e,t){if("number"!=typeof e)throw new O.ERR_INVALID_ARG_TYPE(t,"number",e)}function H(e,t,r){if(Math.floor(e)!==e)throw V(e,r),new O.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new O.ERR_BUFFER_OUT_OF_BOUNDS;throw new O.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}K("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),K("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),K("ERR_OUT_OF_RANGE",(function(e,t,r){let n=`The value of "${e}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=G(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=G(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n}),RangeError);const q=/[^+/0-9A-Za-z-_]/g;function z(e,t){let r;t=t||1/0;const n=e.length;let i=null;const a=[];for(let o=0;o<n;++o){if(r=e.charCodeAt(o),r>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===n){(t-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&a.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;a.push(r)}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function W(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(q,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function X(e,t,r,n){let i;for(i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function Y(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Q(e){return e!=e}const Z=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function J(e){return"undefined"==typeof BigInt?$:e}function $(){throw new Error("BigInt not supported")}},90216:function(e,t,r){var n;e.exports=(n=r(48892),r(32240),r(69008),r(47604),r(73040),function(){var e=n,t=e.lib.BlockCipher,r=e.algo,i=[],a=[],o=[],s=[],c=[],u=[],f=[],h=[],l=[],d=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var r=0,n=0;for(t=0;t<256;t++){var p=n^n<<1^n<<2^n<<3^n<<4;p=p>>>8^255&p^99,i[r]=p,a[p]=r;var y=e[r],g=e[y],v=e[g],m=257*e[p]^16843008*p;o[r]=m<<24|m>>>8,s[r]=m<<16|m>>>16,c[r]=m<<8|m>>>24,u[r]=m,m=16843009*v^65537*g^257*y^16843008*r,f[p]=m<<24|m>>>8,h[p]=m<<16|m>>>16,l[p]=m<<8|m>>>24,d[p]=m,r?(r=y^e[e[e[v^y]]],n^=e[e[n]]):r=n=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],y=r.AES=t.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,r=e.sigBytes/4,n=4*((this._nRounds=r+6)+1),a=this._keySchedule=[],o=0;o<n;o++)o<r?a[o]=t[o]:(u=a[o-1],o%r?r>6&&o%r==4&&(u=i[u>>>24]<<24|i[u>>>16&255]<<16|i[u>>>8&255]<<8|i[255&u]):(u=i[(u=u<<8|u>>>24)>>>24]<<24|i[u>>>16&255]<<16|i[u>>>8&255]<<8|i[255&u],u^=p[o/r|0]<<24),a[o]=a[o-r]^u);for(var s=this._invKeySchedule=[],c=0;c<n;c++){if(o=n-c,c%4)var u=a[o];else u=a[o-4];s[c]=c<4||o<=4?u:f[i[u>>>24]]^h[i[u>>>16&255]]^l[i[u>>>8&255]]^d[i[255&u]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,o,s,c,u,i)},decryptBlock:function(e,t){var r=e[t+1];e[t+1]=e[t+3],e[t+3]=r,this._doCryptBlock(e,t,this._invKeySchedule,f,h,l,d,a),r=e[t+1],e[t+1]=e[t+3],e[t+3]=r},_doCryptBlock:function(e,t,r,n,i,a,o,s){for(var c=this._nRounds,u=e[t]^r[0],f=e[t+1]^r[1],h=e[t+2]^r[2],l=e[t+3]^r[3],d=4,p=1;p<c;p++){var y=n[u>>>24]^i[f>>>16&255]^a[h>>>8&255]^o[255&l]^r[d++],g=n[f>>>24]^i[h>>>16&255]^a[l>>>8&255]^o[255&u]^r[d++],v=n[h>>>24]^i[l>>>16&255]^a[u>>>8&255]^o[255&f]^r[d++],m=n[l>>>24]^i[u>>>16&255]^a[f>>>8&255]^o[255&h]^r[d++];u=y,f=g,h=v,l=m}y=(s[u>>>24]<<24|s[f>>>16&255]<<16|s[h>>>8&255]<<8|s[255&l])^r[d++],g=(s[f>>>24]<<24|s[h>>>16&255]<<16|s[l>>>8&255]<<8|s[255&u])^r[d++],v=(s[h>>>24]<<24|s[l>>>16&255]<<16|s[u>>>8&255]<<8|s[255&f])^r[d++],m=(s[l>>>24]<<24|s[u>>>16&255]<<16|s[f>>>8&255]<<8|s[255&h])^r[d++],e[t]=y,e[t+1]=g,e[t+2]=v,e[t+3]=m},keySize:8});e.AES=t._createHelper(y)}(),n.AES)},26344:function(e,t,r){var n;e.exports=(n=r(48892),r(32240),r(69008),r(47604),r(73040),function(){var e=n,t=e.lib.BlockCipher,r=e.algo;const i=16,a=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],o=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var s={pbox:[],sbox:[]};function c(e,t){let r=t>>24&255,n=t>>16&255,i=t>>8&255,a=255&t,o=e.sbox[0][r]+e.sbox[1][n];return o^=e.sbox[2][i],o+=e.sbox[3][a],o}function u(e,t,r){let n,a=t,o=r;for(let t=0;t<i;++t)a^=e.pbox[t],o=c(e,a)^o,n=a,a=o,o=n;return n=a,a=o,o=n,o^=e.pbox[i],a^=e.pbox[i+1],{left:a,right:o}}var f=r.Blowfish=t.extend({_doReset:function(){if(this._keyPriorReset!==this._key){var e=this._keyPriorReset=this._key,t=e.words,r=e.sigBytes/4;!function(e,t,r){for(let t=0;t<4;t++){e.sbox[t]=[];for(let r=0;r<256;r++)e.sbox[t][r]=o[t][r]}let n=0;for(let o=0;o<i+2;o++)e.pbox[o]=a[o]^t[n],n++,n>=r&&(n=0);let s=0,c=0,f=0;for(let t=0;t<i+2;t+=2)f=u(e,s,c),s=f.left,c=f.right,e.pbox[t]=s,e.pbox[t+1]=c;for(let t=0;t<4;t++)for(let r=0;r<256;r+=2)f=u(e,s,c),s=f.left,c=f.right,e.sbox[t][r]=s,e.sbox[t][r+1]=c}(s,t,r)}},encryptBlock:function(e,t){var r=u(s,e[t],e[t+1]);e[t]=r.left,e[t+1]=r.right},decryptBlock:function(e,t){var r=function(e,t,r){let n,a=t,o=r;for(let t=i+1;t>1;--t)a^=e.pbox[t],o=c(e,a)^o,n=a,a=o,o=n;return n=a,a=o,o=n,o^=e.pbox[1],a^=e.pbox[0],{left:a,right:o}}(s,e[t],e[t+1]);e[t]=r.left,e[t+1]=r.right},blockSize:2,keySize:4,ivSize:2});e.Blowfish=t._createHelper(f)}(),n.Blowfish)},73040:function(e,t,r){var n,i,a,o,s,c,u,f,h,l,d,p,y,g,v,m,b,w,C;e.exports=(n=r(48892),r(47604),void(n.lib.Cipher||(i=n,a=i.lib,o=a.Base,s=a.WordArray,c=a.BufferedBlockAlgorithm,u=i.enc,u.Utf8,f=u.Base64,h=i.algo.EvpKDF,l=a.Cipher=c.extend({cfg:o.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,r){this.cfg=this.cfg.extend(r),this._xformMode=e,this._key=t,this.reset()},reset:function(){c.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){return e&&this._append(e),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function e(e){return"string"==typeof e?C:b}return function(t){return{encrypt:function(r,n,i){return e(n).encrypt(t,r,n,i)},decrypt:function(r,n,i){return e(n).decrypt(t,r,n,i)}}}}()}),a.StreamCipher=l.extend({_doFinalize:function(){return this._process(!0)},blockSize:1}),d=i.mode={},p=a.BlockCipherMode=o.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}}),y=d.CBC=function(){var e=p.extend();function t(e,t,r){var n,i=this._iv;i?(n=i,this._iv=void 0):n=this._prevBlock;for(var a=0;a<r;a++)e[t+a]^=n[a]}return e.Encryptor=e.extend({processBlock:function(e,r){var n=this._cipher,i=n.blockSize;t.call(this,e,r,i),n.encryptBlock(e,r),this._prevBlock=e.slice(r,r+i)}}),e.Decryptor=e.extend({processBlock:function(e,r){var n=this._cipher,i=n.blockSize,a=e.slice(r,r+i);n.decryptBlock(e,r),t.call(this,e,r,i),this._prevBlock=a}}),e}(),g=(i.pad={}).Pkcs7={pad:function(e,t){for(var r=4*t,n=r-e.sigBytes%r,i=n<<24|n<<16|n<<8|n,a=[],o=0;o<n;o+=4)a.push(i);var c=s.create(a,n);e.concat(c)},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},a.BlockCipher=l.extend({cfg:l.cfg.extend({mode:y,padding:g}),reset:function(){var e;l.reset.call(this);var t=this.cfg,r=t.iv,n=t.mode;this._xformMode==this._ENC_XFORM_MODE?e=n.createEncryptor:(e=n.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==e?this._mode.init(this,r&&r.words):(this._mode=e.call(n,this,r&&r.words),this._mode.__creator=e)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e,t=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(t.pad(this._data,this.blockSize),e=this._process(!0)):(e=this._process(!0),t.unpad(e)),e},blockSize:4}),v=a.CipherParams=o.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),m=(i.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext,r=e.salt;return(r?s.create([1398893684,1701076831]).concat(r).concat(t):t).toString(f)},parse:function(e){var t,r=f.parse(e),n=r.words;return 1398893684==n[0]&&1701076831==n[1]&&(t=s.create(n.slice(2,4)),n.splice(0,4),r.sigBytes-=16),v.create({ciphertext:r,salt:t})}},b=a.SerializableCipher=o.extend({cfg:o.extend({format:m}),encrypt:function(e,t,r,n){n=this.cfg.extend(n);var i=e.createEncryptor(r,n),a=i.finalize(t),o=i.cfg;return v.create({ciphertext:a,key:r,iv:o.iv,algorithm:e,mode:o.mode,padding:o.padding,blockSize:e.blockSize,formatter:n.format})},decrypt:function(e,t,r,n){return n=this.cfg.extend(n),t=this._parse(t,n.format),e.createDecryptor(r,n).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),w=(i.kdf={}).OpenSSL={execute:function(e,t,r,n,i){if(n||(n=s.random(8)),i)a=h.create({keySize:t+r,hasher:i}).compute(e,n);else var a=h.create({keySize:t+r}).compute(e,n);var o=s.create(a.words.slice(t),4*r);return a.sigBytes=4*t,v.create({key:a,iv:o,salt:n})}},C=a.PasswordBasedCipher=b.extend({cfg:b.cfg.extend({kdf:w}),encrypt:function(e,t,r,n){var i=(n=this.cfg.extend(n)).kdf.execute(r,e.keySize,e.ivSize,n.salt,n.hasher);n.iv=i.iv;var a=b.encrypt.call(this,e,t,i.key,n);return a.mixIn(i),a},decrypt:function(e,t,r,n){n=this.cfg.extend(n),t=this._parse(t,n.format);var i=n.kdf.execute(r,e.keySize,e.ivSize,t.salt,n.hasher);return n.iv=i.iv,b.decrypt.call(this,e,t,i.key,n)}}))))},48892:function(e,t,r){var n;e.exports=(n=n||function(e,t){var n;if("undefined"!=typeof window&&window.crypto&&(n=window.crypto),"undefined"!=typeof self&&self.crypto&&(n=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(n=globalThis.crypto),!n&&"undefined"!=typeof window&&window.msCrypto&&(n=window.msCrypto),!n&&void 0!==r.g&&r.g.crypto&&(n=r.g.crypto),!n)try{n=r(89392)}catch(e){}var i=function(){if(n){if("function"==typeof n.getRandomValues)try{return n.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof n.randomBytes)try{return n.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")},a=Object.create||function(){function e(){}return function(t){var r;return e.prototype=t,r=new e,e.prototype=null,r}}(),o={},s=o.lib={},c=s.Base={extend:function(e){var t=a(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},u=s.WordArray=c.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||h).stringify(this)},concat:function(e){var t=this.words,r=e.words,n=this.sigBytes,i=e.sigBytes;if(this.clamp(),n%4)for(var a=0;a<i;a++){var o=r[a>>>2]>>>24-a%4*8&255;t[n+a>>>2]|=o<<24-(n+a)%4*8}else for(var s=0;s<i;s+=4)t[n+s>>>2]=r[s>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,r=this.sigBytes;t[r>>>2]&=4294967295<<32-r%4*8,t.length=e.ceil(r/4)},clone:function(){var e=c.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],r=0;r<e;r+=4)t.push(i());return new u.init(t,e)}}),f=o.enc={},h=f.Hex={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;i<r;i++){var a=t[i>>>2]>>>24-i%4*8&255;n.push((a>>>4).toString(16)),n.push((15&a).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n<t;n+=2)r[n>>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;return new u.init(r,t/2)}},l=f.Latin1={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;i<r;i++){var a=t[i>>>2]>>>24-i%4*8&255;n.push(String.fromCharCode(a))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n<t;n++)r[n>>>2]|=(255&e.charCodeAt(n))<<24-n%4*8;return new u.init(r,t)}},d=f.Utf8={stringify:function(e){try{return decodeURIComponent(escape(l.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return l.parse(unescape(encodeURIComponent(e)))}},p=s.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new u.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=d.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var r,n=this._data,i=n.words,a=n.sigBytes,o=this.blockSize,s=a/(4*o),c=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*o,f=e.min(4*c,a);if(c){for(var h=0;h<c;h+=o)this._doProcessBlock(i,h);r=i.splice(0,c),n.sigBytes-=f}return new u.init(r,f)},clone:function(){var e=c.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0}),y=(s.Hasher=p.extend({cfg:c.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){p.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,r){return new e.init(r).finalize(t)}},_createHmacHelper:function(e){return function(t,r){return new y.HMAC.init(e,r).finalize(t)}}}),o.algo={});return o}(Math),n)},32240:function(e,t,r){var n,i,a;e.exports=(n=r(48892),a=(i=n).lib.WordArray,i.enc.Base64={stringify:function(e){var t=e.words,r=e.sigBytes,n=this._map;e.clamp();for(var i=[],a=0;a<r;a+=3)for(var o=(t[a>>>2]>>>24-a%4*8&255)<<16|(t[a+1>>>2]>>>24-(a+1)%4*8&255)<<8|t[a+2>>>2]>>>24-(a+2)%4*8&255,s=0;s<4&&a+.75*s<r;s++)i.push(n.charAt(o>>>6*(3-s)&63));var c=n.charAt(64);if(c)for(;i.length%4;)i.push(c);return i.join("")},parse:function(e){var t=e.length,r=this._map,n=this._reverseMap;if(!n){n=this._reverseMap=[];for(var i=0;i<r.length;i++)n[r.charCodeAt(i)]=i}var o=r.charAt(64);if(o){var s=e.indexOf(o);-1!==s&&(t=s)}return function(e,t,r){for(var n=[],i=0,o=0;o<t;o++)if(o%4){var s=r[e.charCodeAt(o-1)]<<o%4*2|r[e.charCodeAt(o)]>>>6-o%4*2;n[i>>>2]|=s<<24-i%4*8,i++}return a.create(n,i)}(e,t,n)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},n.enc.Base64)},39440:function(e,t,r){var n,i,a;e.exports=(n=r(48892),a=(i=n).lib.WordArray,i.enc.Base64url={stringify:function(e,t){void 0===t&&(t=!0);var r=e.words,n=e.sigBytes,i=t?this._safe_map:this._map;e.clamp();for(var a=[],o=0;o<n;o+=3)for(var s=(r[o>>>2]>>>24-o%4*8&255)<<16|(r[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|r[o+2>>>2]>>>24-(o+2)%4*8&255,c=0;c<4&&o+.75*c<n;c++)a.push(i.charAt(s>>>6*(3-c)&63));var u=i.charAt(64);if(u)for(;a.length%4;)a.push(u);return a.join("")},parse:function(e,t){void 0===t&&(t=!0);var r=e.length,n=t?this._safe_map:this._map,i=this._reverseMap;if(!i){i=this._reverseMap=[];for(var o=0;o<n.length;o++)i[n.charCodeAt(o)]=o}var s=n.charAt(64);if(s){var c=e.indexOf(s);-1!==c&&(r=c)}return function(e,t,r){for(var n=[],i=0,o=0;o<t;o++)if(o%4){var s=r[e.charCodeAt(o-1)]<<o%4*2|r[e.charCodeAt(o)]>>>6-o%4*2;n[i>>>2]|=s<<24-i%4*8,i++}return a.create(n,i)}(e,r,i)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"},n.enc.Base64url)},23192:function(e,t,r){var n;e.exports=(n=r(48892),function(){var e=n,t=e.lib.WordArray,r=e.enc;function i(e){return e<<8&4278255360|e>>>8&16711935}r.Utf16=r.Utf16BE={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;i<r;i+=2){var a=t[i>>>2]>>>16-i%4*8&65535;n.push(String.fromCharCode(a))}return n.join("")},parse:function(e){for(var r=e.length,n=[],i=0;i<r;i++)n[i>>>1]|=e.charCodeAt(i)<<16-i%2*16;return t.create(n,2*r)}},r.Utf16LE={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],a=0;a<r;a+=2){var o=i(t[a>>>2]>>>16-a%4*8&65535);n.push(String.fromCharCode(o))}return n.join("")},parse:function(e){for(var r=e.length,n=[],a=0;a<r;a++)n[a>>>1]|=i(e.charCodeAt(a)<<16-a%2*16);return t.create(n,2*r)}}}(),n.enc.Utf16)},47604:function(e,t,r){var n,i,a,o,s,c,u,f;e.exports=(f=r(48892),r(38288),r(81356),a=(i=(n=f).lib).Base,o=i.WordArray,c=(s=n.algo).MD5,u=s.EvpKDF=a.extend({cfg:a.extend({keySize:4,hasher:c,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var r,n=this.cfg,i=n.hasher.create(),a=o.create(),s=a.words,c=n.keySize,u=n.iterations;s.length<c;){r&&i.update(r),r=i.update(e).finalize(t),i.reset();for(var f=1;f<u;f++)r=i.finalize(r),i.reset();a.concat(r)}return a.sigBytes=4*c,a}}),n.EvpKDF=function(e,t,r){return u.create(r).compute(e,t)},f.EvpKDF)},24160:function(e,t,r){var n,i,a,o;e.exports=(o=r(48892),r(73040),i=(n=o).lib.CipherParams,a=n.enc.Hex,n.format.Hex={stringify:function(e){return e.ciphertext.toString(a)},parse:function(e){var t=a.parse(e);return i.create({ciphertext:t})}},o.format.Hex)},81356:function(e,t,r){var n,i,a;e.exports=(i=(n=r(48892)).lib.Base,a=n.enc.Utf8,void(n.algo.HMAC=i.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=a.parse(t));var r=e.blockSize,n=4*r;t.sigBytes>n&&(t=e.finalize(t)),t.clamp();for(var i=this._oKey=t.clone(),o=this._iKey=t.clone(),s=i.words,c=o.words,u=0;u<r;u++)s[u]^=1549556828,c[u]^=909522486;i.sigBytes=o.sigBytes=n,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher,r=t.finalize(e);return t.reset(),t.finalize(this._oKey.clone().concat(r))}})))},20536:function(e,t,r){var n;e.exports=(n=r(48892),r(38648),r(83868),r(23192),r(32240),r(39440),r(69008),r(38288),r(42080),r(87300),r(89020),r(90372),r(17248),r(72548),r(81356),r(58708),r(47604),r(73040),r(96580),r(72304),r(33064),r(82728),r(30464),r(50016),r(3432),r(38329),r(8892),r(47088),r(24160),r(90216),r(76504),r(45672),r(12356),r(71436),r(26344),n)},83868:function(e,t,r){var n;e.exports=(n=r(48892),function(){if("function"==typeof ArrayBuffer){var e=n.lib.WordArray,t=e.init,r=e.init=function(e){if(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),(e instanceof Int8Array||"undefined"!=typeof Uint8ClampedArray&&e instanceof Uint8ClampedArray||e instanceof Int16Array||e instanceof Uint16Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array)&&(e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength)),e instanceof Uint8Array){for(var r=e.byteLength,n=[],i=0;i<r;i++)n[i>>>2]|=e[i]<<24-i%4*8;t.call(this,n,r)}else t.apply(this,arguments)};r.prototype=e}}(),n.lib.WordArray)},69008:function(e,t,r){var n;e.exports=(n=r(48892),function(e){var t=n,r=t.lib,i=r.WordArray,a=r.Hasher,o=t.algo,s=[];!function(){for(var t=0;t<64;t++)s[t]=4294967296*e.abs(e.sin(t+1))|0}();var c=o.MD5=a.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var r=0;r<16;r++){var n=t+r,i=e[n];e[n]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var a=this._hash.words,o=e[t+0],c=e[t+1],d=e[t+2],p=e[t+3],y=e[t+4],g=e[t+5],v=e[t+6],m=e[t+7],b=e[t+8],w=e[t+9],C=e[t+10],E=e[t+11],S=e[t+12],A=e[t+13],B=e[t+14],T=e[t+15],I=a[0],k=a[1],_=a[2],R=a[3];I=u(I,k,_,R,o,7,s[0]),R=u(R,I,k,_,c,12,s[1]),_=u(_,R,I,k,d,17,s[2]),k=u(k,_,R,I,p,22,s[3]),I=u(I,k,_,R,y,7,s[4]),R=u(R,I,k,_,g,12,s[5]),_=u(_,R,I,k,v,17,s[6]),k=u(k,_,R,I,m,22,s[7]),I=u(I,k,_,R,b,7,s[8]),R=u(R,I,k,_,w,12,s[9]),_=u(_,R,I,k,C,17,s[10]),k=u(k,_,R,I,E,22,s[11]),I=u(I,k,_,R,S,7,s[12]),R=u(R,I,k,_,A,12,s[13]),_=u(_,R,I,k,B,17,s[14]),I=f(I,k=u(k,_,R,I,T,22,s[15]),_,R,c,5,s[16]),R=f(R,I,k,_,v,9,s[17]),_=f(_,R,I,k,E,14,s[18]),k=f(k,_,R,I,o,20,s[19]),I=f(I,k,_,R,g,5,s[20]),R=f(R,I,k,_,C,9,s[21]),_=f(_,R,I,k,T,14,s[22]),k=f(k,_,R,I,y,20,s[23]),I=f(I,k,_,R,w,5,s[24]),R=f(R,I,k,_,B,9,s[25]),_=f(_,R,I,k,p,14,s[26]),k=f(k,_,R,I,b,20,s[27]),I=f(I,k,_,R,A,5,s[28]),R=f(R,I,k,_,d,9,s[29]),_=f(_,R,I,k,m,14,s[30]),I=h(I,k=f(k,_,R,I,S,20,s[31]),_,R,g,4,s[32]),R=h(R,I,k,_,b,11,s[33]),_=h(_,R,I,k,E,16,s[34]),k=h(k,_,R,I,B,23,s[35]),I=h(I,k,_,R,c,4,s[36]),R=h(R,I,k,_,y,11,s[37]),_=h(_,R,I,k,m,16,s[38]),k=h(k,_,R,I,C,23,s[39]),I=h(I,k,_,R,A,4,s[40]),R=h(R,I,k,_,o,11,s[41]),_=h(_,R,I,k,p,16,s[42]),k=h(k,_,R,I,v,23,s[43]),I=h(I,k,_,R,w,4,s[44]),R=h(R,I,k,_,S,11,s[45]),_=h(_,R,I,k,T,16,s[46]),I=l(I,k=h(k,_,R,I,d,23,s[47]),_,R,o,6,s[48]),R=l(R,I,k,_,m,10,s[49]),_=l(_,R,I,k,B,15,s[50]),k=l(k,_,R,I,g,21,s[51]),I=l(I,k,_,R,S,6,s[52]),R=l(R,I,k,_,p,10,s[53]),_=l(_,R,I,k,C,15,s[54]),k=l(k,_,R,I,c,21,s[55]),I=l(I,k,_,R,b,6,s[56]),R=l(R,I,k,_,T,10,s[57]),_=l(_,R,I,k,v,15,s[58]),k=l(k,_,R,I,A,21,s[59]),I=l(I,k,_,R,y,6,s[60]),R=l(R,I,k,_,E,10,s[61]),_=l(_,R,I,k,d,15,s[62]),k=l(k,_,R,I,w,21,s[63]),a[0]=a[0]+I|0,a[1]=a[1]+k|0,a[2]=a[2]+_|0,a[3]=a[3]+R|0},_doFinalize:function(){var t=this._data,r=t.words,n=8*this._nDataBytes,i=8*t.sigBytes;r[i>>>5]|=128<<24-i%32;var a=e.floor(n/4294967296),o=n;r[15+(i+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),r[14+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),t.sigBytes=4*(r.length+1),this._process();for(var s=this._hash,c=s.words,u=0;u<4;u++){var f=c[u];c[u]=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8)}return s},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}});function u(e,t,r,n,i,a,o){var s=e+(t&r|~t&n)+i+o;return(s<<a|s>>>32-a)+t}function f(e,t,r,n,i,a,o){var s=e+(t&n|r&~n)+i+o;return(s<<a|s>>>32-a)+t}function h(e,t,r,n,i,a,o){var s=e+(t^r^n)+i+o;return(s<<a|s>>>32-a)+t}function l(e,t,r,n,i,a,o){var s=e+(r^(t|~n))+i+o;return(s<<a|s>>>32-a)+t}t.MD5=a._createHelper(c),t.HmacMD5=a._createHmacHelper(c)}(Math),n.MD5)},96580:function(e,t,r){var n;e.exports=(n=r(48892),r(73040),n.mode.CFB=function(){var e=n.lib.BlockCipherMode.extend();function t(e,t,r,n){var i,a=this._iv;a?(i=a.slice(0),this._iv=void 0):i=this._prevBlock,n.encryptBlock(i,0);for(var o=0;o<r;o++)e[t+o]^=i[o]}return e.Encryptor=e.extend({processBlock:function(e,r){var n=this._cipher,i=n.blockSize;t.call(this,e,r,i,n),this._prevBlock=e.slice(r,r+i)}}),e.Decryptor=e.extend({processBlock:function(e,r){var n=this._cipher,i=n.blockSize,a=e.slice(r,r+i);t.call(this,e,r,i,n),this._prevBlock=a}}),e}(),n.mode.CFB)},33064:function(e,t,r){var n;e.exports=(n=r(48892),r(73040),n.mode.CTRGladman=function(){var e=n.lib.BlockCipherMode.extend();function t(e){if(255==(e>>24&255)){var t=e>>16&255,r=e>>8&255,n=255&e;255===t?(t=0,255===r?(r=0,255===n?n=0:++n):++r):++t,e=0,e+=t<<16,e+=r<<8,e+=n}else e+=1<<24;return e}var r=e.Encryptor=e.extend({processBlock:function(e,r){var n=this._cipher,i=n.blockSize,a=this._iv,o=this._counter;a&&(o=this._counter=a.slice(0),this._iv=void 0),function(e){0===(e[0]=t(e[0]))&&(e[1]=t(e[1]))}(o);var s=o.slice(0);n.encryptBlock(s,0);for(var c=0;c<i;c++)e[r+c]^=s[c]}});return e.Decryptor=r,e}(),n.mode.CTRGladman)},72304:function(e,t,r){var n,i,a;e.exports=(a=r(48892),r(73040),a.mode.CTR=(i=(n=a.lib.BlockCipherMode.extend()).Encryptor=n.extend({processBlock:function(e,t){var r=this._cipher,n=r.blockSize,i=this._iv,a=this._counter;i&&(a=this._counter=i.slice(0),this._iv=void 0);var o=a.slice(0);r.encryptBlock(o,0),a[n-1]=a[n-1]+1|0;for(var s=0;s<n;s++)e[t+s]^=o[s]}}),n.Decryptor=i,n),a.mode.CTR)},30464:function(e,t,r){var n,i;e.exports=(i=r(48892),r(73040),i.mode.ECB=((n=i.lib.BlockCipherMode.extend()).Encryptor=n.extend({processBlock:function(e,t){this._cipher.encryptBlock(e,t)}}),n.Decryptor=n.extend({processBlock:function(e,t){this._cipher.decryptBlock(e,t)}}),n),i.mode.ECB)},82728:function(e,t,r){var n,i,a;e.exports=(a=r(48892),r(73040),a.mode.OFB=(i=(n=a.lib.BlockCipherMode.extend()).Encryptor=n.extend({processBlock:function(e,t){var r=this._cipher,n=r.blockSize,i=this._iv,a=this._keystream;i&&(a=this._keystream=i.slice(0),this._iv=void 0),r.encryptBlock(a,0);for(var o=0;o<n;o++)e[t+o]^=a[o]}}),n.Decryptor=i,n),a.mode.OFB)},50016:function(e,t,r){var n;e.exports=(n=r(48892),r(73040),n.pad.AnsiX923={pad:function(e,t){var r=e.sigBytes,n=4*t,i=n-r%n,a=r+i-1;e.clamp(),e.words[a>>>2]|=i<<24-a%4*8,e.sigBytes+=i},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},n.pad.Ansix923)},3432:function(e,t,r){var n;e.exports=(n=r(48892),r(73040),n.pad.Iso10126={pad:function(e,t){var r=4*t,i=r-e.sigBytes%r;e.concat(n.lib.WordArray.random(i-1)).concat(n.lib.WordArray.create([i<<24],1))},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},n.pad.Iso10126)},38329:function(e,t,r){var n;e.exports=(n=r(48892),r(73040),n.pad.Iso97971={pad:function(e,t){e.concat(n.lib.WordArray.create([2147483648],1)),n.pad.ZeroPadding.pad(e,t)},unpad:function(e){n.pad.ZeroPadding.unpad(e),e.sigBytes--}},n.pad.Iso97971)},47088:function(e,t,r){var n;e.exports=(n=r(48892),r(73040),n.pad.NoPadding={pad:function(){},unpad:function(){}},n.pad.NoPadding)},8892:function(e,t,r){var n;e.exports=(n=r(48892),r(73040),n.pad.ZeroPadding={pad:function(e,t){var r=4*t;e.clamp(),e.sigBytes+=r-(e.sigBytes%r||r)},unpad:function(e){var t=e.words,r=e.sigBytes-1;for(r=e.sigBytes-1;r>=0;r--)if(t[r>>>2]>>>24-r%4*8&255){e.sigBytes=r+1;break}}},n.pad.ZeroPadding)},58708:function(e,t,r){var n,i,a,o,s,c,u,f,h;e.exports=(h=r(48892),r(42080),r(81356),a=(i=(n=h).lib).Base,o=i.WordArray,c=(s=n.algo).SHA256,u=s.HMAC,f=s.PBKDF2=a.extend({cfg:a.extend({keySize:4,hasher:c,iterations:25e4}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var r=this.cfg,n=u.create(r.hasher,e),i=o.create(),a=o.create([1]),s=i.words,c=a.words,f=r.keySize,h=r.iterations;s.length<f;){var l=n.update(t).finalize(a);n.reset();for(var d=l.words,p=d.length,y=l,g=1;g<h;g++){y=n.finalize(y),n.reset();for(var v=y.words,m=0;m<p;m++)d[m]^=v[m]}i.concat(l),c[0]++}return i.sigBytes=4*f,i}}),n.PBKDF2=function(e,t,r){return f.create(r).compute(e,t)},h.PBKDF2)},71436:function(e,t,r){var n;e.exports=(n=r(48892),r(32240),r(69008),r(47604),r(73040),function(){var e=n,t=e.lib.StreamCipher,r=e.algo,i=[],a=[],o=[],s=r.RabbitLegacy=t.extend({_doReset:function(){var e=this._key.words,t=this.cfg.iv,r=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],n=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];this._b=0;for(var i=0;i<4;i++)c.call(this);for(i=0;i<8;i++)n[i]^=r[i+4&7];if(t){var a=t.words,o=a[0],s=a[1],u=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),f=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),h=u>>>16|4294901760&f,l=f<<16|65535&u;for(n[0]^=u,n[1]^=h,n[2]^=f,n[3]^=l,n[4]^=u,n[5]^=h,n[6]^=f,n[7]^=l,i=0;i<4;i++)c.call(this)}},_doProcessBlock:function(e,t){var r=this._X;c.call(this),i[0]=r[0]^r[5]>>>16^r[3]<<16,i[1]=r[2]^r[7]>>>16^r[5]<<16,i[2]=r[4]^r[1]>>>16^r[7]<<16,i[3]=r[6]^r[3]>>>16^r[1]<<16;for(var n=0;n<4;n++)i[n]=16711935&(i[n]<<8|i[n]>>>24)|4278255360&(i[n]<<24|i[n]>>>8),e[t+n]^=i[n]},blockSize:4,ivSize:2});function c(){for(var e=this._X,t=this._C,r=0;r<8;r++)a[r]=t[r];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<a[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<a[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<a[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<a[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<a[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<a[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<a[6]>>>0?1:0)|0,this._b=t[7]>>>0<a[7]>>>0?1:0,r=0;r<8;r++){var n=e[r]+t[r],i=65535&n,s=n>>>16,c=((i*i>>>17)+i*s>>>15)+s*s,u=((4294901760&n)*n|0)+((65535&n)*n|0);o[r]=c^u}e[0]=o[0]+(o[7]<<16|o[7]>>>16)+(o[6]<<16|o[6]>>>16)|0,e[1]=o[1]+(o[0]<<8|o[0]>>>24)+o[7]|0,e[2]=o[2]+(o[1]<<16|o[1]>>>16)+(o[0]<<16|o[0]>>>16)|0,e[3]=o[3]+(o[2]<<8|o[2]>>>24)+o[1]|0,e[4]=o[4]+(o[3]<<16|o[3]>>>16)+(o[2]<<16|o[2]>>>16)|0,e[5]=o[5]+(o[4]<<8|o[4]>>>24)+o[3]|0,e[6]=o[6]+(o[5]<<16|o[5]>>>16)+(o[4]<<16|o[4]>>>16)|0,e[7]=o[7]+(o[6]<<8|o[6]>>>24)+o[5]|0}e.RabbitLegacy=t._createHelper(s)}(),n.RabbitLegacy)},12356:function(e,t,r){var n;e.exports=(n=r(48892),r(32240),r(69008),r(47604),r(73040),function(){var e=n,t=e.lib.StreamCipher,r=e.algo,i=[],a=[],o=[],s=r.Rabbit=t.extend({_doReset:function(){for(var e=this._key.words,t=this.cfg.iv,r=0;r<4;r++)e[r]=16711935&(e[r]<<8|e[r]>>>24)|4278255360&(e[r]<<24|e[r]>>>8);var n=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],i=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];for(this._b=0,r=0;r<4;r++)c.call(this);for(r=0;r<8;r++)i[r]^=n[r+4&7];if(t){var a=t.words,o=a[0],s=a[1],u=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),f=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),h=u>>>16|4294901760&f,l=f<<16|65535&u;for(i[0]^=u,i[1]^=h,i[2]^=f,i[3]^=l,i[4]^=u,i[5]^=h,i[6]^=f,i[7]^=l,r=0;r<4;r++)c.call(this)}},_doProcessBlock:function(e,t){var r=this._X;c.call(this),i[0]=r[0]^r[5]>>>16^r[3]<<16,i[1]=r[2]^r[7]>>>16^r[5]<<16,i[2]=r[4]^r[1]>>>16^r[7]<<16,i[3]=r[6]^r[3]>>>16^r[1]<<16;for(var n=0;n<4;n++)i[n]=16711935&(i[n]<<8|i[n]>>>24)|4278255360&(i[n]<<24|i[n]>>>8),e[t+n]^=i[n]},blockSize:4,ivSize:2});function c(){for(var e=this._X,t=this._C,r=0;r<8;r++)a[r]=t[r];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<a[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<a[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<a[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<a[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<a[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<a[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<a[6]>>>0?1:0)|0,this._b=t[7]>>>0<a[7]>>>0?1:0,r=0;r<8;r++){var n=e[r]+t[r],i=65535&n,s=n>>>16,c=((i*i>>>17)+i*s>>>15)+s*s,u=((4294901760&n)*n|0)+((65535&n)*n|0);o[r]=c^u}e[0]=o[0]+(o[7]<<16|o[7]>>>16)+(o[6]<<16|o[6]>>>16)|0,e[1]=o[1]+(o[0]<<8|o[0]>>>24)+o[7]|0,e[2]=o[2]+(o[1]<<16|o[1]>>>16)+(o[0]<<16|o[0]>>>16)|0,e[3]=o[3]+(o[2]<<8|o[2]>>>24)+o[1]|0,e[4]=o[4]+(o[3]<<16|o[3]>>>16)+(o[2]<<16|o[2]>>>16)|0,e[5]=o[5]+(o[4]<<8|o[4]>>>24)+o[3]|0,e[6]=o[6]+(o[5]<<16|o[5]>>>16)+(o[4]<<16|o[4]>>>16)|0,e[7]=o[7]+(o[6]<<8|o[6]>>>24)+o[5]|0}e.Rabbit=t._createHelper(s)}(),n.Rabbit)},45672:function(e,t,r){var n;e.exports=(n=r(48892),r(32240),r(69008),r(47604),r(73040),function(){var e=n,t=e.lib.StreamCipher,r=e.algo,i=r.RC4=t.extend({_doReset:function(){for(var e=this._key,t=e.words,r=e.sigBytes,n=this._S=[],i=0;i<256;i++)n[i]=i;i=0;for(var a=0;i<256;i++){var o=i%r,s=t[o>>>2]>>>24-o%4*8&255;a=(a+n[i]+s)%256;var c=n[i];n[i]=n[a],n[a]=c}this._i=this._j=0},_doProcessBlock:function(e,t){e[t]^=a.call(this)},keySize:8,ivSize:0});function a(){for(var e=this._S,t=this._i,r=this._j,n=0,i=0;i<4;i++){r=(r+e[t=(t+1)%256])%256;var a=e[t];e[t]=e[r],e[r]=a,n|=e[(e[t]+e[r])%256]<<24-8*i}return this._i=t,this._j=r,n}e.RC4=t._createHelper(i);var o=r.RC4Drop=i.extend({cfg:i.cfg.extend({drop:192}),_doReset:function(){i._doReset.call(this);for(var e=this.cfg.drop;e>0;e--)a.call(this)}});e.RC4Drop=t._createHelper(o)}(),n.RC4)},72548:function(e,t,r){var n;e.exports=(n=r(48892),function(e){var t=n,r=t.lib,i=r.WordArray,a=r.Hasher,o=t.algo,s=i.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),c=i.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),u=i.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),f=i.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),h=i.create([0,1518500249,1859775393,2400959708,2840853838]),l=i.create([1352829926,1548603684,1836072691,2053994217,0]),d=o.RIPEMD160=a.extend({_doReset:function(){this._hash=i.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var r=0;r<16;r++){var n=t+r,i=e[n];e[n]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var a,o,d,w,C,E,S,A,B,T,I,k=this._hash.words,_=h.words,R=l.words,x=s.words,F=c.words,D=u.words,P=f.words;for(E=a=k[0],S=o=k[1],A=d=k[2],B=w=k[3],T=C=k[4],r=0;r<80;r+=1)I=a+e[t+x[r]]|0,I+=r<16?p(o,d,w)+_[0]:r<32?y(o,d,w)+_[1]:r<48?g(o,d,w)+_[2]:r<64?v(o,d,w)+_[3]:m(o,d,w)+_[4],I=(I=b(I|=0,D[r]))+C|0,a=C,C=w,w=b(d,10),d=o,o=I,I=E+e[t+F[r]]|0,I+=r<16?m(S,A,B)+R[0]:r<32?v(S,A,B)+R[1]:r<48?g(S,A,B)+R[2]:r<64?y(S,A,B)+R[3]:p(S,A,B)+R[4],I=(I=b(I|=0,P[r]))+T|0,E=T,T=B,B=b(A,10),A=S,S=I;I=k[1]+d+B|0,k[1]=k[2]+w+T|0,k[2]=k[3]+C+E|0,k[3]=k[4]+a+S|0,k[4]=k[0]+o+A|0,k[0]=I},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;t[n>>>5]|=128<<24-n%32,t[14+(n+64>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),e.sigBytes=4*(t.length+1),this._process();for(var i=this._hash,a=i.words,o=0;o<5;o++){var s=a[o];a[o]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8)}return i},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}});function p(e,t,r){return e^t^r}function y(e,t,r){return e&t|~e&r}function g(e,t,r){return(e|~t)^r}function v(e,t,r){return e&r|t&~r}function m(e,t,r){return e^(t|~r)}function b(e,t){return e<<t|e>>>32-t}t.RIPEMD160=a._createHelper(d),t.HmacRIPEMD160=a._createHmacHelper(d)}(Math),n.RIPEMD160)},38288:function(e,t,r){var n,i,a,o,s,c,u,f;e.exports=(i=(n=f=r(48892)).lib,a=i.WordArray,o=i.Hasher,s=n.algo,c=[],u=s.SHA1=o.extend({_doReset:function(){this._hash=new a.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var r=this._hash.words,n=r[0],i=r[1],a=r[2],o=r[3],s=r[4],u=0;u<80;u++){if(u<16)c[u]=0|e[t+u];else{var f=c[u-3]^c[u-8]^c[u-14]^c[u-16];c[u]=f<<1|f>>>31}var h=(n<<5|n>>>27)+s+c[u];h+=u<20?1518500249+(i&a|~i&o):u<40?1859775393+(i^a^o):u<60?(i&a|i&o|a&o)-1894007588:(i^a^o)-899497514,s=o,o=a,a=i<<30|i>>>2,i=n,n=h}r[0]=r[0]+n|0,r[1]=r[1]+i|0,r[2]=r[2]+a|0,r[3]=r[3]+o|0,r[4]=r[4]+s|0},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;return t[n>>>5]|=128<<24-n%32,t[14+(n+64>>>9<<4)]=Math.floor(r/4294967296),t[15+(n+64>>>9<<4)]=r,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}}),n.SHA1=o._createHelper(u),n.HmacSHA1=o._createHmacHelper(u),f.SHA1)},87300:function(e,t,r){var n,i,a,o,s,c;e.exports=(c=r(48892),r(42080),i=(n=c).lib.WordArray,a=n.algo,o=a.SHA256,s=a.SHA224=o.extend({_doReset:function(){this._hash=new i.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var e=o._doFinalize.call(this);return e.sigBytes-=4,e}}),n.SHA224=o._createHelper(s),n.HmacSHA224=o._createHmacHelper(s),c.SHA224)},42080:function(e,t,r){var n;e.exports=(n=r(48892),function(e){var t=n,r=t.lib,i=r.WordArray,a=r.Hasher,o=t.algo,s=[],c=[];!function(){function t(t){for(var r=e.sqrt(t),n=2;n<=r;n++)if(!(t%n))return!1;return!0}function r(e){return 4294967296*(e-(0|e))|0}for(var n=2,i=0;i<64;)t(n)&&(i<8&&(s[i]=r(e.pow(n,.5))),c[i]=r(e.pow(n,1/3)),i++),n++}();var u=[],f=o.SHA256=a.extend({_doReset:function(){this._hash=new i.init(s.slice(0))},_doProcessBlock:function(e,t){for(var r=this._hash.words,n=r[0],i=r[1],a=r[2],o=r[3],s=r[4],f=r[5],h=r[6],l=r[7],d=0;d<64;d++){if(d<16)u[d]=0|e[t+d];else{var p=u[d-15],y=(p<<25|p>>>7)^(p<<14|p>>>18)^p>>>3,g=u[d-2],v=(g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10;u[d]=y+u[d-7]+v+u[d-16]}var m=n&i^n&a^i&a,b=(n<<30|n>>>2)^(n<<19|n>>>13)^(n<<10|n>>>22),w=l+((s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25))+(s&f^~s&h)+c[d]+u[d];l=h,h=f,f=s,s=o+w|0,o=a,a=i,i=n,n=w+(b+m)|0}r[0]=r[0]+n|0,r[1]=r[1]+i|0,r[2]=r[2]+a|0,r[3]=r[3]+o|0,r[4]=r[4]+s|0,r[5]=r[5]+f|0,r[6]=r[6]+h|0,r[7]=r[7]+l|0},_doFinalize:function(){var t=this._data,r=t.words,n=8*this._nDataBytes,i=8*t.sigBytes;return r[i>>>5]|=128<<24-i%32,r[14+(i+64>>>9<<4)]=e.floor(n/4294967296),r[15+(i+64>>>9<<4)]=n,t.sigBytes=4*r.length,this._process(),this._hash},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=a._createHelper(f),t.HmacSHA256=a._createHmacHelper(f)}(Math),n.SHA256)},17248:function(e,t,r){var n;e.exports=(n=r(48892),r(38648),function(e){var t=n,r=t.lib,i=r.WordArray,a=r.Hasher,o=t.x64.Word,s=t.algo,c=[],u=[],f=[];!function(){for(var e=1,t=0,r=0;r<24;r++){c[e+5*t]=(r+1)*(r+2)/2%64;var n=(2*e+3*t)%5;e=t%5,t=n}for(e=0;e<5;e++)for(t=0;t<5;t++)u[e+5*t]=t+(2*e+3*t)%5*5;for(var i=1,a=0;a<24;a++){for(var s=0,h=0,l=0;l<7;l++){if(1&i){var d=(1<<l)-1;d<32?h^=1<<d:s^=1<<d-32}128&i?i=i<<1^113:i<<=1}f[a]=o.create(s,h)}}();var h=[];!function(){for(var e=0;e<25;e++)h[e]=o.create()}();var l=s.SHA3=a.extend({cfg:a.cfg.extend({outputLength:512}),_doReset:function(){for(var e=this._state=[],t=0;t<25;t++)e[t]=new o.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(e,t){for(var r=this._state,n=this.blockSize/2,i=0;i<n;i++){var a=e[t+2*i],o=e[t+2*i+1];a=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),o=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),(k=r[i]).high^=o,k.low^=a}for(var s=0;s<24;s++){for(var l=0;l<5;l++){for(var d=0,p=0,y=0;y<5;y++)d^=(k=r[l+5*y]).high,p^=k.low;var g=h[l];g.high=d,g.low=p}for(l=0;l<5;l++){var v=h[(l+4)%5],m=h[(l+1)%5],b=m.high,w=m.low;for(d=v.high^(b<<1|w>>>31),p=v.low^(w<<1|b>>>31),y=0;y<5;y++)(k=r[l+5*y]).high^=d,k.low^=p}for(var C=1;C<25;C++){var E=(k=r[C]).high,S=k.low,A=c[C];A<32?(d=E<<A|S>>>32-A,p=S<<A|E>>>32-A):(d=S<<A-32|E>>>64-A,p=E<<A-32|S>>>64-A);var B=h[u[C]];B.high=d,B.low=p}var T=h[0],I=r[0];for(T.high=I.high,T.low=I.low,l=0;l<5;l++)for(y=0;y<5;y++){var k=r[C=l+5*y],_=h[C],R=h[(l+1)%5+5*y],x=h[(l+2)%5+5*y];k.high=_.high^~R.high&x.high,k.low=_.low^~R.low&x.low}k=r[0];var F=f[s];k.high^=F.high,k.low^=F.low}},_doFinalize:function(){var t=this._data,r=t.words,n=(this._nDataBytes,8*t.sigBytes),a=32*this.blockSize;r[n>>>5]|=1<<24-n%32,r[(e.ceil((n+1)/a)*a>>>5)-1]|=128,t.sigBytes=4*r.length,this._process();for(var o=this._state,s=this.cfg.outputLength/8,c=s/8,u=[],f=0;f<c;f++){var h=o[f],l=h.high,d=h.low;l=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8),d=16711935&(d<<8|d>>>24)|4278255360&(d<<24|d>>>8),u.push(d),u.push(l)}return new i.init(u,s)},clone:function(){for(var e=a.clone.call(this),t=e._state=this._state.slice(0),r=0;r<25;r++)t[r]=t[r].clone();return e}});t.SHA3=a._createHelper(l),t.HmacSHA3=a._createHmacHelper(l)}(Math),n.SHA3)},90372:function(e,t,r){var n,i,a,o,s,c,u,f;e.exports=(f=r(48892),r(38648),r(89020),i=(n=f).x64,a=i.Word,o=i.WordArray,s=n.algo,c=s.SHA512,u=s.SHA384=c.extend({_doReset:function(){this._hash=new o.init([new a.init(3418070365,3238371032),new a.init(1654270250,914150663),new a.init(2438529370,812702999),new a.init(355462360,4144912697),new a.init(1731405415,4290775857),new a.init(2394180231,1750603025),new a.init(3675008525,1694076839),new a.init(1203062813,3204075428)])},_doFinalize:function(){var e=c._doFinalize.call(this);return e.sigBytes-=16,e}}),n.SHA384=c._createHelper(u),n.HmacSHA384=c._createHmacHelper(u),f.SHA384)},89020:function(e,t,r){var n;e.exports=(n=r(48892),r(38648),function(){var e=n,t=e.lib.Hasher,r=e.x64,i=r.Word,a=r.WordArray,o=e.algo;function s(){return i.create.apply(i,arguments)}var c=[s(1116352408,3609767458),s(1899447441,602891725),s(3049323471,3964484399),s(3921009573,2173295548),s(961987163,4081628472),s(1508970993,3053834265),s(2453635748,2937671579),s(2870763221,3664609560),s(3624381080,2734883394),s(310598401,1164996542),s(607225278,1323610764),s(1426881987,3590304994),s(1925078388,4068182383),s(2162078206,991336113),s(2614888103,633803317),s(3248222580,3479774868),s(3835390401,2666613458),s(4022224774,944711139),s(264347078,2341262773),s(604807628,2007800933),s(770255983,1495990901),s(1249150122,1856431235),s(1555081692,3175218132),s(1996064986,2198950837),s(2554220882,3999719339),s(2821834349,766784016),s(2952996808,2566594879),s(3210313671,3203337956),s(3336571891,1034457026),s(3584528711,2466948901),s(113926993,3758326383),s(338241895,168717936),s(666307205,1188179964),s(773529912,1546045734),s(1294757372,1522805485),s(1396182291,2643833823),s(1695183700,2343527390),s(1986661051,1014477480),s(2177026350,1206759142),s(2456956037,344077627),s(2730485921,1290863460),s(2820302411,3158454273),s(3259730800,3505952657),s(3345764771,106217008),s(3516065817,3606008344),s(3600352804,1432725776),s(4094571909,1467031594),s(275423344,851169720),s(430227734,3100823752),s(506948616,1363258195),s(659060556,3750685593),s(883997877,3785050280),s(958139571,3318307427),s(1322822218,3812723403),s(1537002063,2003034995),s(1747873779,3602036899),s(1955562222,1575990012),s(2024104815,1125592928),s(2227730452,2716904306),s(2361852424,442776044),s(2428436474,593698344),s(2756734187,3733110249),s(3204031479,2999351573),s(3329325298,3815920427),s(3391569614,3928383900),s(3515267271,566280711),s(3940187606,3454069534),s(4118630271,4000239992),s(116418474,1914138554),s(174292421,2731055270),s(289380356,3203993006),s(460393269,320620315),s(685471733,587496836),s(852142971,1086792851),s(1017036298,365543100),s(1126000580,2618297676),s(1288033470,3409855158),s(1501505948,4234509866),s(1607167915,987167468),s(1816402316,1246189591)],u=[];!function(){for(var e=0;e<80;e++)u[e]=s()}();var f=o.SHA512=t.extend({_doReset:function(){this._hash=new a.init([new i.init(1779033703,4089235720),new i.init(3144134277,2227873595),new i.init(1013904242,4271175723),new i.init(2773480762,1595750129),new i.init(1359893119,2917565137),new i.init(2600822924,725511199),new i.init(528734635,4215389547),new i.init(1541459225,327033209)])},_doProcessBlock:function(e,t){for(var r=this._hash.words,n=r[0],i=r[1],a=r[2],o=r[3],s=r[4],f=r[5],h=r[6],l=r[7],d=n.high,p=n.low,y=i.high,g=i.low,v=a.high,m=a.low,b=o.high,w=o.low,C=s.high,E=s.low,S=f.high,A=f.low,B=h.high,T=h.low,I=l.high,k=l.low,_=d,R=p,x=y,F=g,D=v,P=m,U=b,N=w,L=C,M=E,O=S,K=A,G=B,j=T,V=I,H=k,q=0;q<80;q++){var z,W,X=u[q];if(q<16)W=X.high=0|e[t+2*q],z=X.low=0|e[t+2*q+1];else{var Y=u[q-15],Q=Y.high,Z=Y.low,J=(Q>>>1|Z<<31)^(Q>>>8|Z<<24)^Q>>>7,$=(Z>>>1|Q<<31)^(Z>>>8|Q<<24)^(Z>>>7|Q<<25),ee=u[q-2],te=ee.high,re=ee.low,ne=(te>>>19|re<<13)^(te<<3|re>>>29)^te>>>6,ie=(re>>>19|te<<13)^(re<<3|te>>>29)^(re>>>6|te<<26),ae=u[q-7],oe=ae.high,se=ae.low,ce=u[q-16],ue=ce.high,fe=ce.low;W=(W=(W=J+oe+((z=$+se)>>>0<$>>>0?1:0))+ne+((z+=ie)>>>0<ie>>>0?1:0))+ue+((z+=fe)>>>0<fe>>>0?1:0),X.high=W,X.low=z}var he,le=L&O^~L&G,de=M&K^~M&j,pe=_&x^_&D^x&D,ye=R&F^R&P^F&P,ge=(_>>>28|R<<4)^(_<<30|R>>>2)^(_<<25|R>>>7),ve=(R>>>28|_<<4)^(R<<30|_>>>2)^(R<<25|_>>>7),me=(L>>>14|M<<18)^(L>>>18|M<<14)^(L<<23|M>>>9),be=(M>>>14|L<<18)^(M>>>18|L<<14)^(M<<23|L>>>9),we=c[q],Ce=we.high,Ee=we.low,Se=V+me+((he=H+be)>>>0<H>>>0?1:0),Ae=ve+ye;V=G,H=j,G=O,j=K,O=L,K=M,L=U+(Se=(Se=(Se=Se+le+((he+=de)>>>0<de>>>0?1:0))+Ce+((he+=Ee)>>>0<Ee>>>0?1:0))+W+((he+=z)>>>0<z>>>0?1:0))+((M=N+he|0)>>>0<N>>>0?1:0)|0,U=D,N=P,D=x,P=F,x=_,F=R,_=Se+(ge+pe+(Ae>>>0<ve>>>0?1:0))+((R=he+Ae|0)>>>0<he>>>0?1:0)|0}p=n.low=p+R,n.high=d+_+(p>>>0<R>>>0?1:0),g=i.low=g+F,i.high=y+x+(g>>>0<F>>>0?1:0),m=a.low=m+P,a.high=v+D+(m>>>0<P>>>0?1:0),w=o.low=w+N,o.high=b+U+(w>>>0<N>>>0?1:0),E=s.low=E+M,s.high=C+L+(E>>>0<M>>>0?1:0),A=f.low=A+K,f.high=S+O+(A>>>0<K>>>0?1:0),T=h.low=T+j,h.high=B+G+(T>>>0<j>>>0?1:0),k=l.low=k+H,l.high=I+V+(k>>>0<H>>>0?1:0)},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;return t[n>>>5]|=128<<24-n%32,t[30+(n+128>>>10<<5)]=Math.floor(r/4294967296),t[31+(n+128>>>10<<5)]=r,e.sigBytes=4*t.length,this._process(),this._hash.toX32()},clone:function(){var e=t.clone.call(this);return e._hash=this._hash.clone(),e},blockSize:32});e.SHA512=t._createHelper(f),e.HmacSHA512=t._createHmacHelper(f)}(),n.SHA512)},76504:function(e,t,r){var n;e.exports=(n=r(48892),r(32240),r(69008),r(47604),r(73040),function(){var e=n,t=e.lib,r=t.WordArray,i=t.BlockCipher,a=e.algo,o=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],s=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],c=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],u=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],f=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],h=a.DES=i.extend({_doReset:function(){for(var e=this._key.words,t=[],r=0;r<56;r++){var n=o[r]-1;t[r]=e[n>>>5]>>>31-n%32&1}for(var i=this._subKeys=[],a=0;a<16;a++){var u=i[a]=[],f=c[a];for(r=0;r<24;r++)u[r/6|0]|=t[(s[r]-1+f)%28]<<31-r%6,u[4+(r/6|0)]|=t[28+(s[r+24]-1+f)%28]<<31-r%6;for(u[0]=u[0]<<1|u[0]>>>31,r=1;r<7;r++)u[r]=u[r]>>>4*(r-1)+3;u[7]=u[7]<<5|u[7]>>>27}var h=this._invSubKeys=[];for(r=0;r<16;r++)h[r]=i[15-r]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._subKeys)},decryptBlock:function(e,t){this._doCryptBlock(e,t,this._invSubKeys)},_doCryptBlock:function(e,t,r){this._lBlock=e[t],this._rBlock=e[t+1],l.call(this,4,252645135),l.call(this,16,65535),d.call(this,2,858993459),d.call(this,8,16711935),l.call(this,1,1431655765);for(var n=0;n<16;n++){for(var i=r[n],a=this._lBlock,o=this._rBlock,s=0,c=0;c<8;c++)s|=u[c][((o^i[c])&f[c])>>>0];this._lBlock=o,this._rBlock=a^s}var h=this._lBlock;this._lBlock=this._rBlock,this._rBlock=h,l.call(this,1,1431655765),d.call(this,8,16711935),d.call(this,2,858993459),l.call(this,16,65535),l.call(this,4,252645135),e[t]=this._lBlock,e[t+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function l(e,t){var r=(this._lBlock>>>e^this._rBlock)&t;this._rBlock^=r,this._lBlock^=r<<e}function d(e,t){var r=(this._rBlock>>>e^this._lBlock)&t;this._lBlock^=r,this._rBlock^=r<<e}e.DES=i._createHelper(h);var p=a.TripleDES=i.extend({_doReset:function(){var e=this._key.words;if(2!==e.length&&4!==e.length&&e.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var t=e.slice(0,2),n=e.length<4?e.slice(0,2):e.slice(2,4),i=e.length<6?e.slice(0,2):e.slice(4,6);this._des1=h.createEncryptor(r.create(t)),this._des2=h.createEncryptor(r.create(n)),this._des3=h.createEncryptor(r.create(i))},encryptBlock:function(e,t){this._des1.encryptBlock(e,t),this._des2.decryptBlock(e,t),this._des3.encryptBlock(e,t)},decryptBlock:function(e,t){this._des3.decryptBlock(e,t),this._des2.encryptBlock(e,t),this._des1.decryptBlock(e,t)},keySize:6,ivSize:2,blockSize:2});e.TripleDES=i._createHelper(p)}(),n.TripleDES)},38648:function(e,t,r){var n,i,a,o,s,c;e.exports=(n=r(48892),a=(i=n).lib,o=a.Base,s=a.WordArray,(c=i.x64={}).Word=o.extend({init:function(e,t){this.high=e,this.low=t}}),c.WordArray=o.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:8*e.length},toX32:function(){for(var e=this.words,t=e.length,r=[],n=0;n<t;n++){var i=e[n];r.push(i.high),r.push(i.low)}return s.create(r,this.sigBytes)},clone:function(){for(var e=o.clone.call(this),t=e.words=this.words.slice(0),r=t.length,n=0;n<r;n++)t[n]=t[n].clone();return e}}),n)},24404:(e,t)=>{t.read=function(e,t,r,n,i){var a,o,s=8*i-n-1,c=(1<<s)-1,u=c>>1,f=-7,h=r?i-1:0,l=r?-1:1,d=e[t+h];for(h+=l,a=d&(1<<-f)-1,d>>=-f,f+=s;f>0;a=256*a+e[t+h],h+=l,f-=8);for(o=a&(1<<-f)-1,a>>=-f,f+=n;f>0;o=256*o+e[t+h],h+=l,f-=8);if(0===a)a=1-u;else{if(a===c)return o?NaN:1/0*(d?-1:1);o+=Math.pow(2,n),a-=u}return(d?-1:1)*o*Math.pow(2,a-n)},t.write=function(e,t,r,n,i,a){var o,s,c,u=8*a-i-1,f=(1<<u)-1,h=f>>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:a-1,p=n?1:-1,y=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=f):(o=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-o))<1&&(o--,c*=2),(t+=o+h>=1?l/c:l*Math.pow(2,1-h))*c>=2&&(o++,c/=2),o+h>=f?(s=0,o=f):o+h>=1?(s=(t*c-1)*Math.pow(2,i),o+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,i),o=0));i>=8;e[r+d]=255&s,d+=p,s/=256,i-=8);for(o=o<<i|s,u+=i;u>0;e[r+d]=255&o,d+=p,o/=256,u-=8);e[r+d-p]|=128*y}},6180:(e,t,r)=>{var n=r(91080);function i(e,t){n.cipher.registerAlgorithm(e,(function(){return new n.aes.Algorithm(e,t)}))}r(67844),r(16656),r(18736),e.exports=n.aes=n.aes||{},n.aes.startEncrypting=function(e,t,r,n){var i=y({key:e,output:r,decrypt:!1,mode:n});return i.start(t),i},n.aes.createEncryptionCipher=function(e,t){return y({key:e,output:null,decrypt:!1,mode:t})},n.aes.startDecrypting=function(e,t,r,n){var i=y({key:e,output:r,decrypt:!0,mode:n});return i.start(t),i},n.aes.createDecryptionCipher=function(e,t){return y({key:e,output:null,decrypt:!0,mode:t})},n.aes.Algorithm=function(e,t){f||l();var r=this;r.name=e,r.mode=new t({blockSize:16,cipher:{encrypt:function(e,t){return p(r._w,e,t,!1)},decrypt:function(e,t){return p(r._w,e,t,!0)}}}),r._init=!1},n.aes.Algorithm.prototype.initialize=function(e){if(!this._init){var t,r=e.key;if("string"!=typeof r||16!==r.length&&24!==r.length&&32!==r.length){if(n.util.isArray(r)&&(16===r.length||24===r.length||32===r.length)){t=r,r=n.util.createBuffer();for(var i=0;i<t.length;++i)r.putByte(t[i])}}else r=n.util.createBuffer(r);if(!n.util.isArray(r)){t=r,r=[];var a=t.length();if(16===a||24===a||32===a)for(a>>>=2,i=0;i<a;++i)r.push(t.getInt32())}if(!n.util.isArray(r)||4!==r.length&&6!==r.length&&8!==r.length)throw new Error("Invalid key parameter.");var o=this.mode.name,s=-1!==["CFB","OFB","CTR","GCM"].indexOf(o);this._w=d(r,e.decrypt&&!s),this._init=!0}},n.aes._expandKey=function(e,t){return f||l(),d(e,t)},n.aes._updateBlock=p,i("AES-ECB",n.cipher.modes.ecb),i("AES-CBC",n.cipher.modes.cbc),i("AES-CFB",n.cipher.modes.cfb),i("AES-OFB",n.cipher.modes.ofb),i("AES-CTR",n.cipher.modes.ctr),i("AES-GCM",n.cipher.modes.gcm);var a,o,s,c,u,f=!1,h=4;function l(){f=!0,s=[0,1,2,4,8,16,32,64,128,27,54];for(var e=new Array(256),t=0;t<128;++t)e[t]=t<<1,e[t+128]=t+128<<1^283;for(a=new Array(256),o=new Array(256),c=new Array(4),u=new Array(4),t=0;t<4;++t)c[t]=new Array(256),u[t]=new Array(256);var r,n,i,h,l,d,p,y=0,g=0;for(t=0;t<256;++t){h=(h=g^g<<1^g<<2^g<<3^g<<4)>>8^255&h^99,a[y]=h,o[h]=y,d=(l=e[h])<<24^h<<16^h<<8^h^l,p=((r=e[y])^(n=e[r])^(i=e[n]))<<24^(y^i)<<16^(y^n^i)<<8^y^r^i;for(var v=0;v<4;++v)c[v][y]=d,u[v][h]=p,d=d<<24|d>>>8,p=p<<24|p>>>8;0===y?y=g=1:(y=r^e[e[e[r^i]]],g^=e[e[g]])}}function d(e,t){for(var r,n=e.slice(0),i=1,o=n.length,c=h*(o+6+1),f=o;f<c;++f)r=n[f-1],f%o==0?(r=a[r>>>16&255]<<24^a[r>>>8&255]<<16^a[255&r]<<8^a[r>>>24]^s[i]<<24,i++):o>6&&f%o==4&&(r=a[r>>>24]<<24^a[r>>>16&255]<<16^a[r>>>8&255]<<8^a[255&r]),n[f]=n[f-o]^r;if(t){for(var l,d=u[0],p=u[1],y=u[2],g=u[3],v=n.slice(0),m=(f=0,(c=n.length)-h);f<c;f+=h,m-=h)if(0===f||f===c-h)v[f]=n[m],v[f+1]=n[m+3],v[f+2]=n[m+2],v[f+3]=n[m+1];else for(var b=0;b<h;++b)l=n[m+b],v[f+(3&-b)]=d[a[l>>>24]]^p[a[l>>>16&255]]^y[a[l>>>8&255]]^g[a[255&l]];n=v}return n}function p(e,t,r,n){var i,s,f,h,l,d,p,y,g,v,m,b,w=e.length/4-1;n?(i=u[0],s=u[1],f=u[2],h=u[3],l=o):(i=c[0],s=c[1],f=c[2],h=c[3],l=a),d=t[0]^e[0],p=t[n?3:1]^e[1],y=t[2]^e[2],g=t[n?1:3]^e[3];for(var C=3,E=1;E<w;++E)v=i[d>>>24]^s[p>>>16&255]^f[y>>>8&255]^h[255&g]^e[++C],m=i[p>>>24]^s[y>>>16&255]^f[g>>>8&255]^h[255&d]^e[++C],b=i[y>>>24]^s[g>>>16&255]^f[d>>>8&255]^h[255&p]^e[++C],g=i[g>>>24]^s[d>>>16&255]^f[p>>>8&255]^h[255&y]^e[++C],d=v,p=m,y=b;r[0]=l[d>>>24]<<24^l[p>>>16&255]<<16^l[y>>>8&255]<<8^l[255&g]^e[++C],r[n?3:1]=l[p>>>24]<<24^l[y>>>16&255]<<16^l[g>>>8&255]<<8^l[255&d]^e[++C],r[2]=l[y>>>24]<<24^l[g>>>16&255]<<16^l[d>>>8&255]<<8^l[255&p]^e[++C],r[n?1:3]=l[g>>>24]<<24^l[d>>>16&255]<<16^l[p>>>8&255]<<8^l[255&y]^e[++C]}function y(e){var t,r="AES-"+((e=e||{}).mode||"CBC").toUpperCase(),i=(t=e.decrypt?n.cipher.createDecipher(r,e.key):n.cipher.createCipher(r,e.key)).start;return t.start=function(e,r){var a=null;r instanceof n.util.ByteBuffer&&(a=r,r={}),(r=r||{}).output=a,r.iv=e,i.call(t,r)},t}},68776:(e,t,r)=>{var n=r(91080);r(6180),r(95720);var i=e.exports=n.tls;function a(e,t,r){var a=t.entity===n.tls.ConnectionEnd.client;e.read.cipherState={init:!1,cipher:n.cipher.createDecipher("AES-CBC",a?r.keys.server_write_key:r.keys.client_write_key),iv:a?r.keys.server_write_IV:r.keys.client_write_IV},e.write.cipherState={init:!1,cipher:n.cipher.createCipher("AES-CBC",a?r.keys.client_write_key:r.keys.server_write_key),iv:a?r.keys.client_write_IV:r.keys.server_write_IV},e.read.cipherFunction=u,e.write.cipherFunction=o,e.read.macLength=e.write.macLength=r.mac_length,e.read.macFunction=e.write.macFunction=i.hmac_sha1}function o(e,t){var r,a=!1,o=t.macFunction(t.macKey,t.sequenceNumber,e);e.fragment.putBytes(o),t.updateSequenceNumber(),r=e.version.minor===i.Versions.TLS_1_0.minor?t.cipherState.init?null:t.cipherState.iv:n.random.getBytesSync(16),t.cipherState.init=!0;var c=t.cipherState.cipher;return c.start({iv:r}),e.version.minor>=i.Versions.TLS_1_1.minor&&c.output.putBytes(r),c.update(e.fragment),c.finish(s)&&(e.fragment=c.output,e.length=e.fragment.length(),a=!0),a}function s(e,t,r){if(!r){var n=e-t.length()%e;t.fillWithByte(n-1,n)}return!0}function c(e,t,r){var n=!0;if(r){for(var i=t.length(),a=t.last(),o=i-1-a;o<i-1;++o)n=n&&t.at(o)==a;n&&t.truncate(a+1)}return n}function u(e,t){var r,a=!1;r=e.version.minor===i.Versions.TLS_1_0.minor?t.cipherState.init?null:t.cipherState.iv:e.fragment.getBytes(16),t.cipherState.init=!0;var o=t.cipherState.cipher;o.start({iv:r}),o.update(e.fragment),a=o.finish(c);var s=t.macLength,u=n.random.getBytesSync(s),f=o.output.length();f>=s?(e.fragment=o.output.getBytes(f-s),u=o.output.getBytes(s)):e.fragment=o.output.getBytes(),e.fragment=n.util.createBuffer(e.fragment),e.length=e.fragment.length();var h=t.macFunction(t.macKey,t.sequenceNumber,e);return t.updateSequenceNumber(),a=function(e,t,r){var i=n.hmac.create();return i.start("SHA1",e),i.update(t),t=i.digest().getBytes(),i.start(null,null),i.update(r),t===(r=i.digest().getBytes())}(t.macKey,u,h)&&a,a}i.CipherSuites.TLS_RSA_WITH_AES_128_CBC_SHA={id:[0,47],name:"TLS_RSA_WITH_AES_128_CBC_SHA",initSecurityParameters:function(e){e.bulk_cipher_algorithm=i.BulkCipherAlgorithm.aes,e.cipher_type=i.CipherType.block,e.enc_key_length=16,e.block_length=16,e.fixed_iv_length=16,e.record_iv_length=16,e.mac_algorithm=i.MACAlgorithm.hmac_sha1,e.mac_length=20,e.mac_key_length=20},initConnectionState:a},i.CipherSuites.TLS_RSA_WITH_AES_256_CBC_SHA={id:[0,53],name:"TLS_RSA_WITH_AES_256_CBC_SHA",initSecurityParameters:function(e){e.bulk_cipher_algorithm=i.BulkCipherAlgorithm.aes,e.cipher_type=i.CipherType.block,e.enc_key_length=32,e.block_length=16,e.fixed_iv_length=16,e.record_iv_length=16,e.mac_algorithm=i.MACAlgorithm.hmac_sha1,e.mac_length=20,e.mac_key_length=20},initConnectionState:a}},49196:(e,t,r)=>{var n=r(91080);r(4e4);var i=n.asn1;t.privateKeyValidator={name:"PrivateKeyInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",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:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},t.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",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:"publicKeyOid"}]},{tagClass:i.Class.UNIVERSAL,type:i.Type.BITSTRING,constructed:!1,composed:!0,captureBitStringValue:"ed25519PublicKey"}]}},4e4:(e,t,r)=>{var n=r(91080);r(18736),r(91752);var i=e.exports=n.asn1=n.asn1||{};function a(e,t,r){if(r>t){var n=new Error("Too few bytes to parse DER.");throw n.available=e.length(),n.remaining=t,n.requested=r,n}}function o(e,t,r,n){var s;a(e,t,2);var c=e.getByte();t--;var u=192&c,f=31&c;s=e.length();var h,l,d=function(e,t){var r=e.getByte();if(t--,128!==r){var n;if(128&r){var i=127&r;a(e,t,i),n=e.getInt(i<<3)}else n=r;if(n<0)throw new Error("Negative length: "+n);return n}}(e,t);if(t-=s-e.length(),void 0!==d&&d>t){if(n.strict){var p=new Error("Too few bytes to read ASN.1 value.");throw p.available=e.length(),p.remaining=t,p.requested=d,p}d=t}var y=32==(32&c);if(y)if(h=[],void 0===d)for(;;){if(a(e,t,2),e.bytes(2)===String.fromCharCode(0,0)){e.getBytes(2),t-=2;break}s=e.length(),h.push(o(e,t,r+1,n)),t-=s-e.length()}else for(;d>0;)s=e.length(),h.push(o(e,d,r+1,n)),t-=s-e.length(),d-=s-e.length();if(void 0===h&&u===i.Class.UNIVERSAL&&f===i.Type.BITSTRING&&(l=e.bytes(d)),void 0===h&&n.decodeBitStrings&&u===i.Class.UNIVERSAL&&f===i.Type.BITSTRING&&d>1){var g=e.read,v=t,m=0;if(f===i.Type.BITSTRING&&(a(e,t,1),m=e.getByte(),t--),0===m)try{s=e.length();var b=o(e,t,r+1,{strict:!0,decodeBitStrings:!0}),w=s-e.length();t-=w,f==i.Type.BITSTRING&&w++;var C=b.tagClass;w!==d||C!==i.Class.UNIVERSAL&&C!==i.Class.CONTEXT_SPECIFIC||(h=[b])}catch(e){}void 0===h&&(e.read=g,t=v)}if(void 0===h){if(void 0===d){if(n.strict)throw new Error("Non-constructed ASN.1 object of indefinite length.");d=t}if(f===i.Type.BMPSTRING)for(h="";d>0;d-=2)a(e,t,2),h+=String.fromCharCode(e.getInt16()),t-=2;else h=e.getBytes(d),t-=d}var E=void 0===l?null:{bitStringContents:l};return i.create(u,f,y,h,E)}i.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192},i.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},i.create=function(e,t,r,a,o){if(n.util.isArray(a)){for(var s=[],c=0;c<a.length;++c)void 0!==a[c]&&s.push(a[c]);a=s}var u={tagClass:e,type:t,constructed:r,composed:r||n.util.isArray(a),value:a};return o&&"bitStringContents"in o&&(u.bitStringContents=o.bitStringContents,u.original=i.copy(u)),u},i.copy=function(e,t){var r;if(n.util.isArray(e)){r=[];for(var a=0;a<e.length;++a)r.push(i.copy(e[a],t));return r}return"string"==typeof e?e:(r={tagClass:e.tagClass,type:e.type,constructed:e.constructed,composed:e.composed,value:i.copy(e.value,t)},t&&!t.excludeBitStringContents&&(r.bitStringContents=e.bitStringContents),r)},i.equals=function(e,t,r){if(n.util.isArray(e)){if(!n.util.isArray(t))return!1;if(e.length!==t.length)return!1;for(var a=0;a<e.length;++a)if(!i.equals(e[a],t[a]))return!1;return!0}if(typeof e!=typeof t)return!1;if("string"==typeof e)return e===t;var o=e.tagClass===t.tagClass&&e.type===t.type&&e.constructed===t.constructed&&e.composed===t.composed&&i.equals(e.value,t.value);return r&&r.includeBitStringContents&&(o=o&&e.bitStringContents===t.bitStringContents),o},i.getBerValueLength=function(e){var t=e.getByte();if(128!==t)return 128&t?e.getInt((127&t)<<3):t},i.fromDer=function(e,t){void 0===t&&(t={strict:!0,parseAllBytes:!0,decodeBitStrings:!0}),"boolean"==typeof t&&(t={strict:t,parseAllBytes:!0,decodeBitStrings:!0}),"strict"in t||(t.strict=!0),"parseAllBytes"in t||(t.parseAllBytes=!0),"decodeBitStrings"in t||(t.decodeBitStrings=!0),"string"==typeof e&&(e=n.util.createBuffer(e));var r=e.length(),i=o(e,e.length(),0,t);if(t.parseAllBytes&&0!==e.length()){var a=new Error("Unparsed DER bytes remain after ASN.1 parsing.");throw a.byteCount=r,a.remaining=e.length(),a}return i},i.toDer=function(e){var t=n.util.createBuffer(),r=e.tagClass|e.type,a=n.util.createBuffer(),o=!1;if("bitStringContents"in e&&(o=!0,e.original&&(o=i.equals(e,e.original))),o)a.putBytes(e.bitStringContents);else if(e.composed){e.constructed?r|=32:a.putByte(0);for(var s=0;s<e.value.length;++s)void 0!==e.value[s]&&a.putBuffer(i.toDer(e.value[s]))}else if(e.type===i.Type.BMPSTRING)for(s=0;s<e.value.length;++s)a.putInt16(e.value.charCodeAt(s));else e.type===i.Type.INTEGER&&e.value.length>1&&(0===e.value.charCodeAt(0)&&0==(128&e.value.charCodeAt(1))||255===e.value.charCodeAt(0)&&128==(128&e.value.charCodeAt(1)))?a.putBytes(e.value.substr(1)):a.putBytes(e.value);if(t.putByte(r),a.length()<=127)t.putByte(127&a.length());else{var c=a.length(),u="";do{u+=String.fromCharCode(255&c),c>>>=8}while(c>0);for(t.putByte(128|u.length),s=u.length-1;s>=0;--s)t.putByte(u.charCodeAt(s))}return t.putBuffer(a),t},i.oidToDer=function(e){var t,r,i,a,o=e.split("."),s=n.util.createBuffer();s.putByte(40*parseInt(o[0],10)+parseInt(o[1],10));for(var c=2;c<o.length;++c){t=!0,r=[],i=parseInt(o[c],10);do{a=127&i,i>>>=7,t||(a|=128),r.push(a),t=!1}while(i>0);for(var u=r.length-1;u>=0;--u)s.putByte(r[u])}return s},i.derToOid=function(e){var t;"string"==typeof e&&(e=n.util.createBuffer(e));var r=e.getByte();t=Math.floor(r/40)+"."+r%40;for(var i=0;e.length()>0;)i<<=7,128&(r=e.getByte())?i+=127&r:(t+="."+(i+r),i=0);return t},i.utcTimeToDate=function(e){var t=new Date,r=parseInt(e.substr(0,2),10);r=r>=50?1900+r:2e3+r;var n=parseInt(e.substr(2,2),10)-1,i=parseInt(e.substr(4,2),10),a=parseInt(e.substr(6,2),10),o=parseInt(e.substr(8,2),10),s=0;if(e.length>11){var c=e.charAt(10),u=10;"+"!==c&&"-"!==c&&(s=parseInt(e.substr(10,2),10),u+=2)}if(t.setUTCFullYear(r,n,i),t.setUTCHours(a,o,s,0),u&&("+"===(c=e.charAt(u))||"-"===c)){var f=60*parseInt(e.substr(u+1,2),10)+parseInt(e.substr(u+4,2),10);f*=6e4,"+"===c?t.setTime(+t-f):t.setTime(+t+f)}return t},i.generalizedTimeToDate=function(e){var t=new Date,r=parseInt(e.substr(0,4),10),n=parseInt(e.substr(4,2),10)-1,i=parseInt(e.substr(6,2),10),a=parseInt(e.substr(8,2),10),o=parseInt(e.substr(10,2),10),s=parseInt(e.substr(12,2),10),c=0,u=0,f=!1;"Z"===e.charAt(e.length-1)&&(f=!0);var h=e.length-5,l=e.charAt(h);return"+"!==l&&"-"!==l||(u=60*parseInt(e.substr(h+1,2),10)+parseInt(e.substr(h+4,2),10),u*=6e4,"+"===l&&(u*=-1),f=!0),"."===e.charAt(14)&&(c=1e3*parseFloat(e.substr(14),10)),f?(t.setUTCFullYear(r,n,i),t.setUTCHours(a,o,s,c),t.setTime(+t+u)):(t.setFullYear(r,n,i),t.setHours(a,o,s,c)),t},i.dateToUtcTime=function(e){if("string"==typeof e)return e;var t="",r=[];r.push((""+e.getUTCFullYear()).substr(2)),r.push(""+(e.getUTCMonth()+1)),r.push(""+e.getUTCDate()),r.push(""+e.getUTCHours()),r.push(""+e.getUTCMinutes()),r.push(""+e.getUTCSeconds());for(var n=0;n<r.length;++n)r[n].length<2&&(t+="0"),t+=r[n];return t+"Z"},i.dateToGeneralizedTime=function(e){if("string"==typeof e)return e;var t="",r=[];r.push(""+e.getUTCFullYear()),r.push(""+(e.getUTCMonth()+1)),r.push(""+e.getUTCDate()),r.push(""+e.getUTCHours()),r.push(""+e.getUTCMinutes()),r.push(""+e.getUTCSeconds());for(var n=0;n<r.length;++n)r[n].length<2&&(t+="0"),t+=r[n];return t+"Z"},i.integerToDer=function(e){var t=n.util.createBuffer();if(e>=-128&&e<128)return t.putSignedInt(e,8);if(e>=-32768&&e<32768)return t.putSignedInt(e,16);if(e>=-8388608&&e<8388608)return t.putSignedInt(e,24);if(e>=-2147483648&&e<2147483648)return t.putSignedInt(e,32);var r=new Error("Integer too large; max is 32-bits.");throw r.integer=e,r},i.derToInteger=function(e){"string"==typeof e&&(e=n.util.createBuffer(e));var t=8*e.length();if(t>32)throw new Error("Integer too large; max is 32-bits.");return e.getSignedInt(t)},i.validate=function(e,t,r,a){var o=!1;if(e.tagClass!==t.tagClass&&void 0!==t.tagClass||e.type!==t.type&&void 0!==t.type)a&&(e.tagClass!==t.tagClass&&a.push("["+t.name+'] Expected tag class "'+t.tagClass+'", got "'+e.tagClass+'"'),e.type!==t.type&&a.push("["+t.name+'] Expected type "'+t.type+'", got "'+e.type+'"'));else if(e.constructed===t.constructed||void 0===t.constructed){if(o=!0,t.value&&n.util.isArray(t.value))for(var s=0,c=0;o&&c<t.value.length;++c)o=t.value[c].optional||!1,e.value[s]&&((o=i.validate(e.value[s],t.value[c],r,a))?++s:t.value[c].optional&&(o=!0)),!o&&a&&a.push("["+t.name+'] Tag class "'+t.tagClass+'", type "'+t.type+'" expected value length "'+t.value.length+'", got "'+e.value.length+'"');if(o&&r&&(t.capture&&(r[t.capture]=e.value),t.captureAsn1&&(r[t.captureAsn1]=e),t.captureBitStringContents&&"bitStringContents"in e&&(r[t.captureBitStringContents]=e.bitStringContents),t.captureBitStringValue&&"bitStringContents"in e))if(e.bitStringContents.length<2)r[t.captureBitStringValue]="";else{if(0!==e.bitStringContents.charCodeAt(0))throw new Error("captureBitStringValue only supported for zero unused bits");r[t.captureBitStringValue]=e.bitStringContents.slice(1)}}else a&&a.push("["+t.name+'] Expected constructed "'+t.constructed+'", got "'+e.constructed+'"');return o};var s=/[^\\u0000-\\u00ff]/;i.prettyPrint=function(e,t,r){var a="";r=r||2,(t=t||0)>0&&(a+="\n");for(var o="",c=0;c<t*r;++c)o+=" ";switch(a+=o+"Tag: ",e.tagClass){case i.Class.UNIVERSAL:a+="Universal:";break;case i.Class.APPLICATION:a+="Application:";break;case i.Class.CONTEXT_SPECIFIC:a+="Context-Specific:";break;case i.Class.PRIVATE:a+="Private:"}if(e.tagClass===i.Class.UNIVERSAL)switch(a+=e.type,e.type){case i.Type.NONE:a+=" (None)";break;case i.Type.BOOLEAN:a+=" (Boolean)";break;case i.Type.INTEGER:a+=" (Integer)";break;case i.Type.BITSTRING:a+=" (Bit string)";break;case i.Type.OCTETSTRING:a+=" (Octet string)";break;case i.Type.NULL:a+=" (Null)";break;case i.Type.OID:a+=" (Object Identifier)";break;case i.Type.ODESC:a+=" (Object Descriptor)";break;case i.Type.EXTERNAL:a+=" (External or Instance of)";break;case i.Type.REAL:a+=" (Real)";break;case i.Type.ENUMERATED:a+=" (Enumerated)";break;case i.Type.EMBEDDED:a+=" (Embedded PDV)";break;case i.Type.UTF8:a+=" (UTF8)";break;case i.Type.ROID:a+=" (Relative Object Identifier)";break;case i.Type.SEQUENCE:a+=" (Sequence)";break;case i.Type.SET:a+=" (Set)";break;case i.Type.PRINTABLESTRING:a+=" (Printable String)";break;case i.Type.IA5String:a+=" (IA5String (ASCII))";break;case i.Type.UTCTIME:a+=" (UTC time)";break;case i.Type.GENERALIZEDTIME:a+=" (Generalized time)";break;case i.Type.BMPSTRING:a+=" (BMP String)"}else a+=e.type;if(a+="\n",a+=o+"Constructed: "+e.constructed+"\n",e.composed){var u=0,f="";for(c=0;c<e.value.length;++c)void 0!==e.value[c]&&(u+=1,f+=i.prettyPrint(e.value[c],t+1,r),c+1<e.value.length&&(f+=","));a+=o+"Sub values: "+u+f}else{if(a+=o+"Value: ",e.type===i.Type.OID){var h=i.derToOid(e.value);a+=h,n.pki&&n.pki.oids&&h in n.pki.oids&&(a+=" ("+n.pki.oids[h]+") ")}if(e.type===i.Type.INTEGER)try{a+=i.derToInteger(e.value)}catch(t){a+="0x"+n.util.bytesToHex(e.value)}else if(e.type===i.Type.BITSTRING){if(e.value.length>1?a+="0x"+n.util.bytesToHex(e.value.slice(1)):a+="(none)",e.value.length>0){var l=e.value.charCodeAt(0);1==l?a+=" (1 unused bit shown)":l>1&&(a+=" ("+l+" unused bits shown)")}}else if(e.type===i.Type.OCTETSTRING)s.test(e.value)||(a+="("+e.value+") "),a+="0x"+n.util.bytesToHex(e.value);else if(e.type===i.Type.UTF8)try{a+=n.util.decodeUtf8(e.value)}catch(t){if("URI malformed"!==t.message)throw t;a+="0x"+n.util.bytesToHex(e.value)+" (malformed UTF8)"}else e.type===i.Type.PRINTABLESTRING||e.type===i.Type.IA5String?a+=e.value:s.test(e.value)?a+="0x"+n.util.bytesToHex(e.value):0===e.value.length?a+="[null]":a+=e.value}return a}},584:(e,t,r)=>{var n=r(19024).Buffer,i={};e.exports=i;var a={};i.encode=function(e,t,r){if("string"!=typeof t)throw new TypeError('"alphabet" must be a string.');if(void 0!==r&&"number"!=typeof r)throw new TypeError('"maxline" must be a number.');var n="";if(e instanceof Uint8Array){var i=0,a=t.length,o=t.charAt(0),s=[0];for(i=0;i<e.length;++i){for(var c=0,u=e[i];c<s.length;++c)u+=s[c]<<8,s[c]=u%a,u=u/a|0;for(;u>0;)s.push(u%a),u=u/a|0}for(i=0;0===e[i]&&i<e.length-1;++i)n+=o;for(i=s.length-1;i>=0;--i)n+=t[s[i]]}else n=function(e,t){var r=0,n=t.length,i=t.charAt(0),a=[0];for(r=0;r<e.length();++r){for(var o=0,s=e.at(r);o<a.length;++o)s+=a[o]<<8,a[o]=s%n,s=s/n|0;for(;s>0;)a.push(s%n),s=s/n|0}var c="";for(r=0;0===e.at(r)&&r<e.length()-1;++r)c+=i;for(r=a.length-1;r>=0;--r)c+=t[a[r]];return c}(e,t);if(r){var f=new RegExp(".{1,"+r+"}","g");n=n.match(f).join("\r\n")}return n},i.decode=function(e,t){if("string"!=typeof e)throw new TypeError('"input" must be a string.');if("string"!=typeof t)throw new TypeError('"alphabet" must be a string.');var r=a[t];if(!r){r=a[t]=[];for(var i=0;i<t.length;++i)r[t.charCodeAt(i)]=i}e=e.replace(/\s/g,"");var o=t.length,s=t.charAt(0),c=[0];for(i=0;i<e.length;i++){var u=r[e.charCodeAt(i)];if(void 0===u)return;for(var f=0,h=u;f<c.length;++f)h+=c[f]*o,c[f]=255&h,h>>=8;for(;h>0;)c.push(255&h),h>>=8}for(var l=0;e[l]===s&&l<e.length-1;++l)c.push(0);return void 0!==n?n.from(c.reverse()):new Uint8Array(c.reverse())}},67844:(e,t,r)=>{var n=r(91080);r(18736),e.exports=n.cipher=n.cipher||{},n.cipher.algorithms=n.cipher.algorithms||{},n.cipher.createCipher=function(e,t){var r=e;if("string"==typeof r&&(r=n.cipher.getAlgorithm(r))&&(r=r()),!r)throw new Error("Unsupported algorithm: "+e);return new n.cipher.BlockCipher({algorithm:r,key:t,decrypt:!1})},n.cipher.createDecipher=function(e,t){var r=e;if("string"==typeof r&&(r=n.cipher.getAlgorithm(r))&&(r=r()),!r)throw new Error("Unsupported algorithm: "+e);return new n.cipher.BlockCipher({algorithm:r,key:t,decrypt:!0})},n.cipher.registerAlgorithm=function(e,t){e=e.toUpperCase(),n.cipher.algorithms[e]=t},n.cipher.getAlgorithm=function(e){return(e=e.toUpperCase())in n.cipher.algorithms?n.cipher.algorithms[e]:null};var i=n.cipher.BlockCipher=function(e){this.algorithm=e.algorithm,this.mode=this.algorithm.mode,this.blockSize=this.mode.blockSize,this._finish=!1,this._input=null,this.output=null,this._op=e.decrypt?this.mode.decrypt:this.mode.encrypt,this._decrypt=e.decrypt,this.algorithm.initialize(e)};i.prototype.start=function(e){e=e||{};var t={};for(var r in e)t[r]=e[r];t.decrypt=this._decrypt,this._finish=!1,this._input=n.util.createBuffer(),this.output=e.output||n.util.createBuffer(),this.mode.start(t)},i.prototype.update=function(e){for(e&&this._input.putBuffer(e);!this._op.call(this.mode,this._input,this.output,this._finish)&&!this._finish;);this._input.compact()},i.prototype.finish=function(e){!e||"ECB"!==this.mode.name&&"CBC"!==this.mode.name||(this.mode.pad=function(t){return e(this.blockSize,t,!1)},this.mode.unpad=function(t){return e(this.blockSize,t,!0)});var t={};return t.decrypt=this._decrypt,t.overflow=this._input.length()%this.blockSize,!(!this._decrypt&&this.mode.pad&&!this.mode.pad(this._input,t)||(this._finish=!0,this.update(),this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,t)||this.mode.afterFinish&&!this.mode.afterFinish(this.output,t)))}},16656:(e,t,r)=>{var n=r(91080);r(18736),n.cipher=n.cipher||{};var i=e.exports=n.cipher.modes=n.cipher.modes||{};function a(e,t){if("string"==typeof e&&(e=n.util.createBuffer(e)),n.util.isArray(e)&&e.length>4){var r=e;e=n.util.createBuffer();for(var i=0;i<r.length;++i)e.putByte(r[i])}if(e.length()<t)throw new Error("Invalid IV length; got "+e.length()+" bytes and expected "+t+" bytes.");if(!n.util.isArray(e)){var a=[],o=t/4;for(i=0;i<o;++i)a.push(e.getInt32());e=a}return e}function o(e){e[e.length-1]=e[e.length-1]+1&4294967295}function s(e){return[e/4294967296|0,4294967295&e]}i.ecb=function(e){e=e||{},this.name="ECB",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)},i.ecb.prototype.start=function(e){},i.ecb.prototype.encrypt=function(e,t,r){if(e.length()<this.blockSize&&!(r&&e.length()>0))return!0;for(var n=0;n<this._ints;++n)this._inBlock[n]=e.getInt32();for(this.cipher.encrypt(this._inBlock,this._outBlock),n=0;n<this._ints;++n)t.putInt32(this._outBlock[n])},i.ecb.prototype.decrypt=function(e,t,r){if(e.length()<this.blockSize&&!(r&&e.length()>0))return!0;for(var n=0;n<this._ints;++n)this._inBlock[n]=e.getInt32();for(this.cipher.decrypt(this._inBlock,this._outBlock),n=0;n<this._ints;++n)t.putInt32(this._outBlock[n])},i.ecb.prototype.pad=function(e,t){var r=e.length()===this.blockSize?this.blockSize:this.blockSize-e.length();return e.fillWithByte(r,r),!0},i.ecb.prototype.unpad=function(e,t){if(t.overflow>0)return!1;var r=e.length(),n=e.at(r-1);return!(n>this.blockSize<<2||(e.truncate(n),0))},i.cbc=function(e){e=e||{},this.name="CBC",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)},i.cbc.prototype.start=function(e){if(null===e.iv){if(!this._prev)throw new Error("Invalid IV parameter.");this._iv=this._prev.slice(0)}else{if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=a(e.iv,this.blockSize),this._prev=this._iv.slice(0)}},i.cbc.prototype.encrypt=function(e,t,r){if(e.length()<this.blockSize&&!(r&&e.length()>0))return!0;for(var n=0;n<this._ints;++n)this._inBlock[n]=this._prev[n]^e.getInt32();for(this.cipher.encrypt(this._inBlock,this._outBlock),n=0;n<this._ints;++n)t.putInt32(this._outBlock[n]);this._prev=this._outBlock},i.cbc.prototype.decrypt=function(e,t,r){if(e.length()<this.blockSize&&!(r&&e.length()>0))return!0;for(var n=0;n<this._ints;++n)this._inBlock[n]=e.getInt32();for(this.cipher.decrypt(this._inBlock,this._outBlock),n=0;n<this._ints;++n)t.putInt32(this._prev[n]^this._outBlock[n]);this._prev=this._inBlock.slice(0)},i.cbc.prototype.pad=function(e,t){var r=e.length()===this.blockSize?this.blockSize:this.blockSize-e.length();return e.fillWithByte(r,r),!0},i.cbc.prototype.unpad=function(e,t){if(t.overflow>0)return!1;var r=e.length(),n=e.at(r-1);return!(n>this.blockSize<<2||(e.truncate(n),0))},i.cfb=function(e){e=e||{},this.name="CFB",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialBlock=new Array(this._ints),this._partialOutput=n.util.createBuffer(),this._partialBytes=0},i.cfb.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=a(e.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0},i.cfb.prototype.encrypt=function(e,t,r){var n=e.length();if(0===n)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize)for(var i=0;i<this._ints;++i)this._inBlock[i]=e.getInt32()^this._outBlock[i],t.putInt32(this._inBlock[i]);else{var a=(this.blockSize-n)%this.blockSize;for(a>0&&(a=this.blockSize-a),this._partialOutput.clear(),i=0;i<this._ints;++i)this._partialBlock[i]=e.getInt32()^this._outBlock[i],this._partialOutput.putInt32(this._partialBlock[i]);if(a>0)e.read-=this.blockSize;else for(i=0;i<this._ints;++i)this._inBlock[i]=this._partialBlock[i];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),a>0&&!r)return t.putBytes(this._partialOutput.getBytes(a-this._partialBytes)),this._partialBytes=a,!0;t.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}},i.cfb.prototype.decrypt=function(e,t,r){var n=e.length();if(0===n)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize)for(var i=0;i<this._ints;++i)this._inBlock[i]=e.getInt32(),t.putInt32(this._inBlock[i]^this._outBlock[i]);else{var a=(this.blockSize-n)%this.blockSize;for(a>0&&(a=this.blockSize-a),this._partialOutput.clear(),i=0;i<this._ints;++i)this._partialBlock[i]=e.getInt32(),this._partialOutput.putInt32(this._partialBlock[i]^this._outBlock[i]);if(a>0)e.read-=this.blockSize;else for(i=0;i<this._ints;++i)this._inBlock[i]=this._partialBlock[i];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),a>0&&!r)return t.putBytes(this._partialOutput.getBytes(a-this._partialBytes)),this._partialBytes=a,!0;t.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}},i.ofb=function(e){e=e||{},this.name="OFB",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=n.util.createBuffer(),this._partialBytes=0},i.ofb.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=a(e.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0},i.ofb.prototype.encrypt=function(e,t,r){var n=e.length();if(0===e.length())return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize)for(var i=0;i<this._ints;++i)t.putInt32(e.getInt32()^this._outBlock[i]),this._inBlock[i]=this._outBlock[i];else{var a=(this.blockSize-n)%this.blockSize;for(a>0&&(a=this.blockSize-a),this._partialOutput.clear(),i=0;i<this._ints;++i)this._partialOutput.putInt32(e.getInt32()^this._outBlock[i]);if(a>0)e.read-=this.blockSize;else for(i=0;i<this._ints;++i)this._inBlock[i]=this._outBlock[i];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),a>0&&!r)return t.putBytes(this._partialOutput.getBytes(a-this._partialBytes)),this._partialBytes=a,!0;t.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}},i.ofb.prototype.decrypt=i.ofb.prototype.encrypt,i.ctr=function(e){e=e||{},this.name="CTR",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=n.util.createBuffer(),this._partialBytes=0},i.ctr.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=a(e.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0},i.ctr.prototype.encrypt=function(e,t,r){var n=e.length();if(0===n)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize)for(var i=0;i<this._ints;++i)t.putInt32(e.getInt32()^this._outBlock[i]);else{var a=(this.blockSize-n)%this.blockSize;for(a>0&&(a=this.blockSize-a),this._partialOutput.clear(),i=0;i<this._ints;++i)this._partialOutput.putInt32(e.getInt32()^this._outBlock[i]);if(a>0&&(e.read-=this.blockSize),this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),a>0&&!r)return t.putBytes(this._partialOutput.getBytes(a-this._partialBytes)),this._partialBytes=a,!0;t.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}o(this._inBlock)},i.ctr.prototype.decrypt=i.ctr.prototype.encrypt,i.gcm=function(e){e=e||{},this.name="GCM",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints),this._partialOutput=n.util.createBuffer(),this._partialBytes=0,this._R=3774873600},i.gcm.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");var t,r=n.util.createBuffer(e.iv);if(this._cipherLength=0,t="additionalData"in e?n.util.createBuffer(e.additionalData):n.util.createBuffer(),this._tagLength="tagLength"in e?e.tagLength:128,this._tag=null,e.decrypt&&(this._tag=n.util.createBuffer(e.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 i=r.length();if(12===i)this._j0=[r.getInt32(),r.getInt32(),r.getInt32(),1];else{for(this._j0=[0,0,0,0];r.length()>0;)this._j0=this.ghash(this._hashSubkey,this._j0,[r.getInt32(),r.getInt32(),r.getInt32(),r.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(s(8*i)))}this._inBlock=this._j0.slice(0),o(this._inBlock),this._partialBytes=0,t=n.util.createBuffer(t),this._aDataLength=s(8*t.length());var a=t.length()%this.blockSize;for(a&&t.fillWithByte(0,this.blockSize-a),this._s=[0,0,0,0];t.length()>0;)this._s=this.ghash(this._hashSubkey,this._s,[t.getInt32(),t.getInt32(),t.getInt32(),t.getInt32()])},i.gcm.prototype.encrypt=function(e,t,r){var n=e.length();if(0===n)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize){for(var i=0;i<this._ints;++i)t.putInt32(this._outBlock[i]^=e.getInt32());this._cipherLength+=this.blockSize}else{var a=(this.blockSize-n)%this.blockSize;for(a>0&&(a=this.blockSize-a),this._partialOutput.clear(),i=0;i<this._ints;++i)this._partialOutput.putInt32(e.getInt32()^this._outBlock[i]);if(a<=0||r){if(r){var s=n%this.blockSize;this._cipherLength+=s,this._partialOutput.truncate(this.blockSize-s)}else this._cipherLength+=this.blockSize;for(i=0;i<this._ints;++i)this._outBlock[i]=this._partialOutput.getInt32();this._partialOutput.read-=this.blockSize}if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),a>0&&!r)return e.read-=this.blockSize,t.putBytes(this._partialOutput.getBytes(a-this._partialBytes)),this._partialBytes=a,!0;t.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock),o(this._inBlock)},i.gcm.prototype.decrypt=function(e,t,r){var n=e.length();if(n<this.blockSize&&!(r&&n>0))return!0;this.cipher.encrypt(this._inBlock,this._outBlock),o(this._inBlock),this._hashBlock[0]=e.getInt32(),this._hashBlock[1]=e.getInt32(),this._hashBlock[2]=e.getInt32(),this._hashBlock[3]=e.getInt32(),this._s=this.ghash(this._hashSubkey,this._s,this._hashBlock);for(var i=0;i<this._ints;++i)t.putInt32(this._outBlock[i]^this._hashBlock[i]);n<this.blockSize?this._cipherLength+=n%this.blockSize:this._cipherLength+=this.blockSize},i.gcm.prototype.afterFinish=function(e,t){var r=!0;t.decrypt&&t.overflow&&e.truncate(this.blockSize-t.overflow),this.tag=n.util.createBuffer();var i=this._aDataLength.concat(s(8*this._cipherLength));this._s=this.ghash(this._hashSubkey,this._s,i);var a=[];this.cipher.encrypt(this._j0,a);for(var o=0;o<this._ints;++o)this.tag.putInt32(this._s[o]^a[o]);return this.tag.truncate(this.tag.length()%(this._tagLength/8)),t.decrypt&&this.tag.bytes()!==this._tag&&(r=!1),r},i.gcm.prototype.multiply=function(e,t){for(var r=[0,0,0,0],n=t.slice(0),i=0;i<128;++i)e[i/32|0]&1<<31-i%32&&(r[0]^=n[0],r[1]^=n[1],r[2]^=n[2],r[3]^=n[3]),this.pow(n,n);return r},i.gcm.prototype.pow=function(e,t){for(var r=1&e[3],n=3;n>0;--n)t[n]=e[n]>>>1|(1&e[n-1])<<31;t[0]=e[0]>>>1,r&&(t[0]^=this._R)},i.gcm.prototype.tableMultiply=function(e){for(var t=[0,0,0,0],r=0;r<32;++r){var n=e[r/8|0]>>>4*(7-r%8)&15,i=this._m[r][n];t[0]^=i[0],t[1]^=i[1],t[2]^=i[2],t[3]^=i[3]}return t},i.gcm.prototype.ghash=function(e,t,r){return t[0]^=r[0],t[1]^=r[1],t[2]^=r[2],t[3]^=r[3],this.tableMultiply(t)},i.gcm.prototype.generateHashTable=function(e,t){for(var r=8/t,n=4*r,i=16*r,a=new Array(i),o=0;o<i;++o){var s=[0,0,0,0],c=(n-1-o%n)*t;s[o/n|0]=1<<t-1<<c,a[o]=this.generateSubHashTable(this.multiply(s,e),t)}return a},i.gcm.prototype.generateSubHashTable=function(e,t){var r=1<<t,n=r>>>1,i=new Array(r);i[n]=e.slice(0);for(var a=n>>>1;a>0;)this.pow(i[2*a],i[a]=[]),a>>=1;for(a=2;a<n;){for(var o=1;o<a;++o){var s=i[a],c=i[o];i[a+o]=[s[0]^c[0],s[1]^c[1],s[2]^c[2],s[3]^c[3]]}a*=2}for(i[0]=[0,0,0,0],a=n+1;a<r;++a){var u=i[a^n];i[a]=[e[0]^u[0],e[1]^u[1],e[2]^u[2],e[3]^u[3]]}return i}},3044:(e,t,r)=>{var n=r(91080);function i(e,t){n.cipher.registerAlgorithm(e,(function(){return new n.des.Algorithm(e,t)}))}r(67844),r(16656),r(18736),e.exports=n.des=n.des||{},n.des.startEncrypting=function(e,t,r,n){var i=p({key:e,output:r,decrypt:!1,mode:n||(null===t?"ECB":"CBC")});return i.start(t),i},n.des.createEncryptionCipher=function(e,t){return p({key:e,output:null,decrypt:!1,mode:t})},n.des.startDecrypting=function(e,t,r,n){var i=p({key:e,output:r,decrypt:!0,mode:n||(null===t?"ECB":"CBC")});return i.start(t),i},n.des.createDecryptionCipher=function(e,t){return p({key:e,output:null,decrypt:!0,mode:t})},n.des.Algorithm=function(e,t){var r=this;r.name=e,r.mode=new t({blockSize:8,cipher:{encrypt:function(e,t){return d(r._keys,e,t,!1)},decrypt:function(e,t){return d(r._keys,e,t,!0)}}}),r._init=!1},n.des.Algorithm.prototype.initialize=function(e){if(!this._init){var t=n.util.createBuffer(e.key);if(0===this.name.indexOf("3DES")&&24!==t.length())throw new Error("Invalid Triple-DES key size: "+8*t.length());this._keys=function(e){for(var t,r=[0,4,536870912,536870916,65536,65540,536936448,536936452,512,516,536871424,536871428,66048,66052,536936960,536936964],n=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],i=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],a=[0,2097152,134217728,136314880,8192,2105344,134225920,136323072,131072,2228224,134348800,136445952,139264,2236416,134356992,136454144],o=[0,262144,16,262160,0,262144,16,262160,4096,266240,4112,266256,4096,266240,4112,266256],s=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],c=[0,268435456,524288,268959744,2,268435458,524290,268959746,0,268435456,524288,268959744,2,268435458,524290,268959746],u=[0,65536,2048,67584,536870912,536936448,536872960,536938496,131072,196608,133120,198656,537001984,537067520,537004032,537069568],f=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],h=[0,268435456,8,268435464,0,268435456,8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],l=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],d=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],p=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],y=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],g=e.length()>8?3:1,v=[],m=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],b=0,w=0;w<g;w++){var C=e.getInt32(),E=e.getInt32();C^=(t=252645135&(C>>>4^E))<<4,C^=t=65535&((E^=t)>>>-16^C),C^=(t=858993459&(C>>>2^(E^=t<<-16)))<<2,C^=t=65535&((E^=t)>>>-16^C),C^=(t=1431655765&(C>>>1^(E^=t<<-16)))<<1,C^=t=16711935&((E^=t)>>>8^C),t=(C^=(t=1431655765&(C>>>1^(E^=t<<8)))<<1)<<8|(E^=t)>>>20&240,C=E<<24|E<<8&16711680|E>>>8&65280|E>>>24&240,E=t;for(var S=0;S<m.length;++S){m[S]?(C=C<<2|C>>>26,E=E<<2|E>>>26):(C=C<<1|C>>>27,E=E<<1|E>>>27);var A=r[(C&=-15)>>>28]|n[C>>>24&15]|i[C>>>20&15]|a[C>>>16&15]|o[C>>>12&15]|s[C>>>8&15]|c[C>>>4&15],B=u[(E&=-15)>>>28]|f[E>>>24&15]|h[E>>>20&15]|l[E>>>16&15]|d[E>>>12&15]|p[E>>>8&15]|y[E>>>4&15];t=65535&(B>>>16^A),v[b++]=A^t,v[b++]=B^t<<16}}return v}(t),this._init=!0}},i("DES-ECB",n.cipher.modes.ecb),i("DES-CBC",n.cipher.modes.cbc),i("DES-CFB",n.cipher.modes.cfb),i("DES-OFB",n.cipher.modes.ofb),i("DES-CTR",n.cipher.modes.ctr),i("3DES-ECB",n.cipher.modes.ecb),i("3DES-CBC",n.cipher.modes.cbc),i("3DES-CFB",n.cipher.modes.cfb),i("3DES-OFB",n.cipher.modes.ofb),i("3DES-CTR",n.cipher.modes.ctr);var a=[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],o=[-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],s=[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],c=[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],u=[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],f=[536870928,541065216,16384,541081616,541065216,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],h=[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],l=[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 d(e,t,r,n){var i,d,p=32===e.length?3:9;i=3===p?n?[30,-2,-2]:[0,32,2]:n?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var y=t[0],g=t[1];y^=(d=252645135&(y>>>4^g))<<4,y^=(d=65535&(y>>>16^(g^=d)))<<16,y^=d=858993459&((g^=d)>>>2^y),y^=d=16711935&((g^=d<<2)>>>8^y),y=(y^=(d=1431655765&(y>>>1^(g^=d<<8)))<<1)<<1|y>>>31,g=(g^=d)<<1|g>>>31;for(var v=0;v<p;v+=3){for(var m=i[v+1],b=i[v+2],w=i[v];w!=m;w+=b){var C=g^e[w],E=(g>>>4|g<<28)^e[w+1];d=y,y=g,g=d^(o[C>>>24&63]|c[C>>>16&63]|f[C>>>8&63]|l[63&C]|a[E>>>24&63]|s[E>>>16&63]|u[E>>>8&63]|h[63&E])}d=y,y=g,g=d}g=g>>>1|g<<31,g^=d=1431655765&((y=y>>>1|y<<31)>>>1^g),g^=(d=16711935&(g>>>8^(y^=d<<1)))<<8,g^=(d=858993459&(g>>>2^(y^=d)))<<2,g^=d=65535&((y^=d)>>>16^g),g^=d=252645135&((y^=d<<16)>>>4^g),y^=d<<4,r[0]=y,r[1]=g}function p(e){var t,r="DES-"+((e=e||{}).mode||"CBC").toUpperCase(),i=(t=e.decrypt?n.cipher.createDecipher(r,e.key):n.cipher.createCipher(r,e.key)).start;return t.start=function(e,r){var a=null;r instanceof n.util.ByteBuffer&&(a=r,r={}),(r=r||{}).output=a,r.iv=e,i.call(t,r)},t}},18272:(e,t,r)=>{var n=r(19024).Buffer,i=r(91080);r(26056),r(90400),r(74756),r(18736);var a=r(49196),o=a.publicKeyValidator,s=a.privateKeyValidator;if(void 0===c)var c=i.jsbn.BigInteger;var u=i.util.ByteBuffer,f=void 0===n?Uint8Array:n;i.pki=i.pki||{},e.exports=i.pki.ed25519=i.ed25519=i.ed25519||{};var h=i.ed25519;function l(e){var t=e.message;if(t instanceof Uint8Array||t instanceof f)return t;var r=e.encoding;if(void 0===t){if(!e.md)throw new TypeError('"options.message" or "options.md" not specified.');t=e.md.digest().getBytes(),r="binary"}if("string"==typeof t&&!r)throw new TypeError('"options.encoding" must be "binary" or "utf8".');if("string"==typeof t){if(void 0!==n)return n.from(t,r);t=new u(t,r)}else if(!(t instanceof u))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 i=new f(t.length()),a=0;a<i.length;++a)i[a]=t.at(a);return i}h.constants={},h.constants.PUBLIC_KEY_BYTE_LENGTH=32,h.constants.PRIVATE_KEY_BYTE_LENGTH=64,h.constants.SEED_BYTE_LENGTH=32,h.constants.SIGN_BYTE_LENGTH=64,h.constants.HASH_BYTE_LENGTH=64,h.generateKeyPair=function(e){var t=(e=e||{}).seed;if(void 0===t)t=i.random.getBytesSync(h.constants.SEED_BYTE_LENGTH);else if("string"==typeof t){if(t.length!==h.constants.SEED_BYTE_LENGTH)throw new TypeError('"seed" must be '+h.constants.SEED_BYTE_LENGTH+" bytes in length.")}else if(!(t instanceof Uint8Array))throw new TypeError('"seed" must be a node.js Buffer, Uint8Array, or a binary string.');t=l({message:t,encoding:"binary"});for(var r=new f(h.constants.PUBLIC_KEY_BYTE_LENGTH),n=new f(h.constants.PRIVATE_KEY_BYTE_LENGTH),a=0;a<32;++a)n[a]=t[a];return function(e,t){var r,n=[N(),N(),N(),N()],i=C(t,32);for(i[0]&=248,i[31]&=127,i[31]|=64,F(n,i),T(e,n),r=0;r<32;++r)t[r+32]=e[r]}(r,n),{publicKey:r,privateKey:n}},h.privateKeyFromAsn1=function(e){var t={},r=[];if(!i.asn1.validate(e,s,t,r)){var n=new Error("Invalid Key.");throw n.errors=r,n}var a=i.asn1.derToOid(t.privateKeyOid),o=i.oids.EdDSA25519;if(a!==o)throw new Error('Invalid OID "'+a+'"; OID must be "'+o+'".');var c=t.privateKey;return{privateKeyBytes:l({message:i.asn1.fromDer(c).value,encoding:"binary"})}},h.publicKeyFromAsn1=function(e){var t={},r=[];if(!i.asn1.validate(e,o,t,r)){var n=new Error("Invalid Key.");throw n.errors=r,n}var a=i.asn1.derToOid(t.publicKeyOid),s=i.oids.EdDSA25519;if(a!==s)throw new Error('Invalid OID "'+a+'"; OID must be "'+s+'".');var c=t.ed25519PublicKey;if(c.length!==h.constants.PUBLIC_KEY_BYTE_LENGTH)throw new Error("Key length is invalid.");return l({message:c,encoding:"binary"})},h.publicKeyFromPrivateKey=function(e){var t=l({message:(e=e||{}).privateKey,encoding:"binary"});if(t.length!==h.constants.PRIVATE_KEY_BYTE_LENGTH)throw new TypeError('"options.privateKey" must have a byte length of '+h.constants.PRIVATE_KEY_BYTE_LENGTH);for(var r=new f(h.constants.PUBLIC_KEY_BYTE_LENGTH),n=0;n<r.length;++n)r[n]=t[32+n];return r},h.sign=function(e){var t=l(e=e||{}),r=l({message:e.privateKey,encoding:"binary"});if(r.length===h.constants.SEED_BYTE_LENGTH)r=h.generateKeyPair({seed:r}).privateKey;else if(r.length!==h.constants.PRIVATE_KEY_BYTE_LENGTH)throw new TypeError('"options.privateKey" must have a byte length of '+h.constants.SEED_BYTE_LENGTH+" or "+h.constants.PRIVATE_KEY_BYTE_LENGTH);var n=new f(h.constants.SIGN_BYTE_LENGTH+t.length);!function(e,t,r,n){var i,a,o=new Float64Array(64),s=[N(),N(),N(),N()],c=C(n,32);c[0]&=248,c[31]&=127,c[31]|=64;for(i=0;i<r;++i)e[64+i]=t[i];for(i=0;i<32;++i)e[32+i]=c[32+i];var u=C(e.subarray(32),r+32);for(S(u),F(s,u),T(e,s),i=32;i<64;++i)e[i]=n[i];var f=C(e,r+64);for(S(f),i=32;i<64;++i)o[i]=0;for(i=0;i<32;++i)o[i]=u[i];for(i=0;i<32;++i)for(a=0;a<32;a++)o[i+a]+=f[i]*c[a];E(e.subarray(32),o)}(n,t,t.length,r);for(var i=new f(h.constants.SIGN_BYTE_LENGTH),a=0;a<i.length;++a)i[a]=n[a];return i},h.verify=function(e){var t=l(e=e||{});if(void 0===e.signature)throw new TypeError('"options.signature" must be a node.js Buffer, a Uint8Array, a forge ByteBuffer, or a binary string.');var r=l({message:e.signature,encoding:"binary"});if(r.length!==h.constants.SIGN_BYTE_LENGTH)throw new TypeError('"options.signature" must have a byte length of '+h.constants.SIGN_BYTE_LENGTH);var n=l({message:e.publicKey,encoding:"binary"});if(n.length!==h.constants.PUBLIC_KEY_BYTE_LENGTH)throw new TypeError('"options.publicKey" must have a byte length of '+h.constants.PUBLIC_KEY_BYTE_LENGTH);var i,a=new f(h.constants.SIGN_BYTE_LENGTH+t.length),o=new f(h.constants.SIGN_BYTE_LENGTH+t.length);for(i=0;i<h.constants.SIGN_BYTE_LENGTH;++i)a[i]=r[i];for(i=0;i<t.length;++i)a[i+h.constants.SIGN_BYTE_LENGTH]=t[i];return function(e,t,r,n){var i,a=new f(32),o=[N(),N(),N(),N()],s=[N(),N(),N(),N()];if(r<64)return-1;if(function(e,t){var r=N(),n=N(),i=N(),a=N(),o=N(),s=N(),c=N();return D(e[2],p),function(e,t){var r;for(r=0;r<16;++r)e[r]=t[2*r]+(t[2*r+1]<<8);e[15]&=32767}(e[1],t),O(i,e[1]),K(a,i,y),M(i,i,e[2]),L(a,e[2],a),O(o,a),O(s,o),K(c,s,o),K(r,c,i),K(r,r,a),function(e,t){var r,n=N();for(r=0;r<16;++r)n[r]=t[r];for(r=250;r>=0;--r)O(n,n),1!==r&&K(n,n,t);for(r=0;r<16;++r)e[r]=n[r]}(r,r),K(r,r,i),K(r,r,a),K(r,r,a),K(e[0],r,a),O(n,e[0]),K(n,n,a),k(n,i)&&K(e[0],e[0],w),O(n,e[0]),K(n,n,a),k(n,i)?-1:(R(e[0])===t[31]>>7&&M(e[0],d,e[0]),K(e[3],e[0],e[1]),0)}(s,n))return-1;for(i=0;i<r;++i)e[i]=t[i];for(i=0;i<32;++i)e[i+32]=n[i];var c=C(e,r);if(S(c),x(o,s,c),F(s,t.subarray(32)),A(o,s),T(a,o),r-=64,_(t,0,a,0)){for(i=0;i<r;++i)e[i]=0;return-1}for(i=0;i<r;++i)e[i]=t[i+64];return r}(o,a,a.length,n)>=0};var d=N(),p=N([1]),y=N([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),g=N([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),v=N([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),m=N([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),b=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]),w=N([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function C(e,t){var r=i.md.sha512.create(),a=new u(e);r.update(a.getBytes(t),"binary");var o=r.digest().getBytes();if(void 0!==n)return n.from(o,"binary");for(var s=new f(h.constants.HASH_BYTE_LENGTH),c=0;c<64;++c)s[c]=o.charCodeAt(c);return s}function E(e,t){var r,n,i,a;for(n=63;n>=32;--n){for(r=0,i=n-32,a=n-12;i<a;++i)t[i]+=r-16*t[n]*b[i-(n-32)],r=t[i]+128>>8,t[i]-=256*r;t[i]+=r,t[n]=0}for(r=0,i=0;i<32;++i)t[i]+=r-(t[31]>>4)*b[i],r=t[i]>>8,t[i]&=255;for(i=0;i<32;++i)t[i]-=r*b[i];for(n=0;n<32;++n)t[n+1]+=t[n]>>8,e[n]=255&t[n]}function S(e){for(var t=new Float64Array(64),r=0;r<64;++r)t[r]=e[r],e[r]=0;E(e,t)}function A(e,t){var r=N(),n=N(),i=N(),a=N(),o=N(),s=N(),c=N(),u=N(),f=N();M(r,e[1],e[0]),M(f,t[1],t[0]),K(r,r,f),L(n,e[0],e[1]),L(f,t[0],t[1]),K(n,n,f),K(i,e[3],t[3]),K(i,i,g),K(a,e[2],t[2]),L(a,a,a),M(o,n,r),M(s,a,i),L(c,a,i),L(u,n,r),K(e[0],o,s),K(e[1],u,c),K(e[2],c,s),K(e[3],o,u)}function B(e,t,r){for(var n=0;n<4;++n)U(e[n],t[n],r)}function T(e,t){var r=N(),n=N(),i=N();!function(e,t){var r,n=N();for(r=0;r<16;++r)n[r]=t[r];for(r=253;r>=0;--r)O(n,n),2!==r&&4!==r&&K(n,n,t);for(r=0;r<16;++r)e[r]=n[r]}(i,t[2]),K(r,t[0],i),K(n,t[1],i),I(e,n),e[31]^=R(r)<<7}function I(e,t){var r,n,i,a=N(),o=N();for(r=0;r<16;++r)o[r]=t[r];for(P(o),P(o),P(o),n=0;n<2;++n){for(a[0]=o[0]-65517,r=1;r<15;++r)a[r]=o[r]-65535-(a[r-1]>>16&1),a[r-1]&=65535;a[15]=o[15]-32767-(a[14]>>16&1),i=a[15]>>16&1,a[14]&=65535,U(o,a,1-i)}for(r=0;r<16;r++)e[2*r]=255&o[r],e[2*r+1]=o[r]>>8}function k(e,t){var r=new f(32),n=new f(32);return I(r,e),I(n,t),_(r,0,n,0)}function _(e,t,r,n){return function(e,t,r,n,i){var a,o=0;for(a=0;a<32;++a)o|=e[t+a]^r[n+a];return(1&o-1>>>8)-1}(e,t,r,n)}function R(e){var t=new f(32);return I(t,e),1&t[0]}function x(e,t,r){var n,i;for(D(e[0],d),D(e[1],p),D(e[2],p),D(e[3],d),i=255;i>=0;--i)B(e,t,n=r[i/8|0]>>(7&i)&1),A(t,e),A(e,e),B(e,t,n)}function F(e,t){var r=[N(),N(),N(),N()];D(r[0],v),D(r[1],m),D(r[2],p),K(r[3],v,m),x(e,r,t)}function D(e,t){var r;for(r=0;r<16;r++)e[r]=0|t[r]}function P(e){var t,r,n=1;for(t=0;t<16;++t)r=e[t]+n+65535,n=Math.floor(r/65536),e[t]=r-65536*n;e[0]+=n-1+37*(n-1)}function U(e,t,r){for(var n,i=~(r-1),a=0;a<16;++a)n=i&(e[a]^t[a]),e[a]^=n,t[a]^=n}function N(e){var t,r=new Float64Array(16);if(e)for(t=0;t<e.length;++t)r[t]=e[t];return r}function L(e,t,r){for(var n=0;n<16;++n)e[n]=t[n]+r[n]}function M(e,t,r){for(var n=0;n<16;++n)e[n]=t[n]-r[n]}function O(e,t){K(e,t,t)}function K(e,t,r){var n,i,a=0,o=0,s=0,c=0,u=0,f=0,h=0,l=0,d=0,p=0,y=0,g=0,v=0,m=0,b=0,w=0,C=0,E=0,S=0,A=0,B=0,T=0,I=0,k=0,_=0,R=0,x=0,F=0,D=0,P=0,U=0,N=r[0],L=r[1],M=r[2],O=r[3],K=r[4],G=r[5],j=r[6],V=r[7],H=r[8],q=r[9],z=r[10],W=r[11],X=r[12],Y=r[13],Q=r[14],Z=r[15];a+=(n=t[0])*N,o+=n*L,s+=n*M,c+=n*O,u+=n*K,f+=n*G,h+=n*j,l+=n*V,d+=n*H,p+=n*q,y+=n*z,g+=n*W,v+=n*X,m+=n*Y,b+=n*Q,w+=n*Z,o+=(n=t[1])*N,s+=n*L,c+=n*M,u+=n*O,f+=n*K,h+=n*G,l+=n*j,d+=n*V,p+=n*H,y+=n*q,g+=n*z,v+=n*W,m+=n*X,b+=n*Y,w+=n*Q,C+=n*Z,s+=(n=t[2])*N,c+=n*L,u+=n*M,f+=n*O,h+=n*K,l+=n*G,d+=n*j,p+=n*V,y+=n*H,g+=n*q,v+=n*z,m+=n*W,b+=n*X,w+=n*Y,C+=n*Q,E+=n*Z,c+=(n=t[3])*N,u+=n*L,f+=n*M,h+=n*O,l+=n*K,d+=n*G,p+=n*j,y+=n*V,g+=n*H,v+=n*q,m+=n*z,b+=n*W,w+=n*X,C+=n*Y,E+=n*Q,S+=n*Z,u+=(n=t[4])*N,f+=n*L,h+=n*M,l+=n*O,d+=n*K,p+=n*G,y+=n*j,g+=n*V,v+=n*H,m+=n*q,b+=n*z,w+=n*W,C+=n*X,E+=n*Y,S+=n*Q,A+=n*Z,f+=(n=t[5])*N,h+=n*L,l+=n*M,d+=n*O,p+=n*K,y+=n*G,g+=n*j,v+=n*V,m+=n*H,b+=n*q,w+=n*z,C+=n*W,E+=n*X,S+=n*Y,A+=n*Q,B+=n*Z,h+=(n=t[6])*N,l+=n*L,d+=n*M,p+=n*O,y+=n*K,g+=n*G,v+=n*j,m+=n*V,b+=n*H,w+=n*q,C+=n*z,E+=n*W,S+=n*X,A+=n*Y,B+=n*Q,T+=n*Z,l+=(n=t[7])*N,d+=n*L,p+=n*M,y+=n*O,g+=n*K,v+=n*G,m+=n*j,b+=n*V,w+=n*H,C+=n*q,E+=n*z,S+=n*W,A+=n*X,B+=n*Y,T+=n*Q,I+=n*Z,d+=(n=t[8])*N,p+=n*L,y+=n*M,g+=n*O,v+=n*K,m+=n*G,b+=n*j,w+=n*V,C+=n*H,E+=n*q,S+=n*z,A+=n*W,B+=n*X,T+=n*Y,I+=n*Q,k+=n*Z,p+=(n=t[9])*N,y+=n*L,g+=n*M,v+=n*O,m+=n*K,b+=n*G,w+=n*j,C+=n*V,E+=n*H,S+=n*q,A+=n*z,B+=n*W,T+=n*X,I+=n*Y,k+=n*Q,_+=n*Z,y+=(n=t[10])*N,g+=n*L,v+=n*M,m+=n*O,b+=n*K,w+=n*G,C+=n*j,E+=n*V,S+=n*H,A+=n*q,B+=n*z,T+=n*W,I+=n*X,k+=n*Y,_+=n*Q,R+=n*Z,g+=(n=t[11])*N,v+=n*L,m+=n*M,b+=n*O,w+=n*K,C+=n*G,E+=n*j,S+=n*V,A+=n*H,B+=n*q,T+=n*z,I+=n*W,k+=n*X,_+=n*Y,R+=n*Q,x+=n*Z,v+=(n=t[12])*N,m+=n*L,b+=n*M,w+=n*O,C+=n*K,E+=n*G,S+=n*j,A+=n*V,B+=n*H,T+=n*q,I+=n*z,k+=n*W,_+=n*X,R+=n*Y,x+=n*Q,F+=n*Z,m+=(n=t[13])*N,b+=n*L,w+=n*M,C+=n*O,E+=n*K,S+=n*G,A+=n*j,B+=n*V,T+=n*H,I+=n*q,k+=n*z,_+=n*W,R+=n*X,x+=n*Y,F+=n*Q,D+=n*Z,b+=(n=t[14])*N,w+=n*L,C+=n*M,E+=n*O,S+=n*K,A+=n*G,B+=n*j,T+=n*V,I+=n*H,k+=n*q,_+=n*z,R+=n*W,x+=n*X,F+=n*Y,D+=n*Q,P+=n*Z,w+=(n=t[15])*N,o+=38*(E+=n*M),s+=38*(S+=n*O),c+=38*(A+=n*K),u+=38*(B+=n*G),f+=38*(T+=n*j),h+=38*(I+=n*V),l+=38*(k+=n*H),d+=38*(_+=n*q),p+=38*(R+=n*z),y+=38*(x+=n*W),g+=38*(F+=n*X),v+=38*(D+=n*Y),m+=38*(P+=n*Q),b+=38*(U+=n*Z),a=(n=(a+=38*(C+=n*L))+(i=1)+65535)-65536*(i=Math.floor(n/65536)),o=(n=o+i+65535)-65536*(i=Math.floor(n/65536)),s=(n=s+i+65535)-65536*(i=Math.floor(n/65536)),c=(n=c+i+65535)-65536*(i=Math.floor(n/65536)),u=(n=u+i+65535)-65536*(i=Math.floor(n/65536)),f=(n=f+i+65535)-65536*(i=Math.floor(n/65536)),h=(n=h+i+65535)-65536*(i=Math.floor(n/65536)),l=(n=l+i+65535)-65536*(i=Math.floor(n/65536)),d=(n=d+i+65535)-65536*(i=Math.floor(n/65536)),p=(n=p+i+65535)-65536*(i=Math.floor(n/65536)),y=(n=y+i+65535)-65536*(i=Math.floor(n/65536)),g=(n=g+i+65535)-65536*(i=Math.floor(n/65536)),v=(n=v+i+65535)-65536*(i=Math.floor(n/65536)),m=(n=m+i+65535)-65536*(i=Math.floor(n/65536)),b=(n=b+i+65535)-65536*(i=Math.floor(n/65536)),w=(n=w+i+65535)-65536*(i=Math.floor(n/65536)),a=(n=(a+=i-1+37*(i-1))+(i=1)+65535)-65536*(i=Math.floor(n/65536)),o=(n=o+i+65535)-65536*(i=Math.floor(n/65536)),s=(n=s+i+65535)-65536*(i=Math.floor(n/65536)),c=(n=c+i+65535)-65536*(i=Math.floor(n/65536)),u=(n=u+i+65535)-65536*(i=Math.floor(n/65536)),f=(n=f+i+65535)-65536*(i=Math.floor(n/65536)),h=(n=h+i+65535)-65536*(i=Math.floor(n/65536)),l=(n=l+i+65535)-65536*(i=Math.floor(n/65536)),d=(n=d+i+65535)-65536*(i=Math.floor(n/65536)),p=(n=p+i+65535)-65536*(i=Math.floor(n/65536)),y=(n=y+i+65535)-65536*(i=Math.floor(n/65536)),g=(n=g+i+65535)-65536*(i=Math.floor(n/65536)),v=(n=v+i+65535)-65536*(i=Math.floor(n/65536)),m=(n=m+i+65535)-65536*(i=Math.floor(n/65536)),b=(n=b+i+65535)-65536*(i=Math.floor(n/65536)),w=(n=w+i+65535)-65536*(i=Math.floor(n/65536)),a+=i-1+37*(i-1),e[0]=a,e[1]=o,e[2]=s,e[3]=c,e[4]=u,e[5]=f,e[6]=h,e[7]=l,e[8]=d,e[9]=p,e[10]=y,e[11]=g,e[12]=v,e[13]=m,e[14]=b,e[15]=w}},91080:e=>{e.exports={options:{usePureJavaScript:!1}}},43472:(e,t,r)=>{var n=r(91080);r(48724),r(18736),(e.exports=n.hmac=n.hmac||{}).create=function(){var e=null,t=null,r=null,i=null,a={start:function(a,o){if(null!==a)if("string"==typeof a){if(!((a=a.toLowerCase())in n.md.algorithms))throw new Error('Unknown hash algorithm "'+a+'"');t=n.md.algorithms[a].create()}else t=a;if(null===o)o=e;else{if("string"==typeof o)o=n.util.createBuffer(o);else if(n.util.isArray(o)){var s=o;o=n.util.createBuffer();for(var c=0;c<s.length;++c)o.putByte(s[c])}var u=o.length();for(u>t.blockLength&&(t.start(),t.update(o.bytes()),o=t.digest()),r=n.util.createBuffer(),i=n.util.createBuffer(),u=o.length(),c=0;c<u;++c)s=o.at(c),r.putByte(54^s),i.putByte(92^s);if(u<t.blockLength)for(s=t.blockLength-u,c=0;c<s;++c)r.putByte(54),i.putByte(92);e=o,r=r.bytes(),i=i.bytes()}t.start(),t.update(r)},update:function(e){t.update(e)},getMac:function(){var e=t.digest().bytes();return t.start(),t.update(i),t.update(e),t.digest()}};return a.digest=a.getMac,a}},68212:(e,t,r)=>{e.exports=r(91080),r(6180),r(68776),r(4e4),r(67844),r(3044),r(18272),r(43472),r(49348),r(21200),r(15416),r(36620),r(71256),r(96964),r(29948),r(45644),r(1376),r(75300),r(88200),r(80408),r(4124),r(90400),r(42196),r(89573),r(95720),r(18736)},26056:(e,t,r)=>{var n,i=r(91080);function a(e,t,r){this.data=[],null!=e&&("number"==typeof e?this.fromNumber(e,t,r):null==t&&"string"!=typeof e?this.fromString(e,256):this.fromString(e,t))}function o(){return new a(null)}function s(e,t,r,n,i,a){for(var o=16383&t,s=t>>14;--a>=0;){var c=16383&this.data[e],u=this.data[e++]>>14,f=s*c+u*o;i=((c=o*c+((16383&f)<<14)+r.data[n]+i)>>28)+(f>>14)+s*u,r.data[n++]=268435455&c}return i}e.exports=i.jsbn=i.jsbn||{},i.jsbn.BigInteger=a,"undefined"==typeof navigator?(a.prototype.am=s,n=28):"Microsoft Internet Explorer"==navigator.appName?(a.prototype.am=function(e,t,r,n,i,a){for(var o=32767&t,s=t>>15;--a>=0;){var c=32767&this.data[e],u=this.data[e++]>>15,f=s*c+u*o;i=((c=o*c+((32767&f)<<15)+r.data[n]+(1073741823&i))>>>30)+(f>>>15)+s*u+(i>>>30),r.data[n++]=1073741823&c}return i},n=30):"Netscape"!=navigator.appName?(a.prototype.am=function(e,t,r,n,i,a){for(;--a>=0;){var o=t*this.data[e++]+r.data[n]+i;i=Math.floor(o/67108864),r.data[n++]=67108863&o}return i},n=26):(a.prototype.am=s,n=28),a.prototype.DB=n,a.prototype.DM=(1<<n)-1,a.prototype.DV=1<<n,a.prototype.FV=Math.pow(2,52),a.prototype.F1=52-n,a.prototype.F2=2*n-52;var c,u,f=new Array;for(c="0".charCodeAt(0),u=0;u<=9;++u)f[c++]=u;for(c="a".charCodeAt(0),u=10;u<36;++u)f[c++]=u;for(c="A".charCodeAt(0),u=10;u<36;++u)f[c++]=u;function h(e){return"0123456789abcdefghijklmnopqrstuvwxyz".charAt(e)}function l(e,t){var r=f[e.charCodeAt(t)];return null==r?-1:r}function d(e){var t=o();return t.fromInt(e),t}function p(e){var t,r=1;return 0!=(t=e>>>16)&&(e=t,r+=16),0!=(t=e>>8)&&(e=t,r+=8),0!=(t=e>>4)&&(e=t,r+=4),0!=(t=e>>2)&&(e=t,r+=2),0!=(t=e>>1)&&(e=t,r+=1),r}function y(e){this.m=e}function g(e){this.m=e,this.mp=e.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<e.DB-15)-1,this.mt2=2*e.t}function v(e,t){return e&t}function m(e,t){return e|t}function b(e,t){return e^t}function w(e,t){return e&~t}function C(e){if(0==e)return-1;var t=0;return 0==(65535&e)&&(e>>=16,t+=16),0==(255&e)&&(e>>=8,t+=8),0==(15&e)&&(e>>=4,t+=4),0==(3&e)&&(e>>=2,t+=2),0==(1&e)&&++t,t}function E(e){for(var t=0;0!=e;)e&=e-1,++t;return t}function S(){}function A(e){return e}function B(e){this.r2=o(),this.q3=o(),a.ONE.dlShiftTo(2*e.t,this.r2),this.mu=this.r2.divide(e),this.m=e}y.prototype.convert=function(e){return e.s<0||e.compareTo(this.m)>=0?e.mod(this.m):e},y.prototype.revert=function(e){return e},y.prototype.reduce=function(e){e.divRemTo(this.m,null,e)},y.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},y.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},g.prototype.convert=function(e){var t=o();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(a.ZERO)>0&&this.m.subTo(t,t),t},g.prototype.revert=function(e){var t=o();return e.copyTo(t),this.reduce(t),t},g.prototype.reduce=function(e){for(;e.t<=this.mt2;)e.data[e.t++]=0;for(var t=0;t<this.m.t;++t){var r=32767&e.data[t],n=r*this.mpl+((r*this.mph+(e.data[t]>>15)*this.mpl&this.um)<<15)&e.DM;for(r=t+this.m.t,e.data[r]+=this.m.am(0,n,e,t,0,this.m.t);e.data[r]>=e.DV;)e.data[r]-=e.DV,e.data[++r]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)},g.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},g.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},a.prototype.copyTo=function(e){for(var t=this.t-1;t>=0;--t)e.data[t]=this.data[t];e.t=this.t,e.s=this.s},a.prototype.fromInt=function(e){this.t=1,this.s=e<0?-1:0,e>0?this.data[0]=e:e<-1?this.data[0]=e+this.DV:this.t=0},a.prototype.fromString=function(e,t){var r;if(16==t)r=4;else if(8==t)r=3;else if(256==t)r=8;else if(2==t)r=1;else if(32==t)r=5;else{if(4!=t)return void this.fromRadix(e,t);r=2}this.t=0,this.s=0;for(var n=e.length,i=!1,o=0;--n>=0;){var s=8==r?255&e[n]:l(e,n);s<0?"-"==e.charAt(n)&&(i=!0):(i=!1,0==o?this.data[this.t++]=s:o+r>this.DB?(this.data[this.t-1]|=(s&(1<<this.DB-o)-1)<<o,this.data[this.t++]=s>>this.DB-o):this.data[this.t-1]|=s<<o,(o+=r)>=this.DB&&(o-=this.DB))}8==r&&0!=(128&e[0])&&(this.s=-1,o>0&&(this.data[this.t-1]|=(1<<this.DB-o)-1<<o)),this.clamp(),i&&a.ZERO.subTo(this,this)},a.prototype.clamp=function(){for(var e=this.s&this.DM;this.t>0&&this.data[this.t-1]==e;)--this.t},a.prototype.dlShiftTo=function(e,t){var r;for(r=this.t-1;r>=0;--r)t.data[r+e]=this.data[r];for(r=e-1;r>=0;--r)t.data[r]=0;t.t=this.t+e,t.s=this.s},a.prototype.drShiftTo=function(e,t){for(var r=e;r<this.t;++r)t.data[r-e]=this.data[r];t.t=Math.max(this.t-e,0),t.s=this.s},a.prototype.lShiftTo=function(e,t){var r,n=e%this.DB,i=this.DB-n,a=(1<<i)-1,o=Math.floor(e/this.DB),s=this.s<<n&this.DM;for(r=this.t-1;r>=0;--r)t.data[r+o+1]=this.data[r]>>i|s,s=(this.data[r]&a)<<n;for(r=o-1;r>=0;--r)t.data[r]=0;t.data[o]=s,t.t=this.t+o+1,t.s=this.s,t.clamp()},a.prototype.rShiftTo=function(e,t){t.s=this.s;var r=Math.floor(e/this.DB);if(r>=this.t)t.t=0;else{var n=e%this.DB,i=this.DB-n,a=(1<<n)-1;t.data[0]=this.data[r]>>n;for(var o=r+1;o<this.t;++o)t.data[o-r-1]|=(this.data[o]&a)<<i,t.data[o-r]=this.data[o]>>n;n>0&&(t.data[this.t-r-1]|=(this.s&a)<<i),t.t=this.t-r,t.clamp()}},a.prototype.subTo=function(e,t){for(var r=0,n=0,i=Math.min(e.t,this.t);r<i;)n+=this.data[r]-e.data[r],t.data[r++]=n&this.DM,n>>=this.DB;if(e.t<this.t){for(n-=e.s;r<this.t;)n+=this.data[r],t.data[r++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;r<e.t;)n-=e.data[r],t.data[r++]=n&this.DM,n>>=this.DB;n-=e.s}t.s=n<0?-1:0,n<-1?t.data[r++]=this.DV+n:n>0&&(t.data[r++]=n),t.t=r,t.clamp()},a.prototype.multiplyTo=function(e,t){var r=this.abs(),n=e.abs(),i=r.t;for(t.t=i+n.t;--i>=0;)t.data[i]=0;for(i=0;i<n.t;++i)t.data[i+r.t]=r.am(0,n.data[i],t,i,0,r.t);t.s=0,t.clamp(),this.s!=e.s&&a.ZERO.subTo(t,t)},a.prototype.squareTo=function(e){for(var t=this.abs(),r=e.t=2*t.t;--r>=0;)e.data[r]=0;for(r=0;r<t.t-1;++r){var n=t.am(r,t.data[r],e,2*r,0,1);(e.data[r+t.t]+=t.am(r+1,2*t.data[r],e,2*r+1,n,t.t-r-1))>=t.DV&&(e.data[r+t.t]-=t.DV,e.data[r+t.t+1]=1)}e.t>0&&(e.data[e.t-1]+=t.am(r,t.data[r],e,2*r,0,1)),e.s=0,e.clamp()},a.prototype.divRemTo=function(e,t,r){var n=e.abs();if(!(n.t<=0)){var i=this.abs();if(i.t<n.t)return null!=t&&t.fromInt(0),void(null!=r&&this.copyTo(r));null==r&&(r=o());var s=o(),c=this.s,u=e.s,f=this.DB-p(n.data[n.t-1]);f>0?(n.lShiftTo(f,s),i.lShiftTo(f,r)):(n.copyTo(s),i.copyTo(r));var h=s.t,l=s.data[h-1];if(0!=l){var d=l*(1<<this.F1)+(h>1?s.data[h-2]>>this.F2:0),y=this.FV/d,g=(1<<this.F1)/d,v=1<<this.F2,m=r.t,b=m-h,w=null==t?o():t;for(s.dlShiftTo(b,w),r.compareTo(w)>=0&&(r.data[r.t++]=1,r.subTo(w,r)),a.ONE.dlShiftTo(h,w),w.subTo(s,s);s.t<h;)s.data[s.t++]=0;for(;--b>=0;){var C=r.data[--m]==l?this.DM:Math.floor(r.data[m]*y+(r.data[m-1]+v)*g);if((r.data[m]+=s.am(0,C,r,b,0,h))<C)for(s.dlShiftTo(b,w),r.subTo(w,r);r.data[m]<--C;)r.subTo(w,r)}null!=t&&(r.drShiftTo(h,t),c!=u&&a.ZERO.subTo(t,t)),r.t=h,r.clamp(),f>0&&r.rShiftTo(f,r),c<0&&a.ZERO.subTo(r,r)}}},a.prototype.invDigit=function(){if(this.t<1)return 0;var e=this.data[0];if(0==(1&e))return 0;var t=3&e;return(t=(t=(t=(t=t*(2-(15&e)*t)&15)*(2-(255&e)*t)&255)*(2-((65535&e)*t&65535))&65535)*(2-e*t%this.DV)%this.DV)>0?this.DV-t:-t},a.prototype.isEven=function(){return 0==(this.t>0?1&this.data[0]:this.s)},a.prototype.exp=function(e,t){if(e>4294967295||e<1)return a.ONE;var r=o(),n=o(),i=t.convert(this),s=p(e)-1;for(i.copyTo(r);--s>=0;)if(t.sqrTo(r,n),(e&1<<s)>0)t.mulTo(n,i,r);else{var c=r;r=n,n=c}return t.revert(r)},a.prototype.toString=function(e){if(this.s<0)return"-"+this.negate().toString(e);var t;if(16==e)t=4;else if(8==e)t=3;else if(2==e)t=1;else if(32==e)t=5;else{if(4!=e)return this.toRadix(e);t=2}var r,n=(1<<t)-1,i=!1,a="",o=this.t,s=this.DB-o*this.DB%t;if(o-- >0)for(s<this.DB&&(r=this.data[o]>>s)>0&&(i=!0,a=h(r));o>=0;)s<t?(r=(this.data[o]&(1<<s)-1)<<t-s,r|=this.data[--o]>>(s+=this.DB-t)):(r=this.data[o]>>(s-=t)&n,s<=0&&(s+=this.DB,--o)),r>0&&(i=!0),i&&(a+=h(r));return i?a:"0"},a.prototype.negate=function(){var e=o();return a.ZERO.subTo(this,e),e},a.prototype.abs=function(){return this.s<0?this.negate():this},a.prototype.compareTo=function(e){var t=this.s-e.s;if(0!=t)return t;var r=this.t;if(0!=(t=r-e.t))return this.s<0?-t:t;for(;--r>=0;)if(0!=(t=this.data[r]-e.data[r]))return t;return 0},a.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+p(this.data[this.t-1]^this.s&this.DM)},a.prototype.mod=function(e){var t=o();return this.abs().divRemTo(e,null,t),this.s<0&&t.compareTo(a.ZERO)>0&&e.subTo(t,t),t},a.prototype.modPowInt=function(e,t){var r;return r=e<256||t.isEven()?new y(t):new g(t),this.exp(e,r)},a.ZERO=d(0),a.ONE=d(1),S.prototype.convert=A,S.prototype.revert=A,S.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r)},S.prototype.sqrTo=function(e,t){e.squareTo(t)},B.prototype.convert=function(e){if(e.s<0||e.t>2*this.m.t)return e.mod(this.m);if(e.compareTo(this.m)<0)return e;var t=o();return e.copyTo(t),this.reduce(t),t},B.prototype.revert=function(e){return e},B.prototype.reduce=function(e){for(e.drShiftTo(this.m.t-1,this.r2),e.t>this.m.t+1&&(e.t=this.m.t+1,e.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);e.compareTo(this.r2)<0;)e.dAddOffset(1,this.m.t+1);for(e.subTo(this.r2,e);e.compareTo(this.m)>=0;)e.subTo(this.m,e)},B.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},B.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)};var T=[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],I=(1<<26)/T[T.length-1];a.prototype.chunkSize=function(e){return Math.floor(Math.LN2*this.DB/Math.log(e))},a.prototype.toRadix=function(e){if(null==e&&(e=10),0==this.signum()||e<2||e>36)return"0";var t=this.chunkSize(e),r=Math.pow(e,t),n=d(r),i=o(),a=o(),s="";for(this.divRemTo(n,i,a);i.signum()>0;)s=(r+a.intValue()).toString(e).substr(1)+s,i.divRemTo(n,i,a);return a.intValue().toString(e)+s},a.prototype.fromRadix=function(e,t){this.fromInt(0),null==t&&(t=10);for(var r=this.chunkSize(t),n=Math.pow(t,r),i=!1,o=0,s=0,c=0;c<e.length;++c){var u=l(e,c);u<0?"-"==e.charAt(c)&&0==this.signum()&&(i=!0):(s=t*s+u,++o>=r&&(this.dMultiply(n),this.dAddOffset(s,0),o=0,s=0))}o>0&&(this.dMultiply(Math.pow(t,o)),this.dAddOffset(s,0)),i&&a.ZERO.subTo(this,this)},a.prototype.fromNumber=function(e,t,r){if("number"==typeof t)if(e<2)this.fromInt(1);else for(this.fromNumber(e,r),this.testBit(e-1)||this.bitwiseTo(a.ONE.shiftLeft(e-1),m,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(t);)this.dAddOffset(2,0),this.bitLength()>e&&this.subTo(a.ONE.shiftLeft(e-1),this);else{var n=new Array,i=7&e;n.length=1+(e>>3),t.nextBytes(n),i>0?n[0]&=(1<<i)-1:n[0]=0,this.fromString(n,256)}},a.prototype.bitwiseTo=function(e,t,r){var n,i,a=Math.min(e.t,this.t);for(n=0;n<a;++n)r.data[n]=t(this.data[n],e.data[n]);if(e.t<this.t){for(i=e.s&this.DM,n=a;n<this.t;++n)r.data[n]=t(this.data[n],i);r.t=this.t}else{for(i=this.s&this.DM,n=a;n<e.t;++n)r.data[n]=t(i,e.data[n]);r.t=e.t}r.s=t(this.s,e.s),r.clamp()},a.prototype.changeBit=function(e,t){var r=a.ONE.shiftLeft(e);return this.bitwiseTo(r,t,r),r},a.prototype.addTo=function(e,t){for(var r=0,n=0,i=Math.min(e.t,this.t);r<i;)n+=this.data[r]+e.data[r],t.data[r++]=n&this.DM,n>>=this.DB;if(e.t<this.t){for(n+=e.s;r<this.t;)n+=this.data[r],t.data[r++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;r<e.t;)n+=e.data[r],t.data[r++]=n&this.DM,n>>=this.DB;n+=e.s}t.s=n<0?-1:0,n>0?t.data[r++]=n:n<-1&&(t.data[r++]=this.DV+n),t.t=r,t.clamp()},a.prototype.dMultiply=function(e){this.data[this.t]=this.am(0,e-1,this,0,0,this.t),++this.t,this.clamp()},a.prototype.dAddOffset=function(e,t){if(0!=e){for(;this.t<=t;)this.data[this.t++]=0;for(this.data[t]+=e;this.data[t]>=this.DV;)this.data[t]-=this.DV,++t>=this.t&&(this.data[this.t++]=0),++this.data[t]}},a.prototype.multiplyLowerTo=function(e,t,r){var n,i=Math.min(this.t+e.t,t);for(r.s=0,r.t=i;i>0;)r.data[--i]=0;for(n=r.t-this.t;i<n;++i)r.data[i+this.t]=this.am(0,e.data[i],r,i,0,this.t);for(n=Math.min(e.t,t);i<n;++i)this.am(0,e.data[i],r,i,0,t-i);r.clamp()},a.prototype.multiplyUpperTo=function(e,t,r){--t;var n=r.t=this.t+e.t-t;for(r.s=0;--n>=0;)r.data[n]=0;for(n=Math.max(t-this.t,0);n<e.t;++n)r.data[this.t+n-t]=this.am(t-n,e.data[n],r,0,0,this.t+n-t);r.clamp(),r.drShiftTo(1,r)},a.prototype.modInt=function(e){if(e<=0)return 0;var t=this.DV%e,r=this.s<0?e-1:0;if(this.t>0)if(0==t)r=this.data[0]%e;else for(var n=this.t-1;n>=0;--n)r=(t*r+this.data[n])%e;return r},a.prototype.millerRabin=function(e){var t=this.subtract(a.ONE),r=t.getLowestSetBit();if(r<=0)return!1;for(var n,i=t.shiftRight(r),o={nextBytes:function(e){for(var t=0;t<e.length;++t)e[t]=Math.floor(256*Math.random())}},s=0;s<e;++s){do{n=new a(this.bitLength(),o)}while(n.compareTo(a.ONE)<=0||n.compareTo(t)>=0);var c=n.modPow(i,this);if(0!=c.compareTo(a.ONE)&&0!=c.compareTo(t)){for(var u=1;u++<r&&0!=c.compareTo(t);)if(0==(c=c.modPowInt(2,this)).compareTo(a.ONE))return!1;if(0!=c.compareTo(t))return!1}}return!0},a.prototype.clone=function(){var e=o();return this.copyTo(e),e},a.prototype.intValue=function(){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]},a.prototype.byteValue=function(){return 0==this.t?this.s:this.data[0]<<24>>24},a.prototype.shortValue=function(){return 0==this.t?this.s:this.data[0]<<16>>16},a.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this.data[0]<=0?0:1},a.prototype.toByteArray=function(){var e=this.t,t=new Array;t[0]=this.s;var r,n=this.DB-e*this.DB%8,i=0;if(e-- >0)for(n<this.DB&&(r=this.data[e]>>n)!=(this.s&this.DM)>>n&&(t[i++]=r|this.s<<this.DB-n);e>=0;)n<8?(r=(this.data[e]&(1<<n)-1)<<8-n,r|=this.data[--e]>>(n+=this.DB-8)):(r=this.data[e]>>(n-=8)&255,n<=0&&(n+=this.DB,--e)),0!=(128&r)&&(r|=-256),0==i&&(128&this.s)!=(128&r)&&++i,(i>0||r!=this.s)&&(t[i++]=r);return t},a.prototype.equals=function(e){return 0==this.compareTo(e)},a.prototype.min=function(e){return this.compareTo(e)<0?this:e},a.prototype.max=function(e){return this.compareTo(e)>0?this:e},a.prototype.and=function(e){var t=o();return this.bitwiseTo(e,v,t),t},a.prototype.or=function(e){var t=o();return this.bitwiseTo(e,m,t),t},a.prototype.xor=function(e){var t=o();return this.bitwiseTo(e,b,t),t},a.prototype.andNot=function(e){var t=o();return this.bitwiseTo(e,w,t),t},a.prototype.not=function(){for(var e=o(),t=0;t<this.t;++t)e.data[t]=this.DM&~this.data[t];return e.t=this.t,e.s=~this.s,e},a.prototype.shiftLeft=function(e){var t=o();return e<0?this.rShiftTo(-e,t):this.lShiftTo(e,t),t},a.prototype.shiftRight=function(e){var t=o();return e<0?this.lShiftTo(-e,t):this.rShiftTo(e,t),t},a.prototype.getLowestSetBit=function(){for(var e=0;e<this.t;++e)if(0!=this.data[e])return e*this.DB+C(this.data[e]);return this.s<0?this.t*this.DB:-1},a.prototype.bitCount=function(){for(var e=0,t=this.s&this.DM,r=0;r<this.t;++r)e+=E(this.data[r]^t);return e},a.prototype.testBit=function(e){var t=Math.floor(e/this.DB);return t>=this.t?0!=this.s:0!=(this.data[t]&1<<e%this.DB)},a.prototype.setBit=function(e){return this.changeBit(e,m)},a.prototype.clearBit=function(e){return this.changeBit(e,w)},a.prototype.flipBit=function(e){return this.changeBit(e,b)},a.prototype.add=function(e){var t=o();return this.addTo(e,t),t},a.prototype.subtract=function(e){var t=o();return this.subTo(e,t),t},a.prototype.multiply=function(e){var t=o();return this.multiplyTo(e,t),t},a.prototype.divide=function(e){var t=o();return this.divRemTo(e,t,null),t},a.prototype.remainder=function(e){var t=o();return this.divRemTo(e,null,t),t},a.prototype.divideAndRemainder=function(e){var t=o(),r=o();return this.divRemTo(e,t,r),new Array(t,r)},a.prototype.modPow=function(e,t){var r,n,i=e.bitLength(),a=d(1);if(i<=0)return a;r=i<18?1:i<48?3:i<144?4:i<768?5:6,n=i<8?new y(t):t.isEven()?new B(t):new g(t);var s=new Array,c=3,u=r-1,f=(1<<r)-1;if(s[1]=n.convert(this),r>1){var h=o();for(n.sqrTo(s[1],h);c<=f;)s[c]=o(),n.mulTo(h,s[c-2],s[c]),c+=2}var l,v,m=e.t-1,b=!0,w=o();for(i=p(e.data[m])-1;m>=0;){for(i>=u?l=e.data[m]>>i-u&f:(l=(e.data[m]&(1<<i+1)-1)<<u-i,m>0&&(l|=e.data[m-1]>>this.DB+i-u)),c=r;0==(1&l);)l>>=1,--c;if((i-=c)<0&&(i+=this.DB,--m),b)s[l].copyTo(a),b=!1;else{for(;c>1;)n.sqrTo(a,w),n.sqrTo(w,a),c-=2;c>0?n.sqrTo(a,w):(v=a,a=w,w=v),n.mulTo(w,s[l],a)}for(;m>=0&&0==(e.data[m]&1<<i);)n.sqrTo(a,w),v=a,a=w,w=v,--i<0&&(i=this.DB-1,--m)}return n.revert(a)},a.prototype.modInverse=function(e){var t=e.isEven();if(this.isEven()&&t||0==e.signum())return a.ZERO;for(var r=e.clone(),n=this.clone(),i=d(1),o=d(0),s=d(0),c=d(1);0!=r.signum();){for(;r.isEven();)r.rShiftTo(1,r),t?(i.isEven()&&o.isEven()||(i.addTo(this,i),o.subTo(e,o)),i.rShiftTo(1,i)):o.isEven()||o.subTo(e,o),o.rShiftTo(1,o);for(;n.isEven();)n.rShiftTo(1,n),t?(s.isEven()&&c.isEven()||(s.addTo(this,s),c.subTo(e,c)),s.rShiftTo(1,s)):c.isEven()||c.subTo(e,c),c.rShiftTo(1,c);r.compareTo(n)>=0?(r.subTo(n,r),t&&i.subTo(s,i),o.subTo(c,o)):(n.subTo(r,n),t&&s.subTo(i,s),c.subTo(o,c))}return 0!=n.compareTo(a.ONE)?a.ZERO:c.compareTo(e)>=0?c.subtract(e):c.signum()<0?(c.addTo(e,c),c.signum()<0?c.add(e):c):c},a.prototype.pow=function(e){return this.exp(e,new S)},a.prototype.gcd=function(e){var t=this.s<0?this.negate():this.clone(),r=e.s<0?e.negate():e.clone();if(t.compareTo(r)<0){var n=t;t=r,r=n}var i=t.getLowestSetBit(),a=r.getLowestSetBit();if(a<0)return t;for(i<a&&(a=i),a>0&&(t.rShiftTo(a,t),r.rShiftTo(a,r));t.signum()>0;)(i=t.getLowestSetBit())>0&&t.rShiftTo(i,t),(i=r.getLowestSetBit())>0&&r.rShiftTo(i,r),t.compareTo(r)>=0?(t.subTo(r,t),t.rShiftTo(1,t)):(r.subTo(t,r),r.rShiftTo(1,r));return a>0&&r.lShiftTo(a,r),r},a.prototype.isProbablePrime=function(e){var t,r=this.abs();if(1==r.t&&r.data[0]<=T[T.length-1]){for(t=0;t<T.length;++t)if(r.data[0]==T[t])return!0;return!1}if(r.isEven())return!1;for(t=1;t<T.length;){for(var n=T[t],i=t+1;i<T.length&&n<I;)n*=T[i++];for(n=r.modInt(n);t<i;)if(n%T[t++]==0)return!1}return r.millerRabin(e)}},49348:(e,t,r)=>{var n=r(91080);r(18736),r(90400),r(26056),e.exports=n.kem=n.kem||{};var i=n.jsbn.BigInteger;function a(e,t,r,i){e.generate=function(e,a){for(var o=new n.util.ByteBuffer,s=Math.ceil(a/i)+r,c=new n.util.ByteBuffer,u=r;u<s;++u){c.putInt32(u),t.start(),t.update(e+c.getBytes());var f=t.digest();o.putBytes(f.getBytes(i))}return o.truncate(o.length()-a),o.getBytes()}}n.kem.rsa={},n.kem.rsa.create=function(e,t){var r=(t=t||{}).prng||n.random;return{encrypt:function(t,a){var o,s=Math.ceil(t.n.bitLength()/8);do{o=new i(n.util.bytesToHex(r.getBytesSync(s)),16).mod(t.n)}while(o.compareTo(i.ONE)<=0);var c=s-(o=n.util.hexToBytes(o.toString(16))).length;return c>0&&(o=n.util.fillString(String.fromCharCode(0),c)+o),{encapsulation:t.encrypt(o,"NONE"),key:e.generate(o,a)}},decrypt:function(t,r,n){var i=t.decrypt(r,"NONE");return e.generate(i,n)}}},n.kem.kdf1=function(e,t){a(this,e,0,t||e.digestLength)},n.kem.kdf2=function(e,t){a(this,e,1,t||e.digestLength)}},21200:(e,t,r)=>{var n=r(91080);r(18736),e.exports=n.log=n.log||{},n.log.levels=["none","error","warning","info","debug","verbose","max"];var i={},a=[],o=null;n.log.LEVEL_LOCKED=2,n.log.NO_LEVEL_CHECK=4,n.log.INTERPOLATE=8;for(var s=0;s<n.log.levels.length;++s){var c=n.log.levels[s];i[c]={index:s,name:c.toUpperCase()}}n.log.logMessage=function(e){for(var t=i[e.level].index,r=0;r<a.length;++r){var o=a[r];o.flags&n.log.NO_LEVEL_CHECK?o.f(e):t<=i[o.level].index&&o.f(o,e)}},n.log.prepareStandard=function(e){"standard"in e||(e.standard=i[e.level].name+" ["+e.category+"] "+e.message)},n.log.prepareFull=function(e){if(!("full"in e)){var t=[e.message];t=t.concat([]||0),e.full=n.util.format.apply(this,t)}},n.log.prepareStandardFull=function(e){"standardFull"in e||(n.log.prepareStandard(e),e.standardFull=e.standard)};var u=["error","warning","info","debug","verbose"];for(s=0;s<u.length;++s)!function(e){n.log[e]=function(t,r){var i=Array.prototype.slice.call(arguments).slice(2),a={timestamp:new Date,level:e,category:t,message:r,arguments:i};n.log.logMessage(a)}}(u[s]);if(n.log.makeLogger=function(e){var t={flags:0,f:e};return n.log.setLevel(t,"none"),t},n.log.setLevel=function(e,t){var r=!1;if(e&&!(e.flags&n.log.LEVEL_LOCKED))for(var i=0;i<n.log.levels.length;++i)if(t==n.log.levels[i]){e.level=t,r=!0;break}return r},n.log.lock=function(e,t){void 0===t||t?e.flags|=n.log.LEVEL_LOCKED:e.flags&=~n.log.LEVEL_LOCKED},n.log.addLogger=function(e){a.push(e)},"undefined"!=typeof console&&"log"in console){var f;if(console.error&&console.warn&&console.info&&console.debug){var h={error:console.error,warning:console.warn,info:console.info,debug:console.debug,verbose:console.debug},l=function(e,t){n.log.prepareStandard(t);var r=h[t.level],i=[t.standard];i=i.concat(t.arguments.slice()),r.apply(console,i)};f=n.log.makeLogger(l)}else l=function(e,t){n.log.prepareStandardFull(t),console.log(t.standardFull)},f=n.log.makeLogger(l);n.log.setLevel(f,"debug"),n.log.addLogger(f),o=f}else console={log:function(){}};if(null!==o&&"undefined"!=typeof window&&window.location){var d=new URL(window.location.href).searchParams;d.has("console.level")&&n.log.setLevel(o,d.get("console.level").slice(-1)[0]),d.has("console.lock")&&"true"==d.get("console.lock").slice(-1)[0]&&n.log.lock(o)}n.log.consoleLogger=o},15416:(e,t,r)=>{e.exports=r(48724),r(79576),r(95668),r(91716),r(74756)},48724:(e,t,r)=>{var n=r(91080);e.exports=n.md=n.md||{},n.md.algorithms=n.md.algorithms||{}},79576:(e,t,r)=>{var n=r(91080);r(48724),r(18736);var i=e.exports=n.md5=n.md5||{};n.md.md5=n.md.algorithms.md5=i,i.create=function(){u||function(){a=String.fromCharCode(128),a+=n.util.fillString(String.fromCharCode(0),64),o=[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],s=[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],c=new Array(64);for(var e=0;e<64;++e)c[e]=Math.floor(4294967296*Math.abs(Math.sin(e+1)));u=!0}();var e=null,t=n.util.createBuffer(),r=new Array(16),i={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){i.messageLength=0,i.fullMessageLength=i.messageLength64=[];for(var r=i.messageLengthSize/4,a=0;a<r;++a)i.fullMessageLength.push(0);return t=n.util.createBuffer(),e={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878},i}};return i.start(),i.update=function(a,o){"utf8"===o&&(a=n.util.encodeUtf8(a));var s=a.length;i.messageLength+=s,s=[s/4294967296>>>0,s>>>0];for(var c=i.fullMessageLength.length-1;c>=0;--c)i.fullMessageLength[c]+=s[1],s[1]=s[0]+(i.fullMessageLength[c]/4294967296>>>0),i.fullMessageLength[c]=i.fullMessageLength[c]>>>0,s[0]=s[1]/4294967296>>>0;return t.putBytes(a),f(e,r,t),(t.read>2048||0===t.length())&&t.compact(),i},i.digest=function(){var o=n.util.createBuffer();o.putBytes(t.bytes());var s=i.fullMessageLength[i.fullMessageLength.length-1]+i.messageLengthSize&i.blockLength-1;o.putBytes(a.substr(0,i.blockLength-s));for(var c,u=0,h=i.fullMessageLength.length-1;h>=0;--h)u=(c=8*i.fullMessageLength[h]+u)/4294967296>>>0,o.putInt32Le(c>>>0);var l={h0:e.h0,h1:e.h1,h2:e.h2,h3:e.h3};f(l,r,o);var d=n.util.createBuffer();return d.putInt32Le(l.h0),d.putInt32Le(l.h1),d.putInt32Le(l.h2),d.putInt32Le(l.h3),d},i};var a=null,o=null,s=null,c=null,u=!1;function f(e,t,r){for(var n,i,a,u,f,h,l,d=r.length();d>=64;){for(i=e.h0,a=e.h1,u=e.h2,f=e.h3,l=0;l<16;++l)t[l]=r.getInt32Le(),n=i+(f^a&(u^f))+c[l]+t[l],i=f,f=u,u=a,a+=n<<(h=s[l])|n>>>32-h;for(;l<32;++l)n=i+(u^f&(a^u))+c[l]+t[o[l]],i=f,f=u,u=a,a+=n<<(h=s[l])|n>>>32-h;for(;l<48;++l)n=i+(a^u^f)+c[l]+t[o[l]],i=f,f=u,u=a,a+=n<<(h=s[l])|n>>>32-h;for(;l<64;++l)n=i+(u^(a|~f))+c[l]+t[o[l]],i=f,f=u,u=a,a+=n<<(h=s[l])|n>>>32-h;e.h0=e.h0+i|0,e.h1=e.h1+a|0,e.h2=e.h2+u|0,e.h3=e.h3+f|0,d-=64}}},54755:(e,t,r)=>{var n=r(91080);r(36620),e.exports=n.mgf=n.mgf||{},n.mgf.mgf1=n.mgf1},36620:(e,t,r)=>{var n=r(91080);r(18736),n.mgf=n.mgf||{},(e.exports=n.mgf.mgf1=n.mgf1=n.mgf1||{}).create=function(e){return{generate:function(t,r){for(var i=new n.util.ByteBuffer,a=Math.ceil(r/e.digestLength),o=0;o<a;o++){var s=new n.util.ByteBuffer;s.putInt32(o),e.start(),e.update(t+s.getBytes()),i.putBuffer(e.digest())}return i.truncate(i.length()-r),i.getBytes()}}}},91752:(e,t,r)=>{var n=r(91080);n.pki=n.pki||{};var i=e.exports=n.pki.oids=n.oids=n.oids||{};function a(e,t){i[e]=t,i[t]=e}function o(e,t){i[e]=t}a("1.2.840.113549.1.1.1","rsaEncryption"),a("1.2.840.113549.1.1.4","md5WithRSAEncryption"),a("1.2.840.113549.1.1.5","sha1WithRSAEncryption"),a("1.2.840.113549.1.1.7","RSAES-OAEP"),a("1.2.840.113549.1.1.8","mgf1"),a("1.2.840.113549.1.1.9","pSpecified"),a("1.2.840.113549.1.1.10","RSASSA-PSS"),a("1.2.840.113549.1.1.11","sha256WithRSAEncryption"),a("1.2.840.113549.1.1.12","sha384WithRSAEncryption"),a("1.2.840.113549.1.1.13","sha512WithRSAEncryption"),a("1.3.101.112","EdDSA25519"),a("1.2.840.10040.4.3","dsa-with-sha1"),a("1.3.14.3.2.7","desCBC"),a("1.3.14.3.2.26","sha1"),a("1.3.14.3.2.29","sha1WithRSASignature"),a("2.16.840.1.101.3.4.2.1","sha256"),a("2.16.840.1.101.3.4.2.2","sha384"),a("2.16.840.1.101.3.4.2.3","sha512"),a("2.16.840.1.101.3.4.2.4","sha224"),a("2.16.840.1.101.3.4.2.5","sha512-224"),a("2.16.840.1.101.3.4.2.6","sha512-256"),a("1.2.840.113549.2.2","md2"),a("1.2.840.113549.2.5","md5"),a("1.2.840.113549.1.7.1","data"),a("1.2.840.113549.1.7.2","signedData"),a("1.2.840.113549.1.7.3","envelopedData"),a("1.2.840.113549.1.7.4","signedAndEnvelopedData"),a("1.2.840.113549.1.7.5","digestedData"),a("1.2.840.113549.1.7.6","encryptedData"),a("1.2.840.113549.1.9.1","emailAddress"),a("1.2.840.113549.1.9.2","unstructuredName"),a("1.2.840.113549.1.9.3","contentType"),a("1.2.840.113549.1.9.4","messageDigest"),a("1.2.840.113549.1.9.5","signingTime"),a("1.2.840.113549.1.9.6","counterSignature"),a("1.2.840.113549.1.9.7","challengePassword"),a("1.2.840.113549.1.9.8","unstructuredAddress"),a("1.2.840.113549.1.9.14","extensionRequest"),a("1.2.840.113549.1.9.20","friendlyName"),a("1.2.840.113549.1.9.21","localKeyId"),a("1.2.840.113549.1.9.22.1","x509Certificate"),a("1.2.840.113549.1.12.10.1.1","keyBag"),a("1.2.840.113549.1.12.10.1.2","pkcs8ShroudedKeyBag"),a("1.2.840.113549.1.12.10.1.3","certBag"),a("1.2.840.113549.1.12.10.1.4","crlBag"),a("1.2.840.113549.1.12.10.1.5","secretBag"),a("1.2.840.113549.1.12.10.1.6","safeContentsBag"),a("1.2.840.113549.1.5.13","pkcs5PBES2"),a("1.2.840.113549.1.5.12","pkcs5PBKDF2"),a("1.2.840.113549.1.12.1.1","pbeWithSHAAnd128BitRC4"),a("1.2.840.113549.1.12.1.2","pbeWithSHAAnd40BitRC4"),a("1.2.840.113549.1.12.1.3","pbeWithSHAAnd3-KeyTripleDES-CBC"),a("1.2.840.113549.1.12.1.4","pbeWithSHAAnd2-KeyTripleDES-CBC"),a("1.2.840.113549.1.12.1.5","pbeWithSHAAnd128BitRC2-CBC"),a("1.2.840.113549.1.12.1.6","pbewithSHAAnd40BitRC2-CBC"),a("1.2.840.113549.2.7","hmacWithSHA1"),a("1.2.840.113549.2.8","hmacWithSHA224"),a("1.2.840.113549.2.9","hmacWithSHA256"),a("1.2.840.113549.2.10","hmacWithSHA384"),a("1.2.840.113549.2.11","hmacWithSHA512"),a("1.2.840.113549.3.7","des-EDE3-CBC"),a("2.16.840.1.101.3.4.1.2","aes128-CBC"),a("2.16.840.1.101.3.4.1.22","aes192-CBC"),a("2.16.840.1.101.3.4.1.42","aes256-CBC"),a("2.5.4.3","commonName"),a("2.5.4.4","surname"),a("2.5.4.5","serialNumber"),a("2.5.4.6","countryName"),a("2.5.4.7","localityName"),a("2.5.4.8","stateOrProvinceName"),a("2.5.4.9","streetAddress"),a("2.5.4.10","organizationName"),a("2.5.4.11","organizationalUnitName"),a("2.5.4.12","title"),a("2.5.4.13","description"),a("2.5.4.15","businessCategory"),a("2.5.4.17","postalCode"),a("2.5.4.42","givenName"),a("1.3.6.1.4.1.311.60.2.1.2","jurisdictionOfIncorporationStateOrProvinceName"),a("1.3.6.1.4.1.311.60.2.1.3","jurisdictionOfIncorporationCountryName"),a("2.16.840.1.113730.1.1","nsCertType"),a("2.16.840.1.113730.1.13","nsComment"),o("2.5.29.1","authorityKeyIdentifier"),o("2.5.29.2","keyAttributes"),o("2.5.29.3","certificatePolicies"),o("2.5.29.4","keyUsageRestriction"),o("2.5.29.5","policyMapping"),o("2.5.29.6","subtreesConstraint"),o("2.5.29.7","subjectAltName"),o("2.5.29.8","issuerAltName"),o("2.5.29.9","subjectDirectoryAttributes"),o("2.5.29.10","basicConstraints"),o("2.5.29.11","nameConstraints"),o("2.5.29.12","policyConstraints"),o("2.5.29.13","basicConstraints"),a("2.5.29.14","subjectKeyIdentifier"),a("2.5.29.15","keyUsage"),o("2.5.29.16","privateKeyUsagePeriod"),a("2.5.29.17","subjectAltName"),a("2.5.29.18","issuerAltName"),a("2.5.29.19","basicConstraints"),o("2.5.29.20","cRLNumber"),o("2.5.29.21","cRLReason"),o("2.5.29.22","expirationDate"),o("2.5.29.23","instructionCode"),o("2.5.29.24","invalidityDate"),o("2.5.29.25","cRLDistributionPoints"),o("2.5.29.26","issuingDistributionPoint"),o("2.5.29.27","deltaCRLIndicator"),o("2.5.29.28","issuingDistributionPoint"),o("2.5.29.29","certificateIssuer"),o("2.5.29.30","nameConstraints"),a("2.5.29.31","cRLDistributionPoints"),a("2.5.29.32","certificatePolicies"),o("2.5.29.33","policyMappings"),o("2.5.29.34","policyConstraints"),a("2.5.29.35","authorityKeyIdentifier"),o("2.5.29.36","policyConstraints"),a("2.5.29.37","extKeyUsage"),o("2.5.29.46","freshestCRL"),o("2.5.29.54","inhibitAnyPolicy"),a("1.3.6.1.4.1.11129.2.4.2","timestampList"),a("1.3.6.1.5.5.7.1.1","authorityInfoAccess"),a("1.3.6.1.5.5.7.3.1","serverAuth"),a("1.3.6.1.5.5.7.3.2","clientAuth"),a("1.3.6.1.5.5.7.3.3","codeSigning"),a("1.3.6.1.5.5.7.3.4","emailProtection"),a("1.3.6.1.5.5.7.3.8","timeStamping")},62467:(e,t,r)=>{var n=r(91080);if(r(6180),r(4e4),r(3044),r(48724),r(91752),r(71256),r(96964),r(90400),r(42196),r(71532),r(18736),void 0===i)var i=n.jsbn.BigInteger;var a=n.asn1,o=n.pki=n.pki||{};e.exports=o.pbe=n.pbe=n.pbe||{};var s=o.oids,c={name:"EncryptedPrivateKeyInfo",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedPrivateKeyInfo.encryptionAlgorithm",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:a.Class.UNIVERSAL,type:a.Type.OID,constructed:!1,capture:"encryptionOid"},{name:"AlgorithmIdentifier.parameters",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,captureAsn1:"encryptionParams"}]},{name:"EncryptedPrivateKeyInfo.encryptedData",tagClass:a.Class.UNIVERSAL,type:a.Type.OCTETSTRING,constructed:!1,capture:"encryptedData"}]},u={name:"PBES2Algorithms",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc.oid",tagClass:a.Class.UNIVERSAL,type:a.Type.OID,constructed:!1,capture:"kdfOid"},{name:"PBES2Algorithms.params",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.params.salt",tagClass:a.Class.UNIVERSAL,type:a.Type.OCTETSTRING,constructed:!1,capture:"kdfSalt"},{name:"PBES2Algorithms.params.iterationCount",tagClass:a.Class.UNIVERSAL,type:a.Type.INTEGER,constructed:!1,capture:"kdfIterationCount"},{name:"PBES2Algorithms.params.keyLength",tagClass:a.Class.UNIVERSAL,type:a.Type.INTEGER,constructed:!1,optional:!0,capture:"keyLength"},{name:"PBES2Algorithms.params.prf",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,optional:!0,value:[{name:"PBES2Algorithms.params.prf.algorithm",tagClass:a.Class.UNIVERSAL,type:a.Type.OID,constructed:!1,capture:"prfOid"}]}]}]},{name:"PBES2Algorithms.encryptionScheme",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.encryptionScheme.oid",tagClass:a.Class.UNIVERSAL,type:a.Type.OID,constructed:!1,capture:"encOid"},{name:"PBES2Algorithms.encryptionScheme.iv",tagClass:a.Class.UNIVERSAL,type:a.Type.OCTETSTRING,constructed:!1,capture:"encIv"}]}]},f={name:"pkcs-12PbeParams",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"pkcs-12PbeParams.salt",tagClass:a.Class.UNIVERSAL,type:a.Type.OCTETSTRING,constructed:!1,capture:"salt"},{name:"pkcs-12PbeParams.iterations",tagClass:a.Class.UNIVERSAL,type:a.Type.INTEGER,constructed:!1,capture:"iterations"}]};function h(e,t){return e.start().update(t).digest().getBytes()}function l(e){var t;if(e){if(!(t=o.oids[a.derToOid(e)])){var r=new Error("Unsupported PRF OID.");throw r.oid=e,r.supported=["hmacWithSHA1","hmacWithSHA224","hmacWithSHA256","hmacWithSHA384","hmacWithSHA512"],r}}else t="hmacWithSHA1";return d(t)}function d(e){var t=n.md;switch(e){case"hmacWithSHA224":t=n.md.sha512;case"hmacWithSHA1":case"hmacWithSHA256":case"hmacWithSHA384":case"hmacWithSHA512":e=e.substr(8).toLowerCase();break;default:var r=new Error("Unsupported PRF algorithm.");throw r.algorithm=e,r.supported=["hmacWithSHA1","hmacWithSHA224","hmacWithSHA256","hmacWithSHA384","hmacWithSHA512"],r}if(!t||!(e in t))throw new Error("Unknown hash algorithm: "+e);return t[e].create()}o.encryptPrivateKeyInfo=function(e,t,r){(r=r||{}).saltSize=r.saltSize||8,r.count=r.count||2048,r.algorithm=r.algorithm||"aes128",r.prfAlgorithm=r.prfAlgorithm||"sha1";var i,c,u,f=n.random.getBytesSync(r.saltSize),h=r.count,l=a.integerToDer(h);if(0===r.algorithm.indexOf("aes")||"des"===r.algorithm){var p,y,g;switch(r.algorithm){case"aes128":i=16,p=16,y=s["aes128-CBC"],g=n.aes.createEncryptionCipher;break;case"aes192":i=24,p=16,y=s["aes192-CBC"],g=n.aes.createEncryptionCipher;break;case"aes256":i=32,p=16,y=s["aes256-CBC"],g=n.aes.createEncryptionCipher;break;case"des":i=8,p=8,y=s.desCBC,g=n.des.createEncryptionCipher;break;default:throw(E=new Error("Cannot encrypt private key. Unknown encryption algorithm.")).algorithm=r.algorithm,E}var v="hmacWith"+r.prfAlgorithm.toUpperCase(),m=d(v),b=n.pkcs5.pbkdf2(t,f,h,i,m),w=n.random.getBytesSync(p);(S=g(b)).start(w),S.update(a.toDer(e)),S.finish(),u=S.output.getBytes();var C=function(e,t,r,i){var s=a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OCTETSTRING,!1,e),a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,t.getBytes())]);return"hmacWithSHA1"!==i&&s.value.push(a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,n.util.hexToBytes(r.toString(16))),a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(o.oids[i]).getBytes()),a.create(a.Class.UNIVERSAL,a.Type.NULL,!1,"")])),s}(f,l,i,v);c=a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(s.pkcs5PBES2).getBytes()),a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(s.pkcs5PBKDF2).getBytes()),C]),a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(y).getBytes()),a.create(a.Class.UNIVERSAL,a.Type.OCTETSTRING,!1,w)])])])}else{var E;if("3des"!==r.algorithm)throw(E=new Error("Cannot encrypt private key. Unknown encryption algorithm.")).algorithm=r.algorithm,E;i=24;var S,A=new n.util.ByteBuffer(f);b=o.pbe.generatePkcs12Key(t,A,1,h,i),w=o.pbe.generatePkcs12Key(t,A,2,h,i),(S=n.des.createEncryptionCipher(b)).start(w),S.update(a.toDer(e)),S.finish(),u=S.output.getBytes(),c=a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(s["pbeWithSHAAnd3-KeyTripleDES-CBC"]).getBytes()),a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OCTETSTRING,!1,f),a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,l.getBytes())])])}return a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[c,a.create(a.Class.UNIVERSAL,a.Type.OCTETSTRING,!1,u)])},o.decryptPrivateKeyInfo=function(e,t){var r=null,i={},s=[];if(!a.validate(e,c,i,s)){var u=new Error("Cannot read encrypted private key. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw u.errors=s,u}var f=a.derToOid(i.encryptionOid),h=o.pbe.getCipher(f,i.encryptionParams,t),l=n.util.createBuffer(i.encryptedData);return h.update(l),h.finish()&&(r=a.fromDer(h.output)),r},o.encryptedPrivateKeyToPem=function(e,t){var r={type:"ENCRYPTED PRIVATE KEY",body:a.toDer(e).getBytes()};return n.pem.encode(r,{maxline:t})},o.encryptedPrivateKeyFromPem=function(e){var t=n.pem.decode(e)[0];if("ENCRYPTED PRIVATE KEY"!==t.type){var r=new Error('Could not convert encrypted private key from PEM; PEM header type is "ENCRYPTED PRIVATE KEY".');throw r.headerType=t.type,r}if(t.procType&&"ENCRYPTED"===t.procType.type)throw new Error("Could not convert encrypted private key from PEM; PEM is encrypted.");return a.fromDer(t.body)},o.encryptRsaPrivateKey=function(e,t,r){if(!(r=r||{}).legacy){var i=o.wrapRsaPrivateKey(o.privateKeyToAsn1(e));return i=o.encryptPrivateKeyInfo(i,t,r),o.encryptedPrivateKeyToPem(i)}var s,c,u,f;switch(r.algorithm){case"aes128":s="AES-128-CBC",u=16,c=n.random.getBytesSync(16),f=n.aes.createEncryptionCipher;break;case"aes192":s="AES-192-CBC",u=24,c=n.random.getBytesSync(16),f=n.aes.createEncryptionCipher;break;case"aes256":s="AES-256-CBC",u=32,c=n.random.getBytesSync(16),f=n.aes.createEncryptionCipher;break;case"3des":s="DES-EDE3-CBC",u=24,c=n.random.getBytesSync(8),f=n.des.createEncryptionCipher;break;case"des":s="DES-CBC",u=8,c=n.random.getBytesSync(8),f=n.des.createEncryptionCipher;break;default:var h=new Error('Could not encrypt RSA private key; unsupported encryption algorithm "'+r.algorithm+'".');throw h.algorithm=r.algorithm,h}var l=f(n.pbe.opensslDeriveBytes(t,c.substr(0,8),u));l.start(c),l.update(a.toDer(o.privateKeyToAsn1(e))),l.finish();var d={type:"RSA PRIVATE KEY",procType:{version:"4",type:"ENCRYPTED"},dekInfo:{algorithm:s,parameters:n.util.bytesToHex(c).toUpperCase()},body:l.output.getBytes()};return n.pem.encode(d)},o.decryptRsaPrivateKey=function(e,t){var r=null,i=n.pem.decode(e)[0];if("ENCRYPTED PRIVATE KEY"!==i.type&&"PRIVATE KEY"!==i.type&&"RSA PRIVATE KEY"!==i.type)throw(u=new Error('Could not convert private key from PEM; PEM header type is not "ENCRYPTED PRIVATE KEY", "PRIVATE KEY", or "RSA PRIVATE KEY".')).headerType=u,u;if(i.procType&&"ENCRYPTED"===i.procType.type){var s,c;switch(i.dekInfo.algorithm){case"DES-CBC":s=8,c=n.des.createDecryptionCipher;break;case"DES-EDE3-CBC":s=24,c=n.des.createDecryptionCipher;break;case"AES-128-CBC":s=16,c=n.aes.createDecryptionCipher;break;case"AES-192-CBC":s=24,c=n.aes.createDecryptionCipher;break;case"AES-256-CBC":s=32,c=n.aes.createDecryptionCipher;break;case"RC2-40-CBC":s=5,c=function(e){return n.rc2.createDecryptionCipher(e,40)};break;case"RC2-64-CBC":s=8,c=function(e){return n.rc2.createDecryptionCipher(e,64)};break;case"RC2-128-CBC":s=16,c=function(e){return n.rc2.createDecryptionCipher(e,128)};break;default:var u;throw(u=new Error('Could not decrypt private key; unsupported encryption algorithm "'+i.dekInfo.algorithm+'".')).algorithm=i.dekInfo.algorithm,u}var f=n.util.hexToBytes(i.dekInfo.parameters),h=c(n.pbe.opensslDeriveBytes(t,f.substr(0,8),s));if(h.start(f),h.update(n.util.createBuffer(i.body)),!h.finish())return r;r=h.output.getBytes()}else r=i.body;return null!==(r="ENCRYPTED PRIVATE KEY"===i.type?o.decryptPrivateKeyInfo(a.fromDer(r),t):a.fromDer(r))&&(r=o.privateKeyFromAsn1(r)),r},o.pbe.generatePkcs12Key=function(e,t,r,i,a,o){var s,c;if(null==o){if(!("sha1"in n.md))throw new Error('"sha1" hash algorithm unavailable.');o=n.md.sha1.create()}var u=o.digestLength,f=o.blockLength,h=new n.util.ByteBuffer,l=new n.util.ByteBuffer;if(null!=e){for(c=0;c<e.length;c++)l.putInt16(e.charCodeAt(c));l.putInt16(0)}var d=l.length(),p=t.length(),y=new n.util.ByteBuffer;y.fillWithByte(r,f);var g=f*Math.ceil(p/f),v=new n.util.ByteBuffer;for(c=0;c<g;c++)v.putByte(t.at(c%p));var m=f*Math.ceil(d/f),b=new n.util.ByteBuffer;for(c=0;c<m;c++)b.putByte(l.at(c%d));var w=v;w.putBuffer(b);for(var C=Math.ceil(a/u),E=1;E<=C;E++){var S=new n.util.ByteBuffer;S.putBytes(y.bytes()),S.putBytes(w.bytes());for(var A=0;A<i;A++)o.start(),o.update(S.getBytes()),S=o.digest();var B=new n.util.ByteBuffer;for(c=0;c<f;c++)B.putByte(S.at(c%u));var T=Math.ceil(p/f)+Math.ceil(d/f),I=new n.util.ByteBuffer;for(s=0;s<T;s++){var k=new n.util.ByteBuffer(w.getBytes(f)),_=511;for(c=B.length()-1;c>=0;c--)_>>=8,_+=B.at(c)+k.at(c),k.setAt(c,255&_);I.putBuffer(k)}w=I,h.putBuffer(S)}return h.truncate(h.length()-a),h},o.pbe.getCipher=function(e,t,r){switch(e){case o.oids.pkcs5PBES2:return o.pbe.getCipherForPBES2(e,t,r);case o.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case o.oids["pbewithSHAAnd40BitRC2-CBC"]:return o.pbe.getCipherForPKCS12PBE(e,t,r);default:var n=new Error("Cannot read encrypted PBE data block. Unsupported OID.");throw n.oid=e,n.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC","pbewithSHAAnd40BitRC2-CBC"],n}},o.pbe.getCipherForPBES2=function(e,t,r){var i,s={},c=[];if(!a.validate(t,u,s,c))throw(i=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.")).errors=c,i;if((e=a.derToOid(s.kdfOid))!==o.oids.pkcs5PBKDF2)throw(i=new Error("Cannot read encrypted private key. Unsupported key derivation function OID.")).oid=e,i.supportedOids=["pkcs5PBKDF2"],i;if((e=a.derToOid(s.encOid))!==o.oids["aes128-CBC"]&&e!==o.oids["aes192-CBC"]&&e!==o.oids["aes256-CBC"]&&e!==o.oids["des-EDE3-CBC"]&&e!==o.oids.desCBC)throw(i=new Error("Cannot read encrypted private key. Unsupported encryption scheme OID.")).oid=e,i.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],i;var f,h,d=s.kdfSalt,p=n.util.createBuffer(s.kdfIterationCount);switch(p=p.getInt(p.length()<<3),o.oids[e]){case"aes128-CBC":f=16,h=n.aes.createDecryptionCipher;break;case"aes192-CBC":f=24,h=n.aes.createDecryptionCipher;break;case"aes256-CBC":f=32,h=n.aes.createDecryptionCipher;break;case"des-EDE3-CBC":f=24,h=n.des.createDecryptionCipher;break;case"desCBC":f=8,h=n.des.createDecryptionCipher}var y=l(s.prfOid),g=n.pkcs5.pbkdf2(r,d,p,f,y),v=s.encIv,m=h(g);return m.start(v),m},o.pbe.getCipherForPKCS12PBE=function(e,t,r){var i={},s=[];if(!a.validate(t,f,i,s))throw(y=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.")).errors=s,y;var c,u,h,d=n.util.createBuffer(i.salt),p=n.util.createBuffer(i.iterations);switch(p=p.getInt(p.length()<<3),e){case o.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:c=24,u=8,h=n.des.startDecrypting;break;case o.oids["pbewithSHAAnd40BitRC2-CBC"]:c=5,u=8,h=function(e,t){var r=n.rc2.createDecryptionCipher(e,40);return r.start(t,null),r};break;default:var y;throw(y=new Error("Cannot read PKCS #12 PBE data block. Unsupported OID.")).oid=e,y}var g=l(i.prfOid),v=o.pbe.generatePkcs12Key(r,d,1,p,c,g);return g.start(),h(v,o.pbe.generatePkcs12Key(r,d,2,p,u,g))},o.pbe.opensslDeriveBytes=function(e,t,r,i){if(null==i){if(!("md5"in n.md))throw new Error('"md5" hash algorithm unavailable.');i=n.md.md5.create()}null===t&&(t="");for(var a=[h(i,e+t)],o=16,s=1;o<r;++s,o+=16)a.push(h(i,a[s-1]+e+t));return a.join("").substr(0,r)}},71256:(e,t,r)=>{var n=r(19024).Buffer,i=r(91080);r(43472),r(48724),r(18736);var a,o=i.pkcs5=i.pkcs5||{};i.util.isNodejs&&!i.options.usePureJavaScript&&(a=r(39116)),e.exports=i.pbkdf2=o.pbkdf2=function(e,t,r,o,s,c){if("function"==typeof s&&(c=s,s=null),i.util.isNodejs&&!i.options.usePureJavaScript&&a.pbkdf2&&(null===s||"object"!=typeof s)&&(a.pbkdf2Sync.length>4||!s||"sha1"===s))return"string"!=typeof s&&(s="sha1"),e=n.from(e,"binary"),t=n.from(t,"binary"),c?4===a.pbkdf2Sync.length?a.pbkdf2(e,t,r,o,(function(e,t){if(e)return c(e);c(null,t.toString("binary"))})):a.pbkdf2(e,t,r,o,s,(function(e,t){if(e)return c(e);c(null,t.toString("binary"))})):4===a.pbkdf2Sync.length?a.pbkdf2Sync(e,t,r,o).toString("binary"):a.pbkdf2Sync(e,t,r,o,s).toString("binary");if(null==s&&(s="sha1"),"string"==typeof s){if(!(s in i.md.algorithms))throw new Error("Unknown hash algorithm: "+s);s=i.md[s].create()}var u=s.digestLength;if(o>4294967295*u){var f=new Error("Derived key is too long.");if(c)return c(f);throw f}var h=Math.ceil(o/u),l=o-(h-1)*u,d=i.hmac.create();d.start(s,e);var p,y,g,v="";if(!c){for(var m=1;m<=h;++m){d.start(null,null),d.update(t),d.update(i.util.int32ToBytes(m)),p=g=d.digest().getBytes();for(var b=2;b<=r;++b)d.start(null,null),d.update(g),y=d.digest().getBytes(),p=i.util.xorBytes(p,y,u),g=y;v+=m<h?p:p.substr(0,l)}return v}function w(){if(m>h)return c(null,v);d.start(null,null),d.update(t),d.update(i.util.int32ToBytes(m)),p=g=d.digest().getBytes(),b=2,C()}function C(){if(b<=r)return d.start(null,null),d.update(g),y=d.digest().getBytes(),p=i.util.xorBytes(p,y,u),g=y,++b,i.util.setImmediate(C);v+=m<h?p:p.substr(0,l),++m,w()}m=1,w()}},96964:(e,t,r)=>{var n=r(91080);r(18736);var i=e.exports=n.pem=n.pem||{};function a(e){for(var t=e.name+": ",r=[],n=function(e,t){return" "+t},i=0;i<e.values.length;++i)r.push(e.values[i].replace(/^(\S+\r\n)/,n));t+=r.join(",")+"\r\n";var a=0,o=-1;for(i=0;i<t.length;++i,++a)if(a>65&&-1!==o){var s=t[o];","===s?(++o,t=t.substr(0,o)+"\r\n "+t.substr(o)):t=t.substr(0,o)+"\r\n"+s+t.substr(o+1),a=i-o-1,o=-1,++i}else" "!==t[i]&&"\t"!==t[i]&&","!==t[i]||(o=i);return t}function o(e){return e.replace(/^\s+/,"")}i.encode=function(e,t){t=t||{};var r,i="-----BEGIN "+e.type+"-----\r\n";if(e.procType&&(i+=a(r={name:"Proc-Type",values:[String(e.procType.version),e.procType.type]})),e.contentDomain&&(i+=a(r={name:"Content-Domain",values:[e.contentDomain]})),e.dekInfo&&(r={name:"DEK-Info",values:[e.dekInfo.algorithm]},e.dekInfo.parameters&&r.values.push(e.dekInfo.parameters),i+=a(r)),e.headers)for(var o=0;o<e.headers.length;++o)i+=a(e.headers[o]);return e.procType&&(i+="\r\n"),(i+=n.util.encode64(e.body,t.maxline||64)+"\r\n")+"-----END "+e.type+"-----\r\n"},i.decode=function(e){for(var t,r=[],i=/\s*-----BEGIN ([A-Z0-9- ]+)-----\r?\n?([\x21-\x7e\s]+?(?:\r?\n\r?\n))?([:A-Za-z0-9+\/=\s]+?)-----END \1-----/g,a=/([\x21-\x7e]+):\s*([\x21-\x7e\s^:]+)/,s=/\r?\n/;t=i.exec(e);){var c=t[1];"NEW CERTIFICATE REQUEST"===c&&(c="CERTIFICATE REQUEST");var u={type:c,procType:null,contentDomain:null,dekInfo:null,headers:[],body:n.util.decode64(t[3])};if(r.push(u),t[2]){for(var f=t[2].split(s),h=0;t&&h<f.length;){for(var l=f[h].replace(/\s+$/,""),d=h+1;d<f.length;++d){var p=f[d];if(!/\s/.test(p[0]))break;l+=p,h=d}if(t=l.match(a)){for(var y={name:t[1],values:[]},g=t[2].split(","),v=0;v<g.length;++v)y.values.push(o(g[v]));if(u.procType)if(u.contentDomain||"Content-Domain"!==y.name)if(u.dekInfo||"DEK-Info"!==y.name)u.headers.push(y);else{if(0===y.values.length)throw new Error('Invalid PEM formatted message. The "DEK-Info" header must have at least one subfield.');u.dekInfo={algorithm:g[0],parameters:g[1]||null}}else u.contentDomain=g[0]||"";else{if("Proc-Type"!==y.name)throw new Error('Invalid PEM formatted message. The first encapsulated header must be "Proc-Type".');if(2!==y.values.length)throw new Error('Invalid PEM formatted message. The "Proc-Type" header must have two subfields.');u.procType={version:g[0],type:g[1]}}}++h}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===r.length)throw new Error("Invalid PEM formatted message.");return r}},29948:(e,t,r)=>{var n=r(91080);r(18736),r(90400),r(95668);var i=e.exports=n.pkcs1=n.pkcs1||{};function a(e,t,r){r||(r=n.md.sha1.create());for(var i="",a=Math.ceil(t/r.digestLength),o=0;o<a;++o){var s=String.fromCharCode(o>>24&255,o>>16&255,o>>8&255,255&o);r.start(),r.update(e+s),i+=r.digest().getBytes()}return i.substring(0,t)}i.encode_rsa_oaep=function(e,t,r){var i,o,s,c;"string"==typeof r?(i=r,o=arguments[3]||void 0,s=arguments[4]||void 0):r&&(i=r.label||void 0,o=r.seed||void 0,s=r.md||void 0,r.mgf1&&r.mgf1.md&&(c=r.mgf1.md)),s?s.start():s=n.md.sha1.create(),c||(c=s);var u=Math.ceil(e.n.bitLength()/8),f=u-2*s.digestLength-2;if(t.length>f)throw(g=new Error("RSAES-OAEP input message length is too long.")).length=t.length,g.maxLength=f,g;i||(i=""),s.update(i,"raw");for(var h=s.digest(),l="",d=f-t.length,p=0;p<d;p++)l+="\0";var y=h.getBytes()+l+""+t;if(o){if(o.length!==s.digestLength){var g;throw(g=new Error("Invalid RSAES-OAEP seed. The seed length must match the digest length.")).seedLength=o.length,g.digestLength=s.digestLength,g}}else o=n.random.getBytes(s.digestLength);var v=a(o,u-s.digestLength-1,c),m=n.util.xorBytes(y,v,y.length),b=a(m,s.digestLength,c);return"\0"+n.util.xorBytes(o,b,o.length)+m},i.decode_rsa_oaep=function(e,t,r){var i,o,s;"string"==typeof r?(i=r,o=arguments[3]||void 0):r&&(i=r.label||void 0,o=r.md||void 0,r.mgf1&&r.mgf1.md&&(s=r.mgf1.md));var c=Math.ceil(e.n.bitLength()/8);if(t.length!==c)throw(v=new Error("RSAES-OAEP encoded message length is invalid.")).length=t.length,v.expectedLength=c,v;if(void 0===o?o=n.md.sha1.create():o.start(),s||(s=o),c<2*o.digestLength+2)throw new Error("RSAES-OAEP key is too short for the hash function.");i||(i=""),o.update(i,"raw");for(var u=o.digest().getBytes(),f=t.charAt(0),h=t.substring(1,o.digestLength+1),l=t.substring(1+o.digestLength),d=a(l,o.digestLength,s),p=a(n.util.xorBytes(h,d,h.length),c-o.digestLength-1,s),y=n.util.xorBytes(l,p,l.length),g=y.substring(0,o.digestLength),v="\0"!==f,m=0;m<o.digestLength;++m)v|=u.charAt(m)!==g.charAt(m);for(var b=1,w=o.digestLength,C=o.digestLength;C<y.length;C++){var E=y.charCodeAt(C);v|=E&(b?65534:0),w+=b&=1&E^1}if(v||1!==y.charCodeAt(w))throw new Error("Invalid RSAES-OAEP padding.");return y.substring(w+1)}},45644:(e,t,r)=>{var n=r(91080);r(4e4),r(43472),r(91752),r(56920),r(62467),r(90400),r(71532),r(95668),r(18736),r(92556);var i=n.asn1,a=n.pki,o=e.exports=n.pkcs12=n.pkcs12||{},s={name:"ContentInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.contentType",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:i.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"content"}]},c={name:"PFX",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"version"},s,{name:"PFX.macData",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"mac",value:[{name:"PFX.macData.mac",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"macAlgorithm"},{name:"PFX.macData.mac.digestAlgorithm.parameters",tagClass:i.Class.UNIVERSAL,captureAsn1:"macAlgorithmParameters"}]},{name:"PFX.macData.mac.digest",tagClass:i.Class.UNIVERSAL,type:i.Type.OCTETSTRING,constructed:!1,capture:"macDigest"}]},{name:"PFX.macData.macSalt",tagClass:i.Class.UNIVERSAL,type:i.Type.OCTETSTRING,constructed:!1,capture:"macSalt"},{name:"PFX.macData.iterations",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,optional:!0,capture:"macIterations"}]}]},u={name:"SafeBag",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"SafeBag.bagId",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"bagId"},{name:"SafeBag.bagValue",tagClass:i.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"bagValue"},{name:"SafeBag.bagAttributes",tagClass:i.Class.UNIVERSAL,type:i.Type.SET,constructed:!0,optional:!0,capture:"bagAttributes"}]},f={name:"Attribute",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"Attribute.attrId",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"oid"},{name:"Attribute.attrValues",tagClass:i.Class.UNIVERSAL,type:i.Type.SET,constructed:!0,capture:"values"}]},h={name:"CertBag",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"CertBag.certId",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"certId"},{name:"CertBag.certValue",tagClass:i.Class.CONTEXT_SPECIFIC,constructed:!0,value:[{name:"CertBag.certValue[0]",tagClass:i.Class.UNIVERSAL,type:i.Class.OCTETSTRING,constructed:!1,capture:"cert"}]}]};function l(e,t,r,n){for(var i=[],a=0;a<e.length;a++)for(var o=0;o<e[a].safeBags.length;o++){var s=e[a].safeBags[o];void 0!==n&&s.type!==n||(null!==t?void 0!==s.attributes[t]&&s.attributes[t].indexOf(r)>=0&&i.push(s):i.push(s))}return i}function d(e){if(e.composed||e.constructed){for(var t=n.util.createBuffer(),r=0;r<e.value.length;++r)t.putBytes(e.value[r].value);e.composed=e.constructed=!1,e.value=t.getBytes()}return e}function p(e,t){var r={},o=[];if(!i.validate(e,n.pkcs7.asn1.encryptedDataValidator,r,o))throw(s=new Error("Cannot read EncryptedContentInfo.")).errors=o,s;var s,c=i.derToOid(r.contentType);if(c!==a.oids.data)throw(s=new Error("PKCS#12 EncryptedContentInfo ContentType is not Data.")).oid=c,s;c=i.derToOid(r.encAlgorithm);var u=a.pbe.getCipher(c,r.encParameter,t),f=d(r.encryptedContentAsn1),h=n.util.createBuffer(f.value);if(u.update(h),!u.finish())throw new Error("Failed to decrypt PKCS#12 SafeContents.");return u.output.getBytes()}function y(e,t,r){if(!t&&0===e.length)return[];if((e=i.fromDer(e,t)).tagClass!==i.Class.UNIVERSAL||e.type!==i.Type.SEQUENCE||!0!==e.constructed)throw new Error("PKCS#12 SafeContents expected to be a SEQUENCE OF SafeBag.");for(var n=[],o=0;o<e.value.length;o++){var s=e.value[o],c={},f=[];if(!i.validate(s,u,c,f))throw(v=new Error("Cannot read SafeBag.")).errors=f,v;var l,d,p={type:i.derToOid(c.bagId),attributes:g(c.bagAttributes)};n.push(p);var y=c.bagValue.value[0];switch(p.type){case a.oids.pkcs8ShroudedKeyBag:if(null===(y=a.decryptPrivateKeyInfo(y,r)))throw new Error("Unable to decrypt PKCS#8 ShroudedKeyBag, wrong password?");case a.oids.keyBag:try{p.key=a.privateKeyFromAsn1(y)}catch(e){p.key=null,p.asn1=y}continue;case a.oids.certBag:l=h,d=function(){if(i.derToOid(c.certId)!==a.oids.x509Certificate){var e=new Error("Unsupported certificate type, only X.509 supported.");throw e.oid=i.derToOid(c.certId),e}var r=i.fromDer(c.cert,t);try{p.cert=a.certificateFromAsn1(r,!0)}catch(e){p.cert=null,p.asn1=r}};break;default:var v;throw(v=new Error("Unsupported PKCS#12 SafeBag type.")).oid=p.type,v}if(void 0!==l&&!i.validate(y,l,c,f))throw(v=new Error("Cannot read PKCS#12 "+l.name)).errors=f,v;d()}return n}function g(e){var t={};if(void 0!==e)for(var r=0;r<e.length;++r){var n={},o=[];if(!i.validate(e[r],f,n,o)){var s=new Error("Cannot read PKCS#12 BagAttribute.");throw s.errors=o,s}var c=i.derToOid(n.oid);if(void 0!==a.oids[c]){t[a.oids[c]]=[];for(var u=0;u<n.values.length;++u)t[a.oids[c]].push(n.values[u].value)}}return t}o.pkcs12FromAsn1=function(e,t,r){"string"==typeof t?(r=t,t=!0):void 0===t&&(t=!0);var u={};if(!i.validate(e,c,u,[]))throw(f=new Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX.")).errors=f,f;var f,h={version:u.version.charCodeAt(0),safeContents:[],getBags:function(e){var t,r={};return"localKeyId"in e?t=e.localKeyId:"localKeyIdHex"in e&&(t=n.util.hexToBytes(e.localKeyIdHex)),void 0===t&&!("friendlyName"in e)&&"bagType"in e&&(r[e.bagType]=l(h.safeContents,null,null,e.bagType)),void 0!==t&&(r.localKeyId=l(h.safeContents,"localKeyId",t,e.bagType)),"friendlyName"in e&&(r.friendlyName=l(h.safeContents,"friendlyName",e.friendlyName,e.bagType)),r},getBagsByFriendlyName:function(e,t){return l(h.safeContents,"friendlyName",e,t)},getBagsByLocalKeyId:function(e,t){return l(h.safeContents,"localKeyId",e,t)}};if(3!==u.version.charCodeAt(0))throw(f=new Error("PKCS#12 PFX of version other than 3 not supported.")).version=u.version.charCodeAt(0),f;if(i.derToOid(u.contentType)!==a.oids.data)throw(f=new Error("Only PKCS#12 PFX in password integrity mode supported.")).oid=i.derToOid(u.contentType),f;var g=u.content.value[0];if(g.tagClass!==i.Class.UNIVERSAL||g.type!==i.Type.OCTETSTRING)throw new Error("PKCS#12 authSafe content data is not an OCTET STRING.");if(g=d(g),u.mac){var v=null,m=0,b=i.derToOid(u.macAlgorithm);switch(b){case a.oids.sha1:v=n.md.sha1.create(),m=20;break;case a.oids.sha256:v=n.md.sha256.create(),m=32;break;case a.oids.sha384:v=n.md.sha384.create(),m=48;break;case a.oids.sha512:v=n.md.sha512.create(),m=64;break;case a.oids.md5:v=n.md.md5.create(),m=16}if(null===v)throw new Error("PKCS#12 uses unsupported MAC algorithm: "+b);var w=new n.util.ByteBuffer(u.macSalt),C="macIterations"in u?parseInt(n.util.bytesToHex(u.macIterations),16):1,E=o.generateKey(r,w,3,C,m,v),S=n.hmac.create();if(S.start(v,E),S.update(g.value),S.getMac().getBytes()!==u.macDigest)throw new Error("PKCS#12 MAC could not be verified. Invalid password?")}return function(e,t,r,n){if((t=i.fromDer(t,r)).tagClass!==i.Class.UNIVERSAL||t.type!==i.Type.SEQUENCE||!0!==t.constructed)throw new Error("PKCS#12 AuthenticatedSafe expected to be a SEQUENCE OF ContentInfo");for(var o=0;o<t.value.length;o++){var c=t.value[o],u={},f=[];if(!i.validate(c,s,u,f))throw(v=new Error("Cannot read ContentInfo.")).errors=f,v;var h={encrypted:!1},l=null,g=u.content.value[0];switch(i.derToOid(u.contentType)){case a.oids.data:if(g.tagClass!==i.Class.UNIVERSAL||g.type!==i.Type.OCTETSTRING)throw new Error("PKCS#12 SafeContents Data is not an OCTET STRING.");l=d(g).value;break;case a.oids.encryptedData:l=p(g,n),h.encrypted=!0;break;default:var v;throw(v=new Error("Unsupported PKCS#12 contentType.")).contentType=i.derToOid(u.contentType),v}h.safeBags=y(l,r,n),e.safeContents.push(h)}}(h,g.value,t,r),h},o.toPkcs12Asn1=function(e,t,r,s){(s=s||{}).saltSize=s.saltSize||8,s.count=s.count||2048,s.algorithm=s.algorithm||s.encAlgorithm||"aes128","useMac"in s||(s.useMac=!0),"localKeyId"in s||(s.localKeyId=null),"generateLocalKeyId"in s||(s.generateLocalKeyId=!0);var c,u=s.localKeyId;if(null!==u)u=n.util.hexToBytes(u);else if(s.generateLocalKeyId)if(t){var f=n.util.isArray(t)?t[0]:t;"string"==typeof f&&(f=a.certificateFromPem(f)),(I=n.md.sha1.create()).update(i.toDer(a.certificateToAsn1(f)).getBytes()),u=I.digest().getBytes()}else u=n.random.getBytes(20);var h=[];null!==u&&h.push(i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(a.oids.localKeyId).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.SET,!0,[i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,u)])])),"friendlyName"in s&&h.push(i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(a.oids.friendlyName).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.SET,!0,[i.create(i.Class.UNIVERSAL,i.Type.BMPSTRING,!1,s.friendlyName)])])),h.length>0&&(c=i.create(i.Class.UNIVERSAL,i.Type.SET,!0,h));var l=[],d=[];null!==t&&(d=n.util.isArray(t)?t:[t]);for(var p=[],y=0;y<d.length;++y){"string"==typeof(t=d[y])&&(t=a.certificateFromPem(t));var g=0===y?c:void 0,v=a.certificateToAsn1(t),m=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(a.oids.certBag).getBytes()),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(a.oids.x509Certificate).getBytes()),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,i.toDer(v).getBytes())])])]),g]);p.push(m)}if(p.length>0){var b=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,p),w=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(a.oids.data).getBytes()),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,i.toDer(b).getBytes())])]);l.push(w)}var C=null;if(null!==e){var E=a.wrapRsaPrivateKey(a.privateKeyToAsn1(e));C=null===r?i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(a.oids.keyBag).getBytes()),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[E]),c]):i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(a.oids.pkcs8ShroudedKeyBag).getBytes()),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[a.encryptPrivateKeyInfo(E,r,s)]),c]);var S=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[C]),A=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(a.oids.data).getBytes()),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,i.toDer(S).getBytes())])]);l.push(A)}var B,T=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,l);if(s.useMac){var I=n.md.sha1.create(),k=new n.util.ByteBuffer(n.random.getBytes(s.saltSize)),_=s.count,R=(e=o.generateKey(r,k,3,_,20),n.hmac.create());R.start(I,e),R.update(i.toDer(T).getBytes());var x=R.getMac();B=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.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(a.oids.sha1).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.NULL,!1,"")]),i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,x.getBytes())]),i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,k.getBytes()),i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,i.integerToDer(_).getBytes())])}return i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,i.integerToDer(3).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(a.oids.data).getBytes()),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,i.toDer(T).getBytes())])]),B])},o.generateKey=n.pbe.generatePkcs12Key},1376:(e,t,r)=>{var n=r(91080);r(6180),r(4e4),r(3044),r(91752),r(96964),r(56920),r(90400),r(18736),r(92556);var i=n.asn1,a=e.exports=n.pkcs7=n.pkcs7||{};function o(e){var t={},r=[];if(!i.validate(e,a.asn1.recipientInfoValidator,t,r)){var o=new Error("Cannot read PKCS#7 RecipientInfo. ASN.1 object is not an PKCS#7 RecipientInfo.");throw o.errors=r,o}return{version:t.version.charCodeAt(0),issuer:n.pki.RDNAttributesAsArray(t.issuer),serialNumber:n.util.createBuffer(t.serial).toHex(),encryptedContent:{algorithm:i.derToOid(t.encAlgorithm),parameter:t.encParameter?t.encParameter.value:void 0,content:t.encKey}}}function s(e){for(var t,r=[],a=0;a<e.length;++a)r.push((t=e[a],i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,i.integerToDer(t.version).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[n.pki.distinguishedNameToAsn1({attributes:t.issuer}),i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,n.util.hexToBytes(t.serialNumber))]),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(t.encryptedContent.algorithm).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.NULL,!1,"")]),i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,t.encryptedContent.content)])));return r}function c(e){var t=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,i.integerToDer(e.version).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[n.pki.distinguishedNameToAsn1({attributes:e.issuer}),i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,n.util.hexToBytes(e.serialNumber))]),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(e.digestAlgorithm).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.NULL,!1,"")])]);if(e.authenticatedAttributesAsn1&&t.value.push(e.authenticatedAttributesAsn1),t.value.push(i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(e.signatureAlgorithm).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.NULL,!1,"")])),t.value.push(i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,e.signature)),e.unauthenticatedAttributes.length>0){for(var r=i.create(i.Class.CONTEXT_SPECIFIC,1,!0,[]),a=0;a<e.unauthenticatedAttributes.length;++a){var o=e.unauthenticatedAttributes[a];r.values.push(u(o))}t.value.push(r)}return t}function u(e){var t;if(e.type===n.pki.oids.contentType)t=i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(e.value).getBytes());else if(e.type===n.pki.oids.messageDigest)t=i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,e.value.bytes());else if(e.type===n.pki.oids.signingTime){var r=new Date("1950-01-01T00:00:00Z"),a=new Date("2050-01-01T00:00:00Z"),o=e.value;if("string"==typeof o){var s=Date.parse(o);o=isNaN(s)?13===o.length?i.utcTimeToDate(o):i.generalizedTimeToDate(o):new Date(s)}t=o>=r&&o<a?i.create(i.Class.UNIVERSAL,i.Type.UTCTIME,!1,i.dateToUtcTime(o)):i.create(i.Class.UNIVERSAL,i.Type.GENERALIZEDTIME,!1,i.dateToGeneralizedTime(o))}return i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(e.type).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.SET,!0,[t])])}function f(e,t,r){var a={};if(!i.validate(t,r,a,[])){var o=new Error("Cannot read PKCS#7 message. ASN.1 object is not a supported PKCS#7 message.");throw o.errors=o,o}if(i.derToOid(a.contentType)!==n.pki.oids.data)throw new Error("Unsupported PKCS#7 message. Only wrapped ContentType Data supported.");if(a.encryptedContent){var s="";if(n.util.isArray(a.encryptedContent))for(var c=0;c<a.encryptedContent.length;++c){if(a.encryptedContent[c].type!==i.Type.OCTETSTRING)throw new Error("Malformed PKCS#7 message, expecting encrypted content constructed of only OCTET STRING objects.");s+=a.encryptedContent[c].value}else s=a.encryptedContent;e.encryptedContent={algorithm:i.derToOid(a.encAlgorithm),parameter:n.util.createBuffer(a.encParameter.value),content:n.util.createBuffer(s)}}if(a.content){if(s="",n.util.isArray(a.content))for(c=0;c<a.content.length;++c){if(a.content[c].type!==i.Type.OCTETSTRING)throw new Error("Malformed PKCS#7 message, expecting content constructed of only OCTET STRING objects.");s+=a.content[c].value}else s=a.content;e.content=n.util.createBuffer(s)}return e.version=a.version.charCodeAt(0),e.rawCapture=a,a}function h(e){if(void 0===e.encryptedContent.key)throw new Error("Symmetric key not available.");if(void 0===e.content){var t;switch(e.encryptedContent.algorithm){case n.pki.oids["aes128-CBC"]:case n.pki.oids["aes192-CBC"]:case n.pki.oids["aes256-CBC"]:t=n.aes.createDecryptionCipher(e.encryptedContent.key);break;case n.pki.oids.desCBC:case n.pki.oids["des-EDE3-CBC"]:t=n.des.createDecryptionCipher(e.encryptedContent.key);break;default:throw new Error("Unsupported symmetric cipher, OID "+e.encryptedContent.algorithm)}if(t.start(e.encryptedContent.parameter),t.update(e.encryptedContent.content),!t.finish())throw new Error("Symmetric decryption failed.");e.content=t.output}}a.messageFromPem=function(e){var t=n.pem.decode(e)[0];if("PKCS7"!==t.type){var r=new Error('Could not convert PKCS#7 message from PEM; PEM header type is not "PKCS#7".');throw r.headerType=t.type,r}if(t.procType&&"ENCRYPTED"===t.procType.type)throw new Error("Could not convert PKCS#7 message from PEM; PEM is encrypted.");var o=i.fromDer(t.body);return a.messageFromAsn1(o)},a.messageToPem=function(e,t){var r={type:"PKCS7",body:i.toDer(e.toAsn1()).getBytes()};return n.pem.encode(r,{maxline:t})},a.messageFromAsn1=function(e){var t={},r=[];if(!i.validate(e,a.asn1.contentInfoValidator,t,r)){var o=new Error("Cannot read PKCS#7 message. ASN.1 object is not an PKCS#7 ContentInfo.");throw o.errors=r,o}var s,c=i.derToOid(t.contentType);switch(c){case n.pki.oids.envelopedData:s=a.createEnvelopedData();break;case n.pki.oids.encryptedData:s=a.createEncryptedData();break;case n.pki.oids.signedData:s=a.createSignedData();break;default:throw new Error("Cannot read PKCS#7 message. ContentType with OID "+c+" is not (yet) supported.")}return s.fromAsn1(t.content.value[0]),s},a.createSignedData=function(){var e=null;return e={type:n.pki.oids.signedData,version:1,certificates:[],crls:[],signers:[],digestAlgorithmIdentifiers:[],contentInfo:null,signerInfos:[],fromAsn1:function(t){if(f(e,t,a.asn1.signedDataValidator),e.certificates=[],e.crls=[],e.digestAlgorithmIdentifiers=[],e.contentInfo=null,e.signerInfos=[],e.rawCapture.certificates)for(var r=e.rawCapture.certificates.value,i=0;i<r.length;++i)e.certificates.push(n.pki.certificateFromAsn1(r[i]))},toAsn1:function(){e.contentInfo||e.sign();for(var t=[],r=0;r<e.certificates.length;++r)t.push(n.pki.certificateToAsn1(e.certificates[r]));var a=[],o=i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,i.integerToDer(e.version).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.SET,!0,e.digestAlgorithmIdentifiers),e.contentInfo])]);return t.length>0&&o.value[0].value.push(i.create(i.Class.CONTEXT_SPECIFIC,0,!0,t)),a.length>0&&o.value[0].value.push(i.create(i.Class.CONTEXT_SPECIFIC,1,!0,a)),o.value[0].value.push(i.create(i.Class.UNIVERSAL,i.Type.SET,!0,e.signerInfos)),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(e.type).getBytes()),o])},addSigner:function(t){var r=t.issuer,i=t.serialNumber;if(t.certificate){var a=t.certificate;"string"==typeof a&&(a=n.pki.certificateFromPem(a)),r=a.issuer.attributes,i=a.serialNumber}var o=t.key;if(!o)throw new Error("Could not add PKCS#7 signer; no private key specified.");"string"==typeof o&&(o=n.pki.privateKeyFromPem(o));var s=t.digestAlgorithm||n.pki.oids.sha1;switch(s){case n.pki.oids.sha1:case n.pki.oids.sha256:case n.pki.oids.sha384:case n.pki.oids.sha512:case n.pki.oids.md5:break;default:throw new Error("Could not add PKCS#7 signer; unknown message digest algorithm: "+s)}var c=t.authenticatedAttributes||[];if(c.length>0){for(var u=!1,f=!1,h=0;h<c.length;++h){var l=c[h];if(u||l.type!==n.pki.oids.contentType){if(f||l.type!==n.pki.oids.messageDigest);else if(f=!0,u)break}else if(u=!0,f)break}if(!u||!f)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.")}e.signers.push({key:o,version:1,issuer:r,serialNumber:i,digestAlgorithm:s,signatureAlgorithm:n.pki.oids.rsaEncryption,signature:null,authenticatedAttributes:c,unauthenticatedAttributes:[]})},sign:function(t){var r;t=t||{},("object"!=typeof e.content||null===e.contentInfo)&&(e.contentInfo=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(n.pki.oids.data).getBytes())]),"content"in e&&(e.content instanceof n.util.ByteBuffer?r=e.content.bytes():"string"==typeof e.content&&(r=n.util.encodeUtf8(e.content)),t.detached?e.detachedContent=i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,r):e.contentInfo.value.push(i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,r)])))),0!==e.signers.length&&function(t){var r;if(!(r=e.detachedContent?e.detachedContent:(r=e.contentInfo.value[1]).value[0]))throw new Error("Could not sign PKCS#7 message; there is no content to sign.");var a=i.derToOid(e.contentInfo.value[0].value),o=i.toDer(r);for(var s in o.getByte(),i.getBerValueLength(o),o=o.getBytes(),t)t[s].start().update(o);for(var f=new Date,h=0;h<e.signers.length;++h){var l=e.signers[h];if(0===l.authenticatedAttributes.length){if(a!==n.pki.oids.data)throw new Error("Invalid signer; authenticatedAttributes must be present when the ContentInfo content type is not PKCS#7 Data.")}else{l.authenticatedAttributesAsn1=i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[]);for(var d=i.create(i.Class.UNIVERSAL,i.Type.SET,!0,[]),p=0;p<l.authenticatedAttributes.length;++p){var y=l.authenticatedAttributes[p];y.type===n.pki.oids.messageDigest?y.value=t[l.digestAlgorithm].digest():y.type===n.pki.oids.signingTime&&(y.value||(y.value=f)),d.value.push(u(y)),l.authenticatedAttributesAsn1.value.push(u(y))}o=i.toDer(d).getBytes(),l.md.start().update(o)}l.signature=l.key.sign(l.md,"RSASSA-PKCS1-V1_5")}e.signerInfos=function(e){for(var t=[],r=0;r<e.length;++r)t.push(c(e[r]));return t}(e.signers)}(function(){for(var t={},r=0;r<e.signers.length;++r){var a=e.signers[r];(o=a.digestAlgorithm)in t||(t[o]=n.md[n.pki.oids[o]].create()),0===a.authenticatedAttributes.length?a.md=t[o]:a.md=n.md[n.pki.oids[o]].create()}for(var o in e.digestAlgorithmIdentifiers=[],t)e.digestAlgorithmIdentifiers.push(i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(o).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.NULL,!1,"")]));return t}())},verify:function(){throw new Error("PKCS#7 signature verification not yet implemented.")},addCertificate:function(t){"string"==typeof t&&(t=n.pki.certificateFromPem(t)),e.certificates.push(t)},addCertificateRevokationList:function(e){throw new Error("PKCS#7 CRL support not yet implemented.")}}},a.createEncryptedData=function(){var e=null;return e={type:n.pki.oids.encryptedData,version:0,encryptedContent:{algorithm:n.pki.oids["aes256-CBC"]},fromAsn1:function(t){f(e,t,a.asn1.encryptedDataValidator)},decrypt:function(t){void 0!==t&&(e.encryptedContent.key=t),h(e)}}},a.createEnvelopedData=function(){var e=null;return e={type:n.pki.oids.envelopedData,version:0,recipients:[],encryptedContent:{algorithm:n.pki.oids["aes256-CBC"]},fromAsn1:function(t){var r=f(e,t,a.asn1.envelopedDataValidator);e.recipients=function(e){for(var t=[],r=0;r<e.length;++r)t.push(o(e[r]));return t}(r.recipientInfos.value)},toAsn1:function(){return i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(e.type).getBytes()),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,i.integerToDer(e.version).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.SET,!0,s(e.recipients)),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,(t=e.encryptedContent,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(n.pki.oids.data).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(t.algorithm).getBytes()),t.parameter?i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,t.parameter.getBytes()):void 0]),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,t.content.getBytes())])]))])])]);var t},findRecipient:function(t){for(var r=t.issuer.attributes,n=0;n<e.recipients.length;++n){var i=e.recipients[n],a=i.issuer;if(i.serialNumber===t.serialNumber&&a.length===r.length){for(var o=!0,s=0;s<r.length;++s)if(a[s].type!==r[s].type||a[s].value!==r[s].value){o=!1;break}if(o)return i}}return null},decrypt:function(t,r){if(void 0===e.encryptedContent.key&&void 0!==t&&void 0!==r)switch(t.encryptedContent.algorithm){case n.pki.oids.rsaEncryption:case n.pki.oids.desCBC:var i=r.decrypt(t.encryptedContent.content);e.encryptedContent.key=n.util.createBuffer(i);break;default:throw new Error("Unsupported asymmetric cipher, OID "+t.encryptedContent.algorithm)}h(e)},addRecipient:function(t){e.recipients.push({version:0,issuer:t.issuer.attributes,serialNumber:t.serialNumber,encryptedContent:{algorithm:n.pki.oids.rsaEncryption,key:t.publicKey}})},encrypt:function(t,r){if(void 0===e.encryptedContent.content){var i,a,o;switch(r=r||e.encryptedContent.algorithm,t=t||e.encryptedContent.key,r){case n.pki.oids["aes128-CBC"]:i=16,a=16,o=n.aes.createEncryptionCipher;break;case n.pki.oids["aes192-CBC"]:i=24,a=16,o=n.aes.createEncryptionCipher;break;case n.pki.oids["aes256-CBC"]:i=32,a=16,o=n.aes.createEncryptionCipher;break;case n.pki.oids["des-EDE3-CBC"]:i=24,a=8,o=n.des.createEncryptionCipher;break;default:throw new Error("Unsupported symmetric cipher, OID "+r)}if(void 0===t)t=n.util.createBuffer(n.random.getBytes(i));else if(t.length()!=i)throw new Error("Symmetric key has wrong length; got "+t.length()+" bytes, expected "+i+".");e.encryptedContent.algorithm=r,e.encryptedContent.key=t,e.encryptedContent.parameter=n.util.createBuffer(n.random.getBytes(a));var s=o(t);if(s.start(e.encryptedContent.parameter.copy()),s.update(e.content),!s.finish())throw new Error("Symmetric encryption failed.");e.encryptedContent.content=s.output}for(var c=0;c<e.recipients.length;++c){var u=e.recipients[c];if(void 0===u.encryptedContent.content){if(u.encryptedContent.algorithm!==n.pki.oids.rsaEncryption)throw new Error("Unsupported asymmetric cipher, OID "+u.encryptedContent.algorithm);u.encryptedContent.content=u.encryptedContent.key.encrypt(e.encryptedContent.key.data)}}}}}},56920:(e,t,r)=>{var n=r(91080);r(4e4),r(18736);var i=n.asn1,a=e.exports=n.pkcs7asn1=n.pkcs7asn1||{};n.pkcs7=n.pkcs7||{},n.pkcs7.asn1=a;var o={name:"ContentInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.ContentType",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,captureAsn1:"content"}]};a.contentInfoValidator=o;var s={name:"EncryptedContentInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentType",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"contentType"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentEncryptionAlgorithm.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm.parameter",tagClass:i.Class.UNIVERSAL,captureAsn1:"encParameter"}]},{name:"EncryptedContentInfo.encryptedContent",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,capture:"encryptedContent",captureAsn1:"encryptedContentAsn1"}]};a.envelopedDataValidator={name:"EnvelopedData",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"EnvelopedData.Version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"version"},{name:"EnvelopedData.RecipientInfos",tagClass:i.Class.UNIVERSAL,type:i.Type.SET,constructed:!0,captureAsn1:"recipientInfos"}].concat(s)},a.encryptedDataValidator={name:"EncryptedData",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedData.Version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"version"}].concat(s)};var c={name:"SignerInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1},{name:"SignerInfo.issuerAndSerialNumber",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.issuerAndSerialNumber.issuer",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"SignerInfo.issuerAndSerialNumber.serialNumber",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"SignerInfo.digestAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.digestAlgorithm.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"digestAlgorithm"},{name:"SignerInfo.digestAlgorithm.parameter",tagClass:i.Class.UNIVERSAL,constructed:!1,captureAsn1:"digestParameter",optional:!0}]},{name:"SignerInfo.authenticatedAttributes",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"authenticatedAttributes"},{name:"SignerInfo.digestEncryptionAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,capture:"signatureAlgorithm"},{name:"SignerInfo.encryptedDigest",tagClass:i.Class.UNIVERSAL,type:i.Type.OCTETSTRING,constructed:!1,capture:"signature"},{name:"SignerInfo.unauthenticatedAttributes",tagClass:i.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,capture:"unauthenticatedAttributes"}]};a.signedDataValidator={name:"SignedData",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"SignedData.Version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"version"},{name:"SignedData.DigestAlgorithms",tagClass:i.Class.UNIVERSAL,type:i.Type.SET,constructed:!0,captureAsn1:"digestAlgorithms"},o,{name:"SignedData.Certificates",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,optional:!0,captureAsn1:"certificates"},{name:"SignedData.CertificateRevocationLists",tagClass:i.Class.CONTEXT_SPECIFIC,type:1,optional:!0,captureAsn1:"crls"},{name:"SignedData.SignerInfos",tagClass:i.Class.UNIVERSAL,type:i.Type.SET,capture:"signerInfos",optional:!0,value:[c]}]},a.recipientInfoValidator={name:"RecipientInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"version"},{name:"RecipientInfo.issuerAndSerial",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.issuerAndSerial.issuer",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"RecipientInfo.issuerAndSerial.serialNumber",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"RecipientInfo.keyEncryptionAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.keyEncryptionAlgorithm.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"RecipientInfo.keyEncryptionAlgorithm.parameter",tagClass:i.Class.UNIVERSAL,constructed:!1,captureAsn1:"encParameter",optional:!0}]},{name:"RecipientInfo.encryptedKey",tagClass:i.Class.UNIVERSAL,type:i.Type.OCTETSTRING,constructed:!1,capture:"encKey"}]}},75300:(e,t,r)=>{var n=r(91080);r(4e4),r(91752),r(62467),r(96964),r(71256),r(45644),r(4124),r(71532),r(18736),r(92556);var i=n.asn1,a=e.exports=n.pki=n.pki||{};a.pemToDer=function(e){var t=n.pem.decode(e)[0];if(t.procType&&"ENCRYPTED"===t.procType.type)throw new Error("Could not convert PEM to DER; PEM is encrypted.");return n.util.createBuffer(t.body)},a.privateKeyFromPem=function(e){var t=n.pem.decode(e)[0];if("PRIVATE KEY"!==t.type&&"RSA PRIVATE KEY"!==t.type){var r=new Error('Could not convert private key from PEM; PEM header type is not "PRIVATE KEY" or "RSA PRIVATE KEY".');throw r.headerType=t.type,r}if(t.procType&&"ENCRYPTED"===t.procType.type)throw new Error("Could not convert private key from PEM; PEM is encrypted.");var o=i.fromDer(t.body);return a.privateKeyFromAsn1(o)},a.privateKeyToPem=function(e,t){var r={type:"RSA PRIVATE KEY",body:i.toDer(a.privateKeyToAsn1(e)).getBytes()};return n.pem.encode(r,{maxline:t})},a.privateKeyInfoToPem=function(e,t){var r={type:"PRIVATE KEY",body:i.toDer(e).getBytes()};return n.pem.encode(r,{maxline:t})}},88200:(e,t,r)=>{var n=r(91080);r(18736),r(26056),r(90400),function(){if(n.prime)e.exports=n.prime;else{var t=e.exports=n.prime=n.prime||{},r=n.jsbn.BigInteger,i=[6,4,2,4,2,4,6,2],a=new r(null);a.fromInt(30);var o=function(e,t){return e|t};t.generateProbablePrime=function(e,t,i){"function"==typeof t&&(i=t,t={});var a=(t=t||{}).algorithm||"PRIMEINC";"string"==typeof a&&(a={name:a}),a.options=a.options||{};var o=t.prng||n.random,c={nextBytes:function(e){for(var t=o.getBytesSync(e.length),r=0;r<e.length;++r)e[r]=t.charCodeAt(r)}};if("PRIMEINC"===a.name)return function(e,t,i,a){return"workers"in i?function(e,t,i,a){if("undefined"==typeof Worker)return s(e,t,i,a);var o=u(e,t),c=i.workers,f=i.workLoad||100,h=30*f/8,l=i.workerScript||"forge/prime.worker.js";if(-1===c)return n.util.estimateCores((function(e,t){e&&(t=2),c=t-1,d()}));function d(){c=Math.max(1,c);for(var n=[],i=0;i<c;++i)n[i]=new Worker(l);for(i=0;i<c;++i)n[i].addEventListener("message",d);var s=!1;function d(i){if(!s){var c=i.data;if(c.found){for(var l=0;l<n.length;++l)n[l].terminate();return s=!0,a(null,new r(c.prime,16))}o.bitLength()>e&&(o=u(e,t));var d=o.toString(16);i.target.postMessage({hex:d,workLoad:f}),o.dAddOffset(h,0)}}}d()}(e,t,i,a):s(e,t,i,a)}(e,c,a.options,i);throw new Error("Invalid prime generation algorithm: "+a.name)}}function s(e,t,r,n){var i=u(e,t),a=function(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}(i.bitLength());"millerRabinTests"in r&&(a=r.millerRabinTests);var o=10;"maxBlockTime"in r&&(o=r.maxBlockTime),c(i,e,t,0,a,o,n)}function c(e,t,r,a,o,s,f){var h=+new Date;do{if(e.bitLength()>t&&(e=u(t,r)),e.isProbablePrime(o))return f(null,e);e.dAddOffset(i[a++%8],0)}while(s<0||+new Date-h<s);n.util.setImmediate((function(){c(e,t,r,a,o,s,f)}))}function u(e,t){var n=new r(e,t),i=e-1;return n.testBit(i)||n.bitwiseTo(r.ONE.shiftLeft(i),o,n),n.dAddOffset(31-n.mod(a).byteValue(),0),n}}()},80408:(e,t,r)=>{var n=r(80628),i=r(91080);r(18736);var a=null;!i.util.isNodejs||i.options.usePureJavaScript||n.versions["node-webkit"]||(a=r(39116)),(e.exports=i.prng=i.prng||{}).create=function(e){for(var t={plugin:e,key:null,seed:null,time:null,reseeds:0,generated:0,keyBytes:""},r=e.md,n=new Array(32),o=0;o<32;++o)n[o]=r.create();function s(){if(t.pools[0].messageLength>=32)return c();var e=32-t.pools[0].messageLength<<5;t.collect(t.seedFileSync(e)),c()}function c(){t.reseeds=4294967295===t.reseeds?0:t.reseeds+1;var e=t.plugin.md.create();e.update(t.keyBytes);for(var r=1,n=0;n<32;++n)t.reseeds%r==0&&(e.update(t.pools[n].digest().getBytes()),t.pools[n].start()),r<<=1;t.keyBytes=e.digest().getBytes(),e.start(),e.update(t.keyBytes);var i=e.digest().getBytes();t.key=t.plugin.formatKey(t.keyBytes),t.seed=t.plugin.formatSeed(i),t.generated=0}function u(e){var t=null,r=i.util.globalScope,n=r.crypto||r.msCrypto;n&&n.getRandomValues&&(t=function(e){return n.getRandomValues(e)});var a=i.util.createBuffer();if(t)for(;a.length()<e;){var o=Math.max(1,Math.min(e-a.length(),65536)/4),s=new Uint32Array(Math.floor(o));try{t(s);for(var c=0;c<s.length;++c)a.putInt32(s[c])}catch(e){if(!("undefined"!=typeof QuotaExceededError&&e instanceof QuotaExceededError))throw e}}if(a.length()<e)for(var u,f,h,l=Math.floor(65536*Math.random());a.length()<e;)for(f=16807*(65535&l),f+=(32767&(u=16807*(l>>16)))<<16,l=4294967295&(f=(2147483647&(f+=u>>15))+(f>>31)),c=0;c<3;++c)h=l>>>(c<<3),h^=Math.floor(256*Math.random()),a.putByte(255&h);return a.getBytes(e)}return t.pools=n,t.pool=0,t.generate=function(e,r){if(!r)return t.generateSync(e);var n=t.plugin.cipher,a=t.plugin.increment,o=t.plugin.formatKey,s=t.plugin.formatSeed,u=i.util.createBuffer();t.key=null,function f(h){if(h)return r(h);if(u.length()>=e)return r(null,u.getBytes(e));if(t.generated>1048575&&(t.key=null),null===t.key)return i.util.nextTick((function(){!function(e){if(t.pools[0].messageLength>=32)return c(),e();var r=32-t.pools[0].messageLength<<5;t.seedFile(r,(function(r,n){if(r)return e(r);t.collect(n),c(),e()}))}(f)}));var l=n(t.key,t.seed);t.generated+=l.length,u.putBytes(l),t.key=o(n(t.key,a(t.seed))),t.seed=s(n(t.key,t.seed)),i.util.setImmediate(f)}()},t.generateSync=function(e){var r=t.plugin.cipher,n=t.plugin.increment,a=t.plugin.formatKey,o=t.plugin.formatSeed;t.key=null;for(var c=i.util.createBuffer();c.length()<e;){t.generated>1048575&&(t.key=null),null===t.key&&s();var u=r(t.key,t.seed);t.generated+=u.length,c.putBytes(u),t.key=a(r(t.key,n(t.seed))),t.seed=o(r(t.key,t.seed))}return c.getBytes(e)},a?(t.seedFile=function(e,t){a.randomBytes(e,(function(e,r){if(e)return t(e);t(null,r.toString())}))},t.seedFileSync=function(e){return a.randomBytes(e).toString()}):(t.seedFile=function(e,t){try{t(null,u(e))}catch(e){t(e)}},t.seedFileSync=u),t.collect=function(e){for(var r=e.length,n=0;n<r;++n)t.pools[t.pool].update(e.substr(n,1)),t.pool=31===t.pool?0:t.pool+1},t.collectInt=function(e,r){for(var n="",i=0;i<r;i+=8)n+=String.fromCharCode(e>>i&255);t.collect(n)},t.registerWorker=function(e){e===self?t.seedFile=function(e,t){self.addEventListener("message",(function e(r){var n=r.data;n.forge&&n.forge.prng&&(self.removeEventListener("message",e),t(n.forge.prng.err,n.forge.prng.bytes))})),self.postMessage({forge:{prng:{needed:e}}})}:e.addEventListener("message",(function(r){var n=r.data;n.forge&&n.forge.prng&&t.seedFile(n.forge.prng.needed,(function(t,r){e.postMessage({forge:{prng:{err:t,bytes:r}}})}))}))},t}},4124:(e,t,r)=>{var n=r(91080);r(90400),r(18736),(e.exports=n.pss=n.pss||{}).create=function(e){3===arguments.length&&(e={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var t,r=e.md,i=e.mgf,a=r.digestLength,o=e.salt||null;if("string"==typeof o&&(o=n.util.createBuffer(o)),"saltLength"in e)t=e.saltLength;else{if(null===o)throw new Error("Salt length not specified or specific salt not given.");t=o.length()}if(null!==o&&o.length()!==t)throw new Error("Given salt length does not match length of given salt.");var s=e.prng||n.random;return{encode:function(e,c){var u,f,h=c-1,l=Math.ceil(h/8),d=e.digest().getBytes();if(l<a+t+2)throw new Error("Message is too long to encrypt.");f=null===o?s.getBytesSync(t):o.bytes();var p=new n.util.ByteBuffer;p.fillWithByte(0,8),p.putBytes(d),p.putBytes(f),r.start(),r.update(p.getBytes());var y=r.digest().getBytes(),g=new n.util.ByteBuffer;g.fillWithByte(0,l-t-a-2),g.putByte(1),g.putBytes(f);var v=g.getBytes(),m=l-a-1,b=i.generate(y,m),w="";for(u=0;u<m;u++)w+=String.fromCharCode(v.charCodeAt(u)^b.charCodeAt(u));var C=65280>>8*l-h&255;return(w=String.fromCharCode(w.charCodeAt(0)&~C)+w.substr(1))+y+String.fromCharCode(188)},verify:function(e,o,s){var c,u=s-1,f=Math.ceil(u/8);if(o=o.substr(-f),f<a+t+2)throw new Error("Inconsistent parameters to PSS signature verification.");if(188!==o.charCodeAt(f-1))throw new Error("Encoded message does not end in 0xBC.");var h=f-a-1,l=o.substr(0,h),d=o.substr(h,a),p=65280>>8*f-u&255;if(0!=(l.charCodeAt(0)&p))throw new Error("Bits beyond keysize not zero as expected.");var y=i.generate(d,h),g="";for(c=0;c<h;c++)g+=String.fromCharCode(l.charCodeAt(c)^y.charCodeAt(c));g=String.fromCharCode(g.charCodeAt(0)&~p)+g.substr(1);var v=f-a-t-2;for(c=0;c<v;c++)if(0!==g.charCodeAt(c))throw new Error("Leftmost octets not zero as expected");if(1!==g.charCodeAt(v))throw new Error("Inconsistent PSS signature, 0x01 marker not found");var m=g.substr(-t),b=new n.util.ByteBuffer;return b.fillWithByte(0,8),b.putBytes(e),b.putBytes(m),r.start(),r.update(b.getBytes()),d===r.digest().getBytes()}}}},90400:(e,t,r)=>{var n=r(91080);r(6180),r(91716),r(80408),r(18736),n.random&&n.random.getBytes?e.exports=n.random:function(t){var r={},i=new Array(4),a=n.util.createBuffer();function o(){var e=n.prng.create(r);return e.getBytes=function(t,r){return e.generate(t,r)},e.getBytesSync=function(t){return e.generate(t)},e}r.formatKey=function(e){var t=n.util.createBuffer(e);return(e=new Array(4))[0]=t.getInt32(),e[1]=t.getInt32(),e[2]=t.getInt32(),e[3]=t.getInt32(),n.aes._expandKey(e,!1)},r.formatSeed=function(e){var t=n.util.createBuffer(e);return(e=new Array(4))[0]=t.getInt32(),e[1]=t.getInt32(),e[2]=t.getInt32(),e[3]=t.getInt32(),e},r.cipher=function(e,t){return n.aes._updateBlock(e,t,i,!1),a.putInt32(i[0]),a.putInt32(i[1]),a.putInt32(i[2]),a.putInt32(i[3]),a.getBytes()},r.increment=function(e){return++e[3],e},r.md=n.md.sha256;var s=o(),c=null,u=n.util.globalScope,f=u.crypto||u.msCrypto;if(f&&f.getRandomValues&&(c=function(e){return f.getRandomValues(e)}),(n.options.usePureJavaScript||!n.util.isNodejs&&!c)&&("undefined"==typeof window||window.document,s.collectInt(+new Date,32),"undefined"!=typeof navigator)){var h="";for(var l in navigator)try{"string"==typeof navigator[l]&&(h+=navigator[l])}catch(e){}s.collect(h),h=null}if(n.random)for(var l in s)n.random[l]=s[l];else n.random=s;n.random.createInstance=o,e.exports=n.random}()},42196:(e,t,r)=>{var n=r(91080);r(18736);var i=[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],a=[1,2,3,5],o=function(e,t){return e<<t&65535|(65535&e)>>16-t},s=function(e,t){return(65535&e)>>t|e<<16-t&65535};e.exports=n.rc2=n.rc2||{},n.rc2.expandKey=function(e,t){"string"==typeof e&&(e=n.util.createBuffer(e)),t=t||128;var r,a=e,o=e.length(),s=t,c=Math.ceil(s/8),u=255>>(7&s);for(r=o;r<128;r++)a.putByte(i[a.at(r-1)+a.at(r-o)&255]);for(a.setAt(128-c,i[a.at(128-c)&u]),r=127-c;r>=0;r--)a.setAt(r,i[a.at(r+1)^a.at(r+c)]);return a};var c=function(e,t,r){var i,c,u,f,h=!1,l=null,d=null,p=null,y=[];for(e=n.rc2.expandKey(e,t),u=0;u<64;u++)y.push(e.getInt16Le());r?(i=function(e){for(u=0;u<4;u++)e[u]+=y[f]+(e[(u+3)%4]&e[(u+2)%4])+(~e[(u+3)%4]&e[(u+1)%4]),e[u]=o(e[u],a[u]),f++},c=function(e){for(u=0;u<4;u++)e[u]+=y[63&e[(u+3)%4]]}):(i=function(e){for(u=3;u>=0;u--)e[u]=s(e[u],a[u]),e[u]-=y[f]+(e[(u+3)%4]&e[(u+2)%4])+(~e[(u+3)%4]&e[(u+1)%4]),f--},c=function(e){for(u=3;u>=0;u--)e[u]-=y[63&e[(u+3)%4]]});var g=function(e){var t=[];for(u=0;u<4;u++){var n=l.getInt16Le();null!==p&&(r?n^=p.getInt16Le():p.putInt16Le(n)),t.push(65535&n)}f=r?0:63;for(var i=0;i<e.length;i++)for(var a=0;a<e[i][0];a++)e[i][1](t);for(u=0;u<4;u++)null!==p&&(r?p.putInt16Le(t[u]):t[u]^=p.getInt16Le()),d.putInt16Le(t[u])},v=null;return v={start:function(e,t){e&&"string"==typeof e&&(e=n.util.createBuffer(e)),h=!1,l=n.util.createBuffer(),d=t||new n.util.createBuffer,p=e,v.output=d},update:function(e){for(h||l.putBuffer(e);l.length()>=8;)g([[5,i],[1,c],[6,i],[1,c],[5,i]])},finish:function(e){var t=!0;if(r)if(e)t=e(8,l,!r);else{var n=8===l.length()?8:8-l.length();l.fillWithByte(n,n)}if(t&&(h=!0,v.update()),!r&&(t=0===l.length()))if(e)t=e(8,d,!r);else{var i=d.length(),a=d.at(i-1);a>i?t=!1:d.truncate(a)}return t}}};n.rc2.startEncrypting=function(e,t,r){var i=n.rc2.createEncryptionCipher(e,128);return i.start(t,r),i},n.rc2.createEncryptionCipher=function(e,t){return c(e,t,!0)},n.rc2.startDecrypting=function(e,t,r){var i=n.rc2.createDecryptionCipher(e,128);return i.start(t,r),i},n.rc2.createDecryptionCipher=function(e,t){return c(e,t,!1)}},71532:(e,t,r)=>{var n=r(91080);if(r(4e4),r(26056),r(91752),r(29948),r(88200),r(90400),r(18736),void 0===i)var i=n.jsbn.BigInteger;var a=n.util.isNodejs?r(39116):null,o=n.asn1,s=n.util;n.pki=n.pki||{},e.exports=n.pki.rsa=n.rsa=n.rsa||{};var c=n.pki,u=[6,4,2,4,2,4,6,2],f={name:"PrivateKeyInfo",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:o.Class.UNIVERSAL,type:o.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:o.Class.UNIVERSAL,type:o.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},h={name:"RSAPrivateKey",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"privateKeyModulus"},{name:"RSAPrivateKey.publicExponent",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"privateKeyPublicExponent"},{name:"RSAPrivateKey.privateExponent",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"privateKeyPrivateExponent"},{name:"RSAPrivateKey.prime1",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"privateKeyPrime1"},{name:"RSAPrivateKey.prime2",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"privateKeyCoefficient"}]},l={name:"RSAPublicKey",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPublicKey.modulus",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"publicKeyExponent"}]},d=n.pki.rsa.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:o.Class.UNIVERSAL,type:o.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:o.Class.UNIVERSAL,type:o.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},p={name:"DigestInfo",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"DigestInfo.DigestAlgorithm",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"DigestInfo.DigestAlgorithm.algorithmIdentifier",tagClass:o.Class.UNIVERSAL,type:o.Type.OID,constructed:!1,capture:"algorithmIdentifier"},{name:"DigestInfo.DigestAlgorithm.parameters",tagClass:o.Class.UNIVERSAL,type:o.Type.NULL,capture:"parameters",optional:!0,constructed:!1}]},{name:"DigestInfo.digest",tagClass:o.Class.UNIVERSAL,type:o.Type.OCTETSTRING,constructed:!1,capture:"digest"}]},y=function(e){var t;if(!(e.algorithm in c.oids)){var r=new Error("Unknown message digest algorithm.");throw r.algorithm=e.algorithm,r}t=c.oids[e.algorithm];var n=o.oidToDer(t).getBytes(),i=o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[]),a=o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[]);a.value.push(o.create(o.Class.UNIVERSAL,o.Type.OID,!1,n)),a.value.push(o.create(o.Class.UNIVERSAL,o.Type.NULL,!1,""));var s=o.create(o.Class.UNIVERSAL,o.Type.OCTETSTRING,!1,e.digest().getBytes());return i.value.push(a),i.value.push(s),o.toDer(i).getBytes()},g=function(e,t,r){if(r)return e.modPow(t.e,t.n);if(!t.p||!t.q)return e.modPow(t.d,t.n);var a;t.dP||(t.dP=t.d.mod(t.p.subtract(i.ONE))),t.dQ||(t.dQ=t.d.mod(t.q.subtract(i.ONE))),t.qInv||(t.qInv=t.q.modInverse(t.p));do{a=new i(n.util.bytesToHex(n.random.getBytes(t.n.bitLength()/8)),16)}while(a.compareTo(t.n)>=0||!a.gcd(t.n).equals(i.ONE));for(var o=(e=e.multiply(a.modPow(t.e,t.n)).mod(t.n)).mod(t.p).modPow(t.dP,t.p),s=e.mod(t.q).modPow(t.dQ,t.q);o.compareTo(s)<0;)o=o.add(t.p);var c=o.subtract(s).multiply(t.qInv).mod(t.p).multiply(t.q).add(s);return c.multiply(a.modInverse(t.n)).mod(t.n)};function v(e,t,r){var i=n.util.createBuffer(),a=Math.ceil(t.n.bitLength()/8);if(e.length>a-11){var o=new Error("Message is too long for PKCS#1 v1.5 padding.");throw o.length=e.length,o.max=a-11,o}i.putByte(0),i.putByte(r);var s,c=a-3-e.length;if(0===r||1===r){s=0===r?0:255;for(var u=0;u<c;++u)i.putByte(s)}else for(;c>0;){var f=0,h=n.random.getBytes(c);for(u=0;u<c;++u)0===(s=h.charCodeAt(u))?++f:i.putByte(s);c=f}return i.putByte(0),i.putBytes(e),i}function m(e,t,r,i){var a=Math.ceil(t.n.bitLength()/8),o=n.util.createBuffer(e),s=o.getByte(),c=o.getByte();if(0!==s||r&&0!==c&&1!==c||!r&&2!=c||r&&0===c&&void 0===i)throw new Error("Encryption block is invalid.");var u=0;if(0===c){u=a-3-i;for(var f=0;f<u;++f)if(0!==o.getByte())throw new Error("Encryption block is invalid.")}else if(1===c)for(u=0;o.length()>1;){if(255!==o.getByte()){--o.read;break}++u}else if(2===c)for(u=0;o.length()>1;){if(0===o.getByte()){--o.read;break}++u}if(0!==o.getByte()||u!==a-3-o.length())throw new Error("Encryption block is invalid.");return o.getBytes()}function b(e){var t=e.toString(16);t[0]>="8"&&(t="00"+t);var r=n.util.hexToBytes(t);return r.length>1&&(0===r.charCodeAt(0)&&0==(128&r.charCodeAt(1))||255===r.charCodeAt(0)&&128==(128&r.charCodeAt(1)))?r.substr(1):r}function w(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}function C(e){return n.util.isNodejs&&"function"==typeof a[e]}function E(e){return void 0!==s.globalScope&&"object"==typeof s.globalScope.crypto&&"object"==typeof s.globalScope.crypto.subtle&&"function"==typeof s.globalScope.crypto.subtle[e]}function S(e){return void 0!==s.globalScope&&"object"==typeof s.globalScope.msCrypto&&"object"==typeof s.globalScope.msCrypto.subtle&&"function"==typeof s.globalScope.msCrypto.subtle[e]}function A(e){for(var t=n.util.hexToBytes(e.toString(16)),r=new Uint8Array(t.length),i=0;i<t.length;++i)r[i]=t.charCodeAt(i);return r}c.rsa.encrypt=function(e,t,r){var a,o=r,s=Math.ceil(t.n.bitLength()/8);!1!==r&&!0!==r?(o=2===r,a=v(e,t,r)):(a=n.util.createBuffer()).putBytes(e);for(var c=new i(a.toHex(),16),u=g(c,t,o).toString(16),f=n.util.createBuffer(),h=s-Math.ceil(u.length/2);h>0;)f.putByte(0),--h;return f.putBytes(n.util.hexToBytes(u)),f.getBytes()},c.rsa.decrypt=function(e,t,r,a){var o=Math.ceil(t.n.bitLength()/8);if(e.length!==o){var s=new Error("Encrypted message length is invalid.");throw s.length=e.length,s.expected=o,s}var c=new i(n.util.createBuffer(e).toHex(),16);if(c.compareTo(t.n)>=0)throw new Error("Encrypted message is invalid.");for(var u=g(c,t,r).toString(16),f=n.util.createBuffer(),h=o-Math.ceil(u.length/2);h>0;)f.putByte(0),--h;return f.putBytes(n.util.hexToBytes(u)),!1!==a?m(f.getBytes(),t,r):f.getBytes()},c.rsa.createKeyPairGenerationState=function(e,t,r){"string"==typeof e&&(e=parseInt(e,10)),e=e||2048;var a,o=(r=r||{}).prng||n.random,s={nextBytes:function(e){for(var t=o.getBytesSync(e.length),r=0;r<e.length;++r)e[r]=t.charCodeAt(r)}},c=r.algorithm||"PRIMEINC";if("PRIMEINC"!==c)throw new Error("Invalid key generation algorithm: "+c);return(a={algorithm:c,state:0,bits:e,rng:s,eInt:t||65537,e:new i(null),p:null,q:null,qBits:e>>1,pBits:e-(e>>1),pqState:0,num:null,keys:null}).e.fromInt(a.eInt),a},c.rsa.stepKeyPairGenerationState=function(e,t){"algorithm"in e||(e.algorithm="PRIMEINC");var r=new i(null);r.fromInt(30);for(var n,a=0,o=function(e,t){return e|t},s=+new Date,f=0;null===e.keys&&(t<=0||f<t);){if(0===e.state){var h=null===e.p?e.pBits:e.qBits,l=h-1;0===e.pqState?(e.num=new i(h,e.rng),e.num.testBit(l)||e.num.bitwiseTo(i.ONE.shiftLeft(l),o,e.num),e.num.dAddOffset(31-e.num.mod(r).byteValue(),0),a=0,++e.pqState):1===e.pqState?e.num.bitLength()>h?e.pqState=0:e.num.isProbablePrime(w(e.num.bitLength()))?++e.pqState:e.num.dAddOffset(u[a++%8],0):2===e.pqState?e.pqState=0===e.num.subtract(i.ONE).gcd(e.e).compareTo(i.ONE)?3:0:3===e.pqState&&(e.pqState=0,null===e.p?e.p=e.num:e.q=e.num,null!==e.p&&null!==e.q&&++e.state,e.num=null)}else if(1===e.state)e.p.compareTo(e.q)<0&&(e.num=e.p,e.p=e.q,e.q=e.num),++e.state;else if(2===e.state)e.p1=e.p.subtract(i.ONE),e.q1=e.q.subtract(i.ONE),e.phi=e.p1.multiply(e.q1),++e.state;else if(3===e.state)0===e.phi.gcd(e.e).compareTo(i.ONE)?++e.state:(e.p=null,e.q=null,e.state=0);else if(4===e.state)e.n=e.p.multiply(e.q),e.n.bitLength()===e.bits?++e.state:(e.q=null,e.state=0);else if(5===e.state){var d=e.e.modInverse(e.phi);e.keys={privateKey:c.rsa.setPrivateKey(e.n,e.e,d,e.p,e.q,d.mod(e.p1),d.mod(e.q1),e.q.modInverse(e.p)),publicKey:c.rsa.setPublicKey(e.n,e.e)}}f+=(n=+new Date)-s,s=n}return null!==e.keys},c.rsa.generateKeyPair=function(e,t,r,u){if(1===arguments.length?"object"==typeof e?(r=e,e=void 0):"function"==typeof e&&(u=e,e=void 0):2===arguments.length?"number"==typeof e?"function"==typeof t?(u=t,t=void 0):"number"!=typeof t&&(r=t,t=void 0):(r=e,u=t,e=void 0,t=void 0):3===arguments.length&&("number"==typeof t?"function"==typeof r&&(u=r,r=void 0):(u=r,r=t,t=void 0)),r=r||{},void 0===e&&(e=r.bits||2048),void 0===t&&(t=r.e||65537),!n.options.usePureJavaScript&&!r.prng&&e>=256&&e<=16384&&(65537===t||3===t))if(u){if(C("generateKeyPair"))return a.generateKeyPair("rsa",{modulusLength:e,publicExponent:t,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}},(function(e,t,r){if(e)return u(e);u(null,{privateKey:c.privateKeyFromPem(r),publicKey:c.publicKeyFromPem(t)})}));if(E("generateKey")&&E("exportKey"))return s.globalScope.crypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:A(t),hash:{name:"SHA-256"}},!0,["sign","verify"]).then((function(e){return s.globalScope.crypto.subtle.exportKey("pkcs8",e.privateKey)})).then(void 0,(function(e){u(e)})).then((function(e){if(e){var t=c.privateKeyFromAsn1(o.fromDer(n.util.createBuffer(e)));u(null,{privateKey:t,publicKey:c.setRsaPublicKey(t.n,t.e)})}}));if(S("generateKey")&&S("exportKey")){var f=s.globalScope.msCrypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:A(t),hash:{name:"SHA-256"}},!0,["sign","verify"]);return f.oncomplete=function(e){var t=e.target.result,r=s.globalScope.msCrypto.subtle.exportKey("pkcs8",t.privateKey);r.oncomplete=function(e){var t=e.target.result,r=c.privateKeyFromAsn1(o.fromDer(n.util.createBuffer(t)));u(null,{privateKey:r,publicKey:c.setRsaPublicKey(r.n,r.e)})},r.onerror=function(e){u(e)}},void(f.onerror=function(e){u(e)})}}else if(C("generateKeyPairSync")){var h=a.generateKeyPairSync("rsa",{modulusLength:e,publicExponent:t,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}});return{privateKey:c.privateKeyFromPem(h.privateKey),publicKey:c.publicKeyFromPem(h.publicKey)}}var l=c.rsa.createKeyPairGenerationState(e,t,r);if(!u)return c.rsa.stepKeyPairGenerationState(l,0),l.keys;!function(e,t,r){"function"==typeof t&&(r=t,t={});var a={algorithm:{name:(t=t||{}).algorithm||"PRIMEINC",options:{workers:t.workers||2,workLoad:t.workLoad||100,workerScript:t.workerScript}}};function o(){s(e.pBits,(function(t,n){return t?r(t):(e.p=n,null!==e.q?u(t,e.q):void s(e.qBits,u))}))}function s(e,t){n.prime.generateProbablePrime(e,a,t)}function u(t,n){if(t)return r(t);if(e.q=n,e.p.compareTo(e.q)<0){var a=e.p;e.p=e.q,e.q=a}if(0!==e.p.subtract(i.ONE).gcd(e.e).compareTo(i.ONE))return e.p=null,void o();if(0!==e.q.subtract(i.ONE).gcd(e.e).compareTo(i.ONE))return e.q=null,void s(e.qBits,u);if(e.p1=e.p.subtract(i.ONE),e.q1=e.q.subtract(i.ONE),e.phi=e.p1.multiply(e.q1),0!==e.phi.gcd(e.e).compareTo(i.ONE))return e.p=e.q=null,void o();if(e.n=e.p.multiply(e.q),e.n.bitLength()!==e.bits)return e.q=null,void s(e.qBits,u);var f=e.e.modInverse(e.phi);e.keys={privateKey:c.rsa.setPrivateKey(e.n,e.e,f,e.p,e.q,f.mod(e.p1),f.mod(e.q1),e.q.modInverse(e.p)),publicKey:c.rsa.setPublicKey(e.n,e.e)},r(null,e.keys)}"prng"in t&&(a.prng=t.prng),o()}(l,r,u)},c.setRsaPublicKey=c.rsa.setPublicKey=function(e,t){var r={n:e,e:t,encrypt:function(e,t,i){if("string"==typeof t?t=t.toUpperCase():void 0===t&&(t="RSAES-PKCS1-V1_5"),"RSAES-PKCS1-V1_5"===t)t={encode:function(e,t,r){return v(e,t,2).getBytes()}};else if("RSA-OAEP"===t||"RSAES-OAEP"===t)t={encode:function(e,t){return n.pkcs1.encode_rsa_oaep(t,e,i)}};else if(-1!==["RAW","NONE","NULL",null].indexOf(t))t={encode:function(e){return e}};else if("string"==typeof t)throw new Error('Unsupported encryption scheme: "'+t+'".');var a=t.encode(e,r,!0);return c.rsa.encrypt(a,r,!0)},verify:function(e,t,i,a){"string"==typeof i?i=i.toUpperCase():void 0===i&&(i="RSASSA-PKCS1-V1_5"),void 0===a&&(a={_parseAllDigestBytes:!0}),"_parseAllDigestBytes"in a||(a._parseAllDigestBytes=!0),"RSASSA-PKCS1-V1_5"===i?i={verify:function(e,t){t=m(t,r,!0);var i=o.fromDer(t,{parseAllBytes:a._parseAllDigestBytes}),s={},c=[];if(!o.validate(i,p,s,c))throw(u=new Error("ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 DigestInfo value.")).errors=c,u;var u,f=o.derToOid(s.algorithmIdentifier);if(f!==n.oids.md2&&f!==n.oids.md5&&f!==n.oids.sha1&&f!==n.oids.sha224&&f!==n.oids.sha256&&f!==n.oids.sha384&&f!==n.oids.sha512&&f!==n.oids["sha512-224"]&&f!==n.oids["sha512-256"])throw(u=new Error("Unknown RSASSA-PKCS1-v1_5 DigestAlgorithm identifier.")).oid=f,u;if((f===n.oids.md2||f===n.oids.md5)&&!("parameters"in s))throw new Error("ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 DigestInfo value. Missing algorithm identifer NULL parameters.");return e===s.digest}}:"NONE"!==i&&"NULL"!==i&&null!==i||(i={verify:function(e,t){return e===m(t,r,!0)}});var s=c.rsa.decrypt(t,r,!0,!1);return i.verify(e,s,r.n.bitLength())}};return r},c.setRsaPrivateKey=c.rsa.setPrivateKey=function(e,t,r,i,a,o,s,u){var f={n:e,e:t,d:r,p:i,q:a,dP:o,dQ:s,qInv:u,decrypt:function(e,t,r){"string"==typeof t?t=t.toUpperCase():void 0===t&&(t="RSAES-PKCS1-V1_5");var i=c.rsa.decrypt(e,f,!1,!1);if("RSAES-PKCS1-V1_5"===t)t={decode:m};else if("RSA-OAEP"===t||"RSAES-OAEP"===t)t={decode:function(e,t){return n.pkcs1.decode_rsa_oaep(t,e,r)}};else{if(-1===["RAW","NONE","NULL",null].indexOf(t))throw new Error('Unsupported encryption scheme: "'+t+'".');t={decode:function(e){return e}}}return t.decode(i,f,!1)},sign:function(e,t){var r=!1;"string"==typeof t&&(t=t.toUpperCase()),void 0===t||"RSASSA-PKCS1-V1_5"===t?(t={encode:y},r=1):"NONE"!==t&&"NULL"!==t&&null!==t||(t={encode:function(){return e}},r=1);var n=t.encode(e,f.n.bitLength());return c.rsa.encrypt(n,f,r)}};return f},c.wrapRsaPrivateKey=function(e){return o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,o.integerToDer(0).getBytes()),o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OID,!1,o.oidToDer(c.oids.rsaEncryption).getBytes()),o.create(o.Class.UNIVERSAL,o.Type.NULL,!1,"")]),o.create(o.Class.UNIVERSAL,o.Type.OCTETSTRING,!1,o.toDer(e).getBytes())])},c.privateKeyFromAsn1=function(e){var t,r,a,s,u,l,d,p,y={},g=[];if(o.validate(e,f,y,g)&&(e=o.fromDer(n.util.createBuffer(y.privateKey))),y={},g=[],!o.validate(e,h,y,g)){var v=new Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey.");throw v.errors=g,v}return t=n.util.createBuffer(y.privateKeyModulus).toHex(),r=n.util.createBuffer(y.privateKeyPublicExponent).toHex(),a=n.util.createBuffer(y.privateKeyPrivateExponent).toHex(),s=n.util.createBuffer(y.privateKeyPrime1).toHex(),u=n.util.createBuffer(y.privateKeyPrime2).toHex(),l=n.util.createBuffer(y.privateKeyExponent1).toHex(),d=n.util.createBuffer(y.privateKeyExponent2).toHex(),p=n.util.createBuffer(y.privateKeyCoefficient).toHex(),c.setRsaPrivateKey(new i(t,16),new i(r,16),new i(a,16),new i(s,16),new i(u,16),new i(l,16),new i(d,16),new i(p,16))},c.privateKeyToAsn1=c.privateKeyToRSAPrivateKey=function(e){return o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,o.integerToDer(0).getBytes()),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,b(e.n)),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,b(e.e)),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,b(e.d)),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,b(e.p)),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,b(e.q)),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,b(e.dP)),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,b(e.dQ)),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,b(e.qInv))])},c.publicKeyFromAsn1=function(e){var t={},r=[];if(o.validate(e,d,t,r)){var a,s=o.derToOid(t.publicKeyOid);if(s!==c.oids.rsaEncryption)throw(a=new Error("Cannot read public key. Unknown OID.")).oid=s,a;e=t.rsaPublicKey}if(r=[],!o.validate(e,l,t,r))throw(a=new Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey.")).errors=r,a;var u=n.util.createBuffer(t.publicKeyModulus).toHex(),f=n.util.createBuffer(t.publicKeyExponent).toHex();return c.setRsaPublicKey(new i(u,16),new i(f,16))},c.publicKeyToAsn1=c.publicKeyToSubjectPublicKeyInfo=function(e){return o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OID,!1,o.oidToDer(c.oids.rsaEncryption).getBytes()),o.create(o.Class.UNIVERSAL,o.Type.NULL,!1,"")]),o.create(o.Class.UNIVERSAL,o.Type.BITSTRING,!1,[c.publicKeyToRSAPublicKey(e)])])},c.publicKeyToRSAPublicKey=function(e){return o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,b(e.n)),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,b(e.e))])}},95668:(e,t,r)=>{var n=r(91080);r(48724),r(18736);var i=e.exports=n.sha1=n.sha1||{};n.md.sha1=n.md.algorithms.sha1=i,i.create=function(){o||(a=String.fromCharCode(128),a+=n.util.fillString(String.fromCharCode(0),64),o=!0);var e=null,t=n.util.createBuffer(),r=new Array(80),i={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){i.messageLength=0,i.fullMessageLength=i.messageLength64=[];for(var r=i.messageLengthSize/4,a=0;a<r;++a)i.fullMessageLength.push(0);return t=n.util.createBuffer(),e={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878,h4:3285377520},i}};return i.start(),i.update=function(a,o){"utf8"===o&&(a=n.util.encodeUtf8(a));var c=a.length;i.messageLength+=c,c=[c/4294967296>>>0,c>>>0];for(var u=i.fullMessageLength.length-1;u>=0;--u)i.fullMessageLength[u]+=c[1],c[1]=c[0]+(i.fullMessageLength[u]/4294967296>>>0),i.fullMessageLength[u]=i.fullMessageLength[u]>>>0,c[0]=c[1]/4294967296>>>0;return t.putBytes(a),s(e,r,t),(t.read>2048||0===t.length())&&t.compact(),i},i.digest=function(){var o=n.util.createBuffer();o.putBytes(t.bytes());var c,u=i.fullMessageLength[i.fullMessageLength.length-1]+i.messageLengthSize&i.blockLength-1;o.putBytes(a.substr(0,i.blockLength-u));for(var f=8*i.fullMessageLength[0],h=0;h<i.fullMessageLength.length-1;++h)f+=(c=8*i.fullMessageLength[h+1])/4294967296>>>0,o.putInt32(f>>>0),f=c>>>0;o.putInt32(f);var l={h0:e.h0,h1:e.h1,h2:e.h2,h3:e.h3,h4:e.h4};s(l,r,o);var d=n.util.createBuffer();return d.putInt32(l.h0),d.putInt32(l.h1),d.putInt32(l.h2),d.putInt32(l.h3),d.putInt32(l.h4),d},i};var a=null,o=!1;function s(e,t,r){for(var n,i,a,o,s,c,u,f=r.length();f>=64;){for(i=e.h0,a=e.h1,o=e.h2,s=e.h3,c=e.h4,u=0;u<16;++u)n=r.getInt32(),t[u]=n,n=(i<<5|i>>>27)+(s^a&(o^s))+c+1518500249+n,c=s,s=o,o=(a<<30|a>>>2)>>>0,a=i,i=n;for(;u<20;++u)n=(n=t[u-3]^t[u-8]^t[u-14]^t[u-16])<<1|n>>>31,t[u]=n,n=(i<<5|i>>>27)+(s^a&(o^s))+c+1518500249+n,c=s,s=o,o=(a<<30|a>>>2)>>>0,a=i,i=n;for(;u<32;++u)n=(n=t[u-3]^t[u-8]^t[u-14]^t[u-16])<<1|n>>>31,t[u]=n,n=(i<<5|i>>>27)+(a^o^s)+c+1859775393+n,c=s,s=o,o=(a<<30|a>>>2)>>>0,a=i,i=n;for(;u<40;++u)n=(n=t[u-6]^t[u-16]^t[u-28]^t[u-32])<<2|n>>>30,t[u]=n,n=(i<<5|i>>>27)+(a^o^s)+c+1859775393+n,c=s,s=o,o=(a<<30|a>>>2)>>>0,a=i,i=n;for(;u<60;++u)n=(n=t[u-6]^t[u-16]^t[u-28]^t[u-32])<<2|n>>>30,t[u]=n,n=(i<<5|i>>>27)+(a&o|s&(a^o))+c+2400959708+n,c=s,s=o,o=(a<<30|a>>>2)>>>0,a=i,i=n;for(;u<80;++u)n=(n=t[u-6]^t[u-16]^t[u-28]^t[u-32])<<2|n>>>30,t[u]=n,n=(i<<5|i>>>27)+(a^o^s)+c+3395469782+n,c=s,s=o,o=(a<<30|a>>>2)>>>0,a=i,i=n;e.h0=e.h0+i|0,e.h1=e.h1+a|0,e.h2=e.h2+o|0,e.h3=e.h3+s|0,e.h4=e.h4+c|0,f-=64}}},91716:(e,t,r)=>{var n=r(91080);r(48724),r(18736);var i=e.exports=n.sha256=n.sha256||{};n.md.sha256=n.md.algorithms.sha256=i,i.create=function(){o||(a=String.fromCharCode(128),a+=n.util.fillString(String.fromCharCode(0),64),s=[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],o=!0);var e=null,t=n.util.createBuffer(),r=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 r=i.messageLengthSize/4,a=0;a<r;++a)i.fullMessageLength.push(0);return t=n.util.createBuffer(),e={h0:1779033703,h1:3144134277,h2:1013904242,h3:2773480762,h4:1359893119,h5:2600822924,h6:528734635,h7:1541459225},i}};return i.start(),i.update=function(a,o){"utf8"===o&&(a=n.util.encodeUtf8(a));var s=a.length;i.messageLength+=s,s=[s/4294967296>>>0,s>>>0];for(var u=i.fullMessageLength.length-1;u>=0;--u)i.fullMessageLength[u]+=s[1],s[1]=s[0]+(i.fullMessageLength[u]/4294967296>>>0),i.fullMessageLength[u]=i.fullMessageLength[u]>>>0,s[0]=s[1]/4294967296>>>0;return t.putBytes(a),c(e,r,t),(t.read>2048||0===t.length())&&t.compact(),i},i.digest=function(){var o=n.util.createBuffer();o.putBytes(t.bytes());var s,u=i.fullMessageLength[i.fullMessageLength.length-1]+i.messageLengthSize&i.blockLength-1;o.putBytes(a.substr(0,i.blockLength-u));for(var f=8*i.fullMessageLength[0],h=0;h<i.fullMessageLength.length-1;++h)f+=(s=8*i.fullMessageLength[h+1])/4294967296>>>0,o.putInt32(f>>>0),f=s>>>0;o.putInt32(f);var l={h0:e.h0,h1:e.h1,h2:e.h2,h3:e.h3,h4:e.h4,h5:e.h5,h6:e.h6,h7:e.h7};c(l,r,o);var d=n.util.createBuffer();return d.putInt32(l.h0),d.putInt32(l.h1),d.putInt32(l.h2),d.putInt32(l.h3),d.putInt32(l.h4),d.putInt32(l.h5),d.putInt32(l.h6),d.putInt32(l.h7),d},i};var a=null,o=!1,s=null;function c(e,t,r){for(var n,i,a,o,c,u,f,h,l,d,p,y,g,v=r.length();v>=64;){for(c=0;c<16;++c)t[c]=r.getInt32();for(;c<64;++c)n=((n=t[c-2])>>>17|n<<15)^(n>>>19|n<<13)^n>>>10,i=((i=t[c-15])>>>7|i<<25)^(i>>>18|i<<14)^i>>>3,t[c]=n+t[c-7]+i+t[c-16]|0;for(u=e.h0,f=e.h1,h=e.h2,l=e.h3,d=e.h4,p=e.h5,y=e.h6,g=e.h7,c=0;c<64;++c)a=(u>>>2|u<<30)^(u>>>13|u<<19)^(u>>>22|u<<10),o=u&f|h&(u^f),n=g+((d>>>6|d<<26)^(d>>>11|d<<21)^(d>>>25|d<<7))+(y^d&(p^y))+s[c]+t[c],g=y,y=p,p=d,d=l+n>>>0,l=h,h=f,f=u,u=n+(i=a+o)>>>0;e.h0=e.h0+u|0,e.h1=e.h1+f|0,e.h2=e.h2+h|0,e.h3=e.h3+l|0,e.h4=e.h4+d|0,e.h5=e.h5+p|0,e.h6=e.h6+y|0,e.h7=e.h7+g|0,v-=64}}},74756:(e,t,r)=>{var n=r(91080);r(48724),r(18736);var i=e.exports=n.sha512=n.sha512||{};n.md.sha512=n.md.algorithms.sha512=i;var a=n.sha384=n.sha512.sha384=n.sha512.sha384||{};a.create=function(){return i.create("SHA-384")},n.md.sha384=n.md.algorithms.sha384=a,n.sha512.sha256=n.sha512.sha256||{create:function(){return i.create("SHA-512/256")}},n.md["sha512/256"]=n.md.algorithms["sha512/256"]=n.sha512.sha256,n.sha512.sha224=n.sha512.sha224||{create:function(){return i.create("SHA-512/224")}},n.md["sha512/224"]=n.md.algorithms["sha512/224"]=n.sha512.sha224,i.create=function(e){if(s||(o=String.fromCharCode(128),o+=n.util.fillString(String.fromCharCode(0),128),c=[[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]],(u={})["SHA-512"]=[[1779033703,4089235720],[3144134277,2227873595],[1013904242,4271175723],[2773480762,1595750129],[1359893119,2917565137],[2600822924,725511199],[528734635,4215389547],[1541459225,327033209]],u["SHA-384"]=[[3418070365,3238371032],[1654270250,914150663],[2438529370,812702999],[355462360,4144912697],[1731405415,4290775857],[2394180231,1750603025],[3675008525,1694076839],[1203062813,3204075428]],u["SHA-512/256"]=[[573645204,4230739756],[2673172387,3360449730],[596883563,1867755857],[2520282905,1497426621],[2519219938,2827943907],[3193839141,1401305490],[721525244,746961066],[246885852,2177182882]],u["SHA-512/224"]=[[2352822216,424955298],[1944164710,2312950998],[502970286,855612546],[1738396948,1479516111],[258812777,2077511080],[2011393907,79989058],[1067287976,1780299464],[286451373,2446758561]],s=!0),void 0===e&&(e="SHA-512"),!(e in u))throw new Error("Invalid SHA-512 algorithm: "+e);for(var t=u[e],r=null,i=n.util.createBuffer(),a=new Array(80),h=0;h<80;++h)a[h]=new Array(2);var l=64;switch(e){case"SHA-384":l=48;break;case"SHA-512/256":l=32;break;case"SHA-512/224":l=28}var d={algorithm:e.replace("-","").toLowerCase(),blockLength:128,digestLength:l,messageLength:0,fullMessageLength:null,messageLengthSize:16,start:function(){d.messageLength=0,d.fullMessageLength=d.messageLength128=[];for(var e=d.messageLengthSize/4,a=0;a<e;++a)d.fullMessageLength.push(0);for(i=n.util.createBuffer(),r=new Array(t.length),a=0;a<t.length;++a)r[a]=t[a].slice(0);return d}};return d.start(),d.update=function(e,t){"utf8"===t&&(e=n.util.encodeUtf8(e));var o=e.length;d.messageLength+=o,o=[o/4294967296>>>0,o>>>0];for(var s=d.fullMessageLength.length-1;s>=0;--s)d.fullMessageLength[s]+=o[1],o[1]=o[0]+(d.fullMessageLength[s]/4294967296>>>0),d.fullMessageLength[s]=d.fullMessageLength[s]>>>0,o[0]=o[1]/4294967296>>>0;return i.putBytes(e),f(r,a,i),(i.read>2048||0===i.length())&&i.compact(),d},d.digest=function(){var t=n.util.createBuffer();t.putBytes(i.bytes());var s,c=d.fullMessageLength[d.fullMessageLength.length-1]+d.messageLengthSize&d.blockLength-1;t.putBytes(o.substr(0,d.blockLength-c));for(var u=8*d.fullMessageLength[0],h=0;h<d.fullMessageLength.length-1;++h)u+=(s=8*d.fullMessageLength[h+1])/4294967296>>>0,t.putInt32(u>>>0),u=s>>>0;t.putInt32(u);var l=new Array(r.length);for(h=0;h<r.length;++h)l[h]=r[h].slice(0);f(l,a,t);var p,y=n.util.createBuffer();for(p="SHA-512"===e?l.length:"SHA-384"===e?l.length-2:l.length-4,h=0;h<p;++h)y.putInt32(l[h][0]),h===p-1&&"SHA-512/224"===e||y.putInt32(l[h][1]);return y},d};var o=null,s=!1,c=null,u=null;function f(e,t,r){for(var n,i,a,o,s,u,f,h,l,d,p,y,g,v,m,b,w,C,E,S,A,B,T,I,k,_,R,x,F,D,P,U,N,L=r.length();L>=128;){for(R=0;R<16;++R)t[R][0]=r.getInt32()>>>0,t[R][1]=r.getInt32()>>>0;for(;R<80;++R)n=(((x=(D=t[R-2])[0])>>>19|(F=D[1])<<13)^(F>>>29|x<<3)^x>>>6)>>>0,i=((x<<13|F>>>19)^(F<<3|x>>>29)^(x<<26|F>>>6))>>>0,a=(((x=(U=t[R-15])[0])>>>1|(F=U[1])<<31)^(x>>>8|F<<24)^x>>>7)>>>0,o=((x<<31|F>>>1)^(x<<24|F>>>8)^(x<<25|F>>>7))>>>0,P=t[R-7],N=t[R-16],F=i+P[1]+o+N[1],t[R][0]=n+P[0]+a+N[0]+(F/4294967296>>>0)>>>0,t[R][1]=F>>>0;for(p=e[0][0],y=e[0][1],g=e[1][0],v=e[1][1],m=e[2][0],b=e[2][1],w=e[3][0],C=e[3][1],E=e[4][0],S=e[4][1],A=e[5][0],B=e[5][1],T=e[6][0],I=e[6][1],k=e[7][0],_=e[7][1],R=0;R<80;++R)f=((E>>>14|S<<18)^(E>>>18|S<<14)^(S>>>9|E<<23))>>>0,h=(T^E&(A^T))>>>0,s=((p>>>28|y<<4)^(y>>>2|p<<30)^(y>>>7|p<<25))>>>0,u=((p<<4|y>>>28)^(y<<30|p>>>2)^(y<<25|p>>>7))>>>0,l=(p&g|m&(p^g))>>>0,d=(y&v|b&(y^v))>>>0,F=_+(((E<<18|S>>>14)^(E<<14|S>>>18)^(S<<23|E>>>9))>>>0)+((I^S&(B^I))>>>0)+c[R][1]+t[R][1],n=k+f+h+c[R][0]+t[R][0]+(F/4294967296>>>0)>>>0,i=F>>>0,a=s+l+((F=u+d)/4294967296>>>0)>>>0,o=F>>>0,k=T,_=I,T=A,I=B,A=E,B=S,E=w+n+((F=C+i)/4294967296>>>0)>>>0,S=F>>>0,w=m,C=b,m=g,b=v,g=p,v=y,p=n+a+((F=i+o)/4294967296>>>0)>>>0,y=F>>>0;F=e[0][1]+y,e[0][0]=e[0][0]+p+(F/4294967296>>>0)>>>0,e[0][1]=F>>>0,F=e[1][1]+v,e[1][0]=e[1][0]+g+(F/4294967296>>>0)>>>0,e[1][1]=F>>>0,F=e[2][1]+b,e[2][0]=e[2][0]+m+(F/4294967296>>>0)>>>0,e[2][1]=F>>>0,F=e[3][1]+C,e[3][0]=e[3][0]+w+(F/4294967296>>>0)>>>0,e[3][1]=F>>>0,F=e[4][1]+S,e[4][0]=e[4][0]+E+(F/4294967296>>>0)>>>0,e[4][1]=F>>>0,F=e[5][1]+B,e[5][0]=e[5][0]+A+(F/4294967296>>>0)>>>0,e[5][1]=F>>>0,F=e[6][1]+I,e[6][0]=e[6][0]+T+(F/4294967296>>>0)>>>0,e[6][1]=F>>>0,F=e[7][1]+_,e[7][0]=e[7][0]+k+(F/4294967296>>>0)>>>0,e[7][1]=F>>>0,L-=128}}},89573:(e,t,r)=>{var n=r(91080);r(6180),r(43472),r(79576),r(95668),r(18736);var i=e.exports=n.ssh=n.ssh||{};function a(e,t){var r=t.toString(16);r[0]>="8"&&(r="00"+r);var i=n.util.hexToBytes(r);e.putInt32(i.length),e.putBytes(i)}function o(e,t){e.putInt32(t.length),e.putString(t)}function s(){for(var e=n.md.sha1.create(),t=arguments.length,r=0;r<t;++r)e.update(arguments[r]);return e.digest()}i.privateKeyToPutty=function(e,t,r){var i="ssh-rsa",c=""===(t=t||"")?"none":"aes256-cbc",u="PuTTY-User-Key-File-2: "+i+"\r\n";u+="Encryption: "+c+"\r\n",u+="Comment: "+(r=r||"")+"\r\n";var f=n.util.createBuffer();o(f,i),a(f,e.e),a(f,e.n);var h=n.util.encode64(f.bytes(),64),l=Math.floor(h.length/66)+1;u+="Public-Lines: "+l+"\r\n",u+=h;var d,p=n.util.createBuffer();if(a(p,e.d),a(p,e.p),a(p,e.q),a(p,e.qInv),t){var y=p.length()+16-1;y-=y%16;var g=s(p.bytes());g.truncate(g.length()-y+p.length()),p.putBuffer(g);var v=n.util.createBuffer();v.putBuffer(s("\0\0\0\0",t)),v.putBuffer(s("\0\0\0",t));var m=n.aes.createEncryptionCipher(v.truncate(8),"CBC");m.start(n.util.createBuffer().fillWithByte(0,16)),m.update(p.copy()),m.finish();var b=m.output;b.truncate(16),d=n.util.encode64(b.bytes(),64)}else d=n.util.encode64(p.bytes(),64);u+="\r\nPrivate-Lines: "+(l=Math.floor(d.length/66)+1)+"\r\n",u+=d;var w=s("putty-private-key-file-mac-key",t),C=n.util.createBuffer();o(C,i),o(C,c),o(C,r),C.putInt32(f.length()),C.putBuffer(f),C.putInt32(p.length()),C.putBuffer(p);var E=n.hmac.create();return E.start("sha1",w),E.update(C.bytes()),u+"\r\nPrivate-MAC: "+E.digest().toHex()+"\r\n"},i.publicKeyToOpenSSH=function(e,t){var r="ssh-rsa";t=t||"";var i=n.util.createBuffer();return o(i,r),a(i,e.e),a(i,e.n),r+" "+n.util.encode64(i.bytes())+" "+t},i.privateKeyToOpenSSH=function(e,t){return t?n.pki.encryptRsaPrivateKey(e,t,{legacy:!0,algorithm:"aes128"}):n.pki.privateKeyToPem(e)},i.getPublicKeyFingerprint=function(e,t){var r=(t=t||{}).md||n.md.md5.create(),i=n.util.createBuffer();o(i,"ssh-rsa"),a(i,e.e),a(i,e.n),r.start(),r.update(i.getBytes());var s=r.digest();if("hex"===t.encoding){var c=s.toHex();return t.delimiter?c.match(/.{2}/g).join(t.delimiter):c}if("binary"===t.encoding)return s.getBytes();if(t.encoding)throw new Error('Unknown encoding "'+t.encoding+'".');return s}},95720:(e,t,r)=>{var n=r(91080);r(4e4),r(43472),r(79576),r(96964),r(75300),r(90400),r(95668),r(18736);var i=function(e,t,r,i){var a=n.util.createBuffer(),o=e.length>>1,s=o+(1&e.length),c=e.substr(0,s),u=e.substr(o,s),f=n.util.createBuffer(),h=n.hmac.create();r=t+r;var l=Math.ceil(i/16),d=Math.ceil(i/20);h.start("MD5",c);var p=n.util.createBuffer();f.putBytes(r);for(var y=0;y<l;++y)h.start(null,null),h.update(f.getBytes()),f.putBuffer(h.digest()),h.start(null,null),h.update(f.bytes()+r),p.putBuffer(h.digest());h.start("SHA1",u);var g=n.util.createBuffer();for(f.clear(),f.putBytes(r),y=0;y<d;++y)h.start(null,null),h.update(f.getBytes()),f.putBuffer(h.digest()),h.start(null,null),h.update(f.bytes()+r),g.putBuffer(h.digest());return a.putBytes(n.util.xorBytes(p.getBytes(),g.getBytes(),i)),a},a=function(e,t,r){var i=!1;try{var a=e.deflate(t.fragment.getBytes());t.fragment=n.util.createBuffer(a),t.length=a.length,i=!0}catch(e){}return i},o=function(e,t,r){var i=!1;try{var a=e.inflate(t.fragment.getBytes());t.fragment=n.util.createBuffer(a),t.length=a.length,i=!0}catch(e){}return i},s=function(e,t){var r=0;switch(t){case 1:r=e.getByte();break;case 2:r=e.getInt16();break;case 3:r=e.getInt24();break;case 4:r=e.getInt32()}return n.util.createBuffer(e.getBytes(r))},c=function(e,t,r){e.putInt(r.length(),t<<3),e.putBuffer(r)},u={Versions:{TLS_1_0:{major:3,minor:1},TLS_1_1:{major:3,minor:2},TLS_1_2:{major:3,minor:3}}};u.SupportedVersions=[u.Versions.TLS_1_1,u.Versions.TLS_1_0],u.Version=u.SupportedVersions[0],u.MaxFragment=15360,u.ConnectionEnd={server:0,client:1},u.PRFAlgorithm={tls_prf_sha256:0},u.BulkCipherAlgorithm={none:null,rc4:0,des3:1,aes:2},u.CipherType={stream:0,block:1,aead:2},u.MACAlgorithm={none:null,hmac_md5:0,hmac_sha1:1,hmac_sha256:2,hmac_sha384:3,hmac_sha512:4},u.CompressionMethod={none:0,deflate:1},u.ContentType={change_cipher_spec:20,alert:21,handshake:22,application_data:23,heartbeat:24},u.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},u.Alert={},u.Alert.Level={warning:1,fatal:2},u.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},u.HeartbeatMessageType={heartbeat_request:1,heartbeat_response:2},u.CipherSuites={},u.getCipherSuite=function(e){var t=null;for(var r in u.CipherSuites){var n=u.CipherSuites[r];if(n.id[0]===e.charCodeAt(0)&&n.id[1]===e.charCodeAt(1)){t=n;break}}return t},u.handleUnexpected=function(e,t){!e.open&&e.entity===u.ConnectionEnd.client||e.error(e,{message:"Unexpected message. Received TLS record out of order.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.unexpected_message}})},u.handleHelloRequest=function(e,t,r){!e.handshaking&&e.handshakes>0&&(u.queue(e,u.createAlert(e,{level:u.Alert.Level.warning,description:u.Alert.Description.no_renegotiation})),u.flush(e)),e.process()},u.parseHelloMessage=function(e,t,r){var i=null,a=e.entity===u.ConnectionEnd.client;if(r<38)e.error(e,{message:a?"Invalid ServerHello message. Message too short.":"Invalid ClientHello message. Message too short.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.illegal_parameter}});else{var o=t.fragment,c=o.length();if(i={version:{major:o.getByte(),minor:o.getByte()},random:n.util.createBuffer(o.getBytes(32)),session_id:s(o,1),extensions:[]},a?(i.cipher_suite=o.getBytes(2),i.compression_method=o.getByte()):(i.cipher_suites=s(o,2),i.compression_methods=s(o,1)),(c=r-(c-o.length()))>0){for(var f=s(o,2);f.length()>0;)i.extensions.push({type:[f.getByte(),f.getByte()],data:s(f,2)});if(!a)for(var h=0;h<i.extensions.length;++h){var l=i.extensions[h];if(0===l.type[0]&&0===l.type[1])for(var d=s(l.data,2);d.length()>0&&0===d.getByte();)e.session.extensions.server_name.serverNameList.push(s(d,2).getBytes())}}if(e.session.version&&(i.version.major!==e.session.version.major||i.version.minor!==e.session.version.minor))return e.error(e,{message:"TLS version change is disallowed during renegotiation.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.protocol_version}});if(a)e.session.cipherSuite=u.getCipherSuite(i.cipher_suite);else for(var p=n.util.createBuffer(i.cipher_suites.bytes());p.length()>0&&(e.session.cipherSuite=u.getCipherSuite(p.getBytes(2)),null===e.session.cipherSuite););if(null===e.session.cipherSuite)return e.error(e,{message:"No cipher suites in common.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.handshake_failure},cipherSuite:n.util.bytesToHex(i.cipher_suite)});e.session.compressionMethod=a?i.compression_method:u.CompressionMethod.none}return i},u.createSecurityParameters=function(e,t){var r=e.entity===u.ConnectionEnd.client,n=t.random.bytes(),i=r?e.session.sp.client_random:n,a=r?n:u.createRandom().getBytes();e.session.sp={entity:e.entity,prf_algorithm:u.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:e.session.compressionMethod,pre_master_secret:null,master_secret:null,client_random:i,server_random:a}},u.handleServerHello=function(e,t,r){var n=u.parseHelloMessage(e,t,r);if(!e.fail){if(!(n.version.minor<=e.version.minor))return e.error(e,{message:"Incompatible TLS version.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.protocol_version}});e.version.minor=n.version.minor,e.session.version=e.version;var i=n.session_id.bytes();i.length>0&&i===e.session.id?(e.expect=p,e.session.resuming=!0,e.session.sp.server_random=n.random.bytes()):(e.expect=f,e.session.resuming=!1,u.createSecurityParameters(e,n)),e.session.id=i,e.process()}},u.handleClientHello=function(e,t,r){var i=u.parseHelloMessage(e,t,r);if(!e.fail){var a=i.session_id.bytes(),o=null;if(e.sessionCache&&(null===(o=e.sessionCache.getSession(a))?a="":(o.version.major!==i.version.major||o.version.minor>i.version.minor)&&(o=null,a="")),0===a.length&&(a=n.random.getBytes(32)),e.session.id=a,e.session.clientHelloVersion=i.version,e.session.sp={},o)e.version=e.session.version=o.version,e.session.sp=o.sp;else{for(var s,c=1;c<u.SupportedVersions.length&&!((s=u.SupportedVersions[c]).minor<=i.version.minor);++c);e.version={major:s.major,minor:s.minor},e.session.version=e.version}null!==o?(e.expect=C,e.session.resuming=!0,e.session.sp.client_random=i.random.bytes()):(e.expect=!1!==e.verifyClient?m:b,e.session.resuming=!1,u.createSecurityParameters(e,i)),e.open=!0,u.queue(e,u.createRecord(e,{type:u.ContentType.handshake,data:u.createServerHello(e)})),e.session.resuming?(u.queue(e,u.createRecord(e,{type:u.ContentType.change_cipher_spec,data:u.createChangeCipherSpec()})),e.state.pending=u.createConnectionState(e),e.state.current.write=e.state.pending.write,u.queue(e,u.createRecord(e,{type:u.ContentType.handshake,data:u.createFinished(e)}))):(u.queue(e,u.createRecord(e,{type:u.ContentType.handshake,data:u.createCertificate(e)})),e.fail||(u.queue(e,u.createRecord(e,{type:u.ContentType.handshake,data:u.createServerKeyExchange(e)})),!1!==e.verifyClient&&u.queue(e,u.createRecord(e,{type:u.ContentType.handshake,data:u.createCertificateRequest(e)})),u.queue(e,u.createRecord(e,{type:u.ContentType.handshake,data:u.createServerHelloDone(e)})))),u.flush(e),e.process()}},u.handleCertificate=function(e,t,r){if(r<3)return e.error(e,{message:"Invalid Certificate message. Message too short.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.illegal_parameter}});var i,a,o=t.fragment,c={certificate_list:s(o,3)},f=[];try{for(;c.certificate_list.length()>0;)i=s(c.certificate_list,3),a=n.asn1.fromDer(i),i=n.pki.certificateFromAsn1(a,!0),f.push(i)}catch(t){return e.error(e,{message:"Could not parse certificate list.",cause:t,send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.bad_certificate}})}var l=e.entity===u.ConnectionEnd.client;!l&&!0!==e.verifyClient||0!==f.length?0===f.length?e.expect=l?h:b:(l?e.session.serverCertificate=f[0]:e.session.clientCertificate=f[0],u.verifyCertificateChain(e,f)&&(e.expect=l?h:b)):e.error(e,{message:l?"No server certificate provided.":"No client certificate provided.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.illegal_parameter}}),e.process()},u.handleServerKeyExchange=function(e,t,r){if(r>0)return e.error(e,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.unsupported_certificate}});e.expect=l,e.process()},u.handleClientKeyExchange=function(e,t,r){if(r<48)return e.error(e,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.unsupported_certificate}});var i=t.fragment,a={enc_pre_master_secret:s(i,2).getBytes()},o=null;if(e.getPrivateKey)try{o=e.getPrivateKey(e,e.session.serverCertificate),o=n.pki.privateKeyFromPem(o)}catch(t){e.error(e,{message:"Could not get private key.",cause:t,send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.internal_error}})}if(null===o)return e.error(e,{message:"No private key set.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.internal_error}});try{var c=e.session.sp;c.pre_master_secret=o.decrypt(a.enc_pre_master_secret);var f=e.session.clientHelloVersion;if(f.major!==c.pre_master_secret.charCodeAt(0)||f.minor!==c.pre_master_secret.charCodeAt(1))throw new Error("TLS version rollback attack detected.")}catch(e){c.pre_master_secret=n.random.getBytes(48)}e.expect=C,null!==e.session.clientCertificate&&(e.expect=w),e.process()},u.handleCertificateRequest=function(e,t,r){if(r<3)return e.error(e,{message:"Invalid CertificateRequest. Message too short.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.illegal_parameter}});var n=t.fragment,i={certificate_types:s(n,1),certificate_authorities:s(n,2)};e.session.certificateRequest=i,e.expect=d,e.process()},u.handleCertificateVerify=function(e,t,r){if(r<2)return e.error(e,{message:"Invalid CertificateVerify. Message too short.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.illegal_parameter}});var i=t.fragment;i.read-=4;var a=i.bytes();i.read+=4;var o={signature:s(i,2).getBytes()},c=n.util.createBuffer();c.putBuffer(e.session.md5.digest()),c.putBuffer(e.session.sha1.digest()),c=c.getBytes();try{if(!e.session.clientCertificate.publicKey.verify(c,o.signature,"NONE"))throw new Error("CertificateVerify signature does not match.");e.session.md5.update(a),e.session.sha1.update(a)}catch(t){return e.error(e,{message:"Bad signature in CertificateVerify.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.handshake_failure}})}e.expect=C,e.process()},u.handleServerHelloDone=function(e,t,r){if(r>0)return e.error(e,{message:"Invalid ServerHelloDone message. Invalid length.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.record_overflow}});if(null===e.serverCertificate){var i={message:"No server certificate provided. Not enough security.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.insufficient_security}},a=e.verify(e,i.alert.description,0,[]);if(!0!==a)return(a||0===a)&&("object"!=typeof a||n.util.isArray(a)?"number"==typeof a&&(i.alert.description=a):(a.message&&(i.message=a.message),a.alert&&(i.alert.description=a.alert))),e.error(e,i)}null!==e.session.certificateRequest&&(t=u.createRecord(e,{type:u.ContentType.handshake,data:u.createCertificate(e)}),u.queue(e,t)),t=u.createRecord(e,{type:u.ContentType.handshake,data:u.createClientKeyExchange(e)}),u.queue(e,t),e.expect=v;var o=function(e,t){null!==e.session.certificateRequest&&null!==e.session.clientCertificate&&u.queue(e,u.createRecord(e,{type:u.ContentType.handshake,data:u.createCertificateVerify(e,t)})),u.queue(e,u.createRecord(e,{type:u.ContentType.change_cipher_spec,data:u.createChangeCipherSpec()})),e.state.pending=u.createConnectionState(e),e.state.current.write=e.state.pending.write,u.queue(e,u.createRecord(e,{type:u.ContentType.handshake,data:u.createFinished(e)})),e.expect=p,u.flush(e),e.process()};if(null===e.session.certificateRequest||null===e.session.clientCertificate)return o(e,null);u.getClientSignature(e,o)},u.handleChangeCipherSpec=function(e,t){if(1!==t.fragment.getByte())return e.error(e,{message:"Invalid ChangeCipherSpec message received.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.illegal_parameter}});var r=e.entity===u.ConnectionEnd.client;(e.session.resuming&&r||!e.session.resuming&&!r)&&(e.state.pending=u.createConnectionState(e)),e.state.current.read=e.state.pending.read,(!e.session.resuming&&r||e.session.resuming&&!r)&&(e.state.pending=null),e.expect=r?y:E,e.process()},u.handleFinished=function(e,t,r){var a=t.fragment;a.read-=4;var o=a.bytes();a.read+=4;var s=t.fragment.getBytes();(a=n.util.createBuffer()).putBuffer(e.session.md5.digest()),a.putBuffer(e.session.sha1.digest());var c=e.entity===u.ConnectionEnd.client,f=c?"server finished":"client finished",h=e.session.sp;if((a=i(h.master_secret,f,a.getBytes(),12)).getBytes()!==s)return e.error(e,{message:"Invalid verify_data in Finished message.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.decrypt_error}});e.session.md5.update(o),e.session.sha1.update(o),(e.session.resuming&&c||!e.session.resuming&&!c)&&(u.queue(e,u.createRecord(e,{type:u.ContentType.change_cipher_spec,data:u.createChangeCipherSpec()})),e.state.current.write=e.state.pending.write,e.state.pending=null,u.queue(e,u.createRecord(e,{type:u.ContentType.handshake,data:u.createFinished(e)}))),e.expect=c?g:S,e.handshaking=!1,++e.handshakes,e.peerCertificate=c?e.session.serverCertificate:e.session.clientCertificate,u.flush(e),e.isConnected=!0,e.connected(e),e.process()},u.handleAlert=function(e,t){var r,n=t.fragment,i={level:n.getByte(),description:n.getByte()};switch(i.description){case u.Alert.Description.close_notify:r="Connection closed.";break;case u.Alert.Description.unexpected_message:r="Unexpected message.";break;case u.Alert.Description.bad_record_mac:r="Bad record MAC.";break;case u.Alert.Description.decryption_failed:r="Decryption failed.";break;case u.Alert.Description.record_overflow:r="Record overflow.";break;case u.Alert.Description.decompression_failure:r="Decompression failed.";break;case u.Alert.Description.handshake_failure:r="Handshake failure.";break;case u.Alert.Description.bad_certificate:r="Bad certificate.";break;case u.Alert.Description.unsupported_certificate:r="Unsupported certificate.";break;case u.Alert.Description.certificate_revoked:r="Certificate revoked.";break;case u.Alert.Description.certificate_expired:r="Certificate expired.";break;case u.Alert.Description.certificate_unknown:r="Certificate unknown.";break;case u.Alert.Description.illegal_parameter:r="Illegal parameter.";break;case u.Alert.Description.unknown_ca:r="Unknown certificate authority.";break;case u.Alert.Description.access_denied:r="Access denied.";break;case u.Alert.Description.decode_error:r="Decode error.";break;case u.Alert.Description.decrypt_error:r="Decrypt error.";break;case u.Alert.Description.export_restriction:r="Export restriction.";break;case u.Alert.Description.protocol_version:r="Unsupported protocol version.";break;case u.Alert.Description.insufficient_security:r="Insufficient security.";break;case u.Alert.Description.internal_error:r="Internal error.";break;case u.Alert.Description.user_canceled:r="User canceled.";break;case u.Alert.Description.no_renegotiation:r="Renegotiation not supported.";break;default:r="Unknown error."}if(i.description===u.Alert.Description.close_notify)return e.close();e.error(e,{message:r,send:!1,origin:e.entity===u.ConnectionEnd.client?"server":"client",alert:i}),e.process()},u.handleHandshake=function(e,t){var r=t.fragment,i=r.getByte(),a=r.getInt24();if(a>r.length())return e.fragmented=t,t.fragment=n.util.createBuffer(),r.read-=4,e.process();e.fragmented=null,r.read-=4;var o=r.bytes(a+4);r.read+=4,i in M[e.entity][e.expect]?(e.entity!==u.ConnectionEnd.server||e.open||e.fail||(e.handshaking=!0,e.session={version:null,extensions:{server_name:{serverNameList:[]}},cipherSuite:null,compressionMethod:null,serverCertificate:null,clientCertificate:null,md5:n.md.md5.create(),sha1:n.md.sha1.create()}),i!==u.HandshakeType.hello_request&&i!==u.HandshakeType.certificate_verify&&i!==u.HandshakeType.finished&&(e.session.md5.update(o),e.session.sha1.update(o)),M[e.entity][e.expect][i](e,t,a)):u.handleUnexpected(e,t)},u.handleApplicationData=function(e,t){e.data.putBuffer(t.fragment),e.dataReady(e),e.process()},u.handleHeartbeat=function(e,t){var r=t.fragment,i=r.getByte(),a=r.getInt16(),o=r.getBytes(a);if(i===u.HeartbeatMessageType.heartbeat_request){if(e.handshaking||a>o.length)return e.process();u.queue(e,u.createRecord(e,{type:u.ContentType.heartbeat,data:u.createHeartbeat(u.HeartbeatMessageType.heartbeat_response,o)})),u.flush(e)}else if(i===u.HeartbeatMessageType.heartbeat_response){if(o!==e.expectedHeartbeatPayload)return e.process();e.heartbeatReceived&&e.heartbeatReceived(e,n.util.createBuffer(o))}e.process()};var f=1,h=2,l=3,d=4,p=5,y=6,g=7,v=8,m=1,b=2,w=3,C=4,E=5,S=6,A=u.handleUnexpected,B=u.handleChangeCipherSpec,T=u.handleAlert,I=u.handleHandshake,k=u.handleApplicationData,_=u.handleHeartbeat,R=[];R[u.ConnectionEnd.client]=[[A,T,I,A,_],[A,T,I,A,_],[A,T,I,A,_],[A,T,I,A,_],[A,T,I,A,_],[B,T,A,A,_],[A,T,I,A,_],[A,T,I,k,_],[A,T,I,A,_]],R[u.ConnectionEnd.server]=[[A,T,I,A,_],[A,T,I,A,_],[A,T,I,A,_],[A,T,I,A,_],[B,T,A,A,_],[A,T,I,A,_],[A,T,I,k,_],[A,T,I,A,_]];var x=u.handleHelloRequest,F=u.handleServerHello,D=u.handleCertificate,P=u.handleServerKeyExchange,U=u.handleCertificateRequest,N=u.handleServerHelloDone,L=u.handleFinished,M=[];M[u.ConnectionEnd.client]=[[A,A,F,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A],[x,A,A,A,A,A,A,A,A,A,A,D,P,U,N,A,A,A,A,A,A],[x,A,A,A,A,A,A,A,A,A,A,A,P,U,N,A,A,A,A,A,A],[x,A,A,A,A,A,A,A,A,A,A,A,A,U,N,A,A,A,A,A,A],[x,A,A,A,A,A,A,A,A,A,A,A,A,A,N,A,A,A,A,A,A],[x,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A],[x,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,L],[x,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A],[x,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A]];var O=u.handleClientHello,K=u.handleClientKeyExchange,G=u.handleCertificateVerify;M[u.ConnectionEnd.server]=[[A,O,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A],[A,A,A,A,A,A,A,A,A,A,A,D,A,A,A,A,A,A,A,A,A],[A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,K,A,A,A,A],[A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,G,A,A,A,A,A],[A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A],[A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,L],[A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A],[A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A]],u.generateKeys=function(e,t){var r=i,n=t.client_random+t.server_random;e.session.resuming||(t.master_secret=r(t.pre_master_secret,"master secret",n,48).bytes(),t.pre_master_secret=null),n=t.server_random+t.client_random;var a=2*t.mac_key_length+2*t.enc_key_length,o=e.version.major===u.Versions.TLS_1_0.major&&e.version.minor===u.Versions.TLS_1_0.minor;o&&(a+=2*t.fixed_iv_length);var s=r(t.master_secret,"key expansion",n,a),c={client_write_MAC_key:s.getBytes(t.mac_key_length),server_write_MAC_key:s.getBytes(t.mac_key_length),client_write_key:s.getBytes(t.enc_key_length),server_write_key:s.getBytes(t.enc_key_length)};return o&&(c.client_write_IV=s.getBytes(t.fixed_iv_length),c.server_write_IV=s.getBytes(t.fixed_iv_length)),c},u.createConnectionState=function(e){var t=e.entity===u.ConnectionEnd.client,r=function(){var e={sequenceNumber:[0,0],macKey:null,macLength:0,macFunction:null,cipherState:null,cipherFunction:function(e){return!0},compressionState:null,compressFunction:function(e){return!0},updateSequenceNumber:function(){4294967295===e.sequenceNumber[1]?(e.sequenceNumber[1]=0,++e.sequenceNumber[0]):++e.sequenceNumber[1]}};return e},n={read:r(),write:r()};if(n.read.update=function(e,t){return n.read.cipherFunction(t,n.read)?n.read.compressFunction(e,t,n.read)||e.error(e,{message:"Could not decompress record.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.decompression_failure}}):e.error(e,{message:"Could not decrypt record or bad MAC.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.bad_record_mac}}),!e.fail},n.write.update=function(e,t){return n.write.compressFunction(e,t,n.write)?n.write.cipherFunction(t,n.write)||e.error(e,{message:"Could not encrypt record.",send:!1,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.internal_error}}):e.error(e,{message:"Could not compress record.",send:!1,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.internal_error}}),!e.fail},e.session){var i=e.session.sp;switch(e.session.cipherSuite.initSecurityParameters(i),i.keys=u.generateKeys(e,i),n.read.macKey=t?i.keys.server_write_MAC_key:i.keys.client_write_MAC_key,n.write.macKey=t?i.keys.client_write_MAC_key:i.keys.server_write_MAC_key,e.session.cipherSuite.initConnectionState(n,e,i),i.compression_algorithm){case u.CompressionMethod.none:break;case u.CompressionMethod.deflate:n.read.compressFunction=o,n.write.compressFunction=a;break;default:throw new Error("Unsupported compression algorithm.")}}return n},u.createRandom=function(){var e=new Date,t=+e+6e4*e.getTimezoneOffset(),r=n.util.createBuffer();return r.putInt32(t),r.putBytes(n.random.getBytes(28)),r},u.createRecord=function(e,t){return t.data?{type:t.type,version:{major:e.version.major,minor:e.version.minor},length:t.data.length(),fragment:t.data}:null},u.createAlert=function(e,t){var r=n.util.createBuffer();return r.putByte(t.level),r.putByte(t.description),u.createRecord(e,{type:u.ContentType.alert,data:r})},u.createClientHello=function(e){e.session.clientHelloVersion={major:e.version.major,minor:e.version.minor};for(var t=n.util.createBuffer(),r=0;r<e.cipherSuites.length;++r){var i=e.cipherSuites[r];t.putByte(i.id[0]),t.putByte(i.id[1])}var a=t.length(),o=n.util.createBuffer();o.putByte(u.CompressionMethod.none);var s=o.length(),f=n.util.createBuffer();if(e.virtualHost){var h=n.util.createBuffer();h.putByte(0),h.putByte(0);var l=n.util.createBuffer();l.putByte(0),c(l,2,n.util.createBuffer(e.virtualHost));var d=n.util.createBuffer();c(d,2,l),c(h,2,d),f.putBuffer(h)}var p=f.length();p>0&&(p+=2);var y=e.session.id,g=y.length+1+2+4+28+2+a+1+s+p,v=n.util.createBuffer();return v.putByte(u.HandshakeType.client_hello),v.putInt24(g),v.putByte(e.version.major),v.putByte(e.version.minor),v.putBytes(e.session.sp.client_random),c(v,1,n.util.createBuffer(y)),c(v,2,t),c(v,1,o),p>0&&c(v,2,f),v},u.createServerHello=function(e){var t=e.session.id,r=t.length+1+2+4+28+2+1,i=n.util.createBuffer();return i.putByte(u.HandshakeType.server_hello),i.putInt24(r),i.putByte(e.version.major),i.putByte(e.version.minor),i.putBytes(e.session.sp.server_random),c(i,1,n.util.createBuffer(t)),i.putByte(e.session.cipherSuite.id[0]),i.putByte(e.session.cipherSuite.id[1]),i.putByte(e.session.compressionMethod),i},u.createCertificate=function(e){var t,r=e.entity===u.ConnectionEnd.client,i=null;e.getCertificate&&(t=r?e.session.certificateRequest:e.session.extensions.server_name.serverNameList,i=e.getCertificate(e,t));var a=n.util.createBuffer();if(null!==i)try{n.util.isArray(i)||(i=[i]);for(var o=null,s=0;s<i.length;++s){var f=n.pem.decode(i[s])[0];if("CERTIFICATE"!==f.type&&"X509 CERTIFICATE"!==f.type&&"TRUSTED CERTIFICATE"!==f.type){var h=new Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');throw h.headerType=f.type,h}if(f.procType&&"ENCRYPTED"===f.procType.type)throw new Error("Could not convert certificate from PEM; PEM is encrypted.");var l=n.util.createBuffer(f.body);null===o&&(o=n.asn1.fromDer(l.bytes(),!1));var d=n.util.createBuffer();c(d,3,l),a.putBuffer(d)}i=n.pki.certificateFromAsn1(o),r?e.session.clientCertificate=i:e.session.serverCertificate=i}catch(t){return e.error(e,{message:"Could not send certificate list.",cause:t,send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.bad_certificate}})}var p=3+a.length(),y=n.util.createBuffer();return y.putByte(u.HandshakeType.certificate),y.putInt24(p),c(y,3,a),y},u.createClientKeyExchange=function(e){var t=n.util.createBuffer();t.putByte(e.session.clientHelloVersion.major),t.putByte(e.session.clientHelloVersion.minor),t.putBytes(n.random.getBytes(46));var r=e.session.sp;r.pre_master_secret=t.getBytes();var i=(t=e.session.serverCertificate.publicKey.encrypt(r.pre_master_secret)).length+2,a=n.util.createBuffer();return a.putByte(u.HandshakeType.client_key_exchange),a.putInt24(i),a.putInt16(t.length),a.putBytes(t),a},u.createServerKeyExchange=function(e){return n.util.createBuffer()},u.getClientSignature=function(e,t){var r=n.util.createBuffer();r.putBuffer(e.session.md5.digest()),r.putBuffer(e.session.sha1.digest()),r=r.getBytes(),e.getSignature=e.getSignature||function(e,t,r){var i=null;if(e.getPrivateKey)try{i=e.getPrivateKey(e,e.session.clientCertificate),i=n.pki.privateKeyFromPem(i)}catch(t){e.error(e,{message:"Could not get private key.",cause:t,send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.internal_error}})}null===i?e.error(e,{message:"No private key set.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.internal_error}}):t=i.sign(t,null),r(e,t)},e.getSignature(e,r,t)},u.createCertificateVerify=function(e,t){var r=t.length+2,i=n.util.createBuffer();return i.putByte(u.HandshakeType.certificate_verify),i.putInt24(r),i.putInt16(t.length),i.putBytes(t),i},u.createCertificateRequest=function(e){var t=n.util.createBuffer();t.putByte(1);var r=n.util.createBuffer();for(var i in e.caStore.certs){var a=e.caStore.certs[i],o=n.pki.distinguishedNameToAsn1(a.subject),s=n.asn1.toDer(o);r.putInt16(s.length()),r.putBuffer(s)}var f=1+t.length()+2+r.length(),h=n.util.createBuffer();return h.putByte(u.HandshakeType.certificate_request),h.putInt24(f),c(h,1,t),c(h,2,r),h},u.createServerHelloDone=function(e){var t=n.util.createBuffer();return t.putByte(u.HandshakeType.server_hello_done),t.putInt24(0),t},u.createChangeCipherSpec=function(){var e=n.util.createBuffer();return e.putByte(1),e},u.createFinished=function(e){var t=n.util.createBuffer();t.putBuffer(e.session.md5.digest()),t.putBuffer(e.session.sha1.digest());var r=e.entity===u.ConnectionEnd.client,a=e.session.sp,o=r?"client finished":"server finished";t=i(a.master_secret,o,t.getBytes(),12);var s=n.util.createBuffer();return s.putByte(u.HandshakeType.finished),s.putInt24(t.length()),s.putBuffer(t),s},u.createHeartbeat=function(e,t,r){void 0===r&&(r=t.length);var i=n.util.createBuffer();i.putByte(e),i.putInt16(r),i.putBytes(t);var a=i.length(),o=Math.max(16,a-r-3);return i.putBytes(n.random.getBytes(o)),i},u.queue=function(e,t){if(t&&(0!==t.fragment.length()||t.type!==u.ContentType.handshake&&t.type!==u.ContentType.alert&&t.type!==u.ContentType.change_cipher_spec)){if(t.type===u.ContentType.handshake){var r=t.fragment.bytes();e.session.md5.update(r),e.session.sha1.update(r),r=null}var i;if(t.fragment.length()<=u.MaxFragment)i=[t];else{i=[];for(var a=t.fragment.bytes();a.length>u.MaxFragment;)i.push(u.createRecord(e,{type:t.type,data:n.util.createBuffer(a.slice(0,u.MaxFragment))})),a=a.slice(u.MaxFragment);a.length>0&&i.push(u.createRecord(e,{type:t.type,data:n.util.createBuffer(a)}))}for(var o=0;o<i.length&&!e.fail;++o){var s=i[o];e.state.current.write.update(e,s)&&e.records.push(s)}}},u.flush=function(e){for(var t=0;t<e.records.length;++t){var r=e.records[t];e.tlsData.putByte(r.type),e.tlsData.putByte(r.version.major),e.tlsData.putByte(r.version.minor),e.tlsData.putInt16(r.fragment.length()),e.tlsData.putBuffer(e.records[t].fragment)}return e.records=[],e.tlsDataReady(e)};var j=function(e){switch(e){case!0:return!0;case n.pki.certificateError.bad_certificate:return u.Alert.Description.bad_certificate;case n.pki.certificateError.unsupported_certificate:return u.Alert.Description.unsupported_certificate;case n.pki.certificateError.certificate_revoked:return u.Alert.Description.certificate_revoked;case n.pki.certificateError.certificate_expired:return u.Alert.Description.certificate_expired;case n.pki.certificateError.certificate_unknown:return u.Alert.Description.certificate_unknown;case n.pki.certificateError.unknown_ca:return u.Alert.Description.unknown_ca;default:return u.Alert.Description.bad_certificate}};for(var V in u.verifyCertificateChain=function(e,t){try{var r={};for(var i in e.verifyOptions)r[i]=e.verifyOptions[i];r.verify=function(t,r,i){j(t);var a=e.verify(e,t,r,i);if(!0!==a){if("object"==typeof a&&!n.util.isArray(a)){var o=new Error("The application rejected the certificate.");throw o.send=!0,o.alert={level:u.Alert.Level.fatal,description:u.Alert.Description.bad_certificate},a.message&&(o.message=a.message),a.alert&&(o.alert.description=a.alert),o}a!==t&&(a=function(e){switch(e){case!0:return!0;case u.Alert.Description.bad_certificate:return n.pki.certificateError.bad_certificate;case u.Alert.Description.unsupported_certificate:return n.pki.certificateError.unsupported_certificate;case u.Alert.Description.certificate_revoked:return n.pki.certificateError.certificate_revoked;case u.Alert.Description.certificate_expired:return n.pki.certificateError.certificate_expired;case u.Alert.Description.certificate_unknown:return n.pki.certificateError.certificate_unknown;case u.Alert.Description.unknown_ca:return n.pki.certificateError.unknown_ca;default:return n.pki.certificateError.bad_certificate}}(a))}return a},n.pki.verifyCertificateChain(e.caStore,t,r)}catch(t){var a=t;("object"!=typeof a||n.util.isArray(a))&&(a={send:!0,alert:{level:u.Alert.Level.fatal,description:j(t)}}),"send"in a||(a.send=!0),"alert"in a||(a.alert={level:u.Alert.Level.fatal,description:j(a.error)}),e.error(e,a)}return!e.fail},u.createSessionCache=function(e,t){var r=null;if(e&&e.getSession&&e.setSession&&e.order)r=e;else{for(var i in(r={}).cache=e||{},r.capacity=Math.max(t||100,1),r.order=[],e)r.order.length<=t?r.order.push(i):delete e[i];r.getSession=function(e){var t=null,i=null;if(e?i=n.util.bytesToHex(e):r.order.length>0&&(i=r.order[0]),null!==i&&i in r.cache)for(var a in t=r.cache[i],delete r.cache[i],r.order)if(r.order[a]===i){r.order.splice(a,1);break}return t},r.setSession=function(e,t){if(r.order.length===r.capacity){var i=r.order.shift();delete r.cache[i]}i=n.util.bytesToHex(e),r.order.push(i),r.cache[i]=t}}return r},u.createConnection=function(e){var t;t=e.caStore?n.util.isArray(e.caStore)?n.pki.createCaStore(e.caStore):e.caStore:n.pki.createCaStore();var r=e.cipherSuites||null;if(null===r)for(var i in r=[],u.CipherSuites)r.push(u.CipherSuites[i]);var a=e.server?u.ConnectionEnd.server:u.ConnectionEnd.client,o=e.sessionCache?u.createSessionCache(e.sessionCache):null,s={version:{major:u.Version.major,minor:u.Version.minor},entity:a,sessionId:e.sessionId,caStore:t,sessionCache:o,cipherSuites:r,connected:e.connected,virtualHost:e.virtualHost||null,verifyClient:e.verifyClient||!1,verify:e.verify||function(e,t,r,n){return t},verifyOptions:e.verifyOptions||{},getCertificate:e.getCertificate||null,getPrivateKey:e.getPrivateKey||null,getSignature:e.getSignature||null,input:n.util.createBuffer(),tlsData:n.util.createBuffer(),data:n.util.createBuffer(),tlsDataReady:e.tlsDataReady,dataReady:e.dataReady,heartbeatReceived:e.heartbeatReceived,closed:e.closed,error:function(t,r){r.origin=r.origin||(t.entity===u.ConnectionEnd.client?"client":"server"),r.send&&(u.queue(t,u.createAlert(t,r.alert)),u.flush(t));var n=!1!==r.fatal;n&&(t.fail=!0),e.error(t,r),n&&t.close(!1)},deflate:e.deflate||null,inflate:e.inflate||null,reset:function(e){s.version={major:u.Version.major,minor:u.Version.minor},s.record=null,s.session=null,s.peerCertificate=null,s.state={pending:null,current:null},s.expect=(s.entity,u.ConnectionEnd.client,0),s.fragmented=null,s.records=[],s.open=!1,s.handshakes=0,s.handshaking=!1,s.isConnected=!1,s.fail=!(e||void 0===e),s.input.clear(),s.tlsData.clear(),s.data.clear(),s.state.current=u.createConnectionState(s)}};return s.reset(),s.handshake=function(e){if(s.entity!==u.ConnectionEnd.client)s.error(s,{message:"Cannot initiate handshake as a server.",fatal:!1});else if(s.handshaking)s.error(s,{message:"Handshake already in progress.",fatal:!1});else{s.fail&&!s.open&&0===s.handshakes&&(s.fail=!1),s.handshaking=!0;var t=null;(e=e||"").length>0&&(s.sessionCache&&(t=s.sessionCache.getSession(e)),null===t&&(e="")),0===e.length&&s.sessionCache&&null!==(t=s.sessionCache.getSession())&&(e=t.id),s.session={id:e,version:null,cipherSuite:null,compressionMethod:null,serverCertificate:null,certificateRequest:null,clientCertificate:null,sp:{},md5:n.md.md5.create(),sha1:n.md.sha1.create()},t&&(s.version=t.version,s.session.sp=t.sp),s.session.sp.client_random=u.createRandom().getBytes(),s.open=!0,u.queue(s,u.createRecord(s,{type:u.ContentType.handshake,data:u.createClientHello(s)})),u.flush(s)}},s.process=function(e){var t=0;return e&&s.input.putBytes(e),s.fail||(null!==s.record&&s.record.ready&&s.record.fragment.isEmpty()&&(s.record=null),null===s.record&&(t=function(e){var t=0,r=e.input,i=r.length();if(i<5)t=5-i;else{e.record={type:r.getByte(),version:{major:r.getByte(),minor:r.getByte()},length:r.getInt16(),fragment:n.util.createBuffer(),ready:!1};var a=e.record.version.major===e.version.major;a&&e.session&&e.session.version&&(a=e.record.version.minor===e.version.minor),a||e.error(e,{message:"Incompatible TLS version.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.protocol_version}})}return t}(s)),s.fail||null===s.record||s.record.ready||(t=function(e){var t=0,r=e.input,n=r.length();return n<e.record.length?t=e.record.length-n:(e.record.fragment.putBytes(r.getBytes(e.record.length)),r.compact(),e.state.current.read.update(e,e.record)&&(null!==e.fragmented&&(e.fragmented.type===e.record.type?(e.fragmented.fragment.putBuffer(e.record.fragment),e.record=e.fragmented):e.error(e,{message:"Invalid fragmented record.",send:!0,alert:{level:u.Alert.Level.fatal,description:u.Alert.Description.unexpected_message}})),e.record.ready=!0)),t}(s)),!s.fail&&null!==s.record&&s.record.ready&&function(e,t){var r=t.type-u.ContentType.change_cipher_spec,n=R[e.entity][e.expect];r in n?n[r](e,t):u.handleUnexpected(e,t)}(s,s.record)),t},s.prepare=function(e){return u.queue(s,u.createRecord(s,{type:u.ContentType.application_data,data:n.util.createBuffer(e)})),u.flush(s)},s.prepareHeartbeatRequest=function(e,t){return e instanceof n.util.ByteBuffer&&(e=e.bytes()),void 0===t&&(t=e.length),s.expectedHeartbeatPayload=e,u.queue(s,u.createRecord(s,{type:u.ContentType.heartbeat,data:u.createHeartbeat(u.HeartbeatMessageType.heartbeat_request,e,t)})),u.flush(s)},s.close=function(e){if(!s.fail&&s.sessionCache&&s.session){var t={id:s.session.id,version:s.session.version,sp:s.session.sp};t.sp.keys=null,s.sessionCache.setSession(t.id,t)}s.open&&(s.open=!1,s.input.clear(),(s.isConnected||s.handshaking)&&(s.isConnected=s.handshaking=!1,u.queue(s,u.createAlert(s,{level:u.Alert.Level.warning,description:u.Alert.Description.close_notify})),u.flush(s)),s.closed(s)),s.reset(e)},s},e.exports=n.tls=n.tls||{},u)"function"!=typeof u[V]&&(n.tls[V]=u[V]);n.tls.prf_tls1=i,n.tls.hmac_sha1=function(e,t,r){var i=n.hmac.create();i.start("SHA1",e);var a=n.util.createBuffer();return a.putInt32(t[0]),a.putInt32(t[1]),a.putByte(r.type),a.putByte(r.version.major),a.putByte(r.version.minor),a.putInt16(r.length),a.putBytes(r.fragment.bytes()),i.update(a.getBytes()),i.digest().getBytes()},n.tls.createSessionCache=u.createSessionCache,n.tls.createConnection=u.createConnection},18736:(e,t,r)=>{var n=r(80628),i=r(19024).Buffer,a=r(91080),o=r(584),s=e.exports=a.util=a.util||{};function c(e){if(8!==e&&16!==e&&24!==e&&32!==e)throw new Error("Only 8, 16, 24, or 32 bits supported: "+e)}function u(e){if(this.data="",this.read=0,"string"==typeof e)this.data=e;else if(s.isArrayBuffer(e)||s.isArrayBufferView(e))if(void 0!==i&&e instanceof i)this.data=e.toString("binary");else{var t=new Uint8Array(e);try{this.data=String.fromCharCode.apply(null,t)}catch(e){for(var r=0;r<t.length;++r)this.putByte(t[r])}}else(e instanceof u||"object"==typeof e&&"string"==typeof e.data&&"number"==typeof e.read)&&(this.data=e.data,this.read=e.read);this._constructedStringLength=0}!function(){if(void 0!==n&&n.nextTick,"function"==typeof setImmediate)return s.setImmediate=function(){return setImmediate.apply(void 0,arguments)},void(s.nextTick=function(e){return setImmediate(e)});if(s.setImmediate=function(e){setTimeout(e,0)},"undefined"!=typeof window&&"function"==typeof window.postMessage){var e="forge.setImmediate",t=[];s.setImmediate=function(r){t.push(r),1===t.length&&window.postMessage(e,"*")},window.addEventListener("message",(function(r){if(r.source===window&&r.data===e){r.stopPropagation();var n=t.slice();t.length=0,n.forEach((function(e){e()}))}}),!0)}if("undefined"!=typeof MutationObserver){var r=Date.now(),i=!0,a=document.createElement("div");t=[],new MutationObserver((function(){var e=t.slice();t.length=0,e.forEach((function(e){e()}))})).observe(a,{attributes:!0});var o=s.setImmediate;s.setImmediate=function(e){Date.now()-r>15?(r=Date.now(),o(e)):(t.push(e),1===t.length&&a.setAttribute("a",i=!i))}}s.nextTick=s.setImmediate}(),s.isNodejs=void 0!==n&&n.versions&&n.versions.node,s.globalScope=s.isNodejs?r.g:"undefined"==typeof self?window:self,s.isArray=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},s.isArrayBuffer=function(e){return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer},s.isArrayBufferView=function(e){return e&&s.isArrayBuffer(e.buffer)&&void 0!==e.byteLength},s.ByteBuffer=u,s.ByteStringBuffer=u,s.ByteStringBuffer.prototype._optimizeConstructedString=function(e){this._constructedStringLength+=e,this._constructedStringLength>4096&&(this.data.substr(0,1),this._constructedStringLength=0)},s.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read},s.ByteStringBuffer.prototype.isEmpty=function(){return this.length()<=0},s.ByteStringBuffer.prototype.putByte=function(e){return this.putBytes(String.fromCharCode(e))},s.ByteStringBuffer.prototype.fillWithByte=function(e,t){e=String.fromCharCode(e);for(var r=this.data;t>0;)1&t&&(r+=e),(t>>>=1)>0&&(e+=e);return this.data=r,this._optimizeConstructedString(t),this},s.ByteStringBuffer.prototype.putBytes=function(e){return this.data+=e,this._optimizeConstructedString(e.length),this},s.ByteStringBuffer.prototype.putString=function(e){return this.putBytes(s.encodeUtf8(e))},s.ByteStringBuffer.prototype.putInt16=function(e){return this.putBytes(String.fromCharCode(e>>8&255)+String.fromCharCode(255&e))},s.ByteStringBuffer.prototype.putInt24=function(e){return this.putBytes(String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(255&e))},s.ByteStringBuffer.prototype.putInt32=function(e){return this.putBytes(String.fromCharCode(e>>24&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(255&e))},s.ByteStringBuffer.prototype.putInt16Le=function(e){return this.putBytes(String.fromCharCode(255&e)+String.fromCharCode(e>>8&255))},s.ByteStringBuffer.prototype.putInt24Le=function(e){return this.putBytes(String.fromCharCode(255&e)+String.fromCharCode(e>>8&255)+String.fromCharCode(e>>16&255))},s.ByteStringBuffer.prototype.putInt32Le=function(e){return this.putBytes(String.fromCharCode(255&e)+String.fromCharCode(e>>8&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>24&255))},s.ByteStringBuffer.prototype.putInt=function(e,t){c(t);var r="";do{t-=8,r+=String.fromCharCode(e>>t&255)}while(t>0);return this.putBytes(r)},s.ByteStringBuffer.prototype.putSignedInt=function(e,t){return e<0&&(e+=2<<t-1),this.putInt(e,t)},s.ByteStringBuffer.prototype.putBuffer=function(e){return this.putBytes(e.getBytes())},s.ByteStringBuffer.prototype.getByte=function(){return this.data.charCodeAt(this.read++)},s.ByteStringBuffer.prototype.getInt16=function(){var e=this.data.charCodeAt(this.read)<<8^this.data.charCodeAt(this.read+1);return this.read+=2,e},s.ByteStringBuffer.prototype.getInt24=function(){var e=this.data.charCodeAt(this.read)<<16^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2);return this.read+=3,e},s.ByteStringBuffer.prototype.getInt32=function(){var e=this.data.charCodeAt(this.read)<<24^this.data.charCodeAt(this.read+1)<<16^this.data.charCodeAt(this.read+2)<<8^this.data.charCodeAt(this.read+3);return this.read+=4,e},s.ByteStringBuffer.prototype.getInt16Le=function(){var e=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8;return this.read+=2,e},s.ByteStringBuffer.prototype.getInt24Le=function(){var e=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16;return this.read+=3,e},s.ByteStringBuffer.prototype.getInt32Le=function(){var e=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16^this.data.charCodeAt(this.read+3)<<24;return this.read+=4,e},s.ByteStringBuffer.prototype.getInt=function(e){c(e);var t=0;do{t=(t<<8)+this.data.charCodeAt(this.read++),e-=8}while(e>0);return t},s.ByteStringBuffer.prototype.getSignedInt=function(e){var t=this.getInt(e),r=2<<e-2;return t>=r&&(t-=r<<1),t},s.ByteStringBuffer.prototype.getBytes=function(e){var t;return e?(e=Math.min(this.length(),e),t=this.data.slice(this.read,this.read+e),this.read+=e):0===e?t="":(t=0===this.read?this.data:this.data.slice(this.read),this.clear()),t},s.ByteStringBuffer.prototype.bytes=function(e){return void 0===e?this.data.slice(this.read):this.data.slice(this.read,this.read+e)},s.ByteStringBuffer.prototype.at=function(e){return this.data.charCodeAt(this.read+e)},s.ByteStringBuffer.prototype.setAt=function(e,t){return this.data=this.data.substr(0,this.read+e)+String.fromCharCode(t)+this.data.substr(this.read+e+1),this},s.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)},s.ByteStringBuffer.prototype.copy=function(){var e=s.createBuffer(this.data);return e.read=this.read,e},s.ByteStringBuffer.prototype.compact=function(){return this.read>0&&(this.data=this.data.slice(this.read),this.read=0),this},s.ByteStringBuffer.prototype.clear=function(){return this.data="",this.read=0,this},s.ByteStringBuffer.prototype.truncate=function(e){var t=Math.max(0,this.length()-e);return this.data=this.data.substr(this.read,t),this.read=0,this},s.ByteStringBuffer.prototype.toHex=function(){for(var e="",t=this.read;t<this.data.length;++t){var r=this.data.charCodeAt(t);r<16&&(e+="0"),e+=r.toString(16)}return e},s.ByteStringBuffer.prototype.toString=function(){return s.decodeUtf8(this.bytes())},s.DataBuffer=function(e,t){t=t||{},this.read=t.readOffset||0,this.growSize=t.growSize||1024;var r=s.isArrayBuffer(e),n=s.isArrayBufferView(e);if(r||n)return this.data=r?new DataView(e):new DataView(e.buffer,e.byteOffset,e.byteLength),void(this.write="writeOffset"in t?t.writeOffset:this.data.byteLength);this.data=new DataView(new ArrayBuffer(0)),this.write=0,null!=e&&this.putBytes(e),"writeOffset"in t&&(this.write=t.writeOffset)},s.DataBuffer.prototype.length=function(){return this.write-this.read},s.DataBuffer.prototype.isEmpty=function(){return this.length()<=0},s.DataBuffer.prototype.accommodate=function(e,t){if(this.length()>=e)return this;t=Math.max(t||this.growSize,e);var r=new Uint8Array(this.data.buffer,this.data.byteOffset,this.data.byteLength),n=new Uint8Array(this.length()+t);return n.set(r),this.data=new DataView(n.buffer),this},s.DataBuffer.prototype.putByte=function(e){return this.accommodate(1),this.data.setUint8(this.write++,e),this},s.DataBuffer.prototype.fillWithByte=function(e,t){this.accommodate(t);for(var r=0;r<t;++r)this.data.setUint8(e);return this},s.DataBuffer.prototype.putBytes=function(e,t){if(s.isArrayBufferView(e)){var r=(n=new Uint8Array(e.buffer,e.byteOffset,e.byteLength)).byteLength-n.byteOffset;return this.accommodate(r),new Uint8Array(this.data.buffer,this.write).set(n),this.write+=r,this}if(s.isArrayBuffer(e)){var n=new Uint8Array(e);return this.accommodate(n.byteLength),new Uint8Array(this.data.buffer).set(n,this.write),this.write+=n.byteLength,this}if(e instanceof s.DataBuffer||"object"==typeof e&&"number"==typeof e.read&&"number"==typeof e.write&&s.isArrayBufferView(e.data))return n=new Uint8Array(e.data.byteLength,e.read,e.length()),this.accommodate(n.byteLength),new Uint8Array(e.data.byteLength,this.write).set(n),this.write+=n.byteLength,this;if(e instanceof s.ByteStringBuffer&&(e=e.data,t="binary"),t=t||"binary","string"==typeof e){var i;if("hex"===t)return this.accommodate(Math.ceil(e.length/2)),i=new Uint8Array(this.data.buffer,this.write),this.write+=s.binary.hex.decode(e,i,this.write),this;if("base64"===t)return this.accommodate(3*Math.ceil(e.length/4)),i=new Uint8Array(this.data.buffer,this.write),this.write+=s.binary.base64.decode(e,i,this.write),this;if("utf8"===t&&(e=s.encodeUtf8(e),t="binary"),"binary"===t||"raw"===t)return this.accommodate(e.length),i=new Uint8Array(this.data.buffer,this.write),this.write+=s.binary.raw.decode(i),this;if("utf16"===t)return this.accommodate(2*e.length),i=new Uint16Array(this.data.buffer,this.write),this.write+=s.text.utf16.encode(i),this;throw new Error("Invalid encoding: "+t)}throw Error("Invalid parameter: "+e)},s.DataBuffer.prototype.putBuffer=function(e){return this.putBytes(e),e.clear(),this},s.DataBuffer.prototype.putString=function(e){return this.putBytes(e,"utf16")},s.DataBuffer.prototype.putInt16=function(e){return this.accommodate(2),this.data.setInt16(this.write,e),this.write+=2,this},s.DataBuffer.prototype.putInt24=function(e){return this.accommodate(3),this.data.setInt16(this.write,e>>8&65535),this.data.setInt8(this.write,e>>16&255),this.write+=3,this},s.DataBuffer.prototype.putInt32=function(e){return this.accommodate(4),this.data.setInt32(this.write,e),this.write+=4,this},s.DataBuffer.prototype.putInt16Le=function(e){return this.accommodate(2),this.data.setInt16(this.write,e,!0),this.write+=2,this},s.DataBuffer.prototype.putInt24Le=function(e){return this.accommodate(3),this.data.setInt8(this.write,e>>16&255),this.data.setInt16(this.write,e>>8&65535,!0),this.write+=3,this},s.DataBuffer.prototype.putInt32Le=function(e){return this.accommodate(4),this.data.setInt32(this.write,e,!0),this.write+=4,this},s.DataBuffer.prototype.putInt=function(e,t){c(t),this.accommodate(t/8);do{t-=8,this.data.setInt8(this.write++,e>>t&255)}while(t>0);return this},s.DataBuffer.prototype.putSignedInt=function(e,t){return c(t),this.accommodate(t/8),e<0&&(e+=2<<t-1),this.putInt(e,t)},s.DataBuffer.prototype.getByte=function(){return this.data.getInt8(this.read++)},s.DataBuffer.prototype.getInt16=function(){var e=this.data.getInt16(this.read);return this.read+=2,e},s.DataBuffer.prototype.getInt24=function(){var e=this.data.getInt16(this.read)<<8^this.data.getInt8(this.read+2);return this.read+=3,e},s.DataBuffer.prototype.getInt32=function(){var e=this.data.getInt32(this.read);return this.read+=4,e},s.DataBuffer.prototype.getInt16Le=function(){var e=this.data.getInt16(this.read,!0);return this.read+=2,e},s.DataBuffer.prototype.getInt24Le=function(){var e=this.data.getInt8(this.read)^this.data.getInt16(this.read+1,!0)<<8;return this.read+=3,e},s.DataBuffer.prototype.getInt32Le=function(){var e=this.data.getInt32(this.read,!0);return this.read+=4,e},s.DataBuffer.prototype.getInt=function(e){c(e);var t=0;do{t=(t<<8)+this.data.getInt8(this.read++),e-=8}while(e>0);return t},s.DataBuffer.prototype.getSignedInt=function(e){var t=this.getInt(e),r=2<<e-2;return t>=r&&(t-=r<<1),t},s.DataBuffer.prototype.getBytes=function(e){var t;return e?(e=Math.min(this.length(),e),t=this.data.slice(this.read,this.read+e),this.read+=e):0===e?t="":(t=0===this.read?this.data:this.data.slice(this.read),this.clear()),t},s.DataBuffer.prototype.bytes=function(e){return void 0===e?this.data.slice(this.read):this.data.slice(this.read,this.read+e)},s.DataBuffer.prototype.at=function(e){return this.data.getUint8(this.read+e)},s.DataBuffer.prototype.setAt=function(e,t){return this.data.setUint8(e,t),this},s.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)},s.DataBuffer.prototype.copy=function(){return new s.DataBuffer(this)},s.DataBuffer.prototype.compact=function(){if(this.read>0){var e=new Uint8Array(this.data.buffer,this.read),t=new Uint8Array(e.byteLength);t.set(e),this.data=new DataView(t),this.write-=this.read,this.read=0}return this},s.DataBuffer.prototype.clear=function(){return this.data=new DataView(new ArrayBuffer(0)),this.read=this.write=0,this},s.DataBuffer.prototype.truncate=function(e){return this.write=Math.max(0,this.length()-e),this.read=Math.min(this.read,this.write),this},s.DataBuffer.prototype.toHex=function(){for(var e="",t=this.read;t<this.data.byteLength;++t){var r=this.data.getUint8(t);r<16&&(e+="0"),e+=r.toString(16)}return e},s.DataBuffer.prototype.toString=function(e){var t=new Uint8Array(this.data,this.read,this.length());if("binary"===(e=e||"utf8")||"raw"===e)return s.binary.raw.encode(t);if("hex"===e)return s.binary.hex.encode(t);if("base64"===e)return s.binary.base64.encode(t);if("utf8"===e)return s.text.utf8.decode(t);if("utf16"===e)return s.text.utf16.decode(t);throw new Error("Invalid encoding: "+e)},s.createBuffer=function(e,t){return t=t||"raw",void 0!==e&&"utf8"===t&&(e=s.encodeUtf8(e)),new s.ByteBuffer(e)},s.fillString=function(e,t){for(var r="";t>0;)1&t&&(r+=e),(t>>>=1)>0&&(e+=e);return r},s.xorBytes=function(e,t,r){for(var n="",i="",a="",o=0,s=0;r>0;--r,++o)i=e.charCodeAt(o)^t.charCodeAt(o),s>=10&&(n+=a,a="",s=0),a+=String.fromCharCode(i),++s;return n+a},s.hexToBytes=function(e){var t="",r=0;for(!0&e.length&&(r=1,t+=String.fromCharCode(parseInt(e[0],16)));r<e.length;r+=2)t+=String.fromCharCode(parseInt(e.substr(r,2),16));return t},s.bytesToHex=function(e){return s.createBuffer(e).toHex()},s.int32ToBytes=function(e){return String.fromCharCode(e>>24&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(255&e)};var f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",h=[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],l="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";s.encode64=function(e,t){for(var r,n,i,a="",o="",s=0;s<e.length;)r=e.charCodeAt(s++),n=e.charCodeAt(s++),i=e.charCodeAt(s++),a+=f.charAt(r>>2),a+=f.charAt((3&r)<<4|n>>4),isNaN(n)?a+="==":(a+=f.charAt((15&n)<<2|i>>6),a+=isNaN(i)?"=":f.charAt(63&i)),t&&a.length>t&&(o+=a.substr(0,t)+"\r\n",a=a.substr(t));return o+a},s.decode64=function(e){e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var t,r,n,i,a="",o=0;o<e.length;)t=h[e.charCodeAt(o++)-43],r=h[e.charCodeAt(o++)-43],n=h[e.charCodeAt(o++)-43],i=h[e.charCodeAt(o++)-43],a+=String.fromCharCode(t<<2|r>>4),64!==n&&(a+=String.fromCharCode((15&r)<<4|n>>2),64!==i&&(a+=String.fromCharCode((3&n)<<6|i)));return a},s.encodeUtf8=function(e){return unescape(encodeURIComponent(e))},s.decodeUtf8=function(e){return decodeURIComponent(escape(e))},s.binary={raw:{},hex:{},base64:{},base58:{},baseN:{encode:o.encode,decode:o.decode}},s.binary.raw.encode=function(e){return String.fromCharCode.apply(null,e)},s.binary.raw.decode=function(e,t,r){var n=t;n||(n=new Uint8Array(e.length));for(var i=r=r||0,a=0;a<e.length;++a)n[i++]=e.charCodeAt(a);return t?i-r:n},s.binary.hex.encode=s.bytesToHex,s.binary.hex.decode=function(e,t,r){var n=t;n||(n=new Uint8Array(Math.ceil(e.length/2)));var i=0,a=r=r||0;for(1&e.length&&(i=1,n[a++]=parseInt(e[0],16));i<e.length;i+=2)n[a++]=parseInt(e.substr(i,2),16);return t?a-r:n},s.binary.base64.encode=function(e,t){for(var r,n,i,a="",o="",s=0;s<e.byteLength;)r=e[s++],n=e[s++],i=e[s++],a+=f.charAt(r>>2),a+=f.charAt((3&r)<<4|n>>4),isNaN(n)?a+="==":(a+=f.charAt((15&n)<<2|i>>6),a+=isNaN(i)?"=":f.charAt(63&i)),t&&a.length>t&&(o+=a.substr(0,t)+"\r\n",a=a.substr(t));return o+a},s.binary.base64.decode=function(e,t,r){var n,i,a,o,s=t;s||(s=new Uint8Array(3*Math.ceil(e.length/4))),e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var c=0,u=r=r||0;c<e.length;)n=h[e.charCodeAt(c++)-43],i=h[e.charCodeAt(c++)-43],a=h[e.charCodeAt(c++)-43],o=h[e.charCodeAt(c++)-43],s[u++]=n<<2|i>>4,64!==a&&(s[u++]=(15&i)<<4|a>>2,64!==o&&(s[u++]=(3&a)<<6|o));return t?u-r:s.subarray(0,u)},s.binary.base58.encode=function(e,t){return s.binary.baseN.encode(e,l,t)},s.binary.base58.decode=function(e,t){return s.binary.baseN.decode(e,l,t)},s.text={utf8:{},utf16:{}},s.text.utf8.encode=function(e,t,r){e=s.encodeUtf8(e);var n=t;n||(n=new Uint8Array(e.length));for(var i=r=r||0,a=0;a<e.length;++a)n[i++]=e.charCodeAt(a);return t?i-r:n},s.text.utf8.decode=function(e){return s.decodeUtf8(String.fromCharCode.apply(null,e))},s.text.utf16.encode=function(e,t,r){var n=t;n||(n=new Uint8Array(2*e.length));for(var i=new Uint16Array(n.buffer),a=r=r||0,o=r,s=0;s<e.length;++s)i[o++]=e.charCodeAt(s),a+=2;return t?a-r:n},s.text.utf16.decode=function(e){return String.fromCharCode.apply(null,new Uint16Array(e.buffer))},s.deflate=function(e,t,r){if(t=s.decode64(e.deflate(s.encode64(t)).rval),r){var n=2;32&t.charCodeAt(1)&&(n=6),t=t.substring(n,t.length-4)}return t},s.inflate=function(e,t,r){var n=e.inflate(s.encode64(t)).rval;return null===n?null:s.decode64(n)};var d=function(e,t,r){if(!e)throw new Error("WebStorage not available.");var n;if(null===r?n=e.removeItem(t):(r=s.encode64(JSON.stringify(r)),n=e.setItem(t,r)),void 0!==n&&!0!==n.rval){var i=new Error(n.error.message);throw i.id=n.error.id,i.name=n.error.name,i}},p=function(e,t){if(!e)throw new Error("WebStorage not available.");var r=e.getItem(t);if(e.init)if(null===r.rval){if(r.error){var n=new Error(r.error.message);throw n.id=r.error.id,n.name=r.error.name,n}r=null}else r=r.rval;return null!==r&&(r=JSON.parse(s.decode64(r))),r},y=function(e,t,r,n){var i=p(e,t);null===i&&(i={}),i[r]=n,d(e,t,i)},g=function(e,t,r){var n=p(e,t);return null!==n&&(n=r in n?n[r]:null),n},v=function(e,t,r){var n=p(e,t);if(null!==n&&r in n){delete n[r];var i=!0;for(var a in n){i=!1;break}i&&(n=null),d(e,t,n)}},m=function(e,t){d(e,t,null)},b=function(e,t,r){var n,i=null;void 0===r&&(r=["web","flash"]);var a=!1,o=null;for(var s in r){n=r[s];try{if("flash"===n||"both"===n){if(null===t[0])throw new Error("Flash local storage not available.");i=e.apply(this,t),a="flash"===n}"web"!==n&&"both"!==n||(t[0]=localStorage,i=e.apply(this,t),a=!0)}catch(e){o=e}if(a)break}if(!a)throw o;return i};s.setItem=function(e,t,r,n,i){b(y,arguments,i)},s.getItem=function(e,t,r,n){return b(g,arguments,n)},s.removeItem=function(e,t,r,n){b(v,arguments,n)},s.clearItems=function(e,t,r){b(m,arguments,r)},s.isEmpty=function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0},s.format=function(e){for(var t,r,n=/%./g,i=0,a=[],o=0;t=n.exec(e);){(r=e.substring(o,n.lastIndex-2)).length>0&&a.push(r),o=n.lastIndex;var s=t[0][1];switch(s){case"s":case"o":i<arguments.length?a.push(arguments[1+i++]):a.push("<?>");break;case"%":a.push("%");break;default:a.push("<%"+s+"?>")}}return a.push(e.substring(o)),a.join("")},s.formatNumber=function(e,t,r,n){var i=e,a=isNaN(t=Math.abs(t))?2:t,o=void 0===r?",":r,s=void 0===n?".":n,c=i<0?"-":"",u=parseInt(i=Math.abs(+i||0).toFixed(a),10)+"",f=u.length>3?u.length%3:0;return c+(f?u.substr(0,f)+s:"")+u.substr(f).replace(/(\d{3})(?=\d)/g,"$1"+s)+(a?o+Math.abs(i-u).toFixed(a).slice(2):"")},s.formatSize=function(e){return e>=1073741824?s.formatNumber(e/1073741824,2,".","")+" GiB":e>=1048576?s.formatNumber(e/1048576,2,".","")+" MiB":e>=1024?s.formatNumber(e/1024,0)+" KiB":s.formatNumber(e,0)+" bytes"},s.bytesFromIP=function(e){return-1!==e.indexOf(".")?s.bytesFromIPv4(e):-1!==e.indexOf(":")?s.bytesFromIPv6(e):null},s.bytesFromIPv4=function(e){if(4!==(e=e.split(".")).length)return null;for(var t=s.createBuffer(),r=0;r<e.length;++r){var n=parseInt(e[r],10);if(isNaN(n))return null;t.putByte(n)}return t.getBytes()},s.bytesFromIPv6=function(e){for(var t=0,r=2*(8-(e=e.split(":").filter((function(e){return 0===e.length&&++t,!0}))).length+t),n=s.createBuffer(),i=0;i<8;++i)if(e[i]&&0!==e[i].length){var a=s.hexToBytes(e[i]);a.length<2&&n.putByte(0),n.putBytes(a)}else n.fillWithByte(0,r),r=0;return n.getBytes()},s.bytesToIP=function(e){return 4===e.length?s.bytesToIPv4(e):16===e.length?s.bytesToIPv6(e):null},s.bytesToIPv4=function(e){if(4!==e.length)return null;for(var t=[],r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t.join(".")},s.bytesToIPv6=function(e){if(16!==e.length)return null;for(var t=[],r=[],n=0,i=0;i<e.length;i+=2){for(var a=s.bytesToHex(e[i]+e[i+1]);"0"===a[0]&&"0"!==a;)a=a.substr(1);if("0"===a){var o=r[r.length-1],c=t.length;o&&c===o.end+1?(o.end=c,o.end-o.start>r[n].end-r[n].start&&(n=r.length-1)):r.push({start:c,end:c})}t.push(a)}if(r.length>0){var u=r[n];u.end-u.start>0&&(t.splice(u.start,u.end-u.start+1,""),0===u.start&&t.unshift(""),7===u.end&&t.push(""))}return t.join(":")},s.estimateCores=function(e,t){if("function"==typeof e&&(t=e,e={}),e=e||{},"cores"in s&&!e.update)return t(null,s.cores);if("undefined"!=typeof navigator&&"hardwareConcurrency"in navigator&&navigator.hardwareConcurrency>0)return s.cores=navigator.hardwareConcurrency,t(null,s.cores);if("undefined"==typeof Worker)return s.cores=1,t(null,s.cores);if("undefined"==typeof Blob)return s.cores=2,t(null,s.cores);var r=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",(function(e){for(var t=Date.now(),r=t+4;Date.now()<r;);self.postMessage({st:t,et:r})}))}.toString(),")()"],{type:"application/javascript"}));!function e(n,i,a){if(0===i){var o=Math.floor(n.reduce((function(e,t){return e+t}),0)/n.length);return s.cores=Math.max(1,o),URL.revokeObjectURL(r),t(null,s.cores)}!function(e,t){for(var n=[],i=[],a=0;a<e;++a){var o=new Worker(r);o.addEventListener("message",(function(r){if(i.push(r.data),i.length===e){for(var a=0;a<e;++a)n[a].terminate();t(0,i)}})),n.push(o)}for(a=0;a<e;++a)n[a].postMessage(a)}(a,(function(t,r){n.push(function(e,t){for(var r=[],n=0;n<e;++n)for(var i=t[n],a=r[n]=[],o=0;o<e;++o)if(n!==o){var s=t[o];(i.st>s.st&&i.st<s.et||s.st>i.st&&s.st<i.et)&&a.push(o)}return r.reduce((function(e,t){return Math.max(e,t.length)}),0)}(a,r)),e(n,i-1,a)}))}([],5,16)}},92556:(e,t,r)=>{var n=r(91080);r(6180),r(4e4),r(3044),r(48724),r(54755),r(91752),r(96964),r(4124),r(71532),r(18736);var i=n.asn1,a=e.exports=n.pki=n.pki||{},o=a.oids,s={};s.CN=o.commonName,s.commonName="CN",s.C=o.countryName,s.countryName="C",s.L=o.localityName,s.localityName="L",s.ST=o.stateOrProvinceName,s.stateOrProvinceName="ST",s.O=o.organizationName,s.organizationName="O",s.OU=o.organizationalUnitName,s.organizationalUnitName="OU",s.E=o.emailAddress,s.emailAddress="E";var c=n.pki.rsa.publicKeyValidator,u={name:"Certificate",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"tbsCertificate",value:[{name:"Certificate.TBSCertificate.version",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.version.integer",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"certVersion"}]},{name:"Certificate.TBSCertificate.serialNumber",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"certSerialNumber"},{name:"Certificate.TBSCertificate.signature",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.signature.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"certinfoSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:i.Class.UNIVERSAL,optional:!0,captureAsn1:"certinfoSignatureParams"}]},{name:"Certificate.TBSCertificate.issuer",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"certIssuer"},{name:"Certificate.TBSCertificate.validity",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.validity.notBefore (utc)",tagClass:i.Class.UNIVERSAL,type:i.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity1UTCTime"},{name:"Certificate.TBSCertificate.validity.notBefore (generalized)",tagClass:i.Class.UNIVERSAL,type:i.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity2GeneralizedTime"},{name:"Certificate.TBSCertificate.validity.notAfter (utc)",tagClass:i.Class.UNIVERSAL,type:i.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity3UTCTime"},{name:"Certificate.TBSCertificate.validity.notAfter (generalized)",tagClass:i.Class.UNIVERSAL,type:i.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity4GeneralizedTime"}]},{name:"Certificate.TBSCertificate.subject",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"certSubject"},c,{name:"Certificate.TBSCertificate.issuerUniqueID",tagClass:i.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.issuerUniqueID.id",tagClass:i.Class.UNIVERSAL,type:i.Type.BITSTRING,constructed:!1,captureBitStringValue:"certIssuerUniqueId"}]},{name:"Certificate.TBSCertificate.subjectUniqueID",tagClass:i.Class.CONTEXT_SPECIFIC,type:2,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.subjectUniqueID.id",tagClass:i.Class.UNIVERSAL,type:i.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSubjectUniqueId"}]},{name:"Certificate.TBSCertificate.extensions",tagClass:i.Class.CONTEXT_SPECIFIC,type:3,constructed:!0,captureAsn1:"certExtensions",optional:!0}]},{name:"Certificate.signatureAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.signatureAlgorithm.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"certSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:i.Class.UNIVERSAL,optional:!0,captureAsn1:"certSignatureParams"}]},{name:"Certificate.signatureValue",tagClass:i.Class.UNIVERSAL,type:i.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSignature"}]},f={name:"rsapss",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.hashAlgorithm",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier",tagClass:i.Class.UNIVERSAL,type:i.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"hashOid"}]}]},{name:"rsapss.maskGenAlgorithm",tagClass:i.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier",tagClass:i.Class.UNIVERSAL,type:i.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"maskGenOid"},{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"maskGenHashOid"}]}]}]},{name:"rsapss.saltLength",tagClass:i.Class.CONTEXT_SPECIFIC,type:2,optional:!0,value:[{name:"rsapss.saltLength.saltLength",tagClass:i.Class.UNIVERSAL,type:i.Class.INTEGER,constructed:!1,capture:"saltLength"}]},{name:"rsapss.trailerField",tagClass:i.Class.CONTEXT_SPECIFIC,type:3,optional:!0,value:[{name:"rsapss.trailer.trailer",tagClass:i.Class.UNIVERSAL,type:i.Class.INTEGER,constructed:!1,capture:"trailer"}]}]},h={name:"CertificationRequestInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfo",value:[{name:"CertificationRequestInfo.integer",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"certificationRequestInfoVersion"},{name:"CertificationRequestInfo.subject",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfoSubject"},c,{name:"CertificationRequestInfo.attributes",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"certificationRequestInfoAttributes",value:[{name:"CertificationRequestInfo.attributes",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequestInfo.attributes.type",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1},{name:"CertificationRequestInfo.attributes.value",tagClass:i.Class.UNIVERSAL,type:i.Type.SET,constructed:!0}]}]}]},l={name:"CertificationRequest",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"csr",value:[h,{name:"CertificationRequest.signatureAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequest.signatureAlgorithm.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"csrSignatureOid"},{name:"CertificationRequest.signatureAlgorithm.parameters",tagClass:i.Class.UNIVERSAL,optional:!0,captureAsn1:"csrSignatureParams"}]},{name:"CertificationRequest.signature",tagClass:i.Class.UNIVERSAL,type:i.Type.BITSTRING,constructed:!1,captureBitStringValue:"csrSignature"}]};function d(e,t){"string"==typeof t&&(t={shortName:t});for(var r,n=null,i=0;null===n&&i<e.attributes.length;++i)r=e.attributes[i],(t.type&&t.type===r.type||t.name&&t.name===r.name||t.shortName&&t.shortName===r.shortName)&&(n=r);return n}a.RDNAttributesAsArray=function(e,t){for(var r,n,a,c=[],u=0;u<e.value.length;++u){r=e.value[u];for(var f=0;f<r.value.length;++f)a={},n=r.value[f],a.type=i.derToOid(n.value[0].value),a.value=n.value[1].value,a.valueTagClass=n.value[1].type,a.type in o&&(a.name=o[a.type],a.name in s&&(a.shortName=s[a.name])),t&&(t.update(a.type),t.update(a.value)),c.push(a)}return c},a.CRIAttributesAsArray=function(e){for(var t=[],r=0;r<e.length;++r)for(var n=e[r],c=i.derToOid(n.value[0].value),u=n.value[1].value,f=0;f<u.length;++f){var h={};if(h.type=c,h.value=u[f].value,h.valueTagClass=u[f].type,h.type in o&&(h.name=o[h.type],h.name in s&&(h.shortName=s[h.name])),h.type===o.extensionRequest){h.extensions=[];for(var l=0;l<h.value.length;++l)h.extensions.push(a.certificateExtensionFromAsn1(h.value[l]))}t.push(h)}return t};var p=function(e,t,r){var n={};if(e!==o["RSASSA-PSS"])return n;r&&(n={hash:{algorithmOid:o.sha1},mgf:{algorithmOid:o.mgf1,hash:{algorithmOid:o.sha1}},saltLength:20});var a={},s=[];if(!i.validate(t,f,a,s)){var c=new Error("Cannot read RSASSA-PSS parameter block.");throw c.errors=s,c}return void 0!==a.hashOid&&(n.hash=n.hash||{},n.hash.algorithmOid=i.derToOid(a.hashOid)),void 0!==a.maskGenOid&&(n.mgf=n.mgf||{},n.mgf.algorithmOid=i.derToOid(a.maskGenOid),n.mgf.hash=n.mgf.hash||{},n.mgf.hash.algorithmOid=i.derToOid(a.maskGenHashOid)),void 0!==a.saltLength&&(n.saltLength=a.saltLength.charCodeAt(0)),n},y=function(e){switch(o[e.signatureOid]){case"sha1WithRSAEncryption":case"sha1WithRSASignature":return n.md.sha1.create();case"md5WithRSAEncryption":return n.md.md5.create();case"sha256WithRSAEncryption":case"RSASSA-PSS":return n.md.sha256.create();case"sha384WithRSAEncryption":return n.md.sha384.create();case"sha512WithRSAEncryption":return n.md.sha512.create();default:var t=new Error("Could not compute "+e.type+" digest. Unknown signature OID.");throw t.signatureOid=e.signatureOid,t}},g=function(e){var t,r=e.certificate;switch(r.signatureOid){case o.sha1WithRSAEncryption:case o.sha1WithRSASignature:break;case o["RSASSA-PSS"]:var i,a,s;if(void 0===(i=o[r.signatureParameters.mgf.hash.algorithmOid])||void 0===n.md[i])throw(s=new Error("Unsupported MGF hash function.")).oid=r.signatureParameters.mgf.hash.algorithmOid,s.name=i,s;if(void 0===(a=o[r.signatureParameters.mgf.algorithmOid])||void 0===n.mgf[a])throw(s=new Error("Unsupported MGF function.")).oid=r.signatureParameters.mgf.algorithmOid,s.name=a,s;if(a=n.mgf[a].create(n.md[i].create()),void 0===(i=o[r.signatureParameters.hash.algorithmOid])||void 0===n.md[i])throw(s=new Error("Unsupported RSASSA-PSS hash function.")).oid=r.signatureParameters.hash.algorithmOid,s.name=i,s;t=n.pss.create(n.md[i].create(),a,r.signatureParameters.saltLength)}return r.publicKey.verify(e.md.digest().getBytes(),e.signature,t)};function v(e){for(var t,r,a=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[]),o=e.attributes,s=0;s<o.length;++s){var c=(t=o[s]).value,u=i.Type.PRINTABLESTRING;"valueTagClass"in t&&(u=t.valueTagClass)===i.Type.UTF8&&(c=n.util.encodeUtf8(c)),r=i.create(i.Class.UNIVERSAL,i.Type.SET,!0,[i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(t.type).getBytes()),i.create(i.Class.UNIVERSAL,u,!1,c)])]),a.value.push(r)}return a}function m(e){for(var t,r=0;r<e.length;++r){if(void 0===(t=e[r]).name&&(t.type&&t.type in a.oids?t.name=a.oids[t.type]:t.shortName&&t.shortName in s&&(t.name=a.oids[s[t.shortName]])),void 0===t.type){if(!t.name||!(t.name in a.oids))throw(c=new Error("Attribute type not specified.")).attribute=t,c;t.type=a.oids[t.name]}if(void 0===t.shortName&&t.name&&t.name in s&&(t.shortName=s[t.name]),t.type===o.extensionRequest&&(t.valueConstructed=!0,t.valueTagClass=i.Type.SEQUENCE,!t.value&&t.extensions)){t.value=[];for(var n=0;n<t.extensions.length;++n)t.value.push(a.certificateExtensionToAsn1(b(t.extensions[n])))}var c;if(void 0===t.value)throw(c=new Error("Attribute value not specified.")).attribute=t,c}}function b(e,t){if(t=t||{},void 0===e.name&&e.id&&e.id in a.oids&&(e.name=a.oids[e.id]),void 0===e.id){if(!e.name||!(e.name in a.oids))throw(C=new Error("Extension ID not specified.")).extension=e,C;e.id=a.oids[e.name]}if(void 0!==e.value)return e;if("keyUsage"===e.name){var r=0,s=0,c=0;e.digitalSignature&&(s|=128,r=7),e.nonRepudiation&&(s|=64,r=6),e.keyEncipherment&&(s|=32,r=5),e.dataEncipherment&&(s|=16,r=4),e.keyAgreement&&(s|=8,r=3),e.keyCertSign&&(s|=4,r=2),e.cRLSign&&(s|=2,r=1),e.encipherOnly&&(s|=1,r=0),e.decipherOnly&&(c|=128,r=7);var u=String.fromCharCode(r);0!==c?u+=String.fromCharCode(s)+String.fromCharCode(c):0!==s&&(u+=String.fromCharCode(s)),e.value=i.create(i.Class.UNIVERSAL,i.Type.BITSTRING,!1,u)}else if("basicConstraints"===e.name)e.value=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[]),e.cA&&e.value.value.push(i.create(i.Class.UNIVERSAL,i.Type.BOOLEAN,!1,String.fromCharCode(255))),"pathLenConstraint"in e&&e.value.value.push(i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,i.integerToDer(e.pathLenConstraint).getBytes()));else if("extKeyUsage"===e.name){e.value=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[]);var f=e.value.value;for(var h in e)!0===e[h]&&(h in o?f.push(i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(o[h]).getBytes())):-1!==h.indexOf(".")&&f.push(i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(h).getBytes())))}else if("nsCertType"===e.name)r=0,s=0,e.client&&(s|=128,r=7),e.server&&(s|=64,r=6),e.email&&(s|=32,r=5),e.objsign&&(s|=16,r=4),e.reserved&&(s|=8,r=3),e.sslCA&&(s|=4,r=2),e.emailCA&&(s|=2,r=1),e.objCA&&(s|=1,r=0),u=String.fromCharCode(r),0!==s&&(u+=String.fromCharCode(s)),e.value=i.create(i.Class.UNIVERSAL,i.Type.BITSTRING,!1,u);else if("subjectAltName"===e.name||"issuerAltName"===e.name){e.value=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[]);for(var l=0;l<e.altNames.length;++l){if(u=(m=e.altNames[l]).value,7===m.type&&m.ip){if(null===(u=n.util.bytesFromIP(m.ip)))throw(C=new Error('Extension "ip" value is not a valid IPv4 or IPv6 address.')).extension=e,C}else 8===m.type&&(u=m.oid?i.oidToDer(i.oidToDer(m.oid)):i.oidToDer(u));e.value.value.push(i.create(i.Class.CONTEXT_SPECIFIC,m.type,!1,u))}}else if("nsComment"===e.name&&t.cert){if(!/^[\x00-\x7F]*$/.test(e.comment)||e.comment.length<1||e.comment.length>128)throw new Error('Invalid "nsComment" content.');e.value=i.create(i.Class.UNIVERSAL,i.Type.IA5STRING,!1,e.comment)}else if("subjectKeyIdentifier"===e.name&&t.cert){var d=t.cert.generateSubjectKeyIdentifier();e.subjectKeyIdentifier=d.toHex(),e.value=i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,d.getBytes())}else if("authorityKeyIdentifier"===e.name&&t.cert){if(e.value=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[]),f=e.value.value,e.keyIdentifier){var p=!0===e.keyIdentifier?t.cert.generateSubjectKeyIdentifier().getBytes():e.keyIdentifier;f.push(i.create(i.Class.CONTEXT_SPECIFIC,0,!1,p))}if(e.authorityCertIssuer){var y=[i.create(i.Class.CONTEXT_SPECIFIC,4,!0,[v(!0===e.authorityCertIssuer?t.cert.issuer:e.authorityCertIssuer)])];f.push(i.create(i.Class.CONTEXT_SPECIFIC,1,!0,y))}if(e.serialNumber){var g=n.util.hexToBytes(!0===e.serialNumber?t.cert.serialNumber:e.serialNumber);f.push(i.create(i.Class.CONTEXT_SPECIFIC,2,!1,g))}}else if("cRLDistributionPoints"===e.name){e.value=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[]),f=e.value.value;var m,b=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[]),w=i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[]);for(l=0;l<e.altNames.length;++l){if(u=(m=e.altNames[l]).value,7===m.type&&m.ip){if(null===(u=n.util.bytesFromIP(m.ip)))throw(C=new Error('Extension "ip" value is not a valid IPv4 or IPv6 address.')).extension=e,C}else 8===m.type&&(u=m.oid?i.oidToDer(i.oidToDer(m.oid)):i.oidToDer(u));w.value.push(i.create(i.Class.CONTEXT_SPECIFIC,m.type,!1,u))}b.value.push(i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[w])),f.push(b)}var C;if(void 0===e.value)throw(C=new Error("Extension value not specified.")).extension=e,C;return e}function w(e,t){if(e===o["RSASSA-PSS"]){var r=[];return void 0!==t.hash.algorithmOid&&r.push(i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(t.hash.algorithmOid).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.NULL,!1,"")])])),void 0!==t.mgf.algorithmOid&&r.push(i.create(i.Class.CONTEXT_SPECIFIC,1,!0,[i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(t.mgf.algorithmOid).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(t.mgf.hash.algorithmOid).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.NULL,!1,"")])])])),void 0!==t.saltLength&&r.push(i.create(i.Class.CONTEXT_SPECIFIC,2,!0,[i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,i.integerToDer(t.saltLength).getBytes())])),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,r)}return i.create(i.Class.UNIVERSAL,i.Type.NULL,!1,"")}function C(e){var t=i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[]);if(0===e.attributes.length)return t;for(var r=e.attributes,a=0;a<r.length;++a){var o=r[a],s=o.value,c=i.Type.UTF8;"valueTagClass"in o&&(c=o.valueTagClass),c===i.Type.UTF8&&(s=n.util.encodeUtf8(s));var u=!1;"valueConstructed"in o&&(u=o.valueConstructed);var f=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(o.type).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.SET,!0,[i.create(i.Class.UNIVERSAL,c,u,s)])]);t.value.push(f)}return t}a.certificateFromPem=function(e,t,r){var o=n.pem.decode(e)[0];if("CERTIFICATE"!==o.type&&"X509 CERTIFICATE"!==o.type&&"TRUSTED CERTIFICATE"!==o.type){var s=new Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');throw s.headerType=o.type,s}if(o.procType&&"ENCRYPTED"===o.procType.type)throw new Error("Could not convert certificate from PEM; PEM is encrypted.");var c=i.fromDer(o.body,r);return a.certificateFromAsn1(c,t)},a.certificateToPem=function(e,t){var r={type:"CERTIFICATE",body:i.toDer(a.certificateToAsn1(e)).getBytes()};return n.pem.encode(r,{maxline:t})},a.publicKeyFromPem=function(e){var t=n.pem.decode(e)[0];if("PUBLIC KEY"!==t.type&&"RSA PUBLIC KEY"!==t.type){var r=new Error('Could not convert public key from PEM; PEM header type is not "PUBLIC KEY" or "RSA PUBLIC KEY".');throw r.headerType=t.type,r}if(t.procType&&"ENCRYPTED"===t.procType.type)throw new Error("Could not convert public key from PEM; PEM is encrypted.");var o=i.fromDer(t.body);return a.publicKeyFromAsn1(o)},a.publicKeyToPem=function(e,t){var r={type:"PUBLIC KEY",body:i.toDer(a.publicKeyToAsn1(e)).getBytes()};return n.pem.encode(r,{maxline:t})},a.publicKeyToRSAPublicKeyPem=function(e,t){var r={type:"RSA PUBLIC KEY",body:i.toDer(a.publicKeyToRSAPublicKey(e)).getBytes()};return n.pem.encode(r,{maxline:t})},a.getPublicKeyFingerprint=function(e,t){var r,o=(t=t||{}).md||n.md.sha1.create();switch(t.type||"RSAPublicKey"){case"RSAPublicKey":r=i.toDer(a.publicKeyToRSAPublicKey(e)).getBytes();break;case"SubjectPublicKeyInfo":r=i.toDer(a.publicKeyToAsn1(e)).getBytes();break;default:throw new Error('Unknown fingerprint type "'+t.type+'".')}o.start(),o.update(r);var s=o.digest();if("hex"===t.encoding){var c=s.toHex();return t.delimiter?c.match(/.{2}/g).join(t.delimiter):c}if("binary"===t.encoding)return s.getBytes();if(t.encoding)throw new Error('Unknown encoding "'+t.encoding+'".');return s},a.certificationRequestFromPem=function(e,t,r){var o=n.pem.decode(e)[0];if("CERTIFICATE REQUEST"!==o.type){var s=new Error('Could not convert certification request from PEM; PEM header type is not "CERTIFICATE REQUEST".');throw s.headerType=o.type,s}if(o.procType&&"ENCRYPTED"===o.procType.type)throw new Error("Could not convert certification request from PEM; PEM is encrypted.");var c=i.fromDer(o.body,r);return a.certificationRequestFromAsn1(c,t)},a.certificationRequestToPem=function(e,t){var r={type:"CERTIFICATE REQUEST",body:i.toDer(a.certificationRequestToAsn1(e)).getBytes()};return n.pem.encode(r,{maxline:t})},a.createCertificate=function(){var e={version:2,serialNumber:"00",signatureOid:null,signature:null,siginfo:{}};return e.siginfo.algorithmOid=null,e.validity={},e.validity.notBefore=new Date,e.validity.notAfter=new Date,e.issuer={},e.issuer.getField=function(t){return d(e.issuer,t)},e.issuer.addField=function(t){m([t]),e.issuer.attributes.push(t)},e.issuer.attributes=[],e.issuer.hash=null,e.subject={},e.subject.getField=function(t){return d(e.subject,t)},e.subject.addField=function(t){m([t]),e.subject.attributes.push(t)},e.subject.attributes=[],e.subject.hash=null,e.extensions=[],e.publicKey=null,e.md=null,e.setSubject=function(t,r){m(t),e.subject.attributes=t,delete e.subject.uniqueId,r&&(e.subject.uniqueId=r),e.subject.hash=null},e.setIssuer=function(t,r){m(t),e.issuer.attributes=t,delete e.issuer.uniqueId,r&&(e.issuer.uniqueId=r),e.issuer.hash=null},e.setExtensions=function(t){for(var r=0;r<t.length;++r)b(t[r],{cert:e});e.extensions=t},e.getExtension=function(t){"string"==typeof t&&(t={name:t});for(var r,n=null,i=0;null===n&&i<e.extensions.length;++i)r=e.extensions[i],(t.id&&r.id===t.id||t.name&&r.name===t.name)&&(n=r);return n},e.sign=function(t,r){e.md=r||n.md.sha1.create();var s=o[e.md.algorithm+"WithRSAEncryption"];if(!s){var c=new Error("Could not compute certificate digest. Unknown message digest algorithm OID.");throw c.algorithm=e.md.algorithm,c}e.signatureOid=e.siginfo.algorithmOid=s,e.tbsCertificate=a.getTBSCertificate(e);var u=i.toDer(e.tbsCertificate);e.md.update(u.getBytes()),e.signature=t.sign(e.md)},e.verify=function(t){var r=!1;if(!e.issued(t)){var n=t.issuer,o=e.subject,s=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 s.expectedIssuer=o.attributes,s.actualIssuer=n.attributes,s}var c=t.md;if(null===c){c=y({signatureOid:t.signatureOid,type:"certificate"});var u=t.tbsCertificate||a.getTBSCertificate(t),f=i.toDer(u);c.update(f.getBytes())}return null!==c&&(r=g({certificate:e,md:c,signature:t.signature})),r},e.isIssuer=function(t){var r=!1,n=e.issuer,i=t.subject;if(n.hash&&i.hash)r=n.hash===i.hash;else if(n.attributes.length===i.attributes.length){var a,o;r=!0;for(var s=0;r&&s<n.attributes.length;++s)a=n.attributes[s],o=i.attributes[s],a.type===o.type&&a.value===o.value||(r=!1)}return r},e.issued=function(t){return t.isIssuer(e)},e.generateSubjectKeyIdentifier=function(){return a.getPublicKeyFingerprint(e.publicKey,{type:"RSAPublicKey"})},e.verifySubjectKeyIdentifier=function(){for(var t=o.subjectKeyIdentifier,r=0;r<e.extensions.length;++r){var i=e.extensions[r];if(i.id===t){var a=e.generateSubjectKeyIdentifier().getBytes();return n.util.hexToBytes(i.subjectKeyIdentifier)===a}}return!1},e},a.certificateFromAsn1=function(e,t){var r={},o=[];if(!i.validate(e,u,r,o)){var s=new Error("Cannot read X.509 certificate. ASN.1 object is not an X509v3 Certificate.");throw s.errors=o,s}if(i.derToOid(r.publicKeyOid)!==a.oids.rsaEncryption)throw new Error("Cannot read public key. OID is not RSA.");var c=a.createCertificate();c.version=r.certVersion?r.certVersion.charCodeAt(0):0;var f=n.util.createBuffer(r.certSerialNumber);c.serialNumber=f.toHex(),c.signatureOid=n.asn1.derToOid(r.certSignatureOid),c.signatureParameters=p(c.signatureOid,r.certSignatureParams,!0),c.siginfo.algorithmOid=n.asn1.derToOid(r.certinfoSignatureOid),c.siginfo.parameters=p(c.siginfo.algorithmOid,r.certinfoSignatureParams,!1),c.signature=r.certSignature;var h=[];if(void 0!==r.certValidity1UTCTime&&h.push(i.utcTimeToDate(r.certValidity1UTCTime)),void 0!==r.certValidity2GeneralizedTime&&h.push(i.generalizedTimeToDate(r.certValidity2GeneralizedTime)),void 0!==r.certValidity3UTCTime&&h.push(i.utcTimeToDate(r.certValidity3UTCTime)),void 0!==r.certValidity4GeneralizedTime&&h.push(i.generalizedTimeToDate(r.certValidity4GeneralizedTime)),h.length>2)throw new Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(h.length<2)throw new Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");if(c.validity.notBefore=h[0],c.validity.notAfter=h[1],c.tbsCertificate=r.tbsCertificate,t){c.md=y({signatureOid:c.signatureOid,type:"certificate"});var l=i.toDer(c.tbsCertificate);c.md.update(l.getBytes())}var g=n.md.sha1.create(),v=i.toDer(r.certIssuer);g.update(v.getBytes()),c.issuer.getField=function(e){return d(c.issuer,e)},c.issuer.addField=function(e){m([e]),c.issuer.attributes.push(e)},c.issuer.attributes=a.RDNAttributesAsArray(r.certIssuer),r.certIssuerUniqueId&&(c.issuer.uniqueId=r.certIssuerUniqueId),c.issuer.hash=g.digest().toHex();var b=n.md.sha1.create(),w=i.toDer(r.certSubject);return b.update(w.getBytes()),c.subject.getField=function(e){return d(c.subject,e)},c.subject.addField=function(e){m([e]),c.subject.attributes.push(e)},c.subject.attributes=a.RDNAttributesAsArray(r.certSubject),r.certSubjectUniqueId&&(c.subject.uniqueId=r.certSubjectUniqueId),c.subject.hash=b.digest().toHex(),r.certExtensions?c.extensions=a.certificateExtensionsFromAsn1(r.certExtensions):c.extensions=[],c.publicKey=a.publicKeyFromAsn1(r.subjectPublicKeyInfo),c},a.certificateExtensionsFromAsn1=function(e){for(var t=[],r=0;r<e.value.length;++r)for(var n=e.value[r],i=0;i<n.value.length;++i)t.push(a.certificateExtensionFromAsn1(n.value[i]));return t},a.certificateExtensionFromAsn1=function(e){var t={};if(t.id=i.derToOid(e.value[0].value),t.critical=!1,e.value[1].type===i.Type.BOOLEAN?(t.critical=0!==e.value[1].value.charCodeAt(0),t.value=e.value[2].value):t.value=e.value[1].value,t.id in o)if(t.name=o[t.id],"keyUsage"===t.name){var r=0,a=0;(c=i.fromDer(t.value)).value.length>1&&(r=c.value.charCodeAt(1),a=c.value.length>2?c.value.charCodeAt(2):0),t.digitalSignature=128==(128&r),t.nonRepudiation=64==(64&r),t.keyEncipherment=32==(32&r),t.dataEncipherment=16==(16&r),t.keyAgreement=8==(8&r),t.keyCertSign=4==(4&r),t.cRLSign=2==(2&r),t.encipherOnly=1==(1&r),t.decipherOnly=128==(128&a)}else if("basicConstraints"===t.name){(c=i.fromDer(t.value)).value.length>0&&c.value[0].type===i.Type.BOOLEAN?t.cA=0!==c.value[0].value.charCodeAt(0):t.cA=!1;var s=null;c.value.length>0&&c.value[0].type===i.Type.INTEGER?s=c.value[0].value:c.value.length>1&&(s=c.value[1].value),null!==s&&(t.pathLenConstraint=i.derToInteger(s))}else if("extKeyUsage"===t.name)for(var c=i.fromDer(t.value),u=0;u<c.value.length;++u){var f=i.derToOid(c.value[u].value);f in o?t[o[f]]=!0:t[f]=!0}else if("nsCertType"===t.name)r=0,(c=i.fromDer(t.value)).value.length>1&&(r=c.value.charCodeAt(1)),t.client=128==(128&r),t.server=64==(64&r),t.email=32==(32&r),t.objsign=16==(16&r),t.reserved=8==(8&r),t.sslCA=4==(4&r),t.emailCA=2==(2&r),t.objCA=1==(1&r);else if("subjectAltName"===t.name||"issuerAltName"===t.name){var h;t.altNames=[],c=i.fromDer(t.value);for(var l=0;l<c.value.length;++l){var d={type:(h=c.value[l]).type,value:h.value};switch(t.altNames.push(d),h.type){case 1:case 2:case 6:break;case 7:d.ip=n.util.bytesToIP(h.value);break;case 8:d.oid=i.derToOid(h.value)}}}else"subjectKeyIdentifier"===t.name&&(c=i.fromDer(t.value),t.subjectKeyIdentifier=n.util.bytesToHex(c.value));return t},a.certificationRequestFromAsn1=function(e,t){var r={},o=[];if(!i.validate(e,l,r,o)){var s=new Error("Cannot read PKCS#10 certificate request. ASN.1 object is not a PKCS#10 CertificationRequest.");throw s.errors=o,s}if(i.derToOid(r.publicKeyOid)!==a.oids.rsaEncryption)throw new Error("Cannot read public key. OID is not RSA.");var c=a.createCertificationRequest();if(c.version=r.csrVersion?r.csrVersion.charCodeAt(0):0,c.signatureOid=n.asn1.derToOid(r.csrSignatureOid),c.signatureParameters=p(c.signatureOid,r.csrSignatureParams,!0),c.siginfo.algorithmOid=n.asn1.derToOid(r.csrSignatureOid),c.siginfo.parameters=p(c.siginfo.algorithmOid,r.csrSignatureParams,!1),c.signature=r.csrSignature,c.certificationRequestInfo=r.certificationRequestInfo,t){c.md=y({signatureOid:c.signatureOid,type:"certification request"});var u=i.toDer(c.certificationRequestInfo);c.md.update(u.getBytes())}var f=n.md.sha1.create();return c.subject.getField=function(e){return d(c.subject,e)},c.subject.addField=function(e){m([e]),c.subject.attributes.push(e)},c.subject.attributes=a.RDNAttributesAsArray(r.certificationRequestInfoSubject,f),c.subject.hash=f.digest().toHex(),c.publicKey=a.publicKeyFromAsn1(r.subjectPublicKeyInfo),c.getAttribute=function(e){return d(c,e)},c.addAttribute=function(e){m([e]),c.attributes.push(e)},c.attributes=a.CRIAttributesAsArray(r.certificationRequestInfoAttributes||[]),c},a.createCertificationRequest=function(){var e={version:0,signatureOid:null,signature:null,siginfo:{}};return e.siginfo.algorithmOid=null,e.subject={},e.subject.getField=function(t){return d(e.subject,t)},e.subject.addField=function(t){m([t]),e.subject.attributes.push(t)},e.subject.attributes=[],e.subject.hash=null,e.publicKey=null,e.attributes=[],e.getAttribute=function(t){return d(e,t)},e.addAttribute=function(t){m([t]),e.attributes.push(t)},e.md=null,e.setSubject=function(t){m(t),e.subject.attributes=t,e.subject.hash=null},e.setAttributes=function(t){m(t),e.attributes=t},e.sign=function(t,r){e.md=r||n.md.sha1.create();var s=o[e.md.algorithm+"WithRSAEncryption"];if(!s){var c=new Error("Could not compute certification request digest. Unknown message digest algorithm OID.");throw c.algorithm=e.md.algorithm,c}e.signatureOid=e.siginfo.algorithmOid=s,e.certificationRequestInfo=a.getCertificationRequestInfo(e);var u=i.toDer(e.certificationRequestInfo);e.md.update(u.getBytes()),e.signature=t.sign(e.md)},e.verify=function(){var t=!1,r=e.md;if(null===r){r=y({signatureOid:e.signatureOid,type:"certification request"});var n=e.certificationRequestInfo||a.getCertificationRequestInfo(e),o=i.toDer(n);r.update(o.getBytes())}return null!==r&&(t=g({certificate:e,md:r,signature:e.signature})),t},e};var E=new Date("1950-01-01T00:00:00Z"),S=new Date("2050-01-01T00:00:00Z");function A(e){return e>=E&&e<S?i.create(i.Class.UNIVERSAL,i.Type.UTCTIME,!1,i.dateToUtcTime(e)):i.create(i.Class.UNIVERSAL,i.Type.GENERALIZEDTIME,!1,i.dateToGeneralizedTime(e))}a.getTBSCertificate=function(e){var t=A(e.validity.notBefore),r=A(e.validity.notAfter),o=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,i.integerToDer(e.version).getBytes())]),i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,n.util.hexToBytes(e.serialNumber)),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(e.siginfo.algorithmOid).getBytes()),w(e.siginfo.algorithmOid,e.siginfo.parameters)]),v(e.issuer),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[t,r]),v(e.subject),a.publicKeyToAsn1(e.publicKey)]);return e.issuer.uniqueId&&o.value.push(i.create(i.Class.CONTEXT_SPECIFIC,1,!0,[i.create(i.Class.UNIVERSAL,i.Type.BITSTRING,!1,String.fromCharCode(0)+e.issuer.uniqueId)])),e.subject.uniqueId&&o.value.push(i.create(i.Class.CONTEXT_SPECIFIC,2,!0,[i.create(i.Class.UNIVERSAL,i.Type.BITSTRING,!1,String.fromCharCode(0)+e.subject.uniqueId)])),e.extensions.length>0&&o.value.push(a.certificateExtensionsToAsn1(e.extensions)),o},a.getCertificationRequestInfo=function(e){return i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,i.integerToDer(e.version).getBytes()),v(e.subject),a.publicKeyToAsn1(e.publicKey),C(e)])},a.distinguishedNameToAsn1=function(e){return v(e)},a.certificateToAsn1=function(e){var t=e.tbsCertificate||a.getTBSCertificate(e);return i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[t,i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(e.signatureOid).getBytes()),w(e.signatureOid,e.signatureParameters)]),i.create(i.Class.UNIVERSAL,i.Type.BITSTRING,!1,String.fromCharCode(0)+e.signature)])},a.certificateExtensionsToAsn1=function(e){var t=i.create(i.Class.CONTEXT_SPECIFIC,3,!0,[]),r=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[]);t.value.push(r);for(var n=0;n<e.length;++n)r.value.push(a.certificateExtensionToAsn1(e[n]));return t},a.certificateExtensionToAsn1=function(e){var t=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[]);t.value.push(i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(e.id).getBytes())),e.critical&&t.value.push(i.create(i.Class.UNIVERSAL,i.Type.BOOLEAN,!1,String.fromCharCode(255)));var r=e.value;return"string"!=typeof e.value&&(r=i.toDer(r).getBytes()),t.value.push(i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,r)),t},a.certificationRequestToAsn1=function(e){var t=e.certificationRequestInfo||a.getCertificationRequestInfo(e);return i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[t,i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(e.signatureOid).getBytes()),w(e.signatureOid,e.signatureParameters)]),i.create(i.Class.UNIVERSAL,i.Type.BITSTRING,!1,String.fromCharCode(0)+e.signature)])},a.createCaStore=function(e){var t={certs:{}};function r(e){return o(e),t.certs[e.hash]||null}function o(e){if(!e.hash){var t=n.md.sha1.create();e.attributes=a.RDNAttributesAsArray(v(e),t),e.hash=t.digest().toHex()}}if(t.getIssuer=function(e){return r(e.issuer)},t.addCertificate=function(e){if("string"==typeof e&&(e=n.pki.certificateFromPem(e)),o(e.subject),!t.hasCertificate(e))if(e.subject.hash in t.certs){var r=t.certs[e.subject.hash];n.util.isArray(r)||(r=[r]),r.push(e),t.certs[e.subject.hash]=r}else t.certs[e.subject.hash]=e},t.hasCertificate=function(e){"string"==typeof e&&(e=n.pki.certificateFromPem(e));var t=r(e.subject);if(!t)return!1;n.util.isArray(t)||(t=[t]);for(var o=i.toDer(a.certificateToAsn1(e)).getBytes(),s=0;s<t.length;++s)if(o===i.toDer(a.certificateToAsn1(t[s])).getBytes())return!0;return!1},t.listAllCertificates=function(){var e=[];for(var r in t.certs)if(t.certs.hasOwnProperty(r)){var i=t.certs[r];if(n.util.isArray(i))for(var a=0;a<i.length;++a)e.push(i[a]);else e.push(i)}return e},t.removeCertificate=function(e){var s;if("string"==typeof e&&(e=n.pki.certificateFromPem(e)),o(e.subject),!t.hasCertificate(e))return null;var c=r(e.subject);if(!n.util.isArray(c))return s=t.certs[e.subject.hash],delete t.certs[e.subject.hash],s;for(var u=i.toDer(a.certificateToAsn1(e)).getBytes(),f=0;f<c.length;++f)u===i.toDer(a.certificateToAsn1(c[f])).getBytes()&&(s=c[f],c.splice(f,1));return 0===c.length&&delete t.certs[e.subject.hash],s},e)for(var s=0;s<e.length;++s){var c=e[s];t.addCertificate(c)}return t},a.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"},a.verifyCertificateChain=function(e,t,r){"function"==typeof r&&(r={verify:r}),r=r||{};var i=(t=t.slice(0)).slice(0),o=r.validityCheckDate;void 0===o&&(o=new Date);var s=!0,c=null,u=0;do{var f=t.shift(),h=null,l=!1;if(o&&(o<f.validity.notBefore||o>f.validity.notAfter)&&(c={message:"Certificate is not valid yet or has expired.",error:a.certificateError.certificate_expired,notBefore:f.validity.notBefore,notAfter:f.validity.notAfter,now:o}),null===c){if(null===(h=t[0]||e.getIssuer(f))&&f.isIssuer(f)&&(l=!0,h=f),h){var d=h;n.util.isArray(d)||(d=[d]);for(var p=!1;!p&&d.length>0;){h=d.shift();try{p=h.verify(f)}catch(e){}}p||(c={message:"Certificate signature is invalid.",error:a.certificateError.bad_certificate})}null!==c||h&&!l||e.hasCertificate(f)||(c={message:"Certificate is not trusted.",error:a.certificateError.unknown_ca})}if(null===c&&h&&!f.isIssuer(h)&&(c={message:"Certificate issuer is invalid.",error:a.certificateError.bad_certificate}),null===c)for(var y={keyUsage:!0,basicConstraints:!0},g=0;null===c&&g<f.extensions.length;++g){var v=f.extensions[g];v.critical&&!(v.name in y)&&(c={message:"Certificate has an unsupported critical extension.",error:a.certificateError.unsupported_certificate})}if(null===c&&(!s||0===t.length&&(!h||l))){var m=f.getExtension("basicConstraints"),b=f.getExtension("keyUsage");null!==b&&(b.keyCertSign&&null!==m||(c={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:a.certificateError.bad_certificate})),null!==c||null===m||m.cA||(c={message:"Certificate basicConstraints indicates the certificate is not a CA.",error:a.certificateError.bad_certificate}),null===c&&null!==b&&"pathLenConstraint"in m&&u-1>m.pathLenConstraint&&(c={message:"Certificate basicConstraints pathLenConstraint violated.",error:a.certificateError.bad_certificate})}var w=null===c||c.error,C=r.verify?r.verify(w,u,i):w;if(!0!==C)throw!0===w&&(c={message:"The application rejected the certificate.",error:a.certificateError.bad_certificate}),(C||0===C)&&("object"!=typeof C||n.util.isArray(C)?"string"==typeof C&&(c.error=C):(C.message&&(c.message=C.message),C.error&&(c.error=C.error))),c;c=null,s=!1,++u}while(t.length>0);return!0}},56220:function(e,t,r){var n,i;!function(a,o){"use strict";n=function(){var e=function(){},t="undefined",r=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),n=["trace","debug","info","warn","error"],i={},a=null;function o(e,t){var r=e[t];if("function"==typeof r.bind)return r.bind(e);try{return Function.prototype.bind.call(r,e)}catch(t){return function(){return Function.prototype.apply.apply(r,[e,arguments])}}}function s(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function c(){for(var r=this.getLevel(),i=0;i<n.length;i++){var a=n[i];this[a]=i<r?e:this.methodFactory(a,r,this.name)}if(this.log=this.debug,typeof console===t&&r<this.levels.SILENT)return"No console available for logging"}function u(e){return function(){typeof console!==t&&(c.call(this),this[e].apply(this,arguments))}}function f(n,i,a){return function(n){return"debug"===n&&(n="log"),typeof console!==t&&("trace"===n&&r?s:void 0!==console[n]?o(console,n):void 0!==console.log?o(console,"log"):e)}(n)||u.apply(this,arguments)}function h(e,r){var o,s,u,h=this,l="loglevel";function d(){var e;if(typeof window!==t&&l){try{e=window.localStorage[l]}catch(e){}if(typeof e===t)try{var r=window.document.cookie,n=encodeURIComponent(l),i=r.indexOf(n+"=");-1!==i&&(e=/^([^;]+)/.exec(r.slice(i+n.length+1))[1])}catch(e){}return void 0===h.levels[e]&&(e=void 0),e}}function p(e){var t=e;if("string"==typeof t&&void 0!==h.levels[t.toUpperCase()]&&(t=h.levels[t.toUpperCase()]),"number"==typeof t&&t>=0&&t<=h.levels.SILENT)return t;throw new TypeError("log.setLevel() called with invalid level: "+e)}"string"==typeof e?l+=":"+e:"symbol"==typeof e&&(l=void 0),h.name=e,h.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},h.methodFactory=r||f,h.getLevel=function(){return null!=u?u:null!=s?s:o},h.setLevel=function(e,r){return u=p(e),!1!==r&&function(e){var r=(n[e]||"silent").toUpperCase();if(typeof window!==t&&l){try{return void(window.localStorage[l]=r)}catch(e){}try{window.document.cookie=encodeURIComponent(l)+"="+r+";"}catch(e){}}}(u),c.call(h)},h.setDefaultLevel=function(e){s=p(e),d()||h.setLevel(e,!1)},h.resetLevel=function(){u=null,function(){if(typeof window!==t&&l){try{window.localStorage.removeItem(l)}catch(e){}try{window.document.cookie=encodeURIComponent(l)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch(e){}}}(),c.call(h)},h.enableAll=function(e){h.setLevel(h.levels.TRACE,e)},h.disableAll=function(e){h.setLevel(h.levels.SILENT,e)},h.rebuild=function(){if(a!==h&&(o=p(a.getLevel())),c.call(h),a===h)for(var e in i)i[e].rebuild()},o=p(a?a.getLevel():"WARN");var y=d();null!=y&&(u=p(y)),c.call(h)}(a=new h).getLogger=function(e){if("symbol"!=typeof e&&"string"!=typeof e||""===e)throw new TypeError("You must supply a name when creating a logger.");var t=i[e];return t||(t=i[e]=new h(e,a.methodFactory)),t};var l=typeof window!==t?window.log:void 0;return a.noConflict=function(){return typeof window!==t&&window.log===a&&(window.log=l),a},a.getLoggers=function(){return i},a.default=a,a},void 0===(i=n.call(t,r,t,e))||(e.exports=i)}()},26512:e=>{var t,r,n=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function o(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var s,c=[],u=!1,f=-1;function h(){u&&s&&(u=!1,s.length?c=s.concat(c):f=-1,c.length&&l())}function l(){if(!u){var e=o(h);u=!0;for(var t=c.length;t;){for(s=c,c=[];++f<t;)s&&s[f].run();f=-1,t=c.length}s=null,u=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{return r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function d(e,t){this.fun=e,this.array=t}function p(){}n.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];c.push(new d(e,t)),1!==c.length||u||o(l)},d.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=p,n.addListener=p,n.once=p,n.off=p,n.removeListener=p,n.removeAllListeners=p,n.emit=p,n.prependListener=p,n.prependOnceListener=p,n.listeners=function(e){return[]},n.binding=function(e){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(e){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},43688:(e,t)=>{!function(e){var t,r,n,i=String.fromCharCode;function a(e){for(var t,r,n=[],i=0,a=e.length;i<a;)(t=e.charCodeAt(i++))>=55296&&t<=56319&&i<a?56320==(64512&(r=e.charCodeAt(i++)))?n.push(((1023&t)<<10)+(1023&r)+65536):(n.push(t),i--):n.push(t);return n}function o(e){if(e>=55296&&e<=57343)throw Error("Lone surrogate U+"+e.toString(16).toUpperCase()+" is not a scalar value")}function s(e,t){return i(e>>t&63|128)}function c(e){if(0==(4294967168&e))return i(e);var t="";return 0==(4294965248&e)?t=i(e>>6&31|192):0==(4294901760&e)?(o(e),t=i(e>>12&15|224),t+=s(e,6)):0==(4292870144&e)&&(t=i(e>>18&7|240),t+=s(e,12),t+=s(e,6)),t+i(63&e|128)}function u(){if(n>=r)throw Error("Invalid byte index");var e=255&t[n];if(n++,128==(192&e))return 63&e;throw Error("Invalid continuation byte")}function f(){var e,i;if(n>r)throw Error("Invalid byte index");if(n==r)return!1;if(e=255&t[n],n++,0==(128&e))return e;if(192==(224&e)){if((i=(31&e)<<6|u())>=128)return i;throw Error("Invalid continuation byte")}if(224==(240&e)){if((i=(15&e)<<12|u()<<6|u())>=2048)return o(i),i;throw Error("Invalid continuation byte")}if(240==(248&e)&&(i=(7&e)<<18|u()<<12|u()<<6|u())>=65536&&i<=1114111)return i;throw Error("Invalid UTF-8 detected")}e.version="3.0.0",e.encode=function(e){for(var t=a(e),r=t.length,n=-1,i="";++n<r;)i+=c(t[n]);return i},e.decode=function(e){t=a(e),r=t.length,n=0;for(var o,s=[];!1!==(o=f());)s.push(o);return function(e){for(var t,r=e.length,n=-1,a="";++n<r;)(t=e[n])>65535&&(a+=i((t-=65536)>>>10&1023|55296),t=56320|1023&t),a+=i(t);return a}(s)}}(t)},89392:()=>{},19024:()=>{},39116:()=>{},80628:()=>{},6636:(e,t,r)=>{var n=r(59848).default;function i(){"use strict";e.exports=i=function(){return r},e.exports.__esModule=!0,e.exports.default=e.exports;var t,r={},a=Object.prototype,o=a.hasOwnProperty,s=Object.defineProperty||function(e,t,r){e[t]=r.value},c="function"==typeof Symbol?Symbol:{},u=c.iterator||"@@iterator",f=c.asyncIterator||"@@asyncIterator",h=c.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(t){l=function(e,t,r){return e[t]=r}}function d(e,t,r,n){var i=t&&t.prototype instanceof w?t:w,a=Object.create(i.prototype),o=new D(n||[]);return s(a,"_invoke",{value:_(e,r,o)}),a}function p(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}r.wrap=d;var y="suspendedStart",g="suspendedYield",v="executing",m="completed",b={};function w(){}function C(){}function E(){}var S={};l(S,u,(function(){return this}));var A=Object.getPrototypeOf,B=A&&A(A(P([])));B&&B!==a&&o.call(B,u)&&(S=B);var T=E.prototype=w.prototype=Object.create(S);function I(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(i,a,s,c){var u=p(e[i],e,a);if("throw"!==u.type){var f=u.arg,h=f.value;return h&&"object"==n(h)&&o.call(h,"__await")?t.resolve(h.__await).then((function(e){r("next",e,s,c)}),(function(e){r("throw",e,s,c)})):t.resolve(h).then((function(e){f.value=e,s(f)}),(function(e){return r("throw",e,s,c)}))}c(u.arg)}var i;s(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,i){r(e,n,t,i)}))}return i=i?i.then(a,a):a()}})}function _(e,r,n){var i=y;return function(a,o){if(i===v)throw new Error("Generator is already running");if(i===m){if("throw"===a)throw o;return{value:t,done:!0}}for(n.method=a,n.arg=o;;){var s=n.delegate;if(s){var c=R(s,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===y)throw i=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=v;var u=p(e,r,n);if("normal"===u.type){if(i=n.done?m:g,u.arg===b)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(i=m,n.method="throw",n.arg=u.arg)}}}function R(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,R(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var a=p(i,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,b;var o=a.arg;return o?o.done?(r[e.resultName]=o.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,b):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function x(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function F(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function D(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(x,this),this.reset(!0)}function P(e){if(e||""===e){var r=e[u];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,a=function r(){for(;++i<e.length;)if(o.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(n(e)+" is not iterable")}return C.prototype=E,s(T,"constructor",{value:E,configurable:!0}),s(E,"constructor",{value:C,configurable:!0}),C.displayName=l(E,h,"GeneratorFunction"),r.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===C||"GeneratorFunction"===(t.displayName||t.name))},r.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,E):(e.__proto__=E,l(e,h,"GeneratorFunction")),e.prototype=Object.create(T),e},r.awrap=function(e){return{__await:e}},I(k.prototype),l(k.prototype,f,(function(){return this})),r.AsyncIterator=k,r.async=function(e,t,n,i,a){void 0===a&&(a=Promise);var o=new k(d(e,t,n,i),a);return r.isGeneratorFunction(t)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},I(T),l(T,h,"Generator"),l(T,u,(function(){return this})),l(T,"toString",(function(){return"[object Generator]"})),r.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},r.values=P,D.prototype={constructor:D,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(F),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,i){return s.type="throw",s.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=o.call(a,"catchLoc"),u=o.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,b):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),b},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),F(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;F(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:P(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),b}},r}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},59848:e=>{function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},33248:(e,t,r)=>{var n=r(6636)();e.exports=n;try{regeneratorRuntime=n}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var r=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e].call(r.exports,r,r.exports,__webpack_require__),r.exports}__webpack_require__.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=(e,t)=>{for(var r in t)__webpack_require__.o(t,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var __webpack_exports__={};(()=>{"use strict";function e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}function r(e){var r=function(e,r){if("object"!=t(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,"string");if("object"!=t(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==t(r)?r:String(r)}function n(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,r(i.key),i)}}function i(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function a(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function o(e,r){if(r&&("object"===t(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return a(e)}function s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(e)}function c(e,t){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},c(e,t)}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&c(e,t)}function f(e,t,r,n,i,a,o){try{var s=e[a](o),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,i)}function h(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var a=e.apply(t,r);function o(e){f(a,n,i,o,s,"next",e)}function s(e){f(a,n,i,o,s,"throw",e)}o(void 0)}))}}var l=__webpack_require__(33248),d=__webpack_require__.n(l);function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function y(e,t){if(e){if("string"==typeof e)return p(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?p(e,t):void 0}}function g(e){return function(e){if(Array.isArray(e))return p(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||y(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var v=__webpack_require__(56220),m=__webpack_require__.n(v),b=__webpack_require__(43688),w=__webpack_require__.n(b);function C(e,t,r){return t=s(t),o(e,E()?Reflect.construct(t,r||[],s(e).constructor):t.apply(e,r))}function E(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(E=function(){return!!e})()}const S=function(t){function r(){var t;e(this,r);for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];return(t=C(this,r,[].concat(i))).type="OperationError",Error.captureStackTrace&&Error.captureStackTrace(a(t),r),t}return u(r,t),i(r)}(function(e){function t(){var t=Reflect.construct(e,Array.from(arguments));return Object.setPrototypeOf(t,Object.getPrototypeOf(this)),t}return t.prototype=Object.create(e.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e,t}(Error));function A(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"A-Za-z0-9+/=";if(!e)return"";if("string"==typeof e&&(e=L.strToArrayBuffer(e)),e instanceof ArrayBuffer&&(e=new Uint8Array(e)),64!==(t=L.expandAlphRange(t).join("")).length&&65!==t.length)throw new S(`Invalid Base64 alphabet length (${t.length}): ${t}`);for(var r,n,i,a,o,s,c,u="",f=0;f<e.length;)a=(r=e[f++])>>2,o=(3&r)<<4|(n=e[f++])>>4,s=(15&n)<<2|(i=e[f++])>>6,c=63&i,isNaN(n)?s=c=64:isNaN(i)&&(c=64),u+=t.charAt(a)+t.charAt(o)+t.charAt(s)+t.charAt(c);return u}function B(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"A-Za-z0-9+/=",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"string",n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(!e)return"string"===r?"":[];if(t=t||"A-Za-z0-9+/=",64!==(t=L.expandAlphRange(t).join("")).length&&65!==t.length)throw new S(`Error: Base64 alphabet should be 64 characters long, or 65 with a padding character. Found ${t.length}: ${t}`);if(n){var a=new RegExp("[^"+t.replace(/[[\]\\\-^$]/g,"\\$&")+"]","g");e=e.replace(a,"")}if(i){if(e.length%4==1)throw new S(`Error: Invalid Base64 input length (${e.length}). Cannot be 4n+1, even without padding chars.`);if(65===t.length){var o=t.charAt(64),s=e.indexOf(o);if(s>=0){if(s<e.length-2||e.charAt(e.length-1)!==o)throw new S(`Error: Base64 padding character (${o}) not used in the correct place.`);if(e.length%4!=0)throw new S("Error: Base64 not padded to a multiple of 4.")}}}for(var c,u,f,h,l,d,p,y=[],g=0;g<e.length;){if(h=t.indexOf(e.charAt(g++)||null),l=t.indexOf(e.charAt(g++)||null),d=t.indexOf(e.charAt(g++)||null),p=t.indexOf(e.charAt(g++)||null),i&&(h<0||l<0||d<0||p<0))throw new S("Error: Base64 input contains non-alphabet char(s)");u=(15&l)<<4|d>>2,f=(3&d)<<6|p,(c=h<<2|l>>4)>=0&&c<256&&y.push(c),u>=0&&u<256&&64!==d&&y.push(u),f>=0&&f<256&&64!==p&&y.push(f)}return"string"===r?L.byteArrayToUtf8(y):y}function T(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:" ",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;if(!e)return"";e instanceof ArrayBuffer&&(e=new Uint8Array(e));for(var a="",o="0x"===t||"\\x"===t,s=0;s<e.length;s++){var c=e[s].toString(16).padStart(r,"0");a+=o?t+c:c+t,n&&(a+=n),s!==e.length-1&&(s+1)%i==0&&(a+="\n")}var u=n.length+(o?0:t.length);return u?a.slice(0,-u):a}function I(e){if(!e)return"";e instanceof ArrayBuffer&&(e=new Uint8Array(e));for(var t=[],r=0;r<e.length;r++)t.push((e[r]>>>4).toString(16)),t.push((15&e[r]).toString(16));return t.join("")}function k(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Auto",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2;if(r<1||Math.round(r)!==r)throw new S("Byte length must be a positive integer");if("None"!==t){var n="Auto"===t?/[^a-f\d]|0x/gi:L.regexRep(t);e=e.split(n)}else e=[e];for(var i=[],a=0;a<e.length;a++)for(var o=0;o<e[a].length;o+=r)i.push(parseInt(e[a].substr(o,r),16));return i}function _(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Auto";t=L.charRep(t);var r=[],n=e.split(t);""===n[n.length-1]&&(n=n.slice(0,n.length-1));for(var i=0;i<n.length;i++)r[i]=parseInt(n[i],10);return r}function R(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Space",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:8;if(r<1||Math.round(r)!==r)throw new S("Byte length must be a positive integer");var n=L.regexRep(t);e=e.replace(n,"");for(var i=[],a=0;a<e.length;a+=r)i.push(parseInt(e.substr(a,r),2));return i}["Auto"].concat(["Space","Percent","Comma","Semi-colon","Colon","Line feed","CRLF","0x","0x with comma","\\x","None"]);var x=__webpack_require__(33296).Buffer,F=__webpack_require__(26512),D=function(){function t(){e(this,t)}var r;return i(t,null,[{key:"chr",value:function(e){if(e>65535){e-=65536;var t=String.fromCharCode(e>>>10&1023|55296);return e=56320|1023&e,t+String.fromCharCode(e)}return String.fromCharCode(e)}},{key:"ord",value:function(e){if(2===e.length){var t=e.charCodeAt(0),r=e.charCodeAt(1);if(t>=55296&&t<56320&&r>=56320&&r<57344)return 1024*(t-55296)+r-56320+65536}return e.charCodeAt(0)}},{key:"padBytesRight",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=new Array(t);return n.fill(r),g(e).forEach((function(e,t){n[t]=e})),n}},{key:"truncate",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"...";return e.length>t&&(e=e.slice(0,t-r.length)+r),e}},{key:"hex",value:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;return(e="string"==typeof e?t.ord(e):e).toString(16).padStart(r,"0")}},{key:"bin",value:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:8;return(e="string"==typeof e?t.ord(e):e).toString(2).padStart(r,"0")}},{key:"printable",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return arguments.length>2&&void 0!==arguments[2]&&arguments[2]?e.replace(/[^\x20-\x7f]/g,"."):(e=e.replace(/[\0-\x08\x0B-\x0C\x0E-\x1F\x7F-\x9F\xAD\u0378\u0379\u037F-\u0383\u038B\u038D\u03A2\u0528-\u0530\u0557\u0558\u0560\u0588\u058B-\u058E\u0590\u05C8-\u05CF\u05EB-\u05EF\u05F5-\u0605\u061C\u061D\u06DD\u070E\u070F\u074B\u074C\u07B2-\u07BF\u07FB-\u07FF\u082E\u082F\u083F\u085C\u085D\u085F-\u089F\u08A1\u08AD-\u08E3\u08FF\u0978\u0980\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09FC-\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF2-\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B55\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B78-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BFB-\u0C00\u0C04\u0C0D\u0C11\u0C29\u0C34\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5A-\u0C5F\u0C64\u0C65\u0C70-\u0C77\u0C80\u0C81\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0D01\u0D04\u0D0D\u0D11\u0D3B\u0D3C\u0D45\u0D49\u0D4F-\u0D56\u0D58-\u0D5F\u0D64\u0D65\u0D76-\u0D78\u0D80\u0D81\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DF1\u0DF5-\u0E00\u0E3B-\u0E3E\u0E5C-\u0E80\u0E83\u0E85\u0E86\u0E89\u0E8B\u0E8C\u0E8E-\u0E93\u0E98\u0EA0\u0EA4\u0EA6\u0EA8\u0EA9\u0EAC\u0EBA\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F48\u0F6D-\u0F70\u0F98\u0FBD\u0FCD\u0FDB-\u0FFF\u10C6\u10C8-\u10CC\u10CE\u10CF\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u137D-\u137F\u139A-\u139F\u13F5-\u13FF\u169D-\u169F\u16F1-\u16FF\u170D\u1715-\u171F\u1737-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17DE\u17DF\u17EA-\u17EF\u17FA-\u17FF\u180F\u181A-\u181F\u1878-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191D-\u191F\u192C-\u192F\u193C-\u193F\u1941-\u1943\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DB-\u19DD\u1A1C\u1A1D\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1A9F\u1AAE-\u1AFF\u1B4C-\u1B4F\u1B7D-\u1B7F\u1BF4-\u1BFB\u1C38-\u1C3A\u1C4A-\u1C4C\u1C80-\u1CBF\u1CC8-\u1CCF\u1CF7-\u1CFF\u1DE7-\u1DFB\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FC5\u1FD4\u1FD5\u1FDC\u1FF0\u1FF1\u1FF5\u1FFF\u200B-\u200F\u202A-\u202E\u2060-\u206F\u2072\u2073\u208F\u209D-\u209F\u20BB-\u20CF\u20F1-\u20FF\u218A-\u218F\u23F4-\u23FF\u2427-\u243F\u244B-\u245F\u2700\u2B4D-\u2B4F\u2B5A-\u2BFF\u2C2F\u2C5F\u2CF4-\u2CF8\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D71-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E3C-\u2E7F\u2E9A\u2EF4-\u2EFF\u2FD6-\u2FEF\u2FFC-\u2FFF\u3040\u3097\u3098\u3100-\u3104\u312E-\u3130\u318F\u31BB-\u31BF\u31E4-\u31EF\u321F\u32FF\u4DB6-\u4DBF\u9FCD-\u9FFF\uA48D-\uA48F\uA4C7-\uA4CF\uA62C-\uA63F\uA698-\uA69E\uA6F8-\uA6FF\uA78F\uA794-\uA79F\uA7AB-\uA7F7\uA82C-\uA82F\uA83A-\uA83F\uA878-\uA87F\uA8C5-\uA8CD\uA8DA-\uA8DF\uA8FC-\uA8FF\uA954-\uA95E\uA97D-\uA97F\uA9CE\uA9DA-\uA9DD\uA9E0-\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A\uAA5B\uAA7C-\uAA7F\uAAC3-\uAADA\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F-\uABBF\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBC2-\uFBD2\uFD40-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFE\uFDFF\uFE1A-\uFE1F\uFE27-\uFE2F\uFE53\uFE67\uFE6C-\uFE6F\uFE75\uFEFD-\uFF00\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFDF\uFFE7\uFFEF-\uFFFB\uFFFE\uFFFF]/g,"."),t||(e=e.replace(/[\x09-\x10\u2028\u2029]/g,".")),e)}},{key:"escapeWhitespace",value:function(e){return e.replace(/[\x09-\x10]/g,(function(e){return String.fromCharCode(57344+e.charCodeAt(0))}))}},{key:"parseEscapedChars",value:function(e){return e.replace(/\\([abfnrtv'"]|[0-3][0-7]{2}|[0-7]{1,2}|x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]{1,6}\}|\\)/g,(function(e,t){switch(t[0]){case"\\":return"\\";case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":return String.fromCharCode(parseInt(t,8));case"a":return String.fromCharCode(7);case"b":return"\b";case"t":return"\t";case"n":return"\n";case"v":return"\v";case"f":return"\f";case"r":return"\r";case'"':return'"';case"'":return"'";case"x":return String.fromCharCode(parseInt(t.substr(1),16));case"u":return"{"===t[1]?String.fromCodePoint(parseInt(t.slice(2,-1),16)):String.fromCharCode(parseInt(t.substr(1),16))}}))}},{key:"escapeRegex",value:function(e){return e.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}},{key:"expandAlphRange",value:function(e){for(var r=[],n=0;n<e.length;n++)if(n<e.length-2&&"-"===e[n+1]&&"\\"!==e[n]){for(var i=t.ord(e[n]),a=t.ord(e[n+2]),o=i;o<=a;o++)r.push(t.chr(o));n+=2}else n<e.length-2&&"\\"===e[n]&&"-"===e[n+1]?(r.push("-"),n++):r.push(e[n]);return r}},{key:"convertToByteArray",value:function(e,r){switch(r.toLowerCase()){case"binary":return R(e);case"hex":return k(e);case"decimal":return _(e);case"base64":return B(e,null,"byteArray");case"utf8":return t.strToUtf8ByteArray(e);default:return t.strToByteArray(e)}}},{key:"convertToByteString",value:function(e,r){switch(r.toLowerCase()){case"binary":return t.byteArrayToChars(R(e));case"hex":return t.byteArrayToChars(k(e));case"decimal":return t.byteArrayToChars(_(e));case"base64":return t.byteArrayToChars(B(e,null,"byteArray"));case"utf8":return w().encode(e);default:return e}}},{key:"byteArrayToInt",value:function(e,t){var r=0;if("big"===t)for(var n=0;n<e.length;n++)r=256*r+e[n];else for(var i=e.length-1;i>=0;i--)r=256*r+e[i];return r}},{key:"intToByteArray",value:function(e,t,r){var n=new Array(t);if("little"===r)for(var i=0;i<t;i++)n[i]=255&e,e>>>=8;else for(var a=t-1;a>=0;a--)n[a]=255&e,e>>>=8;return n}},{key:"strToArrayBuffer",value:function(e){if(m().debug(`Converting string[${null==e?void 0:e.length}] to array buffer`),!e)return new ArrayBuffer;for(var r,n=new Uint8Array(e.length),i=e.length;i--;)if(r=e.charCodeAt(i),n[i]=r,r>255)return t.strToUtf8ArrayBuffer(e);return n.buffer}},{key:"strToUtf8ArrayBuffer",value:function(e){if(m().debug(`Converting string[${null==e?void 0:e.length}] to UTF8 array buffer`),!e)return new ArrayBuffer;var t=new TextEncoder("utf-8").encode(e);return e.length!==t.length&&(N()&&self&&"function"==typeof self.setOption?self.setOption("attemptHighlight",!1):U()&&(window.app.options.attemptHighlight=!1)),t.buffer}},{key:"strToByteArray",value:function(e){if(m().debug(`Converting string[${null==e?void 0:e.length}] to byte array`),!e)return[];for(var r,n=new Array(e.length),i=e.length;i--;)if(r=e.charCodeAt(i),n[i]=r,r>255)return t.strToUtf8ByteArray(e);return n}},{key:"strToUtf8ByteArray",value:function(e){if(m().debug(`Converting string[${null==e?void 0:e.length}] to UTF8 byte array`),!e)return[];var r=w().encode(e);return e.length!==r.length&&(N()?self.setOption("attemptHighlight",!1):U()&&(window.app.options.attemptHighlight=!1)),t.strToByteArray(r)}},{key:"strToCharcode",value:function(e){if(m().debug(`Converting string[${null==e?void 0:e.length}] to charcode`),!e)return[];for(var r=[],n=0;n<e.length;n++){var i=e.charCodeAt(n);if(n<e.length-1&&i>=55296&&i<56320){var a=e[n+1].charCodeAt(0);a>=56320&&a<57344&&(i=t.ord(e[n]+e[++n]))}r.push(i)}return r}},{key:"byteArrayToUtf8",value:function(e){var r;if(m().debug(`Converting byte array[${null===(r=e)||void 0===r?void 0:r.length}] to UTF8`),!e||!e.length)return"";e instanceof Uint8Array||(e=new Uint8Array(e));try{var n=new TextDecoder("utf-8",{fatal:!0}).decode(e);return n.length!==e.length&&(N()?self.setOption("attemptHighlight",!1):U()&&(window.app.options.attemptHighlight=!1)),n}catch(r){return t.byteArrayToChars(e)}}},{key:"byteArrayToChars",value:function(e){if(m().debug(`Converting byte array[${null==e?void 0:e.length}] to chars`),!e||!e.length)return"";for(var t="",r=0;r<e.length;r+=2e4)t+=String.fromCharCode.apply(String,g(e.slice(r,r+2e4)));return t}},{key:"arrayBufferToStr",value:function(e){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(m().debug(`Converting array buffer[${null==e?void 0:e.byteLength}] to str`),!e||!e.byteLength)return"";var n=new Uint8Array(e);return r?t.byteArrayToUtf8(n):t.byteArrayToChars(n)}},{key:"calculateShannonEntropy",value:function(e){e instanceof ArrayBuffer&&(e=new Uint8Array(e));var t,r=[],n=new Array(256).fill(0);for(t=0;t<e.length;t++)n[e[t]]++;for(t=0;t<n.length;t++)n[t]>0&&r.push(n[t]/e.length);var i,a=0;for(t=0;t<r.length;t++)a+=(i=r[t])*Math.log(i)/Math.log(2);return-a}},{key:"parseCSV",value:function(e){var t,r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[","],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:["\n","\r"],a=!1,o=!1,s="",c=[],u=[];e.length&&"\ufeff"===e[0]&&(e=e.substr(1));for(var f=0;f<e.length;f++)t=e[f],r=e[f+1]||"",a?(s+=t,a=!1):'"'!==t||o?'"'===t&&o?'"'===r?a=!0:o=!1:!o&&n.indexOf(t)>=0?(c.push(s),s=""):!o&&i.indexOf(t)>=0?(c.push(s),s="",u.push(c),c=[],i.indexOf(r)>=0&&r!==t&&f++):s+=t:o=!0;return c.length&&(c.push(s),u.push(c)),u}},{key:"stripHtmlTags",value:function(e){function t(e,r){var n=r.replace(e,"");return n.length===r.length?n:t(e,n)}return arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&(e=t(/<script[^>]*>(\s|\S)*?<\/script[^>]*>/gi,e),e=t(/<style[^>]*>(\s|\S)*?<\/style[^>]*>/gi,e)),t(/<[^>]+>/g,e)}},{key:"escapeHtml",value:function(e){var t={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;","\0":""};return e?e.replace(/[&<>"'`\u0000]/g,(function(e){return t[e]})):e}},{key:"unescapeHtml",value:function(e){var t={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#x27;":"'","&#x2F;":"/","&#x60;":"`","":"\0"};return e.replace(/(&#?x?[a-z0-9]{2,4};|\ue000)/gi,(function(e){return t[e]||e}))}},{key:"toTitleCase",value:function(e){return e.replace(/\w\S*/g,(function(e){return e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()}))}},{key:"encodeURIFragment",value:function(e){var t={"%2D":"-","%2E":".","%5F":"_","%7E":"~","%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2C":",","%3B":";","%3A":":","%40":"@","%2F":"/","%3F":"?"};return(e=encodeURIComponent(e)).replace(/%[0-9A-F]{2}/g,(function(e){return t[e]||e}))}},{key:"generatePrettyRecipe",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r="",n="",i="",a="",o="";return e.forEach((function(e){n=e.op.replace(/ /g,"_"),i=JSON.stringify(e.args).slice(1,-1).replace(/'/g,"\\'").replace(/"((?:[^"\\]|\\.)*)"/g,"'$1'").replace(/\\"/g,'"'),a=e.disabled?"/disabled":"",o=e.breakpoint?"/breakpoint":"",r+=`${n}(${i}${a}${o})`,t&&(r+="\n")})),r}},{key:"parseRecipeConfig",value:function(e){if(0===(e=e.trim()).length)return[];if("["===e[0])return JSON.parse(e);var t,r;e=e.replace(/\n/g,"");for(var n=/([^(]+)\(((?:'[^'\\]*(?:\\.[^'\\]*)*'|[^)/'])*)(\/[^)]+)?\)/g,i=[];t=n.exec(e);){r="["+(r=t[2].replace(/"/g,'\\"').replace(/(^|,|{|:)'/g,'$1"').replace(/([^\\]|(?:\\\\)+)'(,|:|}|$)/g,'$1"$2').replace(/\\'/g,"'"))+"]";var a={op:t[1].replace(/_/g," "),args:JSON.parse(r)};t[3]&&t[3].indexOf("disabled")>0&&(a.disabled=!0),t[3]&&t[3].indexOf("breakpoint")>0&&(a.breakpoint=!0),i.push(a)}return i}},{key:"displayFilesAsHTML",value:(r=h(d().mark((function e(r){var n,i,a,o,s;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=function(e){return`<div class='card' style='white-space: normal;'>\n <div class='card-header'>\n <h6 class="mb-0">\n ${t.escapeHtml(e.name)}\n </h6>\n </div>\n </div>`},i=function(e,r){if(r.startsWith("image")){var n="data:";return n+=r+";","<img style='max-width: 100%;' src='"+(n+="base64,"+A(e))+"'>"}return`<pre>${t.escapeHtml(t.arrayBufferToStr(e.buffer))}</pre>`},a=function(){var e=h(d().mark((function e(r,n){var a,o,s,c;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.readFile(r);case 2:return a=e.sent,o=new Blob([a],{type:r.type||"octet/stream"}),s=URL.createObjectURL(o),c=`<div class='card' style='white-space: normal;'>\n <div class='card-header' id='heading${n}'>\n <h6 class='mb-0'>\n <a class='collapsed'\n data-toggle='collapse'\n href='#collapse${n}'\n aria-expanded='false'\n aria-controls='collapse${n}'\n title="Show/hide contents of '${t.escapeHtml(r.name)}'">\n ${t.escapeHtml(r.name)}</a>\n <span class='float-right' style="margin-top: -3px">\n ${r.size.toLocaleString()} bytes\n <a title="Download ${t.escapeHtml(r.name)}"\n href="${s}"\n download="${t.escapeHtml(r.name)}"\n data-toggle="tooltip">\n <i class="material-icons" style="vertical-align: bottom">save</i>\n </a>\n <a title="Move to input"\n href="#"\n blob-url="${s}"\n file-name="${t.escapeHtml(r.name)}"\n class="extract-file"\n data-toggle="tooltip">\n <i class="material-icons" style="vertical-align: bottom">open_in_browser</i>\n </a>\n </span>\n </h6>\n </div>\n <div id='collapse${n}' class='collapse' aria-labelledby='heading${n}' data-parent="#files">\n <div class='card-body'>\n ${i(a,r.type)}\n </div>\n </div>\n </div>`,e.abrupt("return",c);case 7:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),o=`<div style='padding: 5px; white-space: normal;'>\n ${r.length} file(s) found\n </div><div id="files" style="padding: 20px">`,s=0;case 5:if(!(s<r.length)){e.next=17;break}if(!r[s].name.endsWith("/")){e.next=10;break}o+=n(r[s]),e.next=14;break;case 10:return e.t0=o,e.next=13,a(r[s],s);case 13:o=e.t0+=e.sent;case 14:s++,e.next=5;break;case 17:return e.abrupt("return",o+="</div>");case 18:case"end":return e.stop()}}),e)}))),function(e){return r.apply(this,arguments)})},{key:"parseURIParams",value:function(e){if(""===e)return{};"?"!==e[0]&&"#"!==e[0]||(e=e.substr(1));for(var t=e.split("&"),r={},n=0;n<t.length;n++){var i=t[n].split("=");2!==i.length?r[t[n]]=!0:r[i[0]]=decodeURIComponent(i[1].replace(/\+/g," "))}return r}},{key:"readFile",value:function(e){return P()?x.from(e).buffer:new Promise((function(t,r){var n=new FileReader,i=new Uint8Array(e.size),a=0,o=10485760,s=function(){if(a>=e.size)t(i);else{var r=e.slice(a,a+o);n.readAsArrayBuffer(r)}};n.onload=function(e){i.set(new Uint8Array(n.result),a),a+=o,s()},n.onerror=function(e){r(n.error.message)},s()}))}},{key:"readFileSync",value:function(e){if(!P())throw new TypeError("Browser environment cannot support readFileSync");return Uint8Array.from(e.data).buffer}},{key:"mod",value:function(e,t){return(e%t+t)%t}},{key:"gcd",value:function(e,r){return r?t.gcd(r,e%r):e}},{key:"modInv",value:function(e,t){e%=t;for(var r=1;r<t;r++)if(e*r%26==1)return r}},{key:"charRep",value:function(e){return{Space:" ",Percent:"%",Comma:",","Semi-colon":";",Colon:":",Tab:"\t","Line feed":"\n",CRLF:"\r\n","Forward slash":"/",Backslash:"\\","0x":"0x","\\x":"\\x","Nothing (separate chars)":"",None:""}[e]}},{key:"regexRep",value:function(e){return{Space:/\s+/g,Percent:/%/g,Comma:/,/g,"Semi-colon":/;/g,Colon:/:/g,"Line feed":/\n/g,CRLF:/\r\n/g,"Forward slash":/\//g,Backslash:/\\/g,"0x with comma":/,?0x/g,"0x":/0x/g,"\\x":/\\x/g,None:/\s+/g}[e]}},{key:"chunked",value:d().mark((function e(t,r){var n,i,a,o;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=t[Symbol.iterator]();case 1:i=[],a=0;case 4:if(!(a<r)){e.next=12;break}if(!(o=n.next()).done){e.next=8;break}return e.abrupt("break",12);case 8:i.push(o.value);case 9:a++,e.next=4;break;case 12:if(!i.length){e.next=17;break}return e.next=15,i;case 15:e.next=18;break;case 17:return e.abrupt("return");case 18:e.next=1;break;case 20:case"end":return e.stop()}}),e)}))}]),t}();function P(){return void 0!==F&&null!=F.versions&&null!=F.versions.node}function U(){return"object"==typeof window}function N(){return"function"==typeof importScripts}const L=D;function M(e,t,r){return t=s(t),o(e,O()?Reflect.construct(t,r||[],s(e).constructor):t.apply(e,r))}function O(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(O=function(){return!!e})()}Array.prototype.unique=function(){for(var e={},t=[],r=0,n=this.length;r<n;r++)Object.prototype.hasOwnProperty.call(e,this[r])||(t.push(this[r]),e[this[r]]=1);return t},Array.prototype.max=function(){return Math.max.apply(null,this)},Array.prototype.min=function(){return Math.min.apply(null,this)},Array.prototype.sum=function(){return this.reduce((function(e,t){return e+t}),0)},Array.prototype.equals=function(e){if(!e)return!1;var t=this.length;if(t!==e.length)return!1;for(;t--;)if(this[t]!==e[t])return!1;return!0},String.prototype.count=function(e){return this.split(e).length-1},String.prototype.padStart||(String.prototype.padStart=function(e,t){return e>>=0,t=String(void 0!==t?t:" "),this.length>e?String(this):((e-=this.length)>t.length&&(t+=t.repeat(e/t.length)),t.slice(0,e)+String(this))}),String.prototype.padEnd||(String.prototype.padEnd=function(e,t){return e>>=0,t=String(void 0!==t?t:" "),this.length>e?String(this):((e-=this.length)>t.length&&(t+=t.repeat(e/t.length)),String(this)+t.slice(0,e))});const K=function(t){function r(){var t;e(this,r);for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];return(t=M(this,r,[].concat(i))).type="DishError",Error.captureStackTrace&&Error.captureStackTrace(a(t),r),t}return u(r,t),i(r)}(function(e){function t(){var t=Reflect.construct(e,Array.from(arguments));return Object.setPrototypeOf(t,Object.getPrototypeOf(this)),t}return t.prototype=Object.create(e.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e,t}(Error));var G=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,j=Math.ceil,V=Math.floor,H="[BigNumber Error] ",q=H+"Number primitive has more than 15 significant digits: ",z=1e14,W=14,X=9007199254740991,Y=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],Q=1e7,Z=1e9;function J(e){var t=0|e;return e>0||e===t?t:t-1}function $(e){for(var t,r,n=1,i=e.length,a=e[0]+"";n<i;){for(t=e[n++]+"",r=W-t.length;r--;t="0"+t);a+=t}for(i=a.length;48===a.charCodeAt(--i););return a.slice(0,i+1||1)}function ee(e,t){var r,n,i=e.c,a=t.c,o=e.s,s=t.s,c=e.e,u=t.e;if(!o||!s)return null;if(r=i&&!i[0],n=a&&!a[0],r||n)return r?n?0:-s:o;if(o!=s)return o;if(r=o<0,n=c==u,!i||!a)return n?0:!i^r?1:-1;if(!n)return c>u^r?1:-1;for(s=(c=i.length)<(u=a.length)?c:u,o=0;o<s;o++)if(i[o]!=a[o])return i[o]>a[o]^r?1:-1;return c==u?0:c>u^r?1:-1}function te(e,t,r,n){if(e<t||e>r||e!==V(e))throw Error(H+(n||"Argument")+("number"==typeof e?e<t||e>r?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function re(e){var t=e.c.length-1;return J(e.e/W)==t&&e.c[t]%2!=0}function ne(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function ie(e,t,r){var n,i;if(t<0){for(i=r+".";++t;i+=r);e=i+e}else if(++t>(n=e.length)){for(i=r,t-=n;--t;i+=r);e+=i}else t<n&&(e=e.slice(0,t)+"."+e.slice(t));return e}var ae=function e(t){var r,n,i,a,o,s,c,u,f,h,l=T.prototype={constructor:T,toString:null,valueOf:null},d=new T(1),p=20,y=4,g=-7,v=21,m=-1e7,b=1e7,w=!1,C=1,E=0,S={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},A="0123456789abcdefghijklmnopqrstuvwxyz",B=!0;function T(e,t){var r,a,o,s,c,u,f,h,l=this;if(!(l instanceof T))return new T(e,t);if(null==t){if(e&&!0===e._isBigNumber)return l.s=e.s,void(!e.c||e.e>b?l.c=l.e=null:e.e<m?l.c=[l.e=0]:(l.e=e.e,l.c=e.c.slice()));if((u="number"==typeof e)&&0*e==0){if(l.s=1/e<0?(e=-e,-1):1,e===~~e){for(s=0,c=e;c>=10;c/=10,s++);return void(s>b?l.c=l.e=null:(l.e=s,l.c=[e]))}h=String(e)}else{if(!G.test(h=String(e)))return i(l,h,u);l.s=45==h.charCodeAt(0)?(h=h.slice(1),-1):1}(s=h.indexOf("."))>-1&&(h=h.replace(".","")),(c=h.search(/e/i))>0?(s<0&&(s=c),s+=+h.slice(c+1),h=h.substring(0,c)):s<0&&(s=h.length)}else{if(te(t,2,A.length,"Base"),10==t&&B)return R(l=new T(e),p+l.e+1,y);if(h=String(e),u="number"==typeof e){if(0*e!=0)return i(l,h,u,t);if(l.s=1/e<0?(h=h.slice(1),-1):1,T.DEBUG&&h.replace(/^0\.0*|\./,"").length>15)throw Error(q+e)}else l.s=45===h.charCodeAt(0)?(h=h.slice(1),-1):1;for(r=A.slice(0,t),s=c=0,f=h.length;c<f;c++)if(r.indexOf(a=h.charAt(c))<0){if("."==a){if(c>s){s=f;continue}}else if(!o&&(h==h.toUpperCase()&&(h=h.toLowerCase())||h==h.toLowerCase()&&(h=h.toUpperCase()))){o=!0,c=-1,s=0;continue}return i(l,String(e),u,t)}u=!1,(s=(h=n(h,t,10,l.s)).indexOf("."))>-1?h=h.replace(".",""):s=h.length}for(c=0;48===h.charCodeAt(c);c++);for(f=h.length;48===h.charCodeAt(--f););if(h=h.slice(c,++f)){if(f-=c,u&&T.DEBUG&&f>15&&(e>X||e!==V(e)))throw Error(q+l.s*e);if((s=s-c-1)>b)l.c=l.e=null;else if(s<m)l.c=[l.e=0];else{if(l.e=s,l.c=[],c=(s+1)%W,s<0&&(c+=W),c<f){for(c&&l.c.push(+h.slice(0,c)),f-=W;c<f;)l.c.push(+h.slice(c,c+=W));c=W-(h=h.slice(c)).length}else c-=f;for(;c--;h+="0");l.c.push(+h)}}else l.c=[l.e=0]}function I(e,t,r,n){var i,a,o,s,c;if(null==r?r=y:te(r,0,8),!e.c)return e.toString();if(i=e.c[0],o=e.e,null==t)c=$(e.c),c=1==n||2==n&&(o<=g||o>=v)?ne(c,o):ie(c,o,"0");else if(a=(e=R(new T(e),t,r)).e,s=(c=$(e.c)).length,1==n||2==n&&(t<=a||a<=g)){for(;s<t;c+="0",s++);c=ne(c,a)}else if(t-=o,c=ie(c,a,"0"),a+1>s){if(--t>0)for(c+=".";t--;c+="0");}else if((t+=a-s)>0)for(a+1==s&&(c+=".");t--;c+="0");return e.s<0&&i?"-"+c:c}function k(e,t){for(var r,n,i=1,a=new T(e[0]);i<e.length;i++)(!(n=new T(e[i])).s||(r=ee(a,n))===t||0===r&&a.s===t)&&(a=n);return a}function _(e,t,r){for(var n=1,i=t.length;!t[--i];t.pop());for(i=t[0];i>=10;i/=10,n++);return(r=n+r*W-1)>b?e.c=e.e=null:r<m?e.c=[e.e=0]:(e.e=r,e.c=t),e}function R(e,t,r,n){var i,a,o,s,c,u,f,h=e.c,l=Y;if(h){e:{for(i=1,s=h[0];s>=10;s/=10,i++);if((a=t-i)<0)a+=W,o=t,c=h[u=0],f=V(c/l[i-o-1]%10);else if((u=j((a+1)/W))>=h.length){if(!n)break e;for(;h.length<=u;h.push(0));c=f=0,i=1,o=(a%=W)-W+1}else{for(c=s=h[u],i=1;s>=10;s/=10,i++);f=(o=(a%=W)-W+i)<0?0:V(c/l[i-o-1]%10)}if(n=n||t<0||null!=h[u+1]||(o<0?c:c%l[i-o-1]),n=r<4?(f||n)&&(0==r||r==(e.s<0?3:2)):f>5||5==f&&(4==r||n||6==r&&(a>0?o>0?c/l[i-o]:0:h[u-1])%10&1||r==(e.s<0?8:7)),t<1||!h[0])return h.length=0,n?(t-=e.e+1,h[0]=l[(W-t%W)%W],e.e=-t||0):h[0]=e.e=0,e;if(0==a?(h.length=u,s=1,u--):(h.length=u+1,s=l[W-a],h[u]=o>0?V(c/l[i-o]%l[o])*s:0),n)for(;;){if(0==u){for(a=1,o=h[0];o>=10;o/=10,a++);for(o=h[0]+=s,s=1;o>=10;o/=10,s++);a!=s&&(e.e++,h[0]==z&&(h[0]=1));break}if(h[u]+=s,h[u]!=z)break;h[u--]=0,s=1}for(a=h.length;0===h[--a];h.pop());}e.e>b?e.c=e.e=null:e.e<m&&(e.c=[e.e=0])}return e}function x(e){var t,r=e.e;return null===r?e.toString():(t=$(e.c),t=r<=g||r>=v?ne(t,r):ie(t,r,"0"),e.s<0?"-"+t:t)}return T.clone=e,T.ROUND_UP=0,T.ROUND_DOWN=1,T.ROUND_CEIL=2,T.ROUND_FLOOR=3,T.ROUND_HALF_UP=4,T.ROUND_HALF_DOWN=5,T.ROUND_HALF_EVEN=6,T.ROUND_HALF_CEIL=7,T.ROUND_HALF_FLOOR=8,T.EUCLID=9,T.config=T.set=function(e){var t,r;if(null!=e){if("object"!=typeof e)throw Error(H+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(te(r=e[t],0,Z,t),p=r),e.hasOwnProperty(t="ROUNDING_MODE")&&(te(r=e[t],0,8,t),y=r),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((r=e[t])&&r.pop?(te(r[0],-Z,0,t),te(r[1],0,Z,t),g=r[0],v=r[1]):(te(r,-Z,Z,t),g=-(v=r<0?-r:r))),e.hasOwnProperty(t="RANGE"))if((r=e[t])&&r.pop)te(r[0],-Z,-1,t),te(r[1],1,Z,t),m=r[0],b=r[1];else{if(te(r,-Z,Z,t),!r)throw Error(H+t+" cannot be zero: "+r);m=-(b=r<0?-r:r)}if(e.hasOwnProperty(t="CRYPTO")){if((r=e[t])!==!!r)throw Error(H+t+" not true or false: "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw w=!r,Error(H+"crypto unavailable");w=r}else w=r}if(e.hasOwnProperty(t="MODULO_MODE")&&(te(r=e[t],0,9,t),C=r),e.hasOwnProperty(t="POW_PRECISION")&&(te(r=e[t],0,Z,t),E=r),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(r=e[t]))throw Error(H+t+" not an object: "+r);S=r}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(r=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(r))throw Error(H+t+" invalid: "+r);B="0123456789"==r.slice(0,10),A=r}}return{DECIMAL_PLACES:p,ROUNDING_MODE:y,EXPONENTIAL_AT:[g,v],RANGE:[m,b],CRYPTO:w,MODULO_MODE:C,POW_PRECISION:E,FORMAT:S,ALPHABET:A}},T.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!T.DEBUG)return!0;var t,r,n=e.c,i=e.e,a=e.s;e:if("[object Array]"=={}.toString.call(n)){if((1===a||-1===a)&&i>=-Z&&i<=Z&&i===V(i)){if(0===n[0]){if(0===i&&1===n.length)return!0;break e}if((t=(i+1)%W)<1&&(t+=W),String(n[0]).length==t){for(t=0;t<n.length;t++)if((r=n[t])<0||r>=z||r!==V(r))break e;if(0!==r)return!0}}}else if(null===n&&null===i&&(null===a||1===a||-1===a))return!0;throw Error(H+"Invalid BigNumber: "+e)},T.maximum=T.max=function(){return k(arguments,-1)},T.minimum=T.min=function(){return k(arguments,1)},T.random=(a=9007199254740992,o=Math.random()*a&2097151?function(){return V(Math.random()*a)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,r,n,i,a,s=0,c=[],u=new T(d);if(null==e?e=p:te(e,0,Z),i=j(e/W),w)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(i*=2));s<i;)(a=131072*t[s]+(t[s+1]>>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),t[s]=r[0],t[s+1]=r[1]):(c.push(a%1e14),s+=2);s=i/2}else{if(!crypto.randomBytes)throw w=!1,Error(H+"crypto unavailable");for(t=crypto.randomBytes(i*=7);s<i;)(a=281474976710656*(31&t[s])+1099511627776*t[s+1]+4294967296*t[s+2]+16777216*t[s+3]+(t[s+4]<<16)+(t[s+5]<<8)+t[s+6])>=9e15?crypto.randomBytes(7).copy(t,s):(c.push(a%1e14),s+=7);s=i/7}if(!w)for(;s<i;)(a=o())<9e15&&(c[s++]=a%1e14);for(i=c[--s],e%=W,i&&e&&(a=Y[W-e],c[s]=V(i/a)*a);0===c[s];c.pop(),s--);if(s<0)c=[n=0];else{for(n=-1;0===c[0];c.splice(0,1),n-=W);for(s=1,a=c[0];a>=10;a/=10,s++);s<W&&(n-=W-s)}return u.e=n,u.c=c,u}),T.sum=function(){for(var e=1,t=arguments,r=new T(t[0]);e<t.length;)r=r.plus(t[e++]);return r},n=function(){var e="0123456789";function t(e,t,r,n){for(var i,a,o=[0],s=0,c=e.length;s<c;){for(a=o.length;a--;o[a]*=t);for(o[0]+=n.indexOf(e.charAt(s++)),i=0;i<o.length;i++)o[i]>r-1&&(null==o[i+1]&&(o[i+1]=0),o[i+1]+=o[i]/r|0,o[i]%=r)}return o.reverse()}return function(n,i,a,o,s){var c,u,f,h,l,d,g,v,m=n.indexOf("."),b=p,w=y;for(m>=0&&(h=E,E=0,n=n.replace(".",""),d=(v=new T(i)).pow(n.length-m),E=h,v.c=t(ie($(d.c),d.e,"0"),10,a,e),v.e=v.c.length),f=h=(g=t(n,i,a,s?(c=A,e):(c=e,A))).length;0==g[--h];g.pop());if(!g[0])return c.charAt(0);if(m<0?--f:(d.c=g,d.e=f,d.s=o,g=(d=r(d,v,b,w,a)).c,l=d.r,f=d.e),m=g[u=f+b+1],h=a/2,l=l||u<0||null!=g[u+1],l=w<4?(null!=m||l)&&(0==w||w==(d.s<0?3:2)):m>h||m==h&&(4==w||l||6==w&&1&g[u-1]||w==(d.s<0?8:7)),u<1||!g[0])n=l?ie(c.charAt(1),-b,c.charAt(0)):c.charAt(0);else{if(g.length=u,l)for(--a;++g[--u]>a;)g[u]=0,u||(++f,g=[1].concat(g));for(h=g.length;!g[--h];);for(m=0,n="";m<=h;n+=c.charAt(g[m++]));n=ie(n,f,c.charAt(0))}return n}}(),r=function(){function e(e,t,r){var n,i,a,o,s=0,c=e.length,u=t%Q,f=t/Q|0;for(e=e.slice();c--;)s=((i=u*(a=e[c]%Q)+(n=f*a+(o=e[c]/Q|0)*u)%Q*Q+s)/r|0)+(n/Q|0)+f*o,e[c]=i%r;return s&&(e=[s].concat(e)),e}function t(e,t,r,n){var i,a;if(r!=n)a=r>n?1:-1;else for(i=a=0;i<r;i++)if(e[i]!=t[i]){a=e[i]>t[i]?1:-1;break}return a}function r(e,t,r,n){for(var i=0;r--;)e[r]-=i,i=e[r]<t[r]?1:0,e[r]=i*n+e[r]-t[r];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(n,i,a,o,s){var c,u,f,h,l,d,p,y,g,v,m,b,w,C,E,S,A,B=n.s==i.s?1:-1,I=n.c,k=i.c;if(!(I&&I[0]&&k&&k[0]))return new T(n.s&&i.s&&(I?!k||I[0]!=k[0]:k)?I&&0==I[0]||!k?0*B:B/0:NaN);for(g=(y=new T(B)).c=[],B=a+(u=n.e-i.e)+1,s||(s=z,u=J(n.e/W)-J(i.e/W),B=B/W|0),f=0;k[f]==(I[f]||0);f++);if(k[f]>(I[f]||0)&&u--,B<0)g.push(1),h=!0;else{for(C=I.length,S=k.length,f=0,B+=2,(l=V(s/(k[0]+1)))>1&&(k=e(k,l,s),I=e(I,l,s),S=k.length,C=I.length),w=S,m=(v=I.slice(0,S)).length;m<S;v[m++]=0);A=k.slice(),A=[0].concat(A),E=k[0],k[1]>=s/2&&E++;do{if(l=0,(c=t(k,v,S,m))<0){if(b=v[0],S!=m&&(b=b*s+(v[1]||0)),(l=V(b/E))>1)for(l>=s&&(l=s-1),p=(d=e(k,l,s)).length,m=v.length;1==t(d,v,p,m);)l--,r(d,S<p?A:k,p,s),p=d.length,c=1;else 0==l&&(c=l=1),p=(d=k.slice()).length;if(p<m&&(d=[0].concat(d)),r(v,d,m,s),m=v.length,-1==c)for(;t(k,v,S,m)<1;)l++,r(v,S<m?A:k,m,s),m=v.length}else 0===c&&(l++,v=[0]);g[f++]=l,v[0]?v[m++]=I[w]||0:(v=[I[w]],m=1)}while((w++<C||null!=v[0])&&B--);h=null!=v[0],g[0]||g.splice(0,1)}if(s==z){for(f=1,B=g[0];B>=10;B/=10,f++);R(y,a+(y.e=f+u*W-1)+1,o,h)}else y.e=u,y.r=+h;return y}}(),s=/^(-?)0([xbo])(?=\w[\w.]*$)/i,c=/^([^.]+)\.$/,u=/^\.([^.]+)$/,f=/^-?(Infinity|NaN)$/,h=/^\s*\+(?=[\w.])|^\s+|\s+$/g,i=function(e,t,r,n){var i,a=r?t:t.replace(h,"");if(f.test(a))e.s=isNaN(a)?null:a<0?-1:1;else{if(!r&&(a=a.replace(s,(function(e,t,r){return i="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=i?e:t})),n&&(i=n,a=a.replace(c,"$1").replace(u,"0.$1")),t!=a))return new T(a,i);if(T.DEBUG)throw Error(H+"Not a"+(n?" base "+n:"")+" number: "+t);e.s=null}e.c=e.e=null},l.absoluteValue=l.abs=function(){var e=new T(this);return e.s<0&&(e.s=1),e},l.comparedTo=function(e,t){return ee(this,new T(e,t))},l.decimalPlaces=l.dp=function(e,t){var r,n,i,a=this;if(null!=e)return te(e,0,Z),null==t?t=y:te(t,0,8),R(new T(a),e+a.e+1,t);if(!(r=a.c))return null;if(n=((i=r.length-1)-J(this.e/W))*W,i=r[i])for(;i%10==0;i/=10,n--);return n<0&&(n=0),n},l.dividedBy=l.div=function(e,t){return r(this,new T(e,t),p,y)},l.dividedToIntegerBy=l.idiv=function(e,t){return r(this,new T(e,t),0,1)},l.exponentiatedBy=l.pow=function(e,t){var r,n,i,a,o,s,c,u,f=this;if((e=new T(e)).c&&!e.isInteger())throw Error(H+"Exponent not an integer: "+x(e));if(null!=t&&(t=new T(t)),o=e.e>14,!f.c||!f.c[0]||1==f.c[0]&&!f.e&&1==f.c.length||!e.c||!e.c[0])return u=new T(Math.pow(+x(f),o?e.s*(2-re(e)):+x(e))),t?u.mod(t):u;if(s=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new T(NaN);(n=!s&&f.isInteger()&&t.isInteger())&&(f=f.mod(t))}else{if(e.e>9&&(f.e>0||f.e<-1||(0==f.e?f.c[0]>1||o&&f.c[1]>=24e7:f.c[0]<8e13||o&&f.c[0]<=9999975e7)))return a=f.s<0&&re(e)?-0:0,f.e>-1&&(a=1/a),new T(s?1/a:a);E&&(a=j(E/W+2))}for(o?(r=new T(.5),s&&(e.s=1),c=re(e)):c=(i=Math.abs(+x(e)))%2,u=new T(d);;){if(c){if(!(u=u.times(f)).c)break;a?u.c.length>a&&(u.c.length=a):n&&(u=u.mod(t))}if(i){if(0===(i=V(i/2)))break;c=i%2}else if(R(e=e.times(r),e.e+1,1),e.e>14)c=re(e);else{if(0==(i=+x(e)))break;c=i%2}f=f.times(f),a?f.c&&f.c.length>a&&(f.c.length=a):n&&(f=f.mod(t))}return n?u:(s&&(u=d.div(u)),t?u.mod(t):a?R(u,E,y,void 0):u)},l.integerValue=function(e){var t=new T(this);return null==e?e=y:te(e,0,8),R(t,t.e+1,e)},l.isEqualTo=l.eq=function(e,t){return 0===ee(this,new T(e,t))},l.isFinite=function(){return!!this.c},l.isGreaterThan=l.gt=function(e,t){return ee(this,new T(e,t))>0},l.isGreaterThanOrEqualTo=l.gte=function(e,t){return 1===(t=ee(this,new T(e,t)))||0===t},l.isInteger=function(){return!!this.c&&J(this.e/W)>this.c.length-2},l.isLessThan=l.lt=function(e,t){return ee(this,new T(e,t))<0},l.isLessThanOrEqualTo=l.lte=function(e,t){return-1===(t=ee(this,new T(e,t)))||0===t},l.isNaN=function(){return!this.s},l.isNegative=function(){return this.s<0},l.isPositive=function(){return this.s>0},l.isZero=function(){return!!this.c&&0==this.c[0]},l.minus=function(e,t){var r,n,i,a,o=this,s=o.s;if(t=(e=new T(e,t)).s,!s||!t)return new T(NaN);if(s!=t)return e.s=-t,o.plus(e);var c=o.e/W,u=e.e/W,f=o.c,h=e.c;if(!c||!u){if(!f||!h)return f?(e.s=-t,e):new T(h?o:NaN);if(!f[0]||!h[0])return h[0]?(e.s=-t,e):new T(f[0]?o:3==y?-0:0)}if(c=J(c),u=J(u),f=f.slice(),s=c-u){for((a=s<0)?(s=-s,i=f):(u=c,i=h),i.reverse(),t=s;t--;i.push(0));i.reverse()}else for(n=(a=(s=f.length)<(t=h.length))?s:t,s=t=0;t<n;t++)if(f[t]!=h[t]){a=f[t]<h[t];break}if(a&&(i=f,f=h,h=i,e.s=-e.s),(t=(n=h.length)-(r=f.length))>0)for(;t--;f[r++]=0);for(t=z-1;n>s;){if(f[--n]<h[n]){for(r=n;r&&!f[--r];f[r]=t);--f[r],f[n]+=z}f[n]-=h[n]}for(;0==f[0];f.splice(0,1),--u);return f[0]?_(e,f,u):(e.s=3==y?-1:1,e.c=[e.e=0],e)},l.modulo=l.mod=function(e,t){var n,i,a=this;return e=new T(e,t),!a.c||!e.s||e.c&&!e.c[0]?new T(NaN):!e.c||a.c&&!a.c[0]?new T(a):(9==C?(i=e.s,e.s=1,n=r(a,e,0,3),e.s=i,n.s*=i):n=r(a,e,0,C),(e=a.minus(n.times(e))).c[0]||1!=C||(e.s=a.s),e)},l.multipliedBy=l.times=function(e,t){var r,n,i,a,o,s,c,u,f,h,l,d,p,y,g,v=this,m=v.c,b=(e=new T(e,t)).c;if(!(m&&b&&m[0]&&b[0]))return!v.s||!e.s||m&&!m[0]&&!b||b&&!b[0]&&!m?e.c=e.e=e.s=null:(e.s*=v.s,m&&b?(e.c=[0],e.e=0):e.c=e.e=null),e;for(n=J(v.e/W)+J(e.e/W),e.s*=v.s,(c=m.length)<(h=b.length)&&(p=m,m=b,b=p,i=c,c=h,h=i),i=c+h,p=[];i--;p.push(0));for(y=z,g=Q,i=h;--i>=0;){for(r=0,l=b[i]%g,d=b[i]/g|0,a=i+(o=c);a>i;)r=((u=l*(u=m[--o]%g)+(s=d*u+(f=m[o]/g|0)*l)%g*g+p[a]+r)/y|0)+(s/g|0)+d*f,p[a--]=u%y;p[a]=r}return r?++n:p.splice(0,1),_(e,p,n)},l.negated=function(){var e=new T(this);return e.s=-e.s||null,e},l.plus=function(e,t){var r,n=this,i=n.s;if(t=(e=new T(e,t)).s,!i||!t)return new T(NaN);if(i!=t)return e.s=-t,n.minus(e);var a=n.e/W,o=e.e/W,s=n.c,c=e.c;if(!a||!o){if(!s||!c)return new T(i/0);if(!s[0]||!c[0])return c[0]?e:new T(s[0]?n:0*i)}if(a=J(a),o=J(o),s=s.slice(),i=a-o){for(i>0?(o=a,r=c):(i=-i,r=s),r.reverse();i--;r.push(0));r.reverse()}for((i=s.length)-(t=c.length)<0&&(r=c,c=s,s=r,t=i),i=0;t;)i=(s[--t]=s[t]+c[t]+i)/z|0,s[t]=z===s[t]?0:s[t]%z;return i&&(s=[i].concat(s),++o),_(e,s,o)},l.precision=l.sd=function(e,t){var r,n,i,a=this;if(null!=e&&e!==!!e)return te(e,1,Z),null==t?t=y:te(t,0,8),R(new T(a),e,t);if(!(r=a.c))return null;if(n=(i=r.length-1)*W+1,i=r[i]){for(;i%10==0;i/=10,n--);for(i=r[0];i>=10;i/=10,n++);}return e&&a.e+1>n&&(n=a.e+1),n},l.shiftedBy=function(e){return te(e,-9007199254740991,X),this.times("1e"+e)},l.squareRoot=l.sqrt=function(){var e,t,n,i,a,o=this,s=o.c,c=o.s,u=o.e,f=p+4,h=new T("0.5");if(1!==c||!s||!s[0])return new T(!c||c<0&&(!s||s[0])?NaN:s?o:1/0);if(0==(c=Math.sqrt(+x(o)))||c==1/0?(((t=$(s)).length+u)%2==0&&(t+="0"),c=Math.sqrt(+t),u=J((u+1)/2)-(u<0||u%2),n=new T(t=c==1/0?"5e"+u:(t=c.toExponential()).slice(0,t.indexOf("e")+1)+u)):n=new T(c+""),n.c[0])for((c=(u=n.e)+f)<3&&(c=0);;)if(a=n,n=h.times(a.plus(r(o,a,f,1))),$(a.c).slice(0,c)===(t=$(n.c)).slice(0,c)){if(n.e<u&&--c,"9999"!=(t=t.slice(c-3,c+1))&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(R(n,n.e+p+2,1),e=!n.times(n).eq(o));break}if(!i&&(R(a,a.e+p+2,0),a.times(a).eq(o))){n=a;break}f+=4,c+=4,i=1}return R(n,n.e+p+1,y,e)},l.toExponential=function(e,t){return null!=e&&(te(e,0,Z),e++),I(this,e,t,1)},l.toFixed=function(e,t){return null!=e&&(te(e,0,Z),e=e+this.e+1),I(this,e,t)},l.toFormat=function(e,t,r){var n,i=this;if(null==r)null!=e&&t&&"object"==typeof t?(r=t,t=null):e&&"object"==typeof e?(r=e,e=t=null):r=S;else if("object"!=typeof r)throw Error(H+"Argument not an object: "+r);if(n=i.toFixed(e,t),i.c){var a,o=n.split("."),s=+r.groupSize,c=+r.secondaryGroupSize,u=r.groupSeparator||"",f=o[0],h=o[1],l=i.s<0,d=l?f.slice(1):f,p=d.length;if(c&&(a=s,s=c,c=a,p-=a),s>0&&p>0){for(a=p%s||s,f=d.substr(0,a);a<p;a+=s)f+=u+d.substr(a,s);c>0&&(f+=u+d.slice(a)),l&&(f="-"+f)}n=h?f+(r.decimalSeparator||"")+((c=+r.fractionGroupSize)?h.replace(new RegExp("\\d{"+c+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):h):f}return(r.prefix||"")+n+(r.suffix||"")},l.toFraction=function(e){var t,n,i,a,o,s,c,u,f,h,l,p,g=this,v=g.c;if(null!=e&&(!(c=new T(e)).isInteger()&&(c.c||1!==c.s)||c.lt(d)))throw Error(H+"Argument "+(c.isInteger()?"out of range: ":"not an integer: ")+x(c));if(!v)return new T(g);for(t=new T(d),f=n=new T(d),i=u=new T(d),p=$(v),o=t.e=p.length-g.e-1,t.c[0]=Y[(s=o%W)<0?W+s:s],e=!e||c.comparedTo(t)>0?o>0?t:f:c,s=b,b=1/0,c=new T(p),u.c[0]=0;h=r(c,t,0,1),1!=(a=n.plus(h.times(i))).comparedTo(e);)n=i,i=a,f=u.plus(h.times(a=f)),u=a,t=c.minus(h.times(a=t)),c=a;return a=r(e.minus(n),i,0,1),u=u.plus(a.times(f)),n=n.plus(a.times(i)),u.s=f.s=g.s,l=r(f,i,o*=2,y).minus(g).abs().comparedTo(r(u,n,o,y).minus(g).abs())<1?[f,i]:[u,n],b=s,l},l.toNumber=function(){return+x(this)},l.toPrecision=function(e,t){return null!=e&&te(e,1,Z),I(this,e,t,2)},l.toString=function(e){var t,r=this,i=r.s,a=r.e;return null===a?i?(t="Infinity",i<0&&(t="-"+t)):t="NaN":(null==e?t=a<=g||a>=v?ne($(r.c),a):ie($(r.c),a,"0"):10===e&&B?t=ie($((r=R(new T(r),p+a+1,y)).c),r.e,"0"):(te(e,2,A.length,"Base"),t=n(ie($(r.c),a,"0"),10,e,i,!0)),i<0&&r.c[0]&&(t="-"+t)),t},l.valueOf=l.toJSON=function(){return x(this)},l._isBigNumber=!0,l[Symbol.toStringTag]="BigNumber",l[Symbol.for("nodejs.util.inspect.custom")]=l.valueOf,null!=t&&T.set(t),T}();const oe=ae;function se(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,a,o,s=[],c=!0,u=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(e){u=!0,i=e}finally{try{if(!c&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}(e,t)||y(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var ce=function(){function t(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;e(this,t),this.bytes=r,this.length=this.bytes.length,this.position=n,this.bitPos=i}return i(t,[{key:"clone",value:function(){return new t(this.bytes,this.position,this.bitPos)}},{key:"getBytes",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(!(this.position>this.length)){var t=null!==e?this.position+e:this.length,r=this.bytes.slice(this.position,t);return this.position=t,this.bitPos=0,r}}},{key:"readString",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;if(!(this.position>this.length)){-1===e&&(e=this.length-this.position);for(var t="",r=this.position;r<this.position+e;r++){var n=this.bytes[r];if(0===n)break;t+=String.fromCharCode(n)}return this.position+=e,this.bitPos=0,t}}},{key:"readInt",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"be";if(!(this.position>this.length)){var r=0;if("be"===t)for(var n=this.position;n<this.position+e;n++)r<<=8,r|=this.bytes[n];else for(var i=this.position+e-1;i>=this.position;i--)r<<=8,r|=this.bytes[i];return this.position+=e,this.bitPos=0,r}}},{key:"readBits",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"be";if(!(this.position>this.length)){var r,n=0,i=0;for(n=this.bytes[this.position++]&(r=this.bitPos,"be"===t?(1<<8-r)-1:256-(1<<r)),"be"!==t&&(n>>>=this.bitPos),i=8-this.bitPos,this.bitPos=0;i<e;)"be"===t?n=n<<i|this.bytes[this.position++]:n|=this.bytes[this.position++]<<i,i+=8;if(i>e){var a=i-e;"be"===t?n>>>=a:n&=(1<<e)-1,i-=a,this.position--,this.bitPos=8-a}return n}}},{key:"continueUntil",value:function(e){if(!(this.position>this.length))if(this.bitPos=0,"number"!=typeof e){var t=e.length,r=e[t-1];this.position=t;for(var n,i=function(e,t){var r=new Array;return e.forEach((function(e,n){r[e]=t-n})),r}(e,t);this.position<this.length;){for(;this.position<this.length&&this.bytes[this.position++]!==r;);n=!0;for(var a=t-1;a>=0;a--)if(this.bytes[this.position-t+a]!==e[a]){n=!1,this.position+=i[e[a]];break}if(n){this.position-=t;break}}}else for(;++this.position<this.length&&this.bytes[this.position]!==e;);}},{key:"consumeWhile",value:function(e){for(;this.position<this.length&&this.bytes[this.position]===e;)this.position++;this.bitPos=0}},{key:"consumeIf",value:function(e){this.bytes[this.position]===e&&(this.position++,this.bitPos=0)}},{key:"moveForwardsBy",value:function(e){var t=this.position+e;if(t<0||t>this.length)throw new Error("Cannot move to position "+t+" in stream. Out of bounds.");this.position=t,this.bitPos=0}},{key:"moveBackwardsBy",value:function(e){var t=this.position-e;if(t<0||t>this.length)throw new Error("Cannot move to position "+t+" in stream. Out of bounds.");this.position=t,this.bitPos=0}},{key:"moveBackwardsByBits",value:function(e){if(e<=this.bitPos)this.bitPos-=e;else for(this.bitPos>0&&(e-=this.bitPos,this.bitPos=0);e>0;)this.moveBackwardsBy(1),this.bitPos=8,this.moveBackwardsByBits(e),e-=8}},{key:"moveTo",value:function(e){if(e<0||e>this.length)throw new Error("Cannot move to position "+e+" in stream. Out of bounds.");this.position=e,this.bitPos=0}},{key:"hasMore",value:function(){return this.position<this.length}},{key:"carve",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.position;return this.bitPos>0&&t++,this.bytes.slice(e,t)}}]),t}();function ue(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return fe(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?fe(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function fe(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var he={Images:[{name:"Joint Photographic Experts Group image",extension:"jpg,jpeg,jpe,thm,mpo",mime:"image/jpeg",description:"",signature:{0:255,1:216,2:255,3:[192,196,219,221,224,225,226,227,228,229,231,232,234,235,236,237,238,254]},extractor:function(e,t){for(var r=new ce(e.slice(t));r.hasMore();){var n=r.getBytes(2);if(255!==n[0])throw new Error(`Invalid marker while parsing JPEG at pos ${r.position}: ${n}`);var i=0;switch(n[1]){case 216:case 1:break;case 217:return r.carve();case 192:case 193:case 194:case 195:case 196:case 197:case 198:case 199:case 200:case 201:case 202:case 203:case 204:case 205:case 206:case 207:case 219:case 222:case 224:case 225:case 226:case 227:case 228:case 229:case 230:case 231:case 232:case 233:case 234:case 235:case 236:case 237:case 238:case 239:case 254:i=r.readInt(2,"be"),r.position+=i-2;break;case 223:r.position++;break;case 220:case 221:r.position+=2;break;case 218:i=r.readInt(2,"be"),r.position+=i-2,r.continueUntil(255);break;default:r.continueUntil(255)}}throw new Error("Unable to parse JPEG successfully")}},{name:"Graphics Interchange Format image",extension:"gif",mime:"image/gif",description:"",signature:{0:71,1:73,2:70,3:56,4:[55,57],5:97},extractor:function(e,t){var r=new ce(e.slice(t));for(r.continueUntil([33,255]),r.continueUntil([33,249]),r.moveForwardsBy(2);r.hasMore();){for(r.moveForwardsBy(r.readInt(1)+1),r.moveForwardsBy(11);r.getBytes(2)!==[33,249]&&(r.moveBackwardsBy(2),r.moveForwardsBy(r.readInt(1)),r.readInt(1));)r.moveBackwardsBy(1);if(59===r.readInt(1))break;r.moveForwardsBy(1)}return r.carve()}},{name:"Portable Network Graphics image",extension:"png",mime:"image/png",description:"",signature:{0:137,1:80,2:78,3:71,4:13,5:10,6:26,7:10},extractor:function(e,t){var r=new ce(e.slice(t));r.moveForwardsBy(8);for(var n=0,i="";"IEND"!==i;)n=r.readInt(4,"be"),i=r.readString(4),r.moveForwardsBy(n+4);return r.carve()}},{name:"WEBP Image",extension:"webp",mime:"image/webp",description:"",signature:{8:87,9:69,10:66,11:80},extractor:function(e,t){var r=new ce(e.slice(t));r.moveForwardsBy(4);var n=r.readInt(4,"le");return r.moveForwardsBy(n),r.carve()}},{name:"High Efficiency Image File Format",extension:"heic,heif",mime:"image/heif",description:"",signature:{0:0,1:0,2:0,4:102,5:116,6:121,7:112,8:104,9:101,10:105,11:99},extractor:null},{name:"Camera Image File Format",extension:"crw",mime:"image/x-canon-crw",description:"",signature:{6:72,7:69,8:65,9:80,10:67,11:67,12:68,13:82},extractor:null},{name:"Canon CR2 raw image",extension:"cr2",mime:"image/x-canon-cr2",description:"",signature:[{0:73,1:73,2:42,3:0,8:67,9:82},{0:77,1:77,2:0,3:42,8:67,9:82}],extractor:null},{name:"Tagged Image File Format image",extension:"tif",mime:"image/tiff",description:"",signature:[{0:73,1:73,2:42,3:0},{0:77,1:77,2:0,3:42}],extractor:null},{name:"Bitmap image",extension:"bmp",mime:"image/bmp",description:"",signature:{0:66,1:77,7:0,9:0,14:[12,40,56,64,108,124],15:0,16:0,17:0},extractor:function(e,t){var r=new ce(e.slice(t));r.moveForwardsBy(2);var n=r.readInt(4,"le");return r.moveForwardsBy(n-6),r.carve()}},{name:"JPEG Extended Range image",extension:"jxr",mime:"image/vnd.ms-photo",description:"",signature:{0:73,1:73,2:188},extractor:null},{name:"Photoshop image",extension:"psd",mime:"image/vnd.adobe.photoshop",description:"",signature:{0:56,1:66,2:80,3:83,4:0,5:1,6:0,7:0,8:0,9:0,10:0,11:0},extractor:null},{name:"Photoshop Large Document",extension:"psb",mime:"application/x-photoshop",description:"",signature:{0:56,1:66,2:80,3:83,4:0,5:2,6:0,7:0,8:0,9:0,10:0,11:0,12:0},extractor:null},{name:"Paint Shop Pro image",extension:"psp",mime:"image/psp",description:"",signature:[{0:80,1:97,2:105,3:110,4:116,5:32,6:83,7:104,8:111,9:112,10:32,11:80,12:114,13:111,14:32,15:73,16:109},{0:126,1:66,2:75,3:0}],extractor:null},{name:"The GIMP image",extension:"xcf",mime:"image/x-xcf",description:"",signature:{0:103,1:105,2:109,3:112,4:32,5:120,6:99,7:102,8:32,9:[102,118],10:[105,48],11:[108,48],12:[101,49,50,51]},extractor:null},{name:"Icon image",extension:"ico",mime:"image/x-icon",description:"",signature:{0:0,1:0,2:1,3:0,4:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21],5:0,6:[16,32,48,64,128],7:[16,32,48,64,128],9:0,10:[0,1]},extractor:function(e,t){var r=new ce(e.slice(t));r.moveTo(4);var n=r.readInt(2,"le");r.moveForwardsBy(8+16*(n-1));var i=r.readInt(4,"le"),a=r.readInt(4,"le");return r.moveTo(a+i),r.carve()}},{name:"Radiance High Dynamic Range image",extension:"hdr",mime:"image/vnd.radiance",description:"",signature:{0:35,1:63,2:82,3:65,4:68,5:73,6:65,7:78,8:67,9:69,10:10},extractor:null},{name:"Sony ARW image",extension:"arw",mime:"image/x-raw",description:"",signature:{0:5,1:0,2:0,3:0,4:65,5:87,6:49,7:46},extractor:null},{name:"Fujifilm Raw Image",extension:"raf",mime:"image/x-raw",description:"",signature:{0:70,1:85,2:74,3:73,4:70,5:73,6:76,7:77,8:67,9:67,10:68,11:45,12:82,13:65,14:87},extractor:null},{name:"Minolta RAW image",extension:"mrw",mime:"image/x-raw",description:"",signature:{0:0,1:77,2:82,3:77},extractor:null},{name:"Adobe Bridge Thumbnail Cache",extension:"bct",mime:"application/octet-stream",description:"",signature:{0:108,1:110,2:98,3:116,4:2,5:0,6:0,7:0},extractor:null},{name:"Microsoft Document Imaging",extension:"mdi",mime:"image/vnd.ms-modi",description:"",signature:{0:69,1:80,2:42,3:0},extractor:null},{name:"Joint Photographic Experts Group image (under Base64)",extension:"B64",mime:"application/octet-stream",description:"",signature:{0:47,1:57,2:106,3:47,4:52},extractor:null},{name:"Portable Network Graphics image (under Base64)",extension:"B64",mime:"application/octet-stream",description:"",signature:{0:105,1:86,2:66,3:79,4:82,5:119,6:48},extractor:null},{name:"AutoCAD Drawing",extension:"dwg,123d",mime:"application/acad",description:"",signature:{0:65,1:67,2:49,3:48,4:[48,49],5:[48,49,50,51,52,53],6:0},extractor:null},{name:"AutoCAD Drawing",extension:"dwg,dwt",mime:"application/acad",description:"",signature:[{0:65,1:67,2:49,3:48,4:49,5:56,6:0},{0:65,1:67,2:49,3:48,4:50,5:52,6:0},{0:65,1:67,2:49,3:48,4:50,5:55,6:0}],extractor:null},{name:"Targa Image",extension:"tga",mime:"image/x-targa",description:"",signature:[{0:84,1:82,2:85,3:69,4:86,5:73,6:83,7:73,8:79,9:78,10:45,11:88,12:70,13:73,14:76,15:69,16:46}],extractor:function(e,t){var r=new ce(e);r.moveTo(t-8);var n=r.readInt(4,"le"),i=r.readInt(4,"le");function a(e,t){for(var n=0;n<e;n++){r.moveBackwardsBy(1);var i=r.readInt(t,"le")-1;if(r.moveBackwardsBy(t),i===n)break}}return r.moveBackwardsBy(8),n||i?n?(a(65535,2),r.moveBackwardsBy(n)):i&&(a(4294967295,4),r.moveBackwardsBy(6),r.moveBackwardsBy(i)):(function(){r.moveBackwardsBy(5);for(var e=0;e<1048576&&r.readInt(2,"le")*r.readInt(2,"le")*r.readInt(1)/8!=e-1;e++)r.moveBackwardsBy(6)}(),r.moveBackwardsBy(17)),r.carve(r.position,t+18)}}],Video:[{name:"Matroska Multimedia Container",extension:"mkv",mime:"video/x-matroska",description:"",signature:{31:109,32:97,33:116,34:114,35:111,36:115,37:107,38:97},extractor:null},{name:"WEBM video",extension:"webm",mime:"video/webm",description:"",signature:{0:26,1:69,2:223,3:163},extractor:null},{name:"Flash MP4 video",extension:"f4v",mime:"video/mp4",description:"",signature:{4:102,5:116,6:121,7:112,8:[102,70],9:52,10:[118,86],11:32},extractor:null},{name:"MPEG-4 video",extension:"mp4",mime:"video/mp4",description:"",signature:[{0:0,1:0,2:0,3:[24,32],4:102,5:116,6:121,7:112},{0:51,1:103,2:112,3:53},{0:0,1:0,2:0,3:28,4:102,5:116,6:121,7:112,8:109,9:112,10:52,11:50,16:109,17:112,18:52,19:49,20:109,21:112,22:52,23:50,24:105,25:115,26:111,27:109}],extractor:null},{name:"M4V video",extension:"m4v",mime:"video/x-m4v",description:"",signature:{0:0,1:0,2:0,3:28,4:102,5:116,6:121,7:112,8:77,9:52,10:86},extractor:null},{name:"Quicktime video",extension:"mov",mime:"video/quicktime",description:"",signature:{0:0,1:0,2:0,3:20,4:102,5:116,6:121,7:112},extractor:null},{name:"Audio Video Interleave",extension:"avi",mime:"video/x-msvideo",description:"",signature:{0:82,1:73,2:70,3:70,8:65,9:86,10:73},extractor:null},{name:"Windows Media Video",extension:"wmv",mime:"video/x-ms-wmv",description:"",signature:{0:48,1:38,2:178,3:117,4:142,5:102,6:207,7:17,8:166,9:217},extractor:null},{name:"MPEG video",extension:"mpg",mime:"video/mpeg",description:"",signature:{0:0,1:0,2:1,3:186},extractor:null},{name:"Flash Video",extension:"flv",mime:"video/x-flv",description:"",signature:{0:70,1:76,2:86,3:1},extractor:function(e,t){var r=new ce(e.slice(t));r.moveForwardsBy(5);var n=r.readInt(4,"be");r.moveForwardsBy(n-9);for(var i=-11;r.hasMore();){var a=r.readInt(4,"be"),o=r.readInt(1);if([8,9,18].indexOf(o)<0){r.moveBackwardsBy(1);break}if(a!==i+11){r.moveBackwardsBy(i+11+5);break}i=r.readInt(3,"be"),r.moveForwardsBy(7+i)}return r.carve()}},{name:"OGG Video",extension:"ogv,ogm,opus,ogx",mime:"video/ogg",description:"",signature:[{0:79,1:103,2:103,3:83,4:0,5:2,28:1,29:118,30:105,31:100,32:101,33:111},{0:79,1:103,2:103,3:83,4:0,5:2,28:128,29:116,30:104,31:101,32:111,33:114,34:97},{0:79,1:103,2:103,3:83,4:0,5:2,28:102,29:105,30:115,31:104,32:101,33:97,34:100}],extractor:null}],Audio:[{name:"Waveform Audio",extension:"wav",mime:"audio/x-wav",description:"",signature:{0:82,1:73,2:70,3:70,8:87,9:65,10:86,11:69},extractor:function(e,t){var r=new ce(e.slice(t));return r.moveTo(4),r.moveTo(r.readInt(4,"le")+8),r.carve()}},{name:"OGG audio",extension:"ogg",mime:"audio/ogg",description:"",signature:{0:79,1:103,2:103,3:83},extractor:null},{name:"Musical Instrument Digital Interface audio",extension:"midi",mime:"audio/midi",description:"",signature:{0:77,1:84,2:104,3:100},extractor:null},{name:"MPEG-3 audio",extension:"mp3",mime:"audio/mpeg",description:"",signature:[{0:73,1:68,2:51},{0:255,1:251}],extractor:function(e,t){var r=new ce(e.slice(t)),n=["free",32e3,4e4,48e3,56e3,64e3,8e4,96e3,112e3,128e3,16e4,192e3,224e3,256e3,32e4,"bad"],i=[44100,48e3,32e3,"reserved"];if(r.getBytes(3).toString()===[73,68,51].toString()){r.moveTo(6);var a=r.readInt(1)<<21|r.readInt(1)<<14|r.readInt(1)<<7|r.readInt(1);r.moveForwardsBy(a)}else r.moveTo(0);for(;r.hasMore();){if(r.getBytes(3)===[84,65,71].toString()){r.moveForwardsBy(125);break}if(r.getBytes(2).toString()!==[255,251].toString()){r.moveBackwardsBy(2);break}var o=r.readInt(1),s=n[o>>4],c=i[(15&o)>>2],u=(2&o)>>1;if("free"===s||"bad"===s||"reserved"===c){r.moveBackwardsBy(1);break}var f=Math.floor(144*s/c+u);if(r.position+f>r.length){r.moveTo(r.length);break}r.moveForwardsBy(f-3)}return r.carve()}},{name:"MPEG-4 Part 14 audio",extension:"m4a",mime:"audio/m4a",description:"",signature:[{4:102,5:116,6:121,7:112,8:77,9:52,10:65},{0:77,1:52,2:65,3:32}],extractor:null},{name:"Free Lossless Audio Codec",extension:"flac",mime:"audio/x-flac",description:"",signature:{0:102,1:76,2:97,3:67},extractor:null},{name:"Adaptive Multi-Rate audio codec",extension:"amr",mime:"audio/amr",description:"",signature:{0:35,1:33,2:65,3:77,4:82,5:10},extractor:null},{name:"Audacity",extension:"au",mime:"audio/x-au",description:"",signature:{0:100,1:110,2:115,3:46,24:65,25:117,26:100,27:97,28:99,29:105,30:116,31:121,32:66,33:108,34:111,35:99,36:107,37:70,38:105,39:108,40:101},extractor:null},{name:"Audacity Block",extension:"auf",mime:"application/octet-stream",description:"",signature:{0:65,1:117,2:100,3:97,4:99,5:105,6:116,7:121,8:66,9:108,10:111,11:99,12:107,13:70,14:105,15:108,16:101},extractor:null},{name:"Audio Interchange File",extension:"aif",mime:"audio/x-aiff",description:"",signature:{0:70,1:79,2:82,3:77,8:65,9:73,10:70,11:70},extractor:null},{name:"Audio Interchange File (compressed)",extension:"aifc",mime:"audio/x-aifc",description:"",signature:{0:70,1:79,2:82,3:77,8:65,9:73,10:70,11:67},extractor:null}],Documents:[{name:"Portable Document Format",extension:"pdf",mime:"application/pdf",description:"",signature:{0:37,1:80,2:68,3:70},extractor:function(e,t){var r=new ce(e.slice(t));return r.continueUntil([37,37,69,79,70]),r.moveForwardsBy(5),r.consumeIf(13),r.consumeIf(10),r.carve()}},{name:"Portable Document Format (under Base64)",extension:"B64",mime:"application/octet-stream",description:"",signature:{0:65,1:74,2:86,3:66,4:69,5:82,6:105},extractor:null},{name:"Adobe PostScript",extension:"ps,eps,ai,pfa",mime:"application/postscript",description:"",signature:{0:37,1:33,2:80,3:83,4:45,5:65,6:100,7:111,8:98,9:101},extractor:null},{name:"PostScript",extension:"ps",mime:"application/postscript",description:"",signature:{0:37,1:33},extractor:null},{name:"Encapsulated PostScript",extension:"eps,ai",mime:"application/eps",description:"",signature:{0:197,1:208,2:211,3:198},extractor:null},{name:"Rich Text Format",extension:"rtf",mime:"application/rtf",description:"",signature:{0:123,1:92,2:114,3:116},extractor:function(e,t){var r=new ce(e.slice(t)),n=0;if(123!==r.readInt(1))throw new Error("Not a valid RTF file");for(n++;n>0&&r.hasMore();)switch(r.readInt(1)){case 123:n++;break;case 125:n--;break;case 92:r.consumeIf(92),r.position++}return r.carve()}},{name:"Microsoft Office document/OLE2",extension:"ole2,doc,xls,dot,ppt,xla,ppa,pps,pot,msi,sdw,db,vsd,msg",mime:"application/msword,application/vnd.ms-excel,application/vnd.ms-powerpoint",description:"Microsoft Office documents",signature:{0:208,1:207,2:17,3:224,4:161,5:177,6:26,7:225},extractor:null},{name:"Microsoft Office document/OLE2 (under Base64)",extension:"B64",mime:"application/octet-stream",description:"",signature:{0:48,1:77,2:56,3:82,4:52,5:75,6:71,7:120},extractor:null},{name:"Microsoft Office 2007+ document",extension:"docx,xlsx,pptx",mime:"application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.openxmlformats-officedocument.presentationml.presentation",description:"",signature:{38:95,39:84,40:121,41:112,42:101,43:115,44:93,45:46,46:120,47:109,48:108},extractor:le},{name:"Microsoft Access database",extension:"mdb,mda,mde,mdt,fdb,psa",mime:"application/msaccess",description:"",signature:{0:0,1:1,2:0,3:0,4:83,5:116,6:97,7:110,8:100,9:97,10:114,11:100,12:32,13:74,14:101,15:116},extractor:null},{name:"Microsoft Access 2007+ database",extension:"accdb,accde,accda,accdu",mime:"application/msaccess",description:"",signature:{0:0,1:1,2:0,3:0,4:83,5:116,6:97,7:110,8:100,9:97,10:114,11:100,12:32,13:65,14:67,15:69,16:32},extractor:null},{name:"Microsoft OneNote document",extension:"one",mime:"application/onenote",description:"",signature:{0:228,1:82,2:92,3:123,4:140,5:216,6:167,7:77,8:174,9:177,10:83,11:120,12:208,13:41,14:150,15:211},extractor:null},{name:"Outlook Express database",extension:"dbx",mime:"application/octet-stream",description:"",signature:{0:207,1:173,2:18,3:254,4:[48,197,198,199],11:17},extractor:null},{name:"Personal Storage Table (Outlook)",extension:"pst,ost,fdb,pab",mime:"application/octet-stream",description:"",signature:{0:33,1:66,2:68,3:78},extractor:null},{name:"Microsoft Exchange Database",extension:"edb",mime:"application/octet-stream",description:"",signature:{4:239,5:205,6:171,7:137,8:[32,35],9:6,10:0,11:0,12:[0,1],13:0,14:0,15:0},extractor:null},{name:"WordPerfect document",extension:"wpd,wp,wp5,wp6,wpp,bk!,wcm",mime:"application/wordperfect",description:"",signature:{0:255,1:87,2:80,3:67,7:[0,1,2],8:1,9:10},extractor:null},{name:"EPUB e-book",extension:"epub",mime:"application/epub+zip",description:"",signature:{0:80,1:75,2:3,3:4,30:109,31:105,32:109,33:101,34:116,35:121,36:112,37:101,38:97,39:112,40:112,41:108,42:105,43:99,44:97,45:116,46:105,47:111,48:110,49:47,50:101,51:112,52:117,53:98,54:43,55:122,56:105,57:112},extractor:le}],Applications:[{name:"Windows Portable Executable",extension:"exe,dll,drv,vxd,sys,ocx,vbx,com,fon,scr",mime:"application/vnd.microsoft.portable-executable",description:"",signature:{0:77,1:90,3:[0,1,2],5:[0,1,2]},extractor:function(e,t){var r=new ce(e.slice(t));r.moveTo(60);var n=r.readInt(4,"le");r.moveTo(n),r.moveForwardsBy(6);var i=r.readInt(2,"le");r.moveForwardsBy(16);var a=523===r.readInt(2,"le")?112:96;r.moveForwardsBy(a-2),r.moveForwardsBy(32);var o=r.readInt(4,"le"),s=r.readInt(4,"le");if(o>0)return r.moveTo(o+s),r.carve();r.moveForwardsBy(88),r.moveForwardsBy(40*(i-1)),r.moveForwardsBy(16);var c=r.readInt(4,"le"),u=r.readInt(4,"le");return r.moveTo(u+c),r.carve()}},{name:"Executable and Linkable Format",extension:"elf,bin,axf,o,prx,so",mime:"application/x-executable",description:"Executable and Linkable Format file. No standard file extension.",signature:{0:127,1:69,2:76,3:70},extractor:function(e,t){var r=new ce(e.slice(t));r.moveForwardsBy(4);var n=1===r.readInt(1),i=1===r.readInt(1)?"le":"be";r.moveForwardsBy(n?26:34);var a=n?r.readInt(4,i):r.readInt(8,i);r.moveForwardsBy(10);var o=r.readInt(2,i),s=r.readInt(2,i);return r.moveTo(a),r.moveForwardsBy(o*s),r.carve()}},{name:"MacOS Mach-O object",extension:"dylib",mime:"application/octet-stream",description:"",signature:[{0:202,1:254,2:186,3:190,4:0,5:0,6:0,7:[1,2,3]},{0:206,1:250,2:237,3:254,4:7,5:0,6:0,7:0,8:[1,2,3]}],extractor:de},{name:"MacOS Mach-O 64-bit object",extension:"dylib",mime:"application/octet-stream",description:"",signature:{0:207,1:250,2:237,3:254},extractor:de},{name:"Adobe Flash",extension:"swf",mime:"application/x-shockwave-flash",description:"",signature:{0:[67,70],1:87,2:83},extractor:null},{name:"Java Class",extension:"class",mime:"application/java-vm",description:"",signature:{0:202,1:254,2:186,3:190},extractor:null},{name:"Dalvik Executable",extension:"dex",mime:"application/octet-stream",description:"Dalvik Executable as used by Android",signature:{0:100,1:101,2:120,3:10,4:48,5:51,6:53,7:0},extractor:null},{name:"Google Chrome Extension",extension:"crx",mime:"application/crx",description:"Google Chrome extension or packaged app",signature:{0:67,1:114,2:50,3:52},extractor:null}],Archives:[{name:"PKZIP archive",extension:"zip",mime:"application/zip",description:"",signature:{0:80,1:75,2:[3,5,7],3:[4,6,8]},extractor:le},{name:"PKZIP archive (under Base64)",extension:"B64",mime:"application/octet-stream",description:"",signature:{0:85,1:69,2:115,3:68,4:66,5:66},extractor:null},{name:"TAR archive",extension:"tar",mime:"application/x-tar",description:"",signature:{257:117,258:115,259:116,260:97,261:114},extractor:function(e,t){for(var r=new ce(e.slice(t)),n=function(){if(r.moveForwardsBy(257),r.getBytes(5).join("")!==[117,115,116,97,114].join(""))return r.moveBackwardsBy(262),1;r.moveBackwardsBy(138);var e=0;r.getBytes(11).forEach((function(t,r){e+=(t-48).toString()})),e=512*Math.ceil(parseInt(e,8)/512),r.moveForwardsBy(e+377)};r.hasMore()&&!n(););return r.consumeWhile(0),r.carve()}},{name:"Roshal Archive",extension:"rar",mime:"application/x-rar-compressed",description:"",signature:{0:82,1:97,2:114,3:33,4:26,5:7,6:[0,1]},extractor:null},{name:"Gzip",extension:"gz",mime:"application/gzip",description:"",signature:{0:31,1:139,2:8},extractor:function(e,t){var r=new ce(e.slice(t));r.moveForwardsBy(3);var n=r.readInt(1);if(r.moveForwardsBy(4),r.readInt(1),r.moveForwardsBy(1),4&n){var i=r.readInt(2,"le");r.moveForwardsby(i)}return 8&n&&(r.continueUntil(0),r.moveForwardsBy(1)),16&n&&(r.continueUntil(0),r.moveForwardsBy(1)),2&n&&r.moveForwardsBy(2),be(r),r.moveForwardsBy(8),r.carve()}},{name:"Bzip2",extension:"bz2",mime:"application/x-bzip2",description:"",signature:{0:66,1:90,2:104},extractor:function(e,t){for(var r=new ce(e.slice(t)),n=[[119,36,83,133,9],[238,72,167,10,18],[220,145,78,20,36],[185,34,156,40,72],[114,69,56,80,144],[187,146,41,194,132],[93,201,20,225,66],[46,228,138,112,161],[23,114,69,56,80]],i=0;i<n.length&&(r.continueUntil(n[i]),r.getBytes(5).join("")!==n[i].join(""));i++)r.moveTo(0);return r.moveForwardsBy(4),r.carve()}},{name:"7zip",extension:"7z",mime:"application/x-7z-compressed",description:"",signature:{0:55,1:122,2:188,3:175,4:39,5:28},extractor:null},{name:"Zlib Deflate",extension:"zlib",mime:"application/x-deflate",description:"",signature:{0:120,1:[1,156,218,94]},extractor:function(e,t){var r=new ce(e.slice(t));return r.moveForwardsBy(1),32&r.readInt(1)&&r.moveForwardsBy(4),be(r),r.moveForwardsBy(4),r.carve()}},{name:"xz compression",extension:"xz",mime:"application/x-xz",description:"",signature:{0:253,1:55,2:122,3:88,4:90,5:0},extractor:function(e,t){var r=new ce(e.slice(t));return r.continueUntil([0,0,0,0,4,89,90]),r.moveForwardsBy(7),r.carve()}},{name:"Tarball",extension:"tar.z",mime:"application/x-gtar",description:"",signature:{0:31,1:[157,160]},extractor:null},{name:"ISO disk image",extension:"iso",mime:"application/octet-stream",description:"ISO 9660 CD/DVD image file",signature:[{32769:67,32770:68,32771:48,32772:48,32773:49},{34817:67,34818:68,34819:48,34820:48,34821:49},{36865:67,36866:68,36867:48,36868:48,36869:49}],extractor:null},{name:"Virtual Machine Disk",extension:"vmdk",mime:"application/vmdk,application/x-virtualbox-vmdk",description:"",signature:{0:75,1:68,2:77,3:86,5:0,6:0,7:0},extractor:null},{name:"Virtual Hard Drive",extension:"vhd",mime:"application/x-vhd",description:"",signature:{0:99,1:111,2:110,3:101,4:99,5:116,6:105,7:120},extractor:null},{name:"Macintosh disk image",extension:"dmf,dmg",mime:"application/octet-stream",description:"",signature:{0:120,1:1,2:115,3:13,4:98,5:98,6:96,7:96},extractor:null},{name:"ARJ Archive",extension:"arj",mime:"application/x-arj-compressed",description:"",signature:{0:96,1:234,8:[0,16,20],9:0,10:2},extractor:null},{name:"WinAce Archive",extension:"ace",mime:"application/x-ace-compressed",description:"",signature:{7:42,8:42,9:65,10:67,11:69,12:42,13:42},extractor:null},{name:"Macintosh BinHex Encoded File",extension:"hqx",mime:"application/mac-binhex",description:"",signature:{11:109,12:117,13:115,14:116,15:32,16:98,17:101,18:32,19:99,20:111,21:110,22:118,23:101,24:114,25:116,26:101,27:100,28:32,29:119,30:105,31:116,32:104,33:32,34:66,35:105,36:110,37:72,38:101,39:120},extractor:null},{name:"ALZip Archive",extension:"alz",mime:"application/octet-stream",description:"",signature:{0:65,1:76,2:90,3:1,4:10,5:0,6:0,7:0},extractor:null},{name:"KGB Compressed Archive",extension:"kgb",mime:"application/x-kgb-compressed",description:"",signature:{0:75,1:71,2:66,3:95,4:97,5:114,6:99,7:104,8:32,9:45},extractor:null},{name:"Microsoft Cabinet",extension:"cab",mime:"vnd.ms-cab-compressed",description:"",signature:{0:77,1:83,2:67,3:70,4:0,5:0,6:0,7:0},extractor:null},{name:"Jar Archive",extension:"jar",mime:"application/java-archive",description:"",signature:{0:95,1:39,2:168,3:137},extractor:null},{name:"Jar Archive",extension:"jar",mime:"application/java-archive",description:"",signature:{0:80,1:75,2:3,3:4,4:20,5:0,6:8,7:0,8:8,9:0},extractor:le},{name:"lzop compressed",extension:"lzop,lzo",mime:"application/x-lzop",description:"",signature:{0:137,1:76,2:90,3:79,4:0,5:13,6:10,7:26},extractor:function(e,t){var r=new ce(e.slice(t)),n=0,i=0;r.moveForwardsBy(9);var a=r.readInt(2,"be");r.moveForwardsBy(6);var o=r.readInt(4,"be");2048&a&&r.moveForwardsBy(4),2&o&&n++,512&o&&n++,1&o&&i++,256&o&&i++,r.moveForwardsBy(8),a>=2368&&r.moveForwardsBy(4);var s=r.readInt(1,"be");if(r.moveForwardsBy(s),64&o){var c=r.readInt(4,"be");r.moveForwardsBy(c)}for(r.moveForwardsBy(4);r.hasMore();){var u=r.readInt(4,"be");if(0===u)break;var f=r.readInt(4,"be"),h=u===f?i:i+n;r.moveForwardsBy(f+4*h)}return r.carve()}},{name:"Linux deb package",extension:"deb",mime:"application/vnd.debian.binary-package",description:"",signature:{0:33,1:60,2:97,3:114,4:99,5:104,6:62},extractor:function(e,t){var r=new ce(e.slice(t));for(r.moveForwardsBy(8);r.hasMore();){r.moveForwardsBy(48);var n,i="",a=ue(r.getBytes(10));try{for(a.s();!(n=a.n()).done;){var o=n.value;i+=String.fromCharCode(o)}}catch(e){a.e(e)}finally{a.f()}i=parseInt(i.trim(),10),r.moveForwardsBy(2),r.moveForwardsBy(i)}return r.carve()}},{name:"Apple Disk Image",extension:"dmg",mime:"application/x-apple-diskimage",description:"",signature:{0:120,1:1,2:115,3:13,4:98,5:98,6:96},extractor:null}],Miscellaneous:[{name:"UTF-8 text",extension:"txt",mime:"text/plain",description:"UTF-8 encoded Unicode byte order mark, commonly but not exclusively seen in text files.",signature:{0:239,1:187,2:191},extractor:null},{name:"UTF-32 LE text",extension:"utf32le",mime:"charset/utf32le",description:"Little-endian UTF-32 encoded Unicode byte order mark.",signature:{0:255,1:254,2:0,3:0},extractor:null},{name:"UTF-16 LE text",extension:"utf16le",mime:"charset/utf16le",description:"Little-endian UTF-16 encoded Unicode byte order mark.",signature:{0:255,1:254},extractor:null},{name:"Web Open Font Format",extension:"woff",mime:"application/font-woff",description:"",signature:{0:119,1:79,2:70,3:70,4:0,5:1,6:0,7:0},extractor:null},{name:"Web Open Font Format 2",extension:"woff2",mime:"application/font-woff",description:"",signature:{0:119,1:79,2:70,3:50,4:0,5:1,6:0,7:0},extractor:null},{name:"Embedded OpenType font",extension:"eot",mime:"application/octet-stream",description:"",signature:[{8:2,9:0,10:1,34:76,35:80},{8:1,9:0,10:0,34:76,35:80},{8:2,9:0,10:2,34:76,35:80}],extractor:null},{name:"TrueType Font",extension:"ttf",mime:"application/font-sfnt",description:"",signature:{0:0,1:1,2:0,3:0,4:0},extractor:null},{name:"OpenType Font",extension:"otf",mime:"application/font-sfnt",description:"",signature:{0:79,1:84,2:84,3:79,4:0},extractor:null},{name:"SQLite",extension:"sqlite",mime:"application/x-sqlite3",description:"",signature:{0:83,1:81,2:76,3:105},extractor:function(e,t){var r=new ce(e.slice(t));r.moveTo(16);var n=r.readInt(2);r.moveTo(28);var i=r.readInt(4);return r.moveTo(n*i),r.carve()}},{name:"BitTorrent link",extension:"torrent",mime:"application/x-bittorrent",description:"",signature:[{0:100,1:56,2:58,3:97,4:110,5:110,6:111,7:117,8:110,9:99,10:101,11:35,12:35,13:58},{0:100,1:52,2:58,3:105,4:110,5:102,6:111,7:100,8:[52,53,54],9:58}],extractor:null},{name:"Cryptocurrency wallet",extension:"wallet",mime:"application/octet-stream",description:"",signature:{0:0,1:0,2:0,3:0,4:1,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:98,13:49,14:5,15:0},extractor:null},{name:"Registry fragment",extension:"hbin",mime:"application/octet-stream",description:"",signature:{0:104,1:98,2:105,3:110,4:0},extractor:null},{name:"Registry script",extension:"rgs",mime:"application/octet-stream",description:"",signature:{0:72,1:75,2:67,3:82,4:13,5:10,6:92,7:123},extractor:null},{name:"WinNT Registry Hive",extension:"registry",mime:"application/octet-stream",description:"",signature:{0:114,1:101,2:103,3:102},extractor:null},{name:"Windows Event Log",extension:"evt",mime:"application/octet-stream",description:"",signature:{0:48,1:0,2:0,3:0,4:76,5:102,6:76,7:101},extractor:function(e,t){var r=new ce(e.slice(t));r.moveTo(20);var n=r.readInt(4,"le");r.moveTo(n);var i=r.readInt(4,"le");return r.moveForwardsBy(i-4),r.carve()}},{name:"Windows Event Log",extension:"evtx",mime:"application/octet-stream",description:"",signature:{0:69,1:108,2:102,3:70,4:105,5:108,6:101},extractor:function(e,t){var r=new ce(e.slice(t));r.moveTo(40);var n=r.readInt(4,"le")-44;for(r.moveForwardsBy(n);r.hasMore()&&r.getBytes(7).join("")===[69,108,102,67,104,110,107].join("");)r.moveForwardsBy(65529);return r.consumeWhile(0),r.carve()}},{name:"Windows Pagedump",extension:"dmp",mime:"application/octet-stream",description:"",signature:{0:80,1:65,2:71,3:69,4:68,5:85,6:[77,54],7:[80,52]},extractor:function(e,t){var r=new ce(e.slice(t));return r.moveTo(112),r.moveTo(4096*(r.readInt(4,"le")+1)),r.carve()}},{name:"Windows Prefetch",extension:"pf",mime:"application/x-pf",description:"",signature:{0:[17,23,26],1:0,2:0,3:0,4:83,5:67,6:67,7:65},extractor:function(e,t){var r=new ce(e.slice(t));return r.moveTo(12),r.moveTo(r.readInt(4,"be")),r.carve()}},{name:"Windows Prefetch (Win 10)",extension:"pf",mime:"application/x-pf",description:"",signature:{0:77,1:65,2:77,3:4,7:0},extractor:function(e,t){var r=new ce(e.slice(t));return r.moveTo(r.readInt(4,"be")),r.carve()}},{name:"PList (XML)",extension:"plist",mime:"application/xml",description:"",signature:{39:60,40:33,41:68,42:79,43:67,44:84,45:89,46:80,47:69,48:32,49:112,50:108,51:105,52:115,53:116},extractor:function(e,t){var r=new ce(e.slice(t)),n=0;for(r.continueUntil([60,112,108,105,115,116]),r.moveForwardsBy(6),n++;n>0&&r.hasMore();)60===r.readInt(1)&&(r.getBytes(5).join("")===[112,108,105,115,116].join("")?n++:r.moveBackwardsBy(5),r.getBytes(7).join("")===[47,112,108,105,115,116,62].join("")?n--:r.moveBackwardsBy(7));return r.consumeIf(10),r.carve()}},{name:"PList (binary)",extension:"bplist,plist,ipmeta,abcdp,mdbackup,mdinfo,strings,nib,ichat,qtz,webbookmark,webhistory",mime:"application/x-plist",description:"",signature:{0:98,1:112,2:108,3:105,4:115,5:116,6:48,7:48},extractor:null},{name:"MacOS X Keychain",extension:"keychain",mime:"application/octet-stream",description:"",signature:{0:107,1:121,2:99,3:104,4:0,5:1},extractor:function(e,t){var r=new ce(e.slice(t));return r.moveTo(20),r.moveForwardsBy(r.readInt(4)),r.carve()}},{name:"TCP Packet",extension:"tcp",mime:"application/tcp",description:"",signature:{12:8,13:0,14:69,15:0,21:0,22:function(e){return e>=1&&e<=128},23:6},extractor:null},{name:"UDP Packet",extension:"udp",mime:"application/udp",description:"",signature:{12:8,13:0,14:69,15:0,16:[0,1,2,3,4,5],22:function(e){return e>=1&&e<=128},23:17},extractor:null},{name:"Compiled HTML",extension:"chm,chw,chi",mime:"application/vnd.ms-htmlhelp",description:"",signature:{0:73,1:84,2:83,3:70,4:3,5:0,6:0,7:0},extractor:null},{name:"Windows Password",extension:"pwl",mime:"application/octet-stream",description:"",signature:{0:227,1:130,2:133,3:150},extractor:null},{name:"Bitlocker recovery key",extension:"bitlocker",mime:"application/octet-stream",description:"",signature:{0:255,1:254,2:66,3:0,4:105,5:0,6:116,7:0,8:76,9:0,10:111,11:0,12:99,13:0,14:107,15:0,16:101,17:0,18:114,19:0,20:32,21:0},extractor:null},{name:"Certificate",extension:"cer,cat,p7b,p7c,p7m,p7s,swz,rsa,crl,crt,der",mime:"application/pkix-cert",description:"",signature:{0:48,1:130,4:[6,10,48]},extractor:null},{name:"Certificate",extension:"cat,swz,p7m",mime:"application/vnd.ms-pki.seccat",description:"",signature:{0:48,1:131,2:function(e){return 0!==e},5:6,6:9},extractor:null},{name:"PGP pubring",extension:"pkr,gpg",mime:"application/pgp-keys",description:"",signature:{0:153,1:1,2:[13,162],3:4},extractor:null},{name:"PGP secring",extension:"skr",mime:"application/pgp-keys",description:"",signature:[{0:149,1:1,2:207,3:4},{0:149,1:3,2:198,3:4},{0:149,1:5,2:134,3:4}],extractor:null},{name:"PGP Safe",extension:"pgd",mime:"application/pgp-keys",description:"",signature:{0:80,1:71,2:80,3:100,4:77,5:65,6:73,7:78,8:96,9:1,10:0},extractor:null},{name:"Task Scheduler",extension:"job",mime:"application/octet-stream",description:"",signature:{0:[0,1,2,3],1:[5,6],2:1,3:0,20:70,21:0},extractor:null},{name:"Windows Shortcut",extension:"lnk",mime:"application/x-ms-shortcut",description:"",signature:{0:76,1:0,2:0,3:0,4:1,5:20,6:2,7:0,8:0,9:0,10:0,11:0,12:192,13:0,14:0,15:0,16:0,17:0,18:0,19:70},extractor:function(e,t){var r=new ce(e.slice(t));return r.moveTo(52),r.moveTo(r.readInt(4,"le")),r.carve()}},{name:"Bash",extension:"bash",mime:"application/bash",description:"",signature:{0:35,1:33,2:47,3:98,4:105,5:110,6:47,7:98,8:97,9:115,10:104},extractor:null},{name:"Shell",extension:"sh",mime:"application/sh",description:"",signature:{0:35,1:33,2:47,3:98,4:105,5:110,6:47,7:115,8:104},extractor:null},{name:"Python",extension:"py,pyc,pyd,pyo,pyw,pyz",mime:"application/python",description:"",signature:{0:35,1:33,2:47,3:117,4:115,5:114,6:47,7:98,8:105,9:110,10:47,11:112,12:121,13:116,14:104,15:111,16:110,17:[50,51,10,13]},extractor:null},{name:"Ruby",extension:"rb",mime:"application/ruby",description:"",signature:{0:35,1:33,2:47,3:117,4:115,5:114,6:47,7:98,8:105,9:110,10:47,11:114,12:117,13:98,14:121},extractor:null},{name:"perl",extension:"pl,pm,t,pod",mime:"application/perl",description:"",signature:{0:35,1:33,2:47,3:117,4:115,5:114,6:47,7:98,8:105,9:110,10:47,11:112,12:101,13:114,14:108},extractor:null},{name:"php",extension:"php,phtml,php3,php4,php5,php7,phps,php-s,pht,phar",mime:"application/php",description:"",signature:{0:60,1:63,2:112,3:104,4:112},extractor:null},{name:"Smile",extension:"sml",mime:"\tapplication/x-jackson-smile",description:"",signature:{0:58,1:41,2:10},extractor:null},{name:"Lua Bytecode",extension:"luac",mime:"application/x-lua",description:"",signature:{0:27,1:76,2:117,3:97},extractor:null},{name:"WebAssembly binary",extension:"wasm",mime:"application/octet-stream",description:"",signature:{0:0,1:97,2:115,3:109},extractor:null}]};function le(e,t){var r=new ce(e.slice(t));r.continueUntil([80,75,5,6]),r.moveForwardsBy(20);var n=r.readInt(2,"le");return r.moveForwardsBy(n),r.carve()}function de(e,t){var r="207250237254",n=new ce(e.slice(t)),i=n.getBytes(4).join("");return n.moveTo(function(e,t,r){var n=28;t&&(n+=4),e.moveTo(16);var i=e.readInt(4,r);return function(e,t,r,n){for(var i=0,a=0;a<n;a++){e.moveTo(t);var o=e.readInt(4,r);25===o?(e.moveTo(t+48),i+=e.readInt(8,r),e.moveTo(t+4),t+=e.readInt(4,r)):1===o&&(e.moveTo(t+36),i+=e.readInt(4,r),e.moveTo(t+4),t+=e.readInt(4,r))}return i}(e,n,r,i)}(n,function(e){return e===r||"254237250207"===e}(i),function(e){return"206250237254"===e||e===r}(i)?"le":"be")),n.carve()}for(var pe=new Array(288),ye=0;ye<pe.length;ye++)pe[ye]=ye<=143?8:ye<=255?9:ye<=279?7:8;var ge=Se(pe),ve=Se(new Array(30).fill(5)),me=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function be(e){for(var t=0;!t;){t=e.readBits(1,"le");var r=e.readBits(2,"le");if(0===r){e.moveForwardsBy(1);var n=e.readInt(2,"le");e.moveForwardsBy(2+n)}else if(1===r)Ee(e,ge,ve);else{if(2!==r)throw new Error(`Invalid block type while parsing DEFLATE stream at pos ${e.position}`);for(var i=e.readBits(5,"le")+257,a=e.readBits(5,"le")+1,o=e.readBits(4,"le")+4,s=new Uint8Array(me.length),c=0;c<o;c++)s[me[c]]=e.readBits(3,"le");for(var u=Se(s),f=new Uint8Array(i+a),h=void 0,l=void 0,d=void 0,p=0;p<i+a;)switch(h=Ae(e,u)){case 16:for(l=3+e.readBits(2,"le");l--;)f[p++]=d;break;case 17:for(l=3+e.readBits(3,"le");l--;)f[p++]=0;d=0;break;case 18:for(l=11+e.readBits(7,"le");l--;)f[p++]=0;d=0;break;default:f[p++]=h,d=h}Ee(e,Se(f.subarray(0,i)),Se(f.subarray(i)))}}e.bitPos>0&&e.moveForwardsBy(1)}var we=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0],Ce=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function Ee(e,t,r){for(var n,i=0;(n=Ae(e,t))&&256!==n;){if(++i>1e4)throw new Error("Caught in probable infinite loop while parsing Huffman Block");n<256||(e.readBits(we[n-257],"le"),n=Ae(e,r),e.readBits(Ce[n],"le"))}}function Se(e){for(var t=Math.max.apply(Math,e),r=Math.min.apply(Math,e),n=1<<t,i=new Uint32Array(n),a=1,o=0,s=2;a<=t;){for(var c=0;c<e.length;c++)if(e[c]===a){var u=void 0,f=void 0,h=void 0;for(u=0,f=o,h=0;h<a;h++)u=u<<1|1&f,f>>=1;for(var l=a<<16|c,d=u;d<n;d+=s)i[d]=l;o++}a++,o<<=1,s<<=1}return[i,t,r]}function Ae(e,t){var r=se(t,2),n=r[0],i=r[1],a=n[e.readBits(i,"le")&(1<<i)-1],o=a>>>16;if(o>i)throw new Error(`Invalid Huffman Code length while parsing DEFLATE block at pos ${e.position}: ${o}`);return e.moveBackwardsByBits(i-o),65535&a}function Be(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(e.length){for(var n=0;n<e.length;n++)if(Te(e[n],t,r))return!0;return!1}return Te(e,t,r)}function Te(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;for(var n in e){var i=parseInt(n,10)+r;switch(typeof e[n]){case"number":if(t[i]!==e[n])return!1;break;case"object":if(e[n].indexOf(t[i])<0)return!1;break;case"function":if(!e[n](t[i]))return!1;break;default:throw new Error(`Unrecognised signature type at offset ${n}`)}}return!0}const Ie=function(){function t(){e(this,t)}return i(t,null,[{key:"checkForValue",value:function(e){if(void 0===e)throw new Error("only use translation methods with .bind")}},{key:"toArrayBuffer",value:function(){throw new Error("toArrayBuffer has not been implemented")}},{key:"fromArrayBuffer",value:function(){throw new Error("fromArrayBuffer has not been implemented")}}]),t}();function ke(e,t,r){return t=s(t),o(e,_e()?Reflect.construct(t,r||[],s(e).constructor):t.apply(e,r))}function _e(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(_e=function(){return!!e})()}const Re=function(t){function r(){return e(this,r),ke(this,r,arguments)}return u(r,t),i(r,null,[{key:"toArrayBuffer",value:function(){r.checkForValue(this.value),this.value=new Uint8Array(this.value).buffer}},{key:"fromArrayBuffer",value:function(){r.checkForValue(this.value),this.value=Array.prototype.slice.call(new Uint8Array(this.value))}}]),r}(Ie);function xe(e,t,r){return t=s(t),o(e,Fe()?Reflect.construct(t,r||[],s(e).constructor):t.apply(e,r))}function Fe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Fe=function(){return!!e})()}const De=function(t){function r(){return e(this,r),xe(this,r,arguments)}return u(r,t),i(r,null,[{key:"toArrayBuffer",value:function(){r.checkForValue(this.value),this.value=oe.isBigNumber(this.value)?L.strToArrayBuffer(this.value.toFixed()):new ArrayBuffer}},{key:"fromArrayBuffer",value:function(){r.checkForValue(this.value);try{this.value=new oe(L.arrayBufferToStr(this.value))}catch(e){this.value=new oe(NaN)}}}]),r}(Ie);function Pe(e,t,r){return t=s(t),o(e,Ue()?Reflect.construct(t,r||[],s(e).constructor):t.apply(e,r))}function Ue(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Ue=function(){return!!e})()}const Ne=function(t){function r(){return e(this,r),Pe(this,r,arguments)}return u(r,t),i(r,null,[{key:"toArrayBuffer",value:function(){var e=this;if(r.checkForValue(this.value),!P())return new Promise((function(t,r){L.readFile(e.value).then((function(t){return e.value=t.buffer})).then(t).catch(r)}));this.value=L.readFileSync(this.value)}},{key:"fromArrayBuffer",value:function(){r.checkForValue(this.value),this.value=new File(this.value,"unknown")}}]),r}(Ie);function Le(e,t,r){return t=s(t),o(e,Me()?Reflect.construct(t,r||[],s(e).constructor):t.apply(e,r))}function Me(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Me=function(){return!!e})()}const Oe=function(t){function r(){return e(this,r),Le(this,r,arguments)}return u(r,t),i(r,null,[{key:"toArrayBuffer",value:function(){r.checkForValue(this.value),this.value=this.value?L.strToArrayBuffer(this.value):new ArrayBuffer}},{key:"fromArrayBuffer",value:function(){r.checkForValue(this.value),this.value=this.value?L.arrayBufferToStr(this.value):""}}]),r}(Ie);function Ke(e,t,r){return t=s(t),o(e,Ge()?Reflect.construct(t,r||[],s(e).constructor):t.apply(e,r))}function Ge(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Ge=function(){return!!e})()}const je=function(t){function r(){return e(this,r),Ke(this,r,arguments)}return u(r,t),i(r,null,[{key:"toArrayBuffer",value:function(){r.checkForValue(this.value),this.value=this.value?L.strToArrayBuffer(L.unescapeHtml(L.stripHtmlTags(this.value,!0))):new ArrayBuffer}}]),r}(Oe);function Ve(e,t,r){return t=s(t),o(e,He()?Reflect.construct(t,r||[],s(e).constructor):t.apply(e,r))}function He(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(He=function(){return!!e})()}const qe=function(t){function r(){return e(this,r),Ve(this,r,arguments)}return u(r,t),i(r,null,[{key:"toArrayBuffer",value:function(){r.checkForValue(this.value),this.value=void 0!==this.value?L.strToArrayBuffer(JSON.stringify(this.value,null,4)):new ArrayBuffer}},{key:"fromArrayBuffer",value:function(){r.checkForValue(this.value),this.value=JSON.parse(L.arrayBufferToStr(this.value))}}]),r}(Ie);function ze(e,t,r){return t=s(t),o(e,We()?Reflect.construct(t,r||[],s(e).constructor):t.apply(e,r))}function We(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(We=function(){return!!e})()}const Xe=function(t){function r(){return e(this,r),ze(this,r,arguments)}var n,a;return u(r,t),i(r,null,[{key:"toArrayBuffer",value:(a=h(d().mark((function e(){return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r.checkForValue(this.value),!P()){e.next=5;break}this.value=this.value.map((function(e){return Uint8Array.from(e.data)})),e.next=8;break;case 5:return e.next=7,r.concatenateTypedArraysWithTypedElements.apply(r,g(this.value));case 7:this.value=e.sent;case 8:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"fromArrayBuffer",value:function(){r.checkForValue(this.value),this.value=[new File(this.value,"unknown")]}},{key:"concatenateTypedArraysWithTypedElements",value:(n=h(d().mark((function e(){var t,r,n,i,a,o,s,c,u,f,h,l,p,y=arguments;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(t=0,r=y.length,n=new Array(r),i=0;i<r;i++)n[i]=y[i];for(a=0,o=n;a<o.length;a++)s=o[a],t+=s.size;c=new Uint8Array(t),u=0,f=0,h=n;case 6:if(!(f<h.length)){e.next=16;break}return l=h[f],e.next=10,L.readFile(l);case 10:p=e.sent,c.set(p,u),u+=p.length;case 13:f++,e.next=6;break;case 16:return e.abrupt("return",c);case 17:case"end":return e.stop()}}),e)}))),function(){return n.apply(this,arguments)})},{key:"concatenateTypedArrays",value:function(){for(var e=0,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];for(var i=0,a=r;i<a.length;i++)e+=a[i].length;for(var o=new Uint8Array(e),s=0,c=0,u=r;c<u.length;c++){var f=u[c];o.set(f,s),s+=f.length}return o}}]),r}(Ie);function Ye(e,t,r){return t=s(t),o(e,Qe()?Reflect.construct(t,r||[],s(e).constructor):t.apply(e,r))}function Qe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Qe=function(){return!!e})()}const Ze=function(t){function r(){return e(this,r),Ye(this,r,arguments)}return u(r,t),i(r,null,[{key:"toArrayBuffer",value:function(){r.checkForValue(this.value),this.value="number"==typeof this.value?L.strToArrayBuffer(this.value.toString()):new ArrayBuffer}},{key:"fromArrayBuffer",value:function(){r.checkForValue(this.value),this.value=this.value?parseFloat(L.arrayBufferToStr(this.value)):0}}]),r}(Ie);var Je=function(){function t(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(e(this,t),this.value=new ArrayBuffer(0),this.type=t.ARRAY_BUFFER,r&&Object.prototype.hasOwnProperty.call(r,"value")&&Object.prototype.hasOwnProperty.call(r,"type"))this.set(r.value,r.type);else if(r&&null!==n)this.set(r,n);else if(r){var i=t.typeEnum(r.constructor.name);this.set(r,i)}}var r;return i(t,[{key:"get",value:function(e){var r=this;return"string"==typeof e&&(e=t.typeEnum(e)),this.type!==e?P()?(this._translate(e),this.value):new Promise((function(t,n){r._translate(e).then((function(){t(r.value)})).catch(n)})):this.value}},{key:"set",value:function(e,r){if("string"==typeof r&&(r=t.typeEnum(r)),m().debug("Dish type: "+t.enumLookup(r)),this.value=e,this.type=r,!this.valid()){var n=L.truncate(JSON.stringify(this.value),25);throw new K(`Data is not a valid ${t.enumLookup(r)}: ${n}`)}}},{key:"presentAs",value:function(e){return this.clone().get(e)}},{key:"detectDishType",value:function(){var e=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Object.keys(he);if(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),!(e&&e.length>1))return[];var r=[],n={};for(var i in he)t.includes(i)&&(n[i]=he[i]);for(var a in n)n[a].forEach((function(t){Be(t.signature,e)&&r.push(t)}));return r}(new Uint8Array(this.value.slice(0,2048)));return e.length&&e[0].mime&&"text/plain"===e[0].mime?e[0].mime:null}},{key:"getTitle",value:(r=h(d().mark((function e(r){var n,i;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n="",e.t0=this.type,e.next=e.t0===t.FILE?4:e.t0===t.LIST_FILE?6:e.t0===t.JSON?8:e.t0===t.NUMBER||e.t0===t.BIG_NUMBER?10:e.t0===t.ARRAY_BUFFER||e.t0===t.BYTE_ARRAY?12:15;break;case 4:return n=this.value.name,e.abrupt("break",26);case 6:return n=`${this.value.length} file(s)`,e.abrupt("break",26);case 8:return n="application/json",e.abrupt("break",26);case 10:return n=this.value.toString(),e.abrupt("break",26);case 12:if(null===(n=this.detectDishType())){e.next=15;break}return e.abrupt("break",26);case 15:return e.prev=15,(i=this.clone()).value=i.value.slice(0,256),e.next=20,i.get(t.STRING);case 20:n=e.sent,e.next=26;break;case 23:e.prev=23,e.t1=e.catch(15),m().error(`${t.enumLookup(this.type)} cannot be sliced. ${e.t1}`);case 26:return e.abrupt("return",n.slice(0,r));case 27:case"end":return e.stop()}}),e,this,[[15,23]])}))),function(e){return r.apply(this,arguments)})},{key:"valid",value:function(){switch(this.type){case t.BYTE_ARRAY:if(!(this.value instanceof Uint8Array||this.value instanceof Array))return!1;for(var e=0;e<this.value.length;e++)if("number"!=typeof this.value[e]||this.value[e]<0||this.value[e]>255)return!1;return!0;case t.STRING:case t.HTML:return"string"==typeof this.value;case t.NUMBER:return"number"==typeof this.value;case t.ARRAY_BUFFER:return this.value instanceof ArrayBuffer;case t.BIG_NUMBER:if(oe.isBigNumber(this.value))return!0;if(Object.keys(this.value).sort().equals(["c","e","s"])){var r=new oe;return r.c=this.value.c,r.e=this.value.e,r.s=this.value.s,this.value=r,!0}return!1;case t.JSON:return!0;case t.FILE:return this.value instanceof File;case t.LIST_FILE:return this.value instanceof Array&&this.value.reduce((function(e,t){return e&&t instanceof File}),!0);default:return!1}}},{key:"size",get:function(){switch(this.type){case t.BYTE_ARRAY:case t.STRING:case t.HTML:return this.value.length;case t.NUMBER:case t.BIG_NUMBER:return this.value.toString().length;case t.ARRAY_BUFFER:return this.value.byteLength;case t.JSON:return JSON.stringify(this.value).length;case t.FILE:return this.value.size;case t.LIST_FILE:return this.value.reduce((function(e,t){return e+t.size}),0);default:return-1}}},{key:"clone",value:function(){var e=new t;switch(this.type){case t.STRING:case t.HTML:case t.NUMBER:case t.BIG_NUMBER:e.set(this.value,this.type);break;case t.BYTE_ARRAY:case t.JSON:e.set(JSON.parse(JSON.stringify(this.value)),this.type);break;case t.ARRAY_BUFFER:e.set(this.value.slice(0),this.type);break;case t.FILE:e.set(new File([this.value],this.value.name,{type:this.value.type,lastModified:this.value.lastModified}),this.type);break;case t.LIST_FILE:e.set(this.value.map((function(e){return new File([e],e.name,{type:e.type,lastModified:e.lastModified})})),this.type);break;default:throw new K("Cannot clone Dish, unknown type")}return e}},{key:"_translate",value:function(e){var r=this;if(m().debug(`Translating Dish from ${t.enumLookup(this.type)} to ${t.enumLookup(e)}`),!P())return new Promise((function(n,i){r._toArrayBuffer().then((function(){return r.type=t.ARRAY_BUFFER})).then((function(){r._fromArrayBuffer(e),n()})).catch(i)}));this._toArrayBuffer(),this.type=t.ARRAY_BUFFER,this._fromArrayBuffer(e)}},{key:"_toArrayBuffer",value:function(){var e=this,r={browser:{[t.STRING]:function(){return Promise.resolve(Oe.toArrayBuffer.bind(e)())},[t.NUMBER]:function(){return Promise.resolve(Ze.toArrayBuffer.bind(e)())},[t.HTML]:function(){return Promise.resolve(je.toArrayBuffer.bind(e)())},[t.ARRAY_BUFFER]:function(){return Promise.resolve()},[t.BIG_NUMBER]:function(){return Promise.resolve(De.toArrayBuffer.bind(e)())},[t.JSON]:function(){return Promise.resolve(qe.toArrayBuffer.bind(e)())},[t.FILE]:function(){return Ne.toArrayBuffer.bind(e)()},[t.LIST_FILE]:function(){return Promise.resolve(Xe.toArrayBuffer.bind(e)())},[t.BYTE_ARRAY]:function(){return Promise.resolve(Re.toArrayBuffer.bind(e)())}},node:{[t.STRING]:function(){return Oe.toArrayBuffer.bind(e)()},[t.NUMBER]:function(){return Ze.toArrayBuffer.bind(e)()},[t.HTML]:function(){return je.toArrayBuffer.bind(e)()},[t.ARRAY_BUFFER]:function(){},[t.BIG_NUMBER]:function(){return De.toArrayBuffer.bind(e)()},[t.JSON]:function(){return qe.toArrayBuffer.bind(e)()},[t.FILE]:function(){return Ne.toArrayBuffer.bind(e)()},[t.LIST_FILE]:function(){return Xe.toArrayBuffer.bind(e)()},[t.BYTE_ARRAY]:function(){return Re.toArrayBuffer.bind(e)()}}};try{return r[P()?"node":"browser"][this.type]()}catch(e){throw new K(`Error translating from ${t.enumLookup(this.type)} to ArrayBuffer: ${e}`)}}},{key:"_fromArrayBuffer",value:function(e){var r=this,n={[t.STRING]:function(){return Oe.fromArrayBuffer.bind(r)()},[t.NUMBER]:function(){return Ze.fromArrayBuffer.bind(r)()},[t.HTML]:function(){return je.fromArrayBuffer.bind(r)()},[t.ARRAY_BUFFER]:function(){},[t.BIG_NUMBER]:function(){return De.fromArrayBuffer.bind(r)()},[t.JSON]:function(){return qe.fromArrayBuffer.bind(r)()},[t.FILE]:function(){return Ne.fromArrayBuffer.bind(r)()},[t.LIST_FILE]:function(){return Xe.fromArrayBuffer.bind(r)()},[t.BYTE_ARRAY]:function(){return Re.fromArrayBuffer.bind(r)()}};try{n[e](),this.type=e}catch(r){throw new K(`Error translating from ArrayBuffer to ${t.enumLookup(e)}: ${r}`)}}}],[{key:"typeEnum",value:function(e){switch(e.toLowerCase()){case"bytearray":case"byte array":return t.BYTE_ARRAY;case"string":return t.STRING;case"number":return t.NUMBER;case"html":return t.HTML;case"arraybuffer":case"array buffer":return t.ARRAY_BUFFER;case"bignumber":case"big number":return t.BIG_NUMBER;case"json":case"object":return t.JSON;case"file":return t.FILE;case"list<file>":return t.LIST_FILE;default:throw new K("Invalid data type string. No matching enum.")}}},{key:"enumLookup",value:function(e){switch(e){case t.BYTE_ARRAY:return"byteArray";case t.STRING:return"string";case t.NUMBER:return"number";case t.HTML:return"html";case t.ARRAY_BUFFER:return"ArrayBuffer";case t.BIG_NUMBER:return"BigNumber";case t.JSON:return"JSON";case t.FILE:return"File";case t.LIST_FILE:return"List<File>";default:throw new K("Invalid data type enum. No matching type.")}}}]),t}();Je.BYTE_ARRAY=0,Je.STRING=1,Je.NUMBER=2,Je.HTML=3,Je.ARRAY_BUFFER=4,Je.BIG_NUMBER=5,Je.JSON=6,Je.FILE=7,Je.LIST_FILE=8;const $e=Je,et=function(){function t(r){e(this,t),this.name="",this.type="",this._value=null,this.disabled=!1,this.hint="",this.rows=0,this.toggleValues=[],this.target=null,this.defaultIndex=0,this.maxLength=null,this.min=null,this.max=null,this.step=1,r&&this._parseConfig(r)}return i(t,[{key:"_parseConfig",value:function(e){this.name=e.name,this.type=e.type,this.defaultValue=e.value,this.disabled=!!e.disabled,this.hint=e.hint||!1,this.rows=e.rows||!1,this.toggleValues=e.toggleValues,this.target=void 0!==e.target?e.target:null,this.defaultIndex=void 0!==e.defaultIndex?e.defaultIndex:0,this.maxLength=e.maxLength||null,this.min=e.min,this.max=e.max,this.step=e.step}},{key:"config",get:function(){return this._value}},{key:"value",get:function(){return this._value},set:function(e){this._value=t.prepare(e,this.type)}}],[{key:"prepare",value:function(e,t){var r;switch(t){case"binaryString":case"binaryShortString":case"editableOption":case"editableOptionShort":return L.parseEscapedChars(e);case"byteArray":return"string"==typeof e?k(e=e.replace(/\s+/g,"")):e;case"number":if(null===e)return e;if(r=parseFloat(e),isNaN(r))throw"Invalid ingredient value. Not a number: "+L.truncate(e.toString(),10);return r;default:return e}}}]),t}();var tt=function(){function t(){e(this,t),this._inputType=-1,this._outputType=-1,this._presentType=-1,this._breakpoint=!1,this._disabled=!1,this._flowControl=!1,this._manualBake=!1,this._ingList=[],this.name="",this.module="",this.description="",this.infoURL=null}return i(t,[{key:"run",value:function(e,t){return e}},{key:"highlight",value:function(e,t){return!1}},{key:"highlightReverse",value:function(e,t){return!1}},{key:"present",value:function(e,t){return e}},{key:"inputType",get:function(){return $e.enumLookup(this._inputType)},set:function(e){this._inputType=$e.typeEnum(e)}},{key:"outputType",get:function(){return $e.enumLookup(this._outputType)},set:function(e){this._outputType=$e.typeEnum(e),this._presentType<0&&(this._presentType=this._outputType)}},{key:"presentType",get:function(){return $e.enumLookup(this._presentType)},set:function(e){this._presentType=$e.typeEnum(e)}},{key:"args",get:function(){return this._ingList.map((function(e){var t={name:e.name,type:e.type,value:e.defaultValue};return e.toggleValues&&(t.toggleValues=e.toggleValues),e.hint&&(t.hint=e.hint),e.rows&&(t.rows=e.rows),e.disabled&&(t.disabled=e.disabled),e.target&&(t.target=e.target),e.defaultIndex&&(t.defaultIndex=e.defaultIndex),e.maxLength&&(t.maxLength=e.maxLength),"number"==typeof e.min&&(t.min=e.min),"number"==typeof e.max&&(t.max=e.max),e.step&&(t.step=e.step),t}))},set:function(e){var t=this;e.forEach((function(e){var r=new et(e);t.addIngredient(r)}))}},{key:"config",get:function(){return{op:this.name,args:this._ingList.map((function(e){return e.config}))}}},{key:"addIngredient",value:function(e){this._ingList.push(e)}},{key:"ingValues",get:function(){return this._ingList.map((function(e){return e.value}))},set:function(e){var t=this;e.forEach((function(e,r){t._ingList[r].value=e}))}},{key:"breakpoint",get:function(){return this._breakpoint},set:function(e){this._breakpoint=!!e}},{key:"disabled",get:function(){return this._disabled},set:function(e){this._disabled=!!e}},{key:"flowControl",get:function(){return this._flowControl},set:function(e){this._flowControl=!!e}},{key:"manualBake",get:function(){return this._manualBake},set:function(e){this._manualBake=!!e}}]),t}();const rt=tt;var nt=["Space","Comma","Semi-colon","Colon","Line feed","CRLF"];function it(e,t,r){return t=s(t),o(e,at()?Reflect.construct(t,r||[],s(e).constructor):t.apply(e,r))}function at(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(at=function(){return!!e})()}var ot=function(t){function r(){var t;return e(this,r),(t=it(this,r)).name="A1Z26 Cipher Decode",t.module="Ciphers",t.description="Converts alphabet order numbers into their corresponding alphabet character.<br><br>e.g. <code>1</code> becomes <code>a</code> and <code>2</code> becomes <code>b</code>.",t.infoURL="",t.inputType="string",t.outputType="string",t.args=[{name:"Delimiter",type:"option",value:nt}],t.checks=[{pattern:"^\\s*([12]?[0-9] )+[12]?[0-9]\\s*$",flags:"",args:["Space"]},{pattern:"^\\s*([12]?[0-9],)+[12]?[0-9]\\s*$",flags:"",args:["Comma"]},{pattern:"^\\s*([12]?[0-9];)+[12]?[0-9]\\s*$",flags:"",args:["Semi-colon"]},{pattern:"^\\s*([12]?[0-9]:)+[12]?[0-9]\\s*$",flags:"",args:["Colon"]},{pattern:"^\\s*([12]?[0-9]\\n)+[12]?[0-9]\\s*$",flags:"",args:["Line feed"]},{pattern:"^\\s*([12]?[0-9]\\r\\n)+[12]?[0-9]\\s*$",flags:"",args:["CRLF"]}],t}return u(r,t),i(r,[{key:"run",value:function(e,t){var r=L.charRep(t[0]||"Space");if(0===e.length)return[];for(var n=e.split(r),i="",a=0;a<n.length;a++){if(n[a]<1||n[a]>26)throw new S("Error: all numbers must be between 1 and 26.");i+=L.chr(parseInt(n[a],10)+96)}return i}}]),r}(rt);const st=ot;function ct(e,t,r){return t=s(t),o(e,ut()?Reflect.construct(t,r||[],s(e).constructor):t.apply(e,r))}function ut(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(ut=function(){return!!e})()}var ft=function(t){function r(){var t;return e(this,r),(t=ct(this,r)).name="A1Z26 Cipher Encode",t.module="Ciphers",t.description="Converts alphabet characters into their corresponding alphabet order number.<br><br>e.g. <code>a</code> becomes <code>1</code> and <code>b</code> becomes <code>2</code>.<br><br>Non-alphabet characters are dropped.",t.infoURL="",t.inputType="string",t.outputType="string",t.args=[{name:"Delimiter",type:"option",value:nt}],t}return u(r,t),i(r,[{key:"run",value:function(e,t){for(var r=L.charRep(t[0]||"Space"),n="",i=e.toLowerCase(),a=L.strToCharcode(i),o=0;o<a.length;o++){var s=a[o]-96;s>0&&s<=26&&(n+=s.toString(10)+r)}return n.slice(0,-r.length)}}]),r}(rt);const ht=ft;var lt=__webpack_require__(68212),dt=__webpack_require__.n(lt);function pt(e,t,r){return t=s(t),o(e,yt()?Reflect.construct(t,r||[],s(e).constructor):t.apply(e,r))}function yt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(yt=function(){return!!e})()}const gt=function(t){function r(){var t;return e(this,r),(t=pt(this,r)).name="AES Decrypt",t.module="Ciphers",t.description="Advanced Encryption Standard (AES) is a U.S. Federal Information Processing Standard (FIPS). It was selected after a 5-year process where 15 competing designs were evaluated.<br><br><b>Key:</b> The following algorithms will be used based on the size of the key:<ul><li>16 bytes = AES-128</li><li>24 bytes = AES-192</li><li>32 bytes = AES-256</li></ul><br><br><b>IV:</b> The Initialization Vector should be 16 bytes long. If not entered, it will default to 16 null bytes.<br><br><b>Padding:</b> In CBC and ECB mode, PKCS#7 padding will be used as a default.<br><br><b>GCM Tag:</b> This field is ignored unless 'GCM' mode is used.",t.infoURL="https://wikipedia.org/wiki/Advanced_Encryption_Standard",t.inputType="string",t.outputType="string",t.args=[{name:"Key",type:"toggleString",value:"",toggleValues:["Hex","UTF8","Latin1","Base64"]},{name:"IV",type:"toggleString",value:"",toggleValues:["Hex","UTF8","Latin1","Base64"]},{name:"Mode",type:"argSelector",value:[{name:"CBC",off:[5,6]},{name:"CFB",off:[5,6]},{name:"OFB",off:[5,6]},{name:"CTR",off:[5,6]},{name:"GCM",on:[5,6]},{name:"ECB",off:[5,6]},{name:"CBC/NoPadding",off:[5,6]},{name:"ECB/NoPadding",off:[5,6]}]},{name:"Input",type:"option",value:["Hex","Raw"]},{name:"Output",type:"option",value:["Raw","Hex"]},{name:"GCM Tag",type:"toggleString",value:"",toggleValues:["Hex","UTF8","Latin1","Base64"]},{name:"Additional Authenticated Data",type:"toggleString",value:"",toggleValues:["Hex","UTF8","Latin1","Base64"]}],t}return u(r,t),i(r,[{key:"run",value:function(e,t){var r=L.convertToByteString(t[0].string,t[0].option),n=L.convertToByteString(t[1].string,t[1].option),i=t[2].substring(0,3),a=t[2].endsWith("NoPadding"),o=t[3],s=t[4],c=L.convertToByteString(t[5].string,t[5].option),u=L.convertToByteString(t[6].string,t[6].option);if([16,24,32].indexOf(r.length)<0)throw new S(`Invalid key length: ${r.length} bytes\n\nThe following algorithms will be used based on the size of the key:\n 16 bytes = AES-128\n 24 bytes = AES-192\n 32 bytes = AES-256`);e=L.convertToByteString(e,o);var f=dt().cipher.createDecipher("AES-"+i,r);if(a&&(f.mode.unpad=function(e,t){return!0}),f.start({iv:0===n.length?"":n,tag:"GCM"===i?c:void 0,additionalData:"GCM"===i?u:void 0}),f.update(dt().util.createBuffer(e)),f.finish())return"Hex"===s?f.output.toHex():f.output.getBytes();throw new S("Unable to decrypt input with these parameters.")}}]),r}(rt);function vt(e,t,r){return t=s(t),o(e,mt()?Reflect.construct(t,r||[],s(e).constructor):t.apply(e,r))}function mt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(mt=function(){return!!e})()}const bt=function(t){function r(){var t;return e(this,r),(t=vt(this,r)).name="AES Encrypt",t.module="Ciphers",t.description="Advanced Encryption Standard (AES) is a U.S. Federal Information Processing Standard (FIPS). It was selected after a 5-year process where 15 competing designs were evaluated.<br><br><b>Key:</b> The following algorithms will be used based on the size of the key:<ul><li>16 bytes = AES-128</li><li>24 bytes = AES-192</li><li>32 bytes = AES-256</li></ul>You can generate a password-based key using one of the KDF operations.<br><br><b>IV:</b> The Initialization Vector should be 16 bytes long. If not entered, it will default to 16 null bytes.<br><br><b>Padding:</b> In CBC and ECB mode, PKCS#7 padding will be used.",t.infoURL="https://wikipedia.org/wiki/Advanced_Encryption_Standard",t.inputType="string",t.outputType="string",t.args=[{name:"Key",type:"toggleString",value:"",toggleValues:["Hex","UTF8","Latin1","Base64"]},{name:"IV",type:"toggleString",value:"",toggleValues:["Hex","UTF8","Latin1","Base64"]},{name:"Mode",type:"argSelector",value:[{name:"CBC",off:[5]},{name:"CFB",off:[5]},{name:"OFB",off:[5]},{name:"CTR",off:[5]},{name:"GCM",on:[5]},{name:"ECB",off:[5]}]},{name:"Input",type:"option",value:["Raw","Hex"]},{name:"Output",type:"option",value:["Hex","Raw"]},{name:"Additional Authenticated Data",type:"toggleString",value:"",toggleValues:["Hex","UTF8","Latin1","Base64"]}],t}return u(r,t),i(r,[{key:"run",value:function(e,t){var r=L.convertToByteString(t[0].string,t[0].option),n=L.convertToByteString(t[1].string,t[1].option),i=t[2],a=t[3],o=t[4],s=L.convertToByteString(t[5].string,t[5].option);if([16,24,32].indexOf(r.length)<0)throw new S(`Invalid key length: ${r.length} bytes\n\nThe following algorithms will be used based on the size of the key:\n 16 bytes = AES-128\n 24 bytes = AES-192\n 32 bytes = AES-256`);e=L.convertToByteString(e,a);var c=dt().cipher.createCipher("AES-"+i,r);return c.start({iv:n,additionalData:"GCM"===i?s:void 0}),c.update(dt().util.createBuffer(e)),c.finish(),"Hex"===o?"GCM"===i?c.output.toHex()+"\n\nTag: "+c.mode.tag.toHex():c.output.toHex():"GCM"===i?c.output.getBytes()+"\n\nTag: "+c.mode.tag.getBytes():c.output.getBytes()}}]),r}(rt);function wt(e,t,r){return t=s(t),o(e,Ct()?Reflect.construct(t,r||[],s(e).constructor):t.apply(e,r))}function Ct(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Ct=function(){return!!e})()}var Et=function(t){function r(){var t;return e(this,r),(t=wt(this,r)).name="AES Key Unwrap",t.module="Ciphers",t.description="Decryptor for a key wrapping algorithm defined in RFC3394, which is used to protect keys in untrusted storage or communications, using AES.<br><br>This algorithm uses an AES key (KEK: key-encryption key) and a 64-bit IV to decrypt 64-bit blocks.",t.infoURL="https://wikipedia.org/wiki/Key_wrap",t.inputType="string",t.outputType="string",t.args=[{name:"Key (KEK)",type:"toggleString",value:"",toggleValues:["Hex","UTF8","Latin1","Base64"]},{name:"IV",type:"toggleString",value:"a6a6a6a6a6a6a6a6",toggleValues:["Hex","UTF8","Latin1","Base64"]},{name:"Input",type:"option",value:["Hex","Raw"]},{name:"Output",type:"option",value:["Hex","Raw"]}],t}return u(r,t),i(r,[{key:"run",value:function(e,t){var r=L.convertToByteString(t[0].string,t[0].option),n=L.convertToByteString(t[1].string,t[1].option),i=t[2],a=t[3];if(16!==r.length&&24!==r.length&&32!==r.length)throw new S("KEK must be either 16, 24, or 32 bytes (currently "+r.length+" bytes)");if(8!==n.length)throw new S("IV must be 8 bytes (currently "+n.length+" bytes)");var o=L.convertToByteString(e,i);if(o.length%8!=0||o.length<24)throw new S("input must be 8n (n>=3) bytes (currently "+o.length+" bytes)");var s=dt().cipher.createCipher("AES-ECB",r);s.start(),s.update(dt().util.createBuffer("")),s.finish();for(var c=s.output.getBytes(),u=dt().cipher.createDecipher("AES-ECB",r),f=o.substring(0,8),h=[],l=8;l<o.length;l+=8)h.push(o.substring(l,l+8));var d=h.length>>>0,p=h.length/(4*(1<<30))>>>0;p=6*p+(6*d/(4*(1<<30))>>>0),d=6*d>>>0;for(var y=5;y>=0;y--)for(var g=h.length-1;g>=0;g--){var v=L.strToArrayBuffer(f),m=new DataView(v);m.setUint32(0,m.getUint32(0)^p),m.setUint32(4,m.getUint32(4)^d),f=L.arrayBufferToStr(v,!1),u.start(),u.update(dt().util.createBuffer(f+h[g]+c)),u.finish();var b=u.output.getBytes();f=b.substring(0,8),h[g]=b.substring(8,16),--d<0&&(p--,d=4294967295)}if(f!==n)throw new S("IV mismatch");var w=h.join("");return"Hex"===a?I(L.strToArrayBuffer(w)):w}}]),r}(rt);const St=Et;function At(e,t,r){return t=s(t),o(e,Bt()?Reflect.construct(t,r||[],s(e).constructor):t.apply(e,r))}function Bt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Bt=function(){return!!e})()}var Tt=function(t){function r(){var t;return e(this,r),(t=At(this,r)).name="AES Key Wrap",t.module="Ciphers",t.description="A key wrapping algorithm defined in RFC3394, which is used to protect keys in untrusted storage or communications, using AES.<br><br>This algorithm uses an AES key (KEK: key-encryption key) and a 64-bit IV to encrypt 64-bit blocks.",t.infoURL="https://wikipedia.org/wiki/Key_wrap",t.inputType="string",t.outputType="string",t.args=[{name:"Key (KEK)",type:"toggleString",value:"",toggleValues:["Hex","UTF8","Latin1","Base64"]},{name:"IV",type:"toggleString",value:"a6a6a6a6a6a6a6a6",toggleValues:["Hex","UTF8","Latin1","Base64"]},{name:"Input",type:"option",value:["Hex","Raw"]},{name:"Output",type:"option",value:["Hex","Raw"]}],t}return u(r,t),i(r,[{key:"run",value:function(e,t){var r=L.convertToByteString(t[0].string,t[0].option),n=L.convertToByteString(t[1].string,t[1].option),i=t[2],a=t[3];if(16!==r.length&&24!==r.length&&32!==r.length)throw new S("KEK must be either 16, 24, or 32 bytes (currently "+r.length+" bytes)");if(8!==n.length)throw new S("IV must be 8 bytes (currently "+n.length+" bytes)");var o=L.convertToByteString(e,i);if(o.length%8!=0||o.length<16)throw new S("input must be 8n (n>=2) bytes (currently "+o.length+" bytes)");for(var s=dt().cipher.createCipher("AES-ECB",r),c=n,u=[],f=0;f<o.length;f+=8)u.push(o.substring(f,f+8));for(var h=1,l=0,d=0;d<6;d++)for(var p=0;p<u.length;p++){s.start(),s.update(dt().util.createBuffer(c+u[p])),s.finish();var y=s.output.getBytes(),g=L.strToArrayBuffer(y.substring(0,8)),v=new DataView(g);v.setUint32(0,v.getUint32(0)^l),v.setUint32(4,v.getUint32(4)^h),c=L.arrayBufferToStr(g,!1),u[p]=y.substring(8,16),++h>4294967295&&(l++,h=0)}var m=c+u.join("");return"Hex"===a?I(L.strToArrayBuffer(m)):m}}]),r}(rt);const It=Tt;function kt(e,t,r){return t=s(t),o(e,_t()?Reflect.construct(t,r||[],s(e).constructor):t.apply(e,r))}function _t(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(_t=function(){return!!e})()}var Rt=function(t){function r(){var t;return e(this,r),(t=kt(this,r)).name="Affine Cipher Decode",t.module="Ciphers",t.description="The Affine cipher is a type of monoalphabetic substitution cipher. To decrypt, each letter in an alphabet is mapped to its numeric equivalent, decrypted by a mathematical function, and converted back to a letter.",t.infoURL="https://wikipedia.org/wiki/Affine_cipher",t.inputType="string",t.outputType="string",t.args=[{name:"a",type:"number",value:1},{name:"b",type:"number",value:0}],t}return u(r,t),i(r,[{key:"run",value:function(e,t){var r="abcdefghijklmnopqrstuvwxyz",n=se(t,2),i=n[0],a=n[1],o=L.modInv(i,26),s="";if(!/^\+?(0|[1-9]\d*)$/.test(i)||!/^\+?(0|[1-9]\d*)$/.test(a))throw new S("The values of a and b can only be integers.");if(1!==L.gcd(i,26))throw new S("The value of `a` must be coprime to 26.");for(var c=0;c<e.length;c++)r.indexOf(e[c])>=0?s+=r[L.mod((r.indexOf(e[c])-a)*o,26)]:r.indexOf(e[c].toLowerCase())>=0?s+=r[L.mod((r.indexOf(e[c].toLowerCase())-a)*o,26)].toUpperCase():s+=e[c];return s}},{key:"highlight",value:function(e,t){return e}},{key:"highlightReverse",value:function(e,t){return e}}]),r}(rt);const xt=Rt;var Ft=__webpack_require__(20536),Dt=__webpack_require__.n(Ft);function Pt(e,t){var r="abcdefghijklmnopqrstuvwxyz",n=t[0],i=t[1],a="";if(!/^\+?(0|[1-9]\d*)$/.test(n)||!/^\+?(0|[1-9]\d*)$/.test(i))throw new S("The values of a and b can only be integers.");for(var o=0;o<e.length;o++)r.indexOf(e[o])>=0?a+=r[(n*r.indexOf(e[o])+i)%26]:r.indexOf(e[o].toLowerCase())>=0?a+=r[(n*r.indexOf(e[o].toLowerCase())+i)%26].toUpperCase():a+=e[o];return a}function Ut(e){for(var t=`${e}ABCDEFGHIKLMNOPQRSTUVWXYZ`.split("").unique(),r=[],n=0;n<5;n++)r[n]=t.slice(5*n,5*n+5);return r}var Nt={Hex:Dt().enc.Hex,Base64:Dt().enc.Base64,UTF8:Dt().enc.Utf8,UTF16:Dt().enc.Utf16,UTF16LE:Dt().enc.Utf16LE,UTF16BE:Dt().enc.Utf16BE,Latin1:Dt().enc.Latin1};function Lt(e,t,r){return t=s(t),o(e,Mt()?Reflect.construct(t,r||[],s(e).constructor):t.apply(e,r))}function Mt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Mt=function(){return!!e})()}const Ot=function(t){function r(){var t;return e(this,r),(t=Lt(this,r)).name="Affine Cipher Encode",t.module="Ciphers",t.description="The Affine cipher is a type of monoalphabetic substitution cipher, wherein each letter in an alphabet is mapped to its numeric equivalent, encrypted using simple mathematical function, <code>(ax + b) % 26</code>, and converted back to a letter.",t.infoURL="https://wikipedia.org/wiki/Affine_cipher",t.inputType="string",t.outputType="string",t.args=[{name:"a",type:"number",value:1},{name:"b",type:"number",value:0}],t}return u(r,t),i(r,[{key:"run",value:function(e,t){return Pt(e,t)}},{key:"highlight",value:function(e,t){return e}},{key:"highlightReverse",value:function(e,t){return e}}]),r}(rt);function Kt(e,t,r){return t=s(t),o(e,Gt()?Reflect.construct(t,r||[],s(e).constructor):t.apply(e,r))}function Gt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Gt=function(){return!!e})()}const jt=function(t){function r(){var t;return e(this,r),(t=Kt(this,r)).name="Atbash Cipher",t.module="Ciphers",t.description="Atbash is a mono-alphabetic substitution cipher originally used to encode the Hebrew alphabet. It has been modified here for use with the Latin alphabet.",t.infoURL="https://wikipedia.org/wiki/Atbash",t.inputType="string",t.outputType="string",t.args=[],t}return u(r,t),i(r,[{key:"run",value:function(e,t){return Pt(e,[25,25])}},{key:"highlight",value:function(e,t){return e}},{key:"highlightReverse",value:function(e,t){return e}}]),r}(rt);function Vt(e,t,r){return t=s(t),o(e,Ht()?Reflect.construct(t,r||[],s(e).constructor):t.apply(e,r))}function Ht(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Ht=function(){return!!e})()}var qt=function(t){function r(){var t;return e(this,r),(t=Vt(this,r)).name="Bifid Cipher Decode",t.module="Ciphers",t.description="The Bifid cipher is a cipher which uses a Polybius square in conjunction with transposition, which can be fairly difficult to decipher without knowing the alphabet keyword.",t.infoURL="https://wikipedia.org/wiki/Bifid_cipher",t.inputType="string",t.outputType="string",t.args=[{name:"Keyword",type:"string",value:""}],t}return u(r,t),i(r,[{key:"run",value:function(e,t){var r=t[0].toUpperCase().replace("J","I"),n=r.split("").unique(),i="ABCDEFGHIKLMNOPQRSTUVWXYZ",a=[],o="",s=0,c="";if(!/^[A-Z]+$/.test(r)&&n.length>0)throw new S("The key must consist only of letters in the English alphabet");var u=Ut(r);return e.replace("J","I").split("").forEach((function(e){var t,r=i.split("").indexOf(e.toLocaleUpperCase())>=0;if(r){for(var n=0;n<5;n++)(t=u[n].indexOf(e.toLocaleUpperCase()))>=0&&(c+=`${n}${t}`);i.split("").indexOf(e)>=0?a.push(!0):r&&a.push(!1)}else a.push(e)})),a.forEach((function(e){if("boolean"==typeof e){var t=[c[s],c[s+c.length/2]];o+=e?u[t[0]][t[1]]:u[t[0]][t[1]].toLocaleLowerCase(),s++}else o+=e})),o}},{key:"highlight",value:function(e,t){return e}},{key:"highlightReverse",value:function(e,t){return e}}]),r}(rt);const zt=qt;function Wt(e,t,r){return t=s(t),o(e,Xt()?Reflect.construct(t,r||[],s(e).constructor):t.apply(e,r))}function Xt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Xt=function(){return!!e})()}var Yt=function(t){function r(){var t;return e(this,r),(t=Wt(this,r)).name="Bifid Cipher Encode",t.module="Ciphers",t.description="The Bifid cipher is a cipher which uses a Polybius square in conjunction with transposition, which can be fairly difficult to decipher without knowing the alphabet keyword.",t.infoURL="https://wikipedia.org/wiki/Bifid_cipher",t.inputType="string",t.outputType="string",t.args=[{name:"Keyword",type:"string",value:""}],t}return u(r,t),i(r,[{key:"run",value:function(e,t){var r=t[0].toUpperCase().replace("J","I"),n=r.split("").unique(),i="ABCDEFGHIKLMNOPQRSTUVWXYZ",a=[],o=[],s=[],c="",u=0;if(!/^[A-Z]+$/.test(r)&&n.length>0)throw new S("The key must consist only of letters in the English alphabet");var f=Ut(r);e.replace("J","I").split("").forEach((function(e){var t,r=i.split("").indexOf(e.toLocaleUpperCase())>=0;if(r){for(var n=0;n<5;n++)(t=f[n].indexOf(e.toLocaleUpperCase()))>=0&&(a.push(t),o.push(n));i.split("").indexOf(e)>=0?s.push(!0):r&&s.push(!1)}else s.push(e)}));var h=`${o.join("")}${a.join("")}`;return s.forEach((function(e){if("boolean"==typeof e){var t=h.substr(2*u,2).split("");c+=e?f[t[0]][t[1]]:f[t[0]][t[1]].toLocaleLowerCase(),u++}else c+=e})),c}},{key:"highlight",value:function(e,t){return e}},{key:"highlightReverse",value:function(e,t){return e}}]),r}(rt);const Qt=Yt;var Zt={},Jt=function(e){return"string"==typeof e||e instanceof String},$t=function(e,t,r,n){var i=0,a=e&&e.length||0,o=new(n||Array)(a);if(a&&"string"==typeof e&&(e=e.split("")),r)for(;i<a;++i)o[i]=t.call(r,e[i],i,e);else for(;i<a;++i)o[i]=t(e[i],i,e);return o},er={p:[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],s0:[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],s1:[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],s2:[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],s3:[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]},tr=function(e,t){return(e>>16^t>>16)<<16|65535&(65535&e^65535&t)},rr=function(e,t){var r=t.s3[255&e];e>>=8;var n=t.s2[255&e];e>>=8;var i=t.s1[255&e];e>>=8;var a=t.s0[255&e],o=(a>>16)+(i>>16)+((65535&a)+(65535&i)>>16)<<16|(65535&a)+(65535&i)&65535;return((o=(o>>16^n>>16)<<16|65535&(65535&o^65535&n))>>16)+(r>>16)+((65535&o)+(65535&r)>>16)<<16|(65535&o)+(65535&r)&65535},nr=function(e,t){var r=e.left,n=e.right;r=tr(r,t.p[0]),n=tr(n,tr(rr(r,t),t.p[1])),r=tr(r,tr(rr(n,t),t.p[2])),n=tr(n,tr(rr(r,t),t.p[3])),r=tr(r,tr(rr(n,t),t.p[4])),n=tr(n,tr(rr(r,t),t.p[5])),r=tr(r,tr(rr(n,t),t.p[6])),n=tr(n,tr(rr(r,t),t.p[7])),r=tr(r,tr(rr(n,t),t.p[8])),n=tr(n,tr(rr(r,t),t.p[9])),r=tr(r,tr(rr(n,t),t.p[10])),n=tr(n,tr(rr(r,t),t.p[11])),r=tr(r,tr(rr(n,t),t.p[12])),n=tr(n,tr(rr(r,t),t.p[13])),r=tr(r,tr(rr(n,t),t.p[14])),n=tr(n,tr(rr(r,t),t.p[15])),r=tr(r,tr(rr(n,t),t.p[16])),e.right=r,e.left=tr(n,t.p[17])};Zt.Blowfish=new function(){this.createCipher=function(e,t){return new(dt().cipher.BlockCipher)({algorithm:new ir.Algorithm(e,t),key:e,decrypt:!1})},this.createDecipher=function(e,t){return new(dt().cipher.BlockCipher)({algorithm:new ir.Algorithm(e,t),key:e,decrypt:!0})}},Zt.Blowfish.Algorithm=function(e,t){this.initialize({key:e});var r=this.box,n={blockSize:8,cipher:{encrypt:function(e,t){!function(e,t,r){var n={};n.left=e[0],n.right=e[1],nr(n,r),t[0]=n.left,t[1]=n.right}(e,t,r)},decrypt:function(e,t){!function(e,t,r){var n={};n.left=e[0],n.right=e[1],function(e,t){var r=e.left,n=e.right;r=tr(r,t.p[17]),n=tr(n,tr(rr(r,t),t.p[16])),r=tr(r,tr(rr(n,t),t.p[15])),n=tr(n,tr(rr(r,t),t.p[14])),r=tr(r,tr(rr(n,t),t.p[13])),n=tr(n,tr(rr(r,t),t.p[12])),r=tr(r,tr(rr(n,t),t.p[11])),n=tr(n,tr(rr(r,t),t.p[10])),r=tr(r,tr(rr(n,t),t.p[9])),n=tr(n,tr(rr(r,t),t.p[8])),r=tr(r,tr(rr(n,t),t.p[7])),n=tr(n,tr(rr(r,t),t.p[6])),r=tr(r,tr(rr(n,t),t.p[5])),n=tr(n,tr(rr(r,t),t.p[4])),r=tr(r,tr(rr(n,t),t.p[3])),n=tr(n,tr(rr(r,t),t.p[2])),r=tr(r,tr(rr(n,t),t.p[1])),e.right=r,e.left=tr(n,t.p[0])}(n,r),t[0]=n.left,t[1]=n.right}(e,t,r)}}};switch(t.toLowerCase()){case"ecb":default:this.mode=new(dt().cipher.modes.ecb)(n);break;case"cbc":this.mode=new(dt().cipher.modes.cbc)(n);break;case"cfb":this.mode=new(dt().cipher.modes.cfb)(n);break;case"ofb":this.mode=new(dt().cipher.modes.ofb)(n);break;case"ctr":this.mode=new(dt().cipher.modes.ctr)(n)}},Zt.Blowfish.Algorithm.prototype.initialize=function(e){var t=Math.pow(2,8),r=e.key;Jt(r)&&(r=$t(r.split(""),(function(e){return 255&e.charCodeAt(0)})));for(var n=0,i=0,a={left:0,right:0},o={p:$t(er.p.slice(0),(function(e){for(var a=r.length,o=0;o<4;o++)i=i*t|r[n++%a];return(e>>16^i>>16)<<16|65535&(65535&e^65535&i)})),s0:er.s0.slice(0),s1:er.s1.slice(0),s2:er.s2.slice(0),s3:er.s3.slice(0)},s=0,c=o.p.length;s<c;)nr(a,o),o.p[s++]=a.left,o.p[s++]=a.right;for(var u=0;u<4;u++)for(var f=0,h=o["s"+u].length;f<h;)nr(a,o),o["s"+u][f++]=a.left,o["s"+u][f++]=a.right;this.box=o};var ir=Zt.Blowfish;function ar(e,t,r){return t=s(t),o(e,or()?Reflect.construct(t,r||[],s(e).constructor):t.apply(e,r))}function or(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(or=function(){return!!e})()}const sr=function(t){function r(){var t;return e(this,r),(t=ar(this,r)).name="Blowfish Decrypt",t.module="Ciphers",t.description="Blowfish is a symmetric-key block cipher designed in 1993 by Bruce Schneier and included in a large number of cipher suites and encryption products. AES now receives more attention.<br><br><b>IV:</b> The Initialization Vector should be 8 bytes long. If not entered, it will default to 8 null bytes.",t.infoURL="https://wikipedia.org/wiki/Blowfish_(cipher)",t.inputType="string",t.outputType="string",t.args=[{name:"Key",type:"toggleString",value:"",toggleValues:["Hex","UTF8","Latin1","Base64"]},{name:"IV",type:"toggleString",value:"",toggleValues:["Hex","UTF8","Latin1","Base64"]},{name:"Mode",type:"option",value:["CBC","CFB","OFB","CTR","ECB"]},{name:"Input",type:"option",value:["Hex","Raw"]},{name:"Output",type:"option",value:["Raw","Hex"]}],t}return u(r,t),i(r,[{key:"run",value:function(e,t){var r=L.convertToByteString(t[0].string,t[0].option),n=L.convertToByteString(t[1].string,t[1].option),i=t[2],a=t[3],o=t[4];if(8!==r.length)throw new S(`Invalid key length: ${r.length} bytes\n\nBlowfish uses a key length of 8 bytes (64 bits).`);e=L.convertToByteString(e,a);var s=ir.createDecipher(r,i);if(s.start({iv:n}),s.update(dt().util.createBuffer(e)),s.finish())return"Hex"===o?s.output.toHex():s.output.getBytes();throw new S("Unable to decrypt input with these parameters.")}}]),r}(rt);function cr(e,t,r){return t=s(t),o(e,ur()?Reflect.construct(t,r||[],s(e).constructor):t.apply(e,r))}function ur(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(ur=function(){return!!e})()}const fr=function(t){function r(){var t;return e(this,r),(t=cr(this,r)).name="Blowfish Encrypt",t.module="Ciphers",t.description="Blowfish is a symmetric-key block cipher designed in 1993 by Bruce Schneier and included in a large number of cipher suites and encryption products. AES now receives more attention.<br><br><b>IV:</b> The Initialization Vector should be 8 bytes long. If not entered, it will default to 8 null bytes.",t.infoURL="https://wikipedia.org/wiki/Blowfish_(cipher)",t.inputType="string",t.outputType="string",t.args=[{name:"Key",type:"toggleString",value:"",toggleValues:["Hex","UTF8","Latin1","Base64"]},{name:"IV",type:"toggleString",value:"",toggleValues:["Hex","UTF8","Latin1","Base64"]},{name:"Mode",type:"option",value:["CBC","CFB","OFB","CTR","ECB"]},{name:"Input",type:"option",value:["Raw","Hex"]},{name:"Output",type:"option",value:["Hex","Raw"]}],t}return u(r,t),i(r,[{key:"run",value:function(e,t){var r=L.convertToByteString(t[0].string,t[0].option),n=L.convertToByteString(t[1].string,t[1].option),i=t[2],a=t[3],o=t[4];if(8!==r.length)throw new S(`Invalid key length: ${r.length} bytes\n\nBlowfish uses a key length of 8 bytes (64 bits).`);e=L.convertToByteString(e,a);var s=ir.createCipher(r,i);return s.start({iv:n}),s.update(dt().util.createBuffer(e)),s.finish(),"Hex"===o?s.output.toHex():s.output.getBytes()}}]),r}(rt);function hr(e,t,r){return t=s(t),o(e,lr()?Reflect.construct(t,r||[],s(e).constructor):t.apply(e,r))}function lr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(lr=function(){return!!e})()}var dr=function(t){function r(){var t;return e(this,r),(t=hr(this,r)).name="Caesar Box Cipher",t.module="Ciphers",t.description="Caesar Box is a transposition cipher used in the Roman Empire, in which letters of the message are written in rows in a square (or a rectangle) and then, read by column.",t.infoURL="https://www.dcode.fr/caesar-box-cipher",t.inputType="string",t.outputType="string",t.args=[{name:"Box Height",type:"number",value:1}],t}return u(r,t),i(r,[{key:"run",value:function(e,t){for(var r=t[0],n=Math.ceil(e.length/r);-1!==e.indexOf(" ");)e=e.replace(" ","");for(var i=0;i<r*n-e.length;i++)e+="\0";for(var a="",o=0;o<r;o++)for(var s=o;s<e.length;s+=r)"\0"!==e.charAt(s)&&(a+=e.charAt(s));return a}}]),r}(rt);const pr=dr;function yr(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function gr(e,t,r){return t=s(t),o(e,vr()?Reflect.construct(t,r||[],s(e).constructor):t.apply(e,r))}function vr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(vr=function(){return!!e})()}var mr=function(t){function r(){var t;return e(this,r),(t=gr(this,r)).name="Cetacean Cipher Decode",t.module="Ciphers",t.description="Decode Cetacean Cipher input. <br/><br/>e.g. <code>EEEEEEEEEeeEeEEEEEEEEEEEEeeEeEEe</code> becomes <code>hi</code>",t.infoURL="https://hitchhikers.fandom.com/wiki/Dolphins",t.inputType="string",t.outputType="string",t.checks=[{pattern:"^(?:[eE]{16,})(?: [eE]{16,})*$",flags:"",args:[]}],t}return u(r,t),i(r,[{key:"run",value:function(e,t){var r,n=[],i=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return yr(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?yr(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}(e);try{for(i.s();!(r=i.n()).done;){var a=r.value;" "===a?n.push.apply(n,[0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0]):n.push("e"===a?1:0)}}catch(e){i.e(e)}finally{i.f()}for(var o=[],s=0;s<n.length;s+=16)o.push(n.slice(s,s+16).join(""));return o.map((function(e){return String.fromCharCode(parseInt(e,2))})).join("")}}]),r}(rt);const br=mr;function wr(e,t,r){return t=s(t),o(e,Cr()?Reflect.construct(t,r||[],s(e).constructor):t.apply(e,r))}function Cr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Cr=function(){return!!e})()}var Er=function(t){function r(){var t;return e(this,r),(t=wr(this,r)).name="Cetacean Cipher Encode",t.module="Ciphers",t.description="Converts any input into Cetacean Cipher. <br/><br/>e.g. <code>hi</code> becomes <code>EEEEEEEEEeeEeEEEEEEEEEEEEeeEeEEe</code>",t.infoURL="https://hitchhikers.fandom.com/wiki/Dolphins",t.inputType="string",t.outputType="string",t}return u(r,t),i(r,[{key:"run",value:function(e,t){var r=[];return e.split("").map((function(e){if(" "===e)r.push(e);else{var t=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Space",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:8;if(null==e)throw new S("Unable to convert to binary: Empty input data enocuntered");t=L.charRep(t);var n="";if(!e.length)return"number"==typeof e?e.toString(2).padStart(r,"0"):"";for(var i=0;i<e.length;i++)n+=e[i].toString(2).padStart(r,"0"),i!==e.length-1&&(n+=t);return n}(e.charCodeAt(0),"None",16).split("");r.push(t.map((function(e){return"1"===e?"e":"E"})).join(""))}})),r.join("")}}]),r}(rt);const Sr=Er;function Ar(e,t,r){return t=s(t),o(e,Br()?Reflect.construct(t,r||[],s(e).constructor):t.apply(e,r))}function Br(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Br=function(){return!!e})()}const Tr=function(t){function r(){var t;return e(this,r),(t=Ar(this,r)).name="DES Decrypt",t.module="Ciphers",t.description="DES is a previously dominant algorithm for encryption, and was published as an official U.S. Federal Information Processing Standard (FIPS). It is now considered to be insecure due to its small key size.<br><br><b>Key:</b> DES uses a key length of 8 bytes (64 bits).<br>Triple DES uses a key length of 24 bytes (192 bits).<br><br><b>IV:</b> The Initialization Vector should be 8 bytes long. If not entered, it will default to 8 null bytes.<br><br><b>Padding:</b> In CBC and ECB mode, PKCS#7 padding will be used as a default.",t.infoURL="https://wikipedia.org/wiki/Data_Encryption_Standard",t.inputType="string",t.outputType="string",t.args=[{name:"Key",type:"toggleString",value:"",toggleValues:["Hex","UTF8","Latin1","Base64"]},{name:"IV",type:"toggleString",value:"",toggleValues:["Hex","UTF8","Latin1","Base64"]},{name:"Mode",type:"option",value:["CBC","CFB","OFB","CTR","ECB","CBC/NoPadding","ECB/NoPadding"]},{name:"Input",type:"option",value:["Hex","Raw"]},{name:"Output",type:"option",value:["Raw","Hex"]}],t}return u(r,t),i(r,[{key:"run",value:function(e,t){var r=L.convertToByteString(t[0].string,t[0].option),n=L.convertToByteArray(t[1].string,t[1].option),i=t[2].substring(0,3),a=t[2].endsWith("NoPadding"),o=se(t,5),s=o[3],c=o[4];if(8!==r.length)throw new S(`Invalid key length: ${r.length} bytes\n\nDES uses a key length of 8 bytes (64 bits).\nTriple DES uses a key length of 24 bytes (192 bits).`);if(8!==n.length&&"ECB"!==i)throw new S(`Invalid IV length: ${n.length} bytes\n\nDES uses an IV length of 8 bytes (64 bits).\nMake sure you have specified the type correctly (e.g. Hex vs UTF8).`);e=L.convertToByteString(e,s);var u=dt().cipher.createDecipher("DES-"+i,r);if(a&&(u.mode.unpad=function(e,t){return!0}),u.start({iv:n}),u.update(dt().util.createBuffer(e)),u.finish())return"Hex"===c?u.output.toHex():u.output.getBytes();throw new S("Unable to decrypt input with these parameters.")}}]),r}(rt);function Ir(e,t,r){return t=s(t),o(e,kr()?Reflect.construct(t,r||[],s(e).constructor):t.apply(e,r))}function kr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(kr=function(){return!!e})()}const _r=function(t){function r(){var t;return e(this,r),(t=Ir(this,r)).name="DES Encrypt",t.module="Ciphers",t.description="DES is a previously dominant algorithm for encryption, and was published as an official U.S. Federal Information Processing Standard (FIPS). It is now considered to be insecure due to its small key size.<br><br><b>Key:</b> DES uses a key length of 8 bytes (64 bits).<br>Triple DES uses a key length of 24 bytes (192 bits).<br><br>You can generate a password-based key using one of the KDF operations.<br><br><b>IV:</b> The Initialization Vector should be 8 bytes long. If not entered, it will default to 8 null bytes.<br><br><b>Padding:</b> In CBC and ECB mode, PKCS#7 padding will be used.",t.infoURL="https://wikipedia.org/wiki/Data_Encryption_Standard",t.inputType="string",t.outputType="string",t.args=[{name:"Key",type:"toggleString",value:"",toggleValues:["Hex","UTF8","Latin1","Base64"]},{name:"IV",type:"toggleString",value:"",toggleValues:["Hex","UTF8","Latin1","Base64"]},{name:"Mode",type:"option",value:["CBC","CFB","OFB","CTR","ECB"]},{name:"Input",type:"option",value:["Raw","Hex"]},{name:"Output",type:"option",value:["Hex","Raw"]}],t}return u(r,t),i(r,[{key:"run",value:function(e,t){var r=L.convertToByteString(t[0].string,t[0].option),n=L.convertToByteArray(t[1].string,t[1].option),i=se(t,5),a=i[2],o=i[3],s=i[4];if(8!==r.length)throw new S(`Invalid key length: ${r.length} bytes\n\nDES uses a key length of 8 bytes (64 bits).\nTriple DES uses a key length of 24 bytes (192 bits).`);if(8!==n.length&&"ECB"!==a)throw new S(`Invalid IV length: ${n.length} bytes\n\nDES uses an IV length of 8 bytes (64 bits).\nMake sure you have specified the type correctly (e.g. Hex vs UTF8).`);e=L.convertToByteString(e,o);var c=dt().cipher.createCipher("DES-"+a,r);return c.start({iv:n}),c.update(dt().util.createBuffer(e)),c.finish(),"Hex"===s?c.output.toHex():c.output.getBytes()}}]),r}(rt);function Rr(e,t,r){return t=s(t),o(e,xr()?Reflect.construct(t,r||[],s(e).constructor):t.apply(e,r))}function xr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(xr=function(){return!!e})()}const Fr=function(t){function r(){var t;return e(this,r),(t=Rr(this,r)).name="Derive EVP key",t.module="Ciphers",t.description="This operation performs a password-based key derivation function (PBKDF) used extensively in OpenSSL. In many applications of cryptography, user security is ultimately dependent on a password, and because a password usually can't be used directly as a cryptographic key, some processing is required.<br><br>A salt provides a large set of keys for any given password, and an iteration count increases the cost of producing keys from a password, thereby also increasing the difficulty of attack.<br><br>If you leave the salt argument empty, a random salt will be generated.",t.infoURL="https://wikipedia.org/wiki/Key_derivation_function",t.inputType="string",t.outputType="string",t.args=[{name:"Passphrase",type:"toggleString",value:"",toggleValues:["UTF8","Latin1","Hex","Base64"]},{name:"Key size",type:"number",value:128},{name:"Iterations",type:"number",value:1},{name:"Hashing function",type:"option",value:["SHA1","SHA256","SHA384","SHA512","MD5"]},{name:"Salt",type:"toggleString",value:"",toggleValues:["Hex","UTF8","Latin1","Base64"]}],t}return u(r,t),i(r,[{key:"run",value:function(e,t){var r=L.convertToByteString(t[0].string,t[0].option),n=t[1]/32,i=t[2],a=t[3],o=L.convertToByteString(t[4].string,t[4].option);return Dt().EvpKDF(r,o,{keySize:n,hasher:Dt().algo[a],iterations:i}).toString(Dt().enc.Hex)}}]),r}(rt);function Dr(e,t,r){return t=s(t),o(e,Pr()?Reflect.construct(t,r||[],s(e).constructor):t.apply(e,r))}function Pr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Pr=function(){return!!e})()}Dt().kdf.OpenSSL.execute=function(e,t,r,n){null==n&&(n=Dt().lib.WordArray.random(8));var i=Dt().algo.EvpKDF.create({keySize:t+r}).compute(e,n),a=Dt().lib.WordArray.create(i.words.slice(t),4*r);return i.sigBytes=4*t,Dt().lib.CipherParams.create({key:i,iv:a,salt:n})},Dt().enc.Hex.parse=function(e){for(var t=(e=e.replace(/\s/g,"")).length,r=[],n=0;n<t;n+=2)r[n>>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;return new(Dt().lib.WordArray.init)(r,t/2)};const Ur=function(t){function r(){var t;return e(this,r),(t=Dr(this,r)).name="Derive PBKDF2 key",t.module="Ciphers",t.description="PBKDF2 is a password-based key derivation function. It is part of RSA Laboratories' Public-Key Cryptography Standards (PKCS) series, specifically PKCS #5 v2.0, also published as Internet Engineering Task Force's RFC 2898.<br><br>In many applications of cryptography, user security is ultimately dependent on a password, and because a password usually can't be used directly as a cryptographic key, some processing is required.<br><br>A salt provides a large set of keys for any given password, and an iteration count increases the cost of producing keys from a password, thereby also increasing the difficulty of attack.<br><br>If you leave the salt argument empty, a random salt will be generated.",t.infoURL="https://wikipedia.org/wiki/PBKDF2",t.inputType="string",t.outputType="string",t.args=[{name:"Passphrase",type:"toggleString",value:"",toggleValues:["UTF8","Latin1","Hex","Base64"]},{name:"Key size",type:"number",value:128},{name:"Iterations",type:"number",value:1},{name:"Hashing function",type:"option",value:["SHA1","SHA256","SHA384","SHA512","MD5"]},{name:"Salt",type:"toggleString",value:"",toggleValues:["Hex","UTF8","Latin1","Base64"]}],t}return u(r,t),i(r,[{key:"run",value:function(e,t){var r=L.convertToByteString(t[0].string,t[0].option),n=t[1],i=t[2],a=t[3],o=L.convertToByteString(t[4].string,t[4].option)||dt().random.getBytesSync(n),s=dt().pkcs5.pbkdf2(r,o,i,n/8,a.toLowerCase());return dt().util.bytesToHex(s)}}]),r}(rt);var Nr=__webpack_require__(99976);function Lr(e,t,r){return t=s(t),o(e,Mr()?Reflect.construct(t,r||[],s(e).constructor):t.apply(e,r))}function Mr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Mr=function(){return!!e})()}const Or=function(t){function r(){var t;return e(this,r),(t=Lr(this,r)).name="GOST Decrypt",t.module="Ciphers",t.description="The GOST block cipher (Magma), defined in the standard GOST 28147-89 (RFC 5830), is a Soviet and Russian government standard symmetric key block cipher with a block size of 64 bits. The original standard, published in 1989, did not give the cipher any name, but the most recent revision of the standard, GOST R 34.12-2015 (RFC 7801, RFC 8891), specifies that it may be referred to as Magma. The GOST hash function is based on this cipher. The new standard also specifies a new 128-bit block cipher called Kuznyechik.<br><br>Developed in the 1970s, the standard had been marked 'Top Secret' and then downgraded to 'Secret' in 1990. Shortly after the dissolution of the USSR, it was declassified and it was released to the public in 1994. GOST 28147 was a Soviet alternative to the United States standard algorithm, DES. Thus, the two are very similar in structure.",t.infoURL="https://wikipedia.org/wiki/GOST_(block_cipher)",t.inputType="string",t.outputType="string",t.args=[{name:"Key",type:"toggleString",value:"",toggleValues:["Hex","UTF8","Latin1","Base64"]},{name:"IV",type:"toggleString",value:"",toggleValues:["Hex","UTF8","Latin1","Base64"]},{name:"Input type",type:"option",value:["Hex","Raw"]},{name:"Output type",type:"option",value:["Raw","Hex"]},{name:"Algorithm",type:"argSelector",value:[{name:"GOST 28147 (Magma, 1989)",off:[5],on:[6]},{name:"GOST R 34.12 (Kuznyechik, 2015)",on:[5],off:[6]}]},{name:"Block length",type:"option",value:["64","128"]},{name:"sBox",type:"option",value:["E-TEST","E-A","E-B","E-C","E-D","E-SC","E-Z","D-TEST","D-A","D-SC"]},{name:"Block mode",type:"option",value:["ECB","CFB","OFB","CTR","CBC"]},{name:"Key meshing mode",type:"option",value:["NO","CP"]},{name:"Padding",type:"option",value:["NO","PKCS5","ZERO","RANDOM","BIT"]}],t}var n;return u(r,t),i(r,[{key:"run",value:(n=h(d().mark((function e(t,r){var n,i,a,o,s,c,u,f,h,l,p,y,g,v,m,b,w,C,E;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=se(r,10),i=n[0],a=n[1],o=n[2],s=n[3],c=n[4],u=n[5],f=n[6],h=n[7],l=n[8],p=n[9],y=I(L.convertToByteArray(i.string,i.option)),g=I(L.convertToByteArray(a.string,a.option)),t="Hex"===o?t:I(L.strToArrayBuffer(t)),m=1989==(v="GOST 28147 (Magma, 1989)"===c?1989:2015)?64:parseInt(u,10),b={version:v,length:m,mode:"ES",sBox:1989===v?f:null,block:h,keyMeshing:l,padding:p},e.prev=8,w=Nr.CryptoGost.coding.Hex,g&&(b.iv=w.decode(g)),C=Nr.GostEngine.getGostCipher(b),E=w.encode(C.decrypt(w.decode(y),w.decode(t))),e.abrupt("return","Hex"===s?E:L.byteArrayToChars(k(E)));case 16:throw e.prev=16,e.t0=e.catch(8),new S(e.t0);case 19:case"end":return e.stop()}}),e,null,[[8,16]])}))),function(e,t){return n.apply(this,arguments)})}]),r}(rt);function Kr(e,t,r){return t=s(t),o(e,Gr()?Reflect.construct(t,r||[],s(e).constructor):t.apply(e,r))}function Gr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Gr=function(){return!!e})()}const jr=function(t){function r(){var t;return e(this,r),(t=Kr(this,r)).name="GOST Encrypt",t.module="Ciphers",t.description="The GOST block cipher (Magma), defined in the standard GOST 28147-89 (RFC 5830), is a Soviet and Russian government standard symmetric key block cipher with a block size of 64 bits. The original standard, published in 1989, did not give the cipher any name, but the most recent revision of the standard, GOST R 34.12-2015 (RFC 7801, RFC 8891), specifies that it may be referred to as Magma. The GOST hash function is based on this cipher. The new standard also specifies a new 128-bit block cipher called Kuznyechik.<br><br>Developed in the 1970s, the standard had been marked 'Top Secret' and then downgraded to 'Secret' in 1990. Shortly after the dissolution of the USSR, it was declassified and it was released to the public in 1994. GOST 28147 was a Soviet alternative to the United States standard algorithm, DES. Thus, the two are very similar in structure.",t.infoURL="https://wikipedia.org/wiki/GOST_(block_cipher)",t.inputType="string",t.outputType="string",t.args=[{name:"Key",type:"toggleString",value:"",toggleValues:["Hex","UTF8","Latin1","Base64"]},{name:"IV",type:"toggleString",value:"",toggleValues:["Hex","UTF8","Latin1","Base64"]},{name:"Input type",type:"option",value:["Raw","Hex"]},{name:"Output type",type:"option",value:["Hex","Raw"]},{name:"Algorithm",type:"argSelector",value:[{name:"GOST 28147 (Magma, 1989)",off:[5],on:[6]},{name:"GOST R 34.12 (Kuznyechik, 2015)",on:[5],off:[6]}]},{name:"Block length",type:"option",value:["64","128"]},{name:"sBox",type:"option",value:["E-TEST","E-A","E-B","E-C","E-D","E-SC","E-Z","D-TEST","D-A","D-SC"]},{name:"Block mode",type:"option",value:["ECB","CFB","OFB","CTR","CBC"]},{name:"Key meshing mode",type:"option",value:["NO","CP"]},{name:"Padding",type:"option",value:["NO","PKCS5","ZERO","RANDOM","BIT"]}],t}var n;return u(r,t),i(r,[{key:"run",value:(n=h(d().mark((function e(t,r){var n,i,a,o,s,c,u,f,h,l,p,y,g,v,m,b,w,C,E;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=se(r,10),i=n[0],a=n[1],o=n[2],s=n[3],c=n[4],u=n[5],f=n[6],h=n[7],l=n[8],p=n[9],y=I(L.convertToByteArray(i.string,i.option)),g=I(L.convertToByteArray(a.string,a.option)),t="Hex"===o?t:I(L.strToArrayBuffer(t)),m=1989==(v="GOST 28147 (Magma, 1989)"===c?1989:2015)?64:parseInt(u,10),b={version:v,length:m,mode:"ES",sBox:1989===v?f:null,block:h,keyMeshing:l,padding:p},e.prev=8,w=Nr.CryptoGost.coding.Hex,g&&(b.iv=w.decode(g)),C=Nr.GostEngine.getGostCipher(b),E=w.encode(C.encrypt(w.decode(y),w.decode(t))),e.abrupt("return","Hex"===s?E:L.byteArrayToChars(k(E)));case 16:throw e.prev=16,e.t0=e.catch(8),new S(e.t0);case 19:case"end":return e.stop()}}),e,null,[[8,16]])}))),function(e,t){return n.apply(this,arguments)})}]),r}(rt);function Vr(e,t,r){return t=s(t),o(e,Hr()?Reflect.construct(t,r||[],s(e).constructor):t.apply(e,r))}function Hr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Hr=function(){return!!e})()}const qr=function(t){function r(){var t;return e(this,r),(t=Vr(this,r)).name="GOST Key Unwrap",t.module="Ciphers",t.description="A decryptor for keys wrapped using one of the GOST block ciphers.",t.infoURL="https://wikipedia.org/wiki/GOST_(block_cipher)",t.inputType="string",t.outputType="string",t.args=[{name:"Key",type:"toggleString",value:"",toggleValues:["Hex","UTF8","Latin1","Base64"]},{name:"User Key Material",type:"toggleString",value:"",toggleValues:["Hex","UTF8","Latin1","Base64"]},{name:"Input type",type:"option",value:["Hex","Raw"]},{name:"Output type",type:"option",value:["Raw","Hex"]},{name:"Algorithm",type:"argSelector",value:[{name:"GOST 28147 (Magma, 1989)",off:[5],on:[6]},{name:"GOST R 34.12 (Kuznyechik, 2015)",on:[5],off:[6]}]},{name:"Block length",type:"option",value:["64","128"]},{name:"sBox",type:"option",value:["E-TEST","E-A","E-B","E-C","E-D","E-SC","E-Z","D-TEST","D-A","D-SC"]},{name:"Key wrapping",type:"option",value:["NO","CP","SC"]}],t}var n;return u(r,t),i(r,[{key:"run",value:(n=h(d().mark((function e(t,r){var n,i,a,o,s,c,u,f,h,l,p,y,g,v,m,b,w;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=se(r,8),i=n[0],a=n[1],o=n[2],s=n[3],c=n[4],u=n[5],f=n[6],h=n[7],l=I(L.convertToByteArray(i.string,i.option)),p=I(L.convertToByteArray(a.string,a.option)),t="Hex"===o?t:I(L.strToArrayBuffer(t)),g=1989==(y="GOST 28147 (Magma, 1989)"===c?1989:2015)?64:parseInt(u,10),v={version:y,length:g,mode:"KW",sBox:1989===y?f:null,keyWrapping:h},e.prev=8,m=Nr.CryptoGost.coding.Hex,v.ukm=m.decode(p),b=Nr.GostEngine.getGostCipher(v),w=m.encode(b.unwrapKey(m.decode(l),m.decode(t))),e.abrupt("return","Hex"===s?w:L.byteArrayToChars(k(w)));case 16:if(e.prev=16,e.t0=e.catch(8),!e.t0.toString().includes("Invalid typed array length")){e.next=20;break}throw new S("Incorrect input length. Must be a multiple of the block size.");case 20:throw new S(e.t0);case 21:case"end":return e.stop()}}),e,null,[[8,16]])}))),function(e,t){return n.apply(this,arguments)})}]),r}(rt);function zr(e,t,r){return t=s(t),o(e,Wr()?Reflect.construct(t,r||[],s(e).constructor):t.apply(e,r))}function Wr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Wr=function(){return!!e})()}const Xr=function(t){function r(){var t;return e(this,r),(t=zr(this,r)).name="GOST Key Wrap",t.module="Ciphers",t.description="A key wrapping algorithm for protecting keys in untrusted storage using one of the GOST block cipers.",t.infoURL="https://wikipedia.org/wiki/GOST_(block_cipher)",t.inputType="string",t.outputType="string",t.args=[{name:"Key",type:"toggleString",value:"",toggleValues:["Hex","UTF8","Latin1","Base64"]},{name:"User Key Material",type:"toggleString",value:"",toggleValues:["Hex","UTF8","Latin1","Base64"]},{name:"Input type",type:"option",value:["Raw","Hex"]},{name:"Output type",type:"option",value:["Hex","Raw"]},{name:"Algorithm",type:"argSelector",value:[{name:"GOST 28147 (Magma, 1989)",off:[5],on:[6]},{name:"GOST R 34.12 (Kuznyechik, 2015)",on:[5],off:[6]}]},{name:"Block length",type:"option",value:["64","128"]},{name:"sBox",type:"option",value:["E-TEST","E-A","E-B","E-C","E-D","E-SC","E-Z","D-TEST","D-A","D-SC"]},{name:"Key wrapping",type:"option",value:["NO","CP","SC"]}],t}var n;return u(r,t),i(r,[{key:"run",value:(n=h(d().mark((function e(t,r){var n,i,a,o,s,c,u,f,h,l,p,y,g,v,m,b,w;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=se(r,8),i=n[0],a=n[1],o=n[2],s=n[3],c=n[4],u=n[5],f=n[6],h=n[7],l=I(L.convertToByteArray(i.string,i.option)),p=I(L.convertToByteArray(a.string,a.option)),t="Hex"===o?t:I(L.strToArrayBuffer(t)),g=1989==(y="GOST 28147 (Magma, 1989)"===c?1989:2015)?64:parseInt(u,10),v={version:y,length:g,mode:"KW",sBox:1989===y?f:null,keyWrapping:h},e.prev=8,m=Nr.CryptoGost.coding.Hex,v.ukm=m.decode(p),b=Nr.GostEngine.getGostCipher(v),w=m.encode(b.wrapKey(m.decode(l),m.decode(t))),e.abrupt("return","Hex"===s?w:L.byteArrayToChars(k(w)));case 16:if(e.prev=16,e.t0=e.catch(8),!e.t0.toString().includes("Invalid typed array length")){e.next=20;break}throw new S("Incorrect input length. Must be a multiple of the block size.");case 20:throw new S(e.t0);case 21:case"end":return e.stop()}}),e,null,[[8,16]])}))),function(e,t){return n.apply(this,arguments)})}]),r}(rt);function Yr(e,t,r){return t=s(t),o(e,Qr()?Reflect.construct(t,r||[],s(e).constructor):t.apply(e,r))}function Qr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Qr=function(){return!!e})()}const Zr=function(t){function r(){var t;return e(this,r),(t=Yr(this,r)).name="GOST Sign",t.module="Ciphers",t.description="Sign a plaintext message using one of the GOST block ciphers.",t.infoURL="https://wikipedia.org/wiki/GOST_(block_cipher)",t.inputType="string",t.outputType="string",t.args=[{name:"Key",type:"toggleString",value:"",toggleValues:["Hex","UTF8","Latin1","Base64"]},{name:"IV",type:"toggleString",value:"",toggleValues:["Hex","UTF8","Latin1","Base64"]},{name:"Input type",type:"option",value:["Raw","Hex"]},{name:"Output type",type:"option",value:["Hex","Raw"]},{name:"Algorithm",type:"argSelector",value:[{name:"GOST 28147 (Magma, 1989)",off:[5],on:[6]},{name:"GOST R 34.12 (Kuznyechik, 2015)",on:[5],off:[6]}]},{name:"Block length",type:"option",value:["64","128"]},{name:"sBox",type:"option",value:["E-TEST","E-A","E-B","E-C","E-D","E-SC","E-Z","D-TEST","D-A","D-SC"]},{name:"MAC length",type:"number",value:32,min:8,max:64,step:8}],t}var n;return u(r,t),i(r,[{key:"run",value:(n=h(d().mark((function e(t,r){var n,i,a,o,s,c,u,f,h,l,p,y,g,v,m,b,w;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=se(r,8),i=n[0],a=n[1],o=n[2],s=n[3],c=n[4],u=n[5],f=n[6],h=n[7],l=I(L.convertToByteArray(i.string,i.option)),p=I(L.convertToByteArray(a.string,a.option)),t="Hex"===o?t:I(L.strToArrayBuffer(t)),g=1989==(y="GOST 28147 (Magma, 1989)"===c?1989:2015)?64:parseInt(u,10),v={version:y,length:g,mode:"MAC",sBox:1989===y?f:null,macLength:h},e.prev=8,m=Nr.CryptoGost.coding.Hex,p&&(v.iv=m.decode(p)),b=Nr.GostEngine.getGostCipher(v),w=m.encode(b.sign(m.decode(l),m.decode(t))),e.abrupt("return","Hex"===s?w:L.byteArrayToChars(k(w)));case 16:throw e.prev=16,e.t0=e.catch(8),new S(e.t0);case 19:case"end":return e.stop()}}),e,null,[[8,16]])}))),function(e,t){return n.apply(this,arguments)})}]),r}(rt);function Jr(e,t,r){return t=s(t),o(e,$r()?Reflect.construct(t,r||[],s(e).constructor):t.apply(e,r))}function $r(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return($r=function(){return!!e})()}const en=function(t){function r(){var t;return e(this,r),(t=Jr(this,r)).name="GOST Verify",t.module="Ciphers",t.description="Verify the signature of a plaintext message using one of the GOST block ciphers. Enter the signature in the MAC field.",t.infoURL="https://wikipedia.org/wiki/GOST_(block_cipher)",t.inputType="string",t.outputType="string",t.args=[{name:"Key",type:"toggleString",value:"",toggleValues:["Hex","UTF8","Latin1","Base64"]},{name:"IV",type:"toggleString",value:"",toggleValues:["Hex","UTF8","Latin1","Base64"]},{name:"MAC",type:"toggleString",value:"",toggleValues:["Hex","UTF8","Latin1","Base64"]},{name:"Input type",type:"option",value:["Raw","Hex"]},{name:"Algorithm",type:"argSelector",value:[{name:"GOST 28147 (Magma, 1989)",off:[5],on:[6]},{name:"GOST R 34.12 (Kuznyechik, 2015)",on:[5],off:[6]}]},{name:"Block length",type:"option",value:["64","128"]},{name:"sBox",type:"option",value:["E-TEST","E-A","E-B","E-C","E-D","E-SC","E-Z","D-TEST","D-A","D-SC"]}],t}var n;return u(r,t),i(r,[{key:"run",value:(n=h(d().mark((function e(t,r){var n,i,a,o,s,c,u,f,h,l,p,y,g,v,m,b,w;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=se(r,7),i=n[0],a=n[1],o=n[2],s=n[3],c=n[4],u=n[5],f=n[6],h=I(L.convertToByteArray(i.string,i.option)),l=I(L.convertToByteArray(a.string,a.option)),p=I(L.convertToByteArray(o.string,o.option)),t="Hex"===s?t:I(L.strToArrayBuffer(t)),g=1989==(y="GOST 28147 (Magma, 1989)"===c?1989:2015)?64:parseInt(u,10),v={version:y,length:g,mode:"MAC",sBox:1989===y?f:null,macLength:4*p.length},e.prev=9,m=Nr.CryptoGost.coding.Hex,l&&(v.iv=m.decode(l)),b=Nr.GostEngine.getGostCipher(v),w=b.verify(m.decode(h),m.decode(p),m.decode(t)),e.abrupt("return",w?"The signature matches":"The signature does not match");case 17:throw e.prev=17,e.t0=e.catch(9),new S(e.t0);case 20:case"end":return e.stop()}}),e,null,[[9,17]])}))),function(e,t){return n.apply(this,arguments)})}]),r}(rt);function tn(e,t,r){return t=s(t),o(e,rn()?Reflect.construct(t,r||[],s(e).constructor):t.apply(e,r))}function rn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(rn=function(){return!!e})()}const nn=function(t){function r(){var t;return e(this,r),(t=tn(this,r)).name="Generate RSA Key Pair",t.module="Ciphers",t.description="Generate an RSA key pair with a given number of bits.<br><br>WARNING: Cryptographic operations in CyberChef should not be relied upon to provide security in any situation. No guarantee is offered for their correctness. We advise you not to use keys generated from CyberChef in operational contexts.",t.infoURL="https://wikipedia.org/wiki/RSA_(cryptosystem)",t.inputType="string",t.outputType="string",t.args=[{name:"RSA Key Length",type:"option",value:["1024","2048","4096"]},{name:"Output Format",type:"option",value:["PEM","JSON","DER"]}],t}var n;return u(r,t),i(r,[{key:"run",value:(n=h(d().mark((function e(t,r){var n,i,a;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=se(r,2),i=n[0],a=n[1],e.abrupt("return",new Promise((function(e,t){dt().pki.rsa.generateKeyPair({bits:Number(i),workers:-1,workerScript:"assets/forge/prime.worker.min.js"},(function(r,n){if(r)return t(r);var i;switch(a){case"PEM":i=dt().pki.publicKeyToPem(n.publicKey)+"\n"+dt().pki.privateKeyToPem(n.privateKey);break;case"JSON":i=JSON.stringify(n);break;case"DER":i=dt().asn1.toDer(dt().pki.privateKeyToAsn1(n.privateKey)).getBytes()}e(i)}))})));case 2:case"end":return e.stop()}}),e)}))),function(e,t){return n.apply(this,arguments)})}]),r}(rt);function an(e,t,r){return t=s(t),o(e,on()?Reflect.construct(t,r||[],s(e).constructor):t.apply(e,r))}function on(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(on=function(){return!!e})()}var sn=function(t){function r(){var t;return e(this,r),(t=an(this,r)).name="Pseudo-Random Number Generator",t.module="Ciphers",t.description="A cryptographically-secure pseudo-random number generator (PRNG).<br><br>This operation uses the browser's built-in <code>crypto.getRandomValues()</code> method if available. If this cannot be found, it falls back to a Fortuna-based PRNG algorithm.",t.infoURL="https://wikipedia.org/wiki/Pseudorandom_number_generator",t.inputType="string",t.outputType="string",t.args=[{name:"Number of bytes",type:"number",value:32},{name:"Output as",type:"option",value:["Hex","Integer","Byte array","Raw"]}],t}return u(r,t),i(r,[{key:"run",value:function(e,t){var r,n=se(t,2),i=n[0],a=n[1];if(N()&&self.crypto){r=new ArrayBuffer(i);for(var o=0;o<i;o+=65536)self.crypto.getRandomValues(new Uint8Array(r,o,Math.min(i-o,65536)));r=L.arrayBufferToStr(r)}else r=dt().random.getBytesSync(i);var s,c=new oe(0);switch(a){case"Hex":return dt().util.bytesToHex(r);case"Integer":for(s=r.length-1;s>=0;s--)c=c.times(256).plus(r.charCodeAt(s));return c.toFixed();case"Byte array":return JSON.stringify(L.strToCharcode(r));default:return r}}}]),r}(rt);const cn=sn;function un(e,t,r){return t=s(t),o(e,fn()?Reflect.construct(t,r||[],s(e).constructor):t.apply(e,r))}function fn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(fn=function(){return!!e})()}const hn=function(t){function r(){var t;return e(this,r),(t=un(this,r)).name="RC2 Decrypt",t.module="Ciphers",t.description="RC2 (also known as ARC2) is a symmetric-key block cipher designed by Ron Rivest in 1987. 'RC' stands for 'Rivest Cipher'.<br><br><b>Key:</b> RC2 uses a variable size key.<br><br><b>IV:</b> To run the cipher in CBC mode, the Initialization Vector should be 8 bytes long. If the IV is left blank, the cipher will run in ECB mode.<br><br><b>Padding:</b> In both CBC and ECB mode, PKCS#7 padding will be used.",t.infoURL="https://wikipedia.org/wiki/RC2",t.inputType="string",t.outputType="string",t.args=[{name:"Key",type:"toggleString",value:"",toggleValues:["Hex","UTF8","Latin1","Base64"]},{name:"IV",type:"toggleString",value:"",toggleValues:["Hex","UTF8","Latin1","Base64"]},{name:"Input",type:"option",value:["Hex","Raw"]},{name:"Output",type:"option",value:["Raw","Hex"]}],t}return u(r,t),i(r,[{key:"run",value:function(e,t){var r=L.convertToByteString(t[0].string,t[0].option),n=L.convertToByteString(t[1].string,t[1].option),i=se(t,4),a=i[2],o=i[3],s=dt().rc2.createDecryptionCipher(r);return e=L.convertToByteString(e,a),s.start(n||null),s.update(dt().util.createBuffer(e)),s.finish(),"Hex"===o?s.output.toHex():s.output.getBytes()}}]),r}(rt);function ln(e,t,r){return t=s(t),o(e,dn()?Reflect.construct(t,r||[],s(e).constructor):t.apply(e,r))}function dn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(dn=function(){return!!e})()}const pn=function(t){function r(){var t;return e(this,r),(t=ln(this,r)).name="RC2 Encrypt",t.module="Ciphers",t.description="RC2 (also known as ARC2) is a symmetric-key block cipher designed by Ron Rivest in 1987. 'RC' stands for 'Rivest Cipher'.<br><br><b>Key:</b> RC2 uses a variable size key.<br><br>You can generate a password-based key using one of the KDF operations.<br><br><b>IV:</b> To run the cipher in CBC mode, the Initialization Vector should be 8 bytes long. If the IV is left blank, the cipher will run in ECB mode.<br><br><b>Padding:</b> In both CBC and ECB mode, PKCS#7 padding will be used.",t.infoURL="https://wikipedia.org/wiki/RC2",t.inputType="string",t.outputType="string",t.args=[{name:"Key",type:"toggleString",value:"",toggleValues:["Hex","UTF8","Latin1","Base64"]},{name:"IV",type:"toggleString",value:"",toggleValues:["Hex","UTF8","Latin1","Base64"]},{name:"Input",type:"option",value:["Raw","Hex"]},{name:"Output",type:"option",value:["Hex","Raw"]}],t}return u(r,t),i(r,[{key:"run",value:function(e,t){var r=L.convertToByteString(t[0].string,t[0].option),n=L.convertToByteString(t[1].string,t[1].option),i=se(t,4),a=i[2],o=i[3],s=dt().rc2.createEncryptionCipher(r);return e=L.convertToByteString(e,a),s.start(n||null),s.update(dt().util.createBuffer(e)),s.finish(),"Hex"===o?s.output.toHex():s.output.getBytes()}}]),r}(rt);function yn(e,t,r){return t=s(t),o(e,gn()?Reflect.construct(t,r||[],s(e).constructor):t.apply(e,r))}function gn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(gn=function(){return!!e})()}const vn=function(t){function r(){var t;return e(this,r),(t=yn(this,r)).name="RC4",t.module="Ciphers",t.description="RC4 (also known as ARC4) is a widely-used stream cipher designed by Ron Rivest. It is used in popular protocols such as SSL and WEP. Although remarkable for its simplicity and speed, the algorithm's history doesn't inspire confidence in its security.",t.infoURL="https://wikipedia.org/wiki/RC4",t.inputType="string",t.outputType="string",t.args=[{name:"Passphrase",type:"toggleString",value:"",toggleValues:["UTF8","UTF16","UTF16LE","UTF16BE","Latin1","Hex","Base64"]},{name:"Input format",type:"option",value:["Latin1","UTF8","UTF16","UTF16LE","UTF16BE","Hex","Base64"]},{name:"Output format",type:"option",value:["Latin1","UTF8","UTF16","UTF16LE","UTF16BE","Hex","Base64"]}],t}return u(r,t),i(r,[{key:"run",value:function(e,t){var r=Nt[t[1]].parse(e),n=Nt[t[0].option].parse(t[0].string);return Dt().RC4.encrypt(r,n).ciphertext.toString(Nt[t[2]])}},{key:"highlight",value:function(e,t){return e}},{key:"highlightReverse",value:function(e,t){return e}}]),r}(rt);function mn(e,t,r){return t=s(t),o(e,bn()?Reflect.construct(t,r||[],s(e).constructor):t.apply(e,r))}function bn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(bn=function(){return!!e})()}const wn=function(t){function r(){var t;return e(this,r),(t=mn(this,r)).name="RC4 Drop",t.module="Ciphers",t.description="It was discovered that the first few bytes of the RC4 keystream are strongly non-random and leak information about the key. We can defend against this attack by discarding the initial portion of the keystream. This modified algorithm is traditionally called RC4-drop.",t.infoURL="https://wikipedia.org/wiki/RC4#Fluhrer,_Mantin_and_Shamir_attack",t.inputType="string",t.outputType="string",t.args=[{name:"Passphrase",type:"toggleString",value:"",toggleValues:["UTF8","UTF16","UTF16LE","UTF16BE","Latin1","Hex","Base64"]},{name:"Input format",type:"option",value:["Latin1","UTF8","UTF16","UTF16LE","UTF16BE","Hex","Base64"]},{name:"Output format",type:"option",value:["Latin1","UTF8","UTF16","UTF16LE","UTF16BE","Hex","Base64"]},{name:"Number of dwords to drop",type:"number",value:192}],t}return u(r,t),i(r,[{key:"run",value:function(e,t){var r=Nt[t[1]].parse(e),n=Nt[t[0].option].parse(t[0].string),i=t[3];return Dt().RC4Drop.encrypt(r,n,{drop:i}).ciphertext.toString(Nt[t[2]])}},{key:"highlight",value:function(e,t){return e}},{key:"highlightReverse",value:function(e,t){return e}}]),r}(rt);var Cn={"SHA-1":dt().md.sha1,MD5:dt().md.md5,"SHA-256":dt().md.sha256,"SHA-384":dt().md.sha384,"SHA-512":dt().md.sha512};function En(e,t,r){return t=s(t),o(e,Sn()?Reflect.construct(t,r||[],s(e).constructor):t.apply(e,r))}function Sn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Sn=function(){return!!e})()}const An=function(t){function r(){var t;return e(this,r),(t=En(this,r)).name="RSA Decrypt",t.module="Ciphers",t.description="Decrypt an RSA encrypted message with a PEM encoded private key.",t.infoURL="https://wikipedia.org/wiki/RSA_(cryptosystem)",t.inputType="string",t.outputType="string",t.args=[{name:"RSA Private Key (PEM)",type:"text",value:"-----BEGIN RSA PRIVATE KEY-----"},{name:"Key Password",type:"text",value:""},{name:"Encryption Scheme",type:"argSelector",value:[{name:"RSA-OAEP",on:[3]},{name:"RSAES-PKCS1-V1_5",off:[3]},{name:"RAW",off:[3]}]},{name:"Message Digest Algorithm",type:"option",value:Object.keys(Cn)}],t}return u(r,t),i(r,[{key:"run",value:function(e,t){var r=se(t,4),n=r[0],i=r[1],a=r[2],o=r[3];if(0===n.replace("-----BEGIN RSA PRIVATE KEY-----","").length)throw new S("Please enter a private key.");try{var s=dt().pki.decryptRsaPrivateKey(n,i).decrypt(e,a,{md:Cn[o].create()});return dt().util.decodeUtf8(s)}catch(e){throw new S(e)}}}]),r}(rt);function Bn(e,t,r){return t=s(t),o(e,Tn()?Reflect.construct(t,r||[],s(e).constructor):t.apply(e,r))}function Tn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Tn=function(){return!!e})()}const In=function(t){function r(){var t;return e(this,r),(t=Bn(this,r)).name="RSA Encrypt",t.module="Ciphers",t.description="Encrypt a message with a PEM encoded RSA public key.",t.infoURL="https://wikipedia.org/wiki/RSA_(cryptosystem)",t.inputType="string",t.outputType="string",t.args=[{name:"RSA Public Key (PEM)",type:"text",value:"-----BEGIN RSA PUBLIC KEY-----"},{name:"Encryption Scheme",type:"argSelector",value:[{name:"RSA-OAEP",on:[2]},{name:"RSAES-PKCS1-V1_5",off:[2]},{name:"RAW",off:[2]}]},{name:"Message Digest Algorithm",type:"option",value:Object.keys(Cn)}],t}return u(r,t),i(r,[{key:"run",value:function(e,t){var r=se(t,3),n=r[0],i=r[1],a=r[2];if(0===n.replace("-----BEGIN RSA PUBLIC KEY-----","").length)throw new S("Please enter a public key.");try{var o=dt().pki.publicKeyFromPem(n),s=dt().util.encodeUtf8(e);return o.encrypt(s,i,{md:Cn[a].create()})}catch(e){if("RSAES-OAEP input message length is too long."===e.message)throw new S(`RSAES-OAEP input message length (${e.length}) is longer than the maximum allowed length (${e.maxLength}).`);throw new S(e)}}}]),r}(rt);function kn(e,t,r){return t=s(t),o(e,_n()?Reflect.construct(t,r||[],s(e).constructor):t.apply(e,r))}function _n(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(_n=function(){return!!e})()}const Rn=function(t){function r(){var t;return e(this,r),(t=kn(this,r)).name="RSA Sign",t.module="Ciphers",t.description="Sign a plaintext message with a PEM encoded RSA key.",t.infoURL="https://wikipedia.org/wiki/RSA_(cryptosystem)",t.inputType="string",t.outputType="string",t.args=[{name:"RSA Private Key (PEM)",type:"text",value:"-----BEGIN RSA PRIVATE KEY-----"},{name:"Key Password",type:"text",value:""},{name:"Message Digest Algorithm",type:"option",value:Object.keys(Cn)}],t}return u(r,t),i(r,[{key:"run",value:function(e,t){var r=se(t,3),n=r[0],i=r[1],a=r[2];if(0===n.replace("-----BEGIN RSA PRIVATE KEY-----","").length)throw new S("Please enter a private key.");try{var o=dt().pki.decryptRsaPrivateKey(n,i),s=Cn[a].create();return s.update(e,"utf8"),o.sign(s)}catch(e){throw new S(e)}}}]),r}(rt);function xn(e,t,r){return t=s(t),o(e,Fn()?Reflect.construct(t,r||[],s(e).constructor):t.apply(e,r))}function Fn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Fn=function(){return!!e})()}const Dn=function(t){function r(){var t;return e(this,r),(t=xn(this,r)).name="RSA Verify",t.module="Ciphers",t.description="Verify a message against a signature and a public PEM encoded RSA key.",t.infoURL="https://wikipedia.org/wiki/RSA_(cryptosystem)",t.inputType="string",t.outputType="string",t.args=[{name:"RSA Public Key (PEM)",type:"text",value:"-----BEGIN RSA PUBLIC KEY-----"},{name:"Message",type:"text",value:""},{name:"Message Digest Algorithm",type:"option",value:Object.keys(Cn)}],t}return u(r,t),i(r,[{key:"run",value:function(e,t){var r=se(t,3),n=r[0],i=r[1],a=r[2];if(0===n.replace("-----BEGIN RSA PUBLIC KEY-----","").length)throw new S("Please enter a public key.");try{var o=dt().pki.publicKeyFromPem(n),s=Cn[a].create();return s.update(i,"utf8"),o.verify(s.digest().bytes(),e)?"Verified OK":"Verification Failure"}catch(e){if("Encrypted message length is invalid."===e.message)throw new S(`Signature length (${e.length}) does not match expected length based on key (${e.expected}).`);throw new S(e)}}}]),r}(rt);function Pn(e,t,r){return t=s(t),o(e,Un()?Reflect.construct(t,r||[],s(e).constructor):t.apply(e,r))}function Un(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Un=function(){return!!e})()}var Nn=function(t){function r(){var t;return e(this,r),(t=Pn(this,r)).name="Rabbit",t.module="Ciphers",t.description="Rabbit is a high-speed stream cipher introduced in 2003 and defined in RFC 4503.<br><br>The cipher uses a 128-bit key and an optional 64-bit initialization vector (IV).<br><br>big-endian: based on RFC4503 and RFC3447<br>little-endian: compatible with Crypto++",t.infoURL="https://wikipedia.org/wiki/Rabbit_(cipher)",t.inputType="string",t.outputType="string",t.args=[{name:"Key",type:"toggleString",value:"",toggleValues:["Hex","UTF8","Latin1","Base64"]},{name:"IV",type:"toggleString",value:"",toggleValues:["Hex","UTF8","Latin1","Base64"]},{name:"Endianness",type:"option",value:["Big","Little"]},{name:"Input",type:"option",value:["Raw","Hex"]},{name:"Output",type:"option",value:["Raw","Hex"]}],t}return u(r,t),i(r,[{key:"run",value:function(e,t){var r=L.convertToByteArray(t[0].string,t[0].option),n=L.convertToByteArray(t[1].string,t[1].option),i=t[2],a=t[3],o=t[4],s="Little"===i;if(16!==r.length)throw new S(`Invalid key length: ${r.length} bytes (expected: 16)`);if(0!==n.length&&8!==n.length)throw new S(`Invalid IV length: ${n.length} bytes (expected: 0 or 8)`);var c=new Uint32Array(8),u=new Uint32Array(8),f=0,h=[1295307597,3545052371,886263092,1295307597,3545052371,886263092,1295307597,3545052371],l=function(){for(var e=0;e<8;e++){var t=u[e]+h[e]+f;f=t/(4*(1<<30))>>>0,u[e]=t}},d=function(e,t){return e<<t|e>>>32-t},p=function(e,t,r){return e+d(t,16)+d(r,16)},y=function(e,t,r){return e+d(t,8)+r},g=new Uint32Array(8),v=function(){for(var e=0;e<8;e++)g[e]=(void 0,void 0,void 0,void 0,void 0,(a=(n=65535&(t=c[e]+u[e]>>>0))*n+65536*(65535&(i=2*(r=t>>>16)*n)))>>>0^r*r+(i/65536>>>0)+(a/(4*(1<<30))>>>0));var t,r,n,i,a;c[0]=p(g[0],g[7],g[6]),c[1]=y(g[1],g[0],g[7]),c[2]=p(g[2],g[1],g[0]),c[3]=y(g[3],g[2],g[1]),c[4]=p(g[4],g[3],g[2]),c[5]=y(g[5],g[4],g[3]),c[6]=p(g[6],g[5],g[4]),c[7]=y(g[7],g[6],g[5])},m=new Uint16Array(8);if(s)for(var b=0;b<8;b++)m[b]=r[1+2*b]<<8|r[2*b];else for(var w=0;w<8;w++)m[w]=r[14-2*w]<<8|r[15-2*w];for(var C=0;C<8;C++)C%2==0?(c[C]=m[(C+1)%8]<<16|m[C],u[C]=m[(C+4)%8]<<16|m[(C+5)%8]):(c[C]=m[(C+5)%8]<<16|m[(C+4)%8],u[C]=m[C]<<16|m[(C+1)%8]);for(var E=0;E<4;E++)l(),v();for(var A=0;A<8;A++)u[A]=u[A]^c[(A+4)%8];if(8===n.length){var B=function(e,t,r,i){return s?n[e]<<24|n[t]<<16|n[r]<<8|n[i]:n[7-e]<<24|n[7-t]<<16|n[7-r]<<8|n[7-i]};u[0]=u[0]^B(3,2,1,0),u[1]=u[1]^B(7,6,3,2),u[2]=u[2]^B(7,6,5,4),u[3]=u[3]^B(5,4,1,0),u[4]=u[4]^B(3,2,1,0),u[5]=u[5]^B(7,6,3,2),u[6]=u[6]^B(7,6,5,4),u[7]=u[7]^B(5,4,1,0);for(var T=0;T<4;T++)l(),v()}for(var k=new Uint8Array(16),_=function(){var e=0,t=function(t){k[e++]=t>>>8,k[e++]=255&t};if(l(),v(),t(c[6]>>>16^65535&c[1]),t(65535&c[6]^c[3]>>>16),t(c[4]>>>16^65535&c[7]),t(65535&c[4]^c[1]>>>16),t(c[2]>>>16^65535&c[5]),t(65535&c[2]^c[7]>>>16),t(c[0]>>>16^65535&c[3]),t(65535&c[0]^c[5]>>>16),s)for(var r=0,n=k.length-1;r<n;){var i=k[r];k[r]=k[n],k[n]=i,r++,n--}},R=L.convertToByteString(e,a),x=new Uint8Array(R.length),F=0;F<=R.length-16;F+=16){_();for(var D=0;D<16;D++)x[F+D]=R.charCodeAt(F+D)^k[D]}if(R.length%16!=0){var P=R.length-R.length%16,U=R.length-P;if(_(),s)for(var N=0;N<U;N++)x[P+N]=R.charCodeAt(P+N)^k[N];else for(var M=0;M<U;M++)x[P+M]=R.charCodeAt(P+M)^k[16-U+M]}return"Hex"===o?I(x):L.byteArrayToChars(x)}}]),r}(rt);const Ln=Nn;function Mn(e,t,r){return t=s(t),o(e,On()?Reflect.construct(t,r||[],s(e).constructor):t.apply(e,r))}function On(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(On=function(){return!!e})()}const Kn=function(t){function r(){var t;return e(this,r),(t=Mn(this,r)).name="Rail Fence Cipher Decode",t.module="Ciphers",t.description="Decodes Strings that were created using the Rail fence Cipher provided a key and an offset",t.infoURL="https://wikipedia.org/wiki/Rail_fence_cipher",t.inputType="string",t.outputType="string",t.args=[{name:"Key",type:"number",value:2},{name:"Offset",type:"number",value:0}],t}return u(r,t),i(r,[{key:"run",value:function(e,t){var r=se(t,2),n=r[0],i=r[1],a=e;if(n<2)throw new S("Key has to be bigger than 2");if(n>a.length)throw new S("Key should be smaller than the cipher's length");if(i<0)throw new S("Offset has to be a positive integer");var o,s,c=2*(n-1),u=new Array(a.length),f=0;for(s=0;s<n;s++)for(o=0;o<a.length;o++)(s+o+i)%c!=0&&(s-o-i)%c!=0||(u[o]=a[f++]);return u.join("").trim()}}]),r}(rt);function Gn(e,t,r){return t=s(t),o(e,jn()?Reflect.construct(t,r||[],s(e).constructor):t.apply(e,r))}function jn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(jn=function(){return!!e})()}const Vn=function(t){function r(){var t;return e(this,r),(t=Gn(this,r)).name="Rail Fence Cipher Encode",t.module="Ciphers",t.description="Encodes Strings using the Rail fence Cipher provided a key and an offset",t.infoURL="https://wikipedia.org/wiki/Rail_fence_cipher",t.inputType="string",t.outputType="string",t.args=[{name:"Key",type:"number",value:2},{name:"Offset",type:"number",value:0}],t}return u(r,t),i(r,[{key:"run",value:function(e,t){var r=se(t,2),n=r[0],i=r[1],a=e;if(n<2)throw new S("Key has to be bigger than 2");if(n>a.length)throw new S("Key should be smaller than the plain text's length");if(i<0)throw new S("Offset has to be a positive integer");for(var o=2*(n-1),s=new Array(n).fill(""),c=0;c<a.length;c++)s[n-1-Math.abs(o/2-(c+i)%o)]+=a[c];return s.join("").trim()}}]),r}(rt);var Hn=16,qn=[214,144,233,254,204,225,61,183,22,182,20,194,40,251,44,5,43,103,154,118,42,190,4,195,170,68,19,38,73,134,6,153,156,66,80,244,145,239,152,122,51,84,11,67,237,207,172,98,228,179,28,169,201,8,232,149,128,223,148,250,117,143,63,166,71,7,167,252,243,115,23,186,131,89,60,25,230,133,79,168,104,107,129,178,113,100,218,139,248,235,15,75,112,86,157,53,30,36,14,94,99,88,209,162,37,34,124,59,1,33,120,135,212,0,70,87,159,211,39,82,76,54,2,231,160,196,200,158,234,191,138,210,64,199,56,181,163,247,242,206,249,97,21,161,224,174,93,164,155,52,26,85,173,147,50,48,245,140,177,227,29,246,226,46,130,102,202,96,192,41,35,171,13,83,78,111,213,219,55,69,222,253,142,47,3,255,106,114,109,108,91,81,141,27,175,146,187,221,188,127,17,217,92,65,31,16,90,216,10,193,49,136,165,205,123,189,45,116,208,18,184,229,180,176,137,105,151,74,12,150,119,126,101,185,241,9,197,110,198,132,24,240,125,236,58,220,77,32,121,238,95,62,215,203,57,72],zn=[462357,472066609,943670861,1415275113,1886879365,2358483617,2830087869,3301692121,3773296373,4228057617,404694573,876298825,1347903077,1819507329,2291111581,2762715833,3234320085,3705924337,4177462797,337322537,808926789,1280531041,1752135293,2223739545,2695343797,3166948049,3638552301,4110090761,269950501,741554753,1213159005,1684763257],Wn=[2746333894,1453994832,1736282519,2993693404];function Xn(e,t){return e<<t|e>>>32-t}function Yn(e){for(var t,r=e.map((function(e,t){return e^Wn[t]})),n=[],i=0;i<32;i++)n[i]=r[i+4]=r[i]^(t=r[i+1]^r[i+2]^r[i+3]^zn[i],(t=qn[t>>>24&255]<<24|qn[t>>>16&255]<<16|qn[t>>>8&255]<<8|qn[255&t])^Xn(t,13)^Xn(t,23));return n}function Qn(e,t){for(var r=0;r<32;r++)e[r+4]=e[r]^(n=e[r+1]^e[r+2]^e[r+3]^t[r],(n=qn[n>>>24&255]<<24|qn[n>>>16&255]<<16|qn[n>>>8&255]<<8|qn[255&n])^Xn(n,2)^Xn(n,10)^Xn(n,18)^Xn(n,24));var n;return[e[35],e[34],e[33],e[32]]}function Zn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return[e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3],e[t+=4]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3],e[t+=4]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3],e[t+=4]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]]}function Jn(e){for(var t=[],r=0;r<e.length;r++)t.push(e[r]>>24&255),t.push(e[r]>>16&255),t.push(e[r]>>8&255),t.push(255&e[r]);return t}function $n(e,t,r){return t=s(t),o(e,ei()?Reflect.construct(t,r||[],s(e).constructor):t.apply(e,r))}function ei(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(ei=function(){return!!e})()}var ti=function(t){function r(){var t;return e(this,r),(t=$n(this,r)).name="SM4 Decrypt",t.module="Ciphers",t.description="SM4 is a 128-bit block cipher, currently established as a national standard (GB/T 32907-2016) of China.",t.infoURL="https://wikipedia.org/wiki/SM4_(cipher)",t.inputType="string",t.outputType="string",t.args=[{name:"Key",type:"toggleString",value:"",toggleValues:["Hex","UTF8","Latin1","Base64"]},{name:"IV",type:"toggleString",value:"",toggleValues:["Hex","UTF8","Latin1","Base64"]},{name:"Mode",type:"option",value:["CBC","CFB","OFB","CTR","ECB","CBC/NoPadding","ECB/NoPadding"]},{name:"Input",type:"option",value:["Raw","Hex"]},{name:"Output",type:"option",value:["Hex","Raw"]}],t}return u(r,t),i(r,[{key:"run",value:function(e,t){var r=L.convertToByteArray(t[0].string,t[0].option),n=L.convertToByteArray(t[1].string,t[1].option),i=se(t,5),a=i[2],o=i[3],s=i[4];if(16!==r.length)throw new S(`Invalid key length: ${r.length} bytes\n\nSM4 uses a key length of 16 bytes (128 bits).`);if(16!==n.length&&!a.startsWith("ECB"))throw new S(`Invalid IV length: ${n.length} bytes\n\nSM4 uses an IV length of 16 bytes (128 bits).\nMake sure you have specified the type correctly (e.g. Hex vs UTF8).`);var c=function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"ECB",i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],a=e.length;if(0===a)return[];var o=Yn(Zn(t,0));if("ECB"===n||"CBC"===n){if(o=o.reverse(),0!=(15&a)&&!i)throw new S(`With ECB or CBC modes, the input must be divisible into 16 byte blocks. (${15&e.length} bytes extra)`)}else for(;0!=(15&e.length);)e.push(0);var s=[];switch(n){case"ECB":for(var c=0;c<e.length;c+=Hn)Array.prototype.push.apply(s,Jn(Qn(Zn(e,c),o)));break;case"CBC":r=Zn(r,0);for(var u=0;u<e.length;u+=Hn){var f=Qn(Zn(e,u),o);f[0]^=r[0],f[1]^=r[1],f[2]^=r[2],f[3]^=r[3],Array.prototype.push.apply(s,Jn(f)),r=Zn(e,u)}break;case"CFB":r=Zn(r,0);for(var h=0;h<e.length;h+=Hn){r=Qn(r,o);var l=Zn(e,h);l[0]^=r[0],l[1]^=r[1],l[2]^=r[2],l[3]^=r[3],Array.prototype.push.apply(s,Jn(l)),r=Zn(e,h)}break;case"OFB":r=Zn(r,0);for(var d=0;d<e.length;d+=Hn){r=Qn(r,o);var p=Zn(e,d);p[0]^=r[0],p[1]^=r[1],p[2]^=r[2],p[3]^=r[3],Array.prototype.push.apply(s,Jn(p))}break;case"CTR":r=Zn(r,0);for(var y=0;y<e.length;y+=Hn){var v=g(r);v[3]+=y>>4,v=Qn(v,o);var m=Zn(e,y);m[0]^=v[0],m[1]^=v[1],m[2]^=v[2],m[3]^=v[3],Array.prototype.push.apply(s,Jn(m))}break;default:throw new S(`Invalid block cipher mode: ${n}`)}if("ECB"===n||"CBC"===n){if(i)return s;var b=s[s.length-1];if(b>16)throw new S("Invalid PKCS#7 padding.");for(var w=0;w<b;w++)if(s[s.length-w-1]!==b)throw new S("Invalid PKCS#7 padding.");return s.slice(0,s.length-b)}return s.slice(0,a)}(e=L.convertToByteArray(e,o),r,n,a.substring(0,3),a.endsWith("NoPadding"));return"Hex"===s?T(c):L.byteArrayToUtf8(c)}}]),r}(rt);const ri=ti;function ni(e,t,r){return t=s(t),o(e,ii()?Reflect.construct(t,r||[],s(e).constructor):t.apply(e,r))}function ii(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(ii=function(){return!!e})()}var ai=function(t){function r(){var t;return e(this,r),(t=ni(this,r)).name="SM4 Encrypt",t.module="Ciphers",t.description="SM4 is a 128-bit block cipher, currently established as a national standard (GB/T 32907-2016) of China. Multiple block cipher modes are supported. When using CBC or ECB mode, the PKCS#7 padding scheme is used.",t.infoURL="https://wikipedia.org/wiki/SM4_(cipher)",t.inputType="string",t.outputType="string",t.args=[{name:"Key",type:"toggleString",value:"",toggleValues:["Hex","UTF8","Latin1","Base64"]},{name:"IV",type:"toggleString",value:"",toggleValues:["Hex","UTF8","Latin1","Base64"]},{name:"Mode",type:"option",value:["CBC","CFB","OFB","CTR","ECB"]},{name:"Input",type:"option",value:["Raw","Hex"]},{name:"Output",type:"option",value:["Hex","Raw"]}],t}return u(r,t),i(r,[{key:"run",value:function(e,t){var r=L.convertToByteArray(t[0].string,t[0].option),n=L.convertToByteArray(t[1].string,t[1].option),i=se(t,5),a=i[2],o=i[3],s=i[4];if(16!==r.length)throw new S(`Invalid key length: ${r.length} bytes\n\nSM4 uses a key length of 16 bytes (128 bits).`);if(16!==n.length&&!a.startsWith("ECB"))throw new S(`Invalid IV length: ${n.length} bytes\n\nSM4 uses an IV length of 16 bytes (128 bits).\nMake sure you have specified the type correctly (e.g. Hex vs UTF8).`);var c=function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"ECB",i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],a=e.length;if(0===a)return[];var o=Yn(Zn(t,0)),s=0,c=16-(15&e.length);if("ECB"===n||"CBC"===n)if(i){if(16!==c)throw new S(`No padding requested in ${n} mode but input is not a 16-byte multiple.`);c=0}else s=c;for(var u=0;u<c;u++)e.push(s);var f=[];switch(n){case"ECB":for(var h=0;h<e.length;h+=Hn)Array.prototype.push.apply(f,Jn(Qn(Zn(e,h),o)));break;case"CBC":r=Zn(r,0);for(var l=0;l<e.length;l+=Hn){var d=Zn(e,l);d[0]^=r[0],d[1]^=r[1],d[2]^=r[2],d[3]^=r[3],r=Qn(d,o),Array.prototype.push.apply(f,Jn(r))}break;case"CFB":r=Zn(r,0);for(var p=0;p<e.length;p+=Hn){r=Qn(r,o);var y=Zn(e,p);y[0]^=r[0],y[1]^=r[1],y[2]^=r[2],y[3]^=r[3],Array.prototype.push.apply(f,Jn(y)),r=y}break;case"OFB":r=Zn(r,0);for(var v=0;v<e.length;v+=Hn){r=Qn(r,o);var m=Zn(e,v);m[0]^=r[0],m[1]^=r[1],m[2]^=r[2],m[3]^=r[3],Array.prototype.push.apply(f,Jn(m))}break;case"CTR":r=Zn(r,0);for(var b=0;b<e.length;b+=Hn){var w=g(r);w[3]+=b>>4,w=Qn(w,o);var C=Zn(e,b);C[0]^=w[0],C[1]^=w[1],C[2]^=w[2],C[3]^=w[3],Array.prototype.push.apply(f,Jn(C))}break;default:throw new S("Invalid block cipher mode: "+n)}return"ECB"!==n&&"CBC"!==n?f.slice(0,a):f}(e=L.convertToByteArray(e,o),r,n,a.substring(0,3),a.endsWith("NoPadding"));return"Hex"===s?T(c):L.byteArrayToUtf8(c)}}]),r}(rt);const oi=ai;function si(e,t,r){return t=s(t),o(e,ci()?Reflect.construct(t,r||[],s(e).constructor):t.apply(e,r))}function ci(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(ci=function(){return!!e})()}const ui=function(t){function r(){var t;return e(this,r),(t=si(this,r)).name="Triple DES Decrypt",t.module="Ciphers",t.description="Triple DES applies DES three times to each block to increase key size.<br><br><b>Key:</b> Triple DES uses a key length of 24 bytes (192 bits).<br>DES uses a key length of 8 bytes (64 bits).<br><br><b>IV:</b> The Initialization Vector should be 8 bytes long. If not entered, it will default to 8 null bytes.<br><br><b>Padding:</b> In CBC and ECB mode, PKCS#7 padding will be used as a default.",t.infoURL="https://wikipedia.org/wiki/Triple_DES",t.inputType="string",t.outputType="string",t.args=[{name:"Key",type:"toggleString",value:"",toggleValues:["Hex","UTF8","Latin1","Base64"]},{name:"IV",type:"toggleString",value:"",toggleValues:["Hex","UTF8","Latin1","Base64"]},{name:"Mode",type:"option",value:["CBC","CFB","OFB","CTR","ECB","CBC/NoPadding","ECB/NoPadding"]},{name:"Input",type:"option",value:["Hex","Raw"]},{name:"Output",type:"option",value:["Raw","Hex"]}],t}return u(r,t),i(r,[{key:"run",value:function(e,t){var r=L.convertToByteString(t[0].string,t[0].option),n=L.convertToByteArray(t[1].string,t[1].option),i=t[2].substring(0,3),a=t[2].endsWith("NoPadding"),o=t[3],s=t[4];if(24!==r.length&&16!==r.length)throw new S(`Invalid key length: ${r.length} bytes\n\nTriple DES uses a key length of 24 bytes (192 bits).\nDES uses a key length of 8 bytes (64 bits).`);if(8!==n.length&&"ECB"!==i)throw new S(`Invalid IV length: ${n.length} bytes\n\nTriple DES uses an IV length of 8 bytes (64 bits).\nMake sure you have specified the type correctly (e.g. Hex vs UTF8).`);e=L.convertToByteString(e,o);var c=dt().cipher.createDecipher("3DES-"+i,16===r.length?r+r.substring(0,8):r);if(a&&(c.mode.unpad=function(e,t){return!0}),c.start({iv:n}),c.update(dt().util.createBuffer(e)),c.finish())return"Hex"===s?c.output.toHex():c.output.getBytes();throw new S("Unable to decrypt input with these parameters.")}}]),r}(rt);function fi(e,t,r){return t=s(t),o(e,hi()?Reflect.construct(t,r||[],s(e).constructor):t.apply(e,r))}function hi(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(hi=function(){return!!e})()}const li=function(t){function r(){var t;return e(this,r),(t=fi(this,r)).name="Triple DES Encrypt",t.module="Ciphers",t.description="Triple DES applies DES three times to each block to increase key size.<br><br><b>Key:</b> Triple DES uses a key length of 24 bytes (192 bits).<br>DES uses a key length of 8 bytes (64 bits).<br><br>You can generate a password-based key using one of the KDF operations.<br><br><b>IV:</b> The Initialization Vector should be 8 bytes long. If not entered, it will default to 8 null bytes.<br><br><b>Padding:</b> In CBC and ECB mode, PKCS#7 padding will be used.",t.infoURL="https://wikipedia.org/wiki/Triple_DES",t.inputType="string",t.outputType="string",t.args=[{name:"Key",type:"toggleString",value:"",toggleValues:["Hex","UTF8","Latin1","Base64"]},{name:"IV",type:"toggleString",value:"",toggleValues:["Hex","UTF8","Latin1","Base64"]},{name:"Mode",type:"option",value:["CBC","CFB","OFB","CTR","ECB"]},{name:"Input",type:"option",value:["Raw","Hex"]},{name:"Output",type:"option",value:["Hex","Raw"]}],t}return u(r,t),i(r,[{key:"run",value:function(e,t){var r=L.convertToByteString(t[0].string,t[0].option),n=L.convertToByteArray(t[1].string,t[1].option),i=t[2],a=t[3],o=t[4];if(24!==r.length&&16!==r.length)throw new S(`Invalid key length: ${r.length} bytes\n\nTriple DES uses a key length of 24 bytes (192 bits).\nDES uses a key length of 8 bytes (64 bits).`);if(8!==n.length&&"ECB"!==i)throw new S(`Invalid IV length: ${n.length} bytes\n\nTriple DES uses an IV length of 8 bytes (64 bits).\nMake sure you have specified the type correctly (e.g. Hex vs UTF8).`);e=L.convertToByteString(e,a);var s=dt().cipher.createCipher("3DES-"+i,16===r.length?r+r.substring(0,8):r);return s.start({iv:n}),s.update(dt().util.createBuffer(e)),s.finish(),"Hex"===o?s.output.toHex():s.output.getBytes()}}]),r}(rt);function di(e,t,r){return t=s(t),o(e,pi()?Reflect.construct(t,r||[],s(e).constructor):t.apply(e,r))}function pi(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(pi=function(){return!!e})()}var yi=function(t){function r(){var t;return e(this,r),(t=di(this,r)).name="Vigenère Decode",t.module="Ciphers",t.description="The Vigenere cipher is a method of encrypting alphabetic text by using a series of different Caesar ciphers based on the letters of a keyword. It is a simple form of polyalphabetic substitution.",t.infoURL="https://wikipedia.org/wiki/Vigenère_cipher",t.inputType="string",t.outputType="string",t.args=[{name:"Key",type:"string",value:""}],t}return u(r,t),i(r,[{key:"run",value:function(e,t){var r,n,i,a="abcdefghijklmnopqrstuvwxyz",o=t[0].toLowerCase(),s="",c=0;if(!o)throw new S("No key entered");if(!/^[a-zA-Z]+$/.test(o))throw new S("The key must consist only of letters");for(var u=0;u<e.length;u++)a.indexOf(e[u])>=0?(i=o[(u-c)%o.length],r=a.indexOf(i),n=a.indexOf(e[u]),s+=a[(n-r+26)%26]):a.indexOf(e[u].toLowerCase())>=0?(i=o[(u-c)%o.length].toLowerCase(),r=a.indexOf(i),n=a.indexOf(e[u].toLowerCase()),s+=a[(n+26-r)%26].toUpperCase()):(s+=e[u],c++);return s}},{key:"highlight",value:function(e,t){return e}},{key:"highlightReverse",value:function(e,t){return e}}]),r}(rt);const gi=yi;function vi(e,t,r){return t=s(t),o(e,mi()?Reflect.construct(t,r||[],s(e).constructor):t.apply(e,r))}function mi(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(mi=function(){return!!e})()}var bi=function(t){function r(){var t;return e(this,r),(t=vi(this,r)).name="Vigenère Encode",t.module="Ciphers",t.description="The Vigenere cipher is a method of encrypting alphabetic text by using a series of different Caesar ciphers based on the letters of a keyword. It is a simple form of polyalphabetic substitution.",t.infoURL="https://wikipedia.org/wiki/Vigenère_cipher",t.inputType="string",t.outputType="string",t.args=[{name:"Key",type:"string",value:""}],t}return u(r,t),i(r,[{key:"run",value:function(e,t){var r,n,i,a="abcdefghijklmnopqrstuvwxyz",o=t[0].toLowerCase(),s="",c=0;if(!o)throw new S("No key entered");if(!/^[a-zA-Z]+$/.test(o))throw new S("The key must consist only of letters");for(var u=0;u<e.length;u++)a.indexOf(e[u])>=0?(i=o[(u-c)%o.length],r=a.indexOf(i),n=a.indexOf(e[u]),s+=a[(r+n)%26]):a.indexOf(e[u].toLowerCase())>=0?(i=o[(u-c)%o.length].toLowerCase(),r=a.indexOf(i),n=a.indexOf(e[u].toLowerCase()),s+=a[(r+n)%26].toUpperCase()):(s+=e[u],c++);return s}},{key:"highlight",value:function(e,t){return e}},{key:"highlightReverse",value:function(e,t){return e}}]),r}(rt);const wi=bi;("undefined"==typeof self?{}:self.OpModules||{}).Ciphers={"A1Z26 Cipher Decode":st,"A1Z26 Cipher Encode":ht,"AES Decrypt":gt,"AES Encrypt":bt,"AES Key Unwrap":St,"AES Key Wrap":It,"Affine Cipher Decode":xt,"Affine Cipher Encode":Ot,"Atbash Cipher":jt,"Bifid Cipher Decode":zt,"Bifid Cipher Encode":Qt,"Blowfish Decrypt":sr,"Blowfish Encrypt":fr,"Caesar Box Cipher":pr,"Cetacean Cipher Decode":br,"Cetacean Cipher Encode":Sr,"DES Decrypt":Tr,"DES Encrypt":_r,"Derive EVP key":Fr,"Derive PBKDF2 key":Ur,"GOST Decrypt":Or,"GOST Encrypt":jr,"GOST Key Unwrap":qr,"GOST Key Wrap":Xr,"GOST Sign":Zr,"GOST Verify":en,"Generate RSA Key Pair":nn,"Pseudo-Random Number Generator":cn,"RC2 Decrypt":hn,"RC2 Encrypt":pn,RC4:vn,"RC4 Drop":wn,"RSA Decrypt":An,"RSA Encrypt":In,"RSA Sign":Rn,"RSA Verify":Dn,Rabbit:Ln,"Rail Fence Cipher Decode":Kn,"Rail Fence Cipher Encode":Vn,"SM4 Decrypt":ri,"SM4 Encrypt":oi,"Triple DES Decrypt":ui,"Triple DES Encrypt":li,"Vigenère Decode":gi,"Vigenère Encode":wi}})()})();