diff --git a/docs/dist/bundle.js b/docs/dist/bundle.js index a4c92c54..e4cba30c 100644 --- a/docs/dist/bundle.js +++ b/docs/dist/bundle.js @@ -11,19 +11,19 @@ var i=r(124),n=r(125),a=r(63);function o(){return f.TYPED_ARRAY_SUPPORT?21474836 * * @author Feross Aboukhadijeh * @license MIT - */function n(e,t){if(e===t)return 0;for(var r=e.length,i=t.length,n=0,a=Math.min(r,i);n=0;c--)if(u[c]!==h[c])return!1;for(c=u.length-1;c>=0;c--)if(s=u[c],!y(e[s],t[s],r,i))return!1;return!0}(e,t,r,i))}return r?e===t:e==t}function _(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function w(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function E(e,t,r,i){var n;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(i=r,r=null),n=function(e){var t;try{e()}catch(e){t=e}return t}(t),i=(r&&r.name?" ("+r.name+").":".")+(i?" "+i:"."),e&&!n&&v(n,r,"Missing expected exception"+i);var a="string"==typeof i,s=!e&&n&&!r;if((!e&&o.isError(n)&&a&&w(n,r)||s)&&v(n,r,"Got unwanted exception"+i),e&&n&&r&&!w(n,r)||!e&&n)throw n}d.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=function(e){return m(b(e.actual),128)+" "+e.operator+" "+m(b(e.expected),128)}(this),this.generatedMessage=!0);var t=e.stackStartFunction||v;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var r=new Error;if(r.stack){var i=r.stack,n=p(t),a=i.indexOf("\n"+n);if(a>=0){var o=i.indexOf("\n",a+1);i=i.substring(o+1)}this.stack=i}}},o.inherits(d.AssertionError,Error),d.fail=v,d.ok=g,d.equal=function(e,t,r){e!=t&&v(e,t,r,"==",d.equal)},d.notEqual=function(e,t,r){e==t&&v(e,t,r,"!=",d.notEqual)},d.deepEqual=function(e,t,r){y(e,t,!1)||v(e,t,r,"deepEqual",d.deepEqual)},d.deepStrictEqual=function(e,t,r){y(e,t,!0)||v(e,t,r,"deepStrictEqual",d.deepStrictEqual)},d.notDeepEqual=function(e,t,r){y(e,t,!1)&&v(e,t,r,"notDeepEqual",d.notDeepEqual)},d.notDeepStrictEqual=function e(t,r,i){y(t,r,!0)&&v(t,r,i,"notDeepStrictEqual",e)},d.strictEqual=function(e,t,r){e!==t&&v(e,t,r,"===",d.strictEqual)},d.notStrictEqual=function(e,t,r){e===t&&v(e,t,r,"!==",d.notStrictEqual)},d.throws=function(e,t,r){E(!0,e,t,r)},d.doesNotThrow=function(e,t,r){E(!1,e,t,r)},d.ifError=function(e){if(e)throw e},d.strict=i((function e(t,r){t||v(t,!0,r,"==",e)}),d,{equal:d.strictEqual,deepEqual:d.deepStrictEqual,notEqual:d.notStrictEqual,notDeepEqual:d.notDeepStrictEqual}),d.strict.strict=d.strict;var S=Object.keys||function(e){var t=[];for(var r in e)s.call(e,r)&&t.push(r);return t}}).call(this,r(5))},function(e,t,r){"use strict";var i="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var r=t.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var i in r)n(r,i)&&(e[i]=r[i])}}return e},t.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var a={arraySet:function(e,t,r,i,n){if(t.subarray&&e.subarray)e.set(t.subarray(r,r+i),n);else for(var a=0;a>>24]^u[p>>>16&255]^h[m>>>8&255]^d[255&b]^t[v++],o=c[p>>>24]^u[m>>>16&255]^h[b>>>8&255]^d[255&l]^t[v++],s=c[m>>>24]^u[b>>>16&255]^h[l>>>8&255]^d[255&p]^t[v++],f=c[b>>>24]^u[l>>>16&255]^h[p>>>8&255]^d[255&m]^t[v++],l=a,p=o,m=s,b=f;return a=(i[l>>>24]<<24|i[p>>>16&255]<<16|i[m>>>8&255]<<8|i[255&b])^t[v++],o=(i[p>>>24]<<24|i[m>>>16&255]<<16|i[b>>>8&255]<<8|i[255&l])^t[v++],s=(i[m>>>24]<<24|i[b>>>16&255]<<16|i[l>>>8&255]<<8|i[255&p])^t[v++],f=(i[b>>>24]<<24|i[l>>>16&255]<<16|i[p>>>8&255]<<8|i[255&m])^t[v++],[a>>>=0,o>>>=0,s>>>=0,f>>>=0]}var s=[0,1,2,4,8,16,32,64,128,27,54],f=function(){for(var e=new Array(256),t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;for(var r=[],i=[],n=[[],[],[],[]],a=[[],[],[],[]],o=0,s=0,f=0;f<256;++f){var c=s^s<<1^s<<2^s<<3^s<<4;c=c>>>8^255&c^99,r[o]=c,i[c]=o;var u=e[o],h=e[u],d=e[h],l=257*e[c]^16843008*c;n[0][o]=l<<24|l>>>8,n[1][o]=l<<16|l>>>16,n[2][o]=l<<8|l>>>24,n[3][o]=l,l=16843009*d^65537*h^257*u^16843008*o,a[0][c]=l<<24|l>>>8,a[1][c]=l<<16|l>>>16,a[2][c]=l<<8|l>>>24,a[3][c]=l,0===o?o=s=1:(o=u^e[e[e[d^u]]],s^=e[e[s]])}return{SBOX:r,INV_SBOX:i,SUB_MIX:n,INV_SUB_MIX:a}}();function c(e){this._key=n(e),this._reset()}c.blockSize=16,c.keySize=32,c.prototype.blockSize=c.blockSize,c.prototype.keySize=c.keySize,c.prototype._reset=function(){for(var e=this._key,t=e.length,r=t+6,i=4*(r+1),n=[],a=0;a>>24,o=f.SBOX[o>>>24]<<24|f.SBOX[o>>>16&255]<<16|f.SBOX[o>>>8&255]<<8|f.SBOX[255&o],o^=s[a/t|0]<<24):t>6&&a%t==4&&(o=f.SBOX[o>>>24]<<24|f.SBOX[o>>>16&255]<<16|f.SBOX[o>>>8&255]<<8|f.SBOX[255&o]),n[a]=n[a-t]^o}for(var c=[],u=0;u>>24]]^f.INV_SUB_MIX[1][f.SBOX[d>>>16&255]]^f.INV_SUB_MIX[2][f.SBOX[d>>>8&255]]^f.INV_SUB_MIX[3][f.SBOX[255&d]]}this._nRounds=r,this._keySchedule=n,this._invKeySchedule=c},c.prototype.encryptBlockRaw=function(e){return o(e=n(e),this._keySchedule,f.SUB_MIX,f.SBOX,this._nRounds)},c.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),r=i.allocUnsafe(16);return r.writeUInt32BE(t[0],0),r.writeUInt32BE(t[1],4),r.writeUInt32BE(t[2],8),r.writeUInt32BE(t[3],12),r},c.prototype.decryptBlock=function(e){var t=(e=n(e))[1];e[1]=e[3],e[3]=t;var r=o(e,this._invKeySchedule,f.INV_SUB_MIX,f.INV_SBOX,this._nRounds),a=i.allocUnsafe(16);return a.writeUInt32BE(r[0],0),a.writeUInt32BE(r[3],4),a.writeUInt32BE(r[2],8),a.writeUInt32BE(r[1],12),a},c.prototype.scrub=function(){a(this._keySchedule),a(this._invKeySchedule),a(this._key)},e.exports.AES=c},function(e,t,r){var i=r(2).Buffer,n=r(43);e.exports=function(e,t,r,a){if(i.isBuffer(e)||(e=i.from(e,"binary")),t&&(i.isBuffer(t)||(t=i.from(t,"binary")),8!==t.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var o=r/8,s=i.alloc(o),f=i.alloc(a||0),c=i.alloc(0);o>0||a>0;){var u=new n;u.update(c),u.update(e),t&&u.update(t),c=u.digest();var h=0;if(o>0){var d=s.length-o;h=Math.min(o,c.length),c.copy(s,d,0,h),o-=h}if(h0){var l=f.length-a,p=Math.min(a,c.length-h);c.copy(f,l,h,h+p),a-=p}}return c.fill(0),{key:s,iv:f}}},function(e,t,r){"use strict";var i=r(3),n=r(9),a=n.getNAF,o=n.getJSF,s=n.assert;function f(e,t){this.type=e,this.p=new i(t.p,16),this.red=t.prime?i.red(t.prime):i.mont(this.p),this.zero=new i(0).toRed(this.red),this.one=new i(1).toRed(this.red),this.two=new i(2).toRed(this.red),this.n=t.n&&new i(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4);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 c(e,t){this.curve=e,this.type=t,this.precomputed=null}e.exports=f,f.prototype.point=function(){throw new Error("Not implemented")},f.prototype.validate=function(){throw new Error("Not implemented")},f.prototype._fixedNafMul=function(e,t){s(e.precomputed);var r=e._getDoubles(),i=a(t,1),n=(1<=f;t--)c=(c<<1)+i[t];o.push(c)}for(var u=this.jpoint(null,null,null),h=this.jpoint(null,null,null),d=n;d>0;d--){for(f=0;f=0;c--){for(t=0;c>=0&&0===o[c];c--)t++;if(c>=0&&t++,f=f.dblp(t),c<0)break;var u=o[c];s(0!==u),f="affine"===e.type?u>0?f.mixedAdd(n[u-1>>1]):f.mixedAdd(n[-u-1>>1].neg()):u>0?f.add(n[u-1>>1]):f.add(n[-u-1>>1].neg())}return"affine"===e.type?f.toP():f},f.prototype._wnafMulAdd=function(e,t,r,i,n){for(var s=this._wnafT1,f=this._wnafT2,c=this._wnafT3,u=0,h=0;h=1;h-=2){var l=h-1,p=h;if(1===s[l]&&1===s[p]){var m=[t[l],null,null,t[p]];0===t[l].y.cmp(t[p].y)?(m[1]=t[l].add(t[p]),m[2]=t[l].toJ().mixedAdd(t[p].neg())):0===t[l].y.cmp(t[p].y.redNeg())?(m[1]=t[l].toJ().mixedAdd(t[p]),m[2]=t[l].add(t[p].neg())):(m[1]=t[l].toJ().mixedAdd(t[p]),m[2]=t[l].toJ().mixedAdd(t[p].neg()));var b=[-3,-1,-5,-7,0,7,5,1,3],v=o(r[l],r[p]);u=Math.max(v[0].length,u),c[l]=new Array(u),c[p]=new Array(u);for(var g=0;g=0;h--){for(var S=0;h>=0;){var P=!0;for(g=0;g=0&&S++,w=w.dblp(S),h<0)break;for(g=0;g0?k=f[g][A-1>>1]:A<0&&(k=f[g][-A-1>>1].neg()),w="affine"===k.type?w.mixedAdd(k):w.add(k))}}for(h=0;h=Math.ceil((e.bitLength()+1)/t.step)},c.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],i=this,n=0;n1073741823)throw new Error("buffer too large: "+t.length+" > 1073741823");if(null==i&&(i={}),null!=i.size)throw new Error("options.size not allowed");var a=new w(r,!1,i);function o(t){a.compressedSize=t.length,a.setFileDataPumpFunction((function(){l(n,t),l(n,a.getDataDescriptor()),a.state=w.FILE_DATA_DONE,e((function(){m(n)}))})),m(n)}a.uncompressedSize=t.length,a.crc32=u.unsigned(t),a.crcAndFileSizeKnown=!0,n.entries.push(a),a.compress?s.deflateRaw(t,(function(e,t){o(t)})):o(t)},h.prototype.addEmptyDirectory=function(e,t){var r=this;if(e=y(e,!0),null==t&&(t={}),null!=t.size)throw new Error("options.size not allowed");if(null!=t.compress)throw new Error("options.compress not allowed");var i=new w(e,!0,t);r.entries.push(i),i.setFileDataPumpFunction((function(){l(r,i.getDataDescriptor()),i.state=w.FILE_DATA_DONE,m(r)})),m(r)};var d=B([80,75,5,6]);function l(e,t){e.outputStream.write(t),e.outputStreamCursor+=t.length}function p(e,t,r){var i=new T,n=new R,a=t.compress?new s.DeflateRaw:new o,f=new R;r.pipe(i).pipe(n).pipe(a).pipe(f).pipe(e.outputStream,{end:!1}),f.on("end",(function(){if(t.crc32=i.crc32,null==t.uncompressedSize)t.uncompressedSize=n.byteCount;else if(t.uncompressedSize!==n.byteCount)return e.emit("error",new Error("file data stream has unexpected number of bytes"));t.compressedSize=f.byteCount,e.outputStreamCursor+=t.compressedSize,l(e,t.getDataDescriptor()),t.state=w.FILE_DATA_DONE,m(e)}))}function m(e){if(!e.allDone){if(e.ended&&null!=e.finalSizeCallback){var t=function(e){for(var t=0,r=0,i=0;i=w.READY_TO_PUMP_FILE_DATA){if(null==n.uncompressedSize)return-1}else if(null==n.uncompressedSize)return null;n.relativeOffsetOfLocalHeader=t;var a=n.useZip64Format();t+=E+n.utf8FileName.length,t+=n.uncompressedSize,n.crcAndFileSizeKnown||(t+=a?A:k),r+=x+n.utf8FileName.length+n.fileComment.length,a&&(r+=I)}var o=0;(e.forceZip64Eocd||e.entries.length>=65535||r>=65535||t>=4294967295)&&(o+=b+v);return o+=g+e.comment.length,t+r+o}(e);null!=t&&(e.finalSizeCallback(t),e.finalSizeCallback=null)}var r=function(){for(var t=0;t=65535)&&(n=65535,r=!0);var a=e.outputStreamCursor-e.offsetOfStartOfCentralDirectory,o=a;(e.forceZip64Eocd||a>=4294967295)&&(o=4294967295,r=!0);var s=e.offsetOfStartOfCentralDirectory;(e.forceZip64Eocd||e.offsetOfStartOfCentralDirectory>=4294967295)&&(s=4294967295,r=!0);if(t)return r?b+v+g:g;var f=L(g+e.comment.length);if(f.writeUInt32LE(101010256,0),f.writeUInt16LE(0,4),f.writeUInt16LE(0,6),f.writeUInt16LE(n,8),f.writeUInt16LE(n,10),f.writeUInt32LE(o,12),f.writeUInt32LE(s,16),f.writeUInt16LE(e.comment.length,20),e.comment.copy(f,22),!r)return f;var c=L(b);c.writeUInt32LE(101075792,0),M(c,b-12,4),c.writeUInt16LE(P,12),c.writeUInt16LE(S,14),c.writeUInt32LE(0,16),c.writeUInt32LE(0,20),M(c,e.entries.length,24),M(c,e.entries.length,32),M(c,a,40),M(c,e.offsetOfStartOfCentralDirectory,48);var u=L(v);return u.writeUInt32LE(117853008,0),u.writeUInt32LE(0,4),M(u,e.outputStreamCursor,8),u.writeUInt32LE(1,16),i.concat([c,u,f])}(e)),e.outputStream.end(),e.allDone=!0)}}h.prototype.end=function(e,t){if("function"==typeof e&&(t=e,e=null),null==e&&(e={}),!this.ended){if(this.ended=!0,this.finalSizeCallback=t,this.forceZip64Eocd=!!e.forceZip64Format,e.comment){if("string"==typeof e.comment?this.comment=function(e){if(/^[\x20-\x7e]*$/.test(e))return B(e,"utf-8");if(null==C){C={};for(var t=0;t65535)throw new Error("comment is too large");if(N(this.comment,d))throw new Error("comment contains end of central directory record signature")}else this.comment=_;m(this)}};var b=56,v=20,g=22;function y(e,t){if(""===e)throw new Error("empty metadataPath");if(e=e.replace(/\\/g,"/"),/^[a-zA-Z]:/.test(e)||/^\//.test(e))throw new Error("absolute path: "+e);if(-1!==e.split("/").indexOf(".."))throw new Error("invalid relative path: "+e);var r=/\/$/.test(e);if(t)r||(e+="/");else if(r)throw new Error("file path cannot end with '/': "+e);return e}var _=L(0);function w(e,t,r){if(this.utf8FileName=B(e),this.utf8FileName.length>65535)throw new Error("utf8 file name too long. "+utf8FileName.length+" > 65535");if(this.isDirectory=t,this.state=w.WAITING_FOR_METADATA,this.setLastModDate(null!=r.mtime?r.mtime:new Date),null!=r.mode?this.setFileAttributesMode(r.mode):this.setFileAttributesMode(t?16893:33204),t?(this.crcAndFileSizeKnown=!0,this.crc32=0,this.uncompressedSize=0,this.compressedSize=0):(this.crcAndFileSizeKnown=!1,this.crc32=null,this.uncompressedSize=null,this.compressedSize=null,null!=r.size&&(this.uncompressedSize=r.size)),t?this.compress=!1:(this.compress=!0,null!=r.compress&&(this.compress=!!r.compress)),this.forceZip64Format=!!r.forceZip64Format,r.fileComment){if("string"==typeof r.fileComment?this.fileComment=B(r.fileComment,"utf-8"):this.fileComment=r.fileComment,this.fileComment.length>65535)throw new Error("fileComment is too large")}else this.fileComment=_}w.WAITING_FOR_METADATA=0,w.READY_TO_PUMP_FILE_DATA=1,w.FILE_DATA_IN_PROGRESS=2,w.FILE_DATA_DONE=3,w.prototype.setLastModDate=function(e){var t=O(e);this.lastModFileTime=t.time,this.lastModFileDate=t.date},w.prototype.setFileAttributesMode=function(e){if((65535&e)!==e)throw new Error("invalid mode. expected: 0 <= "+e+" <= 65535");this.externalFileAttributes=e<<16>>>0},w.prototype.setFileDataPumpFunction=function(e){this.doFileDataPump=e,this.state=w.READY_TO_PUMP_FILE_DATA},w.prototype.useZip64Format=function(){return this.forceZip64Format||null!=this.uncompressedSize&&this.uncompressedSize>4294967294||null!=this.compressedSize&&this.compressedSize>4294967294||null!=this.relativeOffsetOfLocalHeader&&this.relativeOffsetOfLocalHeader>4294967294};var E=30,S=45,P=831;w.prototype.getLocalFileHeader=function(){var e=0,t=0,r=0;this.crcAndFileSizeKnown&&(e=this.crc32,t=this.compressedSize,r=this.uncompressedSize);var n=L(E),a=2048;return this.crcAndFileSizeKnown||(a|=8),n.writeUInt32LE(67324752,0),n.writeUInt16LE(20,4),n.writeUInt16LE(a,6),n.writeUInt16LE(this.getCompressionMethod(),8),n.writeUInt16LE(this.lastModFileTime,10),n.writeUInt16LE(this.lastModFileDate,12),n.writeUInt32LE(e,14),n.writeUInt32LE(t,18),n.writeUInt32LE(r,22),n.writeUInt16LE(this.utf8FileName.length,26),n.writeUInt16LE(0,28),i.concat([n,this.utf8FileName])};var k=16,A=24;w.prototype.getDataDescriptor=function(){return this.crcAndFileSizeKnown?_:this.useZip64Format()?((e=L(A)).writeUInt32LE(134695760,0),e.writeUInt32LE(this.crc32,4),M(e,this.compressedSize,8),M(e,this.uncompressedSize,16),e):((e=L(k)).writeUInt32LE(134695760,0),e.writeUInt32LE(this.crc32,4),e.writeUInt32LE(this.compressedSize,8),e.writeUInt32LE(this.uncompressedSize,12),e);var e};var x=46,I=28;function O(e){var t=0;t|=31&e.getDate(),t|=(e.getMonth()+1&15)<<5,t|=(e.getFullYear()-1980&127)<<9;var r=0;return r|=Math.floor(e.getSeconds()/2),r|=(63&e.getMinutes())<<5,{date:t,time:r|=(31&e.getHours())<<11}}function M(e,t,r){var i=Math.floor(t/4294967296),n=t%4294967296;e.writeUInt32LE(n,r),e.writeUInt32LE(i,r+4)}function R(e){a.call(this,e),this.byteCount=0}function T(e){a.call(this,e),this.crc32=0}w.prototype.getCentralDirectoryRecord=function(){var e=L(x),t=2048;this.crcAndFileSizeKnown||(t|=8);var r,n,a=this.compressedSize,o=this.uncompressedSize,s=this.relativeOffsetOfLocalHeader;return this.useZip64Format()?(a=4294967295,o=4294967295,s=4294967295,r=S,(n=L(I)).writeUInt16LE(1,0),n.writeUInt16LE(I-4,2),M(n,this.uncompressedSize,4),M(n,this.compressedSize,12),M(n,this.relativeOffsetOfLocalHeader,20)):(r=20,n=_),e.writeUInt32LE(33639248,0),e.writeUInt16LE(P,4),e.writeUInt16LE(r,6),e.writeUInt16LE(t,8),e.writeUInt16LE(this.getCompressionMethod(),10),e.writeUInt16LE(this.lastModFileTime,12),e.writeUInt16LE(this.lastModFileDate,14),e.writeUInt32LE(this.crc32,16),e.writeUInt32LE(a,20),e.writeUInt32LE(o,24),e.writeUInt16LE(this.utf8FileName.length,28),e.writeUInt16LE(n.length,30),e.writeUInt16LE(this.fileComment.length,32),e.writeUInt16LE(0,34),e.writeUInt16LE(0,36),e.writeUInt32LE(this.externalFileAttributes,38),e.writeUInt32LE(s,42),i.concat([e,this.utf8FileName,n,this.fileComment])},w.prototype.getCompressionMethod=function(){return this.compress?8:0},f.inherits(R,a),R.prototype._transform=function(e,t,r){this.byteCount+=e.length,r(null,e)},f.inherits(T,a),T.prototype._transform=function(e,t,r){this.crc32=u.unsigned(e,this.crc32),r(null,e)};var D="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ";if(256!==D.length)throw new Error("assertion failure");var C=null;function L(e){L=function(e){return i.allocUnsafe(e)};try{return L(e)}catch(t){return(L=function(e){return new i(e)})(e)}}function B(e,t){B=function(e,t){return i.from(e,t)};try{return B(e,t)}catch(r){return(B=function(e,t){return new i(e,t)})(e,t)}}function N(e,t){N=function(e,t){return e.includes(t)};try{return N(e,t)}catch(r){return(N=function(e,t){for(var r=0;r<=e.length-t.length;r++)for(var i=0;;i++){if(i===t.length)return!0;if(e[r+i]!==t[i])break}return!1})(e,t)}}}).call(this,r(27).setImmediate,r(1).Buffer)},function(e,t){},function(e,t,r){(t=e.exports=r(64)).Stream=t,t.Readable=t,t.Writable=r(39),t.Duplex=r(13),t.Transform=r(67),t.PassThrough=r(132)},function(e,t,r){"use strict";(function(t,i,n){var a=r(28);function o(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var i=e.entry;e.entry=null;for(;i;){var n=i.callback;t.pendingcb--,n(r),i=i.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}(t,e)}}e.exports=g;var s,f=!t.browser&&["v0.10","v0.9."].indexOf(t.version.slice(0,5))>-1?i:a.nextTick;g.WritableState=v;var c=r(20);c.inherits=r(0);var u={deprecate:r(130)},h=r(65),d=r(2).Buffer,l=n.Uint8Array||function(){};var p,m=r(66);function b(){}function v(e,t){s=s||r(13),e=e||{};var i=t instanceof s;this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var n=e.highWaterMark,c=e.writableHighWaterMark,u=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:i&&(c||0===c)?c:u,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,i=r.sync,n=r.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,i,n){--t.pendingcb,r?(a.nextTick(n,i),a.nextTick(P,e,t),e._writableState.errorEmitted=!0,e.emit("error",i)):(n(i),e._writableState.errorEmitted=!0,e.emit("error",i),P(e,t))}(e,r,i,t,n);else{var o=E(r);o||r.corked||r.bufferProcessing||!r.bufferedRequest||w(e,r),i?f(_,e,r,o,n):_(e,r,o,n)}}(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 g(e){if(s=s||r(13),!(p.call(g,this)||this instanceof s))return new g(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)),h.call(this)}function y(e,t,r,i,n,a,o){t.writelen=i,t.writecb=o,t.writing=!0,t.sync=!0,r?e._writev(n,t.onwrite):e._write(n,a,t.onwrite),t.sync=!1}function _(e,t,r,i){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,i(),P(e,t)}function w(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var i=t.bufferedRequestCount,n=new Array(i),a=t.corkedRequestsFree;a.entry=r;for(var s=0,f=!0;r;)n[s]=r,r.isBuf||(f=!1),r=r.next,s+=1;n.allBuffers=f,y(e,t,!0,t.length,n,"",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 c=r.chunk,u=r.encoding,h=r.callback;if(y(e,t,!1,t.objectMode?1:c.length,c,u,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"),P(e,t)}))}function P(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}c.inherits(g,h),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:u.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]?(p=Function.prototype[Symbol.hasInstance],Object.defineProperty(g,Symbol.hasInstance,{value:function(e){return!!p.call(this,e)||this===g&&(e&&e._writableState instanceof v)}})):p=function(e){return e instanceof this},g.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},g.prototype.write=function(e,t,r){var i,n=this._writableState,o=!1,s=!n.objectMode&&(i=e,d.isBuffer(i)||i instanceof l);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=n.defaultEncoding),"function"!=typeof r&&(r=b),n.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,i){var n=!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(i,o),n=!1),n}(this,n,e,r))&&(n.pendingcb++,o=function(e,t,r,i,n,a){if(!r){var o=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=d.from(t,r));return t}(t,i,n);i!==o&&(r=!0,n="buffer",i=o)}var s=t.objectMode?1:i.length;t.length+=s;var f=t.length-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(g.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),g.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},g.prototype._writev=null,g.prototype.end=function(e,t,r){var i=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||i.finished||function(e,t,r){t.ending=!0,P(e,t),r&&(t.finished?a.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,i,r)},Object.defineProperty(g.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),g.prototype.destroy=m.destroy,g.prototype._undestroy=m.undestroy,g.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,r(4),r(27).setImmediate,r(5))},function(e,t,r){"use strict";var i=r(131).Buffer,n=i.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&&(i.isEncoding===n||!n(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=f,this.end=c,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=u,this.end=h,t=3;break;default:return this.write=d,void(this.end=l)}this.lastNeed=0,this.lastTotal=0,this.lastChar=i.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,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(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 f(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=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 c(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 u(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 d(e){return e.toString(this.encoding)}function l(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=0)return n>0&&(e.lastNeed=n-1),n;if(--i=0)return n>0&&(e.lastNeed=n-2),n;if(--i=0)return n>0&&(2===n?n=0:e.lastNeed=n-3),n;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var i=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,i),e.toString("utf8",t,i)},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";e.exports=r(42),e.exports.ReadableStreamBuffer=r(149),e.exports.WritableStreamBuffer=r(150)},function(e,t,r){"use strict";e.exports={DEFAULT_INITIAL_SIZE:8192,DEFAULT_INCREMENT_AMOUNT:8192,DEFAULT_FREQUENCY:1,DEFAULT_CHUNK_SIZE:1024}},function(e,t,r){"use strict";var i=r(0),n=r(75),a=r(2).Buffer,o=new Array(16);function s(){n.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function f(e,t){return e<>>32-t}function c(e,t,r,i,n,a,o){return f(e+(t&r|~t&i)+n+a|0,o)+t|0}function u(e,t,r,i,n,a,o){return f(e+(t&i|r&~i)+n+a|0,o)+t|0}function h(e,t,r,i,n,a,o){return f(e+(t^r^i)+n+a|0,o)+t|0}function d(e,t,r,i,n,a,o){return f(e+(r^(t|~i))+n+a|0,o)+t|0}i(s,n),s.prototype._update=function(){for(var e=o,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var r=this._a,i=this._b,n=this._c,a=this._d;r=c(r,i,n,a,e[0],3614090360,7),a=c(a,r,i,n,e[1],3905402710,12),n=c(n,a,r,i,e[2],606105819,17),i=c(i,n,a,r,e[3],3250441966,22),r=c(r,i,n,a,e[4],4118548399,7),a=c(a,r,i,n,e[5],1200080426,12),n=c(n,a,r,i,e[6],2821735955,17),i=c(i,n,a,r,e[7],4249261313,22),r=c(r,i,n,a,e[8],1770035416,7),a=c(a,r,i,n,e[9],2336552879,12),n=c(n,a,r,i,e[10],4294925233,17),i=c(i,n,a,r,e[11],2304563134,22),r=c(r,i,n,a,e[12],1804603682,7),a=c(a,r,i,n,e[13],4254626195,12),n=c(n,a,r,i,e[14],2792965006,17),r=u(r,i=c(i,n,a,r,e[15],1236535329,22),n,a,e[1],4129170786,5),a=u(a,r,i,n,e[6],3225465664,9),n=u(n,a,r,i,e[11],643717713,14),i=u(i,n,a,r,e[0],3921069994,20),r=u(r,i,n,a,e[5],3593408605,5),a=u(a,r,i,n,e[10],38016083,9),n=u(n,a,r,i,e[15],3634488961,14),i=u(i,n,a,r,e[4],3889429448,20),r=u(r,i,n,a,e[9],568446438,5),a=u(a,r,i,n,e[14],3275163606,9),n=u(n,a,r,i,e[3],4107603335,14),i=u(i,n,a,r,e[8],1163531501,20),r=u(r,i,n,a,e[13],2850285829,5),a=u(a,r,i,n,e[2],4243563512,9),n=u(n,a,r,i,e[7],1735328473,14),r=h(r,i=u(i,n,a,r,e[12],2368359562,20),n,a,e[5],4294588738,4),a=h(a,r,i,n,e[8],2272392833,11),n=h(n,a,r,i,e[11],1839030562,16),i=h(i,n,a,r,e[14],4259657740,23),r=h(r,i,n,a,e[1],2763975236,4),a=h(a,r,i,n,e[4],1272893353,11),n=h(n,a,r,i,e[7],4139469664,16),i=h(i,n,a,r,e[10],3200236656,23),r=h(r,i,n,a,e[13],681279174,4),a=h(a,r,i,n,e[0],3936430074,11),n=h(n,a,r,i,e[3],3572445317,16),i=h(i,n,a,r,e[6],76029189,23),r=h(r,i,n,a,e[9],3654602809,4),a=h(a,r,i,n,e[12],3873151461,11),n=h(n,a,r,i,e[15],530742520,16),r=d(r,i=h(i,n,a,r,e[2],3299628645,23),n,a,e[0],4096336452,6),a=d(a,r,i,n,e[7],1126891415,10),n=d(n,a,r,i,e[14],2878612391,15),i=d(i,n,a,r,e[5],4237533241,21),r=d(r,i,n,a,e[12],1700485571,6),a=d(a,r,i,n,e[3],2399980690,10),n=d(n,a,r,i,e[10],4293915773,15),i=d(i,n,a,r,e[1],2240044497,21),r=d(r,i,n,a,e[8],1873313359,6),a=d(a,r,i,n,e[15],4264355552,10),n=d(n,a,r,i,e[6],2734768916,15),i=d(i,n,a,r,e[13],1309151649,21),r=d(r,i,n,a,e[4],4149444226,6),a=d(a,r,i,n,e[11],3174756917,10),n=d(n,a,r,i,e[2],718787259,15),i=d(i,n,a,r,e[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+i|0,this._c=this._c+n|0,this._d=this._d+a|0},s.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=a.allocUnsafe(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=s},function(e,t,r){"use strict";var i=r(1).Buffer,n=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],f=[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],c=[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],u=[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],d=[1352829926,1548603684,1836072691,2053994217,0];function l(){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<>>32-t}function m(e,t,r,i,n,a,o,s){return p(e+(t^r^i)+a+o|0,s)+n|0}function b(e,t,r,i,n,a,o,s){return p(e+(t&r|~t&i)+a+o|0,s)+n|0}function v(e,t,r,i,n,a,o,s){return p(e+((t|~r)^i)+a+o|0,s)+n|0}function g(e,t,r,i,n,a,o,s){return p(e+(t&i|r&~i)+a+o|0,s)+n|0}function y(e,t,r,i,n,a,o,s){return p(e+(t^(r|~i))+a+o|0,s)+n|0}n(l,a),l.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,i=0|this._b,n=0|this._c,a=0|this._d,l=0|this._e,_=0|this._a,w=0|this._b,E=0|this._c,S=0|this._d,P=0|this._e,k=0;k<80;k+=1){var A,x;k<16?(A=m(r,i,n,a,l,e[s[k]],h[0],c[k]),x=y(_,w,E,S,P,e[f[k]],d[0],u[k])):k<32?(A=b(r,i,n,a,l,e[s[k]],h[1],c[k]),x=g(_,w,E,S,P,e[f[k]],d[1],u[k])):k<48?(A=v(r,i,n,a,l,e[s[k]],h[2],c[k]),x=v(_,w,E,S,P,e[f[k]],d[2],u[k])):k<64?(A=g(r,i,n,a,l,e[s[k]],h[3],c[k]),x=b(_,w,E,S,P,e[f[k]],d[3],u[k])):(A=y(r,i,n,a,l,e[s[k]],h[4],c[k]),x=m(_,w,E,S,P,e[f[k]],d[4],u[k])),r=l,l=a,a=p(n,10),n=i,i=A,_=P,P=S,S=p(E,10),E=w,w=x}var I=this._b+n+S|0;this._b=this._c+a+P|0,this._c=this._d+l+_|0,this._d=this._e+r+w|0,this._e=this._a+i+E|0,this._a=I},l.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=i.alloc?i.alloc(20):new i(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=l},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(154),t.sha1=r(155),t.sha224=r(156),t.sha256=r(76),t.sha384=r(157),t.sha512=r(77)},function(e,t,r){"use strict";t.utils=r(163),t.Cipher=r(164),t.DES=r(165),t.CBC=r(166),t.EDE=r(167)},function(e,t,r){var i=r(168),n=r(176),a=r(87);t.createCipher=t.Cipher=i.createCipher,t.createCipheriv=t.Cipheriv=i.createCipheriv,t.createDecipher=t.Decipher=n.createDecipher,t.createDecipheriv=t.Decipheriv=n.createDecipheriv,t.listCiphers=t.getCiphers=function(){return Object.keys(a)}},function(e,t,r){var i={ECB:r(169),CBC:r(170),CFB:r(171),CFB8:r(172),CFB1:r(173),OFB:r(174),CTR:r(85),GCM:r(85)},n=r(87);for(var a in n)n[a].module=i[n[a].mode];e.exports=n},function(e,t,r){var i;function n(e){this.rand=e}if(e.exports=function(e){return i||(i=new n(null)),i.generate(e)},e.exports.Rand=n,n.prototype.generate=function(e){return this._rand(e)},n.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),r=0;r=0||!r.umod(e.prime1)||!r.umod(e.prime2);)r=new i(n(t));return r}e.exports=a,a.getr=o}).call(this,r(1).Buffer)},function(e,t,r){"use strict";var i=t;i.version=r(186).version,i.utils=r(9),i.rand=r(49),i.curve=r(93),i.curves=r(52),i.ec=r(197),i.eddsa=r(201)},function(e,t,r){"use strict";var i,n=t,a=r(53),o=r(93),s=r(9).assert;function f(e){"short"===e.type?this.curve=new o.short(e):"edwards"===e.type?this.curve=new o.edwards(e):this.curve=new o.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 c(e,t){Object.defineProperty(n,e,{configurable:!0,enumerable:!0,get:function(){var r=new f(t);return Object.defineProperty(n,e,{configurable:!0,enumerable:!0,value:r}),r}})}n.PresetCurve=f,c("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"]}),c("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"]}),c("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"]}),c("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"]}),c("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"]}),c("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"]}),c("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{i=r(196)}catch(e){i=void 0}c("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",i]})},function(e,t,r){var i=t;i.utils=r(11),i.common=r(23),i.sha=r(190),i.ripemd=r(194),i.hmac=r(195),i.sha1=i.sha.sha1,i.sha256=i.sha.sha256,i.sha224=i.sha.sha224,i.sha384=i.sha.sha384,i.sha512=i.sha.sha512,i.ripemd160=i.ripemd.ripemd160},function(e,t,r){var i=r(229);e.exports={Ber:i,BerReader:i.Reader,BerWriter:i.Writer}},function(e,t){e.exports={newInvalidAsn1Error:function(e){var t=new Error;return t.name="InvalidAsn1Error",t.message=e||"",t}}},function(e,t){e.exports={EOC:0,Boolean:1,Integer:2,BitString:3,OctetString:4,Null:5,OID:6,ObjectDescriptor:7,External:8,Real:9,Enumeration:10,PDV:11,Utf8String:12,RelativeOID:13,Sequence:16,Set:17,NumericString:18,PrintableString:19,T61String:20,VideotexString:21,IA5String:22,UTCTime:23,GeneralizedTime:24,GraphicString:25,VisibleString:26,GeneralString:28,UniversalString:29,CharacterString:30,BMPString:31,Constructor:32,Context:128}},function(e,t,r){"use strict";var i=r(251),n=r(58),a=r(19),o=r(108),s=r(253);function f(e,t,r){var i=this._refs[r];if("string"==typeof i){if(!this._refs[i])return f.call(this,e,t,i);i=this._refs[i]}if((i=i||this._schemas[r])instanceof o)return p(i.schema,this._opts.inlineRefs)?i.schema:i.validate||this._compile(i);var n,a,s,u=c.call(this,t,r);return u&&(n=u.schema,t=u.root,s=u.baseId),n instanceof o?a=n.validate||e.call(this,n.schema,t,void 0,s):void 0!==n&&(a=p(n,this._opts.inlineRefs)?n:e.call(this,n,t,void 0,s)),a}function c(e,t){var r=i.parse(t),n=b(r),a=m(this._getId(e.schema));if(0===Object.keys(e.schema).length||n!==a){var s=g(n),f=this._refs[s];if("string"==typeof f)return u.call(this,e,f,r);if(f instanceof o)f.validate||this._compile(f),e=f;else{if(!((f=this._schemas[s])instanceof o))return;if(f.validate||this._compile(f),s==g(t))return{schema:f,root:e,baseId:a};e=f}if(!e.schema)return;a=m(this._getId(e.schema))}return d.call(this,r,a,e.schema,e)}function u(e,t,r){var i=c.call(this,e,t);if(i){var n=i.schema,a=i.baseId;e=i.root;var o=this._getId(n);return o&&(a=y(a,o)),d.call(this,r,a,n,e)}}e.exports=f,f.normalizeId=g,f.fullPath=m,f.url=y,f.ids=function(e){var t=g(this._getId(e)),r={"":t},o={"":m(t,!1)},f={},c=this;return s(e,{allKeys:!0},(function(e,t,s,u,h,d,l){if(""!==t){var p=c._getId(e),m=r[u],b=o[u]+"/"+h;if(void 0!==l&&(b+="/"+("number"==typeof l?l:a.escapeFragment(l))),"string"==typeof p){p=m=g(m?i.resolve(m,p):p);var v=c._refs[p];if("string"==typeof v&&(v=c._refs[v]),v&&v.schema){if(!n(e,v.schema))throw new Error('id "'+p+'" resolves to more than one schema')}else if(p!=g(b))if("#"==p[0]){if(f[p]&&!n(e,f[p]))throw new Error('id "'+p+'" resolves to more than one schema');f[p]=e}else c._refs[p]=b}r[t]=m,o[t]=b}})),f},f.inlineRef=p,f.schema=c;var h=a.toHash(["properties","patternProperties","enum","dependencies","definitions"]);function d(e,t,r,i){if(e.fragment=e.fragment||"","/"==e.fragment.slice(0,1)){for(var n=e.fragment.split("/"),o=1;o"drop"===e.type,s=e=>new Promise((t,r)=>{e.isFile?e.file(r=>t({path:e.fullPath.replace(/^\/[^\/]+?\//,""),file:r})):e.isDirectory?e.createReader().readEntries(e=>{Promise.all(e.map(e=>s(e))).then(t)}):r(new Error("Unsupported file system entry specified"))}),f=e=>new Promise((t,r)=>{const i=new FileReader;i.onload=()=>t(i.result),i.onerror=r,i.readAsArrayBuffer(e)}),c=document.querySelector.bind(document),u=document.querySelectorAll.bind(document),h=(e,...t)=>{e instanceof NodeList?e.forEach(e=>h(e,...t)):e.addEventListener(...t)};e.exports={$:c,$$:u,fileMapToBuffer:function(e){return Promise.all(Array.from(e.entries()).map(([e,t])=>f(t).then(t=>({buffer:t,path:e})))).then(e=>{const r=new n.ZipFile;return e.forEach(e=>{r.addBuffer(t.from(e.buffer),e.path)}),r.end(),r}).then(e=>new Promise(t=>{const r=new a.WritableStreamBuffer;r.on("finish",()=>{t(r.getContents())}),e.outputStream.pipe(r)}))},listen:h,revokeDownloadUrl:e=>URL.revokeObjectURL(e),createDownloadUrl:(e,t)=>URL.createObjectURL(new Blob([e],{type:t})),createFileHanlder:e=>t=>{o(t)&&t.preventDefault(),e((e=>{if(!o(e)){const t=e.target.files;return 1===t.length?Promise.resolve(t[0]):Promise.resolve({name:t[0].webkitRelativePath.replace(/\/.*/,""),entries:new Map(Array.from(t).map(e=>[e.webkitRelativePath,e]))})}if(void 0===e.dataTransfer.items||"function"!=typeof e.dataTransfer.items[0].webkitGetAsEntry){const t=e.dataTransfer.files[0];return t?-1===t.name.indexOf(".")?Promise.reject(new Error("Your browser doesn't support a directory upload")):Promise.resolve(t):Promise.reject(new Error("Unsupported file type item specified"))}return new Promise((t,r)=>{const n=e.dataTransfer.items[0];if("file"!==n.kind)return void r(new Error("Unsupported file type item specified"));const a=n.webkitGetAsEntry();a.isFile?a.file(t):a.isDirectory?s(a).then(e=>{t({name:a.name,entries:new Map(i(e).map(({path:e,file:t})=>[e,t]))})}):r(new Error("Unsupported file system entry specified"))})})(t))},readText:e=>new Promise(t=>{const r=new FileReader;r.onload=()=>t(r.result),r.readAsText(e)}),readArrayBuffer:f}}).call(this,r(1).Buffer)},function(e,t){var r={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},function(e,t,r){"use strict";(function(t,i){var n=r(28);e.exports=y;var a,o=r(63);y.ReadableState=g;r(15).EventEmitter;var s=function(e,t){return e.listeners(t).length},f=r(65),c=r(2).Buffer,u=t.Uint8Array||function(){};var h=r(20);h.inherits=r(0);var d=r(127),l=void 0;l=d&&d.debuglog?d.debuglog("stream"):function(){};var p,m=r(128),b=r(66);h.inherits(y,f);var v=["error","close","destroy","pause","resume"];function g(e,t){e=e||{};var i=t instanceof(a=a||r(13));this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var n=e.highWaterMark,o=e.readableHighWaterMark,s=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:i&&(o||0===o)?o:s,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new m,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(40).StringDecoder),this.decoder=new p(e.encoding),this.encoding=e.encoding)}function y(e){if(a=a||r(13),!(this instanceof y))return new y(e);this._readableState=new g(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),f.call(this)}function _(e,t,r,i,n){var a,o=e._readableState;null===t?(o.reading=!1,function(e,t){if(t.ended)return;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,P(e)}(e,o)):(n||(a=function(e,t){var r;i=t,c.isBuffer(i)||i instanceof u||"string"==typeof t||void 0===t||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));var i;return r}(o,t)),a?e.emit("error",a):o.objectMode||t&&t.length>0?("string"==typeof t||o.objectMode||Object.getPrototypeOf(t)===c.prototype||(t=function(e){return c.from(e)}(t)),i?o.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):w(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?w(e,o,t,!1):A(e,o)):w(e,o,t,!1))):i||(o.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.lengtht.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 P(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(l("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?n.nextTick(k,e):k(e))}function k(e){l("emit readable"),e.emit("readable"),M(e)}function A(e,t){t.readingMore||(t.readingMore=!0,n.nextTick(x,e,t))}function x(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=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 i;ea.length?a.length:e;if(o===a.length?n+=a:n+=a.slice(0,e),0===(e-=o)){o===a.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=a.slice(o));break}++i}return t.length-=i,n}(e,t):function(e,t){var r=c.allocUnsafe(e),i=t.head,n=1;i.data.copy(r),e-=i.data.length;for(;i=i.next;){var a=i.data,o=e>a.length?a.length:e;if(a.copy(r,r.length-e,0,o),0===(e-=o)){o===a.length?(++n,i.next?t.head=i.next:t.head=t.tail=null):(t.head=i,i.data=a.slice(o));break}++n}return t.length-=n,r}(e,t);return i}(e,t.buffer,t.decoder),r);var r}function T(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,n.nextTick(D,t,e))}function D(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function C(e,t){for(var r=0,i=e.length;r=t.highWaterMark||t.ended))return l("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?T(this):P(this),null;if(0===(e=S(e,t))&&t.ended)return 0===t.length&&T(this),null;var i,n=t.needReadable;return l("need readable",n),(0===t.length||t.length-e0?R(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&T(this)),null!==i&&this.emit("data",i),i},y.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},y.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,l("pipe count=%d opts=%j",a.pipesCount,t);var f=(!t||!1!==t.end)&&e!==i.stdout&&e!==i.stderr?u:y;function c(t,i){l("onunpipe"),t===r&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,l("cleanup"),e.removeListener("close",v),e.removeListener("finish",g),e.removeListener("drain",h),e.removeListener("error",b),e.removeListener("unpipe",c),r.removeListener("end",u),r.removeListener("end",y),r.removeListener("data",m),d=!0,!a.awaitDrain||e._writableState&&!e._writableState.needDrain||h())}function u(){l("onend"),e.end()}a.endEmitted?n.nextTick(f):r.once("end",f),e.on("unpipe",c);var h=function(e){return function(){var t=e._readableState;l("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&s(e,"data")&&(t.flowing=!0,M(e))}}(r);e.on("drain",h);var d=!1;var p=!1;function m(t){l("ondata"),p=!1,!1!==e.write(t)||p||((1===a.pipesCount&&a.pipes===e||a.pipesCount>1&&-1!==C(a.pipes,e))&&!d&&(l("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,p=!0),r.pause())}function b(t){l("onerror",t),y(),e.removeListener("error",b),0===s(e,"error")&&e.emit("error",t)}function v(){e.removeListener("finish",g),y()}function g(){l("onfinish"),e.removeListener("close",v),y()}function y(){l("unpipe"),r.unpipe(e)}return r.on("data",m),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",b),e.once("close",v),e.once("finish",g),e.emit("pipe",r),a.flowing||(l("pipe resume"),r.resume()),e},y.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?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this);if(!e){var i=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a=f?o=new RangeError(c):t=i.concat(n,a),n=[],e.close(),r(o,t)}e.on("error",(function(t){e.removeListener("end",s),e.removeListener("readable",o),r(t)})),e.on("end",s),e.end(t),o()}function g(e,t){if("string"==typeof t&&(t=i.from(t)),!i.isBuffer(t))throw new TypeError("Not a string or buffer");var r=e._finishFlushFlag;return e._processChunk(t,r)}function y(e){if(!(this instanceof y))return new y(e);x.call(this,e,a.DEFLATE)}function _(e){if(!(this instanceof _))return new _(e);x.call(this,e,a.INFLATE)}function w(e){if(!(this instanceof w))return new w(e);x.call(this,e,a.GZIP)}function E(e){if(!(this instanceof E))return new E(e);x.call(this,e,a.GUNZIP)}function S(e){if(!(this instanceof S))return new S(e);x.call(this,e,a.DEFLATERAW)}function P(e){if(!(this instanceof P))return new P(e);x.call(this,e,a.INFLATERAW)}function k(e){if(!(this instanceof k))return new k(e);x.call(this,e,a.UNZIP)}function A(e){return e===a.Z_NO_FLUSH||e===a.Z_PARTIAL_FLUSH||e===a.Z_SYNC_FLUSH||e===a.Z_FULL_FLUSH||e===a.Z_FINISH||e===a.Z_BLOCK}function x(e,r){var o=this;if(this._opts=e=e||{},this._chunkSize=e.chunkSize||t.Z_DEFAULT_CHUNK,n.call(this,e),e.flush&&!A(e.flush))throw new Error("Invalid flush flag: "+e.flush);if(e.finishFlush&&!A(e.finishFlush))throw new Error("Invalid flush flag: "+e.finishFlush);if(this._flushFlag=e.flush||a.Z_NO_FLUSH,this._finishFlushFlag=void 0!==e.finishFlush?e.finishFlush:a.Z_FINISH,e.chunkSize&&(e.chunkSizet.Z_MAX_CHUNK))throw new Error("Invalid chunk size: "+e.chunkSize);if(e.windowBits&&(e.windowBitst.Z_MAX_WINDOWBITS))throw new Error("Invalid windowBits: "+e.windowBits);if(e.level&&(e.levelt.Z_MAX_LEVEL))throw new Error("Invalid compression level: "+e.level);if(e.memLevel&&(e.memLevelt.Z_MAX_MEMLEVEL))throw new Error("Invalid memLevel: "+e.memLevel);if(e.strategy&&e.strategy!=t.Z_FILTERED&&e.strategy!=t.Z_HUFFMAN_ONLY&&e.strategy!=t.Z_RLE&&e.strategy!=t.Z_FIXED&&e.strategy!=t.Z_DEFAULT_STRATEGY)throw new Error("Invalid strategy: "+e.strategy);if(e.dictionary&&!i.isBuffer(e.dictionary))throw new Error("Invalid dictionary: it should be a Buffer instance");this._handle=new a.Zlib(r);var s=this;this._hadError=!1,this._handle.onerror=function(e,r){I(s),s._hadError=!0;var i=new Error(e);i.errno=r,i.code=t.codes[r],s.emit("error",i)};var f=t.Z_DEFAULT_COMPRESSION;"number"==typeof e.level&&(f=e.level);var c=t.Z_DEFAULT_STRATEGY;"number"==typeof e.strategy&&(c=e.strategy),this._handle.init(e.windowBits||t.Z_DEFAULT_WINDOWBITS,f,e.memLevel||t.Z_DEFAULT_MEMLEVEL,c,e.dictionary),this._buffer=i.allocUnsafe(this._chunkSize),this._offset=0,this._level=f,this._strategy=c,this.once("end",this.close),Object.defineProperty(this,"_closed",{get:function(){return!o._handle},configurable:!0,enumerable:!0})}function I(t,r){r&&e.nextTick(r),t._handle&&(t._handle.close(),t._handle=null)}function O(e){e.emit("close")}Object.defineProperty(t,"codes",{enumerable:!0,value:Object.freeze(l),writable:!1}),t.Deflate=y,t.Inflate=_,t.Gzip=w,t.Gunzip=E,t.DeflateRaw=S,t.InflateRaw=P,t.Unzip=k,t.createDeflate=function(e){return new y(e)},t.createInflate=function(e){return new _(e)},t.createDeflateRaw=function(e){return new S(e)},t.createInflateRaw=function(e){return new P(e)},t.createGzip=function(e){return new w(e)},t.createGunzip=function(e){return new E(e)},t.createUnzip=function(e){return new k(e)},t.deflate=function(e,t,r){return"function"==typeof t&&(r=t,t={}),v(new y(t),e,r)},t.deflateSync=function(e,t){return g(new y(t),e)},t.gzip=function(e,t,r){return"function"==typeof t&&(r=t,t={}),v(new w(t),e,r)},t.gzipSync=function(e,t){return g(new w(t),e)},t.deflateRaw=function(e,t,r){return"function"==typeof t&&(r=t,t={}),v(new S(t),e,r)},t.deflateRawSync=function(e,t){return g(new S(t),e)},t.unzip=function(e,t,r){return"function"==typeof t&&(r=t,t={}),v(new k(t),e,r)},t.unzipSync=function(e,t){return g(new k(t),e)},t.inflate=function(e,t,r){return"function"==typeof t&&(r=t,t={}),v(new _(t),e,r)},t.inflateSync=function(e,t){return g(new _(t),e)},t.gunzip=function(e,t,r){return"function"==typeof t&&(r=t,t={}),v(new E(t),e,r)},t.gunzipSync=function(e,t){return g(new E(t),e)},t.inflateRaw=function(e,t,r){return"function"==typeof t&&(r=t,t={}),v(new P(t),e,r)},t.inflateRawSync=function(e,t){return g(new P(t),e)},o.inherits(x,n),x.prototype.params=function(r,i,n){if(rt.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+r);if(i!=t.Z_FILTERED&&i!=t.Z_HUFFMAN_ONLY&&i!=t.Z_RLE&&i!=t.Z_FIXED&&i!=t.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+i);if(this._level!==r||this._strategy!==i){var o=this;this.flush(a.Z_SYNC_FLUSH,(function(){s(o._handle,"zlib binding closed"),o._handle.params(r,i),o._hadError||(o._level=r,o._strategy=i,n&&n())}))}else e.nextTick(n)},x.prototype.reset=function(){return s(this._handle,"zlib binding closed"),this._handle.reset()},x.prototype._flush=function(e){this._transform(i.alloc(0),"",e)},x.prototype.flush=function(t,r){var n=this,o=this._writableState;("function"==typeof t||void 0===t&&!r)&&(r=t,t=a.Z_FULL_FLUSH),o.ended?r&&e.nextTick(r):o.ending?r&&this.once("end",r):o.needDrain?r&&this.once("drain",(function(){return n.flush(t,r)})):(this._flushFlag=t,this.write(i.alloc(0),"",r))},x.prototype.close=function(t){I(this,t),e.nextTick(O,this)},x.prototype._transform=function(e,t,r){var n,o=this._writableState,s=(o.ending||o.ended)&&(!e||o.length===e.length);return null===e||i.isBuffer(e)?this._handle?(s?n=this._finishFlushFlag:(n=this._flushFlag,e.length>=o.length&&(this._flushFlag=this._opts.flush||a.Z_NO_FLUSH)),void this._processChunk(e,n,r)):r(new Error("zlib binding closed")):r(new Error("invalid input"))},x.prototype._processChunk=function(e,t,r){var n=e&&e.length,a=this._chunkSize-this._offset,o=0,u=this,h="function"==typeof r;if(!h){var d,l=[],p=0;this.on("error",(function(e){d=e})),s(this._handle,"zlib binding closed");do{var m=this._handle.writeSync(t,e,o,n,this._buffer,this._offset,a)}while(!this._hadError&&g(m[0],m[1]));if(this._hadError)throw d;if(p>=f)throw I(this),new RangeError(c);var b=i.concat(l,p);return I(this),b}s(this._handle,"zlib binding closed");var v=this._handle.write(t,e,o,n,this._buffer,this._offset,a);function g(f,c){if(this&&(this.buffer=null,this.callback=null),!u._hadError){var d=a-c;if(s(d>=0,"have should not go down"),d>0){var m=u._buffer.slice(u._offset,u._offset+d);u._offset+=d,h?u.push(m):(l.push(m),p+=m.length)}if((0===c||u._offset>=u._chunkSize)&&(a=u._chunkSize,u._offset=0,u._buffer=i.allocUnsafe(u._chunkSize)),0===c){if(o+=n-f,n=f,!h)return!0;var b=u._handle.write(t,e,o,n,u._buffer,u._offset,u._chunkSize);return b.callback=g,void(b.buffer=e)}if(!h)return!1;r()}}v.buffer=e,v.callback=g},o.inherits(y,x),o.inherits(_,x),o.inherits(w,x),o.inherits(E,x),o.inherits(S,x),o.inherits(P,x),o.inherits(k,x)}).call(this,r(4))},function(e,t,r){"use strict";e.exports=function(e,t,r,i){for(var n=65535&e|0,a=e>>>16&65535|0,o=0;0!==r;){r-=o=r>2e3?2e3:r;do{a=a+(n=n+t[i++]|0)|0}while(--o);n%=65521,a%=65521}return n|a<<16|0}},function(e,t,r){"use strict";var i=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var i=0;i<8;i++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();e.exports=function(e,t,r,n){var a=i,o=n+r;e^=-1;for(var s=n;s>>8^a[255&(e^t[s])];return-1^e}},function(e,t,r){var i=r(1).Buffer,n=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];function a(e){if(i.isBuffer(e))return e;var t="function"==typeof i.alloc&&"function"==typeof i.from;if("number"==typeof e)return t?i.alloc(e):new i(e);if("string"==typeof e)return t?i.from(e):new i(e);throw new Error("input must be buffer, number, or string, received "+typeof e)}function o(e,t){e=a(e),i.isBuffer(t)&&(t=t.readUInt32BE(0));for(var r=-1^~~t,o=0;o>>8;return-1^r}function s(){return e=o.apply(null,arguments),(t=a(4)).writeInt32BE(e,0),t;var e,t}"undefined"!=typeof Int32Array&&(n=new Int32Array(n)),s.signed=function(){return o.apply(null,arguments)},s.unsigned=function(){return o.apply(null,arguments)>>>0},e.exports=s},function(e,t,r){"use strict";const{createDownloadUrls:i}=r(73),{UPLOAD_FAILURE:n,UPLOAD_PPK:a,UPLOAD_PPK_START:o,UPLOAD_PLUGIN:s,UPLOAD_PLUGIN_START:f,CREATE_PLUGIN_ZIP:c,CREATE_PLUGIN_ZIP_START:u,CREATE_PLUGIN_ZIP_FAILURE:h,RESET:d}=r(117),l=e=>`${e.contents.name.replace(/\.\w+$/,"")}.${e.plugin.id}`;e.exports={reducer:(e={contents:{data:null,name:null},ppk:{data:null,name:null},plugin:{id:null,url:{contents:null,ppk:null}},error:null,loading:!1},t)=>{switch(t.type){case o:{const{ppk:t,plugin:r}={contents:{data:null,name:null},ppk:{data:null,name:null},plugin:{id:null,url:{contents:null,ppk:null}},error:null,loading:!1};return Object.assign({},e,{ppk:t,plugin:r,error:null})}case a:return Object.assign({},e,{ppk:t.payload});case f:{const{contents:t,plugin:r}={contents:{data:null,name:null},ppk:{data:null,name:null},plugin:{id:null,url:{contents:null,ppk:null}},error:null,loading:!1};return Object.assign({},e,{contents:t,plugin:r,error:null})}case s:return Object.assign({},e,{contents:t.payload});case u:return Object.assign({},e,{plugin:{id:null,url:{contents:null,ppk:null}},error:null,loading:!0});case c:return Object.assign({},e,{ppk:{data:t.payload.privateKey,name:e.ppk.name||`${t.payload.id}.ppk`},plugin:{id:t.payload.id,url:i(t.payload)},loading:!1});case n:case h:return Object.assign({},e,{error:t.payload,loading:!1});case d:return{contents:{data:null,name:null},ppk:{data:null,name:null},plugin:{id:null,url:{contents:null,ppk:null}},error:null,loading:!1};default:return e}},getDownloadPluginZipName:e=>`${l(e)}.plugin.zip`,getDownloadPPKFileName:e=>`${l(e)}.private.ppk`}},function(e,t,r){"use strict";(function(t){const i=r(152),{rezip:n}=r(107),{createDownloadUrl:a,revokeDownloadUrl:o}=r(62),s=(e,r)=>e?n(t.from(e)).then(e=>i(e,r)):Promise.resolve(),f=s;e.exports={generatePluginZip:s,validatePlugin:f,createDownloadUrls:e=>({contents:a(e.plugin,"application/zip"),ppk:a(e.privateKey,"text/plain")}),revokePluginUrls:e=>{Object.keys(e.url).forEach(t=>{o(e.url[t])})}}}).call(this,r(1).Buffer)},function(e,t,r){(function(t){ + */function n(e,t){if(e===t)return 0;for(var r=e.length,i=t.length,n=0,a=Math.min(r,i);n=0;c--)if(u[c]!==h[c])return!1;for(c=u.length-1;c>=0;c--)if(s=u[c],!y(e[s],t[s],r,i))return!1;return!0}(e,t,r,i))}return r?e===t:e==t}function _(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function w(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function E(e,t,r,i){var n;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(i=r,r=null),n=function(e){var t;try{e()}catch(e){t=e}return t}(t),i=(r&&r.name?" ("+r.name+").":".")+(i?" "+i:"."),e&&!n&&v(n,r,"Missing expected exception"+i);var a="string"==typeof i,s=!e&&n&&!r;if((!e&&o.isError(n)&&a&&w(n,r)||s)&&v(n,r,"Got unwanted exception"+i),e&&n&&r&&!w(n,r)||!e&&n)throw n}d.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=function(e){return m(b(e.actual),128)+" "+e.operator+" "+m(b(e.expected),128)}(this),this.generatedMessage=!0);var t=e.stackStartFunction||v;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var r=new Error;if(r.stack){var i=r.stack,n=p(t),a=i.indexOf("\n"+n);if(a>=0){var o=i.indexOf("\n",a+1);i=i.substring(o+1)}this.stack=i}}},o.inherits(d.AssertionError,Error),d.fail=v,d.ok=g,d.equal=function(e,t,r){e!=t&&v(e,t,r,"==",d.equal)},d.notEqual=function(e,t,r){e==t&&v(e,t,r,"!=",d.notEqual)},d.deepEqual=function(e,t,r){y(e,t,!1)||v(e,t,r,"deepEqual",d.deepEqual)},d.deepStrictEqual=function(e,t,r){y(e,t,!0)||v(e,t,r,"deepStrictEqual",d.deepStrictEqual)},d.notDeepEqual=function(e,t,r){y(e,t,!1)&&v(e,t,r,"notDeepEqual",d.notDeepEqual)},d.notDeepStrictEqual=function e(t,r,i){y(t,r,!0)&&v(t,r,i,"notDeepStrictEqual",e)},d.strictEqual=function(e,t,r){e!==t&&v(e,t,r,"===",d.strictEqual)},d.notStrictEqual=function(e,t,r){e===t&&v(e,t,r,"!==",d.notStrictEqual)},d.throws=function(e,t,r){E(!0,e,t,r)},d.doesNotThrow=function(e,t,r){E(!1,e,t,r)},d.ifError=function(e){if(e)throw e},d.strict=i((function e(t,r){t||v(t,!0,r,"==",e)}),d,{equal:d.strictEqual,deepEqual:d.deepStrictEqual,notEqual:d.notStrictEqual,notDeepEqual:d.notDeepStrictEqual}),d.strict.strict=d.strict;var S=Object.keys||function(e){var t=[];for(var r in e)s.call(e,r)&&t.push(r);return t}}).call(this,r(5))},function(e,t,r){"use strict";var i="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var r=t.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var i in r)n(r,i)&&(e[i]=r[i])}}return e},t.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var a={arraySet:function(e,t,r,i,n){if(t.subarray&&e.subarray)e.set(t.subarray(r,r+i),n);else for(var a=0;a>>24]^u[p>>>16&255]^h[m>>>8&255]^d[255&b]^t[v++],o=c[p>>>24]^u[m>>>16&255]^h[b>>>8&255]^d[255&l]^t[v++],s=c[m>>>24]^u[b>>>16&255]^h[l>>>8&255]^d[255&p]^t[v++],f=c[b>>>24]^u[l>>>16&255]^h[p>>>8&255]^d[255&m]^t[v++],l=a,p=o,m=s,b=f;return a=(i[l>>>24]<<24|i[p>>>16&255]<<16|i[m>>>8&255]<<8|i[255&b])^t[v++],o=(i[p>>>24]<<24|i[m>>>16&255]<<16|i[b>>>8&255]<<8|i[255&l])^t[v++],s=(i[m>>>24]<<24|i[b>>>16&255]<<16|i[l>>>8&255]<<8|i[255&p])^t[v++],f=(i[b>>>24]<<24|i[l>>>16&255]<<16|i[p>>>8&255]<<8|i[255&m])^t[v++],[a>>>=0,o>>>=0,s>>>=0,f>>>=0]}var s=[0,1,2,4,8,16,32,64,128,27,54],f=function(){for(var e=new Array(256),t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;for(var r=[],i=[],n=[[],[],[],[]],a=[[],[],[],[]],o=0,s=0,f=0;f<256;++f){var c=s^s<<1^s<<2^s<<3^s<<4;c=c>>>8^255&c^99,r[o]=c,i[c]=o;var u=e[o],h=e[u],d=e[h],l=257*e[c]^16843008*c;n[0][o]=l<<24|l>>>8,n[1][o]=l<<16|l>>>16,n[2][o]=l<<8|l>>>24,n[3][o]=l,l=16843009*d^65537*h^257*u^16843008*o,a[0][c]=l<<24|l>>>8,a[1][c]=l<<16|l>>>16,a[2][c]=l<<8|l>>>24,a[3][c]=l,0===o?o=s=1:(o=u^e[e[e[d^u]]],s^=e[e[s]])}return{SBOX:r,INV_SBOX:i,SUB_MIX:n,INV_SUB_MIX:a}}();function c(e){this._key=n(e),this._reset()}c.blockSize=16,c.keySize=32,c.prototype.blockSize=c.blockSize,c.prototype.keySize=c.keySize,c.prototype._reset=function(){for(var e=this._key,t=e.length,r=t+6,i=4*(r+1),n=[],a=0;a>>24,o=f.SBOX[o>>>24]<<24|f.SBOX[o>>>16&255]<<16|f.SBOX[o>>>8&255]<<8|f.SBOX[255&o],o^=s[a/t|0]<<24):t>6&&a%t==4&&(o=f.SBOX[o>>>24]<<24|f.SBOX[o>>>16&255]<<16|f.SBOX[o>>>8&255]<<8|f.SBOX[255&o]),n[a]=n[a-t]^o}for(var c=[],u=0;u>>24]]^f.INV_SUB_MIX[1][f.SBOX[d>>>16&255]]^f.INV_SUB_MIX[2][f.SBOX[d>>>8&255]]^f.INV_SUB_MIX[3][f.SBOX[255&d]]}this._nRounds=r,this._keySchedule=n,this._invKeySchedule=c},c.prototype.encryptBlockRaw=function(e){return o(e=n(e),this._keySchedule,f.SUB_MIX,f.SBOX,this._nRounds)},c.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),r=i.allocUnsafe(16);return r.writeUInt32BE(t[0],0),r.writeUInt32BE(t[1],4),r.writeUInt32BE(t[2],8),r.writeUInt32BE(t[3],12),r},c.prototype.decryptBlock=function(e){var t=(e=n(e))[1];e[1]=e[3],e[3]=t;var r=o(e,this._invKeySchedule,f.INV_SUB_MIX,f.INV_SBOX,this._nRounds),a=i.allocUnsafe(16);return a.writeUInt32BE(r[0],0),a.writeUInt32BE(r[3],4),a.writeUInt32BE(r[2],8),a.writeUInt32BE(r[1],12),a},c.prototype.scrub=function(){a(this._keySchedule),a(this._invKeySchedule),a(this._key)},e.exports.AES=c},function(e,t,r){var i=r(2).Buffer,n=r(43);e.exports=function(e,t,r,a){if(i.isBuffer(e)||(e=i.from(e,"binary")),t&&(i.isBuffer(t)||(t=i.from(t,"binary")),8!==t.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var o=r/8,s=i.alloc(o),f=i.alloc(a||0),c=i.alloc(0);o>0||a>0;){var u=new n;u.update(c),u.update(e),t&&u.update(t),c=u.digest();var h=0;if(o>0){var d=s.length-o;h=Math.min(o,c.length),c.copy(s,d,0,h),o-=h}if(h0){var l=f.length-a,p=Math.min(a,c.length-h);c.copy(f,l,h,h+p),a-=p}}return c.fill(0),{key:s,iv:f}}},function(e,t,r){"use strict";var i=r(3),n=r(9),a=n.getNAF,o=n.getJSF,s=n.assert;function f(e,t){this.type=e,this.p=new i(t.p,16),this.red=t.prime?i.red(t.prime):i.mont(this.p),this.zero=new i(0).toRed(this.red),this.one=new i(1).toRed(this.red),this.two=new i(2).toRed(this.red),this.n=t.n&&new i(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4);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 c(e,t){this.curve=e,this.type=t,this.precomputed=null}e.exports=f,f.prototype.point=function(){throw new Error("Not implemented")},f.prototype.validate=function(){throw new Error("Not implemented")},f.prototype._fixedNafMul=function(e,t){s(e.precomputed);var r=e._getDoubles(),i=a(t,1),n=(1<=f;t--)c=(c<<1)+i[t];o.push(c)}for(var u=this.jpoint(null,null,null),h=this.jpoint(null,null,null),d=n;d>0;d--){for(f=0;f=0;c--){for(t=0;c>=0&&0===o[c];c--)t++;if(c>=0&&t++,f=f.dblp(t),c<0)break;var u=o[c];s(0!==u),f="affine"===e.type?u>0?f.mixedAdd(n[u-1>>1]):f.mixedAdd(n[-u-1>>1].neg()):u>0?f.add(n[u-1>>1]):f.add(n[-u-1>>1].neg())}return"affine"===e.type?f.toP():f},f.prototype._wnafMulAdd=function(e,t,r,i,n){for(var s=this._wnafT1,f=this._wnafT2,c=this._wnafT3,u=0,h=0;h=1;h-=2){var l=h-1,p=h;if(1===s[l]&&1===s[p]){var m=[t[l],null,null,t[p]];0===t[l].y.cmp(t[p].y)?(m[1]=t[l].add(t[p]),m[2]=t[l].toJ().mixedAdd(t[p].neg())):0===t[l].y.cmp(t[p].y.redNeg())?(m[1]=t[l].toJ().mixedAdd(t[p]),m[2]=t[l].add(t[p].neg())):(m[1]=t[l].toJ().mixedAdd(t[p]),m[2]=t[l].toJ().mixedAdd(t[p].neg()));var b=[-3,-1,-5,-7,0,7,5,1,3],v=o(r[l],r[p]);u=Math.max(v[0].length,u),c[l]=new Array(u),c[p]=new Array(u);for(var g=0;g=0;h--){for(var S=0;h>=0;){var P=!0;for(g=0;g=0&&S++,w=w.dblp(S),h<0)break;for(g=0;g0?k=f[g][A-1>>1]:A<0&&(k=f[g][-A-1>>1].neg()),w="affine"===k.type?w.mixedAdd(k):w.add(k))}}for(h=0;h=Math.ceil((e.bitLength()+1)/t.step)},c.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],i=this,n=0;n1073741823)throw new Error("buffer too large: "+t.length+" > 1073741823");if(null==i&&(i={}),null!=i.size)throw new Error("options.size not allowed");var a=new w(r,!1,i);function o(t){a.compressedSize=t.length,a.setFileDataPumpFunction((function(){l(n,t),l(n,a.getDataDescriptor()),a.state=w.FILE_DATA_DONE,e((function(){m(n)}))})),m(n)}a.uncompressedSize=t.length,a.crc32=u.unsigned(t),a.crcAndFileSizeKnown=!0,n.entries.push(a),a.compress?s.deflateRaw(t,(function(e,t){o(t)})):o(t)},h.prototype.addEmptyDirectory=function(e,t){var r=this;if(e=y(e,!0),null==t&&(t={}),null!=t.size)throw new Error("options.size not allowed");if(null!=t.compress)throw new Error("options.compress not allowed");var i=new w(e,!0,t);r.entries.push(i),i.setFileDataPumpFunction((function(){l(r,i.getDataDescriptor()),i.state=w.FILE_DATA_DONE,m(r)})),m(r)};var d=B([80,75,5,6]);function l(e,t){e.outputStream.write(t),e.outputStreamCursor+=t.length}function p(e,t,r){var i=new T,n=new R,a=t.compress?new s.DeflateRaw:new o,f=new R;r.pipe(i).pipe(n).pipe(a).pipe(f).pipe(e.outputStream,{end:!1}),f.on("end",(function(){if(t.crc32=i.crc32,null==t.uncompressedSize)t.uncompressedSize=n.byteCount;else if(t.uncompressedSize!==n.byteCount)return e.emit("error",new Error("file data stream has unexpected number of bytes"));t.compressedSize=f.byteCount,e.outputStreamCursor+=t.compressedSize,l(e,t.getDataDescriptor()),t.state=w.FILE_DATA_DONE,m(e)}))}function m(e){if(!e.allDone){if(e.ended&&null!=e.finalSizeCallback){var t=function(e){for(var t=0,r=0,i=0;i=w.READY_TO_PUMP_FILE_DATA){if(null==n.uncompressedSize)return-1}else if(null==n.uncompressedSize)return null;n.relativeOffsetOfLocalHeader=t;var a=n.useZip64Format();t+=E+n.utf8FileName.length,t+=n.uncompressedSize,n.crcAndFileSizeKnown||(t+=a?A:k),r+=x+n.utf8FileName.length+n.fileComment.length,a&&(r+=I)}var o=0;(e.forceZip64Eocd||e.entries.length>=65535||r>=65535||t>=4294967295)&&(o+=b+v);return o+=g+e.comment.length,t+r+o}(e);null!=t&&(e.finalSizeCallback(t),e.finalSizeCallback=null)}var r=function(){for(var t=0;t=65535)&&(n=65535,r=!0);var a=e.outputStreamCursor-e.offsetOfStartOfCentralDirectory,o=a;(e.forceZip64Eocd||a>=4294967295)&&(o=4294967295,r=!0);var s=e.offsetOfStartOfCentralDirectory;(e.forceZip64Eocd||e.offsetOfStartOfCentralDirectory>=4294967295)&&(s=4294967295,r=!0);if(t)return r?b+v+g:g;var f=L(g+e.comment.length);if(f.writeUInt32LE(101010256,0),f.writeUInt16LE(0,4),f.writeUInt16LE(0,6),f.writeUInt16LE(n,8),f.writeUInt16LE(n,10),f.writeUInt32LE(o,12),f.writeUInt32LE(s,16),f.writeUInt16LE(e.comment.length,20),e.comment.copy(f,22),!r)return f;var c=L(b);c.writeUInt32LE(101075792,0),M(c,b-12,4),c.writeUInt16LE(P,12),c.writeUInt16LE(S,14),c.writeUInt32LE(0,16),c.writeUInt32LE(0,20),M(c,e.entries.length,24),M(c,e.entries.length,32),M(c,a,40),M(c,e.offsetOfStartOfCentralDirectory,48);var u=L(v);return u.writeUInt32LE(117853008,0),u.writeUInt32LE(0,4),M(u,e.outputStreamCursor,8),u.writeUInt32LE(1,16),i.concat([c,u,f])}(e)),e.outputStream.end(),e.allDone=!0)}}h.prototype.end=function(e,t){if("function"==typeof e&&(t=e,e=null),null==e&&(e={}),!this.ended){if(this.ended=!0,this.finalSizeCallback=t,this.forceZip64Eocd=!!e.forceZip64Format,e.comment){if("string"==typeof e.comment?this.comment=function(e){if(/^[\x20-\x7e]*$/.test(e))return B(e,"utf-8");if(null==C){C={};for(var t=0;t65535)throw new Error("comment is too large");if(N(this.comment,d))throw new Error("comment contains end of central directory record signature")}else this.comment=_;m(this)}};var b=56,v=20,g=22;function y(e,t){if(""===e)throw new Error("empty metadataPath");if(e=e.replace(/\\/g,"/"),/^[a-zA-Z]:/.test(e)||/^\//.test(e))throw new Error("absolute path: "+e);if(-1!==e.split("/").indexOf(".."))throw new Error("invalid relative path: "+e);var r=/\/$/.test(e);if(t)r||(e+="/");else if(r)throw new Error("file path cannot end with '/': "+e);return e}var _=L(0);function w(e,t,r){if(this.utf8FileName=B(e),this.utf8FileName.length>65535)throw new Error("utf8 file name too long. "+utf8FileName.length+" > 65535");if(this.isDirectory=t,this.state=w.WAITING_FOR_METADATA,this.setLastModDate(null!=r.mtime?r.mtime:new Date),null!=r.mode?this.setFileAttributesMode(r.mode):this.setFileAttributesMode(t?16893:33204),t?(this.crcAndFileSizeKnown=!0,this.crc32=0,this.uncompressedSize=0,this.compressedSize=0):(this.crcAndFileSizeKnown=!1,this.crc32=null,this.uncompressedSize=null,this.compressedSize=null,null!=r.size&&(this.uncompressedSize=r.size)),t?this.compress=!1:(this.compress=!0,null!=r.compress&&(this.compress=!!r.compress)),this.forceZip64Format=!!r.forceZip64Format,r.fileComment){if("string"==typeof r.fileComment?this.fileComment=B(r.fileComment,"utf-8"):this.fileComment=r.fileComment,this.fileComment.length>65535)throw new Error("fileComment is too large")}else this.fileComment=_}w.WAITING_FOR_METADATA=0,w.READY_TO_PUMP_FILE_DATA=1,w.FILE_DATA_IN_PROGRESS=2,w.FILE_DATA_DONE=3,w.prototype.setLastModDate=function(e){var t=O(e);this.lastModFileTime=t.time,this.lastModFileDate=t.date},w.prototype.setFileAttributesMode=function(e){if((65535&e)!==e)throw new Error("invalid mode. expected: 0 <= "+e+" <= 65535");this.externalFileAttributes=e<<16>>>0},w.prototype.setFileDataPumpFunction=function(e){this.doFileDataPump=e,this.state=w.READY_TO_PUMP_FILE_DATA},w.prototype.useZip64Format=function(){return this.forceZip64Format||null!=this.uncompressedSize&&this.uncompressedSize>4294967294||null!=this.compressedSize&&this.compressedSize>4294967294||null!=this.relativeOffsetOfLocalHeader&&this.relativeOffsetOfLocalHeader>4294967294};var E=30,S=45,P=831;w.prototype.getLocalFileHeader=function(){var e=0,t=0,r=0;this.crcAndFileSizeKnown&&(e=this.crc32,t=this.compressedSize,r=this.uncompressedSize);var n=L(E),a=2048;return this.crcAndFileSizeKnown||(a|=8),n.writeUInt32LE(67324752,0),n.writeUInt16LE(20,4),n.writeUInt16LE(a,6),n.writeUInt16LE(this.getCompressionMethod(),8),n.writeUInt16LE(this.lastModFileTime,10),n.writeUInt16LE(this.lastModFileDate,12),n.writeUInt32LE(e,14),n.writeUInt32LE(t,18),n.writeUInt32LE(r,22),n.writeUInt16LE(this.utf8FileName.length,26),n.writeUInt16LE(0,28),i.concat([n,this.utf8FileName])};var k=16,A=24;w.prototype.getDataDescriptor=function(){return this.crcAndFileSizeKnown?_:this.useZip64Format()?((e=L(A)).writeUInt32LE(134695760,0),e.writeUInt32LE(this.crc32,4),M(e,this.compressedSize,8),M(e,this.uncompressedSize,16),e):((e=L(k)).writeUInt32LE(134695760,0),e.writeUInt32LE(this.crc32,4),e.writeUInt32LE(this.compressedSize,8),e.writeUInt32LE(this.uncompressedSize,12),e);var e};var x=46,I=28;function O(e){var t=0;t|=31&e.getDate(),t|=(e.getMonth()+1&15)<<5,t|=(e.getFullYear()-1980&127)<<9;var r=0;return r|=Math.floor(e.getSeconds()/2),r|=(63&e.getMinutes())<<5,{date:t,time:r|=(31&e.getHours())<<11}}function M(e,t,r){var i=Math.floor(t/4294967296),n=t%4294967296;e.writeUInt32LE(n,r),e.writeUInt32LE(i,r+4)}function R(e){a.call(this,e),this.byteCount=0}function T(e){a.call(this,e),this.crc32=0}w.prototype.getCentralDirectoryRecord=function(){var e=L(x),t=2048;this.crcAndFileSizeKnown||(t|=8);var r,n,a=this.compressedSize,o=this.uncompressedSize,s=this.relativeOffsetOfLocalHeader;return this.useZip64Format()?(a=4294967295,o=4294967295,s=4294967295,r=S,(n=L(I)).writeUInt16LE(1,0),n.writeUInt16LE(I-4,2),M(n,this.uncompressedSize,4),M(n,this.compressedSize,12),M(n,this.relativeOffsetOfLocalHeader,20)):(r=20,n=_),e.writeUInt32LE(33639248,0),e.writeUInt16LE(P,4),e.writeUInt16LE(r,6),e.writeUInt16LE(t,8),e.writeUInt16LE(this.getCompressionMethod(),10),e.writeUInt16LE(this.lastModFileTime,12),e.writeUInt16LE(this.lastModFileDate,14),e.writeUInt32LE(this.crc32,16),e.writeUInt32LE(a,20),e.writeUInt32LE(o,24),e.writeUInt16LE(this.utf8FileName.length,28),e.writeUInt16LE(n.length,30),e.writeUInt16LE(this.fileComment.length,32),e.writeUInt16LE(0,34),e.writeUInt16LE(0,36),e.writeUInt32LE(this.externalFileAttributes,38),e.writeUInt32LE(s,42),i.concat([e,this.utf8FileName,n,this.fileComment])},w.prototype.getCompressionMethod=function(){return this.compress?8:0},f.inherits(R,a),R.prototype._transform=function(e,t,r){this.byteCount+=e.length,r(null,e)},f.inherits(T,a),T.prototype._transform=function(e,t,r){this.crc32=u.unsigned(e,this.crc32),r(null,e)};var D="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ";if(256!==D.length)throw new Error("assertion failure");var C=null;function L(e){L=function(e){return i.allocUnsafe(e)};try{return L(e)}catch(t){return(L=function(e){return new i(e)})(e)}}function B(e,t){B=function(e,t){return i.from(e,t)};try{return B(e,t)}catch(r){return(B=function(e,t){return new i(e,t)})(e,t)}}function N(e,t){N=function(e,t){return e.includes(t)};try{return N(e,t)}catch(r){return(N=function(e,t){for(var r=0;r<=e.length-t.length;r++)for(var i=0;;i++){if(i===t.length)return!0;if(e[r+i]!==t[i])break}return!1})(e,t)}}}).call(this,r(27).setImmediate,r(1).Buffer)},function(e,t){},function(e,t,r){(t=e.exports=r(64)).Stream=t,t.Readable=t,t.Writable=r(39),t.Duplex=r(13),t.Transform=r(67),t.PassThrough=r(132)},function(e,t,r){"use strict";(function(t,i,n){var a=r(28);function o(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var i=e.entry;e.entry=null;for(;i;){var n=i.callback;t.pendingcb--,n(r),i=i.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}(t,e)}}e.exports=g;var s,f=!t.browser&&["v0.10","v0.9."].indexOf(t.version.slice(0,5))>-1?i:a.nextTick;g.WritableState=v;var c=r(20);c.inherits=r(0);var u={deprecate:r(130)},h=r(65),d=r(2).Buffer,l=n.Uint8Array||function(){};var p,m=r(66);function b(){}function v(e,t){s=s||r(13),e=e||{};var i=t instanceof s;this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var n=e.highWaterMark,c=e.writableHighWaterMark,u=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:i&&(c||0===c)?c:u,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,i=r.sync,n=r.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,i,n){--t.pendingcb,r?(a.nextTick(n,i),a.nextTick(P,e,t),e._writableState.errorEmitted=!0,e.emit("error",i)):(n(i),e._writableState.errorEmitted=!0,e.emit("error",i),P(e,t))}(e,r,i,t,n);else{var o=E(r);o||r.corked||r.bufferProcessing||!r.bufferedRequest||w(e,r),i?f(_,e,r,o,n):_(e,r,o,n)}}(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 g(e){if(s=s||r(13),!(p.call(g,this)||this instanceof s))return new g(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)),h.call(this)}function y(e,t,r,i,n,a,o){t.writelen=i,t.writecb=o,t.writing=!0,t.sync=!0,r?e._writev(n,t.onwrite):e._write(n,a,t.onwrite),t.sync=!1}function _(e,t,r,i){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,i(),P(e,t)}function w(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var i=t.bufferedRequestCount,n=new Array(i),a=t.corkedRequestsFree;a.entry=r;for(var s=0,f=!0;r;)n[s]=r,r.isBuf||(f=!1),r=r.next,s+=1;n.allBuffers=f,y(e,t,!0,t.length,n,"",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 c=r.chunk,u=r.encoding,h=r.callback;if(y(e,t,!1,t.objectMode?1:c.length,c,u,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"),P(e,t)}))}function P(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}c.inherits(g,h),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:u.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]?(p=Function.prototype[Symbol.hasInstance],Object.defineProperty(g,Symbol.hasInstance,{value:function(e){return!!p.call(this,e)||this===g&&(e&&e._writableState instanceof v)}})):p=function(e){return e instanceof this},g.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},g.prototype.write=function(e,t,r){var i,n=this._writableState,o=!1,s=!n.objectMode&&(i=e,d.isBuffer(i)||i instanceof l);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=n.defaultEncoding),"function"!=typeof r&&(r=b),n.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,i){var n=!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(i,o),n=!1),n}(this,n,e,r))&&(n.pendingcb++,o=function(e,t,r,i,n,a){if(!r){var o=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=d.from(t,r));return t}(t,i,n);i!==o&&(r=!0,n="buffer",i=o)}var s=t.objectMode?1:i.length;t.length+=s;var f=t.length-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(g.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),g.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},g.prototype._writev=null,g.prototype.end=function(e,t,r){var i=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||i.finished||function(e,t,r){t.ending=!0,P(e,t),r&&(t.finished?a.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,i,r)},Object.defineProperty(g.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),g.prototype.destroy=m.destroy,g.prototype._undestroy=m.undestroy,g.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,r(4),r(27).setImmediate,r(5))},function(e,t,r){"use strict";var i=r(131).Buffer,n=i.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&&(i.isEncoding===n||!n(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=f,this.end=c,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=u,this.end=h,t=3;break;default:return this.write=d,void(this.end=l)}this.lastNeed=0,this.lastTotal=0,this.lastChar=i.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,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(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 f(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=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 c(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 u(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 d(e){return e.toString(this.encoding)}function l(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=0)return n>0&&(e.lastNeed=n-1),n;if(--i=0)return n>0&&(e.lastNeed=n-2),n;if(--i=0)return n>0&&(2===n?n=0:e.lastNeed=n-3),n;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var i=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,i),e.toString("utf8",t,i)},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";e.exports=r(42),e.exports.ReadableStreamBuffer=r(149),e.exports.WritableStreamBuffer=r(150)},function(e,t,r){"use strict";e.exports={DEFAULT_INITIAL_SIZE:8192,DEFAULT_INCREMENT_AMOUNT:8192,DEFAULT_FREQUENCY:1,DEFAULT_CHUNK_SIZE:1024}},function(e,t,r){"use strict";var i=r(0),n=r(75),a=r(2).Buffer,o=new Array(16);function s(){n.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function f(e,t){return e<>>32-t}function c(e,t,r,i,n,a,o){return f(e+(t&r|~t&i)+n+a|0,o)+t|0}function u(e,t,r,i,n,a,o){return f(e+(t&i|r&~i)+n+a|0,o)+t|0}function h(e,t,r,i,n,a,o){return f(e+(t^r^i)+n+a|0,o)+t|0}function d(e,t,r,i,n,a,o){return f(e+(r^(t|~i))+n+a|0,o)+t|0}i(s,n),s.prototype._update=function(){for(var e=o,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var r=this._a,i=this._b,n=this._c,a=this._d;r=c(r,i,n,a,e[0],3614090360,7),a=c(a,r,i,n,e[1],3905402710,12),n=c(n,a,r,i,e[2],606105819,17),i=c(i,n,a,r,e[3],3250441966,22),r=c(r,i,n,a,e[4],4118548399,7),a=c(a,r,i,n,e[5],1200080426,12),n=c(n,a,r,i,e[6],2821735955,17),i=c(i,n,a,r,e[7],4249261313,22),r=c(r,i,n,a,e[8],1770035416,7),a=c(a,r,i,n,e[9],2336552879,12),n=c(n,a,r,i,e[10],4294925233,17),i=c(i,n,a,r,e[11],2304563134,22),r=c(r,i,n,a,e[12],1804603682,7),a=c(a,r,i,n,e[13],4254626195,12),n=c(n,a,r,i,e[14],2792965006,17),r=u(r,i=c(i,n,a,r,e[15],1236535329,22),n,a,e[1],4129170786,5),a=u(a,r,i,n,e[6],3225465664,9),n=u(n,a,r,i,e[11],643717713,14),i=u(i,n,a,r,e[0],3921069994,20),r=u(r,i,n,a,e[5],3593408605,5),a=u(a,r,i,n,e[10],38016083,9),n=u(n,a,r,i,e[15],3634488961,14),i=u(i,n,a,r,e[4],3889429448,20),r=u(r,i,n,a,e[9],568446438,5),a=u(a,r,i,n,e[14],3275163606,9),n=u(n,a,r,i,e[3],4107603335,14),i=u(i,n,a,r,e[8],1163531501,20),r=u(r,i,n,a,e[13],2850285829,5),a=u(a,r,i,n,e[2],4243563512,9),n=u(n,a,r,i,e[7],1735328473,14),r=h(r,i=u(i,n,a,r,e[12],2368359562,20),n,a,e[5],4294588738,4),a=h(a,r,i,n,e[8],2272392833,11),n=h(n,a,r,i,e[11],1839030562,16),i=h(i,n,a,r,e[14],4259657740,23),r=h(r,i,n,a,e[1],2763975236,4),a=h(a,r,i,n,e[4],1272893353,11),n=h(n,a,r,i,e[7],4139469664,16),i=h(i,n,a,r,e[10],3200236656,23),r=h(r,i,n,a,e[13],681279174,4),a=h(a,r,i,n,e[0],3936430074,11),n=h(n,a,r,i,e[3],3572445317,16),i=h(i,n,a,r,e[6],76029189,23),r=h(r,i,n,a,e[9],3654602809,4),a=h(a,r,i,n,e[12],3873151461,11),n=h(n,a,r,i,e[15],530742520,16),r=d(r,i=h(i,n,a,r,e[2],3299628645,23),n,a,e[0],4096336452,6),a=d(a,r,i,n,e[7],1126891415,10),n=d(n,a,r,i,e[14],2878612391,15),i=d(i,n,a,r,e[5],4237533241,21),r=d(r,i,n,a,e[12],1700485571,6),a=d(a,r,i,n,e[3],2399980690,10),n=d(n,a,r,i,e[10],4293915773,15),i=d(i,n,a,r,e[1],2240044497,21),r=d(r,i,n,a,e[8],1873313359,6),a=d(a,r,i,n,e[15],4264355552,10),n=d(n,a,r,i,e[6],2734768916,15),i=d(i,n,a,r,e[13],1309151649,21),r=d(r,i,n,a,e[4],4149444226,6),a=d(a,r,i,n,e[11],3174756917,10),n=d(n,a,r,i,e[2],718787259,15),i=d(i,n,a,r,e[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+i|0,this._c=this._c+n|0,this._d=this._d+a|0},s.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=a.allocUnsafe(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=s},function(e,t,r){"use strict";var i=r(1).Buffer,n=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],f=[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],c=[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],u=[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],d=[1352829926,1548603684,1836072691,2053994217,0];function l(){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<>>32-t}function m(e,t,r,i,n,a,o,s){return p(e+(t^r^i)+a+o|0,s)+n|0}function b(e,t,r,i,n,a,o,s){return p(e+(t&r|~t&i)+a+o|0,s)+n|0}function v(e,t,r,i,n,a,o,s){return p(e+((t|~r)^i)+a+o|0,s)+n|0}function g(e,t,r,i,n,a,o,s){return p(e+(t&i|r&~i)+a+o|0,s)+n|0}function y(e,t,r,i,n,a,o,s){return p(e+(t^(r|~i))+a+o|0,s)+n|0}n(l,a),l.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,i=0|this._b,n=0|this._c,a=0|this._d,l=0|this._e,_=0|this._a,w=0|this._b,E=0|this._c,S=0|this._d,P=0|this._e,k=0;k<80;k+=1){var A,x;k<16?(A=m(r,i,n,a,l,e[s[k]],h[0],c[k]),x=y(_,w,E,S,P,e[f[k]],d[0],u[k])):k<32?(A=b(r,i,n,a,l,e[s[k]],h[1],c[k]),x=g(_,w,E,S,P,e[f[k]],d[1],u[k])):k<48?(A=v(r,i,n,a,l,e[s[k]],h[2],c[k]),x=v(_,w,E,S,P,e[f[k]],d[2],u[k])):k<64?(A=g(r,i,n,a,l,e[s[k]],h[3],c[k]),x=b(_,w,E,S,P,e[f[k]],d[3],u[k])):(A=y(r,i,n,a,l,e[s[k]],h[4],c[k]),x=m(_,w,E,S,P,e[f[k]],d[4],u[k])),r=l,l=a,a=p(n,10),n=i,i=A,_=P,P=S,S=p(E,10),E=w,w=x}var I=this._b+n+S|0;this._b=this._c+a+P|0,this._c=this._d+l+_|0,this._d=this._e+r+w|0,this._e=this._a+i+E|0,this._a=I},l.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=i.alloc?i.alloc(20):new i(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=l},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(154),t.sha1=r(155),t.sha224=r(156),t.sha256=r(76),t.sha384=r(157),t.sha512=r(77)},function(e,t,r){"use strict";t.utils=r(163),t.Cipher=r(164),t.DES=r(165),t.CBC=r(166),t.EDE=r(167)},function(e,t,r){var i=r(168),n=r(176),a=r(87);t.createCipher=t.Cipher=i.createCipher,t.createCipheriv=t.Cipheriv=i.createCipheriv,t.createDecipher=t.Decipher=n.createDecipher,t.createDecipheriv=t.Decipheriv=n.createDecipheriv,t.listCiphers=t.getCiphers=function(){return Object.keys(a)}},function(e,t,r){var i={ECB:r(169),CBC:r(170),CFB:r(171),CFB8:r(172),CFB1:r(173),OFB:r(174),CTR:r(85),GCM:r(85)},n=r(87);for(var a in n)n[a].module=i[n[a].mode];e.exports=n},function(e,t,r){var i;function n(e){this.rand=e}if(e.exports=function(e){return i||(i=new n(null)),i.generate(e)},e.exports.Rand=n,n.prototype.generate=function(e){return this._rand(e)},n.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),r=0;r=0||!r.umod(e.prime1)||!r.umod(e.prime2);)r=new i(n(t));return r}e.exports=a,a.getr=o}).call(this,r(1).Buffer)},function(e,t,r){"use strict";var i=t;i.version=r(186).version,i.utils=r(9),i.rand=r(49),i.curve=r(93),i.curves=r(52),i.ec=r(197),i.eddsa=r(201)},function(e,t,r){"use strict";var i,n=t,a=r(53),o=r(93),s=r(9).assert;function f(e){"short"===e.type?this.curve=new o.short(e):"edwards"===e.type?this.curve=new o.edwards(e):this.curve=new o.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 c(e,t){Object.defineProperty(n,e,{configurable:!0,enumerable:!0,get:function(){var r=new f(t);return Object.defineProperty(n,e,{configurable:!0,enumerable:!0,value:r}),r}})}n.PresetCurve=f,c("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"]}),c("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"]}),c("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"]}),c("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"]}),c("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"]}),c("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"]}),c("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{i=r(196)}catch(e){i=void 0}c("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",i]})},function(e,t,r){var i=t;i.utils=r(11),i.common=r(23),i.sha=r(190),i.ripemd=r(194),i.hmac=r(195),i.sha1=i.sha.sha1,i.sha256=i.sha.sha256,i.sha224=i.sha.sha224,i.sha384=i.sha.sha384,i.sha512=i.sha.sha512,i.ripemd160=i.ripemd.ripemd160},function(e,t,r){var i=r(229);e.exports={Ber:i,BerReader:i.Reader,BerWriter:i.Writer}},function(e,t){e.exports={newInvalidAsn1Error:function(e){var t=new Error;return t.name="InvalidAsn1Error",t.message=e||"",t}}},function(e,t){e.exports={EOC:0,Boolean:1,Integer:2,BitString:3,OctetString:4,Null:5,OID:6,ObjectDescriptor:7,External:8,Real:9,Enumeration:10,PDV:11,Utf8String:12,RelativeOID:13,Sequence:16,Set:17,NumericString:18,PrintableString:19,T61String:20,VideotexString:21,IA5String:22,UTCTime:23,GeneralizedTime:24,GraphicString:25,VisibleString:26,GeneralString:28,UniversalString:29,CharacterString:30,BMPString:31,Constructor:32,Context:128}},function(e,t,r){"use strict";var i=r(251),n=r(58),a=r(19),o=r(108),s=r(253);function f(e,t,r){var i=this._refs[r];if("string"==typeof i){if(!this._refs[i])return f.call(this,e,t,i);i=this._refs[i]}if((i=i||this._schemas[r])instanceof o)return p(i.schema,this._opts.inlineRefs)?i.schema:i.validate||this._compile(i);var n,a,s,u=c.call(this,t,r);return u&&(n=u.schema,t=u.root,s=u.baseId),n instanceof o?a=n.validate||e.call(this,n.schema,t,void 0,s):void 0!==n&&(a=p(n,this._opts.inlineRefs)?n:e.call(this,n,t,void 0,s)),a}function c(e,t){var r=i.parse(t),n=b(r),a=m(this._getId(e.schema));if(0===Object.keys(e.schema).length||n!==a){var s=g(n),f=this._refs[s];if("string"==typeof f)return u.call(this,e,f,r);if(f instanceof o)f.validate||this._compile(f),e=f;else{if(!((f=this._schemas[s])instanceof o))return;if(f.validate||this._compile(f),s==g(t))return{schema:f,root:e,baseId:a};e=f}if(!e.schema)return;a=m(this._getId(e.schema))}return d.call(this,r,a,e.schema,e)}function u(e,t,r){var i=c.call(this,e,t);if(i){var n=i.schema,a=i.baseId;e=i.root;var o=this._getId(n);return o&&(a=y(a,o)),d.call(this,r,a,n,e)}}e.exports=f,f.normalizeId=g,f.fullPath=m,f.url=y,f.ids=function(e){var t=g(this._getId(e)),r={"":t},o={"":m(t,!1)},f={},c=this;return s(e,{allKeys:!0},(function(e,t,s,u,h,d,l){if(""!==t){var p=c._getId(e),m=r[u],b=o[u]+"/"+h;if(void 0!==l&&(b+="/"+("number"==typeof l?l:a.escapeFragment(l))),"string"==typeof p){p=m=g(m?i.resolve(m,p):p);var v=c._refs[p];if("string"==typeof v&&(v=c._refs[v]),v&&v.schema){if(!n(e,v.schema))throw new Error('id "'+p+'" resolves to more than one schema')}else if(p!=g(b))if("#"==p[0]){if(f[p]&&!n(e,f[p]))throw new Error('id "'+p+'" resolves to more than one schema');f[p]=e}else c._refs[p]=b}r[t]=m,o[t]=b}})),f},f.inlineRef=p,f.schema=c;var h=a.toHash(["properties","patternProperties","enum","dependencies","definitions"]);function d(e,t,r,i){if(e.fragment=e.fragment||"","/"==e.fragment.slice(0,1)){for(var n=e.fragment.split("/"),o=1;o"drop"===e.type,s=e=>new Promise((t,r)=>{e.isFile?e.file(r=>t({path:e.fullPath.replace(/^\/[^/]+?\//,""),file:r})):e.isDirectory?e.createReader().readEntries(e=>{Promise.all(e.map(e=>s(e))).then(t)}):r(new Error("Unsupported file system entry specified"))}),f=e=>new Promise((t,r)=>{const i=new FileReader;i.onload=()=>t(i.result),i.onerror=r,i.readAsArrayBuffer(e)}),c=document.querySelector.bind(document),u=document.querySelectorAll.bind(document),h=(e,...t)=>{e instanceof NodeList?e.forEach(e=>h(e,...t)):e.addEventListener(...t)};e.exports={$:c,$$:u,fileMapToBuffer:function(e){return Promise.all(Array.from(e.entries()).map(([e,t])=>f(t).then(t=>({buffer:t,path:e})))).then(e=>{const r=new n.ZipFile;return e.forEach(e=>{r.addBuffer(t.from(e.buffer),e.path)}),r.end(),r}).then(e=>new Promise(t=>{const r=new a.WritableStreamBuffer;r.on("finish",()=>{t(r.getContents())}),e.outputStream.pipe(r)}))},listen:h,revokeDownloadUrl:e=>URL.revokeObjectURL(e),createDownloadUrl:(e,t)=>URL.createObjectURL(new Blob([e],{type:t})),createFileHanlder:e=>t=>{o(t)&&t.preventDefault(),e((e=>{if(!o(e)){const t=e.target.files;return 1===t.length?Promise.resolve(t[0]):Promise.resolve({name:t[0].webkitRelativePath.replace(/\/.*/,""),entries:new Map(Array.from(t).map(e=>[e.webkitRelativePath,e]))})}if(void 0===e.dataTransfer.items||"function"!=typeof e.dataTransfer.items[0].webkitGetAsEntry){const t=e.dataTransfer.files[0];return t?-1===t.name.indexOf(".")?Promise.reject(new Error("Your browser doesn't support a directory upload")):Promise.resolve(t):Promise.reject(new Error("Unsupported file type item specified"))}return new Promise((t,r)=>{const n=e.dataTransfer.items[0];if("file"!==n.kind)return void r(new Error("Unsupported file type item specified"));const a=n.webkitGetAsEntry();a.isFile?a.file(t):a.isDirectory?s(a).then(e=>{t({name:a.name,entries:new Map(i(e).map(({path:e,file:t})=>[e,t]))})}):r(new Error("Unsupported file system entry specified"))})})(t))},readText:e=>new Promise(t=>{const r=new FileReader;r.onload=()=>t(r.result),r.readAsText(e)}),readArrayBuffer:f}}).call(this,r(1).Buffer)},function(e,t){var r={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},function(e,t,r){"use strict";(function(t,i){var n=r(28);e.exports=y;var a,o=r(63);y.ReadableState=g;r(15).EventEmitter;var s=function(e,t){return e.listeners(t).length},f=r(65),c=r(2).Buffer,u=t.Uint8Array||function(){};var h=r(20);h.inherits=r(0);var d=r(127),l=void 0;l=d&&d.debuglog?d.debuglog("stream"):function(){};var p,m=r(128),b=r(66);h.inherits(y,f);var v=["error","close","destroy","pause","resume"];function g(e,t){e=e||{};var i=t instanceof(a=a||r(13));this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var n=e.highWaterMark,o=e.readableHighWaterMark,s=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:i&&(o||0===o)?o:s,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new m,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(40).StringDecoder),this.decoder=new p(e.encoding),this.encoding=e.encoding)}function y(e){if(a=a||r(13),!(this instanceof y))return new y(e);this._readableState=new g(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),f.call(this)}function _(e,t,r,i,n){var a,o=e._readableState;null===t?(o.reading=!1,function(e,t){if(t.ended)return;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,P(e)}(e,o)):(n||(a=function(e,t){var r;i=t,c.isBuffer(i)||i instanceof u||"string"==typeof t||void 0===t||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));var i;return r}(o,t)),a?e.emit("error",a):o.objectMode||t&&t.length>0?("string"==typeof t||o.objectMode||Object.getPrototypeOf(t)===c.prototype||(t=function(e){return c.from(e)}(t)),i?o.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):w(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?w(e,o,t,!1):A(e,o)):w(e,o,t,!1))):i||(o.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.lengtht.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 P(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(l("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?n.nextTick(k,e):k(e))}function k(e){l("emit readable"),e.emit("readable"),M(e)}function A(e,t){t.readingMore||(t.readingMore=!0,n.nextTick(x,e,t))}function x(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=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 i;ea.length?a.length:e;if(o===a.length?n+=a:n+=a.slice(0,e),0===(e-=o)){o===a.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=a.slice(o));break}++i}return t.length-=i,n}(e,t):function(e,t){var r=c.allocUnsafe(e),i=t.head,n=1;i.data.copy(r),e-=i.data.length;for(;i=i.next;){var a=i.data,o=e>a.length?a.length:e;if(a.copy(r,r.length-e,0,o),0===(e-=o)){o===a.length?(++n,i.next?t.head=i.next:t.head=t.tail=null):(t.head=i,i.data=a.slice(o));break}++n}return t.length-=n,r}(e,t);return i}(e,t.buffer,t.decoder),r);var r}function T(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,n.nextTick(D,t,e))}function D(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function C(e,t){for(var r=0,i=e.length;r=t.highWaterMark||t.ended))return l("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?T(this):P(this),null;if(0===(e=S(e,t))&&t.ended)return 0===t.length&&T(this),null;var i,n=t.needReadable;return l("need readable",n),(0===t.length||t.length-e0?R(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&T(this)),null!==i&&this.emit("data",i),i},y.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},y.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,l("pipe count=%d opts=%j",a.pipesCount,t);var f=(!t||!1!==t.end)&&e!==i.stdout&&e!==i.stderr?u:y;function c(t,i){l("onunpipe"),t===r&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,l("cleanup"),e.removeListener("close",v),e.removeListener("finish",g),e.removeListener("drain",h),e.removeListener("error",b),e.removeListener("unpipe",c),r.removeListener("end",u),r.removeListener("end",y),r.removeListener("data",m),d=!0,!a.awaitDrain||e._writableState&&!e._writableState.needDrain||h())}function u(){l("onend"),e.end()}a.endEmitted?n.nextTick(f):r.once("end",f),e.on("unpipe",c);var h=function(e){return function(){var t=e._readableState;l("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&s(e,"data")&&(t.flowing=!0,M(e))}}(r);e.on("drain",h);var d=!1;var p=!1;function m(t){l("ondata"),p=!1,!1!==e.write(t)||p||((1===a.pipesCount&&a.pipes===e||a.pipesCount>1&&-1!==C(a.pipes,e))&&!d&&(l("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,p=!0),r.pause())}function b(t){l("onerror",t),y(),e.removeListener("error",b),0===s(e,"error")&&e.emit("error",t)}function v(){e.removeListener("finish",g),y()}function g(){l("onfinish"),e.removeListener("close",v),y()}function y(){l("unpipe"),r.unpipe(e)}return r.on("data",m),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",b),e.once("close",v),e.once("finish",g),e.emit("pipe",r),a.flowing||(l("pipe resume"),r.resume()),e},y.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?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this);if(!e){var i=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a=f?o=new RangeError(c):t=i.concat(n,a),n=[],e.close(),r(o,t)}e.on("error",(function(t){e.removeListener("end",s),e.removeListener("readable",o),r(t)})),e.on("end",s),e.end(t),o()}function g(e,t){if("string"==typeof t&&(t=i.from(t)),!i.isBuffer(t))throw new TypeError("Not a string or buffer");var r=e._finishFlushFlag;return e._processChunk(t,r)}function y(e){if(!(this instanceof y))return new y(e);x.call(this,e,a.DEFLATE)}function _(e){if(!(this instanceof _))return new _(e);x.call(this,e,a.INFLATE)}function w(e){if(!(this instanceof w))return new w(e);x.call(this,e,a.GZIP)}function E(e){if(!(this instanceof E))return new E(e);x.call(this,e,a.GUNZIP)}function S(e){if(!(this instanceof S))return new S(e);x.call(this,e,a.DEFLATERAW)}function P(e){if(!(this instanceof P))return new P(e);x.call(this,e,a.INFLATERAW)}function k(e){if(!(this instanceof k))return new k(e);x.call(this,e,a.UNZIP)}function A(e){return e===a.Z_NO_FLUSH||e===a.Z_PARTIAL_FLUSH||e===a.Z_SYNC_FLUSH||e===a.Z_FULL_FLUSH||e===a.Z_FINISH||e===a.Z_BLOCK}function x(e,r){var o=this;if(this._opts=e=e||{},this._chunkSize=e.chunkSize||t.Z_DEFAULT_CHUNK,n.call(this,e),e.flush&&!A(e.flush))throw new Error("Invalid flush flag: "+e.flush);if(e.finishFlush&&!A(e.finishFlush))throw new Error("Invalid flush flag: "+e.finishFlush);if(this._flushFlag=e.flush||a.Z_NO_FLUSH,this._finishFlushFlag=void 0!==e.finishFlush?e.finishFlush:a.Z_FINISH,e.chunkSize&&(e.chunkSizet.Z_MAX_CHUNK))throw new Error("Invalid chunk size: "+e.chunkSize);if(e.windowBits&&(e.windowBitst.Z_MAX_WINDOWBITS))throw new Error("Invalid windowBits: "+e.windowBits);if(e.level&&(e.levelt.Z_MAX_LEVEL))throw new Error("Invalid compression level: "+e.level);if(e.memLevel&&(e.memLevelt.Z_MAX_MEMLEVEL))throw new Error("Invalid memLevel: "+e.memLevel);if(e.strategy&&e.strategy!=t.Z_FILTERED&&e.strategy!=t.Z_HUFFMAN_ONLY&&e.strategy!=t.Z_RLE&&e.strategy!=t.Z_FIXED&&e.strategy!=t.Z_DEFAULT_STRATEGY)throw new Error("Invalid strategy: "+e.strategy);if(e.dictionary&&!i.isBuffer(e.dictionary))throw new Error("Invalid dictionary: it should be a Buffer instance");this._handle=new a.Zlib(r);var s=this;this._hadError=!1,this._handle.onerror=function(e,r){I(s),s._hadError=!0;var i=new Error(e);i.errno=r,i.code=t.codes[r],s.emit("error",i)};var f=t.Z_DEFAULT_COMPRESSION;"number"==typeof e.level&&(f=e.level);var c=t.Z_DEFAULT_STRATEGY;"number"==typeof e.strategy&&(c=e.strategy),this._handle.init(e.windowBits||t.Z_DEFAULT_WINDOWBITS,f,e.memLevel||t.Z_DEFAULT_MEMLEVEL,c,e.dictionary),this._buffer=i.allocUnsafe(this._chunkSize),this._offset=0,this._level=f,this._strategy=c,this.once("end",this.close),Object.defineProperty(this,"_closed",{get:function(){return!o._handle},configurable:!0,enumerable:!0})}function I(t,r){r&&e.nextTick(r),t._handle&&(t._handle.close(),t._handle=null)}function O(e){e.emit("close")}Object.defineProperty(t,"codes",{enumerable:!0,value:Object.freeze(l),writable:!1}),t.Deflate=y,t.Inflate=_,t.Gzip=w,t.Gunzip=E,t.DeflateRaw=S,t.InflateRaw=P,t.Unzip=k,t.createDeflate=function(e){return new y(e)},t.createInflate=function(e){return new _(e)},t.createDeflateRaw=function(e){return new S(e)},t.createInflateRaw=function(e){return new P(e)},t.createGzip=function(e){return new w(e)},t.createGunzip=function(e){return new E(e)},t.createUnzip=function(e){return new k(e)},t.deflate=function(e,t,r){return"function"==typeof t&&(r=t,t={}),v(new y(t),e,r)},t.deflateSync=function(e,t){return g(new y(t),e)},t.gzip=function(e,t,r){return"function"==typeof t&&(r=t,t={}),v(new w(t),e,r)},t.gzipSync=function(e,t){return g(new w(t),e)},t.deflateRaw=function(e,t,r){return"function"==typeof t&&(r=t,t={}),v(new S(t),e,r)},t.deflateRawSync=function(e,t){return g(new S(t),e)},t.unzip=function(e,t,r){return"function"==typeof t&&(r=t,t={}),v(new k(t),e,r)},t.unzipSync=function(e,t){return g(new k(t),e)},t.inflate=function(e,t,r){return"function"==typeof t&&(r=t,t={}),v(new _(t),e,r)},t.inflateSync=function(e,t){return g(new _(t),e)},t.gunzip=function(e,t,r){return"function"==typeof t&&(r=t,t={}),v(new E(t),e,r)},t.gunzipSync=function(e,t){return g(new E(t),e)},t.inflateRaw=function(e,t,r){return"function"==typeof t&&(r=t,t={}),v(new P(t),e,r)},t.inflateRawSync=function(e,t){return g(new P(t),e)},o.inherits(x,n),x.prototype.params=function(r,i,n){if(rt.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+r);if(i!=t.Z_FILTERED&&i!=t.Z_HUFFMAN_ONLY&&i!=t.Z_RLE&&i!=t.Z_FIXED&&i!=t.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+i);if(this._level!==r||this._strategy!==i){var o=this;this.flush(a.Z_SYNC_FLUSH,(function(){s(o._handle,"zlib binding closed"),o._handle.params(r,i),o._hadError||(o._level=r,o._strategy=i,n&&n())}))}else e.nextTick(n)},x.prototype.reset=function(){return s(this._handle,"zlib binding closed"),this._handle.reset()},x.prototype._flush=function(e){this._transform(i.alloc(0),"",e)},x.prototype.flush=function(t,r){var n=this,o=this._writableState;("function"==typeof t||void 0===t&&!r)&&(r=t,t=a.Z_FULL_FLUSH),o.ended?r&&e.nextTick(r):o.ending?r&&this.once("end",r):o.needDrain?r&&this.once("drain",(function(){return n.flush(t,r)})):(this._flushFlag=t,this.write(i.alloc(0),"",r))},x.prototype.close=function(t){I(this,t),e.nextTick(O,this)},x.prototype._transform=function(e,t,r){var n,o=this._writableState,s=(o.ending||o.ended)&&(!e||o.length===e.length);return null===e||i.isBuffer(e)?this._handle?(s?n=this._finishFlushFlag:(n=this._flushFlag,e.length>=o.length&&(this._flushFlag=this._opts.flush||a.Z_NO_FLUSH)),void this._processChunk(e,n,r)):r(new Error("zlib binding closed")):r(new Error("invalid input"))},x.prototype._processChunk=function(e,t,r){var n=e&&e.length,a=this._chunkSize-this._offset,o=0,u=this,h="function"==typeof r;if(!h){var d,l=[],p=0;this.on("error",(function(e){d=e})),s(this._handle,"zlib binding closed");do{var m=this._handle.writeSync(t,e,o,n,this._buffer,this._offset,a)}while(!this._hadError&&g(m[0],m[1]));if(this._hadError)throw d;if(p>=f)throw I(this),new RangeError(c);var b=i.concat(l,p);return I(this),b}s(this._handle,"zlib binding closed");var v=this._handle.write(t,e,o,n,this._buffer,this._offset,a);function g(f,c){if(this&&(this.buffer=null,this.callback=null),!u._hadError){var d=a-c;if(s(d>=0,"have should not go down"),d>0){var m=u._buffer.slice(u._offset,u._offset+d);u._offset+=d,h?u.push(m):(l.push(m),p+=m.length)}if((0===c||u._offset>=u._chunkSize)&&(a=u._chunkSize,u._offset=0,u._buffer=i.allocUnsafe(u._chunkSize)),0===c){if(o+=n-f,n=f,!h)return!0;var b=u._handle.write(t,e,o,n,u._buffer,u._offset,u._chunkSize);return b.callback=g,void(b.buffer=e)}if(!h)return!1;r()}}v.buffer=e,v.callback=g},o.inherits(y,x),o.inherits(_,x),o.inherits(w,x),o.inherits(E,x),o.inherits(S,x),o.inherits(P,x),o.inherits(k,x)}).call(this,r(4))},function(e,t,r){"use strict";e.exports=function(e,t,r,i){for(var n=65535&e|0,a=e>>>16&65535|0,o=0;0!==r;){r-=o=r>2e3?2e3:r;do{a=a+(n=n+t[i++]|0)|0}while(--o);n%=65521,a%=65521}return n|a<<16|0}},function(e,t,r){"use strict";var i=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var i=0;i<8;i++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();e.exports=function(e,t,r,n){var a=i,o=n+r;e^=-1;for(var s=n;s>>8^a[255&(e^t[s])];return-1^e}},function(e,t,r){var i=r(1).Buffer,n=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];function a(e){if(i.isBuffer(e))return e;var t="function"==typeof i.alloc&&"function"==typeof i.from;if("number"==typeof e)return t?i.alloc(e):new i(e);if("string"==typeof e)return t?i.from(e):new i(e);throw new Error("input must be buffer, number, or string, received "+typeof e)}function o(e,t){e=a(e),i.isBuffer(t)&&(t=t.readUInt32BE(0));for(var r=-1^~~t,o=0;o>>8;return-1^r}function s(){return e=o.apply(null,arguments),(t=a(4)).writeInt32BE(e,0),t;var e,t}"undefined"!=typeof Int32Array&&(n=new Int32Array(n)),s.signed=function(){return o.apply(null,arguments)},s.unsigned=function(){return o.apply(null,arguments)>>>0},e.exports=s},function(e,t,r){"use strict";const{createDownloadUrls:i}=r(73),{UPLOAD_FAILURE:n,UPLOAD_PPK:a,UPLOAD_PPK_START:o,UPLOAD_PLUGIN:s,UPLOAD_PLUGIN_START:f,CREATE_PLUGIN_ZIP:c,CREATE_PLUGIN_ZIP_START:u,CREATE_PLUGIN_ZIP_FAILURE:h,RESET:d}=r(117),l=e=>`${e.contents.name.replace(/\.\w+$/,"")}.${e.plugin.id}`;e.exports={reducer:(e={contents:{data:null,name:null},ppk:{data:null,name:null},plugin:{id:null,url:{contents:null,ppk:null}},error:null,loading:!1},t)=>{switch(t.type){case o:{const{ppk:t,plugin:r}={contents:{data:null,name:null},ppk:{data:null,name:null},plugin:{id:null,url:{contents:null,ppk:null}},error:null,loading:!1};return Object.assign({},e,{ppk:t,plugin:r,error:null})}case a:return Object.assign({},e,{ppk:t.payload});case f:{const{contents:t,plugin:r}={contents:{data:null,name:null},ppk:{data:null,name:null},plugin:{id:null,url:{contents:null,ppk:null}},error:null,loading:!1};return Object.assign({},e,{contents:t,plugin:r,error:null})}case s:return Object.assign({},e,{contents:t.payload});case u:return Object.assign({},e,{plugin:{id:null,url:{contents:null,ppk:null}},error:null,loading:!0});case c:return Object.assign({},e,{ppk:{data:t.payload.privateKey,name:e.ppk.name||`${t.payload.id}.ppk`},plugin:{id:t.payload.id,url:i(t.payload)},loading:!1});case n:case h:return Object.assign({},e,{error:t.payload,loading:!1});case d:return{contents:{data:null,name:null},ppk:{data:null,name:null},plugin:{id:null,url:{contents:null,ppk:null}},error:null,loading:!1};default:return e}},getDownloadPluginZipName:e=>`${l(e)}.plugin.zip`,getDownloadPPKFileName:e=>`${l(e)}.private.ppk`}},function(e,t,r){"use strict";(function(t){const i=r(152),{rezip:n}=r(107),{createDownloadUrl:a,revokeDownloadUrl:o}=r(62),s=(e,r)=>e?n(t.from(e)).then(e=>i(e,r)):Promise.resolve(),f=s;e.exports={generatePluginZip:s,validatePlugin:f,createDownloadUrls:e=>({contents:a(e.plugin,"application/zip"),ppk:a(e.privateKey,"text/plain")}),revokePluginUrls:e=>{Object.keys(e.url).forEach(t=>{o(e.url[t])})}}}).call(this,r(1).Buffer)},function(e,t,r){(function(t){ /*! * RSA library for Node.js * * Author: rzcoder * License MIT */ -var i=r(31),n=r(153),a=(r(10),r(54).Ber,r(7)._),o=r(7),s=r(18),f=r(232);void 0===i.RSA_NO_PADDING&&(i.RSA_NO_PADDING=3),e.exports=function(){var e={node10:["md4","md5","ripemd160","sha1","sha224","sha256","sha384","sha512"],node:["md4","md5","ripemd160","sha1","sha224","sha256","sha384","sha512"],iojs:["md4","md5","ripemd160","sha1","sha224","sha256","sha384","sha512"],browser:["md5","ripemd160","sha1","sha256","sha512"]},r="pkcs1_oaep",i="pkcs1",c={private:"pkcs1-private-pem","private-der":"pkcs1-private-der",public:"pkcs8-public-pem","public-der":"pkcs8-public-der"};function u(e,s,f){if(!(this instanceof u))return new u(e,s,f);a.isObject(s)&&(f=s,s=void 0),this.$options={signingScheme:i,signingSchemeOptions:{hash:"sha256",saltLength:null},encryptionScheme:r,encryptionSchemeOptions:{hash:"sha1",label:null},environment:o.detectEnvironment(),rsaUtils:this},this.keyPair=new n.Key,this.$cache={},t.isBuffer(e)||a.isString(e)?this.importKey(e,s):a.isObject(e)&&this.generateKeyPair(e.b,e.e),this.setOptions(f)}return u.prototype.setOptions=function(t){if((t=t||{}).environment&&(this.$options.environment=t.environment),t.signingScheme){if(a.isString(t.signingScheme)){var n=t.signingScheme.toLowerCase().split("-");1==n.length?e.node.indexOf(n[0])>-1?(this.$options.signingSchemeOptions={hash:n[0]},this.$options.signingScheme=i):(this.$options.signingScheme=n[0],this.$options.signingSchemeOptions={hash:null}):(this.$options.signingSchemeOptions={hash:n[1]},this.$options.signingScheme=n[0])}else a.isObject(t.signingScheme)&&(this.$options.signingScheme=t.signingScheme.scheme||i,this.$options.signingSchemeOptions=a.omit(t.signingScheme,"scheme"));if(!s.isSignature(this.$options.signingScheme))throw Error("Unsupported signing scheme");if(this.$options.signingSchemeOptions.hash&&-1===e[this.$options.environment].indexOf(this.$options.signingSchemeOptions.hash))throw Error("Unsupported hashing algorithm for "+this.$options.environment+" environment")}if(t.encryptionScheme){if(a.isString(t.encryptionScheme)?(this.$options.encryptionScheme=t.encryptionScheme.toLowerCase(),this.$options.encryptionSchemeOptions={}):a.isObject(t.encryptionScheme)&&(this.$options.encryptionScheme=t.encryptionScheme.scheme||r,this.$options.encryptionSchemeOptions=a.omit(t.encryptionScheme,"scheme")),!s.isEncryption(this.$options.encryptionScheme))throw Error("Unsupported encryption scheme");if(this.$options.encryptionSchemeOptions.hash&&-1===e[this.$options.environment].indexOf(this.$options.encryptionSchemeOptions.hash))throw Error("Unsupported hashing algorithm for "+this.$options.environment+" environment")}this.keyPair.setOptions(this.$options)},u.prototype.generateKeyPair=function(e,t){if(t=t||65537,(e=e||2048)%8!=0)throw Error("Key size must be a multiple of 8.");return this.keyPair.generate(e,t.toString(16)),this.$cache={},this},u.prototype.importKey=function(e,t){if(!e)throw Error("Empty key given");if(t&&(t=c[t]||t),!f.detectAndImport(this.keyPair,e,t)&&void 0===t)throw Error("Key format must be specified");return this.$cache={},this},u.prototype.exportKey=function(e){return e=c[e=e||"private"]||e,this.$cache[e]||(this.$cache[e]=f.detectAndExport(this.keyPair,e)),this.$cache[e]},u.prototype.isPrivate=function(){return this.keyPair.isPrivate()},u.prototype.isPublic=function(e){return this.keyPair.isPublic(e)},u.prototype.isEmpty=function(e){return!(this.keyPair.n||this.keyPair.e||this.keyPair.d)},u.prototype.encrypt=function(e,t,r){return this.$$encryptKey(!1,e,t,r)},u.prototype.decrypt=function(e,t){return this.$$decryptKey(!1,e,t)},u.prototype.encryptPrivate=function(e,t,r){return this.$$encryptKey(!0,e,t,r)},u.prototype.decryptPublic=function(e,t){return this.$$decryptKey(!0,e,t)},u.prototype.$$encryptKey=function(e,t,r,i){try{var n=this.keyPair.encrypt(this.$getDataForEncrypt(t,i),e);return"buffer"!=r&&r?n.toString(r):n}catch(e){throw Error("Error during encryption. Original error: "+e)}},u.prototype.$$decryptKey=function(e,r,i){try{r=a.isString(r)?t.from(r,"base64"):r;var n=this.keyPair.decrypt(r,e);if(null===n)throw Error("Key decrypt method returns null.");return this.$getDecryptedData(n,i)}catch(e){throw Error("Error during decryption (probably incorrect key). Original error: "+e)}},u.prototype.sign=function(e,t,r){if(!this.isPrivate())throw Error("This is not private key");var i=this.keyPair.sign(this.$getDataForEncrypt(e,r));return t&&"buffer"!=t&&(i=i.toString(t)),i},u.prototype.verify=function(e,t,r,i){if(!this.isPublic())throw Error("This is not public key");return i=i&&"buffer"!=i?i:null,this.keyPair.verify(this.$getDataForEncrypt(e,r),t,i)},u.prototype.getKeySize=function(){return this.keyPair.keySize},u.prototype.getMaxMessageSize=function(){return this.keyPair.maxMessageLength},u.prototype.$getDataForEncrypt=function(e,r){if(a.isString(e)||a.isNumber(e))return t.from(""+e,r||"utf8");if(t.isBuffer(e))return e;if(a.isObject(e))return t.from(JSON.stringify(e));throw Error("Unexpected data type")},u.prototype.$getDecryptedData=function(e,t){return"buffer"==(t=t||"buffer")?e:"json"==t?JSON.parse(e.toString()):e.toString(t)},u}()}).call(this,r(1).Buffer)},function(e,t,r){"use strict";var i=r(2).Buffer,n=r(6).Transform;function a(e){n.call(this),this._block=i.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}r(0)(a,n),a.prototype._transform=function(e,t,r){var i=null;try{this.update(e,t)}catch(e){i=e}r(i)},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(!i.isBuffer(e)&&"string"!=typeof e)throw new TypeError(t+" must be a string or a buffer")}(e,"Data"),this._finalized)throw new Error("Digest already called");i.isBuffer(e)||(e=i.from(e,t));for(var r=this._block,n=0;this._blockOffset+e.length-n>=this._blockSize;){for(var a=this._blockOffset;a0;++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,r){var i=r(0),n=r(17),a=r(2).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 f(){this.init(),this._w=s,n.call(this,64,56)}function c(e,t,r){return r^e&(t^r)}function u(e,t,r){return e&t|r&(e|t)}function h(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function d(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function l(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}i(f,n),f.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},f.prototype._update=function(e){for(var t,r=this._w,i=0|this._a,n=0|this._b,a=0|this._c,s=0|this._d,f=0|this._e,p=0|this._f,m=0|this._g,b=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]+l(r[v-15])+r[v-16];for(var g=0;g<64;++g){var y=b+d(f)+c(f,p,m)+o[g]+r[g]|0,_=h(i)+u(i,n,a)|0;b=m,m=p,p=f,f=s+y|0,s=a,a=n,n=i,i=y+_|0}this._a=i+this._a|0,this._b=n+this._b|0,this._c=a+this._c|0,this._d=s+this._d|0,this._e=f+this._e|0,this._f=p+this._f|0,this._g=m+this._g|0,this._h=b+this._h|0},f.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=f},function(e,t,r){var i=r(0),n=r(17),a=r(2).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 f(){this.init(),this._w=s,n.call(this,128,112)}function c(e,t,r){return r^e&(t^r)}function u(e,t,r){return e&t|r&(e|t)}function h(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function d(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function l(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 m(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function b(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function v(e,t){return e>>>0>>0?1:0}i(f,n),f.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},f.prototype._update=function(e){for(var t=this._w,r=0|this._ah,i=0|this._bh,n=0|this._ch,a=0|this._dh,s=0|this._eh,f=0|this._fh,g=0|this._gh,y=0|this._hh,_=0|this._al,w=0|this._bl,E=0|this._cl,S=0|this._dl,P=0|this._el,k=0|this._fl,A=0|this._gl,x=0|this._hl,I=0;I<32;I+=2)t[I]=e.readInt32BE(4*I),t[I+1]=e.readInt32BE(4*I+4);for(;I<160;I+=2){var O=t[I-30],M=t[I-30+1],R=l(O,M),T=p(M,O),D=m(O=t[I-4],M=t[I-4+1]),C=b(M,O),L=t[I-14],B=t[I-14+1],N=t[I-32],F=t[I-32+1],j=T+B|0,z=R+L+v(j,T)|0;z=(z=z+D+v(j=j+C|0,C)|0)+N+v(j=j+F|0,F)|0,t[I]=z,t[I+1]=j}for(var U=0;U<160;U+=2){z=t[U],j=t[U+1];var q=u(r,i,n),$=u(_,w,E),K=h(r,_),H=h(_,r),Z=d(s,P),G=d(P,s),V=o[U],Y=o[U+1],W=c(s,f,g),X=c(P,k,A),Q=x+G|0,J=y+Z+v(Q,x)|0;J=(J=(J=J+W+v(Q=Q+X|0,X)|0)+V+v(Q=Q+Y|0,Y)|0)+z+v(Q=Q+j|0,j)|0;var ee=H+$|0,te=K+q+v(ee,H)|0;y=g,x=A,g=f,A=k,f=s,k=P,s=a+J+v(P=S+Q|0,S)|0,a=n,S=E,n=i,E=w,i=r,w=_,r=J+te+v(_=Q+ee|0,Q)|0}this._al=this._al+_|0,this._bl=this._bl+w|0,this._cl=this._cl+E|0,this._dl=this._dl+S|0,this._el=this._el+P|0,this._fl=this._fl+k|0,this._gl=this._gl+A|0,this._hl=this._hl+x|0,this._ah=this._ah+r+v(this._al,_)|0,this._bh=this._bh+i+v(this._bl,w)|0,this._ch=this._ch+n+v(this._cl,E)|0,this._dh=this._dh+a+v(this._dl,S)|0,this._eh=this._eh+s+v(this._el,P)|0,this._fh=this._fh+f+v(this._fl,k)|0,this._gh=this._gh+g+v(this._gl,A)|0,this._hh=this._hh+y+v(this._hl,x)|0},f.prototype._hash=function(){var e=a.allocUnsafe(64);function t(t,r,i){e.writeInt32BE(t,i),e.writeInt32BE(r,i+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=f},function(e,t,r){"use strict";var i=r(0),n=r(158),a=r(12),o=r(2).Buffer,s=r(79),f=r(44),c=r(45),u=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 f:c(e)).update(t).digest():t.lengthr||a!=a)throw new TypeError("Bad key length")}}).call(this,r(1).Buffer)},function(e,t,r){(function(t){var r;t.browser?r="utf-8":r=parseInt(t.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary";e.exports=r}).call(this,r(4))},function(e,t,r){var i=r(79),n=r(44),a=r(45),o=r(82),s=r(83),f=r(2).Buffer,c=f.alloc(128),u={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?function(e){return(new n).update(e).digest()}:"md5"===e?i:function(t){return a(e).update(t).digest()}}(e),s="sha512"===e||"sha384"===e?128:64;t.length>s?t=o(t):t.lengthe;)r.ishrn(1);if(r.isEven()&&r.iadd(s),r.testn(1)||r.iadd(f),t.cmp(f)){if(!t.cmp(c))for(;r.mod(u).cmp(h);)r.iadd(l)}else for(;r.mod(a).cmp(d);)r.iadd(l);if(b(p=r.shrn(1))&&b(r)&&v(p)&&v(r)&&o.test(p)&&o.test(r))return r}}},function(e,t,r){var i=r(3),n=r(49);function a(e){this.rand=e||new n.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 n=new i(this.rand.generate(r))}while(n.cmp(e)>=0);return n},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 n=e.bitLength(),a=i.mont(e),o=new i(1).toRed(a);t||(t=Math.max(1,n/48|0));for(var s=e.subn(1),f=0;!s.testn(f);f++);for(var c=e.shrn(f),u=s.toRed(a);t>0;t--){var h=this._randrange(new i(2),s);r&&r(h);var d=h.toRed(a).redPow(c);if(0!==d.cmp(o)&&0!==d.cmp(u)){for(var l=1;l0;t--){var u=this._randrange(new i(2),o),h=e.gcd(u);if(0!==h.cmpn(1))return h;var d=u.toRed(n).redPow(f);if(0!==d.cmp(a)&&0!==d.cmp(c)){for(var l=1;l>8,o=255&n;a?r.push(a,o):r.push(o)}return r},i.zero2=n,i.toHex=a,i.encode=function(e,t){return"hex"===t?a(e):e}},function(e,t,r){"use strict";var i=t;i.base=r(34),i.short=r(187),i.mont=r(188),i.edwards=r(189)},function(e,t,r){"use strict";var i=r(11).rotr32;function n(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,i){return 0===e?n(t,r,i):1===e||3===e?o(t,r,i):2===e?a(t,r,i):void 0},t.ch32=n,t.maj32=a,t.p32=o,t.s0_256=function(e){return i(e,2)^i(e,13)^i(e,22)},t.s1_256=function(e){return i(e,6)^i(e,11)^i(e,25)},t.g0_256=function(e){return i(e,7)^i(e,18)^e>>>3},t.g1_256=function(e){return i(e,17)^i(e,19)^e>>>10}},function(e,t,r){"use strict";var i=r(11),n=r(23),a=r(94),o=r(8),s=i.sum32,f=i.sum32_4,c=i.sum32_5,u=a.ch32,h=a.maj32,d=a.s0_256,l=a.s1_256,p=a.g0_256,m=a.g1_256,b=n.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 g(){if(!(this instanceof g))return new g;b.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=v,this.W=new Array(64)}i.inherits(g,b),e.exports=g,g.blockSize=512,g.outSize=256,g.hmacStrength=192,g.padLength=64,g.prototype._update=function(e,t){for(var r=this.W,i=0;i<16;i++)r[i]=e[t+i];for(;i>6],n=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:i,primitive:n,tag:r,tagStr:s.tag[r]}}function h(e,t,r){var i=e.readUInt8(r);if(e.isError(i))return i;if(!t&&128===i)return null;if(0==(128&i))return i;var n=127&i;if(n>4)return e.error("length octect is too long");i=0;for(var a=0;a=31)return i.error("Multi-octet tag encoding unsupported");t||(n|=32);return n|=s.tagClassByName[r||"universal"]<<6}(e,t,r,this.reporter);if(i.length<128)return(a=new n(2))[0]=o,a[1]=i.length,this._createEncoderBuffer([a,i]);for(var f=1,c=i.length;c>=256;c>>=8)f++;(a=new n(2+f))[0]=o,a[1]=128|f;c=1+f;for(var u=i.length;u>0;c--,u>>=8)a[c]=255&u;return this._createEncoderBuffer([a,i])},c.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){for(var r=new n(2*e.length),i=0;i=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}var a=0;for(i=0;i=128;o>>=7)a++}var s=new n(a),f=s.length-1;for(i=e.length-1;i>=0;i--){o=e[i];for(s[f--]=127&o;(o>>=7)>0;)s[f--]=128|127&o}return this._createEncoderBuffer(s)},c.prototype._encodeTime=function(e,t){var r,i=new Date(e);return"gentime"===t?r=[u(i.getFullYear()),u(i.getUTCMonth()+1),u(i.getUTCDate()),u(i.getUTCHours()),u(i.getUTCMinutes()),u(i.getUTCSeconds()),"Z"].join(""):"utctime"===t?r=[u(i.getFullYear()%100),u(i.getUTCMonth()+1),u(i.getUTCDate()),u(i.getUTCHours()),u(i.getUTCMinutes()),u(i.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(r,"octstr")},c.prototype._encodeNull=function(){return this._createEncoderBuffer("")},c.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&&!n.isBuffer(e)){var r=e.toArray();!e.sign&&128&r[0]&&r.unshift(0),e=new n(r)}if(n.isBuffer(e)){var i=e.length;0===e.length&&i++;var a=new n(i);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]);i=1;for(var o=e;o>=256;o>>=8)i++;for(o=(a=new Array(i)).length-1;o>=0;o--)a[o]=255&e,e>>=8;return 128&a[0]&&a.unshift(0),this._createEncoderBuffer(new n(a))},c.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},c.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getEncoder("der").tree},c.prototype._skipDefault=function(e,t,r){var i,n=this._baseState;if(null===n.default)return!1;var a=e.join();if(void 0===n.defaultBuffer&&(n.defaultBuffer=this._encodeValue(n.default,t,r).join()),a.length!==n.defaultBuffer.length)return!1;for(i=0;i=2*(1<<30))throw new RangeError('The value "'+e+'" is invalid for option "size"');var i=a(e);return t&&0!==t.length?"string"==typeof r?i.fill(t,r):i.fill(t):i.fill(0),i}),!o.kStringMaxLength)try{o.kStringMaxLength=t.binding("buffer").kStringMaxLength}catch(e){}o.constants||(o.constants={MAX_LENGTH:o.kMaxLength},o.kStringMaxLength&&(o.constants.MAX_STRING_LENGTH=o.kStringMaxLength)),e.exports=o}).call(this,r(4))},function(e,t,r){"use strict";const i=r(242),n=r(36),a=r(243),o=r(246),s=r(248),f=r(41),c=r(286),u=r(287);function h(e){return function(e){return o(a.fromBuffer)(e).then(e=>new Promise((t,r)=>{const i=new Map,n={zipFile:e,entries:i};e.on("entry",e=>{i.set(e.fileName,e)}),e.on("end",()=>{t(n)}),e.on("error",r)}))}(e).then(e=>{const t=Array.from(e.entries.keys()).filter(e=>"manifest.json"===i.basename(e));if(0===t.length)throw new Error("The zip file has no manifest.json");if(t.length>1)throw new Error("The zip file has many manifest.json files");e.manifestPath=t[0];const r=e.entries.get(e.manifestPath);return function(e,t){return function(e,t){return new Promise((r,i)=>{e.openReadStream(t,(e,t)=>{if(e)i(e);else{const e=new f.WritableStreamBuffer;e.on("finish",()=>{r(e.getContents().toString("utf8"))}),t.pipe(e)}})})}(e,t).then(e=>JSON.parse(e))}(e.zipFile,r).then(t=>Object.assign(e,{manifestJson:t}))})}function d(e,t,r){const n=e=>i.join(i.dirname(r),e).replace(new RegExp(`\\${i.sep}`,"g"),"/"),a=s(t,{relativePath:t=>e.has(n(t)),maxFileSize(t,r){const i=e.get(n(r));return!!i&&i.uncompressedSize<=t}});if(!a.valid){const e=c(a.errors),t=new Error(e.join(", "));throw t.validationErrors=e,t}}e.exports={rezip:function(e){return h(e).then(({zipFile:e,entries:t,manifestJson:r,manifestPath:a})=>(d(t,r,a),function(e,t,r,a){const s=i.dirname(a);return new Promise((a,c)=>{const h=new n.ZipFile;h.on("error",c);const d=new f.WritableStreamBuffer;d.on("finish",()=>{a(d.getContents())}),h.outputStream.pipe(d);const l=o(e.openReadStream.bind(e));Promise.all(u(r).map(e=>{const r=t.get(i.join(s,e));return l(r).then(t=>{h.addReadStream(t,e,{size:r.uncompressedSize})})})).then(()=>{h.end()})})}(e,t,r,a)))},validateContentsZip:function(e){return h(e).then(({entries:e,manifestJson:t,manifestPath:r})=>d(e,t,r))}}},function(e,t,r){"use strict";var i=r(19);e.exports=function(e){i.copy(e,this)}},function(e,t,r){"use strict";e.exports=function(e,t){t||(t={}),"function"==typeof t&&(t={cmp:t});var r,i="boolean"==typeof t.cycles&&t.cycles,n=t.cmp&&(r=t.cmp,function(e){return function(t,i){var n={key:t,value:e[t]},a={key:i,value:e[i]};return r(n,a)}}),a=[];return function e(t){if(t&&t.toJSON&&"function"==typeof t.toJSON&&(t=t.toJSON()),void 0!==t){if("number"==typeof t)return isFinite(t)?""+t:"null";if("object"!=typeof t)return JSON.stringify(t);var r,o;if(Array.isArray(t)){for(o="[",r=0;r%\\^`{|}]|%[0-9a-f]{2})|\{[+#.\/;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,u=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,h=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,d=/^(?:\/(?:[^~\/]|~0|~1)*)*$/,l=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,p=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~\/]|~0|~1)*)*)$/;function m(e){return e="full"==e?"full":"fast",i.copy(m[e])}function b(e){var t=e.match(n);if(!t)return!1;var r=+t[1],i=+t[2],o=+t[3];return i>=1&&i<=12&&o>=1&&o<=(2==i&&function(e){return e%4==0&&(e%100!=0||e%400==0)}(r)?29:a[i])}function v(e,t){var r=e.match(o);if(!r)return!1;var i=r[1],n=r[2],a=r[3],s=r[5];return(i<=23&&n<=59&&a<=59||23==i&&59==n&&60==a)&&(!t||s)}e.exports=m,m.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d:\d\d)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d:\d\d)$/i,uri:/^(?:[a-z][a-z0-9+-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":c,url:u,email:/^[a-z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:s,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:w,uuid:h,"json-pointer":d,"json-pointer-uri-fragment":l,"relative-json-pointer":p},m.full={date:b,time:v,"date-time":function(e){var t=e.split(g);return 2==t.length&&b(t[0])&&v(t[1],!0)},uri:function(e){return y.test(e)&&f.test(e)},"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@\/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@\/?]|%[0-9a-f]{2})*)?$/i,"uri-template":c,url:u,email:/^[a-z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+\/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:function(e){return e.length<=255&&s.test(e)},ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:w,uuid:h,"json-pointer":d,"json-pointer-uri-fragment":l,"relative-json-pointer":p};var g=/t|\s/i;var y=/\/|:/;var _=/[^\\]\\Z/;function w(e){if(_.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}}},function(e,t,r){"use strict";e.exports=function(e,t,r){var i,n=" ",a=e.level,o=e.dataLevel,s=e.schema[t],f=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,h="data"+(o||""),d=e.opts.$data&&s&&s.$data;d?(n+=" var schema"+a+" = "+e.util.getData(s.$data,o,e.dataPathArr)+"; ",i="schema"+a):i=s;var l="maximum"==t,p=l?"exclusiveMaximum":"exclusiveMinimum",m=e.schema[p],b=e.opts.$data&&m&&m.$data,v=l?"<":">",g=l?">":"<",y=void 0;if(b){var _=e.util.getData(m.$data,o,e.dataPathArr),w="exclusive"+a,E="exclType"+a,S="exclIsNumber"+a,P="' + "+(x="op"+a)+" + '";n+=" var schemaExcl"+a+" = "+_+"; ",n+=" var "+w+"; var "+E+" = typeof "+(_="schemaExcl"+a)+"; if ("+E+" != 'boolean' && "+E+" != 'undefined' && "+E+" != 'number') { ";var k;y=p;(k=k||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: '"+(y||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: {} ",!1!==e.opts.messages&&(n+=" , message: '"+p+" should be boolean' "),e.opts.verbose&&(n+=" , schema: validate.schema"+f+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),n+=" } "):n+=" {} ";var A=n;n=k.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+A+"]); ":n+=" validate.errors = ["+A+"]; return false; ":n+=" var err = "+A+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } else if ( ",d&&(n+=" ("+i+" !== undefined && typeof "+i+" != 'number') || "),n+=" "+E+" == 'number' ? ( ("+w+" = "+i+" === undefined || "+_+" "+v+"= "+i+") ? "+h+" "+g+"= "+_+" : "+h+" "+g+" "+i+" ) : ( ("+w+" = "+_+" === true) ? "+h+" "+g+"= "+i+" : "+h+" "+g+" "+i+" ) || "+h+" !== "+h+") { var op"+a+" = "+w+" ? '"+v+"' : '"+v+"='; ",void 0===s&&(y=p,c=e.errSchemaPath+"/"+p,i=_,d=b)}else{P=v;if((S="number"==typeof m)&&d){var x="'"+P+"'";n+=" if ( ",d&&(n+=" ("+i+" !== undefined && typeof "+i+" != 'number') || "),n+=" ( "+i+" === undefined || "+m+" "+v+"= "+i+" ? "+h+" "+g+"= "+m+" : "+h+" "+g+" "+i+" ) || "+h+" !== "+h+") { "}else{S&&void 0===s?(w=!0,y=p,c=e.errSchemaPath+"/"+p,i=m,g+="="):(S&&(i=Math[l?"min":"max"](m,s)),m===(!S||i)?(w=!0,y=p,c=e.errSchemaPath+"/"+p,g+="="):(w=!1,P+="="));x="'"+P+"'";n+=" if ( ",d&&(n+=" ("+i+" !== undefined && typeof "+i+" != 'number') || "),n+=" "+h+" "+g+" "+i+" || "+h+" !== "+h+") { "}}y=y||t,(k=k||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: '"+(y||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { comparison: "+x+", limit: "+i+", exclusive: "+w+" } ",!1!==e.opts.messages&&(n+=" , message: 'should be "+P+" ",n+=d?"' + "+i:i+"'"),e.opts.verbose&&(n+=" , schema: ",n+=d?"validate.schema"+f:""+s,n+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),n+=" } "):n+=" {} ";A=n;return n=k.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+A+"]); ":n+=" validate.errors = ["+A+"]; return false; ":n+=" var err = "+A+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } ",u&&(n+=" else { "),n}},function(e,t,r){"use strict";e.exports=function(e,t,r){var i,n=" ",a=e.level,o=e.dataLevel,s=e.schema[t],f=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,h="data"+(o||""),d=e.opts.$data&&s&&s.$data;d?(n+=" var schema"+a+" = "+e.util.getData(s.$data,o,e.dataPathArr)+"; ",i="schema"+a):i=s,n+="if ( ",d&&(n+=" ("+i+" !== undefined && typeof "+i+" != 'number') || "),n+=" "+h+".length "+("maxItems"==t?">":"<")+" "+i+") { ";var l=t,p=p||[];p.push(n),n="",!1!==e.createErrors?(n+=" { keyword: '"+(l||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+i+" } ",!1!==e.opts.messages&&(n+=" , message: 'should NOT have ",n+="maxItems"==t?"more":"fewer",n+=" than ",n+=d?"' + "+i+" + '":""+s,n+=" items' "),e.opts.verbose&&(n+=" , schema: ",n+=d?"validate.schema"+f:""+s,n+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),n+=" } "):n+=" {} ";var m=n;return n=p.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+m+"]); ":n+=" validate.errors = ["+m+"]; return false; ":n+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+="} ",u&&(n+=" else { "),n}},function(e,t,r){"use strict";e.exports=function(e,t,r){var i,n=" ",a=e.level,o=e.dataLevel,s=e.schema[t],f=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,h="data"+(o||""),d=e.opts.$data&&s&&s.$data;d?(n+=" var schema"+a+" = "+e.util.getData(s.$data,o,e.dataPathArr)+"; ",i="schema"+a):i=s;var l="maxLength"==t?">":"<";n+="if ( ",d&&(n+=" ("+i+" !== undefined && typeof "+i+" != 'number') || "),!1===e.opts.unicode?n+=" "+h+".length ":n+=" ucs2length("+h+") ",n+=" "+l+" "+i+") { ";var p=t,m=m||[];m.push(n),n="",!1!==e.createErrors?(n+=" { keyword: '"+(p||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+i+" } ",!1!==e.opts.messages&&(n+=" , message: 'should NOT be ",n+="maxLength"==t?"longer":"shorter",n+=" than ",n+=d?"' + "+i+" + '":""+s,n+=" characters' "),e.opts.verbose&&(n+=" , schema: ",n+=d?"validate.schema"+f:""+s,n+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),n+=" } "):n+=" {} ";var b=n;return n=m.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+b+"]); ":n+=" validate.errors = ["+b+"]; return false; ":n+=" var err = "+b+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+="} ",u&&(n+=" else { "),n}},function(e,t,r){"use strict";e.exports=function(e,t,r){var i,n=" ",a=e.level,o=e.dataLevel,s=e.schema[t],f=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,h="data"+(o||""),d=e.opts.$data&&s&&s.$data;d?(n+=" var schema"+a+" = "+e.util.getData(s.$data,o,e.dataPathArr)+"; ",i="schema"+a):i=s,n+="if ( ",d&&(n+=" ("+i+" !== undefined && typeof "+i+" != 'number') || "),n+=" Object.keys("+h+").length "+("maxProperties"==t?">":"<")+" "+i+") { ";var l=t,p=p||[];p.push(n),n="",!1!==e.createErrors?(n+=" { keyword: '"+(l||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+i+" } ",!1!==e.opts.messages&&(n+=" , message: 'should NOT have ",n+="maxProperties"==t?"more":"fewer",n+=" than ",n+=d?"' + "+i+" + '":""+s,n+=" properties' "),e.opts.verbose&&(n+=" , schema: ",n+=d?"validate.schema"+f:""+s,n+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),n+=" } "):n+=" {} ";var m=n;return n=p.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+m+"]); ":n+=" validate.errors = ["+m+"]; return false; ":n+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+="} ",u&&(n+=" else { "),n}},function(e){e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true}')},function(e,t,r){"use strict";const i=e=>new Promise(t=>setTimeout(t,e)),n=e=>({type:"UPLOAD_FAILURE",payload:e});e.exports={UPLOAD_FAILURE:"UPLOAD_FAILURE",UPLOAD_PPK:"UPLOAD_PPK",UPLOAD_PPK_START:"UPLOAD_PPK_START",UPLOAD_PLUGIN:"UPLOAD_PLUGIN",UPLOAD_PLUGIN_START:"UPLOADING_PLUGIN_START",CREATE_PLUGIN_ZIP:"CREATE_PLUGIN_ZIP",CREATE_PLUGIN_ZIP_START:"CREATE_PLUGIN_ZIP_START",CREATE_PLUGIN_ZIP_FAILURE:"CREATE_PLUGIN_ZIP_FAILURE",RESET:"RESET",uploadFailure:n,uploadPPK:(e,t)=>r=>{r({type:"UPLOAD_PPK_START"}),t().then(t=>{r({type:"UPLOAD_PPK",payload:{data:t,name:e}})},e=>{r(n(e))})},uploadPlugin:(e,t,r)=>i=>{i({type:"UPLOADING_PLUGIN_START"}),t().then(e=>r(e).then(()=>e)).then(t=>{i({type:"UPLOAD_PLUGIN",payload:{data:t,name:e}})},e=>{i(n(e))})},reset:()=>({type:"RESET"}),createPluginZip:e=>(t,r)=>{t({type:"CREATE_PLUGIN_ZIP_START"});const n=r();Promise.all([e(n.contents.data,n.ppk.data),i(300)]).then(([e])=>{t({type:"CREATE_PLUGIN_ZIP",payload:e})},e=>{t({type:"CREATE_PLUGIN_ZIP_FAILURE",payload:e})})}}},function(e,t,r){"use strict";function i(e){var t,r=e.Symbol;return"function"==typeof r?r.observable?t=r.observable:(t=r("observable"),r.observable=t):t="@@observable",t}r.d(t,"a",(function(){return i}))},function(e,t,r){"use strict";r(61);const{createStore:i,applyMiddleware:n}=r(120),a=r(122).default,{$:o,$$:s,fileMapToBuffer:f,listen:c,readText:u,readArrayBuffer:h,createFileHanlder:d}=(r(123).default,r(62)),l=r(151),{reducer:p}=r(72),{uploadPPK:m,uploadPlugin:b,createPluginZip:v,reset:g,uploadFailure:y}=r(117),{generatePluginZip:_,validatePlugin:w,revokePluginUrls:E}=r(73),S=o(".js-upload-ppk .js-file-upload"),P=o(".js-upload-zip .js-file-upload"),k=s(".js-file-upload"),A=s(".js-upload"),x=o(".js-upload-zip"),I=o(".js-upload-ppk"),O=o(".js-create-btn"),M=o(".js-create-loading-btn"),R=o(".js-clear-btn"),T=s(".js-file-upload"),D=o(".js-zip-ok-icon"),C=o(".js-ppk-ok-icon"),L=o(".js-upload-zip-link"),B=o(".js-upload-ppk-link"),N=o(".js-download"),F=o(".js-download-plugin"),j=o(".js-download-plugin-id"),z=o(".js-download-ppk"),U=new l({createLoadingBtn:M,createBtn:O,zipDropArea:x,ppkDropArea:I,ppkOkIcon:C,error:o(".js-error"),download:N,downloadPluginId:j,downloadPlugin:F,downloadPPK:z,errorMessages:o(".js-error-messages"),zipOkIcon:D,zipFileName:o(".js-zip-file-name"),ppkFileName:o(".js-ppk-file-name")});const q=i(p,n(...[a]));q.subscribe(()=>{U.render(q.getState())});const $=d(e=>{e.then(e=>{if(e instanceof File)q.dispatch(b(e.name,()=>h(e),w));else{if(!(e.entries instanceof Map))throw new Error("Something went wrong.");f(e.entries).then(t=>{q.dispatch(b(e.name,()=>Promise.resolve(t),w))})}}).catch(e=>{q.dispatch(y(e))})}),K=d(e=>{e.then(e=>{if(e instanceof File)q.dispatch(m(e.name,()=>u(e)));else{if(!(e.entries instanceof Map))throw new Error("Something went wrong.");q.dispatch(y(new Error("secret file should be a text file")))}}).catch(e=>{q.dispatch(y(e))})});c(P,"change",$),c(S,"change",K),c(x,"drop",$),c(I,"drop",K),c(k,"click",e=>{e.target.value=null}),c(O,"click",()=>{const e=q.getState();e.contents.data&&(E(e.plugin),q.dispatch(v(_)))}),c(R,"click",()=>{T.forEach(e=>{e.value=null}),q.dispatch(g())}),c(L,"click",e=>{e.preventDefault(),P.click()}),c(B,"click",e=>{e.preventDefault(),S.click()}),c(A,"dragover",e=>{e.preventDefault(),U.decorateDragOver(e.currentTarget)}),c(A,"dragleave",e=>{U.decorateDragLeave(e.currentTarget)}),q.dispatch({type:"__INIT__"})},function(e,t,r){"use strict";r.r(t),r.d(t,"__DO_NOT_USE__ActionTypes",(function(){return a})),r.d(t,"applyMiddleware",(function(){return b})),r.d(t,"bindActionCreators",(function(){return h})),r.d(t,"combineReducers",(function(){return c})),r.d(t,"compose",(function(){return m})),r.d(t,"createStore",(function(){return s}));var i=r(60),n=function(){return Math.random().toString(36).substring(7).split("").join(".")},a={INIT:"@@redux/INIT"+n(),REPLACE:"@@redux/REPLACE"+n(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+n()}};function o(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function s(e,t,r){var n;if("function"==typeof t&&"function"==typeof r||"function"==typeof r&&"function"==typeof arguments[3])throw new Error("It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function.");if("function"==typeof t&&void 0===r&&(r=t,t=void 0),void 0!==r){if("function"!=typeof r)throw new Error("Expected the enhancer to be a function.");return r(s)(e,t)}if("function"!=typeof e)throw new Error("Expected the reducer to be a function.");var f=e,c=t,u=[],h=u,d=!1;function l(){h===u&&(h=u.slice())}function p(){if(d)throw new Error("You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return c}function m(e){if("function"!=typeof e)throw new Error("Expected the listener to be a function.");if(d)throw new Error("You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api-reference/store#subscribe(listener) for more details.");var t=!0;return l(),h.push(e),function(){if(t){if(d)throw new Error("You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api-reference/store#subscribe(listener) for more details.");t=!1,l();var r=h.indexOf(e);h.splice(r,1)}}}function b(e){if(!o(e))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if(void 0===e.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(d)throw new Error("Reducers may not dispatch actions.");try{d=!0,c=f(c,e)}finally{d=!1}for(var t=u=h,r=0;r=t.length?r(new s(p,_,new o(void 0,e[_]))):u(e[_],t[_],r,i,p,_,l);for(;_=0?(u(e[n],t[n],r,i,p,n,l),E=f(E,o)):u(e[n],void 0,r,i,p,n,l)})),E.forEach((function(e){u(void 0,t[e],r,i,p,e,l)}))}l.length=l.length-1}else e!==t&&("number"===b&&isNaN(e)&&isNaN(t)||r(new n(p,e,t)))}function h(e,t,r,i){return i=i||[],u(e,t,(function(e){e&&i.push(e)}),r),i.length?i:void 0}function d(e,t,r){if(e&&t&&r&&r.kind){for(var i=e,n=-1,a=r.path?r.path.length-1:0;++n0&&void 0!==arguments[0]?arguments[0]:{},t=Object.assign({},x,e),r=t.logger,i=t.stateTransformer,n=t.errorTransformer,a=t.predicate,o=t.logErrors,s=t.diffPredicate;if(void 0===r)return function(){return function(e){return function(t){return e(t)}}};if(e.getState&&e.dispatch)return console.error("[redux-logger] redux-logger not installed. Make sure to pass logger instance as middleware:\n// Logger with default options\nimport { logger } from 'redux-logger'\nconst store = createStore(\n reducer,\n applyMiddleware(logger)\n)\n// Or you can create your own logger with custom options http://bit.ly/redux-logger-options\nimport createLogger from 'redux-logger'\nconst logger = createLogger({\n // ...options\n});\nconst store = createStore(\n reducer,\n applyMiddleware(logger)\n)\n"),function(){return function(e){return function(t){return e(t)}}};var f=[];return function(e){var r=e.getState;return function(e){return function(c){if("function"==typeof a&&!a(r,c))return e(c);var u={};f.push(u),u.started=E.now(),u.startedTime=new Date,u.prevState=i(r()),u.action=c;var h=void 0;if(o)try{h=e(c)}catch(e){u.error=n(e)}else h=e(c);u.took=E.now()-u.started,u.nextState=i(r());var d=t.diff&&"function"==typeof s?s(r,c):t.diff;if(b(f,Object.assign({},t,{diff:d})),f.length=0,u.error)throw u.error;return h}}}}var g,y,_=function(e,t){return function(e,t){return new Array(t+1).join(e)}("0",t-e.toString().length)+e},w=function(e){return _(e.getHours(),2)+":"+_(e.getMinutes(),2)+":"+_(e.getSeconds(),2)+"."+_(e.getMilliseconds(),3)},E="undefined"!=typeof performance&&null!==performance&&"function"==typeof performance.now?performance:Date,S="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},P=function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:{},t=e.dispatch,r=e.getState;return"function"==typeof t||"function"==typeof r?v()({dispatch:t,getState:r}):void console.error("\n[redux-logger v3] BREAKING CHANGE\n[redux-logger v3] Since 3.0.0 redux-logger exports by default logger with default settings.\n[redux-logger v3] Change\n[redux-logger v3] import createLogger from 'redux-logger'\n[redux-logger v3] to\n[redux-logger v3] import { createLogger } from 'redux-logger'\n")};t.defaults=x,t.createLogger=v,t.logger=I,t.default=I,Object.defineProperty(t,"__esModule",{value:!0})}(t)}).call(this,r(5))},function(e,t,r){"use strict";t.byteLength=function(e){var t=c(e),r=t[0],i=t[1];return 3*(r+i)/4-i},t.toByteArray=function(e){var t,r,i=c(e),o=i[0],s=i[1],f=new a(function(e,t,r){return 3*(t+r)/4-r}(0,o,s)),u=0,h=s>0?o-4:o;for(r=0;r>16&255,f[u++]=t>>8&255,f[u++]=255&t;2===s&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,f[u++]=255&t);1===s&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,f[u++]=t>>8&255,f[u++]=255&t);return f},t.fromByteArray=function(e){for(var t,r=e.length,n=r%3,a=[],o=0,s=r-n;os?s:o+16383));1===n?(t=e[r-1],a.push(i[t>>2]+i[t<<4&63]+"==")):2===n&&(t=(e[r-2]<<8)+e[r-1],a.push(i[t>>10]+i[t>>4&63]+i[t<<2&63]+"="));return a.join("")};for(var i=[],n=[],a="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,f=o.length;s0)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 n,a,o=[],s=t;s>18&63]+i[a>>12&63]+i[a>>6&63]+i[63&a]);return o.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,r,i,n){var a,o,s=8*n-i-1,f=(1<>1,u=-7,h=r?n-1:0,d=r?-1:1,l=e[t+h];for(h+=d,a=l&(1<<-u)-1,l>>=-u,u+=s;u>0;a=256*a+e[t+h],h+=d,u-=8);for(o=a&(1<<-u)-1,a>>=-u,u+=i;u>0;o=256*o+e[t+h],h+=d,u-=8);if(0===a)a=1-c;else{if(a===f)return o?NaN:1/0*(l?-1:1);o+=Math.pow(2,i),a-=c}return(l?-1:1)*o*Math.pow(2,a-i)},t.write=function(e,t,r,i,n,a){var o,s,f,c=8*a-n-1,u=(1<>1,d=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,l=i?0:a-1,p=i?1:-1,m=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=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(f=Math.pow(2,-o))<1&&(o--,f*=2),(t+=o+h>=1?d/f:d*Math.pow(2,1-h))*f>=2&&(o++,f/=2),o+h>=u?(s=0,o=u):o+h>=1?(s=(t*f-1)*Math.pow(2,n),o+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,n),o=0));n>=8;e[r+l]=255&s,l+=p,s/=256,n-=8);for(o=o<0;e[r+l]=255&o,l+=p,o/=256,c-=8);e[r+l-p]|=128*m}},function(e,t,r){"use strict";function i(e){return function e(t,r){for(var i=0;i-1&&Array.isArray(a)?e(a,r,i):r.push(a)}return r}(e,[],t)}e.exports=function(e){if(!Array.isArray(e))throw new TypeError("Expected value to be an array");return i(e)},e.exports.from=i,e.exports.depth=function(e,t){if(!Array.isArray(e))throw new TypeError("Expected value to be an array");return n(e,t)},e.exports.fromDepth=n},function(e,t){},function(e,t,r){"use strict";var i=r(2).Buffer,n=r(129);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 i.alloc(0);if(1===this.length)return this.head.data;for(var t,r,n,a=i.allocUnsafe(e>>>0),o=this.head,s=0;o;)t=o.data,r=a,n=s,t.copy(r,n),s+=o.data.length,o=o.next;return a},e}(),n&&n.inspect&&n.inspect.custom&&(e.exports.prototype[n.inspect.custom]=function(){var e=n.inspect({length:this.length});return this.constructor.name+" "+e})},function(e,t){},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 i=!1;return function(){if(!i){if(r("throwDeprecation"))throw new Error(t);r("traceDeprecation")?console.trace(t):console.warn(t),i=!0}return e.apply(this,arguments)}}}).call(this,r(5))},function(e,t,r){var i=r(1),n=i.Buffer;function a(e,t){for(var r in e)t[r]=e[r]}function o(e,t,r){return n(e,t,r)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?e.exports=i:(a(i,t),t.Buffer=o),o.prototype=Object.create(n.prototype),a(n,o),o.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return n(e,t,r)},o.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var i=n(e);return void 0!==t?"string"==typeof r?i.fill(t,r):i.fill(t):i.fill(0),i},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i.SlowBuffer(e)}},function(e,t,r){"use strict";e.exports=a;var i=r(67),n=r(20);function a(e){if(!(this instanceof a))return new a(e);i.call(this,e)}n.inherits=r(0),n.inherits(a,i),a.prototype._transform=function(e,t,r){r(null,e)}},function(e,t,r){e.exports=r(39)},function(e,t,r){e.exports=r(13)},function(e,t,r){e.exports=r(38).Transform},function(e,t,r){e.exports=r(38).PassThrough},function(e,t,r){"use strict";(function(e,i){var n=r(29),a=r(141),o=r(142),s=r(145),f=r(148);for(var c in f)t[c]=f[c];t.NONE=0,t.DEFLATE=1,t.INFLATE=2,t.GZIP=3,t.GUNZIP=4,t.DEFLATERAW=5,t.INFLATERAW=6,t.UNZIP=7;function u(e){if("number"!=typeof e||et.UNZIP)throw new TypeError("Bad argument");this.dictionary=null,this.err=0,this.flush=0,this.init_done=!1,this.level=0,this.memLevel=0,this.mode=e,this.strategy=0,this.windowBits=0,this.write_in_progress=!1,this.pending_close=!1,this.gzip_id_bytes_read=0}u.prototype.close=function(){this.write_in_progress?this.pending_close=!0:(this.pending_close=!1,n(this.init_done,"close before init"),n(this.mode<=t.UNZIP),this.mode===t.DEFLATE||this.mode===t.GZIP||this.mode===t.DEFLATERAW?o.deflateEnd(this.strm):this.mode!==t.INFLATE&&this.mode!==t.GUNZIP&&this.mode!==t.INFLATERAW&&this.mode!==t.UNZIP||s.inflateEnd(this.strm),this.mode=t.NONE,this.dictionary=null)},u.prototype.write=function(e,t,r,i,n,a,o){return this._write(!0,e,t,r,i,n,a,o)},u.prototype.writeSync=function(e,t,r,i,n,a,o){return this._write(!1,e,t,r,i,n,a,o)},u.prototype._write=function(r,a,o,s,f,c,u,h){if(n.equal(arguments.length,8),n(this.init_done,"write before init"),n(this.mode!==t.NONE,"already finalized"),n.equal(!1,this.write_in_progress,"write already in progress"),n.equal(!1,this.pending_close,"close is pending"),this.write_in_progress=!0,n.equal(!1,void 0===a,"must provide flush value"),this.write_in_progress=!0,a!==t.Z_NO_FLUSH&&a!==t.Z_PARTIAL_FLUSH&&a!==t.Z_SYNC_FLUSH&&a!==t.Z_FULL_FLUSH&&a!==t.Z_FINISH&&a!==t.Z_BLOCK)throw new Error("Invalid flush value");if(null==o&&(o=e.alloc(0),f=0,s=0),this.strm.avail_in=f,this.strm.input=o,this.strm.next_in=s,this.strm.avail_out=h,this.strm.output=c,this.strm.next_out=u,this.flush=a,!r)return this._process(),this._checkError()?this._afterSync():void 0;var d=this;return i.nextTick((function(){d._process(),d._after()})),this},u.prototype._afterSync=function(){var e=this.strm.avail_out,t=this.strm.avail_in;return this.write_in_progress=!1,[t,e]},u.prototype._process=function(){var e=null;switch(this.mode){case t.DEFLATE:case t.GZIP:case t.DEFLATERAW:this.err=o.deflate(this.strm,this.flush);break;case t.UNZIP:switch(this.strm.avail_in>0&&(e=this.strm.next_in),this.gzip_id_bytes_read){case 0:if(null===e)break;if(31!==this.strm.input[e]){this.mode=t.INFLATE;break}if(this.gzip_id_bytes_read=1,e++,1===this.strm.avail_in)break;case 1:if(null===e)break;139===this.strm.input[e]?(this.gzip_id_bytes_read=2,this.mode=t.GUNZIP):this.mode=t.INFLATE;break;default:throw new Error("invalid number of gzip magic number bytes read")}case t.INFLATE:case t.GUNZIP:case t.INFLATERAW:for(this.err=s.inflate(this.strm,this.flush),this.err===t.Z_NEED_DICT&&this.dictionary&&(this.err=s.inflateSetDictionary(this.strm,this.dictionary),this.err===t.Z_OK?this.err=s.inflate(this.strm,this.flush):this.err===t.Z_DATA_ERROR&&(this.err=t.Z_NEED_DICT));this.strm.avail_in>0&&this.mode===t.GUNZIP&&this.err===t.Z_STREAM_END&&0!==this.strm.next_in[0];)this.reset(),this.err=s.inflate(this.strm,this.flush);break;default:throw new Error("Unknown mode "+this.mode)}},u.prototype._checkError=function(){switch(this.err){case t.Z_OK:case t.Z_BUF_ERROR:if(0!==this.strm.avail_out&&this.flush===t.Z_FINISH)return this._error("unexpected end of file"),!1;break;case t.Z_STREAM_END:break;case t.Z_NEED_DICT:return null==this.dictionary?this._error("Missing dictionary"):this._error("Bad dictionary"),!1;default:return this._error("Zlib error"),!1}return!0},u.prototype._after=function(){if(this._checkError()){var e=this.strm.avail_out,t=this.strm.avail_in;this.write_in_progress=!1,this.callback(t,e),this.pending_close&&this.close()}},u.prototype._error=function(e){this.strm.msg&&(e=this.strm.msg),this.onerror(e,this.err),this.write_in_progress=!1,this.pending_close&&this.close()},u.prototype.init=function(e,r,i,a,o){n(4===arguments.length||5===arguments.length,"init(windowBits, level, memLevel, strategy, [dictionary])"),n(e>=8&&e<=15,"invalid windowBits"),n(r>=-1&&r<=9,"invalid compression level"),n(i>=1&&i<=9,"invalid memlevel"),n(a===t.Z_FILTERED||a===t.Z_HUFFMAN_ONLY||a===t.Z_RLE||a===t.Z_FIXED||a===t.Z_DEFAULT_STRATEGY,"invalid strategy"),this._init(r,e,i,a,o),this._setDictionary()},u.prototype.params=function(){throw new Error("deflateParams Not supported")},u.prototype.reset=function(){this._reset(),this._setDictionary()},u.prototype._init=function(e,r,i,n,f){switch(this.level=e,this.windowBits=r,this.memLevel=i,this.strategy=n,this.flush=t.Z_NO_FLUSH,this.err=t.Z_OK,this.mode!==t.GZIP&&this.mode!==t.GUNZIP||(this.windowBits+=16),this.mode===t.UNZIP&&(this.windowBits+=32),this.mode!==t.DEFLATERAW&&this.mode!==t.INFLATERAW||(this.windowBits=-1*this.windowBits),this.strm=new a,this.mode){case t.DEFLATE:case t.GZIP:case t.DEFLATERAW:this.err=o.deflateInit2(this.strm,this.level,t.Z_DEFLATED,this.windowBits,this.memLevel,this.strategy);break;case t.INFLATE:case t.GUNZIP:case t.INFLATERAW:case t.UNZIP:this.err=s.inflateInit2(this.strm,this.windowBits);break;default:throw new Error("Unknown mode "+this.mode)}this.err!==t.Z_OK&&this._error("Init error"),this.dictionary=f,this.write_in_progress=!1,this.init_done=!0},u.prototype._setDictionary=function(){if(null!=this.dictionary){switch(this.err=t.Z_OK,this.mode){case t.DEFLATE:case t.DEFLATERAW:this.err=o.deflateSetDictionary(this.strm,this.dictionary)}this.err!==t.Z_OK&&this._error("Failed to set dictionary")}},u.prototype._reset=function(){switch(this.err=t.Z_OK,this.mode){case t.DEFLATE:case t.DEFLATERAW:case t.GZIP:this.err=o.deflateReset(this.strm);break;case t.INFLATE:case t.INFLATERAW:case t.GUNZIP:this.err=s.inflateReset(this.strm)}this.err!==t.Z_OK&&this._error("Failed to reset stream")},t.Zlib=u}).call(this,r(1).Buffer,r(4))},function(e,t,r){"use strict"; +var i=r(31),n=r(153),a=(r(10),r(54).Ber,r(7)._),o=r(7),s=r(18),f=r(232);void 0===i.RSA_NO_PADDING&&(i.RSA_NO_PADDING=3),e.exports=function(){var e={node10:["md4","md5","ripemd160","sha1","sha224","sha256","sha384","sha512"],node:["md4","md5","ripemd160","sha1","sha224","sha256","sha384","sha512"],iojs:["md4","md5","ripemd160","sha1","sha224","sha256","sha384","sha512"],browser:["md5","ripemd160","sha1","sha256","sha512"]},r="pkcs1_oaep",i="pkcs1",c={private:"pkcs1-private-pem","private-der":"pkcs1-private-der",public:"pkcs8-public-pem","public-der":"pkcs8-public-der"};function u(e,s,f){if(!(this instanceof u))return new u(e,s,f);a.isObject(s)&&(f=s,s=void 0),this.$options={signingScheme:i,signingSchemeOptions:{hash:"sha256",saltLength:null},encryptionScheme:r,encryptionSchemeOptions:{hash:"sha1",label:null},environment:o.detectEnvironment(),rsaUtils:this},this.keyPair=new n.Key,this.$cache={},t.isBuffer(e)||a.isString(e)?this.importKey(e,s):a.isObject(e)&&this.generateKeyPair(e.b,e.e),this.setOptions(f)}return u.prototype.setOptions=function(t){if((t=t||{}).environment&&(this.$options.environment=t.environment),t.signingScheme){if(a.isString(t.signingScheme)){var n=t.signingScheme.toLowerCase().split("-");1==n.length?e.node.indexOf(n[0])>-1?(this.$options.signingSchemeOptions={hash:n[0]},this.$options.signingScheme=i):(this.$options.signingScheme=n[0],this.$options.signingSchemeOptions={hash:null}):(this.$options.signingSchemeOptions={hash:n[1]},this.$options.signingScheme=n[0])}else a.isObject(t.signingScheme)&&(this.$options.signingScheme=t.signingScheme.scheme||i,this.$options.signingSchemeOptions=a.omit(t.signingScheme,"scheme"));if(!s.isSignature(this.$options.signingScheme))throw Error("Unsupported signing scheme");if(this.$options.signingSchemeOptions.hash&&-1===e[this.$options.environment].indexOf(this.$options.signingSchemeOptions.hash))throw Error("Unsupported hashing algorithm for "+this.$options.environment+" environment")}if(t.encryptionScheme){if(a.isString(t.encryptionScheme)?(this.$options.encryptionScheme=t.encryptionScheme.toLowerCase(),this.$options.encryptionSchemeOptions={}):a.isObject(t.encryptionScheme)&&(this.$options.encryptionScheme=t.encryptionScheme.scheme||r,this.$options.encryptionSchemeOptions=a.omit(t.encryptionScheme,"scheme")),!s.isEncryption(this.$options.encryptionScheme))throw Error("Unsupported encryption scheme");if(this.$options.encryptionSchemeOptions.hash&&-1===e[this.$options.environment].indexOf(this.$options.encryptionSchemeOptions.hash))throw Error("Unsupported hashing algorithm for "+this.$options.environment+" environment")}this.keyPair.setOptions(this.$options)},u.prototype.generateKeyPair=function(e,t){if(t=t||65537,(e=e||2048)%8!=0)throw Error("Key size must be a multiple of 8.");return this.keyPair.generate(e,t.toString(16)),this.$cache={},this},u.prototype.importKey=function(e,t){if(!e)throw Error("Empty key given");if(t&&(t=c[t]||t),!f.detectAndImport(this.keyPair,e,t)&&void 0===t)throw Error("Key format must be specified");return this.$cache={},this},u.prototype.exportKey=function(e){return e=c[e=e||"private"]||e,this.$cache[e]||(this.$cache[e]=f.detectAndExport(this.keyPair,e)),this.$cache[e]},u.prototype.isPrivate=function(){return this.keyPair.isPrivate()},u.prototype.isPublic=function(e){return this.keyPair.isPublic(e)},u.prototype.isEmpty=function(e){return!(this.keyPair.n||this.keyPair.e||this.keyPair.d)},u.prototype.encrypt=function(e,t,r){return this.$$encryptKey(!1,e,t,r)},u.prototype.decrypt=function(e,t){return this.$$decryptKey(!1,e,t)},u.prototype.encryptPrivate=function(e,t,r){return this.$$encryptKey(!0,e,t,r)},u.prototype.decryptPublic=function(e,t){return this.$$decryptKey(!0,e,t)},u.prototype.$$encryptKey=function(e,t,r,i){try{var n=this.keyPair.encrypt(this.$getDataForEncrypt(t,i),e);return"buffer"!=r&&r?n.toString(r):n}catch(e){throw Error("Error during encryption. Original error: "+e)}},u.prototype.$$decryptKey=function(e,r,i){try{r=a.isString(r)?t.from(r,"base64"):r;var n=this.keyPair.decrypt(r,e);if(null===n)throw Error("Key decrypt method returns null.");return this.$getDecryptedData(n,i)}catch(e){throw Error("Error during decryption (probably incorrect key). Original error: "+e)}},u.prototype.sign=function(e,t,r){if(!this.isPrivate())throw Error("This is not private key");var i=this.keyPair.sign(this.$getDataForEncrypt(e,r));return t&&"buffer"!=t&&(i=i.toString(t)),i},u.prototype.verify=function(e,t,r,i){if(!this.isPublic())throw Error("This is not public key");return i=i&&"buffer"!=i?i:null,this.keyPair.verify(this.$getDataForEncrypt(e,r),t,i)},u.prototype.getKeySize=function(){return this.keyPair.keySize},u.prototype.getMaxMessageSize=function(){return this.keyPair.maxMessageLength},u.prototype.$getDataForEncrypt=function(e,r){if(a.isString(e)||a.isNumber(e))return t.from(""+e,r||"utf8");if(t.isBuffer(e))return e;if(a.isObject(e))return t.from(JSON.stringify(e));throw Error("Unexpected data type")},u.prototype.$getDecryptedData=function(e,t){return"buffer"==(t=t||"buffer")?e:"json"==t?JSON.parse(e.toString()):e.toString(t)},u}()}).call(this,r(1).Buffer)},function(e,t,r){"use strict";var i=r(2).Buffer,n=r(6).Transform;function a(e){n.call(this),this._block=i.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}r(0)(a,n),a.prototype._transform=function(e,t,r){var i=null;try{this.update(e,t)}catch(e){i=e}r(i)},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(!i.isBuffer(e)&&"string"!=typeof e)throw new TypeError(t+" must be a string or a buffer")}(e,"Data"),this._finalized)throw new Error("Digest already called");i.isBuffer(e)||(e=i.from(e,t));for(var r=this._block,n=0;this._blockOffset+e.length-n>=this._blockSize;){for(var a=this._blockOffset;a0;++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,r){var i=r(0),n=r(17),a=r(2).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 f(){this.init(),this._w=s,n.call(this,64,56)}function c(e,t,r){return r^e&(t^r)}function u(e,t,r){return e&t|r&(e|t)}function h(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function d(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function l(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}i(f,n),f.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},f.prototype._update=function(e){for(var t,r=this._w,i=0|this._a,n=0|this._b,a=0|this._c,s=0|this._d,f=0|this._e,p=0|this._f,m=0|this._g,b=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]+l(r[v-15])+r[v-16];for(var g=0;g<64;++g){var y=b+d(f)+c(f,p,m)+o[g]+r[g]|0,_=h(i)+u(i,n,a)|0;b=m,m=p,p=f,f=s+y|0,s=a,a=n,n=i,i=y+_|0}this._a=i+this._a|0,this._b=n+this._b|0,this._c=a+this._c|0,this._d=s+this._d|0,this._e=f+this._e|0,this._f=p+this._f|0,this._g=m+this._g|0,this._h=b+this._h|0},f.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=f},function(e,t,r){var i=r(0),n=r(17),a=r(2).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 f(){this.init(),this._w=s,n.call(this,128,112)}function c(e,t,r){return r^e&(t^r)}function u(e,t,r){return e&t|r&(e|t)}function h(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function d(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function l(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 m(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function b(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function v(e,t){return e>>>0>>0?1:0}i(f,n),f.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},f.prototype._update=function(e){for(var t=this._w,r=0|this._ah,i=0|this._bh,n=0|this._ch,a=0|this._dh,s=0|this._eh,f=0|this._fh,g=0|this._gh,y=0|this._hh,_=0|this._al,w=0|this._bl,E=0|this._cl,S=0|this._dl,P=0|this._el,k=0|this._fl,A=0|this._gl,x=0|this._hl,I=0;I<32;I+=2)t[I]=e.readInt32BE(4*I),t[I+1]=e.readInt32BE(4*I+4);for(;I<160;I+=2){var O=t[I-30],M=t[I-30+1],R=l(O,M),T=p(M,O),D=m(O=t[I-4],M=t[I-4+1]),C=b(M,O),L=t[I-14],B=t[I-14+1],N=t[I-32],F=t[I-32+1],j=T+B|0,z=R+L+v(j,T)|0;z=(z=z+D+v(j=j+C|0,C)|0)+N+v(j=j+F|0,F)|0,t[I]=z,t[I+1]=j}for(var U=0;U<160;U+=2){z=t[U],j=t[U+1];var q=u(r,i,n),$=u(_,w,E),K=h(r,_),H=h(_,r),Z=d(s,P),G=d(P,s),V=o[U],Y=o[U+1],W=c(s,f,g),X=c(P,k,A),Q=x+G|0,J=y+Z+v(Q,x)|0;J=(J=(J=J+W+v(Q=Q+X|0,X)|0)+V+v(Q=Q+Y|0,Y)|0)+z+v(Q=Q+j|0,j)|0;var ee=H+$|0,te=K+q+v(ee,H)|0;y=g,x=A,g=f,A=k,f=s,k=P,s=a+J+v(P=S+Q|0,S)|0,a=n,S=E,n=i,E=w,i=r,w=_,r=J+te+v(_=Q+ee|0,Q)|0}this._al=this._al+_|0,this._bl=this._bl+w|0,this._cl=this._cl+E|0,this._dl=this._dl+S|0,this._el=this._el+P|0,this._fl=this._fl+k|0,this._gl=this._gl+A|0,this._hl=this._hl+x|0,this._ah=this._ah+r+v(this._al,_)|0,this._bh=this._bh+i+v(this._bl,w)|0,this._ch=this._ch+n+v(this._cl,E)|0,this._dh=this._dh+a+v(this._dl,S)|0,this._eh=this._eh+s+v(this._el,P)|0,this._fh=this._fh+f+v(this._fl,k)|0,this._gh=this._gh+g+v(this._gl,A)|0,this._hh=this._hh+y+v(this._hl,x)|0},f.prototype._hash=function(){var e=a.allocUnsafe(64);function t(t,r,i){e.writeInt32BE(t,i),e.writeInt32BE(r,i+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=f},function(e,t,r){"use strict";var i=r(0),n=r(158),a=r(12),o=r(2).Buffer,s=r(79),f=r(44),c=r(45),u=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 f:c(e)).update(t).digest():t.lengthr||a!=a)throw new TypeError("Bad key length")}}).call(this,r(1).Buffer)},function(e,t,r){(function(t){var r;t.browser?r="utf-8":r=parseInt(t.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary";e.exports=r}).call(this,r(4))},function(e,t,r){var i=r(79),n=r(44),a=r(45),o=r(82),s=r(83),f=r(2).Buffer,c=f.alloc(128),u={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?function(e){return(new n).update(e).digest()}:"md5"===e?i:function(t){return a(e).update(t).digest()}}(e),s="sha512"===e||"sha384"===e?128:64;t.length>s?t=o(t):t.lengthe;)r.ishrn(1);if(r.isEven()&&r.iadd(s),r.testn(1)||r.iadd(f),t.cmp(f)){if(!t.cmp(c))for(;r.mod(u).cmp(h);)r.iadd(l)}else for(;r.mod(a).cmp(d);)r.iadd(l);if(b(p=r.shrn(1))&&b(r)&&v(p)&&v(r)&&o.test(p)&&o.test(r))return r}}},function(e,t,r){var i=r(3),n=r(49);function a(e){this.rand=e||new n.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 n=new i(this.rand.generate(r))}while(n.cmp(e)>=0);return n},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 n=e.bitLength(),a=i.mont(e),o=new i(1).toRed(a);t||(t=Math.max(1,n/48|0));for(var s=e.subn(1),f=0;!s.testn(f);f++);for(var c=e.shrn(f),u=s.toRed(a);t>0;t--){var h=this._randrange(new i(2),s);r&&r(h);var d=h.toRed(a).redPow(c);if(0!==d.cmp(o)&&0!==d.cmp(u)){for(var l=1;l0;t--){var u=this._randrange(new i(2),o),h=e.gcd(u);if(0!==h.cmpn(1))return h;var d=u.toRed(n).redPow(f);if(0!==d.cmp(a)&&0!==d.cmp(c)){for(var l=1;l>8,o=255&n;a?r.push(a,o):r.push(o)}return r},i.zero2=n,i.toHex=a,i.encode=function(e,t){return"hex"===t?a(e):e}},function(e,t,r){"use strict";var i=t;i.base=r(34),i.short=r(187),i.mont=r(188),i.edwards=r(189)},function(e,t,r){"use strict";var i=r(11).rotr32;function n(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,i){return 0===e?n(t,r,i):1===e||3===e?o(t,r,i):2===e?a(t,r,i):void 0},t.ch32=n,t.maj32=a,t.p32=o,t.s0_256=function(e){return i(e,2)^i(e,13)^i(e,22)},t.s1_256=function(e){return i(e,6)^i(e,11)^i(e,25)},t.g0_256=function(e){return i(e,7)^i(e,18)^e>>>3},t.g1_256=function(e){return i(e,17)^i(e,19)^e>>>10}},function(e,t,r){"use strict";var i=r(11),n=r(23),a=r(94),o=r(8),s=i.sum32,f=i.sum32_4,c=i.sum32_5,u=a.ch32,h=a.maj32,d=a.s0_256,l=a.s1_256,p=a.g0_256,m=a.g1_256,b=n.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 g(){if(!(this instanceof g))return new g;b.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=v,this.W=new Array(64)}i.inherits(g,b),e.exports=g,g.blockSize=512,g.outSize=256,g.hmacStrength=192,g.padLength=64,g.prototype._update=function(e,t){for(var r=this.W,i=0;i<16;i++)r[i]=e[t+i];for(;i>6],n=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:i,primitive:n,tag:r,tagStr:s.tag[r]}}function h(e,t,r){var i=e.readUInt8(r);if(e.isError(i))return i;if(!t&&128===i)return null;if(0==(128&i))return i;var n=127&i;if(n>4)return e.error("length octect is too long");i=0;for(var a=0;a=31)return i.error("Multi-octet tag encoding unsupported");t||(n|=32);return n|=s.tagClassByName[r||"universal"]<<6}(e,t,r,this.reporter);if(i.length<128)return(a=new n(2))[0]=o,a[1]=i.length,this._createEncoderBuffer([a,i]);for(var f=1,c=i.length;c>=256;c>>=8)f++;(a=new n(2+f))[0]=o,a[1]=128|f;c=1+f;for(var u=i.length;u>0;c--,u>>=8)a[c]=255&u;return this._createEncoderBuffer([a,i])},c.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){for(var r=new n(2*e.length),i=0;i=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}var a=0;for(i=0;i=128;o>>=7)a++}var s=new n(a),f=s.length-1;for(i=e.length-1;i>=0;i--){o=e[i];for(s[f--]=127&o;(o>>=7)>0;)s[f--]=128|127&o}return this._createEncoderBuffer(s)},c.prototype._encodeTime=function(e,t){var r,i=new Date(e);return"gentime"===t?r=[u(i.getFullYear()),u(i.getUTCMonth()+1),u(i.getUTCDate()),u(i.getUTCHours()),u(i.getUTCMinutes()),u(i.getUTCSeconds()),"Z"].join(""):"utctime"===t?r=[u(i.getFullYear()%100),u(i.getUTCMonth()+1),u(i.getUTCDate()),u(i.getUTCHours()),u(i.getUTCMinutes()),u(i.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(r,"octstr")},c.prototype._encodeNull=function(){return this._createEncoderBuffer("")},c.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&&!n.isBuffer(e)){var r=e.toArray();!e.sign&&128&r[0]&&r.unshift(0),e=new n(r)}if(n.isBuffer(e)){var i=e.length;0===e.length&&i++;var a=new n(i);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]);i=1;for(var o=e;o>=256;o>>=8)i++;for(o=(a=new Array(i)).length-1;o>=0;o--)a[o]=255&e,e>>=8;return 128&a[0]&&a.unshift(0),this._createEncoderBuffer(new n(a))},c.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},c.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getEncoder("der").tree},c.prototype._skipDefault=function(e,t,r){var i,n=this._baseState;if(null===n.default)return!1;var a=e.join();if(void 0===n.defaultBuffer&&(n.defaultBuffer=this._encodeValue(n.default,t,r).join()),a.length!==n.defaultBuffer.length)return!1;for(i=0;i=2*(1<<30))throw new RangeError('The value "'+e+'" is invalid for option "size"');var i=a(e);return t&&0!==t.length?"string"==typeof r?i.fill(t,r):i.fill(t):i.fill(0),i}),!o.kStringMaxLength)try{o.kStringMaxLength=t.binding("buffer").kStringMaxLength}catch(e){}o.constants||(o.constants={MAX_LENGTH:o.kMaxLength},o.kStringMaxLength&&(o.constants.MAX_STRING_LENGTH=o.kStringMaxLength)),e.exports=o}).call(this,r(4))},function(e,t,r){"use strict";const i=r(242),n=r(36),a=r(243),o=r(246),s=r(248),f=r(41),c=r(286),u=r(287);function h(e){return function(e){return o(a.fromBuffer)(e).then(e=>new Promise((t,r)=>{const i=new Map,n={zipFile:e,entries:i};e.on("entry",e=>{i.set(e.fileName,e)}),e.on("end",()=>{t(n)}),e.on("error",r)}))}(e).then(e=>{const t=Array.from(e.entries.keys()).filter(e=>"manifest.json"===i.basename(e));if(0===t.length)throw new Error("The zip file has no manifest.json");if(t.length>1)throw new Error("The zip file has many manifest.json files");e.manifestPath=t[0];const r=e.entries.get(e.manifestPath);return function(e,t){return function(e,t){return new Promise((r,i)=>{e.openReadStream(t,(e,t)=>{if(e)i(e);else{const e=new f.WritableStreamBuffer;e.on("finish",()=>{r(e.getContents().toString("utf8"))}),t.pipe(e)}})})}(e,t).then(e=>JSON.parse(e))}(e.zipFile,r).then(t=>Object.assign(e,{manifestJson:t}))})}function d(e,t,r){const n=e=>i.join(i.dirname(r),e).replace(new RegExp(`\\${i.sep}`,"g"),"/"),a=s(t,{relativePath:t=>e.has(n(t)),maxFileSize(t,r){const i=e.get(n(r));return!!i&&i.uncompressedSize<=t}});if(!a.valid){const e=c(a.errors),t=new Error(e.join(", "));throw t.validationErrors=e,t}}e.exports={rezip:function(e){return h(e).then(({zipFile:e,entries:t,manifestJson:r,manifestPath:a})=>(d(t,r,a),function(e,t,r,a){const s=i.dirname(a);return new Promise((a,c)=>{const h=new n.ZipFile;h.on("error",c);const d=new f.WritableStreamBuffer;d.on("finish",()=>{a(d.getContents())}),h.outputStream.pipe(d);const l=o(e.openReadStream.bind(e));Promise.all(u(r).map(e=>{const r=t.get(i.join(s,e));return l(r).then(t=>{h.addReadStream(t,e,{size:r.uncompressedSize})})})).then(()=>{h.end()})})}(e,t,r,a)))},validateContentsZip:function(e){return h(e).then(({entries:e,manifestJson:t,manifestPath:r})=>d(e,t,r))}}},function(e,t,r){"use strict";var i=r(19);e.exports=function(e){i.copy(e,this)}},function(e,t,r){"use strict";e.exports=function(e,t){t||(t={}),"function"==typeof t&&(t={cmp:t});var r,i="boolean"==typeof t.cycles&&t.cycles,n=t.cmp&&(r=t.cmp,function(e){return function(t,i){var n={key:t,value:e[t]},a={key:i,value:e[i]};return r(n,a)}}),a=[];return function e(t){if(t&&t.toJSON&&"function"==typeof t.toJSON&&(t=t.toJSON()),void 0!==t){if("number"==typeof t)return isFinite(t)?""+t:"null";if("object"!=typeof t)return JSON.stringify(t);var r,o;if(Array.isArray(t)){for(o="[",r=0;r%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,u=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,h=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,d=/^(?:\/(?:[^~/]|~0|~1)*)*$/,l=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,p=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;function m(e){return e="full"==e?"full":"fast",i.copy(m[e])}function b(e){var t=e.match(n);if(!t)return!1;var r=+t[1],i=+t[2],o=+t[3];return i>=1&&i<=12&&o>=1&&o<=(2==i&&function(e){return e%4==0&&(e%100!=0||e%400==0)}(r)?29:a[i])}function v(e,t){var r=e.match(o);if(!r)return!1;var i=r[1],n=r[2],a=r[3],s=r[5];return(i<=23&&n<=59&&a<=59||23==i&&59==n&&60==a)&&(!t||s)}e.exports=m,m.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d:\d\d)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d:\d\d)$/i,uri:/^(?:[a-z][a-z0-9+-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":c,url:u,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:s,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:w,uuid:h,"json-pointer":d,"json-pointer-uri-fragment":l,"relative-json-pointer":p},m.full={date:b,time:v,"date-time":function(e){var t=e.split(g);return 2==t.length&&b(t[0])&&v(t[1],!0)},uri:function(e){return y.test(e)&&f.test(e)},"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":c,url:u,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:function(e){return e.length<=255&&s.test(e)},ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:w,uuid:h,"json-pointer":d,"json-pointer-uri-fragment":l,"relative-json-pointer":p};var g=/t|\s/i;var y=/\/|:/;var _=/[^\\]\\Z/;function w(e){if(_.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}}},function(e,t,r){"use strict";e.exports=function(e,t,r){var i,n=" ",a=e.level,o=e.dataLevel,s=e.schema[t],f=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,h="data"+(o||""),d=e.opts.$data&&s&&s.$data;d?(n+=" var schema"+a+" = "+e.util.getData(s.$data,o,e.dataPathArr)+"; ",i="schema"+a):i=s;var l="maximum"==t,p=l?"exclusiveMaximum":"exclusiveMinimum",m=e.schema[p],b=e.opts.$data&&m&&m.$data,v=l?"<":">",g=l?">":"<",y=void 0;if(b){var _=e.util.getData(m.$data,o,e.dataPathArr),w="exclusive"+a,E="exclType"+a,S="exclIsNumber"+a,P="' + "+(x="op"+a)+" + '";n+=" var schemaExcl"+a+" = "+_+"; ",n+=" var "+w+"; var "+E+" = typeof "+(_="schemaExcl"+a)+"; if ("+E+" != 'boolean' && "+E+" != 'undefined' && "+E+" != 'number') { ";var k;y=p;(k=k||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: '"+(y||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: {} ",!1!==e.opts.messages&&(n+=" , message: '"+p+" should be boolean' "),e.opts.verbose&&(n+=" , schema: validate.schema"+f+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),n+=" } "):n+=" {} ";var A=n;n=k.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+A+"]); ":n+=" validate.errors = ["+A+"]; return false; ":n+=" var err = "+A+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } else if ( ",d&&(n+=" ("+i+" !== undefined && typeof "+i+" != 'number') || "),n+=" "+E+" == 'number' ? ( ("+w+" = "+i+" === undefined || "+_+" "+v+"= "+i+") ? "+h+" "+g+"= "+_+" : "+h+" "+g+" "+i+" ) : ( ("+w+" = "+_+" === true) ? "+h+" "+g+"= "+i+" : "+h+" "+g+" "+i+" ) || "+h+" !== "+h+") { var op"+a+" = "+w+" ? '"+v+"' : '"+v+"='; ",void 0===s&&(y=p,c=e.errSchemaPath+"/"+p,i=_,d=b)}else{P=v;if((S="number"==typeof m)&&d){var x="'"+P+"'";n+=" if ( ",d&&(n+=" ("+i+" !== undefined && typeof "+i+" != 'number') || "),n+=" ( "+i+" === undefined || "+m+" "+v+"= "+i+" ? "+h+" "+g+"= "+m+" : "+h+" "+g+" "+i+" ) || "+h+" !== "+h+") { "}else{S&&void 0===s?(w=!0,y=p,c=e.errSchemaPath+"/"+p,i=m,g+="="):(S&&(i=Math[l?"min":"max"](m,s)),m===(!S||i)?(w=!0,y=p,c=e.errSchemaPath+"/"+p,g+="="):(w=!1,P+="="));x="'"+P+"'";n+=" if ( ",d&&(n+=" ("+i+" !== undefined && typeof "+i+" != 'number') || "),n+=" "+h+" "+g+" "+i+" || "+h+" !== "+h+") { "}}y=y||t,(k=k||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: '"+(y||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { comparison: "+x+", limit: "+i+", exclusive: "+w+" } ",!1!==e.opts.messages&&(n+=" , message: 'should be "+P+" ",n+=d?"' + "+i:i+"'"),e.opts.verbose&&(n+=" , schema: ",n+=d?"validate.schema"+f:""+s,n+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),n+=" } "):n+=" {} ";A=n;return n=k.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+A+"]); ":n+=" validate.errors = ["+A+"]; return false; ":n+=" var err = "+A+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } ",u&&(n+=" else { "),n}},function(e,t,r){"use strict";e.exports=function(e,t,r){var i,n=" ",a=e.level,o=e.dataLevel,s=e.schema[t],f=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,h="data"+(o||""),d=e.opts.$data&&s&&s.$data;d?(n+=" var schema"+a+" = "+e.util.getData(s.$data,o,e.dataPathArr)+"; ",i="schema"+a):i=s,n+="if ( ",d&&(n+=" ("+i+" !== undefined && typeof "+i+" != 'number') || "),n+=" "+h+".length "+("maxItems"==t?">":"<")+" "+i+") { ";var l=t,p=p||[];p.push(n),n="",!1!==e.createErrors?(n+=" { keyword: '"+(l||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+i+" } ",!1!==e.opts.messages&&(n+=" , message: 'should NOT have ",n+="maxItems"==t?"more":"fewer",n+=" than ",n+=d?"' + "+i+" + '":""+s,n+=" items' "),e.opts.verbose&&(n+=" , schema: ",n+=d?"validate.schema"+f:""+s,n+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),n+=" } "):n+=" {} ";var m=n;return n=p.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+m+"]); ":n+=" validate.errors = ["+m+"]; return false; ":n+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+="} ",u&&(n+=" else { "),n}},function(e,t,r){"use strict";e.exports=function(e,t,r){var i,n=" ",a=e.level,o=e.dataLevel,s=e.schema[t],f=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,h="data"+(o||""),d=e.opts.$data&&s&&s.$data;d?(n+=" var schema"+a+" = "+e.util.getData(s.$data,o,e.dataPathArr)+"; ",i="schema"+a):i=s;var l="maxLength"==t?">":"<";n+="if ( ",d&&(n+=" ("+i+" !== undefined && typeof "+i+" != 'number') || "),!1===e.opts.unicode?n+=" "+h+".length ":n+=" ucs2length("+h+") ",n+=" "+l+" "+i+") { ";var p=t,m=m||[];m.push(n),n="",!1!==e.createErrors?(n+=" { keyword: '"+(p||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+i+" } ",!1!==e.opts.messages&&(n+=" , message: 'should NOT be ",n+="maxLength"==t?"longer":"shorter",n+=" than ",n+=d?"' + "+i+" + '":""+s,n+=" characters' "),e.opts.verbose&&(n+=" , schema: ",n+=d?"validate.schema"+f:""+s,n+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),n+=" } "):n+=" {} ";var b=n;return n=m.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+b+"]); ":n+=" validate.errors = ["+b+"]; return false; ":n+=" var err = "+b+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+="} ",u&&(n+=" else { "),n}},function(e,t,r){"use strict";e.exports=function(e,t,r){var i,n=" ",a=e.level,o=e.dataLevel,s=e.schema[t],f=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,h="data"+(o||""),d=e.opts.$data&&s&&s.$data;d?(n+=" var schema"+a+" = "+e.util.getData(s.$data,o,e.dataPathArr)+"; ",i="schema"+a):i=s,n+="if ( ",d&&(n+=" ("+i+" !== undefined && typeof "+i+" != 'number') || "),n+=" Object.keys("+h+").length "+("maxProperties"==t?">":"<")+" "+i+") { ";var l=t,p=p||[];p.push(n),n="",!1!==e.createErrors?(n+=" { keyword: '"+(l||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+i+" } ",!1!==e.opts.messages&&(n+=" , message: 'should NOT have ",n+="maxProperties"==t?"more":"fewer",n+=" than ",n+=d?"' + "+i+" + '":""+s,n+=" properties' "),e.opts.verbose&&(n+=" , schema: ",n+=d?"validate.schema"+f:""+s,n+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),n+=" } "):n+=" {} ";var m=n;return n=p.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+m+"]); ":n+=" validate.errors = ["+m+"]; return false; ":n+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+="} ",u&&(n+=" else { "),n}},function(e){e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true}')},function(e,t,r){"use strict";const i=e=>new Promise(t=>setTimeout(t,e)),n=e=>({type:"UPLOAD_FAILURE",payload:e});e.exports={UPLOAD_FAILURE:"UPLOAD_FAILURE",UPLOAD_PPK:"UPLOAD_PPK",UPLOAD_PPK_START:"UPLOAD_PPK_START",UPLOAD_PLUGIN:"UPLOAD_PLUGIN",UPLOAD_PLUGIN_START:"UPLOADING_PLUGIN_START",CREATE_PLUGIN_ZIP:"CREATE_PLUGIN_ZIP",CREATE_PLUGIN_ZIP_START:"CREATE_PLUGIN_ZIP_START",CREATE_PLUGIN_ZIP_FAILURE:"CREATE_PLUGIN_ZIP_FAILURE",RESET:"RESET",uploadFailure:n,uploadPPK:(e,t)=>r=>{r({type:"UPLOAD_PPK_START"}),t().then(t=>{r({type:"UPLOAD_PPK",payload:{data:t,name:e}})},e=>{r(n(e))})},uploadPlugin:(e,t,r)=>i=>{i({type:"UPLOADING_PLUGIN_START"}),t().then(e=>r(e).then(()=>e)).then(t=>{i({type:"UPLOAD_PLUGIN",payload:{data:t,name:e}})},e=>{i(n(e))})},reset:()=>({type:"RESET"}),createPluginZip:e=>(t,r)=>{t({type:"CREATE_PLUGIN_ZIP_START"});const n=r();Promise.all([e(n.contents.data,n.ppk.data),i(300)]).then(([e])=>{t({type:"CREATE_PLUGIN_ZIP",payload:e})},e=>{t({type:"CREATE_PLUGIN_ZIP_FAILURE",payload:e})})}}},function(e,t,r){"use strict";function i(e){var t,r=e.Symbol;return"function"==typeof r?r.observable?t=r.observable:(t=r("observable"),r.observable=t):t="@@observable",t}r.d(t,"a",(function(){return i}))},function(e,t,r){"use strict";r(61);const{createStore:i,applyMiddleware:n}=r(120),a=r(122).default,{$:o,$$:s,fileMapToBuffer:f,listen:c,readText:u,readArrayBuffer:h,createFileHanlder:d}=(r(123).default,r(62)),l=r(151),{reducer:p}=r(72),{uploadPPK:m,uploadPlugin:b,createPluginZip:v,reset:g,uploadFailure:y}=r(117),{generatePluginZip:_,validatePlugin:w,revokePluginUrls:E}=r(73),S=o(".js-upload-ppk .js-file-upload"),P=o(".js-upload-zip .js-file-upload"),k=s(".js-file-upload"),A=s(".js-upload"),x=o(".js-upload-zip"),I=o(".js-upload-ppk"),O=o(".js-create-btn"),M=o(".js-create-loading-btn"),R=o(".js-clear-btn"),T=s(".js-file-upload"),D=o(".js-zip-ok-icon"),C=o(".js-ppk-ok-icon"),L=o(".js-upload-zip-link"),B=o(".js-upload-ppk-link"),N=o(".js-download"),F=o(".js-download-plugin"),j=o(".js-download-plugin-id"),z=o(".js-download-ppk"),U=new l({createLoadingBtn:M,createBtn:O,zipDropArea:x,ppkDropArea:I,ppkOkIcon:C,error:o(".js-error"),download:N,downloadPluginId:j,downloadPlugin:F,downloadPPK:z,errorMessages:o(".js-error-messages"),zipOkIcon:D,zipFileName:o(".js-zip-file-name"),ppkFileName:o(".js-ppk-file-name")});const q=i(p,n(...[a]));q.subscribe(()=>{U.render(q.getState())});const $=d(e=>{e.then(e=>{if(e instanceof File)q.dispatch(b(e.name,()=>h(e),w));else{if(!(e.entries instanceof Map))throw new Error("Something went wrong.");f(e.entries).then(t=>{q.dispatch(b(e.name,()=>Promise.resolve(t),w))})}}).catch(e=>{q.dispatch(y(e))})}),K=d(e=>{e.then(e=>{if(e instanceof File)q.dispatch(m(e.name,()=>u(e)));else{if(!(e.entries instanceof Map))throw new Error("Something went wrong.");q.dispatch(y(new Error("secret file should be a text file")))}}).catch(e=>{q.dispatch(y(e))})});c(P,"change",$),c(S,"change",K),c(x,"drop",$),c(I,"drop",K),c(k,"click",e=>{e.target.value=null}),c(O,"click",()=>{const e=q.getState();e.contents.data&&(E(e.plugin),q.dispatch(v(_)))}),c(R,"click",()=>{T.forEach(e=>{e.value=null}),q.dispatch(g())}),c(L,"click",e=>{e.preventDefault(),P.click()}),c(B,"click",e=>{e.preventDefault(),S.click()}),c(A,"dragover",e=>{e.preventDefault(),U.decorateDragOver(e.currentTarget)}),c(A,"dragleave",e=>{U.decorateDragLeave(e.currentTarget)}),q.dispatch({type:"__INIT__"})},function(e,t,r){"use strict";r.r(t),r.d(t,"__DO_NOT_USE__ActionTypes",(function(){return a})),r.d(t,"applyMiddleware",(function(){return b})),r.d(t,"bindActionCreators",(function(){return h})),r.d(t,"combineReducers",(function(){return c})),r.d(t,"compose",(function(){return m})),r.d(t,"createStore",(function(){return s}));var i=r(60),n=function(){return Math.random().toString(36).substring(7).split("").join(".")},a={INIT:"@@redux/INIT"+n(),REPLACE:"@@redux/REPLACE"+n(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+n()}};function o(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function s(e,t,r){var n;if("function"==typeof t&&"function"==typeof r||"function"==typeof r&&"function"==typeof arguments[3])throw new Error("It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function.");if("function"==typeof t&&void 0===r&&(r=t,t=void 0),void 0!==r){if("function"!=typeof r)throw new Error("Expected the enhancer to be a function.");return r(s)(e,t)}if("function"!=typeof e)throw new Error("Expected the reducer to be a function.");var f=e,c=t,u=[],h=u,d=!1;function l(){h===u&&(h=u.slice())}function p(){if(d)throw new Error("You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return c}function m(e){if("function"!=typeof e)throw new Error("Expected the listener to be a function.");if(d)throw new Error("You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api-reference/store#subscribe(listener) for more details.");var t=!0;return l(),h.push(e),function(){if(t){if(d)throw new Error("You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api-reference/store#subscribe(listener) for more details.");t=!1,l();var r=h.indexOf(e);h.splice(r,1)}}}function b(e){if(!o(e))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if(void 0===e.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(d)throw new Error("Reducers may not dispatch actions.");try{d=!0,c=f(c,e)}finally{d=!1}for(var t=u=h,r=0;r=t.length?r(new s(p,_,new o(void 0,e[_]))):u(e[_],t[_],r,i,p,_,l);for(;_=0?(u(e[n],t[n],r,i,p,n,l),E=f(E,o)):u(e[n],void 0,r,i,p,n,l)})),E.forEach((function(e){u(void 0,t[e],r,i,p,e,l)}))}l.length=l.length-1}else e!==t&&("number"===b&&isNaN(e)&&isNaN(t)||r(new n(p,e,t)))}function h(e,t,r,i){return i=i||[],u(e,t,(function(e){e&&i.push(e)}),r),i.length?i:void 0}function d(e,t,r){if(e&&t&&r&&r.kind){for(var i=e,n=-1,a=r.path?r.path.length-1:0;++n0&&void 0!==arguments[0]?arguments[0]:{},t=Object.assign({},x,e),r=t.logger,i=t.stateTransformer,n=t.errorTransformer,a=t.predicate,o=t.logErrors,s=t.diffPredicate;if(void 0===r)return function(){return function(e){return function(t){return e(t)}}};if(e.getState&&e.dispatch)return console.error("[redux-logger] redux-logger not installed. Make sure to pass logger instance as middleware:\n// Logger with default options\nimport { logger } from 'redux-logger'\nconst store = createStore(\n reducer,\n applyMiddleware(logger)\n)\n// Or you can create your own logger with custom options http://bit.ly/redux-logger-options\nimport createLogger from 'redux-logger'\nconst logger = createLogger({\n // ...options\n});\nconst store = createStore(\n reducer,\n applyMiddleware(logger)\n)\n"),function(){return function(e){return function(t){return e(t)}}};var f=[];return function(e){var r=e.getState;return function(e){return function(c){if("function"==typeof a&&!a(r,c))return e(c);var u={};f.push(u),u.started=E.now(),u.startedTime=new Date,u.prevState=i(r()),u.action=c;var h=void 0;if(o)try{h=e(c)}catch(e){u.error=n(e)}else h=e(c);u.took=E.now()-u.started,u.nextState=i(r());var d=t.diff&&"function"==typeof s?s(r,c):t.diff;if(b(f,Object.assign({},t,{diff:d})),f.length=0,u.error)throw u.error;return h}}}}var g,y,_=function(e,t){return function(e,t){return new Array(t+1).join(e)}("0",t-e.toString().length)+e},w=function(e){return _(e.getHours(),2)+":"+_(e.getMinutes(),2)+":"+_(e.getSeconds(),2)+"."+_(e.getMilliseconds(),3)},E="undefined"!=typeof performance&&null!==performance&&"function"==typeof performance.now?performance:Date,S="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},P=function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:{},t=e.dispatch,r=e.getState;return"function"==typeof t||"function"==typeof r?v()({dispatch:t,getState:r}):void console.error("\n[redux-logger v3] BREAKING CHANGE\n[redux-logger v3] Since 3.0.0 redux-logger exports by default logger with default settings.\n[redux-logger v3] Change\n[redux-logger v3] import createLogger from 'redux-logger'\n[redux-logger v3] to\n[redux-logger v3] import { createLogger } from 'redux-logger'\n")};t.defaults=x,t.createLogger=v,t.logger=I,t.default=I,Object.defineProperty(t,"__esModule",{value:!0})}(t)}).call(this,r(5))},function(e,t,r){"use strict";t.byteLength=function(e){var t=c(e),r=t[0],i=t[1];return 3*(r+i)/4-i},t.toByteArray=function(e){var t,r,i=c(e),o=i[0],s=i[1],f=new a(function(e,t,r){return 3*(t+r)/4-r}(0,o,s)),u=0,h=s>0?o-4:o;for(r=0;r>16&255,f[u++]=t>>8&255,f[u++]=255&t;2===s&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,f[u++]=255&t);1===s&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,f[u++]=t>>8&255,f[u++]=255&t);return f},t.fromByteArray=function(e){for(var t,r=e.length,n=r%3,a=[],o=0,s=r-n;os?s:o+16383));1===n?(t=e[r-1],a.push(i[t>>2]+i[t<<4&63]+"==")):2===n&&(t=(e[r-2]<<8)+e[r-1],a.push(i[t>>10]+i[t>>4&63]+i[t<<2&63]+"="));return a.join("")};for(var i=[],n=[],a="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,f=o.length;s0)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 n,a,o=[],s=t;s>18&63]+i[a>>12&63]+i[a>>6&63]+i[63&a]);return o.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,r,i,n){var a,o,s=8*n-i-1,f=(1<>1,u=-7,h=r?n-1:0,d=r?-1:1,l=e[t+h];for(h+=d,a=l&(1<<-u)-1,l>>=-u,u+=s;u>0;a=256*a+e[t+h],h+=d,u-=8);for(o=a&(1<<-u)-1,a>>=-u,u+=i;u>0;o=256*o+e[t+h],h+=d,u-=8);if(0===a)a=1-c;else{if(a===f)return o?NaN:1/0*(l?-1:1);o+=Math.pow(2,i),a-=c}return(l?-1:1)*o*Math.pow(2,a-i)},t.write=function(e,t,r,i,n,a){var o,s,f,c=8*a-n-1,u=(1<>1,d=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,l=i?0:a-1,p=i?1:-1,m=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=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(f=Math.pow(2,-o))<1&&(o--,f*=2),(t+=o+h>=1?d/f:d*Math.pow(2,1-h))*f>=2&&(o++,f/=2),o+h>=u?(s=0,o=u):o+h>=1?(s=(t*f-1)*Math.pow(2,n),o+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,n),o=0));n>=8;e[r+l]=255&s,l+=p,s/=256,n-=8);for(o=o<0;e[r+l]=255&o,l+=p,o/=256,c-=8);e[r+l-p]|=128*m}},function(e,t,r){"use strict";function i(e){return function e(t,r){for(var i=0;i-1&&Array.isArray(a)?e(a,r,i):r.push(a)}return r}(e,[],t)}e.exports=function(e){if(!Array.isArray(e))throw new TypeError("Expected value to be an array");return i(e)},e.exports.from=i,e.exports.depth=function(e,t){if(!Array.isArray(e))throw new TypeError("Expected value to be an array");return n(e,t)},e.exports.fromDepth=n},function(e,t){},function(e,t,r){"use strict";var i=r(2).Buffer,n=r(129);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 i.alloc(0);if(1===this.length)return this.head.data;for(var t,r,n,a=i.allocUnsafe(e>>>0),o=this.head,s=0;o;)t=o.data,r=a,n=s,t.copy(r,n),s+=o.data.length,o=o.next;return a},e}(),n&&n.inspect&&n.inspect.custom&&(e.exports.prototype[n.inspect.custom]=function(){var e=n.inspect({length:this.length});return this.constructor.name+" "+e})},function(e,t){},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 i=!1;return function(){if(!i){if(r("throwDeprecation"))throw new Error(t);r("traceDeprecation")?console.trace(t):console.warn(t),i=!0}return e.apply(this,arguments)}}}).call(this,r(5))},function(e,t,r){var i=r(1),n=i.Buffer;function a(e,t){for(var r in e)t[r]=e[r]}function o(e,t,r){return n(e,t,r)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?e.exports=i:(a(i,t),t.Buffer=o),o.prototype=Object.create(n.prototype),a(n,o),o.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return n(e,t,r)},o.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var i=n(e);return void 0!==t?"string"==typeof r?i.fill(t,r):i.fill(t):i.fill(0),i},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i.SlowBuffer(e)}},function(e,t,r){"use strict";e.exports=a;var i=r(67),n=r(20);function a(e){if(!(this instanceof a))return new a(e);i.call(this,e)}n.inherits=r(0),n.inherits(a,i),a.prototype._transform=function(e,t,r){r(null,e)}},function(e,t,r){e.exports=r(39)},function(e,t,r){e.exports=r(13)},function(e,t,r){e.exports=r(38).Transform},function(e,t,r){e.exports=r(38).PassThrough},function(e,t,r){"use strict";(function(e,i){var n=r(29),a=r(141),o=r(142),s=r(145),f=r(148);for(var c in f)t[c]=f[c];t.NONE=0,t.DEFLATE=1,t.INFLATE=2,t.GZIP=3,t.GUNZIP=4,t.DEFLATERAW=5,t.INFLATERAW=6,t.UNZIP=7;function u(e){if("number"!=typeof e||et.UNZIP)throw new TypeError("Bad argument");this.dictionary=null,this.err=0,this.flush=0,this.init_done=!1,this.level=0,this.memLevel=0,this.mode=e,this.strategy=0,this.windowBits=0,this.write_in_progress=!1,this.pending_close=!1,this.gzip_id_bytes_read=0}u.prototype.close=function(){this.write_in_progress?this.pending_close=!0:(this.pending_close=!1,n(this.init_done,"close before init"),n(this.mode<=t.UNZIP),this.mode===t.DEFLATE||this.mode===t.GZIP||this.mode===t.DEFLATERAW?o.deflateEnd(this.strm):this.mode!==t.INFLATE&&this.mode!==t.GUNZIP&&this.mode!==t.INFLATERAW&&this.mode!==t.UNZIP||s.inflateEnd(this.strm),this.mode=t.NONE,this.dictionary=null)},u.prototype.write=function(e,t,r,i,n,a,o){return this._write(!0,e,t,r,i,n,a,o)},u.prototype.writeSync=function(e,t,r,i,n,a,o){return this._write(!1,e,t,r,i,n,a,o)},u.prototype._write=function(r,a,o,s,f,c,u,h){if(n.equal(arguments.length,8),n(this.init_done,"write before init"),n(this.mode!==t.NONE,"already finalized"),n.equal(!1,this.write_in_progress,"write already in progress"),n.equal(!1,this.pending_close,"close is pending"),this.write_in_progress=!0,n.equal(!1,void 0===a,"must provide flush value"),this.write_in_progress=!0,a!==t.Z_NO_FLUSH&&a!==t.Z_PARTIAL_FLUSH&&a!==t.Z_SYNC_FLUSH&&a!==t.Z_FULL_FLUSH&&a!==t.Z_FINISH&&a!==t.Z_BLOCK)throw new Error("Invalid flush value");if(null==o&&(o=e.alloc(0),f=0,s=0),this.strm.avail_in=f,this.strm.input=o,this.strm.next_in=s,this.strm.avail_out=h,this.strm.output=c,this.strm.next_out=u,this.flush=a,!r)return this._process(),this._checkError()?this._afterSync():void 0;var d=this;return i.nextTick((function(){d._process(),d._after()})),this},u.prototype._afterSync=function(){var e=this.strm.avail_out,t=this.strm.avail_in;return this.write_in_progress=!1,[t,e]},u.prototype._process=function(){var e=null;switch(this.mode){case t.DEFLATE:case t.GZIP:case t.DEFLATERAW:this.err=o.deflate(this.strm,this.flush);break;case t.UNZIP:switch(this.strm.avail_in>0&&(e=this.strm.next_in),this.gzip_id_bytes_read){case 0:if(null===e)break;if(31!==this.strm.input[e]){this.mode=t.INFLATE;break}if(this.gzip_id_bytes_read=1,e++,1===this.strm.avail_in)break;case 1:if(null===e)break;139===this.strm.input[e]?(this.gzip_id_bytes_read=2,this.mode=t.GUNZIP):this.mode=t.INFLATE;break;default:throw new Error("invalid number of gzip magic number bytes read")}case t.INFLATE:case t.GUNZIP:case t.INFLATERAW:for(this.err=s.inflate(this.strm,this.flush),this.err===t.Z_NEED_DICT&&this.dictionary&&(this.err=s.inflateSetDictionary(this.strm,this.dictionary),this.err===t.Z_OK?this.err=s.inflate(this.strm,this.flush):this.err===t.Z_DATA_ERROR&&(this.err=t.Z_NEED_DICT));this.strm.avail_in>0&&this.mode===t.GUNZIP&&this.err===t.Z_STREAM_END&&0!==this.strm.next_in[0];)this.reset(),this.err=s.inflate(this.strm,this.flush);break;default:throw new Error("Unknown mode "+this.mode)}},u.prototype._checkError=function(){switch(this.err){case t.Z_OK:case t.Z_BUF_ERROR:if(0!==this.strm.avail_out&&this.flush===t.Z_FINISH)return this._error("unexpected end of file"),!1;break;case t.Z_STREAM_END:break;case t.Z_NEED_DICT:return null==this.dictionary?this._error("Missing dictionary"):this._error("Bad dictionary"),!1;default:return this._error("Zlib error"),!1}return!0},u.prototype._after=function(){if(this._checkError()){var e=this.strm.avail_out,t=this.strm.avail_in;this.write_in_progress=!1,this.callback(t,e),this.pending_close&&this.close()}},u.prototype._error=function(e){this.strm.msg&&(e=this.strm.msg),this.onerror(e,this.err),this.write_in_progress=!1,this.pending_close&&this.close()},u.prototype.init=function(e,r,i,a,o){n(4===arguments.length||5===arguments.length,"init(windowBits, level, memLevel, strategy, [dictionary])"),n(e>=8&&e<=15,"invalid windowBits"),n(r>=-1&&r<=9,"invalid compression level"),n(i>=1&&i<=9,"invalid memlevel"),n(a===t.Z_FILTERED||a===t.Z_HUFFMAN_ONLY||a===t.Z_RLE||a===t.Z_FIXED||a===t.Z_DEFAULT_STRATEGY,"invalid strategy"),this._init(r,e,i,a,o),this._setDictionary()},u.prototype.params=function(){throw new Error("deflateParams Not supported")},u.prototype.reset=function(){this._reset(),this._setDictionary()},u.prototype._init=function(e,r,i,n,f){switch(this.level=e,this.windowBits=r,this.memLevel=i,this.strategy=n,this.flush=t.Z_NO_FLUSH,this.err=t.Z_OK,this.mode!==t.GZIP&&this.mode!==t.GUNZIP||(this.windowBits+=16),this.mode===t.UNZIP&&(this.windowBits+=32),this.mode!==t.DEFLATERAW&&this.mode!==t.INFLATERAW||(this.windowBits=-1*this.windowBits),this.strm=new a,this.mode){case t.DEFLATE:case t.GZIP:case t.DEFLATERAW:this.err=o.deflateInit2(this.strm,this.level,t.Z_DEFLATED,this.windowBits,this.memLevel,this.strategy);break;case t.INFLATE:case t.GUNZIP:case t.INFLATERAW:case t.UNZIP:this.err=s.inflateInit2(this.strm,this.windowBits);break;default:throw new Error("Unknown mode "+this.mode)}this.err!==t.Z_OK&&this._error("Init error"),this.dictionary=f,this.write_in_progress=!1,this.init_done=!0},u.prototype._setDictionary=function(){if(null!=this.dictionary){switch(this.err=t.Z_OK,this.mode){case t.DEFLATE:case t.DEFLATERAW:this.err=o.deflateSetDictionary(this.strm,this.dictionary)}this.err!==t.Z_OK&&this._error("Failed to set dictionary")}},u.prototype._reset=function(){switch(this.err=t.Z_OK,this.mode){case t.DEFLATE:case t.DEFLATERAW:case t.GZIP:this.err=o.deflateReset(this.strm);break;case t.INFLATE:case t.INFLATERAW:case t.GUNZIP:this.err=s.inflateReset(this.strm)}this.err!==t.Z_OK&&this._error("Failed to reset stream")},t.Zlib=u}).call(this,r(1).Buffer,r(4))},function(e,t,r){"use strict"; /* object-assign (c) Sindre Sorhus @license MIT -*/var i=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;function o(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var i={};return"abcdefghijklmnopqrst".split("").forEach((function(e){i[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},i)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var r,s,f=o(e),c=1;c4?9:0)}function J(e){for(var t=e.length;--t>=0;)e[t]=0}function ee(e){var t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),0!==r&&(n.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))}function te(e,t){a._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,ee(e.strm)}function re(e,t){e.pending_buf[e.pending++]=t}function ie(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function ne(e,t){var r,i,n=e.max_chain_length,a=e.strstart,o=e.prev_length,s=e.nice_match,f=e.strstart>e.w_size-N?e.strstart-(e.w_size-N):0,c=e.window,u=e.w_mask,h=e.prev,d=e.strstart+B,l=c[a+o-1],p=c[a+o];e.prev_length>=e.good_match&&(n>>=2),s>e.lookahead&&(s=e.lookahead);do{if(c[(r=t)+o]===p&&c[r+o-1]===l&&c[r]===c[a]&&c[++r]===c[a+1]){a+=2,r++;do{}while(c[++a]===c[++r]&&c[++a]===c[++r]&&c[++a]===c[++r]&&c[++a]===c[++r]&&c[++a]===c[++r]&&c[++a]===c[++r]&&c[++a]===c[++r]&&c[++a]===c[++r]&&ao){if(e.match_start=t,o=i,i>=s)break;l=c[a+o-1],p=c[a+o]}}}while((t=h[t&u])>f&&0!=--n);return o<=e.lookahead?o:e.lookahead}function ae(e){var t,r,i,a,f,c,u,h,d,l,p=e.w_size;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=p+(p-N)){n.arraySet(e.window,e.window,p,p,0),e.match_start-=p,e.strstart-=p,e.block_start-=p,t=r=e.hash_size;do{i=e.head[--t],e.head[t]=i>=p?i-p:0}while(--r);t=r=p;do{i=e.prev[--t],e.prev[t]=i>=p?i-p:0}while(--r);a+=p}if(0===e.strm.avail_in)break;if(c=e.strm,u=e.window,h=e.strstart+e.lookahead,d=a,l=void 0,(l=c.avail_in)>d&&(l=d),r=0===l?0:(c.avail_in-=l,n.arraySet(u,c.input,c.next_in,l,h),1===c.state.wrap?c.adler=o(c.adler,u,l,h):2===c.state.wrap&&(c.adler=s(c.adler,u,l,h)),c.next_in+=l,c.total_in+=l,l),e.lookahead+=r,e.lookahead+e.insert>=L)for(f=e.strstart-e.insert,e.ins_h=e.window[f],e.ins_h=(e.ins_h<=L&&(e.ins_h=(e.ins_h<=L)if(i=a._tr_tally(e,e.strstart-e.match_start,e.match_length-L),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=L){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<=L&&(e.ins_h=(e.ins_h<4096)&&(e.match_length=L-1)),e.prev_length>=L&&e.match_length<=e.prev_length){n=e.strstart+e.lookahead-L,i=a._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-L),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=n&&(e.ins_h=(e.ins_h<15&&(s=2,i-=16),a<1||a>x||r!==A||i<8||i>15||t<0||t>9||o<0||o>S)return X(e,b);8===i&&(i=9);var f=new ce;return e.state=f,f.strm=e,f.wrap=s,f.gzhead=null,f.w_bits=i,f.w_size=1<e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(ae(e),0===e.lookahead&&t===c)return Z;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var i=e.block_start+r;if((0===e.strstart||e.strstart>=i)&&(e.lookahead=e.strstart-i,e.strstart=i,te(e,!1),0===e.strm.avail_out))return Z;if(e.strstart-e.block_start>=e.w_size-N&&(te(e,!1),0===e.strm.avail_out))return Z}return e.insert=0,t===d?(te(e,!0),0===e.strm.avail_out?V:Y):(e.strstart>e.block_start&&(te(e,!1),e.strm.avail_out),Z)})),new fe(4,4,8,4,oe),new fe(4,5,16,8,oe),new fe(4,6,32,32,oe),new fe(4,4,16,16,se),new fe(8,16,32,32,se),new fe(8,16,128,128,se),new fe(8,32,128,256,se),new fe(32,128,258,1024,se),new fe(32,258,258,4096,se)],t.deflateInit=function(e,t){return de(e,t,A,I,O,P)},t.deflateInit2=de,t.deflateReset=he,t.deflateResetKeep=ue,t.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?b:(e.state.gzhead=t,p):b},t.deflate=function(e,t){var r,n,o,f;if(!e||!e.state||t>l||t<0)return e?X(e,b):b;if(n=e.state,!e.output||!e.input&&0!==e.avail_in||n.status===H&&t!==d)return X(e,0===e.avail_out?g:b);if(n.strm=e,r=n.last_flush,n.last_flush=t,n.status===j)if(2===n.wrap)e.adler=0,re(n,31),re(n,139),re(n,8),n.gzhead?(re(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),re(n,255&n.gzhead.time),re(n,n.gzhead.time>>8&255),re(n,n.gzhead.time>>16&255),re(n,n.gzhead.time>>24&255),re(n,9===n.level?2:n.strategy>=w||n.level<2?4:0),re(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(re(n,255&n.gzhead.extra.length),re(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=s(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=z):(re(n,0),re(n,0),re(n,0),re(n,0),re(n,0),re(n,9===n.level?2:n.strategy>=w||n.level<2?4:0),re(n,W),n.status=K);else{var v=A+(n.w_bits-8<<4)<<8;v|=(n.strategy>=w||n.level<2?0:n.level<6?1:6===n.level?2:3)<<6,0!==n.strstart&&(v|=F),v+=31-v%31,n.status=K,ie(n,v),0!==n.strstart&&(ie(n,e.adler>>>16),ie(n,65535&e.adler)),e.adler=1}if(n.status===z)if(n.gzhead.extra){for(o=n.pending;n.gzindex<(65535&n.gzhead.extra.length)&&(n.pending!==n.pending_buf_size||(n.gzhead.hcrc&&n.pending>o&&(e.adler=s(e.adler,n.pending_buf,n.pending-o,o)),ee(e),o=n.pending,n.pending!==n.pending_buf_size));)re(n,255&n.gzhead.extra[n.gzindex]),n.gzindex++;n.gzhead.hcrc&&n.pending>o&&(e.adler=s(e.adler,n.pending_buf,n.pending-o,o)),n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=U)}else n.status=U;if(n.status===U)if(n.gzhead.name){o=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>o&&(e.adler=s(e.adler,n.pending_buf,n.pending-o,o)),ee(e),o=n.pending,n.pending===n.pending_buf_size)){f=1;break}f=n.gzindexo&&(e.adler=s(e.adler,n.pending_buf,n.pending-o,o)),0===f&&(n.gzindex=0,n.status=q)}else n.status=q;if(n.status===q)if(n.gzhead.comment){o=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>o&&(e.adler=s(e.adler,n.pending_buf,n.pending-o,o)),ee(e),o=n.pending,n.pending===n.pending_buf_size)){f=1;break}f=n.gzindexo&&(e.adler=s(e.adler,n.pending_buf,n.pending-o,o)),0===f&&(n.status=$)}else n.status=$;if(n.status===$&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&ee(e),n.pending+2<=n.pending_buf_size&&(re(n,255&e.adler),re(n,e.adler>>8&255),e.adler=0,n.status=K)):n.status=K),0!==n.pending){if(ee(e),0===e.avail_out)return n.last_flush=-1,p}else if(0===e.avail_in&&Q(t)<=Q(r)&&t!==d)return X(e,g);if(n.status===H&&0!==e.avail_in)return X(e,g);if(0!==e.avail_in||0!==n.lookahead||t!==c&&n.status!==H){var y=n.strategy===w?function(e,t){for(var r;;){if(0===e.lookahead&&(ae(e),0===e.lookahead)){if(t===c)return Z;break}if(e.match_length=0,r=a._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(te(e,!1),0===e.strm.avail_out))return Z}return e.insert=0,t===d?(te(e,!0),0===e.strm.avail_out?V:Y):e.last_lit&&(te(e,!1),0===e.strm.avail_out)?Z:G}(n,t):n.strategy===E?function(e,t){for(var r,i,n,o,s=e.window;;){if(e.lookahead<=B){if(ae(e),e.lookahead<=B&&t===c)return Z;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=L&&e.strstart>0&&(i=s[n=e.strstart-1])===s[++n]&&i===s[++n]&&i===s[++n]){o=e.strstart+B;do{}while(i===s[++n]&&i===s[++n]&&i===s[++n]&&i===s[++n]&&i===s[++n]&&i===s[++n]&&i===s[++n]&&i===s[++n]&&ne.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=L?(r=a._tr_tally(e,1,e.match_length-L),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=a._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(te(e,!1),0===e.strm.avail_out))return Z}return e.insert=0,t===d?(te(e,!0),0===e.strm.avail_out?V:Y):e.last_lit&&(te(e,!1),0===e.strm.avail_out)?Z:G}(n,t):i[n.level].func(n,t);if(y!==V&&y!==Y||(n.status=H),y===Z||y===V)return 0===e.avail_out&&(n.last_flush=-1),p;if(y===G&&(t===u?a._tr_align(n):t!==l&&(a._tr_stored_block(n,0,0,!1),t===h&&(J(n.head),0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),ee(e),0===e.avail_out))return n.last_flush=-1,p}return t!==d?p:n.wrap<=0?m:(2===n.wrap?(re(n,255&e.adler),re(n,e.adler>>8&255),re(n,e.adler>>16&255),re(n,e.adler>>24&255),re(n,255&e.total_in),re(n,e.total_in>>8&255),re(n,e.total_in>>16&255),re(n,e.total_in>>24&255)):(ie(n,e.adler>>>16),ie(n,65535&e.adler)),ee(e),n.wrap>0&&(n.wrap=-n.wrap),0!==n.pending?p:m)},t.deflateEnd=function(e){var t;return e&&e.state?(t=e.state.status)!==j&&t!==z&&t!==U&&t!==q&&t!==$&&t!==K&&t!==H?X(e,b):(e.state=null,t===K?X(e,v):p):b},t.deflateSetDictionary=function(e,t){var r,i,a,s,f,c,u,h,d=t.length;if(!e||!e.state)return b;if(2===(s=(r=e.state).wrap)||1===s&&r.status!==j||r.lookahead)return b;for(1===s&&(e.adler=o(e.adler,t,d,0)),r.wrap=0,d>=r.w_size&&(0===s&&(J(r.head),r.strstart=0,r.block_start=0,r.insert=0),h=new n.Buf8(r.w_size),n.arraySet(h,t,d-r.w_size,r.w_size,0),t=h,d=r.w_size),f=e.avail_in,c=e.next_in,u=e.input,e.avail_in=d,e.next_in=0,e.input=t,ae(r);r.lookahead>=L;){i=r.strstart,a=r.lookahead-(L-1);do{r.ins_h=(r.ins_h<=0;)e[t]=0}var c=0,u=1,h=2,d=29,l=256,p=l+1+d,m=30,b=19,v=2*p+1,g=15,y=16,_=7,w=256,E=16,S=17,P=18,k=[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],A=[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],x=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],I=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],O=new Array(2*(p+2));f(O);var M=new Array(2*m);f(M);var R=new Array(512);f(R);var T=new Array(256);f(T);var D=new Array(d);f(D);var C,L,B,N=new Array(m);function F(e,t,r,i,n){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=i,this.max_length=n,this.has_stree=e&&e.length}function j(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function z(e){return e<256?R[e]:R[256+(e>>>7)]}function U(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function q(e,t,r){e.bi_valid>y-r?(e.bi_buf|=t<>y-e.bi_valid,e.bi_valid+=r-y):(e.bi_buf|=t<>>=1,r<<=1}while(--t>0);return r>>>1}function H(e,t,r){var i,n,a=new Array(g+1),o=0;for(i=1;i<=g;i++)a[i]=o=o+r[i-1]<<1;for(n=0;n<=t;n++){var s=e[2*n+1];0!==s&&(e[2*n]=K(a[s]++,s))}}function Z(e){var t;for(t=0;t8?U(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function V(e,t,r,i){var n=2*t,a=2*r;return e[n]>1;r>=1;r--)Y(e,a,r);n=f;do{r=e.heap[1],e.heap[1]=e.heap[e.heap_len--],Y(e,a,1),i=e.heap[1],e.heap[--e.heap_max]=r,e.heap[--e.heap_max]=i,a[2*n]=a[2*r]+a[2*i],e.depth[n]=(e.depth[r]>=e.depth[i]?e.depth[r]:e.depth[i])+1,a[2*r+1]=a[2*i+1]=n,e.heap[1]=n++,Y(e,a,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var r,i,n,a,o,s,f=t.dyn_tree,c=t.max_code,u=t.stat_desc.static_tree,h=t.stat_desc.has_stree,d=t.stat_desc.extra_bits,l=t.stat_desc.extra_base,p=t.stat_desc.max_length,m=0;for(a=0;a<=g;a++)e.bl_count[a]=0;for(f[2*e.heap[e.heap_max]+1]=0,r=e.heap_max+1;rp&&(a=p,m++),f[2*i+1]=a,i>c||(e.bl_count[a]++,o=0,i>=l&&(o=d[i-l]),s=f[2*i],e.opt_len+=s*(a+o),h&&(e.static_len+=s*(u[2*i+1]+o)));if(0!==m){do{for(a=p-1;0===e.bl_count[a];)a--;e.bl_count[a]--,e.bl_count[a+1]+=2,e.bl_count[p]--,m-=2}while(m>0);for(a=p;0!==a;a--)for(i=e.bl_count[a];0!==i;)(n=e.heap[--r])>c||(f[2*n+1]!==a&&(e.opt_len+=(a-f[2*n+1])*f[2*n],f[2*n+1]=a),i--)}}(e,t),H(a,c,e.bl_count)}function Q(e,t,r){var i,n,a=-1,o=t[1],s=0,f=7,c=4;for(0===o&&(f=138,c=3),t[2*(r+1)+1]=65535,i=0;i<=r;i++)n=o,o=t[2*(i+1)+1],++s>=7;i0?(e.strm.data_type===s&&(e.strm.data_type=function(e){var t,r=4093624447;for(t=0;t<=31;t++,r>>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return a;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return o;for(t=32;t=3&&0===e.bl_tree[2*I[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),f=e.opt_len+3+7>>>3,(c=e.static_len+3+7>>>3)<=f&&(f=c)):f=c=r+5,r+4<=f&&-1!==t?te(e,t,r,i):e.strategy===n||c===f?(q(e,(u<<1)+(i?1:0),3),W(e,O,M)):(q(e,(h<<1)+(i?1:0),3),function(e,t,r,i){var n;for(q(e,t-257,5),q(e,r-1,5),q(e,i-4,4),n=0;n>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&r,e.last_lit++,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(T[r]+l+1)]++,e.dyn_dtree[2*z(t)]++),e.last_lit===e.lit_bufsize-1},t._tr_align=function(e){q(e,u<<1,3),$(e,w,O),function(e){16===e.bi_valid?(U(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},function(e,t,r){"use strict";e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},function(e,t,r){"use strict";var i=r(30),n=r(69),a=r(70),o=r(146),s=r(147),f=0,c=1,u=2,h=4,d=5,l=6,p=0,m=1,b=2,v=-2,g=-3,y=-4,_=-5,w=8,E=1,S=2,P=3,k=4,A=5,x=6,I=7,O=8,M=9,R=10,T=11,D=12,C=13,L=14,B=15,N=16,F=17,j=18,z=19,U=20,q=21,$=22,K=23,H=24,Z=25,G=26,V=27,Y=28,W=29,X=30,Q=31,J=32,ee=852,te=592,re=15;function ie(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function ne(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new i.Buf16(320),this.work=new i.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function ae(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=E,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new i.Buf32(ee),t.distcode=t.distdyn=new i.Buf32(te),t.sane=1,t.back=-1,p):v}function oe(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,ae(e)):v}function se(e,t){var r,i;return e&&e.state?(i=e.state,t<0?(r=0,t=-t):(r=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?v:(null!==i.window&&i.wbits!==t&&(i.window=null),i.wrap=r,i.wbits=t,oe(e))):v}function fe(e,t){var r,i;return e?(i=new ne,e.state=i,i.window=null,(r=se(e,t))!==p&&(e.state=null),r):v}var ce,ue,he=!0;function de(e){if(he){var t;for(ce=new i.Buf32(512),ue=new i.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(s(c,e.lens,0,288,ce,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;s(u,e.lens,0,32,ue,0,e.work,{bits:5}),he=!1}e.lencode=ce,e.lenbits=9,e.distcode=ue,e.distbits=5}function le(e,t,r,n){var a,o=e.state;return null===o.window&&(o.wsize=1<=o.wsize?(i.arraySet(o.window,t,r-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):((a=o.wsize-o.wnext)>n&&(a=n),i.arraySet(o.window,t,r-n,a,o.wnext),(n-=a)?(i.arraySet(o.window,t,r-n,n,0),o.wnext=n,o.whave=o.wsize):(o.wnext+=a,o.wnext===o.wsize&&(o.wnext=0),o.whave>>8&255,r.check=a(r.check,xe,2,0),se=0,fe=0,r.mode=S;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&se)<<8)+(se>>8))%31){e.msg="incorrect header check",r.mode=X;break}if((15&se)!==w){e.msg="unknown compression method",r.mode=X;break}if(fe-=4,Ee=8+(15&(se>>>=4)),0===r.wbits)r.wbits=Ee;else if(Ee>r.wbits){e.msg="invalid window size",r.mode=X;break}r.dmax=1<>8&1),512&r.flags&&(xe[0]=255&se,xe[1]=se>>>8&255,r.check=a(r.check,xe,2,0)),se=0,fe=0,r.mode=P;case P:for(;fe<32;){if(0===ae)break e;ae--,se+=ee[re++]<>>8&255,xe[2]=se>>>16&255,xe[3]=se>>>24&255,r.check=a(r.check,xe,4,0)),se=0,fe=0,r.mode=k;case k:for(;fe<16;){if(0===ae)break e;ae--,se+=ee[re++]<>8),512&r.flags&&(xe[0]=255&se,xe[1]=se>>>8&255,r.check=a(r.check,xe,2,0)),se=0,fe=0,r.mode=A;case A:if(1024&r.flags){for(;fe<16;){if(0===ae)break e;ae--,se+=ee[re++]<>>8&255,r.check=a(r.check,xe,2,0)),se=0,fe=0}else r.head&&(r.head.extra=null);r.mode=x;case x:if(1024&r.flags&&((he=r.length)>ae&&(he=ae),he&&(r.head&&(Ee=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),i.arraySet(r.head.extra,ee,re,he,Ee)),512&r.flags&&(r.check=a(r.check,ee,he,re)),ae-=he,re+=he,r.length-=he),r.length))break e;r.length=0,r.mode=I;case I:if(2048&r.flags){if(0===ae)break e;he=0;do{Ee=ee[re+he++],r.head&&Ee&&r.length<65536&&(r.head.name+=String.fromCharCode(Ee))}while(Ee&&he>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=D;break;case R:for(;fe<32;){if(0===ae)break e;ae--,se+=ee[re++]<>>=7&fe,fe-=7&fe,r.mode=V;break}for(;fe<3;){if(0===ae)break e;ae--,se+=ee[re++]<>>=1)){case 0:r.mode=L;break;case 1:if(de(r),r.mode=U,t===l){se>>>=2,fe-=2;break e}break;case 2:r.mode=F;break;case 3:e.msg="invalid block type",r.mode=X}se>>>=2,fe-=2;break;case L:for(se>>>=7&fe,fe-=7&fe;fe<32;){if(0===ae)break e;ae--,se+=ee[re++]<>>16^65535)){e.msg="invalid stored block lengths",r.mode=X;break}if(r.length=65535&se,se=0,fe=0,r.mode=B,t===l)break e;case B:r.mode=N;case N:if(he=r.length){if(he>ae&&(he=ae),he>oe&&(he=oe),0===he)break e;i.arraySet(te,ee,re,he,ne),ae-=he,re+=he,oe-=he,ne+=he,r.length-=he;break}r.mode=D;break;case F:for(;fe<14;){if(0===ae)break e;ae--,se+=ee[re++]<>>=5,fe-=5,r.ndist=1+(31&se),se>>>=5,fe-=5,r.ncode=4+(15&se),se>>>=4,fe-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=X;break}r.have=0,r.mode=j;case j:for(;r.have>>=3,fe-=3}for(;r.have<19;)r.lens[Ie[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,Pe={bits:r.lenbits},Se=s(f,r.lens,0,19,r.lencode,0,r.work,Pe),r.lenbits=Pe.bits,Se){e.msg="invalid code lengths set",r.mode=X;break}r.have=0,r.mode=z;case z:for(;r.have>>16&255,ge=65535&Ae,!((be=Ae>>>24)<=fe);){if(0===ae)break e;ae--,se+=ee[re++]<>>=be,fe-=be,r.lens[r.have++]=ge;else{if(16===ge){for(ke=be+2;fe>>=be,fe-=be,0===r.have){e.msg="invalid bit length repeat",r.mode=X;break}Ee=r.lens[r.have-1],he=3+(3&se),se>>>=2,fe-=2}else if(17===ge){for(ke=be+3;fe>>=be)),se>>>=3,fe-=3}else{for(ke=be+7;fe>>=be)),se>>>=7,fe-=7}if(r.have+he>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=X;break}for(;he--;)r.lens[r.have++]=Ee}}if(r.mode===X)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=X;break}if(r.lenbits=9,Pe={bits:r.lenbits},Se=s(c,r.lens,0,r.nlen,r.lencode,0,r.work,Pe),r.lenbits=Pe.bits,Se){e.msg="invalid literal/lengths set",r.mode=X;break}if(r.distbits=6,r.distcode=r.distdyn,Pe={bits:r.distbits},Se=s(u,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,Pe),r.distbits=Pe.bits,Se){e.msg="invalid distances set",r.mode=X;break}if(r.mode=U,t===l)break e;case U:r.mode=q;case q:if(ae>=6&&oe>=258){e.next_out=ne,e.avail_out=oe,e.next_in=re,e.avail_in=ae,r.hold=se,r.bits=fe,o(e,ue),ne=e.next_out,te=e.output,oe=e.avail_out,re=e.next_in,ee=e.input,ae=e.avail_in,se=r.hold,fe=r.bits,r.mode===D&&(r.back=-1);break}for(r.back=0;ve=(Ae=r.lencode[se&(1<>>16&255,ge=65535&Ae,!((be=Ae>>>24)<=fe);){if(0===ae)break e;ae--,se+=ee[re++]<>ye)])>>>16&255,ge=65535&Ae,!(ye+(be=Ae>>>24)<=fe);){if(0===ae)break e;ae--,se+=ee[re++]<>>=ye,fe-=ye,r.back+=ye}if(se>>>=be,fe-=be,r.back+=be,r.length=ge,0===ve){r.mode=G;break}if(32&ve){r.back=-1,r.mode=D;break}if(64&ve){e.msg="invalid literal/length code",r.mode=X;break}r.extra=15&ve,r.mode=$;case $:if(r.extra){for(ke=r.extra;fe>>=r.extra,fe-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=K;case K:for(;ve=(Ae=r.distcode[se&(1<>>16&255,ge=65535&Ae,!((be=Ae>>>24)<=fe);){if(0===ae)break e;ae--,se+=ee[re++]<>ye)])>>>16&255,ge=65535&Ae,!(ye+(be=Ae>>>24)<=fe);){if(0===ae)break e;ae--,se+=ee[re++]<>>=ye,fe-=ye,r.back+=ye}if(se>>>=be,fe-=be,r.back+=be,64&ve){e.msg="invalid distance code",r.mode=X;break}r.offset=ge,r.extra=15&ve,r.mode=H;case H:if(r.extra){for(ke=r.extra;fe>>=r.extra,fe-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=X;break}r.mode=Z;case Z:if(0===oe)break e;if(he=ue-oe,r.offset>he){if((he=r.offset-he)>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=X;break}he>r.wnext?(he-=r.wnext,pe=r.wsize-he):pe=r.wnext-he,he>r.length&&(he=r.length),me=r.window}else me=te,pe=ne-r.offset,he=r.length;he>oe&&(he=oe),oe-=he,r.length-=he;do{te[ne++]=me[pe++]}while(--he);0===r.length&&(r.mode=q);break;case G:if(0===oe)break e;te[ne++]=r.length,oe--,r.mode=q;break;case V:if(r.wrap){for(;fe<32;){if(0===ae)break e;ae--,se|=ee[re++]<>>=_=y>>>24,p-=_,0===(_=y>>>16&255))A[a++]=65535&y;else{if(!(16&_)){if(0==(64&_)){y=m[(65535&y)+(l&(1<<_)-1)];continue t}if(32&_){r.mode=12;break e}e.msg="invalid literal/length code",r.mode=30;break e}w=65535&y,(_&=15)&&(p<_&&(l+=k[i++]<>>=_,p-=_),p<15&&(l+=k[i++]<>>=_=y>>>24,p-=_,!(16&(_=y>>>16&255))){if(0==(64&_)){y=b[(65535&y)+(l&(1<<_)-1)];continue r}e.msg="invalid distance code",r.mode=30;break e}if(E=65535&y,p<(_&=15)&&(l+=k[i++]<f){e.msg="invalid distance too far back",r.mode=30;break e}if(l>>>=_,p-=_,E>(_=a-o)){if((_=E-_)>u&&r.sane){e.msg="invalid distance too far back",r.mode=30;break e}if(S=0,P=d,0===h){if(S+=c-_,_2;)A[a++]=P[S++],A[a++]=P[S++],A[a++]=P[S++],w-=3;w&&(A[a++]=P[S++],w>1&&(A[a++]=P[S++]))}else{S=a-E;do{A[a++]=A[S++],A[a++]=A[S++],A[a++]=A[S++],w-=3}while(w>2);w&&(A[a++]=A[S++],w>1&&(A[a++]=A[S++]))}break}}break}}while(i>3,l&=(1<<(p-=w<<3))-1,e.next_in=i,e.next_out=a,e.avail_in=i=1&&0===L[A];A--);if(x>A&&(x=A),0===A)return c[u++]=20971520,c[u++]=20971520,d.bits=1,0;for(k=1;k0&&(0===e||1!==A))return-1;for(B[1]=0,S=1;S<15;S++)B[S+1]=B[S]+L[S];for(P=0;P852||2===e&&R>592)return 1;for(;;){y=S-O,h[P]g?(_=N[F+h[P]],w=D[C+h[P]]):(_=96,w=0),l=1<>O)+(p-=l)]=y<<24|_<<16|w|0}while(0!==p);for(l=1<>=1;if(0!==l?(T&=l-1,T+=l):T=0,P++,0==--L[S]){if(S===A)break;S=t[r+h[P]]}if(S>x&&(T&b)!==m){for(0===O&&(O=x),v+=k,M=1<<(I=S-O);I+O852||2===e&&R>592)return 1;c[m=T&b]=x<<24|I<<16|v-u|0}}return 0!==T&&(c[v+T]=S-O<<24|64<<16|0),d.bits=x,0}},function(e,t,r){"use strict";e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},function(e,t,r){"use strict";(function(t){var i=r(6),n=r(42),a=r(14),o=e.exports=function(e){var r=this;e=e||{},i.Readable.call(this,e),this.stopped=!1;var a=e.hasOwnProperty("frequency")?e.frequency:n.DEFAULT_FREQUENCY,o=e.chunkSize||n.DEFAULT_CHUNK_SIZE,s=e.initialSize||n.DEFAULT_INITIAL_SIZE,f=e.incrementAmount||n.DEFAULT_INCREMENT_AMOUNT,c=0,u=new t(s),h=!1,d=function(){var e=Math.min(o,c),i=!1;if(e>0){var n;n=new t(e),u.copy(n,0,0,e),i=!1!==r.push(n),h=i,u.copy(u,0,e,c),c-=e}0===c&&r.stopped&&r.push(null),d.timeout=i?setTimeout(d,a):null};this.stop=function(){if(this.stopped)throw new Error("stop() called on already stopped ReadableStreamBuffer");this.stopped=!0,0===c&&this.push(null)},this.size=function(){return c},this.maxSize=function(){return u.length};var l=function(e){if(u.length-c{const t=document.createElement("li");t.textContent=e,i.appendChild(t)})}}},function(e,t,r){"use strict";const i=r(36).ZipFile,n=r(74),a=r(41),o=r(236)("packer"),s=r(239),f=r(240),{validateContentsZip:c}=r(107);e.exports=function(e,t){let r,u=t;u?r=new n(u):(o("generating a new key"),r=new n({b:1024}),u=r.exportKey("pkcs1-private"));const h=s(e,u),d=r.exportKey("pkcs8-public-der"),l=f(d);return o(`id : ${l}`),c(e).then(()=>(function(e,t,r){return o("zip(): start"),new Promise((n,s)=>{const f=new a.WritableStreamBuffer,c=new i;f.on("finish",()=>{o("zip(): output finish event"),n(f.getContents())}),c.outputStream.pipe(f),c.addBuffer(e,"contents.zip"),c.addBuffer(t,"PUBKEY"),c.addBuffer(r,"SIGNATURE"),c.end(e=>{o(`zip(): ZipFile end event: finalSize ${e} bytes`)})})})(e,d,h)).then(e=>({plugin:e,privateKey:u,id:l}))}},function(e,t,r){(function(i){var n=r(7)._,a=(r(10),r(26)),o=r(7),s=r(18),f=r(226);t.BigInteger=a,e.exports.Key=function(){function e(){this.n=null,this.e=0,this.d=null,this.p=null,this.q=null,this.dmp1=null,this.dmq1=null,this.coeff=null}return e.prototype.setOptions=function(e){var t=s[e.signingScheme],r=s[e.encryptionScheme];t===r?this.signingScheme=this.encryptionScheme=r.makeScheme(this,e):(this.encryptionScheme=r.makeScheme(this,e),this.signingScheme=t.makeScheme(this,e)),this.encryptEngine=f.getEngine(this,e)},e.prototype.generate=function(e,t){var r=e>>1;this.e=parseInt(t,16);for(var i=new a(t,16);;){for(;this.p=new a(e-r,1),0!==this.p.subtract(a.ONE).gcd(i).compareTo(a.ONE)||!this.p.isProbablePrime(10););for(;this.q=new a(r,1),0!==this.q.subtract(a.ONE).gcd(i).compareTo(a.ONE)||!this.q.isProbablePrime(10););if(this.p.compareTo(this.q)<=0){var n=this.p;this.p=this.q,this.q=n}var o=this.p.subtract(a.ONE),s=this.q.subtract(a.ONE),f=o.multiply(s);if(0===f.gcd(i).compareTo(a.ONE)){if(this.n=this.p.multiply(this.q),this.n.bitLength()0&&(n.isNumber(t)||t.length>0)&&r.length>0))throw Error("Invalid RSA private key");this.n=new a(e),this.e=n.isNumber(t)?t:o.get32IntFromBuffer(t,0),this.d=new a(r),i&&s&&f&&c&&u&&(this.p=new a(i),this.q=new a(s),this.dmp1=new a(f),this.dmq1=new a(c),this.coeff=new a(u)),this.$$recalculateCache()},e.prototype.setPublic=function(e,t){if(!(e&&t&&e.length>0&&(n.isNumber(t)||t.length>0)))throw Error("Invalid RSA public key");this.n=new a(e),this.e=n.isNumber(t)?t:o.get32IntFromBuffer(t,0),this.$$recalculateCache()},e.prototype.$doPrivate=function(e){if(this.p||this.q)return e.modPow(this.d,this.n);for(var t=e.mod(this.p).modPow(this.dmp1,this.p),r=e.mod(this.q).modPow(this.dmq1,this.q);t.compareTo(r)<0;)t=t.add(this.p);return t.subtract(r).multiply(this.coeff).mod(this.p).multiply(this.q).add(r)},e.prototype.$doPublic=function(e){return e.modPowInt(this.e,this.n)},e.prototype.encrypt=function(e,t){var r=[],n=[],a=e.length,o=Math.ceil(a/this.maxMessageLength)||1,s=Math.ceil(a/o||1);if(1==o)r.push(e);else for(var f=0;f0)throw Error("Incorrect data or key");for(var r=[],n=0,a=0,o=e.length/this.encryptedDataLength,s=0;s>3},e}()}).call(this,r(1).Buffer)},function(e,t,r){var i=r(0),n=r(17),a=r(2).Buffer,o=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function f(){this.init(),this._w=s,n.call(this,64,56)}function c(e){return e<<30|e>>>2}function u(e,t,r,i){return 0===e?t&r|~t&i:2===e?t&r|t&i|r&i:t^r^i}i(f,n),f.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},f.prototype._update=function(e){for(var t,r=this._w,i=0|this._a,n=0|this._b,a=0|this._c,s=0|this._d,f=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 d=0;d<80;++d){var l=~~(d/20),p=0|((t=i)<<5|t>>>27)+u(l,n,a,s)+f+r[d]+o[l];f=s,s=a,a=c(n),n=i,i=p}this._a=i+this._a|0,this._b=n+this._b|0,this._c=a+this._c|0,this._d=s+this._d|0,this._e=f+this._e|0},f.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=f},function(e,t,r){var i=r(0),n=r(17),a=r(2).Buffer,o=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function f(){this.init(),this._w=s,n.call(this,64,56)}function c(e){return e<<5|e>>>27}function u(e){return e<<30|e>>>2}function h(e,t,r,i){return 0===e?t&r|~t&i:2===e?t&r|t&i|r&i:t^r^i}i(f,n),f.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},f.prototype._update=function(e){for(var t,r=this._w,i=0|this._a,n=0|this._b,a=0|this._c,s=0|this._d,f=0|this._e,d=0;d<16;++d)r[d]=e.readInt32BE(4*d);for(;d<80;++d)r[d]=(t=r[d-3]^r[d-8]^r[d-14]^r[d-16])<<1|t>>>31;for(var l=0;l<80;++l){var p=~~(l/20),m=c(i)+h(p,n,a,s)+f+r[l]+o[p]|0;f=s,s=a,a=u(n),n=i,i=m}this._a=i+this._a|0,this._b=n+this._b|0,this._c=a+this._c|0,this._d=s+this._d|0,this._e=f+this._e|0},f.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=f},function(e,t,r){var i=r(0),n=r(76),a=r(17),o=r(2).Buffer,s=new Array(64);function f(){this.init(),this._w=s,a.call(this,64,56)}i(f,n),f.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},f.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=f},function(e,t,r){var i=r(0),n=r(77),a=r(17),o=r(2).Buffer,s=new Array(160);function f(){this.init(),this._w=s,a.call(this,128,112)}i(f,n),f.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},f.prototype._hash=function(){var e=o.allocUnsafe(48);function t(t,r,i){e.writeInt32BE(t,i),e.writeInt32BE(r,i+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=f},function(e,t,r){"use strict";var i=r(0),n=r(2).Buffer,a=r(12),o=n.alloc(128),s=64;function f(e,t){a.call(this,"digest"),"string"==typeof t&&(t=n.from(t)),this._alg=e,this._key=t,t.length>s?t=e(t):t.length>>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,i){for(var n=0,a=0,o=6;o>=0;o-=2){for(var s=0;s<=24;s+=8)n<<=1,n|=t>>>s+o&1;for(s=0;s<=24;s+=8)n<<=1,n|=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[i+0]=n>>>0,r[i+1]=a>>>0},t.rip=function(e,t,r,i){for(var n=0,a=0,o=0;o<4;o++)for(var s=24;s>=0;s-=8)n<<=1,n|=t>>>s+o&1,n<<=1,n|=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[i+0]=n>>>0,r[i+1]=a>>>0},t.pc1=function(e,t,r,i){for(var n=0,a=0,o=7;o>=5;o--){for(var s=0;s<=24;s+=8)n<<=1,n|=t>>s+o&1;for(s=0;s<=24;s+=8)n<<=1,n|=e>>s+o&1}for(s=0;s<=24;s+=8)n<<=1,n|=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[i+0]=n>>>0,r[i+1]=a>>>0},t.r28shl=function(e,t){return e<>>28-t};var i=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];t.pc2=function(e,t,r,n){for(var a=0,o=0,s=i.length>>>1,f=0;f>>i[f]&1;for(f=s;f>>i[f]&1;r[n+0]=a>>>0,r[n+1]=o>>>0},t.expand=function(e,t,r){var i=0,n=0;i=(1&e)<<5|e>>>27;for(var a=23;a>=15;a-=4)i<<=6,i|=e>>>a&63;for(a=11;a>=3;a-=4)n|=e>>>a&63,n<<=6;n|=(31&e)<<1|e>>>31,t[r+0]=i>>>0,t[r+1]=n>>>0};var n=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];t.substitute=function(e,t){for(var r=0,i=0;i<4;i++){r<<=4,r|=n[64*i+(e>>>18-6*i&63)]}for(i=0;i<4;i++){r<<=4,r|=n[256+64*i+(t>>>18-6*i&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[r]&1;return t>>>0},t.padSplit=function(e,t,r){for(var i=e.toString(2);i.length0;i--)t+=this._buffer(e,t),r+=this._flushBuffer(n,r);return t+=this._buffer(e,t),n},n.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},n.prototype._pad=function(e,t){if(0===t)return!1;for(;t>>1];r=o.r28shl(r,s),n=o.r28shl(n,s),o.pc2(r,n,e.keys,a)}},c.prototype._update=function(e,t,r,i){var n=this._desState,a=o.readUInt32BE(e,t),s=o.readUInt32BE(e,t+4);o.ip(a,s,n.tmp,0),a=n.tmp[0],s=n.tmp[1],"encrypt"===this.type?this._encrypt(n,a,s,n.tmp,0):this._decrypt(n,a,s,n.tmp,0),a=n.tmp[0],s=n.tmp[1],o.writeUInt32BE(r,a,i),o.writeUInt32BE(r,s,i+4)},c.prototype._pad=function(e,t){for(var r=e.length-t,i=t;i>>0,a=d}o.rip(s,a,i,n)},c.prototype._decrypt=function(e,t,r,i,n){for(var a=r,s=t,f=e.keys.length-2;f>=0;f-=2){var c=e.keys[f],u=e.keys[f+1];o.expand(a,e.tmp,0),c^=e.tmp[0],u^=e.tmp[1];var h=o.substitute(c,u),d=a;a=(s^o.permute(h))>>>0,s=d}o.rip(a,s,i,n)}},function(e,t,r){"use strict";var i=r(8),n=r(0),a={};function o(e){i.equal(e.length,8,"Invalid IV length"),this.iv=new Array(8);for(var t=0;t15){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e}return null},d.prototype.flush=function(){for(var e=16-this.cache.length,t=a.allocUnsafe(e),r=-1;++r>o%8,e._prev=a(e._prev,r?i:n);return s}function a(e,t){var r=e.length,n=-1,a=i.allocUnsafe(e.length);for(e=i.concat([e,i.from([t])]);++n>7;return a}t.encrypt=function(e,t,r){for(var a=t.length,o=i.allocUnsafe(a),s=-1;++s>>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=i.alloc(16,0),this.cache=i.allocUnsafe(0)}o.prototype.ghash=function(e){for(var t=-1;++t0;t--)i[t]=i[t]>>>1|(1&i[t-1])<<31;i[0]=i[0]>>>1,r&&(i[0]=i[0]^225<<24)}this.state=a(n)},o.prototype.update=function(e){var t;for(this.cache=i.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(i.concat([this.cache,n],16)),this.ghash(a([0,e,0,t])),this.state},e.exports=o},function(e,t,r){var i=r(88),n=r(2).Buffer,a=r(48),o=r(89),s=r(12),f=r(32),c=r(33);function u(e,t,r){s.call(this),this._cache=new h,this._last=void 0,this._cipher=new f.AES(t),this._prev=n.from(r),this._mode=e,this._autopadding=!0}function h(){this.cache=n.allocUnsafe(0)}function d(e,t,r){var s=a[e.toLowerCase()];if(!s)throw new TypeError("invalid suite type");if("string"==typeof r&&(r=n.from(r)),"GCM"!==s.mode&&r.length!==s.iv)throw new TypeError("invalid iv length "+r.length);if("string"==typeof t&&(t=n.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 i(s.module,t,r,!0):new u(s.module,t,r)}r(0)(u,s),u.prototype._update=function(e){var t,r;this._cache.add(e);for(var i=[];t=this._cache.get(this._autopadding);)r=this._mode.decrypt(this,t),i.push(r);return n.concat(i)},u.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");var r=-1;for(;++r16)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 i=c(t,!1,r.key,r.iv);return d(e,i.key,i.iv)},t.createDecipheriv=d},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){(function(e){var i=r(90),n=r(182),a=r(183);var o={binary:!0,hex:!0,base64:!0};t.DiffieHellmanGroup=t.createDiffieHellmanGroup=t.getDiffieHellman=function(t){var r=new e(n[t].prime,"hex"),i=new e(n[t].gen,"hex");return new a(r,i)},t.createDiffieHellman=t.DiffieHellman=function t(r,n,s,f){return e.isBuffer(n)||void 0===o[n]?t(r,"binary",n,s):(n=n||"binary",f=f||"binary",s=s||new e([2]),e.isBuffer(s)||(s=new e(s,f)),"number"==typeof r?new a(i(r,s),s,!0):(e.isBuffer(r)||(r=new e(r,n)),new a(r,s,!0)))}}).call(this,r(1).Buffer)},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){},function(e,t){},function(e){e.exports=JSON.parse('{"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,r){(function(t){var i=r(3),n=new(r(91)),a=new i(24),o=new i(11),s=new i(10),f=new i(3),c=new i(7),u=r(90),h=r(16);function d(e,r){return r=r||"utf8",t.isBuffer(e)||(e=new t(e,r)),this._pub=new i(e),this}function l(e,r){return r=r||"utf8",t.isBuffer(e)||(e=new t(e,r)),this._priv=new i(e),this}e.exports=m;var p={};function m(e,t,r){this.setGenerator(t),this.__prime=new i(e),this._prime=i.mont(this.__prime),this._primeLen=e.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,r?(this.setPublicKey=d,this.setPrivateKey=l):this._primeCode=8}function b(e,r){var i=new t(e.toArray());return r?i.toString(r):i}Object.defineProperty(m.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=function(e,t){var r=t.toString("hex"),i=[r,e.toString(16)].join("_");if(i in p)return p[i];var h,d=0;if(e.isEven()||!u.simpleSieve||!u.fermatTest(e)||!n.test(e))return d+=1,d+="02"===r||"05"===r?8:4,p[i]=d,d;switch(n.test(e.shrn(1))||(d+=2),r){case"02":e.mod(a).cmp(o)&&(d+=8);break;case"05":(h=e.mod(s)).cmp(f)&&h.cmp(c)&&(d+=8);break;default:d+=4}return p[i]=d,d}(this.__prime,this.__gen)),this._primeCode}}),m.prototype.generateKeys=function(){return this._priv||(this._priv=new i(h(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},m.prototype.computeSecret=function(e){var r=(e=(e=new i(e)).toRed(this._prime)).redPow(this._priv).fromRed(),n=new t(r.toArray()),a=this.getPrime();if(n.length0&&r.ishrn(i),r}function h(e,r,n){var a,o;do{for(a=new t(0);8*a.length","license":"MIT","bugs":{"url":"https://github.com/indutny/elliptic/issues"},"homepage":"https://github.com/indutny/elliptic","devDependencies":{"brfs":"^1.4.3","coveralls":"^3.0.4","grunt":"^1.0.4","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":"^9.0.1","istanbul":"^0.4.2","jscs":"^3.0.7","jshint":"^2.6.0","mocha":"^6.1.4"},"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"},"_resolved":"https://registry.npmjs.org/elliptic/-/elliptic-6.5.1.tgz","_integrity":"sha512-xvJINNLbTeWQjrl6X+7eQCrIy/YPv5XCpKW6kB5mKvtnGILoLDcySuwomfdzt0BMdLNVnuRNTuzKNHj0bva1Cg==","_from":"elliptic@6.5.1"}')},function(e,t,r){"use strict";var i=r(9),n=r(3),a=r(0),o=r(34),s=i.assert;function f(e){o.call(this,"short",e),this.a=new n(e.a,16).toRed(this.red),this.b=new n(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 c(e,t,r,i){o.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new n(t,16),this.y=new n(r,16),i&&(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 u(e,t,r,i){o.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===i?(this.x=this.curve.one,this.y=this.curve.one,this.z=new n(0)):(this.x=new n(t,16),this.y=new n(r,16),this.z=new n(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.zOne=this.z===this.curve.one}a(f,o),e.exports=f,f.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,r;if(e.beta)t=new n(e.beta,16).toRed(this.red);else{var i=this._getEndoRoots(this.p);t=(t=i[0].cmp(i[1])<0?i[0]:i[1]).toRed(this.red)}if(e.lambda)r=new n(e.lambda,16);else{var a=this._getEndoRoots(this.n);0===this.g.mul(a[0]).x.cmp(this.g.x.redMul(t))?r=a[0]:(r=a[1],s(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 n(e.a,16),b:new n(e.b,16)}})):this._getEndoBasis(r)}}},f.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:n.mont(e),r=new n(2).toRed(t).redInvm(),i=r.redNeg(),a=new n(3).toRed(t).redNeg().redSqrt().redMul(r);return[i.redAdd(a).fromRed(),i.redSub(a).fromRed()]},f.prototype._getEndoBasis=function(e){for(var t,r,i,a,o,s,f,c,u,h=this.n.ushrn(Math.floor(this.n.bitLength()/2)),d=e,l=this.n.clone(),p=new n(1),m=new n(0),b=new n(0),v=new n(1),g=0;0!==d.cmpn(0);){var y=l.div(d);c=l.sub(y.mul(d)),u=b.sub(y.mul(p));var _=v.sub(y.mul(m));if(!i&&c.cmp(h)<0)t=f.neg(),r=p,i=c.neg(),a=u;else if(i&&2==++g)break;f=c,l=d,d=c,b=p,p=u,v=m,m=_}o=c.neg(),s=u;var w=i.sqr().add(a.sqr());return o.sqr().add(s.sqr()).cmp(w)>=0&&(o=t,s=r),i.negative&&(i=i.neg(),a=a.neg()),o.negative&&(o=o.neg(),s=s.neg()),[{a:i,b:a},{a:o,b:s}]},f.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],i=t[1],n=i.b.mul(e).divRound(this.n),a=r.b.neg().mul(e).divRound(this.n),o=n.mul(r.a),s=a.mul(i.a),f=n.mul(r.b),c=a.mul(i.b);return{k1:e.sub(o).sub(s),k2:f.add(c).neg()}},f.prototype.pointFromX=function(e,t){(e=new n(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),i=r.redSqrt();if(0!==i.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var a=i.fromRed().isOdd();return(t&&!a||!t&&a)&&(i=i.redNeg()),this.point(e,i)},f.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,i=this.a.redMul(t),n=t.redSqr().redMul(t).redIAdd(i).redIAdd(this.b);return 0===r.redSqr().redISub(n).cmpn(0)},f.prototype._endoWnafMulAdd=function(e,t,r){for(var i=this._endoWnafT1,n=this._endoWnafT2,a=0;a":""},c.prototype.isInfinity=function(){return this.inf},c.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),i=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,i)},c.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(),i=e.redInvm(),n=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(i),a=n.redSqr().redISub(this.x.redAdd(this.x)),o=n.redMul(this.x.redSub(a)).redISub(this.y);return this.curve.point(a,o)},c.prototype.getX=function(){return this.x.fromRed()},c.prototype.getY=function(){return this.y.fromRed()},c.prototype.mul=function(e){return e=new n(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},c.prototype.mulAdd=function(e,t,r){var i=[this,t],n=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(i,n):this.curve._wnafMulAdd(1,i,n,2)},c.prototype.jmulAdd=function(e,t,r){var i=[this,t],n=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(i,n,!0):this.curve._wnafMulAdd(1,i,n,2,!0)},c.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))},c.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,i=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(i)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(i)}}}return t},c.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},a(u,o.BasePoint),f.prototype.jpoint=function(e,t,r){return new u(this,e,t,r)},u.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),i=this.y.redMul(t).redMul(e);return this.curve.point(r,i)},u.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},u.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),i=this.x.redMul(t),n=e.x.redMul(r),a=this.y.redMul(t.redMul(e.z)),o=e.y.redMul(r.redMul(this.z)),s=i.redSub(n),f=a.redSub(o);if(0===s.cmpn(0))return 0!==f.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=s.redSqr(),u=c.redMul(s),h=i.redMul(c),d=f.redSqr().redIAdd(u).redISub(h).redISub(h),l=f.redMul(h.redISub(d)).redISub(a.redMul(u)),p=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(d,l,p)},u.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,i=e.x.redMul(t),n=this.y,a=e.y.redMul(t).redMul(this.z),o=r.redSub(i),s=n.redSub(a);if(0===o.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var f=o.redSqr(),c=f.redMul(o),u=r.redMul(f),h=s.redSqr().redIAdd(c).redISub(u).redISub(u),d=s.redMul(u.redISub(h)).redISub(n.redMul(c)),l=this.z.redMul(o);return this.curve.jpoint(h,d,l)},u.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=0)return!1;if(r.redIAdd(n),0===this.x.cmp(r))return!0}},u.prototype.inspect=function(){return this.isInfinity()?"":""},u.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},function(e,t,r){"use strict";var i=r(3),n=r(0),a=r(34),o=r(9);function s(e){a.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 f(e,t,r){a.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)))}n(s,a),e.exports=s,s.prototype.validate=function(e){var t=e.normalize().x,r=t.redSqr(),i=r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t);return 0===i.redSqrt().redSqr().cmp(i)},n(f,a.BasePoint),s.prototype.decodePoint=function(e,t){return this.point(o.toArray(e,t),1)},s.prototype.point=function(e,t){return new f(this,e,t)},s.prototype.pointFromJSON=function(e){return f.fromJSON(this,e)},f.prototype.precompute=function(){},f.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},f.fromJSON=function(e,t){return new f(e,t[0],t[1]||e.one)},f.prototype.inspect=function(){return this.isInfinity()?"":""},f.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},f.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),r=e.redSub(t),i=e.redMul(t),n=r.redMul(t.redAdd(this.curve.a24.redMul(r)));return this.curve.point(i,n)},f.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},f.prototype.diffAdd=function(e,t){var r=this.x.redAdd(this.z),i=this.x.redSub(this.z),n=e.x.redAdd(e.z),a=e.x.redSub(e.z).redMul(r),o=n.redMul(i),s=t.z.redMul(a.redAdd(o).redSqr()),f=t.x.redMul(a.redISub(o).redSqr());return this.curve.point(s,f)},f.prototype.mul=function(e){for(var t=e.clone(),r=this,i=this.curve.point(null,null),n=[];0!==t.cmpn(0);t.iushrn(1))n.push(t.andln(1));for(var a=n.length-1;a>=0;a--)0===n[a]?(r=r.diffAdd(i,this),i=i.dbl()):(i=r.diffAdd(i,this),r=r.dbl());return i},f.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},f.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},f.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},f.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},f.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},function(e,t,r){"use strict";var i=r(9),n=r(3),a=r(0),o=r(34),s=i.assert;function f(e){this.twisted=1!=(0|e.a),this.mOneA=this.twisted&&-1==(0|e.a),this.extended=this.mOneA,o.call(this,"edwards",e),this.a=new n(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new n(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new n(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),s(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|e.c)}function c(e,t,r,i,a){o.BasePoint.call(this,e,"projective"),null===t&&null===r&&null===i?(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 n(t,16),this.y=new n(r,16),this.z=i?new n(i,16):this.curve.one,this.t=a&&new n(a,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()))))}a(f,o),e.exports=f,f.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},f.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},f.prototype.jpoint=function(e,t,r,i){return this.point(e,t,r,i)},f.prototype.pointFromX=function(e,t){(e=new n(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),i=this.c2.redSub(this.a.redMul(r)),a=this.one.redSub(this.c2.redMul(this.d).redMul(r)),o=i.redMul(a.redInvm()),s=o.redSqrt();if(0!==s.redSqr().redSub(o).cmp(this.zero))throw new Error("invalid point");var f=s.fromRed().isOdd();return(t&&!f||!t&&f)&&(s=s.redNeg()),this.point(e,s)},f.prototype.pointFromY=function(e,t){(e=new n(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),i=r.redSub(this.c2),a=r.redMul(this.d).redMul(this.c2).redSub(this.a),o=i.redMul(a.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.fromRed().isOdd()!==t&&(s=s.redNeg()),this.point(s,e)},f.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),r=e.y.redSqr(),i=t.redMul(this.a).redAdd(r),n=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(r)));return 0===i.cmp(n)},a(c,o.BasePoint),f.prototype.pointFromJSON=function(e){return c.fromJSON(this,e)},f.prototype.point=function(e,t,r,i){return new c(this,e,t,r,i)},c.fromJSON=function(e,t){return new c(e,t[0],t[1],t[2])},c.prototype.inspect=function(){return this.isInfinity()?"":""},c.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},c.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var i=this.curve._mulA(e),n=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),a=i.redAdd(t),o=a.redSub(r),s=i.redSub(t),f=n.redMul(o),c=a.redMul(s),u=n.redMul(s),h=o.redMul(a);return this.curve.point(f,c,h,u)},c.prototype._projDbl=function(){var e,t,r,i=this.x.redAdd(this.y).redSqr(),n=this.x.redSqr(),a=this.y.redSqr();if(this.curve.twisted){var o=(c=this.curve._mulA(n)).redAdd(a);if(this.zOne)e=i.redSub(n).redSub(a).redMul(o.redSub(this.curve.two)),t=o.redMul(c.redSub(a)),r=o.redSqr().redSub(o).redSub(o);else{var s=this.z.redSqr(),f=o.redSub(s).redISub(s);e=i.redSub(n).redISub(a).redMul(f),t=o.redMul(c.redSub(a)),r=o.redMul(f)}}else{var c=n.redAdd(a);s=this.curve._mulC(this.z).redSqr(),f=c.redSub(s).redSub(s);e=this.curve._mulC(i.redISub(c)).redMul(f),t=this.curve._mulC(c).redMul(n.redISub(a)),r=c.redMul(f)}return this.curve.point(e,t,r)},c.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},c.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)),i=this.t.redMul(this.curve.dd).redMul(e.t),n=this.z.redMul(e.z.redAdd(e.z)),a=r.redSub(t),o=n.redSub(i),s=n.redAdd(i),f=r.redAdd(t),c=a.redMul(o),u=s.redMul(f),h=a.redMul(f),d=o.redMul(s);return this.curve.point(c,u,d,h)},c.prototype._projAdd=function(e){var t,r,i=this.z.redMul(e.z),n=i.redSqr(),a=this.x.redMul(e.x),o=this.y.redMul(e.y),s=this.curve.d.redMul(a).redMul(o),f=n.redSub(s),c=n.redAdd(s),u=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(a).redISub(o),h=i.redMul(f).redMul(u);return this.curve.twisted?(t=i.redMul(c).redMul(o.redSub(this.curve._mulA(a))),r=f.redMul(c)):(t=i.redMul(c).redMul(o.redSub(a)),r=this.curve._mulC(f).redMul(c)),this.curve.point(h,t,r)},c.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},c.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},c.prototype.mulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!1)},c.prototype.jmulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!0)},c.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},c.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},c.prototype.getX=function(){return this.normalize(),this.x.fromRed()},c.prototype.getY=function(){return this.normalize(),this.y.fromRed()},c.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},c.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(),i=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(i),0===this.x.cmp(t))return!0}},c.prototype.toP=c.prototype.normalize,c.prototype.mixedAdd=c.prototype.add},function(e,t,r){"use strict";t.sha1=r(191),t.sha224=r(192),t.sha256=r(95),t.sha384=r(193),t.sha512=r(96)},function(e,t,r){"use strict";var i=r(11),n=r(23),a=r(94),o=i.rotl32,s=i.sum32,f=i.sum32_5,c=a.ft_1,u=n.BlockHash,h=[1518500249,1859775393,2400959708,3395469782];function d(){if(!(this instanceof d))return new d;u.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}i.inherits(d,u),e.exports=d,d.blockSize=512,d.outSize=160,d.hmacStrength=80,d.padLength=64,d.prototype._update=function(e,t){for(var r=this.W,i=0;i<16;i++)r[i]=e[t+i];for(;ithis.blockSize&&(e=(new this.Hash).update(e).digest()),n(e.length<=this.blockSize);for(var t=e.length;t0))return o.iaddn(1),this.keyFromPrivate(o)}},h.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},h.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 i(e,16));for(var o=this.n.byteLength(),s=t.getPrivate().toArray("be",o),f=e.toArray("be",o),c=new n({hash:this.hash,entropy:s,nonce:f,pers:a.pers,persEnc:a.persEnc||"utf8"}),h=this.n.sub(new i(1)),d=0;;d++){var l=a.k?a.k(d):new i(c.generate(this.n.byteLength()));if(!((l=this._truncateToN(l,!0)).cmpn(1)<=0||l.cmp(h)>=0)){var p=this.g.mul(l);if(!p.isInfinity()){var m=p.getX(),b=m.umod(this.n);if(0!==b.cmpn(0)){var v=l.invm(this.n).mul(b.mul(t.getPrivate()).iadd(e));if(0!==(v=v.umod(this.n)).cmpn(0)){var g=(p.getY().isOdd()?1:0)|(0!==m.cmp(b)?2:0);return a.canonical&&v.cmp(this.nh)>0&&(v=this.n.sub(v),g^=1),new u({r:b,s:v,recoveryParam:g})}}}}}},h.prototype.verify=function(e,t,r,n){e=this._truncateToN(new i(e,16)),r=this.keyFromPublic(r,n);var a=(t=new u(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,f=o.invm(this.n),c=f.mul(e).umod(this.n),h=f.mul(a).umod(this.n);return this.curve._maxwellTrick?!(s=this.g.jmulAdd(c,r.getPublic(),h)).isInfinity()&&s.eqXToP(a):!(s=this.g.mulAdd(c,r.getPublic(),h)).isInfinity()&&0===s.getX().umod(this.n).cmp(a)},h.prototype.recoverPubKey=function(e,t,r,n){f((3&r)===r,"The recovery param is more than two bits"),t=new u(t,n);var a=this.n,o=new i(e),s=t.r,c=t.s,h=1&r,d=r>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&d)throw new Error("Unable to find sencond key candinate");s=d?this.curve.pointFromX(s.add(this.curve.n),h):this.curve.pointFromX(s,h);var l=t.r.invm(a),p=a.sub(o).mul(l).umod(a),m=c.mul(l).umod(a);return this.g.mulAdd(p,s,m)},h.prototype.getKeyRecoveryParam=function(e,t,r,i){if(null!==(t=new u(t,i)).recoveryParam)return t.recoveryParam;for(var n=0;n<4;n++){var a;try{a=this.recoverPubKey(e,t,n)}catch(e){continue}if(a.eq(r))return n}throw new Error("Unable to find valid recovery factor")}},function(e,t,r){"use strict";var i=r(53),n=r(92),a=r(8);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=n.toArray(e.entropy,e.entropyEnc||"hex"),r=n.toArray(e.nonce,e.nonceEnc||"hex"),i=n.toArray(e.pers,e.persEnc||"hex");a(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,i)}e.exports=o,o.prototype._init=function(e,t,r){var i=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var n=0;n=this.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,i){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(i=r,r=t,t=null),r&&(r=n.toArray(r,i||"hex"),this._update(r));for(var a=[];a.length"}},function(e,t,r){"use strict";var i=r(3),n=r(9),a=n.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 i(e.r,16),this.s=new i(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function s(){this.place=0}function f(e,t){var r=e[t.place++];if(!(128&r))return r;for(var i=15&r,n=0,a=0,o=t.place;a>>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=n.toArray(e,t);var r=new s;if(48!==e[r.place++])return!1;if(f(e,r)+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var a=f(e,r),o=e.slice(r.place,a+r.place);if(r.place+=a,2!==e[r.place++])return!1;var c=f(e,r);if(e.length!==c+r.place)return!1;var u=e.slice(r.place,c+r.place);return 0===o[0]&&128&o[1]&&(o=o.slice(1)),0===u[0]&&128&u[1]&&(u=u.slice(1)),this.r=new i(o),this.s=new i(u),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=c(t),r=c(r);!(r[0]||128&r[1]);)r=r.slice(1);var i=[2];u(i,t.length),(i=i.concat(t)).push(2),u(i,r.length);var a=i.concat(r),o=[48];return u(o,a.length),o=o.concat(a),n.encode(o,e)}},function(e,t,r){"use strict";var i=r(53),n=r(52),a=r(9),o=a.assert,s=a.parseBytes,f=r(202),c=r(203);function u(e){if(o("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof u))return new u(e);e=n[e].curve;this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=i.sha512}e.exports=u,u.prototype.sign=function(e,t){e=s(e);var r=this.keyFromSecret(t),i=this.hashInt(r.messagePrefix(),e),n=this.g.mul(i),a=this.encodePoint(n),o=this.hashInt(a,r.pubBytes(),e).mul(r.priv()),f=i.add(o).umod(this.curve.n);return this.makeSignature({R:n,S:f,Rencoded:a})},u.prototype.verify=function(e,t,r){e=s(e),t=this.makeSignature(t);var i=this.keyFromPublic(r),n=this.hashInt(t.Rencoded(),i.pubBytes(),e),a=this.g.mul(t.S());return t.R().add(i.pub().mul(n)).eq(a)},u.prototype.hashInt=function(){for(var e=this.hash(),t=0;t=t)throw new Error("invalid sig")}e.exports=function(e,r,f,c,u){var h=a(f);if("ec"===h.type){if("ecdsa"!==c&&"ecdsa/rsa"!==c)throw new Error("wrong public key type");return function(e,t,r){var i=o[r.data.algorithm.curve.join(".")];if(!i)throw new Error("unknown curve "+r.data.algorithm.curve.join("."));var a=new n(i),s=r.data.subjectPrivateKey.data;return a.verify(t,e,s)}(e,r,h)}if("dsa"===h.type){if("dsa"!==c)throw new Error("wrong public key type");return function(e,t,r){var n=r.data.p,o=r.data.q,f=r.data.g,c=r.data.pub_key,u=a.signature.decode(e,"der"),h=u.s,d=u.r;s(h,o),s(d,o);var l=i.mont(n),p=h.invm(o);return 0===f.toRed(l).redPow(new i(t).mul(p).mod(o)).fromRed().mul(c.toRed(l).redPow(d.mul(p).mod(o)).fromRed()).mod(n).mod(o).cmp(d)}(e,r,h)}if("rsa"!==c&&"ecdsa/rsa"!==c)throw new Error("wrong public key type");r=t.concat([u,r]);for(var d=h.modulus.byteLength(),l=[1],p=0;r.length+l.length+2r-d-2)throw new Error("message too long");var l=h.alloc(r-i-d-2),p=r-u-1,m=n(u),b=s(h.concat([c,l,h.alloc(1,1),t],p),o(m,p)),v=s(m,o(b,u));return new f(h.concat([h.alloc(1),v,b],r))}(p,t);else if(1===d)l=function(e,t,r){var i,a=t.length,o=e.modulus.byteLength();if(a>o-11)throw new Error("message too long");i=r?h.alloc(o-a-3,255):function(e){var t,r=h.allocUnsafe(e),i=0,a=n(2*e),o=0;for(;i=0)throw new Error("data too long for modulus")}return r?u(l,p):c(l,p)}},function(e,t,r){var i=r(35),n=r(102),a=r(103),o=r(3),s=r(50),f=r(21),c=r(104),u=r(2).Buffer;e.exports=function(e,t,r){var h;h=e.padding?e.padding:r?1:4;var d,l=i(e),p=l.modulus.byteLength();if(t.length>p||new o(t).cmp(l.modulus)>=0)throw new Error("decryption error");d=r?c(new o(t),l):s(t,l);var m=u.alloc(p-d.length);if(d=u.concat([m,d],p),4===h)return function(e,t){var r=e.modulus.byteLength(),i=f("sha1").update(u.alloc(0)).digest(),o=i.length;if(0!==t[0])throw new Error("decryption error");var s=t.slice(1,o+1),c=t.slice(o+1),h=a(s,n(c,o)),d=a(c,n(h,r-o-1));if(function(e,t){e=u.from(e),t=u.from(t);var r=0,i=e.length;e.length!==t.length&&(r++,i=Math.min(e.length,t.length));var n=-1;for(;++n=t.length){a++;break}var o=t.slice(2,n-1);("0002"!==i.toString("hex")&&!r||"0001"!==i.toString("hex")&&r)&&a++;o.length<8&&a++;if(a)throw new Error("decryption error");return t.slice(n)}(0,d,r);if(3===h)return d;throw new Error("unknown padding")}},function(e,t,r){"use strict";(function(e,i){function n(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var a=r(2),o=r(16),s=a.Buffer,f=a.kMaxLength,c=e.crypto||e.msCrypto,u=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>u||e<0)throw new TypeError("offset must be a uint32");if(e>f||e>t)throw new RangeError("offset out of range")}function d(e,t,r){if("number"!=typeof e||e!=e)throw new TypeError("size must be a number");if(e>u||e<0)throw new TypeError("size must be a uint32");if(e+t>r||e>f)throw new RangeError("buffer too small")}function l(e,t,r,n){if(i.browser){var a=e.buffer,s=new Uint8Array(a,t,r);return c.getRandomValues(s),n?void i.nextTick((function(){n(null,e)})):e}if(!n)return o(r).copy(e,t),e;o(r,(function(r,i){if(r)return n(r);i.copy(e,t),n(null,e)}))}c&&c.getRandomValues||!i.browser?(t.randomFill=function(t,r,i,n){if(!(s.isBuffer(t)||t instanceof e.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof r)n=r,r=0,i=t.length;else if("function"==typeof i)n=i,i=t.length-r;else if("function"!=typeof n)throw new TypeError('"cb" argument must be a function');return h(r,t.length),d(i,r,t.length),l(t,r,i,n)},t.randomFillSync=function(t,r,i){void 0===r&&(r=0);if(!(s.isBuffer(t)||t instanceof e.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');h(r,t.length),void 0===i&&(i=t.length-r);return d(i,r,t.length),l(t,r,i)}):(t.randomFill=n,t.randomFillSync=n)}).call(this,r(5),r(4))},function(e,t,r){(function(t){var i=r(26),n=r(10),a=r(31),o={md2:t.from("3020300c06082a864886f70d020205000410","hex"),md5:t.from("3020300c06082a864886f70d020505000410","hex"),sha1:t.from("3021300906052b0e03021a05000414","hex"),sha224:t.from("302d300d06096086480165030402040500041c","hex"),sha256:t.from("3031300d060960864801650304020105000420","hex"),sha384:t.from("3041300d060960864801650304020205000430","hex"),sha512:t.from("3051300d060960864801650304020305000440","hex"),ripemd160:t.from("3021300906052b2403020105000414","hex"),rmd160:t.from("3021300906052b2403020105000414","hex")},s={ripemd160:"rmd160"};e.exports={isEncryption:!0,isSignature:!0},e.exports.makeScheme=function(e,r){function f(e,t){this.key=e,this.options=t}return f.prototype.maxMessageLength=function(){return this.options.encryptionSchemeOptions&&this.options.encryptionSchemeOptions.padding==a.RSA_NO_PADDING?this.key.encryptedDataLength:this.key.encryptedDataLength-11},f.prototype.encPad=function(e,r){var i;if(r=r||{},e.length>this.key.maxMessageLength)throw new Error("Message too long for RSA (n="+this.key.encryptedDataLength+", l="+e.length+")");if(this.options.encryptionSchemeOptions&&this.options.encryptionSchemeOptions.padding==a.RSA_NO_PADDING)return(i=t.alloc(this.key.maxMessageLength-e.length)).fill(0),t.concat([i,e]);if(1===r.type)return(i=t.alloc(this.key.encryptedDataLength-e.length-1)).fill(255,0,i.length-1),i[0]=1,i[i.length-1]=0,t.concat([i,e]);(i=t.alloc(this.key.encryptedDataLength-e.length))[0]=0,i[1]=2;for(var o=n.randomBytes(i.length-3),s=0;s=e.length)return null}else{if(0!==e[0]||2!==e[1])return null;for(r=3;0!==e[r];)if(++r>=e.length)return null}return e.slice(r+1,e.length)},f.prototype.sign=function(e){var t=this.options.signingSchemeOptions.hash||"sha256";if("browser"===this.options.environment){t=s[t]||t;var r=n.createHash(t);r.update(e);var a=this.pkcs1pad(r.digest(),t);return this.key.$doPrivate(new i(a)).toBuffer(this.key.encryptedDataLength)}var o=n.createSign("RSA-"+t.toUpperCase());return o.update(e),o.sign(this.options.rsaUtils.exportKey("private"))},f.prototype.verify=function(e,r,o){if(this.options.encryptionSchemeOptions&&this.options.encryptionSchemeOptions.padding==a.RSA_NO_PADDING)return!1;var f=this.options.signingSchemeOptions.hash||"sha256";if("browser"===this.options.environment){f=s[f]||f,o&&(r=t.from(r,o));var c=n.createHash(f);c.update(e);var u=this.pkcs1pad(c.digest(),f);return this.key.$doPublic(new i(r)).toBuffer().toString("hex")==u.toString("hex")}var h=n.createVerify("RSA-"+f.toUpperCase());return h.update(e),h.verify(this.options.rsaUtils.exportKey("public"),r,o)},f.prototype.pkcs0pad=function(e){var r=t.alloc(this.key.maxMessageLength-e.length);return r.fill(0),t.concat([r,e])},f.prototype.pkcs0unpad=function(e){return"function"==typeof e.lastIndexOf?e.slice(e.lastIndexOf("\0")+1,e.length):e.slice(String.prototype.lastIndexOf.call(e,"\0")+1,e.length)},f.prototype.pkcs1pad=function(e,r){var i=o[r];if(!i)throw Error("Unsupported hash algorithm");var n=t.concat([i,e]);if(n.length+10>this.key.encryptedDataLength)throw Error("Key is too short for signing algorithm ("+r+")");var a=t.alloc(this.key.encryptedDataLength-n.length-1);return a.fill(255,0,a.length-1),a[0]=1,a[a.length-1]=0,t.concat([a,n])},new f(e,r)}}).call(this,r(1).Buffer)},function(e,t,r){(function(t){r(26);var i=r(10);e.exports={isEncryption:!0,isSignature:!1},e.exports.digestLength={md4:16,md5:16,ripemd160:20,rmd160:20,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64};e.exports.eme_oaep_mgf1=function(r,n,a){a=a||"sha1";for(var o=e.exports.digestLength[a],s=Math.ceil(n/o),f=t.alloc(o*s),c=t.alloc(4),u=0;us-2*f-2)throw new Error("Message is too long to encode into an encoded message with a length of "+s+" bytes, increaseemLen to fix this error (minimum value for given parameters and options: "+(s-2*f-2)+")");var c=i.createHash(n);c.update(o),c=c.digest();var u=t.alloc(s-r.length-2*f-1);u.fill(0),u[u.length-1]=1;for(var h=t.concat([c,u,r]),d=i.randomBytes(f),l=a(d,h.length,n),p=0;p>8-g<<8-g;b[0]=b[0]&y;var _=t.alloc(b.length+d.length+1);return b.copy(_,0),d.copy(_,b.length),_[_.length-1]=188,_},s.prototype.emsa_pss_verify=function(e,r,i){var a=this.options.signingSchemeOptions.hash||"sha1",s=this.options.signingSchemeOptions.mgf||o.eme_oaep_mgf1,f=this.options.signingSchemeOptions.saltLength||20,c=o.digestLength[a],u=Math.ceil(i/8);if(u>8-(p=8*u-i)<<8-p,h[0]=h[0]&d,l=0;0===h[l]&&l=this._size)return null;var t=255&this._buf[e++];if(null===t)return null;if(128==(128&t)){if(0===(t&=127))throw o("Indefinite length not supported");if(t>4)throw o("encoding too long");if(this._size-ethis._size-i)return null;if(this._offset=i,0===this.length)return t?n.alloc(0):"";var s=this._buf.slice(this._offset,this._offset+this.length);return this._offset+=this.length,t?s:s.toString("utf8")},s.prototype.readOID=function(e){e||(e=a.OID);var t=this.readString(e,!0);if(null===t)return null;for(var r=[],i=0,n=0;n>0),r.join(".")},s.prototype._readTag=function(e){i.ok(void 0!==e);var t=this.peek();if(null===t)return null;if(t!==e)throw o("Expected 0x"+e.toString(16)+": got 0x"+t.toString(16));var r=this.readLength(this._offset+1);if(null===r)return null;if(this.length>4)throw o("Integer too long: "+this.length);if(this.length>this._size-r)return null;this._offset=r;for(var n=this._buf[this._offset],a=0,s=0;s>0},e.exports=s},function(e,t,r){var i=r(29),n=r(106).Buffer,a=r(56),o=r(55).newInvalidAsn1Error,s={size:1024,growthFactor:8};function f(e){var t,r;t=s,r=e||{},i.ok(t),i.equal(typeof t,"object"),i.ok(r),i.equal(typeof r,"object"),Object.getOwnPropertyNames(t).forEach((function(e){if(!r[e]){var i=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(r,e,i)}})),e=r,this._buf=n.alloc(e.size||1024),this._size=this._buf.length,this._offset=0,this._options=e,this._seq=[]}Object.defineProperty(f.prototype,"buffer",{get:function(){if(this._seq.length)throw o(this._seq.length+" unended sequence(s)");return this._buf.slice(0,this._offset)}}),f.prototype.writeByte=function(e){if("number"!=typeof e)throw new TypeError("argument must be a Number");this._ensure(1),this._buf[this._offset++]=e},f.prototype.writeInt=function(e,t){if("number"!=typeof e)throw new TypeError("argument must be a Number");"number"!=typeof t&&(t=a.Integer);for(var r=4;(0==(4286578688&e)||-8388608==(4286578688&e))&&r>1;)r--,e<<=8;if(r>4)throw o("BER ints cannot be > 0xffffffff");for(this._ensure(2+r),this._buf[this._offset++]=t,this._buf[this._offset++]=r;r-- >0;)this._buf[this._offset++]=(4278190080&e)>>>24,e<<=8},f.prototype.writeNull=function(){this.writeByte(a.Null),this.writeByte(0)},f.prototype.writeEnumeration=function(e,t){if("number"!=typeof e)throw new TypeError("argument must be a Number");return"number"!=typeof t&&(t=a.Enumeration),this.writeInt(e,t)},f.prototype.writeBoolean=function(e,t){if("boolean"!=typeof e)throw new TypeError("argument must be a Boolean");"number"!=typeof t&&(t=a.Boolean),this._ensure(3),this._buf[this._offset++]=t,this._buf[this._offset++]=1,this._buf[this._offset++]=e?255:0},f.prototype.writeString=function(e,t){if("string"!=typeof e)throw new TypeError("argument must be a string (was: "+typeof e+")");"number"!=typeof t&&(t=a.OctetString);var r=n.byteLength(e);this.writeByte(t),this.writeLength(r),r&&(this._ensure(r),this._buf.write(e,this._offset),this._offset+=r)},f.prototype.writeBuffer=function(e,t){if("number"!=typeof t)throw new TypeError("tag must be a number");if(!n.isBuffer(e))throw new TypeError("argument must be a buffer");this.writeByte(t),this.writeLength(e.length),this._ensure(e.length),e.copy(this._buf,this._offset,0,e.length),this._offset+=e.length},f.prototype.writeStringArray=function(e){if(!e instanceof Array)throw new TypeError("argument must be an Array[String]");var t=this;e.forEach((function(e){t.writeString(e)}))},f.prototype.writeOID=function(e,t){if("string"!=typeof e)throw new TypeError("argument must be a string");if("number"!=typeof t&&(t=a.OID),!/^([0-9]+\.){3,}[0-9]+$/.test(e))throw new Error("argument is not a valid OID string");var r=e.split("."),i=[];i.push(40*parseInt(r[0],10)+parseInt(r[1],10)),r.slice(2).forEach((function(e){!function(e,t){t<128?e.push(t):t<16384?(e.push(t>>>7|128),e.push(127&t)):t<2097152?(e.push(t>>>14|128),e.push(255&(t>>>7|128)),e.push(127&t)):t<268435456?(e.push(t>>>21|128),e.push(255&(t>>>14|128)),e.push(255&(t>>>7|128)),e.push(127&t)):(e.push(255&(t>>>28|128)),e.push(255&(t>>>21|128)),e.push(255&(t>>>14|128)),e.push(255&(t>>>7|128)),e.push(127&t))}(i,parseInt(e,10))}));var n=this;this._ensure(2+i.length),this.writeByte(t),this.writeLength(i.length),i.forEach((function(e){n.writeByte(e)}))},f.prototype.writeLength=function(e){if("number"!=typeof e)throw new TypeError("argument must be a Number");if(this._ensure(4),e<=127)this._buf[this._offset++]=e;else if(e<=255)this._buf[this._offset++]=129,this._buf[this._offset++]=e;else if(e<=65535)this._buf[this._offset++]=130,this._buf[this._offset++]=e>>8,this._buf[this._offset++]=e;else{if(!(e<=16777215))throw o("Length too long (> 4 bytes)");this._buf[this._offset++]=131,this._buf[this._offset++]=e>>16,this._buf[this._offset++]=e>>8,this._buf[this._offset++]=e}},f.prototype.startSequence=function(e){"number"!=typeof e&&(e=a.Sequence|a.Constructor),this.writeByte(e),this._seq.push(this._offset),this._ensure(3),this._offset+=3},f.prototype.endSequence=function(){var e=this._seq.pop(),t=e+3,r=this._offset-t;if(r<=127)this._shift(t,r,-2),this._buf[e]=r;else if(r<=255)this._shift(t,r,-1),this._buf[e]=129,this._buf[e+1]=r;else if(r<=65535)this._buf[e]=130,this._buf[e+1]=r>>8,this._buf[e+2]=r;else{if(!(r<=16777215))throw o("Sequence too long");this._shift(t,r,1),this._buf[e]=131,this._buf[e+1]=r>>16,this._buf[e+2]=r>>8,this._buf[e+3]=r}},f.prototype._shift=function(e,t,r){i.ok(void 0!==e),i.ok(void 0!==t),i.ok(r),this._buf.copy(this._buf,e+r,e,e+t),this._offset+=r},f.prototype._ensure=function(e){if(i.ok(e),this._size-this._offset{"%%"!==e&&(i++,"%c"===e&&(n=i))}),t.splice(n,0,r)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}!e&&void 0!==i&&"env"in i&&(e=i.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.exports=r(237)(t);const{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}).call(this,r(4))},function(e,t,r){e.exports=function(e){function t(e){let t=0;for(let r=0;r{if("%%"===r)return r;s++;const a=i.formatters[n];if("function"==typeof a){const i=e[s];r=a.call(t,i),e.splice(s,1),s--}return r}),i.formatArgs.call(t,e),(t.log||i.log).apply(t,e)}return o.namespace=e,o.enabled=i.enabled(e),o.useColors=i.useColors(),o.color=t(e),o.destroy=n,o.extend=a,"function"==typeof i.init&&i.init(o),i.instances.push(o),o}function n(){const e=i.instances.indexOf(this);return-1!==e&&(i.instances.splice(e,1),!0)}function a(e,t){const r=i(this.namespace+(void 0===t?":":t)+e);return r.log=this.log,r}function o(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return i.debug=i,i.default=i,i.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},i.disable=function(){const e=[...i.names.map(o),...i.skips.map(o).map(e=>"-"+e)].join(",");return i.enable(""),e},i.enable=function(e){let t;i.save(e),i.names=[],i.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),n=r.length;for(t=0;t{i[t]=e[t]}),i.instances=[],i.names=[],i.skips=[],i.formatters={},i.selectColor=t,i.enable(i.load()),i}},function(e,t){var r=1e3,i=60*r,n=60*i,a=24*n,o=7*a,s=365.25*a;function f(e,t,r,i){var n=t>=1.5*r;return Math.round(e/r)+" "+i+(n?"s":"")}e.exports=function(e,t){t=t||{};var c=typeof e;if("string"===c&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!t)return;var f=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return f*s;case"weeks":case"week":case"w":return f*o;case"days":case"day":case"d":return f*a;case"hours":case"hour":case"hrs":case"hr":case"h":return f*n;case"minutes":case"minute":case"mins":case"min":case"m":return f*i;case"seconds":case"second":case"secs":case"sec":case"s":return f*r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return f;default:return}}(e);if("number"===c&&isFinite(e))return t.long?function(e){var t=Math.abs(e);if(t>=a)return f(e,t,a,"day");if(t>=n)return f(e,t,n,"hour");if(t>=i)return f(e,t,i,"minute");if(t>=r)return f(e,t,r,"second");return e+" ms"}(e):function(e){var t=Math.abs(e);if(t>=a)return Math.round(e/a)+"d";if(t>=n)return Math.round(e/n)+"h";if(t>=i)return Math.round(e/i)+"m";if(t>=r)return Math.round(e/r)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},function(e,t,r){"use strict";const i=r(74);e.exports=function(e,t){return new i(t,"pkcs1-private-pem",{signingScheme:"pkcs1-sha1"}).sign(e)}},function(e,t,r){"use strict";const i=r(10),n=r(241);e.exports=function(e){const t=i.createHash("sha256");t.update(e);const r=t.digest().toString("hex").slice(0,32);return n(r)}},function(e,t,r){"use strict";const i="a".charCodeAt(0)-"0".charCodeAt(0),n="k".charCodeAt(0)-"a".charCodeAt(0);e.exports=function(e){return Array.from(e).map(e=>{if(e>="0"&&e<="9")return String.fromCharCode(e.charCodeAt(0)+i);if(e>="a"&&e<="f")return String.fromCharCode(e.charCodeAt(0)+n);throw new Error(`invalid char: ${e}`)}).join("")}},function(e,t,r){(function(e){function r(e,t){for(var r=0,i=e.length-1;i>=0;i--){var n=e[i];"."===n?e.splice(i,1):".."===n?(e.splice(i,1),r++):r&&(e.splice(i,1),r--)}if(t)for(;r--;r)e.unshift("..");return e}function i(e,t){if(e.filter)return e.filter(t);for(var r=[],i=0;i=-1&&!n;a--){var o=a>=0?arguments[a]:e.cwd();if("string"!=typeof o)throw new TypeError("Arguments to path.resolve must be strings");o&&(t=o+"/"+t,n="/"===o.charAt(0))}return(n?"/":"")+(t=r(i(t.split("/"),(function(e){return!!e})),!n).join("/"))||"."},t.normalize=function(e){var a=t.isAbsolute(e),o="/"===n(e,-1);return(e=r(i(e.split("/"),(function(e){return!!e})),!a).join("/"))||a||(e="."),e&&o&&(e+="/"),(a?"/":"")+e},t.isAbsolute=function(e){return"/"===e.charAt(0)},t.join=function(){var e=Array.prototype.slice.call(arguments,0);return t.normalize(i(e,(function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e})).join("/"))},t.relative=function(e,r){function i(e){for(var t=0;t=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=t.resolve(e).substr(1),r=t.resolve(r).substr(1);for(var n=i(e.split("/")),a=i(r.split("/")),o=Math.min(n.length,a.length),s=o,f=0;f=1;--a)if(47===(t=e.charCodeAt(a))){if(!n){i=a;break}}else n=!1;return-1===i?r?"/":".":r&&1===i?"/":e.slice(0,i)},t.basename=function(e,t){var r=function(e){"string"!=typeof e&&(e+="");var t,r=0,i=-1,n=!0;for(t=e.length-1;t>=0;--t)if(47===e.charCodeAt(t)){if(!n){r=t+1;break}}else-1===i&&(n=!1,i=t+1);return-1===i?"":e.slice(r,i)}(e);return t&&r.substr(-1*t.length)===t&&(r=r.substr(0,r.length-t.length)),r},t.extname=function(e){"string"!=typeof e&&(e+="");for(var t=-1,r=0,i=-1,n=!0,a=0,o=e.length-1;o>=0;--o){var s=e.charCodeAt(o);if(47!==s)-1===i&&(n=!1,i=o+1),46===s?-1===t?t=o:1!==a&&(a=1):-1!==t&&(a=-1);else if(!n){r=o+1;break}}return-1===t||-1===i||0===a||1===a&&t===i-1&&t===r+1?"":e.slice(t,i)};var n="b"==="ab".substr(-1)?function(e,t,r){return e.substr(t,r)}:function(e,t,r){return t<0&&(t=e.length+t),e.substr(t,r)}}).call(this,r(4))},function(e,t,r){(function(e,i){var n=r(37),a=r(68),o=r(244),s=r(71),f=r(14),c=r(15).EventEmitter,u=r(6).Transform,h=r(6).PassThrough,d=r(6).Writable;function l(e,t,r){"function"==typeof t&&(r=t,t=null),null==t&&(t={}),null==t.autoClose&&(t.autoClose=!1),null==t.lazyEntries&&(t.lazyEntries=!1),null==t.decodeStrings&&(t.decodeStrings=!0),null==t.validateEntrySizes&&(t.validateEntrySizes=!0),null==t.strictFileNames&&(t.strictFileNames=!1),null==r&&(r=O),n.fstat(e,(function(i,n){if(i)return r(i);p(o.createFromFd(e,{autoClose:!0}),n.size,t,r)}))}function p(e,t,r,i){"function"==typeof r&&(i=r,r=null),null==r&&(r={}),null==r.autoClose&&(r.autoClose=!0),null==r.lazyEntries&&(r.lazyEntries=!1),null==r.decodeStrings&&(r.decodeStrings=!0);var n=!!r.decodeStrings;if(null==r.validateEntrySizes&&(r.validateEntrySizes=!0),null==r.strictFileNames&&(r.strictFileNames=!1),null==i&&(i=O),"number"!=typeof t)throw new Error("expected totalSize parameter to be a number");if(t>Number.MAX_SAFE_INTEGER)throw new Error("zip file too large. only file sizes up to 2^52 are supported due to JavaScript's Number type being an IEEE 754 double.");e.ref();var a=Math.min(65557,t),o=k(a),s=t-o.length;w(e,o,0,a,s,(function(f){if(f)return i(f);for(var c=a-22;c>=0;c-=1)if(101010256===o.readUInt32LE(c)){var u=o.slice(c),h=u.readUInt16LE(4);if(0!==h)return i(new Error("multi-disk zip files are not supported: found disk number: "+h));var d=u.readUInt16LE(10),l=u.readUInt32LE(16),p=u.readUInt16LE(20),b=u.length-22;if(p!==b)return i(new Error("invalid comment length. expected: "+b+". found: "+p));var v=n?x(u,22,u.length,!1):u.slice(22);if(65535!==d&&4294967295!==l)return i(null,new m(e,l,t,d,v,r.autoClose,r.lazyEntries,n,r.validateEntrySizes,r.strictFileNames));var g=k(20),y=s+c-g.length;return void w(e,g,0,g.length,y,(function(a){if(a)return i(a);if(117853008!==g.readUInt32LE(0))return i(new Error("invalid zip64 end of central directory locator signature"));var o=I(g,8),s=k(56);w(e,s,0,s.length,o,(function(a){return a?i(a):101075792!==s.readUInt32LE(0)?i(new Error("invalid zip64 end of central directory record signature")):(d=I(s,32),l=I(s,48),i(null,new m(e,l,t,d,v,r.autoClose,r.lazyEntries,n,r.validateEntrySizes,r.strictFileNames)))}))}))}i(new Error("end of central directory record signature not found"))}))}function m(e,t,r,i,n,a,o,s,f,u){var h=this;c.call(h),h.reader=e,h.reader.on("error",(function(e){v(h,e)})),h.reader.once("close",(function(){h.emit("close")})),h.readEntryCursor=t,h.fileSize=r,h.entryCount=i,h.comment=n,h.entriesRead=0,h.autoClose=!!a,h.lazyEntries=!!o,h.decodeStrings=!!s,h.validateEntrySizes=!!f,h.strictFileNames=!!u,h.isOpen=!0,h.emittedError=!1,h.lazyEntries||h._readEntry()}function b(e,t){e.autoClose&&e.close(),v(e,t)}function v(e,t){e.emittedError||(e.emittedError=!0,e.emit("error",t))}function g(){}function y(e,t){return new Date(1980+(e>>9&127),(e>>5&15)-1,31&e,t>>11&31,t>>5&63,2*(31&t),0)}function _(e){return-1!==e.indexOf("\\")?"invalid characters in fileName: "+e:/^[a-zA-Z]:/.test(e)||/^\//.test(e)?"absolute path: "+e:-1!==e.split("/").indexOf("..")?"invalid relative path: "+e:null}function w(t,r,i,n,a,o){if(0===n)return e((function(){o(null,k(0))}));t.read(r,i,n,a,(function(e,t){return e?o(e):to.length)return b(t,new Error("extra field length exceeds extra field buffer size"));var l=k(u);o.copy(l,0,h,d),i.extraFields.push({id:c,data:l}),f=d}if(i.fileComment=t.decodeStrings?x(r,a,a+i.fileCommentLength,n):r.slice(a,a+i.fileCommentLength),i.comment=i.fileComment,t.readEntryCursor+=r.length,t.entriesRead+=1,4294967295===i.uncompressedSize||4294967295===i.compressedSize||4294967295===i.relativeOffsetOfLocalHeader){var p=null;for(f=0;fp.length)return b(t,new Error("zip64 extended information extra field does not include uncompressed size"));i.uncompressedSize=I(p,m),m+=8}if(4294967295===i.compressedSize){if(m+8>p.length)return b(t,new Error("zip64 extended information extra field does not include compressed size"));i.compressedSize=I(p,m),m+=8}if(4294967295===i.relativeOffsetOfLocalHeader){if(m+8>p.length)return b(t,new Error("zip64 extended information extra field does not include relative header offset"));i.relativeOffsetOfLocalHeader=I(p,m),m+=8}}if(t.decodeStrings)for(f=0;ft.compressedSize)throw new Error("options.start > entry.compressedSize")}if(null!=r.end){if((s=r.end)<0)throw new Error("options.end < 0");if(s>t.compressedSize)throw new Error("options.end > entry.compressedSize");if(sn.fileSize)return i(new Error("file data overflows file bounds: "+m+" + "+t.compressedSize+" > "+n.fileSize));var v=n.reader.createReadStream({start:m+o,end:m+s}),g=v;if(h){var y=!1,_=a.createInflateRaw();v.on("error",(function(t){e((function(){y||_.emit("error",t)}))})),v.pipe(_),n.validateEntrySizes?(g=new E(t.uncompressedSize),_.on("error",(function(t){e((function(){y||g.emit("error",t)}))})),_.pipe(g)):g=_,g.destroy=function(){y=!0,_!==g&&_.unpipe(g),v.unpipe(_),v.destroy()}}i(null,g)}finally{n.reader.unref()}}))},g.prototype.getLastModDate=function(){return y(this.lastModFileDate,this.lastModFileTime)},g.prototype.isEncrypted=function(){return 0!=(1&this.generalPurposeBitFlag)},g.prototype.isCompressed=function(){return 8===this.compressionMethod},f.inherits(E,u),E.prototype._transform=function(e,t,r){if(this.actualByteCount+=e.length,this.actualByteCount>this.expectedByteCount){var i="too many bytes in the stream. expected "+this.expectedByteCount+". got at least "+this.actualByteCount;return r(new Error(i))}r(null,e)},E.prototype._flush=function(e){if(this.actualByteCount0)){if(e.refCount<0)throw new Error("invalid unref");e.close((function(t){if(t)return e.emit("error",t);e.emit("close")}))}},S.prototype.createReadStream=function(t){var r=t.start,i=t.end;if(r===i){var n=new h;return e((function(){n.end()})),n}var a=this._readStreamForRange(r,i),o=!1,s=new P(this);a.on("error",(function(t){e((function(){o||s.emit("error",t)}))})),s.destroy=function(){a.unpipe(s),s.unref(),a.destroy()};var f=new E(i-r);return s.on("error",(function(t){e((function(){o||f.emit("error",t)}))})),f.destroy=function(){o=!0,s.unpipe(f),s.destroy()},a.pipe(s).pipe(f)},S.prototype._readStreamForRange=function(e,t){throw new Error("not implemented")},S.prototype.read=function(e,t,r,i,n){var a=this.createReadStream({start:i,end:i+r}),o=new d,s=0;o._write=function(r,i,n){r.copy(e,t+s,0,r.length),s+=r.length,n()},o.on("finish",n),a.on("error",(function(e){n(e)})),a.pipe(o)},S.prototype.close=function(t){e(t)},f.inherits(P,h),P.prototype._flush=function(e){this.unref(),e()},P.prototype.unref=function(e){this.unreffedYet||(this.unreffedYet=!0,this.context.unref())};var k,A="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ";function x(e,t,r,i){if(i)return e.toString("utf8",t,r);for(var n="",a=t;a0)){if(e.refCount<0)throw new Error("invalid unref");e.autoClose&&n.close(e.fd,(function(t){t?e.emit("error",t):e.emit("close")}))}},a.inherits(l,s),l.prototype._read=function(t){var r=this;if(!r.destroyed){var i=Math.min(r._readableState.highWaterMark,t);if(null!=r.endOffset&&(i=Math.min(i,r.endOffset-r.pos)),i<=0)return r.destroyed=!0,r.push(null),void r.context.unref();r.context.pend.go((function(t){if(r.destroyed)return t();var a=new e(i);n.read(r.context.fd,a,0,i,r.pos,(function(e,i){e?r.destroy(e):0===i?(r.destroyed=!0,r.push(null),r.context.unref()):(r.pos+=i,r.push(a.slice(0,i))),t()}))}))}},l.prototype.destroy=function(e){this.destroyed||(e=e||new Error("stream destroyed"),this.destroyed=!0,this.emit("error",e),this.context.unref())},a.inherits(p,f),p.prototype._write=function(e,t,r){var i=this;if(!i.destroyed){if(i.pos+e.length>i.endOffset){var a=new Error("maximum file length exceeded");return a.code="ETOOBIG",i.destroy(),void r(a)}i.context.pend.go((function(t){if(i.destroyed)return t();n.write(i.context.fd,e,0,e.length,i.pos,(function(e,n){e?(i.destroy(),t(),r(e)):(i.bytesWritten+=n,i.pos+=n,i.emit("progress"),t(),r())}))}))}},p.prototype.destroy=function(){this.destroyed||(this.destroyed=!0,this.context.unref())},a.inherits(m,h),m.prototype.read=function(e,t,r,n,a){var o=n+r,s=o-this.buffer.length,f=s>0?s:r;this.buffer.copy(e,t,n,o),i((function(){a(null,f)}))},m.prototype.write=function(e,t,r,n,a){e.copy(this.buffer,n,t,t+r),i((function(){a(null,r,e)}))},m.prototype.createReadStream=function(e){var t=new c(e=e||{});t.destroyed=!1,t.start=e.start||0,t.endOffset=e.end,t.pos=t.endOffset||this.buffer.length;for(var r=this.buffer.slice(t.start,t.pos),i=0;;){var n=i+this.maxChunkSize;if(n>=r.length){ir.endOffset){var o=new Error("maximum file length exceeded");return o.code="ETOOBIG",r.destroyed=!0,void n(o)}e.copy(t.buffer,r.pos,0,e.length),r.bytesWritten+=e.length,r.pos=a,r.emit("progress"),n()}},r.destroy=function(){r.destroyed=!0},r},m.prototype.ref=function(){this.refCount+=1},m.prototype.unref=function(){if(this.refCount-=1,this.refCount<0)throw new Error("invalid unref")}}).call(this,r(1).Buffer,r(27).setImmediate)},function(e,t){function r(){this.pending=0,this.max=1/0,this.listeners=[],this.waiting=[],this.error=null}function i(e){e.pending+=1;var t=!1;return function(i){if(t)throw new Error("callback called twice");if(t=!0,e.error=e.error||i,e.pending-=1,e.waiting.length>0&&e.pending!0,c=()=>!0;"function"==typeof t.relativePath&&(r=t.relativePath),"function"==typeof t.maxFileSize&&(c=t.maxFileSize);const u=new i({schemaId:"id",meta:!1,allErrors:!0,unknownFormats:!0,errorDataPath:"property",formats:{"http-url":e=>s(e,!0),"https-url":e=>s(e),"relative-path":r}});u.addMetaSchema(n),u._opts.defaultMeta=n.id,u.removeKeyword("propertyNames"),u.removeKeyword("contains"),u.removeKeyword("const"),u.removeKeyword("if"),u.removeKeyword("then"),u.removeKeyword("else"),u.addKeyword("maxFileSize",{validate:function e(t,r){const i=a.parse(t),n=c(i,r);return n||(e.errors=[{keyword:"maxFileSize",message:`file size should be <= ${t}`,params:{limit:i}}]),n}});const h=u.compile(o);return{valid:h(e),errors:f(h.errors)}}},function(e,t,r){"use strict";var i=r(250),n=r(57),a=r(254),o=r(108),s=r(109),f=r(111),c=r(255),u=r(276),h=r(19);e.exports=v,v.prototype.validate=function(e,t){var r;if("string"==typeof e){if(!(r=this.getSchema(e)))throw new Error('no schema with key or ref "'+e+'"')}else{var i=this._addSchema(e);r=i.validate||this._compile(i)}var n=r(t);!0!==r.$async&&(this.errors=r.errors);return n},v.prototype.compile=function(e,t){var r=this._addSchema(e,void 0,t);return r.validate||this._compile(r)},v.prototype.addSchema=function(e,t,r,i){if(Array.isArray(e)){for(var a=0;a=0?{index:i,compiling:!0}:(i=this._compilations.length,this._compilations[i]={schema:e,root:t,baseId:r},{index:i,compiling:!1})}function d(e,t,r){var i=l.call(this,e,t,r);i>=0&&this._compilations.splice(i,1)}function l(e,t,r){for(var i=0;i4?9:0)}function J(e){for(var t=e.length;--t>=0;)e[t]=0}function ee(e){var t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),0!==r&&(n.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))}function te(e,t){a._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,ee(e.strm)}function re(e,t){e.pending_buf[e.pending++]=t}function ie(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function ne(e,t){var r,i,n=e.max_chain_length,a=e.strstart,o=e.prev_length,s=e.nice_match,f=e.strstart>e.w_size-N?e.strstart-(e.w_size-N):0,c=e.window,u=e.w_mask,h=e.prev,d=e.strstart+B,l=c[a+o-1],p=c[a+o];e.prev_length>=e.good_match&&(n>>=2),s>e.lookahead&&(s=e.lookahead);do{if(c[(r=t)+o]===p&&c[r+o-1]===l&&c[r]===c[a]&&c[++r]===c[a+1]){a+=2,r++;do{}while(c[++a]===c[++r]&&c[++a]===c[++r]&&c[++a]===c[++r]&&c[++a]===c[++r]&&c[++a]===c[++r]&&c[++a]===c[++r]&&c[++a]===c[++r]&&c[++a]===c[++r]&&ao){if(e.match_start=t,o=i,i>=s)break;l=c[a+o-1],p=c[a+o]}}}while((t=h[t&u])>f&&0!=--n);return o<=e.lookahead?o:e.lookahead}function ae(e){var t,r,i,a,f,c,u,h,d,l,p=e.w_size;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=p+(p-N)){n.arraySet(e.window,e.window,p,p,0),e.match_start-=p,e.strstart-=p,e.block_start-=p,t=r=e.hash_size;do{i=e.head[--t],e.head[t]=i>=p?i-p:0}while(--r);t=r=p;do{i=e.prev[--t],e.prev[t]=i>=p?i-p:0}while(--r);a+=p}if(0===e.strm.avail_in)break;if(c=e.strm,u=e.window,h=e.strstart+e.lookahead,d=a,l=void 0,(l=c.avail_in)>d&&(l=d),r=0===l?0:(c.avail_in-=l,n.arraySet(u,c.input,c.next_in,l,h),1===c.state.wrap?c.adler=o(c.adler,u,l,h):2===c.state.wrap&&(c.adler=s(c.adler,u,l,h)),c.next_in+=l,c.total_in+=l,l),e.lookahead+=r,e.lookahead+e.insert>=L)for(f=e.strstart-e.insert,e.ins_h=e.window[f],e.ins_h=(e.ins_h<=L&&(e.ins_h=(e.ins_h<=L)if(i=a._tr_tally(e,e.strstart-e.match_start,e.match_length-L),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=L){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<=L&&(e.ins_h=(e.ins_h<4096)&&(e.match_length=L-1)),e.prev_length>=L&&e.match_length<=e.prev_length){n=e.strstart+e.lookahead-L,i=a._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-L),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=n&&(e.ins_h=(e.ins_h<15&&(s=2,i-=16),a<1||a>x||r!==A||i<8||i>15||t<0||t>9||o<0||o>S)return X(e,b);8===i&&(i=9);var f=new ce;return e.state=f,f.strm=e,f.wrap=s,f.gzhead=null,f.w_bits=i,f.w_size=1<e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(ae(e),0===e.lookahead&&t===c)return Z;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var i=e.block_start+r;if((0===e.strstart||e.strstart>=i)&&(e.lookahead=e.strstart-i,e.strstart=i,te(e,!1),0===e.strm.avail_out))return Z;if(e.strstart-e.block_start>=e.w_size-N&&(te(e,!1),0===e.strm.avail_out))return Z}return e.insert=0,t===d?(te(e,!0),0===e.strm.avail_out?V:Y):(e.strstart>e.block_start&&(te(e,!1),e.strm.avail_out),Z)})),new fe(4,4,8,4,oe),new fe(4,5,16,8,oe),new fe(4,6,32,32,oe),new fe(4,4,16,16,se),new fe(8,16,32,32,se),new fe(8,16,128,128,se),new fe(8,32,128,256,se),new fe(32,128,258,1024,se),new fe(32,258,258,4096,se)],t.deflateInit=function(e,t){return de(e,t,A,I,O,P)},t.deflateInit2=de,t.deflateReset=he,t.deflateResetKeep=ue,t.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?b:(e.state.gzhead=t,p):b},t.deflate=function(e,t){var r,n,o,f;if(!e||!e.state||t>l||t<0)return e?X(e,b):b;if(n=e.state,!e.output||!e.input&&0!==e.avail_in||n.status===H&&t!==d)return X(e,0===e.avail_out?g:b);if(n.strm=e,r=n.last_flush,n.last_flush=t,n.status===j)if(2===n.wrap)e.adler=0,re(n,31),re(n,139),re(n,8),n.gzhead?(re(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),re(n,255&n.gzhead.time),re(n,n.gzhead.time>>8&255),re(n,n.gzhead.time>>16&255),re(n,n.gzhead.time>>24&255),re(n,9===n.level?2:n.strategy>=w||n.level<2?4:0),re(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(re(n,255&n.gzhead.extra.length),re(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=s(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=z):(re(n,0),re(n,0),re(n,0),re(n,0),re(n,0),re(n,9===n.level?2:n.strategy>=w||n.level<2?4:0),re(n,W),n.status=K);else{var v=A+(n.w_bits-8<<4)<<8;v|=(n.strategy>=w||n.level<2?0:n.level<6?1:6===n.level?2:3)<<6,0!==n.strstart&&(v|=F),v+=31-v%31,n.status=K,ie(n,v),0!==n.strstart&&(ie(n,e.adler>>>16),ie(n,65535&e.adler)),e.adler=1}if(n.status===z)if(n.gzhead.extra){for(o=n.pending;n.gzindex<(65535&n.gzhead.extra.length)&&(n.pending!==n.pending_buf_size||(n.gzhead.hcrc&&n.pending>o&&(e.adler=s(e.adler,n.pending_buf,n.pending-o,o)),ee(e),o=n.pending,n.pending!==n.pending_buf_size));)re(n,255&n.gzhead.extra[n.gzindex]),n.gzindex++;n.gzhead.hcrc&&n.pending>o&&(e.adler=s(e.adler,n.pending_buf,n.pending-o,o)),n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=U)}else n.status=U;if(n.status===U)if(n.gzhead.name){o=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>o&&(e.adler=s(e.adler,n.pending_buf,n.pending-o,o)),ee(e),o=n.pending,n.pending===n.pending_buf_size)){f=1;break}f=n.gzindexo&&(e.adler=s(e.adler,n.pending_buf,n.pending-o,o)),0===f&&(n.gzindex=0,n.status=q)}else n.status=q;if(n.status===q)if(n.gzhead.comment){o=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>o&&(e.adler=s(e.adler,n.pending_buf,n.pending-o,o)),ee(e),o=n.pending,n.pending===n.pending_buf_size)){f=1;break}f=n.gzindexo&&(e.adler=s(e.adler,n.pending_buf,n.pending-o,o)),0===f&&(n.status=$)}else n.status=$;if(n.status===$&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&ee(e),n.pending+2<=n.pending_buf_size&&(re(n,255&e.adler),re(n,e.adler>>8&255),e.adler=0,n.status=K)):n.status=K),0!==n.pending){if(ee(e),0===e.avail_out)return n.last_flush=-1,p}else if(0===e.avail_in&&Q(t)<=Q(r)&&t!==d)return X(e,g);if(n.status===H&&0!==e.avail_in)return X(e,g);if(0!==e.avail_in||0!==n.lookahead||t!==c&&n.status!==H){var y=n.strategy===w?function(e,t){for(var r;;){if(0===e.lookahead&&(ae(e),0===e.lookahead)){if(t===c)return Z;break}if(e.match_length=0,r=a._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(te(e,!1),0===e.strm.avail_out))return Z}return e.insert=0,t===d?(te(e,!0),0===e.strm.avail_out?V:Y):e.last_lit&&(te(e,!1),0===e.strm.avail_out)?Z:G}(n,t):n.strategy===E?function(e,t){for(var r,i,n,o,s=e.window;;){if(e.lookahead<=B){if(ae(e),e.lookahead<=B&&t===c)return Z;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=L&&e.strstart>0&&(i=s[n=e.strstart-1])===s[++n]&&i===s[++n]&&i===s[++n]){o=e.strstart+B;do{}while(i===s[++n]&&i===s[++n]&&i===s[++n]&&i===s[++n]&&i===s[++n]&&i===s[++n]&&i===s[++n]&&i===s[++n]&&ne.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=L?(r=a._tr_tally(e,1,e.match_length-L),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=a._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(te(e,!1),0===e.strm.avail_out))return Z}return e.insert=0,t===d?(te(e,!0),0===e.strm.avail_out?V:Y):e.last_lit&&(te(e,!1),0===e.strm.avail_out)?Z:G}(n,t):i[n.level].func(n,t);if(y!==V&&y!==Y||(n.status=H),y===Z||y===V)return 0===e.avail_out&&(n.last_flush=-1),p;if(y===G&&(t===u?a._tr_align(n):t!==l&&(a._tr_stored_block(n,0,0,!1),t===h&&(J(n.head),0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),ee(e),0===e.avail_out))return n.last_flush=-1,p}return t!==d?p:n.wrap<=0?m:(2===n.wrap?(re(n,255&e.adler),re(n,e.adler>>8&255),re(n,e.adler>>16&255),re(n,e.adler>>24&255),re(n,255&e.total_in),re(n,e.total_in>>8&255),re(n,e.total_in>>16&255),re(n,e.total_in>>24&255)):(ie(n,e.adler>>>16),ie(n,65535&e.adler)),ee(e),n.wrap>0&&(n.wrap=-n.wrap),0!==n.pending?p:m)},t.deflateEnd=function(e){var t;return e&&e.state?(t=e.state.status)!==j&&t!==z&&t!==U&&t!==q&&t!==$&&t!==K&&t!==H?X(e,b):(e.state=null,t===K?X(e,v):p):b},t.deflateSetDictionary=function(e,t){var r,i,a,s,f,c,u,h,d=t.length;if(!e||!e.state)return b;if(2===(s=(r=e.state).wrap)||1===s&&r.status!==j||r.lookahead)return b;for(1===s&&(e.adler=o(e.adler,t,d,0)),r.wrap=0,d>=r.w_size&&(0===s&&(J(r.head),r.strstart=0,r.block_start=0,r.insert=0),h=new n.Buf8(r.w_size),n.arraySet(h,t,d-r.w_size,r.w_size,0),t=h,d=r.w_size),f=e.avail_in,c=e.next_in,u=e.input,e.avail_in=d,e.next_in=0,e.input=t,ae(r);r.lookahead>=L;){i=r.strstart,a=r.lookahead-(L-1);do{r.ins_h=(r.ins_h<=0;)e[t]=0}var c=0,u=1,h=2,d=29,l=256,p=l+1+d,m=30,b=19,v=2*p+1,g=15,y=16,_=7,w=256,E=16,S=17,P=18,k=[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],A=[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],x=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],I=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],O=new Array(2*(p+2));f(O);var M=new Array(2*m);f(M);var R=new Array(512);f(R);var T=new Array(256);f(T);var D=new Array(d);f(D);var C,L,B,N=new Array(m);function F(e,t,r,i,n){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=i,this.max_length=n,this.has_stree=e&&e.length}function j(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function z(e){return e<256?R[e]:R[256+(e>>>7)]}function U(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function q(e,t,r){e.bi_valid>y-r?(e.bi_buf|=t<>y-e.bi_valid,e.bi_valid+=r-y):(e.bi_buf|=t<>>=1,r<<=1}while(--t>0);return r>>>1}function H(e,t,r){var i,n,a=new Array(g+1),o=0;for(i=1;i<=g;i++)a[i]=o=o+r[i-1]<<1;for(n=0;n<=t;n++){var s=e[2*n+1];0!==s&&(e[2*n]=K(a[s]++,s))}}function Z(e){var t;for(t=0;t8?U(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function V(e,t,r,i){var n=2*t,a=2*r;return e[n]>1;r>=1;r--)Y(e,a,r);n=f;do{r=e.heap[1],e.heap[1]=e.heap[e.heap_len--],Y(e,a,1),i=e.heap[1],e.heap[--e.heap_max]=r,e.heap[--e.heap_max]=i,a[2*n]=a[2*r]+a[2*i],e.depth[n]=(e.depth[r]>=e.depth[i]?e.depth[r]:e.depth[i])+1,a[2*r+1]=a[2*i+1]=n,e.heap[1]=n++,Y(e,a,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var r,i,n,a,o,s,f=t.dyn_tree,c=t.max_code,u=t.stat_desc.static_tree,h=t.stat_desc.has_stree,d=t.stat_desc.extra_bits,l=t.stat_desc.extra_base,p=t.stat_desc.max_length,m=0;for(a=0;a<=g;a++)e.bl_count[a]=0;for(f[2*e.heap[e.heap_max]+1]=0,r=e.heap_max+1;rp&&(a=p,m++),f[2*i+1]=a,i>c||(e.bl_count[a]++,o=0,i>=l&&(o=d[i-l]),s=f[2*i],e.opt_len+=s*(a+o),h&&(e.static_len+=s*(u[2*i+1]+o)));if(0!==m){do{for(a=p-1;0===e.bl_count[a];)a--;e.bl_count[a]--,e.bl_count[a+1]+=2,e.bl_count[p]--,m-=2}while(m>0);for(a=p;0!==a;a--)for(i=e.bl_count[a];0!==i;)(n=e.heap[--r])>c||(f[2*n+1]!==a&&(e.opt_len+=(a-f[2*n+1])*f[2*n],f[2*n+1]=a),i--)}}(e,t),H(a,c,e.bl_count)}function Q(e,t,r){var i,n,a=-1,o=t[1],s=0,f=7,c=4;for(0===o&&(f=138,c=3),t[2*(r+1)+1]=65535,i=0;i<=r;i++)n=o,o=t[2*(i+1)+1],++s>=7;i0?(e.strm.data_type===s&&(e.strm.data_type=function(e){var t,r=4093624447;for(t=0;t<=31;t++,r>>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return a;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return o;for(t=32;t=3&&0===e.bl_tree[2*I[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),f=e.opt_len+3+7>>>3,(c=e.static_len+3+7>>>3)<=f&&(f=c)):f=c=r+5,r+4<=f&&-1!==t?te(e,t,r,i):e.strategy===n||c===f?(q(e,(u<<1)+(i?1:0),3),W(e,O,M)):(q(e,(h<<1)+(i?1:0),3),function(e,t,r,i){var n;for(q(e,t-257,5),q(e,r-1,5),q(e,i-4,4),n=0;n>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&r,e.last_lit++,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(T[r]+l+1)]++,e.dyn_dtree[2*z(t)]++),e.last_lit===e.lit_bufsize-1},t._tr_align=function(e){q(e,u<<1,3),$(e,w,O),function(e){16===e.bi_valid?(U(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},function(e,t,r){"use strict";e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},function(e,t,r){"use strict";var i=r(30),n=r(69),a=r(70),o=r(146),s=r(147),f=0,c=1,u=2,h=4,d=5,l=6,p=0,m=1,b=2,v=-2,g=-3,y=-4,_=-5,w=8,E=1,S=2,P=3,k=4,A=5,x=6,I=7,O=8,M=9,R=10,T=11,D=12,C=13,L=14,B=15,N=16,F=17,j=18,z=19,U=20,q=21,$=22,K=23,H=24,Z=25,G=26,V=27,Y=28,W=29,X=30,Q=31,J=32,ee=852,te=592,re=15;function ie(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function ne(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new i.Buf16(320),this.work=new i.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function ae(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=E,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new i.Buf32(ee),t.distcode=t.distdyn=new i.Buf32(te),t.sane=1,t.back=-1,p):v}function oe(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,ae(e)):v}function se(e,t){var r,i;return e&&e.state?(i=e.state,t<0?(r=0,t=-t):(r=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?v:(null!==i.window&&i.wbits!==t&&(i.window=null),i.wrap=r,i.wbits=t,oe(e))):v}function fe(e,t){var r,i;return e?(i=new ne,e.state=i,i.window=null,(r=se(e,t))!==p&&(e.state=null),r):v}var ce,ue,he=!0;function de(e){if(he){var t;for(ce=new i.Buf32(512),ue=new i.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(s(c,e.lens,0,288,ce,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;s(u,e.lens,0,32,ue,0,e.work,{bits:5}),he=!1}e.lencode=ce,e.lenbits=9,e.distcode=ue,e.distbits=5}function le(e,t,r,n){var a,o=e.state;return null===o.window&&(o.wsize=1<=o.wsize?(i.arraySet(o.window,t,r-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):((a=o.wsize-o.wnext)>n&&(a=n),i.arraySet(o.window,t,r-n,a,o.wnext),(n-=a)?(i.arraySet(o.window,t,r-n,n,0),o.wnext=n,o.whave=o.wsize):(o.wnext+=a,o.wnext===o.wsize&&(o.wnext=0),o.whave>>8&255,r.check=a(r.check,xe,2,0),se=0,fe=0,r.mode=S;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&se)<<8)+(se>>8))%31){e.msg="incorrect header check",r.mode=X;break}if((15&se)!==w){e.msg="unknown compression method",r.mode=X;break}if(fe-=4,Ee=8+(15&(se>>>=4)),0===r.wbits)r.wbits=Ee;else if(Ee>r.wbits){e.msg="invalid window size",r.mode=X;break}r.dmax=1<>8&1),512&r.flags&&(xe[0]=255&se,xe[1]=se>>>8&255,r.check=a(r.check,xe,2,0)),se=0,fe=0,r.mode=P;case P:for(;fe<32;){if(0===ae)break e;ae--,se+=ee[re++]<>>8&255,xe[2]=se>>>16&255,xe[3]=se>>>24&255,r.check=a(r.check,xe,4,0)),se=0,fe=0,r.mode=k;case k:for(;fe<16;){if(0===ae)break e;ae--,se+=ee[re++]<>8),512&r.flags&&(xe[0]=255&se,xe[1]=se>>>8&255,r.check=a(r.check,xe,2,0)),se=0,fe=0,r.mode=A;case A:if(1024&r.flags){for(;fe<16;){if(0===ae)break e;ae--,se+=ee[re++]<>>8&255,r.check=a(r.check,xe,2,0)),se=0,fe=0}else r.head&&(r.head.extra=null);r.mode=x;case x:if(1024&r.flags&&((he=r.length)>ae&&(he=ae),he&&(r.head&&(Ee=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),i.arraySet(r.head.extra,ee,re,he,Ee)),512&r.flags&&(r.check=a(r.check,ee,he,re)),ae-=he,re+=he,r.length-=he),r.length))break e;r.length=0,r.mode=I;case I:if(2048&r.flags){if(0===ae)break e;he=0;do{Ee=ee[re+he++],r.head&&Ee&&r.length<65536&&(r.head.name+=String.fromCharCode(Ee))}while(Ee&&he>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=D;break;case R:for(;fe<32;){if(0===ae)break e;ae--,se+=ee[re++]<>>=7&fe,fe-=7&fe,r.mode=V;break}for(;fe<3;){if(0===ae)break e;ae--,se+=ee[re++]<>>=1)){case 0:r.mode=L;break;case 1:if(de(r),r.mode=U,t===l){se>>>=2,fe-=2;break e}break;case 2:r.mode=F;break;case 3:e.msg="invalid block type",r.mode=X}se>>>=2,fe-=2;break;case L:for(se>>>=7&fe,fe-=7&fe;fe<32;){if(0===ae)break e;ae--,se+=ee[re++]<>>16^65535)){e.msg="invalid stored block lengths",r.mode=X;break}if(r.length=65535&se,se=0,fe=0,r.mode=B,t===l)break e;case B:r.mode=N;case N:if(he=r.length){if(he>ae&&(he=ae),he>oe&&(he=oe),0===he)break e;i.arraySet(te,ee,re,he,ne),ae-=he,re+=he,oe-=he,ne+=he,r.length-=he;break}r.mode=D;break;case F:for(;fe<14;){if(0===ae)break e;ae--,se+=ee[re++]<>>=5,fe-=5,r.ndist=1+(31&se),se>>>=5,fe-=5,r.ncode=4+(15&se),se>>>=4,fe-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=X;break}r.have=0,r.mode=j;case j:for(;r.have>>=3,fe-=3}for(;r.have<19;)r.lens[Ie[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,Pe={bits:r.lenbits},Se=s(f,r.lens,0,19,r.lencode,0,r.work,Pe),r.lenbits=Pe.bits,Se){e.msg="invalid code lengths set",r.mode=X;break}r.have=0,r.mode=z;case z:for(;r.have>>16&255,ge=65535&Ae,!((be=Ae>>>24)<=fe);){if(0===ae)break e;ae--,se+=ee[re++]<>>=be,fe-=be,r.lens[r.have++]=ge;else{if(16===ge){for(ke=be+2;fe>>=be,fe-=be,0===r.have){e.msg="invalid bit length repeat",r.mode=X;break}Ee=r.lens[r.have-1],he=3+(3&se),se>>>=2,fe-=2}else if(17===ge){for(ke=be+3;fe>>=be)),se>>>=3,fe-=3}else{for(ke=be+7;fe>>=be)),se>>>=7,fe-=7}if(r.have+he>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=X;break}for(;he--;)r.lens[r.have++]=Ee}}if(r.mode===X)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=X;break}if(r.lenbits=9,Pe={bits:r.lenbits},Se=s(c,r.lens,0,r.nlen,r.lencode,0,r.work,Pe),r.lenbits=Pe.bits,Se){e.msg="invalid literal/lengths set",r.mode=X;break}if(r.distbits=6,r.distcode=r.distdyn,Pe={bits:r.distbits},Se=s(u,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,Pe),r.distbits=Pe.bits,Se){e.msg="invalid distances set",r.mode=X;break}if(r.mode=U,t===l)break e;case U:r.mode=q;case q:if(ae>=6&&oe>=258){e.next_out=ne,e.avail_out=oe,e.next_in=re,e.avail_in=ae,r.hold=se,r.bits=fe,o(e,ue),ne=e.next_out,te=e.output,oe=e.avail_out,re=e.next_in,ee=e.input,ae=e.avail_in,se=r.hold,fe=r.bits,r.mode===D&&(r.back=-1);break}for(r.back=0;ve=(Ae=r.lencode[se&(1<>>16&255,ge=65535&Ae,!((be=Ae>>>24)<=fe);){if(0===ae)break e;ae--,se+=ee[re++]<>ye)])>>>16&255,ge=65535&Ae,!(ye+(be=Ae>>>24)<=fe);){if(0===ae)break e;ae--,se+=ee[re++]<>>=ye,fe-=ye,r.back+=ye}if(se>>>=be,fe-=be,r.back+=be,r.length=ge,0===ve){r.mode=G;break}if(32&ve){r.back=-1,r.mode=D;break}if(64&ve){e.msg="invalid literal/length code",r.mode=X;break}r.extra=15&ve,r.mode=$;case $:if(r.extra){for(ke=r.extra;fe>>=r.extra,fe-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=K;case K:for(;ve=(Ae=r.distcode[se&(1<>>16&255,ge=65535&Ae,!((be=Ae>>>24)<=fe);){if(0===ae)break e;ae--,se+=ee[re++]<>ye)])>>>16&255,ge=65535&Ae,!(ye+(be=Ae>>>24)<=fe);){if(0===ae)break e;ae--,se+=ee[re++]<>>=ye,fe-=ye,r.back+=ye}if(se>>>=be,fe-=be,r.back+=be,64&ve){e.msg="invalid distance code",r.mode=X;break}r.offset=ge,r.extra=15&ve,r.mode=H;case H:if(r.extra){for(ke=r.extra;fe>>=r.extra,fe-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=X;break}r.mode=Z;case Z:if(0===oe)break e;if(he=ue-oe,r.offset>he){if((he=r.offset-he)>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=X;break}he>r.wnext?(he-=r.wnext,pe=r.wsize-he):pe=r.wnext-he,he>r.length&&(he=r.length),me=r.window}else me=te,pe=ne-r.offset,he=r.length;he>oe&&(he=oe),oe-=he,r.length-=he;do{te[ne++]=me[pe++]}while(--he);0===r.length&&(r.mode=q);break;case G:if(0===oe)break e;te[ne++]=r.length,oe--,r.mode=q;break;case V:if(r.wrap){for(;fe<32;){if(0===ae)break e;ae--,se|=ee[re++]<>>=_=y>>>24,p-=_,0===(_=y>>>16&255))A[a++]=65535&y;else{if(!(16&_)){if(0==(64&_)){y=m[(65535&y)+(l&(1<<_)-1)];continue t}if(32&_){r.mode=12;break e}e.msg="invalid literal/length code",r.mode=30;break e}w=65535&y,(_&=15)&&(p<_&&(l+=k[i++]<>>=_,p-=_),p<15&&(l+=k[i++]<>>=_=y>>>24,p-=_,!(16&(_=y>>>16&255))){if(0==(64&_)){y=b[(65535&y)+(l&(1<<_)-1)];continue r}e.msg="invalid distance code",r.mode=30;break e}if(E=65535&y,p<(_&=15)&&(l+=k[i++]<f){e.msg="invalid distance too far back",r.mode=30;break e}if(l>>>=_,p-=_,E>(_=a-o)){if((_=E-_)>u&&r.sane){e.msg="invalid distance too far back",r.mode=30;break e}if(S=0,P=d,0===h){if(S+=c-_,_2;)A[a++]=P[S++],A[a++]=P[S++],A[a++]=P[S++],w-=3;w&&(A[a++]=P[S++],w>1&&(A[a++]=P[S++]))}else{S=a-E;do{A[a++]=A[S++],A[a++]=A[S++],A[a++]=A[S++],w-=3}while(w>2);w&&(A[a++]=A[S++],w>1&&(A[a++]=A[S++]))}break}}break}}while(i>3,l&=(1<<(p-=w<<3))-1,e.next_in=i,e.next_out=a,e.avail_in=i=1&&0===L[A];A--);if(x>A&&(x=A),0===A)return c[u++]=20971520,c[u++]=20971520,d.bits=1,0;for(k=1;k0&&(0===e||1!==A))return-1;for(B[1]=0,S=1;S<15;S++)B[S+1]=B[S]+L[S];for(P=0;P852||2===e&&R>592)return 1;for(;;){y=S-O,h[P]g?(_=N[F+h[P]],w=D[C+h[P]]):(_=96,w=0),l=1<>O)+(p-=l)]=y<<24|_<<16|w|0}while(0!==p);for(l=1<>=1;if(0!==l?(T&=l-1,T+=l):T=0,P++,0==--L[S]){if(S===A)break;S=t[r+h[P]]}if(S>x&&(T&b)!==m){for(0===O&&(O=x),v+=k,M=1<<(I=S-O);I+O852||2===e&&R>592)return 1;c[m=T&b]=x<<24|I<<16|v-u|0}}return 0!==T&&(c[v+T]=S-O<<24|64<<16|0),d.bits=x,0}},function(e,t,r){"use strict";e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},function(e,t,r){"use strict";(function(t){var i=r(6),n=r(42),a=r(14),o=e.exports=function(e){var r=this;e=e||{},i.Readable.call(this,e),this.stopped=!1;var a=e.hasOwnProperty("frequency")?e.frequency:n.DEFAULT_FREQUENCY,o=e.chunkSize||n.DEFAULT_CHUNK_SIZE,s=e.initialSize||n.DEFAULT_INITIAL_SIZE,f=e.incrementAmount||n.DEFAULT_INCREMENT_AMOUNT,c=0,u=new t(s),h=!1,d=function(){var e=Math.min(o,c),i=!1;if(e>0){var n;n=new t(e),u.copy(n,0,0,e),i=!1!==r.push(n),h=i,u.copy(u,0,e,c),c-=e}0===c&&r.stopped&&r.push(null),d.timeout=i?setTimeout(d,a):null};this.stop=function(){if(this.stopped)throw new Error("stop() called on already stopped ReadableStreamBuffer");this.stopped=!0,0===c&&this.push(null)},this.size=function(){return c},this.maxSize=function(){return u.length};var l=function(e){if(u.length-c{const t=document.createElement("li");t.textContent=e,i.appendChild(t)})}}},function(e,t,r){"use strict";const i=r(36).ZipFile,n=r(74),a=r(41),o=r(236)("packer"),s=r(239),f=r(240),{validateContentsZip:c}=r(107);e.exports=function(e,t){let r,u=t;u?r=new n(u):(o("generating a new key"),r=new n({b:1024}),u=r.exportKey("pkcs1-private"));const h=s(e,u),d=r.exportKey("pkcs8-public-der"),l=f(d);return o(`id : ${l}`),c(e).then(()=>(function(e,t,r){return o("zip(): start"),new Promise((n,s)=>{const f=new a.WritableStreamBuffer,c=new i;f.on("finish",()=>{o("zip(): output finish event"),n(f.getContents())}),c.outputStream.pipe(f),c.addBuffer(e,"contents.zip"),c.addBuffer(t,"PUBKEY"),c.addBuffer(r,"SIGNATURE"),c.end(e=>{o(`zip(): ZipFile end event: finalSize ${e} bytes`)})})})(e,d,h)).then(e=>({plugin:e,privateKey:u,id:l}))}},function(e,t,r){(function(i){var n=r(7)._,a=(r(10),r(26)),o=r(7),s=r(18),f=r(226);t.BigInteger=a,e.exports.Key=function(){function e(){this.n=null,this.e=0,this.d=null,this.p=null,this.q=null,this.dmp1=null,this.dmq1=null,this.coeff=null}return e.prototype.setOptions=function(e){var t=s[e.signingScheme],r=s[e.encryptionScheme];t===r?this.signingScheme=this.encryptionScheme=r.makeScheme(this,e):(this.encryptionScheme=r.makeScheme(this,e),this.signingScheme=t.makeScheme(this,e)),this.encryptEngine=f.getEngine(this,e)},e.prototype.generate=function(e,t){var r=e>>1;this.e=parseInt(t,16);for(var i=new a(t,16);;){for(;this.p=new a(e-r,1),0!==this.p.subtract(a.ONE).gcd(i).compareTo(a.ONE)||!this.p.isProbablePrime(10););for(;this.q=new a(r,1),0!==this.q.subtract(a.ONE).gcd(i).compareTo(a.ONE)||!this.q.isProbablePrime(10););if(this.p.compareTo(this.q)<=0){var n=this.p;this.p=this.q,this.q=n}var o=this.p.subtract(a.ONE),s=this.q.subtract(a.ONE),f=o.multiply(s);if(0===f.gcd(i).compareTo(a.ONE)){if(this.n=this.p.multiply(this.q),this.n.bitLength()0&&(n.isNumber(t)||t.length>0)&&r.length>0))throw Error("Invalid RSA private key");this.n=new a(e),this.e=n.isNumber(t)?t:o.get32IntFromBuffer(t,0),this.d=new a(r),i&&s&&f&&c&&u&&(this.p=new a(i),this.q=new a(s),this.dmp1=new a(f),this.dmq1=new a(c),this.coeff=new a(u)),this.$$recalculateCache()},e.prototype.setPublic=function(e,t){if(!(e&&t&&e.length>0&&(n.isNumber(t)||t.length>0)))throw Error("Invalid RSA public key");this.n=new a(e),this.e=n.isNumber(t)?t:o.get32IntFromBuffer(t,0),this.$$recalculateCache()},e.prototype.$doPrivate=function(e){if(this.p||this.q)return e.modPow(this.d,this.n);for(var t=e.mod(this.p).modPow(this.dmp1,this.p),r=e.mod(this.q).modPow(this.dmq1,this.q);t.compareTo(r)<0;)t=t.add(this.p);return t.subtract(r).multiply(this.coeff).mod(this.p).multiply(this.q).add(r)},e.prototype.$doPublic=function(e){return e.modPowInt(this.e,this.n)},e.prototype.encrypt=function(e,t){var r=[],n=[],a=e.length,o=Math.ceil(a/this.maxMessageLength)||1,s=Math.ceil(a/o||1);if(1==o)r.push(e);else for(var f=0;f0)throw Error("Incorrect data or key");for(var r=[],n=0,a=0,o=e.length/this.encryptedDataLength,s=0;s>3},e}()}).call(this,r(1).Buffer)},function(e,t,r){var i=r(0),n=r(17),a=r(2).Buffer,o=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function f(){this.init(),this._w=s,n.call(this,64,56)}function c(e){return e<<30|e>>>2}function u(e,t,r,i){return 0===e?t&r|~t&i:2===e?t&r|t&i|r&i:t^r^i}i(f,n),f.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},f.prototype._update=function(e){for(var t,r=this._w,i=0|this._a,n=0|this._b,a=0|this._c,s=0|this._d,f=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 d=0;d<80;++d){var l=~~(d/20),p=0|((t=i)<<5|t>>>27)+u(l,n,a,s)+f+r[d]+o[l];f=s,s=a,a=c(n),n=i,i=p}this._a=i+this._a|0,this._b=n+this._b|0,this._c=a+this._c|0,this._d=s+this._d|0,this._e=f+this._e|0},f.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=f},function(e,t,r){var i=r(0),n=r(17),a=r(2).Buffer,o=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function f(){this.init(),this._w=s,n.call(this,64,56)}function c(e){return e<<5|e>>>27}function u(e){return e<<30|e>>>2}function h(e,t,r,i){return 0===e?t&r|~t&i:2===e?t&r|t&i|r&i:t^r^i}i(f,n),f.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},f.prototype._update=function(e){for(var t,r=this._w,i=0|this._a,n=0|this._b,a=0|this._c,s=0|this._d,f=0|this._e,d=0;d<16;++d)r[d]=e.readInt32BE(4*d);for(;d<80;++d)r[d]=(t=r[d-3]^r[d-8]^r[d-14]^r[d-16])<<1|t>>>31;for(var l=0;l<80;++l){var p=~~(l/20),m=c(i)+h(p,n,a,s)+f+r[l]+o[p]|0;f=s,s=a,a=u(n),n=i,i=m}this._a=i+this._a|0,this._b=n+this._b|0,this._c=a+this._c|0,this._d=s+this._d|0,this._e=f+this._e|0},f.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=f},function(e,t,r){var i=r(0),n=r(76),a=r(17),o=r(2).Buffer,s=new Array(64);function f(){this.init(),this._w=s,a.call(this,64,56)}i(f,n),f.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},f.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=f},function(e,t,r){var i=r(0),n=r(77),a=r(17),o=r(2).Buffer,s=new Array(160);function f(){this.init(),this._w=s,a.call(this,128,112)}i(f,n),f.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},f.prototype._hash=function(){var e=o.allocUnsafe(48);function t(t,r,i){e.writeInt32BE(t,i),e.writeInt32BE(r,i+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=f},function(e,t,r){"use strict";var i=r(0),n=r(2).Buffer,a=r(12),o=n.alloc(128),s=64;function f(e,t){a.call(this,"digest"),"string"==typeof t&&(t=n.from(t)),this._alg=e,this._key=t,t.length>s?t=e(t):t.length>>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,i){for(var n=0,a=0,o=6;o>=0;o-=2){for(var s=0;s<=24;s+=8)n<<=1,n|=t>>>s+o&1;for(s=0;s<=24;s+=8)n<<=1,n|=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[i+0]=n>>>0,r[i+1]=a>>>0},t.rip=function(e,t,r,i){for(var n=0,a=0,o=0;o<4;o++)for(var s=24;s>=0;s-=8)n<<=1,n|=t>>>s+o&1,n<<=1,n|=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[i+0]=n>>>0,r[i+1]=a>>>0},t.pc1=function(e,t,r,i){for(var n=0,a=0,o=7;o>=5;o--){for(var s=0;s<=24;s+=8)n<<=1,n|=t>>s+o&1;for(s=0;s<=24;s+=8)n<<=1,n|=e>>s+o&1}for(s=0;s<=24;s+=8)n<<=1,n|=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[i+0]=n>>>0,r[i+1]=a>>>0},t.r28shl=function(e,t){return e<>>28-t};var i=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];t.pc2=function(e,t,r,n){for(var a=0,o=0,s=i.length>>>1,f=0;f>>i[f]&1;for(f=s;f>>i[f]&1;r[n+0]=a>>>0,r[n+1]=o>>>0},t.expand=function(e,t,r){var i=0,n=0;i=(1&e)<<5|e>>>27;for(var a=23;a>=15;a-=4)i<<=6,i|=e>>>a&63;for(a=11;a>=3;a-=4)n|=e>>>a&63,n<<=6;n|=(31&e)<<1|e>>>31,t[r+0]=i>>>0,t[r+1]=n>>>0};var n=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];t.substitute=function(e,t){for(var r=0,i=0;i<4;i++){r<<=4,r|=n[64*i+(e>>>18-6*i&63)]}for(i=0;i<4;i++){r<<=4,r|=n[256+64*i+(t>>>18-6*i&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[r]&1;return t>>>0},t.padSplit=function(e,t,r){for(var i=e.toString(2);i.length0;i--)t+=this._buffer(e,t),r+=this._flushBuffer(n,r);return t+=this._buffer(e,t),n},n.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},n.prototype._pad=function(e,t){if(0===t)return!1;for(;t>>1];r=o.r28shl(r,s),n=o.r28shl(n,s),o.pc2(r,n,e.keys,a)}},c.prototype._update=function(e,t,r,i){var n=this._desState,a=o.readUInt32BE(e,t),s=o.readUInt32BE(e,t+4);o.ip(a,s,n.tmp,0),a=n.tmp[0],s=n.tmp[1],"encrypt"===this.type?this._encrypt(n,a,s,n.tmp,0):this._decrypt(n,a,s,n.tmp,0),a=n.tmp[0],s=n.tmp[1],o.writeUInt32BE(r,a,i),o.writeUInt32BE(r,s,i+4)},c.prototype._pad=function(e,t){for(var r=e.length-t,i=t;i>>0,a=d}o.rip(s,a,i,n)},c.prototype._decrypt=function(e,t,r,i,n){for(var a=r,s=t,f=e.keys.length-2;f>=0;f-=2){var c=e.keys[f],u=e.keys[f+1];o.expand(a,e.tmp,0),c^=e.tmp[0],u^=e.tmp[1];var h=o.substitute(c,u),d=a;a=(s^o.permute(h))>>>0,s=d}o.rip(a,s,i,n)}},function(e,t,r){"use strict";var i=r(8),n=r(0),a={};function o(e){i.equal(e.length,8,"Invalid IV length"),this.iv=new Array(8);for(var t=0;t15){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e}return null},d.prototype.flush=function(){for(var e=16-this.cache.length,t=a.allocUnsafe(e),r=-1;++r>o%8,e._prev=a(e._prev,r?i:n);return s}function a(e,t){var r=e.length,n=-1,a=i.allocUnsafe(e.length);for(e=i.concat([e,i.from([t])]);++n>7;return a}t.encrypt=function(e,t,r){for(var a=t.length,o=i.allocUnsafe(a),s=-1;++s>>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=i.alloc(16,0),this.cache=i.allocUnsafe(0)}o.prototype.ghash=function(e){for(var t=-1;++t0;t--)i[t]=i[t]>>>1|(1&i[t-1])<<31;i[0]=i[0]>>>1,r&&(i[0]=i[0]^225<<24)}this.state=a(n)},o.prototype.update=function(e){var t;for(this.cache=i.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(i.concat([this.cache,n],16)),this.ghash(a([0,e,0,t])),this.state},e.exports=o},function(e,t,r){var i=r(88),n=r(2).Buffer,a=r(48),o=r(89),s=r(12),f=r(32),c=r(33);function u(e,t,r){s.call(this),this._cache=new h,this._last=void 0,this._cipher=new f.AES(t),this._prev=n.from(r),this._mode=e,this._autopadding=!0}function h(){this.cache=n.allocUnsafe(0)}function d(e,t,r){var s=a[e.toLowerCase()];if(!s)throw new TypeError("invalid suite type");if("string"==typeof r&&(r=n.from(r)),"GCM"!==s.mode&&r.length!==s.iv)throw new TypeError("invalid iv length "+r.length);if("string"==typeof t&&(t=n.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 i(s.module,t,r,!0):new u(s.module,t,r)}r(0)(u,s),u.prototype._update=function(e){var t,r;this._cache.add(e);for(var i=[];t=this._cache.get(this._autopadding);)r=this._mode.decrypt(this,t),i.push(r);return n.concat(i)},u.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");var r=-1;for(;++r16)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 i=c(t,!1,r.key,r.iv);return d(e,i.key,i.iv)},t.createDecipheriv=d},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){(function(e){var i=r(90),n=r(182),a=r(183);var o={binary:!0,hex:!0,base64:!0};t.DiffieHellmanGroup=t.createDiffieHellmanGroup=t.getDiffieHellman=function(t){var r=new e(n[t].prime,"hex"),i=new e(n[t].gen,"hex");return new a(r,i)},t.createDiffieHellman=t.DiffieHellman=function t(r,n,s,f){return e.isBuffer(n)||void 0===o[n]?t(r,"binary",n,s):(n=n||"binary",f=f||"binary",s=s||new e([2]),e.isBuffer(s)||(s=new e(s,f)),"number"==typeof r?new a(i(r,s),s,!0):(e.isBuffer(r)||(r=new e(r,n)),new a(r,s,!0)))}}).call(this,r(1).Buffer)},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){},function(e,t){},function(e){e.exports=JSON.parse('{"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,r){(function(t){var i=r(3),n=new(r(91)),a=new i(24),o=new i(11),s=new i(10),f=new i(3),c=new i(7),u=r(90),h=r(16);function d(e,r){return r=r||"utf8",t.isBuffer(e)||(e=new t(e,r)),this._pub=new i(e),this}function l(e,r){return r=r||"utf8",t.isBuffer(e)||(e=new t(e,r)),this._priv=new i(e),this}e.exports=m;var p={};function m(e,t,r){this.setGenerator(t),this.__prime=new i(e),this._prime=i.mont(this.__prime),this._primeLen=e.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,r?(this.setPublicKey=d,this.setPrivateKey=l):this._primeCode=8}function b(e,r){var i=new t(e.toArray());return r?i.toString(r):i}Object.defineProperty(m.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=function(e,t){var r=t.toString("hex"),i=[r,e.toString(16)].join("_");if(i in p)return p[i];var h,d=0;if(e.isEven()||!u.simpleSieve||!u.fermatTest(e)||!n.test(e))return d+=1,d+="02"===r||"05"===r?8:4,p[i]=d,d;switch(n.test(e.shrn(1))||(d+=2),r){case"02":e.mod(a).cmp(o)&&(d+=8);break;case"05":(h=e.mod(s)).cmp(f)&&h.cmp(c)&&(d+=8);break;default:d+=4}return p[i]=d,d}(this.__prime,this.__gen)),this._primeCode}}),m.prototype.generateKeys=function(){return this._priv||(this._priv=new i(h(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},m.prototype.computeSecret=function(e){var r=(e=(e=new i(e)).toRed(this._prime)).redPow(this._priv).fromRed(),n=new t(r.toArray()),a=this.getPrime();if(n.length0&&r.ishrn(i),r}function h(e,r,n){var a,o;do{for(a=new t(0);8*a.length","license":"MIT","bugs":{"url":"https://github.com/indutny/elliptic/issues"},"homepage":"https://github.com/indutny/elliptic","devDependencies":{"brfs":"^1.4.3","coveralls":"^3.0.4","grunt":"^1.0.4","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":"^9.0.1","istanbul":"^0.4.2","jscs":"^3.0.7","jshint":"^2.6.0","mocha":"^6.1.4"},"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"},"_resolved":"https://registry.npmjs.org/elliptic/-/elliptic-6.5.1.tgz","_integrity":"sha512-xvJINNLbTeWQjrl6X+7eQCrIy/YPv5XCpKW6kB5mKvtnGILoLDcySuwomfdzt0BMdLNVnuRNTuzKNHj0bva1Cg==","_from":"elliptic@6.5.1"}')},function(e,t,r){"use strict";var i=r(9),n=r(3),a=r(0),o=r(34),s=i.assert;function f(e){o.call(this,"short",e),this.a=new n(e.a,16).toRed(this.red),this.b=new n(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 c(e,t,r,i){o.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new n(t,16),this.y=new n(r,16),i&&(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 u(e,t,r,i){o.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===i?(this.x=this.curve.one,this.y=this.curve.one,this.z=new n(0)):(this.x=new n(t,16),this.y=new n(r,16),this.z=new n(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.zOne=this.z===this.curve.one}a(f,o),e.exports=f,f.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,r;if(e.beta)t=new n(e.beta,16).toRed(this.red);else{var i=this._getEndoRoots(this.p);t=(t=i[0].cmp(i[1])<0?i[0]:i[1]).toRed(this.red)}if(e.lambda)r=new n(e.lambda,16);else{var a=this._getEndoRoots(this.n);0===this.g.mul(a[0]).x.cmp(this.g.x.redMul(t))?r=a[0]:(r=a[1],s(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 n(e.a,16),b:new n(e.b,16)}})):this._getEndoBasis(r)}}},f.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:n.mont(e),r=new n(2).toRed(t).redInvm(),i=r.redNeg(),a=new n(3).toRed(t).redNeg().redSqrt().redMul(r);return[i.redAdd(a).fromRed(),i.redSub(a).fromRed()]},f.prototype._getEndoBasis=function(e){for(var t,r,i,a,o,s,f,c,u,h=this.n.ushrn(Math.floor(this.n.bitLength()/2)),d=e,l=this.n.clone(),p=new n(1),m=new n(0),b=new n(0),v=new n(1),g=0;0!==d.cmpn(0);){var y=l.div(d);c=l.sub(y.mul(d)),u=b.sub(y.mul(p));var _=v.sub(y.mul(m));if(!i&&c.cmp(h)<0)t=f.neg(),r=p,i=c.neg(),a=u;else if(i&&2==++g)break;f=c,l=d,d=c,b=p,p=u,v=m,m=_}o=c.neg(),s=u;var w=i.sqr().add(a.sqr());return o.sqr().add(s.sqr()).cmp(w)>=0&&(o=t,s=r),i.negative&&(i=i.neg(),a=a.neg()),o.negative&&(o=o.neg(),s=s.neg()),[{a:i,b:a},{a:o,b:s}]},f.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],i=t[1],n=i.b.mul(e).divRound(this.n),a=r.b.neg().mul(e).divRound(this.n),o=n.mul(r.a),s=a.mul(i.a),f=n.mul(r.b),c=a.mul(i.b);return{k1:e.sub(o).sub(s),k2:f.add(c).neg()}},f.prototype.pointFromX=function(e,t){(e=new n(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),i=r.redSqrt();if(0!==i.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var a=i.fromRed().isOdd();return(t&&!a||!t&&a)&&(i=i.redNeg()),this.point(e,i)},f.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,i=this.a.redMul(t),n=t.redSqr().redMul(t).redIAdd(i).redIAdd(this.b);return 0===r.redSqr().redISub(n).cmpn(0)},f.prototype._endoWnafMulAdd=function(e,t,r){for(var i=this._endoWnafT1,n=this._endoWnafT2,a=0;a":""},c.prototype.isInfinity=function(){return this.inf},c.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),i=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,i)},c.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(),i=e.redInvm(),n=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(i),a=n.redSqr().redISub(this.x.redAdd(this.x)),o=n.redMul(this.x.redSub(a)).redISub(this.y);return this.curve.point(a,o)},c.prototype.getX=function(){return this.x.fromRed()},c.prototype.getY=function(){return this.y.fromRed()},c.prototype.mul=function(e){return e=new n(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},c.prototype.mulAdd=function(e,t,r){var i=[this,t],n=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(i,n):this.curve._wnafMulAdd(1,i,n,2)},c.prototype.jmulAdd=function(e,t,r){var i=[this,t],n=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(i,n,!0):this.curve._wnafMulAdd(1,i,n,2,!0)},c.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))},c.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,i=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(i)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(i)}}}return t},c.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},a(u,o.BasePoint),f.prototype.jpoint=function(e,t,r){return new u(this,e,t,r)},u.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),i=this.y.redMul(t).redMul(e);return this.curve.point(r,i)},u.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},u.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),i=this.x.redMul(t),n=e.x.redMul(r),a=this.y.redMul(t.redMul(e.z)),o=e.y.redMul(r.redMul(this.z)),s=i.redSub(n),f=a.redSub(o);if(0===s.cmpn(0))return 0!==f.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=s.redSqr(),u=c.redMul(s),h=i.redMul(c),d=f.redSqr().redIAdd(u).redISub(h).redISub(h),l=f.redMul(h.redISub(d)).redISub(a.redMul(u)),p=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(d,l,p)},u.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,i=e.x.redMul(t),n=this.y,a=e.y.redMul(t).redMul(this.z),o=r.redSub(i),s=n.redSub(a);if(0===o.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var f=o.redSqr(),c=f.redMul(o),u=r.redMul(f),h=s.redSqr().redIAdd(c).redISub(u).redISub(u),d=s.redMul(u.redISub(h)).redISub(n.redMul(c)),l=this.z.redMul(o);return this.curve.jpoint(h,d,l)},u.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=0)return!1;if(r.redIAdd(n),0===this.x.cmp(r))return!0}},u.prototype.inspect=function(){return this.isInfinity()?"":""},u.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},function(e,t,r){"use strict";var i=r(3),n=r(0),a=r(34),o=r(9);function s(e){a.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 f(e,t,r){a.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)))}n(s,a),e.exports=s,s.prototype.validate=function(e){var t=e.normalize().x,r=t.redSqr(),i=r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t);return 0===i.redSqrt().redSqr().cmp(i)},n(f,a.BasePoint),s.prototype.decodePoint=function(e,t){return this.point(o.toArray(e,t),1)},s.prototype.point=function(e,t){return new f(this,e,t)},s.prototype.pointFromJSON=function(e){return f.fromJSON(this,e)},f.prototype.precompute=function(){},f.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},f.fromJSON=function(e,t){return new f(e,t[0],t[1]||e.one)},f.prototype.inspect=function(){return this.isInfinity()?"":""},f.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},f.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),r=e.redSub(t),i=e.redMul(t),n=r.redMul(t.redAdd(this.curve.a24.redMul(r)));return this.curve.point(i,n)},f.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},f.prototype.diffAdd=function(e,t){var r=this.x.redAdd(this.z),i=this.x.redSub(this.z),n=e.x.redAdd(e.z),a=e.x.redSub(e.z).redMul(r),o=n.redMul(i),s=t.z.redMul(a.redAdd(o).redSqr()),f=t.x.redMul(a.redISub(o).redSqr());return this.curve.point(s,f)},f.prototype.mul=function(e){for(var t=e.clone(),r=this,i=this.curve.point(null,null),n=[];0!==t.cmpn(0);t.iushrn(1))n.push(t.andln(1));for(var a=n.length-1;a>=0;a--)0===n[a]?(r=r.diffAdd(i,this),i=i.dbl()):(i=r.diffAdd(i,this),r=r.dbl());return i},f.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},f.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},f.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},f.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},f.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},function(e,t,r){"use strict";var i=r(9),n=r(3),a=r(0),o=r(34),s=i.assert;function f(e){this.twisted=1!=(0|e.a),this.mOneA=this.twisted&&-1==(0|e.a),this.extended=this.mOneA,o.call(this,"edwards",e),this.a=new n(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new n(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new n(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),s(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|e.c)}function c(e,t,r,i,a){o.BasePoint.call(this,e,"projective"),null===t&&null===r&&null===i?(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 n(t,16),this.y=new n(r,16),this.z=i?new n(i,16):this.curve.one,this.t=a&&new n(a,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()))))}a(f,o),e.exports=f,f.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},f.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},f.prototype.jpoint=function(e,t,r,i){return this.point(e,t,r,i)},f.prototype.pointFromX=function(e,t){(e=new n(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),i=this.c2.redSub(this.a.redMul(r)),a=this.one.redSub(this.c2.redMul(this.d).redMul(r)),o=i.redMul(a.redInvm()),s=o.redSqrt();if(0!==s.redSqr().redSub(o).cmp(this.zero))throw new Error("invalid point");var f=s.fromRed().isOdd();return(t&&!f||!t&&f)&&(s=s.redNeg()),this.point(e,s)},f.prototype.pointFromY=function(e,t){(e=new n(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),i=r.redSub(this.c2),a=r.redMul(this.d).redMul(this.c2).redSub(this.a),o=i.redMul(a.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.fromRed().isOdd()!==t&&(s=s.redNeg()),this.point(s,e)},f.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),r=e.y.redSqr(),i=t.redMul(this.a).redAdd(r),n=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(r)));return 0===i.cmp(n)},a(c,o.BasePoint),f.prototype.pointFromJSON=function(e){return c.fromJSON(this,e)},f.prototype.point=function(e,t,r,i){return new c(this,e,t,r,i)},c.fromJSON=function(e,t){return new c(e,t[0],t[1],t[2])},c.prototype.inspect=function(){return this.isInfinity()?"":""},c.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},c.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var i=this.curve._mulA(e),n=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),a=i.redAdd(t),o=a.redSub(r),s=i.redSub(t),f=n.redMul(o),c=a.redMul(s),u=n.redMul(s),h=o.redMul(a);return this.curve.point(f,c,h,u)},c.prototype._projDbl=function(){var e,t,r,i=this.x.redAdd(this.y).redSqr(),n=this.x.redSqr(),a=this.y.redSqr();if(this.curve.twisted){var o=(c=this.curve._mulA(n)).redAdd(a);if(this.zOne)e=i.redSub(n).redSub(a).redMul(o.redSub(this.curve.two)),t=o.redMul(c.redSub(a)),r=o.redSqr().redSub(o).redSub(o);else{var s=this.z.redSqr(),f=o.redSub(s).redISub(s);e=i.redSub(n).redISub(a).redMul(f),t=o.redMul(c.redSub(a)),r=o.redMul(f)}}else{var c=n.redAdd(a);s=this.curve._mulC(this.z).redSqr(),f=c.redSub(s).redSub(s);e=this.curve._mulC(i.redISub(c)).redMul(f),t=this.curve._mulC(c).redMul(n.redISub(a)),r=c.redMul(f)}return this.curve.point(e,t,r)},c.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},c.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)),i=this.t.redMul(this.curve.dd).redMul(e.t),n=this.z.redMul(e.z.redAdd(e.z)),a=r.redSub(t),o=n.redSub(i),s=n.redAdd(i),f=r.redAdd(t),c=a.redMul(o),u=s.redMul(f),h=a.redMul(f),d=o.redMul(s);return this.curve.point(c,u,d,h)},c.prototype._projAdd=function(e){var t,r,i=this.z.redMul(e.z),n=i.redSqr(),a=this.x.redMul(e.x),o=this.y.redMul(e.y),s=this.curve.d.redMul(a).redMul(o),f=n.redSub(s),c=n.redAdd(s),u=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(a).redISub(o),h=i.redMul(f).redMul(u);return this.curve.twisted?(t=i.redMul(c).redMul(o.redSub(this.curve._mulA(a))),r=f.redMul(c)):(t=i.redMul(c).redMul(o.redSub(a)),r=this.curve._mulC(f).redMul(c)),this.curve.point(h,t,r)},c.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},c.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},c.prototype.mulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!1)},c.prototype.jmulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!0)},c.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},c.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},c.prototype.getX=function(){return this.normalize(),this.x.fromRed()},c.prototype.getY=function(){return this.normalize(),this.y.fromRed()},c.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},c.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(),i=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(i),0===this.x.cmp(t))return!0}},c.prototype.toP=c.prototype.normalize,c.prototype.mixedAdd=c.prototype.add},function(e,t,r){"use strict";t.sha1=r(191),t.sha224=r(192),t.sha256=r(95),t.sha384=r(193),t.sha512=r(96)},function(e,t,r){"use strict";var i=r(11),n=r(23),a=r(94),o=i.rotl32,s=i.sum32,f=i.sum32_5,c=a.ft_1,u=n.BlockHash,h=[1518500249,1859775393,2400959708,3395469782];function d(){if(!(this instanceof d))return new d;u.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}i.inherits(d,u),e.exports=d,d.blockSize=512,d.outSize=160,d.hmacStrength=80,d.padLength=64,d.prototype._update=function(e,t){for(var r=this.W,i=0;i<16;i++)r[i]=e[t+i];for(;ithis.blockSize&&(e=(new this.Hash).update(e).digest()),n(e.length<=this.blockSize);for(var t=e.length;t0))return o.iaddn(1),this.keyFromPrivate(o)}},h.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},h.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 i(e,16));for(var o=this.n.byteLength(),s=t.getPrivate().toArray("be",o),f=e.toArray("be",o),c=new n({hash:this.hash,entropy:s,nonce:f,pers:a.pers,persEnc:a.persEnc||"utf8"}),h=this.n.sub(new i(1)),d=0;;d++){var l=a.k?a.k(d):new i(c.generate(this.n.byteLength()));if(!((l=this._truncateToN(l,!0)).cmpn(1)<=0||l.cmp(h)>=0)){var p=this.g.mul(l);if(!p.isInfinity()){var m=p.getX(),b=m.umod(this.n);if(0!==b.cmpn(0)){var v=l.invm(this.n).mul(b.mul(t.getPrivate()).iadd(e));if(0!==(v=v.umod(this.n)).cmpn(0)){var g=(p.getY().isOdd()?1:0)|(0!==m.cmp(b)?2:0);return a.canonical&&v.cmp(this.nh)>0&&(v=this.n.sub(v),g^=1),new u({r:b,s:v,recoveryParam:g})}}}}}},h.prototype.verify=function(e,t,r,n){e=this._truncateToN(new i(e,16)),r=this.keyFromPublic(r,n);var a=(t=new u(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,f=o.invm(this.n),c=f.mul(e).umod(this.n),h=f.mul(a).umod(this.n);return this.curve._maxwellTrick?!(s=this.g.jmulAdd(c,r.getPublic(),h)).isInfinity()&&s.eqXToP(a):!(s=this.g.mulAdd(c,r.getPublic(),h)).isInfinity()&&0===s.getX().umod(this.n).cmp(a)},h.prototype.recoverPubKey=function(e,t,r,n){f((3&r)===r,"The recovery param is more than two bits"),t=new u(t,n);var a=this.n,o=new i(e),s=t.r,c=t.s,h=1&r,d=r>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&d)throw new Error("Unable to find sencond key candinate");s=d?this.curve.pointFromX(s.add(this.curve.n),h):this.curve.pointFromX(s,h);var l=t.r.invm(a),p=a.sub(o).mul(l).umod(a),m=c.mul(l).umod(a);return this.g.mulAdd(p,s,m)},h.prototype.getKeyRecoveryParam=function(e,t,r,i){if(null!==(t=new u(t,i)).recoveryParam)return t.recoveryParam;for(var n=0;n<4;n++){var a;try{a=this.recoverPubKey(e,t,n)}catch(e){continue}if(a.eq(r))return n}throw new Error("Unable to find valid recovery factor")}},function(e,t,r){"use strict";var i=r(53),n=r(92),a=r(8);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=n.toArray(e.entropy,e.entropyEnc||"hex"),r=n.toArray(e.nonce,e.nonceEnc||"hex"),i=n.toArray(e.pers,e.persEnc||"hex");a(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,i)}e.exports=o,o.prototype._init=function(e,t,r){var i=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var n=0;n=this.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,i){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(i=r,r=t,t=null),r&&(r=n.toArray(r,i||"hex"),this._update(r));for(var a=[];a.length"}},function(e,t,r){"use strict";var i=r(3),n=r(9),a=n.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 i(e.r,16),this.s=new i(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function s(){this.place=0}function f(e,t){var r=e[t.place++];if(!(128&r))return r;for(var i=15&r,n=0,a=0,o=t.place;a>>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=n.toArray(e,t);var r=new s;if(48!==e[r.place++])return!1;if(f(e,r)+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var a=f(e,r),o=e.slice(r.place,a+r.place);if(r.place+=a,2!==e[r.place++])return!1;var c=f(e,r);if(e.length!==c+r.place)return!1;var u=e.slice(r.place,c+r.place);return 0===o[0]&&128&o[1]&&(o=o.slice(1)),0===u[0]&&128&u[1]&&(u=u.slice(1)),this.r=new i(o),this.s=new i(u),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=c(t),r=c(r);!(r[0]||128&r[1]);)r=r.slice(1);var i=[2];u(i,t.length),(i=i.concat(t)).push(2),u(i,r.length);var a=i.concat(r),o=[48];return u(o,a.length),o=o.concat(a),n.encode(o,e)}},function(e,t,r){"use strict";var i=r(53),n=r(52),a=r(9),o=a.assert,s=a.parseBytes,f=r(202),c=r(203);function u(e){if(o("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof u))return new u(e);e=n[e].curve;this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=i.sha512}e.exports=u,u.prototype.sign=function(e,t){e=s(e);var r=this.keyFromSecret(t),i=this.hashInt(r.messagePrefix(),e),n=this.g.mul(i),a=this.encodePoint(n),o=this.hashInt(a,r.pubBytes(),e).mul(r.priv()),f=i.add(o).umod(this.curve.n);return this.makeSignature({R:n,S:f,Rencoded:a})},u.prototype.verify=function(e,t,r){e=s(e),t=this.makeSignature(t);var i=this.keyFromPublic(r),n=this.hashInt(t.Rencoded(),i.pubBytes(),e),a=this.g.mul(t.S());return t.R().add(i.pub().mul(n)).eq(a)},u.prototype.hashInt=function(){for(var e=this.hash(),t=0;t=t)throw new Error("invalid sig")}e.exports=function(e,r,f,c,u){var h=a(f);if("ec"===h.type){if("ecdsa"!==c&&"ecdsa/rsa"!==c)throw new Error("wrong public key type");return function(e,t,r){var i=o[r.data.algorithm.curve.join(".")];if(!i)throw new Error("unknown curve "+r.data.algorithm.curve.join("."));var a=new n(i),s=r.data.subjectPrivateKey.data;return a.verify(t,e,s)}(e,r,h)}if("dsa"===h.type){if("dsa"!==c)throw new Error("wrong public key type");return function(e,t,r){var n=r.data.p,o=r.data.q,f=r.data.g,c=r.data.pub_key,u=a.signature.decode(e,"der"),h=u.s,d=u.r;s(h,o),s(d,o);var l=i.mont(n),p=h.invm(o);return 0===f.toRed(l).redPow(new i(t).mul(p).mod(o)).fromRed().mul(c.toRed(l).redPow(d.mul(p).mod(o)).fromRed()).mod(n).mod(o).cmp(d)}(e,r,h)}if("rsa"!==c&&"ecdsa/rsa"!==c)throw new Error("wrong public key type");r=t.concat([u,r]);for(var d=h.modulus.byteLength(),l=[1],p=0;r.length+l.length+2r-d-2)throw new Error("message too long");var l=h.alloc(r-i-d-2),p=r-u-1,m=n(u),b=s(h.concat([c,l,h.alloc(1,1),t],p),o(m,p)),v=s(m,o(b,u));return new f(h.concat([h.alloc(1),v,b],r))}(p,t);else if(1===d)l=function(e,t,r){var i,a=t.length,o=e.modulus.byteLength();if(a>o-11)throw new Error("message too long");i=r?h.alloc(o-a-3,255):function(e){var t,r=h.allocUnsafe(e),i=0,a=n(2*e),o=0;for(;i=0)throw new Error("data too long for modulus")}return r?u(l,p):c(l,p)}},function(e,t,r){var i=r(35),n=r(102),a=r(103),o=r(3),s=r(50),f=r(21),c=r(104),u=r(2).Buffer;e.exports=function(e,t,r){var h;h=e.padding?e.padding:r?1:4;var d,l=i(e),p=l.modulus.byteLength();if(t.length>p||new o(t).cmp(l.modulus)>=0)throw new Error("decryption error");d=r?c(new o(t),l):s(t,l);var m=u.alloc(p-d.length);if(d=u.concat([m,d],p),4===h)return function(e,t){var r=e.modulus.byteLength(),i=f("sha1").update(u.alloc(0)).digest(),o=i.length;if(0!==t[0])throw new Error("decryption error");var s=t.slice(1,o+1),c=t.slice(o+1),h=a(s,n(c,o)),d=a(c,n(h,r-o-1));if(function(e,t){e=u.from(e),t=u.from(t);var r=0,i=e.length;e.length!==t.length&&(r++,i=Math.min(e.length,t.length));var n=-1;for(;++n=t.length){a++;break}var o=t.slice(2,n-1);("0002"!==i.toString("hex")&&!r||"0001"!==i.toString("hex")&&r)&&a++;o.length<8&&a++;if(a)throw new Error("decryption error");return t.slice(n)}(0,d,r);if(3===h)return d;throw new Error("unknown padding")}},function(e,t,r){"use strict";(function(e,i){function n(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var a=r(2),o=r(16),s=a.Buffer,f=a.kMaxLength,c=e.crypto||e.msCrypto,u=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>u||e<0)throw new TypeError("offset must be a uint32");if(e>f||e>t)throw new RangeError("offset out of range")}function d(e,t,r){if("number"!=typeof e||e!=e)throw new TypeError("size must be a number");if(e>u||e<0)throw new TypeError("size must be a uint32");if(e+t>r||e>f)throw new RangeError("buffer too small")}function l(e,t,r,n){if(i.browser){var a=e.buffer,s=new Uint8Array(a,t,r);return c.getRandomValues(s),n?void i.nextTick((function(){n(null,e)})):e}if(!n)return o(r).copy(e,t),e;o(r,(function(r,i){if(r)return n(r);i.copy(e,t),n(null,e)}))}c&&c.getRandomValues||!i.browser?(t.randomFill=function(t,r,i,n){if(!(s.isBuffer(t)||t instanceof e.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof r)n=r,r=0,i=t.length;else if("function"==typeof i)n=i,i=t.length-r;else if("function"!=typeof n)throw new TypeError('"cb" argument must be a function');return h(r,t.length),d(i,r,t.length),l(t,r,i,n)},t.randomFillSync=function(t,r,i){void 0===r&&(r=0);if(!(s.isBuffer(t)||t instanceof e.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');h(r,t.length),void 0===i&&(i=t.length-r);return d(i,r,t.length),l(t,r,i)}):(t.randomFill=n,t.randomFillSync=n)}).call(this,r(5),r(4))},function(e,t,r){(function(t){var i=r(26),n=r(10),a=r(31),o={md2:t.from("3020300c06082a864886f70d020205000410","hex"),md5:t.from("3020300c06082a864886f70d020505000410","hex"),sha1:t.from("3021300906052b0e03021a05000414","hex"),sha224:t.from("302d300d06096086480165030402040500041c","hex"),sha256:t.from("3031300d060960864801650304020105000420","hex"),sha384:t.from("3041300d060960864801650304020205000430","hex"),sha512:t.from("3051300d060960864801650304020305000440","hex"),ripemd160:t.from("3021300906052b2403020105000414","hex"),rmd160:t.from("3021300906052b2403020105000414","hex")},s={ripemd160:"rmd160"};e.exports={isEncryption:!0,isSignature:!0},e.exports.makeScheme=function(e,r){function f(e,t){this.key=e,this.options=t}return f.prototype.maxMessageLength=function(){return this.options.encryptionSchemeOptions&&this.options.encryptionSchemeOptions.padding==a.RSA_NO_PADDING?this.key.encryptedDataLength:this.key.encryptedDataLength-11},f.prototype.encPad=function(e,r){var i;if(r=r||{},e.length>this.key.maxMessageLength)throw new Error("Message too long for RSA (n="+this.key.encryptedDataLength+", l="+e.length+")");if(this.options.encryptionSchemeOptions&&this.options.encryptionSchemeOptions.padding==a.RSA_NO_PADDING)return(i=t.alloc(this.key.maxMessageLength-e.length)).fill(0),t.concat([i,e]);if(1===r.type)return(i=t.alloc(this.key.encryptedDataLength-e.length-1)).fill(255,0,i.length-1),i[0]=1,i[i.length-1]=0,t.concat([i,e]);(i=t.alloc(this.key.encryptedDataLength-e.length))[0]=0,i[1]=2;for(var o=n.randomBytes(i.length-3),s=0;s=e.length)return null}else{if(0!==e[0]||2!==e[1])return null;for(r=3;0!==e[r];)if(++r>=e.length)return null}return e.slice(r+1,e.length)},f.prototype.sign=function(e){var t=this.options.signingSchemeOptions.hash||"sha256";if("browser"===this.options.environment){t=s[t]||t;var r=n.createHash(t);r.update(e);var a=this.pkcs1pad(r.digest(),t);return this.key.$doPrivate(new i(a)).toBuffer(this.key.encryptedDataLength)}var o=n.createSign("RSA-"+t.toUpperCase());return o.update(e),o.sign(this.options.rsaUtils.exportKey("private"))},f.prototype.verify=function(e,r,o){if(this.options.encryptionSchemeOptions&&this.options.encryptionSchemeOptions.padding==a.RSA_NO_PADDING)return!1;var f=this.options.signingSchemeOptions.hash||"sha256";if("browser"===this.options.environment){f=s[f]||f,o&&(r=t.from(r,o));var c=n.createHash(f);c.update(e);var u=this.pkcs1pad(c.digest(),f);return this.key.$doPublic(new i(r)).toBuffer().toString("hex")==u.toString("hex")}var h=n.createVerify("RSA-"+f.toUpperCase());return h.update(e),h.verify(this.options.rsaUtils.exportKey("public"),r,o)},f.prototype.pkcs0pad=function(e){var r=t.alloc(this.key.maxMessageLength-e.length);return r.fill(0),t.concat([r,e])},f.prototype.pkcs0unpad=function(e){return"function"==typeof e.lastIndexOf?e.slice(e.lastIndexOf("\0")+1,e.length):e.slice(String.prototype.lastIndexOf.call(e,"\0")+1,e.length)},f.prototype.pkcs1pad=function(e,r){var i=o[r];if(!i)throw Error("Unsupported hash algorithm");var n=t.concat([i,e]);if(n.length+10>this.key.encryptedDataLength)throw Error("Key is too short for signing algorithm ("+r+")");var a=t.alloc(this.key.encryptedDataLength-n.length-1);return a.fill(255,0,a.length-1),a[0]=1,a[a.length-1]=0,t.concat([a,n])},new f(e,r)}}).call(this,r(1).Buffer)},function(e,t,r){(function(t){r(26);var i=r(10);e.exports={isEncryption:!0,isSignature:!1},e.exports.digestLength={md4:16,md5:16,ripemd160:20,rmd160:20,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64};e.exports.eme_oaep_mgf1=function(r,n,a){a=a||"sha1";for(var o=e.exports.digestLength[a],s=Math.ceil(n/o),f=t.alloc(o*s),c=t.alloc(4),u=0;us-2*f-2)throw new Error("Message is too long to encode into an encoded message with a length of "+s+" bytes, increaseemLen to fix this error (minimum value for given parameters and options: "+(s-2*f-2)+")");var c=i.createHash(n);c.update(o),c=c.digest();var u=t.alloc(s-r.length-2*f-1);u.fill(0),u[u.length-1]=1;for(var h=t.concat([c,u,r]),d=i.randomBytes(f),l=a(d,h.length,n),p=0;p>8-g<<8-g;b[0]=b[0]&y;var _=t.alloc(b.length+d.length+1);return b.copy(_,0),d.copy(_,b.length),_[_.length-1]=188,_},s.prototype.emsa_pss_verify=function(e,r,i){var a=this.options.signingSchemeOptions.hash||"sha1",s=this.options.signingSchemeOptions.mgf||o.eme_oaep_mgf1,f=this.options.signingSchemeOptions.saltLength||20,c=o.digestLength[a],u=Math.ceil(i/8);if(u>8-(p=8*u-i)<<8-p,h[0]=h[0]&d,l=0;0===h[l]&&l=this._size)return null;var t=255&this._buf[e++];if(null===t)return null;if(128==(128&t)){if(0===(t&=127))throw o("Indefinite length not supported");if(t>4)throw o("encoding too long");if(this._size-ethis._size-i)return null;if(this._offset=i,0===this.length)return t?n.alloc(0):"";var s=this._buf.slice(this._offset,this._offset+this.length);return this._offset+=this.length,t?s:s.toString("utf8")},s.prototype.readOID=function(e){e||(e=a.OID);var t=this.readString(e,!0);if(null===t)return null;for(var r=[],i=0,n=0;n>0),r.join(".")},s.prototype._readTag=function(e){i.ok(void 0!==e);var t=this.peek();if(null===t)return null;if(t!==e)throw o("Expected 0x"+e.toString(16)+": got 0x"+t.toString(16));var r=this.readLength(this._offset+1);if(null===r)return null;if(this.length>4)throw o("Integer too long: "+this.length);if(this.length>this._size-r)return null;this._offset=r;for(var n=this._buf[this._offset],a=0,s=0;s>0},e.exports=s},function(e,t,r){var i=r(29),n=r(106).Buffer,a=r(56),o=r(55).newInvalidAsn1Error,s={size:1024,growthFactor:8};function f(e){var t,r;t=s,r=e||{},i.ok(t),i.equal(typeof t,"object"),i.ok(r),i.equal(typeof r,"object"),Object.getOwnPropertyNames(t).forEach((function(e){if(!r[e]){var i=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(r,e,i)}})),e=r,this._buf=n.alloc(e.size||1024),this._size=this._buf.length,this._offset=0,this._options=e,this._seq=[]}Object.defineProperty(f.prototype,"buffer",{get:function(){if(this._seq.length)throw o(this._seq.length+" unended sequence(s)");return this._buf.slice(0,this._offset)}}),f.prototype.writeByte=function(e){if("number"!=typeof e)throw new TypeError("argument must be a Number");this._ensure(1),this._buf[this._offset++]=e},f.prototype.writeInt=function(e,t){if("number"!=typeof e)throw new TypeError("argument must be a Number");"number"!=typeof t&&(t=a.Integer);for(var r=4;(0==(4286578688&e)||-8388608==(4286578688&e))&&r>1;)r--,e<<=8;if(r>4)throw o("BER ints cannot be > 0xffffffff");for(this._ensure(2+r),this._buf[this._offset++]=t,this._buf[this._offset++]=r;r-- >0;)this._buf[this._offset++]=(4278190080&e)>>>24,e<<=8},f.prototype.writeNull=function(){this.writeByte(a.Null),this.writeByte(0)},f.prototype.writeEnumeration=function(e,t){if("number"!=typeof e)throw new TypeError("argument must be a Number");return"number"!=typeof t&&(t=a.Enumeration),this.writeInt(e,t)},f.prototype.writeBoolean=function(e,t){if("boolean"!=typeof e)throw new TypeError("argument must be a Boolean");"number"!=typeof t&&(t=a.Boolean),this._ensure(3),this._buf[this._offset++]=t,this._buf[this._offset++]=1,this._buf[this._offset++]=e?255:0},f.prototype.writeString=function(e,t){if("string"!=typeof e)throw new TypeError("argument must be a string (was: "+typeof e+")");"number"!=typeof t&&(t=a.OctetString);var r=n.byteLength(e);this.writeByte(t),this.writeLength(r),r&&(this._ensure(r),this._buf.write(e,this._offset),this._offset+=r)},f.prototype.writeBuffer=function(e,t){if("number"!=typeof t)throw new TypeError("tag must be a number");if(!n.isBuffer(e))throw new TypeError("argument must be a buffer");this.writeByte(t),this.writeLength(e.length),this._ensure(e.length),e.copy(this._buf,this._offset,0,e.length),this._offset+=e.length},f.prototype.writeStringArray=function(e){if(!e instanceof Array)throw new TypeError("argument must be an Array[String]");var t=this;e.forEach((function(e){t.writeString(e)}))},f.prototype.writeOID=function(e,t){if("string"!=typeof e)throw new TypeError("argument must be a string");if("number"!=typeof t&&(t=a.OID),!/^([0-9]+\.){3,}[0-9]+$/.test(e))throw new Error("argument is not a valid OID string");var r=e.split("."),i=[];i.push(40*parseInt(r[0],10)+parseInt(r[1],10)),r.slice(2).forEach((function(e){!function(e,t){t<128?e.push(t):t<16384?(e.push(t>>>7|128),e.push(127&t)):t<2097152?(e.push(t>>>14|128),e.push(255&(t>>>7|128)),e.push(127&t)):t<268435456?(e.push(t>>>21|128),e.push(255&(t>>>14|128)),e.push(255&(t>>>7|128)),e.push(127&t)):(e.push(255&(t>>>28|128)),e.push(255&(t>>>21|128)),e.push(255&(t>>>14|128)),e.push(255&(t>>>7|128)),e.push(127&t))}(i,parseInt(e,10))}));var n=this;this._ensure(2+i.length),this.writeByte(t),this.writeLength(i.length),i.forEach((function(e){n.writeByte(e)}))},f.prototype.writeLength=function(e){if("number"!=typeof e)throw new TypeError("argument must be a Number");if(this._ensure(4),e<=127)this._buf[this._offset++]=e;else if(e<=255)this._buf[this._offset++]=129,this._buf[this._offset++]=e;else if(e<=65535)this._buf[this._offset++]=130,this._buf[this._offset++]=e>>8,this._buf[this._offset++]=e;else{if(!(e<=16777215))throw o("Length too long (> 4 bytes)");this._buf[this._offset++]=131,this._buf[this._offset++]=e>>16,this._buf[this._offset++]=e>>8,this._buf[this._offset++]=e}},f.prototype.startSequence=function(e){"number"!=typeof e&&(e=a.Sequence|a.Constructor),this.writeByte(e),this._seq.push(this._offset),this._ensure(3),this._offset+=3},f.prototype.endSequence=function(){var e=this._seq.pop(),t=e+3,r=this._offset-t;if(r<=127)this._shift(t,r,-2),this._buf[e]=r;else if(r<=255)this._shift(t,r,-1),this._buf[e]=129,this._buf[e+1]=r;else if(r<=65535)this._buf[e]=130,this._buf[e+1]=r>>8,this._buf[e+2]=r;else{if(!(r<=16777215))throw o("Sequence too long");this._shift(t,r,1),this._buf[e]=131,this._buf[e+1]=r>>16,this._buf[e+2]=r>>8,this._buf[e+3]=r}},f.prototype._shift=function(e,t,r){i.ok(void 0!==e),i.ok(void 0!==t),i.ok(r),this._buf.copy(this._buf,e+r,e,e+t),this._offset+=r},f.prototype._ensure=function(e){if(i.ok(e),this._size-this._offset{"%%"!==e&&(i++,"%c"===e&&(n=i))}),t.splice(n,0,r)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}!e&&void 0!==i&&"env"in i&&(e=i.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.exports=r(237)(t);const{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}).call(this,r(4))},function(e,t,r){e.exports=function(e){function t(e){let t=0;for(let r=0;r{if("%%"===r)return r;s++;const a=i.formatters[n];if("function"==typeof a){const i=e[s];r=a.call(t,i),e.splice(s,1),s--}return r}),i.formatArgs.call(t,e),(t.log||i.log).apply(t,e)}return o.namespace=e,o.enabled=i.enabled(e),o.useColors=i.useColors(),o.color=t(e),o.destroy=n,o.extend=a,"function"==typeof i.init&&i.init(o),i.instances.push(o),o}function n(){const e=i.instances.indexOf(this);return-1!==e&&(i.instances.splice(e,1),!0)}function a(e,t){const r=i(this.namespace+(void 0===t?":":t)+e);return r.log=this.log,r}function o(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return i.debug=i,i.default=i,i.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},i.disable=function(){const e=[...i.names.map(o),...i.skips.map(o).map(e=>"-"+e)].join(",");return i.enable(""),e},i.enable=function(e){let t;i.save(e),i.names=[],i.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),n=r.length;for(t=0;t{i[t]=e[t]}),i.instances=[],i.names=[],i.skips=[],i.formatters={},i.selectColor=t,i.enable(i.load()),i}},function(e,t){var r=1e3,i=60*r,n=60*i,a=24*n,o=7*a,s=365.25*a;function f(e,t,r,i){var n=t>=1.5*r;return Math.round(e/r)+" "+i+(n?"s":"")}e.exports=function(e,t){t=t||{};var c=typeof e;if("string"===c&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!t)return;var f=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return f*s;case"weeks":case"week":case"w":return f*o;case"days":case"day":case"d":return f*a;case"hours":case"hour":case"hrs":case"hr":case"h":return f*n;case"minutes":case"minute":case"mins":case"min":case"m":return f*i;case"seconds":case"second":case"secs":case"sec":case"s":return f*r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return f;default:return}}(e);if("number"===c&&isFinite(e))return t.long?function(e){var t=Math.abs(e);if(t>=a)return f(e,t,a,"day");if(t>=n)return f(e,t,n,"hour");if(t>=i)return f(e,t,i,"minute");if(t>=r)return f(e,t,r,"second");return e+" ms"}(e):function(e){var t=Math.abs(e);if(t>=a)return Math.round(e/a)+"d";if(t>=n)return Math.round(e/n)+"h";if(t>=i)return Math.round(e/i)+"m";if(t>=r)return Math.round(e/r)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},function(e,t,r){"use strict";const i=r(74);e.exports=function(e,t){return new i(t,"pkcs1-private-pem",{signingScheme:"pkcs1-sha1"}).sign(e)}},function(e,t,r){"use strict";const i=r(10),n=r(241);e.exports=function(e){const t=i.createHash("sha256");t.update(e);const r=t.digest().toString("hex").slice(0,32);return n(r)}},function(e,t,r){"use strict";const i="a".charCodeAt(0)-"0".charCodeAt(0),n="k".charCodeAt(0)-"a".charCodeAt(0);e.exports=function(e){return Array.from(e).map(e=>{if(e>="0"&&e<="9")return String.fromCharCode(e.charCodeAt(0)+i);if(e>="a"&&e<="f")return String.fromCharCode(e.charCodeAt(0)+n);throw new Error(`invalid char: ${e}`)}).join("")}},function(e,t,r){(function(e){function r(e,t){for(var r=0,i=e.length-1;i>=0;i--){var n=e[i];"."===n?e.splice(i,1):".."===n?(e.splice(i,1),r++):r&&(e.splice(i,1),r--)}if(t)for(;r--;r)e.unshift("..");return e}function i(e,t){if(e.filter)return e.filter(t);for(var r=[],i=0;i=-1&&!n;a--){var o=a>=0?arguments[a]:e.cwd();if("string"!=typeof o)throw new TypeError("Arguments to path.resolve must be strings");o&&(t=o+"/"+t,n="/"===o.charAt(0))}return(n?"/":"")+(t=r(i(t.split("/"),(function(e){return!!e})),!n).join("/"))||"."},t.normalize=function(e){var a=t.isAbsolute(e),o="/"===n(e,-1);return(e=r(i(e.split("/"),(function(e){return!!e})),!a).join("/"))||a||(e="."),e&&o&&(e+="/"),(a?"/":"")+e},t.isAbsolute=function(e){return"/"===e.charAt(0)},t.join=function(){var e=Array.prototype.slice.call(arguments,0);return t.normalize(i(e,(function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e})).join("/"))},t.relative=function(e,r){function i(e){for(var t=0;t=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=t.resolve(e).substr(1),r=t.resolve(r).substr(1);for(var n=i(e.split("/")),a=i(r.split("/")),o=Math.min(n.length,a.length),s=o,f=0;f=1;--a)if(47===(t=e.charCodeAt(a))){if(!n){i=a;break}}else n=!1;return-1===i?r?"/":".":r&&1===i?"/":e.slice(0,i)},t.basename=function(e,t){var r=function(e){"string"!=typeof e&&(e+="");var t,r=0,i=-1,n=!0;for(t=e.length-1;t>=0;--t)if(47===e.charCodeAt(t)){if(!n){r=t+1;break}}else-1===i&&(n=!1,i=t+1);return-1===i?"":e.slice(r,i)}(e);return t&&r.substr(-1*t.length)===t&&(r=r.substr(0,r.length-t.length)),r},t.extname=function(e){"string"!=typeof e&&(e+="");for(var t=-1,r=0,i=-1,n=!0,a=0,o=e.length-1;o>=0;--o){var s=e.charCodeAt(o);if(47!==s)-1===i&&(n=!1,i=o+1),46===s?-1===t?t=o:1!==a&&(a=1):-1!==t&&(a=-1);else if(!n){r=o+1;break}}return-1===t||-1===i||0===a||1===a&&t===i-1&&t===r+1?"":e.slice(t,i)};var n="b"==="ab".substr(-1)?function(e,t,r){return e.substr(t,r)}:function(e,t,r){return t<0&&(t=e.length+t),e.substr(t,r)}}).call(this,r(4))},function(e,t,r){(function(e,i){var n=r(37),a=r(68),o=r(244),s=r(71),f=r(14),c=r(15).EventEmitter,u=r(6).Transform,h=r(6).PassThrough,d=r(6).Writable;function l(e,t,r){"function"==typeof t&&(r=t,t=null),null==t&&(t={}),null==t.autoClose&&(t.autoClose=!1),null==t.lazyEntries&&(t.lazyEntries=!1),null==t.decodeStrings&&(t.decodeStrings=!0),null==t.validateEntrySizes&&(t.validateEntrySizes=!0),null==t.strictFileNames&&(t.strictFileNames=!1),null==r&&(r=O),n.fstat(e,(function(i,n){if(i)return r(i);p(o.createFromFd(e,{autoClose:!0}),n.size,t,r)}))}function p(e,t,r,i){"function"==typeof r&&(i=r,r=null),null==r&&(r={}),null==r.autoClose&&(r.autoClose=!0),null==r.lazyEntries&&(r.lazyEntries=!1),null==r.decodeStrings&&(r.decodeStrings=!0);var n=!!r.decodeStrings;if(null==r.validateEntrySizes&&(r.validateEntrySizes=!0),null==r.strictFileNames&&(r.strictFileNames=!1),null==i&&(i=O),"number"!=typeof t)throw new Error("expected totalSize parameter to be a number");if(t>Number.MAX_SAFE_INTEGER)throw new Error("zip file too large. only file sizes up to 2^52 are supported due to JavaScript's Number type being an IEEE 754 double.");e.ref();var a=Math.min(65557,t),o=k(a),s=t-o.length;w(e,o,0,a,s,(function(f){if(f)return i(f);for(var c=a-22;c>=0;c-=1)if(101010256===o.readUInt32LE(c)){var u=o.slice(c),h=u.readUInt16LE(4);if(0!==h)return i(new Error("multi-disk zip files are not supported: found disk number: "+h));var d=u.readUInt16LE(10),l=u.readUInt32LE(16),p=u.readUInt16LE(20),b=u.length-22;if(p!==b)return i(new Error("invalid comment length. expected: "+b+". found: "+p));var v=n?x(u,22,u.length,!1):u.slice(22);if(65535!==d&&4294967295!==l)return i(null,new m(e,l,t,d,v,r.autoClose,r.lazyEntries,n,r.validateEntrySizes,r.strictFileNames));var g=k(20),y=s+c-g.length;return void w(e,g,0,g.length,y,(function(a){if(a)return i(a);if(117853008!==g.readUInt32LE(0))return i(new Error("invalid zip64 end of central directory locator signature"));var o=I(g,8),s=k(56);w(e,s,0,s.length,o,(function(a){return a?i(a):101075792!==s.readUInt32LE(0)?i(new Error("invalid zip64 end of central directory record signature")):(d=I(s,32),l=I(s,48),i(null,new m(e,l,t,d,v,r.autoClose,r.lazyEntries,n,r.validateEntrySizes,r.strictFileNames)))}))}))}i(new Error("end of central directory record signature not found"))}))}function m(e,t,r,i,n,a,o,s,f,u){var h=this;c.call(h),h.reader=e,h.reader.on("error",(function(e){v(h,e)})),h.reader.once("close",(function(){h.emit("close")})),h.readEntryCursor=t,h.fileSize=r,h.entryCount=i,h.comment=n,h.entriesRead=0,h.autoClose=!!a,h.lazyEntries=!!o,h.decodeStrings=!!s,h.validateEntrySizes=!!f,h.strictFileNames=!!u,h.isOpen=!0,h.emittedError=!1,h.lazyEntries||h._readEntry()}function b(e,t){e.autoClose&&e.close(),v(e,t)}function v(e,t){e.emittedError||(e.emittedError=!0,e.emit("error",t))}function g(){}function y(e,t){return new Date(1980+(e>>9&127),(e>>5&15)-1,31&e,t>>11&31,t>>5&63,2*(31&t),0)}function _(e){return-1!==e.indexOf("\\")?"invalid characters in fileName: "+e:/^[a-zA-Z]:/.test(e)||/^\//.test(e)?"absolute path: "+e:-1!==e.split("/").indexOf("..")?"invalid relative path: "+e:null}function w(t,r,i,n,a,o){if(0===n)return e((function(){o(null,k(0))}));t.read(r,i,n,a,(function(e,t){return e?o(e):to.length)return b(t,new Error("extra field length exceeds extra field buffer size"));var l=k(u);o.copy(l,0,h,d),i.extraFields.push({id:c,data:l}),f=d}if(i.fileComment=t.decodeStrings?x(r,a,a+i.fileCommentLength,n):r.slice(a,a+i.fileCommentLength),i.comment=i.fileComment,t.readEntryCursor+=r.length,t.entriesRead+=1,4294967295===i.uncompressedSize||4294967295===i.compressedSize||4294967295===i.relativeOffsetOfLocalHeader){var p=null;for(f=0;fp.length)return b(t,new Error("zip64 extended information extra field does not include uncompressed size"));i.uncompressedSize=I(p,m),m+=8}if(4294967295===i.compressedSize){if(m+8>p.length)return b(t,new Error("zip64 extended information extra field does not include compressed size"));i.compressedSize=I(p,m),m+=8}if(4294967295===i.relativeOffsetOfLocalHeader){if(m+8>p.length)return b(t,new Error("zip64 extended information extra field does not include relative header offset"));i.relativeOffsetOfLocalHeader=I(p,m),m+=8}}if(t.decodeStrings)for(f=0;ft.compressedSize)throw new Error("options.start > entry.compressedSize")}if(null!=r.end){if((s=r.end)<0)throw new Error("options.end < 0");if(s>t.compressedSize)throw new Error("options.end > entry.compressedSize");if(sn.fileSize)return i(new Error("file data overflows file bounds: "+m+" + "+t.compressedSize+" > "+n.fileSize));var v=n.reader.createReadStream({start:m+o,end:m+s}),g=v;if(h){var y=!1,_=a.createInflateRaw();v.on("error",(function(t){e((function(){y||_.emit("error",t)}))})),v.pipe(_),n.validateEntrySizes?(g=new E(t.uncompressedSize),_.on("error",(function(t){e((function(){y||g.emit("error",t)}))})),_.pipe(g)):g=_,g.destroy=function(){y=!0,_!==g&&_.unpipe(g),v.unpipe(_),v.destroy()}}i(null,g)}finally{n.reader.unref()}}))},g.prototype.getLastModDate=function(){return y(this.lastModFileDate,this.lastModFileTime)},g.prototype.isEncrypted=function(){return 0!=(1&this.generalPurposeBitFlag)},g.prototype.isCompressed=function(){return 8===this.compressionMethod},f.inherits(E,u),E.prototype._transform=function(e,t,r){if(this.actualByteCount+=e.length,this.actualByteCount>this.expectedByteCount){var i="too many bytes in the stream. expected "+this.expectedByteCount+". got at least "+this.actualByteCount;return r(new Error(i))}r(null,e)},E.prototype._flush=function(e){if(this.actualByteCount0)){if(e.refCount<0)throw new Error("invalid unref");e.close((function(t){if(t)return e.emit("error",t);e.emit("close")}))}},S.prototype.createReadStream=function(t){var r=t.start,i=t.end;if(r===i){var n=new h;return e((function(){n.end()})),n}var a=this._readStreamForRange(r,i),o=!1,s=new P(this);a.on("error",(function(t){e((function(){o||s.emit("error",t)}))})),s.destroy=function(){a.unpipe(s),s.unref(),a.destroy()};var f=new E(i-r);return s.on("error",(function(t){e((function(){o||f.emit("error",t)}))})),f.destroy=function(){o=!0,s.unpipe(f),s.destroy()},a.pipe(s).pipe(f)},S.prototype._readStreamForRange=function(e,t){throw new Error("not implemented")},S.prototype.read=function(e,t,r,i,n){var a=this.createReadStream({start:i,end:i+r}),o=new d,s=0;o._write=function(r,i,n){r.copy(e,t+s,0,r.length),s+=r.length,n()},o.on("finish",n),a.on("error",(function(e){n(e)})),a.pipe(o)},S.prototype.close=function(t){e(t)},f.inherits(P,h),P.prototype._flush=function(e){this.unref(),e()},P.prototype.unref=function(e){this.unreffedYet||(this.unreffedYet=!0,this.context.unref())};var k,A="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ";function x(e,t,r,i){if(i)return e.toString("utf8",t,r);for(var n="",a=t;a0)){if(e.refCount<0)throw new Error("invalid unref");e.autoClose&&n.close(e.fd,(function(t){t?e.emit("error",t):e.emit("close")}))}},a.inherits(l,s),l.prototype._read=function(t){var r=this;if(!r.destroyed){var i=Math.min(r._readableState.highWaterMark,t);if(null!=r.endOffset&&(i=Math.min(i,r.endOffset-r.pos)),i<=0)return r.destroyed=!0,r.push(null),void r.context.unref();r.context.pend.go((function(t){if(r.destroyed)return t();var a=new e(i);n.read(r.context.fd,a,0,i,r.pos,(function(e,i){e?r.destroy(e):0===i?(r.destroyed=!0,r.push(null),r.context.unref()):(r.pos+=i,r.push(a.slice(0,i))),t()}))}))}},l.prototype.destroy=function(e){this.destroyed||(e=e||new Error("stream destroyed"),this.destroyed=!0,this.emit("error",e),this.context.unref())},a.inherits(p,f),p.prototype._write=function(e,t,r){var i=this;if(!i.destroyed){if(i.pos+e.length>i.endOffset){var a=new Error("maximum file length exceeded");return a.code="ETOOBIG",i.destroy(),void r(a)}i.context.pend.go((function(t){if(i.destroyed)return t();n.write(i.context.fd,e,0,e.length,i.pos,(function(e,n){e?(i.destroy(),t(),r(e)):(i.bytesWritten+=n,i.pos+=n,i.emit("progress"),t(),r())}))}))}},p.prototype.destroy=function(){this.destroyed||(this.destroyed=!0,this.context.unref())},a.inherits(m,h),m.prototype.read=function(e,t,r,n,a){var o=n+r,s=o-this.buffer.length,f=s>0?s:r;this.buffer.copy(e,t,n,o),i((function(){a(null,f)}))},m.prototype.write=function(e,t,r,n,a){e.copy(this.buffer,n,t,t+r),i((function(){a(null,r,e)}))},m.prototype.createReadStream=function(e){var t=new c(e=e||{});t.destroyed=!1,t.start=e.start||0,t.endOffset=e.end,t.pos=t.endOffset||this.buffer.length;for(var r=this.buffer.slice(t.start,t.pos),i=0;;){var n=i+this.maxChunkSize;if(n>=r.length){ir.endOffset){var o=new Error("maximum file length exceeded");return o.code="ETOOBIG",r.destroyed=!0,void n(o)}e.copy(t.buffer,r.pos,0,e.length),r.bytesWritten+=e.length,r.pos=a,r.emit("progress"),n()}},r.destroy=function(){r.destroyed=!0},r},m.prototype.ref=function(){this.refCount+=1},m.prototype.unref=function(){if(this.refCount-=1,this.refCount<0)throw new Error("invalid unref")}}).call(this,r(1).Buffer,r(27).setImmediate)},function(e,t){function r(){this.pending=0,this.max=1/0,this.listeners=[],this.waiting=[],this.error=null}function i(e){e.pending+=1;var t=!1;return function(i){if(t)throw new Error("callback called twice");if(t=!0,e.error=e.error||i,e.pending-=1,e.waiting.length>0&&e.pending!0,c=()=>!0;"function"==typeof t.relativePath&&(r=t.relativePath),"function"==typeof t.maxFileSize&&(c=t.maxFileSize);const u=new i({schemaId:"auto",meta:!1,allErrors:!0,unknownFormats:!0,errorDataPath:"property",formats:{"http-url":e=>s(e,!0),"https-url":e=>s(e),"relative-path":r}});u.addMetaSchema(n),u._opts.defaultMeta=n.id,u.removeKeyword("propertyNames"),u.removeKeyword("contains"),u.removeKeyword("const"),u.removeKeyword("if"),u.removeKeyword("then"),u.removeKeyword("else"),u.addKeyword("maxFileSize",{validate:function e(t,r){const i=a.parse(t),n=c(i,r);return n||(e.errors=[{keyword:"maxFileSize",message:`file size should be <= ${t}`,params:{limit:i}}]),n}});const h=u.compile(o);return{valid:h(e),errors:f(h.errors)}}},function(e,t,r){"use strict";var i=r(250),n=r(57),a=r(254),o=r(108),s=r(109),f=r(111),c=r(255),u=r(276),h=r(19);e.exports=v,v.prototype.validate=function(e,t){var r;if("string"==typeof e){if(!(r=this.getSchema(e)))throw new Error('no schema with key or ref "'+e+'"')}else{var i=this._addSchema(e);r=i.validate||this._compile(i)}var n=r(t);!0!==r.$async&&(this.errors=r.errors);return n},v.prototype.compile=function(e,t){var r=this._addSchema(e,void 0,t);return r.validate||this._compile(r)},v.prototype.addSchema=function(e,t,r,i){if(Array.isArray(e)){for(var a=0;a=0?{index:i,compiling:!0}:(i=this._compilations.length,this._compilations[i]={schema:e,root:t,baseId:r},{index:i,compiling:!1})}function d(e,t,r){var i=l.call(this,e,t,r);i>=0&&this._compilations.splice(i,1)}function l(e,t,r){for(var i=0;i1){t[0]=t[0].slice(0,-1);for(var i=t.length-1,n=1;n= 0x80 (not a basic code point)","invalid-input":"Invalid input"},p=Math.floor,m=String.fromCharCode;function b(e){throw new RangeError(l[e])}function v(e,t){var r=e.split("@"),i="";r.length>1&&(i=r[0]+"@",e=r[1]);var n=function(e,t){for(var r=[],i=e.length;i--;)r[i]=t(e[i]);return r}((e=e.replace(d,".")).split("."),t).join(".");return i+n}function g(e){for(var t=[],r=0,i=e.length;r=55296&&n<=56319&&r>1,e+=p(e/t);e>455;i+=36)e=p(e/35);return p(i+36*e/(e+38))},w=function(e){var t,r=[],i=e.length,n=0,a=128,o=72,s=e.lastIndexOf("-");s<0&&(s=0);for(var f=0;f=128&&b("not-basic"),r.push(e.charCodeAt(f));for(var u=s>0?s+1:0;u=i&&b("invalid-input");var m=(t=e.charCodeAt(u++))-48<10?t-22:t-65<26?t-65:t-97<26?t-97:36;(m>=36||m>p((c-n)/d))&&b("overflow"),n+=m*d;var v=l<=o?1:l>=o+26?26:l-o;if(mp(c/g)&&b("overflow"),d*=g}var y=r.length+1;o=_(n-h,y,0==h),p(n/y)>c-a&&b("overflow"),a+=p(n/y),n%=y,r.splice(n++,0,a)}return String.fromCodePoint.apply(String,r)},E=function(e){var t=[],r=(e=g(e)).length,i=128,n=0,a=72,o=!0,s=!1,f=void 0;try{for(var u,h=e[Symbol.iterator]();!(o=(u=h.next()).done);o=!0){var d=u.value;d<128&&t.push(m(d))}}catch(e){s=!0,f=e}finally{try{!o&&h.return&&h.return()}finally{if(s)throw f}}var l=t.length,v=l;for(l&&t.push("-");v=i&&xp((c-n)/I)&&b("overflow"),n+=(w-i)*I,i=w;var O=!0,M=!1,R=void 0;try{for(var T,D=e[Symbol.iterator]();!(O=(T=D.next()).done);O=!0){var C=T.value;if(Cc&&b("overflow"),C==i){for(var L=n,B=36;;B+=36){var N=B<=a?1:B>=a+26?26:B-a;if(L>6|192).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase():"%"+(t>>12|224).toString(16).toUpperCase()+"%"+(t>>6&63|128).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase()}function A(e){for(var t="",r=0,i=e.length;r=194&&n<224){if(i-r>=6){var a=parseInt(e.substr(r+4,2),16);t+=String.fromCharCode((31&n)<<6|63&a)}else t+=e.substr(r,6);r+=6}else if(n>=224){if(i-r>=9){var o=parseInt(e.substr(r+4,2),16),s=parseInt(e.substr(r+7,2),16);t+=String.fromCharCode((15&n)<<12|(63&o)<<6|63&s)}else t+=e.substr(r,9);r+=9}else t+=e.substr(r,3),r+=3}return t}function x(e,t){function r(e){var r=A(e);return r.match(t.UNRESERVED)?r:e}return e.scheme&&(e.scheme=String(e.scheme).replace(t.PCT_ENCODED,r).toLowerCase().replace(t.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(t.PCT_ENCODED,r).replace(t.NOT_USERINFO,k).replace(t.PCT_ENCODED,n)),void 0!==e.host&&(e.host=String(e.host).replace(t.PCT_ENCODED,r).toLowerCase().replace(t.NOT_HOST,k).replace(t.PCT_ENCODED,n)),void 0!==e.path&&(e.path=String(e.path).replace(t.PCT_ENCODED,r).replace(e.scheme?t.NOT_PATH:t.NOT_PATH_NOSCHEME,k).replace(t.PCT_ENCODED,n)),void 0!==e.query&&(e.query=String(e.query).replace(t.PCT_ENCODED,r).replace(t.NOT_QUERY,k).replace(t.PCT_ENCODED,n)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(t.PCT_ENCODED,r).replace(t.NOT_FRAGMENT,k).replace(t.PCT_ENCODED,n)),e}function I(e){return e.replace(/^0*(.*)/,"$1")||"0"}function O(e,t){var r=e.match(t.IPV4ADDRESS)||[],i=f(r,2)[1];return i?i.split(".").map(I).join("."):e}function M(e,t){var r=e.match(t.IPV6ADDRESS)||[],i=f(r,3),n=i[1],a=i[2];if(n){for(var o=n.toLowerCase().split("::").reverse(),s=f(o,2),c=s[0],u=s[1],h=u?u.split(":").map(I):[],d=c.split(":").map(I),l=t.IPV4ADDRESS.test(d[d.length-1]),p=l?7:8,m=d.length-p,b=Array(p),v=0;v1){var _=b.slice(0,g.index),w=b.slice(g.index+g.length);y=_.join(":")+"::"+w.join(":")}else y=b.join(":");return a&&(y+="%"+a),y}return e}var R=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,T=void 0==="".match(/(){0}/)[1];function D(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={},i=!1!==t.iri?s:o;"suffix"===t.reference&&(e=(t.scheme?t.scheme+":":"")+"//"+e);var n=e.match(R);if(n){T?(r.scheme=n[1],r.userinfo=n[3],r.host=n[4],r.port=parseInt(n[5],10),r.path=n[6]||"",r.query=n[7],r.fragment=n[8],isNaN(r.port)&&(r.port=n[5])):(r.scheme=n[1]||void 0,r.userinfo=-1!==e.indexOf("@")?n[3]:void 0,r.host=-1!==e.indexOf("//")?n[4]:void 0,r.port=parseInt(n[5],10),r.path=n[6]||"",r.query=-1!==e.indexOf("?")?n[7]:void 0,r.fragment=-1!==e.indexOf("#")?n[8]:void 0,isNaN(r.port)&&(r.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?n[4]:void 0)),r.host&&(r.host=M(O(r.host,i),i)),void 0!==r.scheme||void 0!==r.userinfo||void 0!==r.host||void 0!==r.port||r.path||void 0!==r.query?void 0===r.scheme?r.reference="relative":void 0===r.fragment?r.reference="absolute":r.reference="uri":r.reference="same-document",t.reference&&"suffix"!==t.reference&&t.reference!==r.reference&&(r.error=r.error||"URI is not a "+t.reference+" reference.");var a=P[(t.scheme||r.scheme||"").toLowerCase()];if(t.unicodeSupport||a&&a.unicodeSupport)x(r,i);else{if(r.host&&(t.domainHost||a&&a.domainHost))try{r.host=S.toASCII(r.host.replace(i.PCT_ENCODED,A).toLowerCase())}catch(e){r.error=r.error||"Host's domain name can not be converted to ASCII via punycode: "+e}x(r,o)}a&&a.parse&&a.parse(r,t)}else r.error=r.error||"URI can not be parsed.";return r}var C=/^\.\.?\//,L=/^\/\.(\/|$)/,B=/^\/\.\.(\/|$)/,N=/^\/?(?:.|\n)*?(?=\/|$)/;function F(e){for(var t=[];e.length;)if(e.match(C))e=e.replace(C,"");else if(e.match(L))e=e.replace(L,"/");else if(e.match(B))e=e.replace(B,"/"),t.pop();else if("."===e||".."===e)e="";else{var r=e.match(N);if(!r)throw new Error("Unexpected dot segment condition");var i=r[0];e=e.slice(i.length),t.push(i)}return t.join("")}function j(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.iri?s:o,i=[],n=P[(t.scheme||e.scheme||"").toLowerCase()];if(n&&n.serialize&&n.serialize(e,t),e.host)if(r.IPV6ADDRESS.test(e.host));else if(t.domainHost||n&&n.domainHost)try{e.host=t.iri?S.toUnicode(e.host):S.toASCII(e.host.replace(r.PCT_ENCODED,A).toLowerCase())}catch(r){e.error=e.error||"Host's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+r}x(e,r),"suffix"!==t.reference&&e.scheme&&(i.push(e.scheme),i.push(":"));var a=function(e,t){var r=!1!==t.iri?s:o,i=[];return void 0!==e.userinfo&&(i.push(e.userinfo),i.push("@")),void 0!==e.host&&i.push(M(O(String(e.host),r),r).replace(r.IPV6ADDRESS,(function(e,t,r){return"["+t+(r?"%25"+r:"")+"]"}))),"number"==typeof e.port&&(i.push(":"),i.push(e.port.toString(10))),i.length?i.join(""):void 0}(e,t);if(void 0!==a&&("suffix"!==t.reference&&i.push("//"),i.push(a),e.path&&"/"!==e.path.charAt(0)&&i.push("/")),void 0!==e.path){var f=e.path;t.absolutePath||n&&n.absolutePath||(f=F(f)),void 0===a&&(f=f.replace(/^\/\//,"/%2F")),i.push(f)}return void 0!==e.query&&(i.push("?"),i.push(e.query)),void 0!==e.fragment&&(i.push("#"),i.push(e.fragment)),i.join("")}function z(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i={};return arguments[3]||(e=D(j(e,r),r),t=D(j(t,r),r)),!(r=r||{}).tolerant&&t.scheme?(i.scheme=t.scheme,i.userinfo=t.userinfo,i.host=t.host,i.port=t.port,i.path=F(t.path||""),i.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(i.userinfo=t.userinfo,i.host=t.host,i.port=t.port,i.path=F(t.path||""),i.query=t.query):(t.path?("/"===t.path.charAt(0)?i.path=F(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?i.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:i.path=t.path:i.path="/"+t.path,i.path=F(i.path)),i.query=t.query):(i.path=e.path,void 0!==t.query?i.query=t.query:i.query=e.query),i.userinfo=e.userinfo,i.host=e.host,i.port=e.port),i.scheme=e.scheme),i.fragment=t.fragment,i}function U(e,t){return e&&e.toString().replace(t&&t.iri?s.PCT_ENCODED:o.PCT_ENCODED,A)}var q={scheme:"http",domainHost:!0,parse:function(e,t){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,t){return e.port!==("https"!==String(e.scheme).toLowerCase()?80:443)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},$={scheme:"https",domainHost:q.domainHost,parse:q.parse,serialize:q.serialize},K={},H="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",Z="[0-9A-Fa-f]",G=r(r("%[EFef][0-9A-Fa-f]%"+Z+Z+"%"+Z+Z)+"|"+r("%[89A-Fa-f][0-9A-Fa-f]%"+Z+Z)+"|"+r("%"+Z+Z)),V=t("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),Y=new RegExp(H,"g"),W=new RegExp(G,"g"),X=new RegExp(t("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',V),"g"),Q=new RegExp(t("[^]",H,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),J=Q;function ee(e){var t=A(e);return t.match(Y)?t:e}var te={scheme:"mailto",parse:function(e,t){var r=e,i=r.to=r.path?r.path.split(","):[];if(r.path=void 0,r.query){for(var n=!1,a={},o=r.query.split("&"),s=0,f=o.length;s=55296&&t<=56319&&n0:e.util.schemaHasRules(p,e.RULES.all))&&(d=!1,f.schema=p,f.schemaPath=a+"["+m+"]",f.errSchemaPath=o+"/"+m,i+=" "+e.validate(f)+" ",f.baseId=h,s&&(i+=" if ("+u+") { ",c+="}"));return s&&(i+=d?" if (true) { ":" "+c.slice(0,-1)+" "),i=e.util.cleanUpCode(i)}},function(e,t,r){"use strict";e.exports=function(e,t,r){var i=" ",n=e.level,a=e.dataLevel,o=e.schema[t],s=e.schemaPath+e.util.getProperty(t),f=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,u="data"+(a||""),h="valid"+n,d="errs__"+n,l=e.util.copy(e),p="";l.level++;var m="valid"+l.level;if(o.every((function(t){return e.opts.strictKeywords?"object"==typeof t&&Object.keys(t).length>0:e.util.schemaHasRules(t,e.RULES.all)}))){var b=l.baseId;i+=" var "+d+" = errors; var "+h+" = false; ";var v=e.compositeRule;e.compositeRule=l.compositeRule=!0;var g=o;if(g)for(var y,_=-1,w=g.length-1;_0:e.util.schemaHasRules(o,e.RULES.all);if(i+="var "+d+" = errors;var "+h+";",y){var _=e.compositeRule;e.compositeRule=l.compositeRule=!0,l.schema=o,l.schemaPath=s,l.errSchemaPath=f,i+=" var "+p+" = false; for (var "+m+" = 0; "+m+" < "+u+".length; "+m+"++) { ",l.errorPath=e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers,!0);var w=u+"["+m+"]";l.dataPathArr[b]=m;var E=e.validate(l);l.baseId=g,e.util.varOccurences(E,v)<2?i+=" "+e.util.varReplace(E,v,w)+" ":i+=" var "+v+" = "+w+"; "+E+" ",i+=" if ("+p+") break; } ",e.compositeRule=l.compositeRule=_,i+=" if (!"+p+") {"}else i+=" if ("+u+".length == 0) {";var S=S||[];S.push(i),i="",!1!==e.createErrors?(i+=" { keyword: 'contains' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: {} ",!1!==e.opts.messages&&(i+=" , message: 'should contain a valid item' "),e.opts.verbose&&(i+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),i+=" } "):i+=" {} ";var P=i;return i=S.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+P+"]); ":i+=" validate.errors = ["+P+"]; return false; ":i+=" var err = "+P+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } else { ",y&&(i+=" errors = "+d+"; if (vErrors !== null) { if ("+d+") vErrors.length = "+d+"; else vErrors = null; } "),e.opts.allErrors&&(i+=" } "),i=e.util.cleanUpCode(i)}},function(e,t,r){"use strict";e.exports=function(e,t,r){var i=" ",n=e.level,a=e.dataLevel,o=e.schema[t],s=e.schemaPath+e.util.getProperty(t),f=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,u="data"+(a||""),h="errs__"+n,d=e.util.copy(e),l="";d.level++;var p="valid"+d.level,m={},b={},v=e.opts.ownProperties;for(w in o){var g=o[w],y=Array.isArray(g)?b:m;y[w]=g}i+="var "+h+" = errors;";var _=e.errorPath;for(var w in i+="var missing"+n+";",b)if((y=b[w]).length){if(i+=" if ( "+u+e.util.getProperty(w)+" !== undefined ",v&&(i+=" && Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(w)+"') "),c){i+=" && ( ";var E=y;if(E)for(var S=-1,P=E.length-1;S0:e.util.schemaHasRules(g,e.RULES.all))&&(i+=" "+p+" = true; if ( "+u+e.util.getProperty(w)+" !== undefined ",v&&(i+=" && Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(w)+"') "),i+=") { ",d.schema=g,d.schemaPath=s+e.util.getProperty(w),d.errSchemaPath=f+"/"+e.util.escapeFragment(w),i+=" "+e.validate(d)+" ",d.baseId=L,i+=" } ",c&&(i+=" if ("+p+") { ",l+="}"))}return c&&(i+=" "+l+" if ("+h+" == errors) {"),i=e.util.cleanUpCode(i)}},function(e,t,r){"use strict";e.exports=function(e,t,r){var i=" ",n=e.level,a=e.dataLevel,o=e.schema[t],s=e.schemaPath+e.util.getProperty(t),f=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,u="data"+(a||""),h="valid"+n,d=e.opts.$data&&o&&o.$data;d&&(i+=" var schema"+n+" = "+e.util.getData(o.$data,a,e.dataPathArr)+"; ");var l="i"+n,p="schema"+n;d||(i+=" var "+p+" = validate.schema"+s+";"),i+="var "+h+";",d&&(i+=" if (schema"+n+" === undefined) "+h+" = true; else if (!Array.isArray(schema"+n+")) "+h+" = false; else {"),i+=h+" = false;for (var "+l+"=0; "+l+"<"+p+".length; "+l+"++) if (equal("+u+", "+p+"["+l+"])) { "+h+" = true; break; }",d&&(i+=" } "),i+=" if (!"+h+") { ";var m=m||[];m.push(i),i="",!1!==e.createErrors?(i+=" { keyword: 'enum' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { allowedValues: schema"+n+" } ",!1!==e.opts.messages&&(i+=" , message: 'should be equal to one of the allowed values' "),e.opts.verbose&&(i+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),i+=" } "):i+=" {} ";var b=i;return i=m.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+b+"]); ":i+=" validate.errors = ["+b+"]; return false; ":i+=" var err = "+b+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" }",c&&(i+=" else { "),i}},function(e,t,r){"use strict";e.exports=function(e,t,r){var i=" ",n=e.level,a=e.dataLevel,o=e.schema[t],s=e.schemaPath+e.util.getProperty(t),f=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,u="data"+(a||"");if(!1===e.opts.format)return c&&(i+=" if (true) { "),i;var h,d=e.opts.$data&&o&&o.$data;d?(i+=" var schema"+n+" = "+e.util.getData(o.$data,a,e.dataPathArr)+"; ",h="schema"+n):h=o;var l=e.opts.unknownFormats,p=Array.isArray(l);if(d){i+=" var "+(m="format"+n)+" = formats["+h+"]; var "+(b="isObject"+n)+" = typeof "+m+" == 'object' && !("+m+" instanceof RegExp) && "+m+".validate; var "+(v="formatType"+n)+" = "+b+" && "+m+".type || 'string'; if ("+b+") { ",e.async&&(i+=" var async"+n+" = "+m+".async; "),i+=" "+m+" = "+m+".validate; } if ( ",d&&(i+=" ("+h+" !== undefined && typeof "+h+" != 'string') || "),i+=" (","ignore"!=l&&(i+=" ("+h+" && !"+m+" ",p&&(i+=" && self._opts.unknownFormats.indexOf("+h+") == -1 "),i+=") || "),i+=" ("+m+" && "+v+" == '"+r+"' && !(typeof "+m+" == 'function' ? ",e.async?i+=" (async"+n+" ? await "+m+"("+u+") : "+m+"("+u+")) ":i+=" "+m+"("+u+") ",i+=" : "+m+".test("+u+"))))) {"}else{var m;if(!(m=e.formats[o])){if("ignore"==l)return e.logger.warn('unknown format "'+o+'" ignored in schema at path "'+e.errSchemaPath+'"'),c&&(i+=" if (true) { "),i;if(p&&l.indexOf(o)>=0)return c&&(i+=" if (true) { "),i;throw new Error('unknown format "'+o+'" is used in schema at path "'+e.errSchemaPath+'"')}var b,v=(b="object"==typeof m&&!(m instanceof RegExp)&&m.validate)&&m.type||"string";if(b){var g=!0===m.async;m=m.validate}if(v!=r)return c&&(i+=" if (true) { "),i;if(g){if(!e.async)throw new Error("async format in sync schema");i+=" if (!(await "+(y="formats"+e.util.getProperty(o)+".validate")+"("+u+"))) { "}else{i+=" if (! ";var y="formats"+e.util.getProperty(o);b&&(y+=".validate"),i+="function"==typeof m?" "+y+"("+u+") ":" "+y+".test("+u+") ",i+=") { "}}var _=_||[];_.push(i),i="",!1!==e.createErrors?(i+=" { keyword: 'format' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { format: ",i+=d?""+h:""+e.util.toQuotedString(o),i+=" } ",!1!==e.opts.messages&&(i+=" , message: 'should match format \"",i+=d?"' + "+h+" + '":""+e.util.escapeQuotes(o),i+="\"' "),e.opts.verbose&&(i+=" , schema: ",i+=d?"validate.schema"+s:""+e.util.toQuotedString(o),i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),i+=" } "):i+=" {} ";var w=i;return i=_.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+w+"]); ":i+=" validate.errors = ["+w+"]; return false; ":i+=" var err = "+w+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } ",c&&(i+=" else { "),i}},function(e,t,r){"use strict";e.exports=function(e,t,r){var i=" ",n=e.level,a=e.dataLevel,o=e.schema[t],s=e.schemaPath+e.util.getProperty(t),f=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,u="data"+(a||""),h="valid"+n,d="errs__"+n,l=e.util.copy(e);l.level++;var p="valid"+l.level,m=e.schema.then,b=e.schema.else,v=void 0!==m&&(e.opts.strictKeywords?"object"==typeof m&&Object.keys(m).length>0:e.util.schemaHasRules(m,e.RULES.all)),g=void 0!==b&&(e.opts.strictKeywords?"object"==typeof b&&Object.keys(b).length>0:e.util.schemaHasRules(b,e.RULES.all)),y=l.baseId;if(v||g){var _;l.createErrors=!1,l.schema=o,l.schemaPath=s,l.errSchemaPath=f,i+=" var "+d+" = errors; var "+h+" = true; ";var w=e.compositeRule;e.compositeRule=l.compositeRule=!0,i+=" "+e.validate(l)+" ",l.baseId=y,l.createErrors=!0,i+=" errors = "+d+"; if (vErrors !== null) { if ("+d+") vErrors.length = "+d+"; else vErrors = null; } ",e.compositeRule=l.compositeRule=w,v?(i+=" if ("+p+") { ",l.schema=e.schema.then,l.schemaPath=e.schemaPath+".then",l.errSchemaPath=e.errSchemaPath+"/then",i+=" "+e.validate(l)+" ",l.baseId=y,i+=" "+h+" = "+p+"; ",v&&g?i+=" var "+(_="ifClause"+n)+" = 'then'; ":_="'then'",i+=" } ",g&&(i+=" else { ")):i+=" if (!"+p+") { ",g&&(l.schema=e.schema.else,l.schemaPath=e.schemaPath+".else",l.errSchemaPath=e.errSchemaPath+"/else",i+=" "+e.validate(l)+" ",l.baseId=y,i+=" "+h+" = "+p+"; ",v&&g?i+=" var "+(_="ifClause"+n)+" = 'else'; ":_="'else'",i+=" } "),i+=" if (!"+h+") { var err = ",!1!==e.createErrors?(i+=" { keyword: 'if' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { failingKeyword: "+_+" } ",!1!==e.opts.messages&&(i+=" , message: 'should match \"' + "+_+" + '\" schema' "),e.opts.verbose&&(i+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?i+=" throw new ValidationError(vErrors); ":i+=" validate.errors = vErrors; return false; "),i+=" } ",c&&(i+=" else { "),i=e.util.cleanUpCode(i)}else c&&(i+=" if (true) { ");return i}},function(e,t,r){"use strict";e.exports=function(e,t,r){var i=" ",n=e.level,a=e.dataLevel,o=e.schema[t],s=e.schemaPath+e.util.getProperty(t),f=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,u="data"+(a||""),h="valid"+n,d="errs__"+n,l=e.util.copy(e),p="";l.level++;var m="valid"+l.level,b="i"+n,v=l.dataLevel=e.dataLevel+1,g="data"+v,y=e.baseId;if(i+="var "+d+" = errors;var "+h+";",Array.isArray(o)){var _=e.schema.additionalItems;if(!1===_){i+=" "+h+" = "+u+".length <= "+o.length+"; ";var w=f;f=e.errSchemaPath+"/additionalItems",i+=" if (!"+h+") { ";var E=E||[];E.push(i),i="",!1!==e.createErrors?(i+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { limit: "+o.length+" } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT have more than "+o.length+" items' "),e.opts.verbose&&(i+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),i+=" } "):i+=" {} ";var S=i;i=E.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+S+"]); ":i+=" validate.errors = ["+S+"]; return false; ":i+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } ",f=w,c&&(p+="}",i+=" else { ")}var P=o;if(P)for(var k,A=-1,x=P.length-1;A0:e.util.schemaHasRules(k,e.RULES.all)){i+=" "+m+" = true; if ("+u+".length > "+A+") { ";var I=u+"["+A+"]";l.schema=k,l.schemaPath=s+"["+A+"]",l.errSchemaPath=f+"/"+A,l.errorPath=e.util.getPathExpr(e.errorPath,A,e.opts.jsonPointers,!0),l.dataPathArr[v]=A;var O=e.validate(l);l.baseId=y,e.util.varOccurences(O,g)<2?i+=" "+e.util.varReplace(O,g,I)+" ":i+=" var "+g+" = "+I+"; "+O+" ",i+=" } ",c&&(i+=" if ("+m+") { ",p+="}")}if("object"==typeof _&&(e.opts.strictKeywords?"object"==typeof _&&Object.keys(_).length>0:e.util.schemaHasRules(_,e.RULES.all))){l.schema=_,l.schemaPath=e.schemaPath+".additionalItems",l.errSchemaPath=e.errSchemaPath+"/additionalItems",i+=" "+m+" = true; if ("+u+".length > "+o.length+") { for (var "+b+" = "+o.length+"; "+b+" < "+u+".length; "+b+"++) { ",l.errorPath=e.util.getPathExpr(e.errorPath,b,e.opts.jsonPointers,!0);I=u+"["+b+"]";l.dataPathArr[v]=b;O=e.validate(l);l.baseId=y,e.util.varOccurences(O,g)<2?i+=" "+e.util.varReplace(O,g,I)+" ":i+=" var "+g+" = "+I+"; "+O+" ",c&&(i+=" if (!"+m+") break; "),i+=" } } ",c&&(i+=" if ("+m+") { ",p+="}")}}else if(e.opts.strictKeywords?"object"==typeof o&&Object.keys(o).length>0:e.util.schemaHasRules(o,e.RULES.all)){l.schema=o,l.schemaPath=s,l.errSchemaPath=f,i+=" for (var "+b+" = 0; "+b+" < "+u+".length; "+b+"++) { ",l.errorPath=e.util.getPathExpr(e.errorPath,b,e.opts.jsonPointers,!0);I=u+"["+b+"]";l.dataPathArr[v]=b;O=e.validate(l);l.baseId=y,e.util.varOccurences(O,g)<2?i+=" "+e.util.varReplace(O,g,I)+" ":i+=" var "+g+" = "+I+"; "+O+" ",c&&(i+=" if (!"+m+") break; "),i+=" }"}return c&&(i+=" "+p+" if ("+d+" == errors) {"),i=e.util.cleanUpCode(i)}},function(e,t,r){"use strict";e.exports=function(e,t,r){var i,n=" ",a=e.level,o=e.dataLevel,s=e.schema[t],f=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,h="data"+(o||""),d=e.opts.$data&&s&&s.$data;d?(n+=" var schema"+a+" = "+e.util.getData(s.$data,o,e.dataPathArr)+"; ",i="schema"+a):i=s,n+="var division"+a+";if (",d&&(n+=" "+i+" !== undefined && ( typeof "+i+" != 'number' || "),n+=" (division"+a+" = "+h+" / "+i+", ",e.opts.multipleOfPrecision?n+=" Math.abs(Math.round(division"+a+") - division"+a+") > 1e-"+e.opts.multipleOfPrecision+" ":n+=" division"+a+" !== parseInt(division"+a+") ",n+=" ) ",d&&(n+=" ) "),n+=" ) { ";var l=l||[];l.push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { multipleOf: "+i+" } ",!1!==e.opts.messages&&(n+=" , message: 'should be multiple of ",n+=d?"' + "+i:i+"'"),e.opts.verbose&&(n+=" , schema: ",n+=d?"validate.schema"+f:""+s,n+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),n+=" } "):n+=" {} ";var p=n;return n=l.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+p+"]); ":n+=" validate.errors = ["+p+"]; return false; ":n+=" var err = "+p+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+="} ",u&&(n+=" else { "),n}},function(e,t,r){"use strict";e.exports=function(e,t,r){var i=" ",n=e.level,a=e.dataLevel,o=e.schema[t],s=e.schemaPath+e.util.getProperty(t),f=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,u="data"+(a||""),h="errs__"+n,d=e.util.copy(e);d.level++;var l="valid"+d.level;if(e.opts.strictKeywords?"object"==typeof o&&Object.keys(o).length>0:e.util.schemaHasRules(o,e.RULES.all)){d.schema=o,d.schemaPath=s,d.errSchemaPath=f,i+=" var "+h+" = errors; ";var p,m=e.compositeRule;e.compositeRule=d.compositeRule=!0,d.createErrors=!1,d.opts.allErrors&&(p=d.opts.allErrors,d.opts.allErrors=!1),i+=" "+e.validate(d)+" ",d.createErrors=!0,p&&(d.opts.allErrors=p),e.compositeRule=d.compositeRule=m,i+=" if ("+l+") { ";var b=b||[];b.push(i),i="",!1!==e.createErrors?(i+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: {} ",!1!==e.opts.messages&&(i+=" , message: 'should NOT be valid' "),e.opts.verbose&&(i+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),i+=" } "):i+=" {} ";var v=i;i=b.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+v+"]); ":i+=" validate.errors = ["+v+"]; return false; ":i+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } else { errors = "+h+"; if (vErrors !== null) { if ("+h+") vErrors.length = "+h+"; else vErrors = null; } ",e.opts.allErrors&&(i+=" } ")}else i+=" var err = ",!1!==e.createErrors?(i+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: {} ",!1!==e.opts.messages&&(i+=" , message: 'should NOT be valid' "),e.opts.verbose&&(i+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c&&(i+=" if (false) { ");return i}},function(e,t,r){"use strict";e.exports=function(e,t,r){var i=" ",n=e.level,a=e.dataLevel,o=e.schema[t],s=e.schemaPath+e.util.getProperty(t),f=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,u="data"+(a||""),h="valid"+n,d="errs__"+n,l=e.util.copy(e),p="";l.level++;var m="valid"+l.level,b=l.baseId,v="prevValid"+n,g="passingSchemas"+n;i+="var "+d+" = errors , "+v+" = false , "+h+" = false , "+g+" = null; ";var y=e.compositeRule;e.compositeRule=l.compositeRule=!0;var _=o;if(_)for(var w,E=-1,S=_.length-1;E0:e.util.schemaHasRules(w,e.RULES.all))?(l.schema=w,l.schemaPath=s+"["+E+"]",l.errSchemaPath=f+"/"+E,i+=" "+e.validate(l)+" ",l.baseId=b):i+=" var "+m+" = true; ",E&&(i+=" if ("+m+" && "+v+") { "+h+" = false; "+g+" = ["+g+", "+E+"]; } else { ",p+="}"),i+=" if ("+m+") { "+h+" = "+v+" = true; "+g+" = "+E+"; }";return e.compositeRule=l.compositeRule=y,i+=p+"if (!"+h+") { var err = ",!1!==e.createErrors?(i+=" { keyword: 'oneOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { passingSchemas: "+g+" } ",!1!==e.opts.messages&&(i+=" , message: 'should match exactly one schema in oneOf' "),e.opts.verbose&&(i+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?i+=" throw new ValidationError(vErrors); ":i+=" validate.errors = vErrors; return false; "),i+="} else { errors = "+d+"; if (vErrors !== null) { if ("+d+") vErrors.length = "+d+"; else vErrors = null; }",e.opts.allErrors&&(i+=" } "),i}},function(e,t,r){"use strict";e.exports=function(e,t,r){var i,n=" ",a=e.level,o=e.dataLevel,s=e.schema[t],f=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,h="data"+(o||""),d=e.opts.$data&&s&&s.$data;d?(n+=" var schema"+a+" = "+e.util.getData(s.$data,o,e.dataPathArr)+"; ",i="schema"+a):i=s,n+="if ( ",d&&(n+=" ("+i+" !== undefined && typeof "+i+" != 'string') || "),n+=" !"+(d?"(new RegExp("+i+"))":e.usePattern(s))+".test("+h+") ) { ";var l=l||[];l.push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'pattern' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { pattern: ",n+=d?""+i:""+e.util.toQuotedString(s),n+=" } ",!1!==e.opts.messages&&(n+=" , message: 'should match pattern \"",n+=d?"' + "+i+" + '":""+e.util.escapeQuotes(s),n+="\"' "),e.opts.verbose&&(n+=" , schema: ",n+=d?"validate.schema"+f:""+e.util.toQuotedString(s),n+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),n+=" } "):n+=" {} ";var p=n;return n=l.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+p+"]); ":n+=" validate.errors = ["+p+"]; return false; ":n+=" var err = "+p+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+="} ",u&&(n+=" else { "),n}},function(e,t,r){"use strict";e.exports=function(e,t,r){var i=" ",n=e.level,a=e.dataLevel,o=e.schema[t],s=e.schemaPath+e.util.getProperty(t),f=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,u="data"+(a||""),h="errs__"+n,d=e.util.copy(e),l="";d.level++;var p="valid"+d.level,m="key"+n,b="idx"+n,v=d.dataLevel=e.dataLevel+1,g="data"+v,y="dataProperties"+n,_=Object.keys(o||{}),w=e.schema.patternProperties||{},E=Object.keys(w),S=e.schema.additionalProperties,P=_.length||E.length,k=!1===S,A="object"==typeof S&&Object.keys(S).length,x=e.opts.removeAdditional,I=k||A||x,O=e.opts.ownProperties,M=e.baseId,R=e.schema.required;if(R&&(!e.opts.$data||!R.$data)&&R.length8)i+=" || validate.schema"+s+".hasOwnProperty("+m+") ";else{var D=_;if(D)for(var C=-1,L=D.length-1;C0:e.util.schemaHasRules(X,e.RULES.all)){var Q=e.util.getProperty(V),J=(K=u+Q,Z&&void 0!==X.default);d.schema=X,d.schemaPath=s+Q,d.errSchemaPath=f+"/"+e.util.escapeFragment(V),d.errorPath=e.util.getPath(e.errorPath,V,e.opts.jsonPointers),d.dataPathArr[v]=e.util.toQuotedString(V);H=e.validate(d);if(d.baseId=M,e.util.varOccurences(H,g)<2){H=e.util.varReplace(H,g,K);var ee=K}else{ee=g;i+=" var "+g+" = "+K+"; "}if(J)i+=" "+H+" ";else{if(T&&T[V]){i+=" if ( "+ee+" === undefined ",O&&(i+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(V)+"') "),i+=") { "+p+" = false; ";j=e.errorPath,U=f;var te,re=e.util.escapeQuotes(V);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(j,V,e.opts.jsonPointers)),f=e.errSchemaPath+"/required",(te=te||[]).push(i),i="",!1!==e.createErrors?(i+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { missingProperty: '"+re+"' } ",!1!==e.opts.messages&&(i+=" , message: '",e.opts._errorDataPathProperty?i+="is a required property":i+="should have required property \\'"+re+"\\'",i+="' "),e.opts.verbose&&(i+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),i+=" } "):i+=" {} ";q=i;i=te.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+q+"]); ":i+=" validate.errors = ["+q+"]; return false; ":i+=" var err = "+q+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",f=U,e.errorPath=j,i+=" } else { "}else c?(i+=" if ( "+ee+" === undefined ",O&&(i+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(V)+"') "),i+=") { "+p+" = true; } else { "):(i+=" if ("+ee+" !== undefined ",O&&(i+=" && Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(V)+"') "),i+=" ) { ");i+=" "+H+" } "}}c&&(i+=" if ("+p+") { ",l+="}")}}if(E.length){var ie=E;if(ie)for(var ne,ae=-1,oe=ie.length-1;ae0:e.util.schemaHasRules(X,e.RULES.all)){d.schema=X,d.schemaPath=e.schemaPath+".patternProperties"+e.util.getProperty(ne),d.errSchemaPath=e.errSchemaPath+"/patternProperties/"+e.util.escapeFragment(ne),i+=O?" "+y+" = "+y+" || Object.keys("+u+"); for (var "+b+"=0; "+b+"<"+y+".length; "+b+"++) { var "+m+" = "+y+"["+b+"]; ":" for (var "+m+" in "+u+") { ",i+=" if ("+e.usePattern(ne)+".test("+m+")) { ",d.errorPath=e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers);K=u+"["+m+"]";d.dataPathArr[v]=m;H=e.validate(d);d.baseId=M,e.util.varOccurences(H,g)<2?i+=" "+e.util.varReplace(H,g,K)+" ":i+=" var "+g+" = "+K+"; "+H+" ",c&&(i+=" if (!"+p+") break; "),i+=" } ",c&&(i+=" else "+p+" = true; "),i+=" } ",c&&(i+=" if ("+p+") { ",l+="}")}}}return c&&(i+=" "+l+" if ("+h+" == errors) {"),i=e.util.cleanUpCode(i)}},function(e,t,r){"use strict";e.exports=function(e,t,r){var i=" ",n=e.level,a=e.dataLevel,o=e.schema[t],s=e.schemaPath+e.util.getProperty(t),f=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,u="data"+(a||""),h="errs__"+n,d=e.util.copy(e);d.level++;var l="valid"+d.level;if(i+="var "+h+" = errors;",e.opts.strictKeywords?"object"==typeof o&&Object.keys(o).length>0:e.util.schemaHasRules(o,e.RULES.all)){d.schema=o,d.schemaPath=s,d.errSchemaPath=f;var p="key"+n,m="idx"+n,b="i"+n,v="' + "+p+" + '",g="data"+(d.dataLevel=e.dataLevel+1),y="dataProperties"+n,_=e.opts.ownProperties,w=e.baseId;_&&(i+=" var "+y+" = undefined; "),i+=_?" "+y+" = "+y+" || Object.keys("+u+"); for (var "+m+"=0; "+m+"<"+y+".length; "+m+"++) { var "+p+" = "+y+"["+m+"]; ":" for (var "+p+" in "+u+") { ",i+=" var startErrs"+n+" = errors; ";var E=p,S=e.compositeRule;e.compositeRule=d.compositeRule=!0;var P=e.validate(d);d.baseId=w,e.util.varOccurences(P,g)<2?i+=" "+e.util.varReplace(P,g,E)+" ":i+=" var "+g+" = "+E+"; "+P+" ",e.compositeRule=d.compositeRule=S,i+=" if (!"+l+") { for (var "+b+"=startErrs"+n+"; "+b+"0:e.util.schemaHasRules(y,e.RULES.all))||(p[p.length]=b)}}else p=o;if(d||p.length){var _=e.errorPath,w=d||p.length>=e.opts.loopRequired,E=e.opts.ownProperties;if(c)if(i+=" var missing"+n+"; ",w){d||(i+=" var "+l+" = validate.schema"+s+"; ");var S="' + "+(O="schema"+n+"["+(A="i"+n)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(_,O,e.opts.jsonPointers)),i+=" var "+h+" = true; ",d&&(i+=" if (schema"+n+" === undefined) "+h+" = true; else if (!Array.isArray(schema"+n+")) "+h+" = false; else {"),i+=" for (var "+A+" = 0; "+A+" < "+l+".length; "+A+"++) { "+h+" = "+u+"["+l+"["+A+"]] !== undefined ",E&&(i+=" && Object.prototype.hasOwnProperty.call("+u+", "+l+"["+A+"]) "),i+="; if (!"+h+") break; } ",d&&(i+=" } "),i+=" if (!"+h+") { ",(I=I||[]).push(i),i="",!1!==e.createErrors?(i+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(i+=" , message: '",e.opts._errorDataPathProperty?i+="is a required property":i+="should have required property \\'"+S+"\\'",i+="' "),e.opts.verbose&&(i+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),i+=" } "):i+=" {} ";var P=i;i=I.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+P+"]); ":i+=" validate.errors = ["+P+"]; return false; ":i+=" var err = "+P+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } else { "}else{i+=" if ( ";var k=p;if(k)for(var A=-1,x=k.length-1;A 1) { ";var p=e.schema.items&&e.schema.items.type,m=Array.isArray(p);if(!p||"object"==p||"array"==p||m&&(p.indexOf("object")>=0||p.indexOf("array")>=0))n+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+h+"[i], "+h+"[j])) { "+d+" = false; break outer; } } } ";else{n+=" var itemIndices = {}, item; for (;i--;) { var item = "+h+"[i]; ";var b="checkDataType"+(m?"s":"");n+=" if ("+e.util[b](p,"item",!0)+") continue; ",m&&(n+=" if (typeof item == 'string') item = '\"' + item; "),n+=" if (typeof itemIndices[item] == 'number') { "+d+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "}n+=" } ",l&&(n+=" } "),n+=" if (!"+d+") { ";var v=v||[];v.push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { i: i, j: j } ",!1!==e.opts.messages&&(n+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),e.opts.verbose&&(n+=" , schema: ",n+=l?"validate.schema"+f:""+s,n+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),n+=" } "):n+=" {} ";var g=n;n=v.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+g+"]); ":n+=" validate.errors = ["+g+"]; return false; ":n+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } ",u&&(n+=" else { ")}else u&&(n+=" if (true) { ");return n}},function(e,t,r){"use strict";var i=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"];e.exports=function(e,t){for(var r=0;r