2 lines
513 KiB
JavaScript
2 lines
513 KiB
JavaScript
/*! OpenPGP.js v4.10.10 - 2021-01-24 - this is LGPL licensed code, see LICENSE/our website https://openpgpjs.org/ for more information. */
|
|
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).openpgp=e()}}(function(){return function(){return function e(t,r,n){function i(s,o){if(!r[s]){if(!t[s]){var u="function"==typeof require&&require;if(!o&&u)return u(s,!0);if(a)return a(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var c=r[s]={exports:{}};t[s][0].call(c.exports,function(e){return i(t[s][1][e]||e)},c,c.exports,e,t,r,n)}return r[s].exports}for(var a="function"==typeof require&&require,s=0;s<n.length;s++)i(n[s]);return i}}()({1:[function(e,t,r){(function(e){"use strict";var n;n=void 0,function(t){const r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol:e=>`Symbol(${e})`,n="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==e?e:void 0,i=Number.isNaN||function(e){return e!=e};function a(e){return"object"==typeof e&&null!==e||"function"==typeof e}function s(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function o(e){return e.slice()}function u(e,t,r,n,i){new Uint8Array(e).set(new Uint8Array(r,n,i),t)}function l(e){return!1!==function(e){return"number"==typeof e&&(!i(e)&&!(e<0))}(e)&&e!==1/0}function c(e,t,r){if("function"!=typeof e)throw new TypeError("Argument is not a function");return Function.prototype.apply.call(e,t,r)}function f(e,t,r,n){const i=e[t];if(void 0!==i){if("function"!=typeof i)throw new TypeError(`${i} is not a method`);switch(r){case 0:return()=>h(i,e,n);case 1:return t=>{const r=[t].concat(n);return h(i,e,r)}}}return()=>Promise.resolve()}function d(e,t,r){const n=e[t];if(void 0!==n)return c(n,e,r)}function h(e,t,r){try{return Promise.resolve(c(e,t,r))}catch(e){return Promise.reject(e)}}function p(e){return e}function y(e){if(e=Number(e),i(e)||e<0)throw new RangeError("highWaterMark property of a queuing strategy must be non-negative and non-NaN");return e}function m(e){if(void 0===e)return()=>1;if("function"!=typeof e)throw new TypeError("size property of a queuing strategy must be a function");return t=>e(t)}function g(e,t,r){return Promise.prototype.then.call(e,t,r)}function w(e,t,r){let n,i;const a=new Promise((e,t)=>{n=e,i=t});return void 0===r&&(r=(e=>{throw e})),function(e,t,r){let n=!1;const i=e=>{!1===n&&(n=!0,r(e))};let a=0,s=0;const o=e.length,u=new Array(o);for(const l of e){const e=a;g(l,r=>{u[e]=r,++s===o&&t(u)},i),++a}}(e,e=>{try{const r=t(e);n(r)}catch(e){i(e)}},e=>{try{const t=r(e);n(t)}catch(e){i(e)}}),a}function b(e){}function _(e){e&&e instanceof b.AssertionError&&setTimeout(()=>{throw e},0)}function v(e){const t=e._queue.shift();return e._queueTotalSize-=t.size,e._queueTotalSize<0&&(e._queueTotalSize=0),t.value}function k(e,t,r){if(!l(r=Number(r)))throw new RangeError("Size must be a finite, non-NaN, non-negative number.");e._queue.push({value:t,size:r}),e._queueTotalSize+=r}function A(e){e._queue=[],e._queueTotalSize=0}b.AssertionError=function(){};const S=r("[[AbortSteps]]"),P=r("[[ErrorSteps]]");class E{constructor(e={},t={}){M(this);const r=t.size;let n=t.highWaterMark;if(void 0!==e.type)throw new RangeError("Invalid type is specified");const i=m(r);void 0===n&&(n=1),function(e,t,r,n){const i=Object.create(H.prototype),a=f(t,"write",1,[i]),s=f(t,"close",0,[]),o=f(t,"abort",1,[]);W(e,i,function(){return d(t,"start",[i])},a,s,o,r,n)}(this,e,n=y(n),i)}get locked(){if(!1===K(this))throw X("locked");return U(this)}abort(e){return!1===K(this)?Promise.reject(X("abort")):!0===U(this)?Promise.reject(new TypeError("Cannot abort a stream that already has a writer")):C(this,e)}getWriter(){if(!1===K(this))throw X("getWriter");return x(this)}}function x(e){return new z(e)}function M(e){e._state="writable",e._storedError=void 0,e._writer=void 0,e._writableStreamController=void 0,e._writeRequests=[],e._inFlightWriteRequest=void 0,e._closeRequest=void 0,e._inFlightCloseRequest=void 0,e._pendingAbortRequest=void 0,e._backpressure=!1}function K(e){return!!a(e)&&!!Object.prototype.hasOwnProperty.call(e,"_writableStreamController")}function U(e){return void 0!==e._writer}function C(e,t){const r=e._state;if("closed"===r||"errored"===r)return Promise.resolve(void 0);if(void 0!==e._pendingAbortRequest)return e._pendingAbortRequest._promise;let n=!1;"erroring"===r&&(n=!0,t=void 0);const i=new Promise((r,i)=>{e._pendingAbortRequest={_promise:void 0,_resolve:r,_reject:i,_reason:t,_wasAlreadyErroring:n}});return e._pendingAbortRequest._promise=i,!1===n&&T(e,t),i}function R(e,t){"writable"!==e._state?j(e):T(e,t)}function T(e,t){const r=e._writableStreamController;e._state="erroring",e._storedError=t;const n=e._writer;void 0!==n&&L(n,t),!1===function(e){return void 0!==e._inFlightWriteRequest||void 0!==e._inFlightCloseRequest}(e)&&!0===r._started&&j(e)}function j(e){e._state="errored",e._writableStreamController[P]();const t=e._storedError;for(const n of e._writeRequests)n._reject(t);if(e._writeRequests=[],void 0===e._pendingAbortRequest)return void B(e);const r=e._pendingAbortRequest;if(e._pendingAbortRequest=void 0,!0===r._wasAlreadyErroring)return r._reject(t),void B(e);e._writableStreamController[S](r._reason).then(()=>{r._resolve(),B(e)},t=>{r._reject(t),B(e)})}function O(e){return void 0!==e._closeRequest||void 0!==e._inFlightCloseRequest}function B(e){void 0!==e._closeRequest&&(e._closeRequest._reject(e._storedError),e._closeRequest=void 0);const t=e._writer;void 0!==t&&ne(t,e._storedError)}function I(e,t){const r=e._writer;void 0!==r&&t!==e._backpressure&&(!0===t?ae(r):le(r)),e._backpressure=t}class z{constructor(e){if(!1===K(e))throw new TypeError("WritableStreamDefaultWriter can only be constructed with a WritableStream instance");if(!0===U(e))throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=e,e._writer=this;const t=e._state;if("writable"===t)!1===O(e)&&!0===e._backpressure?ae(this):oe(this),te(this);else if("erroring"===t)se(this,e._storedError),te(this);else if("closed"===t)oe(this),function(e){te(e),ie(e)}(this);else{const t=e._storedError;se(this,t),re(this,t)}}get closed(){return!1===D(this)?Promise.reject(J("closed")):this._closedPromise}get desiredSize(){if(!1===D(this))throw J("desiredSize");if(void 0===this._ownerWritableStream)throw ee("desiredSize");return function(e){const t=e._ownerWritableStream,r=t._state;return"errored"===r||"erroring"===r?null:"closed"===r?0:G(t._writableStreamController)}(this)}get ready(){return!1===D(this)?Promise.reject(J("ready")):this._readyPromise}abort(e){return!1===D(this)?Promise.reject(J("abort")):void 0===this._ownerWritableStream?Promise.reject(ee("abort")):function(e,t){return C(e._ownerWritableStream,t)}(this,e)}close(){if(!1===D(this))return Promise.reject(J("close"));const e=this._ownerWritableStream;return void 0===e?Promise.reject(ee("close")):!0===O(e)?Promise.reject(new TypeError("cannot close an already-closing stream")):N(this)}releaseLock(){if(!1===D(this))throw J("releaseLock");void 0!==this._ownerWritableStream&&q(this)}write(e){return!1===D(this)?Promise.reject(J("write")):void 0===this._ownerWritableStream?Promise.reject(ee("write to")):F(this,e)}}function D(e){return!!a(e)&&!!Object.prototype.hasOwnProperty.call(e,"_ownerWritableStream")}function N(e){const t=e._ownerWritableStream,r=t._state;if("closed"===r||"errored"===r)return Promise.reject(new TypeError(`The stream (in ${r} state) is not in the writable state and cannot be closed`));const n=new Promise((e,r)=>{const n={_resolve:e,_reject:r};t._closeRequest=n});return!0===t._backpressure&&"writable"===r&&le(e),function(e){k(e,"close",0),V(e)}(t._writableStreamController),n}function L(e,t){"pending"===e._readyPromiseState?ue(e,t):function(e,t){se(e,t)}(e,t)}function q(e){const t=e._ownerWritableStream,r=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");L(e,r),function(e,t){"pending"===e._closedPromiseState?ne(e,t):function(e,t){re(e,t)}(e,t)}(e,r),t._writer=void 0,e._ownerWritableStream=void 0}function F(e,t){const r=e._ownerWritableStream,n=r._writableStreamController,i=function(e,t){try{return e._strategySizeAlgorithm(t)}catch(t){return Y(e,t),1}}(n,t);if(r!==e._ownerWritableStream)return Promise.reject(ee("write to"));const a=r._state;if("errored"===a)return Promise.reject(r._storedError);if(!0===O(r)||"closed"===a)return Promise.reject(new TypeError("The stream is closing or closed and cannot be written to"));if("erroring"===a)return Promise.reject(r._storedError);const s=function(e){return new Promise((t,r)=>{const n={_resolve:t,_reject:r};e._writeRequests.push(n)})}(r);return function(e,t,r){const n={chunk:t};try{k(e,n,r)}catch(t){return void Y(e,t)}const i=e._controlledWritableStream;if(!1===O(i)&&"writable"===i._state){I(i,$(e))}V(e)}(n,t,i),s}class H{constructor(){throw new TypeError("WritableStreamDefaultController cannot be constructed explicitly")}error(e){if(!1===function(e){return!!a(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledWritableStream")}(this))throw new TypeError("WritableStreamDefaultController.prototype.error can only be used on a WritableStreamDefaultController");"writable"===this._controlledWritableStream._state&&Q(this,e)}[S](e){const t=this._abortAlgorithm(e);return Z(this),t}[P](){A(this)}}function W(e,t,r,n,i,a,s,o){t._controlledWritableStream=e,e._writableStreamController=t,t._queue=void 0,t._queueTotalSize=void 0,A(t),t._started=!1,t._strategySizeAlgorithm=o,t._strategyHWM=s,t._writeAlgorithm=n,t._closeAlgorithm=i,t._abortAlgorithm=a;const u=$(t);I(e,u);const l=r();Promise.resolve(l).then(()=>{t._started=!0,V(t)},r=>{t._started=!0,R(e,r)}).catch(_)}function Z(e){e._writeAlgorithm=void 0,e._closeAlgorithm=void 0,e._abortAlgorithm=void 0,e._strategySizeAlgorithm=void 0}function G(e){return e._strategyHWM-e._queueTotalSize}function V(e){const t=e._controlledWritableStream;if(!1===e._started)return;if(void 0!==t._inFlightWriteRequest)return;const r=t._state;if("closed"===r||"errored"===r)return;if("erroring"===r)return void j(t);if(0===e._queue.length)return;const n=function(e){return e._queue[0].value}(e);"close"===n?function(e){const t=e._controlledWritableStream;(function(e){e._inFlightCloseRequest=e._closeRequest,e._closeRequest=void 0})(t),v(e);const r=e._closeAlgorithm();Z(e),r.then(()=>{!function(e){e._inFlightCloseRequest._resolve(void 0),e._inFlightCloseRequest=void 0,"erroring"===e._state&&(e._storedError=void 0,void 0!==e._pendingAbortRequest&&(e._pendingAbortRequest._resolve(),e._pendingAbortRequest=void 0)),e._state="closed";const t=e._writer;void 0!==t&&ie(t)}(t)},e=>{!function(e,t){e._inFlightCloseRequest._reject(t),e._inFlightCloseRequest=void 0,void 0!==e._pendingAbortRequest&&(e._pendingAbortRequest._reject(t),e._pendingAbortRequest=void 0),R(e,t)}(t,e)}).catch(_)}(e):function(e,t){const r=e._controlledWritableStream;(function(e){e._inFlightWriteRequest=e._writeRequests.shift()})(r),e._writeAlgorithm(t).then(()=>{!function(e){e._inFlightWriteRequest._resolve(void 0),e._inFlightWriteRequest=void 0}(r);const t=r._state;if(v(e),!1===O(r)&&"writable"===t){const t=$(e);I(r,t)}V(e)},t=>{"writable"===r._state&&Z(e),function(e,t){e._inFlightWriteRequest._reject(t),e._inFlightWriteRequest=void 0,R(e,t)}(r,t)}).catch(_)}(e,n.chunk)}function Y(e,t){"writable"===e._controlledWritableStream._state&&Q(e,t)}function $(e){return G(e)<=0}function Q(e,t){const r=e._controlledWritableStream;Z(e),T(r,t)}function X(e){return new TypeError(`WritableStream.prototype.${e} can only be used on a WritableStream`)}function J(e){return new TypeError(`WritableStreamDefaultWriter.prototype.${e} can only be used on a WritableStreamDefaultWriter`)}function ee(e){return new TypeError("Cannot "+e+" a stream using a released writer")}function te(e){e._closedPromise=new Promise((t,r)=>{e._closedPromise_resolve=t,e._closedPromise_reject=r,e._closedPromiseState="pending"})}function re(e,t){te(e),ne(e,t)}function ne(e,t){e._closedPromise.catch(()=>{}),e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="rejected"}function ie(e){e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="resolved"}function ae(e){e._readyPromise=new Promise((t,r)=>{e._readyPromise_resolve=t,e._readyPromise_reject=r}),e._readyPromiseState="pending"}function se(e,t){ae(e),ue(e,t)}function oe(e){ae(e),le(e)}function ue(e,t){e._readyPromise.catch(()=>{}),e._readyPromise_reject(t),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="rejected"}function le(e){e._readyPromise_resolve(void 0),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="fulfilled"}const ce=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},fe=r("[[CancelSteps]]"),de=r("[[PullSteps]]");class he{constructor(e={},t={}){me(this);const r=t.size;let n=t.highWaterMark;const i=e.type;if("bytes"===String(i)){if(void 0!==r)throw new RangeError("The strategy for a byte stream cannot have a size function");void 0===n&&(n=0),function(e,t,r){const n=Object.create(Qe.prototype),i=f(t,"pull",0,[n]),a=f(t,"cancel",1,[]);let s=t.autoAllocateChunkSize;if(void 0!==s&&(s=Number(s),!1===ce(s)||s<=0))throw new RangeError("autoAllocateChunkSize must be a positive integer");!function(e,t,r,n,i,a,s){t._controlledReadableByteStream=e,t._pullAgain=!1,t._pulling=!1,tt(t),t._queue=t._queueTotalSize=void 0,A(t),t._closeRequested=!1,t._started=!1,t._strategyHWM=y(a),t._pullAlgorithm=n,t._cancelAlgorithm=i,t._autoAllocateChunkSize=s,t._pendingPullIntos=[],e._readableStreamController=t;const o=r();Promise.resolve(o).then(()=>{t._started=!0,et(t)},e=>{ht(t,e)}).catch(_)}(e,n,function(){return d(t,"start",[n])},i,a,r,s)}(this,e,n=y(n))}else{if(void 0!==i)throw new RangeError("Invalid type is specified");{const t=m(r);void 0===n&&(n=1),function(e,t,r,n){const i=Object.create(De.prototype),a=f(t,"pull",0,[i]),s=f(t,"cancel",1,[]);Ye(e,i,function(){return d(t,"start",[i])},a,s,r,n)}(this,e,n=y(n),t)}}}get locked(){if(!1===ge(this))throw mt("locked");return we(this)}cancel(e){return!1===ge(this)?Promise.reject(mt("cancel")):!0===we(this)?Promise.reject(new TypeError("Cannot cancel a stream that already has a reader")):ke(this,e)}getReader({mode:e}={}){if(!1===ge(this))throw mt("getReader");if(void 0===e)return pe(this);if("byob"===(e=String(e)))return function(e){return new Re(e)}(this);throw new RangeError("Invalid mode is specified")}pipeThrough({writable:e,readable:t},{preventClose:r,preventAbort:n,preventCancel:i,signal:a}={}){if(!1===ge(this))throw mt("pipeThrough");if(!1===K(e))throw new TypeError("writable argument to pipeThrough must be a WritableStream");if(!1===ge(t))throw new TypeError("readable argument to pipeThrough must be a ReadableStream");if(r=Boolean(r),n=Boolean(n),i=Boolean(i),void 0!==a&&!yt(a))throw new TypeError("ReadableStream.prototype.pipeThrough's signal option must be an AbortSignal");if(!0===we(this))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(!0===U(e))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");return be(this,e,r,n,i,a).catch(()=>{}),t}pipeTo(e,{preventClose:t,preventAbort:r,preventCancel:n,signal:i}={}){return!1===ge(this)?Promise.reject(mt("pipeTo")):!1===K(e)?Promise.reject(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream")):(t=Boolean(t),r=Boolean(r),n=Boolean(n),void 0===i||yt(i)?!0===we(this)?Promise.reject(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):!0===U(e)?Promise.reject(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):be(this,e,t,r,n,i):Promise.reject(new TypeError("ReadableStream.prototype.pipeTo's signal option must be an AbortSignal")))}tee(){if(!1===ge(this))throw mt("tee");const e=function(e,t){const r=pe(e);let n,i,a,s,u,l=!1,c=!1,f=!1;const d=new Promise(e=>{u=e});function h(){return ze(r).then(e=>{const t=e.value;if(!0===e.done&&!1===l&&(!1===c&&He(a._readableStreamController),!1===f&&He(s._readableStreamController),l=!0),!0===l)return;const r=t,n=t;!1===c&&We(a._readableStreamController,r),!1===f&&We(s._readableStreamController,n)})}function p(){}return a=ye(p,h,function(t){if(c=!0,n=t,!0===f){const t=o([n,i]),r=ke(e,t);u(r)}return d}),s=ye(p,h,function(t){if(f=!0,i=t,!0===c){const t=o([n,i]),r=ke(e,t);u(r)}return d}),r._closedPromise.catch(e=>{!0!==l&&(Ze(a._readableStreamController,e),Ze(s._readableStreamController,e),l=!0)}),[a,s]}(this);return o(e)}}function pe(e){return new Ce(e)}function ye(e,t,r,n=1,i=(()=>1)){const a=Object.create(he.prototype);return me(a),Ye(a,Object.create(De.prototype),e,t,r,n,i),a}function me(e){e._state="readable",e._reader=void 0,e._storedError=void 0,e._disturbed=!1}function ge(e){return!!a(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readableStreamController")}function we(e){return void 0!==e._reader}function be(e,t,r,n,i,a){const s=pe(e),o=x(t);let u=!1,l=Promise.resolve();return new Promise((c,f)=>{let d;if(void 0!==a){if(d=(()=>{const r=new DOMException("Aborted","AbortError"),a=[];!1===n&&a.push(()=>"writable"===t._state?C(t,r):Promise.resolve()),!1===i&&a.push(()=>"readable"===e._state?ke(e,r):Promise.resolve()),y(()=>w(a.map(e=>e()),e=>e),!0,r)}),!0===a.aborted)return void d();a.addEventListener("abort",d)}if(p(e,s._closedPromise,e=>{!1===n?y(()=>C(t,e),!0,e):m(!0,e)}),p(t,o._closedPromise,t=>{!1===i?y(()=>ke(e,t),!0,t):m(!0,t)}),function(e,t,r){"closed"===e._state?r():t.then(r).catch(_)}(e,s._closedPromise,()=>{!1===r?y(()=>(function(e){const t=e._ownerWritableStream,r=t._state;return!0===O(t)||"closed"===r?Promise.resolve():"errored"===r?Promise.reject(t._storedError):N(e)})(o)):m()}),!0===O(t)||"closed"===t._state){const t=new TypeError("the destination writable stream closed before all data could be piped to it");!1===i?y(()=>ke(e,t),!0,t):m(!0,t)}function h(){const e=l;return l.then(()=>e!==l?h():void 0)}function p(e,t,r){"errored"===e._state?r(e._storedError):t.catch(r).catch(_)}function y(e,r,n){function i(){e().then(()=>g(r,n),e=>g(!0,e)).catch(_)}!0!==u&&(u=!0,"writable"===t._state&&!1===O(t)?h().then(i):i())}function m(e,r){!0!==u&&(u=!0,"writable"===t._state&&!1===O(t)?h().then(()=>g(e,r)).catch(_):g(e,r))}function g(e,t){q(o),Ie(s),void 0!==a&&a.removeEventListener("abort",d),e?f(t):c(void 0)}new Promise((e,t)=>{!function r(n){n?e():(!0===u?Promise.resolve(!0):o._readyPromise.then(()=>ze(s).then(({value:e,done:t})=>!0===t||(l=F(o,e).catch(()=>{}),!1)))).then(r,t)}(!1)}).catch(e=>{l=Promise.resolve(),_(e)})})}function _e(e,t){return new Promise((r,n)=>{const i={_resolve:r,_reject:n,_forAuthorCode:t};e._reader._readIntoRequests.push(i)})}function ve(e,t){return new Promise((r,n)=>{const i={_resolve:r,_reject:n,_forAuthorCode:t};e._reader._readRequests.push(i)})}function ke(e,t){return e._disturbed=!0,"closed"===e._state?Promise.resolve(void 0):"errored"===e._state?Promise.reject(e._storedError):(Ae(e),e._readableStreamController[fe](t).then(()=>void 0))}function Ae(e){e._state="closed";const t=e._reader;if(void 0!==t){if(je(t)){for(const e of t._readRequests){(0,e._resolve)(Se(void 0,!0,e._forAuthorCode))}t._readRequests=[]}kt(t)}}function Se(e,t,r){let n=null;!0===r&&(n=Object.prototype);const i=Object.create(n);return Object.defineProperty(i,"value",{value:e,enumerable:!0,writable:!0,configurable:!0}),Object.defineProperty(i,"done",{value:t,enumerable:!0,writable:!0,configurable:!0}),i}function Pe(e,t){e._state="errored",e._storedError=t;const r=e._reader;if(void 0!==r){if(je(r)){for(const e of r._readRequests)e._reject(t);r._readRequests=[]}else{for(const e of r._readIntoRequests)e._reject(t);r._readIntoRequests=[]}vt(r,t)}}function Ee(e,t,r){const n=e._reader._readRequests.shift();n._resolve(Se(t,r,n._forAuthorCode))}function xe(e){return e._reader._readIntoRequests.length}function Me(e){return e._reader._readRequests.length}function Ke(e){const t=e._reader;return void 0!==t&&!!Te(t)}function Ue(e){const t=e._reader;return void 0!==t&&!!je(t)}class Ce{constructor(e){if(!1===ge(e))throw new TypeError("ReadableStreamDefaultReader can only be constructed with a ReadableStream instance");if(!0===we(e))throw new TypeError("This stream has already been locked for exclusive reading by another reader");Oe(this,e),this._readRequests=[]}get closed(){return je(this)?this._closedPromise:Promise.reject(wt("closed"))}cancel(e){return je(this)?void 0===this._ownerReadableStream?Promise.reject(gt("cancel")):Be(this,e):Promise.reject(wt("cancel"))}read(){return je(this)?void 0===this._ownerReadableStream?Promise.reject(gt("read from")):ze(this,!0):Promise.reject(wt("read"))}releaseLock(){if(!je(this))throw wt("releaseLock");if(void 0!==this._ownerReadableStream){if(this._readRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");Ie(this)}}}class Re{constructor(e){if(!ge(e))throw new TypeError("ReadableStreamBYOBReader can only be constructed with a ReadableStream instance given a byte source");if(!1===Xe(e._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");if(we(e))throw new TypeError("This stream has already been locked for exclusive reading by another reader");Oe(this,e),this._readIntoRequests=[]}get closed(){return Te(this)?this._closedPromise:Promise.reject(At("closed"))}cancel(e){return Te(this)?void 0===this._ownerReadableStream?Promise.reject(gt("cancel")):Be(this,e):Promise.reject(At("cancel"))}read(e){return Te(this)?void 0===this._ownerReadableStream?Promise.reject(gt("read from")):ArrayBuffer.isView(e)?(e.buffer,0===e.byteLength?Promise.reject(new TypeError("view must have non-zero byteLength")):function(e,t,r=!1){const n=e._ownerReadableStream;return n._disturbed=!0,"errored"===n._state?Promise.reject(n._storedError):function(e,t,r){const n=e._controlledReadableByteStream;let i=1;t.constructor!==DataView&&(i=t.constructor.BYTES_PER_ELEMENT);const a=t.constructor,s={buffer:p(t.buffer),byteOffset:t.byteOffset,byteLength:t.byteLength,bytesFilled:0,elementSize:i,ctor:a,readerType:"byob"};if(e._pendingPullIntos.length>0)return e._pendingPullIntos.push(s),_e(n,r);if("closed"===n._state){const e=new a(s.buffer,s.byteOffset,0);return Promise.resolve(Se(e,!0,r))}if(e._queueTotalSize>0){if(!0===at(e,s)){const t=nt(s);return ot(e),Promise.resolve(Se(t,!1,r))}if(!0===e._closeRequested){const t=new TypeError("Insufficient bytes to fill elements in the given buffer");return ht(e,t),Promise.reject(t)}}e._pendingPullIntos.push(s);const o=_e(n,r);return et(e),o}(n._readableStreamController,t,r)}(this,e,!0)):Promise.reject(new TypeError("view must be an array buffer view")):Promise.reject(At("read"))}releaseLock(){if(!Te(this))throw At("releaseLock");if(void 0!==this._ownerReadableStream){if(this._readIntoRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");Ie(this)}}}function Te(e){return!!a(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readIntoRequests")}function je(e){return!!a(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readRequests")}function Oe(e,t){e._ownerReadableStream=t,t._reader=e,"readable"===t._state?bt(e):"closed"===t._state?function(e){bt(e),kt(e)}(e):_t(e,t._storedError)}function Be(e,t){return ke(e._ownerReadableStream,t)}function Ie(e){"readable"===e._ownerReadableStream._state?vt(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):function(e,t){_t(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness"))}(e),e._ownerReadableStream._reader=void 0,e._ownerReadableStream=void 0}function ze(e,t=!1){const r=e._ownerReadableStream;return r._disturbed=!0,"closed"===r._state?Promise.resolve(Se(void 0,!0,t)):"errored"===r._state?Promise.reject(r._storedError):r._readableStreamController[de](t)}class De{constructor(){throw new TypeError}get desiredSize(){if(!1===Ne(this))throw St("desiredSize");return Ge(this)}close(){if(!1===Ne(this))throw St("close");if(!1===Ve(this))throw new TypeError("The stream is not in a state that permits close");He(this)}enqueue(e){if(!1===Ne(this))throw St("enqueue");if(!1===Ve(this))throw new TypeError("The stream is not in a state that permits enqueue");return We(this,e)}error(e){if(!1===Ne(this))throw St("error");Ze(this,e)}[fe](e){A(this);const t=this._cancelAlgorithm(e);return Fe(this),t}[de](e){const t=this._controlledReadableStream;if(this._queue.length>0){const r=v(this);return!0===this._closeRequested&&0===this._queue.length?(Fe(this),Ae(t)):Le(this),Promise.resolve(Se(r,!1,e))}const r=ve(t,e);return Le(this),r}}function Ne(e){return!!a(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledReadableStream")}function Le(e){!1!==qe(e)&&(!0!==e._pulling?(e._pulling=!0,e._pullAlgorithm().then(()=>{if(e._pulling=!1,!0===e._pullAgain)return e._pullAgain=!1,Le(e)},t=>{Ze(e,t)}).catch(_)):e._pullAgain=!0)}function qe(e){const t=e._controlledReadableStream;return!1!==Ve(e)&&!1!==e._started&&(!0===we(t)&&Me(t)>0||Ge(e)>0)}function Fe(e){e._pullAlgorithm=void 0,e._cancelAlgorithm=void 0,e._strategySizeAlgorithm=void 0}function He(e){const t=e._controlledReadableStream;e._closeRequested=!0,0===e._queue.length&&(Fe(e),Ae(t))}function We(e,t){const r=e._controlledReadableStream;if(!0===we(r)&&Me(r)>0)Ee(r,t,!1);else{let r;try{r=e._strategySizeAlgorithm(t)}catch(t){throw Ze(e,t),t}try{k(e,t,r)}catch(t){throw Ze(e,t),t}}Le(e)}function Ze(e,t){const r=e._controlledReadableStream;"readable"===r._state&&(A(e),Fe(e),Pe(r,t))}function Ge(e){const t=e._controlledReadableStream._state;return"errored"===t?null:"closed"===t?0:e._strategyHWM-e._queueTotalSize}function Ve(e){const t=e._controlledReadableStream._state;return!1===e._closeRequested&&"readable"===t}function Ye(e,t,r,n,i,a,s){t._controlledReadableStream=e,t._queue=void 0,t._queueTotalSize=void 0,A(t),t._started=!1,t._closeRequested=!1,t._pullAgain=!1,t._pulling=!1,t._strategySizeAlgorithm=s,t._strategyHWM=a,t._pullAlgorithm=n,t._cancelAlgorithm=i,e._readableStreamController=t;const o=r();Promise.resolve(o).then(()=>{t._started=!0,Le(t)},e=>{Ze(t,e)}).catch(_)}class $e{constructor(){throw new TypeError("ReadableStreamBYOBRequest cannot be used directly")}get view(){if(!1===Je(this))throw Pt("view");return this._view}respond(e){if(!1===Je(this))throw Pt("respond");if(void 0===this._associatedReadableByteStreamController)throw new TypeError("This BYOB request has been invalidated");this._view.buffer,function(e,t){if(!1===l(t=Number(t)))throw new RangeError("bytesWritten must be a finite");ct(e,t)}(this._associatedReadableByteStreamController,e)}respondWithNewView(e){if(!1===Je(this))throw Pt("respond");if(void 0===this._associatedReadableByteStreamController)throw new TypeError("This BYOB request has been invalidated");if(!ArrayBuffer.isView(e))throw new TypeError("You can only respond with array buffer views");e.buffer,function(e,t){const r=e._pendingPullIntos[0];if(r.byteOffset+r.bytesFilled!==t.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(r.byteLength!==t.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");r.buffer=t.buffer,ct(e,t.byteLength)}(this._associatedReadableByteStreamController,e)}}class Qe{constructor(){throw new TypeError("ReadableByteStreamController constructor cannot be used directly")}get byobRequest(){if(!1===Xe(this))throw Et("byobRequest");if(void 0===this._byobRequest&&this._pendingPullIntos.length>0){const e=this._pendingPullIntos[0],t=new Uint8Array(e.buffer,e.byteOffset+e.bytesFilled,e.byteLength-e.bytesFilled),r=Object.create($e.prototype);!function(e,t,r){e._associatedReadableByteStreamController=t,e._view=r}(r,this,t),this._byobRequest=r}return this._byobRequest}get desiredSize(){if(!1===Xe(this))throw Et("desiredSize");return pt(this)}close(){if(!1===Xe(this))throw Et("close");if(!0===this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");const e=this._controlledReadableByteStream._state;if("readable"!==e)throw new TypeError(`The stream (in ${e} state) is not in the readable state and cannot be closed`);!function(e){const t=e._controlledReadableByteStream;if(e._queueTotalSize>0)e._closeRequested=!0;else{if(e._pendingPullIntos.length>0){if(e._pendingPullIntos[0].bytesFilled>0){const t=new TypeError("Insufficient bytes to fill elements in the given buffer");throw ht(e,t),t}}dt(e),Ae(t)}}(this)}enqueue(e){if(!1===Xe(this))throw Et("enqueue");if(!0===this._closeRequested)throw new TypeError("stream is closed or draining");const t=this._controlledReadableByteStream._state;if("readable"!==t)throw new TypeError(`The stream (in ${t} state) is not in the readable state and cannot be enqueued to`);if(!ArrayBuffer.isView(e))throw new TypeError("You can only enqueue array buffer views when using a ReadableByteStreamController");e.buffer,function(e,t){const r=e._controlledReadableByteStream,n=t.buffer,i=t.byteOffset,a=t.byteLength,s=p(n);if(!0===Ue(r))if(0===Me(r))it(e,s,i,a);else{Ee(r,new Uint8Array(s,i,a),!1)}else!0===Ke(r)?(it(e,s,i,a),lt(e)):it(e,s,i,a);et(e)}(this,e)}error(e){if(!1===Xe(this))throw Et("error");ht(this,e)}[fe](e){this._pendingPullIntos.length>0&&(this._pendingPullIntos[0].bytesFilled=0),A(this);const t=this._cancelAlgorithm(e);return dt(this),t}[de](e){const t=this._controlledReadableByteStream;if(this._queueTotalSize>0){const t=this._queue.shift();let r;this._queueTotalSize-=t.byteLength,ot(this);try{r=new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}catch(e){return Promise.reject(e)}return Promise.resolve(Se(r,!1,e))}const r=this._autoAllocateChunkSize;if(void 0!==r){let t;try{t=new ArrayBuffer(r)}catch(e){return Promise.reject(e)}const n={buffer:t,byteOffset:0,byteLength:r,bytesFilled:0,elementSize:1,ctor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(n)}const n=ve(t,e);return et(this),n}}function Xe(e){return!!a(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledReadableByteStream")}function Je(e){return!!a(e)&&!!Object.prototype.hasOwnProperty.call(e,"_associatedReadableByteStreamController")}function et(e){!1!==function(e){const t=e._controlledReadableByteStream;return"readable"===t._state&&(!0!==e._closeRequested&&(!1!==e._started&&(!0===Ue(t)&&Me(t)>0||(!0===Ke(t)&&xe(t)>0||pt(e)>0))))}(e)&&(!0!==e._pulling?(e._pulling=!0,e._pullAlgorithm().then(()=>{e._pulling=!1,!0===e._pullAgain&&(e._pullAgain=!1,et(e))},t=>{ht(e,t)}).catch(_)):e._pullAgain=!0)}function tt(e){ut(e),e._pendingPullIntos=[]}function rt(e,t){let r=!1;"closed"===e._state&&(r=!0);const n=nt(t);"default"===t.readerType?Ee(e,n,r):function(e,t,r){const n=e._reader._readIntoRequests.shift();n._resolve(Se(t,r,n._forAuthorCode))}(e,n,r)}function nt(e){const t=e.bytesFilled,r=e.elementSize;return new e.ctor(e.buffer,e.byteOffset,t/r)}function it(e,t,r,n){e._queue.push({buffer:t,byteOffset:r,byteLength:n}),e._queueTotalSize+=n}function at(e,t){const r=t.elementSize,n=t.bytesFilled-t.bytesFilled%r,i=Math.min(e._queueTotalSize,t.byteLength-t.bytesFilled),a=t.bytesFilled+i,s=a-a%r;let o=i,l=!1;s>n&&(o=s-t.bytesFilled,l=!0);const c=e._queue;for(;o>0;){const r=c[0],n=Math.min(o,r.byteLength),i=t.byteOffset+t.bytesFilled;u(t.buffer,i,r.buffer,r.byteOffset,n),r.byteLength===n?c.shift():(r.byteOffset+=n,r.byteLength-=n),e._queueTotalSize-=n,st(e,n,t),o-=n}return l}function st(e,t,r){ut(e),r.bytesFilled+=t}function ot(e){0===e._queueTotalSize&&!0===e._closeRequested?(dt(e),Ae(e._controlledReadableByteStream)):et(e)}function ut(e){void 0!==e._byobRequest&&(e._byobRequest._associatedReadableByteStreamController=void 0,e._byobRequest._view=void 0,e._byobRequest=void 0)}function lt(e){for(;e._pendingPullIntos.length>0;){if(0===e._queueTotalSize)return;const t=e._pendingPullIntos[0];!0===at(e,t)&&(ft(e),rt(e._controlledReadableByteStream,t))}}function ct(e,t){const r=e._pendingPullIntos[0];if("closed"===e._controlledReadableByteStream._state){if(0!==t)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream");!function(e,t){t.buffer=p(t.buffer);const r=e._controlledReadableByteStream;if(!0===Ke(r))for(;xe(r)>0;)rt(r,ft(e))}(e,r)}else!function(e,t,r){if(r.bytesFilled+t>r.byteLength)throw new RangeError("bytesWritten out of range");if(st(e,t,r),r.bytesFilled<r.elementSize)return;ft(e);const n=r.bytesFilled%r.elementSize;if(n>0){const t=r.byteOffset+r.bytesFilled,i=r.buffer.slice(t-n,t);it(e,i,0,i.byteLength)}r.buffer=p(r.buffer),r.bytesFilled-=n,rt(e._controlledReadableByteStream,r),lt(e)}(e,t,r);et(e)}function ft(e){const t=e._pendingPullIntos.shift();return ut(e),t}function dt(e){e._pullAlgorithm=void 0,e._cancelAlgorithm=void 0}function ht(e,t){const r=e._controlledReadableByteStream;"readable"===r._state&&(tt(e),A(e),dt(e),Pe(r,t))}function pt(e){const t=e._controlledReadableByteStream._state;return"errored"===t?null:"closed"===t?0:e._strategyHWM-e._queueTotalSize}function yt(e){if("object"!=typeof e||null===e)return!1;const t=Object.getOwnPropertyDescriptor(AbortSignal.prototype,"aborted").get;try{return t.call(e),!0}catch(e){return!1}}function mt(e){return new TypeError(`ReadableStream.prototype.${e} can only be used on a ReadableStream`)}function gt(e){return new TypeError("Cannot "+e+" a stream using a released reader")}function wt(e){return new TypeError(`ReadableStreamDefaultReader.prototype.${e} can only be used on a ReadableStreamDefaultReader`)}function bt(e){e._closedPromise=new Promise((t,r)=>{e._closedPromise_resolve=t,e._closedPromise_reject=r})}function _t(e,t){bt(e),vt(e,t)}function vt(e,t){e._closedPromise.catch(()=>{}),e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0}function kt(e){e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0}function At(e){return new TypeError(`ReadableStreamBYOBReader.prototype.${e} can only be used on a ReadableStreamBYOBReader`)}function St(e){return new TypeError(`ReadableStreamDefaultController.prototype.${e} can only be used on a ReadableStreamDefaultController`)}function Pt(e){return new TypeError(`ReadableStreamBYOBRequest.prototype.${e} can only be used on a ReadableStreamBYOBRequest`)}function Et(e){return new TypeError(`ReadableByteStreamController.prototype.${e} can only be used on a ReadableByteStreamController`)}class xt{constructor({highWaterMark:e}){s(this,"highWaterMark",e)}size(e){return e.byteLength}}class Mt{constructor({highWaterMark:e}){s(this,"highWaterMark",e)}size(){return 1}}class Kt{constructor(e={},t={},r={}){const n=t.size;let i=t.highWaterMark;const a=r.size;let s=r.highWaterMark;if(void 0!==e.writableType)throw new RangeError("Invalid writable type specified");const o=m(n);if(void 0===i&&(i=1),i=y(i),void 0!==e.readableType)throw new RangeError("Invalid readable type specified");const u=m(a);let l;void 0===s&&(s=0),s=y(s),function(e,t,r,n,i,a){function s(){return t}e._writable=function(e,t,r,n,i=1,a=(()=>1)){const s=Object.create(E.prototype);return M(s),W(s,Object.create(H.prototype),e,t,r,n,i,a),s}(s,function(t){return function(e,t){const r=e._transformStreamController;if(!0===e._backpressure){return e._backpressureChangePromise.then(()=>{const n=e._writable;if("erroring"===n._state)throw n._storedError;return zt(r,t)})}return zt(r,t)}(e,t)},function(){return function(e){const t=e._readable,r=e._transformStreamController,n=r._flushAlgorithm();return Bt(r),n.then(()=>{if("errored"===t._state)throw t._storedError;const e=t._readableStreamController;!0===Ve(e)&&He(e)}).catch(r=>{throw Ct(e,r),t._storedError})}(e)},function(t){return function(e,t){return Ct(e,t),Promise.resolve()}(e,t)},r,n),e._readable=ye(s,function(){return function(e){return Tt(e,!1),e._backpressureChangePromise}(e)},function(t){return Rt(e,t),Promise.resolve()},i,a),e._backpressure=void 0,e._backpressureChangePromise=void 0,e._backpressureChangePromise_resolve=void 0,Tt(e,!0),e._transformStreamController=void 0}(this,new Promise(e=>{l=e}),i,o,s,u),function(e,t){const r=Object.create(jt.prototype);let n=e=>{try{return It(r,e),Promise.resolve()}catch(e){return Promise.reject(e)}};const i=t.transform;if(void 0!==i){if("function"!=typeof i)throw new TypeError("transform is not a method");n=(e=>h(i,t,[e,r]))}const a=f(t,"flush",0,[r]);!function(e,t,r,n){t._controlledTransformStream=e,e._transformStreamController=t,t._transformAlgorithm=r,t._flushAlgorithm=n}(e,r,n,a)}(this,e);const c=d(e,"start",[this._transformStreamController]);l(c)}get readable(){if(!1===Ut(this))throw Nt("readable");return this._readable}get writable(){if(!1===Ut(this))throw Nt("writable");return this._writable}}function Ut(e){return!!a(e)&&!!Object.prototype.hasOwnProperty.call(e,"_transformStreamController")}function Ct(e,t){Ze(e._readable._readableStreamController,t),Rt(e,t)}function Rt(e,t){Bt(e._transformStreamController),Y(e._writable._writableStreamController,t),!0===e._backpressure&&Tt(e,!1)}function Tt(e,t){void 0!==e._backpressureChangePromise&&e._backpressureChangePromise_resolve(),e._backpressureChangePromise=new Promise(t=>{e._backpressureChangePromise_resolve=t}),e._backpressure=t}class jt{constructor(){throw new TypeError("TransformStreamDefaultController instances cannot be created directly")}get desiredSize(){if(!1===Ot(this))throw Dt("desiredSize");return Ge(this._controlledTransformStream._readable._readableStreamController)}enqueue(e){if(!1===Ot(this))throw Dt("enqueue");It(this,e)}error(e){if(!1===Ot(this))throw Dt("error");!function(e,t){Ct(e._controlledTransformStream,t)}(this,e)}terminate(){if(!1===Ot(this))throw Dt("terminate");!function(e){const t=e._controlledTransformStream,r=t._readable._readableStreamController;!0===Ve(r)&&He(r),Rt(t,new TypeError("TransformStream terminated"))}(this)}}function Ot(e){return!!a(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledTransformStream")}function Bt(e){e._transformAlgorithm=void 0,e._flushAlgorithm=void 0}function It(e,t){const r=e._controlledTransformStream,n=r._readable._readableStreamController;if(!1===Ve(n))throw new TypeError("Readable side is not in a state that permits enqueue");try{We(n,t)}catch(e){throw Rt(r,e),r._readable._storedError}!0!==qe(n)!==r._backpressure&&Tt(r,!0)}function zt(e,t){return e._transformAlgorithm(t).catch(t=>{throw Ct(e._controlledTransformStream,t),t})}function Dt(e){return new TypeError(`TransformStreamDefaultController.prototype.${e} can only be used on a TransformStreamDefaultController`)}function Nt(e){return new TypeError(`TransformStream.prototype.${e} can only be used on a TransformStream`)}const Lt={ReadableStream:he,WritableStream:E,ByteLengthQueuingStrategy:xt,CountQueuingStrategy:Mt,TransformStream:Kt};void 0!==n&&Object.assign(n,Lt),t.ReadableStream=he,t.WritableStream=E,t.ByteLengthQueuingStrategy=xt,t.CountQueuingStrategy=Mt,t.TransformStream=Kt,Object.defineProperty(t,"__esModule",{value:!0})}("object"==typeof r&&void 0!==t?r:(n=n||self).WebStreamsPolyfill={})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],2:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.AES_asm=function(){var e,t,r=!1;function n(r,n){var i=e[(t[r]+t[n])%255];return 0!==r&&0!==n||(i=0),i}var i,a,s,o,u=!1;function l(){function l(r){var n,i,a;for(i=a=function(r){var n=e[255-t[r]];return 0===r&&(n=0),n}(r),n=0;n<4;n++)a^=i=255&(i<<1|i>>>7);return a^=99}r||function(){e=[],t=[];var n,i,a=1;for(n=0;n<255;n++)e[n]=a,i=128&a,a<<=1,a&=255,128===i&&(a^=27),a^=e[n],t[e[n]]=n;e[255]=e[0],t[0]=0,r=!0}(),i=[],a=[],s=[[],[],[],[]],o=[[],[],[],[]];for(var c=0;c<256;c++){var f=l(c);i[c]=f,a[f]=c,s[0][c]=n(2,f)<<24|f<<16|f<<8|n(3,f),o[0][f]=n(14,c)<<24|n(9,c)<<16|n(13,c)<<8|n(11,c);for(var d=1;d<4;d++)s[d][c]=s[d-1][c]>>>8|s[d-1][c]<<24,o[d][f]=o[d-1][f]>>>8|o[d-1][f]<<24}u=!0}var c=function(e,t){u||l();var r=new Uint32Array(t);r.set(i,512),r.set(a,768);for(var n=0;n<4;n++)r.set(s[n],4096+1024*n>>2),r.set(o[n],8192+1024*n>>2);var c=function(e,t,r){"use asm";var n=0,i=0,a=0,s=0,o=0,u=0,l=0,c=0,f=0,d=0,h=0,p=0,y=0,m=0,g=0,w=0,b=0,_=0,v=0,k=0,A=0;var S=new e.Uint32Array(r),P=new e.Uint8Array(r);function E(e,t,r,o,u,l,c,f){e=e|0;t=t|0;r=r|0;o=o|0;u=u|0;l=l|0;c=c|0;f=f|0;var d=0,h=0,p=0,y=0,m=0,g=0,w=0,b=0;d=r|0x400,h=r|0x800,p=r|0xc00;u=u^S[(e|0)>>2],l=l^S[(e|4)>>2],c=c^S[(e|8)>>2],f=f^S[(e|12)>>2];for(b=16;(b|0)<=o<<4;b=b+16|0){y=S[(r|u>>22&1020)>>2]^S[(d|l>>14&1020)>>2]^S[(h|c>>6&1020)>>2]^S[(p|f<<2&1020)>>2]^S[(e|b|0)>>2],m=S[(r|l>>22&1020)>>2]^S[(d|c>>14&1020)>>2]^S[(h|f>>6&1020)>>2]^S[(p|u<<2&1020)>>2]^S[(e|b|4)>>2],g=S[(r|c>>22&1020)>>2]^S[(d|f>>14&1020)>>2]^S[(h|u>>6&1020)>>2]^S[(p|l<<2&1020)>>2]^S[(e|b|8)>>2],w=S[(r|f>>22&1020)>>2]^S[(d|u>>14&1020)>>2]^S[(h|l>>6&1020)>>2]^S[(p|c<<2&1020)>>2]^S[(e|b|12)>>2];u=y,l=m,c=g,f=w}n=S[(t|u>>22&1020)>>2]<<24^S[(t|l>>14&1020)>>2]<<16^S[(t|c>>6&1020)>>2]<<8^S[(t|f<<2&1020)>>2]^S[(e|b|0)>>2],i=S[(t|l>>22&1020)>>2]<<24^S[(t|c>>14&1020)>>2]<<16^S[(t|f>>6&1020)>>2]<<8^S[(t|u<<2&1020)>>2]^S[(e|b|4)>>2],a=S[(t|c>>22&1020)>>2]<<24^S[(t|f>>14&1020)>>2]<<16^S[(t|u>>6&1020)>>2]<<8^S[(t|l<<2&1020)>>2]^S[(e|b|8)>>2],s=S[(t|f>>22&1020)>>2]<<24^S[(t|u>>14&1020)>>2]<<16^S[(t|l>>6&1020)>>2]<<8^S[(t|c<<2&1020)>>2]^S[(e|b|12)>>2]}function x(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;E(0x0000,0x0800,0x1000,A,e,t,r,n)}function M(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;var a=0;E(0x0400,0x0c00,0x2000,A,e,n,r,t);a=i,i=s,s=a}function K(e,t,r,f){e=e|0;t=t|0;r=r|0;f=f|0;E(0x0000,0x0800,0x1000,A,o^e,u^t,l^r,c^f);o=n,u=i,l=a,c=s}function U(e,t,r,f){e=e|0;t=t|0;r=r|0;f=f|0;var d=0;E(0x0400,0x0c00,0x2000,A,e,f,r,t);d=i,i=s,s=d;n=n^o,i=i^u,a=a^l,s=s^c;o=e,u=t,l=r,c=f}function C(e,t,r,f){e=e|0;t=t|0;r=r|0;f=f|0;E(0x0000,0x0800,0x1000,A,o,u,l,c);o=n=n^e,u=i=i^t,l=a=a^r,c=s=s^f}function R(e,t,r,f){e=e|0;t=t|0;r=r|0;f=f|0;E(0x0000,0x0800,0x1000,A,o,u,l,c);n=n^e,i=i^t,a=a^r,s=s^f;o=e,u=t,l=r,c=f}function T(e,t,r,f){e=e|0;t=t|0;r=r|0;f=f|0;E(0x0000,0x0800,0x1000,A,o,u,l,c);o=n,u=i,l=a,c=s;n=n^e,i=i^t,a=a^r,s=s^f}function j(e,t,r,o){e=e|0;t=t|0;r=r|0;o=o|0;E(0x0000,0x0800,0x1000,A,f,d,h,p);p=~w&p|w&p+1;h=~g&h|g&h+((p|0)==0);d=~m&d|m&d+((h|0)==0);f=~y&f|y&f+((d|0)==0);n=n^e;i=i^t;a=a^r;s=s^o}function O(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;var i=0,a=0,s=0,f=0,d=0,h=0,p=0,y=0,m=0,g=0;e=e^o,t=t^u,r=r^l,n=n^c;i=b|0,a=_|0,s=v|0,f=k|0;for(;(m|0)<128;m=m+1|0){if(i>>>31){d=d^e,h=h^t,p=p^r,y=y^n}i=i<<1|a>>>31,a=a<<1|s>>>31,s=s<<1|f>>>31,f=f<<1;g=n&1;n=n>>>1|r<<31,r=r>>>1|t<<31,t=t>>>1|e<<31,e=e>>>1;if(g)e=e^0xe1000000}o=d,u=h,l=p,c=y}function B(e){e=e|0;A=e}function I(e,t,r,o){e=e|0;t=t|0;r=r|0;o=o|0;n=e,i=t,a=r,s=o}function z(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;o=e,u=t,l=r,c=n}function D(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;f=e,d=t,h=r,p=n}function N(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;y=e,m=t,g=r,w=n}function L(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;p=~w&p|w&n,h=~g&h|g&r,d=~m&d|m&t,f=~y&f|y&e}function q(e){e=e|0;if(e&15)return-1;P[e|0]=n>>>24,P[e|1]=n>>>16&255,P[e|2]=n>>>8&255,P[e|3]=n&255,P[e|4]=i>>>24,P[e|5]=i>>>16&255,P[e|6]=i>>>8&255,P[e|7]=i&255,P[e|8]=a>>>24,P[e|9]=a>>>16&255,P[e|10]=a>>>8&255,P[e|11]=a&255,P[e|12]=s>>>24,P[e|13]=s>>>16&255,P[e|14]=s>>>8&255,P[e|15]=s&255;return 16}function F(e){e=e|0;if(e&15)return-1;P[e|0]=o>>>24,P[e|1]=o>>>16&255,P[e|2]=o>>>8&255,P[e|3]=o&255,P[e|4]=u>>>24,P[e|5]=u>>>16&255,P[e|6]=u>>>8&255,P[e|7]=u&255,P[e|8]=l>>>24,P[e|9]=l>>>16&255,P[e|10]=l>>>8&255,P[e|11]=l&255,P[e|12]=c>>>24,P[e|13]=c>>>16&255,P[e|14]=c>>>8&255,P[e|15]=c&255;return 16}function H(){x(0,0,0,0);b=n,_=i,v=a,k=s}function W(e,t,r){e=e|0;t=t|0;r=r|0;var o=0;if(t&15)return-1;while((r|0)>=16){G[e&7](P[t|0]<<24|P[t|1]<<16|P[t|2]<<8|P[t|3],P[t|4]<<24|P[t|5]<<16|P[t|6]<<8|P[t|7],P[t|8]<<24|P[t|9]<<16|P[t|10]<<8|P[t|11],P[t|12]<<24|P[t|13]<<16|P[t|14]<<8|P[t|15]);P[t|0]=n>>>24,P[t|1]=n>>>16&255,P[t|2]=n>>>8&255,P[t|3]=n&255,P[t|4]=i>>>24,P[t|5]=i>>>16&255,P[t|6]=i>>>8&255,P[t|7]=i&255,P[t|8]=a>>>24,P[t|9]=a>>>16&255,P[t|10]=a>>>8&255,P[t|11]=a&255,P[t|12]=s>>>24,P[t|13]=s>>>16&255,P[t|14]=s>>>8&255,P[t|15]=s&255;o=o+16|0,t=t+16|0,r=r-16|0}return o|0}function Z(e,t,r){e=e|0;t=t|0;r=r|0;var n=0;if(t&15)return-1;while((r|0)>=16){V[e&1](P[t|0]<<24|P[t|1]<<16|P[t|2]<<8|P[t|3],P[t|4]<<24|P[t|5]<<16|P[t|6]<<8|P[t|7],P[t|8]<<24|P[t|9]<<16|P[t|10]<<8|P[t|11],P[t|12]<<24|P[t|13]<<16|P[t|14]<<8|P[t|15]);n=n+16|0,t=t+16|0,r=r-16|0}return n|0}var G=[x,M,K,U,C,R,T,j];var V=[K,O];return{set_rounds:B,set_state:I,set_iv:z,set_nonce:D,set_mask:N,set_counter:L,get_state:q,get_iv:F,gcm_init:H,cipher:W,mac:Z}}({Uint8Array:Uint8Array,Uint32Array:Uint32Array},e,t);return c.set_key=function(e,t,n,a,s,u,l,f,d){var h=r.subarray(0,60),p=r.subarray(256,316);h.set([t,n,a,s,u,l,f,d]);for(var y=e,m=1;y<4*e+28;y++){var g=h[y-1];(y%e==0||8===e&&y%e==4)&&(g=i[g>>>24]<<24^i[g>>>16&255]<<16^i[g>>>8&255]<<8^i[255&g]),y%e==0&&(g=g<<8^g>>>24^m<<24,m=m<<1^(128&m?27:0)),h[y]=h[y-e]^g}for(var w=0;w<y;w+=4)for(var b=0;b<4;b++)g=h[y-(4+w)+(4-b)%4],p[w+b]=w<4||w>=y-4?g:o[0][i[g>>>24]]^o[1][i[g>>>16&255]]^o[2][i[g>>>8&255]]^o[3][i[255&g]];c.set_rounds(e+5)},c};return c.ENC={ECB:0,CBC:2,CFB:4,OFB:6,CTR:7},c.DEC={ECB:1,CBC:3,CFB:5,OFB:6,CTR:7},c.MAC={CBC:0,GCM:1},c.HEAP_DATA=16384,c}()},{}],3:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.AES=void 0;var n=e("./aes.asm"),i=e("../other/utils"),a=e("../other/errors"),s=[],o=[],u=function(){function e(e,t,r,n){void 0===r&&(r=!0),this.pos=0,this.len=0,this.mode=n,this.pos=0,this.len=0,this.key=e,this.iv=t,this.padding=r,this.acquire_asm()}return e.prototype.acquire_asm=function(){void 0===this.heap&&void 0===this.asm&&(this.heap=s.pop()||(0,i._heap_init)().subarray(n.AES_asm.HEAP_DATA),this.asm=o.pop()||(0,n.AES_asm)(null,this.heap.buffer),this.reset(this.key,this.iv))},e.prototype.release_asm=function(){s.push(this.heap),o.push(this.asm),this.heap=void 0,this.asm=void 0},e.prototype.reset=function(e,t){var r=e.length;if(16!==r&&24!==r&&32!==r)throw new a.IllegalArgumentError("illegal key size");var n=new DataView(e.buffer,e.byteOffset,e.byteLength);if(this.asm.set_key(r>>2,n.getUint32(0),n.getUint32(4),n.getUint32(8),n.getUint32(12),r>16?n.getUint32(16):0,r>16?n.getUint32(20):0,r>24?n.getUint32(24):0,r>24?n.getUint32(28):0),void 0!==t){if(16!==t.length)throw new a.IllegalArgumentError("illegal iv size");var i=new DataView(t.buffer,t.byteOffset,t.byteLength);this.asm.set_iv(i.getUint32(0),i.getUint32(4),i.getUint32(8),i.getUint32(12))}else this.asm.set_iv(0,0,0,0)},e.prototype.AES_Encrypt_process=function(e){if(!(0,i.is_bytes)(e))throw new TypeError("data isn't of expected type");this.acquire_asm();for(var t=this.asm,r=this.heap,a=n.AES_asm.ENC[this.mode],s=n.AES_asm.HEAP_DATA,o=this.pos,u=this.len,l=0,c=e.length||0,f=0,d=0,h=new Uint8Array(u+c&-16);c>0;)u+=d=(0,i._heap_write)(r,o+u,e,l,c),l+=d,c-=d,(d=t.cipher(a,s+o,u))&&h.set(r.subarray(o,o+d),f),f+=d,d<u?(o+=d,u-=d):(o=0,u=0);return this.pos=o,this.len=u,h},e.prototype.AES_Encrypt_finish=function(){this.acquire_asm();var e=this.asm,t=this.heap,r=n.AES_asm.ENC[this.mode],i=n.AES_asm.HEAP_DATA,s=this.pos,o=this.len,u=16-o%16,l=o;if(this.hasOwnProperty("padding")){if(this.padding){for(var c=0;c<u;++c)t[s+o+c]=u;l=o+=u}else if(o%16)throw new a.IllegalArgumentError("data length must be a multiple of the block size")}else o+=u;var f=new Uint8Array(l);return o&&e.cipher(r,i+s,o),l&&f.set(t.subarray(s,s+l)),this.pos=0,this.len=0,this.release_asm(),f},e.prototype.AES_Decrypt_process=function(e){if(!(0,i.is_bytes)(e))throw new TypeError("data isn't of expected type");this.acquire_asm();var t=this.asm,r=this.heap,a=n.AES_asm.DEC[this.mode],s=n.AES_asm.HEAP_DATA,o=this.pos,u=this.len,l=0,c=e.length||0,f=0,d=u+c&-16,h=0,p=0;this.padding&&(d-=h=u+c-d||16);for(var y=new Uint8Array(d);c>0;)u+=p=(0,i._heap_write)(r,o+u,e,l,c),l+=p,c-=p,(p=t.cipher(a,s+o,u-(c?0:h)))&&y.set(r.subarray(o,o+p),f),f+=p,p<u?(o+=p,u-=p):(o=0,u=0);return this.pos=o,this.len=u,y},e.prototype.AES_Decrypt_finish=function(){this.acquire_asm();var e=this.asm,t=this.heap,r=n.AES_asm.DEC[this.mode],i=n.AES_asm.HEAP_DATA,s=this.pos,o=this.len,u=o;if(o>0){if(o%16){if(this.hasOwnProperty("padding"))throw new a.IllegalArgumentError("data length must be a multiple of the block size");o+=16-o%16}if(e.cipher(r,i+s,o),this.hasOwnProperty("padding")&&this.padding){var l=t[s+u-1];if(l<1||l>16||l>u)throw new a.SecurityError("bad padding");for(var c=0,f=l;f>1;f--)c|=l^t[s+u-f];if(c)throw new a.SecurityError("bad padding");u-=l}}var d=new Uint8Array(u);return u>0&&d.set(t.subarray(s,s+u)),this.pos=0,this.len=0,this.release_asm(),d},e}();r.AES=u},{"../other/errors":14,"../other/utils":15,"./aes.asm":2}],4:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.AES_CBC=void 0;var n,i=e("./aes"),a=e("../other/utils"),s=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=function(e){function t(t,r,n){return void 0===n&&(n=!0),e.call(this,t,r,n,"CBC")||this}return s(t,e),t.encrypt=function(e,r,n,i){return void 0===n&&(n=!0),new t(r,i,n).encrypt(e)},t.decrypt=function(e,r,n,i){return void 0===n&&(n=!0),new t(r,i,n).decrypt(e)},t.prototype.encrypt=function(e){var t=this.AES_Encrypt_process(e),r=this.AES_Encrypt_finish();return(0,a.joinBytes)(t,r)},t.prototype.decrypt=function(e){var t=this.AES_Decrypt_process(e),r=this.AES_Decrypt_finish();return(0,a.joinBytes)(t,r)},t}(i.AES);r.AES_CBC=o},{"../other/utils":15,"./aes":3}],5:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.AES_CFB=void 0;var n,i=e("./aes"),a=e("../other/utils"),s=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=function(e){function t(t,r){var n=e.call(this,t,r,!0,"CFB")||this;return delete n.padding,n}return s(t,e),t.encrypt=function(e,r,n){return new t(r,n).encrypt(e)},t.decrypt=function(e,r,n){return new t(r,n).decrypt(e)},t.prototype.encrypt=function(e){var t=this.AES_Encrypt_process(e),r=this.AES_Encrypt_finish();return(0,a.joinBytes)(t,r)},t.prototype.decrypt=function(e){var t=this.AES_Decrypt_process(e),r=this.AES_Decrypt_finish();return(0,a.joinBytes)(t,r)},t}(i.AES);r.AES_CFB=o},{"../other/utils":15,"./aes":3}],6:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.AES_CTR=void 0;var n,i=e("./aes"),a=e("../other/errors"),s=e("../other/utils"),o=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),u=function(e){function t(t,r){var n=e.call(this,t,void 0,!1,"CTR")||this;return delete n.padding,n.AES_CTR_set_options(r),n}return o(t,e),t.encrypt=function(e,r,n){return new t(r,n).encrypt(e)},t.decrypt=function(e,r,n){return new t(r,n).encrypt(e)},t.prototype.encrypt=function(e){var t=this.AES_Encrypt_process(e),r=this.AES_Encrypt_finish();return(0,s.joinBytes)(t,r)},t.prototype.decrypt=function(e){var t=this.AES_Encrypt_process(e),r=this.AES_Encrypt_finish();return(0,s.joinBytes)(t,r)},t.prototype.AES_CTR_set_options=function(e,t,r){if(void 0!==r){if(r<8||r>48)throw new a.IllegalArgumentError("illegal counter size");var n=Math.pow(2,r)-1;this.asm.set_mask(0,0,n/4294967296|0,0|n)}else r=48,this.asm.set_mask(0,0,65535,4294967295);if(void 0===e)throw new Error("nonce is required");var i=e.length;if(!i||i>16)throw new a.IllegalArgumentError("illegal nonce size");var s=new DataView(new ArrayBuffer(16));if(new Uint8Array(s.buffer).set(e),this.asm.set_nonce(s.getUint32(0),s.getUint32(4),s.getUint32(8),s.getUint32(12)),void 0!==t){if(t<0||t>=Math.pow(2,r))throw new a.IllegalArgumentError("illegal counter value");this.asm.set_counter(0,0,t/4294967296|0,0|t)}},t}(i.AES);r.AES_CTR=u},{"../other/errors":14,"../other/utils":15,"./aes":3}],7:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.AES_ECB=void 0;var n,i=e("./aes"),a=e("../other/utils"),s=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=function(e){function t(t,r){return void 0===r&&(r=!1),e.call(this,t,void 0,r,"ECB")||this}return s(t,e),t.encrypt=function(e,r,n){return void 0===n&&(n=!1),new t(r,n).encrypt(e)},t.decrypt=function(e,r,n){return void 0===n&&(n=!1),new t(r,n).decrypt(e)},t.prototype.encrypt=function(e){var t=this.AES_Encrypt_process(e),r=this.AES_Encrypt_finish();return(0,a.joinBytes)(t,r)},t.prototype.decrypt=function(e){var t=this.AES_Decrypt_process(e),r=this.AES_Decrypt_finish();return(0,a.joinBytes)(t,r)},t}(i.AES);r.AES_ECB=o},{"../other/utils":15,"./aes":3}],8:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.AES_GCM=void 0;var n,i=e("../other/errors"),a=e("../other/utils"),s=e("./aes"),o=e("./aes.asm"),u=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),l=68719476704,c=function(e){function t(t,r,n,a){void 0===a&&(a=16);var s=e.call(this,t,void 0,!1,"CTR")||this;if(s.tagSize=a,s.gamma0=0,s.counter=1,s.asm.gcm_init(),s.tagSize<4||s.tagSize>16)throw new i.IllegalArgumentError("illegal tagSize value");var u=r.length||0,c=new Uint8Array(16);12!==u?(s._gcm_mac_process(r),s.heap[0]=0,s.heap[1]=0,s.heap[2]=0,s.heap[3]=0,s.heap[4]=0,s.heap[5]=0,s.heap[6]=0,s.heap[7]=0,s.heap[8]=0,s.heap[9]=0,s.heap[10]=0,s.heap[11]=u>>>29,s.heap[12]=u>>>21&255,s.heap[13]=u>>>13&255,s.heap[14]=u>>>5&255,s.heap[15]=u<<3&255,s.asm.mac(o.AES_asm.MAC.GCM,o.AES_asm.HEAP_DATA,16),s.asm.get_iv(o.AES_asm.HEAP_DATA),s.asm.set_iv(0,0,0,0),c.set(s.heap.subarray(0,16))):(c.set(r),c[15]=1);var f=new DataView(c.buffer);if(s.gamma0=f.getUint32(12),s.asm.set_nonce(f.getUint32(0),f.getUint32(4),f.getUint32(8),0),s.asm.set_mask(0,0,0,4294967295),void 0!==n){if(n.length>l)throw new i.IllegalArgumentError("illegal adata length");n.length?(s.adata=n,s._gcm_mac_process(n)):s.adata=void 0}else s.adata=void 0;if(s.counter<1||s.counter>4294967295)throw new RangeError("counter must be a positive 32-bit integer");return s.asm.set_counter(0,0,0,s.gamma0+s.counter|0),s}return u(t,e),t.encrypt=function(e,r,n,i,a){return new t(r,n,i,a).encrypt(e)},t.decrypt=function(e,r,n,i,a){return new t(r,n,i,a).decrypt(e)},t.prototype.encrypt=function(e){return this.AES_GCM_encrypt(e)},t.prototype.decrypt=function(e){return this.AES_GCM_decrypt(e)},t.prototype.AES_GCM_Encrypt_process=function(e){var t=0,r=e.length||0,n=this.asm,i=this.heap,s=this.counter,u=this.pos,c=this.len,f=0,d=c+r&-16,h=0;if((s-1<<4)+c+r>l)throw new RangeError("counter overflow");for(var p=new Uint8Array(d);r>0;)c+=h=(0,a._heap_write)(i,u+c,e,t,r),t+=h,r-=h,h=n.cipher(o.AES_asm.ENC.CTR,o.AES_asm.HEAP_DATA+u,c),(h=n.mac(o.AES_asm.MAC.GCM,o.AES_asm.HEAP_DATA+u,h))&&p.set(i.subarray(u,u+h),f),s+=h>>>4,f+=h,h<c?(u+=h,c-=h):(u=0,c=0);return this.counter=s,this.pos=u,this.len=c,p},t.prototype.AES_GCM_Encrypt_finish=function(){var e=this.asm,t=this.heap,r=this.counter,n=this.tagSize,i=this.adata,a=this.pos,s=this.len,u=new Uint8Array(s+n);e.cipher(o.AES_asm.ENC.CTR,o.AES_asm.HEAP_DATA+a,s+15&-16),s&&u.set(t.subarray(a,a+s));for(var l=s;15&l;l++)t[a+l]=0;e.mac(o.AES_asm.MAC.GCM,o.AES_asm.HEAP_DATA+a,l);var c=void 0!==i?i.length:0,f=(r-1<<4)+s;return t[0]=0,t[1]=0,t[2]=0,t[3]=c>>>29,t[4]=c>>>21,t[5]=c>>>13&255,t[6]=c>>>5&255,t[7]=c<<3&255,t[8]=t[9]=t[10]=0,t[11]=f>>>29,t[12]=f>>>21&255,t[13]=f>>>13&255,t[14]=f>>>5&255,t[15]=f<<3&255,e.mac(o.AES_asm.MAC.GCM,o.AES_asm.HEAP_DATA,16),e.get_iv(o.AES_asm.HEAP_DATA),e.set_counter(0,0,0,this.gamma0),e.cipher(o.AES_asm.ENC.CTR,o.AES_asm.HEAP_DATA,16),u.set(t.subarray(0,n),s),this.counter=1,this.pos=0,this.len=0,u},t.prototype.AES_GCM_Decrypt_process=function(e){var t=0,r=e.length||0,n=this.asm,i=this.heap,s=this.counter,u=this.tagSize,c=this.pos,f=this.len,d=0,h=f+r>u?f+r-u&-16:0,p=f+r-h,y=0;if((s-1<<4)+f+r>l)throw new RangeError("counter overflow");for(var m=new Uint8Array(h);r>p;)f+=y=(0,a._heap_write)(i,c+f,e,t,r-p),t+=y,r-=y,y=n.mac(o.AES_asm.MAC.GCM,o.AES_asm.HEAP_DATA+c,y),(y=n.cipher(o.AES_asm.DEC.CTR,o.AES_asm.HEAP_DATA+c,y))&&m.set(i.subarray(c,c+y),d),s+=y>>>4,d+=y,c=0,f=0;return r>0&&(f+=(0,a._heap_write)(i,0,e,t,r)),this.counter=s,this.pos=c,this.len=f,m},t.prototype.AES_GCM_Decrypt_finish=function(){var e=this.asm,t=this.heap,r=this.tagSize,n=this.adata,a=this.counter,s=this.pos,u=this.len,l=u-r;if(u<r)throw new i.IllegalStateError("authentication tag not found");for(var c=new Uint8Array(l),f=new Uint8Array(t.subarray(s+l,s+u)),d=l;15&d;d++)t[s+d]=0;e.mac(o.AES_asm.MAC.GCM,o.AES_asm.HEAP_DATA+s,d),e.cipher(o.AES_asm.DEC.CTR,o.AES_asm.HEAP_DATA+s,d),l&&c.set(t.subarray(s,s+l));var h=void 0!==n?n.length:0,p=(a-1<<4)+u-r;t[0]=0,t[1]=0,t[2]=0,t[3]=h>>>29,t[4]=h>>>21,t[5]=h>>>13&255,t[6]=h>>>5&255,t[7]=h<<3&255,t[8]=t[9]=t[10]=0,t[11]=p>>>29,t[12]=p>>>21&255,t[13]=p>>>13&255,t[14]=p>>>5&255,t[15]=p<<3&255,e.mac(o.AES_asm.MAC.GCM,o.AES_asm.HEAP_DATA,16),e.get_iv(o.AES_asm.HEAP_DATA),e.set_counter(0,0,0,this.gamma0),e.cipher(o.AES_asm.ENC.CTR,o.AES_asm.HEAP_DATA,16);for(var y=0,m=0;m<r;++m)y|=f[m]^t[m];if(y)throw new i.SecurityError("data integrity check failed");return this.counter=1,this.pos=0,this.len=0,c},t.prototype.AES_GCM_decrypt=function(e){var t=this.AES_GCM_Decrypt_process(e),r=this.AES_GCM_Decrypt_finish(),n=new Uint8Array(t.length+r.length);return t.length&&n.set(t),r.length&&n.set(r,t.length),n},t.prototype.AES_GCM_encrypt=function(e){var t=this.AES_GCM_Encrypt_process(e),r=this.AES_GCM_Encrypt_finish(),n=new Uint8Array(t.length+r.length);return t.length&&n.set(t),r.length&&n.set(r,t.length),n},t.prototype._gcm_mac_process=function(e){for(var t=this.heap,r=this.asm,n=0,i=e.length||0,s=0;i>0;){for(n+=s=(0,a._heap_write)(t,0,e,n,i),i-=s;15&s;)t[s++]=0;r.mac(o.AES_asm.MAC.GCM,o.AES_asm.HEAP_DATA,s)}},t}(s.AES);r.AES_GCM=c},{"../other/errors":14,"../other/utils":15,"./aes":3,"./aes.asm":2}],9:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.Hash=void 0;var n=e("../other/utils"),i=e("../other/errors"),a=function(){function e(){this.pos=0,this.len=0,this.acquire_asm()}return e.prototype.acquire_asm=function(){void 0===this.heap&&void 0===this.asm&&(this.heap=this.constructor.heap_pool.pop()||(0,n._heap_init)(),this.asm=this.constructor.asm_pool.pop()||this.constructor.asm_function({Uint8Array:Uint8Array},null,this.heap.buffer),this.reset())},e.prototype.release_asm=function(){this.constructor.heap_pool.push(this.heap),this.constructor.asm_pool.push(this.asm),this.heap=void 0,this.asm=void 0},e.prototype.reset=function(){return this.acquire_asm(),this.result=null,this.pos=0,this.len=0,this.asm.reset(),this},e.prototype.process=function(e){if(null!==this.result)throw new i.IllegalStateError("state must be reset before processing new data");this.acquire_asm();for(var t=this.asm,r=this.heap,a=this.pos,s=this.len,o=0,u=e.length,l=0;u>0;)s+=l=(0,n._heap_write)(r,a+s,e,o,u),o+=l,u-=l,a+=l=t.process(a,s),(s-=l)||(a=0);return this.pos=a,this.len=s,this},e.prototype.finish=function(){if(null!==this.result)throw new i.IllegalStateError("state must be reset before processing new data");return this.acquire_asm(),this.asm.finish(this.pos,this.len,0),this.result=new Uint8Array(this.HASH_SIZE),this.result.set(this.heap.subarray(0,this.HASH_SIZE)),this.pos=0,this.len=0,this.release_asm(),this},e}();r.Hash=a},{"../other/errors":14,"../other/utils":15}],10:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.sha1_asm=function(e,t,r){"use asm";var n=0,i=0,a=0,s=0,o=0,u=0,l=0;var c=0,f=0,d=0,h=0,p=0,y=0,m=0,g=0,w=0,b=0;var _=new e.Uint8Array(r);function v(e,t,r,u,l,c,f,d,h,p,y,m,g,w,b,_){e=e|0;t=t|0;r=r|0;u=u|0;l=l|0;c=c|0;f=f|0;d=d|0;h=h|0;p=p|0;y=y|0;m=m|0;g=g|0;w=w|0;b=b|0;_=_|0;var v=0,k=0,A=0,S=0,P=0,E=0,x=0,M=0,K=0,U=0,C=0,R=0,T=0,j=0,O=0,B=0,I=0,z=0,D=0,N=0,L=0,q=0,F=0,H=0,W=0,Z=0,G=0,V=0,Y=0,$=0,Q=0,X=0,J=0,ee=0,te=0,re=0,ne=0,ie=0,ae=0,se=0,oe=0,ue=0,le=0,ce=0,fe=0,de=0,he=0,pe=0,ye=0,me=0,ge=0,we=0,be=0,_e=0,ve=0,ke=0,Ae=0,Se=0,Pe=0,Ee=0,xe=0,Me=0,Ke=0,Ue=0,Ce=0,Re=0,Te=0,je=0,Oe=0,Be=0,Ie=0;v=n;k=i;A=a;S=s;P=o;x=e+(v<<5|v>>>27)+P+(k&A|~k&S)+0x5a827999|0;P=S;S=A;A=k<<30|k>>>2;k=v;v=x;x=t+(v<<5|v>>>27)+P+(k&A|~k&S)+0x5a827999|0;P=S;S=A;A=k<<30|k>>>2;k=v;v=x;x=r+(v<<5|v>>>27)+P+(k&A|~k&S)+0x5a827999|0;P=S;S=A;A=k<<30|k>>>2;k=v;v=x;x=u+(v<<5|v>>>27)+P+(k&A|~k&S)+0x5a827999|0;P=S;S=A;A=k<<30|k>>>2;k=v;v=x;x=l+(v<<5|v>>>27)+P+(k&A|~k&S)+0x5a827999|0;P=S;S=A;A=k<<30|k>>>2;k=v;v=x;x=c+(v<<5|v>>>27)+P+(k&A|~k&S)+0x5a827999|0;P=S;S=A;A=k<<30|k>>>2;k=v;v=x;x=f+(v<<5|v>>>27)+P+(k&A|~k&S)+0x5a827999|0;P=S;S=A;A=k<<30|k>>>2;k=v;v=x;x=d+(v<<5|v>>>27)+P+(k&A|~k&S)+0x5a827999|0;P=S;S=A;A=k<<30|k>>>2;k=v;v=x;x=h+(v<<5|v>>>27)+P+(k&A|~k&S)+0x5a827999|0;P=S;S=A;A=k<<30|k>>>2;k=v;v=x;x=p+(v<<5|v>>>27)+P+(k&A|~k&S)+0x5a827999|0;P=S;S=A;A=k<<30|k>>>2;k=v;v=x;x=y+(v<<5|v>>>27)+P+(k&A|~k&S)+0x5a827999|0;P=S;S=A;A=k<<30|k>>>2;k=v;v=x;x=m+(v<<5|v>>>27)+P+(k&A|~k&S)+0x5a827999|0;P=S;S=A;A=k<<30|k>>>2;k=v;v=x;x=g+(v<<5|v>>>27)+P+(k&A|~k&S)+0x5a827999|0;P=S;S=A;A=k<<30|k>>>2;k=v;v=x;x=w+(v<<5|v>>>27)+P+(k&A|~k&S)+0x5a827999|0;P=S;S=A;A=k<<30|k>>>2;k=v;v=x;x=b+(v<<5|v>>>27)+P+(k&A|~k&S)+0x5a827999|0;P=S;S=A;A=k<<30|k>>>2;k=v;v=x;x=_+(v<<5|v>>>27)+P+(k&A|~k&S)+0x5a827999|0;P=S;S=A;A=k<<30|k>>>2;k=v;v=x;E=w^h^r^e;M=E<<1|E>>>31;x=M+(v<<5|v>>>27)+P+(k&A|~k&S)+0x5a827999|0;P=S;S=A;A=k<<30|k>>>2;k=v;v=x;E=b^p^u^t;K=E<<1|E>>>31;x=K+(v<<5|v>>>27)+P+(k&A|~k&S)+0x5a827999|0;P=S;S=A;A=k<<30|k>>>2;k=v;v=x;E=_^y^l^r;U=E<<1|E>>>31;x=U+(v<<5|v>>>27)+P+(k&A|~k&S)+0x5a827999|0;P=S;S=A;A=k<<30|k>>>2;k=v;v=x;E=M^m^c^u;C=E<<1|E>>>31;x=C+(v<<5|v>>>27)+P+(k&A|~k&S)+0x5a827999|0;P=S;S=A;A=k<<30|k>>>2;k=v;v=x;E=K^g^f^l;R=E<<1|E>>>31;x=R+(v<<5|v>>>27)+P+(k^A^S)+0x6ed9eba1|0;P=S;S=A;A=k<<30|k>>>2;k=v;v=x;E=U^w^d^c;T=E<<1|E>>>31;x=T+(v<<5|v>>>27)+P+(k^A^S)+0x6ed9eba1|0;P=S;S=A;A=k<<30|k>>>2;k=v;v=x;E=C^b^h^f;j=E<<1|E>>>31;x=j+(v<<5|v>>>27)+P+(k^A^S)+0x6ed9eba1|0;P=S;S=A;A=k<<30|k>>>2;k=v;v=x;E=R^_^p^d;O=E<<1|E>>>31;x=O+(v<<5|v>>>27)+P+(k^A^S)+0x6ed9eba1|0;P=S;S=A;A=k<<30|k>>>2;k=v;v=x;E=T^M^y^h;B=E<<1|E>>>31;x=B+(v<<5|v>>>27)+P+(k^A^S)+0x6ed9eba1|0;P=S;S=A;A=k<<30|k>>>2;k=v;v=x;E=j^K^m^p;I=E<<1|E>>>31;x=I+(v<<5|v>>>27)+P+(k^A^S)+0x6ed9eba1|0;P=S;S=A;A=k<<30|k>>>2;k=v;v=x;E=O^U^g^y;z=E<<1|E>>>31;x=z+(v<<5|v>>>27)+P+(k^A^S)+0x6ed9eba1|0;P=S;S=A;A=k<<30|k>>>2;k=v;v=x;E=B^C^w^m;D=E<<1|E>>>31;x=D+(v<<5|v>>>27)+P+(k^A^S)+0x6ed9eba1|0;P=S;S=A;A=k<<30|k>>>2;k=v;v=x;E=I^R^b^g;N=E<<1|E>>>31;x=N+(v<<5|v>>>27)+P+(k^A^S)+0x6ed9eba1|0;P=S;S=A;A=k<<30|k>>>2;k=v;v=x;E=z^T^_^w;L=E<<1|E>>>31;x=L+(v<<5|v>>>27)+P+(k^A^S)+0x6ed9eba1|0;P=S;S=A;A=k<<30|k>>>2;k=v;v=x;E=D^j^M^b;q=E<<1|E>>>31;x=q+(v<<5|v>>>27)+P+(k^A^S)+0x6ed9eba1|0;P=S;S=A;A=k<<30|k>>>2;k=v;v=x;E=N^O^K^_;F=E<<1|E>>>31;x=F+(v<<5|v>>>27)+P+(k^A^S)+0x6ed9eba1|0;P=S;S=A;A=k<<30|k>>>2;k=v;v=x;E=L^B^U^M;H=E<<1|E>>>31;x=H+(v<<5|v>>>27)+P+(k^A^S)+0x6ed9eba1|0;P=S;S=A;A=k<<30|k>>>2;k=v;v=x;E=q^I^C^K;W=E<<1|E>>>31;x=W+(v<<5|v>>>27)+P+(k^A^S)+0x6ed9eba1|0;P=S;S=A;A=k<<30|k>>>2;k=v;v=x;E=F^z^R^U;Z=E<<1|E>>>31;x=Z+(v<<5|v>>>27)+P+(k^A^S)+0x6ed9eba1|0;P=S;S=A;A=k<<30|k>>>2;k=v;v=x;E=H^D^T^C;G=E<<1|E>>>31;x=G+(v<<5|v>>>27)+P+(k^A^S)+0x6ed9eba1|0;P=S;S=A;A=k<<30|k>>>2;k=v;v=x;E=W^N^j^R;V=E<<1|E>>>31;x=V+(v<<5|v>>>27)+P+(k^A^S)+0x6ed9eba1|0;P=S;S=A;A=k<<30|k>>>2;k=v;v=x;E=Z^L^O^T;Y=E<<1|E>>>31;x=Y+(v<<5|v>>>27)+P+(k^A^S)+0x6ed9eba1|0;P=S;S=A;A=k<<30|k>>>2;k=v;v=x;E=G^q^B^j;$=E<<1|E>>>31;x=$+(v<<5|v>>>27)+P+(k^A^S)+0x6ed9eba1|0;P=S;S=A;A=k<<30|k>>>2;k=v;v=x;E=V^F^I^O;Q=E<<1|E>>>31;x=Q+(v<<5|v>>>27)+P+(k^A^S)+0x6ed9eba1|0;P=S;S=A;A=k<<30|k>>>2;k=v;v=x;E=Y^H^z^B;X=E<<1|E>>>31;x=X+(v<<5|v>>>27)+P+(k&A|k&S|A&S)-0x70e44324|0;P=S;S=A;A=k<<30|k>>>2;k=v;v=x;E=$^W^D^I;J=E<<1|E>>>31;x=J+(v<<5|v>>>27)+P+(k&A|k&S|A&S)-0x70e44324|0;P=S;S=A;A=k<<30|k>>>2;k=v;v=x;E=Q^Z^N^z;ee=E<<1|E>>>31;x=ee+(v<<5|v>>>27)+P+(k&A|k&S|A&S)-0x70e44324|0;P=S;S=A;A=k<<30|k>>>2;k=v;v=x;E=X^G^L^D;te=E<<1|E>>>31;x=te+(v<<5|v>>>27)+P+(k&A|k&S|A&S)-0x70e44324|0;P=S;S=A;A=k<<30|k>>>2;k=v;v=x;E=J^V^q^N;re=E<<1|E>>>31;x=re+(v<<5|v>>>27)+P+(k&A|k&S|A&S)-0x70e44324|0;P=S;S=A;A=k<<30|k>>>2;k=v;v=x;E=ee^Y^F^L;ne=E<<1|E>>>31;x=ne+(v<<5|v>>>27)+P+(k&A|k&S|A&S)-0x70e44324|0;P=S;S=A;A=k<<30|k>>>2;k=v;v=x;E=te^$^H^q;ie=E<<1|E>>>31;x=ie+(v<<5|v>>>27)+P+(k&A|k&S|A&S)-0x70e44324|0;P=S;S=A;A=k<<30|k>>>2;k=v;v=x;E=re^Q^W^F;ae=E<<1|E>>>31;x=ae+(v<<5|v>>>27)+P+(k&A|k&S|A&S)-0x70e44324|0;P=S;S=A;A=k<<30|k>>>2;k=v;v=x;E=ne^X^Z^H;se=E<<1|E>>>31;x=se+(v<<5|v>>>27)+P+(k&A|k&S|A&S)-0x70e44324|0;P=S;S=A;A=k<<30|k>>>2;k=v;v=x;E=ie^J^G^W;oe=E<<1|E>>>31;x=oe+(v<<5|v>>>27)+P+(k&A|k&S|A&S)-0x70e44324|0;P=S;S=A;A=k<<30|k>>>2;k=v;v=x;E=ae^ee^V^Z;ue=E<<1|E>>>31;x=ue+(v<<5|v>>>27)+P+(k&A|k&S|A&S)-0x70e44324|0;P=S;S=A;A=k<<30|k>>>2;k=v;v=x;E=se^te^Y^G;le=E<<1|E>>>31;x=le+(v<<5|v>>>27)+P+(k&A|k&S|A&S)-0x70e44324|0;P=S;S=A;A=k<<30|k>>>2;k=v;v=x;E=oe^re^$^V;ce=E<<1|E>>>31;x=ce+(v<<5|v>>>27)+P+(k&A|k&S|A&S)-0x70e44324|0;P=S;S=A;A=k<<30|k>>>2;k=v;v=x;E=ue^ne^Q^Y;fe=E<<1|E>>>31;x=fe+(v<<5|v>>>27)+P+(k&A|k&S|A&S)-0x70e44324|0;P=S;S=A;A=k<<30|k>>>2;k=v;v=x;E=le^ie^X^$;de=E<<1|E>>>31;x=de+(v<<5|v>>>27)+P+(k&A|k&S|A&S)-0x70e44324|0;P=S;S=A;A=k<<30|k>>>2;k=v;v=x;E=ce^ae^J^Q;he=E<<1|E>>>31;x=he+(v<<5|v>>>27)+P+(k&A|k&S|A&S)-0x70e44324|0;P=S;S=A;A=k<<30|k>>>2;k=v;v=x;E=fe^se^ee^X;pe=E<<1|E>>>31;x=pe+(v<<5|v>>>27)+P+(k&A|k&S|A&S)-0x70e44324|0;P=S;S=A;A=k<<30|k>>>2;k=v;v=x;E=de^oe^te^J;ye=E<<1|E>>>31;x=ye+(v<<5|v>>>27)+P+(k&A|k&S|A&S)-0x70e44324|0;P=S;S=A;A=k<<30|k>>>2;k=v;v=x;E=he^ue^re^ee;me=E<<1|E>>>31;x=me+(v<<5|v>>>27)+P+(k&A|k&S|A&S)-0x70e44324|0;P=S;S=A;A=k<<30|k>>>2;k=v;v=x;E=pe^le^ne^te;ge=E<<1|E>>>31;x=ge+(v<<5|v>>>27)+P+(k&A|k&S|A&S)-0x70e44324|0;P=S;S=A;A=k<<30|k>>>2;k=v;v=x;E=ye^ce^ie^re;we=E<<1|E>>>31;x=we+(v<<5|v>>>27)+P+(k^A^S)-0x359d3e2a|0;P=S;S=A;A=k<<30|k>>>2;k=v;v=x;E=me^fe^ae^ne;be=E<<1|E>>>31;x=be+(v<<5|v>>>27)+P+(k^A^S)-0x359d3e2a|0;P=S;S=A;A=k<<30|k>>>2;k=v;v=x;E=ge^de^se^ie;_e=E<<1|E>>>31;x=_e+(v<<5|v>>>27)+P+(k^A^S)-0x359d3e2a|0;P=S;S=A;A=k<<30|k>>>2;k=v;v=x;E=we^he^oe^ae;ve=E<<1|E>>>31;x=ve+(v<<5|v>>>27)+P+(k^A^S)-0x359d3e2a|0;P=S;S=A;A=k<<30|k>>>2;k=v;v=x;E=be^pe^ue^se;ke=E<<1|E>>>31;x=ke+(v<<5|v>>>27)+P+(k^A^S)-0x359d3e2a|0;P=S;S=A;A=k<<30|k>>>2;k=v;v=x;E=_e^ye^le^oe;Ae=E<<1|E>>>31;x=Ae+(v<<5|v>>>27)+P+(k^A^S)-0x359d3e2a|0;P=S;S=A;A=k<<30|k>>>2;k=v;v=x;E=ve^me^ce^ue;Se=E<<1|E>>>31;x=Se+(v<<5|v>>>27)+P+(k^A^S)-0x359d3e2a|0;P=S;S=A;A=k<<30|k>>>2;k=v;v=x;E=ke^ge^fe^le;Pe=E<<1|E>>>31;x=Pe+(v<<5|v>>>27)+P+(k^A^S)-0x359d3e2a|0;P=S;S=A;A=k<<30|k>>>2;k=v;v=x;E=Ae^we^de^ce;Ee=E<<1|E>>>31;x=Ee+(v<<5|v>>>27)+P+(k^A^S)-0x359d3e2a|0;P=S;S=A;A=k<<30|k>>>2;k=v;v=x;E=Se^be^he^fe;xe=E<<1|E>>>31;x=xe+(v<<5|v>>>27)+P+(k^A^S)-0x359d3e2a|0;P=S;S=A;A=k<<30|k>>>2;k=v;v=x;E=Pe^_e^pe^de;Me=E<<1|E>>>31;x=Me+(v<<5|v>>>27)+P+(k^A^S)-0x359d3e2a|0;P=S;S=A;A=k<<30|k>>>2;k=v;v=x;E=Ee^ve^ye^he;Ke=E<<1|E>>>31;x=Ke+(v<<5|v>>>27)+P+(k^A^S)-0x359d3e2a|0;P=S;S=A;A=k<<30|k>>>2;k=v;v=x;E=xe^ke^me^pe;Ue=E<<1|E>>>31;x=Ue+(v<<5|v>>>27)+P+(k^A^S)-0x359d3e2a|0;P=S;S=A;A=k<<30|k>>>2;k=v;v=x;E=Me^Ae^ge^ye;Ce=E<<1|E>>>31;x=Ce+(v<<5|v>>>27)+P+(k^A^S)-0x359d3e2a|0;P=S;S=A;A=k<<30|k>>>2;k=v;v=x;E=Ke^Se^we^me;Re=E<<1|E>>>31;x=Re+(v<<5|v>>>27)+P+(k^A^S)-0x359d3e2a|0;P=S;S=A;A=k<<30|k>>>2;k=v;v=x;E=Ue^Pe^be^ge;Te=E<<1|E>>>31;x=Te+(v<<5|v>>>27)+P+(k^A^S)-0x359d3e2a|0;P=S;S=A;A=k<<30|k>>>2;k=v;v=x;E=Ce^Ee^_e^we;je=E<<1|E>>>31;x=je+(v<<5|v>>>27)+P+(k^A^S)-0x359d3e2a|0;P=S;S=A;A=k<<30|k>>>2;k=v;v=x;E=Re^xe^ve^be;Oe=E<<1|E>>>31;x=Oe+(v<<5|v>>>27)+P+(k^A^S)-0x359d3e2a|0;P=S;S=A;A=k<<30|k>>>2;k=v;v=x;E=Te^Me^ke^_e;Be=E<<1|E>>>31;x=Be+(v<<5|v>>>27)+P+(k^A^S)-0x359d3e2a|0;P=S;S=A;A=k<<30|k>>>2;k=v;v=x;E=je^Ke^Ae^ve;Ie=E<<1|E>>>31;x=Ie+(v<<5|v>>>27)+P+(k^A^S)-0x359d3e2a|0;P=S;S=A;A=k<<30|k>>>2;k=v;v=x;n=n+v|0;i=i+k|0;a=a+A|0;s=s+S|0;o=o+P|0}function k(e){e=e|0;v(_[e|0]<<24|_[e|1]<<16|_[e|2]<<8|_[e|3],_[e|4]<<24|_[e|5]<<16|_[e|6]<<8|_[e|7],_[e|8]<<24|_[e|9]<<16|_[e|10]<<8|_[e|11],_[e|12]<<24|_[e|13]<<16|_[e|14]<<8|_[e|15],_[e|16]<<24|_[e|17]<<16|_[e|18]<<8|_[e|19],_[e|20]<<24|_[e|21]<<16|_[e|22]<<8|_[e|23],_[e|24]<<24|_[e|25]<<16|_[e|26]<<8|_[e|27],_[e|28]<<24|_[e|29]<<16|_[e|30]<<8|_[e|31],_[e|32]<<24|_[e|33]<<16|_[e|34]<<8|_[e|35],_[e|36]<<24|_[e|37]<<16|_[e|38]<<8|_[e|39],_[e|40]<<24|_[e|41]<<16|_[e|42]<<8|_[e|43],_[e|44]<<24|_[e|45]<<16|_[e|46]<<8|_[e|47],_[e|48]<<24|_[e|49]<<16|_[e|50]<<8|_[e|51],_[e|52]<<24|_[e|53]<<16|_[e|54]<<8|_[e|55],_[e|56]<<24|_[e|57]<<16|_[e|58]<<8|_[e|59],_[e|60]<<24|_[e|61]<<16|_[e|62]<<8|_[e|63])}function A(e){e=e|0;_[e|0]=n>>>24;_[e|1]=n>>>16&255;_[e|2]=n>>>8&255;_[e|3]=n&255;_[e|4]=i>>>24;_[e|5]=i>>>16&255;_[e|6]=i>>>8&255;_[e|7]=i&255;_[e|8]=a>>>24;_[e|9]=a>>>16&255;_[e|10]=a>>>8&255;_[e|11]=a&255;_[e|12]=s>>>24;_[e|13]=s>>>16&255;_[e|14]=s>>>8&255;_[e|15]=s&255;_[e|16]=o>>>24;_[e|17]=o>>>16&255;_[e|18]=o>>>8&255;_[e|19]=o&255}function S(){n=0x67452301;i=0xefcdab89;a=0x98badcfe;s=0x10325476;o=0xc3d2e1f0;u=l=0}function P(e,t,r,c,f,d,h){e=e|0;t=t|0;r=r|0;c=c|0;f=f|0;d=d|0;h=h|0;n=e;i=t;a=r;s=c;o=f;u=d;l=h}function E(e,t){e=e|0;t=t|0;var r=0;if(e&63)return-1;while((t|0)>=64){k(e);e=e+64|0;t=t-64|0;r=r+64|0}u=u+r|0;if(u>>>0<r>>>0)l=l+1|0;return r|0}function x(e,t,r){e=e|0;t=t|0;r=r|0;var n=0,i=0;if(e&63)return-1;if(~r)if(r&31)return-1;if((t|0)>=64){n=E(e,t)|0;if((n|0)==-1)return-1;e=e+n|0;t=t-n|0}n=n+t|0;u=u+t|0;if(u>>>0<t>>>0)l=l+1|0;_[e|t]=0x80;if((t|0)>=56){for(i=t+1|0;(i|0)<64;i=i+1|0)_[e|i]=0x00;k(e);t=0;_[e|0]=0}for(i=t+1|0;(i|0)<59;i=i+1|0)_[e|i]=0;_[e|56]=l>>>21&255;_[e|57]=l>>>13&255;_[e|58]=l>>>5&255;_[e|59]=l<<3&255|u>>>29;_[e|60]=u>>>21&255;_[e|61]=u>>>13&255;_[e|62]=u>>>5&255;_[e|63]=u<<3&255;k(e);if(~r)A(r);return n|0}function M(){n=c;i=f;a=d;s=h;o=p;u=64;l=0}function K(){n=y;i=m;a=g;s=w;o=b;u=64;l=0}function U(e,t,r,_,k,A,P,E,x,M,K,U,C,R,T,j){e=e|0;t=t|0;r=r|0;_=_|0;k=k|0;A=A|0;P=P|0;E=E|0;x=x|0;M=M|0;K=K|0;U=U|0;C=C|0;R=R|0;T=T|0;j=j|0;S();v(e^0x5c5c5c5c,t^0x5c5c5c5c,r^0x5c5c5c5c,_^0x5c5c5c5c,k^0x5c5c5c5c,A^0x5c5c5c5c,P^0x5c5c5c5c,E^0x5c5c5c5c,x^0x5c5c5c5c,M^0x5c5c5c5c,K^0x5c5c5c5c,U^0x5c5c5c5c,C^0x5c5c5c5c,R^0x5c5c5c5c,T^0x5c5c5c5c,j^0x5c5c5c5c);y=n;m=i;g=a;w=s;b=o;S();v(e^0x36363636,t^0x36363636,r^0x36363636,_^0x36363636,k^0x36363636,A^0x36363636,P^0x36363636,E^0x36363636,x^0x36363636,M^0x36363636,K^0x36363636,U^0x36363636,C^0x36363636,R^0x36363636,T^0x36363636,j^0x36363636);c=n;f=i;d=a;h=s;p=o;u=64;l=0}function C(e,t,r){e=e|0;t=t|0;r=r|0;var u=0,l=0,c=0,f=0,d=0,h=0;if(e&63)return-1;if(~r)if(r&31)return-1;h=x(e,t,-1)|0;u=n,l=i,c=a,f=s,d=o;K();v(u,l,c,f,d,0x80000000,0,0,0,0,0,0,0,0,0,672);if(~r)A(r);return h|0}function R(e,t,r,u,l){e=e|0;t=t|0;r=r|0;u=u|0;l=l|0;var c=0,f=0,d=0,h=0,p=0,y=0,m=0,g=0,w=0,b=0;if(e&63)return-1;if(~l)if(l&31)return-1;_[e+t|0]=r>>>24;_[e+t+1|0]=r>>>16&255;_[e+t+2|0]=r>>>8&255;_[e+t+3|0]=r&255;C(e,t+4|0,-1)|0;c=y=n,f=m=i,d=g=a,h=w=s,p=b=o;u=u-1|0;while((u|0)>0){M();v(y,m,g,w,b,0x80000000,0,0,0,0,0,0,0,0,0,672);y=n,m=i,g=a,w=s,b=o;K();v(y,m,g,w,b,0x80000000,0,0,0,0,0,0,0,0,0,672);y=n,m=i,g=a,w=s,b=o;c=c^n;f=f^i;d=d^a;h=h^s;p=p^o;u=u-1|0}n=c;i=f;a=d;s=h;o=p;if(~l)A(l);return 0}return{reset:S,init:P,process:E,finish:x,hmac_reset:M,hmac_init:U,hmac_finish:C,pbkdf2_generate_block:R}}},{}],11:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.Sha1=r._sha1_hash_size=r._sha1_block_size=void 0;var n,i=e("./sha1.asm"),a=e("../hash"),s=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=r._sha1_block_size=64,u=r._sha1_hash_size=20,l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.NAME="sha1",t.BLOCK_SIZE=o,t.HASH_SIZE=u,t}return s(t,e),t.bytes=function(e){return(new t).process(e).finish().result},t.NAME="sha1",t.heap_pool=[],t.asm_pool=[],t.asm_function=i.sha1_asm,t}(a.Hash);r.Sha1=l},{"../hash":9,"./sha1.asm":10}],12:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.sha256_asm=function(e,t,r){"use asm";var n=0,i=0,a=0,s=0,o=0,u=0,l=0,c=0,f=0,d=0;var h=0,p=0,y=0,m=0,g=0,w=0,b=0,_=0,v=0,k=0,A=0,S=0,P=0,E=0,x=0,M=0;var K=new e.Uint8Array(r);function U(e,t,r,f,d,h,p,y,m,g,w,b,_,v,k,A){e=e|0;t=t|0;r=r|0;f=f|0;d=d|0;h=h|0;p=p|0;y=y|0;m=m|0;g=g|0;w=w|0;b=b|0;_=_|0;v=v|0;k=k|0;A=A|0;var S=0,P=0,E=0,x=0,M=0,K=0,U=0,C=0;S=n;P=i;E=a;x=s;M=o;K=u;U=l;C=c;C=e+C+(M>>>6^M>>>11^M>>>25^M<<26^M<<21^M<<7)+(U^M&(K^U))+0x428a2f98|0;x=x+C|0;C=C+(S&P^E&(S^P))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;U=t+U+(x>>>6^x>>>11^x>>>25^x<<26^x<<21^x<<7)+(K^x&(M^K))+0x71374491|0;E=E+U|0;U=U+(C&S^P&(C^S))+(C>>>2^C>>>13^C>>>22^C<<30^C<<19^C<<10)|0;K=r+K+(E>>>6^E>>>11^E>>>25^E<<26^E<<21^E<<7)+(M^E&(x^M))+0xb5c0fbcf|0;P=P+K|0;K=K+(U&C^S&(U^C))+(U>>>2^U>>>13^U>>>22^U<<30^U<<19^U<<10)|0;M=f+M+(P>>>6^P>>>11^P>>>25^P<<26^P<<21^P<<7)+(x^P&(E^x))+0xe9b5dba5|0;S=S+M|0;M=M+(K&U^C&(K^U))+(K>>>2^K>>>13^K>>>22^K<<30^K<<19^K<<10)|0;x=d+x+(S>>>6^S>>>11^S>>>25^S<<26^S<<21^S<<7)+(E^S&(P^E))+0x3956c25b|0;C=C+x|0;x=x+(M&K^U&(M^K))+(M>>>2^M>>>13^M>>>22^M<<30^M<<19^M<<10)|0;E=h+E+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(P^C&(S^P))+0x59f111f1|0;U=U+E|0;E=E+(x&M^K&(x^M))+(x>>>2^x>>>13^x>>>22^x<<30^x<<19^x<<10)|0;P=p+P+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(S^U&(C^S))+0x923f82a4|0;K=K+P|0;P=P+(E&x^M&(E^x))+(E>>>2^E>>>13^E>>>22^E<<30^E<<19^E<<10)|0;S=y+S+(K>>>6^K>>>11^K>>>25^K<<26^K<<21^K<<7)+(C^K&(U^C))+0xab1c5ed5|0;M=M+S|0;S=S+(P&E^x&(P^E))+(P>>>2^P>>>13^P>>>22^P<<30^P<<19^P<<10)|0;C=m+C+(M>>>6^M>>>11^M>>>25^M<<26^M<<21^M<<7)+(U^M&(K^U))+0xd807aa98|0;x=x+C|0;C=C+(S&P^E&(S^P))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;U=g+U+(x>>>6^x>>>11^x>>>25^x<<26^x<<21^x<<7)+(K^x&(M^K))+0x12835b01|0;E=E+U|0;U=U+(C&S^P&(C^S))+(C>>>2^C>>>13^C>>>22^C<<30^C<<19^C<<10)|0;K=w+K+(E>>>6^E>>>11^E>>>25^E<<26^E<<21^E<<7)+(M^E&(x^M))+0x243185be|0;P=P+K|0;K=K+(U&C^S&(U^C))+(U>>>2^U>>>13^U>>>22^U<<30^U<<19^U<<10)|0;M=b+M+(P>>>6^P>>>11^P>>>25^P<<26^P<<21^P<<7)+(x^P&(E^x))+0x550c7dc3|0;S=S+M|0;M=M+(K&U^C&(K^U))+(K>>>2^K>>>13^K>>>22^K<<30^K<<19^K<<10)|0;x=_+x+(S>>>6^S>>>11^S>>>25^S<<26^S<<21^S<<7)+(E^S&(P^E))+0x72be5d74|0;C=C+x|0;x=x+(M&K^U&(M^K))+(M>>>2^M>>>13^M>>>22^M<<30^M<<19^M<<10)|0;E=v+E+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(P^C&(S^P))+0x80deb1fe|0;U=U+E|0;E=E+(x&M^K&(x^M))+(x>>>2^x>>>13^x>>>22^x<<30^x<<19^x<<10)|0;P=k+P+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(S^U&(C^S))+0x9bdc06a7|0;K=K+P|0;P=P+(E&x^M&(E^x))+(E>>>2^E>>>13^E>>>22^E<<30^E<<19^E<<10)|0;S=A+S+(K>>>6^K>>>11^K>>>25^K<<26^K<<21^K<<7)+(C^K&(U^C))+0xc19bf174|0;M=M+S|0;S=S+(P&E^x&(P^E))+(P>>>2^P>>>13^P>>>22^P<<30^P<<19^P<<10)|0;e=(t>>>7^t>>>18^t>>>3^t<<25^t<<14)+(k>>>17^k>>>19^k>>>10^k<<15^k<<13)+e+g|0;C=e+C+(M>>>6^M>>>11^M>>>25^M<<26^M<<21^M<<7)+(U^M&(K^U))+0xe49b69c1|0;x=x+C|0;C=C+(S&P^E&(S^P))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;t=(r>>>7^r>>>18^r>>>3^r<<25^r<<14)+(A>>>17^A>>>19^A>>>10^A<<15^A<<13)+t+w|0;U=t+U+(x>>>6^x>>>11^x>>>25^x<<26^x<<21^x<<7)+(K^x&(M^K))+0xefbe4786|0;E=E+U|0;U=U+(C&S^P&(C^S))+(C>>>2^C>>>13^C>>>22^C<<30^C<<19^C<<10)|0;r=(f>>>7^f>>>18^f>>>3^f<<25^f<<14)+(e>>>17^e>>>19^e>>>10^e<<15^e<<13)+r+b|0;K=r+K+(E>>>6^E>>>11^E>>>25^E<<26^E<<21^E<<7)+(M^E&(x^M))+0x0fc19dc6|0;P=P+K|0;K=K+(U&C^S&(U^C))+(U>>>2^U>>>13^U>>>22^U<<30^U<<19^U<<10)|0;f=(d>>>7^d>>>18^d>>>3^d<<25^d<<14)+(t>>>17^t>>>19^t>>>10^t<<15^t<<13)+f+_|0;M=f+M+(P>>>6^P>>>11^P>>>25^P<<26^P<<21^P<<7)+(x^P&(E^x))+0x240ca1cc|0;S=S+M|0;M=M+(K&U^C&(K^U))+(K>>>2^K>>>13^K>>>22^K<<30^K<<19^K<<10)|0;d=(h>>>7^h>>>18^h>>>3^h<<25^h<<14)+(r>>>17^r>>>19^r>>>10^r<<15^r<<13)+d+v|0;x=d+x+(S>>>6^S>>>11^S>>>25^S<<26^S<<21^S<<7)+(E^S&(P^E))+0x2de92c6f|0;C=C+x|0;x=x+(M&K^U&(M^K))+(M>>>2^M>>>13^M>>>22^M<<30^M<<19^M<<10)|0;h=(p>>>7^p>>>18^p>>>3^p<<25^p<<14)+(f>>>17^f>>>19^f>>>10^f<<15^f<<13)+h+k|0;E=h+E+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(P^C&(S^P))+0x4a7484aa|0;U=U+E|0;E=E+(x&M^K&(x^M))+(x>>>2^x>>>13^x>>>22^x<<30^x<<19^x<<10)|0;p=(y>>>7^y>>>18^y>>>3^y<<25^y<<14)+(d>>>17^d>>>19^d>>>10^d<<15^d<<13)+p+A|0;P=p+P+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(S^U&(C^S))+0x5cb0a9dc|0;K=K+P|0;P=P+(E&x^M&(E^x))+(E>>>2^E>>>13^E>>>22^E<<30^E<<19^E<<10)|0;y=(m>>>7^m>>>18^m>>>3^m<<25^m<<14)+(h>>>17^h>>>19^h>>>10^h<<15^h<<13)+y+e|0;S=y+S+(K>>>6^K>>>11^K>>>25^K<<26^K<<21^K<<7)+(C^K&(U^C))+0x76f988da|0;M=M+S|0;S=S+(P&E^x&(P^E))+(P>>>2^P>>>13^P>>>22^P<<30^P<<19^P<<10)|0;m=(g>>>7^g>>>18^g>>>3^g<<25^g<<14)+(p>>>17^p>>>19^p>>>10^p<<15^p<<13)+m+t|0;C=m+C+(M>>>6^M>>>11^M>>>25^M<<26^M<<21^M<<7)+(U^M&(K^U))+0x983e5152|0;x=x+C|0;C=C+(S&P^E&(S^P))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;g=(w>>>7^w>>>18^w>>>3^w<<25^w<<14)+(y>>>17^y>>>19^y>>>10^y<<15^y<<13)+g+r|0;U=g+U+(x>>>6^x>>>11^x>>>25^x<<26^x<<21^x<<7)+(K^x&(M^K))+0xa831c66d|0;E=E+U|0;U=U+(C&S^P&(C^S))+(C>>>2^C>>>13^C>>>22^C<<30^C<<19^C<<10)|0;w=(b>>>7^b>>>18^b>>>3^b<<25^b<<14)+(m>>>17^m>>>19^m>>>10^m<<15^m<<13)+w+f|0;K=w+K+(E>>>6^E>>>11^E>>>25^E<<26^E<<21^E<<7)+(M^E&(x^M))+0xb00327c8|0;P=P+K|0;K=K+(U&C^S&(U^C))+(U>>>2^U>>>13^U>>>22^U<<30^U<<19^U<<10)|0;b=(_>>>7^_>>>18^_>>>3^_<<25^_<<14)+(g>>>17^g>>>19^g>>>10^g<<15^g<<13)+b+d|0;M=b+M+(P>>>6^P>>>11^P>>>25^P<<26^P<<21^P<<7)+(x^P&(E^x))+0xbf597fc7|0;S=S+M|0;M=M+(K&U^C&(K^U))+(K>>>2^K>>>13^K>>>22^K<<30^K<<19^K<<10)|0;_=(v>>>7^v>>>18^v>>>3^v<<25^v<<14)+(w>>>17^w>>>19^w>>>10^w<<15^w<<13)+_+h|0;x=_+x+(S>>>6^S>>>11^S>>>25^S<<26^S<<21^S<<7)+(E^S&(P^E))+0xc6e00bf3|0;C=C+x|0;x=x+(M&K^U&(M^K))+(M>>>2^M>>>13^M>>>22^M<<30^M<<19^M<<10)|0;v=(k>>>7^k>>>18^k>>>3^k<<25^k<<14)+(b>>>17^b>>>19^b>>>10^b<<15^b<<13)+v+p|0;E=v+E+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(P^C&(S^P))+0xd5a79147|0;U=U+E|0;E=E+(x&M^K&(x^M))+(x>>>2^x>>>13^x>>>22^x<<30^x<<19^x<<10)|0;k=(A>>>7^A>>>18^A>>>3^A<<25^A<<14)+(_>>>17^_>>>19^_>>>10^_<<15^_<<13)+k+y|0;P=k+P+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(S^U&(C^S))+0x06ca6351|0;K=K+P|0;P=P+(E&x^M&(E^x))+(E>>>2^E>>>13^E>>>22^E<<30^E<<19^E<<10)|0;A=(e>>>7^e>>>18^e>>>3^e<<25^e<<14)+(v>>>17^v>>>19^v>>>10^v<<15^v<<13)+A+m|0;S=A+S+(K>>>6^K>>>11^K>>>25^K<<26^K<<21^K<<7)+(C^K&(U^C))+0x14292967|0;M=M+S|0;S=S+(P&E^x&(P^E))+(P>>>2^P>>>13^P>>>22^P<<30^P<<19^P<<10)|0;e=(t>>>7^t>>>18^t>>>3^t<<25^t<<14)+(k>>>17^k>>>19^k>>>10^k<<15^k<<13)+e+g|0;C=e+C+(M>>>6^M>>>11^M>>>25^M<<26^M<<21^M<<7)+(U^M&(K^U))+0x27b70a85|0;x=x+C|0;C=C+(S&P^E&(S^P))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;t=(r>>>7^r>>>18^r>>>3^r<<25^r<<14)+(A>>>17^A>>>19^A>>>10^A<<15^A<<13)+t+w|0;U=t+U+(x>>>6^x>>>11^x>>>25^x<<26^x<<21^x<<7)+(K^x&(M^K))+0x2e1b2138|0;E=E+U|0;U=U+(C&S^P&(C^S))+(C>>>2^C>>>13^C>>>22^C<<30^C<<19^C<<10)|0;r=(f>>>7^f>>>18^f>>>3^f<<25^f<<14)+(e>>>17^e>>>19^e>>>10^e<<15^e<<13)+r+b|0;K=r+K+(E>>>6^E>>>11^E>>>25^E<<26^E<<21^E<<7)+(M^E&(x^M))+0x4d2c6dfc|0;P=P+K|0;K=K+(U&C^S&(U^C))+(U>>>2^U>>>13^U>>>22^U<<30^U<<19^U<<10)|0;f=(d>>>7^d>>>18^d>>>3^d<<25^d<<14)+(t>>>17^t>>>19^t>>>10^t<<15^t<<13)+f+_|0;M=f+M+(P>>>6^P>>>11^P>>>25^P<<26^P<<21^P<<7)+(x^P&(E^x))+0x53380d13|0;S=S+M|0;M=M+(K&U^C&(K^U))+(K>>>2^K>>>13^K>>>22^K<<30^K<<19^K<<10)|0;d=(h>>>7^h>>>18^h>>>3^h<<25^h<<14)+(r>>>17^r>>>19^r>>>10^r<<15^r<<13)+d+v|0;x=d+x+(S>>>6^S>>>11^S>>>25^S<<26^S<<21^S<<7)+(E^S&(P^E))+0x650a7354|0;C=C+x|0;x=x+(M&K^U&(M^K))+(M>>>2^M>>>13^M>>>22^M<<30^M<<19^M<<10)|0;h=(p>>>7^p>>>18^p>>>3^p<<25^p<<14)+(f>>>17^f>>>19^f>>>10^f<<15^f<<13)+h+k|0;E=h+E+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(P^C&(S^P))+0x766a0abb|0;U=U+E|0;E=E+(x&M^K&(x^M))+(x>>>2^x>>>13^x>>>22^x<<30^x<<19^x<<10)|0;p=(y>>>7^y>>>18^y>>>3^y<<25^y<<14)+(d>>>17^d>>>19^d>>>10^d<<15^d<<13)+p+A|0;P=p+P+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(S^U&(C^S))+0x81c2c92e|0;K=K+P|0;P=P+(E&x^M&(E^x))+(E>>>2^E>>>13^E>>>22^E<<30^E<<19^E<<10)|0;y=(m>>>7^m>>>18^m>>>3^m<<25^m<<14)+(h>>>17^h>>>19^h>>>10^h<<15^h<<13)+y+e|0;S=y+S+(K>>>6^K>>>11^K>>>25^K<<26^K<<21^K<<7)+(C^K&(U^C))+0x92722c85|0;M=M+S|0;S=S+(P&E^x&(P^E))+(P>>>2^P>>>13^P>>>22^P<<30^P<<19^P<<10)|0;m=(g>>>7^g>>>18^g>>>3^g<<25^g<<14)+(p>>>17^p>>>19^p>>>10^p<<15^p<<13)+m+t|0;C=m+C+(M>>>6^M>>>11^M>>>25^M<<26^M<<21^M<<7)+(U^M&(K^U))+0xa2bfe8a1|0;x=x+C|0;C=C+(S&P^E&(S^P))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;g=(w>>>7^w>>>18^w>>>3^w<<25^w<<14)+(y>>>17^y>>>19^y>>>10^y<<15^y<<13)+g+r|0;U=g+U+(x>>>6^x>>>11^x>>>25^x<<26^x<<21^x<<7)+(K^x&(M^K))+0xa81a664b|0;E=E+U|0;U=U+(C&S^P&(C^S))+(C>>>2^C>>>13^C>>>22^C<<30^C<<19^C<<10)|0;w=(b>>>7^b>>>18^b>>>3^b<<25^b<<14)+(m>>>17^m>>>19^m>>>10^m<<15^m<<13)+w+f|0;K=w+K+(E>>>6^E>>>11^E>>>25^E<<26^E<<21^E<<7)+(M^E&(x^M))+0xc24b8b70|0;P=P+K|0;K=K+(U&C^S&(U^C))+(U>>>2^U>>>13^U>>>22^U<<30^U<<19^U<<10)|0;b=(_>>>7^_>>>18^_>>>3^_<<25^_<<14)+(g>>>17^g>>>19^g>>>10^g<<15^g<<13)+b+d|0;M=b+M+(P>>>6^P>>>11^P>>>25^P<<26^P<<21^P<<7)+(x^P&(E^x))+0xc76c51a3|0;S=S+M|0;M=M+(K&U^C&(K^U))+(K>>>2^K>>>13^K>>>22^K<<30^K<<19^K<<10)|0;_=(v>>>7^v>>>18^v>>>3^v<<25^v<<14)+(w>>>17^w>>>19^w>>>10^w<<15^w<<13)+_+h|0;x=_+x+(S>>>6^S>>>11^S>>>25^S<<26^S<<21^S<<7)+(E^S&(P^E))+0xd192e819|0;C=C+x|0;x=x+(M&K^U&(M^K))+(M>>>2^M>>>13^M>>>22^M<<30^M<<19^M<<10)|0;v=(k>>>7^k>>>18^k>>>3^k<<25^k<<14)+(b>>>17^b>>>19^b>>>10^b<<15^b<<13)+v+p|0;E=v+E+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(P^C&(S^P))+0xd6990624|0;U=U+E|0;E=E+(x&M^K&(x^M))+(x>>>2^x>>>13^x>>>22^x<<30^x<<19^x<<10)|0;k=(A>>>7^A>>>18^A>>>3^A<<25^A<<14)+(_>>>17^_>>>19^_>>>10^_<<15^_<<13)+k+y|0;P=k+P+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(S^U&(C^S))+0xf40e3585|0;K=K+P|0;P=P+(E&x^M&(E^x))+(E>>>2^E>>>13^E>>>22^E<<30^E<<19^E<<10)|0;A=(e>>>7^e>>>18^e>>>3^e<<25^e<<14)+(v>>>17^v>>>19^v>>>10^v<<15^v<<13)+A+m|0;S=A+S+(K>>>6^K>>>11^K>>>25^K<<26^K<<21^K<<7)+(C^K&(U^C))+0x106aa070|0;M=M+S|0;S=S+(P&E^x&(P^E))+(P>>>2^P>>>13^P>>>22^P<<30^P<<19^P<<10)|0;e=(t>>>7^t>>>18^t>>>3^t<<25^t<<14)+(k>>>17^k>>>19^k>>>10^k<<15^k<<13)+e+g|0;C=e+C+(M>>>6^M>>>11^M>>>25^M<<26^M<<21^M<<7)+(U^M&(K^U))+0x19a4c116|0;x=x+C|0;C=C+(S&P^E&(S^P))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;t=(r>>>7^r>>>18^r>>>3^r<<25^r<<14)+(A>>>17^A>>>19^A>>>10^A<<15^A<<13)+t+w|0;U=t+U+(x>>>6^x>>>11^x>>>25^x<<26^x<<21^x<<7)+(K^x&(M^K))+0x1e376c08|0;E=E+U|0;U=U+(C&S^P&(C^S))+(C>>>2^C>>>13^C>>>22^C<<30^C<<19^C<<10)|0;r=(f>>>7^f>>>18^f>>>3^f<<25^f<<14)+(e>>>17^e>>>19^e>>>10^e<<15^e<<13)+r+b|0;K=r+K+(E>>>6^E>>>11^E>>>25^E<<26^E<<21^E<<7)+(M^E&(x^M))+0x2748774c|0;P=P+K|0;K=K+(U&C^S&(U^C))+(U>>>2^U>>>13^U>>>22^U<<30^U<<19^U<<10)|0;f=(d>>>7^d>>>18^d>>>3^d<<25^d<<14)+(t>>>17^t>>>19^t>>>10^t<<15^t<<13)+f+_|0;M=f+M+(P>>>6^P>>>11^P>>>25^P<<26^P<<21^P<<7)+(x^P&(E^x))+0x34b0bcb5|0;S=S+M|0;M=M+(K&U^C&(K^U))+(K>>>2^K>>>13^K>>>22^K<<30^K<<19^K<<10)|0;d=(h>>>7^h>>>18^h>>>3^h<<25^h<<14)+(r>>>17^r>>>19^r>>>10^r<<15^r<<13)+d+v|0;x=d+x+(S>>>6^S>>>11^S>>>25^S<<26^S<<21^S<<7)+(E^S&(P^E))+0x391c0cb3|0;C=C+x|0;x=x+(M&K^U&(M^K))+(M>>>2^M>>>13^M>>>22^M<<30^M<<19^M<<10)|0;h=(p>>>7^p>>>18^p>>>3^p<<25^p<<14)+(f>>>17^f>>>19^f>>>10^f<<15^f<<13)+h+k|0;E=h+E+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(P^C&(S^P))+0x4ed8aa4a|0;U=U+E|0;E=E+(x&M^K&(x^M))+(x>>>2^x>>>13^x>>>22^x<<30^x<<19^x<<10)|0;p=(y>>>7^y>>>18^y>>>3^y<<25^y<<14)+(d>>>17^d>>>19^d>>>10^d<<15^d<<13)+p+A|0;P=p+P+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(S^U&(C^S))+0x5b9cca4f|0;K=K+P|0;P=P+(E&x^M&(E^x))+(E>>>2^E>>>13^E>>>22^E<<30^E<<19^E<<10)|0;y=(m>>>7^m>>>18^m>>>3^m<<25^m<<14)+(h>>>17^h>>>19^h>>>10^h<<15^h<<13)+y+e|0;S=y+S+(K>>>6^K>>>11^K>>>25^K<<26^K<<21^K<<7)+(C^K&(U^C))+0x682e6ff3|0;M=M+S|0;S=S+(P&E^x&(P^E))+(P>>>2^P>>>13^P>>>22^P<<30^P<<19^P<<10)|0;m=(g>>>7^g>>>18^g>>>3^g<<25^g<<14)+(p>>>17^p>>>19^p>>>10^p<<15^p<<13)+m+t|0;C=m+C+(M>>>6^M>>>11^M>>>25^M<<26^M<<21^M<<7)+(U^M&(K^U))+0x748f82ee|0;x=x+C|0;C=C+(S&P^E&(S^P))+(S>>>2^S>>>13^S>>>22^S<<30^S<<19^S<<10)|0;g=(w>>>7^w>>>18^w>>>3^w<<25^w<<14)+(y>>>17^y>>>19^y>>>10^y<<15^y<<13)+g+r|0;U=g+U+(x>>>6^x>>>11^x>>>25^x<<26^x<<21^x<<7)+(K^x&(M^K))+0x78a5636f|0;E=E+U|0;U=U+(C&S^P&(C^S))+(C>>>2^C>>>13^C>>>22^C<<30^C<<19^C<<10)|0;w=(b>>>7^b>>>18^b>>>3^b<<25^b<<14)+(m>>>17^m>>>19^m>>>10^m<<15^m<<13)+w+f|0;K=w+K+(E>>>6^E>>>11^E>>>25^E<<26^E<<21^E<<7)+(M^E&(x^M))+0x84c87814|0;P=P+K|0;K=K+(U&C^S&(U^C))+(U>>>2^U>>>13^U>>>22^U<<30^U<<19^U<<10)|0;b=(_>>>7^_>>>18^_>>>3^_<<25^_<<14)+(g>>>17^g>>>19^g>>>10^g<<15^g<<13)+b+d|0;M=b+M+(P>>>6^P>>>11^P>>>25^P<<26^P<<21^P<<7)+(x^P&(E^x))+0x8cc70208|0;S=S+M|0;M=M+(K&U^C&(K^U))+(K>>>2^K>>>13^K>>>22^K<<30^K<<19^K<<10)|0;_=(v>>>7^v>>>18^v>>>3^v<<25^v<<14)+(w>>>17^w>>>19^w>>>10^w<<15^w<<13)+_+h|0;x=_+x+(S>>>6^S>>>11^S>>>25^S<<26^S<<21^S<<7)+(E^S&(P^E))+0x90befffa|0;C=C+x|0;x=x+(M&K^U&(M^K))+(M>>>2^M>>>13^M>>>22^M<<30^M<<19^M<<10)|0;v=(k>>>7^k>>>18^k>>>3^k<<25^k<<14)+(b>>>17^b>>>19^b>>>10^b<<15^b<<13)+v+p|0;E=v+E+(C>>>6^C>>>11^C>>>25^C<<26^C<<21^C<<7)+(P^C&(S^P))+0xa4506ceb|0;U=U+E|0;E=E+(x&M^K&(x^M))+(x>>>2^x>>>13^x>>>22^x<<30^x<<19^x<<10)|0;k=(A>>>7^A>>>18^A>>>3^A<<25^A<<14)+(_>>>17^_>>>19^_>>>10^_<<15^_<<13)+k+y|0;P=k+P+(U>>>6^U>>>11^U>>>25^U<<26^U<<21^U<<7)+(S^U&(C^S))+0xbef9a3f7|0;K=K+P|0;P=P+(E&x^M&(E^x))+(E>>>2^E>>>13^E>>>22^E<<30^E<<19^E<<10)|0;A=(e>>>7^e>>>18^e>>>3^e<<25^e<<14)+(v>>>17^v>>>19^v>>>10^v<<15^v<<13)+A+m|0;S=A+S+(K>>>6^K>>>11^K>>>25^K<<26^K<<21^K<<7)+(C^K&(U^C))+0xc67178f2|0;M=M+S|0;S=S+(P&E^x&(P^E))+(P>>>2^P>>>13^P>>>22^P<<30^P<<19^P<<10)|0;n=n+S|0;i=i+P|0;a=a+E|0;s=s+x|0;o=o+M|0;u=u+K|0;l=l+U|0;c=c+C|0}function C(e){e=e|0;U(K[e|0]<<24|K[e|1]<<16|K[e|2]<<8|K[e|3],K[e|4]<<24|K[e|5]<<16|K[e|6]<<8|K[e|7],K[e|8]<<24|K[e|9]<<16|K[e|10]<<8|K[e|11],K[e|12]<<24|K[e|13]<<16|K[e|14]<<8|K[e|15],K[e|16]<<24|K[e|17]<<16|K[e|18]<<8|K[e|19],K[e|20]<<24|K[e|21]<<16|K[e|22]<<8|K[e|23],K[e|24]<<24|K[e|25]<<16|K[e|26]<<8|K[e|27],K[e|28]<<24|K[e|29]<<16|K[e|30]<<8|K[e|31],K[e|32]<<24|K[e|33]<<16|K[e|34]<<8|K[e|35],K[e|36]<<24|K[e|37]<<16|K[e|38]<<8|K[e|39],K[e|40]<<24|K[e|41]<<16|K[e|42]<<8|K[e|43],K[e|44]<<24|K[e|45]<<16|K[e|46]<<8|K[e|47],K[e|48]<<24|K[e|49]<<16|K[e|50]<<8|K[e|51],K[e|52]<<24|K[e|53]<<16|K[e|54]<<8|K[e|55],K[e|56]<<24|K[e|57]<<16|K[e|58]<<8|K[e|59],K[e|60]<<24|K[e|61]<<16|K[e|62]<<8|K[e|63])}function R(e){e=e|0;K[e|0]=n>>>24;K[e|1]=n>>>16&255;K[e|2]=n>>>8&255;K[e|3]=n&255;K[e|4]=i>>>24;K[e|5]=i>>>16&255;K[e|6]=i>>>8&255;K[e|7]=i&255;K[e|8]=a>>>24;K[e|9]=a>>>16&255;K[e|10]=a>>>8&255;K[e|11]=a&255;K[e|12]=s>>>24;K[e|13]=s>>>16&255;K[e|14]=s>>>8&255;K[e|15]=s&255;K[e|16]=o>>>24;K[e|17]=o>>>16&255;K[e|18]=o>>>8&255;K[e|19]=o&255;K[e|20]=u>>>24;K[e|21]=u>>>16&255;K[e|22]=u>>>8&255;K[e|23]=u&255;K[e|24]=l>>>24;K[e|25]=l>>>16&255;K[e|26]=l>>>8&255;K[e|27]=l&255;K[e|28]=c>>>24;K[e|29]=c>>>16&255;K[e|30]=c>>>8&255;K[e|31]=c&255}function T(){n=0x6a09e667;i=0xbb67ae85;a=0x3c6ef372;s=0xa54ff53a;o=0x510e527f;u=0x9b05688c;l=0x1f83d9ab;c=0x5be0cd19;f=d=0}function j(e,t,r,h,p,y,m,g,w,b){e=e|0;t=t|0;r=r|0;h=h|0;p=p|0;y=y|0;m=m|0;g=g|0;w=w|0;b=b|0;n=e;i=t;a=r;s=h;o=p;u=y;l=m;c=g;f=w;d=b}function O(e,t){e=e|0;t=t|0;var r=0;if(e&63)return-1;while((t|0)>=64){C(e);e=e+64|0;t=t-64|0;r=r+64|0}f=f+r|0;if(f>>>0<r>>>0)d=d+1|0;return r|0}function B(e,t,r){e=e|0;t=t|0;r=r|0;var n=0,i=0;if(e&63)return-1;if(~r)if(r&31)return-1;if((t|0)>=64){n=O(e,t)|0;if((n|0)==-1)return-1;e=e+n|0;t=t-n|0}n=n+t|0;f=f+t|0;if(f>>>0<t>>>0)d=d+1|0;K[e|t]=0x80;if((t|0)>=56){for(i=t+1|0;(i|0)<64;i=i+1|0)K[e|i]=0x00;C(e);t=0;K[e|0]=0}for(i=t+1|0;(i|0)<59;i=i+1|0)K[e|i]=0;K[e|56]=d>>>21&255;K[e|57]=d>>>13&255;K[e|58]=d>>>5&255;K[e|59]=d<<3&255|f>>>29;K[e|60]=f>>>21&255;K[e|61]=f>>>13&255;K[e|62]=f>>>5&255;K[e|63]=f<<3&255;C(e);if(~r)R(r);return n|0}function I(){n=h;i=p;a=y;s=m;o=g;u=w;l=b;c=_;f=64;d=0}function z(){n=v;i=k;a=A;s=S;o=P;u=E;l=x;c=M;f=64;d=0}function D(e,t,r,K,C,R,j,O,B,I,z,D,N,L,q,F){e=e|0;t=t|0;r=r|0;K=K|0;C=C|0;R=R|0;j=j|0;O=O|0;B=B|0;I=I|0;z=z|0;D=D|0;N=N|0;L=L|0;q=q|0;F=F|0;T();U(e^0x5c5c5c5c,t^0x5c5c5c5c,r^0x5c5c5c5c,K^0x5c5c5c5c,C^0x5c5c5c5c,R^0x5c5c5c5c,j^0x5c5c5c5c,O^0x5c5c5c5c,B^0x5c5c5c5c,I^0x5c5c5c5c,z^0x5c5c5c5c,D^0x5c5c5c5c,N^0x5c5c5c5c,L^0x5c5c5c5c,q^0x5c5c5c5c,F^0x5c5c5c5c);v=n;k=i;A=a;S=s;P=o;E=u;x=l;M=c;T();U(e^0x36363636,t^0x36363636,r^0x36363636,K^0x36363636,C^0x36363636,R^0x36363636,j^0x36363636,O^0x36363636,B^0x36363636,I^0x36363636,z^0x36363636,D^0x36363636,N^0x36363636,L^0x36363636,q^0x36363636,F^0x36363636);h=n;p=i;y=a;m=s;g=o;w=u;b=l;_=c;f=64;d=0}function N(e,t,r){e=e|0;t=t|0;r=r|0;var f=0,d=0,h=0,p=0,y=0,m=0,g=0,w=0,b=0;if(e&63)return-1;if(~r)if(r&31)return-1;b=B(e,t,-1)|0;f=n,d=i,h=a,p=s,y=o,m=u,g=l,w=c;z();U(f,d,h,p,y,m,g,w,0x80000000,0,0,0,0,0,0,768);if(~r)R(r);return b|0}function L(e,t,r,f,d){e=e|0;t=t|0;r=r|0;f=f|0;d=d|0;var h=0,p=0,y=0,m=0,g=0,w=0,b=0,_=0,v=0,k=0,A=0,S=0,P=0,E=0,x=0,M=0;if(e&63)return-1;if(~d)if(d&31)return-1;K[e+t|0]=r>>>24;K[e+t+1|0]=r>>>16&255;K[e+t+2|0]=r>>>8&255;K[e+t+3|0]=r&255;N(e,t+4|0,-1)|0;h=v=n,p=k=i,y=A=a,m=S=s,g=P=o,w=E=u,b=x=l,_=M=c;f=f-1|0;while((f|0)>0){I();U(v,k,A,S,P,E,x,M,0x80000000,0,0,0,0,0,0,768);v=n,k=i,A=a,S=s,P=o,E=u,x=l,M=c;z();U(v,k,A,S,P,E,x,M,0x80000000,0,0,0,0,0,0,768);v=n,k=i,A=a,S=s,P=o,E=u,x=l,M=c;h=h^n;p=p^i;y=y^a;m=m^s;g=g^o;w=w^u;b=b^l;_=_^c;f=f-1|0}n=h;i=p;a=y;s=m;o=g;u=w;l=b;c=_;if(~d)R(d);return 0}return{reset:T,init:j,process:O,finish:B,hmac_reset:I,hmac_init:D,hmac_finish:N,pbkdf2_generate_block:L}}},{}],13:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.Sha256=r._sha256_hash_size=r._sha256_block_size=void 0;var n,i=e("./sha256.asm"),a=e("../hash"),s=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=r._sha256_block_size=64,u=r._sha256_hash_size=32,l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.NAME="sha256",t.BLOCK_SIZE=o,t.HASH_SIZE=u,t}return s(t,e),t.bytes=function(e){return(new t).process(e).finish().result},t.NAME="sha256",t.heap_pool=[],t.asm_pool=[],t.asm_function=i.sha256_asm,t}(a.Hash);r.Sha256=l},{"../hash":9,"./sha256.asm":12}],14:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n,i=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),a=function(e){function t(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var n=e.apply(this,t)||this;return Object.create(Error.prototype,{name:{value:"IllegalStateError"}}),n}return i(t,e),t}(Error);r.IllegalStateError=a;var s=function(e){function t(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var n=e.apply(this,t)||this;return Object.create(Error.prototype,{name:{value:"IllegalArgumentError"}}),n}return i(t,e),t}(Error);r.IllegalArgumentError=s;var o=function(e){function t(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var n=e.apply(this,t)||this;return Object.create(Error.prototype,{name:{value:"SecurityError"}}),n}return i(t,e),t}(Error);r.SecurityError=o},{}],15:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.string_to_bytes=a,r.hex_to_bytes=function(e){var t=e.length;1&t&&(e="0"+e,t++);for(var r=new Uint8Array(t>>1),n=0;n<t;n+=2)r[n>>1]=parseInt(e.substr(n,2),16);return r},r.base64_to_bytes=function(e){return a(n(e))},r.bytes_to_string=s,r.bytes_to_hex=function(e){for(var t="",r=0;r<e.length;r++){var n=(255&e[r]).toString(16);n.length<2&&(t+="0"),t+=n}return t},r.bytes_to_base64=function(e){return i(s(e))},r.pow2_ceil=function(e){return e-=1,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e+=1},r.is_number=function(e){return"number"==typeof e},r.is_string=function(e){return"string"==typeof e},r.is_buffer=function(e){return e instanceof ArrayBuffer},r.is_bytes=function(e){return e instanceof Uint8Array},r.is_typed_array=function(e){return e instanceof Int8Array||e instanceof Uint8Array||e instanceof Int16Array||e instanceof Uint16Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array},r._heap_init=function(e,t){var r=e?e.byteLength:t||65536;if(4095&r||r<=0)throw new Error("heap size must be a positive integer and a multiple of 4096");return e=e||new Uint8Array(new ArrayBuffer(r))},r._heap_write=function(e,t,r,n,i){var a=e.length-t,s=a<i?a:i;return e.set(r.subarray(n,n+s),t),s},r.joinBytes=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r=e.reduce(function(e,t){return e+t.length},0),n=new Uint8Array(r),i=0,a=0;a<e.length;a++)n.set(e[a],i),i+=e[a].length;return n};var n="undefined"==typeof atob?function(t){return e("buffer").Buffer.from(t,"base64").toString("binary")}:atob,i="undefined"==typeof btoa?function(t){return e("buffer").Buffer.from(t,"binary").toString("base64")}:btoa;function a(e,t){void 0===t&&(t=!1);for(var r=e.length,n=new Uint8Array(t?4*r:r),i=0,a=0;i<r;i++){var s=e.charCodeAt(i);if(t&&55296<=s&&s<=56319){if(++i>=r)throw new Error("Malformed string, low surrogate expected at position "+i);s=(55296^s)<<10|65536|56320^e.charCodeAt(i)}else if(!t&&s>>>8)throw new Error("Wide characters are not allowed.");!t||s<=127?n[a++]=s:s<=2047?(n[a++]=192|s>>6,n[a++]=128|63&s):s<=65535?(n[a++]=224|s>>12,n[a++]=128|s>>6&63,n[a++]=128|63&s):(n[a++]=240|s>>18,n[a++]=128|s>>12&63,n[a++]=128|s>>6&63,n[a++]=128|63&s)}return n.subarray(0,a)}function s(e,t){void 0===t&&(t=!1);for(var r=e.length,n=new Array(r),i=0,a=0;i<r;i++){var s=e[i];if(!t||s<128)n[a++]=s;else if(s>=192&&s<224&&i+1<r)n[a++]=(31&s)<<6|63&e[++i];else if(s>=224&&s<240&&i+2<r)n[a++]=(15&s)<<12|(63&e[++i])<<6|63&e[++i];else{if(!(s>=240&&s<248&&i+3<r))throw new Error("Malformed UTF8 character at byte offset "+i);var o=(7&s)<<18|(63&e[++i])<<12|(63&e[++i])<<6|63&e[++i];o<=65535?n[a++]=o:(o^=65536,n[a++]=55296|o>>10,n[a++]=56320|1023&o)}}var u="";for(i=0;i<a;i+=16384)u+=String.fromCharCode.apply(String,n.slice(i,i+16384<=a?i+16384:a));return u}},{buffer:"buffer"}],16:[function(e,t,r){!function(t,r){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function a(e,t,r){if(a.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var s;"object"==typeof t?t.exports=a:r.BN=a,a.BN=a,a.wordSize=26;try{s=e("buffer").Buffer}catch(S){}function o(e,t,r){for(var n=0,i=Math.min(e.length,r),a=t;a<i;a++){var s=e.charCodeAt(a)-48;n<<=4,n|=s>=49&&s<=54?s-49+10:s>=17&&s<=22?s-17+10:15&s}return n}function u(e,t,r,n){for(var i=0,a=Math.min(e.length,r),s=t;s<a;s++){var o=e.charCodeAt(s)-48;i*=n,i+=o>=49?o-49+10:o>=17?o-17+10:o}return i}a.isBN=function(e){return e instanceof a||null!==e&&"object"==typeof e&&e.constructor.wordSize===a.wordSize&&Array.isArray(e.words)},a.max=function(e,t){return e.cmp(t)>0?e:t},a.min=function(e,t){return e.cmp(t)<0?e:t},a.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&i++,16===t?this._parseHex(e,i):this._parseBase(e,t,i),"-"===e[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),t,r)},a.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},a.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var a,s,o=0;if("be"===r)for(i=e.length-1,a=0;i>=0;i-=3)s=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[a]|=s<<o&67108863,this.words[a+1]=s>>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);else if("le"===r)for(i=0,a=0;i<e.length;i+=3)s=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[a]|=s<<o&67108863,this.words[a+1]=s>>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);return this.strip()},a.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n,i,a=0;for(r=e.length-6,n=0;r>=t;r-=6)i=o(e,r,r+6),this.words[n]|=i<<a&67108863,this.words[n+1]|=i>>>26-a&4194303,(a+=24)>=26&&(a-=26,n++);r+6!==t&&(i=o(e,t,r+6),this.words[n]|=i<<a&67108863,this.words[n+1]|=i>>>26-a&4194303),this.strip()},a.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var a=e.length-r,s=a%n,o=Math.min(a,a-s)+r,l=0,c=r;c<o;c+=n)l=u(e,c,c+n,t),this.imuln(i),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l);if(0!==s){var f=1;for(l=u(e,c,e.length,t),c=0;c<s;c++)f*=t;this.imuln(f),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l)}},a.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},a.prototype.clone=function(){var e=new a(null);return this.copy(e),e},a.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},a.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var l=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],c=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function d(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],a=0|t.words[0],s=i*a,o=67108863&s,u=s/67108864|0;r.words[0]=o;for(var l=1;l<n;l++){for(var c=u>>>26,f=67108863&u,d=Math.min(l,t.length-1),h=Math.max(0,l-e.length+1);h<=d;h++){var p=l-h|0;c+=(s=(i=0|e.words[p])*(a=0|t.words[h])+f)/67108864|0,f=67108863&s}r.words[l]=0|f,u=0|c}return 0!==u?r.words[l]=0|u:r.length--,r.strip()}a.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,a=0,s=0;s<this.length;s++){var o=this.words[s],u=(16777215&(o<<i|a)).toString(16);r=0!==(a=o>>>24-i&16777215)||s!==this.length-1?l[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,s--)}for(0!==a&&(r=a.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var d=c[e],h=f[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var y=p.modn(h).toString(e);r=(p=p.idivn(h)).isZero()?y+r:l[d-y.length]+y+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(e,t){return n(void 0!==s),this.toArrayLike(s,e,t)},a.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},a.prototype.toArrayLike=function(e,t,r){var i=this.byteLength(),a=r||Math.max(1,i);n(i<=a,"byte array longer than desired length"),n(a>0,"Requested array length <= 0"),this.strip();var s,o,u="le"===t,l=new e(a),c=this.clone();if(u){for(o=0;!c.isZero();o++)s=c.andln(255),c.iushrn(8),l[o]=s;for(;o<a;o++)l[o]=0}else{for(o=0;o<a-i;o++)l[o]=0;for(o=0;!c.isZero();o++)s=c.andln(255),c.iushrn(8),l[a-o-1]=s}return l},Math.clz32?a.prototype._countBits=function(e){return 32-Math.clz32(e)}:a.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},a.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},a.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},a.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},a.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},a.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},a.prototype.isNeg=function(){return 0!==this.negative},a.prototype.neg=function(){return this.clone().ineg()},a.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},a.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},a.prototype.ior=function(e){return n(0==(this.negative|e.negative)),this.iuor(e)},a.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},a.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},a.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this.strip()},a.prototype.iand=function(e){return n(0==(this.negative|e.negative)),this.iuand(e)},a.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},a.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},a.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;n<r.length;n++)this.words[n]=t.words[n]^r.words[n];if(this!==t)for(;n<t.length;n++)this.words[n]=t.words[n];return this.length=t.length,this.strip()},a.prototype.ixor=function(e){return n(0==(this.negative|e.negative)),this.iuxor(e)},a.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},a.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},a.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},a.prototype.notn=function(e){return this.clone().inotn(e)},a.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<i:this.words[r]&~(1<<i),this.strip()},a.prototype.iadd=function(e){var t,r,n;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(r=this,n=e):(r=e,n=this);for(var i=0,a=0;a<n.length;a++)t=(0|r.words[a])+(0|n.words[a])+i,this.words[a]=67108863&t,i=t>>>26;for(;0!==i&&a<r.length;a++)t=(0|r.words[a])+i,this.words[a]=67108863&t,i=t>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this},a.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},a.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var a=0,s=0;s<n.length;s++)a=(t=(0|r.words[s])-(0|n.words[s])+a)>>26,this.words[s]=67108863&t;for(;0!==a&&s<r.length;s++)a=(t=(0|r.words[s])+a)>>26,this.words[s]=67108863&t;if(0===a&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this.strip()},a.prototype.sub=function(e){return this.clone().isub(e)};var h=function(e,t,r){var n,i,a,s=e.words,o=t.words,u=r.words,l=0,c=0|s[0],f=8191&c,d=c>>>13,h=0|s[1],p=8191&h,y=h>>>13,m=0|s[2],g=8191&m,w=m>>>13,b=0|s[3],_=8191&b,v=b>>>13,k=0|s[4],A=8191&k,S=k>>>13,P=0|s[5],E=8191&P,x=P>>>13,M=0|s[6],K=8191&M,U=M>>>13,C=0|s[7],R=8191&C,T=C>>>13,j=0|s[8],O=8191&j,B=j>>>13,I=0|s[9],z=8191&I,D=I>>>13,N=0|o[0],L=8191&N,q=N>>>13,F=0|o[1],H=8191&F,W=F>>>13,Z=0|o[2],G=8191&Z,V=Z>>>13,Y=0|o[3],$=8191&Y,Q=Y>>>13,X=0|o[4],J=8191&X,ee=X>>>13,te=0|o[5],re=8191&te,ne=te>>>13,ie=0|o[6],ae=8191&ie,se=ie>>>13,oe=0|o[7],ue=8191&oe,le=oe>>>13,ce=0|o[8],fe=8191&ce,de=ce>>>13,he=0|o[9],pe=8191&he,ye=he>>>13;r.negative=e.negative^t.negative,r.length=19;var me=(l+(n=Math.imul(f,L))|0)+((8191&(i=(i=Math.imul(f,q))+Math.imul(d,L)|0))<<13)|0;l=((a=Math.imul(d,q))+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(p,L),i=(i=Math.imul(p,q))+Math.imul(y,L)|0,a=Math.imul(y,q);var ge=(l+(n=n+Math.imul(f,H)|0)|0)+((8191&(i=(i=i+Math.imul(f,W)|0)+Math.imul(d,H)|0))<<13)|0;l=((a=a+Math.imul(d,W)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(g,L),i=(i=Math.imul(g,q))+Math.imul(w,L)|0,a=Math.imul(w,q),n=n+Math.imul(p,H)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(y,H)|0,a=a+Math.imul(y,W)|0;var we=(l+(n=n+Math.imul(f,G)|0)|0)+((8191&(i=(i=i+Math.imul(f,V)|0)+Math.imul(d,G)|0))<<13)|0;l=((a=a+Math.imul(d,V)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(_,L),i=(i=Math.imul(_,q))+Math.imul(v,L)|0,a=Math.imul(v,q),n=n+Math.imul(g,H)|0,i=(i=i+Math.imul(g,W)|0)+Math.imul(w,H)|0,a=a+Math.imul(w,W)|0,n=n+Math.imul(p,G)|0,i=(i=i+Math.imul(p,V)|0)+Math.imul(y,G)|0,a=a+Math.imul(y,V)|0;var be=(l+(n=n+Math.imul(f,$)|0)|0)+((8191&(i=(i=i+Math.imul(f,Q)|0)+Math.imul(d,$)|0))<<13)|0;l=((a=a+Math.imul(d,Q)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(A,L),i=(i=Math.imul(A,q))+Math.imul(S,L)|0,a=Math.imul(S,q),n=n+Math.imul(_,H)|0,i=(i=i+Math.imul(_,W)|0)+Math.imul(v,H)|0,a=a+Math.imul(v,W)|0,n=n+Math.imul(g,G)|0,i=(i=i+Math.imul(g,V)|0)+Math.imul(w,G)|0,a=a+Math.imul(w,V)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,Q)|0)+Math.imul(y,$)|0,a=a+Math.imul(y,Q)|0;var _e=(l+(n=n+Math.imul(f,J)|0)|0)+((8191&(i=(i=i+Math.imul(f,ee)|0)+Math.imul(d,J)|0))<<13)|0;l=((a=a+Math.imul(d,ee)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(E,L),i=(i=Math.imul(E,q))+Math.imul(x,L)|0,a=Math.imul(x,q),n=n+Math.imul(A,H)|0,i=(i=i+Math.imul(A,W)|0)+Math.imul(S,H)|0,a=a+Math.imul(S,W)|0,n=n+Math.imul(_,G)|0,i=(i=i+Math.imul(_,V)|0)+Math.imul(v,G)|0,a=a+Math.imul(v,V)|0,n=n+Math.imul(g,$)|0,i=(i=i+Math.imul(g,Q)|0)+Math.imul(w,$)|0,a=a+Math.imul(w,Q)|0,n=n+Math.imul(p,J)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(y,J)|0,a=a+Math.imul(y,ee)|0;var ve=(l+(n=n+Math.imul(f,re)|0)|0)+((8191&(i=(i=i+Math.imul(f,ne)|0)+Math.imul(d,re)|0))<<13)|0;l=((a=a+Math.imul(d,ne)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(K,L),i=(i=Math.imul(K,q))+Math.imul(U,L)|0,a=Math.imul(U,q),n=n+Math.imul(E,H)|0,i=(i=i+Math.imul(E,W)|0)+Math.imul(x,H)|0,a=a+Math.imul(x,W)|0,n=n+Math.imul(A,G)|0,i=(i=i+Math.imul(A,V)|0)+Math.imul(S,G)|0,a=a+Math.imul(S,V)|0,n=n+Math.imul(_,$)|0,i=(i=i+Math.imul(_,Q)|0)+Math.imul(v,$)|0,a=a+Math.imul(v,Q)|0,n=n+Math.imul(g,J)|0,i=(i=i+Math.imul(g,ee)|0)+Math.imul(w,J)|0,a=a+Math.imul(w,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(y,re)|0,a=a+Math.imul(y,ne)|0;var ke=(l+(n=n+Math.imul(f,ae)|0)|0)+((8191&(i=(i=i+Math.imul(f,se)|0)+Math.imul(d,ae)|0))<<13)|0;l=((a=a+Math.imul(d,se)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(R,L),i=(i=Math.imul(R,q))+Math.imul(T,L)|0,a=Math.imul(T,q),n=n+Math.imul(K,H)|0,i=(i=i+Math.imul(K,W)|0)+Math.imul(U,H)|0,a=a+Math.imul(U,W)|0,n=n+Math.imul(E,G)|0,i=(i=i+Math.imul(E,V)|0)+Math.imul(x,G)|0,a=a+Math.imul(x,V)|0,n=n+Math.imul(A,$)|0,i=(i=i+Math.imul(A,Q)|0)+Math.imul(S,$)|0,a=a+Math.imul(S,Q)|0,n=n+Math.imul(_,J)|0,i=(i=i+Math.imul(_,ee)|0)+Math.imul(v,J)|0,a=a+Math.imul(v,ee)|0,n=n+Math.imul(g,re)|0,i=(i=i+Math.imul(g,ne)|0)+Math.imul(w,re)|0,a=a+Math.imul(w,ne)|0,n=n+Math.imul(p,ae)|0,i=(i=i+Math.imul(p,se)|0)+Math.imul(y,ae)|0,a=a+Math.imul(y,se)|0;var Ae=(l+(n=n+Math.imul(f,ue)|0)|0)+((8191&(i=(i=i+Math.imul(f,le)|0)+Math.imul(d,ue)|0))<<13)|0;l=((a=a+Math.imul(d,le)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(O,L),i=(i=Math.imul(O,q))+Math.imul(B,L)|0,a=Math.imul(B,q),n=n+Math.imul(R,H)|0,i=(i=i+Math.imul(R,W)|0)+Math.imul(T,H)|0,a=a+Math.imul(T,W)|0,n=n+Math.imul(K,G)|0,i=(i=i+Math.imul(K,V)|0)+Math.imul(U,G)|0,a=a+Math.imul(U,V)|0,n=n+Math.imul(E,$)|0,i=(i=i+Math.imul(E,Q)|0)+Math.imul(x,$)|0,a=a+Math.imul(x,Q)|0,n=n+Math.imul(A,J)|0,i=(i=i+Math.imul(A,ee)|0)+Math.imul(S,J)|0,a=a+Math.imul(S,ee)|0,n=n+Math.imul(_,re)|0,i=(i=i+Math.imul(_,ne)|0)+Math.imul(v,re)|0,a=a+Math.imul(v,ne)|0,n=n+Math.imul(g,ae)|0,i=(i=i+Math.imul(g,se)|0)+Math.imul(w,ae)|0,a=a+Math.imul(w,se)|0,n=n+Math.imul(p,ue)|0,i=(i=i+Math.imul(p,le)|0)+Math.imul(y,ue)|0,a=a+Math.imul(y,le)|0;var Se=(l+(n=n+Math.imul(f,fe)|0)|0)+((8191&(i=(i=i+Math.imul(f,de)|0)+Math.imul(d,fe)|0))<<13)|0;l=((a=a+Math.imul(d,de)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(z,L),i=(i=Math.imul(z,q))+Math.imul(D,L)|0,a=Math.imul(D,q),n=n+Math.imul(O,H)|0,i=(i=i+Math.imul(O,W)|0)+Math.imul(B,H)|0,a=a+Math.imul(B,W)|0,n=n+Math.imul(R,G)|0,i=(i=i+Math.imul(R,V)|0)+Math.imul(T,G)|0,a=a+Math.imul(T,V)|0,n=n+Math.imul(K,$)|0,i=(i=i+Math.imul(K,Q)|0)+Math.imul(U,$)|0,a=a+Math.imul(U,Q)|0,n=n+Math.imul(E,J)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(x,J)|0,a=a+Math.imul(x,ee)|0,n=n+Math.imul(A,re)|0,i=(i=i+Math.imul(A,ne)|0)+Math.imul(S,re)|0,a=a+Math.imul(S,ne)|0,n=n+Math.imul(_,ae)|0,i=(i=i+Math.imul(_,se)|0)+Math.imul(v,ae)|0,a=a+Math.imul(v,se)|0,n=n+Math.imul(g,ue)|0,i=(i=i+Math.imul(g,le)|0)+Math.imul(w,ue)|0,a=a+Math.imul(w,le)|0,n=n+Math.imul(p,fe)|0,i=(i=i+Math.imul(p,de)|0)+Math.imul(y,fe)|0,a=a+Math.imul(y,de)|0;var Pe=(l+(n=n+Math.imul(f,pe)|0)|0)+((8191&(i=(i=i+Math.imul(f,ye)|0)+Math.imul(d,pe)|0))<<13)|0;l=((a=a+Math.imul(d,ye)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(z,H),i=(i=Math.imul(z,W))+Math.imul(D,H)|0,a=Math.imul(D,W),n=n+Math.imul(O,G)|0,i=(i=i+Math.imul(O,V)|0)+Math.imul(B,G)|0,a=a+Math.imul(B,V)|0,n=n+Math.imul(R,$)|0,i=(i=i+Math.imul(R,Q)|0)+Math.imul(T,$)|0,a=a+Math.imul(T,Q)|0,n=n+Math.imul(K,J)|0,i=(i=i+Math.imul(K,ee)|0)+Math.imul(U,J)|0,a=a+Math.imul(U,ee)|0,n=n+Math.imul(E,re)|0,i=(i=i+Math.imul(E,ne)|0)+Math.imul(x,re)|0,a=a+Math.imul(x,ne)|0,n=n+Math.imul(A,ae)|0,i=(i=i+Math.imul(A,se)|0)+Math.imul(S,ae)|0,a=a+Math.imul(S,se)|0,n=n+Math.imul(_,ue)|0,i=(i=i+Math.imul(_,le)|0)+Math.imul(v,ue)|0,a=a+Math.imul(v,le)|0,n=n+Math.imul(g,fe)|0,i=(i=i+Math.imul(g,de)|0)+Math.imul(w,fe)|0,a=a+Math.imul(w,de)|0;var Ee=(l+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,ye)|0)+Math.imul(y,pe)|0))<<13)|0;l=((a=a+Math.imul(y,ye)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(z,G),i=(i=Math.imul(z,V))+Math.imul(D,G)|0,a=Math.imul(D,V),n=n+Math.imul(O,$)|0,i=(i=i+Math.imul(O,Q)|0)+Math.imul(B,$)|0,a=a+Math.imul(B,Q)|0,n=n+Math.imul(R,J)|0,i=(i=i+Math.imul(R,ee)|0)+Math.imul(T,J)|0,a=a+Math.imul(T,ee)|0,n=n+Math.imul(K,re)|0,i=(i=i+Math.imul(K,ne)|0)+Math.imul(U,re)|0,a=a+Math.imul(U,ne)|0,n=n+Math.imul(E,ae)|0,i=(i=i+Math.imul(E,se)|0)+Math.imul(x,ae)|0,a=a+Math.imul(x,se)|0,n=n+Math.imul(A,ue)|0,i=(i=i+Math.imul(A,le)|0)+Math.imul(S,ue)|0,a=a+Math.imul(S,le)|0,n=n+Math.imul(_,fe)|0,i=(i=i+Math.imul(_,de)|0)+Math.imul(v,fe)|0,a=a+Math.imul(v,de)|0;var xe=(l+(n=n+Math.imul(g,pe)|0)|0)+((8191&(i=(i=i+Math.imul(g,ye)|0)+Math.imul(w,pe)|0))<<13)|0;l=((a=a+Math.imul(w,ye)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(z,$),i=(i=Math.imul(z,Q))+Math.imul(D,$)|0,a=Math.imul(D,Q),n=n+Math.imul(O,J)|0,i=(i=i+Math.imul(O,ee)|0)+Math.imul(B,J)|0,a=a+Math.imul(B,ee)|0,n=n+Math.imul(R,re)|0,i=(i=i+Math.imul(R,ne)|0)+Math.imul(T,re)|0,a=a+Math.imul(T,ne)|0,n=n+Math.imul(K,ae)|0,i=(i=i+Math.imul(K,se)|0)+Math.imul(U,ae)|0,a=a+Math.imul(U,se)|0,n=n+Math.imul(E,ue)|0,i=(i=i+Math.imul(E,le)|0)+Math.imul(x,ue)|0,a=a+Math.imul(x,le)|0,n=n+Math.imul(A,fe)|0,i=(i=i+Math.imul(A,de)|0)+Math.imul(S,fe)|0,a=a+Math.imul(S,de)|0;var Me=(l+(n=n+Math.imul(_,pe)|0)|0)+((8191&(i=(i=i+Math.imul(_,ye)|0)+Math.imul(v,pe)|0))<<13)|0;l=((a=a+Math.imul(v,ye)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(z,J),i=(i=Math.imul(z,ee))+Math.imul(D,J)|0,a=Math.imul(D,ee),n=n+Math.imul(O,re)|0,i=(i=i+Math.imul(O,ne)|0)+Math.imul(B,re)|0,a=a+Math.imul(B,ne)|0,n=n+Math.imul(R,ae)|0,i=(i=i+Math.imul(R,se)|0)+Math.imul(T,ae)|0,a=a+Math.imul(T,se)|0,n=n+Math.imul(K,ue)|0,i=(i=i+Math.imul(K,le)|0)+Math.imul(U,ue)|0,a=a+Math.imul(U,le)|0,n=n+Math.imul(E,fe)|0,i=(i=i+Math.imul(E,de)|0)+Math.imul(x,fe)|0,a=a+Math.imul(x,de)|0;var Ke=(l+(n=n+Math.imul(A,pe)|0)|0)+((8191&(i=(i=i+Math.imul(A,ye)|0)+Math.imul(S,pe)|0))<<13)|0;l=((a=a+Math.imul(S,ye)|0)+(i>>>13)|0)+(Ke>>>26)|0,Ke&=67108863,n=Math.imul(z,re),i=(i=Math.imul(z,ne))+Math.imul(D,re)|0,a=Math.imul(D,ne),n=n+Math.imul(O,ae)|0,i=(i=i+Math.imul(O,se)|0)+Math.imul(B,ae)|0,a=a+Math.imul(B,se)|0,n=n+Math.imul(R,ue)|0,i=(i=i+Math.imul(R,le)|0)+Math.imul(T,ue)|0,a=a+Math.imul(T,le)|0,n=n+Math.imul(K,fe)|0,i=(i=i+Math.imul(K,de)|0)+Math.imul(U,fe)|0,a=a+Math.imul(U,de)|0;var Ue=(l+(n=n+Math.imul(E,pe)|0)|0)+((8191&(i=(i=i+Math.imul(E,ye)|0)+Math.imul(x,pe)|0))<<13)|0;l=((a=a+Math.imul(x,ye)|0)+(i>>>13)|0)+(Ue>>>26)|0,Ue&=67108863,n=Math.imul(z,ae),i=(i=Math.imul(z,se))+Math.imul(D,ae)|0,a=Math.imul(D,se),n=n+Math.imul(O,ue)|0,i=(i=i+Math.imul(O,le)|0)+Math.imul(B,ue)|0,a=a+Math.imul(B,le)|0,n=n+Math.imul(R,fe)|0,i=(i=i+Math.imul(R,de)|0)+Math.imul(T,fe)|0,a=a+Math.imul(T,de)|0;var Ce=(l+(n=n+Math.imul(K,pe)|0)|0)+((8191&(i=(i=i+Math.imul(K,ye)|0)+Math.imul(U,pe)|0))<<13)|0;l=((a=a+Math.imul(U,ye)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(z,ue),i=(i=Math.imul(z,le))+Math.imul(D,ue)|0,a=Math.imul(D,le),n=n+Math.imul(O,fe)|0,i=(i=i+Math.imul(O,de)|0)+Math.imul(B,fe)|0,a=a+Math.imul(B,de)|0;var Re=(l+(n=n+Math.imul(R,pe)|0)|0)+((8191&(i=(i=i+Math.imul(R,ye)|0)+Math.imul(T,pe)|0))<<13)|0;l=((a=a+Math.imul(T,ye)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,n=Math.imul(z,fe),i=(i=Math.imul(z,de))+Math.imul(D,fe)|0,a=Math.imul(D,de);var Te=(l+(n=n+Math.imul(O,pe)|0)|0)+((8191&(i=(i=i+Math.imul(O,ye)|0)+Math.imul(B,pe)|0))<<13)|0;l=((a=a+Math.imul(B,ye)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863;var je=(l+(n=Math.imul(z,pe))|0)+((8191&(i=(i=Math.imul(z,ye))+Math.imul(D,pe)|0))<<13)|0;return l=((a=Math.imul(D,ye))+(i>>>13)|0)+(je>>>26)|0,je&=67108863,u[0]=me,u[1]=ge,u[2]=we,u[3]=be,u[4]=_e,u[5]=ve,u[6]=ke,u[7]=Ae,u[8]=Se,u[9]=Pe,u[10]=Ee,u[11]=xe,u[12]=Me,u[13]=Ke,u[14]=Ue,u[15]=Ce,u[16]=Re,u[17]=Te,u[18]=je,0!==l&&(u[19]=l,r.length++),r};function p(e,t,r){return(new y).mulp(e,t,r)}function y(e,t){this.x=e,this.y=t}Math.imul||(h=d),a.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?h(this,e,t):r<63?d(this,e,t):r<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,a=0;a<r.length-1;a++){var s=i;i=0;for(var o=67108863&n,u=Math.min(a,t.length-1),l=Math.max(0,a-e.length+1);l<=u;l++){var c=a-l,f=(0|e.words[c])*(0|t.words[l]),d=67108863&f;o=67108863&(d=d+o|0),i+=(s=(s=s+(f/67108864|0)|0)+(d>>>26)|0)>>>26,s&=67108863}r.words[a]=o,n=s,s=i}return 0!==n?r.words[a]=n:r.length--,r.strip()}(this,e,t):p(this,e,t)},y.prototype.makeRBT=function(e){for(var t=new Array(e),r=a.prototype._countBits(e)-1,n=0;n<e;n++)t[n]=this.revBin(n,r,e);return t},y.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e;for(var n=0,i=0;i<t;i++)n|=(1&e)<<t-i-1,e>>=1;return n},y.prototype.permute=function(e,t,r,n,i,a){for(var s=0;s<a;s++)n[s]=t[e[s]],i[s]=r[e[s]]},y.prototype.transform=function(e,t,r,n,i,a){this.permute(a,e,t,r,n,i);for(var s=1;s<i;s<<=1)for(var o=s<<1,u=Math.cos(2*Math.PI/o),l=Math.sin(2*Math.PI/o),c=0;c<i;c+=o)for(var f=u,d=l,h=0;h<s;h++){var p=r[c+h],y=n[c+h],m=r[c+h+s],g=n[c+h+s],w=f*m-d*g;g=f*g+d*m,m=w,r[c+h]=p+m,n[c+h]=y+g,r[c+h+s]=p-m,n[c+h+s]=y-g,h!==o&&(w=u*f-l*d,d=u*d+l*f,f=w)}},y.prototype.guessLen13b=function(e,t){var r=1|Math.max(t,e),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},y.prototype.conjugate=function(e,t,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=e[n];e[n]=e[r-n-1],e[r-n-1]=i,i=t[n],t[n]=-t[r-n-1],t[r-n-1]=-i}},y.prototype.normalize13b=function(e,t){for(var r=0,n=0;n<t/2;n++){var i=8192*Math.round(e[2*n+1]/t)+Math.round(e[2*n]/t)+r;e[n]=67108863&i,r=i<67108864?0:i/67108864|0}return e},y.prototype.convert13b=function(e,t,r,i){for(var a=0,s=0;s<t;s++)a+=0|e[s],r[2*s]=8191&a,a>>>=13,r[2*s+1]=8191&a,a>>>=13;for(s=2*t;s<i;++s)r[s]=0;n(0===a),n(0==(-8192&a))},y.prototype.stub=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=0;return t},y.prototype.mulp=function(e,t,r){var n=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(n),a=this.stub(n),s=new Array(n),o=new Array(n),u=new Array(n),l=new Array(n),c=new Array(n),f=new Array(n),d=r.words;d.length=n,this.convert13b(e.words,e.length,s,n),this.convert13b(t.words,t.length,l,n),this.transform(s,a,o,u,n,i),this.transform(l,a,c,f,n,i);for(var h=0;h<n;h++){var p=o[h]*c[h]-u[h]*f[h];u[h]=o[h]*f[h]+u[h]*c[h],o[h]=p}return this.conjugate(o,u,n),this.transform(o,u,d,a,n,i),this.conjugate(d,a,n),this.normalize13b(d,n),r.negative=e.negative^t.negative,r.length=e.length+t.length,r.strip()},a.prototype.mul=function(e){var t=new a(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},a.prototype.mulf=function(e){var t=new a(null);return t.words=new Array(this.length+e.length),p(this,e,t)},a.prototype.imul=function(e){return this.clone().mulTo(e,this)},a.prototype.imuln=function(e){n("number"==typeof e),n(e<67108864);for(var t=0,r=0;r<this.length;r++){var i=(0|this.words[r])*e,a=(67108863&i)+(67108863&t);t>>=26,t+=i/67108864|0,t+=a>>>26,this.words[r]=67108863&a}return 0!==t&&(this.words[r]=t,this.length++),this},a.prototype.muln=function(e){return this.clone().imuln(e)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r<t.length;r++){var n=r/26|0,i=r%26;t[r]=(e.words[n]&1<<i)>>>i}return t}(e);if(0===t.length)return new a(1);for(var r=this,n=0;n<t.length&&0===t[n];n++,r=r.sqr());if(++n<t.length)for(var i=r.sqr();n<t.length;n++,i=i.sqr())0!==t[n]&&(r=r.mul(i));return r},a.prototype.iushln=function(e){n("number"==typeof e&&e>=0);var t,r=e%26,i=(e-r)/26,a=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(t=0;t<this.length;t++){var o=this.words[t]&a,u=(0|this.words[t])-o<<r;this.words[t]=u|s,s=o>>>26-r}s&&(this.words[t]=s,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this.strip()},a.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},a.prototype.iushrn=function(e,t,r){var i;n("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var a=e%26,s=Math.min((e-a)/26,this.length),o=67108863^67108863>>>a<<a,u=r;if(i-=s,i=Math.max(0,i),u){for(var l=0;l<s;l++)u.words[l]=this.words[l];u.length=s}if(0===s);else if(this.length>s)for(this.length-=s,l=0;l<this.length;l++)this.words[l]=this.words[l+s];else this.words[0]=0,this.length=1;var c=0;for(l=this.length-1;l>=0&&(0!==c||l>=i);l--){var f=0|this.words[l];this.words[l]=c<<26-a|f>>>a,c=f&o}return u&&0!==c&&(u.words[u.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},a.prototype.shln=function(e){return this.clone().ishln(e)},a.prototype.ushln=function(e){return this.clone().iushln(e)},a.prototype.shrn=function(e){return this.clone().ishrn(e)},a.prototype.ushrn=function(e){return this.clone().iushrn(e)},a.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<<t;return!(this.length<=r)&&!!(this.words[r]&i)},a.prototype.imaskn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this.strip()},a.prototype.maskn=function(e){return this.clone().imaskn(e)},a.prototype.iaddn=function(e){return n("number"==typeof e),n(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},a.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},a.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},a.prototype.addn=function(e){return this.clone().iaddn(e)},a.prototype.subn=function(e){return this.clone().isubn(e)},a.prototype.iabs=function(){return this.negative=0,this},a.prototype.abs=function(){return this.clone().iabs()},a.prototype._ishlnsubmul=function(e,t,r){var i,a,s=e.length+r;this._expand(s);var o=0;for(i=0;i<e.length;i++){a=(0|this.words[i+r])+o;var u=(0|e.words[i])*t;o=((a-=67108863&u)>>26)-(u/67108864|0),this.words[i+r]=67108863&a}for(;i<this.length-r;i++)o=(a=(0|this.words[i+r])+o)>>26,this.words[i+r]=67108863&a;if(0===o)return this.strip();for(n(-1===o),o=0,i=0;i<this.length;i++)o=(a=-(0|this.words[i])+o)>>26,this.words[i]=67108863&a;return this.negative=1,this.strip()},a.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,s=0|i.words[i.length-1];0!==(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var o,u=n.length-i.length;if("mod"!==t){(o=new a(null)).length=u+1,o.words=new Array(o.length);for(var l=0;l<o.length;l++)o.words[l]=0}var c=n.clone()._ishlnsubmul(i,1,u);0===c.negative&&(n=c,o&&(o.words[u]=1));for(var f=u-1;f>=0;f--){var d=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(d=Math.min(d/s|0,67108863),n._ishlnsubmul(i,d,f);0!==n.negative;)d--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);o&&(o.words[f]=d)}return o&&o.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:o||null,mod:n}},a.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===e.negative?(o=this.neg().divmod(e,t),"mod"!==t&&(i=o.div.neg()),"div"!==t&&(s=o.mod.neg(),r&&0!==s.negative&&s.iadd(e)),{div:i,mod:s}):0===this.negative&&0!==e.negative?(o=this.divmod(e.neg(),t),"mod"!==t&&(i=o.div.neg()),{div:i,mod:o.mod}):0!=(this.negative&e.negative)?(o=this.neg().divmod(e.neg(),t),"div"!==t&&(s=o.mod.neg(),r&&0!==s.negative&&s.isub(e)),{div:o.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new a(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new a(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new a(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,s,o},a.prototype.div=function(e){return this.divmod(e,"div",!1).div},a.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},a.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},a.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),a=r.cmp(n);return a<0||1===i&&0===a?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},a.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},a.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},a.prototype.divn=function(e){return this.clone().idivn(e)},a.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new a(1),s=new a(0),o=new a(0),u=new a(1),l=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++l;for(var c=r.clone(),f=t.clone();!t.isZero();){for(var d=0,h=1;0==(t.words[0]&h)&&d<26;++d,h<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(c),s.isub(f)),i.iushrn(1),s.iushrn(1);for(var p=0,y=1;0==(r.words[0]&y)&&p<26;++p,y<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(o.isOdd()||u.isOdd())&&(o.iadd(c),u.isub(f)),o.iushrn(1),u.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(o),s.isub(u)):(r.isub(t),o.isub(i),u.isub(s))}return{a:o,b:u,gcd:r.iushln(l)}},a.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,s=new a(1),o=new a(0),u=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var l=0,c=1;0==(t.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(t.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var f=0,d=1;0==(r.words[0]&d)&&f<26;++f,d<<=1);if(f>0)for(r.iushrn(f);f-- >0;)o.isOdd()&&o.iadd(u),o.iushrn(1);t.cmp(r)>=0?(t.isub(r),s.isub(o)):(r.isub(t),o.isub(s))}return(i=0===t.cmpn(1)?s:o).cmpn(0)<0&&i.iadd(e),i},a.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var a=t;t=r,r=a}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},a.prototype.invm=function(e){return this.egcd(e).a.umod(e)},a.prototype.isEven=function(){return 0==(1&this.words[0])},a.prototype.isOdd=function(){return 1==(1&this.words[0])},a.prototype.andln=function(e){return this.words[0]&e},a.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var a=i,s=r;0!==a&&s<this.length;s++){var o=0|this.words[s];a=(o+=a)>>>26,o&=67108863,this.words[s]=o}return 0!==a&&(this.words[s]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},a.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},a.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){n<i?t=-1:n>i&&(t=1);break}}return t},a.prototype.gtn=function(e){return 1===this.cmpn(e)},a.prototype.gt=function(e){return 1===this.cmp(e)},a.prototype.gten=function(e){return this.cmpn(e)>=0},a.prototype.gte=function(e){return this.cmp(e)>=0},a.prototype.ltn=function(e){return-1===this.cmpn(e)},a.prototype.lt=function(e){return-1===this.cmp(e)},a.prototype.lten=function(e){return this.cmpn(e)<=0},a.prototype.lte=function(e){return this.cmp(e)<=0},a.prototype.eqn=function(e){return 0===this.cmpn(e)},a.prototype.eq=function(e){return 0===this.cmp(e)},a.red=function(e){return new k(e)},a.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},a.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(e){return this.red=e,this},a.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},a.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},a.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},a.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},a.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},a.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},a.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},a.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},a.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var m={k256:null,p224:null,p192:null,p25519:null};function g(e,t){this.name=e,this.p=new a(t,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function w(){g.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function b(){g.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){g.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function v(){g.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function k(e){if("string"==typeof e){var t=a._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function A(e){k.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}g.prototype._tmp=function(){var e=new a(null);return e.words=new Array(Math.ceil(this.n/13)),e},g.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):r.strip(),r},g.prototype.split=function(e,t){e.iushrn(this.n,0,t)},g.prototype.imulK=function(e){return e.imul(this.k)},i(w,g),w.prototype.split=function(e,t){for(var r=Math.min(e.length,9),n=0;n<r;n++)t.words[n]=e.words[n];if(t.length=r,e.length<=9)return e.words[0]=0,void(e.length=1);var i=e.words[9];for(t.words[t.length++]=4194303&i,n=10;n<e.length;n++){var a=0|e.words[n];e.words[n-10]=(4194303&a)<<4|i>>>22,i=a}i>>>=22,e.words[n-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},w.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var n=0|e.words[r];t+=977*n,e.words[r]=67108863&t,t=64*n+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(b,g),i(_,g),i(v,g),v.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var n=19*(0|e.words[r])+t,i=67108863&n;n>>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},a._prime=function(e){if(m[e])return m[e];var t;if("k256"===e)t=new w;else if("p224"===e)t=new b;else if("p192"===e)t=new _;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new v}return m[e]=t,t},k.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},k.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},k.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},k.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},k.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},k.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},k.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},k.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},k.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},k.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},k.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},k.prototype.isqr=function(e){return this.imul(e,e.clone())},k.prototype.sqr=function(e){return this.mul(e,e)},k.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new a(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var o=new a(1).toRed(this),u=o.redNeg(),l=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new a(2*c*c).toRed(this);0!==this.pow(c,l).cmp(u);)c.redIAdd(u);for(var f=this.pow(c,i),d=this.pow(e,i.addn(1).iushrn(1)),h=this.pow(e,i),p=s;0!==h.cmp(o);){for(var y=h,m=0;0!==y.cmp(o);m++)y=y.redSqr();n(m<p);var g=this.pow(f,new a(1).iushln(p-m-1));d=d.redMul(g),f=g.redSqr(),h=h.redMul(f),p=m}return d},k.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},k.prototype.pow=function(e,t){if(t.isZero())return new a(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=new Array(16);r[0]=new a(1).toRed(this),r[1]=e;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],e);var i=r[0],s=0,o=0,u=t.bitLength()%26;for(0===u&&(u=26),n=t.length-1;n>=0;n--){for(var l=t.words[n],c=u-1;c>=0;c--){var f=l>>c&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==s?(s<<=1,s|=f,(4===++o||0===n&&0===c)&&(i=this.mul(i,r[s]),o=0,s=0)):o=0}u=26}return i},k.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},k.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},a.mont=function(e){return new A(e)},i(A,k),A.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},A.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},A.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},A.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new a(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},A.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===t||t,this)},{buffer:"buffer"}],17:[function(e,t,r){"use strict";!function(e){function r(e){function t(){return Ae<Se}function r(){return Ae}function i(e){Ae=e}function a(){Ae=0,Se=ke.length}function s(e,t){return{name:e,tokens:t||"",semantic:t||"",children:[]}}function o(e,t){var r;return null===t?null:((r=s(e)).tokens=t.tokens,r.semantic=t.semantic,r.children.push(t),r)}function u(e,t){return null!==t&&(e.tokens+=t.tokens,e.semantic+=t.semantic),e.children.push(t),e}function l(e){var r;return t()&&e(r=ke[Ae])?(Ae+=1,s("token",r)):null}function c(e){return function(){return o("literal",l(function(t){return t===e}))}}function f(){var e=arguments;return function(){var t,n,a,o;for(o=r(),n=s("and"),t=0;t<e.length;t+=1){if(null===(a=e[t]()))return i(o),null;u(n,a)}return n}}function d(){var e=arguments;return function(){var t,n,a;for(a=r(),t=0;t<e.length;t+=1){if(null!==(n=e[t]()))return n;i(a)}return null}}function h(e){return function(){var t,n;return n=r(),null!==(t=e())?t:(i(n),s("opt"))}}function p(e){return function(){var t=e();return null!==t&&(t.semantic=""),t}}function y(e){return function(){var t=e();return null!==t&&t.semantic.length>0&&(t.semantic=" "),t}}function m(e,t){return function(){var n,a,o,l,c;for(l=r(),n=s("star"),o=0,c=void 0===t?0:t;null!==(a=e());)o+=1,u(n,a);return o>=c?n:(i(l),null)}}function g(e){return e.charCodeAt(0)>=128}function w(){return o("cr",c("\r")())}function b(){return o("crlf",f(w,k)())}function _(){return o("dquote",c('"')())}function v(){return o("htab",c("\t")())}function k(){return o("lf",c("\n")())}function A(){return o("sp",c(" ")())}function S(){return o("vchar",l(function(t){var r=t.charCodeAt(0),n=33<=r&&r<=126;return e.rfc6532&&(n=n||g(t)),n}))}function P(){return o("wsp",d(A,v)())}function E(){var e=o("quoted-pair",d(f(c("\\"),d(S,P)),ne)());return null===e?null:(e.semantic=e.semantic[1],e)}function x(){return o("fws",d(ae,f(h(f(m(P),p(b))),m(P,1)))())}function M(){return o("ctext",d(function(){return l(function(t){var r=t.charCodeAt(0),n=33<=r&&r<=39||42<=r&&r<=91||93<=r&&r<=126;return e.rfc6532&&(n=n||g(t)),n})},te)())}function K(){return o("ccontent",d(M,E,U)())}function U(){return o("comment",f(c("("),m(f(h(x),K)),h(x),c(")"))())}function C(){return o("cfws",d(f(m(f(h(x),U),1),h(x)),x)())}function R(){return o("atext",l(function(t){var r="a"<=t&&t<="z"||"A"<=t&&t<="Z"||"0"<=t&&t<="9"||["!","#","$","%","&","'","*","+","-","/","=","?","^","_","`","{","|","}","~"].indexOf(t)>=0;return e.rfc6532&&(r=r||g(t)),r}))}function T(){return o("atom",f(y(h(C)),m(R,1),y(h(C)))())}function j(){var e,t;return null===(e=o("dot-atom-text",m(R,1)()))?e:(null!==(t=m(f(c("."),m(R,1)))())&&u(e,t),e)}function O(){return o("dot-atom",f(p(h(C)),j,p(h(C)))())}function B(){return o("qtext",d(function(){return l(function(t){var r=t.charCodeAt(0),n=33===r||35<=r&&r<=91||93<=r&&r<=126;return e.rfc6532&&(n=n||g(t)),n})},re)())}function I(){return o("qcontent",d(B,E)())}function z(){return o("quoted-string",f(p(h(C)),p(_),m(f(h(y(x)),I)),h(p(x)),p(_),p(h(C)))())}function D(){return o("word",d(T,z)())}function N(){return o("address",d(L,H)())}function L(){return o("mailbox",d(q,J)())}function q(){return o("name-addr",f(h(W),F)())}function F(){return o("angle-addr",d(f(p(h(C)),c("<"),J,c(">"),p(h(C))),se)())}function H(){return o("group",f(W,c(":"),h(V),c(";"),p(h(C)))())}function W(){return o("display-name",(null!==(e=o("phrase",d(ie,m(D,1))()))&&(e.semantic=e.semantic.replace(/([ \t]|\r\n)+/g," ").replace(/^\s*/,"").replace(/\s*$/,"")),e));var e}function Z(){return o("mailbox-list",d(f(L,m(f(c(","),L))),le)())}function G(){return o("address-list",d(f(N,m(f(c(","),N))),ce)())}function V(){return o("group-list",d(Z,p(C),fe)())}function Y(){return o("local-part",d(de,O,z)())}function $(){return o("dtext",d(function(){return l(function(t){var r=t.charCodeAt(0),n=33<=r&&r<=90||94<=r&&r<=126;return e.rfc6532&&(n=n||g(t)),n})},pe)())}function Q(){return o("domain-literal",f(p(h(C)),c("["),m(f(h(x),$)),h(x),c("]"),p(h(C)))())}function X(){return o("domain",(t=d(he,O,Q)(),e.rejectTLD&&t&&t.semantic&&t.semantic.indexOf(".")<0?null:(t&&(t.semantic=t.semantic.replace(/\s+/g,"")),t)));var t}function J(){return o("addr-spec",f(Y,c("@"),X)())}function ee(){return e.strict?null:o("obs-NO-WS-CTL",l(function(e){var t=e.charCodeAt(0);return 1<=t&&t<=8||11===t||12===t||14<=t&&t<=31||127===t}))}function te(){return e.strict?null:o("obs-ctext",ee())}function re(){return e.strict?null:o("obs-qtext",ee())}function ne(){return e.strict?null:o("obs-qp",f(c("\\"),d(c("\0"),ee,k,w))())}function ie(){return e.strict?null:e.atInDisplayName?o("obs-phrase",f(D,m(d(D,c("."),c("@"),y(C))))()):o("obs-phrase",f(D,m(d(D,c("."),y(C))))())}function ae(){return e.strict?null:o("obs-FWS",m(f(p(h(b)),P),1)())}function se(){return e.strict?null:o("obs-angle-addr",f(p(h(C)),c("<"),oe,J,c(">"),p(h(C)))())}function oe(){return e.strict?null:o("obs-route",f(ue,c(":"))())}function ue(){return e.strict?null:o("obs-domain-list",f(m(d(p(C),c(","))),c("@"),X,m(f(c(","),p(h(C)),h(f(c("@"),X)))))())}function le(){return e.strict?null:o("obs-mbox-list",f(m(f(p(h(C)),c(","))),L,m(f(c(","),h(f(L,p(C))))))())}function ce(){return e.strict?null:o("obs-addr-list",f(m(f(p(h(C)),c(","))),N,m(f(c(","),h(f(N,p(C))))))())}function fe(){return e.strict?null:o("obs-group-list",f(m(f(p(h(C)),c(",")),1),p(h(C)))())}function de(){return e.strict?null:o("obs-local-part",f(D,m(f(c("."),D)))())}function he(){return e.strict?null:o("obs-domain",f(T,m(f(c("."),T)))())}function pe(){return e.strict?null:o("obs-dtext",d(ee,E)())}function ye(e,t){var r,n,i;if(null==t)return null;for(n=[t];n.length>0;){if((i=n.pop()).name===e)return i;for(r=i.children.length-1;r>=0;r-=1)n.push(i.children[r])}return null}function me(e,t){var r,n,i,a,s;if(null==t)return null;for(n=[t],a=[],s={},r=0;r<e.length;r+=1)s[e[r]]=!0;for(;n.length>0;)if((i=n.pop()).name in s)a.push(i);else for(r=i.children.length-1;r>=0;r-=1)n.push(i.children[r]);return a}function ge(t){var r,n,i,a,s;if(null===t)return null;for(r=[],n=me(["group","mailbox"],t),i=0;i<n.length;i+=1)"group"===(a=n[i]).name?r.push(we(a)):"mailbox"===a.name&&r.push(be(a));return s={ast:t,addresses:r},e.simple&&(s=function(e){var t;if(e&&e.addresses)for(t=0;t<e.addresses.length;t+=1)delete e.addresses[t].node;return e}(s)),e.oneResult?function(t){if(!t)return null;if(!e.partial&&t.addresses.length>1)return null;return t.addresses&&t.addresses[0]}(s):e.simple?s&&s.addresses:s}function we(e){var t,r=ye("display-name",e),n=[],i=me(["mailbox"],e);for(t=0;t<i.length;t+=1)n.push(be(i[t]));return{node:e,parts:{name:r},type:e.name,name:_e(r),addresses:n}}function be(e){var t=ye("display-name",e),r=ye("addr-spec",e),n=function(e,t){var r,n,i,a;if(null==t)return null;for(n=[t],a=[];n.length>0;)for((i=n.pop()).name===e&&a.push(i),r=i.children.length-1;r>=0;r-=1)n.push(i.children[r]);return a}("cfws",e),i=me(["comment"],e),a=ye("local-part",r),s=ye("domain",r);return{node:e,parts:{name:t,address:r,local:a,domain:s,comments:n},type:e.name,name:_e(t),address:_e(r),local:_e(a),domain:_e(s),comments:ve(i),groupName:_e(e.groupName)}}function _e(e){return null!=e?e.semantic:null}function ve(e){var t="";if(e)for(var r=0;r<e.length;r+=1)t+=_e(e[r]);return t}var ke,Ae,Se,Pe,Ee;if(null===(e=n(e,{})))return null;if(ke=e.input,Ee={address:N,"address-list":G,"angle-addr":F,from:function(){return o("from",d(Z,G)())},group:H,mailbox:L,"mailbox-list":Z,"reply-to":function(){return o("reply-to",G())},sender:function(){return o("sender",d(L,N)())}}[e.startAt]||G,!e.strict){if(a(),e.strict=!0,Pe=Ee(ke),e.partial||!t())return ge(Pe);e.strict=!1}return a(),Pe=Ee(ke),!e.partial&&t()?null:ge(Pe)}function n(e,t){function r(e){return"[object String]"===Object.prototype.toString.call(e)}function n(e){return null==e}var i,a;if(r(e))e={input:e};else if(!function(e){return e===Object(e)}(e))return null;if(!r(e.input))return null;if(!t)return null;for(a in i={oneResult:!1,partial:!1,rejectTLD:!1,rfc6532:!1,simple:!1,startAt:"address-list",strict:!1,atInDisplayName:!1})n(e[a])&&(e[a]=n(t[a])?i[a]:t[a]);return e}r.parseOneAddress=function(e){return r(n(e,{oneResult:!0,rfc6532:!0,simple:!0,startAt:"address-list"}))},r.parseAddressList=function(e){return r(n(e,{rfc6532:!0,simple:!0,startAt:"address-list"}))},r.parseFrom=function(e){return r(n(e,{rfc6532:!0,simple:!0,startAt:"from"}))},r.parseSender=function(e){return r(n(e,{oneResult:!0,rfc6532:!0,simple:!0,startAt:"sender"}))},r.parseReplyTo=function(e){return r(n(e,{rfc6532:!0,simple:!0,startAt:"reply-to"}))},void 0!==t&&void 0!==t.exports?t.exports=r:e.emailAddresses=r}(void 0)},{}],18:[function(e,t,r){"use strict";var n=e("./utils"),i=e("minimalistic-assert");function a(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}r.BlockHash=a,a.prototype.update=function(e,t){if(e=n.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var r=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=n.join32(e,0,e.length-r,this.endian);for(var i=0;i<e.length;i+=this._delta32)this._update(e,i,i+this._delta32)}return this},a.prototype.digest=function(e){return this.update(this._pad()),i(null===this.pending),this._digest(e)},a.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,r=t-(e+this.padLength)%t,n=new Array(r+this.padLength);n[0]=128;for(var i=1;i<r;i++)n[i]=0;if(e<<=3,"big"===this.endian){for(var a=8;a<this.padLength;a++)n[i++]=0;n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=e>>>24&255,n[i++]=e>>>16&255,n[i++]=e>>>8&255,n[i++]=255&e}else for(n[i++]=255&e,n[i++]=e>>>8&255,n[i++]=e>>>16&255,n[i++]=e>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,a=8;a<this.padLength;a++)n[i++]=0;return n}},{"./utils":25,"minimalistic-assert":27}],19:[function(e,t,r){"use strict";var n=e("./utils"),i=e("./common"),a=n.rotl32,s=n.sum32,o=n.sum32_3,u=n.sum32_4,l=i.BlockHash;function c(){if(!(this instanceof c))return new c;l.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function f(e,t,r,n){return e<=15?t^r^n:e<=31?t&r|~t&n:e<=47?(t|~r)^n:e<=63?t&n|r&~n:t^(r|~n)}function d(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function h(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}n.inherits(c,l),r.ripemd160=c,c.blockSize=512,c.outSize=160,c.hmacStrength=192,c.padLength=64,c.prototype._update=function(e,t){for(var r=this.h[0],n=this.h[1],i=this.h[2],l=this.h[3],c=this.h[4],w=r,b=n,_=i,v=l,k=c,A=0;A<80;A++){var S=s(a(u(r,f(A,n,i,l),e[p[A]+t],d(A)),m[A]),c);r=c,c=l,l=a(i,10),i=n,n=S,S=s(a(u(w,f(79-A,b,_,v),e[y[A]+t],h(A)),g[A]),k),w=k,k=v,v=a(_,10),_=b,b=S}S=o(this.h[1],i,v),this.h[1]=o(this.h[2],l,k),this.h[2]=o(this.h[3],c,w),this.h[3]=o(this.h[4],r,b),this.h[4]=o(this.h[0],n,_),this.h[0]=S},c.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"little"):n.split32(this.h,"little")};var p=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],y=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],m=[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],g=[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]},{"./common":18,"./utils":25}],20:[function(e,t,r){"use strict";var n=e("../utils"),i=e("./256");function a(){if(!(this instanceof a))return new a;i.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}n.inherits(a,i),t.exports=a,a.blockSize=512,a.outSize=224,a.hmacStrength=192,a.padLength=64,a.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,7),"big"):n.split32(this.h.slice(0,7),"big")}},{"../utils":25,"./256":21}],21:[function(e,t,r){"use strict";var n=e("../utils"),i=e("../common"),a=e("./common"),s=e("minimalistic-assert"),o=n.sum32,u=n.sum32_4,l=n.sum32_5,c=a.ch32,f=a.maj32,d=a.s0_256,h=a.s1_256,p=a.g0_256,y=a.g1_256,m=i.BlockHash,g=[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 w(){if(!(this instanceof w))return new w;m.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=g,this.W=new Array(64)}n.inherits(w,m),t.exports=w,w.blockSize=512,w.outSize=256,w.hmacStrength=192,w.padLength=64,w.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n<r.length;n++)r[n]=u(y(r[n-2]),r[n-7],p(r[n-15]),r[n-16]);var i=this.h[0],a=this.h[1],m=this.h[2],g=this.h[3],w=this.h[4],b=this.h[5],_=this.h[6],v=this.h[7];for(s(this.k.length===r.length),n=0;n<r.length;n++){var k=l(v,h(w),c(w,b,_),this.k[n],r[n]),A=o(d(i),f(i,a,m));v=_,_=b,b=w,w=o(g,k),g=m,m=a,a=i,i=o(k,A)}this.h[0]=o(this.h[0],i),this.h[1]=o(this.h[1],a),this.h[2]=o(this.h[2],m),this.h[3]=o(this.h[3],g),this.h[4]=o(this.h[4],w),this.h[5]=o(this.h[5],b),this.h[6]=o(this.h[6],_),this.h[7]=o(this.h[7],v)},w.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},{"../common":18,"../utils":25,"./common":24,"minimalistic-assert":27}],22:[function(e,t,r){"use strict";var n=e("../utils"),i=e("./512");function a(){if(!(this instanceof a))return new a;i.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}n.inherits(a,i),t.exports=a,a.blockSize=1024,a.outSize=384,a.hmacStrength=192,a.padLength=128,a.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,12),"big"):n.split32(this.h.slice(0,12),"big")}},{"../utils":25,"./512":23}],23:[function(e,t,r){"use strict";var n=e("../utils"),i=e("../common"),a=e("minimalistic-assert"),s=n.rotr64_hi,o=n.rotr64_lo,u=n.shr64_hi,l=n.shr64_lo,c=n.sum64,f=n.sum64_hi,d=n.sum64_lo,h=n.sum64_4_hi,p=n.sum64_4_lo,y=n.sum64_5_hi,m=n.sum64_5_lo,g=i.BlockHash,w=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function b(){if(!(this instanceof b))return new b;g.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=w,this.W=new Array(160)}function _(e,t,r,n,i){var a=e&r^~e&i;return a<0&&(a+=4294967296),a}function v(e,t,r,n,i,a){var s=t&n^~t&a;return s<0&&(s+=4294967296),s}function k(e,t,r,n,i){var a=e&r^e&i^r&i;return a<0&&(a+=4294967296),a}function A(e,t,r,n,i,a){var s=t&n^t&a^n&a;return s<0&&(s+=4294967296),s}function S(e,t){var r=s(e,t,28)^s(t,e,2)^s(t,e,7);return r<0&&(r+=4294967296),r}function P(e,t){var r=o(e,t,28)^o(t,e,2)^o(t,e,7);return r<0&&(r+=4294967296),r}function E(e,t){var r=s(e,t,14)^s(e,t,18)^s(t,e,9);return r<0&&(r+=4294967296),r}function x(e,t){var r=o(e,t,14)^o(e,t,18)^o(t,e,9);return r<0&&(r+=4294967296),r}function M(e,t){var r=s(e,t,1)^s(e,t,8)^u(e,t,7);return r<0&&(r+=4294967296),r}function K(e,t){var r=o(e,t,1)^o(e,t,8)^l(e,t,7);return r<0&&(r+=4294967296),r}function U(e,t){var r=s(e,t,19)^s(t,e,29)^u(e,t,6);return r<0&&(r+=4294967296),r}function C(e,t){var r=o(e,t,19)^o(t,e,29)^l(e,t,6);return r<0&&(r+=4294967296),r}n.inherits(b,g),t.exports=b,b.blockSize=1024,b.outSize=512,b.hmacStrength=192,b.padLength=128,b.prototype._prepareBlock=function(e,t){for(var r=this.W,n=0;n<32;n++)r[n]=e[t+n];for(;n<r.length;n+=2){var i=U(r[n-4],r[n-3]),a=C(r[n-4],r[n-3]),s=r[n-14],o=r[n-13],u=M(r[n-30],r[n-29]),l=K(r[n-30],r[n-29]),c=r[n-32],f=r[n-31];r[n]=h(i,a,s,o,u,l,c,f),r[n+1]=p(i,a,s,o,u,l,c,f)}},b.prototype._update=function(e,t){this._prepareBlock(e,t);var r=this.W,n=this.h[0],i=this.h[1],s=this.h[2],o=this.h[3],u=this.h[4],l=this.h[5],h=this.h[6],p=this.h[7],g=this.h[8],w=this.h[9],b=this.h[10],M=this.h[11],K=this.h[12],U=this.h[13],C=this.h[14],R=this.h[15];a(this.k.length===r.length);for(var T=0;T<r.length;T+=2){var j=C,O=R,B=E(g,w),I=x(g,w),z=_(g,w,b,M,K),D=v(g,w,b,M,K,U),N=this.k[T],L=this.k[T+1],q=r[T],F=r[T+1],H=y(j,O,B,I,z,D,N,L,q,F),W=m(j,O,B,I,z,D,N,L,q,F);j=S(n,i),O=P(n,i),B=k(n,i,s,o,u),I=A(n,i,s,o,u,l);var Z=f(j,O,B,I),G=d(j,O,B,I);C=K,R=U,K=b,U=M,b=g,M=w,g=f(h,p,H,W),w=d(p,p,H,W),h=u,p=l,u=s,l=o,s=n,o=i,n=f(H,W,Z,G),i=d(H,W,Z,G)}c(this.h,0,n,i),c(this.h,2,s,o),c(this.h,4,u,l),c(this.h,6,h,p),c(this.h,8,g,w),c(this.h,10,b,M),c(this.h,12,K,U),c(this.h,14,C,R)},b.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},{"../common":18,"../utils":25,"minimalistic-assert":27}],24:[function(e,t,r){"use strict";var n=e("../utils").rotr32;function i(e,t,r){return e&t^~e&r}function a(e,t,r){return e&t^e&r^t&r}function s(e,t,r){return e^t^r}r.ft_1=function(e,t,r,n){return 0===e?i(t,r,n):1===e||3===e?s(t,r,n):2===e?a(t,r,n):void 0},r.ch32=i,r.maj32=a,r.p32=s,r.s0_256=function(e){return n(e,2)^n(e,13)^n(e,22)},r.s1_256=function(e){return n(e,6)^n(e,11)^n(e,25)},r.g0_256=function(e){return n(e,7)^n(e,18)^e>>>3},r.g1_256=function(e){return n(e,17)^n(e,19)^e>>>10}},{"../utils":25}],25:[function(e,t,r){"use strict";var n=e("minimalistic-assert"),i=e("inherits");function a(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function s(e){return 1===e.length?"0"+e:e}function o(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}r.inherits=i,r.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),n=0;n<e.length;n+=2)r.push(parseInt(e[n]+e[n+1],16))}else for(var n=0;n<e.length;n++){var i=e.charCodeAt(n),a=i>>8,s=255&i;a?r.push(a,s):r.push(s)}else for(n=0;n<e.length;n++)r[n]=0|e[n];return r},r.toHex=function(e){for(var t="",r=0;r<e.length;r++)t+=s(e[r].toString(16));return t},r.htonl=a,r.toHex32=function(e,t){for(var r="",n=0;n<e.length;n++){var i=e[n];"little"===t&&(i=a(i)),r+=o(i.toString(16))}return r},r.zero2=s,r.zero8=o,r.join32=function(e,t,r,i){var a=r-t;n(a%4==0);for(var s=new Array(a/4),o=0,u=t;o<s.length;o++,u+=4){var l;l="big"===i?e[u]<<24|e[u+1]<<16|e[u+2]<<8|e[u+3]:e[u+3]<<24|e[u+2]<<16|e[u+1]<<8|e[u],s[o]=l>>>0}return s},r.split32=function(e,t){for(var r=new Array(4*e.length),n=0,i=0;n<e.length;n++,i+=4){var a=e[n];"big"===t?(r[i]=a>>>24,r[i+1]=a>>>16&255,r[i+2]=a>>>8&255,r[i+3]=255&a):(r[i+3]=a>>>24,r[i+2]=a>>>16&255,r[i+1]=a>>>8&255,r[i]=255&a)}return r},r.rotr32=function(e,t){return e>>>t|e<<32-t},r.rotl32=function(e,t){return e<<t|e>>>32-t},r.sum32=function(e,t){return e+t>>>0},r.sum32_3=function(e,t,r){return e+t+r>>>0},r.sum32_4=function(e,t,r,n){return e+t+r+n>>>0},r.sum32_5=function(e,t,r,n,i){return e+t+r+n+i>>>0},r.sum64=function(e,t,r,n){var i=e[t],a=n+e[t+1]>>>0,s=(a<n?1:0)+r+i;e[t]=s>>>0,e[t+1]=a},r.sum64_hi=function(e,t,r,n){return(t+n>>>0<t?1:0)+e+r>>>0},r.sum64_lo=function(e,t,r,n){return t+n>>>0},r.sum64_4_hi=function(e,t,r,n,i,a,s,o){var u=0,l=t;return u+=(l=l+n>>>0)<t?1:0,u+=(l=l+a>>>0)<a?1:0,e+r+i+s+(u+=(l=l+o>>>0)<o?1:0)>>>0},r.sum64_4_lo=function(e,t,r,n,i,a,s,o){return t+n+a+o>>>0},r.sum64_5_hi=function(e,t,r,n,i,a,s,o,u,l){var c=0,f=t;return c+=(f=f+n>>>0)<t?1:0,c+=(f=f+a>>>0)<a?1:0,c+=(f=f+o>>>0)<o?1:0,e+r+i+s+u+(c+=(f=f+l>>>0)<l?1:0)>>>0},r.sum64_5_lo=function(e,t,r,n,i,a,s,o,u,l){return t+n+a+o+l>>>0},r.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0},r.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},r.shr64_hi=function(e,t,r){return e>>>r},r.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0}},{inherits:26,"minimalistic-assert":27}],26:[function(e,t,r){"function"==typeof Object.create?t.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},{}],27:[function(e,t,r){function n(e,t){if(!e)throw new Error(t||"Assertion failed")}t.exports=n,n.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)}},{}],28:[function(e,t,r){"use strict";var n={};(0,e("./lib/utils/common").assign)(n,e("./lib/deflate"),e("./lib/inflate"),e("./lib/zlib/constants")),t.exports=n},{"./lib/deflate":29,"./lib/inflate":30,"./lib/utils/common":31,"./lib/zlib/constants":34}],29:[function(e,t,r){"use strict";var n=e("./zlib/deflate"),i=e("./utils/common"),a=e("./utils/strings"),s=e("./zlib/messages"),o=e("./zlib/zstream"),u=Object.prototype.toString,l=0,c=-1,f=0,d=8;function h(e){if(!(this instanceof h))return new h(e);this.options=i.assign({level:c,method:d,chunkSize:16384,windowBits:15,memLevel:8,strategy:f,to:""},e||{});var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new o,this.strm.avail_out=0;var r=n.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(r!==l)throw new Error(s[r]);if(t.header&&n.deflateSetHeader(this.strm,t.header),t.dictionary){var p;if(p="string"==typeof t.dictionary?a.string2buf(t.dictionary):"[object ArrayBuffer]"===u.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,(r=n.deflateSetDictionary(this.strm,p))!==l)throw new Error(s[r]);this._dict_set=!0}}function p(e,t){var r=new h(t);if(r.push(e,!0),r.err)throw r.msg||s[r.err];return r.result}h.prototype.push=function(e,t){var r,s,o=this.strm,c=this.options.chunkSize;if(this.ended)return!1;s=t===~~t?t:!0===t?4:0,"string"==typeof e?o.input=a.string2buf(e):"[object ArrayBuffer]"===u.call(e)?o.input=new Uint8Array(e):o.input=e,o.next_in=0,o.avail_in=o.input.length;do{if(0===o.avail_out&&(o.output=new i.Buf8(c),o.next_out=0,o.avail_out=c),1!==(r=n.deflate(o,s))&&r!==l)return this.onEnd(r),this.ended=!0,!1;0!==o.avail_out&&(0!==o.avail_in||4!==s&&2!==s)||("string"===this.options.to?this.onData(a.buf2binstring(i.shrinkBuf(o.output,o.next_out))):this.onData(i.shrinkBuf(o.output,o.next_out)))}while((o.avail_in>0||0===o.avail_out)&&1!==r);return 4===s?(r=n.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===l):2!==s||(this.onEnd(l),o.avail_out=0,!0)},h.prototype.onData=function(e){this.chunks.push(e)},h.prototype.onEnd=function(e){e===l&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},r.Deflate=h,r.deflate=p,r.deflateRaw=function(e,t){return(t=t||{}).raw=!0,p(e,t)},r.gzip=function(e,t){return(t=t||{}).gzip=!0,p(e,t)}},{"./utils/common":31,"./utils/strings":32,"./zlib/deflate":36,"./zlib/messages":41,"./zlib/zstream":43}],30:[function(e,t,r){"use strict";var n=e("./zlib/inflate"),i=e("./utils/common"),a=e("./utils/strings"),s=e("./zlib/constants"),o=e("./zlib/messages"),u=e("./zlib/zstream"),l=e("./zlib/gzheader"),c=Object.prototype.toString;function f(e){if(!(this instanceof f))return new f(e);this.options=i.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new u,this.strm.avail_out=0;var r=n.inflateInit2(this.strm,t.windowBits);if(r!==s.Z_OK)throw new Error(o[r]);this.header=new l,n.inflateGetHeader(this.strm,this.header)}function d(e,t){var r=new f(t);if(r.push(e,!0),r.err)throw r.msg||o[r.err];return r.result}f.prototype.push=function(e,t){var r,o,u,l,f,d,h=this.strm,p=this.options.chunkSize,y=this.options.dictionary,m=!1;if(this.ended)return!1;o=t===~~t?t:!0===t?s.Z_FINISH:s.Z_NO_FLUSH,"string"==typeof e?h.input=a.binstring2buf(e):"[object ArrayBuffer]"===c.call(e)?h.input=new Uint8Array(e):h.input=e,h.next_in=0,h.avail_in=h.input.length;do{if(0===h.avail_out&&(h.output=new i.Buf8(p),h.next_out=0,h.avail_out=p),(r=n.inflate(h,s.Z_NO_FLUSH))===s.Z_NEED_DICT&&y&&(d="string"==typeof y?a.string2buf(y):"[object ArrayBuffer]"===c.call(y)?new Uint8Array(y):y,r=n.inflateSetDictionary(this.strm,d)),r===s.Z_BUF_ERROR&&!0===m&&(r=s.Z_OK,m=!1),r!==s.Z_STREAM_END&&r!==s.Z_OK)return this.onEnd(r),this.ended=!0,!1;h.next_out&&(0!==h.avail_out&&r!==s.Z_STREAM_END&&(0!==h.avail_in||o!==s.Z_FINISH&&o!==s.Z_SYNC_FLUSH)||("string"===this.options.to?(u=a.utf8border(h.output,h.next_out),l=h.next_out-u,f=a.buf2string(h.output,u),h.next_out=l,h.avail_out=p-l,l&&i.arraySet(h.output,h.output,u,l,0),this.onData(f)):this.onData(i.shrinkBuf(h.output,h.next_out)))),0===h.avail_in&&0===h.avail_out&&(m=!0)}while((h.avail_in>0||0===h.avail_out)&&r!==s.Z_STREAM_END);return r===s.Z_STREAM_END&&(o=s.Z_FINISH),o===s.Z_FINISH?(r=n.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===s.Z_OK):o!==s.Z_SYNC_FLUSH||(this.onEnd(s.Z_OK),h.avail_out=0,!0)},f.prototype.onData=function(e){this.chunks.push(e)},f.prototype.onEnd=function(e){e===s.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},r.Inflate=f,r.inflate=d,r.inflateRaw=function(e,t){return(t=t||{}).raw=!0,d(e,t)},r.ungzip=d},{"./utils/common":31,"./utils/strings":32,"./zlib/constants":34,"./zlib/gzheader":37,"./zlib/inflate":39,"./zlib/messages":41,"./zlib/zstream":43}],31:[function(e,t,r){"use strict";var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function i(e,t){return Object.prototype.hasOwnProperty.call(e,t)}r.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 n in r)i(r,n)&&(e[n]=r[n])}}return e},r.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,n,i){if(t.subarray&&e.subarray)e.set(t.subarray(r,r+n),i);else for(var a=0;a<n;a++)e[i+a]=t[r+a]},flattenChunks:function(e){var t,r,n,i,a,s;for(n=0,t=0,r=e.length;t<r;t++)n+=e[t].length;for(s=new Uint8Array(n),i=0,t=0,r=e.length;t<r;t++)a=e[t],s.set(a,i),i+=a.length;return s}},s={arraySet:function(e,t,r,n,i){for(var a=0;a<n;a++)e[i+a]=t[r+a]},flattenChunks:function(e){return[].concat.apply([],e)}};r.setTyped=function(e){e?(r.Buf8=Uint8Array,r.Buf16=Uint16Array,r.Buf32=Int32Array,r.assign(r,a)):(r.Buf8=Array,r.Buf16=Array,r.Buf32=Array,r.assign(r,s))},r.setTyped(n)},{}],32:[function(e,t,r){"use strict";var n=e("./common"),i=!0,a=!0;try{String.fromCharCode.apply(null,[0])}catch(l){i=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(l){a=!1}for(var s=new n.Buf8(256),o=0;o<256;o++)s[o]=o>=252?6:o>=248?5:o>=240?4:o>=224?3:o>=192?2:1;function u(e,t){if(t<65537&&(e.subarray&&a||!e.subarray&&i))return String.fromCharCode.apply(null,n.shrinkBuf(e,t));for(var r="",s=0;s<t;s++)r+=String.fromCharCode(e[s]);return r}s[254]=s[254]=1,r.string2buf=function(e){var t,r,i,a,s,o=e.length,u=0;for(a=0;a<o;a++)55296==(64512&(r=e.charCodeAt(a)))&&a+1<o&&56320==(64512&(i=e.charCodeAt(a+1)))&&(r=65536+(r-55296<<10)+(i-56320),a++),u+=r<128?1:r<2048?2:r<65536?3:4;for(t=new n.Buf8(u),s=0,a=0;s<u;a++)55296==(64512&(r=e.charCodeAt(a)))&&a+1<o&&56320==(64512&(i=e.charCodeAt(a+1)))&&(r=65536+(r-55296<<10)+(i-56320),a++),r<128?t[s++]=r:r<2048?(t[s++]=192|r>>>6,t[s++]=128|63&r):r<65536?(t[s++]=224|r>>>12,t[s++]=128|r>>>6&63,t[s++]=128|63&r):(t[s++]=240|r>>>18,t[s++]=128|r>>>12&63,t[s++]=128|r>>>6&63,t[s++]=128|63&r);return t},r.buf2binstring=function(e){return u(e,e.length)},r.binstring2buf=function(e){for(var t=new n.Buf8(e.length),r=0,i=t.length;r<i;r++)t[r]=e.charCodeAt(r);return t},r.buf2string=function(e,t){var r,n,i,a,o=t||e.length,l=new Array(2*o);for(n=0,r=0;r<o;)if((i=e[r++])<128)l[n++]=i;else if((a=s[i])>4)l[n++]=65533,r+=a-1;else{for(i&=2===a?31:3===a?15:7;a>1&&r<o;)i=i<<6|63&e[r++],a--;a>1?l[n++]=65533:i<65536?l[n++]=i:(i-=65536,l[n++]=55296|i>>10&1023,l[n++]=56320|1023&i)}return u(l,n)},r.utf8border=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;r>=0&&128==(192&e[r]);)r--;return r<0?t:0===r?t:r+s[e[r]]>t?r:t}},{"./common":31}],33:[function(e,t,r){"use strict";t.exports=function(e,t,r,n){for(var i=65535&e|0,a=e>>>16&65535|0,s=0;0!==r;){r-=s=r>2e3?2e3:r;do{a=a+(i=i+t[n++]|0)|0}while(--s);i%=65521,a%=65521}return i|a<<16|0}},{}],34:[function(e,t,r){"use strict";t.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}},{}],35:[function(e,t,r){"use strict";var n=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();t.exports=function(e,t,r,i){var a=n,s=i+r;e^=-1;for(var o=i;o<s;o++)e=e>>>8^a[255&(e^t[o])];return-1^e}},{}],36:[function(e,t,r){"use strict";var n,i=e("../utils/common"),a=e("./trees"),s=e("./adler32"),o=e("./crc32"),u=e("./messages"),l=0,c=1,f=3,d=4,h=5,p=0,y=1,m=-2,g=-3,w=-5,b=-1,_=1,v=2,k=3,A=4,S=0,P=2,E=8,x=9,M=15,K=8,U=286,C=30,R=19,T=2*U+1,j=15,O=3,B=258,I=B+O+1,z=32,D=42,N=69,L=73,q=91,F=103,H=113,W=666,Z=1,G=2,V=3,Y=4,$=3;function Q(e,t){return e.msg=u[t],t}function X(e){return(e<<1)-(e>4?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&&(i.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 ne(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function ie(e,t){var r,n,i=e.max_chain_length,a=e.strstart,s=e.prev_length,o=e.nice_match,u=e.strstart>e.w_size-I?e.strstart-(e.w_size-I):0,l=e.window,c=e.w_mask,f=e.prev,d=e.strstart+B,h=l[a+s-1],p=l[a+s];e.prev_length>=e.good_match&&(i>>=2),o>e.lookahead&&(o=e.lookahead);do{if(l[(r=t)+s]===p&&l[r+s-1]===h&&l[r]===l[a]&&l[++r]===l[a+1]){a+=2,r++;do{}while(l[++a]===l[++r]&&l[++a]===l[++r]&&l[++a]===l[++r]&&l[++a]===l[++r]&&l[++a]===l[++r]&&l[++a]===l[++r]&&l[++a]===l[++r]&&l[++a]===l[++r]&&a<d);if(n=B-(d-a),a=d-B,n>s){if(e.match_start=t,s=n,n>=o)break;h=l[a+s-1],p=l[a+s]}}}while((t=f[t&c])>u&&0!=--i);return s<=e.lookahead?s:e.lookahead}function ae(e){var t,r,n,a,u,l,c,f,d,h,p=e.w_size;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=p+(p-I)){i.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{n=e.head[--t],e.head[t]=n>=p?n-p:0}while(--r);t=r=p;do{n=e.prev[--t],e.prev[t]=n>=p?n-p:0}while(--r);a+=p}if(0===e.strm.avail_in)break;if(l=e.strm,c=e.window,f=e.strstart+e.lookahead,d=a,h=void 0,(h=l.avail_in)>d&&(h=d),r=0===h?0:(l.avail_in-=h,i.arraySet(c,l.input,l.next_in,h,f),1===l.state.wrap?l.adler=s(l.adler,c,h,f):2===l.state.wrap&&(l.adler=o(l.adler,c,h,f)),l.next_in+=h,l.total_in+=h,h),e.lookahead+=r,e.lookahead+e.insert>=O)for(u=e.strstart-e.insert,e.ins_h=e.window[u],e.ins_h=(e.ins_h<<e.hash_shift^e.window[u+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[u+O-1])&e.hash_mask,e.prev[u&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=u,u++,e.insert--,!(e.lookahead+e.insert<O)););}while(e.lookahead<I&&0!==e.strm.avail_in)}function se(e,t){for(var r,n;;){if(e.lookahead<I){if(ae(e),e.lookahead<I&&t===l)return Z;if(0===e.lookahead)break}if(r=0,e.lookahead>=O&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+O-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==r&&e.strstart-r<=e.w_size-I&&(e.match_length=ie(e,r)),e.match_length>=O)if(n=a._tr_tally(e,e.strstart-e.match_start,e.match_length-O),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=O){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+O-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else n=a._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(te(e,!1),0===e.strm.avail_out))return Z}return e.insert=e.strstart<O-1?e.strstart:O-1,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}function oe(e,t){for(var r,n,i;;){if(e.lookahead<I){if(ae(e),e.lookahead<I&&t===l)return Z;if(0===e.lookahead)break}if(r=0,e.lookahead>=O&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+O-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=O-1,0!==r&&e.prev_length<e.max_lazy_match&&e.strstart-r<=e.w_size-I&&(e.match_length=ie(e,r),e.match_length<=5&&(e.strategy===_||e.match_length===O&&e.strstart-e.match_start>4096)&&(e.match_length=O-1)),e.prev_length>=O&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-O,n=a._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-O),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=i&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+O-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!=--e.prev_length);if(e.match_available=0,e.match_length=O-1,e.strstart++,n&&(te(e,!1),0===e.strm.avail_out))return Z}else if(e.match_available){if((n=a._tr_tally(e,0,e.window[e.strstart-1]))&&te(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return Z}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(n=a._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<O-1?e.strstart:O-1,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}function ue(e,t,r,n,i){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=n,this.func=i}function le(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=E,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new i.Buf16(2*T),this.dyn_dtree=new i.Buf16(2*(2*C+1)),this.bl_tree=new i.Buf16(2*(2*R+1)),J(this.dyn_ltree),J(this.dyn_dtree),J(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new i.Buf16(j+1),this.heap=new i.Buf16(2*U+1),J(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new i.Buf16(2*U+1),J(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function ce(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=P,(t=e.state).pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?D:H,e.adler=2===t.wrap?0:1,t.last_flush=l,a._tr_init(t),p):Q(e,m)}function fe(e){var t,r=ce(e);return r===p&&((t=e.state).window_size=2*t.w_size,J(t.head),t.max_lazy_match=n[t.level].max_lazy,t.good_match=n[t.level].good_length,t.nice_match=n[t.level].nice_length,t.max_chain_length=n[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=O-1,t.match_available=0,t.ins_h=0),r}function de(e,t,r,n,a,s){if(!e)return m;var o=1;if(t===b&&(t=6),n<0?(o=0,n=-n):n>15&&(o=2,n-=16),a<1||a>x||r!==E||n<8||n>15||t<0||t>9||s<0||s>A)return Q(e,m);8===n&&(n=9);var u=new le;return e.state=u,u.strm=e,u.wrap=o,u.gzhead=null,u.w_bits=n,u.w_size=1<<u.w_bits,u.w_mask=u.w_size-1,u.hash_bits=a+7,u.hash_size=1<<u.hash_bits,u.hash_mask=u.hash_size-1,u.hash_shift=~~((u.hash_bits+O-1)/O),u.window=new i.Buf8(2*u.w_size),u.head=new i.Buf16(u.hash_size),u.prev=new i.Buf16(u.w_size),u.lit_bufsize=1<<a+6,u.pending_buf_size=4*u.lit_bufsize,u.pending_buf=new i.Buf8(u.pending_buf_size),u.d_buf=1*u.lit_bufsize,u.l_buf=3*u.lit_bufsize,u.level=t,u.strategy=s,u.method=r,fe(e)}n=[new ue(0,0,0,0,function(e,t){var r=65535;for(r>e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(ae(e),0===e.lookahead&&t===l)return Z;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+r;if((0===e.strstart||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,te(e,!1),0===e.strm.avail_out))return Z;if(e.strstart-e.block_start>=e.w_size-I&&(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 ue(4,4,8,4,se),new ue(4,5,16,8,se),new ue(4,6,32,32,se),new ue(4,4,16,16,oe),new ue(8,16,32,32,oe),new ue(8,16,128,128,oe),new ue(8,32,128,256,oe),new ue(32,128,258,1024,oe),new ue(32,258,258,4096,oe)],r.deflateInit=function(e,t){return de(e,t,E,M,K,S)},r.deflateInit2=de,r.deflateReset=fe,r.deflateResetKeep=ce,r.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?m:(e.state.gzhead=t,p):m},r.deflate=function(e,t){var r,i,s,u;if(!e||!e.state||t>h||t<0)return e?Q(e,m):m;if(i=e.state,!e.output||!e.input&&0!==e.avail_in||i.status===W&&t!==d)return Q(e,0===e.avail_out?w:m);if(i.strm=e,r=i.last_flush,i.last_flush=t,i.status===D)if(2===i.wrap)e.adler=0,re(i,31),re(i,139),re(i,8),i.gzhead?(re(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),re(i,255&i.gzhead.time),re(i,i.gzhead.time>>8&255),re(i,i.gzhead.time>>16&255),re(i,i.gzhead.time>>24&255),re(i,9===i.level?2:i.strategy>=v||i.level<2?4:0),re(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(re(i,255&i.gzhead.extra.length),re(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=o(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=N):(re(i,0),re(i,0),re(i,0),re(i,0),re(i,0),re(i,9===i.level?2:i.strategy>=v||i.level<2?4:0),re(i,$),i.status=H);else{var g=E+(i.w_bits-8<<4)<<8;g|=(i.strategy>=v||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(g|=z),g+=31-g%31,i.status=H,ne(i,g),0!==i.strstart&&(ne(i,e.adler>>>16),ne(i,65535&e.adler)),e.adler=1}if(i.status===N)if(i.gzhead.extra){for(s=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>s&&(e.adler=o(e.adler,i.pending_buf,i.pending-s,s)),ee(e),s=i.pending,i.pending!==i.pending_buf_size));)re(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>s&&(e.adler=o(e.adler,i.pending_buf,i.pending-s,s)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=L)}else i.status=L;if(i.status===L)if(i.gzhead.name){s=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>s&&(e.adler=o(e.adler,i.pending_buf,i.pending-s,s)),ee(e),s=i.pending,i.pending===i.pending_buf_size)){u=1;break}u=i.gzindex<i.gzhead.name.length?255&i.gzhead.name.charCodeAt(i.gzindex++):0,re(i,u)}while(0!==u);i.gzhead.hcrc&&i.pending>s&&(e.adler=o(e.adler,i.pending_buf,i.pending-s,s)),0===u&&(i.gzindex=0,i.status=q)}else i.status=q;if(i.status===q)if(i.gzhead.comment){s=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>s&&(e.adler=o(e.adler,i.pending_buf,i.pending-s,s)),ee(e),s=i.pending,i.pending===i.pending_buf_size)){u=1;break}u=i.gzindex<i.gzhead.comment.length?255&i.gzhead.comment.charCodeAt(i.gzindex++):0,re(i,u)}while(0!==u);i.gzhead.hcrc&&i.pending>s&&(e.adler=o(e.adler,i.pending_buf,i.pending-s,s)),0===u&&(i.status=F)}else i.status=F;if(i.status===F&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&ee(e),i.pending+2<=i.pending_buf_size&&(re(i,255&e.adler),re(i,e.adler>>8&255),e.adler=0,i.status=H)):i.status=H),0!==i.pending){if(ee(e),0===e.avail_out)return i.last_flush=-1,p}else if(0===e.avail_in&&X(t)<=X(r)&&t!==d)return Q(e,w);if(i.status===W&&0!==e.avail_in)return Q(e,w);if(0!==e.avail_in||0!==i.lookahead||t!==l&&i.status!==W){var b=i.strategy===v?function(e,t){for(var r;;){if(0===e.lookahead&&(ae(e),0===e.lookahead)){if(t===l)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}(i,t):i.strategy===k?function(e,t){for(var r,n,i,s,o=e.window;;){if(e.lookahead<=B){if(ae(e),e.lookahead<=B&&t===l)return Z;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=O&&e.strstart>0&&(n=o[i=e.strstart-1])===o[++i]&&n===o[++i]&&n===o[++i]){s=e.strstart+B;do{}while(n===o[++i]&&n===o[++i]&&n===o[++i]&&n===o[++i]&&n===o[++i]&&n===o[++i]&&n===o[++i]&&n===o[++i]&&i<s);e.match_length=B-(s-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=O?(r=a._tr_tally(e,1,e.match_length-O),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}(i,t):n[i.level].func(i,t);if(b!==V&&b!==Y||(i.status=W),b===Z||b===V)return 0===e.avail_out&&(i.last_flush=-1),p;if(b===G&&(t===c?a._tr_align(i):t!==h&&(a._tr_stored_block(i,0,0,!1),t===f&&(J(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),ee(e),0===e.avail_out))return i.last_flush=-1,p}return t!==d?p:i.wrap<=0?y:(2===i.wrap?(re(i,255&e.adler),re(i,e.adler>>8&255),re(i,e.adler>>16&255),re(i,e.adler>>24&255),re(i,255&e.total_in),re(i,e.total_in>>8&255),re(i,e.total_in>>16&255),re(i,e.total_in>>24&255)):(ne(i,e.adler>>>16),ne(i,65535&e.adler)),ee(e),i.wrap>0&&(i.wrap=-i.wrap),0!==i.pending?p:y)},r.deflateEnd=function(e){var t;return e&&e.state?(t=e.state.status)!==D&&t!==N&&t!==L&&t!==q&&t!==F&&t!==H&&t!==W?Q(e,m):(e.state=null,t===H?Q(e,g):p):m},r.deflateSetDictionary=function(e,t){var r,n,a,o,u,l,c,f,d=t.length;if(!e||!e.state)return m;if(2===(o=(r=e.state).wrap)||1===o&&r.status!==D||r.lookahead)return m;for(1===o&&(e.adler=s(e.adler,t,d,0)),r.wrap=0,d>=r.w_size&&(0===o&&(J(r.head),r.strstart=0,r.block_start=0,r.insert=0),f=new i.Buf8(r.w_size),i.arraySet(f,t,d-r.w_size,r.w_size,0),t=f,d=r.w_size),u=e.avail_in,l=e.next_in,c=e.input,e.avail_in=d,e.next_in=0,e.input=t,ae(r);r.lookahead>=O;){n=r.strstart,a=r.lookahead-(O-1);do{r.ins_h=(r.ins_h<<r.hash_shift^r.window[n+O-1])&r.hash_mask,r.prev[n&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=n,n++}while(--a);r.strstart=n,r.lookahead=O-1,ae(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=O-1,r.match_available=0,e.next_in=l,e.input=c,e.avail_in=u,r.wrap=o,p},r.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":31,"./adler32":33,"./crc32":35,"./messages":41,"./trees":42}],37:[function(e,t,r){"use strict";t.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],38:[function(e,t,r){"use strict";t.exports=function(e,t){var r,n,i,a,s,o,u,l,c,f,d,h,p,y,m,g,w,b,_,v,k,A,S,P,E;r=e.state,n=e.next_in,P=e.input,i=n+(e.avail_in-5),a=e.next_out,E=e.output,s=a-(t-e.avail_out),o=a+(e.avail_out-257),u=r.dmax,l=r.wsize,c=r.whave,f=r.wnext,d=r.window,h=r.hold,p=r.bits,y=r.lencode,m=r.distcode,g=(1<<r.lenbits)-1,w=(1<<r.distbits)-1;e:do{p<15&&(h+=P[n++]<<p,p+=8,h+=P[n++]<<p,p+=8),b=y[h&g];t:for(;;){if(h>>>=_=b>>>24,p-=_,0===(_=b>>>16&255))E[a++]=65535&b;else{if(!(16&_)){if(0==(64&_)){b=y[(65535&b)+(h&(1<<_)-1)];continue t}if(32&_){r.mode=12;break e}e.msg="invalid literal/length code",r.mode=30;break e}v=65535&b,(_&=15)&&(p<_&&(h+=P[n++]<<p,p+=8),v+=h&(1<<_)-1,h>>>=_,p-=_),p<15&&(h+=P[n++]<<p,p+=8,h+=P[n++]<<p,p+=8),b=m[h&w];r:for(;;){if(h>>>=_=b>>>24,p-=_,!(16&(_=b>>>16&255))){if(0==(64&_)){b=m[(65535&b)+(h&(1<<_)-1)];continue r}e.msg="invalid distance code",r.mode=30;break e}if(k=65535&b,p<(_&=15)&&(h+=P[n++]<<p,(p+=8)<_&&(h+=P[n++]<<p,p+=8)),(k+=h&(1<<_)-1)>u){e.msg="invalid distance too far back",r.mode=30;break e}if(h>>>=_,p-=_,k>(_=a-s)){if((_=k-_)>c&&r.sane){e.msg="invalid distance too far back",r.mode=30;break e}if(A=0,S=d,0===f){if(A+=l-_,_<v){v-=_;do{E[a++]=d[A++]}while(--_);A=a-k,S=E}}else if(f<_){if(A+=l+f-_,(_-=f)<v){v-=_;do{E[a++]=d[A++]}while(--_);if(A=0,f<v){v-=_=f;do{E[a++]=d[A++]}while(--_);A=a-k,S=E}}}else if(A+=f-_,_<v){v-=_;do{E[a++]=d[A++]}while(--_);A=a-k,S=E}for(;v>2;)E[a++]=S[A++],E[a++]=S[A++],E[a++]=S[A++],v-=3;v&&(E[a++]=S[A++],v>1&&(E[a++]=S[A++]))}else{A=a-k;do{E[a++]=E[A++],E[a++]=E[A++],E[a++]=E[A++],v-=3}while(v>2);v&&(E[a++]=E[A++],v>1&&(E[a++]=E[A++]))}break}}break}}while(n<i&&a<o);n-=v=p>>3,h&=(1<<(p-=v<<3))-1,e.next_in=n,e.next_out=a,e.avail_in=n<i?i-n+5:5-(n-i),e.avail_out=a<o?o-a+257:257-(a-o),r.hold=h,r.bits=p}},{}],39:[function(e,t,r){"use strict";var n=e("../utils/common"),i=e("./adler32"),a=e("./crc32"),s=e("./inffast"),o=e("./inftrees"),u=0,l=1,c=2,f=4,d=5,h=6,p=0,y=1,m=2,g=-2,w=-3,b=-4,_=-5,v=8,k=1,A=2,S=3,P=4,E=5,x=6,M=7,K=8,U=9,C=10,R=11,T=12,j=13,O=14,B=15,I=16,z=17,D=18,N=19,L=20,q=21,F=22,H=23,W=24,Z=25,G=26,V=27,Y=28,$=29,Q=30,X=31,J=32,ee=852,te=592,re=15;function ne(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function ie(){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 n.Buf16(320),this.work=new n.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=k,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new n.Buf32(ee),t.distcode=t.distdyn=new n.Buf32(te),t.sane=1,t.back=-1,p):g}function se(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,ae(e)):g}function oe(e,t){var r,n;return e&&e.state?(n=e.state,t<0?(r=0,t=-t):(r=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?g:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,se(e))):g}function ue(e,t){var r,n;return e?(n=new ie,e.state=n,n.window=null,(r=oe(e,t))!==p&&(e.state=null),r):g}var le,ce,fe=!0;function de(e){if(fe){var t;for(le=new n.Buf32(512),ce=new n.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(o(l,e.lens,0,288,le,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;o(c,e.lens,0,32,ce,0,e.work,{bits:5}),fe=!1}e.lencode=le,e.lenbits=9,e.distcode=ce,e.distbits=5}function he(e,t,r,i){var a,s=e.state;return null===s.window&&(s.wsize=1<<s.wbits,s.wnext=0,s.whave=0,s.window=new n.Buf8(s.wsize)),i>=s.wsize?(n.arraySet(s.window,t,r-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):((a=s.wsize-s.wnext)>i&&(a=i),n.arraySet(s.window,t,r-i,a,s.wnext),(i-=a)?(n.arraySet(s.window,t,r-i,i,0),s.wnext=i,s.whave=s.wsize):(s.wnext+=a,s.wnext===s.wsize&&(s.wnext=0),s.whave<s.wsize&&(s.whave+=a))),0}r.inflateReset=se,r.inflateReset2=oe,r.inflateResetKeep=ae,r.inflateInit=function(e){return ue(e,re)},r.inflateInit2=ue,r.inflate=function(e,t){var r,ee,te,re,ie,ae,se,oe,ue,le,ce,fe,pe,ye,me,ge,we,be,_e,ve,ke,Ae,Se,Pe,Ee=0,xe=new n.Buf8(4),Me=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return g;(r=e.state).mode===T&&(r.mode=j),ie=e.next_out,te=e.output,se=e.avail_out,re=e.next_in,ee=e.input,ae=e.avail_in,oe=r.hold,ue=r.bits,le=ae,ce=se,Ae=p;e:for(;;)switch(r.mode){case k:if(0===r.wrap){r.mode=j;break}for(;ue<16;){if(0===ae)break e;ae--,oe+=ee[re++]<<ue,ue+=8}if(2&r.wrap&&35615===oe){r.check=0,xe[0]=255&oe,xe[1]=oe>>>8&255,r.check=a(r.check,xe,2,0),oe=0,ue=0,r.mode=A;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&oe)<<8)+(oe>>8))%31){e.msg="incorrect header check",r.mode=Q;break}if((15&oe)!==v){e.msg="unknown compression method",r.mode=Q;break}if(ue-=4,ke=8+(15&(oe>>>=4)),0===r.wbits)r.wbits=ke;else if(ke>r.wbits){e.msg="invalid window size",r.mode=Q;break}r.dmax=1<<ke,e.adler=r.check=1,r.mode=512&oe?C:T,oe=0,ue=0;break;case A:for(;ue<16;){if(0===ae)break e;ae--,oe+=ee[re++]<<ue,ue+=8}if(r.flags=oe,(255&r.flags)!==v){e.msg="unknown compression method",r.mode=Q;break}if(57344&r.flags){e.msg="unknown header flags set",r.mode=Q;break}r.head&&(r.head.text=oe>>8&1),512&r.flags&&(xe[0]=255&oe,xe[1]=oe>>>8&255,r.check=a(r.check,xe,2,0)),oe=0,ue=0,r.mode=S;case S:for(;ue<32;){if(0===ae)break e;ae--,oe+=ee[re++]<<ue,ue+=8}r.head&&(r.head.time=oe),512&r.flags&&(xe[0]=255&oe,xe[1]=oe>>>8&255,xe[2]=oe>>>16&255,xe[3]=oe>>>24&255,r.check=a(r.check,xe,4,0)),oe=0,ue=0,r.mode=P;case P:for(;ue<16;){if(0===ae)break e;ae--,oe+=ee[re++]<<ue,ue+=8}r.head&&(r.head.xflags=255&oe,r.head.os=oe>>8),512&r.flags&&(xe[0]=255&oe,xe[1]=oe>>>8&255,r.check=a(r.check,xe,2,0)),oe=0,ue=0,r.mode=E;case E:if(1024&r.flags){for(;ue<16;){if(0===ae)break e;ae--,oe+=ee[re++]<<ue,ue+=8}r.length=oe,r.head&&(r.head.extra_len=oe),512&r.flags&&(xe[0]=255&oe,xe[1]=oe>>>8&255,r.check=a(r.check,xe,2,0)),oe=0,ue=0}else r.head&&(r.head.extra=null);r.mode=x;case x:if(1024&r.flags&&((fe=r.length)>ae&&(fe=ae),fe&&(r.head&&(ke=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),n.arraySet(r.head.extra,ee,re,fe,ke)),512&r.flags&&(r.check=a(r.check,ee,fe,re)),ae-=fe,re+=fe,r.length-=fe),r.length))break e;r.length=0,r.mode=M;case M:if(2048&r.flags){if(0===ae)break e;fe=0;do{ke=ee[re+fe++],r.head&&ke&&r.length<65536&&(r.head.name+=String.fromCharCode(ke))}while(ke&&fe<ae);if(512&r.flags&&(r.check=a(r.check,ee,fe,re)),ae-=fe,re+=fe,ke)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=K;case K:if(4096&r.flags){if(0===ae)break e;fe=0;do{ke=ee[re+fe++],r.head&&ke&&r.length<65536&&(r.head.comment+=String.fromCharCode(ke))}while(ke&&fe<ae);if(512&r.flags&&(r.check=a(r.check,ee,fe,re)),ae-=fe,re+=fe,ke)break e}else r.head&&(r.head.comment=null);r.mode=U;case U:if(512&r.flags){for(;ue<16;){if(0===ae)break e;ae--,oe+=ee[re++]<<ue,ue+=8}if(oe!==(65535&r.check)){e.msg="header crc mismatch",r.mode=Q;break}oe=0,ue=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=T;break;case C:for(;ue<32;){if(0===ae)break e;ae--,oe+=ee[re++]<<ue,ue+=8}e.adler=r.check=ne(oe),oe=0,ue=0,r.mode=R;case R:if(0===r.havedict)return e.next_out=ie,e.avail_out=se,e.next_in=re,e.avail_in=ae,r.hold=oe,r.bits=ue,m;e.adler=r.check=1,r.mode=T;case T:if(t===d||t===h)break e;case j:if(r.last){oe>>>=7&ue,ue-=7&ue,r.mode=V;break}for(;ue<3;){if(0===ae)break e;ae--,oe+=ee[re++]<<ue,ue+=8}switch(r.last=1&oe,ue-=1,3&(oe>>>=1)){case 0:r.mode=O;break;case 1:if(de(r),r.mode=L,t===h){oe>>>=2,ue-=2;break e}break;case 2:r.mode=z;break;case 3:e.msg="invalid block type",r.mode=Q}oe>>>=2,ue-=2;break;case O:for(oe>>>=7&ue,ue-=7&ue;ue<32;){if(0===ae)break e;ae--,oe+=ee[re++]<<ue,ue+=8}if((65535&oe)!=(oe>>>16^65535)){e.msg="invalid stored block lengths",r.mode=Q;break}if(r.length=65535&oe,oe=0,ue=0,r.mode=B,t===h)break e;case B:r.mode=I;case I:if(fe=r.length){if(fe>ae&&(fe=ae),fe>se&&(fe=se),0===fe)break e;n.arraySet(te,ee,re,fe,ie),ae-=fe,re+=fe,se-=fe,ie+=fe,r.length-=fe;break}r.mode=T;break;case z:for(;ue<14;){if(0===ae)break e;ae--,oe+=ee[re++]<<ue,ue+=8}if(r.nlen=257+(31&oe),oe>>>=5,ue-=5,r.ndist=1+(31&oe),oe>>>=5,ue-=5,r.ncode=4+(15&oe),oe>>>=4,ue-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=Q;break}r.have=0,r.mode=D;case D:for(;r.have<r.ncode;){for(;ue<3;){if(0===ae)break e;ae--,oe+=ee[re++]<<ue,ue+=8}r.lens[Me[r.have++]]=7&oe,oe>>>=3,ue-=3}for(;r.have<19;)r.lens[Me[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,Se={bits:r.lenbits},Ae=o(u,r.lens,0,19,r.lencode,0,r.work,Se),r.lenbits=Se.bits,Ae){e.msg="invalid code lengths set",r.mode=Q;break}r.have=0,r.mode=N;case N:for(;r.have<r.nlen+r.ndist;){for(;ge=(Ee=r.lencode[oe&(1<<r.lenbits)-1])>>>16&255,we=65535&Ee,!((me=Ee>>>24)<=ue);){if(0===ae)break e;ae--,oe+=ee[re++]<<ue,ue+=8}if(we<16)oe>>>=me,ue-=me,r.lens[r.have++]=we;else{if(16===we){for(Pe=me+2;ue<Pe;){if(0===ae)break e;ae--,oe+=ee[re++]<<ue,ue+=8}if(oe>>>=me,ue-=me,0===r.have){e.msg="invalid bit length repeat",r.mode=Q;break}ke=r.lens[r.have-1],fe=3+(3&oe),oe>>>=2,ue-=2}else if(17===we){for(Pe=me+3;ue<Pe;){if(0===ae)break e;ae--,oe+=ee[re++]<<ue,ue+=8}ue-=me,ke=0,fe=3+(7&(oe>>>=me)),oe>>>=3,ue-=3}else{for(Pe=me+7;ue<Pe;){if(0===ae)break e;ae--,oe+=ee[re++]<<ue,ue+=8}ue-=me,ke=0,fe=11+(127&(oe>>>=me)),oe>>>=7,ue-=7}if(r.have+fe>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=Q;break}for(;fe--;)r.lens[r.have++]=ke}}if(r.mode===Q)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=Q;break}if(r.lenbits=9,Se={bits:r.lenbits},Ae=o(l,r.lens,0,r.nlen,r.lencode,0,r.work,Se),r.lenbits=Se.bits,Ae){e.msg="invalid literal/lengths set",r.mode=Q;break}if(r.distbits=6,r.distcode=r.distdyn,Se={bits:r.distbits},Ae=o(c,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,Se),r.distbits=Se.bits,Ae){e.msg="invalid distances set",r.mode=Q;break}if(r.mode=L,t===h)break e;case L:r.mode=q;case q:if(ae>=6&&se>=258){e.next_out=ie,e.avail_out=se,e.next_in=re,e.avail_in=ae,r.hold=oe,r.bits=ue,s(e,ce),ie=e.next_out,te=e.output,se=e.avail_out,re=e.next_in,ee=e.input,ae=e.avail_in,oe=r.hold,ue=r.bits,r.mode===T&&(r.back=-1);break}for(r.back=0;ge=(Ee=r.lencode[oe&(1<<r.lenbits)-1])>>>16&255,we=65535&Ee,!((me=Ee>>>24)<=ue);){if(0===ae)break e;ae--,oe+=ee[re++]<<ue,ue+=8}if(ge&&0==(240&ge)){for(be=me,_e=ge,ve=we;ge=(Ee=r.lencode[ve+((oe&(1<<be+_e)-1)>>be)])>>>16&255,we=65535&Ee,!(be+(me=Ee>>>24)<=ue);){if(0===ae)break e;ae--,oe+=ee[re++]<<ue,ue+=8}oe>>>=be,ue-=be,r.back+=be}if(oe>>>=me,ue-=me,r.back+=me,r.length=we,0===ge){r.mode=G;break}if(32&ge){r.back=-1,r.mode=T;break}if(64&ge){e.msg="invalid literal/length code",r.mode=Q;break}r.extra=15&ge,r.mode=F;case F:if(r.extra){for(Pe=r.extra;ue<Pe;){if(0===ae)break e;ae--,oe+=ee[re++]<<ue,ue+=8}r.length+=oe&(1<<r.extra)-1,oe>>>=r.extra,ue-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=H;case H:for(;ge=(Ee=r.distcode[oe&(1<<r.distbits)-1])>>>16&255,we=65535&Ee,!((me=Ee>>>24)<=ue);){if(0===ae)break e;ae--,oe+=ee[re++]<<ue,ue+=8}if(0==(240&ge)){for(be=me,_e=ge,ve=we;ge=(Ee=r.distcode[ve+((oe&(1<<be+_e)-1)>>be)])>>>16&255,we=65535&Ee,!(be+(me=Ee>>>24)<=ue);){if(0===ae)break e;ae--,oe+=ee[re++]<<ue,ue+=8}oe>>>=be,ue-=be,r.back+=be}if(oe>>>=me,ue-=me,r.back+=me,64&ge){e.msg="invalid distance code",r.mode=Q;break}r.offset=we,r.extra=15&ge,r.mode=W;case W:if(r.extra){for(Pe=r.extra;ue<Pe;){if(0===ae)break e;ae--,oe+=ee[re++]<<ue,ue+=8}r.offset+=oe&(1<<r.extra)-1,oe>>>=r.extra,ue-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=Q;break}r.mode=Z;case Z:if(0===se)break e;if(fe=ce-se,r.offset>fe){if((fe=r.offset-fe)>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=Q;break}fe>r.wnext?(fe-=r.wnext,pe=r.wsize-fe):pe=r.wnext-fe,fe>r.length&&(fe=r.length),ye=r.window}else ye=te,pe=ie-r.offset,fe=r.length;fe>se&&(fe=se),se-=fe,r.length-=fe;do{te[ie++]=ye[pe++]}while(--fe);0===r.length&&(r.mode=q);break;case G:if(0===se)break e;te[ie++]=r.length,se--,r.mode=q;break;case V:if(r.wrap){for(;ue<32;){if(0===ae)break e;ae--,oe|=ee[re++]<<ue,ue+=8}if(ce-=se,e.total_out+=ce,r.total+=ce,ce&&(e.adler=r.check=r.flags?a(r.check,te,ce,ie-ce):i(r.check,te,ce,ie-ce)),ce=se,(r.flags?oe:ne(oe))!==r.check){e.msg="incorrect data check",r.mode=Q;break}oe=0,ue=0}r.mode=Y;case Y:if(r.wrap&&r.flags){for(;ue<32;){if(0===ae)break e;ae--,oe+=ee[re++]<<ue,ue+=8}if(oe!==(4294967295&r.total)){e.msg="incorrect length check",r.mode=Q;break}oe=0,ue=0}r.mode=$;case $:Ae=y;break e;case Q:Ae=w;break e;case X:return b;case J:default:return g}return e.next_out=ie,e.avail_out=se,e.next_in=re,e.avail_in=ae,r.hold=oe,r.bits=ue,(r.wsize||ce!==e.avail_out&&r.mode<Q&&(r.mode<V||t!==f))&&he(e,e.output,e.next_out,ce-e.avail_out)?(r.mode=X,b):(le-=e.avail_in,ce-=e.avail_out,e.total_in+=le,e.total_out+=ce,r.total+=ce,r.wrap&&ce&&(e.adler=r.check=r.flags?a(r.check,te,ce,e.next_out-ce):i(r.check,te,ce,e.next_out-ce)),e.data_type=r.bits+(r.last?64:0)+(r.mode===T?128:0)+(r.mode===L||r.mode===B?256:0),(0===le&&0===ce||t===f)&&Ae===p&&(Ae=_),Ae)},r.inflateEnd=function(e){if(!e||!e.state)return g;var t=e.state;return t.window&&(t.window=null),e.state=null,p},r.inflateGetHeader=function(e,t){var r;return e&&e.state?0==(2&(r=e.state).wrap)?g:(r.head=t,t.done=!1,p):g},r.inflateSetDictionary=function(e,t){var r,n=t.length;return e&&e.state?0!==(r=e.state).wrap&&r.mode!==R?g:r.mode===R&&i(1,t,n,0)!==r.check?w:he(e,t,n,n)?(r.mode=X,b):(r.havedict=1,p):g},r.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":31,"./adler32":33,"./crc32":35,"./inffast":38,"./inftrees":40}],40:[function(e,t,r){"use strict";var n=e("../utils/common"),i=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],a=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],s=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],o=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];t.exports=function(e,t,r,u,l,c,f,d){var h,p,y,m,g,w,b,_,v,k=d.bits,A=0,S=0,P=0,E=0,x=0,M=0,K=0,U=0,C=0,R=0,T=null,j=0,O=new n.Buf16(16),B=new n.Buf16(16),I=null,z=0;for(A=0;A<=15;A++)O[A]=0;for(S=0;S<u;S++)O[t[r+S]]++;for(x=k,E=15;E>=1&&0===O[E];E--);if(x>E&&(x=E),0===E)return l[c++]=20971520,l[c++]=20971520,d.bits=1,0;for(P=1;P<E&&0===O[P];P++);for(x<P&&(x=P),U=1,A=1;A<=15;A++)if(U<<=1,(U-=O[A])<0)return-1;if(U>0&&(0===e||1!==E))return-1;for(B[1]=0,A=1;A<15;A++)B[A+1]=B[A]+O[A];for(S=0;S<u;S++)0!==t[r+S]&&(f[B[t[r+S]]++]=S);if(0===e?(T=I=f,w=19):1===e?(T=i,j-=257,I=a,z-=257,w=256):(T=s,I=o,w=-1),R=0,S=0,A=P,g=c,M=x,K=0,y=-1,m=(C=1<<x)-1,1===e&&C>852||2===e&&C>592)return 1;for(;;){b=A-K,f[S]<w?(_=0,v=f[S]):f[S]>w?(_=I[z+f[S]],v=T[j+f[S]]):(_=96,v=0),h=1<<A-K,P=p=1<<M;do{l[g+(R>>K)+(p-=h)]=b<<24|_<<16|v|0}while(0!==p);for(h=1<<A-1;R&h;)h>>=1;if(0!==h?(R&=h-1,R+=h):R=0,S++,0==--O[A]){if(A===E)break;A=t[r+f[S]]}if(A>x&&(R&m)!==y){for(0===K&&(K=x),g+=P,U=1<<(M=A-K);M+K<E&&!((U-=O[M+K])<=0);)M++,U<<=1;if(C+=1<<M,1===e&&C>852||2===e&&C>592)return 1;l[y=R&m]=x<<24|M<<16|g-c|0}}return 0!==R&&(l[g+R]=A-K<<24|64<<16|0),d.bits=x,0}},{"../utils/common":31}],41:[function(e,t,r){"use strict";t.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"}},{}],42:[function(e,t,r){"use strict";var n=e("../utils/common"),i=4,a=0,s=1,o=2;function u(e){for(var t=e.length;--t>=0;)e[t]=0}var l=0,c=1,f=2,d=29,h=256,p=h+1+d,y=30,m=19,g=2*p+1,w=15,b=16,_=7,v=256,k=16,A=17,S=18,P=[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],E=[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],M=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],K=new Array(2*(p+2));u(K);var U=new Array(2*y);u(U);var C=new Array(512);u(C);var R=new Array(256);u(R);var T=new Array(d);u(T);var j,O,B,I=new Array(y);function z(e,t,r,n,i){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=e&&e.length}function D(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function N(e){return e<256?C[e]:C[256+(e>>>7)]}function L(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>b-r?(e.bi_buf|=t<<e.bi_valid&65535,L(e,e.bi_buf),e.bi_buf=t>>b-e.bi_valid,e.bi_valid+=r-b):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=r)}function F(e,t,r){q(e,r[2*t],r[2*t+1])}function H(e,t){var r=0;do{r|=1&e,e>>>=1,r<<=1}while(--t>0);return r>>>1}function W(e,t,r){var n,i,a=new Array(w+1),s=0;for(n=1;n<=w;n++)a[n]=s=s+r[n-1]<<1;for(i=0;i<=t;i++){var o=e[2*i+1];0!==o&&(e[2*i]=H(a[o]++,o))}}function Z(e){var t;for(t=0;t<p;t++)e.dyn_ltree[2*t]=0;for(t=0;t<y;t++)e.dyn_dtree[2*t]=0;for(t=0;t<m;t++)e.bl_tree[2*t]=0;e.dyn_ltree[2*v]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function G(e){e.bi_valid>8?L(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,n){var i=2*t,a=2*r;return e[i]<e[a]||e[i]===e[a]&&n[t]<=n[r]}function Y(e,t,r){for(var n=e.heap[r],i=r<<1;i<=e.heap_len&&(i<e.heap_len&&V(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!V(t,n,e.heap[i],e.depth));)e.heap[r]=e.heap[i],r=i,i<<=1;e.heap[r]=n}function $(e,t,r){var n,i,a,s,o=0;if(0!==e.last_lit)do{n=e.pending_buf[e.d_buf+2*o]<<8|e.pending_buf[e.d_buf+2*o+1],i=e.pending_buf[e.l_buf+o],o++,0===n?F(e,i,t):(F(e,(a=R[i])+h+1,t),0!==(s=P[a])&&q(e,i-=T[a],s),F(e,a=N(--n),r),0!==(s=E[a])&&q(e,n-=I[a],s))}while(o<e.last_lit);F(e,v,t)}function Q(e,t){var r,n,i,a=t.dyn_tree,s=t.stat_desc.static_tree,o=t.stat_desc.has_stree,u=t.stat_desc.elems,l=-1;for(e.heap_len=0,e.heap_max=g,r=0;r<u;r++)0!==a[2*r]?(e.heap[++e.heap_len]=l=r,e.depth[r]=0):a[2*r+1]=0;for(;e.heap_len<2;)a[2*(i=e.heap[++e.heap_len]=l<2?++l:0)]=1,e.depth[i]=0,e.opt_len--,o&&(e.static_len-=s[2*i+1]);for(t.max_code=l,r=e.heap_len>>1;r>=1;r--)Y(e,a,r);i=u;do{r=e.heap[1],e.heap[1]=e.heap[e.heap_len--],Y(e,a,1),n=e.heap[1],e.heap[--e.heap_max]=r,e.heap[--e.heap_max]=n,a[2*i]=a[2*r]+a[2*n],e.depth[i]=(e.depth[r]>=e.depth[n]?e.depth[r]:e.depth[n])+1,a[2*r+1]=a[2*n+1]=i,e.heap[1]=i++,Y(e,a,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var r,n,i,a,s,o,u=t.dyn_tree,l=t.max_code,c=t.stat_desc.static_tree,f=t.stat_desc.has_stree,d=t.stat_desc.extra_bits,h=t.stat_desc.extra_base,p=t.stat_desc.max_length,y=0;for(a=0;a<=w;a++)e.bl_count[a]=0;for(u[2*e.heap[e.heap_max]+1]=0,r=e.heap_max+1;r<g;r++)(a=u[2*u[2*(n=e.heap[r])+1]+1]+1)>p&&(a=p,y++),u[2*n+1]=a,n>l||(e.bl_count[a]++,s=0,n>=h&&(s=d[n-h]),o=u[2*n],e.opt_len+=o*(a+s),f&&(e.static_len+=o*(c[2*n+1]+s)));if(0!==y){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]--,y-=2}while(y>0);for(a=p;0!==a;a--)for(n=e.bl_count[a];0!==n;)(i=e.heap[--r])>l||(u[2*i+1]!==a&&(e.opt_len+=(a-u[2*i+1])*u[2*i],u[2*i+1]=a),n--)}}(e,t),W(a,l,e.bl_count)}function X(e,t,r){var n,i,a=-1,s=t[1],o=0,u=7,l=4;for(0===s&&(u=138,l=3),t[2*(r+1)+1]=65535,n=0;n<=r;n++)i=s,s=t[2*(n+1)+1],++o<u&&i===s||(o<l?e.bl_tree[2*i]+=o:0!==i?(i!==a&&e.bl_tree[2*i]++,e.bl_tree[2*k]++):o<=10?e.bl_tree[2*A]++:e.bl_tree[2*S]++,o=0,a=i,0===s?(u=138,l=3):i===s?(u=6,l=3):(u=7,l=4))}function J(e,t,r){var n,i,a=-1,s=t[1],o=0,u=7,l=4;for(0===s&&(u=138,l=3),n=0;n<=r;n++)if(i=s,s=t[2*(n+1)+1],!(++o<u&&i===s)){if(o<l)do{F(e,i,e.bl_tree)}while(0!=--o);else 0!==i?(i!==a&&(F(e,i,e.bl_tree),o--),F(e,k,e.bl_tree),q(e,o-3,2)):o<=10?(F(e,A,e.bl_tree),q(e,o-3,3)):(F(e,S,e.bl_tree),q(e,o-11,7));o=0,a=i,0===s?(u=138,l=3):i===s?(u=6,l=3):(u=7,l=4)}}u(I);var ee=!1;function te(e,t,r,i){q(e,(l<<1)+(i?1:0),3),function(e,t,r,i){G(e),i&&(L(e,r),L(e,~r)),n.arraySet(e.pending_buf,e.window,t,r,e.pending),e.pending+=r}(e,t,r,!0)}r._tr_init=function(e){ee||(function(){var e,t,r,n,i,a=new Array(w+1);for(r=0,n=0;n<d-1;n++)for(T[n]=r,e=0;e<1<<P[n];e++)R[r++]=n;for(R[r-1]=n,i=0,n=0;n<16;n++)for(I[n]=i,e=0;e<1<<E[n];e++)C[i++]=n;for(i>>=7;n<y;n++)for(I[n]=i<<7,e=0;e<1<<E[n]-7;e++)C[256+i++]=n;for(t=0;t<=w;t++)a[t]=0;for(e=0;e<=143;)K[2*e+1]=8,e++,a[8]++;for(;e<=255;)K[2*e+1]=9,e++,a[9]++;for(;e<=279;)K[2*e+1]=7,e++,a[7]++;for(;e<=287;)K[2*e+1]=8,e++,a[8]++;for(W(K,p+1,a),e=0;e<y;e++)U[2*e+1]=5,U[2*e]=H(e,5);j=new z(K,P,h+1,p,w),O=new z(U,E,0,y,w),B=new z(new Array(0),x,0,m,_)}(),ee=!0),e.l_desc=new D(e.dyn_ltree,j),e.d_desc=new D(e.dyn_dtree,O),e.bl_desc=new D(e.bl_tree,B),e.bi_buf=0,e.bi_valid=0,Z(e)},r._tr_stored_block=te,r._tr_flush_block=function(e,t,r,n){var u,l,d=0;e.level>0?(e.strm.data_type===o&&(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 s;for(t=32;t<h;t++)if(0!==e.dyn_ltree[2*t])return s;return a}(e)),Q(e,e.l_desc),Q(e,e.d_desc),d=function(e){var t;for(X(e,e.dyn_ltree,e.l_desc.max_code),X(e,e.dyn_dtree,e.d_desc.max_code),Q(e,e.bl_desc),t=m-1;t>=3&&0===e.bl_tree[2*M[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),u=e.opt_len+3+7>>>3,(l=e.static_len+3+7>>>3)<=u&&(u=l)):u=l=r+5,r+4<=u&&-1!==t?te(e,t,r,n):e.strategy===i||l===u?(q(e,(c<<1)+(n?1:0),3),$(e,K,U)):(q(e,(f<<1)+(n?1:0),3),function(e,t,r,n){var i;for(q(e,t-257,5),q(e,r-1,5),q(e,n-4,4),i=0;i<n;i++)q(e,e.bl_tree[2*M[i]+1],3);J(e,e.dyn_ltree,t-1),J(e,e.dyn_dtree,r-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,d+1),$(e,e.dyn_ltree,e.dyn_dtree)),Z(e),n&&G(e)},r._tr_tally=function(e,t,r){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>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*(R[r]+h+1)]++,e.dyn_dtree[2*N(t)]++),e.last_lit===e.lit_bufsize-1},r._tr_align=function(e){q(e,c<<1,3),F(e,v,K),function(e){16===e.bi_valid?(L(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)}},{"../utils/common":31}],43:[function(e,t,r){"use strict";t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],44:[function(e,t,r){var n,i,a=t.exports={};function s(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function u(e){if(n===setTimeout)return setTimeout(e,0);if((n===s||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:s}catch(e){n=s}try{i="function"==typeof clearTimeout?clearTimeout:o}catch(e){i=o}}();var l,c=[],f=!1,d=-1;function h(){f&&l&&(f=!1,l.length?c=l.concat(c):d=-1,c.length&&p())}function p(){if(!f){var e=u(h);f=!0;for(var t=c.length;t;){for(l=c,c=[];++d<t;)l&&l[d].run();d=-1,t=c.length}l=null,f=!1,function(e){if(i===clearTimeout)return clearTimeout(e);if((i===o||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(e);try{i(e)}catch(t){try{return i.call(null,e)}catch(t){return i.call(this,e)}}}(e)}}function y(e,t){this.fun=e,this.array=t}function m(){}a.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];c.push(new y(e,t)),1!==c.length||f||u(p)},y.prototype.run=function(){this.fun.apply(null,this.array)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={},a.on=m,a.addListener=m,a.once=m,a.off=m,a.removeListener=m,a.removeAllListeners=m,a.emit=m,a.prependListener=m,a.prependOnceListener=m,a.listeners=function(e){return[]},a.binding=function(e){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(e){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}},{}],45:[function(e,t,r){"use strict";var n=[0,1,3,7,15,31,63,127,255],i=function(e){this.stream=e,this.bitOffset=0,this.curByte=0,this.hasByte=!1};i.prototype._ensureByte=function(){this.hasByte||(this.curByte=this.stream.readByte(),this.hasByte=!0)},i.prototype.read=function(e){for(var t=0;e>0;){this._ensureByte();var r=8-this.bitOffset;if(e>=r)t<<=r,t|=n[r]&this.curByte,this.hasByte=!1,this.bitOffset=0,e-=r;else{t<<=e;var i=r-e;t|=(this.curByte&n[e]<<i)>>i,this.bitOffset+=e,e=0}}return t},i.prototype.seek=function(e){var t=e%8,r=(e-t)/8;this.bitOffset=t,this.stream.seek(r),this.hasByte=!1},i.prototype.pi=function(){var e,t=new Uint8Array(6);for(e=0;e<t.length;e++)t[e]=this.read(8);return function(e){return Array.prototype.map.call(e,e=>("00"+e.toString(16)).slice(-2)).join("")}(t)},t.exports=i},{}],46:[function(e,t,r){"use strict";var n;t.exports=(n=new Uint32Array([0,79764919,159529838,222504665,319059676,398814059,445009330,507990021,638119352,583659535,797628118,726387553,890018660,835552979,1015980042,944750013,1276238704,1221641927,1167319070,1095957929,1595256236,1540665371,1452775106,1381403509,1780037320,1859660671,1671105958,1733955601,2031960084,2111593891,1889500026,1952343757,2552477408,2632100695,2443283854,2506133561,2334638140,2414271883,2191915858,2254759653,3190512472,3135915759,3081330742,3009969537,2905550212,2850959411,2762807018,2691435357,3560074640,3505614887,3719321342,3648080713,3342211916,3287746299,3467911202,3396681109,4063920168,4143685023,4223187782,4286162673,3779000052,3858754371,3904687514,3967668269,881225847,809987520,1023691545,969234094,662832811,591600412,771767749,717299826,311336399,374308984,453813921,533576470,25881363,88864420,134795389,214552010,2023205639,2086057648,1897238633,1976864222,1804852699,1867694188,1645340341,1724971778,1587496639,1516133128,1461550545,1406951526,1302016099,1230646740,1142491917,1087903418,2896545431,2825181984,2770861561,2716262478,3215044683,3143675388,3055782693,3001194130,2326604591,2389456536,2200899649,2280525302,2578013683,2640855108,2418763421,2498394922,3769900519,3832873040,3912640137,3992402750,4088425275,4151408268,4197601365,4277358050,3334271071,3263032808,3476998961,3422541446,3585640067,3514407732,3694837229,3640369242,1762451694,1842216281,1619975040,1682949687,2047383090,2127137669,1938468188,2001449195,1325665622,1271206113,1183200824,1111960463,1543535498,1489069629,1434599652,1363369299,622672798,568075817,748617968,677256519,907627842,853037301,1067152940,995781531,51762726,131386257,177728840,240578815,269590778,349224269,429104020,491947555,4046411278,4126034873,4172115296,4234965207,3794477266,3874110821,3953728444,4016571915,3609705398,3555108353,3735388376,3664026991,3290680682,3236090077,3449943556,3378572211,3174993278,3120533705,3032266256,2961025959,2923101090,2868635157,2813903052,2742672763,2604032198,2683796849,2461293480,2524268063,2284983834,2364738477,2175806836,2238787779,1569362073,1498123566,1409854455,1355396672,1317987909,1246755826,1192025387,1137557660,2072149281,2135122070,1912620623,1992383480,1753615357,1816598090,1627664531,1707420964,295390185,358241886,404320391,483945776,43990325,106832002,186451547,266083308,932423249,861060070,1041341759,986742920,613929101,542559546,756411363,701822548,3316196985,3244833742,3425377559,3370778784,3601682597,3530312978,3744426955,3689838204,3819031489,3881883254,3928223919,4007849240,4037393693,4100235434,4180117107,4259748804,2310601993,2373574846,2151335527,2231098320,2596047829,2659030626,2470359227,2550115596,2947551409,2876312838,2788305887,2733848168,3165939309,3094707162,3040238851,2985771188]),function(){var e=4294967295;this.getCRC=function(){return~e>>>0},this.updateCRC=function(t){e=e<<8^n[255&(e>>>24^t)]},this.updateCRCRun=function(t,r){for(;r-- >0;)e=e<<8^n[255&(e>>>24^t)]}})},{}],47:[function(e,t,r){"use strict";var n=e("./bitreader"),i=e("./stream"),a=e("./crc32"),s=function(e,t){var r,n=e[t];for(r=t;r>0;r--)e[r]=e[r-1];return e[0]=n,n},o={OK:0,LAST_BLOCK:-1,NOT_BZIP_DATA:-2,UNEXPECTED_INPUT_EOF:-3,UNEXPECTED_OUTPUT_EOF:-4,DATA_ERROR:-5,OUT_OF_MEMORY:-6,OBSOLETE_INPUT:-7,END_OF_BLOCK:-8},u={};u[o.LAST_BLOCK]="Bad file checksum",u[o.NOT_BZIP_DATA]="Not bzip data",u[o.UNEXPECTED_INPUT_EOF]="Unexpected input EOF",u[o.UNEXPECTED_OUTPUT_EOF]="Unexpected output EOF",u[o.DATA_ERROR]="Data error",u[o.OUT_OF_MEMORY]="Out of memory",u[o.OBSOLETE_INPUT]="Obsolete (pre 0.9.5) bzip format not supported.";var l=function(e,t){var r=u[e]||"unknown error";t&&(r+=": "+t);var n=new TypeError(r);throw n.errorCode=e,n},c=function(e,t){this.writePos=this.writeCurrent=this.writeCount=0,this._start_bunzip(e,t)};c.prototype._init_block=function(){return this._get_next_block()?(this.blockCRC=new a,!0):(this.writeCount=-1,!1)},c.prototype._start_bunzip=function(e,t){var r=new Uint8Array(4);4===e.read(r,0,4)&&"BZh"===String.fromCharCode(r[0],r[1],r[2])||l(o.NOT_BZIP_DATA,"bad magic");var i=r[3]-48;(i<1||i>9)&&l(o.NOT_BZIP_DATA,"level out of range"),this.reader=new n(e),this.dbufSize=1e5*i,this.nextoutput=0,this.outputStream=t,this.streamCRC=0},c.prototype._get_next_block=function(){var e,t,r,n=this.reader,i=n.pi();if("177245385090"===i)return!1;"314159265359"!==i&&l(o.NOT_BZIP_DATA),this.targetBlockCRC=n.read(32)>>>0,this.streamCRC=(this.targetBlockCRC^(this.streamCRC<<1|this.streamCRC>>>31))>>>0,n.read(1)&&l(o.OBSOLETE_INPUT);var a=n.read(24);a>this.dbufSize&&l(o.DATA_ERROR,"initial position out of bounds");var u=n.read(16),c=new Uint8Array(256),f=0;for(e=0;e<16;e++)if(u&1<<15-e){var d=16*e;for(r=n.read(16),t=0;t<16;t++)r&1<<15-t&&(c[f++]=d+t)}var h=n.read(3);(h<2||h>6)&&l(o.DATA_ERROR);var p=n.read(15);0===p&&l(o.DATA_ERROR);var y=new Uint8Array(256);for(e=0;e<h;e++)y[e]=e;var m=new Uint8Array(p);for(e=0;e<p;e++){for(t=0;n.read(1);t++)t>=h&&l(o.DATA_ERROR);m[e]=s(y,t)}var g,w=f+2,b=[];for(t=0;t<h;t++){var _,v,k=new Uint8Array(w),A=new Uint16Array(21);for(u=n.read(5),e=0;e<w;e++){for(;(u<1||u>20)&&l(o.DATA_ERROR),n.read(1);)n.read(1)?u--:u++;k[e]=u}for(_=v=k[0],e=1;e<w;e++)k[e]>v?v=k[e]:k[e]<_&&(_=k[e]);g={},b.push(g),g.permute=new Uint16Array(258),g.limit=new Uint32Array(22),g.base=new Uint32Array(21),g.minLen=_,g.maxLen=v;var S=0;for(e=_;e<=v;e++)for(A[e]=g.limit[e]=0,u=0;u<w;u++)k[u]===e&&(g.permute[S++]=u);for(e=0;e<w;e++)A[k[e]]++;for(S=u=0,e=_;e<v;e++)S+=A[e],g.limit[e]=S-1,S<<=1,u+=A[e],g.base[e+1]=S-u;g.limit[v+1]=Number.MAX_VALUE,g.limit[v]=S+A[v]-1,g.base[_]=0}var P=new Uint32Array(256);for(e=0;e<256;e++)y[e]=e;var E,x=0,M=0,K=0,U=this.dbuf=new Uint32Array(this.dbufSize);for(w=0;;){for(w--||(w=49,K>=p&&l(o.DATA_ERROR),g=b[m[K++]]),e=g.minLen,t=n.read(e);e>g.maxLen&&l(o.DATA_ERROR),!(t<=g.limit[e]);e++)t=t<<1|n.read(1);((t-=g.base[e])<0||t>=258)&&l(o.DATA_ERROR);var C=g.permute[t];if(0!==C&&1!==C){if(x)for(x=0,M+u>this.dbufSize&&l(o.DATA_ERROR),P[E=c[y[0]]]+=u;u--;)U[M++]=E;if(C>f)break;M>=this.dbufSize&&l(o.DATA_ERROR),P[E=c[E=s(y,e=C-1)]]++,U[M++]=E}else x||(x=1,u=0),u+=0===C?x:2*x,x<<=1}for((a<0||a>=M)&&l(o.DATA_ERROR),t=0,e=0;e<256;e++)r=t+P[e],P[e]=t,t=r;for(e=0;e<M;e++)U[P[E=255&U[e]]]|=e<<8,P[E]++;var R=0,T=0,j=0;return M&&(T=255&(R=U[a]),R>>=8,j=-1),this.writePos=R,this.writeCurrent=T,this.writeCount=M,this.writeRun=j,!0},c.prototype._read_bunzip=function(e,t){var r,n,i;if(this.writeCount<0)return 0;for(var a=this.dbuf,s=this.writePos,u=this.writeCurrent,c=this.writeCount,f=(this.outputsize,this.writeRun);c;){for(c--,n=u,u=255&(s=a[s]),s>>=8,3==f++?(r=u,i=n,u=-1):(r=1,i=u),this.blockCRC.updateCRCRun(i,r);r--;)this.outputStream.writeByte(i),this.nextoutput++;u!=n&&(f=0)}return this.writeCount=c,this.blockCRC.getCRC()!==this.targetBlockCRC&&l(o.DATA_ERROR,"Bad block CRC (got "+this.blockCRC.getCRC().toString(16)+" expected "+this.targetBlockCRC.toString(16)+")"),this.nextoutput};var f=function(e){if("readByte"in e)return e;var t=new i;return t.pos=0,t.readByte=function(){return e[this.pos++]},t.seek=function(e){this.pos=e},t.eof=function(){return this.pos>=e.length},t},d=function(e){var t=new i,r=!0;if(e)if("number"==typeof e)t.buffer=new Uint8Array(e),r=!1;else{if("writeByte"in e)return e;t.buffer=e,r=!1}else t.buffer=new Uint8Array(16384);return t.pos=0,t.writeByte=function(e){if(r&&this.pos>=this.buffer.length){var t=new Uint8Array(2*this.buffer.length);t.set(this.buffer),this.buffer=t}this.buffer[this.pos++]=e},t.getBuffer=function(){if(this.pos!==this.buffer.length){if(!r)throw new TypeError("outputsize does not match decoded input");var e=new Uint8Array(this.pos);e.set(this.buffer.subarray(0,this.pos)),this.buffer=e}return this.buffer},t._coerced=!0,t};c.Err=o,c.decode=function(e,t,r){for(var n=f(e),i=d(t),a=new c(n,i);!("eof"in n&&n.eof());)if(a._init_block())a._read_bunzip();else{var s=a.reader.read(32)>>>0;if(s!==a.streamCRC&&l(o.DATA_ERROR,"Bad stream CRC (got "+a.streamCRC.toString(16)+" expected "+s.toString(16)+")"),!(r&&"eof"in n)||n.eof())break;a._start_bunzip(n,i)}if("getBuffer"in i)return i.getBuffer()},c.decodeBlock=function(e,t,r){var n=f(e),i=d(r),s=new c(n,i);if(s.reader.seek(t),s._get_next_block()&&(s.blockCRC=new a,s.writeCopies=0,s._read_bunzip()),"getBuffer"in i)return i.getBuffer()},c.table=function(e,t,r){var n=new i;n.delegate=f(e),n.pos=0,n.readByte=function(){return this.pos++,this.delegate.readByte()},n.delegate.eof&&(n.eof=n.delegate.eof.bind(n.delegate));var a=new i;a.pos=0,a.writeByte=function(){this.pos++};for(var s=new c(n,a),o=s.dbufSize;!("eof"in n&&n.eof());){var u=8*n.pos+s.reader.bitOffset;if(s.reader.hasByte&&(u-=8),s._init_block()){var l=a.pos;s._read_bunzip(),t(u,a.pos-l)}else{s.reader.read(32);if(!(r&&"eof"in n)||n.eof())break;s._start_bunzip(n,a),console.assert(s.dbufSize===o,"shouldn't change block size within multistream file")}}},c.Stream=i,t.exports=c},{"./bitreader":45,"./crc32":46,"./stream":48}],48:[function(e,t,r){"use strict";var n=function(){};n.prototype.readByte=function(){throw new Error("abstract method readByte() not implemented")},n.prototype.read=function(e,t,r){for(var n=0;n<r;){var i=this.readByte();if(i<0)return 0===n?-1:n;e[t++]=i,n++}return n},n.prototype.seek=function(e){throw new Error("abstract method seek() not implemented")},n.prototype.writeByte=function(e){throw new Error("abstract method readByte() not implemented")},n.prototype.write=function(e,t,r){var n;for(n=0;n<r;n++)this.writeByte(e[t++]);return r},n.prototype.flush=function(){},t.exports=n},{}],49:[function(e,t,r){"use strict";function n(e,t,r){return t<=e&&e<=r}function i(e){if(void 0===e)return{};if(e===Object(e))return e;throw TypeError("Could not convert argument to dictionary")}var a=-1;function s(e){this.tokens=[].slice.call(e)}s.prototype={endOfStream:function(){return!this.tokens.length},read:function(){return this.tokens.length?this.tokens.shift():a},prepend:function(e){if(Array.isArray(e))for(var t=e;t.length;)this.tokens.unshift(t.pop());else this.tokens.unshift(e)},push:function(e){if(Array.isArray(e))for(var t=e;t.length;)this.tokens.push(t.shift());else this.tokens.push(e)}};var o=-1;function u(e,t){if(e)throw TypeError("Decoder error");return t||65533}var l="utf-8";function c(e,t){if(!(this instanceof c))return new c(e,t);if((e=void 0!==e?String(e).toLowerCase():l)!==l)throw new Error("Encoding not supported. Only utf-8 is supported");t=i(t),this._streaming=!1,this._BOMseen=!1,this._decoder=null,this._fatal=Boolean(t.fatal),this._ignoreBOM=Boolean(t.ignoreBOM),Object.defineProperty(this,"encoding",{value:"utf-8"}),Object.defineProperty(this,"fatal",{value:this._fatal}),Object.defineProperty(this,"ignoreBOM",{value:this._ignoreBOM})}function f(e,t){if(!(this instanceof f))return new f(e,t);if((e=void 0!==e?String(e).toLowerCase():l)!==l)throw new Error("Encoding not supported. Only utf-8 is supported");t=i(t),this._streaming=!1,this._encoder=null,this._options={fatal:Boolean(t.fatal)},Object.defineProperty(this,"encoding",{value:"utf-8"})}function d(e){var t=e.fatal,r=0,i=0,s=0,l=128,c=191;this.handler=function(e,f){if(f===a&&0!==s)return s=0,u(t);if(f===a)return o;if(0===s){if(n(f,0,127))return f;if(n(f,194,223))s=1,r=f-192;else if(n(f,224,239))224===f&&(l=160),237===f&&(c=159),s=2,r=f-224;else{if(!n(f,240,244))return u(t);240===f&&(l=144),244===f&&(c=143),s=3,r=f-240}return r<<=6*s,null}if(!n(f,l,c))return r=s=i=0,l=128,c=191,e.prepend(f),u(t);if(l=128,c=191,r+=f-128<<6*(s-(i+=1)),i!==s)return null;var d=r;return r=s=i=0,d}}function h(e){e.fatal;this.handler=function(e,t){if(t===a)return o;if(n(t,0,127))return t;var r,i;n(t,128,2047)?(r=1,i=192):n(t,2048,65535)?(r=2,i=224):n(t,65536,1114111)&&(r=3,i=240);for(var s=[(t>>6*r)+i];r>0;){var u=t>>6*(r-1);s.push(128|63&u),r-=1}return s}}c.prototype={decode:function(e,t){var r;r="object"==typeof e&&e instanceof ArrayBuffer?new Uint8Array(e):"object"==typeof e&&"buffer"in e&&e.buffer instanceof ArrayBuffer?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(0),t=i(t),this._streaming||(this._decoder=new d({fatal:this._fatal}),this._BOMseen=!1),this._streaming=Boolean(t.stream);for(var n,a=new s(r),u=[];!a.endOfStream()&&(n=this._decoder.handler(a,a.read()))!==o;)null!==n&&(Array.isArray(n)?u.push.apply(u,n):u.push(n));if(!this._streaming){do{if((n=this._decoder.handler(a,a.read()))===o)break;null!==n&&(Array.isArray(n)?u.push.apply(u,n):u.push(n))}while(!a.endOfStream());this._decoder=null}return u.length&&(-1===["utf-8"].indexOf(this.encoding)||this._ignoreBOM||this._BOMseen||(65279===u[0]?(this._BOMseen=!0,u.shift()):this._BOMseen=!0)),function(e){for(var t="",r=0;r<e.length;++r){var n=e[r];n<=65535?t+=String.fromCharCode(n):(n-=65536,t+=String.fromCharCode(55296+(n>>10),56320+(1023&n)))}return t}(u)}},f.prototype={encode:function(e,t){e=e?String(e):"",t=i(t),this._streaming||(this._encoder=new h(this._options)),this._streaming=Boolean(t.stream);for(var r,n=[],a=new s(function(e){for(var t=String(e),r=t.length,n=0,i=[];n<r;){var a=t.charCodeAt(n);if(a<55296||a>57343)i.push(a);else if(56320<=a&&a<=57343)i.push(65533);else if(55296<=a&&a<=56319)if(n===r-1)i.push(65533);else{var s=e.charCodeAt(n+1);if(56320<=s&&s<=57343){var o=1023&a,u=1023&s;i.push(65536+(o<<10)+u),n+=1}else i.push(65533)}n+=1}return i}(e));!a.endOfStream()&&(r=this._encoder.handler(a,a.read()))!==o;)Array.isArray(r)?n.push.apply(n,r):n.push(r);if(!this._streaming){for(;(r=this._encoder.handler(a,a.read()))!==o;)Array.isArray(r)?n.push.apply(n,r):n.push(r);this._encoder=null}return new Uint8Array(n)}},r.TextEncoder=f,r.TextDecoder=c},{}],50:[function(e,t,r){!function(t){"use strict";var r=function(e){var t,r=new Float64Array(16);if(e)for(t=0;t<e.length;t++)r[t]=e[t];return r},n=function(){throw new Error("no PRNG")},i=new Uint8Array(32);i[0]=9;var a=r(),s=r([1]),o=r([56129,1]),u=r([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),l=r([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),c=r([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),f=r([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),d=r([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function h(e,t,r,n){return function(e,t,r,n,i){var a,s=0;for(a=0;a<i;a++)s|=e[t+a]^r[n+a];return(1&s-1>>>8)-1}(e,t,r,n,32)}function p(e,t){var r;for(r=0;r<16;r++)e[r]=0|t[r]}function y(e){var t,r,n=1;for(t=0;t<16;t++)r=e[t]+n+65535,n=Math.floor(r/65536),e[t]=r-65536*n;e[0]+=n-1+37*(n-1)}function m(e,t,r){for(var n,i=~(r-1),a=0;a<16;a++)n=i&(e[a]^t[a]),e[a]^=n,t[a]^=n}function g(e,t){var n,i,a,s=r(),o=r();for(n=0;n<16;n++)o[n]=t[n];for(y(o),y(o),y(o),i=0;i<2;i++){for(s[0]=o[0]-65517,n=1;n<15;n++)s[n]=o[n]-65535-(s[n-1]>>16&1),s[n-1]&=65535;s[15]=o[15]-32767-(s[14]>>16&1),a=s[15]>>16&1,s[14]&=65535,m(o,s,1-a)}for(n=0;n<16;n++)e[2*n]=255&o[n],e[2*n+1]=o[n]>>8}function w(e,t){var r=new Uint8Array(32),n=new Uint8Array(32);return g(r,e),g(n,t),h(r,0,n,0)}function b(e){var t=new Uint8Array(32);return g(t,e),1&t[0]}function _(e,t){var r;for(r=0;r<16;r++)e[r]=t[2*r]+(t[2*r+1]<<8);e[15]&=32767}function v(e,t,r){for(var n=0;n<16;n++)e[n]=t[n]+r[n]}function k(e,t,r){for(var n=0;n<16;n++)e[n]=t[n]-r[n]}function A(e,t,r){var n,i,a=0,s=0,o=0,u=0,l=0,c=0,f=0,d=0,h=0,p=0,y=0,m=0,g=0,w=0,b=0,_=0,v=0,k=0,A=0,S=0,P=0,E=0,x=0,M=0,K=0,U=0,C=0,R=0,T=0,j=0,O=0,B=r[0],I=r[1],z=r[2],D=r[3],N=r[4],L=r[5],q=r[6],F=r[7],H=r[8],W=r[9],Z=r[10],G=r[11],V=r[12],Y=r[13],$=r[14],Q=r[15];a+=(n=t[0])*B,s+=n*I,o+=n*z,u+=n*D,l+=n*N,c+=n*L,f+=n*q,d+=n*F,h+=n*H,p+=n*W,y+=n*Z,m+=n*G,g+=n*V,w+=n*Y,b+=n*$,_+=n*Q,s+=(n=t[1])*B,o+=n*I,u+=n*z,l+=n*D,c+=n*N,f+=n*L,d+=n*q,h+=n*F,p+=n*H,y+=n*W,m+=n*Z,g+=n*G,w+=n*V,b+=n*Y,_+=n*$,v+=n*Q,o+=(n=t[2])*B,u+=n*I,l+=n*z,c+=n*D,f+=n*N,d+=n*L,h+=n*q,p+=n*F,y+=n*H,m+=n*W,g+=n*Z,w+=n*G,b+=n*V,_+=n*Y,v+=n*$,k+=n*Q,u+=(n=t[3])*B,l+=n*I,c+=n*z,f+=n*D,d+=n*N,h+=n*L,p+=n*q,y+=n*F,m+=n*H,g+=n*W,w+=n*Z,b+=n*G,_+=n*V,v+=n*Y,k+=n*$,A+=n*Q,l+=(n=t[4])*B,c+=n*I,f+=n*z,d+=n*D,h+=n*N,p+=n*L,y+=n*q,m+=n*F,g+=n*H,w+=n*W,b+=n*Z,_+=n*G,v+=n*V,k+=n*Y,A+=n*$,S+=n*Q,c+=(n=t[5])*B,f+=n*I,d+=n*z,h+=n*D,p+=n*N,y+=n*L,m+=n*q,g+=n*F,w+=n*H,b+=n*W,_+=n*Z,v+=n*G,k+=n*V,A+=n*Y,S+=n*$,P+=n*Q,f+=(n=t[6])*B,d+=n*I,h+=n*z,p+=n*D,y+=n*N,m+=n*L,g+=n*q,w+=n*F,b+=n*H,_+=n*W,v+=n*Z,k+=n*G,A+=n*V,S+=n*Y,P+=n*$,E+=n*Q,d+=(n=t[7])*B,h+=n*I,p+=n*z,y+=n*D,m+=n*N,g+=n*L,w+=n*q,b+=n*F,_+=n*H,v+=n*W,k+=n*Z,A+=n*G,S+=n*V,P+=n*Y,E+=n*$,x+=n*Q,h+=(n=t[8])*B,p+=n*I,y+=n*z,m+=n*D,g+=n*N,w+=n*L,b+=n*q,_+=n*F,v+=n*H,k+=n*W,A+=n*Z,S+=n*G,P+=n*V,E+=n*Y,x+=n*$,M+=n*Q,p+=(n=t[9])*B,y+=n*I,m+=n*z,g+=n*D,w+=n*N,b+=n*L,_+=n*q,v+=n*F,k+=n*H,A+=n*W,S+=n*Z,P+=n*G,E+=n*V,x+=n*Y,M+=n*$,K+=n*Q,y+=(n=t[10])*B,m+=n*I,g+=n*z,w+=n*D,b+=n*N,_+=n*L,v+=n*q,k+=n*F,A+=n*H,S+=n*W,P+=n*Z,E+=n*G,x+=n*V,M+=n*Y,K+=n*$,U+=n*Q,m+=(n=t[11])*B,g+=n*I,w+=n*z,b+=n*D,_+=n*N,v+=n*L,k+=n*q,A+=n*F,S+=n*H,P+=n*W,E+=n*Z,x+=n*G,M+=n*V,K+=n*Y,U+=n*$,C+=n*Q,g+=(n=t[12])*B,w+=n*I,b+=n*z,_+=n*D,v+=n*N,k+=n*L,A+=n*q,S+=n*F,P+=n*H,E+=n*W,x+=n*Z,M+=n*G,K+=n*V,U+=n*Y,C+=n*$,R+=n*Q,w+=(n=t[13])*B,b+=n*I,_+=n*z,v+=n*D,k+=n*N,A+=n*L,S+=n*q,P+=n*F,E+=n*H,x+=n*W,M+=n*Z,K+=n*G,U+=n*V,C+=n*Y,R+=n*$,T+=n*Q,b+=(n=t[14])*B,_+=n*I,v+=n*z,k+=n*D,A+=n*N,S+=n*L,P+=n*q,E+=n*F,x+=n*H,M+=n*W,K+=n*Z,U+=n*G,C+=n*V,R+=n*Y,T+=n*$,j+=n*Q,_+=(n=t[15])*B,s+=38*(k+=n*z),o+=38*(A+=n*D),u+=38*(S+=n*N),l+=38*(P+=n*L),c+=38*(E+=n*q),f+=38*(x+=n*F),d+=38*(M+=n*H),h+=38*(K+=n*W),p+=38*(U+=n*Z),y+=38*(C+=n*G),m+=38*(R+=n*V),g+=38*(T+=n*Y),w+=38*(j+=n*$),b+=38*(O+=n*Q),a=(n=(a+=38*(v+=n*I))+(i=1)+65535)-65536*(i=Math.floor(n/65536)),s=(n=s+i+65535)-65536*(i=Math.floor(n/65536)),o=(n=o+i+65535)-65536*(i=Math.floor(n/65536)),u=(n=u+i+65535)-65536*(i=Math.floor(n/65536)),l=(n=l+i+65535)-65536*(i=Math.floor(n/65536)),c=(n=c+i+65535)-65536*(i=Math.floor(n/65536)),f=(n=f+i+65535)-65536*(i=Math.floor(n/65536)),d=(n=d+i+65535)-65536*(i=Math.floor(n/65536)),h=(n=h+i+65535)-65536*(i=Math.floor(n/65536)),p=(n=p+i+65535)-65536*(i=Math.floor(n/65536)),y=(n=y+i+65535)-65536*(i=Math.floor(n/65536)),m=(n=m+i+65535)-65536*(i=Math.floor(n/65536)),g=(n=g+i+65535)-65536*(i=Math.floor(n/65536)),w=(n=w+i+65535)-65536*(i=Math.floor(n/65536)),b=(n=b+i+65535)-65536*(i=Math.floor(n/65536)),_=(n=_+i+65535)-65536*(i=Math.floor(n/65536)),a=(n=(a+=i-1+37*(i-1))+(i=1)+65535)-65536*(i=Math.floor(n/65536)),s=(n=s+i+65535)-65536*(i=Math.floor(n/65536)),o=(n=o+i+65535)-65536*(i=Math.floor(n/65536)),u=(n=u+i+65535)-65536*(i=Math.floor(n/65536)),l=(n=l+i+65535)-65536*(i=Math.floor(n/65536)),c=(n=c+i+65535)-65536*(i=Math.floor(n/65536)),f=(n=f+i+65535)-65536*(i=Math.floor(n/65536)),d=(n=d+i+65535)-65536*(i=Math.floor(n/65536)),h=(n=h+i+65535)-65536*(i=Math.floor(n/65536)),p=(n=p+i+65535)-65536*(i=Math.floor(n/65536)),y=(n=y+i+65535)-65536*(i=Math.floor(n/65536)),m=(n=m+i+65535)-65536*(i=Math.floor(n/65536)),g=(n=g+i+65535)-65536*(i=Math.floor(n/65536)),w=(n=w+i+65535)-65536*(i=Math.floor(n/65536)),b=(n=b+i+65535)-65536*(i=Math.floor(n/65536)),_=(n=_+i+65535)-65536*(i=Math.floor(n/65536)),a+=i-1+37*(i-1),e[0]=a,e[1]=s,e[2]=o,e[3]=u,e[4]=l,e[5]=c,e[6]=f,e[7]=d,e[8]=h,e[9]=p,e[10]=y,e[11]=m,e[12]=g,e[13]=w,e[14]=b,e[15]=_}function S(e,t){A(e,t,t)}function P(e,t){var n,i=r();for(n=0;n<16;n++)i[n]=t[n];for(n=253;n>=0;n--)S(i,i),2!==n&&4!==n&&A(i,i,t);for(n=0;n<16;n++)e[n]=i[n]}function E(e,t,n){var i,a,s=new Uint8Array(32),u=new Float64Array(80),l=r(),c=r(),f=r(),d=r(),h=r(),p=r();for(a=0;a<31;a++)s[a]=t[a];for(s[31]=127&t[31]|64,s[0]&=248,_(u,n),a=0;a<16;a++)c[a]=u[a],d[a]=l[a]=f[a]=0;for(l[0]=d[0]=1,a=254;a>=0;--a)m(l,c,i=s[a>>>3]>>>(7&a)&1),m(f,d,i),v(h,l,f),k(l,l,f),v(f,c,d),k(c,c,d),S(d,h),S(p,l),A(l,f,l),A(f,c,h),v(h,l,f),k(l,l,f),S(c,l),k(f,d,p),A(l,f,o),v(l,l,d),A(f,f,l),A(l,d,p),A(d,c,u),S(c,h),m(l,c,i),m(f,d,i);for(a=0;a<16;a++)u[a+16]=l[a],u[a+32]=f[a],u[a+48]=c[a],u[a+64]=d[a];var y=u.subarray(32),w=u.subarray(16);return P(y,y),A(w,w,y),g(e,w),0}function x(e,t){return E(e,t,i)}function M(e,t){var n=r(),i=r(),a=r(),s=r(),o=r(),u=r(),c=r(),f=r(),d=r();k(n,e[1],e[0]),k(d,t[1],t[0]),A(n,n,d),v(i,e[0],e[1]),v(d,t[0],t[1]),A(i,i,d),A(a,e[3],t[3]),A(a,a,l),A(s,e[2],t[2]),v(s,s,s),k(o,i,n),k(u,s,a),v(c,s,a),v(f,i,n),A(e[0],o,u),A(e[1],f,c),A(e[2],c,u),A(e[3],o,f)}function K(e,t,r){var n;for(n=0;n<4;n++)m(e[n],t[n],r)}function U(e,t){var n=r(),i=r(),a=r();P(a,t[2]),A(n,t[0],a),A(i,t[1],a),g(e,i),e[31]^=b(n)<<7}function C(e,t,r){var n,i;for(p(e[0],a),p(e[1],s),p(e[2],s),p(e[3],a),i=255;i>=0;--i)K(e,t,n=r[i/8|0]>>(7&i)&1),M(t,e),M(e,e),K(e,t,n)}function R(e,t){var n=[r(),r(),r(),r()];p(n[0],c),p(n[1],f),p(n[2],s),A(n[3],c,f),C(e,n,t)}function T(e,i,a){var s,o,u=[r(),r(),r(),r()];for(a||n(i,32),(s=t.hash(i.subarray(0,32)))[0]&=248,s[31]&=127,s[31]|=64,R(u,s),U(e,u),o=0;o<32;o++)i[o+32]=e[o];return 0}var j=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function O(e,t){var r,n,i,a;for(n=63;n>=32;--n){for(r=0,i=n-32,a=n-12;i<a;++i)t[i]+=r-16*t[n]*j[i-(n-32)],r=Math.floor((t[i]+128)/256),t[i]-=256*r;t[i]+=r,t[n]=0}for(r=0,i=0;i<32;i++)t[i]+=r-(t[31]>>4)*j[i],r=t[i]>>8,t[i]&=255;for(i=0;i<32;i++)t[i]-=r*j[i];for(n=0;n<32;n++)t[n+1]+=t[n]>>8,e[n]=255&t[n]}function B(e){var t,r=new Float64Array(64);for(t=0;t<64;t++)r[t]=e[t];for(t=0;t<64;t++)e[t]=0;O(e,r)}function I(e,t){var n=r(),i=r(),o=r(),l=r(),c=r(),f=r(),h=r();return p(e[2],s),_(e[1],t),S(o,e[1]),A(l,o,u),k(o,o,e[2]),v(l,e[2],l),S(c,l),S(f,c),A(h,f,c),A(n,h,o),A(n,n,l),function(e,t){var n,i=r();for(n=0;n<16;n++)i[n]=t[n];for(n=250;n>=0;n--)S(i,i),1!==n&&A(i,i,t);for(n=0;n<16;n++)e[n]=i[n]}(n,n),A(n,n,o),A(n,n,l),A(n,n,l),A(e[0],n,l),S(i,e[0]),A(i,i,l),w(i,o)&&A(e[0],e[0],d),S(i,e[0]),A(i,i,l),w(i,o)?-1:(b(e[0])===t[31]>>7&&k(e[0],a,e[0]),A(e[3],e[0],e[1]),0)}function z(){for(var e=0;e<arguments.length;e++)if(!(arguments[e]instanceof Uint8Array))throw new TypeError("unexpected type, use Uint8Array")}function D(e){for(var t=0;t<e.length;t++)e[t]=0}t.scalarMult=function(e,t){if(z(e,t),32!==e.length)throw new Error("bad n size");if(32!==t.length)throw new Error("bad p size");var r=new Uint8Array(32);return E(r,e,t),r},t.box={},t.box.keyPair=function(){var e,t,r=new Uint8Array(32),i=new Uint8Array(32);return e=r,n(t=i,32),x(e,t),{publicKey:r,secretKey:i}},t.box.keyPair.fromSecretKey=function(e){if(z(e),32!==e.length)throw new Error("bad secret key size");var t=new Uint8Array(32);return x(t,e),{publicKey:t,secretKey:new Uint8Array(e)}},t.sign=function(e,n){if(z(e,n),64!==n.length)throw new Error("bad secret key size");var i=new Uint8Array(64+e.length);return function(e,n,i,a){var s,o,u,l,c,f=new Float64Array(64),d=[r(),r(),r(),r()];(s=t.hash(a.subarray(0,32)))[0]&=248,s[31]&=127,s[31]|=64;var h=i+64;for(l=0;l<i;l++)e[64+l]=n[l];for(l=0;l<32;l++)e[32+l]=s[32+l];for(B(u=t.hash(e.subarray(32,h))),R(d,u),U(e,d),l=32;l<64;l++)e[l]=a[l];for(B(o=t.hash(e.subarray(0,h))),l=0;l<64;l++)f[l]=0;for(l=0;l<32;l++)f[l]=u[l];for(l=0;l<32;l++)for(c=0;c<32;c++)f[l+c]+=o[l]*s[c];O(e.subarray(32),f)}(i,e,e.length,n),i},t.sign.detached=function(e,r){for(var n=t.sign(e,r),i=new Uint8Array(64),a=0;a<i.length;a++)i[a]=n[a];return i},t.sign.detached.verify=function(e,n,i){if(z(e,n,i),64!==n.length)throw new Error("bad signature size");if(32!==i.length)throw new Error("bad public key size");var a,s=new Uint8Array(64+e.length),o=new Uint8Array(64+e.length);for(a=0;a<64;a++)s[a]=n[a];for(a=0;a<e.length;a++)s[a+64]=e[a];return function(e,n,i,a){var s,o,u=new Uint8Array(32),l=[r(),r(),r(),r()],c=[r(),r(),r(),r()];if(i<64)return-1;if(I(c,a))return-1;for(s=0;s<i;s++)e[s]=n[s];for(s=0;s<32;s++)e[s+32]=a[s];if(B(o=t.hash(e.subarray(0,i))),C(l,c,o),R(c,n.subarray(32)),M(l,c),U(u,l),i-=64,h(n,0,u,0)){for(s=0;s<i;s++)e[s]=0;return-1}for(s=0;s<i;s++)e[s]=n[s+64];return i}(o,s,s.length,i)>=0},t.sign.keyPair=function(){var e=new Uint8Array(32),t=new Uint8Array(64);return T(e,t),{publicKey:e,secretKey:t}},t.sign.keyPair.fromSecretKey=function(e){if(z(e),64!==e.length)throw new Error("bad secret key size");for(var t=new Uint8Array(32),r=0;r<t.length;r++)t[r]=e[32+r];return{publicKey:t,secretKey:new Uint8Array(e)}},t.sign.keyPair.fromSeed=function(e){if(z(e),32!==e.length)throw new Error("bad seed size");for(var t=new Uint8Array(32),r=new Uint8Array(64),n=0;n<32;n++)r[n]=e[n];return T(t,r,!0),{publicKey:t,secretKey:r}},t.setPRNG=function(e){n=e},function(){var r="undefined"!=typeof self?self.crypto||self.msCrypto:null;if(r&&r.getRandomValues){t.setPRNG(function(e,t){var n,i=new Uint8Array(t);for(n=0;n<t;n+=65536)r.getRandomValues(i.subarray(n,n+Math.min(t-n,65536)));for(n=0;n<t;n++)e[n]=i[n];D(i)})}else void 0!==e&&(r=e("crypto"))&&r.randomBytes&&t.setPRNG(function(e,t){var n,i=r.randomBytes(t);for(n=0;n<t;n++)e[n]=i[n];D(i)})}()}(void 0!==t&&t.exports?t.exports:self.nacl=self.nacl||{})},{crypto:"crypto"}],51:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.webToNode=r.nodeToWeb=void 0;var n,i=e("./util"),a=e("./streams"),s=(n=a)&&n.__esModule?n:{default:n};const o=i.isNode&&e("stream").Readable;let u,l;if(o){r.nodeToWeb=u=function(e){return new ReadableStream({start(t){e.pause(),e.on("data",r=>{t.enqueue(r),e.pause()}),e.on("end",()=>t.close()),e.on("error",e=>t.error(e))},pull(){e.resume()},cancel(t){if(e.pause(),e.cancel)return e.cancel(t)}})};class e extends o{constructor(e,t){super(t),this._webStream=e,this._reader=s.default.getReader(e),this._reading=!1,this._doneReadingPromise=Promise.resolve(),this._cancelling=!1}_read(e){if(this._reading||this._cancelling)return;this._reading=!0;this._doneReadingPromise=(async()=>{try{for(;;){var e=await this._reader.read();const t=e.done,r=e.value;if(t){this.push(null);break}if(!this.push(r)||this._cancelling){this._reading=!1;break}}}catch(t){this.emit("error",t)}})()}async cancel(e){return this._cancelling=!0,await this._doneReadingPromise,this._reader.releaseLock(),this._webStream.cancel(e)}}r.webToNode=l=function(t){return new e(t)}}r.nodeToWeb=u,r.webToNode=l},{"./streams":53,"./util":54,stream:"stream"}],52:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.externalBuffer=r.Reader=void 0;var n,i=e("./streams"),a=(n=i)&&n.__esModule?n:{default:n};const s=new WeakSet,o=Symbol("externalBuffer");function u(e){this.stream=e,e[o]&&(this[o]=e[o].slice());let t=a.default.isStream(e);if("node"===t&&(e=a.default.nodeToWeb(e)),t){const t=e.getReader();return this._read=t.read.bind(t),void(this._releaseLock=(()=>{t.closed.catch(function(){}),t.releaseLock()}))}let r=!1;this._read=(async()=>r||s.has(e)?{value:void 0,done:!0}:(r=!0,{value:e,done:!1})),this._releaseLock=(()=>{if(r)try{s.add(e)}catch(t){}})}u.prototype.read=async function(){if(this[o]&&this[o].length){return{done:!1,value:this[o].shift()}}return this._read()},u.prototype.releaseLock=function(){this[o]&&(this.stream[o]=this[o]),this._releaseLock()},u.prototype.readLine=async function(){let e,t=[];for(;!e;){var r=await this.read();let n=r.done,i=r.value;if(i+="",n)return t.length?a.default.concat(t):void 0;const s=i.indexOf("\n")+1;s&&(e=a.default.concat(t.concat(i.substr(0,s))),t=[]),s!==i.length&&t.push(i.substr(s))}return this.unshift(...t),e},u.prototype.readByte=async function(){var e=await this.read();const t=e.done,r=e.value;if(t)return;const n=r[0];return this.unshift(a.default.slice(r,1)),n},u.prototype.readBytes=async function(e){const t=[];let r=0;for(;;){var n=await this.read();const i=n.done,s=n.value;if(i)return t.length?a.default.concat(t):void 0;if(t.push(s),(r+=s.length)>=e){const r=a.default.concat(t);return this.unshift(a.default.slice(r,e)),a.default.slice(r,0,e)}}},u.prototype.peekBytes=async function(e){const t=await this.readBytes(e);return this.unshift(t),t},u.prototype.unshift=function(...e){this[o]||(this[o]=[]),this[o].unshift(...e.filter(e=>e&&e.length))},u.prototype.readToEnd=async function(e=a.default.concat){const t=[];for(;;){var r=await this.read();const e=r.done,n=r.value;if(e)break;t.push(n)}return e(t)},r.Reader=u,r.externalBuffer=o},{"./streams":53}],53:[function(e,t,r){(function(t){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e("./util"),i=e("./node-conversions"),a=e("./reader");const s=n.isNode&&e("buffer").Buffer;function o(e){let t=(0,n.isStream)(e);return"node"===t?(0,i.nodeToWeb)(e):t?e:new ReadableStream({start(t){t.enqueue(e),t.close()}})}function u(e){return e.some(n.isStream)?l(e):"string"==typeof e[0]?e.join(""):s&&s.isBuffer(e[0])?s.concat(e):(0,n.concatUint8Array)(e)}function l(e){e=e.map(o);const t=p(async function(e){await Promise.all(n.map(t=>_(t,e)))});let r=Promise.resolve();const n=e.map((n,i)=>m(n,(n,a)=>r=r.then(()=>d(n,t.writable,{preventClose:i!==e.length-1}))));return t.readable}function c(e){return new a.Reader(e)}function f(e){const t=e.getWriter(),r=t.releaseLock;return t.releaseLock=(()=>{t.closed.catch(function(){}),r.call(t)}),t}async function d(e,t,r){e=o(e);try{if(e[a.externalBuffer]){const r=f(t);for(let t=0;t<e[a.externalBuffer].length;t++)await r.ready,await r.write(e[a.externalBuffer][t]);r.releaseLock()}return await e.pipeTo(t,r)}catch(n){}}function h(e,t){const r=new TransformStream(t);return d(e,r.writable),r.readable}function p(e){let t,r,n=!1;return{readable:new ReadableStream({start(e){r=e},pull(){t?t():n=!0},cancel:e},{highWaterMark:0}),writable:new WritableStream({write:async function(e){r.enqueue(e),n?n=!1:(await new Promise(e=>{t=e}),t=null)},close:r.close.bind(r),abort:r.error.bind(r)})}}function y(e,t=(()=>void 0),r=(()=>void 0)){if((0,n.isStream)(e))return h(e,{async transform(e,r){try{const i=await t(e);void 0!==i&&r.enqueue(i)}catch(n){r.error(n)}},async flush(e){try{const n=await r();void 0!==n&&e.enqueue(n)}catch(t){e.error(t)}}});const i=t(e),a=r();return void 0!==i&&void 0!==a?u([i,a]):void 0!==i?i:a}function m(e,t){let r;const n=new TransformStream({start(e){r=e}}),i=d(e,n.writable),a=p(async function(){r.error(new Error("Readable side was canceled.")),await i,await new Promise(setTimeout)});return t(n.readable,a.writable),a.readable}function g(e,t){Object.entries(Object.getOwnPropertyDescriptors(ReadableStream.prototype)).forEach(([r,n])=>{"constructor"!==r&&(n.value?n.value=n.value.bind(t):n.get=n.get.bind(t),Object.defineProperty(e,r,n))})}function w(e,t=0,r=1/0){if((0,n.isStream)(e)){if(t>=0&&r>=0){let n=0;return h(e,{transform(e,i){n<r?(n+e.length>=t&&i.enqueue(w(e,Math.max(t-n,0),r-n)),n+=e.length):i.terminate()}})}if(t<0&&(r<0||r===1/0)){let n=[];return y(e,e=>{e.length>=-t?n=[e]:n.push(e)},()=>w(u(n),t,r))}if(0===t&&r<0){let n;return y(e,e=>{const i=n?u([n,e]):e;if(i.length>=-r)return n=w(i,r),w(i,t,r);n=i})}return console.warn(`stream.slice(input, ${t}, ${r}) not implemented efficiently.`),v(async()=>w(await b(e),t,r))}return e[a.externalBuffer]&&(e=u(e[a.externalBuffer].concat([e]))),!(0,n.isUint8Array)(e)||s&&s.isBuffer(e)?e.slice(t,r):(r===1/0&&(r=e.length),e.subarray(t,r))}async function b(e,t){return(0,n.isStream)(e)?c(e).readToEnd(t):e}async function _(e,t){if((0,n.isStream)(e)&&e.cancel)return e.cancel(t)}function v(e){return new ReadableStream({pull:async t=>{try{t.enqueue(await e()),t.close()}catch(r){t.error(r)}}})}r.default={isStream:n.isStream,isUint8Array:n.isUint8Array,toStream:o,concatUint8Array:n.concatUint8Array,concatStream:l,concat:u,getReader:c,getWriter:f,pipe:d,transformRaw:h,transform:y,transformPair:m,parse:function(e,t){let r;const n=m(e,(e,i)=>{const a=c(e);a.remainder=(()=>(a.releaseLock(),d(e,i),n)),r=t(a)});return r},clone:function(e){if((0,n.isStream)(e)){const t=function(e){if((0,n.isStream)(e)){const t=o(e).tee();return t[0][a.externalBuffer]=t[1][a.externalBuffer]=e[a.externalBuffer],t}return[w(e),w(e)]}(e);return g(e,t[0]),t[1]}return w(e)},passiveClone:function(e){return(0,n.isStream)(e)?new ReadableStream({start(t){const r=m(e,async(e,r)=>{const n=c(e),i=f(r);try{for(;;){await i.ready;var a=await n.read();const e=a.done,r=a.value;if(e){try{t.close()}catch(s){}return void(await i.close())}try{t.enqueue(r)}catch(s){}await i.write(r)}}catch(s){t.error(s),await i.abort(s)}});g(e,r)}}):w(e)},slice:w,readToEnd:b,cancel:_,fromAsync:v,nodeToWeb:i.nodeToWeb,webToNode:i.webToNode}}).call(this,e("_process"))},{"./node-conversions":51,"./reader":52,"./util":54,_process:44,buffer:"buffer"}],54:[function(e,t,r){(function(t){"use strict";Object.defineProperty(r,"__esModule",{value:!0});const n="object"==typeof t.process&&"object"==typeof t.process.versions,i=n&&e("stream").Readable;function a(e){return Uint8Array.prototype.isPrototypeOf(e)}r.isNode=n,r.isStream=function(e){return ReadableStream.prototype.isPrototypeOf(e)?"web":!(!i||!i.prototype.isPrototypeOf(e))&&"node"},r.isUint8Array=a,r.concatUint8Array=function(e){if(1===e.length)return e[0];let t=0;for(let i=0;i<e.length;i++){if(!a(e[i]))throw new Error("concatUint8Array: Data must be in the form of a Uint8Array");t+=e[i].length}const r=new Uint8Array(t);let n=0;return e.forEach(function(e){r.set(e,n),n+=e.length}),r}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{stream:"stream"}],55:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.CleartextMessage=c,r.readArmored=async function(e){const t=await n.default.decode(e);if(t.type!==i.default.armor.signed)throw new Error("No cleartext signed message.");const r=new s.default.List;await r.read(t.data),function(e,t){const r=function(e){const r=e=>t=>e.hashAlgorithm===t;for(let n=0;n<t.length;n++)if(t[n].tag===i.default.packet.signature&&!e.some(r(t[n])))return!1;return!0};let n=null,a=[];if(e.forEach(function(e){if(!(n=e.match(/Hash: (.+)/)))throw new Error('Only "Hash" header allowed in cleartext signed message');n=(n=(n=n[1].replace(/\s/g,"")).split(",")).map(function(e){e=e.toLowerCase();try{return i.default.write(i.default.hash,e)}catch(t){throw new Error("Unknown hash algorithm in armor header: "+e)}}),a=a.concat(n)}),!a.length&&!r([i.default.hash.md5]))throw new Error('If no "Hash" header in cleartext signed message, then only MD5 signatures allowed');if(a.length&&!r(a))throw new Error("Hash algorithm mismatch in armor header and signature")}(t.headers,r);const a=new o.Signature(r);return new c(t.text,a)},r.fromText=function(e){return new c(e)};var n=l(e("./encoding/armor")),i=l(e("./enums")),a=l(e("./util")),s=l(e("./packet")),o=e("./signature"),u=e("./message");function l(e){return e&&e.__esModule?e:{default:e}}function c(e,t){if(!(this instanceof c))return new c(e,t);if(this.text=a.default.removeTrailingSpaces(e).replace(/\r?\n/g,"\r\n"),t&&!(t instanceof o.Signature))throw new Error("Invalid signature input");this.signature=t||new o.Signature(new s.default.List)}c.prototype.getSigningKeyIds=function(){const e=[];return this.signature.packets.forEach(function(t){e.push(t.issuerKeyId)}),e},c.prototype.sign=async function(e,t=null,r=new Date,n=[]){return new c(this.text,await this.signDetached(e,t,r,n))},c.prototype.signDetached=async function(e,t=null,r=new Date,n=[]){const i=new s.default.Literal;return i.setText(this.text),new o.Signature(await(0,u.createSignaturePackets)(i,e,t,r,n,!0))},c.prototype.verify=function(e,t=new Date){return this.verifyDetached(this.signature,e,t)},c.prototype.verifyDetached=function(e,t,r=new Date){const n=e.packets,i=new s.default.Literal;return i.setText(this.text),(0,u.createVerificationObjects)(n,[i],t,r,!0)},c.prototype.getText=function(){return this.text.replace(/\r\n/g,"\n")},c.prototype.armor=function(){let e=this.signature.packets.map(function(e){return i.default.read(i.default.hash,e.hashAlgorithm).toUpperCase()});const t={hash:(e=e.filter(function(e,t,r){return r.indexOf(e)===t})).join(),text:this.text,data:this.signature.packets.write()};return n.default.encode(i.default.armor.signed,t)}},{"./encoding/armor":89,"./enums":91,"./message":104,"./packet":109,"./signature":129,"./util":136}],56:[function(e,t,r){(function(t){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n,i=e("../enums"),a=(n=i)&&n.__esModule?n:{default:n};r.default={prefer_hash_algorithm:a.default.hash.sha256,encryption_cipher:a.default.symmetric.aes256,compression:a.default.compression.uncompressed,deflate_level:6,aead_protect:!1,aead_mode:a.default.aead.eax,aead_chunk_size_byte:12,v5_keys:!1,s2k_iteration_count_byte:224,integrity_protect:!0,ignore_mdc_error:!1,allow_unauthenticated_stream:!1,checksum_required:!1,rsa_blinding:!0,password_collision_check:!1,revocations_expire:!1,allow_insecure_decryption_with_signing_keys:!1,use_native:!0,min_bytes_for_web_crypto:1e3,zero_copy:!1,debug:!1,tolerant:!0,show_version:!0,show_comment:!0,versionstring:"OpenPGP.js v4.10.10",commentstring:"https://openpgpjs.org",keyserver:"https://keyserver.ubuntu.com",node_store:"./openpgp.store",max_userid_length:5120,known_notations:["preferred-email-encoding@pgp.com","pka-address@gnupg.org"],use_indutny_elliptic:!0,external_indutny_elliptic:!0,indutny_elliptic_path:"./elliptic.min.js",indutny_elliptic_fetch_options:{},reject_hash_algorithms:new t.Set([a.default.hash.md5,a.default.hash.ripemd]),reject_message_hash_algorithms:new t.Set([a.default.hash.md5,a.default.hash.ripemd,a.default.hash.sha1])}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../enums":91}],57:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e("./config.js");Object.defineProperty(r,"default",{enumerable:!0,get:function(){return(e=n,e&&e.__esModule?e:{default:e}).default;var e}})},{"./config.js":56}],58:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=a(e("./cipher")),i=a(e("../util"));function a(e){return e&&e.__esModule?e:{default:e}}function s(e){const t=e.length,r=function(e){if(i.default.isString(e)){const t=e.length,r=new ArrayBuffer(t),n=new Uint8Array(r);for(let i=0;i<t;++i)n[i]=e.charCodeAt(i);return r}return new Uint8Array(e).buffer}(e),n=new DataView(r),a=new Uint32Array(t/4);for(let i=0;i<t/4;++i)a[i]=n.getUint32(4*i);return a}function o(){let e=0;for(let i=0;i<arguments.length;++i)e+=4*arguments[i].length;const t=new ArrayBuffer(e),r=new DataView(t);let n=0;for(let i=0;i<arguments.length;++i){for(let e=0;e<arguments[i].length;++e)r.setUint32(n+4*e,arguments[i][e]);n+=4*arguments[i].length}return new Uint8Array(t)}r.default={wrap:function(e,t){const r=new n.default["aes"+8*e.length](e),i=new Uint32Array([2795939494,2795939494]),a=s(t);let u=i;const l=a,c=a.length/2,f=new Uint32Array([0,0]);let d=new Uint32Array(4);for(let n=0;n<=5;++n)for(let e=0;e<c;++e)f[1]=c*n+(1+e),d[0]=u[0],d[1]=u[1],d[2]=l[2*e],d[3]=l[2*e+1],(u=(d=s(r.encrypt(o(d)))).subarray(0,2))[0]^=f[0],u[1]^=f[1],l[2*e]=d[2],l[2*e+1]=d[3];return o(u,l)},unwrap:function(e,t){const r=new n.default["aes"+8*e.length](e),i=new Uint32Array([2795939494,2795939494]),a=s(t);let u=a.subarray(0,2);const l=a.subarray(2),c=a.length/2-1,f=new Uint32Array([0,0]);let d=new Uint32Array(4);for(let n=5;n>=0;--n)for(let e=c-1;e>=0;--e)f[1]=c*n+(e+1),d[0]=u[0]^f[0],d[1]=u[1]^f[1],d[2]=l[2*e],d[3]=l[2*e+1],u=(d=s(r.decrypt(o(d)))).subarray(0,2),l[2*e]=d[2],l[2*e+1]=d[3];if(u[0]===i[0]&&u[1]===i[1])return o(l);throw new Error("Key Data Integrity failed")}}},{"../util":136,"./cipher":64}],59:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e("asmcrypto.js/dist_es5/aes/cfb"),i=u(e("web-stream-tools")),a=u(e("./cipher")),s=u(e("../config")),o=u(e("../util"));function u(e){return e&&e.__esModule?e:{default:e}}const l=o.default.getWebCrypto(),c=o.default.getNodeCrypto(),f=o.default.getNodeBuffer(),d=c?c.getCiphers():[],h={idea:d.includes("idea-cfb")?"idea-cfb":void 0,"3des":d.includes("des-ede3-cfb")?"des-ede3-cfb":void 0,tripledes:d.includes("des-ede3-cfb")?"des-ede3-cfb":void 0,cast5:d.includes("cast5-cfb")?"cast5-cfb":void 0,blowfish:d.includes("bf-cfb")?"bf-cfb":void 0,aes128:d.includes("aes-128-cfb")?"aes-128-cfb":void 0,aes192:d.includes("aes-192-cfb")?"aes-192-cfb":void 0,aes256:d.includes("aes-256-cfb")?"aes-256-cfb":void 0};r.default={encrypt:function(e,t,r,u){if(o.default.getNodeCrypto()&&h[e])return function(e,t,r,n){t=f.from(t),n=f.from(n);const a=new c.createCipheriv(h[e],t,n);return i.default.transform(r,e=>new Uint8Array(a.update(f.from(e))))}(e,t,r,u);if("aes"===e.substr(0,3))return function(e,t,r,u){if(o.default.getWebCrypto()&&24!==t.length&&!o.default.isStream(r)&&r.length>=3e3*s.default.min_bytes_for_web_crypto)return async function(e,t,r,n){const i=await l.importKey("raw",t,{name:"AES-CBC"},!1,["encrypt"]),s=a.default[e].blockSize,u=o.default.concatUint8Array([new Uint8Array(s),r]),c=new Uint8Array(await l.encrypt({name:"AES-CBC",iv:n},i,u)).subarray(0,r.length);return function(e,t){for(let r=0;r<e.length;r++)e[r]=e[r]^t[r]}(c,r),c}(e,t,r,u);const c=new n.AES_CFB(t,u);return i.default.transform(r,e=>c.AES_Encrypt_process(e),()=>c.AES_Encrypt_finish())}(e,t,r,u);const d=new a.default[e](t),p=d.blockSize,y=u.slice();let m=new Uint8Array;const g=e=>{e&&(m=o.default.concatUint8Array([m,e]));const t=new Uint8Array(m.length);let r,n=0;for(;e?m.length>=p:m.length;){const e=d.encrypt(y);for(r=0;r<p;r++)y[r]=m[r]^e[r],t[n++]=y[r];m=m.subarray(p)}return t.subarray(0,n)};return i.default.transform(r,g,g)},decrypt:async function(e,t,r,s){if(o.default.getNodeCrypto()&&h[e])return function(e,t,r,n){t=f.from(t),n=f.from(n);const a=new c.createDecipheriv(h[e],t,n);return i.default.transform(r,e=>new Uint8Array(a.update(f.from(e))))}(e,t,r,s);if("aes"===e.substr(0,3))return function(e,t,r,a){if(o.default.isStream(r)){const e=new n.AES_CFB(t,a);return i.default.transform(r,t=>e.AES_Decrypt_process(t),()=>e.AES_Decrypt_finish())}return n.AES_CFB.decrypt(r,t,a)}(0,t,r,s);const u=new a.default[e](t),l=u.blockSize;let d=s,p=new Uint8Array;const y=e=>{e&&(p=o.default.concatUint8Array([p,e]));const t=new Uint8Array(p.length);let r,n=0;for(;e?p.length>=l:p.length;){const e=u.encrypt(d);for(d=p,r=0;r<l;r++)t[n++]=d[r]^e[r];p=p.subarray(l)}return t.subarray(0,n)};return i.default.transform(r,y,y)}}},{"../config":57,"../util":136,"./cipher":64,"asmcrypto.js/dist_es5/aes/cfb":5,"web-stream-tools":53}],60:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e("asmcrypto.js/dist_es5/aes/ecb");r.default=function(e){const t=function(e){const t=new n.AES_ECB(e);this.encrypt=function(e){return t.encrypt(e)},this.decrypt=function(e){return t.decrypt(e)}};return t.blockSize=t.prototype.blockSize=16,t.keySize=t.prototype.keySize=e/8,t}},{"asmcrypto.js/dist_es5/aes/ecb":7}],61:[function(e,t,r){"use strict";function n(){}function i(e){this.bf=new n,this.bf.init(e),this.encrypt=function(e){return this.bf.encrypt_block(e)}}Object.defineProperty(r,"__esModule",{value:!0}),n.prototype.BLOCKSIZE=8,n.prototype.SBOXES=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]],n.prototype.PARRAY=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],n.prototype.NN=16,n.prototype._clean=function(e){if(e<0){e=(2147483647&e)+2147483648}return e},n.prototype._F=function(e){let t;const r=255&e,n=255&(e>>>=8),i=255&(e>>>=8),a=255&(e>>>=8);return t=this.sboxes[0][a]+this.sboxes[1][i],t^=this.sboxes[2][n],t+=this.sboxes[3][r]},n.prototype._encrypt_block=function(e){let t,r=e[0],n=e[1];for(t=0;t<this.NN;++t){const e=r^=this.parray[t];r=n=this._F(r)^n,n=e}r^=this.parray[this.NN+0],n^=this.parray[this.NN+1],e[0]=this._clean(n),e[1]=this._clean(r)},n.prototype.encrypt_block=function(e){let t;const r=[0,0],n=this.BLOCKSIZE/2;for(t=0;t<this.BLOCKSIZE/2;++t)r[0]=r[0]<<8|255&e[t+0],r[1]=r[1]<<8|255&e[t+n];this._encrypt_block(r);const i=[];for(t=0;t<this.BLOCKSIZE/2;++t)i[t+0]=r[0]>>>24-8*t&255,i[t+n]=r[1]>>>24-8*t&255;return i},n.prototype._decrypt_block=function(e){let t,r=e[0],n=e[1];for(t=this.NN+1;t>1;--t){const e=r^=this.parray[t];r=n=this._F(r)^n,n=e}r^=this.parray[1],n^=this.parray[0],e[0]=this._clean(n),e[1]=this._clean(r)},n.prototype.init=function(e){let t,r=0;for(this.parray=[],t=0;t<this.NN+2;++t){let n=0;for(let t=0;t<4;++t)n=n<<8|255&e[r],++r>=e.length&&(r=0);this.parray[t]=this.PARRAY[t]^n}for(this.sboxes=[],t=0;t<4;++t)for(this.sboxes[t]=[],r=0;r<256;++r)this.sboxes[t][r]=this.SBOXES[t][r];const n=[0,0];for(t=0;t<this.NN+2;t+=2)this._encrypt_block(n),this.parray[t+0]=n[0],this.parray[t+1]=n[1];for(t=0;t<4;++t)for(r=0;r<256;r+=2)this._encrypt_block(n),this.sboxes[t][r+0]=n[0],this.sboxes[t][r+1]=n[1]},i.keySize=i.prototype.keySize=16,i.blockSize=i.prototype.blockSize=8,r.default=i},{}],62:[function(e,t,r){"use strict";function n(){this.BlockSize=8,this.KeySize=16,this.setKey=function(e){if(this.masking=new Array(16),this.rotate=new Array(16),this.reset(),e.length!==this.KeySize)throw new Error("CAST-128: keys must be 16 bytes");return this.keySchedule(e),!0},this.reset=function(){for(let e=0;e<16;e++)this.masking[e]=0,this.rotate[e]=0},this.getBlockSize=function(){return this.BlockSize},this.encrypt=function(e){const t=new Array(e.length);for(let a=0;a<e.length;a+=8){let s,o=e[a]<<24|e[a+1]<<16|e[a+2]<<8|e[a+3],u=e[a+4]<<24|e[a+5]<<16|e[a+6]<<8|e[a+7];s=u,u=o^r(u,this.masking[0],this.rotate[0]),o=s,s=u,u=o^n(u,this.masking[1],this.rotate[1]),o=s,s=u,u=o^i(u,this.masking[2],this.rotate[2]),o=s,s=u,u=o^r(u,this.masking[3],this.rotate[3]),o=s,s=u,u=o^n(u,this.masking[4],this.rotate[4]),o=s,s=u,u=o^i(u,this.masking[5],this.rotate[5]),o=s,s=u,u=o^r(u,this.masking[6],this.rotate[6]),o=s,s=u,u=o^n(u,this.masking[7],this.rotate[7]),o=s,s=u,u=o^i(u,this.masking[8],this.rotate[8]),o=s,s=u,u=o^r(u,this.masking[9],this.rotate[9]),o=s,s=u,u=o^n(u,this.masking[10],this.rotate[10]),o=s,s=u,u=o^i(u,this.masking[11],this.rotate[11]),o=s,s=u,u=o^r(u,this.masking[12],this.rotate[12]),o=s,s=u,u=o^n(u,this.masking[13],this.rotate[13]),o=s,s=u,u=o^i(u,this.masking[14],this.rotate[14]),o=s,s=u,u=o^r(u,this.masking[15],this.rotate[15]),o=s,t[a]=u>>>24&255,t[a+1]=u>>>16&255,t[a+2]=u>>>8&255,t[a+3]=255&u,t[a+4]=o>>>24&255,t[a+5]=o>>>16&255,t[a+6]=o>>>8&255,t[a+7]=255&o}return t},this.decrypt=function(e){const t=new Array(e.length);for(let a=0;a<e.length;a+=8){let s,o=e[a]<<24|e[a+1]<<16|e[a+2]<<8|e[a+3],u=e[a+4]<<24|e[a+5]<<16|e[a+6]<<8|e[a+7];s=u,u=o^r(u,this.masking[15],this.rotate[15]),o=s,s=u,u=o^i(u,this.masking[14],this.rotate[14]),o=s,s=u,u=o^n(u,this.masking[13],this.rotate[13]),o=s,s=u,u=o^r(u,this.masking[12],this.rotate[12]),o=s,s=u,u=o^i(u,this.masking[11],this.rotate[11]),o=s,s=u,u=o^n(u,this.masking[10],this.rotate[10]),o=s,s=u,u=o^r(u,this.masking[9],this.rotate[9]),o=s,s=u,u=o^i(u,this.masking[8],this.rotate[8]),o=s,s=u,u=o^n(u,this.masking[7],this.rotate[7]),o=s,s=u,u=o^r(u,this.masking[6],this.rotate[6]),o=s,s=u,u=o^i(u,this.masking[5],this.rotate[5]),o=s,s=u,u=o^n(u,this.masking[4],this.rotate[4]),o=s,s=u,u=o^r(u,this.masking[3],this.rotate[3]),o=s,s=u,u=o^i(u,this.masking[2],this.rotate[2]),o=s,s=u,u=o^n(u,this.masking[1],this.rotate[1]),o=s,s=u,u=o^r(u,this.masking[0],this.rotate[0]),o=s,t[a]=u>>>24&255,t[a+1]=u>>>16&255,t[a+2]=u>>>8&255,t[a+3]=255&u,t[a+4]=o>>>24&255,t[a+5]=o>>16&255,t[a+6]=o>>8&255,t[a+7]=255&o}return t};const e=new Array(4);e[0]=new Array(4),e[0][0]=[4,0,13,15,12,14,8],e[0][1]=[5,2,16,18,17,19,10],e[0][2]=[6,3,23,22,21,20,9],e[0][3]=[7,1,26,25,27,24,11],e[1]=new Array(4),e[1][0]=[0,6,21,23,20,22,16],e[1][1]=[1,4,0,2,1,3,18],e[1][2]=[2,5,7,6,5,4,17],e[1][3]=[3,7,10,9,11,8,19],e[2]=new Array(4),e[2][0]=[4,0,13,15,12,14,8],e[2][1]=[5,2,16,18,17,19,10],e[2][2]=[6,3,23,22,21,20,9],e[2][3]=[7,1,26,25,27,24,11],e[3]=new Array(4),e[3][0]=[0,6,21,23,20,22,16],e[3][1]=[1,4,0,2,1,3,18],e[3][2]=[2,5,7,6,5,4,17],e[3][3]=[3,7,10,9,11,8,19];const t=new Array(4);function r(e,t,r){const n=t+e,i=n<<r|n>>>32-r;return(a[0][i>>>24]^a[1][i>>>16&255])-a[2][i>>>8&255]+a[3][255&i]}function n(e,t,r){const n=t^e,i=n<<r|n>>>32-r;return a[0][i>>>24]-a[1][i>>>16&255]+a[2][i>>>8&255]^a[3][255&i]}function i(e,t,r){const n=t-e,i=n<<r|n>>>32-r;return(a[0][i>>>24]+a[1][i>>>16&255]^a[2][i>>>8&255])-a[3][255&i]}t[0]=new Array(4),t[0][0]=[24,25,23,22,18],t[0][1]=[26,27,21,20,22],t[0][2]=[28,29,19,18,25],t[0][3]=[30,31,17,16,28],t[1]=new Array(4),t[1][0]=[3,2,12,13,8],t[1][1]=[1,0,14,15,13],t[1][2]=[7,6,8,9,3],t[1][3]=[5,4,10,11,7],t[2]=new Array(4),t[2][0]=[19,18,28,29,25],t[2][1]=[17,16,30,31,28],t[2][2]=[23,22,24,25,18],t[2][3]=[21,20,26,27,22],t[3]=new Array(4),t[3][0]=[8,9,7,6,3],t[3][1]=[10,11,5,4,7],t[3][2]=[12,13,3,2,8],t[3][3]=[14,15,1,0,13],this.keySchedule=function(r){const n=new Array(8),i=new Array(32);let s;for(let e=0;e<4;e++)s=4*e,n[e]=r[s]<<24|r[s+1]<<16|r[s+2]<<8|r[s+3];const o=[6,7,4,5];let u,l=0;for(let c=0;c<2;c++)for(let r=0;r<4;r++){for(s=0;s<4;s++){const t=e[r][s];u=n[t[1]],u^=a[4][n[t[2]>>>2]>>>24-8*(3&t[2])&255],u^=a[5][n[t[3]>>>2]>>>24-8*(3&t[3])&255],u^=a[6][n[t[4]>>>2]>>>24-8*(3&t[4])&255],u^=a[7][n[t[5]>>>2]>>>24-8*(3&t[5])&255],u^=a[o[s]][n[t[6]>>>2]>>>24-8*(3&t[6])&255],n[t[0]]=u}for(s=0;s<4;s++){const e=t[r][s];u=a[4][n[e[0]>>>2]>>>24-8*(3&e[0])&255],u^=a[5][n[e[1]>>>2]>>>24-8*(3&e[1])&255],u^=a[6][n[e[2]>>>2]>>>24-8*(3&e[2])&255],u^=a[7][n[e[3]>>>2]>>>24-8*(3&e[3])&255],u^=a[4+s][n[e[4]>>>2]>>>24-8*(3&e[4])&255],i[l]=u,l++}}for(let e=0;e<16;e++)this.masking[e]=i[e],this.rotate[e]=31&i[16+e]};const a=new Array(8);a[0]=[821772500,2678128395,1810681135,1059425402,505495343,2617265619,1610868032,3483355465,3218386727,2294005173,3791863952,2563806837,1852023008,365126098,3269944861,584384398,677919599,3229601881,4280515016,2002735330,1136869587,3744433750,2289869850,2731719981,2714362070,879511577,1639411079,575934255,717107937,2857637483,576097850,2731753936,1725645e3,2810460463,5111599,767152862,2543075244,1251459544,1383482551,3052681127,3089939183,3612463449,1878520045,1510570527,2189125840,2431448366,582008916,3163445557,1265446783,1354458274,3529918736,3202711853,3073581712,3912963487,3029263377,1275016285,4249207360,2905708351,3304509486,1442611557,3585198765,2712415662,2731849581,3248163920,2283946226,208555832,2766454743,1331405426,1447828783,3315356441,3108627284,2957404670,2981538698,3339933917,1669711173,286233437,1465092821,1782121619,3862771680,710211251,980974943,1651941557,430374111,2051154026,704238805,4128970897,3144820574,2857402727,948965521,3333752299,2227686284,718756367,2269778983,2731643755,718440111,2857816721,3616097120,1113355533,2478022182,410092745,1811985197,1944238868,2696854588,1415722873,1682284203,1060277122,1998114690,1503841958,82706478,2315155686,1068173648,845149890,2167947013,1768146376,1993038550,3566826697,3390574031,940016341,3355073782,2328040721,904371731,1205506512,4094660742,2816623006,825647681,85914773,2857843460,1249926541,1417871568,3287612,3211054559,3126306446,1975924523,1353700161,2814456437,2438597621,1800716203,722146342,2873936343,1151126914,4160483941,2877670899,458611604,2866078500,3483680063,770352098,2652916994,3367839148,3940505011,3585973912,3809620402,718646636,2504206814,2914927912,3631288169,2857486607,2860018678,575749918,2857478043,718488780,2069512688,3548183469,453416197,1106044049,3032691430,52586708,3378514636,3459808877,3211506028,1785789304,218356169,3571399134,3759170522,1194783844,1523787992,3007827094,1975193539,2555452411,1341901877,3045838698,3776907964,3217423946,2802510864,2889438986,1057244207,1636348243,3761863214,1462225785,2632663439,481089165,718503062,24497053,3332243209,3344655856,3655024856,3960371065,1195698900,2971415156,3710176158,2115785917,4027663609,3525578417,2524296189,2745972565,3564906415,1372086093,1452307862,2780501478,1476592880,3389271281,18495466,2378148571,901398090,891748256,3279637769,3157290713,2560960102,1447622437,4284372637,216884176,2086908623,1879786977,3588903153,2242455666,2938092967,3559082096,2810645491,758861177,1121993112,215018983,642190776,4169236812,1196255959,2081185372,3508738393,941322904,4124243163,2877523539,1848581667,2205260958,3180453958,2589345134,3694731276,550028657,2519456284,3789985535,2973870856,2093648313,443148163,46942275,2734146937,1117713533,1115362972,1523183689,3717140224,1551984063],a[1]=[522195092,4010518363,1776537470,960447360,4267822970,4005896314,1435016340,1929119313,2913464185,1310552629,3579470798,3724818106,2579771631,1594623892,417127293,2715217907,2696228731,1508390405,3994398868,3925858569,3695444102,4019471449,3129199795,3770928635,3520741761,990456497,4187484609,2783367035,21106139,3840405339,631373633,3783325702,532942976,396095098,3548038825,4267192484,2564721535,2011709262,2039648873,620404603,3776170075,2898526339,3612357925,4159332703,1645490516,223693667,1567101217,3362177881,1029951347,3470931136,3570957959,1550265121,119497089,972513919,907948164,3840628539,1613718692,3594177948,465323573,2659255085,654439692,2575596212,2699288441,3127702412,277098644,624404830,4100943870,2717858591,546110314,2403699828,3655377447,1321679412,4236791657,1045293279,4010672264,895050893,2319792268,494945126,1914543101,2777056443,3894764339,2219737618,311263384,4275257268,3458730721,669096869,3584475730,3835122877,3319158237,3949359204,2005142349,2713102337,2228954793,3769984788,569394103,3855636576,1425027204,108000370,2736431443,3671869269,3043122623,1750473702,2211081108,762237499,3972989403,2798899386,3061857628,2943854345,867476300,964413654,1591880597,1594774276,2179821409,552026980,3026064248,3726140315,2283577634,3110545105,2152310760,582474363,1582640421,1383256631,2043843868,3322775884,1217180674,463797851,2763038571,480777679,2718707717,2289164131,3118346187,214354409,200212307,3810608407,3025414197,2674075964,3997296425,1847405948,1342460550,510035443,4080271814,815934613,833030224,1620250387,1945732119,2703661145,3966000196,1388869545,3456054182,2687178561,2092620194,562037615,1356438536,3409922145,3261847397,1688467115,2150901366,631725691,3840332284,549916902,3455104640,394546491,837744717,2114462948,751520235,2221554606,2415360136,3999097078,2063029875,803036379,2702586305,821456707,3019566164,360699898,4018502092,3511869016,3677355358,2402471449,812317050,49299192,2570164949,3259169295,2816732080,3331213574,3101303564,2156015656,3705598920,3546263921,143268808,3200304480,1638124008,3165189453,3341807610,578956953,2193977524,3638120073,2333881532,807278310,658237817,2969561766,1641658566,11683945,3086995007,148645947,1138423386,4158756760,1981396783,2401016740,3699783584,380097457,2680394679,2803068651,3334260286,441530178,4016580796,1375954390,761952171,891809099,2183123478,157052462,3683840763,1592404427,341349109,2438483839,1417898363,644327628,2233032776,2353769706,2201510100,220455161,1815641738,182899273,2995019788,3627381533,3702638151,2890684138,1052606899,588164016,1681439879,4038439418,2405343923,4229449282,167996282,1336969661,1688053129,2739224926,1543734051,1046297529,1138201970,2121126012,115334942,1819067631,1902159161,1941945968,2206692869,1159982321],a[2]=[2381300288,637164959,3952098751,3893414151,1197506559,916448331,2350892612,2932787856,3199334847,4009478890,3905886544,1373570990,2450425862,4037870920,3778841987,2456817877,286293407,124026297,3001279700,1028597854,3115296800,4208886496,2691114635,2188540206,1430237888,1218109995,3572471700,308166588,570424558,2187009021,2455094765,307733056,1310360322,3135275007,1384269543,2388071438,863238079,2359263624,2801553128,3380786597,2831162807,1470087780,1728663345,4072488799,1090516929,532123132,2389430977,1132193179,2578464191,3051079243,1670234342,1434557849,2711078940,1241591150,3314043432,3435360113,3091448339,1812415473,2198440252,267246943,796911696,3619716990,38830015,1526438404,2806502096,374413614,2943401790,1489179520,1603809326,1920779204,168801282,260042626,2358705581,1563175598,2397674057,1356499128,2217211040,514611088,2037363785,2186468373,4022173083,2792511869,2913485016,1173701892,4200428547,3896427269,1334932762,2455136706,602925377,2835607854,1613172210,41346230,2499634548,2457437618,2188827595,41386358,4172255629,1313404830,2405527007,3801973774,2217704835,873260488,2528884354,2478092616,4012915883,2555359016,2006953883,2463913485,575479328,2218240648,2099895446,660001756,2341502190,3038761536,3888151779,3848713377,3286851934,1022894237,1620365795,3449594689,1551255054,15374395,3570825345,4249311020,4151111129,3181912732,310226346,1133119310,530038928,136043402,2476768958,3107506709,2544909567,1036173560,2367337196,1681395281,1758231547,3641649032,306774401,1575354324,3716085866,1990386196,3114533736,2455606671,1262092282,3124342505,2768229131,4210529083,1833535011,423410938,660763973,2187129978,1639812e3,3508421329,3467445492,310289298,272797111,2188552562,2456863912,310240523,677093832,1013118031,901835429,3892695601,1116285435,3036471170,1337354835,243122523,520626091,277223598,4244441197,4194248841,1766575121,594173102,316590669,742362309,3536858622,4176435350,3838792410,2501204839,1229605004,3115755532,1552908988,2312334149,979407927,3959474601,1148277331,176638793,3614686272,2083809052,40992502,1340822838,2731552767,3535757508,3560899520,1354035053,122129617,7215240,2732932949,3118912700,2718203926,2539075635,3609230695,3725561661,1928887091,2882293555,1988674909,2063640240,2491088897,1459647954,4189817080,2302804382,1113892351,2237858528,1927010603,4002880361,1856122846,1594404395,2944033133,3855189863,3474975698,1643104450,4054590833,3431086530,1730235576,2984608721,3084664418,2131803598,4178205752,267404349,1617849798,1616132681,1462223176,736725533,2327058232,551665188,2945899023,1749386277,2575514597,1611482493,674206544,2201269090,3642560800,728599968,1680547377,2620414464,1388111496,453204106,4156223445,1094905244,2754698257,2201108165,3757000246,2704524545,3922940700,3996465027],a[3]=[2645754912,532081118,2814278639,3530793624,1246723035,1689095255,2236679235,4194438865,2116582143,3859789411,157234593,2045505824,4245003587,1687664561,4083425123,605965023,672431967,1336064205,3376611392,214114848,4258466608,3232053071,489488601,605322005,3998028058,264917351,1912574028,756637694,436560991,202637054,135989450,85393697,2152923392,3896401662,2895836408,2145855233,3535335007,115294817,3147733898,1922296357,3464822751,4117858305,1037454084,2725193275,2127856640,1417604070,1148013728,1827919605,642362335,2929772533,909348033,1346338451,3547799649,297154785,1917849091,4161712827,2883604526,3968694238,1469521537,3780077382,3375584256,1763717519,136166297,4290970789,1295325189,2134727907,2798151366,1566297257,3672928234,2677174161,2672173615,965822077,2780786062,289653839,1133871874,3491843819,35685304,1068898316,418943774,672553190,642281022,2346158704,1954014401,3037126780,4079815205,2030668546,3840588673,672283427,1776201016,359975446,3750173538,555499703,2769985273,1324923,69110472,152125443,3176785106,3822147285,1340634837,798073664,1434183902,15393959,216384236,1303690150,3881221631,3711134124,3960975413,106373927,2578434224,1455997841,1801814300,1578393881,1854262133,3188178946,3258078583,2302670060,1539295533,3505142565,3078625975,2372746020,549938159,3278284284,2620926080,181285381,2865321098,3970029511,68876850,488006234,1728155692,2608167508,836007927,2435231793,919367643,3339422534,3655756360,1457871481,40520939,1380155135,797931188,234455205,2255801827,3990488299,397000196,739833055,3077865373,2871719860,4022553888,772369276,390177364,3853951029,557662966,740064294,1640166671,1699928825,3535942136,622006121,3625353122,68743880,1742502,219489963,1664179233,1577743084,1236991741,410585305,2366487942,823226535,1050371084,3426619607,3586839478,212779912,4147118561,1819446015,1911218849,530248558,3486241071,3252585495,2886188651,3410272728,2342195030,20547779,2982490058,3032363469,3631753222,312714466,1870521650,1493008054,3491686656,615382978,4103671749,2534517445,1932181,2196105170,278426614,6369430,3274544417,2913018367,697336853,2143000447,2946413531,701099306,1558357093,2805003052,3500818408,2321334417,3567135975,216290473,3591032198,23009561,1996984579,3735042806,2024298078,3739440863,569400510,2339758983,3016033873,3097871343,3639523026,3844324983,3256173865,795471839,2951117563,4101031090,4091603803,3603732598,971261452,534414648,428311343,3389027175,2844869880,694888862,1227866773,2456207019,3043454569,2614353370,3749578031,3676663836,459166190,4132644070,1794958188,51825668,2252611902,3084671440,2036672799,3436641603,1099053433,2469121526,3059204941,1323291266,2061838604,1018778475,2233344254,2553501054,334295216,3556750194,1065731521,183467730],a[4]=[2127105028,745436345,2601412319,2788391185,3093987327,500390133,1155374404,389092991,150729210,3891597772,3523549952,1935325696,716645080,946045387,2901812282,1774124410,3869435775,4039581901,3293136918,3438657920,948246080,363898952,3867875531,1286266623,1598556673,68334250,630723836,1104211938,1312863373,613332731,2377784574,1101634306,441780740,3129959883,1917973735,2510624549,3238456535,2544211978,3308894634,1299840618,4076074851,1756332096,3977027158,297047435,3790297736,2265573040,3621810518,1311375015,1667687725,47300608,3299642885,2474112369,201668394,1468347890,576830978,3594690761,3742605952,1958042578,1747032512,3558991340,1408974056,3366841779,682131401,1033214337,1545599232,4265137049,206503691,103024618,2855227313,1337551222,2428998917,2963842932,4015366655,3852247746,2796956967,3865723491,3747938335,247794022,3755824572,702416469,2434691994,397379957,851939612,2314769512,218229120,1380406772,62274761,214451378,3170103466,2276210409,3845813286,28563499,446592073,1693330814,3453727194,29968656,3093872512,220656637,2470637031,77972100,1667708854,1358280214,4064765667,2395616961,325977563,4277240721,4220025399,3605526484,3355147721,811859167,3069544926,3962126810,652502677,3075892249,4132761541,3498924215,1217549313,3250244479,3858715919,3053989961,1538642152,2279026266,2875879137,574252750,3324769229,2651358713,1758150215,141295887,2719868960,3515574750,4093007735,4194485238,1082055363,3417560400,395511885,2966884026,179534037,3646028556,3738688086,1092926436,2496269142,257381841,3772900718,1636087230,1477059743,2499234752,3811018894,2675660129,3285975680,90732309,1684827095,1150307763,1723134115,3237045386,1769919919,1240018934,815675215,750138730,2239792499,1234303040,1995484674,138143821,675421338,1145607174,1936608440,3238603024,2345230278,2105974004,323969391,779555213,3004902369,2861610098,1017501463,2098600890,2628620304,2940611490,2682542546,1171473753,3656571411,3687208071,4091869518,393037935,159126506,1662887367,1147106178,391545844,3452332695,1891500680,3016609650,1851642611,546529401,1167818917,3194020571,2848076033,3953471836,575554290,475796850,4134673196,450035699,2351251534,844027695,1080539133,86184846,1554234488,3692025454,1972511363,2018339607,1491841390,1141460869,1061690759,4244549243,2008416118,2351104703,2868147542,1598468138,722020353,1027143159,212344630,1387219594,1725294528,3745187956,2500153616,458938280,4129215917,1828119673,544571780,3503225445,2297937496,1241802790,267843827,2694610800,1397140384,1558801448,3782667683,1806446719,929573330,2234912681,400817706,616011623,4121520928,3603768725,1761550015,1968522284,4053731006,4192232858,4005120285,872482584,3140537016,3894607381,2287405443,1963876937,3663887957,1584857e3,2975024454,1833426440,4025083860],a[5]=[4143615901,749497569,1285769319,3795025788,2514159847,23610292,3974978748,844452780,3214870880,3751928557,2213566365,1676510905,448177848,3730751033,4086298418,2307502392,871450977,3222878141,4110862042,3831651966,2735270553,1310974780,2043402188,1218528103,2736035353,4274605013,2702448458,3936360550,2693061421,162023535,2827510090,687910808,23484817,3784910947,3371371616,779677500,3503626546,3473927188,4157212626,3500679282,4248902014,2466621104,3899384794,1958663117,925738300,1283408968,3669349440,1840910019,137959847,2679828185,1239142320,1315376211,1547541505,1690155329,739140458,3128809933,3933172616,3876308834,905091803,1548541325,4040461708,3095483362,144808038,451078856,676114313,2861728291,2469707347,993665471,373509091,2599041286,4025009006,4170239449,2149739950,3275793571,3749616649,2794760199,1534877388,572371878,2590613551,1753320020,3467782511,1405125690,4270405205,633333386,3026356924,3475123903,632057672,2846462855,1404951397,3882875879,3915906424,195638627,2385783745,3902872553,1233155085,3355999740,2380578713,2702246304,2144565621,3663341248,3894384975,2502479241,4248018925,3094885567,1594115437,572884632,3385116731,767645374,1331858858,1475698373,3793881790,3532746431,1321687957,619889600,1121017241,3440213920,2070816767,2833025776,1933951238,4095615791,890643334,3874130214,859025556,360630002,925594799,1764062180,3920222280,4078305929,979562269,2810700344,4087740022,1949714515,546639971,1165388173,3069891591,1495988560,922170659,1291546247,2107952832,1813327274,3406010024,3306028637,4241950635,153207855,2313154747,1608695416,1150242611,1967526857,721801357,1220138373,3691287617,3356069787,2112743302,3281662835,1111556101,1778980689,250857638,2298507990,673216130,2846488510,3207751581,3562756981,3008625920,3417367384,2198807050,529510932,3547516680,3426503187,2364944742,102533054,2294910856,1617093527,1204784762,3066581635,1019391227,1069574518,1317995090,1691889997,3661132003,510022745,3238594800,1362108837,1817929911,2184153760,805817662,1953603311,3699844737,120799444,2118332377,207536705,2282301548,4120041617,145305846,2508124933,3086745533,3261524335,1877257368,2977164480,3160454186,2503252186,4221677074,759945014,254147243,2767453419,3801518371,629083197,2471014217,907280572,3900796746,940896768,2751021123,2625262786,3161476951,3661752313,3260732218,1425318020,2977912069,1496677566,3988592072,2140652971,3126511541,3069632175,977771578,1392695845,1698528874,1411812681,1369733098,1343739227,3620887944,1142123638,67414216,3102056737,3088749194,1626167401,2546293654,3941374235,697522451,33404913,143560186,2595682037,994885535,1247667115,3859094837,2699155541,3547024625,4114935275,2968073508,3199963069,2732024527,1237921620,951448369,1898488916,1211705605,2790989240,2233243581,3598044975],a[6]=[2246066201,858518887,1714274303,3485882003,713916271,2879113490,3730835617,539548191,36158695,1298409750,419087104,1358007170,749914897,2989680476,1261868530,2995193822,2690628854,3443622377,3780124940,3796824509,2976433025,4259637129,1551479e3,512490819,1296650241,951993153,2436689437,2460458047,144139966,3136204276,310820559,3068840729,643875328,1969602020,1680088954,2185813161,3283332454,672358534,198762408,896343282,276269502,3014846926,84060815,197145886,376173866,3943890818,3813173521,3545068822,1316698879,1598252827,2633424951,1233235075,859989710,2358460855,3503838400,3409603720,1203513385,1193654839,2792018475,2060853022,207403770,1144516871,3068631394,1121114134,177607304,3785736302,326409831,1929119770,2983279095,4183308101,3474579288,3200513878,3228482096,119610148,1170376745,3378393471,3163473169,951863017,3337026068,3135789130,2907618374,1183797387,2015970143,4045674555,2182986399,2952138740,3928772205,384012900,2454997643,10178499,2879818989,2596892536,111523738,2995089006,451689641,3196290696,235406569,1441906262,3890558523,3013735005,4158569349,1644036924,376726067,1006849064,3664579700,2041234796,1021632941,1374734338,2566452058,371631263,4007144233,490221539,206551450,3140638584,1053219195,1853335209,3412429660,3562156231,735133835,1623211703,3104214392,2738312436,4096837757,3366392578,3110964274,3956598718,3196820781,2038037254,3877786376,2339753847,300912036,3766732888,2372630639,1516443558,4200396704,1574567987,4069441456,4122592016,2699739776,146372218,2748961456,2043888151,35287437,2596680554,655490400,1132482787,110692520,1031794116,2188192751,1324057718,1217253157,919197030,686247489,3261139658,1028237775,3135486431,3059715558,2460921700,986174950,2661811465,4062904701,2752986992,3709736643,367056889,1353824391,731860949,1650113154,1778481506,784341916,357075625,3608602432,1074092588,2480052770,3811426202,92751289,877911070,3600361838,1231880047,480201094,3756190983,3094495953,434011822,87971354,363687820,1717726236,1901380172,3926403882,2481662265,400339184,1490350766,2661455099,1389319756,2558787174,784598401,1983468483,30828846,3550527752,2716276238,3841122214,1765724805,1955612312,1277890269,1333098070,1564029816,2704417615,1026694237,3287671188,1260819201,3349086767,1016692350,1582273796,1073413053,1995943182,694588404,1025494639,3323872702,3551898420,4146854327,453260480,1316140391,1435673405,3038941953,3486689407,1622062951,403978347,817677117,950059133,4246079218,3278066075,1486738320,1417279718,481875527,2549965225,3933690356,760697757,1452955855,3897451437,1177426808,1702951038,4085348628,2447005172,1084371187,3516436277,3068336338,1073369276,1027665953,3284188590,1230553676,1368340146,2226246512,267243139,2274220762,4070734279,2497715176,2423353163,2504755875],a[7]=[3793104909,3151888380,2817252029,895778965,2005530807,3871412763,237245952,86829237,296341424,3851759377,3974600970,2475086196,709006108,1994621201,2972577594,937287164,3734691505,168608556,3189338153,2225080640,3139713551,3033610191,3025041904,77524477,185966941,1208824168,2344345178,1721625922,3354191921,1066374631,1927223579,1971335949,2483503697,1551748602,2881383779,2856329572,3003241482,48746954,1398218158,2050065058,313056748,4255789917,393167848,1912293076,940740642,3465845460,3091687853,2522601570,2197016661,1727764327,364383054,492521376,1291706479,3264136376,1474851438,1685747964,2575719748,1619776915,1814040067,970743798,1561002147,2925768690,2123093554,1880132620,3151188041,697884420,2550985770,2607674513,2659114323,110200136,1489731079,997519150,1378877361,3527870668,478029773,2766872923,1022481122,431258168,1112503832,897933369,2635587303,669726182,3383752315,918222264,163866573,3246985393,3776823163,114105080,1903216136,761148244,3571337562,1690750982,3166750252,1037045171,1888456500,2010454850,642736655,616092351,365016990,1185228132,4174898510,1043824992,2023083429,2241598885,3863320456,3279669087,3674716684,108438443,2132974366,830746235,606445527,4173263986,2204105912,1844756978,2532684181,4245352700,2969441100,3796921661,1335562986,4061524517,2720232303,2679424040,634407289,885462008,3294724487,3933892248,2094100220,339117932,4048830727,3202280980,1458155303,2689246273,1022871705,2464987878,3714515309,353796843,2822958815,4256850100,4052777845,551748367,618185374,3778635579,4020649912,1904685140,3069366075,2670879810,3407193292,2954511620,4058283405,2219449317,3135758300,1120655984,3447565834,1474845562,3577699062,550456716,3466908712,2043752612,881257467,869518812,2005220179,938474677,3305539448,3850417126,1315485940,3318264702,226533026,965733244,321539988,1136104718,804158748,573969341,3708209826,937399083,3290727049,2901666755,1461057207,4013193437,4066861423,3242773476,2421326174,1581322155,3028952165,786071460,3900391652,3918438532,1485433313,4023619836,3708277595,3678951060,953673138,1467089153,1930354364,1533292819,2492563023,1346121658,1685000834,1965281866,3765933717,4190206607,2052792609,3515332758,690371149,3125873887,2180283551,2903598061,3933952357,436236910,289419410,14314871,1242357089,2904507907,1616633776,2666382180,585885352,3471299210,2699507360,1432659641,277164553,3354103607,770115018,2303809295,3741942315,3177781868,2853364978,2269453327,3774259834,987383833,1290892879,225909803,1741533526,890078084,1496906255,1111072499,916028167,243534141,1252605537,2204162171,531204876,290011180,3916834213,102027703,237315147,209093447,1486785922,220223953,2758195998,4175039106,82940208,3127791296,2569425252,518464269,1353887104,3941492737,2377294467,3935040926]}function i(e){this.cast5=new n,this.cast5.setKey(e),this.encrypt=function(e){return this.cast5.encrypt(e)}}Object.defineProperty(r,"__esModule",{value:!0}),i.blockSize=i.prototype.blockSize=8,i.keySize=i.prototype.keySize=16,r.default=i},{}],63:[function(e,t,r){"use strict";function n(e,t,r,n,i,a){const s=[16843776,0,65536,16843780,16842756,66564,4,65536,1024,16843776,16843780,1024,16778244,16842756,16777216,4,1028,16778240,16778240,66560,66560,16842752,16842752,16778244,65540,16777220,16777220,65540,0,1028,66564,16777216,65536,16843780,4,16842752,16843776,16777216,16777216,1024,16842756,65536,66560,16777220,1024,4,16778244,66564,16843780,65540,16842752,16778244,16777220,1028,66564,16843776,1028,16778240,16778240,0,65540,66560,0,16842756],o=[-2146402272,-2147450880,32768,1081376,1048576,32,-2146435040,-2147450848,-2147483616,-2146402272,-2146402304,-2147483648,-2147450880,1048576,32,-2146435040,1081344,1048608,-2147450848,0,-2147483648,32768,1081376,-2146435072,1048608,-2147483616,0,1081344,32800,-2146402304,-2146435072,32800,0,1081376,-2146435040,1048576,-2147450848,-2146435072,-2146402304,32768,-2146435072,-2147450880,32,-2146402272,1081376,32,32768,-2147483648,32800,-2146402304,1048576,-2147483616,1048608,-2147450848,-2147483616,1048608,1081344,0,-2147450880,32800,-2147483648,-2146435040,-2146402272,1081344],u=[520,134349312,0,134348808,134218240,0,131592,134218240,131080,134217736,134217736,131072,134349320,131080,134348800,520,134217728,8,134349312,512,131584,134348800,134348808,131592,134218248,131584,131072,134218248,8,134349320,512,134217728,134349312,134217728,131080,520,131072,134349312,134218240,0,512,131080,134349320,134218240,134217736,512,0,134348808,134218248,131072,134217728,134349320,8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],l=[8396801,8321,8321,128,8396928,8388737,8388609,8193,0,8396800,8396800,8396929,129,0,8388736,8388609,1,8192,8388608,8396801,128,8388608,8193,8320,8388737,1,8320,8388736,8192,8396928,8396929,129,8388736,8388609,8396800,8396929,129,0,0,8396800,8320,8388736,8388737,1,8396801,8321,8321,128,8396929,129,1,8192,8388609,8193,8396928,8388737,8193,8320,8388608,8396801,128,8388608,8192,8396928],c=[256,34078976,34078720,1107296512,524288,256,1073741824,34078720,1074266368,524288,33554688,1074266368,1107296512,1107820544,524544,1073741824,33554432,1074266112,1074266112,0,1073742080,1107820800,1107820800,33554688,1107820544,1073742080,0,1107296256,34078976,33554432,1107296256,524544,524288,1107296512,256,33554432,1073741824,34078720,1107296512,1074266368,33554688,1073741824,1107820544,34078976,1074266368,256,33554432,1107820544,1107820800,524544,1107296256,1107820800,34078720,0,1074266112,1107296256,524544,33554688,1073742080,524288,0,1074266112,34078976,1073742080],f=[536870928,541065216,16384,541081616,541065216,16,541081616,4194304,536887296,4210704,4194304,536870928,4194320,536887296,536870912,16400,0,4194320,536887312,16384,4210688,536887312,16,541065232,541065232,0,4210704,541081600,16400,4210688,541081600,536870912,536887296,16,541065232,4210688,541081616,4194304,16400,536870928,4194304,536887296,536870912,16400,536870928,541081616,4210688,541065216,4210704,541081600,0,541065232,16,16384,541065216,4210704,16384,4194320,536887312,0,541081600,536870912,4194320,536887312],d=[2097152,69206018,67110914,0,2048,67110914,2099202,69208064,69208066,2097152,0,67108866,2,67108864,69206018,2050,67110912,2099202,2097154,67110912,67108866,69206016,69208064,2097154,69206016,2048,2050,69208066,2099200,2,67108864,2099200,67108864,2099200,2097152,67110914,67110914,69206018,69206018,2,2097154,67108864,67110912,2097152,69208064,2050,2099202,69208064,2050,67108866,69208066,69206016,2099200,0,2,69208066,0,2099202,69206016,2048,67108866,67110912,2048,2097154],h=[268439616,4096,262144,268701760,268435456,268439616,64,268435456,262208,268697600,268701760,266240,268701696,266304,4096,64,268697600,268435520,268439552,4160,266240,262208,268697664,268701696,4160,0,0,268697664,268435520,268439552,266304,262144,266304,262144,268701696,4096,64,268697664,4096,266304,268439552,64,268435520,268697600,268697664,268435456,262144,268439616,0,268701760,262208,268435520,268697600,268439552,268439616,0,268701760,266240,266240,4160,4160,262208,268435456,268701696];let p,y,m,g,w,b,_,v,k,A,S,P,E,x,M=0,K=t.length;const U=32===e.length?3:9;v=3===U?r?[0,32,2]:[30,-2,-2]:r?[0,32,2,62,30,-2,64,96,2]:[94,62,-2,32,64,2,30,-2,-2],r&&(K=(t=function(e,t){const r=8-e.length%8;let n;if(2===t&&r<8)n=" ".charCodeAt(0);else if(1===t)n=r;else{if(t||!(r<8)){if(8===r)return e;throw new Error("des: invalid padding")}n=0}const i=new Uint8Array(e.length+r);for(let a=0;a<e.length;a++)i[a]=e[a];for(let a=0;a<r;a++)i[e.length+a]=n;return i}(t,a)).length);let C=new Uint8Array(K),R=0;for(1===n&&(k=i[M++]<<24|i[M++]<<16|i[M++]<<8|i[M++],S=i[M++]<<24|i[M++]<<16|i[M++]<<8|i[M++],M=0);M<K;){for(b=t[M++]<<24|t[M++]<<16|t[M++]<<8|t[M++],_=t[M++]<<24|t[M++]<<16|t[M++]<<8|t[M++],1===n&&(r?(b^=k,_^=S):(A=k,P=S,k=b,S=_)),b^=(m=252645135&(b>>>4^_))<<4,b^=(m=65535&(b>>>16^(_^=m)))<<16,b^=m=858993459&((_^=m)>>>2^b),b^=m=16711935&((_^=m<<2)>>>8^b),b=(b^=(m=1431655765&(b>>>1^(_^=m<<8)))<<1)<<1|b>>>31,_=(_^=m)<<1|_>>>31,y=0;y<U;y+=3){for(E=v[y+1],x=v[y+2],p=v[y];p!==E;p+=x)g=_^e[p],w=(_>>>4|_<<28)^e[p+1],m=b,b=_,_=m^(o[g>>>24&63]|l[g>>>16&63]|f[g>>>8&63]|h[63&g]|s[w>>>24&63]|u[w>>>16&63]|c[w>>>8&63]|d[63&w]);m=b,b=_,_=m}_=_>>>1|_<<31,_^=m=1431655765&((b=b>>>1|b<<31)>>>1^_),_^=(m=16711935&(_>>>8^(b^=m<<1)))<<8,_^=(m=858993459&(_>>>2^(b^=m)))<<2,_^=m=65535&((b^=m)>>>16^_),_^=m=252645135&((b^=m<<16)>>>4^_),b^=m<<4,1===n&&(r?(k=b,S=_):(b^=A,_^=P)),C[R++]=b>>>24,C[R++]=b>>>16&255,C[R++]=b>>>8&255,C[R++]=255&b,C[R++]=_>>>24,C[R++]=_>>>16&255,C[R++]=_>>>8&255,C[R++]=255&_}return r||(C=function(e,t){let r,n=null;if(2===t)r=" ".charCodeAt(0);else if(1===t)n=e[e.length-1];else{if(t)throw new Error("des: invalid padding");r=0}if(!n){for(n=1;e[e.length-n]===r;)n++;n--}return e.subarray(0,e.length-n)}(C,a)),C}function i(e){const t=[0,4,536870912,536870916,65536,65540,536936448,536936452,512,516,536871424,536871428,66048,66052,536936960,536936964],r=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],n=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],i=[0,2097152,134217728,136314880,8192,2105344,134225920,136323072,131072,2228224,134348800,136445952,139264,2236416,134356992,136454144],a=[0,262144,16,262160,0,262144,16,262160,4096,266240,4112,266256,4096,266240,4112,266256],s=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],o=[0,268435456,524288,268959744,2,268435458,524290,268959746,0,268435456,524288,268959744,2,268435458,524290,268959746],u=[0,65536,2048,67584,536870912,536936448,536872960,536938496,131072,196608,133120,198656,537001984,537067520,537004032,537069568],l=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],c=[0,268435456,8,268435464,0,268435456,8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],f=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],d=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],h=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],p=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],y=e.length>8?3:1,m=new Array(32*y),g=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0];let w,b,_,v=0,k=0;for(let A=0;A<y;A++){let y=e[v++]<<24|e[v++]<<16|e[v++]<<8|e[v++],A=e[v++]<<24|e[v++]<<16|e[v++]<<8|e[v++];y^=(_=252645135&(y>>>4^A))<<4,y^=_=65535&((A^=_)>>>-16^y),y^=(_=858993459&(y>>>2^(A^=_<<-16)))<<2,y^=_=65535&((A^=_)>>>-16^y),y^=(_=1431655765&(y>>>1^(A^=_<<-16)))<<1,y^=_=16711935&((A^=_)>>>8^y),_=(y^=(_=1431655765&(y>>>1^(A^=_<<8)))<<1)<<8|(A^=_)>>>20&240,y=A<<24|A<<8&16711680|A>>>8&65280|A>>>24&240,A=_;for(let e=0;e<g.length;e++)g[e]?(y=y<<2|y>>>26,A=A<<2|A>>>26):(y=y<<1|y>>>27,A=A<<1|A>>>27),_=65535&((b=u[(A&=-15)>>>28]|l[A>>>24&15]|c[A>>>20&15]|f[A>>>16&15]|d[A>>>12&15]|h[A>>>8&15]|p[A>>>4&15])>>>16^(w=t[(y&=-15)>>>28]|r[y>>>24&15]|n[y>>>20&15]|i[y>>>16&15]|a[y>>>12&15]|s[y>>>8&15]|o[y>>>4&15])),m[k++]=w^_,m[k++]=b^_<<16}return m}function a(e){this.key=[];for(let t=0;t<3;t++)this.key.push(new Uint8Array(e.subarray(8*t,8*t+8)));this.encrypt=function(e){return n(i(this.key[2]),n(i(this.key[1]),n(i(this.key[0]),e,!0,0,null,null),!1,0,null,null),!0,0,null,null)}}Object.defineProperty(r,"__esModule",{value:!0}),a.keySize=a.prototype.keySize=24,a.blockSize=a.prototype.blockSize=8,r.default={DES:function(e){this.key=e,this.encrypt=function(e,t){return n(i(this.key),e,!0,0,null,t)},this.decrypt=function(e,t){return n(i(this.key),e,!1,0,null,t)}},TripleDES:a}},{}],64:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=u(e("./aes")),i=u(e("./des.js")),a=u(e("./cast5")),s=u(e("./twofish")),o=u(e("./blowfish"));function u(e){return e&&e.__esModule?e:{default:e}}r.default={aes128:(0,n.default)(128),aes192:(0,n.default)(192),aes256:(0,n.default)(256),des:i.default.DES,tripledes:i.default.TripleDES,"3des":i.default.TripleDES,cast5:a.default,twofish:s.default,blowfish:o.default,idea:function(){throw new Error("IDEA symmetric-key algorithm not implemented")}}},{"./aes":60,"./blowfish":61,"./cast5":62,"./des.js":63,"./twofish":65}],65:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});const n=4294967295;function i(e,t){return(e<<t|e>>>32-t)&n}function a(e,t){return e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24}function s(e,t,r){e.splice(t,4,255&r,r>>>8&255,r>>>16&255,r>>>24&255)}function o(e,t){return e>>>8*t&255}function u(e){this.tf=function(){let e=null,t=null,r=-1,u=[],l=[[],[],[],[]];function c(e){return l[0][o(e,0)]^l[1][o(e,1)]^l[2][o(e,2)]^l[3][o(e,3)]}function f(e){return l[0][o(e,3)]^l[1][o(e,0)]^l[2][o(e,1)]^l[3][o(e,2)]}function d(e,t){let r=c(t[0]),a=f(t[1]);t[2]=i(t[2]^r+a+u[4*e+8]&n,31),t[3]=i(t[3],1)^r+2*a+u[4*e+9]&n,r=c(t[2]),a=f(t[3]),t[0]=i(t[0]^r+a+u[4*e+10]&n,31),t[1]=i(t[1],1)^r+2*a+u[4*e+11]&n}function h(e,t){let r=c(t[0]),a=f(t[1]);t[2]=i(t[2],1)^r+a+u[4*e+10]&n,t[3]=i(t[3]^r+2*a+u[4*e+11]&n,31),r=c(t[2]),a=f(t[3]),t[0]=i(t[0],1)^r+a+u[4*e+8]&n,t[1]=i(t[1]^r+2*a+u[4*e+9]&n,31)}return{name:"twofish",blocksize:16,open:function(t){let r,s,c,f,d;const h=[],p=[],y=[];let m;const g=[];let w,b,_;const v=[[8,1,7,13,6,15,3,2,0,11,5,9,14,12,10,4],[2,8,11,13,15,7,6,14,3,1,9,4,0,10,12,5]],k=[[14,12,11,8,1,2,3,5,15,4,10,6,7,0,9,13],[1,14,2,11,4,12,3,7,6,13,10,5,15,9,0,8]],A=[[11,10,5,14,6,13,9,0,12,8,15,3,2,4,7,1],[4,12,7,5,1,6,9,10,0,14,13,8,2,11,3,15]],S=[[13,7,15,4,1,2,6,14,9,11,3,0,8,5,12,10],[11,9,5,1,12,3,13,14,6,4,7,15,2,0,8,10]],P=[0,8,1,9,2,10,3,11,4,12,5,13,6,14,7,15],E=[0,9,2,11,4,13,6,15,8,1,10,3,12,5,14,7],x=[[],[]],M=[[],[],[],[]];function K(e){return e^e>>2^[0,90,180,238][3&e]}function U(e){return e^e>>1^e>>2^[0,238,180,90][3&e]}function C(e,t){let r,i,a;for(r=0;r<8;r++)i=t>>>24,t=t<<8&n|e>>>24,e=e<<8&n,a=i<<1,128&i&&(a^=333),t^=i^a<<16,a^=i>>>1,1&i&&(a^=166),t^=a<<24|a<<8;return t}function R(e,t){const r=t>>4,n=15&t,i=v[e][r^n],a=k[e][P[n]^E[r]];return S[e][P[a]^E[i]]<<4|A[e][i^a]}function T(e,t){let r=o(e,0),n=o(e,1),i=o(e,2),a=o(e,3);switch(m){case 4:r=x[1][r]^o(t[3],0),n=x[0][n]^o(t[3],1),i=x[0][i]^o(t[3],2),a=x[1][a]^o(t[3],3);case 3:r=x[1][r]^o(t[2],0),n=x[1][n]^o(t[2],1),i=x[0][i]^o(t[2],2),a=x[0][a]^o(t[2],3);case 2:r=x[0][x[0][r]^o(t[1],0)]^o(t[0],0),n=x[0][x[1][n]^o(t[1],1)]^o(t[0],1),i=x[1][x[0][i]^o(t[1],2)]^o(t[0],2),a=x[1][x[1][a]^o(t[1],3)]^o(t[0],3)}return M[0][r]^M[1][n]^M[2][i]^M[3][a]}for(r=(e=(e=t).slice(0,32)).length;16!==r&&24!==r&&32!==r;)e[r++]=0;for(r=0;r<e.length;r+=4)y[r>>2]=a(e,r);for(r=0;r<256;r++)x[0][r]=R(0,r),x[1][r]=R(1,r);for(r=0;r<256;r++)b=K(w=x[1][r]),_=U(w),M[0][r]=w+(b<<8)+(_<<16)+(_<<24),M[2][r]=b+(_<<8)+(w<<16)+(_<<24),b=K(w=x[0][r]),_=U(w),M[1][r]=_+(_<<8)+(b<<16)+(w<<24),M[3][r]=b+(w<<8)+(_<<16)+(b<<24);for(m=y.length/2,r=0;r<m;r++)s=y[r+r],h[r]=s,c=y[r+r+1],p[r]=c,g[m-r-1]=C(s,c);for(r=0;r<40;r+=2)c=16843009+(s=16843009*r),s=T(s,h),c=i(T(c,p),8),u[r]=s+c&n,u[r+1]=i(s+2*c,9);for(r=0;r<256;r++)switch(s=c=f=d=r,m){case 4:s=x[1][s]^o(g[3],0),c=x[0][c]^o(g[3],1),f=x[0][f]^o(g[3],2),d=x[1][d]^o(g[3],3);case 3:s=x[1][s]^o(g[2],0),c=x[1][c]^o(g[2],1),f=x[0][f]^o(g[2],2),d=x[0][d]^o(g[2],3);case 2:l[0][r]=M[0][x[0][x[0][s]^o(g[1],0)]^o(g[0],0)],l[1][r]=M[1][x[0][x[1][c]^o(g[1],1)]^o(g[0],1)],l[2][r]=M[2][x[1][x[0][f]^o(g[1],2)]^o(g[0],2)],l[3][r]=M[3][x[1][x[1][d]^o(g[1],3)]^o(g[0],3)]}},close:function(){u=[],l=[[],[],[],[]]},encrypt:function(e,n){const i=[a(t=e,r=n)^u[0],a(t,r+4)^u[1],a(t,r+8)^u[2],a(t,r+12)^u[3]];for(let t=0;t<8;t++)d(t,i);return s(t,r,i[2]^u[4]),s(t,r+4,i[3]^u[5]),s(t,r+8,i[0]^u[6]),s(t,r+12,i[1]^u[7]),r+=16,t},decrypt:function(e,n){const i=[a(t=e,r=n)^u[4],a(t,r+4)^u[5],a(t,r+8)^u[6],a(t,r+12)^u[7]];for(let t=7;t>=0;t--)h(t,i);s(t,r,i[2]^u[0]),s(t,r+4,i[3]^u[1]),s(t,r+8,i[0]^u[2]),s(t,r+12,i[1]^u[3]),r+=16},finalize:function(){return t}}}(),this.tf.open(Array.from(e),0),this.encrypt=function(e){return this.tf.encrypt(Array.from(e),0)}}u.keySize=u.prototype.keySize=32,u.blockSize=u.prototype.blockSize=16,r.default=u},{}],66:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n,i=e("asmcrypto.js/dist_es5/aes/cbc"),a=e("../util"),s=(n=a)&&n.__esModule?n:{default:n};const o=s.default.getWebCrypto(),u=s.default.getNodeCrypto(),l=s.default.getNodeBuffer(),c=16;function f(e,t){const r=e.length-c;for(let n=0;n<c;n++)e[n+r]^=t[n];return e}const d=new Uint8Array(c);r.default=async function(e){const t=await async function(e){if(s.default.getWebCrypto()&&24!==e.length)return e=await o.importKey("raw",e,{name:"AES-CBC",length:8*e.length},!1,["encrypt"]),async function(t){const r=await o.encrypt({name:"AES-CBC",iv:d,length:8*c},e,t);return new Uint8Array(r).subarray(0,r.byteLength-c)};if(s.default.getNodeCrypto())return e=l.from(e),async function(t){t=l.from(t);const r=new u.createCipheriv("aes-"+8*e.length+"-cbc",e,d),n=r.update(t);return new Uint8Array(n)};return async function(t){return i.AES_CBC.encrypt(t,e,!1,d)}}(e),r=s.default.double(await t(d)),n=s.default.double(r);return async function(e){return(await t(function(e,t,r){if(e.length&&e.length%c==0)return f(e,t);const n=new Uint8Array(e.length+(c-e.length%c));return n.set(e),n[e.length]=128,f(n,r)}(e,r,n))).subarray(-c)}}},{"../util":136,"asmcrypto.js/dist_es5/aes/cbc":4}],67:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=p(e("./public_key")),i=p(e("./cipher")),a=p(e("./random")),s=p(e("../type/ecdh_symkey")),o=p(e("../type/kdf_params")),u=p(e("../type/mpi")),l=p(e("../type/oid")),c=p(e("../enums")),f=p(e("../util")),d=p(e("./pkcs1")),h=p(e("./pkcs5"));function p(e){return e&&e.__esModule?e:{default:e}}function y(e,t){return e.map(function(e,r){return t&&t[r]?new e(t[r]):new e})}r.default={publicKeyEncrypt:async function(e,t,r,i){const a=this.getEncSessionKeyParamTypes(e);switch(e){case c.default.publicKey.rsa_encrypt:case c.default.publicKey.rsa_encrypt_sign:{r=f.default.str_to_Uint8Array(r);const e=t[0].toUint8Array(),i=t[1].toUint8Array();return y(a,[await n.default.rsa.encrypt(r,e,i)])}case c.default.publicKey.elgamal:{const e=(r=new u.default(await d.default.eme.encode(r,t[0].byteLength()))).toBN(),i=t[0].toBN(),s=t[1].toBN(),o=t[2].toBN(),l=await n.default.elgamal.encrypt(e,i,s,o);return y(a,[l.c1,l.c2])}case c.default.publicKey.ecdh:{r=new u.default(h.default.encode(r));const e=t[0],o=t[1].toUint8Array(),l=t[2];var s=await n.default.elliptic.ecdh.encrypt(e,l,r,o,i);return y(a,[s.publicKey,s.wrappedKey])}default:return[]}},publicKeyDecrypt:async function(e,t,r,i){switch(e){case c.default.publicKey.rsa_encrypt_sign:case c.default.publicKey.rsa_encrypt:{const e=r[0].toUint8Array(),i=t[0].toUint8Array(),a=t[1].toUint8Array(),s=t[2].toUint8Array(),o=t[3].toUint8Array(),u=t[4].toUint8Array(),l=t[5].toUint8Array();return n.default.rsa.decrypt(e,i,a,s,o,u,l)}case c.default.publicKey.elgamal:{const e=r[0].toBN(),i=r[1].toBN(),a=t[0].toBN(),s=t[3].toBN(),o=new u.default(await n.default.elgamal.decrypt(e,i,a,s));return d.default.eme.decode(f.default.Uint8Array_to_str(o.toUint8Array("be",a.byteLength())))}case c.default.publicKey.ecdh:{const e=t[0],a=t[2],s=r[0].toUint8Array(),o=r[1].data,l=t[1].toUint8Array(),c=t[3].toUint8Array(),f=new u.default(await n.default.elliptic.ecdh.decrypt(e,a,s,o,l,c,i));return h.default.decode(f.toString())}default:throw new Error("Invalid public key encryption algorithm.")}},getPrivKeyParamTypes:function(e){switch(e){case c.default.publicKey.rsa_encrypt:case c.default.publicKey.rsa_encrypt_sign:case c.default.publicKey.rsa_sign:return[u.default,u.default,u.default,u.default];case c.default.publicKey.elgamal:case c.default.publicKey.dsa:return[u.default];case c.default.publicKey.ecdh:case c.default.publicKey.ecdsa:case c.default.publicKey.eddsa:return[u.default];default:throw new Error("Invalid public key encryption algorithm.")}},getPubKeyParamTypes:function(e){switch(e){case c.default.publicKey.rsa_encrypt:case c.default.publicKey.rsa_encrypt_sign:case c.default.publicKey.rsa_sign:return[u.default,u.default];case c.default.publicKey.elgamal:return[u.default,u.default,u.default];case c.default.publicKey.dsa:return[u.default,u.default,u.default,u.default];case c.default.publicKey.ecdsa:case c.default.publicKey.eddsa:return[l.default,u.default];case c.default.publicKey.ecdh:return[l.default,u.default,o.default];default:throw new Error("Invalid public key encryption algorithm.")}},getEncSessionKeyParamTypes:function(e){switch(e){case c.default.publicKey.rsa_encrypt:case c.default.publicKey.rsa_encrypt_sign:return[u.default];case c.default.publicKey.elgamal:return[u.default,u.default];case c.default.publicKey.ecdh:return[u.default,s.default];default:throw new Error("Invalid public key encryption algorithm.")}},generateParams:function(e,t,r){const i=[].concat(this.getPubKeyParamTypes(e),this.getPrivKeyParamTypes(e));switch(e){case c.default.publicKey.rsa_encrypt:case c.default.publicKey.rsa_encrypt_sign:case c.default.publicKey.rsa_sign:return n.default.rsa.generate(t,"10001").then(function(e){return y(i,[e.n,e.e,e.d,e.p,e.q,e.u])});case c.default.publicKey.dsa:case c.default.publicKey.elgamal:throw new Error("Unsupported algorithm for key generation.");case c.default.publicKey.ecdsa:case c.default.publicKey.eddsa:return n.default.elliptic.generate(r).then(function(e){return y(i,[e.oid,e.Q,e.d])});case c.default.publicKey.ecdh:return n.default.elliptic.generate(r).then(function(e){return y(i,[e.oid,e.Q,{hash:e.hash,cipher:e.cipher},e.d])});default:throw new Error("Invalid public key algorithm.")}},validateParams:async function(e,t){switch(e){case c.default.publicKey.rsa_encrypt:case c.default.publicKey.rsa_encrypt_sign:case c.default.publicKey.rsa_sign:{if(t.length<6)throw new Error("Missing key parameters");const e=t[0].toUint8Array(),r=t[1].toUint8Array(),i=t[2].toUint8Array(),a=t[3].toUint8Array(),s=t[4].toUint8Array(),o=t[5].toUint8Array();return n.default.rsa.validateParams(e,r,i,a,s,o)}case c.default.publicKey.dsa:{if(t.length<5)throw new Error("Missing key parameters");const e=t[0].toUint8Array(),r=t[1].toUint8Array(),i=t[2].toUint8Array(),a=t[3].toUint8Array(),s=t[4].toUint8Array();return n.default.dsa.validateParams(e,r,i,a,s)}case c.default.publicKey.elgamal:{if(t.length<4)throw new Error("Missing key parameters");const e=t[0].toUint8Array(),r=t[1].toUint8Array(),i=t[2].toUint8Array(),a=t[3].toUint8Array();return n.default.elgamal.validateParams(e,r,i,a)}case c.default.publicKey.ecdsa:case c.default.publicKey.ecdh:{const i=e===c.default.publicKey.ecdh?3:2;if(t.length<i)throw new Error("Missing key parameters");const a=n.default.elliptic[c.default.read(c.default.publicKey,e)];var r=a.parseParams(t);const s=r.oid,o=r.Q,u=r.d;return a.validateParams(s,o,u)}case c.default.publicKey.eddsa:{const e=3;if(t.length<e)throw new Error("Missing key parameters");var i=n.default.elliptic.eddsa.parseParams(t);const r=i.oid,a=i.Q,s=i.seed;return n.default.elliptic.eddsa.validateParams(r,a,s)}default:throw new Error("Invalid public key algorithm.")}},getPrefixRandom:async function(e){const t=await a.default.getRandomBytes(i.default[e].blockSize),r=new Uint8Array([t[t.length-2],t[t.length-1]]);return f.default.concat([t,r])},generateSessionKey:function(e){return a.default.getRandomBytes(i.default[e].keySize)},constructParams:y}},{"../enums":91,"../type/ecdh_symkey":130,"../type/kdf_params":131,"../type/mpi":133,"../type/oid":134,"../util":136,"./cipher":64,"./pkcs1":74,"./pkcs5":75,"./public_key":84,"./random":87}],68:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var r=[],n=!0,i=!1,a=void 0;try{for(var s,o=e[Symbol.iterator]();!(n=(s=o.next()).done)&&(r.push(s.value),!t||r.length!==t);n=!0);}catch(u){i=!0,a=u}finally{try{!n&&o.return&&o.return()}finally{if(i)throw a}}return r}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=e("asmcrypto.js/dist_es5/aes/ctr"),a=o(e("./cmac")),s=o(e("../util"));function o(e){return e&&e.__esModule?e:{default:e}}const u=s.default.getWebCrypto(),l=s.default.getNodeCrypto(),c=s.default.getNodeBuffer(),f=16,d=f,h=f,p=new Uint8Array(f),y=new Uint8Array(f);y[f-1]=1;const m=new Uint8Array(f);async function g(e){const t=await(0,a.default)(e);return function(e,r){return t(s.default.concatUint8Array([e,r]))}}async function w(e){return s.default.getWebCrypto()&&24!==e.length&&-1===navigator.userAgent.indexOf("Edge")?(e=await u.importKey("raw",e,{name:"AES-CTR",length:8*e.length},!1,["encrypt"]),async function(t,r){const n=await u.encrypt({name:"AES-CTR",counter:r,length:8*f},e,t);return new Uint8Array(n)}):s.default.getNodeCrypto()?(e=c.from(e),async function(t,r){t=c.from(t),r=c.from(r);const n=new l.createCipheriv("aes-"+8*e.length+"-ctr",e,r),i=c.concat([n.update(t),n.final()]);return new Uint8Array(i)}):async function(t,r){return i.AES_CTR.encrypt(t,e,r)}}async function b(e,t){if("aes"!==e.substr(0,3))throw new Error("EAX mode supports only AES cipher");var r=await Promise.all([g(t),w(t)]),i=n(r,2);const a=i[0],o=i[1];return{encrypt:async function(e,t,r){var i=await Promise.all([a(p,t),a(y,r)]),u=n(i,2);const l=u[0],c=u[1],f=await o(e,l),d=await a(m,f);for(let n=0;n<h;n++)d[n]^=c[n]^l[n];return s.default.concatUint8Array([f,d])},decrypt:async function(e,t,r){if(e.length<h)throw new Error("Invalid EAX ciphertext");const i=e.subarray(0,-h),u=e.subarray(-h);var l=await Promise.all([a(p,t),a(y,r),a(m,i)]),c=n(l,3);const f=c[0],d=c[1],g=c[2];for(let n=0;n<h;n++)g[n]^=d[n]^f[n];if(!s.default.equalsUint8Array(u,g))throw new Error("Authentication tag mismatch");return await o(i,f)}}}m[f-1]=2,b.getNonce=function(e,t){const r=e.slice();for(let n=0;n<t.length;n++)r[8+n]^=t[n];return r},b.blockLength=f,b.ivLength=d,b.tagLength=h,r.default=b},{"../util":136,"./cmac":66,"asmcrypto.js/dist_es5/aes/ctr":6}],69:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n,i=e("asmcrypto.js/dist_es5/aes/gcm"),a=e("../util"),s=(n=a)&&n.__esModule?n:{default:n};const o=s.default.getWebCrypto(),u=s.default.getNodeCrypto(),l=s.default.getNodeBuffer(),c=16,f="AES-GCM";async function d(e,t){if("aes"!==e.substr(0,3))throw new Error("GCM mode supports only AES cipher");if(s.default.getWebCrypto()&&24!==t.length){const e=await o.importKey("raw",t,{name:f},!1,["encrypt","decrypt"]);return{encrypt:async function(r,n,a=new Uint8Array){if(!r.length||!a.length&&-1!==navigator.userAgent.indexOf("Edge"))return i.AES_GCM.encrypt(r,t,n,a);const s=await o.encrypt({name:f,iv:n,additionalData:a,tagLength:8*c},e,r);return new Uint8Array(s)},decrypt:async function(r,n,a=new Uint8Array){if(r.length===c||!a.length&&-1!==navigator.userAgent.indexOf("Edge"))return i.AES_GCM.decrypt(r,t,n,a);const s=await o.decrypt({name:f,iv:n,additionalData:a,tagLength:8*c},e,r);return new Uint8Array(s)}}}return s.default.getNodeCrypto()?(t=l.from(t),{encrypt:async function(e,r,n=new Uint8Array){e=l.from(e),r=l.from(r),n=l.from(n);const i=new u.createCipheriv("aes-"+8*t.length+"-gcm",t,r);i.setAAD(n);const a=l.concat([i.update(e),i.final(),i.getAuthTag()]);return new Uint8Array(a)},decrypt:async function(e,r,n=new Uint8Array){e=l.from(e),r=l.from(r),n=l.from(n);const i=new u.createDecipheriv("aes-"+8*t.length+"-gcm",t,r);i.setAAD(n),i.setAuthTag(e.slice(e.length-c,e.length));const a=l.concat([i.update(e.slice(0,e.length-c)),i.final()]);return new Uint8Array(a)}}):{encrypt:async function(e,r,n){return i.AES_GCM.encrypt(e,t,r,n)},decrypt:async function(e,r,n){return i.AES_GCM.decrypt(e,t,r,n)}}}d.getNonce=function(e,t){const r=e.slice();for(let n=0;n<t.length;n++)r[4+n]^=t[n];return r},d.blockLength=16,d.ivLength=12,d.tagLength=c,r.default=d},{"../util":136,"asmcrypto.js/dist_es5/aes/gcm":8}],70:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e("asmcrypto.js/dist_es5/hash/sha1/sha1"),i=e("asmcrypto.js/dist_es5/hash/sha256/sha256"),a=h(e("hash.js/lib/hash/sha/224")),s=h(e("hash.js/lib/hash/sha/384")),o=h(e("hash.js/lib/hash/sha/512")),u=e("hash.js/lib/hash/ripemd"),l=h(e("web-stream-tools")),c=h(e("./md5")),f=h(e("../../config")),d=h(e("../../util"));function h(e){return e&&e.__esModule?e:{default:e}}const p=d.default.getWebCrypto(),y=d.default.getNodeCrypto(),m=d.default.getNodeBuffer();function g(e){return async function(t){const r=y.createHash(e);return l.default.transform(t,e=>{r.update(m.from(e))},()=>new Uint8Array(r.digest()))}}function w(e,t){return async function(r){if(!d.default.isStream(r)&&p&&t&&r.length>=f.default.min_bytes_for_web_crypto)return new Uint8Array(await p.digest(t,r));const n=e();return l.default.transform(r,e=>{n.update(e)},()=>new Uint8Array(n.digest()))}}function b(e,t){return async function(r){if(d.default.isStream(r)){const t=new e;return l.default.transform(r,e=>{t.process(e)},()=>t.finish().result)}return p&&t&&r.length>=f.default.min_bytes_for_web_crypto?new Uint8Array(await p.digest(t,r)):e.bytes(r)}}let _;_=y?{md5:g("md5"),sha1:g("sha1"),sha224:g("sha224"),sha256:g("sha256"),sha384:g("sha384"),sha512:g("sha512"),ripemd:g("ripemd160")}:{md5:c.default,sha1:b(n.Sha1,-1===navigator.userAgent.indexOf("Edge")&&"SHA-1"),sha224:w(a.default),sha256:b(i.Sha256,"SHA-256"),sha384:w(s.default,"SHA-384"),sha512:w(o.default,"SHA-512"),ripemd:w(u.ripemd160)},r.default={md5:_.md5,sha1:_.sha1,sha224:_.sha224,sha256:_.sha256,sha384:_.sha384,sha512:_.sha512,ripemd:_.ripemd,digest:function(e,t){switch(e){case 1:return this.md5(t);case 2:return this.sha1(t);case 3:return this.ripemd(t);case 8:return this.sha256(t);case 9:return this.sha384(t);case 10:return this.sha512(t);case 11:return this.sha224(t);default:throw new Error("Invalid hash function.")}},getHashByteLength:function(e){switch(e){case 1:return 16;case 2:case 3:return 20;case 8:return 32;case 9:return 48;case 10:return 64;case 11:return 28;default:throw new Error("Invalid hash algorithm.")}}}},{"../../config":57,"../../util":136,"./md5":71,"asmcrypto.js/dist_es5/hash/sha1/sha1":11,"asmcrypto.js/dist_es5/hash/sha256/sha256":13,"hash.js/lib/hash/ripemd":19,"hash.js/lib/hash/sha/224":20,"hash.js/lib/hash/sha/384":22,"hash.js/lib/hash/sha/512":23,"web-stream-tools":53}],71:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n,i=e("../../util"),a=(n=i)&&n.__esModule?n:{default:n};function s(e,t){let r=e[0],n=e[1],i=e[2],a=e[3];r=u(r,n,i,a,t[0],7,-680876936),a=u(a,r,n,i,t[1],12,-389564586),i=u(i,a,r,n,t[2],17,606105819),n=u(n,i,a,r,t[3],22,-1044525330),r=u(r,n,i,a,t[4],7,-176418897),a=u(a,r,n,i,t[5],12,1200080426),i=u(i,a,r,n,t[6],17,-1473231341),n=u(n,i,a,r,t[7],22,-45705983),r=u(r,n,i,a,t[8],7,1770035416),a=u(a,r,n,i,t[9],12,-1958414417),i=u(i,a,r,n,t[10],17,-42063),n=u(n,i,a,r,t[11],22,-1990404162),r=u(r,n,i,a,t[12],7,1804603682),a=u(a,r,n,i,t[13],12,-40341101),i=u(i,a,r,n,t[14],17,-1502002290),r=l(r,n=u(n,i,a,r,t[15],22,1236535329),i,a,t[1],5,-165796510),a=l(a,r,n,i,t[6],9,-1069501632),i=l(i,a,r,n,t[11],14,643717713),n=l(n,i,a,r,t[0],20,-373897302),r=l(r,n,i,a,t[5],5,-701558691),a=l(a,r,n,i,t[10],9,38016083),i=l(i,a,r,n,t[15],14,-660478335),n=l(n,i,a,r,t[4],20,-405537848),r=l(r,n,i,a,t[9],5,568446438),a=l(a,r,n,i,t[14],9,-1019803690),i=l(i,a,r,n,t[3],14,-187363961),n=l(n,i,a,r,t[8],20,1163531501),r=l(r,n,i,a,t[13],5,-1444681467),a=l(a,r,n,i,t[2],9,-51403784),i=l(i,a,r,n,t[7],14,1735328473),r=c(r,n=l(n,i,a,r,t[12],20,-1926607734),i,a,t[5],4,-378558),a=c(a,r,n,i,t[8],11,-2022574463),i=c(i,a,r,n,t[11],16,1839030562),n=c(n,i,a,r,t[14],23,-35309556),r=c(r,n,i,a,t[1],4,-1530992060),a=c(a,r,n,i,t[4],11,1272893353),i=c(i,a,r,n,t[7],16,-155497632),n=c(n,i,a,r,t[10],23,-1094730640),r=c(r,n,i,a,t[13],4,681279174),a=c(a,r,n,i,t[0],11,-358537222),i=c(i,a,r,n,t[3],16,-722521979),n=c(n,i,a,r,t[6],23,76029189),r=c(r,n,i,a,t[9],4,-640364487),a=c(a,r,n,i,t[12],11,-421815835),i=c(i,a,r,n,t[15],16,530742520),r=f(r,n=c(n,i,a,r,t[2],23,-995338651),i,a,t[0],6,-198630844),a=f(a,r,n,i,t[7],10,1126891415),i=f(i,a,r,n,t[14],15,-1416354905),n=f(n,i,a,r,t[5],21,-57434055),r=f(r,n,i,a,t[12],6,1700485571),a=f(a,r,n,i,t[3],10,-1894986606),i=f(i,a,r,n,t[10],15,-1051523),n=f(n,i,a,r,t[1],21,-2054922799),r=f(r,n,i,a,t[8],6,1873313359),a=f(a,r,n,i,t[15],10,-30611744),i=f(i,a,r,n,t[6],15,-1560198380),n=f(n,i,a,r,t[13],21,1309151649),r=f(r,n,i,a,t[4],6,-145523070),a=f(a,r,n,i,t[11],10,-1120210379),i=f(i,a,r,n,t[2],15,718787259),n=f(n,i,a,r,t[9],21,-343485551),e[0]=y(r,e[0]),e[1]=y(n,e[1]),e[2]=y(i,e[2]),e[3]=y(a,e[3])}function o(e,t,r,n,i,a){return t=y(y(t,e),y(n,a)),y(t<<i|t>>>32-i,r)}function u(e,t,r,n,i,a,s){return o(t&r|~t&n,e,t,i,a,s)}function l(e,t,r,n,i,a,s){return o(t&n|r&~n,e,t,i,a,s)}function c(e,t,r,n,i,a,s){return o(t^r^n,e,t,i,a,s)}function f(e,t,r,n,i,a,s){return o(r^(t|~n),e,t,i,a,s)}function d(e){const t=[];let r;for(r=0;r<64;r+=4)t[r>>2]=e.charCodeAt(r)+(e.charCodeAt(r+1)<<8)+(e.charCodeAt(r+2)<<16)+(e.charCodeAt(r+3)<<24);return t}const h="0123456789abcdef".split("");function p(e){let t="",r=0;for(;r<4;r++)t+=h[e>>8*r+4&15]+h[e>>8*r&15];return t}function y(e,t){return e+t&4294967295}r.default=async function(e){const t=function(e){const t=e.length,r=[1732584193,-271733879,-1732584194,271733878];let n;for(n=64;n<=e.length;n+=64)s(r,d(e.substring(n-64,n)));e=e.substring(n-64);const i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(n=0;n<e.length;n++)i[n>>2]|=e.charCodeAt(n)<<(n%4<<3);if(i[n>>2]|=128<<(n%4<<3),n>55)for(s(r,i),n=0;n<16;n++)i[n]=0;return i[14]=8*t,s(r,i),r}(a.default.Uint8Array_to_str(e));return a.default.hex_to_Uint8Array(function(e){for(let t=0;t<e.length;t++)e[t]=p(e[t]);return e.join("")}(t))}},{"../../util":136}],72:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=m(e("./cipher")),i=m(e("./hash")),a=m(e("./cfb")),s=m(e("./gcm")),o=m(e("./eax")),u=m(e("./ocb")),l=m(e("./public_key")),c=m(e("./signature")),f=m(e("./random")),d=m(e("./pkcs1")),h=m(e("./pkcs5")),p=m(e("./crypto")),y=m(e("./aes_kw"));function m(e){return e&&e.__esModule?e:{default:e}}const g={cipher:n.default,hash:i.default,cfb:a.default,gcm:s.default,experimental_gcm:s.default,eax:o.default,ocb:u.default,publicKey:l.default,signature:c.default,random:f.default,pkcs1:d.default,pkcs5:h.default,aes_kw:y.default};Object.assign(g,p.default),r.default=g},{"./aes_kw":58,"./cfb":59,"./cipher":64,"./crypto":67,"./eax":68,"./gcm":69,"./hash":70,"./ocb":73,"./pkcs1":74,"./pkcs5":75,"./public_key":84,"./random":87,"./signature":88}],73:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=a(e("./cipher")),i=a(e("../util"));function a(e){return e&&e.__esModule?e:{default:e}}const s=16,o=15,u=16;function l(e){let t=0;for(let r=1;0==(e&r);r<<=1)t++;return t}function c(e,t){for(let r=0;r<e.length;r++)e[r]^=t[r];return e}function f(e,t){return c(e.slice(),t)}const d=new Uint8Array(s),h=new Uint8Array([1]);async function p(e,t){let r,a,p,y=0;function m(e,t,n,a){const m=t.length/s|0;!function(e,t){const r=i.default.nbits(Math.max(e.length,t.length)/s|0)-1;for(let n=y+1;n<=r;n++)p[n]=i.default.double(p[n-1]);y=r}(t,a);const g=i.default.concatUint8Array([d.subarray(0,o-n.length),h,n]),w=63&g[s-1];g[s-1]&=192;const b=r(g),_=i.default.concatUint8Array([b,f(b.subarray(0,8),b.subarray(1,9))]),v=i.default.shiftRight(_.subarray(0+(w>>3),17+(w>>3)),8-(7&w)).subarray(1),k=new Uint8Array(s),A=new Uint8Array(t.length+u);let S,P=0;for(S=0;S<m;S++)c(v,p[l(S+1)]),A.set(c(e(f(v,t)),v),P),c(k,e===r?t:A.subarray(P)),t=t.subarray(s),P+=s;if(t.length){c(v,p.x);const n=r(v);A.set(f(t,n),P);const i=new Uint8Array(s);i.set(e===r?t:A.subarray(P,-u),0),i[t.length]=128,c(k,i),P+=t.length}const E=c(r(c(c(k,v),p.$)),function(e){if(!e.length)return d;const t=e.length/s|0,n=new Uint8Array(s),i=new Uint8Array(s);for(let a=0;a<t;a++)c(n,p[l(a+1)]),c(i,r(f(n,e))),e=e.subarray(s);if(e.length){c(n,p.x);const t=new Uint8Array(s);t.set(e,0),t[e.length]=128,c(t,n),c(i,r(t))}return i}(a));return A.set(E,P),A}return function(e,t){const s=new n.default[e](t);r=s.encrypt.bind(s),a=s.decrypt.bind(s);const o=r(d),u=i.default.double(o);(p=[])[0]=i.default.double(u),p.x=o,p.$=u}(e,t),{encrypt:async function(e,t,n){return m(r,e,t,n)},decrypt:async function(e,t,r){if(e.length<u)throw new Error("Invalid OCB ciphertext");const n=e.subarray(-u);e=e.subarray(0,-u);const s=m(a,e,t,r);if(i.default.equalsUint8Array(n,s.subarray(-u)))return s.subarray(0,-u);throw new Error("Authentication tag mismatch")}}}p.getNonce=function(e,t){const r=e.slice();for(let n=0;n<t.length;n++)r[7+n]^=t[n];return r},p.blockLength=s,p.ivLength=o,p.tagLength=u,r.default=p},{"../util":136,"./cipher":64}],74:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=s(e("./random")),i=s(e("./hash")),a=s(e("../util"));function s(e){return e&&e.__esModule?e:{default:e}}const o={},u={},l=[];l[1]=[48,32,48,12,6,8,42,134,72,134,247,13,2,5,5,0,4,16],l[2]=[48,33,48,9,6,5,43,14,3,2,26,5,0,4,20],l[3]=[48,33,48,9,6,5,43,36,3,2,1,5,0,4,20],l[8]=[48,49,48,13,6,9,96,134,72,1,101,3,4,2,1,5,0,4,32],l[9]=[48,65,48,13,6,9,96,134,72,1,101,3,4,2,2,5,0,4,48],l[10]=[48,81,48,13,6,9,96,134,72,1,101,3,4,2,3,5,0,4,64],l[11]=[48,45,48,13,6,9,96,134,72,1,101,3,4,2,4,5,0,4,28],o.encode=async function(e,t){const r=e.length;if(r>t-11)throw new Error("Message too long");const i=await async function(e){let t="";for(;t.length<e;){const r=await n.default.getRandomBytes(e-t.length);for(let e=0;e<r.length;e++)0!==r[e]&&(t+=String.fromCharCode(r[e]))}return t}(t-r-3);return String.fromCharCode(0)+String.fromCharCode(2)+i+String.fromCharCode(0)+e},o.decode=function(e){const t=e.charCodeAt(0),r=e.charCodeAt(1);let n=2;for(;0!==e.charCodeAt(n)&&n<e.length;)n++;const i=n-2,a=e.charCodeAt(n++);if(0===t&&2===r&&i>=8&&0===a)return e.substr(n);throw new Error("Decryption error")},u.encode=async function(e,t,r){let n;const s=a.default.Uint8Array_to_str(t);if(s.length!==i.default.getHashByteLength(e))throw new Error("Invalid hash length");let o="";for(n=0;n<l[e].length;n++)o+=String.fromCharCode(l[e][n]);const u=(o+=s).length;if(r<u+11)throw new Error("Intended encoded message length too short");let c="";for(n=0;n<r-u-3;n++)c+=String.fromCharCode(255);const f=String.fromCharCode(0)+String.fromCharCode(1)+c+String.fromCharCode(0)+o;return a.default.str_to_hex(f)},r.default={eme:o,emsa:u}},{"../util":136,"./hash":70,"./random":87}],75:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default={encode:function(e){const t=8-e.length%8;return e+String.fromCharCode(t).repeat(t)},decode:function(e){const t=e.length;if(t>0){const r=e.charCodeAt(t-1);if(r>=1&&e.substr(t-r)===String.fromCharCode(r).repeat(r))return e.substr(0,t-r)}throw new Error("Invalid padding")}}},{}],76:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=o(e("bn.js")),i=o(e("../random")),a=o(e("../../util")),s=o(e("./prime"));function o(e){return e&&e.__esModule?e:{default:e}}const u=new n.default(1),l=new n.default(0);r.default={sign:async function(e,t,r,a,s,o){let c,f,d,h;const p=new n.default.red(a),y=new n.default.red(s),m=r.toRed(p),g=o.toRed(y),w=new n.default(t.subarray(0,s.byteLength())).toRed(y);for(;c=await i.default.getRandomBN(u,s),f=m.redPow(c).fromRed().toRed(y),0===l.cmp(f)||(h=w.redAdd(g.redMul(f)),d=c.toRed(y).redInvm().redMul(h),0===l.cmp(d)););return{r:f.toArrayLike(Uint8Array,"be",s.byteLength()),s:d.toArrayLike(Uint8Array,"be",s.byteLength())}},verify:async function(e,t,r,i,s,o,u,c){if(l.ucmp(t)>=0||t.ucmp(u)>=0||l.ucmp(r)>=0||r.ucmp(u)>=0)return a.default.print_debug("invalid DSA Signature"),null;const f=new n.default.red(o),d=new n.default.red(u),h=new n.default(i.subarray(0,u.byteLength())),p=r.toRed(d).redInvm();if(0===l.cmp(p))return a.default.print_debug("invalid DSA Signature"),null;const y=h.toRed(d).redMul(p),m=t.toRed(d).redMul(p),g=s.toRed(f).redPow(y.fromRed()),w=c.toRed(f).redPow(m.fromRed());return 0===g.redMul(w).fromRed().mod(u).cmp(t)},validateParams:async function(e,t,r,a,o){e=new n.default(e),t=new n.default(t),r=new n.default(r),a=new n.default(a);const u=new n.default(1);if(r.lte(u)||r.gte(e))return!1;if(!e.sub(u).mod(t).isZero())return!1;const l=new n.default.red(e),c=r.toRed(l);if(!c.redPow(t).eq(u))return!1;const f=t.bitLength();if(f<150||!(await s.default.isProbablePrime(t,null,32)))return!1;o=new n.default(o);const d=await i.default.getRandomBN(new n.default(2).shln(f-1),new n.default(2).shln(f)),h=t.mul(d).add(o);return!!a.eq(c.redPow(h))}}},{"../../util":136,"../random":87,"./prime":85,"bn.js":16}],77:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=a(e("bn.js")),i=a(e("../random"));function a(e){return e&&e.__esModule?e:{default:e}}r.default={encrypt:async function(e,t,r,a){const s=new n.default.red(t),o=e.toRed(s),u=r.toRed(s),l=a.toRed(s),c=await i.default.getRandomBN(new n.default(1),t.subn(1));return{c1:u.redPow(c).fromRed(),c2:l.redPow(c).redMul(o).fromRed()}},decrypt:async function(e,t,r,i){const a=new n.default.red(r),s=e.toRed(a),o=t.toRed(a);return s.redPow(i).redInvm().redMul(o).fromRed()},validateParams:async function(e,t,r,a){e=new n.default(e),t=new n.default(t),r=new n.default(r);const s=new n.default(1);if(t.lte(s)||t.gte(e))return!1;const o=e.subn(1).bitLength();if(o<1023)return!1;const u=new n.default.red(e),l=t.toRed(u);if(!l.redPow(e.subn(1)).eq(s))return!1;let c=t;const f=new n.default(1),d=new n.default(2).shln(17);for(;f.lt(d);){if((c=c.mul(t).mod(e)).eqn(1))return!1;f.iaddn(1)}a=new n.default(a);const h=await i.default.getRandomBN(new n.default(2).shln(o-1),new n.default(2).shln(o)),p=e.subn(1).mul(h).add(a);return!!r.eq(l.redPow(p))}}},{"../random":87,"bn.js":16}],78:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.validateStandardParams=r.privateToJwk=r.rawPublicToJwk=r.jwkToRawPublic=r.getPreferredHashAlgo=r.generate=r.nodeCurves=r.webCurves=r.curves=void 0;var n=c(e("bn.js")),i=c(e("tweetnacl/nacl-fast-light.js")),a=c(e("../../random")),s=c(e("../../../enums")),o=c(e("../../../util")),u=c(e("../../../type/oid")),l=e("./indutnyKey");function c(e){return e&&e.__esModule?e:{default:e}}const f=o.default.getWebCrypto(),d=o.default.getNodeCrypto(),h={p256:"P-256",p384:"P-384",p521:"P-521"},p=d?d.getCurves():[],y=d?{secp256k1:p.includes("secp256k1")?"secp256k1":void 0,p256:p.includes("prime256v1")?"prime256v1":void 0,p384:p.includes("secp384r1")?"secp384r1":void 0,p521:p.includes("secp521r1")?"secp521r1":void 0,ed25519:p.includes("ED25519")?"ED25519":void 0,curve25519:p.includes("X25519")?"X25519":void 0,brainpoolP256r1:p.includes("brainpoolP256r1")?"brainpoolP256r1":void 0,brainpoolP384r1:p.includes("brainpoolP384r1")?"brainpoolP384r1":void 0,brainpoolP512r1:p.includes("brainpoolP512r1")?"brainpoolP512r1":void 0}:{},m={p256:{oid:[6,8,42,134,72,206,61,3,1,7],keyType:s.default.publicKey.ecdsa,hash:s.default.hash.sha256,cipher:s.default.symmetric.aes128,node:y.p256,web:h.p256,payloadSize:32,sharedSize:256},p384:{oid:[6,5,43,129,4,0,34],keyType:s.default.publicKey.ecdsa,hash:s.default.hash.sha384,cipher:s.default.symmetric.aes192,node:y.p384,web:h.p384,payloadSize:48,sharedSize:384},p521:{oid:[6,5,43,129,4,0,35],keyType:s.default.publicKey.ecdsa,hash:s.default.hash.sha512,cipher:s.default.symmetric.aes256,node:y.p521,web:h.p521,payloadSize:66,sharedSize:528},secp256k1:{oid:[6,5,43,129,4,0,10],keyType:s.default.publicKey.ecdsa,hash:s.default.hash.sha256,cipher:s.default.symmetric.aes128,node:y.secp256k1,payloadSize:32},ed25519:{oid:[6,9,43,6,1,4,1,218,71,15,1],keyType:s.default.publicKey.eddsa,hash:s.default.hash.sha512,node:!1,payloadSize:32},curve25519:{oid:[6,10,43,6,1,4,1,151,85,1,5,1],keyType:s.default.publicKey.ecdh,hash:s.default.hash.sha256,cipher:s.default.symmetric.aes128,node:!1,payloadSize:32},brainpoolP256r1:{oid:[6,9,43,36,3,3,2,8,1,1,7],keyType:s.default.publicKey.ecdsa,hash:s.default.hash.sha256,cipher:s.default.symmetric.aes128,node:y.brainpoolP256r1,payloadSize:32},brainpoolP384r1:{oid:[6,9,43,36,3,3,2,8,1,1,11],keyType:s.default.publicKey.ecdsa,hash:s.default.hash.sha384,cipher:s.default.symmetric.aes192,node:y.brainpoolP384r1,payloadSize:48},brainpoolP512r1:{oid:[6,9,43,36,3,3,2,8,1,1,13],keyType:s.default.publicKey.ecdsa,hash:s.default.hash.sha512,cipher:s.default.symmetric.aes256,node:y.brainpoolP512r1,payloadSize:64}};function g(e,t){try{(o.default.isArray(e)||o.default.isUint8Array(e))&&(e=new u.default(e)),e instanceof u.default&&(e=e.getName()),this.name=s.default.write(s.default.curve,e)}catch(r){throw new Error("Not valid curve")}t=t||m[this.name],this.keyType=t.keyType,this.oid=t.oid,this.hash=t.hash,this.cipher=t.cipher,this.node=t.node&&m[this.name],this.web=t.web&&m[this.name],this.payloadSize=t.payloadSize,this.web&&o.default.getWebCrypto()?this.type="web":this.node&&o.default.getNodeCrypto()?this.type="node":"curve25519"===this.name?this.type="curve25519":"ed25519"===this.name&&(this.type="ed25519")}function w(e){const t=o.default.b64_to_Uint8Array(e.x),r=o.default.b64_to_Uint8Array(e.y),n=new Uint8Array(t.length+r.length+1);return n[0]=4,n.set(t,1),n.set(r,t.length+1),n}function b(e,t,r){const n=e,i=r.slice(1,n+1),a=r.slice(n+1,2*n+1);return{kty:"EC",crv:t,x:o.default.Uint8Array_to_b64(i,!0),y:o.default.Uint8Array_to_b64(a,!0),ext:!0}}g.prototype.genKeyPair=async function(){let e;switch(this.type){case"web":try{return await async function(e){const t=await f.generateKey({name:"ECDSA",namedCurve:h[e]},!0,["sign","verify"]),r=await f.exportKey("jwk",t.privateKey);return{publicKey:w(await f.exportKey("jwk",t.publicKey)),privateKey:o.default.b64_to_Uint8Array(r.d,!0)}}(this.name)}catch(r){o.default.print_debug_error("Browser did not support generating ec key "+r.message);break}case"node":return async function(e){const t=d.createECDH(y[e]);return await t.generateKeys(),{publicKey:new Uint8Array(t.getPublicKey()),privateKey:new Uint8Array(t.getPrivateKey())}}(this.name);case"curve25519":{const t=await a.default.getRandomBytes(32);t[0]=127&t[0]|64,t[31]&=248;const r=t.slice().reverse();return e=i.default.box.keyPair.fromSecretKey(r),{publicKey:o.default.concatUint8Array([new Uint8Array([64]),e.publicKey]),privateKey:t}}case"ed25519":{const e=await a.default.getRandomBytes(32),t=i.default.sign.keyPair.fromSeed(e);return{publicKey:o.default.concatUint8Array([new Uint8Array([64]),t.publicKey]),privateKey:e}}}const t=await(0,l.getIndutnyCurve)(this.name);return e=await t.genKeyPair({entropy:o.default.Uint8Array_to_str(await a.default.getRandomBytes(32))}),{publicKey:new Uint8Array(e.getPublic("array",!1)),privateKey:e.getPrivate().toArrayLike(Uint8Array)}},r.default=g,r.curves=m,r.webCurves=h,r.nodeCurves=y,r.generate=async function(e){e=new g(e);const t=await e.genKeyPair();return{oid:e.oid,Q:new n.default(t.publicKey),d:new n.default(t.privateKey),hash:e.hash,cipher:e.cipher}},r.getPreferredHashAlgo=function(e){return m[s.default.write(s.default.curve,e.toHex())].hash},r.jwkToRawPublic=w,r.rawPublicToJwk=b,r.privateToJwk=function(e,t,r,n){const i=b(e,t,r);return i.d=o.default.Uint8Array_to_b64(n,!0),i},r.validateStandardParams=async function(e,t,r,a){const u={p256:!0,p384:!0,p521:!0,secp256k1:!0,curve25519:e===s.default.publicKey.ecdh,brainpoolP256r1:!0,brainpoolP384r1:!0,brainpoolP512r1:!0},c=t.getName();if(!u[c])return!1;if("curve25519"===c){a=a.slice().reverse();const e=i.default.box.keyPair.fromSecretKey(a).publicKey;r=new Uint8Array(r);const t=new Uint8Array([64,...e]);return!!o.default.equalsUint8Array(t,r)}const f=await(0,l.getIndutnyCurve)(c);try{r=(0,l.keyFromPublic)(f,r).getPublic()}catch(d){return!1}return a=new n.default(a),!!(0,l.keyFromPrivate)(f,a).getPublic().eq(r)}},{"../../../enums":91,"../../../type/oid":134,"../../../util":136,"../../random":87,"./indutnyKey":83,"bn.js":16,"tweetnacl/nacl-fast-light.js":50}],79:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var r=[],n=!0,i=!1,a=void 0;try{for(var s,o=e[Symbol.iterator]();!(n=(s=o.next()).done)&&(r.push(s.value),!t||r.length!==t);n=!0);}catch(u){i=!0,a=u}finally{try{!n&&o.return&&o.return()}finally{if(i)throw a}}return r}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=y(e("bn.js")),a=y(e("tweetnacl/nacl-fast-light.js")),s=e("./curves"),o=y(s),u=y(e("../../aes_kw")),l=y(e("../../cipher")),c=y(e("../../random")),f=y(e("../../hash")),d=y(e("../../../enums")),h=y(e("../../../util")),p=e("./indutnyKey");function y(e){return e&&e.__esModule?e:{default:e}}const m=h.default.getWebCrypto(),g=h.default.getNodeCrypto();function w(e,t,r,n){return h.default.concatUint8Array([t.write(),new Uint8Array([e]),r.write(),h.default.str_to_Uint8Array("Anonymous Sender "),n.subarray(0,20)])}async function b(e,t,r,n,i=!1,a=!1){let s;if(i){for(s=0;s<t.length&&0===t[s];s++);t=t.subarray(s)}if(a){for(s=t.length-1;s>=0&&0===t[s];s--);t=t.subarray(0,s+1)}return(await f.default.digest(e,h.default.concatUint8Array([new Uint8Array([0,0,0,1]),t,n]))).subarray(0,r)}async function _(e,t){switch(e.type){case"curve25519":{const n=await c.default.getRandomBytes(32);var r=await v(e,t,null,n);const i=r.secretKey,s=r.sharedKey;let o=a.default.box.keyPair.fromSecretKey(i).publicKey;return{publicKey:o=h.default.concatUint8Array([new Uint8Array([64]),o]),sharedKey:s}}case"web":if(e.web&&h.default.getWebCrypto())try{return await A(e,t)}catch(n){h.default.print_debug_error(n)}break;case"node":return x(e,t)}return P(e,t)}async function v(e,t,r,n){if(n.length!==e.payloadSize){const t=new Uint8Array(e.payloadSize);t.set(n,e.payloadSize-n.length),n=t}switch(e.type){case"curve25519":{const e=n.slice().reverse();return{secretKey:e,sharedKey:a.default.scalarMult(e,t.subarray(1))}}case"web":if(e.web&&h.default.getWebCrypto())try{return await k(e,t,r,n)}catch(i){h.default.print_debug_error(i)}break;case"node":return E(e,t,n)}return S(e,t,n)}async function k(e,t,r,i){const a=(0,s.privateToJwk)(e.payloadSize,e.web.web,r,i);let o=m.importKey("jwk",a,{name:"ECDH",namedCurve:e.web.web},!0,["deriveKey","deriveBits"]);const u=(0,s.rawPublicToJwk)(e.payloadSize,e.web.web,t);let l=m.importKey("jwk",u,{name:"ECDH",namedCurve:e.web.web},!0,[]);var c=await Promise.all([o,l]),f=n(c,2);o=f[0],l=f[1];let d=m.deriveBits({name:"ECDH",namedCurve:e.web.web,public:l},o,e.web.sharedSize),p=m.exportKey("jwk",o);var y=await Promise.all([d,p]),g=n(y,2);d=g[0],p=g[1];const w=new Uint8Array(d);return{secretKey:h.default.b64_to_Uint8Array(p.d,!0),sharedKey:w}}async function A(e,t){const r=(0,s.rawPublicToJwk)(e.payloadSize,e.web.web,t);let i=m.generateKey({name:"ECDH",namedCurve:e.web.web},!0,["deriveKey","deriveBits"]),a=m.importKey("jwk",r,{name:"ECDH",namedCurve:e.web.web},!1,[]);var o=await Promise.all([i,a]),u=n(o,2);i=u[0],a=u[1];let l=m.deriveBits({name:"ECDH",namedCurve:e.web.web,public:a},i.privateKey,e.web.sharedSize),c=m.exportKey("jwk",i.publicKey);var f=await Promise.all([l,c]),d=n(f,2);l=d[0],c=d[1];const h=new Uint8Array(l);return{publicKey:new Uint8Array((0,s.jwkToRawPublic)(c)),sharedKey:h}}async function S(e,t,r){const n=await(0,p.getIndutnyCurve)(e.name);t=(0,p.keyFromPublic)(n,t),r=(0,p.keyFromPrivate)(n,r);const i=new Uint8Array(r.getPrivate()),a=r.derive(t.getPublic()),s=n.curve.p.byteLength();return{secretKey:i,sharedKey:a.toArrayLike(Uint8Array,"be",s)}}async function P(e,t){const r=await(0,p.getIndutnyCurve)(e.name),n=await e.genKeyPair();t=(0,p.keyFromPublic)(r,t);const i=(0,p.keyFromPrivate)(r,n.privateKey),a=n.publicKey,s=i.derive(t.getPublic()),o=r.curve.p.byteLength();return{publicKey:a,sharedKey:s.toArrayLike(Uint8Array,"be",o)}}async function E(e,t,r){const n=g.createECDH(e.node.node);n.setPrivateKey(r);const i=new Uint8Array(n.computeSecret(t));return{secretKey:new Uint8Array(n.getPrivateKey()),sharedKey:i}}async function x(e,t){const r=g.createECDH(e.node.node);r.generateKeys();const n=new Uint8Array(r.computeSecret(t));return{publicKey:new Uint8Array(r.getPublicKey()),sharedKey:n}}r.default={encrypt:async function(e,t,r,n,i){const a=new o.default(e);var s=await _(a,n);const c=s.publicKey,f=s.sharedKey,h=w(d.default.publicKey.ecdh,e,t,i),p=d.default.read(d.default.symmetric,t.cipher),y=await b(t.hash,f,l.default[p].keySize,h);return{publicKey:c,wrappedKey:u.default.wrap(y,r.toString())}},decrypt:async function(e,t,r,n,a,s,c){const f=new o.default(e),h=(await v(f,r,a,s)).sharedKey,p=w(d.default.publicKey.ecdh,e,t,c),y=d.default.read(d.default.symmetric,t.cipher);let m;for(let o=0;o<3;o++)try{const e=await b(t.hash,h,l.default[y].keySize,p,1===o,2===o);return new i.default(u.default.unwrap(e,n))}catch(g){m=g}throw m},genPublicEphemeralKey:_,genPrivateEphemeralKey:v,buildEcdhParam:w,kdf:b,webPublicEphemeralKey:A,webPrivateEphemeralKey:k,ellipticPublicEphemeralKey:P,ellipticPrivateEphemeralKey:S,nodePublicEphemeralKey:x,nodePrivateEphemeralKey:E,validateParams:async function(e,t,r){return(0,s.validateStandardParams)(d.default.publicKey.ecdh,e,t,r)},parseParams:function(e){if(e.length<3||e.length>4)throw new Error("Unexpected number of parameters");const t=e[0],r=new o.default(t),n={oid:t};return n.Q=e[1].toUint8Array(),n.kdfParams=e[2],4===e.length&&(n.d=e[3].toUint8Array("be",r.payloadSize)),n}}},{"../../../enums":91,"../../../util":136,"../../aes_kw":58,"../../cipher":64,"../../hash":70,"../../random":87,"./curves":78,"./indutnyKey":83,"bn.js":16,"tweetnacl/nacl-fast-light.js":50}],80:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=f(e("bn.js")),i=f(e("../../../enums")),a=f(e("../../../util")),s=f(e("../../random")),o=f(e("../../hash")),u=e("./curves"),l=f(u),c=e("./indutnyKey");function f(e){return e&&e.__esModule?e:{default:e}}const d=a.default.getWebCrypto(),h=a.default.getNodeCrypto();async function p(e,t,r,n,s,o){const c=new l.default(e);if(r&&!a.default.isStream(r)){const e={publicKey:n,privateKey:s};switch(c.type){case"web":try{return await async function(e,t,r,n){const a=e.payloadSize,s=(0,u.privateToJwk)(e.payloadSize,u.webCurves[e.name],n.publicKey,n.privateKey),o=await d.importKey("jwk",s,{name:"ECDSA",namedCurve:u.webCurves[e.name],hash:{name:i.default.read(i.default.webHash,e.hash)}},!1,["sign"]),l=new Uint8Array(await d.sign({name:"ECDSA",namedCurve:u.webCurves[e.name],hash:{name:i.default.read(i.default.webHash,t)}},o,r));return{r:l.slice(0,a),s:l.slice(a,a<<1)}}(c,t,r,e)}catch(f){if("p521"!==c.name&&("DataError"===f.name||"OperationError"===f.name))throw f;a.default.print_debug_error("Browser did not support verifying: "+f.message)}break;case"node":{const n=await async function(e,t,r,n){const a=h.createSign(i.default.read(i.default.hash,t));a.write(r),a.end();const s=_.encode({version:1,parameters:e.oid,privateKey:Array.from(n.privateKey),publicKey:{unused:0,data:Array.from(n.publicKey)}},"pem",{label:"EC PRIVATE KEY"});return b.decode(a.sign(s),"der")}(c,t,r,e);return{r:n.r.toArrayLike(Uint8Array),s:n.s.toArrayLike(Uint8Array)}}}}return m(c,o,s)}async function y(e,t,r,s,o,c){const f=new l.default(e);if(s&&!a.default.isStream(s))switch(f.type){case"web":try{return await async function(e,t,{r:r,s:n},s,o){const l=e.payloadSize,c=(0,u.rawPublicToJwk)(e.payloadSize,u.webCurves[e.name],o),f=await d.importKey("jwk",c,{name:"ECDSA",namedCurve:u.webCurves[e.name],hash:{name:i.default.read(i.default.webHash,e.hash)}},!1,["verify"]),h=a.default.concatUint8Array([new Uint8Array(l-r.length),r,new Uint8Array(l-n.length),n]).buffer;return d.verify({name:"ECDSA",namedCurve:u.webCurves[e.name],hash:{name:i.default.read(i.default.webHash,t)}},f,h,s)}(f,t,r,s,o)}catch(p){if("p521"!==f.name&&("DataError"===p.name||"OperationError"===p.name))throw p;a.default.print_debug_error("Browser did not support verifying: "+p.message)}break;case"node":return async function(e,t,{r:r,s:a},s,o){const u=h.createVerify(i.default.read(i.default.hash,t));u.write(s),u.end();const l=k.encode({algorithm:{algorithm:[1,2,840,10045,2,1],parameters:e.oid},subjectPublicKey:{unused:0,data:Array.from(o)}},"pem",{label:"PUBLIC KEY"}),c=b.encode({r:new n.default(r),s:new n.default(a)},"der");try{return u.verify(l,c)}catch(p){return!1}}(f,t,r,s,o)}return g(f,r,void 0===t?s:c,o)}async function m(e,t,r){const n=await(0,c.getIndutnyCurve)(e.name),i=(0,c.keyFromPrivate)(n,r).sign(t);return{r:i.r.toArrayLike(Uint8Array),s:i.s.toArrayLike(Uint8Array)}}async function g(e,t,r,n){const i=await(0,c.getIndutnyCurve)(e.name);return(0,c.keyFromPublic)(i,n).verify(r,t)}r.default={sign:p,verify:y,ellipticVerify:g,ellipticSign:m,validateParams:async function(e,t,r){const n=new l.default(e);if(n.keyType!==i.default.publicKey.ecdsa)return!1;switch(n.type){case"web":case"node":{const n=await s.default.getRandomBytes(8),u=i.default.hash.sha256,l=await o.default.digest(u,n);try{const i=await p(e,u,n,t,r,l);return await y(e,u,i,n,t,l)}catch(a){return!1}}default:return(0,u.validateStandardParams)(i.default.publicKey.ecdsa,e,t,r)}},parseParams:function(e){if(e.length<2||e.length>3)throw new Error("Unexpected number of parameters");const t=e[0],r=new l.default(t),n={oid:t};return n.Q=e[1].toUint8Array(),3===e.length&&(n.d=e[2].toUint8Array("be",r.payloadSize)),n}};const w=h?e("asn1.js"):void 0,b=h?w.define("ECDSASignature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())}):void 0,_=h?w.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").explicit(0).optional().any(),this.key("publicKey").explicit(1).optional().bitstr())}):void 0,v=h?w.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional().any())}):void 0,k=h?w.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(v),this.key("subjectPublicKey").bitstr())}):void 0},{"../../../enums":91,"../../../util":136,"../../hash":70,"../../random":87,"./curves":78,"./indutnyKey":83,"asn1.js":"asn1.js","bn.js":16}],81:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=s(e("hash.js/lib/hash/sha/512")),i=s(e("tweetnacl/nacl-fast-light.js")),a=s(e("../../../util"));function s(e){return e&&e.__esModule?e:{default:e}}i.default.hash=(e=>new Uint8Array((0,n.default)().update(e).digest())),r.default={sign:async function(e,t,r,n,s,o){const u=a.default.concatUint8Array([s,n.subarray(1)]),l=i.default.sign.detached(o,u);return{R:l.subarray(0,32),S:l.subarray(32)}},verify:async function(e,t,{R:r,S:n},s,o,u){const l=a.default.concatUint8Array([r,n]);return i.default.sign.detached.verify(u,l,o.subarray(1))},validateParams:async function(e,t,r){if("ed25519"!==e.getName())return!1;const n=i.default.sign.keyPair.fromSeed(r).publicKey,s=new Uint8Array([64,...n]);return a.default.equalsUint8Array(t,s)},parseParams:function(e){if(e.length<2||e.length>3)throw new Error("Unexpected number of parameters");const t={oid:e[0],Q:e[1].toUint8Array("be",33)};return 3===e.length&&(t.seed=e[2].toUint8Array("be",32)),t}}},{"../../../util":136,"hash.js/lib/hash/sha/512":23,"tweetnacl/nacl-fast-light.js":50}],82:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e("./curves"),i=u(n),a=u(e("./ecdsa")),s=u(e("./eddsa")),o=u(e("./ecdh"));function u(e){return e&&e.__esModule?e:{default:e}}r.default={Curve:i.default,ecdh:o.default,ecdsa:a.default,eddsa:s.default,generate:n.generate,getPreferredHashAlgo:n.getPreferredHashAlgo}},{"./curves":78,"./ecdh":79,"./ecdsa":80,"./eddsa":81}],83:[function(e,t,r){(function(t){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.keyFromPrivate=function(e,t){return e.keyPair({priv:t})},r.keyFromPublic=function(e,t){const r=e.keyPair({pub:t});if(!0!==r.validate().result)throw new Error("Invalid elliptic public key");return r},r.getIndutnyCurve=async function(r){if(!i.default.use_indutny_elliptic)throw new Error("This curve is only supported in the full build of OpenPGP.js");return new((await function(){if(!i.default.external_indutny_elliptic)return e("elliptic");if(a.default.detectNode())return e(i.default.indutny_elliptic_path);o||(o=async function(){const e=i.default.indutny_elliptic_path,r=i.default.indutny_elliptic_fetch_options,a=(0,n.dl)(e,r).catch(()=>(0,n.dl)(e,r)),s=await a,o=URL.createObjectURL(new Blob([s],{type:"text/javascript"}));if(await(0,n.loadScript)(o),URL.revokeObjectURL(o),!t.openpgp.elliptic)throw new Error("Elliptic library failed to load correctly");return t.openpgp.elliptic}().catch(e=>{throw o=void 0,e}));return o}()).ec)(r)};var n=e("../../../lightweight_helper"),i=s(e("../../../config")),a=s(e("../../../util"));function s(e){return e&&e.__esModule?e:{default:e}}let o}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../../../config":57,"../../../lightweight_helper":103,"../../../util":136,elliptic:"elliptic"}],84:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=u(e("tweetnacl/nacl-fast-light.js")),i=u(e("./rsa")),a=u(e("./elgamal")),s=u(e("./elliptic")),o=u(e("./dsa"));function u(e){return e&&e.__esModule?e:{default:e}}r.default={rsa:i.default,elgamal:a.default,elliptic:s.default,dsa:o.default,nacl:n.default}},{"./dsa":76,"./elgamal":77,"./elliptic":82,"./rsa":86,"tweetnacl/nacl-fast-light.js":50}],85:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=a(e("bn.js")),i=a(e("../random"));function a(e){return e&&e.__esModule?e:{default:e}}async function s(e,t,r){return!(t&&!e.subn(1).gcd(t).eqn(1))&&(!!u(e)&&(!!o(e)&&!!(await c(e,r))))}function o(e,t){return 0===(t=t||new n.default(2)).toRed(n.default.mont(e)).redPow(e.subn(1)).fromRed().cmpn(1)}function u(e){return l.every(t=>0!==e.modn(t))}r.default={randomProbablePrime:async function(e,t,r){const a=new n.default(1).shln(e-1),o=new n.default(30),u=[1,6,5,4,3,2,1,4,3,2,1,2,1,4,3,2,1,2,1,4,3,2,1,6,5,4,3,2,1,2];let l=await i.default.getRandomBN(a,a.shln(1)),c=l.mod(o).toNumber();do{l.iaddn(u[c]),c=(c+u[c])%u.length,l.bitLength()>e&&(l=l.mod(a.shln(1)).iadd(a),c=l.mod(o).toNumber())}while(!(await s(l,t,r)));return l},isProbablePrime:s,fermat:o,millerRabin:c,divisionTest:u};const l=[7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997,1009,1013,1019,1021,1031,1033,1039,1049,1051,1061,1063,1069,1087,1091,1093,1097,1103,1109,1117,1123,1129,1151,1153,1163,1171,1181,1187,1193,1201,1213,1217,1223,1229,1231,1237,1249,1259,1277,1279,1283,1289,1291,1297,1301,1303,1307,1319,1321,1327,1361,1367,1373,1381,1399,1409,1423,1427,1429,1433,1439,1447,1451,1453,1459,1471,1481,1483,1487,1489,1493,1499,1511,1523,1531,1543,1549,1553,1559,1567,1571,1579,1583,1597,1601,1607,1609,1613,1619,1621,1627,1637,1657,1663,1667,1669,1693,1697,1699,1709,1721,1723,1733,1741,1747,1753,1759,1777,1783,1787,1789,1801,1811,1823,1831,1847,1861,1867,1871,1873,1877,1879,1889,1901,1907,1913,1931,1933,1949,1951,1973,1979,1987,1993,1997,1999,2003,2011,2017,2027,2029,2039,2053,2063,2069,2081,2083,2087,2089,2099,2111,2113,2129,2131,2137,2141,2143,2153,2161,2179,2203,2207,2213,2221,2237,2239,2243,2251,2267,2269,2273,2281,2287,2293,2297,2309,2311,2333,2339,2341,2347,2351,2357,2371,2377,2381,2383,2389,2393,2399,2411,2417,2423,2437,2441,2447,2459,2467,2473,2477,2503,2521,2531,2539,2543,2549,2551,2557,2579,2591,2593,2609,2617,2621,2633,2647,2657,2659,2663,2671,2677,2683,2687,2689,2693,2699,2707,2711,2713,2719,2729,2731,2741,2749,2753,2767,2777,2789,2791,2797,2801,2803,2819,2833,2837,2843,2851,2857,2861,2879,2887,2897,2903,2909,2917,2927,2939,2953,2957,2963,2969,2971,2999,3001,3011,3019,3023,3037,3041,3049,3061,3067,3079,3083,3089,3109,3119,3121,3137,3163,3167,3169,3181,3187,3191,3203,3209,3217,3221,3229,3251,3253,3257,3259,3271,3299,3301,3307,3313,3319,3323,3329,3331,3343,3347,3359,3361,3371,3373,3389,3391,3407,3413,3433,3449,3457,3461,3463,3467,3469,3491,3499,3511,3517,3527,3529,3533,3539,3541,3547,3557,3559,3571,3581,3583,3593,3607,3613,3617,3623,3631,3637,3643,3659,3671,3673,3677,3691,3697,3701,3709,3719,3727,3733,3739,3761,3767,3769,3779,3793,3797,3803,3821,3823,3833,3847,3851,3853,3863,3877,3881,3889,3907,3911,3917,3919,3923,3929,3931,3943,3947,3967,3989,4001,4003,4007,4013,4019,4021,4027,4049,4051,4057,4073,4079,4091,4093,4099,4111,4127,4129,4133,4139,4153,4157,4159,4177,4201,4211,4217,4219,4229,4231,4241,4243,4253,4259,4261,4271,4273,4283,4289,4297,4327,4337,4339,4349,4357,4363,4373,4391,4397,4409,4421,4423,4441,4447,4451,4457,4463,4481,4483,4493,4507,4513,4517,4519,4523,4547,4549,4561,4567,4583,4591,4597,4603,4621,4637,4639,4643,4649,4651,4657,4663,4673,4679,4691,4703,4721,4723,4729,4733,4751,4759,4783,4787,4789,4793,4799,4801,4813,4817,4831,4861,4871,4877,4889,4903,4909,4919,4931,4933,4937,4943,4951,4957,4967,4969,4973,4987,4993,4999];async function c(e,t,r){const a=e.bitLength(),s=n.default.mont(e),o=new n.default(1).toRed(s);t||(t=Math.max(1,a/48|0));const u=e.subn(1),l=u.toRed(s);let c=0;for(;!u.testn(c);)c++;const f=e.shrn(c);for(;t>0;t--){let e,t=(r?r():await i.default.getRandomBN(new n.default(2),u)).toRed(s).redPow(f);if(!t.eq(o)&&!t.eq(l)){for(e=1;e<c;e++){if((t=t.redSqr()).eq(o))return!1;if(t.eq(l))break}if(e===c)return!1}}return!0}},{"../random":87,"bn.js":16}],86:[function(e,t,r){(function(t){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=f(e("bn.js")),i=f(e("./prime")),a=f(e("../random")),s=f(e("../../config")),o=f(e("../../util")),u=f(e("../pkcs1")),l=f(e("../../enums")),c=f(e("../../type/mpi"));function f(e){return e&&e.__esModule?e:{default:e}}const d=o.default.getWebCrypto(),h=o.default.getNodeCrypto(),p=h?e("asn1.js"):void 0;function y(e,t){return"function"!=typeof e.then?new Promise(function(r,n){e.onerror=function(){n(new Error(t))},e.oncomplete=function(e){r(e.target.result)}}):e}const m=o.default.detectNode()?p.define("RSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())}):void 0,g=o.default.detectNode()?p.define("RSAPubliceKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())}):void 0;r.default={sign:async function(e,t,r,n,i,a,s,u,c){if(t&&!o.default.isStream(t))if(o.default.getWebCrypto())try{return await this.webSign(l.default.read(l.default.webHash,e),t,r,n,i,a,s,u)}catch(f){o.default.print_debug_error(f)}else if(o.default.getNodeCrypto())return this.nodeSign(e,t,r,n,i,a,s,u);return this.bnSign(e,r,i,c)},verify:async function(e,t,r,n,i,a){if(t&&!o.default.isStream(t))if(o.default.getWebCrypto())try{return await this.webVerify(l.default.read(l.default.webHash,e),t,r,n,i)}catch(s){o.default.print_debug_error(s)}else if(o.default.getNodeCrypto())return this.nodeVerify(e,t,r,n,i);return this.bnVerify(e,r,n,i,a)},encrypt:async function(e,t,r){return o.default.getNodeCrypto()?this.nodeEncrypt(e,t,r):this.bnEncrypt(e,t,r)},decrypt:async function(e,t,r,n,i,a,s){return o.default.getNodeCrypto()?this.nodeDecrypt(e,t,r,n,i,a,s):this.bnDecrypt(e,t,r,n,i,a,s)},generate:async function(e,r){let a;if(r=new n.default(r,16),o.default.getWebCrypto()){let i,s;if(t.crypto&&t.crypto.subtle||t.msCrypto)s={name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:r.toArrayLike(Uint8Array),hash:{name:"SHA-1"}},i=d.generateKey(s,!0,["sign","verify"]),i=await y(i,"Error generating RSA key pair.");else{if(!t.crypto||!t.crypto.webkitSubtle)throw new Error("Unknown WebCrypto implementation");s={name:"RSA-OAEP",modulusLength:e,publicExponent:r.toArrayLike(Uint8Array),hash:{name:"SHA-1"}},i=await d.generateKey(s,!0,["encrypt","decrypt"])}let u=d.exportKey("jwk",i.privateKey);return(u=await y(u,"Error exporting RSA key pair."))instanceof ArrayBuffer&&(u=JSON.parse(String.fromCharCode.apply(null,new Uint8Array(u)))),(a={}).n=new n.default(o.default.b64_to_Uint8Array(u.n)),a.e=r,a.d=new n.default(o.default.b64_to_Uint8Array(u.d)),a.p=new n.default(o.default.b64_to_Uint8Array(u.q)),a.q=new n.default(o.default.b64_to_Uint8Array(u.p)),a.u=new n.default(o.default.b64_to_Uint8Array(u.qi)),a}if(o.default.getNodeCrypto()&&h.generateKeyPair&&m){const t={modulusLength:Number(e.toString(10)),publicExponent:Number(r.toString(10)),publicKeyEncoding:{type:"pkcs1",format:"der"},privateKeyEncoding:{type:"pkcs1",format:"der"}},n=await new Promise((e,r)=>h.generateKeyPair("rsa",t,(t,n,i)=>{t?r(t):e(m.decode(i,"der"))}));return{n:n.modulus,e:n.publicExponent,d:n.privateExponent,p:n.prime2,q:n.prime1,u:n.coefficient}}let s=await i.default.randomProbablePrime(e-(e>>1),r,40),u=await i.default.randomProbablePrime(e>>1,r,40);if(s.cmp(u)<0){var l=[s,u];u=l[0],s=l[1]}const c=u.subn(1).mul(s.subn(1));return{n:u.mul(s),e:r,d:r.invm(c),p:u,q:s,u:u.invm(s)}},validateParams:async function(e,t,r,i,s,o){if(e=new n.default(e),i=new n.default(i),s=new n.default(s),!i.mul(s).eq(e))return!1;const u=new n.default(1),l=new n.default(2);if(o=new n.default(o),!i.mul(o).umod(s).eq(u))return!1;t=new n.default(t),r=new n.default(r);const c=await a.default.getRandomBN(l,l.shln(e.bitLength()/3)),f=c.mul(r).mul(t);return!(!f.umod(i.sub(u)).eq(c)||!f.umod(s.sub(u)).eq(c))},bnSign:async function(e,t,r,i){t=new n.default(t);const a=new n.default(await u.default.emsa.encode(e,i,t.byteLength()),16);if(r=new n.default(r),t.cmp(a)<=0)throw new Error("Message size cannot exceed modulus size");const s=new n.default.red(t);return a.toRed(s).redPow(r).toArrayLike(Uint8Array,"be",t.byteLength())},webSign:async function(e,t,r,i,a,s,u,l){const c=function(e,t,r,i,a,s){const u=new n.default(i),l=new n.default(a),c=new n.default(r);let f=c.mod(l.subn(1)),d=c.mod(u.subn(1));return d=d.toArrayLike(Uint8Array),f=f.toArrayLike(Uint8Array),{kty:"RSA",n:o.default.Uint8Array_to_b64(e,!0),e:o.default.Uint8Array_to_b64(t,!0),d:o.default.Uint8Array_to_b64(r,!0),p:o.default.Uint8Array_to_b64(a,!0),q:o.default.Uint8Array_to_b64(i,!0),dp:o.default.Uint8Array_to_b64(f,!0),dq:o.default.Uint8Array_to_b64(d,!0),qi:o.default.Uint8Array_to_b64(s,!0),ext:!0}}(r,i,a,s,u,l),f={name:"RSASSA-PKCS1-v1_5",hash:{name:e}},h=await d.importKey("jwk",c,f,!1,["sign"]);return new Uint8Array(await d.sign({name:"RSASSA-PKCS1-v1_5",hash:e},h,t))},nodeSign:async function(e,t,r,i,a,s,o,u){const c=new n.default(s),f=new n.default(o),d=new n.default(a),p=d.mod(f.subn(1)),y=d.mod(c.subn(1)),g=h.createSign(l.default.read(l.default.hash,e));g.write(t),g.end();const w={version:0,modulus:new n.default(r),publicExponent:new n.default(i),privateExponent:new n.default(a),prime1:new n.default(o),prime2:new n.default(s),exponent1:p,exponent2:y,coefficient:new n.default(u)};if(void 0!==h.createPrivateKey){const e=m.encode(w,"der");return new Uint8Array(g.sign({key:e,format:"der",type:"pkcs1"}))}const b=m.encode(w,"pem",{label:"RSA PRIVATE KEY"});return new Uint8Array(g.sign(b))},bnVerify:async function(e,t,r,i,a){if(r=new n.default(r),t=new n.default(t),i=new n.default(i),r.cmp(t)<=0)throw new Error("Signature size cannot exceed modulus size");const s=new n.default.red(r),l=t.toRed(s).redPow(i).toArrayLike(Uint8Array,"be",r.byteLength()),c=await u.default.emsa.encode(e,a,r.byteLength());return o.default.Uint8Array_to_hex(l)===c},webVerify:async function(e,t,r,n,i){const a=function(e,t){return{kty:"RSA",n:o.default.Uint8Array_to_b64(e,!0),e:o.default.Uint8Array_to_b64(t,!0),ext:!0}}(n,i),s=await d.importKey("jwk",a,{name:"RSASSA-PKCS1-v1_5",hash:{name:e}},!1,["verify"]);return d.verify({name:"RSASSA-PKCS1-v1_5",hash:e},s,r,t)},nodeVerify:async function(e,t,r,i,a){const s=h.createVerify(l.default.read(l.default.hash,e));s.write(t),s.end();const o={modulus:new n.default(i),publicExponent:new n.default(a)};let u;if(void 0!==h.createPrivateKey){u={key:g.encode(o,"der"),format:"der",type:"pkcs1"}}else u=g.encode(o,"pem",{label:"RSA PUBLIC KEY"});try{return await s.verify(u,r)}catch(c){return!1}},nodeEncrypt:async function(e,t,r){const i={modulus:new n.default(t),publicExponent:new n.default(r)};let a;if(void 0!==h.createPrivateKey){a={key:g.encode(i,"der"),format:"der",type:"pkcs1",padding:h.constants.RSA_PKCS1_PADDING}}else{a={key:g.encode(i,"pem",{label:"RSA PUBLIC KEY"}),padding:h.constants.RSA_PKCS1_PADDING}}return new Uint8Array(h.publicEncrypt(a,e))},bnEncrypt:async function(e,t,r){if(t=new n.default(t),e=(e=new c.default(await u.default.eme.encode(o.default.Uint8Array_to_str(e),t.byteLength()))).toBN(),r=new n.default(r),t.cmp(e)<=0)throw new Error("Message size cannot exceed modulus size");const i=new n.default.red(t);return e.toRed(i).redPow(r).toArrayLike(Uint8Array,"be",t.byteLength())},nodeDecrypt:function(e,t,r,i,a,s,u){const l=new n.default(a),c=new n.default(s),f=new n.default(i),d=f.mod(c.subn(1)),p=f.mod(l.subn(1)),y={version:0,modulus:new n.default(t),publicExponent:new n.default(r),privateExponent:new n.default(i),prime1:new n.default(s),prime2:new n.default(a),exponent1:d,exponent2:p,coefficient:new n.default(u)};let g;if(void 0!==h.createPrivateKey){g={key:m.encode(y,"der"),format:"der",type:"pkcs1",padding:h.constants.RSA_PKCS1_PADDING}}else{g={key:m.encode(y,"pem",{label:"RSA PRIVATE KEY"}),padding:h.constants.RSA_PKCS1_PADDING}}try{return o.default.Uint8Array_to_str(h.privateDecrypt(g,e))}catch(w){throw new Error("Decryption error")}},bnDecrypt:async function(e,t,r,i,l,f,d){if(e=new n.default(e),t=new n.default(t),r=new n.default(r),i=new n.default(i),l=new n.default(l),f=new n.default(f),d=new n.default(d),t.cmp(e)<=0)throw new Error("Data too large.");const h=i.mod(f.subn(1)),p=i.mod(l.subn(1)),y=new n.default.red(l),m=new n.default.red(f),g=new n.default.red(t);let w,b;s.default.rsa_blinding&&(w=(b=(await a.default.getRandomBN(new n.default(2),t)).toRed(g)).redInvm().redPow(r),e=e.toRed(g).redMul(w).fromRed());const _=e.toRed(y).redPow(p),v=e.toRed(m).redPow(h).redSub(_.fromRed().toRed(m));let k=d.toRed(m).redMul(v).fromRed().mul(l).add(_).toRed(g);return s.default.rsa_blinding&&(k=k.redMul(b)),k=new c.default(k).toUint8Array("be",t.byteLength()),u.default.eme.decode(o.default.Uint8Array_to_str(k))},prime:i.default}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../../config":57,"../../enums":91,"../../type/mpi":133,"../../util":136,"../pkcs1":74,"../random":87,"./prime":85,"asn1.js":"asn1.js","bn.js":16}],87:[function(e,t,r){(function(t){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=i(e("bn.js"));function i(e){return e&&e.__esModule?e:{default:e}}const a=i(e("../util")).default.detectNode()&&e("crypto");function s(){this.buffer=null,this.size=null,this.callback=null}r.default={getRandomBytes:async function(e){const r=new Uint8Array(e);if("undefined"!=typeof crypto&&crypto.getRandomValues)crypto.getRandomValues(r);else if(void 0!==t&&"object"==typeof t.msCrypto&&"function"==typeof t.msCrypto.getRandomValues)t.msCrypto.getRandomValues(r);else if(a){const e=a.randomBytes(r.length);r.set(e)}else{if(!this.randomBuffer.buffer)throw new Error("No secure random number generator available.");await this.randomBuffer.get(r)}return r},getRandomBN:async function(e,t){if(t.cmp(e)<=0)throw new Error("Illegal parameter value: max <= min");const r=t.sub(e),i=r.byteLength();return new n.default(await this.getRandomBytes(i+8)).mod(r).add(e)},randomBuffer:new s},s.prototype.init=function(e,t){this.buffer=new Uint8Array(e),this.size=0,this.callback=t},s.prototype.set=function(e){if(!this.buffer)throw new Error("RandomBuffer is not initialized");if(!(e instanceof Uint8Array))throw new Error("Invalid type: buf not an Uint8Array");const t=this.buffer.length-this.size;e.length>t&&(e=e.subarray(0,t)),this.buffer.set(e,this.size),this.size+=e.length},s.prototype.get=async function(e){if(!this.buffer)throw new Error("RandomBuffer is not initialized");if(!(e instanceof Uint8Array))throw new Error("Invalid type: buf not an Uint8Array");if(this.size<e.length){if(!this.callback)throw new Error("Random number buffer depleted");return await this.callback(),this.get(e)}for(let t=0;t<e.length;t++)e[t]=this.buffer[--this.size],this.buffer[this.size]=0}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../util":136,"bn.js":16,crypto:"crypto"}],88:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=o(e("./crypto")),i=o(e("./public_key")),a=o(e("../enums")),s=o(e("../util"));function o(e){return e&&e.__esModule?e:{default:e}}r.default={verify:async function(e,t,r,s,o,u){const l=n.default.getPubKeyParamTypes(e);if(s.length<l.length)throw new Error("Missing public key parameters");switch(e){case a.default.publicKey.rsa_encrypt_sign:case a.default.publicKey.rsa_encrypt:case a.default.publicKey.rsa_sign:{const e=s[0].toUint8Array(),n=s[1].toUint8Array(),a=r[0].toUint8Array("be",e.length);return i.default.rsa.verify(t,o,a,e,n,u)}case a.default.publicKey.dsa:{const e=r[0].toBN(),n=r[1].toBN(),a=s[0].toBN(),o=s[1].toBN(),l=s[2].toBN(),c=s[3].toBN();return i.default.dsa.verify(t,e,n,u,l,a,o,c)}case a.default.publicKey.ecdsa:{var c=i.default.elliptic.ecdsa.parseParams(s);const e=c.oid,n=c.Q,a={r:r[0].toUint8Array(),s:r[1].toUint8Array()};return i.default.elliptic.ecdsa.verify(e,t,a,o,n,u)}case a.default.publicKey.eddsa:{var f=i.default.elliptic.eddsa.parseParams(s);const e=f.oid,n=f.Q,a={R:r[0].toUint8Array("le",32),S:r[1].toUint8Array("le",32)};return i.default.elliptic.eddsa.verify(e,t,a,o,n,u)}default:throw new Error("Invalid signature algorithm.")}},sign:async function(e,t,r,o,u){const l=[].concat(n.default.getPubKeyParamTypes(e),n.default.getPrivKeyParamTypes(e));if(r.length<l.length)throw new Error("Missing private key parameters");switch(e){case a.default.publicKey.rsa_encrypt_sign:case a.default.publicKey.rsa_encrypt:case a.default.publicKey.rsa_sign:{const e=r[0].toUint8Array(),n=r[1].toUint8Array(),a=r[2].toUint8Array(),l=r[3].toUint8Array(),c=r[4].toUint8Array(),f=r[5].toUint8Array(),d=await i.default.rsa.sign(t,o,e,n,a,l,c,f,u);return s.default.Uint8Array_to_MPI(d)}case a.default.publicKey.dsa:{const e=r[0].toBN(),n=r[1].toBN(),a=r[2].toBN(),o=r[4].toBN(),l=await i.default.dsa.sign(t,u,a,e,n,o);return s.default.concatUint8Array([s.default.Uint8Array_to_MPI(l.r),s.default.Uint8Array_to_MPI(l.s)])}case a.default.publicKey.elgamal:throw new Error("Signing with Elgamal is not defined in the OpenPGP standard.");case a.default.publicKey.ecdsa:{var c=i.default.elliptic.ecdsa.parseParams(r);const e=c.oid,n=c.Q,a=c.d,l=await i.default.elliptic.ecdsa.sign(e,t,o,n,a,u);return s.default.concatUint8Array([s.default.Uint8Array_to_MPI(l.r),s.default.Uint8Array_to_MPI(l.s)])}case a.default.publicKey.eddsa:{var f=i.default.elliptic.eddsa.parseParams(r);const e=f.oid,n=f.Q,a=f.seed,l=await i.default.elliptic.eddsa.sign(e,t,o,n,a,u);return s.default.concatUint8Array([s.default.Uint8Array_to_MPI(l.R),s.default.Uint8Array_to_MPI(l.S)])}default:throw new Error("Invalid signature algorithm.")}}}},{"../enums":91,"../util":136,"./crypto":67,"./public_key":84}],89:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=u(e("web-stream-tools")),i=u(e("./base64.js")),a=u(e("../enums.js")),s=u(e("../config")),o=u(e("../util"));function u(e){return e&&e.__esModule?e:{default:e}}function l(e){const t=e.match(/^-----BEGIN PGP (MESSAGE, PART \d+\/\d+|MESSAGE, PART \d+|SIGNED MESSAGE|MESSAGE|PUBLIC KEY BLOCK|PRIVATE KEY BLOCK|SIGNATURE)-----$/m);if(!t)throw new Error("Unknown ASCII armor type");return/MESSAGE, PART \d+\/\d+/.test(t[1])?a.default.armor.multipart_section:/MESSAGE, PART \d+/.test(t[1])?a.default.armor.multipart_last:/SIGNED MESSAGE/.test(t[1])?a.default.armor.signed:/MESSAGE/.test(t[1])?a.default.armor.message:/PUBLIC KEY BLOCK/.test(t[1])?a.default.armor.public_key:/PRIVATE KEY BLOCK/.test(t[1])?a.default.armor.private_key:/SIGNATURE/.test(t[1])?a.default.armor.signature:void 0}function c(e){let t="";return s.default.show_version&&(t+="Version: "+s.default.versionstring+"\r\n"),s.default.show_comment&&(t+="Comment: "+s.default.commentstring+"\r\n"),e&&(t+="Comment: "+e+"\r\n"),t+="\r\n"}function f(e){const t=function(e){let t=13501623;return n.default.transform(e,e=>{const r=h?Math.floor(e.length/4):0,n=new Uint32Array(e.buffer,e.byteOffset,r);for(let i=0;i<r;i++)t^=n[i],t=d[0][t>>24&255]^d[1][t>>16&255]^d[2][t>>8&255]^d[3][t>>0&255];for(let i=4*r;i<e.length;i++)t=t>>8^d[0][255&t^e[i]]},()=>new Uint8Array([t,t>>8,t>>16]))}(e);return i.default.encode(t)}const d=[new Array(255),new Array(255),new Array(255),new Array(255)];for(let m=0;m<=255;m++){let e=m<<16;for(let t=0;t<8;t++)e=e<<1^(0!=(8388608&e)?8801531:0);d[0][m]=(16711680&e)>>16|65280&e|(255&e)<<16}for(let m=0;m<=255;m++)d[1][m]=d[0][m]>>8^d[0][255&d[0][m]];for(let m=0;m<=255;m++)d[2][m]=d[1][m]>>8^d[0][255&d[1][m]];for(let m=0;m<=255;m++)d[3][m]=d[2][m]>>8^d[0][255&d[2][m]];const h=function(){const e=new ArrayBuffer(2);return new DataView(e).setInt16(0,255,!0),255===new Int16Array(e)[0]}();function p(e){for(let t=0;t<e.length;t++){if(!/^([^\s:]|[^\s:][^:]*[^\s:]): .+$/.test(e[t]))throw new Error("Improperly formatted armor header: "+e[t]);/^(Version|Comment|MessageID|Hash|Charset): .+$/.test(e[t])||o.default.print_debug_error(new Error("Unknown header: "+e[t]))}}function y(e){let t=e,r="";const n=e.lastIndexOf("=");return n>=0&&n!==e.length-1&&(t=e.slice(0,n),r=e.slice(n+1).substr(0,4)),{body:t,checksum:r}}r.default={encode:function(e,t,r,s,u){let l,d;e===a.default.armor.signed&&(l=t.text,d=t.hash,t=t.data);const h=n.default.passiveClone(t),p=[];switch(e){case a.default.armor.multipart_section:p.push("-----BEGIN PGP MESSAGE, PART "+r+"/"+s+"-----\r\n"),p.push(c(u)),p.push(i.default.encode(t)),p.push("=",f(h)),p.push("-----END PGP MESSAGE, PART "+r+"/"+s+"-----\r\n");break;case a.default.armor.multipart_last:p.push("-----BEGIN PGP MESSAGE, PART "+r+"-----\r\n"),p.push(c(u)),p.push(i.default.encode(t)),p.push("=",f(h)),p.push("-----END PGP MESSAGE, PART "+r+"-----\r\n");break;case a.default.armor.signed:p.push("\r\n-----BEGIN PGP SIGNED MESSAGE-----\r\n"),p.push("Hash: "+d+"\r\n\r\n"),p.push(l.replace(/^-/gm,"- -")),p.push("\r\n-----BEGIN PGP SIGNATURE-----\r\n"),p.push(c(u)),p.push(i.default.encode(t)),p.push("=",f(h)),p.push("-----END PGP SIGNATURE-----\r\n");break;case a.default.armor.message:p.push("-----BEGIN PGP MESSAGE-----\r\n"),p.push(c(u)),p.push(i.default.encode(t)),p.push("=",f(h)),p.push("-----END PGP MESSAGE-----\r\n");break;case a.default.armor.public_key:p.push("-----BEGIN PGP PUBLIC KEY BLOCK-----\r\n"),p.push(c(u)),p.push(i.default.encode(t)),p.push("=",f(h)),p.push("-----END PGP PUBLIC KEY BLOCK-----\r\n");break;case a.default.armor.private_key:p.push("-----BEGIN PGP PRIVATE KEY BLOCK-----\r\n"),p.push(c(u)),p.push(i.default.encode(t)),p.push("=",f(h)),p.push("-----END PGP PRIVATE KEY BLOCK-----\r\n");break;case a.default.armor.signature:p.push("-----BEGIN PGP SIGNATURE-----\r\n"),p.push(c(u)),p.push(i.default.encode(t)),p.push("=",f(h)),p.push("-----END PGP SIGNATURE-----\r\n")}return o.default.concat(p)},decode:function(e){return new Promise(async(t,r)=>{try{const u=/^-----[^-]+-----$/m,c=/^[ \f\r\t\u00a0\u2000-\u200a\u202f\u205f\u3000]*$/;let d;const h=[];let m,g,w,b=h,_=[],v=i.default.decode(n.default.transformPair(e,async(e,i)=>{const a=n.default.getReader(e);try{for(;;){let e=await a.readLine();if(void 0===e)throw new Error("Misformed armored text");if(e=o.default.removeTrailingSpaces(e.replace(/[\r\n]/g,"")),d)if(m)g||2!==d||(u.test(e)?(_=_.join("\r\n"),g=!0,p(b),b=[],m=!1):_.push(e.replace(/^- /,"")));else if(u.test(e)&&r(new Error("Mandatory blank line missing between armor headers and armor data")),c.test(e)){if(p(b),m=!0,g||2!==d){t({text:_,data:v,headers:h,type:d});break}}else b.push(e);else u.test(e)&&(d=l(e))}}catch(k){return void r(k)}const s=n.default.getWriter(i);try{for(;;){await s.ready;var f=await a.read();const e=f.done,t=f.value;if(e)throw new Error("Misformed armored text");const r=t+"";if(-1!==r.indexOf("=")||-1!==r.indexOf("-")){let e=await a.readToEnd();e.length||(e=""),e=r+e;const t=(e=o.default.removeTrailingSpaces(e.replace(/\r/g,""))).split(u);if(1===t.length)throw new Error("Misformed armored text");const n=y(t[0].slice(0,-1));w=n.checksum,await s.write(n.body);break}await s.write(r)}await s.ready,await s.close()}catch(k){await s.abort(k)}}));v=n.default.transformPair(v,async(e,t)=>{const r=n.default.readToEnd(f(n.default.passiveClone(e)));r.catch(()=>{}),await n.default.pipe(e,t,{preventClose:!0});const i=n.default.getWriter(t);try{const e=(await r).replace("\r\n","");if(w!==e&&(w||s.default.checksum_required))throw new Error("Ascii armor integrity check on message failed: '"+w+"' should be '"+e+"'");await i.ready,await i.close()}catch(a){await i.abort(a)}})}catch(a){r(a)}})}}},{"../config":57,"../enums.js":91,"../util":136,"./base64.js":90,"web-stream-tools":53}],90:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=a(e("web-stream-tools")),i=a(e("../util"));function a(e){return e&&e.__esModule?e:{default:e}}const s=i.default.getNodeBuffer();let o,u;s?(o=(e=>s.from(e).toString("base64")),u=(e=>{const t=s.from(e,"base64");return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)})):(o=(e=>btoa(i.default.Uint8Array_to_str(e))),u=(e=>i.default.str_to_Uint8Array(atob(e)))),r.default={encode:function(e){let t=new Uint8Array;return n.default.transform(e,e=>{t=i.default.concatUint8Array([t,e]);const r=[],n=Math.floor(t.length/45),a=45*n,s=o(t.subarray(0,a));for(let t=0;t<n;t++)r.push(s.substr(60*t,60)),r.push("\r\n");return t=t.subarray(a),r.join("")},()=>t.length?o(t)+"\r\n":"")},decode:function(e){let t="";return n.default.transform(e,e=>{t+=e;let r=0;const n=[" ","\t","\r","\n"];for(let s=0;s<n.length;s++){const e=n[s];for(let n=t.indexOf(e);-1!==n;n=t.indexOf(e,n+1))r++}let i=t.length;for(;i>0&&(i-r)%4!=0;i--)n.includes(t[i])&&r--;const a=u(t.substr(0,i));return t=t.substr(i),a},()=>u(t))}}},{"../util":136,"web-stream-tools":53}],91:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});const n=Symbol("byValue");r.default={curve:{p256:"p256","P-256":"p256",secp256r1:"p256",prime256v1:"p256","1.2.840.10045.3.1.7":"p256","2a8648ce3d030107":"p256","2A8648CE3D030107":"p256",p384:"p384","P-384":"p384",secp384r1:"p384","1.3.132.0.34":"p384","2b81040022":"p384","2B81040022":"p384",p521:"p521","P-521":"p521",secp521r1:"p521","1.3.132.0.35":"p521","2b81040023":"p521","2B81040023":"p521",secp256k1:"secp256k1","1.3.132.0.10":"secp256k1","2b8104000a":"secp256k1","2B8104000A":"secp256k1",ED25519:"ed25519",ed25519:"ed25519",Ed25519:"ed25519","1.3.6.1.4.1.11591.15.1":"ed25519","2b06010401da470f01":"ed25519","2B06010401DA470F01":"ed25519",X25519:"curve25519",cv25519:"curve25519",curve25519:"curve25519",Curve25519:"curve25519","1.3.6.1.4.1.3029.1.5.1":"curve25519","2b060104019755010501":"curve25519","2B060104019755010501":"curve25519",brainpoolP256r1:"brainpoolP256r1","1.3.36.3.3.2.8.1.1.7":"brainpoolP256r1","2b2403030208010107":"brainpoolP256r1","2B2403030208010107":"brainpoolP256r1",brainpoolP384r1:"brainpoolP384r1","1.3.36.3.3.2.8.1.1.11":"brainpoolP384r1","2b240303020801010b":"brainpoolP384r1","2B240303020801010B":"brainpoolP384r1",brainpoolP512r1:"brainpoolP512r1","1.3.36.3.3.2.8.1.1.13":"brainpoolP512r1","2b240303020801010d":"brainpoolP512r1","2B240303020801010D":"brainpoolP512r1"},s2k:{simple:0,salted:1,iterated:3,gnu:101},publicKey:{rsa_encrypt_sign:1,rsa_encrypt:2,rsa_sign:3,elgamal:16,dsa:17,ecdh:18,ecdsa:19,eddsa:22,aedh:23,aedsa:24},symmetric:{plaintext:0,idea:1,"3des":2,tripledes:2,cast5:3,blowfish:4,aes128:7,aes192:8,aes256:9,twofish:10},compression:{uncompressed:0,zip:1,zlib:2,bzip2:3},hash:{md5:1,sha1:2,ripemd:3,sha256:8,sha384:9,sha512:10,sha224:11},webHash:{"SHA-1":2,"SHA-256":8,"SHA-384":9,"SHA-512":10},aead:{eax:1,ocb:2,experimental_gcm:100},packet:{publicKeyEncryptedSessionKey:1,signature:2,symEncryptedSessionKey:3,onePassSignature:4,secretKey:5,publicKey:6,secretSubkey:7,compressed:8,symmetricallyEncrypted:9,marker:10,literal:11,trust:12,userid:13,publicSubkey:14,userAttribute:17,symEncryptedIntegrityProtected:18,modificationDetectionCode:19,symEncryptedAEADProtected:20},literal:{binary:"b".charCodeAt(),text:"t".charCodeAt(),utf8:"u".charCodeAt(),mime:"m".charCodeAt()},signature:{binary:0,text:1,standalone:2,cert_generic:16,cert_persona:17,cert_casual:18,cert_positive:19,cert_revocation:48,subkey_binding:24,key_binding:25,key:31,key_revocation:32,subkey_revocation:40,timestamp:64,third_party:80},signatureSubpacket:{signature_creation_time:2,signature_expiration_time:3,exportable_certification:4,trust_signature:5,regular_expression:6,revocable:7,key_expiration_time:9,placeholder_backwards_compatibility:10,preferred_symmetric_algorithms:11,revocation_key:12,issuer:16,notation_data:20,preferred_hash_algorithms:21,preferred_compression_algorithms:22,key_server_preferences:23,preferred_key_server:24,primary_user_id:25,policy_uri:26,key_flags:27,signers_user_id:28,reason_for_revocation:29,features:30,signature_target:31,embedded_signature:32,issuer_fingerprint:33,preferred_aead_algorithms:34},keyFlags:{certify_keys:1,sign_data:2,encrypt_communication:4,encrypt_storage:8,split_private_key:16,authentication:32,shared_private_key:128},armor:{multipart_section:0,multipart_last:1,signed:2,message:3,public_key:4,private_key:5,signature:6},reasonForRevocation:{no_reason:0,key_superseded:1,key_compromised:2,key_retired:3,userid_invalid:32},features:{modification_detection:1,aead:2,v5_keys:4},write:function(e,t){if("number"==typeof t&&(t=this.read(e,t)),void 0!==e[t])return e[t];throw new Error("Invalid enum value.")},read:function(e,t){if(e[n]||(e[n]=[],Object.entries(e).forEach(([t,r])=>{e[n][r]=t})),void 0!==e[n][t])return e[n][t];throw new Error("Invalid enum value.")}}},{}],92:[function(e,t,r){(function(t){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n,i=e("./config"),a=(n=i)&&n.__esModule?n:{default:n};function s(r){this._baseUrl=r||a.default.keyserver,this._fetch="function"==typeof t.fetch?t.fetch:e("node-fetch")}s.prototype.lookup=function(e){let t=this._baseUrl+"/pks/lookup?op=get&options=mr&search=";const r=this._fetch;if(e.keyId)t+="0x"+encodeURIComponent(e.keyId);else{if(!e.query)throw new Error("You must provide a query parameter!");t+=encodeURIComponent(e.query)}return r(t).then(function(e){if(200===e.status)return e.text()}).then(function(e){if(e&&!(e.indexOf("-----END PGP PUBLIC KEY BLOCK-----")<0))return e.trim()})},s.prototype.upload=function(e){const t=this._baseUrl+"/pks/add";return(0,this._fetch)(t,{method:"post",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},body:"keytext="+encodeURIComponent(e)})},r.default=s}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./config":57,"node-fetch":"node-fetch"}],93:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.lightweight=r.WKD=r.HKP=r.AsyncProxy=r.Keyring=r.crypto=r.config=r.enums=r.armor=r.stream=r.OID=r.KDFParams=r.ECDHSymmetricKey=r.Keyid=r.S2K=r.MPI=r.packet=r.util=r.cleartext=r.message=r.signature=r.key=r.destroyWorker=r.getWorker=r.initWorker=r.decryptSessionKeys=r.encryptSessionKey=r.decryptKey=r.revokeKey=r.reformatKey=r.generateKey=r.verify=r.sign=r.decrypt=r.encrypt=void 0;var n=e("./openpgp");Object.defineProperty(r,"encrypt",{enumerable:!0,get:function(){return n.encrypt}}),Object.defineProperty(r,"decrypt",{enumerable:!0,get:function(){return n.decrypt}}),Object.defineProperty(r,"sign",{enumerable:!0,get:function(){return n.sign}}),Object.defineProperty(r,"verify",{enumerable:!0,get:function(){return n.verify}}),Object.defineProperty(r,"generateKey",{enumerable:!0,get:function(){return n.generateKey}}),Object.defineProperty(r,"reformatKey",{enumerable:!0,get:function(){return n.reformatKey}}),Object.defineProperty(r,"revokeKey",{enumerable:!0,get:function(){return n.revokeKey}}),Object.defineProperty(r,"decryptKey",{enumerable:!0,get:function(){return n.decryptKey}}),Object.defineProperty(r,"encryptSessionKey",{enumerable:!0,get:function(){return n.encryptSessionKey}}),Object.defineProperty(r,"decryptSessionKeys",{enumerable:!0,get:function(){return n.decryptSessionKeys}}),Object.defineProperty(r,"initWorker",{enumerable:!0,get:function(){return n.initWorker}}),Object.defineProperty(r,"getWorker",{enumerable:!0,get:function(){return n.getWorker}}),Object.defineProperty(r,"destroyWorker",{enumerable:!0,get:function(){return n.destroyWorker}});var i=e("./util");Object.defineProperty(r,"util",{enumerable:!0,get:function(){return M(i).default}});var a=e("./packet");Object.defineProperty(r,"packet",{enumerable:!0,get:function(){return M(a).default}});var s=e("./type/mpi");Object.defineProperty(r,"MPI",{enumerable:!0,get:function(){return M(s).default}});var o=e("./type/s2k");Object.defineProperty(r,"S2K",{enumerable:!0,get:function(){return M(o).default}});var u=e("./type/keyid");Object.defineProperty(r,"Keyid",{enumerable:!0,get:function(){return M(u).default}});var l=e("./type/ecdh_symkey");Object.defineProperty(r,"ECDHSymmetricKey",{enumerable:!0,get:function(){return M(l).default}});var c=e("./type/kdf_params");Object.defineProperty(r,"KDFParams",{enumerable:!0,get:function(){return M(c).default}});var f=e("./type/oid");Object.defineProperty(r,"OID",{enumerable:!0,get:function(){return M(f).default}});var d=e("web-stream-tools");Object.defineProperty(r,"stream",{enumerable:!0,get:function(){return M(d).default}});var h=e("./encoding/armor");Object.defineProperty(r,"armor",{enumerable:!0,get:function(){return M(h).default}});var p=e("./enums");Object.defineProperty(r,"enums",{enumerable:!0,get:function(){return M(p).default}});var y=e("./config/config");Object.defineProperty(r,"config",{enumerable:!0,get:function(){return M(y).default}});var m=e("./crypto");Object.defineProperty(r,"crypto",{enumerable:!0,get:function(){return M(m).default}});var g=e("./keyring");Object.defineProperty(r,"Keyring",{enumerable:!0,get:function(){return M(g).default}});var w=e("./worker/async_proxy");Object.defineProperty(r,"AsyncProxy",{enumerable:!0,get:function(){return M(w).default}});var b=e("./hkp");Object.defineProperty(r,"HKP",{enumerable:!0,get:function(){return M(b).default}});var _=e("./wkd");Object.defineProperty(r,"WKD",{enumerable:!0,get:function(){return M(_).default}});var v=x(n),k=x(e("./key")),A=x(e("./signature")),S=x(e("./message")),P=x(e("./cleartext")),E=x(e("./lightweight_helper"));function x(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function M(e){return e&&e.__esModule?e:{default:e}}r.default=v;r.key=k,r.signature=A,r.message=S,r.cleartext=P,r.lightweight=E},{"./cleartext":55,"./config/config":56,"./crypto":72,"./encoding/armor":89,"./enums":91,"./hkp":92,"./key":96,"./keyring":100,"./lightweight_helper":103,"./message":104,"./openpgp":105,"./packet":109,"./signature":129,"./type/ecdh_symkey":130,"./type/kdf_params":131,"./type/keyid":132,"./type/mpi":133,"./type/oid":134,"./type/s2k":135,"./util":136,"./wkd":137,"./worker/async_proxy":138,"web-stream-tools":53}],94:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.generate=async function(e){e.sign=!0,(e=a.sanitizeKeyOptions(e)).subkeys=e.subkeys.map(function(t,r){return a.sanitizeKeyOptions(e.subkeys[r],e)});let t=[a.generateSecretKey(e)];return t=t.concat(e.subkeys.map(a.generateSecretSubkey)),Promise.all(t).then(t=>f(t[0],t.slice(1),e))},r.reformat=async function(e){e=i(e);try{const t=e.privateKey.getKeys().every(e=>e.isDecrypted());t||await e.privateKey.decrypt()}catch(a){throw new Error("Key not decrypted")}const t=e.privateKey.toPacketlist();let r;const n=[];for(let o=0;o<t.length;o++)t[o].tag===s.default.packet.secretKey?r=t[o]:t[o].tag===s.default.packet.secretSubkey&&n.push(t[o]);if(!r)throw new Error("Key does not contain a secret key packet");e.subkeys||(e.subkeys=await Promise.all(n.map(async t=>({sign:await e.privateKey.getSigningKey(t.getKeyId(),null).catch(()=>{})&&!(await e.privateKey.getEncryptionKey(t.getKeyId(),null).catch(()=>{}))}))));if(e.subkeys.length!==n.length)throw new Error("Number of subkey options does not match number of subkeys");return e.subkeys=e.subkeys.map(function(t,r){return i(e.subkeys[r],e)}),f(r,n,e);function i(e,t={}){return e.keyExpirationTime=e.keyExpirationTime||t.keyExpirationTime,e.passphrase=o.default.isString(e.passphrase)?e.passphrase:t.passphrase,e.date=e.date||t.date,e}},r.read=d,r.readArmored=async function(e){try{const r=await l.default.decode(e);if(r.type!==s.default.armor.public_key&&r.type!==s.default.armor.private_key)throw new Error("Armored text not of type key");return d(r.data)}catch(t){const e={keys:[],err:[]};return e.err.push(t),e}};var n=c(e("../packet")),i=c(e("./key")),a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("./helper")),s=c(e("../enums")),o=c(e("../util")),u=c(e("../config")),l=c(e("../encoding/armor"));function c(e){return e&&e.__esModule?e:{default:e}}async function f(e,t,r){r.passphrase&&await e.encrypt(r.passphrase),await Promise.all(t.map(async function(e,t){const n=r.subkeys[t].passphrase;n&&await e.encrypt(n)}));const o=new n.default.List;o.push(e),await Promise.all(r.userIds.map(async function(t,i){function o(e,t){if(t){const r=e.indexOf(t);r>=1&&e.splice(r,1),0!==r&&e.unshift(t)}return e}const l=new n.default.Userid;l.format(t);const c={};c.userId=l,c.key=e;const f=new n.default.Signature(r.date);return f.signatureType=s.default.signature.cert_generic,f.publicKeyAlgorithm=e.algorithm,f.hashAlgorithm=await a.getPreferredHashAlgo(null,e),f.keyFlags=[s.default.keyFlags.certify_keys|s.default.keyFlags.sign_data],f.preferredSymmetricAlgorithms=o([s.default.symmetric.aes256,s.default.symmetric.aes128,s.default.symmetric.aes192,s.default.symmetric.cast5,s.default.symmetric.tripledes],u.default.encryption_cipher),u.default.aead_protect&&(f.preferredAeadAlgorithms=o([s.default.aead.eax,s.default.aead.ocb],u.default.aead_mode)),f.preferredHashAlgorithms=o([s.default.hash.sha256,s.default.hash.sha512,s.default.hash.sha1],u.default.prefer_hash_algorithm),f.preferredCompressionAlgorithms=o([s.default.compression.zlib,s.default.compression.zip,s.default.compression.uncompressed],u.default.compression),0===i&&(f.isPrimaryUserID=!0),u.default.integrity_protect&&(f.features=[0],f.features[0]|=s.default.features.modification_detection),u.default.aead_protect&&(f.features||(f.features=[0]),f.features[0]|=s.default.features.aead),u.default.v5_keys&&(f.features||(f.features=[0]),f.features[0]|=s.default.features.v5_keys),r.keyExpirationTime>0&&(f.keyExpirationTime=r.keyExpirationTime,f.keyNeverExpires=!1),await f.sign(e,c),{userIdPacket:l,signaturePacket:f}})).then(e=>{e.forEach(({userIdPacket:e,signaturePacket:t})=>{o.push(e),o.push(t)})}),await Promise.all(t.map(async function(t,n){const i=r.subkeys[n];return{secretSubkeyPacket:t,subkeySignaturePacket:await a.createBindingSignature(t,e,i)}})).then(e=>{e.forEach(({secretSubkeyPacket:e,subkeySignaturePacket:t})=>{o.push(e),o.push(t)})});const l={key:e};return o.push(await a.createSignaturePacket(l,null,e,{signatureType:s.default.signature.key_revocation,reasonForRevocationFlag:s.default.reasonForRevocation.no_reason,reasonForRevocationString:""},r.date)),r.passphrase&&e.clearPrivateParams(),await Promise.all(t.map(async function(e,t){r.subkeys[t].passphrase&&e.clearPrivateParams()})),new i.default(o)}async function d(e){const t={keys:[]},r=[];try{const o=new n.default.List;await o.read(e);const u=o.indexOfTag(s.default.packet.publicKey,s.default.packet.secretKey);if(0===u.length)throw new Error("No key packet found");for(let e=0;e<u.length;e++){const n=o.slice(u[e],u[e+1]);try{const e=new i.default(n);t.keys.push(e)}catch(a){r.push(a)}}}catch(a){r.push(a)}return r.length&&(t.err=r),t}},{"../config":57,"../encoding/armor":89,"../enums":91,"../packet":109,"../util":136,"./helper":95,"./key":97}],95:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var r=[],n=!0,i=!1,a=void 0;try{for(var s,o=e[Symbol.iterator]();!(n=(s=o.next()).done)&&(r.push(s.value),!t||r.length!==t);n=!0);}catch(u){i=!0,a=u}finally{try{!n&&o.return&&o.return()}finally{if(i)throw a}}return r}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();r.generateSecretSubkey=async function(e){const t=new i.default.SecretSubkey(e.date);return t.packets=null,t.algorithm=a.default.read(a.default.publicKey,e.algorithm),await t.generate(e.rsaBits,e.curve),t},r.generateSecretKey=async function(e){const t=new i.default.SecretKey(e.date);return t.packets=null,t.algorithm=a.default.read(a.default.publicKey,e.algorithm),await t.generate(e.rsaBits,e.curve),t},r.getLatestValidSignature=async function(e,t,r,n,i=new Date){let s,o;for(let a=e.length-1;a>=0;a--)try{s&&!(e[a].created>=s.created)||e[a].isExpired(i)||!e[a].verified&&!(await e[a].verify(t,r,n))||(s=e[a])}catch(l){o=l}if(!s)throw u.default.wrapError(`Could not find valid ${a.default.read(a.default.signature,r)} signature in key ${t.getKeyId().toHex()}`.replace("cert_generic ","self-").replace("_"," "),o);return s},r.isDataExpired=function(e,t,r=new Date){const n=u.default.normalizeDate(r);if(null!==n){const i=d(e,t);return!(e.created<=n&&n<=i)||t&&t.isExpired(r)}return!1},r.createBindingSignature=async function(e,t,r){const n={};n.key=t,n.bind=e;const s=new i.default.Signature(r.date);s.signatureType=a.default.signature.subkey_binding,s.publicKeyAlgorithm=t.algorithm,s.hashAlgorithm=await c(null,e),r.sign?(s.keyFlags=[a.default.keyFlags.sign_data],s.embeddedSignature=await f(n,null,e,{signatureType:a.default.signature.key_binding},r.date)):s.keyFlags=[a.default.keyFlags.encrypt_communication|a.default.keyFlags.encrypt_storage];r.keyExpirationTime>0&&(s.keyExpirationTime=r.keyExpirationTime,s.keyNeverExpires=!1);return await s.sign(t,n),s},r.getPreferredHashAlgo=c,r.getPreferredAlgo=async function(e,t,r=new Date,n=[]){const i="symmetric"===e?"preferredSymmetricAlgorithms":"preferredAeadAlgorithms",s="symmetric"===e?a.default.symmetric.aes128:a.default.aead.eax,o={};await Promise.all(t.map(async function(e,t){const a=await e.getPrimaryUser(r,n[t]);if(!a.selfCertification[i])return s;a.selfCertification[i].forEach(function(e,t){const r=o[e]||(o[e]={prio:0,count:0,algo:e});r.prio+=64>>t,r.count++})}));let u={prio:0,algo:s};return Object.values(o).forEach(({prio:r,count:n,algo:i})=>{try{i!==a.default[e].plaintext&&i!==a.default[e].idea&&a.default.read(a.default[e],i)&&n===t.length&&r>u.prio&&(u=o[i])}catch(s){}}),u.algo},r.createSignaturePacket=f,r.mergeSignatures=async function(e,t,r,n){(e=e[r])&&(t[r].length?await Promise.all(e.map(async function(e){e.isExpired()||n&&!(await n(e))||t[r].some(function(t){return u.default.equalsUint8Array(t.signature,e.signature)})||t[r].push(e)})):t[r]=e)},r.isDataRevoked=async function(e,t,r,n,i,a,o=new Date){a=a||e;const l=u.default.normalizeDate(o),c=[];if(await Promise.all(n.map(async function(e){try{i&&!e.issuerKeyId.equals(i.issuerKeyId)||s.default.revocations_expire&&e.isExpired(l)||!e.verified&&!(await e.verify(a,t,r))||c.push(e.issuerKeyId)}catch(n){}})),i)return i.revoked=!!c.some(e=>e.equals(i.issuerKeyId))||(i.revoked||!1),i.revoked;return c.length>0},r.getExpirationTime=d,r.isAeadSupported=async function(e,t=new Date,r=[]){let n=!0;return await Promise.all(e.map(async function(e,i){const s=await e.getPrimaryUser(t,r[i]);s.selfCertification.features&&s.selfCertification.features[0]&a.default.features.aead||(n=!1)})),n},r.sanitizeKeyOptions=function(e,t={}){if(e.curve=e.curve||t.curve,e.rsaBits=e.rsaBits||t.rsaBits,e.keyExpirationTime=void 0!==e.keyExpirationTime?e.keyExpirationTime:t.keyExpirationTime,e.passphrase=u.default.isString(e.passphrase)?e.passphrase:t.passphrase,e.date=e.date||t.date,e.sign=e.sign||!1,e.curve){try{e.curve=a.default.write(a.default.curve,e.curve)}catch(r){throw new Error("Not valid curve.")}e.curve!==a.default.curve.ed25519&&e.curve!==a.default.curve.curve25519||(e.curve=e.sign?a.default.curve.ed25519:a.default.curve.curve25519),e.sign?e.algorithm=e.curve===a.default.curve.ed25519?a.default.publicKey.eddsa:a.default.publicKey.ecdsa:e.algorithm=a.default.publicKey.ecdh}else{if(!e.rsaBits)throw new Error("Unrecognized key type");e.algorithm=a.default.publicKey.rsa_encrypt_sign}return e},r.isValidSigningKeyPacket=function(e,t){if(!t.verified||!1!==t.revoked)throw new Error("Signature not verified");return e.algorithm!==a.default.read(a.default.publicKey,a.default.publicKey.rsa_encrypt)&&e.algorithm!==a.default.read(a.default.publicKey,a.default.publicKey.elgamal)&&e.algorithm!==a.default.read(a.default.publicKey,a.default.publicKey.ecdh)&&(!t.keyFlags||0!=(t.keyFlags[0]&a.default.keyFlags.sign_data))},r.isValidEncryptionKeyPacket=function(e,t){if(!t.verified||!1!==t.revoked)throw new Error("Signature not verified");return e.algorithm!==a.default.read(a.default.publicKey,a.default.publicKey.dsa)&&e.algorithm!==a.default.read(a.default.publicKey,a.default.publicKey.rsa_sign)&&e.algorithm!==a.default.read(a.default.publicKey,a.default.publicKey.ecdsa)&&e.algorithm!==a.default.read(a.default.publicKey,a.default.publicKey.eddsa)&&(!t.keyFlags||0!=(t.keyFlags[0]&a.default.keyFlags.encrypt_communication)||0!=(t.keyFlags[0]&a.default.keyFlags.encrypt_storage))},r.isValidDecryptionKeyPacket=function(e){if(!e.verified)throw new Error("Signature not verified");if(s.default.allow_insecure_decryption_with_signing_keys)return!0;return!e.keyFlags||0!=(e.keyFlags[0]&a.default.keyFlags.encrypt_communication)||0!=(e.keyFlags[0]&a.default.keyFlags.encrypt_storage)};var i=l(e("../packet")),a=l(e("../enums")),s=l(e("../config")),o=l(e("../crypto")),u=l(e("../util"));function l(e){return e&&e.__esModule?e:{default:e}}async function c(e,t,r=new Date,a={}){let u=s.default.prefer_hash_algorithm,l=u;if(e){const t=await e.getPrimaryUser(r,a);if(t.selfCertification.preferredHashAlgorithms)l=n(t.selfCertification.preferredHashAlgorithms,1)[0],u=o.default.hash.getHashByteLength(u)<=o.default.hash.getHashByteLength(l)?l:u}switch(Object.getPrototypeOf(t)){case i.default.SecretKey.prototype:case i.default.PublicKey.prototype:case i.default.SecretSubkey.prototype:case i.default.PublicSubkey.prototype:switch(t.algorithm){case"ecdh":case"ecdsa":case"eddsa":l=o.default.publicKey.elliptic.getPreferredHashAlgo(t.params[0])}}return o.default.hash.getHashByteLength(u)<=o.default.hash.getHashByteLength(l)?l:u}async function f(e,t,r,n,a,s,o=!1,u=!1){if(!r.isDecrypted())throw new Error("Private key is not decrypted.");const l=new i.default.Signature(a);return Object.assign(l,n),l.publicKeyAlgorithm=r.algorithm,l.hashAlgorithm=await c(t,r,a,s),await l.sign(r,e,o,u),l}function d(e,t){let r;return!1===t.keyNeverExpires&&(r=e.created.getTime()+1e3*t.keyExpirationTime),r?new Date(r):1/0}},{"../config":57,"../crypto":72,"../enums":91,"../packet":109,"../util":136}],96:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.Key=r.createSignaturePacket=r.getPreferredHashAlgo=r.isAeadSupported=r.getPreferredAlgo=r.reformat=r.read=r.generate=r.readArmored=void 0;var n,i=e("./factory"),a=e("./helper"),s=e("./key.js"),o=(n=s)&&n.__esModule?n:{default:n};r.readArmored=i.readArmored,r.generate=i.generate,r.read=i.read,r.reformat=i.reformat,r.getPreferredAlgo=a.getPreferredAlgo,r.isAeadSupported=a.isAeadSupported,r.getPreferredHashAlgo=a.getPreferredHashAlgo,r.createSignaturePacket=a.createSignaturePacket,r.Key=o.default},{"./factory":94,"./helper":95,"./key.js":97}],97:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=f;var n=c(e("../encoding/armor")),i=c(e("../packet")),a=c(e("../enums")),s=c(e("../util")),o=c(e("./user")),u=c(e("./subkey")),l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("./helper"));function c(e){return e&&e.__esModule?e:{default:e}}function f(e){if(!(this instanceof f))return new f(e);if(this.keyPacket=null,this.revocationSignatures=[],this.directSignatures=[],this.users=[],this.subKeys=[],this.packetlist2structure(e),!this.keyPacket||!this.users.length)throw new Error("Invalid key: need at least key and user ID packet")}Object.defineProperty(f.prototype,"primaryKey",{get(){return this.keyPacket},configurable:!0,enumerable:!0}),f.prototype.packetlist2structure=function(e){let t,r,n;for(let i=0;i<e.length;i++)switch(e[i].tag){case a.default.packet.publicKey:case a.default.packet.secretKey:this.keyPacket=e[i],r=this.getKeyId();break;case a.default.packet.userid:case a.default.packet.userAttribute:t=new o.default(e[i]),this.users.push(t);break;case a.default.packet.publicSubkey:case a.default.packet.secretSubkey:t=null,n=new u.default(e[i]),this.subKeys.push(n);break;case a.default.packet.signature:switch(e[i].signatureType){case a.default.signature.cert_generic:case a.default.signature.cert_persona:case a.default.signature.cert_casual:case a.default.signature.cert_positive:if(!t){s.default.print_debug("Dropping certification signatures without preceding user packet");continue}e[i].issuerKeyId.equals(r)?t.selfCertifications.push(e[i]):t.otherCertifications.push(e[i]);break;case a.default.signature.cert_revocation:t?t.revocationSignatures.push(e[i]):this.directSignatures.push(e[i]);break;case a.default.signature.key:this.directSignatures.push(e[i]);break;case a.default.signature.subkey_binding:if(!n){s.default.print_debug("Dropping subkey binding signature without preceding subkey packet");continue}n.bindingSignatures.push(e[i]);break;case a.default.signature.key_revocation:this.revocationSignatures.push(e[i]);break;case a.default.signature.subkey_revocation:if(!n){s.default.print_debug("Dropping subkey revocation signature without preceding subkey packet");continue}n.revocationSignatures.push(e[i])}}},f.prototype.toPacketlist=function(){const e=new i.default.List;return e.push(this.keyPacket),e.concat(this.revocationSignatures),e.concat(this.directSignatures),this.users.map(t=>e.concat(t.toPacketlist())),this.subKeys.map(t=>e.concat(t.toPacketlist())),e},f.prototype.getSubkeys=function(e=null){const t=[];return this.subKeys.forEach(r=>{e&&!r.getKeyId().equals(e,!0)||t.push(r)}),t},f.prototype.getKeys=function(e=null){const t=[];return e&&!this.getKeyId().equals(e,!0)||t.push(this),t.concat(this.getSubkeys(e))},f.prototype.getKeyIds=function(){return this.getKeys().map(e=>e.getKeyId())},f.prototype.getUserIds=function(){return this.users.map(e=>e.userId?e.userId.userid:null).filter(e=>null!==e)},f.prototype.isPublic=function(){return this.keyPacket.tag===a.default.packet.publicKey},f.prototype.isPrivate=function(){return this.keyPacket.tag===a.default.packet.secretKey},f.prototype.toPublic=function(){const e=new i.default.List,t=this.toPacketlist();let r,n,s;for(let o=0;o<t.length;o++)switch(t[o].tag){case a.default.packet.secretKey:r=t[o].writePublicKey(),(n=new i.default.PublicKey).read(r),e.push(n);break;case a.default.packet.secretSubkey:r=t[o].writePublicKey(),(s=new i.default.PublicSubkey).read(r),e.push(s);break;default:e.push(t[o])}return new f(e)},f.prototype.armor=function(){const e=this.isPublic()?a.default.armor.public_key:a.default.armor.private_key;return n.default.encode(e,this.toPacketlist().write())},f.prototype.getSigningKey=async function(e=null,t=new Date,r={}){await this.verifyPrimaryKey(t,r);const n=this.keyPacket,i=this.subKeys.slice().sort((e,t)=>t.keyPacket.created-e.keyPacket.created);let o;for(let s=0;s<i.length;s++)if(!e||i[s].getKeyId().equals(e))try{await i[s].verify(n,t);const e={key:n,bind:i[s].keyPacket},r=await l.getLatestValidSignature(i[s].bindingSignatures,n,a.default.signature.subkey_binding,e,t);if(r&&r.embeddedSignature&&l.isValidSigningKeyPacket(i[s].keyPacket,r)&&await l.getLatestValidSignature([r.embeddedSignature],i[s].keyPacket,a.default.signature.key_binding,e,t))return i[s]}catch(c){o=c}const u=await this.getPrimaryUser(t,r);if((!e||n.getKeyId().equals(e))&&l.isValidSigningKeyPacket(n,u.selfCertification))return this;throw s.default.wrapError("Could not find valid signing key packet in key "+this.getKeyId().toHex(),o)},f.prototype.getEncryptionKey=async function(e,t=new Date,r={}){await this.verifyPrimaryKey(t,r);const n=this.keyPacket,i=this.subKeys.slice().sort((e,t)=>t.keyPacket.created-e.keyPacket.created);let o;for(let s=0;s<i.length;s++)if(!e||i[s].getKeyId().equals(e))try{await i[s].verify(n,t);const e={key:n,bind:i[s].keyPacket},r=await l.getLatestValidSignature(i[s].bindingSignatures,n,a.default.signature.subkey_binding,e,t);if(r&&l.isValidEncryptionKeyPacket(i[s].keyPacket,r))return i[s]}catch(c){o=c}const u=await this.getPrimaryUser(t,r);if((!e||n.getKeyId().equals(e))&&l.isValidEncryptionKeyPacket(n,u.selfCertification))return this;throw s.default.wrapError("Could not find valid encryption key packet in key "+this.getKeyId().toHex(),o)},f.prototype.getDecryptionKeys=async function(e,t=new Date,r={}){const n=this.keyPacket,i=[];for(let u=0;u<this.subKeys.length;u++)if(!e||this.subKeys[u].getKeyId().equals(e,!0))try{const e={key:n,bind:this.subKeys[u].keyPacket},r=await l.getLatestValidSignature(this.subKeys[u].bindingSignatures,n,a.default.signature.subkey_binding,e,t);r&&l.isValidDecryptionKeyPacket(r)&&i.push(this.subKeys[u])}catch(o){}const s=await this.getPrimaryUser(t,r);return e&&!n.getKeyId().equals(e,!0)||!l.isValidDecryptionKeyPacket(s.selfCertification)||i.push(this),i},f.prototype.encrypt=async function(e,t=null){if(!this.isPrivate())throw new Error("Nothing to encrypt in a public key");const r=this.getKeys(t);if((e=s.default.isArray(e)?e:new Array(r.length).fill(e)).length!==r.length)throw new Error("Invalid number of passphrases for key");return Promise.all(r.map(async function(t,r){const n=t.keyPacket;return await n.encrypt(e[r]),n.clearPrivateParams(),n}))},f.prototype.decrypt=async function(e,t=null){if(!this.isPrivate())throw new Error("Nothing to decrypt in a public key");e=s.default.isArray(e)?e:[e];const r=await Promise.all(this.getKeys(t).map(async function(r){let n=!1,i=null;if(await Promise.all(e.map(async function(e){try{await r.keyPacket.decrypt(e),t&&await r.keyPacket.validate(),n=!0}catch(a){i=a}})),!n)throw i;return n}));return t||await this.validate(),r.every(e=>!0===e)},f.prototype.validate=async function(){if(!this.isPrivate())throw new Error("Cannot validate a public key");let e;if(this.primaryKey.isDummy()){const t=await this.getSigningKey(null,null);t&&!t.keyPacket.isDummy()&&(e=t.keyPacket)}else e=this.primaryKey;if(e)return e.validate();{const e=this.getKeys();if(e.map(e=>e.keyPacket.isDummy()).every(Boolean))throw new Error("Cannot validate an all-gnu-dummy key");return Promise.all(e.map(async e=>e.keyPacket.validate()))}},f.prototype.clearPrivateParams=function(){if(!this.isPrivate())throw new Error("Can't clear private parameters of a public key");this.getKeys().forEach(({keyPacket:e})=>{e.isDecrypted()&&e.clearPrivateParams()})},f.prototype.isRevoked=async function(e,t,r=new Date){return l.isDataRevoked(this.keyPacket,a.default.signature.key_revocation,{key:this.keyPacket},this.revocationSignatures,e,t,r)},f.prototype.verifyPrimaryKey=async function(e=new Date,t={}){const r=this.keyPacket;if(await this.isRevoked(null,null,e))throw new Error("Primary key is revoked");if(!this.users.some(e=>e.userId&&e.selfCertifications.length))throw new Error("No self-certifications");const n=(await this.getPrimaryUser(e,t)).selfCertification;if(l.isDataExpired(r,n,e))throw new Error("Primary key is expired")},f.prototype.getExpirationTime=async function(e,t,r){const n=(await this.getPrimaryUser(null,r)).selfCertification,i=l.getExpirationTime(this.keyPacket,n),a=n.getExpirationTime();let s=i<a?i:a;if("encrypt"===e||"encrypt_sign"===e){const e=await this.getEncryptionKey(t,s,r).catch(()=>{})||await this.getEncryptionKey(t,null,r).catch(()=>{});if(!e)return null;const n=await e.getExpirationTime(this.keyPacket);n<s&&(s=n)}if("sign"===e||"encrypt_sign"===e){const e=await this.getSigningKey(t,s,r).catch(()=>{})||await this.getSigningKey(t,null,r).catch(()=>{});if(!e)return null;const n=await e.getExpirationTime(this.keyPacket);n<s&&(s=n)}return s},f.prototype.getPrimaryUser=async function(e=new Date,t={}){const r=this.keyPacket,n=[];let i;for(let f=0;f<this.users.length;f++)try{const s=this.users[f];if(!s.userId)continue;if(void 0!==t.name&&s.userId.name!==t.name||void 0!==t.email&&s.userId.email!==t.email||void 0!==t.comment&&s.userId.comment!==t.comment)throw new Error("Could not find user that matches that user ID");const o={userId:s.userId,key:r},u=await l.getLatestValidSignature(s.selfCertifications,r,a.default.signature.cert_generic,o,e);n.push({index:f,user:s,selfCertification:u})}catch(c){i=c}if(!n.length)throw i||new Error("Could not find primary user");await Promise.all(n.map(async function(t){return t.user.revoked||t.user.isRevoked(r,t.selfCertification,null,e)}));const s=n.sort(function(e,t){const r=e.selfCertification,n=t.selfCertification;return n.revoked-r.revoked||r.isPrimaryUserID-n.isPrimaryUserID||r.created-n.created}).pop(),o=s.user,u=s.selfCertification;if(u.revoked||await o.isRevoked(r,u,null,e))throw new Error("Primary user is revoked");return s},f.prototype.update=async function(e){if(!this.hasSameFingerprintAs(e))throw new Error("Key update method: fingerprints of keys not equal");if(this.isPublic()&&e.isPrivate()){if(!(this.subKeys.length===e.subKeys.length&&this.subKeys.every(t=>e.subKeys.some(e=>t.hasSameFingerprintAs(e)))))throw new Error("Cannot update public key with private key if subkey mismatch");this.keyPacket=e.keyPacket}await l.mergeSignatures(e,this,"revocationSignatures",t=>l.isDataRevoked(this.keyPacket,a.default.signature.key_revocation,this,[t],null,e.keyPacket)),await l.mergeSignatures(e,this,"directSignatures"),await Promise.all(e.users.map(async e=>{let t=!1;await Promise.all(this.users.map(async r=>{(e.userId&&r.userId&&e.userId.userid===r.userId.userid||e.userAttribute&&e.userAttribute.equals(r.userAttribute))&&(await r.update(e,this.keyPacket),t=!0)})),t||this.users.push(e)})),await Promise.all(e.subKeys.map(async e=>{let t=!1;await Promise.all(this.subKeys.map(async r=>{r.hasSameFingerprintAs(e)&&(await r.update(e,this.keyPacket),t=!0)})),t||this.subKeys.push(e)}))},f.prototype.revoke=async function({flag:e=a.default.reasonForRevocation.no_reason,string:t=""}={},r=new Date){if(this.isPublic())throw new Error("Need private key for revoking");const n={key:this.keyPacket},i=new f(this.toPacketlist());return i.revocationSignatures.push(await l.createSignaturePacket(n,null,this.keyPacket,{signatureType:a.default.signature.key_revocation,reasonForRevocationFlag:a.default.write(a.default.reasonForRevocation,e),reasonForRevocationString:t},r)),i},f.prototype.getRevocationCertificate=async function(e=new Date){const t={key:this.keyPacket},r=await l.getLatestValidSignature(this.revocationSignatures,this.keyPacket,a.default.signature.key_revocation,t,e),s=new i.default.List;return s.push(r),n.default.encode(a.default.armor.public_key,s.write(),null,null,"This is a revocation certificate")},f.prototype.applyRevocationCertificate=async function(e){const t=await n.default.decode(e),r=new i.default.List;await r.read(t.data);const o=r.findPacket(a.default.packet.signature);if(!o||o.signatureType!==a.default.signature.key_revocation)throw new Error("Could not find revocation signature packet");if(!o.issuerKeyId.equals(this.getKeyId()))throw new Error("Revocation signature does not match key");if(o.isExpired())throw new Error("Revocation signature is expired");try{await o.verify(this.keyPacket,a.default.signature.key_revocation,{key:this.keyPacket})}catch(l){throw s.default.wrapError("Could not verify revocation signature",l)}const u=new f(this.toPacketlist());return u.revocationSignatures.push(o),u},f.prototype.signPrimaryUser=async function(e,t,r){var n=await this.getPrimaryUser(t,r);const i=n.index,a=n.user,s=await a.sign(this.keyPacket,e),o=new f(this.toPacketlist());return o.users[i]=s,o},f.prototype.signAllUsers=async function(e){const t=this,r=new f(this.toPacketlist());return r.users=await Promise.all(this.users.map(function(r){return r.sign(t.keyPacket,e)})),r},f.prototype.verifyPrimaryUser=async function(e,t,r){const n=this.keyPacket;const i=(await this.getPrimaryUser(t,r)).user;return e?await i.verifyAllCertifications(n,e):[{keyid:n.keyid,valid:await i.verify(n).catch(()=>!1)}]},f.prototype.verifyAllUsers=async function(e){const t=[],r=this.keyPacket;return await Promise.all(this.users.map(async function(n){(e?await n.verifyAllCertifications(r,e):[{keyid:r.keyid,valid:await n.verify(r).catch(()=>!1)}]).forEach(e=>{t.push({userid:n.userId.userid,keyid:e.keyid,valid:e.valid})})})),t},f.prototype.addSubkey=async function(e={}){if(!this.isPrivate())throw new Error("Cannot add a subkey to a public key");if(e.passphrase)throw new Error("Subkey could not be encrypted here, please encrypt whole key");if(s.default.getWebCryptoAll()&&e.rsaBits<2048)throw new Error("When using webCrypto rsaBits should be 2048 or 4096, found: "+e.rsaBits);const t=this.primaryKey;if(!t.isDecrypted())throw new Error("Key is not decrypted");const r=t.getAlgorithmInfo();e=l.sanitizeKeyOptions(e,r);const n=await l.generateSecretSubkey(e),i=await l.createBindingSignature(n,t,e),a=this.toPacketlist();return a.push(n),a.push(i),new f(a)},["getKeyId","getFingerprint","getAlgorithmInfo","getCreationTime","isDecrypted","hasSameFingerprintAs"].forEach(e=>{f.prototype[e]=u.default.prototype[e]})},{"../encoding/armor":89,"../enums":91,"../packet":109,"../util":136,"./helper":95,"./subkey":98,"./user":99}],98:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=o;var n=s(e("../enums")),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("./helper")),a=s(e("../packet"));function s(e){return e&&e.__esModule?e:{default:e}}function o(e){if(!(this instanceof o))return new o(e);this.keyPacket=e,this.bindingSignatures=[],this.revocationSignatures=[]}o.prototype.toPacketlist=function(){const e=new a.default.List;return e.push(this.keyPacket),e.concat(this.revocationSignatures),e.concat(this.bindingSignatures),e},o.prototype.isRevoked=async function(e,t,r,a=new Date){return i.isDataRevoked(e,n.default.signature.subkey_revocation,{key:e,bind:this.keyPacket},this.revocationSignatures,t,r,a)},o.prototype.verify=async function(e,t=new Date){const r={key:e,bind:this.keyPacket},a=await i.getLatestValidSignature(this.bindingSignatures,e,n.default.signature.subkey_binding,r,t);if(a.revoked||await this.isRevoked(e,a,null,t))throw new Error("Subkey is revoked");if(i.isDataExpired(this.keyPacket,a,t))throw new Error("Subkey is expired")},o.prototype.getExpirationTime=async function(e,t=new Date){const r={key:e,bind:this.keyPacket};let a;try{a=await i.getLatestValidSignature(this.bindingSignatures,e,n.default.signature.subkey_binding,r,t)}catch(u){return null}const s=i.getExpirationTime(this.keyPacket,a),o=a.getExpirationTime();return s<o?s:o},o.prototype.update=async function(e,t){if(!this.hasSameFingerprintAs(e))throw new Error("SubKey update method: fingerprints of subkeys not equal");this.keyPacket.tag===n.default.packet.publicSubkey&&e.keyPacket.tag===n.default.packet.secretSubkey&&(this.keyPacket=e.keyPacket);const r=this,a={key:t,bind:r.keyPacket};await i.mergeSignatures(e,this,"bindingSignatures",async function(e){for(let t=0;t<r.bindingSignatures.length;t++)if(r.bindingSignatures[t].issuerKeyId.equals(e.issuerKeyId))return e.created>r.bindingSignatures[t].created&&(r.bindingSignatures[t]=e),!1;try{return e.verified||await e.verify(t,n.default.signature.subkey_binding,a)}catch(i){return!1}}),await i.mergeSignatures(e,this,"revocationSignatures",function(e){return i.isDataRevoked(t,n.default.signature.subkey_revocation,a,[e])})},o.prototype.revoke=async function(e,{flag:t=n.default.reasonForRevocation.no_reason,string:r=""}={},a=new Date){const s={key:e,bind:this.keyPacket},u=new o(this.keyPacket);return u.revocationSignatures.push(await i.createSignaturePacket(s,null,e,{signatureType:n.default.signature.subkey_revocation,reasonForRevocationFlag:n.default.write(n.default.reasonForRevocation,t),reasonForRevocationString:r},a)),await u.update(this,e),u},["getKeyId","getFingerprint","getAlgorithmInfo","getCreationTime","isDecrypted"].forEach(e=>{o.prototype[e]=function(){return this.keyPacket[e]()}}),o.prototype.hasSameFingerprintAs=function(e){return this.keyPacket.hasSameFingerprintAs(e.keyPacket||e)}},{"../enums":91,"../packet":109,"./helper":95}],99:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=u;var n=o(e("../enums")),i=o(e("../util")),a=o(e("../packet")),s=e("./helper");function o(e){return e&&e.__esModule?e:{default:e}}function u(e){if(!(this instanceof u))return new u(e);this.userId=e.tag===n.default.packet.userid?e:null,this.userAttribute=e.tag===n.default.packet.userAttribute?e:null,this.selfCertifications=[],this.otherCertifications=[],this.revocationSignatures=[]}u.prototype.toPacketlist=function(){const e=new a.default.List;return e.push(this.userId||this.userAttribute),e.concat(this.revocationSignatures),e.concat(this.selfCertifications),e.concat(this.otherCertifications),e},u.prototype.sign=async function(e,t){const r={userId:this.userId,userAttribute:this.userAttribute,key:e},i=new u(r.userId||r.userAttribute);return i.otherCertifications=await Promise.all(t.map(async function(t){if(t.isPublic())throw new Error("Need private key for signing");if(t.hasSameFingerprintAs(e))throw new Error("Not implemented for self signing");const i=await t.getSigningKey();return(0,s.createSignaturePacket)(r,t,i.keyPacket,{signatureType:n.default.signature.cert_generic,keyFlags:[n.default.keyFlags.certify_keys|n.default.keyFlags.sign_data]})})),await i.update(this,e),i},u.prototype.isRevoked=async function(e,t,r,i=new Date){return(0,s.isDataRevoked)(e,n.default.signature.cert_revocation,{key:e,userId:this.userId,userAttribute:this.userAttribute},this.revocationSignatures,t,r,i)},u.prototype.verifyCertificate=async function(e,t,r,a=new Date){const s=this,o=t.issuerKeyId,u={userId:this.userId,userAttribute:this.userAttribute,key:e};return(await Promise.all(r.map(async function(r){if(!r.getKeyIds().some(e=>e.equals(o)))return null;const l=await r.getSigningKey(o,a);if(t.revoked||await s.isRevoked(e,t,l.keyPacket,a))throw new Error("User certificate is revoked");try{t.verified||await t.verify(l.keyPacket,n.default.signature.cert_generic,u)}catch(c){throw i.default.wrapError("User certificate is invalid",c)}if(t.isExpired(a))throw new Error("User certificate is expired");return!0}))).find(e=>null!==e)||null},u.prototype.verifyAllCertifications=async function(e,t,r=new Date){const n=this,i=this.selfCertifications.concat(this.otherCertifications);return Promise.all(i.map(async function(i){return{keyid:i.issuerKeyId,valid:await n.verifyCertificate(e,i,t,r).catch(()=>!1)}}))},u.prototype.verify=async function(e,t=new Date){if(!this.selfCertifications.length)throw new Error("No self-certifications");const r=this,a={userId:this.userId,userAttribute:this.userAttribute,key:e};let s;for(let u=this.selfCertifications.length-1;u>=0;u--)try{const l=this.selfCertifications[u];if(l.revoked||await r.isRevoked(e,l,void 0,t))throw new Error("Self-certification is revoked");try{l.verified||await l.verify(e,n.default.signature.cert_generic,a)}catch(o){throw i.default.wrapError("Self-certification is invalid",o)}if(l.isExpired(t))throw new Error("Self-certification is expired");return!0}catch(o){s=o}throw s},u.prototype.update=async function(e,t){const r={userId:this.userId,userAttribute:this.userAttribute,key:t};await(0,s.mergeSignatures)(e,this,"selfCertifications",async function(e){try{return e.verified||e.verify(t,n.default.signature.cert_generic,r)}catch(i){return!1}}),await(0,s.mergeSignatures)(e,this,"otherCertifications"),await(0,s.mergeSignatures)(e,this,"revocationSignatures",function(e){return(0,s.isDataRevoked)(t,n.default.signature.cert_revocation,r,[e])})}},{"../enums":91,"../packet":109,"../util":136,"./helper":95}],100:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=a(e("./keyring.js")),i=a(e("./localstore.js"));function a(e){return e&&e.__esModule?e:{default:e}}n.default.localstore=i.default,r.default=n.default},{"./keyring.js":101,"./localstore.js":102}],101:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n,i=e("../key"),a=e("./localstore"),s=(n=a)&&n.__esModule?n:{default:n};function o(e){this.storeHandler=e||new s.default}function u(e){this.keys=e}function l(e,t){const r=(e=e.toLowerCase()).replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),n=new RegExp("<"+r+">"),i=t.getUserIds();for(let a=0;a<i.length;a++){const t=i[a].toLowerCase();if(e===t||n.test(t))return!0}return!1}function c(e,t){return 16===e.length?e===t.getKeyId().toHex():e===t.getFingerprint()}o.prototype.load=async function(){this.publicKeys=new u(await this.storeHandler.loadPublic()),this.privateKeys=new u(await this.storeHandler.loadPrivate())},o.prototype.store=async function(){await Promise.all([this.storeHandler.storePublic(this.publicKeys.keys),this.storeHandler.storePrivate(this.privateKeys.keys)])},o.prototype.clear=function(){this.publicKeys.keys=[],this.privateKeys.keys=[]},o.prototype.getKeysForId=function(e,t){let r=[];return(r=(r=r.concat(this.publicKeys.getForId(e,t)||[])).concat(this.privateKeys.getForId(e,t)||[])).length?r:null},o.prototype.removeKeysForId=function(e){let t=[];return(t=(t=t.concat(this.publicKeys.removeForId(e)||[])).concat(this.privateKeys.removeForId(e)||[])).length?t:null},o.prototype.getAllKeys=function(){return this.publicKeys.keys.concat(this.privateKeys.keys)},u.prototype.getForAddress=function(e){const t=[];for(let r=0;r<this.keys.length;r++)l(e,this.keys[r])&&t.push(this.keys[r]);return t},u.prototype.getForId=function(e,t){for(let r=0;r<this.keys.length;r++){if(c(e,this.keys[r]))return this.keys[r];if(t&&this.keys[r].subKeys.length)for(let t=0;t<this.keys[r].subKeys.length;t++)if(c(e,this.keys[r].subKeys[t]))return this.keys[r]}return null},u.prototype.importKey=async function(e){const t=await(0,i.readArmored)(e);for(let r=0;r<t.keys.length;r++){const e=t.keys[r],n=e.getKeyId().toHex(),i=this.getForId(n);i?await i.update(e):this.push(e)}return t.err?t.err:null},u.prototype.push=function(e){return this.keys.push(e)},u.prototype.removeForId=function(e){for(let t=0;t<this.keys.length;t++)if(c(e,this.keys[t]))return this.keys.splice(t,1)[0];return null},r.default=o},{"../key":96,"./localstore":102}],102:[function(e,t,r){(function(t){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=o(e("web-stream-tools")),i=o(e("../config")),a=e("../key"),s=o(e("../util"));function o(e){return e&&e.__esModule?e:{default:e}}function u(r){r=r||"openpgp-",this.publicKeysItem=r+this.publicKeysItem,this.privateKeysItem=r+this.privateKeysItem,void 0!==t&&t.localStorage?this.storage=t.localStorage:this.storage=new(e("node-localstorage").LocalStorage)(i.default.node_store)}async function l(e,t){const r=JSON.parse(e.getItem(t)),n=[];if(null!==r&&0!==r.length){let e;for(let t=0;t<r.length;t++)(e=await(0,a.readArmored)(r[t])).err?s.default.print_debug("Error reading armored key from keyring index: "+t):n.push(e.keys[0])}return n}async function c(e,t,r){if(r.length){const i=await Promise.all(r.map(e=>n.default.readToEnd(e.armor())));e.setItem(t,JSON.stringify(i))}else e.removeItem(t)}u.prototype.publicKeysItem="public-keys",u.prototype.privateKeysItem="private-keys",u.prototype.loadPublic=async function(){return l(this.storage,this.publicKeysItem)},u.prototype.loadPrivate=async function(){return l(this.storage,this.privateKeysItem)},u.prototype.storePublic=async function(e){await c(this.storage,this.publicKeysItem,e)},u.prototype.storePrivate=async function(e){await c(this.storage,this.privateKeysItem,e)},r.default=u}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../config":57,"../key":96,"../util":136,"node-localstorage":"node-localstorage","web-stream-tools":53}],103:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.loadScript=(e=>"undefined"!=typeof importScripts?importScripts(e):new Promise((t,r)=>{const n=document.createElement("script");n.src=e,n.onload=(()=>t()),n.onerror=(e=>r(new Error(e.message))),document.head.appendChild(n)})),r.dl=async function(e,t){return(await fetch(e,t)).arrayBuffer()}},{}],104:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.Message=p,r.encryptSessionKey=y,r.createSignaturePackets=m,r.createVerificationObjects=g,r.readArmored=async function(e){const t=l.default.isStream(e);"node"===t&&(e=n.default.nodeToWeb(e));return w((await i.default.decode(e)).data,t)},r.read=w,r.fromText=function(e,t,r=new Date,i="utf8"){const a=l.default.isStream(e);"node"===a&&(e=n.default.nodeToWeb(e));const s=new c.default.Literal(r);s.setText(e,i),void 0!==t&&s.setFilename(t);const o=new c.default.List;o.push(s);const u=new p(o);return u.fromStream=a,u},r.fromBinary=function(e,t,r=new Date,i="binary"){const a=l.default.isStream(e);if(!l.default.isUint8Array(e)&&!a)throw new Error("Data must be in the form of a Uint8Array or Stream");"node"===a&&(e=n.default.nodeToWeb(e));const s=new c.default.Literal(r);s.setBytes(e,i),void 0!==t&&s.setFilename(t);const o=new c.default.List;o.push(s);const u=new p(o);return u.fromStream=a,u};var n=h(e("web-stream-tools")),i=h(e("./encoding/armor")),a=h(e("./type/keyid")),s=h(e("./config")),o=h(e("./crypto")),u=h(e("./enums")),l=h(e("./util")),c=h(e("./packet")),f=e("./signature"),d=e("./key");function h(e){return e&&e.__esModule?e:{default:e}}function p(e){if(!(this instanceof p))return new p(e);this.packets=e||new c.default.List}async function y(e,t,r,n,i,o=!1,u=new Date,l=[]){const f=new c.default.List;if(n){const r=await Promise.all(n.map(async function(r){const n=await r.getEncryptionKey(void 0,u,l),i=new c.default.PublicKeyEncryptedSessionKey;return i.publicKeyId=o?a.default.wildcard():n.getKeyId(),i.publicKeyAlgorithm=n.keyPacket.algorithm,i.sessionKey=e,i.sessionKeyAlgorithm=t,await i.encrypt(n.keyPacket),delete i.sessionKey,i}));f.concat(r)}if(i){const n=async function(e,t){try{return await e.decrypt(t),1}catch(r){return 0}},a=(e,t)=>e+t,o=async function e(t,r,o,u){const l=new c.default.SymEncryptedSessionKey;if(l.sessionKey=t,l.sessionKeyAlgorithm=r,o&&(l.aeadAlgorithm=o),await l.encrypt(u),s.default.password_collision_check){if(1!==(await Promise.all(i.map(e=>n(l,e)))).reduce(a))return e(t,r,u)}return delete l.sessionKey,l},u=await Promise.all(i.map(n=>o(e,t,r,n)));f.concat(u)}return new p(f)}async function m(e,t,r=null,n=new Date,i=[],a=!1,s=!1){const o=new c.default.List,l=null===e.text?u.default.signature.binary:u.default.signature.text;if(await Promise.all(t.map(async(t,r)=>{const o=i[r];if(t.isPublic())throw new Error("Need private key for signing");const u=await t.getSigningKey(void 0,n,o);return(0,d.createSignaturePacket)(e,t,u.keyPacket,{signatureType:l},n,o,a,s)})).then(e=>{e.forEach(e=>o.push(e))}),r){const e=r.packets.filterByTag(u.default.packet.signature);o.concat(e)}return o}async function g(e,t,r,n=new Date,i=!1,a=!1){return Promise.all(e.filter(function(e){return["text","binary"].includes(u.default.read(u.default.signature,e.signatureType))}).map(async function(e){return async function(e,t,r,n=new Date,i=!1,a=!1){let s=null,o=null;await Promise.all(r.map(async function(t){try{o=await t.getSigningKey(e.issuerKeyId,null),s=t}catch(r){}}));const u=e.correspondingSig||e,l={keyid:e.issuerKeyId,verified:(async()=>{if(!o)return null;const r=await e.verify(o.keyPacket,e.signatureType,t[0],i,a),l=await u;if(l.isExpired(n)||!(l.created>=o.getCreationTime()&&l.created<await(o===s?o.getExpirationTime():o.getExpirationTime(s,n))))throw new Error("Signature is expired");return r})(),signature:(async()=>{const e=await u,t=new c.default.List;return t.push(e),new f.Signature(t)})()};return l.signature.catch(()=>{}),l.verified.catch(()=>{}),l}(e,t,r,n,i,a)}))}async function w(e,t=l.default.isStream(e)){"node"===l.default.isStream(e)&&(e=n.default.nodeToWeb(e));const r=new c.default.List;await r.read(e,t);const i=new p(r);return i.fromStream=t,i}p.prototype.getEncryptionKeyIds=function(){const e=[];return this.packets.filterByTag(u.default.packet.publicKeyEncryptedSessionKey).forEach(function(t){e.push(t.publicKeyId)}),e},p.prototype.getSigningKeyIds=function(){const e=[],t=this.unwrapCompressed();if(t.packets.filterByTag(u.default.packet.onePassSignature).forEach(function(t){e.push(t.issuerKeyId)}),!e.length){t.packets.filterByTag(u.default.packet.signature).forEach(function(t){e.push(t.issuerKeyId)})}return e},p.prototype.decrypt=async function(e,t,r,i){const a=r||await this.decryptSessionKeys(e,t),s=this.packets.filterByTag(u.default.packet.symmetricallyEncrypted,u.default.packet.symEncryptedIntegrityProtected,u.default.packet.symEncryptedAEADProtected);if(0===s.length)return this;const o=s[0];let f=null;const d=Promise.all(a.map(async e=>{if(!e||!l.default.isUint8Array(e.data)||!l.default.isString(e.algorithm))throw new Error("Invalid session key for decryption.");try{await o.decrypt(e.algorithm,e.data,i)}catch(t){l.default.print_debug_error(t),f=t}}));if(n.default.cancel(o.encrypted),o.encrypted=null,await d,!o.packets||!o.packets.length)throw f||new Error("Decryption failed.");const h=new p(o.packets);return o.packets=new c.default.List,h},p.prototype.decryptSessionKeys=async function(e,t){let r,i=[];if(t){const e=this.packets.filterByTag(u.default.packet.symEncryptedSessionKey);if(!e)throw new Error("No symmetrically encrypted session key packet found.");await Promise.all(t.map(async function(t,r){let n;r?(n=new c.default.List,await n.read(e.write())):n=e,await Promise.all(n.map(async function(e){try{await e.decrypt(t),i.push(e)}catch(r){l.default.print_debug_error(r)}}))}))}else{if(!e)throw new Error("No key or password specified.");{const t=this.packets.filterByTag(u.default.packet.publicKeyEncryptedSessionKey);if(!t)throw new Error("No public key encrypted session key packet found.");await Promise.all(t.map(async function(t){await Promise.all(e.map(async function(e){let n=[u.default.symmetric.aes256,u.default.symmetric.aes128,u.default.symmetric.tripledes,u.default.symmetric.cast5];try{const t=await e.getPrimaryUser();t.selfCertification.preferredSymmetricAlgorithms&&(n=n.concat(t.selfCertification.preferredSymmetricAlgorithms))}catch(s){}const a=(await e.getDecryptionKeys(t.publicKeyId,null)).map(e=>e.keyPacket);await Promise.all(a.map(async function(e){if(e){if(!e.isDecrypted())throw new Error("Private key is not decrypted.");try{if(await t.decrypt(e),!n.includes(u.default.write(u.default.symmetric,t.sessionKeyAlgorithm)))throw new Error("A non-preferred symmetric algorithm was used.");i.push(t)}catch(a){l.default.print_debug_error(a),r=a}}}))})),n.default.cancel(t.encrypted),t.encrypted=null}))}}if(i.length){if(i.length>1){const e={};i=i.filter(function(t){const r=t.sessionKeyAlgorithm+l.default.Uint8Array_to_str(t.sessionKey);return!e.hasOwnProperty(r)&&(e[r]=!0,!0)})}return i.map(e=>({data:e.sessionKey,algorithm:e.sessionKeyAlgorithm}))}throw r||new Error("Session key decryption failed.")},p.prototype.getLiteralData=function(){const e=this.unwrapCompressed().packets.findPacket(u.default.packet.literal);return e&&e.getBytes()||null},p.prototype.getFilename=function(){const e=this.unwrapCompressed().packets.findPacket(u.default.packet.literal);return e&&e.getFilename()||null},p.prototype.getText=function(){const e=this.unwrapCompressed().packets.findPacket(u.default.packet.literal);return e?e.getText():null},p.prototype.encrypt=async function(e,t,r,n=!1,i=new Date,a=[],f){let h,p,m;if(r){if(!l.default.isUint8Array(r.data)||!l.default.isString(r.algorithm))throw new Error("Invalid session key for encryption.");h=r.algorithm,p=r.aeadAlgorithm,r=r.data}else if(e&&e.length)h=u.default.read(u.default.symmetric,await(0,d.getPreferredAlgo)("symmetric",e,i,a)),s.default.aead_protect&&await(0,d.isAeadSupported)(e,i,a)&&(p=u.default.read(u.default.aead,await(0,d.getPreferredAlgo)("aead",e,i,a)));else{if(!t||!t.length)throw new Error("No keys, passwords, or session key provided.");h=u.default.read(u.default.symmetric,s.default.encryption_cipher),p=u.default.read(u.default.aead,s.default.aead_mode)}r||(r=await o.default.generateSessionKey(h));const g=await y(r,h,p,e,t,n,i,a);return s.default.aead_protect&&p?(m=new c.default.SymEncryptedAEADProtected).aeadAlgorithm=p:m=s.default.integrity_protect?new c.default.SymEncryptedIntegrityProtected:new c.default.SymmetricallyEncrypted,m.packets=this.packets,await m.encrypt(h,r,f),g.packets.push(m),m.packets=new c.default.List,{message:g,sessionKey:{data:r,algorithm:h,aeadAlgorithm:p}}},p.prototype.sign=async function(e=[],t=null,r=new Date,n=[],i=!1){const a=new c.default.List,s=this.packets.findPacket(u.default.packet.literal);if(!s)throw new Error("No literal data packet to sign.");let o,l;const f=null===s.text?u.default.signature.binary:u.default.signature.text;if(t)for(o=(l=t.packets.filterByTag(u.default.packet.signature)).length-1;o>=0;o--){const t=l[o],r=new c.default.OnePassSignature;r.signatureType=t.signatureType,r.hashAlgorithm=t.hashAlgorithm,r.publicKeyAlgorithm=t.publicKeyAlgorithm,r.issuerKeyId=t.issuerKeyId,e.length||0!==o||(r.flags=1),a.push(r)}return await Promise.all(Array.from(e).reverse().map(async function(t,i){if(t.isPublic())throw new Error("Need private key for signing");const a=await t.getSigningKey(void 0,r,n),s=new c.default.OnePassSignature;return s.signatureType=f,s.hashAlgorithm=await(0,d.getPreferredHashAlgo)(t,a.keyPacket,r,n),s.publicKeyAlgorithm=a.keyPacket.algorithm,s.issuerKeyId=a.getKeyId(),i===e.length-1&&(s.flags=1),s})).then(e=>{e.forEach(e=>a.push(e))}),a.push(s),a.concat(await m(s,e,t,r,n,!1,i)),new p(a)},p.prototype.compress=function(e){if(e===u.default.compression.uncompressed)return this;const t=new c.default.Compressed;t.packets=this.packets,t.algorithm=u.default.read(u.default.compression,e);const r=new c.default.List;return r.push(t),new p(r)},p.prototype.signDetached=async function(e=[],t=null,r=new Date,n=[],i=!1){const a=this.packets.findPacket(u.default.packet.literal);if(!a)throw new Error("No literal data packet to sign.");return new f.Signature(await m(a,e,t,r,n,!0,i))},p.prototype.verify=async function(e,t=new Date,r){const i=this.unwrapCompressed(),a=i.packets.filterByTag(u.default.packet.literal);if(1!==a.length)throw new Error("Can only verify message with one literal data packet.");r||i.packets.concat(await n.default.readToEnd(i.packets.stream,e=>e));const s=i.packets.filterByTag(u.default.packet.onePassSignature).reverse(),o=i.packets.filterByTag(u.default.packet.signature);return r&&s.length&&!o.length&&i.packets.stream?(await Promise.all(s.map(async e=>{e.correspondingSig=new Promise((t,r)=>{e.correspondingSigResolve=t,e.correspondingSigReject=r}),e.signatureData=n.default.fromAsync(async()=>(await e.correspondingSig).signatureData),e.hashed=n.default.readToEnd(await e.hash(e.signatureType,a[0],void 0,!1,r)),e.hashed.catch(()=>{})})),i.packets.stream=n.default.transformPair(i.packets.stream,async(e,t)=>{const r=n.default.getReader(e),i=n.default.getWriter(t);try{for(let e=0;e<s.length;e++){const t=(await r.read()).value;s[e].correspondingSigResolve(t)}await r.readToEnd(),await i.ready,await i.close()}catch(a){s.forEach(e=>{e.correspondingSigReject(a)}),await i.abort(a)}}),g(s,a,e,t,!1,r)):g(o,a,e,t,!1,r)},p.prototype.verifyDetached=function(e,t,r=new Date){const n=this.unwrapCompressed().packets.filterByTag(u.default.packet.literal);if(1!==n.length)throw new Error("Can only verify message with one literal data packet.");return g(e.packets,n,t,r,!0)},p.prototype.unwrapCompressed=function(){const e=this.packets.filterByTag(u.default.packet.compressed);return e.length?new p(e[0].packets):this},p.prototype.appendSignature=async function(e){await this.packets.read(l.default.isUint8Array(e)?e:(await i.default.decode(e)).data)},p.prototype.armor=function(){return i.default.encode(u.default.armor.message,this.packets.write())}},{"./config":57,"./crypto":72,"./encoding/armor":89,"./enums":91,"./key":96,"./packet":109,"./signature":129,"./type/keyid":132,"./util":136,"web-stream-tools":53}],105:[function(e,t,r){(function(t){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.initWorker=async function({path:e="openpgp.worker.min.js",n:r=1,workers:n=[]}={}){if(n.length||void 0!==t&&t.Worker&&t.MessageChannel){const t=new c.default({path:e,n:r,workers:n,config:o.default}),i=await t.loaded();if(i)return d=t,!0}return!1},r.getWorker=function(){return d},r.destroyWorker=async function(){const e=d;d=void 0,e&&(await e.clearKeyCache(),e.terminate())},r.generateKey=function({userIds:e=[],passphrase:t="",numBits:r=2048,rsaBits:n=r,keyExpirationTime:i=0,curve:a="",date:o=new Date,subkeys:u=[{}]}){const c={userIds:e=y(e),passphrase:t,rsaBits:n,keyExpirationTime:i,curve:a,date:o,subkeys:u};if(l.default.getWebCryptoAll()&&n<2048)throw new Error("rsaBits should be 2048 or 4096, found: "+n);if(!l.default.getWebCryptoAll()&&d)return d.delegate("generateKey",c);return(0,s.generate)(c).then(async e=>{const t=await e.getRevocationCertificate(o);return e.revocationSignatures=[],g({key:e,privateKeyArmored:e.armor(),publicKeyArmored:e.toPublic().armor(),revocationCertificate:t})}).catch(_.bind(null,"Error generating keypair"))},r.reformatKey=function({privateKey:e,userIds:t=[],passphrase:r="",keyExpirationTime:n=0,date:i}){t=y(t);const a={privateKey:e,userIds:t,passphrase:r,keyExpirationTime:n,date:i};if(d)return d.delegate("reformatKey",a);return(0,s.reformat)(a).then(async e=>{const t=await e.getRevocationCertificate(i);return e.revocationSignatures=[],g({key:e,privateKeyArmored:e.armor(),publicKeyArmored:e.toPublic().armor(),revocationCertificate:t})}).catch(_.bind(null,"Error reformatting keypair"))},r.revokeKey=function({key:e,revocationCertificate:t,reasonForRevocation:r}={}){const n={key:e,revocationCertificate:t,reasonForRevocation:r};if(!l.default.getWebCryptoAll()&&d)return d.delegate("revokeKey",n);return Promise.resolve().then(()=>t?e.applyRevocationCertificate(t):e.revoke(r)).then(async e=>{if(await g(e),e.isPrivate()){const t=e.toPublic();return{privateKey:e,privateKeyArmored:e.armor(),publicKey:t,publicKeyArmored:t.armor()}}return{publicKey:e,publicKeyArmored:e.armor()}}).catch(_.bind(null,"Error revoking key"))},r.decryptKey=function({privateKey:e,passphrase:t}){if(d)return d.delegate("decryptKey",{privateKey:e,passphrase:t});return Promise.resolve().then(async function(){return await e.decrypt(t),{key:e}}).catch(_.bind(null,"Error decrypting private key"))},r.encryptKey=function({privateKey:e,passphrase:t}){if(d)return d.delegate("encryptKey",{privateKey:e,passphrase:t});return Promise.resolve().then(async function(){return await e.encrypt(t),{key:e}}).catch(_.bind(null,"Error decrypting private key"))},r.encrypt=function({message:e,publicKeys:t,privateKeys:r,passwords:n,sessionKey:i,compression:a=o.default.compression,armor:s=!0,streaming:u=e&&e.fromStream,detached:l=!1,signature:c=null,returnSessionKey:f=!1,wildcard:p=!1,date:m=new Date,fromUserIds:w=[],toUserIds:b=[]}){if(h(e),t=y(t),r=y(r),n=y(n),w=y(w),b=y(b),!v()&&d)return d.delegate("encrypt",{message:e,publicKeys:t,privateKeys:r,passwords:n,sessionKey:i,compression:a,armor:s,streaming:u,detached:l,signature:c,returnSessionKey:f,wildcard:p,date:m,fromUserIds:w,toUserIds:b});const k={};return Promise.resolve().then(async function(){if(r||(r=[]),r.length||c)if(l){const t=await e.signDetached(r,c,m,w,e.fromStream);k.signature=s?t.armor():t}else e=await e.sign(r,c,m,w,e.fromStream);return(e=e.compress(a)).encrypt(t,n,i,p,m,b,u)}).then(async e=>(s?k.data=e.message.armor():k.message=e.message,f&&(k.sessionKey=e.sessionKey),g(k,u,s?["signature","data"]:[]))).catch(_.bind(null,"Error encrypting message"))},r.decrypt=function({message:e,privateKeys:t,passwords:r,sessionKeys:n,publicKeys:i,format:a="utf8",streaming:s=e&&e.fromStream,signature:o=null,date:u=new Date}){if(h(e),i=y(i),t=y(t),r=y(r),n=y(n),!v()&&d)return d.delegate("decrypt",{message:e,privateKeys:t,passwords:r,sessionKeys:n,publicKeys:i,format:a,streaming:s,signature:o,date:u});return e.decrypt(t,r,n,s).then(async function(t){i||(i=[]);const r={};return r.signatures=o?await t.verifyDetached(o,i,u,s):await t.verify(i,u,s),r.data="binary"===a?t.getLiteralData():t.getText(),r.filename=t.getFilename(),s&&w(r,e),r.data=await m(r.data,s),s||await b(r.signatures),r}).catch(_.bind(null,"Error decrypting message"))},r.sign=function({message:e,privateKeys:t,armor:r=!0,streaming:i=e&&e.fromStream,detached:a=!1,date:s=new Date,fromUserIds:o=[]}){if(p(e),t=y(t),o=y(o),d)return d.delegate("sign",{message:e,privateKeys:t,armor:r,streaming:i,detached:a,date:s,fromUserIds:o});const u={};return Promise.resolve().then(async function(){if(a){const i=await e.signDetached(t,void 0,s,o,e.fromStream);u.signature=r?i.armor():i,e.packets&&(u.signature=n.default.transformPair(e.packets.write(),async(e,t)=>{await Promise.all([n.default.pipe(u.signature,t),n.default.readToEnd(e).catch(()=>{})])}))}else e=await e.sign(t,void 0,s,o,e.fromStream),r?u.data=e.armor():u.message=e;return g(u,i,r?["signature","data"]:[])}).catch(_.bind(null,"Error signing cleartext message"))},r.verify=function({message:e,publicKeys:t,streaming:r=e&&e.fromStream,signature:n=null,date:i=new Date}){if(p(e),t=y(t),d)return d.delegate("verify",{message:e,publicKeys:t,streaming:r,signature:n,date:i});return Promise.resolve().then(async function(){const s={};return s.signatures=n?await e.verifyDetached(n,t,i,r):await e.verify(t,i,r),s.data=e instanceof a.CleartextMessage?e.getText():e.getLiteralData(),r&&w(s,e),s.data=await m(s.data,r),r||await b(s.signatures),s}).catch(_.bind(null,"Error verifying cleartext signed message"))},r.encryptSessionKey=function({data:e,algorithm:t,aeadAlgorithm:r,publicKeys:n,passwords:a,wildcard:s=!1,date:o=new Date,toUserIds:u=[]}){if(function(e,t){if(!l.default.isUint8Array(e))throw new Error("Parameter ["+(t||"data")+"] must be of type Uint8Array")}(e),function(e,t){if(!l.default.isString(e))throw new Error("Parameter ["+(t||"data")+"] must be of type String")}(t,"algorithm"),n=y(n),a=y(a),u=y(u),d)return d.delegate("encryptSessionKey",{data:e,algorithm:t,aeadAlgorithm:r,publicKeys:n,passwords:a,wildcard:s,date:o,toUserIds:u});return Promise.resolve().then(async function(){return{message:await i.encryptSessionKey(e,t,r,n,a,s,o,u)}}).catch(_.bind(null,"Error encrypting session key"))},r.decryptSessionKeys=function({message:e,privateKeys:t,passwords:r}){if(h(e),t=y(t),r=y(r),d)return d.delegate("decryptSessionKeys",{message:e,privateKeys:t,passwords:r});return Promise.resolve().then(async function(){return e.decryptSessionKeys(t,r)}).catch(_.bind(null,"Error decrypting session keys"))};var n=f(e("web-stream-tools")),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("./message")),a=e("./cleartext"),s=e("./key"),o=f(e("./config/config")),u=f(e("./enums"));e("./polyfills");var l=f(e("./util")),c=f(e("./worker/async_proxy"));function f(e){return e&&e.__esModule?e:{default:e}}let d;function h(e){if(!(e instanceof i.Message))throw new Error("Parameter [message] needs to be of type Message")}function p(e){if(!(e instanceof a.CleartextMessage||e instanceof i.Message))throw new Error("Parameter [message] needs to be of type Message or CleartextMessage")}function y(e){return e&&!l.default.isArray(e)&&(e=[e]),e}async function m(e,t){return!t&&l.default.isStream(e)?n.default.readToEnd(e):(t&&!l.default.isStream(e)&&(e=new ReadableStream({start(t){t.enqueue(e),t.close()}})),"node"===t&&(e=n.default.webToNode(e)),e)}async function g(e,t,r=[]){return Object.prototype.isPrototypeOf(e)&&!Uint8Array.prototype.isPrototypeOf(e)&&await Promise.all(Object.entries(e).map(async([n,i])=>{l.default.isStream(i)||r.includes(n)?e[n]=await m(i,t):await g(e[n],t)})),e}function w(e,t){e.data=n.default.transformPair(t.packets.stream,async(t,r)=>{await n.default.pipe(e.data,r)})}async function b(e){await Promise.all(e.map(async e=>{e.signature=await e.signature;try{e.valid=await e.verified}catch(t){e.valid=!1,e.error=t,l.default.print_debug_error(t)}}))}function _(e,t){l.default.print_debug_error(t);try{t.message=e+": "+t.message}catch(r){}throw t}function v(){return o.default.aead_protect&&(o.default.aead_mode===u.default.aead.eax||o.default.aead_mode===u.default.aead.experimental_gcm)&&l.default.getWebCrypto()}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./cleartext":55,"./config/config":56,"./enums":91,"./key":96,"./message":104,"./polyfills":128,"./util":136,"./worker/async_proxy":138,"web-stream-tools":53}],106:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.Trust=r.Signature=r.SecretSubkey=r.Userid=r.SecretKey=r.OnePassSignature=r.UserAttribute=r.PublicSubkey=r.Marker=r.SymmetricallyEncrypted=r.PublicKey=r.Literal=r.SymEncryptedSessionKey=r.PublicKeyEncryptedSessionKey=r.SymEncryptedAEADProtected=r.SymEncryptedIntegrityProtected=r.Compressed=void 0;var n=e("./compressed.js");Object.defineProperty(r,"Compressed",{enumerable:!0,get:function(){return k(n).default}});var i=e("./sym_encrypted_integrity_protected.js");Object.defineProperty(r,"SymEncryptedIntegrityProtected",{enumerable:!0,get:function(){return k(i).default}});var a=e("./sym_encrypted_aead_protected.js");Object.defineProperty(r,"SymEncryptedAEADProtected",{enumerable:!0,get:function(){return k(a).default}});var s=e("./public_key_encrypted_session_key.js");Object.defineProperty(r,"PublicKeyEncryptedSessionKey",{enumerable:!0,get:function(){return k(s).default}});var o=e("./sym_encrypted_session_key.js");Object.defineProperty(r,"SymEncryptedSessionKey",{enumerable:!0,get:function(){return k(o).default}});var u=e("./literal.js");Object.defineProperty(r,"Literal",{enumerable:!0,get:function(){return k(u).default}});var l=e("./public_key.js");Object.defineProperty(r,"PublicKey",{enumerable:!0,get:function(){return k(l).default}});var c=e("./symmetrically_encrypted.js");Object.defineProperty(r,"SymmetricallyEncrypted",{enumerable:!0,get:function(){return k(c).default}});var f=e("./marker.js");Object.defineProperty(r,"Marker",{enumerable:!0,get:function(){return k(f).default}});var d=e("./public_subkey.js");Object.defineProperty(r,"PublicSubkey",{enumerable:!0,get:function(){return k(d).default}});var h=e("./user_attribute.js");Object.defineProperty(r,"UserAttribute",{enumerable:!0,get:function(){return k(h).default}});var p=e("./one_pass_signature.js");Object.defineProperty(r,"OnePassSignature",{enumerable:!0,get:function(){return k(p).default}});var y=e("./secret_key.js");Object.defineProperty(r,"SecretKey",{enumerable:!0,get:function(){return k(y).default}});var m=e("./userid.js");Object.defineProperty(r,"Userid",{enumerable:!0,get:function(){return k(m).default}});var g=e("./secret_subkey.js");Object.defineProperty(r,"SecretSubkey",{enumerable:!0,get:function(){return k(g).default}});var w=e("./signature.js");Object.defineProperty(r,"Signature",{enumerable:!0,get:function(){return k(w).default}});var b=e("./trust.js");Object.defineProperty(r,"Trust",{enumerable:!0,get:function(){return k(b).default}}),r.newPacketFromTag=A,r.fromStructuredClone=function(e){const t=A(_.default.read(_.default.packet,e.tag));Object.assign(t,e),t.postCloneTypeFix&&t.postCloneTypeFix();return t};var _=k(e("../enums.js")),v=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("./all_packets.js"));function k(e){return e&&e.__esModule?e:{default:e}}function A(e){return new(v[function(e){return e.substr(0,1).toUpperCase()+e.substr(1)}(e)])}},{"../enums.js":91,"./all_packets.js":106,"./compressed.js":108,"./literal.js":110,"./marker.js":111,"./one_pass_signature.js":112,"./public_key.js":115,"./public_key_encrypted_session_key.js":116,"./public_subkey.js":117,"./secret_key.js":118,"./secret_subkey.js":119,"./signature.js":120,"./sym_encrypted_aead_protected.js":121,"./sym_encrypted_integrity_protected.js":122,"./sym_encrypted_session_key.js":123,"./symmetrically_encrypted.js":124,"./trust.js":125,"./user_attribute.js":126,"./userid.js":127}],107:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.clonePackets=function(e){e.publicKeys&&(e.publicKeys=e.publicKeys.map(e=>e.toPacketlist()));e.privateKeys&&(e.privateKeys=e.privateKeys.map(e=>e.toPacketlist()));e.publicKey&&(e.publicKey=e.publicKey.toPacketlist());e.privateKey&&(e.privateKey=e.privateKey.toPacketlist());e.key&&(e.key=e.key.toPacketlist());e.message&&(e.message instanceof a.Message?e.message={packets:e.message.packets,fromStream:e.message.fromStream}:e.message instanceof s.CleartextMessage&&(e.message={text:e.message.text,signature:e.message.signature.packets}));e.signature&&e.signature instanceof o.Signature&&(e.signature=e.signature.packets);e.signatures&&e.signatures.forEach(d);return e},r.parseClonedPackets=function(e){e.publicKeys&&(e.publicKeys=e.publicKeys.map(h));e.privateKeys&&(e.privateKeys=e.privateKeys.map(h));e.publicKey&&(e.publicKey=h(e.publicKey));e.privateKey&&(e.privateKey=h(e.privateKey));e.key&&(e.key=h(e.key));e.message&&e.message.signature?e.message=function(e){const t=u.default.fromStructuredClone(e.signature);return new s.CleartextMessage(e.text,new o.Signature(t))}(e.message):e.message&&(e.message=function(e){const t=u.default.fromStructuredClone(e.packets),r=new a.Message(t);return r.fromStream=e.fromStream,r}(e.message));e.signatures&&(e.signatures=e.signatures.map(p));e.signature&&(e.signature=function(e){if(c.default.isString(e)||c.default.isStream(e))return e;const t=u.default.fromStructuredClone(e);return new o.Signature(t)}(e.signature));return e};var n=f(e("web-stream-tools")),i=e("../key"),a=e("../message"),s=e("../cleartext"),o=e("../signature"),u=f(e("./packetlist")),l=f(e("../type/keyid")),c=f(e("../util"));function f(e){return e&&e.__esModule?e:{default:e}}function d(e){const t=e.verified;if(e.verified=n.default.fromAsync(()=>t),e.signature instanceof Promise){const r=e.signature;e.signature=n.default.fromAsync(async()=>{const e=(await r).packets;try{await t}catch(n){}return e&&e[0]&&(delete e[0].signature,delete e[0].hashed),e})}else e.signature=e.signature.packets;return e.error&&(e.error=e.error.message),e}function h(e){const t=u.default.fromStructuredClone(e);return new i.Key(t)}function p(e){return e.keyid=l.default.fromClone(e.keyid),c.default.isStream(e.signature)?(e.signature=n.default.readToEnd(e.signature,([e])=>new o.Signature(u.default.fromStructuredClone(e))),e.signature.catch(()=>{})):e.signature=new o.Signature(u.default.fromStructuredClone(e.signature)),e.verified=n.default.readToEnd(e.verified,([e])=>e),e.verified.catch(()=>{}),e.error&&(e.error=new Error(e.error)),e}},{"../cleartext":55,"../key":96,"../message":104,"../signature":129,"../type/keyid":132,"../util":136,"./packetlist":114,"web-stream-tools":53}],108:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=l(e("pako")),i=l(e("seek-bzip")),a=l(e("web-stream-tools")),s=l(e("../config")),o=l(e("../enums")),u=l(e("../util"));function l(e){return e&&e.__esModule?e:{default:e}}function c(){this.tag=o.default.packet.compressed,this.packets=null,this.algorithm="zip",this.compressed=null}c.prototype.read=async function(e,t){await a.default.parse(e,async e=>{this.algorithm=o.default.read(o.default.compression,await e.readByte()),this.compressed=e.remainder(),await this.decompress(t)})},c.prototype.write=function(){return null===this.compressed&&this.compress(),u.default.concat([new Uint8Array([o.default.write(o.default.compression,this.algorithm)]),this.compressed])},c.prototype.decompress=async function(e){if(!g[this.algorithm])throw new Error(this.algorithm+" decompression not supported");await this.packets.read(g[this.algorithm](this.compressed),e)},c.prototype.compress=function(){if(!m[this.algorithm])throw new Error(this.algorithm+" compression not supported");this.compressed=m[this.algorithm](this.packets.write())},r.default=c;const f=u.default.getNodeZlib();function d(e){return e}function h(e,t={}){return function(r){return a.default.nodeToWeb(a.default.webToNode(r).pipe(e(t)))}}function p(e,t={}){return function(r){const i=new e(t);return a.default.transform(r,e=>{if(e.length)return i.push(e,n.default.Z_SYNC_FLUSH),i.result},()=>{if(e===n.default.Deflate)return i.push([],n.default.Z_FINISH),i.result})}}function y(e){return function(t){return a.default.fromAsync(async()=>e(await a.default.readToEnd(t)))}}let m,g;f?(m={zip:h(f.createDeflateRaw,{level:s.default.deflate_level}),zlib:h(f.createDeflate,{level:s.default.deflate_level})},g={uncompressed:d,zip:h(f.createInflateRaw),zlib:h(f.createInflate),bzip2:y(i.default.decode)}):(m={zip:p(n.default.Deflate,{raw:!0,level:s.default.deflate_level}),zlib:p(n.default.Deflate,{level:s.default.deflate_level})},g={uncompressed:d,zip:p(n.default.Inflate,{raw:!0}),zlib:p(n.default.Inflate),bzip2:y(i.default.decode)})},{"../config":57,"../enums":91,"../util":136,pako:28,"seek-bzip":47,"web-stream-tools":53}],109:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n,i=o(e("./all_packets")),a=o(e("./clone")),s=e("./packetlist");function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}const u={List:((n=s)&&n.__esModule?n:{default:n}).default,clone:a};Object.assign(u,i),r.default=u},{"./all_packets":106,"./clone":107,"./packetlist":114}],110:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=s(e("web-stream-tools")),i=s(e("../enums")),a=s(e("../util"));function s(e){return e&&e.__esModule?e:{default:e}}function o(e=new Date){this.tag=i.default.packet.literal,this.format="utf8",this.date=a.default.normalizeDate(e),this.text=null,this.data=null,this.filename="msg.txt"}o.prototype.setText=function(e,t="utf8"){this.format=t,this.text=e,this.data=null},o.prototype.getText=function(e=!1){return(null===this.text||a.default.isStream(this.text))&&(this.text=a.default.decode_utf8(a.default.nativeEOL(this.getBytes(e)))),this.text},o.prototype.setBytes=function(e,t){this.format=t,this.data=e,this.text=null},o.prototype.getBytes=function(e=!1){return null===this.data&&(this.data=a.default.canonicalizeEOL(a.default.encode_utf8(this.text))),e?n.default.passiveClone(this.data):this.data},o.prototype.setFilename=function(e){this.filename=e},o.prototype.getFilename=function(){return this.filename},o.prototype.read=async function(e){await n.default.parse(e,async e=>{const t=i.default.read(i.default.literal,await e.readByte()),r=await e.readByte();this.filename=a.default.decode_utf8(await e.readBytes(r)),this.date=a.default.readDate(await e.readBytes(4));const n=e.remainder();this.setBytes(n,t)})},o.prototype.writeHeader=function(){const e=a.default.encode_utf8(this.filename),t=new Uint8Array([e.length]),r=new Uint8Array([i.default.write(i.default.literal,this.format)]),n=a.default.writeDate(this.date);return a.default.concatUint8Array([r,t,e,n])},o.prototype.write=function(){const e=this.writeHeader(),t=this.getBytes();return a.default.concat([e,t])},r.default=o},{"../enums":91,"../util":136,"web-stream-tools":53}],111:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n,i=e("../enums"),a=(n=i)&&n.__esModule?n:{default:n};function s(){this.tag=a.default.packet.marker}s.prototype.read=function(e){return 80===e[0]&&71===e[1]&&80===e[2]},r.default=s},{"../enums":91}],112:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=u(e("web-stream-tools")),i=u(e("./signature")),a=u(e("../type/keyid")),s=u(e("../enums")),o=u(e("../util"));function u(e){return e&&e.__esModule?e:{default:e}}function l(){this.tag=s.default.packet.onePassSignature,this.version=null,this.signatureType=null,this.hashAlgorithm=null,this.publicKeyAlgorithm=null,this.issuerKeyId=null,this.flags=null}l.prototype.read=function(e){let t=0;return this.version=e[t++],this.signatureType=e[t++],this.hashAlgorithm=e[t++],this.publicKeyAlgorithm=e[t++],this.issuerKeyId=new a.default,this.issuerKeyId.read(e.subarray(t,t+8)),t+=8,this.flags=e[t++],this},l.prototype.write=function(){const e=new Uint8Array([3,s.default.write(s.default.signature,this.signatureType),s.default.write(s.default.hash,this.hashAlgorithm),s.default.write(s.default.publicKey,this.publicKeyAlgorithm)]),t=new Uint8Array([this.flags]);return o.default.concatUint8Array([e,this.issuerKeyId.write(),t])},l.prototype.postCloneTypeFix=function(){this.issuerKeyId=a.default.fromClone(this.issuerKeyId)},l.prototype.hash=i.default.prototype.hash,l.prototype.toHash=i.default.prototype.toHash,l.prototype.toSign=i.default.prototype.toSign,l.prototype.calculateTrailer=function(...e){return n.default.fromAsync(async()=>i.default.prototype.calculateTrailer.apply(await this.correspondingSig,e))},l.prototype.verify=async function(){const e=await this.correspondingSig;if(!e||e.tag!==s.default.packet.signature)throw new Error("Corresponding signature packet missing");if(e.signatureType!==this.signatureType||e.hashAlgorithm!==this.hashAlgorithm||e.publicKeyAlgorithm!==this.publicKeyAlgorithm||!e.issuerKeyId.equals(this.issuerKeyId))throw new Error("Corresponding signature packet does not match one-pass signature packet");return e.hashed=this.hashed,e.verify.apply(e,arguments)},r.default=l},{"../enums":91,"../type/keyid":132,"../util":136,"./signature":120,"web-stream-tools":53}],113:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var r=[],n=!0,i=!1,a=void 0;try{for(var s,o=e[Symbol.iterator]();!(n=(s=o.next()).done)&&(r.push(s.value),!t||r.length!==t);n=!0);}catch(u){i=!0,a=u}finally{try{!n&&o.return&&o.return()}finally{if(i)throw a}}return r}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=o(e("web-stream-tools")),a=o(e("../enums")),s=o(e("../util"));function o(e){return e&&e.__esModule?e:{default:e}}r.default={readSimpleLength:function(e){let t,r=0;const i=e[0];i<192?(r=n(e,1)[0],t=1):i<255?(r=(e[0]-192<<8)+e[1]+192,t=2):255===i&&(r=s.default.readNumber(e.subarray(1,5)),t=5);return{len:r,offset:t}},writeSimpleLength:function(e){return e<192?new Uint8Array([e]):e>191&&e<8384?new Uint8Array([192+(e-192>>8),e-192&255]):s.default.concatUint8Array([new Uint8Array([255]),s.default.writeNumber(e,4)])},writePartialLength:function(e){if(e<0||e>30)throw new Error("Partial Length power must be between 1 and 30");return new Uint8Array([224+e])},writeTag:function(e){return new Uint8Array([192|e])},writeHeader:function(e,t){return s.default.concatUint8Array([this.writeTag(e),this.writeSimpleLength(t)])},supportsStreaming:function(e){return[a.default.packet.literal,a.default.packet.compressed,a.default.packet.symmetricallyEncrypted,a.default.packet.symEncryptedIntegrityProtected,a.default.packet.symEncryptedAEADProtected].includes(e)},read:async function(e,t,r){const n=i.default.getReader(e);let a,o;try{const e=await n.peekBytes(2);if(!e||e.length<2||0==(128&e[0]))throw new Error("Error during parsing. This message / key probably does not conform to a valid OpenPGP format.");const c=await n.readByte();let f,d,h=-1,p=-1;p=0,0!=(64&c)&&(p=1),p?h=63&c:(h=(63&c)>>2,d=3&c);const y=this.supportsStreaming(h);let m,g=null;if(t&&y){const e=new TransformStream;a=i.default.getWriter(e.writable),o=r({tag:h,packet:g=e.readable})}else g=[];do{if(p){const e=await n.readByte();if(m=!1,e<192)f=e;else if(e>=192&&e<224)f=(e-192<<8)+await n.readByte()+192;else if(e>223&&e<255){if(f=1<<(31&e),m=!0,!y)throw new TypeError("This packet type does not support partial lengths.")}else f=await n.readByte()<<24|await n.readByte()<<16|await n.readByte()<<8|await n.readByte()}else switch(d){case 0:f=await n.readByte();break;case 1:f=await n.readByte()<<8|await n.readByte();break;case 2:f=await n.readByte()<<24|await n.readByte()<<16|await n.readByte()<<8|await n.readByte();break;default:f=1/0}if(f>0){let e=0;for(;;){a&&await a.ready;var u=await n.read();const t=u.done,r=u.value;if(t){if(f===1/0)break;throw new Error("Unexpected end of packet")}const i=f===1/0?r:r.subarray(0,f-e);if(a?await a.write(i):g.push(i),(e+=r.length)>=f){n.unshift(r.subarray(f-e+r.length));break}}}}while(m);const w=await n.peekBytes(y?1/0:2);return a?(await a.ready,await a.close()):(g=s.default.concatUint8Array(g),await r({tag:h,packet:g})),!w||!w.length}catch(l){if(a)return await a.abort(l),!0;throw l}finally{a&&await o,n.releaseLock()}}}},{"../enums":91,"../util":136,"web-stream-tools":53}],114:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=l(e("web-stream-tools")),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("./all_packets")),a=l(e("./packet")),s=l(e("../config")),o=l(e("../enums")),u=l(e("../util"));function l(e){return e&&e.__esModule?e:{default:e}}function c(){this.length=0}c.prototype=[],c.prototype.read=async function(e,t){this.stream=n.default.transformPair(e,async(e,r)=>{const l=n.default.getWriter(r);try{for(;;){if(await l.ready,await a.default.read(e,t,async e=>{try{const n=o.default.read(o.default.packet,e.tag),f=i.newPacketFromTag(n);f.packets=new c,f.fromStream=u.default.isStream(e.packet),await f.read(e.packet,t),await l.write(f)}catch(r){s.default.tolerant&&!a.default.supportsStreaming(e.tag)||await l.abort(r),u.default.print_debug_error(r)}}))return await l.ready,void(await l.close())}}catch(f){await l.abort(f)}});const r=n.default.getReader(this.stream);for(;;){var l=await r.read();const e=l.done,t=l.value;if(e?this.stream=null:this.push(t),e||a.default.supportsStreaming(t.tag))break}r.releaseLock()},c.prototype.write=function(){const e=[];for(let t=0;t<this.length;t++){const r=this[t].write();if(u.default.isStream(r)&&a.default.supportsStreaming(this[t].tag)){let i=[],s=0;const o=512;e.push(a.default.writeTag(this[t].tag)),e.push(n.default.transform(r,e=>{if(i.push(e),(s+=e.length)>=o){const e=Math.min(Math.log(s)/Math.LN2|0,30),t=2**e,r=u.default.concat([a.default.writePartialLength(e)].concat(i));return i=[r.subarray(1+t)],s=i[0].length,r.subarray(0,1+t)}},()=>u.default.concat([a.default.writeSimpleLength(s)].concat(i))))}else{if(u.default.isStream(r)){let i=0;e.push(n.default.transform(n.default.clone(r),e=>{i+=e.length},()=>a.default.writeHeader(this[t].tag,i)))}else e.push(a.default.writeHeader(this[t].tag,r.length));e.push(r)}}return u.default.concat(e)},c.prototype.push=function(e){e&&(e.packets=e.packets||new c,this[this.length]=e,this.length++)},c.prototype.filterByTag=function(...e){const t=new c,r=e=>t=>e===t;for(let n=0;n<this.length;n++)e.some(r(this[n].tag))&&t.push(this[n]);return t},c.prototype.findPacket=function(e){return this.find(t=>t.tag===e)},c.prototype.indexOfTag=function(...e){const t=[],r=this,n=e=>t=>e===t;for(let i=0;i<this.length;i++)e.some(n(r[i].tag))&&t.push(i);return t},c.prototype.concat=function(e){if(e)for(let t=0;t<e.length;t++)this.push(e[t]);return this},c.fromStructuredClone=function(e){const t=new c;for(let r=0;r<e.length;r++){const n=i.fromStructuredClone(e[r]);t.push(n),n.embeddedSignature&&(n.embeddedSignature=i.fromStructuredClone(n.embeddedSignature)),0!==n.packets.length?n.packets=this.fromStructuredClone(n.packets):n.packets=new c}return e.stream&&(t.stream=n.default.transform(e.stream,e=>i.fromStructuredClone(e))),t},r.default=c},{"../config":57,"../enums":91,"../util":136,"./all_packets":106,"./packet":113,"web-stream-tools":53}],115:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e("asmcrypto.js/dist_es5/hash/sha1/sha1"),i=e("asmcrypto.js/dist_es5/hash/sha256/sha256"),a=f(e("../type/keyid")),s=f(e("../type/mpi")),o=f(e("../config")),u=f(e("../crypto")),l=f(e("../enums")),c=f(e("../util"));function f(e){return e&&e.__esModule?e:{default:e}}function d(e=new Date){this.tag=l.default.packet.publicKey,this.version=o.default.v5_keys?5:4,this.created=c.default.normalizeDate(e),this.algorithm=null,this.params=[],this.expirationTimeV3=0,this.fingerprint=null,this.keyid=null}d.prototype.read=function(e){let t=0;if(this.version=e[t++],4===this.version||5===this.version){this.created=c.default.readDate(e.subarray(t,t+4)),t+=4,this.algorithm=l.default.read(l.default.publicKey,e[t++]);const r=l.default.write(l.default.publicKey,this.algorithm);5===this.version&&(t+=4);const n=u.default.getPubKeyParamTypes(r);this.params=u.default.constructParams(n);for(let i=0;i<n.length&&t<e.length;i++)if((t+=this.params[i].read(e.subarray(t,e.length)))>e.length)throw new Error("Error reading MPI @:"+t);return t}throw new Error("Version "+this.version+" of the key packet is unsupported.")},d.prototype.readPublicKey=d.prototype.read,d.prototype.write=function(){const e=[];e.push(new Uint8Array([this.version])),e.push(c.default.writeDate(this.created));const t=l.default.write(l.default.publicKey,this.algorithm);e.push(new Uint8Array([t]));const r=u.default.getPubKeyParamTypes(t).length,n=c.default.concatUint8Array(this.params.slice(0,r).map(e=>e.write()));return 5===this.version&&e.push(c.default.writeNumber(n.length,4)),e.push(n),c.default.concatUint8Array(e)},d.prototype.writePublicKey=d.prototype.write,d.prototype.writeForHash=function(e){const t=this.writePublicKey();return 5===e?c.default.concatUint8Array([new Uint8Array([154]),c.default.writeNumber(t.length,4),t]):c.default.concatUint8Array([new Uint8Array([153]),c.default.writeNumber(t.length,2),t])},d.prototype.isDecrypted=function(){return null},d.prototype.getCreationTime=function(){return this.created},d.prototype.getKeyId=function(){return this.keyid?this.keyid:(this.keyid=new a.default,5===this.version?this.keyid.read(c.default.hex_to_Uint8Array(this.getFingerprint()).subarray(0,8)):4===this.version&&this.keyid.read(c.default.hex_to_Uint8Array(this.getFingerprint()).subarray(12,20)),this.keyid)},d.prototype.getFingerprintBytes=function(){if(this.fingerprint)return this.fingerprint;const e=this.writeForHash(this.version);return 5===this.version?this.fingerprint=i.Sha256.bytes(e):4===this.version&&(this.fingerprint=n.Sha1.bytes(e)),this.fingerprint},d.prototype.getFingerprint=function(){return c.default.Uint8Array_to_hex(this.getFingerprintBytes())},d.prototype.hasSameFingerprintAs=function(e){return this.version===e.version&&c.default.equalsUint8Array(this.writePublicKey(),e.writePublicKey())},d.prototype.getAlgorithmInfo=function(){const e={};return e.algorithm=this.algorithm,this.params[0]instanceof s.default?(e.rsaBits=8*this.params[0].byteLength(),e.bits=e.rsaBits):e.curve=this.params[0].getName(),e},d.prototype.postCloneTypeFix=function(){const e=l.default.write(l.default.publicKey,this.algorithm),t=u.default.getPubKeyParamTypes(e);for(let r=0;r<t.length;r++){const e=this.params[r];this.params[r]=t[r].fromClone(e)}this.keyid&&(this.keyid=a.default.fromClone(this.keyid))},r.default=d},{"../config":57,"../crypto":72,"../enums":91,"../type/keyid":132,"../type/mpi":133,"../util":136,"asmcrypto.js/dist_es5/hash/sha1/sha1":11,"asmcrypto.js/dist_es5/hash/sha256/sha256":13}],116:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=o(e("../type/keyid")),i=o(e("../crypto")),a=o(e("../enums")),s=o(e("../util"));function o(e){return e&&e.__esModule?e:{default:e}}function u(){this.tag=a.default.packet.publicKeyEncryptedSessionKey,this.version=3,this.publicKeyId=new n.default,this.publicKeyAlgorithm=null,this.sessionKey=null,this.sessionKeyAlgorithm=null,this.encrypted=[]}u.prototype.read=function(e){this.version=e[0],this.publicKeyId.read(e.subarray(1,e.length)),this.publicKeyAlgorithm=a.default.read(a.default.publicKey,e[9]);let t=10;const r=a.default.write(a.default.publicKey,this.publicKeyAlgorithm),n=i.default.getEncSessionKeyParamTypes(r);this.encrypted=i.default.constructParams(n);for(let i=0;i<n.length;i++)t+=this.encrypted[i].read(e.subarray(t,e.length))},u.prototype.write=function(){const e=[new Uint8Array([this.version]),this.publicKeyId.write(),new Uint8Array([a.default.write(a.default.publicKey,this.publicKeyAlgorithm)])];for(let t=0;t<this.encrypted.length;t++)e.push(this.encrypted[t].write());return s.default.concatUint8Array(e)},u.prototype.encrypt=async function(e){let t=String.fromCharCode(a.default.write(a.default.symmetric,this.sessionKeyAlgorithm));t+=s.default.Uint8Array_to_str(this.sessionKey),t+=s.default.Uint8Array_to_str(s.default.write_checksum(this.sessionKey));const r=a.default.write(a.default.publicKey,this.publicKeyAlgorithm);return this.encrypted=await i.default.publicKeyEncrypt(r,e.params,t,e.getFingerprintBytes()),!0},u.prototype.decrypt=async function(e){const t=a.default.write(a.default.publicKey,this.publicKeyAlgorithm);if(t!==a.default.write(a.default.publicKey,e.algorithm))throw new Error("Decryption error");const r=await i.default.publicKeyDecrypt(t,e.params,this.encrypted,e.getFingerprintBytes()),n=s.default.str_to_Uint8Array(r.substr(r.length-2));if(e=s.default.str_to_Uint8Array(r.substring(1,r.length-2)),!s.default.equalsUint8Array(n,s.default.write_checksum(e)))throw new Error("Decryption error");return this.sessionKey=e,this.sessionKeyAlgorithm=a.default.read(a.default.symmetric,r.charCodeAt(0)),!0},u.prototype.postCloneTypeFix=function(){this.publicKeyId=n.default.fromClone(this.publicKeyId);const e=a.default.write(a.default.publicKey,this.publicKeyAlgorithm),t=i.default.getEncSessionKeyParamTypes(e);for(let r=0;r<this.encrypted.length;r++)this.encrypted[r]=t[r].fromClone(this.encrypted[r])},r.default=u},{"../crypto":72,"../enums":91,"../type/keyid":132,"../util":136}],117:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=a(e("./public_key")),i=a(e("../enums"));function a(e){return e&&e.__esModule?e:{default:e}}function s(){n.default.call(this),this.tag=i.default.packet.publicSubkey}s.prototype=new n.default,s.prototype.constructor=s,r.default=s},{"../enums":91,"./public_key":115}],118:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=l(e("./public_key")),i=l(e("../type/keyid.js")),a=l(e("../type/s2k")),s=l(e("../crypto")),o=l(e("../enums")),u=l(e("../util"));function l(e){return e&&e.__esModule?e:{default:e}}function c(e=new Date){n.default.call(this,e),this.tag=o.default.packet.secretKey,this.keyMaterial=null,this.isEncrypted=null,this.s2k_usage=0,this.s2k=null,this.symmetric=null,this.aead=null}function f(e,t){const r=o.default.write(o.default.publicKey,t),n=s.default.getPrivKeyParamTypes(r),i=s.default.constructParams(n);let a=0;for(let s=0;s<n.length&&a<e.length;s++)if((a+=i[s].read(e.subarray(a,e.length)))>e.length)throw new Error("Error reading param @:"+a);return i}function d(e,t){const r=[],n=o.default.write(o.default.publicKey,t);for(let i=s.default.getPubKeyParamTypes(n).length;i<e.length;i++)r.push(e[i].write());return u.default.concatUint8Array(r)}async function h(e,t,r){return e.produce_key(t,s.default.cipher[r].keySize)}c.prototype=new n.default,c.prototype.constructor=c,c.prototype.read=function(e){let t=this.readPublicKey(e);if(this.s2k_usage=e[t++],5===this.version&&t++,255===this.s2k_usage||254===this.s2k_usage||253===this.s2k_usage){if(this.symmetric=e[t++],this.symmetric=o.default.read(o.default.symmetric,this.symmetric),253===this.s2k_usage&&(this.aead=e[t++],this.aead=o.default.read(o.default.aead,this.aead)),this.s2k=new a.default,t+=this.s2k.read(e.subarray(t,e.length)),"gnu-dummy"===this.s2k.type)return}else this.s2k_usage&&(this.symmetric=this.s2k_usage,this.symmetric=o.default.read(o.default.symmetric,this.symmetric));if(this.s2k_usage&&(this.iv=e.subarray(t,t+s.default.cipher[this.symmetric].blockSize),t+=this.iv.length),5===this.version&&(t+=4),this.keyMaterial=e.subarray(t),this.isEncrypted=!!this.s2k_usage,!this.isEncrypted){const e=this.keyMaterial.subarray(0,-2);if(!u.default.equalsUint8Array(u.default.write_checksum(e),this.keyMaterial.subarray(-2)))throw new Error("Key checksum mismatch");const t=f(e,this.algorithm);this.params=this.params.concat(t)}},c.prototype.write=function(){const e=[this.writePublicKey()];e.push(new Uint8Array([this.s2k_usage]));const t=[];if(255!==this.s2k_usage&&254!==this.s2k_usage&&253!==this.s2k_usage||(t.push(o.default.write(o.default.symmetric,this.symmetric)),253===this.s2k_usage&&t.push(o.default.write(o.default.aead,this.aead)),t.push(...this.s2k.write())),this.s2k_usage&&"gnu-dummy"!==this.s2k.type&&t.push(...this.iv),5===this.version&&e.push(new Uint8Array([t.length])),e.push(new Uint8Array(t)),!this.isDummy()){if(!this.s2k_usage){const e=d(this.params,this.algorithm);this.keyMaterial=u.default.concatUint8Array([e,u.default.write_checksum(e)])}5===this.version&&e.push(u.default.writeNumber(this.keyMaterial.length,4)),e.push(this.keyMaterial)}return u.default.concatUint8Array(e)},c.prototype.isDecrypted=function(){return!1===this.isEncrypted},c.prototype.isDummy=function(){return!(!this.s2k||"gnu-dummy"!==this.s2k.type)},c.prototype.makeDummy=function(){if(!this.isDummy()){if(!this.isDecrypted())throw new Error("Key is not decrypted");this.clearPrivateParams(),this.keyMaterial=null,this.isEncrypted=!1,this.s2k=new a.default,this.s2k.algorithm=0,this.s2k.c=0,this.s2k.type="gnu-dummy",this.s2k_usage=254,this.symmetric="aes256"}},c.prototype.encrypt=async function(e){if(this.isDummy())return!1;if(!this.isDecrypted())throw new Error("Key packet is already encrypted");if(this.isDecrypted()&&!e)return this.s2k_usage=0,!1;if(!e)throw new Error("The key must be decrypted before removing passphrase protection.");this.s2k=new a.default,this.s2k.salt=await s.default.random.getRandomBytes(8);const t=d(this.params,this.algorithm);this.symmetric="aes256";const r=await h(this.s2k,e,this.symmetric),n=s.default.cipher[this.symmetric].blockSize;if(this.iv=await s.default.random.getRandomBytes(n),5===this.version){this.s2k_usage=253,this.aead="eax";const e=s.default[this.aead],n=await e(this.symmetric,r);this.keyMaterial=await n.encrypt(t,this.iv.subarray(0,e.ivLength),new Uint8Array)}else this.s2k_usage=254,this.keyMaterial=await s.default.cfb.encrypt(this.symmetric,r,u.default.concatUint8Array([t,await s.default.hash.sha1(t)]),this.iv);return!0},c.prototype.decrypt=async function(e){if(this.isDummy())return this.isEncrypted=!1,!1;if(this.isDecrypted())throw new Error("Key packet is already decrypted.");let t,r;if(254!==this.s2k_usage&&253!==this.s2k_usage)throw 255===this.s2k_usage?new Error("Encrypted private key is authenticated using an insecure two-byte hash"):new Error("Private key is encrypted using an insecure S2K function: unsalted MD5");if(t=await h(this.s2k,e,this.symmetric),253===this.s2k_usage){const e=s.default[this.aead];try{const n=await e(this.symmetric,t);r=await n.decrypt(this.keyMaterial,this.iv.subarray(0,e.ivLength),new Uint8Array)}catch(i){if("Authentication tag mismatch"===i.message)throw new Error("Incorrect key passphrase: "+i.message);throw i}}else{const e=await s.default.cfb.decrypt(this.symmetric,t,this.keyMaterial,this.iv);r=e.subarray(0,-20);const n=await s.default.hash.sha1(r);if(!u.default.equalsUint8Array(n,e.subarray(-20)))throw new Error("Incorrect key passphrase")}const n=f(r,this.algorithm);return this.params=this.params.concat(n),this.isEncrypted=!1,this.keyMaterial=null,this.s2k_usage=0,!0},c.prototype.generate=async function(e,t){const r=o.default.write(o.default.publicKey,this.algorithm);this.params=await s.default.generateParams(r,e,t),this.isEncrypted=!1},c.prototype.validate=async function(){if(this.isDummy())return;if(!this.isDecrypted())throw new Error("Key is not decrypted");const e=o.default.write(o.default.publicKey,this.algorithm);if(!(await s.default.validateParams(e,this.params)))throw new Error("Key is invalid")},c.prototype.clearPrivateParams=function(){if(this.s2k&&"gnu-dummy"===this.s2k.type)return void(this.isEncrypted=!0);const e=o.default.write(o.default.publicKey,this.algorithm),t=s.default.getPubKeyParamTypes(e).length;this.params.slice(t).forEach(e=>{e.data.fill(0)}),this.params.length=t,this.isEncrypted=!0},c.prototype.postCloneTypeFix=function(){const e=o.default.write(o.default.publicKey,this.algorithm),t=[].concat(s.default.getPubKeyParamTypes(e),s.default.getPrivKeyParamTypes(e));for(let r=0;r<this.params.length;r++){const e=this.params[r];this.params[r]=t[r].fromClone(e)}this.keyid&&(this.keyid=i.default.fromClone(this.keyid)),this.s2k&&(this.s2k=a.default.fromClone(this.s2k))},r.default=c},{"../crypto":72,"../enums":91,"../type/keyid.js":132,"../type/s2k":135,"../util":136,"./public_key":115}],119:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=a(e("./secret_key")),i=a(e("../enums"));function a(e){return e&&e.__esModule?e:{default:e}}function s(e=new Date){n.default.call(this,e),this.tag=i.default.packet.secretSubkey}s.prototype=new n.default,s.prototype.constructor=s,r.default=s},{"../enums":91,"./secret_key":118}],120:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=f(e("web-stream-tools")),i=f(e("./packet")),a=f(e("../type/keyid.js")),s=f(e("../type/mpi.js")),o=f(e("../crypto")),u=f(e("../enums")),l=f(e("../util")),c=f(e("../config"));function f(e){return e&&e.__esModule?e:{default:e}}function d(e=new Date){this.tag=u.default.packet.signature,this.version=4,this.signatureType=null,this.hashAlgorithm=null,this.publicKeyAlgorithm=null,this.signatureData=null,this.unhashedSubpackets=[],this.signedHashValue=null,this.created=l.default.normalizeDate(e),this.signatureExpirationTime=null,this.signatureNeverExpires=!0,this.exportable=null,this.trustLevel=null,this.trustAmount=null,this.regularExpression=null,this.revocable=null,this.keyExpirationTime=null,this.keyNeverExpires=null,this.preferredSymmetricAlgorithms=null,this.revocationKeyClass=null,this.revocationKeyAlgorithm=null,this.revocationKeyFingerprint=null,this.issuerKeyId=new a.default,this.rawNotations=[],this.notations={},this.preferredHashAlgorithms=null,this.preferredCompressionAlgorithms=null,this.keyServerPreferences=null,this.preferredKeyServer=null,this.isPrimaryUserID=null,this.policyURI=null,this.keyFlags=null,this.signersUserId=null,this.reasonForRevocationFlag=null,this.reasonForRevocationString=null,this.features=null,this.signatureTargetPublicKeyAlgorithm=null,this.signatureTargetHashAlgorithm=null,this.signatureTargetHash=null,this.embeddedSignature=null,this.issuerKeyVersion=null,this.issuerFingerprint=null,this.preferredAeadAlgorithms=null,this.verified=null,this.revoked=null}function h(e,t){const r=[];return r.push(i.default.writeSimpleLength(t.length+1)),r.push(new Uint8Array([e])),r.push(t),l.default.concat(r)}d.prototype.read=function(e){let t=0;if(this.version=e[t++],4!==this.version&&5!==this.version)throw new Error("Version "+this.version+" of the signature is unsupported.");this.signatureType=e[t++],this.publicKeyAlgorithm=e[t++],this.hashAlgorithm=e[t++],t+=this.read_sub_packets(e.subarray(t,e.length),!0),this.signatureData=e.subarray(0,t),t+=this.read_sub_packets(e.subarray(t,e.length),!1),this.signedHashValue=e.subarray(t,t+2),t+=2,this.signature=e.subarray(t,e.length)},d.prototype.write=function(){const e=[];return e.push(this.signatureData),e.push(this.write_unhashed_sub_packets()),e.push(this.signedHashValue),e.push(n.default.clone(this.signature)),l.default.concat(e)},d.prototype.sign=async function(e,t,r=!1,i=!1){const a=u.default.write(u.default.signature,this.signatureType),s=u.default.write(u.default.publicKey,this.publicKeyAlgorithm),c=u.default.write(u.default.hash,this.hashAlgorithm);5===e.version&&(this.version=5);const f=[new Uint8Array([this.version,a,s,c])];this.issuerKeyVersion=e.version,this.issuerFingerprint=e.getFingerprintBytes(),this.issuerKeyId=e.getKeyId(),f.push(this.write_hashed_sub_packets()),this.signatureData=l.default.concat(f);const d=this.toHash(a,t,r),h=await this.hash(a,t,d,r);this.signedHashValue=n.default.slice(n.default.clone(h),0,2);const p=e.params,y=async()=>o.default.signature.sign(s,c,p,d,await n.default.readToEnd(h));return i?this.signature=n.default.fromAsync(y):(this.signature=await y(),this.verified=!0),!0},d.prototype.write_hashed_sub_packets=function(){const e=u.default.signatureSubpacket,t=[];let r;null!==this.created&&t.push(h(e.signature_creation_time,l.default.writeDate(this.created))),null!==this.signatureExpirationTime&&t.push(h(e.signature_expiration_time,l.default.writeNumber(this.signatureExpirationTime,4))),null!==this.exportable&&t.push(h(e.exportable_certification,new Uint8Array([this.exportable?1:0]))),null!==this.trustLevel&&(r=new Uint8Array([this.trustLevel,this.trustAmount]),t.push(h(e.trust_signature,r))),null!==this.regularExpression&&t.push(h(e.regular_expression,this.regularExpression)),null!==this.revocable&&t.push(h(e.revocable,new Uint8Array([this.revocable?1:0]))),null!==this.keyExpirationTime&&t.push(h(e.key_expiration_time,l.default.writeNumber(this.keyExpirationTime,4))),null!==this.preferredSymmetricAlgorithms&&(r=l.default.str_to_Uint8Array(l.default.Uint8Array_to_str(this.preferredSymmetricAlgorithms)),t.push(h(e.preferred_symmetric_algorithms,r))),null!==this.revocationKeyClass&&(r=new Uint8Array([this.revocationKeyClass,this.revocationKeyAlgorithm]),r=l.default.concat([r,this.revocationKeyFingerprint]),t.push(h(e.revocation_key,r))),this.rawNotations.forEach(([{name:n,value:i,humanReadable:a}])=>{(r=[new Uint8Array([a?128:0,0,0,0])]).push(l.default.writeNumber(n.length,2)),r.push(l.default.writeNumber(i.length,2)),r.push(l.default.str_to_Uint8Array(n)),r.push(i),r=l.default.concat(r),t.push(h(e.notation_data,r))}),null!==this.preferredHashAlgorithms&&(r=l.default.str_to_Uint8Array(l.default.Uint8Array_to_str(this.preferredHashAlgorithms)),t.push(h(e.preferred_hash_algorithms,r))),null!==this.preferredCompressionAlgorithms&&(r=l.default.str_to_Uint8Array(l.default.Uint8Array_to_str(this.preferredCompressionAlgorithms)),t.push(h(e.preferred_compression_algorithms,r))),null!==this.keyServerPreferences&&(r=l.default.str_to_Uint8Array(l.default.Uint8Array_to_str(this.keyServerPreferences)),t.push(h(e.key_server_preferences,r))),null!==this.preferredKeyServer&&t.push(h(e.preferred_key_server,l.default.str_to_Uint8Array(this.preferredKeyServer))),null!==this.isPrimaryUserID&&t.push(h(e.primary_user_id,new Uint8Array([this.isPrimaryUserID?1:0]))),null!==this.policyURI&&t.push(h(e.policy_uri,l.default.str_to_Uint8Array(this.policyURI))),null!==this.keyFlags&&(r=l.default.str_to_Uint8Array(l.default.Uint8Array_to_str(this.keyFlags)),t.push(h(e.key_flags,r))),null!==this.signersUserId&&t.push(h(e.signers_user_id,l.default.str_to_Uint8Array(this.signersUserId))),null!==this.reasonForRevocationFlag&&(r=l.default.str_to_Uint8Array(String.fromCharCode(this.reasonForRevocationFlag)+this.reasonForRevocationString),t.push(h(e.reason_for_revocation,r))),null!==this.features&&(r=l.default.str_to_Uint8Array(l.default.Uint8Array_to_str(this.features)),t.push(h(e.features,r))),null!==this.signatureTargetPublicKeyAlgorithm&&((r=[new Uint8Array([this.signatureTargetPublicKeyAlgorithm,this.signatureTargetHashAlgorithm])]).push(l.default.str_to_Uint8Array(this.signatureTargetHash)),r=l.default.concat(r),t.push(h(e.signature_target,r))),null!==this.preferredAeadAlgorithms&&(r=l.default.str_to_Uint8Array(l.default.Uint8Array_to_str(this.preferredAeadAlgorithms)),t.push(h(e.preferred_aead_algorithms,r)));const n=l.default.concat(t),i=l.default.writeNumber(n.length,2);return l.default.concat([i,n])},d.prototype.write_unhashed_sub_packets=function(){const e=u.default.signatureSubpacket,t=[];let r;this.issuerKeyId.isNull()||5===this.issuerKeyVersion||t.push(h(e.issuer,this.issuerKeyId.write())),null!==this.embeddedSignature&&t.push(h(e.embedded_signature,this.embeddedSignature.write())),null!==this.issuerFingerprint&&(r=[new Uint8Array([this.issuerKeyVersion]),this.issuerFingerprint],r=l.default.concat(r),t.push(h(e.issuer_fingerprint,r))),this.unhashedSubpackets.forEach(e=>{t.push(i.default.writeSimpleLength(e.length)),t.push(e)});const n=l.default.concat(t),a=l.default.writeNumber(n.length,2);return l.default.concat([a,n])},d.prototype.read_sub_packet=function(e,t=!0){let r=0;const n=(e,t)=>{this[e]=[];for(let r=0;r<t.length;r++)this[e].push(t[r])},i=128&e[r],a=127&e[r];if(t||[u.default.signatureSubpacket.issuer,u.default.signatureSubpacket.issuer_fingerprint,u.default.signatureSubpacket.embedded_signature].includes(a))switch(r++,a){case 2:this.created=l.default.readDate(e.subarray(r,e.length));break;case 3:{const t=l.default.readNumber(e.subarray(r,e.length));this.signatureNeverExpires=0===t,this.signatureExpirationTime=t;break}case 4:this.exportable=1===e[r++];break;case 5:this.trustLevel=e[r++],this.trustAmount=e[r++];break;case 6:this.regularExpression=e[r];break;case 7:this.revocable=1===e[r++];break;case 9:{const t=l.default.readNumber(e.subarray(r,e.length));this.keyExpirationTime=t,this.keyNeverExpires=0===t;break}case 11:n("preferredSymmetricAlgorithms",e.subarray(r,e.length));break;case 12:this.revocationKeyClass=e[r++],this.revocationKeyAlgorithm=e[r++],this.revocationKeyFingerprint=e.subarray(r,r+20);break;case 16:this.issuerKeyId.read(e.subarray(r,e.length));break;case 20:{const t=!!(128&e[r]);r+=4;const n=l.default.readNumber(e.subarray(r,r+2));r+=2;const a=l.default.readNumber(e.subarray(r,r+2));r+=2;const s=l.default.Uint8Array_to_str(e.subarray(r,r+n)),o=e.subarray(r+n,r+n+a);if(this.rawNotations.push({name:s,humanReadable:t,value:o}),t&&(this.notations[s]=l.default.Uint8Array_to_str(o)),i&&-1===c.default.known_notations.indexOf(s))throw new Error("Unknown critical notation: "+s);break}case 21:n("preferredHashAlgorithms",e.subarray(r,e.length));break;case 22:n("preferredCompressionAlgorithms",e.subarray(r,e.length));break;case 23:n("keyServerPreferences",e.subarray(r,e.length));break;case 24:this.preferredKeyServer=l.default.Uint8Array_to_str(e.subarray(r,e.length));break;case 25:this.isPrimaryUserID=0!==e[r++];break;case 26:this.policyURI=l.default.Uint8Array_to_str(e.subarray(r,e.length));break;case 27:n("keyFlags",e.subarray(r,e.length));break;case 28:this.signersUserId=l.default.Uint8Array_to_str(e.subarray(r,e.length));break;case 29:this.reasonForRevocationFlag=e[r++],this.reasonForRevocationString=l.default.Uint8Array_to_str(e.subarray(r,e.length));break;case 30:n("features",e.subarray(r,e.length));break;case 31:{this.signatureTargetPublicKeyAlgorithm=e[r++],this.signatureTargetHashAlgorithm=e[r++];const t=o.default.getHashByteLength(this.signatureTargetHashAlgorithm);this.signatureTargetHash=l.default.Uint8Array_to_str(e.subarray(r,r+t));break}case 32:this.embeddedSignature=new d,this.embeddedSignature.read(e.subarray(r,e.length));break;case 33:this.issuerKeyVersion=e[r++],this.issuerFingerprint=e.subarray(r,e.length),5===this.issuerKeyVersion?this.issuerKeyId.read(this.issuerFingerprint):this.issuerKeyId.read(this.issuerFingerprint.subarray(-8));break;case 34:n.call(this,"preferredAeadAlgorithms",e.subarray(r,e.length));break;default:{const e=new Error("Unknown signature subpacket type "+a+" @:"+r);if(i)throw e;l.default.print_debug(e)}}else this.unhashedSubpackets.push(e.subarray(r,e.length))},d.prototype.read_sub_packets=function(e,t=!0){const r=l.default.readNumber(e.subarray(0,2));let n=2;for(;n<2+r;){const r=i.default.readSimpleLength(e.subarray(n,e.length));n+=r.offset,this.read_sub_packet(e.subarray(n,n+r.len),t),n+=r.len}return n},d.prototype.toSign=function(e,t){const r=u.default.signature;switch(e){case r.binary:return null!==t.text?l.default.encode_utf8(t.getText(!0)):t.getBytes(!0);case r.text:{const e=t.getBytes(!0);return l.default.canonicalizeEOL(e)}case r.standalone:return new Uint8Array(0);case r.cert_generic:case r.cert_persona:case r.cert_casual:case r.cert_positive:case r.cert_revocation:{let e,n;if(t.userId)n=180,e=t.userId;else{if(!t.userAttribute)throw new Error("Either a userId or userAttribute packet needs to be supplied for certification.");n=209,e=t.userAttribute}const i=e.write();return l.default.concat([this.toSign(r.key,t),new Uint8Array([n]),l.default.writeNumber(i.length,4),i])}case r.subkey_binding:case r.subkey_revocation:case r.key_binding:return l.default.concat([this.toSign(r.key,t),this.toSign(r.key,{key:t.bind})]);case r.key:if(void 0===t.key)throw new Error("Key packet is required for this signature.");return t.key.writeForHash(this.version);case r.key_revocation:return this.toSign(r.key,t);case r.timestamp:return new Uint8Array(0);case r.third_party:throw new Error("Not implemented");default:throw new Error("Unknown signature type.")}},d.prototype.calculateTrailer=function(e,t){let r=0;return n.default.transform(n.default.clone(this.signatureData),e=>{r+=e.length},()=>{const n=[];return 5!==this.version||this.signatureType!==u.default.signature.binary&&this.signatureType!==u.default.signature.text||(t?n.push(new Uint8Array(6)):n.push(e.writeHeader())),n.push(new Uint8Array([this.version,255])),5===this.version&&n.push(new Uint8Array(4)),n.push(l.default.writeNumber(r,4)),l.default.concat(n)})},d.prototype.toHash=function(e,t,r=!1){const n=this.toSign(e,t);return l.default.concat([n,this.signatureData,this.calculateTrailer(t,r)])},d.prototype.hash=async function(e,t,r,i=!1,a=!0){const s=u.default.write(u.default.hash,this.hashAlgorithm);return r||(r=this.toHash(e,t,i)),!a&&l.default.isStream(r)?n.default.fromAsync(async()=>this.hash(e,t,await n.default.readToEnd(r),i)):o.default.hash.digest(s,r)},d.prototype.verify=async function(e,t,r,i=!1,a=!1){const l=u.default.write(u.default.publicKey,this.publicKeyAlgorithm),f=u.default.write(u.default.hash,this.hashAlgorithm);if(l!==u.default.write(u.default.publicKey,e.algorithm))throw new Error("Public key algorithm used to sign signature does not match issuer key algorithm.");let d,h;if(this.hashed?h=await this.hashed:(d=this.toHash(t,r,i),a||(d=await n.default.readToEnd(d)),h=await this.hash(t,r,d)),h=await n.default.readToEnd(h),this.signedHashValue[0]!==h[0]||this.signedHashValue[1]!==h[1])throw new Error("Message digest did not match");let p=0;l>0&&l<4?p=1:l!==u.default.publicKey.dsa&&l!==u.default.publicKey.ecdsa&&l!==u.default.publicKey.eddsa||(p=2);const y=l===u.default.publicKey.eddsa?"le":"be",m=[];let g=0;this.signature=await n.default.readToEnd(this.signature);for(let n=0;n<p;n++)m[n]=new s.default,g+=m[n].read(this.signature.subarray(g,this.signature.length),y);if(!(await o.default.signature.verify(l,f,m,e.params,d,h)))throw new Error("Signature verification failed");if(c.default.reject_hash_algorithms.has(f))throw new Error("Insecure hash algorithm: "+u.default.read(u.default.hash,f).toUpperCase());if(c.default.reject_message_hash_algorithms.has(f)&&[u.default.signature.binary,u.default.signature.text].includes(this.signatureType))throw new Error("Insecure message hash algorithm: "+u.default.read(u.default.hash,f).toUpperCase());if(null!==this.revocationKeyClass)throw new Error("This key is intended to be revoked with an authorized key, which OpenPGP.js does not support.");return this.verified=!0,!0},d.prototype.isExpired=function(e=new Date){const t=l.default.normalizeDate(e);if(null!==t){const e=this.getExpirationTime();return!(this.created<=t&&t<=e)}return!1},d.prototype.getExpirationTime=function(){return this.signatureNeverExpires?1/0:new Date(this.created.getTime()+1e3*this.signatureExpirationTime)},d.prototype.postCloneTypeFix=function(){this.issuerKeyId=a.default.fromClone(this.issuerKeyId)},r.default=d},{"../config":57,"../crypto":72,"../enums":91,"../type/keyid.js":132,"../type/mpi.js":133,"../util":136,"./packet":113,"web-stream-tools":53}],121:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=u(e("web-stream-tools")),i=u(e("../config")),a=u(e("../crypto")),s=u(e("../enums")),o=u(e("../util"));function u(e){return e&&e.__esModule?e:{default:e}}const l=1;function c(){this.tag=s.default.packet.symEncryptedAEADProtected,this.version=l,this.cipherAlgo=null,this.aeadAlgorithm="eax",this.aeadAlgo=null,this.chunkSizeByte=null,this.iv=null,this.encrypted=null,this.packets=null}r.default=c,c.prototype.read=async function(e){await n.default.parse(e,async e=>{if(await e.readByte()!==l)throw new Error("Invalid packet version.");this.cipherAlgo=await e.readByte(),this.aeadAlgo=await e.readByte(),this.chunkSizeByte=await e.readByte();const t=a.default[s.default.read(s.default.aead,this.aeadAlgo)];this.iv=await e.readBytes(t.ivLength),this.encrypted=e.remainder()})},c.prototype.write=function(){return o.default.concat([new Uint8Array([this.version,this.cipherAlgo,this.aeadAlgo,this.chunkSizeByte]),this.iv,this.encrypted])},c.prototype.decrypt=async function(e,t,r){return await this.packets.read(await this.crypt("decrypt",t,n.default.clone(this.encrypted),r),r),!0},c.prototype.encrypt=async function(e,t,r){this.cipherAlgo=s.default.write(s.default.symmetric,e),this.aeadAlgo=s.default.write(s.default.aead,this.aeadAlgorithm);const n=a.default[s.default.read(s.default.aead,this.aeadAlgo)];this.iv=await a.default.random.getRandomBytes(n.ivLength),this.chunkSizeByte=i.default.aead_chunk_size_byte;const o=this.packets.write();this.encrypted=await this.crypt("encrypt",t,o,r)},c.prototype.crypt=async function(e,t,r,i){const u=s.default.read(s.default.symmetric,this.cipherAlgo),l=a.default[s.default.read(s.default.aead,this.aeadAlgo)],c=await l(u,t),f="decrypt"===e?l.tagLength:0,d="encrypt"===e?l.tagLength:0,h=2**(this.chunkSizeByte+6)+f,p=new ArrayBuffer(21),y=new Uint8Array(p,0,13),m=new Uint8Array(p),g=new DataView(p),w=new Uint8Array(p,5,8);y.set([192|this.tag,this.version,this.cipherAlgo,this.aeadAlgo,this.chunkSizeByte],0);let b=0,_=Promise.resolve(),v=0,k=0;const A=this.iv;return n.default.transformPair(r,async(t,r)=>{const a=n.default.getReader(t),s=new TransformStream({},{highWaterMark:i?o.default.getHardwareConcurrency()*2**(this.chunkSizeByte+6):1/0,size:e=>e.length});n.default.pipe(s.readable,r);const u=n.default.getWriter(s.writable);try{for(;;){let t=await a.readBytes(h+f)||new Uint8Array;const r=t.subarray(t.length-f);let n,i;if(t=t.subarray(0,t.length-f),!b||t.length?(a.unshift(r),n=c[e](t,l.getNonce(A,w),y),k+=t.length-f+d):(g.setInt32(17,v),n=c[e](r,l.getNonce(A,w),m),k+=d,i=!0),v+=t.length-f,_=_.then(()=>n).then(async e=>{await u.ready,await u.write(e),k-=e.length}).catch(e=>u.abort(e)),(i||k>u.desiredSize)&&await _,i){await u.close();break}g.setInt32(9,++b)}}catch(p){await u.abort(p)}})}},{"../config":57,"../crypto":72,"../enums":91,"../util":136,"web-stream-tools":53}],122:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=u(e("web-stream-tools")),i=u(e("../config")),a=u(e("../crypto")),s=u(e("../enums")),o=u(e("../util"));function u(e){return e&&e.__esModule?e:{default:e}}const l=1;function c(){this.tag=s.default.packet.symEncryptedIntegrityProtected,this.version=l,this.encrypted=null,this.modification=!1,this.packets=null}c.prototype.read=async function(e){await n.default.parse(e,async e=>{if(await e.readByte()!==l)throw new Error("Invalid packet version.");this.encrypted=e.remainder()})},c.prototype.write=function(){return o.default.concat([new Uint8Array([l]),this.encrypted])},c.prototype.encrypt=async function(e,t,r){let i=this.packets.write();r||(i=await n.default.readToEnd(i));const s=await a.default.getPrefixRandom(e),u=new Uint8Array([211,20]),l=o.default.concat([s,i,u]),c=await a.default.hash.sha1(n.default.passiveClone(l)),f=o.default.concat([l,c]);return this.encrypted=await a.default.cfb.encrypt(e,t,f,new Uint8Array(a.default.cipher[e].blockSize)),!0},c.prototype.decrypt=async function(e,t,r){let s=n.default.clone(this.encrypted);r||(s=await n.default.readToEnd(s));const u=await a.default.cfb.decrypt(e,t,s,new Uint8Array(a.default.cipher[e].blockSize)),l=n.default.slice(n.default.passiveClone(u),-20),c=n.default.slice(u,0,-20),f=Promise.all([n.default.readToEnd(await a.default.hash.sha1(n.default.passiveClone(c))),n.default.readToEnd(l)]).then(([e,t])=>{if(!o.default.equalsUint8Array(e,t))throw new Error("Modification detected.");return new Uint8Array}),d=n.default.slice(c,a.default.cipher[e].blockSize+2);let h=n.default.slice(d,0,-2);return h=n.default.concat([h,n.default.fromAsync(()=>f)]),o.default.isStream(s)&&i.default.allow_unauthenticated_stream||(h=await n.default.readToEnd(h)),await this.packets.read(h,r),!0},r.default=c},{"../config":57,"../crypto":72,"../enums":91,"../util":136,"web-stream-tools":53}],123:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=u(e("../type/s2k")),i=u(e("../config")),a=u(e("../crypto")),s=u(e("../enums")),o=u(e("../util"));function u(e){return e&&e.__esModule?e:{default:e}}function l(){this.tag=s.default.packet.symEncryptedSessionKey,this.version=i.default.aead_protect?5:4,this.sessionKey=null,this.sessionKeyEncryptionAlgorithm=null,this.sessionKeyAlgorithm="aes256",this.aeadAlgorithm=s.default.read(s.default.aead,i.default.aead_mode),this.encrypted=null,this.s2k=null,this.iv=null}l.prototype.read=function(e){let t=0;this.version=e[t++];const r=s.default.read(s.default.symmetric,e[t++]);if(5===this.version&&(this.aeadAlgorithm=s.default.read(s.default.aead,e[t++])),this.s2k=new n.default,t+=this.s2k.read(e.subarray(t,e.length)),5===this.version){const r=a.default[this.aeadAlgorithm];this.iv=e.subarray(t,t+=r.ivLength)}5===this.version||t<e.length?(this.encrypted=e.subarray(t,e.length),this.sessionKeyEncryptionAlgorithm=r):this.sessionKeyAlgorithm=r},l.prototype.write=function(){const e=null===this.encrypted?this.sessionKeyAlgorithm:this.sessionKeyEncryptionAlgorithm;let t;return 5===this.version?t=o.default.concatUint8Array([new Uint8Array([this.version,s.default.write(s.default.symmetric,e),s.default.write(s.default.aead,this.aeadAlgorithm)]),this.s2k.write(),this.iv,this.encrypted]):(t=o.default.concatUint8Array([new Uint8Array([this.version,s.default.write(s.default.symmetric,e)]),this.s2k.write()]),null!==this.encrypted&&(t=o.default.concatUint8Array([t,this.encrypted]))),t},l.prototype.decrypt=async function(e){const t=null!==this.sessionKeyEncryptionAlgorithm?this.sessionKeyEncryptionAlgorithm:this.sessionKeyAlgorithm,r=a.default.cipher[t].keySize,n=await this.s2k.produce_key(e,r);if(5===this.version){const e=a.default[this.aeadAlgorithm],r=new Uint8Array([192|this.tag,this.version,s.default.write(s.default.symmetric,this.sessionKeyEncryptionAlgorithm),s.default.write(s.default.aead,this.aeadAlgorithm)]),i=await e(t,n);this.sessionKey=await i.decrypt(this.encrypted,this.iv,r)}else if(null!==this.encrypted){const e=await a.default.cfb.decrypt(t,n,this.encrypted,new Uint8Array(a.default.cipher[t].blockSize));this.sessionKeyAlgorithm=s.default.read(s.default.symmetric,e[0]),this.sessionKey=e.subarray(1,e.length)}else this.sessionKey=n;return!0},l.prototype.encrypt=async function(e){const t=null!==this.sessionKeyEncryptionAlgorithm?this.sessionKeyEncryptionAlgorithm:this.sessionKeyAlgorithm;this.sessionKeyEncryptionAlgorithm=t,this.s2k=new n.default,this.s2k.salt=await a.default.random.getRandomBytes(8);const r=a.default.cipher[t].keySize,i=await this.s2k.produce_key(e,r);if(null===this.sessionKey&&(this.sessionKey=await a.default.generateSessionKey(this.sessionKeyAlgorithm)),5===this.version){const e=a.default[this.aeadAlgorithm];this.iv=await a.default.random.getRandomBytes(e.ivLength);const r=new Uint8Array([192|this.tag,this.version,s.default.write(s.default.symmetric,this.sessionKeyEncryptionAlgorithm),s.default.write(s.default.aead,this.aeadAlgorithm)]),n=await e(t,i);this.encrypted=await n.encrypt(this.sessionKey,this.iv,r)}else{const e=new Uint8Array([s.default.write(s.default.symmetric,this.sessionKeyAlgorithm)]),r=o.default.concatUint8Array([e,this.sessionKey]);this.encrypted=await a.default.cfb.encrypt(t,i,r,new Uint8Array(a.default.cipher[t].blockSize))}return!0},l.prototype.postCloneTypeFix=function(){this.s2k=n.default.fromClone(this.s2k)},r.default=l},{"../config":57,"../crypto":72,"../enums":91,"../type/s2k":135,"../util":136}],124:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=u(e("web-stream-tools")),i=u(e("../config")),a=u(e("../crypto")),s=u(e("../enums")),o=u(e("../util"));function u(e){return e&&e.__esModule?e:{default:e}}function l(){this.tag=s.default.packet.symmetricallyEncrypted,this.encrypted=null,this.packets=null,this.ignore_mdc_error=i.default.ignore_mdc_error}l.prototype.read=function(e){this.encrypted=e},l.prototype.write=function(){return this.encrypted},l.prototype.decrypt=async function(e,t){if(!this.ignore_mdc_error)throw new Error("Decryption failed due to missing MDC.");this.encrypted=await n.default.readToEnd(this.encrypted);const r=await a.default.cfb.decrypt(e,t,this.encrypted.subarray(a.default.cipher[e].blockSize+2),this.encrypted.subarray(2,a.default.cipher[e].blockSize+2));return await this.packets.read(r),!0},l.prototype.encrypt=async function(e,t){const r=this.packets.write(),n=await a.default.getPrefixRandom(e),i=await a.default.cfb.encrypt(e,t,n,new Uint8Array(a.default.cipher[e].blockSize)),s=await a.default.cfb.encrypt(e,t,r,i.subarray(2));return this.encrypted=o.default.concat([i,s]),!0},r.default=l},{"../config":57,"../crypto":72,"../enums":91,"../util":136,"web-stream-tools":53}],125:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n,i=e("../enums"),a=(n=i)&&n.__esModule?n:{default:n};function s(){this.tag=a.default.packet.trust}s.prototype.read=function(){},r.default=s},{"../enums":91}],126:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=s(e("./packet")),i=s(e("../enums")),a=s(e("../util"));function s(e){return e&&e.__esModule?e:{default:e}}function o(){this.tag=i.default.packet.userAttribute,this.attributes=[]}o.prototype.read=function(e){let t=0;for(;t<e.length;){const r=n.default.readSimpleLength(e.subarray(t,e.length));t+=r.offset,this.attributes.push(a.default.Uint8Array_to_str(e.subarray(t,t+r.len))),t+=r.len}},o.prototype.write=function(){const e=[];for(let t=0;t<this.attributes.length;t++)e.push(n.default.writeSimpleLength(this.attributes[t].length)),e.push(a.default.str_to_Uint8Array(this.attributes[t]));return a.default.concatUint8Array(e)},o.prototype.equals=function(e){return!!(e&&e instanceof o)&&this.attributes.every(function(t,r){return t===e.attributes[r]})},r.default=o},{"../enums":91,"../util":136,"./packet":113}],127:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=a(e("../enums")),i=a(e("../util"));function a(e){return e&&e.__esModule?e:{default:e}}function s(){this.tag=n.default.packet.userid,this.userid="",this.name="",this.email="",this.comment=""}s.prototype.read=function(e){this.parse(i.default.decode_utf8(e))},s.prototype.parse=function(e){try{Object.assign(this,i.default.parseUserId(e))}catch(t){}this.userid=e},s.prototype.write=function(){return i.default.encode_utf8(this.userid)},s.prototype.format=function(e){i.default.isString(e)&&(e=i.default.parseUserId(e)),Object.assign(this,e),this.userid=i.default.formatUserId(e)},r.default=s},{"../enums":91,"../util":136}],128:[function(e,t,r){(function(t){"use strict";var r,n=e("./util"),i=(r=n)&&r.__esModule?r:{default:r};if(void 0!==t)try{void 0===t.fetch&&e("whatwg-fetch"),void 0===Array.prototype.fill&&e("core-js/fn/array/fill"),void 0===Array.prototype.find&&e("core-js/fn/array/find"),void 0===Array.prototype.includes&&e("core-js/fn/array/includes"),void 0===Array.from&&e("core-js/fn/array/from"),e("core-js/fn/promise"),void 0===Uint8Array.from&&e("core-js/fn/typed/uint8-array"),void 0===String.prototype.repeat&&e("core-js/fn/string/repeat"),"undefined"==typeof Symbol&&e("core-js/fn/symbol"),void 0===Object.assign&&e("core-js/fn/object/assign")}catch(a){}if("undefined"==typeof TransformStream&&e("@mattiasbuelens/web-streams-polyfill/es6"),"undefined"==typeof TextEncoder){const e=i.default.nodeRequire("util")||{};t.TextEncoder=e.TextEncoder,t.TextDecoder=e.TextDecoder}if("undefined"==typeof TextEncoder){const r=e("text-encoding-utf-8");t.TextEncoder=r.TextEncoder,t.TextDecoder=r.TextDecoder}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./util":136,"@mattiasbuelens/web-streams-polyfill/es6":1,"core-js/fn/array/fill":"core-js/fn/array/fill","core-js/fn/array/find":"core-js/fn/array/find","core-js/fn/array/from":"core-js/fn/array/from","core-js/fn/array/includes":"core-js/fn/array/includes","core-js/fn/object/assign":"core-js/fn/object/assign","core-js/fn/promise":"core-js/fn/promise","core-js/fn/string/repeat":"core-js/fn/string/repeat","core-js/fn/symbol":"core-js/fn/symbol","core-js/fn/typed/uint8-array":"core-js/fn/typed/uint8-array","text-encoding-utf-8":49,"whatwg-fetch":"whatwg-fetch"}],129:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.Signature=o,r.readArmored=async function(e){return u((await n.default.decode(e)).data)},r.read=u;var n=s(e("./encoding/armor")),i=s(e("./packet")),a=s(e("./enums"));function s(e){return e&&e.__esModule?e:{default:e}}function o(e){if(!(this instanceof o))return new o(e);this.packets=e||new i.default.List}async function u(e){const t=new i.default.List;return await t.read(e),new o(t)}o.prototype.armor=function(){return n.default.encode(a.default.armor.signature,this.packets.write())}},{"./encoding/armor":89,"./enums":91,"./packet":109}],130:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n,i=e("../util"),a=(n=i)&&n.__esModule?n:{default:n};function s(e){e=void 0===e?new Uint8Array([]):a.default.isString(e)?a.default.str_to_Uint8Array(e):new Uint8Array(e),this.data=e}s.prototype.read=function(e){if(e.length>=1){const t=e[0];if(e.length>=1+t)return this.data=e.subarray(1,1+t),1+this.data.length}throw new Error("Invalid symmetric key")},s.prototype.write=function(){return a.default.concatUint8Array([new Uint8Array([this.data.length]),this.data])},s.fromClone=function(e){return new s(e.data)},r.default=s},{"../util":136}],131:[function(e,t,r){"use strict";function n(e){if(e){const t=e.hash,r=e.cipher;this.hash=t,this.cipher=r}else this.hash=null,this.cipher=null}Object.defineProperty(r,"__esModule",{value:!0}),n.prototype.read=function(e){if(e.length<4||3!==e[0]||1!==e[1])throw new Error("Cannot read KDFParams");return this.hash=e[2],this.cipher=e[3],4},n.prototype.write=function(){return new Uint8Array([3,1,this.hash,this.cipher])},n.fromClone=function(e){return new n({hash:e.hash,cipher:e.cipher})},r.default=n},{}],132:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n,i=e("../util.js"),a=(n=i)&&n.__esModule?n:{default:n};function s(){this.bytes=""}s.prototype.read=function(e){this.bytes=a.default.Uint8Array_to_str(e.subarray(0,8))},s.prototype.write=function(){return a.default.str_to_Uint8Array(this.bytes)},s.prototype.toHex=function(){return a.default.str_to_hex(this.bytes)},s.prototype.equals=function(e,t=!1){return t&&(e.isWildcard()||this.isWildcard())||this.bytes===e.bytes},s.prototype.isNull=function(){return""===this.bytes},s.prototype.isWildcard=function(){return/^0+$/.test(this.toHex())},s.mapToHex=function(e){return e.toHex()},s.fromClone=function(e){const t=new s;return t.bytes=e.bytes,t},s.fromId=function(e){const t=new s;return t.read(a.default.hex_to_Uint8Array(e)),t},s.wildcard=function(){const e=new s;return e.read(new Uint8Array(8)),e},r.default=s},{"../util.js":136}],133:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=a(e("bn.js")),i=a(e("../util"));function a(e){return e&&e.__esModule?e:{default:e}}function s(e){e instanceof s?this.data=e.data:n.default.isBN(e)?this.fromBN(e):i.default.isUint8Array(e)?this.fromUint8Array(e):i.default.isString(e)?this.fromString(e):this.data=null}s.prototype.read=function(e,t="be"){i.default.isString(e)&&(e=i.default.str_to_Uint8Array(e));const r=(e[0]<<8|e[1])+7>>>3,n=e.subarray(2,2+r);return this.fromUint8Array(n,t),2+r},s.prototype.write=function(e,t){return i.default.Uint8Array_to_MPI(this.toUint8Array(e,t))},s.prototype.bitLength=function(){return 8*(this.data.length-1)+i.default.nbits(this.data[0])},s.prototype.byteLength=function(){return this.data.length},s.prototype.toUint8Array=function(e,t){e=e||"be",t=t||this.data.length;const r=new Uint8Array(t),n="le"===e?0:t-this.data.length;return r.set(this.data,n),"le"===e&&r.reverse(),r},s.prototype.fromUint8Array=function(e,t="be"){this.data=new Uint8Array(e.length),this.data.set(e),"le"===t&&this.data.reverse()},s.prototype.toString=function(){return i.default.Uint8Array_to_str(this.toUint8Array())},s.prototype.fromString=function(e,t="be"){this.fromUint8Array(i.default.str_to_Uint8Array(e),t)},s.prototype.toBN=function(){return new n.default(this.toUint8Array())},s.prototype.fromBN=function(e){this.data=e.toArrayLike(Uint8Array)},s.fromClone=function(e){return new s(e.data)},r.default=s},{"../util":136,"bn.js":16}],134:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=a(e("../util")),i=a(e("../enums"));function a(e){return e&&e.__esModule?e:{default:e}}function s(e){if(e instanceof s)this.oid=e.oid;else if(n.default.isArray(e)||n.default.isUint8Array(e)){if(6===(e=new Uint8Array(e))[0]){if(e[1]!==e.length-2)throw new Error("Length mismatch in DER encoded oid");e=e.subarray(2)}this.oid=e}else this.oid=""}s.prototype.read=function(e){if(e.length>=1){const t=e[0];if(e.length>=1+t)return this.oid=e.subarray(1,1+t),1+this.oid.length}throw new Error("Invalid oid")},s.prototype.write=function(){return n.default.concatUint8Array([new Uint8Array([this.oid.length]),this.oid])},s.prototype.toHex=function(){return n.default.Uint8Array_to_hex(this.oid)},s.prototype.getName=function(){const e=this.toHex();if(i.default.curve[e])return i.default.write(i.default.curve,e);throw new Error("Unknown curve object identifier.")},s.fromClone=function(e){return new s(e.oid)},r.default=s},{"../enums":91,"../util":136}],135:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=o(e("../config")),i=o(e("../crypto")),a=o(e("../enums.js")),s=o(e("../util.js"));function o(e){return e&&e.__esModule?e:{default:e}}function u(){this.algorithm="sha256",this.type="iterated",this.c=n.default.s2k_iteration_count_byte,this.salt=null}u.prototype.get_count=function(){return 16+(15&this.c)<<6+(this.c>>4)},u.prototype.read=function(e){let t=0;switch(this.type=a.default.read(a.default.s2k,e[t++]),this.algorithm=e[t++],"gnu"!==this.type&&(this.algorithm=a.default.read(a.default.hash,this.algorithm)),this.type){case"simple":break;case"salted":this.salt=e.subarray(t,t+8),t+=8;break;case"iterated":this.salt=e.subarray(t,t+8),t+=8,this.c=e[t++];break;case"gnu":if("GNU"!==s.default.Uint8Array_to_str(e.subarray(t,t+3)))throw new Error("Unknown s2k type.");if(t+=3,1001!==1e3+e[t++])throw new Error("Unknown s2k gnu protection mode.");this.type="gnu-dummy";break;default:throw new Error("Unknown s2k type.")}return t},u.prototype.write=function(){if("gnu-dummy"===this.type)return new Uint8Array([101,0,...s.default.str_to_Uint8Array("GNU"),1]);const e=[new Uint8Array([a.default.write(a.default.s2k,this.type),a.default.write(a.default.hash,this.algorithm)])];switch(this.type){case"simple":break;case"salted":e.push(this.salt);break;case"iterated":e.push(this.salt),e.push(new Uint8Array([this.c]));break;case"gnu":throw new Error("GNU s2k type not supported.");default:throw new Error("Unknown s2k type.")}return s.default.concatUint8Array(e)},u.prototype.produce_key=async function(e,t){e=s.default.encode_utf8(e);const r=a.default.write(a.default.hash,this.algorithm),n=[];let o=0,u=0;for(;o<t;){let t;switch(this.type){case"simple":t=s.default.concatUint8Array([new Uint8Array(u),e]);break;case"salted":t=s.default.concatUint8Array([new Uint8Array(u),this.salt,e]);break;case"iterated":{const r=s.default.concatUint8Array([this.salt,e]);let n=r.length;const i=Math.max(this.get_count(),n);(t=new Uint8Array(u+i)).set(r,u);for(let e=u+n;e<i;e+=n,n*=2)t.copyWithin(e,u,e);break}case"gnu":throw new Error("GNU s2k type not supported.");default:throw new Error("Unknown s2k type.")}const a=await i.default.hash.digest(r,t);n.push(a),o+=a.length,u++}return s.default.concatUint8Array(n).subarray(0,t)},u.fromClone=function(e){const t=new u;return t.algorithm=e.algorithm,t.type=e.type,t.c=e.c,t.salt=e.salt,t},r.default=u},{"../config":57,"../crypto":72,"../enums.js":91,"../util.js":136}],136:[function(e,t,r){(function(t){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=u(e("email-addresses")),i=u(e("web-stream-tools")),a=u(e("./config")),s=u(e("./util")),o=u(e("./encoding/base64"));function u(e){return e&&e.__esModule?e:{default:e}}r.default={isString:function(e){return"string"==typeof e||String.prototype.isPrototypeOf(e)},isArray:function(e){return Array.prototype.isPrototypeOf(e)},isUint8Array:i.default.isUint8Array,isStream:i.default.isStream,getTransferables:function(e,t){const r=[];return s.default.collectTransferables(e,r,t),r.length?r:void 0},collectTransferables:function(e,t,r){e&&(s.default.isUint8Array(e)?r&&-1===t.indexOf(e.buffer)&&!(-1!==navigator.userAgent.indexOf("Version/11.1")||(navigator.userAgent.match(/Chrome\/(\d+)/)||[])[1]<56&&-1===navigator.userAgent.indexOf("Edge"))&&t.push(e.buffer):Object.prototype.isPrototypeOf(e)&&Object.entries(e).forEach(([n,a])=>{if(s.default.isStream(a))if(a.locked)e[n]=null;else{const r=i.default.transformPair(a,async a=>{const o=i.default.getReader(a);var u=new MessageChannel;const l=u.port1,c=u.port2;l.onmessage=async function({data:{action:e}}){if("read"===e)try{const e=await o.read();l.postMessage(e,s.default.getTransferables(e))}catch(t){l.postMessage({error:t.message})}else"cancel"===e&&(await r.cancel(),l.postMessage())},e[n]=c,t.push(c)})}else{if("[object MessagePort]"===Object.prototype.toString.call(a))throw new Error("Can't transfer the same stream twice.");s.default.collectTransferables(a,t,r)}}))},restoreStreams:function(e){return Object.prototype.isPrototypeOf(e)&&!Uint8Array.prototype.isPrototypeOf(e)&&Object.entries(e).forEach(([t,r])=>{"[object MessagePort]"!==Object.prototype.toString.call(r)?s.default.restoreStreams(r):e[t]=new ReadableStream({pull:e=>new Promise(t=>{r.onmessage=(r=>{var n=r.data;const i=n.done,a=n.value,s=n.error;s?e.error(new Error(s)):i?e.close():e.enqueue(a),t()}),r.postMessage({action:"read"})}),cancel:()=>new Promise(e=>{r.onmessage=e,r.postMessage({action:"cancel"})})},{highWaterMark:0})}),e},readNumber:function(e){let t=0;for(let r=0;r<e.length;r++)t+=256**r*e[e.length-1-r];return t},writeNumber:function(e,t){const r=new Uint8Array(t);for(let n=0;n<t;n++)r[n]=e>>8*(t-n-1)&255;return r},readDate:function(e){const t=s.default.readNumber(e);return new Date(1e3*t)},writeDate:function(e){const t=Math.floor(e.getTime()/1e3);return s.default.writeNumber(t,4)},normalizeDate:function(e=Date.now()){return null===e||e===1/0?e:new Date(1e3*Math.floor(+e/1e3))},str_to_hex:function(e){if(null===e)return"";const t=[],r=e.length;let n,i=0;for(;i<r;){for(n=e.charCodeAt(i++).toString(16);n.length<2;)n="0"+n;t.push(""+n)}return t.join("")},hex_to_str:function(e){let t="";for(let r=0;r<e.length;r+=2)t+=String.fromCharCode(parseInt(e.substr(r,2),16));return t},Uint8Array_to_MPI:function(e){const t=8*(e.length-1)+s.default.nbits(e[0]),r=Uint8Array.from([(65280&t)>>8,255&t]);return s.default.concatUint8Array([r,e])},b64_to_Uint8Array:function(e){return o.default.decode(e.replace(/-/g,"+").replace(/_/g,"/"))},Uint8Array_to_b64:function(e,t){let r=o.default.encode(e).replace(/[\r\n]/g,"");return t&&(r=r.replace(/[+]/g,"-").replace(/[/]/g,"_").replace(/[=]/g,"")),r},hex_to_Uint8Array:function(e){const t=new Uint8Array(e.length>>1);for(let r=0;r<e.length>>1;r++)t[r]=parseInt(e.substr(r<<1,2),16);return t},Uint8Array_to_hex:function(e){const t=[],r=e.length;let n,i=0;for(;i<r;){for(n=e[i++].toString(16);n.length<2;)n="0"+n;t.push(""+n)}return t.join("")},str_to_Uint8Array:function(e){return i.default.transform(e,e=>{if(!s.default.isString(e))throw new Error("str_to_Uint8Array: Data must be in the form of a string");const t=new Uint8Array(e.length);for(let r=0;r<e.length;r++)t[r]=e.charCodeAt(r);return t})},Uint8Array_to_str:function(e){const t=[],r=(e=new Uint8Array(e)).length;for(let n=0;n<r;n+=16384)t.push(String.fromCharCode.apply(String,e.subarray(n,n+16384<r?n+16384:r)));return t.join("")},encode_utf8:function(e){const t=new TextEncoder("utf-8");function r(e,r=!1){return t.encode(e,{stream:!r})}return i.default.transform(e,r,()=>r("",!0))},decode_utf8:function(e){const t=new TextDecoder("utf-8");function r(e,r=!1){return t.decode(e,{stream:!r})}return i.default.transform(e,r,()=>r(new Uint8Array,!0))},concat:i.default.concat,concatUint8Array:i.default.concatUint8Array,equalsUint8Array:function(e,t){if(!s.default.isUint8Array(e)||!s.default.isUint8Array(t))throw new Error("Data must be in the form of a Uint8Array");if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0},write_checksum:function(e){let t=0;for(let r=0;r<e.length;r++)t=t+e[r]&65535;return s.default.writeNumber(t,2)},print_debug:function(e){a.default.debug&&console.log(e)},print_debug_hexarray_dump:function(e,t){a.default.debug&&(e+=": "+s.default.Uint8Array_to_hex(t),console.log(e))},print_debug_hexstr_dump:function(e,t){a.default.debug&&(e+=s.default.str_to_hex(t),console.log(e))},print_debug_error:function(e){a.default.debug&&console.error(e)},print_entire_stream:function(e,t,r){i.default.readToEnd(i.default.clone(t),r).then(t=>{console.log(e+": ",t)})},nbits:function(e){let t=1,r=e>>>16;return 0!==r&&(e=r,t+=16),0!==(r=e>>8)&&(e=r,t+=8),0!==(r=e>>4)&&(e=r,t+=4),0!==(r=e>>2)&&(e=r,t+=2),0!==(r=e>>1)&&(e=r,t+=1),t},double:function(e){const t=new Uint8Array(e.length),r=e.length-1;for(let n=0;n<r;n++)t[n]=e[n]<<1^e[n+1]>>7;return t[r]=e[r]<<1^135*(e[0]>>7),t},shiftRight:function(e,t){if(t)for(let r=e.length-1;r>=0;r--)e[r]>>=t,r>0&&(e[r]|=e[r-1]<<8-t);return e},getWebCrypto:function(){if(a.default.use_native)return void 0!==t&&t.crypto&&t.crypto.subtle},getWebCryptoAll:function(){if(a.default.use_native&&void 0!==t){if(t.crypto)return t.crypto.subtle||t.crypto.webkitSubtle;if(t.msCrypto)return t.msCrypto.subtle}},detectNode:function(){return"object"==typeof t.process&&"object"==typeof t.process.versions},nodeRequire:function(t){if(s.default.detectNode())return e(t)},getNodeCrypto:function(){if(a.default.use_native)return s.default.nodeRequire("crypto")},getNodeZlib:function(){if(a.default.use_native)return s.default.nodeRequire("zlib")},getNodeBuffer:function(){return(s.default.nodeRequire("buffer")||{}).Buffer},getNodeStream:function(){return(s.default.nodeRequire("stream")||{}).Readable},getHardwareConcurrency:function(){if(s.default.detectNode()){return s.default.nodeRequire("os").cpus().length}return navigator.hardwareConcurrency||1},isEmailAddress:function(e){if(!s.default.isString(e))return!1;return/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+([a-zA-Z]{2,}|xn--[a-zA-Z\-0-9]+)))$/.test(e)},formatUserId:function(e){if(e.name&&!s.default.isString(e.name)||e.email&&!s.default.isEmailAddress(e.email)||e.comment&&!s.default.isString(e.comment))throw new Error("Invalid user id format");const t=[];return e.name&&t.push(e.name),e.comment&&t.push(`(${e.comment})`),e.email&&t.push(`<${e.email}>`),t.join(" ")},parseUserId:function(e){if(e.length>a.default.max_userid_length)throw new Error("User id string is too long");try{var t=n.default.parseOneAddress({input:e,atInDisplayName:!0});return{name:t.name,email:t.address,comment:t.comments.replace(/^\(|\)$/g,"")}}catch(r){throw new Error("Invalid user id format")}},canonicalizeEOL:function(e){let t=!1;return i.default.transform(e,e=>{let r;t&&(e=s.default.concatUint8Array([new Uint8Array([13]),e])),13===e[e.length-1]?(t=!0,e=e.subarray(0,-1)):t=!1;const n=[];for(let t=0;r=e.indexOf(10,t)+1;t=r)13!==e[r-2]&&n.push(r);if(!n.length)return e;const i=new Uint8Array(e.length+n.length);let a=0;for(let t=0;t<n.length;t++){const r=e.subarray(n[t-1]||0,n[t]);i.set(r,a),i[(a+=r.length)-1]=13,i[a]=10,a++}return i.set(e.subarray(n[n.length-1]||0),a),i},()=>t?new Uint8Array([13]):void 0)},nativeEOL:function(e){let t=!1;return i.default.transform(e,e=>{let r;13===(e=t&&10!==e[0]?s.default.concatUint8Array([new Uint8Array([13]),e]):new Uint8Array(e))[e.length-1]?(t=!0,e=e.subarray(0,-1)):t=!1;let n=0;for(let t=0;t!==e.length;t=r){(r=e.indexOf(13,t)+1)||(r=e.length);const i=r-(10===e[r]?1:0);t&&e.copyWithin(n,t,i),n+=i-t}return e.subarray(0,n)},()=>t?new Uint8Array([13]):void 0)},removeTrailingSpaces:function(e){return e.split("\n").map(e=>{let t=e.length-1;for(;t>=0&&(" "===e[t]||"\t"===e[t]);t--);return e.substr(0,t+1)}).join("\n")},encodeZBase32:function(e){if(0===e.length)return"";let t=e[0],r=1,n=8,i="";for(;n>0||r<e.length;){if(n<5)if(r<e.length)t<<=8,t|=255&e[r++],n+=8;else{const e=5-n;t<<=e,n+=e}i+="ybndrfg8ejkmcpqxot1uwisza345h769"[31&t>>(n-=5)]}return i},wrapError:function(e,t){if(!t)return new Error(e);try{t.message=e+": "+t.message}catch(r){}return t}}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./config":57,"./encoding/base64":90,"./util":136,"email-addresses":17,"web-stream-tools":53}],137:[function(e,t,r){(function(t){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var r=[],n=!0,i=!1,a=void 0;try{for(var s,o=e[Symbol.iterator]();!(n=(s=o.next()).done)&&(r.push(s.value),!t||r.length!==t);n=!0);}catch(u){i=!0,a=u}finally{try{!n&&o.return&&o.return()}finally{if(i)throw a}}return r}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=o(e("./util")),a=o(e("./crypto")),s=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("./key"));function o(e){return e&&e.__esModule?e:{default:e}}function u(){this._fetch="function"==typeof t.fetch?t.fetch:e("node-fetch")}u.prototype.lookup=async function(e){const t=this._fetch;if(!e.email)throw new Error("You must provide an email parameter!");if(!i.default.isEmailAddress(e.email))throw new Error("Invalid e-mail address.");var r=/(.*)@(.*)/.exec(e.email),o=n(r,3);const u=o[1],l=o[2],c=i.default.encodeZBase32(await a.default.hash.sha1(i.default.str_to_Uint8Array(u.toLowerCase()))),f=`https://openpgpkey.${l}/.well-known/openpgpkey/${l}/hu/${c}`,d=`https://${l}/.well-known/openpgpkey/hu/${c}`;let h;try{if(200!==(h=await t(f)).status)throw new Error("Advanced WKD lookup failed: "+h.statusText)}catch(y){if(i.default.print_debug_error(y),200!==(h=await t(d)).status)throw new Error("Direct WKD lookup failed: "+h.statusText)}const p=new Uint8Array(await h.arrayBuffer());return e.rawBytes?p:s.read(p)},r.default=u}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./crypto":72,"./key":96,"./util":136,"node-fetch":"node-fetch"}],138:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=o(e("../util.js")),i=o(e("../config")),a=o(e("../crypto")),s=o(e("../packet"));function o(e){return e&&e.__esModule?e:{default:e}}function u({path:e="openpgp.worker.min.js",n:t=1,workers:r=[],config:n}={}){const i=e=>t=>{const r=t.data;switch(r.event){case"loaded":this.workers[e].loadedResolve(!0);break;case"method-return":if(r.err){const e=new Error(r.err);e.workerStack=r.stack,this.tasks[r.id].reject(e)}else this.tasks[r.id].resolve(r.data);delete this.tasks[r.id],this.workers[e].requests--;break;case"request-seed":this.seedRandom(e,r.amount);break;default:throw new Error("Unknown Worker Event.")}};if(r.length)this.workers=r;else for(this.workers=[];this.workers.length<t;)this.workers.push(new Worker(e));let a=0;this.workers.forEach(e=>{e.loadedPromise=new Promise(t=>{e.loadedResolve=t}),e.requests=0,e.onmessage=i(a++),e.onerror=(t=>(e.loadedResolve(!1),console.error("Unhandled error in openpgp worker: "+t.message+" ("+t.filename+":"+t.lineno+")"),!1)),n&&e.postMessage({event:"configure",config:n})}),this.tasks={},this.currentID=0}u.prototype.loaded=async function(){return(await Promise.all(this.workers.map(e=>e.loadedPromise))).every(Boolean)},u.prototype.getID=function(){return this.currentID++},u.prototype.seedRandom=async function(e,t){const r=await a.default.random.getRandomBytes(t);this.workers[e].postMessage({event:"seed-random",buf:r},n.default.getTransferables(r,!0))},u.prototype.clearKeyCache=async function(){await Promise.all(this.workers.map(e=>new Promise((t,r)=>{const n=this.getID();e.postMessage({id:n,event:"clear-key-cache"}),this.tasks[n]={resolve:t,reject:r}})))},u.prototype.terminate=function(){this.workers.forEach(e=>{e.terminate()})},u.prototype.delegate=function(e,t){const r=this.getID(),a=this.workers.map(e=>e.requests),o=Math.min(...a);let u=0;for(;u<this.workers.length&&this.workers[u].requests!==o;u++);return new Promise((a,o)=>{this.workers[u].postMessage({id:r,event:e,options:s.default.clone.clonePackets(t)},n.default.getTransferables(t,i.default.zero_copy)),this.workers[u].requests++,this.tasks[r]={resolve:t=>a(s.default.clone.parseClonedPackets(n.default.restoreStreams(t),e)),reject:o}})},r.default=u},{"../config":57,"../crypto":72,"../packet":109,"../util.js":136}]},{},[93])(93)}); |